@orbcharts/plugins-basic 3.0.0-alpha.35 → 3.0.0-alpha.36
Sign up to get free protection for your applications and to get access to all the features.
@@ -1,12 +1,12 @@
|
|
1
|
-
(function(Q,
|
1
|
+
(function(Q,ar){typeof exports=="object"&&typeof module<"u"?ar(exports):typeof define=="function"&&define.amd?define(["exports"],ar):(Q=typeof globalThis<"u"?globalThis:Q||self,ar(Q["orbcharts-plugins-basic"]={}))})(this,function(Q){"use strict";const ar={lineCurve:"curveLinear",lineWidth:2},Rh={radius:4,fillColorType:"white",strokeColorType:"series",strokeWidth:2,onlyShowHighlighted:!1},Ih={showLine:!0,showLabel:!0,lineDashArray:"3, 3",lineColorType:"primary",labelColorType:"primary",labelTextColorType:"background",labelTextFormat:t=>t,labelPadding:24},Nh={barWidth:0,barPadding:1,barGroupPadding:40,barRadius:!1},Fh={barWidth:0,barGroupPadding:10,barRadius:!1},Gh={barWidth:0,barPadding:1,barGroupPadding:20,linearGradientOpacity:[1,0]},zh={labelOffset:[0,0],labelColorType:"primary",axisLineVisible:!0,axisLineColorType:"primary",tickFormat:t=>t,tickLineVisible:!0,tickPadding:20,tickFullLine:!1,tickFullLineDasharray:"none",tickColorType:"secondary",tickTextRotate:0,tickTextColorType:"primary"},Au={labelOffset:[0,0],labelColorType:"primary",axisLineVisible:!1,axisLineColorType:"primary",ticks:4,tickFormat:",.0f",tickLineVisible:!0,tickPadding:20,tickFullLine:!0,tickFullLineDasharray:"none",tickColorType:"secondary",tickTextRotate:0,tickTextColorType:"primary"},Oh=Au,Uh={},Bh={position:"right",justify:"end",padding:28,backgroundFill:"none",backgroundStroke:"none",gap:10,listRectWidth:14,listRectHeight:14,listRectRadius:0};var Mu=function(t,e){return Mu=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(n,r){n.__proto__=r}||function(n,r){for(var i in r)Object.prototype.hasOwnProperty.call(r,i)&&(n[i]=r[i])},Mu(t,e)};function sr(t,e){if(typeof e!="function"&&e!==null)throw new TypeError("Class extends value "+String(e)+" is not a constructor or null");Mu(t,e);function n(){this.constructor=t}t.prototype=e===null?Object.create(e):(n.prototype=e.prototype,new n)}function ux(t,e,n,r){function i(o){return o instanceof n?o:new n(function(a){a(o)})}return new(n||(n=Promise))(function(o,a){function s(l){try{c(r.next(l))}catch(h){a(h)}}function u(l){try{c(r.throw(l))}catch(h){a(h)}}function c(l){l.done?o(l.value):i(l.value).then(s,u)}c((r=r.apply(t,e||[])).next())})}function Yh(t,e){var n={label:0,sent:function(){if(o[0]&1)throw o[1];return o[1]},trys:[],ops:[]},r,i,o,a;return a={next:s(0),throw:s(1),return:s(2)},typeof Symbol=="function"&&(a[Symbol.iterator]=function(){return this}),a;function s(c){return function(l){return u([c,l])}}function u(c){if(r)throw new TypeError("Generator is already executing.");for(;a&&(a=0,c[0]&&(n=0)),n;)try{if(r=1,i&&(o=c[0]&2?i.return:c[0]?i.throw||((o=i.return)&&o.call(i),0):i.next)&&!(o=o.call(i,c[1])).done)return o;switch(i=0,o&&(c=[c[0]&2,o.value]),c[0]){case 0:case 1:o=c;break;case 4:return n.label++,{value:c[1],done:!1};case 5:n.label++,i=c[1],c=[0];continue;case 7:c=n.ops.pop(),n.trys.pop();continue;default:if(o=n.trys,!(o=o.length>0&&o[o.length-1])&&(c[0]===6||c[0]===2)){n=0;continue}if(c[0]===3&&(!o||c[1]>o[0]&&c[1]<o[3])){n.label=c[1];break}if(c[0]===6&&n.label<o[1]){n.label=o[1],o=c;break}if(o&&n.label<o[2]){n.label=o[2],n.ops.push(c);break}o[2]&&n.ops.pop(),n.trys.pop();continue}c=e.call(t,n)}catch(l){c=[6,l],i=0}finally{r=o=0}if(c[0]&5)throw c[1];return{value:c[0]?c[1]:void 0,done:!0}}}function ur(t){var e=typeof Symbol=="function"&&Symbol.iterator,n=e&&t[e],r=0;if(n)return n.call(t);if(t&&typeof t.length=="number")return{next:function(){return t&&r>=t.length&&(t=void 0),{value:t&&t[r++],done:!t}}};throw new TypeError(e?"Object is not iterable.":"Symbol.iterator is not defined.")}function cr(t,e){var n=typeof Symbol=="function"&&t[Symbol.iterator];if(!n)return t;var r=n.call(t),i,o=[],a;try{for(;(e===void 0||e-- >0)&&!(i=r.next()).done;)o.push(i.value)}catch(s){a={error:s}}finally{try{i&&!i.done&&(n=r.return)&&n.call(r)}finally{if(a)throw a.error}}return o}function ai(t,e,n){if(n||arguments.length===2)for(var r=0,i=e.length,o;r<i;r++)(o||!(r in e))&&(o||(o=Array.prototype.slice.call(e,0,r)),o[r]=e[r]);return t.concat(o||Array.prototype.slice.call(e))}function lr(t){return this instanceof lr?(this.v=t,this):new lr(t)}function cx(t,e,n){if(!Symbol.asyncIterator)throw new TypeError("Symbol.asyncIterator is not defined.");var r=n.apply(t,e||[]),i,o=[];return i={},s("next"),s("throw"),s("return",a),i[Symbol.asyncIterator]=function(){return this},i;function a(d){return function(p){return Promise.resolve(p).then(d,h)}}function s(d,p){r[d]&&(i[d]=function(g){return new Promise(function(m,y){o.push([d,g,m,y])>1||u(d,g)})},p&&(i[d]=p(i[d])))}function u(d,p){try{c(r[d](p))}catch(g){f(o[0][3],g)}}function c(d){d.value instanceof lr?Promise.resolve(d.value.v).then(l,h):f(o[0][2],d)}function l(d){u("next",d)}function h(d){u("throw",d)}function f(d,p){d(p),o.shift(),o.length&&u(o[0][0],o[0][1])}}function lx(t){if(!Symbol.asyncIterator)throw new TypeError("Symbol.asyncIterator is not defined.");var e=t[Symbol.asyncIterator],n;return e?e.call(t):(t=typeof ur=="function"?ur(t):t[Symbol.iterator](),n={},r("next"),r("throw"),r("return"),n[Symbol.asyncIterator]=function(){return this},n);function r(o){n[o]=t[o]&&function(a){return new Promise(function(s,u){a=t[o](a),i(s,u,a.done,a.value)})}}function i(o,a,s,u){Promise.resolve(u).then(function(c){o({value:c,done:s})},a)}}typeof SuppressedError=="function"&&SuppressedError;function mt(t){return typeof t=="function"}function Tu(t){var e=function(r){Error.call(r),r.stack=new Error().stack},n=t(e);return n.prototype=Object.create(Error.prototype),n.prototype.constructor=n,n}var Pu=Tu(function(t){return function(n){t(this),this.message=n?n.length+` errors occurred during unsubscription:
|
2
2
|
`+n.map(function(r,i){return i+1+") "+r.toString()}).join(`
|
3
|
-
`):"",this.name="UnsubscriptionError",this.errors=n}});function Pu(t,e){if(t){var n=t.indexOf(e);0<=n&&t.splice(n,1)}}var Lo=function(){function t(e){this.initialTeardown=e,this.closed=!1,this._parentage=null,this._finalizers=null}return t.prototype.unsubscribe=function(){var e,n,r,i,o;if(!this.closed){this.closed=!0;var a=this._parentage;if(a)if(this._parentage=null,Array.isArray(a))try{for(var s=sr(a),u=s.next();!u.done;u=s.next()){var c=u.value;c.remove(this)}}catch(g){e={error:g}}finally{try{u&&!u.done&&(n=s.return)&&n.call(s)}finally{if(e)throw e.error}}else a.remove(this);var l=this.initialTeardown;if(mt(l))try{l()}catch(g){o=g instanceof Tu?g.errors:[g]}var h=this._finalizers;if(h){this._finalizers=null;try{for(var f=sr(h),d=f.next();!d.done;d=f.next()){var p=d.value;try{qh(p)}catch(g){o=o??[],g instanceof Tu?o=oi(oi([],ur(o)),ur(g.errors)):o.push(g)}}}catch(g){r={error:g}}finally{try{d&&!d.done&&(i=f.return)&&i.call(f)}finally{if(r)throw r.error}}}if(o)throw new Tu(o)}},t.prototype.add=function(e){var n;if(e&&e!==this)if(this.closed)qh(e);else{if(e instanceof t){if(e.closed||e._hasParent(this))return;e._addParent(this)}(this._finalizers=(n=this._finalizers)!==null&&n!==void 0?n:[]).push(e)}},t.prototype._hasParent=function(e){var n=this._parentage;return n===e||Array.isArray(n)&&n.includes(e)},t.prototype._addParent=function(e){var n=this._parentage;this._parentage=Array.isArray(n)?(n.push(e),n):n?[n,e]:e},t.prototype._removeParent=function(e){var n=this._parentage;n===e?this._parentage=null:Array.isArray(n)&&Pu(n,e)},t.prototype.remove=function(e){var n=this._finalizers;n&&Pu(n,e),e instanceof t&&e._removeParent(this)},t.EMPTY=function(){var e=new t;return e.closed=!0,e}(),t}(),Wh=Lo.EMPTY;function Hh(t){return t instanceof Lo||t&&"closed"in t&&mt(t.remove)&&mt(t.add)&&mt(t.unsubscribe)}function qh(t){mt(t)?t():t.unsubscribe()}var Xh={onUnhandledError:null,onStoppedNotification:null,Promise:void 0,useDeprecatedSynchronousErrorHandling:!1,useDeprecatedNextContext:!1},Vh={setTimeout:function(t,e){for(var n=[],r=2;r<arguments.length;r++)n[r-2]=arguments[r];return setTimeout.apply(void 0,oi([t,e],ur(n)))},clearTimeout:function(t){var e=Vh.delegate;return((e==null?void 0:e.clearTimeout)||clearTimeout)(t)},delegate:void 0};function jh(t){Vh.setTimeout(function(){throw t})}function Du(){}function Co(t){t()}var Eu=function(t){ar(e,t);function e(n){var r=t.call(this)||this;return r.isStopped=!1,n?(r.destination=n,Hh(n)&&n.add(r)):r.destination=px,r}return e.create=function(n,r,i){return new ai(n,r,i)},e.prototype.next=function(n){this.isStopped||this._next(n)},e.prototype.error=function(n){this.isStopped||(this.isStopped=!0,this._error(n))},e.prototype.complete=function(){this.isStopped||(this.isStopped=!0,this._complete())},e.prototype.unsubscribe=function(){this.closed||(this.isStopped=!0,t.prototype.unsubscribe.call(this),this.destination=null)},e.prototype._next=function(n){this.destination.next(n)},e.prototype._error=function(n){try{this.destination.error(n)}finally{this.unsubscribe()}},e.prototype._complete=function(){try{this.destination.complete()}finally{this.unsubscribe()}},e}(Lo),fx=Function.prototype.bind;function ku(t,e){return fx.call(t,e)}var hx=function(){function t(e){this.partialObserver=e}return t.prototype.next=function(e){var n=this.partialObserver;if(n.next)try{n.next(e)}catch(r){Ro(r)}},t.prototype.error=function(e){var n=this.partialObserver;if(n.error)try{n.error(e)}catch(r){Ro(r)}else Ro(e)},t.prototype.complete=function(){var e=this.partialObserver;if(e.complete)try{e.complete()}catch(n){Ro(n)}},t}(),ai=function(t){ar(e,t);function e(n,r,i){var o=t.call(this)||this,a;if(mt(n)||!n)a={next:n??void 0,error:r??void 0,complete:i??void 0};else{var s;o&&Xh.useDeprecatedNextContext?(s=Object.create(n),s.unsubscribe=function(){return o.unsubscribe()},a={next:n.next&&ku(n.next,s),error:n.error&&ku(n.error,s),complete:n.complete&&ku(n.complete,s)}):a=n}return o.destination=new hx(a),o}return e}(Eu);function Ro(t){jh(t)}function dx(t){throw t}var px={closed:!0,next:Du,error:dx,complete:Du},Lu=function(){return typeof Symbol=="function"&&Symbol.observable||"@@observable"}();function lr(t){return t}function gx(t){return t.length===0?lr:t.length===1?t[0]:function(n){return t.reduce(function(r,i){return i(r)},n)}}var lt=function(){function t(e){e&&(this._subscribe=e)}return t.prototype.lift=function(e){var n=new t;return n.source=this,n.operator=e,n},t.prototype.subscribe=function(e,n,r){var i=this,o=yx(e)?e:new ai(e,n,r);return Co(function(){var a=i,s=a.operator,u=a.source;o.add(s?s.call(o,u):u?i._subscribe(o):i._trySubscribe(o))}),o},t.prototype._trySubscribe=function(e){try{return this._subscribe(e)}catch(n){e.error(n)}},t.prototype.forEach=function(e,n){var r=this;return n=Zh(n),new n(function(i,o){var a=new ai({next:function(s){try{e(s)}catch(u){o(u),a.unsubscribe()}},error:o,complete:i});r.subscribe(a)})},t.prototype._subscribe=function(e){var n;return(n=this.source)===null||n===void 0?void 0:n.subscribe(e)},t.prototype[Lu]=function(){return this},t.prototype.pipe=function(){for(var e=[],n=0;n<arguments.length;n++)e[n]=arguments[n];return gx(e)(this)},t.prototype.toPromise=function(e){var n=this;return e=Zh(e),new e(function(r,i){var o;n.subscribe(function(a){return o=a},function(a){return i(a)},function(){return r(o)})})},t.create=function(e){return new t(e)},t}();function Zh(t){var e;return(e=t??Xh.Promise)!==null&&e!==void 0?e:Promise}function mx(t){return t&&mt(t.next)&&mt(t.error)&&mt(t.complete)}function yx(t){return t&&t instanceof Eu||mx(t)&&Hh(t)}function bx(t){return mt(t==null?void 0:t.lift)}function ce(t){return function(e){if(bx(e))return e.lift(function(n){try{return t(n,this)}catch(r){this.error(r)}});throw new TypeError("Unable to lift unknown Observable type")}}function oe(t,e,n,r,i){return new vx(t,e,n,r,i)}var vx=function(t){ar(e,t);function e(n,r,i,o,a,s){var u=t.call(this,n)||this;return u.onFinalize=a,u.shouldUnsubscribe=s,u._next=r?function(c){try{r(c)}catch(l){n.error(l)}}:t.prototype._next,u._error=o?function(c){try{o(c)}catch(l){n.error(l)}finally{this.unsubscribe()}}:t.prototype._error,u._complete=i?function(){try{i()}catch(c){n.error(c)}finally{this.unsubscribe()}}:t.prototype._complete,u}return e.prototype.unsubscribe=function(){var n;if(!this.shouldUnsubscribe||this.shouldUnsubscribe()){var r=this.closed;t.prototype.unsubscribe.call(this),!r&&((n=this.onFinalize)===null||n===void 0||n.call(this))}},e}(Eu),xx=Mu(function(t){return function(){t(this),this.name="ObjectUnsubscribedError",this.message="object unsubscribed"}}),it=function(t){ar(e,t);function e(){var n=t.call(this)||this;return n.closed=!1,n.currentObservers=null,n.observers=[],n.isStopped=!1,n.hasError=!1,n.thrownError=null,n}return e.prototype.lift=function(n){var r=new Kh(this,this);return r.operator=n,r},e.prototype._throwIfClosed=function(){if(this.closed)throw new xx},e.prototype.next=function(n){var r=this;Co(function(){var i,o;if(r._throwIfClosed(),!r.isStopped){r.currentObservers||(r.currentObservers=Array.from(r.observers));try{for(var a=sr(r.currentObservers),s=a.next();!s.done;s=a.next()){var u=s.value;u.next(n)}}catch(c){i={error:c}}finally{try{s&&!s.done&&(o=a.return)&&o.call(a)}finally{if(i)throw i.error}}}})},e.prototype.error=function(n){var r=this;Co(function(){if(r._throwIfClosed(),!r.isStopped){r.hasError=r.isStopped=!0,r.thrownError=n;for(var i=r.observers;i.length;)i.shift().error(n)}})},e.prototype.complete=function(){var n=this;Co(function(){if(n._throwIfClosed(),!n.isStopped){n.isStopped=!0;for(var r=n.observers;r.length;)r.shift().complete()}})},e.prototype.unsubscribe=function(){this.isStopped=this.closed=!0,this.observers=this.currentObservers=null},Object.defineProperty(e.prototype,"observed",{get:function(){var n;return((n=this.observers)===null||n===void 0?void 0:n.length)>0},enumerable:!1,configurable:!0}),e.prototype._trySubscribe=function(n){return this._throwIfClosed(),t.prototype._trySubscribe.call(this,n)},e.prototype._subscribe=function(n){return this._throwIfClosed(),this._checkFinalizedStatuses(n),this._innerSubscribe(n)},e.prototype._innerSubscribe=function(n){var r=this,i=this,o=i.hasError,a=i.isStopped,s=i.observers;return o||a?Wh:(this.currentObservers=null,s.push(n),new Lo(function(){r.currentObservers=null,Pu(s,n)}))},e.prototype._checkFinalizedStatuses=function(n){var r=this,i=r.hasError,o=r.thrownError,a=r.isStopped;i?n.error(o):a&&n.complete()},e.prototype.asObservable=function(){var n=new lt;return n.source=this,n},e.create=function(n,r){return new Kh(n,r)},e}(lt),Kh=function(t){ar(e,t);function e(n,r){var i=t.call(this)||this;return i.destination=n,i.source=r,i}return e.prototype.next=function(n){var r,i;(i=(r=this.destination)===null||r===void 0?void 0:r.next)===null||i===void 0||i.call(r,n)},e.prototype.error=function(n){var r,i;(i=(r=this.destination)===null||r===void 0?void 0:r.error)===null||i===void 0||i.call(r,n)},e.prototype.complete=function(){var n,r;(r=(n=this.destination)===null||n===void 0?void 0:n.complete)===null||r===void 0||r.call(n)},e.prototype._subscribe=function(n){var r,i;return(i=(r=this.source)===null||r===void 0?void 0:r.subscribe(n))!==null&&i!==void 0?i:Wh},e}(it),Qh={now:function(){return(Qh.delegate||Date).now()},delegate:void 0},_x=function(t){ar(e,t);function e(n,r,i){n===void 0&&(n=1/0),r===void 0&&(r=1/0),i===void 0&&(i=Qh);var o=t.call(this)||this;return o._bufferSize=n,o._windowTime=r,o._timestampProvider=i,o._buffer=[],o._infiniteTimeWindow=!0,o._infiniteTimeWindow=r===1/0,o._bufferSize=Math.max(1,n),o._windowTime=Math.max(1,r),o}return e.prototype.next=function(n){var r=this,i=r.isStopped,o=r._buffer,a=r._infiniteTimeWindow,s=r._timestampProvider,u=r._windowTime;i||(o.push(n),!a&&o.push(s.now()+u)),this._trimBuffer(),t.prototype.next.call(this,n)},e.prototype._subscribe=function(n){this._throwIfClosed(),this._trimBuffer();for(var r=this._innerSubscribe(n),i=this,o=i._infiniteTimeWindow,a=i._buffer,s=a.slice(),u=0;u<s.length&&!n.closed;u+=o?1:2)n.next(s[u]);return this._checkFinalizedStatuses(n),r},e.prototype._trimBuffer=function(){var n=this,r=n._bufferSize,i=n._timestampProvider,o=n._buffer,a=n._infiniteTimeWindow,s=(a?1:2)*r;if(r<1/0&&s<o.length&&o.splice(0,o.length-s),!a){for(var u=i.now(),c=0,l=1;l<o.length&&o[l]<=u;l+=2)c=l;c&&o.splice(0,c+1)}},e}(it),Jh=new lt(function(t){return t.complete()});function wx(t){return t&&mt(t.schedule)}function Cu(t){return t[t.length-1]}function $x(t){return mt(Cu(t))?t.pop():void 0}function Ru(t){return wx(Cu(t))?t.pop():void 0}function Sx(t,e){return typeof Cu(t)=="number"?t.pop():e}var Iu=function(t){return t&&typeof t.length=="number"&&typeof t!="function"};function t0(t){return mt(t==null?void 0:t.then)}function e0(t){return mt(t[Lu])}function n0(t){return Symbol.asyncIterator&&mt(t==null?void 0:t[Symbol.asyncIterator])}function r0(t){return new TypeError("You provided "+(t!==null&&typeof t=="object"?"an invalid object":"'"+t+"'")+" where a stream was expected. You can provide an Observable, Promise, ReadableStream, Array, AsyncIterable, or Iterable.")}function Ax(){return typeof Symbol!="function"||!Symbol.iterator?"@@iterator":Symbol.iterator}var i0=Ax();function o0(t){return mt(t==null?void 0:t[i0])}function a0(t){return cx(this,arguments,function(){var n,r,i,o;return Yh(this,function(a){switch(a.label){case 0:n=t.getReader(),a.label=1;case 1:a.trys.push([1,,9,10]),a.label=2;case 2:return[4,cr(n.read())];case 3:return r=a.sent(),i=r.value,o=r.done,o?[4,cr(void 0)]:[3,5];case 4:return[2,a.sent()];case 5:return[4,cr(i)];case 6:return[4,a.sent()];case 7:return a.sent(),[3,2];case 8:return[3,10];case 9:return n.releaseLock(),[7];case 10:return[2]}})})}function s0(t){return mt(t==null?void 0:t.getReader)}function le(t){if(t instanceof lt)return t;if(t!=null){if(e0(t))return Mx(t);if(Iu(t))return Tx(t);if(t0(t))return Px(t);if(n0(t))return u0(t);if(o0(t))return Dx(t);if(s0(t))return Ex(t)}throw r0(t)}function Mx(t){return new lt(function(e){var n=t[Lu]();if(mt(n.subscribe))return n.subscribe(e);throw new TypeError("Provided object does not correctly implement Symbol.observable")})}function Tx(t){return new lt(function(e){for(var n=0;n<t.length&&!e.closed;n++)e.next(t[n]);e.complete()})}function Px(t){return new lt(function(e){t.then(function(n){e.closed||(e.next(n),e.complete())},function(n){return e.error(n)}).then(null,jh)})}function Dx(t){return new lt(function(e){var n,r;try{for(var i=sr(t),o=i.next();!o.done;o=i.next()){var a=o.value;if(e.next(a),e.closed)return}}catch(s){n={error:s}}finally{try{o&&!o.done&&(r=i.return)&&r.call(i)}finally{if(n)throw n.error}}e.complete()})}function u0(t){return new lt(function(e){kx(t,e).catch(function(n){return e.error(n)})})}function Ex(t){return u0(a0(t))}function kx(t,e){var n,r,i,o;return ux(this,void 0,void 0,function(){var a,s;return Yh(this,function(u){switch(u.label){case 0:u.trys.push([0,5,6,11]),n=lx(t),u.label=1;case 1:return[4,n.next()];case 2:if(r=u.sent(),!!r.done)return[3,4];if(a=r.value,e.next(a),e.closed)return[2];u.label=3;case 3:return[3,1];case 4:return[3,11];case 5:return s=u.sent(),i={error:s},[3,11];case 6:return u.trys.push([6,,9,10]),r&&!r.done&&(o=n.return)?[4,o.call(n)]:[3,8];case 7:u.sent(),u.label=8;case 8:return[3,10];case 9:if(i)throw i.error;return[7];case 10:return[7];case 11:return e.complete(),[2]}})})}function sn(t,e,n,r,i){r===void 0&&(r=0),i===void 0&&(i=!1);var o=e.schedule(function(){n(),i?t.add(this.schedule(null,r)):this.unsubscribe()},r);if(t.add(o),!i)return o}function c0(t,e){return e===void 0&&(e=0),ce(function(n,r){n.subscribe(oe(r,function(i){return sn(r,t,function(){return r.next(i)},e)},function(){return sn(r,t,function(){return r.complete()},e)},function(i){return sn(r,t,function(){return r.error(i)},e)}))})}function l0(t,e){return e===void 0&&(e=0),ce(function(n,r){r.add(t.schedule(function(){return n.subscribe(r)},e))})}function Lx(t,e){return le(t).pipe(l0(e),c0(e))}function Cx(t,e){return le(t).pipe(l0(e),c0(e))}function Rx(t,e){return new lt(function(n){var r=0;return e.schedule(function(){r===t.length?n.complete():(n.next(t[r++]),n.closed||this.schedule())})})}function Ix(t,e){return new lt(function(n){var r;return sn(n,e,function(){r=t[i0](),sn(n,e,function(){var i,o,a;try{i=r.next(),o=i.value,a=i.done}catch(s){n.error(s);return}a?n.complete():n.next(o)},0,!0)}),function(){return mt(r==null?void 0:r.return)&&r.return()}})}function f0(t,e){if(!t)throw new Error("Iterable cannot be null");return new lt(function(n){sn(n,e,function(){var r=t[Symbol.asyncIterator]();sn(n,e,function(){r.next().then(function(i){i.done?n.complete():n.next(i.value)})},0,!0)})})}function Nx(t,e){return f0(a0(t),e)}function Fx(t,e){if(t!=null){if(e0(t))return Lx(t,e);if(Iu(t))return Rx(t,e);if(t0(t))return Cx(t,e);if(n0(t))return f0(t,e);if(o0(t))return Ix(t,e);if(s0(t))return Nx(t,e)}throw r0(t)}function Io(t,e){return e?Fx(t,e):le(t)}function Nu(){for(var t=[],e=0;e<arguments.length;e++)t[e]=arguments[e];var n=Ru(t);return Io(t,n)}var h0=Mu(function(t){return function(){t(this),this.name="EmptyError",this.message="no elements in sequence"}});function B(t,e){return ce(function(n,r){var i=0;n.subscribe(oe(r,function(o){r.next(t.call(e,o,i++))}))})}var Gx=Array.isArray;function zx(t,e){return Gx(e)?t.apply(void 0,oi([],ur(e))):t(e)}function d0(t){return B(function(e){return zx(t,e)})}var Ox=Array.isArray,Ux=Object.getPrototypeOf,Bx=Object.prototype,Yx=Object.keys;function Wx(t){if(t.length===1){var e=t[0];if(Ox(e))return{args:e,keys:null};if(Hx(e)){var n=Yx(e);return{args:n.map(function(r){return e[r]}),keys:n}}}return{args:t,keys:null}}function Hx(t){return t&&typeof t=="object"&&Ux(t)===Bx}function qx(t,e){return t.reduce(function(n,r,i){return n[r]=e[i],n},{})}function H(){for(var t=[],e=0;e<arguments.length;e++)t[e]=arguments[e];var n=Ru(t),r=$x(t),i=Wx(t),o=i.args,a=i.keys;if(o.length===0)return Io([],n);var s=new lt(Xx(o,n,a?function(u){return qx(a,u)}:lr));return r?s.pipe(d0(r)):s}function Xx(t,e,n){return n===void 0&&(n=lr),function(r){p0(e,function(){for(var i=t.length,o=new Array(i),a=i,s=i,u=function(l){p0(e,function(){var h=Io(t[l],e),f=!1;h.subscribe(oe(r,function(d){o[l]=d,f||(f=!0,s--),s||r.next(n(o.slice()))},function(){--a||r.complete()}))},r)},c=0;c<i;c++)u(c)},r)}}function p0(t,e,n){t?sn(n,t,e):e()}function Vx(t,e,n,r,i,o,a,s){var u=[],c=0,l=0,h=!1,f=function(){h&&!u.length&&!c&&e.complete()},d=function(g){return c<r?p(g):u.push(g)},p=function(g){c++;var m=!1;le(n(g,l++)).subscribe(oe(e,function(y){e.next(y)},function(){m=!0},void 0,function(){if(m)try{c--;for(var y=function(){var _=u.shift();a||p(_)};u.length&&c<r;)y();f()}catch(_){e.error(_)}}))};return t.subscribe(oe(e,d,function(){h=!0,f()})),function(){}}function Fu(t,e,n){return n===void 0&&(n=1/0),mt(e)?Fu(function(r,i){return B(function(o,a){return e(r,o,i,a)})(le(t(r,i)))},n):(typeof e=="number"&&(n=e),ce(function(r,i){return Vx(r,i,t,n)}))}function jx(t){return t===void 0&&(t=1/0),Fu(lr,t)}function Zx(t){return new lt(function(e){le(t()).subscribe(e)})}var Kx=["addListener","removeListener"],Qx=["addEventListener","removeEventListener"],Jx=["on","off"];function Gu(t,e,n,r){if(mt(n)&&(r=n,n=void 0),r)return Gu(t,e,n).pipe(d0(r));var i=ur(n_(t)?Qx.map(function(s){return function(u){return t[s](e,u,n)}}):t_(t)?Kx.map(g0(t,e)):e_(t)?Jx.map(g0(t,e)):[],2),o=i[0],a=i[1];if(!o&&Iu(t))return Fu(function(s){return Gu(s,e,n)})(le(t));if(!o)throw new TypeError("Invalid event target");return new lt(function(s){var u=function(){for(var c=[],l=0;l<arguments.length;l++)c[l]=arguments[l];return s.next(1<c.length?c:c[0])};return o(u),function(){return a(u)}})}function g0(t,e){return function(n){return function(r){return t[n](e,r)}}}function t_(t){return mt(t.addListener)&&mt(t.removeListener)}function e_(t){return mt(t.on)&&mt(t.off)}function n_(t){return mt(t.addEventListener)&&mt(t.removeEventListener)}function m0(t,e,n){return Zx(function(){return t()?e:n})}function zu(){for(var t=[],e=0;e<arguments.length;e++)t[e]=arguments[e];var n=Ru(t),r=Sx(t,1/0),i=t;return i.length?i.length===1?le(i[0]):jx(r)(Io(i,n)):Jh}function No(t,e){return ce(function(n,r){var i=0;n.subscribe(oe(r,function(o){return t.call(e,o,i++)&&r.next(o)}))})}function r_(t){return ce(function(e,n){var r=!1;e.subscribe(oe(n,function(i){r=!0,n.next(i)},function(){r||n.next(t),n.complete()}))})}function i_(t){return t<=0?function(){return Jh}:ce(function(e,n){var r=0;e.subscribe(oe(n,function(i){++r<=t&&(n.next(i),t<=r&&n.complete())}))})}function ht(t,e){return e===void 0&&(e=lr),t=t??o_,ce(function(n,r){var i,o=!0;n.subscribe(oe(r,function(a){var s=e(a);(o||!t(i,s))&&(o=!1,i=s,r.next(a))}))})}function o_(t,e){return t===e}function a_(t){return t===void 0&&(t=s_),ce(function(e,n){var r=!1;e.subscribe(oe(n,function(i){r=!0,n.next(i)},function(){return r?n.complete():n.error(t())}))})}function s_(){return new h0}function si(t,e){var n=arguments.length>=2;return function(r){return r.pipe(lr,i_(1),n?r_(e):a_(function(){return new h0}))}}function u_(t){t===void 0&&(t={});var e=t.connector,n=e===void 0?function(){return new it}:e,r=t.resetOnError,i=r===void 0?!0:r,o=t.resetOnComplete,a=o===void 0?!0:o,s=t.resetOnRefCountZero,u=s===void 0?!0:s;return function(c){var l,h,f,d=0,p=!1,g=!1,m=function(){h==null||h.unsubscribe(),h=void 0},y=function(){m(),l=f=void 0,p=g=!1},_=function(){var x=l;y(),x==null||x.unsubscribe()};return ce(function(x,b){d++,!g&&!p&&m();var $=f=f??n();b.add(function(){d--,d===0&&!g&&!p&&(h=Ou(_,u))}),$.subscribe(b),!l&&d>0&&(l=new ai({next:function(v){return $.next(v)},error:function(v){g=!0,m(),h=Ou(y,i,v),$.error(v)},complete:function(){p=!0,m(),h=Ou(y,a),$.complete()}}),le(x).subscribe(l))})(c)}}function Ou(t,e){for(var n=[],r=2;r<arguments.length;r++)n[r-2]=arguments[r];if(e===!0){t();return}if(e!==!1){var i=new ai({next:function(){i.unsubscribe(),t()}});return le(e.apply(void 0,oi([],ur(n)))).subscribe(i)}}function Uu(t,e,n){var r,i=!1;return r=t,u_({connector:function(){return new _x(r,e,n)},resetOnError:!0,resetOnComplete:!1,resetOnRefCountZero:i})}function U(t,e){return ce(function(n,r){var i=null,o=0,a=!1,s=function(){return a&&!i&&r.complete()};n.subscribe(oe(r,function(u){i==null||i.unsubscribe();var c=0,l=o++;le(t(u,l)).subscribe(i=oe(r,function(h){return r.next(e?e(u,h,l,c++):h)},function(){i=null,s()}))},function(){a=!0,s()}))})}function G(t){return ce(function(e,n){le(t).subscribe(oe(n,function(){return n.complete()},Du)),!n.closed&&e.subscribe(n)})}const fr={position:"left",scaleDomain:[0,"auto"],scaleRange:[0,.9],label:""};function Fo(t,e){return t==null||e==null?NaN:t<e?-1:t>e?1:t>=e?0:NaN}function c_(t,e){return t==null||e==null?NaN:e<t?-1:e>t?1:e>=t?0:NaN}function y0(t){let e,n,r;t.length!==2?(e=Fo,n=(s,u)=>Fo(t(s),u),r=(s,u)=>t(s)-u):(e=t===Fo||t===c_?t:l_,n=t,r=t);function i(s,u,c=0,l=s.length){if(c<l){if(e(u,u)!==0)return l;do{const h=c+l>>>1;n(s[h],u)<0?c=h+1:l=h}while(c<l)}return c}function o(s,u,c=0,l=s.length){if(c<l){if(e(u,u)!==0)return l;do{const h=c+l>>>1;n(s[h],u)<=0?c=h+1:l=h}while(c<l)}return c}function a(s,u,c=0,l=s.length){const h=i(s,u,c,l-1);return h>c&&r(s[h-1],u)>-r(s[h],u)?h-1:h}return{left:i,center:a,right:o}}function l_(){return 0}function f_(t){return t===null?NaN:+t}const h_=y0(Fo),b0=h_.right;y0(f_).center;class v0 extends Map{constructor(e,n=g_){if(super(),Object.defineProperties(this,{_intern:{value:new Map},_key:{value:n}}),e!=null)for(const[r,i]of e)this.set(r,i)}get(e){return super.get(x0(this,e))}has(e){return super.has(x0(this,e))}set(e,n){return super.set(d_(this,e),n)}delete(e){return super.delete(p_(this,e))}}function x0({_intern:t,_key:e},n){const r=e(n);return t.has(r)?t.get(r):n}function d_({_intern:t,_key:e},n){const r=e(n);return t.has(r)?t.get(r):(t.set(r,n),n)}function p_({_intern:t,_key:e},n){const r=e(n);return t.has(r)&&(n=t.get(r),t.delete(r)),n}function g_(t){return t!==null&&typeof t=="object"?t.valueOf():t}const m_=Math.sqrt(50),y_=Math.sqrt(10),b_=Math.sqrt(2);function Go(t,e,n){const r=(e-t)/Math.max(0,n),i=Math.floor(Math.log10(r)),o=r/Math.pow(10,i),a=o>=m_?10:o>=y_?5:o>=b_?2:1;let s,u,c;return i<0?(c=Math.pow(10,-i)/a,s=Math.round(t*c),u=Math.round(e*c),s/c<t&&++s,u/c>e&&--u,c=-c):(c=Math.pow(10,i)*a,s=Math.round(t/c),u=Math.round(e/c),s*c<t&&++s,u*c>e&&--u),u<s&&.5<=n&&n<2?Go(t,e,n*2):[s,u,c]}function v_(t,e,n){if(e=+e,t=+t,n=+n,!(n>0))return[];if(t===e)return[t];const r=e<t,[i,o,a]=r?Go(e,t,n):Go(t,e,n);if(!(o>=i))return[];const s=o-i+1,u=new Array(s);if(r)if(a<0)for(let c=0;c<s;++c)u[c]=(o-c)/-a;else for(let c=0;c<s;++c)u[c]=(o-c)*a;else if(a<0)for(let c=0;c<s;++c)u[c]=(i+c)/-a;else for(let c=0;c<s;++c)u[c]=(i+c)*a;return u}function Bu(t,e,n){return e=+e,t=+t,n=+n,Go(t,e,n)[2]}function x_(t,e,n){e=+e,t=+t,n=+n;const r=e<t,i=r?Bu(e,t,n):Bu(t,e,n);return(r?-1:1)*(i<0?1/-i:i)}function __(t,e,n){t=+t,e=+e,n=(i=arguments.length)<2?(e=t,t=0,1):i<3?1:+n;for(var r=-1,i=Math.max(0,Math.ceil((e-t)/n))|0,o=new Array(i);++r<i;)o[r]=t+r*n;return o}var w_={value:()=>{}};function _0(){for(var t=0,e=arguments.length,n={},r;t<e;++t){if(!(r=arguments[t]+"")||r in n||/[\s.]/.test(r))throw new Error("illegal type: "+r);n[r]=[]}return new zo(n)}function zo(t){this._=t}function $_(t,e){return t.trim().split(/^|\s+/).map(function(n){var r="",i=n.indexOf(".");if(i>=0&&(r=n.slice(i+1),n=n.slice(0,i)),n&&!e.hasOwnProperty(n))throw new Error("unknown type: "+n);return{type:n,name:r}})}zo.prototype=_0.prototype={constructor:zo,on:function(t,e){var n=this._,r=$_(t+"",n),i,o=-1,a=r.length;if(arguments.length<2){for(;++o<a;)if((i=(t=r[o]).type)&&(i=S_(n[i],t.name)))return i;return}if(e!=null&&typeof e!="function")throw new Error("invalid callback: "+e);for(;++o<a;)if(i=(t=r[o]).type)n[i]=w0(n[i],t.name,e);else if(e==null)for(i in n)n[i]=w0(n[i],t.name,null);return this},copy:function(){var t={},e=this._;for(var n in e)t[n]=e[n].slice();return new zo(t)},call:function(t,e){if((i=arguments.length-2)>0)for(var n=new Array(i),r=0,i,o;r<i;++r)n[r]=arguments[r+2];if(!this._.hasOwnProperty(t))throw new Error("unknown type: "+t);for(o=this._[t],r=0,i=o.length;r<i;++r)o[r].value.apply(e,n)},apply:function(t,e,n){if(!this._.hasOwnProperty(t))throw new Error("unknown type: "+t);for(var r=this._[t],i=0,o=r.length;i<o;++i)r[i].value.apply(e,n)}};function S_(t,e){for(var n=0,r=t.length,i;n<r;++n)if((i=t[n]).name===e)return i.value}function w0(t,e,n){for(var r=0,i=t.length;r<i;++r)if(t[r].name===e){t[r]=w_,t=t.slice(0,r).concat(t.slice(r+1));break}return n!=null&&t.push({name:e,value:n}),t}var Yu="http://www.w3.org/1999/xhtml";const $0={svg:"http://www.w3.org/2000/svg",xhtml:Yu,xlink:"http://www.w3.org/1999/xlink",xml:"http://www.w3.org/XML/1998/namespace",xmlns:"http://www.w3.org/2000/xmlns/"};function Oo(t){var e=t+="",n=e.indexOf(":");return n>=0&&(e=t.slice(0,n))!=="xmlns"&&(t=t.slice(n+1)),$0.hasOwnProperty(e)?{space:$0[e],local:t}:t}function A_(t){return function(){var e=this.ownerDocument,n=this.namespaceURI;return n===Yu&&e.documentElement.namespaceURI===Yu?e.createElement(t):e.createElementNS(n,t)}}function M_(t){return function(){return this.ownerDocument.createElementNS(t.space,t.local)}}function S0(t){var e=Oo(t);return(e.local?M_:A_)(e)}function T_(){}function Wu(t){return t==null?T_:function(){return this.querySelector(t)}}function P_(t){typeof t!="function"&&(t=Wu(t));for(var e=this._groups,n=e.length,r=new Array(n),i=0;i<n;++i)for(var o=e[i],a=o.length,s=r[i]=new Array(a),u,c,l=0;l<a;++l)(u=o[l])&&(c=t.call(u,u.__data__,l,o))&&("__data__"in u&&(c.__data__=u.__data__),s[l]=c);return new be(r,this._parents)}function D_(t){return t==null?[]:Array.isArray(t)?t:Array.from(t)}function E_(){return[]}function A0(t){return t==null?E_:function(){return this.querySelectorAll(t)}}function k_(t){return function(){return D_(t.apply(this,arguments))}}function L_(t){typeof t=="function"?t=k_(t):t=A0(t);for(var e=this._groups,n=e.length,r=[],i=[],o=0;o<n;++o)for(var a=e[o],s=a.length,u,c=0;c<s;++c)(u=a[c])&&(r.push(t.call(u,u.__data__,c,a)),i.push(u));return new be(r,i)}function M0(t){return function(){return this.matches(t)}}function T0(t){return function(e){return e.matches(t)}}var C_=Array.prototype.find;function R_(t){return function(){return C_.call(this.children,t)}}function I_(){return this.firstElementChild}function N_(t){return this.select(t==null?I_:R_(typeof t=="function"?t:T0(t)))}var F_=Array.prototype.filter;function G_(){return Array.from(this.children)}function z_(t){return function(){return F_.call(this.children,t)}}function O_(t){return this.selectAll(t==null?G_:z_(typeof t=="function"?t:T0(t)))}function U_(t){typeof t!="function"&&(t=M0(t));for(var e=this._groups,n=e.length,r=new Array(n),i=0;i<n;++i)for(var o=e[i],a=o.length,s=r[i]=[],u,c=0;c<a;++c)(u=o[c])&&t.call(u,u.__data__,c,o)&&s.push(u);return new be(r,this._parents)}function P0(t){return new Array(t.length)}function B_(){return new be(this._enter||this._groups.map(P0),this._parents)}function Uo(t,e){this.ownerDocument=t.ownerDocument,this.namespaceURI=t.namespaceURI,this._next=null,this._parent=t,this.__data__=e}Uo.prototype={constructor:Uo,appendChild:function(t){return this._parent.insertBefore(t,this._next)},insertBefore:function(t,e){return this._parent.insertBefore(t,e)},querySelector:function(t){return this._parent.querySelector(t)},querySelectorAll:function(t){return this._parent.querySelectorAll(t)}};function Y_(t){return function(){return t}}function W_(t,e,n,r,i,o){for(var a=0,s,u=e.length,c=o.length;a<c;++a)(s=e[a])?(s.__data__=o[a],r[a]=s):n[a]=new Uo(t,o[a]);for(;a<u;++a)(s=e[a])&&(i[a]=s)}function H_(t,e,n,r,i,o,a){var s,u,c=new Map,l=e.length,h=o.length,f=new Array(l),d;for(s=0;s<l;++s)(u=e[s])&&(f[s]=d=a.call(u,u.__data__,s,e)+"",c.has(d)?i[s]=u:c.set(d,u));for(s=0;s<h;++s)d=a.call(t,o[s],s,o)+"",(u=c.get(d))?(r[s]=u,u.__data__=o[s],c.delete(d)):n[s]=new Uo(t,o[s]);for(s=0;s<l;++s)(u=e[s])&&c.get(f[s])===u&&(i[s]=u)}function q_(t){return t.__data__}function X_(t,e){if(!arguments.length)return Array.from(this,q_);var n=e?H_:W_,r=this._parents,i=this._groups;typeof t!="function"&&(t=Y_(t));for(var o=i.length,a=new Array(o),s=new Array(o),u=new Array(o),c=0;c<o;++c){var l=r[c],h=i[c],f=h.length,d=V_(t.call(l,l&&l.__data__,c,r)),p=d.length,g=s[c]=new Array(p),m=a[c]=new Array(p),y=u[c]=new Array(f);n(l,h,g,m,y,d,e);for(var _=0,x=0,b,$;_<p;++_)if(b=g[_]){for(_>=x&&(x=_+1);!($=m[x])&&++x<p;);b._next=$||null}}return a=new be(a,r),a._enter=s,a._exit=u,a}function V_(t){return typeof t=="object"&&"length"in t?t:Array.from(t)}function j_(){return new be(this._exit||this._groups.map(P0),this._parents)}function Z_(t,e,n){var r=this.enter(),i=this,o=this.exit();return typeof t=="function"?(r=t(r),r&&(r=r.selection())):r=r.append(t+""),e!=null&&(i=e(i),i&&(i=i.selection())),n==null?o.remove():n(o),r&&i?r.merge(i).order():i}function K_(t){for(var e=t.selection?t.selection():t,n=this._groups,r=e._groups,i=n.length,o=r.length,a=Math.min(i,o),s=new Array(i),u=0;u<a;++u)for(var c=n[u],l=r[u],h=c.length,f=s[u]=new Array(h),d,p=0;p<h;++p)(d=c[p]||l[p])&&(f[p]=d);for(;u<i;++u)s[u]=n[u];return new be(s,this._parents)}function Q_(){for(var t=this._groups,e=-1,n=t.length;++e<n;)for(var r=t[e],i=r.length-1,o=r[i],a;--i>=0;)(a=r[i])&&(o&&a.compareDocumentPosition(o)^4&&o.parentNode.insertBefore(a,o),o=a);return this}function J_(t){t||(t=tw);function e(h,f){return h&&f?t(h.__data__,f.__data__):!h-!f}for(var n=this._groups,r=n.length,i=new Array(r),o=0;o<r;++o){for(var a=n[o],s=a.length,u=i[o]=new Array(s),c,l=0;l<s;++l)(c=a[l])&&(u[l]=c);u.sort(e)}return new be(i,this._parents).order()}function tw(t,e){return t<e?-1:t>e?1:t>=e?0:NaN}function ew(){var t=arguments[0];return arguments[0]=this,t.apply(null,arguments),this}function nw(){return Array.from(this)}function rw(){for(var t=this._groups,e=0,n=t.length;e<n;++e)for(var r=t[e],i=0,o=r.length;i<o;++i){var a=r[i];if(a)return a}return null}function iw(){let t=0;for(const e of this)++t;return t}function ow(){return!this.node()}function aw(t){for(var e=this._groups,n=0,r=e.length;n<r;++n)for(var i=e[n],o=0,a=i.length,s;o<a;++o)(s=i[o])&&t.call(s,s.__data__,o,i);return this}function sw(t){return function(){this.removeAttribute(t)}}function uw(t){return function(){this.removeAttributeNS(t.space,t.local)}}function cw(t,e){return function(){this.setAttribute(t,e)}}function lw(t,e){return function(){this.setAttributeNS(t.space,t.local,e)}}function fw(t,e){return function(){var n=e.apply(this,arguments);n==null?this.removeAttribute(t):this.setAttribute(t,n)}}function hw(t,e){return function(){var n=e.apply(this,arguments);n==null?this.removeAttributeNS(t.space,t.local):this.setAttributeNS(t.space,t.local,n)}}function dw(t,e){var n=Oo(t);if(arguments.length<2){var r=this.node();return n.local?r.getAttributeNS(n.space,n.local):r.getAttribute(n)}return this.each((e==null?n.local?uw:sw:typeof e=="function"?n.local?hw:fw:n.local?lw:cw)(n,e))}function D0(t){return t.ownerDocument&&t.ownerDocument.defaultView||t.document&&t||t.defaultView}function pw(t){return function(){this.style.removeProperty(t)}}function gw(t,e,n){return function(){this.style.setProperty(t,e,n)}}function mw(t,e,n){return function(){var r=e.apply(this,arguments);r==null?this.style.removeProperty(t):this.style.setProperty(t,r,n)}}function yw(t,e,n){return arguments.length>1?this.each((e==null?pw:typeof e=="function"?mw:gw)(t,e,n??"")):hr(this.node(),t)}function hr(t,e){return t.style.getPropertyValue(e)||D0(t).getComputedStyle(t,null).getPropertyValue(e)}function bw(t){return function(){delete this[t]}}function vw(t,e){return function(){this[t]=e}}function xw(t,e){return function(){var n=e.apply(this,arguments);n==null?delete this[t]:this[t]=n}}function _w(t,e){return arguments.length>1?this.each((e==null?bw:typeof e=="function"?xw:vw)(t,e)):this.node()[t]}function E0(t){return t.trim().split(/^|\s+/)}function Hu(t){return t.classList||new k0(t)}function k0(t){this._node=t,this._names=E0(t.getAttribute("class")||"")}k0.prototype={add:function(t){var e=this._names.indexOf(t);e<0&&(this._names.push(t),this._node.setAttribute("class",this._names.join(" ")))},remove:function(t){var e=this._names.indexOf(t);e>=0&&(this._names.splice(e,1),this._node.setAttribute("class",this._names.join(" ")))},contains:function(t){return this._names.indexOf(t)>=0}};function L0(t,e){for(var n=Hu(t),r=-1,i=e.length;++r<i;)n.add(e[r])}function C0(t,e){for(var n=Hu(t),r=-1,i=e.length;++r<i;)n.remove(e[r])}function ww(t){return function(){L0(this,t)}}function $w(t){return function(){C0(this,t)}}function Sw(t,e){return function(){(e.apply(this,arguments)?L0:C0)(this,t)}}function Aw(t,e){var n=E0(t+"");if(arguments.length<2){for(var r=Hu(this.node()),i=-1,o=n.length;++i<o;)if(!r.contains(n[i]))return!1;return!0}return this.each((typeof e=="function"?Sw:e?ww:$w)(n,e))}function Mw(){this.textContent=""}function Tw(t){return function(){this.textContent=t}}function Pw(t){return function(){var e=t.apply(this,arguments);this.textContent=e??""}}function Dw(t){return arguments.length?this.each(t==null?Mw:(typeof t=="function"?Pw:Tw)(t)):this.node().textContent}function Ew(){this.innerHTML=""}function kw(t){return function(){this.innerHTML=t}}function Lw(t){return function(){var e=t.apply(this,arguments);this.innerHTML=e??""}}function Cw(t){return arguments.length?this.each(t==null?Ew:(typeof t=="function"?Lw:kw)(t)):this.node().innerHTML}function Rw(){this.nextSibling&&this.parentNode.appendChild(this)}function Iw(){return this.each(Rw)}function Nw(){this.previousSibling&&this.parentNode.insertBefore(this,this.parentNode.firstChild)}function Fw(){return this.each(Nw)}function Gw(t){var e=typeof t=="function"?t:S0(t);return this.select(function(){return this.appendChild(e.apply(this,arguments))})}function zw(){return null}function Ow(t,e){var n=typeof t=="function"?t:S0(t),r=e==null?zw:typeof e=="function"?e:Wu(e);return this.select(function(){return this.insertBefore(n.apply(this,arguments),r.apply(this,arguments)||null)})}function Uw(){var t=this.parentNode;t&&t.removeChild(this)}function Bw(){return this.each(Uw)}function Yw(){var t=this.cloneNode(!1),e=this.parentNode;return e?e.insertBefore(t,this.nextSibling):t}function Ww(){var t=this.cloneNode(!0),e=this.parentNode;return e?e.insertBefore(t,this.nextSibling):t}function Hw(t){return this.select(t?Ww:Yw)}function qw(t){return arguments.length?this.property("__data__",t):this.node().__data__}function Xw(t){return function(e){t.call(this,e,this.__data__)}}function Vw(t){return t.trim().split(/^|\s+/).map(function(e){var n="",r=e.indexOf(".");return r>=0&&(n=e.slice(r+1),e=e.slice(0,r)),{type:e,name:n}})}function jw(t){return function(){var e=this.__on;if(e){for(var n=0,r=-1,i=e.length,o;n<i;++n)o=e[n],(!t.type||o.type===t.type)&&o.name===t.name?this.removeEventListener(o.type,o.listener,o.options):e[++r]=o;++r?e.length=r:delete this.__on}}}function Zw(t,e,n){return function(){var r=this.__on,i,o=Xw(e);if(r){for(var a=0,s=r.length;a<s;++a)if((i=r[a]).type===t.type&&i.name===t.name){this.removeEventListener(i.type,i.listener,i.options),this.addEventListener(i.type,i.listener=o,i.options=n),i.value=e;return}}this.addEventListener(t.type,o,n),i={type:t.type,name:t.name,value:e,listener:o,options:n},r?r.push(i):this.__on=[i]}}function Kw(t,e,n){var r=Vw(t+""),i,o=r.length,a;if(arguments.length<2){var s=this.node().__on;if(s){for(var u=0,c=s.length,l;u<c;++u)for(i=0,l=s[u];i<o;++i)if((a=r[i]).type===l.type&&a.name===l.name)return l.value}return}for(s=e?Zw:jw,i=0;i<o;++i)this.each(s(r[i],e,n));return this}function R0(t,e,n){var r=D0(t),i=r.CustomEvent;typeof i=="function"?i=new i(e,n):(i=r.document.createEvent("Event"),n?(i.initEvent(e,n.bubbles,n.cancelable),i.detail=n.detail):i.initEvent(e,!1,!1)),t.dispatchEvent(i)}function Qw(t,e){return function(){return R0(this,t,e)}}function Jw(t,e){return function(){return R0(this,t,e.apply(this,arguments))}}function t$(t,e){return this.each((typeof e=="function"?Jw:Qw)(t,e))}function*e$(){for(var t=this._groups,e=0,n=t.length;e<n;++e)for(var r=t[e],i=0,o=r.length,a;i<o;++i)(a=r[i])&&(yield a)}var n$=[null];function be(t,e){this._groups=t,this._parents=e}function ui(){return new be([[document.documentElement]],n$)}function r$(){return this}be.prototype=ui.prototype={constructor:be,select:P_,selectAll:L_,selectChild:N_,selectChildren:O_,filter:U_,data:X_,enter:B_,exit:j_,join:Z_,merge:K_,selection:r$,order:Q_,sort:J_,call:ew,nodes:nw,node:rw,size:iw,empty:ow,each:aw,attr:dw,style:yw,property:_w,classed:Aw,text:Dw,html:Cw,raise:Iw,lower:Fw,append:Gw,insert:Ow,remove:Bw,clone:Hw,datum:qw,on:Kw,dispatch:t$,[Symbol.iterator]:e$};function qu(t,e,n){t.prototype=e.prototype=n,n.constructor=t}function I0(t,e){var n=Object.create(t.prototype);for(var r in e)n[r]=e[r];return n}function ci(){}var li=.7,Bo=1/li,dr="\\s*([+-]?\\d+)\\s*",fi="\\s*([+-]?(?:\\d*\\.)?\\d+(?:[eE][+-]?\\d+)?)\\s*",Ee="\\s*([+-]?(?:\\d*\\.)?\\d+(?:[eE][+-]?\\d+)?)%\\s*",i$=/^#([0-9a-f]{3,8})$/,o$=new RegExp(`^rgb\\(${dr},${dr},${dr}\\)$`),a$=new RegExp(`^rgb\\(${Ee},${Ee},${Ee}\\)$`),s$=new RegExp(`^rgba\\(${dr},${dr},${dr},${fi}\\)$`),u$=new RegExp(`^rgba\\(${Ee},${Ee},${Ee},${fi}\\)$`),c$=new RegExp(`^hsl\\(${fi},${Ee},${Ee}\\)$`),l$=new RegExp(`^hsla\\(${fi},${Ee},${Ee},${fi}\\)$`),N0={aliceblue:15792383,antiquewhite:16444375,aqua:65535,aquamarine:8388564,azure:15794175,beige:16119260,bisque:16770244,black:0,blanchedalmond:16772045,blue:255,blueviolet:9055202,brown:10824234,burlywood:14596231,cadetblue:6266528,chartreuse:8388352,chocolate:13789470,coral:16744272,cornflowerblue:6591981,cornsilk:16775388,crimson:14423100,cyan:65535,darkblue:139,darkcyan:35723,darkgoldenrod:12092939,darkgray:11119017,darkgreen:25600,darkgrey:11119017,darkkhaki:12433259,darkmagenta:9109643,darkolivegreen:5597999,darkorange:16747520,darkorchid:10040012,darkred:9109504,darksalmon:15308410,darkseagreen:9419919,darkslateblue:4734347,darkslategray:3100495,darkslategrey:3100495,darkturquoise:52945,darkviolet:9699539,deeppink:16716947,deepskyblue:49151,dimgray:6908265,dimgrey:6908265,dodgerblue:2003199,firebrick:11674146,floralwhite:16775920,forestgreen:2263842,fuchsia:16711935,gainsboro:14474460,ghostwhite:16316671,gold:16766720,goldenrod:14329120,gray:8421504,green:32768,greenyellow:11403055,grey:8421504,honeydew:15794160,hotpink:16738740,indianred:13458524,indigo:4915330,ivory:16777200,khaki:15787660,lavender:15132410,lavenderblush:16773365,lawngreen:8190976,lemonchiffon:16775885,lightblue:11393254,lightcoral:15761536,lightcyan:14745599,lightgoldenrodyellow:16448210,lightgray:13882323,lightgreen:9498256,lightgrey:13882323,lightpink:16758465,lightsalmon:16752762,lightseagreen:2142890,lightskyblue:8900346,lightslategray:7833753,lightslategrey:7833753,lightsteelblue:11584734,lightyellow:16777184,lime:65280,limegreen:3329330,linen:16445670,magenta:16711935,maroon:8388608,mediumaquamarine:6737322,mediumblue:205,mediumorchid:12211667,mediumpurple:9662683,mediumseagreen:3978097,mediumslateblue:8087790,mediumspringgreen:64154,mediumturquoise:4772300,mediumvioletred:13047173,midnightblue:1644912,mintcream:16121850,mistyrose:16770273,moccasin:16770229,navajowhite:16768685,navy:128,oldlace:16643558,olive:8421376,olivedrab:7048739,orange:16753920,orangered:16729344,orchid:14315734,palegoldenrod:15657130,palegreen:10025880,paleturquoise:11529966,palevioletred:14381203,papayawhip:16773077,peachpuff:16767673,peru:13468991,pink:16761035,plum:14524637,powderblue:11591910,purple:8388736,rebeccapurple:6697881,red:16711680,rosybrown:12357519,royalblue:4286945,saddlebrown:9127187,salmon:16416882,sandybrown:16032864,seagreen:3050327,seashell:16774638,sienna:10506797,silver:12632256,skyblue:8900331,slateblue:6970061,slategray:7372944,slategrey:7372944,snow:16775930,springgreen:65407,steelblue:4620980,tan:13808780,teal:32896,thistle:14204888,tomato:16737095,turquoise:4251856,violet:15631086,wheat:16113331,white:16777215,whitesmoke:16119285,yellow:16776960,yellowgreen:10145074};qu(ci,Sn,{copy(t){return Object.assign(new this.constructor,this,t)},displayable(){return this.rgb().displayable()},hex:F0,formatHex:F0,formatHex8:f$,formatHsl:h$,formatRgb:G0,toString:G0});function F0(){return this.rgb().formatHex()}function f$(){return this.rgb().formatHex8()}function h$(){return Y0(this).formatHsl()}function G0(){return this.rgb().formatRgb()}function Sn(t){var e,n;return t=(t+"").trim().toLowerCase(),(e=i$.exec(t))?(n=e[1].length,e=parseInt(e[1],16),n===6?z0(e):n===3?new ee(e>>8&15|e>>4&240,e>>4&15|e&240,(e&15)<<4|e&15,1):n===8?Yo(e>>24&255,e>>16&255,e>>8&255,(e&255)/255):n===4?Yo(e>>12&15|e>>8&240,e>>8&15|e>>4&240,e>>4&15|e&240,((e&15)<<4|e&15)/255):null):(e=o$.exec(t))?new ee(e[1],e[2],e[3],1):(e=a$.exec(t))?new ee(e[1]*255/100,e[2]*255/100,e[3]*255/100,1):(e=s$.exec(t))?Yo(e[1],e[2],e[3],e[4]):(e=u$.exec(t))?Yo(e[1]*255/100,e[2]*255/100,e[3]*255/100,e[4]):(e=c$.exec(t))?B0(e[1],e[2]/100,e[3]/100,1):(e=l$.exec(t))?B0(e[1],e[2]/100,e[3]/100,e[4]):N0.hasOwnProperty(t)?z0(N0[t]):t==="transparent"?new ee(NaN,NaN,NaN,0):null}function z0(t){return new ee(t>>16&255,t>>8&255,t&255,1)}function Yo(t,e,n,r){return r<=0&&(t=e=n=NaN),new ee(t,e,n,r)}function d$(t){return t instanceof ci||(t=Sn(t)),t?(t=t.rgb(),new ee(t.r,t.g,t.b,t.opacity)):new ee}function Xu(t,e,n,r){return arguments.length===1?d$(t):new ee(t,e,n,r??1)}function ee(t,e,n,r){this.r=+t,this.g=+e,this.b=+n,this.opacity=+r}qu(ee,Xu,I0(ci,{brighter(t){return t=t==null?Bo:Math.pow(Bo,t),new ee(this.r*t,this.g*t,this.b*t,this.opacity)},darker(t){return t=t==null?li:Math.pow(li,t),new ee(this.r*t,this.g*t,this.b*t,this.opacity)},rgb(){return this},clamp(){return new ee(An(this.r),An(this.g),An(this.b),Wo(this.opacity))},displayable(){return-.5<=this.r&&this.r<255.5&&-.5<=this.g&&this.g<255.5&&-.5<=this.b&&this.b<255.5&&0<=this.opacity&&this.opacity<=1},hex:O0,formatHex:O0,formatHex8:p$,formatRgb:U0,toString:U0}));function O0(){return`#${Mn(this.r)}${Mn(this.g)}${Mn(this.b)}`}function p$(){return`#${Mn(this.r)}${Mn(this.g)}${Mn(this.b)}${Mn((isNaN(this.opacity)?1:this.opacity)*255)}`}function U0(){const t=Wo(this.opacity);return`${t===1?"rgb(":"rgba("}${An(this.r)}, ${An(this.g)}, ${An(this.b)}${t===1?")":`, ${t})`}`}function Wo(t){return isNaN(t)?1:Math.max(0,Math.min(1,t))}function An(t){return Math.max(0,Math.min(255,Math.round(t)||0))}function Mn(t){return t=An(t),(t<16?"0":"")+t.toString(16)}function B0(t,e,n,r){return r<=0?t=e=n=NaN:n<=0||n>=1?t=e=NaN:e<=0&&(t=NaN),new ve(t,e,n,r)}function Y0(t){if(t instanceof ve)return new ve(t.h,t.s,t.l,t.opacity);if(t instanceof ci||(t=Sn(t)),!t)return new ve;if(t instanceof ve)return t;t=t.rgb();var e=t.r/255,n=t.g/255,r=t.b/255,i=Math.min(e,n,r),o=Math.max(e,n,r),a=NaN,s=o-i,u=(o+i)/2;return s?(e===o?a=(n-r)/s+(n<r)*6:n===o?a=(r-e)/s+2:a=(e-n)/s+4,s/=u<.5?o+i:2-o-i,a*=60):s=u>0&&u<1?0:a,new ve(a,s,u,t.opacity)}function g$(t,e,n,r){return arguments.length===1?Y0(t):new ve(t,e,n,r??1)}function ve(t,e,n,r){this.h=+t,this.s=+e,this.l=+n,this.opacity=+r}qu(ve,g$,I0(ci,{brighter(t){return t=t==null?Bo:Math.pow(Bo,t),new ve(this.h,this.s,this.l*t,this.opacity)},darker(t){return t=t==null?li:Math.pow(li,t),new ve(this.h,this.s,this.l*t,this.opacity)},rgb(){var t=this.h%360+(this.h<0)*360,e=isNaN(t)||isNaN(this.s)?0:this.s,n=this.l,r=n+(n<.5?n:1-n)*e,i=2*n-r;return new ee(Vu(t>=240?t-240:t+120,i,r),Vu(t,i,r),Vu(t<120?t+240:t-120,i,r),this.opacity)},clamp(){return new ve(W0(this.h),Ho(this.s),Ho(this.l),Wo(this.opacity))},displayable(){return(0<=this.s&&this.s<=1||isNaN(this.s))&&0<=this.l&&this.l<=1&&0<=this.opacity&&this.opacity<=1},formatHsl(){const t=Wo(this.opacity);return`${t===1?"hsl(":"hsla("}${W0(this.h)}, ${Ho(this.s)*100}%, ${Ho(this.l)*100}%${t===1?")":`, ${t})`}`}}));function W0(t){return t=(t||0)%360,t<0?t+360:t}function Ho(t){return Math.max(0,Math.min(1,t||0))}function Vu(t,e,n){return(t<60?e+(n-e)*t/60:t<180?n:t<240?e+(n-e)*(240-t)/60:e)*255}const ju=t=>()=>t;function m$(t,e){return function(n){return t+n*e}}function y$(t,e,n){return t=Math.pow(t,n),e=Math.pow(e,n)-t,n=1/n,function(r){return Math.pow(t+r*e,n)}}function b$(t){return(t=+t)==1?H0:function(e,n){return n-e?y$(e,n,t):ju(isNaN(e)?n:e)}}function H0(t,e){var n=e-t;return n?m$(t,n):ju(isNaN(t)?e:t)}const qo=function t(e){var n=b$(e);function r(i,o){var a=n((i=Xu(i)).r,(o=Xu(o)).r),s=n(i.g,o.g),u=n(i.b,o.b),c=H0(i.opacity,o.opacity);return function(l){return i.r=a(l),i.g=s(l),i.b=u(l),i.opacity=c(l),i+""}}return r.gamma=t,r}(1);function v$(t,e){e||(e=[]);var n=t?Math.min(e.length,t.length):0,r=e.slice(),i;return function(o){for(i=0;i<n;++i)r[i]=t[i]*(1-o)+e[i]*o;return r}}function x$(t){return ArrayBuffer.isView(t)&&!(t instanceof DataView)}function _$(t,e){var n=e?e.length:0,r=t?Math.min(n,t.length):0,i=new Array(r),o=new Array(n),a;for(a=0;a<r;++a)i[a]=Qu(t[a],e[a]);for(;a<n;++a)o[a]=e[a];return function(s){for(a=0;a<r;++a)o[a]=i[a](s);return o}}function w$(t,e){var n=new Date;return t=+t,e=+e,function(r){return n.setTime(t*(1-r)+e*r),n}}function xe(t,e){return t=+t,e=+e,function(n){return t*(1-n)+e*n}}function $$(t,e){var n={},r={},i;(t===null||typeof t!="object")&&(t={}),(e===null||typeof e!="object")&&(e={});for(i in e)i in t?n[i]=Qu(t[i],e[i]):r[i]=e[i];return function(o){for(i in n)r[i]=n[i](o);return r}}var Zu=/[-+]?(?:\d+\.?\d*|\.?\d+)(?:[eE][-+]?\d+)?/g,Ku=new RegExp(Zu.source,"g");function S$(t){return function(){return t}}function A$(t){return function(e){return t(e)+""}}function q0(t,e){var n=Zu.lastIndex=Ku.lastIndex=0,r,i,o,a=-1,s=[],u=[];for(t=t+"",e=e+"";(r=Zu.exec(t))&&(i=Ku.exec(e));)(o=i.index)>n&&(o=e.slice(n,o),s[a]?s[a]+=o:s[++a]=o),(r=r[0])===(i=i[0])?s[a]?s[a]+=i:s[++a]=i:(s[++a]=null,u.push({i:a,x:xe(r,i)})),n=Ku.lastIndex;return n<e.length&&(o=e.slice(n),s[a]?s[a]+=o:s[++a]=o),s.length<2?u[0]?A$(u[0].x):S$(e):(e=u.length,function(c){for(var l=0,h;l<e;++l)s[(h=u[l]).i]=h.x(c);return s.join("")})}function Qu(t,e){var n=typeof e,r;return e==null||n==="boolean"?ju(e):(n==="number"?xe:n==="string"?(r=Sn(e))?(e=r,qo):q0:e instanceof Sn?qo:e instanceof Date?w$:x$(e)?v$:Array.isArray(e)?_$:typeof e.valueOf!="function"&&typeof e.toString!="function"||isNaN(e)?$$:xe)(t,e)}function M$(t,e){return t=+t,e=+e,function(n){return Math.round(t*(1-n)+e*n)}}var X0=180/Math.PI,V0={translateX:0,translateY:0,rotate:0,skewX:0,scaleX:1,scaleY:1};function j0(t,e,n,r,i,o){var a,s,u;return(a=Math.sqrt(t*t+e*e))&&(t/=a,e/=a),(u=t*n+e*r)&&(n-=t*u,r-=e*u),(s=Math.sqrt(n*n+r*r))&&(n/=s,r/=s,u/=s),t*r<e*n&&(t=-t,e=-e,u=-u,a=-a),{translateX:i,translateY:o,rotate:Math.atan2(e,t)*X0,skewX:Math.atan(u)*X0,scaleX:a,scaleY:s}}var Xo;function T$(t){const e=new(typeof DOMMatrix=="function"?DOMMatrix:WebKitCSSMatrix)(t+"");return e.isIdentity?V0:j0(e.a,e.b,e.c,e.d,e.e,e.f)}function P$(t){return t==null||(Xo||(Xo=document.createElementNS("http://www.w3.org/2000/svg","g")),Xo.setAttribute("transform",t),!(t=Xo.transform.baseVal.consolidate()))?V0:(t=t.matrix,j0(t.a,t.b,t.c,t.d,t.e,t.f))}function Z0(t,e,n,r){function i(c){return c.length?c.pop()+" ":""}function o(c,l,h,f,d,p){if(c!==h||l!==f){var g=d.push("translate(",null,e,null,n);p.push({i:g-4,x:xe(c,h)},{i:g-2,x:xe(l,f)})}else(h||f)&&d.push("translate("+h+e+f+n)}function a(c,l,h,f){c!==l?(c-l>180?l+=360:l-c>180&&(c+=360),f.push({i:h.push(i(h)+"rotate(",null,r)-2,x:xe(c,l)})):l&&h.push(i(h)+"rotate("+l+r)}function s(c,l,h,f){c!==l?f.push({i:h.push(i(h)+"skewX(",null,r)-2,x:xe(c,l)}):l&&h.push(i(h)+"skewX("+l+r)}function u(c,l,h,f,d,p){if(c!==h||l!==f){var g=d.push(i(d)+"scale(",null,",",null,")");p.push({i:g-4,x:xe(c,h)},{i:g-2,x:xe(l,f)})}else(h!==1||f!==1)&&d.push(i(d)+"scale("+h+","+f+")")}return function(c,l){var h=[],f=[];return c=t(c),l=t(l),o(c.translateX,c.translateY,l.translateX,l.translateY,h,f),a(c.rotate,l.rotate,h,f),s(c.skewX,l.skewX,h,f),u(c.scaleX,c.scaleY,l.scaleX,l.scaleY,h,f),c=l=null,function(d){for(var p=-1,g=f.length,m;++p<g;)h[(m=f[p]).i]=m.x(d);return h.join("")}}}var D$=Z0(T$,"px, ","px)","deg)"),E$=Z0(P$,", ",")",")"),pr=0,hi=0,di=0,K0=1e3,Vo,pi,jo=0,Tn=0,Zo=0,gi=typeof performance=="object"&&performance.now?performance:Date,Q0=typeof window=="object"&&window.requestAnimationFrame?window.requestAnimationFrame.bind(window):function(t){setTimeout(t,17)};function Ju(){return Tn||(Q0(k$),Tn=gi.now()+Zo)}function k$(){Tn=0}function Ko(){this._call=this._time=this._next=null}Ko.prototype=J0.prototype={constructor:Ko,restart:function(t,e,n){if(typeof t!="function")throw new TypeError("callback is not a function");n=(n==null?Ju():+n)+(e==null?0:+e),!this._next&&pi!==this&&(pi?pi._next=this:Vo=this,pi=this),this._call=t,this._time=n,tc()},stop:function(){this._call&&(this._call=null,this._time=1/0,tc())}};function J0(t,e,n){var r=new Ko;return r.restart(t,e,n),r}function L$(){Ju(),++pr;for(var t=Vo,e;t;)(e=Tn-t._time)>=0&&t._call.call(void 0,e),t=t._next;--pr}function td(){Tn=(jo=gi.now())+Zo,pr=hi=0;try{L$()}finally{pr=0,R$(),Tn=0}}function C$(){var t=gi.now(),e=t-jo;e>K0&&(Zo-=e,jo=t)}function R$(){for(var t,e=Vo,n,r=1/0;e;)e._call?(r>e._time&&(r=e._time),t=e,e=e._next):(n=e._next,e._next=null,e=t?t._next=n:Vo=n);pi=t,tc(r)}function tc(t){if(!pr){hi&&(hi=clearTimeout(hi));var e=t-Tn;e>24?(t<1/0&&(hi=setTimeout(td,t-gi.now()-Zo)),di&&(di=clearInterval(di))):(di||(jo=gi.now(),di=setInterval(C$,K0)),pr=1,Q0(td))}}function ed(t,e,n){var r=new Ko;return e=e==null?0:+e,r.restart(i=>{r.stop(),t(i+e)},e,n),r}var I$=_0("start","end","cancel","interrupt"),N$=[],nd=0,rd=1,ec=2,Qo=3,id=4,nc=5,Jo=6;function ta(t,e,n,r,i,o){var a=t.__transition;if(!a)t.__transition={};else if(n in a)return;F$(t,n,{name:e,index:r,group:i,on:I$,tween:N$,time:o.time,delay:o.delay,duration:o.duration,ease:o.ease,timer:null,state:nd})}function rc(t,e){var n=_e(t,e);if(n.state>nd)throw new Error("too late; already scheduled");return n}function ke(t,e){var n=_e(t,e);if(n.state>Qo)throw new Error("too late; already running");return n}function _e(t,e){var n=t.__transition;if(!n||!(n=n[e]))throw new Error("transition not found");return n}function F$(t,e,n){var r=t.__transition,i;r[e]=n,n.timer=J0(o,0,n.time);function o(c){n.state=rd,n.timer.restart(a,n.delay,n.time),n.delay<=c&&a(c-n.delay)}function a(c){var l,h,f,d;if(n.state!==rd)return u();for(l in r)if(d=r[l],d.name===n.name){if(d.state===Qo)return ed(a);d.state===id?(d.state=Jo,d.timer.stop(),d.on.call("interrupt",t,t.__data__,d.index,d.group),delete r[l]):+l<e&&(d.state=Jo,d.timer.stop(),d.on.call("cancel",t,t.__data__,d.index,d.group),delete r[l])}if(ed(function(){n.state===Qo&&(n.state=id,n.timer.restart(s,n.delay,n.time),s(c))}),n.state=ec,n.on.call("start",t,t.__data__,n.index,n.group),n.state===ec){for(n.state=Qo,i=new Array(f=n.tween.length),l=0,h=-1;l<f;++l)(d=n.tween[l].value.call(t,t.__data__,n.index,n.group))&&(i[++h]=d);i.length=h+1}}function s(c){for(var l=c<n.duration?n.ease.call(null,c/n.duration):(n.timer.restart(u),n.state=nc,1),h=-1,f=i.length;++h<f;)i[h].call(t,l);n.state===nc&&(n.on.call("end",t,t.__data__,n.index,n.group),u())}function u(){n.state=Jo,n.timer.stop(),delete r[e];for(var c in r)return;delete t.__transition}}function G$(t,e){var n=t.__transition,r,i,o=!0,a;if(n){e=e==null?null:e+"";for(a in n){if((r=n[a]).name!==e){o=!1;continue}i=r.state>ec&&r.state<nc,r.state=Jo,r.timer.stop(),r.on.call(i?"interrupt":"cancel",t,t.__data__,r.index,r.group),delete n[a]}o&&delete t.__transition}}function z$(t){return this.each(function(){G$(this,t)})}function O$(t,e){var n,r;return function(){var i=ke(this,t),o=i.tween;if(o!==n){r=n=o;for(var a=0,s=r.length;a<s;++a)if(r[a].name===e){r=r.slice(),r.splice(a,1);break}}i.tween=r}}function U$(t,e,n){var r,i;if(typeof n!="function")throw new Error;return function(){var o=ke(this,t),a=o.tween;if(a!==r){i=(r=a).slice();for(var s={name:e,value:n},u=0,c=i.length;u<c;++u)if(i[u].name===e){i[u]=s;break}u===c&&i.push(s)}o.tween=i}}function B$(t,e){var n=this._id;if(t+="",arguments.length<2){for(var r=_e(this.node(),n).tween,i=0,o=r.length,a;i<o;++i)if((a=r[i]).name===t)return a.value;return null}return this.each((e==null?O$:U$)(n,t,e))}function ic(t,e,n){var r=t._id;return t.each(function(){var i=ke(this,r);(i.value||(i.value={}))[e]=n.apply(this,arguments)}),function(i){return _e(i,r).value[e]}}function od(t,e){var n;return(typeof e=="number"?xe:e instanceof Sn?qo:(n=Sn(e))?(e=n,qo):q0)(t,e)}function Y$(t){return function(){this.removeAttribute(t)}}function W$(t){return function(){this.removeAttributeNS(t.space,t.local)}}function H$(t,e,n){var r,i=n+"",o;return function(){var a=this.getAttribute(t);return a===i?null:a===r?o:o=e(r=a,n)}}function q$(t,e,n){var r,i=n+"",o;return function(){var a=this.getAttributeNS(t.space,t.local);return a===i?null:a===r?o:o=e(r=a,n)}}function X$(t,e,n){var r,i,o;return function(){var a,s=n(this),u;return s==null?void this.removeAttribute(t):(a=this.getAttribute(t),u=s+"",a===u?null:a===r&&u===i?o:(i=u,o=e(r=a,s)))}}function V$(t,e,n){var r,i,o;return function(){var a,s=n(this),u;return s==null?void this.removeAttributeNS(t.space,t.local):(a=this.getAttributeNS(t.space,t.local),u=s+"",a===u?null:a===r&&u===i?o:(i=u,o=e(r=a,s)))}}function j$(t,e){var n=Oo(t),r=n==="transform"?E$:od;return this.attrTween(t,typeof e=="function"?(n.local?V$:X$)(n,r,ic(this,"attr."+t,e)):e==null?(n.local?W$:Y$)(n):(n.local?q$:H$)(n,r,e))}function Z$(t,e){return function(n){this.setAttribute(t,e.call(this,n))}}function K$(t,e){return function(n){this.setAttributeNS(t.space,t.local,e.call(this,n))}}function Q$(t,e){var n,r;function i(){var o=e.apply(this,arguments);return o!==r&&(n=(r=o)&&K$(t,o)),n}return i._value=e,i}function J$(t,e){var n,r;function i(){var o=e.apply(this,arguments);return o!==r&&(n=(r=o)&&Z$(t,o)),n}return i._value=e,i}function t3(t,e){var n="attr."+t;if(arguments.length<2)return(n=this.tween(n))&&n._value;if(e==null)return this.tween(n,null);if(typeof e!="function")throw new Error;var r=Oo(t);return this.tween(n,(r.local?Q$:J$)(r,e))}function e3(t,e){return function(){rc(this,t).delay=+e.apply(this,arguments)}}function n3(t,e){return e=+e,function(){rc(this,t).delay=e}}function r3(t){var e=this._id;return arguments.length?this.each((typeof t=="function"?e3:n3)(e,t)):_e(this.node(),e).delay}function i3(t,e){return function(){ke(this,t).duration=+e.apply(this,arguments)}}function o3(t,e){return e=+e,function(){ke(this,t).duration=e}}function a3(t){var e=this._id;return arguments.length?this.each((typeof t=="function"?i3:o3)(e,t)):_e(this.node(),e).duration}function s3(t,e){if(typeof e!="function")throw new Error;return function(){ke(this,t).ease=e}}function u3(t){var e=this._id;return arguments.length?this.each(s3(e,t)):_e(this.node(),e).ease}function c3(t,e){return function(){var n=e.apply(this,arguments);if(typeof n!="function")throw new Error;ke(this,t).ease=n}}function l3(t){if(typeof t!="function")throw new Error;return this.each(c3(this._id,t))}function f3(t){typeof t!="function"&&(t=M0(t));for(var e=this._groups,n=e.length,r=new Array(n),i=0;i<n;++i)for(var o=e[i],a=o.length,s=r[i]=[],u,c=0;c<a;++c)(u=o[c])&&t.call(u,u.__data__,c,o)&&s.push(u);return new Ye(r,this._parents,this._name,this._id)}function h3(t){if(t._id!==this._id)throw new Error;for(var e=this._groups,n=t._groups,r=e.length,i=n.length,o=Math.min(r,i),a=new Array(r),s=0;s<o;++s)for(var u=e[s],c=n[s],l=u.length,h=a[s]=new Array(l),f,d=0;d<l;++d)(f=u[d]||c[d])&&(h[d]=f);for(;s<r;++s)a[s]=e[s];return new Ye(a,this._parents,this._name,this._id)}function d3(t){return(t+"").trim().split(/^|\s+/).every(function(e){var n=e.indexOf(".");return n>=0&&(e=e.slice(0,n)),!e||e==="start"})}function p3(t,e,n){var r,i,o=d3(e)?rc:ke;return function(){var a=o(this,t),s=a.on;s!==r&&(i=(r=s).copy()).on(e,n),a.on=i}}function g3(t,e){var n=this._id;return arguments.length<2?_e(this.node(),n).on.on(t):this.each(p3(n,t,e))}function m3(t){return function(){var e=this.parentNode;for(var n in this.__transition)if(+n!==t)return;e&&e.removeChild(this)}}function y3(){return this.on("end.remove",m3(this._id))}function b3(t){var e=this._name,n=this._id;typeof t!="function"&&(t=Wu(t));for(var r=this._groups,i=r.length,o=new Array(i),a=0;a<i;++a)for(var s=r[a],u=s.length,c=o[a]=new Array(u),l,h,f=0;f<u;++f)(l=s[f])&&(h=t.call(l,l.__data__,f,s))&&("__data__"in l&&(h.__data__=l.__data__),c[f]=h,ta(c[f],e,n,f,c,_e(l,n)));return new Ye(o,this._parents,e,n)}function v3(t){var e=this._name,n=this._id;typeof t!="function"&&(t=A0(t));for(var r=this._groups,i=r.length,o=[],a=[],s=0;s<i;++s)for(var u=r[s],c=u.length,l,h=0;h<c;++h)if(l=u[h]){for(var f=t.call(l,l.__data__,h,u),d,p=_e(l,n),g=0,m=f.length;g<m;++g)(d=f[g])&&ta(d,e,n,g,f,p);o.push(f),a.push(l)}return new Ye(o,a,e,n)}var x3=ui.prototype.constructor;function _3(){return new x3(this._groups,this._parents)}function w3(t,e){var n,r,i;return function(){var o=hr(this,t),a=(this.style.removeProperty(t),hr(this,t));return o===a?null:o===n&&a===r?i:i=e(n=o,r=a)}}function ad(t){return function(){this.style.removeProperty(t)}}function $3(t,e,n){var r,i=n+"",o;return function(){var a=hr(this,t);return a===i?null:a===r?o:o=e(r=a,n)}}function S3(t,e,n){var r,i,o;return function(){var a=hr(this,t),s=n(this),u=s+"";return s==null&&(u=s=(this.style.removeProperty(t),hr(this,t))),a===u?null:a===r&&u===i?o:(i=u,o=e(r=a,s))}}function A3(t,e){var n,r,i,o="style."+e,a="end."+o,s;return function(){var u=ke(this,t),c=u.on,l=u.value[o]==null?s||(s=ad(e)):void 0;(c!==n||i!==l)&&(r=(n=c).copy()).on(a,i=l),u.on=r}}function M3(t,e,n){var r=(t+="")=="transform"?D$:od;return e==null?this.styleTween(t,w3(t,r)).on("end.style."+t,ad(t)):typeof e=="function"?this.styleTween(t,S3(t,r,ic(this,"style."+t,e))).each(A3(this._id,t)):this.styleTween(t,$3(t,r,e),n).on("end.style."+t,null)}function T3(t,e,n){return function(r){this.style.setProperty(t,e.call(this,r),n)}}function P3(t,e,n){var r,i;function o(){var a=e.apply(this,arguments);return a!==i&&(r=(i=a)&&T3(t,a,n)),r}return o._value=e,o}function D3(t,e,n){var r="style."+(t+="");if(arguments.length<2)return(r=this.tween(r))&&r._value;if(e==null)return this.tween(r,null);if(typeof e!="function")throw new Error;return this.tween(r,P3(t,e,n??""))}function E3(t){return function(){this.textContent=t}}function k3(t){return function(){var e=t(this);this.textContent=e??""}}function L3(t){return this.tween("text",typeof t=="function"?k3(ic(this,"text",t)):E3(t==null?"":t+""))}function C3(t){return function(e){this.textContent=t.call(this,e)}}function R3(t){var e,n;function r(){var i=t.apply(this,arguments);return i!==n&&(e=(n=i)&&C3(i)),e}return r._value=t,r}function I3(t){var e="text";if(arguments.length<1)return(e=this.tween(e))&&e._value;if(t==null)return this.tween(e,null);if(typeof t!="function")throw new Error;return this.tween(e,R3(t))}function N3(){for(var t=this._name,e=this._id,n=sd(),r=this._groups,i=r.length,o=0;o<i;++o)for(var a=r[o],s=a.length,u,c=0;c<s;++c)if(u=a[c]){var l=_e(u,e);ta(u,t,n,c,a,{time:l.time+l.delay+l.duration,delay:0,duration:l.duration,ease:l.ease})}return new Ye(r,this._parents,t,n)}function F3(){var t,e,n=this,r=n._id,i=n.size();return new Promise(function(o,a){var s={value:a},u={value:function(){--i===0&&o()}};n.each(function(){var c=ke(this,r),l=c.on;l!==t&&(e=(t=l).copy(),e._.cancel.push(s),e._.interrupt.push(s),e._.end.push(u)),c.on=e}),i===0&&o()})}var G3=0;function Ye(t,e,n,r){this._groups=t,this._parents=e,this._name=n,this._id=r}function sd(){return++G3}var We=ui.prototype;Ye.prototype={constructor:Ye,select:b3,selectAll:v3,selectChild:We.selectChild,selectChildren:We.selectChildren,filter:f3,merge:h3,selection:_3,transition:N3,call:We.call,nodes:We.nodes,node:We.node,size:We.size,empty:We.empty,each:We.each,on:g3,attr:j$,attrTween:t3,style:M3,styleTween:D3,text:L3,textTween:I3,remove:y3,tween:B$,delay:r3,duration:a3,ease:u3,easeVarying:l3,end:F3,[Symbol.iterator]:We[Symbol.iterator]};function z3(t){return((t*=2)<=1?t*t*t:(t-=2)*t*t+2)/2}var O3={time:null,delay:0,duration:250,ease:z3};function U3(t,e){for(var n;!(n=t.__transition)||!(n=n[e]);)if(!(t=t.parentNode))throw new Error(`transition ${e} not found`);return n}function B3(t){var e,n;t instanceof Ye?(e=t._id,t=t._name):(e=sd(),(n=O3).time=Ju(),t=t==null?null:t+"");for(var r=this._groups,i=r.length,o=0;o<i;++o)for(var a=r[o],s=a.length,u,c=0;c<s;++c)(u=a[c])&&ta(u,t,e,c,a,n||U3(u,e));return new Ye(r,this._parents,t,e)}ui.prototype.interrupt=z$,ui.prototype.transition=B3;function Y3(t){return Math.abs(t=Math.round(t))>=1e21?t.toLocaleString("en").replace(/,/g,""):t.toString(10)}function ea(t,e){if((n=(t=e?t.toExponential(e-1):t.toExponential()).indexOf("e"))<0)return null;var n,r=t.slice(0,n);return[r.length>1?r[0]+r.slice(2):r,+t.slice(n+1)]}function gr(t){return t=ea(Math.abs(t)),t?t[1]:NaN}function W3(t,e){return function(n,r){for(var i=n.length,o=[],a=0,s=t[0],u=0;i>0&&s>0&&(u+s+1>r&&(s=Math.max(1,r-u)),o.push(n.substring(i-=s,i+s)),!((u+=s+1)>r));)s=t[a=(a+1)%t.length];return o.reverse().join(e)}}function H3(t){return function(e){return e.replace(/[0-9]/g,function(n){return t[+n]})}}var q3=/^(?:(.)?([<>=^]))?([+\-( ])?([$#])?(0)?(\d+)?(,)?(\.\d+)?(~)?([a-z%])?$/i;function na(t){if(!(e=q3.exec(t)))throw new Error("invalid format: "+t);var e;return new oc({fill:e[1],align:e[2],sign:e[3],symbol:e[4],zero:e[5],width:e[6],comma:e[7],precision:e[8]&&e[8].slice(1),trim:e[9],type:e[10]})}na.prototype=oc.prototype;function oc(t){this.fill=t.fill===void 0?" ":t.fill+"",this.align=t.align===void 0?">":t.align+"",this.sign=t.sign===void 0?"-":t.sign+"",this.symbol=t.symbol===void 0?"":t.symbol+"",this.zero=!!t.zero,this.width=t.width===void 0?void 0:+t.width,this.comma=!!t.comma,this.precision=t.precision===void 0?void 0:+t.precision,this.trim=!!t.trim,this.type=t.type===void 0?"":t.type+""}oc.prototype.toString=function(){return this.fill+this.align+this.sign+this.symbol+(this.zero?"0":"")+(this.width===void 0?"":Math.max(1,this.width|0))+(this.comma?",":"")+(this.precision===void 0?"":"."+Math.max(0,this.precision|0))+(this.trim?"~":"")+this.type};function X3(t){t:for(var e=t.length,n=1,r=-1,i;n<e;++n)switch(t[n]){case".":r=i=n;break;case"0":r===0&&(r=n),i=n;break;default:if(!+t[n])break t;r>0&&(r=0);break}return r>0?t.slice(0,r)+t.slice(i+1):t}var ud;function V3(t,e){var n=ea(t,e);if(!n)return t+"";var r=n[0],i=n[1],o=i-(ud=Math.max(-8,Math.min(8,Math.floor(i/3)))*3)+1,a=r.length;return o===a?r:o>a?r+new Array(o-a+1).join("0"):o>0?r.slice(0,o)+"."+r.slice(o):"0."+new Array(1-o).join("0")+ea(t,Math.max(0,e+o-1))[0]}function cd(t,e){var n=ea(t,e);if(!n)return t+"";var r=n[0],i=n[1];return i<0?"0."+new Array(-i).join("0")+r:r.length>i+1?r.slice(0,i+1)+"."+r.slice(i+1):r+new Array(i-r.length+2).join("0")}const ld={"%":(t,e)=>(t*100).toFixed(e),b:t=>Math.round(t).toString(2),c:t=>t+"",d:Y3,e:(t,e)=>t.toExponential(e),f:(t,e)=>t.toFixed(e),g:(t,e)=>t.toPrecision(e),o:t=>Math.round(t).toString(8),p:(t,e)=>cd(t*100,e),r:cd,s:V3,X:t=>Math.round(t).toString(16).toUpperCase(),x:t=>Math.round(t).toString(16)};function fd(t){return t}var hd=Array.prototype.map,dd=["y","z","a","f","p","n","µ","m","","k","M","G","T","P","E","Z","Y"];function j3(t){var e=t.grouping===void 0||t.thousands===void 0?fd:W3(hd.call(t.grouping,Number),t.thousands+""),n=t.currency===void 0?"":t.currency[0]+"",r=t.currency===void 0?"":t.currency[1]+"",i=t.decimal===void 0?".":t.decimal+"",o=t.numerals===void 0?fd:H3(hd.call(t.numerals,String)),a=t.percent===void 0?"%":t.percent+"",s=t.minus===void 0?"−":t.minus+"",u=t.nan===void 0?"NaN":t.nan+"";function c(h){h=na(h);var f=h.fill,d=h.align,p=h.sign,g=h.symbol,m=h.zero,y=h.width,_=h.comma,x=h.precision,b=h.trim,$=h.type;$==="n"?(_=!0,$="g"):ld[$]||(x===void 0&&(x=12),b=!0,$="g"),(m||f==="0"&&d==="=")&&(m=!0,f="0",d="=");var v=g==="$"?n:g==="#"&&/[boxX]/.test($)?"0"+$.toLowerCase():"",w=g==="$"?r:/[%p]/.test($)?a:"",S=ld[$],D=/[defgprs%]/.test($);x=x===void 0?6:/[gprs]/.test($)?Math.max(1,Math.min(21,x)):Math.max(0,Math.min(20,x));function E(T){var F=v,M=w,A,L,P;if($==="c")M=S(T)+M,T="";else{T=+T;var I=T<0||1/T<0;if(T=isNaN(T)?u:S(Math.abs(T),x),b&&(T=X3(T)),I&&+T==0&&p!=="+"&&(I=!1),F=(I?p==="("?p:s:p==="-"||p==="("?"":p)+F,M=($==="s"?dd[8+ud/3]:"")+M+(I&&p==="("?")":""),D){for(A=-1,L=T.length;++A<L;)if(P=T.charCodeAt(A),48>P||P>57){M=(P===46?i+T.slice(A+1):T.slice(A))+M,T=T.slice(0,A);break}}}_&&!m&&(T=e(T,1/0));var z=F.length+T.length+M.length,k=z<y?new Array(y-z+1).join(f):"";switch(_&&m&&(T=e(k+T,k.length?y-M.length:1/0),k=""),d){case"<":T=F+T+M+k;break;case"=":T=F+k+T+M;break;case"^":T=k.slice(0,z=k.length>>1)+F+T+M+k.slice(z);break;default:T=k+F+T+M;break}return o(T)}return E.toString=function(){return h+""},E}function l(h,f){var d=c((h=na(h),h.type="f",h)),p=Math.max(-8,Math.min(8,Math.floor(gr(f)/3)))*3,g=Math.pow(10,-p),m=dd[8+p/3];return function(y){return d(g*y)+m}}return{format:c,formatPrefix:l}}var ra,pd,gd;Z3({thousands:",",grouping:[3],currency:["$",""]});function Z3(t){return ra=j3(t),pd=ra.format,gd=ra.formatPrefix,ra}function K3(t){return Math.max(0,-gr(Math.abs(t)))}function Q3(t,e){return Math.max(0,Math.max(-8,Math.min(8,Math.floor(gr(e)/3)))*3-gr(Math.abs(t)))}function J3(t,e){return t=Math.abs(t),e=Math.abs(e)-t,Math.max(0,gr(e)-gr(t))+1}function ia(t,e){switch(arguments.length){case 0:break;case 1:this.range(t);break;default:this.range(e).domain(t);break}return this}const md=Symbol("implicit");function yd(){var t=new v0,e=[],n=[],r=md;function i(o){let a=t.get(o);if(a===void 0){if(r!==md)return r;t.set(o,a=e.push(o)-1)}return n[a%n.length]}return i.domain=function(o){if(!arguments.length)return e.slice();e=[],t=new v0;for(const a of o)t.has(a)||t.set(a,e.push(a)-1);return i},i.range=function(o){return arguments.length?(n=Array.from(o),i):n.slice()},i.unknown=function(o){return arguments.length?(r=o,i):r},i.copy=function(){return yd(e,n).unknown(r)},ia.apply(i,arguments),i}function bd(){var t=yd().unknown(void 0),e=t.domain,n=t.range,r=0,i=1,o,a,s=!1,u=0,c=0,l=.5;delete t.unknown;function h(){var f=e().length,d=i<r,p=d?i:r,g=d?r:i;o=(g-p)/Math.max(1,f-u+c*2),s&&(o=Math.floor(o)),p+=(g-p-o*(f-u))*l,a=o*(1-u),s&&(p=Math.round(p),a=Math.round(a));var m=__(f).map(function(y){return p+o*y});return n(d?m.reverse():m)}return t.domain=function(f){return arguments.length?(e(f),h()):e()},t.range=function(f){return arguments.length?([r,i]=f,r=+r,i=+i,h()):[r,i]},t.rangeRound=function(f){return[r,i]=f,r=+r,i=+i,s=!0,h()},t.bandwidth=function(){return a},t.step=function(){return o},t.round=function(f){return arguments.length?(s=!!f,h()):s},t.padding=function(f){return arguments.length?(u=Math.min(1,c=+f),h()):u},t.paddingInner=function(f){return arguments.length?(u=Math.min(1,f),h()):u},t.paddingOuter=function(f){return arguments.length?(c=+f,h()):c},t.align=function(f){return arguments.length?(l=Math.max(0,Math.min(1,f)),h()):l},t.copy=function(){return bd(e(),[r,i]).round(s).paddingInner(u).paddingOuter(c).align(l)},ia.apply(h(),arguments)}function vd(t){var e=t.copy;return t.padding=t.paddingOuter,delete t.paddingInner,delete t.paddingOuter,t.copy=function(){return vd(e())},t}function tS(){return vd(bd.apply(null,arguments).paddingInner(1))}function eS(t){return function(){return t}}function nS(t){return+t}var xd=[0,1];function mr(t){return t}function ac(t,e){return(e-=t=+t)?function(n){return(n-t)/e}:eS(isNaN(e)?NaN:.5)}function rS(t,e){var n;return t>e&&(n=t,t=e,e=n),function(r){return Math.max(t,Math.min(e,r))}}function iS(t,e,n){var r=t[0],i=t[1],o=e[0],a=e[1];return i<r?(r=ac(i,r),o=n(a,o)):(r=ac(r,i),o=n(o,a)),function(s){return o(r(s))}}function oS(t,e,n){var r=Math.min(t.length,e.length)-1,i=new Array(r),o=new Array(r),a=-1;for(t[r]<t[0]&&(t=t.slice().reverse(),e=e.slice().reverse());++a<r;)i[a]=ac(t[a],t[a+1]),o[a]=n(e[a],e[a+1]);return function(s){var u=b0(t,s,1,r)-1;return o[u](i[u](s))}}function aS(t,e){return e.domain(t.domain()).range(t.range()).interpolate(t.interpolate()).clamp(t.clamp()).unknown(t.unknown())}function sS(){var t=xd,e=xd,n=Qu,r,i,o,a=mr,s,u,c;function l(){var f=Math.min(t.length,e.length);return a!==mr&&(a=rS(t[0],t[f-1])),s=f>2?oS:iS,u=c=null,h}function h(f){return f==null||isNaN(f=+f)?o:(u||(u=s(t.map(r),e,n)))(r(a(f)))}return h.invert=function(f){return a(i((c||(c=s(e,t.map(r),xe)))(f)))},h.domain=function(f){return arguments.length?(t=Array.from(f,nS),l()):t.slice()},h.range=function(f){return arguments.length?(e=Array.from(f),l()):e.slice()},h.rangeRound=function(f){return e=Array.from(f),n=M$,l()},h.clamp=function(f){return arguments.length?(a=f?!0:mr,l()):a!==mr},h.interpolate=function(f){return arguments.length?(n=f,l()):n},h.unknown=function(f){return arguments.length?(o=f,h):o},function(f,d){return r=f,i=d,l()}}function uS(){return sS()(mr,mr)}function cS(t,e,n,r){var i=x_(t,e,n),o;switch(r=na(r??",f"),r.type){case"s":{var a=Math.max(Math.abs(t),Math.abs(e));return r.precision==null&&!isNaN(o=Q3(i,a))&&(r.precision=o),gd(r,a)}case"":case"e":case"g":case"p":case"r":{r.precision==null&&!isNaN(o=J3(i,Math.max(Math.abs(t),Math.abs(e))))&&(r.precision=o-(r.type==="e"));break}case"f":case"%":{r.precision==null&&!isNaN(o=K3(i))&&(r.precision=o-(r.type==="%")*2);break}}return pd(r)}function _d(t){var e=t.domain;return t.ticks=function(n){var r=e();return v_(r[0],r[r.length-1],n??10)},t.tickFormat=function(n,r){var i=e();return cS(i[0],i[i.length-1],n??10,r)},t.nice=function(n){n==null&&(n=10);var r=e(),i=0,o=r.length-1,a=r[i],s=r[o],u,c,l=10;for(s<a&&(c=a,a=s,s=c,c=i,i=o,o=c);l-- >0;){if(c=Bu(a,s,n),c===u)return r[i]=a,r[o]=s,e(r);if(c>0)a=Math.floor(a/c)*c,s=Math.ceil(s/c)*c;else if(c<0)a=Math.ceil(a*c)/c,s=Math.floor(s*c)/c;else break;u=c}return t},t}function wd(){var t=uS();return t.copy=function(){return aS(t,wd())},ia.apply(t,arguments),_d(t)}function $d(){var t=0,e=1,n=1,r=[.5],i=[0,1],o;function a(u){return u!=null&&u<=u?i[b0(r,u,0,n)]:o}function s(){var u=-1;for(r=new Array(n);++u<n;)r[u]=((u+1)*e-(u-n)*t)/(n+1);return a}return a.domain=function(u){return arguments.length?([t,e]=u,t=+t,e=+e,s()):[t,e]},a.range=function(u){return arguments.length?(n=(i=Array.from(u)).length-1,s()):i.slice()},a.invertExtent=function(u){var c=i.indexOf(u);return c<0?[NaN,NaN]:c<1?[t,r[0]]:c>=n?[r[n-1],e]:[r[c-1],r[c]]},a.unknown=function(u){return arguments.length&&(o=u),a},a.thresholds=function(){return r.slice()},a.copy=function(){return $d().domain([t,e]).range(i).unknown(o)},ia.apply(_d(a),arguments)}function mi(t,e,n){this.k=t,this.x=e,this.y=n}mi.prototype={constructor:mi,scale:function(t){return t===1?this:new mi(this.k*t,this.x,this.y)},translate:function(t,e){return t===0&e===0?this:new mi(this.k,this.x+this.k*t,this.y+this.k*e)},apply:function(t){return[t[0]*this.k+this.x,t[1]*this.k+this.y]},applyX:function(t){return t*this.k+this.x},applyY:function(t){return t*this.k+this.y},invert:function(t){return[(t[0]-this.x)/this.k,(t[1]-this.y)/this.k]},invertX:function(t){return(t-this.x)/this.k},invertY:function(t){return(t-this.y)/this.k},rescaleX:function(t){return t.copy().domain(t.range().map(this.invertX,this).map(t.invert,t))},rescaleY:function(t){return t.copy().domain(t.range().map(this.invertY,this).map(t.invert,t))},toString:function(){return"translate("+this.x+","+this.y+") scale("+this.k+")"}},mi.prototype;function oa(t){return Object.prototype.toString.call(t)==="[object Object]"}function sc(t,e){if(oa(t)===!1||oa(e)===!1)return Object.assign({},e);const n=(r,i)=>{const o=Object.assign({},i);for(let a of Object.keys(r)){if(!(a in i))continue;let s;oa(r[a])&&oa(i[a])?(s=n(r[a],i[a]),o[a]=s):o[a]=r[a]}return o};return n(t,e)}var uc=function(t,e){return uc=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(n,r){n.__proto__=r}||function(n,r){for(var i in r)Object.prototype.hasOwnProperty.call(r,i)&&(n[i]=r[i])},uc(t,e)};function He(t,e){if(typeof e!="function"&&e!==null)throw new TypeError("Class extends value "+String(e)+" is not a constructor or null");uc(t,e);function n(){this.constructor=t}t.prototype=e===null?Object.create(e):(n.prototype=e.prototype,new n)}function lS(t,e,n,r){function i(o){return o instanceof n?o:new n(function(a){a(o)})}return new(n||(n=Promise))(function(o,a){function s(l){try{c(r.next(l))}catch(h){a(h)}}function u(l){try{c(r.throw(l))}catch(h){a(h)}}function c(l){l.done?o(l.value):i(l.value).then(s,u)}c((r=r.apply(t,[])).next())})}function Sd(t,e){var n={label:0,sent:function(){if(o[0]&1)throw o[1];return o[1]},trys:[],ops:[]},r,i,o,a;return a={next:s(0),throw:s(1),return:s(2)},typeof Symbol=="function"&&(a[Symbol.iterator]=function(){return this}),a;function s(c){return function(l){return u([c,l])}}function u(c){if(r)throw new TypeError("Generator is already executing.");for(;a&&(a=0,c[0]&&(n=0)),n;)try{if(r=1,i&&(o=c[0]&2?i.return:c[0]?i.throw||((o=i.return)&&o.call(i),0):i.next)&&!(o=o.call(i,c[1])).done)return o;switch(i=0,o&&(c=[c[0]&2,o.value]),c[0]){case 0:case 1:o=c;break;case 4:return n.label++,{value:c[1],done:!1};case 5:n.label++,i=c[1],c=[0];continue;case 7:c=n.ops.pop(),n.trys.pop();continue;default:if(o=n.trys,!(o=o.length>0&&o[o.length-1])&&(c[0]===6||c[0]===2)){n=0;continue}if(c[0]===3&&(!o||c[1]>o[0]&&c[1]<o[3])){n.label=c[1];break}if(c[0]===6&&n.label<o[1]){n.label=o[1],o=c;break}if(o&&n.label<o[2]){n.label=o[2],n.ops.push(c);break}o[2]&&n.ops.pop(),n.trys.pop();continue}c=e.call(t,n)}catch(l){c=[6,l],i=0}finally{r=o=0}if(c[0]&5)throw c[1];return{value:c[0]?c[1]:void 0,done:!0}}}function yr(t){var e=typeof Symbol=="function"&&Symbol.iterator,n=e&&t[e],r=0;if(n)return n.call(t);if(t&&typeof t.length=="number")return{next:function(){return t&&r>=t.length&&(t=void 0),{value:t&&t[r++],done:!t}}};throw new TypeError(e?"Object is not iterable.":"Symbol.iterator is not defined.")}function yi(t,e){var n=typeof Symbol=="function"&&t[Symbol.iterator];if(!n)return t;var r=n.call(t),i,o=[],a;try{for(;(e===void 0||e-- >0)&&!(i=r.next()).done;)o.push(i.value)}catch(s){a={error:s}}finally{try{i&&!i.done&&(n=r.return)&&n.call(r)}finally{if(a)throw a.error}}return o}function bi(t,e,n){if(arguments.length===2)for(var r=0,i=e.length,o;r<i;r++)(o||!(r in e))&&(o||(o=Array.prototype.slice.call(e,0,r)),o[r]=e[r]);return t.concat(o||Array.prototype.slice.call(e))}function br(t){return this instanceof br?(this.v=t,this):new br(t)}function fS(t,e,n){if(!Symbol.asyncIterator)throw new TypeError("Symbol.asyncIterator is not defined.");var r=n.apply(t,e||[]),i,o=[];return i={},s("next"),s("throw"),s("return",a),i[Symbol.asyncIterator]=function(){return this},i;function a(d){return function(p){return Promise.resolve(p).then(d,h)}}function s(d,p){r[d]&&(i[d]=function(g){return new Promise(function(m,y){o.push([d,g,m,y])>1||u(d,g)})},p&&(i[d]=p(i[d])))}function u(d,p){try{c(r[d](p))}catch(g){f(o[0][3],g)}}function c(d){d.value instanceof br?Promise.resolve(d.value.v).then(l,h):f(o[0][2],d)}function l(d){u("next",d)}function h(d){u("throw",d)}function f(d,p){d(p),o.shift(),o.length&&u(o[0][0],o[0][1])}}function hS(t){if(!Symbol.asyncIterator)throw new TypeError("Symbol.asyncIterator is not defined.");var e=t[Symbol.asyncIterator],n;return e?e.call(t):(t=typeof yr=="function"?yr(t):t[Symbol.iterator](),n={},r("next"),r("throw"),r("return"),n[Symbol.asyncIterator]=function(){return this},n);function r(o){n[o]=t[o]&&function(a){return new Promise(function(s,u){a=t[o](a),i(s,u,a.done,a.value)})}}function i(o,a,s,u){Promise.resolve(u).then(function(c){o({value:c,done:s})},a)}}function Pt(t){return typeof t=="function"}function cc(t){var e=function(r){Error.call(r),r.stack=new Error().stack},n=t(e);return n.prototype=Object.create(Error.prototype),n.prototype.constructor=n,n}var lc=cc(function(t){return function(e){t(this),this.message=e?e.length+` errors occurred during unsubscription:
|
3
|
+
`):"",this.name="UnsubscriptionError",this.errors=n}});function Du(t,e){if(t){var n=t.indexOf(e);0<=n&&t.splice(n,1)}}var Co=function(){function t(e){this.initialTeardown=e,this.closed=!1,this._parentage=null,this._finalizers=null}return t.prototype.unsubscribe=function(){var e,n,r,i,o;if(!this.closed){this.closed=!0;var a=this._parentage;if(a)if(this._parentage=null,Array.isArray(a))try{for(var s=ur(a),u=s.next();!u.done;u=s.next()){var c=u.value;c.remove(this)}}catch(g){e={error:g}}finally{try{u&&!u.done&&(n=s.return)&&n.call(s)}finally{if(e)throw e.error}}else a.remove(this);var l=this.initialTeardown;if(mt(l))try{l()}catch(g){o=g instanceof Pu?g.errors:[g]}var h=this._finalizers;if(h){this._finalizers=null;try{for(var f=ur(h),d=f.next();!d.done;d=f.next()){var p=d.value;try{qh(p)}catch(g){o=o??[],g instanceof Pu?o=ai(ai([],cr(o)),cr(g.errors)):o.push(g)}}}catch(g){r={error:g}}finally{try{d&&!d.done&&(i=f.return)&&i.call(f)}finally{if(r)throw r.error}}}if(o)throw new Pu(o)}},t.prototype.add=function(e){var n;if(e&&e!==this)if(this.closed)qh(e);else{if(e instanceof t){if(e.closed||e._hasParent(this))return;e._addParent(this)}(this._finalizers=(n=this._finalizers)!==null&&n!==void 0?n:[]).push(e)}},t.prototype._hasParent=function(e){var n=this._parentage;return n===e||Array.isArray(n)&&n.includes(e)},t.prototype._addParent=function(e){var n=this._parentage;this._parentage=Array.isArray(n)?(n.push(e),n):n?[n,e]:e},t.prototype._removeParent=function(e){var n=this._parentage;n===e?this._parentage=null:Array.isArray(n)&&Du(n,e)},t.prototype.remove=function(e){var n=this._finalizers;n&&Du(n,e),e instanceof t&&e._removeParent(this)},t.EMPTY=function(){var e=new t;return e.closed=!0,e}(),t}(),Wh=Co.EMPTY;function Hh(t){return t instanceof Co||t&&"closed"in t&&mt(t.remove)&&mt(t.add)&&mt(t.unsubscribe)}function qh(t){mt(t)?t():t.unsubscribe()}var Xh={onUnhandledError:null,onStoppedNotification:null,Promise:void 0,useDeprecatedSynchronousErrorHandling:!1,useDeprecatedNextContext:!1},Vh={setTimeout:function(t,e){for(var n=[],r=2;r<arguments.length;r++)n[r-2]=arguments[r];return setTimeout.apply(void 0,ai([t,e],cr(n)))},clearTimeout:function(t){var e=Vh.delegate;return((e==null?void 0:e.clearTimeout)||clearTimeout)(t)},delegate:void 0};function jh(t){Vh.setTimeout(function(){throw t})}function Eu(){}function Ro(t){t()}var ku=function(t){sr(e,t);function e(n){var r=t.call(this)||this;return r.isStopped=!1,n?(r.destination=n,Hh(n)&&n.add(r)):r.destination=px,r}return e.create=function(n,r,i){return new si(n,r,i)},e.prototype.next=function(n){this.isStopped||this._next(n)},e.prototype.error=function(n){this.isStopped||(this.isStopped=!0,this._error(n))},e.prototype.complete=function(){this.isStopped||(this.isStopped=!0,this._complete())},e.prototype.unsubscribe=function(){this.closed||(this.isStopped=!0,t.prototype.unsubscribe.call(this),this.destination=null)},e.prototype._next=function(n){this.destination.next(n)},e.prototype._error=function(n){try{this.destination.error(n)}finally{this.unsubscribe()}},e.prototype._complete=function(){try{this.destination.complete()}finally{this.unsubscribe()}},e}(Co),fx=Function.prototype.bind;function Lu(t,e){return fx.call(t,e)}var hx=function(){function t(e){this.partialObserver=e}return t.prototype.next=function(e){var n=this.partialObserver;if(n.next)try{n.next(e)}catch(r){Io(r)}},t.prototype.error=function(e){var n=this.partialObserver;if(n.error)try{n.error(e)}catch(r){Io(r)}else Io(e)},t.prototype.complete=function(){var e=this.partialObserver;if(e.complete)try{e.complete()}catch(n){Io(n)}},t}(),si=function(t){sr(e,t);function e(n,r,i){var o=t.call(this)||this,a;if(mt(n)||!n)a={next:n??void 0,error:r??void 0,complete:i??void 0};else{var s;o&&Xh.useDeprecatedNextContext?(s=Object.create(n),s.unsubscribe=function(){return o.unsubscribe()},a={next:n.next&&Lu(n.next,s),error:n.error&&Lu(n.error,s),complete:n.complete&&Lu(n.complete,s)}):a=n}return o.destination=new hx(a),o}return e}(ku);function Io(t){jh(t)}function dx(t){throw t}var px={closed:!0,next:Eu,error:dx,complete:Eu},Cu=function(){return typeof Symbol=="function"&&Symbol.observable||"@@observable"}();function fr(t){return t}function gx(t){return t.length===0?fr:t.length===1?t[0]:function(n){return t.reduce(function(r,i){return i(r)},n)}}var lt=function(){function t(e){e&&(this._subscribe=e)}return t.prototype.lift=function(e){var n=new t;return n.source=this,n.operator=e,n},t.prototype.subscribe=function(e,n,r){var i=this,o=yx(e)?e:new si(e,n,r);return Ro(function(){var a=i,s=a.operator,u=a.source;o.add(s?s.call(o,u):u?i._subscribe(o):i._trySubscribe(o))}),o},t.prototype._trySubscribe=function(e){try{return this._subscribe(e)}catch(n){e.error(n)}},t.prototype.forEach=function(e,n){var r=this;return n=Zh(n),new n(function(i,o){var a=new si({next:function(s){try{e(s)}catch(u){o(u),a.unsubscribe()}},error:o,complete:i});r.subscribe(a)})},t.prototype._subscribe=function(e){var n;return(n=this.source)===null||n===void 0?void 0:n.subscribe(e)},t.prototype[Cu]=function(){return this},t.prototype.pipe=function(){for(var e=[],n=0;n<arguments.length;n++)e[n]=arguments[n];return gx(e)(this)},t.prototype.toPromise=function(e){var n=this;return e=Zh(e),new e(function(r,i){var o;n.subscribe(function(a){return o=a},function(a){return i(a)},function(){return r(o)})})},t.create=function(e){return new t(e)},t}();function Zh(t){var e;return(e=t??Xh.Promise)!==null&&e!==void 0?e:Promise}function mx(t){return t&&mt(t.next)&&mt(t.error)&&mt(t.complete)}function yx(t){return t&&t instanceof ku||mx(t)&&Hh(t)}function bx(t){return mt(t==null?void 0:t.lift)}function ce(t){return function(e){if(bx(e))return e.lift(function(n){try{return t(n,this)}catch(r){this.error(r)}});throw new TypeError("Unable to lift unknown Observable type")}}function oe(t,e,n,r,i){return new vx(t,e,n,r,i)}var vx=function(t){sr(e,t);function e(n,r,i,o,a,s){var u=t.call(this,n)||this;return u.onFinalize=a,u.shouldUnsubscribe=s,u._next=r?function(c){try{r(c)}catch(l){n.error(l)}}:t.prototype._next,u._error=o?function(c){try{o(c)}catch(l){n.error(l)}finally{this.unsubscribe()}}:t.prototype._error,u._complete=i?function(){try{i()}catch(c){n.error(c)}finally{this.unsubscribe()}}:t.prototype._complete,u}return e.prototype.unsubscribe=function(){var n;if(!this.shouldUnsubscribe||this.shouldUnsubscribe()){var r=this.closed;t.prototype.unsubscribe.call(this),!r&&((n=this.onFinalize)===null||n===void 0||n.call(this))}},e}(ku),xx=Tu(function(t){return function(){t(this),this.name="ObjectUnsubscribedError",this.message="object unsubscribed"}}),it=function(t){sr(e,t);function e(){var n=t.call(this)||this;return n.closed=!1,n.currentObservers=null,n.observers=[],n.isStopped=!1,n.hasError=!1,n.thrownError=null,n}return e.prototype.lift=function(n){var r=new Kh(this,this);return r.operator=n,r},e.prototype._throwIfClosed=function(){if(this.closed)throw new xx},e.prototype.next=function(n){var r=this;Ro(function(){var i,o;if(r._throwIfClosed(),!r.isStopped){r.currentObservers||(r.currentObservers=Array.from(r.observers));try{for(var a=ur(r.currentObservers),s=a.next();!s.done;s=a.next()){var u=s.value;u.next(n)}}catch(c){i={error:c}}finally{try{s&&!s.done&&(o=a.return)&&o.call(a)}finally{if(i)throw i.error}}}})},e.prototype.error=function(n){var r=this;Ro(function(){if(r._throwIfClosed(),!r.isStopped){r.hasError=r.isStopped=!0,r.thrownError=n;for(var i=r.observers;i.length;)i.shift().error(n)}})},e.prototype.complete=function(){var n=this;Ro(function(){if(n._throwIfClosed(),!n.isStopped){n.isStopped=!0;for(var r=n.observers;r.length;)r.shift().complete()}})},e.prototype.unsubscribe=function(){this.isStopped=this.closed=!0,this.observers=this.currentObservers=null},Object.defineProperty(e.prototype,"observed",{get:function(){var n;return((n=this.observers)===null||n===void 0?void 0:n.length)>0},enumerable:!1,configurable:!0}),e.prototype._trySubscribe=function(n){return this._throwIfClosed(),t.prototype._trySubscribe.call(this,n)},e.prototype._subscribe=function(n){return this._throwIfClosed(),this._checkFinalizedStatuses(n),this._innerSubscribe(n)},e.prototype._innerSubscribe=function(n){var r=this,i=this,o=i.hasError,a=i.isStopped,s=i.observers;return o||a?Wh:(this.currentObservers=null,s.push(n),new Co(function(){r.currentObservers=null,Du(s,n)}))},e.prototype._checkFinalizedStatuses=function(n){var r=this,i=r.hasError,o=r.thrownError,a=r.isStopped;i?n.error(o):a&&n.complete()},e.prototype.asObservable=function(){var n=new lt;return n.source=this,n},e.create=function(n,r){return new Kh(n,r)},e}(lt),Kh=function(t){sr(e,t);function e(n,r){var i=t.call(this)||this;return i.destination=n,i.source=r,i}return e.prototype.next=function(n){var r,i;(i=(r=this.destination)===null||r===void 0?void 0:r.next)===null||i===void 0||i.call(r,n)},e.prototype.error=function(n){var r,i;(i=(r=this.destination)===null||r===void 0?void 0:r.error)===null||i===void 0||i.call(r,n)},e.prototype.complete=function(){var n,r;(r=(n=this.destination)===null||n===void 0?void 0:n.complete)===null||r===void 0||r.call(n)},e.prototype._subscribe=function(n){var r,i;return(i=(r=this.source)===null||r===void 0?void 0:r.subscribe(n))!==null&&i!==void 0?i:Wh},e}(it),Qh={now:function(){return(Qh.delegate||Date).now()},delegate:void 0},_x=function(t){sr(e,t);function e(n,r,i){n===void 0&&(n=1/0),r===void 0&&(r=1/0),i===void 0&&(i=Qh);var o=t.call(this)||this;return o._bufferSize=n,o._windowTime=r,o._timestampProvider=i,o._buffer=[],o._infiniteTimeWindow=!0,o._infiniteTimeWindow=r===1/0,o._bufferSize=Math.max(1,n),o._windowTime=Math.max(1,r),o}return e.prototype.next=function(n){var r=this,i=r.isStopped,o=r._buffer,a=r._infiniteTimeWindow,s=r._timestampProvider,u=r._windowTime;i||(o.push(n),!a&&o.push(s.now()+u)),this._trimBuffer(),t.prototype.next.call(this,n)},e.prototype._subscribe=function(n){this._throwIfClosed(),this._trimBuffer();for(var r=this._innerSubscribe(n),i=this,o=i._infiniteTimeWindow,a=i._buffer,s=a.slice(),u=0;u<s.length&&!n.closed;u+=o?1:2)n.next(s[u]);return this._checkFinalizedStatuses(n),r},e.prototype._trimBuffer=function(){var n=this,r=n._bufferSize,i=n._timestampProvider,o=n._buffer,a=n._infiniteTimeWindow,s=(a?1:2)*r;if(r<1/0&&s<o.length&&o.splice(0,o.length-s),!a){for(var u=i.now(),c=0,l=1;l<o.length&&o[l]<=u;l+=2)c=l;c&&o.splice(0,c+1)}},e}(it),Jh=new lt(function(t){return t.complete()});function wx(t){return t&&mt(t.schedule)}function Ru(t){return t[t.length-1]}function $x(t){return mt(Ru(t))?t.pop():void 0}function Iu(t){return wx(Ru(t))?t.pop():void 0}function Sx(t,e){return typeof Ru(t)=="number"?t.pop():e}var Nu=function(t){return t&&typeof t.length=="number"&&typeof t!="function"};function t0(t){return mt(t==null?void 0:t.then)}function e0(t){return mt(t[Cu])}function n0(t){return Symbol.asyncIterator&&mt(t==null?void 0:t[Symbol.asyncIterator])}function r0(t){return new TypeError("You provided "+(t!==null&&typeof t=="object"?"an invalid object":"'"+t+"'")+" where a stream was expected. You can provide an Observable, Promise, ReadableStream, Array, AsyncIterable, or Iterable.")}function Ax(){return typeof Symbol!="function"||!Symbol.iterator?"@@iterator":Symbol.iterator}var i0=Ax();function o0(t){return mt(t==null?void 0:t[i0])}function a0(t){return cx(this,arguments,function(){var n,r,i,o;return Yh(this,function(a){switch(a.label){case 0:n=t.getReader(),a.label=1;case 1:a.trys.push([1,,9,10]),a.label=2;case 2:return[4,lr(n.read())];case 3:return r=a.sent(),i=r.value,o=r.done,o?[4,lr(void 0)]:[3,5];case 4:return[2,a.sent()];case 5:return[4,lr(i)];case 6:return[4,a.sent()];case 7:return a.sent(),[3,2];case 8:return[3,10];case 9:return n.releaseLock(),[7];case 10:return[2]}})})}function s0(t){return mt(t==null?void 0:t.getReader)}function le(t){if(t instanceof lt)return t;if(t!=null){if(e0(t))return Mx(t);if(Nu(t))return Tx(t);if(t0(t))return Px(t);if(n0(t))return u0(t);if(o0(t))return Dx(t);if(s0(t))return Ex(t)}throw r0(t)}function Mx(t){return new lt(function(e){var n=t[Cu]();if(mt(n.subscribe))return n.subscribe(e);throw new TypeError("Provided object does not correctly implement Symbol.observable")})}function Tx(t){return new lt(function(e){for(var n=0;n<t.length&&!e.closed;n++)e.next(t[n]);e.complete()})}function Px(t){return new lt(function(e){t.then(function(n){e.closed||(e.next(n),e.complete())},function(n){return e.error(n)}).then(null,jh)})}function Dx(t){return new lt(function(e){var n,r;try{for(var i=ur(t),o=i.next();!o.done;o=i.next()){var a=o.value;if(e.next(a),e.closed)return}}catch(s){n={error:s}}finally{try{o&&!o.done&&(r=i.return)&&r.call(i)}finally{if(n)throw n.error}}e.complete()})}function u0(t){return new lt(function(e){kx(t,e).catch(function(n){return e.error(n)})})}function Ex(t){return u0(a0(t))}function kx(t,e){var n,r,i,o;return ux(this,void 0,void 0,function(){var a,s;return Yh(this,function(u){switch(u.label){case 0:u.trys.push([0,5,6,11]),n=lx(t),u.label=1;case 1:return[4,n.next()];case 2:if(r=u.sent(),!!r.done)return[3,4];if(a=r.value,e.next(a),e.closed)return[2];u.label=3;case 3:return[3,1];case 4:return[3,11];case 5:return s=u.sent(),i={error:s},[3,11];case 6:return u.trys.push([6,,9,10]),r&&!r.done&&(o=n.return)?[4,o.call(n)]:[3,8];case 7:u.sent(),u.label=8;case 8:return[3,10];case 9:if(i)throw i.error;return[7];case 10:return[7];case 11:return e.complete(),[2]}})})}function un(t,e,n,r,i){r===void 0&&(r=0),i===void 0&&(i=!1);var o=e.schedule(function(){n(),i?t.add(this.schedule(null,r)):this.unsubscribe()},r);if(t.add(o),!i)return o}function c0(t,e){return e===void 0&&(e=0),ce(function(n,r){n.subscribe(oe(r,function(i){return un(r,t,function(){return r.next(i)},e)},function(){return un(r,t,function(){return r.complete()},e)},function(i){return un(r,t,function(){return r.error(i)},e)}))})}function l0(t,e){return e===void 0&&(e=0),ce(function(n,r){r.add(t.schedule(function(){return n.subscribe(r)},e))})}function Lx(t,e){return le(t).pipe(l0(e),c0(e))}function Cx(t,e){return le(t).pipe(l0(e),c0(e))}function Rx(t,e){return new lt(function(n){var r=0;return e.schedule(function(){r===t.length?n.complete():(n.next(t[r++]),n.closed||this.schedule())})})}function Ix(t,e){return new lt(function(n){var r;return un(n,e,function(){r=t[i0](),un(n,e,function(){var i,o,a;try{i=r.next(),o=i.value,a=i.done}catch(s){n.error(s);return}a?n.complete():n.next(o)},0,!0)}),function(){return mt(r==null?void 0:r.return)&&r.return()}})}function f0(t,e){if(!t)throw new Error("Iterable cannot be null");return new lt(function(n){un(n,e,function(){var r=t[Symbol.asyncIterator]();un(n,e,function(){r.next().then(function(i){i.done?n.complete():n.next(i.value)})},0,!0)})})}function Nx(t,e){return f0(a0(t),e)}function Fx(t,e){if(t!=null){if(e0(t))return Lx(t,e);if(Nu(t))return Rx(t,e);if(t0(t))return Cx(t,e);if(n0(t))return f0(t,e);if(o0(t))return Ix(t,e);if(s0(t))return Nx(t,e)}throw r0(t)}function No(t,e){return e?Fx(t,e):le(t)}function Fu(){for(var t=[],e=0;e<arguments.length;e++)t[e]=arguments[e];var n=Iu(t);return No(t,n)}var h0=Tu(function(t){return function(){t(this),this.name="EmptyError",this.message="no elements in sequence"}});function B(t,e){return ce(function(n,r){var i=0;n.subscribe(oe(r,function(o){r.next(t.call(e,o,i++))}))})}var Gx=Array.isArray;function zx(t,e){return Gx(e)?t.apply(void 0,ai([],cr(e))):t(e)}function d0(t){return B(function(e){return zx(t,e)})}var Ox=Array.isArray,Ux=Object.getPrototypeOf,Bx=Object.prototype,Yx=Object.keys;function Wx(t){if(t.length===1){var e=t[0];if(Ox(e))return{args:e,keys:null};if(Hx(e)){var n=Yx(e);return{args:n.map(function(r){return e[r]}),keys:n}}}return{args:t,keys:null}}function Hx(t){return t&&typeof t=="object"&&Ux(t)===Bx}function qx(t,e){return t.reduce(function(n,r,i){return n[r]=e[i],n},{})}function H(){for(var t=[],e=0;e<arguments.length;e++)t[e]=arguments[e];var n=Iu(t),r=$x(t),i=Wx(t),o=i.args,a=i.keys;if(o.length===0)return No([],n);var s=new lt(Xx(o,n,a?function(u){return qx(a,u)}:fr));return r?s.pipe(d0(r)):s}function Xx(t,e,n){return n===void 0&&(n=fr),function(r){p0(e,function(){for(var i=t.length,o=new Array(i),a=i,s=i,u=function(l){p0(e,function(){var h=No(t[l],e),f=!1;h.subscribe(oe(r,function(d){o[l]=d,f||(f=!0,s--),s||r.next(n(o.slice()))},function(){--a||r.complete()}))},r)},c=0;c<i;c++)u(c)},r)}}function p0(t,e,n){t?un(n,t,e):e()}function Vx(t,e,n,r,i,o,a,s){var u=[],c=0,l=0,h=!1,f=function(){h&&!u.length&&!c&&e.complete()},d=function(g){return c<r?p(g):u.push(g)},p=function(g){c++;var m=!1;le(n(g,l++)).subscribe(oe(e,function(y){e.next(y)},function(){m=!0},void 0,function(){if(m)try{c--;for(var y=function(){var x=u.shift();a||p(x)};u.length&&c<r;)y();f()}catch(x){e.error(x)}}))};return t.subscribe(oe(e,d,function(){h=!0,f()})),function(){}}function Gu(t,e,n){return n===void 0&&(n=1/0),mt(e)?Gu(function(r,i){return B(function(o,a){return e(r,o,i,a)})(le(t(r,i)))},n):(typeof e=="number"&&(n=e),ce(function(r,i){return Vx(r,i,t,n)}))}function jx(t){return t===void 0&&(t=1/0),Gu(fr,t)}function Zx(t){return new lt(function(e){le(t()).subscribe(e)})}var Kx=["addListener","removeListener"],Qx=["addEventListener","removeEventListener"],Jx=["on","off"];function zu(t,e,n,r){if(mt(n)&&(r=n,n=void 0),r)return zu(t,e,n).pipe(d0(r));var i=cr(n_(t)?Qx.map(function(s){return function(u){return t[s](e,u,n)}}):t_(t)?Kx.map(g0(t,e)):e_(t)?Jx.map(g0(t,e)):[],2),o=i[0],a=i[1];if(!o&&Nu(t))return Gu(function(s){return zu(s,e,n)})(le(t));if(!o)throw new TypeError("Invalid event target");return new lt(function(s){var u=function(){for(var c=[],l=0;l<arguments.length;l++)c[l]=arguments[l];return s.next(1<c.length?c:c[0])};return o(u),function(){return a(u)}})}function g0(t,e){return function(n){return function(r){return t[n](e,r)}}}function t_(t){return mt(t.addListener)&&mt(t.removeListener)}function e_(t){return mt(t.on)&&mt(t.off)}function n_(t){return mt(t.addEventListener)&&mt(t.removeEventListener)}function m0(t,e,n){return Zx(function(){return t()?e:n})}function Ou(){for(var t=[],e=0;e<arguments.length;e++)t[e]=arguments[e];var n=Iu(t),r=Sx(t,1/0),i=t;return i.length?i.length===1?le(i[0]):jx(r)(No(i,n)):Jh}function Fo(t,e){return ce(function(n,r){var i=0;n.subscribe(oe(r,function(o){return t.call(e,o,i++)&&r.next(o)}))})}function r_(t){return ce(function(e,n){var r=!1;e.subscribe(oe(n,function(i){r=!0,n.next(i)},function(){r||n.next(t),n.complete()}))})}function i_(t){return t<=0?function(){return Jh}:ce(function(e,n){var r=0;e.subscribe(oe(n,function(i){++r<=t&&(n.next(i),t<=r&&n.complete())}))})}function dt(t,e){return e===void 0&&(e=fr),t=t??o_,ce(function(n,r){var i,o=!0;n.subscribe(oe(r,function(a){var s=e(a);(o||!t(i,s))&&(o=!1,i=s,r.next(a))}))})}function o_(t,e){return t===e}function a_(t){return t===void 0&&(t=s_),ce(function(e,n){var r=!1;e.subscribe(oe(n,function(i){r=!0,n.next(i)},function(){return r?n.complete():n.error(t())}))})}function s_(){return new h0}function ui(t,e){var n=arguments.length>=2;return function(r){return r.pipe(fr,i_(1),n?r_(e):a_(function(){return new h0}))}}function u_(t){t===void 0&&(t={});var e=t.connector,n=e===void 0?function(){return new it}:e,r=t.resetOnError,i=r===void 0?!0:r,o=t.resetOnComplete,a=o===void 0?!0:o,s=t.resetOnRefCountZero,u=s===void 0?!0:s;return function(c){var l,h,f,d=0,p=!1,g=!1,m=function(){h==null||h.unsubscribe(),h=void 0},y=function(){m(),l=f=void 0,p=g=!1},x=function(){var v=l;y(),v==null||v.unsubscribe()};return ce(function(v,b){d++,!g&&!p&&m();var $=f=f??n();b.add(function(){d--,d===0&&!g&&!p&&(h=Uu(x,u))}),$.subscribe(b),!l&&d>0&&(l=new si({next:function(w){return $.next(w)},error:function(w){g=!0,m(),h=Uu(y,i,w),$.error(w)},complete:function(){p=!0,m(),h=Uu(y,a),$.complete()}}),le(v).subscribe(l))})(c)}}function Uu(t,e){for(var n=[],r=2;r<arguments.length;r++)n[r-2]=arguments[r];if(e===!0){t();return}if(e!==!1){var i=new si({next:function(){i.unsubscribe(),t()}});return le(e.apply(void 0,ai([],cr(n)))).subscribe(i)}}function Ye(t,e,n){var r,i=!1;return r=t,u_({connector:function(){return new _x(r,e,n)},resetOnError:!0,resetOnComplete:!1,resetOnRefCountZero:i})}function U(t,e){return ce(function(n,r){var i=null,o=0,a=!1,s=function(){return a&&!i&&r.complete()};n.subscribe(oe(r,function(u){i==null||i.unsubscribe();var c=0,l=o++;le(t(u,l)).subscribe(i=oe(r,function(h){return r.next(e?e(u,h,l,c++):h)},function(){i=null,s()}))},function(){a=!0,s()}))})}function G(t){return ce(function(e,n){le(t).subscribe(oe(n,function(){return n.complete()},Eu)),!n.closed&&e.subscribe(n)})}const hr={position:"left",scaleDomain:[0,"auto"],scaleRange:[0,.9],label:""};function Go(t,e){return t==null||e==null?NaN:t<e?-1:t>e?1:t>=e?0:NaN}function c_(t,e){return t==null||e==null?NaN:e<t?-1:e>t?1:e>=t?0:NaN}function y0(t){let e,n,r;t.length!==2?(e=Go,n=(s,u)=>Go(t(s),u),r=(s,u)=>t(s)-u):(e=t===Go||t===c_?t:l_,n=t,r=t);function i(s,u,c=0,l=s.length){if(c<l){if(e(u,u)!==0)return l;do{const h=c+l>>>1;n(s[h],u)<0?c=h+1:l=h}while(c<l)}return c}function o(s,u,c=0,l=s.length){if(c<l){if(e(u,u)!==0)return l;do{const h=c+l>>>1;n(s[h],u)<=0?c=h+1:l=h}while(c<l)}return c}function a(s,u,c=0,l=s.length){const h=i(s,u,c,l-1);return h>c&&r(s[h-1],u)>-r(s[h],u)?h-1:h}return{left:i,center:a,right:o}}function l_(){return 0}function f_(t){return t===null?NaN:+t}const h_=y0(Go),b0=h_.right;y0(f_).center;class v0 extends Map{constructor(e,n=g_){if(super(),Object.defineProperties(this,{_intern:{value:new Map},_key:{value:n}}),e!=null)for(const[r,i]of e)this.set(r,i)}get(e){return super.get(x0(this,e))}has(e){return super.has(x0(this,e))}set(e,n){return super.set(d_(this,e),n)}delete(e){return super.delete(p_(this,e))}}function x0({_intern:t,_key:e},n){const r=e(n);return t.has(r)?t.get(r):n}function d_({_intern:t,_key:e},n){const r=e(n);return t.has(r)?t.get(r):(t.set(r,n),n)}function p_({_intern:t,_key:e},n){const r=e(n);return t.has(r)&&(n=t.get(r),t.delete(r)),n}function g_(t){return t!==null&&typeof t=="object"?t.valueOf():t}const m_=Math.sqrt(50),y_=Math.sqrt(10),b_=Math.sqrt(2);function zo(t,e,n){const r=(e-t)/Math.max(0,n),i=Math.floor(Math.log10(r)),o=r/Math.pow(10,i),a=o>=m_?10:o>=y_?5:o>=b_?2:1;let s,u,c;return i<0?(c=Math.pow(10,-i)/a,s=Math.round(t*c),u=Math.round(e*c),s/c<t&&++s,u/c>e&&--u,c=-c):(c=Math.pow(10,i)*a,s=Math.round(t/c),u=Math.round(e/c),s*c<t&&++s,u*c>e&&--u),u<s&&.5<=n&&n<2?zo(t,e,n*2):[s,u,c]}function v_(t,e,n){if(e=+e,t=+t,n=+n,!(n>0))return[];if(t===e)return[t];const r=e<t,[i,o,a]=r?zo(e,t,n):zo(t,e,n);if(!(o>=i))return[];const s=o-i+1,u=new Array(s);if(r)if(a<0)for(let c=0;c<s;++c)u[c]=(o-c)/-a;else for(let c=0;c<s;++c)u[c]=(o-c)*a;else if(a<0)for(let c=0;c<s;++c)u[c]=(i+c)/-a;else for(let c=0;c<s;++c)u[c]=(i+c)*a;return u}function Bu(t,e,n){return e=+e,t=+t,n=+n,zo(t,e,n)[2]}function x_(t,e,n){e=+e,t=+t,n=+n;const r=e<t,i=r?Bu(e,t,n):Bu(t,e,n);return(r?-1:1)*(i<0?1/-i:i)}function __(t,e,n){t=+t,e=+e,n=(i=arguments.length)<2?(e=t,t=0,1):i<3?1:+n;for(var r=-1,i=Math.max(0,Math.ceil((e-t)/n))|0,o=new Array(i);++r<i;)o[r]=t+r*n;return o}var w_={value:()=>{}};function _0(){for(var t=0,e=arguments.length,n={},r;t<e;++t){if(!(r=arguments[t]+"")||r in n||/[\s.]/.test(r))throw new Error("illegal type: "+r);n[r]=[]}return new Oo(n)}function Oo(t){this._=t}function $_(t,e){return t.trim().split(/^|\s+/).map(function(n){var r="",i=n.indexOf(".");if(i>=0&&(r=n.slice(i+1),n=n.slice(0,i)),n&&!e.hasOwnProperty(n))throw new Error("unknown type: "+n);return{type:n,name:r}})}Oo.prototype=_0.prototype={constructor:Oo,on:function(t,e){var n=this._,r=$_(t+"",n),i,o=-1,a=r.length;if(arguments.length<2){for(;++o<a;)if((i=(t=r[o]).type)&&(i=S_(n[i],t.name)))return i;return}if(e!=null&&typeof e!="function")throw new Error("invalid callback: "+e);for(;++o<a;)if(i=(t=r[o]).type)n[i]=w0(n[i],t.name,e);else if(e==null)for(i in n)n[i]=w0(n[i],t.name,null);return this},copy:function(){var t={},e=this._;for(var n in e)t[n]=e[n].slice();return new Oo(t)},call:function(t,e){if((i=arguments.length-2)>0)for(var n=new Array(i),r=0,i,o;r<i;++r)n[r]=arguments[r+2];if(!this._.hasOwnProperty(t))throw new Error("unknown type: "+t);for(o=this._[t],r=0,i=o.length;r<i;++r)o[r].value.apply(e,n)},apply:function(t,e,n){if(!this._.hasOwnProperty(t))throw new Error("unknown type: "+t);for(var r=this._[t],i=0,o=r.length;i<o;++i)r[i].value.apply(e,n)}};function S_(t,e){for(var n=0,r=t.length,i;n<r;++n)if((i=t[n]).name===e)return i.value}function w0(t,e,n){for(var r=0,i=t.length;r<i;++r)if(t[r].name===e){t[r]=w_,t=t.slice(0,r).concat(t.slice(r+1));break}return n!=null&&t.push({name:e,value:n}),t}var Yu="http://www.w3.org/1999/xhtml";const $0={svg:"http://www.w3.org/2000/svg",xhtml:Yu,xlink:"http://www.w3.org/1999/xlink",xml:"http://www.w3.org/XML/1998/namespace",xmlns:"http://www.w3.org/2000/xmlns/"};function Uo(t){var e=t+="",n=e.indexOf(":");return n>=0&&(e=t.slice(0,n))!=="xmlns"&&(t=t.slice(n+1)),$0.hasOwnProperty(e)?{space:$0[e],local:t}:t}function A_(t){return function(){var e=this.ownerDocument,n=this.namespaceURI;return n===Yu&&e.documentElement.namespaceURI===Yu?e.createElement(t):e.createElementNS(n,t)}}function M_(t){return function(){return this.ownerDocument.createElementNS(t.space,t.local)}}function S0(t){var e=Uo(t);return(e.local?M_:A_)(e)}function T_(){}function Wu(t){return t==null?T_:function(){return this.querySelector(t)}}function P_(t){typeof t!="function"&&(t=Wu(t));for(var e=this._groups,n=e.length,r=new Array(n),i=0;i<n;++i)for(var o=e[i],a=o.length,s=r[i]=new Array(a),u,c,l=0;l<a;++l)(u=o[l])&&(c=t.call(u,u.__data__,l,o))&&("__data__"in u&&(c.__data__=u.__data__),s[l]=c);return new be(r,this._parents)}function D_(t){return t==null?[]:Array.isArray(t)?t:Array.from(t)}function E_(){return[]}function A0(t){return t==null?E_:function(){return this.querySelectorAll(t)}}function k_(t){return function(){return D_(t.apply(this,arguments))}}function L_(t){typeof t=="function"?t=k_(t):t=A0(t);for(var e=this._groups,n=e.length,r=[],i=[],o=0;o<n;++o)for(var a=e[o],s=a.length,u,c=0;c<s;++c)(u=a[c])&&(r.push(t.call(u,u.__data__,c,a)),i.push(u));return new be(r,i)}function M0(t){return function(){return this.matches(t)}}function T0(t){return function(e){return e.matches(t)}}var C_=Array.prototype.find;function R_(t){return function(){return C_.call(this.children,t)}}function I_(){return this.firstElementChild}function N_(t){return this.select(t==null?I_:R_(typeof t=="function"?t:T0(t)))}var F_=Array.prototype.filter;function G_(){return Array.from(this.children)}function z_(t){return function(){return F_.call(this.children,t)}}function O_(t){return this.selectAll(t==null?G_:z_(typeof t=="function"?t:T0(t)))}function U_(t){typeof t!="function"&&(t=M0(t));for(var e=this._groups,n=e.length,r=new Array(n),i=0;i<n;++i)for(var o=e[i],a=o.length,s=r[i]=[],u,c=0;c<a;++c)(u=o[c])&&t.call(u,u.__data__,c,o)&&s.push(u);return new be(r,this._parents)}function P0(t){return new Array(t.length)}function B_(){return new be(this._enter||this._groups.map(P0),this._parents)}function Bo(t,e){this.ownerDocument=t.ownerDocument,this.namespaceURI=t.namespaceURI,this._next=null,this._parent=t,this.__data__=e}Bo.prototype={constructor:Bo,appendChild:function(t){return this._parent.insertBefore(t,this._next)},insertBefore:function(t,e){return this._parent.insertBefore(t,e)},querySelector:function(t){return this._parent.querySelector(t)},querySelectorAll:function(t){return this._parent.querySelectorAll(t)}};function Y_(t){return function(){return t}}function W_(t,e,n,r,i,o){for(var a=0,s,u=e.length,c=o.length;a<c;++a)(s=e[a])?(s.__data__=o[a],r[a]=s):n[a]=new Bo(t,o[a]);for(;a<u;++a)(s=e[a])&&(i[a]=s)}function H_(t,e,n,r,i,o,a){var s,u,c=new Map,l=e.length,h=o.length,f=new Array(l),d;for(s=0;s<l;++s)(u=e[s])&&(f[s]=d=a.call(u,u.__data__,s,e)+"",c.has(d)?i[s]=u:c.set(d,u));for(s=0;s<h;++s)d=a.call(t,o[s],s,o)+"",(u=c.get(d))?(r[s]=u,u.__data__=o[s],c.delete(d)):n[s]=new Bo(t,o[s]);for(s=0;s<l;++s)(u=e[s])&&c.get(f[s])===u&&(i[s]=u)}function q_(t){return t.__data__}function X_(t,e){if(!arguments.length)return Array.from(this,q_);var n=e?H_:W_,r=this._parents,i=this._groups;typeof t!="function"&&(t=Y_(t));for(var o=i.length,a=new Array(o),s=new Array(o),u=new Array(o),c=0;c<o;++c){var l=r[c],h=i[c],f=h.length,d=V_(t.call(l,l&&l.__data__,c,r)),p=d.length,g=s[c]=new Array(p),m=a[c]=new Array(p),y=u[c]=new Array(f);n(l,h,g,m,y,d,e);for(var x=0,v=0,b,$;x<p;++x)if(b=g[x]){for(x>=v&&(v=x+1);!($=m[v])&&++v<p;);b._next=$||null}}return a=new be(a,r),a._enter=s,a._exit=u,a}function V_(t){return typeof t=="object"&&"length"in t?t:Array.from(t)}function j_(){return new be(this._exit||this._groups.map(P0),this._parents)}function Z_(t,e,n){var r=this.enter(),i=this,o=this.exit();return typeof t=="function"?(r=t(r),r&&(r=r.selection())):r=r.append(t+""),e!=null&&(i=e(i),i&&(i=i.selection())),n==null?o.remove():n(o),r&&i?r.merge(i).order():i}function K_(t){for(var e=t.selection?t.selection():t,n=this._groups,r=e._groups,i=n.length,o=r.length,a=Math.min(i,o),s=new Array(i),u=0;u<a;++u)for(var c=n[u],l=r[u],h=c.length,f=s[u]=new Array(h),d,p=0;p<h;++p)(d=c[p]||l[p])&&(f[p]=d);for(;u<i;++u)s[u]=n[u];return new be(s,this._parents)}function Q_(){for(var t=this._groups,e=-1,n=t.length;++e<n;)for(var r=t[e],i=r.length-1,o=r[i],a;--i>=0;)(a=r[i])&&(o&&a.compareDocumentPosition(o)^4&&o.parentNode.insertBefore(a,o),o=a);return this}function J_(t){t||(t=tw);function e(h,f){return h&&f?t(h.__data__,f.__data__):!h-!f}for(var n=this._groups,r=n.length,i=new Array(r),o=0;o<r;++o){for(var a=n[o],s=a.length,u=i[o]=new Array(s),c,l=0;l<s;++l)(c=a[l])&&(u[l]=c);u.sort(e)}return new be(i,this._parents).order()}function tw(t,e){return t<e?-1:t>e?1:t>=e?0:NaN}function ew(){var t=arguments[0];return arguments[0]=this,t.apply(null,arguments),this}function nw(){return Array.from(this)}function rw(){for(var t=this._groups,e=0,n=t.length;e<n;++e)for(var r=t[e],i=0,o=r.length;i<o;++i){var a=r[i];if(a)return a}return null}function iw(){let t=0;for(const e of this)++t;return t}function ow(){return!this.node()}function aw(t){for(var e=this._groups,n=0,r=e.length;n<r;++n)for(var i=e[n],o=0,a=i.length,s;o<a;++o)(s=i[o])&&t.call(s,s.__data__,o,i);return this}function sw(t){return function(){this.removeAttribute(t)}}function uw(t){return function(){this.removeAttributeNS(t.space,t.local)}}function cw(t,e){return function(){this.setAttribute(t,e)}}function lw(t,e){return function(){this.setAttributeNS(t.space,t.local,e)}}function fw(t,e){return function(){var n=e.apply(this,arguments);n==null?this.removeAttribute(t):this.setAttribute(t,n)}}function hw(t,e){return function(){var n=e.apply(this,arguments);n==null?this.removeAttributeNS(t.space,t.local):this.setAttributeNS(t.space,t.local,n)}}function dw(t,e){var n=Uo(t);if(arguments.length<2){var r=this.node();return n.local?r.getAttributeNS(n.space,n.local):r.getAttribute(n)}return this.each((e==null?n.local?uw:sw:typeof e=="function"?n.local?hw:fw:n.local?lw:cw)(n,e))}function D0(t){return t.ownerDocument&&t.ownerDocument.defaultView||t.document&&t||t.defaultView}function pw(t){return function(){this.style.removeProperty(t)}}function gw(t,e,n){return function(){this.style.setProperty(t,e,n)}}function mw(t,e,n){return function(){var r=e.apply(this,arguments);r==null?this.style.removeProperty(t):this.style.setProperty(t,r,n)}}function yw(t,e,n){return arguments.length>1?this.each((e==null?pw:typeof e=="function"?mw:gw)(t,e,n??"")):dr(this.node(),t)}function dr(t,e){return t.style.getPropertyValue(e)||D0(t).getComputedStyle(t,null).getPropertyValue(e)}function bw(t){return function(){delete this[t]}}function vw(t,e){return function(){this[t]=e}}function xw(t,e){return function(){var n=e.apply(this,arguments);n==null?delete this[t]:this[t]=n}}function _w(t,e){return arguments.length>1?this.each((e==null?bw:typeof e=="function"?xw:vw)(t,e)):this.node()[t]}function E0(t){return t.trim().split(/^|\s+/)}function Hu(t){return t.classList||new k0(t)}function k0(t){this._node=t,this._names=E0(t.getAttribute("class")||"")}k0.prototype={add:function(t){var e=this._names.indexOf(t);e<0&&(this._names.push(t),this._node.setAttribute("class",this._names.join(" ")))},remove:function(t){var e=this._names.indexOf(t);e>=0&&(this._names.splice(e,1),this._node.setAttribute("class",this._names.join(" ")))},contains:function(t){return this._names.indexOf(t)>=0}};function L0(t,e){for(var n=Hu(t),r=-1,i=e.length;++r<i;)n.add(e[r])}function C0(t,e){for(var n=Hu(t),r=-1,i=e.length;++r<i;)n.remove(e[r])}function ww(t){return function(){L0(this,t)}}function $w(t){return function(){C0(this,t)}}function Sw(t,e){return function(){(e.apply(this,arguments)?L0:C0)(this,t)}}function Aw(t,e){var n=E0(t+"");if(arguments.length<2){for(var r=Hu(this.node()),i=-1,o=n.length;++i<o;)if(!r.contains(n[i]))return!1;return!0}return this.each((typeof e=="function"?Sw:e?ww:$w)(n,e))}function Mw(){this.textContent=""}function Tw(t){return function(){this.textContent=t}}function Pw(t){return function(){var e=t.apply(this,arguments);this.textContent=e??""}}function Dw(t){return arguments.length?this.each(t==null?Mw:(typeof t=="function"?Pw:Tw)(t)):this.node().textContent}function Ew(){this.innerHTML=""}function kw(t){return function(){this.innerHTML=t}}function Lw(t){return function(){var e=t.apply(this,arguments);this.innerHTML=e??""}}function Cw(t){return arguments.length?this.each(t==null?Ew:(typeof t=="function"?Lw:kw)(t)):this.node().innerHTML}function Rw(){this.nextSibling&&this.parentNode.appendChild(this)}function Iw(){return this.each(Rw)}function Nw(){this.previousSibling&&this.parentNode.insertBefore(this,this.parentNode.firstChild)}function Fw(){return this.each(Nw)}function Gw(t){var e=typeof t=="function"?t:S0(t);return this.select(function(){return this.appendChild(e.apply(this,arguments))})}function zw(){return null}function Ow(t,e){var n=typeof t=="function"?t:S0(t),r=e==null?zw:typeof e=="function"?e:Wu(e);return this.select(function(){return this.insertBefore(n.apply(this,arguments),r.apply(this,arguments)||null)})}function Uw(){var t=this.parentNode;t&&t.removeChild(this)}function Bw(){return this.each(Uw)}function Yw(){var t=this.cloneNode(!1),e=this.parentNode;return e?e.insertBefore(t,this.nextSibling):t}function Ww(){var t=this.cloneNode(!0),e=this.parentNode;return e?e.insertBefore(t,this.nextSibling):t}function Hw(t){return this.select(t?Ww:Yw)}function qw(t){return arguments.length?this.property("__data__",t):this.node().__data__}function Xw(t){return function(e){t.call(this,e,this.__data__)}}function Vw(t){return t.trim().split(/^|\s+/).map(function(e){var n="",r=e.indexOf(".");return r>=0&&(n=e.slice(r+1),e=e.slice(0,r)),{type:e,name:n}})}function jw(t){return function(){var e=this.__on;if(e){for(var n=0,r=-1,i=e.length,o;n<i;++n)o=e[n],(!t.type||o.type===t.type)&&o.name===t.name?this.removeEventListener(o.type,o.listener,o.options):e[++r]=o;++r?e.length=r:delete this.__on}}}function Zw(t,e,n){return function(){var r=this.__on,i,o=Xw(e);if(r){for(var a=0,s=r.length;a<s;++a)if((i=r[a]).type===t.type&&i.name===t.name){this.removeEventListener(i.type,i.listener,i.options),this.addEventListener(i.type,i.listener=o,i.options=n),i.value=e;return}}this.addEventListener(t.type,o,n),i={type:t.type,name:t.name,value:e,listener:o,options:n},r?r.push(i):this.__on=[i]}}function Kw(t,e,n){var r=Vw(t+""),i,o=r.length,a;if(arguments.length<2){var s=this.node().__on;if(s){for(var u=0,c=s.length,l;u<c;++u)for(i=0,l=s[u];i<o;++i)if((a=r[i]).type===l.type&&a.name===l.name)return l.value}return}for(s=e?Zw:jw,i=0;i<o;++i)this.each(s(r[i],e,n));return this}function R0(t,e,n){var r=D0(t),i=r.CustomEvent;typeof i=="function"?i=new i(e,n):(i=r.document.createEvent("Event"),n?(i.initEvent(e,n.bubbles,n.cancelable),i.detail=n.detail):i.initEvent(e,!1,!1)),t.dispatchEvent(i)}function Qw(t,e){return function(){return R0(this,t,e)}}function Jw(t,e){return function(){return R0(this,t,e.apply(this,arguments))}}function t$(t,e){return this.each((typeof e=="function"?Jw:Qw)(t,e))}function*e$(){for(var t=this._groups,e=0,n=t.length;e<n;++e)for(var r=t[e],i=0,o=r.length,a;i<o;++i)(a=r[i])&&(yield a)}var n$=[null];function be(t,e){this._groups=t,this._parents=e}function ci(){return new be([[document.documentElement]],n$)}function r$(){return this}be.prototype=ci.prototype={constructor:be,select:P_,selectAll:L_,selectChild:N_,selectChildren:O_,filter:U_,data:X_,enter:B_,exit:j_,join:Z_,merge:K_,selection:r$,order:Q_,sort:J_,call:ew,nodes:nw,node:rw,size:iw,empty:ow,each:aw,attr:dw,style:yw,property:_w,classed:Aw,text:Dw,html:Cw,raise:Iw,lower:Fw,append:Gw,insert:Ow,remove:Bw,clone:Hw,datum:qw,on:Kw,dispatch:t$,[Symbol.iterator]:e$};function qu(t,e,n){t.prototype=e.prototype=n,n.constructor=t}function I0(t,e){var n=Object.create(t.prototype);for(var r in e)n[r]=e[r];return n}function li(){}var fi=.7,Yo=1/fi,pr="\\s*([+-]?\\d+)\\s*",hi="\\s*([+-]?(?:\\d*\\.)?\\d+(?:[eE][+-]?\\d+)?)\\s*",Ee="\\s*([+-]?(?:\\d*\\.)?\\d+(?:[eE][+-]?\\d+)?)%\\s*",i$=/^#([0-9a-f]{3,8})$/,o$=new RegExp(`^rgb\\(${pr},${pr},${pr}\\)$`),a$=new RegExp(`^rgb\\(${Ee},${Ee},${Ee}\\)$`),s$=new RegExp(`^rgba\\(${pr},${pr},${pr},${hi}\\)$`),u$=new RegExp(`^rgba\\(${Ee},${Ee},${Ee},${hi}\\)$`),c$=new RegExp(`^hsl\\(${hi},${Ee},${Ee}\\)$`),l$=new RegExp(`^hsla\\(${hi},${Ee},${Ee},${hi}\\)$`),N0={aliceblue:15792383,antiquewhite:16444375,aqua:65535,aquamarine:8388564,azure:15794175,beige:16119260,bisque:16770244,black:0,blanchedalmond:16772045,blue:255,blueviolet:9055202,brown:10824234,burlywood:14596231,cadetblue:6266528,chartreuse:8388352,chocolate:13789470,coral:16744272,cornflowerblue:6591981,cornsilk:16775388,crimson:14423100,cyan:65535,darkblue:139,darkcyan:35723,darkgoldenrod:12092939,darkgray:11119017,darkgreen:25600,darkgrey:11119017,darkkhaki:12433259,darkmagenta:9109643,darkolivegreen:5597999,darkorange:16747520,darkorchid:10040012,darkred:9109504,darksalmon:15308410,darkseagreen:9419919,darkslateblue:4734347,darkslategray:3100495,darkslategrey:3100495,darkturquoise:52945,darkviolet:9699539,deeppink:16716947,deepskyblue:49151,dimgray:6908265,dimgrey:6908265,dodgerblue:2003199,firebrick:11674146,floralwhite:16775920,forestgreen:2263842,fuchsia:16711935,gainsboro:14474460,ghostwhite:16316671,gold:16766720,goldenrod:14329120,gray:8421504,green:32768,greenyellow:11403055,grey:8421504,honeydew:15794160,hotpink:16738740,indianred:13458524,indigo:4915330,ivory:16777200,khaki:15787660,lavender:15132410,lavenderblush:16773365,lawngreen:8190976,lemonchiffon:16775885,lightblue:11393254,lightcoral:15761536,lightcyan:14745599,lightgoldenrodyellow:16448210,lightgray:13882323,lightgreen:9498256,lightgrey:13882323,lightpink:16758465,lightsalmon:16752762,lightseagreen:2142890,lightskyblue:8900346,lightslategray:7833753,lightslategrey:7833753,lightsteelblue:11584734,lightyellow:16777184,lime:65280,limegreen:3329330,linen:16445670,magenta:16711935,maroon:8388608,mediumaquamarine:6737322,mediumblue:205,mediumorchid:12211667,mediumpurple:9662683,mediumseagreen:3978097,mediumslateblue:8087790,mediumspringgreen:64154,mediumturquoise:4772300,mediumvioletred:13047173,midnightblue:1644912,mintcream:16121850,mistyrose:16770273,moccasin:16770229,navajowhite:16768685,navy:128,oldlace:16643558,olive:8421376,olivedrab:7048739,orange:16753920,orangered:16729344,orchid:14315734,palegoldenrod:15657130,palegreen:10025880,paleturquoise:11529966,palevioletred:14381203,papayawhip:16773077,peachpuff:16767673,peru:13468991,pink:16761035,plum:14524637,powderblue:11591910,purple:8388736,rebeccapurple:6697881,red:16711680,rosybrown:12357519,royalblue:4286945,saddlebrown:9127187,salmon:16416882,sandybrown:16032864,seagreen:3050327,seashell:16774638,sienna:10506797,silver:12632256,skyblue:8900331,slateblue:6970061,slategray:7372944,slategrey:7372944,snow:16775930,springgreen:65407,steelblue:4620980,tan:13808780,teal:32896,thistle:14204888,tomato:16737095,turquoise:4251856,violet:15631086,wheat:16113331,white:16777215,whitesmoke:16119285,yellow:16776960,yellowgreen:10145074};qu(li,An,{copy(t){return Object.assign(new this.constructor,this,t)},displayable(){return this.rgb().displayable()},hex:F0,formatHex:F0,formatHex8:f$,formatHsl:h$,formatRgb:G0,toString:G0});function F0(){return this.rgb().formatHex()}function f$(){return this.rgb().formatHex8()}function h$(){return Y0(this).formatHsl()}function G0(){return this.rgb().formatRgb()}function An(t){var e,n;return t=(t+"").trim().toLowerCase(),(e=i$.exec(t))?(n=e[1].length,e=parseInt(e[1],16),n===6?z0(e):n===3?new ee(e>>8&15|e>>4&240,e>>4&15|e&240,(e&15)<<4|e&15,1):n===8?Wo(e>>24&255,e>>16&255,e>>8&255,(e&255)/255):n===4?Wo(e>>12&15|e>>8&240,e>>8&15|e>>4&240,e>>4&15|e&240,((e&15)<<4|e&15)/255):null):(e=o$.exec(t))?new ee(e[1],e[2],e[3],1):(e=a$.exec(t))?new ee(e[1]*255/100,e[2]*255/100,e[3]*255/100,1):(e=s$.exec(t))?Wo(e[1],e[2],e[3],e[4]):(e=u$.exec(t))?Wo(e[1]*255/100,e[2]*255/100,e[3]*255/100,e[4]):(e=c$.exec(t))?B0(e[1],e[2]/100,e[3]/100,1):(e=l$.exec(t))?B0(e[1],e[2]/100,e[3]/100,e[4]):N0.hasOwnProperty(t)?z0(N0[t]):t==="transparent"?new ee(NaN,NaN,NaN,0):null}function z0(t){return new ee(t>>16&255,t>>8&255,t&255,1)}function Wo(t,e,n,r){return r<=0&&(t=e=n=NaN),new ee(t,e,n,r)}function d$(t){return t instanceof li||(t=An(t)),t?(t=t.rgb(),new ee(t.r,t.g,t.b,t.opacity)):new ee}function Xu(t,e,n,r){return arguments.length===1?d$(t):new ee(t,e,n,r??1)}function ee(t,e,n,r){this.r=+t,this.g=+e,this.b=+n,this.opacity=+r}qu(ee,Xu,I0(li,{brighter(t){return t=t==null?Yo:Math.pow(Yo,t),new ee(this.r*t,this.g*t,this.b*t,this.opacity)},darker(t){return t=t==null?fi:Math.pow(fi,t),new ee(this.r*t,this.g*t,this.b*t,this.opacity)},rgb(){return this},clamp(){return new ee(Mn(this.r),Mn(this.g),Mn(this.b),Ho(this.opacity))},displayable(){return-.5<=this.r&&this.r<255.5&&-.5<=this.g&&this.g<255.5&&-.5<=this.b&&this.b<255.5&&0<=this.opacity&&this.opacity<=1},hex:O0,formatHex:O0,formatHex8:p$,formatRgb:U0,toString:U0}));function O0(){return`#${Tn(this.r)}${Tn(this.g)}${Tn(this.b)}`}function p$(){return`#${Tn(this.r)}${Tn(this.g)}${Tn(this.b)}${Tn((isNaN(this.opacity)?1:this.opacity)*255)}`}function U0(){const t=Ho(this.opacity);return`${t===1?"rgb(":"rgba("}${Mn(this.r)}, ${Mn(this.g)}, ${Mn(this.b)}${t===1?")":`, ${t})`}`}function Ho(t){return isNaN(t)?1:Math.max(0,Math.min(1,t))}function Mn(t){return Math.max(0,Math.min(255,Math.round(t)||0))}function Tn(t){return t=Mn(t),(t<16?"0":"")+t.toString(16)}function B0(t,e,n,r){return r<=0?t=e=n=NaN:n<=0||n>=1?t=e=NaN:e<=0&&(t=NaN),new ve(t,e,n,r)}function Y0(t){if(t instanceof ve)return new ve(t.h,t.s,t.l,t.opacity);if(t instanceof li||(t=An(t)),!t)return new ve;if(t instanceof ve)return t;t=t.rgb();var e=t.r/255,n=t.g/255,r=t.b/255,i=Math.min(e,n,r),o=Math.max(e,n,r),a=NaN,s=o-i,u=(o+i)/2;return s?(e===o?a=(n-r)/s+(n<r)*6:n===o?a=(r-e)/s+2:a=(e-n)/s+4,s/=u<.5?o+i:2-o-i,a*=60):s=u>0&&u<1?0:a,new ve(a,s,u,t.opacity)}function g$(t,e,n,r){return arguments.length===1?Y0(t):new ve(t,e,n,r??1)}function ve(t,e,n,r){this.h=+t,this.s=+e,this.l=+n,this.opacity=+r}qu(ve,g$,I0(li,{brighter(t){return t=t==null?Yo:Math.pow(Yo,t),new ve(this.h,this.s,this.l*t,this.opacity)},darker(t){return t=t==null?fi:Math.pow(fi,t),new ve(this.h,this.s,this.l*t,this.opacity)},rgb(){var t=this.h%360+(this.h<0)*360,e=isNaN(t)||isNaN(this.s)?0:this.s,n=this.l,r=n+(n<.5?n:1-n)*e,i=2*n-r;return new ee(Vu(t>=240?t-240:t+120,i,r),Vu(t,i,r),Vu(t<120?t+240:t-120,i,r),this.opacity)},clamp(){return new ve(W0(this.h),qo(this.s),qo(this.l),Ho(this.opacity))},displayable(){return(0<=this.s&&this.s<=1||isNaN(this.s))&&0<=this.l&&this.l<=1&&0<=this.opacity&&this.opacity<=1},formatHsl(){const t=Ho(this.opacity);return`${t===1?"hsl(":"hsla("}${W0(this.h)}, ${qo(this.s)*100}%, ${qo(this.l)*100}%${t===1?")":`, ${t})`}`}}));function W0(t){return t=(t||0)%360,t<0?t+360:t}function qo(t){return Math.max(0,Math.min(1,t||0))}function Vu(t,e,n){return(t<60?e+(n-e)*t/60:t<180?n:t<240?e+(n-e)*(240-t)/60:e)*255}const ju=t=>()=>t;function m$(t,e){return function(n){return t+n*e}}function y$(t,e,n){return t=Math.pow(t,n),e=Math.pow(e,n)-t,n=1/n,function(r){return Math.pow(t+r*e,n)}}function b$(t){return(t=+t)==1?H0:function(e,n){return n-e?y$(e,n,t):ju(isNaN(e)?n:e)}}function H0(t,e){var n=e-t;return n?m$(t,n):ju(isNaN(t)?e:t)}const Xo=function t(e){var n=b$(e);function r(i,o){var a=n((i=Xu(i)).r,(o=Xu(o)).r),s=n(i.g,o.g),u=n(i.b,o.b),c=H0(i.opacity,o.opacity);return function(l){return i.r=a(l),i.g=s(l),i.b=u(l),i.opacity=c(l),i+""}}return r.gamma=t,r}(1);function v$(t,e){e||(e=[]);var n=t?Math.min(e.length,t.length):0,r=e.slice(),i;return function(o){for(i=0;i<n;++i)r[i]=t[i]*(1-o)+e[i]*o;return r}}function x$(t){return ArrayBuffer.isView(t)&&!(t instanceof DataView)}function _$(t,e){var n=e?e.length:0,r=t?Math.min(n,t.length):0,i=new Array(r),o=new Array(n),a;for(a=0;a<r;++a)i[a]=Qu(t[a],e[a]);for(;a<n;++a)o[a]=e[a];return function(s){for(a=0;a<r;++a)o[a]=i[a](s);return o}}function w$(t,e){var n=new Date;return t=+t,e=+e,function(r){return n.setTime(t*(1-r)+e*r),n}}function xe(t,e){return t=+t,e=+e,function(n){return t*(1-n)+e*n}}function $$(t,e){var n={},r={},i;(t===null||typeof t!="object")&&(t={}),(e===null||typeof e!="object")&&(e={});for(i in e)i in t?n[i]=Qu(t[i],e[i]):r[i]=e[i];return function(o){for(i in n)r[i]=n[i](o);return r}}var Zu=/[-+]?(?:\d+\.?\d*|\.?\d+)(?:[eE][-+]?\d+)?/g,Ku=new RegExp(Zu.source,"g");function S$(t){return function(){return t}}function A$(t){return function(e){return t(e)+""}}function q0(t,e){var n=Zu.lastIndex=Ku.lastIndex=0,r,i,o,a=-1,s=[],u=[];for(t=t+"",e=e+"";(r=Zu.exec(t))&&(i=Ku.exec(e));)(o=i.index)>n&&(o=e.slice(n,o),s[a]?s[a]+=o:s[++a]=o),(r=r[0])===(i=i[0])?s[a]?s[a]+=i:s[++a]=i:(s[++a]=null,u.push({i:a,x:xe(r,i)})),n=Ku.lastIndex;return n<e.length&&(o=e.slice(n),s[a]?s[a]+=o:s[++a]=o),s.length<2?u[0]?A$(u[0].x):S$(e):(e=u.length,function(c){for(var l=0,h;l<e;++l)s[(h=u[l]).i]=h.x(c);return s.join("")})}function Qu(t,e){var n=typeof e,r;return e==null||n==="boolean"?ju(e):(n==="number"?xe:n==="string"?(r=An(e))?(e=r,Xo):q0:e instanceof An?Xo:e instanceof Date?w$:x$(e)?v$:Array.isArray(e)?_$:typeof e.valueOf!="function"&&typeof e.toString!="function"||isNaN(e)?$$:xe)(t,e)}function M$(t,e){return t=+t,e=+e,function(n){return Math.round(t*(1-n)+e*n)}}var X0=180/Math.PI,V0={translateX:0,translateY:0,rotate:0,skewX:0,scaleX:1,scaleY:1};function j0(t,e,n,r,i,o){var a,s,u;return(a=Math.sqrt(t*t+e*e))&&(t/=a,e/=a),(u=t*n+e*r)&&(n-=t*u,r-=e*u),(s=Math.sqrt(n*n+r*r))&&(n/=s,r/=s,u/=s),t*r<e*n&&(t=-t,e=-e,u=-u,a=-a),{translateX:i,translateY:o,rotate:Math.atan2(e,t)*X0,skewX:Math.atan(u)*X0,scaleX:a,scaleY:s}}var Vo;function T$(t){const e=new(typeof DOMMatrix=="function"?DOMMatrix:WebKitCSSMatrix)(t+"");return e.isIdentity?V0:j0(e.a,e.b,e.c,e.d,e.e,e.f)}function P$(t){return t==null||(Vo||(Vo=document.createElementNS("http://www.w3.org/2000/svg","g")),Vo.setAttribute("transform",t),!(t=Vo.transform.baseVal.consolidate()))?V0:(t=t.matrix,j0(t.a,t.b,t.c,t.d,t.e,t.f))}function Z0(t,e,n,r){function i(c){return c.length?c.pop()+" ":""}function o(c,l,h,f,d,p){if(c!==h||l!==f){var g=d.push("translate(",null,e,null,n);p.push({i:g-4,x:xe(c,h)},{i:g-2,x:xe(l,f)})}else(h||f)&&d.push("translate("+h+e+f+n)}function a(c,l,h,f){c!==l?(c-l>180?l+=360:l-c>180&&(c+=360),f.push({i:h.push(i(h)+"rotate(",null,r)-2,x:xe(c,l)})):l&&h.push(i(h)+"rotate("+l+r)}function s(c,l,h,f){c!==l?f.push({i:h.push(i(h)+"skewX(",null,r)-2,x:xe(c,l)}):l&&h.push(i(h)+"skewX("+l+r)}function u(c,l,h,f,d,p){if(c!==h||l!==f){var g=d.push(i(d)+"scale(",null,",",null,")");p.push({i:g-4,x:xe(c,h)},{i:g-2,x:xe(l,f)})}else(h!==1||f!==1)&&d.push(i(d)+"scale("+h+","+f+")")}return function(c,l){var h=[],f=[];return c=t(c),l=t(l),o(c.translateX,c.translateY,l.translateX,l.translateY,h,f),a(c.rotate,l.rotate,h,f),s(c.skewX,l.skewX,h,f),u(c.scaleX,c.scaleY,l.scaleX,l.scaleY,h,f),c=l=null,function(d){for(var p=-1,g=f.length,m;++p<g;)h[(m=f[p]).i]=m.x(d);return h.join("")}}}var D$=Z0(T$,"px, ","px)","deg)"),E$=Z0(P$,", ",")",")"),gr=0,di=0,pi=0,K0=1e3,jo,gi,Zo=0,Pn=0,Ko=0,mi=typeof performance=="object"&&performance.now?performance:Date,Q0=typeof window=="object"&&window.requestAnimationFrame?window.requestAnimationFrame.bind(window):function(t){setTimeout(t,17)};function Ju(){return Pn||(Q0(k$),Pn=mi.now()+Ko)}function k$(){Pn=0}function Qo(){this._call=this._time=this._next=null}Qo.prototype=J0.prototype={constructor:Qo,restart:function(t,e,n){if(typeof t!="function")throw new TypeError("callback is not a function");n=(n==null?Ju():+n)+(e==null?0:+e),!this._next&&gi!==this&&(gi?gi._next=this:jo=this,gi=this),this._call=t,this._time=n,tc()},stop:function(){this._call&&(this._call=null,this._time=1/0,tc())}};function J0(t,e,n){var r=new Qo;return r.restart(t,e,n),r}function L$(){Ju(),++gr;for(var t=jo,e;t;)(e=Pn-t._time)>=0&&t._call.call(void 0,e),t=t._next;--gr}function td(){Pn=(Zo=mi.now())+Ko,gr=di=0;try{L$()}finally{gr=0,R$(),Pn=0}}function C$(){var t=mi.now(),e=t-Zo;e>K0&&(Ko-=e,Zo=t)}function R$(){for(var t,e=jo,n,r=1/0;e;)e._call?(r>e._time&&(r=e._time),t=e,e=e._next):(n=e._next,e._next=null,e=t?t._next=n:jo=n);gi=t,tc(r)}function tc(t){if(!gr){di&&(di=clearTimeout(di));var e=t-Pn;e>24?(t<1/0&&(di=setTimeout(td,t-mi.now()-Ko)),pi&&(pi=clearInterval(pi))):(pi||(Zo=mi.now(),pi=setInterval(C$,K0)),gr=1,Q0(td))}}function ed(t,e,n){var r=new Qo;return e=e==null?0:+e,r.restart(i=>{r.stop(),t(i+e)},e,n),r}var I$=_0("start","end","cancel","interrupt"),N$=[],nd=0,rd=1,ec=2,Jo=3,id=4,nc=5,ta=6;function ea(t,e,n,r,i,o){var a=t.__transition;if(!a)t.__transition={};else if(n in a)return;F$(t,n,{name:e,index:r,group:i,on:I$,tween:N$,time:o.time,delay:o.delay,duration:o.duration,ease:o.ease,timer:null,state:nd})}function rc(t,e){var n=_e(t,e);if(n.state>nd)throw new Error("too late; already scheduled");return n}function ke(t,e){var n=_e(t,e);if(n.state>Jo)throw new Error("too late; already running");return n}function _e(t,e){var n=t.__transition;if(!n||!(n=n[e]))throw new Error("transition not found");return n}function F$(t,e,n){var r=t.__transition,i;r[e]=n,n.timer=J0(o,0,n.time);function o(c){n.state=rd,n.timer.restart(a,n.delay,n.time),n.delay<=c&&a(c-n.delay)}function a(c){var l,h,f,d;if(n.state!==rd)return u();for(l in r)if(d=r[l],d.name===n.name){if(d.state===Jo)return ed(a);d.state===id?(d.state=ta,d.timer.stop(),d.on.call("interrupt",t,t.__data__,d.index,d.group),delete r[l]):+l<e&&(d.state=ta,d.timer.stop(),d.on.call("cancel",t,t.__data__,d.index,d.group),delete r[l])}if(ed(function(){n.state===Jo&&(n.state=id,n.timer.restart(s,n.delay,n.time),s(c))}),n.state=ec,n.on.call("start",t,t.__data__,n.index,n.group),n.state===ec){for(n.state=Jo,i=new Array(f=n.tween.length),l=0,h=-1;l<f;++l)(d=n.tween[l].value.call(t,t.__data__,n.index,n.group))&&(i[++h]=d);i.length=h+1}}function s(c){for(var l=c<n.duration?n.ease.call(null,c/n.duration):(n.timer.restart(u),n.state=nc,1),h=-1,f=i.length;++h<f;)i[h].call(t,l);n.state===nc&&(n.on.call("end",t,t.__data__,n.index,n.group),u())}function u(){n.state=ta,n.timer.stop(),delete r[e];for(var c in r)return;delete t.__transition}}function G$(t,e){var n=t.__transition,r,i,o=!0,a;if(n){e=e==null?null:e+"";for(a in n){if((r=n[a]).name!==e){o=!1;continue}i=r.state>ec&&r.state<nc,r.state=ta,r.timer.stop(),r.on.call(i?"interrupt":"cancel",t,t.__data__,r.index,r.group),delete n[a]}o&&delete t.__transition}}function z$(t){return this.each(function(){G$(this,t)})}function O$(t,e){var n,r;return function(){var i=ke(this,t),o=i.tween;if(o!==n){r=n=o;for(var a=0,s=r.length;a<s;++a)if(r[a].name===e){r=r.slice(),r.splice(a,1);break}}i.tween=r}}function U$(t,e,n){var r,i;if(typeof n!="function")throw new Error;return function(){var o=ke(this,t),a=o.tween;if(a!==r){i=(r=a).slice();for(var s={name:e,value:n},u=0,c=i.length;u<c;++u)if(i[u].name===e){i[u]=s;break}u===c&&i.push(s)}o.tween=i}}function B$(t,e){var n=this._id;if(t+="",arguments.length<2){for(var r=_e(this.node(),n).tween,i=0,o=r.length,a;i<o;++i)if((a=r[i]).name===t)return a.value;return null}return this.each((e==null?O$:U$)(n,t,e))}function ic(t,e,n){var r=t._id;return t.each(function(){var i=ke(this,r);(i.value||(i.value={}))[e]=n.apply(this,arguments)}),function(i){return _e(i,r).value[e]}}function od(t,e){var n;return(typeof e=="number"?xe:e instanceof An?Xo:(n=An(e))?(e=n,Xo):q0)(t,e)}function Y$(t){return function(){this.removeAttribute(t)}}function W$(t){return function(){this.removeAttributeNS(t.space,t.local)}}function H$(t,e,n){var r,i=n+"",o;return function(){var a=this.getAttribute(t);return a===i?null:a===r?o:o=e(r=a,n)}}function q$(t,e,n){var r,i=n+"",o;return function(){var a=this.getAttributeNS(t.space,t.local);return a===i?null:a===r?o:o=e(r=a,n)}}function X$(t,e,n){var r,i,o;return function(){var a,s=n(this),u;return s==null?void this.removeAttribute(t):(a=this.getAttribute(t),u=s+"",a===u?null:a===r&&u===i?o:(i=u,o=e(r=a,s)))}}function V$(t,e,n){var r,i,o;return function(){var a,s=n(this),u;return s==null?void this.removeAttributeNS(t.space,t.local):(a=this.getAttributeNS(t.space,t.local),u=s+"",a===u?null:a===r&&u===i?o:(i=u,o=e(r=a,s)))}}function j$(t,e){var n=Uo(t),r=n==="transform"?E$:od;return this.attrTween(t,typeof e=="function"?(n.local?V$:X$)(n,r,ic(this,"attr."+t,e)):e==null?(n.local?W$:Y$)(n):(n.local?q$:H$)(n,r,e))}function Z$(t,e){return function(n){this.setAttribute(t,e.call(this,n))}}function K$(t,e){return function(n){this.setAttributeNS(t.space,t.local,e.call(this,n))}}function Q$(t,e){var n,r;function i(){var o=e.apply(this,arguments);return o!==r&&(n=(r=o)&&K$(t,o)),n}return i._value=e,i}function J$(t,e){var n,r;function i(){var o=e.apply(this,arguments);return o!==r&&(n=(r=o)&&Z$(t,o)),n}return i._value=e,i}function t3(t,e){var n="attr."+t;if(arguments.length<2)return(n=this.tween(n))&&n._value;if(e==null)return this.tween(n,null);if(typeof e!="function")throw new Error;var r=Uo(t);return this.tween(n,(r.local?Q$:J$)(r,e))}function e3(t,e){return function(){rc(this,t).delay=+e.apply(this,arguments)}}function n3(t,e){return e=+e,function(){rc(this,t).delay=e}}function r3(t){var e=this._id;return arguments.length?this.each((typeof t=="function"?e3:n3)(e,t)):_e(this.node(),e).delay}function i3(t,e){return function(){ke(this,t).duration=+e.apply(this,arguments)}}function o3(t,e){return e=+e,function(){ke(this,t).duration=e}}function a3(t){var e=this._id;return arguments.length?this.each((typeof t=="function"?i3:o3)(e,t)):_e(this.node(),e).duration}function s3(t,e){if(typeof e!="function")throw new Error;return function(){ke(this,t).ease=e}}function u3(t){var e=this._id;return arguments.length?this.each(s3(e,t)):_e(this.node(),e).ease}function c3(t,e){return function(){var n=e.apply(this,arguments);if(typeof n!="function")throw new Error;ke(this,t).ease=n}}function l3(t){if(typeof t!="function")throw new Error;return this.each(c3(this._id,t))}function f3(t){typeof t!="function"&&(t=M0(t));for(var e=this._groups,n=e.length,r=new Array(n),i=0;i<n;++i)for(var o=e[i],a=o.length,s=r[i]=[],u,c=0;c<a;++c)(u=o[c])&&t.call(u,u.__data__,c,o)&&s.push(u);return new We(r,this._parents,this._name,this._id)}function h3(t){if(t._id!==this._id)throw new Error;for(var e=this._groups,n=t._groups,r=e.length,i=n.length,o=Math.min(r,i),a=new Array(r),s=0;s<o;++s)for(var u=e[s],c=n[s],l=u.length,h=a[s]=new Array(l),f,d=0;d<l;++d)(f=u[d]||c[d])&&(h[d]=f);for(;s<r;++s)a[s]=e[s];return new We(a,this._parents,this._name,this._id)}function d3(t){return(t+"").trim().split(/^|\s+/).every(function(e){var n=e.indexOf(".");return n>=0&&(e=e.slice(0,n)),!e||e==="start"})}function p3(t,e,n){var r,i,o=d3(e)?rc:ke;return function(){var a=o(this,t),s=a.on;s!==r&&(i=(r=s).copy()).on(e,n),a.on=i}}function g3(t,e){var n=this._id;return arguments.length<2?_e(this.node(),n).on.on(t):this.each(p3(n,t,e))}function m3(t){return function(){var e=this.parentNode;for(var n in this.__transition)if(+n!==t)return;e&&e.removeChild(this)}}function y3(){return this.on("end.remove",m3(this._id))}function b3(t){var e=this._name,n=this._id;typeof t!="function"&&(t=Wu(t));for(var r=this._groups,i=r.length,o=new Array(i),a=0;a<i;++a)for(var s=r[a],u=s.length,c=o[a]=new Array(u),l,h,f=0;f<u;++f)(l=s[f])&&(h=t.call(l,l.__data__,f,s))&&("__data__"in l&&(h.__data__=l.__data__),c[f]=h,ea(c[f],e,n,f,c,_e(l,n)));return new We(o,this._parents,e,n)}function v3(t){var e=this._name,n=this._id;typeof t!="function"&&(t=A0(t));for(var r=this._groups,i=r.length,o=[],a=[],s=0;s<i;++s)for(var u=r[s],c=u.length,l,h=0;h<c;++h)if(l=u[h]){for(var f=t.call(l,l.__data__,h,u),d,p=_e(l,n),g=0,m=f.length;g<m;++g)(d=f[g])&&ea(d,e,n,g,f,p);o.push(f),a.push(l)}return new We(o,a,e,n)}var x3=ci.prototype.constructor;function _3(){return new x3(this._groups,this._parents)}function w3(t,e){var n,r,i;return function(){var o=dr(this,t),a=(this.style.removeProperty(t),dr(this,t));return o===a?null:o===n&&a===r?i:i=e(n=o,r=a)}}function ad(t){return function(){this.style.removeProperty(t)}}function $3(t,e,n){var r,i=n+"",o;return function(){var a=dr(this,t);return a===i?null:a===r?o:o=e(r=a,n)}}function S3(t,e,n){var r,i,o;return function(){var a=dr(this,t),s=n(this),u=s+"";return s==null&&(u=s=(this.style.removeProperty(t),dr(this,t))),a===u?null:a===r&&u===i?o:(i=u,o=e(r=a,s))}}function A3(t,e){var n,r,i,o="style."+e,a="end."+o,s;return function(){var u=ke(this,t),c=u.on,l=u.value[o]==null?s||(s=ad(e)):void 0;(c!==n||i!==l)&&(r=(n=c).copy()).on(a,i=l),u.on=r}}function M3(t,e,n){var r=(t+="")=="transform"?D$:od;return e==null?this.styleTween(t,w3(t,r)).on("end.style."+t,ad(t)):typeof e=="function"?this.styleTween(t,S3(t,r,ic(this,"style."+t,e))).each(A3(this._id,t)):this.styleTween(t,$3(t,r,e),n).on("end.style."+t,null)}function T3(t,e,n){return function(r){this.style.setProperty(t,e.call(this,r),n)}}function P3(t,e,n){var r,i;function o(){var a=e.apply(this,arguments);return a!==i&&(r=(i=a)&&T3(t,a,n)),r}return o._value=e,o}function D3(t,e,n){var r="style."+(t+="");if(arguments.length<2)return(r=this.tween(r))&&r._value;if(e==null)return this.tween(r,null);if(typeof e!="function")throw new Error;return this.tween(r,P3(t,e,n??""))}function E3(t){return function(){this.textContent=t}}function k3(t){return function(){var e=t(this);this.textContent=e??""}}function L3(t){return this.tween("text",typeof t=="function"?k3(ic(this,"text",t)):E3(t==null?"":t+""))}function C3(t){return function(e){this.textContent=t.call(this,e)}}function R3(t){var e,n;function r(){var i=t.apply(this,arguments);return i!==n&&(e=(n=i)&&C3(i)),e}return r._value=t,r}function I3(t){var e="text";if(arguments.length<1)return(e=this.tween(e))&&e._value;if(t==null)return this.tween(e,null);if(typeof t!="function")throw new Error;return this.tween(e,R3(t))}function N3(){for(var t=this._name,e=this._id,n=sd(),r=this._groups,i=r.length,o=0;o<i;++o)for(var a=r[o],s=a.length,u,c=0;c<s;++c)if(u=a[c]){var l=_e(u,e);ea(u,t,n,c,a,{time:l.time+l.delay+l.duration,delay:0,duration:l.duration,ease:l.ease})}return new We(r,this._parents,t,n)}function F3(){var t,e,n=this,r=n._id,i=n.size();return new Promise(function(o,a){var s={value:a},u={value:function(){--i===0&&o()}};n.each(function(){var c=ke(this,r),l=c.on;l!==t&&(e=(t=l).copy(),e._.cancel.push(s),e._.interrupt.push(s),e._.end.push(u)),c.on=e}),i===0&&o()})}var G3=0;function We(t,e,n,r){this._groups=t,this._parents=e,this._name=n,this._id=r}function sd(){return++G3}var He=ci.prototype;We.prototype={constructor:We,select:b3,selectAll:v3,selectChild:He.selectChild,selectChildren:He.selectChildren,filter:f3,merge:h3,selection:_3,transition:N3,call:He.call,nodes:He.nodes,node:He.node,size:He.size,empty:He.empty,each:He.each,on:g3,attr:j$,attrTween:t3,style:M3,styleTween:D3,text:L3,textTween:I3,remove:y3,tween:B$,delay:r3,duration:a3,ease:u3,easeVarying:l3,end:F3,[Symbol.iterator]:He[Symbol.iterator]};function z3(t){return((t*=2)<=1?t*t*t:(t-=2)*t*t+2)/2}var O3={time:null,delay:0,duration:250,ease:z3};function U3(t,e){for(var n;!(n=t.__transition)||!(n=n[e]);)if(!(t=t.parentNode))throw new Error(`transition ${e} not found`);return n}function B3(t){var e,n;t instanceof We?(e=t._id,t=t._name):(e=sd(),(n=O3).time=Ju(),t=t==null?null:t+"");for(var r=this._groups,i=r.length,o=0;o<i;++o)for(var a=r[o],s=a.length,u,c=0;c<s;++c)(u=a[c])&&ea(u,t,e,c,a,n||U3(u,e));return new We(r,this._parents,t,e)}ci.prototype.interrupt=z$,ci.prototype.transition=B3;function Y3(t){return Math.abs(t=Math.round(t))>=1e21?t.toLocaleString("en").replace(/,/g,""):t.toString(10)}function na(t,e){if((n=(t=e?t.toExponential(e-1):t.toExponential()).indexOf("e"))<0)return null;var n,r=t.slice(0,n);return[r.length>1?r[0]+r.slice(2):r,+t.slice(n+1)]}function mr(t){return t=na(Math.abs(t)),t?t[1]:NaN}function W3(t,e){return function(n,r){for(var i=n.length,o=[],a=0,s=t[0],u=0;i>0&&s>0&&(u+s+1>r&&(s=Math.max(1,r-u)),o.push(n.substring(i-=s,i+s)),!((u+=s+1)>r));)s=t[a=(a+1)%t.length];return o.reverse().join(e)}}function H3(t){return function(e){return e.replace(/[0-9]/g,function(n){return t[+n]})}}var q3=/^(?:(.)?([<>=^]))?([+\-( ])?([$#])?(0)?(\d+)?(,)?(\.\d+)?(~)?([a-z%])?$/i;function ra(t){if(!(e=q3.exec(t)))throw new Error("invalid format: "+t);var e;return new oc({fill:e[1],align:e[2],sign:e[3],symbol:e[4],zero:e[5],width:e[6],comma:e[7],precision:e[8]&&e[8].slice(1),trim:e[9],type:e[10]})}ra.prototype=oc.prototype;function oc(t){this.fill=t.fill===void 0?" ":t.fill+"",this.align=t.align===void 0?">":t.align+"",this.sign=t.sign===void 0?"-":t.sign+"",this.symbol=t.symbol===void 0?"":t.symbol+"",this.zero=!!t.zero,this.width=t.width===void 0?void 0:+t.width,this.comma=!!t.comma,this.precision=t.precision===void 0?void 0:+t.precision,this.trim=!!t.trim,this.type=t.type===void 0?"":t.type+""}oc.prototype.toString=function(){return this.fill+this.align+this.sign+this.symbol+(this.zero?"0":"")+(this.width===void 0?"":Math.max(1,this.width|0))+(this.comma?",":"")+(this.precision===void 0?"":"."+Math.max(0,this.precision|0))+(this.trim?"~":"")+this.type};function X3(t){t:for(var e=t.length,n=1,r=-1,i;n<e;++n)switch(t[n]){case".":r=i=n;break;case"0":r===0&&(r=n),i=n;break;default:if(!+t[n])break t;r>0&&(r=0);break}return r>0?t.slice(0,r)+t.slice(i+1):t}var ud;function V3(t,e){var n=na(t,e);if(!n)return t+"";var r=n[0],i=n[1],o=i-(ud=Math.max(-8,Math.min(8,Math.floor(i/3)))*3)+1,a=r.length;return o===a?r:o>a?r+new Array(o-a+1).join("0"):o>0?r.slice(0,o)+"."+r.slice(o):"0."+new Array(1-o).join("0")+na(t,Math.max(0,e+o-1))[0]}function cd(t,e){var n=na(t,e);if(!n)return t+"";var r=n[0],i=n[1];return i<0?"0."+new Array(-i).join("0")+r:r.length>i+1?r.slice(0,i+1)+"."+r.slice(i+1):r+new Array(i-r.length+2).join("0")}const ld={"%":(t,e)=>(t*100).toFixed(e),b:t=>Math.round(t).toString(2),c:t=>t+"",d:Y3,e:(t,e)=>t.toExponential(e),f:(t,e)=>t.toFixed(e),g:(t,e)=>t.toPrecision(e),o:t=>Math.round(t).toString(8),p:(t,e)=>cd(t*100,e),r:cd,s:V3,X:t=>Math.round(t).toString(16).toUpperCase(),x:t=>Math.round(t).toString(16)};function fd(t){return t}var hd=Array.prototype.map,dd=["y","z","a","f","p","n","µ","m","","k","M","G","T","P","E","Z","Y"];function j3(t){var e=t.grouping===void 0||t.thousands===void 0?fd:W3(hd.call(t.grouping,Number),t.thousands+""),n=t.currency===void 0?"":t.currency[0]+"",r=t.currency===void 0?"":t.currency[1]+"",i=t.decimal===void 0?".":t.decimal+"",o=t.numerals===void 0?fd:H3(hd.call(t.numerals,String)),a=t.percent===void 0?"%":t.percent+"",s=t.minus===void 0?"−":t.minus+"",u=t.nan===void 0?"NaN":t.nan+"";function c(h){h=ra(h);var f=h.fill,d=h.align,p=h.sign,g=h.symbol,m=h.zero,y=h.width,x=h.comma,v=h.precision,b=h.trim,$=h.type;$==="n"?(x=!0,$="g"):ld[$]||(v===void 0&&(v=12),b=!0,$="g"),(m||f==="0"&&d==="=")&&(m=!0,f="0",d="=");var w=g==="$"?n:g==="#"&&/[boxX]/.test($)?"0"+$.toLowerCase():"",S=g==="$"?r:/[%p]/.test($)?a:"",_=ld[$],P=/[defgprs%]/.test($);v=v===void 0?6:/[gprs]/.test($)?Math.max(1,Math.min(21,v)):Math.max(0,Math.min(20,v));function D(A){var I=w,M=S,T,k,E;if($==="c")M=_(A)+M,A="";else{A=+A;var N=A<0||1/A<0;if(A=isNaN(A)?u:_(Math.abs(A),v),b&&(A=X3(A)),N&&+A==0&&p!=="+"&&(N=!1),I=(N?p==="("?p:s:p==="-"||p==="("?"":p)+I,M=($==="s"?dd[8+ud/3]:"")+M+(N&&p==="("?")":""),P){for(T=-1,k=A.length;++T<k;)if(E=A.charCodeAt(T),48>E||E>57){M=(E===46?i+A.slice(T+1):A.slice(T))+M,A=A.slice(0,T);break}}}x&&!m&&(A=e(A,1/0));var O=I.length+A.length+M.length,L=O<y?new Array(y-O+1).join(f):"";switch(x&&m&&(A=e(L+A,L.length?y-M.length:1/0),L=""),d){case"<":A=I+A+M+L;break;case"=":A=I+L+A+M;break;case"^":A=L.slice(0,O=L.length>>1)+I+A+M+L.slice(O);break;default:A=L+I+A+M;break}return o(A)}return D.toString=function(){return h+""},D}function l(h,f){var d=c((h=ra(h),h.type="f",h)),p=Math.max(-8,Math.min(8,Math.floor(mr(f)/3)))*3,g=Math.pow(10,-p),m=dd[8+p/3];return function(y){return d(g*y)+m}}return{format:c,formatPrefix:l}}var ia,pd,gd;Z3({thousands:",",grouping:[3],currency:["$",""]});function Z3(t){return ia=j3(t),pd=ia.format,gd=ia.formatPrefix,ia}function K3(t){return Math.max(0,-mr(Math.abs(t)))}function Q3(t,e){return Math.max(0,Math.max(-8,Math.min(8,Math.floor(mr(e)/3)))*3-mr(Math.abs(t)))}function J3(t,e){return t=Math.abs(t),e=Math.abs(e)-t,Math.max(0,mr(e)-mr(t))+1}function oa(t,e){switch(arguments.length){case 0:break;case 1:this.range(t);break;default:this.range(e).domain(t);break}return this}const md=Symbol("implicit");function yd(){var t=new v0,e=[],n=[],r=md;function i(o){let a=t.get(o);if(a===void 0){if(r!==md)return r;t.set(o,a=e.push(o)-1)}return n[a%n.length]}return i.domain=function(o){if(!arguments.length)return e.slice();e=[],t=new v0;for(const a of o)t.has(a)||t.set(a,e.push(a)-1);return i},i.range=function(o){return arguments.length?(n=Array.from(o),i):n.slice()},i.unknown=function(o){return arguments.length?(r=o,i):r},i.copy=function(){return yd(e,n).unknown(r)},oa.apply(i,arguments),i}function bd(){var t=yd().unknown(void 0),e=t.domain,n=t.range,r=0,i=1,o,a,s=!1,u=0,c=0,l=.5;delete t.unknown;function h(){var f=e().length,d=i<r,p=d?i:r,g=d?r:i;o=(g-p)/Math.max(1,f-u+c*2),s&&(o=Math.floor(o)),p+=(g-p-o*(f-u))*l,a=o*(1-u),s&&(p=Math.round(p),a=Math.round(a));var m=__(f).map(function(y){return p+o*y});return n(d?m.reverse():m)}return t.domain=function(f){return arguments.length?(e(f),h()):e()},t.range=function(f){return arguments.length?([r,i]=f,r=+r,i=+i,h()):[r,i]},t.rangeRound=function(f){return[r,i]=f,r=+r,i=+i,s=!0,h()},t.bandwidth=function(){return a},t.step=function(){return o},t.round=function(f){return arguments.length?(s=!!f,h()):s},t.padding=function(f){return arguments.length?(u=Math.min(1,c=+f),h()):u},t.paddingInner=function(f){return arguments.length?(u=Math.min(1,f),h()):u},t.paddingOuter=function(f){return arguments.length?(c=+f,h()):c},t.align=function(f){return arguments.length?(l=Math.max(0,Math.min(1,f)),h()):l},t.copy=function(){return bd(e(),[r,i]).round(s).paddingInner(u).paddingOuter(c).align(l)},oa.apply(h(),arguments)}function vd(t){var e=t.copy;return t.padding=t.paddingOuter,delete t.paddingInner,delete t.paddingOuter,t.copy=function(){return vd(e())},t}function tS(){return vd(bd.apply(null,arguments).paddingInner(1))}function eS(t){return function(){return t}}function nS(t){return+t}var xd=[0,1];function yr(t){return t}function ac(t,e){return(e-=t=+t)?function(n){return(n-t)/e}:eS(isNaN(e)?NaN:.5)}function rS(t,e){var n;return t>e&&(n=t,t=e,e=n),function(r){return Math.max(t,Math.min(e,r))}}function iS(t,e,n){var r=t[0],i=t[1],o=e[0],a=e[1];return i<r?(r=ac(i,r),o=n(a,o)):(r=ac(r,i),o=n(o,a)),function(s){return o(r(s))}}function oS(t,e,n){var r=Math.min(t.length,e.length)-1,i=new Array(r),o=new Array(r),a=-1;for(t[r]<t[0]&&(t=t.slice().reverse(),e=e.slice().reverse());++a<r;)i[a]=ac(t[a],t[a+1]),o[a]=n(e[a],e[a+1]);return function(s){var u=b0(t,s,1,r)-1;return o[u](i[u](s))}}function aS(t,e){return e.domain(t.domain()).range(t.range()).interpolate(t.interpolate()).clamp(t.clamp()).unknown(t.unknown())}function sS(){var t=xd,e=xd,n=Qu,r,i,o,a=yr,s,u,c;function l(){var f=Math.min(t.length,e.length);return a!==yr&&(a=rS(t[0],t[f-1])),s=f>2?oS:iS,u=c=null,h}function h(f){return f==null||isNaN(f=+f)?o:(u||(u=s(t.map(r),e,n)))(r(a(f)))}return h.invert=function(f){return a(i((c||(c=s(e,t.map(r),xe)))(f)))},h.domain=function(f){return arguments.length?(t=Array.from(f,nS),l()):t.slice()},h.range=function(f){return arguments.length?(e=Array.from(f),l()):e.slice()},h.rangeRound=function(f){return e=Array.from(f),n=M$,l()},h.clamp=function(f){return arguments.length?(a=f?!0:yr,l()):a!==yr},h.interpolate=function(f){return arguments.length?(n=f,l()):n},h.unknown=function(f){return arguments.length?(o=f,h):o},function(f,d){return r=f,i=d,l()}}function uS(){return sS()(yr,yr)}function cS(t,e,n,r){var i=x_(t,e,n),o;switch(r=ra(r??",f"),r.type){case"s":{var a=Math.max(Math.abs(t),Math.abs(e));return r.precision==null&&!isNaN(o=Q3(i,a))&&(r.precision=o),gd(r,a)}case"":case"e":case"g":case"p":case"r":{r.precision==null&&!isNaN(o=J3(i,Math.max(Math.abs(t),Math.abs(e))))&&(r.precision=o-(r.type==="e"));break}case"f":case"%":{r.precision==null&&!isNaN(o=K3(i))&&(r.precision=o-(r.type==="%")*2);break}}return pd(r)}function _d(t){var e=t.domain;return t.ticks=function(n){var r=e();return v_(r[0],r[r.length-1],n??10)},t.tickFormat=function(n,r){var i=e();return cS(i[0],i[i.length-1],n??10,r)},t.nice=function(n){n==null&&(n=10);var r=e(),i=0,o=r.length-1,a=r[i],s=r[o],u,c,l=10;for(s<a&&(c=a,a=s,s=c,c=i,i=o,o=c);l-- >0;){if(c=Bu(a,s,n),c===u)return r[i]=a,r[o]=s,e(r);if(c>0)a=Math.floor(a/c)*c,s=Math.ceil(s/c)*c;else if(c<0)a=Math.ceil(a*c)/c,s=Math.floor(s*c)/c;else break;u=c}return t},t}function wd(){var t=uS();return t.copy=function(){return aS(t,wd())},oa.apply(t,arguments),_d(t)}function $d(){var t=0,e=1,n=1,r=[.5],i=[0,1],o;function a(u){return u!=null&&u<=u?i[b0(r,u,0,n)]:o}function s(){var u=-1;for(r=new Array(n);++u<n;)r[u]=((u+1)*e-(u-n)*t)/(n+1);return a}return a.domain=function(u){return arguments.length?([t,e]=u,t=+t,e=+e,s()):[t,e]},a.range=function(u){return arguments.length?(n=(i=Array.from(u)).length-1,s()):i.slice()},a.invertExtent=function(u){var c=i.indexOf(u);return c<0?[NaN,NaN]:c<1?[t,r[0]]:c>=n?[r[n-1],e]:[r[c-1],r[c]]},a.unknown=function(u){return arguments.length&&(o=u),a},a.thresholds=function(){return r.slice()},a.copy=function(){return $d().domain([t,e]).range(i).unknown(o)},oa.apply(_d(a),arguments)}function yi(t,e,n){this.k=t,this.x=e,this.y=n}yi.prototype={constructor:yi,scale:function(t){return t===1?this:new yi(this.k*t,this.x,this.y)},translate:function(t,e){return t===0&e===0?this:new yi(this.k,this.x+this.k*t,this.y+this.k*e)},apply:function(t){return[t[0]*this.k+this.x,t[1]*this.k+this.y]},applyX:function(t){return t*this.k+this.x},applyY:function(t){return t*this.k+this.y},invert:function(t){return[(t[0]-this.x)/this.k,(t[1]-this.y)/this.k]},invertX:function(t){return(t-this.x)/this.k},invertY:function(t){return(t-this.y)/this.k},rescaleX:function(t){return t.copy().domain(t.range().map(this.invertX,this).map(t.invert,t))},rescaleY:function(t){return t.copy().domain(t.range().map(this.invertY,this).map(t.invert,t))},toString:function(){return"translate("+this.x+","+this.y+") scale("+this.k+")"}},yi.prototype;function aa(t){return Object.prototype.toString.call(t)==="[object Object]"}function sc(t,e){if(aa(t)===!1||aa(e)===!1)return Object.assign({},e);const n=(r,i)=>{const o=Object.assign({},i);for(let a of Object.keys(r)){if(!(a in i))continue;let s;aa(r[a])&&aa(i[a])?(s=n(r[a],i[a]),o[a]=s):o[a]=r[a]}return o};return n(t,e)}var uc=function(t,e){return uc=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(n,r){n.__proto__=r}||function(n,r){for(var i in r)Object.prototype.hasOwnProperty.call(r,i)&&(n[i]=r[i])},uc(t,e)};function qe(t,e){if(typeof e!="function"&&e!==null)throw new TypeError("Class extends value "+String(e)+" is not a constructor or null");uc(t,e);function n(){this.constructor=t}t.prototype=e===null?Object.create(e):(n.prototype=e.prototype,new n)}function lS(t,e,n,r){function i(o){return o instanceof n?o:new n(function(a){a(o)})}return new(n||(n=Promise))(function(o,a){function s(l){try{c(r.next(l))}catch(h){a(h)}}function u(l){try{c(r.throw(l))}catch(h){a(h)}}function c(l){l.done?o(l.value):i(l.value).then(s,u)}c((r=r.apply(t,[])).next())})}function Sd(t,e){var n={label:0,sent:function(){if(o[0]&1)throw o[1];return o[1]},trys:[],ops:[]},r,i,o,a;return a={next:s(0),throw:s(1),return:s(2)},typeof Symbol=="function"&&(a[Symbol.iterator]=function(){return this}),a;function s(c){return function(l){return u([c,l])}}function u(c){if(r)throw new TypeError("Generator is already executing.");for(;a&&(a=0,c[0]&&(n=0)),n;)try{if(r=1,i&&(o=c[0]&2?i.return:c[0]?i.throw||((o=i.return)&&o.call(i),0):i.next)&&!(o=o.call(i,c[1])).done)return o;switch(i=0,o&&(c=[c[0]&2,o.value]),c[0]){case 0:case 1:o=c;break;case 4:return n.label++,{value:c[1],done:!1};case 5:n.label++,i=c[1],c=[0];continue;case 7:c=n.ops.pop(),n.trys.pop();continue;default:if(o=n.trys,!(o=o.length>0&&o[o.length-1])&&(c[0]===6||c[0]===2)){n=0;continue}if(c[0]===3&&(!o||c[1]>o[0]&&c[1]<o[3])){n.label=c[1];break}if(c[0]===6&&n.label<o[1]){n.label=o[1],o=c;break}if(o&&n.label<o[2]){n.label=o[2],n.ops.push(c);break}o[2]&&n.ops.pop(),n.trys.pop();continue}c=e.call(t,n)}catch(l){c=[6,l],i=0}finally{r=o=0}if(c[0]&5)throw c[1];return{value:c[0]?c[1]:void 0,done:!0}}}function br(t){var e=typeof Symbol=="function"&&Symbol.iterator,n=e&&t[e],r=0;if(n)return n.call(t);if(t&&typeof t.length=="number")return{next:function(){return t&&r>=t.length&&(t=void 0),{value:t&&t[r++],done:!t}}};throw new TypeError(e?"Object is not iterable.":"Symbol.iterator is not defined.")}function bi(t,e){var n=typeof Symbol=="function"&&t[Symbol.iterator];if(!n)return t;var r=n.call(t),i,o=[],a;try{for(;(e===void 0||e-- >0)&&!(i=r.next()).done;)o.push(i.value)}catch(s){a={error:s}}finally{try{i&&!i.done&&(n=r.return)&&n.call(r)}finally{if(a)throw a.error}}return o}function vi(t,e,n){if(arguments.length===2)for(var r=0,i=e.length,o;r<i;r++)(o||!(r in e))&&(o||(o=Array.prototype.slice.call(e,0,r)),o[r]=e[r]);return t.concat(o||Array.prototype.slice.call(e))}function vr(t){return this instanceof vr?(this.v=t,this):new vr(t)}function fS(t,e,n){if(!Symbol.asyncIterator)throw new TypeError("Symbol.asyncIterator is not defined.");var r=n.apply(t,e||[]),i,o=[];return i={},s("next"),s("throw"),s("return",a),i[Symbol.asyncIterator]=function(){return this},i;function a(d){return function(p){return Promise.resolve(p).then(d,h)}}function s(d,p){r[d]&&(i[d]=function(g){return new Promise(function(m,y){o.push([d,g,m,y])>1||u(d,g)})},p&&(i[d]=p(i[d])))}function u(d,p){try{c(r[d](p))}catch(g){f(o[0][3],g)}}function c(d){d.value instanceof vr?Promise.resolve(d.value.v).then(l,h):f(o[0][2],d)}function l(d){u("next",d)}function h(d){u("throw",d)}function f(d,p){d(p),o.shift(),o.length&&u(o[0][0],o[0][1])}}function hS(t){if(!Symbol.asyncIterator)throw new TypeError("Symbol.asyncIterator is not defined.");var e=t[Symbol.asyncIterator],n;return e?e.call(t):(t=typeof br=="function"?br(t):t[Symbol.iterator](),n={},r("next"),r("throw"),r("return"),n[Symbol.asyncIterator]=function(){return this},n);function r(o){n[o]=t[o]&&function(a){return new Promise(function(s,u){a=t[o](a),i(s,u,a.done,a.value)})}}function i(o,a,s,u){Promise.resolve(u).then(function(c){o({value:c,done:s})},a)}}function Pt(t){return typeof t=="function"}function cc(t){var e=function(r){Error.call(r),r.stack=new Error().stack},n=t(e);return n.prototype=Object.create(Error.prototype),n.prototype.constructor=n,n}var lc=cc(function(t){return function(e){t(this),this.message=e?e.length+` errors occurred during unsubscription:
|
4
4
|
`+e.map(function(n,r){return r+1+") "+n.toString()}).join(`
|
5
|
-
`):"",this.name="UnsubscriptionError",this.errors=e}});function aa(t,e){if(t){var n=t.indexOf(e);0<=n&&t.splice(n,1)}}var vi=function(){function t(e){this.initialTeardown=e,this.closed=!1,this._parentage=null,this._finalizers=null}return t.prototype.unsubscribe=function(){var e,n,r,i,o;if(!this.closed){this.closed=!0;var a=this._parentage;if(a)if(this._parentage=null,Array.isArray(a))try{for(var s=yr(a),u=s.next();!u.done;u=s.next()){var c=u.value;c.remove(this)}}catch(g){e={error:g}}finally{try{u&&!u.done&&(n=s.return)&&n.call(s)}finally{if(e)throw e.error}}else a.remove(this);var l=this.initialTeardown;if(Pt(l))try{l()}catch(g){o=g instanceof lc?g.errors:[g]}var h=this._finalizers;if(h){this._finalizers=null;try{for(var f=yr(h),d=f.next();!d.done;d=f.next()){var p=d.value;try{Td(p)}catch(g){o=o??[],g instanceof lc?o=bi(bi([],yi(o)),yi(g.errors)):o.push(g)}}}catch(g){r={error:g}}finally{try{d&&!d.done&&(i=f.return)&&i.call(f)}finally{if(r)throw r.error}}}if(o)throw new lc(o)}},t.prototype.add=function(e){var n;if(e&&e!==this)if(this.closed)Td(e);else{if(e instanceof t){if(e.closed||e._hasParent(this))return;e._addParent(this)}(this._finalizers=(n=this._finalizers)!==null&&n!==void 0?n:[]).push(e)}},t.prototype._hasParent=function(e){var n=this._parentage;return n===e||Array.isArray(n)&&n.includes(e)},t.prototype._addParent=function(e){var n=this._parentage;this._parentage=Array.isArray(n)?(n.push(e),n):n?[n,e]:e},t.prototype._removeParent=function(e){var n=this._parentage;n===e?this._parentage=null:Array.isArray(n)&&aa(n,e)},t.prototype.remove=function(e){var n=this._finalizers;n&&aa(n,e),e instanceof t&&e._removeParent(this)},t.EMPTY=function(){var e=new t;return e.closed=!0,e}(),t}(),Ad=vi.EMPTY;function Md(t){return t instanceof vi||t&&"closed"in t&&Pt(t.remove)&&Pt(t.add)&&Pt(t.unsubscribe)}function Td(t){Pt(t)?t():t.unsubscribe()}var Pd={onUnhandledError:null,onStoppedNotification:null,Promise:void 0,useDeprecatedSynchronousErrorHandling:!1,useDeprecatedNextContext:!1},dS={setTimeout:function(t,e){for(var n=[],r=2;r<arguments.length;r++)n[r-2]=arguments[r];return setTimeout.apply(void 0,bi([t,e],yi(n)))},clearTimeout:function(t){return clearTimeout(t)},delegate:void 0};function Dd(t){dS.setTimeout(function(){throw t})}function fc(){}function sa(t){t()}var hc=function(t){He(e,t);function e(n){var r=t.call(this)||this;return r.isStopped=!1,n?(r.destination=n,Md(n)&&n.add(r)):r.destination=yS,r}return e.create=function(n,r,i){return new xi(n,r,i)},e.prototype.next=function(n){this.isStopped||this._next(n)},e.prototype.error=function(n){this.isStopped||(this.isStopped=!0,this._error(n))},e.prototype.complete=function(){this.isStopped||(this.isStopped=!0,this._complete())},e.prototype.unsubscribe=function(){this.closed||(this.isStopped=!0,t.prototype.unsubscribe.call(this),this.destination=null)},e.prototype._next=function(n){this.destination.next(n)},e.prototype._error=function(n){try{this.destination.error(n)}finally{this.unsubscribe()}},e.prototype._complete=function(){try{this.destination.complete()}finally{this.unsubscribe()}},e}(vi),pS=Function.prototype.bind;function dc(t,e){return pS.call(t,e)}var gS=function(){function t(e){this.partialObserver=e}return t.prototype.next=function(e){var n=this.partialObserver;if(n.next)try{n.next(e)}catch(r){ua(r)}},t.prototype.error=function(e){var n=this.partialObserver;if(n.error)try{n.error(e)}catch(r){ua(r)}else ua(e)},t.prototype.complete=function(){var e=this.partialObserver;if(e.complete)try{e.complete()}catch(n){ua(n)}},t}(),xi=function(t){He(e,t);function e(n,r,i){var o=t.call(this)||this,a;if(Pt(n)||!n)a={next:n??void 0,error:r??void 0,complete:i??void 0};else{var s;o&&Pd.useDeprecatedNextContext?(s=Object.create(n),s.unsubscribe=function(){return o.unsubscribe()},a={next:n.next&&dc(n.next,s),error:n.error&&dc(n.error,s),complete:n.complete&&dc(n.complete,s)}):a=n}return o.destination=new gS(a),o}return e}(hc);function ua(t){Dd(t)}function mS(t){throw t}var yS={closed:!0,next:fc,error:mS,complete:fc},pc=function(){return typeof Symbol=="function"&&Symbol.observable||"@@observable"}();function Ed(t){return t}function bS(t){return t.length===0?Ed:t.length===1?t[0]:function(e){return t.reduce(function(n,r){return r(n)},e)}}var we=function(){function t(e){e&&(this._subscribe=e)}return t.prototype.lift=function(e){var n=new t;return n.source=this,n.operator=e,n},t.prototype.subscribe=function(e,n,r){var i=this,o=xS(e)?e:new xi(e,n,r);return sa(function(){var a=i,s=a.operator,u=a.source;o.add(s?s.call(o,u):u?i._subscribe(o):i._trySubscribe(o))}),o},t.prototype._trySubscribe=function(e){try{return this._subscribe(e)}catch(n){e.error(n)}},t.prototype.forEach=function(e,n){var r=this;return n=kd(n),new n(function(i,o){var a=new xi({next:function(s){try{e(s)}catch(u){o(u),a.unsubscribe()}},error:o,complete:i});r.subscribe(a)})},t.prototype._subscribe=function(e){var n;return(n=this.source)===null||n===void 0?void 0:n.subscribe(e)},t.prototype[pc]=function(){return this},t.prototype.pipe=function(){for(var e=[],n=0;n<arguments.length;n++)e[n]=arguments[n];return bS(e)(this)},t.prototype.toPromise=function(e){var n=this;return e=kd(e),new e(function(r,i){var o;n.subscribe(function(a){return o=a},function(a){return i(a)},function(){return r(o)})})},t.create=function(e){return new t(e)},t}();function kd(t){var e;return(e=t??Pd.Promise)!==null&&e!==void 0?e:Promise}function vS(t){return t&&Pt(t.next)&&Pt(t.error)&&Pt(t.complete)}function xS(t){return t&&t instanceof hc||vS(t)&&Md(t)}function _S(t){return Pt(t==null?void 0:t.lift)}function Pn(t){return function(e){if(_S(e))return e.lift(function(n){try{return t(n,this)}catch(r){this.error(r)}});throw new TypeError("Unable to lift unknown Observable type")}}function _i(t,e,n,r,i){return new wS(t,e,n,r,i)}var wS=function(t){He(e,t);function e(n,r,i,o,a,s){var u=t.call(this,n)||this;return u.onFinalize=a,u.shouldUnsubscribe=s,u._next=r?function(c){try{r(c)}catch(l){n.error(l)}}:t.prototype._next,u._error=o?function(c){try{o(c)}catch(l){n.error(l)}finally{this.unsubscribe()}}:t.prototype._error,u._complete=i?function(){try{i()}catch(c){n.error(c)}finally{this.unsubscribe()}}:t.prototype._complete,u}return e.prototype.unsubscribe=function(){var n;if(!this.shouldUnsubscribe||this.shouldUnsubscribe()){var r=this.closed;t.prototype.unsubscribe.call(this),!r&&((n=this.onFinalize)===null||n===void 0||n.call(this))}},e}(hc),$S=cc(function(t){return function(){t(this),this.name="ObjectUnsubscribedError",this.message="object unsubscribed"}}),wi=function(t){He(e,t);function e(){var n=t.call(this)||this;return n.closed=!1,n.currentObservers=null,n.observers=[],n.isStopped=!1,n.hasError=!1,n.thrownError=null,n}return e.prototype.lift=function(n){var r=new Ld(this,this);return r.operator=n,r},e.prototype._throwIfClosed=function(){if(this.closed)throw new $S},e.prototype.next=function(n){var r=this;sa(function(){var i,o;if(r._throwIfClosed(),!r.isStopped){r.currentObservers||(r.currentObservers=Array.from(r.observers));try{for(var a=yr(r.currentObservers),s=a.next();!s.done;s=a.next()){var u=s.value;u.next(n)}}catch(c){i={error:c}}finally{try{s&&!s.done&&(o=a.return)&&o.call(a)}finally{if(i)throw i.error}}}})},e.prototype.error=function(n){var r=this;sa(function(){if(r._throwIfClosed(),!r.isStopped){r.hasError=r.isStopped=!0,r.thrownError=n;for(var i=r.observers;i.length;)i.shift().error(n)}})},e.prototype.complete=function(){var n=this;sa(function(){if(n._throwIfClosed(),!n.isStopped){n.isStopped=!0;for(var r=n.observers;r.length;)r.shift().complete()}})},e.prototype.unsubscribe=function(){this.isStopped=this.closed=!0,this.observers=this.currentObservers=null},Object.defineProperty(e.prototype,"observed",{get:function(){var n;return((n=this.observers)===null||n===void 0?void 0:n.length)>0},enumerable:!1,configurable:!0}),e.prototype._trySubscribe=function(n){return this._throwIfClosed(),t.prototype._trySubscribe.call(this,n)},e.prototype._subscribe=function(n){return this._throwIfClosed(),this._checkFinalizedStatuses(n),this._innerSubscribe(n)},e.prototype._innerSubscribe=function(n){var r=this,i=this,o=i.hasError,a=i.isStopped,s=i.observers;return o||a?Ad:(this.currentObservers=null,s.push(n),new vi(function(){r.currentObservers=null,aa(s,n)}))},e.prototype._checkFinalizedStatuses=function(n){var r=this,i=r.hasError,o=r.thrownError,a=r.isStopped;i?n.error(o):a&&n.complete()},e.prototype.asObservable=function(){var n=new we;return n.source=this,n},e.create=function(n,r){return new Ld(n,r)},e}(we),Ld=function(t){He(e,t);function e(n,r){var i=t.call(this)||this;return i.destination=n,i.source=r,i}return e.prototype.next=function(n){var r,i;(i=(r=this.destination)===null||r===void 0?void 0:r.next)===null||i===void 0||i.call(r,n)},e.prototype.error=function(n){var r,i;(i=(r=this.destination)===null||r===void 0?void 0:r.error)===null||i===void 0||i.call(r,n)},e.prototype.complete=function(){var n,r;(r=(n=this.destination)===null||n===void 0?void 0:n.complete)===null||r===void 0||r.call(n)},e.prototype._subscribe=function(n){var r,i;return(i=(r=this.source)===null||r===void 0?void 0:r.subscribe(n))!==null&&i!==void 0?i:Ad},e}(wi),gc={now:function(){return(gc.delegate||Date).now()},delegate:void 0},SS=function(t){He(e,t);function e(n,r,i){n===void 0&&(n=1/0),r===void 0&&(r=1/0),i===void 0&&(i=gc);var o=t.call(this)||this;return o._bufferSize=n,o._windowTime=r,o._timestampProvider=i,o._buffer=[],o._infiniteTimeWindow=!0,o._infiniteTimeWindow=r===1/0,o._bufferSize=Math.max(1,n),o._windowTime=Math.max(1,r),o}return e.prototype.next=function(n){var r=this,i=r.isStopped,o=r._buffer,a=r._infiniteTimeWindow,s=r._timestampProvider,u=r._windowTime;i||(o.push(n),!a&&o.push(s.now()+u)),this._trimBuffer(),t.prototype.next.call(this,n)},e.prototype._subscribe=function(n){this._throwIfClosed(),this._trimBuffer();for(var r=this._innerSubscribe(n),i=this,o=i._infiniteTimeWindow,a=i._buffer,s=a.slice(),u=0;u<s.length&&!n.closed;u+=o?1:2)n.next(s[u]);return this._checkFinalizedStatuses(n),r},e.prototype._trimBuffer=function(){var n=this,r=n._bufferSize,i=n._timestampProvider,o=n._buffer,a=n._infiniteTimeWindow,s=(a?1:2)*r;if(r<1/0&&s<o.length&&o.splice(0,o.length-s),!a){for(var u=i.now(),c=0,l=1;l<o.length&&o[l]<=u;l+=2)c=l;c&&o.splice(0,c+1)}},e}(wi),AS=function(t){He(e,t);function e(n,r){return t.call(this)||this}return e.prototype.schedule=function(n,r){return this},e}(vi),Cd={setInterval:function(t,e){for(var n=[],r=2;r<arguments.length;r++)n[r-2]=arguments[r];return setInterval.apply(void 0,bi([t,e],yi(n)))},clearInterval:function(t){return clearInterval(t)},delegate:void 0},MS=function(t){He(e,t);function e(n,r){var i=t.call(this,n,r)||this;return i.scheduler=n,i.work=r,i.pending=!1,i}return e.prototype.schedule=function(n,r){var i;if(r===void 0&&(r=0),this.closed)return this;this.state=n;var o=this.id,a=this.scheduler;return o!=null&&(this.id=this.recycleAsyncId(a,o,r)),this.pending=!0,this.delay=r,this.id=(i=this.id)!==null&&i!==void 0?i:this.requestAsyncId(a,this.id,r),this},e.prototype.requestAsyncId=function(n,r,i){return i===void 0&&(i=0),Cd.setInterval(n.flush.bind(n,this),i)},e.prototype.recycleAsyncId=function(n,r,i){if(i===void 0&&(i=0),i!=null&&this.delay===i&&this.pending===!1)return r;r!=null&&Cd.clearInterval(r)},e.prototype.execute=function(n,r){if(this.closed)return new Error("executing a cancelled action");this.pending=!1;var i=this._execute(n,r);if(i)return i;this.pending===!1&&this.id!=null&&(this.id=this.recycleAsyncId(this.scheduler,this.id,null))},e.prototype._execute=function(n,r){var i=!1,o;try{this.work(n)}catch(a){i=!0,o=a||new Error("Scheduled action threw falsy error")}if(i)return this.unsubscribe(),o},e.prototype.unsubscribe=function(){if(!this.closed){var n=this,r=n.id,i=n.scheduler,o=i.actions;this.work=this.state=this.scheduler=null,this.pending=!1,aa(o,this),r!=null&&(this.id=this.recycleAsyncId(i,r,null)),this.delay=null,t.prototype.unsubscribe.call(this)}},e}(AS),Rd=function(){function t(e,n){n===void 0&&(n=t.now),this.schedulerActionCtor=e,this.now=n}return t.prototype.schedule=function(e,n,r){return n===void 0&&(n=0),new this.schedulerActionCtor(this,e).schedule(r,n)},t.now=gc.now,t}(),TS=function(t){He(e,t);function e(n,r){r===void 0&&(r=Rd.now);var i=t.call(this,n,r)||this;return i.actions=[],i._active=!1,i}return e.prototype.flush=function(n){var r=this.actions;if(this._active){r.push(n);return}var i;this._active=!0;do if(i=n.execute(n.state,n.delay))break;while(n=r.shift());if(this._active=!1,i){for(;n=r.shift();)n.unsubscribe();throw i}},e}(Rd);new TS(MS);function PS(t){return t&&Pt(t.schedule)}function DS(t){return t[t.length-1]}function Id(t){return PS(DS(t))?t.pop():void 0}var Nd=function(t){return t&&typeof t.length=="number"&&typeof t!="function"};function Fd(t){return Pt(t==null?void 0:t.then)}function Gd(t){return Pt(t[pc])}function zd(t){return Symbol.asyncIterator&&Pt(t==null?void 0:t[Symbol.asyncIterator])}function Od(t){return new TypeError("You provided "+(t!==null&&typeof t=="object"?"an invalid object":"'"+t+"'")+" where a stream was expected. You can provide an Observable, Promise, ReadableStream, Array, AsyncIterable, or Iterable.")}function ES(){return typeof Symbol!="function"||!Symbol.iterator?"@@iterator":Symbol.iterator}var Ud=ES();function Bd(t){return Pt(t==null?void 0:t[Ud])}function Yd(t){return fS(this,arguments,function(){var e,n,r,i;return Sd(this,function(o){switch(o.label){case 0:e=t.getReader(),o.label=1;case 1:o.trys.push([1,,9,10]),o.label=2;case 2:return[4,br(e.read())];case 3:return n=o.sent(),r=n.value,i=n.done,i?[4,br(void 0)]:[3,5];case 4:return[2,o.sent()];case 5:return[4,br(r)];case 6:return[4,o.sent()];case 7:return o.sent(),[3,2];case 8:return[3,10];case 9:return e.releaseLock(),[7];case 10:return[2]}})})}function Wd(t){return Pt(t==null?void 0:t.getReader)}function un(t){if(t instanceof we)return t;if(t!=null){if(Gd(t))return kS(t);if(Nd(t))return LS(t);if(Fd(t))return CS(t);if(zd(t))return Hd(t);if(Bd(t))return RS(t);if(Wd(t))return IS(t)}throw Od(t)}function kS(t){return new we(function(e){var n=t[pc]();if(Pt(n.subscribe))return n.subscribe(e);throw new TypeError("Provided object does not correctly implement Symbol.observable")})}function LS(t){return new we(function(e){for(var n=0;n<t.length&&!e.closed;n++)e.next(t[n]);e.complete()})}function CS(t){return new we(function(e){t.then(function(n){e.closed||(e.next(n),e.complete())},function(n){return e.error(n)}).then(null,Dd)})}function RS(t){return new we(function(e){var n,r;try{for(var i=yr(t),o=i.next();!o.done;o=i.next()){var a=o.value;if(e.next(a),e.closed)return}}catch(s){n={error:s}}finally{try{o&&!o.done&&(r=i.return)&&r.call(i)}finally{if(n)throw n.error}}e.complete()})}function Hd(t){return new we(function(e){NS(t,e).catch(function(n){return e.error(n)})})}function IS(t){return Hd(Yd(t))}function NS(t,e){var n,r,i,o;return lS(this,void 0,void 0,function(){var a,s;return Sd(this,function(u){switch(u.label){case 0:u.trys.push([0,5,6,11]),n=hS(t),u.label=1;case 1:return[4,n.next()];case 2:if(r=u.sent(),!!r.done)return[3,4];if(a=r.value,e.next(a),e.closed)return[2];u.label=3;case 3:return[3,1];case 4:return[3,11];case 5:return s=u.sent(),i={error:s},[3,11];case 6:return u.trys.push([6,,9,10]),r&&!r.done&&(o=n.return)?[4,o.call(n)]:[3,8];case 7:u.sent(),u.label=8;case 8:return[3,10];case 9:if(i)throw i.error;return[7];case 10:return[7];case 11:return e.complete(),[2]}})})}function Dn(t,e,n,r,i){r===void 0&&(r=0),i===void 0&&(i=!1);var o=e.schedule(function(){n(),i?t.add(this.schedule(null,r)):this.unsubscribe()},r);if(t.add(o),!i)return o}function qd(t,e){return e===void 0&&(e=0),Pn(function(n,r){n.subscribe(_i(r,function(i){return Dn(r,t,function(){return r.next(i)},e)},function(){return Dn(r,t,function(){return r.complete()},e)},function(i){return Dn(r,t,function(){return r.error(i)},e)}))})}function Xd(t,e){return e===void 0&&(e=0),Pn(function(n,r){r.add(t.schedule(function(){return n.subscribe(r)},e))})}function FS(t,e){return un(t).pipe(Xd(e),qd(e))}function GS(t,e){return un(t).pipe(Xd(e),qd(e))}function zS(t,e){return new we(function(n){var r=0;return e.schedule(function(){r===t.length?n.complete():(n.next(t[r++]),n.closed||this.schedule())})})}function OS(t,e){return new we(function(n){var r;return Dn(n,e,function(){r=t[Ud](),Dn(n,e,function(){var i,o,a;try{i=r.next(),o=i.value,a=i.done}catch(s){n.error(s);return}a?n.complete():n.next(o)},0,!0)}),function(){return Pt(r==null?void 0:r.return)&&r.return()}})}function Vd(t,e){if(!t)throw new Error("Iterable cannot be null");return new we(function(n){Dn(n,e,function(){var r=t[Symbol.asyncIterator]();Dn(n,e,function(){r.next().then(function(i){i.done?n.complete():n.next(i.value)})},0,!0)})})}function US(t,e){return Vd(Yd(t),e)}function BS(t,e){if(t!=null){if(Gd(t))return FS(t,e);if(Nd(t))return zS(t,e);if(Fd(t))return GS(t,e);if(zd(t))return Vd(t,e);if(Bd(t))return OS(t,e);if(Wd(t))return US(t,e)}throw Od(t)}function YS(t,e){return e?BS(t,e):un(t)}cc(function(t){return function(){t(this),this.name="EmptyError",this.message="no elements in sequence"}});function jd(t,e){return Pn(function(n,r){var i=0;n.subscribe(_i(r,function(o){r.next(t.call(e,o,i++))}))})}function WS(t,e,n,r,i,o,a,s){var u=[],c=0,l=0,h=!1,f=function(){h&&!u.length&&!c&&e.complete()},d=function(g){return c<r?p(g):u.push(g)},p=function(g){c++;var m=!1;un(n(g,l++)).subscribe(_i(e,function(y){e.next(y)},function(){m=!0},void 0,function(){if(m)try{c--;for(var y=function(){var _=u.shift();a||p(_)};u.length&&c<r;)y();f()}catch(_){e.error(_)}}))};return t.subscribe(_i(e,d,function(){h=!0,f()})),function(){}}function Zd(t,e,n){return n===void 0&&(n=1/0),Pt(e)?Zd(function(r,i){return jd(function(o,a){return e(r,o,i,a)})(un(t(r,i)))},n):(typeof e=="number"&&(n=e),Pn(function(r,i){return WS(r,i,t,n)}))}function HS(t){return Zd(Ed,t)}function qS(){return HS(1)}function Kd(){for(var t=[],e=0;e<arguments.length;e++)t[e]=arguments[e];return qS()(YS(t,Id(t)))}function XS(t){t===void 0&&(t={});var e=t.connector,n=e===void 0?function(){return new wi}:e,r=t.resetOnError,i=r===void 0?!0:r,o=t.resetOnComplete,a=o===void 0?!0:o,s=t.resetOnRefCountZero,u=s===void 0?!0:s;return function(c){var l,h,f,d=0,p=!1,g=!1,m=function(){h==null||h.unsubscribe(),h=void 0},y=function(){m(),l=f=void 0,p=g=!1},_=function(){var x=l;y(),x==null||x.unsubscribe()};return Pn(function(x,b){d++,!g&&!p&&m();var $=f=f??n();b.add(function(){d--,d===0&&!g&&!p&&(h=mc(_,u))}),$.subscribe(b),!l&&d>0&&(l=new xi({next:function(v){return $.next(v)},error:function(v){g=!0,m(),h=mc(y,i,v),$.error(v)},complete:function(){p=!0,m(),h=mc(y,a),$.complete()}}),un(x).subscribe(l))})(c)}}function mc(t,e){for(var n=[],r=2;r<arguments.length;r++)n[r-2]=arguments[r];if(e===!0){t();return}if(e!==!1){var i=new xi({next:function(){i.unsubscribe(),t()}});return un(e.apply(void 0,bi([],yi(n)))).subscribe(i)}}function VS(t,e,n){var r,i=!1;return r=t,XS({connector:function(){return new SS(r,e,n)},resetOnError:!0,resetOnComplete:!1,resetOnRefCountZero:i})}function jS(){for(var t=[],e=0;e<arguments.length;e++)t[e]=arguments[e];var n=Id(t);return Pn(function(r,i){(n?Kd(t,r,n):Kd(t,r)).subscribe(i)})}function ZS(t){return Pn(function(e,n){un(t).subscribe(_i(n,function(){return n.complete()},fc)),!n.closed&&e.subscribe(n)})}const Qd=({maxValue:t=1,minValue:e=0,axisWidth:n,scaleDomain:r=fr.scaleDomain,scaleRange:i=fr.scaleRange})=>{const o=r[0]??fr.scaleDomain[0],a=r[1]??fr.scaleDomain[1],s=i[0]??fr.scaleRange[0],u=i[1]??fr.scaleRange[1],c=o==="auto"?e:o,l=a==="auto"?t:a;let h=n*s,f=n*u;return wd().domain([c,l]).range([h,f])},Jd=({axisLabels:t,axisWidth:e,padding:n=.5})=>{let r=[0,e];return tS().domain(t).range(r).padding(n)},KS=({axisLabels:t,axisWidth:e,padding:n=.5,reverse:r=!1})=>{let i=t.map((o,a)=>a);return r&&i.reverse(),$d().domain([-0,e+0]).range(i)};function QS({name:t,defaultParams:e,initFn:n}){const r=new wi,i=new wi,o=new WeakMap;let a=()=>{},s,u=e;return{params$:i,name:t,defaultParams:e,init(){s&&(a=n(s)??(()=>{}),o.set(s.selection,s))},destroy(){a(),s&&(s.selection.remove(),s=void 0),r.next(void 0)},setPresetParams:c=>{u=sc(c,e)},setContext:c=>{s=c,s.observer.fullParams$=i.pipe(ZS(r),jS({}),jd(l=>sc(l,u)),VS(1))}}}const ca=()=>function(t,e){return function(n){return class{constructor(){const r=QS({name:t,defaultParams:e,initFn:n});this.params$=r.params$,this.name=r.name,this.defaultParams=r.defaultParams,this.init=r.init,this.destroy=r.destroy,this.setPresetParams=r.setPresetParams,this.setContext=r.setContext}}}},$i=ca(),$e=ca(),qe=ca(),tp=ca();function _t(t,e){return t==null||e==null?NaN:t<e?-1:t>e?1:t>=e?0:NaN}function ep(t,e){return t==null||e==null?NaN:e<t?-1:e>t?1:e>=t?0:NaN}function la(t){let e,n,r;t.length!==2?(e=_t,n=(s,u)=>_t(t(s),u),r=(s,u)=>t(s)-u):(e=t===_t||t===ep?t:JS,n=t,r=t);function i(s,u,c=0,l=s.length){if(c<l){if(e(u,u)!==0)return l;do{const h=c+l>>>1;n(s[h],u)<0?c=h+1:l=h}while(c<l)}return c}function o(s,u,c=0,l=s.length){if(c<l){if(e(u,u)!==0)return l;do{const h=c+l>>>1;n(s[h],u)<=0?c=h+1:l=h}while(c<l)}return c}function a(s,u,c=0,l=s.length){const h=i(s,u,c,l-1);return h>c&&r(s[h-1],u)>-r(s[h],u)?h-1:h}return{left:i,center:a,right:o}}function JS(){return 0}function fa(t){return t===null?NaN:+t}function*t6(t,e){if(e===void 0)for(let n of t)n!=null&&(n=+n)>=n&&(yield n);else{let n=-1;for(let r of t)(r=e(r,++n,t))!=null&&(r=+r)>=r&&(yield r)}}const np=la(_t),rp=np.right,e6=np.left,n6=la(fa).center,En=rp;function r6(t,e){if(!((e=+e)>=0))throw new RangeError("invalid r");let n=t.length;if(!((n=Math.floor(n))>=0))throw new RangeError("invalid length");if(!n||!e)return t;const r=yc(e),i=t.slice();return r(t,i,0,n,1),r(i,t,0,n,1),r(t,i,0,n,1),t}const ip=op(yc),i6=op(o6);function op(t){return function(e,n,r=n){if(!((n=+n)>=0))throw new RangeError("invalid rx");if(!((r=+r)>=0))throw new RangeError("invalid ry");let{data:i,width:o,height:a}=e;if(!((o=Math.floor(o))>=0))throw new RangeError("invalid width");if(!((a=Math.floor(a!==void 0?a:i.length/o))>=0))throw new RangeError("invalid height");if(!o||!a||!n&&!r)return e;const s=n&&t(n),u=r&&t(r),c=i.slice();return s&&u?(vr(s,c,i,o,a),vr(s,i,c,o,a),vr(s,c,i,o,a),xr(u,i,c,o,a),xr(u,c,i,o,a),xr(u,i,c,o,a)):s?(vr(s,i,c,o,a),vr(s,c,i,o,a),vr(s,i,c,o,a)):u&&(xr(u,i,c,o,a),xr(u,c,i,o,a),xr(u,i,c,o,a)),e}}function vr(t,e,n,r,i){for(let o=0,a=r*i;o<a;)t(e,n,o,o+=r,1)}function xr(t,e,n,r,i){for(let o=0,a=r*i;o<r;++o)t(e,n,o,o+a,r)}function o6(t){const e=yc(t);return(n,r,i,o,a)=>{i<<=2,o<<=2,a<<=2,e(n,r,i+0,o+0,a),e(n,r,i+1,o+1,a),e(n,r,i+2,o+2,a),e(n,r,i+3,o+3,a)}}function yc(t){const e=Math.floor(t);if(e===t)return a6(t);const n=t-e,r=2*t+1;return(i,o,a,s,u)=>{if(!((s-=u)>=a))return;let c=e*o[a];const l=u*e,h=l+u;for(let f=a,d=a+l;f<d;f+=u)c+=o[Math.min(s,f)];for(let f=a,d=s;f<=d;f+=u)c+=o[Math.min(s,f+l)],i[f]=(c+n*(o[Math.max(a,f-h)]+o[Math.min(s,f+h)]))/r,c-=o[Math.max(a,f-l)]}}function a6(t){const e=2*t+1;return(n,r,i,o,a)=>{if(!((o-=a)>=i))return;let s=t*r[i];const u=a*t;for(let c=i,l=i+u;c<l;c+=a)s+=r[Math.min(o,c)];for(let c=i,l=o;c<=l;c+=a)s+=r[Math.min(o,c+u)],n[c]=s/e,s-=r[Math.max(i,c-u)]}}function ha(t,e){let n=0;if(e===void 0)for(let r of t)r!=null&&(r=+r)>=r&&++n;else{let r=-1;for(let i of t)(i=e(i,++r,t))!=null&&(i=+i)>=i&&++n}return n}function s6(t){return t.length|0}function u6(t){return!(t>0)}function c6(t){return typeof t!="object"||"length"in t?t:Array.from(t)}function l6(t){return e=>t(...e)}function f6(...t){const e=typeof t[t.length-1]=="function"&&l6(t.pop());t=t.map(c6);const n=t.map(s6),r=t.length-1,i=new Array(r+1).fill(0),o=[];if(r<0||n.some(u6))return o;for(;;){o.push(i.map((s,u)=>t[u][s]));let a=r;for(;++i[a]===n[a];){if(a===0)return e?o.map(e):o;i[a--]=0}}}function h6(t,e){var n=0,r=0;return Float64Array.from(t,e===void 0?i=>n+=+i||0:i=>n+=+e(i,r++,t)||0)}function ap(t,e){let n=0,r,i=0,o=0;if(e===void 0)for(let a of t)a!=null&&(a=+a)>=a&&(r=a-i,i+=r/++n,o+=r*(a-i));else{let a=-1;for(let s of t)(s=e(s,++a,t))!=null&&(s=+s)>=s&&(r=s-i,i+=r/++n,o+=r*(s-i))}if(n>1)return o/(n-1)}function sp(t,e){const n=ap(t,e);return n&&Math.sqrt(n)}function Si(t,e){let n,r;if(e===void 0)for(const i of t)i!=null&&(n===void 0?i>=i&&(n=r=i):(n>i&&(n=i),r<i&&(r=i)));else{let i=-1;for(let o of t)(o=e(o,++i,t))!=null&&(n===void 0?o>=o&&(n=r=o):(n>o&&(n=o),r<o&&(r=o)))}return[n,r]}class Dt{constructor(){this._partials=new Float64Array(32),this._n=0}add(e){const n=this._partials;let r=0;for(let i=0;i<this._n&&i<32;i++){const o=n[i],a=e+o,s=Math.abs(e)<Math.abs(o)?e-(a-o):o-(a-e);s&&(n[r++]=s),e=a}return n[r]=e,this._n=r+1,this}valueOf(){const e=this._partials;let n=this._n,r,i,o,a=0;if(n>0){for(a=e[--n];n>0&&(r=a,i=e[--n],a=r+i,o=i-(a-r),!o););n>0&&(o<0&&e[n-1]<0||o>0&&e[n-1]>0)&&(i=o*2,r=a+i,i==r-a&&(a=r))}return a}}function d6(t,e){const n=new Dt;if(e===void 0)for(let r of t)(r=+r)&&n.add(r);else{let r=-1;for(let i of t)(i=+e(i,++r,t))&&n.add(i)}return+n}function p6(t,e){const n=new Dt;let r=-1;return Float64Array.from(t,e===void 0?i=>n.add(+i||0):i=>n.add(+e(i,++r,t)||0))}class Ai extends Map{constructor(e,n=lp){if(super(),Object.defineProperties(this,{_intern:{value:new Map},_key:{value:n}}),e!=null)for(const[r,i]of e)this.set(r,i)}get(e){return super.get(bc(this,e))}has(e){return super.has(bc(this,e))}set(e,n){return super.set(up(this,e),n)}delete(e){return super.delete(cp(this,e))}}class kn extends Set{constructor(e,n=lp){if(super(),Object.defineProperties(this,{_intern:{value:new Map},_key:{value:n}}),e!=null)for(const r of e)this.add(r)}has(e){return super.has(bc(this,e))}add(e){return super.add(up(this,e))}delete(e){return super.delete(cp(this,e))}}function bc({_intern:t,_key:e},n){const r=e(n);return t.has(r)?t.get(r):n}function up({_intern:t,_key:e},n){const r=e(n);return t.has(r)?t.get(r):(t.set(r,n),n)}function cp({_intern:t,_key:e},n){const r=e(n);return t.has(r)&&(n=t.get(r),t.delete(r)),n}function lp(t){return t!==null&&typeof t=="object"?t.valueOf():t}function _r(t){return t}function fp(t,...e){return wr(t,_r,_r,e)}function hp(t,...e){return wr(t,Array.from,_r,e)}function dp(t,e){for(let n=1,r=e.length;n<r;++n)t=t.flatMap(i=>i.pop().map(([o,a])=>[...i,o,a]));return t}function g6(t,...e){return dp(hp(t,...e),e)}function m6(t,e,...n){return dp(gp(t,e,...n),n)}function pp(t,e,...n){return wr(t,_r,e,n)}function gp(t,e,...n){return wr(t,Array.from,e,n)}function y6(t,...e){return wr(t,_r,mp,e)}function b6(t,...e){return wr(t,Array.from,mp,e)}function mp(t){if(t.length!==1)throw new Error("duplicate key");return t[0]}function wr(t,e,n,r){return function i(o,a){if(a>=r.length)return n(o);const s=new Ai,u=r[a++];let c=-1;for(const l of o){const h=u(l,++c,o),f=s.get(h);f?f.push(l):s.set(h,[l])}for(const[l,h]of s)s.set(l,i(h,a));return e(s)}(t,0)}function yp(t,e){return Array.from(e,n=>t[n])}function vc(t,...e){if(typeof t[Symbol.iterator]!="function")throw new TypeError("values is not iterable");t=Array.from(t);let[n]=e;if(n&&n.length!==2||e.length>1){const r=Uint32Array.from(t,(i,o)=>o);return e.length>1?(e=e.map(i=>t.map(i)),r.sort((i,o)=>{for(const a of e){const s=$r(a[i],a[o]);if(s)return s}})):(n=t.map(n),r.sort((i,o)=>$r(n[i],n[o]))),yp(t,r)}return t.sort(xc(n))}function xc(t=_t){if(t===_t)return $r;if(typeof t!="function")throw new TypeError("compare is not a function");return(e,n)=>{const r=t(e,n);return r||r===0?r:(t(n,n)===0)-(t(e,e)===0)}}function $r(t,e){return(t==null||!(t>=t))-(e==null||!(e>=e))||(t<e?-1:t>e?1:0)}function v6(t,e,n){return(e.length!==2?vc(pp(t,e,n),([r,i],[o,a])=>_t(i,a)||_t(r,o)):vc(fp(t,n),([r,i],[o,a])=>e(i,a)||_t(r,o))).map(([r])=>r)}var x6=Array.prototype,_6=x6.slice;function _c(t){return()=>t}const w6=Math.sqrt(50),$6=Math.sqrt(10),S6=Math.sqrt(2);function da(t,e,n){const r=(e-t)/Math.max(0,n),i=Math.floor(Math.log10(r)),o=r/Math.pow(10,i),a=o>=w6?10:o>=$6?5:o>=S6?2:1;let s,u,c;return i<0?(c=Math.pow(10,-i)/a,s=Math.round(t*c),u=Math.round(e*c),s/c<t&&++s,u/c>e&&--u,c=-c):(c=Math.pow(10,i)*a,s=Math.round(t/c),u=Math.round(e/c),s*c<t&&++s,u*c>e&&--u),u<s&&.5<=n&&n<2?da(t,e,n*2):[s,u,c]}function Ln(t,e,n){if(e=+e,t=+t,n=+n,!(n>0))return[];if(t===e)return[t];const r=e<t,[i,o,a]=r?da(e,t,n):da(t,e,n);if(!(o>=i))return[];const s=o-i+1,u=new Array(s);if(r)if(a<0)for(let c=0;c<s;++c)u[c]=(o-c)/-a;else for(let c=0;c<s;++c)u[c]=(o-c)*a;else if(a<0)for(let c=0;c<s;++c)u[c]=(i+c)/-a;else for(let c=0;c<s;++c)u[c]=(i+c)*a;return u}function Cn(t,e,n){return e=+e,t=+t,n=+n,da(t,e,n)[2]}function pa(t,e,n){e=+e,t=+t,n=+n;const r=e<t,i=r?Cn(e,t,n):Cn(t,e,n);return(r?-1:1)*(i<0?1/-i:i)}function wc(t,e,n){let r;for(;;){const i=Cn(t,e,n);if(i===r||i===0||!isFinite(i))return[t,e];i>0?(t=Math.floor(t/i)*i,e=Math.ceil(e/i)*i):i<0&&(t=Math.ceil(t*i)/i,e=Math.floor(e*i)/i),r=i}}function $c(t){return Math.max(1,Math.ceil(Math.log(ha(t))/Math.LN2)+1)}function bp(){var t=_r,e=Si,n=$c;function r(i){Array.isArray(i)||(i=Array.from(i));var o,a=i.length,s,u,c=new Array(a);for(o=0;o<a;++o)c[o]=t(i[o],o,i);var l=e(c),h=l[0],f=l[1],d=n(c,h,f);if(!Array.isArray(d)){const x=f,b=+d;if(e===Si&&([h,f]=wc(h,f,b)),d=Ln(h,f,b),d[0]<=h&&(u=Cn(h,f,b)),d[d.length-1]>=f)if(x>=f&&e===Si){const $=Cn(h,f,b);isFinite($)&&($>0?f=(Math.floor(f/$)+1)*$:$<0&&(f=(Math.ceil(f*-$)+1)/-$))}else d.pop()}for(var p=d.length,g=0,m=p;d[g]<=h;)++g;for(;d[m-1]>f;)--m;(g||m<p)&&(d=d.slice(g,m),p=m-g);var y=new Array(p+1),_;for(o=0;o<=p;++o)_=y[o]=[],_.x0=o>0?d[o-1]:h,_.x1=o<p?d[o]:f;if(isFinite(u)){if(u>0)for(o=0;o<a;++o)(s=c[o])!=null&&h<=s&&s<=f&&y[Math.min(p,Math.floor((s-h)/u))].push(i[o]);else if(u<0){for(o=0;o<a;++o)if((s=c[o])!=null&&h<=s&&s<=f){const x=Math.floor((h-s)*u);y[Math.min(p,x+(d[x]<=s))].push(i[o])}}}else for(o=0;o<a;++o)(s=c[o])!=null&&h<=s&&s<=f&&y[En(d,s,0,p)].push(i[o]);return y}return r.value=function(i){return arguments.length?(t=typeof i=="function"?i:_c(i),r):t},r.domain=function(i){return arguments.length?(e=typeof i=="function"?i:_c([i[0],i[1]]),r):e},r.thresholds=function(i){return arguments.length?(n=typeof i=="function"?i:_c(Array.isArray(i)?_6.call(i):i),r):n},r}function Mi(t,e){let n;if(e===void 0)for(const r of t)r!=null&&(n<r||n===void 0&&r>=r)&&(n=r);else{let r=-1;for(let i of t)(i=e(i,++r,t))!=null&&(n<i||n===void 0&&i>=i)&&(n=i)}return n}function Sc(t,e){let n,r=-1,i=-1;if(e===void 0)for(const o of t)++i,o!=null&&(n<o||n===void 0&&o>=o)&&(n=o,r=i);else for(let o of t)(o=e(o,++i,t))!=null&&(n<o||n===void 0&&o>=o)&&(n=o,r=i);return r}function ga(t,e){let n;if(e===void 0)for(const r of t)r!=null&&(n>r||n===void 0&&r>=r)&&(n=r);else{let r=-1;for(let i of t)(i=e(i,++r,t))!=null&&(n>i||n===void 0&&i>=i)&&(n=i)}return n}function Ac(t,e){let n,r=-1,i=-1;if(e===void 0)for(const o of t)++i,o!=null&&(n>o||n===void 0&&o>=o)&&(n=o,r=i);else for(let o of t)(o=e(o,++i,t))!=null&&(n>o||n===void 0&&o>=o)&&(n=o,r=i);return r}function ma(t,e,n=0,r=1/0,i){if(e=Math.floor(e),n=Math.floor(Math.max(0,n)),r=Math.floor(Math.min(t.length-1,r)),!(n<=e&&e<=r))return t;for(i=i===void 0?$r:xc(i);r>n;){if(r-n>600){const u=r-n+1,c=e-n+1,l=Math.log(u),h=.5*Math.exp(2*l/3),f=.5*Math.sqrt(l*h*(u-h)/u)*(c-u/2<0?-1:1),d=Math.max(n,Math.floor(e-c*h/u+f)),p=Math.min(r,Math.floor(e+(u-c)*h/u+f));ma(t,e,d,p,i)}const o=t[e];let a=n,s=r;for(Ti(t,n,e),i(t[r],o)>0&&Ti(t,n,r);a<s;){for(Ti(t,a,s),++a,--s;i(t[a],o)<0;)++a;for(;i(t[s],o)>0;)--s}i(t[n],o)===0?Ti(t,n,s):(++s,Ti(t,s,r)),s<=e&&(n=s+1),e<=s&&(r=s-1)}return t}function Ti(t,e,n){const r=t[e];t[e]=t[n],t[n]=r}function vp(t,e=_t){let n,r=!1;if(e.length===1){let i;for(const o of t){const a=e(o);(r?_t(a,i)>0:_t(a,a)===0)&&(n=o,i=a,r=!0)}}else for(const i of t)(r?e(i,n)>0:e(i,i)===0)&&(n=i,r=!0);return n}function Pi(t,e,n){if(t=Float64Array.from(t6(t,n)),!(!(r=t.length)||isNaN(e=+e))){if(e<=0||r<2)return ga(t);if(e>=1)return Mi(t);var r,i=(r-1)*e,o=Math.floor(i),a=Mi(ma(t,o).subarray(0,o+1)),s=ga(t.subarray(o+1));return a+(s-a)*(i-o)}}function xp(t,e,n=fa){if(!(!(r=t.length)||isNaN(e=+e))){if(e<=0||r<2)return+n(t[0],0,t);if(e>=1)return+n(t[r-1],r-1,t);var r,i=(r-1)*e,o=Math.floor(i),a=+n(t[o],o,t),s=+n(t[o+1],o+1,t);return a+(s-a)*(i-o)}}function _p(t,e,n=fa){if(!isNaN(e=+e)){if(r=Float64Array.from(t,(s,u)=>fa(n(t[u],u,t))),e<=0)return Ac(r);if(e>=1)return Sc(r);var r,i=Uint32Array.from(t,(s,u)=>u),o=r.length-1,a=Math.floor(o*e);return ma(i,a,0,o,(s,u)=>$r(r[s],r[u])),a=vp(i.subarray(0,a+1),s=>r[s]),a>=0?a:-1}}function A6(t,e,n){const r=ha(t),i=Pi(t,.75)-Pi(t,.25);return r&&i?Math.ceil((n-e)/(2*i*Math.pow(r,-1/3))):1}function M6(t,e,n){const r=ha(t),i=sp(t);return r&&i?Math.ceil((n-e)*Math.cbrt(r)/(3.49*i)):1}function T6(t,e){let n=0,r=0;if(e===void 0)for(let i of t)i!=null&&(i=+i)>=i&&(++n,r+=i);else{let i=-1;for(let o of t)(o=e(o,++i,t))!=null&&(o=+o)>=o&&(++n,r+=o)}if(n)return r/n}function P6(t,e){return Pi(t,.5,e)}function D6(t,e){return _p(t,.5,e)}function*E6(t){for(const e of t)yield*e}function Mc(t){return Array.from(E6(t))}function k6(t,e){const n=new Ai;if(e===void 0)for(let o of t)o!=null&&o>=o&&n.set(o,(n.get(o)||0)+1);else{let o=-1;for(let a of t)(a=e(a,++o,t))!=null&&a>=a&&n.set(a,(n.get(a)||0)+1)}let r,i=0;for(const[o,a]of n)a>i&&(i=a,r=o);return r}function L6(t,e=C6){const n=[];let r,i=!1;for(const o of t)i&&n.push(e(r,o)),r=o,i=!0;return n}function C6(t,e){return[t,e]}function cn(t,e,n){t=+t,e=+e,n=(i=arguments.length)<2?(e=t,t=0,1):i<3?1:+n;for(var r=-1,i=Math.max(0,Math.ceil((e-t)/n))|0,o=new Array(i);++r<i;)o[r]=t+r*n;return o}function R6(t,e=_t){if(typeof t[Symbol.iterator]!="function")throw new TypeError("values is not iterable");let n=Array.from(t);const r=new Float64Array(n.length);e.length!==2&&(n=n.map(e),e=_t);const i=(s,u)=>e(n[s],n[u]);let o,a;return t=Uint32Array.from(n,(s,u)=>u),t.sort(e===_t?(s,u)=>$r(n[s],n[u]):xc(i)),t.forEach((s,u)=>{const c=i(s,o===void 0?s:o);c>=0?((o===void 0||c>0)&&(o=s,a=u),r[s]=a):r[s]=NaN}),r}function I6(t,e=_t){let n,r=!1;if(e.length===1){let i;for(const o of t){const a=e(o);(r?_t(a,i)<0:_t(a,a)===0)&&(n=o,i=a,r=!0)}}else for(const i of t)(r?e(i,n)<0:e(i,i)===0)&&(n=i,r=!0);return n}function wp(t,e=_t){if(e.length===1)return Ac(t,e);let n,r=-1,i=-1;for(const o of t)++i,(r<0?e(o,o)===0:e(o,n)<0)&&(n=o,r=i);return r}function N6(t,e=_t){if(e.length===1)return Sc(t,e);let n,r=-1,i=-1;for(const o of t)++i,(r<0?e(o,o)===0:e(o,n)>0)&&(n=o,r=i);return r}function F6(t,e){const n=wp(t,e);return n<0?void 0:n}const G6=$p(Math.random);function $p(t){return function(n,r=0,i=n.length){let o=i-(r=+r);for(;o;){const a=t()*o--|0,s=n[o+r];n[o+r]=n[a+r],n[a+r]=s}return n}}function z6(t,e){let n=0;if(e===void 0)for(let r of t)(r=+r)&&(n+=r);else{let r=-1;for(let i of t)(i=+e(i,++r,t))&&(n+=i)}return n}function Sp(t){if(!(o=t.length))return[];for(var e=-1,n=ga(t,O6),r=new Array(n);++e<n;)for(var i=-1,o,a=r[e]=new Array(o);++i<o;)a[i]=t[i][e];return r}function O6(t){return t.length}function U6(){return Sp(arguments)}function B6(t,e){if(typeof e!="function")throw new TypeError("test is not a function");let n=-1;for(const r of t)if(!e(r,++n,t))return!1;return!0}function Y6(t,e){if(typeof e!="function")throw new TypeError("test is not a function");let n=-1;for(const r of t)if(e(r,++n,t))return!0;return!1}function W6(t,e){if(typeof e!="function")throw new TypeError("test is not a function");const n=[];let r=-1;for(const i of t)e(i,++r,t)&&n.push(i);return n}function H6(t,e){if(typeof t[Symbol.iterator]!="function")throw new TypeError("values is not iterable");if(typeof e!="function")throw new TypeError("mapper is not a function");return Array.from(t,(n,r)=>e(n,r,t))}function q6(t,e,n){if(typeof e!="function")throw new TypeError("reducer is not a function");const r=t[Symbol.iterator]();let i,o,a=-1;if(arguments.length<3){if({done:i,value:n}=r.next(),i)return;++a}for(;{done:i,value:o}=r.next(),!i;)n=e(n,o,++a,t);return n}function X6(t){if(typeof t[Symbol.iterator]!="function")throw new TypeError("values is not iterable");return Array.from(t).reverse()}function V6(t,...e){t=new kn(t);for(const n of e)for(const r of n)t.delete(r);return t}function j6(t,e){const n=e[Symbol.iterator](),r=new kn;for(const i of t){if(r.has(i))return!1;let o,a;for(;({value:o,done:a}=n.next())&&!a;){if(Object.is(i,o))return!1;r.add(o)}}return!0}function Z6(t,...e){t=new kn(t),e=e.map(K6);t:for(const n of t)for(const r of e)if(!r.has(n)){t.delete(n);continue t}return t}function K6(t){return t instanceof kn?t:new kn(t)}function Ap(t,e){const n=t[Symbol.iterator](),r=new Set;for(const i of e){const o=Mp(i);if(r.has(o))continue;let a,s;for(;{value:a,done:s}=n.next();){if(s)return!1;const u=Mp(a);if(r.add(u),Object.is(o,u))break}}return!0}function Mp(t){return t!==null&&typeof t=="object"?t.valueOf():t}function Q6(t,e){return Ap(e,t)}function J6(...t){const e=new kn;for(const n of t)for(const r of n)e.add(r);return e}function t5(t){return t}var ya=1,ba=2,Tc=3,Di=4,Tp=1e-6;function e5(t){return"translate("+t+",0)"}function n5(t){return"translate(0,"+t+")"}function r5(t){return e=>+t(e)}function i5(t,e){return e=Math.max(0,t.bandwidth()-e*2)/2,t.round()&&(e=Math.round(e)),n=>+t(n)+e}function o5(){return!this.__axis}function va(t,e){var n=[],r=null,i=null,o=6,a=6,s=3,u=typeof window<"u"&&window.devicePixelRatio>1?0:.5,c=t===ya||t===Di?-1:1,l=t===Di||t===ba?"x":"y",h=t===ya||t===Tc?e5:n5;function f(d){var p=r??(e.ticks?e.ticks.apply(e,n):e.domain()),g=i??(e.tickFormat?e.tickFormat.apply(e,n):t5),m=Math.max(o,0)+s,y=e.range(),_=+y[0]+u,x=+y[y.length-1]+u,b=(e.bandwidth?i5:r5)(e.copy(),u),$=d.selection?d.selection():d,v=$.selectAll(".domain").data([null]),w=$.selectAll(".tick").data(p,e).order(),S=w.exit(),D=w.enter().append("g").attr("class","tick"),E=w.select("line"),T=w.select("text");v=v.merge(v.enter().insert("path",".tick").attr("class","domain").attr("stroke","currentColor")),w=w.merge(D),E=E.merge(D.append("line").attr("stroke","currentColor").attr(l+"2",c*o)),T=T.merge(D.append("text").attr("fill","currentColor").attr(l,c*m).attr("dy",t===ya?"0em":t===Tc?"0.71em":"0.32em")),d!==$&&(v=v.transition(d),w=w.transition(d),E=E.transition(d),T=T.transition(d),S=S.transition(d).attr("opacity",Tp).attr("transform",function(F){return isFinite(F=b(F))?h(F+u):this.getAttribute("transform")}),D.attr("opacity",Tp).attr("transform",function(F){var M=this.parentNode.__axis;return h((M&&isFinite(M=M(F))?M:b(F))+u)})),S.remove(),v.attr("d",t===Di||t===ba?a?"M"+c*a+","+_+"H"+u+"V"+x+"H"+c*a:"M"+u+","+_+"V"+x:a?"M"+_+","+c*a+"V"+u+"H"+x+"V"+c*a:"M"+_+","+u+"H"+x),w.attr("opacity",1).attr("transform",function(F){return h(b(F)+u)}),E.attr(l+"2",c*o),T.attr(l,c*m).text(g),$.filter(o5).attr("fill","none").attr("font-size",10).attr("font-family","sans-serif").attr("text-anchor",t===ba?"start":t===Di?"end":"middle"),$.each(function(){this.__axis=b})}return f.scale=function(d){return arguments.length?(e=d,f):e},f.ticks=function(){return n=Array.from(arguments),f},f.tickArguments=function(d){return arguments.length?(n=d==null?[]:Array.from(d),f):n.slice()},f.tickValues=function(d){return arguments.length?(r=d==null?null:Array.from(d),f):r&&r.slice()},f.tickFormat=function(d){return arguments.length?(i=d,f):i},f.tickSize=function(d){return arguments.length?(o=a=+d,f):o},f.tickSizeInner=function(d){return arguments.length?(o=+d,f):o},f.tickSizeOuter=function(d){return arguments.length?(a=+d,f):a},f.tickPadding=function(d){return arguments.length?(s=+d,f):s},f.offset=function(d){return arguments.length?(u=+d,f):u},f}function Pp(t){return va(ya,t)}function a5(t){return va(ba,t)}function s5(t){return va(Tc,t)}function Dp(t){return va(Di,t)}var u5={value:()=>{}};function Rn(){for(var t=0,e=arguments.length,n={},r;t<e;++t){if(!(r=arguments[t]+"")||r in n||/[\s.]/.test(r))throw new Error("illegal type: "+r);n[r]=[]}return new xa(n)}function xa(t){this._=t}function c5(t,e){return t.trim().split(/^|\s+/).map(function(n){var r="",i=n.indexOf(".");if(i>=0&&(r=n.slice(i+1),n=n.slice(0,i)),n&&!e.hasOwnProperty(n))throw new Error("unknown type: "+n);return{type:n,name:r}})}xa.prototype=Rn.prototype={constructor:xa,on:function(t,e){var n=this._,r=c5(t+"",n),i,o=-1,a=r.length;if(arguments.length<2){for(;++o<a;)if((i=(t=r[o]).type)&&(i=l5(n[i],t.name)))return i;return}if(e!=null&&typeof e!="function")throw new Error("invalid callback: "+e);for(;++o<a;)if(i=(t=r[o]).type)n[i]=Ep(n[i],t.name,e);else if(e==null)for(i in n)n[i]=Ep(n[i],t.name,null);return this},copy:function(){var t={},e=this._;for(var n in e)t[n]=e[n].slice();return new xa(t)},call:function(t,e){if((i=arguments.length-2)>0)for(var n=new Array(i),r=0,i,o;r<i;++r)n[r]=arguments[r+2];if(!this._.hasOwnProperty(t))throw new Error("unknown type: "+t);for(o=this._[t],r=0,i=o.length;r<i;++r)o[r].value.apply(e,n)},apply:function(t,e,n){if(!this._.hasOwnProperty(t))throw new Error("unknown type: "+t);for(var r=this._[t],i=0,o=r.length;i<o;++i)r[i].value.apply(e,n)}};function l5(t,e){for(var n=0,r=t.length,i;n<r;++n)if((i=t[n]).name===e)return i.value}function Ep(t,e,n){for(var r=0,i=t.length;r<i;++r)if(t[r].name===e){t[r]=u5,t=t.slice(0,r).concat(t.slice(r+1));break}return n!=null&&t.push({name:e,value:n}),t}var Pc="http://www.w3.org/1999/xhtml";const Dc={svg:"http://www.w3.org/2000/svg",xhtml:Pc,xlink:"http://www.w3.org/1999/xlink",xml:"http://www.w3.org/XML/1998/namespace",xmlns:"http://www.w3.org/2000/xmlns/"};function Ei(t){var e=t+="",n=e.indexOf(":");return n>=0&&(e=t.slice(0,n))!=="xmlns"&&(t=t.slice(n+1)),Dc.hasOwnProperty(e)?{space:Dc[e],local:t}:t}function f5(t){return function(){var e=this.ownerDocument,n=this.namespaceURI;return n===Pc&&e.documentElement.namespaceURI===Pc?e.createElement(t):e.createElementNS(n,t)}}function h5(t){return function(){return this.ownerDocument.createElementNS(t.space,t.local)}}function _a(t){var e=Ei(t);return(e.local?h5:f5)(e)}function d5(){}function wa(t){return t==null?d5:function(){return this.querySelector(t)}}function p5(t){typeof t!="function"&&(t=wa(t));for(var e=this._groups,n=e.length,r=new Array(n),i=0;i<n;++i)for(var o=e[i],a=o.length,s=r[i]=new Array(a),u,c,l=0;l<a;++l)(u=o[l])&&(c=t.call(u,u.__data__,l,o))&&("__data__"in u&&(c.__data__=u.__data__),s[l]=c);return new Yt(r,this._parents)}function kp(t){return t==null?[]:Array.isArray(t)?t:Array.from(t)}function g5(){return[]}function Ec(t){return t==null?g5:function(){return this.querySelectorAll(t)}}function m5(t){return function(){return kp(t.apply(this,arguments))}}function y5(t){typeof t=="function"?t=m5(t):t=Ec(t);for(var e=this._groups,n=e.length,r=[],i=[],o=0;o<n;++o)for(var a=e[o],s=a.length,u,c=0;c<s;++c)(u=a[c])&&(r.push(t.call(u,u.__data__,c,a)),i.push(u));return new Yt(r,i)}function kc(t){return function(){return this.matches(t)}}function Lp(t){return function(e){return e.matches(t)}}var b5=Array.prototype.find;function v5(t){return function(){return b5.call(this.children,t)}}function x5(){return this.firstElementChild}function _5(t){return this.select(t==null?x5:v5(typeof t=="function"?t:Lp(t)))}var w5=Array.prototype.filter;function $5(){return Array.from(this.children)}function S5(t){return function(){return w5.call(this.children,t)}}function A5(t){return this.selectAll(t==null?$5:S5(typeof t=="function"?t:Lp(t)))}function M5(t){typeof t!="function"&&(t=kc(t));for(var e=this._groups,n=e.length,r=new Array(n),i=0;i<n;++i)for(var o=e[i],a=o.length,s=r[i]=[],u,c=0;c<a;++c)(u=o[c])&&t.call(u,u.__data__,c,o)&&s.push(u);return new Yt(r,this._parents)}function Cp(t){return new Array(t.length)}function T5(){return new Yt(this._enter||this._groups.map(Cp),this._parents)}function $a(t,e){this.ownerDocument=t.ownerDocument,this.namespaceURI=t.namespaceURI,this._next=null,this._parent=t,this.__data__=e}$a.prototype={constructor:$a,appendChild:function(t){return this._parent.insertBefore(t,this._next)},insertBefore:function(t,e){return this._parent.insertBefore(t,e)},querySelector:function(t){return this._parent.querySelector(t)},querySelectorAll:function(t){return this._parent.querySelectorAll(t)}};function P5(t){return function(){return t}}function D5(t,e,n,r,i,o){for(var a=0,s,u=e.length,c=o.length;a<c;++a)(s=e[a])?(s.__data__=o[a],r[a]=s):n[a]=new $a(t,o[a]);for(;a<u;++a)(s=e[a])&&(i[a]=s)}function E5(t,e,n,r,i,o,a){var s,u,c=new Map,l=e.length,h=o.length,f=new Array(l),d;for(s=0;s<l;++s)(u=e[s])&&(f[s]=d=a.call(u,u.__data__,s,e)+"",c.has(d)?i[s]=u:c.set(d,u));for(s=0;s<h;++s)d=a.call(t,o[s],s,o)+"",(u=c.get(d))?(r[s]=u,u.__data__=o[s],c.delete(d)):n[s]=new $a(t,o[s]);for(s=0;s<l;++s)(u=e[s])&&c.get(f[s])===u&&(i[s]=u)}function k5(t){return t.__data__}function L5(t,e){if(!arguments.length)return Array.from(this,k5);var n=e?E5:D5,r=this._parents,i=this._groups;typeof t!="function"&&(t=P5(t));for(var o=i.length,a=new Array(o),s=new Array(o),u=new Array(o),c=0;c<o;++c){var l=r[c],h=i[c],f=h.length,d=C5(t.call(l,l&&l.__data__,c,r)),p=d.length,g=s[c]=new Array(p),m=a[c]=new Array(p),y=u[c]=new Array(f);n(l,h,g,m,y,d,e);for(var _=0,x=0,b,$;_<p;++_)if(b=g[_]){for(_>=x&&(x=_+1);!($=m[x])&&++x<p;);b._next=$||null}}return a=new Yt(a,r),a._enter=s,a._exit=u,a}function C5(t){return typeof t=="object"&&"length"in t?t:Array.from(t)}function R5(){return new Yt(this._exit||this._groups.map(Cp),this._parents)}function I5(t,e,n){var r=this.enter(),i=this,o=this.exit();return typeof t=="function"?(r=t(r),r&&(r=r.selection())):r=r.append(t+""),e!=null&&(i=e(i),i&&(i=i.selection())),n==null?o.remove():n(o),r&&i?r.merge(i).order():i}function N5(t){for(var e=t.selection?t.selection():t,n=this._groups,r=e._groups,i=n.length,o=r.length,a=Math.min(i,o),s=new Array(i),u=0;u<a;++u)for(var c=n[u],l=r[u],h=c.length,f=s[u]=new Array(h),d,p=0;p<h;++p)(d=c[p]||l[p])&&(f[p]=d);for(;u<i;++u)s[u]=n[u];return new Yt(s,this._parents)}function F5(){for(var t=this._groups,e=-1,n=t.length;++e<n;)for(var r=t[e],i=r.length-1,o=r[i],a;--i>=0;)(a=r[i])&&(o&&a.compareDocumentPosition(o)^4&&o.parentNode.insertBefore(a,o),o=a);return this}function G5(t){t||(t=z5);function e(h,f){return h&&f?t(h.__data__,f.__data__):!h-!f}for(var n=this._groups,r=n.length,i=new Array(r),o=0;o<r;++o){for(var a=n[o],s=a.length,u=i[o]=new Array(s),c,l=0;l<s;++l)(c=a[l])&&(u[l]=c);u.sort(e)}return new Yt(i,this._parents).order()}function z5(t,e){return t<e?-1:t>e?1:t>=e?0:NaN}function O5(){var t=arguments[0];return arguments[0]=this,t.apply(null,arguments),this}function U5(){return Array.from(this)}function B5(){for(var t=this._groups,e=0,n=t.length;e<n;++e)for(var r=t[e],i=0,o=r.length;i<o;++i){var a=r[i];if(a)return a}return null}function Y5(){let t=0;for(const e of this)++t;return t}function W5(){return!this.node()}function H5(t){for(var e=this._groups,n=0,r=e.length;n<r;++n)for(var i=e[n],o=0,a=i.length,s;o<a;++o)(s=i[o])&&t.call(s,s.__data__,o,i);return this}function q5(t){return function(){this.removeAttribute(t)}}function X5(t){return function(){this.removeAttributeNS(t.space,t.local)}}function V5(t,e){return function(){this.setAttribute(t,e)}}function j5(t,e){return function(){this.setAttributeNS(t.space,t.local,e)}}function Z5(t,e){return function(){var n=e.apply(this,arguments);n==null?this.removeAttribute(t):this.setAttribute(t,n)}}function K5(t,e){return function(){var n=e.apply(this,arguments);n==null?this.removeAttributeNS(t.space,t.local):this.setAttributeNS(t.space,t.local,n)}}function Q5(t,e){var n=Ei(t);if(arguments.length<2){var r=this.node();return n.local?r.getAttributeNS(n.space,n.local):r.getAttribute(n)}return this.each((e==null?n.local?X5:q5:typeof e=="function"?n.local?K5:Z5:n.local?j5:V5)(n,e))}function Lc(t){return t.ownerDocument&&t.ownerDocument.defaultView||t.document&&t||t.defaultView}function J5(t){return function(){this.style.removeProperty(t)}}function tA(t,e,n){return function(){this.style.setProperty(t,e,n)}}function eA(t,e,n){return function(){var r=e.apply(this,arguments);r==null?this.style.removeProperty(t):this.style.setProperty(t,r,n)}}function nA(t,e,n){return arguments.length>1?this.each((e==null?J5:typeof e=="function"?eA:tA)(t,e,n??"")):In(this.node(),t)}function In(t,e){return t.style.getPropertyValue(e)||Lc(t).getComputedStyle(t,null).getPropertyValue(e)}function rA(t){return function(){delete this[t]}}function iA(t,e){return function(){this[t]=e}}function oA(t,e){return function(){var n=e.apply(this,arguments);n==null?delete this[t]:this[t]=n}}function aA(t,e){return arguments.length>1?this.each((e==null?rA:typeof e=="function"?oA:iA)(t,e)):this.node()[t]}function Rp(t){return t.trim().split(/^|\s+/)}function Cc(t){return t.classList||new Ip(t)}function Ip(t){this._node=t,this._names=Rp(t.getAttribute("class")||"")}Ip.prototype={add:function(t){var e=this._names.indexOf(t);e<0&&(this._names.push(t),this._node.setAttribute("class",this._names.join(" ")))},remove:function(t){var e=this._names.indexOf(t);e>=0&&(this._names.splice(e,1),this._node.setAttribute("class",this._names.join(" ")))},contains:function(t){return this._names.indexOf(t)>=0}};function Np(t,e){for(var n=Cc(t),r=-1,i=e.length;++r<i;)n.add(e[r])}function Fp(t,e){for(var n=Cc(t),r=-1,i=e.length;++r<i;)n.remove(e[r])}function sA(t){return function(){Np(this,t)}}function uA(t){return function(){Fp(this,t)}}function cA(t,e){return function(){(e.apply(this,arguments)?Np:Fp)(this,t)}}function lA(t,e){var n=Rp(t+"");if(arguments.length<2){for(var r=Cc(this.node()),i=-1,o=n.length;++i<o;)if(!r.contains(n[i]))return!1;return!0}return this.each((typeof e=="function"?cA:e?sA:uA)(n,e))}function fA(){this.textContent=""}function hA(t){return function(){this.textContent=t}}function dA(t){return function(){var e=t.apply(this,arguments);this.textContent=e??""}}function pA(t){return arguments.length?this.each(t==null?fA:(typeof t=="function"?dA:hA)(t)):this.node().textContent}function gA(){this.innerHTML=""}function mA(t){return function(){this.innerHTML=t}}function yA(t){return function(){var e=t.apply(this,arguments);this.innerHTML=e??""}}function bA(t){return arguments.length?this.each(t==null?gA:(typeof t=="function"?yA:mA)(t)):this.node().innerHTML}function vA(){this.nextSibling&&this.parentNode.appendChild(this)}function xA(){return this.each(vA)}function _A(){this.previousSibling&&this.parentNode.insertBefore(this,this.parentNode.firstChild)}function wA(){return this.each(_A)}function $A(t){var e=typeof t=="function"?t:_a(t);return this.select(function(){return this.appendChild(e.apply(this,arguments))})}function SA(){return null}function AA(t,e){var n=typeof t=="function"?t:_a(t),r=e==null?SA:typeof e=="function"?e:wa(e);return this.select(function(){return this.insertBefore(n.apply(this,arguments),r.apply(this,arguments)||null)})}function MA(){var t=this.parentNode;t&&t.removeChild(this)}function TA(){return this.each(MA)}function PA(){var t=this.cloneNode(!1),e=this.parentNode;return e?e.insertBefore(t,this.nextSibling):t}function DA(){var t=this.cloneNode(!0),e=this.parentNode;return e?e.insertBefore(t,this.nextSibling):t}function EA(t){return this.select(t?DA:PA)}function kA(t){return arguments.length?this.property("__data__",t):this.node().__data__}function LA(t){return function(e){t.call(this,e,this.__data__)}}function CA(t){return t.trim().split(/^|\s+/).map(function(e){var n="",r=e.indexOf(".");return r>=0&&(n=e.slice(r+1),e=e.slice(0,r)),{type:e,name:n}})}function RA(t){return function(){var e=this.__on;if(e){for(var n=0,r=-1,i=e.length,o;n<i;++n)o=e[n],(!t.type||o.type===t.type)&&o.name===t.name?this.removeEventListener(o.type,o.listener,o.options):e[++r]=o;++r?e.length=r:delete this.__on}}}function IA(t,e,n){return function(){var r=this.__on,i,o=LA(e);if(r){for(var a=0,s=r.length;a<s;++a)if((i=r[a]).type===t.type&&i.name===t.name){this.removeEventListener(i.type,i.listener,i.options),this.addEventListener(i.type,i.listener=o,i.options=n),i.value=e;return}}this.addEventListener(t.type,o,n),i={type:t.type,name:t.name,value:e,listener:o,options:n},r?r.push(i):this.__on=[i]}}function NA(t,e,n){var r=CA(t+""),i,o=r.length,a;if(arguments.length<2){var s=this.node().__on;if(s){for(var u=0,c=s.length,l;u<c;++u)for(i=0,l=s[u];i<o;++i)if((a=r[i]).type===l.type&&a.name===l.name)return l.value}return}for(s=e?IA:RA,i=0;i<o;++i)this.each(s(r[i],e,n));return this}function Gp(t,e,n){var r=Lc(t),i=r.CustomEvent;typeof i=="function"?i=new i(e,n):(i=r.document.createEvent("Event"),n?(i.initEvent(e,n.bubbles,n.cancelable),i.detail=n.detail):i.initEvent(e,!1,!1)),t.dispatchEvent(i)}function FA(t,e){return function(){return Gp(this,t,e)}}function GA(t,e){return function(){return Gp(this,t,e.apply(this,arguments))}}function zA(t,e){return this.each((typeof e=="function"?GA:FA)(t,e))}function*OA(){for(var t=this._groups,e=0,n=t.length;e<n;++e)for(var r=t[e],i=0,o=r.length,a;i<o;++i)(a=r[i])&&(yield a)}var Rc=[null];function Yt(t,e){this._groups=t,this._parents=e}function Nn(){return new Yt([[document.documentElement]],Rc)}function UA(){return this}Yt.prototype=Nn.prototype={constructor:Yt,select:p5,selectAll:y5,selectChild:_5,selectChildren:A5,filter:M5,data:L5,enter:T5,exit:R5,join:I5,merge:N5,selection:UA,order:F5,sort:G5,call:O5,nodes:U5,node:B5,size:Y5,empty:W5,each:H5,attr:Q5,style:nA,property:aA,classed:lA,text:pA,html:bA,raise:xA,lower:wA,append:$A,insert:AA,remove:TA,clone:EA,datum:kA,on:NA,dispatch:zA,[Symbol.iterator]:OA};function Z(t){return typeof t=="string"?new Yt([[document.querySelector(t)]],[document.documentElement]):new Yt([[t]],Rc)}function BA(t){return Z(_a(t).call(document.documentElement))}var YA=0;function zp(){return new Ic}function Ic(){this._="@"+(++YA).toString(36)}Ic.prototype=zp.prototype={constructor:Ic,get:function(t){for(var e=this._;!(e in t);)if(!(t=t.parentNode))return;return t[e]},set:function(t,e){return t[this._]=e},remove:function(t){return this._ in t&&delete t[this._]},toString:function(){return this._}};function Op(t){let e;for(;e=t.sourceEvent;)t=e;return t}function ae(t,e){if(t=Op(t),e===void 0&&(e=t.currentTarget),e){var n=e.ownerSVGElement||e;if(n.createSVGPoint){var r=n.createSVGPoint();return r.x=t.clientX,r.y=t.clientY,r=r.matrixTransform(e.getScreenCTM().inverse()),[r.x,r.y]}if(e.getBoundingClientRect){var i=e.getBoundingClientRect();return[t.clientX-i.left-e.clientLeft,t.clientY-i.top-e.clientTop]}}return[t.pageX,t.pageY]}function WA(t,e){return t.target&&(t=Op(t),e===void 0&&(e=t.currentTarget),t=t.touches||[t]),Array.from(t,n=>ae(n,e))}function HA(t){return typeof t=="string"?new Yt([document.querySelectorAll(t)],[document.documentElement]):new Yt([kp(t)],Rc)}const qA={passive:!1},ki={capture:!0,passive:!1};function Nc(t){t.stopImmediatePropagation()}function Sr(t){t.preventDefault(),t.stopImmediatePropagation()}function Sa(t){var e=t.document.documentElement,n=Z(t).on("dragstart.drag",Sr,ki);"onselectstart"in e?n.on("selectstart.drag",Sr,ki):(e.__noselect=e.style.MozUserSelect,e.style.MozUserSelect="none")}function Aa(t,e){var n=t.document.documentElement,r=Z(t).on("dragstart.drag",null);e&&(r.on("click.drag",Sr,ki),setTimeout(function(){r.on("click.drag",null)},0)),"onselectstart"in n?r.on("selectstart.drag",null):(n.style.MozUserSelect=n.__noselect,delete n.__noselect)}const Ma=t=>()=>t;function Fc(t,{sourceEvent:e,subject:n,target:r,identifier:i,active:o,x:a,y:s,dx:u,dy:c,dispatch:l}){Object.defineProperties(this,{type:{value:t,enumerable:!0,configurable:!0},sourceEvent:{value:e,enumerable:!0,configurable:!0},subject:{value:n,enumerable:!0,configurable:!0},target:{value:r,enumerable:!0,configurable:!0},identifier:{value:i,enumerable:!0,configurable:!0},active:{value:o,enumerable:!0,configurable:!0},x:{value:a,enumerable:!0,configurable:!0},y:{value:s,enumerable:!0,configurable:!0},dx:{value:u,enumerable:!0,configurable:!0},dy:{value:c,enumerable:!0,configurable:!0},_:{value:l}})}Fc.prototype.on=function(){var t=this._.on.apply(this._,arguments);return t===this._?this:t};function XA(t){return!t.ctrlKey&&!t.button}function VA(){return this.parentNode}function jA(t,e){return e??{x:t.x,y:t.y}}function ZA(){return navigator.maxTouchPoints||"ontouchstart"in this}function Up(){var t=XA,e=VA,n=jA,r=ZA,i={},o=Rn("start","drag","end"),a=0,s,u,c,l,h=0;function f(b){b.on("mousedown.drag",d).filter(r).on("touchstart.drag",m).on("touchmove.drag",y,qA).on("touchend.drag touchcancel.drag",_).style("touch-action","none").style("-webkit-tap-highlight-color","rgba(0,0,0,0)")}function d(b,$){if(!(l||!t.call(this,b,$))){var v=x(this,e.call(this,b,$),b,$,"mouse");v&&(Z(b.view).on("mousemove.drag",p,ki).on("mouseup.drag",g,ki),Sa(b.view),Nc(b),c=!1,s=b.clientX,u=b.clientY,v("start",b))}}function p(b){if(Sr(b),!c){var $=b.clientX-s,v=b.clientY-u;c=$*$+v*v>h}i.mouse("drag",b)}function g(b){Z(b.view).on("mousemove.drag mouseup.drag",null),Aa(b.view,c),Sr(b),i.mouse("end",b)}function m(b,$){if(t.call(this,b,$)){var v=b.changedTouches,w=e.call(this,b,$),S=v.length,D,E;for(D=0;D<S;++D)(E=x(this,w,b,$,v[D].identifier,v[D]))&&(Nc(b),E("start",b,v[D]))}}function y(b){var $=b.changedTouches,v=$.length,w,S;for(w=0;w<v;++w)(S=i[$[w].identifier])&&(Sr(b),S("drag",b,$[w]))}function _(b){var $=b.changedTouches,v=$.length,w,S;for(l&&clearTimeout(l),l=setTimeout(function(){l=null},500),w=0;w<v;++w)(S=i[$[w].identifier])&&(Nc(b),S("end",b,$[w]))}function x(b,$,v,w,S,D){var E=o.copy(),T=ae(D||v,$),F,M,A;if((A=n.call(b,new Fc("beforestart",{sourceEvent:v,target:f,identifier:S,active:a,x:T[0],y:T[1],dx:0,dy:0,dispatch:E}),w))!=null)return F=A.x-T[0]||0,M=A.y-T[1]||0,function L(P,I,z){var k=T,R;switch(P){case"start":i[S]=L,R=a++;break;case"end":delete i[S],--a;case"drag":T=ae(z||I,$),R=a;break}E.call(P,b,new Fc(P,{sourceEvent:I,subject:A,target:f,identifier:S,active:R,x:T[0]+F,y:T[1]+M,dx:T[0]-k[0],dy:T[1]-k[1],dispatch:E}),w)}}return f.filter=function(b){return arguments.length?(t=typeof b=="function"?b:Ma(!!b),f):t},f.container=function(b){return arguments.length?(e=typeof b=="function"?b:Ma(b),f):e},f.subject=function(b){return arguments.length?(n=typeof b=="function"?b:Ma(b),f):n},f.touchable=function(b){return arguments.length?(r=typeof b=="function"?b:Ma(!!b),f):r},f.on=function(){var b=o.on.apply(o,arguments);return b===o?f:b},f.clickDistance=function(b){return arguments.length?(h=(b=+b)*b,f):Math.sqrt(h)},f}function Ar(t,e,n){t.prototype=e.prototype=n,n.constructor=t}function Li(t,e){var n=Object.create(t.prototype);for(var r in e)n[r]=e[r];return n}function ln(){}var Fn=.7,Mr=1/Fn,Tr="\\s*([+-]?\\d+)\\s*",Ci="\\s*([+-]?(?:\\d*\\.)?\\d+(?:[eE][+-]?\\d+)?)\\s*",Le="\\s*([+-]?(?:\\d*\\.)?\\d+(?:[eE][+-]?\\d+)?)%\\s*",KA=/^#([0-9a-f]{3,8})$/,QA=new RegExp(`^rgb\\(${Tr},${Tr},${Tr}\\)$`),JA=new RegExp(`^rgb\\(${Le},${Le},${Le}\\)$`),t8=new RegExp(`^rgba\\(${Tr},${Tr},${Tr},${Ci}\\)$`),e8=new RegExp(`^rgba\\(${Le},${Le},${Le},${Ci}\\)$`),n8=new RegExp(`^hsl\\(${Ci},${Le},${Le}\\)$`),r8=new RegExp(`^hsla\\(${Ci},${Le},${Le},${Ci}\\)$`),Bp={aliceblue:15792383,antiquewhite:16444375,aqua:65535,aquamarine:8388564,azure:15794175,beige:16119260,bisque:16770244,black:0,blanchedalmond:16772045,blue:255,blueviolet:9055202,brown:10824234,burlywood:14596231,cadetblue:6266528,chartreuse:8388352,chocolate:13789470,coral:16744272,cornflowerblue:6591981,cornsilk:16775388,crimson:14423100,cyan:65535,darkblue:139,darkcyan:35723,darkgoldenrod:12092939,darkgray:11119017,darkgreen:25600,darkgrey:11119017,darkkhaki:12433259,darkmagenta:9109643,darkolivegreen:5597999,darkorange:16747520,darkorchid:10040012,darkred:9109504,darksalmon:15308410,darkseagreen:9419919,darkslateblue:4734347,darkslategray:3100495,darkslategrey:3100495,darkturquoise:52945,darkviolet:9699539,deeppink:16716947,deepskyblue:49151,dimgray:6908265,dimgrey:6908265,dodgerblue:2003199,firebrick:11674146,floralwhite:16775920,forestgreen:2263842,fuchsia:16711935,gainsboro:14474460,ghostwhite:16316671,gold:16766720,goldenrod:14329120,gray:8421504,green:32768,greenyellow:11403055,grey:8421504,honeydew:15794160,hotpink:16738740,indianred:13458524,indigo:4915330,ivory:16777200,khaki:15787660,lavender:15132410,lavenderblush:16773365,lawngreen:8190976,lemonchiffon:16775885,lightblue:11393254,lightcoral:15761536,lightcyan:14745599,lightgoldenrodyellow:16448210,lightgray:13882323,lightgreen:9498256,lightgrey:13882323,lightpink:16758465,lightsalmon:16752762,lightseagreen:2142890,lightskyblue:8900346,lightslategray:7833753,lightslategrey:7833753,lightsteelblue:11584734,lightyellow:16777184,lime:65280,limegreen:3329330,linen:16445670,magenta:16711935,maroon:8388608,mediumaquamarine:6737322,mediumblue:205,mediumorchid:12211667,mediumpurple:9662683,mediumseagreen:3978097,mediumslateblue:8087790,mediumspringgreen:64154,mediumturquoise:4772300,mediumvioletred:13047173,midnightblue:1644912,mintcream:16121850,mistyrose:16770273,moccasin:16770229,navajowhite:16768685,navy:128,oldlace:16643558,olive:8421376,olivedrab:7048739,orange:16753920,orangered:16729344,orchid:14315734,palegoldenrod:15657130,palegreen:10025880,paleturquoise:11529966,palevioletred:14381203,papayawhip:16773077,peachpuff:16767673,peru:13468991,pink:16761035,plum:14524637,powderblue:11591910,purple:8388736,rebeccapurple:6697881,red:16711680,rosybrown:12357519,royalblue:4286945,saddlebrown:9127187,salmon:16416882,sandybrown:16032864,seagreen:3050327,seashell:16774638,sienna:10506797,silver:12632256,skyblue:8900331,slateblue:6970061,slategray:7372944,slategrey:7372944,snow:16775930,springgreen:65407,steelblue:4620980,tan:13808780,teal:32896,thistle:14204888,tomato:16737095,turquoise:4251856,violet:15631086,wheat:16113331,white:16777215,whitesmoke:16119285,yellow:16776960,yellowgreen:10145074};Ar(ln,fn,{copy(t){return Object.assign(new this.constructor,this,t)},displayable(){return this.rgb().displayable()},hex:Yp,formatHex:Yp,formatHex8:i8,formatHsl:o8,formatRgb:Wp,toString:Wp});function Yp(){return this.rgb().formatHex()}function i8(){return this.rgb().formatHex8()}function o8(){return jp(this).formatHsl()}function Wp(){return this.rgb().formatRgb()}function fn(t){var e,n;return t=(t+"").trim().toLowerCase(),(e=KA.exec(t))?(n=e[1].length,e=parseInt(e[1],16),n===6?Hp(e):n===3?new kt(e>>8&15|e>>4&240,e>>4&15|e&240,(e&15)<<4|e&15,1):n===8?Ta(e>>24&255,e>>16&255,e>>8&255,(e&255)/255):n===4?Ta(e>>12&15|e>>8&240,e>>8&15|e>>4&240,e>>4&15|e&240,((e&15)<<4|e&15)/255):null):(e=QA.exec(t))?new kt(e[1],e[2],e[3],1):(e=JA.exec(t))?new kt(e[1]*255/100,e[2]*255/100,e[3]*255/100,1):(e=t8.exec(t))?Ta(e[1],e[2],e[3],e[4]):(e=e8.exec(t))?Ta(e[1]*255/100,e[2]*255/100,e[3]*255/100,e[4]):(e=n8.exec(t))?Vp(e[1],e[2]/100,e[3]/100,1):(e=r8.exec(t))?Vp(e[1],e[2]/100,e[3]/100,e[4]):Bp.hasOwnProperty(t)?Hp(Bp[t]):t==="transparent"?new kt(NaN,NaN,NaN,0):null}function Hp(t){return new kt(t>>16&255,t>>8&255,t&255,1)}function Ta(t,e,n,r){return r<=0&&(t=e=n=NaN),new kt(t,e,n,r)}function Gc(t){return t instanceof ln||(t=fn(t)),t?(t=t.rgb(),new kt(t.r,t.g,t.b,t.opacity)):new kt}function Pr(t,e,n,r){return arguments.length===1?Gc(t):new kt(t,e,n,r??1)}function kt(t,e,n,r){this.r=+t,this.g=+e,this.b=+n,this.opacity=+r}Ar(kt,Pr,Li(ln,{brighter(t){return t=t==null?Mr:Math.pow(Mr,t),new kt(this.r*t,this.g*t,this.b*t,this.opacity)},darker(t){return t=t==null?Fn:Math.pow(Fn,t),new kt(this.r*t,this.g*t,this.b*t,this.opacity)},rgb(){return this},clamp(){return new kt(Gn(this.r),Gn(this.g),Gn(this.b),Pa(this.opacity))},displayable(){return-.5<=this.r&&this.r<255.5&&-.5<=this.g&&this.g<255.5&&-.5<=this.b&&this.b<255.5&&0<=this.opacity&&this.opacity<=1},hex:qp,formatHex:qp,formatHex8:a8,formatRgb:Xp,toString:Xp}));function qp(){return`#${zn(this.r)}${zn(this.g)}${zn(this.b)}`}function a8(){return`#${zn(this.r)}${zn(this.g)}${zn(this.b)}${zn((isNaN(this.opacity)?1:this.opacity)*255)}`}function Xp(){const t=Pa(this.opacity);return`${t===1?"rgb(":"rgba("}${Gn(this.r)}, ${Gn(this.g)}, ${Gn(this.b)}${t===1?")":`, ${t})`}`}function Pa(t){return isNaN(t)?1:Math.max(0,Math.min(1,t))}function Gn(t){return Math.max(0,Math.min(255,Math.round(t)||0))}function zn(t){return t=Gn(t),(t<16?"0":"")+t.toString(16)}function Vp(t,e,n,r){return r<=0?t=e=n=NaN:n<=0||n>=1?t=e=NaN:e<=0&&(t=NaN),new Se(t,e,n,r)}function jp(t){if(t instanceof Se)return new Se(t.h,t.s,t.l,t.opacity);if(t instanceof ln||(t=fn(t)),!t)return new Se;if(t instanceof Se)return t;t=t.rgb();var e=t.r/255,n=t.g/255,r=t.b/255,i=Math.min(e,n,r),o=Math.max(e,n,r),a=NaN,s=o-i,u=(o+i)/2;return s?(e===o?a=(n-r)/s+(n<r)*6:n===o?a=(r-e)/s+2:a=(e-n)/s+4,s/=u<.5?o+i:2-o-i,a*=60):s=u>0&&u<1?0:a,new Se(a,s,u,t.opacity)}function Da(t,e,n,r){return arguments.length===1?jp(t):new Se(t,e,n,r??1)}function Se(t,e,n,r){this.h=+t,this.s=+e,this.l=+n,this.opacity=+r}Ar(Se,Da,Li(ln,{brighter(t){return t=t==null?Mr:Math.pow(Mr,t),new Se(this.h,this.s,this.l*t,this.opacity)},darker(t){return t=t==null?Fn:Math.pow(Fn,t),new Se(this.h,this.s,this.l*t,this.opacity)},rgb(){var t=this.h%360+(this.h<0)*360,e=isNaN(t)||isNaN(this.s)?0:this.s,n=this.l,r=n+(n<.5?n:1-n)*e,i=2*n-r;return new kt(zc(t>=240?t-240:t+120,i,r),zc(t,i,r),zc(t<120?t+240:t-120,i,r),this.opacity)},clamp(){return new Se(Zp(this.h),Ea(this.s),Ea(this.l),Pa(this.opacity))},displayable(){return(0<=this.s&&this.s<=1||isNaN(this.s))&&0<=this.l&&this.l<=1&&0<=this.opacity&&this.opacity<=1},formatHsl(){const t=Pa(this.opacity);return`${t===1?"hsl(":"hsla("}${Zp(this.h)}, ${Ea(this.s)*100}%, ${Ea(this.l)*100}%${t===1?")":`, ${t})`}`}}));function Zp(t){return t=(t||0)%360,t<0?t+360:t}function Ea(t){return Math.max(0,Math.min(1,t||0))}function zc(t,e,n){return(t<60?e+(n-e)*t/60:t<180?n:t<240?e+(n-e)*(240-t)/60:e)*255}const Kp=Math.PI/180,Qp=180/Math.PI,ka=18,Jp=.96422,tg=1,eg=.82521,ng=4/29,Dr=6/29,rg=3*Dr*Dr,s8=Dr*Dr*Dr;function ig(t){if(t instanceof Ae)return new Ae(t.l,t.a,t.b,t.opacity);if(t instanceof Ce)return ag(t);t instanceof kt||(t=Gc(t));var e=Yc(t.r),n=Yc(t.g),r=Yc(t.b),i=Oc((.2225045*e+.7168786*n+.0606169*r)/tg),o,a;return e===n&&n===r?o=a=i:(o=Oc((.4360747*e+.3850649*n+.1430804*r)/Jp),a=Oc((.0139322*e+.0971045*n+.7141733*r)/eg)),new Ae(116*i-16,500*(o-i),200*(i-a),t.opacity)}function u8(t,e){return new Ae(t,0,0,e??1)}function La(t,e,n,r){return arguments.length===1?ig(t):new Ae(t,e,n,r??1)}function Ae(t,e,n,r){this.l=+t,this.a=+e,this.b=+n,this.opacity=+r}Ar(Ae,La,Li(ln,{brighter(t){return new Ae(this.l+ka*(t??1),this.a,this.b,this.opacity)},darker(t){return new Ae(this.l-ka*(t??1),this.a,this.b,this.opacity)},rgb(){var t=(this.l+16)/116,e=isNaN(this.a)?t:t+this.a/500,n=isNaN(this.b)?t:t-this.b/200;return e=Jp*Uc(e),t=tg*Uc(t),n=eg*Uc(n),new kt(Bc(3.1338561*e-1.6168667*t-.4906146*n),Bc(-.9787684*e+1.9161415*t+.033454*n),Bc(.0719453*e-.2289914*t+1.4052427*n),this.opacity)}}));function Oc(t){return t>s8?Math.pow(t,1/3):t/rg+ng}function Uc(t){return t>Dr?t*t*t:rg*(t-ng)}function Bc(t){return 255*(t<=.0031308?12.92*t:1.055*Math.pow(t,1/2.4)-.055)}function Yc(t){return(t/=255)<=.04045?t/12.92:Math.pow((t+.055)/1.055,2.4)}function og(t){if(t instanceof Ce)return new Ce(t.h,t.c,t.l,t.opacity);if(t instanceof Ae||(t=ig(t)),t.a===0&&t.b===0)return new Ce(NaN,0<t.l&&t.l<100?0:NaN,t.l,t.opacity);var e=Math.atan2(t.b,t.a)*Qp;return new Ce(e<0?e+360:e,Math.sqrt(t.a*t.a+t.b*t.b),t.l,t.opacity)}function c8(t,e,n,r){return arguments.length===1?og(t):new Ce(n,e,t,r??1)}function Ca(t,e,n,r){return arguments.length===1?og(t):new Ce(t,e,n,r??1)}function Ce(t,e,n,r){this.h=+t,this.c=+e,this.l=+n,this.opacity=+r}function ag(t){if(isNaN(t.h))return new Ae(t.l,0,0,t.opacity);var e=t.h*Kp;return new Ae(t.l,Math.cos(e)*t.c,Math.sin(e)*t.c,t.opacity)}Ar(Ce,Ca,Li(ln,{brighter(t){return new Ce(this.h,this.c,this.l+ka*(t??1),this.opacity)},darker(t){return new Ce(this.h,this.c,this.l-ka*(t??1),this.opacity)},rgb(){return ag(this).rgb()}}));var sg=-.14861,Wc=1.78277,Hc=-.29227,Ra=-.90649,Ri=1.97294,ug=Ri*Ra,cg=Ri*Wc,lg=Wc*Hc-Ra*sg;function l8(t){if(t instanceof On)return new On(t.h,t.s,t.l,t.opacity);t instanceof kt||(t=Gc(t));var e=t.r/255,n=t.g/255,r=t.b/255,i=(lg*r+ug*e-cg*n)/(lg+ug-cg),o=r-i,a=(Ri*(n-i)-Hc*o)/Ra,s=Math.sqrt(a*a+o*o)/(Ri*i*(1-i)),u=s?Math.atan2(a,o)*Qp-120:NaN;return new On(u<0?u+360:u,s,i,t.opacity)}function Me(t,e,n,r){return arguments.length===1?l8(t):new On(t,e,n,r??1)}function On(t,e,n,r){this.h=+t,this.s=+e,this.l=+n,this.opacity=+r}Ar(On,Me,Li(ln,{brighter(t){return t=t==null?Mr:Math.pow(Mr,t),new On(this.h,this.s,this.l*t,this.opacity)},darker(t){return t=t==null?Fn:Math.pow(Fn,t),new On(this.h,this.s,this.l*t,this.opacity)},rgb(){var t=isNaN(this.h)?0:(this.h+120)*Kp,e=+this.l,n=isNaN(this.s)?0:this.s*e*(1-e),r=Math.cos(t),i=Math.sin(t);return new kt(255*(e+n*(sg*r+Wc*i)),255*(e+n*(Hc*r+Ra*i)),255*(e+n*(Ri*r)),this.opacity)}}));function fg(t,e,n,r,i){var o=t*t,a=o*t;return((1-3*t+3*o-a)*e+(4-6*o+3*a)*n+(1+3*t+3*o-3*a)*r+a*i)/6}function hg(t){var e=t.length-1;return function(n){var r=n<=0?n=0:n>=1?(n=1,e-1):Math.floor(n*e),i=t[r],o=t[r+1],a=r>0?t[r-1]:2*i-o,s=r<e-1?t[r+2]:2*o-i;return fg((n-r/e)*e,a,i,o,s)}}function dg(t){var e=t.length;return function(n){var r=Math.floor(((n%=1)<0?++n:n)*e),i=t[(r+e-1)%e],o=t[r%e],a=t[(r+1)%e],s=t[(r+2)%e];return fg((n-r/e)*e,i,o,a,s)}}const Ia=t=>()=>t;function pg(t,e){return function(n){return t+n*e}}function f8(t,e,n){return t=Math.pow(t,n),e=Math.pow(e,n)-t,n=1/n,function(r){return Math.pow(t+r*e,n)}}function Na(t,e){var n=e-t;return n?pg(t,n>180||n<-180?n-360*Math.round(n/360):n):Ia(isNaN(t)?e:t)}function h8(t){return(t=+t)==1?Lt:function(e,n){return n-e?f8(e,n,t):Ia(isNaN(e)?n:e)}}function Lt(t,e){var n=e-t;return n?pg(t,n):Ia(isNaN(t)?e:t)}const Ii=function t(e){var n=h8(e);function r(i,o){var a=n((i=Pr(i)).r,(o=Pr(o)).r),s=n(i.g,o.g),u=n(i.b,o.b),c=Lt(i.opacity,o.opacity);return function(l){return i.r=a(l),i.g=s(l),i.b=u(l),i.opacity=c(l),i+""}}return r.gamma=t,r}(1);function gg(t){return function(e){var n=e.length,r=new Array(n),i=new Array(n),o=new Array(n),a,s;for(a=0;a<n;++a)s=Pr(e[a]),r[a]=s.r||0,i[a]=s.g||0,o[a]=s.b||0;return r=t(r),i=t(i),o=t(o),s.opacity=1,function(u){return s.r=r(u),s.g=i(u),s.b=o(u),s+""}}}var mg=gg(hg),d8=gg(dg);function qc(t,e){e||(e=[]);var n=t?Math.min(e.length,t.length):0,r=e.slice(),i;return function(o){for(i=0;i<n;++i)r[i]=t[i]*(1-o)+e[i]*o;return r}}function yg(t){return ArrayBuffer.isView(t)&&!(t instanceof DataView)}function p8(t,e){return(yg(e)?qc:bg)(t,e)}function bg(t,e){var n=e?e.length:0,r=t?Math.min(n,t.length):0,i=new Array(r),o=new Array(n),a;for(a=0;a<r;++a)i[a]=hn(t[a],e[a]);for(;a<n;++a)o[a]=e[a];return function(s){for(a=0;a<r;++a)o[a]=i[a](s);return o}}function vg(t,e){var n=new Date;return t=+t,e=+e,function(r){return n.setTime(t*(1-r)+e*r),n}}function fe(t,e){return t=+t,e=+e,function(n){return t*(1-n)+e*n}}function xg(t,e){var n={},r={},i;(t===null||typeof t!="object")&&(t={}),(e===null||typeof e!="object")&&(e={});for(i in e)i in t?n[i]=hn(t[i],e[i]):r[i]=e[i];return function(o){for(i in n)r[i]=n[i](o);return r}}var Xc=/[-+]?(?:\d+\.?\d*|\.?\d+)(?:[eE][-+]?\d+)?/g,Vc=new RegExp(Xc.source,"g");function g8(t){return function(){return t}}function m8(t){return function(e){return t(e)+""}}function jc(t,e){var n=Xc.lastIndex=Vc.lastIndex=0,r,i,o,a=-1,s=[],u=[];for(t=t+"",e=e+"";(r=Xc.exec(t))&&(i=Vc.exec(e));)(o=i.index)>n&&(o=e.slice(n,o),s[a]?s[a]+=o:s[++a]=o),(r=r[0])===(i=i[0])?s[a]?s[a]+=i:s[++a]=i:(s[++a]=null,u.push({i:a,x:fe(r,i)})),n=Vc.lastIndex;return n<e.length&&(o=e.slice(n),s[a]?s[a]+=o:s[++a]=o),s.length<2?u[0]?m8(u[0].x):g8(e):(e=u.length,function(c){for(var l=0,h;l<e;++l)s[(h=u[l]).i]=h.x(c);return s.join("")})}function hn(t,e){var n=typeof e,r;return e==null||n==="boolean"?Ia(e):(n==="number"?fe:n==="string"?(r=fn(e))?(e=r,Ii):jc:e instanceof fn?Ii:e instanceof Date?vg:yg(e)?qc:Array.isArray(e)?bg:typeof e.valueOf!="function"&&typeof e.toString!="function"||isNaN(e)?xg:fe)(t,e)}function y8(t){var e=t.length;return function(n){return t[Math.max(0,Math.min(e-1,Math.floor(n*e)))]}}function b8(t,e){var n=Na(+t,+e);return function(r){var i=n(r);return i-360*Math.floor(i/360)}}function Fa(t,e){return t=+t,e=+e,function(n){return Math.round(t*(1-n)+e*n)}}var _g=180/Math.PI,Zc={translateX:0,translateY:0,rotate:0,skewX:0,scaleX:1,scaleY:1};function wg(t,e,n,r,i,o){var a,s,u;return(a=Math.sqrt(t*t+e*e))&&(t/=a,e/=a),(u=t*n+e*r)&&(n-=t*u,r-=e*u),(s=Math.sqrt(n*n+r*r))&&(n/=s,r/=s,u/=s),t*r<e*n&&(t=-t,e=-e,u=-u,a=-a),{translateX:i,translateY:o,rotate:Math.atan2(e,t)*_g,skewX:Math.atan(u)*_g,scaleX:a,scaleY:s}}var Ga;function v8(t){const e=new(typeof DOMMatrix=="function"?DOMMatrix:WebKitCSSMatrix)(t+"");return e.isIdentity?Zc:wg(e.a,e.b,e.c,e.d,e.e,e.f)}function x8(t){return t==null||(Ga||(Ga=document.createElementNS("http://www.w3.org/2000/svg","g")),Ga.setAttribute("transform",t),!(t=Ga.transform.baseVal.consolidate()))?Zc:(t=t.matrix,wg(t.a,t.b,t.c,t.d,t.e,t.f))}function $g(t,e,n,r){function i(c){return c.length?c.pop()+" ":""}function o(c,l,h,f,d,p){if(c!==h||l!==f){var g=d.push("translate(",null,e,null,n);p.push({i:g-4,x:fe(c,h)},{i:g-2,x:fe(l,f)})}else(h||f)&&d.push("translate("+h+e+f+n)}function a(c,l,h,f){c!==l?(c-l>180?l+=360:l-c>180&&(c+=360),f.push({i:h.push(i(h)+"rotate(",null,r)-2,x:fe(c,l)})):l&&h.push(i(h)+"rotate("+l+r)}function s(c,l,h,f){c!==l?f.push({i:h.push(i(h)+"skewX(",null,r)-2,x:fe(c,l)}):l&&h.push(i(h)+"skewX("+l+r)}function u(c,l,h,f,d,p){if(c!==h||l!==f){var g=d.push(i(d)+"scale(",null,",",null,")");p.push({i:g-4,x:fe(c,h)},{i:g-2,x:fe(l,f)})}else(h!==1||f!==1)&&d.push(i(d)+"scale("+h+","+f+")")}return function(c,l){var h=[],f=[];return c=t(c),l=t(l),o(c.translateX,c.translateY,l.translateX,l.translateY,h,f),a(c.rotate,l.rotate,h,f),s(c.skewX,l.skewX,h,f),u(c.scaleX,c.scaleY,l.scaleX,l.scaleY,h,f),c=l=null,function(d){for(var p=-1,g=f.length,m;++p<g;)h[(m=f[p]).i]=m.x(d);return h.join("")}}}var Sg=$g(v8,"px, ","px)","deg)"),Ag=$g(x8,", ",")",")"),_8=1e-12;function Mg(t){return((t=Math.exp(t))+1/t)/2}function w8(t){return((t=Math.exp(t))-1/t)/2}function $8(t){return((t=Math.exp(2*t))-1)/(t+1)}const Tg=function t(e,n,r){function i(o,a){var s=o[0],u=o[1],c=o[2],l=a[0],h=a[1],f=a[2],d=l-s,p=h-u,g=d*d+p*p,m,y;if(g<_8)y=Math.log(f/c)/e,m=function(w){return[s+w*d,u+w*p,c*Math.exp(e*w*y)]};else{var _=Math.sqrt(g),x=(f*f-c*c+r*g)/(2*c*n*_),b=(f*f-c*c-r*g)/(2*f*n*_),$=Math.log(Math.sqrt(x*x+1)-x),v=Math.log(Math.sqrt(b*b+1)-b);y=(v-$)/e,m=function(w){var S=w*y,D=Mg($),E=c/(n*_)*(D*$8(e*S+$)-w8($));return[s+E*d,u+E*p,c*D/Mg(e*S+$)]}}return m.duration=y*1e3*e/Math.SQRT2,m}return i.rho=function(o){var a=Math.max(.001,+o),s=a*a,u=s*s;return t(a,s,u)},i}(Math.SQRT2,2,4);function Pg(t){return function(e,n){var r=t((e=Da(e)).h,(n=Da(n)).h),i=Lt(e.s,n.s),o=Lt(e.l,n.l),a=Lt(e.opacity,n.opacity);return function(s){return e.h=r(s),e.s=i(s),e.l=o(s),e.opacity=a(s),e+""}}}const S8=Pg(Na);var A8=Pg(Lt);function M8(t,e){var n=Lt((t=La(t)).l,(e=La(e)).l),r=Lt(t.a,e.a),i=Lt(t.b,e.b),o=Lt(t.opacity,e.opacity);return function(a){return t.l=n(a),t.a=r(a),t.b=i(a),t.opacity=o(a),t+""}}function Dg(t){return function(e,n){var r=t((e=Ca(e)).h,(n=Ca(n)).h),i=Lt(e.c,n.c),o=Lt(e.l,n.l),a=Lt(e.opacity,n.opacity);return function(s){return e.h=r(s),e.c=i(s),e.l=o(s),e.opacity=a(s),e+""}}}const T8=Dg(Na);var P8=Dg(Lt);function Eg(t){return function e(n){n=+n;function r(i,o){var a=t((i=Me(i)).h,(o=Me(o)).h),s=Lt(i.s,o.s),u=Lt(i.l,o.l),c=Lt(i.opacity,o.opacity);return function(l){return i.h=a(l),i.s=s(l),i.l=u(Math.pow(l,n)),i.opacity=c(l),i+""}}return r.gamma=e,r}(1)}const D8=Eg(Na);var za=Eg(Lt);function kg(t,e){e===void 0&&(e=t,t=hn);for(var n=0,r=e.length-1,i=e[0],o=new Array(r<0?0:r);n<r;)o[n]=t(i,i=e[++n]);return function(a){var s=Math.max(0,Math.min(r-1,Math.floor(a*=r)));return o[s](a-s)}}function E8(t,e){for(var n=new Array(e),r=0;r<e;++r)n[r]=t(r/(e-1));return n}var Er=0,Ni=0,Fi=0,Lg=1e3,Oa,Gi,Ua=0,Un=0,Ba=0,zi=typeof performance=="object"&&performance.now?performance:Date,Cg=typeof window=="object"&&window.requestAnimationFrame?window.requestAnimationFrame.bind(window):function(t){setTimeout(t,17)};function Oi(){return Un||(Cg(k8),Un=zi.now()+Ba)}function k8(){Un=0}function Ui(){this._call=this._time=this._next=null}Ui.prototype=Ya.prototype={constructor:Ui,restart:function(t,e,n){if(typeof t!="function")throw new TypeError("callback is not a function");n=(n==null?Oi():+n)+(e==null?0:+e),!this._next&&Gi!==this&&(Gi?Gi._next=this:Oa=this,Gi=this),this._call=t,this._time=n,Kc()},stop:function(){this._call&&(this._call=null,this._time=1/0,Kc())}};function Ya(t,e,n){var r=new Ui;return r.restart(t,e,n),r}function Rg(){Oi(),++Er;for(var t=Oa,e;t;)(e=Un-t._time)>=0&&t._call.call(void 0,e),t=t._next;--Er}function Ig(){Un=(Ua=zi.now())+Ba,Er=Ni=0;try{Rg()}finally{Er=0,C8(),Un=0}}function L8(){var t=zi.now(),e=t-Ua;e>Lg&&(Ba-=e,Ua=t)}function C8(){for(var t,e=Oa,n,r=1/0;e;)e._call?(r>e._time&&(r=e._time),t=e,e=e._next):(n=e._next,e._next=null,e=t?t._next=n:Oa=n);Gi=t,Kc(r)}function Kc(t){if(!Er){Ni&&(Ni=clearTimeout(Ni));var e=t-Un;e>24?(t<1/0&&(Ni=setTimeout(Ig,t-zi.now()-Ba)),Fi&&(Fi=clearInterval(Fi))):(Fi||(Ua=zi.now(),Fi=setInterval(L8,Lg)),Er=1,Cg(Ig))}}function Qc(t,e,n){var r=new Ui;return e=e==null?0:+e,r.restart(i=>{r.stop(),t(i+e)},e,n),r}function R8(t,e,n){var r=new Ui,i=e;return e==null?(r.restart(t,e,n),r):(r._restart=r.restart,r.restart=function(o,a,s){a=+a,s=s==null?Oi():+s,r._restart(function u(c){c+=i,r._restart(u,i+=a,s),o(c)},a,s)},r.restart(t,e,n),r)}var I8=Rn("start","end","cancel","interrupt"),N8=[],Ng=0,Jc=1,tl=2,Wa=3,Fg=4,el=5,Ha=6;function qa(t,e,n,r,i,o){var a=t.__transition;if(!a)t.__transition={};else if(n in a)return;F8(t,n,{name:e,index:r,group:i,on:I8,tween:N8,time:o.time,delay:o.delay,duration:o.duration,ease:o.ease,timer:null,state:Ng})}function nl(t,e){var n=Te(t,e);if(n.state>Ng)throw new Error("too late; already scheduled");return n}function Re(t,e){var n=Te(t,e);if(n.state>Wa)throw new Error("too late; already running");return n}function Te(t,e){var n=t.__transition;if(!n||!(n=n[e]))throw new Error("transition not found");return n}function F8(t,e,n){var r=t.__transition,i;r[e]=n,n.timer=Ya(o,0,n.time);function o(c){n.state=Jc,n.timer.restart(a,n.delay,n.time),n.delay<=c&&a(c-n.delay)}function a(c){var l,h,f,d;if(n.state!==Jc)return u();for(l in r)if(d=r[l],d.name===n.name){if(d.state===Wa)return Qc(a);d.state===Fg?(d.state=Ha,d.timer.stop(),d.on.call("interrupt",t,t.__data__,d.index,d.group),delete r[l]):+l<e&&(d.state=Ha,d.timer.stop(),d.on.call("cancel",t,t.__data__,d.index,d.group),delete r[l])}if(Qc(function(){n.state===Wa&&(n.state=Fg,n.timer.restart(s,n.delay,n.time),s(c))}),n.state=tl,n.on.call("start",t,t.__data__,n.index,n.group),n.state===tl){for(n.state=Wa,i=new Array(f=n.tween.length),l=0,h=-1;l<f;++l)(d=n.tween[l].value.call(t,t.__data__,n.index,n.group))&&(i[++h]=d);i.length=h+1}}function s(c){for(var l=c<n.duration?n.ease.call(null,c/n.duration):(n.timer.restart(u),n.state=el,1),h=-1,f=i.length;++h<f;)i[h].call(t,l);n.state===el&&(n.on.call("end",t,t.__data__,n.index,n.group),u())}function u(){n.state=Ha,n.timer.stop(),delete r[e];for(var c in r)return;delete t.__transition}}function Bn(t,e){var n=t.__transition,r,i,o=!0,a;if(n){e=e==null?null:e+"";for(a in n){if((r=n[a]).name!==e){o=!1;continue}i=r.state>tl&&r.state<el,r.state=Ha,r.timer.stop(),r.on.call(i?"interrupt":"cancel",t,t.__data__,r.index,r.group),delete n[a]}o&&delete t.__transition}}function G8(t){return this.each(function(){Bn(this,t)})}function z8(t,e){var n,r;return function(){var i=Re(this,t),o=i.tween;if(o!==n){r=n=o;for(var a=0,s=r.length;a<s;++a)if(r[a].name===e){r=r.slice(),r.splice(a,1);break}}i.tween=r}}function O8(t,e,n){var r,i;if(typeof n!="function")throw new Error;return function(){var o=Re(this,t),a=o.tween;if(a!==r){i=(r=a).slice();for(var s={name:e,value:n},u=0,c=i.length;u<c;++u)if(i[u].name===e){i[u]=s;break}u===c&&i.push(s)}o.tween=i}}function U8(t,e){var n=this._id;if(t+="",arguments.length<2){for(var r=Te(this.node(),n).tween,i=0,o=r.length,a;i<o;++i)if((a=r[i]).name===t)return a.value;return null}return this.each((e==null?z8:O8)(n,t,e))}function rl(t,e,n){var r=t._id;return t.each(function(){var i=Re(this,r);(i.value||(i.value={}))[e]=n.apply(this,arguments)}),function(i){return Te(i,r).value[e]}}function Gg(t,e){var n;return(typeof e=="number"?fe:e instanceof fn?Ii:(n=fn(e))?(e=n,Ii):jc)(t,e)}function B8(t){return function(){this.removeAttribute(t)}}function Y8(t){return function(){this.removeAttributeNS(t.space,t.local)}}function W8(t,e,n){var r,i=n+"",o;return function(){var a=this.getAttribute(t);return a===i?null:a===r?o:o=e(r=a,n)}}function H8(t,e,n){var r,i=n+"",o;return function(){var a=this.getAttributeNS(t.space,t.local);return a===i?null:a===r?o:o=e(r=a,n)}}function q8(t,e,n){var r,i,o;return function(){var a,s=n(this),u;return s==null?void this.removeAttribute(t):(a=this.getAttribute(t),u=s+"",a===u?null:a===r&&u===i?o:(i=u,o=e(r=a,s)))}}function X8(t,e,n){var r,i,o;return function(){var a,s=n(this),u;return s==null?void this.removeAttributeNS(t.space,t.local):(a=this.getAttributeNS(t.space,t.local),u=s+"",a===u?null:a===r&&u===i?o:(i=u,o=e(r=a,s)))}}function V8(t,e){var n=Ei(t),r=n==="transform"?Ag:Gg;return this.attrTween(t,typeof e=="function"?(n.local?X8:q8)(n,r,rl(this,"attr."+t,e)):e==null?(n.local?Y8:B8)(n):(n.local?H8:W8)(n,r,e))}function j8(t,e){return function(n){this.setAttribute(t,e.call(this,n))}}function Z8(t,e){return function(n){this.setAttributeNS(t.space,t.local,e.call(this,n))}}function K8(t,e){var n,r;function i(){var o=e.apply(this,arguments);return o!==r&&(n=(r=o)&&Z8(t,o)),n}return i._value=e,i}function Q8(t,e){var n,r;function i(){var o=e.apply(this,arguments);return o!==r&&(n=(r=o)&&j8(t,o)),n}return i._value=e,i}function J8(t,e){var n="attr."+t;if(arguments.length<2)return(n=this.tween(n))&&n._value;if(e==null)return this.tween(n,null);if(typeof e!="function")throw new Error;var r=Ei(t);return this.tween(n,(r.local?K8:Q8)(r,e))}function t4(t,e){return function(){nl(this,t).delay=+e.apply(this,arguments)}}function e4(t,e){return e=+e,function(){nl(this,t).delay=e}}function n4(t){var e=this._id;return arguments.length?this.each((typeof t=="function"?t4:e4)(e,t)):Te(this.node(),e).delay}function r4(t,e){return function(){Re(this,t).duration=+e.apply(this,arguments)}}function i4(t,e){return e=+e,function(){Re(this,t).duration=e}}function o4(t){var e=this._id;return arguments.length?this.each((typeof t=="function"?r4:i4)(e,t)):Te(this.node(),e).duration}function a4(t,e){if(typeof e!="function")throw new Error;return function(){Re(this,t).ease=e}}function s4(t){var e=this._id;return arguments.length?this.each(a4(e,t)):Te(this.node(),e).ease}function u4(t,e){return function(){var n=e.apply(this,arguments);if(typeof n!="function")throw new Error;Re(this,t).ease=n}}function c4(t){if(typeof t!="function")throw new Error;return this.each(u4(this._id,t))}function l4(t){typeof t!="function"&&(t=kc(t));for(var e=this._groups,n=e.length,r=new Array(n),i=0;i<n;++i)for(var o=e[i],a=o.length,s=r[i]=[],u,c=0;c<a;++c)(u=o[c])&&t.call(u,u.__data__,c,o)&&s.push(u);return new Ie(r,this._parents,this._name,this._id)}function f4(t){if(t._id!==this._id)throw new Error;for(var e=this._groups,n=t._groups,r=e.length,i=n.length,o=Math.min(r,i),a=new Array(r),s=0;s<o;++s)for(var u=e[s],c=n[s],l=u.length,h=a[s]=new Array(l),f,d=0;d<l;++d)(f=u[d]||c[d])&&(h[d]=f);for(;s<r;++s)a[s]=e[s];return new Ie(a,this._parents,this._name,this._id)}function h4(t){return(t+"").trim().split(/^|\s+/).every(function(e){var n=e.indexOf(".");return n>=0&&(e=e.slice(0,n)),!e||e==="start"})}function d4(t,e,n){var r,i,o=h4(e)?nl:Re;return function(){var a=o(this,t),s=a.on;s!==r&&(i=(r=s).copy()).on(e,n),a.on=i}}function p4(t,e){var n=this._id;return arguments.length<2?Te(this.node(),n).on.on(t):this.each(d4(n,t,e))}function g4(t){return function(){var e=this.parentNode;for(var n in this.__transition)if(+n!==t)return;e&&e.removeChild(this)}}function m4(){return this.on("end.remove",g4(this._id))}function y4(t){var e=this._name,n=this._id;typeof t!="function"&&(t=wa(t));for(var r=this._groups,i=r.length,o=new Array(i),a=0;a<i;++a)for(var s=r[a],u=s.length,c=o[a]=new Array(u),l,h,f=0;f<u;++f)(l=s[f])&&(h=t.call(l,l.__data__,f,s))&&("__data__"in l&&(h.__data__=l.__data__),c[f]=h,qa(c[f],e,n,f,c,Te(l,n)));return new Ie(o,this._parents,e,n)}function b4(t){var e=this._name,n=this._id;typeof t!="function"&&(t=Ec(t));for(var r=this._groups,i=r.length,o=[],a=[],s=0;s<i;++s)for(var u=r[s],c=u.length,l,h=0;h<c;++h)if(l=u[h]){for(var f=t.call(l,l.__data__,h,u),d,p=Te(l,n),g=0,m=f.length;g<m;++g)(d=f[g])&&qa(d,e,n,g,f,p);o.push(f),a.push(l)}return new Ie(o,a,e,n)}var v4=Nn.prototype.constructor;function x4(){return new v4(this._groups,this._parents)}function _4(t,e){var n,r,i;return function(){var o=In(this,t),a=(this.style.removeProperty(t),In(this,t));return o===a?null:o===n&&a===r?i:i=e(n=o,r=a)}}function zg(t){return function(){this.style.removeProperty(t)}}function w4(t,e,n){var r,i=n+"",o;return function(){var a=In(this,t);return a===i?null:a===r?o:o=e(r=a,n)}}function $4(t,e,n){var r,i,o;return function(){var a=In(this,t),s=n(this),u=s+"";return s==null&&(u=s=(this.style.removeProperty(t),In(this,t))),a===u?null:a===r&&u===i?o:(i=u,o=e(r=a,s))}}function S4(t,e){var n,r,i,o="style."+e,a="end."+o,s;return function(){var u=Re(this,t),c=u.on,l=u.value[o]==null?s||(s=zg(e)):void 0;(c!==n||i!==l)&&(r=(n=c).copy()).on(a,i=l),u.on=r}}function A4(t,e,n){var r=(t+="")=="transform"?Sg:Gg;return e==null?this.styleTween(t,_4(t,r)).on("end.style."+t,zg(t)):typeof e=="function"?this.styleTween(t,$4(t,r,rl(this,"style."+t,e))).each(S4(this._id,t)):this.styleTween(t,w4(t,r,e),n).on("end.style."+t,null)}function M4(t,e,n){return function(r){this.style.setProperty(t,e.call(this,r),n)}}function T4(t,e,n){var r,i;function o(){var a=e.apply(this,arguments);return a!==i&&(r=(i=a)&&M4(t,a,n)),r}return o._value=e,o}function P4(t,e,n){var r="style."+(t+="");if(arguments.length<2)return(r=this.tween(r))&&r._value;if(e==null)return this.tween(r,null);if(typeof e!="function")throw new Error;return this.tween(r,T4(t,e,n??""))}function D4(t){return function(){this.textContent=t}}function E4(t){return function(){var e=t(this);this.textContent=e??""}}function k4(t){return this.tween("text",typeof t=="function"?E4(rl(this,"text",t)):D4(t==null?"":t+""))}function L4(t){return function(e){this.textContent=t.call(this,e)}}function C4(t){var e,n;function r(){var i=t.apply(this,arguments);return i!==n&&(e=(n=i)&&L4(i)),e}return r._value=t,r}function R4(t){var e="text";if(arguments.length<1)return(e=this.tween(e))&&e._value;if(t==null)return this.tween(e,null);if(typeof t!="function")throw new Error;return this.tween(e,C4(t))}function I4(){for(var t=this._name,e=this._id,n=Ug(),r=this._groups,i=r.length,o=0;o<i;++o)for(var a=r[o],s=a.length,u,c=0;c<s;++c)if(u=a[c]){var l=Te(u,e);qa(u,t,n,c,a,{time:l.time+l.delay+l.duration,delay:0,duration:l.duration,ease:l.ease})}return new Ie(r,this._parents,t,n)}function N4(){var t,e,n=this,r=n._id,i=n.size();return new Promise(function(o,a){var s={value:a},u={value:function(){--i===0&&o()}};n.each(function(){var c=Re(this,r),l=c.on;l!==t&&(e=(t=l).copy(),e._.cancel.push(s),e._.interrupt.push(s),e._.end.push(u)),c.on=e}),i===0&&o()})}var F4=0;function Ie(t,e,n,r){this._groups=t,this._parents=e,this._name=n,this._id=r}function Og(t){return Nn().transition(t)}function Ug(){return++F4}var Xe=Nn.prototype;Ie.prototype=Og.prototype={constructor:Ie,select:y4,selectAll:b4,selectChild:Xe.selectChild,selectChildren:Xe.selectChildren,filter:l4,merge:f4,selection:x4,transition:I4,call:Xe.call,nodes:Xe.nodes,node:Xe.node,size:Xe.size,empty:Xe.empty,each:Xe.each,on:p4,attr:V8,attrTween:J8,style:A4,styleTween:P4,text:k4,textTween:R4,remove:m4,tween:U8,delay:n4,duration:o4,ease:s4,easeVarying:c4,end:N4,[Symbol.iterator]:Xe[Symbol.iterator]};const G4=t=>+t;function z4(t){return t*t}function O4(t){return t*(2-t)}function Bg(t){return((t*=2)<=1?t*t:--t*(2-t)+1)/2}function U4(t){return t*t*t}function B4(t){return--t*t*t+1}function Bi(t){return((t*=2)<=1?t*t*t:(t-=2)*t*t+2)/2}var il=3,Y4=function t(e){e=+e;function n(r){return Math.pow(r,e)}return n.exponent=t,n}(il),W4=function t(e){e=+e;function n(r){return 1-Math.pow(1-r,e)}return n.exponent=t,n}(il),Yg=function t(e){e=+e;function n(r){return((r*=2)<=1?Math.pow(r,e):2-Math.pow(2-r,e))/2}return n.exponent=t,n}(il),Wg=Math.PI,Hg=Wg/2;function H4(t){return+t==1?1:1-Math.cos(t*Hg)}function q4(t){return Math.sin(t*Hg)}function qg(t){return(1-Math.cos(Wg*t))/2}function dn(t){return(Math.pow(2,-10*t)-.0009765625)*1.0009775171065494}function X4(t){return dn(1-+t)}function V4(t){return 1-dn(t)}function Xg(t){return((t*=2)<=1?dn(1-t):2-dn(t-1))/2}function j4(t){return 1-Math.sqrt(1-t*t)}function Z4(t){return Math.sqrt(1- --t*t)}function Vg(t){return((t*=2)<=1?1-Math.sqrt(1-t*t):Math.sqrt(1-(t-=2)*t)+1)/2}var ol=4/11,K4=6/11,Q4=8/11,J4=3/4,tM=9/11,eM=10/11,nM=15/16,rM=21/22,iM=63/64,Xa=1/ol/ol;function oM(t){return 1-Yi(1-t)}function Yi(t){return(t=+t)<ol?Xa*t*t:t<Q4?Xa*(t-=K4)*t+J4:t<eM?Xa*(t-=tM)*t+nM:Xa*(t-=rM)*t+iM}function aM(t){return((t*=2)<=1?1-Yi(1-t):Yi(t-1)+1)/2}var al=1.70158,sM=function t(e){e=+e;function n(r){return(r=+r)*r*(e*(r-1)+r)}return n.overshoot=t,n}(al),uM=function t(e){e=+e;function n(r){return--r*r*((r+1)*e+r)+1}return n.overshoot=t,n}(al),jg=function t(e){e=+e;function n(r){return((r*=2)<1?r*r*((e+1)*r-e):(r-=2)*r*((e+1)*r+e)+2)/2}return n.overshoot=t,n}(al),kr=2*Math.PI,sl=1,ul=.3,cM=function t(e,n){var r=Math.asin(1/(e=Math.max(1,e)))*(n/=kr);function i(o){return e*dn(- --o)*Math.sin((r-o)/n)}return i.amplitude=function(o){return t(o,n*kr)},i.period=function(o){return t(e,o)},i}(sl,ul),Va=function t(e,n){var r=Math.asin(1/(e=Math.max(1,e)))*(n/=kr);function i(o){return 1-e*dn(o=+o)*Math.sin((o+r)/n)}return i.amplitude=function(o){return t(o,n*kr)},i.period=function(o){return t(e,o)},i}(sl,ul),lM=function t(e,n){var r=Math.asin(1/(e=Math.max(1,e)))*(n/=kr);function i(o){return((o=o*2-1)<0?e*dn(-o)*Math.sin((r-o)/n):2-e*dn(o)*Math.sin((r+o)/n))/2}return i.amplitude=function(o){return t(o,n*kr)},i.period=function(o){return t(e,o)},i}(sl,ul),fM={time:null,delay:0,duration:250,ease:Bi};function hM(t,e){for(var n;!(n=t.__transition)||!(n=n[e]);)if(!(t=t.parentNode))throw new Error(`transition ${e} not found`);return n}function dM(t){var e,n;t instanceof Ie?(e=t._id,t=t._name):(e=Ug(),(n=fM).time=Oi(),t=t==null?null:t+"");for(var r=this._groups,i=r.length,o=0;o<i;++o)for(var a=r[o],s=a.length,u,c=0;c<s;++c)(u=a[c])&&qa(u,t,e,c,a,n||hM(u,e));return new Ie(r,this._parents,t,e)}Nn.prototype.interrupt=G8,Nn.prototype.transition=dM;var pM=[null];function gM(t,e){var n=t.__transition,r,i;if(n){e=e==null?null:e+"";for(i in n)if((r=n[i]).state>Jc&&r.name===e)return new Ie([[t]],pM,e,+i)}return null}const cl=t=>()=>t;function mM(t,{sourceEvent:e,target:n,selection:r,mode:i,dispatch:o}){Object.defineProperties(this,{type:{value:t,enumerable:!0,configurable:!0},sourceEvent:{value:e,enumerable:!0,configurable:!0},target:{value:n,enumerable:!0,configurable:!0},selection:{value:r,enumerable:!0,configurable:!0},mode:{value:i,enumerable:!0,configurable:!0},_:{value:o}})}function yM(t){t.stopImmediatePropagation()}function ll(t){t.preventDefault(),t.stopImmediatePropagation()}var Zg={name:"drag"},fl={name:"space"},Lr={name:"handle"},Cr={name:"center"};const{abs:Kg,max:Ft,min:Gt}=Math;function Qg(t){return[+t[0],+t[1]]}function hl(t){return[Qg(t[0]),Qg(t[1])]}var ja={name:"x",handles:["w","e"].map(Wi),input:function(t,e){return t==null?null:[[+t[0],e[0][1]],[+t[1],e[1][1]]]},output:function(t){return t&&[t[0][0],t[1][0]]}},Za={name:"y",handles:["n","s"].map(Wi),input:function(t,e){return t==null?null:[[e[0][0],+t[0]],[e[1][0],+t[1]]]},output:function(t){return t&&[t[0][1],t[1][1]]}},bM={name:"xy",handles:["n","w","e","s","nw","ne","sw","se"].map(Wi),input:function(t){return t==null?null:hl(t)},output:function(t){return t}},Ve={overlay:"crosshair",selection:"move",n:"ns-resize",e:"ew-resize",s:"ns-resize",w:"ew-resize",nw:"nwse-resize",ne:"nesw-resize",se:"nwse-resize",sw:"nesw-resize"},Jg={e:"w",w:"e",nw:"ne",ne:"nw",se:"sw",sw:"se"},t1={n:"s",s:"n",nw:"sw",ne:"se",se:"ne",sw:"nw"},vM={overlay:1,selection:1,n:null,e:1,s:null,w:-1,nw:-1,ne:1,se:1,sw:-1},xM={overlay:1,selection:1,n:-1,e:null,s:1,w:null,nw:-1,ne:-1,se:1,sw:1};function Wi(t){return{type:t}}function _M(t){return!t.ctrlKey&&!t.button}function wM(){var t=this.ownerSVGElement||this;return t.hasAttribute("viewBox")?(t=t.viewBox.baseVal,[[t.x,t.y],[t.x+t.width,t.y+t.height]]):[[0,0],[t.width.baseVal.value,t.height.baseVal.value]]}function $M(){return navigator.maxTouchPoints||"ontouchstart"in this}function dl(t){for(;!t.__brush;)if(!(t=t.parentNode))return;return t.__brush}function SM(t){return t[0][0]===t[1][0]||t[0][1]===t[1][1]}function AM(t){var e=t.__brush;return e?e.dim.output(e.selection):null}function MM(){return pl(ja)}function TM(){return pl(Za)}function PM(){return pl(bM)}function pl(t){var e=wM,n=_M,r=$M,i=!0,o=Rn("start","brush","end"),a=6,s;function u(m){var y=m.property("__brush",g).selectAll(".overlay").data([Wi("overlay")]);y.enter().append("rect").attr("class","overlay").attr("pointer-events","all").attr("cursor",Ve.overlay).merge(y).each(function(){var x=dl(this).extent;Z(this).attr("x",x[0][0]).attr("y",x[0][1]).attr("width",x[1][0]-x[0][0]).attr("height",x[1][1]-x[0][1])}),m.selectAll(".selection").data([Wi("selection")]).enter().append("rect").attr("class","selection").attr("cursor",Ve.selection).attr("fill","#777").attr("fill-opacity",.3).attr("stroke","#fff").attr("shape-rendering","crispEdges");var _=m.selectAll(".handle").data(t.handles,function(x){return x.type});_.exit().remove(),_.enter().append("rect").attr("class",function(x){return"handle handle--"+x.type}).attr("cursor",function(x){return Ve[x.type]}),m.each(c).attr("fill","none").attr("pointer-events","all").on("mousedown.brush",f).filter(r).on("touchstart.brush",f).on("touchmove.brush",d).on("touchend.brush touchcancel.brush",p).style("touch-action","none").style("-webkit-tap-highlight-color","rgba(0,0,0,0)")}u.move=function(m,y,_){m.tween?m.on("start.brush",function(x){l(this,arguments).beforestart().start(x)}).on("interrupt.brush end.brush",function(x){l(this,arguments).end(x)}).tween("brush",function(){var x=this,b=x.__brush,$=l(x,arguments),v=b.selection,w=t.input(typeof y=="function"?y.apply(this,arguments):y,b.extent),S=hn(v,w);function D(E){b.selection=E===1&&w===null?null:S(E),c.call(x),$.brush()}return v!==null&&w!==null?D:D(1)}):m.each(function(){var x=this,b=arguments,$=x.__brush,v=t.input(typeof y=="function"?y.apply(x,b):y,$.extent),w=l(x,b).beforestart();Bn(x),$.selection=v===null?null:v,c.call(x),w.start(_).brush(_).end(_)})},u.clear=function(m,y){u.move(m,null,y)};function c(){var m=Z(this),y=dl(this).selection;y?(m.selectAll(".selection").style("display",null).attr("x",y[0][0]).attr("y",y[0][1]).attr("width",y[1][0]-y[0][0]).attr("height",y[1][1]-y[0][1]),m.selectAll(".handle").style("display",null).attr("x",function(_){return _.type[_.type.length-1]==="e"?y[1][0]-a/2:y[0][0]-a/2}).attr("y",function(_){return _.type[0]==="s"?y[1][1]-a/2:y[0][1]-a/2}).attr("width",function(_){return _.type==="n"||_.type==="s"?y[1][0]-y[0][0]+a:a}).attr("height",function(_){return _.type==="e"||_.type==="w"?y[1][1]-y[0][1]+a:a})):m.selectAll(".selection,.handle").style("display","none").attr("x",null).attr("y",null).attr("width",null).attr("height",null)}function l(m,y,_){var x=m.__brush.emitter;return x&&(!_||!x.clean)?x:new h(m,y,_)}function h(m,y,_){this.that=m,this.args=y,this.state=m.__brush,this.active=0,this.clean=_}h.prototype={beforestart:function(){return++this.active===1&&(this.state.emitter=this,this.starting=!0),this},start:function(m,y){return this.starting?(this.starting=!1,this.emit("start",m,y)):this.emit("brush",m),this},brush:function(m,y){return this.emit("brush",m,y),this},end:function(m,y){return--this.active===0&&(delete this.state.emitter,this.emit("end",m,y)),this},emit:function(m,y,_){var x=Z(this.that).datum();o.call(m,this.that,new mM(m,{sourceEvent:y,target:u,selection:t.output(this.state.selection),mode:_,dispatch:o}),x)}};function f(m){if(s&&!m.touches||!n.apply(this,arguments))return;var y=this,_=m.target.__data__.type,x=(i&&m.metaKey?_="overlay":_)==="selection"?Zg:i&&m.altKey?Cr:Lr,b=t===Za?null:vM[_],$=t===ja?null:xM[_],v=dl(y),w=v.extent,S=v.selection,D=w[0][0],E,T,F=w[0][1],M,A,L=w[1][0],P,I,z=w[1][1],k,R,N=0,C=0,O,X=b&&$&&i&&m.shiftKey,W,V,J=Array.from(m.touches||[m],nt=>{const Mt=nt.identifier;return nt=ae(nt,y),nt.point0=nt.slice(),nt.identifier=Mt,nt});Bn(y);var pt=l(y,arguments,!0).beforestart();if(_==="overlay"){S&&(O=!0);const nt=[J[0],J[1]||J[0]];v.selection=S=[[E=t===Za?D:Gt(nt[0][0],nt[1][0]),M=t===ja?F:Gt(nt[0][1],nt[1][1])],[P=t===Za?L:Ft(nt[0][0],nt[1][0]),k=t===ja?z:Ft(nt[0][1],nt[1][1])]],J.length>1&&xt(m)}else E=S[0][0],M=S[0][1],P=S[1][0],k=S[1][1];T=E,A=M,I=P,R=k;var q=Z(y).attr("pointer-events","none"),rt=q.selectAll(".overlay").attr("cursor",Ve[_]);if(m.touches)pt.moved=Y,pt.ended=gt;else{var ut=Z(m.view).on("mousemove.brush",Y,!0).on("mouseup.brush",gt,!0);i&&ut.on("keydown.brush",Nt,!0).on("keyup.brush",te,!0),Sa(m.view)}c.call(y),pt.start(m,x.name);function Y(nt){for(const Mt of nt.changedTouches||[nt])for(const ko of J)ko.identifier===Mt.identifier&&(ko.cur=ae(Mt,y));if(X&&!W&&!V&&J.length===1){const Mt=J[0];Kg(Mt.cur[0]-Mt[0])>Kg(Mt.cur[1]-Mt[1])?V=!0:W=!0}for(const Mt of J)Mt.cur&&(Mt[0]=Mt.cur[0],Mt[1]=Mt.cur[1]);O=!0,ll(nt),xt(nt)}function xt(nt){const Mt=J[0],ko=Mt.point0;var $n;switch(N=Mt[0]-ko[0],C=Mt[1]-ko[1],x){case fl:case Zg:{b&&(N=Ft(D-E,Gt(L-P,N)),T=E+N,I=P+N),$&&(C=Ft(F-M,Gt(z-k,C)),A=M+C,R=k+C);break}case Lr:{J[1]?(b&&(T=Ft(D,Gt(L,J[0][0])),I=Ft(D,Gt(L,J[1][0])),b=1),$&&(A=Ft(F,Gt(z,J[0][1])),R=Ft(F,Gt(z,J[1][1])),$=1)):(b<0?(N=Ft(D-E,Gt(L-E,N)),T=E+N,I=P):b>0&&(N=Ft(D-P,Gt(L-P,N)),T=E,I=P+N),$<0?(C=Ft(F-M,Gt(z-M,C)),A=M+C,R=k):$>0&&(C=Ft(F-k,Gt(z-k,C)),A=M,R=k+C));break}case Cr:{b&&(T=Ft(D,Gt(L,E-N*b)),I=Ft(D,Gt(L,P+N*b))),$&&(A=Ft(F,Gt(z,M-C*$)),R=Ft(F,Gt(z,k+C*$)));break}}I<T&&(b*=-1,$n=E,E=P,P=$n,$n=T,T=I,I=$n,_ in Jg&&rt.attr("cursor",Ve[_=Jg[_]])),R<A&&($*=-1,$n=M,M=k,k=$n,$n=A,A=R,R=$n,_ in t1&&rt.attr("cursor",Ve[_=t1[_]])),v.selection&&(S=v.selection),W&&(T=S[0][0],I=S[1][0]),V&&(A=S[0][1],R=S[1][1]),(S[0][0]!==T||S[0][1]!==A||S[1][0]!==I||S[1][1]!==R)&&(v.selection=[[T,A],[I,R]],c.call(y),pt.brush(nt,x.name))}function gt(nt){if(yM(nt),nt.touches){if(nt.touches.length)return;s&&clearTimeout(s),s=setTimeout(function(){s=null},500)}else Aa(nt.view,O),ut.on("keydown.brush keyup.brush mousemove.brush mouseup.brush",null);q.attr("pointer-events","all"),rt.attr("cursor",Ve.overlay),v.selection&&(S=v.selection),SM(S)&&(v.selection=null,c.call(y)),pt.end(nt,x.name)}function Nt(nt){switch(nt.keyCode){case 16:{X=b&&$;break}case 18:{x===Lr&&(b&&(P=I-N*b,E=T+N*b),$&&(k=R-C*$,M=A+C*$),x=Cr,xt(nt));break}case 32:{(x===Lr||x===Cr)&&(b<0?P=I-N:b>0&&(E=T-N),$<0?k=R-C:$>0&&(M=A-C),x=fl,rt.attr("cursor",Ve.selection),xt(nt));break}default:return}ll(nt)}function te(nt){switch(nt.keyCode){case 16:{X&&(W=V=X=!1,xt(nt));break}case 18:{x===Cr&&(b<0?P=I:b>0&&(E=T),$<0?k=R:$>0&&(M=A),x=Lr,xt(nt));break}case 32:{x===fl&&(nt.altKey?(b&&(P=I-N*b,E=T+N*b),$&&(k=R-C*$,M=A+C*$),x=Cr):(b<0?P=I:b>0&&(E=T),$<0?k=R:$>0&&(M=A),x=Lr),rt.attr("cursor",Ve[_]),xt(nt));break}default:return}ll(nt)}}function d(m){l(this,arguments).moved(m)}function p(m){l(this,arguments).ended(m)}function g(){var m=this.__brush||{selection:null};return m.extent=hl(e.apply(this,arguments)),m.dim=t,m}return u.extent=function(m){return arguments.length?(e=typeof m=="function"?m:cl(hl(m)),u):e},u.filter=function(m){return arguments.length?(n=typeof m=="function"?m:cl(!!m),u):n},u.touchable=function(m){return arguments.length?(r=typeof m=="function"?m:cl(!!m),u):r},u.handleSize=function(m){return arguments.length?(a=+m,u):a},u.keyModifiers=function(m){return arguments.length?(i=!!m,u):i},u.on=function(){var m=o.on.apply(o,arguments);return m===o?u:m},u}var e1=Math.abs,Rr=Math.cos,Ir=Math.sin,n1=Math.PI,Ka=n1/2,r1=n1*2,i1=Math.max,gl=1e-12;function ml(t,e){return Array.from({length:e-t},(n,r)=>t+r)}function DM(t){return function(e,n){return t(e.source.value+e.target.value,n.source.value+n.target.value)}}function EM(){return yl(!1,!1)}function kM(){return yl(!1,!0)}function LM(){return yl(!0,!1)}function yl(t,e){var n=0,r=null,i=null,o=null;function a(s){var u=s.length,c=new Array(u),l=ml(0,u),h=new Array(u*u),f=new Array(u),d=0,p;s=Float64Array.from({length:u*u},e?(g,m)=>s[m%u][m/u|0]:(g,m)=>s[m/u|0][m%u]);for(let g=0;g<u;++g){let m=0;for(let y=0;y<u;++y)m+=s[g*u+y]+t*s[y*u+g];d+=c[g]=m}d=i1(0,r1-n*u)/d,p=d?n:r1/u;{let g=0;r&&l.sort((m,y)=>r(c[m],c[y]));for(const m of l){const y=g;if(t){const _=ml(~u+1,u).filter(x=>x<0?s[~x*u+m]:s[m*u+x]);i&&_.sort((x,b)=>i(x<0?-s[~x*u+m]:s[m*u+x],b<0?-s[~b*u+m]:s[m*u+b]));for(const x of _)if(x<0){const b=h[~x*u+m]||(h[~x*u+m]={source:null,target:null});b.target={index:m,startAngle:g,endAngle:g+=s[~x*u+m]*d,value:s[~x*u+m]}}else{const b=h[m*u+x]||(h[m*u+x]={source:null,target:null});b.source={index:m,startAngle:g,endAngle:g+=s[m*u+x]*d,value:s[m*u+x]}}f[m]={index:m,startAngle:y,endAngle:g,value:c[m]}}else{const _=ml(0,u).filter(x=>s[m*u+x]||s[x*u+m]);i&&_.sort((x,b)=>i(s[m*u+x],s[m*u+b]));for(const x of _){let b;if(m<x?(b=h[m*u+x]||(h[m*u+x]={source:null,target:null}),b.source={index:m,startAngle:g,endAngle:g+=s[m*u+x]*d,value:s[m*u+x]}):(b=h[x*u+m]||(h[x*u+m]={source:null,target:null}),b.target={index:m,startAngle:g,endAngle:g+=s[m*u+x]*d,value:s[m*u+x]},m===x&&(b.source=b.target)),b.source&&b.target&&b.source.value<b.target.value){const $=b.source;b.source=b.target,b.target=$}}f[m]={index:m,startAngle:y,endAngle:g,value:c[m]}}g+=p}}return h=Object.values(h),h.groups=f,o?h.sort(o):h}return a.padAngle=function(s){return arguments.length?(n=i1(0,s),a):n},a.sortGroups=function(s){return arguments.length?(r=s,a):r},a.sortSubgroups=function(s){return arguments.length?(i=s,a):i},a.sortChords=function(s){return arguments.length?(s==null?o=null:(o=DM(s))._=s,a):o&&o._},a}const bl=Math.PI,vl=2*bl,Yn=1e-6,CM=vl-Yn;function o1(t){this._+=t[0];for(let e=1,n=t.length;e<n;++e)this._+=arguments[e]+t[e]}function RM(t){let e=Math.floor(t);if(!(e>=0))throw new Error(`invalid digits: ${t}`);if(e>15)return o1;const n=10**e;return function(r){this._+=r[0];for(let i=1,o=r.length;i<o;++i)this._+=Math.round(arguments[i]*n)/n+r[i]}}let Hi=class{constructor(e){this._x0=this._y0=this._x1=this._y1=null,this._="",this._append=e==null?o1:RM(e)}moveTo(e,n){this._append`M${this._x0=this._x1=+e},${this._y0=this._y1=+n}`}closePath(){this._x1!==null&&(this._x1=this._x0,this._y1=this._y0,this._append`Z`)}lineTo(e,n){this._append`L${this._x1=+e},${this._y1=+n}`}quadraticCurveTo(e,n,r,i){this._append`Q${+e},${+n},${this._x1=+r},${this._y1=+i}`}bezierCurveTo(e,n,r,i,o,a){this._append`C${+e},${+n},${+r},${+i},${this._x1=+o},${this._y1=+a}`}arcTo(e,n,r,i,o){if(e=+e,n=+n,r=+r,i=+i,o=+o,o<0)throw new Error(`negative radius: ${o}`);let a=this._x1,s=this._y1,u=r-e,c=i-n,l=a-e,h=s-n,f=l*l+h*h;if(this._x1===null)this._append`M${this._x1=e},${this._y1=n}`;else if(f>Yn)if(!(Math.abs(h*u-c*l)>Yn)||!o)this._append`L${this._x1=e},${this._y1=n}`;else{let d=r-a,p=i-s,g=u*u+c*c,m=d*d+p*p,y=Math.sqrt(g),_=Math.sqrt(f),x=o*Math.tan((bl-Math.acos((g+f-m)/(2*y*_)))/2),b=x/_,$=x/y;Math.abs(b-1)>Yn&&this._append`L${e+b*l},${n+b*h}`,this._append`A${o},${o},0,0,${+(h*d>l*p)},${this._x1=e+$*u},${this._y1=n+$*c}`}}arc(e,n,r,i,o,a){if(e=+e,n=+n,r=+r,a=!!a,r<0)throw new Error(`negative radius: ${r}`);let s=r*Math.cos(i),u=r*Math.sin(i),c=e+s,l=n+u,h=1^a,f=a?i-o:o-i;this._x1===null?this._append`M${c},${l}`:(Math.abs(this._x1-c)>Yn||Math.abs(this._y1-l)>Yn)&&this._append`L${c},${l}`,r&&(f<0&&(f=f%vl+vl),f>CM?this._append`A${r},${r},0,1,${h},${e-s},${n-u}A${r},${r},0,1,${h},${this._x1=c},${this._y1=l}`:f>Yn&&this._append`A${r},${r},0,${+(f>=bl)},${h},${this._x1=e+r*Math.cos(o)},${this._y1=n+r*Math.sin(o)}`)}rect(e,n,r,i){this._append`M${this._x0=this._x1=+e},${this._y0=this._y1=+n}h${r=+r}v${+i}h${-r}Z`}toString(){return this._}};function xl(){return new Hi}xl.prototype=Hi.prototype;function IM(t=3){return new Hi(+t)}var NM=Array.prototype.slice;function Wn(t){return function(){return t}}function FM(t){return t.source}function GM(t){return t.target}function a1(t){return t.radius}function zM(t){return t.startAngle}function OM(t){return t.endAngle}function UM(){return 0}function BM(){return 10}function s1(t){var e=FM,n=GM,r=a1,i=a1,o=zM,a=OM,s=UM,u=null;function c(){var l,h=e.apply(this,arguments),f=n.apply(this,arguments),d=s.apply(this,arguments)/2,p=NM.call(arguments),g=+r.apply(this,(p[0]=h,p)),m=o.apply(this,p)-Ka,y=a.apply(this,p)-Ka,_=+i.apply(this,(p[0]=f,p)),x=o.apply(this,p)-Ka,b=a.apply(this,p)-Ka;if(u||(u=l=xl()),d>gl&&(e1(y-m)>d*2+gl?y>m?(m+=d,y-=d):(m-=d,y+=d):m=y=(m+y)/2,e1(b-x)>d*2+gl?b>x?(x+=d,b-=d):(x-=d,b+=d):x=b=(x+b)/2),u.moveTo(g*Rr(m),g*Ir(m)),u.arc(0,0,g,m,y),m!==x||y!==b)if(t){var $=+t.apply(this,arguments),v=_-$,w=(x+b)/2;u.quadraticCurveTo(0,0,v*Rr(x),v*Ir(x)),u.lineTo(_*Rr(w),_*Ir(w)),u.lineTo(v*Rr(b),v*Ir(b))}else u.quadraticCurveTo(0,0,_*Rr(x),_*Ir(x)),u.arc(0,0,_,x,b);if(u.quadraticCurveTo(0,0,g*Rr(m),g*Ir(m)),u.closePath(),l)return u=null,l+""||null}return t&&(c.headRadius=function(l){return arguments.length?(t=typeof l=="function"?l:Wn(+l),c):t}),c.radius=function(l){return arguments.length?(r=i=typeof l=="function"?l:Wn(+l),c):r},c.sourceRadius=function(l){return arguments.length?(r=typeof l=="function"?l:Wn(+l),c):r},c.targetRadius=function(l){return arguments.length?(i=typeof l=="function"?l:Wn(+l),c):i},c.startAngle=function(l){return arguments.length?(o=typeof l=="function"?l:Wn(+l),c):o},c.endAngle=function(l){return arguments.length?(a=typeof l=="function"?l:Wn(+l),c):a},c.padAngle=function(l){return arguments.length?(s=typeof l=="function"?l:Wn(+l),c):s},c.source=function(l){return arguments.length?(e=l,c):e},c.target=function(l){return arguments.length?(n=l,c):n},c.context=function(l){return arguments.length?(u=l??null,c):u},c}function YM(){return s1()}function WM(){return s1(BM)}var HM=Array.prototype,u1=HM.slice;function qM(t,e){return t-e}function XM(t){for(var e=0,n=t.length,r=t[n-1][1]*t[0][0]-t[n-1][0]*t[0][1];++e<n;)r+=t[e-1][1]*t[e][0]-t[e-1][0]*t[e][1];return r}const pn=t=>()=>t;function VM(t,e){for(var n=-1,r=e.length,i;++n<r;)if(i=jM(t,e[n]))return i;return 0}function jM(t,e){for(var n=e[0],r=e[1],i=-1,o=0,a=t.length,s=a-1;o<a;s=o++){var u=t[o],c=u[0],l=u[1],h=t[s],f=h[0],d=h[1];if(ZM(u,h,e))return 0;l>r!=d>r&&n<(f-c)*(r-l)/(d-l)+c&&(i=-i)}return i}function ZM(t,e,n){var r;return KM(t,e,n)&&QM(t[r=+(t[0]===e[0])],n[r],e[r])}function KM(t,e,n){return(e[0]-t[0])*(n[1]-t[1])===(n[0]-t[0])*(e[1]-t[1])}function QM(t,e,n){return t<=e&&e<=n||n<=e&&e<=t}function JM(){}var je=[[],[[[1,1.5],[.5,1]]],[[[1.5,1],[1,1.5]]],[[[1.5,1],[.5,1]]],[[[1,.5],[1.5,1]]],[[[1,1.5],[.5,1]],[[1,.5],[1.5,1]]],[[[1,.5],[1,1.5]]],[[[1,.5],[.5,1]]],[[[.5,1],[1,.5]]],[[[1,1.5],[1,.5]]],[[[.5,1],[1,.5]],[[1.5,1],[1,1.5]]],[[[1.5,1],[1,.5]]],[[[.5,1],[1.5,1]]],[[[1,1.5],[1.5,1]]],[[[.5,1],[1,1.5]]],[]];function _l(){var t=1,e=1,n=$c,r=u;function i(c){var l=n(c);if(Array.isArray(l))l=l.slice().sort(qM);else{const h=Si(c,t7);for(l=Ln(...wc(h[0],h[1],l),l);l[l.length-1]>=h[1];)l.pop();for(;l[1]<h[0];)l.shift()}return l.map(h=>o(c,h))}function o(c,l){const h=l==null?NaN:+l;if(isNaN(h))throw new Error(`invalid value: ${l}`);var f=[],d=[];return a(c,h,function(p){r(p,c,h),XM(p)>0?f.push([p]):d.push(p)}),d.forEach(function(p){for(var g=0,m=f.length,y;g<m;++g)if(VM((y=f[g])[0],p)!==-1){y.push(p);return}}),{type:"MultiPolygon",value:l,coordinates:f}}function a(c,l,h){var f=new Array,d=new Array,p,g,m,y,_,x;for(p=g=-1,y=Hn(c[0],l),je[y<<1].forEach(b);++p<t-1;)m=y,y=Hn(c[p+1],l),je[m|y<<1].forEach(b);for(je[y<<0].forEach(b);++g<e-1;){for(p=-1,y=Hn(c[g*t+t],l),_=Hn(c[g*t],l),je[y<<1|_<<2].forEach(b);++p<t-1;)m=y,y=Hn(c[g*t+t+p+1],l),x=_,_=Hn(c[g*t+p+1],l),je[m|y<<1|_<<2|x<<3].forEach(b);je[y|_<<3].forEach(b)}for(p=-1,_=c[g*t]>=l,je[_<<2].forEach(b);++p<t-1;)x=_,_=Hn(c[g*t+p+1],l),je[_<<2|x<<3].forEach(b);je[_<<3].forEach(b);function b($){var v=[$[0][0]+p,$[0][1]+g],w=[$[1][0]+p,$[1][1]+g],S=s(v),D=s(w),E,T;(E=d[S])?(T=f[D])?(delete d[E.end],delete f[T.start],E===T?(E.ring.push(w),h(E.ring)):f[E.start]=d[T.end]={start:E.start,end:T.end,ring:E.ring.concat(T.ring)}):(delete d[E.end],E.ring.push(w),d[E.end=D]=E):(E=f[D])?(T=d[S])?(delete f[E.start],delete d[T.end],E===T?(E.ring.push(w),h(E.ring)):f[T.start]=d[E.end]={start:T.start,end:E.end,ring:T.ring.concat(E.ring)}):(delete f[E.start],E.ring.unshift(v),f[E.start=S]=E):f[S]=d[D]={start:S,end:D,ring:[v,w]}}}function s(c){return c[0]*2+c[1]*(t+1)*4}function u(c,l,h){c.forEach(function(f){var d=f[0],p=f[1],g=d|0,m=p|0,y=wl(l[m*t+g]);d>0&&d<t&&g===d&&(f[0]=c1(d,wl(l[m*t+g-1]),y,h)),p>0&&p<e&&m===p&&(f[1]=c1(p,wl(l[(m-1)*t+g]),y,h))})}return i.contour=o,i.size=function(c){if(!arguments.length)return[t,e];var l=Math.floor(c[0]),h=Math.floor(c[1]);if(!(l>=0&&h>=0))throw new Error("invalid size");return t=l,e=h,i},i.thresholds=function(c){return arguments.length?(n=typeof c=="function"?c:Array.isArray(c)?pn(u1.call(c)):pn(c),i):n},i.smooth=function(c){return arguments.length?(r=c?u:JM,i):r===u},i}function t7(t){return isFinite(t)?t:NaN}function Hn(t,e){return t==null?!1:+t>=e}function wl(t){return t==null||isNaN(t=+t)?-1/0:t}function c1(t,e,n,r){const i=r-e,o=n-e,a=isFinite(i)||isFinite(o)?i/o:Math.sign(i)/Math.sign(o);return isNaN(a)?t:t+a-.5}function e7(t){return t[0]}function n7(t){return t[1]}function r7(){return 1}function i7(){var t=e7,e=n7,n=r7,r=960,i=500,o=20,a=2,s=o*3,u=r+s*2>>a,c=i+s*2>>a,l=pn(20);function h(_){var x=new Float32Array(u*c),b=Math.pow(2,-a),$=-1;for(const M of _){var v=(t(M,++$,_)+s)*b,w=(e(M,$,_)+s)*b,S=+n(M,$,_);if(S&&v>=0&&v<u&&w>=0&&w<c){var D=Math.floor(v),E=Math.floor(w),T=v-D-.5,F=w-E-.5;x[D+E*u]+=(1-T)*(1-F)*S,x[D+1+E*u]+=T*(1-F)*S,x[D+1+(E+1)*u]+=T*F*S,x[D+(E+1)*u]+=(1-T)*F*S}}return ip({data:x,width:u,height:c},o*b),x}function f(_){var x=h(_),b=l(x),$=Math.pow(2,2*a);return Array.isArray(b)||(b=Ln(Number.MIN_VALUE,Mi(x)/$,b)),_l().size([u,c]).thresholds(b.map(v=>v*$))(x).map((v,w)=>(v.value=+b[w],d(v)))}f.contours=function(_){var x=h(_),b=_l().size([u,c]),$=Math.pow(2,2*a),v=w=>{w=+w;var S=d(b.contour(x,w*$));return S.value=w,S};return Object.defineProperty(v,"max",{get:()=>Mi(x)/$}),v};function d(_){return _.coordinates.forEach(p),_}function p(_){_.forEach(g)}function g(_){_.forEach(m)}function m(_){_[0]=_[0]*Math.pow(2,a)-s,_[1]=_[1]*Math.pow(2,a)-s}function y(){return s=o*3,u=r+s*2>>a,c=i+s*2>>a,f}return f.x=function(_){return arguments.length?(t=typeof _=="function"?_:pn(+_),f):t},f.y=function(_){return arguments.length?(e=typeof _=="function"?_:pn(+_),f):e},f.weight=function(_){return arguments.length?(n=typeof _=="function"?_:pn(+_),f):n},f.size=function(_){if(!arguments.length)return[r,i];var x=+_[0],b=+_[1];if(!(x>=0&&b>=0))throw new Error("invalid size");return r=x,i=b,y()},f.cellSize=function(_){if(!arguments.length)return 1<<a;if(!((_=+_)>=1))throw new Error("invalid cell size");return a=Math.floor(Math.log(_)/Math.LN2),y()},f.thresholds=function(_){return arguments.length?(l=typeof _=="function"?_:Array.isArray(_)?pn(u1.call(_)):pn(_),f):l},f.bandwidth=function(_){if(!arguments.length)return Math.sqrt(o*(o+1));if(!((_=+_)>=0))throw new Error("invalid bandwidth");return o=(Math.sqrt(4*_*_+1)-1)/2,y()},f}const Ze=11102230246251565e-32,zt=134217729,o7=(3+8*Ze)*Ze;function $l(t,e,n,r,i){let o,a,s,u,c=e[0],l=r[0],h=0,f=0;l>c==l>-c?(o=c,c=e[++h]):(o=l,l=r[++f]);let d=0;if(h<t&&f<n)for(l>c==l>-c?(a=c+o,s=o-(a-c),c=e[++h]):(a=l+o,s=o-(a-l),l=r[++f]),o=a,s!==0&&(i[d++]=s);h<t&&f<n;)l>c==l>-c?(a=o+c,u=a-o,s=o-(a-u)+(c-u),c=e[++h]):(a=o+l,u=a-o,s=o-(a-u)+(l-u),l=r[++f]),o=a,s!==0&&(i[d++]=s);for(;h<t;)a=o+c,u=a-o,s=o-(a-u)+(c-u),c=e[++h],o=a,s!==0&&(i[d++]=s);for(;f<n;)a=o+l,u=a-o,s=o-(a-u)+(l-u),l=r[++f],o=a,s!==0&&(i[d++]=s);return(o!==0||d===0)&&(i[d++]=o),d}function a7(t,e){let n=e[0];for(let r=1;r<t;r++)n+=e[r];return n}function qi(t){return new Float64Array(t)}const s7=(3+16*Ze)*Ze,u7=(2+12*Ze)*Ze,c7=(9+64*Ze)*Ze*Ze,Nr=qi(4),l1=qi(8),f1=qi(12),h1=qi(16),Wt=qi(4);function l7(t,e,n,r,i,o,a){let s,u,c,l,h,f,d,p,g,m,y,_,x,b,$,v,w,S;const D=t-i,E=n-i,T=e-o,F=r-o;b=D*F,f=zt*D,d=f-(f-D),p=D-d,f=zt*F,g=f-(f-F),m=F-g,$=p*m-(b-d*g-p*g-d*m),v=T*E,f=zt*T,d=f-(f-T),p=T-d,f=zt*E,g=f-(f-E),m=E-g,w=p*m-(v-d*g-p*g-d*m),y=$-w,h=$-y,Nr[0]=$-(y+h)+(h-w),_=b+y,h=_-b,x=b-(_-h)+(y-h),y=x-v,h=x-y,Nr[1]=x-(y+h)+(h-v),S=_+y,h=S-_,Nr[2]=_-(S-h)+(y-h),Nr[3]=S;let M=a7(4,Nr),A=u7*a;if(M>=A||-M>=A||(h=t-D,s=t-(D+h)+(h-i),h=n-E,c=n-(E+h)+(h-i),h=e-T,u=e-(T+h)+(h-o),h=r-F,l=r-(F+h)+(h-o),s===0&&u===0&&c===0&&l===0)||(A=c7*a+o7*Math.abs(M),M+=D*l+F*s-(T*c+E*u),M>=A||-M>=A))return M;b=s*F,f=zt*s,d=f-(f-s),p=s-d,f=zt*F,g=f-(f-F),m=F-g,$=p*m-(b-d*g-p*g-d*m),v=u*E,f=zt*u,d=f-(f-u),p=u-d,f=zt*E,g=f-(f-E),m=E-g,w=p*m-(v-d*g-p*g-d*m),y=$-w,h=$-y,Wt[0]=$-(y+h)+(h-w),_=b+y,h=_-b,x=b-(_-h)+(y-h),y=x-v,h=x-y,Wt[1]=x-(y+h)+(h-v),S=_+y,h=S-_,Wt[2]=_-(S-h)+(y-h),Wt[3]=S;const L=$l(4,Nr,4,Wt,l1);b=D*l,f=zt*D,d=f-(f-D),p=D-d,f=zt*l,g=f-(f-l),m=l-g,$=p*m-(b-d*g-p*g-d*m),v=T*c,f=zt*T,d=f-(f-T),p=T-d,f=zt*c,g=f-(f-c),m=c-g,w=p*m-(v-d*g-p*g-d*m),y=$-w,h=$-y,Wt[0]=$-(y+h)+(h-w),_=b+y,h=_-b,x=b-(_-h)+(y-h),y=x-v,h=x-y,Wt[1]=x-(y+h)+(h-v),S=_+y,h=S-_,Wt[2]=_-(S-h)+(y-h),Wt[3]=S;const P=$l(L,l1,4,Wt,f1);b=s*l,f=zt*s,d=f-(f-s),p=s-d,f=zt*l,g=f-(f-l),m=l-g,$=p*m-(b-d*g-p*g-d*m),v=u*c,f=zt*u,d=f-(f-u),p=u-d,f=zt*c,g=f-(f-c),m=c-g,w=p*m-(v-d*g-p*g-d*m),y=$-w,h=$-y,Wt[0]=$-(y+h)+(h-w),_=b+y,h=_-b,x=b-(_-h)+(y-h),y=x-v,h=x-y,Wt[1]=x-(y+h)+(h-v),S=_+y,h=S-_,Wt[2]=_-(S-h)+(y-h),Wt[3]=S;const I=$l(P,f1,4,Wt,h1);return h1[I-1]}function Qa(t,e,n,r,i,o){const a=(e-o)*(n-i),s=(t-i)*(r-o),u=a-s,c=Math.abs(a+s);return Math.abs(u)>=s7*c?u:-l7(t,e,n,r,i,o,c)}const d1=Math.pow(2,-52),Ja=new Uint32Array(512);class ts{static from(e,n=g7,r=m7){const i=e.length,o=new Float64Array(i*2);for(let a=0;a<i;a++){const s=e[a];o[2*a]=n(s),o[2*a+1]=r(s)}return new ts(o)}constructor(e){const n=e.length>>1;if(n>0&&typeof e[0]!="number")throw new Error("Expected coords to contain numbers.");this.coords=e;const r=Math.max(2*n-5,0);this._triangles=new Uint32Array(r*3),this._halfedges=new Int32Array(r*3),this._hashSize=Math.ceil(Math.sqrt(n)),this._hullPrev=new Uint32Array(n),this._hullNext=new Uint32Array(n),this._hullTri=new Uint32Array(n),this._hullHash=new Int32Array(this._hashSize),this._ids=new Uint32Array(n),this._dists=new Float64Array(n),this.update()}update(){const{coords:e,_hullPrev:n,_hullNext:r,_hullTri:i,_hullHash:o}=this,a=e.length>>1;let s=1/0,u=1/0,c=-1/0,l=-1/0;for(let D=0;D<a;D++){const E=e[2*D],T=e[2*D+1];E<s&&(s=E),T<u&&(u=T),E>c&&(c=E),T>l&&(l=T),this._ids[D]=D}const h=(s+c)/2,f=(u+l)/2;let d,p,g;for(let D=0,E=1/0;D<a;D++){const T=Sl(h,f,e[2*D],e[2*D+1]);T<E&&(d=D,E=T)}const m=e[2*d],y=e[2*d+1];for(let D=0,E=1/0;D<a;D++){if(D===d)continue;const T=Sl(m,y,e[2*D],e[2*D+1]);T<E&&T>0&&(p=D,E=T)}let _=e[2*p],x=e[2*p+1],b=1/0;for(let D=0;D<a;D++){if(D===d||D===p)continue;const E=d7(m,y,_,x,e[2*D],e[2*D+1]);E<b&&(g=D,b=E)}let $=e[2*g],v=e[2*g+1];if(b===1/0){for(let T=0;T<a;T++)this._dists[T]=e[2*T]-e[0]||e[2*T+1]-e[1];Fr(this._ids,this._dists,0,a-1);const D=new Uint32Array(a);let E=0;for(let T=0,F=-1/0;T<a;T++){const M=this._ids[T],A=this._dists[M];A>F&&(D[E++]=M,F=A)}this.hull=D.subarray(0,E),this.triangles=new Uint32Array(0),this.halfedges=new Uint32Array(0);return}if(Qa(m,y,_,x,$,v)<0){const D=p,E=_,T=x;p=g,_=$,x=v,g=D,$=E,v=T}const w=p7(m,y,_,x,$,v);this._cx=w.x,this._cy=w.y;for(let D=0;D<a;D++)this._dists[D]=Sl(e[2*D],e[2*D+1],w.x,w.y);Fr(this._ids,this._dists,0,a-1),this._hullStart=d;let S=3;r[d]=n[g]=p,r[p]=n[d]=g,r[g]=n[p]=d,i[d]=0,i[p]=1,i[g]=2,o.fill(-1),o[this._hashKey(m,y)]=d,o[this._hashKey(_,x)]=p,o[this._hashKey($,v)]=g,this.trianglesLen=0,this._addTriangle(d,p,g,-1,-1,-1);for(let D=0,E,T;D<this._ids.length;D++){const F=this._ids[D],M=e[2*F],A=e[2*F+1];if(D>0&&Math.abs(M-E)<=d1&&Math.abs(A-T)<=d1||(E=M,T=A,F===d||F===p||F===g))continue;let L=0;for(let R=0,N=this._hashKey(M,A);R<this._hashSize&&(L=o[(N+R)%this._hashSize],!(L!==-1&&L!==r[L]));R++);L=n[L];let P=L,I;for(;I=r[P],Qa(M,A,e[2*P],e[2*P+1],e[2*I],e[2*I+1])>=0;)if(P=I,P===L){P=-1;break}if(P===-1)continue;let z=this._addTriangle(P,F,r[P],-1,-1,i[P]);i[F]=this._legalize(z+2),i[P]=z,S++;let k=r[P];for(;I=r[k],Qa(M,A,e[2*k],e[2*k+1],e[2*I],e[2*I+1])<0;)z=this._addTriangle(k,F,I,i[F],-1,i[k]),i[F]=this._legalize(z+2),r[k]=k,S--,k=I;if(P===L)for(;I=n[P],Qa(M,A,e[2*I],e[2*I+1],e[2*P],e[2*P+1])<0;)z=this._addTriangle(I,F,P,-1,i[P],i[I]),this._legalize(z+2),i[I]=z,r[P]=P,S--,P=I;this._hullStart=n[F]=P,r[P]=n[k]=F,r[F]=k,o[this._hashKey(M,A)]=F,o[this._hashKey(e[2*P],e[2*P+1])]=P}this.hull=new Uint32Array(S);for(let D=0,E=this._hullStart;D<S;D++)this.hull[D]=E,E=r[E];this.triangles=this._triangles.subarray(0,this.trianglesLen),this.halfedges=this._halfedges.subarray(0,this.trianglesLen)}_hashKey(e,n){return Math.floor(f7(e-this._cx,n-this._cy)*this._hashSize)%this._hashSize}_legalize(e){const{_triangles:n,_halfedges:r,coords:i}=this;let o=0,a=0;for(;;){const s=r[e],u=e-e%3;if(a=u+(e+2)%3,s===-1){if(o===0)break;e=Ja[--o];continue}const c=s-s%3,l=u+(e+1)%3,h=c+(s+2)%3,f=n[a],d=n[e],p=n[l],g=n[h];if(h7(i[2*f],i[2*f+1],i[2*d],i[2*d+1],i[2*p],i[2*p+1],i[2*g],i[2*g+1])){n[e]=g,n[s]=f;const y=r[h];if(y===-1){let x=this._hullStart;do{if(this._hullTri[x]===h){this._hullTri[x]=e;break}x=this._hullPrev[x]}while(x!==this._hullStart)}this._link(e,y),this._link(s,r[a]),this._link(a,h);const _=c+(s+1)%3;o<Ja.length&&(Ja[o++]=_)}else{if(o===0)break;e=Ja[--o]}}return a}_link(e,n){this._halfedges[e]=n,n!==-1&&(this._halfedges[n]=e)}_addTriangle(e,n,r,i,o,a){const s=this.trianglesLen;return this._triangles[s]=e,this._triangles[s+1]=n,this._triangles[s+2]=r,this._link(s,i),this._link(s+1,o),this._link(s+2,a),this.trianglesLen+=3,s}}function f7(t,e){const n=t/(Math.abs(t)+Math.abs(e));return(e>0?3-n:1+n)/4}function Sl(t,e,n,r){const i=t-n,o=e-r;return i*i+o*o}function h7(t,e,n,r,i,o,a,s){const u=t-a,c=e-s,l=n-a,h=r-s,f=i-a,d=o-s,p=u*u+c*c,g=l*l+h*h,m=f*f+d*d;return u*(h*m-g*d)-c*(l*m-g*f)+p*(l*d-h*f)<0}function d7(t,e,n,r,i,o){const a=n-t,s=r-e,u=i-t,c=o-e,l=a*a+s*s,h=u*u+c*c,f=.5/(a*c-s*u),d=(c*l-s*h)*f,p=(a*h-u*l)*f;return d*d+p*p}function p7(t,e,n,r,i,o){const a=n-t,s=r-e,u=i-t,c=o-e,l=a*a+s*s,h=u*u+c*c,f=.5/(a*c-s*u),d=t+(c*l-s*h)*f,p=e+(a*h-u*l)*f;return{x:d,y:p}}function Fr(t,e,n,r){if(r-n<=20)for(let i=n+1;i<=r;i++){const o=t[i],a=e[o];let s=i-1;for(;s>=n&&e[t[s]]>a;)t[s+1]=t[s--];t[s+1]=o}else{const i=n+r>>1;let o=n+1,a=r;Xi(t,i,o),e[t[n]]>e[t[r]]&&Xi(t,n,r),e[t[o]]>e[t[r]]&&Xi(t,o,r),e[t[n]]>e[t[o]]&&Xi(t,n,o);const s=t[o],u=e[s];for(;;){do o++;while(e[t[o]]<u);do a--;while(e[t[a]]>u);if(a<o)break;Xi(t,o,a)}t[n+1]=t[a],t[a]=s,r-o+1>=a-n?(Fr(t,e,o,r),Fr(t,e,n,a-1)):(Fr(t,e,n,a-1),Fr(t,e,o,r))}}function Xi(t,e,n){const r=t[e];t[e]=t[n],t[n]=r}function g7(t){return t[0]}function m7(t){return t[1]}const p1=1e-6;class qn{constructor(){this._x0=this._y0=this._x1=this._y1=null,this._=""}moveTo(e,n){this._+=`M${this._x0=this._x1=+e},${this._y0=this._y1=+n}`}closePath(){this._x1!==null&&(this._x1=this._x0,this._y1=this._y0,this._+="Z")}lineTo(e,n){this._+=`L${this._x1=+e},${this._y1=+n}`}arc(e,n,r){e=+e,n=+n,r=+r;const i=e+r,o=n;if(r<0)throw new Error("negative radius");this._x1===null?this._+=`M${i},${o}`:(Math.abs(this._x1-i)>p1||Math.abs(this._y1-o)>p1)&&(this._+="L"+i+","+o),r&&(this._+=`A${r},${r},0,1,1,${e-r},${n}A${r},${r},0,1,1,${this._x1=i},${this._y1=o}`)}rect(e,n,r,i){this._+=`M${this._x0=this._x1=+e},${this._y0=this._y1=+n}h${+r}v${+i}h${-r}Z`}value(){return this._||null}}class Al{constructor(){this._=[]}moveTo(e,n){this._.push([e,n])}closePath(){this._.push(this._[0].slice())}lineTo(e,n){this._.push([e,n])}value(){return this._.length?this._:null}}class g1{constructor(e,[n,r,i,o]=[0,0,960,500]){if(!((i=+i)>=(n=+n))||!((o=+o)>=(r=+r)))throw new Error("invalid bounds");this.delaunay=e,this._circumcenters=new Float64Array(e.points.length*2),this.vectors=new Float64Array(e.points.length*2),this.xmax=i,this.xmin=n,this.ymax=o,this.ymin=r,this._init()}update(){return this.delaunay.update(),this._init(),this}_init(){const{delaunay:{points:e,hull:n,triangles:r},vectors:i}=this;let o,a;const s=this.circumcenters=this._circumcenters.subarray(0,r.length/3*2);for(let g=0,m=0,y=r.length,_,x;g<y;g+=3,m+=2){const b=r[g]*2,$=r[g+1]*2,v=r[g+2]*2,w=e[b],S=e[b+1],D=e[$],E=e[$+1],T=e[v],F=e[v+1],M=D-w,A=E-S,L=T-w,P=F-S,I=(M*P-A*L)*2;if(Math.abs(I)<1e-9){if(o===void 0){o=a=0;for(const k of n)o+=e[k*2],a+=e[k*2+1];o/=n.length,a/=n.length}const z=1e9*Math.sign((o-w)*P-(a-S)*L);_=(w+T)/2-z*P,x=(S+F)/2+z*L}else{const z=1/I,k=M*M+A*A,R=L*L+P*P;_=w+(P*k-A*R)*z,x=S+(M*R-L*k)*z}s[m]=_,s[m+1]=x}let u=n[n.length-1],c,l=u*4,h,f=e[2*u],d,p=e[2*u+1];i.fill(0);for(let g=0;g<n.length;++g)u=n[g],c=l,h=f,d=p,l=u*4,f=e[2*u],p=e[2*u+1],i[c+2]=i[l]=d-p,i[c+3]=i[l+1]=f-h}render(e){const n=e==null?e=new qn:void 0,{delaunay:{halfedges:r,inedges:i,hull:o},circumcenters:a,vectors:s}=this;if(o.length<=1)return null;for(let l=0,h=r.length;l<h;++l){const f=r[l];if(f<l)continue;const d=Math.floor(l/3)*2,p=Math.floor(f/3)*2,g=a[d],m=a[d+1],y=a[p],_=a[p+1];this._renderSegment(g,m,y,_,e)}let u,c=o[o.length-1];for(let l=0;l<o.length;++l){u=c,c=o[l];const h=Math.floor(i[c]/3)*2,f=a[h],d=a[h+1],p=u*4,g=this._project(f,d,s[p+2],s[p+3]);g&&this._renderSegment(f,d,g[0],g[1],e)}return n&&n.value()}renderBounds(e){const n=e==null?e=new qn:void 0;return e.rect(this.xmin,this.ymin,this.xmax-this.xmin,this.ymax-this.ymin),n&&n.value()}renderCell(e,n){const r=n==null?n=new qn:void 0,i=this._clip(e);if(i===null||!i.length)return;n.moveTo(i[0],i[1]);let o=i.length;for(;i[0]===i[o-2]&&i[1]===i[o-1]&&o>1;)o-=2;for(let a=2;a<o;a+=2)(i[a]!==i[a-2]||i[a+1]!==i[a-1])&&n.lineTo(i[a],i[a+1]);return n.closePath(),r&&r.value()}*cellPolygons(){const{delaunay:{points:e}}=this;for(let n=0,r=e.length/2;n<r;++n){const i=this.cellPolygon(n);i&&(i.index=n,yield i)}}cellPolygon(e){const n=new Al;return this.renderCell(e,n),n.value()}_renderSegment(e,n,r,i,o){let a;const s=this._regioncode(e,n),u=this._regioncode(r,i);s===0&&u===0?(o.moveTo(e,n),o.lineTo(r,i)):(a=this._clipSegment(e,n,r,i,s,u))&&(o.moveTo(a[0],a[1]),o.lineTo(a[2],a[3]))}contains(e,n,r){return n=+n,n!==n||(r=+r,r!==r)?!1:this.delaunay._step(e,n,r)===e}*neighbors(e){const n=this._clip(e);if(n)for(const r of this.delaunay.neighbors(e)){const i=this._clip(r);if(i){t:for(let o=0,a=n.length;o<a;o+=2)for(let s=0,u=i.length;s<u;s+=2)if(n[o]===i[s]&&n[o+1]===i[s+1]&&n[(o+2)%a]===i[(s+u-2)%u]&&n[(o+3)%a]===i[(s+u-1)%u]){yield r;break t}}}}_cell(e){const{circumcenters:n,delaunay:{inedges:r,halfedges:i,triangles:o}}=this,a=r[e];if(a===-1)return null;const s=[];let u=a;do{const c=Math.floor(u/3);if(s.push(n[c*2],n[c*2+1]),u=u%3===2?u-2:u+1,o[u]!==e)break;u=i[u]}while(u!==a&&u!==-1);return s}_clip(e){if(e===0&&this.delaunay.hull.length===1)return[this.xmax,this.ymin,this.xmax,this.ymax,this.xmin,this.ymax,this.xmin,this.ymin];const n=this._cell(e);if(n===null)return null;const{vectors:r}=this,i=e*4;return this._simplify(r[i]||r[i+1]?this._clipInfinite(e,n,r[i],r[i+1],r[i+2],r[i+3]):this._clipFinite(e,n))}_clipFinite(e,n){const r=n.length;let i=null,o,a,s=n[r-2],u=n[r-1],c,l=this._regioncode(s,u),h,f=0;for(let d=0;d<r;d+=2)if(o=s,a=u,s=n[d],u=n[d+1],c=l,l=this._regioncode(s,u),c===0&&l===0)h=f,f=0,i?i.push(s,u):i=[s,u];else{let p,g,m,y,_;if(c===0){if((p=this._clipSegment(o,a,s,u,c,l))===null)continue;[g,m,y,_]=p}else{if((p=this._clipSegment(s,u,o,a,l,c))===null)continue;[y,_,g,m]=p,h=f,f=this._edgecode(g,m),h&&f&&this._edge(e,h,f,i,i.length),i?i.push(g,m):i=[g,m]}h=f,f=this._edgecode(y,_),h&&f&&this._edge(e,h,f,i,i.length),i?i.push(y,_):i=[y,_]}if(i)h=f,f=this._edgecode(i[0],i[1]),h&&f&&this._edge(e,h,f,i,i.length);else if(this.contains(e,(this.xmin+this.xmax)/2,(this.ymin+this.ymax)/2))return[this.xmax,this.ymin,this.xmax,this.ymax,this.xmin,this.ymax,this.xmin,this.ymin];return i}_clipSegment(e,n,r,i,o,a){const s=o<a;for(s&&([e,n,r,i,o,a]=[r,i,e,n,a,o]);;){if(o===0&&a===0)return s?[r,i,e,n]:[e,n,r,i];if(o&a)return null;let u,c,l=o||a;l&8?(u=e+(r-e)*(this.ymax-n)/(i-n),c=this.ymax):l&4?(u=e+(r-e)*(this.ymin-n)/(i-n),c=this.ymin):l&2?(c=n+(i-n)*(this.xmax-e)/(r-e),u=this.xmax):(c=n+(i-n)*(this.xmin-e)/(r-e),u=this.xmin),o?(e=u,n=c,o=this._regioncode(e,n)):(r=u,i=c,a=this._regioncode(r,i))}}_clipInfinite(e,n,r,i,o,a){let s=Array.from(n),u;if((u=this._project(s[0],s[1],r,i))&&s.unshift(u[0],u[1]),(u=this._project(s[s.length-2],s[s.length-1],o,a))&&s.push(u[0],u[1]),s=this._clipFinite(e,s))for(let c=0,l=s.length,h,f=this._edgecode(s[l-2],s[l-1]);c<l;c+=2)h=f,f=this._edgecode(s[c],s[c+1]),h&&f&&(c=this._edge(e,h,f,s,c),l=s.length);else this.contains(e,(this.xmin+this.xmax)/2,(this.ymin+this.ymax)/2)&&(s=[this.xmin,this.ymin,this.xmax,this.ymin,this.xmax,this.ymax,this.xmin,this.ymax]);return s}_edge(e,n,r,i,o){for(;n!==r;){let a,s;switch(n){case 5:n=4;continue;case 4:n=6,a=this.xmax,s=this.ymin;break;case 6:n=2;continue;case 2:n=10,a=this.xmax,s=this.ymax;break;case 10:n=8;continue;case 8:n=9,a=this.xmin,s=this.ymax;break;case 9:n=1;continue;case 1:n=5,a=this.xmin,s=this.ymin;break}(i[o]!==a||i[o+1]!==s)&&this.contains(e,a,s)&&(i.splice(o,0,a,s),o+=2)}return o}_project(e,n,r,i){let o=1/0,a,s,u;if(i<0){if(n<=this.ymin)return null;(a=(this.ymin-n)/i)<o&&(u=this.ymin,s=e+(o=a)*r)}else if(i>0){if(n>=this.ymax)return null;(a=(this.ymax-n)/i)<o&&(u=this.ymax,s=e+(o=a)*r)}if(r>0){if(e>=this.xmax)return null;(a=(this.xmax-e)/r)<o&&(s=this.xmax,u=n+(o=a)*i)}else if(r<0){if(e<=this.xmin)return null;(a=(this.xmin-e)/r)<o&&(s=this.xmin,u=n+(o=a)*i)}return[s,u]}_edgecode(e,n){return(e===this.xmin?1:e===this.xmax?2:0)|(n===this.ymin?4:n===this.ymax?8:0)}_regioncode(e,n){return(e<this.xmin?1:e>this.xmax?2:0)|(n<this.ymin?4:n>this.ymax?8:0)}_simplify(e){if(e&&e.length>4){for(let n=0;n<e.length;n+=2){const r=(n+2)%e.length,i=(n+4)%e.length;(e[n]===e[r]&&e[r]===e[i]||e[n+1]===e[r+1]&&e[r+1]===e[i+1])&&(e.splice(r,2),n-=2)}e.length||(e=null)}return e}}const y7=2*Math.PI,Gr=Math.pow;function b7(t){return t[0]}function v7(t){return t[1]}function x7(t){const{triangles:e,coords:n}=t;for(let r=0;r<e.length;r+=3){const i=2*e[r],o=2*e[r+1],a=2*e[r+2];if((n[a]-n[i])*(n[o+1]-n[i+1])-(n[o]-n[i])*(n[a+1]-n[i+1])>1e-10)return!1}return!0}function _7(t,e,n){return[t+Math.sin(t+e)*n,e+Math.cos(t-e)*n]}class Ml{static from(e,n=b7,r=v7,i){return new Ml("length"in e?w7(e,n,r,i):Float64Array.from($7(e,n,r,i)))}constructor(e){this._delaunator=new ts(e),this.inedges=new Int32Array(e.length/2),this._hullIndex=new Int32Array(e.length/2),this.points=this._delaunator.coords,this._init()}update(){return this._delaunator.update(),this._init(),this}_init(){const e=this._delaunator,n=this.points;if(e.hull&&e.hull.length>2&&x7(e)){this.collinear=Int32Array.from({length:n.length/2},(f,d)=>d).sort((f,d)=>n[2*f]-n[2*d]||n[2*f+1]-n[2*d+1]);const u=this.collinear[0],c=this.collinear[this.collinear.length-1],l=[n[2*u],n[2*u+1],n[2*c],n[2*c+1]],h=1e-8*Math.hypot(l[3]-l[1],l[2]-l[0]);for(let f=0,d=n.length/2;f<d;++f){const p=_7(n[2*f],n[2*f+1],h);n[2*f]=p[0],n[2*f+1]=p[1]}this._delaunator=new ts(n)}else delete this.collinear;const r=this.halfedges=this._delaunator.halfedges,i=this.hull=this._delaunator.hull,o=this.triangles=this._delaunator.triangles,a=this.inedges.fill(-1),s=this._hullIndex.fill(-1);for(let u=0,c=r.length;u<c;++u){const l=o[u%3===2?u-2:u+1];(r[u]===-1||a[l]===-1)&&(a[l]=u)}for(let u=0,c=i.length;u<c;++u)s[i[u]]=u;i.length<=2&&i.length>0&&(this.triangles=new Int32Array(3).fill(-1),this.halfedges=new Int32Array(3).fill(-1),this.triangles[0]=i[0],a[i[0]]=1,i.length===2&&(a[i[1]]=0,this.triangles[1]=i[1],this.triangles[2]=i[1]))}voronoi(e){return new g1(this,e)}*neighbors(e){const{inedges:n,hull:r,_hullIndex:i,halfedges:o,triangles:a,collinear:s}=this;if(s){const h=s.indexOf(e);h>0&&(yield s[h-1]),h<s.length-1&&(yield s[h+1]);return}const u=n[e];if(u===-1)return;let c=u,l=-1;do{if(yield l=a[c],c=c%3===2?c-2:c+1,a[c]!==e)return;if(c=o[c],c===-1){const h=r[(i[e]+1)%r.length];h!==l&&(yield h);return}}while(c!==u)}find(e,n,r=0){if(e=+e,e!==e||(n=+n,n!==n))return-1;const i=r;let o;for(;(o=this._step(r,e,n))>=0&&o!==r&&o!==i;)r=o;return o}_step(e,n,r){const{inedges:i,hull:o,_hullIndex:a,halfedges:s,triangles:u,points:c}=this;if(i[e]===-1||!c.length)return(e+1)%(c.length>>1);let l=e,h=Gr(n-c[e*2],2)+Gr(r-c[e*2+1],2);const f=i[e];let d=f;do{let p=u[d];const g=Gr(n-c[p*2],2)+Gr(r-c[p*2+1],2);if(g<h&&(h=g,l=p),d=d%3===2?d-2:d+1,u[d]!==e)break;if(d=s[d],d===-1){if(d=o[(a[e]+1)%o.length],d!==p&&Gr(n-c[d*2],2)+Gr(r-c[d*2+1],2)<h)return d;break}}while(d!==f);return l}render(e){const n=e==null?e=new qn:void 0,{points:r,halfedges:i,triangles:o}=this;for(let a=0,s=i.length;a<s;++a){const u=i[a];if(u<a)continue;const c=o[a]*2,l=o[u]*2;e.moveTo(r[c],r[c+1]),e.lineTo(r[l],r[l+1])}return this.renderHull(e),n&&n.value()}renderPoints(e,n){n===void 0&&(!e||typeof e.moveTo!="function")&&(n=e,e=null),n=n==null?2:+n;const r=e==null?e=new qn:void 0,{points:i}=this;for(let o=0,a=i.length;o<a;o+=2){const s=i[o],u=i[o+1];e.moveTo(s+n,u),e.arc(s,u,n,0,y7)}return r&&r.value()}renderHull(e){const n=e==null?e=new qn:void 0,{hull:r,points:i}=this,o=r[0]*2,a=r.length;e.moveTo(i[o],i[o+1]);for(let s=1;s<a;++s){const u=2*r[s];e.lineTo(i[u],i[u+1])}return e.closePath(),n&&n.value()}hullPolygon(){const e=new Al;return this.renderHull(e),e.value()}renderTriangle(e,n){const r=n==null?n=new qn:void 0,{points:i,triangles:o}=this,a=o[e*=3]*2,s=o[e+1]*2,u=o[e+2]*2;return n.moveTo(i[a],i[a+1]),n.lineTo(i[s],i[s+1]),n.lineTo(i[u],i[u+1]),n.closePath(),r&&r.value()}*trianglePolygons(){const{triangles:e}=this;for(let n=0,r=e.length/3;n<r;++n)yield this.trianglePolygon(n)}trianglePolygon(e){const n=new Al;return this.renderTriangle(e,n),n.value()}}function w7(t,e,n,r){const i=t.length,o=new Float64Array(i*2);for(let a=0;a<i;++a){const s=t[a];o[a*2]=e.call(r,s,a,t),o[a*2+1]=n.call(r,s,a,t)}return o}function*$7(t,e,n,r){let i=0;for(const o of t)yield e.call(r,o,i,t),yield n.call(r,o,i,t),++i}var m1={},Tl={},Pl=34,Vi=10,Dl=13;function y1(t){return new Function("d","return {"+t.map(function(e,n){return JSON.stringify(e)+": d["+n+'] || ""'}).join(",")+"}")}function S7(t,e){var n=y1(t);return function(r,i){return e(n(r),i,t)}}function b1(t){var e=Object.create(null),n=[];return t.forEach(function(r){for(var i in r)i in e||n.push(e[i]=i)}),n}function ne(t,e){var n=t+"",r=n.length;return r<e?new Array(e-r+1).join(0)+n:n}function A7(t){return t<0?"-"+ne(-t,6):t>9999?"+"+ne(t,6):ne(t,4)}function M7(t){var e=t.getUTCHours(),n=t.getUTCMinutes(),r=t.getUTCSeconds(),i=t.getUTCMilliseconds();return isNaN(t)?"Invalid Date":A7(t.getUTCFullYear())+"-"+ne(t.getUTCMonth()+1,2)+"-"+ne(t.getUTCDate(),2)+(i?"T"+ne(e,2)+":"+ne(n,2)+":"+ne(r,2)+"."+ne(i,3)+"Z":r?"T"+ne(e,2)+":"+ne(n,2)+":"+ne(r,2)+"Z":n||e?"T"+ne(e,2)+":"+ne(n,2)+"Z":"")}function es(t){var e=new RegExp('["'+t+`
|
6
|
-
\r]`),n=t.charCodeAt(0);function r(h,f){var d,p,g=i(h,function(m,y){if(d)return d(m,y-1);p=m,d=f?S7(m,f):y1(m)});return g.columns=p||[],g}function i(h,f){var d=[],p=h.length,g=0,m=0,y,
|
5
|
+
`):"",this.name="UnsubscriptionError",this.errors=e}});function sa(t,e){if(t){var n=t.indexOf(e);0<=n&&t.splice(n,1)}}var xi=function(){function t(e){this.initialTeardown=e,this.closed=!1,this._parentage=null,this._finalizers=null}return t.prototype.unsubscribe=function(){var e,n,r,i,o;if(!this.closed){this.closed=!0;var a=this._parentage;if(a)if(this._parentage=null,Array.isArray(a))try{for(var s=br(a),u=s.next();!u.done;u=s.next()){var c=u.value;c.remove(this)}}catch(g){e={error:g}}finally{try{u&&!u.done&&(n=s.return)&&n.call(s)}finally{if(e)throw e.error}}else a.remove(this);var l=this.initialTeardown;if(Pt(l))try{l()}catch(g){o=g instanceof lc?g.errors:[g]}var h=this._finalizers;if(h){this._finalizers=null;try{for(var f=br(h),d=f.next();!d.done;d=f.next()){var p=d.value;try{Td(p)}catch(g){o=o??[],g instanceof lc?o=vi(vi([],bi(o)),bi(g.errors)):o.push(g)}}}catch(g){r={error:g}}finally{try{d&&!d.done&&(i=f.return)&&i.call(f)}finally{if(r)throw r.error}}}if(o)throw new lc(o)}},t.prototype.add=function(e){var n;if(e&&e!==this)if(this.closed)Td(e);else{if(e instanceof t){if(e.closed||e._hasParent(this))return;e._addParent(this)}(this._finalizers=(n=this._finalizers)!==null&&n!==void 0?n:[]).push(e)}},t.prototype._hasParent=function(e){var n=this._parentage;return n===e||Array.isArray(n)&&n.includes(e)},t.prototype._addParent=function(e){var n=this._parentage;this._parentage=Array.isArray(n)?(n.push(e),n):n?[n,e]:e},t.prototype._removeParent=function(e){var n=this._parentage;n===e?this._parentage=null:Array.isArray(n)&&sa(n,e)},t.prototype.remove=function(e){var n=this._finalizers;n&&sa(n,e),e instanceof t&&e._removeParent(this)},t.EMPTY=function(){var e=new t;return e.closed=!0,e}(),t}(),Ad=xi.EMPTY;function Md(t){return t instanceof xi||t&&"closed"in t&&Pt(t.remove)&&Pt(t.add)&&Pt(t.unsubscribe)}function Td(t){Pt(t)?t():t.unsubscribe()}var Pd={onUnhandledError:null,onStoppedNotification:null,Promise:void 0,useDeprecatedSynchronousErrorHandling:!1,useDeprecatedNextContext:!1},dS={setTimeout:function(t,e){for(var n=[],r=2;r<arguments.length;r++)n[r-2]=arguments[r];return setTimeout.apply(void 0,vi([t,e],bi(n)))},clearTimeout:function(t){return clearTimeout(t)},delegate:void 0};function Dd(t){dS.setTimeout(function(){throw t})}function fc(){}function ua(t){t()}var hc=function(t){qe(e,t);function e(n){var r=t.call(this)||this;return r.isStopped=!1,n?(r.destination=n,Md(n)&&n.add(r)):r.destination=yS,r}return e.create=function(n,r,i){return new _i(n,r,i)},e.prototype.next=function(n){this.isStopped||this._next(n)},e.prototype.error=function(n){this.isStopped||(this.isStopped=!0,this._error(n))},e.prototype.complete=function(){this.isStopped||(this.isStopped=!0,this._complete())},e.prototype.unsubscribe=function(){this.closed||(this.isStopped=!0,t.prototype.unsubscribe.call(this),this.destination=null)},e.prototype._next=function(n){this.destination.next(n)},e.prototype._error=function(n){try{this.destination.error(n)}finally{this.unsubscribe()}},e.prototype._complete=function(){try{this.destination.complete()}finally{this.unsubscribe()}},e}(xi),pS=Function.prototype.bind;function dc(t,e){return pS.call(t,e)}var gS=function(){function t(e){this.partialObserver=e}return t.prototype.next=function(e){var n=this.partialObserver;if(n.next)try{n.next(e)}catch(r){ca(r)}},t.prototype.error=function(e){var n=this.partialObserver;if(n.error)try{n.error(e)}catch(r){ca(r)}else ca(e)},t.prototype.complete=function(){var e=this.partialObserver;if(e.complete)try{e.complete()}catch(n){ca(n)}},t}(),_i=function(t){qe(e,t);function e(n,r,i){var o=t.call(this)||this,a;if(Pt(n)||!n)a={next:n??void 0,error:r??void 0,complete:i??void 0};else{var s;o&&Pd.useDeprecatedNextContext?(s=Object.create(n),s.unsubscribe=function(){return o.unsubscribe()},a={next:n.next&&dc(n.next,s),error:n.error&&dc(n.error,s),complete:n.complete&&dc(n.complete,s)}):a=n}return o.destination=new gS(a),o}return e}(hc);function ca(t){Dd(t)}function mS(t){throw t}var yS={closed:!0,next:fc,error:mS,complete:fc},pc=function(){return typeof Symbol=="function"&&Symbol.observable||"@@observable"}();function Ed(t){return t}function bS(t){return t.length===0?Ed:t.length===1?t[0]:function(e){return t.reduce(function(n,r){return r(n)},e)}}var we=function(){function t(e){e&&(this._subscribe=e)}return t.prototype.lift=function(e){var n=new t;return n.source=this,n.operator=e,n},t.prototype.subscribe=function(e,n,r){var i=this,o=xS(e)?e:new _i(e,n,r);return ua(function(){var a=i,s=a.operator,u=a.source;o.add(s?s.call(o,u):u?i._subscribe(o):i._trySubscribe(o))}),o},t.prototype._trySubscribe=function(e){try{return this._subscribe(e)}catch(n){e.error(n)}},t.prototype.forEach=function(e,n){var r=this;return n=kd(n),new n(function(i,o){var a=new _i({next:function(s){try{e(s)}catch(u){o(u),a.unsubscribe()}},error:o,complete:i});r.subscribe(a)})},t.prototype._subscribe=function(e){var n;return(n=this.source)===null||n===void 0?void 0:n.subscribe(e)},t.prototype[pc]=function(){return this},t.prototype.pipe=function(){for(var e=[],n=0;n<arguments.length;n++)e[n]=arguments[n];return bS(e)(this)},t.prototype.toPromise=function(e){var n=this;return e=kd(e),new e(function(r,i){var o;n.subscribe(function(a){return o=a},function(a){return i(a)},function(){return r(o)})})},t.create=function(e){return new t(e)},t}();function kd(t){var e;return(e=t??Pd.Promise)!==null&&e!==void 0?e:Promise}function vS(t){return t&&Pt(t.next)&&Pt(t.error)&&Pt(t.complete)}function xS(t){return t&&t instanceof hc||vS(t)&&Md(t)}function _S(t){return Pt(t==null?void 0:t.lift)}function Dn(t){return function(e){if(_S(e))return e.lift(function(n){try{return t(n,this)}catch(r){this.error(r)}});throw new TypeError("Unable to lift unknown Observable type")}}function wi(t,e,n,r,i){return new wS(t,e,n,r,i)}var wS=function(t){qe(e,t);function e(n,r,i,o,a,s){var u=t.call(this,n)||this;return u.onFinalize=a,u.shouldUnsubscribe=s,u._next=r?function(c){try{r(c)}catch(l){n.error(l)}}:t.prototype._next,u._error=o?function(c){try{o(c)}catch(l){n.error(l)}finally{this.unsubscribe()}}:t.prototype._error,u._complete=i?function(){try{i()}catch(c){n.error(c)}finally{this.unsubscribe()}}:t.prototype._complete,u}return e.prototype.unsubscribe=function(){var n;if(!this.shouldUnsubscribe||this.shouldUnsubscribe()){var r=this.closed;t.prototype.unsubscribe.call(this),!r&&((n=this.onFinalize)===null||n===void 0||n.call(this))}},e}(hc),$S=cc(function(t){return function(){t(this),this.name="ObjectUnsubscribedError",this.message="object unsubscribed"}}),$i=function(t){qe(e,t);function e(){var n=t.call(this)||this;return n.closed=!1,n.currentObservers=null,n.observers=[],n.isStopped=!1,n.hasError=!1,n.thrownError=null,n}return e.prototype.lift=function(n){var r=new Ld(this,this);return r.operator=n,r},e.prototype._throwIfClosed=function(){if(this.closed)throw new $S},e.prototype.next=function(n){var r=this;ua(function(){var i,o;if(r._throwIfClosed(),!r.isStopped){r.currentObservers||(r.currentObservers=Array.from(r.observers));try{for(var a=br(r.currentObservers),s=a.next();!s.done;s=a.next()){var u=s.value;u.next(n)}}catch(c){i={error:c}}finally{try{s&&!s.done&&(o=a.return)&&o.call(a)}finally{if(i)throw i.error}}}})},e.prototype.error=function(n){var r=this;ua(function(){if(r._throwIfClosed(),!r.isStopped){r.hasError=r.isStopped=!0,r.thrownError=n;for(var i=r.observers;i.length;)i.shift().error(n)}})},e.prototype.complete=function(){var n=this;ua(function(){if(n._throwIfClosed(),!n.isStopped){n.isStopped=!0;for(var r=n.observers;r.length;)r.shift().complete()}})},e.prototype.unsubscribe=function(){this.isStopped=this.closed=!0,this.observers=this.currentObservers=null},Object.defineProperty(e.prototype,"observed",{get:function(){var n;return((n=this.observers)===null||n===void 0?void 0:n.length)>0},enumerable:!1,configurable:!0}),e.prototype._trySubscribe=function(n){return this._throwIfClosed(),t.prototype._trySubscribe.call(this,n)},e.prototype._subscribe=function(n){return this._throwIfClosed(),this._checkFinalizedStatuses(n),this._innerSubscribe(n)},e.prototype._innerSubscribe=function(n){var r=this,i=this,o=i.hasError,a=i.isStopped,s=i.observers;return o||a?Ad:(this.currentObservers=null,s.push(n),new xi(function(){r.currentObservers=null,sa(s,n)}))},e.prototype._checkFinalizedStatuses=function(n){var r=this,i=r.hasError,o=r.thrownError,a=r.isStopped;i?n.error(o):a&&n.complete()},e.prototype.asObservable=function(){var n=new we;return n.source=this,n},e.create=function(n,r){return new Ld(n,r)},e}(we),Ld=function(t){qe(e,t);function e(n,r){var i=t.call(this)||this;return i.destination=n,i.source=r,i}return e.prototype.next=function(n){var r,i;(i=(r=this.destination)===null||r===void 0?void 0:r.next)===null||i===void 0||i.call(r,n)},e.prototype.error=function(n){var r,i;(i=(r=this.destination)===null||r===void 0?void 0:r.error)===null||i===void 0||i.call(r,n)},e.prototype.complete=function(){var n,r;(r=(n=this.destination)===null||n===void 0?void 0:n.complete)===null||r===void 0||r.call(n)},e.prototype._subscribe=function(n){var r,i;return(i=(r=this.source)===null||r===void 0?void 0:r.subscribe(n))!==null&&i!==void 0?i:Ad},e}($i),gc={now:function(){return(gc.delegate||Date).now()},delegate:void 0},SS=function(t){qe(e,t);function e(n,r,i){n===void 0&&(n=1/0),r===void 0&&(r=1/0),i===void 0&&(i=gc);var o=t.call(this)||this;return o._bufferSize=n,o._windowTime=r,o._timestampProvider=i,o._buffer=[],o._infiniteTimeWindow=!0,o._infiniteTimeWindow=r===1/0,o._bufferSize=Math.max(1,n),o._windowTime=Math.max(1,r),o}return e.prototype.next=function(n){var r=this,i=r.isStopped,o=r._buffer,a=r._infiniteTimeWindow,s=r._timestampProvider,u=r._windowTime;i||(o.push(n),!a&&o.push(s.now()+u)),this._trimBuffer(),t.prototype.next.call(this,n)},e.prototype._subscribe=function(n){this._throwIfClosed(),this._trimBuffer();for(var r=this._innerSubscribe(n),i=this,o=i._infiniteTimeWindow,a=i._buffer,s=a.slice(),u=0;u<s.length&&!n.closed;u+=o?1:2)n.next(s[u]);return this._checkFinalizedStatuses(n),r},e.prototype._trimBuffer=function(){var n=this,r=n._bufferSize,i=n._timestampProvider,o=n._buffer,a=n._infiniteTimeWindow,s=(a?1:2)*r;if(r<1/0&&s<o.length&&o.splice(0,o.length-s),!a){for(var u=i.now(),c=0,l=1;l<o.length&&o[l]<=u;l+=2)c=l;c&&o.splice(0,c+1)}},e}($i),AS=function(t){qe(e,t);function e(n,r){return t.call(this)||this}return e.prototype.schedule=function(n,r){return this},e}(xi),Cd={setInterval:function(t,e){for(var n=[],r=2;r<arguments.length;r++)n[r-2]=arguments[r];return setInterval.apply(void 0,vi([t,e],bi(n)))},clearInterval:function(t){return clearInterval(t)},delegate:void 0},MS=function(t){qe(e,t);function e(n,r){var i=t.call(this,n,r)||this;return i.scheduler=n,i.work=r,i.pending=!1,i}return e.prototype.schedule=function(n,r){var i;if(r===void 0&&(r=0),this.closed)return this;this.state=n;var o=this.id,a=this.scheduler;return o!=null&&(this.id=this.recycleAsyncId(a,o,r)),this.pending=!0,this.delay=r,this.id=(i=this.id)!==null&&i!==void 0?i:this.requestAsyncId(a,this.id,r),this},e.prototype.requestAsyncId=function(n,r,i){return i===void 0&&(i=0),Cd.setInterval(n.flush.bind(n,this),i)},e.prototype.recycleAsyncId=function(n,r,i){if(i===void 0&&(i=0),i!=null&&this.delay===i&&this.pending===!1)return r;r!=null&&Cd.clearInterval(r)},e.prototype.execute=function(n,r){if(this.closed)return new Error("executing a cancelled action");this.pending=!1;var i=this._execute(n,r);if(i)return i;this.pending===!1&&this.id!=null&&(this.id=this.recycleAsyncId(this.scheduler,this.id,null))},e.prototype._execute=function(n,r){var i=!1,o;try{this.work(n)}catch(a){i=!0,o=a||new Error("Scheduled action threw falsy error")}if(i)return this.unsubscribe(),o},e.prototype.unsubscribe=function(){if(!this.closed){var n=this,r=n.id,i=n.scheduler,o=i.actions;this.work=this.state=this.scheduler=null,this.pending=!1,sa(o,this),r!=null&&(this.id=this.recycleAsyncId(i,r,null)),this.delay=null,t.prototype.unsubscribe.call(this)}},e}(AS),Rd=function(){function t(e,n){n===void 0&&(n=t.now),this.schedulerActionCtor=e,this.now=n}return t.prototype.schedule=function(e,n,r){return n===void 0&&(n=0),new this.schedulerActionCtor(this,e).schedule(r,n)},t.now=gc.now,t}(),TS=function(t){qe(e,t);function e(n,r){r===void 0&&(r=Rd.now);var i=t.call(this,n,r)||this;return i.actions=[],i._active=!1,i}return e.prototype.flush=function(n){var r=this.actions;if(this._active){r.push(n);return}var i;this._active=!0;do if(i=n.execute(n.state,n.delay))break;while(n=r.shift());if(this._active=!1,i){for(;n=r.shift();)n.unsubscribe();throw i}},e}(Rd);new TS(MS);function PS(t){return t&&Pt(t.schedule)}function DS(t){return t[t.length-1]}function Id(t){return PS(DS(t))?t.pop():void 0}var Nd=function(t){return t&&typeof t.length=="number"&&typeof t!="function"};function Fd(t){return Pt(t==null?void 0:t.then)}function Gd(t){return Pt(t[pc])}function zd(t){return Symbol.asyncIterator&&Pt(t==null?void 0:t[Symbol.asyncIterator])}function Od(t){return new TypeError("You provided "+(t!==null&&typeof t=="object"?"an invalid object":"'"+t+"'")+" where a stream was expected. You can provide an Observable, Promise, ReadableStream, Array, AsyncIterable, or Iterable.")}function ES(){return typeof Symbol!="function"||!Symbol.iterator?"@@iterator":Symbol.iterator}var Ud=ES();function Bd(t){return Pt(t==null?void 0:t[Ud])}function Yd(t){return fS(this,arguments,function(){var e,n,r,i;return Sd(this,function(o){switch(o.label){case 0:e=t.getReader(),o.label=1;case 1:o.trys.push([1,,9,10]),o.label=2;case 2:return[4,vr(e.read())];case 3:return n=o.sent(),r=n.value,i=n.done,i?[4,vr(void 0)]:[3,5];case 4:return[2,o.sent()];case 5:return[4,vr(r)];case 6:return[4,o.sent()];case 7:return o.sent(),[3,2];case 8:return[3,10];case 9:return e.releaseLock(),[7];case 10:return[2]}})})}function Wd(t){return Pt(t==null?void 0:t.getReader)}function cn(t){if(t instanceof we)return t;if(t!=null){if(Gd(t))return kS(t);if(Nd(t))return LS(t);if(Fd(t))return CS(t);if(zd(t))return Hd(t);if(Bd(t))return RS(t);if(Wd(t))return IS(t)}throw Od(t)}function kS(t){return new we(function(e){var n=t[pc]();if(Pt(n.subscribe))return n.subscribe(e);throw new TypeError("Provided object does not correctly implement Symbol.observable")})}function LS(t){return new we(function(e){for(var n=0;n<t.length&&!e.closed;n++)e.next(t[n]);e.complete()})}function CS(t){return new we(function(e){t.then(function(n){e.closed||(e.next(n),e.complete())},function(n){return e.error(n)}).then(null,Dd)})}function RS(t){return new we(function(e){var n,r;try{for(var i=br(t),o=i.next();!o.done;o=i.next()){var a=o.value;if(e.next(a),e.closed)return}}catch(s){n={error:s}}finally{try{o&&!o.done&&(r=i.return)&&r.call(i)}finally{if(n)throw n.error}}e.complete()})}function Hd(t){return new we(function(e){NS(t,e).catch(function(n){return e.error(n)})})}function IS(t){return Hd(Yd(t))}function NS(t,e){var n,r,i,o;return lS(this,void 0,void 0,function(){var a,s;return Sd(this,function(u){switch(u.label){case 0:u.trys.push([0,5,6,11]),n=hS(t),u.label=1;case 1:return[4,n.next()];case 2:if(r=u.sent(),!!r.done)return[3,4];if(a=r.value,e.next(a),e.closed)return[2];u.label=3;case 3:return[3,1];case 4:return[3,11];case 5:return s=u.sent(),i={error:s},[3,11];case 6:return u.trys.push([6,,9,10]),r&&!r.done&&(o=n.return)?[4,o.call(n)]:[3,8];case 7:u.sent(),u.label=8;case 8:return[3,10];case 9:if(i)throw i.error;return[7];case 10:return[7];case 11:return e.complete(),[2]}})})}function En(t,e,n,r,i){r===void 0&&(r=0),i===void 0&&(i=!1);var o=e.schedule(function(){n(),i?t.add(this.schedule(null,r)):this.unsubscribe()},r);if(t.add(o),!i)return o}function qd(t,e){return e===void 0&&(e=0),Dn(function(n,r){n.subscribe(wi(r,function(i){return En(r,t,function(){return r.next(i)},e)},function(){return En(r,t,function(){return r.complete()},e)},function(i){return En(r,t,function(){return r.error(i)},e)}))})}function Xd(t,e){return e===void 0&&(e=0),Dn(function(n,r){r.add(t.schedule(function(){return n.subscribe(r)},e))})}function FS(t,e){return cn(t).pipe(Xd(e),qd(e))}function GS(t,e){return cn(t).pipe(Xd(e),qd(e))}function zS(t,e){return new we(function(n){var r=0;return e.schedule(function(){r===t.length?n.complete():(n.next(t[r++]),n.closed||this.schedule())})})}function OS(t,e){return new we(function(n){var r;return En(n,e,function(){r=t[Ud](),En(n,e,function(){var i,o,a;try{i=r.next(),o=i.value,a=i.done}catch(s){n.error(s);return}a?n.complete():n.next(o)},0,!0)}),function(){return Pt(r==null?void 0:r.return)&&r.return()}})}function Vd(t,e){if(!t)throw new Error("Iterable cannot be null");return new we(function(n){En(n,e,function(){var r=t[Symbol.asyncIterator]();En(n,e,function(){r.next().then(function(i){i.done?n.complete():n.next(i.value)})},0,!0)})})}function US(t,e){return Vd(Yd(t),e)}function BS(t,e){if(t!=null){if(Gd(t))return FS(t,e);if(Nd(t))return zS(t,e);if(Fd(t))return GS(t,e);if(zd(t))return Vd(t,e);if(Bd(t))return OS(t,e);if(Wd(t))return US(t,e)}throw Od(t)}function YS(t,e){return e?BS(t,e):cn(t)}cc(function(t){return function(){t(this),this.name="EmptyError",this.message="no elements in sequence"}});function jd(t,e){return Dn(function(n,r){var i=0;n.subscribe(wi(r,function(o){r.next(t.call(e,o,i++))}))})}function WS(t,e,n,r,i,o,a,s){var u=[],c=0,l=0,h=!1,f=function(){h&&!u.length&&!c&&e.complete()},d=function(g){return c<r?p(g):u.push(g)},p=function(g){c++;var m=!1;cn(n(g,l++)).subscribe(wi(e,function(y){e.next(y)},function(){m=!0},void 0,function(){if(m)try{c--;for(var y=function(){var x=u.shift();a||p(x)};u.length&&c<r;)y();f()}catch(x){e.error(x)}}))};return t.subscribe(wi(e,d,function(){h=!0,f()})),function(){}}function Zd(t,e,n){return n===void 0&&(n=1/0),Pt(e)?Zd(function(r,i){return jd(function(o,a){return e(r,o,i,a)})(cn(t(r,i)))},n):(typeof e=="number"&&(n=e),Dn(function(r,i){return WS(r,i,t,n)}))}function HS(t){return Zd(Ed,t)}function qS(){return HS(1)}function Kd(){for(var t=[],e=0;e<arguments.length;e++)t[e]=arguments[e];return qS()(YS(t,Id(t)))}function XS(t){t===void 0&&(t={});var e=t.connector,n=e===void 0?function(){return new $i}:e,r=t.resetOnError,i=r===void 0?!0:r,o=t.resetOnComplete,a=o===void 0?!0:o,s=t.resetOnRefCountZero,u=s===void 0?!0:s;return function(c){var l,h,f,d=0,p=!1,g=!1,m=function(){h==null||h.unsubscribe(),h=void 0},y=function(){m(),l=f=void 0,p=g=!1},x=function(){var v=l;y(),v==null||v.unsubscribe()};return Dn(function(v,b){d++,!g&&!p&&m();var $=f=f??n();b.add(function(){d--,d===0&&!g&&!p&&(h=mc(x,u))}),$.subscribe(b),!l&&d>0&&(l=new _i({next:function(w){return $.next(w)},error:function(w){g=!0,m(),h=mc(y,i,w),$.error(w)},complete:function(){p=!0,m(),h=mc(y,a),$.complete()}}),cn(v).subscribe(l))})(c)}}function mc(t,e){for(var n=[],r=2;r<arguments.length;r++)n[r-2]=arguments[r];if(e===!0){t();return}if(e!==!1){var i=new _i({next:function(){i.unsubscribe(),t()}});return cn(e.apply(void 0,vi([],bi(n)))).subscribe(i)}}function VS(t,e,n){var r,i=!1;return r=t,XS({connector:function(){return new SS(r,e,n)},resetOnError:!0,resetOnComplete:!1,resetOnRefCountZero:i})}function jS(){for(var t=[],e=0;e<arguments.length;e++)t[e]=arguments[e];var n=Id(t);return Dn(function(r,i){(n?Kd(t,r,n):Kd(t,r)).subscribe(i)})}function ZS(t){return Dn(function(e,n){cn(t).subscribe(wi(n,function(){return n.complete()},fc)),!n.closed&&e.subscribe(n)})}const Qd=({maxValue:t=1,minValue:e=0,axisWidth:n,scaleDomain:r=hr.scaleDomain,scaleRange:i=hr.scaleRange})=>{const o=r[0]??hr.scaleDomain[0],a=r[1]??hr.scaleDomain[1],s=i[0]??hr.scaleRange[0],u=i[1]??hr.scaleRange[1],c=o==="auto"?e:o,l=a==="auto"?t:a;let h=n*s,f=n*u;return wd().domain([c,l]).range([h,f])},Jd=({axisLabels:t,axisWidth:e,padding:n=.5})=>{let r=[0,e];return tS().domain(t).range(r).padding(n)},KS=({axisLabels:t,axisWidth:e,padding:n=.5,reverse:r=!1})=>{let i=t.map((o,a)=>a);return r&&i.reverse(),$d().domain([-0,e+0]).range(i)};function QS({name:t,defaultParams:e,initFn:n}){const r=new $i,i=new $i,o=new WeakMap;let a=()=>{},s,u=e;return{params$:i,name:t,defaultParams:e,init(){s&&(a=n(s)??(()=>{}),o.set(s.selection,s))},destroy(){a(),s&&(s.selection.remove(),s=void 0),r.next(void 0)},setPresetParams:c=>{u=sc(c,e)},setContext:c=>{s=c,s.observer.fullParams$=i.pipe(ZS(r),jS({}),jd(l=>sc(l,u)),VS(1))}}}const la=()=>function(t,e){return function(n){return class{constructor(){const r=QS({name:t,defaultParams:e,initFn:n});this.params$=r.params$,this.name=r.name,this.defaultParams=r.defaultParams,this.init=r.init,this.destroy=r.destroy,this.setPresetParams=r.setPresetParams,this.setContext=r.setContext}}}},Si=la(),$e=la(),Xe=la(),tp=la();function _t(t,e){return t==null||e==null?NaN:t<e?-1:t>e?1:t>=e?0:NaN}function ep(t,e){return t==null||e==null?NaN:e<t?-1:e>t?1:e>=t?0:NaN}function fa(t){let e,n,r;t.length!==2?(e=_t,n=(s,u)=>_t(t(s),u),r=(s,u)=>t(s)-u):(e=t===_t||t===ep?t:JS,n=t,r=t);function i(s,u,c=0,l=s.length){if(c<l){if(e(u,u)!==0)return l;do{const h=c+l>>>1;n(s[h],u)<0?c=h+1:l=h}while(c<l)}return c}function o(s,u,c=0,l=s.length){if(c<l){if(e(u,u)!==0)return l;do{const h=c+l>>>1;n(s[h],u)<=0?c=h+1:l=h}while(c<l)}return c}function a(s,u,c=0,l=s.length){const h=i(s,u,c,l-1);return h>c&&r(s[h-1],u)>-r(s[h],u)?h-1:h}return{left:i,center:a,right:o}}function JS(){return 0}function ha(t){return t===null?NaN:+t}function*t6(t,e){if(e===void 0)for(let n of t)n!=null&&(n=+n)>=n&&(yield n);else{let n=-1;for(let r of t)(r=e(r,++n,t))!=null&&(r=+r)>=r&&(yield r)}}const np=fa(_t),rp=np.right,e6=np.left,n6=fa(ha).center,kn=rp;function r6(t,e){if(!((e=+e)>=0))throw new RangeError("invalid r");let n=t.length;if(!((n=Math.floor(n))>=0))throw new RangeError("invalid length");if(!n||!e)return t;const r=yc(e),i=t.slice();return r(t,i,0,n,1),r(i,t,0,n,1),r(t,i,0,n,1),t}const ip=op(yc),i6=op(o6);function op(t){return function(e,n,r=n){if(!((n=+n)>=0))throw new RangeError("invalid rx");if(!((r=+r)>=0))throw new RangeError("invalid ry");let{data:i,width:o,height:a}=e;if(!((o=Math.floor(o))>=0))throw new RangeError("invalid width");if(!((a=Math.floor(a!==void 0?a:i.length/o))>=0))throw new RangeError("invalid height");if(!o||!a||!n&&!r)return e;const s=n&&t(n),u=r&&t(r),c=i.slice();return s&&u?(xr(s,c,i,o,a),xr(s,i,c,o,a),xr(s,c,i,o,a),_r(u,i,c,o,a),_r(u,c,i,o,a),_r(u,i,c,o,a)):s?(xr(s,i,c,o,a),xr(s,c,i,o,a),xr(s,i,c,o,a)):u&&(_r(u,i,c,o,a),_r(u,c,i,o,a),_r(u,i,c,o,a)),e}}function xr(t,e,n,r,i){for(let o=0,a=r*i;o<a;)t(e,n,o,o+=r,1)}function _r(t,e,n,r,i){for(let o=0,a=r*i;o<r;++o)t(e,n,o,o+a,r)}function o6(t){const e=yc(t);return(n,r,i,o,a)=>{i<<=2,o<<=2,a<<=2,e(n,r,i+0,o+0,a),e(n,r,i+1,o+1,a),e(n,r,i+2,o+2,a),e(n,r,i+3,o+3,a)}}function yc(t){const e=Math.floor(t);if(e===t)return a6(t);const n=t-e,r=2*t+1;return(i,o,a,s,u)=>{if(!((s-=u)>=a))return;let c=e*o[a];const l=u*e,h=l+u;for(let f=a,d=a+l;f<d;f+=u)c+=o[Math.min(s,f)];for(let f=a,d=s;f<=d;f+=u)c+=o[Math.min(s,f+l)],i[f]=(c+n*(o[Math.max(a,f-h)]+o[Math.min(s,f+h)]))/r,c-=o[Math.max(a,f-l)]}}function a6(t){const e=2*t+1;return(n,r,i,o,a)=>{if(!((o-=a)>=i))return;let s=t*r[i];const u=a*t;for(let c=i,l=i+u;c<l;c+=a)s+=r[Math.min(o,c)];for(let c=i,l=o;c<=l;c+=a)s+=r[Math.min(o,c+u)],n[c]=s/e,s-=r[Math.max(i,c-u)]}}function da(t,e){let n=0;if(e===void 0)for(let r of t)r!=null&&(r=+r)>=r&&++n;else{let r=-1;for(let i of t)(i=e(i,++r,t))!=null&&(i=+i)>=i&&++n}return n}function s6(t){return t.length|0}function u6(t){return!(t>0)}function c6(t){return typeof t!="object"||"length"in t?t:Array.from(t)}function l6(t){return e=>t(...e)}function f6(...t){const e=typeof t[t.length-1]=="function"&&l6(t.pop());t=t.map(c6);const n=t.map(s6),r=t.length-1,i=new Array(r+1).fill(0),o=[];if(r<0||n.some(u6))return o;for(;;){o.push(i.map((s,u)=>t[u][s]));let a=r;for(;++i[a]===n[a];){if(a===0)return e?o.map(e):o;i[a--]=0}}}function h6(t,e){var n=0,r=0;return Float64Array.from(t,e===void 0?i=>n+=+i||0:i=>n+=+e(i,r++,t)||0)}function ap(t,e){let n=0,r,i=0,o=0;if(e===void 0)for(let a of t)a!=null&&(a=+a)>=a&&(r=a-i,i+=r/++n,o+=r*(a-i));else{let a=-1;for(let s of t)(s=e(s,++a,t))!=null&&(s=+s)>=s&&(r=s-i,i+=r/++n,o+=r*(s-i))}if(n>1)return o/(n-1)}function sp(t,e){const n=ap(t,e);return n&&Math.sqrt(n)}function Ai(t,e){let n,r;if(e===void 0)for(const i of t)i!=null&&(n===void 0?i>=i&&(n=r=i):(n>i&&(n=i),r<i&&(r=i)));else{let i=-1;for(let o of t)(o=e(o,++i,t))!=null&&(n===void 0?o>=o&&(n=r=o):(n>o&&(n=o),r<o&&(r=o)))}return[n,r]}class Dt{constructor(){this._partials=new Float64Array(32),this._n=0}add(e){const n=this._partials;let r=0;for(let i=0;i<this._n&&i<32;i++){const o=n[i],a=e+o,s=Math.abs(e)<Math.abs(o)?e-(a-o):o-(a-e);s&&(n[r++]=s),e=a}return n[r]=e,this._n=r+1,this}valueOf(){const e=this._partials;let n=this._n,r,i,o,a=0;if(n>0){for(a=e[--n];n>0&&(r=a,i=e[--n],a=r+i,o=i-(a-r),!o););n>0&&(o<0&&e[n-1]<0||o>0&&e[n-1]>0)&&(i=o*2,r=a+i,i==r-a&&(a=r))}return a}}function d6(t,e){const n=new Dt;if(e===void 0)for(let r of t)(r=+r)&&n.add(r);else{let r=-1;for(let i of t)(i=+e(i,++r,t))&&n.add(i)}return+n}function p6(t,e){const n=new Dt;let r=-1;return Float64Array.from(t,e===void 0?i=>n.add(+i||0):i=>n.add(+e(i,++r,t)||0))}class Mi extends Map{constructor(e,n=lp){if(super(),Object.defineProperties(this,{_intern:{value:new Map},_key:{value:n}}),e!=null)for(const[r,i]of e)this.set(r,i)}get(e){return super.get(bc(this,e))}has(e){return super.has(bc(this,e))}set(e,n){return super.set(up(this,e),n)}delete(e){return super.delete(cp(this,e))}}class Ln extends Set{constructor(e,n=lp){if(super(),Object.defineProperties(this,{_intern:{value:new Map},_key:{value:n}}),e!=null)for(const r of e)this.add(r)}has(e){return super.has(bc(this,e))}add(e){return super.add(up(this,e))}delete(e){return super.delete(cp(this,e))}}function bc({_intern:t,_key:e},n){const r=e(n);return t.has(r)?t.get(r):n}function up({_intern:t,_key:e},n){const r=e(n);return t.has(r)?t.get(r):(t.set(r,n),n)}function cp({_intern:t,_key:e},n){const r=e(n);return t.has(r)&&(n=t.get(r),t.delete(r)),n}function lp(t){return t!==null&&typeof t=="object"?t.valueOf():t}function wr(t){return t}function fp(t,...e){return $r(t,wr,wr,e)}function hp(t,...e){return $r(t,Array.from,wr,e)}function dp(t,e){for(let n=1,r=e.length;n<r;++n)t=t.flatMap(i=>i.pop().map(([o,a])=>[...i,o,a]));return t}function g6(t,...e){return dp(hp(t,...e),e)}function m6(t,e,...n){return dp(gp(t,e,...n),n)}function pp(t,e,...n){return $r(t,wr,e,n)}function gp(t,e,...n){return $r(t,Array.from,e,n)}function y6(t,...e){return $r(t,wr,mp,e)}function b6(t,...e){return $r(t,Array.from,mp,e)}function mp(t){if(t.length!==1)throw new Error("duplicate key");return t[0]}function $r(t,e,n,r){return function i(o,a){if(a>=r.length)return n(o);const s=new Mi,u=r[a++];let c=-1;for(const l of o){const h=u(l,++c,o),f=s.get(h);f?f.push(l):s.set(h,[l])}for(const[l,h]of s)s.set(l,i(h,a));return e(s)}(t,0)}function yp(t,e){return Array.from(e,n=>t[n])}function vc(t,...e){if(typeof t[Symbol.iterator]!="function")throw new TypeError("values is not iterable");t=Array.from(t);let[n]=e;if(n&&n.length!==2||e.length>1){const r=Uint32Array.from(t,(i,o)=>o);return e.length>1?(e=e.map(i=>t.map(i)),r.sort((i,o)=>{for(const a of e){const s=Sr(a[i],a[o]);if(s)return s}})):(n=t.map(n),r.sort((i,o)=>Sr(n[i],n[o]))),yp(t,r)}return t.sort(xc(n))}function xc(t=_t){if(t===_t)return Sr;if(typeof t!="function")throw new TypeError("compare is not a function");return(e,n)=>{const r=t(e,n);return r||r===0?r:(t(n,n)===0)-(t(e,e)===0)}}function Sr(t,e){return(t==null||!(t>=t))-(e==null||!(e>=e))||(t<e?-1:t>e?1:0)}function v6(t,e,n){return(e.length!==2?vc(pp(t,e,n),([r,i],[o,a])=>_t(i,a)||_t(r,o)):vc(fp(t,n),([r,i],[o,a])=>e(i,a)||_t(r,o))).map(([r])=>r)}var x6=Array.prototype,_6=x6.slice;function _c(t){return()=>t}const w6=Math.sqrt(50),$6=Math.sqrt(10),S6=Math.sqrt(2);function pa(t,e,n){const r=(e-t)/Math.max(0,n),i=Math.floor(Math.log10(r)),o=r/Math.pow(10,i),a=o>=w6?10:o>=$6?5:o>=S6?2:1;let s,u,c;return i<0?(c=Math.pow(10,-i)/a,s=Math.round(t*c),u=Math.round(e*c),s/c<t&&++s,u/c>e&&--u,c=-c):(c=Math.pow(10,i)*a,s=Math.round(t/c),u=Math.round(e/c),s*c<t&&++s,u*c>e&&--u),u<s&&.5<=n&&n<2?pa(t,e,n*2):[s,u,c]}function Cn(t,e,n){if(e=+e,t=+t,n=+n,!(n>0))return[];if(t===e)return[t];const r=e<t,[i,o,a]=r?pa(e,t,n):pa(t,e,n);if(!(o>=i))return[];const s=o-i+1,u=new Array(s);if(r)if(a<0)for(let c=0;c<s;++c)u[c]=(o-c)/-a;else for(let c=0;c<s;++c)u[c]=(o-c)*a;else if(a<0)for(let c=0;c<s;++c)u[c]=(i+c)/-a;else for(let c=0;c<s;++c)u[c]=(i+c)*a;return u}function Rn(t,e,n){return e=+e,t=+t,n=+n,pa(t,e,n)[2]}function ga(t,e,n){e=+e,t=+t,n=+n;const r=e<t,i=r?Rn(e,t,n):Rn(t,e,n);return(r?-1:1)*(i<0?1/-i:i)}function wc(t,e,n){let r;for(;;){const i=Rn(t,e,n);if(i===r||i===0||!isFinite(i))return[t,e];i>0?(t=Math.floor(t/i)*i,e=Math.ceil(e/i)*i):i<0&&(t=Math.ceil(t*i)/i,e=Math.floor(e*i)/i),r=i}}function $c(t){return Math.max(1,Math.ceil(Math.log(da(t))/Math.LN2)+1)}function bp(){var t=wr,e=Ai,n=$c;function r(i){Array.isArray(i)||(i=Array.from(i));var o,a=i.length,s,u,c=new Array(a);for(o=0;o<a;++o)c[o]=t(i[o],o,i);var l=e(c),h=l[0],f=l[1],d=n(c,h,f);if(!Array.isArray(d)){const v=f,b=+d;if(e===Ai&&([h,f]=wc(h,f,b)),d=Cn(h,f,b),d[0]<=h&&(u=Rn(h,f,b)),d[d.length-1]>=f)if(v>=f&&e===Ai){const $=Rn(h,f,b);isFinite($)&&($>0?f=(Math.floor(f/$)+1)*$:$<0&&(f=(Math.ceil(f*-$)+1)/-$))}else d.pop()}for(var p=d.length,g=0,m=p;d[g]<=h;)++g;for(;d[m-1]>f;)--m;(g||m<p)&&(d=d.slice(g,m),p=m-g);var y=new Array(p+1),x;for(o=0;o<=p;++o)x=y[o]=[],x.x0=o>0?d[o-1]:h,x.x1=o<p?d[o]:f;if(isFinite(u)){if(u>0)for(o=0;o<a;++o)(s=c[o])!=null&&h<=s&&s<=f&&y[Math.min(p,Math.floor((s-h)/u))].push(i[o]);else if(u<0){for(o=0;o<a;++o)if((s=c[o])!=null&&h<=s&&s<=f){const v=Math.floor((h-s)*u);y[Math.min(p,v+(d[v]<=s))].push(i[o])}}}else for(o=0;o<a;++o)(s=c[o])!=null&&h<=s&&s<=f&&y[kn(d,s,0,p)].push(i[o]);return y}return r.value=function(i){return arguments.length?(t=typeof i=="function"?i:_c(i),r):t},r.domain=function(i){return arguments.length?(e=typeof i=="function"?i:_c([i[0],i[1]]),r):e},r.thresholds=function(i){return arguments.length?(n=typeof i=="function"?i:_c(Array.isArray(i)?_6.call(i):i),r):n},r}function Ti(t,e){let n;if(e===void 0)for(const r of t)r!=null&&(n<r||n===void 0&&r>=r)&&(n=r);else{let r=-1;for(let i of t)(i=e(i,++r,t))!=null&&(n<i||n===void 0&&i>=i)&&(n=i)}return n}function Sc(t,e){let n,r=-1,i=-1;if(e===void 0)for(const o of t)++i,o!=null&&(n<o||n===void 0&&o>=o)&&(n=o,r=i);else for(let o of t)(o=e(o,++i,t))!=null&&(n<o||n===void 0&&o>=o)&&(n=o,r=i);return r}function ma(t,e){let n;if(e===void 0)for(const r of t)r!=null&&(n>r||n===void 0&&r>=r)&&(n=r);else{let r=-1;for(let i of t)(i=e(i,++r,t))!=null&&(n>i||n===void 0&&i>=i)&&(n=i)}return n}function Ac(t,e){let n,r=-1,i=-1;if(e===void 0)for(const o of t)++i,o!=null&&(n>o||n===void 0&&o>=o)&&(n=o,r=i);else for(let o of t)(o=e(o,++i,t))!=null&&(n>o||n===void 0&&o>=o)&&(n=o,r=i);return r}function ya(t,e,n=0,r=1/0,i){if(e=Math.floor(e),n=Math.floor(Math.max(0,n)),r=Math.floor(Math.min(t.length-1,r)),!(n<=e&&e<=r))return t;for(i=i===void 0?Sr:xc(i);r>n;){if(r-n>600){const u=r-n+1,c=e-n+1,l=Math.log(u),h=.5*Math.exp(2*l/3),f=.5*Math.sqrt(l*h*(u-h)/u)*(c-u/2<0?-1:1),d=Math.max(n,Math.floor(e-c*h/u+f)),p=Math.min(r,Math.floor(e+(u-c)*h/u+f));ya(t,e,d,p,i)}const o=t[e];let a=n,s=r;for(Pi(t,n,e),i(t[r],o)>0&&Pi(t,n,r);a<s;){for(Pi(t,a,s),++a,--s;i(t[a],o)<0;)++a;for(;i(t[s],o)>0;)--s}i(t[n],o)===0?Pi(t,n,s):(++s,Pi(t,s,r)),s<=e&&(n=s+1),e<=s&&(r=s-1)}return t}function Pi(t,e,n){const r=t[e];t[e]=t[n],t[n]=r}function vp(t,e=_t){let n,r=!1;if(e.length===1){let i;for(const o of t){const a=e(o);(r?_t(a,i)>0:_t(a,a)===0)&&(n=o,i=a,r=!0)}}else for(const i of t)(r?e(i,n)>0:e(i,i)===0)&&(n=i,r=!0);return n}function Di(t,e,n){if(t=Float64Array.from(t6(t,n)),!(!(r=t.length)||isNaN(e=+e))){if(e<=0||r<2)return ma(t);if(e>=1)return Ti(t);var r,i=(r-1)*e,o=Math.floor(i),a=Ti(ya(t,o).subarray(0,o+1)),s=ma(t.subarray(o+1));return a+(s-a)*(i-o)}}function xp(t,e,n=ha){if(!(!(r=t.length)||isNaN(e=+e))){if(e<=0||r<2)return+n(t[0],0,t);if(e>=1)return+n(t[r-1],r-1,t);var r,i=(r-1)*e,o=Math.floor(i),a=+n(t[o],o,t),s=+n(t[o+1],o+1,t);return a+(s-a)*(i-o)}}function _p(t,e,n=ha){if(!isNaN(e=+e)){if(r=Float64Array.from(t,(s,u)=>ha(n(t[u],u,t))),e<=0)return Ac(r);if(e>=1)return Sc(r);var r,i=Uint32Array.from(t,(s,u)=>u),o=r.length-1,a=Math.floor(o*e);return ya(i,a,0,o,(s,u)=>Sr(r[s],r[u])),a=vp(i.subarray(0,a+1),s=>r[s]),a>=0?a:-1}}function A6(t,e,n){const r=da(t),i=Di(t,.75)-Di(t,.25);return r&&i?Math.ceil((n-e)/(2*i*Math.pow(r,-1/3))):1}function M6(t,e,n){const r=da(t),i=sp(t);return r&&i?Math.ceil((n-e)*Math.cbrt(r)/(3.49*i)):1}function T6(t,e){let n=0,r=0;if(e===void 0)for(let i of t)i!=null&&(i=+i)>=i&&(++n,r+=i);else{let i=-1;for(let o of t)(o=e(o,++i,t))!=null&&(o=+o)>=o&&(++n,r+=o)}if(n)return r/n}function P6(t,e){return Di(t,.5,e)}function D6(t,e){return _p(t,.5,e)}function*E6(t){for(const e of t)yield*e}function Mc(t){return Array.from(E6(t))}function k6(t,e){const n=new Mi;if(e===void 0)for(let o of t)o!=null&&o>=o&&n.set(o,(n.get(o)||0)+1);else{let o=-1;for(let a of t)(a=e(a,++o,t))!=null&&a>=a&&n.set(a,(n.get(a)||0)+1)}let r,i=0;for(const[o,a]of n)a>i&&(i=a,r=o);return r}function L6(t,e=C6){const n=[];let r,i=!1;for(const o of t)i&&n.push(e(r,o)),r=o,i=!0;return n}function C6(t,e){return[t,e]}function ln(t,e,n){t=+t,e=+e,n=(i=arguments.length)<2?(e=t,t=0,1):i<3?1:+n;for(var r=-1,i=Math.max(0,Math.ceil((e-t)/n))|0,o=new Array(i);++r<i;)o[r]=t+r*n;return o}function R6(t,e=_t){if(typeof t[Symbol.iterator]!="function")throw new TypeError("values is not iterable");let n=Array.from(t);const r=new Float64Array(n.length);e.length!==2&&(n=n.map(e),e=_t);const i=(s,u)=>e(n[s],n[u]);let o,a;return t=Uint32Array.from(n,(s,u)=>u),t.sort(e===_t?(s,u)=>Sr(n[s],n[u]):xc(i)),t.forEach((s,u)=>{const c=i(s,o===void 0?s:o);c>=0?((o===void 0||c>0)&&(o=s,a=u),r[s]=a):r[s]=NaN}),r}function I6(t,e=_t){let n,r=!1;if(e.length===1){let i;for(const o of t){const a=e(o);(r?_t(a,i)<0:_t(a,a)===0)&&(n=o,i=a,r=!0)}}else for(const i of t)(r?e(i,n)<0:e(i,i)===0)&&(n=i,r=!0);return n}function wp(t,e=_t){if(e.length===1)return Ac(t,e);let n,r=-1,i=-1;for(const o of t)++i,(r<0?e(o,o)===0:e(o,n)<0)&&(n=o,r=i);return r}function N6(t,e=_t){if(e.length===1)return Sc(t,e);let n,r=-1,i=-1;for(const o of t)++i,(r<0?e(o,o)===0:e(o,n)>0)&&(n=o,r=i);return r}function F6(t,e){const n=wp(t,e);return n<0?void 0:n}const G6=$p(Math.random);function $p(t){return function(n,r=0,i=n.length){let o=i-(r=+r);for(;o;){const a=t()*o--|0,s=n[o+r];n[o+r]=n[a+r],n[a+r]=s}return n}}function z6(t,e){let n=0;if(e===void 0)for(let r of t)(r=+r)&&(n+=r);else{let r=-1;for(let i of t)(i=+e(i,++r,t))&&(n+=i)}return n}function Sp(t){if(!(o=t.length))return[];for(var e=-1,n=ma(t,O6),r=new Array(n);++e<n;)for(var i=-1,o,a=r[e]=new Array(o);++i<o;)a[i]=t[i][e];return r}function O6(t){return t.length}function U6(){return Sp(arguments)}function B6(t,e){if(typeof e!="function")throw new TypeError("test is not a function");let n=-1;for(const r of t)if(!e(r,++n,t))return!1;return!0}function Y6(t,e){if(typeof e!="function")throw new TypeError("test is not a function");let n=-1;for(const r of t)if(e(r,++n,t))return!0;return!1}function W6(t,e){if(typeof e!="function")throw new TypeError("test is not a function");const n=[];let r=-1;for(const i of t)e(i,++r,t)&&n.push(i);return n}function H6(t,e){if(typeof t[Symbol.iterator]!="function")throw new TypeError("values is not iterable");if(typeof e!="function")throw new TypeError("mapper is not a function");return Array.from(t,(n,r)=>e(n,r,t))}function q6(t,e,n){if(typeof e!="function")throw new TypeError("reducer is not a function");const r=t[Symbol.iterator]();let i,o,a=-1;if(arguments.length<3){if({done:i,value:n}=r.next(),i)return;++a}for(;{done:i,value:o}=r.next(),!i;)n=e(n,o,++a,t);return n}function X6(t){if(typeof t[Symbol.iterator]!="function")throw new TypeError("values is not iterable");return Array.from(t).reverse()}function V6(t,...e){t=new Ln(t);for(const n of e)for(const r of n)t.delete(r);return t}function j6(t,e){const n=e[Symbol.iterator](),r=new Ln;for(const i of t){if(r.has(i))return!1;let o,a;for(;({value:o,done:a}=n.next())&&!a;){if(Object.is(i,o))return!1;r.add(o)}}return!0}function Z6(t,...e){t=new Ln(t),e=e.map(K6);t:for(const n of t)for(const r of e)if(!r.has(n)){t.delete(n);continue t}return t}function K6(t){return t instanceof Ln?t:new Ln(t)}function Ap(t,e){const n=t[Symbol.iterator](),r=new Set;for(const i of e){const o=Mp(i);if(r.has(o))continue;let a,s;for(;{value:a,done:s}=n.next();){if(s)return!1;const u=Mp(a);if(r.add(u),Object.is(o,u))break}}return!0}function Mp(t){return t!==null&&typeof t=="object"?t.valueOf():t}function Q6(t,e){return Ap(e,t)}function J6(...t){const e=new Ln;for(const n of t)for(const r of n)e.add(r);return e}function t5(t){return t}var ba=1,va=2,Tc=3,Ei=4,Tp=1e-6;function e5(t){return"translate("+t+",0)"}function n5(t){return"translate(0,"+t+")"}function r5(t){return e=>+t(e)}function i5(t,e){return e=Math.max(0,t.bandwidth()-e*2)/2,t.round()&&(e=Math.round(e)),n=>+t(n)+e}function o5(){return!this.__axis}function xa(t,e){var n=[],r=null,i=null,o=6,a=6,s=3,u=typeof window<"u"&&window.devicePixelRatio>1?0:.5,c=t===ba||t===Ei?-1:1,l=t===Ei||t===va?"x":"y",h=t===ba||t===Tc?e5:n5;function f(d){var p=r??(e.ticks?e.ticks.apply(e,n):e.domain()),g=i??(e.tickFormat?e.tickFormat.apply(e,n):t5),m=Math.max(o,0)+s,y=e.range(),x=+y[0]+u,v=+y[y.length-1]+u,b=(e.bandwidth?i5:r5)(e.copy(),u),$=d.selection?d.selection():d,w=$.selectAll(".domain").data([null]),S=$.selectAll(".tick").data(p,e).order(),_=S.exit(),P=S.enter().append("g").attr("class","tick"),D=S.select("line"),A=S.select("text");w=w.merge(w.enter().insert("path",".tick").attr("class","domain").attr("stroke","currentColor")),S=S.merge(P),D=D.merge(P.append("line").attr("stroke","currentColor").attr(l+"2",c*o)),A=A.merge(P.append("text").attr("fill","currentColor").attr(l,c*m).attr("dy",t===ba?"0em":t===Tc?"0.71em":"0.32em")),d!==$&&(w=w.transition(d),S=S.transition(d),D=D.transition(d),A=A.transition(d),_=_.transition(d).attr("opacity",Tp).attr("transform",function(I){return isFinite(I=b(I))?h(I+u):this.getAttribute("transform")}),P.attr("opacity",Tp).attr("transform",function(I){var M=this.parentNode.__axis;return h((M&&isFinite(M=M(I))?M:b(I))+u)})),_.remove(),w.attr("d",t===Ei||t===va?a?"M"+c*a+","+x+"H"+u+"V"+v+"H"+c*a:"M"+u+","+x+"V"+v:a?"M"+x+","+c*a+"V"+u+"H"+v+"V"+c*a:"M"+x+","+u+"H"+v),S.attr("opacity",1).attr("transform",function(I){return h(b(I)+u)}),D.attr(l+"2",c*o),A.attr(l,c*m).text(g),$.filter(o5).attr("fill","none").attr("font-size",10).attr("font-family","sans-serif").attr("text-anchor",t===va?"start":t===Ei?"end":"middle"),$.each(function(){this.__axis=b})}return f.scale=function(d){return arguments.length?(e=d,f):e},f.ticks=function(){return n=Array.from(arguments),f},f.tickArguments=function(d){return arguments.length?(n=d==null?[]:Array.from(d),f):n.slice()},f.tickValues=function(d){return arguments.length?(r=d==null?null:Array.from(d),f):r&&r.slice()},f.tickFormat=function(d){return arguments.length?(i=d,f):i},f.tickSize=function(d){return arguments.length?(o=a=+d,f):o},f.tickSizeInner=function(d){return arguments.length?(o=+d,f):o},f.tickSizeOuter=function(d){return arguments.length?(a=+d,f):a},f.tickPadding=function(d){return arguments.length?(s=+d,f):s},f.offset=function(d){return arguments.length?(u=+d,f):u},f}function Pp(t){return xa(ba,t)}function a5(t){return xa(va,t)}function s5(t){return xa(Tc,t)}function Dp(t){return xa(Ei,t)}var u5={value:()=>{}};function In(){for(var t=0,e=arguments.length,n={},r;t<e;++t){if(!(r=arguments[t]+"")||r in n||/[\s.]/.test(r))throw new Error("illegal type: "+r);n[r]=[]}return new _a(n)}function _a(t){this._=t}function c5(t,e){return t.trim().split(/^|\s+/).map(function(n){var r="",i=n.indexOf(".");if(i>=0&&(r=n.slice(i+1),n=n.slice(0,i)),n&&!e.hasOwnProperty(n))throw new Error("unknown type: "+n);return{type:n,name:r}})}_a.prototype=In.prototype={constructor:_a,on:function(t,e){var n=this._,r=c5(t+"",n),i,o=-1,a=r.length;if(arguments.length<2){for(;++o<a;)if((i=(t=r[o]).type)&&(i=l5(n[i],t.name)))return i;return}if(e!=null&&typeof e!="function")throw new Error("invalid callback: "+e);for(;++o<a;)if(i=(t=r[o]).type)n[i]=Ep(n[i],t.name,e);else if(e==null)for(i in n)n[i]=Ep(n[i],t.name,null);return this},copy:function(){var t={},e=this._;for(var n in e)t[n]=e[n].slice();return new _a(t)},call:function(t,e){if((i=arguments.length-2)>0)for(var n=new Array(i),r=0,i,o;r<i;++r)n[r]=arguments[r+2];if(!this._.hasOwnProperty(t))throw new Error("unknown type: "+t);for(o=this._[t],r=0,i=o.length;r<i;++r)o[r].value.apply(e,n)},apply:function(t,e,n){if(!this._.hasOwnProperty(t))throw new Error("unknown type: "+t);for(var r=this._[t],i=0,o=r.length;i<o;++i)r[i].value.apply(e,n)}};function l5(t,e){for(var n=0,r=t.length,i;n<r;++n)if((i=t[n]).name===e)return i.value}function Ep(t,e,n){for(var r=0,i=t.length;r<i;++r)if(t[r].name===e){t[r]=u5,t=t.slice(0,r).concat(t.slice(r+1));break}return n!=null&&t.push({name:e,value:n}),t}var Pc="http://www.w3.org/1999/xhtml";const Dc={svg:"http://www.w3.org/2000/svg",xhtml:Pc,xlink:"http://www.w3.org/1999/xlink",xml:"http://www.w3.org/XML/1998/namespace",xmlns:"http://www.w3.org/2000/xmlns/"};function ki(t){var e=t+="",n=e.indexOf(":");return n>=0&&(e=t.slice(0,n))!=="xmlns"&&(t=t.slice(n+1)),Dc.hasOwnProperty(e)?{space:Dc[e],local:t}:t}function f5(t){return function(){var e=this.ownerDocument,n=this.namespaceURI;return n===Pc&&e.documentElement.namespaceURI===Pc?e.createElement(t):e.createElementNS(n,t)}}function h5(t){return function(){return this.ownerDocument.createElementNS(t.space,t.local)}}function wa(t){var e=ki(t);return(e.local?h5:f5)(e)}function d5(){}function $a(t){return t==null?d5:function(){return this.querySelector(t)}}function p5(t){typeof t!="function"&&(t=$a(t));for(var e=this._groups,n=e.length,r=new Array(n),i=0;i<n;++i)for(var o=e[i],a=o.length,s=r[i]=new Array(a),u,c,l=0;l<a;++l)(u=o[l])&&(c=t.call(u,u.__data__,l,o))&&("__data__"in u&&(c.__data__=u.__data__),s[l]=c);return new Yt(r,this._parents)}function kp(t){return t==null?[]:Array.isArray(t)?t:Array.from(t)}function g5(){return[]}function Ec(t){return t==null?g5:function(){return this.querySelectorAll(t)}}function m5(t){return function(){return kp(t.apply(this,arguments))}}function y5(t){typeof t=="function"?t=m5(t):t=Ec(t);for(var e=this._groups,n=e.length,r=[],i=[],o=0;o<n;++o)for(var a=e[o],s=a.length,u,c=0;c<s;++c)(u=a[c])&&(r.push(t.call(u,u.__data__,c,a)),i.push(u));return new Yt(r,i)}function kc(t){return function(){return this.matches(t)}}function Lp(t){return function(e){return e.matches(t)}}var b5=Array.prototype.find;function v5(t){return function(){return b5.call(this.children,t)}}function x5(){return this.firstElementChild}function _5(t){return this.select(t==null?x5:v5(typeof t=="function"?t:Lp(t)))}var w5=Array.prototype.filter;function $5(){return Array.from(this.children)}function S5(t){return function(){return w5.call(this.children,t)}}function A5(t){return this.selectAll(t==null?$5:S5(typeof t=="function"?t:Lp(t)))}function M5(t){typeof t!="function"&&(t=kc(t));for(var e=this._groups,n=e.length,r=new Array(n),i=0;i<n;++i)for(var o=e[i],a=o.length,s=r[i]=[],u,c=0;c<a;++c)(u=o[c])&&t.call(u,u.__data__,c,o)&&s.push(u);return new Yt(r,this._parents)}function Cp(t){return new Array(t.length)}function T5(){return new Yt(this._enter||this._groups.map(Cp),this._parents)}function Sa(t,e){this.ownerDocument=t.ownerDocument,this.namespaceURI=t.namespaceURI,this._next=null,this._parent=t,this.__data__=e}Sa.prototype={constructor:Sa,appendChild:function(t){return this._parent.insertBefore(t,this._next)},insertBefore:function(t,e){return this._parent.insertBefore(t,e)},querySelector:function(t){return this._parent.querySelector(t)},querySelectorAll:function(t){return this._parent.querySelectorAll(t)}};function P5(t){return function(){return t}}function D5(t,e,n,r,i,o){for(var a=0,s,u=e.length,c=o.length;a<c;++a)(s=e[a])?(s.__data__=o[a],r[a]=s):n[a]=new Sa(t,o[a]);for(;a<u;++a)(s=e[a])&&(i[a]=s)}function E5(t,e,n,r,i,o,a){var s,u,c=new Map,l=e.length,h=o.length,f=new Array(l),d;for(s=0;s<l;++s)(u=e[s])&&(f[s]=d=a.call(u,u.__data__,s,e)+"",c.has(d)?i[s]=u:c.set(d,u));for(s=0;s<h;++s)d=a.call(t,o[s],s,o)+"",(u=c.get(d))?(r[s]=u,u.__data__=o[s],c.delete(d)):n[s]=new Sa(t,o[s]);for(s=0;s<l;++s)(u=e[s])&&c.get(f[s])===u&&(i[s]=u)}function k5(t){return t.__data__}function L5(t,e){if(!arguments.length)return Array.from(this,k5);var n=e?E5:D5,r=this._parents,i=this._groups;typeof t!="function"&&(t=P5(t));for(var o=i.length,a=new Array(o),s=new Array(o),u=new Array(o),c=0;c<o;++c){var l=r[c],h=i[c],f=h.length,d=C5(t.call(l,l&&l.__data__,c,r)),p=d.length,g=s[c]=new Array(p),m=a[c]=new Array(p),y=u[c]=new Array(f);n(l,h,g,m,y,d,e);for(var x=0,v=0,b,$;x<p;++x)if(b=g[x]){for(x>=v&&(v=x+1);!($=m[v])&&++v<p;);b._next=$||null}}return a=new Yt(a,r),a._enter=s,a._exit=u,a}function C5(t){return typeof t=="object"&&"length"in t?t:Array.from(t)}function R5(){return new Yt(this._exit||this._groups.map(Cp),this._parents)}function I5(t,e,n){var r=this.enter(),i=this,o=this.exit();return typeof t=="function"?(r=t(r),r&&(r=r.selection())):r=r.append(t+""),e!=null&&(i=e(i),i&&(i=i.selection())),n==null?o.remove():n(o),r&&i?r.merge(i).order():i}function N5(t){for(var e=t.selection?t.selection():t,n=this._groups,r=e._groups,i=n.length,o=r.length,a=Math.min(i,o),s=new Array(i),u=0;u<a;++u)for(var c=n[u],l=r[u],h=c.length,f=s[u]=new Array(h),d,p=0;p<h;++p)(d=c[p]||l[p])&&(f[p]=d);for(;u<i;++u)s[u]=n[u];return new Yt(s,this._parents)}function F5(){for(var t=this._groups,e=-1,n=t.length;++e<n;)for(var r=t[e],i=r.length-1,o=r[i],a;--i>=0;)(a=r[i])&&(o&&a.compareDocumentPosition(o)^4&&o.parentNode.insertBefore(a,o),o=a);return this}function G5(t){t||(t=z5);function e(h,f){return h&&f?t(h.__data__,f.__data__):!h-!f}for(var n=this._groups,r=n.length,i=new Array(r),o=0;o<r;++o){for(var a=n[o],s=a.length,u=i[o]=new Array(s),c,l=0;l<s;++l)(c=a[l])&&(u[l]=c);u.sort(e)}return new Yt(i,this._parents).order()}function z5(t,e){return t<e?-1:t>e?1:t>=e?0:NaN}function O5(){var t=arguments[0];return arguments[0]=this,t.apply(null,arguments),this}function U5(){return Array.from(this)}function B5(){for(var t=this._groups,e=0,n=t.length;e<n;++e)for(var r=t[e],i=0,o=r.length;i<o;++i){var a=r[i];if(a)return a}return null}function Y5(){let t=0;for(const e of this)++t;return t}function W5(){return!this.node()}function H5(t){for(var e=this._groups,n=0,r=e.length;n<r;++n)for(var i=e[n],o=0,a=i.length,s;o<a;++o)(s=i[o])&&t.call(s,s.__data__,o,i);return this}function q5(t){return function(){this.removeAttribute(t)}}function X5(t){return function(){this.removeAttributeNS(t.space,t.local)}}function V5(t,e){return function(){this.setAttribute(t,e)}}function j5(t,e){return function(){this.setAttributeNS(t.space,t.local,e)}}function Z5(t,e){return function(){var n=e.apply(this,arguments);n==null?this.removeAttribute(t):this.setAttribute(t,n)}}function K5(t,e){return function(){var n=e.apply(this,arguments);n==null?this.removeAttributeNS(t.space,t.local):this.setAttributeNS(t.space,t.local,n)}}function Q5(t,e){var n=ki(t);if(arguments.length<2){var r=this.node();return n.local?r.getAttributeNS(n.space,n.local):r.getAttribute(n)}return this.each((e==null?n.local?X5:q5:typeof e=="function"?n.local?K5:Z5:n.local?j5:V5)(n,e))}function Lc(t){return t.ownerDocument&&t.ownerDocument.defaultView||t.document&&t||t.defaultView}function J5(t){return function(){this.style.removeProperty(t)}}function tA(t,e,n){return function(){this.style.setProperty(t,e,n)}}function eA(t,e,n){return function(){var r=e.apply(this,arguments);r==null?this.style.removeProperty(t):this.style.setProperty(t,r,n)}}function nA(t,e,n){return arguments.length>1?this.each((e==null?J5:typeof e=="function"?eA:tA)(t,e,n??"")):Nn(this.node(),t)}function Nn(t,e){return t.style.getPropertyValue(e)||Lc(t).getComputedStyle(t,null).getPropertyValue(e)}function rA(t){return function(){delete this[t]}}function iA(t,e){return function(){this[t]=e}}function oA(t,e){return function(){var n=e.apply(this,arguments);n==null?delete this[t]:this[t]=n}}function aA(t,e){return arguments.length>1?this.each((e==null?rA:typeof e=="function"?oA:iA)(t,e)):this.node()[t]}function Rp(t){return t.trim().split(/^|\s+/)}function Cc(t){return t.classList||new Ip(t)}function Ip(t){this._node=t,this._names=Rp(t.getAttribute("class")||"")}Ip.prototype={add:function(t){var e=this._names.indexOf(t);e<0&&(this._names.push(t),this._node.setAttribute("class",this._names.join(" ")))},remove:function(t){var e=this._names.indexOf(t);e>=0&&(this._names.splice(e,1),this._node.setAttribute("class",this._names.join(" ")))},contains:function(t){return this._names.indexOf(t)>=0}};function Np(t,e){for(var n=Cc(t),r=-1,i=e.length;++r<i;)n.add(e[r])}function Fp(t,e){for(var n=Cc(t),r=-1,i=e.length;++r<i;)n.remove(e[r])}function sA(t){return function(){Np(this,t)}}function uA(t){return function(){Fp(this,t)}}function cA(t,e){return function(){(e.apply(this,arguments)?Np:Fp)(this,t)}}function lA(t,e){var n=Rp(t+"");if(arguments.length<2){for(var r=Cc(this.node()),i=-1,o=n.length;++i<o;)if(!r.contains(n[i]))return!1;return!0}return this.each((typeof e=="function"?cA:e?sA:uA)(n,e))}function fA(){this.textContent=""}function hA(t){return function(){this.textContent=t}}function dA(t){return function(){var e=t.apply(this,arguments);this.textContent=e??""}}function pA(t){return arguments.length?this.each(t==null?fA:(typeof t=="function"?dA:hA)(t)):this.node().textContent}function gA(){this.innerHTML=""}function mA(t){return function(){this.innerHTML=t}}function yA(t){return function(){var e=t.apply(this,arguments);this.innerHTML=e??""}}function bA(t){return arguments.length?this.each(t==null?gA:(typeof t=="function"?yA:mA)(t)):this.node().innerHTML}function vA(){this.nextSibling&&this.parentNode.appendChild(this)}function xA(){return this.each(vA)}function _A(){this.previousSibling&&this.parentNode.insertBefore(this,this.parentNode.firstChild)}function wA(){return this.each(_A)}function $A(t){var e=typeof t=="function"?t:wa(t);return this.select(function(){return this.appendChild(e.apply(this,arguments))})}function SA(){return null}function AA(t,e){var n=typeof t=="function"?t:wa(t),r=e==null?SA:typeof e=="function"?e:$a(e);return this.select(function(){return this.insertBefore(n.apply(this,arguments),r.apply(this,arguments)||null)})}function MA(){var t=this.parentNode;t&&t.removeChild(this)}function TA(){return this.each(MA)}function PA(){var t=this.cloneNode(!1),e=this.parentNode;return e?e.insertBefore(t,this.nextSibling):t}function DA(){var t=this.cloneNode(!0),e=this.parentNode;return e?e.insertBefore(t,this.nextSibling):t}function EA(t){return this.select(t?DA:PA)}function kA(t){return arguments.length?this.property("__data__",t):this.node().__data__}function LA(t){return function(e){t.call(this,e,this.__data__)}}function CA(t){return t.trim().split(/^|\s+/).map(function(e){var n="",r=e.indexOf(".");return r>=0&&(n=e.slice(r+1),e=e.slice(0,r)),{type:e,name:n}})}function RA(t){return function(){var e=this.__on;if(e){for(var n=0,r=-1,i=e.length,o;n<i;++n)o=e[n],(!t.type||o.type===t.type)&&o.name===t.name?this.removeEventListener(o.type,o.listener,o.options):e[++r]=o;++r?e.length=r:delete this.__on}}}function IA(t,e,n){return function(){var r=this.__on,i,o=LA(e);if(r){for(var a=0,s=r.length;a<s;++a)if((i=r[a]).type===t.type&&i.name===t.name){this.removeEventListener(i.type,i.listener,i.options),this.addEventListener(i.type,i.listener=o,i.options=n),i.value=e;return}}this.addEventListener(t.type,o,n),i={type:t.type,name:t.name,value:e,listener:o,options:n},r?r.push(i):this.__on=[i]}}function NA(t,e,n){var r=CA(t+""),i,o=r.length,a;if(arguments.length<2){var s=this.node().__on;if(s){for(var u=0,c=s.length,l;u<c;++u)for(i=0,l=s[u];i<o;++i)if((a=r[i]).type===l.type&&a.name===l.name)return l.value}return}for(s=e?IA:RA,i=0;i<o;++i)this.each(s(r[i],e,n));return this}function Gp(t,e,n){var r=Lc(t),i=r.CustomEvent;typeof i=="function"?i=new i(e,n):(i=r.document.createEvent("Event"),n?(i.initEvent(e,n.bubbles,n.cancelable),i.detail=n.detail):i.initEvent(e,!1,!1)),t.dispatchEvent(i)}function FA(t,e){return function(){return Gp(this,t,e)}}function GA(t,e){return function(){return Gp(this,t,e.apply(this,arguments))}}function zA(t,e){return this.each((typeof e=="function"?GA:FA)(t,e))}function*OA(){for(var t=this._groups,e=0,n=t.length;e<n;++e)for(var r=t[e],i=0,o=r.length,a;i<o;++i)(a=r[i])&&(yield a)}var Rc=[null];function Yt(t,e){this._groups=t,this._parents=e}function Fn(){return new Yt([[document.documentElement]],Rc)}function UA(){return this}Yt.prototype=Fn.prototype={constructor:Yt,select:p5,selectAll:y5,selectChild:_5,selectChildren:A5,filter:M5,data:L5,enter:T5,exit:R5,join:I5,merge:N5,selection:UA,order:F5,sort:G5,call:O5,nodes:U5,node:B5,size:Y5,empty:W5,each:H5,attr:Q5,style:nA,property:aA,classed:lA,text:pA,html:bA,raise:xA,lower:wA,append:$A,insert:AA,remove:TA,clone:EA,datum:kA,on:NA,dispatch:zA,[Symbol.iterator]:OA};function Z(t){return typeof t=="string"?new Yt([[document.querySelector(t)]],[document.documentElement]):new Yt([[t]],Rc)}function BA(t){return Z(wa(t).call(document.documentElement))}var YA=0;function zp(){return new Ic}function Ic(){this._="@"+(++YA).toString(36)}Ic.prototype=zp.prototype={constructor:Ic,get:function(t){for(var e=this._;!(e in t);)if(!(t=t.parentNode))return;return t[e]},set:function(t,e){return t[this._]=e},remove:function(t){return this._ in t&&delete t[this._]},toString:function(){return this._}};function Op(t){let e;for(;e=t.sourceEvent;)t=e;return t}function ae(t,e){if(t=Op(t),e===void 0&&(e=t.currentTarget),e){var n=e.ownerSVGElement||e;if(n.createSVGPoint){var r=n.createSVGPoint();return r.x=t.clientX,r.y=t.clientY,r=r.matrixTransform(e.getScreenCTM().inverse()),[r.x,r.y]}if(e.getBoundingClientRect){var i=e.getBoundingClientRect();return[t.clientX-i.left-e.clientLeft,t.clientY-i.top-e.clientTop]}}return[t.pageX,t.pageY]}function WA(t,e){return t.target&&(t=Op(t),e===void 0&&(e=t.currentTarget),t=t.touches||[t]),Array.from(t,n=>ae(n,e))}function HA(t){return typeof t=="string"?new Yt([document.querySelectorAll(t)],[document.documentElement]):new Yt([kp(t)],Rc)}const qA={passive:!1},Li={capture:!0,passive:!1};function Nc(t){t.stopImmediatePropagation()}function Ar(t){t.preventDefault(),t.stopImmediatePropagation()}function Aa(t){var e=t.document.documentElement,n=Z(t).on("dragstart.drag",Ar,Li);"onselectstart"in e?n.on("selectstart.drag",Ar,Li):(e.__noselect=e.style.MozUserSelect,e.style.MozUserSelect="none")}function Ma(t,e){var n=t.document.documentElement,r=Z(t).on("dragstart.drag",null);e&&(r.on("click.drag",Ar,Li),setTimeout(function(){r.on("click.drag",null)},0)),"onselectstart"in n?r.on("selectstart.drag",null):(n.style.MozUserSelect=n.__noselect,delete n.__noselect)}const Ta=t=>()=>t;function Fc(t,{sourceEvent:e,subject:n,target:r,identifier:i,active:o,x:a,y:s,dx:u,dy:c,dispatch:l}){Object.defineProperties(this,{type:{value:t,enumerable:!0,configurable:!0},sourceEvent:{value:e,enumerable:!0,configurable:!0},subject:{value:n,enumerable:!0,configurable:!0},target:{value:r,enumerable:!0,configurable:!0},identifier:{value:i,enumerable:!0,configurable:!0},active:{value:o,enumerable:!0,configurable:!0},x:{value:a,enumerable:!0,configurable:!0},y:{value:s,enumerable:!0,configurable:!0},dx:{value:u,enumerable:!0,configurable:!0},dy:{value:c,enumerable:!0,configurable:!0},_:{value:l}})}Fc.prototype.on=function(){var t=this._.on.apply(this._,arguments);return t===this._?this:t};function XA(t){return!t.ctrlKey&&!t.button}function VA(){return this.parentNode}function jA(t,e){return e??{x:t.x,y:t.y}}function ZA(){return navigator.maxTouchPoints||"ontouchstart"in this}function Up(){var t=XA,e=VA,n=jA,r=ZA,i={},o=In("start","drag","end"),a=0,s,u,c,l,h=0;function f(b){b.on("mousedown.drag",d).filter(r).on("touchstart.drag",m).on("touchmove.drag",y,qA).on("touchend.drag touchcancel.drag",x).style("touch-action","none").style("-webkit-tap-highlight-color","rgba(0,0,0,0)")}function d(b,$){if(!(l||!t.call(this,b,$))){var w=v(this,e.call(this,b,$),b,$,"mouse");w&&(Z(b.view).on("mousemove.drag",p,Li).on("mouseup.drag",g,Li),Aa(b.view),Nc(b),c=!1,s=b.clientX,u=b.clientY,w("start",b))}}function p(b){if(Ar(b),!c){var $=b.clientX-s,w=b.clientY-u;c=$*$+w*w>h}i.mouse("drag",b)}function g(b){Z(b.view).on("mousemove.drag mouseup.drag",null),Ma(b.view,c),Ar(b),i.mouse("end",b)}function m(b,$){if(t.call(this,b,$)){var w=b.changedTouches,S=e.call(this,b,$),_=w.length,P,D;for(P=0;P<_;++P)(D=v(this,S,b,$,w[P].identifier,w[P]))&&(Nc(b),D("start",b,w[P]))}}function y(b){var $=b.changedTouches,w=$.length,S,_;for(S=0;S<w;++S)(_=i[$[S].identifier])&&(Ar(b),_("drag",b,$[S]))}function x(b){var $=b.changedTouches,w=$.length,S,_;for(l&&clearTimeout(l),l=setTimeout(function(){l=null},500),S=0;S<w;++S)(_=i[$[S].identifier])&&(Nc(b),_("end",b,$[S]))}function v(b,$,w,S,_,P){var D=o.copy(),A=ae(P||w,$),I,M,T;if((T=n.call(b,new Fc("beforestart",{sourceEvent:w,target:f,identifier:_,active:a,x:A[0],y:A[1],dx:0,dy:0,dispatch:D}),S))!=null)return I=T.x-A[0]||0,M=T.y-A[1]||0,function k(E,N,O){var L=A,R;switch(E){case"start":i[_]=k,R=a++;break;case"end":delete i[_],--a;case"drag":A=ae(O||N,$),R=a;break}D.call(E,b,new Fc(E,{sourceEvent:N,subject:T,target:f,identifier:_,active:R,x:A[0]+I,y:A[1]+M,dx:A[0]-L[0],dy:A[1]-L[1],dispatch:D}),S)}}return f.filter=function(b){return arguments.length?(t=typeof b=="function"?b:Ta(!!b),f):t},f.container=function(b){return arguments.length?(e=typeof b=="function"?b:Ta(b),f):e},f.subject=function(b){return arguments.length?(n=typeof b=="function"?b:Ta(b),f):n},f.touchable=function(b){return arguments.length?(r=typeof b=="function"?b:Ta(!!b),f):r},f.on=function(){var b=o.on.apply(o,arguments);return b===o?f:b},f.clickDistance=function(b){return arguments.length?(h=(b=+b)*b,f):Math.sqrt(h)},f}function Mr(t,e,n){t.prototype=e.prototype=n,n.constructor=t}function Ci(t,e){var n=Object.create(t.prototype);for(var r in e)n[r]=e[r];return n}function fn(){}var Gn=.7,Tr=1/Gn,Pr="\\s*([+-]?\\d+)\\s*",Ri="\\s*([+-]?(?:\\d*\\.)?\\d+(?:[eE][+-]?\\d+)?)\\s*",Le="\\s*([+-]?(?:\\d*\\.)?\\d+(?:[eE][+-]?\\d+)?)%\\s*",KA=/^#([0-9a-f]{3,8})$/,QA=new RegExp(`^rgb\\(${Pr},${Pr},${Pr}\\)$`),JA=new RegExp(`^rgb\\(${Le},${Le},${Le}\\)$`),t8=new RegExp(`^rgba\\(${Pr},${Pr},${Pr},${Ri}\\)$`),e8=new RegExp(`^rgba\\(${Le},${Le},${Le},${Ri}\\)$`),n8=new RegExp(`^hsl\\(${Ri},${Le},${Le}\\)$`),r8=new RegExp(`^hsla\\(${Ri},${Le},${Le},${Ri}\\)$`),Bp={aliceblue:15792383,antiquewhite:16444375,aqua:65535,aquamarine:8388564,azure:15794175,beige:16119260,bisque:16770244,black:0,blanchedalmond:16772045,blue:255,blueviolet:9055202,brown:10824234,burlywood:14596231,cadetblue:6266528,chartreuse:8388352,chocolate:13789470,coral:16744272,cornflowerblue:6591981,cornsilk:16775388,crimson:14423100,cyan:65535,darkblue:139,darkcyan:35723,darkgoldenrod:12092939,darkgray:11119017,darkgreen:25600,darkgrey:11119017,darkkhaki:12433259,darkmagenta:9109643,darkolivegreen:5597999,darkorange:16747520,darkorchid:10040012,darkred:9109504,darksalmon:15308410,darkseagreen:9419919,darkslateblue:4734347,darkslategray:3100495,darkslategrey:3100495,darkturquoise:52945,darkviolet:9699539,deeppink:16716947,deepskyblue:49151,dimgray:6908265,dimgrey:6908265,dodgerblue:2003199,firebrick:11674146,floralwhite:16775920,forestgreen:2263842,fuchsia:16711935,gainsboro:14474460,ghostwhite:16316671,gold:16766720,goldenrod:14329120,gray:8421504,green:32768,greenyellow:11403055,grey:8421504,honeydew:15794160,hotpink:16738740,indianred:13458524,indigo:4915330,ivory:16777200,khaki:15787660,lavender:15132410,lavenderblush:16773365,lawngreen:8190976,lemonchiffon:16775885,lightblue:11393254,lightcoral:15761536,lightcyan:14745599,lightgoldenrodyellow:16448210,lightgray:13882323,lightgreen:9498256,lightgrey:13882323,lightpink:16758465,lightsalmon:16752762,lightseagreen:2142890,lightskyblue:8900346,lightslategray:7833753,lightslategrey:7833753,lightsteelblue:11584734,lightyellow:16777184,lime:65280,limegreen:3329330,linen:16445670,magenta:16711935,maroon:8388608,mediumaquamarine:6737322,mediumblue:205,mediumorchid:12211667,mediumpurple:9662683,mediumseagreen:3978097,mediumslateblue:8087790,mediumspringgreen:64154,mediumturquoise:4772300,mediumvioletred:13047173,midnightblue:1644912,mintcream:16121850,mistyrose:16770273,moccasin:16770229,navajowhite:16768685,navy:128,oldlace:16643558,olive:8421376,olivedrab:7048739,orange:16753920,orangered:16729344,orchid:14315734,palegoldenrod:15657130,palegreen:10025880,paleturquoise:11529966,palevioletred:14381203,papayawhip:16773077,peachpuff:16767673,peru:13468991,pink:16761035,plum:14524637,powderblue:11591910,purple:8388736,rebeccapurple:6697881,red:16711680,rosybrown:12357519,royalblue:4286945,saddlebrown:9127187,salmon:16416882,sandybrown:16032864,seagreen:3050327,seashell:16774638,sienna:10506797,silver:12632256,skyblue:8900331,slateblue:6970061,slategray:7372944,slategrey:7372944,snow:16775930,springgreen:65407,steelblue:4620980,tan:13808780,teal:32896,thistle:14204888,tomato:16737095,turquoise:4251856,violet:15631086,wheat:16113331,white:16777215,whitesmoke:16119285,yellow:16776960,yellowgreen:10145074};Mr(fn,hn,{copy(t){return Object.assign(new this.constructor,this,t)},displayable(){return this.rgb().displayable()},hex:Yp,formatHex:Yp,formatHex8:i8,formatHsl:o8,formatRgb:Wp,toString:Wp});function Yp(){return this.rgb().formatHex()}function i8(){return this.rgb().formatHex8()}function o8(){return jp(this).formatHsl()}function Wp(){return this.rgb().formatRgb()}function hn(t){var e,n;return t=(t+"").trim().toLowerCase(),(e=KA.exec(t))?(n=e[1].length,e=parseInt(e[1],16),n===6?Hp(e):n===3?new kt(e>>8&15|e>>4&240,e>>4&15|e&240,(e&15)<<4|e&15,1):n===8?Pa(e>>24&255,e>>16&255,e>>8&255,(e&255)/255):n===4?Pa(e>>12&15|e>>8&240,e>>8&15|e>>4&240,e>>4&15|e&240,((e&15)<<4|e&15)/255):null):(e=QA.exec(t))?new kt(e[1],e[2],e[3],1):(e=JA.exec(t))?new kt(e[1]*255/100,e[2]*255/100,e[3]*255/100,1):(e=t8.exec(t))?Pa(e[1],e[2],e[3],e[4]):(e=e8.exec(t))?Pa(e[1]*255/100,e[2]*255/100,e[3]*255/100,e[4]):(e=n8.exec(t))?Vp(e[1],e[2]/100,e[3]/100,1):(e=r8.exec(t))?Vp(e[1],e[2]/100,e[3]/100,e[4]):Bp.hasOwnProperty(t)?Hp(Bp[t]):t==="transparent"?new kt(NaN,NaN,NaN,0):null}function Hp(t){return new kt(t>>16&255,t>>8&255,t&255,1)}function Pa(t,e,n,r){return r<=0&&(t=e=n=NaN),new kt(t,e,n,r)}function Gc(t){return t instanceof fn||(t=hn(t)),t?(t=t.rgb(),new kt(t.r,t.g,t.b,t.opacity)):new kt}function Dr(t,e,n,r){return arguments.length===1?Gc(t):new kt(t,e,n,r??1)}function kt(t,e,n,r){this.r=+t,this.g=+e,this.b=+n,this.opacity=+r}Mr(kt,Dr,Ci(fn,{brighter(t){return t=t==null?Tr:Math.pow(Tr,t),new kt(this.r*t,this.g*t,this.b*t,this.opacity)},darker(t){return t=t==null?Gn:Math.pow(Gn,t),new kt(this.r*t,this.g*t,this.b*t,this.opacity)},rgb(){return this},clamp(){return new kt(zn(this.r),zn(this.g),zn(this.b),Da(this.opacity))},displayable(){return-.5<=this.r&&this.r<255.5&&-.5<=this.g&&this.g<255.5&&-.5<=this.b&&this.b<255.5&&0<=this.opacity&&this.opacity<=1},hex:qp,formatHex:qp,formatHex8:a8,formatRgb:Xp,toString:Xp}));function qp(){return`#${On(this.r)}${On(this.g)}${On(this.b)}`}function a8(){return`#${On(this.r)}${On(this.g)}${On(this.b)}${On((isNaN(this.opacity)?1:this.opacity)*255)}`}function Xp(){const t=Da(this.opacity);return`${t===1?"rgb(":"rgba("}${zn(this.r)}, ${zn(this.g)}, ${zn(this.b)}${t===1?")":`, ${t})`}`}function Da(t){return isNaN(t)?1:Math.max(0,Math.min(1,t))}function zn(t){return Math.max(0,Math.min(255,Math.round(t)||0))}function On(t){return t=zn(t),(t<16?"0":"")+t.toString(16)}function Vp(t,e,n,r){return r<=0?t=e=n=NaN:n<=0||n>=1?t=e=NaN:e<=0&&(t=NaN),new Se(t,e,n,r)}function jp(t){if(t instanceof Se)return new Se(t.h,t.s,t.l,t.opacity);if(t instanceof fn||(t=hn(t)),!t)return new Se;if(t instanceof Se)return t;t=t.rgb();var e=t.r/255,n=t.g/255,r=t.b/255,i=Math.min(e,n,r),o=Math.max(e,n,r),a=NaN,s=o-i,u=(o+i)/2;return s?(e===o?a=(n-r)/s+(n<r)*6:n===o?a=(r-e)/s+2:a=(e-n)/s+4,s/=u<.5?o+i:2-o-i,a*=60):s=u>0&&u<1?0:a,new Se(a,s,u,t.opacity)}function Ea(t,e,n,r){return arguments.length===1?jp(t):new Se(t,e,n,r??1)}function Se(t,e,n,r){this.h=+t,this.s=+e,this.l=+n,this.opacity=+r}Mr(Se,Ea,Ci(fn,{brighter(t){return t=t==null?Tr:Math.pow(Tr,t),new Se(this.h,this.s,this.l*t,this.opacity)},darker(t){return t=t==null?Gn:Math.pow(Gn,t),new Se(this.h,this.s,this.l*t,this.opacity)},rgb(){var t=this.h%360+(this.h<0)*360,e=isNaN(t)||isNaN(this.s)?0:this.s,n=this.l,r=n+(n<.5?n:1-n)*e,i=2*n-r;return new kt(zc(t>=240?t-240:t+120,i,r),zc(t,i,r),zc(t<120?t+240:t-120,i,r),this.opacity)},clamp(){return new Se(Zp(this.h),ka(this.s),ka(this.l),Da(this.opacity))},displayable(){return(0<=this.s&&this.s<=1||isNaN(this.s))&&0<=this.l&&this.l<=1&&0<=this.opacity&&this.opacity<=1},formatHsl(){const t=Da(this.opacity);return`${t===1?"hsl(":"hsla("}${Zp(this.h)}, ${ka(this.s)*100}%, ${ka(this.l)*100}%${t===1?")":`, ${t})`}`}}));function Zp(t){return t=(t||0)%360,t<0?t+360:t}function ka(t){return Math.max(0,Math.min(1,t||0))}function zc(t,e,n){return(t<60?e+(n-e)*t/60:t<180?n:t<240?e+(n-e)*(240-t)/60:e)*255}const Kp=Math.PI/180,Qp=180/Math.PI,La=18,Jp=.96422,tg=1,eg=.82521,ng=4/29,Er=6/29,rg=3*Er*Er,s8=Er*Er*Er;function ig(t){if(t instanceof Ae)return new Ae(t.l,t.a,t.b,t.opacity);if(t instanceof Ce)return ag(t);t instanceof kt||(t=Gc(t));var e=Yc(t.r),n=Yc(t.g),r=Yc(t.b),i=Oc((.2225045*e+.7168786*n+.0606169*r)/tg),o,a;return e===n&&n===r?o=a=i:(o=Oc((.4360747*e+.3850649*n+.1430804*r)/Jp),a=Oc((.0139322*e+.0971045*n+.7141733*r)/eg)),new Ae(116*i-16,500*(o-i),200*(i-a),t.opacity)}function u8(t,e){return new Ae(t,0,0,e??1)}function Ca(t,e,n,r){return arguments.length===1?ig(t):new Ae(t,e,n,r??1)}function Ae(t,e,n,r){this.l=+t,this.a=+e,this.b=+n,this.opacity=+r}Mr(Ae,Ca,Ci(fn,{brighter(t){return new Ae(this.l+La*(t??1),this.a,this.b,this.opacity)},darker(t){return new Ae(this.l-La*(t??1),this.a,this.b,this.opacity)},rgb(){var t=(this.l+16)/116,e=isNaN(this.a)?t:t+this.a/500,n=isNaN(this.b)?t:t-this.b/200;return e=Jp*Uc(e),t=tg*Uc(t),n=eg*Uc(n),new kt(Bc(3.1338561*e-1.6168667*t-.4906146*n),Bc(-.9787684*e+1.9161415*t+.033454*n),Bc(.0719453*e-.2289914*t+1.4052427*n),this.opacity)}}));function Oc(t){return t>s8?Math.pow(t,1/3):t/rg+ng}function Uc(t){return t>Er?t*t*t:rg*(t-ng)}function Bc(t){return 255*(t<=.0031308?12.92*t:1.055*Math.pow(t,1/2.4)-.055)}function Yc(t){return(t/=255)<=.04045?t/12.92:Math.pow((t+.055)/1.055,2.4)}function og(t){if(t instanceof Ce)return new Ce(t.h,t.c,t.l,t.opacity);if(t instanceof Ae||(t=ig(t)),t.a===0&&t.b===0)return new Ce(NaN,0<t.l&&t.l<100?0:NaN,t.l,t.opacity);var e=Math.atan2(t.b,t.a)*Qp;return new Ce(e<0?e+360:e,Math.sqrt(t.a*t.a+t.b*t.b),t.l,t.opacity)}function c8(t,e,n,r){return arguments.length===1?og(t):new Ce(n,e,t,r??1)}function Ra(t,e,n,r){return arguments.length===1?og(t):new Ce(t,e,n,r??1)}function Ce(t,e,n,r){this.h=+t,this.c=+e,this.l=+n,this.opacity=+r}function ag(t){if(isNaN(t.h))return new Ae(t.l,0,0,t.opacity);var e=t.h*Kp;return new Ae(t.l,Math.cos(e)*t.c,Math.sin(e)*t.c,t.opacity)}Mr(Ce,Ra,Ci(fn,{brighter(t){return new Ce(this.h,this.c,this.l+La*(t??1),this.opacity)},darker(t){return new Ce(this.h,this.c,this.l-La*(t??1),this.opacity)},rgb(){return ag(this).rgb()}}));var sg=-.14861,Wc=1.78277,Hc=-.29227,Ia=-.90649,Ii=1.97294,ug=Ii*Ia,cg=Ii*Wc,lg=Wc*Hc-Ia*sg;function l8(t){if(t instanceof Un)return new Un(t.h,t.s,t.l,t.opacity);t instanceof kt||(t=Gc(t));var e=t.r/255,n=t.g/255,r=t.b/255,i=(lg*r+ug*e-cg*n)/(lg+ug-cg),o=r-i,a=(Ii*(n-i)-Hc*o)/Ia,s=Math.sqrt(a*a+o*o)/(Ii*i*(1-i)),u=s?Math.atan2(a,o)*Qp-120:NaN;return new Un(u<0?u+360:u,s,i,t.opacity)}function Me(t,e,n,r){return arguments.length===1?l8(t):new Un(t,e,n,r??1)}function Un(t,e,n,r){this.h=+t,this.s=+e,this.l=+n,this.opacity=+r}Mr(Un,Me,Ci(fn,{brighter(t){return t=t==null?Tr:Math.pow(Tr,t),new Un(this.h,this.s,this.l*t,this.opacity)},darker(t){return t=t==null?Gn:Math.pow(Gn,t),new Un(this.h,this.s,this.l*t,this.opacity)},rgb(){var t=isNaN(this.h)?0:(this.h+120)*Kp,e=+this.l,n=isNaN(this.s)?0:this.s*e*(1-e),r=Math.cos(t),i=Math.sin(t);return new kt(255*(e+n*(sg*r+Wc*i)),255*(e+n*(Hc*r+Ia*i)),255*(e+n*(Ii*r)),this.opacity)}}));function fg(t,e,n,r,i){var o=t*t,a=o*t;return((1-3*t+3*o-a)*e+(4-6*o+3*a)*n+(1+3*t+3*o-3*a)*r+a*i)/6}function hg(t){var e=t.length-1;return function(n){var r=n<=0?n=0:n>=1?(n=1,e-1):Math.floor(n*e),i=t[r],o=t[r+1],a=r>0?t[r-1]:2*i-o,s=r<e-1?t[r+2]:2*o-i;return fg((n-r/e)*e,a,i,o,s)}}function dg(t){var e=t.length;return function(n){var r=Math.floor(((n%=1)<0?++n:n)*e),i=t[(r+e-1)%e],o=t[r%e],a=t[(r+1)%e],s=t[(r+2)%e];return fg((n-r/e)*e,i,o,a,s)}}const Na=t=>()=>t;function pg(t,e){return function(n){return t+n*e}}function f8(t,e,n){return t=Math.pow(t,n),e=Math.pow(e,n)-t,n=1/n,function(r){return Math.pow(t+r*e,n)}}function Fa(t,e){var n=e-t;return n?pg(t,n>180||n<-180?n-360*Math.round(n/360):n):Na(isNaN(t)?e:t)}function h8(t){return(t=+t)==1?Lt:function(e,n){return n-e?f8(e,n,t):Na(isNaN(e)?n:e)}}function Lt(t,e){var n=e-t;return n?pg(t,n):Na(isNaN(t)?e:t)}const Ni=function t(e){var n=h8(e);function r(i,o){var a=n((i=Dr(i)).r,(o=Dr(o)).r),s=n(i.g,o.g),u=n(i.b,o.b),c=Lt(i.opacity,o.opacity);return function(l){return i.r=a(l),i.g=s(l),i.b=u(l),i.opacity=c(l),i+""}}return r.gamma=t,r}(1);function gg(t){return function(e){var n=e.length,r=new Array(n),i=new Array(n),o=new Array(n),a,s;for(a=0;a<n;++a)s=Dr(e[a]),r[a]=s.r||0,i[a]=s.g||0,o[a]=s.b||0;return r=t(r),i=t(i),o=t(o),s.opacity=1,function(u){return s.r=r(u),s.g=i(u),s.b=o(u),s+""}}}var mg=gg(hg),d8=gg(dg);function qc(t,e){e||(e=[]);var n=t?Math.min(e.length,t.length):0,r=e.slice(),i;return function(o){for(i=0;i<n;++i)r[i]=t[i]*(1-o)+e[i]*o;return r}}function yg(t){return ArrayBuffer.isView(t)&&!(t instanceof DataView)}function p8(t,e){return(yg(e)?qc:bg)(t,e)}function bg(t,e){var n=e?e.length:0,r=t?Math.min(n,t.length):0,i=new Array(r),o=new Array(n),a;for(a=0;a<r;++a)i[a]=dn(t[a],e[a]);for(;a<n;++a)o[a]=e[a];return function(s){for(a=0;a<r;++a)o[a]=i[a](s);return o}}function vg(t,e){var n=new Date;return t=+t,e=+e,function(r){return n.setTime(t*(1-r)+e*r),n}}function fe(t,e){return t=+t,e=+e,function(n){return t*(1-n)+e*n}}function xg(t,e){var n={},r={},i;(t===null||typeof t!="object")&&(t={}),(e===null||typeof e!="object")&&(e={});for(i in e)i in t?n[i]=dn(t[i],e[i]):r[i]=e[i];return function(o){for(i in n)r[i]=n[i](o);return r}}var Xc=/[-+]?(?:\d+\.?\d*|\.?\d+)(?:[eE][-+]?\d+)?/g,Vc=new RegExp(Xc.source,"g");function g8(t){return function(){return t}}function m8(t){return function(e){return t(e)+""}}function jc(t,e){var n=Xc.lastIndex=Vc.lastIndex=0,r,i,o,a=-1,s=[],u=[];for(t=t+"",e=e+"";(r=Xc.exec(t))&&(i=Vc.exec(e));)(o=i.index)>n&&(o=e.slice(n,o),s[a]?s[a]+=o:s[++a]=o),(r=r[0])===(i=i[0])?s[a]?s[a]+=i:s[++a]=i:(s[++a]=null,u.push({i:a,x:fe(r,i)})),n=Vc.lastIndex;return n<e.length&&(o=e.slice(n),s[a]?s[a]+=o:s[++a]=o),s.length<2?u[0]?m8(u[0].x):g8(e):(e=u.length,function(c){for(var l=0,h;l<e;++l)s[(h=u[l]).i]=h.x(c);return s.join("")})}function dn(t,e){var n=typeof e,r;return e==null||n==="boolean"?Na(e):(n==="number"?fe:n==="string"?(r=hn(e))?(e=r,Ni):jc:e instanceof hn?Ni:e instanceof Date?vg:yg(e)?qc:Array.isArray(e)?bg:typeof e.valueOf!="function"&&typeof e.toString!="function"||isNaN(e)?xg:fe)(t,e)}function y8(t){var e=t.length;return function(n){return t[Math.max(0,Math.min(e-1,Math.floor(n*e)))]}}function b8(t,e){var n=Fa(+t,+e);return function(r){var i=n(r);return i-360*Math.floor(i/360)}}function Ga(t,e){return t=+t,e=+e,function(n){return Math.round(t*(1-n)+e*n)}}var _g=180/Math.PI,Zc={translateX:0,translateY:0,rotate:0,skewX:0,scaleX:1,scaleY:1};function wg(t,e,n,r,i,o){var a,s,u;return(a=Math.sqrt(t*t+e*e))&&(t/=a,e/=a),(u=t*n+e*r)&&(n-=t*u,r-=e*u),(s=Math.sqrt(n*n+r*r))&&(n/=s,r/=s,u/=s),t*r<e*n&&(t=-t,e=-e,u=-u,a=-a),{translateX:i,translateY:o,rotate:Math.atan2(e,t)*_g,skewX:Math.atan(u)*_g,scaleX:a,scaleY:s}}var za;function v8(t){const e=new(typeof DOMMatrix=="function"?DOMMatrix:WebKitCSSMatrix)(t+"");return e.isIdentity?Zc:wg(e.a,e.b,e.c,e.d,e.e,e.f)}function x8(t){return t==null||(za||(za=document.createElementNS("http://www.w3.org/2000/svg","g")),za.setAttribute("transform",t),!(t=za.transform.baseVal.consolidate()))?Zc:(t=t.matrix,wg(t.a,t.b,t.c,t.d,t.e,t.f))}function $g(t,e,n,r){function i(c){return c.length?c.pop()+" ":""}function o(c,l,h,f,d,p){if(c!==h||l!==f){var g=d.push("translate(",null,e,null,n);p.push({i:g-4,x:fe(c,h)},{i:g-2,x:fe(l,f)})}else(h||f)&&d.push("translate("+h+e+f+n)}function a(c,l,h,f){c!==l?(c-l>180?l+=360:l-c>180&&(c+=360),f.push({i:h.push(i(h)+"rotate(",null,r)-2,x:fe(c,l)})):l&&h.push(i(h)+"rotate("+l+r)}function s(c,l,h,f){c!==l?f.push({i:h.push(i(h)+"skewX(",null,r)-2,x:fe(c,l)}):l&&h.push(i(h)+"skewX("+l+r)}function u(c,l,h,f,d,p){if(c!==h||l!==f){var g=d.push(i(d)+"scale(",null,",",null,")");p.push({i:g-4,x:fe(c,h)},{i:g-2,x:fe(l,f)})}else(h!==1||f!==1)&&d.push(i(d)+"scale("+h+","+f+")")}return function(c,l){var h=[],f=[];return c=t(c),l=t(l),o(c.translateX,c.translateY,l.translateX,l.translateY,h,f),a(c.rotate,l.rotate,h,f),s(c.skewX,l.skewX,h,f),u(c.scaleX,c.scaleY,l.scaleX,l.scaleY,h,f),c=l=null,function(d){for(var p=-1,g=f.length,m;++p<g;)h[(m=f[p]).i]=m.x(d);return h.join("")}}}var Sg=$g(v8,"px, ","px)","deg)"),Ag=$g(x8,", ",")",")"),_8=1e-12;function Mg(t){return((t=Math.exp(t))+1/t)/2}function w8(t){return((t=Math.exp(t))-1/t)/2}function $8(t){return((t=Math.exp(2*t))-1)/(t+1)}const Tg=function t(e,n,r){function i(o,a){var s=o[0],u=o[1],c=o[2],l=a[0],h=a[1],f=a[2],d=l-s,p=h-u,g=d*d+p*p,m,y;if(g<_8)y=Math.log(f/c)/e,m=function(S){return[s+S*d,u+S*p,c*Math.exp(e*S*y)]};else{var x=Math.sqrt(g),v=(f*f-c*c+r*g)/(2*c*n*x),b=(f*f-c*c-r*g)/(2*f*n*x),$=Math.log(Math.sqrt(v*v+1)-v),w=Math.log(Math.sqrt(b*b+1)-b);y=(w-$)/e,m=function(S){var _=S*y,P=Mg($),D=c/(n*x)*(P*$8(e*_+$)-w8($));return[s+D*d,u+D*p,c*P/Mg(e*_+$)]}}return m.duration=y*1e3*e/Math.SQRT2,m}return i.rho=function(o){var a=Math.max(.001,+o),s=a*a,u=s*s;return t(a,s,u)},i}(Math.SQRT2,2,4);function Pg(t){return function(e,n){var r=t((e=Ea(e)).h,(n=Ea(n)).h),i=Lt(e.s,n.s),o=Lt(e.l,n.l),a=Lt(e.opacity,n.opacity);return function(s){return e.h=r(s),e.s=i(s),e.l=o(s),e.opacity=a(s),e+""}}}const S8=Pg(Fa);var A8=Pg(Lt);function M8(t,e){var n=Lt((t=Ca(t)).l,(e=Ca(e)).l),r=Lt(t.a,e.a),i=Lt(t.b,e.b),o=Lt(t.opacity,e.opacity);return function(a){return t.l=n(a),t.a=r(a),t.b=i(a),t.opacity=o(a),t+""}}function Dg(t){return function(e,n){var r=t((e=Ra(e)).h,(n=Ra(n)).h),i=Lt(e.c,n.c),o=Lt(e.l,n.l),a=Lt(e.opacity,n.opacity);return function(s){return e.h=r(s),e.c=i(s),e.l=o(s),e.opacity=a(s),e+""}}}const T8=Dg(Fa);var P8=Dg(Lt);function Eg(t){return function e(n){n=+n;function r(i,o){var a=t((i=Me(i)).h,(o=Me(o)).h),s=Lt(i.s,o.s),u=Lt(i.l,o.l),c=Lt(i.opacity,o.opacity);return function(l){return i.h=a(l),i.s=s(l),i.l=u(Math.pow(l,n)),i.opacity=c(l),i+""}}return r.gamma=e,r}(1)}const D8=Eg(Fa);var Oa=Eg(Lt);function kg(t,e){e===void 0&&(e=t,t=dn);for(var n=0,r=e.length-1,i=e[0],o=new Array(r<0?0:r);n<r;)o[n]=t(i,i=e[++n]);return function(a){var s=Math.max(0,Math.min(r-1,Math.floor(a*=r)));return o[s](a-s)}}function E8(t,e){for(var n=new Array(e),r=0;r<e;++r)n[r]=t(r/(e-1));return n}var kr=0,Fi=0,Gi=0,Lg=1e3,Ua,zi,Ba=0,Bn=0,Ya=0,Oi=typeof performance=="object"&&performance.now?performance:Date,Cg=typeof window=="object"&&window.requestAnimationFrame?window.requestAnimationFrame.bind(window):function(t){setTimeout(t,17)};function Ui(){return Bn||(Cg(k8),Bn=Oi.now()+Ya)}function k8(){Bn=0}function Bi(){this._call=this._time=this._next=null}Bi.prototype=Wa.prototype={constructor:Bi,restart:function(t,e,n){if(typeof t!="function")throw new TypeError("callback is not a function");n=(n==null?Ui():+n)+(e==null?0:+e),!this._next&&zi!==this&&(zi?zi._next=this:Ua=this,zi=this),this._call=t,this._time=n,Kc()},stop:function(){this._call&&(this._call=null,this._time=1/0,Kc())}};function Wa(t,e,n){var r=new Bi;return r.restart(t,e,n),r}function Rg(){Ui(),++kr;for(var t=Ua,e;t;)(e=Bn-t._time)>=0&&t._call.call(void 0,e),t=t._next;--kr}function Ig(){Bn=(Ba=Oi.now())+Ya,kr=Fi=0;try{Rg()}finally{kr=0,C8(),Bn=0}}function L8(){var t=Oi.now(),e=t-Ba;e>Lg&&(Ya-=e,Ba=t)}function C8(){for(var t,e=Ua,n,r=1/0;e;)e._call?(r>e._time&&(r=e._time),t=e,e=e._next):(n=e._next,e._next=null,e=t?t._next=n:Ua=n);zi=t,Kc(r)}function Kc(t){if(!kr){Fi&&(Fi=clearTimeout(Fi));var e=t-Bn;e>24?(t<1/0&&(Fi=setTimeout(Ig,t-Oi.now()-Ya)),Gi&&(Gi=clearInterval(Gi))):(Gi||(Ba=Oi.now(),Gi=setInterval(L8,Lg)),kr=1,Cg(Ig))}}function Qc(t,e,n){var r=new Bi;return e=e==null?0:+e,r.restart(i=>{r.stop(),t(i+e)},e,n),r}function R8(t,e,n){var r=new Bi,i=e;return e==null?(r.restart(t,e,n),r):(r._restart=r.restart,r.restart=function(o,a,s){a=+a,s=s==null?Ui():+s,r._restart(function u(c){c+=i,r._restart(u,i+=a,s),o(c)},a,s)},r.restart(t,e,n),r)}var I8=In("start","end","cancel","interrupt"),N8=[],Ng=0,Jc=1,tl=2,Ha=3,Fg=4,el=5,qa=6;function Xa(t,e,n,r,i,o){var a=t.__transition;if(!a)t.__transition={};else if(n in a)return;F8(t,n,{name:e,index:r,group:i,on:I8,tween:N8,time:o.time,delay:o.delay,duration:o.duration,ease:o.ease,timer:null,state:Ng})}function nl(t,e){var n=Te(t,e);if(n.state>Ng)throw new Error("too late; already scheduled");return n}function Re(t,e){var n=Te(t,e);if(n.state>Ha)throw new Error("too late; already running");return n}function Te(t,e){var n=t.__transition;if(!n||!(n=n[e]))throw new Error("transition not found");return n}function F8(t,e,n){var r=t.__transition,i;r[e]=n,n.timer=Wa(o,0,n.time);function o(c){n.state=Jc,n.timer.restart(a,n.delay,n.time),n.delay<=c&&a(c-n.delay)}function a(c){var l,h,f,d;if(n.state!==Jc)return u();for(l in r)if(d=r[l],d.name===n.name){if(d.state===Ha)return Qc(a);d.state===Fg?(d.state=qa,d.timer.stop(),d.on.call("interrupt",t,t.__data__,d.index,d.group),delete r[l]):+l<e&&(d.state=qa,d.timer.stop(),d.on.call("cancel",t,t.__data__,d.index,d.group),delete r[l])}if(Qc(function(){n.state===Ha&&(n.state=Fg,n.timer.restart(s,n.delay,n.time),s(c))}),n.state=tl,n.on.call("start",t,t.__data__,n.index,n.group),n.state===tl){for(n.state=Ha,i=new Array(f=n.tween.length),l=0,h=-1;l<f;++l)(d=n.tween[l].value.call(t,t.__data__,n.index,n.group))&&(i[++h]=d);i.length=h+1}}function s(c){for(var l=c<n.duration?n.ease.call(null,c/n.duration):(n.timer.restart(u),n.state=el,1),h=-1,f=i.length;++h<f;)i[h].call(t,l);n.state===el&&(n.on.call("end",t,t.__data__,n.index,n.group),u())}function u(){n.state=qa,n.timer.stop(),delete r[e];for(var c in r)return;delete t.__transition}}function Yn(t,e){var n=t.__transition,r,i,o=!0,a;if(n){e=e==null?null:e+"";for(a in n){if((r=n[a]).name!==e){o=!1;continue}i=r.state>tl&&r.state<el,r.state=qa,r.timer.stop(),r.on.call(i?"interrupt":"cancel",t,t.__data__,r.index,r.group),delete n[a]}o&&delete t.__transition}}function G8(t){return this.each(function(){Yn(this,t)})}function z8(t,e){var n,r;return function(){var i=Re(this,t),o=i.tween;if(o!==n){r=n=o;for(var a=0,s=r.length;a<s;++a)if(r[a].name===e){r=r.slice(),r.splice(a,1);break}}i.tween=r}}function O8(t,e,n){var r,i;if(typeof n!="function")throw new Error;return function(){var o=Re(this,t),a=o.tween;if(a!==r){i=(r=a).slice();for(var s={name:e,value:n},u=0,c=i.length;u<c;++u)if(i[u].name===e){i[u]=s;break}u===c&&i.push(s)}o.tween=i}}function U8(t,e){var n=this._id;if(t+="",arguments.length<2){for(var r=Te(this.node(),n).tween,i=0,o=r.length,a;i<o;++i)if((a=r[i]).name===t)return a.value;return null}return this.each((e==null?z8:O8)(n,t,e))}function rl(t,e,n){var r=t._id;return t.each(function(){var i=Re(this,r);(i.value||(i.value={}))[e]=n.apply(this,arguments)}),function(i){return Te(i,r).value[e]}}function Gg(t,e){var n;return(typeof e=="number"?fe:e instanceof hn?Ni:(n=hn(e))?(e=n,Ni):jc)(t,e)}function B8(t){return function(){this.removeAttribute(t)}}function Y8(t){return function(){this.removeAttributeNS(t.space,t.local)}}function W8(t,e,n){var r,i=n+"",o;return function(){var a=this.getAttribute(t);return a===i?null:a===r?o:o=e(r=a,n)}}function H8(t,e,n){var r,i=n+"",o;return function(){var a=this.getAttributeNS(t.space,t.local);return a===i?null:a===r?o:o=e(r=a,n)}}function q8(t,e,n){var r,i,o;return function(){var a,s=n(this),u;return s==null?void this.removeAttribute(t):(a=this.getAttribute(t),u=s+"",a===u?null:a===r&&u===i?o:(i=u,o=e(r=a,s)))}}function X8(t,e,n){var r,i,o;return function(){var a,s=n(this),u;return s==null?void this.removeAttributeNS(t.space,t.local):(a=this.getAttributeNS(t.space,t.local),u=s+"",a===u?null:a===r&&u===i?o:(i=u,o=e(r=a,s)))}}function V8(t,e){var n=ki(t),r=n==="transform"?Ag:Gg;return this.attrTween(t,typeof e=="function"?(n.local?X8:q8)(n,r,rl(this,"attr."+t,e)):e==null?(n.local?Y8:B8)(n):(n.local?H8:W8)(n,r,e))}function j8(t,e){return function(n){this.setAttribute(t,e.call(this,n))}}function Z8(t,e){return function(n){this.setAttributeNS(t.space,t.local,e.call(this,n))}}function K8(t,e){var n,r;function i(){var o=e.apply(this,arguments);return o!==r&&(n=(r=o)&&Z8(t,o)),n}return i._value=e,i}function Q8(t,e){var n,r;function i(){var o=e.apply(this,arguments);return o!==r&&(n=(r=o)&&j8(t,o)),n}return i._value=e,i}function J8(t,e){var n="attr."+t;if(arguments.length<2)return(n=this.tween(n))&&n._value;if(e==null)return this.tween(n,null);if(typeof e!="function")throw new Error;var r=ki(t);return this.tween(n,(r.local?K8:Q8)(r,e))}function t4(t,e){return function(){nl(this,t).delay=+e.apply(this,arguments)}}function e4(t,e){return e=+e,function(){nl(this,t).delay=e}}function n4(t){var e=this._id;return arguments.length?this.each((typeof t=="function"?t4:e4)(e,t)):Te(this.node(),e).delay}function r4(t,e){return function(){Re(this,t).duration=+e.apply(this,arguments)}}function i4(t,e){return e=+e,function(){Re(this,t).duration=e}}function o4(t){var e=this._id;return arguments.length?this.each((typeof t=="function"?r4:i4)(e,t)):Te(this.node(),e).duration}function a4(t,e){if(typeof e!="function")throw new Error;return function(){Re(this,t).ease=e}}function s4(t){var e=this._id;return arguments.length?this.each(a4(e,t)):Te(this.node(),e).ease}function u4(t,e){return function(){var n=e.apply(this,arguments);if(typeof n!="function")throw new Error;Re(this,t).ease=n}}function c4(t){if(typeof t!="function")throw new Error;return this.each(u4(this._id,t))}function l4(t){typeof t!="function"&&(t=kc(t));for(var e=this._groups,n=e.length,r=new Array(n),i=0;i<n;++i)for(var o=e[i],a=o.length,s=r[i]=[],u,c=0;c<a;++c)(u=o[c])&&t.call(u,u.__data__,c,o)&&s.push(u);return new Ie(r,this._parents,this._name,this._id)}function f4(t){if(t._id!==this._id)throw new Error;for(var e=this._groups,n=t._groups,r=e.length,i=n.length,o=Math.min(r,i),a=new Array(r),s=0;s<o;++s)for(var u=e[s],c=n[s],l=u.length,h=a[s]=new Array(l),f,d=0;d<l;++d)(f=u[d]||c[d])&&(h[d]=f);for(;s<r;++s)a[s]=e[s];return new Ie(a,this._parents,this._name,this._id)}function h4(t){return(t+"").trim().split(/^|\s+/).every(function(e){var n=e.indexOf(".");return n>=0&&(e=e.slice(0,n)),!e||e==="start"})}function d4(t,e,n){var r,i,o=h4(e)?nl:Re;return function(){var a=o(this,t),s=a.on;s!==r&&(i=(r=s).copy()).on(e,n),a.on=i}}function p4(t,e){var n=this._id;return arguments.length<2?Te(this.node(),n).on.on(t):this.each(d4(n,t,e))}function g4(t){return function(){var e=this.parentNode;for(var n in this.__transition)if(+n!==t)return;e&&e.removeChild(this)}}function m4(){return this.on("end.remove",g4(this._id))}function y4(t){var e=this._name,n=this._id;typeof t!="function"&&(t=$a(t));for(var r=this._groups,i=r.length,o=new Array(i),a=0;a<i;++a)for(var s=r[a],u=s.length,c=o[a]=new Array(u),l,h,f=0;f<u;++f)(l=s[f])&&(h=t.call(l,l.__data__,f,s))&&("__data__"in l&&(h.__data__=l.__data__),c[f]=h,Xa(c[f],e,n,f,c,Te(l,n)));return new Ie(o,this._parents,e,n)}function b4(t){var e=this._name,n=this._id;typeof t!="function"&&(t=Ec(t));for(var r=this._groups,i=r.length,o=[],a=[],s=0;s<i;++s)for(var u=r[s],c=u.length,l,h=0;h<c;++h)if(l=u[h]){for(var f=t.call(l,l.__data__,h,u),d,p=Te(l,n),g=0,m=f.length;g<m;++g)(d=f[g])&&Xa(d,e,n,g,f,p);o.push(f),a.push(l)}return new Ie(o,a,e,n)}var v4=Fn.prototype.constructor;function x4(){return new v4(this._groups,this._parents)}function _4(t,e){var n,r,i;return function(){var o=Nn(this,t),a=(this.style.removeProperty(t),Nn(this,t));return o===a?null:o===n&&a===r?i:i=e(n=o,r=a)}}function zg(t){return function(){this.style.removeProperty(t)}}function w4(t,e,n){var r,i=n+"",o;return function(){var a=Nn(this,t);return a===i?null:a===r?o:o=e(r=a,n)}}function $4(t,e,n){var r,i,o;return function(){var a=Nn(this,t),s=n(this),u=s+"";return s==null&&(u=s=(this.style.removeProperty(t),Nn(this,t))),a===u?null:a===r&&u===i?o:(i=u,o=e(r=a,s))}}function S4(t,e){var n,r,i,o="style."+e,a="end."+o,s;return function(){var u=Re(this,t),c=u.on,l=u.value[o]==null?s||(s=zg(e)):void 0;(c!==n||i!==l)&&(r=(n=c).copy()).on(a,i=l),u.on=r}}function A4(t,e,n){var r=(t+="")=="transform"?Sg:Gg;return e==null?this.styleTween(t,_4(t,r)).on("end.style."+t,zg(t)):typeof e=="function"?this.styleTween(t,$4(t,r,rl(this,"style."+t,e))).each(S4(this._id,t)):this.styleTween(t,w4(t,r,e),n).on("end.style."+t,null)}function M4(t,e,n){return function(r){this.style.setProperty(t,e.call(this,r),n)}}function T4(t,e,n){var r,i;function o(){var a=e.apply(this,arguments);return a!==i&&(r=(i=a)&&M4(t,a,n)),r}return o._value=e,o}function P4(t,e,n){var r="style."+(t+="");if(arguments.length<2)return(r=this.tween(r))&&r._value;if(e==null)return this.tween(r,null);if(typeof e!="function")throw new Error;return this.tween(r,T4(t,e,n??""))}function D4(t){return function(){this.textContent=t}}function E4(t){return function(){var e=t(this);this.textContent=e??""}}function k4(t){return this.tween("text",typeof t=="function"?E4(rl(this,"text",t)):D4(t==null?"":t+""))}function L4(t){return function(e){this.textContent=t.call(this,e)}}function C4(t){var e,n;function r(){var i=t.apply(this,arguments);return i!==n&&(e=(n=i)&&L4(i)),e}return r._value=t,r}function R4(t){var e="text";if(arguments.length<1)return(e=this.tween(e))&&e._value;if(t==null)return this.tween(e,null);if(typeof t!="function")throw new Error;return this.tween(e,C4(t))}function I4(){for(var t=this._name,e=this._id,n=Ug(),r=this._groups,i=r.length,o=0;o<i;++o)for(var a=r[o],s=a.length,u,c=0;c<s;++c)if(u=a[c]){var l=Te(u,e);Xa(u,t,n,c,a,{time:l.time+l.delay+l.duration,delay:0,duration:l.duration,ease:l.ease})}return new Ie(r,this._parents,t,n)}function N4(){var t,e,n=this,r=n._id,i=n.size();return new Promise(function(o,a){var s={value:a},u={value:function(){--i===0&&o()}};n.each(function(){var c=Re(this,r),l=c.on;l!==t&&(e=(t=l).copy(),e._.cancel.push(s),e._.interrupt.push(s),e._.end.push(u)),c.on=e}),i===0&&o()})}var F4=0;function Ie(t,e,n,r){this._groups=t,this._parents=e,this._name=n,this._id=r}function Og(t){return Fn().transition(t)}function Ug(){return++F4}var Ve=Fn.prototype;Ie.prototype=Og.prototype={constructor:Ie,select:y4,selectAll:b4,selectChild:Ve.selectChild,selectChildren:Ve.selectChildren,filter:l4,merge:f4,selection:x4,transition:I4,call:Ve.call,nodes:Ve.nodes,node:Ve.node,size:Ve.size,empty:Ve.empty,each:Ve.each,on:p4,attr:V8,attrTween:J8,style:A4,styleTween:P4,text:k4,textTween:R4,remove:m4,tween:U8,delay:n4,duration:o4,ease:s4,easeVarying:c4,end:N4,[Symbol.iterator]:Ve[Symbol.iterator]};const G4=t=>+t;function z4(t){return t*t}function O4(t){return t*(2-t)}function Bg(t){return((t*=2)<=1?t*t:--t*(2-t)+1)/2}function U4(t){return t*t*t}function B4(t){return--t*t*t+1}function Yi(t){return((t*=2)<=1?t*t*t:(t-=2)*t*t+2)/2}var il=3,Y4=function t(e){e=+e;function n(r){return Math.pow(r,e)}return n.exponent=t,n}(il),W4=function t(e){e=+e;function n(r){return 1-Math.pow(1-r,e)}return n.exponent=t,n}(il),Yg=function t(e){e=+e;function n(r){return((r*=2)<=1?Math.pow(r,e):2-Math.pow(2-r,e))/2}return n.exponent=t,n}(il),Wg=Math.PI,Hg=Wg/2;function H4(t){return+t==1?1:1-Math.cos(t*Hg)}function q4(t){return Math.sin(t*Hg)}function qg(t){return(1-Math.cos(Wg*t))/2}function pn(t){return(Math.pow(2,-10*t)-.0009765625)*1.0009775171065494}function X4(t){return pn(1-+t)}function V4(t){return 1-pn(t)}function Xg(t){return((t*=2)<=1?pn(1-t):2-pn(t-1))/2}function j4(t){return 1-Math.sqrt(1-t*t)}function Z4(t){return Math.sqrt(1- --t*t)}function Vg(t){return((t*=2)<=1?1-Math.sqrt(1-t*t):Math.sqrt(1-(t-=2)*t)+1)/2}var ol=4/11,K4=6/11,Q4=8/11,J4=3/4,tM=9/11,eM=10/11,nM=15/16,rM=21/22,iM=63/64,Va=1/ol/ol;function oM(t){return 1-Wi(1-t)}function Wi(t){return(t=+t)<ol?Va*t*t:t<Q4?Va*(t-=K4)*t+J4:t<eM?Va*(t-=tM)*t+nM:Va*(t-=rM)*t+iM}function aM(t){return((t*=2)<=1?1-Wi(1-t):Wi(t-1)+1)/2}var al=1.70158,sM=function t(e){e=+e;function n(r){return(r=+r)*r*(e*(r-1)+r)}return n.overshoot=t,n}(al),uM=function t(e){e=+e;function n(r){return--r*r*((r+1)*e+r)+1}return n.overshoot=t,n}(al),jg=function t(e){e=+e;function n(r){return((r*=2)<1?r*r*((e+1)*r-e):(r-=2)*r*((e+1)*r+e)+2)/2}return n.overshoot=t,n}(al),Lr=2*Math.PI,sl=1,ul=.3,cM=function t(e,n){var r=Math.asin(1/(e=Math.max(1,e)))*(n/=Lr);function i(o){return e*pn(- --o)*Math.sin((r-o)/n)}return i.amplitude=function(o){return t(o,n*Lr)},i.period=function(o){return t(e,o)},i}(sl,ul),ja=function t(e,n){var r=Math.asin(1/(e=Math.max(1,e)))*(n/=Lr);function i(o){return 1-e*pn(o=+o)*Math.sin((o+r)/n)}return i.amplitude=function(o){return t(o,n*Lr)},i.period=function(o){return t(e,o)},i}(sl,ul),lM=function t(e,n){var r=Math.asin(1/(e=Math.max(1,e)))*(n/=Lr);function i(o){return((o=o*2-1)<0?e*pn(-o)*Math.sin((r-o)/n):2-e*pn(o)*Math.sin((r+o)/n))/2}return i.amplitude=function(o){return t(o,n*Lr)},i.period=function(o){return t(e,o)},i}(sl,ul),fM={time:null,delay:0,duration:250,ease:Yi};function hM(t,e){for(var n;!(n=t.__transition)||!(n=n[e]);)if(!(t=t.parentNode))throw new Error(`transition ${e} not found`);return n}function dM(t){var e,n;t instanceof Ie?(e=t._id,t=t._name):(e=Ug(),(n=fM).time=Ui(),t=t==null?null:t+"");for(var r=this._groups,i=r.length,o=0;o<i;++o)for(var a=r[o],s=a.length,u,c=0;c<s;++c)(u=a[c])&&Xa(u,t,e,c,a,n||hM(u,e));return new Ie(r,this._parents,t,e)}Fn.prototype.interrupt=G8,Fn.prototype.transition=dM;var pM=[null];function gM(t,e){var n=t.__transition,r,i;if(n){e=e==null?null:e+"";for(i in n)if((r=n[i]).state>Jc&&r.name===e)return new Ie([[t]],pM,e,+i)}return null}const cl=t=>()=>t;function mM(t,{sourceEvent:e,target:n,selection:r,mode:i,dispatch:o}){Object.defineProperties(this,{type:{value:t,enumerable:!0,configurable:!0},sourceEvent:{value:e,enumerable:!0,configurable:!0},target:{value:n,enumerable:!0,configurable:!0},selection:{value:r,enumerable:!0,configurable:!0},mode:{value:i,enumerable:!0,configurable:!0},_:{value:o}})}function yM(t){t.stopImmediatePropagation()}function ll(t){t.preventDefault(),t.stopImmediatePropagation()}var Zg={name:"drag"},fl={name:"space"},Cr={name:"handle"},Rr={name:"center"};const{abs:Kg,max:Ft,min:Gt}=Math;function Qg(t){return[+t[0],+t[1]]}function hl(t){return[Qg(t[0]),Qg(t[1])]}var Za={name:"x",handles:["w","e"].map(Hi),input:function(t,e){return t==null?null:[[+t[0],e[0][1]],[+t[1],e[1][1]]]},output:function(t){return t&&[t[0][0],t[1][0]]}},Ka={name:"y",handles:["n","s"].map(Hi),input:function(t,e){return t==null?null:[[e[0][0],+t[0]],[e[1][0],+t[1]]]},output:function(t){return t&&[t[0][1],t[1][1]]}},bM={name:"xy",handles:["n","w","e","s","nw","ne","sw","se"].map(Hi),input:function(t){return t==null?null:hl(t)},output:function(t){return t}},je={overlay:"crosshair",selection:"move",n:"ns-resize",e:"ew-resize",s:"ns-resize",w:"ew-resize",nw:"nwse-resize",ne:"nesw-resize",se:"nwse-resize",sw:"nesw-resize"},Jg={e:"w",w:"e",nw:"ne",ne:"nw",se:"sw",sw:"se"},t1={n:"s",s:"n",nw:"sw",ne:"se",se:"ne",sw:"nw"},vM={overlay:1,selection:1,n:null,e:1,s:null,w:-1,nw:-1,ne:1,se:1,sw:-1},xM={overlay:1,selection:1,n:-1,e:null,s:1,w:null,nw:-1,ne:-1,se:1,sw:1};function Hi(t){return{type:t}}function _M(t){return!t.ctrlKey&&!t.button}function wM(){var t=this.ownerSVGElement||this;return t.hasAttribute("viewBox")?(t=t.viewBox.baseVal,[[t.x,t.y],[t.x+t.width,t.y+t.height]]):[[0,0],[t.width.baseVal.value,t.height.baseVal.value]]}function $M(){return navigator.maxTouchPoints||"ontouchstart"in this}function dl(t){for(;!t.__brush;)if(!(t=t.parentNode))return;return t.__brush}function SM(t){return t[0][0]===t[1][0]||t[0][1]===t[1][1]}function AM(t){var e=t.__brush;return e?e.dim.output(e.selection):null}function MM(){return pl(Za)}function TM(){return pl(Ka)}function PM(){return pl(bM)}function pl(t){var e=wM,n=_M,r=$M,i=!0,o=In("start","brush","end"),a=6,s;function u(m){var y=m.property("__brush",g).selectAll(".overlay").data([Hi("overlay")]);y.enter().append("rect").attr("class","overlay").attr("pointer-events","all").attr("cursor",je.overlay).merge(y).each(function(){var v=dl(this).extent;Z(this).attr("x",v[0][0]).attr("y",v[0][1]).attr("width",v[1][0]-v[0][0]).attr("height",v[1][1]-v[0][1])}),m.selectAll(".selection").data([Hi("selection")]).enter().append("rect").attr("class","selection").attr("cursor",je.selection).attr("fill","#777").attr("fill-opacity",.3).attr("stroke","#fff").attr("shape-rendering","crispEdges");var x=m.selectAll(".handle").data(t.handles,function(v){return v.type});x.exit().remove(),x.enter().append("rect").attr("class",function(v){return"handle handle--"+v.type}).attr("cursor",function(v){return je[v.type]}),m.each(c).attr("fill","none").attr("pointer-events","all").on("mousedown.brush",f).filter(r).on("touchstart.brush",f).on("touchmove.brush",d).on("touchend.brush touchcancel.brush",p).style("touch-action","none").style("-webkit-tap-highlight-color","rgba(0,0,0,0)")}u.move=function(m,y,x){m.tween?m.on("start.brush",function(v){l(this,arguments).beforestart().start(v)}).on("interrupt.brush end.brush",function(v){l(this,arguments).end(v)}).tween("brush",function(){var v=this,b=v.__brush,$=l(v,arguments),w=b.selection,S=t.input(typeof y=="function"?y.apply(this,arguments):y,b.extent),_=dn(w,S);function P(D){b.selection=D===1&&S===null?null:_(D),c.call(v),$.brush()}return w!==null&&S!==null?P:P(1)}):m.each(function(){var v=this,b=arguments,$=v.__brush,w=t.input(typeof y=="function"?y.apply(v,b):y,$.extent),S=l(v,b).beforestart();Yn(v),$.selection=w===null?null:w,c.call(v),S.start(x).brush(x).end(x)})},u.clear=function(m,y){u.move(m,null,y)};function c(){var m=Z(this),y=dl(this).selection;y?(m.selectAll(".selection").style("display",null).attr("x",y[0][0]).attr("y",y[0][1]).attr("width",y[1][0]-y[0][0]).attr("height",y[1][1]-y[0][1]),m.selectAll(".handle").style("display",null).attr("x",function(x){return x.type[x.type.length-1]==="e"?y[1][0]-a/2:y[0][0]-a/2}).attr("y",function(x){return x.type[0]==="s"?y[1][1]-a/2:y[0][1]-a/2}).attr("width",function(x){return x.type==="n"||x.type==="s"?y[1][0]-y[0][0]+a:a}).attr("height",function(x){return x.type==="e"||x.type==="w"?y[1][1]-y[0][1]+a:a})):m.selectAll(".selection,.handle").style("display","none").attr("x",null).attr("y",null).attr("width",null).attr("height",null)}function l(m,y,x){var v=m.__brush.emitter;return v&&(!x||!v.clean)?v:new h(m,y,x)}function h(m,y,x){this.that=m,this.args=y,this.state=m.__brush,this.active=0,this.clean=x}h.prototype={beforestart:function(){return++this.active===1&&(this.state.emitter=this,this.starting=!0),this},start:function(m,y){return this.starting?(this.starting=!1,this.emit("start",m,y)):this.emit("brush",m),this},brush:function(m,y){return this.emit("brush",m,y),this},end:function(m,y){return--this.active===0&&(delete this.state.emitter,this.emit("end",m,y)),this},emit:function(m,y,x){var v=Z(this.that).datum();o.call(m,this.that,new mM(m,{sourceEvent:y,target:u,selection:t.output(this.state.selection),mode:x,dispatch:o}),v)}};function f(m){if(s&&!m.touches||!n.apply(this,arguments))return;var y=this,x=m.target.__data__.type,v=(i&&m.metaKey?x="overlay":x)==="selection"?Zg:i&&m.altKey?Rr:Cr,b=t===Ka?null:vM[x],$=t===Za?null:xM[x],w=dl(y),S=w.extent,_=w.selection,P=S[0][0],D,A,I=S[0][1],M,T,k=S[1][0],E,N,O=S[1][1],L,R,F=0,C=0,z,X=b&&$&&i&&m.shiftKey,W,V,J=Array.from(m.touches||[m],rt=>{const Mt=rt.identifier;return rt=ae(rt,y),rt.point0=rt.slice(),rt.identifier=Mt,rt});Yn(y);var ht=l(y,arguments,!0).beforestart();if(x==="overlay"){_&&(z=!0);const rt=[J[0],J[1]||J[0]];w.selection=_=[[D=t===Ka?P:Gt(rt[0][0],rt[1][0]),M=t===Za?I:Gt(rt[0][1],rt[1][1])],[E=t===Ka?k:Ft(rt[0][0],rt[1][0]),L=t===Za?O:Ft(rt[0][1],rt[1][1])]],J.length>1&&xt(m)}else D=_[0][0],M=_[0][1],E=_[1][0],L=_[1][1];A=D,T=M,N=E,R=L;var q=Z(y).attr("pointer-events","none"),nt=q.selectAll(".overlay").attr("cursor",je[x]);if(m.touches)ht.moved=Y,ht.ended=gt;else{var at=Z(m.view).on("mousemove.brush",Y,!0).on("mouseup.brush",gt,!0);i&&at.on("keydown.brush",Nt,!0).on("keyup.brush",te,!0),Aa(m.view)}c.call(y),ht.start(m,v.name);function Y(rt){for(const Mt of rt.changedTouches||[rt])for(const Lo of J)Lo.identifier===Mt.identifier&&(Lo.cur=ae(Mt,y));if(X&&!W&&!V&&J.length===1){const Mt=J[0];Kg(Mt.cur[0]-Mt[0])>Kg(Mt.cur[1]-Mt[1])?V=!0:W=!0}for(const Mt of J)Mt.cur&&(Mt[0]=Mt.cur[0],Mt[1]=Mt.cur[1]);z=!0,ll(rt),xt(rt)}function xt(rt){const Mt=J[0],Lo=Mt.point0;var Sn;switch(F=Mt[0]-Lo[0],C=Mt[1]-Lo[1],v){case fl:case Zg:{b&&(F=Ft(P-D,Gt(k-E,F)),A=D+F,N=E+F),$&&(C=Ft(I-M,Gt(O-L,C)),T=M+C,R=L+C);break}case Cr:{J[1]?(b&&(A=Ft(P,Gt(k,J[0][0])),N=Ft(P,Gt(k,J[1][0])),b=1),$&&(T=Ft(I,Gt(O,J[0][1])),R=Ft(I,Gt(O,J[1][1])),$=1)):(b<0?(F=Ft(P-D,Gt(k-D,F)),A=D+F,N=E):b>0&&(F=Ft(P-E,Gt(k-E,F)),A=D,N=E+F),$<0?(C=Ft(I-M,Gt(O-M,C)),T=M+C,R=L):$>0&&(C=Ft(I-L,Gt(O-L,C)),T=M,R=L+C));break}case Rr:{b&&(A=Ft(P,Gt(k,D-F*b)),N=Ft(P,Gt(k,E+F*b))),$&&(T=Ft(I,Gt(O,M-C*$)),R=Ft(I,Gt(O,L+C*$)));break}}N<A&&(b*=-1,Sn=D,D=E,E=Sn,Sn=A,A=N,N=Sn,x in Jg&&nt.attr("cursor",je[x=Jg[x]])),R<T&&($*=-1,Sn=M,M=L,L=Sn,Sn=T,T=R,R=Sn,x in t1&&nt.attr("cursor",je[x=t1[x]])),w.selection&&(_=w.selection),W&&(A=_[0][0],N=_[1][0]),V&&(T=_[0][1],R=_[1][1]),(_[0][0]!==A||_[0][1]!==T||_[1][0]!==N||_[1][1]!==R)&&(w.selection=[[A,T],[N,R]],c.call(y),ht.brush(rt,v.name))}function gt(rt){if(yM(rt),rt.touches){if(rt.touches.length)return;s&&clearTimeout(s),s=setTimeout(function(){s=null},500)}else Ma(rt.view,z),at.on("keydown.brush keyup.brush mousemove.brush mouseup.brush",null);q.attr("pointer-events","all"),nt.attr("cursor",je.overlay),w.selection&&(_=w.selection),SM(_)&&(w.selection=null,c.call(y)),ht.end(rt,v.name)}function Nt(rt){switch(rt.keyCode){case 16:{X=b&&$;break}case 18:{v===Cr&&(b&&(E=N-F*b,D=A+F*b),$&&(L=R-C*$,M=T+C*$),v=Rr,xt(rt));break}case 32:{(v===Cr||v===Rr)&&(b<0?E=N-F:b>0&&(D=A-F),$<0?L=R-C:$>0&&(M=T-C),v=fl,nt.attr("cursor",je.selection),xt(rt));break}default:return}ll(rt)}function te(rt){switch(rt.keyCode){case 16:{X&&(W=V=X=!1,xt(rt));break}case 18:{v===Rr&&(b<0?E=N:b>0&&(D=A),$<0?L=R:$>0&&(M=T),v=Cr,xt(rt));break}case 32:{v===fl&&(rt.altKey?(b&&(E=N-F*b,D=A+F*b),$&&(L=R-C*$,M=T+C*$),v=Rr):(b<0?E=N:b>0&&(D=A),$<0?L=R:$>0&&(M=T),v=Cr),nt.attr("cursor",je[x]),xt(rt));break}default:return}ll(rt)}}function d(m){l(this,arguments).moved(m)}function p(m){l(this,arguments).ended(m)}function g(){var m=this.__brush||{selection:null};return m.extent=hl(e.apply(this,arguments)),m.dim=t,m}return u.extent=function(m){return arguments.length?(e=typeof m=="function"?m:cl(hl(m)),u):e},u.filter=function(m){return arguments.length?(n=typeof m=="function"?m:cl(!!m),u):n},u.touchable=function(m){return arguments.length?(r=typeof m=="function"?m:cl(!!m),u):r},u.handleSize=function(m){return arguments.length?(a=+m,u):a},u.keyModifiers=function(m){return arguments.length?(i=!!m,u):i},u.on=function(){var m=o.on.apply(o,arguments);return m===o?u:m},u}var e1=Math.abs,Ir=Math.cos,Nr=Math.sin,n1=Math.PI,Qa=n1/2,r1=n1*2,i1=Math.max,gl=1e-12;function ml(t,e){return Array.from({length:e-t},(n,r)=>t+r)}function DM(t){return function(e,n){return t(e.source.value+e.target.value,n.source.value+n.target.value)}}function EM(){return yl(!1,!1)}function kM(){return yl(!1,!0)}function LM(){return yl(!0,!1)}function yl(t,e){var n=0,r=null,i=null,o=null;function a(s){var u=s.length,c=new Array(u),l=ml(0,u),h=new Array(u*u),f=new Array(u),d=0,p;s=Float64Array.from({length:u*u},e?(g,m)=>s[m%u][m/u|0]:(g,m)=>s[m/u|0][m%u]);for(let g=0;g<u;++g){let m=0;for(let y=0;y<u;++y)m+=s[g*u+y]+t*s[y*u+g];d+=c[g]=m}d=i1(0,r1-n*u)/d,p=d?n:r1/u;{let g=0;r&&l.sort((m,y)=>r(c[m],c[y]));for(const m of l){const y=g;if(t){const x=ml(~u+1,u).filter(v=>v<0?s[~v*u+m]:s[m*u+v]);i&&x.sort((v,b)=>i(v<0?-s[~v*u+m]:s[m*u+v],b<0?-s[~b*u+m]:s[m*u+b]));for(const v of x)if(v<0){const b=h[~v*u+m]||(h[~v*u+m]={source:null,target:null});b.target={index:m,startAngle:g,endAngle:g+=s[~v*u+m]*d,value:s[~v*u+m]}}else{const b=h[m*u+v]||(h[m*u+v]={source:null,target:null});b.source={index:m,startAngle:g,endAngle:g+=s[m*u+v]*d,value:s[m*u+v]}}f[m]={index:m,startAngle:y,endAngle:g,value:c[m]}}else{const x=ml(0,u).filter(v=>s[m*u+v]||s[v*u+m]);i&&x.sort((v,b)=>i(s[m*u+v],s[m*u+b]));for(const v of x){let b;if(m<v?(b=h[m*u+v]||(h[m*u+v]={source:null,target:null}),b.source={index:m,startAngle:g,endAngle:g+=s[m*u+v]*d,value:s[m*u+v]}):(b=h[v*u+m]||(h[v*u+m]={source:null,target:null}),b.target={index:m,startAngle:g,endAngle:g+=s[m*u+v]*d,value:s[m*u+v]},m===v&&(b.source=b.target)),b.source&&b.target&&b.source.value<b.target.value){const $=b.source;b.source=b.target,b.target=$}}f[m]={index:m,startAngle:y,endAngle:g,value:c[m]}}g+=p}}return h=Object.values(h),h.groups=f,o?h.sort(o):h}return a.padAngle=function(s){return arguments.length?(n=i1(0,s),a):n},a.sortGroups=function(s){return arguments.length?(r=s,a):r},a.sortSubgroups=function(s){return arguments.length?(i=s,a):i},a.sortChords=function(s){return arguments.length?(s==null?o=null:(o=DM(s))._=s,a):o&&o._},a}const bl=Math.PI,vl=2*bl,Wn=1e-6,CM=vl-Wn;function o1(t){this._+=t[0];for(let e=1,n=t.length;e<n;++e)this._+=arguments[e]+t[e]}function RM(t){let e=Math.floor(t);if(!(e>=0))throw new Error(`invalid digits: ${t}`);if(e>15)return o1;const n=10**e;return function(r){this._+=r[0];for(let i=1,o=r.length;i<o;++i)this._+=Math.round(arguments[i]*n)/n+r[i]}}let qi=class{constructor(e){this._x0=this._y0=this._x1=this._y1=null,this._="",this._append=e==null?o1:RM(e)}moveTo(e,n){this._append`M${this._x0=this._x1=+e},${this._y0=this._y1=+n}`}closePath(){this._x1!==null&&(this._x1=this._x0,this._y1=this._y0,this._append`Z`)}lineTo(e,n){this._append`L${this._x1=+e},${this._y1=+n}`}quadraticCurveTo(e,n,r,i){this._append`Q${+e},${+n},${this._x1=+r},${this._y1=+i}`}bezierCurveTo(e,n,r,i,o,a){this._append`C${+e},${+n},${+r},${+i},${this._x1=+o},${this._y1=+a}`}arcTo(e,n,r,i,o){if(e=+e,n=+n,r=+r,i=+i,o=+o,o<0)throw new Error(`negative radius: ${o}`);let a=this._x1,s=this._y1,u=r-e,c=i-n,l=a-e,h=s-n,f=l*l+h*h;if(this._x1===null)this._append`M${this._x1=e},${this._y1=n}`;else if(f>Wn)if(!(Math.abs(h*u-c*l)>Wn)||!o)this._append`L${this._x1=e},${this._y1=n}`;else{let d=r-a,p=i-s,g=u*u+c*c,m=d*d+p*p,y=Math.sqrt(g),x=Math.sqrt(f),v=o*Math.tan((bl-Math.acos((g+f-m)/(2*y*x)))/2),b=v/x,$=v/y;Math.abs(b-1)>Wn&&this._append`L${e+b*l},${n+b*h}`,this._append`A${o},${o},0,0,${+(h*d>l*p)},${this._x1=e+$*u},${this._y1=n+$*c}`}}arc(e,n,r,i,o,a){if(e=+e,n=+n,r=+r,a=!!a,r<0)throw new Error(`negative radius: ${r}`);let s=r*Math.cos(i),u=r*Math.sin(i),c=e+s,l=n+u,h=1^a,f=a?i-o:o-i;this._x1===null?this._append`M${c},${l}`:(Math.abs(this._x1-c)>Wn||Math.abs(this._y1-l)>Wn)&&this._append`L${c},${l}`,r&&(f<0&&(f=f%vl+vl),f>CM?this._append`A${r},${r},0,1,${h},${e-s},${n-u}A${r},${r},0,1,${h},${this._x1=c},${this._y1=l}`:f>Wn&&this._append`A${r},${r},0,${+(f>=bl)},${h},${this._x1=e+r*Math.cos(o)},${this._y1=n+r*Math.sin(o)}`)}rect(e,n,r,i){this._append`M${this._x0=this._x1=+e},${this._y0=this._y1=+n}h${r=+r}v${+i}h${-r}Z`}toString(){return this._}};function xl(){return new qi}xl.prototype=qi.prototype;function IM(t=3){return new qi(+t)}var NM=Array.prototype.slice;function Hn(t){return function(){return t}}function FM(t){return t.source}function GM(t){return t.target}function a1(t){return t.radius}function zM(t){return t.startAngle}function OM(t){return t.endAngle}function UM(){return 0}function BM(){return 10}function s1(t){var e=FM,n=GM,r=a1,i=a1,o=zM,a=OM,s=UM,u=null;function c(){var l,h=e.apply(this,arguments),f=n.apply(this,arguments),d=s.apply(this,arguments)/2,p=NM.call(arguments),g=+r.apply(this,(p[0]=h,p)),m=o.apply(this,p)-Qa,y=a.apply(this,p)-Qa,x=+i.apply(this,(p[0]=f,p)),v=o.apply(this,p)-Qa,b=a.apply(this,p)-Qa;if(u||(u=l=xl()),d>gl&&(e1(y-m)>d*2+gl?y>m?(m+=d,y-=d):(m-=d,y+=d):m=y=(m+y)/2,e1(b-v)>d*2+gl?b>v?(v+=d,b-=d):(v-=d,b+=d):v=b=(v+b)/2),u.moveTo(g*Ir(m),g*Nr(m)),u.arc(0,0,g,m,y),m!==v||y!==b)if(t){var $=+t.apply(this,arguments),w=x-$,S=(v+b)/2;u.quadraticCurveTo(0,0,w*Ir(v),w*Nr(v)),u.lineTo(x*Ir(S),x*Nr(S)),u.lineTo(w*Ir(b),w*Nr(b))}else u.quadraticCurveTo(0,0,x*Ir(v),x*Nr(v)),u.arc(0,0,x,v,b);if(u.quadraticCurveTo(0,0,g*Ir(m),g*Nr(m)),u.closePath(),l)return u=null,l+""||null}return t&&(c.headRadius=function(l){return arguments.length?(t=typeof l=="function"?l:Hn(+l),c):t}),c.radius=function(l){return arguments.length?(r=i=typeof l=="function"?l:Hn(+l),c):r},c.sourceRadius=function(l){return arguments.length?(r=typeof l=="function"?l:Hn(+l),c):r},c.targetRadius=function(l){return arguments.length?(i=typeof l=="function"?l:Hn(+l),c):i},c.startAngle=function(l){return arguments.length?(o=typeof l=="function"?l:Hn(+l),c):o},c.endAngle=function(l){return arguments.length?(a=typeof l=="function"?l:Hn(+l),c):a},c.padAngle=function(l){return arguments.length?(s=typeof l=="function"?l:Hn(+l),c):s},c.source=function(l){return arguments.length?(e=l,c):e},c.target=function(l){return arguments.length?(n=l,c):n},c.context=function(l){return arguments.length?(u=l??null,c):u},c}function YM(){return s1()}function WM(){return s1(BM)}var HM=Array.prototype,u1=HM.slice;function qM(t,e){return t-e}function XM(t){for(var e=0,n=t.length,r=t[n-1][1]*t[0][0]-t[n-1][0]*t[0][1];++e<n;)r+=t[e-1][1]*t[e][0]-t[e-1][0]*t[e][1];return r}const gn=t=>()=>t;function VM(t,e){for(var n=-1,r=e.length,i;++n<r;)if(i=jM(t,e[n]))return i;return 0}function jM(t,e){for(var n=e[0],r=e[1],i=-1,o=0,a=t.length,s=a-1;o<a;s=o++){var u=t[o],c=u[0],l=u[1],h=t[s],f=h[0],d=h[1];if(ZM(u,h,e))return 0;l>r!=d>r&&n<(f-c)*(r-l)/(d-l)+c&&(i=-i)}return i}function ZM(t,e,n){var r;return KM(t,e,n)&&QM(t[r=+(t[0]===e[0])],n[r],e[r])}function KM(t,e,n){return(e[0]-t[0])*(n[1]-t[1])===(n[0]-t[0])*(e[1]-t[1])}function QM(t,e,n){return t<=e&&e<=n||n<=e&&e<=t}function JM(){}var Ze=[[],[[[1,1.5],[.5,1]]],[[[1.5,1],[1,1.5]]],[[[1.5,1],[.5,1]]],[[[1,.5],[1.5,1]]],[[[1,1.5],[.5,1]],[[1,.5],[1.5,1]]],[[[1,.5],[1,1.5]]],[[[1,.5],[.5,1]]],[[[.5,1],[1,.5]]],[[[1,1.5],[1,.5]]],[[[.5,1],[1,.5]],[[1.5,1],[1,1.5]]],[[[1.5,1],[1,.5]]],[[[.5,1],[1.5,1]]],[[[1,1.5],[1.5,1]]],[[[.5,1],[1,1.5]]],[]];function _l(){var t=1,e=1,n=$c,r=u;function i(c){var l=n(c);if(Array.isArray(l))l=l.slice().sort(qM);else{const h=Ai(c,t7);for(l=Cn(...wc(h[0],h[1],l),l);l[l.length-1]>=h[1];)l.pop();for(;l[1]<h[0];)l.shift()}return l.map(h=>o(c,h))}function o(c,l){const h=l==null?NaN:+l;if(isNaN(h))throw new Error(`invalid value: ${l}`);var f=[],d=[];return a(c,h,function(p){r(p,c,h),XM(p)>0?f.push([p]):d.push(p)}),d.forEach(function(p){for(var g=0,m=f.length,y;g<m;++g)if(VM((y=f[g])[0],p)!==-1){y.push(p);return}}),{type:"MultiPolygon",value:l,coordinates:f}}function a(c,l,h){var f=new Array,d=new Array,p,g,m,y,x,v;for(p=g=-1,y=qn(c[0],l),Ze[y<<1].forEach(b);++p<t-1;)m=y,y=qn(c[p+1],l),Ze[m|y<<1].forEach(b);for(Ze[y<<0].forEach(b);++g<e-1;){for(p=-1,y=qn(c[g*t+t],l),x=qn(c[g*t],l),Ze[y<<1|x<<2].forEach(b);++p<t-1;)m=y,y=qn(c[g*t+t+p+1],l),v=x,x=qn(c[g*t+p+1],l),Ze[m|y<<1|x<<2|v<<3].forEach(b);Ze[y|x<<3].forEach(b)}for(p=-1,x=c[g*t]>=l,Ze[x<<2].forEach(b);++p<t-1;)v=x,x=qn(c[g*t+p+1],l),Ze[x<<2|v<<3].forEach(b);Ze[x<<3].forEach(b);function b($){var w=[$[0][0]+p,$[0][1]+g],S=[$[1][0]+p,$[1][1]+g],_=s(w),P=s(S),D,A;(D=d[_])?(A=f[P])?(delete d[D.end],delete f[A.start],D===A?(D.ring.push(S),h(D.ring)):f[D.start]=d[A.end]={start:D.start,end:A.end,ring:D.ring.concat(A.ring)}):(delete d[D.end],D.ring.push(S),d[D.end=P]=D):(D=f[P])?(A=d[_])?(delete f[D.start],delete d[A.end],D===A?(D.ring.push(S),h(D.ring)):f[A.start]=d[D.end]={start:A.start,end:D.end,ring:A.ring.concat(D.ring)}):(delete f[D.start],D.ring.unshift(w),f[D.start=_]=D):f[_]=d[P]={start:_,end:P,ring:[w,S]}}}function s(c){return c[0]*2+c[1]*(t+1)*4}function u(c,l,h){c.forEach(function(f){var d=f[0],p=f[1],g=d|0,m=p|0,y=wl(l[m*t+g]);d>0&&d<t&&g===d&&(f[0]=c1(d,wl(l[m*t+g-1]),y,h)),p>0&&p<e&&m===p&&(f[1]=c1(p,wl(l[(m-1)*t+g]),y,h))})}return i.contour=o,i.size=function(c){if(!arguments.length)return[t,e];var l=Math.floor(c[0]),h=Math.floor(c[1]);if(!(l>=0&&h>=0))throw new Error("invalid size");return t=l,e=h,i},i.thresholds=function(c){return arguments.length?(n=typeof c=="function"?c:Array.isArray(c)?gn(u1.call(c)):gn(c),i):n},i.smooth=function(c){return arguments.length?(r=c?u:JM,i):r===u},i}function t7(t){return isFinite(t)?t:NaN}function qn(t,e){return t==null?!1:+t>=e}function wl(t){return t==null||isNaN(t=+t)?-1/0:t}function c1(t,e,n,r){const i=r-e,o=n-e,a=isFinite(i)||isFinite(o)?i/o:Math.sign(i)/Math.sign(o);return isNaN(a)?t:t+a-.5}function e7(t){return t[0]}function n7(t){return t[1]}function r7(){return 1}function i7(){var t=e7,e=n7,n=r7,r=960,i=500,o=20,a=2,s=o*3,u=r+s*2>>a,c=i+s*2>>a,l=gn(20);function h(x){var v=new Float32Array(u*c),b=Math.pow(2,-a),$=-1;for(const M of x){var w=(t(M,++$,x)+s)*b,S=(e(M,$,x)+s)*b,_=+n(M,$,x);if(_&&w>=0&&w<u&&S>=0&&S<c){var P=Math.floor(w),D=Math.floor(S),A=w-P-.5,I=S-D-.5;v[P+D*u]+=(1-A)*(1-I)*_,v[P+1+D*u]+=A*(1-I)*_,v[P+1+(D+1)*u]+=A*I*_,v[P+(D+1)*u]+=(1-A)*I*_}}return ip({data:v,width:u,height:c},o*b),v}function f(x){var v=h(x),b=l(v),$=Math.pow(2,2*a);return Array.isArray(b)||(b=Cn(Number.MIN_VALUE,Ti(v)/$,b)),_l().size([u,c]).thresholds(b.map(w=>w*$))(v).map((w,S)=>(w.value=+b[S],d(w)))}f.contours=function(x){var v=h(x),b=_l().size([u,c]),$=Math.pow(2,2*a),w=S=>{S=+S;var _=d(b.contour(v,S*$));return _.value=S,_};return Object.defineProperty(w,"max",{get:()=>Ti(v)/$}),w};function d(x){return x.coordinates.forEach(p),x}function p(x){x.forEach(g)}function g(x){x.forEach(m)}function m(x){x[0]=x[0]*Math.pow(2,a)-s,x[1]=x[1]*Math.pow(2,a)-s}function y(){return s=o*3,u=r+s*2>>a,c=i+s*2>>a,f}return f.x=function(x){return arguments.length?(t=typeof x=="function"?x:gn(+x),f):t},f.y=function(x){return arguments.length?(e=typeof x=="function"?x:gn(+x),f):e},f.weight=function(x){return arguments.length?(n=typeof x=="function"?x:gn(+x),f):n},f.size=function(x){if(!arguments.length)return[r,i];var v=+x[0],b=+x[1];if(!(v>=0&&b>=0))throw new Error("invalid size");return r=v,i=b,y()},f.cellSize=function(x){if(!arguments.length)return 1<<a;if(!((x=+x)>=1))throw new Error("invalid cell size");return a=Math.floor(Math.log(x)/Math.LN2),y()},f.thresholds=function(x){return arguments.length?(l=typeof x=="function"?x:Array.isArray(x)?gn(u1.call(x)):gn(x),f):l},f.bandwidth=function(x){if(!arguments.length)return Math.sqrt(o*(o+1));if(!((x=+x)>=0))throw new Error("invalid bandwidth");return o=(Math.sqrt(4*x*x+1)-1)/2,y()},f}const Ke=11102230246251565e-32,zt=134217729,o7=(3+8*Ke)*Ke;function $l(t,e,n,r,i){let o,a,s,u,c=e[0],l=r[0],h=0,f=0;l>c==l>-c?(o=c,c=e[++h]):(o=l,l=r[++f]);let d=0;if(h<t&&f<n)for(l>c==l>-c?(a=c+o,s=o-(a-c),c=e[++h]):(a=l+o,s=o-(a-l),l=r[++f]),o=a,s!==0&&(i[d++]=s);h<t&&f<n;)l>c==l>-c?(a=o+c,u=a-o,s=o-(a-u)+(c-u),c=e[++h]):(a=o+l,u=a-o,s=o-(a-u)+(l-u),l=r[++f]),o=a,s!==0&&(i[d++]=s);for(;h<t;)a=o+c,u=a-o,s=o-(a-u)+(c-u),c=e[++h],o=a,s!==0&&(i[d++]=s);for(;f<n;)a=o+l,u=a-o,s=o-(a-u)+(l-u),l=r[++f],o=a,s!==0&&(i[d++]=s);return(o!==0||d===0)&&(i[d++]=o),d}function a7(t,e){let n=e[0];for(let r=1;r<t;r++)n+=e[r];return n}function Xi(t){return new Float64Array(t)}const s7=(3+16*Ke)*Ke,u7=(2+12*Ke)*Ke,c7=(9+64*Ke)*Ke*Ke,Fr=Xi(4),l1=Xi(8),f1=Xi(12),h1=Xi(16),Wt=Xi(4);function l7(t,e,n,r,i,o,a){let s,u,c,l,h,f,d,p,g,m,y,x,v,b,$,w,S,_;const P=t-i,D=n-i,A=e-o,I=r-o;b=P*I,f=zt*P,d=f-(f-P),p=P-d,f=zt*I,g=f-(f-I),m=I-g,$=p*m-(b-d*g-p*g-d*m),w=A*D,f=zt*A,d=f-(f-A),p=A-d,f=zt*D,g=f-(f-D),m=D-g,S=p*m-(w-d*g-p*g-d*m),y=$-S,h=$-y,Fr[0]=$-(y+h)+(h-S),x=b+y,h=x-b,v=b-(x-h)+(y-h),y=v-w,h=v-y,Fr[1]=v-(y+h)+(h-w),_=x+y,h=_-x,Fr[2]=x-(_-h)+(y-h),Fr[3]=_;let M=a7(4,Fr),T=u7*a;if(M>=T||-M>=T||(h=t-P,s=t-(P+h)+(h-i),h=n-D,c=n-(D+h)+(h-i),h=e-A,u=e-(A+h)+(h-o),h=r-I,l=r-(I+h)+(h-o),s===0&&u===0&&c===0&&l===0)||(T=c7*a+o7*Math.abs(M),M+=P*l+I*s-(A*c+D*u),M>=T||-M>=T))return M;b=s*I,f=zt*s,d=f-(f-s),p=s-d,f=zt*I,g=f-(f-I),m=I-g,$=p*m-(b-d*g-p*g-d*m),w=u*D,f=zt*u,d=f-(f-u),p=u-d,f=zt*D,g=f-(f-D),m=D-g,S=p*m-(w-d*g-p*g-d*m),y=$-S,h=$-y,Wt[0]=$-(y+h)+(h-S),x=b+y,h=x-b,v=b-(x-h)+(y-h),y=v-w,h=v-y,Wt[1]=v-(y+h)+(h-w),_=x+y,h=_-x,Wt[2]=x-(_-h)+(y-h),Wt[3]=_;const k=$l(4,Fr,4,Wt,l1);b=P*l,f=zt*P,d=f-(f-P),p=P-d,f=zt*l,g=f-(f-l),m=l-g,$=p*m-(b-d*g-p*g-d*m),w=A*c,f=zt*A,d=f-(f-A),p=A-d,f=zt*c,g=f-(f-c),m=c-g,S=p*m-(w-d*g-p*g-d*m),y=$-S,h=$-y,Wt[0]=$-(y+h)+(h-S),x=b+y,h=x-b,v=b-(x-h)+(y-h),y=v-w,h=v-y,Wt[1]=v-(y+h)+(h-w),_=x+y,h=_-x,Wt[2]=x-(_-h)+(y-h),Wt[3]=_;const E=$l(k,l1,4,Wt,f1);b=s*l,f=zt*s,d=f-(f-s),p=s-d,f=zt*l,g=f-(f-l),m=l-g,$=p*m-(b-d*g-p*g-d*m),w=u*c,f=zt*u,d=f-(f-u),p=u-d,f=zt*c,g=f-(f-c),m=c-g,S=p*m-(w-d*g-p*g-d*m),y=$-S,h=$-y,Wt[0]=$-(y+h)+(h-S),x=b+y,h=x-b,v=b-(x-h)+(y-h),y=v-w,h=v-y,Wt[1]=v-(y+h)+(h-w),_=x+y,h=_-x,Wt[2]=x-(_-h)+(y-h),Wt[3]=_;const N=$l(E,f1,4,Wt,h1);return h1[N-1]}function Ja(t,e,n,r,i,o){const a=(e-o)*(n-i),s=(t-i)*(r-o),u=a-s,c=Math.abs(a+s);return Math.abs(u)>=s7*c?u:-l7(t,e,n,r,i,o,c)}const d1=Math.pow(2,-52),ts=new Uint32Array(512);class es{static from(e,n=g7,r=m7){const i=e.length,o=new Float64Array(i*2);for(let a=0;a<i;a++){const s=e[a];o[2*a]=n(s),o[2*a+1]=r(s)}return new es(o)}constructor(e){const n=e.length>>1;if(n>0&&typeof e[0]!="number")throw new Error("Expected coords to contain numbers.");this.coords=e;const r=Math.max(2*n-5,0);this._triangles=new Uint32Array(r*3),this._halfedges=new Int32Array(r*3),this._hashSize=Math.ceil(Math.sqrt(n)),this._hullPrev=new Uint32Array(n),this._hullNext=new Uint32Array(n),this._hullTri=new Uint32Array(n),this._hullHash=new Int32Array(this._hashSize),this._ids=new Uint32Array(n),this._dists=new Float64Array(n),this.update()}update(){const{coords:e,_hullPrev:n,_hullNext:r,_hullTri:i,_hullHash:o}=this,a=e.length>>1;let s=1/0,u=1/0,c=-1/0,l=-1/0;for(let P=0;P<a;P++){const D=e[2*P],A=e[2*P+1];D<s&&(s=D),A<u&&(u=A),D>c&&(c=D),A>l&&(l=A),this._ids[P]=P}const h=(s+c)/2,f=(u+l)/2;let d,p,g;for(let P=0,D=1/0;P<a;P++){const A=Sl(h,f,e[2*P],e[2*P+1]);A<D&&(d=P,D=A)}const m=e[2*d],y=e[2*d+1];for(let P=0,D=1/0;P<a;P++){if(P===d)continue;const A=Sl(m,y,e[2*P],e[2*P+1]);A<D&&A>0&&(p=P,D=A)}let x=e[2*p],v=e[2*p+1],b=1/0;for(let P=0;P<a;P++){if(P===d||P===p)continue;const D=d7(m,y,x,v,e[2*P],e[2*P+1]);D<b&&(g=P,b=D)}let $=e[2*g],w=e[2*g+1];if(b===1/0){for(let A=0;A<a;A++)this._dists[A]=e[2*A]-e[0]||e[2*A+1]-e[1];Gr(this._ids,this._dists,0,a-1);const P=new Uint32Array(a);let D=0;for(let A=0,I=-1/0;A<a;A++){const M=this._ids[A],T=this._dists[M];T>I&&(P[D++]=M,I=T)}this.hull=P.subarray(0,D),this.triangles=new Uint32Array(0),this.halfedges=new Uint32Array(0);return}if(Ja(m,y,x,v,$,w)<0){const P=p,D=x,A=v;p=g,x=$,v=w,g=P,$=D,w=A}const S=p7(m,y,x,v,$,w);this._cx=S.x,this._cy=S.y;for(let P=0;P<a;P++)this._dists[P]=Sl(e[2*P],e[2*P+1],S.x,S.y);Gr(this._ids,this._dists,0,a-1),this._hullStart=d;let _=3;r[d]=n[g]=p,r[p]=n[d]=g,r[g]=n[p]=d,i[d]=0,i[p]=1,i[g]=2,o.fill(-1),o[this._hashKey(m,y)]=d,o[this._hashKey(x,v)]=p,o[this._hashKey($,w)]=g,this.trianglesLen=0,this._addTriangle(d,p,g,-1,-1,-1);for(let P=0,D,A;P<this._ids.length;P++){const I=this._ids[P],M=e[2*I],T=e[2*I+1];if(P>0&&Math.abs(M-D)<=d1&&Math.abs(T-A)<=d1||(D=M,A=T,I===d||I===p||I===g))continue;let k=0;for(let R=0,F=this._hashKey(M,T);R<this._hashSize&&(k=o[(F+R)%this._hashSize],!(k!==-1&&k!==r[k]));R++);k=n[k];let E=k,N;for(;N=r[E],Ja(M,T,e[2*E],e[2*E+1],e[2*N],e[2*N+1])>=0;)if(E=N,E===k){E=-1;break}if(E===-1)continue;let O=this._addTriangle(E,I,r[E],-1,-1,i[E]);i[I]=this._legalize(O+2),i[E]=O,_++;let L=r[E];for(;N=r[L],Ja(M,T,e[2*L],e[2*L+1],e[2*N],e[2*N+1])<0;)O=this._addTriangle(L,I,N,i[I],-1,i[L]),i[I]=this._legalize(O+2),r[L]=L,_--,L=N;if(E===k)for(;N=n[E],Ja(M,T,e[2*N],e[2*N+1],e[2*E],e[2*E+1])<0;)O=this._addTriangle(N,I,E,-1,i[E],i[N]),this._legalize(O+2),i[N]=O,r[E]=E,_--,E=N;this._hullStart=n[I]=E,r[E]=n[L]=I,r[I]=L,o[this._hashKey(M,T)]=I,o[this._hashKey(e[2*E],e[2*E+1])]=E}this.hull=new Uint32Array(_);for(let P=0,D=this._hullStart;P<_;P++)this.hull[P]=D,D=r[D];this.triangles=this._triangles.subarray(0,this.trianglesLen),this.halfedges=this._halfedges.subarray(0,this.trianglesLen)}_hashKey(e,n){return Math.floor(f7(e-this._cx,n-this._cy)*this._hashSize)%this._hashSize}_legalize(e){const{_triangles:n,_halfedges:r,coords:i}=this;let o=0,a=0;for(;;){const s=r[e],u=e-e%3;if(a=u+(e+2)%3,s===-1){if(o===0)break;e=ts[--o];continue}const c=s-s%3,l=u+(e+1)%3,h=c+(s+2)%3,f=n[a],d=n[e],p=n[l],g=n[h];if(h7(i[2*f],i[2*f+1],i[2*d],i[2*d+1],i[2*p],i[2*p+1],i[2*g],i[2*g+1])){n[e]=g,n[s]=f;const y=r[h];if(y===-1){let v=this._hullStart;do{if(this._hullTri[v]===h){this._hullTri[v]=e;break}v=this._hullPrev[v]}while(v!==this._hullStart)}this._link(e,y),this._link(s,r[a]),this._link(a,h);const x=c+(s+1)%3;o<ts.length&&(ts[o++]=x)}else{if(o===0)break;e=ts[--o]}}return a}_link(e,n){this._halfedges[e]=n,n!==-1&&(this._halfedges[n]=e)}_addTriangle(e,n,r,i,o,a){const s=this.trianglesLen;return this._triangles[s]=e,this._triangles[s+1]=n,this._triangles[s+2]=r,this._link(s,i),this._link(s+1,o),this._link(s+2,a),this.trianglesLen+=3,s}}function f7(t,e){const n=t/(Math.abs(t)+Math.abs(e));return(e>0?3-n:1+n)/4}function Sl(t,e,n,r){const i=t-n,o=e-r;return i*i+o*o}function h7(t,e,n,r,i,o,a,s){const u=t-a,c=e-s,l=n-a,h=r-s,f=i-a,d=o-s,p=u*u+c*c,g=l*l+h*h,m=f*f+d*d;return u*(h*m-g*d)-c*(l*m-g*f)+p*(l*d-h*f)<0}function d7(t,e,n,r,i,o){const a=n-t,s=r-e,u=i-t,c=o-e,l=a*a+s*s,h=u*u+c*c,f=.5/(a*c-s*u),d=(c*l-s*h)*f,p=(a*h-u*l)*f;return d*d+p*p}function p7(t,e,n,r,i,o){const a=n-t,s=r-e,u=i-t,c=o-e,l=a*a+s*s,h=u*u+c*c,f=.5/(a*c-s*u),d=t+(c*l-s*h)*f,p=e+(a*h-u*l)*f;return{x:d,y:p}}function Gr(t,e,n,r){if(r-n<=20)for(let i=n+1;i<=r;i++){const o=t[i],a=e[o];let s=i-1;for(;s>=n&&e[t[s]]>a;)t[s+1]=t[s--];t[s+1]=o}else{const i=n+r>>1;let o=n+1,a=r;Vi(t,i,o),e[t[n]]>e[t[r]]&&Vi(t,n,r),e[t[o]]>e[t[r]]&&Vi(t,o,r),e[t[n]]>e[t[o]]&&Vi(t,n,o);const s=t[o],u=e[s];for(;;){do o++;while(e[t[o]]<u);do a--;while(e[t[a]]>u);if(a<o)break;Vi(t,o,a)}t[n+1]=t[a],t[a]=s,r-o+1>=a-n?(Gr(t,e,o,r),Gr(t,e,n,a-1)):(Gr(t,e,n,a-1),Gr(t,e,o,r))}}function Vi(t,e,n){const r=t[e];t[e]=t[n],t[n]=r}function g7(t){return t[0]}function m7(t){return t[1]}const p1=1e-6;class Xn{constructor(){this._x0=this._y0=this._x1=this._y1=null,this._=""}moveTo(e,n){this._+=`M${this._x0=this._x1=+e},${this._y0=this._y1=+n}`}closePath(){this._x1!==null&&(this._x1=this._x0,this._y1=this._y0,this._+="Z")}lineTo(e,n){this._+=`L${this._x1=+e},${this._y1=+n}`}arc(e,n,r){e=+e,n=+n,r=+r;const i=e+r,o=n;if(r<0)throw new Error("negative radius");this._x1===null?this._+=`M${i},${o}`:(Math.abs(this._x1-i)>p1||Math.abs(this._y1-o)>p1)&&(this._+="L"+i+","+o),r&&(this._+=`A${r},${r},0,1,1,${e-r},${n}A${r},${r},0,1,1,${this._x1=i},${this._y1=o}`)}rect(e,n,r,i){this._+=`M${this._x0=this._x1=+e},${this._y0=this._y1=+n}h${+r}v${+i}h${-r}Z`}value(){return this._||null}}class Al{constructor(){this._=[]}moveTo(e,n){this._.push([e,n])}closePath(){this._.push(this._[0].slice())}lineTo(e,n){this._.push([e,n])}value(){return this._.length?this._:null}}class g1{constructor(e,[n,r,i,o]=[0,0,960,500]){if(!((i=+i)>=(n=+n))||!((o=+o)>=(r=+r)))throw new Error("invalid bounds");this.delaunay=e,this._circumcenters=new Float64Array(e.points.length*2),this.vectors=new Float64Array(e.points.length*2),this.xmax=i,this.xmin=n,this.ymax=o,this.ymin=r,this._init()}update(){return this.delaunay.update(),this._init(),this}_init(){const{delaunay:{points:e,hull:n,triangles:r},vectors:i}=this;let o,a;const s=this.circumcenters=this._circumcenters.subarray(0,r.length/3*2);for(let g=0,m=0,y=r.length,x,v;g<y;g+=3,m+=2){const b=r[g]*2,$=r[g+1]*2,w=r[g+2]*2,S=e[b],_=e[b+1],P=e[$],D=e[$+1],A=e[w],I=e[w+1],M=P-S,T=D-_,k=A-S,E=I-_,N=(M*E-T*k)*2;if(Math.abs(N)<1e-9){if(o===void 0){o=a=0;for(const L of n)o+=e[L*2],a+=e[L*2+1];o/=n.length,a/=n.length}const O=1e9*Math.sign((o-S)*E-(a-_)*k);x=(S+A)/2-O*E,v=(_+I)/2+O*k}else{const O=1/N,L=M*M+T*T,R=k*k+E*E;x=S+(E*L-T*R)*O,v=_+(M*R-k*L)*O}s[m]=x,s[m+1]=v}let u=n[n.length-1],c,l=u*4,h,f=e[2*u],d,p=e[2*u+1];i.fill(0);for(let g=0;g<n.length;++g)u=n[g],c=l,h=f,d=p,l=u*4,f=e[2*u],p=e[2*u+1],i[c+2]=i[l]=d-p,i[c+3]=i[l+1]=f-h}render(e){const n=e==null?e=new Xn:void 0,{delaunay:{halfedges:r,inedges:i,hull:o},circumcenters:a,vectors:s}=this;if(o.length<=1)return null;for(let l=0,h=r.length;l<h;++l){const f=r[l];if(f<l)continue;const d=Math.floor(l/3)*2,p=Math.floor(f/3)*2,g=a[d],m=a[d+1],y=a[p],x=a[p+1];this._renderSegment(g,m,y,x,e)}let u,c=o[o.length-1];for(let l=0;l<o.length;++l){u=c,c=o[l];const h=Math.floor(i[c]/3)*2,f=a[h],d=a[h+1],p=u*4,g=this._project(f,d,s[p+2],s[p+3]);g&&this._renderSegment(f,d,g[0],g[1],e)}return n&&n.value()}renderBounds(e){const n=e==null?e=new Xn:void 0;return e.rect(this.xmin,this.ymin,this.xmax-this.xmin,this.ymax-this.ymin),n&&n.value()}renderCell(e,n){const r=n==null?n=new Xn:void 0,i=this._clip(e);if(i===null||!i.length)return;n.moveTo(i[0],i[1]);let o=i.length;for(;i[0]===i[o-2]&&i[1]===i[o-1]&&o>1;)o-=2;for(let a=2;a<o;a+=2)(i[a]!==i[a-2]||i[a+1]!==i[a-1])&&n.lineTo(i[a],i[a+1]);return n.closePath(),r&&r.value()}*cellPolygons(){const{delaunay:{points:e}}=this;for(let n=0,r=e.length/2;n<r;++n){const i=this.cellPolygon(n);i&&(i.index=n,yield i)}}cellPolygon(e){const n=new Al;return this.renderCell(e,n),n.value()}_renderSegment(e,n,r,i,o){let a;const s=this._regioncode(e,n),u=this._regioncode(r,i);s===0&&u===0?(o.moveTo(e,n),o.lineTo(r,i)):(a=this._clipSegment(e,n,r,i,s,u))&&(o.moveTo(a[0],a[1]),o.lineTo(a[2],a[3]))}contains(e,n,r){return n=+n,n!==n||(r=+r,r!==r)?!1:this.delaunay._step(e,n,r)===e}*neighbors(e){const n=this._clip(e);if(n)for(const r of this.delaunay.neighbors(e)){const i=this._clip(r);if(i){t:for(let o=0,a=n.length;o<a;o+=2)for(let s=0,u=i.length;s<u;s+=2)if(n[o]===i[s]&&n[o+1]===i[s+1]&&n[(o+2)%a]===i[(s+u-2)%u]&&n[(o+3)%a]===i[(s+u-1)%u]){yield r;break t}}}}_cell(e){const{circumcenters:n,delaunay:{inedges:r,halfedges:i,triangles:o}}=this,a=r[e];if(a===-1)return null;const s=[];let u=a;do{const c=Math.floor(u/3);if(s.push(n[c*2],n[c*2+1]),u=u%3===2?u-2:u+1,o[u]!==e)break;u=i[u]}while(u!==a&&u!==-1);return s}_clip(e){if(e===0&&this.delaunay.hull.length===1)return[this.xmax,this.ymin,this.xmax,this.ymax,this.xmin,this.ymax,this.xmin,this.ymin];const n=this._cell(e);if(n===null)return null;const{vectors:r}=this,i=e*4;return this._simplify(r[i]||r[i+1]?this._clipInfinite(e,n,r[i],r[i+1],r[i+2],r[i+3]):this._clipFinite(e,n))}_clipFinite(e,n){const r=n.length;let i=null,o,a,s=n[r-2],u=n[r-1],c,l=this._regioncode(s,u),h,f=0;for(let d=0;d<r;d+=2)if(o=s,a=u,s=n[d],u=n[d+1],c=l,l=this._regioncode(s,u),c===0&&l===0)h=f,f=0,i?i.push(s,u):i=[s,u];else{let p,g,m,y,x;if(c===0){if((p=this._clipSegment(o,a,s,u,c,l))===null)continue;[g,m,y,x]=p}else{if((p=this._clipSegment(s,u,o,a,l,c))===null)continue;[y,x,g,m]=p,h=f,f=this._edgecode(g,m),h&&f&&this._edge(e,h,f,i,i.length),i?i.push(g,m):i=[g,m]}h=f,f=this._edgecode(y,x),h&&f&&this._edge(e,h,f,i,i.length),i?i.push(y,x):i=[y,x]}if(i)h=f,f=this._edgecode(i[0],i[1]),h&&f&&this._edge(e,h,f,i,i.length);else if(this.contains(e,(this.xmin+this.xmax)/2,(this.ymin+this.ymax)/2))return[this.xmax,this.ymin,this.xmax,this.ymax,this.xmin,this.ymax,this.xmin,this.ymin];return i}_clipSegment(e,n,r,i,o,a){const s=o<a;for(s&&([e,n,r,i,o,a]=[r,i,e,n,a,o]);;){if(o===0&&a===0)return s?[r,i,e,n]:[e,n,r,i];if(o&a)return null;let u,c,l=o||a;l&8?(u=e+(r-e)*(this.ymax-n)/(i-n),c=this.ymax):l&4?(u=e+(r-e)*(this.ymin-n)/(i-n),c=this.ymin):l&2?(c=n+(i-n)*(this.xmax-e)/(r-e),u=this.xmax):(c=n+(i-n)*(this.xmin-e)/(r-e),u=this.xmin),o?(e=u,n=c,o=this._regioncode(e,n)):(r=u,i=c,a=this._regioncode(r,i))}}_clipInfinite(e,n,r,i,o,a){let s=Array.from(n),u;if((u=this._project(s[0],s[1],r,i))&&s.unshift(u[0],u[1]),(u=this._project(s[s.length-2],s[s.length-1],o,a))&&s.push(u[0],u[1]),s=this._clipFinite(e,s))for(let c=0,l=s.length,h,f=this._edgecode(s[l-2],s[l-1]);c<l;c+=2)h=f,f=this._edgecode(s[c],s[c+1]),h&&f&&(c=this._edge(e,h,f,s,c),l=s.length);else this.contains(e,(this.xmin+this.xmax)/2,(this.ymin+this.ymax)/2)&&(s=[this.xmin,this.ymin,this.xmax,this.ymin,this.xmax,this.ymax,this.xmin,this.ymax]);return s}_edge(e,n,r,i,o){for(;n!==r;){let a,s;switch(n){case 5:n=4;continue;case 4:n=6,a=this.xmax,s=this.ymin;break;case 6:n=2;continue;case 2:n=10,a=this.xmax,s=this.ymax;break;case 10:n=8;continue;case 8:n=9,a=this.xmin,s=this.ymax;break;case 9:n=1;continue;case 1:n=5,a=this.xmin,s=this.ymin;break}(i[o]!==a||i[o+1]!==s)&&this.contains(e,a,s)&&(i.splice(o,0,a,s),o+=2)}return o}_project(e,n,r,i){let o=1/0,a,s,u;if(i<0){if(n<=this.ymin)return null;(a=(this.ymin-n)/i)<o&&(u=this.ymin,s=e+(o=a)*r)}else if(i>0){if(n>=this.ymax)return null;(a=(this.ymax-n)/i)<o&&(u=this.ymax,s=e+(o=a)*r)}if(r>0){if(e>=this.xmax)return null;(a=(this.xmax-e)/r)<o&&(s=this.xmax,u=n+(o=a)*i)}else if(r<0){if(e<=this.xmin)return null;(a=(this.xmin-e)/r)<o&&(s=this.xmin,u=n+(o=a)*i)}return[s,u]}_edgecode(e,n){return(e===this.xmin?1:e===this.xmax?2:0)|(n===this.ymin?4:n===this.ymax?8:0)}_regioncode(e,n){return(e<this.xmin?1:e>this.xmax?2:0)|(n<this.ymin?4:n>this.ymax?8:0)}_simplify(e){if(e&&e.length>4){for(let n=0;n<e.length;n+=2){const r=(n+2)%e.length,i=(n+4)%e.length;(e[n]===e[r]&&e[r]===e[i]||e[n+1]===e[r+1]&&e[r+1]===e[i+1])&&(e.splice(r,2),n-=2)}e.length||(e=null)}return e}}const y7=2*Math.PI,zr=Math.pow;function b7(t){return t[0]}function v7(t){return t[1]}function x7(t){const{triangles:e,coords:n}=t;for(let r=0;r<e.length;r+=3){const i=2*e[r],o=2*e[r+1],a=2*e[r+2];if((n[a]-n[i])*(n[o+1]-n[i+1])-(n[o]-n[i])*(n[a+1]-n[i+1])>1e-10)return!1}return!0}function _7(t,e,n){return[t+Math.sin(t+e)*n,e+Math.cos(t-e)*n]}class Ml{static from(e,n=b7,r=v7,i){return new Ml("length"in e?w7(e,n,r,i):Float64Array.from($7(e,n,r,i)))}constructor(e){this._delaunator=new es(e),this.inedges=new Int32Array(e.length/2),this._hullIndex=new Int32Array(e.length/2),this.points=this._delaunator.coords,this._init()}update(){return this._delaunator.update(),this._init(),this}_init(){const e=this._delaunator,n=this.points;if(e.hull&&e.hull.length>2&&x7(e)){this.collinear=Int32Array.from({length:n.length/2},(f,d)=>d).sort((f,d)=>n[2*f]-n[2*d]||n[2*f+1]-n[2*d+1]);const u=this.collinear[0],c=this.collinear[this.collinear.length-1],l=[n[2*u],n[2*u+1],n[2*c],n[2*c+1]],h=1e-8*Math.hypot(l[3]-l[1],l[2]-l[0]);for(let f=0,d=n.length/2;f<d;++f){const p=_7(n[2*f],n[2*f+1],h);n[2*f]=p[0],n[2*f+1]=p[1]}this._delaunator=new es(n)}else delete this.collinear;const r=this.halfedges=this._delaunator.halfedges,i=this.hull=this._delaunator.hull,o=this.triangles=this._delaunator.triangles,a=this.inedges.fill(-1),s=this._hullIndex.fill(-1);for(let u=0,c=r.length;u<c;++u){const l=o[u%3===2?u-2:u+1];(r[u]===-1||a[l]===-1)&&(a[l]=u)}for(let u=0,c=i.length;u<c;++u)s[i[u]]=u;i.length<=2&&i.length>0&&(this.triangles=new Int32Array(3).fill(-1),this.halfedges=new Int32Array(3).fill(-1),this.triangles[0]=i[0],a[i[0]]=1,i.length===2&&(a[i[1]]=0,this.triangles[1]=i[1],this.triangles[2]=i[1]))}voronoi(e){return new g1(this,e)}*neighbors(e){const{inedges:n,hull:r,_hullIndex:i,halfedges:o,triangles:a,collinear:s}=this;if(s){const h=s.indexOf(e);h>0&&(yield s[h-1]),h<s.length-1&&(yield s[h+1]);return}const u=n[e];if(u===-1)return;let c=u,l=-1;do{if(yield l=a[c],c=c%3===2?c-2:c+1,a[c]!==e)return;if(c=o[c],c===-1){const h=r[(i[e]+1)%r.length];h!==l&&(yield h);return}}while(c!==u)}find(e,n,r=0){if(e=+e,e!==e||(n=+n,n!==n))return-1;const i=r;let o;for(;(o=this._step(r,e,n))>=0&&o!==r&&o!==i;)r=o;return o}_step(e,n,r){const{inedges:i,hull:o,_hullIndex:a,halfedges:s,triangles:u,points:c}=this;if(i[e]===-1||!c.length)return(e+1)%(c.length>>1);let l=e,h=zr(n-c[e*2],2)+zr(r-c[e*2+1],2);const f=i[e];let d=f;do{let p=u[d];const g=zr(n-c[p*2],2)+zr(r-c[p*2+1],2);if(g<h&&(h=g,l=p),d=d%3===2?d-2:d+1,u[d]!==e)break;if(d=s[d],d===-1){if(d=o[(a[e]+1)%o.length],d!==p&&zr(n-c[d*2],2)+zr(r-c[d*2+1],2)<h)return d;break}}while(d!==f);return l}render(e){const n=e==null?e=new Xn:void 0,{points:r,halfedges:i,triangles:o}=this;for(let a=0,s=i.length;a<s;++a){const u=i[a];if(u<a)continue;const c=o[a]*2,l=o[u]*2;e.moveTo(r[c],r[c+1]),e.lineTo(r[l],r[l+1])}return this.renderHull(e),n&&n.value()}renderPoints(e,n){n===void 0&&(!e||typeof e.moveTo!="function")&&(n=e,e=null),n=n==null?2:+n;const r=e==null?e=new Xn:void 0,{points:i}=this;for(let o=0,a=i.length;o<a;o+=2){const s=i[o],u=i[o+1];e.moveTo(s+n,u),e.arc(s,u,n,0,y7)}return r&&r.value()}renderHull(e){const n=e==null?e=new Xn:void 0,{hull:r,points:i}=this,o=r[0]*2,a=r.length;e.moveTo(i[o],i[o+1]);for(let s=1;s<a;++s){const u=2*r[s];e.lineTo(i[u],i[u+1])}return e.closePath(),n&&n.value()}hullPolygon(){const e=new Al;return this.renderHull(e),e.value()}renderTriangle(e,n){const r=n==null?n=new Xn:void 0,{points:i,triangles:o}=this,a=o[e*=3]*2,s=o[e+1]*2,u=o[e+2]*2;return n.moveTo(i[a],i[a+1]),n.lineTo(i[s],i[s+1]),n.lineTo(i[u],i[u+1]),n.closePath(),r&&r.value()}*trianglePolygons(){const{triangles:e}=this;for(let n=0,r=e.length/3;n<r;++n)yield this.trianglePolygon(n)}trianglePolygon(e){const n=new Al;return this.renderTriangle(e,n),n.value()}}function w7(t,e,n,r){const i=t.length,o=new Float64Array(i*2);for(let a=0;a<i;++a){const s=t[a];o[a*2]=e.call(r,s,a,t),o[a*2+1]=n.call(r,s,a,t)}return o}function*$7(t,e,n,r){let i=0;for(const o of t)yield e.call(r,o,i,t),yield n.call(r,o,i,t),++i}var m1={},Tl={},Pl=34,ji=10,Dl=13;function y1(t){return new Function("d","return {"+t.map(function(e,n){return JSON.stringify(e)+": d["+n+'] || ""'}).join(",")+"}")}function S7(t,e){var n=y1(t);return function(r,i){return e(n(r),i,t)}}function b1(t){var e=Object.create(null),n=[];return t.forEach(function(r){for(var i in r)i in e||n.push(e[i]=i)}),n}function ne(t,e){var n=t+"",r=n.length;return r<e?new Array(e-r+1).join(0)+n:n}function A7(t){return t<0?"-"+ne(-t,6):t>9999?"+"+ne(t,6):ne(t,4)}function M7(t){var e=t.getUTCHours(),n=t.getUTCMinutes(),r=t.getUTCSeconds(),i=t.getUTCMilliseconds();return isNaN(t)?"Invalid Date":A7(t.getUTCFullYear())+"-"+ne(t.getUTCMonth()+1,2)+"-"+ne(t.getUTCDate(),2)+(i?"T"+ne(e,2)+":"+ne(n,2)+":"+ne(r,2)+"."+ne(i,3)+"Z":r?"T"+ne(e,2)+":"+ne(n,2)+":"+ne(r,2)+"Z":n||e?"T"+ne(e,2)+":"+ne(n,2)+"Z":"")}function ns(t){var e=new RegExp('["'+t+`
|
6
|
+
\r]`),n=t.charCodeAt(0);function r(h,f){var d,p,g=i(h,function(m,y){if(d)return d(m,y-1);p=m,d=f?S7(m,f):y1(m)});return g.columns=p||[],g}function i(h,f){var d=[],p=h.length,g=0,m=0,y,x=p<=0,v=!1;h.charCodeAt(p-1)===ji&&--p,h.charCodeAt(p-1)===Dl&&--p;function b(){if(x)return Tl;if(v)return v=!1,m1;var w,S=g,_;if(h.charCodeAt(S)===Pl){for(;g++<p&&h.charCodeAt(g)!==Pl||h.charCodeAt(++g)===Pl;);return(w=g)>=p?x=!0:(_=h.charCodeAt(g++))===ji?v=!0:_===Dl&&(v=!0,h.charCodeAt(g)===ji&&++g),h.slice(S+1,w-1).replace(/""/g,'"')}for(;g<p;){if((_=h.charCodeAt(w=g++))===ji)v=!0;else if(_===Dl)v=!0,h.charCodeAt(g)===ji&&++g;else if(_!==n)continue;return h.slice(S,w)}return x=!0,h.slice(S,p)}for(;(y=b())!==Tl;){for(var $=[];y!==m1&&y!==Tl;)$.push(y),y=b();f&&($=f($,m++))==null||d.push($)}return d}function o(h,f){return h.map(function(d){return f.map(function(p){return l(d[p])}).join(t)})}function a(h,f){return f==null&&(f=b1(h)),[f.map(l).join(t)].concat(o(h,f)).join(`
|
7
7
|
`)}function s(h,f){return f==null&&(f=b1(h)),o(h,f).join(`
|
8
8
|
`)}function u(h){return h.map(c).join(`
|
9
|
-
`)}function c(h){return h.map(l).join(t)}function l(h){return h==null?"":h instanceof Date?M7(h):e.test(h+="")?'"'+h.replace(/"/g,'""')+'"':h}return{parse:r,parseRows:i,format:a,formatBody:s,formatRows:u,formatRow:c,formatValue:l}}var Xn=es(","),v1=Xn.parse,T7=Xn.parseRows,P7=Xn.format,D7=Xn.formatBody,E7=Xn.formatRows,k7=Xn.formatRow,L7=Xn.formatValue,Vn=es(" "),x1=Vn.parse,C7=Vn.parseRows,R7=Vn.format,I7=Vn.formatBody,N7=Vn.formatRows,F7=Vn.formatRow,G7=Vn.formatValue;function z7(t){for(var e in t){var n=t[e].trim(),r,i;if(!n)n=null;else if(n==="true")n=!0;else if(n==="false")n=!1;else if(n==="NaN")n=NaN;else if(!isNaN(r=+n))n=r;else if(i=n.match(/^([-+]\d{2})?\d{4}(-\d{2}(-\d{2})?)?(T\d{2}:\d{2}(:\d{2}(\.\d{3})?)?(Z|[-+]\d{2}:\d{2})?)?$/))O7&&i[4]&&!i[7]&&(n=n.replace(/-/g,"/").replace(/T/," ")),n=new Date(n);else continue;t[e]=n}return t}const O7=new Date("2019-01-01T00:00").getHours()||new Date("2019-07-01T00:00").getHours();function U7(t){if(!t.ok)throw new Error(t.status+" "+t.statusText);return t.blob()}function B7(t,e){return fetch(t,e).then(U7)}function Y7(t){if(!t.ok)throw new Error(t.status+" "+t.statusText);return t.arrayBuffer()}function W7(t,e){return fetch(t,e).then(Y7)}function H7(t){if(!t.ok)throw new Error(t.status+" "+t.statusText);return t.text()}function ns(t,e){return fetch(t,e).then(H7)}function _1(t){return function(e,n,r){return arguments.length===2&&typeof n=="function"&&(r=n,n=void 0),ns(e,n).then(function(i){return t(i,r)})}}function q7(t,e,n,r){arguments.length===3&&typeof n=="function"&&(r=n,n=void 0);var i=es(t);return ns(e,n).then(function(o){return i.parse(o,r)})}var X7=_1(v1),V7=_1(x1);function j7(t,e){return new Promise(function(n,r){var i=new Image;for(var o in e)i[o]=e[o];i.onerror=r,i.onload=function(){n(i)},i.src=t})}function Z7(t){if(!t.ok)throw new Error(t.status+" "+t.statusText);if(!(t.status===204||t.status===205))return t.json()}function K7(t,e){return fetch(t,e).then(Z7)}function El(t){return(e,n)=>ns(e,n).then(r=>new DOMParser().parseFromString(r,t))}const Q7=El("application/xml");var J7=El("text/html"),t9=El("image/svg+xml");function e9(t,e){var n,r=1;t==null&&(t=0),e==null&&(e=0);function i(){var o,a=n.length,s,u=0,c=0;for(o=0;o<a;++o)s=n[o],u+=s.x,c+=s.y;for(u=(u/a-t)*r,c=(c/a-e)*r,o=0;o<a;++o)s=n[o],s.x-=u,s.y-=c}return i.initialize=function(o){n=o},i.x=function(o){return arguments.length?(t=+o,i):t},i.y=function(o){return arguments.length?(e=+o,i):e},i.strength=function(o){return arguments.length?(r=+o,i):r},i}function n9(t){const e=+this._x.call(null,t),n=+this._y.call(null,t);return w1(this.cover(e,n),e,n,t)}function w1(t,e,n,r){if(isNaN(e)||isNaN(n))return t;var i,o=t._root,a={data:r},s=t._x0,u=t._y0,c=t._x1,l=t._y1,h,f,d,p,g,m,y,_;if(!o)return t._root=a,t;for(;o.length;)if((g=e>=(h=(s+c)/2))?s=h:c=h,(m=n>=(f=(u+l)/2))?u=f:l=f,i=o,!(o=o[y=m<<1|g]))return i[y]=a,t;if(d=+t._x.call(null,o.data),p=+t._y.call(null,o.data),e===d&&n===p)return a.next=o,i?i[y]=a:t._root=a,t;do i=i?i[y]=new Array(4):t._root=new Array(4),(g=e>=(h=(s+c)/2))?s=h:c=h,(m=n>=(f=(u+l)/2))?u=f:l=f;while((y=m<<1|g)===(_=(p>=f)<<1|d>=h));return i[_]=o,i[y]=a,t}function r9(t){var e,n,r=t.length,i,o,a=new Array(r),s=new Array(r),u=1/0,c=1/0,l=-1/0,h=-1/0;for(n=0;n<r;++n)isNaN(i=+this._x.call(null,e=t[n]))||isNaN(o=+this._y.call(null,e))||(a[n]=i,s[n]=o,i<u&&(u=i),i>l&&(l=i),o<c&&(c=o),o>h&&(h=o));if(u>l||c>h)return this;for(this.cover(u,c).cover(l,h),n=0;n<r;++n)w1(this,a[n],s[n],t[n]);return this}function i9(t,e){if(isNaN(t=+t)||isNaN(e=+e))return this;var n=this._x0,r=this._y0,i=this._x1,o=this._y1;if(isNaN(n))i=(n=Math.floor(t))+1,o=(r=Math.floor(e))+1;else{for(var a=i-n||1,s=this._root,u,c;n>t||t>=i||r>e||e>=o;)switch(c=(e<r)<<1|t<n,u=new Array(4),u[c]=s,s=u,a*=2,c){case 0:i=n+a,o=r+a;break;case 1:n=i-a,o=r+a;break;case 2:i=n+a,r=o-a;break;case 3:n=i-a,r=o-a;break}this._root&&this._root.length&&(this._root=s)}return this._x0=n,this._y0=r,this._x1=i,this._y1=o,this}function o9(){var t=[];return this.visit(function(e){if(!e.length)do t.push(e.data);while(e=e.next)}),t}function a9(t){return arguments.length?this.cover(+t[0][0],+t[0][1]).cover(+t[1][0],+t[1][1]):isNaN(this._x0)?void 0:[[this._x0,this._y0],[this._x1,this._y1]]}function Ht(t,e,n,r,i){this.node=t,this.x0=e,this.y0=n,this.x1=r,this.y1=i}function s9(t,e,n){var r,i=this._x0,o=this._y0,a,s,u,c,l=this._x1,h=this._y1,f=[],d=this._root,p,g;for(d&&f.push(new Ht(d,i,o,l,h)),n==null?n=1/0:(i=t-n,o=e-n,l=t+n,h=e+n,n*=n);p=f.pop();)if(!(!(d=p.node)||(a=p.x0)>l||(s=p.y0)>h||(u=p.x1)<i||(c=p.y1)<o))if(d.length){var m=(a+u)/2,y=(s+c)/2;f.push(new Ht(d[3],m,y,u,c),new Ht(d[2],a,y,m,c),new Ht(d[1],m,s,u,y),new Ht(d[0],a,s,m,y)),(g=(e>=y)<<1|t>=m)&&(p=f[f.length-1],f[f.length-1]=f[f.length-1-g],f[f.length-1-g]=p)}else{var _=t-+this._x.call(null,d.data),x=e-+this._y.call(null,d.data),b=_*_+x*x;if(b<n){var $=Math.sqrt(n=b);i=t-$,o=e-$,l=t+$,h=e+$,r=d.data}}return r}function u9(t){if(isNaN(l=+this._x.call(null,t))||isNaN(h=+this._y.call(null,t)))return this;var e,n=this._root,r,i,o,a=this._x0,s=this._y0,u=this._x1,c=this._y1,l,h,f,d,p,g,m,y;if(!n)return this;if(n.length)for(;;){if((p=l>=(f=(a+u)/2))?a=f:u=f,(g=h>=(d=(s+c)/2))?s=d:c=d,e=n,!(n=n[m=g<<1|p]))return this;if(!n.length)break;(e[m+1&3]||e[m+2&3]||e[m+3&3])&&(r=e,y=m)}for(;n.data!==t;)if(i=n,!(n=n.next))return this;return(o=n.next)&&delete n.next,i?(o?i.next=o:delete i.next,this):e?(o?e[m]=o:delete e[m],(n=e[0]||e[1]||e[2]||e[3])&&n===(e[3]||e[2]||e[1]||e[0])&&!n.length&&(r?r[y]=n:this._root=n),this):(this._root=o,this)}function c9(t){for(var e=0,n=t.length;e<n;++e)this.remove(t[e]);return this}function l9(){return this._root}function f9(){var t=0;return this.visit(function(e){if(!e.length)do++t;while(e=e.next)}),t}function h9(t){var e=[],n,r=this._root,i,o,a,s,u;for(r&&e.push(new Ht(r,this._x0,this._y0,this._x1,this._y1));n=e.pop();)if(!t(r=n.node,o=n.x0,a=n.y0,s=n.x1,u=n.y1)&&r.length){var c=(o+s)/2,l=(a+u)/2;(i=r[3])&&e.push(new Ht(i,c,l,s,u)),(i=r[2])&&e.push(new Ht(i,o,l,c,u)),(i=r[1])&&e.push(new Ht(i,c,a,s,l)),(i=r[0])&&e.push(new Ht(i,o,a,c,l))}return this}function d9(t){var e=[],n=[],r;for(this._root&&e.push(new Ht(this._root,this._x0,this._y0,this._x1,this._y1));r=e.pop();){var i=r.node;if(i.length){var o,a=r.x0,s=r.y0,u=r.x1,c=r.y1,l=(a+u)/2,h=(s+c)/2;(o=i[0])&&e.push(new Ht(o,a,s,l,h)),(o=i[1])&&e.push(new Ht(o,l,s,u,h)),(o=i[2])&&e.push(new Ht(o,a,h,l,c)),(o=i[3])&&e.push(new Ht(o,l,h,u,c))}n.push(r)}for(;r=n.pop();)t(r.node,r.x0,r.y0,r.x1,r.y1);return this}function p9(t){return t[0]}function g9(t){return arguments.length?(this._x=t,this):this._x}function m9(t){return t[1]}function y9(t){return arguments.length?(this._y=t,this):this._y}function rs(t,e,n){var r=new kl(e??p9,n??m9,NaN,NaN,NaN,NaN);return t==null?r:r.addAll(t)}function kl(t,e,n,r,i,o){this._x=t,this._y=e,this._x0=n,this._y0=r,this._x1=i,this._y1=o,this._root=void 0}function $1(t){for(var e={data:t.data},n=e;t=t.next;)n=n.next={data:t.data};return e}var qt=rs.prototype=kl.prototype;qt.copy=function(){var t=new kl(this._x,this._y,this._x0,this._y0,this._x1,this._y1),e=this._root,n,r;if(!e)return t;if(!e.length)return t._root=$1(e),t;for(n=[{source:e,target:t._root=new Array(4)}];e=n.pop();)for(var i=0;i<4;++i)(r=e.source[i])&&(r.length?n.push({source:r,target:e.target[i]=new Array(4)}):e.target[i]=$1(r));return t},qt.add=n9,qt.addAll=r9,qt.cover=i9,qt.data=o9,qt.extent=a9,qt.find=s9,qt.remove=u9,qt.removeAll=c9,qt.root=l9,qt.size=f9,qt.visit=h9,qt.visitAfter=d9,qt.x=g9,qt.y=y9;function Et(t){return function(){return t}}function gn(t){return(t()-.5)*1e-6}function b9(t){return t.x+t.vx}function v9(t){return t.y+t.vy}function S1(t){var e,n,r,i=1,o=1;typeof t!="function"&&(t=Et(t==null?1:+t));function a(){for(var c,l=e.length,h,f,d,p,g,m,y=0;y<o;++y)for(h=rs(e,b9,v9).visitAfter(s),c=0;c<l;++c)f=e[c],g=n[f.index],m=g*g,d=f.x+f.vx,p=f.y+f.vy,h.visit(_);function _(x,b,$,v,w){var S=x.data,D=x.r,E=g+D;if(S){if(S.index>f.index){var T=d-S.x-S.vx,F=p-S.y-S.vy,M=T*T+F*F;M<E*E&&(T===0&&(T=gn(r),M+=T*T),F===0&&(F=gn(r),M+=F*F),M=(E-(M=Math.sqrt(M)))/M*i,f.vx+=(T*=M)*(E=(D*=D)/(m+D)),f.vy+=(F*=M)*E,S.vx-=T*(E=1-E),S.vy-=F*E)}return}return b>d+E||v<d-E||$>p+E||w<p-E}}function s(c){if(c.data)return c.r=n[c.data.index];for(var l=c.r=0;l<4;++l)c[l]&&c[l].r>c.r&&(c.r=c[l].r)}function u(){if(e){var c,l=e.length,h;for(n=new Array(l),c=0;c<l;++c)h=e[c],n[h.index]=+t(h,c,e)}}return a.initialize=function(c,l){e=c,r=l,u()},a.iterations=function(c){return arguments.length?(o=+c,a):o},a.strength=function(c){return arguments.length?(i=+c,a):i},a.radius=function(c){return arguments.length?(t=typeof c=="function"?c:Et(+c),u(),a):t},a}function x9(t){return t.index}function A1(t,e){var n=t.get(e);if(!n)throw new Error("node not found: "+e);return n}function _9(t){var e=x9,n=h,r,i=Et(30),o,a,s,u,c,l=1;t==null&&(t=[]);function h(m){return 1/Math.min(s[m.source.index],s[m.target.index])}function f(m){for(var y=0,_=t.length;y<l;++y)for(var x=0,b,$,v,w,S,D,E;x<_;++x)b=t[x],$=b.source,v=b.target,w=v.x+v.vx-$.x-$.vx||gn(c),S=v.y+v.vy-$.y-$.vy||gn(c),D=Math.sqrt(w*w+S*S),D=(D-o[x])/D*m*r[x],w*=D,S*=D,v.vx-=w*(E=u[x]),v.vy-=S*E,$.vx+=w*(E=1-E),$.vy+=S*E}function d(){if(a){var m,y=a.length,_=t.length,x=new Map(a.map(($,v)=>[e($,v,a),$])),b;for(m=0,s=new Array(y);m<_;++m)b=t[m],b.index=m,typeof b.source!="object"&&(b.source=A1(x,b.source)),typeof b.target!="object"&&(b.target=A1(x,b.target)),s[b.source.index]=(s[b.source.index]||0)+1,s[b.target.index]=(s[b.target.index]||0)+1;for(m=0,u=new Array(_);m<_;++m)b=t[m],u[m]=s[b.source.index]/(s[b.source.index]+s[b.target.index]);r=new Array(_),p(),o=new Array(_),g()}}function p(){if(a)for(var m=0,y=t.length;m<y;++m)r[m]=+n(t[m],m,t)}function g(){if(a)for(var m=0,y=t.length;m<y;++m)o[m]=+i(t[m],m,t)}return f.initialize=function(m,y){a=m,c=y,d()},f.links=function(m){return arguments.length?(t=m,d(),f):t},f.id=function(m){return arguments.length?(e=m,f):e},f.iterations=function(m){return arguments.length?(l=+m,f):l},f.strength=function(m){return arguments.length?(n=typeof m=="function"?m:Et(+m),p(),f):n},f.distance=function(m){return arguments.length?(i=typeof m=="function"?m:Et(+m),g(),f):i},f}const w9=1664525,$9=1013904223,M1=4294967296;function S9(){let t=1;return()=>(t=(w9*t+$9)%M1)/M1}function A9(t){return t.x}function M9(t){return t.y}var T9=10,P9=Math.PI*(3-Math.sqrt(5));function T1(t){var e,n=1,r=.001,i=1-Math.pow(r,1/300),o=0,a=.6,s=new Map,u=Ya(h),c=Rn("tick","end"),l=S9();t==null&&(t=[]);function h(){f(),c.call("tick",e),n<r&&(u.stop(),c.call("end",e))}function f(g){var m,y=t.length,_;g===void 0&&(g=1);for(var x=0;x<g;++x)for(n+=(o-n)*i,s.forEach(function(b){b(n)}),m=0;m<y;++m)_=t[m],_.fx==null?_.x+=_.vx*=a:(_.x=_.fx,_.vx=0),_.fy==null?_.y+=_.vy*=a:(_.y=_.fy,_.vy=0);return e}function d(){for(var g=0,m=t.length,y;g<m;++g){if(y=t[g],y.index=g,y.fx!=null&&(y.x=y.fx),y.fy!=null&&(y.y=y.fy),isNaN(y.x)||isNaN(y.y)){var _=T9*Math.sqrt(.5+g),x=g*P9;y.x=_*Math.cos(x),y.y=_*Math.sin(x)}(isNaN(y.vx)||isNaN(y.vy))&&(y.vx=y.vy=0)}}function p(g){return g.initialize&&g.initialize(t,l),g}return d(),e={tick:f,restart:function(){return u.restart(h),e},stop:function(){return u.stop(),e},nodes:function(g){return arguments.length?(t=g,d(),s.forEach(p),e):t},alpha:function(g){return arguments.length?(n=+g,e):n},alphaMin:function(g){return arguments.length?(r=+g,e):r},alphaDecay:function(g){return arguments.length?(i=+g,e):+i},alphaTarget:function(g){return arguments.length?(o=+g,e):o},velocityDecay:function(g){return arguments.length?(a=1-g,e):1-a},randomSource:function(g){return arguments.length?(l=g,s.forEach(p),e):l},force:function(g,m){return arguments.length>1?(m==null?s.delete(g):s.set(g,p(m)),e):s.get(g)},find:function(g,m,y){var _=0,x=t.length,b,$,v,w,S;for(y==null?y=1/0:y*=y,_=0;_<x;++_)w=t[_],b=g-w.x,$=m-w.y,v=b*b+$*$,v<y&&(S=w,y=v);return S},on:function(g,m){return arguments.length>1?(c.on(g,m),e):c.on(g)}}}function P1(){var t,e,n,r,i=Et(-30),o,a=1,s=1/0,u=.81;function c(d){var p,g=t.length,m=rs(t,A9,M9).visitAfter(h);for(r=d,p=0;p<g;++p)e=t[p],m.visit(f)}function l(){if(t){var d,p=t.length,g;for(o=new Array(p),d=0;d<p;++d)g=t[d],o[g.index]=+i(g,d,t)}}function h(d){var p=0,g,m,y=0,_,x,b;if(d.length){for(_=x=b=0;b<4;++b)(g=d[b])&&(m=Math.abs(g.value))&&(p+=g.value,y+=m,_+=m*g.x,x+=m*g.y);d.x=_/y,d.y=x/y}else{g=d,g.x=g.data.x,g.y=g.data.y;do p+=o[g.data.index];while(g=g.next)}d.value=p}function f(d,p,g,m){if(!d.value)return!0;var y=d.x-e.x,_=d.y-e.y,x=m-p,b=y*y+_*_;if(x*x/u<b)return b<s&&(y===0&&(y=gn(n),b+=y*y),_===0&&(_=gn(n),b+=_*_),b<a&&(b=Math.sqrt(a*b)),e.vx+=y*d.value*r/b,e.vy+=_*d.value*r/b),!0;if(d.length||b>=s)return;(d.data!==e||d.next)&&(y===0&&(y=gn(n),b+=y*y),_===0&&(_=gn(n),b+=_*_),b<a&&(b=Math.sqrt(a*b)));do d.data!==e&&(x=o[d.data.index]*r/b,e.vx+=y*x,e.vy+=_*x);while(d=d.next)}return c.initialize=function(d,p){t=d,n=p,l()},c.strength=function(d){return arguments.length?(i=typeof d=="function"?d:Et(+d),l(),c):i},c.distanceMin=function(d){return arguments.length?(a=d*d,c):Math.sqrt(a)},c.distanceMax=function(d){return arguments.length?(s=d*d,c):Math.sqrt(s)},c.theta=function(d){return arguments.length?(u=d*d,c):Math.sqrt(u)},c}function D9(t,e,n){var r,i=Et(.1),o,a;typeof t!="function"&&(t=Et(+t)),e==null&&(e=0),n==null&&(n=0);function s(c){for(var l=0,h=r.length;l<h;++l){var f=r[l],d=f.x-e||1e-6,p=f.y-n||1e-6,g=Math.sqrt(d*d+p*p),m=(a[l]-g)*o[l]*c/g;f.vx+=d*m,f.vy+=p*m}}function u(){if(r){var c,l=r.length;for(o=new Array(l),a=new Array(l),c=0;c<l;++c)a[c]=+t(r[c],c,r),o[c]=isNaN(a[c])?0:+i(r[c],c,r)}}return s.initialize=function(c){r=c,u()},s.strength=function(c){return arguments.length?(i=typeof c=="function"?c:Et(+c),u(),s):i},s.radius=function(c){return arguments.length?(t=typeof c=="function"?c:Et(+c),u(),s):t},s.x=function(c){return arguments.length?(e=+c,s):e},s.y=function(c){return arguments.length?(n=+c,s):n},s}function D1(t){var e=Et(.1),n,r,i;typeof t!="function"&&(t=Et(t==null?0:+t));function o(s){for(var u=0,c=n.length,l;u<c;++u)l=n[u],l.vx+=(i[u]-l.x)*r[u]*s}function a(){if(n){var s,u=n.length;for(r=new Array(u),i=new Array(u),s=0;s<u;++s)r[s]=isNaN(i[s]=+t(n[s],s,n))?0:+e(n[s],s,n)}}return o.initialize=function(s){n=s,a()},o.strength=function(s){return arguments.length?(e=typeof s=="function"?s:Et(+s),a(),o):e},o.x=function(s){return arguments.length?(t=typeof s=="function"?s:Et(+s),a(),o):t},o}function E1(t){var e=Et(.1),n,r,i;typeof t!="function"&&(t=Et(t==null?0:+t));function o(s){for(var u=0,c=n.length,l;u<c;++u)l=n[u],l.vy+=(i[u]-l.y)*r[u]*s}function a(){if(n){var s,u=n.length;for(r=new Array(u),i=new Array(u),s=0;s<u;++s)r[s]=isNaN(i[s]=+t(n[s],s,n))?0:+e(n[s],s,n)}}return o.initialize=function(s){n=s,a()},o.strength=function(s){return arguments.length?(e=typeof s=="function"?s:Et(+s),a(),o):e},o.y=function(s){return arguments.length?(t=typeof s=="function"?s:Et(+s),a(),o):t},o}function E9(t){return Math.abs(t=Math.round(t))>=1e21?t.toLocaleString("en").replace(/,/g,""):t.toString(10)}function is(t,e){if((n=(t=e?t.toExponential(e-1):t.toExponential()).indexOf("e"))<0)return null;var n,r=t.slice(0,n);return[r.length>1?r[0]+r.slice(2):r,+t.slice(n+1)]}function zr(t){return t=is(Math.abs(t)),t?t[1]:NaN}function k9(t,e){return function(n,r){for(var i=n.length,o=[],a=0,s=t[0],u=0;i>0&&s>0&&(u+s+1>r&&(s=Math.max(1,r-u)),o.push(n.substring(i-=s,i+s)),!((u+=s+1)>r));)s=t[a=(a+1)%t.length];return o.reverse().join(e)}}function L9(t){return function(e){return e.replace(/[0-9]/g,function(n){return t[+n]})}}var C9=/^(?:(.)?([<>=^]))?([+\-( ])?([$#])?(0)?(\d+)?(,)?(\.\d+)?(~)?([a-z%])?$/i;function Or(t){if(!(e=C9.exec(t)))throw new Error("invalid format: "+t);var e;return new os({fill:e[1],align:e[2],sign:e[3],symbol:e[4],zero:e[5],width:e[6],comma:e[7],precision:e[8]&&e[8].slice(1),trim:e[9],type:e[10]})}Or.prototype=os.prototype;function os(t){this.fill=t.fill===void 0?" ":t.fill+"",this.align=t.align===void 0?">":t.align+"",this.sign=t.sign===void 0?"-":t.sign+"",this.symbol=t.symbol===void 0?"":t.symbol+"",this.zero=!!t.zero,this.width=t.width===void 0?void 0:+t.width,this.comma=!!t.comma,this.precision=t.precision===void 0?void 0:+t.precision,this.trim=!!t.trim,this.type=t.type===void 0?"":t.type+""}os.prototype.toString=function(){return this.fill+this.align+this.sign+this.symbol+(this.zero?"0":"")+(this.width===void 0?"":Math.max(1,this.width|0))+(this.comma?",":"")+(this.precision===void 0?"":"."+Math.max(0,this.precision|0))+(this.trim?"~":"")+this.type};function R9(t){t:for(var e=t.length,n=1,r=-1,i;n<e;++n)switch(t[n]){case".":r=i=n;break;case"0":r===0&&(r=n),i=n;break;default:if(!+t[n])break t;r>0&&(r=0);break}return r>0?t.slice(0,r)+t.slice(i+1):t}var k1;function I9(t,e){var n=is(t,e);if(!n)return t+"";var r=n[0],i=n[1],o=i-(k1=Math.max(-8,Math.min(8,Math.floor(i/3)))*3)+1,a=r.length;return o===a?r:o>a?r+new Array(o-a+1).join("0"):o>0?r.slice(0,o)+"."+r.slice(o):"0."+new Array(1-o).join("0")+is(t,Math.max(0,e+o-1))[0]}function L1(t,e){var n=is(t,e);if(!n)return t+"";var r=n[0],i=n[1];return i<0?"0."+new Array(-i).join("0")+r:r.length>i+1?r.slice(0,i+1)+"."+r.slice(i+1):r+new Array(i-r.length+2).join("0")}const C1={"%":(t,e)=>(t*100).toFixed(e),b:t=>Math.round(t).toString(2),c:t=>t+"",d:E9,e:(t,e)=>t.toExponential(e),f:(t,e)=>t.toFixed(e),g:(t,e)=>t.toPrecision(e),o:t=>Math.round(t).toString(8),p:(t,e)=>L1(t*100,e),r:L1,s:I9,X:t=>Math.round(t).toString(16).toUpperCase(),x:t=>Math.round(t).toString(16)};function R1(t){return t}var I1=Array.prototype.map,N1=["y","z","a","f","p","n","µ","m","","k","M","G","T","P","E","Z","Y"];function F1(t){var e=t.grouping===void 0||t.thousands===void 0?R1:k9(I1.call(t.grouping,Number),t.thousands+""),n=t.currency===void 0?"":t.currency[0]+"",r=t.currency===void 0?"":t.currency[1]+"",i=t.decimal===void 0?".":t.decimal+"",o=t.numerals===void 0?R1:L9(I1.call(t.numerals,String)),a=t.percent===void 0?"%":t.percent+"",s=t.minus===void 0?"−":t.minus+"",u=t.nan===void 0?"NaN":t.nan+"";function c(h){h=Or(h);var f=h.fill,d=h.align,p=h.sign,g=h.symbol,m=h.zero,y=h.width,_=h.comma,x=h.precision,b=h.trim,$=h.type;$==="n"?(_=!0,$="g"):C1[$]||(x===void 0&&(x=12),b=!0,$="g"),(m||f==="0"&&d==="=")&&(m=!0,f="0",d="=");var v=g==="$"?n:g==="#"&&/[boxX]/.test($)?"0"+$.toLowerCase():"",w=g==="$"?r:/[%p]/.test($)?a:"",S=C1[$],D=/[defgprs%]/.test($);x=x===void 0?6:/[gprs]/.test($)?Math.max(1,Math.min(21,x)):Math.max(0,Math.min(20,x));function E(T){var F=v,M=w,A,L,P;if($==="c")M=S(T)+M,T="";else{T=+T;var I=T<0||1/T<0;if(T=isNaN(T)?u:S(Math.abs(T),x),b&&(T=R9(T)),I&&+T==0&&p!=="+"&&(I=!1),F=(I?p==="("?p:s:p==="-"||p==="("?"":p)+F,M=($==="s"?N1[8+k1/3]:"")+M+(I&&p==="("?")":""),D){for(A=-1,L=T.length;++A<L;)if(P=T.charCodeAt(A),48>P||P>57){M=(P===46?i+T.slice(A+1):T.slice(A))+M,T=T.slice(0,A);break}}}_&&!m&&(T=e(T,1/0));var z=F.length+T.length+M.length,k=z<y?new Array(y-z+1).join(f):"";switch(_&&m&&(T=e(k+T,k.length?y-M.length:1/0),k=""),d){case"<":T=F+T+M+k;break;case"=":T=F+k+T+M;break;case"^":T=k.slice(0,z=k.length>>1)+F+T+M+k.slice(z);break;default:T=k+F+T+M;break}return o(T)}return E.toString=function(){return h+""},E}function l(h,f){var d=c((h=Or(h),h.type="f",h)),p=Math.max(-8,Math.min(8,Math.floor(zr(f)/3)))*3,g=Math.pow(10,-p),m=N1[8+p/3];return function(y){return d(g*y)+m}}return{format:c,formatPrefix:l}}var as,ji,Ll;G1({thousands:",",grouping:[3],currency:["$",""]});function G1(t){return as=F1(t),ji=as.format,Ll=as.formatPrefix,as}function z1(t){return Math.max(0,-zr(Math.abs(t)))}function O1(t,e){return Math.max(0,Math.max(-8,Math.min(8,Math.floor(zr(e)/3)))*3-zr(Math.abs(t)))}function U1(t,e){return t=Math.abs(t),e=Math.abs(e)-t,Math.max(0,zr(e)-zr(t))+1}var tt=1e-6,Zi=1e-12,ct=Math.PI,St=ct/2,ss=ct/4,Xt=ct*2,yt=180/ct,et=ct/180,ft=Math.abs,Ur=Math.atan,Vt=Math.atan2,K=Math.cos,us=Math.ceil,B1=Math.exp,Cl=Math.hypot,cs=Math.log,Rl=Math.pow,j=Math.sin,he=Math.sign||function(t){return t>0?1:t<0?-1:0},Ct=Math.sqrt,Il=Math.tan;function Y1(t){return t>1?0:t<-1?ct:Math.acos(t)}function jt(t){return t>1?St:t<-1?-St:Math.asin(t)}function W1(t){return(t=j(t/2))*t}function wt(){}function ls(t,e){t&&q1.hasOwnProperty(t.type)&&q1[t.type](t,e)}var H1={Feature:function(t,e){ls(t.geometry,e)},FeatureCollection:function(t,e){for(var n=t.features,r=-1,i=n.length;++r<i;)ls(n[r].geometry,e)}},q1={Sphere:function(t,e){e.sphere()},Point:function(t,e){t=t.coordinates,e.point(t[0],t[1],t[2])},MultiPoint:function(t,e){for(var n=t.coordinates,r=-1,i=n.length;++r<i;)t=n[r],e.point(t[0],t[1],t[2])},LineString:function(t,e){Nl(t.coordinates,e,0)},MultiLineString:function(t,e){for(var n=t.coordinates,r=-1,i=n.length;++r<i;)Nl(n[r],e,0)},Polygon:function(t,e){X1(t.coordinates,e)},MultiPolygon:function(t,e){for(var n=t.coordinates,r=-1,i=n.length;++r<i;)X1(n[r],e)},GeometryCollection:function(t,e){for(var n=t.geometries,r=-1,i=n.length;++r<i;)ls(n[r],e)}};function Nl(t,e,n){var r=-1,i=t.length-n,o;for(e.lineStart();++r<i;)o=t[r],e.point(o[0],o[1],o[2]);e.lineEnd()}function X1(t,e){var n=-1,r=t.length;for(e.polygonStart();++n<r;)Nl(t[n],e,1);e.polygonEnd()}function Pe(t,e){t&&H1.hasOwnProperty(t.type)?H1[t.type](t,e):ls(t,e)}var fs=new Dt,hs=new Dt,V1,j1,Fl,Gl,zl,Ne={point:wt,lineStart:wt,lineEnd:wt,polygonStart:function(){fs=new Dt,Ne.lineStart=N9,Ne.lineEnd=F9},polygonEnd:function(){var t=+fs;hs.add(t<0?Xt+t:t),this.lineStart=this.lineEnd=this.point=wt},sphere:function(){hs.add(Xt)}};function N9(){Ne.point=G9}function F9(){Z1(V1,j1)}function G9(t,e){Ne.point=Z1,V1=t,j1=e,t*=et,e*=et,Fl=t,Gl=K(e=e/2+ss),zl=j(e)}function Z1(t,e){t*=et,e*=et,e=e/2+ss;var n=t-Fl,r=n>=0?1:-1,i=r*n,o=K(e),a=j(e),s=zl*a,u=Gl*o+s*K(i),c=s*r*j(i);fs.add(Vt(c,u)),Fl=t,Gl=o,zl=a}function z9(t){return hs=new Dt,Pe(t,Ne),hs*2}function ds(t){return[Vt(t[1],t[0]),jt(t[2])]}function jn(t){var e=t[0],n=t[1],r=K(n);return[r*K(e),r*j(e),j(n)]}function ps(t,e){return t[0]*e[0]+t[1]*e[1]+t[2]*e[2]}function Br(t,e){return[t[1]*e[2]-t[2]*e[1],t[2]*e[0]-t[0]*e[2],t[0]*e[1]-t[1]*e[0]]}function Ol(t,e){t[0]+=e[0],t[1]+=e[1],t[2]+=e[2]}function gs(t,e){return[t[0]*e,t[1]*e,t[2]*e]}function ms(t){var e=Ct(t[0]*t[0]+t[1]*t[1]+t[2]*t[2]);t[0]/=e,t[1]/=e,t[2]/=e}var $t,re,At,se,Zn,K1,Q1,Yr,Ki,mn,Ke,Qe={point:Ul,lineStart:tm,lineEnd:em,polygonStart:function(){Qe.point=nm,Qe.lineStart=O9,Qe.lineEnd=U9,Ki=new Dt,Ne.polygonStart()},polygonEnd:function(){Ne.polygonEnd(),Qe.point=Ul,Qe.lineStart=tm,Qe.lineEnd=em,fs<0?($t=-(At=180),re=-(se=90)):Ki>tt?se=90:Ki<-tt&&(re=-90),Ke[0]=$t,Ke[1]=At},sphere:function(){$t=-(At=180),re=-(se=90)}};function Ul(t,e){mn.push(Ke=[$t=t,At=t]),e<re&&(re=e),e>se&&(se=e)}function J1(t,e){var n=jn([t*et,e*et]);if(Yr){var r=Br(Yr,n),i=[r[1],-r[0],0],o=Br(i,r);ms(o),o=ds(o);var a=t-Zn,s=a>0?1:-1,u=o[0]*yt*s,c,l=ft(a)>180;l^(s*Zn<u&&u<s*t)?(c=o[1]*yt,c>se&&(se=c)):(u=(u+360)%360-180,l^(s*Zn<u&&u<s*t)?(c=-o[1]*yt,c<re&&(re=c)):(e<re&&(re=e),e>se&&(se=e))),l?t<Zn?ue($t,t)>ue($t,At)&&(At=t):ue(t,At)>ue($t,At)&&($t=t):At>=$t?(t<$t&&($t=t),t>At&&(At=t)):t>Zn?ue($t,t)>ue($t,At)&&(At=t):ue(t,At)>ue($t,At)&&($t=t)}else mn.push(Ke=[$t=t,At=t]);e<re&&(re=e),e>se&&(se=e),Yr=n,Zn=t}function tm(){Qe.point=J1}function em(){Ke[0]=$t,Ke[1]=At,Qe.point=Ul,Yr=null}function nm(t,e){if(Yr){var n=t-Zn;Ki.add(ft(n)>180?n+(n>0?360:-360):n)}else K1=t,Q1=e;Ne.point(t,e),J1(t,e)}function O9(){Ne.lineStart()}function U9(){nm(K1,Q1),Ne.lineEnd(),ft(Ki)>tt&&($t=-(At=180)),Ke[0]=$t,Ke[1]=At,Yr=null}function ue(t,e){return(e-=t)<0?e+360:e}function B9(t,e){return t[0]-e[0]}function rm(t,e){return t[0]<=t[1]?t[0]<=e&&e<=t[1]:e<t[0]||t[1]<e}function Y9(t){var e,n,r,i,o,a,s;if(se=At=-($t=re=1/0),mn=[],Pe(t,Qe),n=mn.length){for(mn.sort(B9),e=1,r=mn[0],o=[r];e<n;++e)i=mn[e],rm(r,i[0])||rm(r,i[1])?(ue(r[0],i[1])>ue(r[0],r[1])&&(r[1]=i[1]),ue(i[0],r[1])>ue(r[0],r[1])&&(r[0]=i[0])):o.push(r=i);for(a=-1/0,n=o.length-1,e=0,r=o[n];e<=n;r=i,++e)i=o[e],(s=ue(r[1],i[0]))>a&&(a=s,$t=i[0],At=r[1])}return mn=Ke=null,$t===1/0||re===1/0?[[NaN,NaN],[NaN,NaN]]:[[$t,re],[At,se]]}var Qi,ys,bs,vs,xs,_s,ws,$s,Bl,Yl,Wl,im,om,Zt,Kt,Qt,De={sphere:wt,point:Hl,lineStart:am,lineEnd:sm,polygonStart:function(){De.lineStart=q9,De.lineEnd=X9},polygonEnd:function(){De.lineStart=am,De.lineEnd=sm}};function Hl(t,e){t*=et,e*=et;var n=K(e);Ji(n*K(t),n*j(t),j(e))}function Ji(t,e,n){++Qi,bs+=(t-bs)/Qi,vs+=(e-vs)/Qi,xs+=(n-xs)/Qi}function am(){De.point=W9}function W9(t,e){t*=et,e*=et;var n=K(e);Zt=n*K(t),Kt=n*j(t),Qt=j(e),De.point=H9,Ji(Zt,Kt,Qt)}function H9(t,e){t*=et,e*=et;var n=K(e),r=n*K(t),i=n*j(t),o=j(e),a=Vt(Ct((a=Kt*o-Qt*i)*a+(a=Qt*r-Zt*o)*a+(a=Zt*i-Kt*r)*a),Zt*r+Kt*i+Qt*o);ys+=a,_s+=a*(Zt+(Zt=r)),ws+=a*(Kt+(Kt=i)),$s+=a*(Qt+(Qt=o)),Ji(Zt,Kt,Qt)}function sm(){De.point=Hl}function q9(){De.point=V9}function X9(){um(im,om),De.point=Hl}function V9(t,e){im=t,om=e,t*=et,e*=et,De.point=um;var n=K(e);Zt=n*K(t),Kt=n*j(t),Qt=j(e),Ji(Zt,Kt,Qt)}function um(t,e){t*=et,e*=et;var n=K(e),r=n*K(t),i=n*j(t),o=j(e),a=Kt*o-Qt*i,s=Qt*r-Zt*o,u=Zt*i-Kt*r,c=Cl(a,s,u),l=jt(c),h=c&&-l/c;Bl.add(h*a),Yl.add(h*s),Wl.add(h*u),ys+=l,_s+=l*(Zt+(Zt=r)),ws+=l*(Kt+(Kt=i)),$s+=l*(Qt+(Qt=o)),Ji(Zt,Kt,Qt)}function j9(t){Qi=ys=bs=vs=xs=_s=ws=$s=0,Bl=new Dt,Yl=new Dt,Wl=new Dt,Pe(t,De);var e=+Bl,n=+Yl,r=+Wl,i=Cl(e,n,r);return i<Zi&&(e=_s,n=ws,r=$s,ys<tt&&(e=bs,n=vs,r=xs),i=Cl(e,n,r),i<Zi)?[NaN,NaN]:[Vt(n,e)*yt,jt(r/i)*yt]}function Wr(t){return function(){return t}}function ql(t,e){function n(r,i){return r=t(r,i),e(r[0],r[1])}return t.invert&&e.invert&&(n.invert=function(r,i){return r=e.invert(r,i),r&&t.invert(r[0],r[1])}),n}function Xl(t,e){return ft(t)>ct&&(t-=Math.round(t/Xt)*Xt),[t,e]}Xl.invert=Xl;function Vl(t,e,n){return(t%=Xt)?e||n?ql(lm(t),fm(e,n)):lm(t):e||n?fm(e,n):Xl}function cm(t){return function(e,n){return e+=t,ft(e)>ct&&(e-=Math.round(e/Xt)*Xt),[e,n]}}function lm(t){var e=cm(t);return e.invert=cm(-t),e}function fm(t,e){var n=K(t),r=j(t),i=K(e),o=j(e);function a(s,u){var c=K(u),l=K(s)*c,h=j(s)*c,f=j(u),d=f*n+l*r;return[Vt(h*i-d*o,l*n-f*r),jt(d*i+h*o)]}return a.invert=function(s,u){var c=K(u),l=K(s)*c,h=j(s)*c,f=j(u),d=f*i-h*o;return[Vt(h*i+f*o,l*n+d*r),jt(d*n-l*r)]},a}function hm(t){t=Vl(t[0]*et,t[1]*et,t.length>2?t[2]*et:0);function e(n){return n=t(n[0]*et,n[1]*et),n[0]*=yt,n[1]*=yt,n}return e.invert=function(n){return n=t.invert(n[0]*et,n[1]*et),n[0]*=yt,n[1]*=yt,n},e}function dm(t,e,n,r,i,o){if(n){var a=K(e),s=j(e),u=r*n;i==null?(i=e+r*Xt,o=e-u/2):(i=pm(a,i),o=pm(a,o),(r>0?i<o:i>o)&&(i+=r*Xt));for(var c,l=i;r>0?l>o:l<o;l-=u)c=ds([a,-s*K(l),-s*j(l)]),t.point(c[0],c[1])}}function pm(t,e){e=jn(e),e[0]-=t,ms(e);var n=Y1(-e[1]);return((-e[2]<0?-n:n)+Xt-tt)%Xt}function Z9(){var t=Wr([0,0]),e=Wr(90),n=Wr(2),r,i,o={point:a};function a(u,c){r.push(u=i(u,c)),u[0]*=yt,u[1]*=yt}function s(){var u=t.apply(this,arguments),c=e.apply(this,arguments)*et,l=n.apply(this,arguments)*et;return r=[],i=Vl(-u[0]*et,-u[1]*et,0).invert,dm(o,c,l,1),u={type:"Polygon",coordinates:[r]},r=i=null,u}return s.center=function(u){return arguments.length?(t=typeof u=="function"?u:Wr([+u[0],+u[1]]),s):t},s.radius=function(u){return arguments.length?(e=typeof u=="function"?u:Wr(+u),s):e},s.precision=function(u){return arguments.length?(n=typeof u=="function"?u:Wr(+u),s):n},s}function gm(){var t=[],e;return{point:function(n,r,i){e.push([n,r,i])},lineStart:function(){t.push(e=[])},lineEnd:wt,rejoin:function(){t.length>1&&t.push(t.pop().concat(t.shift()))},result:function(){var n=t;return t=[],e=null,n}}}function Ss(t,e){return ft(t[0]-e[0])<tt&&ft(t[1]-e[1])<tt}function As(t,e,n,r){this.x=t,this.z=e,this.o=n,this.e=r,this.v=!1,this.n=this.p=null}function mm(t,e,n,r,i){var o=[],a=[],s,u;if(t.forEach(function(p){if(!((g=p.length-1)<=0)){var g,m=p[0],y=p[g],_;if(Ss(m,y)){if(!m[2]&&!y[2]){for(i.lineStart(),s=0;s<g;++s)i.point((m=p[s])[0],m[1]);i.lineEnd();return}y[0]+=2*tt}o.push(_=new As(m,p,null,!0)),a.push(_.o=new As(m,null,_,!1)),o.push(_=new As(y,p,null,!1)),a.push(_.o=new As(y,null,_,!0))}}),!!o.length){for(a.sort(e),ym(o),ym(a),s=0,u=a.length;s<u;++s)a[s].e=n=!n;for(var c=o[0],l,h;;){for(var f=c,d=!0;f.v;)if((f=f.n)===c)return;l=f.z,i.lineStart();do{if(f.v=f.o.v=!0,f.e){if(d)for(s=0,u=l.length;s<u;++s)i.point((h=l[s])[0],h[1]);else r(f.x,f.n.x,1,i);f=f.n}else{if(d)for(l=f.p.z,s=l.length-1;s>=0;--s)i.point((h=l[s])[0],h[1]);else r(f.x,f.p.x,-1,i);f=f.p}f=f.o,l=f.z,d=!d}while(!f.v);i.lineEnd()}}}function ym(t){if(e=t.length){for(var e,n=0,r=t[0],i;++n<e;)r.n=i=t[n],i.p=r,r=i;r.n=i=t[0],i.p=r}}function jl(t){return ft(t[0])<=ct?t[0]:he(t[0])*((ft(t[0])+ct)%Xt-ct)}function bm(t,e){var n=jl(e),r=e[1],i=j(r),o=[j(n),-K(n),0],a=0,s=0,u=new Dt;i===1?r=St+tt:i===-1&&(r=-St-tt);for(var c=0,l=t.length;c<l;++c)if(f=(h=t[c]).length)for(var h,f,d=h[f-1],p=jl(d),g=d[1]/2+ss,m=j(g),y=K(g),_=0;_<f;++_,p=b,m=v,y=w,d=x){var x=h[_],b=jl(x),$=x[1]/2+ss,v=j($),w=K($),S=b-p,D=S>=0?1:-1,E=D*S,T=E>ct,F=m*v;if(u.add(Vt(F*D*j(E),y*w+F*K(E))),a+=T?S+D*Xt:S,T^p>=n^b>=n){var M=Br(jn(d),jn(x));ms(M);var A=Br(o,M);ms(A);var L=(T^S>=0?-1:1)*jt(A[2]);(r>L||r===L&&(M[0]||M[1]))&&(s+=T^S>=0?1:-1)}}return(a<-tt||a<tt&&u<-Zi)^s&1}function vm(t,e,n,r){return function(i){var o=e(i),a=gm(),s=e(a),u=!1,c,l,h,f={point:d,lineStart:g,lineEnd:m,polygonStart:function(){f.point=y,f.lineStart=_,f.lineEnd=x,l=[],c=[]},polygonEnd:function(){f.point=d,f.lineStart=g,f.lineEnd=m,l=Mc(l);var b=bm(c,r);l.length?(u||(i.polygonStart(),u=!0),mm(l,Q9,b,n,i)):b&&(u||(i.polygonStart(),u=!0),i.lineStart(),n(null,null,1,i),i.lineEnd()),u&&(i.polygonEnd(),u=!1),l=c=null},sphere:function(){i.polygonStart(),i.lineStart(),n(null,null,1,i),i.lineEnd(),i.polygonEnd()}};function d(b,$){t(b,$)&&i.point(b,$)}function p(b,$){o.point(b,$)}function g(){f.point=p,o.lineStart()}function m(){f.point=d,o.lineEnd()}function y(b,$){h.push([b,$]),s.point(b,$)}function _(){s.lineStart(),h=[]}function x(){y(h[0][0],h[0][1]),s.lineEnd();var b=s.clean(),$=a.result(),v,w=$.length,S,D,E;if(h.pop(),c.push(h),h=null,!!w){if(b&1){if(D=$[0],(S=D.length-1)>0){for(u||(i.polygonStart(),u=!0),i.lineStart(),v=0;v<S;++v)i.point((E=D[v])[0],E[1]);i.lineEnd()}return}w>1&&b&2&&$.push($.pop().concat($.shift())),l.push($.filter(K9))}}return f}}function K9(t){return t.length>1}function Q9(t,e){return((t=t.x)[0]<0?t[1]-St-tt:St-t[1])-((e=e.x)[0]<0?e[1]-St-tt:St-e[1])}const Zl=vm(function(){return!0},J9,eT,[-ct,-St]);function J9(t){var e=NaN,n=NaN,r=NaN,i;return{lineStart:function(){t.lineStart(),i=1},point:function(o,a){var s=o>0?ct:-ct,u=ft(o-e);ft(u-ct)<tt?(t.point(e,n=(n+a)/2>0?St:-St),t.point(r,n),t.lineEnd(),t.lineStart(),t.point(s,n),t.point(o,n),i=0):r!==s&&u>=ct&&(ft(e-r)<tt&&(e-=r*tt),ft(o-s)<tt&&(o-=s*tt),n=tT(e,n,o,a),t.point(r,n),t.lineEnd(),t.lineStart(),t.point(s,n),i=0),t.point(e=o,n=a),r=s},lineEnd:function(){t.lineEnd(),e=n=NaN},clean:function(){return 2-i}}}function tT(t,e,n,r){var i,o,a=j(t-n);return ft(a)>tt?Ur((j(e)*(o=K(r))*j(n)-j(r)*(i=K(e))*j(t))/(i*o*a)):(e+r)/2}function eT(t,e,n,r){var i;if(t==null)i=n*St,r.point(-ct,i),r.point(0,i),r.point(ct,i),r.point(ct,0),r.point(ct,-i),r.point(0,-i),r.point(-ct,-i),r.point(-ct,0),r.point(-ct,i);else if(ft(t[0]-e[0])>tt){var o=t[0]<e[0]?ct:-ct;i=n*o/2,r.point(-o,i),r.point(0,i),r.point(o,i)}else r.point(e[0],e[1])}function xm(t){var e=K(t),n=2*et,r=e>0,i=ft(e)>tt;function o(l,h,f,d){dm(d,t,n,f,l,h)}function a(l,h){return K(l)*K(h)>e}function s(l){var h,f,d,p,g;return{lineStart:function(){p=d=!1,g=1},point:function(m,y){var _=[m,y],x,b=a(m,y),$=r?b?0:c(m,y):b?c(m+(m<0?ct:-ct),y):0;if(!h&&(p=d=b)&&l.lineStart(),b!==d&&(x=u(h,_),(!x||Ss(h,x)||Ss(_,x))&&(_[2]=1)),b!==d)g=0,b?(l.lineStart(),x=u(_,h),l.point(x[0],x[1])):(x=u(h,_),l.point(x[0],x[1],2),l.lineEnd()),h=x;else if(i&&h&&r^b){var v;!($&f)&&(v=u(_,h,!0))&&(g=0,r?(l.lineStart(),l.point(v[0][0],v[0][1]),l.point(v[1][0],v[1][1]),l.lineEnd()):(l.point(v[1][0],v[1][1]),l.lineEnd(),l.lineStart(),l.point(v[0][0],v[0][1],3)))}b&&(!h||!Ss(h,_))&&l.point(_[0],_[1]),h=_,d=b,f=$},lineEnd:function(){d&&l.lineEnd(),h=null},clean:function(){return g|(p&&d)<<1}}}function u(l,h,f){var d=jn(l),p=jn(h),g=[1,0,0],m=Br(d,p),y=ps(m,m),_=m[0],x=y-_*_;if(!x)return!f&&l;var b=e*y/x,$=-e*_/x,v=Br(g,m),w=gs(g,b),S=gs(m,$);Ol(w,S);var D=v,E=ps(w,D),T=ps(D,D),F=E*E-T*(ps(w,w)-1);if(!(F<0)){var M=Ct(F),A=gs(D,(-E-M)/T);if(Ol(A,w),A=ds(A),!f)return A;var L=l[0],P=h[0],I=l[1],z=h[1],k;P<L&&(k=L,L=P,P=k);var R=P-L,N=ft(R-ct)<tt,C=N||R<tt;if(!N&&z<I&&(k=I,I=z,z=k),C?N?I+z>0^A[1]<(ft(A[0]-L)<tt?I:z):I<=A[1]&&A[1]<=z:R>ct^(L<=A[0]&&A[0]<=P)){var O=gs(D,(-E+M)/T);return Ol(O,w),[A,ds(O)]}}}function c(l,h){var f=r?t:ct-t,d=0;return l<-f?d|=1:l>f&&(d|=2),h<-f?d|=4:h>f&&(d|=8),d}return vm(a,s,o,r?[0,-t]:[-ct,t-ct])}function nT(t,e,n,r,i,o){var a=t[0],s=t[1],u=e[0],c=e[1],l=0,h=1,f=u-a,d=c-s,p;if(p=n-a,!(!f&&p>0)){if(p/=f,f<0){if(p<l)return;p<h&&(h=p)}else if(f>0){if(p>h)return;p>l&&(l=p)}if(p=i-a,!(!f&&p<0)){if(p/=f,f<0){if(p>h)return;p>l&&(l=p)}else if(f>0){if(p<l)return;p<h&&(h=p)}if(p=r-s,!(!d&&p>0)){if(p/=d,d<0){if(p<l)return;p<h&&(h=p)}else if(d>0){if(p>h)return;p>l&&(l=p)}if(p=o-s,!(!d&&p<0)){if(p/=d,d<0){if(p>h)return;p>l&&(l=p)}else if(d>0){if(p<l)return;p<h&&(h=p)}return l>0&&(t[0]=a+l*f,t[1]=s+l*d),h<1&&(e[0]=a+h*f,e[1]=s+h*d),!0}}}}}var to=1e9,Ms=-to;function Ts(t,e,n,r){function i(c,l){return t<=c&&c<=n&&e<=l&&l<=r}function o(c,l,h,f){var d=0,p=0;if(c==null||(d=a(c,h))!==(p=a(l,h))||u(c,l)<0^h>0)do f.point(d===0||d===3?t:n,d>1?r:e);while((d=(d+h+4)%4)!==p);else f.point(l[0],l[1])}function a(c,l){return ft(c[0]-t)<tt?l>0?0:3:ft(c[0]-n)<tt?l>0?2:1:ft(c[1]-e)<tt?l>0?1:0:l>0?3:2}function s(c,l){return u(c.x,l.x)}function u(c,l){var h=a(c,1),f=a(l,1);return h!==f?h-f:h===0?l[1]-c[1]:h===1?c[0]-l[0]:h===2?c[1]-l[1]:l[0]-c[0]}return function(c){var l=c,h=gm(),f,d,p,g,m,y,_,x,b,$,v,w={point:S,lineStart:F,lineEnd:M,polygonStart:E,polygonEnd:T};function S(L,P){i(L,P)&&l.point(L,P)}function D(){for(var L=0,P=0,I=d.length;P<I;++P)for(var z=d[P],k=1,R=z.length,N=z[0],C,O,X=N[0],W=N[1];k<R;++k)C=X,O=W,N=z[k],X=N[0],W=N[1],O<=r?W>r&&(X-C)*(r-O)>(W-O)*(t-C)&&++L:W<=r&&(X-C)*(r-O)<(W-O)*(t-C)&&--L;return L}function E(){l=h,f=[],d=[],v=!0}function T(){var L=D(),P=v&&L,I=(f=Mc(f)).length;(P||I)&&(c.polygonStart(),P&&(c.lineStart(),o(null,null,1,c),c.lineEnd()),I&&mm(f,s,L,o,c),c.polygonEnd()),l=c,f=d=p=null}function F(){w.point=A,d&&d.push(p=[]),$=!0,b=!1,_=x=NaN}function M(){f&&(A(g,m),y&&b&&h.rejoin(),f.push(h.result())),w.point=S,b&&l.lineEnd()}function A(L,P){var I=i(L,P);if(d&&p.push([L,P]),$)g=L,m=P,y=I,$=!1,I&&(l.lineStart(),l.point(L,P));else if(I&&b)l.point(L,P);else{var z=[_=Math.max(Ms,Math.min(to,_)),x=Math.max(Ms,Math.min(to,x))],k=[L=Math.max(Ms,Math.min(to,L)),P=Math.max(Ms,Math.min(to,P))];nT(z,k,t,e,n,r)?(b||(l.lineStart(),l.point(z[0],z[1])),l.point(k[0],k[1]),I||l.lineEnd(),v=!1):I&&(l.lineStart(),l.point(L,P),v=!1)}_=L,x=P,b=I}return w}}function rT(){var t=0,e=0,n=960,r=500,i,o,a;return a={stream:function(s){return i&&o===s?i:i=Ts(t,e,n,r)(o=s)},extent:function(s){return arguments.length?(t=+s[0][0],e=+s[0][1],n=+s[1][0],r=+s[1][1],i=o=null,a):[[t,e],[n,r]]}}}var Kl,Ql,Ps,Ds,Hr={sphere:wt,point:wt,lineStart:iT,lineEnd:wt,polygonStart:wt,polygonEnd:wt};function iT(){Hr.point=aT,Hr.lineEnd=oT}function oT(){Hr.point=Hr.lineEnd=wt}function aT(t,e){t*=et,e*=et,Ql=t,Ps=j(e),Ds=K(e),Hr.point=sT}function sT(t,e){t*=et,e*=et;var n=j(e),r=K(e),i=ft(t-Ql),o=K(i),a=j(i),s=r*a,u=Ds*n-Ps*r*o,c=Ps*n+Ds*r*o;Kl.add(Vt(Ct(s*s+u*u),c)),Ql=t,Ps=n,Ds=r}function _m(t){return Kl=new Dt,Pe(t,Hr),+Kl}var Jl=[null,null],uT={type:"LineString",coordinates:Jl};function Es(t,e){return Jl[0]=t,Jl[1]=e,_m(uT)}var wm={Feature:function(t,e){return ks(t.geometry,e)},FeatureCollection:function(t,e){for(var n=t.features,r=-1,i=n.length;++r<i;)if(ks(n[r].geometry,e))return!0;return!1}},$m={Sphere:function(){return!0},Point:function(t,e){return Sm(t.coordinates,e)},MultiPoint:function(t,e){for(var n=t.coordinates,r=-1,i=n.length;++r<i;)if(Sm(n[r],e))return!0;return!1},LineString:function(t,e){return Am(t.coordinates,e)},MultiLineString:function(t,e){for(var n=t.coordinates,r=-1,i=n.length;++r<i;)if(Am(n[r],e))return!0;return!1},Polygon:function(t,e){return Mm(t.coordinates,e)},MultiPolygon:function(t,e){for(var n=t.coordinates,r=-1,i=n.length;++r<i;)if(Mm(n[r],e))return!0;return!1},GeometryCollection:function(t,e){for(var n=t.geometries,r=-1,i=n.length;++r<i;)if(ks(n[r],e))return!0;return!1}};function ks(t,e){return t&&$m.hasOwnProperty(t.type)?$m[t.type](t,e):!1}function Sm(t,e){return Es(t,e)===0}function Am(t,e){for(var n,r,i,o=0,a=t.length;o<a;o++){if(r=Es(t[o],e),r===0||o>0&&(i=Es(t[o],t[o-1]),i>0&&n<=i&&r<=i&&(n+r-i)*(1-Math.pow((n-r)/i,2))<Zi*i))return!0;n=r}return!1}function Mm(t,e){return!!bm(t.map(cT),Tm(e))}function cT(t){return t=t.map(Tm),t.pop(),t}function Tm(t){return[t[0]*et,t[1]*et]}function lT(t,e){return(t&&wm.hasOwnProperty(t.type)?wm[t.type]:ks)(t,e)}function Pm(t,e,n){var r=cn(t,e-tt,n).concat(e);return function(i){return r.map(function(o){return[i,o]})}}function Dm(t,e,n){var r=cn(t,e-tt,n).concat(e);return function(i){return r.map(function(o){return[o,i]})}}function Em(){var t,e,n,r,i,o,a,s,u=10,c=u,l=90,h=360,f,d,p,g,m=2.5;function y(){return{type:"MultiLineString",coordinates:_()}}function _(){return cn(us(r/l)*l,n,l).map(p).concat(cn(us(s/h)*h,a,h).map(g)).concat(cn(us(e/u)*u,t,u).filter(function(x){return ft(x%l)>tt}).map(f)).concat(cn(us(o/c)*c,i,c).filter(function(x){return ft(x%h)>tt}).map(d))}return y.lines=function(){return _().map(function(x){return{type:"LineString",coordinates:x}})},y.outline=function(){return{type:"Polygon",coordinates:[p(r).concat(g(a).slice(1),p(n).reverse().slice(1),g(s).reverse().slice(1))]}},y.extent=function(x){return arguments.length?y.extentMajor(x).extentMinor(x):y.extentMinor()},y.extentMajor=function(x){return arguments.length?(r=+x[0][0],n=+x[1][0],s=+x[0][1],a=+x[1][1],r>n&&(x=r,r=n,n=x),s>a&&(x=s,s=a,a=x),y.precision(m)):[[r,s],[n,a]]},y.extentMinor=function(x){return arguments.length?(e=+x[0][0],t=+x[1][0],o=+x[0][1],i=+x[1][1],e>t&&(x=e,e=t,t=x),o>i&&(x=o,o=i,i=x),y.precision(m)):[[e,o],[t,i]]},y.step=function(x){return arguments.length?y.stepMajor(x).stepMinor(x):y.stepMinor()},y.stepMajor=function(x){return arguments.length?(l=+x[0],h=+x[1],y):[l,h]},y.stepMinor=function(x){return arguments.length?(u=+x[0],c=+x[1],y):[u,c]},y.precision=function(x){return arguments.length?(m=+x,f=Pm(o,i,90),d=Dm(e,t,m),p=Pm(s,a,90),g=Dm(r,n,m),y):m},y.extentMajor([[-180,-90+tt],[180,90-tt]]).extentMinor([[-180,-80-tt],[180,80+tt]])}function fT(){return Em()()}function hT(t,e){var n=t[0]*et,r=t[1]*et,i=e[0]*et,o=e[1]*et,a=K(r),s=j(r),u=K(o),c=j(o),l=a*K(n),h=a*j(n),f=u*K(i),d=u*j(i),p=2*jt(Ct(W1(o-r)+a*u*W1(i-n))),g=j(p),m=p?function(y){var _=j(y*=p)/g,x=j(p-y)/g,b=x*l+_*f,$=x*h+_*d,v=x*s+_*c;return[Vt($,b)*yt,Vt(v,Ct(b*b+$*$))*yt]}:function(){return[n*yt,r*yt]};return m.distance=p,m}const eo=t=>t;var tf=new Dt,ef=new Dt,km,Lm,nf,rf,Je={point:wt,lineStart:wt,lineEnd:wt,polygonStart:function(){Je.lineStart=dT,Je.lineEnd=gT},polygonEnd:function(){Je.lineStart=Je.lineEnd=Je.point=wt,tf.add(ft(ef)),ef=new Dt},result:function(){var t=tf/2;return tf=new Dt,t}};function dT(){Je.point=pT}function pT(t,e){Je.point=Cm,km=nf=t,Lm=rf=e}function Cm(t,e){ef.add(rf*t-nf*e),nf=t,rf=e}function gT(){Cm(km,Lm)}var qr=1/0,Ls=qr,no=-qr,Cs=no,Rs={point:mT,lineStart:wt,lineEnd:wt,polygonStart:wt,polygonEnd:wt,result:function(){var t=[[qr,Ls],[no,Cs]];return no=Cs=-(Ls=qr=1/0),t}};function mT(t,e){t<qr&&(qr=t),t>no&&(no=t),e<Ls&&(Ls=e),e>Cs&&(Cs=e)}var of=0,af=0,ro=0,Is=0,Ns=0,Xr=0,sf=0,uf=0,io=0,Rm,Im,Fe,Ge,de={point:Kn,lineStart:Nm,lineEnd:Fm,polygonStart:function(){de.lineStart=vT,de.lineEnd=xT},polygonEnd:function(){de.point=Kn,de.lineStart=Nm,de.lineEnd=Fm},result:function(){var t=io?[sf/io,uf/io]:Xr?[Is/Xr,Ns/Xr]:ro?[of/ro,af/ro]:[NaN,NaN];return of=af=ro=Is=Ns=Xr=sf=uf=io=0,t}};function Kn(t,e){of+=t,af+=e,++ro}function Nm(){de.point=yT}function yT(t,e){de.point=bT,Kn(Fe=t,Ge=e)}function bT(t,e){var n=t-Fe,r=e-Ge,i=Ct(n*n+r*r);Is+=i*(Fe+t)/2,Ns+=i*(Ge+e)/2,Xr+=i,Kn(Fe=t,Ge=e)}function Fm(){de.point=Kn}function vT(){de.point=_T}function xT(){Gm(Rm,Im)}function _T(t,e){de.point=Gm,Kn(Rm=Fe=t,Im=Ge=e)}function Gm(t,e){var n=t-Fe,r=e-Ge,i=Ct(n*n+r*r);Is+=i*(Fe+t)/2,Ns+=i*(Ge+e)/2,Xr+=i,i=Ge*t-Fe*e,sf+=i*(Fe+t),uf+=i*(Ge+e),io+=i*3,Kn(Fe=t,Ge=e)}function zm(t){this._context=t}zm.prototype={_radius:4.5,pointRadius:function(t){return this._radius=t,this},polygonStart:function(){this._line=0},polygonEnd:function(){this._line=NaN},lineStart:function(){this._point=0},lineEnd:function(){this._line===0&&this._context.closePath(),this._point=NaN},point:function(t,e){switch(this._point){case 0:{this._context.moveTo(t,e),this._point=1;break}case 1:{this._context.lineTo(t,e);break}default:{this._context.moveTo(t+this._radius,e),this._context.arc(t,e,this._radius,0,Xt);break}}},result:wt};var cf=new Dt,lf,Om,Um,oo,ao,so={point:wt,lineStart:function(){so.point=wT},lineEnd:function(){lf&&Bm(Om,Um),so.point=wt},polygonStart:function(){lf=!0},polygonEnd:function(){lf=null},result:function(){var t=+cf;return cf=new Dt,t}};function wT(t,e){so.point=Bm,Om=oo=t,Um=ao=e}function Bm(t,e){oo-=t,ao-=e,cf.add(Ct(oo*oo+ao*ao)),oo=t,ao=e}let Ym,Fs,Wm,Hm;class qm{constructor(e){this._append=e==null?Xm:$T(e),this._radius=4.5,this._=""}pointRadius(e){return this._radius=+e,this}polygonStart(){this._line=0}polygonEnd(){this._line=NaN}lineStart(){this._point=0}lineEnd(){this._line===0&&(this._+="Z"),this._point=NaN}point(e,n){switch(this._point){case 0:{this._append`M${e},${n}`,this._point=1;break}case 1:{this._append`L${e},${n}`;break}default:{if(this._append`M${e},${n}`,this._radius!==Wm||this._append!==Fs){const r=this._radius,i=this._;this._="",this._append`m0,${r}a${r},${r} 0 1,1 0,${-2*r}a${r},${r} 0 1,1 0,${2*r}z`,Wm=r,Fs=this._append,Hm=this._,this._=i}this._+=Hm;break}}}result(){const e=this._;return this._="",e.length?e:null}}function Xm(t){let e=1;this._+=t[0];for(const n=t.length;e<n;++e)this._+=arguments[e]+t[e]}function $T(t){const e=Math.floor(t);if(!(e>=0))throw new RangeError(`invalid digits: ${t}`);if(e>15)return Xm;if(e!==Ym){const n=10**e;Ym=e,Fs=function(i){let o=1;this._+=i[0];for(const a=i.length;o<a;++o)this._+=Math.round(arguments[o]*n)/n+i[o]}}return Fs}function ST(t,e){let n=3,r=4.5,i,o;function a(s){return s&&(typeof r=="function"&&o.pointRadius(+r.apply(this,arguments)),Pe(s,i(o))),o.result()}return a.area=function(s){return Pe(s,i(Je)),Je.result()},a.measure=function(s){return Pe(s,i(so)),so.result()},a.bounds=function(s){return Pe(s,i(Rs)),Rs.result()},a.centroid=function(s){return Pe(s,i(de)),de.result()},a.projection=function(s){return arguments.length?(i=s==null?(t=null,eo):(t=s).stream,a):t},a.context=function(s){return arguments.length?(o=s==null?(e=null,new qm(n)):new zm(e=s),typeof r!="function"&&o.pointRadius(r),a):e},a.pointRadius=function(s){return arguments.length?(r=typeof s=="function"?s:(o.pointRadius(+s),+s),a):r},a.digits=function(s){if(!arguments.length)return n;if(s==null)n=null;else{const u=Math.floor(s);if(!(u>=0))throw new RangeError(`invalid digits: ${s}`);n=u}return e===null&&(o=new qm(n)),a},a.projection(t).digits(n).context(e)}function AT(t){return{stream:uo(t)}}function uo(t){return function(e){var n=new ff;for(var r in t)n[r]=t[r];return n.stream=e,n}}function ff(){}ff.prototype={constructor:ff,point:function(t,e){this.stream.point(t,e)},sphere:function(){this.stream.sphere()},lineStart:function(){this.stream.lineStart()},lineEnd:function(){this.stream.lineEnd()},polygonStart:function(){this.stream.polygonStart()},polygonEnd:function(){this.stream.polygonEnd()}};function hf(t,e,n){var r=t.clipExtent&&t.clipExtent();return t.scale(150).translate([0,0]),r!=null&&t.clipExtent(null),Pe(n,t.stream(Rs)),e(Rs.result()),r!=null&&t.clipExtent(r),t}function Gs(t,e,n){return hf(t,function(r){var i=e[1][0]-e[0][0],o=e[1][1]-e[0][1],a=Math.min(i/(r[1][0]-r[0][0]),o/(r[1][1]-r[0][1])),s=+e[0][0]+(i-a*(r[1][0]+r[0][0]))/2,u=+e[0][1]+(o-a*(r[1][1]+r[0][1]))/2;t.scale(150*a).translate([s,u])},n)}function df(t,e,n){return Gs(t,[[0,0],e],n)}function pf(t,e,n){return hf(t,function(r){var i=+e,o=i/(r[1][0]-r[0][0]),a=(i-o*(r[1][0]+r[0][0]))/2,s=-o*r[0][1];t.scale(150*o).translate([a,s])},n)}function gf(t,e,n){return hf(t,function(r){var i=+e,o=i/(r[1][1]-r[0][1]),a=-o*r[0][0],s=(i-o*(r[1][1]+r[0][1]))/2;t.scale(150*o).translate([a,s])},n)}var Vm=16,MT=K(30*et);function jm(t,e){return+e?PT(t,e):TT(t)}function TT(t){return uo({point:function(e,n){e=t(e,n),this.stream.point(e[0],e[1])}})}function PT(t,e){function n(r,i,o,a,s,u,c,l,h,f,d,p,g,m){var y=c-r,_=l-i,x=y*y+_*_;if(x>4*e&&g--){var b=a+f,$=s+d,v=u+p,w=Ct(b*b+$*$+v*v),S=jt(v/=w),D=ft(ft(v)-1)<tt||ft(o-h)<tt?(o+h)/2:Vt($,b),E=t(D,S),T=E[0],F=E[1],M=T-r,A=F-i,L=_*M-y*A;(L*L/x>e||ft((y*M+_*A)/x-.5)>.3||a*f+s*d+u*p<MT)&&(n(r,i,o,a,s,u,T,F,D,b/=w,$/=w,v,g,m),m.point(T,F),n(T,F,D,b,$,v,c,l,h,f,d,p,g,m))}}return function(r){var i,o,a,s,u,c,l,h,f,d,p,g,m={point:y,lineStart:_,lineEnd:b,polygonStart:function(){r.polygonStart(),m.lineStart=$},polygonEnd:function(){r.polygonEnd(),m.lineStart=_}};function y(S,D){S=t(S,D),r.point(S[0],S[1])}function _(){h=NaN,m.point=x,r.lineStart()}function x(S,D){var E=jn([S,D]),T=t(S,D);n(h,f,l,d,p,g,h=T[0],f=T[1],l=S,d=E[0],p=E[1],g=E[2],Vm,r),r.point(h,f)}function b(){m.point=y,r.lineEnd()}function $(){_(),m.point=v,m.lineEnd=w}function v(S,D){x(i=S,D),o=h,a=f,s=d,u=p,c=g,m.point=x}function w(){n(h,f,l,d,p,g,o,a,i,s,u,c,Vm,r),m.lineEnd=b,b()}return m}}var DT=uo({point:function(t,e){this.stream.point(t*et,e*et)}});function ET(t){return uo({point:function(e,n){var r=t(e,n);return this.stream.point(r[0],r[1])}})}function kT(t,e,n,r,i){function o(a,s){return a*=r,s*=i,[e+t*a,n-t*s]}return o.invert=function(a,s){return[(a-e)/t*r,(n-s)/t*i]},o}function Zm(t,e,n,r,i,o){if(!o)return kT(t,e,n,r,i);var a=K(o),s=j(o),u=a*t,c=s*t,l=a/t,h=s/t,f=(s*n-a*e)/t,d=(s*e+a*n)/t;function p(g,m){return g*=r,m*=i,[u*g-c*m+e,n-c*g-u*m]}return p.invert=function(g,m){return[r*(l*g-h*m+f),i*(d-h*g-l*m)]},p}function ze(t){return mf(function(){return t})()}function mf(t){var e,n=150,r=480,i=250,o=0,a=0,s=0,u=0,c=0,l,h=0,f=1,d=1,p=null,g=Zl,m=null,y,_,x,b=eo,$=.5,v,w,S,D,E;function T(L){return S(L[0]*et,L[1]*et)}function F(L){return L=S.invert(L[0],L[1]),L&&[L[0]*yt,L[1]*yt]}T.stream=function(L){return D&&E===L?D:D=DT(ET(l)(g(v(b(E=L)))))},T.preclip=function(L){return arguments.length?(g=L,p=void 0,A()):g},T.postclip=function(L){return arguments.length?(b=L,m=y=_=x=null,A()):b},T.clipAngle=function(L){return arguments.length?(g=+L?xm(p=L*et):(p=null,Zl),A()):p*yt},T.clipExtent=function(L){return arguments.length?(b=L==null?(m=y=_=x=null,eo):Ts(m=+L[0][0],y=+L[0][1],_=+L[1][0],x=+L[1][1]),A()):m==null?null:[[m,y],[_,x]]},T.scale=function(L){return arguments.length?(n=+L,M()):n},T.translate=function(L){return arguments.length?(r=+L[0],i=+L[1],M()):[r,i]},T.center=function(L){return arguments.length?(o=L[0]%360*et,a=L[1]%360*et,M()):[o*yt,a*yt]},T.rotate=function(L){return arguments.length?(s=L[0]%360*et,u=L[1]%360*et,c=L.length>2?L[2]%360*et:0,M()):[s*yt,u*yt,c*yt]},T.angle=function(L){return arguments.length?(h=L%360*et,M()):h*yt},T.reflectX=function(L){return arguments.length?(f=L?-1:1,M()):f<0},T.reflectY=function(L){return arguments.length?(d=L?-1:1,M()):d<0},T.precision=function(L){return arguments.length?(v=jm(w,$=L*L),A()):Ct($)},T.fitExtent=function(L,P){return Gs(T,L,P)},T.fitSize=function(L,P){return df(T,L,P)},T.fitWidth=function(L,P){return pf(T,L,P)},T.fitHeight=function(L,P){return gf(T,L,P)};function M(){var L=Zm(n,0,0,f,d,h).apply(null,e(o,a)),P=Zm(n,r-L[0],i-L[1],f,d,h);return l=Vl(s,u,c),w=ql(e,P),S=ql(l,w),v=jm(w,$),A()}function A(){return D=E=null,T}return function(){return e=t.apply(this,arguments),T.invert=e.invert&&F,M()}}function yf(t){var e=0,n=ct/3,r=mf(t),i=r(e,n);return i.parallels=function(o){return arguments.length?r(e=o[0]*et,n=o[1]*et):[e*yt,n*yt]},i}function LT(t){var e=K(t);function n(r,i){return[r*e,j(i)/e]}return n.invert=function(r,i){return[r/e,jt(i*e)]},n}function Km(t,e){var n=j(t),r=(n+j(e))/2;if(ft(r)<tt)return LT(t);var i=1+n*(2*r-n),o=Ct(i)/r;function a(s,u){var c=Ct(i-2*r*j(u))/r;return[c*j(s*=r),o-c*K(s)]}return a.invert=function(s,u){var c=o-u,l=Vt(s,ft(c))*he(c);return c*r<0&&(l-=ct*he(s)*he(c)),[l/r,jt((i-(s*s+c*c)*r*r)/(2*r))]},a}function zs(){return yf(Km).scale(155.424).center([0,33.6442])}function Qm(){return zs().parallels([29.5,45.5]).scale(1070).translate([480,250]).rotate([96,0]).center([-.6,38.7])}function CT(t){var e=t.length;return{point:function(n,r){for(var i=-1;++i<e;)t[i].point(n,r)},sphere:function(){for(var n=-1;++n<e;)t[n].sphere()},lineStart:function(){for(var n=-1;++n<e;)t[n].lineStart()},lineEnd:function(){for(var n=-1;++n<e;)t[n].lineEnd()},polygonStart:function(){for(var n=-1;++n<e;)t[n].polygonStart()},polygonEnd:function(){for(var n=-1;++n<e;)t[n].polygonEnd()}}}function RT(){var t,e,n=Qm(),r,i=zs().rotate([154,0]).center([-2,58.5]).parallels([55,65]),o,a=zs().rotate([157,0]).center([-3,19.9]).parallels([8,18]),s,u,c={point:function(f,d){u=[f,d]}};function l(f){var d=f[0],p=f[1];return u=null,r.point(d,p),u||(o.point(d,p),u)||(s.point(d,p),u)}l.invert=function(f){var d=n.scale(),p=n.translate(),g=(f[0]-p[0])/d,m=(f[1]-p[1])/d;return(m>=.12&&m<.234&&g>=-.425&&g<-.214?i:m>=.166&&m<.234&&g>=-.214&&g<-.115?a:n).invert(f)},l.stream=function(f){return t&&e===f?t:t=CT([n.stream(e=f),i.stream(f),a.stream(f)])},l.precision=function(f){return arguments.length?(n.precision(f),i.precision(f),a.precision(f),h()):n.precision()},l.scale=function(f){return arguments.length?(n.scale(f),i.scale(f*.35),a.scale(f),l.translate(n.translate())):n.scale()},l.translate=function(f){if(!arguments.length)return n.translate();var d=n.scale(),p=+f[0],g=+f[1];return r=n.translate(f).clipExtent([[p-.455*d,g-.238*d],[p+.455*d,g+.238*d]]).stream(c),o=i.translate([p-.307*d,g+.201*d]).clipExtent([[p-.425*d+tt,g+.12*d+tt],[p-.214*d-tt,g+.234*d-tt]]).stream(c),s=a.translate([p-.205*d,g+.212*d]).clipExtent([[p-.214*d+tt,g+.166*d+tt],[p-.115*d-tt,g+.234*d-tt]]).stream(c),h()},l.fitExtent=function(f,d){return Gs(l,f,d)},l.fitSize=function(f,d){return df(l,f,d)},l.fitWidth=function(f,d){return pf(l,f,d)},l.fitHeight=function(f,d){return gf(l,f,d)};function h(){return t=e=null,l}return l.scale(1070)}function Jm(t){return function(e,n){var r=K(e),i=K(n),o=t(r*i);return o===1/0?[2,0]:[o*i*j(e),o*j(n)]}}function co(t){return function(e,n){var r=Ct(e*e+n*n),i=t(r),o=j(i),a=K(i);return[Vt(e*o,r*a),jt(r&&n*o/r)]}}var bf=Jm(function(t){return Ct(2/(1+t))});bf.invert=co(function(t){return 2*jt(t/2)});function IT(){return ze(bf).scale(124.75).clipAngle(180-.001)}var vf=Jm(function(t){return(t=Y1(t))&&t/j(t)});vf.invert=co(function(t){return t});function NT(){return ze(vf).scale(79.4188).clipAngle(180-.001)}function lo(t,e){return[t,cs(Il((St+e)/2))]}lo.invert=function(t,e){return[t,2*Ur(B1(e))-St]};function FT(){return ty(lo).scale(961/Xt)}function ty(t){var e=ze(t),n=e.center,r=e.scale,i=e.translate,o=e.clipExtent,a=null,s,u,c;e.scale=function(h){return arguments.length?(r(h),l()):r()},e.translate=function(h){return arguments.length?(i(h),l()):i()},e.center=function(h){return arguments.length?(n(h),l()):n()},e.clipExtent=function(h){return arguments.length?(h==null?a=s=u=c=null:(a=+h[0][0],s=+h[0][1],u=+h[1][0],c=+h[1][1]),l()):a==null?null:[[a,s],[u,c]]};function l(){var h=ct*r(),f=e(hm(e.rotate()).invert([0,0]));return o(a==null?[[f[0]-h,f[1]-h],[f[0]+h,f[1]+h]]:t===lo?[[Math.max(f[0]-h,a),s],[Math.min(f[0]+h,u),c]]:[[a,Math.max(f[1]-h,s)],[u,Math.min(f[1]+h,c)]])}return l()}function Os(t){return Il((St+t)/2)}function ey(t,e){var n=K(t),r=t===e?j(t):cs(n/K(e))/cs(Os(e)/Os(t)),i=n*Rl(Os(t),r)/r;if(!r)return lo;function o(a,s){i>0?s<-St+tt&&(s=-St+tt):s>St-tt&&(s=St-tt);var u=i/Rl(Os(s),r);return[u*j(r*a),i-u*K(r*a)]}return o.invert=function(a,s){var u=i-s,c=he(r)*Ct(a*a+u*u),l=Vt(a,ft(u))*he(u);return u*r<0&&(l-=ct*he(a)*he(u)),[l/r,2*Ur(Rl(i/c,1/r))-St]},o}function GT(){return yf(ey).scale(109.5).parallels([30,30])}function fo(t,e){return[t,e]}fo.invert=fo;function zT(){return ze(fo).scale(152.63)}function ny(t,e){var n=K(t),r=t===e?j(t):(n-K(e))/(e-t),i=n/r+t;if(ft(r)<tt)return fo;function o(a,s){var u=i-s,c=r*a;return[u*j(c),i-u*K(c)]}return o.invert=function(a,s){var u=i-s,c=Vt(a,ft(u))*he(u);return u*r<0&&(c-=ct*he(a)*he(u)),[c/r,i-he(r)*Ct(a*a+u*u)]},o}function OT(){return yf(ny).scale(131.154).center([0,13.9389])}var ho=1.340264,po=-.081106,go=893e-6,mo=.003796,Us=Ct(3)/2,UT=12;function xf(t,e){var n=jt(Us*j(e)),r=n*n,i=r*r*r;return[t*K(n)/(Us*(ho+3*po*r+i*(7*go+9*mo*r))),n*(ho+po*r+i*(go+mo*r))]}xf.invert=function(t,e){for(var n=e,r=n*n,i=r*r*r,o=0,a,s,u;o<UT&&(s=n*(ho+po*r+i*(go+mo*r))-e,u=ho+3*po*r+i*(7*go+9*mo*r),n-=a=s/u,r=n*n,i=r*r*r,!(ft(a)<Zi));++o);return[Us*t*(ho+3*po*r+i*(7*go+9*mo*r))/K(n),jt(j(n)/Us)]};function BT(){return ze(xf).scale(177.158)}function _f(t,e){var n=K(e),r=K(t)*n;return[n*j(t)/r,j(e)/r]}_f.invert=co(Ur);function YT(){return ze(_f).scale(144.049).clipAngle(60)}function WT(){var t=1,e=0,n=0,r=1,i=1,o=0,a,s,u=null,c,l,h,f=1,d=1,p=uo({point:function(b,$){var v=x([b,$]);this.stream.point(v[0],v[1])}}),g=eo,m,y;function _(){return f=t*r,d=t*i,m=y=null,x}function x(b){var $=b[0]*f,v=b[1]*d;if(o){var w=v*a-$*s;$=$*a+v*s,v=w}return[$+e,v+n]}return x.invert=function(b){var $=b[0]-e,v=b[1]-n;if(o){var w=v*a+$*s;$=$*a-v*s,v=w}return[$/f,v/d]},x.stream=function(b){return m&&y===b?m:m=p(g(y=b))},x.postclip=function(b){return arguments.length?(g=b,u=c=l=h=null,_()):g},x.clipExtent=function(b){return arguments.length?(g=b==null?(u=c=l=h=null,eo):Ts(u=+b[0][0],c=+b[0][1],l=+b[1][0],h=+b[1][1]),_()):u==null?null:[[u,c],[l,h]]},x.scale=function(b){return arguments.length?(t=+b,_()):t},x.translate=function(b){return arguments.length?(e=+b[0],n=+b[1],_()):[e,n]},x.angle=function(b){return arguments.length?(o=b%360*et,s=j(o),a=K(o),_()):o*yt},x.reflectX=function(b){return arguments.length?(r=b?-1:1,_()):r<0},x.reflectY=function(b){return arguments.length?(i=b?-1:1,_()):i<0},x.fitExtent=function(b,$){return Gs(x,b,$)},x.fitSize=function(b,$){return df(x,b,$)},x.fitWidth=function(b,$){return pf(x,b,$)},x.fitHeight=function(b,$){return gf(x,b,$)},x}function wf(t,e){var n=e*e,r=n*n;return[t*(.8707-.131979*n+r*(-.013791+r*(.003971*n-.001529*r))),e*(1.007226+n*(.015085+r*(-.044475+.028874*n-.005916*r)))]}wf.invert=function(t,e){var n=e,r=25,i;do{var o=n*n,a=o*o;n-=i=(n*(1.007226+o*(.015085+a*(-.044475+.028874*o-.005916*a)))-e)/(1.007226+o*(.015085*3+a*(-.044475*7+.028874*9*o-.005916*11*a)))}while(ft(i)>tt&&--r>0);return[t/(.8707+(o=n*n)*(-.131979+o*(-.013791+o*o*o*(.003971-.001529*o)))),n]};function HT(){return ze(wf).scale(175.295)}function $f(t,e){return[K(e)*j(t),j(e)]}$f.invert=co(jt);function qT(){return ze($f).scale(249.5).clipAngle(90+tt)}function Sf(t,e){var n=K(e),r=1+K(t)*n;return[n*j(t)/r,j(e)/r]}Sf.invert=co(function(t){return 2*Ur(t)});function XT(){return ze(Sf).scale(250).clipAngle(142)}function Af(t,e){return[cs(Il((St+e)/2)),-t]}Af.invert=function(t,e){return[-e,2*Ur(B1(t))-St]};function VT(){var t=ty(Af),e=t.center,n=t.rotate;return t.center=function(r){return arguments.length?e([-r[1],r[0]]):(r=e(),[r[1],-r[0]])},t.rotate=function(r){return arguments.length?n([r[0],r[1],r.length>2?r[2]+90:90]):(r=n(),[r[0],r[1],r[2]-90])},n([0,0,90]).scale(159.155)}function jT(t,e){return t.parent===e.parent?1:2}function ZT(t){return t.reduce(KT,0)/t.length}function KT(t,e){return t+e.x}function QT(t){return 1+t.reduce(JT,0)}function JT(t,e){return Math.max(t,e.y)}function tP(t){for(var e;e=t.children;)t=e[0];return t}function eP(t){for(var e;e=t.children;)t=e[e.length-1];return t}function nP(){var t=jT,e=1,n=1,r=!1;function i(o){var a,s=0;o.eachAfter(function(f){var d=f.children;d?(f.x=ZT(d),f.y=QT(d)):(f.x=a?s+=t(f,a):0,f.y=0,a=f)});var u=tP(o),c=eP(o),l=u.x-t(u,c)/2,h=c.x+t(c,u)/2;return o.eachAfter(r?function(f){f.x=(f.x-o.x)*e,f.y=(o.y-f.y)*n}:function(f){f.x=(f.x-l)/(h-l)*e,f.y=(1-(o.y?f.y/o.y:1))*n})}return i.separation=function(o){return arguments.length?(t=o,i):t},i.size=function(o){return arguments.length?(r=!1,e=+o[0],n=+o[1],i):r?null:[e,n]},i.nodeSize=function(o){return arguments.length?(r=!0,e=+o[0],n=+o[1],i):r?[e,n]:null},i}function rP(t){var e=0,n=t.children,r=n&&n.length;if(!r)e=1;else for(;--r>=0;)e+=n[r].value;t.value=e}function iP(){return this.eachAfter(rP)}function oP(t,e){let n=-1;for(const r of this)t.call(e,r,++n,this);return this}function aP(t,e){for(var n=this,r=[n],i,o,a=-1;n=r.pop();)if(t.call(e,n,++a,this),i=n.children)for(o=i.length-1;o>=0;--o)r.push(i[o]);return this}function sP(t,e){for(var n=this,r=[n],i=[],o,a,s,u=-1;n=r.pop();)if(i.push(n),o=n.children)for(a=0,s=o.length;a<s;++a)r.push(o[a]);for(;n=i.pop();)t.call(e,n,++u,this);return this}function uP(t,e){let n=-1;for(const r of this)if(t.call(e,r,++n,this))return r}function cP(t){return this.eachAfter(function(e){for(var n=+t(e.data)||0,r=e.children,i=r&&r.length;--i>=0;)n+=r[i].value;e.value=n})}function lP(t){return this.eachBefore(function(e){e.children&&e.children.sort(t)})}function fP(t){for(var e=this,n=hP(e,t),r=[e];e!==n;)e=e.parent,r.push(e);for(var i=r.length;t!==n;)r.splice(i,0,t),t=t.parent;return r}function hP(t,e){if(t===e)return t;var n=t.ancestors(),r=e.ancestors(),i=null;for(t=n.pop(),e=r.pop();t===e;)i=t,t=n.pop(),e=r.pop();return i}function dP(){for(var t=this,e=[t];t=t.parent;)e.push(t);return e}function pP(){return Array.from(this)}function gP(){var t=[];return this.eachBefore(function(e){e.children||t.push(e)}),t}function mP(){var t=this,e=[];return t.each(function(n){n!==t&&e.push({source:n.parent,target:n})}),e}function*yP(){var t=this,e,n=[t],r,i,o;do for(e=n.reverse(),n=[];t=e.pop();)if(yield t,r=t.children)for(i=0,o=r.length;i<o;++i)n.push(r[i]);while(n.length)}function Mf(t,e){t instanceof Map?(t=[void 0,t],e===void 0&&(e=xP)):e===void 0&&(e=vP);for(var n=new Qn(t),r,i=[n],o,a,s,u;r=i.pop();)if((a=e(r.data))&&(u=(a=Array.from(a)).length))for(r.children=a,s=u-1;s>=0;--s)i.push(o=a[s]=new Qn(a[s])),o.parent=r,o.depth=r.depth+1;return n.eachBefore(ry)}function bP(){return Mf(this).eachBefore(_P)}function vP(t){return t.children}function xP(t){return Array.isArray(t)?t[1]:null}function _P(t){t.data.value!==void 0&&(t.value=t.data.value),t.data=t.data.data}function ry(t){var e=0;do t.height=e;while((t=t.parent)&&t.height<++e)}function Qn(t){this.data=t,this.depth=this.height=0,this.parent=null}Qn.prototype=Mf.prototype={constructor:Qn,count:iP,each:oP,eachAfter:sP,eachBefore:aP,find:uP,sum:cP,sort:lP,path:fP,ancestors:dP,descendants:pP,leaves:gP,links:mP,copy:bP,[Symbol.iterator]:yP};function Bs(t){return t==null?null:iy(t)}function iy(t){if(typeof t!="function")throw new Error;return t}function Jn(){return 0}function Vr(t){return function(){return t}}const wP=1664525,$P=1013904223,oy=4294967296;function Tf(){let t=1;return()=>(t=(wP*t+$P)%oy)/oy}function SP(t){return typeof t=="object"&&"length"in t?t:Array.from(t)}function AP(t,e){let n=t.length,r,i;for(;n;)i=e()*n--|0,r=t[n],t[n]=t[i],t[i]=r;return t}function MP(t){return ay(t,Tf())}function ay(t,e){for(var n=0,r=(t=AP(Array.from(t),e)).length,i=[],o,a;n<r;)o=t[n],a&&sy(a,o)?++n:(a=PP(i=TP(i,o)),n=0);return a}function TP(t,e){var n,r;if(Pf(e,t))return[e];for(n=0;n<t.length;++n)if(Ys(e,t[n])&&Pf(yo(t[n],e),t))return[t[n],e];for(n=0;n<t.length-1;++n)for(r=n+1;r<t.length;++r)if(Ys(yo(t[n],t[r]),e)&&Ys(yo(t[n],e),t[r])&&Ys(yo(t[r],e),t[n])&&Pf(uy(t[n],t[r],e),t))return[t[n],t[r],e];throw new Error}function Ys(t,e){var n=t.r-e.r,r=e.x-t.x,i=e.y-t.y;return n<0||n*n<r*r+i*i}function sy(t,e){var n=t.r-e.r+Math.max(t.r,e.r,1)*1e-9,r=e.x-t.x,i=e.y-t.y;return n>0&&n*n>r*r+i*i}function Pf(t,e){for(var n=0;n<e.length;++n)if(!sy(t,e[n]))return!1;return!0}function PP(t){switch(t.length){case 1:return DP(t[0]);case 2:return yo(t[0],t[1]);case 3:return uy(t[0],t[1],t[2])}}function DP(t){return{x:t.x,y:t.y,r:t.r}}function yo(t,e){var n=t.x,r=t.y,i=t.r,o=e.x,a=e.y,s=e.r,u=o-n,c=a-r,l=s-i,h=Math.sqrt(u*u+c*c);return{x:(n+o+u/h*l)/2,y:(r+a+c/h*l)/2,r:(h+i+s)/2}}function uy(t,e,n){var r=t.x,i=t.y,o=t.r,a=e.x,s=e.y,u=e.r,c=n.x,l=n.y,h=n.r,f=r-a,d=r-c,p=i-s,g=i-l,m=u-o,y=h-o,_=r*r+i*i-o*o,x=_-a*a-s*s+u*u,b=_-c*c-l*l+h*h,$=d*p-f*g,v=(p*b-g*x)/($*2)-r,w=(g*m-p*y)/$,S=(d*x-f*b)/($*2)-i,D=(f*y-d*m)/$,E=w*w+D*D-1,T=2*(o+v*w+S*D),F=v*v+S*S-o*o,M=-(Math.abs(E)>1e-6?(T+Math.sqrt(T*T-4*E*F))/(2*E):F/T);return{x:r+v+w*M,y:i+S+D*M,r:M}}function cy(t,e,n){var r=t.x-e.x,i,o,a=t.y-e.y,s,u,c=r*r+a*a;c?(o=e.r+n.r,o*=o,u=t.r+n.r,u*=u,o>u?(i=(c+u-o)/(2*c),s=Math.sqrt(Math.max(0,u/c-i*i)),n.x=t.x-i*r-s*a,n.y=t.y-i*a+s*r):(i=(c+o-u)/(2*c),s=Math.sqrt(Math.max(0,o/c-i*i)),n.x=e.x+i*r-s*a,n.y=e.y+i*a+s*r)):(n.x=e.x+n.r,n.y=e.y)}function ly(t,e){var n=t.r+e.r-1e-6,r=e.x-t.x,i=e.y-t.y;return n>0&&n*n>r*r+i*i}function fy(t){var e=t._,n=t.next._,r=e.r+n.r,i=(e.x*n.r+n.x*e.r)/r,o=(e.y*n.r+n.y*e.r)/r;return i*i+o*o}function Ws(t){this._=t,this.next=null,this.previous=null}function hy(t,e){if(!(o=(t=SP(t)).length))return 0;var n,r,i,o,a,s,u,c,l,h,f;if(n=t[0],n.x=0,n.y=0,!(o>1))return n.r;if(r=t[1],n.x=-r.r,r.x=n.r,r.y=0,!(o>2))return n.r+r.r;cy(r,n,i=t[2]),n=new Ws(n),r=new Ws(r),i=new Ws(i),n.next=i.previous=r,r.next=n.previous=i,i.next=r.previous=n;t:for(u=3;u<o;++u){cy(n._,r._,i=t[u]),i=new Ws(i),c=r.next,l=n.previous,h=r._.r,f=n._.r;do if(h<=f){if(ly(c._,i._)){r=c,n.next=r,r.previous=n,--u;continue t}h+=c._.r,c=c.next}else{if(ly(l._,i._)){n=l,n.next=r,r.previous=n,--u;continue t}f+=l._.r,l=l.previous}while(c!==l.next);for(i.previous=n,i.next=r,n.next=r.previous=r=i,a=fy(n);(i=i.next)!==r;)(s=fy(i))<a&&(n=i,a=s);r=n.next}for(n=[r._],i=r;(i=i.next)!==r;)n.push(i._);for(i=ay(n,e),u=0;u<o;++u)n=t[u],n.x-=i.x,n.y-=i.y;return i.r}function EP(t){return hy(t,Tf()),t}function kP(t){return Math.sqrt(t.value)}function LP(){var t=null,e=1,n=1,r=Jn;function i(o){const a=Tf();return o.x=e/2,o.y=n/2,t?o.eachBefore(dy(t)).eachAfter(Df(r,.5,a)).eachBefore(py(1)):o.eachBefore(dy(kP)).eachAfter(Df(Jn,1,a)).eachAfter(Df(r,o.r/Math.min(e,n),a)).eachBefore(py(Math.min(e,n)/(2*o.r))),o}return i.radius=function(o){return arguments.length?(t=Bs(o),i):t},i.size=function(o){return arguments.length?(e=+o[0],n=+o[1],i):[e,n]},i.padding=function(o){return arguments.length?(r=typeof o=="function"?o:Vr(+o),i):r},i}function dy(t){return function(e){e.children||(e.r=Math.max(0,+t(e)||0))}}function Df(t,e,n){return function(r){if(i=r.children){var i,o,a=i.length,s=t(r)*e||0,u;if(s)for(o=0;o<a;++o)i[o].r+=s;if(u=hy(i,n),s)for(o=0;o<a;++o)i[o].r-=s;r.r=u+s}}}function py(t){return function(e){var n=e.parent;e.r*=t,n&&(e.x=n.x+t*e.x,e.y=n.y+t*e.y)}}function gy(t){t.x0=Math.round(t.x0),t.y0=Math.round(t.y0),t.x1=Math.round(t.x1),t.y1=Math.round(t.y1)}function bo(t,e,n,r,i){for(var o=t.children,a,s=-1,u=o.length,c=t.value&&(r-e)/t.value;++s<u;)a=o[s],a.y0=n,a.y1=i,a.x0=e,a.x1=e+=a.value*c}function CP(){var t=1,e=1,n=0,r=!1;function i(a){var s=a.height+1;return a.x0=a.y0=n,a.x1=t,a.y1=e/s,a.eachBefore(o(e,s)),r&&a.eachBefore(gy),a}function o(a,s){return function(u){u.children&&bo(u,u.x0,a*(u.depth+1)/s,u.x1,a*(u.depth+2)/s);var c=u.x0,l=u.y0,h=u.x1-n,f=u.y1-n;h<c&&(c=h=(c+h)/2),f<l&&(l=f=(l+f)/2),u.x0=c,u.y0=l,u.x1=h,u.y1=f}}return i.round=function(a){return arguments.length?(r=!!a,i):r},i.size=function(a){return arguments.length?(t=+a[0],e=+a[1],i):[t,e]},i.padding=function(a){return arguments.length?(n=+a,i):n},i}var RP={depth:-1},my={},Ef={};function IP(t){return t.id}function NP(t){return t.parentId}function FP(){var t=IP,e=NP,n;function r(i){var o=Array.from(i),a=t,s=e,u,c,l,h,f,d,p,g,m=new Map;if(n!=null){const y=o.map((b,$)=>GP(n(b,$,i))),_=y.map(yy),x=new Set(y).add("");for(const b of _)x.has(b)||(x.add(b),y.push(b),_.push(yy(b)),o.push(Ef));a=(b,$)=>y[$],s=(b,$)=>_[$]}for(l=0,u=o.length;l<u;++l)c=o[l],d=o[l]=new Qn(c),(p=a(c,l,i))!=null&&(p+="")&&(g=d.id=p,m.set(g,m.has(g)?my:d)),(p=s(c,l,i))!=null&&(p+="")&&(d.parent=p);for(l=0;l<u;++l)if(d=o[l],p=d.parent){if(f=m.get(p),!f)throw new Error("missing: "+p);if(f===my)throw new Error("ambiguous: "+p);f.children?f.children.push(d):f.children=[d],d.parent=f}else{if(h)throw new Error("multiple roots");h=d}if(!h)throw new Error("no root");if(n!=null){for(;h.data===Ef&&h.children.length===1;)h=h.children[0],--u;for(let y=o.length-1;y>=0&&(d=o[y],d.data===Ef);--y)d.data=null}if(h.parent=RP,h.eachBefore(function(y){y.depth=y.parent.depth+1,--u}).eachBefore(ry),h.parent=null,u>0)throw new Error("cycle");return h}return r.id=function(i){return arguments.length?(t=Bs(i),r):t},r.parentId=function(i){return arguments.length?(e=Bs(i),r):e},r.path=function(i){return arguments.length?(n=Bs(i),r):n},r}function GP(t){t=`${t}`;let e=t.length;return kf(t,e-1)&&!kf(t,e-2)&&(t=t.slice(0,-1)),t[0]==="/"?t:`/${t}`}function yy(t){let e=t.length;if(e<2)return"";for(;--e>1&&!kf(t,e););return t.slice(0,e)}function kf(t,e){if(t[e]==="/"){let n=0;for(;e>0&&t[--e]==="\\";)++n;if(!(n&1))return!0}return!1}function zP(t,e){return t.parent===e.parent?1:2}function Lf(t){var e=t.children;return e?e[0]:t.t}function Cf(t){var e=t.children;return e?e[e.length-1]:t.t}function OP(t,e,n){var r=n/(e.i-t.i);e.c-=r,e.s+=n,t.c+=r,e.z+=n,e.m+=n}function UP(t){for(var e=0,n=0,r=t.children,i=r.length,o;--i>=0;)o=r[i],o.z+=e,o.m+=e,e+=o.s+(n+=o.c)}function BP(t,e,n){return t.a.parent===e.parent?t.a:n}function Hs(t,e){this._=t,this.parent=null,this.children=null,this.A=null,this.a=this,this.z=0,this.m=0,this.c=0,this.s=0,this.t=null,this.i=e}Hs.prototype=Object.create(Qn.prototype);function YP(t){for(var e=new Hs(t,0),n,r=[e],i,o,a,s;n=r.pop();)if(o=n._.children)for(n.children=new Array(s=o.length),a=s-1;a>=0;--a)r.push(i=n.children[a]=new Hs(o[a],a)),i.parent=n;return(e.parent=new Hs(null,0)).children=[e],e}function WP(){var t=zP,e=1,n=1,r=null;function i(c){var l=YP(c);if(l.eachAfter(o),l.parent.m=-l.z,l.eachBefore(a),r)c.eachBefore(u);else{var h=c,f=c,d=c;c.eachBefore(function(_){_.x<h.x&&(h=_),_.x>f.x&&(f=_),_.depth>d.depth&&(d=_)});var p=h===f?1:t(h,f)/2,g=p-h.x,m=e/(f.x+p+g),y=n/(d.depth||1);c.eachBefore(function(_){_.x=(_.x+g)*m,_.y=_.depth*y})}return c}function o(c){var l=c.children,h=c.parent.children,f=c.i?h[c.i-1]:null;if(l){UP(c);var d=(l[0].z+l[l.length-1].z)/2;f?(c.z=f.z+t(c._,f._),c.m=c.z-d):c.z=d}else f&&(c.z=f.z+t(c._,f._));c.parent.A=s(c,f,c.parent.A||h[0])}function a(c){c._.x=c.z+c.parent.m,c.m+=c.parent.m}function s(c,l,h){if(l){for(var f=c,d=c,p=l,g=f.parent.children[0],m=f.m,y=d.m,_=p.m,x=g.m,b;p=Cf(p),f=Lf(f),p&&f;)g=Lf(g),d=Cf(d),d.a=c,b=p.z+_-f.z-m+t(p._,f._),b>0&&(OP(BP(p,c,h),c,b),m+=b,y+=b),_+=p.m,m+=f.m,x+=g.m,y+=d.m;p&&!Cf(d)&&(d.t=p,d.m+=_-y),f&&!Lf(g)&&(g.t=f,g.m+=m-x,h=c)}return h}function u(c){c.x*=e,c.y=c.depth*n}return i.separation=function(c){return arguments.length?(t=c,i):t},i.size=function(c){return arguments.length?(r=!1,e=+c[0],n=+c[1],i):r?null:[e,n]},i.nodeSize=function(c){return arguments.length?(r=!0,e=+c[0],n=+c[1],i):r?[e,n]:null},i}function qs(t,e,n,r,i){for(var o=t.children,a,s=-1,u=o.length,c=t.value&&(i-n)/t.value;++s<u;)a=o[s],a.x0=e,a.x1=r,a.y0=n,a.y1=n+=a.value*c}var by=(1+Math.sqrt(5))/2;function vy(t,e,n,r,i,o){for(var a=[],s=e.children,u,c,l=0,h=0,f=s.length,d,p,g=e.value,m,y,_,x,b,$,v;l<f;){d=i-n,p=o-r;do m=s[h++].value;while(!m&&h<f);for(y=_=m,$=Math.max(p/d,d/p)/(g*t),v=m*m*$,b=Math.max(_/v,v/y);h<f;++h){if(m+=c=s[h].value,c<y&&(y=c),c>_&&(_=c),v=m*m*$,x=Math.max(_/v,v/y),x>b){m-=c;break}b=x}a.push(u={value:m,dice:d<p,children:s.slice(l,h)}),u.dice?bo(u,n,r,i,g?r+=p*m/g:o):qs(u,n,r,g?n+=d*m/g:i,o),g-=m,l=h}return a}const xy=function t(e){function n(r,i,o,a,s){vy(e,r,i,o,a,s)}return n.ratio=function(r){return t((r=+r)>1?r:1)},n}(by);function HP(){var t=xy,e=!1,n=1,r=1,i=[0],o=Jn,a=Jn,s=Jn,u=Jn,c=Jn;function l(f){return f.x0=f.y0=0,f.x1=n,f.y1=r,f.eachBefore(h),i=[0],e&&f.eachBefore(gy),f}function h(f){var d=i[f.depth],p=f.x0+d,g=f.y0+d,m=f.x1-d,y=f.y1-d;m<p&&(p=m=(p+m)/2),y<g&&(g=y=(g+y)/2),f.x0=p,f.y0=g,f.x1=m,f.y1=y,f.children&&(d=i[f.depth+1]=o(f)/2,p+=c(f)-d,g+=a(f)-d,m-=s(f)-d,y-=u(f)-d,m<p&&(p=m=(p+m)/2),y<g&&(g=y=(g+y)/2),t(f,p,g,m,y))}return l.round=function(f){return arguments.length?(e=!!f,l):e},l.size=function(f){return arguments.length?(n=+f[0],r=+f[1],l):[n,r]},l.tile=function(f){return arguments.length?(t=iy(f),l):t},l.padding=function(f){return arguments.length?l.paddingInner(f).paddingOuter(f):l.paddingInner()},l.paddingInner=function(f){return arguments.length?(o=typeof f=="function"?f:Vr(+f),l):o},l.paddingOuter=function(f){return arguments.length?l.paddingTop(f).paddingRight(f).paddingBottom(f).paddingLeft(f):l.paddingTop()},l.paddingTop=function(f){return arguments.length?(a=typeof f=="function"?f:Vr(+f),l):a},l.paddingRight=function(f){return arguments.length?(s=typeof f=="function"?f:Vr(+f),l):s},l.paddingBottom=function(f){return arguments.length?(u=typeof f=="function"?f:Vr(+f),l):u},l.paddingLeft=function(f){return arguments.length?(c=typeof f=="function"?f:Vr(+f),l):c},l}function qP(t,e,n,r,i){var o=t.children,a,s=o.length,u,c=new Array(s+1);for(c[0]=u=a=0;a<s;++a)c[a+1]=u+=o[a].value;l(0,s,t.value,e,n,r,i);function l(h,f,d,p,g,m,y){if(h>=f-1){var _=o[h];_.x0=p,_.y0=g,_.x1=m,_.y1=y;return}for(var x=c[h],b=d/2+x,$=h+1,v=f-1;$<v;){var w=$+v>>>1;c[w]<b?$=w+1:v=w}b-c[$-1]<c[$]-b&&h+1<$&&--$;var S=c[$]-x,D=d-S;if(m-p>y-g){var E=d?(p*D+m*S)/d:m;l(h,$,S,p,g,E,y),l($,f,D,E,g,m,y)}else{var T=d?(g*D+y*S)/d:y;l(h,$,S,p,g,m,T),l($,f,D,p,T,m,y)}}}function XP(t,e,n,r,i){(t.depth&1?qs:bo)(t,e,n,r,i)}const VP=function t(e){function n(r,i,o,a,s){if((u=r._squarify)&&u.ratio===e)for(var u,c,l,h,f=-1,d,p=u.length,g=r.value;++f<p;){for(c=u[f],l=c.children,h=c.value=0,d=l.length;h<d;++h)c.value+=l[h].value;c.dice?bo(c,i,o,a,g?o+=(s-o)*c.value/g:s):qs(c,i,o,g?i+=(a-i)*c.value/g:a,s),g-=c.value}else r._squarify=u=vy(e,r,i,o,a,s),u.ratio=e}return n.ratio=function(r){return t((r=+r)>1?r:1)},n}(by);function jP(t){for(var e=-1,n=t.length,r,i=t[n-1],o=0;++e<n;)r=i,i=t[e],o+=r[1]*i[0]-r[0]*i[1];return o/2}function ZP(t){for(var e=-1,n=t.length,r=0,i=0,o,a=t[n-1],s,u=0;++e<n;)o=a,a=t[e],u+=s=o[0]*a[1]-a[0]*o[1],r+=(o[0]+a[0])*s,i+=(o[1]+a[1])*s;return u*=3,[r/u,i/u]}function KP(t,e,n){return(e[0]-t[0])*(n[1]-t[1])-(e[1]-t[1])*(n[0]-t[0])}function QP(t,e){return t[0]-e[0]||t[1]-e[1]}function _y(t){const e=t.length,n=[0,1];let r=2,i;for(i=2;i<e;++i){for(;r>1&&KP(t[n[r-2]],t[n[r-1]],t[i])<=0;)--r;n[r++]=i}return n.slice(0,r)}function JP(t){if((n=t.length)<3)return null;var e,n,r=new Array(n),i=new Array(n);for(e=0;e<n;++e)r[e]=[+t[e][0],+t[e][1],e];for(r.sort(QP),e=0;e<n;++e)i[e]=[r[e][0],-r[e][1]];var o=_y(r),a=_y(i),s=a[0]===o[0],u=a[a.length-1]===o[o.length-1],c=[];for(e=o.length-1;e>=0;--e)c.push(t[r[o[e]][2]]);for(e=+s;e<a.length-u;++e)c.push(t[r[a[e]][2]]);return c}function tD(t,e){for(var n=t.length,r=t[n-1],i=e[0],o=e[1],a=r[0],s=r[1],u,c,l=!1,h=0;h<n;++h)r=t[h],u=r[0],c=r[1],c>o!=s>o&&i<(a-u)*(o-c)/(s-c)+u&&(l=!l),a=u,s=c;return l}function eD(t){for(var e=-1,n=t.length,r=t[n-1],i,o,a=r[0],s=r[1],u=0;++e<n;)i=a,o=s,r=t[e],a=r[0],s=r[1],i-=a,o-=s,u+=Math.hypot(i,o);return u}const It=Math.random,nD=function t(e){function n(r,i){return r=r==null?0:+r,i=i==null?1:+i,arguments.length===1?(i=r,r=0):i-=r,function(){return e()*i+r}}return n.source=t,n}(It),rD=function t(e){function n(r,i){return arguments.length<2&&(i=r,r=0),r=Math.floor(r),i=Math.floor(i)-r,function(){return Math.floor(e()*i+r)}}return n.source=t,n}(It),Rf=function t(e){function n(r,i){var o,a;return r=r==null?0:+r,i=i==null?1:+i,function(){var s;if(o!=null)s=o,o=null;else do o=e()*2-1,s=e()*2-1,a=o*o+s*s;while(!a||a>1);return r+i*s*Math.sqrt(-2*Math.log(a)/a)}}return n.source=t,n}(It),iD=function t(e){var n=Rf.source(e);function r(){var i=n.apply(this,arguments);return function(){return Math.exp(i())}}return r.source=t,r}(It),wy=function t(e){function n(r){return(r=+r)<=0?()=>0:function(){for(var i=0,o=r;o>1;--o)i+=e();return i+o*e()}}return n.source=t,n}(It),oD=function t(e){var n=wy.source(e);function r(i){if((i=+i)==0)return e;var o=n(i);return function(){return o()/i}}return r.source=t,r}(It),aD=function t(e){function n(r){return function(){return-Math.log1p(-e())/r}}return n.source=t,n}(It),sD=function t(e){function n(r){if((r=+r)<0)throw new RangeError("invalid alpha");return r=1/-r,function(){return Math.pow(1-e(),r)}}return n.source=t,n}(It),uD=function t(e){function n(r){if((r=+r)<0||r>1)throw new RangeError("invalid p");return function(){return Math.floor(e()+r)}}return n.source=t,n}(It),$y=function t(e){function n(r){if((r=+r)<0||r>1)throw new RangeError("invalid p");return r===0?()=>1/0:r===1?()=>1:(r=Math.log1p(-r),function(){return 1+Math.floor(Math.log1p(-e())/r)})}return n.source=t,n}(It),If=function t(e){var n=Rf.source(e)();function r(i,o){if((i=+i)<0)throw new RangeError("invalid k");if(i===0)return()=>0;if(o=o==null?1:+o,i===1)return()=>-Math.log1p(-e())*o;var a=(i<1?i+1:i)-1/3,s=1/(3*Math.sqrt(a)),u=i<1?()=>Math.pow(e(),1/i):()=>1;return function(){do{do var c=n(),l=1+s*c;while(l<=0);l*=l*l;var h=1-e()}while(h>=1-.0331*c*c*c*c&&Math.log(h)>=.5*c*c+a*(1-l+Math.log(l)));return a*l*u()*o}}return r.source=t,r}(It),Sy=function t(e){var n=If.source(e);function r(i,o){var a=n(i),s=n(o);return function(){var u=a();return u===0?0:u/(u+s())}}return r.source=t,r}(It),Ay=function t(e){var n=$y.source(e),r=Sy.source(e);function i(o,a){return o=+o,(a=+a)>=1?()=>o:a<=0?()=>0:function(){for(var s=0,u=o,c=a;u*c>16&&u*(1-c)>16;){var l=Math.floor((u+1)*c),h=r(l,u-l+1)();h<=c?(s+=l,u-=l,c=(c-h)/(1-h)):(u=l-1,c/=h)}for(var f=c<.5,d=f?c:1-c,p=n(d),g=p(),m=0;g<=u;++m)g+=p();return s+(f?m:u-m)}}return i.source=t,i}(It),cD=function t(e){function n(r,i,o){var a;return(r=+r)==0?a=s=>-Math.log(s):(r=1/r,a=s=>Math.pow(s,r)),i=i==null?0:+i,o=o==null?1:+o,function(){return i+o*a(-Math.log1p(-e()))}}return n.source=t,n}(It),lD=function t(e){function n(r,i){return r=r==null?0:+r,i=i==null?1:+i,function(){return r+i*Math.tan(Math.PI*e())}}return n.source=t,n}(It),fD=function t(e){function n(r,i){return r=r==null?0:+r,i=i==null?1:+i,function(){var o=e();return r+i*Math.log(o/(1-o))}}return n.source=t,n}(It),hD=function t(e){var n=If.source(e),r=Ay.source(e);function i(o){return function(){for(var a=0,s=o;s>16;){var u=Math.floor(.875*s),c=n(u)();if(c>s)return a+r(u-1,s/c)();a+=u,s-=c}for(var l=-Math.log1p(-e()),h=0;l<=s;++h)l-=Math.log1p(-e());return a+h}}return i.source=t,i}(It),dD=1664525,pD=1013904223,My=1/4294967296;function gD(t=Math.random()){let e=(0<=t&&t<1?t/My:Math.abs(t))|0;return()=>(e=dD*e+pD|0,My*(e>>>0))}function pe(t,e){switch(arguments.length){case 0:break;case 1:this.range(t);break;default:this.range(e).domain(t);break}return this}function tn(t,e){switch(arguments.length){case 0:break;case 1:{typeof t=="function"?this.interpolator(t):this.range(t);break}default:{this.domain(t),typeof e=="function"?this.interpolator(e):this.range(e);break}}return this}const Nf=Symbol("implicit");function Ff(){var t=new Ai,e=[],n=[],r=Nf;function i(o){let a=t.get(o);if(a===void 0){if(r!==Nf)return r;t.set(o,a=e.push(o)-1)}return n[a%n.length]}return i.domain=function(o){if(!arguments.length)return e.slice();e=[],t=new Ai;for(const a of o)t.has(a)||t.set(a,e.push(a)-1);return i},i.range=function(o){return arguments.length?(n=Array.from(o),i):n.slice()},i.unknown=function(o){return arguments.length?(r=o,i):r},i.copy=function(){return Ff(e,n).unknown(r)},pe.apply(i,arguments),i}function Gf(){var t=Ff().unknown(void 0),e=t.domain,n=t.range,r=0,i=1,o,a,s=!1,u=0,c=0,l=.5;delete t.unknown;function h(){var f=e().length,d=i<r,p=d?i:r,g=d?r:i;o=(g-p)/Math.max(1,f-u+c*2),s&&(o=Math.floor(o)),p+=(g-p-o*(f-u))*l,a=o*(1-u),s&&(p=Math.round(p),a=Math.round(a));var m=cn(f).map(function(y){return p+o*y});return n(d?m.reverse():m)}return t.domain=function(f){return arguments.length?(e(f),h()):e()},t.range=function(f){return arguments.length?([r,i]=f,r=+r,i=+i,h()):[r,i]},t.rangeRound=function(f){return[r,i]=f,r=+r,i=+i,s=!0,h()},t.bandwidth=function(){return a},t.step=function(){return o},t.round=function(f){return arguments.length?(s=!!f,h()):s},t.padding=function(f){return arguments.length?(u=Math.min(1,c=+f),h()):u},t.paddingInner=function(f){return arguments.length?(u=Math.min(1,f),h()):u},t.paddingOuter=function(f){return arguments.length?(c=+f,h()):c},t.align=function(f){return arguments.length?(l=Math.max(0,Math.min(1,f)),h()):l},t.copy=function(){return Gf(e(),[r,i]).round(s).paddingInner(u).paddingOuter(c).align(l)},pe.apply(h(),arguments)}function Ty(t){var e=t.copy;return t.padding=t.paddingOuter,delete t.paddingInner,delete t.paddingOuter,t.copy=function(){return Ty(e())},t}function zf(){return Ty(Gf.apply(null,arguments).paddingInner(1))}function mD(t){return function(){return t}}function Xs(t){return+t}var Py=[0,1];function Jt(t){return t}function Of(t,e){return(e-=t=+t)?function(n){return(n-t)/e}:mD(isNaN(e)?NaN:.5)}function yD(t,e){var n;return t>e&&(n=t,t=e,e=n),function(r){return Math.max(t,Math.min(e,r))}}function bD(t,e,n){var r=t[0],i=t[1],o=e[0],a=e[1];return i<r?(r=Of(i,r),o=n(a,o)):(r=Of(r,i),o=n(o,a)),function(s){return o(r(s))}}function vD(t,e,n){var r=Math.min(t.length,e.length)-1,i=new Array(r),o=new Array(r),a=-1;for(t[r]<t[0]&&(t=t.slice().reverse(),e=e.slice().reverse());++a<r;)i[a]=Of(t[a],t[a+1]),o[a]=n(e[a],e[a+1]);return function(s){var u=En(t,s,1,r)-1;return o[u](i[u](s))}}function vo(t,e){return e.domain(t.domain()).range(t.range()).interpolate(t.interpolate()).clamp(t.clamp()).unknown(t.unknown())}function Vs(){var t=Py,e=Py,n=hn,r,i,o,a=Jt,s,u,c;function l(){var f=Math.min(t.length,e.length);return a!==Jt&&(a=yD(t[0],t[f-1])),s=f>2?vD:bD,u=c=null,h}function h(f){return f==null||isNaN(f=+f)?o:(u||(u=s(t.map(r),e,n)))(r(a(f)))}return h.invert=function(f){return a(i((c||(c=s(e,t.map(r),fe)))(f)))},h.domain=function(f){return arguments.length?(t=Array.from(f,Xs),l()):t.slice()},h.range=function(f){return arguments.length?(e=Array.from(f),l()):e.slice()},h.rangeRound=function(f){return e=Array.from(f),n=Fa,l()},h.clamp=function(f){return arguments.length?(a=f?!0:Jt,l()):a!==Jt},h.interpolate=function(f){return arguments.length?(n=f,l()):n},h.unknown=function(f){return arguments.length?(o=f,h):o},function(f,d){return r=f,i=d,l()}}function Uf(){return Vs()(Jt,Jt)}function Dy(t,e,n,r){var i=pa(t,e,n),o;switch(r=Or(r??",f"),r.type){case"s":{var a=Math.max(Math.abs(t),Math.abs(e));return r.precision==null&&!isNaN(o=O1(i,a))&&(r.precision=o),Ll(r,a)}case"":case"e":case"g":case"p":case"r":{r.precision==null&&!isNaN(o=U1(i,Math.max(Math.abs(t),Math.abs(e))))&&(r.precision=o-(r.type==="e"));break}case"f":case"%":{r.precision==null&&!isNaN(o=z1(i))&&(r.precision=o-(r.type==="%")*2);break}}return ji(r)}function yn(t){var e=t.domain;return t.ticks=function(n){var r=e();return Ln(r[0],r[r.length-1],n??10)},t.tickFormat=function(n,r){var i=e();return Dy(i[0],i[i.length-1],n??10,r)},t.nice=function(n){n==null&&(n=10);var r=e(),i=0,o=r.length-1,a=r[i],s=r[o],u,c,l=10;for(s<a&&(c=a,a=s,s=c,c=i,i=o,o=c);l-- >0;){if(c=Cn(a,s,n),c===u)return r[i]=a,r[o]=s,e(r);if(c>0)a=Math.floor(a/c)*c,s=Math.ceil(s/c)*c;else if(c<0)a=Math.ceil(a*c)/c,s=Math.floor(s*c)/c;else break;u=c}return t},t}function Bf(){var t=Uf();return t.copy=function(){return vo(t,Bf())},pe.apply(t,arguments),yn(t)}function Ey(t){var e;function n(r){return r==null||isNaN(r=+r)?e:r}return n.invert=n,n.domain=n.range=function(r){return arguments.length?(t=Array.from(r,Xs),n):t.slice()},n.unknown=function(r){return arguments.length?(e=r,n):e},n.copy=function(){return Ey(t).unknown(e)},t=arguments.length?Array.from(t,Xs):[0,1],yn(n)}function ky(t,e){t=t.slice();var n=0,r=t.length-1,i=t[n],o=t[r],a;return o<i&&(a=n,n=r,r=a,a=i,i=o,o=a),t[n]=e.floor(i),t[r]=e.ceil(o),t}function Ly(t){return Math.log(t)}function Cy(t){return Math.exp(t)}function xD(t){return-Math.log(-t)}function _D(t){return-Math.exp(-t)}function wD(t){return isFinite(t)?+("1e"+t):t<0?0:t}function $D(t){return t===10?wD:t===Math.E?Math.exp:e=>Math.pow(t,e)}function SD(t){return t===Math.E?Math.log:t===10&&Math.log10||t===2&&Math.log2||(t=Math.log(t),e=>Math.log(e)/t)}function Ry(t){return(e,n)=>-t(-e,n)}function Yf(t){const e=t(Ly,Cy),n=e.domain;let r=10,i,o;function a(){return i=SD(r),o=$D(r),n()[0]<0?(i=Ry(i),o=Ry(o),t(xD,_D)):t(Ly,Cy),e}return e.base=function(s){return arguments.length?(r=+s,a()):r},e.domain=function(s){return arguments.length?(n(s),a()):n()},e.ticks=s=>{const u=n();let c=u[0],l=u[u.length-1];const h=l<c;h&&([c,l]=[l,c]);let f=i(c),d=i(l),p,g;const m=s==null?10:+s;let y=[];if(!(r%1)&&d-f<m){if(f=Math.floor(f),d=Math.ceil(d),c>0){for(;f<=d;++f)for(p=1;p<r;++p)if(g=f<0?p/o(-f):p*o(f),!(g<c)){if(g>l)break;y.push(g)}}else for(;f<=d;++f)for(p=r-1;p>=1;--p)if(g=f>0?p/o(-f):p*o(f),!(g<c)){if(g>l)break;y.push(g)}y.length*2<m&&(y=Ln(c,l,m))}else y=Ln(f,d,Math.min(d-f,m)).map(o);return h?y.reverse():y},e.tickFormat=(s,u)=>{if(s==null&&(s=10),u==null&&(u=r===10?"s":","),typeof u!="function"&&(!(r%1)&&(u=Or(u)).precision==null&&(u.trim=!0),u=ji(u)),s===1/0)return u;const c=Math.max(1,r*s/e.ticks().length);return l=>{let h=l/o(Math.round(i(l)));return h*r<r-.5&&(h*=r),h<=c?u(l):""}},e.nice=()=>n(ky(n(),{floor:s=>o(Math.floor(i(s))),ceil:s=>o(Math.ceil(i(s)))})),e}function Iy(){const t=Yf(Vs()).domain([1,10]);return t.copy=()=>vo(t,Iy()).base(t.base()),pe.apply(t,arguments),t}function Ny(t){return function(e){return Math.sign(e)*Math.log1p(Math.abs(e/t))}}function Fy(t){return function(e){return Math.sign(e)*Math.expm1(Math.abs(e))*t}}function Wf(t){var e=1,n=t(Ny(e),Fy(e));return n.constant=function(r){return arguments.length?t(Ny(e=+r),Fy(e)):e},yn(n)}function Gy(){var t=Wf(Vs());return t.copy=function(){return vo(t,Gy()).constant(t.constant())},pe.apply(t,arguments)}function zy(t){return function(e){return e<0?-Math.pow(-e,t):Math.pow(e,t)}}function AD(t){return t<0?-Math.sqrt(-t):Math.sqrt(t)}function MD(t){return t<0?-t*t:t*t}function Hf(t){var e=t(Jt,Jt),n=1;function r(){return n===1?t(Jt,Jt):n===.5?t(AD,MD):t(zy(n),zy(1/n))}return e.exponent=function(i){return arguments.length?(n=+i,r()):n},yn(e)}function js(){var t=Hf(Vs());return t.copy=function(){return vo(t,js()).exponent(t.exponent())},pe.apply(t,arguments),t}function TD(){return js.apply(null,arguments).exponent(.5)}function Oy(t){return Math.sign(t)*t*t}function PD(t){return Math.sign(t)*Math.sqrt(Math.abs(t))}function Uy(){var t=Uf(),e=[0,1],n=!1,r;function i(o){var a=PD(t(o));return isNaN(a)?r:n?Math.round(a):a}return i.invert=function(o){return t.invert(Oy(o))},i.domain=function(o){return arguments.length?(t.domain(o),i):t.domain()},i.range=function(o){return arguments.length?(t.range((e=Array.from(o,Xs)).map(Oy)),i):e.slice()},i.rangeRound=function(o){return i.range(o).round(!0)},i.round=function(o){return arguments.length?(n=!!o,i):n},i.clamp=function(o){return arguments.length?(t.clamp(o),i):t.clamp()},i.unknown=function(o){return arguments.length?(r=o,i):r},i.copy=function(){return Uy(t.domain(),e).round(n).clamp(t.clamp()).unknown(r)},pe.apply(i,arguments),yn(i)}function By(){var t=[],e=[],n=[],r;function i(){var a=0,s=Math.max(1,e.length);for(n=new Array(s-1);++a<s;)n[a-1]=xp(t,a/s);return o}function o(a){return a==null||isNaN(a=+a)?r:e[En(n,a)]}return o.invertExtent=function(a){var s=e.indexOf(a);return s<0?[NaN,NaN]:[s>0?n[s-1]:t[0],s<n.length?n[s]:t[t.length-1]]},o.domain=function(a){if(!arguments.length)return t.slice();t=[];for(let s of a)s!=null&&!isNaN(s=+s)&&t.push(s);return t.sort(_t),i()},o.range=function(a){return arguments.length?(e=Array.from(a),i()):e.slice()},o.unknown=function(a){return arguments.length?(r=a,o):r},o.quantiles=function(){return n.slice()},o.copy=function(){return By().domain(t).range(e).unknown(r)},pe.apply(o,arguments)}function Yy(){var t=0,e=1,n=1,r=[.5],i=[0,1],o;function a(u){return u!=null&&u<=u?i[En(r,u,0,n)]:o}function s(){var u=-1;for(r=new Array(n);++u<n;)r[u]=((u+1)*e-(u-n)*t)/(n+1);return a}return a.domain=function(u){return arguments.length?([t,e]=u,t=+t,e=+e,s()):[t,e]},a.range=function(u){return arguments.length?(n=(i=Array.from(u)).length-1,s()):i.slice()},a.invertExtent=function(u){var c=i.indexOf(u);return c<0?[NaN,NaN]:c<1?[t,r[0]]:c>=n?[r[n-1],e]:[r[c-1],r[c]]},a.unknown=function(u){return arguments.length&&(o=u),a},a.thresholds=function(){return r.slice()},a.copy=function(){return Yy().domain([t,e]).range(i).unknown(o)},pe.apply(yn(a),arguments)}function Wy(){var t=[.5],e=[0,1],n,r=1;function i(o){return o!=null&&o<=o?e[En(t,o,0,r)]:n}return i.domain=function(o){return arguments.length?(t=Array.from(o),r=Math.min(t.length,e.length-1),i):t.slice()},i.range=function(o){return arguments.length?(e=Array.from(o),r=Math.min(t.length,e.length-1),i):e.slice()},i.invertExtent=function(o){var a=e.indexOf(o);return[t[a-1],t[a]]},i.unknown=function(o){return arguments.length?(n=o,i):n},i.copy=function(){return Wy().domain(t).range(e).unknown(n)},pe.apply(i,arguments)}const qf=new Date,Xf=new Date;function Tt(t,e,n,r){function i(o){return t(o=arguments.length===0?new Date:new Date(+o)),o}return i.floor=o=>(t(o=new Date(+o)),o),i.ceil=o=>(t(o=new Date(o-1)),e(o,1),t(o),o),i.round=o=>{const a=i(o),s=i.ceil(o);return o-a<s-o?a:s},i.offset=(o,a)=>(e(o=new Date(+o),a==null?1:Math.floor(a)),o),i.range=(o,a,s)=>{const u=[];if(o=i.ceil(o),s=s==null?1:Math.floor(s),!(o<a)||!(s>0))return u;let c;do u.push(c=new Date(+o)),e(o,s),t(o);while(c<o&&o<a);return u},i.filter=o=>Tt(a=>{if(a>=a)for(;t(a),!o(a);)a.setTime(a-1)},(a,s)=>{if(a>=a)if(s<0)for(;++s<=0;)for(;e(a,-1),!o(a););else for(;--s>=0;)for(;e(a,1),!o(a););}),n&&(i.count=(o,a)=>(qf.setTime(+o),Xf.setTime(+a),t(qf),t(Xf),Math.floor(n(qf,Xf))),i.every=o=>(o=Math.floor(o),!isFinite(o)||!(o>0)?null:o>1?i.filter(r?a=>r(a)%o===0:a=>i.count(0,a)%o===0):i)),i}const jr=Tt(()=>{},(t,e)=>{t.setTime(+t+e)},(t,e)=>e-t);jr.every=t=>(t=Math.floor(t),!isFinite(t)||!(t>0)?null:t>1?Tt(e=>{e.setTime(Math.floor(e/t)*t)},(e,n)=>{e.setTime(+e+n*t)},(e,n)=>(n-e)/t):jr);const Hy=jr.range,en=1e3,ge=en*60,nn=ge*60,rn=nn*24,Vf=rn*7,qy=rn*30,jf=rn*365,on=Tt(t=>{t.setTime(t-t.getMilliseconds())},(t,e)=>{t.setTime(+t+e*en)},(t,e)=>(e-t)/en,t=>t.getUTCSeconds()),Xy=on.range,Zs=Tt(t=>{t.setTime(t-t.getMilliseconds()-t.getSeconds()*en)},(t,e)=>{t.setTime(+t+e*ge)},(t,e)=>(e-t)/ge,t=>t.getMinutes()),DD=Zs.range,Ks=Tt(t=>{t.setUTCSeconds(0,0)},(t,e)=>{t.setTime(+t+e*ge)},(t,e)=>(e-t)/ge,t=>t.getUTCMinutes()),ED=Ks.range,Qs=Tt(t=>{t.setTime(t-t.getMilliseconds()-t.getSeconds()*en-t.getMinutes()*ge)},(t,e)=>{t.setTime(+t+e*nn)},(t,e)=>(e-t)/nn,t=>t.getHours()),kD=Qs.range,Js=Tt(t=>{t.setUTCMinutes(0,0,0)},(t,e)=>{t.setTime(+t+e*nn)},(t,e)=>(e-t)/nn,t=>t.getUTCHours()),LD=Js.range,Zr=Tt(t=>t.setHours(0,0,0,0),(t,e)=>t.setDate(t.getDate()+e),(t,e)=>(e-t-(e.getTimezoneOffset()-t.getTimezoneOffset())*ge)/rn,t=>t.getDate()-1),CD=Zr.range,xo=Tt(t=>{t.setUTCHours(0,0,0,0)},(t,e)=>{t.setUTCDate(t.getUTCDate()+e)},(t,e)=>(e-t)/rn,t=>t.getUTCDate()-1),RD=xo.range,Zf=Tt(t=>{t.setUTCHours(0,0,0,0)},(t,e)=>{t.setUTCDate(t.getUTCDate()+e)},(t,e)=>(e-t)/rn,t=>Math.floor(t/rn)),ID=Zf.range;function tr(t){return Tt(e=>{e.setDate(e.getDate()-(e.getDay()+7-t)%7),e.setHours(0,0,0,0)},(e,n)=>{e.setDate(e.getDate()+n*7)},(e,n)=>(n-e-(n.getTimezoneOffset()-e.getTimezoneOffset())*ge)/Vf)}const Kr=tr(0),_o=tr(1),Vy=tr(2),jy=tr(3),er=tr(4),Zy=tr(5),Ky=tr(6),Qy=Kr.range,ND=_o.range,FD=Vy.range,GD=jy.range,zD=er.range,OD=Zy.range,UD=Ky.range;function nr(t){return Tt(e=>{e.setUTCDate(e.getUTCDate()-(e.getUTCDay()+7-t)%7),e.setUTCHours(0,0,0,0)},(e,n)=>{e.setUTCDate(e.getUTCDate()+n*7)},(e,n)=>(n-e)/Vf)}const Qr=nr(0),wo=nr(1),Jy=nr(2),tb=nr(3),rr=nr(4),eb=nr(5),nb=nr(6),rb=Qr.range,BD=wo.range,YD=Jy.range,WD=tb.range,HD=rr.range,qD=eb.range,XD=nb.range,tu=Tt(t=>{t.setDate(1),t.setHours(0,0,0,0)},(t,e)=>{t.setMonth(t.getMonth()+e)},(t,e)=>e.getMonth()-t.getMonth()+(e.getFullYear()-t.getFullYear())*12,t=>t.getMonth()),VD=tu.range,eu=Tt(t=>{t.setUTCDate(1),t.setUTCHours(0,0,0,0)},(t,e)=>{t.setUTCMonth(t.getUTCMonth()+e)},(t,e)=>e.getUTCMonth()-t.getUTCMonth()+(e.getUTCFullYear()-t.getUTCFullYear())*12,t=>t.getUTCMonth()),jD=eu.range,Oe=Tt(t=>{t.setMonth(0,1),t.setHours(0,0,0,0)},(t,e)=>{t.setFullYear(t.getFullYear()+e)},(t,e)=>e.getFullYear()-t.getFullYear(),t=>t.getFullYear());Oe.every=t=>!isFinite(t=Math.floor(t))||!(t>0)?null:Tt(e=>{e.setFullYear(Math.floor(e.getFullYear()/t)*t),e.setMonth(0,1),e.setHours(0,0,0,0)},(e,n)=>{e.setFullYear(e.getFullYear()+n*t)});const ZD=Oe.range,Ue=Tt(t=>{t.setUTCMonth(0,1),t.setUTCHours(0,0,0,0)},(t,e)=>{t.setUTCFullYear(t.getUTCFullYear()+e)},(t,e)=>e.getUTCFullYear()-t.getUTCFullYear(),t=>t.getUTCFullYear());Ue.every=t=>!isFinite(t=Math.floor(t))||!(t>0)?null:Tt(e=>{e.setUTCFullYear(Math.floor(e.getUTCFullYear()/t)*t),e.setUTCMonth(0,1),e.setUTCHours(0,0,0,0)},(e,n)=>{e.setUTCFullYear(e.getUTCFullYear()+n*t)});const KD=Ue.range;function ib(t,e,n,r,i,o){const a=[[on,1,en],[on,5,5*en],[on,15,15*en],[on,30,30*en],[o,1,ge],[o,5,5*ge],[o,15,15*ge],[o,30,30*ge],[i,1,nn],[i,3,3*nn],[i,6,6*nn],[i,12,12*nn],[r,1,rn],[r,2,2*rn],[n,1,Vf],[e,1,qy],[e,3,3*qy],[t,1,jf]];function s(c,l,h){const f=l<c;f&&([c,l]=[l,c]);const d=h&&typeof h.range=="function"?h:u(c,l,h),p=d?d.range(c,+l+1):[];return f?p.reverse():p}function u(c,l,h){const f=Math.abs(l-c)/h,d=la(([,,m])=>m).right(a,f);if(d===a.length)return t.every(pa(c/jf,l/jf,h));if(d===0)return jr.every(Math.max(pa(c,l,h),1));const[p,g]=a[f/a[d-1][2]<a[d][2]/f?d-1:d];return p.every(g)}return[s,u]}const[ob,ab]=ib(Ue,eu,Qr,Zf,Js,Ks),[sb,ub]=ib(Oe,tu,Kr,Zr,Qs,Zs);function Kf(t){if(0<=t.y&&t.y<100){var e=new Date(-1,t.m,t.d,t.H,t.M,t.S,t.L);return e.setFullYear(t.y),e}return new Date(t.y,t.m,t.d,t.H,t.M,t.S,t.L)}function Qf(t){if(0<=t.y&&t.y<100){var e=new Date(Date.UTC(-1,t.m,t.d,t.H,t.M,t.S,t.L));return e.setUTCFullYear(t.y),e}return new Date(Date.UTC(t.y,t.m,t.d,t.H,t.M,t.S,t.L))}function $o(t,e,n){return{y:t,m:e,d:n,H:0,M:0,S:0,L:0}}function cb(t){var e=t.dateTime,n=t.date,r=t.time,i=t.periods,o=t.days,a=t.shortDays,s=t.months,u=t.shortMonths,c=So(i),l=Ao(i),h=So(o),f=Ao(o),d=So(a),p=Ao(a),g=So(s),m=Ao(s),y=So(u),_=Ao(u),x={a:I,A:z,b:k,B:R,c:null,d:gb,e:gb,f:xE,g:EE,G:LE,H:yE,I:bE,j:vE,L:mb,m:_E,M:wE,p:N,q:C,Q:wb,s:$b,S:$E,u:SE,U:AE,V:ME,w:TE,W:PE,x:null,X:null,y:DE,Y:kE,Z:CE,"%":_b},b={a:O,A:X,b:W,B:V,c:null,d:bb,e:bb,f:FE,g:XE,G:jE,H:RE,I:IE,j:NE,L:vb,m:GE,M:zE,p:J,q:pt,Q:wb,s:$b,S:OE,u:UE,U:BE,V:YE,w:WE,W:HE,x:null,X:null,y:qE,Y:VE,Z:ZE,"%":_b},$={a:E,A:T,b:F,B:M,c:A,d:db,e:db,f:dE,g:hb,G:fb,H:pb,I:pb,j:cE,L:hE,m:uE,M:lE,p:D,q:sE,Q:gE,s:mE,S:fE,u:nE,U:rE,V:iE,w:eE,W:oE,x:L,X:P,y:hb,Y:fb,Z:aE,"%":pE};x.x=v(n,x),x.X=v(r,x),x.c=v(e,x),b.x=v(n,b),b.X=v(r,b),b.c=v(e,b);function v(q,rt){return function(ut){var Y=[],xt=-1,gt=0,Nt=q.length,te,nt,Mt;for(ut instanceof Date||(ut=new Date(+ut));++xt<Nt;)q.charCodeAt(xt)===37&&(Y.push(q.slice(gt,xt)),(nt=lb[te=q.charAt(++xt)])!=null?te=q.charAt(++xt):nt=te==="e"?" ":"0",(Mt=rt[te])&&(te=Mt(ut,nt)),Y.push(te),gt=xt+1);return Y.push(q.slice(gt,xt)),Y.join("")}}function w(q,rt){return function(ut){var Y=$o(1900,void 0,1),xt=S(Y,q,ut+="",0),gt,Nt;if(xt!=ut.length)return null;if("Q"in Y)return new Date(Y.Q);if("s"in Y)return new Date(Y.s*1e3+("L"in Y?Y.L:0));if(rt&&!("Z"in Y)&&(Y.Z=0),"p"in Y&&(Y.H=Y.H%12+Y.p*12),Y.m===void 0&&(Y.m="q"in Y?Y.q:0),"V"in Y){if(Y.V<1||Y.V>53)return null;"w"in Y||(Y.w=1),"Z"in Y?(gt=Qf($o(Y.y,0,1)),Nt=gt.getUTCDay(),gt=Nt>4||Nt===0?wo.ceil(gt):wo(gt),gt=xo.offset(gt,(Y.V-1)*7),Y.y=gt.getUTCFullYear(),Y.m=gt.getUTCMonth(),Y.d=gt.getUTCDate()+(Y.w+6)%7):(gt=Kf($o(Y.y,0,1)),Nt=gt.getDay(),gt=Nt>4||Nt===0?_o.ceil(gt):_o(gt),gt=Zr.offset(gt,(Y.V-1)*7),Y.y=gt.getFullYear(),Y.m=gt.getMonth(),Y.d=gt.getDate()+(Y.w+6)%7)}else("W"in Y||"U"in Y)&&("w"in Y||(Y.w="u"in Y?Y.u%7:"W"in Y?1:0),Nt="Z"in Y?Qf($o(Y.y,0,1)).getUTCDay():Kf($o(Y.y,0,1)).getDay(),Y.m=0,Y.d="W"in Y?(Y.w+6)%7+Y.W*7-(Nt+5)%7:Y.w+Y.U*7-(Nt+6)%7);return"Z"in Y?(Y.H+=Y.Z/100|0,Y.M+=Y.Z%100,Qf(Y)):Kf(Y)}}function S(q,rt,ut,Y){for(var xt=0,gt=rt.length,Nt=ut.length,te,nt;xt<gt;){if(Y>=Nt)return-1;if(te=rt.charCodeAt(xt++),te===37){if(te=rt.charAt(xt++),nt=$[te in lb?rt.charAt(xt++):te],!nt||(Y=nt(q,ut,Y))<0)return-1}else if(te!=ut.charCodeAt(Y++))return-1}return Y}function D(q,rt,ut){var Y=c.exec(rt.slice(ut));return Y?(q.p=l.get(Y[0].toLowerCase()),ut+Y[0].length):-1}function E(q,rt,ut){var Y=d.exec(rt.slice(ut));return Y?(q.w=p.get(Y[0].toLowerCase()),ut+Y[0].length):-1}function T(q,rt,ut){var Y=h.exec(rt.slice(ut));return Y?(q.w=f.get(Y[0].toLowerCase()),ut+Y[0].length):-1}function F(q,rt,ut){var Y=y.exec(rt.slice(ut));return Y?(q.m=_.get(Y[0].toLowerCase()),ut+Y[0].length):-1}function M(q,rt,ut){var Y=g.exec(rt.slice(ut));return Y?(q.m=m.get(Y[0].toLowerCase()),ut+Y[0].length):-1}function A(q,rt,ut){return S(q,e,rt,ut)}function L(q,rt,ut){return S(q,n,rt,ut)}function P(q,rt,ut){return S(q,r,rt,ut)}function I(q){return a[q.getDay()]}function z(q){return o[q.getDay()]}function k(q){return u[q.getMonth()]}function R(q){return s[q.getMonth()]}function N(q){return i[+(q.getHours()>=12)]}function C(q){return 1+~~(q.getMonth()/3)}function O(q){return a[q.getUTCDay()]}function X(q){return o[q.getUTCDay()]}function W(q){return u[q.getUTCMonth()]}function V(q){return s[q.getUTCMonth()]}function J(q){return i[+(q.getUTCHours()>=12)]}function pt(q){return 1+~~(q.getUTCMonth()/3)}return{format:function(q){var rt=v(q+="",x);return rt.toString=function(){return q},rt},parse:function(q){var rt=w(q+="",!1);return rt.toString=function(){return q},rt},utcFormat:function(q){var rt=v(q+="",b);return rt.toString=function(){return q},rt},utcParse:function(q){var rt=w(q+="",!0);return rt.toString=function(){return q},rt}}}var lb={"-":"",_:" ",0:"0"},Rt=/^\s*\d+/,QD=/^%/,JD=/[\\^$*+?|[\]().{}]/g;function dt(t,e,n){var r=t<0?"-":"",i=(r?-t:t)+"",o=i.length;return r+(o<n?new Array(n-o+1).join(e)+i:i)}function tE(t){return t.replace(JD,"\\$&")}function So(t){return new RegExp("^(?:"+t.map(tE).join("|")+")","i")}function Ao(t){return new Map(t.map((e,n)=>[e.toLowerCase(),n]))}function eE(t,e,n){var r=Rt.exec(e.slice(n,n+1));return r?(t.w=+r[0],n+r[0].length):-1}function nE(t,e,n){var r=Rt.exec(e.slice(n,n+1));return r?(t.u=+r[0],n+r[0].length):-1}function rE(t,e,n){var r=Rt.exec(e.slice(n,n+2));return r?(t.U=+r[0],n+r[0].length):-1}function iE(t,e,n){var r=Rt.exec(e.slice(n,n+2));return r?(t.V=+r[0],n+r[0].length):-1}function oE(t,e,n){var r=Rt.exec(e.slice(n,n+2));return r?(t.W=+r[0],n+r[0].length):-1}function fb(t,e,n){var r=Rt.exec(e.slice(n,n+4));return r?(t.y=+r[0],n+r[0].length):-1}function hb(t,e,n){var r=Rt.exec(e.slice(n,n+2));return r?(t.y=+r[0]+(+r[0]>68?1900:2e3),n+r[0].length):-1}function aE(t,e,n){var r=/^(Z)|([+-]\d\d)(?::?(\d\d))?/.exec(e.slice(n,n+6));return r?(t.Z=r[1]?0:-(r[2]+(r[3]||"00")),n+r[0].length):-1}function sE(t,e,n){var r=Rt.exec(e.slice(n,n+1));return r?(t.q=r[0]*3-3,n+r[0].length):-1}function uE(t,e,n){var r=Rt.exec(e.slice(n,n+2));return r?(t.m=r[0]-1,n+r[0].length):-1}function db(t,e,n){var r=Rt.exec(e.slice(n,n+2));return r?(t.d=+r[0],n+r[0].length):-1}function cE(t,e,n){var r=Rt.exec(e.slice(n,n+3));return r?(t.m=0,t.d=+r[0],n+r[0].length):-1}function pb(t,e,n){var r=Rt.exec(e.slice(n,n+2));return r?(t.H=+r[0],n+r[0].length):-1}function lE(t,e,n){var r=Rt.exec(e.slice(n,n+2));return r?(t.M=+r[0],n+r[0].length):-1}function fE(t,e,n){var r=Rt.exec(e.slice(n,n+2));return r?(t.S=+r[0],n+r[0].length):-1}function hE(t,e,n){var r=Rt.exec(e.slice(n,n+3));return r?(t.L=+r[0],n+r[0].length):-1}function dE(t,e,n){var r=Rt.exec(e.slice(n,n+6));return r?(t.L=Math.floor(r[0]/1e3),n+r[0].length):-1}function pE(t,e,n){var r=QD.exec(e.slice(n,n+1));return r?n+r[0].length:-1}function gE(t,e,n){var r=Rt.exec(e.slice(n));return r?(t.Q=+r[0],n+r[0].length):-1}function mE(t,e,n){var r=Rt.exec(e.slice(n));return r?(t.s=+r[0],n+r[0].length):-1}function gb(t,e){return dt(t.getDate(),e,2)}function yE(t,e){return dt(t.getHours(),e,2)}function bE(t,e){return dt(t.getHours()%12||12,e,2)}function vE(t,e){return dt(1+Zr.count(Oe(t),t),e,3)}function mb(t,e){return dt(t.getMilliseconds(),e,3)}function xE(t,e){return mb(t,e)+"000"}function _E(t,e){return dt(t.getMonth()+1,e,2)}function wE(t,e){return dt(t.getMinutes(),e,2)}function $E(t,e){return dt(t.getSeconds(),e,2)}function SE(t){var e=t.getDay();return e===0?7:e}function AE(t,e){return dt(Kr.count(Oe(t)-1,t),e,2)}function yb(t){var e=t.getDay();return e>=4||e===0?er(t):er.ceil(t)}function ME(t,e){return t=yb(t),dt(er.count(Oe(t),t)+(Oe(t).getDay()===4),e,2)}function TE(t){return t.getDay()}function PE(t,e){return dt(_o.count(Oe(t)-1,t),e,2)}function DE(t,e){return dt(t.getFullYear()%100,e,2)}function EE(t,e){return t=yb(t),dt(t.getFullYear()%100,e,2)}function kE(t,e){return dt(t.getFullYear()%1e4,e,4)}function LE(t,e){var n=t.getDay();return t=n>=4||n===0?er(t):er.ceil(t),dt(t.getFullYear()%1e4,e,4)}function CE(t){var e=t.getTimezoneOffset();return(e>0?"-":(e*=-1,"+"))+dt(e/60|0,"0",2)+dt(e%60,"0",2)}function bb(t,e){return dt(t.getUTCDate(),e,2)}function RE(t,e){return dt(t.getUTCHours(),e,2)}function IE(t,e){return dt(t.getUTCHours()%12||12,e,2)}function NE(t,e){return dt(1+xo.count(Ue(t),t),e,3)}function vb(t,e){return dt(t.getUTCMilliseconds(),e,3)}function FE(t,e){return vb(t,e)+"000"}function GE(t,e){return dt(t.getUTCMonth()+1,e,2)}function zE(t,e){return dt(t.getUTCMinutes(),e,2)}function OE(t,e){return dt(t.getUTCSeconds(),e,2)}function UE(t){var e=t.getUTCDay();return e===0?7:e}function BE(t,e){return dt(Qr.count(Ue(t)-1,t),e,2)}function xb(t){var e=t.getUTCDay();return e>=4||e===0?rr(t):rr.ceil(t)}function YE(t,e){return t=xb(t),dt(rr.count(Ue(t),t)+(Ue(t).getUTCDay()===4),e,2)}function WE(t){return t.getUTCDay()}function HE(t,e){return dt(wo.count(Ue(t)-1,t),e,2)}function qE(t,e){return dt(t.getUTCFullYear()%100,e,2)}function XE(t,e){return t=xb(t),dt(t.getUTCFullYear()%100,e,2)}function VE(t,e){return dt(t.getUTCFullYear()%1e4,e,4)}function jE(t,e){var n=t.getUTCDay();return t=n>=4||n===0?rr(t):rr.ceil(t),dt(t.getUTCFullYear()%1e4,e,4)}function ZE(){return"+0000"}function _b(){return"%"}function wb(t){return+t}function $b(t){return Math.floor(+t/1e3)}var Jr,Jf,Sb,nu,th;Ab({dateTime:"%x, %X",date:"%-m/%-d/%Y",time:"%-I:%M:%S %p",periods:["AM","PM"],days:["Sunday","Monday","Tuesday","Wednesday","Thursday","Friday","Saturday"],shortDays:["Sun","Mon","Tue","Wed","Thu","Fri","Sat"],months:["January","February","March","April","May","June","July","August","September","October","November","December"],shortMonths:["Jan","Feb","Mar","Apr","May","Jun","Jul","Aug","Sep","Oct","Nov","Dec"]});function Ab(t){return Jr=cb(t),Jf=Jr.format,Sb=Jr.parse,nu=Jr.utcFormat,th=Jr.utcParse,Jr}var Mb="%Y-%m-%dT%H:%M:%S.%LZ";function KE(t){return t.toISOString()}var QE=Date.prototype.toISOString?KE:nu(Mb);const JE=QE;function tk(t){var e=new Date(t);return isNaN(e)?null:e}var ek=+new Date("2000-01-01T00:00:00.000Z")?tk:th(Mb);const nk=ek;function rk(t){return new Date(t)}function ik(t){return t instanceof Date?+t:+new Date(+t)}function eh(t,e,n,r,i,o,a,s,u,c){var l=Uf(),h=l.invert,f=l.domain,d=c(".%L"),p=c(":%S"),g=c("%I:%M"),m=c("%I %p"),y=c("%a %d"),_=c("%b %d"),x=c("%B"),b=c("%Y");function $(v){return(u(v)<v?d:s(v)<v?p:a(v)<v?g:o(v)<v?m:r(v)<v?i(v)<v?y:_:n(v)<v?x:b)(v)}return l.invert=function(v){return new Date(h(v))},l.domain=function(v){return arguments.length?f(Array.from(v,ik)):f().map(rk)},l.ticks=function(v){var w=f();return t(w[0],w[w.length-1],v??10)},l.tickFormat=function(v,w){return w==null?$:c(w)},l.nice=function(v){var w=f();return(!v||typeof v.range!="function")&&(v=e(w[0],w[w.length-1],v??10)),v?f(ky(w,v)):l},l.copy=function(){return vo(l,eh(t,e,n,r,i,o,a,s,u,c))},l}function ok(){return pe.apply(eh(sb,ub,Oe,tu,Kr,Zr,Qs,Zs,on,Jf).domain([new Date(2e3,0,1),new Date(2e3,0,2)]),arguments)}function ak(){return pe.apply(eh(ob,ab,Ue,eu,Qr,xo,Js,Ks,on,nu).domain([Date.UTC(2e3,0,1),Date.UTC(2e3,0,2)]),arguments)}function ru(){var t=0,e=1,n,r,i,o,a=Jt,s=!1,u;function c(h){return h==null||isNaN(h=+h)?u:a(i===0?.5:(h=(o(h)-n)*i,s?Math.max(0,Math.min(1,h)):h))}c.domain=function(h){return arguments.length?([t,e]=h,n=o(t=+t),r=o(e=+e),i=n===r?0:1/(r-n),c):[t,e]},c.clamp=function(h){return arguments.length?(s=!!h,c):s},c.interpolator=function(h){return arguments.length?(a=h,c):a};function l(h){return function(f){var d,p;return arguments.length?([d,p]=f,a=h(d,p),c):[a(0),a(1)]}}return c.range=l(hn),c.rangeRound=l(Fa),c.unknown=function(h){return arguments.length?(u=h,c):u},function(h){return o=h,n=h(t),r=h(e),i=n===r?0:1/(r-n),c}}function bn(t,e){return e.domain(t.domain()).interpolator(t.interpolator()).clamp(t.clamp()).unknown(t.unknown())}function Tb(){var t=yn(ru()(Jt));return t.copy=function(){return bn(t,Tb())},tn.apply(t,arguments)}function Pb(){var t=Yf(ru()).domain([1,10]);return t.copy=function(){return bn(t,Pb()).base(t.base())},tn.apply(t,arguments)}function Db(){var t=Wf(ru());return t.copy=function(){return bn(t,Db()).constant(t.constant())},tn.apply(t,arguments)}function nh(){var t=Hf(ru());return t.copy=function(){return bn(t,nh()).exponent(t.exponent())},tn.apply(t,arguments)}function sk(){return nh.apply(null,arguments).exponent(.5)}function Eb(){var t=[],e=Jt;function n(r){if(r!=null&&!isNaN(r=+r))return e((En(t,r,1)-1)/(t.length-1))}return n.domain=function(r){if(!arguments.length)return t.slice();t=[];for(let i of r)i!=null&&!isNaN(i=+i)&&t.push(i);return t.sort(_t),n},n.interpolator=function(r){return arguments.length?(e=r,n):e},n.range=function(){return t.map((r,i)=>e(i/(t.length-1)))},n.quantiles=function(r){return Array.from({length:r+1},(i,o)=>Pi(t,o/r))},n.copy=function(){return Eb(e).domain(t)},tn.apply(n,arguments)}function iu(){var t=0,e=.5,n=1,r=1,i,o,a,s,u,c=Jt,l,h=!1,f;function d(g){return isNaN(g=+g)?f:(g=.5+((g=+l(g))-o)*(r*g<r*o?s:u),c(h?Math.max(0,Math.min(1,g)):g))}d.domain=function(g){return arguments.length?([t,e,n]=g,i=l(t=+t),o=l(e=+e),a=l(n=+n),s=i===o?0:.5/(o-i),u=o===a?0:.5/(a-o),r=o<i?-1:1,d):[t,e,n]},d.clamp=function(g){return arguments.length?(h=!!g,d):h},d.interpolator=function(g){return arguments.length?(c=g,d):c};function p(g){return function(m){var y,_,x;return arguments.length?([y,_,x]=m,c=kg(g,[y,_,x]),d):[c(0),c(.5),c(1)]}}return d.range=p(hn),d.rangeRound=p(Fa),d.unknown=function(g){return arguments.length?(f=g,d):f},function(g){return l=g,i=g(t),o=g(e),a=g(n),s=i===o?0:.5/(o-i),u=o===a?0:.5/(a-o),r=o<i?-1:1,d}}function kb(){var t=yn(iu()(Jt));return t.copy=function(){return bn(t,kb())},tn.apply(t,arguments)}function Lb(){var t=Yf(iu()).domain([.1,1,10]);return t.copy=function(){return bn(t,Lb()).base(t.base())},tn.apply(t,arguments)}function Cb(){var t=Wf(iu());return t.copy=function(){return bn(t,Cb()).constant(t.constant())},tn.apply(t,arguments)}function rh(){var t=Hf(iu());return t.copy=function(){return bn(t,rh()).exponent(t.exponent())},tn.apply(t,arguments)}function uk(){return rh.apply(null,arguments).exponent(.5)}function at(t){for(var e=t.length/6|0,n=new Array(e),r=0;r<e;)n[r]="#"+t.slice(r*6,++r*6);return n}const ck=at("1f77b4ff7f0e2ca02cd627289467bd8c564be377c27f7f7fbcbd2217becf"),lk=at("7fc97fbeaed4fdc086ffff99386cb0f0027fbf5b17666666"),fk=at("1b9e77d95f027570b3e7298a66a61ee6ab02a6761d666666"),hk=at("4269d0efb118ff725c6cc5b03ca951ff8ab7a463f297bbf59c6b4e9498a0"),dk=at("a6cee31f78b4b2df8a33a02cfb9a99e31a1cfdbf6fff7f00cab2d66a3d9affff99b15928"),pk=at("fbb4aeb3cde3ccebc5decbe4fed9a6ffffcce5d8bdfddaecf2f2f2"),gk=at("b3e2cdfdcdaccbd5e8f4cae4e6f5c9fff2aef1e2cccccccc"),mk=at("e41a1c377eb84daf4a984ea3ff7f00ffff33a65628f781bf999999"),yk=at("66c2a5fc8d628da0cbe78ac3a6d854ffd92fe5c494b3b3b3"),bk=at("8dd3c7ffffb3bebadafb807280b1d3fdb462b3de69fccde5d9d9d9bc80bdccebc5ffed6f"),vk=at("4e79a7f28e2ce1575976b7b259a14fedc949af7aa1ff9da79c755fbab0ab"),bt=t=>mg(t[t.length-1]);var Rb=new Array(3).concat("d8b365f5f5f55ab4ac","a6611adfc27d80cdc1018571","a6611adfc27df5f5f580cdc1018571","8c510ad8b365f6e8c3c7eae55ab4ac01665e","8c510ad8b365f6e8c3f5f5f5c7eae55ab4ac01665e","8c510abf812ddfc27df6e8c3c7eae580cdc135978f01665e","8c510abf812ddfc27df6e8c3f5f5f5c7eae580cdc135978f01665e","5430058c510abf812ddfc27df6e8c3c7eae580cdc135978f01665e003c30","5430058c510abf812ddfc27df6e8c3f5f5f5c7eae580cdc135978f01665e003c30").map(at);const xk=bt(Rb);var Ib=new Array(3).concat("af8dc3f7f7f77fbf7b","7b3294c2a5cfa6dba0008837","7b3294c2a5cff7f7f7a6dba0008837","762a83af8dc3e7d4e8d9f0d37fbf7b1b7837","762a83af8dc3e7d4e8f7f7f7d9f0d37fbf7b1b7837","762a839970abc2a5cfe7d4e8d9f0d3a6dba05aae611b7837","762a839970abc2a5cfe7d4e8f7f7f7d9f0d3a6dba05aae611b7837","40004b762a839970abc2a5cfe7d4e8d9f0d3a6dba05aae611b783700441b","40004b762a839970abc2a5cfe7d4e8f7f7f7d9f0d3a6dba05aae611b783700441b").map(at);const _k=bt(Ib);var Nb=new Array(3).concat("e9a3c9f7f7f7a1d76a","d01c8bf1b6dab8e1864dac26","d01c8bf1b6daf7f7f7b8e1864dac26","c51b7de9a3c9fde0efe6f5d0a1d76a4d9221","c51b7de9a3c9fde0eff7f7f7e6f5d0a1d76a4d9221","c51b7dde77aef1b6dafde0efe6f5d0b8e1867fbc414d9221","c51b7dde77aef1b6dafde0eff7f7f7e6f5d0b8e1867fbc414d9221","8e0152c51b7dde77aef1b6dafde0efe6f5d0b8e1867fbc414d9221276419","8e0152c51b7dde77aef1b6dafde0eff7f7f7e6f5d0b8e1867fbc414d9221276419").map(at);const wk=bt(Nb);var Fb=new Array(3).concat("998ec3f7f7f7f1a340","5e3c99b2abd2fdb863e66101","5e3c99b2abd2f7f7f7fdb863e66101","542788998ec3d8daebfee0b6f1a340b35806","542788998ec3d8daebf7f7f7fee0b6f1a340b35806","5427888073acb2abd2d8daebfee0b6fdb863e08214b35806","5427888073acb2abd2d8daebf7f7f7fee0b6fdb863e08214b35806","2d004b5427888073acb2abd2d8daebfee0b6fdb863e08214b358067f3b08","2d004b5427888073acb2abd2d8daebf7f7f7fee0b6fdb863e08214b358067f3b08").map(at);const $k=bt(Fb);var Gb=new Array(3).concat("ef8a62f7f7f767a9cf","ca0020f4a58292c5de0571b0","ca0020f4a582f7f7f792c5de0571b0","b2182bef8a62fddbc7d1e5f067a9cf2166ac","b2182bef8a62fddbc7f7f7f7d1e5f067a9cf2166ac","b2182bd6604df4a582fddbc7d1e5f092c5de4393c32166ac","b2182bd6604df4a582fddbc7f7f7f7d1e5f092c5de4393c32166ac","67001fb2182bd6604df4a582fddbc7d1e5f092c5de4393c32166ac053061","67001fb2182bd6604df4a582fddbc7f7f7f7d1e5f092c5de4393c32166ac053061").map(at);const Sk=bt(Gb);var zb=new Array(3).concat("ef8a62ffffff999999","ca0020f4a582bababa404040","ca0020f4a582ffffffbababa404040","b2182bef8a62fddbc7e0e0e09999994d4d4d","b2182bef8a62fddbc7ffffffe0e0e09999994d4d4d","b2182bd6604df4a582fddbc7e0e0e0bababa8787874d4d4d","b2182bd6604df4a582fddbc7ffffffe0e0e0bababa8787874d4d4d","67001fb2182bd6604df4a582fddbc7e0e0e0bababa8787874d4d4d1a1a1a","67001fb2182bd6604df4a582fddbc7ffffffe0e0e0bababa8787874d4d4d1a1a1a").map(at);const Ak=bt(zb);var Ob=new Array(3).concat("fc8d59ffffbf91bfdb","d7191cfdae61abd9e92c7bb6","d7191cfdae61ffffbfabd9e92c7bb6","d73027fc8d59fee090e0f3f891bfdb4575b4","d73027fc8d59fee090ffffbfe0f3f891bfdb4575b4","d73027f46d43fdae61fee090e0f3f8abd9e974add14575b4","d73027f46d43fdae61fee090ffffbfe0f3f8abd9e974add14575b4","a50026d73027f46d43fdae61fee090e0f3f8abd9e974add14575b4313695","a50026d73027f46d43fdae61fee090ffffbfe0f3f8abd9e974add14575b4313695").map(at);const Mk=bt(Ob);var Ub=new Array(3).concat("fc8d59ffffbf91cf60","d7191cfdae61a6d96a1a9641","d7191cfdae61ffffbfa6d96a1a9641","d73027fc8d59fee08bd9ef8b91cf601a9850","d73027fc8d59fee08bffffbfd9ef8b91cf601a9850","d73027f46d43fdae61fee08bd9ef8ba6d96a66bd631a9850","d73027f46d43fdae61fee08bffffbfd9ef8ba6d96a66bd631a9850","a50026d73027f46d43fdae61fee08bd9ef8ba6d96a66bd631a9850006837","a50026d73027f46d43fdae61fee08bffffbfd9ef8ba6d96a66bd631a9850006837").map(at);const Tk=bt(Ub);var Bb=new Array(3).concat("fc8d59ffffbf99d594","d7191cfdae61abdda42b83ba","d7191cfdae61ffffbfabdda42b83ba","d53e4ffc8d59fee08be6f59899d5943288bd","d53e4ffc8d59fee08bffffbfe6f59899d5943288bd","d53e4ff46d43fdae61fee08be6f598abdda466c2a53288bd","d53e4ff46d43fdae61fee08bffffbfe6f598abdda466c2a53288bd","9e0142d53e4ff46d43fdae61fee08be6f598abdda466c2a53288bd5e4fa2","9e0142d53e4ff46d43fdae61fee08bffffbfe6f598abdda466c2a53288bd5e4fa2").map(at);const Pk=bt(Bb);var Yb=new Array(3).concat("e5f5f999d8c92ca25f","edf8fbb2e2e266c2a4238b45","edf8fbb2e2e266c2a42ca25f006d2c","edf8fbccece699d8c966c2a42ca25f006d2c","edf8fbccece699d8c966c2a441ae76238b45005824","f7fcfde5f5f9ccece699d8c966c2a441ae76238b45005824","f7fcfde5f5f9ccece699d8c966c2a441ae76238b45006d2c00441b").map(at);const Dk=bt(Yb);var Wb=new Array(3).concat("e0ecf49ebcda8856a7","edf8fbb3cde38c96c688419d","edf8fbb3cde38c96c68856a7810f7c","edf8fbbfd3e69ebcda8c96c68856a7810f7c","edf8fbbfd3e69ebcda8c96c68c6bb188419d6e016b","f7fcfde0ecf4bfd3e69ebcda8c96c68c6bb188419d6e016b","f7fcfde0ecf4bfd3e69ebcda8c96c68c6bb188419d810f7c4d004b").map(at);const Ek=bt(Wb);var Hb=new Array(3).concat("e0f3dba8ddb543a2ca","f0f9e8bae4bc7bccc42b8cbe","f0f9e8bae4bc7bccc443a2ca0868ac","f0f9e8ccebc5a8ddb57bccc443a2ca0868ac","f0f9e8ccebc5a8ddb57bccc44eb3d32b8cbe08589e","f7fcf0e0f3dbccebc5a8ddb57bccc44eb3d32b8cbe08589e","f7fcf0e0f3dbccebc5a8ddb57bccc44eb3d32b8cbe0868ac084081").map(at);const kk=bt(Hb);var qb=new Array(3).concat("fee8c8fdbb84e34a33","fef0d9fdcc8afc8d59d7301f","fef0d9fdcc8afc8d59e34a33b30000","fef0d9fdd49efdbb84fc8d59e34a33b30000","fef0d9fdd49efdbb84fc8d59ef6548d7301f990000","fff7ecfee8c8fdd49efdbb84fc8d59ef6548d7301f990000","fff7ecfee8c8fdd49efdbb84fc8d59ef6548d7301fb300007f0000").map(at);const Lk=bt(qb);var Xb=new Array(3).concat("ece2f0a6bddb1c9099","f6eff7bdc9e167a9cf02818a","f6eff7bdc9e167a9cf1c9099016c59","f6eff7d0d1e6a6bddb67a9cf1c9099016c59","f6eff7d0d1e6a6bddb67a9cf3690c002818a016450","fff7fbece2f0d0d1e6a6bddb67a9cf3690c002818a016450","fff7fbece2f0d0d1e6a6bddb67a9cf3690c002818a016c59014636").map(at);const Ck=bt(Xb);var Vb=new Array(3).concat("ece7f2a6bddb2b8cbe","f1eef6bdc9e174a9cf0570b0","f1eef6bdc9e174a9cf2b8cbe045a8d","f1eef6d0d1e6a6bddb74a9cf2b8cbe045a8d","f1eef6d0d1e6a6bddb74a9cf3690c00570b0034e7b","fff7fbece7f2d0d1e6a6bddb74a9cf3690c00570b0034e7b","fff7fbece7f2d0d1e6a6bddb74a9cf3690c00570b0045a8d023858").map(at);const Rk=bt(Vb);var jb=new Array(3).concat("e7e1efc994c7dd1c77","f1eef6d7b5d8df65b0ce1256","f1eef6d7b5d8df65b0dd1c77980043","f1eef6d4b9dac994c7df65b0dd1c77980043","f1eef6d4b9dac994c7df65b0e7298ace125691003f","f7f4f9e7e1efd4b9dac994c7df65b0e7298ace125691003f","f7f4f9e7e1efd4b9dac994c7df65b0e7298ace125698004367001f").map(at);const Ik=bt(jb);var Zb=new Array(3).concat("fde0ddfa9fb5c51b8a","feebe2fbb4b9f768a1ae017e","feebe2fbb4b9f768a1c51b8a7a0177","feebe2fcc5c0fa9fb5f768a1c51b8a7a0177","feebe2fcc5c0fa9fb5f768a1dd3497ae017e7a0177","fff7f3fde0ddfcc5c0fa9fb5f768a1dd3497ae017e7a0177","fff7f3fde0ddfcc5c0fa9fb5f768a1dd3497ae017e7a017749006a").map(at);const Nk=bt(Zb);var Kb=new Array(3).concat("edf8b17fcdbb2c7fb8","ffffcca1dab441b6c4225ea8","ffffcca1dab441b6c42c7fb8253494","ffffccc7e9b47fcdbb41b6c42c7fb8253494","ffffccc7e9b47fcdbb41b6c41d91c0225ea80c2c84","ffffd9edf8b1c7e9b47fcdbb41b6c41d91c0225ea80c2c84","ffffd9edf8b1c7e9b47fcdbb41b6c41d91c0225ea8253494081d58").map(at);const Fk=bt(Kb);var Qb=new Array(3).concat("f7fcb9addd8e31a354","ffffccc2e69978c679238443","ffffccc2e69978c67931a354006837","ffffccd9f0a3addd8e78c67931a354006837","ffffccd9f0a3addd8e78c67941ab5d238443005a32","ffffe5f7fcb9d9f0a3addd8e78c67941ab5d238443005a32","ffffe5f7fcb9d9f0a3addd8e78c67941ab5d238443006837004529").map(at);const Gk=bt(Qb);var Jb=new Array(3).concat("fff7bcfec44fd95f0e","ffffd4fed98efe9929cc4c02","ffffd4fed98efe9929d95f0e993404","ffffd4fee391fec44ffe9929d95f0e993404","ffffd4fee391fec44ffe9929ec7014cc4c028c2d04","ffffe5fff7bcfee391fec44ffe9929ec7014cc4c028c2d04","ffffe5fff7bcfee391fec44ffe9929ec7014cc4c02993404662506").map(at);const zk=bt(Jb);var tv=new Array(3).concat("ffeda0feb24cf03b20","ffffb2fecc5cfd8d3ce31a1c","ffffb2fecc5cfd8d3cf03b20bd0026","ffffb2fed976feb24cfd8d3cf03b20bd0026","ffffb2fed976feb24cfd8d3cfc4e2ae31a1cb10026","ffffccffeda0fed976feb24cfd8d3cfc4e2ae31a1cb10026","ffffccffeda0fed976feb24cfd8d3cfc4e2ae31a1cbd0026800026").map(at);const Ok=bt(tv);var ev=new Array(3).concat("deebf79ecae13182bd","eff3ffbdd7e76baed62171b5","eff3ffbdd7e76baed63182bd08519c","eff3ffc6dbef9ecae16baed63182bd08519c","eff3ffc6dbef9ecae16baed64292c62171b5084594","f7fbffdeebf7c6dbef9ecae16baed64292c62171b5084594","f7fbffdeebf7c6dbef9ecae16baed64292c62171b508519c08306b").map(at);const Uk=bt(ev);var nv=new Array(3).concat("e5f5e0a1d99b31a354","edf8e9bae4b374c476238b45","edf8e9bae4b374c47631a354006d2c","edf8e9c7e9c0a1d99b74c47631a354006d2c","edf8e9c7e9c0a1d99b74c47641ab5d238b45005a32","f7fcf5e5f5e0c7e9c0a1d99b74c47641ab5d238b45005a32","f7fcf5e5f5e0c7e9c0a1d99b74c47641ab5d238b45006d2c00441b").map(at);const Bk=bt(nv);var rv=new Array(3).concat("f0f0f0bdbdbd636363","f7f7f7cccccc969696525252","f7f7f7cccccc969696636363252525","f7f7f7d9d9d9bdbdbd969696636363252525","f7f7f7d9d9d9bdbdbd969696737373525252252525","fffffff0f0f0d9d9d9bdbdbd969696737373525252252525","fffffff0f0f0d9d9d9bdbdbd969696737373525252252525000000").map(at);const Yk=bt(rv);var iv=new Array(3).concat("efedf5bcbddc756bb1","f2f0f7cbc9e29e9ac86a51a3","f2f0f7cbc9e29e9ac8756bb154278f","f2f0f7dadaebbcbddc9e9ac8756bb154278f","f2f0f7dadaebbcbddc9e9ac8807dba6a51a34a1486","fcfbfdefedf5dadaebbcbddc9e9ac8807dba6a51a34a1486","fcfbfdefedf5dadaebbcbddc9e9ac8807dba6a51a354278f3f007d").map(at);const Wk=bt(iv);var ov=new Array(3).concat("fee0d2fc9272de2d26","fee5d9fcae91fb6a4acb181d","fee5d9fcae91fb6a4ade2d26a50f15","fee5d9fcbba1fc9272fb6a4ade2d26a50f15","fee5d9fcbba1fc9272fb6a4aef3b2ccb181d99000d","fff5f0fee0d2fcbba1fc9272fb6a4aef3b2ccb181d99000d","fff5f0fee0d2fcbba1fc9272fb6a4aef3b2ccb181da50f1567000d").map(at);const Hk=bt(ov);var av=new Array(3).concat("fee6cefdae6be6550d","feeddefdbe85fd8d3cd94701","feeddefdbe85fd8d3ce6550da63603","feeddefdd0a2fdae6bfd8d3ce6550da63603","feeddefdd0a2fdae6bfd8d3cf16913d948018c2d04","fff5ebfee6cefdd0a2fdae6bfd8d3cf16913d948018c2d04","fff5ebfee6cefdd0a2fdae6bfd8d3cf16913d94801a636037f2704").map(at);const qk=bt(av);function Xk(t){return t=Math.max(0,Math.min(1,t)),"rgb("+Math.max(0,Math.min(255,Math.round(-4.54-t*(35.34-t*(2381.73-t*(6402.7-t*(7024.72-t*2710.57)))))))+", "+Math.max(0,Math.min(255,Math.round(32.49+t*(170.73+t*(52.82-t*(131.46-t*(176.58-t*67.37)))))))+", "+Math.max(0,Math.min(255,Math.round(81.24+t*(442.36-t*(2482.43-t*(6167.24-t*(6614.94-t*2475.67)))))))+")"}const Vk=za(Me(300,.5,0),Me(-240,.5,1));var jk=za(Me(-100,.75,.35),Me(80,1.5,.8)),Zk=za(Me(260,.75,.35),Me(80,1.5,.8)),ou=Me();function Kk(t){(t<0||t>1)&&(t-=Math.floor(t));var e=Math.abs(t-.5);return ou.h=360*t-100,ou.s=1.5-1.5*e,ou.l=.8-.9*e,ou+""}var au=Pr(),Qk=Math.PI/3,Jk=Math.PI*2/3;function tL(t){var e;return t=(.5-t)*Math.PI,au.r=255*(e=Math.sin(t))*e,au.g=255*(e=Math.sin(t+Qk))*e,au.b=255*(e=Math.sin(t+Jk))*e,au+""}function eL(t){return t=Math.max(0,Math.min(1,t)),"rgb("+Math.max(0,Math.min(255,Math.round(34.61+t*(1172.33-t*(10793.56-t*(33300.12-t*(38394.49-t*14825.05)))))))+", "+Math.max(0,Math.min(255,Math.round(23.31+t*(557.33+t*(1225.33-t*(3574.96-t*(1073.77+t*707.56)))))))+", "+Math.max(0,Math.min(255,Math.round(27.2+t*(3211.1-t*(15327.97-t*(27814-t*(22569.18-t*6838.66)))))))+")"}function su(t){var e=t.length;return function(n){return t[Math.max(0,Math.min(e-1,Math.floor(n*e)))]}}const nL=su(at("44015444025645045745055946075a46085c460a5d460b5e470d60470e6147106347116447136548146748166848176948186a481a6c481b6d481c6e481d6f481f70482071482173482374482475482576482677482878482979472a7a472c7a472d7b472e7c472f7d46307e46327e46337f463480453581453781453882443983443a83443b84433d84433e85423f854240864241864142874144874045884046883f47883f48893e49893e4a893e4c8a3d4d8a3d4e8a3c4f8a3c508b3b518b3b528b3a538b3a548c39558c39568c38588c38598c375a8c375b8d365c8d365d8d355e8d355f8d34608d34618d33628d33638d32648e32658e31668e31678e31688e30698e306a8e2f6b8e2f6c8e2e6d8e2e6e8e2e6f8e2d708e2d718e2c718e2c728e2c738e2b748e2b758e2a768e2a778e2a788e29798e297a8e297b8e287c8e287d8e277e8e277f8e27808e26818e26828e26828e25838e25848e25858e24868e24878e23888e23898e238a8d228b8d228c8d228d8d218e8d218f8d21908d21918c20928c20928c20938c1f948c1f958b1f968b1f978b1f988b1f998a1f9a8a1e9b8a1e9c891e9d891f9e891f9f881fa0881fa1881fa1871fa28720a38620a48621a58521a68522a78522a88423a98324aa8325ab8225ac8226ad8127ad8128ae8029af7f2ab07f2cb17e2db27d2eb37c2fb47c31b57b32b67a34b67935b77937b87838b9773aba763bbb753dbc743fbc7340bd7242be7144bf7046c06f48c16e4ac16d4cc26c4ec36b50c46a52c56954c56856c66758c7655ac8645cc8635ec96260ca6063cb5f65cb5e67cc5c69cd5b6ccd5a6ece5870cf5773d05675d05477d1537ad1517cd2507fd34e81d34d84d44b86d54989d5488bd6468ed64590d74393d74195d84098d83e9bd93c9dd93ba0da39a2da37a5db36a8db34aadc32addc30b0dd2fb2dd2db5de2bb8de29bade28bddf26c0df25c2df23c5e021c8e020cae11fcde11dd0e11cd2e21bd5e21ad8e219dae319dde318dfe318e2e418e5e419e7e419eae51aece51befe51cf1e51df4e61ef6e620f8e621fbe723fde725"));var rL=su(at("00000401000501010601010802010902020b02020d03030f03031204041405041606051806051a07061c08071e0907200a08220b09240c09260d0a290e0b2b100b2d110c2f120d31130d34140e36150e38160f3b180f3d19103f1a10421c10441d11471e114920114b21114e22115024125325125527125829115a2a115c2c115f2d11612f116331116533106734106936106b38106c390f6e3b0f703d0f713f0f72400f74420f75440f764510774710784910784a10794c117a4e117b4f127b51127c52137c54137d56147d57157e59157e5a167e5c167f5d177f5f187f601880621980641a80651a80671b80681c816a1c816b1d816d1d816e1e81701f81721f817320817521817621817822817922827b23827c23827e24828025828125818326818426818627818827818928818b29818c29818e2a81902a81912b81932b80942c80962c80982d80992d809b2e7f9c2e7f9e2f7fa02f7fa1307ea3307ea5317ea6317da8327daa337dab337cad347cae347bb0357bb2357bb3367ab5367ab73779b83779ba3878bc3978bd3977bf3a77c03a76c23b75c43c75c53c74c73d73c83e73ca3e72cc3f71cd4071cf4070d0416fd2426fd3436ed5446dd6456cd8456cd9466bdb476adc4869de4968df4a68e04c67e24d66e34e65e44f64e55064e75263e85362e95462ea5661eb5760ec5860ed5a5fee5b5eef5d5ef05f5ef1605df2625df2645cf3655cf4675cf4695cf56b5cf66c5cf66e5cf7705cf7725cf8745cf8765cf9785df9795df97b5dfa7d5efa7f5efa815ffb835ffb8560fb8761fc8961fc8a62fc8c63fc8e64fc9065fd9266fd9467fd9668fd9869fd9a6afd9b6bfe9d6cfe9f6dfea16efea36ffea571fea772fea973feaa74feac76feae77feb078feb27afeb47bfeb67cfeb77efeb97ffebb81febd82febf84fec185fec287fec488fec68afec88cfeca8dfecc8ffecd90fecf92fed194fed395fed597fed799fed89afdda9cfddc9efddea0fde0a1fde2a3fde3a5fde5a7fde7a9fde9aafdebacfcecaefceeb0fcf0b2fcf2b4fcf4b6fcf6b8fcf7b9fcf9bbfcfbbdfcfdbf")),iL=su(at("00000401000501010601010802010a02020c02020e03021004031204031405041706041907051b08051d09061f0a07220b07240c08260d08290e092b10092d110a30120a32140b34150b37160b39180c3c190c3e1b0c411c0c431e0c451f0c48210c4a230c4c240c4f260c51280b53290b552b0b572d0b592f0a5b310a5c320a5e340a5f3609613809623909633b09643d09653e0966400a67420a68440a68450a69470b6a490b6a4a0c6b4c0c6b4d0d6c4f0d6c510e6c520e6d540f6d550f6d57106e59106e5a116e5c126e5d126e5f136e61136e62146e64156e65156e67166e69166e6a176e6c186e6d186e6f196e71196e721a6e741a6e751b6e771c6d781c6d7a1d6d7c1d6d7d1e6d7f1e6c801f6c82206c84206b85216b87216b88226a8a226a8c23698d23698f24699025689225689326679526679727669827669a28659b29649d29649f2a63a02a63a22b62a32c61a52c60a62d60a82e5fa92e5eab2f5ead305dae305cb0315bb1325ab3325ab43359b63458b73557b93556ba3655bc3754bd3853bf3952c03a51c13a50c33b4fc43c4ec63d4dc73e4cc83f4bca404acb4149cc4248ce4347cf4446d04545d24644d34743d44842d54a41d74b3fd84c3ed94d3dda4e3cdb503bdd513ade5238df5337e05536e15635e25734e35933e45a31e55c30e65d2fe75e2ee8602de9612bea632aeb6429eb6628ec6726ed6925ee6a24ef6c23ef6e21f06f20f1711ff1731df2741cf3761bf37819f47918f57b17f57d15f67e14f68013f78212f78410f8850ff8870ef8890cf98b0bf98c0af98e09fa9008fa9207fa9407fb9606fb9706fb9906fb9b06fb9d07fc9f07fca108fca309fca50afca60cfca80dfcaa0ffcac11fcae12fcb014fcb216fcb418fbb61afbb81dfbba1ffbbc21fbbe23fac026fac228fac42afac62df9c72ff9c932f9cb35f8cd37f8cf3af7d13df7d340f6d543f6d746f5d949f5db4cf4dd4ff4df53f4e156f3e35af3e55df2e661f2e865f2ea69f1ec6df1ed71f1ef75f1f179f2f27df2f482f3f586f3f68af4f88ef5f992f6fa96f8fb9af9fc9dfafda1fcffa4")),oL=su(at("0d088710078813078916078a19068c1b068d1d068e20068f2206902406912605912805922a05932c05942e05952f059631059733059735049837049938049a3a049a3c049b3e049c3f049c41049d43039e44039e46039f48039f4903a04b03a14c02a14e02a25002a25102a35302a35502a45601a45801a45901a55b01a55c01a65e01a66001a66100a76300a76400a76600a76700a86900a86a00a86c00a86e00a86f00a87100a87201a87401a87501a87701a87801a87a02a87b02a87d03a87e03a88004a88104a78305a78405a78606a68707a68808a68a09a58b0aa58d0ba58e0ca48f0da4910ea3920fa39410a29511a19613a19814a099159f9a169f9c179e9d189d9e199da01a9ca11b9ba21d9aa31e9aa51f99a62098a72197a82296aa2395ab2494ac2694ad2793ae2892b02991b12a90b22b8fb32c8eb42e8db52f8cb6308bb7318ab83289ba3388bb3488bc3587bd3786be3885bf3984c03a83c13b82c23c81c33d80c43e7fc5407ec6417dc7427cc8437bc9447aca457acb4679cc4778cc4977cd4a76ce4b75cf4c74d04d73d14e72d24f71d35171d45270d5536fd5546ed6556dd7566cd8576bd9586ada5a6ada5b69db5c68dc5d67dd5e66de5f65de6164df6263e06363e16462e26561e26660e3685fe4695ee56a5de56b5de66c5ce76e5be76f5ae87059e97158e97257ea7457eb7556eb7655ec7754ed7953ed7a52ee7b51ef7c51ef7e50f07f4ff0804ef1814df1834cf2844bf3854bf3874af48849f48948f58b47f58c46f68d45f68f44f79044f79143f79342f89441f89540f9973ff9983ef99a3efa9b3dfa9c3cfa9e3bfb9f3afba139fba238fca338fca537fca636fca835fca934fdab33fdac33fdae32fdaf31fdb130fdb22ffdb42ffdb52efeb72dfeb82cfeba2cfebb2bfebd2afebe2afec029fdc229fdc328fdc527fdc627fdc827fdca26fdcb26fccd25fcce25fcd025fcd225fbd324fbd524fbd724fad824fada24f9dc24f9dd25f8df25f8e125f7e225f7e425f6e626f6e826f5e926f5eb27f4ed27f3ee27f3f027f2f227f1f426f1f525f0f724f0f921"));function ot(t){return function(){return t}}const sv=Math.abs,Ot=Math.atan2,an=Math.cos,aL=Math.max,ti=Math.min,ie=Math.sin,vt=Math.sqrt,Ut=1e-12,vn=Math.PI,uu=vn/2,xn=2*vn;function sL(t){return t>1?0:t<-1?vn:Math.acos(t)}function uv(t){return t>=1?uu:t<=-1?-uu:Math.asin(t)}function Mo(t){let e=3;return t.digits=function(n){if(!arguments.length)return e;if(n==null)e=null;else{const r=Math.floor(n);if(!(r>=0))throw new RangeError(`invalid digits: ${n}`);e=r}return t},()=>new Hi(e)}function uL(t){return t.innerRadius}function cL(t){return t.outerRadius}function lL(t){return t.startAngle}function fL(t){return t.endAngle}function hL(t){return t&&t.padAngle}function dL(t,e,n,r,i,o,a,s){var u=n-t,c=r-e,l=a-i,h=s-o,f=h*u-l*c;if(!(f*f<Ut))return f=(l*(e-o)-h*(t-i))/f,[t+f*u,e+f*c]}function cu(t,e,n,r,i,o,a){var s=t-n,u=e-r,c=(a?o:-o)/vt(s*s+u*u),l=c*u,h=-c*s,f=t+l,d=e+h,p=n+l,g=r+h,m=(f+p)/2,y=(d+g)/2,_=p-f,x=g-d,b=_*_+x*x,$=i-o,v=f*g-p*d,w=(x<0?-1:1)*vt(aL(0,$*$*b-v*v)),S=(v*x-_*w)/b,D=(-v*_-x*w)/b,E=(v*x+_*w)/b,T=(-v*_+x*w)/b,F=S-m,M=D-y,A=E-m,L=T-y;return F*F+M*M>A*A+L*L&&(S=E,D=T),{cx:S,cy:D,x01:-l,y01:-h,x11:S*(i/$-1),y11:D*(i/$-1)}}function cv(){var t=uL,e=cL,n=ot(0),r=null,i=lL,o=fL,a=hL,s=null,u=Mo(c);function c(){var l,h,f=+t.apply(this,arguments),d=+e.apply(this,arguments),p=i.apply(this,arguments)-uu,g=o.apply(this,arguments)-uu,m=sv(g-p),y=g>p;if(s||(s=l=u()),d<f&&(h=d,d=f,f=h),!(d>Ut))s.moveTo(0,0);else if(m>xn-Ut)s.moveTo(d*an(p),d*ie(p)),s.arc(0,0,d,p,g,!y),f>Ut&&(s.moveTo(f*an(g),f*ie(g)),s.arc(0,0,f,g,p,y));else{var _=p,x=g,b=p,$=g,v=m,w=m,S=a.apply(this,arguments)/2,D=S>Ut&&(r?+r.apply(this,arguments):vt(f*f+d*d)),E=ti(sv(d-f)/2,+n.apply(this,arguments)),T=E,F=E,M,A;if(D>Ut){var L=uv(D/f*ie(S)),P=uv(D/d*ie(S));(v-=L*2)>Ut?(L*=y?1:-1,b+=L,$-=L):(v=0,b=$=(p+g)/2),(w-=P*2)>Ut?(P*=y?1:-1,_+=P,x-=P):(w=0,_=x=(p+g)/2)}var I=d*an(_),z=d*ie(_),k=f*an($),R=f*ie($);if(E>Ut){var N=d*an(x),C=d*ie(x),O=f*an(b),X=f*ie(b),W;if(m<vn)if(W=dL(I,z,O,X,N,C,k,R)){var V=I-W[0],J=z-W[1],pt=N-W[0],q=C-W[1],rt=1/ie(sL((V*pt+J*q)/(vt(V*V+J*J)*vt(pt*pt+q*q)))/2),ut=vt(W[0]*W[0]+W[1]*W[1]);T=ti(E,(f-ut)/(rt-1)),F=ti(E,(d-ut)/(rt+1))}else T=F=0}w>Ut?F>Ut?(M=cu(O,X,I,z,d,F,y),A=cu(N,C,k,R,d,F,y),s.moveTo(M.cx+M.x01,M.cy+M.y01),F<E?s.arc(M.cx,M.cy,F,Ot(M.y01,M.x01),Ot(A.y01,A.x01),!y):(s.arc(M.cx,M.cy,F,Ot(M.y01,M.x01),Ot(M.y11,M.x11),!y),s.arc(0,0,d,Ot(M.cy+M.y11,M.cx+M.x11),Ot(A.cy+A.y11,A.cx+A.x11),!y),s.arc(A.cx,A.cy,F,Ot(A.y11,A.x11),Ot(A.y01,A.x01),!y))):(s.moveTo(I,z),s.arc(0,0,d,_,x,!y)):s.moveTo(I,z),!(f>Ut)||!(v>Ut)?s.lineTo(k,R):T>Ut?(M=cu(k,R,N,C,f,-T,y),A=cu(I,z,O,X,f,-T,y),s.lineTo(M.cx+M.x01,M.cy+M.y01),T<E?s.arc(M.cx,M.cy,T,Ot(M.y01,M.x01),Ot(A.y01,A.x01),!y):(s.arc(M.cx,M.cy,T,Ot(M.y01,M.x01),Ot(M.y11,M.x11),!y),s.arc(0,0,f,Ot(M.cy+M.y11,M.cx+M.x11),Ot(A.cy+A.y11,A.cx+A.x11),y),s.arc(A.cx,A.cy,T,Ot(A.y11,A.x11),Ot(A.y01,A.x01),!y))):s.arc(0,0,f,$,b,y)}if(s.closePath(),l)return s=null,l+""||null}return c.centroid=function(){var l=(+t.apply(this,arguments)+ +e.apply(this,arguments))/2,h=(+i.apply(this,arguments)+ +o.apply(this,arguments))/2-vn/2;return[an(h)*l,ie(h)*l]},c.innerRadius=function(l){return arguments.length?(t=typeof l=="function"?l:ot(+l),c):t},c.outerRadius=function(l){return arguments.length?(e=typeof l=="function"?l:ot(+l),c):e},c.cornerRadius=function(l){return arguments.length?(n=typeof l=="function"?l:ot(+l),c):n},c.padRadius=function(l){return arguments.length?(r=l==null?null:typeof l=="function"?l:ot(+l),c):r},c.startAngle=function(l){return arguments.length?(i=typeof l=="function"?l:ot(+l),c):i},c.endAngle=function(l){return arguments.length?(o=typeof l=="function"?l:ot(+l),c):o},c.padAngle=function(l){return arguments.length?(a=typeof l=="function"?l:ot(+l),c):a},c.context=function(l){return arguments.length?(s=l??null,c):s},c}var pL=Array.prototype.slice;function lu(t){return typeof t=="object"&&"length"in t?t:Array.from(t)}function lv(t){this._context=t}lv.prototype={areaStart:function(){this._line=0},areaEnd:function(){this._line=NaN},lineStart:function(){this._point=0},lineEnd:function(){(this._line||this._line!==0&&this._point===1)&&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;default:this._context.lineTo(t,e);break}}};function fu(t){return new lv(t)}function ih(t){return t[0]}function oh(t){return t[1]}function hu(t,e){var n=ot(!0),r=null,i=fu,o=null,a=Mo(s);t=typeof t=="function"?t:t===void 0?ih:ot(t),e=typeof e=="function"?e:e===void 0?oh:ot(e);function s(u){var c,l=(u=lu(u)).length,h,f=!1,d;for(r==null&&(o=i(d=a())),c=0;c<=l;++c)!(c<l&&n(h=u[c],c,u))===f&&((f=!f)?o.lineStart():o.lineEnd()),f&&o.point(+t(h,c,u),+e(h,c,u));if(d)return o=null,d+""||null}return s.x=function(u){return arguments.length?(t=typeof u=="function"?u:ot(+u),s):t},s.y=function(u){return arguments.length?(e=typeof u=="function"?u:ot(+u),s):e},s.defined=function(u){return arguments.length?(n=typeof u=="function"?u:ot(!!u),s):n},s.curve=function(u){return arguments.length?(i=u,r!=null&&(o=i(r)),s):i},s.context=function(u){return arguments.length?(u==null?r=o=null:o=i(r=u),s):r},s}function fv(t,e,n){var r=null,i=ot(!0),o=null,a=fu,s=null,u=Mo(c);t=typeof t=="function"?t:t===void 0?ih:ot(+t),e=typeof e=="function"?e:ot(e===void 0?0:+e),n=typeof n=="function"?n:n===void 0?oh:ot(+n);function c(h){var f,d,p,g=(h=lu(h)).length,m,y=!1,_,x=new Array(g),b=new Array(g);for(o==null&&(s=a(_=u())),f=0;f<=g;++f){if(!(f<g&&i(m=h[f],f,h))===y)if(y=!y)d=f,s.areaStart(),s.lineStart();else{for(s.lineEnd(),s.lineStart(),p=f-1;p>=d;--p)s.point(x[p],b[p]);s.lineEnd(),s.areaEnd()}y&&(x[f]=+t(m,f,h),b[f]=+e(m,f,h),s.point(r?+r(m,f,h):x[f],n?+n(m,f,h):b[f]))}if(_)return s=null,_+""||null}function l(){return hu().defined(i).curve(a).context(o)}return c.x=function(h){return arguments.length?(t=typeof h=="function"?h:ot(+h),r=null,c):t},c.x0=function(h){return arguments.length?(t=typeof h=="function"?h:ot(+h),c):t},c.x1=function(h){return arguments.length?(r=h==null?null:typeof h=="function"?h:ot(+h),c):r},c.y=function(h){return arguments.length?(e=typeof h=="function"?h:ot(+h),n=null,c):e},c.y0=function(h){return arguments.length?(e=typeof h=="function"?h:ot(+h),c):e},c.y1=function(h){return arguments.length?(n=h==null?null:typeof h=="function"?h:ot(+h),c):n},c.lineX0=c.lineY0=function(){return l().x(t).y(e)},c.lineY1=function(){return l().x(t).y(n)},c.lineX1=function(){return l().x(r).y(e)},c.defined=function(h){return arguments.length?(i=typeof h=="function"?h:ot(!!h),c):i},c.curve=function(h){return arguments.length?(a=h,o!=null&&(s=a(o)),c):a},c.context=function(h){return arguments.length?(h==null?o=s=null:s=a(o=h),c):o},c}function gL(t,e){return e<t?-1:e>t?1:e>=t?0:NaN}function mL(t){return t}function hv(){var t=mL,e=gL,n=null,r=ot(0),i=ot(xn),o=ot(0);function a(s){var u,c=(s=lu(s)).length,l,h,f=0,d=new Array(c),p=new Array(c),g=+r.apply(this,arguments),m=Math.min(xn,Math.max(-xn,i.apply(this,arguments)-g)),y,_=Math.min(Math.abs(m)/c,o.apply(this,arguments)),x=_*(m<0?-1:1),b;for(u=0;u<c;++u)(b=p[d[u]=u]=+t(s[u],u,s))>0&&(f+=b);for(e!=null?d.sort(function($,v){return e(p[$],p[v])}):n!=null&&d.sort(function($,v){return n(s[$],s[v])}),u=0,h=f?(m-c*x)/f:0;u<c;++u,g=y)l=d[u],b=p[l],y=g+(b>0?b*h:0)+x,p[l]={data:s[l],index:u,value:b,startAngle:g,endAngle:y,padAngle:_};return p}return a.value=function(s){return arguments.length?(t=typeof s=="function"?s:ot(+s),a):t},a.sortValues=function(s){return arguments.length?(e=s,n=null,a):e},a.sort=function(s){return arguments.length?(n=s,e=null,a):n},a.startAngle=function(s){return arguments.length?(r=typeof s=="function"?s:ot(+s),a):r},a.endAngle=function(s){return arguments.length?(i=typeof s=="function"?s:ot(+s),a):i},a.padAngle=function(s){return arguments.length?(o=typeof s=="function"?s:ot(+s),a):o},a}var dv=ah(fu);function pv(t){this._curve=t}pv.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))}};function ah(t){function e(n){return new pv(t(n))}return e._curve=t,e}function To(t){var e=t.curve;return t.angle=t.x,delete t.x,t.radius=t.y,delete t.y,t.curve=function(n){return arguments.length?e(ah(n)):e()._curve},t}function gv(){return To(hu().curve(dv))}function mv(){var t=fv().curve(dv),e=t.curve,n=t.lineX0,r=t.lineX1,i=t.lineY0,o=t.lineY1;return t.angle=t.x,delete t.x,t.startAngle=t.x0,delete t.x0,t.endAngle=t.x1,delete t.x1,t.radius=t.y,delete t.y,t.innerRadius=t.y0,delete t.y0,t.outerRadius=t.y1,delete t.y1,t.lineStartAngle=function(){return To(n())},delete t.lineX0,t.lineEndAngle=function(){return To(r())},delete t.lineX1,t.lineInnerRadius=function(){return To(i())},delete t.lineY0,t.lineOuterRadius=function(){return To(o())},delete t.lineY1,t.curve=function(a){return arguments.length?e(ah(a)):e()._curve},t}function Po(t,e){return[(e=+e)*Math.cos(t-=Math.PI/2),e*Math.sin(t)]}class yv{constructor(e,n){this._context=e,this._x=n}areaStart(){this._line=0}areaEnd(){this._line=NaN}lineStart(){this._point=0}lineEnd(){(this._line||this._line!==0&&this._point===1)&&this._context.closePath(),this._line=1-this._line}point(e,n){switch(e=+e,n=+n,this._point){case 0:{this._point=1,this._line?this._context.lineTo(e,n):this._context.moveTo(e,n);break}case 1:this._point=2;default:{this._x?this._context.bezierCurveTo(this._x0=(this._x0+e)/2,this._y0,this._x0,n,e,n):this._context.bezierCurveTo(this._x0,this._y0=(this._y0+n)/2,e,this._y0,e,n);break}}this._x0=e,this._y0=n}}class yL{constructor(e){this._context=e}lineStart(){this._point=0}lineEnd(){}point(e,n){if(e=+e,n=+n,this._point===0)this._point=1;else{const r=Po(this._x0,this._y0),i=Po(this._x0,this._y0=(this._y0+n)/2),o=Po(e,this._y0),a=Po(e,n);this._context.moveTo(...r),this._context.bezierCurveTo(...i,...o,...a)}this._x0=e,this._y0=n}}function bv(t){return new yv(t,!0)}function vv(t){return new yv(t,!1)}function bL(t){return new yL(t)}function vL(t){return t.source}function xL(t){return t.target}function du(t){let e=vL,n=xL,r=ih,i=oh,o=null,a=null,s=Mo(u);function u(){let c;const l=pL.call(arguments),h=e.apply(this,l),f=n.apply(this,l);if(o==null&&(a=t(c=s())),a.lineStart(),l[0]=h,a.point(+r.apply(this,l),+i.apply(this,l)),l[0]=f,a.point(+r.apply(this,l),+i.apply(this,l)),a.lineEnd(),c)return a=null,c+""||null}return u.source=function(c){return arguments.length?(e=c,u):e},u.target=function(c){return arguments.length?(n=c,u):n},u.x=function(c){return arguments.length?(r=typeof c=="function"?c:ot(+c),u):r},u.y=function(c){return arguments.length?(i=typeof c=="function"?c:ot(+c),u):i},u.context=function(c){return arguments.length?(c==null?o=a=null:a=t(o=c),u):o},u}function _L(){return du(bv)}function wL(){return du(vv)}function $L(){const t=du(bL);return t.angle=t.x,delete t.x,t.radius=t.y,delete t.y,t}const SL=vt(3),xv={draw(t,e){const n=vt(e+ti(e/28,.75))*.59436,r=n/2,i=r*SL;t.moveTo(0,n),t.lineTo(0,-n),t.moveTo(-i,-r),t.lineTo(i,r),t.moveTo(-i,r),t.lineTo(i,-r)}},pu={draw(t,e){const n=vt(e/vn);t.moveTo(n,0),t.arc(0,0,n,0,xn)}},_v={draw(t,e){const n=vt(e/5)/2;t.moveTo(-3*n,-n),t.lineTo(-n,-n),t.lineTo(-n,-3*n),t.lineTo(n,-3*n),t.lineTo(n,-n),t.lineTo(3*n,-n),t.lineTo(3*n,n),t.lineTo(n,n),t.lineTo(n,3*n),t.lineTo(-n,3*n),t.lineTo(-n,n),t.lineTo(-3*n,n),t.closePath()}},wv=vt(1/3),AL=wv*2,$v={draw(t,e){const n=vt(e/AL),r=n*wv;t.moveTo(0,-n),t.lineTo(r,0),t.lineTo(0,n),t.lineTo(-r,0),t.closePath()}},Sv={draw(t,e){const n=vt(e)*.62625;t.moveTo(0,-n),t.lineTo(n,0),t.lineTo(0,n),t.lineTo(-n,0),t.closePath()}},Av={draw(t,e){const n=vt(e-ti(e/7,2))*.87559;t.moveTo(-n,0),t.lineTo(n,0),t.moveTo(0,n),t.lineTo(0,-n)}},Mv={draw(t,e){const n=vt(e),r=-n/2;t.rect(r,r,n,n)}},Tv={draw(t,e){const n=vt(e)*.4431;t.moveTo(n,n),t.lineTo(n,-n),t.lineTo(-n,-n),t.lineTo(-n,n),t.closePath()}},ML=.8908130915292852,Pv=ie(vn/10)/ie(7*vn/10),TL=ie(xn/10)*Pv,PL=-an(xn/10)*Pv,Dv={draw(t,e){const n=vt(e*ML),r=TL*n,i=PL*n;t.moveTo(0,-n),t.lineTo(r,i);for(let o=1;o<5;++o){const a=xn*o/5,s=an(a),u=ie(a);t.lineTo(u*n,-s*n),t.lineTo(s*r-u*i,u*r+s*i)}t.closePath()}},sh=vt(3),Ev={draw(t,e){const n=-vt(e/(sh*3));t.moveTo(0,n*2),t.lineTo(-sh*n,-n),t.lineTo(sh*n,-n),t.closePath()}},DL=vt(3),kv={draw(t,e){const n=vt(e)*.6824,r=n/2,i=n*DL/2;t.moveTo(0,-n),t.lineTo(i,r),t.lineTo(-i,r),t.closePath()}},me=-.5,ye=vt(3)/2,uh=1/vt(12),EL=(uh/2+1)*3,Lv={draw(t,e){const n=vt(e/EL),r=n/2,i=n*uh,o=r,a=n*uh+n,s=-o,u=a;t.moveTo(r,i),t.lineTo(o,a),t.lineTo(s,u),t.lineTo(me*r-ye*i,ye*r+me*i),t.lineTo(me*o-ye*a,ye*o+me*a),t.lineTo(me*s-ye*u,ye*s+me*u),t.lineTo(me*r+ye*i,me*i-ye*r),t.lineTo(me*o+ye*a,me*a-ye*o),t.lineTo(me*s+ye*u,me*u-ye*s),t.closePath()}},ch={draw(t,e){const n=vt(e-ti(e/6,1.7))*.6189;t.moveTo(-n,-n),t.lineTo(n,n),t.moveTo(-n,n),t.lineTo(n,-n)}},Cv=[pu,_v,$v,Mv,Dv,Ev,Lv],kL=[pu,Av,ch,kv,xv,Tv,Sv];function LL(t,e){let n=null,r=Mo(i);t=typeof t=="function"?t:ot(t||pu),e=typeof e=="function"?e:ot(e===void 0?64:+e);function i(){let o;if(n||(n=o=r()),t.apply(this,arguments).draw(n,+e.apply(this,arguments)),o)return n=null,o+""||null}return i.type=function(o){return arguments.length?(t=typeof o=="function"?o:ot(o),i):t},i.size=function(o){return arguments.length?(e=typeof o=="function"?o:ot(+o),i):e},i.context=function(o){return arguments.length?(n=o??null,i):n},i}function _n(){}function gu(t,e,n){t._context.bezierCurveTo((2*t._x0+t._x1)/3,(2*t._y0+t._y1)/3,(t._x0+2*t._x1)/3,(t._y0+2*t._y1)/3,(t._x0+4*t._x1+e)/6,(t._y0+4*t._y1+n)/6)}function mu(t){this._context=t}mu.prototype={areaStart:function(){this._line=0},areaEnd:function(){this._line=NaN},lineStart:function(){this._x0=this._x1=this._y0=this._y1=NaN,this._point=0},lineEnd:function(){switch(this._point){case 3:gu(this,this._x1,this._y1);case 2:this._context.lineTo(this._x1,this._y1);break}(this._line||this._line!==0&&this._point===1)&&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;break;case 2:this._point=3,this._context.lineTo((5*this._x0+this._x1)/6,(5*this._y0+this._y1)/6);default:gu(this,t,e);break}this._x0=this._x1,this._x1=t,this._y0=this._y1,this._y1=e}};function CL(t){return new mu(t)}function Rv(t){this._context=t}Rv.prototype={areaStart:_n,areaEnd:_n,lineStart:function(){this._x0=this._x1=this._x2=this._x3=this._x4=this._y0=this._y1=this._y2=this._y3=this._y4=NaN,this._point=0},lineEnd:function(){switch(this._point){case 1:{this._context.moveTo(this._x2,this._y2),this._context.closePath();break}case 2:{this._context.moveTo((this._x2+2*this._x3)/3,(this._y2+2*this._y3)/3),this._context.lineTo((this._x3+2*this._x2)/3,(this._y3+2*this._y2)/3),this._context.closePath();break}case 3:{this.point(this._x2,this._y2),this.point(this._x3,this._y3),this.point(this._x4,this._y4);break}}},point:function(t,e){switch(t=+t,e=+e,this._point){case 0:this._point=1,this._x2=t,this._y2=e;break;case 1:this._point=2,this._x3=t,this._y3=e;break;case 2:this._point=3,this._x4=t,this._y4=e,this._context.moveTo((this._x0+4*this._x1+t)/6,(this._y0+4*this._y1+e)/6);break;default:gu(this,t,e);break}this._x0=this._x1,this._x1=t,this._y0=this._y1,this._y1=e}};function RL(t){return new Rv(t)}function Iv(t){this._context=t}Iv.prototype={areaStart:function(){this._line=0},areaEnd:function(){this._line=NaN},lineStart:function(){this._x0=this._x1=this._y0=this._y1=NaN,this._point=0},lineEnd:function(){(this._line||this._line!==0&&this._point===3)&&this._context.closePath(),this._line=1-this._line},point:function(t,e){switch(t=+t,e=+e,this._point){case 0:this._point=1;break;case 1:this._point=2;break;case 2:this._point=3;var n=(this._x0+4*this._x1+t)/6,r=(this._y0+4*this._y1+e)/6;this._line?this._context.lineTo(n,r):this._context.moveTo(n,r);break;case 3:this._point=4;default:gu(this,t,e);break}this._x0=this._x1,this._x1=t,this._y0=this._y1,this._y1=e}};function IL(t){return new Iv(t)}function Nv(t,e){this._basis=new mu(t),this._beta=e}Nv.prototype={lineStart:function(){this._x=[],this._y=[],this._basis.lineStart()},lineEnd:function(){var t=this._x,e=this._y,n=t.length-1;if(n>0)for(var r=t[0],i=e[0],o=t[n]-r,a=e[n]-i,s=-1,u;++s<=n;)u=s/n,this._basis.point(this._beta*t[s]+(1-this._beta)*(r+u*o),this._beta*e[s]+(1-this._beta)*(i+u*a));this._x=this._y=null,this._basis.lineEnd()},point:function(t,e){this._x.push(+t),this._y.push(+e)}};const NL=function t(e){function n(r){return e===1?new mu(r):new Nv(r,e)}return n.beta=function(r){return t(+r)},n}(.85);function yu(t,e,n){t._context.bezierCurveTo(t._x1+t._k*(t._x2-t._x0),t._y1+t._k*(t._y2-t._y0),t._x2+t._k*(t._x1-e),t._y2+t._k*(t._y1-n),t._x2,t._y2)}function lh(t,e){this._context=t,this._k=(1-e)/6}lh.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:yu(this,this._x1,this._y1);break}(this._line||this._line!==0&&this._point===1)&&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:yu(this,t,e);break}this._x0=this._x1,this._x1=this._x2,this._x2=t,this._y0=this._y1,this._y1=this._y2,this._y2=e}};const FL=function t(e){function n(r){return new lh(r,e)}return n.tension=function(r){return t(+r)},n}(0);function fh(t,e){this._context=t,this._k=(1-e)/6}fh.prototype={areaStart:_n,areaEnd:_n,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);break}}},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:yu(this,t,e);break}this._x0=this._x1,this._x1=this._x2,this._x2=t,this._y0=this._y1,this._y1=this._y2,this._y2=e}};const GL=function t(e){function n(r){return new fh(r,e)}return n.tension=function(r){return t(+r)},n}(0);function hh(t,e){this._context=t,this._k=(1-e)/6}hh.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(){(this._line||this._line!==0&&this._point===3)&&this._context.closePath(),this._line=1-this._line},point:function(t,e){switch(t=+t,e=+e,this._point){case 0:this._point=1;break;case 1:this._point=2;break;case 2:this._point=3,this._line?this._context.lineTo(this._x2,this._y2):this._context.moveTo(this._x2,this._y2);break;case 3:this._point=4;default:yu(this,t,e);break}this._x0=this._x1,this._x1=this._x2,this._x2=t,this._y0=this._y1,this._y1=this._y2,this._y2=e}};const zL=function t(e){function n(r){return new hh(r,e)}return n.tension=function(r){return t(+r)},n}(0);function dh(t,e,n){var r=t._x1,i=t._y1,o=t._x2,a=t._y2;if(t._l01_a>Ut){var s=2*t._l01_2a+3*t._l01_a*t._l12_a+t._l12_2a,u=3*t._l01_a*(t._l01_a+t._l12_a);r=(r*s-t._x0*t._l12_2a+t._x2*t._l01_2a)/u,i=(i*s-t._y0*t._l12_2a+t._y2*t._l01_2a)/u}if(t._l23_a>Ut){var c=2*t._l23_2a+3*t._l23_a*t._l12_a+t._l12_2a,l=3*t._l23_a*(t._l23_a+t._l12_a);o=(o*c+t._x1*t._l23_2a-e*t._l12_2a)/l,a=(a*c+t._y1*t._l23_2a-n*t._l12_2a)/l}t._context.bezierCurveTo(r,i,o,a,t._x2,t._y2)}function Fv(t,e){this._context=t,this._alpha=e}Fv.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);break}(this._line||this._line!==0&&this._point===1)&&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:dh(this,t,e);break}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}};const OL=function t(e){function n(r){return e?new Fv(r,e):new lh(r,0)}return n.alpha=function(r){return t(+r)},n}(.5);function Gv(t,e){this._context=t,this._alpha=e}Gv.prototype={areaStart:_n,areaEnd:_n,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);break}}},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:dh(this,t,e);break}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}};const UL=function t(e){function n(r){return e?new Gv(r,e):new fh(r,0)}return n.alpha=function(r){return t(+r)},n}(.5);function zv(t,e){this._context=t,this._alpha=e}zv.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(){(this._line||this._line!==0&&this._point===3)&&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;break;case 1:this._point=2;break;case 2:this._point=3,this._line?this._context.lineTo(this._x2,this._y2):this._context.moveTo(this._x2,this._y2);break;case 3:this._point=4;default:dh(this,t,e);break}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}};const BL=function t(e){function n(r){return e?new zv(r,e):new hh(r,0)}return n.alpha=function(r){return t(+r)},n}(.5);function Ov(t){this._context=t}Ov.prototype={areaStart:_n,areaEnd:_n,lineStart:function(){this._point=0},lineEnd:function(){this._point&&this._context.closePath()},point:function(t,e){t=+t,e=+e,this._point?this._context.lineTo(t,e):(this._point=1,this._context.moveTo(t,e))}};function YL(t){return new Ov(t)}function Uv(t){return t<0?-1:1}function Bv(t,e,n){var r=t._x1-t._x0,i=e-t._x1,o=(t._y1-t._y0)/(r||i<0&&-0),a=(n-t._y1)/(i||r<0&&-0),s=(o*i+a*r)/(r+i);return(Uv(o)+Uv(a))*Math.min(Math.abs(o),Math.abs(a),.5*Math.abs(s))||0}function Yv(t,e){var n=t._x1-t._x0;return n?(3*(t._y1-t._y0)/n-e)/2:e}function ph(t,e,n){var r=t._x0,i=t._y0,o=t._x1,a=t._y1,s=(o-r)/3;t._context.bezierCurveTo(r+s,i+s*e,o-s,a-s*n,o,a)}function bu(t){this._context=t}bu.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:ph(this,this._t0,Yv(this,this._t0));break}(this._line||this._line!==0&&this._point===1)&&this._context.closePath(),this._line=1-this._line},point:function(t,e){var n=NaN;if(t=+t,e=+e,!(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,ph(this,Yv(this,n=Bv(this,t,e)),n);break;default:ph(this,this._t0,n=Bv(this,t,e));break}this._x0=this._x1,this._x1=t,this._y0=this._y1,this._y1=e,this._t0=n}}};function Wv(t){this._context=new Hv(t)}(Wv.prototype=Object.create(bu.prototype)).point=function(t,e){bu.prototype.point.call(this,e,t)};function Hv(t){this._context=t}Hv.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,o){this._context.bezierCurveTo(e,t,r,n,o,i)}};function WL(t){return new bu(t)}function HL(t){return new Wv(t)}function qv(t){this._context=t}qv.prototype={areaStart:function(){this._line=0},areaEnd:function(){this._line=NaN},lineStart:function(){this._x=[],this._y=[]},lineEnd:function(){var t=this._x,e=this._y,n=t.length;if(n)if(this._line?this._context.lineTo(t[0],e[0]):this._context.moveTo(t[0],e[0]),n===2)this._context.lineTo(t[1],e[1]);else for(var r=Xv(t),i=Xv(e),o=0,a=1;a<n;++o,++a)this._context.bezierCurveTo(r[0][o],i[0][o],r[1][o],i[1][o],t[a],e[a]);(this._line||this._line!==0&&n===1)&&this._context.closePath(),this._line=1-this._line,this._x=this._y=null},point:function(t,e){this._x.push(+t),this._y.push(+e)}};function Xv(t){var e,n=t.length-1,r,i=new Array(n),o=new Array(n),a=new Array(n);for(i[0]=0,o[0]=2,a[0]=t[0]+2*t[1],e=1;e<n-1;++e)i[e]=1,o[e]=4,a[e]=4*t[e]+2*t[e+1];for(i[n-1]=2,o[n-1]=7,a[n-1]=8*t[n-1]+t[n],e=1;e<n;++e)r=i[e]/o[e-1],o[e]-=r,a[e]-=r*a[e-1];for(i[n-1]=a[n-1]/o[n-1],e=n-2;e>=0;--e)i[e]=(a[e]-i[e+1])/o[e];for(o[n-1]=(t[n]+i[n-1])/2,e=0;e<n-1;++e)o[e]=2*t[e+1]-i[e+1];return[i,o]}function qL(t){return new qv(t)}function vu(t,e){this._context=t,this._t=e}vu.prototype={areaStart:function(){this._line=0},areaEnd:function(){this._line=NaN},lineStart:function(){this._x=this._y=NaN,this._point=0},lineEnd:function(){0<this._t&&this._t<1&&this._point===2&&this._context.lineTo(this._x,this._y),(this._line||this._line!==0&&this._point===1)&&this._context.closePath(),this._line>=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)}break}}this._x=t,this._y=e}};function XL(t){return new vu(t,.5)}function VL(t){return new vu(t,0)}function jL(t){return new vu(t,1)}function ei(t,e){if((a=t.length)>1)for(var n=1,r,i,o=t[e[0]],a,s=o.length;n<a;++n)for(i=o,o=t[e[n]],r=0;r<s;++r)o[r][1]+=o[r][0]=isNaN(i[r][1])?i[r][0]:i[r][1]}function ni(t){for(var e=t.length,n=new Array(e);--e>=0;)n[e]=e;return n}function ZL(t,e){return t[e]}function KL(t){const e=[];return e.key=t,e}function QL(){var t=ot([]),e=ni,n=ei,r=ZL;function i(o){var a=Array.from(t.apply(this,arguments),KL),s,u=a.length,c=-1,l;for(const h of o)for(s=0,++c;s<u;++s)(a[s][c]=[0,+r(h,a[s].key,c,o)]).data=h;for(s=0,l=lu(e(a));s<u;++s)a[l[s]].index=s;return n(a,l),a}return i.keys=function(o){return arguments.length?(t=typeof o=="function"?o:ot(Array.from(o)),i):t},i.value=function(o){return arguments.length?(r=typeof o=="function"?o:ot(+o),i):r},i.order=function(o){return arguments.length?(e=o==null?ni:typeof o=="function"?o:ot(Array.from(o)),i):e},i.offset=function(o){return arguments.length?(n=o??ei,i):n},i}function JL(t,e){if((r=t.length)>0){for(var n,r,i=0,o=t[0].length,a;i<o;++i){for(a=n=0;n<r;++n)a+=t[n][i][1]||0;if(a)for(n=0;n<r;++n)t[n][i][1]/=a}ei(t,e)}}function tC(t,e){if((u=t.length)>0)for(var n,r=0,i,o,a,s,u,c=t[e[0]].length;r<c;++r)for(a=s=0,n=0;n<u;++n)(o=(i=t[e[n]][r])[1]-i[0])>0?(i[0]=a,i[1]=a+=o):o<0?(i[1]=s,i[0]=s+=o):(i[0]=0,i[1]=o)}function eC(t,e){if((i=t.length)>0){for(var n=0,r=t[e[0]],i,o=r.length;n<o;++n){for(var a=0,s=0;a<i;++a)s+=t[a][n][1]||0;r[n][1]+=r[n][0]=-s/2}ei(t,e)}}function nC(t,e){if(!(!((a=t.length)>0)||!((o=(i=t[e[0]]).length)>0))){for(var n=0,r=1,i,o,a;r<o;++r){for(var s=0,u=0,c=0;s<a;++s){for(var l=t[e[s]],h=l[r][1]||0,f=l[r-1][1]||0,d=(h-f)/2,p=0;p<s;++p){var g=t[e[p]],m=g[r][1]||0,y=g[r-1][1]||0;d+=m-y}u+=h,c+=d*h}i[r-1][1]+=i[r-1][0]=n,u&&(n-=c/u)}i[r-1][1]+=i[r-1][0]=n,ei(t,e)}}function Vv(t){var e=t.map(rC);return ni(t).sort(function(n,r){return e[n]-e[r]})}function rC(t){for(var e=-1,n=0,r=t.length,i,o=-1/0;++e<r;)(i=+t[e][1])>o&&(o=i,n=e);return n}function jv(t){var e=t.map(Zv);return ni(t).sort(function(n,r){return e[n]-e[r]})}function Zv(t){for(var e=0,n=-1,r=t.length,i;++n<r;)(i=+t[n][1])&&(e+=i);return e}function iC(t){return jv(t).reverse()}function oC(t){var e=t.length,n,r,i=t.map(Zv),o=Vv(t),a=0,s=0,u=[],c=[];for(n=0;n<e;++n)r=o[n],a<s?(a+=i[r],u.push(r)):(s+=i[r],c.push(r));return c.reverse().concat(u)}function aC(t){return ni(t).reverse()}const xu=t=>()=>t;function sC(t,{sourceEvent:e,target:n,transform:r,dispatch:i}){Object.defineProperties(this,{type:{value:t,enumerable:!0,configurable:!0},sourceEvent:{value:e,enumerable:!0,configurable:!0},target:{value:n,enumerable:!0,configurable:!0},transform:{value:r,enumerable:!0,configurable:!0},_:{value:i}})}function Be(t,e,n){this.k=t,this.x=e,this.y=n}Be.prototype={constructor:Be,scale:function(t){return t===1?this:new Be(this.k*t,this.x,this.y)},translate:function(t,e){return t===0&e===0?this:new Be(this.k,this.x+this.k*t,this.y+this.k*e)},apply:function(t){return[t[0]*this.k+this.x,t[1]*this.k+this.y]},applyX:function(t){return t*this.k+this.x},applyY:function(t){return t*this.k+this.y},invert:function(t){return[(t[0]-this.x)/this.k,(t[1]-this.y)/this.k]},invertX:function(t){return(t-this.x)/this.k},invertY:function(t){return(t-this.y)/this.k},rescaleX:function(t){return t.copy().domain(t.range().map(this.invertX,this).map(t.invert,t))},rescaleY:function(t){return t.copy().domain(t.range().map(this.invertY,this).map(t.invert,t))},toString:function(){return"translate("+this.x+","+this.y+") scale("+this.k+")"}};var _u=new Be(1,0,0);Kv.prototype=Be.prototype;function Kv(t){for(;!t.__zoom;)if(!(t=t.parentNode))return _u;return t.__zoom}function gh(t){t.stopImmediatePropagation()}function Do(t){t.preventDefault(),t.stopImmediatePropagation()}function uC(t){return(!t.ctrlKey||t.type==="wheel")&&!t.button}function cC(){var t=this;return t instanceof SVGElement?(t=t.ownerSVGElement||t,t.hasAttribute("viewBox")?(t=t.viewBox.baseVal,[[t.x,t.y],[t.x+t.width,t.y+t.height]]):[[0,0],[t.width.baseVal.value,t.height.baseVal.value]]):[[0,0],[t.clientWidth,t.clientHeight]]}function Qv(){return this.__zoom||_u}function lC(t){return-t.deltaY*(t.deltaMode===1?.05:t.deltaMode?1:.002)*(t.ctrlKey?10:1)}function fC(){return navigator.maxTouchPoints||"ontouchstart"in this}function hC(t,e,n){var r=t.invertX(e[0][0])-n[0][0],i=t.invertX(e[1][0])-n[1][0],o=t.invertY(e[0][1])-n[0][1],a=t.invertY(e[1][1])-n[1][1];return t.translate(i>r?(r+i)/2:Math.min(0,r)||Math.max(0,i),a>o?(o+a)/2:Math.min(0,o)||Math.max(0,a))}function Jv(){var t=uC,e=cC,n=hC,r=lC,i=fC,o=[0,1/0],a=[[-1/0,-1/0],[1/0,1/0]],s=250,u=Tg,c=Rn("start","zoom","end"),l,h,f,d=500,p=150,g=0,m=10;function y(A){A.property("__zoom",Qv).on("wheel.zoom",S,{passive:!1}).on("mousedown.zoom",D).on("dblclick.zoom",E).filter(i).on("touchstart.zoom",T).on("touchmove.zoom",F).on("touchend.zoom touchcancel.zoom",M).style("-webkit-tap-highlight-color","rgba(0,0,0,0)")}y.transform=function(A,L,P,I){var z=A.selection?A.selection():A;z.property("__zoom",Qv),A!==z?$(A,L,P,I):z.interrupt().each(function(){v(this,arguments).event(I).start().zoom(null,typeof L=="function"?L.apply(this,arguments):L).end()})},y.scaleBy=function(A,L,P,I){y.scaleTo(A,function(){var z=this.__zoom.k,k=typeof L=="function"?L.apply(this,arguments):L;return z*k},P,I)},y.scaleTo=function(A,L,P,I){y.transform(A,function(){var z=e.apply(this,arguments),k=this.__zoom,R=P==null?b(z):typeof P=="function"?P.apply(this,arguments):P,N=k.invert(R),C=typeof L=="function"?L.apply(this,arguments):L;return n(x(_(k,C),R,N),z,a)},P,I)},y.translateBy=function(A,L,P,I){y.transform(A,function(){return n(this.__zoom.translate(typeof L=="function"?L.apply(this,arguments):L,typeof P=="function"?P.apply(this,arguments):P),e.apply(this,arguments),a)},null,I)},y.translateTo=function(A,L,P,I,z){y.transform(A,function(){var k=e.apply(this,arguments),R=this.__zoom,N=I==null?b(k):typeof I=="function"?I.apply(this,arguments):I;return n(_u.translate(N[0],N[1]).scale(R.k).translate(typeof L=="function"?-L.apply(this,arguments):-L,typeof P=="function"?-P.apply(this,arguments):-P),k,a)},I,z)};function _(A,L){return L=Math.max(o[0],Math.min(o[1],L)),L===A.k?A:new Be(L,A.x,A.y)}function x(A,L,P){var I=L[0]-P[0]*A.k,z=L[1]-P[1]*A.k;return I===A.x&&z===A.y?A:new Be(A.k,I,z)}function b(A){return[(+A[0][0]+ +A[1][0])/2,(+A[0][1]+ +A[1][1])/2]}function $(A,L,P,I){A.on("start.zoom",function(){v(this,arguments).event(I).start()}).on("interrupt.zoom end.zoom",function(){v(this,arguments).event(I).end()}).tween("zoom",function(){var z=this,k=arguments,R=v(z,k).event(I),N=e.apply(z,k),C=P==null?b(N):typeof P=="function"?P.apply(z,k):P,O=Math.max(N[1][0]-N[0][0],N[1][1]-N[0][1]),X=z.__zoom,W=typeof L=="function"?L.apply(z,k):L,V=u(X.invert(C).concat(O/X.k),W.invert(C).concat(O/W.k));return function(J){if(J===1)J=W;else{var pt=V(J),q=O/pt[2];J=new Be(q,C[0]-pt[0]*q,C[1]-pt[1]*q)}R.zoom(null,J)}})}function v(A,L,P){return!P&&A.__zooming||new w(A,L)}function w(A,L){this.that=A,this.args=L,this.active=0,this.sourceEvent=null,this.extent=e.apply(A,L),this.taps=0}w.prototype={event:function(A){return A&&(this.sourceEvent=A),this},start:function(){return++this.active===1&&(this.that.__zooming=this,this.emit("start")),this},zoom:function(A,L){return this.mouse&&A!=="mouse"&&(this.mouse[1]=L.invert(this.mouse[0])),this.touch0&&A!=="touch"&&(this.touch0[1]=L.invert(this.touch0[0])),this.touch1&&A!=="touch"&&(this.touch1[1]=L.invert(this.touch1[0])),this.that.__zoom=L,this.emit("zoom"),this},end:function(){return--this.active===0&&(delete this.that.__zooming,this.emit("end")),this},emit:function(A){var L=Z(this.that).datum();c.call(A,this.that,new sC(A,{sourceEvent:this.sourceEvent,target:y,type:A,transform:this.that.__zoom,dispatch:c}),L)}};function S(A,...L){if(!t.apply(this,arguments))return;var P=v(this,L).event(A),I=this.__zoom,z=Math.max(o[0],Math.min(o[1],I.k*Math.pow(2,r.apply(this,arguments)))),k=ae(A);if(P.wheel)(P.mouse[0][0]!==k[0]||P.mouse[0][1]!==k[1])&&(P.mouse[1]=I.invert(P.mouse[0]=k)),clearTimeout(P.wheel);else{if(I.k===z)return;P.mouse=[k,I.invert(k)],Bn(this),P.start()}Do(A),P.wheel=setTimeout(R,p),P.zoom("mouse",n(x(_(I,z),P.mouse[0],P.mouse[1]),P.extent,a));function R(){P.wheel=null,P.end()}}function D(A,...L){if(f||!t.apply(this,arguments))return;var P=A.currentTarget,I=v(this,L,!0).event(A),z=Z(A.view).on("mousemove.zoom",C,!0).on("mouseup.zoom",O,!0),k=ae(A,P),R=A.clientX,N=A.clientY;Sa(A.view),gh(A),I.mouse=[k,this.__zoom.invert(k)],Bn(this),I.start();function C(X){if(Do(X),!I.moved){var W=X.clientX-R,V=X.clientY-N;I.moved=W*W+V*V>g}I.event(X).zoom("mouse",n(x(I.that.__zoom,I.mouse[0]=ae(X,P),I.mouse[1]),I.extent,a))}function O(X){z.on("mousemove.zoom mouseup.zoom",null),Aa(X.view,I.moved),Do(X),I.event(X).end()}}function E(A,...L){if(t.apply(this,arguments)){var P=this.__zoom,I=ae(A.changedTouches?A.changedTouches[0]:A,this),z=P.invert(I),k=P.k*(A.shiftKey?.5:2),R=n(x(_(P,k),I,z),e.apply(this,L),a);Do(A),s>0?Z(this).transition().duration(s).call($,R,I,A):Z(this).call(y.transform,R,I,A)}}function T(A,...L){if(t.apply(this,arguments)){var P=A.touches,I=P.length,z=v(this,L,A.changedTouches.length===I).event(A),k,R,N,C;for(gh(A),R=0;R<I;++R)N=P[R],C=ae(N,this),C=[C,this.__zoom.invert(C),N.identifier],z.touch0?!z.touch1&&z.touch0[2]!==C[2]&&(z.touch1=C,z.taps=0):(z.touch0=C,k=!0,z.taps=1+!!l);l&&(l=clearTimeout(l)),k&&(z.taps<2&&(h=C[0],l=setTimeout(function(){l=null},d)),Bn(this),z.start())}}function F(A,...L){if(this.__zooming){var P=v(this,L).event(A),I=A.changedTouches,z=I.length,k,R,N,C;for(Do(A),k=0;k<z;++k)R=I[k],N=ae(R,this),P.touch0&&P.touch0[2]===R.identifier?P.touch0[0]=N:P.touch1&&P.touch1[2]===R.identifier&&(P.touch1[0]=N);if(R=P.that.__zoom,P.touch1){var O=P.touch0[0],X=P.touch0[1],W=P.touch1[0],V=P.touch1[1],J=(J=W[0]-O[0])*J+(J=W[1]-O[1])*J,pt=(pt=V[0]-X[0])*pt+(pt=V[1]-X[1])*pt;R=_(R,Math.sqrt(J/pt)),N=[(O[0]+W[0])/2,(O[1]+W[1])/2],C=[(X[0]+V[0])/2,(X[1]+V[1])/2]}else if(P.touch0)N=P.touch0[0],C=P.touch0[1];else return;P.zoom("touch",n(x(R,N,C),P.extent,a))}}function M(A,...L){if(this.__zooming){var P=v(this,L).event(A),I=A.changedTouches,z=I.length,k,R;for(gh(A),f&&clearTimeout(f),f=setTimeout(function(){f=null},d),k=0;k<z;++k)R=I[k],P.touch0&&P.touch0[2]===R.identifier?delete P.touch0:P.touch1&&P.touch1[2]===R.identifier&&delete P.touch1;if(P.touch1&&!P.touch0&&(P.touch0=P.touch1,delete P.touch1),P.touch0)P.touch0[1]=this.__zoom.invert(P.touch0[0]);else if(P.end(),P.taps===2&&(R=ae(R,this),Math.hypot(h[0]-R[0],h[1]-R[1])<m)){var N=Z(this).on("dblclick.zoom");N&&N.apply(this,arguments)}}}return y.wheelDelta=function(A){return arguments.length?(r=typeof A=="function"?A:xu(+A),y):r},y.filter=function(A){return arguments.length?(t=typeof A=="function"?A:xu(!!A),y):t},y.touchable=function(A){return arguments.length?(i=typeof A=="function"?A:xu(!!A),y):i},y.extent=function(A){return arguments.length?(e=typeof A=="function"?A:xu([[+A[0][0],+A[0][1]],[+A[1][0],+A[1][1]]]),y):e},y.scaleExtent=function(A){return arguments.length?(o[0]=+A[0],o[1]=+A[1],y):[o[0],o[1]]},y.translateExtent=function(A){return arguments.length?(a[0][0]=+A[0][0],a[1][0]=+A[1][0],a[0][1]=+A[0][1],a[1][1]=+A[1][1],y):[[a[0][0],a[0][1]],[a[1][0],a[1][1]]]},y.constrain=function(A){return arguments.length?(n=A,y):n},y.duration=function(A){return arguments.length?(s=+A,y):s},y.interpolate=function(A){return arguments.length?(u=A,y):u},y.on=function(){var A=c.on.apply(c,arguments);return A===c?y:A},y.clickDistance=function(A){return arguments.length?(g=(A=+A)*A,y):Math.sqrt(g)},y.tapDistance=function(A){return arguments.length?(m=+A,y):m},y}const t2=Object.freeze(Object.defineProperty({__proto__:null,Adder:Dt,Delaunay:Ml,FormatSpecifier:os,InternMap:Ai,InternSet:kn,Node:Qn,Path:Hi,Voronoi:g1,ZoomTransform:Be,active:gM,arc:cv,area:fv,areaRadial:mv,ascending:_t,autoType:z7,axisBottom:s5,axisLeft:Dp,axisRight:a5,axisTop:Pp,bin:bp,bisect:En,bisectCenter:n6,bisectLeft:e6,bisectRight:rp,bisector:la,blob:B7,blur:r6,blur2:ip,blurImage:i6,brush:PM,brushSelection:AM,brushX:MM,brushY:TM,buffer:W7,chord:EM,chordDirected:LM,chordTranspose:kM,cluster:nP,color:fn,contourDensity:i7,contours:_l,count:ha,create:BA,creator:_a,cross:f6,csv:X7,csvFormat:P7,csvFormatBody:D7,csvFormatRow:k7,csvFormatRows:E7,csvFormatValue:L7,csvParse:v1,csvParseRows:T7,cubehelix:Me,cumsum:h6,curveBasis:CL,curveBasisClosed:RL,curveBasisOpen:IL,curveBumpX:bv,curveBumpY:vv,curveBundle:NL,curveCardinal:FL,curveCardinalClosed:GL,curveCardinalOpen:zL,curveCatmullRom:OL,curveCatmullRomClosed:UL,curveCatmullRomOpen:BL,curveLinear:fu,curveLinearClosed:YL,curveMonotoneX:WL,curveMonotoneY:HL,curveNatural:qL,curveStep:XL,curveStepAfter:jL,curveStepBefore:VL,descending:ep,deviation:sp,difference:V6,disjoint:j6,dispatch:Rn,drag:Up,dragDisable:Sa,dragEnable:Aa,dsv:q7,dsvFormat:es,easeBack:jg,easeBackIn:sM,easeBackInOut:jg,easeBackOut:uM,easeBounce:Yi,easeBounceIn:oM,easeBounceInOut:aM,easeBounceOut:Yi,easeCircle:Vg,easeCircleIn:j4,easeCircleInOut:Vg,easeCircleOut:Z4,easeCubic:Bi,easeCubicIn:U4,easeCubicInOut:Bi,easeCubicOut:B4,easeElastic:Va,easeElasticIn:cM,easeElasticInOut:lM,easeElasticOut:Va,easeExp:Xg,easeExpIn:X4,easeExpInOut:Xg,easeExpOut:V4,easeLinear:G4,easePoly:Yg,easePolyIn:Y4,easePolyInOut:Yg,easePolyOut:W4,easeQuad:Bg,easeQuadIn:z4,easeQuadInOut:Bg,easeQuadOut:O4,easeSin:qg,easeSinIn:H4,easeSinInOut:qg,easeSinOut:q4,every:B6,extent:Si,fcumsum:p6,filter:W6,flatGroup:g6,flatRollup:m6,forceCenter:e9,forceCollide:S1,forceLink:_9,forceManyBody:P1,forceRadial:D9,forceSimulation:T1,forceX:D1,forceY:E1,get format(){return ji},formatDefaultLocale:G1,formatLocale:F1,get formatPrefix(){return Ll},formatSpecifier:Or,fsum:d6,geoAlbers:Qm,geoAlbersUsa:RT,geoArea:z9,geoAzimuthalEqualArea:IT,geoAzimuthalEqualAreaRaw:bf,geoAzimuthalEquidistant:NT,geoAzimuthalEquidistantRaw:vf,geoBounds:Y9,geoCentroid:j9,geoCircle:Z9,geoClipAntimeridian:Zl,geoClipCircle:xm,geoClipExtent:rT,geoClipRectangle:Ts,geoConicConformal:GT,geoConicConformalRaw:ey,geoConicEqualArea:zs,geoConicEqualAreaRaw:Km,geoConicEquidistant:OT,geoConicEquidistantRaw:ny,geoContains:lT,geoDistance:Es,geoEqualEarth:BT,geoEqualEarthRaw:xf,geoEquirectangular:zT,geoEquirectangularRaw:fo,geoGnomonic:YT,geoGnomonicRaw:_f,geoGraticule:Em,geoGraticule10:fT,geoIdentity:WT,geoInterpolate:hT,geoLength:_m,geoMercator:FT,geoMercatorRaw:lo,geoNaturalEarth1:HT,geoNaturalEarth1Raw:wf,geoOrthographic:qT,geoOrthographicRaw:$f,geoPath:ST,geoProjection:ze,geoProjectionMutator:mf,geoRotation:hm,geoStereographic:XT,geoStereographicRaw:Sf,geoStream:Pe,geoTransform:AT,geoTransverseMercator:VT,geoTransverseMercatorRaw:Af,gray:u8,greatest:vp,greatestIndex:N6,group:fp,groupSort:v6,groups:hp,hcl:Ca,hierarchy:Mf,histogram:bp,hsl:Da,html:J7,image:j7,index:y6,indexes:b6,interpolate:hn,interpolateArray:p8,interpolateBasis:hg,interpolateBasisClosed:dg,interpolateBlues:Uk,interpolateBrBG:xk,interpolateBuGn:Dk,interpolateBuPu:Ek,interpolateCividis:Xk,interpolateCool:Zk,interpolateCubehelix:D8,interpolateCubehelixDefault:Vk,interpolateCubehelixLong:za,interpolateDate:vg,interpolateDiscrete:y8,interpolateGnBu:kk,interpolateGreens:Bk,interpolateGreys:Yk,interpolateHcl:T8,interpolateHclLong:P8,interpolateHsl:S8,interpolateHslLong:A8,interpolateHue:b8,interpolateInferno:iL,interpolateLab:M8,interpolateMagma:rL,interpolateNumber:fe,interpolateNumberArray:qc,interpolateObject:xg,interpolateOrRd:Lk,interpolateOranges:qk,interpolatePRGn:_k,interpolatePiYG:wk,interpolatePlasma:oL,interpolatePuBu:Rk,interpolatePuBuGn:Ck,interpolatePuOr:$k,interpolatePuRd:Ik,interpolatePurples:Wk,interpolateRainbow:Kk,interpolateRdBu:Sk,interpolateRdGy:Ak,interpolateRdPu:Nk,interpolateRdYlBu:Mk,interpolateRdYlGn:Tk,interpolateReds:Hk,interpolateRgb:Ii,interpolateRgbBasis:mg,interpolateRgbBasisClosed:d8,interpolateRound:Fa,interpolateSinebow:tL,interpolateSpectral:Pk,interpolateString:jc,interpolateTransformCss:Sg,interpolateTransformSvg:Ag,interpolateTurbo:eL,interpolateViridis:nL,interpolateWarm:jk,interpolateYlGn:Gk,interpolateYlGnBu:Fk,interpolateYlOrBr:zk,interpolateYlOrRd:Ok,interpolateZoom:Tg,interrupt:Bn,intersection:Z6,interval:R8,isoFormat:JE,isoParse:nk,json:K7,lab:La,lch:c8,least:I6,leastIndex:wp,line:hu,lineRadial:gv,link:du,linkHorizontal:_L,linkRadial:$L,linkVertical:wL,local:zp,map:H6,matcher:kc,max:Mi,maxIndex:Sc,mean:T6,median:P6,medianIndex:D6,merge:Mc,min:ga,minIndex:Ac,mode:k6,namespace:Ei,namespaces:Dc,nice:wc,now:Oi,pack:LP,packEnclose:MP,packSiblings:EP,pairs:L6,partition:CP,path:xl,pathRound:IM,permute:yp,pie:hv,piecewise:kg,pointRadial:Po,pointer:ae,pointers:WA,polygonArea:jP,polygonCentroid:ZP,polygonContains:tD,polygonHull:JP,polygonLength:eD,precisionFixed:z1,precisionPrefix:O1,precisionRound:U1,quadtree:rs,quantile:Pi,quantileIndex:_p,quantileSorted:xp,quantize:E8,quickselect:ma,radialArea:mv,radialLine:gv,randomBates:oD,randomBernoulli:uD,randomBeta:Sy,randomBinomial:Ay,randomCauchy:lD,randomExponential:aD,randomGamma:If,randomGeometric:$y,randomInt:rD,randomIrwinHall:wy,randomLcg:gD,randomLogNormal:iD,randomLogistic:fD,randomNormal:Rf,randomPareto:sD,randomPoisson:hD,randomUniform:nD,randomWeibull:cD,range:cn,rank:R6,reduce:q6,reverse:X6,rgb:Pr,ribbon:YM,ribbonArrow:WM,rollup:pp,rollups:gp,scaleBand:Gf,scaleDiverging:kb,scaleDivergingLog:Lb,scaleDivergingPow:rh,scaleDivergingSqrt:uk,scaleDivergingSymlog:Cb,scaleIdentity:Ey,scaleImplicit:Nf,scaleLinear:Bf,scaleLog:Iy,scaleOrdinal:Ff,scalePoint:zf,scalePow:js,scaleQuantile:By,scaleQuantize:Yy,scaleRadial:Uy,scaleSequential:Tb,scaleSequentialLog:Pb,scaleSequentialPow:nh,scaleSequentialQuantile:Eb,scaleSequentialSqrt:sk,scaleSequentialSymlog:Db,scaleSqrt:TD,scaleSymlog:Gy,scaleThreshold:Wy,scaleTime:ok,scaleUtc:ak,scan:F6,schemeAccent:lk,schemeBlues:ev,schemeBrBG:Rb,schemeBuGn:Yb,schemeBuPu:Wb,schemeCategory10:ck,schemeDark2:fk,schemeGnBu:Hb,schemeGreens:nv,schemeGreys:rv,schemeObservable10:hk,schemeOrRd:qb,schemeOranges:av,schemePRGn:Ib,schemePaired:dk,schemePastel1:pk,schemePastel2:gk,schemePiYG:Nb,schemePuBu:Vb,schemePuBuGn:Xb,schemePuOr:Fb,schemePuRd:jb,schemePurples:iv,schemeRdBu:Gb,schemeRdGy:zb,schemeRdPu:Zb,schemeRdYlBu:Ob,schemeRdYlGn:Ub,schemeReds:ov,schemeSet1:mk,schemeSet2:yk,schemeSet3:bk,schemeSpectral:Bb,schemeTableau10:vk,schemeYlGn:Qb,schemeYlGnBu:Kb,schemeYlOrBr:Jb,schemeYlOrRd:tv,select:Z,selectAll:HA,selection:Nn,selector:wa,selectorAll:Ec,shuffle:G6,shuffler:$p,some:Y6,sort:vc,stack:QL,stackOffsetDiverging:tC,stackOffsetExpand:JL,stackOffsetNone:ei,stackOffsetSilhouette:eC,stackOffsetWiggle:nC,stackOrderAppearance:Vv,stackOrderAscending:jv,stackOrderDescending:iC,stackOrderInsideOut:oC,stackOrderNone:ni,stackOrderReverse:aC,stratify:FP,style:In,subset:Q6,sum:z6,superset:Ap,svg:t9,symbol:LL,symbolAsterisk:xv,symbolCircle:pu,symbolCross:_v,symbolDiamond:$v,symbolDiamond2:Sv,symbolPlus:Av,symbolSquare:Mv,symbolSquare2:Tv,symbolStar:Dv,symbolTimes:ch,symbolTriangle:Ev,symbolTriangle2:kv,symbolWye:Lv,symbolX:ch,symbols:Cv,symbolsFill:Cv,symbolsStroke:kL,text:ns,thresholdFreedmanDiaconis:A6,thresholdScott:M6,thresholdSturges:$c,tickFormat:Dy,tickIncrement:Cn,tickStep:pa,ticks:Ln,timeDay:Zr,timeDays:CD,get timeFormat(){return Jf},timeFormatDefaultLocale:Ab,timeFormatLocale:cb,timeFriday:Zy,timeFridays:OD,timeHour:Qs,timeHours:kD,timeInterval:Tt,timeMillisecond:jr,timeMilliseconds:Hy,timeMinute:Zs,timeMinutes:DD,timeMonday:_o,timeMondays:ND,timeMonth:tu,timeMonths:VD,get timeParse(){return Sb},timeSaturday:Ky,timeSaturdays:UD,timeSecond:on,timeSeconds:Xy,timeSunday:Kr,timeSundays:Qy,timeThursday:er,timeThursdays:zD,timeTickInterval:ub,timeTicks:sb,timeTuesday:Vy,timeTuesdays:FD,timeWednesday:jy,timeWednesdays:GD,timeWeek:Kr,timeWeeks:Qy,timeYear:Oe,timeYears:ZD,timeout:Qc,timer:Ya,timerFlush:Rg,transition:Og,transpose:Sp,tree:WP,treemap:HP,treemapBinary:qP,treemapDice:bo,treemapResquarify:VP,treemapSlice:qs,treemapSliceDice:XP,treemapSquarify:xy,tsv:V7,tsvFormat:R7,tsvFormatBody:I7,tsvFormatRow:F7,tsvFormatRows:N7,tsvFormatValue:G7,tsvParse:x1,tsvParseRows:C7,union:J6,unixDay:Zf,unixDays:ID,utcDay:xo,utcDays:RD,get utcFormat(){return nu},utcFriday:eb,utcFridays:qD,utcHour:Js,utcHours:LD,utcMillisecond:jr,utcMilliseconds:Hy,utcMinute:Ks,utcMinutes:ED,utcMonday:wo,utcMondays:BD,utcMonth:eu,utcMonths:jD,get utcParse(){return th},utcSaturday:nb,utcSaturdays:XD,utcSecond:on,utcSeconds:Xy,utcSunday:Qr,utcSundays:rb,utcThursday:rr,utcThursdays:HD,utcTickInterval:ab,utcTicks:ob,utcTuesday:Jy,utcTuesdays:YD,utcWednesday:tb,utcWednesdays:WD,utcWeek:Qr,utcWeeks:rb,utcYear:Ue,utcYears:KD,variance:ap,window:Lc,xml:Q7,zip:U6,zoom:Jv,zoomIdentity:_u,zoomTransform:Kv},Symbol.toStringTag,{value:"Module"}));function e2(t){try{return t.node().getBBox()}catch(e){throw new Error(e)}}function dC(t,e){function n(i){var s;const o=document.createElementNS("http://www.w3.org/1999/xhtml","div");o.innerHTML='<svg xmlns="http://www.w3.org/2000/svg">'+i+"</svg>";const a=document.createDocumentFragment();for(;a&&((s=o==null?void 0:o.firstChild)!=null&&s.firstChild);)a.appendChild(o.firstChild.firstChild);return a}const r=t.node();for(;r.hasChildNodes();)r.removeChild(r.firstChild);t.node().appendChild(n(e))}function ri(t){return t.substring(0,4)!=="ease"?Bi:t2[t]??Bi}function wu({axisWidth:t,innerRadius:e,outerRadius:n,padAngle:r,cornerRadius:i}){const o=Bf().domain([0,1]).range([0,t/2]),a=o(n);return cv().innerRadius(o(e)).outerRadius(a).padAngle(r).padRadius(a).cornerRadius(i)}const mh=(t,e)=>e instanceof Function?e(t):ji(e)(t);function n2(t,e=10){var i;const n=document.createElement("canvas").getContext("2d");return(((i=n==null?void 0:n.measureText(t))==null?void 0:i.width)??0)*e/10}function pC(t){const e=[0,0];return t.length?t.reduce((r,i)=>[i<r[0]?i:r[0],i>r[1]?i:r[1]],[t[0],t[0]]):e}function gC(t){const e=t.filter(n=>n.value!=null&&n.visible!=!1).map(n=>n.value);return pC(e)}function Bt(t,e){const n=e.colors[e.colorScheme];return t==="series"?n.series[0]:t=="none"?"none":n[t]!=null?n[t]:n.primary}function mC(t,e){const n=t<e.colors[e.colorScheme].series.length?t:t%e.colors[e.colorScheme].series.length;return e.colors[e.colorScheme].series[n]}function yh({datum:t,colorType:e,fullChartParams:n}){return e==="series"?t.color?t.color:n.colors[n.colorScheme].series[0]:e=="none"?"none":n.colors[n.colorScheme][e]!=null?n.colors[n.colorScheme][e]:n.colors[n.colorScheme].primary}function st(t,e,n){const r=n?`--${n}`:"";return`orbcharts-${t}__${e}${r}`}function ii(t,e){const r=Math.random().toString(36).substr(2,5);return st(t,e,r)}const Eo=({selection:t,pluginName:e,clipPathID:n,existedSeriesLabels$:r,gridContainer$:i,gridAxesTransform$:o,gridGraphicTransform$:a})=>{const s=st(e,"series"),u=st(e,"axes"),c=st(e,"graphic"),l=r.pipe(B((p,g)=>t.selectAll(`g.${s}`).data(p,m=>m).join(m=>m.append("g").classed(s,!0).each((y,_,x)=>{Z(x[_]).selectAll(`g.${u}`).data([_]).join(b=>b.append("g").classed(u,!0).attr("clip-path",`url(#${n})`).each(($,v,w)=>{Z(w[v]).selectAll("defs").data([v]).join("defs"),Z(w[v]).selectAll("g").data([v]).join("g").classed(c,!0)}),b=>b,b=>b.remove())}),m=>m,m=>m.remove())),U(p=>H({seriesSelection:Nu(p),gridContainer:i})),B(p=>(p.seriesSelection.transition().attr("transform",(g,m)=>{const y=p.gridContainer[m]??p.gridContainer[0],_=y.translate,x=y.scale;return`translate(${_[0]}, ${_[1]}) scale(${x[0]}, ${x[1]})`}),p.seriesSelection))),h=H({seriesSelection:l,gridAxesTransform:o}).pipe(U(async p=>p),B(p=>p.seriesSelection.select(`g.${u}`).style("transform",p.gridAxesTransform.value))),f=h.pipe(B(p=>p.select("defs"))),d=H({axesSelection:h,gridGraphicTransform:a}).pipe(U(async p=>p),B(p=>{const g=p.axesSelection.select(`g.${c}`);return g.transition().duration(50).style("transform",p.gridGraphicTransform.value),g}));return{seriesSelection$:l,axesSelection$:h,defsSelection$:f,graphicGSelection$:d}},r2=({fullDataFormatter$:t,gridAxesSize$:e,computedData$:n,fullChartParams$:r})=>{const i=new it,o=new lt(a=>{H({dataFormatter:t,computedData:n}).pipe(G(i),U(async s=>s)).subscribe(s=>{const c=s.computedData[0]?s.computedData[0].length-1:0,l=s.dataFormatter.grid.groupAxis.scaleDomain[0]==="auto"?0-s.dataFormatter.grid.groupAxis.scalePadding:s.dataFormatter.grid.groupAxis.scaleDomain[0]-s.dataFormatter.grid.groupAxis.scalePadding,h=s.dataFormatter.grid.groupAxis.scaleDomain[1]==="auto"?c+s.dataFormatter.grid.groupAxis.scalePadding:s.dataFormatter.grid.groupAxis.scaleDomain[1]+s.dataFormatter.grid.groupAxis.scalePadding,d=(s.dataFormatter.grid.gridData.seriesDirection==="row"?(s.computedData[0]??[]).map(p=>p.groupLabel):s.computedData.map(p=>p[0].groupLabel)).filter((p,g)=>g>=l&&g<=h);a.next(d)})});return new lt(a=>{H({dataFormatter:t,axisSize:e,fullChartParams:r,scaleRangeGroupLabels:o}).pipe(G(i),U(async s=>s)).subscribe(s=>{const u=s.dataFormatter.grid.valueAxis.position==="right"||s.dataFormatter.grid.valueAxis.position==="bottom",c=KS({axisLabels:s.scaleRangeGroupLabels,axisWidth:s.axisSize.width,reverse:u}),l=f=>s.dataFormatter.grid.groupAxis.position==="bottom"||s.dataFormatter.grid.groupAxis.position==="top"?f.offsetX-s.fullChartParams.padding.left:f.offsetY-s.fullChartParams.padding.top,h=f=>{const d=l(f),p=c(d);return{groupIndex:p,groupLabel:s.scaleRangeGroupLabels[p]??""}};return a.next(h),function(){i.next(void 0)}})})};function yC(t="curveLinear"){return hu().x(e=>e.axisX).y(e=>e.axisY).curve(t2[t])}function bC(t){let e=[[]],n=0;for(let r in t){if(t[r].visible==!1||t[r].value===void 0||t[r].value===null){e[n].length&&(n++,e[n]=[]);continue}e[n].push(t[r])}return e}function vC({selection:t,pathClassName:e,segmentData:n,linePath:r,params:i}){return t.selectAll("path").data(n,(a,s)=>a.length?`${a[0].id}_${a[a.length-1].id}`:s).join(a=>a.append("path").classed(e,!0).attr("fill","none").attr("pointer-events","visibleStroke").style("vector-effect","non-scaling-stroke").style("cursor","pointer"),a=>a,a=>a.remove()).attr("stroke-width",i.lineWidth).attr("stroke",(a,s)=>a[0]&&a[0].color).attr("d",a=>r(a))}function xC({selection:t,seriesLabel:e,fullChartParams:n}){if(t.interrupt("highlight"),!e){t.transition("highlight").duration(200).style("opacity",1);return}t.each((r,i,o)=>{r===e?Z(o[i]).style("opacity",1):Z(o[i]).style("opacity",n.styles.unhighlightedOpacity)})}function _C({defsSelection:t,clipPathData:e,transitionDuration:n,transitionEase:r}){t.selectAll("clipPath").data(e).join(i=>i.append("clipPath"),i=>i,i=>i.remove()).attr("id",i=>i.id).each((i,o,a)=>{Z(a[o]).selectAll("rect").data([i]).join(s=>{const u=s.append("rect");return u.transition().duration(n).ease(ri(r)).tween("tween",(c,l,h)=>f=>{const d=c.width*f;u.attr("x",0).attr("y",0).attr("width",p=>d).attr("height",p=>p.height)}),u},s=>s.attr("x",0).attr("y",0).attr("width",u=>u.width).attr("height",u=>u.height),s=>s.remove())})}const i2=(t,{selection:e,computedData$:n,existedSeriesLabels$:r,SeriesDataMap$:i,GroupDataMap$:o,fullParams$:a,fullDataFormatter$:s,fullChartParams$:u,gridAxesTransform$:c,gridGraphicTransform$:l,gridAxesSize$:h,gridHighlight$:f,gridContainer$:d,event$:p})=>{const g=new it,m=ii(t,"clipPath-box"),y=st(t,"path"),{seriesSelection$:_,axesSelection$:x,defsSelection$:b,graphicGSelection$:$}=Eo({selection:e,pluginName:t,clipPathID:m,existedSeriesLabels$:r,gridContainer$:d,gridAxesTransform$:c,gridGraphicTransform$:l}),v=new lt(M=>{const A=a.pipe(G(g)).subscribe(L=>{if(!L)return;const P=yC(L.lineCurve);M.next(P)});return()=>{A.unsubscribe()}}),w=new lt(M=>{n.pipe(G(g),U(async A=>A)).subscribe(A=>{const L=A[0]&&A[0][0]?A.map(P=>P[0].seriesLabel):[];M.next(L)})}),S=u.pipe(B(M=>M.transitionDuration),ht()),D=u.pipe(B(M=>M.transitionEase),ht());H({defsSelection:b,seriesLabels:w,axisSize:h,transitionDuration:S,transitionEase:D}).pipe(G(g),U(async M=>M)).subscribe(M=>{const L=[{id:m,width:M.axisSize.width,height:M.axisSize.height}].concat(M.seriesLabels.map(P=>({id:`orbcharts__clipPath_${P}`,width:M.axisSize.width,height:M.axisSize.height})));_C({defsSelection:M.defsSelection,clipPathData:L,transitionDuration:M.transitionDuration,transitionEase:M.transitionEase})});const E=n.pipe(B(M=>{const A=new Map;return M.flat().forEach(L=>A.set(L.id,L)),A})),T=r2({fullDataFormatter$:s,gridAxesSize$:h,computedData$:n,fullChartParams$:u}),F=u.pipe(G(g),B(M=>M.highlightTarget),ht());return H({graphicGSelection:$,seriesLabels:w,computedData:n,SeriesDataMap:i,GroupDataMap:o,linePath:v,params:a,highlightTarget:F,gridGroupPositionFn:T}).pipe(G(g),U(async M=>M)).subscribe(M=>{M.graphicGSelection.each((A,L,P)=>{const I=bC(M.computedData[L]??[]);vC({selection:Z(P[L]),pathClassName:y,linePath:M.linePath,segmentData:I,params:M.params}).on("mouseover",(k,R)=>{k.stopPropagation();const N=R[0]?R[0].seriesLabel:"",{groupIndex:C,groupLabel:O}=M.gridGroupPositionFn(k),V=M.GroupDataMap.get(O).find(J=>J.seriesLabel===N)??R[0];p.next({type:"grid",eventName:"mouseover",pluginName:t,highlightTarget:M.highlightTarget,datum:V,series:M.SeriesDataMap.get(V.seriesLabel),seriesIndex:V.seriesIndex,seriesLabel:V.seriesLabel,groups:M.GroupDataMap.get(V.groupLabel),groupIndex:V.groupIndex,groupLabel:V.groupLabel,event:k,data:M.computedData})}).on("mousemove",(k,R)=>{k.stopPropagation();const N=R[0]?R[0].seriesLabel:"",{groupIndex:C,groupLabel:O}=M.gridGroupPositionFn(k),V=M.GroupDataMap.get(O).find(J=>J.seriesLabel===N)??R[0];p.next({type:"grid",eventName:"mousemove",pluginName:t,highlightTarget:M.highlightTarget,datum:V,series:M.SeriesDataMap.get(V.seriesLabel),seriesIndex:V.seriesIndex,seriesLabel:V.seriesLabel,groups:M.GroupDataMap.get(V.groupLabel),groupIndex:V.groupIndex,groupLabel:V.groupLabel,event:k,data:M.computedData})}).on("mouseout",(k,R)=>{k.stopPropagation();const N=R[0]?R[0].seriesLabel:"",{groupIndex:C,groupLabel:O}=M.gridGroupPositionFn(k),V=M.GroupDataMap.get(O).find(J=>J.seriesLabel===N)??R[0];p.next({type:"grid",eventName:"mouseout",pluginName:t,highlightTarget:M.highlightTarget,datum:V,series:M.SeriesDataMap.get(V.seriesLabel),seriesIndex:V.seriesIndex,seriesLabel:V.seriesLabel,groups:M.GroupDataMap.get(V.groupLabel),groupIndex:V.groupIndex,groupLabel:V.groupLabel,event:k,data:M.computedData})}).on("click",(k,R)=>{k.stopPropagation();const N=R[0]?R[0].seriesLabel:"",{groupIndex:C,groupLabel:O}=M.gridGroupPositionFn(k),V=M.GroupDataMap.get(O).find(J=>J.seriesLabel===N)??R[0];p.next({type:"grid",eventName:"click",pluginName:t,highlightTarget:M.highlightTarget,datum:V,series:M.SeriesDataMap.get(V.seriesLabel),seriesIndex:V.seriesIndex,seriesLabel:V.seriesLabel,groups:M.GroupDataMap.get(V.groupLabel),groupIndex:V.groupIndex,groupLabel:V.groupLabel,event:k,data:M.computedData})})})}),u.pipe(G(g),No(M=>M.highlightTarget==="series"),U(M=>H({graphicGSelection:$,highlight:f,DataMap:E,fullChartParams:u}).pipe(G(g),U(async A=>A)))).subscribe(M=>{const A=M.DataMap.get(M.highlight[0]);xC({selection:M.graphicGSelection,seriesLabel:A&&A.seriesLabel?A.seriesLabel:null,fullChartParams:M.fullChartParams})}),()=>{g.next(void 0)}},o2="Lines",wC=$e(o2,or)(({selection:t,name:e,observer:n,subject:r})=>{const i=new it,o=i2(o2,{selection:t,computedData$:n.computedData$,existedSeriesLabels$:n.existedSeriesLabels$,SeriesDataMap$:n.SeriesDataMap$,GroupDataMap$:n.GroupDataMap$,fullParams$:n.fullParams$,fullDataFormatter$:n.fullDataFormatter$,fullChartParams$:n.fullChartParams$,gridAxesTransform$:n.gridAxesTransform$,gridGraphicTransform$:n.gridGraphicTransform$,gridAxesSize$:n.gridAxesSize$,gridHighlight$:n.gridHighlight$,gridContainer$:n.gridContainer$,event$:r.event$});return()=>{i.next(void 0),o()}}),a2=.3;function s2({axisWidth:t,groupAmount:e,barAmountOfGroup:n,barPadding:r=0,barGroupPadding:i=0}){const a=(t/(e-1)-i)/n-r;return a>1?a:1}function $C(t,e,n){const r=t/2,i=t*e.length+n.barPadding*e.length;return zf().domain(e).range([-i/2+r,i/2-r])}function SC(t,e){return t<=1?0:e/(t-1)*a2}function AC(t,e){return t<=1?e:e*(1-a2)}function MC({graphicGSelection:t,rectClassName:e,computedData:n,zeroYArr:r,groupLabels:i,barScale:o,params:a,chartParams:s,barWidth:u,transformedBarRadius:c,delayGroup:l,transitionItem:h,isSeriesPositionSeprate:f}){const d=u/2;return t.each((g,m,y)=>{Z(y[m]).selectAll(`rect.${e}`).data(n[m]??[],_=>_.id).join(_=>_.append("rect").classed(e,!0).attr("cursor","pointer").attr("height",x=>0),_=>_,_=>_.remove()).attr("transform",(_,x)=>`translate(${(_?_.axisX:0)-d}, 0)`).attr("fill",_=>_.color).attr("y",_=>_.axisY<r[m]?_.axisY:r[m]).attr("x",_=>f?0:o(_.seriesLabel)).attr("width",u).attr("rx",c[m][0]??1).attr("ry",c[m][1]??1).transition().duration(h).ease(ri(s.transitionEase)).delay((_,x)=>_.groupIndex*l).attr("height",_=>Math.abs(_.axisYFromZero))}),t.selectAll(`rect.${e}`)}function TC({defsSelection:t,clipPathData:e}){t.selectAll("clipPath").data(e).join(n=>n.append("clipPath"),n=>n,n=>n.remove()).attr("id",n=>n.id).each((n,r,i)=>{Z(i[r]).selectAll("rect").data([n]).join(o=>o.append("rect"),o=>o,o=>o.remove()).attr("x",0).attr("y",0).attr("width",o=>o.width).attr("height",o=>o.height)})}function PC({selection:t,ids:e,fullChartParams:n}){if(t.interrupt("highlight"),!e.length){t.transition("highlight").duration(200).style("opacity",1);return}t.each((r,i,o)=>{e.includes(r.id)?Z(o[i]).style("opacity",1):Z(o[i]).style("opacity",n.styles.unhighlightedOpacity)})}const u2=(t,{selection:e,computedData$:n,visibleComputedData$:r,existedSeriesLabels$:i,SeriesDataMap$:o,GroupDataMap$:a,fullParams$:s,fullChartParams$:u,gridAxesTransform$:c,gridGraphicTransform$:l,gridGraphicReverseScale$:h,gridAxesSize$:f,gridHighlight$:d,gridContainer$:p,isSeriesPositionSeprate$:g,event$:m})=>{const y=new it,_=ii(t,"clipPath-box"),x=st(t,"rect"),{seriesSelection$:b,axesSelection$:$,defsSelection$:v,graphicGSelection$:w}=Eo({selection:e,pluginName:t,clipPathID:_,existedSeriesLabels$:i,gridContainer$:p,gridAxesTransform$:c,gridGraphicTransform$:l}),S=r.pipe(G(y),B(k=>k.map(R=>R[0]?R[0].axisY-R[0].axisYFromZero:0)),ht()),D=H({computedData:n,visibleComputedData:r,params:s,gridAxesSize:f,isSeriesPositionSeprate:g}).pipe(G(y),U(async k=>k),B(k=>k.params.barWidth?k.params.barWidth:k.isSeriesPositionSeprate?s2({axisWidth:k.gridAxesSize.width,groupAmount:k.computedData[0]?k.computedData[0].length:0,barAmountOfGroup:1,barPadding:k.params.barPadding,barGroupPadding:k.params.barGroupPadding}):s2({axisWidth:k.gridAxesSize.width,groupAmount:k.computedData[0]?k.computedData[0].length:0,barAmountOfGroup:k.visibleComputedData.length,barPadding:k.params.barPadding,barGroupPadding:k.params.barGroupPadding})),ht()),E=H({computedData:n,barWidth:D,params:s,gridGraphicReverseScale:h}).pipe(G(y),U(async k=>k),B(k=>{const R=k.barWidth/2,N=k.params.barRadius===!0?R:k.params.barRadius===!1?0:typeof k.params.barRadius=="number"?k.params.barRadius:0;return k.computedData.map((C,O)=>{const X=k.gridGraphicReverseScale[O]??k.gridGraphicReverseScale[0];let W=N*X[0],V=N*X[1];if(W>R){const J=R/W;W=W*J,V=V*J}return[W,V]})})),T=r.pipe(G(y),B(k=>{const R=new Set;return k.forEach(N=>{N.forEach(C=>{R.add(C.seriesLabel)})}),Array.from(R)})),F=r.pipe(G(y),B(k=>{const R=new Set;return k.forEach(N=>{N.forEach(C=>{R.add(C.groupLabel)})}),Array.from(R)})),M=H({seriesLabels:T,barWidth:D,params:s}).pipe(G(y),U(async k=>k),B(k=>$C(k.barWidth,k.seriesLabels,k.params))),A=u.pipe(G(y),B(k=>k.transitionDuration),ht()),L=new lt(k=>{H({groupLabels:F,transitionDuration:A}).pipe(U(async R=>R)).subscribe(R=>{const N=SC(R.groupLabels.length,R.transitionDuration);k.next(N)})}).pipe(G(y),ht()),P=new lt(k=>{H({groupLabels:F,transitionDuration:A}).pipe(U(async R=>R)).subscribe(R=>{const N=AC(R.groupLabels.length,R.transitionDuration);k.next(N)})}).pipe(G(y),ht());H({defsSelection:v,gridAxesSize:f}).pipe(G(y),U(async k=>k)).subscribe(k=>{const R=[{id:_,width:k.gridAxesSize.width,height:k.gridAxesSize.height}];TC({defsSelection:k.defsSelection,clipPathData:R})});const I=u.pipe(G(y),B(k=>k.highlightTarget),ht()),z=new it;return H({graphicGSelection:w,computedData:n,zeroYArr:S,groupLabels:F,barScale:M,params:s,chartParams:u,highlightTarget:I,barWidth:D,transformedBarRadius:E,delayGroup:L,transitionItem:P,SeriesDataMap:o,GroupDataMap:a,isSeriesPositionSeprate:g}).pipe(G(y),U(async k=>k)).subscribe(k=>{const R=MC({graphicGSelection:k.graphicGSelection,rectClassName:x,computedData:k.computedData,zeroYArr:k.zeroYArr,groupLabels:k.groupLabels,barScale:k.barScale,params:k.params,chartParams:k.chartParams,barWidth:k.barWidth,transformedBarRadius:k.transformedBarRadius,delayGroup:k.delayGroup,transitionItem:k.transitionItem,isSeriesPositionSeprate:k.isSeriesPositionSeprate});R.on("mouseover",(N,C)=>{N.stopPropagation(),m.next({type:"grid",eventName:"mouseover",pluginName:t,highlightTarget:k.highlightTarget,datum:C,series:k.SeriesDataMap.get(C.seriesLabel),seriesIndex:C.seriesIndex,seriesLabel:C.seriesLabel,groups:k.GroupDataMap.get(C.groupLabel),groupIndex:C.groupIndex,groupLabel:C.groupLabel,event:N,data:k.computedData})}).on("mousemove",(N,C)=>{N.stopPropagation(),m.next({type:"grid",eventName:"mousemove",pluginName:t,highlightTarget:k.highlightTarget,datum:C,series:k.SeriesDataMap.get(C.seriesLabel),seriesIndex:C.seriesIndex,seriesLabel:C.seriesLabel,groups:k.GroupDataMap.get(C.groupLabel),groupIndex:C.groupIndex,groupLabel:C.groupLabel,event:N,data:k.computedData})}).on("mouseout",(N,C)=>{N.stopPropagation(),m.next({type:"grid",eventName:"mouseout",pluginName:t,highlightTarget:k.highlightTarget,datum:C,series:k.SeriesDataMap.get(C.seriesLabel),seriesIndex:C.seriesIndex,seriesLabel:C.seriesLabel,groups:k.GroupDataMap.get(C.groupLabel),groupIndex:C.groupIndex,groupLabel:C.groupLabel,event:N,data:k.computedData})}).on("click",(N,C)=>{N.stopPropagation(),m.next({type:"grid",eventName:"click",pluginName:t,highlightTarget:k.highlightTarget,datum:C,series:k.SeriesDataMap.get(C.seriesLabel),seriesIndex:C.seriesIndex,seriesLabel:C.seriesLabel,groups:k.GroupDataMap.get(C.groupLabel),groupIndex:C.groupIndex,groupLabel:C.groupLabel,event:N,data:k.computedData})}),z.next(R)}),H({barSelection:z,highlight:d,fullChartParams:u}).pipe(G(y),U(async k=>k)).subscribe(k=>{PC({selection:k.barSelection,ids:k.highlight,fullChartParams:k.fullChartParams})}),()=>{y.next(void 0)}},c2="Bars",DC=$e(c2,Nh)(({selection:t,name:e,subject:n,observer:r})=>{const i=new it,o=u2(c2,{selection:t,computedData$:r.computedData$,visibleComputedData$:r.visibleComputedData$,existedSeriesLabels$:r.existedSeriesLabels$,SeriesDataMap$:r.SeriesDataMap$,GroupDataMap$:r.GroupDataMap$,fullParams$:r.fullParams$,fullChartParams$:r.fullChartParams$,gridAxesTransform$:r.gridAxesTransform$,gridGraphicTransform$:r.gridGraphicTransform$,gridGraphicReverseScale$:r.gridGraphicReverseScale$,gridAxesSize$:r.gridAxesSize$,gridHighlight$:r.gridHighlight$,gridContainer$:r.gridContainer$,isSeriesPositionSeprate$:r.isSeriesPositionSeprate$,event$:n.event$});return()=>{i.next(void 0),o()}}),l2=.3;function EC({axisWidth:t,groupAmount:e,barGroupPadding:n=0}){const i=t/(e-1)-n;return i>1?i:1}function kC(t,e){return t<=1?0:e/(t-1)*l2}function LC(t,e){return t<=1?e:e*(1-l2)}function CC({graphicGSelection:t,rectClassName:e,barData:n,zeroY:r,groupLabels:i,params:o,chartParams:a,barWidth:s,transformedBarRadius:u,delayGroup:c,transitionItem:l,isSeriesPositionSeprate:h}){const f=s/2;return t.each((p,g,m)=>{Z(m[g]).selectAll(`rect.${e}`).data(n[g]??[],y=>y.id).join(y=>y.append("rect").classed(e,!0).attr("cursor","pointer").attr("height",_=>0),y=>y,y=>y.remove()).attr("transform",(y,_)=>`translate(${(y?y.axisX:0)-f}, 0)`).attr("fill",y=>y.color).attr("y",y=>r).attr("x",y=>0).attr("width",s).attr("rx",u[g][0]??1).attr("ry",u[g][1]??1).transition().duration(l).ease(ri(a.transitionEase)).delay((y,_)=>y.groupIndex*c).attr("y",y=>y._barStartY).attr("height",y=>Math.abs(y._barHeight))}),t.selectAll(`rect.${e}`)}function RC({defsSelection:t,clipPathData:e}){t.selectAll("clipPath").data(e).join(n=>n.append("clipPath"),n=>n,n=>n.remove()).attr("id",n=>n.id).each((n,r,i)=>{Z(i[r]).selectAll("rect").data([n]).join(o=>o.append("rect"),o=>o,o=>o.remove()).attr("x",0).attr("y",0).attr("width",o=>o.width).attr("height",o=>o.height)})}function IC({selection:t,ids:e,fullChartParams:n}){if(t.interrupt("highlight"),!e.length){t.transition("highlight").duration(200).style("opacity",1);return}t.each((r,i,o)=>{e.includes(r.id)?Z(o[i]).style("opacity",1):Z(o[i]).style("opacity",n.styles.unhighlightedOpacity)})}const f2=(t,{selection:e,computedData$:n,visibleComputedData$:r,existedSeriesLabels$:i,SeriesDataMap$:o,GroupDataMap$:a,fullParams$:s,fullDataFormatter$:u,fullChartParams$:c,gridAxesTransform$:l,gridGraphicTransform$:h,gridGraphicReverseScale$:f,gridAxesSize$:d,gridHighlight$:p,gridContainer$:g,isSeriesPositionSeprate$:m,event$:y})=>{const _=new it,x=ii(t,"clipPath-box"),b=st(t,"rect"),{seriesSelection$:$,axesSelection$:v,defsSelection$:w,graphicGSelection$:S}=Eo({selection:e,pluginName:t,clipPathID:x,existedSeriesLabels$:i,gridContainer$:g,gridAxesTransform$:l,gridGraphicTransform$:h}),D=r.pipe(G(_),B(C=>C[0]&&C[0][0]?C[0][0].axisY-C[0][0].axisYFromZero:0),ht()),E=H({computedData:n,params:s,axisSize:d,isSeriesPositionSeprate:m}).pipe(G(_),U(async C=>C),B(C=>C.params.barWidth?C.params.barWidth:EC({axisWidth:C.axisSize.width,groupAmount:C.computedData[0]?C.computedData[0].length:0,barGroupPadding:C.params.barGroupPadding})),ht()),T=H({computedData:n,barWidth:E,params:s,gridGraphicReverseScale:f}).pipe(G(_),U(async C=>C),B(C=>{const O=C.barWidth/2,X=C.params.barRadius===!0?O:C.params.barRadius===!1?0:typeof C.params.barRadius=="number"?C.params.barRadius:0;return C.computedData.map((W,V)=>{const J=C.gridGraphicReverseScale[V]??C.gridGraphicReverseScale[0],pt=X*J[0],q=X*J[1];return[pt,q]})})),F=r.pipe(G(_),B(C=>{const O=new Set;return C.forEach(X=>{X.forEach(W=>{O.add(W.groupLabel)})}),Array.from(O)})),M=c.pipe(G(_),B(C=>C.transitionDuration),ht()),A=new lt(C=>{H({groupLabels:F,transitionDuration:M}).pipe(U(async O=>O)).subscribe(O=>{const X=kC(O.groupLabels.length,O.transitionDuration);C.next(X)})}).pipe(G(_),ht()),L=new lt(C=>{H({groupLabels:F,transitionDuration:M}).pipe(U(async O=>O)).subscribe(O=>{const X=LC(O.groupLabels.length,O.transitionDuration);C.next(X)})}).pipe(G(_),ht()),P=H({computedData:n,dataFormatter:u}).pipe(G(_),U(async C=>C),B(C=>{const X=C.computedData[0]?C.computedData[0].length-1:0,W=C.dataFormatter.grid.groupAxis.scaleDomain[0]==="auto"?0-C.dataFormatter.grid.groupAxis.scalePadding:C.dataFormatter.grid.groupAxis.scaleDomain[0]-C.dataFormatter.grid.groupAxis.scalePadding,V=C.dataFormatter.grid.groupAxis.scaleDomain[1]==="auto"?X+C.dataFormatter.grid.groupAxis.scalePadding:C.dataFormatter.grid.groupAxis.scaleDomain[1]+C.dataFormatter.grid.groupAxis.scalePadding,J=C.computedData.map(pt=>pt.filter((q,rt)=>q.groupIndex>=W&&q.groupIndex<=V));if(J.length<=1)return 1;{const pt=J.flat().map(Y=>Y.axisYFromZero),q=Math.max(...pt),rt=C.computedData[0]?C.computedData[0].map((Y,xt)=>C.computedData.reduce((gt,Nt)=>gt+Nt[xt].axisYFromZero,0)):[],ut=Math.max(...rt);return q/ut}})),I=H({computedData:n,yRatio:P,zeroY:D}).pipe(G(_),B(C=>{let O=C.computedData[0]?C.computedData[0].map(()=>C.zeroY):[];return C.computedData.map((X,W)=>X.map((V,J)=>{const pt=O[J],q=V.axisYFromZero*C.yRatio;return O[J]=O[J]+q,{...V,_barStartY:pt,_barHeight:q}}))})),z=H({computedData:n,zeroY:D}).pipe(G(_),B(C=>C.computedData.map((O,X)=>O.map((W,V)=>({...W,_barStartY:C.zeroY,_barHeight:W.axisYFromZero}))))),k=m.pipe(U(C=>m0(()=>C,z,I)));H({defsSelection:w,gridAxesSize:d}).pipe(G(_),U(async C=>C)).subscribe(C=>{const O=[{id:x,width:C.gridAxesSize.width,height:C.gridAxesSize.height}];RC({defsSelection:C.defsSelection,clipPathData:O})});const R=c.pipe(G(_),B(C=>C.highlightTarget),ht()),N=new it;return H({graphicGSelection:S,graphicData:k,zeroY:D,groupLabels:F,params:s,chartParams:c,highlightTarget:R,barWidth:E,transformedBarRadius:T,delayGroup:A,transitionItem:L,SeriesDataMap:o,GroupDataMap:a,isSeriesPositionSeprate:m}).pipe(G(_),U(async C=>C)).subscribe(C=>{const O=CC({graphicGSelection:C.graphicGSelection,rectClassName:b,barData:C.graphicData,zeroY:C.zeroY,groupLabels:C.groupLabels,params:C.params,chartParams:C.chartParams,barWidth:C.barWidth,transformedBarRadius:C.transformedBarRadius,delayGroup:C.delayGroup,transitionItem:C.transitionItem,isSeriesPositionSeprate:C.isSeriesPositionSeprate});O.on("mouseover",(X,W)=>{X.stopPropagation(),y.next({type:"grid",eventName:"mouseover",pluginName:t,highlightTarget:C.highlightTarget,datum:W,series:C.SeriesDataMap.get(W.seriesLabel),seriesIndex:W.seriesIndex,seriesLabel:W.seriesLabel,groups:C.GroupDataMap.get(W.groupLabel),groupIndex:W.groupIndex,groupLabel:W.groupLabel,event:X,data:C.graphicData})}).on("mousemove",(X,W)=>{X.stopPropagation(),y.next({type:"grid",eventName:"mousemove",pluginName:t,highlightTarget:C.highlightTarget,datum:W,series:C.SeriesDataMap.get(W.seriesLabel),seriesIndex:W.seriesIndex,seriesLabel:W.seriesLabel,groups:C.GroupDataMap.get(W.groupLabel),groupIndex:W.groupIndex,groupLabel:W.groupLabel,event:X,data:C.graphicData})}).on("mouseout",(X,W)=>{X.stopPropagation(),y.next({type:"grid",eventName:"mouseout",pluginName:t,highlightTarget:C.highlightTarget,datum:W,series:C.SeriesDataMap.get(W.seriesLabel),seriesIndex:W.seriesIndex,seriesLabel:W.seriesLabel,groups:C.GroupDataMap.get(W.groupLabel),groupIndex:W.groupIndex,groupLabel:W.groupLabel,event:X,data:C.graphicData})}).on("click",(X,W)=>{X.stopPropagation(),y.next({type:"grid",eventName:"click",pluginName:t,highlightTarget:C.highlightTarget,datum:W,series:C.SeriesDataMap.get(W.seriesLabel),seriesIndex:W.seriesIndex,seriesLabel:W.seriesLabel,groups:C.GroupDataMap.get(W.groupLabel),groupIndex:W.groupIndex,groupLabel:W.groupLabel,event:X,data:C.graphicData})}),N.next(O)}),H({barSelection:N,highlight:p,fullChartParams:c}).pipe(G(_),U(async C=>C)).subscribe(C=>{IC({selection:C.barSelection,ids:C.highlight,fullChartParams:C.fullChartParams})}),()=>{_.next(void 0)}},h2="BarStack",NC=$e(h2,Fh)(({selection:t,name:e,subject:n,observer:r})=>{const i=new it,o=f2(h2,{selection:t,computedData$:r.computedData$,visibleComputedData$:r.visibleComputedData$,existedSeriesLabels$:r.existedSeriesLabels$,SeriesDataMap$:r.SeriesDataMap$,GroupDataMap$:r.GroupDataMap$,fullParams$:r.fullParams$,fullDataFormatter$:r.fullDataFormatter$,fullChartParams$:r.fullChartParams$,gridAxesTransform$:r.gridAxesTransform$,gridGraphicTransform$:r.gridGraphicTransform$,gridGraphicReverseScale$:r.gridGraphicReverseScale$,gridAxesSize$:r.gridAxesSize$,gridHighlight$:r.gridHighlight$,gridContainer$:r.gridContainer$,isSeriesPositionSeprate$:r.isSeriesPositionSeprate$,event$:n.event$});return()=>{i.next(void 0),o()}}),d2=.3;function p2({axisWidth:t,groupAmount:e,barAmountOfGroup:n,barPadding:r=0,barGroupPadding:i=0}){const a=(t/(e-1)-i)/n-r;return a>1?a:1}function FC(t,e,n){const r=t/2,i=t*e.length+n.barPadding*e.length;return zf().domain(e).range([-i/2+r,i/2-r])}function GC(t,e){return t<=1?0:e/(t-1)*d2}function zC(t,e){return t<=1?e:e*(1-d2)}function OC({graphicGSelection:t,pathGClassName:e,pathClassName:n,barData:r,zeroYArr:i,groupLabels:o,barScale:a,params:s,chartParams:u,barWidth:c,delayGroup:l,transitionItem:h,isSeriesPositionSeprate:f}){const d=c/2;return t.each((g,m,y)=>{Z(y[m]).selectAll(`g.${e}`).data(r[m]??[]).join(x=>{const b=x.append("g").classed(e,!0).attr("cursor","pointer");return b.append("path").classed(n,!0).style("vector-effect","non-scaling-stroke").attr("d",$=>{const v=-d,w=i[m],S=i[m];return`M${v},${w} L${v+c/2},${S} ${v+c},${w}`}),b},x=>x,x=>x.remove()).attr("transform",x=>`translate(${f?0:a(x.seriesLabel)}, 0)`).select(`path.${n}`).attr("height",x=>Math.abs(x.axisYFromZero)).attr("y",x=>x.axisY<i[m]?x.axisY:i[m]).attr("x",x=>f?0:a(x.seriesLabel)).style("fill",x=>`url(#${x.linearGradientId})`).attr("stroke",x=>x.color).attr("transform",x=>`translate(${x?x.axisX:0}, 0)`).transition().duration(h).ease(ri(u.transitionEase)).delay((x,b)=>x.groupIndex*l).attr("d",x=>{const b=-d,$=i[m],v=x.axisY;return`M${b},${$} L${b+c/2},${v} ${b+c},${$}`})}),t.selectAll(`path.${n}`)}function UC({defsSelection:t,barData:e,params:n}){t.selectAll("linearGradient").data(e??[]).join(r=>r.append("linearGradient").attr("x1","0%").attr("x2","0%").attr("y1","100%").attr("y2","0%").attr("spreadMethod","pad"),r=>r,r=>r.remove()).attr("id",(r,i)=>r[0]?r[0].linearGradientId:"").html((r,i)=>{const o=r[0]?r[0].color:"";return`
|
9
|
+
`)}function c(h){return h.map(l).join(t)}function l(h){return h==null?"":h instanceof Date?M7(h):e.test(h+="")?'"'+h.replace(/"/g,'""')+'"':h}return{parse:r,parseRows:i,format:a,formatBody:s,formatRows:u,formatRow:c,formatValue:l}}var Vn=ns(","),v1=Vn.parse,T7=Vn.parseRows,P7=Vn.format,D7=Vn.formatBody,E7=Vn.formatRows,k7=Vn.formatRow,L7=Vn.formatValue,jn=ns(" "),x1=jn.parse,C7=jn.parseRows,R7=jn.format,I7=jn.formatBody,N7=jn.formatRows,F7=jn.formatRow,G7=jn.formatValue;function z7(t){for(var e in t){var n=t[e].trim(),r,i;if(!n)n=null;else if(n==="true")n=!0;else if(n==="false")n=!1;else if(n==="NaN")n=NaN;else if(!isNaN(r=+n))n=r;else if(i=n.match(/^([-+]\d{2})?\d{4}(-\d{2}(-\d{2})?)?(T\d{2}:\d{2}(:\d{2}(\.\d{3})?)?(Z|[-+]\d{2}:\d{2})?)?$/))O7&&i[4]&&!i[7]&&(n=n.replace(/-/g,"/").replace(/T/," ")),n=new Date(n);else continue;t[e]=n}return t}const O7=new Date("2019-01-01T00:00").getHours()||new Date("2019-07-01T00:00").getHours();function U7(t){if(!t.ok)throw new Error(t.status+" "+t.statusText);return t.blob()}function B7(t,e){return fetch(t,e).then(U7)}function Y7(t){if(!t.ok)throw new Error(t.status+" "+t.statusText);return t.arrayBuffer()}function W7(t,e){return fetch(t,e).then(Y7)}function H7(t){if(!t.ok)throw new Error(t.status+" "+t.statusText);return t.text()}function rs(t,e){return fetch(t,e).then(H7)}function _1(t){return function(e,n,r){return arguments.length===2&&typeof n=="function"&&(r=n,n=void 0),rs(e,n).then(function(i){return t(i,r)})}}function q7(t,e,n,r){arguments.length===3&&typeof n=="function"&&(r=n,n=void 0);var i=ns(t);return rs(e,n).then(function(o){return i.parse(o,r)})}var X7=_1(v1),V7=_1(x1);function j7(t,e){return new Promise(function(n,r){var i=new Image;for(var o in e)i[o]=e[o];i.onerror=r,i.onload=function(){n(i)},i.src=t})}function Z7(t){if(!t.ok)throw new Error(t.status+" "+t.statusText);if(!(t.status===204||t.status===205))return t.json()}function K7(t,e){return fetch(t,e).then(Z7)}function El(t){return(e,n)=>rs(e,n).then(r=>new DOMParser().parseFromString(r,t))}const Q7=El("application/xml");var J7=El("text/html"),t9=El("image/svg+xml");function e9(t,e){var n,r=1;t==null&&(t=0),e==null&&(e=0);function i(){var o,a=n.length,s,u=0,c=0;for(o=0;o<a;++o)s=n[o],u+=s.x,c+=s.y;for(u=(u/a-t)*r,c=(c/a-e)*r,o=0;o<a;++o)s=n[o],s.x-=u,s.y-=c}return i.initialize=function(o){n=o},i.x=function(o){return arguments.length?(t=+o,i):t},i.y=function(o){return arguments.length?(e=+o,i):e},i.strength=function(o){return arguments.length?(r=+o,i):r},i}function n9(t){const e=+this._x.call(null,t),n=+this._y.call(null,t);return w1(this.cover(e,n),e,n,t)}function w1(t,e,n,r){if(isNaN(e)||isNaN(n))return t;var i,o=t._root,a={data:r},s=t._x0,u=t._y0,c=t._x1,l=t._y1,h,f,d,p,g,m,y,x;if(!o)return t._root=a,t;for(;o.length;)if((g=e>=(h=(s+c)/2))?s=h:c=h,(m=n>=(f=(u+l)/2))?u=f:l=f,i=o,!(o=o[y=m<<1|g]))return i[y]=a,t;if(d=+t._x.call(null,o.data),p=+t._y.call(null,o.data),e===d&&n===p)return a.next=o,i?i[y]=a:t._root=a,t;do i=i?i[y]=new Array(4):t._root=new Array(4),(g=e>=(h=(s+c)/2))?s=h:c=h,(m=n>=(f=(u+l)/2))?u=f:l=f;while((y=m<<1|g)===(x=(p>=f)<<1|d>=h));return i[x]=o,i[y]=a,t}function r9(t){var e,n,r=t.length,i,o,a=new Array(r),s=new Array(r),u=1/0,c=1/0,l=-1/0,h=-1/0;for(n=0;n<r;++n)isNaN(i=+this._x.call(null,e=t[n]))||isNaN(o=+this._y.call(null,e))||(a[n]=i,s[n]=o,i<u&&(u=i),i>l&&(l=i),o<c&&(c=o),o>h&&(h=o));if(u>l||c>h)return this;for(this.cover(u,c).cover(l,h),n=0;n<r;++n)w1(this,a[n],s[n],t[n]);return this}function i9(t,e){if(isNaN(t=+t)||isNaN(e=+e))return this;var n=this._x0,r=this._y0,i=this._x1,o=this._y1;if(isNaN(n))i=(n=Math.floor(t))+1,o=(r=Math.floor(e))+1;else{for(var a=i-n||1,s=this._root,u,c;n>t||t>=i||r>e||e>=o;)switch(c=(e<r)<<1|t<n,u=new Array(4),u[c]=s,s=u,a*=2,c){case 0:i=n+a,o=r+a;break;case 1:n=i-a,o=r+a;break;case 2:i=n+a,r=o-a;break;case 3:n=i-a,r=o-a;break}this._root&&this._root.length&&(this._root=s)}return this._x0=n,this._y0=r,this._x1=i,this._y1=o,this}function o9(){var t=[];return this.visit(function(e){if(!e.length)do t.push(e.data);while(e=e.next)}),t}function a9(t){return arguments.length?this.cover(+t[0][0],+t[0][1]).cover(+t[1][0],+t[1][1]):isNaN(this._x0)?void 0:[[this._x0,this._y0],[this._x1,this._y1]]}function Ht(t,e,n,r,i){this.node=t,this.x0=e,this.y0=n,this.x1=r,this.y1=i}function s9(t,e,n){var r,i=this._x0,o=this._y0,a,s,u,c,l=this._x1,h=this._y1,f=[],d=this._root,p,g;for(d&&f.push(new Ht(d,i,o,l,h)),n==null?n=1/0:(i=t-n,o=e-n,l=t+n,h=e+n,n*=n);p=f.pop();)if(!(!(d=p.node)||(a=p.x0)>l||(s=p.y0)>h||(u=p.x1)<i||(c=p.y1)<o))if(d.length){var m=(a+u)/2,y=(s+c)/2;f.push(new Ht(d[3],m,y,u,c),new Ht(d[2],a,y,m,c),new Ht(d[1],m,s,u,y),new Ht(d[0],a,s,m,y)),(g=(e>=y)<<1|t>=m)&&(p=f[f.length-1],f[f.length-1]=f[f.length-1-g],f[f.length-1-g]=p)}else{var x=t-+this._x.call(null,d.data),v=e-+this._y.call(null,d.data),b=x*x+v*v;if(b<n){var $=Math.sqrt(n=b);i=t-$,o=e-$,l=t+$,h=e+$,r=d.data}}return r}function u9(t){if(isNaN(l=+this._x.call(null,t))||isNaN(h=+this._y.call(null,t)))return this;var e,n=this._root,r,i,o,a=this._x0,s=this._y0,u=this._x1,c=this._y1,l,h,f,d,p,g,m,y;if(!n)return this;if(n.length)for(;;){if((p=l>=(f=(a+u)/2))?a=f:u=f,(g=h>=(d=(s+c)/2))?s=d:c=d,e=n,!(n=n[m=g<<1|p]))return this;if(!n.length)break;(e[m+1&3]||e[m+2&3]||e[m+3&3])&&(r=e,y=m)}for(;n.data!==t;)if(i=n,!(n=n.next))return this;return(o=n.next)&&delete n.next,i?(o?i.next=o:delete i.next,this):e?(o?e[m]=o:delete e[m],(n=e[0]||e[1]||e[2]||e[3])&&n===(e[3]||e[2]||e[1]||e[0])&&!n.length&&(r?r[y]=n:this._root=n),this):(this._root=o,this)}function c9(t){for(var e=0,n=t.length;e<n;++e)this.remove(t[e]);return this}function l9(){return this._root}function f9(){var t=0;return this.visit(function(e){if(!e.length)do++t;while(e=e.next)}),t}function h9(t){var e=[],n,r=this._root,i,o,a,s,u;for(r&&e.push(new Ht(r,this._x0,this._y0,this._x1,this._y1));n=e.pop();)if(!t(r=n.node,o=n.x0,a=n.y0,s=n.x1,u=n.y1)&&r.length){var c=(o+s)/2,l=(a+u)/2;(i=r[3])&&e.push(new Ht(i,c,l,s,u)),(i=r[2])&&e.push(new Ht(i,o,l,c,u)),(i=r[1])&&e.push(new Ht(i,c,a,s,l)),(i=r[0])&&e.push(new Ht(i,o,a,c,l))}return this}function d9(t){var e=[],n=[],r;for(this._root&&e.push(new Ht(this._root,this._x0,this._y0,this._x1,this._y1));r=e.pop();){var i=r.node;if(i.length){var o,a=r.x0,s=r.y0,u=r.x1,c=r.y1,l=(a+u)/2,h=(s+c)/2;(o=i[0])&&e.push(new Ht(o,a,s,l,h)),(o=i[1])&&e.push(new Ht(o,l,s,u,h)),(o=i[2])&&e.push(new Ht(o,a,h,l,c)),(o=i[3])&&e.push(new Ht(o,l,h,u,c))}n.push(r)}for(;r=n.pop();)t(r.node,r.x0,r.y0,r.x1,r.y1);return this}function p9(t){return t[0]}function g9(t){return arguments.length?(this._x=t,this):this._x}function m9(t){return t[1]}function y9(t){return arguments.length?(this._y=t,this):this._y}function is(t,e,n){var r=new kl(e??p9,n??m9,NaN,NaN,NaN,NaN);return t==null?r:r.addAll(t)}function kl(t,e,n,r,i,o){this._x=t,this._y=e,this._x0=n,this._y0=r,this._x1=i,this._y1=o,this._root=void 0}function $1(t){for(var e={data:t.data},n=e;t=t.next;)n=n.next={data:t.data};return e}var qt=is.prototype=kl.prototype;qt.copy=function(){var t=new kl(this._x,this._y,this._x0,this._y0,this._x1,this._y1),e=this._root,n,r;if(!e)return t;if(!e.length)return t._root=$1(e),t;for(n=[{source:e,target:t._root=new Array(4)}];e=n.pop();)for(var i=0;i<4;++i)(r=e.source[i])&&(r.length?n.push({source:r,target:e.target[i]=new Array(4)}):e.target[i]=$1(r));return t},qt.add=n9,qt.addAll=r9,qt.cover=i9,qt.data=o9,qt.extent=a9,qt.find=s9,qt.remove=u9,qt.removeAll=c9,qt.root=l9,qt.size=f9,qt.visit=h9,qt.visitAfter=d9,qt.x=g9,qt.y=y9;function Et(t){return function(){return t}}function mn(t){return(t()-.5)*1e-6}function b9(t){return t.x+t.vx}function v9(t){return t.y+t.vy}function S1(t){var e,n,r,i=1,o=1;typeof t!="function"&&(t=Et(t==null?1:+t));function a(){for(var c,l=e.length,h,f,d,p,g,m,y=0;y<o;++y)for(h=is(e,b9,v9).visitAfter(s),c=0;c<l;++c)f=e[c],g=n[f.index],m=g*g,d=f.x+f.vx,p=f.y+f.vy,h.visit(x);function x(v,b,$,w,S){var _=v.data,P=v.r,D=g+P;if(_){if(_.index>f.index){var A=d-_.x-_.vx,I=p-_.y-_.vy,M=A*A+I*I;M<D*D&&(A===0&&(A=mn(r),M+=A*A),I===0&&(I=mn(r),M+=I*I),M=(D-(M=Math.sqrt(M)))/M*i,f.vx+=(A*=M)*(D=(P*=P)/(m+P)),f.vy+=(I*=M)*D,_.vx-=A*(D=1-D),_.vy-=I*D)}return}return b>d+D||w<d-D||$>p+D||S<p-D}}function s(c){if(c.data)return c.r=n[c.data.index];for(var l=c.r=0;l<4;++l)c[l]&&c[l].r>c.r&&(c.r=c[l].r)}function u(){if(e){var c,l=e.length,h;for(n=new Array(l),c=0;c<l;++c)h=e[c],n[h.index]=+t(h,c,e)}}return a.initialize=function(c,l){e=c,r=l,u()},a.iterations=function(c){return arguments.length?(o=+c,a):o},a.strength=function(c){return arguments.length?(i=+c,a):i},a.radius=function(c){return arguments.length?(t=typeof c=="function"?c:Et(+c),u(),a):t},a}function x9(t){return t.index}function A1(t,e){var n=t.get(e);if(!n)throw new Error("node not found: "+e);return n}function _9(t){var e=x9,n=h,r,i=Et(30),o,a,s,u,c,l=1;t==null&&(t=[]);function h(m){return 1/Math.min(s[m.source.index],s[m.target.index])}function f(m){for(var y=0,x=t.length;y<l;++y)for(var v=0,b,$,w,S,_,P,D;v<x;++v)b=t[v],$=b.source,w=b.target,S=w.x+w.vx-$.x-$.vx||mn(c),_=w.y+w.vy-$.y-$.vy||mn(c),P=Math.sqrt(S*S+_*_),P=(P-o[v])/P*m*r[v],S*=P,_*=P,w.vx-=S*(D=u[v]),w.vy-=_*D,$.vx+=S*(D=1-D),$.vy+=_*D}function d(){if(a){var m,y=a.length,x=t.length,v=new Map(a.map(($,w)=>[e($,w,a),$])),b;for(m=0,s=new Array(y);m<x;++m)b=t[m],b.index=m,typeof b.source!="object"&&(b.source=A1(v,b.source)),typeof b.target!="object"&&(b.target=A1(v,b.target)),s[b.source.index]=(s[b.source.index]||0)+1,s[b.target.index]=(s[b.target.index]||0)+1;for(m=0,u=new Array(x);m<x;++m)b=t[m],u[m]=s[b.source.index]/(s[b.source.index]+s[b.target.index]);r=new Array(x),p(),o=new Array(x),g()}}function p(){if(a)for(var m=0,y=t.length;m<y;++m)r[m]=+n(t[m],m,t)}function g(){if(a)for(var m=0,y=t.length;m<y;++m)o[m]=+i(t[m],m,t)}return f.initialize=function(m,y){a=m,c=y,d()},f.links=function(m){return arguments.length?(t=m,d(),f):t},f.id=function(m){return arguments.length?(e=m,f):e},f.iterations=function(m){return arguments.length?(l=+m,f):l},f.strength=function(m){return arguments.length?(n=typeof m=="function"?m:Et(+m),p(),f):n},f.distance=function(m){return arguments.length?(i=typeof m=="function"?m:Et(+m),g(),f):i},f}const w9=1664525,$9=1013904223,M1=4294967296;function S9(){let t=1;return()=>(t=(w9*t+$9)%M1)/M1}function A9(t){return t.x}function M9(t){return t.y}var T9=10,P9=Math.PI*(3-Math.sqrt(5));function T1(t){var e,n=1,r=.001,i=1-Math.pow(r,1/300),o=0,a=.6,s=new Map,u=Wa(h),c=In("tick","end"),l=S9();t==null&&(t=[]);function h(){f(),c.call("tick",e),n<r&&(u.stop(),c.call("end",e))}function f(g){var m,y=t.length,x;g===void 0&&(g=1);for(var v=0;v<g;++v)for(n+=(o-n)*i,s.forEach(function(b){b(n)}),m=0;m<y;++m)x=t[m],x.fx==null?x.x+=x.vx*=a:(x.x=x.fx,x.vx=0),x.fy==null?x.y+=x.vy*=a:(x.y=x.fy,x.vy=0);return e}function d(){for(var g=0,m=t.length,y;g<m;++g){if(y=t[g],y.index=g,y.fx!=null&&(y.x=y.fx),y.fy!=null&&(y.y=y.fy),isNaN(y.x)||isNaN(y.y)){var x=T9*Math.sqrt(.5+g),v=g*P9;y.x=x*Math.cos(v),y.y=x*Math.sin(v)}(isNaN(y.vx)||isNaN(y.vy))&&(y.vx=y.vy=0)}}function p(g){return g.initialize&&g.initialize(t,l),g}return d(),e={tick:f,restart:function(){return u.restart(h),e},stop:function(){return u.stop(),e},nodes:function(g){return arguments.length?(t=g,d(),s.forEach(p),e):t},alpha:function(g){return arguments.length?(n=+g,e):n},alphaMin:function(g){return arguments.length?(r=+g,e):r},alphaDecay:function(g){return arguments.length?(i=+g,e):+i},alphaTarget:function(g){return arguments.length?(o=+g,e):o},velocityDecay:function(g){return arguments.length?(a=1-g,e):1-a},randomSource:function(g){return arguments.length?(l=g,s.forEach(p),e):l},force:function(g,m){return arguments.length>1?(m==null?s.delete(g):s.set(g,p(m)),e):s.get(g)},find:function(g,m,y){var x=0,v=t.length,b,$,w,S,_;for(y==null?y=1/0:y*=y,x=0;x<v;++x)S=t[x],b=g-S.x,$=m-S.y,w=b*b+$*$,w<y&&(_=S,y=w);return _},on:function(g,m){return arguments.length>1?(c.on(g,m),e):c.on(g)}}}function P1(){var t,e,n,r,i=Et(-30),o,a=1,s=1/0,u=.81;function c(d){var p,g=t.length,m=is(t,A9,M9).visitAfter(h);for(r=d,p=0;p<g;++p)e=t[p],m.visit(f)}function l(){if(t){var d,p=t.length,g;for(o=new Array(p),d=0;d<p;++d)g=t[d],o[g.index]=+i(g,d,t)}}function h(d){var p=0,g,m,y=0,x,v,b;if(d.length){for(x=v=b=0;b<4;++b)(g=d[b])&&(m=Math.abs(g.value))&&(p+=g.value,y+=m,x+=m*g.x,v+=m*g.y);d.x=x/y,d.y=v/y}else{g=d,g.x=g.data.x,g.y=g.data.y;do p+=o[g.data.index];while(g=g.next)}d.value=p}function f(d,p,g,m){if(!d.value)return!0;var y=d.x-e.x,x=d.y-e.y,v=m-p,b=y*y+x*x;if(v*v/u<b)return b<s&&(y===0&&(y=mn(n),b+=y*y),x===0&&(x=mn(n),b+=x*x),b<a&&(b=Math.sqrt(a*b)),e.vx+=y*d.value*r/b,e.vy+=x*d.value*r/b),!0;if(d.length||b>=s)return;(d.data!==e||d.next)&&(y===0&&(y=mn(n),b+=y*y),x===0&&(x=mn(n),b+=x*x),b<a&&(b=Math.sqrt(a*b)));do d.data!==e&&(v=o[d.data.index]*r/b,e.vx+=y*v,e.vy+=x*v);while(d=d.next)}return c.initialize=function(d,p){t=d,n=p,l()},c.strength=function(d){return arguments.length?(i=typeof d=="function"?d:Et(+d),l(),c):i},c.distanceMin=function(d){return arguments.length?(a=d*d,c):Math.sqrt(a)},c.distanceMax=function(d){return arguments.length?(s=d*d,c):Math.sqrt(s)},c.theta=function(d){return arguments.length?(u=d*d,c):Math.sqrt(u)},c}function D9(t,e,n){var r,i=Et(.1),o,a;typeof t!="function"&&(t=Et(+t)),e==null&&(e=0),n==null&&(n=0);function s(c){for(var l=0,h=r.length;l<h;++l){var f=r[l],d=f.x-e||1e-6,p=f.y-n||1e-6,g=Math.sqrt(d*d+p*p),m=(a[l]-g)*o[l]*c/g;f.vx+=d*m,f.vy+=p*m}}function u(){if(r){var c,l=r.length;for(o=new Array(l),a=new Array(l),c=0;c<l;++c)a[c]=+t(r[c],c,r),o[c]=isNaN(a[c])?0:+i(r[c],c,r)}}return s.initialize=function(c){r=c,u()},s.strength=function(c){return arguments.length?(i=typeof c=="function"?c:Et(+c),u(),s):i},s.radius=function(c){return arguments.length?(t=typeof c=="function"?c:Et(+c),u(),s):t},s.x=function(c){return arguments.length?(e=+c,s):e},s.y=function(c){return arguments.length?(n=+c,s):n},s}function D1(t){var e=Et(.1),n,r,i;typeof t!="function"&&(t=Et(t==null?0:+t));function o(s){for(var u=0,c=n.length,l;u<c;++u)l=n[u],l.vx+=(i[u]-l.x)*r[u]*s}function a(){if(n){var s,u=n.length;for(r=new Array(u),i=new Array(u),s=0;s<u;++s)r[s]=isNaN(i[s]=+t(n[s],s,n))?0:+e(n[s],s,n)}}return o.initialize=function(s){n=s,a()},o.strength=function(s){return arguments.length?(e=typeof s=="function"?s:Et(+s),a(),o):e},o.x=function(s){return arguments.length?(t=typeof s=="function"?s:Et(+s),a(),o):t},o}function E1(t){var e=Et(.1),n,r,i;typeof t!="function"&&(t=Et(t==null?0:+t));function o(s){for(var u=0,c=n.length,l;u<c;++u)l=n[u],l.vy+=(i[u]-l.y)*r[u]*s}function a(){if(n){var s,u=n.length;for(r=new Array(u),i=new Array(u),s=0;s<u;++s)r[s]=isNaN(i[s]=+t(n[s],s,n))?0:+e(n[s],s,n)}}return o.initialize=function(s){n=s,a()},o.strength=function(s){return arguments.length?(e=typeof s=="function"?s:Et(+s),a(),o):e},o.y=function(s){return arguments.length?(t=typeof s=="function"?s:Et(+s),a(),o):t},o}function E9(t){return Math.abs(t=Math.round(t))>=1e21?t.toLocaleString("en").replace(/,/g,""):t.toString(10)}function os(t,e){if((n=(t=e?t.toExponential(e-1):t.toExponential()).indexOf("e"))<0)return null;var n,r=t.slice(0,n);return[r.length>1?r[0]+r.slice(2):r,+t.slice(n+1)]}function Or(t){return t=os(Math.abs(t)),t?t[1]:NaN}function k9(t,e){return function(n,r){for(var i=n.length,o=[],a=0,s=t[0],u=0;i>0&&s>0&&(u+s+1>r&&(s=Math.max(1,r-u)),o.push(n.substring(i-=s,i+s)),!((u+=s+1)>r));)s=t[a=(a+1)%t.length];return o.reverse().join(e)}}function L9(t){return function(e){return e.replace(/[0-9]/g,function(n){return t[+n]})}}var C9=/^(?:(.)?([<>=^]))?([+\-( ])?([$#])?(0)?(\d+)?(,)?(\.\d+)?(~)?([a-z%])?$/i;function Ur(t){if(!(e=C9.exec(t)))throw new Error("invalid format: "+t);var e;return new as({fill:e[1],align:e[2],sign:e[3],symbol:e[4],zero:e[5],width:e[6],comma:e[7],precision:e[8]&&e[8].slice(1),trim:e[9],type:e[10]})}Ur.prototype=as.prototype;function as(t){this.fill=t.fill===void 0?" ":t.fill+"",this.align=t.align===void 0?">":t.align+"",this.sign=t.sign===void 0?"-":t.sign+"",this.symbol=t.symbol===void 0?"":t.symbol+"",this.zero=!!t.zero,this.width=t.width===void 0?void 0:+t.width,this.comma=!!t.comma,this.precision=t.precision===void 0?void 0:+t.precision,this.trim=!!t.trim,this.type=t.type===void 0?"":t.type+""}as.prototype.toString=function(){return this.fill+this.align+this.sign+this.symbol+(this.zero?"0":"")+(this.width===void 0?"":Math.max(1,this.width|0))+(this.comma?",":"")+(this.precision===void 0?"":"."+Math.max(0,this.precision|0))+(this.trim?"~":"")+this.type};function R9(t){t:for(var e=t.length,n=1,r=-1,i;n<e;++n)switch(t[n]){case".":r=i=n;break;case"0":r===0&&(r=n),i=n;break;default:if(!+t[n])break t;r>0&&(r=0);break}return r>0?t.slice(0,r)+t.slice(i+1):t}var k1;function I9(t,e){var n=os(t,e);if(!n)return t+"";var r=n[0],i=n[1],o=i-(k1=Math.max(-8,Math.min(8,Math.floor(i/3)))*3)+1,a=r.length;return o===a?r:o>a?r+new Array(o-a+1).join("0"):o>0?r.slice(0,o)+"."+r.slice(o):"0."+new Array(1-o).join("0")+os(t,Math.max(0,e+o-1))[0]}function L1(t,e){var n=os(t,e);if(!n)return t+"";var r=n[0],i=n[1];return i<0?"0."+new Array(-i).join("0")+r:r.length>i+1?r.slice(0,i+1)+"."+r.slice(i+1):r+new Array(i-r.length+2).join("0")}const C1={"%":(t,e)=>(t*100).toFixed(e),b:t=>Math.round(t).toString(2),c:t=>t+"",d:E9,e:(t,e)=>t.toExponential(e),f:(t,e)=>t.toFixed(e),g:(t,e)=>t.toPrecision(e),o:t=>Math.round(t).toString(8),p:(t,e)=>L1(t*100,e),r:L1,s:I9,X:t=>Math.round(t).toString(16).toUpperCase(),x:t=>Math.round(t).toString(16)};function R1(t){return t}var I1=Array.prototype.map,N1=["y","z","a","f","p","n","µ","m","","k","M","G","T","P","E","Z","Y"];function F1(t){var e=t.grouping===void 0||t.thousands===void 0?R1:k9(I1.call(t.grouping,Number),t.thousands+""),n=t.currency===void 0?"":t.currency[0]+"",r=t.currency===void 0?"":t.currency[1]+"",i=t.decimal===void 0?".":t.decimal+"",o=t.numerals===void 0?R1:L9(I1.call(t.numerals,String)),a=t.percent===void 0?"%":t.percent+"",s=t.minus===void 0?"−":t.minus+"",u=t.nan===void 0?"NaN":t.nan+"";function c(h){h=Ur(h);var f=h.fill,d=h.align,p=h.sign,g=h.symbol,m=h.zero,y=h.width,x=h.comma,v=h.precision,b=h.trim,$=h.type;$==="n"?(x=!0,$="g"):C1[$]||(v===void 0&&(v=12),b=!0,$="g"),(m||f==="0"&&d==="=")&&(m=!0,f="0",d="=");var w=g==="$"?n:g==="#"&&/[boxX]/.test($)?"0"+$.toLowerCase():"",S=g==="$"?r:/[%p]/.test($)?a:"",_=C1[$],P=/[defgprs%]/.test($);v=v===void 0?6:/[gprs]/.test($)?Math.max(1,Math.min(21,v)):Math.max(0,Math.min(20,v));function D(A){var I=w,M=S,T,k,E;if($==="c")M=_(A)+M,A="";else{A=+A;var N=A<0||1/A<0;if(A=isNaN(A)?u:_(Math.abs(A),v),b&&(A=R9(A)),N&&+A==0&&p!=="+"&&(N=!1),I=(N?p==="("?p:s:p==="-"||p==="("?"":p)+I,M=($==="s"?N1[8+k1/3]:"")+M+(N&&p==="("?")":""),P){for(T=-1,k=A.length;++T<k;)if(E=A.charCodeAt(T),48>E||E>57){M=(E===46?i+A.slice(T+1):A.slice(T))+M,A=A.slice(0,T);break}}}x&&!m&&(A=e(A,1/0));var O=I.length+A.length+M.length,L=O<y?new Array(y-O+1).join(f):"";switch(x&&m&&(A=e(L+A,L.length?y-M.length:1/0),L=""),d){case"<":A=I+A+M+L;break;case"=":A=I+L+A+M;break;case"^":A=L.slice(0,O=L.length>>1)+I+A+M+L.slice(O);break;default:A=L+I+A+M;break}return o(A)}return D.toString=function(){return h+""},D}function l(h,f){var d=c((h=Ur(h),h.type="f",h)),p=Math.max(-8,Math.min(8,Math.floor(Or(f)/3)))*3,g=Math.pow(10,-p),m=N1[8+p/3];return function(y){return d(g*y)+m}}return{format:c,formatPrefix:l}}var ss,Zi,Ll;G1({thousands:",",grouping:[3],currency:["$",""]});function G1(t){return ss=F1(t),Zi=ss.format,Ll=ss.formatPrefix,ss}function z1(t){return Math.max(0,-Or(Math.abs(t)))}function O1(t,e){return Math.max(0,Math.max(-8,Math.min(8,Math.floor(Or(e)/3)))*3-Or(Math.abs(t)))}function U1(t,e){return t=Math.abs(t),e=Math.abs(e)-t,Math.max(0,Or(e)-Or(t))+1}var tt=1e-6,Ki=1e-12,ct=Math.PI,St=ct/2,us=ct/4,Xt=ct*2,yt=180/ct,et=ct/180,ft=Math.abs,Br=Math.atan,Vt=Math.atan2,K=Math.cos,cs=Math.ceil,B1=Math.exp,Cl=Math.hypot,ls=Math.log,Rl=Math.pow,j=Math.sin,he=Math.sign||function(t){return t>0?1:t<0?-1:0},Ct=Math.sqrt,Il=Math.tan;function Y1(t){return t>1?0:t<-1?ct:Math.acos(t)}function jt(t){return t>1?St:t<-1?-St:Math.asin(t)}function W1(t){return(t=j(t/2))*t}function wt(){}function fs(t,e){t&&q1.hasOwnProperty(t.type)&&q1[t.type](t,e)}var H1={Feature:function(t,e){fs(t.geometry,e)},FeatureCollection:function(t,e){for(var n=t.features,r=-1,i=n.length;++r<i;)fs(n[r].geometry,e)}},q1={Sphere:function(t,e){e.sphere()},Point:function(t,e){t=t.coordinates,e.point(t[0],t[1],t[2])},MultiPoint:function(t,e){for(var n=t.coordinates,r=-1,i=n.length;++r<i;)t=n[r],e.point(t[0],t[1],t[2])},LineString:function(t,e){Nl(t.coordinates,e,0)},MultiLineString:function(t,e){for(var n=t.coordinates,r=-1,i=n.length;++r<i;)Nl(n[r],e,0)},Polygon:function(t,e){X1(t.coordinates,e)},MultiPolygon:function(t,e){for(var n=t.coordinates,r=-1,i=n.length;++r<i;)X1(n[r],e)},GeometryCollection:function(t,e){for(var n=t.geometries,r=-1,i=n.length;++r<i;)fs(n[r],e)}};function Nl(t,e,n){var r=-1,i=t.length-n,o;for(e.lineStart();++r<i;)o=t[r],e.point(o[0],o[1],o[2]);e.lineEnd()}function X1(t,e){var n=-1,r=t.length;for(e.polygonStart();++n<r;)Nl(t[n],e,1);e.polygonEnd()}function Pe(t,e){t&&H1.hasOwnProperty(t.type)?H1[t.type](t,e):fs(t,e)}var hs=new Dt,ds=new Dt,V1,j1,Fl,Gl,zl,Ne={point:wt,lineStart:wt,lineEnd:wt,polygonStart:function(){hs=new Dt,Ne.lineStart=N9,Ne.lineEnd=F9},polygonEnd:function(){var t=+hs;ds.add(t<0?Xt+t:t),this.lineStart=this.lineEnd=this.point=wt},sphere:function(){ds.add(Xt)}};function N9(){Ne.point=G9}function F9(){Z1(V1,j1)}function G9(t,e){Ne.point=Z1,V1=t,j1=e,t*=et,e*=et,Fl=t,Gl=K(e=e/2+us),zl=j(e)}function Z1(t,e){t*=et,e*=et,e=e/2+us;var n=t-Fl,r=n>=0?1:-1,i=r*n,o=K(e),a=j(e),s=zl*a,u=Gl*o+s*K(i),c=s*r*j(i);hs.add(Vt(c,u)),Fl=t,Gl=o,zl=a}function z9(t){return ds=new Dt,Pe(t,Ne),ds*2}function ps(t){return[Vt(t[1],t[0]),jt(t[2])]}function Zn(t){var e=t[0],n=t[1],r=K(n);return[r*K(e),r*j(e),j(n)]}function gs(t,e){return t[0]*e[0]+t[1]*e[1]+t[2]*e[2]}function Yr(t,e){return[t[1]*e[2]-t[2]*e[1],t[2]*e[0]-t[0]*e[2],t[0]*e[1]-t[1]*e[0]]}function Ol(t,e){t[0]+=e[0],t[1]+=e[1],t[2]+=e[2]}function ms(t,e){return[t[0]*e,t[1]*e,t[2]*e]}function ys(t){var e=Ct(t[0]*t[0]+t[1]*t[1]+t[2]*t[2]);t[0]/=e,t[1]/=e,t[2]/=e}var $t,re,At,se,Kn,K1,Q1,Wr,Qi,yn,Qe,Je={point:Ul,lineStart:tm,lineEnd:em,polygonStart:function(){Je.point=nm,Je.lineStart=O9,Je.lineEnd=U9,Qi=new Dt,Ne.polygonStart()},polygonEnd:function(){Ne.polygonEnd(),Je.point=Ul,Je.lineStart=tm,Je.lineEnd=em,hs<0?($t=-(At=180),re=-(se=90)):Qi>tt?se=90:Qi<-tt&&(re=-90),Qe[0]=$t,Qe[1]=At},sphere:function(){$t=-(At=180),re=-(se=90)}};function Ul(t,e){yn.push(Qe=[$t=t,At=t]),e<re&&(re=e),e>se&&(se=e)}function J1(t,e){var n=Zn([t*et,e*et]);if(Wr){var r=Yr(Wr,n),i=[r[1],-r[0],0],o=Yr(i,r);ys(o),o=ps(o);var a=t-Kn,s=a>0?1:-1,u=o[0]*yt*s,c,l=ft(a)>180;l^(s*Kn<u&&u<s*t)?(c=o[1]*yt,c>se&&(se=c)):(u=(u+360)%360-180,l^(s*Kn<u&&u<s*t)?(c=-o[1]*yt,c<re&&(re=c)):(e<re&&(re=e),e>se&&(se=e))),l?t<Kn?ue($t,t)>ue($t,At)&&(At=t):ue(t,At)>ue($t,At)&&($t=t):At>=$t?(t<$t&&($t=t),t>At&&(At=t)):t>Kn?ue($t,t)>ue($t,At)&&(At=t):ue(t,At)>ue($t,At)&&($t=t)}else yn.push(Qe=[$t=t,At=t]);e<re&&(re=e),e>se&&(se=e),Wr=n,Kn=t}function tm(){Je.point=J1}function em(){Qe[0]=$t,Qe[1]=At,Je.point=Ul,Wr=null}function nm(t,e){if(Wr){var n=t-Kn;Qi.add(ft(n)>180?n+(n>0?360:-360):n)}else K1=t,Q1=e;Ne.point(t,e),J1(t,e)}function O9(){Ne.lineStart()}function U9(){nm(K1,Q1),Ne.lineEnd(),ft(Qi)>tt&&($t=-(At=180)),Qe[0]=$t,Qe[1]=At,Wr=null}function ue(t,e){return(e-=t)<0?e+360:e}function B9(t,e){return t[0]-e[0]}function rm(t,e){return t[0]<=t[1]?t[0]<=e&&e<=t[1]:e<t[0]||t[1]<e}function Y9(t){var e,n,r,i,o,a,s;if(se=At=-($t=re=1/0),yn=[],Pe(t,Je),n=yn.length){for(yn.sort(B9),e=1,r=yn[0],o=[r];e<n;++e)i=yn[e],rm(r,i[0])||rm(r,i[1])?(ue(r[0],i[1])>ue(r[0],r[1])&&(r[1]=i[1]),ue(i[0],r[1])>ue(r[0],r[1])&&(r[0]=i[0])):o.push(r=i);for(a=-1/0,n=o.length-1,e=0,r=o[n];e<=n;r=i,++e)i=o[e],(s=ue(r[1],i[0]))>a&&(a=s,$t=i[0],At=r[1])}return yn=Qe=null,$t===1/0||re===1/0?[[NaN,NaN],[NaN,NaN]]:[[$t,re],[At,se]]}var Ji,bs,vs,xs,_s,ws,$s,Ss,Bl,Yl,Wl,im,om,Zt,Kt,Qt,De={sphere:wt,point:Hl,lineStart:am,lineEnd:sm,polygonStart:function(){De.lineStart=q9,De.lineEnd=X9},polygonEnd:function(){De.lineStart=am,De.lineEnd=sm}};function Hl(t,e){t*=et,e*=et;var n=K(e);to(n*K(t),n*j(t),j(e))}function to(t,e,n){++Ji,vs+=(t-vs)/Ji,xs+=(e-xs)/Ji,_s+=(n-_s)/Ji}function am(){De.point=W9}function W9(t,e){t*=et,e*=et;var n=K(e);Zt=n*K(t),Kt=n*j(t),Qt=j(e),De.point=H9,to(Zt,Kt,Qt)}function H9(t,e){t*=et,e*=et;var n=K(e),r=n*K(t),i=n*j(t),o=j(e),a=Vt(Ct((a=Kt*o-Qt*i)*a+(a=Qt*r-Zt*o)*a+(a=Zt*i-Kt*r)*a),Zt*r+Kt*i+Qt*o);bs+=a,ws+=a*(Zt+(Zt=r)),$s+=a*(Kt+(Kt=i)),Ss+=a*(Qt+(Qt=o)),to(Zt,Kt,Qt)}function sm(){De.point=Hl}function q9(){De.point=V9}function X9(){um(im,om),De.point=Hl}function V9(t,e){im=t,om=e,t*=et,e*=et,De.point=um;var n=K(e);Zt=n*K(t),Kt=n*j(t),Qt=j(e),to(Zt,Kt,Qt)}function um(t,e){t*=et,e*=et;var n=K(e),r=n*K(t),i=n*j(t),o=j(e),a=Kt*o-Qt*i,s=Qt*r-Zt*o,u=Zt*i-Kt*r,c=Cl(a,s,u),l=jt(c),h=c&&-l/c;Bl.add(h*a),Yl.add(h*s),Wl.add(h*u),bs+=l,ws+=l*(Zt+(Zt=r)),$s+=l*(Kt+(Kt=i)),Ss+=l*(Qt+(Qt=o)),to(Zt,Kt,Qt)}function j9(t){Ji=bs=vs=xs=_s=ws=$s=Ss=0,Bl=new Dt,Yl=new Dt,Wl=new Dt,Pe(t,De);var e=+Bl,n=+Yl,r=+Wl,i=Cl(e,n,r);return i<Ki&&(e=ws,n=$s,r=Ss,bs<tt&&(e=vs,n=xs,r=_s),i=Cl(e,n,r),i<Ki)?[NaN,NaN]:[Vt(n,e)*yt,jt(r/i)*yt]}function Hr(t){return function(){return t}}function ql(t,e){function n(r,i){return r=t(r,i),e(r[0],r[1])}return t.invert&&e.invert&&(n.invert=function(r,i){return r=e.invert(r,i),r&&t.invert(r[0],r[1])}),n}function Xl(t,e){return ft(t)>ct&&(t-=Math.round(t/Xt)*Xt),[t,e]}Xl.invert=Xl;function Vl(t,e,n){return(t%=Xt)?e||n?ql(lm(t),fm(e,n)):lm(t):e||n?fm(e,n):Xl}function cm(t){return function(e,n){return e+=t,ft(e)>ct&&(e-=Math.round(e/Xt)*Xt),[e,n]}}function lm(t){var e=cm(t);return e.invert=cm(-t),e}function fm(t,e){var n=K(t),r=j(t),i=K(e),o=j(e);function a(s,u){var c=K(u),l=K(s)*c,h=j(s)*c,f=j(u),d=f*n+l*r;return[Vt(h*i-d*o,l*n-f*r),jt(d*i+h*o)]}return a.invert=function(s,u){var c=K(u),l=K(s)*c,h=j(s)*c,f=j(u),d=f*i-h*o;return[Vt(h*i+f*o,l*n+d*r),jt(d*n-l*r)]},a}function hm(t){t=Vl(t[0]*et,t[1]*et,t.length>2?t[2]*et:0);function e(n){return n=t(n[0]*et,n[1]*et),n[0]*=yt,n[1]*=yt,n}return e.invert=function(n){return n=t.invert(n[0]*et,n[1]*et),n[0]*=yt,n[1]*=yt,n},e}function dm(t,e,n,r,i,o){if(n){var a=K(e),s=j(e),u=r*n;i==null?(i=e+r*Xt,o=e-u/2):(i=pm(a,i),o=pm(a,o),(r>0?i<o:i>o)&&(i+=r*Xt));for(var c,l=i;r>0?l>o:l<o;l-=u)c=ps([a,-s*K(l),-s*j(l)]),t.point(c[0],c[1])}}function pm(t,e){e=Zn(e),e[0]-=t,ys(e);var n=Y1(-e[1]);return((-e[2]<0?-n:n)+Xt-tt)%Xt}function Z9(){var t=Hr([0,0]),e=Hr(90),n=Hr(2),r,i,o={point:a};function a(u,c){r.push(u=i(u,c)),u[0]*=yt,u[1]*=yt}function s(){var u=t.apply(this,arguments),c=e.apply(this,arguments)*et,l=n.apply(this,arguments)*et;return r=[],i=Vl(-u[0]*et,-u[1]*et,0).invert,dm(o,c,l,1),u={type:"Polygon",coordinates:[r]},r=i=null,u}return s.center=function(u){return arguments.length?(t=typeof u=="function"?u:Hr([+u[0],+u[1]]),s):t},s.radius=function(u){return arguments.length?(e=typeof u=="function"?u:Hr(+u),s):e},s.precision=function(u){return arguments.length?(n=typeof u=="function"?u:Hr(+u),s):n},s}function gm(){var t=[],e;return{point:function(n,r,i){e.push([n,r,i])},lineStart:function(){t.push(e=[])},lineEnd:wt,rejoin:function(){t.length>1&&t.push(t.pop().concat(t.shift()))},result:function(){var n=t;return t=[],e=null,n}}}function As(t,e){return ft(t[0]-e[0])<tt&&ft(t[1]-e[1])<tt}function Ms(t,e,n,r){this.x=t,this.z=e,this.o=n,this.e=r,this.v=!1,this.n=this.p=null}function mm(t,e,n,r,i){var o=[],a=[],s,u;if(t.forEach(function(p){if(!((g=p.length-1)<=0)){var g,m=p[0],y=p[g],x;if(As(m,y)){if(!m[2]&&!y[2]){for(i.lineStart(),s=0;s<g;++s)i.point((m=p[s])[0],m[1]);i.lineEnd();return}y[0]+=2*tt}o.push(x=new Ms(m,p,null,!0)),a.push(x.o=new Ms(m,null,x,!1)),o.push(x=new Ms(y,p,null,!1)),a.push(x.o=new Ms(y,null,x,!0))}}),!!o.length){for(a.sort(e),ym(o),ym(a),s=0,u=a.length;s<u;++s)a[s].e=n=!n;for(var c=o[0],l,h;;){for(var f=c,d=!0;f.v;)if((f=f.n)===c)return;l=f.z,i.lineStart();do{if(f.v=f.o.v=!0,f.e){if(d)for(s=0,u=l.length;s<u;++s)i.point((h=l[s])[0],h[1]);else r(f.x,f.n.x,1,i);f=f.n}else{if(d)for(l=f.p.z,s=l.length-1;s>=0;--s)i.point((h=l[s])[0],h[1]);else r(f.x,f.p.x,-1,i);f=f.p}f=f.o,l=f.z,d=!d}while(!f.v);i.lineEnd()}}}function ym(t){if(e=t.length){for(var e,n=0,r=t[0],i;++n<e;)r.n=i=t[n],i.p=r,r=i;r.n=i=t[0],i.p=r}}function jl(t){return ft(t[0])<=ct?t[0]:he(t[0])*((ft(t[0])+ct)%Xt-ct)}function bm(t,e){var n=jl(e),r=e[1],i=j(r),o=[j(n),-K(n),0],a=0,s=0,u=new Dt;i===1?r=St+tt:i===-1&&(r=-St-tt);for(var c=0,l=t.length;c<l;++c)if(f=(h=t[c]).length)for(var h,f,d=h[f-1],p=jl(d),g=d[1]/2+us,m=j(g),y=K(g),x=0;x<f;++x,p=b,m=w,y=S,d=v){var v=h[x],b=jl(v),$=v[1]/2+us,w=j($),S=K($),_=b-p,P=_>=0?1:-1,D=P*_,A=D>ct,I=m*w;if(u.add(Vt(I*P*j(D),y*S+I*K(D))),a+=A?_+P*Xt:_,A^p>=n^b>=n){var M=Yr(Zn(d),Zn(v));ys(M);var T=Yr(o,M);ys(T);var k=(A^_>=0?-1:1)*jt(T[2]);(r>k||r===k&&(M[0]||M[1]))&&(s+=A^_>=0?1:-1)}}return(a<-tt||a<tt&&u<-Ki)^s&1}function vm(t,e,n,r){return function(i){var o=e(i),a=gm(),s=e(a),u=!1,c,l,h,f={point:d,lineStart:g,lineEnd:m,polygonStart:function(){f.point=y,f.lineStart=x,f.lineEnd=v,l=[],c=[]},polygonEnd:function(){f.point=d,f.lineStart=g,f.lineEnd=m,l=Mc(l);var b=bm(c,r);l.length?(u||(i.polygonStart(),u=!0),mm(l,Q9,b,n,i)):b&&(u||(i.polygonStart(),u=!0),i.lineStart(),n(null,null,1,i),i.lineEnd()),u&&(i.polygonEnd(),u=!1),l=c=null},sphere:function(){i.polygonStart(),i.lineStart(),n(null,null,1,i),i.lineEnd(),i.polygonEnd()}};function d(b,$){t(b,$)&&i.point(b,$)}function p(b,$){o.point(b,$)}function g(){f.point=p,o.lineStart()}function m(){f.point=d,o.lineEnd()}function y(b,$){h.push([b,$]),s.point(b,$)}function x(){s.lineStart(),h=[]}function v(){y(h[0][0],h[0][1]),s.lineEnd();var b=s.clean(),$=a.result(),w,S=$.length,_,P,D;if(h.pop(),c.push(h),h=null,!!S){if(b&1){if(P=$[0],(_=P.length-1)>0){for(u||(i.polygonStart(),u=!0),i.lineStart(),w=0;w<_;++w)i.point((D=P[w])[0],D[1]);i.lineEnd()}return}S>1&&b&2&&$.push($.pop().concat($.shift())),l.push($.filter(K9))}}return f}}function K9(t){return t.length>1}function Q9(t,e){return((t=t.x)[0]<0?t[1]-St-tt:St-t[1])-((e=e.x)[0]<0?e[1]-St-tt:St-e[1])}const Zl=vm(function(){return!0},J9,eT,[-ct,-St]);function J9(t){var e=NaN,n=NaN,r=NaN,i;return{lineStart:function(){t.lineStart(),i=1},point:function(o,a){var s=o>0?ct:-ct,u=ft(o-e);ft(u-ct)<tt?(t.point(e,n=(n+a)/2>0?St:-St),t.point(r,n),t.lineEnd(),t.lineStart(),t.point(s,n),t.point(o,n),i=0):r!==s&&u>=ct&&(ft(e-r)<tt&&(e-=r*tt),ft(o-s)<tt&&(o-=s*tt),n=tT(e,n,o,a),t.point(r,n),t.lineEnd(),t.lineStart(),t.point(s,n),i=0),t.point(e=o,n=a),r=s},lineEnd:function(){t.lineEnd(),e=n=NaN},clean:function(){return 2-i}}}function tT(t,e,n,r){var i,o,a=j(t-n);return ft(a)>tt?Br((j(e)*(o=K(r))*j(n)-j(r)*(i=K(e))*j(t))/(i*o*a)):(e+r)/2}function eT(t,e,n,r){var i;if(t==null)i=n*St,r.point(-ct,i),r.point(0,i),r.point(ct,i),r.point(ct,0),r.point(ct,-i),r.point(0,-i),r.point(-ct,-i),r.point(-ct,0),r.point(-ct,i);else if(ft(t[0]-e[0])>tt){var o=t[0]<e[0]?ct:-ct;i=n*o/2,r.point(-o,i),r.point(0,i),r.point(o,i)}else r.point(e[0],e[1])}function xm(t){var e=K(t),n=2*et,r=e>0,i=ft(e)>tt;function o(l,h,f,d){dm(d,t,n,f,l,h)}function a(l,h){return K(l)*K(h)>e}function s(l){var h,f,d,p,g;return{lineStart:function(){p=d=!1,g=1},point:function(m,y){var x=[m,y],v,b=a(m,y),$=r?b?0:c(m,y):b?c(m+(m<0?ct:-ct),y):0;if(!h&&(p=d=b)&&l.lineStart(),b!==d&&(v=u(h,x),(!v||As(h,v)||As(x,v))&&(x[2]=1)),b!==d)g=0,b?(l.lineStart(),v=u(x,h),l.point(v[0],v[1])):(v=u(h,x),l.point(v[0],v[1],2),l.lineEnd()),h=v;else if(i&&h&&r^b){var w;!($&f)&&(w=u(x,h,!0))&&(g=0,r?(l.lineStart(),l.point(w[0][0],w[0][1]),l.point(w[1][0],w[1][1]),l.lineEnd()):(l.point(w[1][0],w[1][1]),l.lineEnd(),l.lineStart(),l.point(w[0][0],w[0][1],3)))}b&&(!h||!As(h,x))&&l.point(x[0],x[1]),h=x,d=b,f=$},lineEnd:function(){d&&l.lineEnd(),h=null},clean:function(){return g|(p&&d)<<1}}}function u(l,h,f){var d=Zn(l),p=Zn(h),g=[1,0,0],m=Yr(d,p),y=gs(m,m),x=m[0],v=y-x*x;if(!v)return!f&&l;var b=e*y/v,$=-e*x/v,w=Yr(g,m),S=ms(g,b),_=ms(m,$);Ol(S,_);var P=w,D=gs(S,P),A=gs(P,P),I=D*D-A*(gs(S,S)-1);if(!(I<0)){var M=Ct(I),T=ms(P,(-D-M)/A);if(Ol(T,S),T=ps(T),!f)return T;var k=l[0],E=h[0],N=l[1],O=h[1],L;E<k&&(L=k,k=E,E=L);var R=E-k,F=ft(R-ct)<tt,C=F||R<tt;if(!F&&O<N&&(L=N,N=O,O=L),C?F?N+O>0^T[1]<(ft(T[0]-k)<tt?N:O):N<=T[1]&&T[1]<=O:R>ct^(k<=T[0]&&T[0]<=E)){var z=ms(P,(-D+M)/A);return Ol(z,S),[T,ps(z)]}}}function c(l,h){var f=r?t:ct-t,d=0;return l<-f?d|=1:l>f&&(d|=2),h<-f?d|=4:h>f&&(d|=8),d}return vm(a,s,o,r?[0,-t]:[-ct,t-ct])}function nT(t,e,n,r,i,o){var a=t[0],s=t[1],u=e[0],c=e[1],l=0,h=1,f=u-a,d=c-s,p;if(p=n-a,!(!f&&p>0)){if(p/=f,f<0){if(p<l)return;p<h&&(h=p)}else if(f>0){if(p>h)return;p>l&&(l=p)}if(p=i-a,!(!f&&p<0)){if(p/=f,f<0){if(p>h)return;p>l&&(l=p)}else if(f>0){if(p<l)return;p<h&&(h=p)}if(p=r-s,!(!d&&p>0)){if(p/=d,d<0){if(p<l)return;p<h&&(h=p)}else if(d>0){if(p>h)return;p>l&&(l=p)}if(p=o-s,!(!d&&p<0)){if(p/=d,d<0){if(p>h)return;p>l&&(l=p)}else if(d>0){if(p<l)return;p<h&&(h=p)}return l>0&&(t[0]=a+l*f,t[1]=s+l*d),h<1&&(e[0]=a+h*f,e[1]=s+h*d),!0}}}}}var eo=1e9,Ts=-eo;function Ps(t,e,n,r){function i(c,l){return t<=c&&c<=n&&e<=l&&l<=r}function o(c,l,h,f){var d=0,p=0;if(c==null||(d=a(c,h))!==(p=a(l,h))||u(c,l)<0^h>0)do f.point(d===0||d===3?t:n,d>1?r:e);while((d=(d+h+4)%4)!==p);else f.point(l[0],l[1])}function a(c,l){return ft(c[0]-t)<tt?l>0?0:3:ft(c[0]-n)<tt?l>0?2:1:ft(c[1]-e)<tt?l>0?1:0:l>0?3:2}function s(c,l){return u(c.x,l.x)}function u(c,l){var h=a(c,1),f=a(l,1);return h!==f?h-f:h===0?l[1]-c[1]:h===1?c[0]-l[0]:h===2?c[1]-l[1]:l[0]-c[0]}return function(c){var l=c,h=gm(),f,d,p,g,m,y,x,v,b,$,w,S={point:_,lineStart:I,lineEnd:M,polygonStart:D,polygonEnd:A};function _(k,E){i(k,E)&&l.point(k,E)}function P(){for(var k=0,E=0,N=d.length;E<N;++E)for(var O=d[E],L=1,R=O.length,F=O[0],C,z,X=F[0],W=F[1];L<R;++L)C=X,z=W,F=O[L],X=F[0],W=F[1],z<=r?W>r&&(X-C)*(r-z)>(W-z)*(t-C)&&++k:W<=r&&(X-C)*(r-z)<(W-z)*(t-C)&&--k;return k}function D(){l=h,f=[],d=[],w=!0}function A(){var k=P(),E=w&&k,N=(f=Mc(f)).length;(E||N)&&(c.polygonStart(),E&&(c.lineStart(),o(null,null,1,c),c.lineEnd()),N&&mm(f,s,k,o,c),c.polygonEnd()),l=c,f=d=p=null}function I(){S.point=T,d&&d.push(p=[]),$=!0,b=!1,x=v=NaN}function M(){f&&(T(g,m),y&&b&&h.rejoin(),f.push(h.result())),S.point=_,b&&l.lineEnd()}function T(k,E){var N=i(k,E);if(d&&p.push([k,E]),$)g=k,m=E,y=N,$=!1,N&&(l.lineStart(),l.point(k,E));else if(N&&b)l.point(k,E);else{var O=[x=Math.max(Ts,Math.min(eo,x)),v=Math.max(Ts,Math.min(eo,v))],L=[k=Math.max(Ts,Math.min(eo,k)),E=Math.max(Ts,Math.min(eo,E))];nT(O,L,t,e,n,r)?(b||(l.lineStart(),l.point(O[0],O[1])),l.point(L[0],L[1]),N||l.lineEnd(),w=!1):N&&(l.lineStart(),l.point(k,E),w=!1)}x=k,v=E,b=N}return S}}function rT(){var t=0,e=0,n=960,r=500,i,o,a;return a={stream:function(s){return i&&o===s?i:i=Ps(t,e,n,r)(o=s)},extent:function(s){return arguments.length?(t=+s[0][0],e=+s[0][1],n=+s[1][0],r=+s[1][1],i=o=null,a):[[t,e],[n,r]]}}}var Kl,Ql,Ds,Es,qr={sphere:wt,point:wt,lineStart:iT,lineEnd:wt,polygonStart:wt,polygonEnd:wt};function iT(){qr.point=aT,qr.lineEnd=oT}function oT(){qr.point=qr.lineEnd=wt}function aT(t,e){t*=et,e*=et,Ql=t,Ds=j(e),Es=K(e),qr.point=sT}function sT(t,e){t*=et,e*=et;var n=j(e),r=K(e),i=ft(t-Ql),o=K(i),a=j(i),s=r*a,u=Es*n-Ds*r*o,c=Ds*n+Es*r*o;Kl.add(Vt(Ct(s*s+u*u),c)),Ql=t,Ds=n,Es=r}function _m(t){return Kl=new Dt,Pe(t,qr),+Kl}var Jl=[null,null],uT={type:"LineString",coordinates:Jl};function ks(t,e){return Jl[0]=t,Jl[1]=e,_m(uT)}var wm={Feature:function(t,e){return Ls(t.geometry,e)},FeatureCollection:function(t,e){for(var n=t.features,r=-1,i=n.length;++r<i;)if(Ls(n[r].geometry,e))return!0;return!1}},$m={Sphere:function(){return!0},Point:function(t,e){return Sm(t.coordinates,e)},MultiPoint:function(t,e){for(var n=t.coordinates,r=-1,i=n.length;++r<i;)if(Sm(n[r],e))return!0;return!1},LineString:function(t,e){return Am(t.coordinates,e)},MultiLineString:function(t,e){for(var n=t.coordinates,r=-1,i=n.length;++r<i;)if(Am(n[r],e))return!0;return!1},Polygon:function(t,e){return Mm(t.coordinates,e)},MultiPolygon:function(t,e){for(var n=t.coordinates,r=-1,i=n.length;++r<i;)if(Mm(n[r],e))return!0;return!1},GeometryCollection:function(t,e){for(var n=t.geometries,r=-1,i=n.length;++r<i;)if(Ls(n[r],e))return!0;return!1}};function Ls(t,e){return t&&$m.hasOwnProperty(t.type)?$m[t.type](t,e):!1}function Sm(t,e){return ks(t,e)===0}function Am(t,e){for(var n,r,i,o=0,a=t.length;o<a;o++){if(r=ks(t[o],e),r===0||o>0&&(i=ks(t[o],t[o-1]),i>0&&n<=i&&r<=i&&(n+r-i)*(1-Math.pow((n-r)/i,2))<Ki*i))return!0;n=r}return!1}function Mm(t,e){return!!bm(t.map(cT),Tm(e))}function cT(t){return t=t.map(Tm),t.pop(),t}function Tm(t){return[t[0]*et,t[1]*et]}function lT(t,e){return(t&&wm.hasOwnProperty(t.type)?wm[t.type]:Ls)(t,e)}function Pm(t,e,n){var r=ln(t,e-tt,n).concat(e);return function(i){return r.map(function(o){return[i,o]})}}function Dm(t,e,n){var r=ln(t,e-tt,n).concat(e);return function(i){return r.map(function(o){return[o,i]})}}function Em(){var t,e,n,r,i,o,a,s,u=10,c=u,l=90,h=360,f,d,p,g,m=2.5;function y(){return{type:"MultiLineString",coordinates:x()}}function x(){return ln(cs(r/l)*l,n,l).map(p).concat(ln(cs(s/h)*h,a,h).map(g)).concat(ln(cs(e/u)*u,t,u).filter(function(v){return ft(v%l)>tt}).map(f)).concat(ln(cs(o/c)*c,i,c).filter(function(v){return ft(v%h)>tt}).map(d))}return y.lines=function(){return x().map(function(v){return{type:"LineString",coordinates:v}})},y.outline=function(){return{type:"Polygon",coordinates:[p(r).concat(g(a).slice(1),p(n).reverse().slice(1),g(s).reverse().slice(1))]}},y.extent=function(v){return arguments.length?y.extentMajor(v).extentMinor(v):y.extentMinor()},y.extentMajor=function(v){return arguments.length?(r=+v[0][0],n=+v[1][0],s=+v[0][1],a=+v[1][1],r>n&&(v=r,r=n,n=v),s>a&&(v=s,s=a,a=v),y.precision(m)):[[r,s],[n,a]]},y.extentMinor=function(v){return arguments.length?(e=+v[0][0],t=+v[1][0],o=+v[0][1],i=+v[1][1],e>t&&(v=e,e=t,t=v),o>i&&(v=o,o=i,i=v),y.precision(m)):[[e,o],[t,i]]},y.step=function(v){return arguments.length?y.stepMajor(v).stepMinor(v):y.stepMinor()},y.stepMajor=function(v){return arguments.length?(l=+v[0],h=+v[1],y):[l,h]},y.stepMinor=function(v){return arguments.length?(u=+v[0],c=+v[1],y):[u,c]},y.precision=function(v){return arguments.length?(m=+v,f=Pm(o,i,90),d=Dm(e,t,m),p=Pm(s,a,90),g=Dm(r,n,m),y):m},y.extentMajor([[-180,-90+tt],[180,90-tt]]).extentMinor([[-180,-80-tt],[180,80+tt]])}function fT(){return Em()()}function hT(t,e){var n=t[0]*et,r=t[1]*et,i=e[0]*et,o=e[1]*et,a=K(r),s=j(r),u=K(o),c=j(o),l=a*K(n),h=a*j(n),f=u*K(i),d=u*j(i),p=2*jt(Ct(W1(o-r)+a*u*W1(i-n))),g=j(p),m=p?function(y){var x=j(y*=p)/g,v=j(p-y)/g,b=v*l+x*f,$=v*h+x*d,w=v*s+x*c;return[Vt($,b)*yt,Vt(w,Ct(b*b+$*$))*yt]}:function(){return[n*yt,r*yt]};return m.distance=p,m}const no=t=>t;var tf=new Dt,ef=new Dt,km,Lm,nf,rf,tn={point:wt,lineStart:wt,lineEnd:wt,polygonStart:function(){tn.lineStart=dT,tn.lineEnd=gT},polygonEnd:function(){tn.lineStart=tn.lineEnd=tn.point=wt,tf.add(ft(ef)),ef=new Dt},result:function(){var t=tf/2;return tf=new Dt,t}};function dT(){tn.point=pT}function pT(t,e){tn.point=Cm,km=nf=t,Lm=rf=e}function Cm(t,e){ef.add(rf*t-nf*e),nf=t,rf=e}function gT(){Cm(km,Lm)}var Xr=1/0,Cs=Xr,ro=-Xr,Rs=ro,Is={point:mT,lineStart:wt,lineEnd:wt,polygonStart:wt,polygonEnd:wt,result:function(){var t=[[Xr,Cs],[ro,Rs]];return ro=Rs=-(Cs=Xr=1/0),t}};function mT(t,e){t<Xr&&(Xr=t),t>ro&&(ro=t),e<Cs&&(Cs=e),e>Rs&&(Rs=e)}var of=0,af=0,io=0,Ns=0,Fs=0,Vr=0,sf=0,uf=0,oo=0,Rm,Im,Fe,Ge,de={point:Qn,lineStart:Nm,lineEnd:Fm,polygonStart:function(){de.lineStart=vT,de.lineEnd=xT},polygonEnd:function(){de.point=Qn,de.lineStart=Nm,de.lineEnd=Fm},result:function(){var t=oo?[sf/oo,uf/oo]:Vr?[Ns/Vr,Fs/Vr]:io?[of/io,af/io]:[NaN,NaN];return of=af=io=Ns=Fs=Vr=sf=uf=oo=0,t}};function Qn(t,e){of+=t,af+=e,++io}function Nm(){de.point=yT}function yT(t,e){de.point=bT,Qn(Fe=t,Ge=e)}function bT(t,e){var n=t-Fe,r=e-Ge,i=Ct(n*n+r*r);Ns+=i*(Fe+t)/2,Fs+=i*(Ge+e)/2,Vr+=i,Qn(Fe=t,Ge=e)}function Fm(){de.point=Qn}function vT(){de.point=_T}function xT(){Gm(Rm,Im)}function _T(t,e){de.point=Gm,Qn(Rm=Fe=t,Im=Ge=e)}function Gm(t,e){var n=t-Fe,r=e-Ge,i=Ct(n*n+r*r);Ns+=i*(Fe+t)/2,Fs+=i*(Ge+e)/2,Vr+=i,i=Ge*t-Fe*e,sf+=i*(Fe+t),uf+=i*(Ge+e),oo+=i*3,Qn(Fe=t,Ge=e)}function zm(t){this._context=t}zm.prototype={_radius:4.5,pointRadius:function(t){return this._radius=t,this},polygonStart:function(){this._line=0},polygonEnd:function(){this._line=NaN},lineStart:function(){this._point=0},lineEnd:function(){this._line===0&&this._context.closePath(),this._point=NaN},point:function(t,e){switch(this._point){case 0:{this._context.moveTo(t,e),this._point=1;break}case 1:{this._context.lineTo(t,e);break}default:{this._context.moveTo(t+this._radius,e),this._context.arc(t,e,this._radius,0,Xt);break}}},result:wt};var cf=new Dt,lf,Om,Um,ao,so,uo={point:wt,lineStart:function(){uo.point=wT},lineEnd:function(){lf&&Bm(Om,Um),uo.point=wt},polygonStart:function(){lf=!0},polygonEnd:function(){lf=null},result:function(){var t=+cf;return cf=new Dt,t}};function wT(t,e){uo.point=Bm,Om=ao=t,Um=so=e}function Bm(t,e){ao-=t,so-=e,cf.add(Ct(ao*ao+so*so)),ao=t,so=e}let Ym,Gs,Wm,Hm;class qm{constructor(e){this._append=e==null?Xm:$T(e),this._radius=4.5,this._=""}pointRadius(e){return this._radius=+e,this}polygonStart(){this._line=0}polygonEnd(){this._line=NaN}lineStart(){this._point=0}lineEnd(){this._line===0&&(this._+="Z"),this._point=NaN}point(e,n){switch(this._point){case 0:{this._append`M${e},${n}`,this._point=1;break}case 1:{this._append`L${e},${n}`;break}default:{if(this._append`M${e},${n}`,this._radius!==Wm||this._append!==Gs){const r=this._radius,i=this._;this._="",this._append`m0,${r}a${r},${r} 0 1,1 0,${-2*r}a${r},${r} 0 1,1 0,${2*r}z`,Wm=r,Gs=this._append,Hm=this._,this._=i}this._+=Hm;break}}}result(){const e=this._;return this._="",e.length?e:null}}function Xm(t){let e=1;this._+=t[0];for(const n=t.length;e<n;++e)this._+=arguments[e]+t[e]}function $T(t){const e=Math.floor(t);if(!(e>=0))throw new RangeError(`invalid digits: ${t}`);if(e>15)return Xm;if(e!==Ym){const n=10**e;Ym=e,Gs=function(i){let o=1;this._+=i[0];for(const a=i.length;o<a;++o)this._+=Math.round(arguments[o]*n)/n+i[o]}}return Gs}function ST(t,e){let n=3,r=4.5,i,o;function a(s){return s&&(typeof r=="function"&&o.pointRadius(+r.apply(this,arguments)),Pe(s,i(o))),o.result()}return a.area=function(s){return Pe(s,i(tn)),tn.result()},a.measure=function(s){return Pe(s,i(uo)),uo.result()},a.bounds=function(s){return Pe(s,i(Is)),Is.result()},a.centroid=function(s){return Pe(s,i(de)),de.result()},a.projection=function(s){return arguments.length?(i=s==null?(t=null,no):(t=s).stream,a):t},a.context=function(s){return arguments.length?(o=s==null?(e=null,new qm(n)):new zm(e=s),typeof r!="function"&&o.pointRadius(r),a):e},a.pointRadius=function(s){return arguments.length?(r=typeof s=="function"?s:(o.pointRadius(+s),+s),a):r},a.digits=function(s){if(!arguments.length)return n;if(s==null)n=null;else{const u=Math.floor(s);if(!(u>=0))throw new RangeError(`invalid digits: ${s}`);n=u}return e===null&&(o=new qm(n)),a},a.projection(t).digits(n).context(e)}function AT(t){return{stream:co(t)}}function co(t){return function(e){var n=new ff;for(var r in t)n[r]=t[r];return n.stream=e,n}}function ff(){}ff.prototype={constructor:ff,point:function(t,e){this.stream.point(t,e)},sphere:function(){this.stream.sphere()},lineStart:function(){this.stream.lineStart()},lineEnd:function(){this.stream.lineEnd()},polygonStart:function(){this.stream.polygonStart()},polygonEnd:function(){this.stream.polygonEnd()}};function hf(t,e,n){var r=t.clipExtent&&t.clipExtent();return t.scale(150).translate([0,0]),r!=null&&t.clipExtent(null),Pe(n,t.stream(Is)),e(Is.result()),r!=null&&t.clipExtent(r),t}function zs(t,e,n){return hf(t,function(r){var i=e[1][0]-e[0][0],o=e[1][1]-e[0][1],a=Math.min(i/(r[1][0]-r[0][0]),o/(r[1][1]-r[0][1])),s=+e[0][0]+(i-a*(r[1][0]+r[0][0]))/2,u=+e[0][1]+(o-a*(r[1][1]+r[0][1]))/2;t.scale(150*a).translate([s,u])},n)}function df(t,e,n){return zs(t,[[0,0],e],n)}function pf(t,e,n){return hf(t,function(r){var i=+e,o=i/(r[1][0]-r[0][0]),a=(i-o*(r[1][0]+r[0][0]))/2,s=-o*r[0][1];t.scale(150*o).translate([a,s])},n)}function gf(t,e,n){return hf(t,function(r){var i=+e,o=i/(r[1][1]-r[0][1]),a=-o*r[0][0],s=(i-o*(r[1][1]+r[0][1]))/2;t.scale(150*o).translate([a,s])},n)}var Vm=16,MT=K(30*et);function jm(t,e){return+e?PT(t,e):TT(t)}function TT(t){return co({point:function(e,n){e=t(e,n),this.stream.point(e[0],e[1])}})}function PT(t,e){function n(r,i,o,a,s,u,c,l,h,f,d,p,g,m){var y=c-r,x=l-i,v=y*y+x*x;if(v>4*e&&g--){var b=a+f,$=s+d,w=u+p,S=Ct(b*b+$*$+w*w),_=jt(w/=S),P=ft(ft(w)-1)<tt||ft(o-h)<tt?(o+h)/2:Vt($,b),D=t(P,_),A=D[0],I=D[1],M=A-r,T=I-i,k=x*M-y*T;(k*k/v>e||ft((y*M+x*T)/v-.5)>.3||a*f+s*d+u*p<MT)&&(n(r,i,o,a,s,u,A,I,P,b/=S,$/=S,w,g,m),m.point(A,I),n(A,I,P,b,$,w,c,l,h,f,d,p,g,m))}}return function(r){var i,o,a,s,u,c,l,h,f,d,p,g,m={point:y,lineStart:x,lineEnd:b,polygonStart:function(){r.polygonStart(),m.lineStart=$},polygonEnd:function(){r.polygonEnd(),m.lineStart=x}};function y(_,P){_=t(_,P),r.point(_[0],_[1])}function x(){h=NaN,m.point=v,r.lineStart()}function v(_,P){var D=Zn([_,P]),A=t(_,P);n(h,f,l,d,p,g,h=A[0],f=A[1],l=_,d=D[0],p=D[1],g=D[2],Vm,r),r.point(h,f)}function b(){m.point=y,r.lineEnd()}function $(){x(),m.point=w,m.lineEnd=S}function w(_,P){v(i=_,P),o=h,a=f,s=d,u=p,c=g,m.point=v}function S(){n(h,f,l,d,p,g,o,a,i,s,u,c,Vm,r),m.lineEnd=b,b()}return m}}var DT=co({point:function(t,e){this.stream.point(t*et,e*et)}});function ET(t){return co({point:function(e,n){var r=t(e,n);return this.stream.point(r[0],r[1])}})}function kT(t,e,n,r,i){function o(a,s){return a*=r,s*=i,[e+t*a,n-t*s]}return o.invert=function(a,s){return[(a-e)/t*r,(n-s)/t*i]},o}function Zm(t,e,n,r,i,o){if(!o)return kT(t,e,n,r,i);var a=K(o),s=j(o),u=a*t,c=s*t,l=a/t,h=s/t,f=(s*n-a*e)/t,d=(s*e+a*n)/t;function p(g,m){return g*=r,m*=i,[u*g-c*m+e,n-c*g-u*m]}return p.invert=function(g,m){return[r*(l*g-h*m+f),i*(d-h*g-l*m)]},p}function ze(t){return mf(function(){return t})()}function mf(t){var e,n=150,r=480,i=250,o=0,a=0,s=0,u=0,c=0,l,h=0,f=1,d=1,p=null,g=Zl,m=null,y,x,v,b=no,$=.5,w,S,_,P,D;function A(k){return _(k[0]*et,k[1]*et)}function I(k){return k=_.invert(k[0],k[1]),k&&[k[0]*yt,k[1]*yt]}A.stream=function(k){return P&&D===k?P:P=DT(ET(l)(g(w(b(D=k)))))},A.preclip=function(k){return arguments.length?(g=k,p=void 0,T()):g},A.postclip=function(k){return arguments.length?(b=k,m=y=x=v=null,T()):b},A.clipAngle=function(k){return arguments.length?(g=+k?xm(p=k*et):(p=null,Zl),T()):p*yt},A.clipExtent=function(k){return arguments.length?(b=k==null?(m=y=x=v=null,no):Ps(m=+k[0][0],y=+k[0][1],x=+k[1][0],v=+k[1][1]),T()):m==null?null:[[m,y],[x,v]]},A.scale=function(k){return arguments.length?(n=+k,M()):n},A.translate=function(k){return arguments.length?(r=+k[0],i=+k[1],M()):[r,i]},A.center=function(k){return arguments.length?(o=k[0]%360*et,a=k[1]%360*et,M()):[o*yt,a*yt]},A.rotate=function(k){return arguments.length?(s=k[0]%360*et,u=k[1]%360*et,c=k.length>2?k[2]%360*et:0,M()):[s*yt,u*yt,c*yt]},A.angle=function(k){return arguments.length?(h=k%360*et,M()):h*yt},A.reflectX=function(k){return arguments.length?(f=k?-1:1,M()):f<0},A.reflectY=function(k){return arguments.length?(d=k?-1:1,M()):d<0},A.precision=function(k){return arguments.length?(w=jm(S,$=k*k),T()):Ct($)},A.fitExtent=function(k,E){return zs(A,k,E)},A.fitSize=function(k,E){return df(A,k,E)},A.fitWidth=function(k,E){return pf(A,k,E)},A.fitHeight=function(k,E){return gf(A,k,E)};function M(){var k=Zm(n,0,0,f,d,h).apply(null,e(o,a)),E=Zm(n,r-k[0],i-k[1],f,d,h);return l=Vl(s,u,c),S=ql(e,E),_=ql(l,S),w=jm(S,$),T()}function T(){return P=D=null,A}return function(){return e=t.apply(this,arguments),A.invert=e.invert&&I,M()}}function yf(t){var e=0,n=ct/3,r=mf(t),i=r(e,n);return i.parallels=function(o){return arguments.length?r(e=o[0]*et,n=o[1]*et):[e*yt,n*yt]},i}function LT(t){var e=K(t);function n(r,i){return[r*e,j(i)/e]}return n.invert=function(r,i){return[r/e,jt(i*e)]},n}function Km(t,e){var n=j(t),r=(n+j(e))/2;if(ft(r)<tt)return LT(t);var i=1+n*(2*r-n),o=Ct(i)/r;function a(s,u){var c=Ct(i-2*r*j(u))/r;return[c*j(s*=r),o-c*K(s)]}return a.invert=function(s,u){var c=o-u,l=Vt(s,ft(c))*he(c);return c*r<0&&(l-=ct*he(s)*he(c)),[l/r,jt((i-(s*s+c*c)*r*r)/(2*r))]},a}function Os(){return yf(Km).scale(155.424).center([0,33.6442])}function Qm(){return Os().parallels([29.5,45.5]).scale(1070).translate([480,250]).rotate([96,0]).center([-.6,38.7])}function CT(t){var e=t.length;return{point:function(n,r){for(var i=-1;++i<e;)t[i].point(n,r)},sphere:function(){for(var n=-1;++n<e;)t[n].sphere()},lineStart:function(){for(var n=-1;++n<e;)t[n].lineStart()},lineEnd:function(){for(var n=-1;++n<e;)t[n].lineEnd()},polygonStart:function(){for(var n=-1;++n<e;)t[n].polygonStart()},polygonEnd:function(){for(var n=-1;++n<e;)t[n].polygonEnd()}}}function RT(){var t,e,n=Qm(),r,i=Os().rotate([154,0]).center([-2,58.5]).parallels([55,65]),o,a=Os().rotate([157,0]).center([-3,19.9]).parallels([8,18]),s,u,c={point:function(f,d){u=[f,d]}};function l(f){var d=f[0],p=f[1];return u=null,r.point(d,p),u||(o.point(d,p),u)||(s.point(d,p),u)}l.invert=function(f){var d=n.scale(),p=n.translate(),g=(f[0]-p[0])/d,m=(f[1]-p[1])/d;return(m>=.12&&m<.234&&g>=-.425&&g<-.214?i:m>=.166&&m<.234&&g>=-.214&&g<-.115?a:n).invert(f)},l.stream=function(f){return t&&e===f?t:t=CT([n.stream(e=f),i.stream(f),a.stream(f)])},l.precision=function(f){return arguments.length?(n.precision(f),i.precision(f),a.precision(f),h()):n.precision()},l.scale=function(f){return arguments.length?(n.scale(f),i.scale(f*.35),a.scale(f),l.translate(n.translate())):n.scale()},l.translate=function(f){if(!arguments.length)return n.translate();var d=n.scale(),p=+f[0],g=+f[1];return r=n.translate(f).clipExtent([[p-.455*d,g-.238*d],[p+.455*d,g+.238*d]]).stream(c),o=i.translate([p-.307*d,g+.201*d]).clipExtent([[p-.425*d+tt,g+.12*d+tt],[p-.214*d-tt,g+.234*d-tt]]).stream(c),s=a.translate([p-.205*d,g+.212*d]).clipExtent([[p-.214*d+tt,g+.166*d+tt],[p-.115*d-tt,g+.234*d-tt]]).stream(c),h()},l.fitExtent=function(f,d){return zs(l,f,d)},l.fitSize=function(f,d){return df(l,f,d)},l.fitWidth=function(f,d){return pf(l,f,d)},l.fitHeight=function(f,d){return gf(l,f,d)};function h(){return t=e=null,l}return l.scale(1070)}function Jm(t){return function(e,n){var r=K(e),i=K(n),o=t(r*i);return o===1/0?[2,0]:[o*i*j(e),o*j(n)]}}function lo(t){return function(e,n){var r=Ct(e*e+n*n),i=t(r),o=j(i),a=K(i);return[Vt(e*o,r*a),jt(r&&n*o/r)]}}var bf=Jm(function(t){return Ct(2/(1+t))});bf.invert=lo(function(t){return 2*jt(t/2)});function IT(){return ze(bf).scale(124.75).clipAngle(180-.001)}var vf=Jm(function(t){return(t=Y1(t))&&t/j(t)});vf.invert=lo(function(t){return t});function NT(){return ze(vf).scale(79.4188).clipAngle(180-.001)}function fo(t,e){return[t,ls(Il((St+e)/2))]}fo.invert=function(t,e){return[t,2*Br(B1(e))-St]};function FT(){return ty(fo).scale(961/Xt)}function ty(t){var e=ze(t),n=e.center,r=e.scale,i=e.translate,o=e.clipExtent,a=null,s,u,c;e.scale=function(h){return arguments.length?(r(h),l()):r()},e.translate=function(h){return arguments.length?(i(h),l()):i()},e.center=function(h){return arguments.length?(n(h),l()):n()},e.clipExtent=function(h){return arguments.length?(h==null?a=s=u=c=null:(a=+h[0][0],s=+h[0][1],u=+h[1][0],c=+h[1][1]),l()):a==null?null:[[a,s],[u,c]]};function l(){var h=ct*r(),f=e(hm(e.rotate()).invert([0,0]));return o(a==null?[[f[0]-h,f[1]-h],[f[0]+h,f[1]+h]]:t===fo?[[Math.max(f[0]-h,a),s],[Math.min(f[0]+h,u),c]]:[[a,Math.max(f[1]-h,s)],[u,Math.min(f[1]+h,c)]])}return l()}function Us(t){return Il((St+t)/2)}function ey(t,e){var n=K(t),r=t===e?j(t):ls(n/K(e))/ls(Us(e)/Us(t)),i=n*Rl(Us(t),r)/r;if(!r)return fo;function o(a,s){i>0?s<-St+tt&&(s=-St+tt):s>St-tt&&(s=St-tt);var u=i/Rl(Us(s),r);return[u*j(r*a),i-u*K(r*a)]}return o.invert=function(a,s){var u=i-s,c=he(r)*Ct(a*a+u*u),l=Vt(a,ft(u))*he(u);return u*r<0&&(l-=ct*he(a)*he(u)),[l/r,2*Br(Rl(i/c,1/r))-St]},o}function GT(){return yf(ey).scale(109.5).parallels([30,30])}function ho(t,e){return[t,e]}ho.invert=ho;function zT(){return ze(ho).scale(152.63)}function ny(t,e){var n=K(t),r=t===e?j(t):(n-K(e))/(e-t),i=n/r+t;if(ft(r)<tt)return ho;function o(a,s){var u=i-s,c=r*a;return[u*j(c),i-u*K(c)]}return o.invert=function(a,s){var u=i-s,c=Vt(a,ft(u))*he(u);return u*r<0&&(c-=ct*he(a)*he(u)),[c/r,i-he(r)*Ct(a*a+u*u)]},o}function OT(){return yf(ny).scale(131.154).center([0,13.9389])}var po=1.340264,go=-.081106,mo=893e-6,yo=.003796,Bs=Ct(3)/2,UT=12;function xf(t,e){var n=jt(Bs*j(e)),r=n*n,i=r*r*r;return[t*K(n)/(Bs*(po+3*go*r+i*(7*mo+9*yo*r))),n*(po+go*r+i*(mo+yo*r))]}xf.invert=function(t,e){for(var n=e,r=n*n,i=r*r*r,o=0,a,s,u;o<UT&&(s=n*(po+go*r+i*(mo+yo*r))-e,u=po+3*go*r+i*(7*mo+9*yo*r),n-=a=s/u,r=n*n,i=r*r*r,!(ft(a)<Ki));++o);return[Bs*t*(po+3*go*r+i*(7*mo+9*yo*r))/K(n),jt(j(n)/Bs)]};function BT(){return ze(xf).scale(177.158)}function _f(t,e){var n=K(e),r=K(t)*n;return[n*j(t)/r,j(e)/r]}_f.invert=lo(Br);function YT(){return ze(_f).scale(144.049).clipAngle(60)}function WT(){var t=1,e=0,n=0,r=1,i=1,o=0,a,s,u=null,c,l,h,f=1,d=1,p=co({point:function(b,$){var w=v([b,$]);this.stream.point(w[0],w[1])}}),g=no,m,y;function x(){return f=t*r,d=t*i,m=y=null,v}function v(b){var $=b[0]*f,w=b[1]*d;if(o){var S=w*a-$*s;$=$*a+w*s,w=S}return[$+e,w+n]}return v.invert=function(b){var $=b[0]-e,w=b[1]-n;if(o){var S=w*a+$*s;$=$*a-w*s,w=S}return[$/f,w/d]},v.stream=function(b){return m&&y===b?m:m=p(g(y=b))},v.postclip=function(b){return arguments.length?(g=b,u=c=l=h=null,x()):g},v.clipExtent=function(b){return arguments.length?(g=b==null?(u=c=l=h=null,no):Ps(u=+b[0][0],c=+b[0][1],l=+b[1][0],h=+b[1][1]),x()):u==null?null:[[u,c],[l,h]]},v.scale=function(b){return arguments.length?(t=+b,x()):t},v.translate=function(b){return arguments.length?(e=+b[0],n=+b[1],x()):[e,n]},v.angle=function(b){return arguments.length?(o=b%360*et,s=j(o),a=K(o),x()):o*yt},v.reflectX=function(b){return arguments.length?(r=b?-1:1,x()):r<0},v.reflectY=function(b){return arguments.length?(i=b?-1:1,x()):i<0},v.fitExtent=function(b,$){return zs(v,b,$)},v.fitSize=function(b,$){return df(v,b,$)},v.fitWidth=function(b,$){return pf(v,b,$)},v.fitHeight=function(b,$){return gf(v,b,$)},v}function wf(t,e){var n=e*e,r=n*n;return[t*(.8707-.131979*n+r*(-.013791+r*(.003971*n-.001529*r))),e*(1.007226+n*(.015085+r*(-.044475+.028874*n-.005916*r)))]}wf.invert=function(t,e){var n=e,r=25,i;do{var o=n*n,a=o*o;n-=i=(n*(1.007226+o*(.015085+a*(-.044475+.028874*o-.005916*a)))-e)/(1.007226+o*(.015085*3+a*(-.044475*7+.028874*9*o-.005916*11*a)))}while(ft(i)>tt&&--r>0);return[t/(.8707+(o=n*n)*(-.131979+o*(-.013791+o*o*o*(.003971-.001529*o)))),n]};function HT(){return ze(wf).scale(175.295)}function $f(t,e){return[K(e)*j(t),j(e)]}$f.invert=lo(jt);function qT(){return ze($f).scale(249.5).clipAngle(90+tt)}function Sf(t,e){var n=K(e),r=1+K(t)*n;return[n*j(t)/r,j(e)/r]}Sf.invert=lo(function(t){return 2*Br(t)});function XT(){return ze(Sf).scale(250).clipAngle(142)}function Af(t,e){return[ls(Il((St+e)/2)),-t]}Af.invert=function(t,e){return[-e,2*Br(B1(t))-St]};function VT(){var t=ty(Af),e=t.center,n=t.rotate;return t.center=function(r){return arguments.length?e([-r[1],r[0]]):(r=e(),[r[1],-r[0]])},t.rotate=function(r){return arguments.length?n([r[0],r[1],r.length>2?r[2]+90:90]):(r=n(),[r[0],r[1],r[2]-90])},n([0,0,90]).scale(159.155)}function jT(t,e){return t.parent===e.parent?1:2}function ZT(t){return t.reduce(KT,0)/t.length}function KT(t,e){return t+e.x}function QT(t){return 1+t.reduce(JT,0)}function JT(t,e){return Math.max(t,e.y)}function tP(t){for(var e;e=t.children;)t=e[0];return t}function eP(t){for(var e;e=t.children;)t=e[e.length-1];return t}function nP(){var t=jT,e=1,n=1,r=!1;function i(o){var a,s=0;o.eachAfter(function(f){var d=f.children;d?(f.x=ZT(d),f.y=QT(d)):(f.x=a?s+=t(f,a):0,f.y=0,a=f)});var u=tP(o),c=eP(o),l=u.x-t(u,c)/2,h=c.x+t(c,u)/2;return o.eachAfter(r?function(f){f.x=(f.x-o.x)*e,f.y=(o.y-f.y)*n}:function(f){f.x=(f.x-l)/(h-l)*e,f.y=(1-(o.y?f.y/o.y:1))*n})}return i.separation=function(o){return arguments.length?(t=o,i):t},i.size=function(o){return arguments.length?(r=!1,e=+o[0],n=+o[1],i):r?null:[e,n]},i.nodeSize=function(o){return arguments.length?(r=!0,e=+o[0],n=+o[1],i):r?[e,n]:null},i}function rP(t){var e=0,n=t.children,r=n&&n.length;if(!r)e=1;else for(;--r>=0;)e+=n[r].value;t.value=e}function iP(){return this.eachAfter(rP)}function oP(t,e){let n=-1;for(const r of this)t.call(e,r,++n,this);return this}function aP(t,e){for(var n=this,r=[n],i,o,a=-1;n=r.pop();)if(t.call(e,n,++a,this),i=n.children)for(o=i.length-1;o>=0;--o)r.push(i[o]);return this}function sP(t,e){for(var n=this,r=[n],i=[],o,a,s,u=-1;n=r.pop();)if(i.push(n),o=n.children)for(a=0,s=o.length;a<s;++a)r.push(o[a]);for(;n=i.pop();)t.call(e,n,++u,this);return this}function uP(t,e){let n=-1;for(const r of this)if(t.call(e,r,++n,this))return r}function cP(t){return this.eachAfter(function(e){for(var n=+t(e.data)||0,r=e.children,i=r&&r.length;--i>=0;)n+=r[i].value;e.value=n})}function lP(t){return this.eachBefore(function(e){e.children&&e.children.sort(t)})}function fP(t){for(var e=this,n=hP(e,t),r=[e];e!==n;)e=e.parent,r.push(e);for(var i=r.length;t!==n;)r.splice(i,0,t),t=t.parent;return r}function hP(t,e){if(t===e)return t;var n=t.ancestors(),r=e.ancestors(),i=null;for(t=n.pop(),e=r.pop();t===e;)i=t,t=n.pop(),e=r.pop();return i}function dP(){for(var t=this,e=[t];t=t.parent;)e.push(t);return e}function pP(){return Array.from(this)}function gP(){var t=[];return this.eachBefore(function(e){e.children||t.push(e)}),t}function mP(){var t=this,e=[];return t.each(function(n){n!==t&&e.push({source:n.parent,target:n})}),e}function*yP(){var t=this,e,n=[t],r,i,o;do for(e=n.reverse(),n=[];t=e.pop();)if(yield t,r=t.children)for(i=0,o=r.length;i<o;++i)n.push(r[i]);while(n.length)}function Mf(t,e){t instanceof Map?(t=[void 0,t],e===void 0&&(e=xP)):e===void 0&&(e=vP);for(var n=new Jn(t),r,i=[n],o,a,s,u;r=i.pop();)if((a=e(r.data))&&(u=(a=Array.from(a)).length))for(r.children=a,s=u-1;s>=0;--s)i.push(o=a[s]=new Jn(a[s])),o.parent=r,o.depth=r.depth+1;return n.eachBefore(ry)}function bP(){return Mf(this).eachBefore(_P)}function vP(t){return t.children}function xP(t){return Array.isArray(t)?t[1]:null}function _P(t){t.data.value!==void 0&&(t.value=t.data.value),t.data=t.data.data}function ry(t){var e=0;do t.height=e;while((t=t.parent)&&t.height<++e)}function Jn(t){this.data=t,this.depth=this.height=0,this.parent=null}Jn.prototype=Mf.prototype={constructor:Jn,count:iP,each:oP,eachAfter:sP,eachBefore:aP,find:uP,sum:cP,sort:lP,path:fP,ancestors:dP,descendants:pP,leaves:gP,links:mP,copy:bP,[Symbol.iterator]:yP};function Ys(t){return t==null?null:iy(t)}function iy(t){if(typeof t!="function")throw new Error;return t}function tr(){return 0}function jr(t){return function(){return t}}const wP=1664525,$P=1013904223,oy=4294967296;function Tf(){let t=1;return()=>(t=(wP*t+$P)%oy)/oy}function SP(t){return typeof t=="object"&&"length"in t?t:Array.from(t)}function AP(t,e){let n=t.length,r,i;for(;n;)i=e()*n--|0,r=t[n],t[n]=t[i],t[i]=r;return t}function MP(t){return ay(t,Tf())}function ay(t,e){for(var n=0,r=(t=AP(Array.from(t),e)).length,i=[],o,a;n<r;)o=t[n],a&&sy(a,o)?++n:(a=PP(i=TP(i,o)),n=0);return a}function TP(t,e){var n,r;if(Pf(e,t))return[e];for(n=0;n<t.length;++n)if(Ws(e,t[n])&&Pf(bo(t[n],e),t))return[t[n],e];for(n=0;n<t.length-1;++n)for(r=n+1;r<t.length;++r)if(Ws(bo(t[n],t[r]),e)&&Ws(bo(t[n],e),t[r])&&Ws(bo(t[r],e),t[n])&&Pf(uy(t[n],t[r],e),t))return[t[n],t[r],e];throw new Error}function Ws(t,e){var n=t.r-e.r,r=e.x-t.x,i=e.y-t.y;return n<0||n*n<r*r+i*i}function sy(t,e){var n=t.r-e.r+Math.max(t.r,e.r,1)*1e-9,r=e.x-t.x,i=e.y-t.y;return n>0&&n*n>r*r+i*i}function Pf(t,e){for(var n=0;n<e.length;++n)if(!sy(t,e[n]))return!1;return!0}function PP(t){switch(t.length){case 1:return DP(t[0]);case 2:return bo(t[0],t[1]);case 3:return uy(t[0],t[1],t[2])}}function DP(t){return{x:t.x,y:t.y,r:t.r}}function bo(t,e){var n=t.x,r=t.y,i=t.r,o=e.x,a=e.y,s=e.r,u=o-n,c=a-r,l=s-i,h=Math.sqrt(u*u+c*c);return{x:(n+o+u/h*l)/2,y:(r+a+c/h*l)/2,r:(h+i+s)/2}}function uy(t,e,n){var r=t.x,i=t.y,o=t.r,a=e.x,s=e.y,u=e.r,c=n.x,l=n.y,h=n.r,f=r-a,d=r-c,p=i-s,g=i-l,m=u-o,y=h-o,x=r*r+i*i-o*o,v=x-a*a-s*s+u*u,b=x-c*c-l*l+h*h,$=d*p-f*g,w=(p*b-g*v)/($*2)-r,S=(g*m-p*y)/$,_=(d*v-f*b)/($*2)-i,P=(f*y-d*m)/$,D=S*S+P*P-1,A=2*(o+w*S+_*P),I=w*w+_*_-o*o,M=-(Math.abs(D)>1e-6?(A+Math.sqrt(A*A-4*D*I))/(2*D):I/A);return{x:r+w+S*M,y:i+_+P*M,r:M}}function cy(t,e,n){var r=t.x-e.x,i,o,a=t.y-e.y,s,u,c=r*r+a*a;c?(o=e.r+n.r,o*=o,u=t.r+n.r,u*=u,o>u?(i=(c+u-o)/(2*c),s=Math.sqrt(Math.max(0,u/c-i*i)),n.x=t.x-i*r-s*a,n.y=t.y-i*a+s*r):(i=(c+o-u)/(2*c),s=Math.sqrt(Math.max(0,o/c-i*i)),n.x=e.x+i*r-s*a,n.y=e.y+i*a+s*r)):(n.x=e.x+n.r,n.y=e.y)}function ly(t,e){var n=t.r+e.r-1e-6,r=e.x-t.x,i=e.y-t.y;return n>0&&n*n>r*r+i*i}function fy(t){var e=t._,n=t.next._,r=e.r+n.r,i=(e.x*n.r+n.x*e.r)/r,o=(e.y*n.r+n.y*e.r)/r;return i*i+o*o}function Hs(t){this._=t,this.next=null,this.previous=null}function hy(t,e){if(!(o=(t=SP(t)).length))return 0;var n,r,i,o,a,s,u,c,l,h,f;if(n=t[0],n.x=0,n.y=0,!(o>1))return n.r;if(r=t[1],n.x=-r.r,r.x=n.r,r.y=0,!(o>2))return n.r+r.r;cy(r,n,i=t[2]),n=new Hs(n),r=new Hs(r),i=new Hs(i),n.next=i.previous=r,r.next=n.previous=i,i.next=r.previous=n;t:for(u=3;u<o;++u){cy(n._,r._,i=t[u]),i=new Hs(i),c=r.next,l=n.previous,h=r._.r,f=n._.r;do if(h<=f){if(ly(c._,i._)){r=c,n.next=r,r.previous=n,--u;continue t}h+=c._.r,c=c.next}else{if(ly(l._,i._)){n=l,n.next=r,r.previous=n,--u;continue t}f+=l._.r,l=l.previous}while(c!==l.next);for(i.previous=n,i.next=r,n.next=r.previous=r=i,a=fy(n);(i=i.next)!==r;)(s=fy(i))<a&&(n=i,a=s);r=n.next}for(n=[r._],i=r;(i=i.next)!==r;)n.push(i._);for(i=ay(n,e),u=0;u<o;++u)n=t[u],n.x-=i.x,n.y-=i.y;return i.r}function EP(t){return hy(t,Tf()),t}function kP(t){return Math.sqrt(t.value)}function LP(){var t=null,e=1,n=1,r=tr;function i(o){const a=Tf();return o.x=e/2,o.y=n/2,t?o.eachBefore(dy(t)).eachAfter(Df(r,.5,a)).eachBefore(py(1)):o.eachBefore(dy(kP)).eachAfter(Df(tr,1,a)).eachAfter(Df(r,o.r/Math.min(e,n),a)).eachBefore(py(Math.min(e,n)/(2*o.r))),o}return i.radius=function(o){return arguments.length?(t=Ys(o),i):t},i.size=function(o){return arguments.length?(e=+o[0],n=+o[1],i):[e,n]},i.padding=function(o){return arguments.length?(r=typeof o=="function"?o:jr(+o),i):r},i}function dy(t){return function(e){e.children||(e.r=Math.max(0,+t(e)||0))}}function Df(t,e,n){return function(r){if(i=r.children){var i,o,a=i.length,s=t(r)*e||0,u;if(s)for(o=0;o<a;++o)i[o].r+=s;if(u=hy(i,n),s)for(o=0;o<a;++o)i[o].r-=s;r.r=u+s}}}function py(t){return function(e){var n=e.parent;e.r*=t,n&&(e.x=n.x+t*e.x,e.y=n.y+t*e.y)}}function gy(t){t.x0=Math.round(t.x0),t.y0=Math.round(t.y0),t.x1=Math.round(t.x1),t.y1=Math.round(t.y1)}function vo(t,e,n,r,i){for(var o=t.children,a,s=-1,u=o.length,c=t.value&&(r-e)/t.value;++s<u;)a=o[s],a.y0=n,a.y1=i,a.x0=e,a.x1=e+=a.value*c}function CP(){var t=1,e=1,n=0,r=!1;function i(a){var s=a.height+1;return a.x0=a.y0=n,a.x1=t,a.y1=e/s,a.eachBefore(o(e,s)),r&&a.eachBefore(gy),a}function o(a,s){return function(u){u.children&&vo(u,u.x0,a*(u.depth+1)/s,u.x1,a*(u.depth+2)/s);var c=u.x0,l=u.y0,h=u.x1-n,f=u.y1-n;h<c&&(c=h=(c+h)/2),f<l&&(l=f=(l+f)/2),u.x0=c,u.y0=l,u.x1=h,u.y1=f}}return i.round=function(a){return arguments.length?(r=!!a,i):r},i.size=function(a){return arguments.length?(t=+a[0],e=+a[1],i):[t,e]},i.padding=function(a){return arguments.length?(n=+a,i):n},i}var RP={depth:-1},my={},Ef={};function IP(t){return t.id}function NP(t){return t.parentId}function FP(){var t=IP,e=NP,n;function r(i){var o=Array.from(i),a=t,s=e,u,c,l,h,f,d,p,g,m=new Map;if(n!=null){const y=o.map((b,$)=>GP(n(b,$,i))),x=y.map(yy),v=new Set(y).add("");for(const b of x)v.has(b)||(v.add(b),y.push(b),x.push(yy(b)),o.push(Ef));a=(b,$)=>y[$],s=(b,$)=>x[$]}for(l=0,u=o.length;l<u;++l)c=o[l],d=o[l]=new Jn(c),(p=a(c,l,i))!=null&&(p+="")&&(g=d.id=p,m.set(g,m.has(g)?my:d)),(p=s(c,l,i))!=null&&(p+="")&&(d.parent=p);for(l=0;l<u;++l)if(d=o[l],p=d.parent){if(f=m.get(p),!f)throw new Error("missing: "+p);if(f===my)throw new Error("ambiguous: "+p);f.children?f.children.push(d):f.children=[d],d.parent=f}else{if(h)throw new Error("multiple roots");h=d}if(!h)throw new Error("no root");if(n!=null){for(;h.data===Ef&&h.children.length===1;)h=h.children[0],--u;for(let y=o.length-1;y>=0&&(d=o[y],d.data===Ef);--y)d.data=null}if(h.parent=RP,h.eachBefore(function(y){y.depth=y.parent.depth+1,--u}).eachBefore(ry),h.parent=null,u>0)throw new Error("cycle");return h}return r.id=function(i){return arguments.length?(t=Ys(i),r):t},r.parentId=function(i){return arguments.length?(e=Ys(i),r):e},r.path=function(i){return arguments.length?(n=Ys(i),r):n},r}function GP(t){t=`${t}`;let e=t.length;return kf(t,e-1)&&!kf(t,e-2)&&(t=t.slice(0,-1)),t[0]==="/"?t:`/${t}`}function yy(t){let e=t.length;if(e<2)return"";for(;--e>1&&!kf(t,e););return t.slice(0,e)}function kf(t,e){if(t[e]==="/"){let n=0;for(;e>0&&t[--e]==="\\";)++n;if(!(n&1))return!0}return!1}function zP(t,e){return t.parent===e.parent?1:2}function Lf(t){var e=t.children;return e?e[0]:t.t}function Cf(t){var e=t.children;return e?e[e.length-1]:t.t}function OP(t,e,n){var r=n/(e.i-t.i);e.c-=r,e.s+=n,t.c+=r,e.z+=n,e.m+=n}function UP(t){for(var e=0,n=0,r=t.children,i=r.length,o;--i>=0;)o=r[i],o.z+=e,o.m+=e,e+=o.s+(n+=o.c)}function BP(t,e,n){return t.a.parent===e.parent?t.a:n}function qs(t,e){this._=t,this.parent=null,this.children=null,this.A=null,this.a=this,this.z=0,this.m=0,this.c=0,this.s=0,this.t=null,this.i=e}qs.prototype=Object.create(Jn.prototype);function YP(t){for(var e=new qs(t,0),n,r=[e],i,o,a,s;n=r.pop();)if(o=n._.children)for(n.children=new Array(s=o.length),a=s-1;a>=0;--a)r.push(i=n.children[a]=new qs(o[a],a)),i.parent=n;return(e.parent=new qs(null,0)).children=[e],e}function WP(){var t=zP,e=1,n=1,r=null;function i(c){var l=YP(c);if(l.eachAfter(o),l.parent.m=-l.z,l.eachBefore(a),r)c.eachBefore(u);else{var h=c,f=c,d=c;c.eachBefore(function(x){x.x<h.x&&(h=x),x.x>f.x&&(f=x),x.depth>d.depth&&(d=x)});var p=h===f?1:t(h,f)/2,g=p-h.x,m=e/(f.x+p+g),y=n/(d.depth||1);c.eachBefore(function(x){x.x=(x.x+g)*m,x.y=x.depth*y})}return c}function o(c){var l=c.children,h=c.parent.children,f=c.i?h[c.i-1]:null;if(l){UP(c);var d=(l[0].z+l[l.length-1].z)/2;f?(c.z=f.z+t(c._,f._),c.m=c.z-d):c.z=d}else f&&(c.z=f.z+t(c._,f._));c.parent.A=s(c,f,c.parent.A||h[0])}function a(c){c._.x=c.z+c.parent.m,c.m+=c.parent.m}function s(c,l,h){if(l){for(var f=c,d=c,p=l,g=f.parent.children[0],m=f.m,y=d.m,x=p.m,v=g.m,b;p=Cf(p),f=Lf(f),p&&f;)g=Lf(g),d=Cf(d),d.a=c,b=p.z+x-f.z-m+t(p._,f._),b>0&&(OP(BP(p,c,h),c,b),m+=b,y+=b),x+=p.m,m+=f.m,v+=g.m,y+=d.m;p&&!Cf(d)&&(d.t=p,d.m+=x-y),f&&!Lf(g)&&(g.t=f,g.m+=m-v,h=c)}return h}function u(c){c.x*=e,c.y=c.depth*n}return i.separation=function(c){return arguments.length?(t=c,i):t},i.size=function(c){return arguments.length?(r=!1,e=+c[0],n=+c[1],i):r?null:[e,n]},i.nodeSize=function(c){return arguments.length?(r=!0,e=+c[0],n=+c[1],i):r?[e,n]:null},i}function Xs(t,e,n,r,i){for(var o=t.children,a,s=-1,u=o.length,c=t.value&&(i-n)/t.value;++s<u;)a=o[s],a.x0=e,a.x1=r,a.y0=n,a.y1=n+=a.value*c}var by=(1+Math.sqrt(5))/2;function vy(t,e,n,r,i,o){for(var a=[],s=e.children,u,c,l=0,h=0,f=s.length,d,p,g=e.value,m,y,x,v,b,$,w;l<f;){d=i-n,p=o-r;do m=s[h++].value;while(!m&&h<f);for(y=x=m,$=Math.max(p/d,d/p)/(g*t),w=m*m*$,b=Math.max(x/w,w/y);h<f;++h){if(m+=c=s[h].value,c<y&&(y=c),c>x&&(x=c),w=m*m*$,v=Math.max(x/w,w/y),v>b){m-=c;break}b=v}a.push(u={value:m,dice:d<p,children:s.slice(l,h)}),u.dice?vo(u,n,r,i,g?r+=p*m/g:o):Xs(u,n,r,g?n+=d*m/g:i,o),g-=m,l=h}return a}const xy=function t(e){function n(r,i,o,a,s){vy(e,r,i,o,a,s)}return n.ratio=function(r){return t((r=+r)>1?r:1)},n}(by);function HP(){var t=xy,e=!1,n=1,r=1,i=[0],o=tr,a=tr,s=tr,u=tr,c=tr;function l(f){return f.x0=f.y0=0,f.x1=n,f.y1=r,f.eachBefore(h),i=[0],e&&f.eachBefore(gy),f}function h(f){var d=i[f.depth],p=f.x0+d,g=f.y0+d,m=f.x1-d,y=f.y1-d;m<p&&(p=m=(p+m)/2),y<g&&(g=y=(g+y)/2),f.x0=p,f.y0=g,f.x1=m,f.y1=y,f.children&&(d=i[f.depth+1]=o(f)/2,p+=c(f)-d,g+=a(f)-d,m-=s(f)-d,y-=u(f)-d,m<p&&(p=m=(p+m)/2),y<g&&(g=y=(g+y)/2),t(f,p,g,m,y))}return l.round=function(f){return arguments.length?(e=!!f,l):e},l.size=function(f){return arguments.length?(n=+f[0],r=+f[1],l):[n,r]},l.tile=function(f){return arguments.length?(t=iy(f),l):t},l.padding=function(f){return arguments.length?l.paddingInner(f).paddingOuter(f):l.paddingInner()},l.paddingInner=function(f){return arguments.length?(o=typeof f=="function"?f:jr(+f),l):o},l.paddingOuter=function(f){return arguments.length?l.paddingTop(f).paddingRight(f).paddingBottom(f).paddingLeft(f):l.paddingTop()},l.paddingTop=function(f){return arguments.length?(a=typeof f=="function"?f:jr(+f),l):a},l.paddingRight=function(f){return arguments.length?(s=typeof f=="function"?f:jr(+f),l):s},l.paddingBottom=function(f){return arguments.length?(u=typeof f=="function"?f:jr(+f),l):u},l.paddingLeft=function(f){return arguments.length?(c=typeof f=="function"?f:jr(+f),l):c},l}function qP(t,e,n,r,i){var o=t.children,a,s=o.length,u,c=new Array(s+1);for(c[0]=u=a=0;a<s;++a)c[a+1]=u+=o[a].value;l(0,s,t.value,e,n,r,i);function l(h,f,d,p,g,m,y){if(h>=f-1){var x=o[h];x.x0=p,x.y0=g,x.x1=m,x.y1=y;return}for(var v=c[h],b=d/2+v,$=h+1,w=f-1;$<w;){var S=$+w>>>1;c[S]<b?$=S+1:w=S}b-c[$-1]<c[$]-b&&h+1<$&&--$;var _=c[$]-v,P=d-_;if(m-p>y-g){var D=d?(p*P+m*_)/d:m;l(h,$,_,p,g,D,y),l($,f,P,D,g,m,y)}else{var A=d?(g*P+y*_)/d:y;l(h,$,_,p,g,m,A),l($,f,P,p,A,m,y)}}}function XP(t,e,n,r,i){(t.depth&1?Xs:vo)(t,e,n,r,i)}const VP=function t(e){function n(r,i,o,a,s){if((u=r._squarify)&&u.ratio===e)for(var u,c,l,h,f=-1,d,p=u.length,g=r.value;++f<p;){for(c=u[f],l=c.children,h=c.value=0,d=l.length;h<d;++h)c.value+=l[h].value;c.dice?vo(c,i,o,a,g?o+=(s-o)*c.value/g:s):Xs(c,i,o,g?i+=(a-i)*c.value/g:a,s),g-=c.value}else r._squarify=u=vy(e,r,i,o,a,s),u.ratio=e}return n.ratio=function(r){return t((r=+r)>1?r:1)},n}(by);function jP(t){for(var e=-1,n=t.length,r,i=t[n-1],o=0;++e<n;)r=i,i=t[e],o+=r[1]*i[0]-r[0]*i[1];return o/2}function ZP(t){for(var e=-1,n=t.length,r=0,i=0,o,a=t[n-1],s,u=0;++e<n;)o=a,a=t[e],u+=s=o[0]*a[1]-a[0]*o[1],r+=(o[0]+a[0])*s,i+=(o[1]+a[1])*s;return u*=3,[r/u,i/u]}function KP(t,e,n){return(e[0]-t[0])*(n[1]-t[1])-(e[1]-t[1])*(n[0]-t[0])}function QP(t,e){return t[0]-e[0]||t[1]-e[1]}function _y(t){const e=t.length,n=[0,1];let r=2,i;for(i=2;i<e;++i){for(;r>1&&KP(t[n[r-2]],t[n[r-1]],t[i])<=0;)--r;n[r++]=i}return n.slice(0,r)}function JP(t){if((n=t.length)<3)return null;var e,n,r=new Array(n),i=new Array(n);for(e=0;e<n;++e)r[e]=[+t[e][0],+t[e][1],e];for(r.sort(QP),e=0;e<n;++e)i[e]=[r[e][0],-r[e][1]];var o=_y(r),a=_y(i),s=a[0]===o[0],u=a[a.length-1]===o[o.length-1],c=[];for(e=o.length-1;e>=0;--e)c.push(t[r[o[e]][2]]);for(e=+s;e<a.length-u;++e)c.push(t[r[a[e]][2]]);return c}function tD(t,e){for(var n=t.length,r=t[n-1],i=e[0],o=e[1],a=r[0],s=r[1],u,c,l=!1,h=0;h<n;++h)r=t[h],u=r[0],c=r[1],c>o!=s>o&&i<(a-u)*(o-c)/(s-c)+u&&(l=!l),a=u,s=c;return l}function eD(t){for(var e=-1,n=t.length,r=t[n-1],i,o,a=r[0],s=r[1],u=0;++e<n;)i=a,o=s,r=t[e],a=r[0],s=r[1],i-=a,o-=s,u+=Math.hypot(i,o);return u}const It=Math.random,nD=function t(e){function n(r,i){return r=r==null?0:+r,i=i==null?1:+i,arguments.length===1?(i=r,r=0):i-=r,function(){return e()*i+r}}return n.source=t,n}(It),rD=function t(e){function n(r,i){return arguments.length<2&&(i=r,r=0),r=Math.floor(r),i=Math.floor(i)-r,function(){return Math.floor(e()*i+r)}}return n.source=t,n}(It),Rf=function t(e){function n(r,i){var o,a;return r=r==null?0:+r,i=i==null?1:+i,function(){var s;if(o!=null)s=o,o=null;else do o=e()*2-1,s=e()*2-1,a=o*o+s*s;while(!a||a>1);return r+i*s*Math.sqrt(-2*Math.log(a)/a)}}return n.source=t,n}(It),iD=function t(e){var n=Rf.source(e);function r(){var i=n.apply(this,arguments);return function(){return Math.exp(i())}}return r.source=t,r}(It),wy=function t(e){function n(r){return(r=+r)<=0?()=>0:function(){for(var i=0,o=r;o>1;--o)i+=e();return i+o*e()}}return n.source=t,n}(It),oD=function t(e){var n=wy.source(e);function r(i){if((i=+i)==0)return e;var o=n(i);return function(){return o()/i}}return r.source=t,r}(It),aD=function t(e){function n(r){return function(){return-Math.log1p(-e())/r}}return n.source=t,n}(It),sD=function t(e){function n(r){if((r=+r)<0)throw new RangeError("invalid alpha");return r=1/-r,function(){return Math.pow(1-e(),r)}}return n.source=t,n}(It),uD=function t(e){function n(r){if((r=+r)<0||r>1)throw new RangeError("invalid p");return function(){return Math.floor(e()+r)}}return n.source=t,n}(It),$y=function t(e){function n(r){if((r=+r)<0||r>1)throw new RangeError("invalid p");return r===0?()=>1/0:r===1?()=>1:(r=Math.log1p(-r),function(){return 1+Math.floor(Math.log1p(-e())/r)})}return n.source=t,n}(It),If=function t(e){var n=Rf.source(e)();function r(i,o){if((i=+i)<0)throw new RangeError("invalid k");if(i===0)return()=>0;if(o=o==null?1:+o,i===1)return()=>-Math.log1p(-e())*o;var a=(i<1?i+1:i)-1/3,s=1/(3*Math.sqrt(a)),u=i<1?()=>Math.pow(e(),1/i):()=>1;return function(){do{do var c=n(),l=1+s*c;while(l<=0);l*=l*l;var h=1-e()}while(h>=1-.0331*c*c*c*c&&Math.log(h)>=.5*c*c+a*(1-l+Math.log(l)));return a*l*u()*o}}return r.source=t,r}(It),Sy=function t(e){var n=If.source(e);function r(i,o){var a=n(i),s=n(o);return function(){var u=a();return u===0?0:u/(u+s())}}return r.source=t,r}(It),Ay=function t(e){var n=$y.source(e),r=Sy.source(e);function i(o,a){return o=+o,(a=+a)>=1?()=>o:a<=0?()=>0:function(){for(var s=0,u=o,c=a;u*c>16&&u*(1-c)>16;){var l=Math.floor((u+1)*c),h=r(l,u-l+1)();h<=c?(s+=l,u-=l,c=(c-h)/(1-h)):(u=l-1,c/=h)}for(var f=c<.5,d=f?c:1-c,p=n(d),g=p(),m=0;g<=u;++m)g+=p();return s+(f?m:u-m)}}return i.source=t,i}(It),cD=function t(e){function n(r,i,o){var a;return(r=+r)==0?a=s=>-Math.log(s):(r=1/r,a=s=>Math.pow(s,r)),i=i==null?0:+i,o=o==null?1:+o,function(){return i+o*a(-Math.log1p(-e()))}}return n.source=t,n}(It),lD=function t(e){function n(r,i){return r=r==null?0:+r,i=i==null?1:+i,function(){return r+i*Math.tan(Math.PI*e())}}return n.source=t,n}(It),fD=function t(e){function n(r,i){return r=r==null?0:+r,i=i==null?1:+i,function(){var o=e();return r+i*Math.log(o/(1-o))}}return n.source=t,n}(It),hD=function t(e){var n=If.source(e),r=Ay.source(e);function i(o){return function(){for(var a=0,s=o;s>16;){var u=Math.floor(.875*s),c=n(u)();if(c>s)return a+r(u-1,s/c)();a+=u,s-=c}for(var l=-Math.log1p(-e()),h=0;l<=s;++h)l-=Math.log1p(-e());return a+h}}return i.source=t,i}(It),dD=1664525,pD=1013904223,My=1/4294967296;function gD(t=Math.random()){let e=(0<=t&&t<1?t/My:Math.abs(t))|0;return()=>(e=dD*e+pD|0,My*(e>>>0))}function pe(t,e){switch(arguments.length){case 0:break;case 1:this.range(t);break;default:this.range(e).domain(t);break}return this}function en(t,e){switch(arguments.length){case 0:break;case 1:{typeof t=="function"?this.interpolator(t):this.range(t);break}default:{this.domain(t),typeof e=="function"?this.interpolator(e):this.range(e);break}}return this}const Nf=Symbol("implicit");function Ff(){var t=new Mi,e=[],n=[],r=Nf;function i(o){let a=t.get(o);if(a===void 0){if(r!==Nf)return r;t.set(o,a=e.push(o)-1)}return n[a%n.length]}return i.domain=function(o){if(!arguments.length)return e.slice();e=[],t=new Mi;for(const a of o)t.has(a)||t.set(a,e.push(a)-1);return i},i.range=function(o){return arguments.length?(n=Array.from(o),i):n.slice()},i.unknown=function(o){return arguments.length?(r=o,i):r},i.copy=function(){return Ff(e,n).unknown(r)},pe.apply(i,arguments),i}function Gf(){var t=Ff().unknown(void 0),e=t.domain,n=t.range,r=0,i=1,o,a,s=!1,u=0,c=0,l=.5;delete t.unknown;function h(){var f=e().length,d=i<r,p=d?i:r,g=d?r:i;o=(g-p)/Math.max(1,f-u+c*2),s&&(o=Math.floor(o)),p+=(g-p-o*(f-u))*l,a=o*(1-u),s&&(p=Math.round(p),a=Math.round(a));var m=ln(f).map(function(y){return p+o*y});return n(d?m.reverse():m)}return t.domain=function(f){return arguments.length?(e(f),h()):e()},t.range=function(f){return arguments.length?([r,i]=f,r=+r,i=+i,h()):[r,i]},t.rangeRound=function(f){return[r,i]=f,r=+r,i=+i,s=!0,h()},t.bandwidth=function(){return a},t.step=function(){return o},t.round=function(f){return arguments.length?(s=!!f,h()):s},t.padding=function(f){return arguments.length?(u=Math.min(1,c=+f),h()):u},t.paddingInner=function(f){return arguments.length?(u=Math.min(1,f),h()):u},t.paddingOuter=function(f){return arguments.length?(c=+f,h()):c},t.align=function(f){return arguments.length?(l=Math.max(0,Math.min(1,f)),h()):l},t.copy=function(){return Gf(e(),[r,i]).round(s).paddingInner(u).paddingOuter(c).align(l)},pe.apply(h(),arguments)}function Ty(t){var e=t.copy;return t.padding=t.paddingOuter,delete t.paddingInner,delete t.paddingOuter,t.copy=function(){return Ty(e())},t}function zf(){return Ty(Gf.apply(null,arguments).paddingInner(1))}function mD(t){return function(){return t}}function Vs(t){return+t}var Py=[0,1];function Jt(t){return t}function Of(t,e){return(e-=t=+t)?function(n){return(n-t)/e}:mD(isNaN(e)?NaN:.5)}function yD(t,e){var n;return t>e&&(n=t,t=e,e=n),function(r){return Math.max(t,Math.min(e,r))}}function bD(t,e,n){var r=t[0],i=t[1],o=e[0],a=e[1];return i<r?(r=Of(i,r),o=n(a,o)):(r=Of(r,i),o=n(o,a)),function(s){return o(r(s))}}function vD(t,e,n){var r=Math.min(t.length,e.length)-1,i=new Array(r),o=new Array(r),a=-1;for(t[r]<t[0]&&(t=t.slice().reverse(),e=e.slice().reverse());++a<r;)i[a]=Of(t[a],t[a+1]),o[a]=n(e[a],e[a+1]);return function(s){var u=kn(t,s,1,r)-1;return o[u](i[u](s))}}function xo(t,e){return e.domain(t.domain()).range(t.range()).interpolate(t.interpolate()).clamp(t.clamp()).unknown(t.unknown())}function js(){var t=Py,e=Py,n=dn,r,i,o,a=Jt,s,u,c;function l(){var f=Math.min(t.length,e.length);return a!==Jt&&(a=yD(t[0],t[f-1])),s=f>2?vD:bD,u=c=null,h}function h(f){return f==null||isNaN(f=+f)?o:(u||(u=s(t.map(r),e,n)))(r(a(f)))}return h.invert=function(f){return a(i((c||(c=s(e,t.map(r),fe)))(f)))},h.domain=function(f){return arguments.length?(t=Array.from(f,Vs),l()):t.slice()},h.range=function(f){return arguments.length?(e=Array.from(f),l()):e.slice()},h.rangeRound=function(f){return e=Array.from(f),n=Ga,l()},h.clamp=function(f){return arguments.length?(a=f?!0:Jt,l()):a!==Jt},h.interpolate=function(f){return arguments.length?(n=f,l()):n},h.unknown=function(f){return arguments.length?(o=f,h):o},function(f,d){return r=f,i=d,l()}}function Uf(){return js()(Jt,Jt)}function Dy(t,e,n,r){var i=ga(t,e,n),o;switch(r=Ur(r??",f"),r.type){case"s":{var a=Math.max(Math.abs(t),Math.abs(e));return r.precision==null&&!isNaN(o=O1(i,a))&&(r.precision=o),Ll(r,a)}case"":case"e":case"g":case"p":case"r":{r.precision==null&&!isNaN(o=U1(i,Math.max(Math.abs(t),Math.abs(e))))&&(r.precision=o-(r.type==="e"));break}case"f":case"%":{r.precision==null&&!isNaN(o=z1(i))&&(r.precision=o-(r.type==="%")*2);break}}return Zi(r)}function bn(t){var e=t.domain;return t.ticks=function(n){var r=e();return Cn(r[0],r[r.length-1],n??10)},t.tickFormat=function(n,r){var i=e();return Dy(i[0],i[i.length-1],n??10,r)},t.nice=function(n){n==null&&(n=10);var r=e(),i=0,o=r.length-1,a=r[i],s=r[o],u,c,l=10;for(s<a&&(c=a,a=s,s=c,c=i,i=o,o=c);l-- >0;){if(c=Rn(a,s,n),c===u)return r[i]=a,r[o]=s,e(r);if(c>0)a=Math.floor(a/c)*c,s=Math.ceil(s/c)*c;else if(c<0)a=Math.ceil(a*c)/c,s=Math.floor(s*c)/c;else break;u=c}return t},t}function Bf(){var t=Uf();return t.copy=function(){return xo(t,Bf())},pe.apply(t,arguments),bn(t)}function Ey(t){var e;function n(r){return r==null||isNaN(r=+r)?e:r}return n.invert=n,n.domain=n.range=function(r){return arguments.length?(t=Array.from(r,Vs),n):t.slice()},n.unknown=function(r){return arguments.length?(e=r,n):e},n.copy=function(){return Ey(t).unknown(e)},t=arguments.length?Array.from(t,Vs):[0,1],bn(n)}function ky(t,e){t=t.slice();var n=0,r=t.length-1,i=t[n],o=t[r],a;return o<i&&(a=n,n=r,r=a,a=i,i=o,o=a),t[n]=e.floor(i),t[r]=e.ceil(o),t}function Ly(t){return Math.log(t)}function Cy(t){return Math.exp(t)}function xD(t){return-Math.log(-t)}function _D(t){return-Math.exp(-t)}function wD(t){return isFinite(t)?+("1e"+t):t<0?0:t}function $D(t){return t===10?wD:t===Math.E?Math.exp:e=>Math.pow(t,e)}function SD(t){return t===Math.E?Math.log:t===10&&Math.log10||t===2&&Math.log2||(t=Math.log(t),e=>Math.log(e)/t)}function Ry(t){return(e,n)=>-t(-e,n)}function Yf(t){const e=t(Ly,Cy),n=e.domain;let r=10,i,o;function a(){return i=SD(r),o=$D(r),n()[0]<0?(i=Ry(i),o=Ry(o),t(xD,_D)):t(Ly,Cy),e}return e.base=function(s){return arguments.length?(r=+s,a()):r},e.domain=function(s){return arguments.length?(n(s),a()):n()},e.ticks=s=>{const u=n();let c=u[0],l=u[u.length-1];const h=l<c;h&&([c,l]=[l,c]);let f=i(c),d=i(l),p,g;const m=s==null?10:+s;let y=[];if(!(r%1)&&d-f<m){if(f=Math.floor(f),d=Math.ceil(d),c>0){for(;f<=d;++f)for(p=1;p<r;++p)if(g=f<0?p/o(-f):p*o(f),!(g<c)){if(g>l)break;y.push(g)}}else for(;f<=d;++f)for(p=r-1;p>=1;--p)if(g=f>0?p/o(-f):p*o(f),!(g<c)){if(g>l)break;y.push(g)}y.length*2<m&&(y=Cn(c,l,m))}else y=Cn(f,d,Math.min(d-f,m)).map(o);return h?y.reverse():y},e.tickFormat=(s,u)=>{if(s==null&&(s=10),u==null&&(u=r===10?"s":","),typeof u!="function"&&(!(r%1)&&(u=Ur(u)).precision==null&&(u.trim=!0),u=Zi(u)),s===1/0)return u;const c=Math.max(1,r*s/e.ticks().length);return l=>{let h=l/o(Math.round(i(l)));return h*r<r-.5&&(h*=r),h<=c?u(l):""}},e.nice=()=>n(ky(n(),{floor:s=>o(Math.floor(i(s))),ceil:s=>o(Math.ceil(i(s)))})),e}function Iy(){const t=Yf(js()).domain([1,10]);return t.copy=()=>xo(t,Iy()).base(t.base()),pe.apply(t,arguments),t}function Ny(t){return function(e){return Math.sign(e)*Math.log1p(Math.abs(e/t))}}function Fy(t){return function(e){return Math.sign(e)*Math.expm1(Math.abs(e))*t}}function Wf(t){var e=1,n=t(Ny(e),Fy(e));return n.constant=function(r){return arguments.length?t(Ny(e=+r),Fy(e)):e},bn(n)}function Gy(){var t=Wf(js());return t.copy=function(){return xo(t,Gy()).constant(t.constant())},pe.apply(t,arguments)}function zy(t){return function(e){return e<0?-Math.pow(-e,t):Math.pow(e,t)}}function AD(t){return t<0?-Math.sqrt(-t):Math.sqrt(t)}function MD(t){return t<0?-t*t:t*t}function Hf(t){var e=t(Jt,Jt),n=1;function r(){return n===1?t(Jt,Jt):n===.5?t(AD,MD):t(zy(n),zy(1/n))}return e.exponent=function(i){return arguments.length?(n=+i,r()):n},bn(e)}function Zs(){var t=Hf(js());return t.copy=function(){return xo(t,Zs()).exponent(t.exponent())},pe.apply(t,arguments),t}function TD(){return Zs.apply(null,arguments).exponent(.5)}function Oy(t){return Math.sign(t)*t*t}function PD(t){return Math.sign(t)*Math.sqrt(Math.abs(t))}function Uy(){var t=Uf(),e=[0,1],n=!1,r;function i(o){var a=PD(t(o));return isNaN(a)?r:n?Math.round(a):a}return i.invert=function(o){return t.invert(Oy(o))},i.domain=function(o){return arguments.length?(t.domain(o),i):t.domain()},i.range=function(o){return arguments.length?(t.range((e=Array.from(o,Vs)).map(Oy)),i):e.slice()},i.rangeRound=function(o){return i.range(o).round(!0)},i.round=function(o){return arguments.length?(n=!!o,i):n},i.clamp=function(o){return arguments.length?(t.clamp(o),i):t.clamp()},i.unknown=function(o){return arguments.length?(r=o,i):r},i.copy=function(){return Uy(t.domain(),e).round(n).clamp(t.clamp()).unknown(r)},pe.apply(i,arguments),bn(i)}function By(){var t=[],e=[],n=[],r;function i(){var a=0,s=Math.max(1,e.length);for(n=new Array(s-1);++a<s;)n[a-1]=xp(t,a/s);return o}function o(a){return a==null||isNaN(a=+a)?r:e[kn(n,a)]}return o.invertExtent=function(a){var s=e.indexOf(a);return s<0?[NaN,NaN]:[s>0?n[s-1]:t[0],s<n.length?n[s]:t[t.length-1]]},o.domain=function(a){if(!arguments.length)return t.slice();t=[];for(let s of a)s!=null&&!isNaN(s=+s)&&t.push(s);return t.sort(_t),i()},o.range=function(a){return arguments.length?(e=Array.from(a),i()):e.slice()},o.unknown=function(a){return arguments.length?(r=a,o):r},o.quantiles=function(){return n.slice()},o.copy=function(){return By().domain(t).range(e).unknown(r)},pe.apply(o,arguments)}function Yy(){var t=0,e=1,n=1,r=[.5],i=[0,1],o;function a(u){return u!=null&&u<=u?i[kn(r,u,0,n)]:o}function s(){var u=-1;for(r=new Array(n);++u<n;)r[u]=((u+1)*e-(u-n)*t)/(n+1);return a}return a.domain=function(u){return arguments.length?([t,e]=u,t=+t,e=+e,s()):[t,e]},a.range=function(u){return arguments.length?(n=(i=Array.from(u)).length-1,s()):i.slice()},a.invertExtent=function(u){var c=i.indexOf(u);return c<0?[NaN,NaN]:c<1?[t,r[0]]:c>=n?[r[n-1],e]:[r[c-1],r[c]]},a.unknown=function(u){return arguments.length&&(o=u),a},a.thresholds=function(){return r.slice()},a.copy=function(){return Yy().domain([t,e]).range(i).unknown(o)},pe.apply(bn(a),arguments)}function Wy(){var t=[.5],e=[0,1],n,r=1;function i(o){return o!=null&&o<=o?e[kn(t,o,0,r)]:n}return i.domain=function(o){return arguments.length?(t=Array.from(o),r=Math.min(t.length,e.length-1),i):t.slice()},i.range=function(o){return arguments.length?(e=Array.from(o),r=Math.min(t.length,e.length-1),i):e.slice()},i.invertExtent=function(o){var a=e.indexOf(o);return[t[a-1],t[a]]},i.unknown=function(o){return arguments.length?(n=o,i):n},i.copy=function(){return Wy().domain(t).range(e).unknown(n)},pe.apply(i,arguments)}const qf=new Date,Xf=new Date;function Tt(t,e,n,r){function i(o){return t(o=arguments.length===0?new Date:new Date(+o)),o}return i.floor=o=>(t(o=new Date(+o)),o),i.ceil=o=>(t(o=new Date(o-1)),e(o,1),t(o),o),i.round=o=>{const a=i(o),s=i.ceil(o);return o-a<s-o?a:s},i.offset=(o,a)=>(e(o=new Date(+o),a==null?1:Math.floor(a)),o),i.range=(o,a,s)=>{const u=[];if(o=i.ceil(o),s=s==null?1:Math.floor(s),!(o<a)||!(s>0))return u;let c;do u.push(c=new Date(+o)),e(o,s),t(o);while(c<o&&o<a);return u},i.filter=o=>Tt(a=>{if(a>=a)for(;t(a),!o(a);)a.setTime(a-1)},(a,s)=>{if(a>=a)if(s<0)for(;++s<=0;)for(;e(a,-1),!o(a););else for(;--s>=0;)for(;e(a,1),!o(a););}),n&&(i.count=(o,a)=>(qf.setTime(+o),Xf.setTime(+a),t(qf),t(Xf),Math.floor(n(qf,Xf))),i.every=o=>(o=Math.floor(o),!isFinite(o)||!(o>0)?null:o>1?i.filter(r?a=>r(a)%o===0:a=>i.count(0,a)%o===0):i)),i}const Zr=Tt(()=>{},(t,e)=>{t.setTime(+t+e)},(t,e)=>e-t);Zr.every=t=>(t=Math.floor(t),!isFinite(t)||!(t>0)?null:t>1?Tt(e=>{e.setTime(Math.floor(e/t)*t)},(e,n)=>{e.setTime(+e+n*t)},(e,n)=>(n-e)/t):Zr);const Hy=Zr.range,nn=1e3,ge=nn*60,rn=ge*60,on=rn*24,Vf=on*7,qy=on*30,jf=on*365,an=Tt(t=>{t.setTime(t-t.getMilliseconds())},(t,e)=>{t.setTime(+t+e*nn)},(t,e)=>(e-t)/nn,t=>t.getUTCSeconds()),Xy=an.range,Ks=Tt(t=>{t.setTime(t-t.getMilliseconds()-t.getSeconds()*nn)},(t,e)=>{t.setTime(+t+e*ge)},(t,e)=>(e-t)/ge,t=>t.getMinutes()),DD=Ks.range,Qs=Tt(t=>{t.setUTCSeconds(0,0)},(t,e)=>{t.setTime(+t+e*ge)},(t,e)=>(e-t)/ge,t=>t.getUTCMinutes()),ED=Qs.range,Js=Tt(t=>{t.setTime(t-t.getMilliseconds()-t.getSeconds()*nn-t.getMinutes()*ge)},(t,e)=>{t.setTime(+t+e*rn)},(t,e)=>(e-t)/rn,t=>t.getHours()),kD=Js.range,tu=Tt(t=>{t.setUTCMinutes(0,0,0)},(t,e)=>{t.setTime(+t+e*rn)},(t,e)=>(e-t)/rn,t=>t.getUTCHours()),LD=tu.range,Kr=Tt(t=>t.setHours(0,0,0,0),(t,e)=>t.setDate(t.getDate()+e),(t,e)=>(e-t-(e.getTimezoneOffset()-t.getTimezoneOffset())*ge)/on,t=>t.getDate()-1),CD=Kr.range,_o=Tt(t=>{t.setUTCHours(0,0,0,0)},(t,e)=>{t.setUTCDate(t.getUTCDate()+e)},(t,e)=>(e-t)/on,t=>t.getUTCDate()-1),RD=_o.range,Zf=Tt(t=>{t.setUTCHours(0,0,0,0)},(t,e)=>{t.setUTCDate(t.getUTCDate()+e)},(t,e)=>(e-t)/on,t=>Math.floor(t/on)),ID=Zf.range;function er(t){return Tt(e=>{e.setDate(e.getDate()-(e.getDay()+7-t)%7),e.setHours(0,0,0,0)},(e,n)=>{e.setDate(e.getDate()+n*7)},(e,n)=>(n-e-(n.getTimezoneOffset()-e.getTimezoneOffset())*ge)/Vf)}const Qr=er(0),wo=er(1),Vy=er(2),jy=er(3),nr=er(4),Zy=er(5),Ky=er(6),Qy=Qr.range,ND=wo.range,FD=Vy.range,GD=jy.range,zD=nr.range,OD=Zy.range,UD=Ky.range;function rr(t){return Tt(e=>{e.setUTCDate(e.getUTCDate()-(e.getUTCDay()+7-t)%7),e.setUTCHours(0,0,0,0)},(e,n)=>{e.setUTCDate(e.getUTCDate()+n*7)},(e,n)=>(n-e)/Vf)}const Jr=rr(0),$o=rr(1),Jy=rr(2),tb=rr(3),ir=rr(4),eb=rr(5),nb=rr(6),rb=Jr.range,BD=$o.range,YD=Jy.range,WD=tb.range,HD=ir.range,qD=eb.range,XD=nb.range,eu=Tt(t=>{t.setDate(1),t.setHours(0,0,0,0)},(t,e)=>{t.setMonth(t.getMonth()+e)},(t,e)=>e.getMonth()-t.getMonth()+(e.getFullYear()-t.getFullYear())*12,t=>t.getMonth()),VD=eu.range,nu=Tt(t=>{t.setUTCDate(1),t.setUTCHours(0,0,0,0)},(t,e)=>{t.setUTCMonth(t.getUTCMonth()+e)},(t,e)=>e.getUTCMonth()-t.getUTCMonth()+(e.getUTCFullYear()-t.getUTCFullYear())*12,t=>t.getUTCMonth()),jD=nu.range,Oe=Tt(t=>{t.setMonth(0,1),t.setHours(0,0,0,0)},(t,e)=>{t.setFullYear(t.getFullYear()+e)},(t,e)=>e.getFullYear()-t.getFullYear(),t=>t.getFullYear());Oe.every=t=>!isFinite(t=Math.floor(t))||!(t>0)?null:Tt(e=>{e.setFullYear(Math.floor(e.getFullYear()/t)*t),e.setMonth(0,1),e.setHours(0,0,0,0)},(e,n)=>{e.setFullYear(e.getFullYear()+n*t)});const ZD=Oe.range,Ue=Tt(t=>{t.setUTCMonth(0,1),t.setUTCHours(0,0,0,0)},(t,e)=>{t.setUTCFullYear(t.getUTCFullYear()+e)},(t,e)=>e.getUTCFullYear()-t.getUTCFullYear(),t=>t.getUTCFullYear());Ue.every=t=>!isFinite(t=Math.floor(t))||!(t>0)?null:Tt(e=>{e.setUTCFullYear(Math.floor(e.getUTCFullYear()/t)*t),e.setUTCMonth(0,1),e.setUTCHours(0,0,0,0)},(e,n)=>{e.setUTCFullYear(e.getUTCFullYear()+n*t)});const KD=Ue.range;function ib(t,e,n,r,i,o){const a=[[an,1,nn],[an,5,5*nn],[an,15,15*nn],[an,30,30*nn],[o,1,ge],[o,5,5*ge],[o,15,15*ge],[o,30,30*ge],[i,1,rn],[i,3,3*rn],[i,6,6*rn],[i,12,12*rn],[r,1,on],[r,2,2*on],[n,1,Vf],[e,1,qy],[e,3,3*qy],[t,1,jf]];function s(c,l,h){const f=l<c;f&&([c,l]=[l,c]);const d=h&&typeof h.range=="function"?h:u(c,l,h),p=d?d.range(c,+l+1):[];return f?p.reverse():p}function u(c,l,h){const f=Math.abs(l-c)/h,d=fa(([,,m])=>m).right(a,f);if(d===a.length)return t.every(ga(c/jf,l/jf,h));if(d===0)return Zr.every(Math.max(ga(c,l,h),1));const[p,g]=a[f/a[d-1][2]<a[d][2]/f?d-1:d];return p.every(g)}return[s,u]}const[ob,ab]=ib(Ue,nu,Jr,Zf,tu,Qs),[sb,ub]=ib(Oe,eu,Qr,Kr,Js,Ks);function Kf(t){if(0<=t.y&&t.y<100){var e=new Date(-1,t.m,t.d,t.H,t.M,t.S,t.L);return e.setFullYear(t.y),e}return new Date(t.y,t.m,t.d,t.H,t.M,t.S,t.L)}function Qf(t){if(0<=t.y&&t.y<100){var e=new Date(Date.UTC(-1,t.m,t.d,t.H,t.M,t.S,t.L));return e.setUTCFullYear(t.y),e}return new Date(Date.UTC(t.y,t.m,t.d,t.H,t.M,t.S,t.L))}function So(t,e,n){return{y:t,m:e,d:n,H:0,M:0,S:0,L:0}}function cb(t){var e=t.dateTime,n=t.date,r=t.time,i=t.periods,o=t.days,a=t.shortDays,s=t.months,u=t.shortMonths,c=Ao(i),l=Mo(i),h=Ao(o),f=Mo(o),d=Ao(a),p=Mo(a),g=Ao(s),m=Mo(s),y=Ao(u),x=Mo(u),v={a:N,A:O,b:L,B:R,c:null,d:gb,e:gb,f:xE,g:EE,G:LE,H:yE,I:bE,j:vE,L:mb,m:_E,M:wE,p:F,q:C,Q:wb,s:$b,S:$E,u:SE,U:AE,V:ME,w:TE,W:PE,x:null,X:null,y:DE,Y:kE,Z:CE,"%":_b},b={a:z,A:X,b:W,B:V,c:null,d:bb,e:bb,f:FE,g:XE,G:jE,H:RE,I:IE,j:NE,L:vb,m:GE,M:zE,p:J,q:ht,Q:wb,s:$b,S:OE,u:UE,U:BE,V:YE,w:WE,W:HE,x:null,X:null,y:qE,Y:VE,Z:ZE,"%":_b},$={a:D,A,b:I,B:M,c:T,d:db,e:db,f:dE,g:hb,G:fb,H:pb,I:pb,j:cE,L:hE,m:uE,M:lE,p:P,q:sE,Q:gE,s:mE,S:fE,u:nE,U:rE,V:iE,w:eE,W:oE,x:k,X:E,y:hb,Y:fb,Z:aE,"%":pE};v.x=w(n,v),v.X=w(r,v),v.c=w(e,v),b.x=w(n,b),b.X=w(r,b),b.c=w(e,b);function w(q,nt){return function(at){var Y=[],xt=-1,gt=0,Nt=q.length,te,rt,Mt;for(at instanceof Date||(at=new Date(+at));++xt<Nt;)q.charCodeAt(xt)===37&&(Y.push(q.slice(gt,xt)),(rt=lb[te=q.charAt(++xt)])!=null?te=q.charAt(++xt):rt=te==="e"?" ":"0",(Mt=nt[te])&&(te=Mt(at,rt)),Y.push(te),gt=xt+1);return Y.push(q.slice(gt,xt)),Y.join("")}}function S(q,nt){return function(at){var Y=So(1900,void 0,1),xt=_(Y,q,at+="",0),gt,Nt;if(xt!=at.length)return null;if("Q"in Y)return new Date(Y.Q);if("s"in Y)return new Date(Y.s*1e3+("L"in Y?Y.L:0));if(nt&&!("Z"in Y)&&(Y.Z=0),"p"in Y&&(Y.H=Y.H%12+Y.p*12),Y.m===void 0&&(Y.m="q"in Y?Y.q:0),"V"in Y){if(Y.V<1||Y.V>53)return null;"w"in Y||(Y.w=1),"Z"in Y?(gt=Qf(So(Y.y,0,1)),Nt=gt.getUTCDay(),gt=Nt>4||Nt===0?$o.ceil(gt):$o(gt),gt=_o.offset(gt,(Y.V-1)*7),Y.y=gt.getUTCFullYear(),Y.m=gt.getUTCMonth(),Y.d=gt.getUTCDate()+(Y.w+6)%7):(gt=Kf(So(Y.y,0,1)),Nt=gt.getDay(),gt=Nt>4||Nt===0?wo.ceil(gt):wo(gt),gt=Kr.offset(gt,(Y.V-1)*7),Y.y=gt.getFullYear(),Y.m=gt.getMonth(),Y.d=gt.getDate()+(Y.w+6)%7)}else("W"in Y||"U"in Y)&&("w"in Y||(Y.w="u"in Y?Y.u%7:"W"in Y?1:0),Nt="Z"in Y?Qf(So(Y.y,0,1)).getUTCDay():Kf(So(Y.y,0,1)).getDay(),Y.m=0,Y.d="W"in Y?(Y.w+6)%7+Y.W*7-(Nt+5)%7:Y.w+Y.U*7-(Nt+6)%7);return"Z"in Y?(Y.H+=Y.Z/100|0,Y.M+=Y.Z%100,Qf(Y)):Kf(Y)}}function _(q,nt,at,Y){for(var xt=0,gt=nt.length,Nt=at.length,te,rt;xt<gt;){if(Y>=Nt)return-1;if(te=nt.charCodeAt(xt++),te===37){if(te=nt.charAt(xt++),rt=$[te in lb?nt.charAt(xt++):te],!rt||(Y=rt(q,at,Y))<0)return-1}else if(te!=at.charCodeAt(Y++))return-1}return Y}function P(q,nt,at){var Y=c.exec(nt.slice(at));return Y?(q.p=l.get(Y[0].toLowerCase()),at+Y[0].length):-1}function D(q,nt,at){var Y=d.exec(nt.slice(at));return Y?(q.w=p.get(Y[0].toLowerCase()),at+Y[0].length):-1}function A(q,nt,at){var Y=h.exec(nt.slice(at));return Y?(q.w=f.get(Y[0].toLowerCase()),at+Y[0].length):-1}function I(q,nt,at){var Y=y.exec(nt.slice(at));return Y?(q.m=x.get(Y[0].toLowerCase()),at+Y[0].length):-1}function M(q,nt,at){var Y=g.exec(nt.slice(at));return Y?(q.m=m.get(Y[0].toLowerCase()),at+Y[0].length):-1}function T(q,nt,at){return _(q,e,nt,at)}function k(q,nt,at){return _(q,n,nt,at)}function E(q,nt,at){return _(q,r,nt,at)}function N(q){return a[q.getDay()]}function O(q){return o[q.getDay()]}function L(q){return u[q.getMonth()]}function R(q){return s[q.getMonth()]}function F(q){return i[+(q.getHours()>=12)]}function C(q){return 1+~~(q.getMonth()/3)}function z(q){return a[q.getUTCDay()]}function X(q){return o[q.getUTCDay()]}function W(q){return u[q.getUTCMonth()]}function V(q){return s[q.getUTCMonth()]}function J(q){return i[+(q.getUTCHours()>=12)]}function ht(q){return 1+~~(q.getUTCMonth()/3)}return{format:function(q){var nt=w(q+="",v);return nt.toString=function(){return q},nt},parse:function(q){var nt=S(q+="",!1);return nt.toString=function(){return q},nt},utcFormat:function(q){var nt=w(q+="",b);return nt.toString=function(){return q},nt},utcParse:function(q){var nt=S(q+="",!0);return nt.toString=function(){return q},nt}}}var lb={"-":"",_:" ",0:"0"},Rt=/^\s*\d+/,QD=/^%/,JD=/[\\^$*+?|[\]().{}]/g;function pt(t,e,n){var r=t<0?"-":"",i=(r?-t:t)+"",o=i.length;return r+(o<n?new Array(n-o+1).join(e)+i:i)}function tE(t){return t.replace(JD,"\\$&")}function Ao(t){return new RegExp("^(?:"+t.map(tE).join("|")+")","i")}function Mo(t){return new Map(t.map((e,n)=>[e.toLowerCase(),n]))}function eE(t,e,n){var r=Rt.exec(e.slice(n,n+1));return r?(t.w=+r[0],n+r[0].length):-1}function nE(t,e,n){var r=Rt.exec(e.slice(n,n+1));return r?(t.u=+r[0],n+r[0].length):-1}function rE(t,e,n){var r=Rt.exec(e.slice(n,n+2));return r?(t.U=+r[0],n+r[0].length):-1}function iE(t,e,n){var r=Rt.exec(e.slice(n,n+2));return r?(t.V=+r[0],n+r[0].length):-1}function oE(t,e,n){var r=Rt.exec(e.slice(n,n+2));return r?(t.W=+r[0],n+r[0].length):-1}function fb(t,e,n){var r=Rt.exec(e.slice(n,n+4));return r?(t.y=+r[0],n+r[0].length):-1}function hb(t,e,n){var r=Rt.exec(e.slice(n,n+2));return r?(t.y=+r[0]+(+r[0]>68?1900:2e3),n+r[0].length):-1}function aE(t,e,n){var r=/^(Z)|([+-]\d\d)(?::?(\d\d))?/.exec(e.slice(n,n+6));return r?(t.Z=r[1]?0:-(r[2]+(r[3]||"00")),n+r[0].length):-1}function sE(t,e,n){var r=Rt.exec(e.slice(n,n+1));return r?(t.q=r[0]*3-3,n+r[0].length):-1}function uE(t,e,n){var r=Rt.exec(e.slice(n,n+2));return r?(t.m=r[0]-1,n+r[0].length):-1}function db(t,e,n){var r=Rt.exec(e.slice(n,n+2));return r?(t.d=+r[0],n+r[0].length):-1}function cE(t,e,n){var r=Rt.exec(e.slice(n,n+3));return r?(t.m=0,t.d=+r[0],n+r[0].length):-1}function pb(t,e,n){var r=Rt.exec(e.slice(n,n+2));return r?(t.H=+r[0],n+r[0].length):-1}function lE(t,e,n){var r=Rt.exec(e.slice(n,n+2));return r?(t.M=+r[0],n+r[0].length):-1}function fE(t,e,n){var r=Rt.exec(e.slice(n,n+2));return r?(t.S=+r[0],n+r[0].length):-1}function hE(t,e,n){var r=Rt.exec(e.slice(n,n+3));return r?(t.L=+r[0],n+r[0].length):-1}function dE(t,e,n){var r=Rt.exec(e.slice(n,n+6));return r?(t.L=Math.floor(r[0]/1e3),n+r[0].length):-1}function pE(t,e,n){var r=QD.exec(e.slice(n,n+1));return r?n+r[0].length:-1}function gE(t,e,n){var r=Rt.exec(e.slice(n));return r?(t.Q=+r[0],n+r[0].length):-1}function mE(t,e,n){var r=Rt.exec(e.slice(n));return r?(t.s=+r[0],n+r[0].length):-1}function gb(t,e){return pt(t.getDate(),e,2)}function yE(t,e){return pt(t.getHours(),e,2)}function bE(t,e){return pt(t.getHours()%12||12,e,2)}function vE(t,e){return pt(1+Kr.count(Oe(t),t),e,3)}function mb(t,e){return pt(t.getMilliseconds(),e,3)}function xE(t,e){return mb(t,e)+"000"}function _E(t,e){return pt(t.getMonth()+1,e,2)}function wE(t,e){return pt(t.getMinutes(),e,2)}function $E(t,e){return pt(t.getSeconds(),e,2)}function SE(t){var e=t.getDay();return e===0?7:e}function AE(t,e){return pt(Qr.count(Oe(t)-1,t),e,2)}function yb(t){var e=t.getDay();return e>=4||e===0?nr(t):nr.ceil(t)}function ME(t,e){return t=yb(t),pt(nr.count(Oe(t),t)+(Oe(t).getDay()===4),e,2)}function TE(t){return t.getDay()}function PE(t,e){return pt(wo.count(Oe(t)-1,t),e,2)}function DE(t,e){return pt(t.getFullYear()%100,e,2)}function EE(t,e){return t=yb(t),pt(t.getFullYear()%100,e,2)}function kE(t,e){return pt(t.getFullYear()%1e4,e,4)}function LE(t,e){var n=t.getDay();return t=n>=4||n===0?nr(t):nr.ceil(t),pt(t.getFullYear()%1e4,e,4)}function CE(t){var e=t.getTimezoneOffset();return(e>0?"-":(e*=-1,"+"))+pt(e/60|0,"0",2)+pt(e%60,"0",2)}function bb(t,e){return pt(t.getUTCDate(),e,2)}function RE(t,e){return pt(t.getUTCHours(),e,2)}function IE(t,e){return pt(t.getUTCHours()%12||12,e,2)}function NE(t,e){return pt(1+_o.count(Ue(t),t),e,3)}function vb(t,e){return pt(t.getUTCMilliseconds(),e,3)}function FE(t,e){return vb(t,e)+"000"}function GE(t,e){return pt(t.getUTCMonth()+1,e,2)}function zE(t,e){return pt(t.getUTCMinutes(),e,2)}function OE(t,e){return pt(t.getUTCSeconds(),e,2)}function UE(t){var e=t.getUTCDay();return e===0?7:e}function BE(t,e){return pt(Jr.count(Ue(t)-1,t),e,2)}function xb(t){var e=t.getUTCDay();return e>=4||e===0?ir(t):ir.ceil(t)}function YE(t,e){return t=xb(t),pt(ir.count(Ue(t),t)+(Ue(t).getUTCDay()===4),e,2)}function WE(t){return t.getUTCDay()}function HE(t,e){return pt($o.count(Ue(t)-1,t),e,2)}function qE(t,e){return pt(t.getUTCFullYear()%100,e,2)}function XE(t,e){return t=xb(t),pt(t.getUTCFullYear()%100,e,2)}function VE(t,e){return pt(t.getUTCFullYear()%1e4,e,4)}function jE(t,e){var n=t.getUTCDay();return t=n>=4||n===0?ir(t):ir.ceil(t),pt(t.getUTCFullYear()%1e4,e,4)}function ZE(){return"+0000"}function _b(){return"%"}function wb(t){return+t}function $b(t){return Math.floor(+t/1e3)}var ti,Jf,Sb,ru,th;Ab({dateTime:"%x, %X",date:"%-m/%-d/%Y",time:"%-I:%M:%S %p",periods:["AM","PM"],days:["Sunday","Monday","Tuesday","Wednesday","Thursday","Friday","Saturday"],shortDays:["Sun","Mon","Tue","Wed","Thu","Fri","Sat"],months:["January","February","March","April","May","June","July","August","September","October","November","December"],shortMonths:["Jan","Feb","Mar","Apr","May","Jun","Jul","Aug","Sep","Oct","Nov","Dec"]});function Ab(t){return ti=cb(t),Jf=ti.format,Sb=ti.parse,ru=ti.utcFormat,th=ti.utcParse,ti}var Mb="%Y-%m-%dT%H:%M:%S.%LZ";function KE(t){return t.toISOString()}var QE=Date.prototype.toISOString?KE:ru(Mb);const JE=QE;function tk(t){var e=new Date(t);return isNaN(e)?null:e}var ek=+new Date("2000-01-01T00:00:00.000Z")?tk:th(Mb);const nk=ek;function rk(t){return new Date(t)}function ik(t){return t instanceof Date?+t:+new Date(+t)}function eh(t,e,n,r,i,o,a,s,u,c){var l=Uf(),h=l.invert,f=l.domain,d=c(".%L"),p=c(":%S"),g=c("%I:%M"),m=c("%I %p"),y=c("%a %d"),x=c("%b %d"),v=c("%B"),b=c("%Y");function $(w){return(u(w)<w?d:s(w)<w?p:a(w)<w?g:o(w)<w?m:r(w)<w?i(w)<w?y:x:n(w)<w?v:b)(w)}return l.invert=function(w){return new Date(h(w))},l.domain=function(w){return arguments.length?f(Array.from(w,ik)):f().map(rk)},l.ticks=function(w){var S=f();return t(S[0],S[S.length-1],w??10)},l.tickFormat=function(w,S){return S==null?$:c(S)},l.nice=function(w){var S=f();return(!w||typeof w.range!="function")&&(w=e(S[0],S[S.length-1],w??10)),w?f(ky(S,w)):l},l.copy=function(){return xo(l,eh(t,e,n,r,i,o,a,s,u,c))},l}function ok(){return pe.apply(eh(sb,ub,Oe,eu,Qr,Kr,Js,Ks,an,Jf).domain([new Date(2e3,0,1),new Date(2e3,0,2)]),arguments)}function ak(){return pe.apply(eh(ob,ab,Ue,nu,Jr,_o,tu,Qs,an,ru).domain([Date.UTC(2e3,0,1),Date.UTC(2e3,0,2)]),arguments)}function iu(){var t=0,e=1,n,r,i,o,a=Jt,s=!1,u;function c(h){return h==null||isNaN(h=+h)?u:a(i===0?.5:(h=(o(h)-n)*i,s?Math.max(0,Math.min(1,h)):h))}c.domain=function(h){return arguments.length?([t,e]=h,n=o(t=+t),r=o(e=+e),i=n===r?0:1/(r-n),c):[t,e]},c.clamp=function(h){return arguments.length?(s=!!h,c):s},c.interpolator=function(h){return arguments.length?(a=h,c):a};function l(h){return function(f){var d,p;return arguments.length?([d,p]=f,a=h(d,p),c):[a(0),a(1)]}}return c.range=l(dn),c.rangeRound=l(Ga),c.unknown=function(h){return arguments.length?(u=h,c):u},function(h){return o=h,n=h(t),r=h(e),i=n===r?0:1/(r-n),c}}function vn(t,e){return e.domain(t.domain()).interpolator(t.interpolator()).clamp(t.clamp()).unknown(t.unknown())}function Tb(){var t=bn(iu()(Jt));return t.copy=function(){return vn(t,Tb())},en.apply(t,arguments)}function Pb(){var t=Yf(iu()).domain([1,10]);return t.copy=function(){return vn(t,Pb()).base(t.base())},en.apply(t,arguments)}function Db(){var t=Wf(iu());return t.copy=function(){return vn(t,Db()).constant(t.constant())},en.apply(t,arguments)}function nh(){var t=Hf(iu());return t.copy=function(){return vn(t,nh()).exponent(t.exponent())},en.apply(t,arguments)}function sk(){return nh.apply(null,arguments).exponent(.5)}function Eb(){var t=[],e=Jt;function n(r){if(r!=null&&!isNaN(r=+r))return e((kn(t,r,1)-1)/(t.length-1))}return n.domain=function(r){if(!arguments.length)return t.slice();t=[];for(let i of r)i!=null&&!isNaN(i=+i)&&t.push(i);return t.sort(_t),n},n.interpolator=function(r){return arguments.length?(e=r,n):e},n.range=function(){return t.map((r,i)=>e(i/(t.length-1)))},n.quantiles=function(r){return Array.from({length:r+1},(i,o)=>Di(t,o/r))},n.copy=function(){return Eb(e).domain(t)},en.apply(n,arguments)}function ou(){var t=0,e=.5,n=1,r=1,i,o,a,s,u,c=Jt,l,h=!1,f;function d(g){return isNaN(g=+g)?f:(g=.5+((g=+l(g))-o)*(r*g<r*o?s:u),c(h?Math.max(0,Math.min(1,g)):g))}d.domain=function(g){return arguments.length?([t,e,n]=g,i=l(t=+t),o=l(e=+e),a=l(n=+n),s=i===o?0:.5/(o-i),u=o===a?0:.5/(a-o),r=o<i?-1:1,d):[t,e,n]},d.clamp=function(g){return arguments.length?(h=!!g,d):h},d.interpolator=function(g){return arguments.length?(c=g,d):c};function p(g){return function(m){var y,x,v;return arguments.length?([y,x,v]=m,c=kg(g,[y,x,v]),d):[c(0),c(.5),c(1)]}}return d.range=p(dn),d.rangeRound=p(Ga),d.unknown=function(g){return arguments.length?(f=g,d):f},function(g){return l=g,i=g(t),o=g(e),a=g(n),s=i===o?0:.5/(o-i),u=o===a?0:.5/(a-o),r=o<i?-1:1,d}}function kb(){var t=bn(ou()(Jt));return t.copy=function(){return vn(t,kb())},en.apply(t,arguments)}function Lb(){var t=Yf(ou()).domain([.1,1,10]);return t.copy=function(){return vn(t,Lb()).base(t.base())},en.apply(t,arguments)}function Cb(){var t=Wf(ou());return t.copy=function(){return vn(t,Cb()).constant(t.constant())},en.apply(t,arguments)}function rh(){var t=Hf(ou());return t.copy=function(){return vn(t,rh()).exponent(t.exponent())},en.apply(t,arguments)}function uk(){return rh.apply(null,arguments).exponent(.5)}function st(t){for(var e=t.length/6|0,n=new Array(e),r=0;r<e;)n[r]="#"+t.slice(r*6,++r*6);return n}const ck=st("1f77b4ff7f0e2ca02cd627289467bd8c564be377c27f7f7fbcbd2217becf"),lk=st("7fc97fbeaed4fdc086ffff99386cb0f0027fbf5b17666666"),fk=st("1b9e77d95f027570b3e7298a66a61ee6ab02a6761d666666"),hk=st("4269d0efb118ff725c6cc5b03ca951ff8ab7a463f297bbf59c6b4e9498a0"),dk=st("a6cee31f78b4b2df8a33a02cfb9a99e31a1cfdbf6fff7f00cab2d66a3d9affff99b15928"),pk=st("fbb4aeb3cde3ccebc5decbe4fed9a6ffffcce5d8bdfddaecf2f2f2"),gk=st("b3e2cdfdcdaccbd5e8f4cae4e6f5c9fff2aef1e2cccccccc"),mk=st("e41a1c377eb84daf4a984ea3ff7f00ffff33a65628f781bf999999"),yk=st("66c2a5fc8d628da0cbe78ac3a6d854ffd92fe5c494b3b3b3"),bk=st("8dd3c7ffffb3bebadafb807280b1d3fdb462b3de69fccde5d9d9d9bc80bdccebc5ffed6f"),vk=st("4e79a7f28e2ce1575976b7b259a14fedc949af7aa1ff9da79c755fbab0ab"),bt=t=>mg(t[t.length-1]);var Rb=new Array(3).concat("d8b365f5f5f55ab4ac","a6611adfc27d80cdc1018571","a6611adfc27df5f5f580cdc1018571","8c510ad8b365f6e8c3c7eae55ab4ac01665e","8c510ad8b365f6e8c3f5f5f5c7eae55ab4ac01665e","8c510abf812ddfc27df6e8c3c7eae580cdc135978f01665e","8c510abf812ddfc27df6e8c3f5f5f5c7eae580cdc135978f01665e","5430058c510abf812ddfc27df6e8c3c7eae580cdc135978f01665e003c30","5430058c510abf812ddfc27df6e8c3f5f5f5c7eae580cdc135978f01665e003c30").map(st);const xk=bt(Rb);var Ib=new Array(3).concat("af8dc3f7f7f77fbf7b","7b3294c2a5cfa6dba0008837","7b3294c2a5cff7f7f7a6dba0008837","762a83af8dc3e7d4e8d9f0d37fbf7b1b7837","762a83af8dc3e7d4e8f7f7f7d9f0d37fbf7b1b7837","762a839970abc2a5cfe7d4e8d9f0d3a6dba05aae611b7837","762a839970abc2a5cfe7d4e8f7f7f7d9f0d3a6dba05aae611b7837","40004b762a839970abc2a5cfe7d4e8d9f0d3a6dba05aae611b783700441b","40004b762a839970abc2a5cfe7d4e8f7f7f7d9f0d3a6dba05aae611b783700441b").map(st);const _k=bt(Ib);var Nb=new Array(3).concat("e9a3c9f7f7f7a1d76a","d01c8bf1b6dab8e1864dac26","d01c8bf1b6daf7f7f7b8e1864dac26","c51b7de9a3c9fde0efe6f5d0a1d76a4d9221","c51b7de9a3c9fde0eff7f7f7e6f5d0a1d76a4d9221","c51b7dde77aef1b6dafde0efe6f5d0b8e1867fbc414d9221","c51b7dde77aef1b6dafde0eff7f7f7e6f5d0b8e1867fbc414d9221","8e0152c51b7dde77aef1b6dafde0efe6f5d0b8e1867fbc414d9221276419","8e0152c51b7dde77aef1b6dafde0eff7f7f7e6f5d0b8e1867fbc414d9221276419").map(st);const wk=bt(Nb);var Fb=new Array(3).concat("998ec3f7f7f7f1a340","5e3c99b2abd2fdb863e66101","5e3c99b2abd2f7f7f7fdb863e66101","542788998ec3d8daebfee0b6f1a340b35806","542788998ec3d8daebf7f7f7fee0b6f1a340b35806","5427888073acb2abd2d8daebfee0b6fdb863e08214b35806","5427888073acb2abd2d8daebf7f7f7fee0b6fdb863e08214b35806","2d004b5427888073acb2abd2d8daebfee0b6fdb863e08214b358067f3b08","2d004b5427888073acb2abd2d8daebf7f7f7fee0b6fdb863e08214b358067f3b08").map(st);const $k=bt(Fb);var Gb=new Array(3).concat("ef8a62f7f7f767a9cf","ca0020f4a58292c5de0571b0","ca0020f4a582f7f7f792c5de0571b0","b2182bef8a62fddbc7d1e5f067a9cf2166ac","b2182bef8a62fddbc7f7f7f7d1e5f067a9cf2166ac","b2182bd6604df4a582fddbc7d1e5f092c5de4393c32166ac","b2182bd6604df4a582fddbc7f7f7f7d1e5f092c5de4393c32166ac","67001fb2182bd6604df4a582fddbc7d1e5f092c5de4393c32166ac053061","67001fb2182bd6604df4a582fddbc7f7f7f7d1e5f092c5de4393c32166ac053061").map(st);const Sk=bt(Gb);var zb=new Array(3).concat("ef8a62ffffff999999","ca0020f4a582bababa404040","ca0020f4a582ffffffbababa404040","b2182bef8a62fddbc7e0e0e09999994d4d4d","b2182bef8a62fddbc7ffffffe0e0e09999994d4d4d","b2182bd6604df4a582fddbc7e0e0e0bababa8787874d4d4d","b2182bd6604df4a582fddbc7ffffffe0e0e0bababa8787874d4d4d","67001fb2182bd6604df4a582fddbc7e0e0e0bababa8787874d4d4d1a1a1a","67001fb2182bd6604df4a582fddbc7ffffffe0e0e0bababa8787874d4d4d1a1a1a").map(st);const Ak=bt(zb);var Ob=new Array(3).concat("fc8d59ffffbf91bfdb","d7191cfdae61abd9e92c7bb6","d7191cfdae61ffffbfabd9e92c7bb6","d73027fc8d59fee090e0f3f891bfdb4575b4","d73027fc8d59fee090ffffbfe0f3f891bfdb4575b4","d73027f46d43fdae61fee090e0f3f8abd9e974add14575b4","d73027f46d43fdae61fee090ffffbfe0f3f8abd9e974add14575b4","a50026d73027f46d43fdae61fee090e0f3f8abd9e974add14575b4313695","a50026d73027f46d43fdae61fee090ffffbfe0f3f8abd9e974add14575b4313695").map(st);const Mk=bt(Ob);var Ub=new Array(3).concat("fc8d59ffffbf91cf60","d7191cfdae61a6d96a1a9641","d7191cfdae61ffffbfa6d96a1a9641","d73027fc8d59fee08bd9ef8b91cf601a9850","d73027fc8d59fee08bffffbfd9ef8b91cf601a9850","d73027f46d43fdae61fee08bd9ef8ba6d96a66bd631a9850","d73027f46d43fdae61fee08bffffbfd9ef8ba6d96a66bd631a9850","a50026d73027f46d43fdae61fee08bd9ef8ba6d96a66bd631a9850006837","a50026d73027f46d43fdae61fee08bffffbfd9ef8ba6d96a66bd631a9850006837").map(st);const Tk=bt(Ub);var Bb=new Array(3).concat("fc8d59ffffbf99d594","d7191cfdae61abdda42b83ba","d7191cfdae61ffffbfabdda42b83ba","d53e4ffc8d59fee08be6f59899d5943288bd","d53e4ffc8d59fee08bffffbfe6f59899d5943288bd","d53e4ff46d43fdae61fee08be6f598abdda466c2a53288bd","d53e4ff46d43fdae61fee08bffffbfe6f598abdda466c2a53288bd","9e0142d53e4ff46d43fdae61fee08be6f598abdda466c2a53288bd5e4fa2","9e0142d53e4ff46d43fdae61fee08bffffbfe6f598abdda466c2a53288bd5e4fa2").map(st);const Pk=bt(Bb);var Yb=new Array(3).concat("e5f5f999d8c92ca25f","edf8fbb2e2e266c2a4238b45","edf8fbb2e2e266c2a42ca25f006d2c","edf8fbccece699d8c966c2a42ca25f006d2c","edf8fbccece699d8c966c2a441ae76238b45005824","f7fcfde5f5f9ccece699d8c966c2a441ae76238b45005824","f7fcfde5f5f9ccece699d8c966c2a441ae76238b45006d2c00441b").map(st);const Dk=bt(Yb);var Wb=new Array(3).concat("e0ecf49ebcda8856a7","edf8fbb3cde38c96c688419d","edf8fbb3cde38c96c68856a7810f7c","edf8fbbfd3e69ebcda8c96c68856a7810f7c","edf8fbbfd3e69ebcda8c96c68c6bb188419d6e016b","f7fcfde0ecf4bfd3e69ebcda8c96c68c6bb188419d6e016b","f7fcfde0ecf4bfd3e69ebcda8c96c68c6bb188419d810f7c4d004b").map(st);const Ek=bt(Wb);var Hb=new Array(3).concat("e0f3dba8ddb543a2ca","f0f9e8bae4bc7bccc42b8cbe","f0f9e8bae4bc7bccc443a2ca0868ac","f0f9e8ccebc5a8ddb57bccc443a2ca0868ac","f0f9e8ccebc5a8ddb57bccc44eb3d32b8cbe08589e","f7fcf0e0f3dbccebc5a8ddb57bccc44eb3d32b8cbe08589e","f7fcf0e0f3dbccebc5a8ddb57bccc44eb3d32b8cbe0868ac084081").map(st);const kk=bt(Hb);var qb=new Array(3).concat("fee8c8fdbb84e34a33","fef0d9fdcc8afc8d59d7301f","fef0d9fdcc8afc8d59e34a33b30000","fef0d9fdd49efdbb84fc8d59e34a33b30000","fef0d9fdd49efdbb84fc8d59ef6548d7301f990000","fff7ecfee8c8fdd49efdbb84fc8d59ef6548d7301f990000","fff7ecfee8c8fdd49efdbb84fc8d59ef6548d7301fb300007f0000").map(st);const Lk=bt(qb);var Xb=new Array(3).concat("ece2f0a6bddb1c9099","f6eff7bdc9e167a9cf02818a","f6eff7bdc9e167a9cf1c9099016c59","f6eff7d0d1e6a6bddb67a9cf1c9099016c59","f6eff7d0d1e6a6bddb67a9cf3690c002818a016450","fff7fbece2f0d0d1e6a6bddb67a9cf3690c002818a016450","fff7fbece2f0d0d1e6a6bddb67a9cf3690c002818a016c59014636").map(st);const Ck=bt(Xb);var Vb=new Array(3).concat("ece7f2a6bddb2b8cbe","f1eef6bdc9e174a9cf0570b0","f1eef6bdc9e174a9cf2b8cbe045a8d","f1eef6d0d1e6a6bddb74a9cf2b8cbe045a8d","f1eef6d0d1e6a6bddb74a9cf3690c00570b0034e7b","fff7fbece7f2d0d1e6a6bddb74a9cf3690c00570b0034e7b","fff7fbece7f2d0d1e6a6bddb74a9cf3690c00570b0045a8d023858").map(st);const Rk=bt(Vb);var jb=new Array(3).concat("e7e1efc994c7dd1c77","f1eef6d7b5d8df65b0ce1256","f1eef6d7b5d8df65b0dd1c77980043","f1eef6d4b9dac994c7df65b0dd1c77980043","f1eef6d4b9dac994c7df65b0e7298ace125691003f","f7f4f9e7e1efd4b9dac994c7df65b0e7298ace125691003f","f7f4f9e7e1efd4b9dac994c7df65b0e7298ace125698004367001f").map(st);const Ik=bt(jb);var Zb=new Array(3).concat("fde0ddfa9fb5c51b8a","feebe2fbb4b9f768a1ae017e","feebe2fbb4b9f768a1c51b8a7a0177","feebe2fcc5c0fa9fb5f768a1c51b8a7a0177","feebe2fcc5c0fa9fb5f768a1dd3497ae017e7a0177","fff7f3fde0ddfcc5c0fa9fb5f768a1dd3497ae017e7a0177","fff7f3fde0ddfcc5c0fa9fb5f768a1dd3497ae017e7a017749006a").map(st);const Nk=bt(Zb);var Kb=new Array(3).concat("edf8b17fcdbb2c7fb8","ffffcca1dab441b6c4225ea8","ffffcca1dab441b6c42c7fb8253494","ffffccc7e9b47fcdbb41b6c42c7fb8253494","ffffccc7e9b47fcdbb41b6c41d91c0225ea80c2c84","ffffd9edf8b1c7e9b47fcdbb41b6c41d91c0225ea80c2c84","ffffd9edf8b1c7e9b47fcdbb41b6c41d91c0225ea8253494081d58").map(st);const Fk=bt(Kb);var Qb=new Array(3).concat("f7fcb9addd8e31a354","ffffccc2e69978c679238443","ffffccc2e69978c67931a354006837","ffffccd9f0a3addd8e78c67931a354006837","ffffccd9f0a3addd8e78c67941ab5d238443005a32","ffffe5f7fcb9d9f0a3addd8e78c67941ab5d238443005a32","ffffe5f7fcb9d9f0a3addd8e78c67941ab5d238443006837004529").map(st);const Gk=bt(Qb);var Jb=new Array(3).concat("fff7bcfec44fd95f0e","ffffd4fed98efe9929cc4c02","ffffd4fed98efe9929d95f0e993404","ffffd4fee391fec44ffe9929d95f0e993404","ffffd4fee391fec44ffe9929ec7014cc4c028c2d04","ffffe5fff7bcfee391fec44ffe9929ec7014cc4c028c2d04","ffffe5fff7bcfee391fec44ffe9929ec7014cc4c02993404662506").map(st);const zk=bt(Jb);var tv=new Array(3).concat("ffeda0feb24cf03b20","ffffb2fecc5cfd8d3ce31a1c","ffffb2fecc5cfd8d3cf03b20bd0026","ffffb2fed976feb24cfd8d3cf03b20bd0026","ffffb2fed976feb24cfd8d3cfc4e2ae31a1cb10026","ffffccffeda0fed976feb24cfd8d3cfc4e2ae31a1cb10026","ffffccffeda0fed976feb24cfd8d3cfc4e2ae31a1cbd0026800026").map(st);const Ok=bt(tv);var ev=new Array(3).concat("deebf79ecae13182bd","eff3ffbdd7e76baed62171b5","eff3ffbdd7e76baed63182bd08519c","eff3ffc6dbef9ecae16baed63182bd08519c","eff3ffc6dbef9ecae16baed64292c62171b5084594","f7fbffdeebf7c6dbef9ecae16baed64292c62171b5084594","f7fbffdeebf7c6dbef9ecae16baed64292c62171b508519c08306b").map(st);const Uk=bt(ev);var nv=new Array(3).concat("e5f5e0a1d99b31a354","edf8e9bae4b374c476238b45","edf8e9bae4b374c47631a354006d2c","edf8e9c7e9c0a1d99b74c47631a354006d2c","edf8e9c7e9c0a1d99b74c47641ab5d238b45005a32","f7fcf5e5f5e0c7e9c0a1d99b74c47641ab5d238b45005a32","f7fcf5e5f5e0c7e9c0a1d99b74c47641ab5d238b45006d2c00441b").map(st);const Bk=bt(nv);var rv=new Array(3).concat("f0f0f0bdbdbd636363","f7f7f7cccccc969696525252","f7f7f7cccccc969696636363252525","f7f7f7d9d9d9bdbdbd969696636363252525","f7f7f7d9d9d9bdbdbd969696737373525252252525","fffffff0f0f0d9d9d9bdbdbd969696737373525252252525","fffffff0f0f0d9d9d9bdbdbd969696737373525252252525000000").map(st);const Yk=bt(rv);var iv=new Array(3).concat("efedf5bcbddc756bb1","f2f0f7cbc9e29e9ac86a51a3","f2f0f7cbc9e29e9ac8756bb154278f","f2f0f7dadaebbcbddc9e9ac8756bb154278f","f2f0f7dadaebbcbddc9e9ac8807dba6a51a34a1486","fcfbfdefedf5dadaebbcbddc9e9ac8807dba6a51a34a1486","fcfbfdefedf5dadaebbcbddc9e9ac8807dba6a51a354278f3f007d").map(st);const Wk=bt(iv);var ov=new Array(3).concat("fee0d2fc9272de2d26","fee5d9fcae91fb6a4acb181d","fee5d9fcae91fb6a4ade2d26a50f15","fee5d9fcbba1fc9272fb6a4ade2d26a50f15","fee5d9fcbba1fc9272fb6a4aef3b2ccb181d99000d","fff5f0fee0d2fcbba1fc9272fb6a4aef3b2ccb181d99000d","fff5f0fee0d2fcbba1fc9272fb6a4aef3b2ccb181da50f1567000d").map(st);const Hk=bt(ov);var av=new Array(3).concat("fee6cefdae6be6550d","feeddefdbe85fd8d3cd94701","feeddefdbe85fd8d3ce6550da63603","feeddefdd0a2fdae6bfd8d3ce6550da63603","feeddefdd0a2fdae6bfd8d3cf16913d948018c2d04","fff5ebfee6cefdd0a2fdae6bfd8d3cf16913d948018c2d04","fff5ebfee6cefdd0a2fdae6bfd8d3cf16913d94801a636037f2704").map(st);const qk=bt(av);function Xk(t){return t=Math.max(0,Math.min(1,t)),"rgb("+Math.max(0,Math.min(255,Math.round(-4.54-t*(35.34-t*(2381.73-t*(6402.7-t*(7024.72-t*2710.57)))))))+", "+Math.max(0,Math.min(255,Math.round(32.49+t*(170.73+t*(52.82-t*(131.46-t*(176.58-t*67.37)))))))+", "+Math.max(0,Math.min(255,Math.round(81.24+t*(442.36-t*(2482.43-t*(6167.24-t*(6614.94-t*2475.67)))))))+")"}const Vk=Oa(Me(300,.5,0),Me(-240,.5,1));var jk=Oa(Me(-100,.75,.35),Me(80,1.5,.8)),Zk=Oa(Me(260,.75,.35),Me(80,1.5,.8)),au=Me();function Kk(t){(t<0||t>1)&&(t-=Math.floor(t));var e=Math.abs(t-.5);return au.h=360*t-100,au.s=1.5-1.5*e,au.l=.8-.9*e,au+""}var su=Dr(),Qk=Math.PI/3,Jk=Math.PI*2/3;function tL(t){var e;return t=(.5-t)*Math.PI,su.r=255*(e=Math.sin(t))*e,su.g=255*(e=Math.sin(t+Qk))*e,su.b=255*(e=Math.sin(t+Jk))*e,su+""}function eL(t){return t=Math.max(0,Math.min(1,t)),"rgb("+Math.max(0,Math.min(255,Math.round(34.61+t*(1172.33-t*(10793.56-t*(33300.12-t*(38394.49-t*14825.05)))))))+", "+Math.max(0,Math.min(255,Math.round(23.31+t*(557.33+t*(1225.33-t*(3574.96-t*(1073.77+t*707.56)))))))+", "+Math.max(0,Math.min(255,Math.round(27.2+t*(3211.1-t*(15327.97-t*(27814-t*(22569.18-t*6838.66)))))))+")"}function uu(t){var e=t.length;return function(n){return t[Math.max(0,Math.min(e-1,Math.floor(n*e)))]}}const nL=uu(st("44015444025645045745055946075a46085c460a5d460b5e470d60470e6147106347116447136548146748166848176948186a481a6c481b6d481c6e481d6f481f70482071482173482374482475482576482677482878482979472a7a472c7a472d7b472e7c472f7d46307e46327e46337f463480453581453781453882443983443a83443b84433d84433e85423f854240864241864142874144874045884046883f47883f48893e49893e4a893e4c8a3d4d8a3d4e8a3c4f8a3c508b3b518b3b528b3a538b3a548c39558c39568c38588c38598c375a8c375b8d365c8d365d8d355e8d355f8d34608d34618d33628d33638d32648e32658e31668e31678e31688e30698e306a8e2f6b8e2f6c8e2e6d8e2e6e8e2e6f8e2d708e2d718e2c718e2c728e2c738e2b748e2b758e2a768e2a778e2a788e29798e297a8e297b8e287c8e287d8e277e8e277f8e27808e26818e26828e26828e25838e25848e25858e24868e24878e23888e23898e238a8d228b8d228c8d228d8d218e8d218f8d21908d21918c20928c20928c20938c1f948c1f958b1f968b1f978b1f988b1f998a1f9a8a1e9b8a1e9c891e9d891f9e891f9f881fa0881fa1881fa1871fa28720a38620a48621a58521a68522a78522a88423a98324aa8325ab8225ac8226ad8127ad8128ae8029af7f2ab07f2cb17e2db27d2eb37c2fb47c31b57b32b67a34b67935b77937b87838b9773aba763bbb753dbc743fbc7340bd7242be7144bf7046c06f48c16e4ac16d4cc26c4ec36b50c46a52c56954c56856c66758c7655ac8645cc8635ec96260ca6063cb5f65cb5e67cc5c69cd5b6ccd5a6ece5870cf5773d05675d05477d1537ad1517cd2507fd34e81d34d84d44b86d54989d5488bd6468ed64590d74393d74195d84098d83e9bd93c9dd93ba0da39a2da37a5db36a8db34aadc32addc30b0dd2fb2dd2db5de2bb8de29bade28bddf26c0df25c2df23c5e021c8e020cae11fcde11dd0e11cd2e21bd5e21ad8e219dae319dde318dfe318e2e418e5e419e7e419eae51aece51befe51cf1e51df4e61ef6e620f8e621fbe723fde725"));var rL=uu(st("00000401000501010601010802010902020b02020d03030f03031204041405041606051806051a07061c08071e0907200a08220b09240c09260d0a290e0b2b100b2d110c2f120d31130d34140e36150e38160f3b180f3d19103f1a10421c10441d11471e114920114b21114e22115024125325125527125829115a2a115c2c115f2d11612f116331116533106734106936106b38106c390f6e3b0f703d0f713f0f72400f74420f75440f764510774710784910784a10794c117a4e117b4f127b51127c52137c54137d56147d57157e59157e5a167e5c167f5d177f5f187f601880621980641a80651a80671b80681c816a1c816b1d816d1d816e1e81701f81721f817320817521817621817822817922827b23827c23827e24828025828125818326818426818627818827818928818b29818c29818e2a81902a81912b81932b80942c80962c80982d80992d809b2e7f9c2e7f9e2f7fa02f7fa1307ea3307ea5317ea6317da8327daa337dab337cad347cae347bb0357bb2357bb3367ab5367ab73779b83779ba3878bc3978bd3977bf3a77c03a76c23b75c43c75c53c74c73d73c83e73ca3e72cc3f71cd4071cf4070d0416fd2426fd3436ed5446dd6456cd8456cd9466bdb476adc4869de4968df4a68e04c67e24d66e34e65e44f64e55064e75263e85362e95462ea5661eb5760ec5860ed5a5fee5b5eef5d5ef05f5ef1605df2625df2645cf3655cf4675cf4695cf56b5cf66c5cf66e5cf7705cf7725cf8745cf8765cf9785df9795df97b5dfa7d5efa7f5efa815ffb835ffb8560fb8761fc8961fc8a62fc8c63fc8e64fc9065fd9266fd9467fd9668fd9869fd9a6afd9b6bfe9d6cfe9f6dfea16efea36ffea571fea772fea973feaa74feac76feae77feb078feb27afeb47bfeb67cfeb77efeb97ffebb81febd82febf84fec185fec287fec488fec68afec88cfeca8dfecc8ffecd90fecf92fed194fed395fed597fed799fed89afdda9cfddc9efddea0fde0a1fde2a3fde3a5fde5a7fde7a9fde9aafdebacfcecaefceeb0fcf0b2fcf2b4fcf4b6fcf6b8fcf7b9fcf9bbfcfbbdfcfdbf")),iL=uu(st("00000401000501010601010802010a02020c02020e03021004031204031405041706041907051b08051d09061f0a07220b07240c08260d08290e092b10092d110a30120a32140b34150b37160b39180c3c190c3e1b0c411c0c431e0c451f0c48210c4a230c4c240c4f260c51280b53290b552b0b572d0b592f0a5b310a5c320a5e340a5f3609613809623909633b09643d09653e0966400a67420a68440a68450a69470b6a490b6a4a0c6b4c0c6b4d0d6c4f0d6c510e6c520e6d540f6d550f6d57106e59106e5a116e5c126e5d126e5f136e61136e62146e64156e65156e67166e69166e6a176e6c186e6d186e6f196e71196e721a6e741a6e751b6e771c6d781c6d7a1d6d7c1d6d7d1e6d7f1e6c801f6c82206c84206b85216b87216b88226a8a226a8c23698d23698f24699025689225689326679526679727669827669a28659b29649d29649f2a63a02a63a22b62a32c61a52c60a62d60a82e5fa92e5eab2f5ead305dae305cb0315bb1325ab3325ab43359b63458b73557b93556ba3655bc3754bd3853bf3952c03a51c13a50c33b4fc43c4ec63d4dc73e4cc83f4bca404acb4149cc4248ce4347cf4446d04545d24644d34743d44842d54a41d74b3fd84c3ed94d3dda4e3cdb503bdd513ade5238df5337e05536e15635e25734e35933e45a31e55c30e65d2fe75e2ee8602de9612bea632aeb6429eb6628ec6726ed6925ee6a24ef6c23ef6e21f06f20f1711ff1731df2741cf3761bf37819f47918f57b17f57d15f67e14f68013f78212f78410f8850ff8870ef8890cf98b0bf98c0af98e09fa9008fa9207fa9407fb9606fb9706fb9906fb9b06fb9d07fc9f07fca108fca309fca50afca60cfca80dfcaa0ffcac11fcae12fcb014fcb216fcb418fbb61afbb81dfbba1ffbbc21fbbe23fac026fac228fac42afac62df9c72ff9c932f9cb35f8cd37f8cf3af7d13df7d340f6d543f6d746f5d949f5db4cf4dd4ff4df53f4e156f3e35af3e55df2e661f2e865f2ea69f1ec6df1ed71f1ef75f1f179f2f27df2f482f3f586f3f68af4f88ef5f992f6fa96f8fb9af9fc9dfafda1fcffa4")),oL=uu(st("0d088710078813078916078a19068c1b068d1d068e20068f2206902406912605912805922a05932c05942e05952f059631059733059735049837049938049a3a049a3c049b3e049c3f049c41049d43039e44039e46039f48039f4903a04b03a14c02a14e02a25002a25102a35302a35502a45601a45801a45901a55b01a55c01a65e01a66001a66100a76300a76400a76600a76700a86900a86a00a86c00a86e00a86f00a87100a87201a87401a87501a87701a87801a87a02a87b02a87d03a87e03a88004a88104a78305a78405a78606a68707a68808a68a09a58b0aa58d0ba58e0ca48f0da4910ea3920fa39410a29511a19613a19814a099159f9a169f9c179e9d189d9e199da01a9ca11b9ba21d9aa31e9aa51f99a62098a72197a82296aa2395ab2494ac2694ad2793ae2892b02991b12a90b22b8fb32c8eb42e8db52f8cb6308bb7318ab83289ba3388bb3488bc3587bd3786be3885bf3984c03a83c13b82c23c81c33d80c43e7fc5407ec6417dc7427cc8437bc9447aca457acb4679cc4778cc4977cd4a76ce4b75cf4c74d04d73d14e72d24f71d35171d45270d5536fd5546ed6556dd7566cd8576bd9586ada5a6ada5b69db5c68dc5d67dd5e66de5f65de6164df6263e06363e16462e26561e26660e3685fe4695ee56a5de56b5de66c5ce76e5be76f5ae87059e97158e97257ea7457eb7556eb7655ec7754ed7953ed7a52ee7b51ef7c51ef7e50f07f4ff0804ef1814df1834cf2844bf3854bf3874af48849f48948f58b47f58c46f68d45f68f44f79044f79143f79342f89441f89540f9973ff9983ef99a3efa9b3dfa9c3cfa9e3bfb9f3afba139fba238fca338fca537fca636fca835fca934fdab33fdac33fdae32fdaf31fdb130fdb22ffdb42ffdb52efeb72dfeb82cfeba2cfebb2bfebd2afebe2afec029fdc229fdc328fdc527fdc627fdc827fdca26fdcb26fccd25fcce25fcd025fcd225fbd324fbd524fbd724fad824fada24f9dc24f9dd25f8df25f8e125f7e225f7e425f6e626f6e826f5e926f5eb27f4ed27f3ee27f3f027f2f227f1f426f1f525f0f724f0f921"));function ot(t){return function(){return t}}const sv=Math.abs,Ot=Math.atan2,sn=Math.cos,aL=Math.max,ei=Math.min,ie=Math.sin,vt=Math.sqrt,Ut=1e-12,xn=Math.PI,cu=xn/2,_n=2*xn;function sL(t){return t>1?0:t<-1?xn:Math.acos(t)}function uv(t){return t>=1?cu:t<=-1?-cu:Math.asin(t)}function To(t){let e=3;return t.digits=function(n){if(!arguments.length)return e;if(n==null)e=null;else{const r=Math.floor(n);if(!(r>=0))throw new RangeError(`invalid digits: ${n}`);e=r}return t},()=>new qi(e)}function uL(t){return t.innerRadius}function cL(t){return t.outerRadius}function lL(t){return t.startAngle}function fL(t){return t.endAngle}function hL(t){return t&&t.padAngle}function dL(t,e,n,r,i,o,a,s){var u=n-t,c=r-e,l=a-i,h=s-o,f=h*u-l*c;if(!(f*f<Ut))return f=(l*(e-o)-h*(t-i))/f,[t+f*u,e+f*c]}function lu(t,e,n,r,i,o,a){var s=t-n,u=e-r,c=(a?o:-o)/vt(s*s+u*u),l=c*u,h=-c*s,f=t+l,d=e+h,p=n+l,g=r+h,m=(f+p)/2,y=(d+g)/2,x=p-f,v=g-d,b=x*x+v*v,$=i-o,w=f*g-p*d,S=(v<0?-1:1)*vt(aL(0,$*$*b-w*w)),_=(w*v-x*S)/b,P=(-w*x-v*S)/b,D=(w*v+x*S)/b,A=(-w*x+v*S)/b,I=_-m,M=P-y,T=D-m,k=A-y;return I*I+M*M>T*T+k*k&&(_=D,P=A),{cx:_,cy:P,x01:-l,y01:-h,x11:_*(i/$-1),y11:P*(i/$-1)}}function cv(){var t=uL,e=cL,n=ot(0),r=null,i=lL,o=fL,a=hL,s=null,u=To(c);function c(){var l,h,f=+t.apply(this,arguments),d=+e.apply(this,arguments),p=i.apply(this,arguments)-cu,g=o.apply(this,arguments)-cu,m=sv(g-p),y=g>p;if(s||(s=l=u()),d<f&&(h=d,d=f,f=h),!(d>Ut))s.moveTo(0,0);else if(m>_n-Ut)s.moveTo(d*sn(p),d*ie(p)),s.arc(0,0,d,p,g,!y),f>Ut&&(s.moveTo(f*sn(g),f*ie(g)),s.arc(0,0,f,g,p,y));else{var x=p,v=g,b=p,$=g,w=m,S=m,_=a.apply(this,arguments)/2,P=_>Ut&&(r?+r.apply(this,arguments):vt(f*f+d*d)),D=ei(sv(d-f)/2,+n.apply(this,arguments)),A=D,I=D,M,T;if(P>Ut){var k=uv(P/f*ie(_)),E=uv(P/d*ie(_));(w-=k*2)>Ut?(k*=y?1:-1,b+=k,$-=k):(w=0,b=$=(p+g)/2),(S-=E*2)>Ut?(E*=y?1:-1,x+=E,v-=E):(S=0,x=v=(p+g)/2)}var N=d*sn(x),O=d*ie(x),L=f*sn($),R=f*ie($);if(D>Ut){var F=d*sn(v),C=d*ie(v),z=f*sn(b),X=f*ie(b),W;if(m<xn)if(W=dL(N,O,z,X,F,C,L,R)){var V=N-W[0],J=O-W[1],ht=F-W[0],q=C-W[1],nt=1/ie(sL((V*ht+J*q)/(vt(V*V+J*J)*vt(ht*ht+q*q)))/2),at=vt(W[0]*W[0]+W[1]*W[1]);A=ei(D,(f-at)/(nt-1)),I=ei(D,(d-at)/(nt+1))}else A=I=0}S>Ut?I>Ut?(M=lu(z,X,N,O,d,I,y),T=lu(F,C,L,R,d,I,y),s.moveTo(M.cx+M.x01,M.cy+M.y01),I<D?s.arc(M.cx,M.cy,I,Ot(M.y01,M.x01),Ot(T.y01,T.x01),!y):(s.arc(M.cx,M.cy,I,Ot(M.y01,M.x01),Ot(M.y11,M.x11),!y),s.arc(0,0,d,Ot(M.cy+M.y11,M.cx+M.x11),Ot(T.cy+T.y11,T.cx+T.x11),!y),s.arc(T.cx,T.cy,I,Ot(T.y11,T.x11),Ot(T.y01,T.x01),!y))):(s.moveTo(N,O),s.arc(0,0,d,x,v,!y)):s.moveTo(N,O),!(f>Ut)||!(w>Ut)?s.lineTo(L,R):A>Ut?(M=lu(L,R,F,C,f,-A,y),T=lu(N,O,z,X,f,-A,y),s.lineTo(M.cx+M.x01,M.cy+M.y01),A<D?s.arc(M.cx,M.cy,A,Ot(M.y01,M.x01),Ot(T.y01,T.x01),!y):(s.arc(M.cx,M.cy,A,Ot(M.y01,M.x01),Ot(M.y11,M.x11),!y),s.arc(0,0,f,Ot(M.cy+M.y11,M.cx+M.x11),Ot(T.cy+T.y11,T.cx+T.x11),y),s.arc(T.cx,T.cy,A,Ot(T.y11,T.x11),Ot(T.y01,T.x01),!y))):s.arc(0,0,f,$,b,y)}if(s.closePath(),l)return s=null,l+""||null}return c.centroid=function(){var l=(+t.apply(this,arguments)+ +e.apply(this,arguments))/2,h=(+i.apply(this,arguments)+ +o.apply(this,arguments))/2-xn/2;return[sn(h)*l,ie(h)*l]},c.innerRadius=function(l){return arguments.length?(t=typeof l=="function"?l:ot(+l),c):t},c.outerRadius=function(l){return arguments.length?(e=typeof l=="function"?l:ot(+l),c):e},c.cornerRadius=function(l){return arguments.length?(n=typeof l=="function"?l:ot(+l),c):n},c.padRadius=function(l){return arguments.length?(r=l==null?null:typeof l=="function"?l:ot(+l),c):r},c.startAngle=function(l){return arguments.length?(i=typeof l=="function"?l:ot(+l),c):i},c.endAngle=function(l){return arguments.length?(o=typeof l=="function"?l:ot(+l),c):o},c.padAngle=function(l){return arguments.length?(a=typeof l=="function"?l:ot(+l),c):a},c.context=function(l){return arguments.length?(s=l??null,c):s},c}var pL=Array.prototype.slice;function fu(t){return typeof t=="object"&&"length"in t?t:Array.from(t)}function lv(t){this._context=t}lv.prototype={areaStart:function(){this._line=0},areaEnd:function(){this._line=NaN},lineStart:function(){this._point=0},lineEnd:function(){(this._line||this._line!==0&&this._point===1)&&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;default:this._context.lineTo(t,e);break}}};function hu(t){return new lv(t)}function ih(t){return t[0]}function oh(t){return t[1]}function du(t,e){var n=ot(!0),r=null,i=hu,o=null,a=To(s);t=typeof t=="function"?t:t===void 0?ih:ot(t),e=typeof e=="function"?e:e===void 0?oh:ot(e);function s(u){var c,l=(u=fu(u)).length,h,f=!1,d;for(r==null&&(o=i(d=a())),c=0;c<=l;++c)!(c<l&&n(h=u[c],c,u))===f&&((f=!f)?o.lineStart():o.lineEnd()),f&&o.point(+t(h,c,u),+e(h,c,u));if(d)return o=null,d+""||null}return s.x=function(u){return arguments.length?(t=typeof u=="function"?u:ot(+u),s):t},s.y=function(u){return arguments.length?(e=typeof u=="function"?u:ot(+u),s):e},s.defined=function(u){return arguments.length?(n=typeof u=="function"?u:ot(!!u),s):n},s.curve=function(u){return arguments.length?(i=u,r!=null&&(o=i(r)),s):i},s.context=function(u){return arguments.length?(u==null?r=o=null:o=i(r=u),s):r},s}function fv(t,e,n){var r=null,i=ot(!0),o=null,a=hu,s=null,u=To(c);t=typeof t=="function"?t:t===void 0?ih:ot(+t),e=typeof e=="function"?e:ot(e===void 0?0:+e),n=typeof n=="function"?n:n===void 0?oh:ot(+n);function c(h){var f,d,p,g=(h=fu(h)).length,m,y=!1,x,v=new Array(g),b=new Array(g);for(o==null&&(s=a(x=u())),f=0;f<=g;++f){if(!(f<g&&i(m=h[f],f,h))===y)if(y=!y)d=f,s.areaStart(),s.lineStart();else{for(s.lineEnd(),s.lineStart(),p=f-1;p>=d;--p)s.point(v[p],b[p]);s.lineEnd(),s.areaEnd()}y&&(v[f]=+t(m,f,h),b[f]=+e(m,f,h),s.point(r?+r(m,f,h):v[f],n?+n(m,f,h):b[f]))}if(x)return s=null,x+""||null}function l(){return du().defined(i).curve(a).context(o)}return c.x=function(h){return arguments.length?(t=typeof h=="function"?h:ot(+h),r=null,c):t},c.x0=function(h){return arguments.length?(t=typeof h=="function"?h:ot(+h),c):t},c.x1=function(h){return arguments.length?(r=h==null?null:typeof h=="function"?h:ot(+h),c):r},c.y=function(h){return arguments.length?(e=typeof h=="function"?h:ot(+h),n=null,c):e},c.y0=function(h){return arguments.length?(e=typeof h=="function"?h:ot(+h),c):e},c.y1=function(h){return arguments.length?(n=h==null?null:typeof h=="function"?h:ot(+h),c):n},c.lineX0=c.lineY0=function(){return l().x(t).y(e)},c.lineY1=function(){return l().x(t).y(n)},c.lineX1=function(){return l().x(r).y(e)},c.defined=function(h){return arguments.length?(i=typeof h=="function"?h:ot(!!h),c):i},c.curve=function(h){return arguments.length?(a=h,o!=null&&(s=a(o)),c):a},c.context=function(h){return arguments.length?(h==null?o=s=null:s=a(o=h),c):o},c}function gL(t,e){return e<t?-1:e>t?1:e>=t?0:NaN}function mL(t){return t}function hv(){var t=mL,e=gL,n=null,r=ot(0),i=ot(_n),o=ot(0);function a(s){var u,c=(s=fu(s)).length,l,h,f=0,d=new Array(c),p=new Array(c),g=+r.apply(this,arguments),m=Math.min(_n,Math.max(-_n,i.apply(this,arguments)-g)),y,x=Math.min(Math.abs(m)/c,o.apply(this,arguments)),v=x*(m<0?-1:1),b;for(u=0;u<c;++u)(b=p[d[u]=u]=+t(s[u],u,s))>0&&(f+=b);for(e!=null?d.sort(function($,w){return e(p[$],p[w])}):n!=null&&d.sort(function($,w){return n(s[$],s[w])}),u=0,h=f?(m-c*v)/f:0;u<c;++u,g=y)l=d[u],b=p[l],y=g+(b>0?b*h:0)+v,p[l]={data:s[l],index:u,value:b,startAngle:g,endAngle:y,padAngle:x};return p}return a.value=function(s){return arguments.length?(t=typeof s=="function"?s:ot(+s),a):t},a.sortValues=function(s){return arguments.length?(e=s,n=null,a):e},a.sort=function(s){return arguments.length?(n=s,e=null,a):n},a.startAngle=function(s){return arguments.length?(r=typeof s=="function"?s:ot(+s),a):r},a.endAngle=function(s){return arguments.length?(i=typeof s=="function"?s:ot(+s),a):i},a.padAngle=function(s){return arguments.length?(o=typeof s=="function"?s:ot(+s),a):o},a}var dv=ah(hu);function pv(t){this._curve=t}pv.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))}};function ah(t){function e(n){return new pv(t(n))}return e._curve=t,e}function Po(t){var e=t.curve;return t.angle=t.x,delete t.x,t.radius=t.y,delete t.y,t.curve=function(n){return arguments.length?e(ah(n)):e()._curve},t}function gv(){return Po(du().curve(dv))}function mv(){var t=fv().curve(dv),e=t.curve,n=t.lineX0,r=t.lineX1,i=t.lineY0,o=t.lineY1;return t.angle=t.x,delete t.x,t.startAngle=t.x0,delete t.x0,t.endAngle=t.x1,delete t.x1,t.radius=t.y,delete t.y,t.innerRadius=t.y0,delete t.y0,t.outerRadius=t.y1,delete t.y1,t.lineStartAngle=function(){return Po(n())},delete t.lineX0,t.lineEndAngle=function(){return Po(r())},delete t.lineX1,t.lineInnerRadius=function(){return Po(i())},delete t.lineY0,t.lineOuterRadius=function(){return Po(o())},delete t.lineY1,t.curve=function(a){return arguments.length?e(ah(a)):e()._curve},t}function Do(t,e){return[(e=+e)*Math.cos(t-=Math.PI/2),e*Math.sin(t)]}class yv{constructor(e,n){this._context=e,this._x=n}areaStart(){this._line=0}areaEnd(){this._line=NaN}lineStart(){this._point=0}lineEnd(){(this._line||this._line!==0&&this._point===1)&&this._context.closePath(),this._line=1-this._line}point(e,n){switch(e=+e,n=+n,this._point){case 0:{this._point=1,this._line?this._context.lineTo(e,n):this._context.moveTo(e,n);break}case 1:this._point=2;default:{this._x?this._context.bezierCurveTo(this._x0=(this._x0+e)/2,this._y0,this._x0,n,e,n):this._context.bezierCurveTo(this._x0,this._y0=(this._y0+n)/2,e,this._y0,e,n);break}}this._x0=e,this._y0=n}}class yL{constructor(e){this._context=e}lineStart(){this._point=0}lineEnd(){}point(e,n){if(e=+e,n=+n,this._point===0)this._point=1;else{const r=Do(this._x0,this._y0),i=Do(this._x0,this._y0=(this._y0+n)/2),o=Do(e,this._y0),a=Do(e,n);this._context.moveTo(...r),this._context.bezierCurveTo(...i,...o,...a)}this._x0=e,this._y0=n}}function bv(t){return new yv(t,!0)}function vv(t){return new yv(t,!1)}function bL(t){return new yL(t)}function vL(t){return t.source}function xL(t){return t.target}function pu(t){let e=vL,n=xL,r=ih,i=oh,o=null,a=null,s=To(u);function u(){let c;const l=pL.call(arguments),h=e.apply(this,l),f=n.apply(this,l);if(o==null&&(a=t(c=s())),a.lineStart(),l[0]=h,a.point(+r.apply(this,l),+i.apply(this,l)),l[0]=f,a.point(+r.apply(this,l),+i.apply(this,l)),a.lineEnd(),c)return a=null,c+""||null}return u.source=function(c){return arguments.length?(e=c,u):e},u.target=function(c){return arguments.length?(n=c,u):n},u.x=function(c){return arguments.length?(r=typeof c=="function"?c:ot(+c),u):r},u.y=function(c){return arguments.length?(i=typeof c=="function"?c:ot(+c),u):i},u.context=function(c){return arguments.length?(c==null?o=a=null:a=t(o=c),u):o},u}function _L(){return pu(bv)}function wL(){return pu(vv)}function $L(){const t=pu(bL);return t.angle=t.x,delete t.x,t.radius=t.y,delete t.y,t}const SL=vt(3),xv={draw(t,e){const n=vt(e+ei(e/28,.75))*.59436,r=n/2,i=r*SL;t.moveTo(0,n),t.lineTo(0,-n),t.moveTo(-i,-r),t.lineTo(i,r),t.moveTo(-i,r),t.lineTo(i,-r)}},gu={draw(t,e){const n=vt(e/xn);t.moveTo(n,0),t.arc(0,0,n,0,_n)}},_v={draw(t,e){const n=vt(e/5)/2;t.moveTo(-3*n,-n),t.lineTo(-n,-n),t.lineTo(-n,-3*n),t.lineTo(n,-3*n),t.lineTo(n,-n),t.lineTo(3*n,-n),t.lineTo(3*n,n),t.lineTo(n,n),t.lineTo(n,3*n),t.lineTo(-n,3*n),t.lineTo(-n,n),t.lineTo(-3*n,n),t.closePath()}},wv=vt(1/3),AL=wv*2,$v={draw(t,e){const n=vt(e/AL),r=n*wv;t.moveTo(0,-n),t.lineTo(r,0),t.lineTo(0,n),t.lineTo(-r,0),t.closePath()}},Sv={draw(t,e){const n=vt(e)*.62625;t.moveTo(0,-n),t.lineTo(n,0),t.lineTo(0,n),t.lineTo(-n,0),t.closePath()}},Av={draw(t,e){const n=vt(e-ei(e/7,2))*.87559;t.moveTo(-n,0),t.lineTo(n,0),t.moveTo(0,n),t.lineTo(0,-n)}},Mv={draw(t,e){const n=vt(e),r=-n/2;t.rect(r,r,n,n)}},Tv={draw(t,e){const n=vt(e)*.4431;t.moveTo(n,n),t.lineTo(n,-n),t.lineTo(-n,-n),t.lineTo(-n,n),t.closePath()}},ML=.8908130915292852,Pv=ie(xn/10)/ie(7*xn/10),TL=ie(_n/10)*Pv,PL=-sn(_n/10)*Pv,Dv={draw(t,e){const n=vt(e*ML),r=TL*n,i=PL*n;t.moveTo(0,-n),t.lineTo(r,i);for(let o=1;o<5;++o){const a=_n*o/5,s=sn(a),u=ie(a);t.lineTo(u*n,-s*n),t.lineTo(s*r-u*i,u*r+s*i)}t.closePath()}},sh=vt(3),Ev={draw(t,e){const n=-vt(e/(sh*3));t.moveTo(0,n*2),t.lineTo(-sh*n,-n),t.lineTo(sh*n,-n),t.closePath()}},DL=vt(3),kv={draw(t,e){const n=vt(e)*.6824,r=n/2,i=n*DL/2;t.moveTo(0,-n),t.lineTo(i,r),t.lineTo(-i,r),t.closePath()}},me=-.5,ye=vt(3)/2,uh=1/vt(12),EL=(uh/2+1)*3,Lv={draw(t,e){const n=vt(e/EL),r=n/2,i=n*uh,o=r,a=n*uh+n,s=-o,u=a;t.moveTo(r,i),t.lineTo(o,a),t.lineTo(s,u),t.lineTo(me*r-ye*i,ye*r+me*i),t.lineTo(me*o-ye*a,ye*o+me*a),t.lineTo(me*s-ye*u,ye*s+me*u),t.lineTo(me*r+ye*i,me*i-ye*r),t.lineTo(me*o+ye*a,me*a-ye*o),t.lineTo(me*s+ye*u,me*u-ye*s),t.closePath()}},ch={draw(t,e){const n=vt(e-ei(e/6,1.7))*.6189;t.moveTo(-n,-n),t.lineTo(n,n),t.moveTo(-n,n),t.lineTo(n,-n)}},Cv=[gu,_v,$v,Mv,Dv,Ev,Lv],kL=[gu,Av,ch,kv,xv,Tv,Sv];function LL(t,e){let n=null,r=To(i);t=typeof t=="function"?t:ot(t||gu),e=typeof e=="function"?e:ot(e===void 0?64:+e);function i(){let o;if(n||(n=o=r()),t.apply(this,arguments).draw(n,+e.apply(this,arguments)),o)return n=null,o+""||null}return i.type=function(o){return arguments.length?(t=typeof o=="function"?o:ot(o),i):t},i.size=function(o){return arguments.length?(e=typeof o=="function"?o:ot(+o),i):e},i.context=function(o){return arguments.length?(n=o??null,i):n},i}function wn(){}function mu(t,e,n){t._context.bezierCurveTo((2*t._x0+t._x1)/3,(2*t._y0+t._y1)/3,(t._x0+2*t._x1)/3,(t._y0+2*t._y1)/3,(t._x0+4*t._x1+e)/6,(t._y0+4*t._y1+n)/6)}function yu(t){this._context=t}yu.prototype={areaStart:function(){this._line=0},areaEnd:function(){this._line=NaN},lineStart:function(){this._x0=this._x1=this._y0=this._y1=NaN,this._point=0},lineEnd:function(){switch(this._point){case 3:mu(this,this._x1,this._y1);case 2:this._context.lineTo(this._x1,this._y1);break}(this._line||this._line!==0&&this._point===1)&&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;break;case 2:this._point=3,this._context.lineTo((5*this._x0+this._x1)/6,(5*this._y0+this._y1)/6);default:mu(this,t,e);break}this._x0=this._x1,this._x1=t,this._y0=this._y1,this._y1=e}};function CL(t){return new yu(t)}function Rv(t){this._context=t}Rv.prototype={areaStart:wn,areaEnd:wn,lineStart:function(){this._x0=this._x1=this._x2=this._x3=this._x4=this._y0=this._y1=this._y2=this._y3=this._y4=NaN,this._point=0},lineEnd:function(){switch(this._point){case 1:{this._context.moveTo(this._x2,this._y2),this._context.closePath();break}case 2:{this._context.moveTo((this._x2+2*this._x3)/3,(this._y2+2*this._y3)/3),this._context.lineTo((this._x3+2*this._x2)/3,(this._y3+2*this._y2)/3),this._context.closePath();break}case 3:{this.point(this._x2,this._y2),this.point(this._x3,this._y3),this.point(this._x4,this._y4);break}}},point:function(t,e){switch(t=+t,e=+e,this._point){case 0:this._point=1,this._x2=t,this._y2=e;break;case 1:this._point=2,this._x3=t,this._y3=e;break;case 2:this._point=3,this._x4=t,this._y4=e,this._context.moveTo((this._x0+4*this._x1+t)/6,(this._y0+4*this._y1+e)/6);break;default:mu(this,t,e);break}this._x0=this._x1,this._x1=t,this._y0=this._y1,this._y1=e}};function RL(t){return new Rv(t)}function Iv(t){this._context=t}Iv.prototype={areaStart:function(){this._line=0},areaEnd:function(){this._line=NaN},lineStart:function(){this._x0=this._x1=this._y0=this._y1=NaN,this._point=0},lineEnd:function(){(this._line||this._line!==0&&this._point===3)&&this._context.closePath(),this._line=1-this._line},point:function(t,e){switch(t=+t,e=+e,this._point){case 0:this._point=1;break;case 1:this._point=2;break;case 2:this._point=3;var n=(this._x0+4*this._x1+t)/6,r=(this._y0+4*this._y1+e)/6;this._line?this._context.lineTo(n,r):this._context.moveTo(n,r);break;case 3:this._point=4;default:mu(this,t,e);break}this._x0=this._x1,this._x1=t,this._y0=this._y1,this._y1=e}};function IL(t){return new Iv(t)}function Nv(t,e){this._basis=new yu(t),this._beta=e}Nv.prototype={lineStart:function(){this._x=[],this._y=[],this._basis.lineStart()},lineEnd:function(){var t=this._x,e=this._y,n=t.length-1;if(n>0)for(var r=t[0],i=e[0],o=t[n]-r,a=e[n]-i,s=-1,u;++s<=n;)u=s/n,this._basis.point(this._beta*t[s]+(1-this._beta)*(r+u*o),this._beta*e[s]+(1-this._beta)*(i+u*a));this._x=this._y=null,this._basis.lineEnd()},point:function(t,e){this._x.push(+t),this._y.push(+e)}};const NL=function t(e){function n(r){return e===1?new yu(r):new Nv(r,e)}return n.beta=function(r){return t(+r)},n}(.85);function bu(t,e,n){t._context.bezierCurveTo(t._x1+t._k*(t._x2-t._x0),t._y1+t._k*(t._y2-t._y0),t._x2+t._k*(t._x1-e),t._y2+t._k*(t._y1-n),t._x2,t._y2)}function lh(t,e){this._context=t,this._k=(1-e)/6}lh.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:bu(this,this._x1,this._y1);break}(this._line||this._line!==0&&this._point===1)&&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:bu(this,t,e);break}this._x0=this._x1,this._x1=this._x2,this._x2=t,this._y0=this._y1,this._y1=this._y2,this._y2=e}};const FL=function t(e){function n(r){return new lh(r,e)}return n.tension=function(r){return t(+r)},n}(0);function fh(t,e){this._context=t,this._k=(1-e)/6}fh.prototype={areaStart:wn,areaEnd:wn,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);break}}},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:bu(this,t,e);break}this._x0=this._x1,this._x1=this._x2,this._x2=t,this._y0=this._y1,this._y1=this._y2,this._y2=e}};const GL=function t(e){function n(r){return new fh(r,e)}return n.tension=function(r){return t(+r)},n}(0);function hh(t,e){this._context=t,this._k=(1-e)/6}hh.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(){(this._line||this._line!==0&&this._point===3)&&this._context.closePath(),this._line=1-this._line},point:function(t,e){switch(t=+t,e=+e,this._point){case 0:this._point=1;break;case 1:this._point=2;break;case 2:this._point=3,this._line?this._context.lineTo(this._x2,this._y2):this._context.moveTo(this._x2,this._y2);break;case 3:this._point=4;default:bu(this,t,e);break}this._x0=this._x1,this._x1=this._x2,this._x2=t,this._y0=this._y1,this._y1=this._y2,this._y2=e}};const zL=function t(e){function n(r){return new hh(r,e)}return n.tension=function(r){return t(+r)},n}(0);function dh(t,e,n){var r=t._x1,i=t._y1,o=t._x2,a=t._y2;if(t._l01_a>Ut){var s=2*t._l01_2a+3*t._l01_a*t._l12_a+t._l12_2a,u=3*t._l01_a*(t._l01_a+t._l12_a);r=(r*s-t._x0*t._l12_2a+t._x2*t._l01_2a)/u,i=(i*s-t._y0*t._l12_2a+t._y2*t._l01_2a)/u}if(t._l23_a>Ut){var c=2*t._l23_2a+3*t._l23_a*t._l12_a+t._l12_2a,l=3*t._l23_a*(t._l23_a+t._l12_a);o=(o*c+t._x1*t._l23_2a-e*t._l12_2a)/l,a=(a*c+t._y1*t._l23_2a-n*t._l12_2a)/l}t._context.bezierCurveTo(r,i,o,a,t._x2,t._y2)}function Fv(t,e){this._context=t,this._alpha=e}Fv.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);break}(this._line||this._line!==0&&this._point===1)&&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:dh(this,t,e);break}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}};const OL=function t(e){function n(r){return e?new Fv(r,e):new lh(r,0)}return n.alpha=function(r){return t(+r)},n}(.5);function Gv(t,e){this._context=t,this._alpha=e}Gv.prototype={areaStart:wn,areaEnd:wn,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);break}}},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:dh(this,t,e);break}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}};const UL=function t(e){function n(r){return e?new Gv(r,e):new fh(r,0)}return n.alpha=function(r){return t(+r)},n}(.5);function zv(t,e){this._context=t,this._alpha=e}zv.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(){(this._line||this._line!==0&&this._point===3)&&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;break;case 1:this._point=2;break;case 2:this._point=3,this._line?this._context.lineTo(this._x2,this._y2):this._context.moveTo(this._x2,this._y2);break;case 3:this._point=4;default:dh(this,t,e);break}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}};const BL=function t(e){function n(r){return e?new zv(r,e):new hh(r,0)}return n.alpha=function(r){return t(+r)},n}(.5);function Ov(t){this._context=t}Ov.prototype={areaStart:wn,areaEnd:wn,lineStart:function(){this._point=0},lineEnd:function(){this._point&&this._context.closePath()},point:function(t,e){t=+t,e=+e,this._point?this._context.lineTo(t,e):(this._point=1,this._context.moveTo(t,e))}};function YL(t){return new Ov(t)}function Uv(t){return t<0?-1:1}function Bv(t,e,n){var r=t._x1-t._x0,i=e-t._x1,o=(t._y1-t._y0)/(r||i<0&&-0),a=(n-t._y1)/(i||r<0&&-0),s=(o*i+a*r)/(r+i);return(Uv(o)+Uv(a))*Math.min(Math.abs(o),Math.abs(a),.5*Math.abs(s))||0}function Yv(t,e){var n=t._x1-t._x0;return n?(3*(t._y1-t._y0)/n-e)/2:e}function ph(t,e,n){var r=t._x0,i=t._y0,o=t._x1,a=t._y1,s=(o-r)/3;t._context.bezierCurveTo(r+s,i+s*e,o-s,a-s*n,o,a)}function vu(t){this._context=t}vu.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:ph(this,this._t0,Yv(this,this._t0));break}(this._line||this._line!==0&&this._point===1)&&this._context.closePath(),this._line=1-this._line},point:function(t,e){var n=NaN;if(t=+t,e=+e,!(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,ph(this,Yv(this,n=Bv(this,t,e)),n);break;default:ph(this,this._t0,n=Bv(this,t,e));break}this._x0=this._x1,this._x1=t,this._y0=this._y1,this._y1=e,this._t0=n}}};function Wv(t){this._context=new Hv(t)}(Wv.prototype=Object.create(vu.prototype)).point=function(t,e){vu.prototype.point.call(this,e,t)};function Hv(t){this._context=t}Hv.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,o){this._context.bezierCurveTo(e,t,r,n,o,i)}};function WL(t){return new vu(t)}function HL(t){return new Wv(t)}function qv(t){this._context=t}qv.prototype={areaStart:function(){this._line=0},areaEnd:function(){this._line=NaN},lineStart:function(){this._x=[],this._y=[]},lineEnd:function(){var t=this._x,e=this._y,n=t.length;if(n)if(this._line?this._context.lineTo(t[0],e[0]):this._context.moveTo(t[0],e[0]),n===2)this._context.lineTo(t[1],e[1]);else for(var r=Xv(t),i=Xv(e),o=0,a=1;a<n;++o,++a)this._context.bezierCurveTo(r[0][o],i[0][o],r[1][o],i[1][o],t[a],e[a]);(this._line||this._line!==0&&n===1)&&this._context.closePath(),this._line=1-this._line,this._x=this._y=null},point:function(t,e){this._x.push(+t),this._y.push(+e)}};function Xv(t){var e,n=t.length-1,r,i=new Array(n),o=new Array(n),a=new Array(n);for(i[0]=0,o[0]=2,a[0]=t[0]+2*t[1],e=1;e<n-1;++e)i[e]=1,o[e]=4,a[e]=4*t[e]+2*t[e+1];for(i[n-1]=2,o[n-1]=7,a[n-1]=8*t[n-1]+t[n],e=1;e<n;++e)r=i[e]/o[e-1],o[e]-=r,a[e]-=r*a[e-1];for(i[n-1]=a[n-1]/o[n-1],e=n-2;e>=0;--e)i[e]=(a[e]-i[e+1])/o[e];for(o[n-1]=(t[n]+i[n-1])/2,e=0;e<n-1;++e)o[e]=2*t[e+1]-i[e+1];return[i,o]}function qL(t){return new qv(t)}function xu(t,e){this._context=t,this._t=e}xu.prototype={areaStart:function(){this._line=0},areaEnd:function(){this._line=NaN},lineStart:function(){this._x=this._y=NaN,this._point=0},lineEnd:function(){0<this._t&&this._t<1&&this._point===2&&this._context.lineTo(this._x,this._y),(this._line||this._line!==0&&this._point===1)&&this._context.closePath(),this._line>=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)}break}}this._x=t,this._y=e}};function XL(t){return new xu(t,.5)}function VL(t){return new xu(t,0)}function jL(t){return new xu(t,1)}function ni(t,e){if((a=t.length)>1)for(var n=1,r,i,o=t[e[0]],a,s=o.length;n<a;++n)for(i=o,o=t[e[n]],r=0;r<s;++r)o[r][1]+=o[r][0]=isNaN(i[r][1])?i[r][0]:i[r][1]}function ri(t){for(var e=t.length,n=new Array(e);--e>=0;)n[e]=e;return n}function ZL(t,e){return t[e]}function KL(t){const e=[];return e.key=t,e}function QL(){var t=ot([]),e=ri,n=ni,r=ZL;function i(o){var a=Array.from(t.apply(this,arguments),KL),s,u=a.length,c=-1,l;for(const h of o)for(s=0,++c;s<u;++s)(a[s][c]=[0,+r(h,a[s].key,c,o)]).data=h;for(s=0,l=fu(e(a));s<u;++s)a[l[s]].index=s;return n(a,l),a}return i.keys=function(o){return arguments.length?(t=typeof o=="function"?o:ot(Array.from(o)),i):t},i.value=function(o){return arguments.length?(r=typeof o=="function"?o:ot(+o),i):r},i.order=function(o){return arguments.length?(e=o==null?ri:typeof o=="function"?o:ot(Array.from(o)),i):e},i.offset=function(o){return arguments.length?(n=o??ni,i):n},i}function JL(t,e){if((r=t.length)>0){for(var n,r,i=0,o=t[0].length,a;i<o;++i){for(a=n=0;n<r;++n)a+=t[n][i][1]||0;if(a)for(n=0;n<r;++n)t[n][i][1]/=a}ni(t,e)}}function tC(t,e){if((u=t.length)>0)for(var n,r=0,i,o,a,s,u,c=t[e[0]].length;r<c;++r)for(a=s=0,n=0;n<u;++n)(o=(i=t[e[n]][r])[1]-i[0])>0?(i[0]=a,i[1]=a+=o):o<0?(i[1]=s,i[0]=s+=o):(i[0]=0,i[1]=o)}function eC(t,e){if((i=t.length)>0){for(var n=0,r=t[e[0]],i,o=r.length;n<o;++n){for(var a=0,s=0;a<i;++a)s+=t[a][n][1]||0;r[n][1]+=r[n][0]=-s/2}ni(t,e)}}function nC(t,e){if(!(!((a=t.length)>0)||!((o=(i=t[e[0]]).length)>0))){for(var n=0,r=1,i,o,a;r<o;++r){for(var s=0,u=0,c=0;s<a;++s){for(var l=t[e[s]],h=l[r][1]||0,f=l[r-1][1]||0,d=(h-f)/2,p=0;p<s;++p){var g=t[e[p]],m=g[r][1]||0,y=g[r-1][1]||0;d+=m-y}u+=h,c+=d*h}i[r-1][1]+=i[r-1][0]=n,u&&(n-=c/u)}i[r-1][1]+=i[r-1][0]=n,ni(t,e)}}function Vv(t){var e=t.map(rC);return ri(t).sort(function(n,r){return e[n]-e[r]})}function rC(t){for(var e=-1,n=0,r=t.length,i,o=-1/0;++e<r;)(i=+t[e][1])>o&&(o=i,n=e);return n}function jv(t){var e=t.map(Zv);return ri(t).sort(function(n,r){return e[n]-e[r]})}function Zv(t){for(var e=0,n=-1,r=t.length,i;++n<r;)(i=+t[n][1])&&(e+=i);return e}function iC(t){return jv(t).reverse()}function oC(t){var e=t.length,n,r,i=t.map(Zv),o=Vv(t),a=0,s=0,u=[],c=[];for(n=0;n<e;++n)r=o[n],a<s?(a+=i[r],u.push(r)):(s+=i[r],c.push(r));return c.reverse().concat(u)}function aC(t){return ri(t).reverse()}const _u=t=>()=>t;function sC(t,{sourceEvent:e,target:n,transform:r,dispatch:i}){Object.defineProperties(this,{type:{value:t,enumerable:!0,configurable:!0},sourceEvent:{value:e,enumerable:!0,configurable:!0},target:{value:n,enumerable:!0,configurable:!0},transform:{value:r,enumerable:!0,configurable:!0},_:{value:i}})}function Be(t,e,n){this.k=t,this.x=e,this.y=n}Be.prototype={constructor:Be,scale:function(t){return t===1?this:new Be(this.k*t,this.x,this.y)},translate:function(t,e){return t===0&e===0?this:new Be(this.k,this.x+this.k*t,this.y+this.k*e)},apply:function(t){return[t[0]*this.k+this.x,t[1]*this.k+this.y]},applyX:function(t){return t*this.k+this.x},applyY:function(t){return t*this.k+this.y},invert:function(t){return[(t[0]-this.x)/this.k,(t[1]-this.y)/this.k]},invertX:function(t){return(t-this.x)/this.k},invertY:function(t){return(t-this.y)/this.k},rescaleX:function(t){return t.copy().domain(t.range().map(this.invertX,this).map(t.invert,t))},rescaleY:function(t){return t.copy().domain(t.range().map(this.invertY,this).map(t.invert,t))},toString:function(){return"translate("+this.x+","+this.y+") scale("+this.k+")"}};var wu=new Be(1,0,0);Kv.prototype=Be.prototype;function Kv(t){for(;!t.__zoom;)if(!(t=t.parentNode))return wu;return t.__zoom}function gh(t){t.stopImmediatePropagation()}function Eo(t){t.preventDefault(),t.stopImmediatePropagation()}function uC(t){return(!t.ctrlKey||t.type==="wheel")&&!t.button}function cC(){var t=this;return t instanceof SVGElement?(t=t.ownerSVGElement||t,t.hasAttribute("viewBox")?(t=t.viewBox.baseVal,[[t.x,t.y],[t.x+t.width,t.y+t.height]]):[[0,0],[t.width.baseVal.value,t.height.baseVal.value]]):[[0,0],[t.clientWidth,t.clientHeight]]}function Qv(){return this.__zoom||wu}function lC(t){return-t.deltaY*(t.deltaMode===1?.05:t.deltaMode?1:.002)*(t.ctrlKey?10:1)}function fC(){return navigator.maxTouchPoints||"ontouchstart"in this}function hC(t,e,n){var r=t.invertX(e[0][0])-n[0][0],i=t.invertX(e[1][0])-n[1][0],o=t.invertY(e[0][1])-n[0][1],a=t.invertY(e[1][1])-n[1][1];return t.translate(i>r?(r+i)/2:Math.min(0,r)||Math.max(0,i),a>o?(o+a)/2:Math.min(0,o)||Math.max(0,a))}function Jv(){var t=uC,e=cC,n=hC,r=lC,i=fC,o=[0,1/0],a=[[-1/0,-1/0],[1/0,1/0]],s=250,u=Tg,c=In("start","zoom","end"),l,h,f,d=500,p=150,g=0,m=10;function y(T){T.property("__zoom",Qv).on("wheel.zoom",_,{passive:!1}).on("mousedown.zoom",P).on("dblclick.zoom",D).filter(i).on("touchstart.zoom",A).on("touchmove.zoom",I).on("touchend.zoom touchcancel.zoom",M).style("-webkit-tap-highlight-color","rgba(0,0,0,0)")}y.transform=function(T,k,E,N){var O=T.selection?T.selection():T;O.property("__zoom",Qv),T!==O?$(T,k,E,N):O.interrupt().each(function(){w(this,arguments).event(N).start().zoom(null,typeof k=="function"?k.apply(this,arguments):k).end()})},y.scaleBy=function(T,k,E,N){y.scaleTo(T,function(){var O=this.__zoom.k,L=typeof k=="function"?k.apply(this,arguments):k;return O*L},E,N)},y.scaleTo=function(T,k,E,N){y.transform(T,function(){var O=e.apply(this,arguments),L=this.__zoom,R=E==null?b(O):typeof E=="function"?E.apply(this,arguments):E,F=L.invert(R),C=typeof k=="function"?k.apply(this,arguments):k;return n(v(x(L,C),R,F),O,a)},E,N)},y.translateBy=function(T,k,E,N){y.transform(T,function(){return n(this.__zoom.translate(typeof k=="function"?k.apply(this,arguments):k,typeof E=="function"?E.apply(this,arguments):E),e.apply(this,arguments),a)},null,N)},y.translateTo=function(T,k,E,N,O){y.transform(T,function(){var L=e.apply(this,arguments),R=this.__zoom,F=N==null?b(L):typeof N=="function"?N.apply(this,arguments):N;return n(wu.translate(F[0],F[1]).scale(R.k).translate(typeof k=="function"?-k.apply(this,arguments):-k,typeof E=="function"?-E.apply(this,arguments):-E),L,a)},N,O)};function x(T,k){return k=Math.max(o[0],Math.min(o[1],k)),k===T.k?T:new Be(k,T.x,T.y)}function v(T,k,E){var N=k[0]-E[0]*T.k,O=k[1]-E[1]*T.k;return N===T.x&&O===T.y?T:new Be(T.k,N,O)}function b(T){return[(+T[0][0]+ +T[1][0])/2,(+T[0][1]+ +T[1][1])/2]}function $(T,k,E,N){T.on("start.zoom",function(){w(this,arguments).event(N).start()}).on("interrupt.zoom end.zoom",function(){w(this,arguments).event(N).end()}).tween("zoom",function(){var O=this,L=arguments,R=w(O,L).event(N),F=e.apply(O,L),C=E==null?b(F):typeof E=="function"?E.apply(O,L):E,z=Math.max(F[1][0]-F[0][0],F[1][1]-F[0][1]),X=O.__zoom,W=typeof k=="function"?k.apply(O,L):k,V=u(X.invert(C).concat(z/X.k),W.invert(C).concat(z/W.k));return function(J){if(J===1)J=W;else{var ht=V(J),q=z/ht[2];J=new Be(q,C[0]-ht[0]*q,C[1]-ht[1]*q)}R.zoom(null,J)}})}function w(T,k,E){return!E&&T.__zooming||new S(T,k)}function S(T,k){this.that=T,this.args=k,this.active=0,this.sourceEvent=null,this.extent=e.apply(T,k),this.taps=0}S.prototype={event:function(T){return T&&(this.sourceEvent=T),this},start:function(){return++this.active===1&&(this.that.__zooming=this,this.emit("start")),this},zoom:function(T,k){return this.mouse&&T!=="mouse"&&(this.mouse[1]=k.invert(this.mouse[0])),this.touch0&&T!=="touch"&&(this.touch0[1]=k.invert(this.touch0[0])),this.touch1&&T!=="touch"&&(this.touch1[1]=k.invert(this.touch1[0])),this.that.__zoom=k,this.emit("zoom"),this},end:function(){return--this.active===0&&(delete this.that.__zooming,this.emit("end")),this},emit:function(T){var k=Z(this.that).datum();c.call(T,this.that,new sC(T,{sourceEvent:this.sourceEvent,target:y,type:T,transform:this.that.__zoom,dispatch:c}),k)}};function _(T,...k){if(!t.apply(this,arguments))return;var E=w(this,k).event(T),N=this.__zoom,O=Math.max(o[0],Math.min(o[1],N.k*Math.pow(2,r.apply(this,arguments)))),L=ae(T);if(E.wheel)(E.mouse[0][0]!==L[0]||E.mouse[0][1]!==L[1])&&(E.mouse[1]=N.invert(E.mouse[0]=L)),clearTimeout(E.wheel);else{if(N.k===O)return;E.mouse=[L,N.invert(L)],Yn(this),E.start()}Eo(T),E.wheel=setTimeout(R,p),E.zoom("mouse",n(v(x(N,O),E.mouse[0],E.mouse[1]),E.extent,a));function R(){E.wheel=null,E.end()}}function P(T,...k){if(f||!t.apply(this,arguments))return;var E=T.currentTarget,N=w(this,k,!0).event(T),O=Z(T.view).on("mousemove.zoom",C,!0).on("mouseup.zoom",z,!0),L=ae(T,E),R=T.clientX,F=T.clientY;Aa(T.view),gh(T),N.mouse=[L,this.__zoom.invert(L)],Yn(this),N.start();function C(X){if(Eo(X),!N.moved){var W=X.clientX-R,V=X.clientY-F;N.moved=W*W+V*V>g}N.event(X).zoom("mouse",n(v(N.that.__zoom,N.mouse[0]=ae(X,E),N.mouse[1]),N.extent,a))}function z(X){O.on("mousemove.zoom mouseup.zoom",null),Ma(X.view,N.moved),Eo(X),N.event(X).end()}}function D(T,...k){if(t.apply(this,arguments)){var E=this.__zoom,N=ae(T.changedTouches?T.changedTouches[0]:T,this),O=E.invert(N),L=E.k*(T.shiftKey?.5:2),R=n(v(x(E,L),N,O),e.apply(this,k),a);Eo(T),s>0?Z(this).transition().duration(s).call($,R,N,T):Z(this).call(y.transform,R,N,T)}}function A(T,...k){if(t.apply(this,arguments)){var E=T.touches,N=E.length,O=w(this,k,T.changedTouches.length===N).event(T),L,R,F,C;for(gh(T),R=0;R<N;++R)F=E[R],C=ae(F,this),C=[C,this.__zoom.invert(C),F.identifier],O.touch0?!O.touch1&&O.touch0[2]!==C[2]&&(O.touch1=C,O.taps=0):(O.touch0=C,L=!0,O.taps=1+!!l);l&&(l=clearTimeout(l)),L&&(O.taps<2&&(h=C[0],l=setTimeout(function(){l=null},d)),Yn(this),O.start())}}function I(T,...k){if(this.__zooming){var E=w(this,k).event(T),N=T.changedTouches,O=N.length,L,R,F,C;for(Eo(T),L=0;L<O;++L)R=N[L],F=ae(R,this),E.touch0&&E.touch0[2]===R.identifier?E.touch0[0]=F:E.touch1&&E.touch1[2]===R.identifier&&(E.touch1[0]=F);if(R=E.that.__zoom,E.touch1){var z=E.touch0[0],X=E.touch0[1],W=E.touch1[0],V=E.touch1[1],J=(J=W[0]-z[0])*J+(J=W[1]-z[1])*J,ht=(ht=V[0]-X[0])*ht+(ht=V[1]-X[1])*ht;R=x(R,Math.sqrt(J/ht)),F=[(z[0]+W[0])/2,(z[1]+W[1])/2],C=[(X[0]+V[0])/2,(X[1]+V[1])/2]}else if(E.touch0)F=E.touch0[0],C=E.touch0[1];else return;E.zoom("touch",n(v(R,F,C),E.extent,a))}}function M(T,...k){if(this.__zooming){var E=w(this,k).event(T),N=T.changedTouches,O=N.length,L,R;for(gh(T),f&&clearTimeout(f),f=setTimeout(function(){f=null},d),L=0;L<O;++L)R=N[L],E.touch0&&E.touch0[2]===R.identifier?delete E.touch0:E.touch1&&E.touch1[2]===R.identifier&&delete E.touch1;if(E.touch1&&!E.touch0&&(E.touch0=E.touch1,delete E.touch1),E.touch0)E.touch0[1]=this.__zoom.invert(E.touch0[0]);else if(E.end(),E.taps===2&&(R=ae(R,this),Math.hypot(h[0]-R[0],h[1]-R[1])<m)){var F=Z(this).on("dblclick.zoom");F&&F.apply(this,arguments)}}}return y.wheelDelta=function(T){return arguments.length?(r=typeof T=="function"?T:_u(+T),y):r},y.filter=function(T){return arguments.length?(t=typeof T=="function"?T:_u(!!T),y):t},y.touchable=function(T){return arguments.length?(i=typeof T=="function"?T:_u(!!T),y):i},y.extent=function(T){return arguments.length?(e=typeof T=="function"?T:_u([[+T[0][0],+T[0][1]],[+T[1][0],+T[1][1]]]),y):e},y.scaleExtent=function(T){return arguments.length?(o[0]=+T[0],o[1]=+T[1],y):[o[0],o[1]]},y.translateExtent=function(T){return arguments.length?(a[0][0]=+T[0][0],a[1][0]=+T[1][0],a[0][1]=+T[0][1],a[1][1]=+T[1][1],y):[[a[0][0],a[0][1]],[a[1][0],a[1][1]]]},y.constrain=function(T){return arguments.length?(n=T,y):n},y.duration=function(T){return arguments.length?(s=+T,y):s},y.interpolate=function(T){return arguments.length?(u=T,y):u},y.on=function(){var T=c.on.apply(c,arguments);return T===c?y:T},y.clickDistance=function(T){return arguments.length?(g=(T=+T)*T,y):Math.sqrt(g)},y.tapDistance=function(T){return arguments.length?(m=+T,y):m},y}const t2=Object.freeze(Object.defineProperty({__proto__:null,Adder:Dt,Delaunay:Ml,FormatSpecifier:as,InternMap:Mi,InternSet:Ln,Node:Jn,Path:qi,Voronoi:g1,ZoomTransform:Be,active:gM,arc:cv,area:fv,areaRadial:mv,ascending:_t,autoType:z7,axisBottom:s5,axisLeft:Dp,axisRight:a5,axisTop:Pp,bin:bp,bisect:kn,bisectCenter:n6,bisectLeft:e6,bisectRight:rp,bisector:fa,blob:B7,blur:r6,blur2:ip,blurImage:i6,brush:PM,brushSelection:AM,brushX:MM,brushY:TM,buffer:W7,chord:EM,chordDirected:LM,chordTranspose:kM,cluster:nP,color:hn,contourDensity:i7,contours:_l,count:da,create:BA,creator:wa,cross:f6,csv:X7,csvFormat:P7,csvFormatBody:D7,csvFormatRow:k7,csvFormatRows:E7,csvFormatValue:L7,csvParse:v1,csvParseRows:T7,cubehelix:Me,cumsum:h6,curveBasis:CL,curveBasisClosed:RL,curveBasisOpen:IL,curveBumpX:bv,curveBumpY:vv,curveBundle:NL,curveCardinal:FL,curveCardinalClosed:GL,curveCardinalOpen:zL,curveCatmullRom:OL,curveCatmullRomClosed:UL,curveCatmullRomOpen:BL,curveLinear:hu,curveLinearClosed:YL,curveMonotoneX:WL,curveMonotoneY:HL,curveNatural:qL,curveStep:XL,curveStepAfter:jL,curveStepBefore:VL,descending:ep,deviation:sp,difference:V6,disjoint:j6,dispatch:In,drag:Up,dragDisable:Aa,dragEnable:Ma,dsv:q7,dsvFormat:ns,easeBack:jg,easeBackIn:sM,easeBackInOut:jg,easeBackOut:uM,easeBounce:Wi,easeBounceIn:oM,easeBounceInOut:aM,easeBounceOut:Wi,easeCircle:Vg,easeCircleIn:j4,easeCircleInOut:Vg,easeCircleOut:Z4,easeCubic:Yi,easeCubicIn:U4,easeCubicInOut:Yi,easeCubicOut:B4,easeElastic:ja,easeElasticIn:cM,easeElasticInOut:lM,easeElasticOut:ja,easeExp:Xg,easeExpIn:X4,easeExpInOut:Xg,easeExpOut:V4,easeLinear:G4,easePoly:Yg,easePolyIn:Y4,easePolyInOut:Yg,easePolyOut:W4,easeQuad:Bg,easeQuadIn:z4,easeQuadInOut:Bg,easeQuadOut:O4,easeSin:qg,easeSinIn:H4,easeSinInOut:qg,easeSinOut:q4,every:B6,extent:Ai,fcumsum:p6,filter:W6,flatGroup:g6,flatRollup:m6,forceCenter:e9,forceCollide:S1,forceLink:_9,forceManyBody:P1,forceRadial:D9,forceSimulation:T1,forceX:D1,forceY:E1,get format(){return Zi},formatDefaultLocale:G1,formatLocale:F1,get formatPrefix(){return Ll},formatSpecifier:Ur,fsum:d6,geoAlbers:Qm,geoAlbersUsa:RT,geoArea:z9,geoAzimuthalEqualArea:IT,geoAzimuthalEqualAreaRaw:bf,geoAzimuthalEquidistant:NT,geoAzimuthalEquidistantRaw:vf,geoBounds:Y9,geoCentroid:j9,geoCircle:Z9,geoClipAntimeridian:Zl,geoClipCircle:xm,geoClipExtent:rT,geoClipRectangle:Ps,geoConicConformal:GT,geoConicConformalRaw:ey,geoConicEqualArea:Os,geoConicEqualAreaRaw:Km,geoConicEquidistant:OT,geoConicEquidistantRaw:ny,geoContains:lT,geoDistance:ks,geoEqualEarth:BT,geoEqualEarthRaw:xf,geoEquirectangular:zT,geoEquirectangularRaw:ho,geoGnomonic:YT,geoGnomonicRaw:_f,geoGraticule:Em,geoGraticule10:fT,geoIdentity:WT,geoInterpolate:hT,geoLength:_m,geoMercator:FT,geoMercatorRaw:fo,geoNaturalEarth1:HT,geoNaturalEarth1Raw:wf,geoOrthographic:qT,geoOrthographicRaw:$f,geoPath:ST,geoProjection:ze,geoProjectionMutator:mf,geoRotation:hm,geoStereographic:XT,geoStereographicRaw:Sf,geoStream:Pe,geoTransform:AT,geoTransverseMercator:VT,geoTransverseMercatorRaw:Af,gray:u8,greatest:vp,greatestIndex:N6,group:fp,groupSort:v6,groups:hp,hcl:Ra,hierarchy:Mf,histogram:bp,hsl:Ea,html:J7,image:j7,index:y6,indexes:b6,interpolate:dn,interpolateArray:p8,interpolateBasis:hg,interpolateBasisClosed:dg,interpolateBlues:Uk,interpolateBrBG:xk,interpolateBuGn:Dk,interpolateBuPu:Ek,interpolateCividis:Xk,interpolateCool:Zk,interpolateCubehelix:D8,interpolateCubehelixDefault:Vk,interpolateCubehelixLong:Oa,interpolateDate:vg,interpolateDiscrete:y8,interpolateGnBu:kk,interpolateGreens:Bk,interpolateGreys:Yk,interpolateHcl:T8,interpolateHclLong:P8,interpolateHsl:S8,interpolateHslLong:A8,interpolateHue:b8,interpolateInferno:iL,interpolateLab:M8,interpolateMagma:rL,interpolateNumber:fe,interpolateNumberArray:qc,interpolateObject:xg,interpolateOrRd:Lk,interpolateOranges:qk,interpolatePRGn:_k,interpolatePiYG:wk,interpolatePlasma:oL,interpolatePuBu:Rk,interpolatePuBuGn:Ck,interpolatePuOr:$k,interpolatePuRd:Ik,interpolatePurples:Wk,interpolateRainbow:Kk,interpolateRdBu:Sk,interpolateRdGy:Ak,interpolateRdPu:Nk,interpolateRdYlBu:Mk,interpolateRdYlGn:Tk,interpolateReds:Hk,interpolateRgb:Ni,interpolateRgbBasis:mg,interpolateRgbBasisClosed:d8,interpolateRound:Ga,interpolateSinebow:tL,interpolateSpectral:Pk,interpolateString:jc,interpolateTransformCss:Sg,interpolateTransformSvg:Ag,interpolateTurbo:eL,interpolateViridis:nL,interpolateWarm:jk,interpolateYlGn:Gk,interpolateYlGnBu:Fk,interpolateYlOrBr:zk,interpolateYlOrRd:Ok,interpolateZoom:Tg,interrupt:Yn,intersection:Z6,interval:R8,isoFormat:JE,isoParse:nk,json:K7,lab:Ca,lch:c8,least:I6,leastIndex:wp,line:du,lineRadial:gv,link:pu,linkHorizontal:_L,linkRadial:$L,linkVertical:wL,local:zp,map:H6,matcher:kc,max:Ti,maxIndex:Sc,mean:T6,median:P6,medianIndex:D6,merge:Mc,min:ma,minIndex:Ac,mode:k6,namespace:ki,namespaces:Dc,nice:wc,now:Ui,pack:LP,packEnclose:MP,packSiblings:EP,pairs:L6,partition:CP,path:xl,pathRound:IM,permute:yp,pie:hv,piecewise:kg,pointRadial:Do,pointer:ae,pointers:WA,polygonArea:jP,polygonCentroid:ZP,polygonContains:tD,polygonHull:JP,polygonLength:eD,precisionFixed:z1,precisionPrefix:O1,precisionRound:U1,quadtree:is,quantile:Di,quantileIndex:_p,quantileSorted:xp,quantize:E8,quickselect:ya,radialArea:mv,radialLine:gv,randomBates:oD,randomBernoulli:uD,randomBeta:Sy,randomBinomial:Ay,randomCauchy:lD,randomExponential:aD,randomGamma:If,randomGeometric:$y,randomInt:rD,randomIrwinHall:wy,randomLcg:gD,randomLogNormal:iD,randomLogistic:fD,randomNormal:Rf,randomPareto:sD,randomPoisson:hD,randomUniform:nD,randomWeibull:cD,range:ln,rank:R6,reduce:q6,reverse:X6,rgb:Dr,ribbon:YM,ribbonArrow:WM,rollup:pp,rollups:gp,scaleBand:Gf,scaleDiverging:kb,scaleDivergingLog:Lb,scaleDivergingPow:rh,scaleDivergingSqrt:uk,scaleDivergingSymlog:Cb,scaleIdentity:Ey,scaleImplicit:Nf,scaleLinear:Bf,scaleLog:Iy,scaleOrdinal:Ff,scalePoint:zf,scalePow:Zs,scaleQuantile:By,scaleQuantize:Yy,scaleRadial:Uy,scaleSequential:Tb,scaleSequentialLog:Pb,scaleSequentialPow:nh,scaleSequentialQuantile:Eb,scaleSequentialSqrt:sk,scaleSequentialSymlog:Db,scaleSqrt:TD,scaleSymlog:Gy,scaleThreshold:Wy,scaleTime:ok,scaleUtc:ak,scan:F6,schemeAccent:lk,schemeBlues:ev,schemeBrBG:Rb,schemeBuGn:Yb,schemeBuPu:Wb,schemeCategory10:ck,schemeDark2:fk,schemeGnBu:Hb,schemeGreens:nv,schemeGreys:rv,schemeObservable10:hk,schemeOrRd:qb,schemeOranges:av,schemePRGn:Ib,schemePaired:dk,schemePastel1:pk,schemePastel2:gk,schemePiYG:Nb,schemePuBu:Vb,schemePuBuGn:Xb,schemePuOr:Fb,schemePuRd:jb,schemePurples:iv,schemeRdBu:Gb,schemeRdGy:zb,schemeRdPu:Zb,schemeRdYlBu:Ob,schemeRdYlGn:Ub,schemeReds:ov,schemeSet1:mk,schemeSet2:yk,schemeSet3:bk,schemeSpectral:Bb,schemeTableau10:vk,schemeYlGn:Qb,schemeYlGnBu:Kb,schemeYlOrBr:Jb,schemeYlOrRd:tv,select:Z,selectAll:HA,selection:Fn,selector:$a,selectorAll:Ec,shuffle:G6,shuffler:$p,some:Y6,sort:vc,stack:QL,stackOffsetDiverging:tC,stackOffsetExpand:JL,stackOffsetNone:ni,stackOffsetSilhouette:eC,stackOffsetWiggle:nC,stackOrderAppearance:Vv,stackOrderAscending:jv,stackOrderDescending:iC,stackOrderInsideOut:oC,stackOrderNone:ri,stackOrderReverse:aC,stratify:FP,style:Nn,subset:Q6,sum:z6,superset:Ap,svg:t9,symbol:LL,symbolAsterisk:xv,symbolCircle:gu,symbolCross:_v,symbolDiamond:$v,symbolDiamond2:Sv,symbolPlus:Av,symbolSquare:Mv,symbolSquare2:Tv,symbolStar:Dv,symbolTimes:ch,symbolTriangle:Ev,symbolTriangle2:kv,symbolWye:Lv,symbolX:ch,symbols:Cv,symbolsFill:Cv,symbolsStroke:kL,text:rs,thresholdFreedmanDiaconis:A6,thresholdScott:M6,thresholdSturges:$c,tickFormat:Dy,tickIncrement:Rn,tickStep:ga,ticks:Cn,timeDay:Kr,timeDays:CD,get timeFormat(){return Jf},timeFormatDefaultLocale:Ab,timeFormatLocale:cb,timeFriday:Zy,timeFridays:OD,timeHour:Js,timeHours:kD,timeInterval:Tt,timeMillisecond:Zr,timeMilliseconds:Hy,timeMinute:Ks,timeMinutes:DD,timeMonday:wo,timeMondays:ND,timeMonth:eu,timeMonths:VD,get timeParse(){return Sb},timeSaturday:Ky,timeSaturdays:UD,timeSecond:an,timeSeconds:Xy,timeSunday:Qr,timeSundays:Qy,timeThursday:nr,timeThursdays:zD,timeTickInterval:ub,timeTicks:sb,timeTuesday:Vy,timeTuesdays:FD,timeWednesday:jy,timeWednesdays:GD,timeWeek:Qr,timeWeeks:Qy,timeYear:Oe,timeYears:ZD,timeout:Qc,timer:Wa,timerFlush:Rg,transition:Og,transpose:Sp,tree:WP,treemap:HP,treemapBinary:qP,treemapDice:vo,treemapResquarify:VP,treemapSlice:Xs,treemapSliceDice:XP,treemapSquarify:xy,tsv:V7,tsvFormat:R7,tsvFormatBody:I7,tsvFormatRow:F7,tsvFormatRows:N7,tsvFormatValue:G7,tsvParse:x1,tsvParseRows:C7,union:J6,unixDay:Zf,unixDays:ID,utcDay:_o,utcDays:RD,get utcFormat(){return ru},utcFriday:eb,utcFridays:qD,utcHour:tu,utcHours:LD,utcMillisecond:Zr,utcMilliseconds:Hy,utcMinute:Qs,utcMinutes:ED,utcMonday:$o,utcMondays:BD,utcMonth:nu,utcMonths:jD,get utcParse(){return th},utcSaturday:nb,utcSaturdays:XD,utcSecond:an,utcSeconds:Xy,utcSunday:Jr,utcSundays:rb,utcThursday:ir,utcThursdays:HD,utcTickInterval:ab,utcTicks:ob,utcTuesday:Jy,utcTuesdays:YD,utcWednesday:tb,utcWednesdays:WD,utcWeek:Jr,utcWeeks:rb,utcYear:Ue,utcYears:KD,variance:ap,window:Lc,xml:Q7,zip:U6,zoom:Jv,zoomIdentity:wu,zoomTransform:Kv},Symbol.toStringTag,{value:"Module"}));function e2(t){try{return t.node().getBBox()}catch(e){throw new Error(e)}}function dC(t,e){function n(i){var s;const o=document.createElementNS("http://www.w3.org/1999/xhtml","div");o.innerHTML='<svg xmlns="http://www.w3.org/2000/svg">'+i+"</svg>";const a=document.createDocumentFragment();for(;a&&((s=o==null?void 0:o.firstChild)!=null&&s.firstChild);)a.appendChild(o.firstChild.firstChild);return a}const r=t.node();for(;r.hasChildNodes();)r.removeChild(r.firstChild);t.node().appendChild(n(e))}function ii(t){return t.substring(0,4)!=="ease"?Yi:t2[t]??Yi}function $u({axisWidth:t,innerRadius:e,outerRadius:n,padAngle:r,cornerRadius:i}){const o=Bf().domain([0,1]).range([0,t/2]),a=o(n);return cv().innerRadius(o(e)).outerRadius(a).padAngle(r).padRadius(a).cornerRadius(i)}const mh=(t,e)=>e instanceof Function?e(t):Zi(e)(t);function n2(t,e=10){var i;const n=document.createElement("canvas").getContext("2d");return(((i=n==null?void 0:n.measureText(t))==null?void 0:i.width)??0)*e/10}function pC(t){const e=[0,0];return t.length?t.reduce((r,i)=>[i<r[0]?i:r[0],i>r[1]?i:r[1]],[t[0],t[0]]):e}function gC(t){const e=t.filter(n=>n.value!=null&&n.visible!=!1).map(n=>n.value);return pC(e)}function Bt(t,e){const n=e.colors[e.colorScheme];return t==="series"?n.series[0]:t=="none"?"none":n[t]!=null?n[t]:n.primary}function mC(t,e){const n=t<e.colors[e.colorScheme].series.length?t:t%e.colors[e.colorScheme].series.length;return e.colors[e.colorScheme].series[n]}function yh({datum:t,colorType:e,fullChartParams:n}){return e==="series"?t.color?t.color:n.colors[n.colorScheme].series[0]:e=="none"?"none":n.colors[n.colorScheme][e]!=null?n.colors[n.colorScheme][e]:n.colors[n.colorScheme].primary}function ut(t,e,n){const r=n?`--${n}`:"";return`orbcharts-${t}__${e}${r}`}function oi(t,e){const r=Math.random().toString(36).substr(2,5);return ut(t,e,r)}const ko=({selection:t,pluginName:e,clipPathID:n,existedSeriesLabels$:r,gridContainer$:i,gridAxesTransform$:o,gridGraphicTransform$:a})=>{const s=ut(e,"series"),u=ut(e,"axes"),c=ut(e,"graphic"),l=r.pipe(B((p,g)=>t.selectAll(`g.${s}`).data(p,m=>m).join(m=>m.append("g").classed(s,!0).each((y,x,v)=>{Z(v[x]).selectAll(`g.${u}`).data([x]).join(b=>b.append("g").classed(u,!0).attr("clip-path",`url(#${n})`).each(($,w,S)=>{Z(S[w]).selectAll("defs").data([w]).join("defs"),Z(S[w]).selectAll("g").data([w]).join("g").classed(c,!0)}),b=>b,b=>b.remove())}),m=>m,m=>m.remove())),U(p=>H({seriesSelection:Fu(p),gridContainer:i})),B(p=>(p.seriesSelection.transition().attr("transform",(g,m)=>{const y=p.gridContainer[m]??p.gridContainer[0],x=y.translate,v=y.scale;return`translate(${x[0]}, ${x[1]}) scale(${v[0]}, ${v[1]})`}),p.seriesSelection)),Ye(1)),h=H({seriesSelection:l,gridAxesTransform:o}).pipe(U(async p=>p),B(p=>p.seriesSelection.select(`g.${u}`).style("transform",p.gridAxesTransform.value)),Ye(1)),f=h.pipe(B(p=>p.select("defs")),Ye(1)),d=H({axesSelection:h,gridGraphicTransform:a}).pipe(U(async p=>p),B(p=>{const g=p.axesSelection.select(`g.${c}`);return g.transition().duration(50).style("transform",p.gridGraphicTransform.value),g}),Ye(1));return{seriesSelection$:l,axesSelection$:h,defsSelection$:f,graphicGSelection$:d}},r2=({fullDataFormatter$:t,gridAxesSize$:e,computedData$:n,fullChartParams$:r})=>{const i=new it,o=new lt(a=>{H({dataFormatter:t,computedData:n}).pipe(G(i),U(async s=>s)).subscribe(s=>{const c=s.computedData[0]?s.computedData[0].length-1:0,l=s.dataFormatter.grid.groupAxis.scaleDomain[0]==="auto"?0-s.dataFormatter.grid.groupAxis.scalePadding:s.dataFormatter.grid.groupAxis.scaleDomain[0]-s.dataFormatter.grid.groupAxis.scalePadding,h=s.dataFormatter.grid.groupAxis.scaleDomain[1]==="auto"?c+s.dataFormatter.grid.groupAxis.scalePadding:s.dataFormatter.grid.groupAxis.scaleDomain[1]+s.dataFormatter.grid.groupAxis.scalePadding,d=(s.dataFormatter.grid.gridData.seriesDirection==="row"?(s.computedData[0]??[]).map(p=>p.groupLabel):s.computedData.map(p=>p[0].groupLabel)).filter((p,g)=>g>=l&&g<=h);a.next(d)})});return new lt(a=>{H({dataFormatter:t,axisSize:e,fullChartParams:r,scaleRangeGroupLabels:o}).pipe(G(i),U(async s=>s)).subscribe(s=>{const u=s.dataFormatter.grid.valueAxis.position==="right"||s.dataFormatter.grid.valueAxis.position==="bottom",c=KS({axisLabels:s.scaleRangeGroupLabels,axisWidth:s.axisSize.width,reverse:u}),l=f=>s.dataFormatter.grid.groupAxis.position==="bottom"||s.dataFormatter.grid.groupAxis.position==="top"?f.offsetX-s.fullChartParams.padding.left:f.offsetY-s.fullChartParams.padding.top,h=f=>{const d=l(f),p=c(d);return{groupIndex:p,groupLabel:s.scaleRangeGroupLabels[p]??""}};return a.next(h),function(){i.next(void 0)}})})};function yC(t="curveLinear"){return du().x(e=>e.axisX).y(e=>e.axisY).curve(t2[t])}function bC(t){let e=[[]],n=0;for(let r in t){if(t[r].visible==!1||t[r].value===void 0||t[r].value===null){e[n].length&&(n++,e[n]=[]);continue}e[n].push(t[r])}return e}function vC({selection:t,pathClassName:e,segmentData:n,linePath:r,params:i}){return t.selectAll("path").data(n,(a,s)=>a.length?`${a[0].id}_${a[a.length-1].id}`:s).join(a=>a.append("path").classed(e,!0).attr("fill","none").attr("pointer-events","visibleStroke").style("vector-effect","non-scaling-stroke").style("cursor","pointer"),a=>a,a=>a.remove()).attr("stroke-width",i.lineWidth).attr("stroke",(a,s)=>a[0]&&a[0].color).attr("d",a=>r(a))}function xC({selection:t,seriesLabel:e,fullChartParams:n}){if(t.interrupt("highlight"),!e){t.transition("highlight").duration(200).style("opacity",1);return}t.each((r,i,o)=>{r===e?Z(o[i]).style("opacity",1):Z(o[i]).style("opacity",n.styles.unhighlightedOpacity)})}function _C({defsSelection:t,clipPathData:e,transitionDuration:n,transitionEase:r}){t.selectAll("clipPath").data(e).join(i=>i.append("clipPath"),i=>i,i=>i.remove()).attr("id",i=>i.id).each((i,o,a)=>{Z(a[o]).selectAll("rect").data([i]).join(s=>{const u=s.append("rect");return u.transition().duration(n).ease(ii(r)).tween("tween",(c,l,h)=>f=>{const d=c.width*f;u.attr("x",0).attr("y",0).attr("width",p=>d).attr("height",p=>p.height)}),u},s=>s.attr("x",0).attr("y",0).attr("width",u=>u.width).attr("height",u=>u.height),s=>s.remove())})}const i2=(t,{selection:e,computedData$:n,existedSeriesLabels$:r,SeriesDataMap$:i,GroupDataMap$:o,fullParams$:a,fullDataFormatter$:s,fullChartParams$:u,gridAxesTransform$:c,gridGraphicTransform$:l,gridAxesSize$:h,gridHighlight$:f,gridContainer$:d,event$:p})=>{const g=new it,m=oi(t,"clipPath-box"),y=ut(t,"path"),{seriesSelection$:x,axesSelection$:v,defsSelection$:b,graphicGSelection$:$}=ko({selection:e,pluginName:t,clipPathID:m,existedSeriesLabels$:r,gridContainer$:d,gridAxesTransform$:c,gridGraphicTransform$:l}),w=new lt(M=>{const T=a.pipe(G(g)).subscribe(k=>{if(!k)return;const E=yC(k.lineCurve);M.next(E)});return()=>{T.unsubscribe()}}),S=new lt(M=>{n.pipe(G(g),U(async T=>T)).subscribe(T=>{const k=T[0]&&T[0][0]?T.map(E=>E[0].seriesLabel):[];M.next(k)})}),_=u.pipe(B(M=>M.transitionDuration),dt()),P=u.pipe(B(M=>M.transitionEase),dt());H({defsSelection:b,seriesLabels:S,axisSize:h,transitionDuration:_,transitionEase:P}).pipe(G(g),U(async M=>M)).subscribe(M=>{const k=[{id:m,width:M.axisSize.width,height:M.axisSize.height}].concat(M.seriesLabels.map(E=>({id:`orbcharts__clipPath_${E}`,width:M.axisSize.width,height:M.axisSize.height})));_C({defsSelection:M.defsSelection,clipPathData:k,transitionDuration:M.transitionDuration,transitionEase:M.transitionEase})});const D=n.pipe(B(M=>{const T=new Map;return M.flat().forEach(k=>T.set(k.id,k)),T})),A=r2({fullDataFormatter$:s,gridAxesSize$:h,computedData$:n,fullChartParams$:u}),I=u.pipe(G(g),B(M=>M.highlightTarget),dt());return H({graphicGSelection:$,seriesLabels:S,computedData:n,SeriesDataMap:i,GroupDataMap:o,linePath:w,params:a,highlightTarget:I,gridGroupPositionFn:A}).pipe(G(g),U(async M=>M)).subscribe(M=>{M.graphicGSelection.each((T,k,E)=>{const N=bC(M.computedData[k]??[]);vC({selection:Z(E[k]),pathClassName:y,linePath:M.linePath,segmentData:N,params:M.params}).on("mouseover",(L,R)=>{L.stopPropagation();const F=R[0]?R[0].seriesLabel:"",{groupIndex:C,groupLabel:z}=M.gridGroupPositionFn(L),V=M.GroupDataMap.get(z).find(J=>J.seriesLabel===F)??R[0];p.next({type:"grid",eventName:"mouseover",pluginName:t,highlightTarget:M.highlightTarget,datum:V,series:M.SeriesDataMap.get(V.seriesLabel),seriesIndex:V.seriesIndex,seriesLabel:V.seriesLabel,groups:M.GroupDataMap.get(V.groupLabel),groupIndex:V.groupIndex,groupLabel:V.groupLabel,event:L,data:M.computedData})}).on("mousemove",(L,R)=>{L.stopPropagation();const F=R[0]?R[0].seriesLabel:"",{groupIndex:C,groupLabel:z}=M.gridGroupPositionFn(L),V=M.GroupDataMap.get(z).find(J=>J.seriesLabel===F)??R[0];p.next({type:"grid",eventName:"mousemove",pluginName:t,highlightTarget:M.highlightTarget,datum:V,series:M.SeriesDataMap.get(V.seriesLabel),seriesIndex:V.seriesIndex,seriesLabel:V.seriesLabel,groups:M.GroupDataMap.get(V.groupLabel),groupIndex:V.groupIndex,groupLabel:V.groupLabel,event:L,data:M.computedData})}).on("mouseout",(L,R)=>{L.stopPropagation();const F=R[0]?R[0].seriesLabel:"",{groupIndex:C,groupLabel:z}=M.gridGroupPositionFn(L),V=M.GroupDataMap.get(z).find(J=>J.seriesLabel===F)??R[0];p.next({type:"grid",eventName:"mouseout",pluginName:t,highlightTarget:M.highlightTarget,datum:V,series:M.SeriesDataMap.get(V.seriesLabel),seriesIndex:V.seriesIndex,seriesLabel:V.seriesLabel,groups:M.GroupDataMap.get(V.groupLabel),groupIndex:V.groupIndex,groupLabel:V.groupLabel,event:L,data:M.computedData})}).on("click",(L,R)=>{L.stopPropagation();const F=R[0]?R[0].seriesLabel:"",{groupIndex:C,groupLabel:z}=M.gridGroupPositionFn(L),V=M.GroupDataMap.get(z).find(J=>J.seriesLabel===F)??R[0];p.next({type:"grid",eventName:"click",pluginName:t,highlightTarget:M.highlightTarget,datum:V,series:M.SeriesDataMap.get(V.seriesLabel),seriesIndex:V.seriesIndex,seriesLabel:V.seriesLabel,groups:M.GroupDataMap.get(V.groupLabel),groupIndex:V.groupIndex,groupLabel:V.groupLabel,event:L,data:M.computedData})})})}),u.pipe(G(g),Fo(M=>M.highlightTarget==="series"),U(M=>H({graphicGSelection:$,highlight:f,DataMap:D,fullChartParams:u}).pipe(G(g),U(async T=>T)))).subscribe(M=>{const T=M.DataMap.get(M.highlight[0]);xC({selection:M.graphicGSelection,seriesLabel:T&&T.seriesLabel?T.seriesLabel:null,fullChartParams:M.fullChartParams})}),()=>{g.next(void 0)}},o2="Lines",wC=$e(o2,ar)(({selection:t,name:e,observer:n,subject:r})=>{const i=new it,o=i2(o2,{selection:t,computedData$:n.computedData$,existedSeriesLabels$:n.existedSeriesLabels$,SeriesDataMap$:n.SeriesDataMap$,GroupDataMap$:n.GroupDataMap$,fullParams$:n.fullParams$,fullDataFormatter$:n.fullDataFormatter$,fullChartParams$:n.fullChartParams$,gridAxesTransform$:n.gridAxesTransform$,gridGraphicTransform$:n.gridGraphicTransform$,gridAxesSize$:n.gridAxesSize$,gridHighlight$:n.gridHighlight$,gridContainer$:n.gridContainer$,event$:r.event$});return()=>{i.next(void 0),o()}}),a2=.3;function s2({axisWidth:t,groupAmount:e,barAmountOfGroup:n,barPadding:r=0,barGroupPadding:i=0}){const a=(t/(e-1)-i)/n-r;return a>1?a:1}function $C(t,e,n){const r=t/2,i=t*e.length+n.barPadding*e.length;return zf().domain(e).range([-i/2+r,i/2-r])}function SC(t,e){return t<=1?0:e/(t-1)*a2}function AC(t,e){return t<=1?e:e*(1-a2)}function MC({graphicGSelection:t,rectClassName:e,computedData:n,zeroYArr:r,groupLabels:i,barScale:o,params:a,chartParams:s,barWidth:u,transformedBarRadius:c,delayGroup:l,transitionItem:h,isSeriesPositionSeprate:f}){const d=u/2;return t.each((g,m,y)=>{Z(y[m]).selectAll(`rect.${e}`).data(n[m]??[],x=>x.id).join(x=>x.append("rect").classed(e,!0).attr("cursor","pointer").attr("height",v=>0),x=>x,x=>x.remove()).attr("transform",(x,v)=>`translate(${(x?x.axisX:0)-d}, 0)`).attr("fill",x=>x.color).attr("y",x=>x.axisY<r[m]?x.axisY:r[m]).attr("x",x=>f?0:o(x.seriesLabel)).attr("width",u).attr("rx",c[m][0]??1).attr("ry",c[m][1]??1).transition().duration(h).ease(ii(s.transitionEase)).delay((x,v)=>x.groupIndex*l).attr("height",x=>Math.abs(x.axisYFromZero))}),t.selectAll(`rect.${e}`)}function TC({defsSelection:t,clipPathData:e}){t.selectAll("clipPath").data(e).join(n=>n.append("clipPath"),n=>n,n=>n.remove()).attr("id",n=>n.id).each((n,r,i)=>{Z(i[r]).selectAll("rect").data([n]).join(o=>o.append("rect"),o=>o,o=>o.remove()).attr("x",0).attr("y",0).attr("width",o=>o.width).attr("height",o=>o.height)})}function PC({selection:t,ids:e,fullChartParams:n}){if(t.interrupt("highlight"),!e.length){t.transition("highlight").duration(200).style("opacity",1);return}t.each((r,i,o)=>{e.includes(r.id)?Z(o[i]).style("opacity",1):Z(o[i]).style("opacity",n.styles.unhighlightedOpacity)})}const u2=(t,{selection:e,computedData$:n,visibleComputedData$:r,existedSeriesLabels$:i,SeriesDataMap$:o,GroupDataMap$:a,fullParams$:s,fullChartParams$:u,gridAxesTransform$:c,gridGraphicTransform$:l,gridGraphicReverseScale$:h,gridAxesSize$:f,gridHighlight$:d,gridContainer$:p,isSeriesPositionSeprate$:g,event$:m})=>{const y=new it,x=oi(t,"clipPath-box"),v=ut(t,"rect"),{seriesSelection$:b,axesSelection$:$,defsSelection$:w,graphicGSelection$:S}=ko({selection:e,pluginName:t,clipPathID:x,existedSeriesLabels$:i,gridContainer$:p,gridAxesTransform$:c,gridGraphicTransform$:l}),_=r.pipe(G(y),B(L=>L.map(R=>R[0]?R[0].axisY-R[0].axisYFromZero:0)),dt()),P=H({computedData:n,visibleComputedData:r,params:s,gridAxesSize:f,isSeriesPositionSeprate:g}).pipe(G(y),U(async L=>L),B(L=>L.params.barWidth?L.params.barWidth:L.isSeriesPositionSeprate?s2({axisWidth:L.gridAxesSize.width,groupAmount:L.computedData[0]?L.computedData[0].length:0,barAmountOfGroup:1,barPadding:L.params.barPadding,barGroupPadding:L.params.barGroupPadding}):s2({axisWidth:L.gridAxesSize.width,groupAmount:L.computedData[0]?L.computedData[0].length:0,barAmountOfGroup:L.visibleComputedData.length,barPadding:L.params.barPadding,barGroupPadding:L.params.barGroupPadding})),dt()),D=H({computedData:n,barWidth:P,params:s,gridGraphicReverseScale:h}).pipe(G(y),U(async L=>L),B(L=>{const R=L.barWidth/2,F=L.params.barRadius===!0?R:L.params.barRadius===!1?0:typeof L.params.barRadius=="number"?L.params.barRadius:0;return L.computedData.map((C,z)=>{const X=L.gridGraphicReverseScale[z]??L.gridGraphicReverseScale[0];let W=F*X[0],V=F*X[1];if(W>R){const J=R/W;W=W*J,V=V*J}return[W,V]})})),A=r.pipe(G(y),B(L=>{const R=new Set;return L.forEach(F=>{F.forEach(C=>{R.add(C.seriesLabel)})}),Array.from(R)})),I=r.pipe(G(y),B(L=>{const R=new Set;return L.forEach(F=>{F.forEach(C=>{R.add(C.groupLabel)})}),Array.from(R)})),M=H({seriesLabels:A,barWidth:P,params:s}).pipe(G(y),U(async L=>L),B(L=>$C(L.barWidth,L.seriesLabels,L.params))),T=u.pipe(G(y),B(L=>L.transitionDuration),dt()),k=new lt(L=>{H({groupLabels:I,transitionDuration:T}).pipe(U(async R=>R)).subscribe(R=>{const F=SC(R.groupLabels.length,R.transitionDuration);L.next(F)})}).pipe(G(y),dt()),E=new lt(L=>{H({groupLabels:I,transitionDuration:T}).pipe(U(async R=>R)).subscribe(R=>{const F=AC(R.groupLabels.length,R.transitionDuration);L.next(F)})}).pipe(G(y),dt());H({defsSelection:w,gridAxesSize:f}).pipe(G(y),U(async L=>L)).subscribe(L=>{const R=[{id:x,width:L.gridAxesSize.width,height:L.gridAxesSize.height}];TC({defsSelection:L.defsSelection,clipPathData:R})});const N=u.pipe(G(y),B(L=>L.highlightTarget),dt()),O=new it;return H({graphicGSelection:S,computedData:n,zeroYArr:_,groupLabels:I,barScale:M,params:s,chartParams:u,highlightTarget:N,barWidth:P,transformedBarRadius:D,delayGroup:k,transitionItem:E,SeriesDataMap:o,GroupDataMap:a,isSeriesPositionSeprate:g}).pipe(G(y),U(async L=>L)).subscribe(L=>{const R=MC({graphicGSelection:L.graphicGSelection,rectClassName:v,computedData:L.computedData,zeroYArr:L.zeroYArr,groupLabels:L.groupLabels,barScale:L.barScale,params:L.params,chartParams:L.chartParams,barWidth:L.barWidth,transformedBarRadius:L.transformedBarRadius,delayGroup:L.delayGroup,transitionItem:L.transitionItem,isSeriesPositionSeprate:L.isSeriesPositionSeprate});R.on("mouseover",(F,C)=>{F.stopPropagation(),m.next({type:"grid",eventName:"mouseover",pluginName:t,highlightTarget:L.highlightTarget,datum:C,series:L.SeriesDataMap.get(C.seriesLabel),seriesIndex:C.seriesIndex,seriesLabel:C.seriesLabel,groups:L.GroupDataMap.get(C.groupLabel),groupIndex:C.groupIndex,groupLabel:C.groupLabel,event:F,data:L.computedData})}).on("mousemove",(F,C)=>{F.stopPropagation(),m.next({type:"grid",eventName:"mousemove",pluginName:t,highlightTarget:L.highlightTarget,datum:C,series:L.SeriesDataMap.get(C.seriesLabel),seriesIndex:C.seriesIndex,seriesLabel:C.seriesLabel,groups:L.GroupDataMap.get(C.groupLabel),groupIndex:C.groupIndex,groupLabel:C.groupLabel,event:F,data:L.computedData})}).on("mouseout",(F,C)=>{F.stopPropagation(),m.next({type:"grid",eventName:"mouseout",pluginName:t,highlightTarget:L.highlightTarget,datum:C,series:L.SeriesDataMap.get(C.seriesLabel),seriesIndex:C.seriesIndex,seriesLabel:C.seriesLabel,groups:L.GroupDataMap.get(C.groupLabel),groupIndex:C.groupIndex,groupLabel:C.groupLabel,event:F,data:L.computedData})}).on("click",(F,C)=>{F.stopPropagation(),m.next({type:"grid",eventName:"click",pluginName:t,highlightTarget:L.highlightTarget,datum:C,series:L.SeriesDataMap.get(C.seriesLabel),seriesIndex:C.seriesIndex,seriesLabel:C.seriesLabel,groups:L.GroupDataMap.get(C.groupLabel),groupIndex:C.groupIndex,groupLabel:C.groupLabel,event:F,data:L.computedData})}),O.next(R)}),H({barSelection:O,highlight:d,fullChartParams:u}).pipe(G(y),U(async L=>L)).subscribe(L=>{PC({selection:L.barSelection,ids:L.highlight,fullChartParams:L.fullChartParams})}),()=>{y.next(void 0)}},c2="Bars",DC=$e(c2,Nh)(({selection:t,name:e,subject:n,observer:r})=>{const i=new it,o=u2(c2,{selection:t,computedData$:r.computedData$,visibleComputedData$:r.visibleComputedData$,existedSeriesLabels$:r.existedSeriesLabels$,SeriesDataMap$:r.SeriesDataMap$,GroupDataMap$:r.GroupDataMap$,fullParams$:r.fullParams$,fullChartParams$:r.fullChartParams$,gridAxesTransform$:r.gridAxesTransform$,gridGraphicTransform$:r.gridGraphicTransform$,gridGraphicReverseScale$:r.gridGraphicReverseScale$,gridAxesSize$:r.gridAxesSize$,gridHighlight$:r.gridHighlight$,gridContainer$:r.gridContainer$,isSeriesPositionSeprate$:r.isSeriesPositionSeprate$,event$:n.event$});return()=>{i.next(void 0),o()}}),l2=.3;function EC({axisWidth:t,groupAmount:e,barGroupPadding:n=0}){const i=t/(e-1)-n;return i>1?i:1}function kC(t,e){return t<=1?0:e/(t-1)*l2}function LC(t,e){return t<=1?e:e*(1-l2)}function CC({graphicGSelection:t,rectClassName:e,barData:n,zeroY:r,groupLabels:i,params:o,chartParams:a,barWidth:s,transformedBarRadius:u,delayGroup:c,transitionItem:l,isSeriesPositionSeprate:h}){const f=s/2;return t.each((p,g,m)=>{Z(m[g]).selectAll(`rect.${e}`).data(n[g]??[],y=>y.id).join(y=>y.append("rect").classed(e,!0).attr("cursor","pointer").attr("height",x=>0),y=>y,y=>y.remove()).attr("transform",(y,x)=>`translate(${(y?y.axisX:0)-f}, 0)`).attr("fill",y=>y.color).attr("y",y=>r).attr("x",y=>0).attr("width",s).attr("rx",u[g][0]??1).attr("ry",u[g][1]??1).transition().duration(l).ease(ii(a.transitionEase)).delay((y,x)=>y.groupIndex*c).attr("y",y=>y._barStartY).attr("height",y=>Math.abs(y._barHeight))}),t.selectAll(`rect.${e}`)}function RC({defsSelection:t,clipPathData:e}){t.selectAll("clipPath").data(e).join(n=>n.append("clipPath"),n=>n,n=>n.remove()).attr("id",n=>n.id).each((n,r,i)=>{Z(i[r]).selectAll("rect").data([n]).join(o=>o.append("rect"),o=>o,o=>o.remove()).attr("x",0).attr("y",0).attr("width",o=>o.width).attr("height",o=>o.height)})}function IC({selection:t,ids:e,fullChartParams:n}){if(t.interrupt("highlight"),!e.length){t.transition("highlight").duration(200).style("opacity",1);return}t.each((r,i,o)=>{e.includes(r.id)?Z(o[i]).style("opacity",1):Z(o[i]).style("opacity",n.styles.unhighlightedOpacity)})}const f2=(t,{selection:e,computedData$:n,visibleComputedData$:r,existedSeriesLabels$:i,SeriesDataMap$:o,GroupDataMap$:a,fullParams$:s,fullDataFormatter$:u,fullChartParams$:c,gridAxesTransform$:l,gridGraphicTransform$:h,gridGraphicReverseScale$:f,gridAxesSize$:d,gridHighlight$:p,gridContainer$:g,isSeriesPositionSeprate$:m,event$:y})=>{const x=new it,v=oi(t,"clipPath-box"),b=ut(t,"rect"),{seriesSelection$:$,axesSelection$:w,defsSelection$:S,graphicGSelection$:_}=ko({selection:e,pluginName:t,clipPathID:v,existedSeriesLabels$:i,gridContainer$:g,gridAxesTransform$:l,gridGraphicTransform$:h}),P=r.pipe(G(x),B(C=>C[0]&&C[0][0]?C[0][0].axisY-C[0][0].axisYFromZero:0),dt()),D=H({computedData:n,params:s,axisSize:d,isSeriesPositionSeprate:m}).pipe(G(x),U(async C=>C),B(C=>C.params.barWidth?C.params.barWidth:EC({axisWidth:C.axisSize.width,groupAmount:C.computedData[0]?C.computedData[0].length:0,barGroupPadding:C.params.barGroupPadding})),dt()),A=H({computedData:n,barWidth:D,params:s,gridGraphicReverseScale:f}).pipe(G(x),U(async C=>C),B(C=>{const z=C.barWidth/2,X=C.params.barRadius===!0?z:C.params.barRadius===!1?0:typeof C.params.barRadius=="number"?C.params.barRadius:0;return C.computedData.map((W,V)=>{const J=C.gridGraphicReverseScale[V]??C.gridGraphicReverseScale[0],ht=X*J[0],q=X*J[1];return[ht,q]})})),I=r.pipe(G(x),B(C=>{const z=new Set;return C.forEach(X=>{X.forEach(W=>{z.add(W.groupLabel)})}),Array.from(z)})),M=c.pipe(G(x),B(C=>C.transitionDuration),dt()),T=new lt(C=>{H({groupLabels:I,transitionDuration:M}).pipe(U(async z=>z)).subscribe(z=>{const X=kC(z.groupLabels.length,z.transitionDuration);C.next(X)})}).pipe(G(x),dt()),k=new lt(C=>{H({groupLabels:I,transitionDuration:M}).pipe(U(async z=>z)).subscribe(z=>{const X=LC(z.groupLabels.length,z.transitionDuration);C.next(X)})}).pipe(G(x),dt()),E=H({computedData:n,dataFormatter:u}).pipe(G(x),U(async C=>C),B(C=>{const X=C.computedData[0]?C.computedData[0].length-1:0,W=C.dataFormatter.grid.groupAxis.scaleDomain[0]==="auto"?0-C.dataFormatter.grid.groupAxis.scalePadding:C.dataFormatter.grid.groupAxis.scaleDomain[0]-C.dataFormatter.grid.groupAxis.scalePadding,V=C.dataFormatter.grid.groupAxis.scaleDomain[1]==="auto"?X+C.dataFormatter.grid.groupAxis.scalePadding:C.dataFormatter.grid.groupAxis.scaleDomain[1]+C.dataFormatter.grid.groupAxis.scalePadding,J=C.computedData.map(ht=>ht.filter((q,nt)=>q.groupIndex>=W&&q.groupIndex<=V));if(J.length<=1)return 1;{const ht=J.flat().map(Y=>Y.axisYFromZero),q=Math.max(...ht),nt=C.computedData[0]?C.computedData[0].map((Y,xt)=>C.computedData.reduce((gt,Nt)=>gt+Nt[xt].axisYFromZero,0)):[],at=Math.max(...nt);return q/at}})),N=H({computedData:n,yRatio:E,zeroY:P}).pipe(G(x),B(C=>{let z=C.computedData[0]?C.computedData[0].map(()=>C.zeroY):[];return C.computedData.map((X,W)=>X.map((V,J)=>{const ht=z[J],q=V.axisYFromZero*C.yRatio;return z[J]=z[J]+q,{...V,_barStartY:ht,_barHeight:q}}))})),O=H({computedData:n,zeroY:P}).pipe(G(x),B(C=>C.computedData.map((z,X)=>z.map((W,V)=>({...W,_barStartY:C.zeroY,_barHeight:W.axisYFromZero}))))),L=m.pipe(U(C=>m0(()=>C,O,N)));H({defsSelection:S,gridAxesSize:d}).pipe(G(x),U(async C=>C)).subscribe(C=>{const z=[{id:v,width:C.gridAxesSize.width,height:C.gridAxesSize.height}];RC({defsSelection:C.defsSelection,clipPathData:z})});const R=c.pipe(G(x),B(C=>C.highlightTarget),dt()),F=new it;return H({graphicGSelection:_,graphicData:L,zeroY:P,groupLabels:I,params:s,chartParams:c,highlightTarget:R,barWidth:D,transformedBarRadius:A,delayGroup:T,transitionItem:k,SeriesDataMap:o,GroupDataMap:a,isSeriesPositionSeprate:m}).pipe(G(x),U(async C=>C)).subscribe(C=>{const z=CC({graphicGSelection:C.graphicGSelection,rectClassName:b,barData:C.graphicData,zeroY:C.zeroY,groupLabels:C.groupLabels,params:C.params,chartParams:C.chartParams,barWidth:C.barWidth,transformedBarRadius:C.transformedBarRadius,delayGroup:C.delayGroup,transitionItem:C.transitionItem,isSeriesPositionSeprate:C.isSeriesPositionSeprate});z.on("mouseover",(X,W)=>{X.stopPropagation(),y.next({type:"grid",eventName:"mouseover",pluginName:t,highlightTarget:C.highlightTarget,datum:W,series:C.SeriesDataMap.get(W.seriesLabel),seriesIndex:W.seriesIndex,seriesLabel:W.seriesLabel,groups:C.GroupDataMap.get(W.groupLabel),groupIndex:W.groupIndex,groupLabel:W.groupLabel,event:X,data:C.graphicData})}).on("mousemove",(X,W)=>{X.stopPropagation(),y.next({type:"grid",eventName:"mousemove",pluginName:t,highlightTarget:C.highlightTarget,datum:W,series:C.SeriesDataMap.get(W.seriesLabel),seriesIndex:W.seriesIndex,seriesLabel:W.seriesLabel,groups:C.GroupDataMap.get(W.groupLabel),groupIndex:W.groupIndex,groupLabel:W.groupLabel,event:X,data:C.graphicData})}).on("mouseout",(X,W)=>{X.stopPropagation(),y.next({type:"grid",eventName:"mouseout",pluginName:t,highlightTarget:C.highlightTarget,datum:W,series:C.SeriesDataMap.get(W.seriesLabel),seriesIndex:W.seriesIndex,seriesLabel:W.seriesLabel,groups:C.GroupDataMap.get(W.groupLabel),groupIndex:W.groupIndex,groupLabel:W.groupLabel,event:X,data:C.graphicData})}).on("click",(X,W)=>{X.stopPropagation(),y.next({type:"grid",eventName:"click",pluginName:t,highlightTarget:C.highlightTarget,datum:W,series:C.SeriesDataMap.get(W.seriesLabel),seriesIndex:W.seriesIndex,seriesLabel:W.seriesLabel,groups:C.GroupDataMap.get(W.groupLabel),groupIndex:W.groupIndex,groupLabel:W.groupLabel,event:X,data:C.graphicData})}),F.next(z)}),H({barSelection:F,highlight:p,fullChartParams:c}).pipe(G(x),U(async C=>C)).subscribe(C=>{IC({selection:C.barSelection,ids:C.highlight,fullChartParams:C.fullChartParams})}),()=>{x.next(void 0)}},h2="BarStack",NC=$e(h2,Fh)(({selection:t,name:e,subject:n,observer:r})=>{const i=new it,o=f2(h2,{selection:t,computedData$:r.computedData$,visibleComputedData$:r.visibleComputedData$,existedSeriesLabels$:r.existedSeriesLabels$,SeriesDataMap$:r.SeriesDataMap$,GroupDataMap$:r.GroupDataMap$,fullParams$:r.fullParams$,fullDataFormatter$:r.fullDataFormatter$,fullChartParams$:r.fullChartParams$,gridAxesTransform$:r.gridAxesTransform$,gridGraphicTransform$:r.gridGraphicTransform$,gridGraphicReverseScale$:r.gridGraphicReverseScale$,gridAxesSize$:r.gridAxesSize$,gridHighlight$:r.gridHighlight$,gridContainer$:r.gridContainer$,isSeriesPositionSeprate$:r.isSeriesPositionSeprate$,event$:n.event$});return()=>{i.next(void 0),o()}}),d2=.3;function p2({axisWidth:t,groupAmount:e,barAmountOfGroup:n,barPadding:r=0,barGroupPadding:i=0}){const a=(t/(e-1)-i)/n-r;return a>1?a:1}function FC(t,e,n){const r=t/2,i=t*e.length+n.barPadding*e.length;return zf().domain(e).range([-i/2+r,i/2-r])}function GC(t,e){return t<=1?0:e/(t-1)*d2}function zC(t,e){return t<=1?e:e*(1-d2)}function OC({graphicGSelection:t,pathGClassName:e,pathClassName:n,barData:r,zeroYArr:i,groupLabels:o,barScale:a,params:s,chartParams:u,barWidth:c,delayGroup:l,transitionItem:h,isSeriesPositionSeprate:f}){const d=c/2;return t.each((g,m,y)=>{Z(y[m]).selectAll(`g.${e}`).data(r[m]??[]).join(v=>{const b=v.append("g").classed(e,!0).attr("cursor","pointer");return b.append("path").classed(n,!0).style("vector-effect","non-scaling-stroke").attr("d",$=>{const w=-d,S=i[m],_=i[m];return`M${w},${S} L${w+c/2},${_} ${w+c},${S}`}),b},v=>v,v=>v.remove()).attr("transform",v=>`translate(${f?0:a(v.seriesLabel)}, 0)`).select(`path.${n}`).attr("height",v=>Math.abs(v.axisYFromZero)).attr("y",v=>v.axisY<i[m]?v.axisY:i[m]).attr("x",v=>f?0:a(v.seriesLabel)).style("fill",v=>`url(#${v.linearGradientId})`).attr("stroke",v=>v.color).attr("transform",v=>`translate(${v?v.axisX:0}, 0)`).transition().duration(h).ease(ii(u.transitionEase)).delay((v,b)=>v.groupIndex*l).attr("d",v=>{const b=-d,$=i[m],w=v.axisY;return`M${b},${$} L${b+c/2},${w} ${b+c},${$}`})}),t.selectAll(`path.${n}`)}function UC({defsSelection:t,barData:e,params:n}){t.selectAll("linearGradient").data(e??[]).join(r=>r.append("linearGradient").attr("x1","0%").attr("x2","0%").attr("y1","100%").attr("y2","0%").attr("spreadMethod","pad"),r=>r,r=>r.remove()).attr("id",(r,i)=>r[0]?r[0].linearGradientId:"").html((r,i)=>{const o=r[0]?r[0].color:"";return`
|
10
10
|
<stop offset="0%" stop-color="${o}" stop-opacity="${n.linearGradientOpacity[0]}"/>
|
11
11
|
<stop offset="100%" stop-color="${o}" stop-opacity="${n.linearGradientOpacity[1]}"/>
|
12
|
-
`})}function BC({defsSelection:t,clipPathData:e}){t.selectAll("clipPath").data(e).join(n=>n.append("clipPath"),n=>n,n=>n.remove()).attr("id",n=>n.id).each((n,r,i)=>{Z(i[r]).selectAll("rect").data([n]).join(o=>o.append("rect"),o=>o,o=>o.remove()).attr("x",0).attr("y",0).attr("width",o=>o.width).attr("height",o=>o.height)})}function YC({selection:t,ids:e,fullChartParams:n}){t.interrupt("highlight");const r=()=>{t.transition("highlight").duration(200).style("opacity",1)};if(!e.length){r();return}t.each((i,o,a)=>{e.includes(i.id)?Z(a[o]).style("opacity",1):Z(a[o]).style("opacity",n.styles.unhighlightedOpacity)})}const g2=(t,{selection:e,computedData$:n,visibleComputedData$:r,existedSeriesLabels$:i,SeriesDataMap$:o,GroupDataMap$:a,fullParams$:s,fullChartParams$:u,gridAxesTransform$:c,gridGraphicTransform$:l,gridAxesSize$:h,gridHighlight$:f,gridContainer$:d,isSeriesPositionSeprate$:p,event$:g})=>{const m=new it,y=ii(t,"clipPath-box"),_=st(t,"pathG"),x=st(t,"path"),{seriesSelection$:b,axesSelection$:$,defsSelection$:v,graphicGSelection$:w}=Eo({selection:e,pluginName:t,clipPathID:y,existedSeriesLabels$:i,gridContainer$:d,gridAxesTransform$:c,gridGraphicTransform$:l}),S=r.pipe(B(R=>R.map(N=>N[0]?N[0].axisY-N[0].axisYFromZero:0)),ht()),D=H({computedData:n,visibleComputedData:r,params:s,gridAxesSize:h,isSeriesPositionSeprate:p}).pipe(G(m),U(async R=>R),B(R=>R.params.barWidth?R.params.barWidth:R.isSeriesPositionSeprate?p2({axisWidth:R.gridAxesSize.width,groupAmount:R.computedData[0]?R.computedData[0].length:0,barAmountOfGroup:1,barPadding:R.params.barPadding,barGroupPadding:R.params.barGroupPadding}):p2({axisWidth:R.gridAxesSize.width,groupAmount:R.computedData[0]?R.computedData[0].length:0,barAmountOfGroup:R.visibleComputedData.length,barPadding:R.params.barPadding,barGroupPadding:R.params.barGroupPadding}))),E=r.pipe(G(m),B(R=>{const N=new Set;return R.forEach(C=>{C.forEach(O=>{N.add(O.seriesLabel)})}),Array.from(N)})),T=r.pipe(G(m),B(R=>{const N=new Set;return R.forEach(C=>{C.forEach(O=>{N.add(O.groupLabel)})}),Array.from(N)})),F=new lt(R=>{H({seriesLabels:E,barWidth:D,params:s}).pipe(G(m),U(async N=>N)).subscribe(N=>{const C=FC(N.barWidth,N.seriesLabels,N.params);R.next(C)})}),M=u.pipe(G(m),B(R=>R.transitionDuration),ht()),A=new lt(R=>{H({groupLabels:T,transitionDuration:M}).pipe(U(async N=>N)).subscribe(N=>{const C=GC(N.groupLabels.length,N.transitionDuration);R.next(C)})}).pipe(G(m),ht()),L=new lt(R=>{H({groupLabels:T,transitionDuration:M}).pipe(U(async N=>N)).subscribe(N=>{const C=zC(N.groupLabels.length,N.transitionDuration);R.next(C)})}).pipe(G(m),ht());H({defsSelection:v,gridAxesSize:h}).pipe(G(m),U(async R=>R)).subscribe(R=>{const N=[{id:y,width:R.gridAxesSize.width,height:R.gridAxesSize.height}];BC({defsSelection:R.defsSelection,clipPathData:N})});const P=u.pipe(G(m),B(R=>R.highlightTarget),ht()),I=new it,z=E.pipe(G(m),B(R=>R.map((N,C)=>ii(t,`lineargradient-${N}`)))),k=H({linearGradientIds:z,computedData:n}).pipe(G(m),U(async R=>R),B(R=>R.computedData.map((N,C)=>N.map((O,X)=>({linearGradientId:R.linearGradientIds[C],...O})))));return H({graphicGSelection:w,defsSelection:v,computedData:n,barData:k,zeroYArr:S,groupLabels:T,barScale:F,params:s,chartParams:u,highlightTarget:P,barWidth:D,delayGroup:A,transitionItem:L,SeriesDataMap:o,GroupDataMap:a,isSeriesPositionSeprate:p}).pipe(G(m),U(async R=>R)).subscribe(R=>{const N=OC({graphicGSelection:R.graphicGSelection,pathGClassName:_,pathClassName:x,barData:R.barData,zeroYArr:R.zeroYArr,groupLabels:R.groupLabels,barScale:R.barScale,params:R.params,chartParams:R.chartParams,barWidth:R.barWidth,delayGroup:R.delayGroup,transitionItem:R.transitionItem,isSeriesPositionSeprate:R.isSeriesPositionSeprate});UC({defsSelection:R.defsSelection,barData:R.barData,params:R.params}),N.on("mouseover",(C,O)=>{C.stopPropagation(),g.next({type:"grid",eventName:"mouseover",pluginName:t,highlightTarget:R.highlightTarget,datum:O,series:R.SeriesDataMap.get(O.seriesLabel),seriesIndex:O.seriesIndex,seriesLabel:O.seriesLabel,groups:R.GroupDataMap.get(O.groupLabel),groupIndex:O.groupIndex,groupLabel:O.groupLabel,event:C,data:R.computedData})}).on("mousemove",(C,O)=>{C.stopPropagation(),g.next({type:"grid",eventName:"mousemove",pluginName:t,highlightTarget:R.highlightTarget,datum:O,series:R.SeriesDataMap.get(O.seriesLabel),seriesIndex:O.seriesIndex,seriesLabel:O.seriesLabel,groups:R.GroupDataMap.get(O.groupLabel),groupIndex:O.groupIndex,groupLabel:O.groupLabel,event:C,data:R.computedData})}).on("mouseout",(C,O)=>{C.stopPropagation(),g.next({type:"grid",eventName:"mouseout",pluginName:t,highlightTarget:R.highlightTarget,datum:O,series:R.SeriesDataMap.get(O.seriesLabel),seriesIndex:O.seriesIndex,seriesLabel:O.seriesLabel,groups:R.GroupDataMap.get(O.groupLabel),groupIndex:O.groupIndex,groupLabel:O.groupLabel,event:C,data:R.computedData})}).on("click",(C,O)=>{C.stopPropagation(),g.next({type:"grid",eventName:"click",pluginName:t,highlightTarget:R.highlightTarget,datum:O,series:R.SeriesDataMap.get(O.seriesLabel),seriesIndex:O.seriesIndex,seriesLabel:O.seriesLabel,groups:R.GroupDataMap.get(O.groupLabel),groupIndex:O.groupIndex,groupLabel:O.groupLabel,event:C,data:R.computedData})}),I.next(N)}),H({barSelection:I,highlight:f,fullChartParams:u}).pipe(G(m),U(async R=>R)).subscribe(R=>{YC({selection:R.barSelection,ids:R.highlight,fullChartParams:R.fullChartParams})}),()=>{m.next(void 0)}},m2="BarsTriangle",WC=$e(m2,Gh)(({selection:t,name:e,subject:n,observer:r})=>{const i=new it,o=g2(m2,{selection:t,computedData$:r.computedData$,visibleComputedData$:r.visibleComputedData$,existedSeriesLabels$:r.existedSeriesLabels$,SeriesDataMap$:r.SeriesDataMap$,GroupDataMap$:r.GroupDataMap$,fullParams$:r.fullParams$,fullChartParams$:r.fullChartParams$,gridAxesTransform$:r.gridAxesTransform$,gridGraphicTransform$:r.gridGraphicTransform$,gridAxesSize$:r.gridAxesSize$,gridHighlight$:r.gridHighlight$,gridContainer$:r.gridContainer$,isSeriesPositionSeprate$:r.isSeriesPositionSeprate$,event$:n.event$});return()=>{i.next(void 0),o()}});function HC({graphicGSelection:t,circleGClassName:e,circleClassName:n,data:r,fullParams:i,fullChartParams:o,graphicReverseScale:a}){const s=l=>{const h=l.size();return o.transitionDuration/h};let u=0;return t.each((l,h,f)=>{Z(f[h]).selectAll("g").data(r[h],d=>d.id).join(d=>(u=s(d),d.append("g").classed(e,!0)),d=>d,d=>d.remove()).attr("transform",d=>`translate(${d.axisX}, ${d.axisY})`).each((d,p,g)=>{Z(g[p]).selectAll("circle").data([d]).join(m=>m.append("circle").style("cursor","pointer").style("vector-effect","non-scaling-stroke").classed(n,!0).attr("opacity",0).transition().delay((y,_)=>p*u).attr("opacity",1),m=>m.transition().duration(50).attr("opacity",1),m=>m.remove()).attr("r",i.radius).attr("fill",(m,y)=>yh({datum:m,colorType:i.fillColorType,fullChartParams:o})).attr("stroke",(m,y)=>yh({datum:m,colorType:i.strokeColorType,fullChartParams:o})).attr("stroke-width",i.strokeWidth).attr("transform",`scale(${a[h][0]??1}, ${a[h][1]??1})`)})}),t.selectAll(`circle.${n}`)}function qC({selection:t,ids:e,onlyShowHighlighted:n,fullChartParams:r}){if(t.interrupt("highlight"),!e.length){t.transition("highlight").duration(200).style("opacity",n===!0?0:1);return}t.each((i,o,a)=>{e.includes(i.id)?Z(a[o]).style("opacity",1).transition("highlight").duration(200):Z(a[o]).style("opacity",n===!0?0:r.styles.unhighlightedOpacity).transition("highlight").duration(200)})}function XC({defsSelection:t,clipPathData:e}){t.selectAll("clipPath").data(e).join(n=>n.append("clipPath"),n=>n,n=>n.remove()).attr("id",n=>n.id).each((n,r,i)=>{Z(i[r]).selectAll("rect").data([n]).join("rect").attr("x",0).attr("y",0).attr("width",o=>o.width).attr("height",o=>o.height)})}const y2=(t,{selection:e,computedData$:n,visibleComputedData$:r,existedSeriesLabels$:i,SeriesDataMap$:o,GroupDataMap$:a,fullParams$:s,fullChartParams$:u,gridAxesTransform$:c,gridGraphicTransform$:l,gridGraphicReverseScale$:h,gridAxesSize$:f,gridHighlight$:d,gridContainer$:p,event$:g})=>{const m=new it,y=ii(t,"clipPath-box"),_=st(t,"circleG"),x=st(t,"circle"),b=new it,{seriesSelection$:$,axesSelection$:v,defsSelection$:w,graphicGSelection$:S}=Eo({selection:e,pluginName:t,clipPathID:y,existedSeriesLabels$:i,gridContainer$:p,gridAxesTransform$:c,gridGraphicTransform$:l}),D=H({computedData:n,gridGraphicReverseScale:h}).pipe(G(m),U(async M=>M),B(M=>M.computedData.map((A,L)=>M.gridGraphicReverseScale[L])));H({defsSelection:w,gridAxesSize:f}).pipe(G(m),U(async M=>M)).subscribe(M=>{const A=[{id:y,width:M.gridAxesSize.width,height:M.gridAxesSize.height}];XC({defsSelection:M.defsSelection,clipPathData:A})});const E=u.pipe(G(m),B(M=>M.highlightTarget),ht());H({graphicGSelection:S,computedData:n,visibleComputedData:r,SeriesDataMap:o,GroupDataMap:a,graphicReverseScale:D,fullChartParams:u,fullParams:s,highlightTarget:E}).pipe(G(m),U(async M=>M)).subscribe(M=>{const A=HC({graphicGSelection:M.graphicGSelection,circleGClassName:_,circleClassName:x,data:M.visibleComputedData,fullParams:M.fullParams,fullChartParams:M.fullChartParams,graphicReverseScale:M.graphicReverseScale});A.on("mouseover",(L,P)=>{L.stopPropagation(),g.next({type:"grid",eventName:"mouseover",pluginName:t,highlightTarget:M.highlightTarget,datum:P,series:M.SeriesDataMap.get(P.seriesLabel),seriesIndex:P.seriesIndex,seriesLabel:P.seriesLabel,groups:M.GroupDataMap.get(P.groupLabel),groupIndex:P.groupIndex,groupLabel:P.groupLabel,event:L,data:M.computedData})}).on("mousemove",(L,P)=>{L.stopPropagation(),g.next({type:"grid",eventName:"mousemove",pluginName:t,highlightTarget:M.highlightTarget,data:M.computedData,datum:P,series:M.SeriesDataMap.get(P.seriesLabel),seriesIndex:P.seriesIndex,seriesLabel:P.seriesLabel,groups:M.GroupDataMap.get(P.groupLabel),groupIndex:P.groupIndex,groupLabel:P.groupLabel,event:L})}).on("mouseout",(L,P)=>{L.stopPropagation(),g.next({type:"grid",eventName:"mouseout",pluginName:t,highlightTarget:M.highlightTarget,datum:P,series:M.SeriesDataMap.get(P.seriesLabel),seriesIndex:P.seriesIndex,seriesLabel:P.seriesLabel,groups:M.GroupDataMap.get(P.groupLabel),groupIndex:P.groupIndex,groupLabel:P.groupLabel,event:L,data:M.computedData})}).on("click",(L,P)=>{L.stopPropagation(),g.next({type:"grid",eventName:"click",pluginName:t,highlightTarget:M.highlightTarget,datum:P,series:M.SeriesDataMap.get(P.seriesLabel),seriesIndex:P.seriesIndex,seriesLabel:P.seriesLabel,groups:M.GroupDataMap.get(P.groupLabel),groupIndex:P.groupIndex,groupLabel:P.groupLabel,event:L,data:M.computedData})}),b.next(A)});const T=d.subscribe(),F=s.pipe(G(m),B(M=>M.onlyShowHighlighted),ht());return u.pipe(G(m),U(M=>H({graphicSelection:b,highlight:d,onlyShowHighlighted:F,fullChartParams:u}).pipe(G(m),U(async A=>A)))).subscribe(M=>{qC({selection:M.graphicSelection,ids:M.highlight,onlyShowHighlighted:M.onlyShowHighlighted,fullChartParams:M.fullChartParams})}),()=>{m.next(void 0),T.unsubscribe()}},b2="Dots",VC=$e(b2,Rh)(({selection:t,name:e,subject:n,observer:r})=>{const i=new it,o=y2(b2,{selection:t,computedData$:r.computedData$,visibleComputedData$:r.visibleComputedData$,existedSeriesLabels$:r.existedSeriesLabels$,SeriesDataMap$:r.SeriesDataMap$,GroupDataMap$:r.GroupDataMap$,fullParams$:r.fullParams$,fullChartParams$:r.fullChartParams$,gridAxesTransform$:r.gridAxesTransform$,gridGraphicTransform$:r.gridGraphicTransform$,gridGraphicReverseScale$:r.gridGraphicReverseScale$,gridAxesSize$:r.gridAxesSize$,gridHighlight$:r.gridHighlight$,gridContainer$:r.gridContainer$,event$:n.event$});return()=>{i.next(void 0),o()}}),jC={listRectWidth:14,listRectHeight:14,listRectRadius:0},bh=(t,{rootSelection:e,seriesLabels$:n,fullParams$:r,layout$:i,fullChartParams$:o})=>{const a=st(t,"root-position"),s=st(t,"legend-card"),u=st(t,"legend-list"),c=st(t,"legend-item"),l=new it,h=r.pipe(G(l),B(v=>v.position==="bottom"||v.position==="top"?"row":"column")),f=H({fullParams:r,layout:i}).pipe(G(l),U(async v=>v),B(v=>{const w=v.fullParams.padding*2+v.fullParams.gap*2;return v.fullParams.position==="bottom"||v.fullParams.position==="top"?v.layout.rootWidth-w:v.layout.rootHeight-w})),p=H({layout:i,fullParams:r}).pipe(G(l),U(async v=>v),B(v=>{let w=0,S=0;return v.fullParams.position==="bottom"?(S=v.layout.rootHeight,v.fullParams.justify==="start"?w=0:v.fullParams.justify==="center"?w=v.layout.rootWidth/2:v.fullParams.justify==="end"&&(w=v.layout.rootWidth)):v.fullParams.position==="right"?(w=v.layout.rootWidth,v.fullParams.justify==="start"?S=0:v.fullParams.justify==="center"?S=v.layout.rootHeight/2:v.fullParams.justify==="end"&&(S=v.layout.rootHeight)):v.fullParams.position==="top"?(S=0,v.fullParams.justify==="start"?w=0:v.fullParams.justify==="center"?w=v.layout.rootWidth/2:v.fullParams.justify==="end"&&(w=v.layout.rootWidth)):v.fullParams.position==="left"&&(w=0,v.fullParams.justify==="start"?S=0:v.fullParams.justify==="center"?S=v.layout.rootHeight/2:v.fullParams.justify==="end"&&(S=v.layout.rootHeight)),{x:w,y:S}})).pipe(G(l),B(v=>e.selectAll(`g.${a}`).data([v]).join(w=>w.append("g").classed(a,!0).attr("transform",S=>`translate(${S.x}, ${S.y})`),w=>w.transition().attr("transform",S=>`translate(${S.x}, ${S.y})`),w=>w.remove()))),g=r.pipe(G(l),B(v=>v.seriesList[0]?v.seriesList[0]:jC)),m=H({fullParams:r,fullChartParams:o,seriesLabels:n,lineDirection:h,lineMaxSize:f,defaultListStyle:g}).pipe(G(l),U(async v=>v),B(v=>v.seriesLabels.reduce((w,S,D)=>{const E=n2(S,v.fullChartParams.styles.textSize),T=v.fullChartParams.styles.textSize*1.5+E,F=mC(D,v.fullChartParams),M=w[0]&&w[0][0]?w[w.length-1][w[w.length-1].length-1]:null,{translateX:A,translateY:L,lineIndex:P,itemIndex:I}=((k,R,N)=>{let C=0,O=0,X=0,W=0;if(k.lineDirection==="column"){let V=N?N.translateY+k.fullChartParams.styles.textSize+k.fullParams.gap:0;if(V+k.fullChartParams.styles.textSize>k.lineMaxSize){X=N.lineIndex+1,W=0,O=0;const J=R[R.length-1].reduce((pt,q)=>q.itemWidth>pt?q.itemWidth:pt,0);C=N.translateX+J+k.fullParams.gap}else X=N?N.lineIndex:0,W=N?N.itemIndex+1:0,O=V,C=N?N.translateX:0}else{let V=N?N.translateX+N.itemWidth+k.fullParams.gap:0;V+T>k.lineMaxSize?(X=N.lineIndex+1,W=0,C=0):(X=N?N.lineIndex:0,W=N?N.itemIndex+1:0,C=V),O=(k.fullChartParams.styles.textSize+k.fullParams.gap)*X}return{translateX:C,translateY:O,lineIndex:X,itemIndex:W}})(v,w,M);w[P]||(w[P]=[]);const z=v.fullParams.seriesList[I]?v.fullParams.seriesList[I]:v.defaultListStyle;return w[P].push({id:S,seriesLabel:S,seriesIndex:D,lineIndex:P,itemIndex:I,text:S,itemWidth:T,translateX:A,translateY:L,color:F,listRectWidth:z.listRectWidth,listRectHeight:z.listRectHeight,listRectRadius:z.listRectRadius}),w},[]))),y=H({fullParams:r,fullChartParams:o,lineDirection:h,lengendItems:m}).pipe(G(l),U(async v=>v),B(v=>{const{width:w,height:S}=((D,E)=>{let T=0,F=0;if(!E.length||!E[0].length)return{width:T,height:F};const M=E[0][E[0].length-1];return D.lineDirection==="column"?(T=E.reduce((A,L)=>{const P=L.reduce((I,z)=>z.itemWidth>I?z.itemWidth:I,0);return A+P},0),T+=D.fullParams.gap*(E.length-1),F=M.translateY+D.fullChartParams.styles.textSize):(T=M.translateX+M.itemWidth,F=D.fullChartParams.styles.textSize*E.length+D.fullParams.gap*(E.length-1)),{width:T,height:F}})(v,v.lengendItems);return{direction:v.lineDirection,width:w,height:S,translateX:v.fullParams.gap,translateY:v.fullParams.gap}})),_=H({fullParams:r,lengendList:y}).pipe(G(l),U(async v=>v),B(v=>{const w=v.lengendList.width+v.fullParams.gap*2,S=v.lengendList.height+v.fullParams.gap*2;let D=0,E=0;return v.fullParams.position==="left"?v.fullParams.justify==="start"?(D=v.fullParams.padding,E=v.fullParams.padding):v.fullParams.justify==="center"?(D=v.fullParams.padding,E=-S/2):v.fullParams.justify==="end"&&(D=v.fullParams.padding,E=-S-v.fullParams.padding):v.fullParams.position==="right"?v.fullParams.justify==="start"?(D=-w-v.fullParams.padding,E=v.fullParams.padding):v.fullParams.justify==="center"?(D=-w-v.fullParams.padding,E=-S/2):v.fullParams.justify==="end"&&(D=-w-v.fullParams.padding,E=-S-v.fullParams.padding):v.fullParams.position==="top"?v.fullParams.justify==="start"?(D=v.fullParams.padding,E=v.fullParams.padding):v.fullParams.justify==="center"?(D=-w/2,E=v.fullParams.padding):v.fullParams.justify==="end"&&(D=-w-v.fullParams.padding,E=v.fullParams.padding):v.fullParams.justify==="start"?(D=v.fullParams.padding,E=-S-v.fullParams.padding):v.fullParams.justify==="center"?(D=-w/2,E=-S-v.fullParams.padding):v.fullParams.justify==="end"&&(D=-w-v.fullParams.padding,E=-S-v.fullParams.padding),{width:w,height:S,translateX:D,translateY:E}})),x=H({rootPositionSelection:p,fullParams:r,fullChartParams:o,legendCard:_}).pipe(G(l),U(async v=>v),B(v=>v.rootPositionSelection.selectAll("g").data([v.legendCard]).join(w=>w.append("g").classed(s,!0).attr("transform",S=>`translate(${S.translateX}, ${S.translateY})`),w=>w.transition().attr("transform",S=>`translate(${S.translateX}, ${S.translateY})`),w=>w.remove()).each((w,S,D)=>{Z(D[S]).selectAll("rect").data([w]).join("rect").attr("width",E=>E.width).attr("height",E=>E.height).attr("fill",Bt(v.fullParams.backgroundFill,v.fullChartParams)).attr("stroke",Bt(v.fullParams.backgroundStroke,v.fullChartParams))}))),b=H({lengendCardSelection:x,fullParams:r,lengendList:y}).pipe(G(l),U(async v=>v),B(v=>v.lengendCardSelection.selectAll("g").data([v.lengendList]).join(w=>w.append("g").classed(u,!0).attr("transform",S=>`translate(${S.translateX}, ${S.translateY})`),w=>w.transition().attr("transform",S=>`translate(${S.translateX}, ${S.translateY})`),w=>w.remove())));return H({lengendListSelection:b,fullParams:r,fullChartParams:o,lengendItems:m}).pipe(G(l),U(async v=>v),B(v=>{const w=v.lengendItems[0]?v.lengendItems.flat():[];return v.lengendListSelection.selectAll(`g.${c}`).data(w).join(S=>S.append("g").classed(c,!0).attr("cursor","default"),S=>S,S=>S.remove()).attr("transform",(S,D)=>`translate(${S.translateX}, ${S.translateY})`).each((S,D,E)=>{const T=v.fullChartParams.styles.textSize/2,F=-S.listRectWidth/2,M=-S.listRectHeight/2;Z(E[D]).selectAll("rect").data([S]).join("rect").attr("x",T).attr("y",T).attr("width",A=>A.listRectWidth).attr("height",A=>A.listRectHeight).attr("transform",A=>`translate(${F}, ${M})`).attr("fill",A=>A.color).attr("rx",A=>A.listRectRadius),Z(E[D]).selectAll("text").data([S]).join(A=>A.append("text").attr("dominant-baseline","hanging"),A=>A,A=>A.remove()).attr("x",v.fullChartParams.styles.textSize*1.5).attr("font-size",v.fullChartParams.styles.textSize).text(A=>A.text)})})).subscribe(),()=>{l.next(void 0)}},v2="GridLegend",ZC=$e(v2,Bh)(({selection:t,rootSelection:e,observer:n,subject:r})=>{const i=new it,o=n.SeriesDataMap$.pipe(G(i),B(u=>Array.from(u.keys()))),a=n.fullParams$.pipe(G(i),B(u=>{const c=[{listRectWidth:u.listRectWidth,listRectHeight:u.listRectHeight,listRectRadius:u.listRectRadius}];return{...u,seriesList:c}})),s=bh(v2,{rootSelection:e,seriesLabels$:o,fullParams$:a,layout$:n.layout$,fullChartParams$:n.fullChartParams$});return()=>{i.next(void 0),s()}}),vh=6;function KC({selection:t,xAxisClassName:e,groupingLabelClassName:n,params:r,tickTextAlign:i,axisLabelAlign:o,gridAxesSize:a,fullDataFormatter:s,chartParams:u,groupScale:c,textTransform:l}){const h=t.selectAll(`g.${e}`).data([r]).join("g").classed(e,!0);t.selectAll(`g.${n}`).data([r]).join("g").classed(n,!0).each((p,g,m)=>{Z(m[g]).selectAll("text").data([p]).join(y=>y.append("text").style("font-weight","bold"),y=>y,y=>y.remove()).attr("text-anchor",o.textAnchor).attr("dominant-baseline",o.dominantBaseline).style("font-size",`${u.styles.textSize}px`).style("fill",Bt(r.labelColorType,u)).style("transform",l).text(y=>s.grid.groupAxis.label)}).attr("transform",p=>`translate(${a.width+p.tickPadding+r.labelOffset[0]}, ${-p.tickPadding-vh-r.labelOffset[1]})`);const f=Pp(c).scale(c).tickSize(r.tickFullLine==!0?-a.height:vh).tickSizeOuter(0).tickFormat(p=>mh(p,r.tickFormat)).tickPadding(r.tickPadding),d=h.transition().duration(100).call(f);return d.selectAll("line").style("fill","none").style("stroke",r.tickLineVisible==!0?Bt(r.tickColorType,u):"none").style("stroke-dasharray",r.tickFullLineDasharray).attr("pointer-events","none"),d.selectAll("path").style("fill","none").style("stroke",r.axisLineVisible==!0?Bt(r.axisLineColorType,u):"none").style("shape-rendering","crispEdges"),h.selectAll("text").style("font-family","sans-serif").style("font-size",`${u.styles.textSize}px`).style("color",Bt(r.tickTextColorType,u)).attr("text-anchor",i.textAnchor).attr("dominant-baseline",i.dominantBaseline).attr("transform-origin",`0 -${r.tickPadding+vh}`).style("transform",l),h}const x2=(t,{selection:e,computedData$:n,fullParams$:r,fullDataFormatter$:i,fullChartParams$:o,gridAxesTransform$:a,gridAxesReverseTransform$:s,gridAxesSize$:u,gridContainer$:c,isSeriesPositionSeprate$:l})=>{const h=new it,f=st(t,"container"),d=st(t,"xAxisG"),p=st(t,"xAxis"),g=st(t,"groupingLabel"),m=H({computedData:n.pipe(ht((v,w)=>v.length===w.length)),isSeriesPositionSeprate:l}).pipe(G(h),U(async v=>v),B(v=>v.isSeriesPositionSeprate?v.computedData:[v.computedData[0]]),B((v,w)=>e.selectAll(`g.${f}`).data(v,S=>S[0]?S[0].seriesIndex:w).join("g").classed(f,!0))),y=m.pipe(G(h),B((v,w)=>v.selectAll(`g.${d}`).data([d]).join("g").classed(d,!0)));H({containerSelection:m,gridContainer:c}).pipe(G(h),U(async v=>v)).subscribe(v=>{v.containerSelection.attr("transform",(w,S)=>{const D=v.gridContainer[S]??v.gridContainer[0],E=D.translate,T=D.scale;return`translate(${E[0]}, ${E[1]}) scale(${T[0]}, ${T[1]})`})}),H({axisSelection:y,gridAxesTransform:a}).pipe(G(h),U(async v=>v)).subscribe(v=>{v.axisSelection.style("transform",v.gridAxesTransform.value)});const _=H({fullParams:r,fullDataFormatter:i,gridAxesReverseTransform:s,gridContainer:c}).pipe(G(h),U(async v=>v),B(v=>{const w=`translate(${v.gridAxesReverseTransform.translate[0]}px, ${v.gridAxesReverseTransform.translate[1]}px)`,S=`rotate(${v.gridAxesReverseTransform.rotate}deg) rotateX(${v.gridAxesReverseTransform.rotateX}deg) rotateY(${v.gridAxesReverseTransform.rotateY}deg)`,D=`scale(${1/v.gridContainer[0].scale[0]}, ${1/v.gridContainer[0].scale[1]})`,T=`rotate(${v.fullDataFormatter.grid.groupAxis.position==="left"&&v.fullDataFormatter.grid.valueAxis.position==="top"||v.fullDataFormatter.grid.groupAxis.position==="right"&&v.fullDataFormatter.grid.valueAxis.position==="bottom"?v.fullParams.tickTextRotate+180:v.fullParams.tickTextRotate}deg)`;return`${w} ${S} ${D} ${T}`}),ht()),x=new lt(v=>{H({fullDataFormatter:i,gridAxesSize:u,computedData:n}).pipe(G(h),U(async w=>w)).subscribe(w=>{const D=w.computedData[0]?w.computedData[0].length-1:0,E=w.fullDataFormatter.grid.groupAxis.scaleDomain[0]==="auto"?0-w.fullDataFormatter.grid.groupAxis.scalePadding:w.fullDataFormatter.grid.groupAxis.scaleDomain[0]-w.fullDataFormatter.grid.groupAxis.scalePadding,T=w.fullDataFormatter.grid.groupAxis.scaleDomain[1]==="auto"?D+w.fullDataFormatter.grid.groupAxis.scalePadding:w.fullDataFormatter.grid.groupAxis.scaleDomain[1]+w.fullDataFormatter.grid.groupAxis.scalePadding,F=w.computedData[0]?w.computedData[0].length:0;let M=(w.computedData[0]??[]).map(I=>I.groupLabel);const A=new Array(F).fill(0).map((I,z)=>M[z]!=null?M[z]:String(z)).filter((I,z)=>z>=E&&z<=T),L=w.fullDataFormatter.grid.groupAxis.scalePadding,P=Jd({axisLabels:A,axisWidth:w.gridAxesSize.width,padding:L});v.next(P)})}),b=H({fullDataFormatter:i,fullParams:r}).pipe(G(h),U(async v=>v),B(v=>{let w="middle",S="hanging";return v.fullDataFormatter.grid.groupAxis.position==="bottom"?(w=v.fullParams.tickTextRotate?"end":"middle",S="hanging"):v.fullDataFormatter.grid.groupAxis.position==="top"?(w=v.fullParams.tickTextRotate?"end":"middle",S="auto"):v.fullDataFormatter.grid.groupAxis.position==="left"?(w="end",S="middle"):v.fullDataFormatter.grid.groupAxis.position==="right"&&(w="start",S="middle"),{textAnchor:w,dominantBaseline:S}})),$=i.pipe(G(h),B(v=>{let w="start",S="hanging";return v.grid.groupAxis.position==="bottom"?S="hanging":v.grid.groupAxis.position==="top"?S="auto":v.grid.groupAxis.position==="left"?w="end":v.grid.groupAxis.position==="right"&&(w="start"),v.grid.valueAxis.position==="left"?w="start":v.grid.valueAxis.position==="right"?w="end":v.grid.valueAxis.position==="bottom"?S="auto":v.grid.valueAxis.position==="top"&&(S="hanging"),{textAnchor:w,dominantBaseline:S}}));return H({axisSelection:y,params:r,tickTextAlign:b,axisLabelAlign:$,gridAxesSize:u,fullDataFormatter:i,chartParams:o,groupScale:x,textTransform:_}).pipe(G(h),U(async v=>v)).subscribe(v=>{KC({selection:v.axisSelection,xAxisClassName:p,groupingLabelClassName:g,params:v.params,tickTextAlign:v.tickTextAlign,axisLabelAlign:v.axisLabelAlign,gridAxesSize:v.gridAxesSize,fullDataFormatter:v.fullDataFormatter,chartParams:v.chartParams,groupScale:v.groupScale,textTransform:v.textTransform})}),()=>{h.next(void 0)}},_2="GroupAxis",QC=$e(_2,zh)(({selection:t,name:e,observer:n,subject:r})=>{const i=new it,o=x2(_2,{selection:t,computedData$:n.computedData$,fullParams$:n.fullParams$,fullDataFormatter$:n.fullDataFormatter$,fullChartParams$:n.fullChartParams$,gridAxesTransform$:n.gridAxesTransform$,gridAxesReverseTransform$:n.gridAxesReverseTransform$,gridAxesSize$:n.gridAxesSize$,gridContainer$:n.gridContainer$,isSeriesPositionSeprate$:n.isSeriesPositionSeprate$});return()=>{i.next(void 0),o()}}),w2=6;function JC({selection:t,yAxisClassName:e,textClassName:n,fullParams:r,tickTextAlign:i,axisLabelAlign:o,gridAxesSize:a,fullDataFormatter:s,fullChartParams:u,valueScale:c,textTransform:l,minAndMax:h}){const f=t.selectAll(`g.${e}`).data([r]).join("g").classed(e,!0);t.selectAll(`g.${n}`).data([r]).join("g").classed(n,!0).each((y,_,x)=>{Z(x[_]).selectAll("text").data([y]).join(b=>b.append("text").style("font-weight","bold"),b=>b,b=>b.remove()).attr("text-anchor",o.textAnchor).attr("dominant-baseline",o.dominantBaseline).style("font-size",`${u.styles.textSize}px`).style("fill",Bt(r.labelColorType,u)).style("transform",l).text(b=>s.grid.valueAxis.label)}).attr("transform",y=>`translate(${-y.tickPadding+r.labelOffset[0]}, ${a.height+y.tickPadding+r.labelOffset[1]})`);const d=h[1]-h[0],p=Dp(c).scale(c).ticks(d>r.ticks?r.ticks:h[0]===0&&h[1]===0?1:Math.ceil(d)).tickFormat(y=>mh(y,r.tickFormat)).tickSize(r.tickFullLine==!0?-a.width:w2).tickPadding(r.tickPadding),g=f.transition().duration(100).call(p);return g.selectAll("line").style("fill","none").style("stroke",r.tickLineVisible==!0?Bt(r.tickColorType,u):"none").style("stroke-dasharray",r.tickFullLineDasharray).attr("pointer-events","none"),g.selectAll("path").style("fill","none").style("stroke",r.axisLineVisible==!0?Bt(r.axisLineColorType,u):"none").style("shape-rendering","crispEdges"),f.selectAll("text").style("font-family","sans-serif").style("font-size",`${u.styles.textSize}px`).style("color",Bt(r.tickTextColorType,u)).attr("text-anchor",i.textAnchor).attr("dominant-baseline",i.dominantBaseline).attr("transform-origin",`-${r.tickPadding+w2} 0`).style("transform",l),f}const $u=(t,{selection:e,computedData$:n,fullParams$:r,fullDataFormatter$:i,fullChartParams$:o,gridAxesTransform$:a,gridAxesReverseTransform$:s,gridAxesSize$:u,gridContainer$:c,isSeriesPositionSeprate$:l})=>{const h=new it,f=st(t,"container"),d=st(t,"yAxisG"),p=st(t,"yAxis"),g=st(t,"text"),m=H({computedData:n.pipe(ht((w,S)=>w.length===S.length)),isSeriesPositionSeprate:l}).pipe(G(h),U(async w=>w),B(w=>w.isSeriesPositionSeprate?w.computedData:[w.computedData[0]]),B((w,S)=>e.selectAll(`g.${f}`).data(w,D=>D[0]?D[0].seriesIndex:S).join("g").classed(f,!0))),y=m.pipe(G(h),B((w,S)=>w.selectAll(`g.${d}`).data([d]).join("g").classed(d,!0)));H({containerSelection:m,gridContainer:c}).pipe(G(h),U(async w=>w)).subscribe(w=>{w.containerSelection.attr("transform",(S,D)=>{const E=w.gridContainer[D]??w.gridContainer[0],T=E.translate,F=E.scale;return`translate(${T[0]}, ${T[1]}) scale(${F[0]}, ${F[1]})`})}),H({axisSelection:y,gridAxesTransform:a}).pipe(G(h),U(async w=>w)).subscribe(w=>{w.axisSelection.style("transform",w.gridAxesTransform.value)});const _=H({fullParams:r,fullDataFormatter:i,gridAxesReverseTransform:s,gridContainer:c}).pipe(G(h),U(async w=>w),B(w=>{const S=`translate(${w.gridAxesReverseTransform.translate[0]}px, ${w.gridAxesReverseTransform.translate[1]}px)`,D=`rotate(${w.gridAxesReverseTransform.rotate}deg) rotateX(${w.gridAxesReverseTransform.rotateX}deg) rotateY(${w.gridAxesReverseTransform.rotateY}deg)`,E=`scale(${1/w.gridContainer[0].scale[0]}, ${1/w.gridContainer[0].scale[1]})`,F=`rotate(${w.fullDataFormatter.grid.groupAxis.position==="left"&&w.fullDataFormatter.grid.valueAxis.position==="top"||w.fullDataFormatter.grid.groupAxis.position==="right"&&w.fullDataFormatter.grid.valueAxis.position==="bottom"?w.fullParams.tickTextRotate+180:w.fullParams.tickTextRotate}deg)`;return`${S} ${D} ${E} ${F}`}),ht()),x=new lt(w=>{H({fullDataFormatter:i,gridAxesSize:u,computedData:n}).pipe(G(h),U(async S=>S)).subscribe(S=>{const E=S.computedData[0]?S.computedData[0].length-1:0,T=S.fullDataFormatter.grid.groupAxis.scaleDomain[0]==="auto"?0-S.fullDataFormatter.grid.groupAxis.scalePadding:S.fullDataFormatter.grid.groupAxis.scaleDomain[0]-S.fullDataFormatter.grid.groupAxis.scalePadding,F=S.fullDataFormatter.grid.groupAxis.scaleDomain[1]==="auto"?E+S.fullDataFormatter.grid.groupAxis.scalePadding:S.fullDataFormatter.grid.groupAxis.scaleDomain[1]+S.fullDataFormatter.grid.groupAxis.scalePadding,M=S.computedData.map((L,P)=>L.filter((I,z)=>z>=T&&z<=F)),A=gC(M.flat());w.next(A)})}),b=new lt(w=>{H({fullDataFormatter:i,gridAxesSize:u,minAndMax:x}).pipe(G(h),U(async S=>S)).subscribe(S=>{const D=Qd({maxValue:S.minAndMax[1],minValue:S.minAndMax[0],axisWidth:S.gridAxesSize.height,scaleDomain:S.fullDataFormatter.grid.valueAxis.scaleDomain,scaleRange:S.fullDataFormatter.grid.valueAxis.scaleRange});w.next(D)})}),$=i.pipe(G(h),B(w=>{let S="start",D="hanging";return w.grid.valueAxis.position==="left"?(S="end",D="middle"):w.grid.valueAxis.position==="right"?(S="start",D="middle"):w.grid.valueAxis.position==="bottom"?(S="middle",D="hanging"):w.grid.valueAxis.position==="top"&&(S="middle",D="auto"),{textAnchor:S,dominantBaseline:D}})),v=i.pipe(G(h),B(w=>{let S="start",D="hanging";return w.grid.groupAxis.position==="bottom"?D="auto":w.grid.groupAxis.position==="top"?D="hanging":w.grid.groupAxis.position==="left"?S="start":w.grid.groupAxis.position==="right"&&(S="end"),w.grid.valueAxis.position==="left"?S="end":w.grid.valueAxis.position==="right"?S="start":w.grid.valueAxis.position==="bottom"?D="hanging":w.grid.valueAxis.position==="top"&&(D="auto"),{textAnchor:S,dominantBaseline:D}}));return H({axisSelection:y,fullParams:r,tickTextAlign:$,axisLabelAlign:v,computedData:n,gridAxesSize:u,fullDataFormatter:i,fullChartParams:o,valueScale:b,textTransform:_,minAndMax:x}).pipe(G(h),U(async w=>w)).subscribe(w=>{JC({selection:w.axisSelection,yAxisClassName:p,textClassName:g,fullParams:w.fullParams,tickTextAlign:w.tickTextAlign,axisLabelAlign:w.axisLabelAlign,gridAxesSize:w.gridAxesSize,fullDataFormatter:w.fullDataFormatter,fullChartParams:w.fullChartParams,valueScale:w.valueScale,textTransform:w.textTransform,minAndMax:w.minAndMax})}),()=>{h.next(void 0)}},$2="ValueAxis",tR=$e($2,Su)(({selection:t,name:e,observer:n,subject:r})=>{const i=new it,o=$u($2,{selection:t,computedData$:n.computedData$,fullParams$:n.fullParams$,fullDataFormatter$:n.fullDataFormatter$,fullChartParams$:n.fullChartParams$,gridAxesTransform$:n.gridAxesTransform$,gridAxesReverseTransform$:n.gridAxesReverseTransform$,gridAxesSize$:n.gridAxesSize$,gridContainer$:n.gridContainer$,isSeriesPositionSeprate$:n.isSeriesPositionSeprate$});return()=>{i.next(void 0),o()}}),S2="ValueStackAxis",eR=$e(S2,Oh)(({selection:t,name:e,observer:n,subject:r})=>{const i=new it,o=n.computedData$.pipe(G(i),B(s=>{const u=new Array(s[0]?s[0].length:0).fill(null).map((l,h)=>s.reduce((f,d)=>{if(d&&d[h]){const p=d[h].value==null||d[h].visible==!1?0:d[h].value;return f+p}return f},0));return s.map((l,h)=>l.map((f,d)=>({...f,value:u[d]})))})),a=$u(S2,{selection:t,computedData$:n.isSeriesPositionSeprate$.pipe(U(s=>m0(()=>s,n.computedData$,o))),fullParams$:n.fullParams$,fullDataFormatter$:n.fullDataFormatter$,fullChartParams$:n.fullChartParams$,gridAxesTransform$:n.gridAxesTransform$,gridAxesReverseTransform$:n.gridAxesReverseTransform$,gridAxesSize$:n.gridAxesSize$,gridContainer$:n.gridContainer$,isSeriesPositionSeprate$:n.isSeriesPositionSeprate$});return()=>{i.next(void 0),a()}}),A2="ScalingArea",nR=st(A2,"rect"),rR=$e(A2,Uh)(({selection:t,rootSelection:e,name:n,observer:r,subject:i})=>{const o=new it,a=e.insert("rect","g").classed(nR,!0).attr("opacity",0);let s={k:1,x:0,y:0};r.layout$.pipe(G(o)).subscribe(c=>{a.attr("width",c.width).attr("height",c.height).attr("x",c.left).attr("y",c.top)});const u=r.computedData$.pipe(B(c=>c[0]?c[0].length-1:0),ht());return H({initGroupAxis:r.fullDataFormatter$.pipe(B(c=>c.grid.groupAxis),si()),fullDataFormatter:r.fullDataFormatter$,groupMaxIndex:u,layout:r.layout$,axisSize:r.gridAxesSize$}).pipe(G(o),U(async c=>c)).subscribe(c=>{const h=c.groupMaxIndex,f=c.initGroupAxis.scaleDomain[0]==="auto"?0-c.initGroupAxis.scalePadding:c.initGroupAxis.scaleDomain[0]-c.initGroupAxis.scalePadding,d=c.initGroupAxis.scaleDomain[1]==="auto"?h+c.initGroupAxis.scalePadding:c.initGroupAxis.scaleDomain[1]+c.initGroupAxis.scalePadding,p=c.fullDataFormatter.grid.valueAxis.position==="left"||c.fullDataFormatter.grid.valueAxis.position==="top"?[0,1]:[1,0],m=Qd({maxValue:c.groupMaxIndex,minValue:0,axisWidth:c.axisSize.width,scaleDomain:[f,d],scaleRange:p}).copy(),y=Jv().on("zoom",function(x){const b=x.transform,$=w=>{const S=Math.round(w);return Math.min(h,Math.max(0,S))},v=c.fullDataFormatter.grid.groupAxis.position==="bottom"||c.fullDataFormatter.grid.groupAxis.position==="top"?b.rescaleX(m).domain().map($):b.rescaleY(m).domain().map($);v[0]<=0&&v[1]>=h?b.k<s.k&&(b.k=s.k,b.x=s.x,b.y=s.y):v[1]-v[0]<=1&&b.k>s.k&&(b.k=s.k,b.x=s.x,b.y=s.y),s.k=b.k,s.x=b.x,s.y=b.y,i.dataFormatter$.next({...c.fullDataFormatter,grid:{...c.fullDataFormatter.grid,groupAxis:{...c.fullDataFormatter.grid.groupAxis,scaleDomain:v}}})});e.call(y)}),()=>{o.next(void 0),a.remove()}});function iR(t,e){let n=new lt(()=>{});return t.each(function(){const r=Gu(this,e);n=zu(n,r)}),n}const xh="GroupAux",_h=st(xh,"label-box");function oR({groupLabel:t,axisX:e,axisHeight:n,fullParams:r}){return r.showLine&&t?[{id:t,x1:e,x2:e,y1:0,y2:n}]:[]}function aR({selection:t,pluginName:e,lineData:n,fullParams:r,fullChartParams:i}){const o=st(e,"auxline"),a=t.selectAll(`line.${o}`).data(n),s=a.enter().append("line").classed(o,!0).style("stroke",c=>Bt(r.lineColorType,i)).style("stroke-width",1).style("stroke-dasharray",r.lineDashArray??"none").style("pointer-events","none"),u=a.merge(s);return a.exit().remove(),s.attr("x1",c=>c.x1).attr("y1",c=>c.y1).attr("x2",c=>c.x2).attr("y2",c=>c.y2),a.transition().duration(50).attr("x1",c=>c.x1).attr("y1",c=>c.y1).attr("x2",c=>c.x2).attr("y2",c=>c.y2),u}function sR(t){t.selectAll("line").data([]).exit().remove()}function uR({groupLabel:t,axisX:e,fullParams:n}){return n.showLabel&&t?[{id:t,x:e,y:-n.labelPadding,text:mh(t,n.labelTextFormat)}]:[]}function cR({selection:t,labelData:e,fullParams:n,fullChartParams:r,gridAxesReverseTransformValue:i}){const o=r.styles.textSize+4,a=t.selectAll(`g.${_h}`).data(e),s=a.enter().append("g").classed(_h,!0).style("cursor","pointer"),u=s.merge(a);return s.attr("transform",(c,l)=>`translate(${c.x}, ${c.y})`),a.transition().duration(50).attr("transform",(c,l)=>`translate(${c.x}, ${c.y})`),a.exit().remove(),u.each((c,l,h)=>{const f=n2(c.text,r.styles.textSize)+12,d=-f/2,p=Z(h[l]).selectAll("rect").data([c]),g=p.enter().append("rect").attr("height",`${o}px`).attr("fill",_=>Bt(n.labelColorType,r)).attr("x",d).attr("y",-2).attr("rx",5).attr("ry",5).style("cursor","pointer");p.merge(g).attr("width",_=>`${f}px`).style("transform",i),p.exit().remove();const m=Z(h[l]).selectAll("text").data([c]),y=m.enter().append("text").style("dominant-baseline","hanging").style("cursor","pointer");m.merge(y).text(_=>_.text).style("transform",i).attr("fill",_=>Bt(n.labelTextColorType,r)).attr("font-size",r.styles.textSize).attr("x",d+6),m.exit().remove()}),u}function lR(t){t.selectAll(`g.${_h}`).data([]).exit().remove()}const fR=$e(xh,Ih)(({selection:t,rootSelection:e,name:n,subject:r,observer:i})=>{const o=new it,a=e.insert("rect","g").classed(st(xh,"rect"),!0).attr("opacity",0),s=t.append("g");i.layout$.pipe(G(o)).subscribe(f=>{a.attr("width",f.rootWidth).attr("height",f.rootHeight)}),i.gridAxesTransform$.pipe(G(o),B(f=>f.value),ht()).subscribe(f=>{s.style("transform",f)});const u=new lt(f=>{H({fullDataFormatter:i.fullDataFormatter$,gridAxesSize:i.gridAxesSize$,computedData:i.computedData$}).pipe(G(o),U(async d=>d)).subscribe(d=>{const g=d.computedData[0]?d.computedData[0].length-1:0,m=d.fullDataFormatter.grid.groupAxis.scaleDomain[0]==="auto"?0-d.fullDataFormatter.grid.groupAxis.scalePadding:d.fullDataFormatter.grid.groupAxis.scaleDomain[0]-d.fullDataFormatter.grid.groupAxis.scalePadding,y=d.fullDataFormatter.grid.groupAxis.scaleDomain[1]==="auto"?g+d.fullDataFormatter.grid.groupAxis.scalePadding:d.fullDataFormatter.grid.groupAxis.scaleDomain[1]+d.fullDataFormatter.grid.groupAxis.scalePadding,_=d.computedData[0]?d.computedData[0].length:0;let x=d.fullDataFormatter.grid.gridData.seriesDirection==="row"?(d.computedData[0]??[]).map(w=>w.groupLabel):d.computedData.map(w=>w[0].groupLabel);const b=new Array(_).fill(0).map((w,S)=>x[S]!=null?x[S]:String(S)).filter((w,S)=>S>=m&&S<=y),$=d.fullDataFormatter.grid.groupAxis.scalePadding,v=Jd({axisLabels:b,axisWidth:d.gridAxesSize.width,padding:$});f.next(v)})}),c=r2({fullDataFormatter$:i.fullDataFormatter$,gridAxesSize$:i.gridAxesSize$,computedData$:i.computedData$,fullChartParams$:i.fullChartParams$}),l=i.fullChartParams$.pipe(G(o),B(f=>f.highlightTarget),ht());return H({computedData:i.computedData$,gridAxesSize:i.gridAxesSize$,fullParams:i.fullParams$,fullChartParams:i.fullChartParams$,highlightTarget:l,SeriesDataMap:i.SeriesDataMap$,GroupDataMap:i.GroupDataMap$,gridGroupPositionFn:c,groupScale:u}).pipe(G(o),U(async f=>f)).subscribe(f=>{e.on("mouseover",(d,p)=>{const{groupIndex:g,groupLabel:m}=f.gridGroupPositionFn(d);r.event$.next({type:"grid",pluginName:n,eventName:"mouseover",highlightTarget:f.highlightTarget,datum:null,series:[],seriesIndex:-1,seriesLabel:"",groups:f.GroupDataMap.get(m)??[],groupIndex:g,groupLabel:m,event:d,data:f.computedData})}).on("mousemove",(d,p)=>{const{groupIndex:g,groupLabel:m}=f.gridGroupPositionFn(d);r.event$.next({type:"grid",pluginName:n,eventName:"mousemove",highlightTarget:f.highlightTarget,datum:null,series:[],seriesIndex:-1,seriesLabel:"",groups:f.GroupDataMap.get(m)??[],groupIndex:g,groupLabel:m,event:d,data:f.computedData})}).on("mouseout",(d,p)=>{const{groupIndex:g,groupLabel:m}=f.gridGroupPositionFn(d);r.event$.next({type:"grid",pluginName:n,eventName:"mouseout",highlightTarget:f.highlightTarget,datum:null,series:[],seriesIndex:-1,seriesLabel:"",groups:f.GroupDataMap.get(m)??[],groupIndex:g,groupLabel:m,event:d,data:f.computedData})}).on("click",(d,p)=>{d.stopPropagation();const{groupIndex:g,groupLabel:m}=f.gridGroupPositionFn(d);r.event$.next({type:"grid",pluginName:n,eventName:"click",highlightTarget:f.highlightTarget,datum:null,series:[],seriesIndex:-1,seriesLabel:"",groups:f.GroupDataMap.get(m)??[],groupIndex:g,groupLabel:m,event:d,data:f.computedData})})}),H({event:r.event$.pipe(No(f=>f.eventName==="mouseover"||f.eventName==="mousemove")),computedData:i.computedData$,groupScale:u,gridAxesSize:i.gridAxesSize$,fullParams:i.fullParams$,fullChartParams:i.fullChartParams$,highlightTarget:l,gridAxesReverseTransform:i.gridAxesReverseTransform$,GroupDataMap:i.GroupDataMap$,gridGroupPositionFn:c}).pipe(G(o),U(async f=>f)).subscribe(f=>{const d=f.groupScale(f.event.groupLabel)??0,p=oR({groupLabel:f.event.groupLabel,axisX:d,axisHeight:f.gridAxesSize.height,fullParams:f.fullParams});aR({selection:s,pluginName:n,lineData:p,fullParams:f.fullParams,fullChartParams:f.fullChartParams});const g=uR({groupLabel:f.event.groupLabel,axisX:d,fullParams:f.fullParams});cR({selection:s,labelData:g,fullParams:f.fullParams,fullChartParams:f.fullChartParams,gridAxesReverseTransformValue:f.gridAxesReverseTransform.value}).on("mouseover",(y,_)=>{const{groupIndex:x,groupLabel:b}=f.gridGroupPositionFn(y);r.event$.next({type:"grid",pluginName:n,eventName:"mouseover",highlightTarget:f.highlightTarget,datum:null,series:[],seriesIndex:-1,seriesLabel:"",groups:f.event.groups,groupIndex:x,groupLabel:b,event:y,data:f.computedData})}).on("mousemove",(y,_)=>{const{groupIndex:x,groupLabel:b}=f.gridGroupPositionFn(y);r.event$.next({type:"grid",pluginName:n,eventName:"mousemove",highlightTarget:f.highlightTarget,datum:null,series:[],seriesIndex:-1,seriesLabel:"",groups:f.event.groups,groupIndex:x,groupLabel:b,event:y,data:f.computedData})}).on("mouseout",(y,_)=>{const{groupIndex:x,groupLabel:b}=f.gridGroupPositionFn(y);r.event$.next({type:"grid",pluginName:n,eventName:"mouseout",highlightTarget:f.highlightTarget,datum:null,series:[],seriesIndex:-1,seriesLabel:"",groups:f.event.groups,groupIndex:x,groupLabel:b,event:y,data:f.computedData})}).on("click",(y,_)=>{const{groupIndex:x,groupLabel:b}=f.gridGroupPositionFn(y);r.event$.next({type:"grid",pluginName:n,eventName:"click",highlightTarget:f.highlightTarget,datum:null,series:[],seriesIndex:-1,seriesLabel:"",groups:f.event.groups,groupIndex:x,groupLabel:b,event:y,data:f.computedData})})}),iR(a,"mouseout").pipe(G(o)).subscribe(f=>{console.log("rootMouseout"),sR(s),lR(s)}),()=>{o.next(void 0),a.remove()}}),M2={position:"right",justify:"end",padding:28,backgroundFill:"none",backgroundStroke:"none",gap:10,listRectWidth:14,listRectHeight:14,listRectRadius:0,gridList:[{listRectWidth:14,listRectHeight:14,listRectRadius:0}]},T2={labelOffset:[0,0],labelColorType:"primary",axisLineVisible:!0,axisLineColorType:"primary",tickFormat:t=>t,tickLineVisible:!0,tickPadding:20,tickFullLine:!1,tickFullLineDasharray:"none",tickColorType:"secondary",tickTextRotate:0,tickTextColorType:"primary",gridIndexes:[0]},P2={labelOffset:[0,0],labelColorType:"primary",axisLineVisible:!1,axisLineColorType:"primary",ticks:4,tickFormat:",.0f",tickLineVisible:!0,tickPadding:20,tickFullLine:!0,tickFullLineDasharray:"none",tickColorType:"secondary",tickTextRotate:0,tickTextColorType:"primary",gridIndexes:[0]},D2={barWidth:0,barPadding:1,barGroupPadding:40,barRadius:!1,gridIndexes:[0]},E2={barWidth:0,barGroupPadding:10,barRadius:!1,gridIndexes:[0]},k2={barWidth:0,barPadding:1,barGroupPadding:20,linearGradientOpacity:[1,0],gridIndexes:[0]},L2={lineCurve:"curveLinear",lineWidth:2,gridIndexes:[1]},C2={radius:4,fillColorType:"white",strokeColorType:"series",strokeWidth:2,onlyShowHighlighted:!1,gridIndexes:[1]},R2={firstAxis:{labelOffset:[0,0],labelColorType:"primary",axisLineVisible:!1,axisLineColorType:"primary",ticks:4,tickFormat:",.0f",tickLineVisible:!0,tickPadding:20,tickFullLine:!0,tickFullLineDasharray:"none",tickColorType:"secondary",tickTextRotate:0,tickTextColorType:"primary"},secondAxis:{labelOffset:[0,0],labelColorType:"primary",axisLineVisible:!1,axisLineColorType:"primary",ticks:4,tickFormat:",.0f",tickLineVisible:!0,tickPadding:20,tickFullLine:!0,tickFullLineDasharray:"none",tickColorType:"secondary",tickTextRotate:0,tickTextColorType:"primary"},gridIndexes:[0,1]},I2="MultiGridLegend",hR=qe(I2,M2)(({selection:t,rootSelection:e,observer:n,subject:r})=>{const i=new it,o=n.multiGridEachDetail$.pipe(G(i),B(c=>c.map((h,f)=>h.SeriesDataMap$.pipe(B(d=>Array.from(d.keys()))))),U(c=>H(c)),B(c=>c.flat())),a=H({fullParams:n.fullParams$,multiGrid:n.multiGridEachDetail$,computedData:n.computedData$}).pipe(G(i),U(async c=>c),B(c=>c.computedData.map((l,h)=>{const f=sc(c.fullParams.gridList[h]??{},{listRectWidth:c.fullParams.listRectWidth,listRectHeight:c.fullParams.listRectHeight,listRectRadius:c.fullParams.listRectRadius});return l.map(d=>f)}).flat())),s=H({fullParams:n.fullParams$,seriesList:a}).pipe(G(i),U(async c=>c),B(c=>({...c.fullParams,seriesList:c.seriesList}))),u=bh(I2,{rootSelection:e,seriesLabels$:o,fullParams$:s,layout$:n.layout$,fullChartParams$:n.fullChartParams$});return()=>{i.next(void 0),u()}}),wn=t=>{const e=t.fullParams$.pipe(B(r=>r.gridIndexes),ht(),Uu(1)),n=new it;return e.pipe(B(r=>r.map(i=>{n.next(void 0);const o=Nu(i).pipe(G(n),Uu(1)),a=H({computedData:t.computedData$,gridIndex:o}).pipe(G(n),B($=>$.computedData[$.gridIndex]??$.computedData[0])),s=H({fullDataFormatter:t.fullDataFormatter$,gridIndex:o}).pipe(G(n),B($=>{const v=$.fullDataFormatter.gridList[0];return{type:"grid",grid:{...$.fullDataFormatter.gridList[$.gridIndex]??v},container:{...$.fullDataFormatter.container}}})),u=H({multiGridEachDetail:t.multiGridEachDetail$,gridIndex:o}).pipe(G(n),U(async $=>$),B($=>$.multiGridEachDetail[$.gridIndex]??$.multiGridEachDetail[0]),Uu(1)),c=u.pipe(U($=>$.isSeriesPositionSeprate$)),l=u.pipe(U($=>$.gridContainer$)),h=u.pipe(U($=>$.gridAxesTransform$)),f=u.pipe(U($=>$.gridAxesReverseTransform$)),d=u.pipe(U($=>$.gridAxesSize$)),p=u.pipe(U($=>$.gridGraphicTransform$)),g=u.pipe(U($=>$.gridGraphicReverseScale$)),m=u.pipe(U($=>$.gridHighlight$)),y=u.pipe(U($=>$.existedSeriesLabels$)),_=u.pipe(U($=>$.SeriesDataMap$)),x=u.pipe(U($=>$.GroupDataMap$)),b=u.pipe(U($=>$.visibleComputedData$));return{gridComputedData$:a,gridDataFormatter$:s,gridAxesTransform$:h,gridGraphicTransform$:p,gridGraphicReverseScale$:g,gridAxesReverseTransform$:f,gridAxesSize$:d,gridHighlight$:m,existedSeriesLabels$:y,SeriesDataMap$:_,GroupDataMap$:x,visibleComputedData$:b,isSeriesPositionSeprate$:c,gridContainer$:l}})))},wh="MultiBars",N2=st(wh,"grid"),dR=qe(wh,D2)(({selection:t,name:e,subject:n,observer:r})=>{const i=new it,o=[];return wn(r).subscribe(s=>{o.forEach(u=>u()),t.selectAll(`g.${N2}`).data(s).join("g").attr("class",N2).each((u,c,l)=>{const h=Z(l[c]);o[c]=u2(wh,{selection:h,computedData$:u.gridComputedData$,visibleComputedData$:u.visibleComputedData$,existedSeriesLabels$:u.existedSeriesLabels$,SeriesDataMap$:u.SeriesDataMap$,GroupDataMap$:u.GroupDataMap$,fullParams$:r.fullParams$,fullChartParams$:r.fullChartParams$,gridAxesTransform$:u.gridAxesTransform$,gridGraphicTransform$:u.gridGraphicTransform$,gridGraphicReverseScale$:u.gridGraphicReverseScale$,gridAxesSize$:u.gridAxesSize$,gridHighlight$:u.gridHighlight$,gridContainer$:u.gridContainer$,isSeriesPositionSeprate$:u.isSeriesPositionSeprate$,event$:n.event$})})}),()=>{i.next(void 0),o.forEach(s=>s())}}),$h="MultiBarStack",F2=st($h,"grid"),pR=qe($h,E2)(({selection:t,name:e,subject:n,observer:r})=>{const i=new it,o=[];return wn(r).subscribe(s=>{o.forEach(u=>u()),t.selectAll(`g.${F2}`).data(s).join("g").attr("class",F2).each((u,c,l)=>{const h=Z(l[c]);o[c]=f2($h,{selection:h,computedData$:u.gridComputedData$,visibleComputedData$:u.visibleComputedData$,existedSeriesLabels$:u.existedSeriesLabels$,SeriesDataMap$:u.SeriesDataMap$,GroupDataMap$:u.GroupDataMap$,fullParams$:r.fullParams$,fullDataFormatter$:u.gridDataFormatter$,fullChartParams$:r.fullChartParams$,gridAxesTransform$:u.gridAxesTransform$,gridGraphicTransform$:u.gridGraphicTransform$,gridGraphicReverseScale$:u.gridGraphicReverseScale$,gridAxesSize$:u.gridAxesSize$,gridHighlight$:u.gridHighlight$,gridContainer$:u.gridContainer$,isSeriesPositionSeprate$:u.isSeriesPositionSeprate$,event$:n.event$})})}),()=>{i.next(void 0),o.forEach(s=>s())}}),Sh="MultiBarsTriangle",G2=st(Sh,"grid"),gR=qe(Sh,k2)(({selection:t,name:e,subject:n,observer:r})=>{const i=new it,o=[];return wn(r).subscribe(s=>{o.forEach(u=>u()),t.selectAll(`g.${G2}`).data(s).join("g").attr("class",G2).each((u,c,l)=>{const h=Z(l[c]);o[c]=g2(Sh,{selection:h,computedData$:u.gridComputedData$,visibleComputedData$:u.visibleComputedData$,existedSeriesLabels$:u.existedSeriesLabels$,SeriesDataMap$:u.SeriesDataMap$,GroupDataMap$:u.GroupDataMap$,fullParams$:r.fullParams$,fullChartParams$:r.fullChartParams$,gridAxesTransform$:u.gridAxesTransform$,gridGraphicTransform$:u.gridGraphicTransform$,gridAxesSize$:u.gridAxesSize$,gridHighlight$:u.gridHighlight$,gridContainer$:u.gridContainer$,isSeriesPositionSeprate$:u.isSeriesPositionSeprate$,event$:n.event$})})}),()=>{i.next(void 0),o.forEach(s=>s())}}),Ah="MultiLines",z2=st(Ah,"grid"),mR=qe(Ah,L2)(({selection:t,name:e,subject:n,observer:r})=>{const i=new it,o=[];return wn(r).subscribe(s=>{o.forEach(u=>u()),t.selectAll(`g.${z2}`).data(s).join("g").attr("class",z2).each((u,c,l)=>{const h=Z(l[c]);o[c]=i2(Ah,{selection:h,computedData$:u.gridComputedData$,existedSeriesLabels$:u.existedSeriesLabels$,SeriesDataMap$:u.SeriesDataMap$,GroupDataMap$:u.GroupDataMap$,fullDataFormatter$:u.gridDataFormatter$,fullParams$:r.fullParams$,fullChartParams$:r.fullChartParams$,gridAxesTransform$:u.gridAxesTransform$,gridGraphicTransform$:u.gridGraphicTransform$,gridAxesSize$:u.gridAxesSize$,gridHighlight$:u.gridHighlight$,gridContainer$:u.gridContainer$,event$:n.event$})})}),()=>{i.next(void 0),o.forEach(s=>s())}}),Mh="MultiDots",O2=st(Mh,"grid"),yR=qe(Mh,C2)(({selection:t,name:e,subject:n,observer:r})=>{const i=new it,o=[];return wn(r).subscribe(s=>{o.forEach(u=>u()),t.selectAll(`g.${O2}`).data(s).join("g").attr("class",O2).each((u,c,l)=>{const h=Z(l[c]);o[c]=y2(Mh,{selection:h,computedData$:u.gridComputedData$,visibleComputedData$:u.visibleComputedData$,existedSeriesLabels$:u.existedSeriesLabels$,SeriesDataMap$:u.SeriesDataMap$,GroupDataMap$:u.GroupDataMap$,fullParams$:r.fullParams$,fullChartParams$:r.fullChartParams$,gridAxesTransform$:u.gridAxesTransform$,gridGraphicTransform$:u.gridGraphicTransform$,gridGraphicReverseScale$:u.gridGraphicReverseScale$,gridAxesSize$:u.gridAxesSize$,gridHighlight$:u.gridHighlight$,gridContainer$:u.gridContainer$,event$:n.event$})})}),()=>{i.next(void 0),o.forEach(s=>s())}}),Th="MultiGroupAxis",U2=st(Th,"grid"),bR=qe(Th,T2)(({selection:t,name:e,subject:n,observer:r})=>{const i=new it,o=[];return wn(r).subscribe(s=>{o.forEach(u=>u()),t.selectAll(`g.${U2}`).data(s).join("g").attr("class",U2).each((u,c,l)=>{const h=Z(l[c]);o[c]=x2(Th,{selection:h,computedData$:u.gridComputedData$,fullParams$:r.fullParams$,fullDataFormatter$:u.gridDataFormatter$,fullChartParams$:r.fullChartParams$,gridAxesTransform$:u.gridAxesTransform$,gridAxesReverseTransform$:u.gridAxesReverseTransform$,gridAxesSize$:u.gridAxesSize$,gridContainer$:u.gridContainer$,isSeriesPositionSeprate$:u.isSeriesPositionSeprate$})})}),()=>{i.next(void 0),o.forEach(s=>s())}}),Ph="MultiValueAxis",B2=st(Ph,"grid"),vR=qe(Ph,P2)(({selection:t,name:e,subject:n,observer:r})=>{const i=new it,o=[];return wn(r).subscribe(s=>{o.forEach(u=>u()),t.selectAll(`g.${B2}`).data(s).join("g").attr("class",B2).each((u,c,l)=>{const h=Z(l[c]);o[c]=$u(Ph,{selection:h,computedData$:u.gridComputedData$,fullParams$:r.fullParams$,fullDataFormatter$:u.gridDataFormatter$,fullChartParams$:r.fullChartParams$,gridAxesTransform$:u.gridAxesTransform$,gridAxesReverseTransform$:u.gridAxesReverseTransform$,gridAxesSize$:u.gridAxesSize$,gridContainer$:u.gridContainer$,isSeriesPositionSeprate$:u.isSeriesPositionSeprate$})})}),()=>{i.next(void 0),o.forEach(s=>s())}});function Y2(t,e,n,r){const{gap:i,rowAmount:o,columnAmount:a}=e,s=(t.width-i*(a-1))/a,u=(t.height-i*(o-1))/o,c=r*s+r*i,l=n*u+n*i,h=[c,l],f=[s/t.width,u/t.height];return{translate:h,scale:f}}const xR=({fullDataFormatter$:t,layout$:e})=>{const n=new it;function r({xAxis:i,yAxis:o,width:a,height:s}){if(!i||!o)return{translate:[0,0],scale:[1,1],rotate:0,rotateX:0,rotateY:0,value:""};let u=0,c=0,l=0,h=0,f=0;return i.position==="bottom"?o.position==="left"?(h=180,c=s):o.position==="right"?(h=180,f=180,u=a,c=s):(h=180,c=s):i.position==="top"?o.position==="left"||(o.position==="right"?(f=180,u=a):(h=180,c=s)):i.position==="left"?o.position==="bottom"?(l=-90,c=s):o.position==="top"?(l=-90,f=180):(h=180,c=s):i.position==="right"&&(o.position==="bottom"?(l=-90,h=180,c=s,u=a):o.position==="top"?(l=-90,h=180,f=180,u=a):(h=180,c=s)),{translate:[u,c],scale:[1,1],rotate:l,rotateX:h,rotateY:f,value:`translate(${u}px, ${c}px) rotate(${l}deg) rotateX(${h}deg) rotateY(${f}deg)`}}return new lt(i=>(H({fullDataFormatter:t,layout:e}).pipe(G(n),U(async o=>o)).subscribe(o=>{const a=r({xAxis:o.fullDataFormatter.grid.groupAxis,yAxis:o.fullDataFormatter.grid.valueAxis,width:o.layout.width,height:o.layout.height});i.next(a)}),function(){n.next(void 0)}))},_R=({gridAxesTransform$:t})=>t.pipe(B(e=>{const n=[0,0],r=[1/e.scale[0],1/e.scale[1]],i=e.rotate*-1,o=e.rotateX*-1,a=e.rotateY*-1;return{translate:n,scale:r,rotate:i,rotateX:o,rotateY:a,value:`translate(${n[0]}px, ${n[1]}px) rotate(${i}deg) rotateX(${o}deg) rotateY(${a}deg)`}})),wR=({computedData$:t,fullDataFormatter$:e,fullChartParams$:n,layout$:r})=>H({computedData:t,fullDataFormatter:e,fullChartParams:n,layout:r}).pipe(U(async o=>o),B(o=>{const a=o.fullDataFormatter.grid;if(!!(a.seriesSlotIndexes&&a.seriesSlotIndexes.length===o.computedData.length))return o.computedData.map((u,c)=>{const l=a.seriesSlotIndexes[c]%o.fullDataFormatter.container.columnAmount,h=Math.floor(a.seriesSlotIndexes[c]/o.fullDataFormatter.container.columnAmount),{translate:f,scale:d}=Y2(o.layout,o.fullDataFormatter.container,h,l);return{slotIndex:a.seriesSlotIndexes[c],rowIndex:h,columnIndex:l,translate:f,scale:d}});{const u=a.slotIndex%o.fullDataFormatter.container.columnAmount,c=Math.floor(a.slotIndex/o.fullDataFormatter.container.columnAmount);return o.computedData.map((l,h)=>{const{translate:f,scale:d}=Y2(o.layout,o.fullDataFormatter.container,c,u);return{slotIndex:a.slotIndex,rowIndex:c,columnIndex:u,translate:f,scale:d}})}})),Dh="OverlappingValueAxes",W2=st(Dh,"grid"),$R=qe(Dh,R2)(({selection:t,name:e,subject:n,observer:r})=>{const i=new it,o=[],a=r.fullParams$.pipe(G(i),B(l=>l.gridIndexes[0])),s=r.fullParams$.pipe(G(i),B(l=>l.gridIndexes[1])),u=H({firstGridIndex:a,secondGridIndex:s}).pipe(G(i),U(l=>r.fullDataFormatter$.pipe(G(i),B(h=>{h.gridList[l.secondGridIndex]||(h.gridList[l.secondGridIndex]=Object.assign({},h.gridList[l.firstGridIndex]));let f="";return h.gridList[l.firstGridIndex].valueAxis.position==="left"?f="right":h.gridList[l.firstGridIndex].valueAxis.position==="bottom"?f="top":h.gridList[l.firstGridIndex].valueAxis.position==="top"?f="bottom":h.gridList[l.firstGridIndex].valueAxis.position==="right"&&(f="left"),console.log("reversePosition",f),{type:"grid",grid:{...h.gridList[l.secondGridIndex],valueAxis:{...h.gridList[l.secondGridIndex].valueAxis,position:f}},container:{...h.container}}}))));return Nu(r).pipe(G(i),B(l=>({...l,fullParams$:l.fullParams$.pipe(B(h=>(h.gridIndexes.length>2&&(h.gridIndexes.length=2),h)))})),U(l=>wn(l)),B(l=>l.map((h,f)=>{if(f===0)return h;const d=xR({fullDataFormatter$:u,layout$:r.layout$}),p=_R({gridAxesTransform$:d}),g=wR({computedData$:h.gridComputedData$,fullDataFormatter$:u,fullChartParams$:r.fullChartParams$,layout$:r.layout$});return{...h,gridAxesTransform$:d,gridAxesReverseTransform$:p,gridContainer$:g}}))).subscribe(l=>{o.forEach(h=>h()),t.selectAll(`g.${W2}`).data(l).join("g").attr("class",W2).each((h,f,d)=>{if(f>1)return;const p=Z(d[f]);o[f]=$u(Dh,{selection:p,computedData$:h.gridComputedData$,fullParams$:r.fullParams$.pipe(B(g=>f===0?g.firstAxis:g.secondAxis)),fullDataFormatter$:h.gridDataFormatter$,fullChartParams$:r.fullChartParams$,gridAxesTransform$:h.gridAxesTransform$,gridAxesReverseTransform$:h.gridAxesReverseTransform$,gridAxesSize$:h.gridAxesSize$,gridContainer$:h.gridContainer$,isSeriesPositionSeprate$:h.isSeriesPositionSeprate$})})}),()=>{i.next(void 0),o.forEach(l=>l())}}),H2={header:{height:36,text:[],textStyle:[]},footer:{height:0,text:[],textStyle:[]}},q2={backgroundColorType:"background",strokeColorType:"primary",backgroundOpacity:.8,textColorType:"primary",offset:[20,5],padding:10,textRenderFn:t=>{if(t.highlightTarget==="datum"&&t.datum)return[`${t.datum.label}: ${t.datum.value}`];if(t.highlightTarget==="series"){const e=t.seriesLabel,n=t.series.map(r=>r.value).join(",");return[e,n]}else if(t.highlightTarget==="group"){const e=t.groupLabel,n=t.groups.map(r=>r.value).join(",");return[e,n]}return[]},svgRenderFn:null},SR=tp("Container",H2)(({selection:t})=>function(){}),Eh="Tooltip",X2=st(Eh,"g"),AR=st(Eh,"box");function MR(t,e){const n=e.textSize*1.5;return t.filter(r=>r!="").map((r,i)=>{const o=i*n;return`<text font-size="${e.textSize}" fill="${e.textColor}" x="0" y="${o}" style="dominant-baseline:text-before-edge">${r}</text>`}).join()}function TR({rootSelection:t,pluginName:e,rootWidth:n,rootHeight:r,svgString:i,tooltipStyle:o,event:a}){t.interrupt("fadeout");const s=5,u=i?[i]:[],c=i?[o]:[],h=t.selectAll(`g.${X2}`).data(u).join(b=>b.append("g").classed(X2,!0).attr("pointer-events","none"),b=>b,b=>b.style("opacity",0).remove()).attr("transform",()=>`translate(${a.offsetX}, ${a.offsetY})`).selectAll(`g.${AR}`).data(c).join(b=>b.append("g").classed(st(e,"box"),!0)),f=h.selectAll("rect").data(c).join(b=>b.append("rect").attr("rx",s).attr("ry",s)).attr("fill",b=>b.backgroundColor).attr("stroke",b=>b.strokeColor).attr("opacity",b=>b.backgroundOpacity),d=h.selectAll("g").data(u).join(b=>b.append("g").classed(st(e,"content"),!0).attr("transform",()=>`translate(${o.padding}, ${o.padding})`));u.length&&dC(d,u[0]);const p=d!=null&&d.node()?e2(d):{width:0,height:0};f.attr("width",p.width+o.padding*2).attr("height",p.height+o.padding*2);const g=h!=null&&h.node()?e2(h):{width:0,height:0},m=n-g.width,y=r-g.height,_=a.offsetX+o.offset[0]>m?m-a.offsetX:o.offset[0],x=a.offsetY+o.offset[1]>y?y-a.offsetY:o.offset[1];h.attr("transform",b=>`translate(${_}, ${x})`),h.attr("transform",b=>`translate(${_}, ${x})`)}const PR=tp(Eh,q2)(({selection:t,rootSelection:e,name:n,chartType:r,observer:i,subject:o})=>{const a=new it,s=o.event$.pipe(G(a),No(p=>p.eventName==="mouseover"||p.eventName==="mousemove")),u=o.event$.pipe(G(a),No(p=>p.eventName==="mouseout")),c=H({fullChartParams:i.fullChartParams$,fullParams:i.fullParams$}).pipe(G(a),U(async p=>p),B(p=>({backgroundColor:Bt(p.fullParams.backgroundColorType,p.fullChartParams),backgroundOpacity:p.fullParams.backgroundOpacity,strokeColor:Bt(p.fullParams.strokeColorType,p.fullChartParams),offset:p.fullParams.offset,padding:p.fullParams.padding,textSize:p.fullChartParams.styles.textSize,textColor:Bt(p.fullParams.textColorType,p.fullChartParams)}))),l=H({fullParams:i.fullParams$,tooltipStyle:c}).pipe(G(a),U(async p=>p),B(p=>p.fullParams.svgRenderFn?p.fullParams.svgRenderFn:g=>{const m=p.fullParams.textRenderFn(g);return MR(m,p.tooltipStyle)})),h=H({event:s,contentRenderFn:l}).pipe(G(a),U(async p=>p),B(p=>p.contentRenderFn(p.event))),f=u.pipe(G(a),B(p=>"")),d=zu(s,u).pipe(G(a),B(p=>p.event));return H({svgString:zu(h,f),event:d,layout:i.layout$,tooltipStyle:c}).pipe(G(a),U(async p=>p)).subscribe(p=>{TR({rootSelection:e,pluginName:n,rootWidth:p.layout.rootWidth,rootHeight:p.layout.rootHeight,svgString:p.svgString,tooltipStyle:p.tooltipStyle,event:p.event})}),function(){a.next(void 0)}}),V2={force:{strength:.03,velocityDecay:.2,collisionSpacing:2},bubbleText:{fillRate:.6,lineHeight:12,lineLengthMin:4},highlightRIncrease:0,bubbleScaleType:"area"},j2={outerRadius:.95,innerRadius:0,outerMouseoverRadius:1,enterDuration:800,startAngle:0,endAngle:Math.PI*2,padAngle:.02,cornerRadius:0},Z2={eventFn:(t,e,n)=>e==="mouseover"||e==="mousemove"?[String(t.datum.value)]:[String(Math.round(t.data.reduce((r,i)=>r+(i.value??0),0)*n))],textAttrs:[{transform:"translate(0, 0)"}],textStyles:[{"font-weight":"bold","text-anchor":"middle","pointer-events":"none","dominant-baseline":"middle","font-size":64,fill:"#000"}]},K2={outerRadius:.95,outerMouseoverRadius:1,startAngle:0,endAngle:Math.PI*2,labelCentroid:2.3,labelColorType:"series",labelFn:t=>String(t.value)},Q2={position:"right",justify:"end",padding:28,backgroundFill:"none",backgroundStroke:"none",gap:10,listRectWidth:14,listRectHeight:14,listRectRadius:0};function DR(t,{text:e,radius:n,lineHeight:r,isBreakAll:i=!1,limit:o=0}){if(t==null||e==null){console.error("selection or text is not defined");return}n==null&&(n=t.node().getBBox().width/2);function a(d){let p;return i?p=d.split(""):p=d.split(/\s+/g),p[p.length-1]||p.pop(),p[0]||p.shift(),p}function s(d,p){return d&&p&&d.length>p&&(d=d.substring(0,p)+"..."),d}function u(d){var g;const p=document.createElement("canvas").getContext("2d");return((g=p==null?void 0:p.measureText(d))==null?void 0:g.width)??0}function c(d){const p=u(d.trim());return Math.sqrt(p*r)}function l(d,p){let g={width:0,text:""},m=1/0;const y=[];let _=" ";i&&(_="");for(let x=0,b=d.length;x<b;++x){const $=(g.text?g.text+_:"")+d[x],v=u($);(m+v)/2<p?(g.width=m=v,g.text=$):(m=u(d[x]),g={width:m,text:d[x]},y.push(g))}return y}function h(d){let p=0;for(let g=0,m=d.length;g<m;++g){const y=(Math.abs(g-m/2+.5)+.5)*r,_=d[g].width/2;p=Math.max(p,Math.sqrt(_**2+y**2))}return p}function f(d,p){o>0&&(p=s(p,o));const g=a(p),m=c(p),y=l(g,m),_=h(y);let x=d.select("text");x.size()||(x=d.append("text")),x.attr("transform",`translate(0,0) scale(${n/_})`);const b=x.selectAll("tspan").data(y),$=b.enter().append("tspan").attr("x",0).merge(b).attr("y",(v,w)=>(w-y.length/2+.8)*r).text(v=>v.text);return b.exit().remove(),b.merge($)}return f(t,e)}let ir;function ER(t,e){return T1().velocityDecay(e.force.velocityDecay).force("collision",S1().radius(n=>n.r+e.force.collisionSpacing)).force("charge",P1().strength(n=>-Math.pow(n.r,2)*e.force.strength)).on("tick",()=>{t.attr("transform",n=>`translate(${n.x},${n.y})`)})}function kR({data:t,bubbleGroupR:e,maxValue:n,avgValue:r}){const i=e/Math.sqrt(t.length),a=i*i*Math.PI/r,s=n*a;return Math.pow(s/Math.PI,.5)*.75}function LR({data:t,LastBubbleDataMap:e,graphicWidth:n,graphicHeight:r,scaleType:i}){const o=Math.min(n,r)/2,a=t.flat().filter(d=>d.value!=null&&d.visible!=!1),s=Math.max(...a.map(d=>d.value)),u=a.reduce((d,p)=>d+(p.value??0),0)/a.length,c=kR({data:a,bubbleGroupR:o,maxValue:s,avgValue:u}),l=i==="area"?.5:1,h=js().domain([0,s]).range([0,c]).exponent(l);return a.map(d=>{const p=d,g=e.get(d.id);g?(p.x=g.x,p.y=g.y):(p.x=Math.random()*n,p.y=Math.random()*r);const m=h(p.value??0);return p.r=m,p._originR=m,p})}function J2({graphicSelection:t,bubblesData:e,fullParams:n}){let r=t.selectAll("g").data(e,a=>a.id),i=r.enter().append("g").attr("cursor","pointer");i.style("font-size",12).style("fill","#ffffff").attr("text-anchor","middle").attr("transform",a=>`translate(${a.x},${a.y})`),i.append("circle").attr("class","node").attr("cx",0).attr("cy",0).attr("fill",a=>a.color),i.append("text").style("opacity",.8).attr("pointer-events","none"),r.exit().remove();const o=r.merge(i);return o.select("circle").transition().duration(200).attr("r",a=>a.r).attr("fill",a=>a.color),o.each((a,s,u)=>{const c=Z(u[s]);let l=!0;a.label.length<=n.bubbleText.lineLengthMin&&(l=!1),c.call(DR,{text:a.label,radius:a.r*n.bubbleText.fillRate,lineHeight:n.bubbleText.lineHeight,isBreakAll:l})}),o}function CR({data:t,highlightRIncrease:e,highlightIds:n}){if(e!=0){if(!n.length){t.forEach(r=>r.r=r._originR);return}t.forEach(r=>{n.includes(r.id)?r.r=r._originR+e:r.r=r._originR})}}function RR(){return Up().on("start",(t,e)=>{t.active||ir.alpha(1).restart(),e.fx=e.x,e.fy=e.y}).on("drag",(t,e)=>{t.active||ir.alphaTarget(0),e.fx=t.x,e.fy=t.y}).on("end",(t,e)=>{e.fx=null,e.fy=null})}function tx({fullParams:t,graphicWidth:e,graphicHeight:n}){ir.force("x",D1().strength(t.force.strength).x(0)).force("y",E1().strength(t.force.strength).y(0)),ir.alpha(1).restart()}function IR({bubblesSelection:t,highlightIds:e,fullChartParams:n}){if(t.interrupt("highlight"),!e.length){t.transition("highlight").style("opacity",1);return}t.each((r,i,o)=>{const a=Z(o[i]);e.includes(r.id)?a.style("opacity",1).transition("highlight").ease(Va).duration(500):a.style("opacity",n.styles.unhighlightedOpacity)})}const NR=$i("Bubbles",V2)(({selection:t,name:e,observer:n,subject:r})=>{const i=new it,o=t.append("g"),a=new it;let s=new Map;n.layout$.pipe(si()).subscribe(h=>{t.attr("transform",`translate(${h.width/2}, ${h.height/2})`),n.layout$.pipe(G(i)).subscribe(f=>{t.transition().attr("transform",`translate(${f.width/2}, ${f.height/2})`)})});const u=n.fullParams$.pipe(G(i),B(h=>h.bubbleScaleType),ht()),c=new lt(h=>{H({layout:n.layout$,computedData:n.computedData$,scaleType:u}).pipe(G(i),U(async f=>f)).subscribe(f=>{const d=LR({data:f.computedData,LastBubbleDataMap:s,graphicWidth:f.layout.width,graphicHeight:f.layout.height,scaleType:f.scaleType});h.next(d)})});c.subscribe(h=>{s=new Map(h.map(f=>[f.id,f]))});const l=n.fullChartParams$.pipe(G(i),B(h=>h.highlightTarget),ht());return H({layout:n.layout$,computedData:n.computedData$,bubblesData:c,SeriesDataMap:n.SeriesDataMap$,fullParams:n.fullParams$,highlightTarget:l}).pipe(G(i),U(async h=>h)).subscribe(h=>{const f=J2({graphicSelection:o,bubblesData:h.bubblesData,fullParams:h.fullParams});ir=ER(f,h.fullParams),f.on("mouseover",(d,p)=>{r.event$.next({type:"series",eventName:"mouseover",pluginName:e,highlightTarget:h.highlightTarget,datum:p,series:h.SeriesDataMap.get(p.seriesLabel),seriesIndex:p.seriesIndex,seriesLabel:p.seriesLabel,event:d,data:h.computedData})}).on("mousemove",(d,p)=>{r.event$.next({type:"series",eventName:"mousemove",pluginName:e,highlightTarget:h.highlightTarget,datum:p,series:h.SeriesDataMap.get(p.seriesLabel),seriesIndex:p.seriesIndex,seriesLabel:p.seriesLabel,event:d,data:h.computedData})}).on("mouseout",(d,p)=>{r.event$.next({type:"series",eventName:"mouseout",pluginName:e,highlightTarget:h.highlightTarget,datum:p,series:h.SeriesDataMap.get(p.seriesLabel),seriesIndex:p.seriesIndex,seriesLabel:p.seriesLabel,event:d,data:h.computedData})}).on("click",(d,p)=>{r.event$.next({type:"series",eventName:"click",pluginName:e,highlightTarget:h.highlightTarget,datum:p,series:h.SeriesDataMap.get(p.seriesLabel),seriesIndex:p.seriesIndex,seriesLabel:p.seriesLabel,event:d,data:h.computedData})}).call(RR()),ir.nodes(h.bubblesData),tx({fullParams:h.fullParams,graphicWidth:h.layout.width,graphicHeight:h.layout.height}),a.next(f)}),H({bubblesSelection:a,bubblesData:c,highlight:n.seriesHighlight$,fullChartParams:n.fullChartParams$,fullParams:n.fullParams$,layout:n.layout$}).pipe(G(i),U(async h=>h)).subscribe(h=>{IR({bubblesSelection:h.bubblesSelection,highlightIds:h.highlight,fullChartParams:h.fullChartParams}),h.fullParams.highlightRIncrease&&(CR({data:h.bubblesData,highlightRIncrease:h.fullParams.highlightRIncrease,highlightIds:h.highlight}),J2({graphicSelection:o,bubblesData:h.bubblesData,fullParams:h.fullParams})),tx({fullParams:h.fullParams,graphicWidth:h.layout.width,graphicHeight:h.layout.height}),ir.nodes(h.bubblesData)}),()=>{i.next(void 0)}});function ex({computedDataSeries:t,startAngle:e,endAngle:n}){return hv().startAngle(e).endAngle(n).value(o=>o.visible==!1?0:o.value).sort((o,a)=>o.sortedIndex-a.sortedIndex)(t).map((o,a)=>{let s=o;return s.id=o.data.id,s})}const nx="Pie",FR=st(nx,"path");function GR({enter:t,exit:e,data:n,lastData:r,fullParams:i}){return!t.size()&&!e.size()?o=>{const a=n.map((s,u)=>{const c=r[u]??{startAngle:0,endAngle:0,value:0};return{...s,startAngle:s.startAngle*o+c.startAngle*(1-o),endAngle:s.endAngle*o+c.endAngle*(1-o),value:s.value*o+c.value*(1-o)}});return kh(a,i.startAngle,i.endAngle,1)}:o=>kh(n,i.startAngle,i.endAngle,o)}function kh(t,e,n,r){return t.map((i,o)=>{const a=e+(i.startAngle-e)*r,s=a+(i.endAngle-i.startAngle)*r;return{...i,startAngle:a,endAngle:s}})}function rx({selection:t,renderData:e,arc:n}){let r=t.selectAll("path").data(e,s=>s.id),i=r.enter().append("path").classed(FR,!0),o=r.exit();i.append("path");const a=r.merge(i);return a.style("cursor","pointer").attr("fill",(s,u)=>s.data.color).attr("d",(s,u)=>n(s)),o.remove(),a}function zR({pathSelection:t,ids:e,fullChartParams:n,arc:r,arcMouseover:i}){if(t.interrupt("highlight"),!e.length){t.transition("highlight").style("opacity",1).attr("d",o=>r(o));return}t.each((o,a,s)=>{const u=Z(s[a]);e.includes(o.data.id)?u.style("opacity",1).transition("highlight").ease(Va).duration(500).attr("d",c=>i(c)):u.style("opacity",n.styles.unhighlightedOpacity).transition("highlight").attr("d",c=>r(c))})}const OR=$i(nx,j2)(({selection:t,name:e,observer:n,subject:r})=>{const i=new it,o=t.append("g"),a=new it;let s=[],u=[];n.layout$.pipe(si()).subscribe(p=>{t.attr("transform",`translate(${p.width/2}, ${p.height/2})`),n.layout$.pipe(G(i)).subscribe(g=>{t.transition().attr("transform",`translate(${g.width/2}, ${g.height/2})`)})});const c=n.layout$.pipe(G(i),B(p=>p.width<p.height?p.width:p.height)),l=new lt(p=>{H({computedData:n.computedData$,fullParams:n.fullParams$}).pipe(G(i),U(async g=>g)).subscribe(g=>{const m=ex({computedDataSeries:g.computedData,startAngle:g.fullParams.startAngle,endAngle:g.fullParams.endAngle});p.next(m)})}),h=new lt(p=>{H({shorterSideWith:c,fullParams:n.fullParams$}).pipe(G(i),U(async g=>g)).subscribe(g=>{const m=wu({axisWidth:g.shorterSideWith,innerRadius:g.fullParams.innerRadius,outerRadius:g.fullParams.outerRadius,padAngle:g.fullParams.padAngle,cornerRadius:g.fullParams.cornerRadius});p.next(m)})}),f=new lt(p=>{H({shorterSideWith:c,fullParams:n.fullParams$}).pipe(G(i),U(async g=>g)).subscribe(g=>{const m=wu({axisWidth:g.shorterSideWith,innerRadius:g.fullParams.innerRadius,outerRadius:g.fullParams.outerMouseoverRadius,padAngle:g.fullParams.padAngle,cornerRadius:g.fullParams.cornerRadius});p.next(m)})}),d=n.fullChartParams$.pipe(G(i),B(p=>p.highlightTarget),ht());return H({pieData:l,SeriesDataMap:n.SeriesDataMap$,arc:h,arcMouseover:f,computedData:n.computedData$,fullParams:n.fullParams$,fullChartParams:n.fullChartParams$,highlightTarget:d}).pipe(G(i),U(async p=>p)).subscribe(p=>{o.interrupt("graphicMove");let g=t.selectAll("path").data(p.pieData,x=>x.data.id),m=g.enter(),y=g.exit();const _=GR({enter:m,exit:y,data:p.pieData,lastData:s,fullParams:p.fullParams});o.transition("graphicMove").duration(p.fullChartParams.transitionDuration).ease(ri(p.fullChartParams.transitionEase)).tween("move",(x,b)=>$=>{u=_($),rx({selection:o,renderData:u,arc:p.arc}),r.event$.next({type:"series",pluginName:e,eventName:"transitionMove",event:void 0,highlightTarget:p.highlightTarget,datum:null,series:[],seriesIndex:-1,seriesLabel:"",data:p.computedData})}).on("end",(x,b)=>{u=kh(p.pieData,p.fullParams.startAngle,p.fullParams.endAngle,1);const $=rx({selection:o,renderData:u,arc:p.arc});a.next($),s=Object.assign([],p.pieData),r.event$.next({type:"series",pluginName:e,eventName:"transitionEnd",event:void 0,highlightTarget:p.highlightTarget,datum:null,series:[],seriesIndex:-1,seriesLabel:"",data:p.computedData}),$.on("mouseover",(v,w)=>{v.stopPropagation(),r.event$.next({type:"series",eventName:"mouseover",pluginName:e,highlightTarget:p.highlightTarget,datum:w.data,series:p.SeriesDataMap.get(w.data.seriesLabel),seriesIndex:w.data.seriesIndex,seriesLabel:w.data.seriesLabel,event:v,data:p.computedData})}).on("mousemove",(v,w)=>{v.stopPropagation(),r.event$.next({type:"series",eventName:"mousemove",pluginName:e,highlightTarget:p.highlightTarget,datum:w.data,series:p.SeriesDataMap.get(w.data.seriesLabel),seriesIndex:w.data.seriesIndex,seriesLabel:w.data.seriesLabel,event:v,data:p.computedData})}).on("mouseout",(v,w)=>{v.stopPropagation(),r.event$.next({type:"series",eventName:"mouseout",pluginName:e,highlightTarget:p.highlightTarget,datum:w.data,series:p.SeriesDataMap.get(w.data.seriesLabel),seriesIndex:w.data.seriesIndex,seriesLabel:w.data.seriesLabel,event:v,data:p.computedData})}).on("click",(v,w)=>{v.stopPropagation(),r.event$.next({type:"series",eventName:"click",pluginName:e,highlightTarget:p.highlightTarget,datum:w.data,series:p.SeriesDataMap.get(w.data.seriesLabel),seriesIndex:w.data.seriesIndex,seriesLabel:w.data.seriesLabel,event:v,data:p.computedData})})})}),H({pathSelection:a,highlight:n.seriesHighlight$,fullChartParams:n.fullChartParams$,arc:h,arcMouseover:f}).pipe(G(i),U(async p=>p)).subscribe(p=>{zR({pathSelection:p.pathSelection,ids:p.highlight,fullChartParams:p.fullChartParams,arc:p.arc,arcMouseover:p.arcMouseover})}),()=>{i.next(void 0)}}),ix="PieEventTexts",ox=st(ix,"text");function Lh(t,e){const n=t.selectAll(`text.${ox}`).data(e),r=n.enter().append("text").classed(ox,!0),i=n.merge(r);return i.each((o,a,s)=>{const u=Z(s[a]).text(o.text);Object.keys(o.attr).forEach(c=>{u.attr(c,o.attr[c])}),Object.keys(o.style).forEach(c=>{u.style(c,o.style[c])})}),n.exit().remove(),i}function Ch({eventData:t,eventName:e,t:n,eventFn:r,textAttrs:i,textStyles:o}){return r(t,e,n).map((s,u)=>({text:s,attr:i[u],style:o[u]}))}const UR=$i(ix,Z2)(({selection:t,name:e,observer:n,subject:r})=>{const i=new it,o=t.append("g");let a;n.layout$.pipe(si()).subscribe(u=>{t.attr("transform",`translate(${u.width/2}, ${u.height/2})`),n.layout$.pipe(G(i)).subscribe(c=>{t.transition().attr("transform",`translate(${c.width/2}, ${c.height/2})`)})});const s=n.fullChartParams$.pipe(G(i),B(u=>u.highlightTarget),ht());return H({computedData:n.computedData$,fullParams:n.fullParams$,fullChartParams:n.fullChartParams$,highlightTarget:s}).pipe(G(i),U(async u=>u)).subscribe(u=>{o.transition().duration(u.fullChartParams.transitionDuration).ease(ri(u.fullChartParams.transitionEase)).tween("move",(c,l)=>h=>{const f=Ch({eventData:{type:"series",pluginName:e,eventName:"transitionMove",event:c,highlightTarget:u.highlightTarget,data:u.computedData,series:[],seriesIndex:-1,seriesLabel:"",datum:null},eventName:"transitionMove",t:h,eventFn:u.fullParams.eventFn,textAttrs:u.fullParams.textAttrs,textStyles:u.fullParams.textStyles});Lh(o,f)}).on("end",(c,l)=>{const h=Ch({eventData:{type:"series",pluginName:e,eventName:"transitionEnd",event:c,highlightTarget:u.highlightTarget,data:u.computedData,series:[],seriesIndex:-1,seriesLabel:"",datum:null},eventName:"transitionMove",t:1,eventFn:u.fullParams.eventFn,textAttrs:u.fullParams.textAttrs,textStyles:u.fullParams.textStyles});Lh(o,h),a&&a.unsubscribe(),a=r.event$.subscribe(f=>{const d=Ch({eventData:f,eventName:f.eventName,t:1,eventFn:u.fullParams.eventFn,textAttrs:u.fullParams.textAttrs,textStyles:u.fullParams.textStyles});Lh(o,d)})})}),()=>{i.next(void 0)}}),ax="PieLabels",BR=st(ax,"text");function YR(t,e,n,r){return t.map((i,o)=>{const[a,s]=e.centroid(i),[u,c]=n.centroid(i);return{pieDatum:i,arcIndex:o,arcLabel:i.data.label,x:a*r,y:s*r,mouseoverX:u*r,mouseoverY:c*r}}).filter(i=>i.pieDatum.data.visible)}function WR(t,e,n,r){let i=t.selectAll("text").data(e,u=>u.pieDatum.id),o=i.enter().append("text").classed(BR,!0),a=i.exit();o.append("text");const s=i.merge(o);return s.attr("font-weight","bold").attr("text-anchor","middle").style("dominant-baseline","middle").style("cursor",u=>r.highlightTarget&&r.highlightTarget!="none"?"pointer":"none").text(u=>n.labelFn(u.pieDatum.data)).attr("font-size",r.styles.textSize).attr("fill",(u,c)=>yh({datum:u.pieDatum.data,colorType:n.labelColorType,fullChartParams:r})).transition().attr("transform",u=>"translate("+u.x+","+u.y+")"),a.remove(),s}function HR({labelSelection:t,ids:e,fullChartParams:n}){if(t.interrupt("highlight"),!e.length){t.transition().duration(200).attr("transform",r=>"translate("+r.x+","+r.y+")").style("opacity",1);return}t.each((r,i,o)=>{const a=Z(o[i]);e.includes(r.pieDatum.id)?a.style("opacity",1).transition().duration(200).attr("transform",s=>"translate("+s.mouseoverX+","+s.mouseoverY+")"):a.style("opacity",n.styles.unhighlightedOpacity).transition().duration(200).attr("transform",s=>"translate("+s.x+","+s.y+")")})}const qR=$i(ax,K2)(({selection:t,observer:e,subject:n})=>{const r=new it,i=t.append("g");let o=new it,a=[];return e.layout$.pipe(si()).subscribe(s=>{t.attr("transform",`translate(${s.width/2}, ${s.height/2})`),e.layout$.pipe(G(r)).subscribe(u=>{t.transition().attr("transform",`translate(${u.width/2}, ${u.height/2})`)})}),H({layout:e.layout$,computedData:e.computedData$,fullParams:e.fullParams$,fullChartParams:e.fullChartParams$}).pipe(G(r),U(async s=>s)).subscribe(s=>{const u=s.layout.width<s.layout.height?s.layout.width:s.layout.height,c=wu({axisWidth:u,innerRadius:0,outerRadius:s.fullParams.outerRadius,padAngle:0,cornerRadius:0}),l=wu({axisWidth:u,innerRadius:0,outerRadius:s.fullParams.outerMouseoverRadius,padAngle:0,cornerRadius:0}),h=ex({computedDataSeries:s.computedData,startAngle:s.fullParams.startAngle,endAngle:s.fullParams.endAngle});a=YR(h,c,l,s.fullParams.labelCentroid);const f=WR(i,a,s.fullParams,s.fullChartParams);o.next(f)}),H({labelSelection:o,highlight:e.seriesHighlight$,fullChartParams:e.fullChartParams$}).pipe(G(r),U(async s=>s)).subscribe(s=>{HR({labelSelection:s.labelSelection,ids:s.highlight,fullChartParams:s.fullChartParams})}),()=>{r.next(void 0)}}),sx="SeriesLegend",XR=$i(sx,Q2)(({selection:t,rootSelection:e,observer:n,subject:r})=>{const i=new it,o=n.SeriesDataMap$.pipe(G(i),B(u=>Array.from(u.keys()))),a=n.fullParams$.pipe(G(i),B(u=>{const c=[{listRectWidth:u.listRectWidth,listRectHeight:u.listRectHeight,listRectRadius:u.listRectRadius}];return{...u,seriesList:c}})),s=bh(sx,{rootSelection:e,seriesLabels$:o,fullParams$:a,layout$:n.layout$,fullChartParams$:n.fullChartParams$});return()=>{i.next(void 0),s()}});Q.BarStack=NC,Q.Bars=DC,Q.BarsTriangle=WC,Q.Bubbles=NR,Q.CONTAINER_PLUGIN_PARAMS=H2,Q.Container=SR,Q.DEFAULT_BARS_PARAMS=Nh,Q.DEFAULT_BARS_TRIANGLE_PARAMS=Gh,Q.DEFAULT_BAR_STACK_PARAMS=Fh,Q.DEFAULT_BUBBLES_PARAMS=V2,Q.DEFAULT_DOTS_PARAMS=Rh,Q.DEFAULT_GRID_LEGEND_PARAMS=Bh,Q.DEFAULT_GROUP_AREA_PARAMS=Ih,Q.DEFAULT_GROUP_AXIS_PARAMS=zh,Q.DEFAULT_LINES_PARAMS=or,Q.DEFAULT_MULTI_BARS_PARAMS=D2,Q.DEFAULT_MULTI_BARS_TRIANGLE_PARAMS=k2,Q.DEFAULT_MULTI_BAR_STACK_PARAMS=E2,Q.DEFAULT_MULTI_DOTS_PARAMS=C2,Q.DEFAULT_MULTI_GRID_LEGEND_PARAMS=M2,Q.DEFAULT_MULTI_GROUP_AXIS_PARAMS=T2,Q.DEFAULT_MULTI_LINES_PARAMS=L2,Q.DEFAULT_MULTI_VALUE_AXIS_PARAMS=P2,Q.DEFAULT_OVERLAPPING_VALUE_AXES_PARAMS=R2,Q.DEFAULT_PIE_EVENT_TEXTS_PARAMS=Z2,Q.DEFAULT_PIE_LABELS_PARAMS=K2,Q.DEFAULT_PIE_PARAMS=j2,Q.DEFAULT_SCALING_AREA_PARAMS=Uh,Q.DEFAULT_SERIES_LEGEND_PARAMS=Q2,Q.DEFAULT_VALUE_AXIS_PARAMS=Su,Q.DEFAULT_VALUE_STACK_AXIS_PARAMS=Oh,Q.Dots=VC,Q.GridLegend=ZC,Q.GroupAux=fR,Q.GroupAxis=QC,Q.Lines=wC,Q.MultiBarStack=pR,Q.MultiBars=dR,Q.MultiBarsTriangle=gR,Q.MultiDots=yR,Q.MultiGridLegend=hR,Q.MultiGroupAxis=bR,Q.MultiLines=mR,Q.MultiValueAxis=vR,Q.OverlappingValueAxes=$R,Q.Pie=OR,Q.PieEventTexts=UR,Q.PieLabels=qR,Q.ScalingArea=rR,Q.SeriesLegend=XR,Q.TOOLTIP_PARAMS=q2,Q.Tooltip=PR,Q.ValueAxis=tR,Q.ValueStackAxis=eR,Object.defineProperty(Q,Symbol.toStringTag,{value:"Module"})});
|
12
|
+
`})}function BC({defsSelection:t,clipPathData:e}){t.selectAll("clipPath").data(e).join(n=>n.append("clipPath"),n=>n,n=>n.remove()).attr("id",n=>n.id).each((n,r,i)=>{Z(i[r]).selectAll("rect").data([n]).join(o=>o.append("rect"),o=>o,o=>o.remove()).attr("x",0).attr("y",0).attr("width",o=>o.width).attr("height",o=>o.height)})}function YC({selection:t,ids:e,fullChartParams:n}){t.interrupt("highlight");const r=()=>{t.transition("highlight").duration(200).style("opacity",1)};if(!e.length){r();return}t.each((i,o,a)=>{e.includes(i.id)?Z(a[o]).style("opacity",1):Z(a[o]).style("opacity",n.styles.unhighlightedOpacity)})}const g2=(t,{selection:e,computedData$:n,visibleComputedData$:r,existedSeriesLabels$:i,SeriesDataMap$:o,GroupDataMap$:a,fullParams$:s,fullChartParams$:u,gridAxesTransform$:c,gridGraphicTransform$:l,gridAxesSize$:h,gridHighlight$:f,gridContainer$:d,isSeriesPositionSeprate$:p,event$:g})=>{const m=new it,y=oi(t,"clipPath-box"),x=ut(t,"pathG"),v=ut(t,"path"),{seriesSelection$:b,axesSelection$:$,defsSelection$:w,graphicGSelection$:S}=ko({selection:e,pluginName:t,clipPathID:y,existedSeriesLabels$:i,gridContainer$:d,gridAxesTransform$:c,gridGraphicTransform$:l}),_=r.pipe(B(R=>R.map(F=>F[0]?F[0].axisY-F[0].axisYFromZero:0)),dt()),P=H({computedData:n,visibleComputedData:r,params:s,gridAxesSize:h,isSeriesPositionSeprate:p}).pipe(G(m),U(async R=>R),B(R=>R.params.barWidth?R.params.barWidth:R.isSeriesPositionSeprate?p2({axisWidth:R.gridAxesSize.width,groupAmount:R.computedData[0]?R.computedData[0].length:0,barAmountOfGroup:1,barPadding:R.params.barPadding,barGroupPadding:R.params.barGroupPadding}):p2({axisWidth:R.gridAxesSize.width,groupAmount:R.computedData[0]?R.computedData[0].length:0,barAmountOfGroup:R.visibleComputedData.length,barPadding:R.params.barPadding,barGroupPadding:R.params.barGroupPadding}))),D=r.pipe(G(m),B(R=>{const F=new Set;return R.forEach(C=>{C.forEach(z=>{F.add(z.seriesLabel)})}),Array.from(F)})),A=r.pipe(G(m),B(R=>{const F=new Set;return R.forEach(C=>{C.forEach(z=>{F.add(z.groupLabel)})}),Array.from(F)})),I=new lt(R=>{H({seriesLabels:D,barWidth:P,params:s}).pipe(G(m),U(async F=>F)).subscribe(F=>{const C=FC(F.barWidth,F.seriesLabels,F.params);R.next(C)})}),M=u.pipe(G(m),B(R=>R.transitionDuration),dt()),T=new lt(R=>{H({groupLabels:A,transitionDuration:M}).pipe(U(async F=>F)).subscribe(F=>{const C=GC(F.groupLabels.length,F.transitionDuration);R.next(C)})}).pipe(G(m),dt()),k=new lt(R=>{H({groupLabels:A,transitionDuration:M}).pipe(U(async F=>F)).subscribe(F=>{const C=zC(F.groupLabels.length,F.transitionDuration);R.next(C)})}).pipe(G(m),dt());H({defsSelection:w,gridAxesSize:h}).pipe(G(m),U(async R=>R)).subscribe(R=>{const F=[{id:y,width:R.gridAxesSize.width,height:R.gridAxesSize.height}];BC({defsSelection:R.defsSelection,clipPathData:F})});const E=u.pipe(G(m),B(R=>R.highlightTarget),dt()),N=new it,O=D.pipe(G(m),B(R=>R.map((F,C)=>oi(t,`lineargradient-${F}`)))),L=H({linearGradientIds:O,computedData:n}).pipe(G(m),U(async R=>R),B(R=>R.computedData.map((F,C)=>F.map((z,X)=>({linearGradientId:R.linearGradientIds[C],...z})))));return H({graphicGSelection:S,defsSelection:w,computedData:n,barData:L,zeroYArr:_,groupLabels:A,barScale:I,params:s,chartParams:u,highlightTarget:E,barWidth:P,delayGroup:T,transitionItem:k,SeriesDataMap:o,GroupDataMap:a,isSeriesPositionSeprate:p}).pipe(G(m),U(async R=>R)).subscribe(R=>{const F=OC({graphicGSelection:R.graphicGSelection,pathGClassName:x,pathClassName:v,barData:R.barData,zeroYArr:R.zeroYArr,groupLabels:R.groupLabels,barScale:R.barScale,params:R.params,chartParams:R.chartParams,barWidth:R.barWidth,delayGroup:R.delayGroup,transitionItem:R.transitionItem,isSeriesPositionSeprate:R.isSeriesPositionSeprate});UC({defsSelection:R.defsSelection,barData:R.barData,params:R.params}),F.on("mouseover",(C,z)=>{C.stopPropagation(),g.next({type:"grid",eventName:"mouseover",pluginName:t,highlightTarget:R.highlightTarget,datum:z,series:R.SeriesDataMap.get(z.seriesLabel),seriesIndex:z.seriesIndex,seriesLabel:z.seriesLabel,groups:R.GroupDataMap.get(z.groupLabel),groupIndex:z.groupIndex,groupLabel:z.groupLabel,event:C,data:R.computedData})}).on("mousemove",(C,z)=>{C.stopPropagation(),g.next({type:"grid",eventName:"mousemove",pluginName:t,highlightTarget:R.highlightTarget,datum:z,series:R.SeriesDataMap.get(z.seriesLabel),seriesIndex:z.seriesIndex,seriesLabel:z.seriesLabel,groups:R.GroupDataMap.get(z.groupLabel),groupIndex:z.groupIndex,groupLabel:z.groupLabel,event:C,data:R.computedData})}).on("mouseout",(C,z)=>{C.stopPropagation(),g.next({type:"grid",eventName:"mouseout",pluginName:t,highlightTarget:R.highlightTarget,datum:z,series:R.SeriesDataMap.get(z.seriesLabel),seriesIndex:z.seriesIndex,seriesLabel:z.seriesLabel,groups:R.GroupDataMap.get(z.groupLabel),groupIndex:z.groupIndex,groupLabel:z.groupLabel,event:C,data:R.computedData})}).on("click",(C,z)=>{C.stopPropagation(),g.next({type:"grid",eventName:"click",pluginName:t,highlightTarget:R.highlightTarget,datum:z,series:R.SeriesDataMap.get(z.seriesLabel),seriesIndex:z.seriesIndex,seriesLabel:z.seriesLabel,groups:R.GroupDataMap.get(z.groupLabel),groupIndex:z.groupIndex,groupLabel:z.groupLabel,event:C,data:R.computedData})}),N.next(F)}),H({barSelection:N,highlight:f,fullChartParams:u}).pipe(G(m),U(async R=>R)).subscribe(R=>{YC({selection:R.barSelection,ids:R.highlight,fullChartParams:R.fullChartParams})}),()=>{m.next(void 0)}},m2="BarsTriangle",WC=$e(m2,Gh)(({selection:t,name:e,subject:n,observer:r})=>{const i=new it,o=g2(m2,{selection:t,computedData$:r.computedData$,visibleComputedData$:r.visibleComputedData$,existedSeriesLabels$:r.existedSeriesLabels$,SeriesDataMap$:r.SeriesDataMap$,GroupDataMap$:r.GroupDataMap$,fullParams$:r.fullParams$,fullChartParams$:r.fullChartParams$,gridAxesTransform$:r.gridAxesTransform$,gridGraphicTransform$:r.gridGraphicTransform$,gridAxesSize$:r.gridAxesSize$,gridHighlight$:r.gridHighlight$,gridContainer$:r.gridContainer$,isSeriesPositionSeprate$:r.isSeriesPositionSeprate$,event$:n.event$});return()=>{i.next(void 0),o()}});function HC({graphicGSelection:t,circleGClassName:e,circleClassName:n,data:r,fullParams:i,fullChartParams:o,graphicReverseScale:a}){const s=l=>{const h=l.size();return o.transitionDuration/h};let u=0;return t.each((l,h,f)=>{Z(f[h]).selectAll("g").data(r[h],d=>d.id).join(d=>(u=s(d),d.append("g").classed(e,!0)),d=>d,d=>d.remove()).attr("transform",d=>`translate(${d.axisX}, ${d.axisY})`).each((d,p,g)=>{Z(g[p]).selectAll("circle").data([d]).join(m=>m.append("circle").style("cursor","pointer").style("vector-effect","non-scaling-stroke").classed(n,!0).attr("opacity",0).transition().delay((y,x)=>p*u).attr("opacity",1),m=>m.transition().duration(50).attr("opacity",1),m=>m.remove()).attr("r",i.radius).attr("fill",(m,y)=>yh({datum:m,colorType:i.fillColorType,fullChartParams:o})).attr("stroke",(m,y)=>yh({datum:m,colorType:i.strokeColorType,fullChartParams:o})).attr("stroke-width",i.strokeWidth).attr("transform",`scale(${a[h][0]??1}, ${a[h][1]??1})`)})}),t.selectAll(`circle.${n}`)}function qC({selection:t,ids:e,onlyShowHighlighted:n,fullChartParams:r}){if(t.interrupt("highlight"),!e.length){t.transition("highlight").duration(200).style("opacity",n===!0?0:1);return}t.each((i,o,a)=>{e.includes(i.id)?Z(a[o]).style("opacity",1).transition("highlight").duration(200):Z(a[o]).style("opacity",n===!0?0:r.styles.unhighlightedOpacity).transition("highlight").duration(200)})}function XC({defsSelection:t,clipPathData:e}){t.selectAll("clipPath").data(e).join(n=>n.append("clipPath"),n=>n,n=>n.remove()).attr("id",n=>n.id).each((n,r,i)=>{Z(i[r]).selectAll("rect").data([n]).join("rect").attr("x",0).attr("y",0).attr("width",o=>o.width).attr("height",o=>o.height)})}const y2=(t,{selection:e,computedData$:n,visibleComputedData$:r,existedSeriesLabels$:i,SeriesDataMap$:o,GroupDataMap$:a,fullParams$:s,fullChartParams$:u,gridAxesTransform$:c,gridGraphicTransform$:l,gridGraphicReverseScale$:h,gridAxesSize$:f,gridHighlight$:d,gridContainer$:p,event$:g})=>{const m=new it,y=oi(t,"clipPath-box"),x=ut(t,"circleG"),v=ut(t,"circle"),b=new it,{seriesSelection$:$,axesSelection$:w,defsSelection$:S,graphicGSelection$:_}=ko({selection:e,pluginName:t,clipPathID:y,existedSeriesLabels$:i,gridContainer$:p,gridAxesTransform$:c,gridGraphicTransform$:l}),P=H({computedData:n,gridGraphicReverseScale:h}).pipe(G(m),U(async M=>M),B(M=>M.computedData.map((T,k)=>M.gridGraphicReverseScale[k])));H({defsSelection:S,gridAxesSize:f}).pipe(G(m),U(async M=>M)).subscribe(M=>{const T=[{id:y,width:M.gridAxesSize.width,height:M.gridAxesSize.height}];XC({defsSelection:M.defsSelection,clipPathData:T})});const D=u.pipe(G(m),B(M=>M.highlightTarget),dt());H({graphicGSelection:_,computedData:n,visibleComputedData:r,SeriesDataMap:o,GroupDataMap:a,graphicReverseScale:P,fullChartParams:u,fullParams:s,highlightTarget:D}).pipe(G(m),U(async M=>M)).subscribe(M=>{const T=HC({graphicGSelection:M.graphicGSelection,circleGClassName:x,circleClassName:v,data:M.visibleComputedData,fullParams:M.fullParams,fullChartParams:M.fullChartParams,graphicReverseScale:M.graphicReverseScale});T.on("mouseover",(k,E)=>{k.stopPropagation(),g.next({type:"grid",eventName:"mouseover",pluginName:t,highlightTarget:M.highlightTarget,datum:E,series:M.SeriesDataMap.get(E.seriesLabel),seriesIndex:E.seriesIndex,seriesLabel:E.seriesLabel,groups:M.GroupDataMap.get(E.groupLabel),groupIndex:E.groupIndex,groupLabel:E.groupLabel,event:k,data:M.computedData})}).on("mousemove",(k,E)=>{k.stopPropagation(),g.next({type:"grid",eventName:"mousemove",pluginName:t,highlightTarget:M.highlightTarget,data:M.computedData,datum:E,series:M.SeriesDataMap.get(E.seriesLabel),seriesIndex:E.seriesIndex,seriesLabel:E.seriesLabel,groups:M.GroupDataMap.get(E.groupLabel),groupIndex:E.groupIndex,groupLabel:E.groupLabel,event:k})}).on("mouseout",(k,E)=>{k.stopPropagation(),g.next({type:"grid",eventName:"mouseout",pluginName:t,highlightTarget:M.highlightTarget,datum:E,series:M.SeriesDataMap.get(E.seriesLabel),seriesIndex:E.seriesIndex,seriesLabel:E.seriesLabel,groups:M.GroupDataMap.get(E.groupLabel),groupIndex:E.groupIndex,groupLabel:E.groupLabel,event:k,data:M.computedData})}).on("click",(k,E)=>{k.stopPropagation(),g.next({type:"grid",eventName:"click",pluginName:t,highlightTarget:M.highlightTarget,datum:E,series:M.SeriesDataMap.get(E.seriesLabel),seriesIndex:E.seriesIndex,seriesLabel:E.seriesLabel,groups:M.GroupDataMap.get(E.groupLabel),groupIndex:E.groupIndex,groupLabel:E.groupLabel,event:k,data:M.computedData})}),b.next(T)});const A=d.subscribe(),I=s.pipe(G(m),B(M=>M.onlyShowHighlighted),dt());return u.pipe(G(m),U(M=>H({graphicSelection:b,highlight:d,onlyShowHighlighted:I,fullChartParams:u}).pipe(G(m),U(async T=>T)))).subscribe(M=>{qC({selection:M.graphicSelection,ids:M.highlight,onlyShowHighlighted:M.onlyShowHighlighted,fullChartParams:M.fullChartParams})}),()=>{m.next(void 0),A.unsubscribe()}},b2="Dots",VC=$e(b2,Rh)(({selection:t,name:e,subject:n,observer:r})=>{const i=new it,o=y2(b2,{selection:t,computedData$:r.computedData$,visibleComputedData$:r.visibleComputedData$,existedSeriesLabels$:r.existedSeriesLabels$,SeriesDataMap$:r.SeriesDataMap$,GroupDataMap$:r.GroupDataMap$,fullParams$:r.fullParams$,fullChartParams$:r.fullChartParams$,gridAxesTransform$:r.gridAxesTransform$,gridGraphicTransform$:r.gridGraphicTransform$,gridGraphicReverseScale$:r.gridGraphicReverseScale$,gridAxesSize$:r.gridAxesSize$,gridHighlight$:r.gridHighlight$,gridContainer$:r.gridContainer$,event$:n.event$});return()=>{i.next(void 0),o()}}),jC={listRectWidth:14,listRectHeight:14,listRectRadius:0},bh=(t,{rootSelection:e,seriesLabels$:n,fullParams$:r,layout$:i,fullChartParams$:o})=>{const a=ut(t,"root-position"),s=ut(t,"legend-card"),u=ut(t,"legend-list"),c=ut(t,"legend-item"),l=new it,h=H({seriesLabels:n,fullChartParams:o}).pipe(G(l),U(async _=>_),B(_=>{const P=new Map;let D=0;return _.seriesLabels.forEach((A,I)=>{if(!P.has(A)){const M=mC(D,_.fullChartParams);P.set(A,M),D++}}),P})),f=n.pipe(G(l),B(_=>{const P=new Set;let D=[];return _.forEach(A=>{P.has(A)?D.push(!1):D.push(!0),P.add(A)}),D})),d=r.pipe(G(l),B(_=>_.position==="bottom"||_.position==="top"?"row":"column")),p=H({fullParams:r,layout:i}).pipe(G(l),U(async _=>_),B(_=>{const P=_.fullParams.padding*2+_.fullParams.gap*2;return _.fullParams.position==="bottom"||_.fullParams.position==="top"?_.layout.rootWidth-P:_.layout.rootHeight-P})),m=H({layout:i,fullParams:r}).pipe(G(l),U(async _=>_),B(_=>{let P=0,D=0;return _.fullParams.position==="bottom"?(D=_.layout.rootHeight,_.fullParams.justify==="start"?P=0:_.fullParams.justify==="center"?P=_.layout.rootWidth/2:_.fullParams.justify==="end"&&(P=_.layout.rootWidth)):_.fullParams.position==="right"?(P=_.layout.rootWidth,_.fullParams.justify==="start"?D=0:_.fullParams.justify==="center"?D=_.layout.rootHeight/2:_.fullParams.justify==="end"&&(D=_.layout.rootHeight)):_.fullParams.position==="top"?(D=0,_.fullParams.justify==="start"?P=0:_.fullParams.justify==="center"?P=_.layout.rootWidth/2:_.fullParams.justify==="end"&&(P=_.layout.rootWidth)):_.fullParams.position==="left"&&(P=0,_.fullParams.justify==="start"?D=0:_.fullParams.justify==="center"?D=_.layout.rootHeight/2:_.fullParams.justify==="end"&&(D=_.layout.rootHeight)),{x:P,y:D}})).pipe(G(l),B(_=>e.selectAll(`g.${a}`).data([_]).join(P=>P.append("g").classed(a,!0).attr("transform",D=>`translate(${D.x}, ${D.y})`),P=>P.transition().attr("transform",D=>`translate(${D.x}, ${D.y})`),P=>P.remove()))),y=r.pipe(G(l),B(_=>_.seriesList[0]?_.seriesList[0]:jC)),x=H({visibleList:f,fullParams:r,fullChartParams:o,seriesLabels:n,lineDirection:d,lineMaxSize:p,defaultListStyle:y,SeriesLabelColorMap:h}).pipe(G(l),U(async _=>_),B(_=>_.seriesLabels.reduce((P,D,A)=>{if(!_.visibleList[A])return P;const I=n2(D,_.fullChartParams.styles.textSize),M=_.fullChartParams.styles.textSize*1.5+I,T=_.SeriesLabelColorMap.get(D),k=P[0]&&P[0][0]?P[P.length-1][P[P.length-1].length-1]:null,{translateX:E,translateY:N,lineIndex:O,itemIndex:L}=((F,C,z)=>{let X=0,W=0,V=0,J=0;if(F.lineDirection==="column"){let ht=z?z.translateY+F.fullChartParams.styles.textSize+F.fullParams.gap:0;if(ht+F.fullChartParams.styles.textSize>F.lineMaxSize){V=z.lineIndex+1,J=0,W=0;const q=C[C.length-1].reduce((nt,at)=>at.itemWidth>nt?at.itemWidth:nt,0);X=z.translateX+q+F.fullParams.gap}else V=z?z.lineIndex:0,J=z?z.itemIndex+1:0,W=ht,X=z?z.translateX:0}else{let ht=z?z.translateX+z.itemWidth+F.fullParams.gap:0;ht+M>F.lineMaxSize?(V=z.lineIndex+1,J=0,X=0):(V=z?z.lineIndex:0,J=z?z.itemIndex+1:0,X=ht),W=(F.fullChartParams.styles.textSize+F.fullParams.gap)*V}return{translateX:X,translateY:W,lineIndex:V,itemIndex:J}})(_,P,k);P[O]||(P[O]=[]);const R=_.fullParams.seriesList[L]?_.fullParams.seriesList[L]:_.defaultListStyle;return P[O].push({id:D,seriesLabel:D,seriesIndex:A,lineIndex:O,itemIndex:L,text:D,itemWidth:M,translateX:E,translateY:N,color:T,listRectWidth:R.listRectWidth,listRectHeight:R.listRectHeight,listRectRadius:R.listRectRadius}),P},[])),Ye(1)),v=H({fullParams:r,fullChartParams:o,lineDirection:d,lengendItems:x}).pipe(G(l),U(async _=>_),B(_=>{const{width:P,height:D}=((A,I)=>{let M=0,T=0;if(!I.length||!I[0].length)return{width:M,height:T};const k=I[0][I[0].length-1];return A.lineDirection==="column"?(M=I.reduce((E,N)=>{const O=N.reduce((L,R)=>R.itemWidth>L?R.itemWidth:L,0);return E+O},0),M+=A.fullParams.gap*(I.length-1),T=k.translateY+A.fullChartParams.styles.textSize):(M=k.translateX+k.itemWidth,T=A.fullChartParams.styles.textSize*I.length+A.fullParams.gap*(I.length-1)),{width:M,height:T}})(_,_.lengendItems);return{direction:_.lineDirection,width:P,height:D,translateX:_.fullParams.gap,translateY:_.fullParams.gap}}),Ye(1)),b=H({fullParams:r,lengendList:v}).pipe(G(l),U(async _=>_),B(_=>{const P=_.lengendList.width+_.fullParams.gap*2,D=_.lengendList.height+_.fullParams.gap*2;let A=0,I=0;return _.fullParams.position==="left"?_.fullParams.justify==="start"?(A=_.fullParams.padding,I=_.fullParams.padding):_.fullParams.justify==="center"?(A=_.fullParams.padding,I=-D/2):_.fullParams.justify==="end"&&(A=_.fullParams.padding,I=-D-_.fullParams.padding):_.fullParams.position==="right"?_.fullParams.justify==="start"?(A=-P-_.fullParams.padding,I=_.fullParams.padding):_.fullParams.justify==="center"?(A=-P-_.fullParams.padding,I=-D/2):_.fullParams.justify==="end"&&(A=-P-_.fullParams.padding,I=-D-_.fullParams.padding):_.fullParams.position==="top"?_.fullParams.justify==="start"?(A=_.fullParams.padding,I=_.fullParams.padding):_.fullParams.justify==="center"?(A=-P/2,I=_.fullParams.padding):_.fullParams.justify==="end"&&(A=-P-_.fullParams.padding,I=_.fullParams.padding):_.fullParams.justify==="start"?(A=_.fullParams.padding,I=-D-_.fullParams.padding):_.fullParams.justify==="center"?(A=-P/2,I=-D-_.fullParams.padding):_.fullParams.justify==="end"&&(A=-P-_.fullParams.padding,I=-D-_.fullParams.padding),{width:P,height:D,translateX:A,translateY:I}})),$=H({rootPositionSelection:m,fullParams:r,fullChartParams:o,legendCard:b}).pipe(G(l),U(async _=>_),B(_=>_.rootPositionSelection.selectAll("g").data([_.legendCard]).join(P=>P.append("g").classed(s,!0).attr("transform",D=>`translate(${D.translateX}, ${D.translateY})`),P=>P.transition().attr("transform",D=>`translate(${D.translateX}, ${D.translateY})`),P=>P.remove()).each((P,D,A)=>{Z(A[D]).selectAll("rect").data([P]).join("rect").attr("width",I=>I.width).attr("height",I=>I.height).attr("fill",Bt(_.fullParams.backgroundFill,_.fullChartParams)).attr("stroke",Bt(_.fullParams.backgroundStroke,_.fullChartParams))}))),w=H({lengendCardSelection:$,fullParams:r,lengendList:v}).pipe(G(l),U(async _=>_),B(_=>_.lengendCardSelection.selectAll("g").data([_.lengendList]).join(P=>P.append("g").classed(u,!0).attr("transform",D=>`translate(${D.translateX}, ${D.translateY})`),P=>P.transition().attr("transform",D=>`translate(${D.translateX}, ${D.translateY})`),P=>P.remove())));return H({lengendListSelection:w,fullParams:r,fullChartParams:o,lengendItems:x}).pipe(G(l),U(async _=>_),B(_=>{const P=_.lengendItems[0]?_.lengendItems.flat():[];return _.lengendListSelection.selectAll(`g.${c}`).data(P).join(D=>D.append("g").classed(c,!0).attr("cursor","default"),D=>D,D=>D.remove()).attr("transform",(D,A)=>`translate(${D.translateX}, ${D.translateY})`).each((D,A,I)=>{const M=_.fullChartParams.styles.textSize/2,T=-D.listRectWidth/2,k=-D.listRectHeight/2;Z(I[A]).selectAll("rect").data([D]).join("rect").attr("x",M).attr("y",M).attr("width",E=>E.listRectWidth).attr("height",E=>E.listRectHeight).attr("transform",E=>`translate(${T}, ${k})`).attr("fill",E=>E.color).attr("rx",E=>E.listRectRadius),Z(I[A]).selectAll("text").data([D]).join(E=>E.append("text").attr("dominant-baseline","hanging"),E=>E,E=>E.remove()).attr("x",_.fullChartParams.styles.textSize*1.5).attr("font-size",_.fullChartParams.styles.textSize).text(E=>E.text)})})).subscribe(),()=>{l.next(void 0)}},v2="GridLegend",ZC=$e(v2,Bh)(({selection:t,rootSelection:e,observer:n,subject:r})=>{const i=new it,o=n.SeriesDataMap$.pipe(G(i),B(u=>Array.from(u.keys()))),a=n.fullParams$.pipe(G(i),B(u=>{const c=[{listRectWidth:u.listRectWidth,listRectHeight:u.listRectHeight,listRectRadius:u.listRectRadius}];return{...u,seriesList:c}})),s=bh(v2,{rootSelection:e,seriesLabels$:o,fullParams$:a,layout$:n.layout$,fullChartParams$:n.fullChartParams$});return()=>{i.next(void 0),s()}}),vh=6;function KC({selection:t,xAxisClassName:e,groupingLabelClassName:n,params:r,tickTextAlign:i,axisLabelAlign:o,gridAxesSize:a,fullDataFormatter:s,chartParams:u,groupScale:c,textTransform:l}){const h=t.selectAll(`g.${e}`).data([r]).join("g").classed(e,!0);t.selectAll(`g.${n}`).data([r]).join("g").classed(n,!0).each((p,g,m)=>{Z(m[g]).selectAll("text").data([p]).join(y=>y.append("text").style("font-weight","bold"),y=>y,y=>y.remove()).attr("text-anchor",o.textAnchor).attr("dominant-baseline",o.dominantBaseline).style("font-size",`${u.styles.textSize}px`).style("fill",Bt(r.labelColorType,u)).style("transform",l).text(y=>s.grid.groupAxis.label)}).attr("transform",p=>`translate(${a.width+p.tickPadding+r.labelOffset[0]}, ${-p.tickPadding-vh-r.labelOffset[1]})`);const f=Pp(c).scale(c).tickSize(r.tickFullLine==!0?-a.height:vh).tickSizeOuter(0).tickFormat(p=>mh(p,r.tickFormat)).tickPadding(r.tickPadding),d=h.transition().duration(100).call(f);return d.selectAll("line").style("fill","none").style("stroke",r.tickLineVisible==!0?Bt(r.tickColorType,u):"none").style("stroke-dasharray",r.tickFullLineDasharray).attr("pointer-events","none"),d.selectAll("path").style("fill","none").style("stroke",r.axisLineVisible==!0?Bt(r.axisLineColorType,u):"none").style("shape-rendering","crispEdges"),h.selectAll("text").style("font-family","sans-serif").style("font-size",`${u.styles.textSize}px`).style("color",Bt(r.tickTextColorType,u)).attr("text-anchor",i.textAnchor).attr("dominant-baseline",i.dominantBaseline).attr("transform-origin",`0 -${r.tickPadding+vh}`).style("transform",l),h}const x2=(t,{selection:e,computedData$:n,fullParams$:r,fullDataFormatter$:i,fullChartParams$:o,gridAxesTransform$:a,gridAxesReverseTransform$:s,gridAxesSize$:u,gridContainer$:c,isSeriesPositionSeprate$:l})=>{const h=new it,f=ut(t,"container"),d=ut(t,"xAxisG"),p=ut(t,"xAxis"),g=ut(t,"groupingLabel"),m=H({computedData:n.pipe(dt((w,S)=>w.length===S.length)),isSeriesPositionSeprate:l}).pipe(G(h),U(async w=>w),B(w=>w.isSeriesPositionSeprate?w.computedData:[w.computedData[0]]),B((w,S)=>e.selectAll(`g.${f}`).data(w,_=>_[0]?_[0].seriesIndex:S).join("g").classed(f,!0))),y=m.pipe(G(h),B((w,S)=>w.selectAll(`g.${d}`).data([d]).join("g").classed(d,!0)));H({containerSelection:m,gridContainer:c}).pipe(G(h),U(async w=>w)).subscribe(w=>{w.containerSelection.attr("transform",(S,_)=>{const P=w.gridContainer[_]??w.gridContainer[0],D=P.translate,A=P.scale;return`translate(${D[0]}, ${D[1]}) scale(${A[0]}, ${A[1]})`})}),H({axisSelection:y,gridAxesTransform:a}).pipe(G(h),U(async w=>w)).subscribe(w=>{w.axisSelection.style("transform",w.gridAxesTransform.value)});const x=H({fullParams:r,fullDataFormatter:i,gridAxesReverseTransform:s,gridContainer:c}).pipe(G(h),U(async w=>w),B(w=>{const S=`translate(${w.gridAxesReverseTransform.translate[0]}px, ${w.gridAxesReverseTransform.translate[1]}px)`,_=`rotate(${w.gridAxesReverseTransform.rotate}deg) rotateX(${w.gridAxesReverseTransform.rotateX}deg) rotateY(${w.gridAxesReverseTransform.rotateY}deg)`,P=`scale(${1/w.gridContainer[0].scale[0]}, ${1/w.gridContainer[0].scale[1]})`,A=`rotate(${w.fullDataFormatter.grid.groupAxis.position==="left"&&w.fullDataFormatter.grid.valueAxis.position==="top"||w.fullDataFormatter.grid.groupAxis.position==="right"&&w.fullDataFormatter.grid.valueAxis.position==="bottom"?w.fullParams.tickTextRotate+180:w.fullParams.tickTextRotate}deg)`;return`${S} ${_} ${P} ${A}`}),dt()),v=new lt(w=>{H({fullDataFormatter:i,gridAxesSize:u,computedData:n}).pipe(G(h),U(async S=>S)).subscribe(S=>{const P=S.computedData[0]?S.computedData[0].length-1:0,D=S.fullDataFormatter.grid.groupAxis.scaleDomain[0]==="auto"?0-S.fullDataFormatter.grid.groupAxis.scalePadding:S.fullDataFormatter.grid.groupAxis.scaleDomain[0]-S.fullDataFormatter.grid.groupAxis.scalePadding,A=S.fullDataFormatter.grid.groupAxis.scaleDomain[1]==="auto"?P+S.fullDataFormatter.grid.groupAxis.scalePadding:S.fullDataFormatter.grid.groupAxis.scaleDomain[1]+S.fullDataFormatter.grid.groupAxis.scalePadding,I=S.computedData[0]?S.computedData[0].length:0;let M=(S.computedData[0]??[]).map(N=>N.groupLabel);const T=new Array(I).fill(0).map((N,O)=>M[O]!=null?M[O]:String(O)).filter((N,O)=>O>=D&&O<=A),k=S.fullDataFormatter.grid.groupAxis.scalePadding,E=Jd({axisLabels:T,axisWidth:S.gridAxesSize.width,padding:k});w.next(E)})}),b=H({fullDataFormatter:i,fullParams:r}).pipe(G(h),U(async w=>w),B(w=>{let S="middle",_="hanging";return w.fullDataFormatter.grid.groupAxis.position==="bottom"?(S=w.fullParams.tickTextRotate?"end":"middle",_="hanging"):w.fullDataFormatter.grid.groupAxis.position==="top"?(S=w.fullParams.tickTextRotate?"end":"middle",_="auto"):w.fullDataFormatter.grid.groupAxis.position==="left"?(S="end",_="middle"):w.fullDataFormatter.grid.groupAxis.position==="right"&&(S="start",_="middle"),{textAnchor:S,dominantBaseline:_}})),$=i.pipe(G(h),B(w=>{let S="start",_="hanging";return w.grid.groupAxis.position==="bottom"?_="hanging":w.grid.groupAxis.position==="top"?_="auto":w.grid.groupAxis.position==="left"?S="end":w.grid.groupAxis.position==="right"&&(S="start"),w.grid.valueAxis.position==="left"?S="start":w.grid.valueAxis.position==="right"?S="end":w.grid.valueAxis.position==="bottom"?_="auto":w.grid.valueAxis.position==="top"&&(_="hanging"),{textAnchor:S,dominantBaseline:_}}));return H({axisSelection:y,params:r,tickTextAlign:b,axisLabelAlign:$,gridAxesSize:u,fullDataFormatter:i,chartParams:o,groupScale:v,textTransform:x}).pipe(G(h),U(async w=>w)).subscribe(w=>{KC({selection:w.axisSelection,xAxisClassName:p,groupingLabelClassName:g,params:w.params,tickTextAlign:w.tickTextAlign,axisLabelAlign:w.axisLabelAlign,gridAxesSize:w.gridAxesSize,fullDataFormatter:w.fullDataFormatter,chartParams:w.chartParams,groupScale:w.groupScale,textTransform:w.textTransform})}),()=>{h.next(void 0)}},_2="GroupAxis",QC=$e(_2,zh)(({selection:t,name:e,observer:n,subject:r})=>{const i=new it,o=x2(_2,{selection:t,computedData$:n.computedData$,fullParams$:n.fullParams$,fullDataFormatter$:n.fullDataFormatter$,fullChartParams$:n.fullChartParams$,gridAxesTransform$:n.gridAxesTransform$,gridAxesReverseTransform$:n.gridAxesReverseTransform$,gridAxesSize$:n.gridAxesSize$,gridContainer$:n.gridContainer$,isSeriesPositionSeprate$:n.isSeriesPositionSeprate$});return()=>{i.next(void 0),o()}}),w2=6;function JC({selection:t,yAxisClassName:e,textClassName:n,fullParams:r,tickTextAlign:i,axisLabelAlign:o,gridAxesSize:a,fullDataFormatter:s,fullChartParams:u,valueScale:c,textTransform:l,minAndMax:h}){const f=t.selectAll(`g.${e}`).data([r]).join("g").classed(e,!0);t.selectAll(`g.${n}`).data([r]).join("g").classed(n,!0).each((y,x,v)=>{Z(v[x]).selectAll("text").data([y]).join(b=>b.append("text").style("font-weight","bold"),b=>b,b=>b.remove()).attr("text-anchor",o.textAnchor).attr("dominant-baseline",o.dominantBaseline).style("font-size",`${u.styles.textSize}px`).style("fill",Bt(r.labelColorType,u)).style("transform",l).text(b=>s.grid.valueAxis.label)}).attr("transform",y=>`translate(${-y.tickPadding+r.labelOffset[0]}, ${a.height+y.tickPadding+r.labelOffset[1]})`);const d=h[1]-h[0],p=Dp(c).scale(c).ticks(d>r.ticks?r.ticks:h[0]===0&&h[1]===0?1:Math.ceil(d)).tickFormat(y=>mh(y,r.tickFormat)).tickSize(r.tickFullLine==!0?-a.width:w2).tickPadding(r.tickPadding),g=f.transition().duration(100).call(p);return g.selectAll("line").style("fill","none").style("stroke",r.tickLineVisible==!0?Bt(r.tickColorType,u):"none").style("stroke-dasharray",r.tickFullLineDasharray).attr("pointer-events","none"),g.selectAll("path").style("fill","none").style("stroke",r.axisLineVisible==!0?Bt(r.axisLineColorType,u):"none").style("shape-rendering","crispEdges"),f.selectAll("text").style("font-family","sans-serif").style("font-size",`${u.styles.textSize}px`).style("color",Bt(r.tickTextColorType,u)).attr("text-anchor",i.textAnchor).attr("dominant-baseline",i.dominantBaseline).attr("transform-origin",`-${r.tickPadding+w2} 0`).style("transform",l),f}const Su=(t,{selection:e,computedData$:n,fullParams$:r,fullDataFormatter$:i,fullChartParams$:o,gridAxesTransform$:a,gridAxesReverseTransform$:s,gridAxesSize$:u,gridContainer$:c,isSeriesPositionSeprate$:l})=>{const h=new it,f=ut(t,"container"),d=ut(t,"yAxisG"),p=ut(t,"yAxis"),g=ut(t,"text"),m=H({computedData:n.pipe(dt((S,_)=>S.length===_.length)),isSeriesPositionSeprate:l}).pipe(G(h),U(async S=>S),B(S=>S.isSeriesPositionSeprate?S.computedData:[S.computedData[0]]),B((S,_)=>e.selectAll(`g.${f}`).data(S,P=>P[0]?P[0].seriesIndex:_).join("g").classed(f,!0))),y=m.pipe(G(h),B((S,_)=>S.selectAll(`g.${d}`).data([d]).join("g").classed(d,!0)));H({containerSelection:m,gridContainer:c}).pipe(G(h),U(async S=>S)).subscribe(S=>{S.containerSelection.attr("transform",(_,P)=>{const D=S.gridContainer[P]??S.gridContainer[0],A=D.translate,I=D.scale;return`translate(${A[0]}, ${A[1]}) scale(${I[0]}, ${I[1]})`})}),H({axisSelection:y,gridAxesTransform:a}).pipe(G(h),U(async S=>S)).subscribe(S=>{S.axisSelection.style("transform",S.gridAxesTransform.value)});const x=H({fullParams:r,fullDataFormatter:i,gridAxesReverseTransform:s,gridContainer:c}).pipe(G(h),U(async S=>S),B(S=>{const _=`translate(${S.gridAxesReverseTransform.translate[0]}px, ${S.gridAxesReverseTransform.translate[1]}px)`,P=`rotate(${S.gridAxesReverseTransform.rotate}deg) rotateX(${S.gridAxesReverseTransform.rotateX}deg) rotateY(${S.gridAxesReverseTransform.rotateY}deg)`,D=`scale(${1/S.gridContainer[0].scale[0]}, ${1/S.gridContainer[0].scale[1]})`,I=`rotate(${S.fullDataFormatter.grid.groupAxis.position==="left"&&S.fullDataFormatter.grid.valueAxis.position==="top"||S.fullDataFormatter.grid.groupAxis.position==="right"&&S.fullDataFormatter.grid.valueAxis.position==="bottom"?S.fullParams.tickTextRotate+180:S.fullParams.tickTextRotate}deg)`;return`${_} ${P} ${D} ${I}`}),dt()),v=new lt(S=>{H({fullDataFormatter:i,gridAxesSize:u,computedData:n}).pipe(G(h),U(async _=>_)).subscribe(_=>{const D=_.computedData[0]?_.computedData[0].length-1:0,A=_.fullDataFormatter.grid.groupAxis.scaleDomain[0]==="auto"?0-_.fullDataFormatter.grid.groupAxis.scalePadding:_.fullDataFormatter.grid.groupAxis.scaleDomain[0]-_.fullDataFormatter.grid.groupAxis.scalePadding,I=_.fullDataFormatter.grid.groupAxis.scaleDomain[1]==="auto"?D+_.fullDataFormatter.grid.groupAxis.scalePadding:_.fullDataFormatter.grid.groupAxis.scaleDomain[1]+_.fullDataFormatter.grid.groupAxis.scalePadding,M=_.computedData.map((k,E)=>k.filter((N,O)=>O>=A&&O<=I)),T=gC(M.flat());S.next(T)})}),b=new lt(S=>{H({fullDataFormatter:i,gridAxesSize:u,minAndMax:v}).pipe(G(h),U(async _=>_)).subscribe(_=>{const P=Qd({maxValue:_.minAndMax[1],minValue:_.minAndMax[0],axisWidth:_.gridAxesSize.height,scaleDomain:_.fullDataFormatter.grid.valueAxis.scaleDomain,scaleRange:_.fullDataFormatter.grid.valueAxis.scaleRange});S.next(P)})}),$=i.pipe(G(h),B(S=>{let _="start",P="hanging";return S.grid.valueAxis.position==="left"?(_="end",P="middle"):S.grid.valueAxis.position==="right"?(_="start",P="middle"):S.grid.valueAxis.position==="bottom"?(_="middle",P="hanging"):S.grid.valueAxis.position==="top"&&(_="middle",P="auto"),{textAnchor:_,dominantBaseline:P}})),w=i.pipe(G(h),B(S=>{let _="start",P="hanging";return S.grid.groupAxis.position==="bottom"?P="auto":S.grid.groupAxis.position==="top"?P="hanging":S.grid.groupAxis.position==="left"?_="start":S.grid.groupAxis.position==="right"&&(_="end"),S.grid.valueAxis.position==="left"?_="end":S.grid.valueAxis.position==="right"?_="start":S.grid.valueAxis.position==="bottom"?P="hanging":S.grid.valueAxis.position==="top"&&(P="auto"),{textAnchor:_,dominantBaseline:P}}));return H({axisSelection:y,fullParams:r,tickTextAlign:$,axisLabelAlign:w,computedData:n,gridAxesSize:u,fullDataFormatter:i,fullChartParams:o,valueScale:b,textTransform:x,minAndMax:v}).pipe(G(h),U(async S=>S)).subscribe(S=>{JC({selection:S.axisSelection,yAxisClassName:p,textClassName:g,fullParams:S.fullParams,tickTextAlign:S.tickTextAlign,axisLabelAlign:S.axisLabelAlign,gridAxesSize:S.gridAxesSize,fullDataFormatter:S.fullDataFormatter,fullChartParams:S.fullChartParams,valueScale:S.valueScale,textTransform:S.textTransform,minAndMax:S.minAndMax})}),()=>{h.next(void 0)}},$2="ValueAxis",tR=$e($2,Au)(({selection:t,name:e,observer:n,subject:r})=>{const i=new it,o=Su($2,{selection:t,computedData$:n.computedData$,fullParams$:n.fullParams$,fullDataFormatter$:n.fullDataFormatter$,fullChartParams$:n.fullChartParams$,gridAxesTransform$:n.gridAxesTransform$,gridAxesReverseTransform$:n.gridAxesReverseTransform$,gridAxesSize$:n.gridAxesSize$,gridContainer$:n.gridContainer$,isSeriesPositionSeprate$:n.isSeriesPositionSeprate$});return()=>{i.next(void 0),o()}}),S2="ValueStackAxis",eR=$e(S2,Oh)(({selection:t,name:e,observer:n,subject:r})=>{const i=new it,o=n.computedData$.pipe(G(i),B(s=>{const u=new Array(s[0]?s[0].length:0).fill(null).map((l,h)=>s.reduce((f,d)=>{if(d&&d[h]){const p=d[h].value==null||d[h].visible==!1?0:d[h].value;return f+p}return f},0));return s.map((l,h)=>l.map((f,d)=>({...f,value:u[d]})))})),a=Su(S2,{selection:t,computedData$:n.isSeriesPositionSeprate$.pipe(U(s=>m0(()=>s,n.computedData$,o))),fullParams$:n.fullParams$,fullDataFormatter$:n.fullDataFormatter$,fullChartParams$:n.fullChartParams$,gridAxesTransform$:n.gridAxesTransform$,gridAxesReverseTransform$:n.gridAxesReverseTransform$,gridAxesSize$:n.gridAxesSize$,gridContainer$:n.gridContainer$,isSeriesPositionSeprate$:n.isSeriesPositionSeprate$});return()=>{i.next(void 0),a()}}),A2="ScalingArea",nR=ut(A2,"rect"),rR=$e(A2,Uh)(({selection:t,rootSelection:e,name:n,observer:r,subject:i})=>{const o=new it,a=e.insert("rect","g").classed(nR,!0).attr("opacity",0);let s={k:1,x:0,y:0};r.layout$.pipe(G(o)).subscribe(c=>{a.attr("width",c.width).attr("height",c.height).attr("x",c.left).attr("y",c.top)});const u=r.computedData$.pipe(B(c=>c[0]?c[0].length-1:0),dt());return H({initGroupAxis:r.fullDataFormatter$.pipe(B(c=>c.grid.groupAxis),ui()),fullDataFormatter:r.fullDataFormatter$,groupMaxIndex:u,layout:r.layout$,axisSize:r.gridAxesSize$}).pipe(G(o),U(async c=>c)).subscribe(c=>{const h=c.groupMaxIndex,f=c.initGroupAxis.scaleDomain[0]==="auto"?0-c.initGroupAxis.scalePadding:c.initGroupAxis.scaleDomain[0]-c.initGroupAxis.scalePadding,d=c.initGroupAxis.scaleDomain[1]==="auto"?h+c.initGroupAxis.scalePadding:c.initGroupAxis.scaleDomain[1]+c.initGroupAxis.scalePadding,p=c.fullDataFormatter.grid.valueAxis.position==="left"||c.fullDataFormatter.grid.valueAxis.position==="top"?[0,1]:[1,0],m=Qd({maxValue:c.groupMaxIndex,minValue:0,axisWidth:c.axisSize.width,scaleDomain:[f,d],scaleRange:p}).copy(),y=Jv().on("zoom",function(v){const b=v.transform,$=S=>{const _=Math.round(S);return Math.min(h,Math.max(0,_))},w=c.fullDataFormatter.grid.groupAxis.position==="bottom"||c.fullDataFormatter.grid.groupAxis.position==="top"?b.rescaleX(m).domain().map($):b.rescaleY(m).domain().map($);w[0]<=0&&w[1]>=h?b.k<s.k&&(b.k=s.k,b.x=s.x,b.y=s.y):w[1]-w[0]<=1&&b.k>s.k&&(b.k=s.k,b.x=s.x,b.y=s.y),s.k=b.k,s.x=b.x,s.y=b.y,i.dataFormatter$.next({...c.fullDataFormatter,grid:{...c.fullDataFormatter.grid,groupAxis:{...c.fullDataFormatter.grid.groupAxis,scaleDomain:w}}})});e.call(y)}),()=>{o.next(void 0),a.remove()}});function iR(t,e){let n=new lt(()=>{});return t.each(function(){const r=zu(this,e);n=Ou(n,r)}),n}const xh="GroupAux",_h=ut(xh,"label-box");function oR({groupLabel:t,axisX:e,axisHeight:n,fullParams:r}){return r.showLine&&t?[{id:t,x1:e,x2:e,y1:0,y2:n}]:[]}function aR({selection:t,pluginName:e,lineData:n,fullParams:r,fullChartParams:i}){const o=ut(e,"auxline"),a=t.selectAll(`line.${o}`).data(n),s=a.enter().append("line").classed(o,!0).style("stroke",c=>Bt(r.lineColorType,i)).style("stroke-width",1).style("stroke-dasharray",r.lineDashArray??"none").style("pointer-events","none"),u=a.merge(s);return a.exit().remove(),s.attr("x1",c=>c.x1).attr("y1",c=>c.y1).attr("x2",c=>c.x2).attr("y2",c=>c.y2),a.transition().duration(50).attr("x1",c=>c.x1).attr("y1",c=>c.y1).attr("x2",c=>c.x2).attr("y2",c=>c.y2),u}function sR(t){t.selectAll("line").data([]).exit().remove()}function uR({groupLabel:t,axisX:e,fullParams:n}){return n.showLabel&&t?[{id:t,x:e,y:-n.labelPadding,text:mh(t,n.labelTextFormat)}]:[]}function cR({selection:t,labelData:e,fullParams:n,fullChartParams:r,gridAxesReverseTransformValue:i}){const o=r.styles.textSize+4,a=t.selectAll(`g.${_h}`).data(e),s=a.enter().append("g").classed(_h,!0).style("cursor","pointer"),u=s.merge(a);return s.attr("transform",(c,l)=>`translate(${c.x}, ${c.y})`),a.transition().duration(50).attr("transform",(c,l)=>`translate(${c.x}, ${c.y})`),a.exit().remove(),u.each((c,l,h)=>{const f=n2(c.text,r.styles.textSize)+12,d=-f/2,p=Z(h[l]).selectAll("rect").data([c]),g=p.enter().append("rect").attr("height",`${o}px`).attr("fill",x=>Bt(n.labelColorType,r)).attr("x",d).attr("y",-2).attr("rx",5).attr("ry",5).style("cursor","pointer");p.merge(g).attr("width",x=>`${f}px`).style("transform",i),p.exit().remove();const m=Z(h[l]).selectAll("text").data([c]),y=m.enter().append("text").style("dominant-baseline","hanging").style("cursor","pointer");m.merge(y).text(x=>x.text).style("transform",i).attr("fill",x=>Bt(n.labelTextColorType,r)).attr("font-size",r.styles.textSize).attr("x",d+6),m.exit().remove()}),u}function lR(t){t.selectAll(`g.${_h}`).data([]).exit().remove()}const fR=$e(xh,Ih)(({selection:t,rootSelection:e,name:n,subject:r,observer:i})=>{const o=new it,a=e.insert("rect","g").classed(ut(xh,"rect"),!0).attr("opacity",0),s=t.append("g");i.layout$.pipe(G(o)).subscribe(f=>{a.attr("width",f.rootWidth).attr("height",f.rootHeight)}),i.gridAxesTransform$.pipe(G(o),B(f=>f.value),dt()).subscribe(f=>{s.style("transform",f)});const u=new lt(f=>{H({fullDataFormatter:i.fullDataFormatter$,gridAxesSize:i.gridAxesSize$,computedData:i.computedData$}).pipe(G(o),U(async d=>d)).subscribe(d=>{const g=d.computedData[0]?d.computedData[0].length-1:0,m=d.fullDataFormatter.grid.groupAxis.scaleDomain[0]==="auto"?0-d.fullDataFormatter.grid.groupAxis.scalePadding:d.fullDataFormatter.grid.groupAxis.scaleDomain[0]-d.fullDataFormatter.grid.groupAxis.scalePadding,y=d.fullDataFormatter.grid.groupAxis.scaleDomain[1]==="auto"?g+d.fullDataFormatter.grid.groupAxis.scalePadding:d.fullDataFormatter.grid.groupAxis.scaleDomain[1]+d.fullDataFormatter.grid.groupAxis.scalePadding,x=d.computedData[0]?d.computedData[0].length:0;let v=d.fullDataFormatter.grid.gridData.seriesDirection==="row"?(d.computedData[0]??[]).map(S=>S.groupLabel):d.computedData.map(S=>S[0].groupLabel);const b=new Array(x).fill(0).map((S,_)=>v[_]!=null?v[_]:String(_)).filter((S,_)=>_>=m&&_<=y),$=d.fullDataFormatter.grid.groupAxis.scalePadding,w=Jd({axisLabels:b,axisWidth:d.gridAxesSize.width,padding:$});f.next(w)})}),c=r2({fullDataFormatter$:i.fullDataFormatter$,gridAxesSize$:i.gridAxesSize$,computedData$:i.computedData$,fullChartParams$:i.fullChartParams$}),l=i.fullChartParams$.pipe(G(o),B(f=>f.highlightTarget),dt());return H({computedData:i.computedData$,gridAxesSize:i.gridAxesSize$,fullParams:i.fullParams$,fullChartParams:i.fullChartParams$,highlightTarget:l,SeriesDataMap:i.SeriesDataMap$,GroupDataMap:i.GroupDataMap$,gridGroupPositionFn:c,groupScale:u}).pipe(G(o),U(async f=>f)).subscribe(f=>{e.on("mouseover",(d,p)=>{const{groupIndex:g,groupLabel:m}=f.gridGroupPositionFn(d);r.event$.next({type:"grid",pluginName:n,eventName:"mouseover",highlightTarget:f.highlightTarget,datum:null,series:[],seriesIndex:-1,seriesLabel:"",groups:f.GroupDataMap.get(m)??[],groupIndex:g,groupLabel:m,event:d,data:f.computedData})}).on("mousemove",(d,p)=>{const{groupIndex:g,groupLabel:m}=f.gridGroupPositionFn(d);r.event$.next({type:"grid",pluginName:n,eventName:"mousemove",highlightTarget:f.highlightTarget,datum:null,series:[],seriesIndex:-1,seriesLabel:"",groups:f.GroupDataMap.get(m)??[],groupIndex:g,groupLabel:m,event:d,data:f.computedData})}).on("mouseout",(d,p)=>{const{groupIndex:g,groupLabel:m}=f.gridGroupPositionFn(d);r.event$.next({type:"grid",pluginName:n,eventName:"mouseout",highlightTarget:f.highlightTarget,datum:null,series:[],seriesIndex:-1,seriesLabel:"",groups:f.GroupDataMap.get(m)??[],groupIndex:g,groupLabel:m,event:d,data:f.computedData})}).on("click",(d,p)=>{d.stopPropagation();const{groupIndex:g,groupLabel:m}=f.gridGroupPositionFn(d);r.event$.next({type:"grid",pluginName:n,eventName:"click",highlightTarget:f.highlightTarget,datum:null,series:[],seriesIndex:-1,seriesLabel:"",groups:f.GroupDataMap.get(m)??[],groupIndex:g,groupLabel:m,event:d,data:f.computedData})})}),H({event:r.event$.pipe(Fo(f=>f.eventName==="mouseover"||f.eventName==="mousemove")),computedData:i.computedData$,groupScale:u,gridAxesSize:i.gridAxesSize$,fullParams:i.fullParams$,fullChartParams:i.fullChartParams$,highlightTarget:l,gridAxesReverseTransform:i.gridAxesReverseTransform$,GroupDataMap:i.GroupDataMap$,gridGroupPositionFn:c}).pipe(G(o),U(async f=>f)).subscribe(f=>{const d=f.groupScale(f.event.groupLabel)??0,p=oR({groupLabel:f.event.groupLabel,axisX:d,axisHeight:f.gridAxesSize.height,fullParams:f.fullParams});aR({selection:s,pluginName:n,lineData:p,fullParams:f.fullParams,fullChartParams:f.fullChartParams});const g=uR({groupLabel:f.event.groupLabel,axisX:d,fullParams:f.fullParams});cR({selection:s,labelData:g,fullParams:f.fullParams,fullChartParams:f.fullChartParams,gridAxesReverseTransformValue:f.gridAxesReverseTransform.value}).on("mouseover",(y,x)=>{const{groupIndex:v,groupLabel:b}=f.gridGroupPositionFn(y);r.event$.next({type:"grid",pluginName:n,eventName:"mouseover",highlightTarget:f.highlightTarget,datum:null,series:[],seriesIndex:-1,seriesLabel:"",groups:f.event.groups,groupIndex:v,groupLabel:b,event:y,data:f.computedData})}).on("mousemove",(y,x)=>{const{groupIndex:v,groupLabel:b}=f.gridGroupPositionFn(y);r.event$.next({type:"grid",pluginName:n,eventName:"mousemove",highlightTarget:f.highlightTarget,datum:null,series:[],seriesIndex:-1,seriesLabel:"",groups:f.event.groups,groupIndex:v,groupLabel:b,event:y,data:f.computedData})}).on("mouseout",(y,x)=>{const{groupIndex:v,groupLabel:b}=f.gridGroupPositionFn(y);r.event$.next({type:"grid",pluginName:n,eventName:"mouseout",highlightTarget:f.highlightTarget,datum:null,series:[],seriesIndex:-1,seriesLabel:"",groups:f.event.groups,groupIndex:v,groupLabel:b,event:y,data:f.computedData})}).on("click",(y,x)=>{const{groupIndex:v,groupLabel:b}=f.gridGroupPositionFn(y);r.event$.next({type:"grid",pluginName:n,eventName:"click",highlightTarget:f.highlightTarget,datum:null,series:[],seriesIndex:-1,seriesLabel:"",groups:f.event.groups,groupIndex:v,groupLabel:b,event:y,data:f.computedData})})}),iR(a,"mouseout").pipe(G(o)).subscribe(f=>{console.log("rootMouseout"),sR(s),lR(s)}),()=>{o.next(void 0),a.remove()}}),M2={position:"right",justify:"end",padding:28,backgroundFill:"none",backgroundStroke:"none",gap:10,listRectWidth:14,listRectHeight:14,listRectRadius:0,gridList:[{listRectWidth:14,listRectHeight:14,listRectRadius:0}]},T2={labelOffset:[0,0],labelColorType:"primary",axisLineVisible:!0,axisLineColorType:"primary",tickFormat:t=>t,tickLineVisible:!0,tickPadding:20,tickFullLine:!1,tickFullLineDasharray:"none",tickColorType:"secondary",tickTextRotate:0,tickTextColorType:"primary",gridIndexes:[0]},P2={labelOffset:[0,0],labelColorType:"primary",axisLineVisible:!1,axisLineColorType:"primary",ticks:4,tickFormat:",.0f",tickLineVisible:!0,tickPadding:20,tickFullLine:!0,tickFullLineDasharray:"none",tickColorType:"secondary",tickTextRotate:0,tickTextColorType:"primary",gridIndexes:[0]},D2={barWidth:0,barPadding:1,barGroupPadding:40,barRadius:!1,gridIndexes:[0]},E2={barWidth:0,barGroupPadding:10,barRadius:!1,gridIndexes:[0]},k2={barWidth:0,barPadding:1,barGroupPadding:20,linearGradientOpacity:[1,0],gridIndexes:[0]},L2={lineCurve:"curveLinear",lineWidth:2,gridIndexes:[1]},C2={radius:4,fillColorType:"white",strokeColorType:"series",strokeWidth:2,onlyShowHighlighted:!1,gridIndexes:[1]},R2={firstAxis:{labelOffset:[0,0],labelColorType:"primary",axisLineVisible:!1,axisLineColorType:"primary",ticks:4,tickFormat:",.0f",tickLineVisible:!0,tickPadding:20,tickFullLine:!0,tickFullLineDasharray:"none",tickColorType:"secondary",tickTextRotate:0,tickTextColorType:"primary"},secondAxis:{labelOffset:[0,0],labelColorType:"primary",axisLineVisible:!1,axisLineColorType:"primary",ticks:4,tickFormat:",.0f",tickLineVisible:!0,tickPadding:20,tickFullLine:!0,tickFullLineDasharray:"none",tickColorType:"secondary",tickTextRotate:0,tickTextColorType:"primary"},gridIndexes:[0,1]},I2="MultiGridLegend",hR=Xe(I2,M2)(({selection:t,rootSelection:e,observer:n,subject:r})=>{const i=new it,o=n.multiGridEachDetail$.pipe(G(i),B(c=>c.map((h,f)=>h.SeriesDataMap$.pipe(B(d=>Array.from(d.keys()))))),U(c=>H(c)),B(c=>c.flat())),a=H({fullParams:n.fullParams$,multiGrid:n.multiGridEachDetail$,computedData:n.computedData$}).pipe(G(i),U(async c=>c),B(c=>c.computedData.map((l,h)=>{const f=sc(c.fullParams.gridList[h]??{},{listRectWidth:c.fullParams.listRectWidth,listRectHeight:c.fullParams.listRectHeight,listRectRadius:c.fullParams.listRectRadius});return l.map(d=>f)}).flat())),s=H({fullParams:n.fullParams$,seriesList:a}).pipe(G(i),U(async c=>c),B(c=>({...c.fullParams,seriesList:c.seriesList}))),u=bh(I2,{rootSelection:e,seriesLabels$:o,fullParams$:s,layout$:n.layout$,fullChartParams$:n.fullChartParams$});return()=>{i.next(void 0),u()}}),$n=t=>{const e=t.fullParams$.pipe(B(r=>r.gridIndexes),dt(),Ye(1)),n=new it;return e.pipe(B(r=>r.map(i=>{n.next(void 0);const o=Fu(i).pipe(G(n),Ye(1)),a=H({computedData:t.computedData$,gridIndex:o}).pipe(G(n),B($=>$.computedData[$.gridIndex]??$.computedData[0])),s=H({fullDataFormatter:t.fullDataFormatter$,gridIndex:o}).pipe(G(n),B($=>{const w=$.fullDataFormatter.gridList[0];return{type:"grid",grid:{...$.fullDataFormatter.gridList[$.gridIndex]??w},container:{...$.fullDataFormatter.container}}})),u=H({multiGridEachDetail:t.multiGridEachDetail$,gridIndex:o}).pipe(G(n),U(async $=>$),B($=>$.multiGridEachDetail[$.gridIndex]??$.multiGridEachDetail[0]),Ye(1)),c=u.pipe(U($=>$.isSeriesPositionSeprate$)),l=u.pipe(U($=>$.gridContainer$)),h=u.pipe(U($=>$.gridAxesTransform$)),f=u.pipe(U($=>$.gridAxesReverseTransform$)),d=u.pipe(U($=>$.gridAxesSize$)),p=u.pipe(U($=>$.gridGraphicTransform$)),g=u.pipe(U($=>$.gridGraphicReverseScale$)),m=u.pipe(U($=>$.gridHighlight$)),y=u.pipe(U($=>$.existedSeriesLabels$)),x=u.pipe(U($=>$.SeriesDataMap$)),v=u.pipe(U($=>$.GroupDataMap$)),b=u.pipe(U($=>$.visibleComputedData$));return{gridComputedData$:a,gridDataFormatter$:s,gridAxesTransform$:h,gridGraphicTransform$:p,gridGraphicReverseScale$:g,gridAxesReverseTransform$:f,gridAxesSize$:d,gridHighlight$:m,existedSeriesLabels$:y,SeriesDataMap$:x,GroupDataMap$:v,visibleComputedData$:b,isSeriesPositionSeprate$:c,gridContainer$:l}})))},wh="MultiBars",N2=ut(wh,"grid"),dR=Xe(wh,D2)(({selection:t,name:e,subject:n,observer:r})=>{const i=new it,o=[];return $n(r).subscribe(s=>{o.forEach(u=>u()),t.selectAll(`g.${N2}`).data(s).join("g").attr("class",N2).each((u,c,l)=>{const h=Z(l[c]);o[c]=u2(wh,{selection:h,computedData$:u.gridComputedData$,visibleComputedData$:u.visibleComputedData$,existedSeriesLabels$:u.existedSeriesLabels$,SeriesDataMap$:u.SeriesDataMap$,GroupDataMap$:u.GroupDataMap$,fullParams$:r.fullParams$,fullChartParams$:r.fullChartParams$,gridAxesTransform$:u.gridAxesTransform$,gridGraphicTransform$:u.gridGraphicTransform$,gridGraphicReverseScale$:u.gridGraphicReverseScale$,gridAxesSize$:u.gridAxesSize$,gridHighlight$:u.gridHighlight$,gridContainer$:u.gridContainer$,isSeriesPositionSeprate$:u.isSeriesPositionSeprate$,event$:n.event$})})}),()=>{i.next(void 0),o.forEach(s=>s())}}),$h="MultiBarStack",F2=ut($h,"grid"),pR=Xe($h,E2)(({selection:t,name:e,subject:n,observer:r})=>{const i=new it,o=[];return $n(r).subscribe(s=>{o.forEach(u=>u()),t.selectAll(`g.${F2}`).data(s).join("g").attr("class",F2).each((u,c,l)=>{const h=Z(l[c]);o[c]=f2($h,{selection:h,computedData$:u.gridComputedData$,visibleComputedData$:u.visibleComputedData$,existedSeriesLabels$:u.existedSeriesLabels$,SeriesDataMap$:u.SeriesDataMap$,GroupDataMap$:u.GroupDataMap$,fullParams$:r.fullParams$,fullDataFormatter$:u.gridDataFormatter$,fullChartParams$:r.fullChartParams$,gridAxesTransform$:u.gridAxesTransform$,gridGraphicTransform$:u.gridGraphicTransform$,gridGraphicReverseScale$:u.gridGraphicReverseScale$,gridAxesSize$:u.gridAxesSize$,gridHighlight$:u.gridHighlight$,gridContainer$:u.gridContainer$,isSeriesPositionSeprate$:u.isSeriesPositionSeprate$,event$:n.event$})})}),()=>{i.next(void 0),o.forEach(s=>s())}}),Sh="MultiBarsTriangle",G2=ut(Sh,"grid"),gR=Xe(Sh,k2)(({selection:t,name:e,subject:n,observer:r})=>{const i=new it,o=[];return $n(r).subscribe(s=>{o.forEach(u=>u()),t.selectAll(`g.${G2}`).data(s).join("g").attr("class",G2).each((u,c,l)=>{const h=Z(l[c]);o[c]=g2(Sh,{selection:h,computedData$:u.gridComputedData$,visibleComputedData$:u.visibleComputedData$,existedSeriesLabels$:u.existedSeriesLabels$,SeriesDataMap$:u.SeriesDataMap$,GroupDataMap$:u.GroupDataMap$,fullParams$:r.fullParams$,fullChartParams$:r.fullChartParams$,gridAxesTransform$:u.gridAxesTransform$,gridGraphicTransform$:u.gridGraphicTransform$,gridAxesSize$:u.gridAxesSize$,gridHighlight$:u.gridHighlight$,gridContainer$:u.gridContainer$,isSeriesPositionSeprate$:u.isSeriesPositionSeprate$,event$:n.event$})})}),()=>{i.next(void 0),o.forEach(s=>s())}}),Ah="MultiLines",z2=ut(Ah,"grid"),mR=Xe(Ah,L2)(({selection:t,name:e,subject:n,observer:r})=>{const i=new it,o=[];return $n(r).subscribe(s=>{o.forEach(u=>u()),t.selectAll(`g.${z2}`).data(s).join("g").attr("class",z2).each((u,c,l)=>{const h=Z(l[c]);o[c]=i2(Ah,{selection:h,computedData$:u.gridComputedData$,existedSeriesLabels$:u.existedSeriesLabels$,SeriesDataMap$:u.SeriesDataMap$,GroupDataMap$:u.GroupDataMap$,fullDataFormatter$:u.gridDataFormatter$,fullParams$:r.fullParams$,fullChartParams$:r.fullChartParams$,gridAxesTransform$:u.gridAxesTransform$,gridGraphicTransform$:u.gridGraphicTransform$,gridAxesSize$:u.gridAxesSize$,gridHighlight$:u.gridHighlight$,gridContainer$:u.gridContainer$,event$:n.event$})})}),()=>{i.next(void 0),o.forEach(s=>s())}}),Mh="MultiDots",O2=ut(Mh,"grid"),yR=Xe(Mh,C2)(({selection:t,name:e,subject:n,observer:r})=>{const i=new it,o=[];return $n(r).subscribe(s=>{o.forEach(u=>u()),t.selectAll(`g.${O2}`).data(s).join("g").attr("class",O2).each((u,c,l)=>{const h=Z(l[c]);o[c]=y2(Mh,{selection:h,computedData$:u.gridComputedData$,visibleComputedData$:u.visibleComputedData$,existedSeriesLabels$:u.existedSeriesLabels$,SeriesDataMap$:u.SeriesDataMap$,GroupDataMap$:u.GroupDataMap$,fullParams$:r.fullParams$,fullChartParams$:r.fullChartParams$,gridAxesTransform$:u.gridAxesTransform$,gridGraphicTransform$:u.gridGraphicTransform$,gridGraphicReverseScale$:u.gridGraphicReverseScale$,gridAxesSize$:u.gridAxesSize$,gridHighlight$:u.gridHighlight$,gridContainer$:u.gridContainer$,event$:n.event$})})}),()=>{i.next(void 0),o.forEach(s=>s())}}),Th="MultiGroupAxis",U2=ut(Th,"grid"),bR=Xe(Th,T2)(({selection:t,name:e,subject:n,observer:r})=>{const i=new it,o=[];return $n(r).subscribe(s=>{o.forEach(u=>u()),t.selectAll(`g.${U2}`).data(s).join("g").attr("class",U2).each((u,c,l)=>{const h=Z(l[c]);o[c]=x2(Th,{selection:h,computedData$:u.gridComputedData$,fullParams$:r.fullParams$,fullDataFormatter$:u.gridDataFormatter$,fullChartParams$:r.fullChartParams$,gridAxesTransform$:u.gridAxesTransform$,gridAxesReverseTransform$:u.gridAxesReverseTransform$,gridAxesSize$:u.gridAxesSize$,gridContainer$:u.gridContainer$,isSeriesPositionSeprate$:u.isSeriesPositionSeprate$})})}),()=>{i.next(void 0),o.forEach(s=>s())}}),Ph="MultiValueAxis",B2=ut(Ph,"grid"),vR=Xe(Ph,P2)(({selection:t,name:e,subject:n,observer:r})=>{const i=new it,o=[];return $n(r).subscribe(s=>{o.forEach(u=>u()),t.selectAll(`g.${B2}`).data(s).join("g").attr("class",B2).each((u,c,l)=>{const h=Z(l[c]);o[c]=Su(Ph,{selection:h,computedData$:u.gridComputedData$,fullParams$:r.fullParams$,fullDataFormatter$:u.gridDataFormatter$,fullChartParams$:r.fullChartParams$,gridAxesTransform$:u.gridAxesTransform$,gridAxesReverseTransform$:u.gridAxesReverseTransform$,gridAxesSize$:u.gridAxesSize$,gridContainer$:u.gridContainer$,isSeriesPositionSeprate$:u.isSeriesPositionSeprate$})})}),()=>{i.next(void 0),o.forEach(s=>s())}});function Y2(t,e,n,r){const{gap:i,rowAmount:o,columnAmount:a}=e,s=(t.width-i*(a-1))/a,u=(t.height-i*(o-1))/o,c=r*s+r*i,l=n*u+n*i,h=[c,l],f=[s/t.width,u/t.height];return{translate:h,scale:f}}const xR=({fullDataFormatter$:t,layout$:e})=>{const n=new it;function r({xAxis:i,yAxis:o,width:a,height:s}){if(!i||!o)return{translate:[0,0],scale:[1,1],rotate:0,rotateX:0,rotateY:0,value:""};let u=0,c=0,l=0,h=0,f=0;return i.position==="bottom"?o.position==="left"?(h=180,c=s):o.position==="right"?(h=180,f=180,u=a,c=s):(h=180,c=s):i.position==="top"?o.position==="left"||(o.position==="right"?(f=180,u=a):(h=180,c=s)):i.position==="left"?o.position==="bottom"?(l=-90,c=s):o.position==="top"?(l=-90,f=180):(h=180,c=s):i.position==="right"&&(o.position==="bottom"?(l=-90,h=180,c=s,u=a):o.position==="top"?(l=-90,h=180,f=180,u=a):(h=180,c=s)),{translate:[u,c],scale:[1,1],rotate:l,rotateX:h,rotateY:f,value:`translate(${u}px, ${c}px) rotate(${l}deg) rotateX(${h}deg) rotateY(${f}deg)`}}return new lt(i=>(H({fullDataFormatter:t,layout:e}).pipe(G(n),U(async o=>o)).subscribe(o=>{const a=r({xAxis:o.fullDataFormatter.grid.groupAxis,yAxis:o.fullDataFormatter.grid.valueAxis,width:o.layout.width,height:o.layout.height});i.next(a)}),function(){n.next(void 0)}))},_R=({gridAxesTransform$:t})=>t.pipe(B(e=>{const n=[0,0],r=[1/e.scale[0],1/e.scale[1]],i=e.rotate*-1,o=e.rotateX*-1,a=e.rotateY*-1;return{translate:n,scale:r,rotate:i,rotateX:o,rotateY:a,value:`translate(${n[0]}px, ${n[1]}px) rotate(${i}deg) rotateX(${o}deg) rotateY(${a}deg)`}})),wR=({computedData$:t,fullDataFormatter$:e,fullChartParams$:n,layout$:r})=>H({computedData:t,fullDataFormatter:e,fullChartParams:n,layout:r}).pipe(U(async o=>o),B(o=>{const a=o.fullDataFormatter.grid;if(!!(a.seriesSlotIndexes&&a.seriesSlotIndexes.length===o.computedData.length))return o.computedData.map((u,c)=>{const l=a.seriesSlotIndexes[c]%o.fullDataFormatter.container.columnAmount,h=Math.floor(a.seriesSlotIndexes[c]/o.fullDataFormatter.container.columnAmount),{translate:f,scale:d}=Y2(o.layout,o.fullDataFormatter.container,h,l);return{slotIndex:a.seriesSlotIndexes[c],rowIndex:h,columnIndex:l,translate:f,scale:d}});{const u=a.slotIndex%o.fullDataFormatter.container.columnAmount,c=Math.floor(a.slotIndex/o.fullDataFormatter.container.columnAmount);return o.computedData.map((l,h)=>{const{translate:f,scale:d}=Y2(o.layout,o.fullDataFormatter.container,c,u);return{slotIndex:a.slotIndex,rowIndex:c,columnIndex:u,translate:f,scale:d}})}})),Dh="OverlappingValueAxes",W2=ut(Dh,"grid"),$R=Xe(Dh,R2)(({selection:t,name:e,subject:n,observer:r})=>{const i=new it,o=[],a=r.fullParams$.pipe(G(i),B(l=>l.gridIndexes[0])),s=r.fullParams$.pipe(G(i),B(l=>l.gridIndexes[1])),u=H({firstGridIndex:a,secondGridIndex:s}).pipe(G(i),U(l=>r.fullDataFormatter$.pipe(G(i),B(h=>{h.gridList[l.secondGridIndex]||(h.gridList[l.secondGridIndex]=Object.assign({},h.gridList[l.firstGridIndex]));let f="";return h.gridList[l.firstGridIndex].valueAxis.position==="left"?f="right":h.gridList[l.firstGridIndex].valueAxis.position==="bottom"?f="top":h.gridList[l.firstGridIndex].valueAxis.position==="top"?f="bottom":h.gridList[l.firstGridIndex].valueAxis.position==="right"&&(f="left"),console.log("reversePosition",f),{type:"grid",grid:{...h.gridList[l.secondGridIndex],valueAxis:{...h.gridList[l.secondGridIndex].valueAxis,position:f}},container:{...h.container}}}))));return Fu(r).pipe(G(i),B(l=>({...l,fullParams$:l.fullParams$.pipe(B(h=>(h.gridIndexes.length>2&&(h.gridIndexes.length=2),h)))})),U(l=>$n(l)),B(l=>l.map((h,f)=>{if(f===0)return h;const d=xR({fullDataFormatter$:u,layout$:r.layout$}),p=_R({gridAxesTransform$:d}),g=wR({computedData$:h.gridComputedData$,fullDataFormatter$:u,fullChartParams$:r.fullChartParams$,layout$:r.layout$});return{...h,gridAxesTransform$:d,gridAxesReverseTransform$:p,gridContainer$:g}}))).subscribe(l=>{o.forEach(h=>h()),t.selectAll(`g.${W2}`).data(l).join("g").attr("class",W2).each((h,f,d)=>{if(f>1)return;const p=Z(d[f]);o[f]=Su(Dh,{selection:p,computedData$:h.gridComputedData$,fullParams$:r.fullParams$.pipe(B(g=>f===0?g.firstAxis:g.secondAxis)),fullDataFormatter$:h.gridDataFormatter$,fullChartParams$:r.fullChartParams$,gridAxesTransform$:h.gridAxesTransform$,gridAxesReverseTransform$:h.gridAxesReverseTransform$,gridAxesSize$:h.gridAxesSize$,gridContainer$:h.gridContainer$,isSeriesPositionSeprate$:h.isSeriesPositionSeprate$})})}),()=>{i.next(void 0),o.forEach(l=>l())}}),H2={header:{height:36,text:[],textStyle:[]},footer:{height:0,text:[],textStyle:[]}},q2={backgroundColorType:"background",strokeColorType:"primary",backgroundOpacity:.8,textColorType:"primary",offset:[20,5],padding:10,textRenderFn:t=>{if(t.highlightTarget==="datum"&&t.datum)return[`${t.datum.label}: ${t.datum.value}`];if(t.highlightTarget==="series"){const e=t.seriesLabel,n=t.series.map(r=>r.value).join(",");return[e,n]}else if(t.highlightTarget==="group"){const e=t.groupLabel,n=t.groups.map(r=>r.value).join(",");return[e,n]}return[]},svgRenderFn:null},SR=tp("Container",H2)(({selection:t})=>function(){}),Eh="Tooltip",X2=ut(Eh,"g"),AR=ut(Eh,"box");function MR(t,e){const n=e.textSize*1.5;return t.filter(r=>r!="").map((r,i)=>{const o=i*n;return`<text font-size="${e.textSize}" fill="${e.textColor}" x="0" y="${o}" style="dominant-baseline:text-before-edge">${r}</text>`}).join()}function TR({rootSelection:t,pluginName:e,rootWidth:n,rootHeight:r,svgString:i,tooltipStyle:o,event:a}){t.interrupt("fadeout");const s=5,u=i?[i]:[],c=i?[o]:[],h=t.selectAll(`g.${X2}`).data(u).join(b=>b.append("g").classed(X2,!0).attr("pointer-events","none"),b=>b,b=>b.style("opacity",0).remove()).attr("transform",()=>`translate(${a.offsetX}, ${a.offsetY})`).selectAll(`g.${AR}`).data(c).join(b=>b.append("g").classed(ut(e,"box"),!0)),f=h.selectAll("rect").data(c).join(b=>b.append("rect").attr("rx",s).attr("ry",s)).attr("fill",b=>b.backgroundColor).attr("stroke",b=>b.strokeColor).attr("opacity",b=>b.backgroundOpacity),d=h.selectAll("g").data(u).join(b=>b.append("g").classed(ut(e,"content"),!0).attr("transform",()=>`translate(${o.padding}, ${o.padding})`));u.length&&dC(d,u[0]);const p=d!=null&&d.node()?e2(d):{width:0,height:0};f.attr("width",p.width+o.padding*2).attr("height",p.height+o.padding*2);const g=h!=null&&h.node()?e2(h):{width:0,height:0},m=n-g.width,y=r-g.height,x=a.offsetX+o.offset[0]>m?m-a.offsetX:o.offset[0],v=a.offsetY+o.offset[1]>y?y-a.offsetY:o.offset[1];h.attr("transform",b=>`translate(${x}, ${v})`),h.attr("transform",b=>`translate(${x}, ${v})`)}const PR=tp(Eh,q2)(({selection:t,rootSelection:e,name:n,chartType:r,observer:i,subject:o})=>{const a=new it,s=o.event$.pipe(G(a),Fo(p=>p.eventName==="mouseover"||p.eventName==="mousemove")),u=o.event$.pipe(G(a),Fo(p=>p.eventName==="mouseout")),c=H({fullChartParams:i.fullChartParams$,fullParams:i.fullParams$}).pipe(G(a),U(async p=>p),B(p=>({backgroundColor:Bt(p.fullParams.backgroundColorType,p.fullChartParams),backgroundOpacity:p.fullParams.backgroundOpacity,strokeColor:Bt(p.fullParams.strokeColorType,p.fullChartParams),offset:p.fullParams.offset,padding:p.fullParams.padding,textSize:p.fullChartParams.styles.textSize,textColor:Bt(p.fullParams.textColorType,p.fullChartParams)}))),l=H({fullParams:i.fullParams$,tooltipStyle:c}).pipe(G(a),U(async p=>p),B(p=>p.fullParams.svgRenderFn?p.fullParams.svgRenderFn:g=>{const m=p.fullParams.textRenderFn(g);return MR(m,p.tooltipStyle)})),h=H({event:s,contentRenderFn:l}).pipe(G(a),U(async p=>p),B(p=>p.contentRenderFn(p.event))),f=u.pipe(G(a),B(p=>"")),d=Ou(s,u).pipe(G(a),B(p=>p.event));return H({svgString:Ou(h,f),event:d,layout:i.layout$,tooltipStyle:c}).pipe(G(a),U(async p=>p)).subscribe(p=>{TR({rootSelection:e,pluginName:n,rootWidth:p.layout.rootWidth,rootHeight:p.layout.rootHeight,svgString:p.svgString,tooltipStyle:p.tooltipStyle,event:p.event})}),function(){a.next(void 0)}}),V2={force:{strength:.03,velocityDecay:.2,collisionSpacing:2},bubbleText:{fillRate:.6,lineHeight:12,lineLengthMin:4},highlightRIncrease:0,bubbleScaleType:"area"},j2={outerRadius:.95,innerRadius:0,outerMouseoverRadius:1,enterDuration:800,startAngle:0,endAngle:Math.PI*2,padAngle:.02,cornerRadius:0},Z2={eventFn:(t,e,n)=>e==="mouseover"||e==="mousemove"?[String(t.datum.value)]:[String(Math.round(t.data.reduce((r,i)=>r+(i.value??0),0)*n))],textAttrs:[{transform:"translate(0, 0)"}],textStyles:[{"font-weight":"bold","text-anchor":"middle","pointer-events":"none","dominant-baseline":"middle","font-size":64,fill:"#000"}]},K2={outerRadius:.95,outerMouseoverRadius:1,startAngle:0,endAngle:Math.PI*2,labelCentroid:2.3,labelColorType:"series",labelFn:t=>String(t.value)},Q2={position:"right",justify:"end",padding:28,backgroundFill:"none",backgroundStroke:"none",gap:10,listRectWidth:14,listRectHeight:14,listRectRadius:0};function DR(t,{text:e,radius:n,lineHeight:r,isBreakAll:i=!1,limit:o=0}){if(t==null||e==null){console.error("selection or text is not defined");return}n==null&&(n=t.node().getBBox().width/2);function a(d){let p;return i?p=d.split(""):p=d.split(/\s+/g),p[p.length-1]||p.pop(),p[0]||p.shift(),p}function s(d,p){return d&&p&&d.length>p&&(d=d.substring(0,p)+"..."),d}function u(d){var g;const p=document.createElement("canvas").getContext("2d");return((g=p==null?void 0:p.measureText(d))==null?void 0:g.width)??0}function c(d){const p=u(d.trim());return Math.sqrt(p*r)}function l(d,p){let g={width:0,text:""},m=1/0;const y=[];let x=" ";i&&(x="");for(let v=0,b=d.length;v<b;++v){const $=(g.text?g.text+x:"")+d[v],w=u($);(m+w)/2<p?(g.width=m=w,g.text=$):(m=u(d[v]),g={width:m,text:d[v]},y.push(g))}return y}function h(d){let p=0;for(let g=0,m=d.length;g<m;++g){const y=(Math.abs(g-m/2+.5)+.5)*r,x=d[g].width/2;p=Math.max(p,Math.sqrt(x**2+y**2))}return p}function f(d,p){o>0&&(p=s(p,o));const g=a(p),m=c(p),y=l(g,m),x=h(y);let v=d.select("text");v.size()||(v=d.append("text")),v.attr("transform",`translate(0,0) scale(${n/x})`);const b=v.selectAll("tspan").data(y),$=b.enter().append("tspan").attr("x",0).merge(b).attr("y",(w,S)=>(S-y.length/2+.8)*r).text(w=>w.text);return b.exit().remove(),b.merge($)}return f(t,e)}let or;function ER(t,e){return T1().velocityDecay(e.force.velocityDecay).force("collision",S1().radius(n=>n.r+e.force.collisionSpacing)).force("charge",P1().strength(n=>-Math.pow(n.r,2)*e.force.strength)).on("tick",()=>{t.attr("transform",n=>`translate(${n.x},${n.y})`)})}function kR({data:t,bubbleGroupR:e,maxValue:n,avgValue:r}){const i=e/Math.sqrt(t.length),a=i*i*Math.PI/r,s=n*a;return Math.pow(s/Math.PI,.5)*.75}function LR({data:t,LastBubbleDataMap:e,graphicWidth:n,graphicHeight:r,scaleType:i}){const o=Math.min(n,r)/2,a=t.flat().filter(d=>d.value!=null&&d.visible!=!1),s=Math.max(...a.map(d=>d.value)),u=a.reduce((d,p)=>d+(p.value??0),0)/a.length,c=kR({data:a,bubbleGroupR:o,maxValue:s,avgValue:u}),l=i==="area"?.5:1,h=Zs().domain([0,s]).range([0,c]).exponent(l);return a.map(d=>{const p=d,g=e.get(d.id);g?(p.x=g.x,p.y=g.y):(p.x=Math.random()*n,p.y=Math.random()*r);const m=h(p.value??0);return p.r=m,p._originR=m,p})}function J2({graphicSelection:t,bubblesData:e,fullParams:n}){let r=t.selectAll("g").data(e,a=>a.id),i=r.enter().append("g").attr("cursor","pointer");i.style("font-size",12).style("fill","#ffffff").attr("text-anchor","middle").attr("transform",a=>`translate(${a.x},${a.y})`),i.append("circle").attr("class","node").attr("cx",0).attr("cy",0).attr("fill",a=>a.color),i.append("text").style("opacity",.8).attr("pointer-events","none"),r.exit().remove();const o=r.merge(i);return o.select("circle").transition().duration(200).attr("r",a=>a.r).attr("fill",a=>a.color),o.each((a,s,u)=>{const c=Z(u[s]);let l=!0;a.label.length<=n.bubbleText.lineLengthMin&&(l=!1),c.call(DR,{text:a.label,radius:a.r*n.bubbleText.fillRate,lineHeight:n.bubbleText.lineHeight,isBreakAll:l})}),o}function CR({data:t,highlightRIncrease:e,highlightIds:n}){if(e!=0){if(!n.length){t.forEach(r=>r.r=r._originR);return}t.forEach(r=>{n.includes(r.id)?r.r=r._originR+e:r.r=r._originR})}}function RR(){return Up().on("start",(t,e)=>{t.active||or.alpha(1).restart(),e.fx=e.x,e.fy=e.y}).on("drag",(t,e)=>{t.active||or.alphaTarget(0),e.fx=t.x,e.fy=t.y}).on("end",(t,e)=>{e.fx=null,e.fy=null})}function tx({fullParams:t,graphicWidth:e,graphicHeight:n}){or.force("x",D1().strength(t.force.strength).x(0)).force("y",E1().strength(t.force.strength).y(0)),or.alpha(1).restart()}function IR({bubblesSelection:t,highlightIds:e,fullChartParams:n}){if(t.interrupt("highlight"),!e.length){t.transition("highlight").style("opacity",1);return}t.each((r,i,o)=>{const a=Z(o[i]);e.includes(r.id)?a.style("opacity",1).transition("highlight").ease(ja).duration(500):a.style("opacity",n.styles.unhighlightedOpacity)})}const NR=Si("Bubbles",V2)(({selection:t,name:e,observer:n,subject:r})=>{const i=new it,o=t.append("g"),a=new it;let s=new Map;n.layout$.pipe(ui()).subscribe(h=>{t.attr("transform",`translate(${h.width/2}, ${h.height/2})`),n.layout$.pipe(G(i)).subscribe(f=>{t.transition().attr("transform",`translate(${f.width/2}, ${f.height/2})`)})});const u=n.fullParams$.pipe(G(i),B(h=>h.bubbleScaleType),dt()),c=new lt(h=>{H({layout:n.layout$,computedData:n.computedData$,scaleType:u}).pipe(G(i),U(async f=>f)).subscribe(f=>{const d=LR({data:f.computedData,LastBubbleDataMap:s,graphicWidth:f.layout.width,graphicHeight:f.layout.height,scaleType:f.scaleType});h.next(d)})});c.subscribe(h=>{s=new Map(h.map(f=>[f.id,f]))});const l=n.fullChartParams$.pipe(G(i),B(h=>h.highlightTarget),dt());return H({layout:n.layout$,computedData:n.computedData$,bubblesData:c,SeriesDataMap:n.SeriesDataMap$,fullParams:n.fullParams$,highlightTarget:l}).pipe(G(i),U(async h=>h)).subscribe(h=>{const f=J2({graphicSelection:o,bubblesData:h.bubblesData,fullParams:h.fullParams});or=ER(f,h.fullParams),f.on("mouseover",(d,p)=>{r.event$.next({type:"series",eventName:"mouseover",pluginName:e,highlightTarget:h.highlightTarget,datum:p,series:h.SeriesDataMap.get(p.seriesLabel),seriesIndex:p.seriesIndex,seriesLabel:p.seriesLabel,event:d,data:h.computedData})}).on("mousemove",(d,p)=>{r.event$.next({type:"series",eventName:"mousemove",pluginName:e,highlightTarget:h.highlightTarget,datum:p,series:h.SeriesDataMap.get(p.seriesLabel),seriesIndex:p.seriesIndex,seriesLabel:p.seriesLabel,event:d,data:h.computedData})}).on("mouseout",(d,p)=>{r.event$.next({type:"series",eventName:"mouseout",pluginName:e,highlightTarget:h.highlightTarget,datum:p,series:h.SeriesDataMap.get(p.seriesLabel),seriesIndex:p.seriesIndex,seriesLabel:p.seriesLabel,event:d,data:h.computedData})}).on("click",(d,p)=>{r.event$.next({type:"series",eventName:"click",pluginName:e,highlightTarget:h.highlightTarget,datum:p,series:h.SeriesDataMap.get(p.seriesLabel),seriesIndex:p.seriesIndex,seriesLabel:p.seriesLabel,event:d,data:h.computedData})}).call(RR()),or.nodes(h.bubblesData),tx({fullParams:h.fullParams,graphicWidth:h.layout.width,graphicHeight:h.layout.height}),a.next(f)}),H({bubblesSelection:a,bubblesData:c,highlight:n.seriesHighlight$,fullChartParams:n.fullChartParams$,fullParams:n.fullParams$,layout:n.layout$}).pipe(G(i),U(async h=>h)).subscribe(h=>{IR({bubblesSelection:h.bubblesSelection,highlightIds:h.highlight,fullChartParams:h.fullChartParams}),h.fullParams.highlightRIncrease&&(CR({data:h.bubblesData,highlightRIncrease:h.fullParams.highlightRIncrease,highlightIds:h.highlight}),J2({graphicSelection:o,bubblesData:h.bubblesData,fullParams:h.fullParams})),tx({fullParams:h.fullParams,graphicWidth:h.layout.width,graphicHeight:h.layout.height}),or.nodes(h.bubblesData)}),()=>{i.next(void 0)}});function ex({computedDataSeries:t,startAngle:e,endAngle:n}){return hv().startAngle(e).endAngle(n).value(o=>o.visible==!1?0:o.value).sort((o,a)=>o.sortedIndex-a.sortedIndex)(t).map((o,a)=>{let s=o;return s.id=o.data.id,s})}const nx="Pie",FR=ut(nx,"path");function GR({enter:t,exit:e,data:n,lastData:r,fullParams:i}){return!t.size()&&!e.size()?o=>{const a=n.map((s,u)=>{const c=r[u]??{startAngle:0,endAngle:0,value:0};return{...s,startAngle:s.startAngle*o+c.startAngle*(1-o),endAngle:s.endAngle*o+c.endAngle*(1-o),value:s.value*o+c.value*(1-o)}});return kh(a,i.startAngle,i.endAngle,1)}:o=>kh(n,i.startAngle,i.endAngle,o)}function kh(t,e,n,r){return t.map((i,o)=>{const a=e+(i.startAngle-e)*r,s=a+(i.endAngle-i.startAngle)*r;return{...i,startAngle:a,endAngle:s}})}function rx({selection:t,renderData:e,arc:n}){let r=t.selectAll("path").data(e,s=>s.id),i=r.enter().append("path").classed(FR,!0),o=r.exit();i.append("path");const a=r.merge(i);return a.style("cursor","pointer").attr("fill",(s,u)=>s.data.color).attr("d",(s,u)=>n(s)),o.remove(),a}function zR({pathSelection:t,ids:e,fullChartParams:n,arc:r,arcMouseover:i}){if(t.interrupt("highlight"),!e.length){t.transition("highlight").style("opacity",1).attr("d",o=>r(o));return}t.each((o,a,s)=>{const u=Z(s[a]);e.includes(o.data.id)?u.style("opacity",1).transition("highlight").ease(ja).duration(500).attr("d",c=>i(c)):u.style("opacity",n.styles.unhighlightedOpacity).transition("highlight").attr("d",c=>r(c))})}const OR=Si(nx,j2)(({selection:t,name:e,observer:n,subject:r})=>{const i=new it,o=t.append("g"),a=new it;let s=[],u=[];n.layout$.pipe(ui()).subscribe(p=>{t.attr("transform",`translate(${p.width/2}, ${p.height/2})`),n.layout$.pipe(G(i)).subscribe(g=>{t.transition().attr("transform",`translate(${g.width/2}, ${g.height/2})`)})});const c=n.layout$.pipe(G(i),B(p=>p.width<p.height?p.width:p.height)),l=new lt(p=>{H({computedData:n.computedData$,fullParams:n.fullParams$}).pipe(G(i),U(async g=>g)).subscribe(g=>{const m=ex({computedDataSeries:g.computedData,startAngle:g.fullParams.startAngle,endAngle:g.fullParams.endAngle});p.next(m)})}),h=new lt(p=>{H({shorterSideWith:c,fullParams:n.fullParams$}).pipe(G(i),U(async g=>g)).subscribe(g=>{const m=$u({axisWidth:g.shorterSideWith,innerRadius:g.fullParams.innerRadius,outerRadius:g.fullParams.outerRadius,padAngle:g.fullParams.padAngle,cornerRadius:g.fullParams.cornerRadius});p.next(m)})}),f=new lt(p=>{H({shorterSideWith:c,fullParams:n.fullParams$}).pipe(G(i),U(async g=>g)).subscribe(g=>{const m=$u({axisWidth:g.shorterSideWith,innerRadius:g.fullParams.innerRadius,outerRadius:g.fullParams.outerMouseoverRadius,padAngle:g.fullParams.padAngle,cornerRadius:g.fullParams.cornerRadius});p.next(m)})}),d=n.fullChartParams$.pipe(G(i),B(p=>p.highlightTarget),dt());return H({pieData:l,SeriesDataMap:n.SeriesDataMap$,arc:h,arcMouseover:f,computedData:n.computedData$,fullParams:n.fullParams$,fullChartParams:n.fullChartParams$,highlightTarget:d}).pipe(G(i),U(async p=>p)).subscribe(p=>{o.interrupt("graphicMove");let g=t.selectAll("path").data(p.pieData,v=>v.data.id),m=g.enter(),y=g.exit();const x=GR({enter:m,exit:y,data:p.pieData,lastData:s,fullParams:p.fullParams});o.transition("graphicMove").duration(p.fullChartParams.transitionDuration).ease(ii(p.fullChartParams.transitionEase)).tween("move",(v,b)=>$=>{u=x($),rx({selection:o,renderData:u,arc:p.arc}),r.event$.next({type:"series",pluginName:e,eventName:"transitionMove",event:void 0,highlightTarget:p.highlightTarget,datum:null,series:[],seriesIndex:-1,seriesLabel:"",data:p.computedData})}).on("end",(v,b)=>{u=kh(p.pieData,p.fullParams.startAngle,p.fullParams.endAngle,1);const $=rx({selection:o,renderData:u,arc:p.arc});a.next($),s=Object.assign([],p.pieData),r.event$.next({type:"series",pluginName:e,eventName:"transitionEnd",event:void 0,highlightTarget:p.highlightTarget,datum:null,series:[],seriesIndex:-1,seriesLabel:"",data:p.computedData}),$.on("mouseover",(w,S)=>{w.stopPropagation(),r.event$.next({type:"series",eventName:"mouseover",pluginName:e,highlightTarget:p.highlightTarget,datum:S.data,series:p.SeriesDataMap.get(S.data.seriesLabel),seriesIndex:S.data.seriesIndex,seriesLabel:S.data.seriesLabel,event:w,data:p.computedData})}).on("mousemove",(w,S)=>{w.stopPropagation(),r.event$.next({type:"series",eventName:"mousemove",pluginName:e,highlightTarget:p.highlightTarget,datum:S.data,series:p.SeriesDataMap.get(S.data.seriesLabel),seriesIndex:S.data.seriesIndex,seriesLabel:S.data.seriesLabel,event:w,data:p.computedData})}).on("mouseout",(w,S)=>{w.stopPropagation(),r.event$.next({type:"series",eventName:"mouseout",pluginName:e,highlightTarget:p.highlightTarget,datum:S.data,series:p.SeriesDataMap.get(S.data.seriesLabel),seriesIndex:S.data.seriesIndex,seriesLabel:S.data.seriesLabel,event:w,data:p.computedData})}).on("click",(w,S)=>{w.stopPropagation(),r.event$.next({type:"series",eventName:"click",pluginName:e,highlightTarget:p.highlightTarget,datum:S.data,series:p.SeriesDataMap.get(S.data.seriesLabel),seriesIndex:S.data.seriesIndex,seriesLabel:S.data.seriesLabel,event:w,data:p.computedData})})})}),H({pathSelection:a,highlight:n.seriesHighlight$,fullChartParams:n.fullChartParams$,arc:h,arcMouseover:f}).pipe(G(i),U(async p=>p)).subscribe(p=>{zR({pathSelection:p.pathSelection,ids:p.highlight,fullChartParams:p.fullChartParams,arc:p.arc,arcMouseover:p.arcMouseover})}),()=>{i.next(void 0)}}),ix="PieEventTexts",ox=ut(ix,"text");function Lh(t,e){const n=t.selectAll(`text.${ox}`).data(e),r=n.enter().append("text").classed(ox,!0),i=n.merge(r);return i.each((o,a,s)=>{const u=Z(s[a]).text(o.text);Object.keys(o.attr).forEach(c=>{u.attr(c,o.attr[c])}),Object.keys(o.style).forEach(c=>{u.style(c,o.style[c])})}),n.exit().remove(),i}function Ch({eventData:t,eventName:e,t:n,eventFn:r,textAttrs:i,textStyles:o}){return r(t,e,n).map((s,u)=>({text:s,attr:i[u],style:o[u]}))}const UR=Si(ix,Z2)(({selection:t,name:e,observer:n,subject:r})=>{const i=new it,o=t.append("g");let a;n.layout$.pipe(ui()).subscribe(u=>{t.attr("transform",`translate(${u.width/2}, ${u.height/2})`),n.layout$.pipe(G(i)).subscribe(c=>{t.transition().attr("transform",`translate(${c.width/2}, ${c.height/2})`)})});const s=n.fullChartParams$.pipe(G(i),B(u=>u.highlightTarget),dt());return H({computedData:n.computedData$,fullParams:n.fullParams$,fullChartParams:n.fullChartParams$,highlightTarget:s}).pipe(G(i),U(async u=>u)).subscribe(u=>{o.transition().duration(u.fullChartParams.transitionDuration).ease(ii(u.fullChartParams.transitionEase)).tween("move",(c,l)=>h=>{const f=Ch({eventData:{type:"series",pluginName:e,eventName:"transitionMove",event:c,highlightTarget:u.highlightTarget,data:u.computedData,series:[],seriesIndex:-1,seriesLabel:"",datum:null},eventName:"transitionMove",t:h,eventFn:u.fullParams.eventFn,textAttrs:u.fullParams.textAttrs,textStyles:u.fullParams.textStyles});Lh(o,f)}).on("end",(c,l)=>{const h=Ch({eventData:{type:"series",pluginName:e,eventName:"transitionEnd",event:c,highlightTarget:u.highlightTarget,data:u.computedData,series:[],seriesIndex:-1,seriesLabel:"",datum:null},eventName:"transitionMove",t:1,eventFn:u.fullParams.eventFn,textAttrs:u.fullParams.textAttrs,textStyles:u.fullParams.textStyles});Lh(o,h),a&&a.unsubscribe(),a=r.event$.subscribe(f=>{const d=Ch({eventData:f,eventName:f.eventName,t:1,eventFn:u.fullParams.eventFn,textAttrs:u.fullParams.textAttrs,textStyles:u.fullParams.textStyles});Lh(o,d)})})}),()=>{i.next(void 0)}}),ax="PieLabels",BR=ut(ax,"text");function YR(t,e,n,r){return t.map((i,o)=>{const[a,s]=e.centroid(i),[u,c]=n.centroid(i);return{pieDatum:i,arcIndex:o,arcLabel:i.data.label,x:a*r,y:s*r,mouseoverX:u*r,mouseoverY:c*r}}).filter(i=>i.pieDatum.data.visible)}function WR(t,e,n,r){let i=t.selectAll("text").data(e,u=>u.pieDatum.id),o=i.enter().append("text").classed(BR,!0),a=i.exit();o.append("text");const s=i.merge(o);return s.attr("font-weight","bold").attr("text-anchor","middle").style("dominant-baseline","middle").style("cursor",u=>r.highlightTarget&&r.highlightTarget!="none"?"pointer":"none").text(u=>n.labelFn(u.pieDatum.data)).attr("font-size",r.styles.textSize).attr("fill",(u,c)=>yh({datum:u.pieDatum.data,colorType:n.labelColorType,fullChartParams:r})).transition().attr("transform",u=>"translate("+u.x+","+u.y+")"),a.remove(),s}function HR({labelSelection:t,ids:e,fullChartParams:n}){if(t.interrupt("highlight"),!e.length){t.transition().duration(200).attr("transform",r=>"translate("+r.x+","+r.y+")").style("opacity",1);return}t.each((r,i,o)=>{const a=Z(o[i]);e.includes(r.pieDatum.id)?a.style("opacity",1).transition().duration(200).attr("transform",s=>"translate("+s.mouseoverX+","+s.mouseoverY+")"):a.style("opacity",n.styles.unhighlightedOpacity).transition().duration(200).attr("transform",s=>"translate("+s.x+","+s.y+")")})}const qR=Si(ax,K2)(({selection:t,observer:e,subject:n})=>{const r=new it,i=t.append("g");let o=new it,a=[];return e.layout$.pipe(ui()).subscribe(s=>{t.attr("transform",`translate(${s.width/2}, ${s.height/2})`),e.layout$.pipe(G(r)).subscribe(u=>{t.transition().attr("transform",`translate(${u.width/2}, ${u.height/2})`)})}),H({layout:e.layout$,computedData:e.computedData$,fullParams:e.fullParams$,fullChartParams:e.fullChartParams$}).pipe(G(r),U(async s=>s)).subscribe(s=>{const u=s.layout.width<s.layout.height?s.layout.width:s.layout.height,c=$u({axisWidth:u,innerRadius:0,outerRadius:s.fullParams.outerRadius,padAngle:0,cornerRadius:0}),l=$u({axisWidth:u,innerRadius:0,outerRadius:s.fullParams.outerMouseoverRadius,padAngle:0,cornerRadius:0}),h=ex({computedDataSeries:s.computedData,startAngle:s.fullParams.startAngle,endAngle:s.fullParams.endAngle});a=YR(h,c,l,s.fullParams.labelCentroid);const f=WR(i,a,s.fullParams,s.fullChartParams);o.next(f)}),H({labelSelection:o,highlight:e.seriesHighlight$,fullChartParams:e.fullChartParams$}).pipe(G(r),U(async s=>s)).subscribe(s=>{HR({labelSelection:s.labelSelection,ids:s.highlight,fullChartParams:s.fullChartParams})}),()=>{r.next(void 0)}}),sx="SeriesLegend",XR=Si(sx,Q2)(({selection:t,rootSelection:e,observer:n,subject:r})=>{const i=new it,o=n.SeriesDataMap$.pipe(G(i),B(u=>Array.from(u.keys()))),a=n.fullParams$.pipe(G(i),B(u=>{const c=[{listRectWidth:u.listRectWidth,listRectHeight:u.listRectHeight,listRectRadius:u.listRectRadius}];return{...u,seriesList:c}})),s=bh(sx,{rootSelection:e,seriesLabels$:o,fullParams$:a,layout$:n.layout$,fullChartParams$:n.fullChartParams$});return()=>{i.next(void 0),s()}});Q.BarStack=NC,Q.Bars=DC,Q.BarsTriangle=WC,Q.Bubbles=NR,Q.CONTAINER_PLUGIN_PARAMS=H2,Q.Container=SR,Q.DEFAULT_BARS_PARAMS=Nh,Q.DEFAULT_BARS_TRIANGLE_PARAMS=Gh,Q.DEFAULT_BAR_STACK_PARAMS=Fh,Q.DEFAULT_BUBBLES_PARAMS=V2,Q.DEFAULT_DOTS_PARAMS=Rh,Q.DEFAULT_GRID_LEGEND_PARAMS=Bh,Q.DEFAULT_GROUP_AREA_PARAMS=Ih,Q.DEFAULT_GROUP_AXIS_PARAMS=zh,Q.DEFAULT_LINES_PARAMS=ar,Q.DEFAULT_MULTI_BARS_PARAMS=D2,Q.DEFAULT_MULTI_BARS_TRIANGLE_PARAMS=k2,Q.DEFAULT_MULTI_BAR_STACK_PARAMS=E2,Q.DEFAULT_MULTI_DOTS_PARAMS=C2,Q.DEFAULT_MULTI_GRID_LEGEND_PARAMS=M2,Q.DEFAULT_MULTI_GROUP_AXIS_PARAMS=T2,Q.DEFAULT_MULTI_LINES_PARAMS=L2,Q.DEFAULT_MULTI_VALUE_AXIS_PARAMS=P2,Q.DEFAULT_OVERLAPPING_VALUE_AXES_PARAMS=R2,Q.DEFAULT_PIE_EVENT_TEXTS_PARAMS=Z2,Q.DEFAULT_PIE_LABELS_PARAMS=K2,Q.DEFAULT_PIE_PARAMS=j2,Q.DEFAULT_SCALING_AREA_PARAMS=Uh,Q.DEFAULT_SERIES_LEGEND_PARAMS=Q2,Q.DEFAULT_VALUE_AXIS_PARAMS=Au,Q.DEFAULT_VALUE_STACK_AXIS_PARAMS=Oh,Q.Dots=VC,Q.GridLegend=ZC,Q.GroupAux=fR,Q.GroupAxis=QC,Q.Lines=wC,Q.MultiBarStack=pR,Q.MultiBars=dR,Q.MultiBarsTriangle=gR,Q.MultiDots=yR,Q.MultiGridLegend=hR,Q.MultiGroupAxis=bR,Q.MultiLines=mR,Q.MultiValueAxis=vR,Q.OverlappingValueAxes=$R,Q.Pie=OR,Q.PieEventTexts=UR,Q.PieLabels=qR,Q.ScalingArea=rR,Q.SeriesLegend=XR,Q.TOOLTIP_PARAMS=q2,Q.Tooltip=PR,Q.ValueAxis=tR,Q.ValueStackAxis=eR,Object.defineProperty(Q,Symbol.toStringTag,{value:"Module"})});
|