@orbcharts/plugins-basic 3.0.0-alpha.42 → 3.0.0-alpha.44

Sign up to get free protection for your applications and to get access to all the features.
Files changed (39) hide show
  1. package/dist/orbcharts-plugins-basic.es.js +6647 -6556
  2. package/dist/orbcharts-plugins-basic.umd.js +8 -8
  3. package/dist/src/base/BaseBarStack.d.ts +1 -1
  4. package/dist/src/base/BaseBars.d.ts +1 -1
  5. package/dist/src/base/BaseBarsTriangle.d.ts +1 -1
  6. package/dist/src/base/BaseDots.d.ts +1 -1
  7. package/dist/src/base/BaseLegend.d.ts +1 -0
  8. package/dist/src/base/BaseLineAreas.d.ts +1 -1
  9. package/dist/src/base/BaseLines.d.ts +1 -1
  10. package/dist/src/multiGrid/defaults.d.ts +2 -1
  11. package/dist/src/multiGrid/index.d.ts +1 -0
  12. package/dist/src/multiGrid/plugins/MultiLineAreas.d.ts +1 -0
  13. package/dist/src/multiGrid/types.d.ts +4 -4
  14. package/package.json +2 -2
  15. package/src/base/BaseBarStack.ts +4 -2
  16. package/src/base/BaseBars.ts +4 -2
  17. package/src/base/BaseBarsTriangle.ts +4 -2
  18. package/src/base/BaseDots.ts +6 -4
  19. package/src/base/BaseGroupAxis.ts +3 -3
  20. package/src/base/BaseLegend.ts +18 -13
  21. package/src/base/BaseLineAreas.ts +4 -7
  22. package/src/base/BaseLines.ts +4 -7
  23. package/src/base/BaseValueAxis.ts +3 -3
  24. package/src/grid/plugins/GridLegend.ts +2 -1
  25. package/src/grid/plugins/GroupAux.ts +7 -4
  26. package/src/multiGrid/defaults.ts +7 -0
  27. package/src/multiGrid/index.ts +1 -0
  28. package/src/multiGrid/multiGridObservables.ts +14 -3
  29. package/src/multiGrid/plugins/MultiGridLegend.ts +2 -1
  30. package/src/multiGrid/plugins/MultiLineAreas.ts +59 -0
  31. package/src/multiGrid/plugins/OverlappingValueAxes.ts +0 -1
  32. package/src/multiGrid/types.ts +5 -5
  33. package/src/noneData/plugins/Tooltip.ts +9 -3
  34. package/src/series/plugins/Bubbles.ts +4 -2
  35. package/src/series/plugins/Pie.ts +3 -1
  36. package/src/series/plugins/PieLabels.ts +4 -1
  37. package/src/series/plugins/SeriesLegend.ts +2 -1
  38. package/src/tree/plugins/TreeLegend.ts +2 -1
  39. package/src/tree/plugins/TreeMap.ts +11 -6
@@ -1,15 +1,15 @@
1
- (function(Z,cr){typeof exports=="object"&&typeof module<"u"?cr(exports):typeof define=="function"&&define.amd?define(["exports"],cr):(Z=typeof globalThis<"u"?globalThis:Z||self,cr(Z["orbcharts-plugins-basic"]={}))})(this,function(Z){"use strict";const cr={lineCurve:"curveLinear",lineWidth:2},Uh={lineCurve:"curveLinear",linearGradientOpacity:[1,0]},Bh={radius:4,fillColorType:"white",strokeColorType:"series",strokeWidth:2,onlyShowHighlighted:!1},Yh={showLine:!0,showLabel:!0,lineDashArray:"3, 3",lineColorType:"primary",labelColorType:"primary",labelTextColorType:"background",labelTextFormat:t=>t,labelPadding:24},Fo={barWidth:0,barPadding:1,barGroupPadding:40,barRadius:!1},xx={...Fo},Wh={barWidth:0,barGroupPadding:10,barRadius:!1},Hh={barWidth:0,barPadding:1,barGroupPadding:20,linearGradientOpacity:[1,0]},qh={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"},Lu={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"},Xh=Lu,jh={},Vh={position:"right",justify:"end",padding:28,backgroundFill:"none",backgroundStroke:"none",gap:10,listRectWidth:14,listRectHeight:14,listRectRadius:0,textColorType:"primary"};var Eu=function(t,e){return Eu=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])},Eu(t,e)};function lr(t,e){if(typeof e!="function"&&e!==null)throw new TypeError("Class extends value "+String(e)+" is not a constructor or null");Eu(t,e);function n(){this.constructor=t}t.prototype=e===null?Object.create(e):(n.prototype=e.prototype,new n)}function _x(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 Zh(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 fr(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 hr(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 ui(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 dr(t){return this instanceof dr?(this.v=t,this):new dr(t)}function wx(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 dr?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 $x(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 fr=="function"?fr(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 ku(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 Cu=ku(function(t){return function(n){t(this),this.message=n?n.length+` errors occurred during unsubscription:
1
+ (function(Z,cr){typeof exports=="object"&&typeof module<"u"?cr(exports):typeof define=="function"&&define.amd?define(["exports"],cr):(Z=typeof globalThis<"u"?globalThis:Z||self,cr(Z["orbcharts-plugins-basic"]={}))})(this,function(Z){"use strict";const cr={lineCurve:"curveLinear",lineWidth:2},Hh={lineCurve:"curveLinear",linearGradientOpacity:[1,0]},Wh={radius:4,fillColorType:"white",strokeColorType:"series",strokeWidth:2,onlyShowHighlighted:!1},qh={showLine:!0,showLabel:!0,lineDashArray:"3, 3",lineColorType:"primary",labelColorType:"primary",labelTextColorType:"background",labelTextFormat:t=>t,labelPadding:24},Fo={barWidth:0,barPadding:1,barGroupPadding:40,barRadius:!1},Sx={...Fo},jh={barWidth:0,barGroupPadding:10,barRadius:!1},Xh={barWidth:0,barPadding:1,barGroupPadding:20,linearGradientOpacity:[1,0]},Vh={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"},Eu={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"},Zh=Eu,Kh={},Qh={position:"right",justify:"end",padding:28,backgroundFill:"none",backgroundStroke:"none",gap:10,listRectWidth:14,listRectHeight:14,listRectRadius:0,textColorType:"primary"};var ku=function(t,e){return ku=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])},ku(t,e)};function lr(t,e){if(typeof e!="function"&&e!==null)throw new TypeError("Class extends value "+String(e)+" is not a constructor or null");ku(t,e);function n(){this.constructor=t}t.prototype=e===null?Object.create(e):(n.prototype=e.prototype,new n)}function Ax(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 Jh(t,e){var n={label:0,sent:function(){if(o[0]&1)throw o[1];return o[1]},trys:[],ops:[]},r,i,o,a=Object.create((typeof Iterator=="function"?Iterator:Object).prototype);return a.next=s(0),a.throw=s(1),a.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 fr(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 hr(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 ci(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 dr(t){return this instanceof dr?(this.v=t,this):new dr(t)}function Mx(t,e,n){if(!Symbol.asyncIterator)throw new TypeError("Symbol.asyncIterator is not defined.");var r=n.apply(t,e||[]),i,o=[];return i=Object.create((typeof AsyncIterator=="function"?AsyncIterator:Object).prototype),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 dr?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 Tx(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 fr=="function"?fr(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 Cu(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 Iu=Cu(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 Iu(t,e){if(t){var n=t.indexOf(e);0<=n&&t.splice(n,1)}}var Go=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=fr(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 Cu?g.errors:[g]}var h=this._finalizers;if(h){this._finalizers=null;try{for(var f=fr(h),d=f.next();!d.done;d=f.next()){var p=d.value;try{Jh(p)}catch(g){o=o??[],g instanceof Cu?o=ui(ui([],hr(o)),hr(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 Cu(o)}},t.prototype.add=function(e){var n;if(e&&e!==this)if(this.closed)Jh(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)&&Iu(n,e)},t.prototype.remove=function(e){var n=this._finalizers;n&&Iu(n,e),e instanceof t&&e._removeParent(this)},t.EMPTY=function(){var e=new t;return e.closed=!0,e}(),t}(),Kh=Go.EMPTY;function Qh(t){return t instanceof Go||t&&"closed"in t&&mt(t.remove)&&mt(t.add)&&mt(t.unsubscribe)}function Jh(t){mt(t)?t():t.unsubscribe()}var td={onUnhandledError:null,onStoppedNotification:null,Promise:void 0,useDeprecatedSynchronousErrorHandling:!1,useDeprecatedNextContext:!1},ed={setTimeout:function(t,e){for(var n=[],r=2;r<arguments.length;r++)n[r-2]=arguments[r];return setTimeout.apply(void 0,ui([t,e],hr(n)))},clearTimeout:function(t){var e=ed.delegate;return((e==null?void 0:e.clearTimeout)||clearTimeout)(t)},delegate:void 0};function nd(t){ed.setTimeout(function(){throw t})}function Ru(){}function zo(t){t()}var Nu=function(t){lr(e,t);function e(n){var r=t.call(this)||this;return r.isStopped=!1,n?(r.destination=n,Qh(n)&&n.add(r)):r.destination=Tx,r}return e.create=function(n,r,i){return new ci(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}(Go),Sx=Function.prototype.bind;function Fu(t,e){return Sx.call(t,e)}var Ax=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){Oo(r)}},t.prototype.error=function(e){var n=this.partialObserver;if(n.error)try{n.error(e)}catch(r){Oo(r)}else Oo(e)},t.prototype.complete=function(){var e=this.partialObserver;if(e.complete)try{e.complete()}catch(n){Oo(n)}},t}(),ci=function(t){lr(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&&td.useDeprecatedNextContext?(s=Object.create(n),s.unsubscribe=function(){return o.unsubscribe()},a={next:n.next&&Fu(n.next,s),error:n.error&&Fu(n.error,s),complete:n.complete&&Fu(n.complete,s)}):a=n}return o.destination=new Ax(a),o}return e}(Nu);function Oo(t){nd(t)}function Mx(t){throw t}var Tx={closed:!0,next:Ru,error:Mx,complete:Ru},Gu=function(){return typeof Symbol=="function"&&Symbol.observable||"@@observable"}();function pr(t){return t}function Px(t){return t.length===0?pr: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=Lx(e)?e:new ci(e,n,r);return zo(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=rd(n),new n(function(i,o){var a=new ci({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[Gu]=function(){return this},t.prototype.pipe=function(){for(var e=[],n=0;n<arguments.length;n++)e[n]=arguments[n];return Px(e)(this)},t.prototype.toPromise=function(e){var n=this;return e=rd(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 rd(t){var e;return(e=t??td.Promise)!==null&&e!==void 0?e:Promise}function Dx(t){return t&&mt(t.next)&&mt(t.error)&&mt(t.complete)}function Lx(t){return t&&t instanceof Nu||Dx(t)&&Qh(t)}function Ex(t){return mt(t==null?void 0:t.lift)}function le(t){return function(e){if(Ex(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 kx(t,e,n,r,i)}var kx=function(t){lr(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}(Nu),Cx=ku(function(t){return function(){t(this),this.name="ObjectUnsubscribedError",this.message="object unsubscribed"}}),rt=function(t){lr(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 id(this,this);return r.operator=n,r},e.prototype._throwIfClosed=function(){if(this.closed)throw new Cx},e.prototype.next=function(n){var r=this;zo(function(){var i,o;if(r._throwIfClosed(),!r.isStopped){r.currentObservers||(r.currentObservers=Array.from(r.observers));try{for(var a=fr(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;zo(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;zo(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?Kh:(this.currentObservers=null,s.push(n),new Go(function(){r.currentObservers=null,Iu(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 id(n,r)},e}(lt),id=function(t){lr(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:Kh},e}(rt),od={now:function(){return(od.delegate||Date).now()},delegate:void 0},Ix=function(t){lr(e,t);function e(n,r,i){n===void 0&&(n=1/0),r===void 0&&(r=1/0),i===void 0&&(i=od);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}(rt),ad=new lt(function(t){return t.complete()});function Rx(t){return t&&mt(t.schedule)}function zu(t){return t[t.length-1]}function Nx(t){return mt(zu(t))?t.pop():void 0}function Ou(t){return Rx(zu(t))?t.pop():void 0}function Fx(t,e){return typeof zu(t)=="number"?t.pop():e}var Uu=function(t){return t&&typeof t.length=="number"&&typeof t!="function"};function sd(t){return mt(t==null?void 0:t.then)}function ud(t){return mt(t[Gu])}function cd(t){return Symbol.asyncIterator&&mt(t==null?void 0:t[Symbol.asyncIterator])}function ld(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 Gx(){return typeof Symbol!="function"||!Symbol.iterator?"@@iterator":Symbol.iterator}var fd=Gx();function hd(t){return mt(t==null?void 0:t[fd])}function dd(t){return wx(this,arguments,function(){var n,r,i,o;return Zh(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,dr(n.read())];case 3:return r=a.sent(),i=r.value,o=r.done,o?[4,dr(void 0)]:[3,5];case 4:return[2,a.sent()];case 5:return[4,dr(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 pd(t){return mt(t==null?void 0:t.getReader)}function fe(t){if(t instanceof lt)return t;if(t!=null){if(ud(t))return zx(t);if(Uu(t))return Ox(t);if(sd(t))return Ux(t);if(cd(t))return gd(t);if(hd(t))return Bx(t);if(pd(t))return Yx(t)}throw ld(t)}function zx(t){return new lt(function(e){var n=t[Gu]();if(mt(n.subscribe))return n.subscribe(e);throw new TypeError("Provided object does not correctly implement Symbol.observable")})}function Ox(t){return new lt(function(e){for(var n=0;n<t.length&&!e.closed;n++)e.next(t[n]);e.complete()})}function Ux(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,nd)})}function Bx(t){return new lt(function(e){var n,r;try{for(var i=fr(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 gd(t){return new lt(function(e){Wx(t,e).catch(function(n){return e.error(n)})})}function Yx(t){return gd(dd(t))}function Wx(t,e){var n,r,i,o;return _x(this,void 0,void 0,function(){var a,s;return Zh(this,function(u){switch(u.label){case 0:u.trys.push([0,5,6,11]),n=$x(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 md(t,e){return e===void 0&&(e=0),le(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 yd(t,e){return e===void 0&&(e=0),le(function(n,r){r.add(t.schedule(function(){return n.subscribe(r)},e))})}function Hx(t,e){return fe(t).pipe(yd(e),md(e))}function qx(t,e){return fe(t).pipe(yd(e),md(e))}function Xx(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 jx(t,e){return new lt(function(n){var r;return un(n,e,function(){r=t[fd](),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 bd(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 Vx(t,e){return bd(dd(t),e)}function Zx(t,e){if(t!=null){if(ud(t))return Hx(t,e);if(Uu(t))return Xx(t,e);if(sd(t))return qx(t,e);if(cd(t))return bd(t,e);if(hd(t))return jx(t,e);if(pd(t))return Vx(t,e)}throw ld(t)}function Uo(t,e){return e?Zx(t,e):fe(t)}function li(){for(var t=[],e=0;e<arguments.length;e++)t[e]=arguments[e];var n=Ou(t);return Uo(t,n)}var vd=ku(function(t){return function(){t(this),this.name="EmptyError",this.message="no elements in sequence"}});function U(t,e){return le(function(n,r){var i=0;n.subscribe(oe(r,function(o){r.next(t.call(e,o,i++))}))})}var Kx=Array.isArray;function Qx(t,e){return Kx(e)?t.apply(void 0,ui([],hr(e))):t(e)}function xd(t){return U(function(e){return Qx(t,e)})}var Jx=Array.isArray,t_=Object.getPrototypeOf,e_=Object.prototype,n_=Object.keys;function r_(t){if(t.length===1){var e=t[0];if(Jx(e))return{args:e,keys:null};if(i_(e)){var n=n_(e);return{args:n.map(function(r){return e[r]}),keys:n}}}return{args:t,keys:null}}function i_(t){return t&&typeof t=="object"&&t_(t)===e_}function o_(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=Ou(t),r=Nx(t),i=r_(t),o=i.args,a=i.keys;if(o.length===0)return Uo([],n);var s=new lt(a_(o,n,a?function(u){return o_(a,u)}:pr));return r?s.pipe(xd(r)):s}function a_(t,e,n){return n===void 0&&(n=pr),function(r){_d(e,function(){for(var i=t.length,o=new Array(i),a=i,s=i,u=function(l){_d(e,function(){var h=Uo(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 _d(t,e,n){t?un(n,t,e):e()}function s_(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;fe(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 v=u.shift();a||p(v)};u.length&&c<r;)y();f()}catch(v){e.error(v)}}))};return t.subscribe(oe(e,d,function(){h=!0,f()})),function(){}}function Bu(t,e,n){return n===void 0&&(n=1/0),mt(e)?Bu(function(r,i){return U(function(o,a){return e(r,o,i,a)})(fe(t(r,i)))},n):(typeof e=="number"&&(n=e),le(function(r,i){return s_(r,i,t,n)}))}function u_(t){return t===void 0&&(t=1/0),Bu(pr,t)}function c_(t){return new lt(function(e){fe(t()).subscribe(e)})}var l_=["addListener","removeListener"],f_=["addEventListener","removeEventListener"],h_=["on","off"];function Yu(t,e,n,r){if(mt(n)&&(r=n,n=void 0),r)return Yu(t,e,n).pipe(xd(r));var i=hr(g_(t)?f_.map(function(s){return function(u){return t[s](e,u,n)}}):d_(t)?l_.map(wd(t,e)):p_(t)?h_.map(wd(t,e)):[],2),o=i[0],a=i[1];if(!o&&Uu(t))return Bu(function(s){return Yu(s,e,n)})(fe(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 wd(t,e){return function(n){return function(r){return t[n](e,r)}}}function d_(t){return mt(t.addListener)&&mt(t.removeListener)}function p_(t){return mt(t.on)&&mt(t.off)}function g_(t){return mt(t.addEventListener)&&mt(t.removeEventListener)}function $d(t,e,n){return c_(function(){return t()?e:n})}function Wu(){for(var t=[],e=0;e<arguments.length;e++)t[e]=arguments[e];var n=Ou(t),r=Fx(t,1/0),i=t;return i.length?i.length===1?fe(i[0]):u_(r)(Uo(i,n)):ad}function fi(t,e){return le(function(n,r){var i=0;n.subscribe(oe(r,function(o){return t.call(e,o,i++)&&r.next(o)}))})}function m_(t){return le(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 y_(t){return t<=0?function(){return ad}:le(function(e,n){var r=0;e.subscribe(oe(n,function(i){++r<=t&&(n.next(i),t<=r&&n.complete())}))})}function ft(t,e){return e===void 0&&(e=pr),t=t??b_,le(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 b_(t,e){return t===e}function v_(t){return t===void 0&&(t=x_),le(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 x_(){return new vd}function hi(t,e){var n=arguments.length>=2;return function(r){return r.pipe(pr,y_(1),n?m_(e):v_(function(){return new vd}))}}function __(t){t===void 0&&(t={});var e=t.connector,n=e===void 0?function(){return new rt}: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},v=function(){var x=l;y(),x==null||x.unsubscribe()};return le(function(x,b){d++,!g&&!p&&m();var w=f=f??n();b.add(function(){d--,d===0&&!g&&!p&&(h=Hu(v,u))}),w.subscribe(b),!l&&d>0&&(l=new ci({next:function($){return w.next($)},error:function($){g=!0,m(),h=Hu(y,i,$),w.error($)},complete:function(){p=!0,m(),h=Hu(y,a),w.complete()}}),fe(x).subscribe(l))})(c)}}function Hu(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 ci({next:function(){i.unsubscribe(),t()}});return fe(e.apply(void 0,ui([],hr(n)))).subscribe(i)}}function Ye(t,e,n){var r,i=!1;return r=t,__({connector:function(){return new Ix(r,e,n)},resetOnError:!0,resetOnComplete:!1,resetOnRefCountZero:i})}function B(t,e){return le(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++;fe(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 F(t){return le(function(e,n){fe(t).subscribe(oe(n,function(){return n.complete()},Ru)),!n.closed&&e.subscribe(n)})}const gr={position:"left",scaleDomain:[0,"auto"],scaleRange:[0,.9],label:""};function Bo(t,e){return t==null||e==null?NaN:t<e?-1:t>e?1:t>=e?0:NaN}function w_(t,e){return t==null||e==null?NaN:e<t?-1:e>t?1:e>=t?0:NaN}function Sd(t){let e,n,r;t.length!==2?(e=Bo,n=(s,u)=>Bo(t(s),u),r=(s,u)=>t(s)-u):(e=t===Bo||t===w_?t:$_,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 $_(){return 0}function S_(t){return t===null?NaN:+t}const A_=Sd(Bo),Ad=A_.right;Sd(S_).center;class Md extends Map{constructor(e,n=P_){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(Td(this,e))}has(e){return super.has(Td(this,e))}set(e,n){return super.set(M_(this,e),n)}delete(e){return super.delete(T_(this,e))}}function Td({_intern:t,_key:e},n){const r=e(n);return t.has(r)?t.get(r):n}function M_({_intern:t,_key:e},n){const r=e(n);return t.has(r)?t.get(r):(t.set(r,n),n)}function T_({_intern:t,_key:e},n){const r=e(n);return t.has(r)&&(n=t.get(r),t.delete(r)),n}function P_(t){return t!==null&&typeof t=="object"?t.valueOf():t}const D_=Math.sqrt(50),L_=Math.sqrt(10),E_=Math.sqrt(2);function Yo(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>=D_?10:o>=L_?5:o>=E_?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?Yo(t,e,n*2):[s,u,c]}function k_(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?Yo(e,t,n):Yo(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 qu(t,e,n){return e=+e,t=+t,n=+n,Yo(t,e,n)[2]}function C_(t,e,n){e=+e,t=+t,n=+n;const r=e<t,i=r?qu(e,t,n):qu(t,e,n);return(r?-1:1)*(i<0?1/-i:i)}function I_(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 R_={value:()=>{}};function Pd(){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 Wo(n)}function Wo(t){this._=t}function N_(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}})}Wo.prototype=Pd.prototype={constructor:Wo,on:function(t,e){var n=this._,r=N_(t+"",n),i,o=-1,a=r.length;if(arguments.length<2){for(;++o<a;)if((i=(t=r[o]).type)&&(i=F_(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]=Dd(n[i],t.name,e);else if(e==null)for(i in n)n[i]=Dd(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 Wo(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 F_(t,e){for(var n=0,r=t.length,i;n<r;++n)if((i=t[n]).name===e)return i.value}function Dd(t,e,n){for(var r=0,i=t.length;r<i;++r)if(t[r].name===e){t[r]=R_,t=t.slice(0,r).concat(t.slice(r+1));break}return n!=null&&t.push({name:e,value:n}),t}var Xu="http://www.w3.org/1999/xhtml";const Ld={svg:"http://www.w3.org/2000/svg",xhtml:Xu,xlink:"http://www.w3.org/1999/xlink",xml:"http://www.w3.org/XML/1998/namespace",xmlns:"http://www.w3.org/2000/xmlns/"};function Ho(t){var e=t+="",n=e.indexOf(":");return n>=0&&(e=t.slice(0,n))!=="xmlns"&&(t=t.slice(n+1)),Ld.hasOwnProperty(e)?{space:Ld[e],local:t}:t}function G_(t){return function(){var e=this.ownerDocument,n=this.namespaceURI;return n===Xu&&e.documentElement.namespaceURI===Xu?e.createElement(t):e.createElementNS(n,t)}}function z_(t){return function(){return this.ownerDocument.createElementNS(t.space,t.local)}}function Ed(t){var e=Ho(t);return(e.local?z_:G_)(e)}function O_(){}function ju(t){return t==null?O_:function(){return this.querySelector(t)}}function U_(t){typeof t!="function"&&(t=ju(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 ve(r,this._parents)}function B_(t){return t==null?[]:Array.isArray(t)?t:Array.from(t)}function Y_(){return[]}function kd(t){return t==null?Y_:function(){return this.querySelectorAll(t)}}function W_(t){return function(){return B_(t.apply(this,arguments))}}function H_(t){typeof t=="function"?t=W_(t):t=kd(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 ve(r,i)}function Cd(t){return function(){return this.matches(t)}}function Id(t){return function(e){return e.matches(t)}}var q_=Array.prototype.find;function X_(t){return function(){return q_.call(this.children,t)}}function j_(){return this.firstElementChild}function V_(t){return this.select(t==null?j_:X_(typeof t=="function"?t:Id(t)))}var Z_=Array.prototype.filter;function K_(){return Array.from(this.children)}function Q_(t){return function(){return Z_.call(this.children,t)}}function J_(t){return this.selectAll(t==null?K_:Q_(typeof t=="function"?t:Id(t)))}function tw(t){typeof t!="function"&&(t=Cd(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 ve(r,this._parents)}function Rd(t){return new Array(t.length)}function ew(){return new ve(this._enter||this._groups.map(Rd),this._parents)}function qo(t,e){this.ownerDocument=t.ownerDocument,this.namespaceURI=t.namespaceURI,this._next=null,this._parent=t,this.__data__=e}qo.prototype={constructor:qo,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 nw(t){return function(){return t}}function rw(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 qo(t,o[a]);for(;a<u;++a)(s=e[a])&&(i[a]=s)}function iw(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 qo(t,o[s]);for(s=0;s<l;++s)(u=e[s])&&c.get(f[s])===u&&(i[s]=u)}function ow(t){return t.__data__}function aw(t,e){if(!arguments.length)return Array.from(this,ow);var n=e?iw:rw,r=this._parents,i=this._groups;typeof t!="function"&&(t=nw(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=sw(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 v=0,x=0,b,w;v<p;++v)if(b=g[v]){for(v>=x&&(x=v+1);!(w=m[x])&&++x<p;);b._next=w||null}}return a=new ve(a,r),a._enter=s,a._exit=u,a}function sw(t){return typeof t=="object"&&"length"in t?t:Array.from(t)}function uw(){return new ve(this._exit||this._groups.map(Rd),this._parents)}function cw(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 lw(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 ve(s,this._parents)}function fw(){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 hw(t){t||(t=dw);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 ve(i,this._parents).order()}function dw(t,e){return t<e?-1:t>e?1:t>=e?0:NaN}function pw(){var t=arguments[0];return arguments[0]=this,t.apply(null,arguments),this}function gw(){return Array.from(this)}function mw(){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 yw(){let t=0;for(const e of this)++t;return t}function bw(){return!this.node()}function vw(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 xw(t){return function(){this.removeAttribute(t)}}function _w(t){return function(){this.removeAttributeNS(t.space,t.local)}}function ww(t,e){return function(){this.setAttribute(t,e)}}function $w(t,e){return function(){this.setAttributeNS(t.space,t.local,e)}}function Sw(t,e){return function(){var n=e.apply(this,arguments);n==null?this.removeAttribute(t):this.setAttribute(t,n)}}function Aw(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 Mw(t,e){var n=Ho(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?_w:xw:typeof e=="function"?n.local?Aw:Sw:n.local?$w:ww)(n,e))}function Nd(t){return t.ownerDocument&&t.ownerDocument.defaultView||t.document&&t||t.defaultView}function Tw(t){return function(){this.style.removeProperty(t)}}function Pw(t,e,n){return function(){this.style.setProperty(t,e,n)}}function Dw(t,e,n){return function(){var r=e.apply(this,arguments);r==null?this.style.removeProperty(t):this.style.setProperty(t,r,n)}}function Lw(t,e,n){return arguments.length>1?this.each((e==null?Tw:typeof e=="function"?Dw:Pw)(t,e,n??"")):mr(this.node(),t)}function mr(t,e){return t.style.getPropertyValue(e)||Nd(t).getComputedStyle(t,null).getPropertyValue(e)}function Ew(t){return function(){delete this[t]}}function kw(t,e){return function(){this[t]=e}}function Cw(t,e){return function(){var n=e.apply(this,arguments);n==null?delete this[t]:this[t]=n}}function Iw(t,e){return arguments.length>1?this.each((e==null?Ew:typeof e=="function"?Cw:kw)(t,e)):this.node()[t]}function Fd(t){return t.trim().split(/^|\s+/)}function Vu(t){return t.classList||new Gd(t)}function Gd(t){this._node=t,this._names=Fd(t.getAttribute("class")||"")}Gd.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 zd(t,e){for(var n=Vu(t),r=-1,i=e.length;++r<i;)n.add(e[r])}function Od(t,e){for(var n=Vu(t),r=-1,i=e.length;++r<i;)n.remove(e[r])}function Rw(t){return function(){zd(this,t)}}function Nw(t){return function(){Od(this,t)}}function Fw(t,e){return function(){(e.apply(this,arguments)?zd:Od)(this,t)}}function Gw(t,e){var n=Fd(t+"");if(arguments.length<2){for(var r=Vu(this.node()),i=-1,o=n.length;++i<o;)if(!r.contains(n[i]))return!1;return!0}return this.each((typeof e=="function"?Fw:e?Rw:Nw)(n,e))}function zw(){this.textContent=""}function Ow(t){return function(){this.textContent=t}}function Uw(t){return function(){var e=t.apply(this,arguments);this.textContent=e??""}}function Bw(t){return arguments.length?this.each(t==null?zw:(typeof t=="function"?Uw:Ow)(t)):this.node().textContent}function Yw(){this.innerHTML=""}function Ww(t){return function(){this.innerHTML=t}}function Hw(t){return function(){var e=t.apply(this,arguments);this.innerHTML=e??""}}function qw(t){return arguments.length?this.each(t==null?Yw:(typeof t=="function"?Hw:Ww)(t)):this.node().innerHTML}function Xw(){this.nextSibling&&this.parentNode.appendChild(this)}function jw(){return this.each(Xw)}function Vw(){this.previousSibling&&this.parentNode.insertBefore(this,this.parentNode.firstChild)}function Zw(){return this.each(Vw)}function Kw(t){var e=typeof t=="function"?t:Ed(t);return this.select(function(){return this.appendChild(e.apply(this,arguments))})}function Qw(){return null}function Jw(t,e){var n=typeof t=="function"?t:Ed(t),r=e==null?Qw:typeof e=="function"?e:ju(e);return this.select(function(){return this.insertBefore(n.apply(this,arguments),r.apply(this,arguments)||null)})}function t$(){var t=this.parentNode;t&&t.removeChild(this)}function e$(){return this.each(t$)}function n$(){var t=this.cloneNode(!1),e=this.parentNode;return e?e.insertBefore(t,this.nextSibling):t}function r$(){var t=this.cloneNode(!0),e=this.parentNode;return e?e.insertBefore(t,this.nextSibling):t}function i$(t){return this.select(t?r$:n$)}function o$(t){return arguments.length?this.property("__data__",t):this.node().__data__}function a$(t){return function(e){t.call(this,e,this.__data__)}}function s$(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 u$(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 c$(t,e,n){return function(){var r=this.__on,i,o=a$(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 l$(t,e,n){var r=s$(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?c$:u$,i=0;i<o;++i)this.each(s(r[i],e,n));return this}function Ud(t,e,n){var r=Nd(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 f$(t,e){return function(){return Ud(this,t,e)}}function h$(t,e){return function(){return Ud(this,t,e.apply(this,arguments))}}function d$(t,e){return this.each((typeof e=="function"?h$:f$)(t,e))}function*p$(){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 g$=[null];function ve(t,e){this._groups=t,this._parents=e}function di(){return new ve([[document.documentElement]],g$)}function m$(){return this}ve.prototype=di.prototype={constructor:ve,select:U_,selectAll:H_,selectChild:V_,selectChildren:J_,filter:tw,data:aw,enter:ew,exit:uw,join:cw,merge:lw,selection:m$,order:fw,sort:hw,call:pw,nodes:gw,node:mw,size:yw,empty:bw,each:vw,attr:Mw,style:Lw,property:Iw,classed:Gw,text:Bw,html:qw,raise:jw,lower:Zw,append:Kw,insert:Jw,remove:e$,clone:i$,datum:o$,on:l$,dispatch:d$,[Symbol.iterator]:p$};function Zu(t,e,n){t.prototype=e.prototype=n,n.constructor=t}function Bd(t,e){var n=Object.create(t.prototype);for(var r in e)n[r]=e[r];return n}function pi(){}var gi=.7,Xo=1/gi,yr="\\s*([+-]?\\d+)\\s*",mi="\\s*([+-]?(?:\\d*\\.)?\\d+(?:[eE][+-]?\\d+)?)\\s*",Le="\\s*([+-]?(?:\\d*\\.)?\\d+(?:[eE][+-]?\\d+)?)%\\s*",y$=/^#([0-9a-f]{3,8})$/,b$=new RegExp(`^rgb\\(${yr},${yr},${yr}\\)$`),v$=new RegExp(`^rgb\\(${Le},${Le},${Le}\\)$`),x$=new RegExp(`^rgba\\(${yr},${yr},${yr},${mi}\\)$`),_$=new RegExp(`^rgba\\(${Le},${Le},${Le},${mi}\\)$`),w$=new RegExp(`^hsl\\(${mi},${Le},${Le}\\)$`),$$=new RegExp(`^hsla\\(${mi},${Le},${Le},${mi}\\)$`),Yd={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};Zu(pi,Mn,{copy(t){return Object.assign(new this.constructor,this,t)},displayable(){return this.rgb().displayable()},hex:Wd,formatHex:Wd,formatHex8:S$,formatHsl:A$,formatRgb:Hd,toString:Hd});function Wd(){return this.rgb().formatHex()}function S$(){return this.rgb().formatHex8()}function A$(){return Zd(this).formatHsl()}function Hd(){return this.rgb().formatRgb()}function Mn(t){var e,n;return t=(t+"").trim().toLowerCase(),(e=y$.exec(t))?(n=e[1].length,e=parseInt(e[1],16),n===6?qd(e):n===3?new ee(e>>8&15|e>>4&240,e>>4&15|e&240,(e&15)<<4|e&15,1):n===8?jo(e>>24&255,e>>16&255,e>>8&255,(e&255)/255):n===4?jo(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=b$.exec(t))?new ee(e[1],e[2],e[3],1):(e=v$.exec(t))?new ee(e[1]*255/100,e[2]*255/100,e[3]*255/100,1):(e=x$.exec(t))?jo(e[1],e[2],e[3],e[4]):(e=_$.exec(t))?jo(e[1]*255/100,e[2]*255/100,e[3]*255/100,e[4]):(e=w$.exec(t))?Vd(e[1],e[2]/100,e[3]/100,1):(e=$$.exec(t))?Vd(e[1],e[2]/100,e[3]/100,e[4]):Yd.hasOwnProperty(t)?qd(Yd[t]):t==="transparent"?new ee(NaN,NaN,NaN,0):null}function qd(t){return new ee(t>>16&255,t>>8&255,t&255,1)}function jo(t,e,n,r){return r<=0&&(t=e=n=NaN),new ee(t,e,n,r)}function M$(t){return t instanceof pi||(t=Mn(t)),t?(t=t.rgb(),new ee(t.r,t.g,t.b,t.opacity)):new ee}function Ku(t,e,n,r){return arguments.length===1?M$(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}Zu(ee,Ku,Bd(pi,{brighter(t){return t=t==null?Xo:Math.pow(Xo,t),new ee(this.r*t,this.g*t,this.b*t,this.opacity)},darker(t){return t=t==null?gi:Math.pow(gi,t),new ee(this.r*t,this.g*t,this.b*t,this.opacity)},rgb(){return this},clamp(){return new ee(Tn(this.r),Tn(this.g),Tn(this.b),Vo(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:Xd,formatHex:Xd,formatHex8:T$,formatRgb:jd,toString:jd}));function Xd(){return`#${Pn(this.r)}${Pn(this.g)}${Pn(this.b)}`}function T$(){return`#${Pn(this.r)}${Pn(this.g)}${Pn(this.b)}${Pn((isNaN(this.opacity)?1:this.opacity)*255)}`}function jd(){const t=Vo(this.opacity);return`${t===1?"rgb(":"rgba("}${Tn(this.r)}, ${Tn(this.g)}, ${Tn(this.b)}${t===1?")":`, ${t})`}`}function Vo(t){return isNaN(t)?1:Math.max(0,Math.min(1,t))}function Tn(t){return Math.max(0,Math.min(255,Math.round(t)||0))}function Pn(t){return t=Tn(t),(t<16?"0":"")+t.toString(16)}function Vd(t,e,n,r){return r<=0?t=e=n=NaN:n<=0||n>=1?t=e=NaN:e<=0&&(t=NaN),new xe(t,e,n,r)}function Zd(t){if(t instanceof xe)return new xe(t.h,t.s,t.l,t.opacity);if(t instanceof pi||(t=Mn(t)),!t)return new xe;if(t instanceof xe)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 xe(a,s,u,t.opacity)}function P$(t,e,n,r){return arguments.length===1?Zd(t):new xe(t,e,n,r??1)}function xe(t,e,n,r){this.h=+t,this.s=+e,this.l=+n,this.opacity=+r}Zu(xe,P$,Bd(pi,{brighter(t){return t=t==null?Xo:Math.pow(Xo,t),new xe(this.h,this.s,this.l*t,this.opacity)},darker(t){return t=t==null?gi:Math.pow(gi,t),new xe(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(Qu(t>=240?t-240:t+120,i,r),Qu(t,i,r),Qu(t<120?t+240:t-120,i,r),this.opacity)},clamp(){return new xe(Kd(this.h),Zo(this.s),Zo(this.l),Vo(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=Vo(this.opacity);return`${t===1?"hsl(":"hsla("}${Kd(this.h)}, ${Zo(this.s)*100}%, ${Zo(this.l)*100}%${t===1?")":`, ${t})`}`}}));function Kd(t){return t=(t||0)%360,t<0?t+360:t}function Zo(t){return Math.max(0,Math.min(1,t||0))}function Qu(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 D$(t,e){return function(n){return t+n*e}}function L$(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 E$(t){return(t=+t)==1?Qd:function(e,n){return n-e?L$(e,n,t):Ju(isNaN(e)?n:e)}}function Qd(t,e){var n=e-t;return n?D$(t,n):Ju(isNaN(t)?e:t)}const Ko=function t(e){var n=E$(e);function r(i,o){var a=n((i=Ku(i)).r,(o=Ku(o)).r),s=n(i.g,o.g),u=n(i.b,o.b),c=Qd(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 k$(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 C$(t){return ArrayBuffer.isView(t)&&!(t instanceof DataView)}function I$(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]=nc(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 R$(t,e){var n=new Date;return t=+t,e=+e,function(r){return n.setTime(t*(1-r)+e*r),n}}function _e(t,e){return t=+t,e=+e,function(n){return t*(1-n)+e*n}}function N$(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]=nc(t[i],e[i]):r[i]=e[i];return function(o){for(i in n)r[i]=n[i](o);return r}}var tc=/[-+]?(?:\d+\.?\d*|\.?\d+)(?:[eE][-+]?\d+)?/g,ec=new RegExp(tc.source,"g");function F$(t){return function(){return t}}function G$(t){return function(e){return t(e)+""}}function Jd(t,e){var n=tc.lastIndex=ec.lastIndex=0,r,i,o,a=-1,s=[],u=[];for(t=t+"",e=e+"";(r=tc.exec(t))&&(i=ec.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:_e(r,i)})),n=ec.lastIndex;return n<e.length&&(o=e.slice(n),s[a]?s[a]+=o:s[++a]=o),s.length<2?u[0]?G$(u[0].x):F$(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 nc(t,e){var n=typeof e,r;return e==null||n==="boolean"?Ju(e):(n==="number"?_e:n==="string"?(r=Mn(e))?(e=r,Ko):Jd:e instanceof Mn?Ko:e instanceof Date?R$:C$(e)?k$:Array.isArray(e)?I$:typeof e.valueOf!="function"&&typeof e.toString!="function"||isNaN(e)?N$:_e)(t,e)}function z$(t,e){return t=+t,e=+e,function(n){return Math.round(t*(1-n)+e*n)}}var tp=180/Math.PI,ep={translateX:0,translateY:0,rotate:0,skewX:0,scaleX:1,scaleY:1};function np(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)*tp,skewX:Math.atan(u)*tp,scaleX:a,scaleY:s}}var Qo;function O$(t){const e=new(typeof DOMMatrix=="function"?DOMMatrix:WebKitCSSMatrix)(t+"");return e.isIdentity?ep:np(e.a,e.b,e.c,e.d,e.e,e.f)}function U$(t){return t==null||(Qo||(Qo=document.createElementNS("http://www.w3.org/2000/svg","g")),Qo.setAttribute("transform",t),!(t=Qo.transform.baseVal.consolidate()))?ep:(t=t.matrix,np(t.a,t.b,t.c,t.d,t.e,t.f))}function rp(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:_e(c,h)},{i:g-2,x:_e(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:_e(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:_e(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:_e(c,h)},{i:g-2,x:_e(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 B$=rp(O$,"px, ","px)","deg)"),Y$=rp(U$,", ",")",")"),br=0,yi=0,bi=0,ip=1e3,Jo,vi,ta=0,Dn=0,ea=0,xi=typeof performance=="object"&&performance.now?performance:Date,op=typeof window=="object"&&window.requestAnimationFrame?window.requestAnimationFrame.bind(window):function(t){setTimeout(t,17)};function rc(){return Dn||(op(W$),Dn=xi.now()+ea)}function W$(){Dn=0}function na(){this._call=this._time=this._next=null}na.prototype=ap.prototype={constructor:na,restart:function(t,e,n){if(typeof t!="function")throw new TypeError("callback is not a function");n=(n==null?rc():+n)+(e==null?0:+e),!this._next&&vi!==this&&(vi?vi._next=this:Jo=this,vi=this),this._call=t,this._time=n,ic()},stop:function(){this._call&&(this._call=null,this._time=1/0,ic())}};function ap(t,e,n){var r=new na;return r.restart(t,e,n),r}function H$(){rc(),++br;for(var t=Jo,e;t;)(e=Dn-t._time)>=0&&t._call.call(void 0,e),t=t._next;--br}function sp(){Dn=(ta=xi.now())+ea,br=yi=0;try{H$()}finally{br=0,X$(),Dn=0}}function q$(){var t=xi.now(),e=t-ta;e>ip&&(ea-=e,ta=t)}function X$(){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);vi=t,ic(r)}function ic(t){if(!br){yi&&(yi=clearTimeout(yi));var e=t-Dn;e>24?(t<1/0&&(yi=setTimeout(sp,t-xi.now()-ea)),bi&&(bi=clearInterval(bi))):(bi||(ta=xi.now(),bi=setInterval(q$,ip)),br=1,op(sp))}}function up(t,e,n){var r=new na;return e=e==null?0:+e,r.restart(i=>{r.stop(),t(i+e)},e,n),r}var j$=Pd("start","end","cancel","interrupt"),V$=[],cp=0,lp=1,oc=2,ra=3,fp=4,ac=5,ia=6;function oa(t,e,n,r,i,o){var a=t.__transition;if(!a)t.__transition={};else if(n in a)return;Z$(t,n,{name:e,index:r,group:i,on:j$,tween:V$,time:o.time,delay:o.delay,duration:o.duration,ease:o.ease,timer:null,state:cp})}function sc(t,e){var n=we(t,e);if(n.state>cp)throw new Error("too late; already scheduled");return n}function Ee(t,e){var n=we(t,e);if(n.state>ra)throw new Error("too late; already running");return n}function we(t,e){var n=t.__transition;if(!n||!(n=n[e]))throw new Error("transition not found");return n}function Z$(t,e,n){var r=t.__transition,i;r[e]=n,n.timer=ap(o,0,n.time);function o(c){n.state=lp,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!==lp)return u();for(l in r)if(d=r[l],d.name===n.name){if(d.state===ra)return up(a);d.state===fp?(d.state=ia,d.timer.stop(),d.on.call("interrupt",t,t.__data__,d.index,d.group),delete r[l]):+l<e&&(d.state=ia,d.timer.stop(),d.on.call("cancel",t,t.__data__,d.index,d.group),delete r[l])}if(up(function(){n.state===ra&&(n.state=fp,n.timer.restart(s,n.delay,n.time),s(c))}),n.state=oc,n.on.call("start",t,t.__data__,n.index,n.group),n.state===oc){for(n.state=ra,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=ac,1),h=-1,f=i.length;++h<f;)i[h].call(t,l);n.state===ac&&(n.on.call("end",t,t.__data__,n.index,n.group),u())}function u(){n.state=ia,n.timer.stop(),delete r[e];for(var c in r)return;delete t.__transition}}function K$(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>oc&&r.state<ac,r.state=ia,r.timer.stop(),r.on.call(i?"interrupt":"cancel",t,t.__data__,r.index,r.group),delete n[a]}o&&delete t.__transition}}function Q$(t){return this.each(function(){K$(this,t)})}function J$(t,e){var n,r;return function(){var i=Ee(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 tS(t,e,n){var r,i;if(typeof n!="function")throw new Error;return function(){var o=Ee(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 eS(t,e){var n=this._id;if(t+="",arguments.length<2){for(var r=we(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?J$:tS)(n,t,e))}function uc(t,e,n){var r=t._id;return t.each(function(){var i=Ee(this,r);(i.value||(i.value={}))[e]=n.apply(this,arguments)}),function(i){return we(i,r).value[e]}}function hp(t,e){var n;return(typeof e=="number"?_e:e instanceof Mn?Ko:(n=Mn(e))?(e=n,Ko):Jd)(t,e)}function nS(t){return function(){this.removeAttribute(t)}}function rS(t){return function(){this.removeAttributeNS(t.space,t.local)}}function iS(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 oS(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 aS(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 sS(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 uS(t,e){var n=Ho(t),r=n==="transform"?Y$:hp;return this.attrTween(t,typeof e=="function"?(n.local?sS:aS)(n,r,uc(this,"attr."+t,e)):e==null?(n.local?rS:nS)(n):(n.local?oS:iS)(n,r,e))}function cS(t,e){return function(n){this.setAttribute(t,e.call(this,n))}}function lS(t,e){return function(n){this.setAttributeNS(t.space,t.local,e.call(this,n))}}function fS(t,e){var n,r;function i(){var o=e.apply(this,arguments);return o!==r&&(n=(r=o)&&lS(t,o)),n}return i._value=e,i}function hS(t,e){var n,r;function i(){var o=e.apply(this,arguments);return o!==r&&(n=(r=o)&&cS(t,o)),n}return i._value=e,i}function dS(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=Ho(t);return this.tween(n,(r.local?fS:hS)(r,e))}function pS(t,e){return function(){sc(this,t).delay=+e.apply(this,arguments)}}function gS(t,e){return e=+e,function(){sc(this,t).delay=e}}function mS(t){var e=this._id;return arguments.length?this.each((typeof t=="function"?pS:gS)(e,t)):we(this.node(),e).delay}function yS(t,e){return function(){Ee(this,t).duration=+e.apply(this,arguments)}}function bS(t,e){return e=+e,function(){Ee(this,t).duration=e}}function vS(t){var e=this._id;return arguments.length?this.each((typeof t=="function"?yS:bS)(e,t)):we(this.node(),e).duration}function xS(t,e){if(typeof e!="function")throw new Error;return function(){Ee(this,t).ease=e}}function _S(t){var e=this._id;return arguments.length?this.each(xS(e,t)):we(this.node(),e).ease}function wS(t,e){return function(){var n=e.apply(this,arguments);if(typeof n!="function")throw new Error;Ee(this,t).ease=n}}function $S(t){if(typeof t!="function")throw new Error;return this.each(wS(this._id,t))}function SS(t){typeof t!="function"&&(t=Cd(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 AS(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 MS(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 TS(t,e,n){var r,i,o=MS(e)?sc:Ee;return function(){var a=o(this,t),s=a.on;s!==r&&(i=(r=s).copy()).on(e,n),a.on=i}}function PS(t,e){var n=this._id;return arguments.length<2?we(this.node(),n).on.on(t):this.each(TS(n,t,e))}function DS(t){return function(){var e=this.parentNode;for(var n in this.__transition)if(+n!==t)return;e&&e.removeChild(this)}}function LS(){return this.on("end.remove",DS(this._id))}function ES(t){var e=this._name,n=this._id;typeof t!="function"&&(t=ju(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,oa(c[f],e,n,f,c,we(l,n)));return new We(o,this._parents,e,n)}function kS(t){var e=this._name,n=this._id;typeof t!="function"&&(t=kd(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=we(l,n),g=0,m=f.length;g<m;++g)(d=f[g])&&oa(d,e,n,g,f,p);o.push(f),a.push(l)}return new We(o,a,e,n)}var CS=di.prototype.constructor;function IS(){return new CS(this._groups,this._parents)}function RS(t,e){var n,r,i;return function(){var o=mr(this,t),a=(this.style.removeProperty(t),mr(this,t));return o===a?null:o===n&&a===r?i:i=e(n=o,r=a)}}function dp(t){return function(){this.style.removeProperty(t)}}function NS(t,e,n){var r,i=n+"",o;return function(){var a=mr(this,t);return a===i?null:a===r?o:o=e(r=a,n)}}function FS(t,e,n){var r,i,o;return function(){var a=mr(this,t),s=n(this),u=s+"";return s==null&&(u=s=(this.style.removeProperty(t),mr(this,t))),a===u?null:a===r&&u===i?o:(i=u,o=e(r=a,s))}}function GS(t,e){var n,r,i,o="style."+e,a="end."+o,s;return function(){var u=Ee(this,t),c=u.on,l=u.value[o]==null?s||(s=dp(e)):void 0;(c!==n||i!==l)&&(r=(n=c).copy()).on(a,i=l),u.on=r}}function zS(t,e,n){var r=(t+="")=="transform"?B$:hp;return e==null?this.styleTween(t,RS(t,r)).on("end.style."+t,dp(t)):typeof e=="function"?this.styleTween(t,FS(t,r,uc(this,"style."+t,e))).each(GS(this._id,t)):this.styleTween(t,NS(t,r,e),n).on("end.style."+t,null)}function OS(t,e,n){return function(r){this.style.setProperty(t,e.call(this,r),n)}}function US(t,e,n){var r,i;function o(){var a=e.apply(this,arguments);return a!==i&&(r=(i=a)&&OS(t,a,n)),r}return o._value=e,o}function BS(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,US(t,e,n??""))}function YS(t){return function(){this.textContent=t}}function WS(t){return function(){var e=t(this);this.textContent=e??""}}function HS(t){return this.tween("text",typeof t=="function"?WS(uc(this,"text",t)):YS(t==null?"":t+""))}function qS(t){return function(e){this.textContent=t.call(this,e)}}function XS(t){var e,n;function r(){var i=t.apply(this,arguments);return i!==n&&(e=(n=i)&&qS(i)),e}return r._value=t,r}function jS(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,XS(t))}function VS(){for(var t=this._name,e=this._id,n=pp(),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=we(u,e);oa(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 ZS(){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=Ee(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 KS=0;function We(t,e,n,r){this._groups=t,this._parents=e,this._name=n,this._id=r}function pp(){return++KS}var He=di.prototype;We.prototype={constructor:We,select:ES,selectAll:kS,selectChild:He.selectChild,selectChildren:He.selectChildren,filter:SS,merge:AS,selection:IS,transition:VS,call:He.call,nodes:He.nodes,node:He.node,size:He.size,empty:He.empty,each:He.each,on:PS,attr:uS,attrTween:dS,style:zS,styleTween:BS,text:HS,textTween:jS,remove:LS,tween:eS,delay:mS,duration:vS,ease:_S,easeVarying:$S,end:ZS,[Symbol.iterator]:He[Symbol.iterator]};function QS(t){return((t*=2)<=1?t*t*t:(t-=2)*t*t+2)/2}var JS={time:null,delay:0,duration:250,ease:QS};function t3(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 e3(t){var e,n;t instanceof We?(e=t._id,t=t._name):(e=pp(),(n=JS).time=rc(),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])&&oa(u,t,e,c,a,n||t3(u,e));return new We(r,this._parents,t,e)}di.prototype.interrupt=Q$,di.prototype.transition=e3;function n3(t){return Math.abs(t=Math.round(t))>=1e21?t.toLocaleString("en").replace(/,/g,""):t.toString(10)}function aa(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 vr(t){return t=aa(Math.abs(t)),t?t[1]:NaN}function r3(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 i3(t){return function(e){return e.replace(/[0-9]/g,function(n){return t[+n]})}}var o3=/^(?:(.)?([<>=^]))?([+\-( ])?([$#])?(0)?(\d+)?(,)?(\.\d+)?(~)?([a-z%])?$/i;function sa(t){if(!(e=o3.exec(t)))throw new Error("invalid format: "+t);var e;return new cc({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]})}sa.prototype=cc.prototype;function cc(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+""}cc.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 a3(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 gp;function s3(t,e){var n=aa(t,e);if(!n)return t+"";var r=n[0],i=n[1],o=i-(gp=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")+aa(t,Math.max(0,e+o-1))[0]}function mp(t,e){var n=aa(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 yp={"%":(t,e)=>(t*100).toFixed(e),b:t=>Math.round(t).toString(2),c:t=>t+"",d:n3,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)=>mp(t*100,e),r:mp,s:s3,X:t=>Math.round(t).toString(16).toUpperCase(),x:t=>Math.round(t).toString(16)};function bp(t){return t}var vp=Array.prototype.map,xp=["y","z","a","f","p","n","µ","m","","k","M","G","T","P","E","Z","Y"];function u3(t){var e=t.grouping===void 0||t.thousands===void 0?bp:r3(vp.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?bp:i3(vp.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=sa(h);var f=h.fill,d=h.align,p=h.sign,g=h.symbol,m=h.zero,y=h.width,v=h.comma,x=h.precision,b=h.trim,w=h.type;w==="n"?(v=!0,w="g"):yp[w]||(x===void 0&&(x=12),b=!0,w="g"),(m||f==="0"&&d==="=")&&(m=!0,f="0",d="=");var $=g==="$"?n:g==="#"&&/[boxX]/.test(w)?"0"+w.toLowerCase():"",A=g==="$"?r:/[%p]/.test(w)?a:"",_=yp[w],L=/[defgprs%]/.test(w);x=x===void 0?6:/[gprs]/.test(w)?Math.max(1,Math.min(21,x)):Math.max(0,Math.min(20,x));function E(T){var I=$,P=A,D,C,S;if(w==="c")P=_(T)+P,T="";else{T=+T;var R=T<0||1/T<0;if(T=isNaN(T)?u:_(Math.abs(T),x),b&&(T=a3(T)),R&&+T==0&&p!=="+"&&(R=!1),I=(R?p==="("?p:s:p==="-"||p==="("?"":p)+I,P=(w==="s"?xp[8+gp/3]:"")+P+(R&&p==="("?")":""),L){for(D=-1,C=T.length;++D<C;)if(S=T.charCodeAt(D),48>S||S>57){P=(S===46?i+T.slice(D+1):T.slice(D))+P,T=T.slice(0,D);break}}}v&&!m&&(T=e(T,1/0));var G=I.length+T.length+P.length,M=G<y?new Array(y-G+1).join(f):"";switch(v&&m&&(T=e(M+T,M.length?y-P.length:1/0),M=""),d){case"<":T=I+T+P+M;break;case"=":T=I+M+T+P;break;case"^":T=M.slice(0,G=M.length>>1)+I+T+P+M.slice(G);break;default:T=M+I+T+P;break}return o(T)}return E.toString=function(){return h+""},E}function l(h,f){var d=c((h=sa(h),h.type="f",h)),p=Math.max(-8,Math.min(8,Math.floor(vr(f)/3)))*3,g=Math.pow(10,-p),m=xp[8+p/3];return function(y){return d(g*y)+m}}return{format:c,formatPrefix:l}}var ua,_p,wp;c3({thousands:",",grouping:[3],currency:["$",""]});function c3(t){return ua=u3(t),_p=ua.format,wp=ua.formatPrefix,ua}function l3(t){return Math.max(0,-vr(Math.abs(t)))}function f3(t,e){return Math.max(0,Math.max(-8,Math.min(8,Math.floor(vr(e)/3)))*3-vr(Math.abs(t)))}function h3(t,e){return t=Math.abs(t),e=Math.abs(e)-t,Math.max(0,vr(e)-vr(t))+1}function ca(t,e){switch(arguments.length){case 0:break;case 1:this.range(t);break;default:this.range(e).domain(t);break}return this}const $p=Symbol("implicit");function Sp(){var t=new Md,e=[],n=[],r=$p;function i(o){let a=t.get(o);if(a===void 0){if(r!==$p)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 Md;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 Sp(e,n).unknown(r)},ca.apply(i,arguments),i}function Ap(){var t=Sp().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=I_(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 Ap(e(),[r,i]).round(s).paddingInner(u).paddingOuter(c).align(l)},ca.apply(h(),arguments)}function Mp(t){var e=t.copy;return t.padding=t.paddingOuter,delete t.paddingInner,delete t.paddingOuter,t.copy=function(){return Mp(e())},t}function d3(){return Mp(Ap.apply(null,arguments).paddingInner(1))}function p3(t){return function(){return t}}function g3(t){return+t}var Tp=[0,1];function xr(t){return t}function lc(t,e){return(e-=t=+t)?function(n){return(n-t)/e}:p3(isNaN(e)?NaN:.5)}function m3(t,e){var n;return t>e&&(n=t,t=e,e=n),function(r){return Math.max(t,Math.min(e,r))}}function y3(t,e,n){var r=t[0],i=t[1],o=e[0],a=e[1];return i<r?(r=lc(i,r),o=n(a,o)):(r=lc(r,i),o=n(o,a)),function(s){return o(r(s))}}function b3(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]=lc(t[a],t[a+1]),o[a]=n(e[a],e[a+1]);return function(s){var u=Ad(t,s,1,r)-1;return o[u](i[u](s))}}function v3(t,e){return e.domain(t.domain()).range(t.range()).interpolate(t.interpolate()).clamp(t.clamp()).unknown(t.unknown())}function x3(){var t=Tp,e=Tp,n=nc,r,i,o,a=xr,s,u,c;function l(){var f=Math.min(t.length,e.length);return a!==xr&&(a=m3(t[0],t[f-1])),s=f>2?b3:y3,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),_e)))(f)))},h.domain=function(f){return arguments.length?(t=Array.from(f,g3),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=z$,l()},h.clamp=function(f){return arguments.length?(a=f?!0:xr,l()):a!==xr},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 _3(){return x3()(xr,xr)}function w3(t,e,n,r){var i=C_(t,e,n),o;switch(r=sa(r??",f"),r.type){case"s":{var a=Math.max(Math.abs(t),Math.abs(e));return r.precision==null&&!isNaN(o=f3(i,a))&&(r.precision=o),wp(r,a)}case"":case"e":case"g":case"p":case"r":{r.precision==null&&!isNaN(o=h3(i,Math.max(Math.abs(t),Math.abs(e))))&&(r.precision=o-(r.type==="e"));break}case"f":case"%":{r.precision==null&&!isNaN(o=l3(i))&&(r.precision=o-(r.type==="%")*2);break}}return _p(r)}function Pp(t){var e=t.domain;return t.ticks=function(n){var r=e();return k_(r[0],r[r.length-1],n??10)},t.tickFormat=function(n,r){var i=e();return w3(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=qu(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 Dp(){var t=_3();return t.copy=function(){return v3(t,Dp())},ca.apply(t,arguments),Pp(t)}function Lp(){var t=0,e=1,n=1,r=[.5],i=[0,1],o;function a(u){return u!=null&&u<=u?i[Ad(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 Lp().domain([t,e]).range(i).unknown(o)},ca.apply(Pp(a),arguments)}function _i(t,e,n){this.k=t,this.x=e,this.y=n}_i.prototype={constructor:_i,scale:function(t){return t===1?this:new _i(this.k*t,this.x,this.y)},translate:function(t,e){return t===0&e===0?this:new _i(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+")"}},_i.prototype;function la(t){return Object.prototype.toString.call(t)==="[object Object]"}function fc(t,e){if(la(t)===!1||la(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;la(r[a])&&la(i[a])?(s=n(r[a],i[a]),o[a]=s):o[a]=r[a]}return o};return n(t,e)}var hc=function(t,e){return hc=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])},hc(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");hc(t,e);function n(){this.constructor=t}t.prototype=e===null?Object.create(e):(n.prototype=e.prototype,new n)}function $3(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 Ep(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 _r(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 wi(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 $i(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 wr(t){return this instanceof wr?(this.v=t,this):new wr(t)}function S3(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 wr?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 A3(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 _r=="function"?_r(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 dc(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 pc=dc(function(t){return function(e){t(this),this.message=e?e.length+` errors occurred during unsubscription:
3
+ `):"",this.name="UnsubscriptionError",this.errors=n}});function Ru(t,e){if(t){var n=t.indexOf(e);0<=n&&t.splice(n,1)}}var Go=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=fr(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 Iu?g.errors:[g]}var h=this._finalizers;if(h){this._finalizers=null;try{for(var f=fr(h),d=f.next();!d.done;d=f.next()){var p=d.value;try{nd(p)}catch(g){o=o??[],g instanceof Iu?o=ci(ci([],hr(o)),hr(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 Iu(o)}},t.prototype.add=function(e){var n;if(e&&e!==this)if(this.closed)nd(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)&&Ru(n,e)},t.prototype.remove=function(e){var n=this._finalizers;n&&Ru(n,e),e instanceof t&&e._removeParent(this)},t.EMPTY=function(){var e=new t;return e.closed=!0,e}(),t}(),td=Go.EMPTY;function ed(t){return t instanceof Go||t&&"closed"in t&&mt(t.remove)&&mt(t.add)&&mt(t.unsubscribe)}function nd(t){mt(t)?t():t.unsubscribe()}var rd={onUnhandledError:null,onStoppedNotification:null,Promise:void 0,useDeprecatedSynchronousErrorHandling:!1,useDeprecatedNextContext:!1},id={setTimeout:function(t,e){for(var n=[],r=2;r<arguments.length;r++)n[r-2]=arguments[r];return setTimeout.apply(void 0,ci([t,e],hr(n)))},clearTimeout:function(t){var e=id.delegate;return((e==null?void 0:e.clearTimeout)||clearTimeout)(t)},delegate:void 0};function od(t){id.setTimeout(function(){throw t})}function Nu(){}function zo(t){t()}var Fu=function(t){lr(e,t);function e(n){var r=t.call(this)||this;return r.isStopped=!1,n?(r.destination=n,ed(n)&&n.add(r)):r.destination=Ex,r}return e.create=function(n,r,i){return new li(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}(Go),Px=Function.prototype.bind;function Gu(t,e){return Px.call(t,e)}var Dx=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){Oo(r)}},t.prototype.error=function(e){var n=this.partialObserver;if(n.error)try{n.error(e)}catch(r){Oo(r)}else Oo(e)},t.prototype.complete=function(){var e=this.partialObserver;if(e.complete)try{e.complete()}catch(n){Oo(n)}},t}(),li=function(t){lr(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&&rd.useDeprecatedNextContext?(s=Object.create(n),s.unsubscribe=function(){return o.unsubscribe()},a={next:n.next&&Gu(n.next,s),error:n.error&&Gu(n.error,s),complete:n.complete&&Gu(n.complete,s)}):a=n}return o.destination=new Dx(a),o}return e}(Fu);function Oo(t){od(t)}function Lx(t){throw t}var Ex={closed:!0,next:Nu,error:Lx,complete:Nu},zu=function(){return typeof Symbol=="function"&&Symbol.observable||"@@observable"}();function pr(t){return t}function kx(t){return t.length===0?pr: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=Ix(e)?e:new li(e,n,r);return zo(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=ad(n),new n(function(i,o){var a=new li({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[zu]=function(){return this},t.prototype.pipe=function(){for(var e=[],n=0;n<arguments.length;n++)e[n]=arguments[n];return kx(e)(this)},t.prototype.toPromise=function(e){var n=this;return e=ad(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 ad(t){var e;return(e=t??rd.Promise)!==null&&e!==void 0?e:Promise}function Cx(t){return t&&mt(t.next)&&mt(t.error)&&mt(t.complete)}function Ix(t){return t&&t instanceof Fu||Cx(t)&&ed(t)}function Rx(t){return mt(t==null?void 0:t.lift)}function le(t){return function(e){if(Rx(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 Nx(t,e,n,r,i)}var Nx=function(t){lr(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}(Fu),Fx=Cu(function(t){return function(){t(this),this.name="ObjectUnsubscribedError",this.message="object unsubscribed"}}),nt=function(t){lr(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 sd(this,this);return r.operator=n,r},e.prototype._throwIfClosed=function(){if(this.closed)throw new Fx},e.prototype.next=function(n){var r=this;zo(function(){var i,o;if(r._throwIfClosed(),!r.isStopped){r.currentObservers||(r.currentObservers=Array.from(r.observers));try{for(var a=fr(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;zo(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;zo(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?td:(this.currentObservers=null,s.push(n),new Go(function(){r.currentObservers=null,Ru(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 sd(n,r)},e}(lt),sd=function(t){lr(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:td},e}(nt),ud={now:function(){return(ud.delegate||Date).now()},delegate:void 0},Gx=function(t){lr(e,t);function e(n,r,i){n===void 0&&(n=1/0),r===void 0&&(r=1/0),i===void 0&&(i=ud);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}(nt),cd=new lt(function(t){return t.complete()});function zx(t){return t&&mt(t.schedule)}function Ou(t){return t[t.length-1]}function Ox(t){return mt(Ou(t))?t.pop():void 0}function Uu(t){return zx(Ou(t))?t.pop():void 0}function Ux(t,e){return typeof Ou(t)=="number"?t.pop():e}var Bu=function(t){return t&&typeof t.length=="number"&&typeof t!="function"};function ld(t){return mt(t==null?void 0:t.then)}function fd(t){return mt(t[zu])}function hd(t){return Symbol.asyncIterator&&mt(t==null?void 0:t[Symbol.asyncIterator])}function dd(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 Bx(){return typeof Symbol!="function"||!Symbol.iterator?"@@iterator":Symbol.iterator}var pd=Bx();function gd(t){return mt(t==null?void 0:t[pd])}function md(t){return Mx(this,arguments,function(){var n,r,i,o;return Jh(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,dr(n.read())];case 3:return r=a.sent(),i=r.value,o=r.done,o?[4,dr(void 0)]:[3,5];case 4:return[2,a.sent()];case 5:return[4,dr(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 yd(t){return mt(t==null?void 0:t.getReader)}function fe(t){if(t instanceof lt)return t;if(t!=null){if(fd(t))return Yx(t);if(Bu(t))return Hx(t);if(ld(t))return Wx(t);if(hd(t))return bd(t);if(gd(t))return qx(t);if(yd(t))return jx(t)}throw dd(t)}function Yx(t){return new lt(function(e){var n=t[zu]();if(mt(n.subscribe))return n.subscribe(e);throw new TypeError("Provided object does not correctly implement Symbol.observable")})}function Hx(t){return new lt(function(e){for(var n=0;n<t.length&&!e.closed;n++)e.next(t[n]);e.complete()})}function Wx(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,od)})}function qx(t){return new lt(function(e){var n,r;try{for(var i=fr(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 bd(t){return new lt(function(e){Xx(t,e).catch(function(n){return e.error(n)})})}function jx(t){return bd(md(t))}function Xx(t,e){var n,r,i,o;return Ax(this,void 0,void 0,function(){var a,s;return Jh(this,function(u){switch(u.label){case 0:u.trys.push([0,5,6,11]),n=Tx(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 cn(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 vd(t,e){return e===void 0&&(e=0),le(function(n,r){n.subscribe(oe(r,function(i){return cn(r,t,function(){return r.next(i)},e)},function(){return cn(r,t,function(){return r.complete()},e)},function(i){return cn(r,t,function(){return r.error(i)},e)}))})}function xd(t,e){return e===void 0&&(e=0),le(function(n,r){r.add(t.schedule(function(){return n.subscribe(r)},e))})}function Vx(t,e){return fe(t).pipe(xd(e),vd(e))}function Zx(t,e){return fe(t).pipe(xd(e),vd(e))}function Kx(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 Qx(t,e){return new lt(function(n){var r;return cn(n,e,function(){r=t[pd](),cn(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 _d(t,e){if(!t)throw new Error("Iterable cannot be null");return new lt(function(n){cn(n,e,function(){var r=t[Symbol.asyncIterator]();cn(n,e,function(){r.next().then(function(i){i.done?n.complete():n.next(i.value)})},0,!0)})})}function Jx(t,e){return _d(md(t),e)}function t_(t,e){if(t!=null){if(fd(t))return Vx(t,e);if(Bu(t))return Kx(t,e);if(ld(t))return Zx(t,e);if(hd(t))return _d(t,e);if(gd(t))return Qx(t,e);if(yd(t))return Jx(t,e)}throw dd(t)}function Uo(t,e){return e?t_(t,e):fe(t)}function fi(){for(var t=[],e=0;e<arguments.length;e++)t[e]=arguments[e];var n=Uu(t);return Uo(t,n)}var wd=Cu(function(t){return function(){t(this),this.name="EmptyError",this.message="no elements in sequence"}});function U(t,e){return le(function(n,r){var i=0;n.subscribe(oe(r,function(o){r.next(t.call(e,o,i++))}))})}var e_=Array.isArray;function n_(t,e){return e_(e)?t.apply(void 0,ci([],hr(e))):t(e)}function $d(t){return U(function(e){return n_(t,e)})}var r_=Array.isArray,i_=Object.getPrototypeOf,o_=Object.prototype,a_=Object.keys;function s_(t){if(t.length===1){var e=t[0];if(r_(e))return{args:e,keys:null};if(u_(e)){var n=a_(e);return{args:n.map(function(r){return e[r]}),keys:n}}}return{args:t,keys:null}}function u_(t){return t&&typeof t=="object"&&i_(t)===o_}function c_(t,e){return t.reduce(function(n,r,i){return n[r]=e[i],n},{})}function W(){for(var t=[],e=0;e<arguments.length;e++)t[e]=arguments[e];var n=Uu(t),r=Ox(t),i=s_(t),o=i.args,a=i.keys;if(o.length===0)return Uo([],n);var s=new lt(l_(o,n,a?function(u){return c_(a,u)}:pr));return r?s.pipe($d(r)):s}function l_(t,e,n){return n===void 0&&(n=pr),function(r){Sd(e,function(){for(var i=t.length,o=new Array(i),a=i,s=i,u=function(l){Sd(e,function(){var h=Uo(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 Sd(t,e,n){t?cn(n,t,e):e()}function f_(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;fe(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 Yu(t,e,n){return n===void 0&&(n=1/0),mt(e)?Yu(function(r,i){return U(function(o,a){return e(r,o,i,a)})(fe(t(r,i)))},n):(typeof e=="number"&&(n=e),le(function(r,i){return f_(r,i,t,n)}))}function h_(t){return t===void 0&&(t=1/0),Yu(pr,t)}function d_(t){return new lt(function(e){fe(t()).subscribe(e)})}var p_=["addListener","removeListener"],g_=["addEventListener","removeEventListener"],m_=["on","off"];function Hu(t,e,n,r){if(mt(n)&&(r=n,n=void 0),r)return Hu(t,e,n).pipe($d(r));var i=hr(v_(t)?g_.map(function(s){return function(u){return t[s](e,u,n)}}):y_(t)?p_.map(Ad(t,e)):b_(t)?m_.map(Ad(t,e)):[],2),o=i[0],a=i[1];if(!o&&Bu(t))return Yu(function(s){return Hu(s,e,n)})(fe(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 Ad(t,e){return function(n){return function(r){return t[n](e,r)}}}function y_(t){return mt(t.addListener)&&mt(t.removeListener)}function b_(t){return mt(t.on)&&mt(t.off)}function v_(t){return mt(t.addEventListener)&&mt(t.removeEventListener)}function Md(t,e,n){return d_(function(){return t()?e:n})}function Wu(){for(var t=[],e=0;e<arguments.length;e++)t[e]=arguments[e];var n=Uu(t),r=Ux(t,1/0),i=t;return i.length?i.length===1?fe(i[0]):h_(r)(Uo(i,n)):cd}function hi(t,e){return le(function(n,r){var i=0;n.subscribe(oe(r,function(o){return t.call(e,o,i++)&&r.next(o)}))})}function x_(t){return le(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 __(t){return t<=0?function(){return cd}:le(function(e,n){var r=0;e.subscribe(oe(n,function(i){++r<=t&&(n.next(i),t<=r&&n.complete())}))})}function ft(t,e){return e===void 0&&(e=pr),t=t??w_,le(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 w_(t,e){return t===e}function $_(t){return t===void 0&&(t=S_),le(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 wd}function di(t,e){var n=arguments.length>=2;return function(r){return r.pipe(pr,__(1),n?x_(e):$_(function(){return new wd}))}}function A_(t){t===void 0&&(t={});var e=t.connector,n=e===void 0?function(){return new nt}: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 le(function(v,b){d++,!g&&!p&&m();var _=f=f??n();b.add(function(){d--,d===0&&!g&&!p&&(h=qu(x,u))}),_.subscribe(b),!l&&d>0&&(l=new li({next:function(w){return _.next(w)},error:function(w){g=!0,m(),h=qu(y,i,w),_.error(w)},complete:function(){p=!0,m(),h=qu(y,a),_.complete()}}),fe(v).subscribe(l))})(c)}}function qu(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 li({next:function(){i.unsubscribe(),t()}});return fe(e.apply(void 0,ci([],hr(n)))).subscribe(i)}}function Le(t,e,n){var r,i=!1;return r=t,A_({connector:function(){return new Gx(r,e,n)},resetOnError:!0,resetOnComplete:!1,resetOnRefCountZero:i})}function B(t,e){return le(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++;fe(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 F(t){return le(function(e,n){fe(t).subscribe(oe(n,function(){return n.complete()},Nu)),!n.closed&&e.subscribe(n)})}const gr={position:"left",scaleDomain:[0,"auto"],scaleRange:[0,.9],label:""};function Bo(t,e){return t==null||e==null?NaN:t<e?-1:t>e?1:t>=e?0:NaN}function M_(t,e){return t==null||e==null?NaN:e<t?-1:e>t?1:e>=t?0:NaN}function Td(t){let e,n,r;t.length!==2?(e=Bo,n=(s,u)=>Bo(t(s),u),r=(s,u)=>t(s)-u):(e=t===Bo||t===M_?t:T_,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 T_(){return 0}function P_(t){return t===null?NaN:+t}const D_=Td(Bo),Pd=D_.right;Td(P_).center;class Dd extends Map{constructor(e,n=k_){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(Ld(this,e))}has(e){return super.has(Ld(this,e))}set(e,n){return super.set(L_(this,e),n)}delete(e){return super.delete(E_(this,e))}}function Ld({_intern:t,_key:e},n){const r=e(n);return t.has(r)?t.get(r):n}function L_({_intern:t,_key:e},n){const r=e(n);return t.has(r)?t.get(r):(t.set(r,n),n)}function E_({_intern:t,_key:e},n){const r=e(n);return t.has(r)&&(n=t.get(r),t.delete(r)),n}function k_(t){return t!==null&&typeof t=="object"?t.valueOf():t}const C_=Math.sqrt(50),I_=Math.sqrt(10),R_=Math.sqrt(2);function Yo(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>=C_?10:o>=I_?5:o>=R_?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?Yo(t,e,n*2):[s,u,c]}function N_(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?Yo(e,t,n):Yo(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 ju(t,e,n){return e=+e,t=+t,n=+n,Yo(t,e,n)[2]}function F_(t,e,n){e=+e,t=+t,n=+n;const r=e<t,i=r?ju(e,t,n):ju(t,e,n);return(r?-1:1)*(i<0?1/-i:i)}function G_(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 z_={value:()=>{}};function Ed(){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 Ho(n)}function Ho(t){this._=t}function O_(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}})}Ho.prototype=Ed.prototype={constructor:Ho,on:function(t,e){var n=this._,r=O_(t+"",n),i,o=-1,a=r.length;if(arguments.length<2){for(;++o<a;)if((i=(t=r[o]).type)&&(i=U_(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]=kd(n[i],t.name,e);else if(e==null)for(i in n)n[i]=kd(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 Ho(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 U_(t,e){for(var n=0,r=t.length,i;n<r;++n)if((i=t[n]).name===e)return i.value}function kd(t,e,n){for(var r=0,i=t.length;r<i;++r)if(t[r].name===e){t[r]=z_,t=t.slice(0,r).concat(t.slice(r+1));break}return n!=null&&t.push({name:e,value:n}),t}var Xu="http://www.w3.org/1999/xhtml";const Cd={svg:"http://www.w3.org/2000/svg",xhtml:Xu,xlink:"http://www.w3.org/1999/xlink",xml:"http://www.w3.org/XML/1998/namespace",xmlns:"http://www.w3.org/2000/xmlns/"};function Wo(t){var e=t+="",n=e.indexOf(":");return n>=0&&(e=t.slice(0,n))!=="xmlns"&&(t=t.slice(n+1)),Cd.hasOwnProperty(e)?{space:Cd[e],local:t}:t}function B_(t){return function(){var e=this.ownerDocument,n=this.namespaceURI;return n===Xu&&e.documentElement.namespaceURI===Xu?e.createElement(t):e.createElementNS(n,t)}}function Y_(t){return function(){return this.ownerDocument.createElementNS(t.space,t.local)}}function Id(t){var e=Wo(t);return(e.local?Y_:B_)(e)}function H_(){}function Vu(t){return t==null?H_:function(){return this.querySelector(t)}}function W_(t){typeof t!="function"&&(t=Vu(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 ve(r,this._parents)}function q_(t){return t==null?[]:Array.isArray(t)?t:Array.from(t)}function j_(){return[]}function Rd(t){return t==null?j_:function(){return this.querySelectorAll(t)}}function X_(t){return function(){return q_(t.apply(this,arguments))}}function V_(t){typeof t=="function"?t=X_(t):t=Rd(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 ve(r,i)}function Nd(t){return function(){return this.matches(t)}}function Fd(t){return function(e){return e.matches(t)}}var Z_=Array.prototype.find;function K_(t){return function(){return Z_.call(this.children,t)}}function Q_(){return this.firstElementChild}function J_(t){return this.select(t==null?Q_:K_(typeof t=="function"?t:Fd(t)))}var tw=Array.prototype.filter;function ew(){return Array.from(this.children)}function nw(t){return function(){return tw.call(this.children,t)}}function rw(t){return this.selectAll(t==null?ew:nw(typeof t=="function"?t:Fd(t)))}function iw(t){typeof t!="function"&&(t=Nd(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 ve(r,this._parents)}function Gd(t){return new Array(t.length)}function ow(){return new ve(this._enter||this._groups.map(Gd),this._parents)}function qo(t,e){this.ownerDocument=t.ownerDocument,this.namespaceURI=t.namespaceURI,this._next=null,this._parent=t,this.__data__=e}qo.prototype={constructor:qo,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 aw(t){return function(){return t}}function sw(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 qo(t,o[a]);for(;a<u;++a)(s=e[a])&&(i[a]=s)}function uw(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 qo(t,o[s]);for(s=0;s<l;++s)(u=e[s])&&c.get(f[s])===u&&(i[s]=u)}function cw(t){return t.__data__}function lw(t,e){if(!arguments.length)return Array.from(this,cw);var n=e?uw:sw,r=this._parents,i=this._groups;typeof t!="function"&&(t=aw(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=fw(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 ve(a,r),a._enter=s,a._exit=u,a}function fw(t){return typeof t=="object"&&"length"in t?t:Array.from(t)}function hw(){return new ve(this._exit||this._groups.map(Gd),this._parents)}function dw(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 pw(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 ve(s,this._parents)}function gw(){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 mw(t){t||(t=yw);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 ve(i,this._parents).order()}function yw(t,e){return t<e?-1:t>e?1:t>=e?0:NaN}function bw(){var t=arguments[0];return arguments[0]=this,t.apply(null,arguments),this}function vw(){return Array.from(this)}function xw(){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 _w(){let t=0;for(const e of this)++t;return t}function ww(){return!this.node()}function $w(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 Aw(t){return function(){this.removeAttributeNS(t.space,t.local)}}function Mw(t,e){return function(){this.setAttribute(t,e)}}function Tw(t,e){return function(){this.setAttributeNS(t.space,t.local,e)}}function Pw(t,e){return function(){var n=e.apply(this,arguments);n==null?this.removeAttribute(t):this.setAttribute(t,n)}}function Dw(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 Lw(t,e){var n=Wo(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?Aw:Sw:typeof e=="function"?n.local?Dw:Pw:n.local?Tw:Mw)(n,e))}function zd(t){return t.ownerDocument&&t.ownerDocument.defaultView||t.document&&t||t.defaultView}function Ew(t){return function(){this.style.removeProperty(t)}}function kw(t,e,n){return function(){this.style.setProperty(t,e,n)}}function Cw(t,e,n){return function(){var r=e.apply(this,arguments);r==null?this.style.removeProperty(t):this.style.setProperty(t,r,n)}}function Iw(t,e,n){return arguments.length>1?this.each((e==null?Ew:typeof e=="function"?Cw:kw)(t,e,n??"")):mr(this.node(),t)}function mr(t,e){return t.style.getPropertyValue(e)||zd(t).getComputedStyle(t,null).getPropertyValue(e)}function Rw(t){return function(){delete this[t]}}function Nw(t,e){return function(){this[t]=e}}function Fw(t,e){return function(){var n=e.apply(this,arguments);n==null?delete this[t]:this[t]=n}}function Gw(t,e){return arguments.length>1?this.each((e==null?Rw:typeof e=="function"?Fw:Nw)(t,e)):this.node()[t]}function Od(t){return t.trim().split(/^|\s+/)}function Zu(t){return t.classList||new Ud(t)}function Ud(t){this._node=t,this._names=Od(t.getAttribute("class")||"")}Ud.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 Bd(t,e){for(var n=Zu(t),r=-1,i=e.length;++r<i;)n.add(e[r])}function Yd(t,e){for(var n=Zu(t),r=-1,i=e.length;++r<i;)n.remove(e[r])}function zw(t){return function(){Bd(this,t)}}function Ow(t){return function(){Yd(this,t)}}function Uw(t,e){return function(){(e.apply(this,arguments)?Bd:Yd)(this,t)}}function Bw(t,e){var n=Od(t+"");if(arguments.length<2){for(var r=Zu(this.node()),i=-1,o=n.length;++i<o;)if(!r.contains(n[i]))return!1;return!0}return this.each((typeof e=="function"?Uw:e?zw:Ow)(n,e))}function Yw(){this.textContent=""}function Hw(t){return function(){this.textContent=t}}function Ww(t){return function(){var e=t.apply(this,arguments);this.textContent=e??""}}function qw(t){return arguments.length?this.each(t==null?Yw:(typeof t=="function"?Ww:Hw)(t)):this.node().textContent}function jw(){this.innerHTML=""}function Xw(t){return function(){this.innerHTML=t}}function Vw(t){return function(){var e=t.apply(this,arguments);this.innerHTML=e??""}}function Zw(t){return arguments.length?this.each(t==null?jw:(typeof t=="function"?Vw:Xw)(t)):this.node().innerHTML}function Kw(){this.nextSibling&&this.parentNode.appendChild(this)}function Qw(){return this.each(Kw)}function Jw(){this.previousSibling&&this.parentNode.insertBefore(this,this.parentNode.firstChild)}function t$(){return this.each(Jw)}function e$(t){var e=typeof t=="function"?t:Id(t);return this.select(function(){return this.appendChild(e.apply(this,arguments))})}function n$(){return null}function r$(t,e){var n=typeof t=="function"?t:Id(t),r=e==null?n$:typeof e=="function"?e:Vu(e);return this.select(function(){return this.insertBefore(n.apply(this,arguments),r.apply(this,arguments)||null)})}function i$(){var t=this.parentNode;t&&t.removeChild(this)}function o$(){return this.each(i$)}function a$(){var t=this.cloneNode(!1),e=this.parentNode;return e?e.insertBefore(t,this.nextSibling):t}function s$(){var t=this.cloneNode(!0),e=this.parentNode;return e?e.insertBefore(t,this.nextSibling):t}function u$(t){return this.select(t?s$:a$)}function c$(t){return arguments.length?this.property("__data__",t):this.node().__data__}function l$(t){return function(e){t.call(this,e,this.__data__)}}function f$(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 h$(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 d$(t,e,n){return function(){var r=this.__on,i,o=l$(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 p$(t,e,n){var r=f$(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?d$:h$,i=0;i<o;++i)this.each(s(r[i],e,n));return this}function Hd(t,e,n){var r=zd(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 g$(t,e){return function(){return Hd(this,t,e)}}function m$(t,e){return function(){return Hd(this,t,e.apply(this,arguments))}}function y$(t,e){return this.each((typeof e=="function"?m$:g$)(t,e))}function*b$(){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 v$=[null];function ve(t,e){this._groups=t,this._parents=e}function pi(){return new ve([[document.documentElement]],v$)}function x$(){return this}ve.prototype=pi.prototype={constructor:ve,select:W_,selectAll:V_,selectChild:J_,selectChildren:rw,filter:iw,data:lw,enter:ow,exit:hw,join:dw,merge:pw,selection:x$,order:gw,sort:mw,call:bw,nodes:vw,node:xw,size:_w,empty:ww,each:$w,attr:Lw,style:Iw,property:Gw,classed:Bw,text:qw,html:Zw,raise:Qw,lower:t$,append:e$,insert:r$,remove:o$,clone:u$,datum:c$,on:p$,dispatch:y$,[Symbol.iterator]:b$};function Ku(t,e,n){t.prototype=e.prototype=n,n.constructor=t}function Wd(t,e){var n=Object.create(t.prototype);for(var r in e)n[r]=e[r];return n}function gi(){}var mi=.7,jo=1/mi,yr="\\s*([+-]?\\d+)\\s*",yi="\\s*([+-]?(?:\\d*\\.)?\\d+(?:[eE][+-]?\\d+)?)\\s*",Ee="\\s*([+-]?(?:\\d*\\.)?\\d+(?:[eE][+-]?\\d+)?)%\\s*",_$=/^#([0-9a-f]{3,8})$/,w$=new RegExp(`^rgb\\(${yr},${yr},${yr}\\)$`),$$=new RegExp(`^rgb\\(${Ee},${Ee},${Ee}\\)$`),S$=new RegExp(`^rgba\\(${yr},${yr},${yr},${yi}\\)$`),A$=new RegExp(`^rgba\\(${Ee},${Ee},${Ee},${yi}\\)$`),M$=new RegExp(`^hsl\\(${yi},${Ee},${Ee}\\)$`),T$=new RegExp(`^hsla\\(${yi},${Ee},${Ee},${yi}\\)$`),qd={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};Ku(gi,Tn,{copy(t){return Object.assign(new this.constructor,this,t)},displayable(){return this.rgb().displayable()},hex:jd,formatHex:jd,formatHex8:P$,formatHsl:D$,formatRgb:Xd,toString:Xd});function jd(){return this.rgb().formatHex()}function P$(){return this.rgb().formatHex8()}function D$(){return Jd(this).formatHsl()}function Xd(){return this.rgb().formatRgb()}function Tn(t){var e,n;return t=(t+"").trim().toLowerCase(),(e=_$.exec(t))?(n=e[1].length,e=parseInt(e[1],16),n===6?Vd(e):n===3?new ee(e>>8&15|e>>4&240,e>>4&15|e&240,(e&15)<<4|e&15,1):n===8?Xo(e>>24&255,e>>16&255,e>>8&255,(e&255)/255):n===4?Xo(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=w$.exec(t))?new ee(e[1],e[2],e[3],1):(e=$$.exec(t))?new ee(e[1]*255/100,e[2]*255/100,e[3]*255/100,1):(e=S$.exec(t))?Xo(e[1],e[2],e[3],e[4]):(e=A$.exec(t))?Xo(e[1]*255/100,e[2]*255/100,e[3]*255/100,e[4]):(e=M$.exec(t))?Qd(e[1],e[2]/100,e[3]/100,1):(e=T$.exec(t))?Qd(e[1],e[2]/100,e[3]/100,e[4]):qd.hasOwnProperty(t)?Vd(qd[t]):t==="transparent"?new ee(NaN,NaN,NaN,0):null}function Vd(t){return new ee(t>>16&255,t>>8&255,t&255,1)}function Xo(t,e,n,r){return r<=0&&(t=e=n=NaN),new ee(t,e,n,r)}function L$(t){return t instanceof gi||(t=Tn(t)),t?(t=t.rgb(),new ee(t.r,t.g,t.b,t.opacity)):new ee}function Qu(t,e,n,r){return arguments.length===1?L$(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}Ku(ee,Qu,Wd(gi,{brighter(t){return t=t==null?jo:Math.pow(jo,t),new ee(this.r*t,this.g*t,this.b*t,this.opacity)},darker(t){return t=t==null?mi:Math.pow(mi,t),new ee(this.r*t,this.g*t,this.b*t,this.opacity)},rgb(){return this},clamp(){return new ee(Pn(this.r),Pn(this.g),Pn(this.b),Vo(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:Zd,formatHex:Zd,formatHex8:E$,formatRgb:Kd,toString:Kd}));function Zd(){return`#${Dn(this.r)}${Dn(this.g)}${Dn(this.b)}`}function E$(){return`#${Dn(this.r)}${Dn(this.g)}${Dn(this.b)}${Dn((isNaN(this.opacity)?1:this.opacity)*255)}`}function Kd(){const t=Vo(this.opacity);return`${t===1?"rgb(":"rgba("}${Pn(this.r)}, ${Pn(this.g)}, ${Pn(this.b)}${t===1?")":`, ${t})`}`}function Vo(t){return isNaN(t)?1:Math.max(0,Math.min(1,t))}function Pn(t){return Math.max(0,Math.min(255,Math.round(t)||0))}function Dn(t){return t=Pn(t),(t<16?"0":"")+t.toString(16)}function Qd(t,e,n,r){return r<=0?t=e=n=NaN:n<=0||n>=1?t=e=NaN:e<=0&&(t=NaN),new xe(t,e,n,r)}function Jd(t){if(t instanceof xe)return new xe(t.h,t.s,t.l,t.opacity);if(t instanceof gi||(t=Tn(t)),!t)return new xe;if(t instanceof xe)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 xe(a,s,u,t.opacity)}function k$(t,e,n,r){return arguments.length===1?Jd(t):new xe(t,e,n,r??1)}function xe(t,e,n,r){this.h=+t,this.s=+e,this.l=+n,this.opacity=+r}Ku(xe,k$,Wd(gi,{brighter(t){return t=t==null?jo:Math.pow(jo,t),new xe(this.h,this.s,this.l*t,this.opacity)},darker(t){return t=t==null?mi:Math.pow(mi,t),new xe(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(Ju(t>=240?t-240:t+120,i,r),Ju(t,i,r),Ju(t<120?t+240:t-120,i,r),this.opacity)},clamp(){return new xe(tp(this.h),Zo(this.s),Zo(this.l),Vo(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=Vo(this.opacity);return`${t===1?"hsl(":"hsla("}${tp(this.h)}, ${Zo(this.s)*100}%, ${Zo(this.l)*100}%${t===1?")":`, ${t})`}`}}));function tp(t){return t=(t||0)%360,t<0?t+360:t}function Zo(t){return Math.max(0,Math.min(1,t||0))}function Ju(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 tc=t=>()=>t;function C$(t,e){return function(n){return t+n*e}}function I$(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 R$(t){return(t=+t)==1?ep:function(e,n){return n-e?I$(e,n,t):tc(isNaN(e)?n:e)}}function ep(t,e){var n=e-t;return n?C$(t,n):tc(isNaN(t)?e:t)}const Ko=function t(e){var n=R$(e);function r(i,o){var a=n((i=Qu(i)).r,(o=Qu(o)).r),s=n(i.g,o.g),u=n(i.b,o.b),c=ep(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 N$(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 F$(t){return ArrayBuffer.isView(t)&&!(t instanceof DataView)}function G$(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]=rc(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 z$(t,e){var n=new Date;return t=+t,e=+e,function(r){return n.setTime(t*(1-r)+e*r),n}}function _e(t,e){return t=+t,e=+e,function(n){return t*(1-n)+e*n}}function O$(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]=rc(t[i],e[i]):r[i]=e[i];return function(o){for(i in n)r[i]=n[i](o);return r}}var ec=/[-+]?(?:\d+\.?\d*|\.?\d+)(?:[eE][-+]?\d+)?/g,nc=new RegExp(ec.source,"g");function U$(t){return function(){return t}}function B$(t){return function(e){return t(e)+""}}function np(t,e){var n=ec.lastIndex=nc.lastIndex=0,r,i,o,a=-1,s=[],u=[];for(t=t+"",e=e+"";(r=ec.exec(t))&&(i=nc.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:_e(r,i)})),n=nc.lastIndex;return n<e.length&&(o=e.slice(n),s[a]?s[a]+=o:s[++a]=o),s.length<2?u[0]?B$(u[0].x):U$(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 rc(t,e){var n=typeof e,r;return e==null||n==="boolean"?tc(e):(n==="number"?_e:n==="string"?(r=Tn(e))?(e=r,Ko):np:e instanceof Tn?Ko:e instanceof Date?z$:F$(e)?N$:Array.isArray(e)?G$:typeof e.valueOf!="function"&&typeof e.toString!="function"||isNaN(e)?O$:_e)(t,e)}function Y$(t,e){return t=+t,e=+e,function(n){return Math.round(t*(1-n)+e*n)}}var rp=180/Math.PI,ip={translateX:0,translateY:0,rotate:0,skewX:0,scaleX:1,scaleY:1};function op(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)*rp,skewX:Math.atan(u)*rp,scaleX:a,scaleY:s}}var Qo;function H$(t){const e=new(typeof DOMMatrix=="function"?DOMMatrix:WebKitCSSMatrix)(t+"");return e.isIdentity?ip:op(e.a,e.b,e.c,e.d,e.e,e.f)}function W$(t){return t==null||(Qo||(Qo=document.createElementNS("http://www.w3.org/2000/svg","g")),Qo.setAttribute("transform",t),!(t=Qo.transform.baseVal.consolidate()))?ip:(t=t.matrix,op(t.a,t.b,t.c,t.d,t.e,t.f))}function ap(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:_e(c,h)},{i:g-2,x:_e(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:_e(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:_e(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:_e(c,h)},{i:g-2,x:_e(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 q$=ap(H$,"px, ","px)","deg)"),j$=ap(W$,", ",")",")"),br=0,bi=0,vi=0,sp=1e3,Jo,xi,ta=0,Ln=0,ea=0,_i=typeof performance=="object"&&performance.now?performance:Date,up=typeof window=="object"&&window.requestAnimationFrame?window.requestAnimationFrame.bind(window):function(t){setTimeout(t,17)};function ic(){return Ln||(up(X$),Ln=_i.now()+ea)}function X$(){Ln=0}function na(){this._call=this._time=this._next=null}na.prototype=cp.prototype={constructor:na,restart:function(t,e,n){if(typeof t!="function")throw new TypeError("callback is not a function");n=(n==null?ic():+n)+(e==null?0:+e),!this._next&&xi!==this&&(xi?xi._next=this:Jo=this,xi=this),this._call=t,this._time=n,oc()},stop:function(){this._call&&(this._call=null,this._time=1/0,oc())}};function cp(t,e,n){var r=new na;return r.restart(t,e,n),r}function V$(){ic(),++br;for(var t=Jo,e;t;)(e=Ln-t._time)>=0&&t._call.call(void 0,e),t=t._next;--br}function lp(){Ln=(ta=_i.now())+ea,br=bi=0;try{V$()}finally{br=0,K$(),Ln=0}}function Z$(){var t=_i.now(),e=t-ta;e>sp&&(ea-=e,ta=t)}function K$(){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);xi=t,oc(r)}function oc(t){if(!br){bi&&(bi=clearTimeout(bi));var e=t-Ln;e>24?(t<1/0&&(bi=setTimeout(lp,t-_i.now()-ea)),vi&&(vi=clearInterval(vi))):(vi||(ta=_i.now(),vi=setInterval(Z$,sp)),br=1,up(lp))}}function fp(t,e,n){var r=new na;return e=e==null?0:+e,r.restart(i=>{r.stop(),t(i+e)},e,n),r}var Q$=Ed("start","end","cancel","interrupt"),J$=[],hp=0,dp=1,ac=2,ra=3,pp=4,sc=5,ia=6;function oa(t,e,n,r,i,o){var a=t.__transition;if(!a)t.__transition={};else if(n in a)return;tS(t,n,{name:e,index:r,group:i,on:Q$,tween:J$,time:o.time,delay:o.delay,duration:o.duration,ease:o.ease,timer:null,state:hp})}function uc(t,e){var n=we(t,e);if(n.state>hp)throw new Error("too late; already scheduled");return n}function ke(t,e){var n=we(t,e);if(n.state>ra)throw new Error("too late; already running");return n}function we(t,e){var n=t.__transition;if(!n||!(n=n[e]))throw new Error("transition not found");return n}function tS(t,e,n){var r=t.__transition,i;r[e]=n,n.timer=cp(o,0,n.time);function o(c){n.state=dp,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!==dp)return u();for(l in r)if(d=r[l],d.name===n.name){if(d.state===ra)return fp(a);d.state===pp?(d.state=ia,d.timer.stop(),d.on.call("interrupt",t,t.__data__,d.index,d.group),delete r[l]):+l<e&&(d.state=ia,d.timer.stop(),d.on.call("cancel",t,t.__data__,d.index,d.group),delete r[l])}if(fp(function(){n.state===ra&&(n.state=pp,n.timer.restart(s,n.delay,n.time),s(c))}),n.state=ac,n.on.call("start",t,t.__data__,n.index,n.group),n.state===ac){for(n.state=ra,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=sc,1),h=-1,f=i.length;++h<f;)i[h].call(t,l);n.state===sc&&(n.on.call("end",t,t.__data__,n.index,n.group),u())}function u(){n.state=ia,n.timer.stop(),delete r[e];for(var c in r)return;delete t.__transition}}function eS(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>ac&&r.state<sc,r.state=ia,r.timer.stop(),r.on.call(i?"interrupt":"cancel",t,t.__data__,r.index,r.group),delete n[a]}o&&delete t.__transition}}function nS(t){return this.each(function(){eS(this,t)})}function rS(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 iS(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 oS(t,e){var n=this._id;if(t+="",arguments.length<2){for(var r=we(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?rS:iS)(n,t,e))}function cc(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 we(i,r).value[e]}}function gp(t,e){var n;return(typeof e=="number"?_e:e instanceof Tn?Ko:(n=Tn(e))?(e=n,Ko):np)(t,e)}function aS(t){return function(){this.removeAttribute(t)}}function sS(t){return function(){this.removeAttributeNS(t.space,t.local)}}function uS(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 cS(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 lS(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 fS(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 hS(t,e){var n=Wo(t),r=n==="transform"?j$:gp;return this.attrTween(t,typeof e=="function"?(n.local?fS:lS)(n,r,cc(this,"attr."+t,e)):e==null?(n.local?sS:aS)(n):(n.local?cS:uS)(n,r,e))}function dS(t,e){return function(n){this.setAttribute(t,e.call(this,n))}}function pS(t,e){return function(n){this.setAttributeNS(t.space,t.local,e.call(this,n))}}function gS(t,e){var n,r;function i(){var o=e.apply(this,arguments);return o!==r&&(n=(r=o)&&pS(t,o)),n}return i._value=e,i}function mS(t,e){var n,r;function i(){var o=e.apply(this,arguments);return o!==r&&(n=(r=o)&&dS(t,o)),n}return i._value=e,i}function yS(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=Wo(t);return this.tween(n,(r.local?gS:mS)(r,e))}function bS(t,e){return function(){uc(this,t).delay=+e.apply(this,arguments)}}function vS(t,e){return e=+e,function(){uc(this,t).delay=e}}function xS(t){var e=this._id;return arguments.length?this.each((typeof t=="function"?bS:vS)(e,t)):we(this.node(),e).delay}function _S(t,e){return function(){ke(this,t).duration=+e.apply(this,arguments)}}function wS(t,e){return e=+e,function(){ke(this,t).duration=e}}function $S(t){var e=this._id;return arguments.length?this.each((typeof t=="function"?_S:wS)(e,t)):we(this.node(),e).duration}function SS(t,e){if(typeof e!="function")throw new Error;return function(){ke(this,t).ease=e}}function AS(t){var e=this._id;return arguments.length?this.each(SS(e,t)):we(this.node(),e).ease}function MS(t,e){return function(){var n=e.apply(this,arguments);if(typeof n!="function")throw new Error;ke(this,t).ease=n}}function TS(t){if(typeof t!="function")throw new Error;return this.each(MS(this._id,t))}function PS(t){typeof t!="function"&&(t=Nd(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 DS(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 LS(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 ES(t,e,n){var r,i,o=LS(e)?uc:ke;return function(){var a=o(this,t),s=a.on;s!==r&&(i=(r=s).copy()).on(e,n),a.on=i}}function kS(t,e){var n=this._id;return arguments.length<2?we(this.node(),n).on.on(t):this.each(ES(n,t,e))}function CS(t){return function(){var e=this.parentNode;for(var n in this.__transition)if(+n!==t)return;e&&e.removeChild(this)}}function IS(){return this.on("end.remove",CS(this._id))}function RS(t){var e=this._name,n=this._id;typeof t!="function"&&(t=Vu(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,oa(c[f],e,n,f,c,we(l,n)));return new We(o,this._parents,e,n)}function NS(t){var e=this._name,n=this._id;typeof t!="function"&&(t=Rd(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=we(l,n),g=0,m=f.length;g<m;++g)(d=f[g])&&oa(d,e,n,g,f,p);o.push(f),a.push(l)}return new We(o,a,e,n)}var FS=pi.prototype.constructor;function GS(){return new FS(this._groups,this._parents)}function zS(t,e){var n,r,i;return function(){var o=mr(this,t),a=(this.style.removeProperty(t),mr(this,t));return o===a?null:o===n&&a===r?i:i=e(n=o,r=a)}}function mp(t){return function(){this.style.removeProperty(t)}}function OS(t,e,n){var r,i=n+"",o;return function(){var a=mr(this,t);return a===i?null:a===r?o:o=e(r=a,n)}}function US(t,e,n){var r,i,o;return function(){var a=mr(this,t),s=n(this),u=s+"";return s==null&&(u=s=(this.style.removeProperty(t),mr(this,t))),a===u?null:a===r&&u===i?o:(i=u,o=e(r=a,s))}}function BS(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=mp(e)):void 0;(c!==n||i!==l)&&(r=(n=c).copy()).on(a,i=l),u.on=r}}function YS(t,e,n){var r=(t+="")=="transform"?q$:gp;return e==null?this.styleTween(t,zS(t,r)).on("end.style."+t,mp(t)):typeof e=="function"?this.styleTween(t,US(t,r,cc(this,"style."+t,e))).each(BS(this._id,t)):this.styleTween(t,OS(t,r,e),n).on("end.style."+t,null)}function HS(t,e,n){return function(r){this.style.setProperty(t,e.call(this,r),n)}}function WS(t,e,n){var r,i;function o(){var a=e.apply(this,arguments);return a!==i&&(r=(i=a)&&HS(t,a,n)),r}return o._value=e,o}function qS(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,WS(t,e,n??""))}function jS(t){return function(){this.textContent=t}}function XS(t){return function(){var e=t(this);this.textContent=e??""}}function VS(t){return this.tween("text",typeof t=="function"?XS(cc(this,"text",t)):jS(t==null?"":t+""))}function ZS(t){return function(e){this.textContent=t.call(this,e)}}function KS(t){var e,n;function r(){var i=t.apply(this,arguments);return i!==n&&(e=(n=i)&&ZS(i)),e}return r._value=t,r}function QS(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,KS(t))}function JS(){for(var t=this._name,e=this._id,n=yp(),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=we(u,e);oa(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 t3(){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 e3=0;function We(t,e,n,r){this._groups=t,this._parents=e,this._name=n,this._id=r}function yp(){return++e3}var qe=pi.prototype;We.prototype={constructor:We,select:RS,selectAll:NS,selectChild:qe.selectChild,selectChildren:qe.selectChildren,filter:PS,merge:DS,selection:GS,transition:JS,call:qe.call,nodes:qe.nodes,node:qe.node,size:qe.size,empty:qe.empty,each:qe.each,on:kS,attr:hS,attrTween:yS,style:YS,styleTween:qS,text:VS,textTween:QS,remove:IS,tween:oS,delay:xS,duration:$S,ease:AS,easeVarying:TS,end:t3,[Symbol.iterator]:qe[Symbol.iterator]};function n3(t){return((t*=2)<=1?t*t*t:(t-=2)*t*t+2)/2}var r3={time:null,delay:0,duration:250,ease:n3};function i3(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 o3(t){var e,n;t instanceof We?(e=t._id,t=t._name):(e=yp(),(n=r3).time=ic(),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])&&oa(u,t,e,c,a,n||i3(u,e));return new We(r,this._parents,t,e)}pi.prototype.interrupt=nS,pi.prototype.transition=o3;function a3(t){return Math.abs(t=Math.round(t))>=1e21?t.toLocaleString("en").replace(/,/g,""):t.toString(10)}function aa(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 vr(t){return t=aa(Math.abs(t)),t?t[1]:NaN}function s3(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 u3(t){return function(e){return e.replace(/[0-9]/g,function(n){return t[+n]})}}var c3=/^(?:(.)?([<>=^]))?([+\-( ])?([$#])?(0)?(\d+)?(,)?(\.\d+)?(~)?([a-z%])?$/i;function sa(t){if(!(e=c3.exec(t)))throw new Error("invalid format: "+t);var e;return new lc({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]})}sa.prototype=lc.prototype;function lc(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+""}lc.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 l3(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 bp;function f3(t,e){var n=aa(t,e);if(!n)return t+"";var r=n[0],i=n[1],o=i-(bp=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")+aa(t,Math.max(0,e+o-1))[0]}function vp(t,e){var n=aa(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 xp={"%":(t,e)=>(t*100).toFixed(e),b:t=>Math.round(t).toString(2),c:t=>t+"",d:a3,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)=>vp(t*100,e),r:vp,s:f3,X:t=>Math.round(t).toString(16).toUpperCase(),x:t=>Math.round(t).toString(16)};function _p(t){return t}var wp=Array.prototype.map,$p=["y","z","a","f","p","n","µ","m","","k","M","G","T","P","E","Z","Y"];function h3(t){var e=t.grouping===void 0||t.thousands===void 0?_p:s3(wp.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?_p:u3(wp.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=sa(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"):xp[_]||(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:"",k=xp[_],$=/[defgprs%]/.test(_);v=v===void 0?6:/[gprs]/.test(_)?Math.max(1,Math.min(21,v)):Math.max(0,Math.min(20,v));function E(A){var I=w,D=S,T,C,P;if(_==="c")D=k(A)+D,A="";else{A=+A;var R=A<0||1/A<0;if(A=isNaN(A)?u:k(Math.abs(A),v),b&&(A=l3(A)),R&&+A==0&&p!=="+"&&(R=!1),I=(R?p==="("?p:s:p==="-"||p==="("?"":p)+I,D=(_==="s"?$p[8+bp/3]:"")+D+(R&&p==="("?")":""),$){for(T=-1,C=A.length;++T<C;)if(P=A.charCodeAt(T),48>P||P>57){D=(P===46?i+A.slice(T+1):A.slice(T))+D,A=A.slice(0,T);break}}}x&&!m&&(A=e(A,1/0));var G=I.length+A.length+D.length,M=G<y?new Array(y-G+1).join(f):"";switch(x&&m&&(A=e(M+A,M.length?y-D.length:1/0),M=""),d){case"<":A=I+A+D+M;break;case"=":A=I+M+A+D;break;case"^":A=M.slice(0,G=M.length>>1)+I+A+D+M.slice(G);break;default:A=M+I+A+D;break}return o(A)}return E.toString=function(){return h+""},E}function l(h,f){var d=c((h=sa(h),h.type="f",h)),p=Math.max(-8,Math.min(8,Math.floor(vr(f)/3)))*3,g=Math.pow(10,-p),m=$p[8+p/3];return function(y){return d(g*y)+m}}return{format:c,formatPrefix:l}}var ua,Sp,Ap;d3({thousands:",",grouping:[3],currency:["$",""]});function d3(t){return ua=h3(t),Sp=ua.format,Ap=ua.formatPrefix,ua}function p3(t){return Math.max(0,-vr(Math.abs(t)))}function g3(t,e){return Math.max(0,Math.max(-8,Math.min(8,Math.floor(vr(e)/3)))*3-vr(Math.abs(t)))}function m3(t,e){return t=Math.abs(t),e=Math.abs(e)-t,Math.max(0,vr(e)-vr(t))+1}function ca(t,e){switch(arguments.length){case 0:break;case 1:this.range(t);break;default:this.range(e).domain(t);break}return this}const Mp=Symbol("implicit");function Tp(){var t=new Dd,e=[],n=[],r=Mp;function i(o){let a=t.get(o);if(a===void 0){if(r!==Mp)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 Dd;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 Tp(e,n).unknown(r)},ca.apply(i,arguments),i}function Pp(){var t=Tp().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=G_(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 Pp(e(),[r,i]).round(s).paddingInner(u).paddingOuter(c).align(l)},ca.apply(h(),arguments)}function Dp(t){var e=t.copy;return t.padding=t.paddingOuter,delete t.paddingInner,delete t.paddingOuter,t.copy=function(){return Dp(e())},t}function y3(){return Dp(Pp.apply(null,arguments).paddingInner(1))}function b3(t){return function(){return t}}function v3(t){return+t}var Lp=[0,1];function xr(t){return t}function fc(t,e){return(e-=t=+t)?function(n){return(n-t)/e}:b3(isNaN(e)?NaN:.5)}function x3(t,e){var n;return t>e&&(n=t,t=e,e=n),function(r){return Math.max(t,Math.min(e,r))}}function _3(t,e,n){var r=t[0],i=t[1],o=e[0],a=e[1];return i<r?(r=fc(i,r),o=n(a,o)):(r=fc(r,i),o=n(o,a)),function(s){return o(r(s))}}function w3(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]=fc(t[a],t[a+1]),o[a]=n(e[a],e[a+1]);return function(s){var u=Pd(t,s,1,r)-1;return o[u](i[u](s))}}function $3(t,e){return e.domain(t.domain()).range(t.range()).interpolate(t.interpolate()).clamp(t.clamp()).unknown(t.unknown())}function S3(){var t=Lp,e=Lp,n=rc,r,i,o,a=xr,s,u,c;function l(){var f=Math.min(t.length,e.length);return a!==xr&&(a=x3(t[0],t[f-1])),s=f>2?w3:_3,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),_e)))(f)))},h.domain=function(f){return arguments.length?(t=Array.from(f,v3),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=Y$,l()},h.clamp=function(f){return arguments.length?(a=f?!0:xr,l()):a!==xr},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 A3(){return S3()(xr,xr)}function M3(t,e,n,r){var i=F_(t,e,n),o;switch(r=sa(r??",f"),r.type){case"s":{var a=Math.max(Math.abs(t),Math.abs(e));return r.precision==null&&!isNaN(o=g3(i,a))&&(r.precision=o),Ap(r,a)}case"":case"e":case"g":case"p":case"r":{r.precision==null&&!isNaN(o=m3(i,Math.max(Math.abs(t),Math.abs(e))))&&(r.precision=o-(r.type==="e"));break}case"f":case"%":{r.precision==null&&!isNaN(o=p3(i))&&(r.precision=o-(r.type==="%")*2);break}}return Sp(r)}function Ep(t){var e=t.domain;return t.ticks=function(n){var r=e();return N_(r[0],r[r.length-1],n??10)},t.tickFormat=function(n,r){var i=e();return M3(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=ju(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 kp(){var t=A3();return t.copy=function(){return $3(t,kp())},ca.apply(t,arguments),Ep(t)}function Cp(){var t=0,e=1,n=1,r=[.5],i=[0,1],o;function a(u){return u!=null&&u<=u?i[Pd(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 Cp().domain([t,e]).range(i).unknown(o)},ca.apply(Ep(a),arguments)}function wi(t,e,n){this.k=t,this.x=e,this.y=n}wi.prototype={constructor:wi,scale:function(t){return t===1?this:new wi(this.k*t,this.x,this.y)},translate:function(t,e){return t===0&e===0?this:new wi(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+")"}},wi.prototype;function la(t){return Object.prototype.toString.call(t)==="[object Object]"}function hc(t,e){if(la(t)===!1||la(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;la(r[a])&&la(i[a])?(s=n(r[a],i[a]),o[a]=s):o[a]=r[a]}return o};return n(t,e)}var dc=function(t,e){return dc=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])},dc(t,e)};function je(t,e){if(typeof e!="function"&&e!==null)throw new TypeError("Class extends value "+String(e)+" is not a constructor or null");dc(t,e);function n(){this.constructor=t}t.prototype=e===null?Object.create(e):(n.prototype=e.prototype,new n)}function T3(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 Ip(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 _r(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 $i(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 Si(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 wr(t){return this instanceof wr?(this.v=t,this):new wr(t)}function P3(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 wr?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 D3(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 _r=="function"?_r(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 pc(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 gc=pc(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 fa(t,e){if(t){var n=t.indexOf(e);0<=n&&t.splice(n,1)}}var Si=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=_r(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 pc?g.errors:[g]}var h=this._finalizers;if(h){this._finalizers=null;try{for(var f=_r(h),d=f.next();!d.done;d=f.next()){var p=d.value;try{Ip(p)}catch(g){o=o??[],g instanceof pc?o=$i($i([],wi(o)),wi(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 pc(o)}},t.prototype.add=function(e){var n;if(e&&e!==this)if(this.closed)Ip(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)&&fa(n,e)},t.prototype.remove=function(e){var n=this._finalizers;n&&fa(n,e),e instanceof t&&e._removeParent(this)},t.EMPTY=function(){var e=new t;return e.closed=!0,e}(),t}(),kp=Si.EMPTY;function Cp(t){return t instanceof Si||t&&"closed"in t&&Pt(t.remove)&&Pt(t.add)&&Pt(t.unsubscribe)}function Ip(t){Pt(t)?t():t.unsubscribe()}var Rp={onUnhandledError:null,onStoppedNotification:null,Promise:void 0,useDeprecatedSynchronousErrorHandling:!1,useDeprecatedNextContext:!1},M3={setTimeout:function(t,e){for(var n=[],r=2;r<arguments.length;r++)n[r-2]=arguments[r];return setTimeout.apply(void 0,$i([t,e],wi(n)))},clearTimeout:function(t){return clearTimeout(t)},delegate:void 0};function Np(t){M3.setTimeout(function(){throw t})}function gc(){}function ha(t){t()}var mc=function(t){qe(e,t);function e(n){var r=t.call(this)||this;return r.isStopped=!1,n?(r.destination=n,Cp(n)&&n.add(r)):r.destination=L3,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}(Si),T3=Function.prototype.bind;function yc(t,e){return T3.call(t,e)}var P3=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){da(r)}},t.prototype.error=function(e){var n=this.partialObserver;if(n.error)try{n.error(e)}catch(r){da(r)}else da(e)},t.prototype.complete=function(){var e=this.partialObserver;if(e.complete)try{e.complete()}catch(n){da(n)}},t}(),Ai=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&&Rp.useDeprecatedNextContext?(s=Object.create(n),s.unsubscribe=function(){return o.unsubscribe()},a={next:n.next&&yc(n.next,s),error:n.error&&yc(n.error,s),complete:n.complete&&yc(n.complete,s)}):a=n}return o.destination=new P3(a),o}return e}(mc);function da(t){Np(t)}function D3(t){throw t}var L3={closed:!0,next:gc,error:D3,complete:gc},bc=function(){return typeof Symbol=="function"&&Symbol.observable||"@@observable"}();function Fp(t){return t}function E3(t){return t.length===0?Fp:t.length===1?t[0]:function(e){return t.reduce(function(n,r){return r(n)},e)}}var $e=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=C3(e)?e:new Ai(e,n,r);return ha(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=Gp(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[bc]=function(){return this},t.prototype.pipe=function(){for(var e=[],n=0;n<arguments.length;n++)e[n]=arguments[n];return E3(e)(this)},t.prototype.toPromise=function(e){var n=this;return e=Gp(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 Gp(t){var e;return(e=t??Rp.Promise)!==null&&e!==void 0?e:Promise}function k3(t){return t&&Pt(t.next)&&Pt(t.error)&&Pt(t.complete)}function C3(t){return t&&t instanceof mc||k3(t)&&Cp(t)}function I3(t){return Pt(t==null?void 0:t.lift)}function Ln(t){return function(e){if(I3(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 Mi(t,e,n,r,i){return new R3(t,e,n,r,i)}var R3=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}(mc),N3=dc(function(t){return function(){t(this),this.name="ObjectUnsubscribedError",this.message="object unsubscribed"}}),Ti=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 zp(this,this);return r.operator=n,r},e.prototype._throwIfClosed=function(){if(this.closed)throw new N3},e.prototype.next=function(n){var r=this;ha(function(){var i,o;if(r._throwIfClosed(),!r.isStopped){r.currentObservers||(r.currentObservers=Array.from(r.observers));try{for(var a=_r(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;ha(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;ha(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?kp:(this.currentObservers=null,s.push(n),new Si(function(){r.currentObservers=null,fa(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 $e;return n.source=this,n},e.create=function(n,r){return new zp(n,r)},e}($e),zp=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:kp},e}(Ti),vc={now:function(){return(vc.delegate||Date).now()},delegate:void 0},F3=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=vc);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}(Ti),G3=function(t){qe(e,t);function e(n,r){return t.call(this)||this}return e.prototype.schedule=function(n,r){return this},e}(Si),Op={setInterval:function(t,e){for(var n=[],r=2;r<arguments.length;r++)n[r-2]=arguments[r];return setInterval.apply(void 0,$i([t,e],wi(n)))},clearInterval:function(t){return clearInterval(t)},delegate:void 0},z3=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),Op.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&&Op.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,fa(o,this),r!=null&&(this.id=this.recycleAsyncId(i,r,null)),this.delay=null,t.prototype.unsubscribe.call(this)}},e}(G3),Up=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=vc.now,t}(),O3=function(t){qe(e,t);function e(n,r){r===void 0&&(r=Up.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}(Up);new O3(z3);function U3(t){return t&&Pt(t.schedule)}function B3(t){return t[t.length-1]}function Bp(t){return U3(B3(t))?t.pop():void 0}var Yp=function(t){return t&&typeof t.length=="number"&&typeof t!="function"};function Wp(t){return Pt(t==null?void 0:t.then)}function Hp(t){return Pt(t[bc])}function qp(t){return Symbol.asyncIterator&&Pt(t==null?void 0:t[Symbol.asyncIterator])}function Xp(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 Y3(){return typeof Symbol!="function"||!Symbol.iterator?"@@iterator":Symbol.iterator}var jp=Y3();function Vp(t){return Pt(t==null?void 0:t[jp])}function Zp(t){return S3(this,arguments,function(){var e,n,r,i;return Ep(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,wr(e.read())];case 3:return n=o.sent(),r=n.value,i=n.done,i?[4,wr(void 0)]:[3,5];case 4:return[2,o.sent()];case 5:return[4,wr(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 Kp(t){return Pt(t==null?void 0:t.getReader)}function cn(t){if(t instanceof $e)return t;if(t!=null){if(Hp(t))return W3(t);if(Yp(t))return H3(t);if(Wp(t))return q3(t);if(qp(t))return Qp(t);if(Vp(t))return X3(t);if(Kp(t))return j3(t)}throw Xp(t)}function W3(t){return new $e(function(e){var n=t[bc]();if(Pt(n.subscribe))return n.subscribe(e);throw new TypeError("Provided object does not correctly implement Symbol.observable")})}function H3(t){return new $e(function(e){for(var n=0;n<t.length&&!e.closed;n++)e.next(t[n]);e.complete()})}function q3(t){return new $e(function(e){t.then(function(n){e.closed||(e.next(n),e.complete())},function(n){return e.error(n)}).then(null,Np)})}function X3(t){return new $e(function(e){var n,r;try{for(var i=_r(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 Qp(t){return new $e(function(e){V3(t,e).catch(function(n){return e.error(n)})})}function j3(t){return Qp(Zp(t))}function V3(t,e){var n,r,i,o;return $3(this,void 0,void 0,function(){var a,s;return Ep(this,function(u){switch(u.label){case 0:u.trys.push([0,5,6,11]),n=A3(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 Jp(t,e){return e===void 0&&(e=0),Ln(function(n,r){n.subscribe(Mi(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 tg(t,e){return e===void 0&&(e=0),Ln(function(n,r){r.add(t.schedule(function(){return n.subscribe(r)},e))})}function Z3(t,e){return cn(t).pipe(tg(e),Jp(e))}function K3(t,e){return cn(t).pipe(tg(e),Jp(e))}function Q3(t,e){return new $e(function(n){var r=0;return e.schedule(function(){r===t.length?n.complete():(n.next(t[r++]),n.closed||this.schedule())})})}function J3(t,e){return new $e(function(n){var r;return En(n,e,function(){r=t[jp](),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 eg(t,e){if(!t)throw new Error("Iterable cannot be null");return new $e(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 tA(t,e){return eg(Zp(t),e)}function eA(t,e){if(t!=null){if(Hp(t))return Z3(t,e);if(Yp(t))return Q3(t,e);if(Wp(t))return K3(t,e);if(qp(t))return eg(t,e);if(Vp(t))return J3(t,e);if(Kp(t))return tA(t,e)}throw Xp(t)}function nA(t,e){return e?eA(t,e):cn(t)}dc(function(t){return function(){t(this),this.name="EmptyError",this.message="no elements in sequence"}});function ng(t,e){return Ln(function(n,r){var i=0;n.subscribe(Mi(r,function(o){r.next(t.call(e,o,i++))}))})}function rA(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(Mi(e,function(y){e.next(y)},function(){m=!0},void 0,function(){if(m)try{c--;for(var y=function(){var v=u.shift();a||p(v)};u.length&&c<r;)y();f()}catch(v){e.error(v)}}))};return t.subscribe(Mi(e,d,function(){h=!0,f()})),function(){}}function rg(t,e,n){return n===void 0&&(n=1/0),Pt(e)?rg(function(r,i){return ng(function(o,a){return e(r,o,i,a)})(cn(t(r,i)))},n):(typeof e=="number"&&(n=e),Ln(function(r,i){return rA(r,i,t,n)}))}function iA(t){return rg(Fp,t)}function oA(){return iA(1)}function ig(){for(var t=[],e=0;e<arguments.length;e++)t[e]=arguments[e];return oA()(nA(t,Bp(t)))}function aA(t){t===void 0&&(t={});var e=t.connector,n=e===void 0?function(){return new Ti}: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},v=function(){var x=l;y(),x==null||x.unsubscribe()};return Ln(function(x,b){d++,!g&&!p&&m();var w=f=f??n();b.add(function(){d--,d===0&&!g&&!p&&(h=xc(v,u))}),w.subscribe(b),!l&&d>0&&(l=new Ai({next:function($){return w.next($)},error:function($){g=!0,m(),h=xc(y,i,$),w.error($)},complete:function(){p=!0,m(),h=xc(y,a),w.complete()}}),cn(x).subscribe(l))})(c)}}function xc(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 cn(e.apply(void 0,$i([],wi(n)))).subscribe(i)}}function sA(t,e,n){var r,i=!1;return r=t,aA({connector:function(){return new F3(r,e,n)},resetOnError:!0,resetOnComplete:!1,resetOnRefCountZero:i})}function uA(){for(var t=[],e=0;e<arguments.length;e++)t[e]=arguments[e];var n=Bp(t);return Ln(function(r,i){(n?ig(t,r,n):ig(t,r)).subscribe(i)})}function cA(t){return Ln(function(e,n){cn(t).subscribe(Mi(n,function(){return n.complete()},gc)),!n.closed&&e.subscribe(n)})}const og=({maxValue:t=1,minValue:e=0,axisWidth:n,scaleDomain:r=gr.scaleDomain,scaleRange:i=gr.scaleRange})=>{const o=r[0]??gr.scaleDomain[0],a=r[1]??gr.scaleDomain[1],s=i[0]??gr.scaleRange[0],u=i[1]??gr.scaleRange[1],c=o==="auto"?e:o,l=a==="auto"?t:a,h=t-(t-c)/(1-s),f=l/u;return Dp().domain([h,f]).range([0,n])},ag=({axisLabels:t,axisWidth:e,padding:n=.5})=>{let r=[0,e];return d3().domain(t).range(r).padding(n)},lA=({axisLabels:t,axisWidth:e,padding:n=.5,reverse:r=!1})=>{let i=t.map((o,a)=>a);return r&&i.reverse(),Lp().domain([-0,e+0]).range(i)};function fA({name:t,defaultParams:e,initFn:n}){const r=new Ti,i=new Ti,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=fc(c,e)},setContext:c=>{s=c,s.observer.fullParams$=i.pipe(cA(r),uA({}),ng(l=>fc(l,u)),sA(1))}}}const Pi=()=>function(t,e){return function(n){return class{constructor(){const r=fA({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}}}},Di=Pi(),ae=Pi(),Xe=Pi(),sg=Pi(),ug=Pi();function _t(t,e){return t==null||e==null?NaN:t<e?-1:t>e?1:t>=e?0:NaN}function cg(t,e){return t==null||e==null?NaN:e<t?-1:e>t?1:e>=t?0:NaN}function pa(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===cg?t:hA,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 hA(){return 0}function ga(t){return t===null?NaN:+t}function*dA(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 lg=pa(_t),fg=lg.right,pA=lg.left,gA=pa(ga).center,kn=fg;function mA(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=_c(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 hg=dg(_c),yA=dg(bA);function dg(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?($r(s,c,i,o,a),$r(s,i,c,o,a),$r(s,c,i,o,a),Sr(u,i,c,o,a),Sr(u,c,i,o,a),Sr(u,i,c,o,a)):s?($r(s,i,c,o,a),$r(s,c,i,o,a),$r(s,i,c,o,a)):u&&(Sr(u,i,c,o,a),Sr(u,c,i,o,a),Sr(u,i,c,o,a)),e}}function $r(t,e,n,r,i){for(let o=0,a=r*i;o<a;)t(e,n,o,o+=r,1)}function Sr(t,e,n,r,i){for(let o=0,a=r*i;o<r;++o)t(e,n,o,o+a,r)}function bA(t){const e=_c(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 _c(t){const e=Math.floor(t);if(e===t)return vA(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 vA(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 ma(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 xA(t){return t.length|0}function _A(t){return!(t>0)}function wA(t){return typeof t!="object"||"length"in t?t:Array.from(t)}function $A(t){return e=>t(...e)}function SA(...t){const e=typeof t[t.length-1]=="function"&&$A(t.pop());t=t.map(wA);const n=t.map(xA),r=t.length-1,i=new Array(r+1).fill(0),o=[];if(r<0||n.some(_A))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 AA(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 pg(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 gg(t,e){const n=pg(t,e);return n&&Math.sqrt(n)}function Li(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 MA(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 TA(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 Ei extends Map{constructor(e,n=bg){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(wc(this,e))}has(e){return super.has(wc(this,e))}set(e,n){return super.set(mg(this,e),n)}delete(e){return super.delete(yg(this,e))}}class Cn extends Set{constructor(e,n=bg){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(wc(this,e))}add(e){return super.add(mg(this,e))}delete(e){return super.delete(yg(this,e))}}function wc({_intern:t,_key:e},n){const r=e(n);return t.has(r)?t.get(r):n}function mg({_intern:t,_key:e},n){const r=e(n);return t.has(r)?t.get(r):(t.set(r,n),n)}function yg({_intern:t,_key:e},n){const r=e(n);return t.has(r)&&(n=t.get(r),t.delete(r)),n}function bg(t){return t!==null&&typeof t=="object"?t.valueOf():t}function Ar(t){return t}function vg(t,...e){return Mr(t,Ar,Ar,e)}function xg(t,...e){return Mr(t,Array.from,Ar,e)}function _g(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 PA(t,...e){return _g(xg(t,...e),e)}function DA(t,e,...n){return _g($g(t,e,...n),n)}function wg(t,e,...n){return Mr(t,Ar,e,n)}function $g(t,e,...n){return Mr(t,Array.from,e,n)}function LA(t,...e){return Mr(t,Ar,Sg,e)}function EA(t,...e){return Mr(t,Array.from,Sg,e)}function Sg(t){if(t.length!==1)throw new Error("duplicate key");return t[0]}function Mr(t,e,n,r){return function i(o,a){if(a>=r.length)return n(o);const s=new Ei,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 Ag(t,e){return Array.from(e,n=>t[n])}function $c(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=Tr(a[i],a[o]);if(s)return s}})):(n=t.map(n),r.sort((i,o)=>Tr(n[i],n[o]))),Ag(t,r)}return t.sort(Sc(n))}function Sc(t=_t){if(t===_t)return Tr;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 Tr(t,e){return(t==null||!(t>=t))-(e==null||!(e>=e))||(t<e?-1:t>e?1:0)}function kA(t,e,n){return(e.length!==2?$c(wg(t,e,n),([r,i],[o,a])=>_t(i,a)||_t(r,o)):$c(vg(t,n),([r,i],[o,a])=>e(i,a)||_t(r,o))).map(([r])=>r)}var CA=Array.prototype,IA=CA.slice;function Ac(t){return()=>t}const RA=Math.sqrt(50),NA=Math.sqrt(10),FA=Math.sqrt(2);function ya(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>=RA?10:o>=NA?5:o>=FA?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?ya(t,e,n*2):[s,u,c]}function In(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?ya(e,t,n):ya(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,ya(t,e,n)[2]}function ba(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 Mc(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 Tc(t){return Math.max(1,Math.ceil(Math.log(ma(t))/Math.LN2)+1)}function Mg(){var t=Ar,e=Li,n=Tc;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===Li&&([h,f]=Mc(h,f,b)),d=In(h,f,b),d[0]<=h&&(u=Rn(h,f,b)),d[d.length-1]>=f)if(x>=f&&e===Li){const w=Rn(h,f,b);isFinite(w)&&(w>0?f=(Math.floor(f/w)+1)*w:w<0&&(f=(Math.ceil(f*-w)+1)/-w))}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),v;for(o=0;o<=p;++o)v=y[o]=[],v.x0=o>0?d[o-1]:h,v.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[kn(d,s,0,p)].push(i[o]);return y}return r.value=function(i){return arguments.length?(t=typeof i=="function"?i:Ac(i),r):t},r.domain=function(i){return arguments.length?(e=typeof i=="function"?i:Ac([i[0],i[1]]),r):e},r.thresholds=function(i){return arguments.length?(n=typeof i=="function"?i:Ac(Array.isArray(i)?IA.call(i):i),r):n},r}function ki(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 Pc(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 va(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 Dc(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 xa(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?Tr:Sc(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));xa(t,e,d,p,i)}const o=t[e];let a=n,s=r;for(Ci(t,n,e),i(t[r],o)>0&&Ci(t,n,r);a<s;){for(Ci(t,a,s),++a,--s;i(t[a],o)<0;)++a;for(;i(t[s],o)>0;)--s}i(t[n],o)===0?Ci(t,n,s):(++s,Ci(t,s,r)),s<=e&&(n=s+1),e<=s&&(r=s-1)}return t}function Ci(t,e,n){const r=t[e];t[e]=t[n],t[n]=r}function Tg(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 Ii(t,e,n){if(t=Float64Array.from(dA(t,n)),!(!(r=t.length)||isNaN(e=+e))){if(e<=0||r<2)return va(t);if(e>=1)return ki(t);var r,i=(r-1)*e,o=Math.floor(i),a=ki(xa(t,o).subarray(0,o+1)),s=va(t.subarray(o+1));return a+(s-a)*(i-o)}}function Pg(t,e,n=ga){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 Dg(t,e,n=ga){if(!isNaN(e=+e)){if(r=Float64Array.from(t,(s,u)=>ga(n(t[u],u,t))),e<=0)return Dc(r);if(e>=1)return Pc(r);var r,i=Uint32Array.from(t,(s,u)=>u),o=r.length-1,a=Math.floor(o*e);return xa(i,a,0,o,(s,u)=>Tr(r[s],r[u])),a=Tg(i.subarray(0,a+1),s=>r[s]),a>=0?a:-1}}function GA(t,e,n){const r=ma(t),i=Ii(t,.75)-Ii(t,.25);return r&&i?Math.ceil((n-e)/(2*i*Math.pow(r,-1/3))):1}function zA(t,e,n){const r=ma(t),i=gg(t);return r&&i?Math.ceil((n-e)*Math.cbrt(r)/(3.49*i)):1}function OA(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 UA(t,e){return Ii(t,.5,e)}function BA(t,e){return Dg(t,.5,e)}function*YA(t){for(const e of t)yield*e}function Lc(t){return Array.from(YA(t))}function WA(t,e){const n=new Ei;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 HA(t,e=qA){const n=[];let r,i=!1;for(const o of t)i&&n.push(e(r,o)),r=o,i=!0;return n}function qA(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 XA(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)=>Tr(n[s],n[u]):Sc(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 jA(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 Lg(t,e=_t){if(e.length===1)return Dc(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 VA(t,e=_t){if(e.length===1)return Pc(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 ZA(t,e){const n=Lg(t,e);return n<0?void 0:n}const KA=Eg(Math.random);function Eg(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 QA(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 kg(t){if(!(o=t.length))return[];for(var e=-1,n=va(t,JA),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 JA(t){return t.length}function t5(){return kg(arguments)}function e5(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 n5(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 r5(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 i5(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 o5(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 a5(t){if(typeof t[Symbol.iterator]!="function")throw new TypeError("values is not iterable");return Array.from(t).reverse()}function s5(t,...e){t=new Cn(t);for(const n of e)for(const r of n)t.delete(r);return t}function u5(t,e){const n=e[Symbol.iterator](),r=new Cn;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 c5(t,...e){t=new Cn(t),e=e.map(l5);t:for(const n of t)for(const r of e)if(!r.has(n)){t.delete(n);continue t}return t}function l5(t){return t instanceof Cn?t:new Cn(t)}function Cg(t,e){const n=t[Symbol.iterator](),r=new Set;for(const i of e){const o=Ig(i);if(r.has(o))continue;let a,s;for(;{value:a,done:s}=n.next();){if(s)return!1;const u=Ig(a);if(r.add(u),Object.is(o,u))break}}return!0}function Ig(t){return t!==null&&typeof t=="object"?t.valueOf():t}function f5(t,e){return Cg(e,t)}function h5(...t){const e=new Cn;for(const n of t)for(const r of n)e.add(r);return e}function d5(t){return t}var _a=1,wa=2,Ec=3,Ri=4,Rg=1e-6;function p5(t){return"translate("+t+",0)"}function g5(t){return"translate(0,"+t+")"}function m5(t){return e=>+t(e)}function y5(t,e){return e=Math.max(0,t.bandwidth()-e*2)/2,t.round()&&(e=Math.round(e)),n=>+t(n)+e}function b5(){return!this.__axis}function $a(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===_a||t===Ri?-1:1,l=t===Ri||t===wa?"x":"y",h=t===_a||t===Ec?p5:g5;function f(d){var p=r??(e.ticks?e.ticks.apply(e,n):e.domain()),g=i??(e.tickFormat?e.tickFormat.apply(e,n):d5),m=Math.max(o,0)+s,y=e.range(),v=+y[0]+u,x=+y[y.length-1]+u,b=(e.bandwidth?y5:m5)(e.copy(),u),w=d.selection?d.selection():d,$=w.selectAll(".domain").data([null]),A=w.selectAll(".tick").data(p,e).order(),_=A.exit(),L=A.enter().append("g").attr("class","tick"),E=A.select("line"),T=A.select("text");$=$.merge($.enter().insert("path",".tick").attr("class","domain").attr("stroke","currentColor")),A=A.merge(L),E=E.merge(L.append("line").attr("stroke","currentColor").attr(l+"2",c*o)),T=T.merge(L.append("text").attr("fill","currentColor").attr(l,c*m).attr("dy",t===_a?"0em":t===Ec?"0.71em":"0.32em")),d!==w&&($=$.transition(d),A=A.transition(d),E=E.transition(d),T=T.transition(d),_=_.transition(d).attr("opacity",Rg).attr("transform",function(I){return isFinite(I=b(I))?h(I+u):this.getAttribute("transform")}),L.attr("opacity",Rg).attr("transform",function(I){var P=this.parentNode.__axis;return h((P&&isFinite(P=P(I))?P:b(I))+u)})),_.remove(),$.attr("d",t===Ri||t===wa?a?"M"+c*a+","+v+"H"+u+"V"+x+"H"+c*a:"M"+u+","+v+"V"+x:a?"M"+v+","+c*a+"V"+u+"H"+x+"V"+c*a:"M"+v+","+u+"H"+x),A.attr("opacity",1).attr("transform",function(I){return h(b(I)+u)}),E.attr(l+"2",c*o),T.attr(l,c*m).text(g),w.filter(b5).attr("fill","none").attr("font-size",10).attr("font-family","sans-serif").attr("text-anchor",t===wa?"start":t===Ri?"end":"middle"),w.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 Ng(t){return $a(_a,t)}function v5(t){return $a(wa,t)}function x5(t){return $a(Ec,t)}function Fg(t){return $a(Ri,t)}var _5={value:()=>{}};function Nn(){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 Sa(n)}function Sa(t){this._=t}function w5(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}})}Sa.prototype=Nn.prototype={constructor:Sa,on:function(t,e){var n=this._,r=w5(t+"",n),i,o=-1,a=r.length;if(arguments.length<2){for(;++o<a;)if((i=(t=r[o]).type)&&(i=$5(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]=Gg(n[i],t.name,e);else if(e==null)for(i in n)n[i]=Gg(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 Sa(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 $5(t,e){for(var n=0,r=t.length,i;n<r;++n)if((i=t[n]).name===e)return i.value}function Gg(t,e,n){for(var r=0,i=t.length;r<i;++r)if(t[r].name===e){t[r]=_5,t=t.slice(0,r).concat(t.slice(r+1));break}return n!=null&&t.push({name:e,value:n}),t}var kc="http://www.w3.org/1999/xhtml";const Cc={svg:"http://www.w3.org/2000/svg",xhtml:kc,xlink:"http://www.w3.org/1999/xlink",xml:"http://www.w3.org/XML/1998/namespace",xmlns:"http://www.w3.org/2000/xmlns/"};function Ni(t){var e=t+="",n=e.indexOf(":");return n>=0&&(e=t.slice(0,n))!=="xmlns"&&(t=t.slice(n+1)),Cc.hasOwnProperty(e)?{space:Cc[e],local:t}:t}function S5(t){return function(){var e=this.ownerDocument,n=this.namespaceURI;return n===kc&&e.documentElement.namespaceURI===kc?e.createElement(t):e.createElementNS(n,t)}}function A5(t){return function(){return this.ownerDocument.createElementNS(t.space,t.local)}}function Aa(t){var e=Ni(t);return(e.local?A5:S5)(e)}function M5(){}function Ma(t){return t==null?M5:function(){return this.querySelector(t)}}function T5(t){typeof t!="function"&&(t=Ma(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 zg(t){return t==null?[]:Array.isArray(t)?t:Array.from(t)}function P5(){return[]}function Ic(t){return t==null?P5:function(){return this.querySelectorAll(t)}}function D5(t){return function(){return zg(t.apply(this,arguments))}}function L5(t){typeof t=="function"?t=D5(t):t=Ic(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 Rc(t){return function(){return this.matches(t)}}function Og(t){return function(e){return e.matches(t)}}var E5=Array.prototype.find;function k5(t){return function(){return E5.call(this.children,t)}}function C5(){return this.firstElementChild}function I5(t){return this.select(t==null?C5:k5(typeof t=="function"?t:Og(t)))}var R5=Array.prototype.filter;function N5(){return Array.from(this.children)}function F5(t){return function(){return R5.call(this.children,t)}}function G5(t){return this.selectAll(t==null?N5:F5(typeof t=="function"?t:Og(t)))}function z5(t){typeof t!="function"&&(t=Rc(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 Ug(t){return new Array(t.length)}function O5(){return new Yt(this._enter||this._groups.map(Ug),this._parents)}function Ta(t,e){this.ownerDocument=t.ownerDocument,this.namespaceURI=t.namespaceURI,this._next=null,this._parent=t,this.__data__=e}Ta.prototype={constructor:Ta,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 U5(t){return function(){return t}}function B5(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 Ta(t,o[a]);for(;a<u;++a)(s=e[a])&&(i[a]=s)}function Y5(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 Ta(t,o[s]);for(s=0;s<l;++s)(u=e[s])&&c.get(f[s])===u&&(i[s]=u)}function W5(t){return t.__data__}function H5(t,e){if(!arguments.length)return Array.from(this,W5);var n=e?Y5:B5,r=this._parents,i=this._groups;typeof t!="function"&&(t=U5(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=q5(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 v=0,x=0,b,w;v<p;++v)if(b=g[v]){for(v>=x&&(x=v+1);!(w=m[x])&&++x<p;);b._next=w||null}}return a=new Yt(a,r),a._enter=s,a._exit=u,a}function q5(t){return typeof t=="object"&&"length"in t?t:Array.from(t)}function X5(){return new Yt(this._exit||this._groups.map(Ug),this._parents)}function j5(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 V5(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 Z5(){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 K5(t){t||(t=Q5);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 Q5(t,e){return t<e?-1:t>e?1:t>=e?0:NaN}function J5(){var t=arguments[0];return arguments[0]=this,t.apply(null,arguments),this}function t6(){return Array.from(this)}function e6(){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 n6(){let t=0;for(const e of this)++t;return t}function r6(){return!this.node()}function i6(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 o6(t){return function(){this.removeAttribute(t)}}function a6(t){return function(){this.removeAttributeNS(t.space,t.local)}}function s6(t,e){return function(){this.setAttribute(t,e)}}function u6(t,e){return function(){this.setAttributeNS(t.space,t.local,e)}}function c6(t,e){return function(){var n=e.apply(this,arguments);n==null?this.removeAttribute(t):this.setAttribute(t,n)}}function l6(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 f6(t,e){var n=Ni(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?a6:o6:typeof e=="function"?n.local?l6:c6:n.local?u6:s6)(n,e))}function Nc(t){return t.ownerDocument&&t.ownerDocument.defaultView||t.document&&t||t.defaultView}function h6(t){return function(){this.style.removeProperty(t)}}function d6(t,e,n){return function(){this.style.setProperty(t,e,n)}}function p6(t,e,n){return function(){var r=e.apply(this,arguments);r==null?this.style.removeProperty(t):this.style.setProperty(t,r,n)}}function g6(t,e,n){return arguments.length>1?this.each((e==null?h6:typeof e=="function"?p6:d6)(t,e,n??"")):Fn(this.node(),t)}function Fn(t,e){return t.style.getPropertyValue(e)||Nc(t).getComputedStyle(t,null).getPropertyValue(e)}function m6(t){return function(){delete this[t]}}function y6(t,e){return function(){this[t]=e}}function b6(t,e){return function(){var n=e.apply(this,arguments);n==null?delete this[t]:this[t]=n}}function v6(t,e){return arguments.length>1?this.each((e==null?m6:typeof e=="function"?b6:y6)(t,e)):this.node()[t]}function Bg(t){return t.trim().split(/^|\s+/)}function Fc(t){return t.classList||new Yg(t)}function Yg(t){this._node=t,this._names=Bg(t.getAttribute("class")||"")}Yg.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 Wg(t,e){for(var n=Fc(t),r=-1,i=e.length;++r<i;)n.add(e[r])}function Hg(t,e){for(var n=Fc(t),r=-1,i=e.length;++r<i;)n.remove(e[r])}function x6(t){return function(){Wg(this,t)}}function _6(t){return function(){Hg(this,t)}}function w6(t,e){return function(){(e.apply(this,arguments)?Wg:Hg)(this,t)}}function $6(t,e){var n=Bg(t+"");if(arguments.length<2){for(var r=Fc(this.node()),i=-1,o=n.length;++i<o;)if(!r.contains(n[i]))return!1;return!0}return this.each((typeof e=="function"?w6:e?x6:_6)(n,e))}function S6(){this.textContent=""}function A6(t){return function(){this.textContent=t}}function M6(t){return function(){var e=t.apply(this,arguments);this.textContent=e??""}}function T6(t){return arguments.length?this.each(t==null?S6:(typeof t=="function"?M6:A6)(t)):this.node().textContent}function P6(){this.innerHTML=""}function D6(t){return function(){this.innerHTML=t}}function L6(t){return function(){var e=t.apply(this,arguments);this.innerHTML=e??""}}function E6(t){return arguments.length?this.each(t==null?P6:(typeof t=="function"?L6:D6)(t)):this.node().innerHTML}function k6(){this.nextSibling&&this.parentNode.appendChild(this)}function C6(){return this.each(k6)}function I6(){this.previousSibling&&this.parentNode.insertBefore(this,this.parentNode.firstChild)}function R6(){return this.each(I6)}function N6(t){var e=typeof t=="function"?t:Aa(t);return this.select(function(){return this.appendChild(e.apply(this,arguments))})}function F6(){return null}function G6(t,e){var n=typeof t=="function"?t:Aa(t),r=e==null?F6:typeof e=="function"?e:Ma(e);return this.select(function(){return this.insertBefore(n.apply(this,arguments),r.apply(this,arguments)||null)})}function z6(){var t=this.parentNode;t&&t.removeChild(this)}function O6(){return this.each(z6)}function U6(){var t=this.cloneNode(!1),e=this.parentNode;return e?e.insertBefore(t,this.nextSibling):t}function B6(){var t=this.cloneNode(!0),e=this.parentNode;return e?e.insertBefore(t,this.nextSibling):t}function Y6(t){return this.select(t?B6:U6)}function W6(t){return arguments.length?this.property("__data__",t):this.node().__data__}function H6(t){return function(e){t.call(this,e,this.__data__)}}function q6(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 X6(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 j6(t,e,n){return function(){var r=this.__on,i,o=H6(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 V6(t,e,n){var r=q6(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?j6:X6,i=0;i<o;++i)this.each(s(r[i],e,n));return this}function qg(t,e,n){var r=Nc(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 Z6(t,e){return function(){return qg(this,t,e)}}function K6(t,e){return function(){return qg(this,t,e.apply(this,arguments))}}function Q6(t,e){return this.each((typeof e=="function"?K6:Z6)(t,e))}function*J6(){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 Gc=[null];function Yt(t,e){this._groups=t,this._parents=e}function Gn(){return new Yt([[document.documentElement]],Gc)}function t8(){return this}Yt.prototype=Gn.prototype={constructor:Yt,select:T5,selectAll:L5,selectChild:I5,selectChildren:G5,filter:z5,data:H5,enter:O5,exit:X5,join:j5,merge:V5,selection:t8,order:Z5,sort:K5,call:J5,nodes:t6,node:e6,size:n6,empty:r6,each:i6,attr:f6,style:g6,property:v6,classed:$6,text:T6,html:E6,raise:C6,lower:R6,append:N6,insert:G6,remove:O6,clone:Y6,datum:W6,on:V6,dispatch:Q6,[Symbol.iterator]:J6};function V(t){return typeof t=="string"?new Yt([[document.querySelector(t)]],[document.documentElement]):new Yt([[t]],Gc)}function e8(t){return V(Aa(t).call(document.documentElement))}var n8=0;function Xg(){return new zc}function zc(){this._="@"+(++n8).toString(36)}zc.prototype=Xg.prototype={constructor:zc,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 jg(t){let e;for(;e=t.sourceEvent;)t=e;return t}function se(t,e){if(t=jg(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 r8(t,e){return t.target&&(t=jg(t),e===void 0&&(e=t.currentTarget),t=t.touches||[t]),Array.from(t,n=>se(n,e))}function i8(t){return typeof t=="string"?new Yt([document.querySelectorAll(t)],[document.documentElement]):new Yt([zg(t)],Gc)}const o8={passive:!1},Fi={capture:!0,passive:!1};function Oc(t){t.stopImmediatePropagation()}function Pr(t){t.preventDefault(),t.stopImmediatePropagation()}function Pa(t){var e=t.document.documentElement,n=V(t).on("dragstart.drag",Pr,Fi);"onselectstart"in e?n.on("selectstart.drag",Pr,Fi):(e.__noselect=e.style.MozUserSelect,e.style.MozUserSelect="none")}function Da(t,e){var n=t.document.documentElement,r=V(t).on("dragstart.drag",null);e&&(r.on("click.drag",Pr,Fi),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 La=t=>()=>t;function Uc(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}})}Uc.prototype.on=function(){var t=this._.on.apply(this._,arguments);return t===this._?this:t};function a8(t){return!t.ctrlKey&&!t.button}function s8(){return this.parentNode}function u8(t,e){return e??{x:t.x,y:t.y}}function c8(){return navigator.maxTouchPoints||"ontouchstart"in this}function Vg(){var t=a8,e=s8,n=u8,r=c8,i={},o=Nn("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,o8).on("touchend.drag touchcancel.drag",v).style("touch-action","none").style("-webkit-tap-highlight-color","rgba(0,0,0,0)")}function d(b,w){if(!(l||!t.call(this,b,w))){var $=x(this,e.call(this,b,w),b,w,"mouse");$&&(V(b.view).on("mousemove.drag",p,Fi).on("mouseup.drag",g,Fi),Pa(b.view),Oc(b),c=!1,s=b.clientX,u=b.clientY,$("start",b))}}function p(b){if(Pr(b),!c){var w=b.clientX-s,$=b.clientY-u;c=w*w+$*$>h}i.mouse("drag",b)}function g(b){V(b.view).on("mousemove.drag mouseup.drag",null),Da(b.view,c),Pr(b),i.mouse("end",b)}function m(b,w){if(t.call(this,b,w)){var $=b.changedTouches,A=e.call(this,b,w),_=$.length,L,E;for(L=0;L<_;++L)(E=x(this,A,b,w,$[L].identifier,$[L]))&&(Oc(b),E("start",b,$[L]))}}function y(b){var w=b.changedTouches,$=w.length,A,_;for(A=0;A<$;++A)(_=i[w[A].identifier])&&(Pr(b),_("drag",b,w[A]))}function v(b){var w=b.changedTouches,$=w.length,A,_;for(l&&clearTimeout(l),l=setTimeout(function(){l=null},500),A=0;A<$;++A)(_=i[w[A].identifier])&&(Oc(b),_("end",b,w[A]))}function x(b,w,$,A,_,L){var E=o.copy(),T=se(L||$,w),I,P,D;if((D=n.call(b,new Uc("beforestart",{sourceEvent:$,target:f,identifier:_,active:a,x:T[0],y:T[1],dx:0,dy:0,dispatch:E}),A))!=null)return I=D.x-T[0]||0,P=D.y-T[1]||0,function C(S,R,G){var M=T,N;switch(S){case"start":i[_]=C,N=a++;break;case"end":delete i[_],--a;case"drag":T=se(G||R,w),N=a;break}E.call(S,b,new Uc(S,{sourceEvent:R,subject:D,target:f,identifier:_,active:N,x:T[0]+I,y:T[1]+P,dx:T[0]-M[0],dy:T[1]-M[1],dispatch:E}),A)}}return f.filter=function(b){return arguments.length?(t=typeof b=="function"?b:La(!!b),f):t},f.container=function(b){return arguments.length?(e=typeof b=="function"?b:La(b),f):e},f.subject=function(b){return arguments.length?(n=typeof b=="function"?b:La(b),f):n},f.touchable=function(b){return arguments.length?(r=typeof b=="function"?b:La(!!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 Dr(t,e,n){t.prototype=e.prototype=n,n.constructor=t}function Gi(t,e){var n=Object.create(t.prototype);for(var r in e)n[r]=e[r];return n}function fn(){}var zn=.7,Lr=1/zn,Er="\\s*([+-]?\\d+)\\s*",zi="\\s*([+-]?(?:\\d*\\.)?\\d+(?:[eE][+-]?\\d+)?)\\s*",ke="\\s*([+-]?(?:\\d*\\.)?\\d+(?:[eE][+-]?\\d+)?)%\\s*",l8=/^#([0-9a-f]{3,8})$/,f8=new RegExp(`^rgb\\(${Er},${Er},${Er}\\)$`),h8=new RegExp(`^rgb\\(${ke},${ke},${ke}\\)$`),d8=new RegExp(`^rgba\\(${Er},${Er},${Er},${zi}\\)$`),p8=new RegExp(`^rgba\\(${ke},${ke},${ke},${zi}\\)$`),g8=new RegExp(`^hsl\\(${zi},${ke},${ke}\\)$`),m8=new RegExp(`^hsla\\(${zi},${ke},${ke},${zi}\\)$`),Zg={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};Dr(fn,hn,{copy(t){return Object.assign(new this.constructor,this,t)},displayable(){return this.rgb().displayable()},hex:Kg,formatHex:Kg,formatHex8:y8,formatHsl:b8,formatRgb:Qg,toString:Qg});function Kg(){return this.rgb().formatHex()}function y8(){return this.rgb().formatHex8()}function b8(){return r0(this).formatHsl()}function Qg(){return this.rgb().formatRgb()}function hn(t){var e,n;return t=(t+"").trim().toLowerCase(),(e=l8.exec(t))?(n=e[1].length,e=parseInt(e[1],16),n===6?Jg(e):n===3?new kt(e>>8&15|e>>4&240,e>>4&15|e&240,(e&15)<<4|e&15,1):n===8?Ea(e>>24&255,e>>16&255,e>>8&255,(e&255)/255):n===4?Ea(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=f8.exec(t))?new kt(e[1],e[2],e[3],1):(e=h8.exec(t))?new kt(e[1]*255/100,e[2]*255/100,e[3]*255/100,1):(e=d8.exec(t))?Ea(e[1],e[2],e[3],e[4]):(e=p8.exec(t))?Ea(e[1]*255/100,e[2]*255/100,e[3]*255/100,e[4]):(e=g8.exec(t))?n0(e[1],e[2]/100,e[3]/100,1):(e=m8.exec(t))?n0(e[1],e[2]/100,e[3]/100,e[4]):Zg.hasOwnProperty(t)?Jg(Zg[t]):t==="transparent"?new kt(NaN,NaN,NaN,0):null}function Jg(t){return new kt(t>>16&255,t>>8&255,t&255,1)}function Ea(t,e,n,r){return r<=0&&(t=e=n=NaN),new kt(t,e,n,r)}function Bc(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 kr(t,e,n,r){return arguments.length===1?Bc(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}Dr(kt,kr,Gi(fn,{brighter(t){return t=t==null?Lr:Math.pow(Lr,t),new kt(this.r*t,this.g*t,this.b*t,this.opacity)},darker(t){return t=t==null?zn:Math.pow(zn,t),new kt(this.r*t,this.g*t,this.b*t,this.opacity)},rgb(){return this},clamp(){return new kt(On(this.r),On(this.g),On(this.b),ka(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:t0,formatHex:t0,formatHex8:v8,formatRgb:e0,toString:e0}));function t0(){return`#${Un(this.r)}${Un(this.g)}${Un(this.b)}`}function v8(){return`#${Un(this.r)}${Un(this.g)}${Un(this.b)}${Un((isNaN(this.opacity)?1:this.opacity)*255)}`}function e0(){const t=ka(this.opacity);return`${t===1?"rgb(":"rgba("}${On(this.r)}, ${On(this.g)}, ${On(this.b)}${t===1?")":`, ${t})`}`}function ka(t){return isNaN(t)?1:Math.max(0,Math.min(1,t))}function On(t){return Math.max(0,Math.min(255,Math.round(t)||0))}function Un(t){return t=On(t),(t<16?"0":"")+t.toString(16)}function n0(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 r0(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 Ca(t,e,n,r){return arguments.length===1?r0(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}Dr(Se,Ca,Gi(fn,{brighter(t){return t=t==null?Lr:Math.pow(Lr,t),new Se(this.h,this.s,this.l*t,this.opacity)},darker(t){return t=t==null?zn:Math.pow(zn,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(Yc(t>=240?t-240:t+120,i,r),Yc(t,i,r),Yc(t<120?t+240:t-120,i,r),this.opacity)},clamp(){return new Se(i0(this.h),Ia(this.s),Ia(this.l),ka(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=ka(this.opacity);return`${t===1?"hsl(":"hsla("}${i0(this.h)}, ${Ia(this.s)*100}%, ${Ia(this.l)*100}%${t===1?")":`, ${t})`}`}}));function i0(t){return t=(t||0)%360,t<0?t+360:t}function Ia(t){return Math.max(0,Math.min(1,t||0))}function Yc(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 o0=Math.PI/180,a0=180/Math.PI,Ra=18,s0=.96422,u0=1,c0=.82521,l0=4/29,Cr=6/29,f0=3*Cr*Cr,x8=Cr*Cr*Cr;function h0(t){if(t instanceof Ae)return new Ae(t.l,t.a,t.b,t.opacity);if(t instanceof Ce)return p0(t);t instanceof kt||(t=Bc(t));var e=Xc(t.r),n=Xc(t.g),r=Xc(t.b),i=Wc((.2225045*e+.7168786*n+.0606169*r)/u0),o,a;return e===n&&n===r?o=a=i:(o=Wc((.4360747*e+.3850649*n+.1430804*r)/s0),a=Wc((.0139322*e+.0971045*n+.7141733*r)/c0)),new Ae(116*i-16,500*(o-i),200*(i-a),t.opacity)}function _8(t,e){return new Ae(t,0,0,e??1)}function Na(t,e,n,r){return arguments.length===1?h0(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}Dr(Ae,Na,Gi(fn,{brighter(t){return new Ae(this.l+Ra*(t??1),this.a,this.b,this.opacity)},darker(t){return new Ae(this.l-Ra*(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=s0*Hc(e),t=u0*Hc(t),n=c0*Hc(n),new kt(qc(3.1338561*e-1.6168667*t-.4906146*n),qc(-.9787684*e+1.9161415*t+.033454*n),qc(.0719453*e-.2289914*t+1.4052427*n),this.opacity)}}));function Wc(t){return t>x8?Math.pow(t,1/3):t/f0+l0}function Hc(t){return t>Cr?t*t*t:f0*(t-l0)}function qc(t){return 255*(t<=.0031308?12.92*t:1.055*Math.pow(t,1/2.4)-.055)}function Xc(t){return(t/=255)<=.04045?t/12.92:Math.pow((t+.055)/1.055,2.4)}function d0(t){if(t instanceof Ce)return new Ce(t.h,t.c,t.l,t.opacity);if(t instanceof Ae||(t=h0(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)*a0;return new Ce(e<0?e+360:e,Math.sqrt(t.a*t.a+t.b*t.b),t.l,t.opacity)}function w8(t,e,n,r){return arguments.length===1?d0(t):new Ce(n,e,t,r??1)}function Fa(t,e,n,r){return arguments.length===1?d0(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 p0(t){if(isNaN(t.h))return new Ae(t.l,0,0,t.opacity);var e=t.h*o0;return new Ae(t.l,Math.cos(e)*t.c,Math.sin(e)*t.c,t.opacity)}Dr(Ce,Fa,Gi(fn,{brighter(t){return new Ce(this.h,this.c,this.l+Ra*(t??1),this.opacity)},darker(t){return new Ce(this.h,this.c,this.l-Ra*(t??1),this.opacity)},rgb(){return p0(this).rgb()}}));var g0=-.14861,jc=1.78277,Vc=-.29227,Ga=-.90649,Oi=1.97294,m0=Oi*Ga,y0=Oi*jc,b0=jc*Vc-Ga*g0;function $8(t){if(t instanceof Bn)return new Bn(t.h,t.s,t.l,t.opacity);t instanceof kt||(t=Bc(t));var e=t.r/255,n=t.g/255,r=t.b/255,i=(b0*r+m0*e-y0*n)/(b0+m0-y0),o=r-i,a=(Oi*(n-i)-Vc*o)/Ga,s=Math.sqrt(a*a+o*o)/(Oi*i*(1-i)),u=s?Math.atan2(a,o)*a0-120:NaN;return new Bn(u<0?u+360:u,s,i,t.opacity)}function Me(t,e,n,r){return arguments.length===1?$8(t):new Bn(t,e,n,r??1)}function Bn(t,e,n,r){this.h=+t,this.s=+e,this.l=+n,this.opacity=+r}Dr(Bn,Me,Gi(fn,{brighter(t){return t=t==null?Lr:Math.pow(Lr,t),new Bn(this.h,this.s,this.l*t,this.opacity)},darker(t){return t=t==null?zn:Math.pow(zn,t),new Bn(this.h,this.s,this.l*t,this.opacity)},rgb(){var t=isNaN(this.h)?0:(this.h+120)*o0,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*(g0*r+jc*i)),255*(e+n*(Vc*r+Ga*i)),255*(e+n*(Oi*r)),this.opacity)}}));function v0(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 x0(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 v0((n-r/e)*e,a,i,o,s)}}function _0(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 v0((n-r/e)*e,i,o,a,s)}}const za=t=>()=>t;function w0(t,e){return function(n){return t+n*e}}function S8(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 Oa(t,e){var n=e-t;return n?w0(t,n>180||n<-180?n-360*Math.round(n/360):n):za(isNaN(t)?e:t)}function A8(t){return(t=+t)==1?Ct:function(e,n){return n-e?S8(e,n,t):za(isNaN(e)?n:e)}}function Ct(t,e){var n=e-t;return n?w0(t,n):za(isNaN(t)?e:t)}const Ui=function t(e){var n=A8(e);function r(i,o){var a=n((i=kr(i)).r,(o=kr(o)).r),s=n(i.g,o.g),u=n(i.b,o.b),c=Ct(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 $0(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=kr(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 S0=$0(x0),M8=$0(_0);function Zc(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 A0(t){return ArrayBuffer.isView(t)&&!(t instanceof DataView)}function T8(t,e){return(A0(e)?Zc:M0)(t,e)}function M0(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 T0(t,e){var n=new Date;return t=+t,e=+e,function(r){return n.setTime(t*(1-r)+e*r),n}}function he(t,e){return t=+t,e=+e,function(n){return t*(1-n)+e*n}}function P0(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 Kc=/[-+]?(?:\d+\.?\d*|\.?\d+)(?:[eE][-+]?\d+)?/g,Qc=new RegExp(Kc.source,"g");function P8(t){return function(){return t}}function D8(t){return function(e){return t(e)+""}}function Jc(t,e){var n=Kc.lastIndex=Qc.lastIndex=0,r,i,o,a=-1,s=[],u=[];for(t=t+"",e=e+"";(r=Kc.exec(t))&&(i=Qc.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:he(r,i)})),n=Qc.lastIndex;return n<e.length&&(o=e.slice(n),s[a]?s[a]+=o:s[++a]=o),s.length<2?u[0]?D8(u[0].x):P8(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"?za(e):(n==="number"?he:n==="string"?(r=hn(e))?(e=r,Ui):Jc:e instanceof hn?Ui:e instanceof Date?T0:A0(e)?Zc:Array.isArray(e)?M0:typeof e.valueOf!="function"&&typeof e.toString!="function"||isNaN(e)?P0:he)(t,e)}function L8(t){var e=t.length;return function(n){return t[Math.max(0,Math.min(e-1,Math.floor(n*e)))]}}function E8(t,e){var n=Oa(+t,+e);return function(r){var i=n(r);return i-360*Math.floor(i/360)}}function Ua(t,e){return t=+t,e=+e,function(n){return Math.round(t*(1-n)+e*n)}}var D0=180/Math.PI,tl={translateX:0,translateY:0,rotate:0,skewX:0,scaleX:1,scaleY:1};function L0(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)*D0,skewX:Math.atan(u)*D0,scaleX:a,scaleY:s}}var Ba;function k8(t){const e=new(typeof DOMMatrix=="function"?DOMMatrix:WebKitCSSMatrix)(t+"");return e.isIdentity?tl:L0(e.a,e.b,e.c,e.d,e.e,e.f)}function C8(t){return t==null||(Ba||(Ba=document.createElementNS("http://www.w3.org/2000/svg","g")),Ba.setAttribute("transform",t),!(t=Ba.transform.baseVal.consolidate()))?tl:(t=t.matrix,L0(t.a,t.b,t.c,t.d,t.e,t.f))}function E0(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:he(c,h)},{i:g-2,x:he(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:he(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:he(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:he(c,h)},{i:g-2,x:he(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 k0=E0(k8,"px, ","px)","deg)"),C0=E0(C8,", ",")",")"),I8=1e-12;function I0(t){return((t=Math.exp(t))+1/t)/2}function R8(t){return((t=Math.exp(t))-1/t)/2}function N8(t){return((t=Math.exp(2*t))-1)/(t+1)}const R0=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<I8)y=Math.log(f/c)/e,m=function(A){return[s+A*d,u+A*p,c*Math.exp(e*A*y)]};else{var v=Math.sqrt(g),x=(f*f-c*c+r*g)/(2*c*n*v),b=(f*f-c*c-r*g)/(2*f*n*v),w=Math.log(Math.sqrt(x*x+1)-x),$=Math.log(Math.sqrt(b*b+1)-b);y=($-w)/e,m=function(A){var _=A*y,L=I0(w),E=c/(n*v)*(L*N8(e*_+w)-R8(w));return[s+E*d,u+E*p,c*L/I0(e*_+w)]}}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 N0(t){return function(e,n){var r=t((e=Ca(e)).h,(n=Ca(n)).h),i=Ct(e.s,n.s),o=Ct(e.l,n.l),a=Ct(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 F8=N0(Oa);var G8=N0(Ct);function z8(t,e){var n=Ct((t=Na(t)).l,(e=Na(e)).l),r=Ct(t.a,e.a),i=Ct(t.b,e.b),o=Ct(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 F0(t){return function(e,n){var r=t((e=Fa(e)).h,(n=Fa(n)).h),i=Ct(e.c,n.c),o=Ct(e.l,n.l),a=Ct(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 O8=F0(Oa);var U8=F0(Ct);function G0(t){return function e(n){n=+n;function r(i,o){var a=t((i=Me(i)).h,(o=Me(o)).h),s=Ct(i.s,o.s),u=Ct(i.l,o.l),c=Ct(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 B8=G0(Oa);var Ya=G0(Ct);function z0(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 Y8(t,e){for(var n=new Array(e),r=0;r<e;++r)n[r]=t(r/(e-1));return n}var Ir=0,Bi=0,Yi=0,O0=1e3,Wa,Wi,Ha=0,Yn=0,qa=0,Hi=typeof performance=="object"&&performance.now?performance:Date,U0=typeof window=="object"&&window.requestAnimationFrame?window.requestAnimationFrame.bind(window):function(t){setTimeout(t,17)};function qi(){return Yn||(U0(W8),Yn=Hi.now()+qa)}function W8(){Yn=0}function Xi(){this._call=this._time=this._next=null}Xi.prototype=Xa.prototype={constructor:Xi,restart:function(t,e,n){if(typeof t!="function")throw new TypeError("callback is not a function");n=(n==null?qi():+n)+(e==null?0:+e),!this._next&&Wi!==this&&(Wi?Wi._next=this:Wa=this,Wi=this),this._call=t,this._time=n,el()},stop:function(){this._call&&(this._call=null,this._time=1/0,el())}};function Xa(t,e,n){var r=new Xi;return r.restart(t,e,n),r}function B0(){qi(),++Ir;for(var t=Wa,e;t;)(e=Yn-t._time)>=0&&t._call.call(void 0,e),t=t._next;--Ir}function Y0(){Yn=(Ha=Hi.now())+qa,Ir=Bi=0;try{B0()}finally{Ir=0,q8(),Yn=0}}function H8(){var t=Hi.now(),e=t-Ha;e>O0&&(qa-=e,Ha=t)}function q8(){for(var t,e=Wa,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:Wa=n);Wi=t,el(r)}function el(t){if(!Ir){Bi&&(Bi=clearTimeout(Bi));var e=t-Yn;e>24?(t<1/0&&(Bi=setTimeout(Y0,t-Hi.now()-qa)),Yi&&(Yi=clearInterval(Yi))):(Yi||(Ha=Hi.now(),Yi=setInterval(H8,O0)),Ir=1,U0(Y0))}}function nl(t,e,n){var r=new Xi;return e=e==null?0:+e,r.restart(i=>{r.stop(),t(i+e)},e,n),r}function X8(t,e,n){var r=new Xi,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?qi():+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 j8=Nn("start","end","cancel","interrupt"),V8=[],W0=0,rl=1,il=2,ja=3,H0=4,ol=5,Va=6;function Za(t,e,n,r,i,o){var a=t.__transition;if(!a)t.__transition={};else if(n in a)return;Z8(t,n,{name:e,index:r,group:i,on:j8,tween:V8,time:o.time,delay:o.delay,duration:o.duration,ease:o.ease,timer:null,state:W0})}function al(t,e){var n=Te(t,e);if(n.state>W0)throw new Error("too late; already scheduled");return n}function Ie(t,e){var n=Te(t,e);if(n.state>ja)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 Z8(t,e,n){var r=t.__transition,i;r[e]=n,n.timer=Xa(o,0,n.time);function o(c){n.state=rl,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!==rl)return u();for(l in r)if(d=r[l],d.name===n.name){if(d.state===ja)return nl(a);d.state===H0?(d.state=Va,d.timer.stop(),d.on.call("interrupt",t,t.__data__,d.index,d.group),delete r[l]):+l<e&&(d.state=Va,d.timer.stop(),d.on.call("cancel",t,t.__data__,d.index,d.group),delete r[l])}if(nl(function(){n.state===ja&&(n.state=H0,n.timer.restart(s,n.delay,n.time),s(c))}),n.state=il,n.on.call("start",t,t.__data__,n.index,n.group),n.state===il){for(n.state=ja,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=ol,1),h=-1,f=i.length;++h<f;)i[h].call(t,l);n.state===ol&&(n.on.call("end",t,t.__data__,n.index,n.group),u())}function u(){n.state=Va,n.timer.stop(),delete r[e];for(var c in r)return;delete t.__transition}}function Wn(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>il&&r.state<ol,r.state=Va,r.timer.stop(),r.on.call(i?"interrupt":"cancel",t,t.__data__,r.index,r.group),delete n[a]}o&&delete t.__transition}}function K8(t){return this.each(function(){Wn(this,t)})}function Q8(t,e){var n,r;return function(){var i=Ie(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 J8(t,e,n){var r,i;if(typeof n!="function")throw new Error;return function(){var o=Ie(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 t4(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?Q8:J8)(n,t,e))}function sl(t,e,n){var r=t._id;return t.each(function(){var i=Ie(this,r);(i.value||(i.value={}))[e]=n.apply(this,arguments)}),function(i){return Te(i,r).value[e]}}function q0(t,e){var n;return(typeof e=="number"?he:e instanceof hn?Ui:(n=hn(e))?(e=n,Ui):Jc)(t,e)}function e4(t){return function(){this.removeAttribute(t)}}function n4(t){return function(){this.removeAttributeNS(t.space,t.local)}}function r4(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 i4(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 o4(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 a4(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 s4(t,e){var n=Ni(t),r=n==="transform"?C0:q0;return this.attrTween(t,typeof e=="function"?(n.local?a4:o4)(n,r,sl(this,"attr."+t,e)):e==null?(n.local?n4:e4)(n):(n.local?i4:r4)(n,r,e))}function u4(t,e){return function(n){this.setAttribute(t,e.call(this,n))}}function c4(t,e){return function(n){this.setAttributeNS(t.space,t.local,e.call(this,n))}}function l4(t,e){var n,r;function i(){var o=e.apply(this,arguments);return o!==r&&(n=(r=o)&&c4(t,o)),n}return i._value=e,i}function f4(t,e){var n,r;function i(){var o=e.apply(this,arguments);return o!==r&&(n=(r=o)&&u4(t,o)),n}return i._value=e,i}function h4(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=Ni(t);return this.tween(n,(r.local?l4:f4)(r,e))}function d4(t,e){return function(){al(this,t).delay=+e.apply(this,arguments)}}function p4(t,e){return e=+e,function(){al(this,t).delay=e}}function g4(t){var e=this._id;return arguments.length?this.each((typeof t=="function"?d4:p4)(e,t)):Te(this.node(),e).delay}function m4(t,e){return function(){Ie(this,t).duration=+e.apply(this,arguments)}}function y4(t,e){return e=+e,function(){Ie(this,t).duration=e}}function b4(t){var e=this._id;return arguments.length?this.each((typeof t=="function"?m4:y4)(e,t)):Te(this.node(),e).duration}function v4(t,e){if(typeof e!="function")throw new Error;return function(){Ie(this,t).ease=e}}function x4(t){var e=this._id;return arguments.length?this.each(v4(e,t)):Te(this.node(),e).ease}function _4(t,e){return function(){var n=e.apply(this,arguments);if(typeof n!="function")throw new Error;Ie(this,t).ease=n}}function w4(t){if(typeof t!="function")throw new Error;return this.each(_4(this._id,t))}function $4(t){typeof t!="function"&&(t=Rc(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 Re(r,this._parents,this._name,this._id)}function S4(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 Re(a,this._parents,this._name,this._id)}function A4(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 M4(t,e,n){var r,i,o=A4(e)?al:Ie;return function(){var a=o(this,t),s=a.on;s!==r&&(i=(r=s).copy()).on(e,n),a.on=i}}function T4(t,e){var n=this._id;return arguments.length<2?Te(this.node(),n).on.on(t):this.each(M4(n,t,e))}function P4(t){return function(){var e=this.parentNode;for(var n in this.__transition)if(+n!==t)return;e&&e.removeChild(this)}}function D4(){return this.on("end.remove",P4(this._id))}function L4(t){var e=this._name,n=this._id;typeof t!="function"&&(t=Ma(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,Za(c[f],e,n,f,c,Te(l,n)));return new Re(o,this._parents,e,n)}function E4(t){var e=this._name,n=this._id;typeof t!="function"&&(t=Ic(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])&&Za(d,e,n,g,f,p);o.push(f),a.push(l)}return new Re(o,a,e,n)}var k4=Gn.prototype.constructor;function C4(){return new k4(this._groups,this._parents)}function I4(t,e){var n,r,i;return function(){var o=Fn(this,t),a=(this.style.removeProperty(t),Fn(this,t));return o===a?null:o===n&&a===r?i:i=e(n=o,r=a)}}function X0(t){return function(){this.style.removeProperty(t)}}function R4(t,e,n){var r,i=n+"",o;return function(){var a=Fn(this,t);return a===i?null:a===r?o:o=e(r=a,n)}}function N4(t,e,n){var r,i,o;return function(){var a=Fn(this,t),s=n(this),u=s+"";return s==null&&(u=s=(this.style.removeProperty(t),Fn(this,t))),a===u?null:a===r&&u===i?o:(i=u,o=e(r=a,s))}}function F4(t,e){var n,r,i,o="style."+e,a="end."+o,s;return function(){var u=Ie(this,t),c=u.on,l=u.value[o]==null?s||(s=X0(e)):void 0;(c!==n||i!==l)&&(r=(n=c).copy()).on(a,i=l),u.on=r}}function G4(t,e,n){var r=(t+="")=="transform"?k0:q0;return e==null?this.styleTween(t,I4(t,r)).on("end.style."+t,X0(t)):typeof e=="function"?this.styleTween(t,N4(t,r,sl(this,"style."+t,e))).each(F4(this._id,t)):this.styleTween(t,R4(t,r,e),n).on("end.style."+t,null)}function z4(t,e,n){return function(r){this.style.setProperty(t,e.call(this,r),n)}}function O4(t,e,n){var r,i;function o(){var a=e.apply(this,arguments);return a!==i&&(r=(i=a)&&z4(t,a,n)),r}return o._value=e,o}function U4(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,O4(t,e,n??""))}function B4(t){return function(){this.textContent=t}}function Y4(t){return function(){var e=t(this);this.textContent=e??""}}function W4(t){return this.tween("text",typeof t=="function"?Y4(sl(this,"text",t)):B4(t==null?"":t+""))}function H4(t){return function(e){this.textContent=t.call(this,e)}}function q4(t){var e,n;function r(){var i=t.apply(this,arguments);return i!==n&&(e=(n=i)&&H4(i)),e}return r._value=t,r}function X4(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,q4(t))}function j4(){for(var t=this._name,e=this._id,n=V0(),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);Za(u,t,n,c,a,{time:l.time+l.delay+l.duration,delay:0,duration:l.duration,ease:l.ease})}return new Re(r,this._parents,t,n)}function V4(){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=Ie(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 Z4=0;function Re(t,e,n,r){this._groups=t,this._parents=e,this._name=n,this._id=r}function j0(t){return Gn().transition(t)}function V0(){return++Z4}var je=Gn.prototype;Re.prototype=j0.prototype={constructor:Re,select:L4,selectAll:E4,selectChild:je.selectChild,selectChildren:je.selectChildren,filter:$4,merge:S4,selection:C4,transition:j4,call:je.call,nodes:je.nodes,node:je.node,size:je.size,empty:je.empty,each:je.each,on:T4,attr:s4,attrTween:h4,style:G4,styleTween:U4,text:W4,textTween:X4,remove:D4,tween:t4,delay:g4,duration:b4,ease:x4,easeVarying:w4,end:V4,[Symbol.iterator]:je[Symbol.iterator]};const K4=t=>+t;function Q4(t){return t*t}function J4(t){return t*(2-t)}function Z0(t){return((t*=2)<=1?t*t:--t*(2-t)+1)/2}function tM(t){return t*t*t}function eM(t){return--t*t*t+1}function ji(t){return((t*=2)<=1?t*t*t:(t-=2)*t*t+2)/2}var ul=3,nM=function t(e){e=+e;function n(r){return Math.pow(r,e)}return n.exponent=t,n}(ul),rM=function t(e){e=+e;function n(r){return 1-Math.pow(1-r,e)}return n.exponent=t,n}(ul),K0=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}(ul),Q0=Math.PI,J0=Q0/2;function iM(t){return+t==1?1:1-Math.cos(t*J0)}function oM(t){return Math.sin(t*J0)}function t1(t){return(1-Math.cos(Q0*t))/2}function pn(t){return(Math.pow(2,-10*t)-.0009765625)*1.0009775171065494}function aM(t){return pn(1-+t)}function sM(t){return 1-pn(t)}function e1(t){return((t*=2)<=1?pn(1-t):2-pn(t-1))/2}function uM(t){return 1-Math.sqrt(1-t*t)}function cM(t){return Math.sqrt(1- --t*t)}function n1(t){return((t*=2)<=1?1-Math.sqrt(1-t*t):Math.sqrt(1-(t-=2)*t)+1)/2}var cl=4/11,lM=6/11,fM=8/11,hM=3/4,dM=9/11,pM=10/11,gM=15/16,mM=21/22,yM=63/64,Ka=1/cl/cl;function bM(t){return 1-Vi(1-t)}function Vi(t){return(t=+t)<cl?Ka*t*t:t<fM?Ka*(t-=lM)*t+hM:t<pM?Ka*(t-=dM)*t+gM:Ka*(t-=mM)*t+yM}function vM(t){return((t*=2)<=1?1-Vi(1-t):Vi(t-1)+1)/2}var ll=1.70158,xM=function t(e){e=+e;function n(r){return(r=+r)*r*(e*(r-1)+r)}return n.overshoot=t,n}(ll),_M=function t(e){e=+e;function n(r){return--r*r*((r+1)*e+r)+1}return n.overshoot=t,n}(ll),r1=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}(ll),Rr=2*Math.PI,fl=1,hl=.3,wM=function t(e,n){var r=Math.asin(1/(e=Math.max(1,e)))*(n/=Rr);function i(o){return e*pn(- --o)*Math.sin((r-o)/n)}return i.amplitude=function(o){return t(o,n*Rr)},i.period=function(o){return t(e,o)},i}(fl,hl),Qa=function t(e,n){var r=Math.asin(1/(e=Math.max(1,e)))*(n/=Rr);function i(o){return 1-e*pn(o=+o)*Math.sin((o+r)/n)}return i.amplitude=function(o){return t(o,n*Rr)},i.period=function(o){return t(e,o)},i}(fl,hl),$M=function t(e,n){var r=Math.asin(1/(e=Math.max(1,e)))*(n/=Rr);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*Rr)},i.period=function(o){return t(e,o)},i}(fl,hl),SM={time:null,delay:0,duration:250,ease:ji};function AM(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 MM(t){var e,n;t instanceof Re?(e=t._id,t=t._name):(e=V0(),(n=SM).time=qi(),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])&&Za(u,t,e,c,a,n||AM(u,e));return new Re(r,this._parents,t,e)}Gn.prototype.interrupt=K8,Gn.prototype.transition=MM;var TM=[null];function PM(t,e){var n=t.__transition,r,i;if(n){e=e==null?null:e+"";for(i in n)if((r=n[i]).state>rl&&r.name===e)return new Re([[t]],TM,e,+i)}return null}const dl=t=>()=>t;function DM(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 LM(t){t.stopImmediatePropagation()}function pl(t){t.preventDefault(),t.stopImmediatePropagation()}var i1={name:"drag"},gl={name:"space"},Nr={name:"handle"},Fr={name:"center"};const{abs:o1,max:Gt,min:zt}=Math;function a1(t){return[+t[0],+t[1]]}function ml(t){return[a1(t[0]),a1(t[1])]}var Ja={name:"x",handles:["w","e"].map(Zi),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]]}},ts={name:"y",handles:["n","s"].map(Zi),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]]}},EM={name:"xy",handles:["n","w","e","s","nw","ne","sw","se"].map(Zi),input:function(t){return t==null?null:ml(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"},s1={e:"w",w:"e",nw:"ne",ne:"nw",se:"sw",sw:"se"},u1={n:"s",s:"n",nw:"sw",ne:"se",se:"ne",sw:"nw"},kM={overlay:1,selection:1,n:null,e:1,s:null,w:-1,nw:-1,ne:1,se:1,sw:-1},CM={overlay:1,selection:1,n:-1,e:null,s:1,w:null,nw:-1,ne:-1,se:1,sw:1};function Zi(t){return{type:t}}function IM(t){return!t.ctrlKey&&!t.button}function RM(){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 NM(){return navigator.maxTouchPoints||"ontouchstart"in this}function yl(t){for(;!t.__brush;)if(!(t=t.parentNode))return;return t.__brush}function FM(t){return t[0][0]===t[1][0]||t[0][1]===t[1][1]}function GM(t){var e=t.__brush;return e?e.dim.output(e.selection):null}function zM(){return bl(Ja)}function OM(){return bl(ts)}function UM(){return bl(EM)}function bl(t){var e=RM,n=IM,r=NM,i=!0,o=Nn("start","brush","end"),a=6,s;function u(m){var y=m.property("__brush",g).selectAll(".overlay").data([Zi("overlay")]);y.enter().append("rect").attr("class","overlay").attr("pointer-events","all").attr("cursor",Ve.overlay).merge(y).each(function(){var x=yl(this).extent;V(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([Zi("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 v=m.selectAll(".handle").data(t.handles,function(x){return x.type});v.exit().remove(),v.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,v){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,w=l(x,arguments),$=b.selection,A=t.input(typeof y=="function"?y.apply(this,arguments):y,b.extent),_=dn($,A);function L(E){b.selection=E===1&&A===null?null:_(E),c.call(x),w.brush()}return $!==null&&A!==null?L:L(1)}):m.each(function(){var x=this,b=arguments,w=x.__brush,$=t.input(typeof y=="function"?y.apply(x,b):y,w.extent),A=l(x,b).beforestart();Wn(x),w.selection=$===null?null:$,c.call(x),A.start(v).brush(v).end(v)})},u.clear=function(m,y){u.move(m,null,y)};function c(){var m=V(this),y=yl(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(v){return v.type[v.type.length-1]==="e"?y[1][0]-a/2:y[0][0]-a/2}).attr("y",function(v){return v.type[0]==="s"?y[1][1]-a/2:y[0][1]-a/2}).attr("width",function(v){return v.type==="n"||v.type==="s"?y[1][0]-y[0][0]+a:a}).attr("height",function(v){return v.type==="e"||v.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,v){var x=m.__brush.emitter;return x&&(!v||!x.clean)?x:new h(m,y,v)}function h(m,y,v){this.that=m,this.args=y,this.state=m.__brush,this.active=0,this.clean=v}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,v){var x=V(this.that).datum();o.call(m,this.that,new DM(m,{sourceEvent:y,target:u,selection:t.output(this.state.selection),mode:v,dispatch:o}),x)}};function f(m){if(s&&!m.touches||!n.apply(this,arguments))return;var y=this,v=m.target.__data__.type,x=(i&&m.metaKey?v="overlay":v)==="selection"?i1:i&&m.altKey?Fr:Nr,b=t===ts?null:kM[v],w=t===Ja?null:CM[v],$=yl(y),A=$.extent,_=$.selection,L=A[0][0],E,T,I=A[0][1],P,D,C=A[1][0],S,R,G=A[1][1],M,N,z=0,k=0,Y,j=b&&w&&i&&m.shiftKey,W,X,Q=Array.from(m.touches||[m],it=>{const Mt=it.identifier;return it=se(it,y),it.point0=it.slice(),it.identifier=Mt,it});Wn(y);var ct=l(y,arguments,!0).beforestart();if(v==="overlay"){_&&(Y=!0);const it=[Q[0],Q[1]||Q[0]];$.selection=_=[[E=t===ts?L:zt(it[0][0],it[1][0]),P=t===Ja?I:zt(it[0][1],it[1][1])],[S=t===ts?C:Gt(it[0][0],it[1][0]),M=t===Ja?G:Gt(it[0][1],it[1][1])]],Q.length>1&&xt(m)}else E=_[0][0],P=_[0][1],S=_[1][0],M=_[1][1];T=E,D=P,R=S,N=M;var O=V(y).attr("pointer-events","none"),tt=O.selectAll(".overlay").attr("cursor",Ve[v]);if(m.touches)ct.moved=q,ct.ended=gt;else{var st=V(m.view).on("mousemove.brush",q,!0).on("mouseup.brush",gt,!0);i&&st.on("keydown.brush",Ft,!0).on("keyup.brush",te,!0),Pa(m.view)}c.call(y),ct.start(m,x.name);function q(it){for(const Mt of it.changedTouches||[it])for(const No of Q)No.identifier===Mt.identifier&&(No.cur=se(Mt,y));if(j&&!W&&!X&&Q.length===1){const Mt=Q[0];o1(Mt.cur[0]-Mt[0])>o1(Mt.cur[1]-Mt[1])?X=!0:W=!0}for(const Mt of Q)Mt.cur&&(Mt[0]=Mt.cur[0],Mt[1]=Mt.cur[1]);Y=!0,pl(it),xt(it)}function xt(it){const Mt=Q[0],No=Mt.point0;var An;switch(z=Mt[0]-No[0],k=Mt[1]-No[1],x){case gl:case i1:{b&&(z=Gt(L-E,zt(C-S,z)),T=E+z,R=S+z),w&&(k=Gt(I-P,zt(G-M,k)),D=P+k,N=M+k);break}case Nr:{Q[1]?(b&&(T=Gt(L,zt(C,Q[0][0])),R=Gt(L,zt(C,Q[1][0])),b=1),w&&(D=Gt(I,zt(G,Q[0][1])),N=Gt(I,zt(G,Q[1][1])),w=1)):(b<0?(z=Gt(L-E,zt(C-E,z)),T=E+z,R=S):b>0&&(z=Gt(L-S,zt(C-S,z)),T=E,R=S+z),w<0?(k=Gt(I-P,zt(G-P,k)),D=P+k,N=M):w>0&&(k=Gt(I-M,zt(G-M,k)),D=P,N=M+k));break}case Fr:{b&&(T=Gt(L,zt(C,E-z*b)),R=Gt(L,zt(C,S+z*b))),w&&(D=Gt(I,zt(G,P-k*w)),N=Gt(I,zt(G,M+k*w)));break}}R<T&&(b*=-1,An=E,E=S,S=An,An=T,T=R,R=An,v in s1&&tt.attr("cursor",Ve[v=s1[v]])),N<D&&(w*=-1,An=P,P=M,M=An,An=D,D=N,N=An,v in u1&&tt.attr("cursor",Ve[v=u1[v]])),$.selection&&(_=$.selection),W&&(T=_[0][0],R=_[1][0]),X&&(D=_[0][1],N=_[1][1]),(_[0][0]!==T||_[0][1]!==D||_[1][0]!==R||_[1][1]!==N)&&($.selection=[[T,D],[R,N]],c.call(y),ct.brush(it,x.name))}function gt(it){if(LM(it),it.touches){if(it.touches.length)return;s&&clearTimeout(s),s=setTimeout(function(){s=null},500)}else Da(it.view,Y),st.on("keydown.brush keyup.brush mousemove.brush mouseup.brush",null);O.attr("pointer-events","all"),tt.attr("cursor",Ve.overlay),$.selection&&(_=$.selection),FM(_)&&($.selection=null,c.call(y)),ct.end(it,x.name)}function Ft(it){switch(it.keyCode){case 16:{j=b&&w;break}case 18:{x===Nr&&(b&&(S=R-z*b,E=T+z*b),w&&(M=N-k*w,P=D+k*w),x=Fr,xt(it));break}case 32:{(x===Nr||x===Fr)&&(b<0?S=R-z:b>0&&(E=T-z),w<0?M=N-k:w>0&&(P=D-k),x=gl,tt.attr("cursor",Ve.selection),xt(it));break}default:return}pl(it)}function te(it){switch(it.keyCode){case 16:{j&&(W=X=j=!1,xt(it));break}case 18:{x===Fr&&(b<0?S=R:b>0&&(E=T),w<0?M=N:w>0&&(P=D),x=Nr,xt(it));break}case 32:{x===gl&&(it.altKey?(b&&(S=R-z*b,E=T+z*b),w&&(M=N-k*w,P=D+k*w),x=Fr):(b<0?S=R:b>0&&(E=T),w<0?M=N:w>0&&(P=D),x=Nr),tt.attr("cursor",Ve[v]),xt(it));break}default:return}pl(it)}}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=ml(e.apply(this,arguments)),m.dim=t,m}return u.extent=function(m){return arguments.length?(e=typeof m=="function"?m:dl(ml(m)),u):e},u.filter=function(m){return arguments.length?(n=typeof m=="function"?m:dl(!!m),u):n},u.touchable=function(m){return arguments.length?(r=typeof m=="function"?m:dl(!!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 c1=Math.abs,Gr=Math.cos,zr=Math.sin,l1=Math.PI,es=l1/2,f1=l1*2,h1=Math.max,vl=1e-12;function xl(t,e){return Array.from({length:e-t},(n,r)=>t+r)}function BM(t){return function(e,n){return t(e.source.value+e.target.value,n.source.value+n.target.value)}}function YM(){return _l(!1,!1)}function WM(){return _l(!1,!0)}function HM(){return _l(!0,!1)}function _l(t,e){var n=0,r=null,i=null,o=null;function a(s){var u=s.length,c=new Array(u),l=xl(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=h1(0,f1-n*u)/d,p=d?n:f1/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 v=xl(~u+1,u).filter(x=>x<0?s[~x*u+m]:s[m*u+x]);i&&v.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 v)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 v=xl(0,u).filter(x=>s[m*u+x]||s[x*u+m]);i&&v.sort((x,b)=>i(s[m*u+x],s[m*u+b]));for(const x of v){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 w=b.source;b.source=b.target,b.target=w}}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=h1(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=BM(s))._=s,a):o&&o._},a}const wl=Math.PI,$l=2*wl,Hn=1e-6,qM=$l-Hn;function d1(t){this._+=t[0];for(let e=1,n=t.length;e<n;++e)this._+=arguments[e]+t[e]}function XM(t){let e=Math.floor(t);if(!(e>=0))throw new Error(`invalid digits: ${t}`);if(e>15)return d1;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 Ki=class{constructor(e){this._x0=this._y0=this._x1=this._y1=null,this._="",this._append=e==null?d1:XM(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>Hn)if(!(Math.abs(h*u-c*l)>Hn)||!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),v=Math.sqrt(f),x=o*Math.tan((wl-Math.acos((g+f-m)/(2*y*v)))/2),b=x/v,w=x/y;Math.abs(b-1)>Hn&&this._append`L${e+b*l},${n+b*h}`,this._append`A${o},${o},0,0,${+(h*d>l*p)},${this._x1=e+w*u},${this._y1=n+w*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)>Hn||Math.abs(this._y1-l)>Hn)&&this._append`L${c},${l}`,r&&(f<0&&(f=f%$l+$l),f>qM?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>Hn&&this._append`A${r},${r},0,${+(f>=wl)},${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 Sl(){return new Ki}Sl.prototype=Ki.prototype;function jM(t=3){return new Ki(+t)}var VM=Array.prototype.slice;function qn(t){return function(){return t}}function ZM(t){return t.source}function KM(t){return t.target}function p1(t){return t.radius}function QM(t){return t.startAngle}function JM(t){return t.endAngle}function t7(){return 0}function e7(){return 10}function g1(t){var e=ZM,n=KM,r=p1,i=p1,o=QM,a=JM,s=t7,u=null;function c(){var l,h=e.apply(this,arguments),f=n.apply(this,arguments),d=s.apply(this,arguments)/2,p=VM.call(arguments),g=+r.apply(this,(p[0]=h,p)),m=o.apply(this,p)-es,y=a.apply(this,p)-es,v=+i.apply(this,(p[0]=f,p)),x=o.apply(this,p)-es,b=a.apply(this,p)-es;if(u||(u=l=Sl()),d>vl&&(c1(y-m)>d*2+vl?y>m?(m+=d,y-=d):(m-=d,y+=d):m=y=(m+y)/2,c1(b-x)>d*2+vl?b>x?(x+=d,b-=d):(x-=d,b+=d):x=b=(x+b)/2),u.moveTo(g*Gr(m),g*zr(m)),u.arc(0,0,g,m,y),m!==x||y!==b)if(t){var w=+t.apply(this,arguments),$=v-w,A=(x+b)/2;u.quadraticCurveTo(0,0,$*Gr(x),$*zr(x)),u.lineTo(v*Gr(A),v*zr(A)),u.lineTo($*Gr(b),$*zr(b))}else u.quadraticCurveTo(0,0,v*Gr(x),v*zr(x)),u.arc(0,0,v,x,b);if(u.quadraticCurveTo(0,0,g*Gr(m),g*zr(m)),u.closePath(),l)return u=null,l+""||null}return t&&(c.headRadius=function(l){return arguments.length?(t=typeof l=="function"?l:qn(+l),c):t}),c.radius=function(l){return arguments.length?(r=i=typeof l=="function"?l:qn(+l),c):r},c.sourceRadius=function(l){return arguments.length?(r=typeof l=="function"?l:qn(+l),c):r},c.targetRadius=function(l){return arguments.length?(i=typeof l=="function"?l:qn(+l),c):i},c.startAngle=function(l){return arguments.length?(o=typeof l=="function"?l:qn(+l),c):o},c.endAngle=function(l){return arguments.length?(a=typeof l=="function"?l:qn(+l),c):a},c.padAngle=function(l){return arguments.length?(s=typeof l=="function"?l:qn(+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 n7(){return g1()}function r7(){return g1(e7)}var i7=Array.prototype,m1=i7.slice;function o7(t,e){return t-e}function a7(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 s7(t,e){for(var n=-1,r=e.length,i;++n<r;)if(i=u7(t,e[n]))return i;return 0}function u7(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(c7(u,h,e))return 0;l>r!=d>r&&n<(f-c)*(r-l)/(d-l)+c&&(i=-i)}return i}function c7(t,e,n){var r;return l7(t,e,n)&&f7(t[r=+(t[0]===e[0])],n[r],e[r])}function l7(t,e,n){return(e[0]-t[0])*(n[1]-t[1])===(n[0]-t[0])*(e[1]-t[1])}function f7(t,e,n){return t<=e&&e<=n||n<=e&&e<=t}function h7(){}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 Al(){var t=1,e=1,n=Tc,r=u;function i(c){var l=n(c);if(Array.isArray(l))l=l.slice().sort(o7);else{const h=Li(c,d7);for(l=In(...Mc(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),a7(p)>0?f.push([p]):d.push(p)}),d.forEach(function(p){for(var g=0,m=f.length,y;g<m;++g)if(s7((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,v,x;for(p=g=-1,y=Xn(c[0],l),Ze[y<<1].forEach(b);++p<t-1;)m=y,y=Xn(c[p+1],l),Ze[m|y<<1].forEach(b);for(Ze[y<<0].forEach(b);++g<e-1;){for(p=-1,y=Xn(c[g*t+t],l),v=Xn(c[g*t],l),Ze[y<<1|v<<2].forEach(b);++p<t-1;)m=y,y=Xn(c[g*t+t+p+1],l),x=v,v=Xn(c[g*t+p+1],l),Ze[m|y<<1|v<<2|x<<3].forEach(b);Ze[y|v<<3].forEach(b)}for(p=-1,v=c[g*t]>=l,Ze[v<<2].forEach(b);++p<t-1;)x=v,v=Xn(c[g*t+p+1],l),Ze[v<<2|x<<3].forEach(b);Ze[v<<3].forEach(b);function b(w){var $=[w[0][0]+p,w[0][1]+g],A=[w[1][0]+p,w[1][1]+g],_=s($),L=s(A),E,T;(E=d[_])?(T=f[L])?(delete d[E.end],delete f[T.start],E===T?(E.ring.push(A),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(A),d[E.end=L]=E):(E=f[L])?(T=d[_])?(delete f[E.start],delete d[T.end],E===T?(E.ring.push(A),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($),f[E.start=_]=E):f[_]=d[L]={start:_,end:L,ring:[$,A]}}}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=Ml(l[m*t+g]);d>0&&d<t&&g===d&&(f[0]=y1(d,Ml(l[m*t+g-1]),y,h)),p>0&&p<e&&m===p&&(f[1]=y1(p,Ml(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(m1.call(c)):gn(c),i):n},i.smooth=function(c){return arguments.length?(r=c?u:h7,i):r===u},i}function d7(t){return isFinite(t)?t:NaN}function Xn(t,e){return t==null?!1:+t>=e}function Ml(t){return t==null||isNaN(t=+t)?-1/0:t}function y1(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 p7(t){return t[0]}function g7(t){return t[1]}function m7(){return 1}function y7(){var t=p7,e=g7,n=m7,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(v){var x=new Float32Array(u*c),b=Math.pow(2,-a),w=-1;for(const P of v){var $=(t(P,++w,v)+s)*b,A=(e(P,w,v)+s)*b,_=+n(P,w,v);if(_&&$>=0&&$<u&&A>=0&&A<c){var L=Math.floor($),E=Math.floor(A),T=$-L-.5,I=A-E-.5;x[L+E*u]+=(1-T)*(1-I)*_,x[L+1+E*u]+=T*(1-I)*_,x[L+1+(E+1)*u]+=T*I*_,x[L+(E+1)*u]+=(1-T)*I*_}}return hg({data:x,width:u,height:c},o*b),x}function f(v){var x=h(v),b=l(x),w=Math.pow(2,2*a);return Array.isArray(b)||(b=In(Number.MIN_VALUE,ki(x)/w,b)),Al().size([u,c]).thresholds(b.map($=>$*w))(x).map(($,A)=>($.value=+b[A],d($)))}f.contours=function(v){var x=h(v),b=Al().size([u,c]),w=Math.pow(2,2*a),$=A=>{A=+A;var _=d(b.contour(x,A*w));return _.value=A,_};return Object.defineProperty($,"max",{get:()=>ki(x)/w}),$};function d(v){return v.coordinates.forEach(p),v}function p(v){v.forEach(g)}function g(v){v.forEach(m)}function m(v){v[0]=v[0]*Math.pow(2,a)-s,v[1]=v[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(v){return arguments.length?(t=typeof v=="function"?v:gn(+v),f):t},f.y=function(v){return arguments.length?(e=typeof v=="function"?v:gn(+v),f):e},f.weight=function(v){return arguments.length?(n=typeof v=="function"?v:gn(+v),f):n},f.size=function(v){if(!arguments.length)return[r,i];var x=+v[0],b=+v[1];if(!(x>=0&&b>=0))throw new Error("invalid size");return r=x,i=b,y()},f.cellSize=function(v){if(!arguments.length)return 1<<a;if(!((v=+v)>=1))throw new Error("invalid cell size");return a=Math.floor(Math.log(v)/Math.LN2),y()},f.thresholds=function(v){return arguments.length?(l=typeof v=="function"?v:Array.isArray(v)?gn(m1.call(v)):gn(v),f):l},f.bandwidth=function(v){if(!arguments.length)return Math.sqrt(o*(o+1));if(!((v=+v)>=0))throw new Error("invalid bandwidth");return o=(Math.sqrt(4*v*v+1)-1)/2,y()},f}const Ke=11102230246251565e-32,Ot=134217729,b7=(3+8*Ke)*Ke;function Tl(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 v7(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 x7=(3+16*Ke)*Ke,_7=(2+12*Ke)*Ke,w7=(9+64*Ke)*Ke*Ke,Or=Qi(4),b1=Qi(8),v1=Qi(12),x1=Qi(16),Wt=Qi(4);function $7(t,e,n,r,i,o,a){let s,u,c,l,h,f,d,p,g,m,y,v,x,b,w,$,A,_;const L=t-i,E=n-i,T=e-o,I=r-o;b=L*I,f=Ot*L,d=f-(f-L),p=L-d,f=Ot*I,g=f-(f-I),m=I-g,w=p*m-(b-d*g-p*g-d*m),$=T*E,f=Ot*T,d=f-(f-T),p=T-d,f=Ot*E,g=f-(f-E),m=E-g,A=p*m-($-d*g-p*g-d*m),y=w-A,h=w-y,Or[0]=w-(y+h)+(h-A),v=b+y,h=v-b,x=b-(v-h)+(y-h),y=x-$,h=x-y,Or[1]=x-(y+h)+(h-$),_=v+y,h=_-v,Or[2]=v-(_-h)+(y-h),Or[3]=_;let P=v7(4,Or),D=_7*a;if(P>=D||-P>=D||(h=t-L,s=t-(L+h)+(h-i),h=n-E,c=n-(E+h)+(h-i),h=e-T,u=e-(T+h)+(h-o),h=r-I,l=r-(I+h)+(h-o),s===0&&u===0&&c===0&&l===0)||(D=w7*a+b7*Math.abs(P),P+=L*l+I*s-(T*c+E*u),P>=D||-P>=D))return P;b=s*I,f=Ot*s,d=f-(f-s),p=s-d,f=Ot*I,g=f-(f-I),m=I-g,w=p*m-(b-d*g-p*g-d*m),$=u*E,f=Ot*u,d=f-(f-u),p=u-d,f=Ot*E,g=f-(f-E),m=E-g,A=p*m-($-d*g-p*g-d*m),y=w-A,h=w-y,Wt[0]=w-(y+h)+(h-A),v=b+y,h=v-b,x=b-(v-h)+(y-h),y=x-$,h=x-y,Wt[1]=x-(y+h)+(h-$),_=v+y,h=_-v,Wt[2]=v-(_-h)+(y-h),Wt[3]=_;const C=Tl(4,Or,4,Wt,b1);b=L*l,f=Ot*L,d=f-(f-L),p=L-d,f=Ot*l,g=f-(f-l),m=l-g,w=p*m-(b-d*g-p*g-d*m),$=T*c,f=Ot*T,d=f-(f-T),p=T-d,f=Ot*c,g=f-(f-c),m=c-g,A=p*m-($-d*g-p*g-d*m),y=w-A,h=w-y,Wt[0]=w-(y+h)+(h-A),v=b+y,h=v-b,x=b-(v-h)+(y-h),y=x-$,h=x-y,Wt[1]=x-(y+h)+(h-$),_=v+y,h=_-v,Wt[2]=v-(_-h)+(y-h),Wt[3]=_;const S=Tl(C,b1,4,Wt,v1);b=s*l,f=Ot*s,d=f-(f-s),p=s-d,f=Ot*l,g=f-(f-l),m=l-g,w=p*m-(b-d*g-p*g-d*m),$=u*c,f=Ot*u,d=f-(f-u),p=u-d,f=Ot*c,g=f-(f-c),m=c-g,A=p*m-($-d*g-p*g-d*m),y=w-A,h=w-y,Wt[0]=w-(y+h)+(h-A),v=b+y,h=v-b,x=b-(v-h)+(y-h),y=x-$,h=x-y,Wt[1]=x-(y+h)+(h-$),_=v+y,h=_-v,Wt[2]=v-(_-h)+(y-h),Wt[3]=_;const R=Tl(S,v1,4,Wt,x1);return x1[R-1]}function ns(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)>=x7*c?u:-$7(t,e,n,r,i,o,c)}const _1=Math.pow(2,-52),rs=new Uint32Array(512);class is{static from(e,n=P7,r=D7){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 is(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 L=0;L<a;L++){const E=e[2*L],T=e[2*L+1];E<s&&(s=E),T<u&&(u=T),E>c&&(c=E),T>l&&(l=T),this._ids[L]=L}const h=(s+c)/2,f=(u+l)/2;let d,p,g;for(let L=0,E=1/0;L<a;L++){const T=Pl(h,f,e[2*L],e[2*L+1]);T<E&&(d=L,E=T)}const m=e[2*d],y=e[2*d+1];for(let L=0,E=1/0;L<a;L++){if(L===d)continue;const T=Pl(m,y,e[2*L],e[2*L+1]);T<E&&T>0&&(p=L,E=T)}let v=e[2*p],x=e[2*p+1],b=1/0;for(let L=0;L<a;L++){if(L===d||L===p)continue;const E=M7(m,y,v,x,e[2*L],e[2*L+1]);E<b&&(g=L,b=E)}let w=e[2*g],$=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];Ur(this._ids,this._dists,0,a-1);const L=new Uint32Array(a);let E=0;for(let T=0,I=-1/0;T<a;T++){const P=this._ids[T],D=this._dists[P];D>I&&(L[E++]=P,I=D)}this.hull=L.subarray(0,E),this.triangles=new Uint32Array(0),this.halfedges=new Uint32Array(0);return}if(ns(m,y,v,x,w,$)<0){const L=p,E=v,T=x;p=g,v=w,x=$,g=L,w=E,$=T}const A=T7(m,y,v,x,w,$);this._cx=A.x,this._cy=A.y;for(let L=0;L<a;L++)this._dists[L]=Pl(e[2*L],e[2*L+1],A.x,A.y);Ur(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(v,x)]=p,o[this._hashKey(w,$)]=g,this.trianglesLen=0,this._addTriangle(d,p,g,-1,-1,-1);for(let L=0,E,T;L<this._ids.length;L++){const I=this._ids[L],P=e[2*I],D=e[2*I+1];if(L>0&&Math.abs(P-E)<=_1&&Math.abs(D-T)<=_1||(E=P,T=D,I===d||I===p||I===g))continue;let C=0;for(let N=0,z=this._hashKey(P,D);N<this._hashSize&&(C=o[(z+N)%this._hashSize],!(C!==-1&&C!==r[C]));N++);C=n[C];let S=C,R;for(;R=r[S],ns(P,D,e[2*S],e[2*S+1],e[2*R],e[2*R+1])>=0;)if(S=R,S===C){S=-1;break}if(S===-1)continue;let G=this._addTriangle(S,I,r[S],-1,-1,i[S]);i[I]=this._legalize(G+2),i[S]=G,_++;let M=r[S];for(;R=r[M],ns(P,D,e[2*M],e[2*M+1],e[2*R],e[2*R+1])<0;)G=this._addTriangle(M,I,R,i[I],-1,i[M]),i[I]=this._legalize(G+2),r[M]=M,_--,M=R;if(S===C)for(;R=n[S],ns(P,D,e[2*R],e[2*R+1],e[2*S],e[2*S+1])<0;)G=this._addTriangle(R,I,S,-1,i[S],i[R]),this._legalize(G+2),i[R]=G,r[S]=S,_--,S=R;this._hullStart=n[I]=S,r[S]=n[M]=I,r[I]=M,o[this._hashKey(P,D)]=I,o[this._hashKey(e[2*S],e[2*S+1])]=S}this.hull=new Uint32Array(_);for(let L=0,E=this._hullStart;L<_;L++)this.hull[L]=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(S7(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=rs[--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(A7(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 v=c+(s+1)%3;o<rs.length&&(rs[o++]=v)}else{if(o===0)break;e=rs[--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 S7(t,e){const n=t/(Math.abs(t)+Math.abs(e));return(e>0?3-n:1+n)/4}function Pl(t,e,n,r){const i=t-n,o=e-r;return i*i+o*o}function A7(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 M7(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 T7(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 Ur(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;Ji(t,i,o),e[t[n]]>e[t[r]]&&Ji(t,n,r),e[t[o]]>e[t[r]]&&Ji(t,o,r),e[t[n]]>e[t[o]]&&Ji(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;Ji(t,o,a)}t[n+1]=t[a],t[a]=s,r-o+1>=a-n?(Ur(t,e,o,r),Ur(t,e,n,a-1)):(Ur(t,e,n,a-1),Ur(t,e,o,r))}}function Ji(t,e,n){const r=t[e];t[e]=t[n],t[n]=r}function P7(t){return t[0]}function D7(t){return t[1]}const w1=1e-6;class jn{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)>w1||Math.abs(this._y1-o)>w1)&&(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 Dl{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 $1{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,v,x;g<y;g+=3,m+=2){const b=r[g]*2,w=r[g+1]*2,$=r[g+2]*2,A=e[b],_=e[b+1],L=e[w],E=e[w+1],T=e[$],I=e[$+1],P=L-A,D=E-_,C=T-A,S=I-_,R=(P*S-D*C)*2;if(Math.abs(R)<1e-9){if(o===void 0){o=a=0;for(const M of n)o+=e[M*2],a+=e[M*2+1];o/=n.length,a/=n.length}const G=1e9*Math.sign((o-A)*S-(a-_)*C);v=(A+T)/2-G*S,x=(_+I)/2+G*C}else{const G=1/R,M=P*P+D*D,N=C*C+S*S;v=A+(S*M-D*N)*G,x=_+(P*N-C*M)*G}s[m]=v,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 jn: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],v=a[p+1];this._renderSegment(g,m,y,v,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 jn: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 jn: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 Dl;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,v;if(c===0){if((p=this._clipSegment(o,a,s,u,c,l))===null)continue;[g,m,y,v]=p}else{if((p=this._clipSegment(s,u,o,a,l,c))===null)continue;[y,v,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,v),h&&f&&this._edge(e,h,f,i,i.length),i?i.push(y,v):i=[y,v]}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 L7=2*Math.PI,Br=Math.pow;function E7(t){return t[0]}function k7(t){return t[1]}function C7(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 I7(t,e,n){return[t+Math.sin(t+e)*n,e+Math.cos(t-e)*n]}class Ll{static from(e,n=E7,r=k7,i){return new Ll("length"in e?R7(e,n,r,i):Float64Array.from(N7(e,n,r,i)))}constructor(e){this._delaunator=new is(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&&C7(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=I7(n[2*f],n[2*f+1],h);n[2*f]=p[0],n[2*f+1]=p[1]}this._delaunator=new is(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 $1(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=Br(n-c[e*2],2)+Br(r-c[e*2+1],2);const f=i[e];let d=f;do{let p=u[d];const g=Br(n-c[p*2],2)+Br(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&&Br(n-c[d*2],2)+Br(r-c[d*2+1],2)<h)return d;break}}while(d!==f);return l}render(e){const n=e==null?e=new jn: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 jn: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,L7)}return r&&r.value()}renderHull(e){const n=e==null?e=new jn: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 Dl;return this.renderHull(e),e.value()}renderTriangle(e,n){const r=n==null?n=new jn: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 Dl;return this.renderTriangle(e,n),n.value()}}function R7(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*N7(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 S1={},El={},kl=34,to=10,Cl=13;function A1(t){return new Function("d","return {"+t.map(function(e,n){return JSON.stringify(e)+": d["+n+'] || ""'}).join(",")+"}")}function F7(t,e){var n=A1(t);return function(r,i){return e(n(r),i,t)}}function M1(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 G7(t){return t<0?"-"+ne(-t,6):t>9999?"+"+ne(t,6):ne(t,4)}function z7(t){var e=t.getUTCHours(),n=t.getUTCMinutes(),r=t.getUTCSeconds(),i=t.getUTCMilliseconds();return isNaN(t)?"Invalid Date":G7(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 os(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?F7(m,f):A1(m)});return g.columns=p||[],g}function i(h,f){var d=[],p=h.length,g=0,m=0,y,v=p<=0,x=!1;h.charCodeAt(p-1)===to&&--p,h.charCodeAt(p-1)===Cl&&--p;function b(){if(v)return El;if(x)return x=!1,S1;var $,A=g,_;if(h.charCodeAt(A)===kl){for(;g++<p&&h.charCodeAt(g)!==kl||h.charCodeAt(++g)===kl;);return($=g)>=p?v=!0:(_=h.charCodeAt(g++))===to?x=!0:_===Cl&&(x=!0,h.charCodeAt(g)===to&&++g),h.slice(A+1,$-1).replace(/""/g,'"')}for(;g<p;){if((_=h.charCodeAt($=g++))===to)x=!0;else if(_===Cl)x=!0,h.charCodeAt(g)===to&&++g;else if(_!==n)continue;return h.slice(A,$)}return v=!0,h.slice(A,p)}for(;(y=b())!==El;){for(var w=[];y!==S1&&y!==El;)w.push(y),y=b();f&&(w=f(w,m++))==null||d.push(w)}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=M1(h)),[f.map(l).join(t)].concat(o(h,f)).join(`
7
- `)}function s(h,f){return f==null&&(f=M1(h)),o(h,f).join(`
5
+ `):"",this.name="UnsubscriptionError",this.errors=e}});function fa(t,e){if(t){var n=t.indexOf(e);0<=n&&t.splice(n,1)}}var Ai=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=_r(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 gc?g.errors:[g]}var h=this._finalizers;if(h){this._finalizers=null;try{for(var f=_r(h),d=f.next();!d.done;d=f.next()){var p=d.value;try{Fp(p)}catch(g){o=o??[],g instanceof gc?o=Si(Si([],$i(o)),$i(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 gc(o)}},t.prototype.add=function(e){var n;if(e&&e!==this)if(this.closed)Fp(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)&&fa(n,e)},t.prototype.remove=function(e){var n=this._finalizers;n&&fa(n,e),e instanceof t&&e._removeParent(this)},t.EMPTY=function(){var e=new t;return e.closed=!0,e}(),t}(),Rp=Ai.EMPTY;function Np(t){return t instanceof Ai||t&&"closed"in t&&Pt(t.remove)&&Pt(t.add)&&Pt(t.unsubscribe)}function Fp(t){Pt(t)?t():t.unsubscribe()}var Gp={onUnhandledError:null,onStoppedNotification:null,Promise:void 0,useDeprecatedSynchronousErrorHandling:!1,useDeprecatedNextContext:!1},L3={setTimeout:function(t,e){for(var n=[],r=2;r<arguments.length;r++)n[r-2]=arguments[r];return setTimeout.apply(void 0,Si([t,e],$i(n)))},clearTimeout:function(t){return clearTimeout(t)},delegate:void 0};function zp(t){L3.setTimeout(function(){throw t})}function mc(){}function ha(t){t()}var yc=function(t){je(e,t);function e(n){var r=t.call(this)||this;return r.isStopped=!1,n?(r.destination=n,Np(n)&&n.add(r)):r.destination=I3,r}return e.create=function(n,r,i){return new Mi(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}(Ai),E3=Function.prototype.bind;function bc(t,e){return E3.call(t,e)}var k3=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){da(r)}},t.prototype.error=function(e){var n=this.partialObserver;if(n.error)try{n.error(e)}catch(r){da(r)}else da(e)},t.prototype.complete=function(){var e=this.partialObserver;if(e.complete)try{e.complete()}catch(n){da(n)}},t}(),Mi=function(t){je(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&&Gp.useDeprecatedNextContext?(s=Object.create(n),s.unsubscribe=function(){return o.unsubscribe()},a={next:n.next&&bc(n.next,s),error:n.error&&bc(n.error,s),complete:n.complete&&bc(n.complete,s)}):a=n}return o.destination=new k3(a),o}return e}(yc);function da(t){zp(t)}function C3(t){throw t}var I3={closed:!0,next:mc,error:C3,complete:mc},vc=function(){return typeof Symbol=="function"&&Symbol.observable||"@@observable"}();function xc(t){return t}function R3(t){return t.length===0?xc:t.length===1?t[0]:function(e){return t.reduce(function(n,r){return r(n)},e)}}var $e=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=F3(e)?e:new Mi(e,n,r);return ha(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=Op(n),new n(function(i,o){var a=new Mi({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[vc]=function(){return this},t.prototype.pipe=function(){for(var e=[],n=0;n<arguments.length;n++)e[n]=arguments[n];return R3(e)(this)},t.prototype.toPromise=function(e){var n=this;return e=Op(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 Op(t){var e;return(e=t??Gp.Promise)!==null&&e!==void 0?e:Promise}function N3(t){return t&&Pt(t.next)&&Pt(t.error)&&Pt(t.complete)}function F3(t){return t&&t instanceof yc||N3(t)&&Np(t)}function G3(t){return Pt(t==null?void 0:t.lift)}function ln(t){return function(e){if(G3(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 $r(t,e,n,r,i){return new z3(t,e,n,r,i)}var z3=function(t){je(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}(yc),O3=pc(function(t){return function(){t(this),this.name="ObjectUnsubscribedError",this.message="object unsubscribed"}}),Ti=function(t){je(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 Up(this,this);return r.operator=n,r},e.prototype._throwIfClosed=function(){if(this.closed)throw new O3},e.prototype.next=function(n){var r=this;ha(function(){var i,o;if(r._throwIfClosed(),!r.isStopped){r.currentObservers||(r.currentObservers=Array.from(r.observers));try{for(var a=_r(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;ha(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;ha(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?Rp:(this.currentObservers=null,s.push(n),new Ai(function(){r.currentObservers=null,fa(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 $e;return n.source=this,n},e.create=function(n,r){return new Up(n,r)},e}($e),Up=function(t){je(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:Rp},e}(Ti),_c={now:function(){return(_c.delegate||Date).now()},delegate:void 0},U3=function(t){je(e,t);function e(n,r,i){n===void 0&&(n=1/0),r===void 0&&(r=1/0),i===void 0&&(i=_c);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}(Ti),B3=function(t){je(e,t);function e(n,r){return t.call(this)||this}return e.prototype.schedule=function(n,r){return this},e}(Ai),Bp={setInterval:function(t,e){for(var n=[],r=2;r<arguments.length;r++)n[r-2]=arguments[r];return setInterval.apply(void 0,Si([t,e],$i(n)))},clearInterval:function(t){return clearInterval(t)},delegate:void 0},Y3=function(t){je(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),Bp.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&&Bp.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,fa(o,this),r!=null&&(this.id=this.recycleAsyncId(i,r,null)),this.delay=null,t.prototype.unsubscribe.call(this)}},e}(B3),Yp=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=_c.now,t}(),H3=function(t){je(e,t);function e(n,r){r===void 0&&(r=Yp.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}(Yp);new H3(Y3);function W3(t){return t&&Pt(t.schedule)}function q3(t){return t[t.length-1]}function Hp(t){return W3(q3(t))?t.pop():void 0}var Wp=function(t){return t&&typeof t.length=="number"&&typeof t!="function"};function qp(t){return Pt(t==null?void 0:t.then)}function jp(t){return Pt(t[vc])}function Xp(t){return Symbol.asyncIterator&&Pt(t==null?void 0:t[Symbol.asyncIterator])}function Vp(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 j3(){return typeof Symbol!="function"||!Symbol.iterator?"@@iterator":Symbol.iterator}var Zp=j3();function Kp(t){return Pt(t==null?void 0:t[Zp])}function Qp(t){return P3(this,arguments,function(){var e,n,r,i;return Ip(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,wr(e.read())];case 3:return n=o.sent(),r=n.value,i=n.done,i?[4,wr(void 0)]:[3,5];case 4:return[2,o.sent()];case 5:return[4,wr(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 Jp(t){return Pt(t==null?void 0:t.getReader)}function fn(t){if(t instanceof $e)return t;if(t!=null){if(jp(t))return X3(t);if(Wp(t))return V3(t);if(qp(t))return Z3(t);if(Xp(t))return tg(t);if(Kp(t))return K3(t);if(Jp(t))return Q3(t)}throw Vp(t)}function X3(t){return new $e(function(e){var n=t[vc]();if(Pt(n.subscribe))return n.subscribe(e);throw new TypeError("Provided object does not correctly implement Symbol.observable")})}function V3(t){return new $e(function(e){for(var n=0;n<t.length&&!e.closed;n++)e.next(t[n]);e.complete()})}function Z3(t){return new $e(function(e){t.then(function(n){e.closed||(e.next(n),e.complete())},function(n){return e.error(n)}).then(null,zp)})}function K3(t){return new $e(function(e){var n,r;try{for(var i=_r(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 tg(t){return new $e(function(e){J3(t,e).catch(function(n){return e.error(n)})})}function Q3(t){return tg(Qp(t))}function J3(t,e){var n,r,i,o;return T3(this,void 0,void 0,function(){var a,s;return Ip(this,function(u){switch(u.label){case 0:u.trys.push([0,5,6,11]),n=D3(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 eg(t,e){return e===void 0&&(e=0),ln(function(n,r){n.subscribe($r(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 ng(t,e){return e===void 0&&(e=0),ln(function(n,r){r.add(t.schedule(function(){return n.subscribe(r)},e))})}function tA(t,e){return fn(t).pipe(ng(e),eg(e))}function eA(t,e){return fn(t).pipe(ng(e),eg(e))}function nA(t,e){return new $e(function(n){var r=0;return e.schedule(function(){r===t.length?n.complete():(n.next(t[r++]),n.closed||this.schedule())})})}function rA(t,e){return new $e(function(n){var r;return En(n,e,function(){r=t[Zp](),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 rg(t,e){if(!t)throw new Error("Iterable cannot be null");return new $e(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 iA(t,e){return rg(Qp(t),e)}function oA(t,e){if(t!=null){if(jp(t))return tA(t,e);if(Wp(t))return nA(t,e);if(qp(t))return eA(t,e);if(Xp(t))return rg(t,e);if(Kp(t))return rA(t,e);if(Jp(t))return iA(t,e)}throw Vp(t)}function aA(t,e){return e?oA(t,e):fn(t)}pc(function(t){return function(){t(this),this.name="EmptyError",this.message="no elements in sequence"}});function pa(t,e){return ln(function(n,r){var i=0;n.subscribe($r(r,function(o){r.next(t.call(e,o,i++))}))})}function sA(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;fn(n(g,l++)).subscribe($r(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($r(e,d,function(){h=!0,f()})),function(){}}function ig(t,e,n){return n===void 0&&(n=1/0),Pt(e)?ig(function(r,i){return pa(function(o,a){return e(r,o,i,a)})(fn(t(r,i)))},n):(typeof e=="number"&&(n=e),ln(function(r,i){return sA(r,i,t,n)}))}function uA(t){return ig(xc,t)}function cA(){return uA(1)}function og(){for(var t=[],e=0;e<arguments.length;e++)t[e]=arguments[e];return cA()(aA(t,Hp(t)))}function lA(t,e){return e===void 0&&(e=xc),t=t??fA,ln(function(n,r){var i,o=!0;n.subscribe($r(r,function(a){var s=e(a);(o||!t(i,s))&&(o=!1,i=s,r.next(a))}))})}function fA(t,e){return t===e}function hA(t){t===void 0&&(t={});var e=t.connector,n=e===void 0?function(){return new Ti}: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 ln(function(v,b){d++,!g&&!p&&m();var _=f=f??n();b.add(function(){d--,d===0&&!g&&!p&&(h=wc(x,u))}),_.subscribe(b),!l&&d>0&&(l=new Mi({next:function(w){return _.next(w)},error:function(w){g=!0,m(),h=wc(y,i,w),_.error(w)},complete:function(){p=!0,m(),h=wc(y,a),_.complete()}}),fn(v).subscribe(l))})(c)}}function wc(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 Mi({next:function(){i.unsubscribe(),t()}});return fn(e.apply(void 0,Si([],$i(n)))).subscribe(i)}}function dA(t,e,n){var r,i=!1;return r=t,hA({connector:function(){return new U3(r,e,n)},resetOnError:!0,resetOnComplete:!1,resetOnRefCountZero:i})}function pA(){for(var t=[],e=0;e<arguments.length;e++)t[e]=arguments[e];var n=Hp(t);return ln(function(r,i){(n?og(t,r,n):og(t,r)).subscribe(i)})}function gA(t){return ln(function(e,n){fn(t).subscribe($r(n,function(){return n.complete()},mc)),!n.closed&&e.subscribe(n)})}const mA=t=>t.pipe(pa(e=>e.styles.textSize),lA(),pa(e=>{let n=NaN;if(typeof e=="string")if(e.includes("rem")){const r=parseFloat(getComputedStyle(document.documentElement).fontSize);n=parseFloat(e)*r}else e.includes("px")&&(n=parseFloat(e));else if(typeof e=="number")return e;return n||14})),ag=({maxValue:t=1,minValue:e=0,axisWidth:n,scaleDomain:r=gr.scaleDomain,scaleRange:i=gr.scaleRange})=>{const o=r[0]??gr.scaleDomain[0],a=r[1]??gr.scaleDomain[1],s=i[0]??gr.scaleRange[0],u=i[1]??gr.scaleRange[1],c=o==="auto"?e:o,l=a==="auto"?t:a,h=t-(t-c)/(1-s),f=l/u;return kp().domain([h,f]).range([0,n])},sg=({axisLabels:t,axisWidth:e,padding:n=.5})=>{let r=[0,e];return y3().domain(t).range(r).padding(n)},yA=({axisLabels:t,axisWidth:e,padding:n=.5,reverse:r=!1})=>{let i=t.map((o,a)=>a);return r&&i.reverse(),Cp().domain([-0,e+0]).range(i)};function bA({name:t,defaultParams:e,initFn:n}){const r=new Ti,i=new Ti,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=hc(c,e)},setContext:c=>{s=c,s.observer.fullParams$=i.pipe(gA(r),pA({}),pa(l=>hc(l,u)),dA(1))}}}const Pi=()=>function(t,e){return function(n){return class{constructor(){const r=bA({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}}}},Di=Pi(),ae=Pi(),Ce=Pi(),ug=Pi(),cg=Pi();function _t(t,e){return t==null||e==null?NaN:t<e?-1:t>e?1:t>=e?0:NaN}function lg(t,e){return t==null||e==null?NaN:e<t?-1:e>t?1:e>=t?0:NaN}function ga(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===lg?t:vA,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 vA(){return 0}function ma(t){return t===null?NaN:+t}function*xA(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 fg=ga(_t),hg=fg.right,_A=fg.left,wA=ga(ma).center,kn=hg;function $A(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=$c(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 dg=pg($c),SA=pg(AA);function pg(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?(Sr(s,c,i,o,a),Sr(s,i,c,o,a),Sr(s,c,i,o,a),Ar(u,i,c,o,a),Ar(u,c,i,o,a),Ar(u,i,c,o,a)):s?(Sr(s,i,c,o,a),Sr(s,c,i,o,a),Sr(s,i,c,o,a)):u&&(Ar(u,i,c,o,a),Ar(u,c,i,o,a),Ar(u,i,c,o,a)),e}}function Sr(t,e,n,r,i){for(let o=0,a=r*i;o<a;)t(e,n,o,o+=r,1)}function Ar(t,e,n,r,i){for(let o=0,a=r*i;o<r;++o)t(e,n,o,o+a,r)}function AA(t){const e=$c(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 $c(t){const e=Math.floor(t);if(e===t)return MA(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 MA(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 ya(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 TA(t){return t.length|0}function PA(t){return!(t>0)}function DA(t){return typeof t!="object"||"length"in t?t:Array.from(t)}function LA(t){return e=>t(...e)}function EA(...t){const e=typeof t[t.length-1]=="function"&&LA(t.pop());t=t.map(DA);const n=t.map(TA),r=t.length-1,i=new Array(r+1).fill(0),o=[];if(r<0||n.some(PA))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 kA(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 gg(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 mg(t,e){const n=gg(t,e);return n&&Math.sqrt(n)}function Li(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 CA(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 IA(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 Ei extends Map{constructor(e,n=vg){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(Sc(this,e))}has(e){return super.has(Sc(this,e))}set(e,n){return super.set(yg(this,e),n)}delete(e){return super.delete(bg(this,e))}}class Cn extends Set{constructor(e,n=vg){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(Sc(this,e))}add(e){return super.add(yg(this,e))}delete(e){return super.delete(bg(this,e))}}function Sc({_intern:t,_key:e},n){const r=e(n);return t.has(r)?t.get(r):n}function yg({_intern:t,_key:e},n){const r=e(n);return t.has(r)?t.get(r):(t.set(r,n),n)}function bg({_intern:t,_key:e},n){const r=e(n);return t.has(r)&&(n=t.get(r),t.delete(r)),n}function vg(t){return t!==null&&typeof t=="object"?t.valueOf():t}function Mr(t){return t}function xg(t,...e){return Tr(t,Mr,Mr,e)}function _g(t,...e){return Tr(t,Array.from,Mr,e)}function wg(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 RA(t,...e){return wg(_g(t,...e),e)}function NA(t,e,...n){return wg(Sg(t,e,...n),n)}function $g(t,e,...n){return Tr(t,Mr,e,n)}function Sg(t,e,...n){return Tr(t,Array.from,e,n)}function FA(t,...e){return Tr(t,Mr,Ag,e)}function GA(t,...e){return Tr(t,Array.from,Ag,e)}function Ag(t){if(t.length!==1)throw new Error("duplicate key");return t[0]}function Tr(t,e,n,r){return function i(o,a){if(a>=r.length)return n(o);const s=new Ei,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 Mg(t,e){return Array.from(e,n=>t[n])}function Ac(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=Pr(a[i],a[o]);if(s)return s}})):(n=t.map(n),r.sort((i,o)=>Pr(n[i],n[o]))),Mg(t,r)}return t.sort(Mc(n))}function Mc(t=_t){if(t===_t)return Pr;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 Pr(t,e){return(t==null||!(t>=t))-(e==null||!(e>=e))||(t<e?-1:t>e?1:0)}function zA(t,e,n){return(e.length!==2?Ac($g(t,e,n),([r,i],[o,a])=>_t(i,a)||_t(r,o)):Ac(xg(t,n),([r,i],[o,a])=>e(i,a)||_t(r,o))).map(([r])=>r)}var OA=Array.prototype,UA=OA.slice;function Tc(t){return()=>t}const BA=Math.sqrt(50),YA=Math.sqrt(10),HA=Math.sqrt(2);function ba(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>=BA?10:o>=YA?5:o>=HA?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?ba(t,e,n*2):[s,u,c]}function In(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?ba(e,t,n):ba(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,ba(t,e,n)[2]}function va(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 Pc(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 Dc(t){return Math.max(1,Math.ceil(Math.log(ya(t))/Math.LN2)+1)}function Tg(){var t=Mr,e=Li,n=Dc;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===Li&&([h,f]=Pc(h,f,b)),d=In(h,f,b),d[0]<=h&&(u=Rn(h,f,b)),d[d.length-1]>=f)if(v>=f&&e===Li){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:Tc(i),r):t},r.domain=function(i){return arguments.length?(e=typeof i=="function"?i:Tc([i[0],i[1]]),r):e},r.thresholds=function(i){return arguments.length?(n=typeof i=="function"?i:Tc(Array.isArray(i)?UA.call(i):i),r):n},r}function ki(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 Lc(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 xa(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 Ec(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 _a(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?Pr:Mc(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));_a(t,e,d,p,i)}const o=t[e];let a=n,s=r;for(Ci(t,n,e),i(t[r],o)>0&&Ci(t,n,r);a<s;){for(Ci(t,a,s),++a,--s;i(t[a],o)<0;)++a;for(;i(t[s],o)>0;)--s}i(t[n],o)===0?Ci(t,n,s):(++s,Ci(t,s,r)),s<=e&&(n=s+1),e<=s&&(r=s-1)}return t}function Ci(t,e,n){const r=t[e];t[e]=t[n],t[n]=r}function Pg(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 Ii(t,e,n){if(t=Float64Array.from(xA(t,n)),!(!(r=t.length)||isNaN(e=+e))){if(e<=0||r<2)return xa(t);if(e>=1)return ki(t);var r,i=(r-1)*e,o=Math.floor(i),a=ki(_a(t,o).subarray(0,o+1)),s=xa(t.subarray(o+1));return a+(s-a)*(i-o)}}function Dg(t,e,n=ma){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 Lg(t,e,n=ma){if(!isNaN(e=+e)){if(r=Float64Array.from(t,(s,u)=>ma(n(t[u],u,t))),e<=0)return Ec(r);if(e>=1)return Lc(r);var r,i=Uint32Array.from(t,(s,u)=>u),o=r.length-1,a=Math.floor(o*e);return _a(i,a,0,o,(s,u)=>Pr(r[s],r[u])),a=Pg(i.subarray(0,a+1),s=>r[s]),a>=0?a:-1}}function WA(t,e,n){const r=ya(t),i=Ii(t,.75)-Ii(t,.25);return r&&i?Math.ceil((n-e)/(2*i*Math.pow(r,-1/3))):1}function qA(t,e,n){const r=ya(t),i=mg(t);return r&&i?Math.ceil((n-e)*Math.cbrt(r)/(3.49*i)):1}function jA(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 XA(t,e){return Ii(t,.5,e)}function VA(t,e){return Lg(t,.5,e)}function*ZA(t){for(const e of t)yield*e}function kc(t){return Array.from(ZA(t))}function KA(t,e){const n=new Ei;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 QA(t,e=JA){const n=[];let r,i=!1;for(const o of t)i&&n.push(e(r,o)),r=o,i=!0;return n}function JA(t,e){return[t,e]}function hn(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 t5(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)=>Pr(n[s],n[u]):Mc(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 e5(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 Eg(t,e=_t){if(e.length===1)return Ec(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 n5(t,e=_t){if(e.length===1)return Lc(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 r5(t,e){const n=Eg(t,e);return n<0?void 0:n}const i5=kg(Math.random);function kg(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 o5(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 Cg(t){if(!(o=t.length))return[];for(var e=-1,n=xa(t,a5),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 a5(t){return t.length}function s5(){return Cg(arguments)}function u5(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 c5(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 l5(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 f5(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 h5(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 d5(t){if(typeof t[Symbol.iterator]!="function")throw new TypeError("values is not iterable");return Array.from(t).reverse()}function p5(t,...e){t=new Cn(t);for(const n of e)for(const r of n)t.delete(r);return t}function g5(t,e){const n=e[Symbol.iterator](),r=new Cn;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 m5(t,...e){t=new Cn(t),e=e.map(y5);t:for(const n of t)for(const r of e)if(!r.has(n)){t.delete(n);continue t}return t}function y5(t){return t instanceof Cn?t:new Cn(t)}function Ig(t,e){const n=t[Symbol.iterator](),r=new Set;for(const i of e){const o=Rg(i);if(r.has(o))continue;let a,s;for(;{value:a,done:s}=n.next();){if(s)return!1;const u=Rg(a);if(r.add(u),Object.is(o,u))break}}return!0}function Rg(t){return t!==null&&typeof t=="object"?t.valueOf():t}function b5(t,e){return Ig(e,t)}function v5(...t){const e=new Cn;for(const n of t)for(const r of n)e.add(r);return e}function x5(t){return t}var wa=1,$a=2,Cc=3,Ri=4,Ng=1e-6;function _5(t){return"translate("+t+",0)"}function w5(t){return"translate(0,"+t+")"}function $5(t){return e=>+t(e)}function S5(t,e){return e=Math.max(0,t.bandwidth()-e*2)/2,t.round()&&(e=Math.round(e)),n=>+t(n)+e}function A5(){return!this.__axis}function Sa(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===wa||t===Ri?-1:1,l=t===Ri||t===$a?"x":"y",h=t===wa||t===Cc?_5:w5;function f(d){var p=r??(e.ticks?e.ticks.apply(e,n):e.domain()),g=i??(e.tickFormat?e.tickFormat.apply(e,n):x5),m=Math.max(o,0)+s,y=e.range(),x=+y[0]+u,v=+y[y.length-1]+u,b=(e.bandwidth?S5:$5)(e.copy(),u),_=d.selection?d.selection():d,w=_.selectAll(".domain").data([null]),S=_.selectAll(".tick").data(p,e).order(),k=S.exit(),$=S.enter().append("g").attr("class","tick"),E=S.select("line"),A=S.select("text");w=w.merge(w.enter().insert("path",".tick").attr("class","domain").attr("stroke","currentColor")),S=S.merge($),E=E.merge($.append("line").attr("stroke","currentColor").attr(l+"2",c*o)),A=A.merge($.append("text").attr("fill","currentColor").attr(l,c*m).attr("dy",t===wa?"0em":t===Cc?"0.71em":"0.32em")),d!==_&&(w=w.transition(d),S=S.transition(d),E=E.transition(d),A=A.transition(d),k=k.transition(d).attr("opacity",Ng).attr("transform",function(I){return isFinite(I=b(I))?h(I+u):this.getAttribute("transform")}),$.attr("opacity",Ng).attr("transform",function(I){var D=this.parentNode.__axis;return h((D&&isFinite(D=D(I))?D:b(I))+u)})),k.remove(),w.attr("d",t===Ri||t===$a?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)}),E.attr(l+"2",c*o),A.attr(l,c*m).text(g),_.filter(A5).attr("fill","none").attr("font-size",10).attr("font-family","sans-serif").attr("text-anchor",t===$a?"start":t===Ri?"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 Fg(t){return Sa(wa,t)}function M5(t){return Sa($a,t)}function T5(t){return Sa(Cc,t)}function Gg(t){return Sa(Ri,t)}var P5={value:()=>{}};function Nn(){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 Aa(n)}function Aa(t){this._=t}function D5(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}})}Aa.prototype=Nn.prototype={constructor:Aa,on:function(t,e){var n=this._,r=D5(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]=zg(n[i],t.name,e);else if(e==null)for(i in n)n[i]=zg(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 Aa(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 zg(t,e,n){for(var r=0,i=t.length;r<i;++r)if(t[r].name===e){t[r]=P5,t=t.slice(0,r).concat(t.slice(r+1));break}return n!=null&&t.push({name:e,value:n}),t}var Ic="http://www.w3.org/1999/xhtml";const Rc={svg:"http://www.w3.org/2000/svg",xhtml:Ic,xlink:"http://www.w3.org/1999/xlink",xml:"http://www.w3.org/XML/1998/namespace",xmlns:"http://www.w3.org/2000/xmlns/"};function Ni(t){var e=t+="",n=e.indexOf(":");return n>=0&&(e=t.slice(0,n))!=="xmlns"&&(t=t.slice(n+1)),Rc.hasOwnProperty(e)?{space:Rc[e],local:t}:t}function E5(t){return function(){var e=this.ownerDocument,n=this.namespaceURI;return n===Ic&&e.documentElement.namespaceURI===Ic?e.createElement(t):e.createElementNS(n,t)}}function k5(t){return function(){return this.ownerDocument.createElementNS(t.space,t.local)}}function Ma(t){var e=Ni(t);return(e.local?k5:E5)(e)}function C5(){}function Ta(t){return t==null?C5:function(){return this.querySelector(t)}}function I5(t){typeof t!="function"&&(t=Ta(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 Og(t){return t==null?[]:Array.isArray(t)?t:Array.from(t)}function R5(){return[]}function Nc(t){return t==null?R5:function(){return this.querySelectorAll(t)}}function N5(t){return function(){return Og(t.apply(this,arguments))}}function F5(t){typeof t=="function"?t=N5(t):t=Nc(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 Fc(t){return function(){return this.matches(t)}}function Ug(t){return function(e){return e.matches(t)}}var G5=Array.prototype.find;function z5(t){return function(){return G5.call(this.children,t)}}function O5(){return this.firstElementChild}function U5(t){return this.select(t==null?O5:z5(typeof t=="function"?t:Ug(t)))}var B5=Array.prototype.filter;function Y5(){return Array.from(this.children)}function H5(t){return function(){return B5.call(this.children,t)}}function W5(t){return this.selectAll(t==null?Y5:H5(typeof t=="function"?t:Ug(t)))}function q5(t){typeof t!="function"&&(t=Fc(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 Bg(t){return new Array(t.length)}function j5(){return new Yt(this._enter||this._groups.map(Bg),this._parents)}function Pa(t,e){this.ownerDocument=t.ownerDocument,this.namespaceURI=t.namespaceURI,this._next=null,this._parent=t,this.__data__=e}Pa.prototype={constructor:Pa,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 X5(t){return function(){return t}}function V5(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 Pa(t,o[a]);for(;a<u;++a)(s=e[a])&&(i[a]=s)}function Z5(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 Pa(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 Q5(t,e){if(!arguments.length)return Array.from(this,K5);var n=e?Z5:V5,r=this._parents,i=this._groups;typeof t!="function"&&(t=X5(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=J5(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 J5(t){return typeof t=="object"&&"length"in t?t:Array.from(t)}function t6(){return new Yt(this._exit||this._groups.map(Bg),this._parents)}function e6(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 n6(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 r6(){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 i6(t){t||(t=o6);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 o6(t,e){return t<e?-1:t>e?1:t>=e?0:NaN}function a6(){var t=arguments[0];return arguments[0]=this,t.apply(null,arguments),this}function s6(){return Array.from(this)}function u6(){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 c6(){let t=0;for(const e of this)++t;return t}function l6(){return!this.node()}function f6(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 h6(t){return function(){this.removeAttribute(t)}}function d6(t){return function(){this.removeAttributeNS(t.space,t.local)}}function p6(t,e){return function(){this.setAttribute(t,e)}}function g6(t,e){return function(){this.setAttributeNS(t.space,t.local,e)}}function m6(t,e){return function(){var n=e.apply(this,arguments);n==null?this.removeAttribute(t):this.setAttribute(t,n)}}function y6(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 b6(t,e){var n=Ni(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?d6:h6:typeof e=="function"?n.local?y6:m6:n.local?g6:p6)(n,e))}function Gc(t){return t.ownerDocument&&t.ownerDocument.defaultView||t.document&&t||t.defaultView}function v6(t){return function(){this.style.removeProperty(t)}}function x6(t,e,n){return function(){this.style.setProperty(t,e,n)}}function _6(t,e,n){return function(){var r=e.apply(this,arguments);r==null?this.style.removeProperty(t):this.style.setProperty(t,r,n)}}function w6(t,e,n){return arguments.length>1?this.each((e==null?v6:typeof e=="function"?_6:x6)(t,e,n??"")):Fn(this.node(),t)}function Fn(t,e){return t.style.getPropertyValue(e)||Gc(t).getComputedStyle(t,null).getPropertyValue(e)}function $6(t){return function(){delete this[t]}}function S6(t,e){return function(){this[t]=e}}function A6(t,e){return function(){var n=e.apply(this,arguments);n==null?delete this[t]:this[t]=n}}function M6(t,e){return arguments.length>1?this.each((e==null?$6:typeof e=="function"?A6:S6)(t,e)):this.node()[t]}function Yg(t){return t.trim().split(/^|\s+/)}function zc(t){return t.classList||new Hg(t)}function Hg(t){this._node=t,this._names=Yg(t.getAttribute("class")||"")}Hg.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 Wg(t,e){for(var n=zc(t),r=-1,i=e.length;++r<i;)n.add(e[r])}function qg(t,e){for(var n=zc(t),r=-1,i=e.length;++r<i;)n.remove(e[r])}function T6(t){return function(){Wg(this,t)}}function P6(t){return function(){qg(this,t)}}function D6(t,e){return function(){(e.apply(this,arguments)?Wg:qg)(this,t)}}function L6(t,e){var n=Yg(t+"");if(arguments.length<2){for(var r=zc(this.node()),i=-1,o=n.length;++i<o;)if(!r.contains(n[i]))return!1;return!0}return this.each((typeof e=="function"?D6:e?T6:P6)(n,e))}function E6(){this.textContent=""}function k6(t){return function(){this.textContent=t}}function C6(t){return function(){var e=t.apply(this,arguments);this.textContent=e??""}}function I6(t){return arguments.length?this.each(t==null?E6:(typeof t=="function"?C6:k6)(t)):this.node().textContent}function R6(){this.innerHTML=""}function N6(t){return function(){this.innerHTML=t}}function F6(t){return function(){var e=t.apply(this,arguments);this.innerHTML=e??""}}function G6(t){return arguments.length?this.each(t==null?R6:(typeof t=="function"?F6:N6)(t)):this.node().innerHTML}function z6(){this.nextSibling&&this.parentNode.appendChild(this)}function O6(){return this.each(z6)}function U6(){this.previousSibling&&this.parentNode.insertBefore(this,this.parentNode.firstChild)}function B6(){return this.each(U6)}function Y6(t){var e=typeof t=="function"?t:Ma(t);return this.select(function(){return this.appendChild(e.apply(this,arguments))})}function H6(){return null}function W6(t,e){var n=typeof t=="function"?t:Ma(t),r=e==null?H6:typeof e=="function"?e:Ta(e);return this.select(function(){return this.insertBefore(n.apply(this,arguments),r.apply(this,arguments)||null)})}function q6(){var t=this.parentNode;t&&t.removeChild(this)}function j6(){return this.each(q6)}function X6(){var t=this.cloneNode(!1),e=this.parentNode;return e?e.insertBefore(t,this.nextSibling):t}function V6(){var t=this.cloneNode(!0),e=this.parentNode;return e?e.insertBefore(t,this.nextSibling):t}function Z6(t){return this.select(t?V6:X6)}function K6(t){return arguments.length?this.property("__data__",t):this.node().__data__}function Q6(t){return function(e){t.call(this,e,this.__data__)}}function J6(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 t8(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 e8(t,e,n){return function(){var r=this.__on,i,o=Q6(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 n8(t,e,n){var r=J6(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?e8:t8,i=0;i<o;++i)this.each(s(r[i],e,n));return this}function jg(t,e,n){var r=Gc(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 r8(t,e){return function(){return jg(this,t,e)}}function i8(t,e){return function(){return jg(this,t,e.apply(this,arguments))}}function o8(t,e){return this.each((typeof e=="function"?i8:r8)(t,e))}function*a8(){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 Oc=[null];function Yt(t,e){this._groups=t,this._parents=e}function Gn(){return new Yt([[document.documentElement]],Oc)}function s8(){return this}Yt.prototype=Gn.prototype={constructor:Yt,select:I5,selectAll:F5,selectChild:U5,selectChildren:W5,filter:q5,data:Q5,enter:j5,exit:t6,join:e6,merge:n6,selection:s8,order:r6,sort:i6,call:a6,nodes:s6,node:u6,size:c6,empty:l6,each:f6,attr:b6,style:w6,property:M6,classed:L6,text:I6,html:G6,raise:O6,lower:B6,append:Y6,insert:W6,remove:j6,clone:Z6,datum:K6,on:n8,dispatch:o8,[Symbol.iterator]:a8};function V(t){return typeof t=="string"?new Yt([[document.querySelector(t)]],[document.documentElement]):new Yt([[t]],Oc)}function u8(t){return V(Ma(t).call(document.documentElement))}var c8=0;function Xg(){return new Uc}function Uc(){this._="@"+(++c8).toString(36)}Uc.prototype=Xg.prototype={constructor:Uc,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 Vg(t){let e;for(;e=t.sourceEvent;)t=e;return t}function se(t,e){if(t=Vg(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 l8(t,e){return t.target&&(t=Vg(t),e===void 0&&(e=t.currentTarget),t=t.touches||[t]),Array.from(t,n=>se(n,e))}function f8(t){return typeof t=="string"?new Yt([document.querySelectorAll(t)],[document.documentElement]):new Yt([Og(t)],Oc)}const h8={passive:!1},Fi={capture:!0,passive:!1};function Bc(t){t.stopImmediatePropagation()}function Dr(t){t.preventDefault(),t.stopImmediatePropagation()}function Da(t){var e=t.document.documentElement,n=V(t).on("dragstart.drag",Dr,Fi);"onselectstart"in e?n.on("selectstart.drag",Dr,Fi):(e.__noselect=e.style.MozUserSelect,e.style.MozUserSelect="none")}function La(t,e){var n=t.document.documentElement,r=V(t).on("dragstart.drag",null);e&&(r.on("click.drag",Dr,Fi),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 Ea=t=>()=>t;function Yc(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}})}Yc.prototype.on=function(){var t=this._.on.apply(this._,arguments);return t===this._?this:t};function d8(t){return!t.ctrlKey&&!t.button}function p8(){return this.parentNode}function g8(t,e){return e??{x:t.x,y:t.y}}function m8(){return navigator.maxTouchPoints||"ontouchstart"in this}function Zg(){var t=d8,e=p8,n=g8,r=m8,i={},o=Nn("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,h8).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&&(V(b.view).on("mousemove.drag",p,Fi).on("mouseup.drag",g,Fi),Da(b.view),Bc(b),c=!1,s=b.clientX,u=b.clientY,w("start",b))}}function p(b){if(Dr(b),!c){var _=b.clientX-s,w=b.clientY-u;c=_*_+w*w>h}i.mouse("drag",b)}function g(b){V(b.view).on("mousemove.drag mouseup.drag",null),La(b.view,c),Dr(b),i.mouse("end",b)}function m(b,_){if(t.call(this,b,_)){var w=b.changedTouches,S=e.call(this,b,_),k=w.length,$,E;for($=0;$<k;++$)(E=v(this,S,b,_,w[$].identifier,w[$]))&&(Bc(b),E("start",b,w[$]))}}function y(b){var _=b.changedTouches,w=_.length,S,k;for(S=0;S<w;++S)(k=i[_[S].identifier])&&(Dr(b),k("drag",b,_[S]))}function x(b){var _=b.changedTouches,w=_.length,S,k;for(l&&clearTimeout(l),l=setTimeout(function(){l=null},500),S=0;S<w;++S)(k=i[_[S].identifier])&&(Bc(b),k("end",b,_[S]))}function v(b,_,w,S,k,$){var E=o.copy(),A=se($||w,_),I,D,T;if((T=n.call(b,new Yc("beforestart",{sourceEvent:w,target:f,identifier:k,active:a,x:A[0],y:A[1],dx:0,dy:0,dispatch:E}),S))!=null)return I=T.x-A[0]||0,D=T.y-A[1]||0,function C(P,R,G){var M=A,N;switch(P){case"start":i[k]=C,N=a++;break;case"end":delete i[k],--a;case"drag":A=se(G||R,_),N=a;break}E.call(P,b,new Yc(P,{sourceEvent:R,subject:T,target:f,identifier:k,active:N,x:A[0]+I,y:A[1]+D,dx:A[0]-M[0],dy:A[1]-M[1],dispatch:E}),S)}}return f.filter=function(b){return arguments.length?(t=typeof b=="function"?b:Ea(!!b),f):t},f.container=function(b){return arguments.length?(e=typeof b=="function"?b:Ea(b),f):e},f.subject=function(b){return arguments.length?(n=typeof b=="function"?b:Ea(b),f):n},f.touchable=function(b){return arguments.length?(r=typeof b=="function"?b:Ea(!!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 Lr(t,e,n){t.prototype=e.prototype=n,n.constructor=t}function Gi(t,e){var n=Object.create(t.prototype);for(var r in e)n[r]=e[r];return n}function dn(){}var zn=.7,Er=1/zn,kr="\\s*([+-]?\\d+)\\s*",zi="\\s*([+-]?(?:\\d*\\.)?\\d+(?:[eE][+-]?\\d+)?)\\s*",Ie="\\s*([+-]?(?:\\d*\\.)?\\d+(?:[eE][+-]?\\d+)?)%\\s*",y8=/^#([0-9a-f]{3,8})$/,b8=new RegExp(`^rgb\\(${kr},${kr},${kr}\\)$`),v8=new RegExp(`^rgb\\(${Ie},${Ie},${Ie}\\)$`),x8=new RegExp(`^rgba\\(${kr},${kr},${kr},${zi}\\)$`),_8=new RegExp(`^rgba\\(${Ie},${Ie},${Ie},${zi}\\)$`),w8=new RegExp(`^hsl\\(${zi},${Ie},${Ie}\\)$`),$8=new RegExp(`^hsla\\(${zi},${Ie},${Ie},${zi}\\)$`),Kg={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};Lr(dn,pn,{copy(t){return Object.assign(new this.constructor,this,t)},displayable(){return this.rgb().displayable()},hex:Qg,formatHex:Qg,formatHex8:S8,formatHsl:A8,formatRgb:Jg,toString:Jg});function Qg(){return this.rgb().formatHex()}function S8(){return this.rgb().formatHex8()}function A8(){return i0(this).formatHsl()}function Jg(){return this.rgb().formatRgb()}function pn(t){var e,n;return t=(t+"").trim().toLowerCase(),(e=y8.exec(t))?(n=e[1].length,e=parseInt(e[1],16),n===6?t0(e):n===3?new kt(e>>8&15|e>>4&240,e>>4&15|e&240,(e&15)<<4|e&15,1):n===8?ka(e>>24&255,e>>16&255,e>>8&255,(e&255)/255):n===4?ka(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=b8.exec(t))?new kt(e[1],e[2],e[3],1):(e=v8.exec(t))?new kt(e[1]*255/100,e[2]*255/100,e[3]*255/100,1):(e=x8.exec(t))?ka(e[1],e[2],e[3],e[4]):(e=_8.exec(t))?ka(e[1]*255/100,e[2]*255/100,e[3]*255/100,e[4]):(e=w8.exec(t))?r0(e[1],e[2]/100,e[3]/100,1):(e=$8.exec(t))?r0(e[1],e[2]/100,e[3]/100,e[4]):Kg.hasOwnProperty(t)?t0(Kg[t]):t==="transparent"?new kt(NaN,NaN,NaN,0):null}function t0(t){return new kt(t>>16&255,t>>8&255,t&255,1)}function ka(t,e,n,r){return r<=0&&(t=e=n=NaN),new kt(t,e,n,r)}function Hc(t){return t instanceof dn||(t=pn(t)),t?(t=t.rgb(),new kt(t.r,t.g,t.b,t.opacity)):new kt}function Cr(t,e,n,r){return arguments.length===1?Hc(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}Lr(kt,Cr,Gi(dn,{brighter(t){return t=t==null?Er:Math.pow(Er,t),new kt(this.r*t,this.g*t,this.b*t,this.opacity)},darker(t){return t=t==null?zn:Math.pow(zn,t),new kt(this.r*t,this.g*t,this.b*t,this.opacity)},rgb(){return this},clamp(){return new kt(On(this.r),On(this.g),On(this.b),Ca(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:e0,formatHex:e0,formatHex8:M8,formatRgb:n0,toString:n0}));function e0(){return`#${Un(this.r)}${Un(this.g)}${Un(this.b)}`}function M8(){return`#${Un(this.r)}${Un(this.g)}${Un(this.b)}${Un((isNaN(this.opacity)?1:this.opacity)*255)}`}function n0(){const t=Ca(this.opacity);return`${t===1?"rgb(":"rgba("}${On(this.r)}, ${On(this.g)}, ${On(this.b)}${t===1?")":`, ${t})`}`}function Ca(t){return isNaN(t)?1:Math.max(0,Math.min(1,t))}function On(t){return Math.max(0,Math.min(255,Math.round(t)||0))}function Un(t){return t=On(t),(t<16?"0":"")+t.toString(16)}function r0(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 i0(t){if(t instanceof Se)return new Se(t.h,t.s,t.l,t.opacity);if(t instanceof dn||(t=pn(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 Ia(t,e,n,r){return arguments.length===1?i0(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}Lr(Se,Ia,Gi(dn,{brighter(t){return t=t==null?Er:Math.pow(Er,t),new Se(this.h,this.s,this.l*t,this.opacity)},darker(t){return t=t==null?zn:Math.pow(zn,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(Wc(t>=240?t-240:t+120,i,r),Wc(t,i,r),Wc(t<120?t+240:t-120,i,r),this.opacity)},clamp(){return new Se(o0(this.h),Ra(this.s),Ra(this.l),Ca(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=Ca(this.opacity);return`${t===1?"hsl(":"hsla("}${o0(this.h)}, ${Ra(this.s)*100}%, ${Ra(this.l)*100}%${t===1?")":`, ${t})`}`}}));function o0(t){return t=(t||0)%360,t<0?t+360:t}function Ra(t){return Math.max(0,Math.min(1,t||0))}function Wc(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 a0=Math.PI/180,s0=180/Math.PI,Na=18,u0=.96422,c0=1,l0=.82521,f0=4/29,Ir=6/29,h0=3*Ir*Ir,T8=Ir*Ir*Ir;function d0(t){if(t instanceof Ae)return new Ae(t.l,t.a,t.b,t.opacity);if(t instanceof Re)return g0(t);t instanceof kt||(t=Hc(t));var e=Vc(t.r),n=Vc(t.g),r=Vc(t.b),i=qc((.2225045*e+.7168786*n+.0606169*r)/c0),o,a;return e===n&&n===r?o=a=i:(o=qc((.4360747*e+.3850649*n+.1430804*r)/u0),a=qc((.0139322*e+.0971045*n+.7141733*r)/l0)),new Ae(116*i-16,500*(o-i),200*(i-a),t.opacity)}function P8(t,e){return new Ae(t,0,0,e??1)}function Fa(t,e,n,r){return arguments.length===1?d0(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}Lr(Ae,Fa,Gi(dn,{brighter(t){return new Ae(this.l+Na*(t??1),this.a,this.b,this.opacity)},darker(t){return new Ae(this.l-Na*(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=u0*jc(e),t=c0*jc(t),n=l0*jc(n),new kt(Xc(3.1338561*e-1.6168667*t-.4906146*n),Xc(-.9787684*e+1.9161415*t+.033454*n),Xc(.0719453*e-.2289914*t+1.4052427*n),this.opacity)}}));function qc(t){return t>T8?Math.pow(t,1/3):t/h0+f0}function jc(t){return t>Ir?t*t*t:h0*(t-f0)}function Xc(t){return 255*(t<=.0031308?12.92*t:1.055*Math.pow(t,1/2.4)-.055)}function Vc(t){return(t/=255)<=.04045?t/12.92:Math.pow((t+.055)/1.055,2.4)}function p0(t){if(t instanceof Re)return new Re(t.h,t.c,t.l,t.opacity);if(t instanceof Ae||(t=d0(t)),t.a===0&&t.b===0)return new Re(NaN,0<t.l&&t.l<100?0:NaN,t.l,t.opacity);var e=Math.atan2(t.b,t.a)*s0;return new Re(e<0?e+360:e,Math.sqrt(t.a*t.a+t.b*t.b),t.l,t.opacity)}function D8(t,e,n,r){return arguments.length===1?p0(t):new Re(n,e,t,r??1)}function Ga(t,e,n,r){return arguments.length===1?p0(t):new Re(t,e,n,r??1)}function Re(t,e,n,r){this.h=+t,this.c=+e,this.l=+n,this.opacity=+r}function g0(t){if(isNaN(t.h))return new Ae(t.l,0,0,t.opacity);var e=t.h*a0;return new Ae(t.l,Math.cos(e)*t.c,Math.sin(e)*t.c,t.opacity)}Lr(Re,Ga,Gi(dn,{brighter(t){return new Re(this.h,this.c,this.l+Na*(t??1),this.opacity)},darker(t){return new Re(this.h,this.c,this.l-Na*(t??1),this.opacity)},rgb(){return g0(this).rgb()}}));var m0=-.14861,Zc=1.78277,Kc=-.29227,za=-.90649,Oi=1.97294,y0=Oi*za,b0=Oi*Zc,v0=Zc*Kc-za*m0;function L8(t){if(t instanceof Bn)return new Bn(t.h,t.s,t.l,t.opacity);t instanceof kt||(t=Hc(t));var e=t.r/255,n=t.g/255,r=t.b/255,i=(v0*r+y0*e-b0*n)/(v0+y0-b0),o=r-i,a=(Oi*(n-i)-Kc*o)/za,s=Math.sqrt(a*a+o*o)/(Oi*i*(1-i)),u=s?Math.atan2(a,o)*s0-120:NaN;return new Bn(u<0?u+360:u,s,i,t.opacity)}function Me(t,e,n,r){return arguments.length===1?L8(t):new Bn(t,e,n,r??1)}function Bn(t,e,n,r){this.h=+t,this.s=+e,this.l=+n,this.opacity=+r}Lr(Bn,Me,Gi(dn,{brighter(t){return t=t==null?Er:Math.pow(Er,t),new Bn(this.h,this.s,this.l*t,this.opacity)},darker(t){return t=t==null?zn:Math.pow(zn,t),new Bn(this.h,this.s,this.l*t,this.opacity)},rgb(){var t=isNaN(this.h)?0:(this.h+120)*a0,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*(m0*r+Zc*i)),255*(e+n*(Kc*r+za*i)),255*(e+n*(Oi*r)),this.opacity)}}));function x0(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 _0(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 x0((n-r/e)*e,a,i,o,s)}}function w0(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 x0((n-r/e)*e,i,o,a,s)}}const Oa=t=>()=>t;function $0(t,e){return function(n){return t+n*e}}function E8(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 Ua(t,e){var n=e-t;return n?$0(t,n>180||n<-180?n-360*Math.round(n/360):n):Oa(isNaN(t)?e:t)}function k8(t){return(t=+t)==1?Ct:function(e,n){return n-e?E8(e,n,t):Oa(isNaN(e)?n:e)}}function Ct(t,e){var n=e-t;return n?$0(t,n):Oa(isNaN(t)?e:t)}const Ui=function t(e){var n=k8(e);function r(i,o){var a=n((i=Cr(i)).r,(o=Cr(o)).r),s=n(i.g,o.g),u=n(i.b,o.b),c=Ct(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 S0(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=Cr(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 A0=S0(_0),C8=S0(w0);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 M0(t){return ArrayBuffer.isView(t)&&!(t instanceof DataView)}function I8(t,e){return(M0(e)?Qc:T0)(t,e)}function T0(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]=gn(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 P0(t,e){var n=new Date;return t=+t,e=+e,function(r){return n.setTime(t*(1-r)+e*r),n}}function he(t,e){return t=+t,e=+e,function(n){return t*(1-n)+e*n}}function D0(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]=gn(t[i],e[i]):r[i]=e[i];return function(o){for(i in n)r[i]=n[i](o);return r}}var Jc=/[-+]?(?:\d+\.?\d*|\.?\d+)(?:[eE][-+]?\d+)?/g,tl=new RegExp(Jc.source,"g");function R8(t){return function(){return t}}function N8(t){return function(e){return t(e)+""}}function el(t,e){var n=Jc.lastIndex=tl.lastIndex=0,r,i,o,a=-1,s=[],u=[];for(t=t+"",e=e+"";(r=Jc.exec(t))&&(i=tl.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:he(r,i)})),n=tl.lastIndex;return n<e.length&&(o=e.slice(n),s[a]?s[a]+=o:s[++a]=o),s.length<2?u[0]?N8(u[0].x):R8(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 gn(t,e){var n=typeof e,r;return e==null||n==="boolean"?Oa(e):(n==="number"?he:n==="string"?(r=pn(e))?(e=r,Ui):el:e instanceof pn?Ui:e instanceof Date?P0:M0(e)?Qc:Array.isArray(e)?T0:typeof e.valueOf!="function"&&typeof e.toString!="function"||isNaN(e)?D0:he)(t,e)}function F8(t){var e=t.length;return function(n){return t[Math.max(0,Math.min(e-1,Math.floor(n*e)))]}}function G8(t,e){var n=Ua(+t,+e);return function(r){var i=n(r);return i-360*Math.floor(i/360)}}function Ba(t,e){return t=+t,e=+e,function(n){return Math.round(t*(1-n)+e*n)}}var L0=180/Math.PI,nl={translateX:0,translateY:0,rotate:0,skewX:0,scaleX:1,scaleY:1};function E0(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)*L0,skewX:Math.atan(u)*L0,scaleX:a,scaleY:s}}var Ya;function z8(t){const e=new(typeof DOMMatrix=="function"?DOMMatrix:WebKitCSSMatrix)(t+"");return e.isIdentity?nl:E0(e.a,e.b,e.c,e.d,e.e,e.f)}function O8(t){return t==null||(Ya||(Ya=document.createElementNS("http://www.w3.org/2000/svg","g")),Ya.setAttribute("transform",t),!(t=Ya.transform.baseVal.consolidate()))?nl:(t=t.matrix,E0(t.a,t.b,t.c,t.d,t.e,t.f))}function k0(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:he(c,h)},{i:g-2,x:he(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:he(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:he(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:he(c,h)},{i:g-2,x:he(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 C0=k0(z8,"px, ","px)","deg)"),I0=k0(O8,", ",")",")"),U8=1e-12;function R0(t){return((t=Math.exp(t))+1/t)/2}function B8(t){return((t=Math.exp(t))-1/t)/2}function Y8(t){return((t=Math.exp(2*t))-1)/(t+1)}const N0=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<U8)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 k=S*y,$=R0(_),E=c/(n*x)*($*Y8(e*k+_)-B8(_));return[s+E*d,u+E*p,c*$/R0(e*k+_)]}}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 F0(t){return function(e,n){var r=t((e=Ia(e)).h,(n=Ia(n)).h),i=Ct(e.s,n.s),o=Ct(e.l,n.l),a=Ct(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 H8=F0(Ua);var W8=F0(Ct);function q8(t,e){var n=Ct((t=Fa(t)).l,(e=Fa(e)).l),r=Ct(t.a,e.a),i=Ct(t.b,e.b),o=Ct(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 G0(t){return function(e,n){var r=t((e=Ga(e)).h,(n=Ga(n)).h),i=Ct(e.c,n.c),o=Ct(e.l,n.l),a=Ct(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 j8=G0(Ua);var X8=G0(Ct);function z0(t){return function e(n){n=+n;function r(i,o){var a=t((i=Me(i)).h,(o=Me(o)).h),s=Ct(i.s,o.s),u=Ct(i.l,o.l),c=Ct(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 V8=z0(Ua);var Ha=z0(Ct);function O0(t,e){e===void 0&&(e=t,t=gn);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 Z8(t,e){for(var n=new Array(e),r=0;r<e;++r)n[r]=t(r/(e-1));return n}var Rr=0,Bi=0,Yi=0,U0=1e3,Wa,Hi,qa=0,Yn=0,ja=0,Wi=typeof performance=="object"&&performance.now?performance:Date,B0=typeof window=="object"&&window.requestAnimationFrame?window.requestAnimationFrame.bind(window):function(t){setTimeout(t,17)};function qi(){return Yn||(B0(K8),Yn=Wi.now()+ja)}function K8(){Yn=0}function ji(){this._call=this._time=this._next=null}ji.prototype=Xa.prototype={constructor:ji,restart:function(t,e,n){if(typeof t!="function")throw new TypeError("callback is not a function");n=(n==null?qi():+n)+(e==null?0:+e),!this._next&&Hi!==this&&(Hi?Hi._next=this:Wa=this,Hi=this),this._call=t,this._time=n,rl()},stop:function(){this._call&&(this._call=null,this._time=1/0,rl())}};function Xa(t,e,n){var r=new ji;return r.restart(t,e,n),r}function Y0(){qi(),++Rr;for(var t=Wa,e;t;)(e=Yn-t._time)>=0&&t._call.call(void 0,e),t=t._next;--Rr}function H0(){Yn=(qa=Wi.now())+ja,Rr=Bi=0;try{Y0()}finally{Rr=0,J8(),Yn=0}}function Q8(){var t=Wi.now(),e=t-qa;e>U0&&(ja-=e,qa=t)}function J8(){for(var t,e=Wa,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:Wa=n);Hi=t,rl(r)}function rl(t){if(!Rr){Bi&&(Bi=clearTimeout(Bi));var e=t-Yn;e>24?(t<1/0&&(Bi=setTimeout(H0,t-Wi.now()-ja)),Yi&&(Yi=clearInterval(Yi))):(Yi||(qa=Wi.now(),Yi=setInterval(Q8,U0)),Rr=1,B0(H0))}}function il(t,e,n){var r=new ji;return e=e==null?0:+e,r.restart(i=>{r.stop(),t(i+e)},e,n),r}function t4(t,e,n){var r=new ji,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?qi():+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 e4=Nn("start","end","cancel","interrupt"),n4=[],W0=0,ol=1,al=2,Va=3,q0=4,sl=5,Za=6;function Ka(t,e,n,r,i,o){var a=t.__transition;if(!a)t.__transition={};else if(n in a)return;r4(t,n,{name:e,index:r,group:i,on:e4,tween:n4,time:o.time,delay:o.delay,duration:o.duration,ease:o.ease,timer:null,state:W0})}function ul(t,e){var n=Te(t,e);if(n.state>W0)throw new Error("too late; already scheduled");return n}function Ne(t,e){var n=Te(t,e);if(n.state>Va)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 r4(t,e,n){var r=t.__transition,i;r[e]=n,n.timer=Xa(o,0,n.time);function o(c){n.state=ol,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!==ol)return u();for(l in r)if(d=r[l],d.name===n.name){if(d.state===Va)return il(a);d.state===q0?(d.state=Za,d.timer.stop(),d.on.call("interrupt",t,t.__data__,d.index,d.group),delete r[l]):+l<e&&(d.state=Za,d.timer.stop(),d.on.call("cancel",t,t.__data__,d.index,d.group),delete r[l])}if(il(function(){n.state===Va&&(n.state=q0,n.timer.restart(s,n.delay,n.time),s(c))}),n.state=al,n.on.call("start",t,t.__data__,n.index,n.group),n.state===al){for(n.state=Va,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=sl,1),h=-1,f=i.length;++h<f;)i[h].call(t,l);n.state===sl&&(n.on.call("end",t,t.__data__,n.index,n.group),u())}function u(){n.state=Za,n.timer.stop(),delete r[e];for(var c in r)return;delete t.__transition}}function Hn(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>al&&r.state<sl,r.state=Za,r.timer.stop(),r.on.call(i?"interrupt":"cancel",t,t.__data__,r.index,r.group),delete n[a]}o&&delete t.__transition}}function i4(t){return this.each(function(){Hn(this,t)})}function o4(t,e){var n,r;return function(){var i=Ne(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 a4(t,e,n){var r,i;if(typeof n!="function")throw new Error;return function(){var o=Ne(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 s4(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?o4:a4)(n,t,e))}function cl(t,e,n){var r=t._id;return t.each(function(){var i=Ne(this,r);(i.value||(i.value={}))[e]=n.apply(this,arguments)}),function(i){return Te(i,r).value[e]}}function j0(t,e){var n;return(typeof e=="number"?he:e instanceof pn?Ui:(n=pn(e))?(e=n,Ui):el)(t,e)}function u4(t){return function(){this.removeAttribute(t)}}function c4(t){return function(){this.removeAttributeNS(t.space,t.local)}}function l4(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 f4(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 h4(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 d4(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 p4(t,e){var n=Ni(t),r=n==="transform"?I0:j0;return this.attrTween(t,typeof e=="function"?(n.local?d4:h4)(n,r,cl(this,"attr."+t,e)):e==null?(n.local?c4:u4)(n):(n.local?f4:l4)(n,r,e))}function g4(t,e){return function(n){this.setAttribute(t,e.call(this,n))}}function m4(t,e){return function(n){this.setAttributeNS(t.space,t.local,e.call(this,n))}}function y4(t,e){var n,r;function i(){var o=e.apply(this,arguments);return o!==r&&(n=(r=o)&&m4(t,o)),n}return i._value=e,i}function b4(t,e){var n,r;function i(){var o=e.apply(this,arguments);return o!==r&&(n=(r=o)&&g4(t,o)),n}return i._value=e,i}function v4(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=Ni(t);return this.tween(n,(r.local?y4:b4)(r,e))}function x4(t,e){return function(){ul(this,t).delay=+e.apply(this,arguments)}}function _4(t,e){return e=+e,function(){ul(this,t).delay=e}}function w4(t){var e=this._id;return arguments.length?this.each((typeof t=="function"?x4:_4)(e,t)):Te(this.node(),e).delay}function $4(t,e){return function(){Ne(this,t).duration=+e.apply(this,arguments)}}function S4(t,e){return e=+e,function(){Ne(this,t).duration=e}}function A4(t){var e=this._id;return arguments.length?this.each((typeof t=="function"?$4:S4)(e,t)):Te(this.node(),e).duration}function M4(t,e){if(typeof e!="function")throw new Error;return function(){Ne(this,t).ease=e}}function T4(t){var e=this._id;return arguments.length?this.each(M4(e,t)):Te(this.node(),e).ease}function P4(t,e){return function(){var n=e.apply(this,arguments);if(typeof n!="function")throw new Error;Ne(this,t).ease=n}}function D4(t){if(typeof t!="function")throw new Error;return this.each(P4(this._id,t))}function L4(t){typeof t!="function"&&(t=Fc(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 Fe(r,this._parents,this._name,this._id)}function E4(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 Fe(a,this._parents,this._name,this._id)}function k4(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 C4(t,e,n){var r,i,o=k4(e)?ul:Ne;return function(){var a=o(this,t),s=a.on;s!==r&&(i=(r=s).copy()).on(e,n),a.on=i}}function I4(t,e){var n=this._id;return arguments.length<2?Te(this.node(),n).on.on(t):this.each(C4(n,t,e))}function R4(t){return function(){var e=this.parentNode;for(var n in this.__transition)if(+n!==t)return;e&&e.removeChild(this)}}function N4(){return this.on("end.remove",R4(this._id))}function F4(t){var e=this._name,n=this._id;typeof t!="function"&&(t=Ta(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,Ka(c[f],e,n,f,c,Te(l,n)));return new Fe(o,this._parents,e,n)}function G4(t){var e=this._name,n=this._id;typeof t!="function"&&(t=Nc(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])&&Ka(d,e,n,g,f,p);o.push(f),a.push(l)}return new Fe(o,a,e,n)}var z4=Gn.prototype.constructor;function O4(){return new z4(this._groups,this._parents)}function U4(t,e){var n,r,i;return function(){var o=Fn(this,t),a=(this.style.removeProperty(t),Fn(this,t));return o===a?null:o===n&&a===r?i:i=e(n=o,r=a)}}function X0(t){return function(){this.style.removeProperty(t)}}function B4(t,e,n){var r,i=n+"",o;return function(){var a=Fn(this,t);return a===i?null:a===r?o:o=e(r=a,n)}}function Y4(t,e,n){var r,i,o;return function(){var a=Fn(this,t),s=n(this),u=s+"";return s==null&&(u=s=(this.style.removeProperty(t),Fn(this,t))),a===u?null:a===r&&u===i?o:(i=u,o=e(r=a,s))}}function H4(t,e){var n,r,i,o="style."+e,a="end."+o,s;return function(){var u=Ne(this,t),c=u.on,l=u.value[o]==null?s||(s=X0(e)):void 0;(c!==n||i!==l)&&(r=(n=c).copy()).on(a,i=l),u.on=r}}function W4(t,e,n){var r=(t+="")=="transform"?C0:j0;return e==null?this.styleTween(t,U4(t,r)).on("end.style."+t,X0(t)):typeof e=="function"?this.styleTween(t,Y4(t,r,cl(this,"style."+t,e))).each(H4(this._id,t)):this.styleTween(t,B4(t,r,e),n).on("end.style."+t,null)}function q4(t,e,n){return function(r){this.style.setProperty(t,e.call(this,r),n)}}function j4(t,e,n){var r,i;function o(){var a=e.apply(this,arguments);return a!==i&&(r=(i=a)&&q4(t,a,n)),r}return o._value=e,o}function X4(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,j4(t,e,n??""))}function V4(t){return function(){this.textContent=t}}function Z4(t){return function(){var e=t(this);this.textContent=e??""}}function K4(t){return this.tween("text",typeof t=="function"?Z4(cl(this,"text",t)):V4(t==null?"":t+""))}function Q4(t){return function(e){this.textContent=t.call(this,e)}}function J4(t){var e,n;function r(){var i=t.apply(this,arguments);return i!==n&&(e=(n=i)&&Q4(i)),e}return r._value=t,r}function tM(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,J4(t))}function eM(){for(var t=this._name,e=this._id,n=Z0(),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);Ka(u,t,n,c,a,{time:l.time+l.delay+l.duration,delay:0,duration:l.duration,ease:l.ease})}return new Fe(r,this._parents,t,n)}function nM(){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=Ne(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 rM=0;function Fe(t,e,n,r){this._groups=t,this._parents=e,this._name=n,this._id=r}function V0(t){return Gn().transition(t)}function Z0(){return++rM}var Xe=Gn.prototype;Fe.prototype=V0.prototype={constructor:Fe,select:F4,selectAll:G4,selectChild:Xe.selectChild,selectChildren:Xe.selectChildren,filter:L4,merge:E4,selection:O4,transition:eM,call:Xe.call,nodes:Xe.nodes,node:Xe.node,size:Xe.size,empty:Xe.empty,each:Xe.each,on:I4,attr:p4,attrTween:v4,style:W4,styleTween:X4,text:K4,textTween:tM,remove:N4,tween:s4,delay:w4,duration:A4,ease:T4,easeVarying:D4,end:nM,[Symbol.iterator]:Xe[Symbol.iterator]};const iM=t=>+t;function oM(t){return t*t}function aM(t){return t*(2-t)}function K0(t){return((t*=2)<=1?t*t:--t*(2-t)+1)/2}function sM(t){return t*t*t}function uM(t){return--t*t*t+1}function Xi(t){return((t*=2)<=1?t*t*t:(t-=2)*t*t+2)/2}var ll=3,cM=function t(e){e=+e;function n(r){return Math.pow(r,e)}return n.exponent=t,n}(ll),lM=function t(e){e=+e;function n(r){return 1-Math.pow(1-r,e)}return n.exponent=t,n}(ll),Q0=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}(ll),J0=Math.PI,t1=J0/2;function fM(t){return+t==1?1:1-Math.cos(t*t1)}function hM(t){return Math.sin(t*t1)}function e1(t){return(1-Math.cos(J0*t))/2}function mn(t){return(Math.pow(2,-10*t)-.0009765625)*1.0009775171065494}function dM(t){return mn(1-+t)}function pM(t){return 1-mn(t)}function n1(t){return((t*=2)<=1?mn(1-t):2-mn(t-1))/2}function gM(t){return 1-Math.sqrt(1-t*t)}function mM(t){return Math.sqrt(1- --t*t)}function r1(t){return((t*=2)<=1?1-Math.sqrt(1-t*t):Math.sqrt(1-(t-=2)*t)+1)/2}var fl=4/11,yM=6/11,bM=8/11,vM=3/4,xM=9/11,_M=10/11,wM=15/16,$M=21/22,SM=63/64,Qa=1/fl/fl;function AM(t){return 1-Vi(1-t)}function Vi(t){return(t=+t)<fl?Qa*t*t:t<bM?Qa*(t-=yM)*t+vM:t<_M?Qa*(t-=xM)*t+wM:Qa*(t-=$M)*t+SM}function MM(t){return((t*=2)<=1?1-Vi(1-t):Vi(t-1)+1)/2}var hl=1.70158,TM=function t(e){e=+e;function n(r){return(r=+r)*r*(e*(r-1)+r)}return n.overshoot=t,n}(hl),PM=function t(e){e=+e;function n(r){return--r*r*((r+1)*e+r)+1}return n.overshoot=t,n}(hl),i1=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}(hl),Nr=2*Math.PI,dl=1,pl=.3,DM=function t(e,n){var r=Math.asin(1/(e=Math.max(1,e)))*(n/=Nr);function i(o){return e*mn(- --o)*Math.sin((r-o)/n)}return i.amplitude=function(o){return t(o,n*Nr)},i.period=function(o){return t(e,o)},i}(dl,pl),Ja=function t(e,n){var r=Math.asin(1/(e=Math.max(1,e)))*(n/=Nr);function i(o){return 1-e*mn(o=+o)*Math.sin((o+r)/n)}return i.amplitude=function(o){return t(o,n*Nr)},i.period=function(o){return t(e,o)},i}(dl,pl),LM=function t(e,n){var r=Math.asin(1/(e=Math.max(1,e)))*(n/=Nr);function i(o){return((o=o*2-1)<0?e*mn(-o)*Math.sin((r-o)/n):2-e*mn(o)*Math.sin((r+o)/n))/2}return i.amplitude=function(o){return t(o,n*Nr)},i.period=function(o){return t(e,o)},i}(dl,pl),EM={time:null,delay:0,duration:250,ease:Xi};function kM(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 CM(t){var e,n;t instanceof Fe?(e=t._id,t=t._name):(e=Z0(),(n=EM).time=qi(),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])&&Ka(u,t,e,c,a,n||kM(u,e));return new Fe(r,this._parents,t,e)}Gn.prototype.interrupt=i4,Gn.prototype.transition=CM;var IM=[null];function RM(t,e){var n=t.__transition,r,i;if(n){e=e==null?null:e+"";for(i in n)if((r=n[i]).state>ol&&r.name===e)return new Fe([[t]],IM,e,+i)}return null}const gl=t=>()=>t;function NM(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 FM(t){t.stopImmediatePropagation()}function ml(t){t.preventDefault(),t.stopImmediatePropagation()}var o1={name:"drag"},yl={name:"space"},Fr={name:"handle"},Gr={name:"center"};const{abs:a1,max:Gt,min:zt}=Math;function s1(t){return[+t[0],+t[1]]}function bl(t){return[s1(t[0]),s1(t[1])]}var ts={name:"x",handles:["w","e"].map(Zi),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]]}},es={name:"y",handles:["n","s"].map(Zi),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]]}},GM={name:"xy",handles:["n","w","e","s","nw","ne","sw","se"].map(Zi),input:function(t){return t==null?null:bl(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"},u1={e:"w",w:"e",nw:"ne",ne:"nw",se:"sw",sw:"se"},c1={n:"s",s:"n",nw:"sw",ne:"se",se:"ne",sw:"nw"},zM={overlay:1,selection:1,n:null,e:1,s:null,w:-1,nw:-1,ne:1,se:1,sw:-1},OM={overlay:1,selection:1,n:-1,e:null,s:1,w:null,nw:-1,ne:-1,se:1,sw:1};function Zi(t){return{type:t}}function UM(t){return!t.ctrlKey&&!t.button}function BM(){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 YM(){return navigator.maxTouchPoints||"ontouchstart"in this}function vl(t){for(;!t.__brush;)if(!(t=t.parentNode))return;return t.__brush}function HM(t){return t[0][0]===t[1][0]||t[0][1]===t[1][1]}function WM(t){var e=t.__brush;return e?e.dim.output(e.selection):null}function qM(){return xl(ts)}function jM(){return xl(es)}function XM(){return xl(GM)}function xl(t){var e=BM,n=UM,r=YM,i=!0,o=Nn("start","brush","end"),a=6,s;function u(m){var y=m.property("__brush",g).selectAll(".overlay").data([Zi("overlay")]);y.enter().append("rect").attr("class","overlay").attr("pointer-events","all").attr("cursor",Ve.overlay).merge(y).each(function(){var v=vl(this).extent;V(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([Zi("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 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 Ve[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),k=gn(w,S);function $(E){b.selection=E===1&&S===null?null:k(E),c.call(v),_.brush()}return w!==null&&S!==null?$:$(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();Hn(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=V(this),y=vl(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=V(this.that).datum();o.call(m,this.that,new NM(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"?o1:i&&m.altKey?Gr:Fr,b=t===es?null:zM[x],_=t===ts?null:OM[x],w=vl(y),S=w.extent,k=w.selection,$=S[0][0],E,A,I=S[0][1],D,T,C=S[1][0],P,R,G=S[1][1],M,N,z=0,L=0,j,q=b&&_&&i&&m.shiftKey,Y,X,Q=Array.from(m.touches||[m],it=>{const Mt=it.identifier;return it=se(it,y),it.point0=it.slice(),it.identifier=Mt,it});Hn(y);var ct=l(y,arguments,!0).beforestart();if(x==="overlay"){k&&(j=!0);const it=[Q[0],Q[1]||Q[0]];w.selection=k=[[E=t===es?$:zt(it[0][0],it[1][0]),D=t===ts?I:zt(it[0][1],it[1][1])],[P=t===es?C:Gt(it[0][0],it[1][0]),M=t===ts?G:Gt(it[0][1],it[1][1])]],Q.length>1&&xt(m)}else E=k[0][0],D=k[0][1],P=k[1][0],M=k[1][1];A=E,T=D,R=P,N=M;var O=V(y).attr("pointer-events","none"),tt=O.selectAll(".overlay").attr("cursor",Ve[x]);if(m.touches)ct.moved=H,ct.ended=gt;else{var st=V(m.view).on("mousemove.brush",H,!0).on("mouseup.brush",gt,!0);i&&st.on("keydown.brush",Ft,!0).on("keyup.brush",te,!0),Da(m.view)}c.call(y),ct.start(m,v.name);function H(it){for(const Mt of it.changedTouches||[it])for(const No of Q)No.identifier===Mt.identifier&&(No.cur=se(Mt,y));if(q&&!Y&&!X&&Q.length===1){const Mt=Q[0];a1(Mt.cur[0]-Mt[0])>a1(Mt.cur[1]-Mt[1])?X=!0:Y=!0}for(const Mt of Q)Mt.cur&&(Mt[0]=Mt.cur[0],Mt[1]=Mt.cur[1]);j=!0,ml(it),xt(it)}function xt(it){const Mt=Q[0],No=Mt.point0;var Mn;switch(z=Mt[0]-No[0],L=Mt[1]-No[1],v){case yl:case o1:{b&&(z=Gt($-E,zt(C-P,z)),A=E+z,R=P+z),_&&(L=Gt(I-D,zt(G-M,L)),T=D+L,N=M+L);break}case Fr:{Q[1]?(b&&(A=Gt($,zt(C,Q[0][0])),R=Gt($,zt(C,Q[1][0])),b=1),_&&(T=Gt(I,zt(G,Q[0][1])),N=Gt(I,zt(G,Q[1][1])),_=1)):(b<0?(z=Gt($-E,zt(C-E,z)),A=E+z,R=P):b>0&&(z=Gt($-P,zt(C-P,z)),A=E,R=P+z),_<0?(L=Gt(I-D,zt(G-D,L)),T=D+L,N=M):_>0&&(L=Gt(I-M,zt(G-M,L)),T=D,N=M+L));break}case Gr:{b&&(A=Gt($,zt(C,E-z*b)),R=Gt($,zt(C,P+z*b))),_&&(T=Gt(I,zt(G,D-L*_)),N=Gt(I,zt(G,M+L*_)));break}}R<A&&(b*=-1,Mn=E,E=P,P=Mn,Mn=A,A=R,R=Mn,x in u1&&tt.attr("cursor",Ve[x=u1[x]])),N<T&&(_*=-1,Mn=D,D=M,M=Mn,Mn=T,T=N,N=Mn,x in c1&&tt.attr("cursor",Ve[x=c1[x]])),w.selection&&(k=w.selection),Y&&(A=k[0][0],R=k[1][0]),X&&(T=k[0][1],N=k[1][1]),(k[0][0]!==A||k[0][1]!==T||k[1][0]!==R||k[1][1]!==N)&&(w.selection=[[A,T],[R,N]],c.call(y),ct.brush(it,v.name))}function gt(it){if(FM(it),it.touches){if(it.touches.length)return;s&&clearTimeout(s),s=setTimeout(function(){s=null},500)}else La(it.view,j),st.on("keydown.brush keyup.brush mousemove.brush mouseup.brush",null);O.attr("pointer-events","all"),tt.attr("cursor",Ve.overlay),w.selection&&(k=w.selection),HM(k)&&(w.selection=null,c.call(y)),ct.end(it,v.name)}function Ft(it){switch(it.keyCode){case 16:{q=b&&_;break}case 18:{v===Fr&&(b&&(P=R-z*b,E=A+z*b),_&&(M=N-L*_,D=T+L*_),v=Gr,xt(it));break}case 32:{(v===Fr||v===Gr)&&(b<0?P=R-z:b>0&&(E=A-z),_<0?M=N-L:_>0&&(D=T-L),v=yl,tt.attr("cursor",Ve.selection),xt(it));break}default:return}ml(it)}function te(it){switch(it.keyCode){case 16:{q&&(Y=X=q=!1,xt(it));break}case 18:{v===Gr&&(b<0?P=R:b>0&&(E=A),_<0?M=N:_>0&&(D=T),v=Fr,xt(it));break}case 32:{v===yl&&(it.altKey?(b&&(P=R-z*b,E=A+z*b),_&&(M=N-L*_,D=T+L*_),v=Gr):(b<0?P=R:b>0&&(E=A),_<0?M=N:_>0&&(D=T),v=Fr),tt.attr("cursor",Ve[x]),xt(it));break}default:return}ml(it)}}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=bl(e.apply(this,arguments)),m.dim=t,m}return u.extent=function(m){return arguments.length?(e=typeof m=="function"?m:gl(bl(m)),u):e},u.filter=function(m){return arguments.length?(n=typeof m=="function"?m:gl(!!m),u):n},u.touchable=function(m){return arguments.length?(r=typeof m=="function"?m:gl(!!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 l1=Math.abs,zr=Math.cos,Or=Math.sin,f1=Math.PI,ns=f1/2,h1=f1*2,d1=Math.max,_l=1e-12;function wl(t,e){return Array.from({length:e-t},(n,r)=>t+r)}function VM(t){return function(e,n){return t(e.source.value+e.target.value,n.source.value+n.target.value)}}function ZM(){return $l(!1,!1)}function KM(){return $l(!1,!0)}function QM(){return $l(!0,!1)}function $l(t,e){var n=0,r=null,i=null,o=null;function a(s){var u=s.length,c=new Array(u),l=wl(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=d1(0,h1-n*u)/d,p=d?n:h1/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=wl(~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=wl(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=d1(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=VM(s))._=s,a):o&&o._},a}const Sl=Math.PI,Al=2*Sl,Wn=1e-6,JM=Al-Wn;function p1(t){this._+=t[0];for(let e=1,n=t.length;e<n;++e)this._+=arguments[e]+t[e]}function t7(t){let e=Math.floor(t);if(!(e>=0))throw new Error(`invalid digits: ${t}`);if(e>15)return p1;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 Ki=class{constructor(e){this._x0=this._y0=this._x1=this._y1=null,this._="",this._append=e==null?p1:t7(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((Sl-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%Al+Al),f>JM?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>=Sl)},${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 Ml(){return new Ki}Ml.prototype=Ki.prototype;function e7(t=3){return new Ki(+t)}var n7=Array.prototype.slice;function qn(t){return function(){return t}}function r7(t){return t.source}function i7(t){return t.target}function g1(t){return t.radius}function o7(t){return t.startAngle}function a7(t){return t.endAngle}function s7(){return 0}function u7(){return 10}function m1(t){var e=r7,n=i7,r=g1,i=g1,o=o7,a=a7,s=s7,u=null;function c(){var l,h=e.apply(this,arguments),f=n.apply(this,arguments),d=s.apply(this,arguments)/2,p=n7.call(arguments),g=+r.apply(this,(p[0]=h,p)),m=o.apply(this,p)-ns,y=a.apply(this,p)-ns,x=+i.apply(this,(p[0]=f,p)),v=o.apply(this,p)-ns,b=a.apply(this,p)-ns;if(u||(u=l=Ml()),d>_l&&(l1(y-m)>d*2+_l?y>m?(m+=d,y-=d):(m-=d,y+=d):m=y=(m+y)/2,l1(b-v)>d*2+_l?b>v?(v+=d,b-=d):(v-=d,b+=d):v=b=(v+b)/2),u.moveTo(g*zr(m),g*Or(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*zr(v),w*Or(v)),u.lineTo(x*zr(S),x*Or(S)),u.lineTo(w*zr(b),w*Or(b))}else u.quadraticCurveTo(0,0,x*zr(v),x*Or(v)),u.arc(0,0,x,v,b);if(u.quadraticCurveTo(0,0,g*zr(m),g*Or(m)),u.closePath(),l)return u=null,l+""||null}return t&&(c.headRadius=function(l){return arguments.length?(t=typeof l=="function"?l:qn(+l),c):t}),c.radius=function(l){return arguments.length?(r=i=typeof l=="function"?l:qn(+l),c):r},c.sourceRadius=function(l){return arguments.length?(r=typeof l=="function"?l:qn(+l),c):r},c.targetRadius=function(l){return arguments.length?(i=typeof l=="function"?l:qn(+l),c):i},c.startAngle=function(l){return arguments.length?(o=typeof l=="function"?l:qn(+l),c):o},c.endAngle=function(l){return arguments.length?(a=typeof l=="function"?l:qn(+l),c):a},c.padAngle=function(l){return arguments.length?(s=typeof l=="function"?l:qn(+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 c7(){return m1()}function l7(){return m1(u7)}var f7=Array.prototype,y1=f7.slice;function h7(t,e){return t-e}function d7(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 yn=t=>()=>t;function p7(t,e){for(var n=-1,r=e.length,i;++n<r;)if(i=g7(t,e[n]))return i;return 0}function g7(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(m7(u,h,e))return 0;l>r!=d>r&&n<(f-c)*(r-l)/(d-l)+c&&(i=-i)}return i}function m7(t,e,n){var r;return y7(t,e,n)&&b7(t[r=+(t[0]===e[0])],n[r],e[r])}function y7(t,e,n){return(e[0]-t[0])*(n[1]-t[1])===(n[0]-t[0])*(e[1]-t[1])}function b7(t,e,n){return t<=e&&e<=n||n<=e&&e<=t}function v7(){}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 Tl(){var t=1,e=1,n=Dc,r=u;function i(c){var l=n(c);if(Array.isArray(l))l=l.slice().sort(h7);else{const h=Li(c,x7);for(l=In(...Pc(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),d7(p)>0?f.push([p]):d.push(p)}),d.forEach(function(p){for(var g=0,m=f.length,y;g<m;++g)if(p7((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=jn(c[0],l),Ze[y<<1].forEach(b);++p<t-1;)m=y,y=jn(c[p+1],l),Ze[m|y<<1].forEach(b);for(Ze[y<<0].forEach(b);++g<e-1;){for(p=-1,y=jn(c[g*t+t],l),x=jn(c[g*t],l),Ze[y<<1|x<<2].forEach(b);++p<t-1;)m=y,y=jn(c[g*t+t+p+1],l),v=x,x=jn(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=jn(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],k=s(w),$=s(S),E,A;(E=d[k])?(A=f[$])?(delete d[E.end],delete f[A.start],E===A?(E.ring.push(S),h(E.ring)):f[E.start]=d[A.end]={start:E.start,end:A.end,ring:E.ring.concat(A.ring)}):(delete d[E.end],E.ring.push(S),d[E.end=$]=E):(E=f[$])?(A=d[k])?(delete f[E.start],delete d[A.end],E===A?(E.ring.push(S),h(E.ring)):f[A.start]=d[E.end]={start:A.start,end:E.end,ring:A.ring.concat(E.ring)}):(delete f[E.start],E.ring.unshift(w),f[E.start=k]=E):f[k]=d[$]={start:k,end:$,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=Pl(l[m*t+g]);d>0&&d<t&&g===d&&(f[0]=b1(d,Pl(l[m*t+g-1]),y,h)),p>0&&p<e&&m===p&&(f[1]=b1(p,Pl(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)?yn(y1.call(c)):yn(c),i):n},i.smooth=function(c){return arguments.length?(r=c?u:v7,i):r===u},i}function x7(t){return isFinite(t)?t:NaN}function jn(t,e){return t==null?!1:+t>=e}function Pl(t){return t==null||isNaN(t=+t)?-1/0:t}function b1(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 _7(t){return t[0]}function w7(t){return t[1]}function $7(){return 1}function S7(){var t=_7,e=w7,n=$7,r=960,i=500,o=20,a=2,s=o*3,u=r+s*2>>a,c=i+s*2>>a,l=yn(20);function h(x){var v=new Float32Array(u*c),b=Math.pow(2,-a),_=-1;for(const D of x){var w=(t(D,++_,x)+s)*b,S=(e(D,_,x)+s)*b,k=+n(D,_,x);if(k&&w>=0&&w<u&&S>=0&&S<c){var $=Math.floor(w),E=Math.floor(S),A=w-$-.5,I=S-E-.5;v[$+E*u]+=(1-A)*(1-I)*k,v[$+1+E*u]+=A*(1-I)*k,v[$+1+(E+1)*u]+=A*I*k,v[$+(E+1)*u]+=(1-A)*I*k}}return dg({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=In(Number.MIN_VALUE,ki(v)/_,b)),Tl().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=Tl().size([u,c]),_=Math.pow(2,2*a),w=S=>{S=+S;var k=d(b.contour(v,S*_));return k.value=S,k};return Object.defineProperty(w,"max",{get:()=>ki(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:yn(+x),f):t},f.y=function(x){return arguments.length?(e=typeof x=="function"?x:yn(+x),f):e},f.weight=function(x){return arguments.length?(n=typeof x=="function"?x:yn(+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)?yn(y1.call(x)):yn(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,Ot=134217729,A7=(3+8*Ke)*Ke;function Dl(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 M7(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 T7=(3+16*Ke)*Ke,P7=(2+12*Ke)*Ke,D7=(9+64*Ke)*Ke*Ke,Ur=Qi(4),v1=Qi(8),x1=Qi(12),_1=Qi(16),Ht=Qi(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,k;const $=t-i,E=n-i,A=e-o,I=r-o;b=$*I,f=Ot*$,d=f-(f-$),p=$-d,f=Ot*I,g=f-(f-I),m=I-g,_=p*m-(b-d*g-p*g-d*m),w=A*E,f=Ot*A,d=f-(f-A),p=A-d,f=Ot*E,g=f-(f-E),m=E-g,S=p*m-(w-d*g-p*g-d*m),y=_-S,h=_-y,Ur[0]=_-(y+h)+(h-S),x=b+y,h=x-b,v=b-(x-h)+(y-h),y=v-w,h=v-y,Ur[1]=v-(y+h)+(h-w),k=x+y,h=k-x,Ur[2]=x-(k-h)+(y-h),Ur[3]=k;let D=M7(4,Ur),T=P7*a;if(D>=T||-D>=T||(h=t-$,s=t-($+h)+(h-i),h=n-E,c=n-(E+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=D7*a+A7*Math.abs(D),D+=$*l+I*s-(A*c+E*u),D>=T||-D>=T))return D;b=s*I,f=Ot*s,d=f-(f-s),p=s-d,f=Ot*I,g=f-(f-I),m=I-g,_=p*m-(b-d*g-p*g-d*m),w=u*E,f=Ot*u,d=f-(f-u),p=u-d,f=Ot*E,g=f-(f-E),m=E-g,S=p*m-(w-d*g-p*g-d*m),y=_-S,h=_-y,Ht[0]=_-(y+h)+(h-S),x=b+y,h=x-b,v=b-(x-h)+(y-h),y=v-w,h=v-y,Ht[1]=v-(y+h)+(h-w),k=x+y,h=k-x,Ht[2]=x-(k-h)+(y-h),Ht[3]=k;const C=Dl(4,Ur,4,Ht,v1);b=$*l,f=Ot*$,d=f-(f-$),p=$-d,f=Ot*l,g=f-(f-l),m=l-g,_=p*m-(b-d*g-p*g-d*m),w=A*c,f=Ot*A,d=f-(f-A),p=A-d,f=Ot*c,g=f-(f-c),m=c-g,S=p*m-(w-d*g-p*g-d*m),y=_-S,h=_-y,Ht[0]=_-(y+h)+(h-S),x=b+y,h=x-b,v=b-(x-h)+(y-h),y=v-w,h=v-y,Ht[1]=v-(y+h)+(h-w),k=x+y,h=k-x,Ht[2]=x-(k-h)+(y-h),Ht[3]=k;const P=Dl(C,v1,4,Ht,x1);b=s*l,f=Ot*s,d=f-(f-s),p=s-d,f=Ot*l,g=f-(f-l),m=l-g,_=p*m-(b-d*g-p*g-d*m),w=u*c,f=Ot*u,d=f-(f-u),p=u-d,f=Ot*c,g=f-(f-c),m=c-g,S=p*m-(w-d*g-p*g-d*m),y=_-S,h=_-y,Ht[0]=_-(y+h)+(h-S),x=b+y,h=x-b,v=b-(x-h)+(y-h),y=v-w,h=v-y,Ht[1]=v-(y+h)+(h-w),k=x+y,h=k-x,Ht[2]=x-(k-h)+(y-h),Ht[3]=k;const R=Dl(P,x1,4,Ht,_1);return _1[R-1]}function rs(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)>=T7*c?u:-L7(t,e,n,r,i,o,c)}const w1=Math.pow(2,-52),is=new Uint32Array(512);class os{static from(e,n=R7,r=N7){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 os(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 $=0;$<a;$++){const E=e[2*$],A=e[2*$+1];E<s&&(s=E),A<u&&(u=A),E>c&&(c=E),A>l&&(l=A),this._ids[$]=$}const h=(s+c)/2,f=(u+l)/2;let d,p,g;for(let $=0,E=1/0;$<a;$++){const A=Ll(h,f,e[2*$],e[2*$+1]);A<E&&(d=$,E=A)}const m=e[2*d],y=e[2*d+1];for(let $=0,E=1/0;$<a;$++){if($===d)continue;const A=Ll(m,y,e[2*$],e[2*$+1]);A<E&&A>0&&(p=$,E=A)}let x=e[2*p],v=e[2*p+1],b=1/0;for(let $=0;$<a;$++){if($===d||$===p)continue;const E=C7(m,y,x,v,e[2*$],e[2*$+1]);E<b&&(g=$,b=E)}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];Br(this._ids,this._dists,0,a-1);const $=new Uint32Array(a);let E=0;for(let A=0,I=-1/0;A<a;A++){const D=this._ids[A],T=this._dists[D];T>I&&($[E++]=D,I=T)}this.hull=$.subarray(0,E),this.triangles=new Uint32Array(0),this.halfedges=new Uint32Array(0);return}if(rs(m,y,x,v,_,w)<0){const $=p,E=x,A=v;p=g,x=_,v=w,g=$,_=E,w=A}const S=I7(m,y,x,v,_,w);this._cx=S.x,this._cy=S.y;for(let $=0;$<a;$++)this._dists[$]=Ll(e[2*$],e[2*$+1],S.x,S.y);Br(this._ids,this._dists,0,a-1),this._hullStart=d;let k=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 $=0,E,A;$<this._ids.length;$++){const I=this._ids[$],D=e[2*I],T=e[2*I+1];if($>0&&Math.abs(D-E)<=w1&&Math.abs(T-A)<=w1||(E=D,A=T,I===d||I===p||I===g))continue;let C=0;for(let N=0,z=this._hashKey(D,T);N<this._hashSize&&(C=o[(z+N)%this._hashSize],!(C!==-1&&C!==r[C]));N++);C=n[C];let P=C,R;for(;R=r[P],rs(D,T,e[2*P],e[2*P+1],e[2*R],e[2*R+1])>=0;)if(P=R,P===C){P=-1;break}if(P===-1)continue;let G=this._addTriangle(P,I,r[P],-1,-1,i[P]);i[I]=this._legalize(G+2),i[P]=G,k++;let M=r[P];for(;R=r[M],rs(D,T,e[2*M],e[2*M+1],e[2*R],e[2*R+1])<0;)G=this._addTriangle(M,I,R,i[I],-1,i[M]),i[I]=this._legalize(G+2),r[M]=M,k--,M=R;if(P===C)for(;R=n[P],rs(D,T,e[2*R],e[2*R+1],e[2*P],e[2*P+1])<0;)G=this._addTriangle(R,I,P,-1,i[P],i[R]),this._legalize(G+2),i[R]=G,r[P]=P,k--,P=R;this._hullStart=n[I]=P,r[P]=n[M]=I,r[I]=M,o[this._hashKey(D,T)]=I,o[this._hashKey(e[2*P],e[2*P+1])]=P}this.hull=new Uint32Array(k);for(let $=0,E=this._hullStart;$<k;$++)this.hull[$]=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(E7(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=is[--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(k7(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<is.length&&(is[o++]=x)}else{if(o===0)break;e=is[--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 E7(t,e){const n=t/(Math.abs(t)+Math.abs(e));return(e>0?3-n:1+n)/4}function Ll(t,e,n,r){const i=t-n,o=e-r;return i*i+o*o}function k7(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 C7(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 I7(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 Br(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;Ji(t,i,o),e[t[n]]>e[t[r]]&&Ji(t,n,r),e[t[o]]>e[t[r]]&&Ji(t,o,r),e[t[n]]>e[t[o]]&&Ji(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;Ji(t,o,a)}t[n+1]=t[a],t[a]=s,r-o+1>=a-n?(Br(t,e,o,r),Br(t,e,n,a-1)):(Br(t,e,n,a-1),Br(t,e,o,r))}}function Ji(t,e,n){const r=t[e];t[e]=t[n],t[n]=r}function R7(t){return t[0]}function N7(t){return t[1]}const $1=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)>$1||Math.abs(this._y1-o)>$1)&&(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 El{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 S1{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],k=e[b+1],$=e[_],E=e[_+1],A=e[w],I=e[w+1],D=$-S,T=E-k,C=A-S,P=I-k,R=(D*P-T*C)*2;if(Math.abs(R)<1e-9){if(o===void 0){o=a=0;for(const M of n)o+=e[M*2],a+=e[M*2+1];o/=n.length,a/=n.length}const G=1e9*Math.sign((o-S)*P-(a-k)*C);x=(S+A)/2-G*P,v=(k+I)/2+G*C}else{const G=1/R,M=D*D+T*T,N=C*C+P*P;x=S+(P*M-T*N)*G,v=k+(D*N-C*M)*G}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 El;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 F7=2*Math.PI,Yr=Math.pow;function G7(t){return t[0]}function z7(t){return t[1]}function O7(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 U7(t,e,n){return[t+Math.sin(t+e)*n,e+Math.cos(t-e)*n]}class kl{static from(e,n=G7,r=z7,i){return new kl("length"in e?B7(e,n,r,i):Float64Array.from(Y7(e,n,r,i)))}constructor(e){this._delaunator=new os(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&&O7(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=U7(n[2*f],n[2*f+1],h);n[2*f]=p[0],n[2*f+1]=p[1]}this._delaunator=new os(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 S1(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=Yr(n-c[e*2],2)+Yr(r-c[e*2+1],2);const f=i[e];let d=f;do{let p=u[d];const g=Yr(n-c[p*2],2)+Yr(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&&Yr(n-c[d*2],2)+Yr(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,F7)}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 El;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 El;return this.renderTriangle(e,n),n.value()}}function B7(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*Y7(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 A1={},Cl={},Il=34,to=10,Rl=13;function M1(t){return new Function("d","return {"+t.map(function(e,n){return JSON.stringify(e)+": d["+n+'] || ""'}).join(",")+"}")}function H7(t,e){var n=M1(t);return function(r,i){return e(n(r),i,t)}}function T1(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 W7(t){return t<0?"-"+ne(-t,6):t>9999?"+"+ne(t,6):ne(t,4)}function q7(t){var e=t.getUTCHours(),n=t.getUTCMinutes(),r=t.getUTCSeconds(),i=t.getUTCMilliseconds();return isNaN(t)?"Invalid Date":W7(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 as(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?H7(m,f):M1(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)===to&&--p,h.charCodeAt(p-1)===Rl&&--p;function b(){if(x)return Cl;if(v)return v=!1,A1;var w,S=g,k;if(h.charCodeAt(S)===Il){for(;g++<p&&h.charCodeAt(g)!==Il||h.charCodeAt(++g)===Il;);return(w=g)>=p?x=!0:(k=h.charCodeAt(g++))===to?v=!0:k===Rl&&(v=!0,h.charCodeAt(g)===to&&++g),h.slice(S+1,w-1).replace(/""/g,'"')}for(;g<p;){if((k=h.charCodeAt(w=g++))===to)v=!0;else if(k===Rl)v=!0,h.charCodeAt(g)===to&&++g;else if(k!==n)continue;return h.slice(S,w)}return x=!0,h.slice(S,p)}for(;(y=b())!==Cl;){for(var _=[];y!==A1&&y!==Cl;)_.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=T1(h)),[f.map(l).join(t)].concat(o(h,f)).join(`
7
+ `)}function s(h,f){return f==null&&(f=T1(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?z7(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=os(","),T1=Vn.parse,O7=Vn.parseRows,U7=Vn.format,B7=Vn.formatBody,Y7=Vn.formatRows,W7=Vn.formatRow,H7=Vn.formatValue,Zn=os(" "),P1=Zn.parse,q7=Zn.parseRows,X7=Zn.format,j7=Zn.formatBody,V7=Zn.formatRows,Z7=Zn.formatRow,K7=Zn.formatValue;function Q7(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})?)?$/))J7&&i[4]&&!i[7]&&(n=n.replace(/-/g,"/").replace(/T/," ")),n=new Date(n);else continue;t[e]=n}return t}const J7=new Date("2019-01-01T00:00").getHours()||new Date("2019-07-01T00:00").getHours();function t9(t){if(!t.ok)throw new Error(t.status+" "+t.statusText);return t.blob()}function e9(t,e){return fetch(t,e).then(t9)}function n9(t){if(!t.ok)throw new Error(t.status+" "+t.statusText);return t.arrayBuffer()}function r9(t,e){return fetch(t,e).then(n9)}function i9(t){if(!t.ok)throw new Error(t.status+" "+t.statusText);return t.text()}function as(t,e){return fetch(t,e).then(i9)}function D1(t){return function(e,n,r){return arguments.length===2&&typeof n=="function"&&(r=n,n=void 0),as(e,n).then(function(i){return t(i,r)})}}function o9(t,e,n,r){arguments.length===3&&typeof n=="function"&&(r=n,n=void 0);var i=os(t);return as(e,n).then(function(o){return i.parse(o,r)})}var a9=D1(T1),s9=D1(P1);function u9(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 c9(t){if(!t.ok)throw new Error(t.status+" "+t.statusText);if(!(t.status===204||t.status===205))return t.json()}function l9(t,e){return fetch(t,e).then(c9)}function Il(t){return(e,n)=>as(e,n).then(r=>new DOMParser().parseFromString(r,t))}const f9=Il("application/xml");var h9=Il("text/html"),d9=Il("image/svg+xml");function p9(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 g9(t){const e=+this._x.call(null,t),n=+this._y.call(null,t);return L1(this.cover(e,n),e,n,t)}function L1(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,v;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)===(v=(p>=f)<<1|d>=h));return i[v]=o,i[y]=a,t}function m9(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)L1(this,a[n],s[n],t[n]);return this}function y9(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 b9(){var t=[];return this.visit(function(e){if(!e.length)do t.push(e.data);while(e=e.next)}),t}function v9(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 x9(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 v=t-+this._x.call(null,d.data),x=e-+this._y.call(null,d.data),b=v*v+x*x;if(b<n){var w=Math.sqrt(n=b);i=t-w,o=e-w,l=t+w,h=e+w,r=d.data}}return r}function _9(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 w9(t){for(var e=0,n=t.length;e<n;++e)this.remove(t[e]);return this}function $9(){return this._root}function S9(){var t=0;return this.visit(function(e){if(!e.length)do++t;while(e=e.next)}),t}function A9(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 M9(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 T9(t){return t[0]}function P9(t){return arguments.length?(this._x=t,this):this._x}function D9(t){return t[1]}function L9(t){return arguments.length?(this._y=t,this):this._y}function ss(t,e,n){var r=new Rl(e??T9,n??D9,NaN,NaN,NaN,NaN);return t==null?r:r.addAll(t)}function Rl(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 E1(t){for(var e={data:t.data},n=e;t=t.next;)n=n.next={data:t.data};return e}var qt=ss.prototype=Rl.prototype;qt.copy=function(){var t=new Rl(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=E1(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]=E1(r));return t},qt.add=g9,qt.addAll=m9,qt.cover=y9,qt.data=b9,qt.extent=v9,qt.find=x9,qt.remove=_9,qt.removeAll=w9,qt.root=$9,qt.size=S9,qt.visit=A9,qt.visitAfter=M9,qt.x=P9,qt.y=L9;function Lt(t){return function(){return t}}function mn(t){return(t()-.5)*1e-6}function E9(t){return t.x+t.vx}function k9(t){return t.y+t.vy}function k1(t){var e,n,r,i=1,o=1;typeof t!="function"&&(t=Lt(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=ss(e,E9,k9).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(v);function v(x,b,w,$,A){var _=x.data,L=x.r,E=g+L;if(_){if(_.index>f.index){var T=d-_.x-_.vx,I=p-_.y-_.vy,P=T*T+I*I;P<E*E&&(T===0&&(T=mn(r),P+=T*T),I===0&&(I=mn(r),P+=I*I),P=(E-(P=Math.sqrt(P)))/P*i,f.vx+=(T*=P)*(E=(L*=L)/(m+L)),f.vy+=(I*=P)*E,_.vx-=T*(E=1-E),_.vy-=I*E)}return}return b>d+E||$<d-E||w>p+E||A<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:Lt(+c),u(),a):t},a}function C9(t){return t.index}function C1(t,e){var n=t.get(e);if(!n)throw new Error("node not found: "+e);return n}function I9(t){var e=C9,n=h,r,i=Lt(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,v=t.length;y<l;++y)for(var x=0,b,w,$,A,_,L,E;x<v;++x)b=t[x],w=b.source,$=b.target,A=$.x+$.vx-w.x-w.vx||mn(c),_=$.y+$.vy-w.y-w.vy||mn(c),L=Math.sqrt(A*A+_*_),L=(L-o[x])/L*m*r[x],A*=L,_*=L,$.vx-=A*(E=u[x]),$.vy-=_*E,w.vx+=A*(E=1-E),w.vy+=_*E}function d(){if(a){var m,y=a.length,v=t.length,x=new Map(a.map((w,$)=>[e(w,$,a),w])),b;for(m=0,s=new Array(y);m<v;++m)b=t[m],b.index=m,typeof b.source!="object"&&(b.source=C1(x,b.source)),typeof b.target!="object"&&(b.target=C1(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(v);m<v;++m)b=t[m],u[m]=s[b.source.index]/(s[b.source.index]+s[b.target.index]);r=new Array(v),p(),o=new Array(v),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:Lt(+m),p(),f):n},f.distance=function(m){return arguments.length?(i=typeof m=="function"?m:Lt(+m),g(),f):i},f}const R9=1664525,N9=1013904223,I1=4294967296;function F9(){let t=1;return()=>(t=(R9*t+N9)%I1)/I1}function G9(t){return t.x}function z9(t){return t.y}var O9=10,U9=Math.PI*(3-Math.sqrt(5));function R1(t){var e,n=1,r=.001,i=1-Math.pow(r,1/300),o=0,a=.6,s=new Map,u=Xa(h),c=Nn("tick","end"),l=F9();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,v;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)v=t[m],v.fx==null?v.x+=v.vx*=a:(v.x=v.fx,v.vx=0),v.fy==null?v.y+=v.vy*=a:(v.y=v.fy,v.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 v=O9*Math.sqrt(.5+g),x=g*U9;y.x=v*Math.cos(x),y.y=v*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 v=0,x=t.length,b,w,$,A,_;for(y==null?y=1/0:y*=y,v=0;v<x;++v)A=t[v],b=g-A.x,w=m-A.y,$=b*b+w*w,$<y&&(_=A,y=$);return _},on:function(g,m){return arguments.length>1?(c.on(g,m),e):c.on(g)}}}function N1(){var t,e,n,r,i=Lt(-30),o,a=1,s=1/0,u=.81;function c(d){var p,g=t.length,m=ss(t,G9,z9).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,v,x,b;if(d.length){for(v=x=b=0;b<4;++b)(g=d[b])&&(m=Math.abs(g.value))&&(p+=g.value,y+=m,v+=m*g.x,x+=m*g.y);d.x=v/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,v=d.y-e.y,x=m-p,b=y*y+v*v;if(x*x/u<b)return b<s&&(y===0&&(y=mn(n),b+=y*y),v===0&&(v=mn(n),b+=v*v),b<a&&(b=Math.sqrt(a*b)),e.vx+=y*d.value*r/b,e.vy+=v*d.value*r/b),!0;if(d.length||b>=s)return;(d.data!==e||d.next)&&(y===0&&(y=mn(n),b+=y*y),v===0&&(v=mn(n),b+=v*v),b<a&&(b=Math.sqrt(a*b)));do d.data!==e&&(x=o[d.data.index]*r/b,e.vx+=y*x,e.vy+=v*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:Lt(+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 B9(t,e,n){var r,i=Lt(.1),o,a;typeof t!="function"&&(t=Lt(+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:Lt(+c),u(),s):i},s.radius=function(c){return arguments.length?(t=typeof c=="function"?c:Lt(+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 F1(t){var e=Lt(.1),n,r,i;typeof t!="function"&&(t=Lt(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:Lt(+s),a(),o):e},o.x=function(s){return arguments.length?(t=typeof s=="function"?s:Lt(+s),a(),o):t},o}function G1(t){var e=Lt(.1),n,r,i;typeof t!="function"&&(t=Lt(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:Lt(+s),a(),o):e},o.y=function(s){return arguments.length?(t=typeof s=="function"?s:Lt(+s),a(),o):t},o}function Y9(t){return Math.abs(t=Math.round(t))>=1e21?t.toLocaleString("en").replace(/,/g,""):t.toString(10)}function us(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 Yr(t){return t=us(Math.abs(t)),t?t[1]:NaN}function W9(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 H9(t){return function(e){return e.replace(/[0-9]/g,function(n){return t[+n]})}}var q9=/^(?:(.)?([<>=^]))?([+\-( ])?([$#])?(0)?(\d+)?(,)?(\.\d+)?(~)?([a-z%])?$/i;function Wr(t){if(!(e=q9.exec(t)))throw new Error("invalid format: "+t);var e;return new cs({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]})}Wr.prototype=cs.prototype;function cs(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+""}cs.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 X9(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 z1;function j9(t,e){var n=us(t,e);if(!n)return t+"";var r=n[0],i=n[1],o=i-(z1=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")+us(t,Math.max(0,e+o-1))[0]}function O1(t,e){var n=us(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 U1={"%":(t,e)=>(t*100).toFixed(e),b:t=>Math.round(t).toString(2),c:t=>t+"",d:Y9,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)=>O1(t*100,e),r:O1,s:j9,X:t=>Math.round(t).toString(16).toUpperCase(),x:t=>Math.round(t).toString(16)};function B1(t){return t}var Y1=Array.prototype.map,W1=["y","z","a","f","p","n","µ","m","","k","M","G","T","P","E","Z","Y"];function H1(t){var e=t.grouping===void 0||t.thousands===void 0?B1:W9(Y1.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?B1:H9(Y1.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=Wr(h);var f=h.fill,d=h.align,p=h.sign,g=h.symbol,m=h.zero,y=h.width,v=h.comma,x=h.precision,b=h.trim,w=h.type;w==="n"?(v=!0,w="g"):U1[w]||(x===void 0&&(x=12),b=!0,w="g"),(m||f==="0"&&d==="=")&&(m=!0,f="0",d="=");var $=g==="$"?n:g==="#"&&/[boxX]/.test(w)?"0"+w.toLowerCase():"",A=g==="$"?r:/[%p]/.test(w)?a:"",_=U1[w],L=/[defgprs%]/.test(w);x=x===void 0?6:/[gprs]/.test(w)?Math.max(1,Math.min(21,x)):Math.max(0,Math.min(20,x));function E(T){var I=$,P=A,D,C,S;if(w==="c")P=_(T)+P,T="";else{T=+T;var R=T<0||1/T<0;if(T=isNaN(T)?u:_(Math.abs(T),x),b&&(T=X9(T)),R&&+T==0&&p!=="+"&&(R=!1),I=(R?p==="("?p:s:p==="-"||p==="("?"":p)+I,P=(w==="s"?W1[8+z1/3]:"")+P+(R&&p==="("?")":""),L){for(D=-1,C=T.length;++D<C;)if(S=T.charCodeAt(D),48>S||S>57){P=(S===46?i+T.slice(D+1):T.slice(D))+P,T=T.slice(0,D);break}}}v&&!m&&(T=e(T,1/0));var G=I.length+T.length+P.length,M=G<y?new Array(y-G+1).join(f):"";switch(v&&m&&(T=e(M+T,M.length?y-P.length:1/0),M=""),d){case"<":T=I+T+P+M;break;case"=":T=I+M+T+P;break;case"^":T=M.slice(0,G=M.length>>1)+I+T+P+M.slice(G);break;default:T=M+I+T+P;break}return o(T)}return E.toString=function(){return h+""},E}function l(h,f){var d=c((h=Wr(h),h.type="f",h)),p=Math.max(-8,Math.min(8,Math.floor(Yr(f)/3)))*3,g=Math.pow(10,-p),m=W1[8+p/3];return function(y){return d(g*y)+m}}return{format:c,formatPrefix:l}}var ls,eo,Nl;q1({thousands:",",grouping:[3],currency:["$",""]});function q1(t){return ls=H1(t),eo=ls.format,Nl=ls.formatPrefix,ls}function X1(t){return Math.max(0,-Yr(Math.abs(t)))}function j1(t,e){return Math.max(0,Math.max(-8,Math.min(8,Math.floor(Yr(e)/3)))*3-Yr(Math.abs(t)))}function V1(t,e){return t=Math.abs(t),e=Math.abs(e)-t,Math.max(0,Yr(e)-Yr(t))+1}var et=1e-6,no=1e-12,ht=Math.PI,St=ht/2,fs=ht/4,Xt=ht*2,yt=180/ht,nt=ht/180,dt=Math.abs,Hr=Math.atan,jt=Math.atan2,J=Math.cos,hs=Math.ceil,Z1=Math.exp,Fl=Math.hypot,ds=Math.log,Gl=Math.pow,K=Math.sin,de=Math.sign||function(t){return t>0?1:t<0?-1:0},It=Math.sqrt,zl=Math.tan;function K1(t){return t>1?0:t<-1?ht:Math.acos(t)}function Vt(t){return t>1?St:t<-1?-St:Math.asin(t)}function Q1(t){return(t=K(t/2))*t}function wt(){}function ps(t,e){t&&tm.hasOwnProperty(t.type)&&tm[t.type](t,e)}var J1={Feature:function(t,e){ps(t.geometry,e)},FeatureCollection:function(t,e){for(var n=t.features,r=-1,i=n.length;++r<i;)ps(n[r].geometry,e)}},tm={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){Ol(t.coordinates,e,0)},MultiLineString:function(t,e){for(var n=t.coordinates,r=-1,i=n.length;++r<i;)Ol(n[r],e,0)},Polygon:function(t,e){em(t.coordinates,e)},MultiPolygon:function(t,e){for(var n=t.coordinates,r=-1,i=n.length;++r<i;)em(n[r],e)},GeometryCollection:function(t,e){for(var n=t.geometries,r=-1,i=n.length;++r<i;)ps(n[r],e)}};function Ol(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 em(t,e){var n=-1,r=t.length;for(e.polygonStart();++n<r;)Ol(t[n],e,1);e.polygonEnd()}function Pe(t,e){t&&J1.hasOwnProperty(t.type)?J1[t.type](t,e):ps(t,e)}var gs=new Dt,ms=new Dt,nm,rm,Ul,Bl,Yl,Ne={point:wt,lineStart:wt,lineEnd:wt,polygonStart:function(){gs=new Dt,Ne.lineStart=V9,Ne.lineEnd=Z9},polygonEnd:function(){var t=+gs;ms.add(t<0?Xt+t:t),this.lineStart=this.lineEnd=this.point=wt},sphere:function(){ms.add(Xt)}};function V9(){Ne.point=K9}function Z9(){im(nm,rm)}function K9(t,e){Ne.point=im,nm=t,rm=e,t*=nt,e*=nt,Ul=t,Bl=J(e=e/2+fs),Yl=K(e)}function im(t,e){t*=nt,e*=nt,e=e/2+fs;var n=t-Ul,r=n>=0?1:-1,i=r*n,o=J(e),a=K(e),s=Yl*a,u=Bl*o+s*J(i),c=s*r*K(i);gs.add(jt(c,u)),Ul=t,Bl=o,Yl=a}function Q9(t){return ms=new Dt,Pe(t,Ne),ms*2}function ys(t){return[jt(t[1],t[0]),Vt(t[2])]}function Kn(t){var e=t[0],n=t[1],r=J(n);return[r*J(e),r*K(e),K(n)]}function bs(t,e){return t[0]*e[0]+t[1]*e[1]+t[2]*e[2]}function qr(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 Wl(t,e){t[0]+=e[0],t[1]+=e[1],t[2]+=e[2]}function vs(t,e){return[t[0]*e,t[1]*e,t[2]*e]}function xs(t){var e=It(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,ue,Qn,om,am,Xr,ro,yn,Qe,Je={point:Hl,lineStart:um,lineEnd:cm,polygonStart:function(){Je.point=lm,Je.lineStart=J9,Je.lineEnd=tT,ro=new Dt,Ne.polygonStart()},polygonEnd:function(){Ne.polygonEnd(),Je.point=Hl,Je.lineStart=um,Je.lineEnd=cm,gs<0?($t=-(At=180),re=-(ue=90)):ro>et?ue=90:ro<-et&&(re=-90),Qe[0]=$t,Qe[1]=At},sphere:function(){$t=-(At=180),re=-(ue=90)}};function Hl(t,e){yn.push(Qe=[$t=t,At=t]),e<re&&(re=e),e>ue&&(ue=e)}function sm(t,e){var n=Kn([t*nt,e*nt]);if(Xr){var r=qr(Xr,n),i=[r[1],-r[0],0],o=qr(i,r);xs(o),o=ys(o);var a=t-Qn,s=a>0?1:-1,u=o[0]*yt*s,c,l=dt(a)>180;l^(s*Qn<u&&u<s*t)?(c=o[1]*yt,c>ue&&(ue=c)):(u=(u+360)%360-180,l^(s*Qn<u&&u<s*t)?(c=-o[1]*yt,c<re&&(re=c)):(e<re&&(re=e),e>ue&&(ue=e))),l?t<Qn?ce($t,t)>ce($t,At)&&(At=t):ce(t,At)>ce($t,At)&&($t=t):At>=$t?(t<$t&&($t=t),t>At&&(At=t)):t>Qn?ce($t,t)>ce($t,At)&&(At=t):ce(t,At)>ce($t,At)&&($t=t)}else yn.push(Qe=[$t=t,At=t]);e<re&&(re=e),e>ue&&(ue=e),Xr=n,Qn=t}function um(){Je.point=sm}function cm(){Qe[0]=$t,Qe[1]=At,Je.point=Hl,Xr=null}function lm(t,e){if(Xr){var n=t-Qn;ro.add(dt(n)>180?n+(n>0?360:-360):n)}else om=t,am=e;Ne.point(t,e),sm(t,e)}function J9(){Ne.lineStart()}function tT(){lm(om,am),Ne.lineEnd(),dt(ro)>et&&($t=-(At=180)),Qe[0]=$t,Qe[1]=At,Xr=null}function ce(t,e){return(e-=t)<0?e+360:e}function eT(t,e){return t[0]-e[0]}function fm(t,e){return t[0]<=t[1]?t[0]<=e&&e<=t[1]:e<t[0]||t[1]<e}function nT(t){var e,n,r,i,o,a,s;if(ue=At=-($t=re=1/0),yn=[],Pe(t,Je),n=yn.length){for(yn.sort(eT),e=1,r=yn[0],o=[r];e<n;++e)i=yn[e],fm(r,i[0])||fm(r,i[1])?(ce(r[0],i[1])>ce(r[0],r[1])&&(r[1]=i[1]),ce(i[0],r[1])>ce(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=ce(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,ue]]}var io,_s,ws,$s,Ss,As,Ms,Ts,ql,Xl,jl,hm,dm,Zt,Kt,Qt,De={sphere:wt,point:Vl,lineStart:pm,lineEnd:gm,polygonStart:function(){De.lineStart=oT,De.lineEnd=aT},polygonEnd:function(){De.lineStart=pm,De.lineEnd=gm}};function Vl(t,e){t*=nt,e*=nt;var n=J(e);oo(n*J(t),n*K(t),K(e))}function oo(t,e,n){++io,ws+=(t-ws)/io,$s+=(e-$s)/io,Ss+=(n-Ss)/io}function pm(){De.point=rT}function rT(t,e){t*=nt,e*=nt;var n=J(e);Zt=n*J(t),Kt=n*K(t),Qt=K(e),De.point=iT,oo(Zt,Kt,Qt)}function iT(t,e){t*=nt,e*=nt;var n=J(e),r=n*J(t),i=n*K(t),o=K(e),a=jt(It((a=Kt*o-Qt*i)*a+(a=Qt*r-Zt*o)*a+(a=Zt*i-Kt*r)*a),Zt*r+Kt*i+Qt*o);_s+=a,As+=a*(Zt+(Zt=r)),Ms+=a*(Kt+(Kt=i)),Ts+=a*(Qt+(Qt=o)),oo(Zt,Kt,Qt)}function gm(){De.point=Vl}function oT(){De.point=sT}function aT(){mm(hm,dm),De.point=Vl}function sT(t,e){hm=t,dm=e,t*=nt,e*=nt,De.point=mm;var n=J(e);Zt=n*J(t),Kt=n*K(t),Qt=K(e),oo(Zt,Kt,Qt)}function mm(t,e){t*=nt,e*=nt;var n=J(e),r=n*J(t),i=n*K(t),o=K(e),a=Kt*o-Qt*i,s=Qt*r-Zt*o,u=Zt*i-Kt*r,c=Fl(a,s,u),l=Vt(c),h=c&&-l/c;ql.add(h*a),Xl.add(h*s),jl.add(h*u),_s+=l,As+=l*(Zt+(Zt=r)),Ms+=l*(Kt+(Kt=i)),Ts+=l*(Qt+(Qt=o)),oo(Zt,Kt,Qt)}function uT(t){io=_s=ws=$s=Ss=As=Ms=Ts=0,ql=new Dt,Xl=new Dt,jl=new Dt,Pe(t,De);var e=+ql,n=+Xl,r=+jl,i=Fl(e,n,r);return i<no&&(e=As,n=Ms,r=Ts,_s<et&&(e=ws,n=$s,r=Ss),i=Fl(e,n,r),i<no)?[NaN,NaN]:[jt(n,e)*yt,Vt(r/i)*yt]}function jr(t){return function(){return t}}function Zl(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 Kl(t,e){return dt(t)>ht&&(t-=Math.round(t/Xt)*Xt),[t,e]}Kl.invert=Kl;function Ql(t,e,n){return(t%=Xt)?e||n?Zl(bm(t),vm(e,n)):bm(t):e||n?vm(e,n):Kl}function ym(t){return function(e,n){return e+=t,dt(e)>ht&&(e-=Math.round(e/Xt)*Xt),[e,n]}}function bm(t){var e=ym(t);return e.invert=ym(-t),e}function vm(t,e){var n=J(t),r=K(t),i=J(e),o=K(e);function a(s,u){var c=J(u),l=J(s)*c,h=K(s)*c,f=K(u),d=f*n+l*r;return[jt(h*i-d*o,l*n-f*r),Vt(d*i+h*o)]}return a.invert=function(s,u){var c=J(u),l=J(s)*c,h=K(s)*c,f=K(u),d=f*i-h*o;return[jt(h*i+f*o,l*n+d*r),Vt(d*n-l*r)]},a}function xm(t){t=Ql(t[0]*nt,t[1]*nt,t.length>2?t[2]*nt:0);function e(n){return n=t(n[0]*nt,n[1]*nt),n[0]*=yt,n[1]*=yt,n}return e.invert=function(n){return n=t.invert(n[0]*nt,n[1]*nt),n[0]*=yt,n[1]*=yt,n},e}function _m(t,e,n,r,i,o){if(n){var a=J(e),s=K(e),u=r*n;i==null?(i=e+r*Xt,o=e-u/2):(i=wm(a,i),o=wm(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=ys([a,-s*J(l),-s*K(l)]),t.point(c[0],c[1])}}function wm(t,e){e=Kn(e),e[0]-=t,xs(e);var n=K1(-e[1]);return((-e[2]<0?-n:n)+Xt-et)%Xt}function cT(){var t=jr([0,0]),e=jr(90),n=jr(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)*nt,l=n.apply(this,arguments)*nt;return r=[],i=Ql(-u[0]*nt,-u[1]*nt,0).invert,_m(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:jr([+u[0],+u[1]]),s):t},s.radius=function(u){return arguments.length?(e=typeof u=="function"?u:jr(+u),s):e},s.precision=function(u){return arguments.length?(n=typeof u=="function"?u:jr(+u),s):n},s}function $m(){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 Ps(t,e){return dt(t[0]-e[0])<et&&dt(t[1]-e[1])<et}function Ds(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 Sm(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],v;if(Ps(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*et}o.push(v=new Ds(m,p,null,!0)),a.push(v.o=new Ds(m,null,v,!1)),o.push(v=new Ds(y,p,null,!1)),a.push(v.o=new Ds(y,null,v,!0))}}),!!o.length){for(a.sort(e),Am(o),Am(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 Am(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 dt(t[0])<=ht?t[0]:de(t[0])*((dt(t[0])+ht)%Xt-ht)}function Mm(t,e){var n=Jl(e),r=e[1],i=K(r),o=[K(n),-J(n),0],a=0,s=0,u=new Dt;i===1?r=St+et:i===-1&&(r=-St-et);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+fs,m=K(g),y=J(g),v=0;v<f;++v,p=b,m=$,y=A,d=x){var x=h[v],b=Jl(x),w=x[1]/2+fs,$=K(w),A=J(w),_=b-p,L=_>=0?1:-1,E=L*_,T=E>ht,I=m*$;if(u.add(jt(I*L*K(E),y*A+I*J(E))),a+=T?_+L*Xt:_,T^p>=n^b>=n){var P=qr(Kn(d),Kn(x));xs(P);var D=qr(o,P);xs(D);var C=(T^_>=0?-1:1)*Vt(D[2]);(r>C||r===C&&(P[0]||P[1]))&&(s+=T^_>=0?1:-1)}}return(a<-et||a<et&&u<-no)^s&1}function Tm(t,e,n,r){return function(i){var o=e(i),a=$m(),s=e(a),u=!1,c,l,h,f={point:d,lineStart:g,lineEnd:m,polygonStart:function(){f.point=y,f.lineStart=v,f.lineEnd=x,l=[],c=[]},polygonEnd:function(){f.point=d,f.lineStart=g,f.lineEnd=m,l=Lc(l);var b=Mm(c,r);l.length?(u||(i.polygonStart(),u=!0),Sm(l,fT,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,w){t(b,w)&&i.point(b,w)}function p(b,w){o.point(b,w)}function g(){f.point=p,o.lineStart()}function m(){f.point=d,o.lineEnd()}function y(b,w){h.push([b,w]),s.point(b,w)}function v(){s.lineStart(),h=[]}function x(){y(h[0][0],h[0][1]),s.lineEnd();var b=s.clean(),w=a.result(),$,A=w.length,_,L,E;if(h.pop(),c.push(h),h=null,!!A){if(b&1){if(L=w[0],(_=L.length-1)>0){for(u||(i.polygonStart(),u=!0),i.lineStart(),$=0;$<_;++$)i.point((E=L[$])[0],E[1]);i.lineEnd()}return}A>1&&b&2&&w.push(w.pop().concat(w.shift())),l.push(w.filter(lT))}}return f}}function lT(t){return t.length>1}function fT(t,e){return((t=t.x)[0]<0?t[1]-St-et:St-t[1])-((e=e.x)[0]<0?e[1]-St-et:St-e[1])}const tf=Tm(function(){return!0},hT,pT,[-ht,-St]);function hT(t){var e=NaN,n=NaN,r=NaN,i;return{lineStart:function(){t.lineStart(),i=1},point:function(o,a){var s=o>0?ht:-ht,u=dt(o-e);dt(u-ht)<et?(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>=ht&&(dt(e-r)<et&&(e-=r*et),dt(o-s)<et&&(o-=s*et),n=dT(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 dT(t,e,n,r){var i,o,a=K(t-n);return dt(a)>et?Hr((K(e)*(o=J(r))*K(n)-K(r)*(i=J(e))*K(t))/(i*o*a)):(e+r)/2}function pT(t,e,n,r){var i;if(t==null)i=n*St,r.point(-ht,i),r.point(0,i),r.point(ht,i),r.point(ht,0),r.point(ht,-i),r.point(0,-i),r.point(-ht,-i),r.point(-ht,0),r.point(-ht,i);else if(dt(t[0]-e[0])>et){var o=t[0]<e[0]?ht:-ht;i=n*o/2,r.point(-o,i),r.point(0,i),r.point(o,i)}else r.point(e[0],e[1])}function Pm(t){var e=J(t),n=2*nt,r=e>0,i=dt(e)>et;function o(l,h,f,d){_m(d,t,n,f,l,h)}function a(l,h){return J(l)*J(h)>e}function s(l){var h,f,d,p,g;return{lineStart:function(){p=d=!1,g=1},point:function(m,y){var v=[m,y],x,b=a(m,y),w=r?b?0:c(m,y):b?c(m+(m<0?ht:-ht),y):0;if(!h&&(p=d=b)&&l.lineStart(),b!==d&&(x=u(h,v),(!x||Ps(h,x)||Ps(v,x))&&(v[2]=1)),b!==d)g=0,b?(l.lineStart(),x=u(v,h),l.point(x[0],x[1])):(x=u(h,v),l.point(x[0],x[1],2),l.lineEnd()),h=x;else if(i&&h&&r^b){var $;!(w&f)&&($=u(v,h,!0))&&(g=0,r?(l.lineStart(),l.point($[0][0],$[0][1]),l.point($[1][0],$[1][1]),l.lineEnd()):(l.point($[1][0],$[1][1]),l.lineEnd(),l.lineStart(),l.point($[0][0],$[0][1],3)))}b&&(!h||!Ps(h,v))&&l.point(v[0],v[1]),h=v,d=b,f=w},lineEnd:function(){d&&l.lineEnd(),h=null},clean:function(){return g|(p&&d)<<1}}}function u(l,h,f){var d=Kn(l),p=Kn(h),g=[1,0,0],m=qr(d,p),y=bs(m,m),v=m[0],x=y-v*v;if(!x)return!f&&l;var b=e*y/x,w=-e*v/x,$=qr(g,m),A=vs(g,b),_=vs(m,w);Wl(A,_);var L=$,E=bs(A,L),T=bs(L,L),I=E*E-T*(bs(A,A)-1);if(!(I<0)){var P=It(I),D=vs(L,(-E-P)/T);if(Wl(D,A),D=ys(D),!f)return D;var C=l[0],S=h[0],R=l[1],G=h[1],M;S<C&&(M=C,C=S,S=M);var N=S-C,z=dt(N-ht)<et,k=z||N<et;if(!z&&G<R&&(M=R,R=G,G=M),k?z?R+G>0^D[1]<(dt(D[0]-C)<et?R:G):R<=D[1]&&D[1]<=G:N>ht^(C<=D[0]&&D[0]<=S)){var Y=vs(L,(-E+P)/T);return Wl(Y,A),[D,ys(Y)]}}}function c(l,h){var f=r?t:ht-t,d=0;return l<-f?d|=1:l>f&&(d|=2),h<-f?d|=4:h>f&&(d|=8),d}return Tm(a,s,o,r?[0,-t]:[-ht,t-ht])}function gT(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 ao=1e9,Ls=-ao;function Es(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 dt(c[0]-t)<et?l>0?0:3:dt(c[0]-n)<et?l>0?2:1:dt(c[1]-e)<et?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=$m(),f,d,p,g,m,y,v,x,b,w,$,A={point:_,lineStart:I,lineEnd:P,polygonStart:E,polygonEnd:T};function _(C,S){i(C,S)&&l.point(C,S)}function L(){for(var C=0,S=0,R=d.length;S<R;++S)for(var G=d[S],M=1,N=G.length,z=G[0],k,Y,j=z[0],W=z[1];M<N;++M)k=j,Y=W,z=G[M],j=z[0],W=z[1],Y<=r?W>r&&(j-k)*(r-Y)>(W-Y)*(t-k)&&++C:W<=r&&(j-k)*(r-Y)<(W-Y)*(t-k)&&--C;return C}function E(){l=h,f=[],d=[],$=!0}function T(){var C=L(),S=$&&C,R=(f=Lc(f)).length;(S||R)&&(c.polygonStart(),S&&(c.lineStart(),o(null,null,1,c),c.lineEnd()),R&&Sm(f,s,C,o,c),c.polygonEnd()),l=c,f=d=p=null}function I(){A.point=D,d&&d.push(p=[]),w=!0,b=!1,v=x=NaN}function P(){f&&(D(g,m),y&&b&&h.rejoin(),f.push(h.result())),A.point=_,b&&l.lineEnd()}function D(C,S){var R=i(C,S);if(d&&p.push([C,S]),w)g=C,m=S,y=R,w=!1,R&&(l.lineStart(),l.point(C,S));else if(R&&b)l.point(C,S);else{var G=[v=Math.max(Ls,Math.min(ao,v)),x=Math.max(Ls,Math.min(ao,x))],M=[C=Math.max(Ls,Math.min(ao,C)),S=Math.max(Ls,Math.min(ao,S))];gT(G,M,t,e,n,r)?(b||(l.lineStart(),l.point(G[0],G[1])),l.point(M[0],M[1]),R||l.lineEnd(),$=!1):R&&(l.lineStart(),l.point(C,S),$=!1)}v=C,x=S,b=R}return A}}function mT(){var t=0,e=0,n=960,r=500,i,o,a;return a={stream:function(s){return i&&o===s?i:i=Es(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 ef,nf,ks,Cs,Vr={sphere:wt,point:wt,lineStart:yT,lineEnd:wt,polygonStart:wt,polygonEnd:wt};function yT(){Vr.point=vT,Vr.lineEnd=bT}function bT(){Vr.point=Vr.lineEnd=wt}function vT(t,e){t*=nt,e*=nt,nf=t,ks=K(e),Cs=J(e),Vr.point=xT}function xT(t,e){t*=nt,e*=nt;var n=K(e),r=J(e),i=dt(t-nf),o=J(i),a=K(i),s=r*a,u=Cs*n-ks*r*o,c=ks*n+Cs*r*o;ef.add(jt(It(s*s+u*u),c)),nf=t,ks=n,Cs=r}function Dm(t){return ef=new Dt,Pe(t,Vr),+ef}var rf=[null,null],_T={type:"LineString",coordinates:rf};function Is(t,e){return rf[0]=t,rf[1]=e,Dm(_T)}var Lm={Feature:function(t,e){return Rs(t.geometry,e)},FeatureCollection:function(t,e){for(var n=t.features,r=-1,i=n.length;++r<i;)if(Rs(n[r].geometry,e))return!0;return!1}},Em={Sphere:function(){return!0},Point:function(t,e){return km(t.coordinates,e)},MultiPoint:function(t,e){for(var n=t.coordinates,r=-1,i=n.length;++r<i;)if(km(n[r],e))return!0;return!1},LineString:function(t,e){return Cm(t.coordinates,e)},MultiLineString:function(t,e){for(var n=t.coordinates,r=-1,i=n.length;++r<i;)if(Cm(n[r],e))return!0;return!1},Polygon:function(t,e){return Im(t.coordinates,e)},MultiPolygon:function(t,e){for(var n=t.coordinates,r=-1,i=n.length;++r<i;)if(Im(n[r],e))return!0;return!1},GeometryCollection:function(t,e){for(var n=t.geometries,r=-1,i=n.length;++r<i;)if(Rs(n[r],e))return!0;return!1}};function Rs(t,e){return t&&Em.hasOwnProperty(t.type)?Em[t.type](t,e):!1}function km(t,e){return Is(t,e)===0}function Cm(t,e){for(var n,r,i,o=0,a=t.length;o<a;o++){if(r=Is(t[o],e),r===0||o>0&&(i=Is(t[o],t[o-1]),i>0&&n<=i&&r<=i&&(n+r-i)*(1-Math.pow((n-r)/i,2))<no*i))return!0;n=r}return!1}function Im(t,e){return!!Mm(t.map(wT),Rm(e))}function wT(t){return t=t.map(Rm),t.pop(),t}function Rm(t){return[t[0]*nt,t[1]*nt]}function $T(t,e){return(t&&Lm.hasOwnProperty(t.type)?Lm[t.type]:Rs)(t,e)}function Nm(t,e,n){var r=ln(t,e-et,n).concat(e);return function(i){return r.map(function(o){return[i,o]})}}function Fm(t,e,n){var r=ln(t,e-et,n).concat(e);return function(i){return r.map(function(o){return[o,i]})}}function Gm(){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:v()}}function v(){return ln(hs(r/l)*l,n,l).map(p).concat(ln(hs(s/h)*h,a,h).map(g)).concat(ln(hs(e/u)*u,t,u).filter(function(x){return dt(x%l)>et}).map(f)).concat(ln(hs(o/c)*c,i,c).filter(function(x){return dt(x%h)>et}).map(d))}return y.lines=function(){return v().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=Nm(o,i,90),d=Fm(e,t,m),p=Nm(s,a,90),g=Fm(r,n,m),y):m},y.extentMajor([[-180,-90+et],[180,90-et]]).extentMinor([[-180,-80-et],[180,80+et]])}function ST(){return Gm()()}function AT(t,e){var n=t[0]*nt,r=t[1]*nt,i=e[0]*nt,o=e[1]*nt,a=J(r),s=K(r),u=J(o),c=K(o),l=a*J(n),h=a*K(n),f=u*J(i),d=u*K(i),p=2*Vt(It(Q1(o-r)+a*u*Q1(i-n))),g=K(p),m=p?function(y){var v=K(y*=p)/g,x=K(p-y)/g,b=x*l+v*f,w=x*h+v*d,$=x*s+v*c;return[jt(w,b)*yt,jt($,It(b*b+w*w))*yt]}:function(){return[n*yt,r*yt]};return m.distance=p,m}const so=t=>t;var of=new Dt,af=new Dt,zm,Om,sf,uf,tn={point:wt,lineStart:wt,lineEnd:wt,polygonStart:function(){tn.lineStart=MT,tn.lineEnd=PT},polygonEnd:function(){tn.lineStart=tn.lineEnd=tn.point=wt,of.add(dt(af)),af=new Dt},result:function(){var t=of/2;return of=new Dt,t}};function MT(){tn.point=TT}function TT(t,e){tn.point=Um,zm=sf=t,Om=uf=e}function Um(t,e){af.add(uf*t-sf*e),sf=t,uf=e}function PT(){Um(zm,Om)}var Zr=1/0,Ns=Zr,uo=-Zr,Fs=uo,Gs={point:DT,lineStart:wt,lineEnd:wt,polygonStart:wt,polygonEnd:wt,result:function(){var t=[[Zr,Ns],[uo,Fs]];return uo=Fs=-(Ns=Zr=1/0),t}};function DT(t,e){t<Zr&&(Zr=t),t>uo&&(uo=t),e<Ns&&(Ns=e),e>Fs&&(Fs=e)}var cf=0,lf=0,co=0,zs=0,Os=0,Kr=0,ff=0,hf=0,lo=0,Bm,Ym,Fe,Ge,pe={point:Jn,lineStart:Wm,lineEnd:Hm,polygonStart:function(){pe.lineStart=kT,pe.lineEnd=CT},polygonEnd:function(){pe.point=Jn,pe.lineStart=Wm,pe.lineEnd=Hm},result:function(){var t=lo?[ff/lo,hf/lo]:Kr?[zs/Kr,Os/Kr]:co?[cf/co,lf/co]:[NaN,NaN];return cf=lf=co=zs=Os=Kr=ff=hf=lo=0,t}};function Jn(t,e){cf+=t,lf+=e,++co}function Wm(){pe.point=LT}function LT(t,e){pe.point=ET,Jn(Fe=t,Ge=e)}function ET(t,e){var n=t-Fe,r=e-Ge,i=It(n*n+r*r);zs+=i*(Fe+t)/2,Os+=i*(Ge+e)/2,Kr+=i,Jn(Fe=t,Ge=e)}function Hm(){pe.point=Jn}function kT(){pe.point=IT}function CT(){qm(Bm,Ym)}function IT(t,e){pe.point=qm,Jn(Bm=Fe=t,Ym=Ge=e)}function qm(t,e){var n=t-Fe,r=e-Ge,i=It(n*n+r*r);zs+=i*(Fe+t)/2,Os+=i*(Ge+e)/2,Kr+=i,i=Ge*t-Fe*e,ff+=i*(Fe+t),hf+=i*(Ge+e),lo+=i*3,Jn(Fe=t,Ge=e)}function Xm(t){this._context=t}Xm.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 df=new Dt,pf,jm,Vm,fo,ho,po={point:wt,lineStart:function(){po.point=RT},lineEnd:function(){pf&&Zm(jm,Vm),po.point=wt},polygonStart:function(){pf=!0},polygonEnd:function(){pf=null},result:function(){var t=+df;return df=new Dt,t}};function RT(t,e){po.point=Zm,jm=fo=t,Vm=ho=e}function Zm(t,e){fo-=t,ho-=e,df.add(It(fo*fo+ho*ho)),fo=t,ho=e}let Km,Us,Qm,Jm;class ty{constructor(e){this._append=e==null?ey:NT(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!==Qm||this._append!==Us){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`,Qm=r,Us=this._append,Jm=this._,this._=i}this._+=Jm;break}}}result(){const e=this._;return this._="",e.length?e:null}}function ey(t){let e=1;this._+=t[0];for(const n=t.length;e<n;++e)this._+=arguments[e]+t[e]}function NT(t){const e=Math.floor(t);if(!(e>=0))throw new RangeError(`invalid digits: ${t}`);if(e>15)return ey;if(e!==Km){const n=10**e;Km=e,Us=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 Us}function FT(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(po)),po.result()},a.bounds=function(s){return Pe(s,i(Gs)),Gs.result()},a.centroid=function(s){return Pe(s,i(pe)),pe.result()},a.projection=function(s){return arguments.length?(i=s==null?(t=null,so):(t=s).stream,a):t},a.context=function(s){return arguments.length?(o=s==null?(e=null,new ty(n)):new Xm(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 ty(n)),a},a.projection(t).digits(n).context(e)}function GT(t){return{stream:go(t)}}function go(t){return function(e){var n=new gf;for(var r in t)n[r]=t[r];return n.stream=e,n}}function gf(){}gf.prototype={constructor:gf,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 mf(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(Gs)),e(Gs.result()),r!=null&&t.clipExtent(r),t}function Bs(t,e,n){return mf(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 yf(t,e,n){return Bs(t,[[0,0],e],n)}function bf(t,e,n){return mf(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 vf(t,e,n){return mf(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 ny=16,zT=J(30*nt);function ry(t,e){return+e?UT(t,e):OT(t)}function OT(t){return go({point:function(e,n){e=t(e,n),this.stream.point(e[0],e[1])}})}function UT(t,e){function n(r,i,o,a,s,u,c,l,h,f,d,p,g,m){var y=c-r,v=l-i,x=y*y+v*v;if(x>4*e&&g--){var b=a+f,w=s+d,$=u+p,A=It(b*b+w*w+$*$),_=Vt($/=A),L=dt(dt($)-1)<et||dt(o-h)<et?(o+h)/2:jt(w,b),E=t(L,_),T=E[0],I=E[1],P=T-r,D=I-i,C=v*P-y*D;(C*C/x>e||dt((y*P+v*D)/x-.5)>.3||a*f+s*d+u*p<zT)&&(n(r,i,o,a,s,u,T,I,L,b/=A,w/=A,$,g,m),m.point(T,I),n(T,I,L,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:v,lineEnd:b,polygonStart:function(){r.polygonStart(),m.lineStart=w},polygonEnd:function(){r.polygonEnd(),m.lineStart=v}};function y(_,L){_=t(_,L),r.point(_[0],_[1])}function v(){h=NaN,m.point=x,r.lineStart()}function x(_,L){var E=Kn([_,L]),T=t(_,L);n(h,f,l,d,p,g,h=T[0],f=T[1],l=_,d=E[0],p=E[1],g=E[2],ny,r),r.point(h,f)}function b(){m.point=y,r.lineEnd()}function w(){v(),m.point=$,m.lineEnd=A}function $(_,L){x(i=_,L),o=h,a=f,s=d,u=p,c=g,m.point=x}function A(){n(h,f,l,d,p,g,o,a,i,s,u,c,ny,r),m.lineEnd=b,b()}return m}}var BT=go({point:function(t,e){this.stream.point(t*nt,e*nt)}});function YT(t){return go({point:function(e,n){var r=t(e,n);return this.stream.point(r[0],r[1])}})}function WT(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 iy(t,e,n,r,i,o){if(!o)return WT(t,e,n,r,i);var a=J(o),s=K(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 xf(function(){return t})()}function xf(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=tf,m=null,y,v,x,b=so,w=.5,$,A,_,L,E;function T(C){return _(C[0]*nt,C[1]*nt)}function I(C){return C=_.invert(C[0],C[1]),C&&[C[0]*yt,C[1]*yt]}T.stream=function(C){return L&&E===C?L:L=BT(YT(l)(g($(b(E=C)))))},T.preclip=function(C){return arguments.length?(g=C,p=void 0,D()):g},T.postclip=function(C){return arguments.length?(b=C,m=y=v=x=null,D()):b},T.clipAngle=function(C){return arguments.length?(g=+C?Pm(p=C*nt):(p=null,tf),D()):p*yt},T.clipExtent=function(C){return arguments.length?(b=C==null?(m=y=v=x=null,so):Es(m=+C[0][0],y=+C[0][1],v=+C[1][0],x=+C[1][1]),D()):m==null?null:[[m,y],[v,x]]},T.scale=function(C){return arguments.length?(n=+C,P()):n},T.translate=function(C){return arguments.length?(r=+C[0],i=+C[1],P()):[r,i]},T.center=function(C){return arguments.length?(o=C[0]%360*nt,a=C[1]%360*nt,P()):[o*yt,a*yt]},T.rotate=function(C){return arguments.length?(s=C[0]%360*nt,u=C[1]%360*nt,c=C.length>2?C[2]%360*nt:0,P()):[s*yt,u*yt,c*yt]},T.angle=function(C){return arguments.length?(h=C%360*nt,P()):h*yt},T.reflectX=function(C){return arguments.length?(f=C?-1:1,P()):f<0},T.reflectY=function(C){return arguments.length?(d=C?-1:1,P()):d<0},T.precision=function(C){return arguments.length?($=ry(A,w=C*C),D()):It(w)},T.fitExtent=function(C,S){return Bs(T,C,S)},T.fitSize=function(C,S){return yf(T,C,S)},T.fitWidth=function(C,S){return bf(T,C,S)},T.fitHeight=function(C,S){return vf(T,C,S)};function P(){var C=iy(n,0,0,f,d,h).apply(null,e(o,a)),S=iy(n,r-C[0],i-C[1],f,d,h);return l=Ql(s,u,c),A=Zl(e,S),_=Zl(l,A),$=ry(A,w),D()}function D(){return L=E=null,T}return function(){return e=t.apply(this,arguments),T.invert=e.invert&&I,P()}}function _f(t){var e=0,n=ht/3,r=xf(t),i=r(e,n);return i.parallels=function(o){return arguments.length?r(e=o[0]*nt,n=o[1]*nt):[e*yt,n*yt]},i}function HT(t){var e=J(t);function n(r,i){return[r*e,K(i)/e]}return n.invert=function(r,i){return[r/e,Vt(i*e)]},n}function oy(t,e){var n=K(t),r=(n+K(e))/2;if(dt(r)<et)return HT(t);var i=1+n*(2*r-n),o=It(i)/r;function a(s,u){var c=It(i-2*r*K(u))/r;return[c*K(s*=r),o-c*J(s)]}return a.invert=function(s,u){var c=o-u,l=jt(s,dt(c))*de(c);return c*r<0&&(l-=ht*de(s)*de(c)),[l/r,Vt((i-(s*s+c*c)*r*r)/(2*r))]},a}function Ys(){return _f(oy).scale(155.424).center([0,33.6442])}function ay(){return Ys().parallels([29.5,45.5]).scale(1070).translate([480,250]).rotate([96,0]).center([-.6,38.7])}function qT(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 XT(){var t,e,n=ay(),r,i=Ys().rotate([154,0]).center([-2,58.5]).parallels([55,65]),o,a=Ys().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=qT([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+et,g+.12*d+et],[p-.214*d-et,g+.234*d-et]]).stream(c),s=a.translate([p-.205*d,g+.212*d]).clipExtent([[p-.214*d+et,g+.166*d+et],[p-.115*d-et,g+.234*d-et]]).stream(c),h()},l.fitExtent=function(f,d){return Bs(l,f,d)},l.fitSize=function(f,d){return yf(l,f,d)},l.fitWidth=function(f,d){return bf(l,f,d)},l.fitHeight=function(f,d){return vf(l,f,d)};function h(){return t=e=null,l}return l.scale(1070)}function sy(t){return function(e,n){var r=J(e),i=J(n),o=t(r*i);return o===1/0?[2,0]:[o*i*K(e),o*K(n)]}}function mo(t){return function(e,n){var r=It(e*e+n*n),i=t(r),o=K(i),a=J(i);return[jt(e*o,r*a),Vt(r&&n*o/r)]}}var wf=sy(function(t){return It(2/(1+t))});wf.invert=mo(function(t){return 2*Vt(t/2)});function jT(){return ze(wf).scale(124.75).clipAngle(180-.001)}var $f=sy(function(t){return(t=K1(t))&&t/K(t)});$f.invert=mo(function(t){return t});function VT(){return ze($f).scale(79.4188).clipAngle(180-.001)}function yo(t,e){return[t,ds(zl((St+e)/2))]}yo.invert=function(t,e){return[t,2*Hr(Z1(e))-St]};function ZT(){return uy(yo).scale(961/Xt)}function uy(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=ht*r(),f=e(xm(e.rotate()).invert([0,0]));return o(a==null?[[f[0]-h,f[1]-h],[f[0]+h,f[1]+h]]:t===yo?[[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 Ws(t){return zl((St+t)/2)}function cy(t,e){var n=J(t),r=t===e?K(t):ds(n/J(e))/ds(Ws(e)/Ws(t)),i=n*Gl(Ws(t),r)/r;if(!r)return yo;function o(a,s){i>0?s<-St+et&&(s=-St+et):s>St-et&&(s=St-et);var u=i/Gl(Ws(s),r);return[u*K(r*a),i-u*J(r*a)]}return o.invert=function(a,s){var u=i-s,c=de(r)*It(a*a+u*u),l=jt(a,dt(u))*de(u);return u*r<0&&(l-=ht*de(a)*de(u)),[l/r,2*Hr(Gl(i/c,1/r))-St]},o}function KT(){return _f(cy).scale(109.5).parallels([30,30])}function bo(t,e){return[t,e]}bo.invert=bo;function QT(){return ze(bo).scale(152.63)}function ly(t,e){var n=J(t),r=t===e?K(t):(n-J(e))/(e-t),i=n/r+t;if(dt(r)<et)return bo;function o(a,s){var u=i-s,c=r*a;return[u*K(c),i-u*J(c)]}return o.invert=function(a,s){var u=i-s,c=jt(a,dt(u))*de(u);return u*r<0&&(c-=ht*de(a)*de(u)),[c/r,i-de(r)*It(a*a+u*u)]},o}function JT(){return _f(ly).scale(131.154).center([0,13.9389])}var vo=1.340264,xo=-.081106,_o=893e-6,wo=.003796,Hs=It(3)/2,tP=12;function Sf(t,e){var n=Vt(Hs*K(e)),r=n*n,i=r*r*r;return[t*J(n)/(Hs*(vo+3*xo*r+i*(7*_o+9*wo*r))),n*(vo+xo*r+i*(_o+wo*r))]}Sf.invert=function(t,e){for(var n=e,r=n*n,i=r*r*r,o=0,a,s,u;o<tP&&(s=n*(vo+xo*r+i*(_o+wo*r))-e,u=vo+3*xo*r+i*(7*_o+9*wo*r),n-=a=s/u,r=n*n,i=r*r*r,!(dt(a)<no));++o);return[Hs*t*(vo+3*xo*r+i*(7*_o+9*wo*r))/J(n),Vt(K(n)/Hs)]};function eP(){return ze(Sf).scale(177.158)}function Af(t,e){var n=J(e),r=J(t)*n;return[n*K(t)/r,K(e)/r]}Af.invert=mo(Hr);function nP(){return ze(Af).scale(144.049).clipAngle(60)}function rP(){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=go({point:function(b,w){var $=x([b,w]);this.stream.point($[0],$[1])}}),g=so,m,y;function v(){return f=t*r,d=t*i,m=y=null,x}function x(b){var w=b[0]*f,$=b[1]*d;if(o){var A=$*a-w*s;w=w*a+$*s,$=A}return[w+e,$+n]}return x.invert=function(b){var w=b[0]-e,$=b[1]-n;if(o){var A=$*a+w*s;w=w*a-$*s,$=A}return[w/f,$/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,v()):g},x.clipExtent=function(b){return arguments.length?(g=b==null?(u=c=l=h=null,so):Es(u=+b[0][0],c=+b[0][1],l=+b[1][0],h=+b[1][1]),v()):u==null?null:[[u,c],[l,h]]},x.scale=function(b){return arguments.length?(t=+b,v()):t},x.translate=function(b){return arguments.length?(e=+b[0],n=+b[1],v()):[e,n]},x.angle=function(b){return arguments.length?(o=b%360*nt,s=K(o),a=J(o),v()):o*yt},x.reflectX=function(b){return arguments.length?(r=b?-1:1,v()):r<0},x.reflectY=function(b){return arguments.length?(i=b?-1:1,v()):i<0},x.fitExtent=function(b,w){return Bs(x,b,w)},x.fitSize=function(b,w){return yf(x,b,w)},x.fitWidth=function(b,w){return bf(x,b,w)},x.fitHeight=function(b,w){return vf(x,b,w)},x}function Mf(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)))]}Mf.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(dt(i)>et&&--r>0);return[t/(.8707+(o=n*n)*(-.131979+o*(-.013791+o*o*o*(.003971-.001529*o)))),n]};function iP(){return ze(Mf).scale(175.295)}function Tf(t,e){return[J(e)*K(t),K(e)]}Tf.invert=mo(Vt);function oP(){return ze(Tf).scale(249.5).clipAngle(90+et)}function Pf(t,e){var n=J(e),r=1+J(t)*n;return[n*K(t)/r,K(e)/r]}Pf.invert=mo(function(t){return 2*Hr(t)});function aP(){return ze(Pf).scale(250).clipAngle(142)}function Df(t,e){return[ds(zl((St+e)/2)),-t]}Df.invert=function(t,e){return[-e,2*Hr(Z1(t))-St]};function sP(){var t=uy(Df),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 uP(t,e){return t.parent===e.parent?1:2}function cP(t){return t.reduce(lP,0)/t.length}function lP(t,e){return t+e.x}function fP(t){return 1+t.reduce(hP,0)}function hP(t,e){return Math.max(t,e.y)}function dP(t){for(var e;e=t.children;)t=e[0];return t}function pP(t){for(var e;e=t.children;)t=e[e.length-1];return t}function gP(){var t=uP,e=1,n=1,r=!1;function i(o){var a,s=0;o.eachAfter(function(f){var d=f.children;d?(f.x=cP(d),f.y=fP(d)):(f.x=a?s+=t(f,a):0,f.y=0,a=f)});var u=dP(o),c=pP(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 mP(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 yP(){return this.eachAfter(mP)}function bP(t,e){let n=-1;for(const r of this)t.call(e,r,++n,this);return this}function vP(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 xP(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 _P(t,e){let n=-1;for(const r of this)if(t.call(e,r,++n,this))return r}function wP(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 $P(t){return this.eachBefore(function(e){e.children&&e.children.sort(t)})}function SP(t){for(var e=this,n=AP(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 AP(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 MP(){for(var t=this,e=[t];t=t.parent;)e.push(t);return e}function TP(){return Array.from(this)}function PP(){var t=[];return this.eachBefore(function(e){e.children||t.push(e)}),t}function DP(){var t=this,e=[];return t.each(function(n){n!==t&&e.push({source:n.parent,target:n})}),e}function*LP(){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 qs(t,e){t instanceof Map?(t=[void 0,t],e===void 0&&(e=CP)):e===void 0&&(e=kP);for(var n=new tr(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 tr(a[s])),o.parent=r,o.depth=r.depth+1;return n.eachBefore(fy)}function EP(){return qs(this).eachBefore(IP)}function kP(t){return t.children}function CP(t){return Array.isArray(t)?t[1]:null}function IP(t){t.data.value!==void 0&&(t.value=t.data.value),t.data=t.data.data}function fy(t){var e=0;do t.height=e;while((t=t.parent)&&t.height<++e)}function tr(t){this.data=t,this.depth=this.height=0,this.parent=null}tr.prototype=qs.prototype={constructor:tr,count:yP,each:bP,eachAfter:xP,eachBefore:vP,find:_P,sum:wP,sort:$P,path:SP,ancestors:MP,descendants:TP,leaves:PP,links:DP,copy:EP,[Symbol.iterator]:LP};function Xs(t){return t==null?null:hy(t)}function hy(t){if(typeof t!="function")throw new Error;return t}function er(){return 0}function Qr(t){return function(){return t}}const RP=1664525,NP=1013904223,dy=4294967296;function Lf(){let t=1;return()=>(t=(RP*t+NP)%dy)/dy}function FP(t){return typeof t=="object"&&"length"in t?t:Array.from(t)}function GP(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 zP(t){return py(t,Lf())}function py(t,e){for(var n=0,r=(t=GP(Array.from(t),e)).length,i=[],o,a;n<r;)o=t[n],a&&gy(a,o)?++n:(a=UP(i=OP(i,o)),n=0);return a}function OP(t,e){var n,r;if(Ef(e,t))return[e];for(n=0;n<t.length;++n)if(js(e,t[n])&&Ef($o(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(js($o(t[n],t[r]),e)&&js($o(t[n],e),t[r])&&js($o(t[r],e),t[n])&&Ef(my(t[n],t[r],e),t))return[t[n],t[r],e];throw new Error}function js(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 gy(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 Ef(t,e){for(var n=0;n<e.length;++n)if(!gy(t,e[n]))return!1;return!0}function UP(t){switch(t.length){case 1:return BP(t[0]);case 2:return $o(t[0],t[1]);case 3:return my(t[0],t[1],t[2])}}function BP(t){return{x:t.x,y:t.y,r:t.r}}function $o(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 my(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,v=r*r+i*i-o*o,x=v-a*a-s*s+u*u,b=v-c*c-l*l+h*h,w=d*p-f*g,$=(p*b-g*x)/(w*2)-r,A=(g*m-p*y)/w,_=(d*x-f*b)/(w*2)-i,L=(f*y-d*m)/w,E=A*A+L*L-1,T=2*(o+$*A+_*L),I=$*$+_*_-o*o,P=-(Math.abs(E)>1e-6?(T+Math.sqrt(T*T-4*E*I))/(2*E):I/T);return{x:r+$+A*P,y:i+_+L*P,r:P}}function yy(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 by(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 vy(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 Vs(t){this._=t,this.next=null,this.previous=null}function xy(t,e){if(!(o=(t=FP(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;yy(r,n,i=t[2]),n=new Vs(n),r=new Vs(r),i=new Vs(i),n.next=i.previous=r,r.next=n.previous=i,i.next=r.previous=n;t:for(u=3;u<o;++u){yy(n._,r._,i=t[u]),i=new Vs(i),c=r.next,l=n.previous,h=r._.r,f=n._.r;do if(h<=f){if(by(c._,i._)){r=c,n.next=r,r.previous=n,--u;continue t}h+=c._.r,c=c.next}else{if(by(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=vy(n);(i=i.next)!==r;)(s=vy(i))<a&&(n=i,a=s);r=n.next}for(n=[r._],i=r;(i=i.next)!==r;)n.push(i._);for(i=py(n,e),u=0;u<o;++u)n=t[u],n.x-=i.x,n.y-=i.y;return i.r}function YP(t){return xy(t,Lf()),t}function WP(t){return Math.sqrt(t.value)}function HP(){var t=null,e=1,n=1,r=er;function i(o){const a=Lf();return o.x=e/2,o.y=n/2,t?o.eachBefore(_y(t)).eachAfter(kf(r,.5,a)).eachBefore(wy(1)):o.eachBefore(_y(WP)).eachAfter(kf(er,1,a)).eachAfter(kf(r,o.r/Math.min(e,n),a)).eachBefore(wy(Math.min(e,n)/(2*o.r))),o}return i.radius=function(o){return arguments.length?(t=Xs(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:Qr(+o),i):r},i}function _y(t){return function(e){e.children||(e.r=Math.max(0,+t(e)||0))}}function kf(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=xy(i,n),s)for(o=0;o<a;++o)i[o].r-=s;r.r=u+s}}}function wy(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 $y(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 So(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 qP(){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($y),a}function o(a,s){return function(u){u.children&&So(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 XP={depth:-1},Sy={},Cf={};function jP(t){return t.id}function VP(t){return t.parentId}function ZP(){var t=jP,e=VP,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,w)=>KP(n(b,w,i))),v=y.map(Ay),x=new Set(y).add("");for(const b of v)x.has(b)||(x.add(b),y.push(b),v.push(Ay(b)),o.push(Cf));a=(b,w)=>y[w],s=(b,w)=>v[w]}for(l=0,u=o.length;l<u;++l)c=o[l],d=o[l]=new tr(c),(p=a(c,l,i))!=null&&(p+="")&&(g=d.id=p,m.set(g,m.has(g)?Sy: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===Sy)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===Cf&&h.children.length===1;)h=h.children[0],--u;for(let y=o.length-1;y>=0&&(d=o[y],d.data===Cf);--y)d.data=null}if(h.parent=XP,h.eachBefore(function(y){y.depth=y.parent.depth+1,--u}).eachBefore(fy),h.parent=null,u>0)throw new Error("cycle");return h}return r.id=function(i){return arguments.length?(t=Xs(i),r):t},r.parentId=function(i){return arguments.length?(e=Xs(i),r):e},r.path=function(i){return arguments.length?(n=Xs(i),r):n},r}function KP(t){t=`${t}`;let e=t.length;return If(t,e-1)&&!If(t,e-2)&&(t=t.slice(0,-1)),t[0]==="/"?t:`/${t}`}function Ay(t){let e=t.length;if(e<2)return"";for(;--e>1&&!If(t,e););return t.slice(0,e)}function If(t,e){if(t[e]==="/"){let n=0;for(;e>0&&t[--e]==="\\";)++n;if(!(n&1))return!0}return!1}function QP(t,e){return t.parent===e.parent?1:2}function Rf(t){var e=t.children;return e?e[0]:t.t}function Nf(t){var e=t.children;return e?e[e.length-1]:t.t}function JP(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 tD(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 eD(t,e,n){return t.a.parent===e.parent?t.a:n}function Zs(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}Zs.prototype=Object.create(tr.prototype);function nD(t){for(var e=new Zs(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 Zs(o[a],a)),i.parent=n;return(e.parent=new Zs(null,0)).children=[e],e}function rD(){var t=QP,e=1,n=1,r=null;function i(c){var l=nD(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(v){v.x<h.x&&(h=v),v.x>f.x&&(f=v),v.depth>d.depth&&(d=v)});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(v){v.x=(v.x+g)*m,v.y=v.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){tD(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,v=p.m,x=g.m,b;p=Nf(p),f=Rf(f),p&&f;)g=Rf(g),d=Nf(d),d.a=c,b=p.z+v-f.z-m+t(p._,f._),b>0&&(JP(eD(p,c,h),c,b),m+=b,y+=b),v+=p.m,m+=f.m,x+=g.m,y+=d.m;p&&!Nf(d)&&(d.t=p,d.m+=v-y),f&&!Rf(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 Ks(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 My=(1+Math.sqrt(5))/2;function Ty(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,v,x,b,w,$;l<f;){d=i-n,p=o-r;do m=s[h++].value;while(!m&&h<f);for(y=v=m,w=Math.max(p/d,d/p)/(g*t),$=m*m*w,b=Math.max(v/$,$/y);h<f;++h){if(m+=c=s[h].value,c<y&&(y=c),c>v&&(v=c),$=m*m*w,x=Math.max(v/$,$/y),x>b){m-=c;break}b=x}a.push(u={value:m,dice:d<p,children:s.slice(l,h)}),u.dice?So(u,n,r,i,g?r+=p*m/g:o):Ks(u,n,r,g?n+=d*m/g:i,o),g-=m,l=h}return a}const Ff=function t(e){function n(r,i,o,a,s){Ty(e,r,i,o,a,s)}return n.ratio=function(r){return t((r=+r)>1?r:1)},n}(My);function Py(){var t=Ff,e=!1,n=1,r=1,i=[0],o=er,a=er,s=er,u=er,c=er;function l(f){return f.x0=f.y0=0,f.x1=n,f.y1=r,f.eachBefore(h),i=[0],e&&f.eachBefore($y),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=hy(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:Qr(+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:Qr(+f),l):a},l.paddingRight=function(f){return arguments.length?(s=typeof f=="function"?f:Qr(+f),l):s},l.paddingBottom=function(f){return arguments.length?(u=typeof f=="function"?f:Qr(+f),l):u},l.paddingLeft=function(f){return arguments.length?(c=typeof f=="function"?f:Qr(+f),l):c},l}function iD(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 v=o[h];v.x0=p,v.y0=g,v.x1=m,v.y1=y;return}for(var x=c[h],b=d/2+x,w=h+1,$=f-1;w<$;){var A=w+$>>>1;c[A]<b?w=A+1:$=A}b-c[w-1]<c[w]-b&&h+1<w&&--w;var _=c[w]-x,L=d-_;if(m-p>y-g){var E=d?(p*L+m*_)/d:m;l(h,w,_,p,g,E,y),l(w,f,L,E,g,m,y)}else{var T=d?(g*L+y*_)/d:y;l(h,w,_,p,g,m,T),l(w,f,L,p,T,m,y)}}}function oD(t,e,n,r,i){(t.depth&1?Ks:So)(t,e,n,r,i)}const aD=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?So(c,i,o,a,g?o+=(s-o)*c.value/g:s):Ks(c,i,o,g?i+=(a-i)*c.value/g:a,s),g-=c.value}else r._squarify=u=Ty(e,r,i,o,a,s),u.ratio=e}return n.ratio=function(r){return t((r=+r)>1?r:1)},n}(My);function sD(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 uD(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 cD(t,e,n){return(e[0]-t[0])*(n[1]-t[1])-(e[1]-t[1])*(n[0]-t[0])}function lD(t,e){return t[0]-e[0]||t[1]-e[1]}function Dy(t){const e=t.length,n=[0,1];let r=2,i;for(i=2;i<e;++i){for(;r>1&&cD(t[n[r-2]],t[n[r-1]],t[i])<=0;)--r;n[r++]=i}return n.slice(0,r)}function fD(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(lD),e=0;e<n;++e)i[e]=[r[e][0],-r[e][1]];var o=Dy(r),a=Dy(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 hD(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 dD(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 Nt=Math.random,pD=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}(Nt),gD=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}(Nt),Gf=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}(Nt),mD=function t(e){var n=Gf.source(e);function r(){var i=n.apply(this,arguments);return function(){return Math.exp(i())}}return r.source=t,r}(Nt),Ly=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}(Nt),yD=function t(e){var n=Ly.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}(Nt),bD=function t(e){function n(r){return function(){return-Math.log1p(-e())/r}}return n.source=t,n}(Nt),vD=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}(Nt),xD=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}(Nt),Ey=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}(Nt),zf=function t(e){var n=Gf.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}(Nt),ky=function t(e){var n=zf.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}(Nt),Cy=function t(e){var n=Ey.source(e),r=ky.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}(Nt),_D=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}(Nt),wD=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}(Nt),$D=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}(Nt),SD=function t(e){var n=zf.source(e),r=Cy.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}(Nt),AD=1664525,MD=1013904223,Iy=1/4294967296;function TD(t=Math.random()){let e=(0<=t&&t<1?t/Iy:Math.abs(t))|0;return()=>(e=AD*e+MD|0,Iy*(e>>>0))}function ge(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 Of=Symbol("implicit");function Uf(){var t=new Ei,e=[],n=[],r=Of;function i(o){let a=t.get(o);if(a===void 0){if(r!==Of)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 Ei;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 Uf(e,n).unknown(r)},ge.apply(i,arguments),i}function Bf(){var t=Uf().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 Bf(e(),[r,i]).round(s).paddingInner(u).paddingOuter(c).align(l)},ge.apply(h(),arguments)}function Ry(t){var e=t.copy;return t.padding=t.paddingOuter,delete t.paddingInner,delete t.paddingOuter,t.copy=function(){return Ry(e())},t}function Yf(){return Ry(Bf.apply(null,arguments).paddingInner(1))}function PD(t){return function(){return t}}function Qs(t){return+t}var Ny=[0,1];function Jt(t){return t}function Wf(t,e){return(e-=t=+t)?function(n){return(n-t)/e}:PD(isNaN(e)?NaN:.5)}function DD(t,e){var n;return t>e&&(n=t,t=e,e=n),function(r){return Math.max(t,Math.min(e,r))}}function LD(t,e,n){var r=t[0],i=t[1],o=e[0],a=e[1];return i<r?(r=Wf(i,r),o=n(a,o)):(r=Wf(r,i),o=n(o,a)),function(s){return o(r(s))}}function ED(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]=Wf(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 Ao(t,e){return e.domain(t.domain()).range(t.range()).interpolate(t.interpolate()).clamp(t.clamp()).unknown(t.unknown())}function Js(){var t=Ny,e=Ny,n=dn,r,i,o,a=Jt,s,u,c;function l(){var f=Math.min(t.length,e.length);return a!==Jt&&(a=DD(t[0],t[f-1])),s=f>2?ED:LD,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),he)))(f)))},h.domain=function(f){return arguments.length?(t=Array.from(f,Qs),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=Ua,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 Hf(){return Js()(Jt,Jt)}function Fy(t,e,n,r){var i=ba(t,e,n),o;switch(r=Wr(r??",f"),r.type){case"s":{var a=Math.max(Math.abs(t),Math.abs(e));return r.precision==null&&!isNaN(o=j1(i,a))&&(r.precision=o),Nl(r,a)}case"":case"e":case"g":case"p":case"r":{r.precision==null&&!isNaN(o=V1(i,Math.max(Math.abs(t),Math.abs(e))))&&(r.precision=o-(r.type==="e"));break}case"f":case"%":{r.precision==null&&!isNaN(o=X1(i))&&(r.precision=o-(r.type==="%")*2);break}}return eo(r)}function bn(t){var e=t.domain;return t.ticks=function(n){var r=e();return In(r[0],r[r.length-1],n??10)},t.tickFormat=function(n,r){var i=e();return Fy(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 qf(){var t=Hf();return t.copy=function(){return Ao(t,qf())},ge.apply(t,arguments),bn(t)}function Gy(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,Qs),n):t.slice()},n.unknown=function(r){return arguments.length?(e=r,n):e},n.copy=function(){return Gy(t).unknown(e)},t=arguments.length?Array.from(t,Qs):[0,1],bn(n)}function zy(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 Oy(t){return Math.log(t)}function Uy(t){return Math.exp(t)}function kD(t){return-Math.log(-t)}function CD(t){return-Math.exp(-t)}function ID(t){return isFinite(t)?+("1e"+t):t<0?0:t}function RD(t){return t===10?ID:t===Math.E?Math.exp:e=>Math.pow(t,e)}function ND(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 By(t){return(e,n)=>-t(-e,n)}function Xf(t){const e=t(Oy,Uy),n=e.domain;let r=10,i,o;function a(){return i=ND(r),o=RD(r),n()[0]<0?(i=By(i),o=By(o),t(kD,CD)):t(Oy,Uy),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=In(c,l,m))}else y=In(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=Wr(u)).precision==null&&(u.trim=!0),u=eo(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(zy(n(),{floor:s=>o(Math.floor(i(s))),ceil:s=>o(Math.ceil(i(s)))})),e}function Yy(){const t=Xf(Js()).domain([1,10]);return t.copy=()=>Ao(t,Yy()).base(t.base()),ge.apply(t,arguments),t}function Wy(t){return function(e){return Math.sign(e)*Math.log1p(Math.abs(e/t))}}function Hy(t){return function(e){return Math.sign(e)*Math.expm1(Math.abs(e))*t}}function jf(t){var e=1,n=t(Wy(e),Hy(e));return n.constant=function(r){return arguments.length?t(Wy(e=+r),Hy(e)):e},bn(n)}function qy(){var t=jf(Js());return t.copy=function(){return Ao(t,qy()).constant(t.constant())},ge.apply(t,arguments)}function Xy(t){return function(e){return e<0?-Math.pow(-e,t):Math.pow(e,t)}}function FD(t){return t<0?-Math.sqrt(-t):Math.sqrt(t)}function GD(t){return t<0?-t*t:t*t}function Vf(t){var e=t(Jt,Jt),n=1;function r(){return n===1?t(Jt,Jt):n===.5?t(FD,GD):t(Xy(n),Xy(1/n))}return e.exponent=function(i){return arguments.length?(n=+i,r()):n},bn(e)}function tu(){var t=Vf(Js());return t.copy=function(){return Ao(t,tu()).exponent(t.exponent())},ge.apply(t,arguments),t}function zD(){return tu.apply(null,arguments).exponent(.5)}function jy(t){return Math.sign(t)*t*t}function OD(t){return Math.sign(t)*Math.sqrt(Math.abs(t))}function Vy(){var t=Hf(),e=[0,1],n=!1,r;function i(o){var a=OD(t(o));return isNaN(a)?r:n?Math.round(a):a}return i.invert=function(o){return t.invert(jy(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,Qs)).map(jy)),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 Vy(t.domain(),e).round(n).clamp(t.clamp()).unknown(r)},ge.apply(i,arguments),bn(i)}function Zy(){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]=Pg(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 Zy().domain(t).range(e).unknown(r)},ge.apply(o,arguments)}function Ky(){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 Ky().domain([t,e]).range(i).unknown(o)},ge.apply(bn(a),arguments)}function Qy(){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 Qy().domain(t).range(e).unknown(n)},ge.apply(i,arguments)}const Zf=new Date,Kf=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)=>(Zf.setTime(+o),Kf.setTime(+a),t(Zf),t(Kf),Math.floor(n(Zf,Kf))),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 Jy=Jr.range,nn=1e3,me=nn*60,rn=me*60,on=rn*24,Qf=on*7,tb=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()),eb=an.range,eu=Tt(t=>{t.setTime(t-t.getMilliseconds()-t.getSeconds()*nn)},(t,e)=>{t.setTime(+t+e*me)},(t,e)=>(e-t)/me,t=>t.getMinutes()),UD=eu.range,nu=Tt(t=>{t.setUTCSeconds(0,0)},(t,e)=>{t.setTime(+t+e*me)},(t,e)=>(e-t)/me,t=>t.getUTCMinutes()),BD=nu.range,ru=Tt(t=>{t.setTime(t-t.getMilliseconds()-t.getSeconds()*nn-t.getMinutes()*me)},(t,e)=>{t.setTime(+t+e*rn)},(t,e)=>(e-t)/rn,t=>t.getHours()),YD=ru.range,iu=Tt(t=>{t.setUTCMinutes(0,0,0)},(t,e)=>{t.setTime(+t+e*rn)},(t,e)=>(e-t)/rn,t=>t.getUTCHours()),WD=iu.range,ti=Tt(t=>t.setHours(0,0,0,0),(t,e)=>t.setDate(t.getDate()+e),(t,e)=>(e-t-(e.getTimezoneOffset()-t.getTimezoneOffset())*me)/on,t=>t.getDate()-1),HD=ti.range,Mo=Tt(t=>{t.setUTCHours(0,0,0,0)},(t,e)=>{t.setUTCDate(t.getUTCDate()+e)},(t,e)=>(e-t)/on,t=>t.getUTCDate()-1),qD=Mo.range,th=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)),XD=th.range;function nr(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())*me)/Qf)}const ei=nr(0),To=nr(1),nb=nr(2),rb=nr(3),rr=nr(4),ib=nr(5),ob=nr(6),ab=ei.range,jD=To.range,VD=nb.range,ZD=rb.range,KD=rr.range,QD=ib.range,JD=ob.range;function ir(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)/Qf)}const ni=ir(0),Po=ir(1),sb=ir(2),ub=ir(3),or=ir(4),cb=ir(5),lb=ir(6),fb=ni.range,tL=Po.range,eL=sb.range,nL=ub.range,rL=or.range,iL=cb.range,oL=lb.range,ou=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()),aL=ou.range,au=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()),sL=au.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 uL=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 cL=Ue.range;function hb(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,me],[o,5,5*me],[o,15,15*me],[o,30,30*me],[i,1,rn],[i,3,3*rn],[i,6,6*rn],[i,12,12*rn],[r,1,on],[r,2,2*on],[n,1,Qf],[e,1,tb],[e,3,3*tb],[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=pa(([,,m])=>m).right(a,f);if(d===a.length)return t.every(ba(c/Jf,l/Jf,h));if(d===0)return Jr.every(Math.max(ba(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[db,pb]=hb(Ue,au,ni,th,iu,nu),[gb,mb]=hb(Oe,ou,ei,ti,ru,eu);function eh(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 nh(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 Do(t,e,n){return{y:t,m:e,d:n,H:0,M:0,S:0,L:0}}function yb(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=Lo(i),l=Eo(i),h=Lo(o),f=Eo(o),d=Lo(a),p=Eo(a),g=Lo(s),m=Eo(s),y=Lo(u),v=Eo(u),x={a:R,A:G,b:M,B:N,c:null,d:$b,e:$b,f:kL,g:BL,G:WL,H:DL,I:LL,j:EL,L:Sb,m:CL,M:IL,p:z,q:k,Q:Lb,s:Eb,S:RL,u:NL,U:FL,V:GL,w:zL,W:OL,x:null,X:null,y:UL,Y:YL,Z:HL,"%":Db},b={a:Y,A:j,b:W,B:X,c:null,d:Mb,e:Mb,f:VL,g:oE,G:sE,H:qL,I:XL,j:jL,L:Tb,m:ZL,M:KL,p:Q,q:ct,Q:Lb,s:Eb,S:QL,u:JL,U:tE,V:eE,w:nE,W:rE,x:null,X:null,y:iE,Y:aE,Z:uE,"%":Db},w={a:E,A:T,b:I,B:P,c:D,d:_b,e:_b,f:AL,g:xb,G:vb,H:wb,I:wb,j:_L,L:SL,m:xL,M:wL,p:L,q:vL,Q:TL,s:PL,S:$L,u:pL,U:gL,V:mL,w:dL,W:yL,x:C,X:S,y:xb,Y:vb,Z:bL,"%":ML};x.x=$(n,x),x.X=$(r,x),x.c=$(e,x),b.x=$(n,b),b.X=$(r,b),b.c=$(e,b);function $(O,tt){return function(st){var q=[],xt=-1,gt=0,Ft=O.length,te,it,Mt;for(st instanceof Date||(st=new Date(+st));++xt<Ft;)O.charCodeAt(xt)===37&&(q.push(O.slice(gt,xt)),(it=bb[te=O.charAt(++xt)])!=null?te=O.charAt(++xt):it=te==="e"?" ":"0",(Mt=tt[te])&&(te=Mt(st,it)),q.push(te),gt=xt+1);return q.push(O.slice(gt,xt)),q.join("")}}function A(O,tt){return function(st){var q=Do(1900,void 0,1),xt=_(q,O,st+="",0),gt,Ft;if(xt!=st.length)return null;if("Q"in q)return new Date(q.Q);if("s"in q)return new Date(q.s*1e3+("L"in q?q.L:0));if(tt&&!("Z"in q)&&(q.Z=0),"p"in q&&(q.H=q.H%12+q.p*12),q.m===void 0&&(q.m="q"in q?q.q:0),"V"in q){if(q.V<1||q.V>53)return null;"w"in q||(q.w=1),"Z"in q?(gt=nh(Do(q.y,0,1)),Ft=gt.getUTCDay(),gt=Ft>4||Ft===0?Po.ceil(gt):Po(gt),gt=Mo.offset(gt,(q.V-1)*7),q.y=gt.getUTCFullYear(),q.m=gt.getUTCMonth(),q.d=gt.getUTCDate()+(q.w+6)%7):(gt=eh(Do(q.y,0,1)),Ft=gt.getDay(),gt=Ft>4||Ft===0?To.ceil(gt):To(gt),gt=ti.offset(gt,(q.V-1)*7),q.y=gt.getFullYear(),q.m=gt.getMonth(),q.d=gt.getDate()+(q.w+6)%7)}else("W"in q||"U"in q)&&("w"in q||(q.w="u"in q?q.u%7:"W"in q?1:0),Ft="Z"in q?nh(Do(q.y,0,1)).getUTCDay():eh(Do(q.y,0,1)).getDay(),q.m=0,q.d="W"in q?(q.w+6)%7+q.W*7-(Ft+5)%7:q.w+q.U*7-(Ft+6)%7);return"Z"in q?(q.H+=q.Z/100|0,q.M+=q.Z%100,nh(q)):eh(q)}}function _(O,tt,st,q){for(var xt=0,gt=tt.length,Ft=st.length,te,it;xt<gt;){if(q>=Ft)return-1;if(te=tt.charCodeAt(xt++),te===37){if(te=tt.charAt(xt++),it=w[te in bb?tt.charAt(xt++):te],!it||(q=it(O,st,q))<0)return-1}else if(te!=st.charCodeAt(q++))return-1}return q}function L(O,tt,st){var q=c.exec(tt.slice(st));return q?(O.p=l.get(q[0].toLowerCase()),st+q[0].length):-1}function E(O,tt,st){var q=d.exec(tt.slice(st));return q?(O.w=p.get(q[0].toLowerCase()),st+q[0].length):-1}function T(O,tt,st){var q=h.exec(tt.slice(st));return q?(O.w=f.get(q[0].toLowerCase()),st+q[0].length):-1}function I(O,tt,st){var q=y.exec(tt.slice(st));return q?(O.m=v.get(q[0].toLowerCase()),st+q[0].length):-1}function P(O,tt,st){var q=g.exec(tt.slice(st));return q?(O.m=m.get(q[0].toLowerCase()),st+q[0].length):-1}function D(O,tt,st){return _(O,e,tt,st)}function C(O,tt,st){return _(O,n,tt,st)}function S(O,tt,st){return _(O,r,tt,st)}function R(O){return a[O.getDay()]}function G(O){return o[O.getDay()]}function M(O){return u[O.getMonth()]}function N(O){return s[O.getMonth()]}function z(O){return i[+(O.getHours()>=12)]}function k(O){return 1+~~(O.getMonth()/3)}function Y(O){return a[O.getUTCDay()]}function j(O){return o[O.getUTCDay()]}function W(O){return u[O.getUTCMonth()]}function X(O){return s[O.getUTCMonth()]}function Q(O){return i[+(O.getUTCHours()>=12)]}function ct(O){return 1+~~(O.getUTCMonth()/3)}return{format:function(O){var tt=$(O+="",x);return tt.toString=function(){return O},tt},parse:function(O){var tt=A(O+="",!1);return tt.toString=function(){return O},tt},utcFormat:function(O){var tt=$(O+="",b);return tt.toString=function(){return O},tt},utcParse:function(O){var tt=A(O+="",!0);return tt.toString=function(){return O},tt}}}var bb={"-":"",_:" ",0:"0"},Rt=/^\s*\d+/,lL=/^%/,fL=/[\\^$*+?|[\]().{}]/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 hL(t){return t.replace(fL,"\\$&")}function Lo(t){return new RegExp("^(?:"+t.map(hL).join("|")+")","i")}function Eo(t){return new Map(t.map((e,n)=>[e.toLowerCase(),n]))}function dL(t,e,n){var r=Rt.exec(e.slice(n,n+1));return r?(t.w=+r[0],n+r[0].length):-1}function pL(t,e,n){var r=Rt.exec(e.slice(n,n+1));return r?(t.u=+r[0],n+r[0].length):-1}function gL(t,e,n){var r=Rt.exec(e.slice(n,n+2));return r?(t.U=+r[0],n+r[0].length):-1}function mL(t,e,n){var r=Rt.exec(e.slice(n,n+2));return r?(t.V=+r[0],n+r[0].length):-1}function yL(t,e,n){var r=Rt.exec(e.slice(n,n+2));return r?(t.W=+r[0],n+r[0].length):-1}function vb(t,e,n){var r=Rt.exec(e.slice(n,n+4));return r?(t.y=+r[0],n+r[0].length):-1}function xb(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 bL(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 vL(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 xL(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 _b(t,e,n){var r=Rt.exec(e.slice(n,n+2));return r?(t.d=+r[0],n+r[0].length):-1}function _L(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 wb(t,e,n){var r=Rt.exec(e.slice(n,n+2));return r?(t.H=+r[0],n+r[0].length):-1}function wL(t,e,n){var r=Rt.exec(e.slice(n,n+2));return r?(t.M=+r[0],n+r[0].length):-1}function $L(t,e,n){var r=Rt.exec(e.slice(n,n+2));return r?(t.S=+r[0],n+r[0].length):-1}function SL(t,e,n){var r=Rt.exec(e.slice(n,n+3));return r?(t.L=+r[0],n+r[0].length):-1}function AL(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 ML(t,e,n){var r=lL.exec(e.slice(n,n+1));return r?n+r[0].length:-1}function TL(t,e,n){var r=Rt.exec(e.slice(n));return r?(t.Q=+r[0],n+r[0].length):-1}function PL(t,e,n){var r=Rt.exec(e.slice(n));return r?(t.s=+r[0],n+r[0].length):-1}function $b(t,e){return pt(t.getDate(),e,2)}function DL(t,e){return pt(t.getHours(),e,2)}function LL(t,e){return pt(t.getHours()%12||12,e,2)}function EL(t,e){return pt(1+ti.count(Oe(t),t),e,3)}function Sb(t,e){return pt(t.getMilliseconds(),e,3)}function kL(t,e){return Sb(t,e)+"000"}function CL(t,e){return pt(t.getMonth()+1,e,2)}function IL(t,e){return pt(t.getMinutes(),e,2)}function RL(t,e){return pt(t.getSeconds(),e,2)}function NL(t){var e=t.getDay();return e===0?7:e}function FL(t,e){return pt(ei.count(Oe(t)-1,t),e,2)}function Ab(t){var e=t.getDay();return e>=4||e===0?rr(t):rr.ceil(t)}function GL(t,e){return t=Ab(t),pt(rr.count(Oe(t),t)+(Oe(t).getDay()===4),e,2)}function zL(t){return t.getDay()}function OL(t,e){return pt(To.count(Oe(t)-1,t),e,2)}function UL(t,e){return pt(t.getFullYear()%100,e,2)}function BL(t,e){return t=Ab(t),pt(t.getFullYear()%100,e,2)}function YL(t,e){return pt(t.getFullYear()%1e4,e,4)}function WL(t,e){var n=t.getDay();return t=n>=4||n===0?rr(t):rr.ceil(t),pt(t.getFullYear()%1e4,e,4)}function HL(t){var e=t.getTimezoneOffset();return(e>0?"-":(e*=-1,"+"))+pt(e/60|0,"0",2)+pt(e%60,"0",2)}function Mb(t,e){return pt(t.getUTCDate(),e,2)}function qL(t,e){return pt(t.getUTCHours(),e,2)}function XL(t,e){return pt(t.getUTCHours()%12||12,e,2)}function jL(t,e){return pt(1+Mo.count(Ue(t),t),e,3)}function Tb(t,e){return pt(t.getUTCMilliseconds(),e,3)}function VL(t,e){return Tb(t,e)+"000"}function ZL(t,e){return pt(t.getUTCMonth()+1,e,2)}function KL(t,e){return pt(t.getUTCMinutes(),e,2)}function QL(t,e){return pt(t.getUTCSeconds(),e,2)}function JL(t){var e=t.getUTCDay();return e===0?7:e}function tE(t,e){return pt(ni.count(Ue(t)-1,t),e,2)}function Pb(t){var e=t.getUTCDay();return e>=4||e===0?or(t):or.ceil(t)}function eE(t,e){return t=Pb(t),pt(or.count(Ue(t),t)+(Ue(t).getUTCDay()===4),e,2)}function nE(t){return t.getUTCDay()}function rE(t,e){return pt(Po.count(Ue(t)-1,t),e,2)}function iE(t,e){return pt(t.getUTCFullYear()%100,e,2)}function oE(t,e){return t=Pb(t),pt(t.getUTCFullYear()%100,e,2)}function aE(t,e){return pt(t.getUTCFullYear()%1e4,e,4)}function sE(t,e){var n=t.getUTCDay();return t=n>=4||n===0?or(t):or.ceil(t),pt(t.getUTCFullYear()%1e4,e,4)}function uE(){return"+0000"}function Db(){return"%"}function Lb(t){return+t}function Eb(t){return Math.floor(+t/1e3)}var ri,rh,kb,su,ih;Cb({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 Cb(t){return ri=yb(t),rh=ri.format,kb=ri.parse,su=ri.utcFormat,ih=ri.utcParse,ri}var Ib="%Y-%m-%dT%H:%M:%S.%LZ";function cE(t){return t.toISOString()}var lE=Date.prototype.toISOString?cE:su(Ib);const fE=lE;function hE(t){var e=new Date(t);return isNaN(e)?null:e}var dE=+new Date("2000-01-01T00:00:00.000Z")?hE:ih(Ib);const pE=dE;function gE(t){return new Date(t)}function mE(t){return t instanceof Date?+t:+new Date(+t)}function oh(t,e,n,r,i,o,a,s,u,c){var l=Hf(),h=l.invert,f=l.domain,d=c(".%L"),p=c(":%S"),g=c("%I:%M"),m=c("%I %p"),y=c("%a %d"),v=c("%b %d"),x=c("%B"),b=c("%Y");function w($){return(u($)<$?d:s($)<$?p:a($)<$?g:o($)<$?m:r($)<$?i($)<$?y:v:n($)<$?x:b)($)}return l.invert=function($){return new Date(h($))},l.domain=function($){return arguments.length?f(Array.from($,mE)):f().map(gE)},l.ticks=function($){var A=f();return t(A[0],A[A.length-1],$??10)},l.tickFormat=function($,A){return A==null?w:c(A)},l.nice=function($){var A=f();return(!$||typeof $.range!="function")&&($=e(A[0],A[A.length-1],$??10)),$?f(zy(A,$)):l},l.copy=function(){return Ao(l,oh(t,e,n,r,i,o,a,s,u,c))},l}function yE(){return ge.apply(oh(gb,mb,Oe,ou,ei,ti,ru,eu,an,rh).domain([new Date(2e3,0,1),new Date(2e3,0,2)]),arguments)}function bE(){return ge.apply(oh(db,pb,Ue,au,ni,Mo,iu,nu,an,su).domain([Date.UTC(2e3,0,1),Date.UTC(2e3,0,2)]),arguments)}function uu(){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(Ua),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 Rb(){var t=bn(uu()(Jt));return t.copy=function(){return vn(t,Rb())},en.apply(t,arguments)}function Nb(){var t=Xf(uu()).domain([1,10]);return t.copy=function(){return vn(t,Nb()).base(t.base())},en.apply(t,arguments)}function Fb(){var t=jf(uu());return t.copy=function(){return vn(t,Fb()).constant(t.constant())},en.apply(t,arguments)}function ah(){var t=Vf(uu());return t.copy=function(){return vn(t,ah()).exponent(t.exponent())},en.apply(t,arguments)}function vE(){return ah.apply(null,arguments).exponent(.5)}function Gb(){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)=>Ii(t,o/r))},n.copy=function(){return Gb(e).domain(t)},en.apply(n,arguments)}function cu(){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,v,x;return arguments.length?([y,v,x]=m,c=z0(g,[y,v,x]),d):[c(0),c(.5),c(1)]}}return d.range=p(dn),d.rangeRound=p(Ua),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 zb(){var t=bn(cu()(Jt));return t.copy=function(){return vn(t,zb())},en.apply(t,arguments)}function Ob(){var t=Xf(cu()).domain([.1,1,10]);return t.copy=function(){return vn(t,Ob()).base(t.base())},en.apply(t,arguments)}function Ub(){var t=jf(cu());return t.copy=function(){return vn(t,Ub()).constant(t.constant())},en.apply(t,arguments)}function sh(){var t=Vf(cu());return t.copy=function(){return vn(t,sh()).exponent(t.exponent())},en.apply(t,arguments)}function xE(){return sh.apply(null,arguments).exponent(.5)}function ut(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 _E=ut("1f77b4ff7f0e2ca02cd627289467bd8c564be377c27f7f7fbcbd2217becf"),wE=ut("7fc97fbeaed4fdc086ffff99386cb0f0027fbf5b17666666"),$E=ut("1b9e77d95f027570b3e7298a66a61ee6ab02a6761d666666"),SE=ut("4269d0efb118ff725c6cc5b03ca951ff8ab7a463f297bbf59c6b4e9498a0"),AE=ut("a6cee31f78b4b2df8a33a02cfb9a99e31a1cfdbf6fff7f00cab2d66a3d9affff99b15928"),ME=ut("fbb4aeb3cde3ccebc5decbe4fed9a6ffffcce5d8bdfddaecf2f2f2"),TE=ut("b3e2cdfdcdaccbd5e8f4cae4e6f5c9fff2aef1e2cccccccc"),PE=ut("e41a1c377eb84daf4a984ea3ff7f00ffff33a65628f781bf999999"),DE=ut("66c2a5fc8d628da0cbe78ac3a6d854ffd92fe5c494b3b3b3"),LE=ut("8dd3c7ffffb3bebadafb807280b1d3fdb462b3de69fccde5d9d9d9bc80bdccebc5ffed6f"),EE=ut("4e79a7f28e2ce1575976b7b259a14fedc949af7aa1ff9da79c755fbab0ab"),bt=t=>S0(t[t.length-1]);var Bb=new Array(3).concat("d8b365f5f5f55ab4ac","a6611adfc27d80cdc1018571","a6611adfc27df5f5f580cdc1018571","8c510ad8b365f6e8c3c7eae55ab4ac01665e","8c510ad8b365f6e8c3f5f5f5c7eae55ab4ac01665e","8c510abf812ddfc27df6e8c3c7eae580cdc135978f01665e","8c510abf812ddfc27df6e8c3f5f5f5c7eae580cdc135978f01665e","5430058c510abf812ddfc27df6e8c3c7eae580cdc135978f01665e003c30","5430058c510abf812ddfc27df6e8c3f5f5f5c7eae580cdc135978f01665e003c30").map(ut);const kE=bt(Bb);var Yb=new Array(3).concat("af8dc3f7f7f77fbf7b","7b3294c2a5cfa6dba0008837","7b3294c2a5cff7f7f7a6dba0008837","762a83af8dc3e7d4e8d9f0d37fbf7b1b7837","762a83af8dc3e7d4e8f7f7f7d9f0d37fbf7b1b7837","762a839970abc2a5cfe7d4e8d9f0d3a6dba05aae611b7837","762a839970abc2a5cfe7d4e8f7f7f7d9f0d3a6dba05aae611b7837","40004b762a839970abc2a5cfe7d4e8d9f0d3a6dba05aae611b783700441b","40004b762a839970abc2a5cfe7d4e8f7f7f7d9f0d3a6dba05aae611b783700441b").map(ut);const CE=bt(Yb);var Wb=new Array(3).concat("e9a3c9f7f7f7a1d76a","d01c8bf1b6dab8e1864dac26","d01c8bf1b6daf7f7f7b8e1864dac26","c51b7de9a3c9fde0efe6f5d0a1d76a4d9221","c51b7de9a3c9fde0eff7f7f7e6f5d0a1d76a4d9221","c51b7dde77aef1b6dafde0efe6f5d0b8e1867fbc414d9221","c51b7dde77aef1b6dafde0eff7f7f7e6f5d0b8e1867fbc414d9221","8e0152c51b7dde77aef1b6dafde0efe6f5d0b8e1867fbc414d9221276419","8e0152c51b7dde77aef1b6dafde0eff7f7f7e6f5d0b8e1867fbc414d9221276419").map(ut);const IE=bt(Wb);var Hb=new Array(3).concat("998ec3f7f7f7f1a340","5e3c99b2abd2fdb863e66101","5e3c99b2abd2f7f7f7fdb863e66101","542788998ec3d8daebfee0b6f1a340b35806","542788998ec3d8daebf7f7f7fee0b6f1a340b35806","5427888073acb2abd2d8daebfee0b6fdb863e08214b35806","5427888073acb2abd2d8daebf7f7f7fee0b6fdb863e08214b35806","2d004b5427888073acb2abd2d8daebfee0b6fdb863e08214b358067f3b08","2d004b5427888073acb2abd2d8daebf7f7f7fee0b6fdb863e08214b358067f3b08").map(ut);const RE=bt(Hb);var qb=new Array(3).concat("ef8a62f7f7f767a9cf","ca0020f4a58292c5de0571b0","ca0020f4a582f7f7f792c5de0571b0","b2182bef8a62fddbc7d1e5f067a9cf2166ac","b2182bef8a62fddbc7f7f7f7d1e5f067a9cf2166ac","b2182bd6604df4a582fddbc7d1e5f092c5de4393c32166ac","b2182bd6604df4a582fddbc7f7f7f7d1e5f092c5de4393c32166ac","67001fb2182bd6604df4a582fddbc7d1e5f092c5de4393c32166ac053061","67001fb2182bd6604df4a582fddbc7f7f7f7d1e5f092c5de4393c32166ac053061").map(ut);const NE=bt(qb);var Xb=new Array(3).concat("ef8a62ffffff999999","ca0020f4a582bababa404040","ca0020f4a582ffffffbababa404040","b2182bef8a62fddbc7e0e0e09999994d4d4d","b2182bef8a62fddbc7ffffffe0e0e09999994d4d4d","b2182bd6604df4a582fddbc7e0e0e0bababa8787874d4d4d","b2182bd6604df4a582fddbc7ffffffe0e0e0bababa8787874d4d4d","67001fb2182bd6604df4a582fddbc7e0e0e0bababa8787874d4d4d1a1a1a","67001fb2182bd6604df4a582fddbc7ffffffe0e0e0bababa8787874d4d4d1a1a1a").map(ut);const FE=bt(Xb);var jb=new Array(3).concat("fc8d59ffffbf91bfdb","d7191cfdae61abd9e92c7bb6","d7191cfdae61ffffbfabd9e92c7bb6","d73027fc8d59fee090e0f3f891bfdb4575b4","d73027fc8d59fee090ffffbfe0f3f891bfdb4575b4","d73027f46d43fdae61fee090e0f3f8abd9e974add14575b4","d73027f46d43fdae61fee090ffffbfe0f3f8abd9e974add14575b4","a50026d73027f46d43fdae61fee090e0f3f8abd9e974add14575b4313695","a50026d73027f46d43fdae61fee090ffffbfe0f3f8abd9e974add14575b4313695").map(ut);const GE=bt(jb);var Vb=new Array(3).concat("fc8d59ffffbf91cf60","d7191cfdae61a6d96a1a9641","d7191cfdae61ffffbfa6d96a1a9641","d73027fc8d59fee08bd9ef8b91cf601a9850","d73027fc8d59fee08bffffbfd9ef8b91cf601a9850","d73027f46d43fdae61fee08bd9ef8ba6d96a66bd631a9850","d73027f46d43fdae61fee08bffffbfd9ef8ba6d96a66bd631a9850","a50026d73027f46d43fdae61fee08bd9ef8ba6d96a66bd631a9850006837","a50026d73027f46d43fdae61fee08bffffbfd9ef8ba6d96a66bd631a9850006837").map(ut);const zE=bt(Vb);var Zb=new Array(3).concat("fc8d59ffffbf99d594","d7191cfdae61abdda42b83ba","d7191cfdae61ffffbfabdda42b83ba","d53e4ffc8d59fee08be6f59899d5943288bd","d53e4ffc8d59fee08bffffbfe6f59899d5943288bd","d53e4ff46d43fdae61fee08be6f598abdda466c2a53288bd","d53e4ff46d43fdae61fee08bffffbfe6f598abdda466c2a53288bd","9e0142d53e4ff46d43fdae61fee08be6f598abdda466c2a53288bd5e4fa2","9e0142d53e4ff46d43fdae61fee08bffffbfe6f598abdda466c2a53288bd5e4fa2").map(ut);const OE=bt(Zb);var Kb=new Array(3).concat("e5f5f999d8c92ca25f","edf8fbb2e2e266c2a4238b45","edf8fbb2e2e266c2a42ca25f006d2c","edf8fbccece699d8c966c2a42ca25f006d2c","edf8fbccece699d8c966c2a441ae76238b45005824","f7fcfde5f5f9ccece699d8c966c2a441ae76238b45005824","f7fcfde5f5f9ccece699d8c966c2a441ae76238b45006d2c00441b").map(ut);const UE=bt(Kb);var Qb=new Array(3).concat("e0ecf49ebcda8856a7","edf8fbb3cde38c96c688419d","edf8fbb3cde38c96c68856a7810f7c","edf8fbbfd3e69ebcda8c96c68856a7810f7c","edf8fbbfd3e69ebcda8c96c68c6bb188419d6e016b","f7fcfde0ecf4bfd3e69ebcda8c96c68c6bb188419d6e016b","f7fcfde0ecf4bfd3e69ebcda8c96c68c6bb188419d810f7c4d004b").map(ut);const BE=bt(Qb);var Jb=new Array(3).concat("e0f3dba8ddb543a2ca","f0f9e8bae4bc7bccc42b8cbe","f0f9e8bae4bc7bccc443a2ca0868ac","f0f9e8ccebc5a8ddb57bccc443a2ca0868ac","f0f9e8ccebc5a8ddb57bccc44eb3d32b8cbe08589e","f7fcf0e0f3dbccebc5a8ddb57bccc44eb3d32b8cbe08589e","f7fcf0e0f3dbccebc5a8ddb57bccc44eb3d32b8cbe0868ac084081").map(ut);const YE=bt(Jb);var tv=new Array(3).concat("fee8c8fdbb84e34a33","fef0d9fdcc8afc8d59d7301f","fef0d9fdcc8afc8d59e34a33b30000","fef0d9fdd49efdbb84fc8d59e34a33b30000","fef0d9fdd49efdbb84fc8d59ef6548d7301f990000","fff7ecfee8c8fdd49efdbb84fc8d59ef6548d7301f990000","fff7ecfee8c8fdd49efdbb84fc8d59ef6548d7301fb300007f0000").map(ut);const WE=bt(tv);var ev=new Array(3).concat("ece2f0a6bddb1c9099","f6eff7bdc9e167a9cf02818a","f6eff7bdc9e167a9cf1c9099016c59","f6eff7d0d1e6a6bddb67a9cf1c9099016c59","f6eff7d0d1e6a6bddb67a9cf3690c002818a016450","fff7fbece2f0d0d1e6a6bddb67a9cf3690c002818a016450","fff7fbece2f0d0d1e6a6bddb67a9cf3690c002818a016c59014636").map(ut);const HE=bt(ev);var nv=new Array(3).concat("ece7f2a6bddb2b8cbe","f1eef6bdc9e174a9cf0570b0","f1eef6bdc9e174a9cf2b8cbe045a8d","f1eef6d0d1e6a6bddb74a9cf2b8cbe045a8d","f1eef6d0d1e6a6bddb74a9cf3690c00570b0034e7b","fff7fbece7f2d0d1e6a6bddb74a9cf3690c00570b0034e7b","fff7fbece7f2d0d1e6a6bddb74a9cf3690c00570b0045a8d023858").map(ut);const qE=bt(nv);var rv=new Array(3).concat("e7e1efc994c7dd1c77","f1eef6d7b5d8df65b0ce1256","f1eef6d7b5d8df65b0dd1c77980043","f1eef6d4b9dac994c7df65b0dd1c77980043","f1eef6d4b9dac994c7df65b0e7298ace125691003f","f7f4f9e7e1efd4b9dac994c7df65b0e7298ace125691003f","f7f4f9e7e1efd4b9dac994c7df65b0e7298ace125698004367001f").map(ut);const XE=bt(rv);var iv=new Array(3).concat("fde0ddfa9fb5c51b8a","feebe2fbb4b9f768a1ae017e","feebe2fbb4b9f768a1c51b8a7a0177","feebe2fcc5c0fa9fb5f768a1c51b8a7a0177","feebe2fcc5c0fa9fb5f768a1dd3497ae017e7a0177","fff7f3fde0ddfcc5c0fa9fb5f768a1dd3497ae017e7a0177","fff7f3fde0ddfcc5c0fa9fb5f768a1dd3497ae017e7a017749006a").map(ut);const jE=bt(iv);var ov=new Array(3).concat("edf8b17fcdbb2c7fb8","ffffcca1dab441b6c4225ea8","ffffcca1dab441b6c42c7fb8253494","ffffccc7e9b47fcdbb41b6c42c7fb8253494","ffffccc7e9b47fcdbb41b6c41d91c0225ea80c2c84","ffffd9edf8b1c7e9b47fcdbb41b6c41d91c0225ea80c2c84","ffffd9edf8b1c7e9b47fcdbb41b6c41d91c0225ea8253494081d58").map(ut);const VE=bt(ov);var av=new Array(3).concat("f7fcb9addd8e31a354","ffffccc2e69978c679238443","ffffccc2e69978c67931a354006837","ffffccd9f0a3addd8e78c67931a354006837","ffffccd9f0a3addd8e78c67941ab5d238443005a32","ffffe5f7fcb9d9f0a3addd8e78c67941ab5d238443005a32","ffffe5f7fcb9d9f0a3addd8e78c67941ab5d238443006837004529").map(ut);const ZE=bt(av);var sv=new Array(3).concat("fff7bcfec44fd95f0e","ffffd4fed98efe9929cc4c02","ffffd4fed98efe9929d95f0e993404","ffffd4fee391fec44ffe9929d95f0e993404","ffffd4fee391fec44ffe9929ec7014cc4c028c2d04","ffffe5fff7bcfee391fec44ffe9929ec7014cc4c028c2d04","ffffe5fff7bcfee391fec44ffe9929ec7014cc4c02993404662506").map(ut);const KE=bt(sv);var uv=new Array(3).concat("ffeda0feb24cf03b20","ffffb2fecc5cfd8d3ce31a1c","ffffb2fecc5cfd8d3cf03b20bd0026","ffffb2fed976feb24cfd8d3cf03b20bd0026","ffffb2fed976feb24cfd8d3cfc4e2ae31a1cb10026","ffffccffeda0fed976feb24cfd8d3cfc4e2ae31a1cb10026","ffffccffeda0fed976feb24cfd8d3cfc4e2ae31a1cbd0026800026").map(ut);const QE=bt(uv);var cv=new Array(3).concat("deebf79ecae13182bd","eff3ffbdd7e76baed62171b5","eff3ffbdd7e76baed63182bd08519c","eff3ffc6dbef9ecae16baed63182bd08519c","eff3ffc6dbef9ecae16baed64292c62171b5084594","f7fbffdeebf7c6dbef9ecae16baed64292c62171b5084594","f7fbffdeebf7c6dbef9ecae16baed64292c62171b508519c08306b").map(ut);const JE=bt(cv);var lv=new Array(3).concat("e5f5e0a1d99b31a354","edf8e9bae4b374c476238b45","edf8e9bae4b374c47631a354006d2c","edf8e9c7e9c0a1d99b74c47631a354006d2c","edf8e9c7e9c0a1d99b74c47641ab5d238b45005a32","f7fcf5e5f5e0c7e9c0a1d99b74c47641ab5d238b45005a32","f7fcf5e5f5e0c7e9c0a1d99b74c47641ab5d238b45006d2c00441b").map(ut);const tk=bt(lv);var fv=new Array(3).concat("f0f0f0bdbdbd636363","f7f7f7cccccc969696525252","f7f7f7cccccc969696636363252525","f7f7f7d9d9d9bdbdbd969696636363252525","f7f7f7d9d9d9bdbdbd969696737373525252252525","fffffff0f0f0d9d9d9bdbdbd969696737373525252252525","fffffff0f0f0d9d9d9bdbdbd969696737373525252252525000000").map(ut);const ek=bt(fv);var hv=new Array(3).concat("efedf5bcbddc756bb1","f2f0f7cbc9e29e9ac86a51a3","f2f0f7cbc9e29e9ac8756bb154278f","f2f0f7dadaebbcbddc9e9ac8756bb154278f","f2f0f7dadaebbcbddc9e9ac8807dba6a51a34a1486","fcfbfdefedf5dadaebbcbddc9e9ac8807dba6a51a34a1486","fcfbfdefedf5dadaebbcbddc9e9ac8807dba6a51a354278f3f007d").map(ut);const nk=bt(hv);var dv=new Array(3).concat("fee0d2fc9272de2d26","fee5d9fcae91fb6a4acb181d","fee5d9fcae91fb6a4ade2d26a50f15","fee5d9fcbba1fc9272fb6a4ade2d26a50f15","fee5d9fcbba1fc9272fb6a4aef3b2ccb181d99000d","fff5f0fee0d2fcbba1fc9272fb6a4aef3b2ccb181d99000d","fff5f0fee0d2fcbba1fc9272fb6a4aef3b2ccb181da50f1567000d").map(ut);const rk=bt(dv);var pv=new Array(3).concat("fee6cefdae6be6550d","feeddefdbe85fd8d3cd94701","feeddefdbe85fd8d3ce6550da63603","feeddefdd0a2fdae6bfd8d3ce6550da63603","feeddefdd0a2fdae6bfd8d3cf16913d948018c2d04","fff5ebfee6cefdd0a2fdae6bfd8d3cf16913d948018c2d04","fff5ebfee6cefdd0a2fdae6bfd8d3cf16913d94801a636037f2704").map(ut);const ik=bt(pv);function ok(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 ak=Ya(Me(300,.5,0),Me(-240,.5,1));var sk=Ya(Me(-100,.75,.35),Me(80,1.5,.8)),uk=Ya(Me(260,.75,.35),Me(80,1.5,.8)),lu=Me();function ck(t){(t<0||t>1)&&(t-=Math.floor(t));var e=Math.abs(t-.5);return lu.h=360*t-100,lu.s=1.5-1.5*e,lu.l=.8-.9*e,lu+""}var fu=kr(),lk=Math.PI/3,fk=Math.PI*2/3;function hk(t){var e;return t=(.5-t)*Math.PI,fu.r=255*(e=Math.sin(t))*e,fu.g=255*(e=Math.sin(t+lk))*e,fu.b=255*(e=Math.sin(t+fk))*e,fu+""}function dk(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 hu(t){var e=t.length;return function(n){return t[Math.max(0,Math.min(e-1,Math.floor(n*e)))]}}const pk=hu(ut("44015444025645045745055946075a46085c460a5d460b5e470d60470e6147106347116447136548146748166848176948186a481a6c481b6d481c6e481d6f481f70482071482173482374482475482576482677482878482979472a7a472c7a472d7b472e7c472f7d46307e46327e46337f463480453581453781453882443983443a83443b84433d84433e85423f854240864241864142874144874045884046883f47883f48893e49893e4a893e4c8a3d4d8a3d4e8a3c4f8a3c508b3b518b3b528b3a538b3a548c39558c39568c38588c38598c375a8c375b8d365c8d365d8d355e8d355f8d34608d34618d33628d33638d32648e32658e31668e31678e31688e30698e306a8e2f6b8e2f6c8e2e6d8e2e6e8e2e6f8e2d708e2d718e2c718e2c728e2c738e2b748e2b758e2a768e2a778e2a788e29798e297a8e297b8e287c8e287d8e277e8e277f8e27808e26818e26828e26828e25838e25848e25858e24868e24878e23888e23898e238a8d228b8d228c8d228d8d218e8d218f8d21908d21918c20928c20928c20938c1f948c1f958b1f968b1f978b1f988b1f998a1f9a8a1e9b8a1e9c891e9d891f9e891f9f881fa0881fa1881fa1871fa28720a38620a48621a58521a68522a78522a88423a98324aa8325ab8225ac8226ad8127ad8128ae8029af7f2ab07f2cb17e2db27d2eb37c2fb47c31b57b32b67a34b67935b77937b87838b9773aba763bbb753dbc743fbc7340bd7242be7144bf7046c06f48c16e4ac16d4cc26c4ec36b50c46a52c56954c56856c66758c7655ac8645cc8635ec96260ca6063cb5f65cb5e67cc5c69cd5b6ccd5a6ece5870cf5773d05675d05477d1537ad1517cd2507fd34e81d34d84d44b86d54989d5488bd6468ed64590d74393d74195d84098d83e9bd93c9dd93ba0da39a2da37a5db36a8db34aadc32addc30b0dd2fb2dd2db5de2bb8de29bade28bddf26c0df25c2df23c5e021c8e020cae11fcde11dd0e11cd2e21bd5e21ad8e219dae319dde318dfe318e2e418e5e419e7e419eae51aece51befe51cf1e51df4e61ef6e620f8e621fbe723fde725"));var gk=hu(ut("00000401000501010601010802010902020b02020d03030f03031204041405041606051806051a07061c08071e0907200a08220b09240c09260d0a290e0b2b100b2d110c2f120d31130d34140e36150e38160f3b180f3d19103f1a10421c10441d11471e114920114b21114e22115024125325125527125829115a2a115c2c115f2d11612f116331116533106734106936106b38106c390f6e3b0f703d0f713f0f72400f74420f75440f764510774710784910784a10794c117a4e117b4f127b51127c52137c54137d56147d57157e59157e5a167e5c167f5d177f5f187f601880621980641a80651a80671b80681c816a1c816b1d816d1d816e1e81701f81721f817320817521817621817822817922827b23827c23827e24828025828125818326818426818627818827818928818b29818c29818e2a81902a81912b81932b80942c80962c80982d80992d809b2e7f9c2e7f9e2f7fa02f7fa1307ea3307ea5317ea6317da8327daa337dab337cad347cae347bb0357bb2357bb3367ab5367ab73779b83779ba3878bc3978bd3977bf3a77c03a76c23b75c43c75c53c74c73d73c83e73ca3e72cc3f71cd4071cf4070d0416fd2426fd3436ed5446dd6456cd8456cd9466bdb476adc4869de4968df4a68e04c67e24d66e34e65e44f64e55064e75263e85362e95462ea5661eb5760ec5860ed5a5fee5b5eef5d5ef05f5ef1605df2625df2645cf3655cf4675cf4695cf56b5cf66c5cf66e5cf7705cf7725cf8745cf8765cf9785df9795df97b5dfa7d5efa7f5efa815ffb835ffb8560fb8761fc8961fc8a62fc8c63fc8e64fc9065fd9266fd9467fd9668fd9869fd9a6afd9b6bfe9d6cfe9f6dfea16efea36ffea571fea772fea973feaa74feac76feae77feb078feb27afeb47bfeb67cfeb77efeb97ffebb81febd82febf84fec185fec287fec488fec68afec88cfeca8dfecc8ffecd90fecf92fed194fed395fed597fed799fed89afdda9cfddc9efddea0fde0a1fde2a3fde3a5fde5a7fde7a9fde9aafdebacfcecaefceeb0fcf0b2fcf2b4fcf4b6fcf6b8fcf7b9fcf9bbfcfbbdfcfdbf")),mk=hu(ut("00000401000501010601010802010a02020c02020e03021004031204031405041706041907051b08051d09061f0a07220b07240c08260d08290e092b10092d110a30120a32140b34150b37160b39180c3c190c3e1b0c411c0c431e0c451f0c48210c4a230c4c240c4f260c51280b53290b552b0b572d0b592f0a5b310a5c320a5e340a5f3609613809623909633b09643d09653e0966400a67420a68440a68450a69470b6a490b6a4a0c6b4c0c6b4d0d6c4f0d6c510e6c520e6d540f6d550f6d57106e59106e5a116e5c126e5d126e5f136e61136e62146e64156e65156e67166e69166e6a176e6c186e6d186e6f196e71196e721a6e741a6e751b6e771c6d781c6d7a1d6d7c1d6d7d1e6d7f1e6c801f6c82206c84206b85216b87216b88226a8a226a8c23698d23698f24699025689225689326679526679727669827669a28659b29649d29649f2a63a02a63a22b62a32c61a52c60a62d60a82e5fa92e5eab2f5ead305dae305cb0315bb1325ab3325ab43359b63458b73557b93556ba3655bc3754bd3853bf3952c03a51c13a50c33b4fc43c4ec63d4dc73e4cc83f4bca404acb4149cc4248ce4347cf4446d04545d24644d34743d44842d54a41d74b3fd84c3ed94d3dda4e3cdb503bdd513ade5238df5337e05536e15635e25734e35933e45a31e55c30e65d2fe75e2ee8602de9612bea632aeb6429eb6628ec6726ed6925ee6a24ef6c23ef6e21f06f20f1711ff1731df2741cf3761bf37819f47918f57b17f57d15f67e14f68013f78212f78410f8850ff8870ef8890cf98b0bf98c0af98e09fa9008fa9207fa9407fb9606fb9706fb9906fb9b06fb9d07fc9f07fca108fca309fca50afca60cfca80dfcaa0ffcac11fcae12fcb014fcb216fcb418fbb61afbb81dfbba1ffbbc21fbbe23fac026fac228fac42afac62df9c72ff9c932f9cb35f8cd37f8cf3af7d13df7d340f6d543f6d746f5d949f5db4cf4dd4ff4df53f4e156f3e35af3e55df2e661f2e865f2ea69f1ec6df1ed71f1ef75f1f179f2f27df2f482f3f586f3f68af4f88ef5f992f6fa96f8fb9af9fc9dfafda1fcffa4")),yk=hu(ut("0d088710078813078916078a19068c1b068d1d068e20068f2206902406912605912805922a05932c05942e05952f059631059733059735049837049938049a3a049a3c049b3e049c3f049c41049d43039e44039e46039f48039f4903a04b03a14c02a14e02a25002a25102a35302a35502a45601a45801a45901a55b01a55c01a65e01a66001a66100a76300a76400a76600a76700a86900a86a00a86c00a86e00a86f00a87100a87201a87401a87501a87701a87801a87a02a87b02a87d03a87e03a88004a88104a78305a78405a78606a68707a68808a68a09a58b0aa58d0ba58e0ca48f0da4910ea3920fa39410a29511a19613a19814a099159f9a169f9c179e9d189d9e199da01a9ca11b9ba21d9aa31e9aa51f99a62098a72197a82296aa2395ab2494ac2694ad2793ae2892b02991b12a90b22b8fb32c8eb42e8db52f8cb6308bb7318ab83289ba3388bb3488bc3587bd3786be3885bf3984c03a83c13b82c23c81c33d80c43e7fc5407ec6417dc7427cc8437bc9447aca457acb4679cc4778cc4977cd4a76ce4b75cf4c74d04d73d14e72d24f71d35171d45270d5536fd5546ed6556dd7566cd8576bd9586ada5a6ada5b69db5c68dc5d67dd5e66de5f65de6164df6263e06363e16462e26561e26660e3685fe4695ee56a5de56b5de66c5ce76e5be76f5ae87059e97158e97257ea7457eb7556eb7655ec7754ed7953ed7a52ee7b51ef7c51ef7e50f07f4ff0804ef1814df1834cf2844bf3854bf3874af48849f48948f58b47f58c46f68d45f68f44f79044f79143f79342f89441f89540f9973ff9983ef99a3efa9b3dfa9c3cfa9e3bfb9f3afba139fba238fca338fca537fca636fca835fca934fdab33fdac33fdae32fdaf31fdb130fdb22ffdb42ffdb52efeb72dfeb82cfeba2cfebb2bfebd2afebe2afec029fdc229fdc328fdc527fdc627fdc827fdca26fdcb26fccd25fcce25fcd025fcd225fbd324fbd524fbd724fad824fada24f9dc24f9dd25f8df25f8e125f7e225f7e425f6e626f6e826f5e926f5eb27f4ed27f3ee27f3f027f2f227f1f426f1f525f0f724f0f921"));function at(t){return function(){return t}}const gv=Math.abs,Ut=Math.atan2,sn=Math.cos,bk=Math.max,ii=Math.min,ie=Math.sin,vt=Math.sqrt,Bt=1e-12,xn=Math.PI,du=xn/2,_n=2*xn;function vk(t){return t>1?0:t<-1?xn:Math.acos(t)}function mv(t){return t>=1?du:t<=-1?-du:Math.asin(t)}function ko(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 Ki(e)}function xk(t){return t.innerRadius}function _k(t){return t.outerRadius}function wk(t){return t.startAngle}function $k(t){return t.endAngle}function Sk(t){return t&&t.padAngle}function Ak(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<Bt))return f=(l*(e-o)-h*(t-i))/f,[t+f*u,e+f*c]}function pu(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,v=p-f,x=g-d,b=v*v+x*x,w=i-o,$=f*g-p*d,A=(x<0?-1:1)*vt(bk(0,w*w*b-$*$)),_=($*x-v*A)/b,L=(-$*v-x*A)/b,E=($*x+v*A)/b,T=(-$*v+x*A)/b,I=_-m,P=L-y,D=E-m,C=T-y;return I*I+P*P>D*D+C*C&&(_=E,L=T),{cx:_,cy:L,x01:-l,y01:-h,x11:_*(i/w-1),y11:L*(i/w-1)}}function yv(){var t=xk,e=_k,n=at(0),r=null,i=wk,o=$k,a=Sk,s=null,u=ko(c);function c(){var l,h,f=+t.apply(this,arguments),d=+e.apply(this,arguments),p=i.apply(this,arguments)-du,g=o.apply(this,arguments)-du,m=gv(g-p),y=g>p;if(s||(s=l=u()),d<f&&(h=d,d=f,f=h),!(d>Bt))s.moveTo(0,0);else if(m>_n-Bt)s.moveTo(d*sn(p),d*ie(p)),s.arc(0,0,d,p,g,!y),f>Bt&&(s.moveTo(f*sn(g),f*ie(g)),s.arc(0,0,f,g,p,y));else{var v=p,x=g,b=p,w=g,$=m,A=m,_=a.apply(this,arguments)/2,L=_>Bt&&(r?+r.apply(this,arguments):vt(f*f+d*d)),E=ii(gv(d-f)/2,+n.apply(this,arguments)),T=E,I=E,P,D;if(L>Bt){var C=mv(L/f*ie(_)),S=mv(L/d*ie(_));($-=C*2)>Bt?(C*=y?1:-1,b+=C,w-=C):($=0,b=w=(p+g)/2),(A-=S*2)>Bt?(S*=y?1:-1,v+=S,x-=S):(A=0,v=x=(p+g)/2)}var R=d*sn(v),G=d*ie(v),M=f*sn(w),N=f*ie(w);if(E>Bt){var z=d*sn(x),k=d*ie(x),Y=f*sn(b),j=f*ie(b),W;if(m<xn)if(W=Ak(R,G,Y,j,z,k,M,N)){var X=R-W[0],Q=G-W[1],ct=z-W[0],O=k-W[1],tt=1/ie(vk((X*ct+Q*O)/(vt(X*X+Q*Q)*vt(ct*ct+O*O)))/2),st=vt(W[0]*W[0]+W[1]*W[1]);T=ii(E,(f-st)/(tt-1)),I=ii(E,(d-st)/(tt+1))}else T=I=0}A>Bt?I>Bt?(P=pu(Y,j,R,G,d,I,y),D=pu(z,k,M,N,d,I,y),s.moveTo(P.cx+P.x01,P.cy+P.y01),I<E?s.arc(P.cx,P.cy,I,Ut(P.y01,P.x01),Ut(D.y01,D.x01),!y):(s.arc(P.cx,P.cy,I,Ut(P.y01,P.x01),Ut(P.y11,P.x11),!y),s.arc(0,0,d,Ut(P.cy+P.y11,P.cx+P.x11),Ut(D.cy+D.y11,D.cx+D.x11),!y),s.arc(D.cx,D.cy,I,Ut(D.y11,D.x11),Ut(D.y01,D.x01),!y))):(s.moveTo(R,G),s.arc(0,0,d,v,x,!y)):s.moveTo(R,G),!(f>Bt)||!($>Bt)?s.lineTo(M,N):T>Bt?(P=pu(M,N,z,k,f,-T,y),D=pu(R,G,Y,j,f,-T,y),s.lineTo(P.cx+P.x01,P.cy+P.y01),T<E?s.arc(P.cx,P.cy,T,Ut(P.y01,P.x01),Ut(D.y01,D.x01),!y):(s.arc(P.cx,P.cy,T,Ut(P.y01,P.x01),Ut(P.y11,P.x11),!y),s.arc(0,0,f,Ut(P.cy+P.y11,P.cx+P.x11),Ut(D.cy+D.y11,D.cx+D.x11),y),s.arc(D.cx,D.cy,T,Ut(D.y11,D.x11),Ut(D.y01,D.x01),!y))):s.arc(0,0,f,w,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:at(+l),c):t},c.outerRadius=function(l){return arguments.length?(e=typeof l=="function"?l:at(+l),c):e},c.cornerRadius=function(l){return arguments.length?(n=typeof l=="function"?l:at(+l),c):n},c.padRadius=function(l){return arguments.length?(r=l==null?null:typeof l=="function"?l:at(+l),c):r},c.startAngle=function(l){return arguments.length?(i=typeof l=="function"?l:at(+l),c):i},c.endAngle=function(l){return arguments.length?(o=typeof l=="function"?l:at(+l),c):o},c.padAngle=function(l){return arguments.length?(a=typeof l=="function"?l:at(+l),c):a},c.context=function(l){return arguments.length?(s=l??null,c):s},c}var Mk=Array.prototype.slice;function gu(t){return typeof t=="object"&&"length"in t?t:Array.from(t)}function bv(t){this._context=t}bv.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 mu(t){return new bv(t)}function uh(t){return t[0]}function ch(t){return t[1]}function yu(t,e){var n=at(!0),r=null,i=mu,o=null,a=ko(s);t=typeof t=="function"?t:t===void 0?uh:at(t),e=typeof e=="function"?e:e===void 0?ch:at(e);function s(u){var c,l=(u=gu(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:at(+u),s):t},s.y=function(u){return arguments.length?(e=typeof u=="function"?u:at(+u),s):e},s.defined=function(u){return arguments.length?(n=typeof u=="function"?u:at(!!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 lh(t,e,n){var r=null,i=at(!0),o=null,a=mu,s=null,u=ko(c);t=typeof t=="function"?t:t===void 0?uh:at(+t),e=typeof e=="function"?e:at(e===void 0?0:+e),n=typeof n=="function"?n:n===void 0?ch:at(+n);function c(h){var f,d,p,g=(h=gu(h)).length,m,y=!1,v,x=new Array(g),b=new Array(g);for(o==null&&(s=a(v=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(v)return s=null,v+""||null}function l(){return yu().defined(i).curve(a).context(o)}return c.x=function(h){return arguments.length?(t=typeof h=="function"?h:at(+h),r=null,c):t},c.x0=function(h){return arguments.length?(t=typeof h=="function"?h:at(+h),c):t},c.x1=function(h){return arguments.length?(r=h==null?null:typeof h=="function"?h:at(+h),c):r},c.y=function(h){return arguments.length?(e=typeof h=="function"?h:at(+h),n=null,c):e},c.y0=function(h){return arguments.length?(e=typeof h=="function"?h:at(+h),c):e},c.y1=function(h){return arguments.length?(n=h==null?null:typeof h=="function"?h:at(+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:at(!!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 Tk(t,e){return e<t?-1:e>t?1:e>=t?0:NaN}function Pk(t){return t}function vv(){var t=Pk,e=Tk,n=null,r=at(0),i=at(_n),o=at(0);function a(s){var u,c=(s=gu(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,v=Math.min(Math.abs(m)/c,o.apply(this,arguments)),x=v*(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[w],p[$])}):n!=null&&d.sort(function(w,$){return n(s[w],s[$])}),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:v};return p}return a.value=function(s){return arguments.length?(t=typeof s=="function"?s:at(+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:at(+s),a):r},a.endAngle=function(s){return arguments.length?(i=typeof s=="function"?s:at(+s),a):i},a.padAngle=function(s){return arguments.length?(o=typeof s=="function"?s:at(+s),a):o},a}var xv=fh(mu);function _v(t){this._curve=t}_v.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 fh(t){function e(n){return new _v(t(n))}return e._curve=t,e}function Co(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(fh(n)):e()._curve},t}function wv(){return Co(yu().curve(xv))}function $v(){var t=lh().curve(xv),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 Co(n())},delete t.lineX0,t.lineEndAngle=function(){return Co(r())},delete t.lineX1,t.lineInnerRadius=function(){return Co(i())},delete t.lineY0,t.lineOuterRadius=function(){return Co(o())},delete t.lineY1,t.curve=function(a){return arguments.length?e(fh(a)):e()._curve},t}function Io(t,e){return[(e=+e)*Math.cos(t-=Math.PI/2),e*Math.sin(t)]}class Sv{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 Dk{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=Io(this._x0,this._y0),i=Io(this._x0,this._y0=(this._y0+n)/2),o=Io(e,this._y0),a=Io(e,n);this._context.moveTo(...r),this._context.bezierCurveTo(...i,...o,...a)}this._x0=e,this._y0=n}}function Av(t){return new Sv(t,!0)}function Mv(t){return new Sv(t,!1)}function Lk(t){return new Dk(t)}function Ek(t){return t.source}function kk(t){return t.target}function bu(t){let e=Ek,n=kk,r=uh,i=ch,o=null,a=null,s=ko(u);function u(){let c;const l=Mk.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:at(+c),u):r},u.y=function(c){return arguments.length?(i=typeof c=="function"?c:at(+c),u):i},u.context=function(c){return arguments.length?(c==null?o=a=null:a=t(o=c),u):o},u}function Ck(){return bu(Av)}function Ik(){return bu(Mv)}function Rk(){const t=bu(Lk);return t.angle=t.x,delete t.x,t.radius=t.y,delete t.y,t}const Nk=vt(3),Tv={draw(t,e){const n=vt(e+ii(e/28,.75))*.59436,r=n/2,i=r*Nk;t.moveTo(0,n),t.lineTo(0,-n),t.moveTo(-i,-r),t.lineTo(i,r),t.moveTo(-i,r),t.lineTo(i,-r)}},vu={draw(t,e){const n=vt(e/xn);t.moveTo(n,0),t.arc(0,0,n,0,_n)}},Pv={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()}},Dv=vt(1/3),Fk=Dv*2,Lv={draw(t,e){const n=vt(e/Fk),r=n*Dv;t.moveTo(0,-n),t.lineTo(r,0),t.lineTo(0,n),t.lineTo(-r,0),t.closePath()}},Ev={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()}},kv={draw(t,e){const n=vt(e-ii(e/7,2))*.87559;t.moveTo(-n,0),t.lineTo(n,0),t.moveTo(0,n),t.lineTo(0,-n)}},Cv={draw(t,e){const n=vt(e),r=-n/2;t.rect(r,r,n,n)}},Iv={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()}},Gk=.8908130915292852,Rv=ie(xn/10)/ie(7*xn/10),zk=ie(_n/10)*Rv,Ok=-sn(_n/10)*Rv,Nv={draw(t,e){const n=vt(e*Gk),r=zk*n,i=Ok*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()}},hh=vt(3),Fv={draw(t,e){const n=-vt(e/(hh*3));t.moveTo(0,n*2),t.lineTo(-hh*n,-n),t.lineTo(hh*n,-n),t.closePath()}},Uk=vt(3),Gv={draw(t,e){const n=vt(e)*.6824,r=n/2,i=n*Uk/2;t.moveTo(0,-n),t.lineTo(i,r),t.lineTo(-i,r),t.closePath()}},ye=-.5,be=vt(3)/2,dh=1/vt(12),Bk=(dh/2+1)*3,zv={draw(t,e){const n=vt(e/Bk),r=n/2,i=n*dh,o=r,a=n*dh+n,s=-o,u=a;t.moveTo(r,i),t.lineTo(o,a),t.lineTo(s,u),t.lineTo(ye*r-be*i,be*r+ye*i),t.lineTo(ye*o-be*a,be*o+ye*a),t.lineTo(ye*s-be*u,be*s+ye*u),t.lineTo(ye*r+be*i,ye*i-be*r),t.lineTo(ye*o+be*a,ye*a-be*o),t.lineTo(ye*s+be*u,ye*u-be*s),t.closePath()}},ph={draw(t,e){const n=vt(e-ii(e/6,1.7))*.6189;t.moveTo(-n,-n),t.lineTo(n,n),t.moveTo(-n,n),t.lineTo(n,-n)}},Ov=[vu,Pv,Lv,Cv,Nv,Fv,zv],Yk=[vu,kv,ph,Gv,Tv,Iv,Ev];function Wk(t,e){let n=null,r=ko(i);t=typeof t=="function"?t:at(t||vu),e=typeof e=="function"?e:at(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:at(o),i):t},i.size=function(o){return arguments.length?(e=typeof o=="function"?o:at(+o),i):e},i.context=function(o){return arguments.length?(n=o??null,i):n},i}function wn(){}function xu(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 _u(t){this._context=t}_u.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:xu(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:xu(this,t,e);break}this._x0=this._x1,this._x1=t,this._y0=this._y1,this._y1=e}};function Hk(t){return new _u(t)}function Uv(t){this._context=t}Uv.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:xu(this,t,e);break}this._x0=this._x1,this._x1=t,this._y0=this._y1,this._y1=e}};function qk(t){return new Uv(t)}function Bv(t){this._context=t}Bv.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:xu(this,t,e);break}this._x0=this._x1,this._x1=t,this._y0=this._y1,this._y1=e}};function Xk(t){return new Bv(t)}function Yv(t,e){this._basis=new _u(t),this._beta=e}Yv.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 jk=function t(e){function n(r){return e===1?new _u(r):new Yv(r,e)}return n.beta=function(r){return t(+r)},n}(.85);function wu(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 gh(t,e){this._context=t,this._k=(1-e)/6}gh.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:wu(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:wu(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 Vk=function t(e){function n(r){return new gh(r,e)}return n.tension=function(r){return t(+r)},n}(0);function mh(t,e){this._context=t,this._k=(1-e)/6}mh.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:wu(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 Zk=function t(e){function n(r){return new mh(r,e)}return n.tension=function(r){return t(+r)},n}(0);function yh(t,e){this._context=t,this._k=(1-e)/6}yh.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:wu(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 Kk=function t(e){function n(r){return new yh(r,e)}return n.tension=function(r){return t(+r)},n}(0);function bh(t,e,n){var r=t._x1,i=t._y1,o=t._x2,a=t._y2;if(t._l01_a>Bt){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>Bt){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 Wv(t,e){this._context=t,this._alpha=e}Wv.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:bh(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 Qk=function t(e){function n(r){return e?new Wv(r,e):new gh(r,0)}return n.alpha=function(r){return t(+r)},n}(.5);function Hv(t,e){this._context=t,this._alpha=e}Hv.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:bh(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 Jk=function t(e){function n(r){return e?new Hv(r,e):new mh(r,0)}return n.alpha=function(r){return t(+r)},n}(.5);function qv(t,e){this._context=t,this._alpha=e}qv.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:bh(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 tC=function t(e){function n(r){return e?new qv(r,e):new yh(r,0)}return n.alpha=function(r){return t(+r)},n}(.5);function Xv(t){this._context=t}Xv.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 eC(t){return new Xv(t)}function jv(t){return t<0?-1:1}function Vv(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(jv(o)+jv(a))*Math.min(Math.abs(o),Math.abs(a),.5*Math.abs(s))||0}function Zv(t,e){var n=t._x1-t._x0;return n?(3*(t._y1-t._y0)/n-e)/2:e}function vh(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 $u(t){this._context=t}$u.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:vh(this,this._t0,Zv(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,vh(this,Zv(this,n=Vv(this,t,e)),n);break;default:vh(this,this._t0,n=Vv(this,t,e));break}this._x0=this._x1,this._x1=t,this._y0=this._y1,this._y1=e,this._t0=n}}};function Kv(t){this._context=new Qv(t)}(Kv.prototype=Object.create($u.prototype)).point=function(t,e){$u.prototype.point.call(this,e,t)};function Qv(t){this._context=t}Qv.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 nC(t){return new $u(t)}function rC(t){return new Kv(t)}function Jv(t){this._context=t}Jv.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=t2(t),i=t2(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 t2(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 iC(t){return new Jv(t)}function Su(t,e){this._context=t,this._t=e}Su.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 oC(t){return new Su(t,.5)}function aC(t){return new Su(t,0)}function sC(t){return new Su(t,1)}function oi(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 ai(t){for(var e=t.length,n=new Array(e);--e>=0;)n[e]=e;return n}function uC(t,e){return t[e]}function cC(t){const e=[];return e.key=t,e}function lC(){var t=at([]),e=ai,n=oi,r=uC;function i(o){var a=Array.from(t.apply(this,arguments),cC),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=gu(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:at(Array.from(o)),i):t},i.value=function(o){return arguments.length?(r=typeof o=="function"?o:at(+o),i):r},i.order=function(o){return arguments.length?(e=o==null?ai:typeof o=="function"?o:at(Array.from(o)),i):e},i.offset=function(o){return arguments.length?(n=o??oi,i):n},i}function fC(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}oi(t,e)}}function hC(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 dC(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}oi(t,e)}}function pC(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,oi(t,e)}}function e2(t){var e=t.map(gC);return ai(t).sort(function(n,r){return e[n]-e[r]})}function gC(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 n2(t){var e=t.map(r2);return ai(t).sort(function(n,r){return e[n]-e[r]})}function r2(t){for(var e=0,n=-1,r=t.length,i;++n<r;)(i=+t[n][1])&&(e+=i);return e}function mC(t){return n2(t).reverse()}function yC(t){var e=t.length,n,r,i=t.map(r2),o=e2(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 bC(t){return ai(t).reverse()}const Au=t=>()=>t;function vC(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 Mu=new Be(1,0,0);i2.prototype=Be.prototype;function i2(t){for(;!t.__zoom;)if(!(t=t.parentNode))return Mu;return t.__zoom}function xh(t){t.stopImmediatePropagation()}function Ro(t){t.preventDefault(),t.stopImmediatePropagation()}function xC(t){return(!t.ctrlKey||t.type==="wheel")&&!t.button}function _C(){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 o2(){return this.__zoom||Mu}function wC(t){return-t.deltaY*(t.deltaMode===1?.05:t.deltaMode?1:.002)*(t.ctrlKey?10:1)}function $C(){return navigator.maxTouchPoints||"ontouchstart"in this}function SC(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 a2(){var t=xC,e=_C,n=SC,r=wC,i=$C,o=[0,1/0],a=[[-1/0,-1/0],[1/0,1/0]],s=250,u=R0,c=Nn("start","zoom","end"),l,h,f,d=500,p=150,g=0,m=10;function y(D){D.property("__zoom",o2).on("wheel.zoom",_,{passive:!1}).on("mousedown.zoom",L).on("dblclick.zoom",E).filter(i).on("touchstart.zoom",T).on("touchmove.zoom",I).on("touchend.zoom touchcancel.zoom",P).style("-webkit-tap-highlight-color","rgba(0,0,0,0)")}y.transform=function(D,C,S,R){var G=D.selection?D.selection():D;G.property("__zoom",o2),D!==G?w(D,C,S,R):G.interrupt().each(function(){$(this,arguments).event(R).start().zoom(null,typeof C=="function"?C.apply(this,arguments):C).end()})},y.scaleBy=function(D,C,S,R){y.scaleTo(D,function(){var G=this.__zoom.k,M=typeof C=="function"?C.apply(this,arguments):C;return G*M},S,R)},y.scaleTo=function(D,C,S,R){y.transform(D,function(){var G=e.apply(this,arguments),M=this.__zoom,N=S==null?b(G):typeof S=="function"?S.apply(this,arguments):S,z=M.invert(N),k=typeof C=="function"?C.apply(this,arguments):C;return n(x(v(M,k),N,z),G,a)},S,R)},y.translateBy=function(D,C,S,R){y.transform(D,function(){return n(this.__zoom.translate(typeof C=="function"?C.apply(this,arguments):C,typeof S=="function"?S.apply(this,arguments):S),e.apply(this,arguments),a)},null,R)},y.translateTo=function(D,C,S,R,G){y.transform(D,function(){var M=e.apply(this,arguments),N=this.__zoom,z=R==null?b(M):typeof R=="function"?R.apply(this,arguments):R;return n(Mu.translate(z[0],z[1]).scale(N.k).translate(typeof C=="function"?-C.apply(this,arguments):-C,typeof S=="function"?-S.apply(this,arguments):-S),M,a)},R,G)};function v(D,C){return C=Math.max(o[0],Math.min(o[1],C)),C===D.k?D:new Be(C,D.x,D.y)}function x(D,C,S){var R=C[0]-S[0]*D.k,G=C[1]-S[1]*D.k;return R===D.x&&G===D.y?D:new Be(D.k,R,G)}function b(D){return[(+D[0][0]+ +D[1][0])/2,(+D[0][1]+ +D[1][1])/2]}function w(D,C,S,R){D.on("start.zoom",function(){$(this,arguments).event(R).start()}).on("interrupt.zoom end.zoom",function(){$(this,arguments).event(R).end()}).tween("zoom",function(){var G=this,M=arguments,N=$(G,M).event(R),z=e.apply(G,M),k=S==null?b(z):typeof S=="function"?S.apply(G,M):S,Y=Math.max(z[1][0]-z[0][0],z[1][1]-z[0][1]),j=G.__zoom,W=typeof C=="function"?C.apply(G,M):C,X=u(j.invert(k).concat(Y/j.k),W.invert(k).concat(Y/W.k));return function(Q){if(Q===1)Q=W;else{var ct=X(Q),O=Y/ct[2];Q=new Be(O,k[0]-ct[0]*O,k[1]-ct[1]*O)}N.zoom(null,Q)}})}function $(D,C,S){return!S&&D.__zooming||new A(D,C)}function A(D,C){this.that=D,this.args=C,this.active=0,this.sourceEvent=null,this.extent=e.apply(D,C),this.taps=0}A.prototype={event:function(D){return D&&(this.sourceEvent=D),this},start:function(){return++this.active===1&&(this.that.__zooming=this,this.emit("start")),this},zoom:function(D,C){return this.mouse&&D!=="mouse"&&(this.mouse[1]=C.invert(this.mouse[0])),this.touch0&&D!=="touch"&&(this.touch0[1]=C.invert(this.touch0[0])),this.touch1&&D!=="touch"&&(this.touch1[1]=C.invert(this.touch1[0])),this.that.__zoom=C,this.emit("zoom"),this},end:function(){return--this.active===0&&(delete this.that.__zooming,this.emit("end")),this},emit:function(D){var C=V(this.that).datum();c.call(D,this.that,new vC(D,{sourceEvent:this.sourceEvent,target:y,type:D,transform:this.that.__zoom,dispatch:c}),C)}};function _(D,...C){if(!t.apply(this,arguments))return;var S=$(this,C).event(D),R=this.__zoom,G=Math.max(o[0],Math.min(o[1],R.k*Math.pow(2,r.apply(this,arguments)))),M=se(D);if(S.wheel)(S.mouse[0][0]!==M[0]||S.mouse[0][1]!==M[1])&&(S.mouse[1]=R.invert(S.mouse[0]=M)),clearTimeout(S.wheel);else{if(R.k===G)return;S.mouse=[M,R.invert(M)],Wn(this),S.start()}Ro(D),S.wheel=setTimeout(N,p),S.zoom("mouse",n(x(v(R,G),S.mouse[0],S.mouse[1]),S.extent,a));function N(){S.wheel=null,S.end()}}function L(D,...C){if(f||!t.apply(this,arguments))return;var S=D.currentTarget,R=$(this,C,!0).event(D),G=V(D.view).on("mousemove.zoom",k,!0).on("mouseup.zoom",Y,!0),M=se(D,S),N=D.clientX,z=D.clientY;Pa(D.view),xh(D),R.mouse=[M,this.__zoom.invert(M)],Wn(this),R.start();function k(j){if(Ro(j),!R.moved){var W=j.clientX-N,X=j.clientY-z;R.moved=W*W+X*X>g}R.event(j).zoom("mouse",n(x(R.that.__zoom,R.mouse[0]=se(j,S),R.mouse[1]),R.extent,a))}function Y(j){G.on("mousemove.zoom mouseup.zoom",null),Da(j.view,R.moved),Ro(j),R.event(j).end()}}function E(D,...C){if(t.apply(this,arguments)){var S=this.__zoom,R=se(D.changedTouches?D.changedTouches[0]:D,this),G=S.invert(R),M=S.k*(D.shiftKey?.5:2),N=n(x(v(S,M),R,G),e.apply(this,C),a);Ro(D),s>0?V(this).transition().duration(s).call(w,N,R,D):V(this).call(y.transform,N,R,D)}}function T(D,...C){if(t.apply(this,arguments)){var S=D.touches,R=S.length,G=$(this,C,D.changedTouches.length===R).event(D),M,N,z,k;for(xh(D),N=0;N<R;++N)z=S[N],k=se(z,this),k=[k,this.__zoom.invert(k),z.identifier],G.touch0?!G.touch1&&G.touch0[2]!==k[2]&&(G.touch1=k,G.taps=0):(G.touch0=k,M=!0,G.taps=1+!!l);l&&(l=clearTimeout(l)),M&&(G.taps<2&&(h=k[0],l=setTimeout(function(){l=null},d)),Wn(this),G.start())}}function I(D,...C){if(this.__zooming){var S=$(this,C).event(D),R=D.changedTouches,G=R.length,M,N,z,k;for(Ro(D),M=0;M<G;++M)N=R[M],z=se(N,this),S.touch0&&S.touch0[2]===N.identifier?S.touch0[0]=z:S.touch1&&S.touch1[2]===N.identifier&&(S.touch1[0]=z);if(N=S.that.__zoom,S.touch1){var Y=S.touch0[0],j=S.touch0[1],W=S.touch1[0],X=S.touch1[1],Q=(Q=W[0]-Y[0])*Q+(Q=W[1]-Y[1])*Q,ct=(ct=X[0]-j[0])*ct+(ct=X[1]-j[1])*ct;N=v(N,Math.sqrt(Q/ct)),z=[(Y[0]+W[0])/2,(Y[1]+W[1])/2],k=[(j[0]+X[0])/2,(j[1]+X[1])/2]}else if(S.touch0)z=S.touch0[0],k=S.touch0[1];else return;S.zoom("touch",n(x(N,z,k),S.extent,a))}}function P(D,...C){if(this.__zooming){var S=$(this,C).event(D),R=D.changedTouches,G=R.length,M,N;for(xh(D),f&&clearTimeout(f),f=setTimeout(function(){f=null},d),M=0;M<G;++M)N=R[M],S.touch0&&S.touch0[2]===N.identifier?delete S.touch0:S.touch1&&S.touch1[2]===N.identifier&&delete S.touch1;if(S.touch1&&!S.touch0&&(S.touch0=S.touch1,delete S.touch1),S.touch0)S.touch0[1]=this.__zoom.invert(S.touch0[0]);else if(S.end(),S.taps===2&&(N=se(N,this),Math.hypot(h[0]-N[0],h[1]-N[1])<m)){var z=V(this).on("dblclick.zoom");z&&z.apply(this,arguments)}}}return y.wheelDelta=function(D){return arguments.length?(r=typeof D=="function"?D:Au(+D),y):r},y.filter=function(D){return arguments.length?(t=typeof D=="function"?D:Au(!!D),y):t},y.touchable=function(D){return arguments.length?(i=typeof D=="function"?D:Au(!!D),y):i},y.extent=function(D){return arguments.length?(e=typeof D=="function"?D:Au([[+D[0][0],+D[0][1]],[+D[1][0],+D[1][1]]]),y):e},y.scaleExtent=function(D){return arguments.length?(o[0]=+D[0],o[1]=+D[1],y):[o[0],o[1]]},y.translateExtent=function(D){return arguments.length?(a[0][0]=+D[0][0],a[1][0]=+D[1][0],a[0][1]=+D[0][1],a[1][1]=+D[1][1],y):[[a[0][0],a[0][1]],[a[1][0],a[1][1]]]},y.constrain=function(D){return arguments.length?(n=D,y):n},y.duration=function(D){return arguments.length?(s=+D,y):s},y.interpolate=function(D){return arguments.length?(u=D,y):u},y.on=function(){var D=c.on.apply(c,arguments);return D===c?y:D},y.clickDistance=function(D){return arguments.length?(g=(D=+D)*D,y):Math.sqrt(g)},y.tapDistance=function(D){return arguments.length?(m=+D,y):m},y}const _h=Object.freeze(Object.defineProperty({__proto__:null,Adder:Dt,Delaunay:Ll,FormatSpecifier:cs,InternMap:Ei,InternSet:Cn,Node:tr,Path:Ki,Voronoi:$1,ZoomTransform:Be,active:PM,arc:yv,area:lh,areaRadial:$v,ascending:_t,autoType:Q7,axisBottom:x5,axisLeft:Fg,axisRight:v5,axisTop:Ng,bin:Mg,bisect:kn,bisectCenter:gA,bisectLeft:pA,bisectRight:fg,bisector:pa,blob:e9,blur:mA,blur2:hg,blurImage:yA,brush:UM,brushSelection:GM,brushX:zM,brushY:OM,buffer:r9,chord:YM,chordDirected:HM,chordTranspose:WM,cluster:gP,color:hn,contourDensity:y7,contours:Al,count:ma,create:e8,creator:Aa,cross:SA,csv:a9,csvFormat:U7,csvFormatBody:B7,csvFormatRow:W7,csvFormatRows:Y7,csvFormatValue:H7,csvParse:T1,csvParseRows:O7,cubehelix:Me,cumsum:AA,curveBasis:Hk,curveBasisClosed:qk,curveBasisOpen:Xk,curveBumpX:Av,curveBumpY:Mv,curveBundle:jk,curveCardinal:Vk,curveCardinalClosed:Zk,curveCardinalOpen:Kk,curveCatmullRom:Qk,curveCatmullRomClosed:Jk,curveCatmullRomOpen:tC,curveLinear:mu,curveLinearClosed:eC,curveMonotoneX:nC,curveMonotoneY:rC,curveNatural:iC,curveStep:oC,curveStepAfter:sC,curveStepBefore:aC,descending:cg,deviation:gg,difference:s5,disjoint:u5,dispatch:Nn,drag:Vg,dragDisable:Pa,dragEnable:Da,dsv:o9,dsvFormat:os,easeBack:r1,easeBackIn:xM,easeBackInOut:r1,easeBackOut:_M,easeBounce:Vi,easeBounceIn:bM,easeBounceInOut:vM,easeBounceOut:Vi,easeCircle:n1,easeCircleIn:uM,easeCircleInOut:n1,easeCircleOut:cM,easeCubic:ji,easeCubicIn:tM,easeCubicInOut:ji,easeCubicOut:eM,easeElastic:Qa,easeElasticIn:wM,easeElasticInOut:$M,easeElasticOut:Qa,easeExp:e1,easeExpIn:aM,easeExpInOut:e1,easeExpOut:sM,easeLinear:K4,easePoly:K0,easePolyIn:nM,easePolyInOut:K0,easePolyOut:rM,easeQuad:Z0,easeQuadIn:Q4,easeQuadInOut:Z0,easeQuadOut:J4,easeSin:t1,easeSinIn:iM,easeSinInOut:t1,easeSinOut:oM,every:e5,extent:Li,fcumsum:TA,filter:r5,flatGroup:PA,flatRollup:DA,forceCenter:p9,forceCollide:k1,forceLink:I9,forceManyBody:N1,forceRadial:B9,forceSimulation:R1,forceX:F1,forceY:G1,get format(){return eo},formatDefaultLocale:q1,formatLocale:H1,get formatPrefix(){return Nl},formatSpecifier:Wr,fsum:MA,geoAlbers:ay,geoAlbersUsa:XT,geoArea:Q9,geoAzimuthalEqualArea:jT,geoAzimuthalEqualAreaRaw:wf,geoAzimuthalEquidistant:VT,geoAzimuthalEquidistantRaw:$f,geoBounds:nT,geoCentroid:uT,geoCircle:cT,geoClipAntimeridian:tf,geoClipCircle:Pm,geoClipExtent:mT,geoClipRectangle:Es,geoConicConformal:KT,geoConicConformalRaw:cy,geoConicEqualArea:Ys,geoConicEqualAreaRaw:oy,geoConicEquidistant:JT,geoConicEquidistantRaw:ly,geoContains:$T,geoDistance:Is,geoEqualEarth:eP,geoEqualEarthRaw:Sf,geoEquirectangular:QT,geoEquirectangularRaw:bo,geoGnomonic:nP,geoGnomonicRaw:Af,geoGraticule:Gm,geoGraticule10:ST,geoIdentity:rP,geoInterpolate:AT,geoLength:Dm,geoMercator:ZT,geoMercatorRaw:yo,geoNaturalEarth1:iP,geoNaturalEarth1Raw:Mf,geoOrthographic:oP,geoOrthographicRaw:Tf,geoPath:FT,geoProjection:ze,geoProjectionMutator:xf,geoRotation:xm,geoStereographic:aP,geoStereographicRaw:Pf,geoStream:Pe,geoTransform:GT,geoTransverseMercator:sP,geoTransverseMercatorRaw:Df,gray:_8,greatest:Tg,greatestIndex:VA,group:vg,groupSort:kA,groups:xg,hcl:Fa,hierarchy:qs,histogram:Mg,hsl:Ca,html:h9,image:u9,index:LA,indexes:EA,interpolate:dn,interpolateArray:T8,interpolateBasis:x0,interpolateBasisClosed:_0,interpolateBlues:JE,interpolateBrBG:kE,interpolateBuGn:UE,interpolateBuPu:BE,interpolateCividis:ok,interpolateCool:uk,interpolateCubehelix:B8,interpolateCubehelixDefault:ak,interpolateCubehelixLong:Ya,interpolateDate:T0,interpolateDiscrete:L8,interpolateGnBu:YE,interpolateGreens:tk,interpolateGreys:ek,interpolateHcl:O8,interpolateHclLong:U8,interpolateHsl:F8,interpolateHslLong:G8,interpolateHue:E8,interpolateInferno:mk,interpolateLab:z8,interpolateMagma:gk,interpolateNumber:he,interpolateNumberArray:Zc,interpolateObject:P0,interpolateOrRd:WE,interpolateOranges:ik,interpolatePRGn:CE,interpolatePiYG:IE,interpolatePlasma:yk,interpolatePuBu:qE,interpolatePuBuGn:HE,interpolatePuOr:RE,interpolatePuRd:XE,interpolatePurples:nk,interpolateRainbow:ck,interpolateRdBu:NE,interpolateRdGy:FE,interpolateRdPu:jE,interpolateRdYlBu:GE,interpolateRdYlGn:zE,interpolateReds:rk,interpolateRgb:Ui,interpolateRgbBasis:S0,interpolateRgbBasisClosed:M8,interpolateRound:Ua,interpolateSinebow:hk,interpolateSpectral:OE,interpolateString:Jc,interpolateTransformCss:k0,interpolateTransformSvg:C0,interpolateTurbo:dk,interpolateViridis:pk,interpolateWarm:sk,interpolateYlGn:ZE,interpolateYlGnBu:VE,interpolateYlOrBr:KE,interpolateYlOrRd:QE,interpolateZoom:R0,interrupt:Wn,intersection:c5,interval:X8,isoFormat:fE,isoParse:pE,json:l9,lab:Na,lch:w8,least:jA,leastIndex:Lg,line:yu,lineRadial:wv,link:bu,linkHorizontal:Ck,linkRadial:Rk,linkVertical:Ik,local:Xg,map:i5,matcher:Rc,max:ki,maxIndex:Pc,mean:OA,median:UA,medianIndex:BA,merge:Lc,min:va,minIndex:Dc,mode:WA,namespace:Ni,namespaces:Cc,nice:Mc,now:qi,pack:HP,packEnclose:zP,packSiblings:YP,pairs:HA,partition:qP,path:Sl,pathRound:jM,permute:Ag,pie:vv,piecewise:z0,pointRadial:Io,pointer:se,pointers:r8,polygonArea:sD,polygonCentroid:uD,polygonContains:hD,polygonHull:fD,polygonLength:dD,precisionFixed:X1,precisionPrefix:j1,precisionRound:V1,quadtree:ss,quantile:Ii,quantileIndex:Dg,quantileSorted:Pg,quantize:Y8,quickselect:xa,radialArea:$v,radialLine:wv,randomBates:yD,randomBernoulli:xD,randomBeta:ky,randomBinomial:Cy,randomCauchy:wD,randomExponential:bD,randomGamma:zf,randomGeometric:Ey,randomInt:gD,randomIrwinHall:Ly,randomLcg:TD,randomLogNormal:mD,randomLogistic:$D,randomNormal:Gf,randomPareto:vD,randomPoisson:SD,randomUniform:pD,randomWeibull:_D,range:ln,rank:XA,reduce:o5,reverse:a5,rgb:kr,ribbon:n7,ribbonArrow:r7,rollup:wg,rollups:$g,scaleBand:Bf,scaleDiverging:zb,scaleDivergingLog:Ob,scaleDivergingPow:sh,scaleDivergingSqrt:xE,scaleDivergingSymlog:Ub,scaleIdentity:Gy,scaleImplicit:Of,scaleLinear:qf,scaleLog:Yy,scaleOrdinal:Uf,scalePoint:Yf,scalePow:tu,scaleQuantile:Zy,scaleQuantize:Ky,scaleRadial:Vy,scaleSequential:Rb,scaleSequentialLog:Nb,scaleSequentialPow:ah,scaleSequentialQuantile:Gb,scaleSequentialSqrt:vE,scaleSequentialSymlog:Fb,scaleSqrt:zD,scaleSymlog:qy,scaleThreshold:Qy,scaleTime:yE,scaleUtc:bE,scan:ZA,schemeAccent:wE,schemeBlues:cv,schemeBrBG:Bb,schemeBuGn:Kb,schemeBuPu:Qb,schemeCategory10:_E,schemeDark2:$E,schemeGnBu:Jb,schemeGreens:lv,schemeGreys:fv,schemeObservable10:SE,schemeOrRd:tv,schemeOranges:pv,schemePRGn:Yb,schemePaired:AE,schemePastel1:ME,schemePastel2:TE,schemePiYG:Wb,schemePuBu:nv,schemePuBuGn:ev,schemePuOr:Hb,schemePuRd:rv,schemePurples:hv,schemeRdBu:qb,schemeRdGy:Xb,schemeRdPu:iv,schemeRdYlBu:jb,schemeRdYlGn:Vb,schemeReds:dv,schemeSet1:PE,schemeSet2:DE,schemeSet3:LE,schemeSpectral:Zb,schemeTableau10:EE,schemeYlGn:av,schemeYlGnBu:ov,schemeYlOrBr:sv,schemeYlOrRd:uv,select:V,selectAll:i8,selection:Gn,selector:Ma,selectorAll:Ic,shuffle:KA,shuffler:Eg,some:n5,sort:$c,stack:lC,stackOffsetDiverging:hC,stackOffsetExpand:fC,stackOffsetNone:oi,stackOffsetSilhouette:dC,stackOffsetWiggle:pC,stackOrderAppearance:e2,stackOrderAscending:n2,stackOrderDescending:mC,stackOrderInsideOut:yC,stackOrderNone:ai,stackOrderReverse:bC,stratify:ZP,style:Fn,subset:f5,sum:QA,superset:Cg,svg:d9,symbol:Wk,symbolAsterisk:Tv,symbolCircle:vu,symbolCross:Pv,symbolDiamond:Lv,symbolDiamond2:Ev,symbolPlus:kv,symbolSquare:Cv,symbolSquare2:Iv,symbolStar:Nv,symbolTimes:ph,symbolTriangle:Fv,symbolTriangle2:Gv,symbolWye:zv,symbolX:ph,symbols:Ov,symbolsFill:Ov,symbolsStroke:Yk,text:as,thresholdFreedmanDiaconis:GA,thresholdScott:zA,thresholdSturges:Tc,tickFormat:Fy,tickIncrement:Rn,tickStep:ba,ticks:In,timeDay:ti,timeDays:HD,get timeFormat(){return rh},timeFormatDefaultLocale:Cb,timeFormatLocale:yb,timeFriday:ib,timeFridays:QD,timeHour:ru,timeHours:YD,timeInterval:Tt,timeMillisecond:Jr,timeMilliseconds:Jy,timeMinute:eu,timeMinutes:UD,timeMonday:To,timeMondays:jD,timeMonth:ou,timeMonths:aL,get timeParse(){return kb},timeSaturday:ob,timeSaturdays:JD,timeSecond:an,timeSeconds:eb,timeSunday:ei,timeSundays:ab,timeThursday:rr,timeThursdays:KD,timeTickInterval:mb,timeTicks:gb,timeTuesday:nb,timeTuesdays:VD,timeWednesday:rb,timeWednesdays:ZD,timeWeek:ei,timeWeeks:ab,timeYear:Oe,timeYears:uL,timeout:nl,timer:Xa,timerFlush:B0,transition:j0,transpose:kg,tree:rD,treemap:Py,treemapBinary:iD,treemapDice:So,treemapResquarify:aD,treemapSlice:Ks,treemapSliceDice:oD,treemapSquarify:Ff,tsv:s9,tsvFormat:X7,tsvFormatBody:j7,tsvFormatRow:Z7,tsvFormatRows:V7,tsvFormatValue:K7,tsvParse:P1,tsvParseRows:q7,union:h5,unixDay:th,unixDays:XD,utcDay:Mo,utcDays:qD,get utcFormat(){return su},utcFriday:cb,utcFridays:iL,utcHour:iu,utcHours:WD,utcMillisecond:Jr,utcMilliseconds:Jy,utcMinute:nu,utcMinutes:BD,utcMonday:Po,utcMondays:tL,utcMonth:au,utcMonths:sL,get utcParse(){return ih},utcSaturday:lb,utcSaturdays:oL,utcSecond:an,utcSeconds:eb,utcSunday:ni,utcSundays:fb,utcThursday:or,utcThursdays:rL,utcTickInterval:pb,utcTicks:db,utcTuesday:sb,utcTuesdays:eL,utcWednesday:ub,utcWednesdays:nL,utcWeek:ni,utcWeeks:fb,utcYear:Ue,utcYears:cL,variance:pg,window:Nc,xml:f9,zip:t5,zoom:a2,zoomIdentity:Mu,zoomTransform:i2},Symbol.toStringTag,{value:"Module"}));function s2(t){try{return t.node().getBBox()}catch(e){throw new Error(e)}}function AC(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 ar(t){return t.substring(0,4)!=="ease"?ji:_h[t]??ji}function Tu({axisWidth:t,innerRadius:e,outerRadius:n,padAngle:r,cornerRadius:i}){const o=qf().domain([0,1]).range([0,t/2]),a=o(n);return yv().innerRadius(o(e)).outerRadius(a).padAngle(r).padRadius(a).cornerRadius(i)}const wh=(t,e)=>e instanceof Function?e(t):eo(e)(t);function u2(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 MC(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 TC(t){const e=t.filter(n=>n.value!=null&&n.visible!=!1).map(n=>n.value);return MC(e)}function Et(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 $h({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 ot(t,e,n){const r=n?`--${n}`:"";return`orbcharts-${t}__${e}${r}`}function $n(t,e){const r=Math.random().toString(36).substr(2,5);return ot(t,e,r)}const si=({selection:t,pluginName:e,clipPathID:n,existSeriesLabels$:r,gridContainer$:i,gridAxesTransform$:o,gridGraphicTransform$:a})=>{const s=ot(e,"series"),u=ot(e,"axes"),c=ot(e,"graphic"),l=r.pipe(U((p,g)=>t.selectAll(`g.${s}`).data(p,m=>m).join(m=>m.append("g").classed(s,!0).each((y,v,x)=>{V(x[v]).selectAll(`g.${u}`).data([v]).join(b=>b.append("g").classed(u,!0).attr("clip-path",`url(#${n})`).each((w,$,A)=>{V(A[$]).selectAll("defs").data([$]).join("defs"),V(A[$]).selectAll("g").data([$]).join("g").classed(c,!0)}),b=>b,b=>b.remove())}),m=>m,m=>m.remove())),B(p=>H({seriesSelection:li(p),gridContainer:i})),U(p=>(p.seriesSelection.transition().attr("transform",(g,m)=>{const y=p.gridContainer[m]??p.gridContainer[0],v=y.translate,x=y.scale;return`translate(${v[0]}, ${v[1]}) scale(${x[0]}, ${x[1]})`}),p.seriesSelection)),Ye(1)),h=H({seriesSelection:l,gridAxesTransform:o}).pipe(B(async p=>p),U(p=>p.seriesSelection.select(`g.${u}`).style("transform",p.gridAxesTransform.value)),Ye(1)),f=h.pipe(U(p=>p.select("defs")),Ye(1)),d=H({axesSelection:h,gridGraphicTransform:a}).pipe(B(async p=>p),U(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}},Sh=({fullDataFormatter$:t,gridAxesSize$:e,computedData$:n,fullChartParams$:r})=>{const i=new rt,o=new lt(a=>{H({dataFormatter:t,computedData:n}).pipe(F(i),B(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(F(i),B(async s=>s)).subscribe(s=>{const u=s.dataFormatter.grid.valueAxis.position==="right"||s.dataFormatter.grid.valueAxis.position==="bottom",c=lA({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 PC(t="curveLinear"){return yu().x(e=>e.axisX).y(e=>e.axisY).curve(_h[t])}function DC(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 LC({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 EC({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?V(o[i]).style("opacity",1):V(o[i]).style("opacity",n.styles.unhighlightedOpacity)})}function kC({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)=>{V(a[o]).selectAll("rect").data([i]).join(s=>{const u=s.append("rect");return u.transition().duration(n).ease(ar(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 c2=(t,{selection:e,computedData$:n,existSeriesLabels$: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 rt,m=$n(t,"clipPath-box"),y=ot(t,"path"),{seriesSelection$:v,axesSelection$:x,defsSelection$:b,graphicGSelection$:w}=si({selection:e,pluginName:t,clipPathID:m,existSeriesLabels$:r,gridContainer$:d,gridAxesTransform$:c,gridGraphicTransform$:l}),$=new lt(P=>{const D=a.pipe(F(g)).subscribe(C=>{if(!C)return;const S=PC(C.lineCurve);P.next(S)});return()=>{D.unsubscribe()}}),A=new lt(P=>{n.pipe(F(g),B(async D=>D)).subscribe(D=>{const C=D[0]&&D[0][0]?D.map(S=>S[0].seriesLabel):[];P.next(C)})}),_=u.pipe(U(P=>P.transitionDuration),ft()),L=u.pipe(U(P=>P.transitionEase),ft());H({defsSelection:b,seriesLabels:A,axisSize:h,transitionDuration:_,transitionEase:L}).pipe(F(g),B(async P=>P)).subscribe(P=>{const C=[{id:m,width:P.axisSize.width,height:P.axisSize.height}].concat(P.seriesLabels.map(S=>({id:`orbcharts__clipPath_${S}`,width:P.axisSize.width,height:P.axisSize.height})));kC({defsSelection:P.defsSelection,clipPathData:C,transitionDuration:P.transitionDuration,transitionEase:P.transitionEase})});const E=n.pipe(U(P=>{const D=new Map;return P.flat().forEach(C=>D.set(C.id,C)),D})),T=Sh({fullDataFormatter$:s,gridAxesSize$:h,computedData$:n,fullChartParams$:u}),I=u.pipe(F(g),U(P=>P.highlightTarget),ft());return H({graphicGSelection:w,seriesLabels:A,computedData:n,SeriesDataMap:i,GroupDataMap:o,linePath:$,params:a,highlightTarget:I,gridGroupPositionFn:T}).pipe(F(g),B(async P=>P)).subscribe(P=>{P.graphicGSelection.each((D,C,S)=>{const R=DC(P.computedData[C]??[]);LC({selection:V(S[C]),pathClassName:y,linePath:P.linePath,segmentData:R,params:P.params}).on("mouseover",(M,N)=>{M.stopPropagation();const z=N[0]?N[0].seriesLabel:"",{groupIndex:k,groupLabel:Y}=P.gridGroupPositionFn(M),X=P.GroupDataMap.get(Y).find(Q=>Q.seriesLabel===z)??N[0];p.next({type:"grid",eventName:"mouseover",pluginName:t,highlightTarget:P.highlightTarget,datum:X,gridIndex:X.gridIndex,series:P.SeriesDataMap.get(X.seriesLabel),seriesIndex:X.seriesIndex,seriesLabel:X.seriesLabel,groups:P.GroupDataMap.get(X.groupLabel),groupIndex:X.groupIndex,groupLabel:X.groupLabel,event:M,data:P.computedData})}).on("mousemove",(M,N)=>{M.stopPropagation();const z=N[0]?N[0].seriesLabel:"",{groupIndex:k,groupLabel:Y}=P.gridGroupPositionFn(M),X=P.GroupDataMap.get(Y).find(Q=>Q.seriesLabel===z)??N[0];p.next({type:"grid",eventName:"mousemove",pluginName:t,highlightTarget:P.highlightTarget,datum:X,gridIndex:X.gridIndex,series:P.SeriesDataMap.get(X.seriesLabel),seriesIndex:X.seriesIndex,seriesLabel:X.seriesLabel,groups:P.GroupDataMap.get(X.groupLabel),groupIndex:X.groupIndex,groupLabel:X.groupLabel,event:M,data:P.computedData})}).on("mouseout",(M,N)=>{M.stopPropagation();const z=N[0]?N[0].seriesLabel:"",{groupIndex:k,groupLabel:Y}=P.gridGroupPositionFn(M),X=P.GroupDataMap.get(Y).find(Q=>Q.seriesLabel===z)??N[0];p.next({type:"grid",eventName:"mouseout",pluginName:t,highlightTarget:P.highlightTarget,datum:X,gridIndex:X.gridIndex,series:P.SeriesDataMap.get(X.seriesLabel),seriesIndex:X.seriesIndex,seriesLabel:X.seriesLabel,groups:P.GroupDataMap.get(X.groupLabel),groupIndex:X.groupIndex,groupLabel:X.groupLabel,event:M,data:P.computedData})}).on("click",(M,N)=>{M.stopPropagation();const z=N[0]?N[0].seriesLabel:"",{groupIndex:k,groupLabel:Y}=P.gridGroupPositionFn(M),X=P.GroupDataMap.get(Y).find(Q=>Q.seriesLabel===z)??N[0];p.next({type:"grid",eventName:"click",pluginName:t,highlightTarget:P.highlightTarget,datum:X,gridIndex:X.gridIndex,series:P.SeriesDataMap.get(X.seriesLabel),seriesIndex:X.seriesIndex,seriesLabel:X.seriesLabel,groups:P.GroupDataMap.get(X.groupLabel),groupIndex:X.groupIndex,groupLabel:X.groupLabel,event:M,data:P.computedData})})})}),u.pipe(F(g),fi(P=>P.highlightTarget==="series"),B(P=>H({graphicGSelection:w,highlight:f,DataMap:E,fullChartParams:u}).pipe(F(g),B(async D=>D)))).subscribe(P=>{const D=P.DataMap.get(P.highlight[0]);EC({selection:P.graphicGSelection,seriesLabel:D&&D.seriesLabel?D.seriesLabel:null,fullChartParams:P.fullChartParams})}),()=>{g.next(void 0)}},l2="Lines",CC=ae(l2,cr)(({selection:t,name:e,observer:n,subject:r})=>{const i=new rt,o=c2(l2,{selection:t,computedData$:n.computedData$,existSeriesLabels$:n.existSeriesLabels$,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()}});function IC(t="curveLinear",e){return lh().x(n=>n.axisX).y0(n=>e).y1(n=>n.axisY).curve(_h[t])}function RC(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 NC({selection:t,pathClassName:e,segmentData:n,areaPath:r,linearGradientIds:i,params:o}){return t.selectAll("path").data(n,(s,u)=>s.length?`${s[0].id}_${s[s.length-1].id}`:u).join(s=>s.append("path").classed(e,!0).attr("fill","none").style("vector-effect","non-scaling-stroke").style("cursor","pointer"),s=>s,s=>s.remove()).attr("fill",(s,u)=>s[0]?`url(#${i[s[0].seriesIndex]})`:"").attr("d",s=>r(s))}function FC({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?V(o[i]).style("opacity",1):V(o[i]).style("opacity",n.styles.unhighlightedOpacity)})}function GC({defsSelection:t,computedData:e,linearGradientIds:n,params:r}){t.selectAll("linearGradient").data(e??[]).join(i=>i.append("linearGradient").attr("x1","0%").attr("x2","0%").attr("y1","100%").attr("y2","0%").attr("spreadMethod","pad"),i=>i,i=>i.remove()).attr("id",(i,o)=>i[0]?n[i[0].seriesIndex]:"").html((i,o)=>{const a=i[0]?i[0].color:"";return`
9
+ `)}function c(h){return h.map(l).join(t)}function l(h){return h==null?"":h instanceof Date?q7(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=as(","),P1=Vn.parse,j7=Vn.parseRows,X7=Vn.format,V7=Vn.formatBody,Z7=Vn.formatRows,K7=Vn.formatRow,Q7=Vn.formatValue,Zn=as(" "),D1=Zn.parse,J7=Zn.parseRows,t9=Zn.format,e9=Zn.formatBody,n9=Zn.formatRows,r9=Zn.formatRow,i9=Zn.formatValue;function o9(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})?)?$/))a9&&i[4]&&!i[7]&&(n=n.replace(/-/g,"/").replace(/T/," ")),n=new Date(n);else continue;t[e]=n}return t}const a9=new Date("2019-01-01T00:00").getHours()||new Date("2019-07-01T00:00").getHours();function s9(t){if(!t.ok)throw new Error(t.status+" "+t.statusText);return t.blob()}function u9(t,e){return fetch(t,e).then(s9)}function c9(t){if(!t.ok)throw new Error(t.status+" "+t.statusText);return t.arrayBuffer()}function l9(t,e){return fetch(t,e).then(c9)}function f9(t){if(!t.ok)throw new Error(t.status+" "+t.statusText);return t.text()}function ss(t,e){return fetch(t,e).then(f9)}function L1(t){return function(e,n,r){return arguments.length===2&&typeof n=="function"&&(r=n,n=void 0),ss(e,n).then(function(i){return t(i,r)})}}function h9(t,e,n,r){arguments.length===3&&typeof n=="function"&&(r=n,n=void 0);var i=as(t);return ss(e,n).then(function(o){return i.parse(o,r)})}var d9=L1(P1),p9=L1(D1);function g9(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 m9(t){if(!t.ok)throw new Error(t.status+" "+t.statusText);if(!(t.status===204||t.status===205))return t.json()}function y9(t,e){return fetch(t,e).then(m9)}function Nl(t){return(e,n)=>ss(e,n).then(r=>new DOMParser().parseFromString(r,t))}const b9=Nl("application/xml");var v9=Nl("text/html"),x9=Nl("image/svg+xml");function _9(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 w9(t){const e=+this._x.call(null,t),n=+this._y.call(null,t);return E1(this.cover(e,n),e,n,t)}function E1(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 $9(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)E1(this,a[n],s[n],t[n]);return this}function S9(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 A9(){var t=[];return this.visit(function(e){if(!e.length)do t.push(e.data);while(e=e.next)}),t}function M9(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 Wt(t,e,n,r,i){this.node=t,this.x0=e,this.y0=n,this.x1=r,this.y1=i}function T9(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 Wt(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 Wt(d[3],m,y,u,c),new Wt(d[2],a,y,m,c),new Wt(d[1],m,s,u,y),new Wt(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 P9(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 D9(t){for(var e=0,n=t.length;e<n;++e)this.remove(t[e]);return this}function L9(){return this._root}function E9(){var t=0;return this.visit(function(e){if(!e.length)do++t;while(e=e.next)}),t}function k9(t){var e=[],n,r=this._root,i,o,a,s,u;for(r&&e.push(new Wt(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 Wt(i,c,l,s,u)),(i=r[2])&&e.push(new Wt(i,o,l,c,u)),(i=r[1])&&e.push(new Wt(i,c,a,s,l)),(i=r[0])&&e.push(new Wt(i,o,a,c,l))}return this}function C9(t){var e=[],n=[],r;for(this._root&&e.push(new Wt(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 Wt(o,a,s,l,h)),(o=i[1])&&e.push(new Wt(o,l,s,u,h)),(o=i[2])&&e.push(new Wt(o,a,h,l,c)),(o=i[3])&&e.push(new Wt(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 I9(t){return t[0]}function R9(t){return arguments.length?(this._x=t,this):this._x}function N9(t){return t[1]}function F9(t){return arguments.length?(this._y=t,this):this._y}function us(t,e,n){var r=new Fl(e??I9,n??N9,NaN,NaN,NaN,NaN);return t==null?r:r.addAll(t)}function Fl(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 k1(t){for(var e={data:t.data},n=e;t=t.next;)n=n.next={data:t.data};return e}var qt=us.prototype=Fl.prototype;qt.copy=function(){var t=new Fl(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=k1(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]=k1(r));return t},qt.add=w9,qt.addAll=$9,qt.cover=S9,qt.data=A9,qt.extent=M9,qt.find=T9,qt.remove=P9,qt.removeAll=D9,qt.root=L9,qt.size=E9,qt.visit=k9,qt.visitAfter=C9,qt.x=R9,qt.y=F9;function Lt(t){return function(){return t}}function bn(t){return(t()-.5)*1e-6}function G9(t){return t.x+t.vx}function z9(t){return t.y+t.vy}function C1(t){var e,n,r,i=1,o=1;typeof t!="function"&&(t=Lt(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=us(e,G9,z9).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 k=v.data,$=v.r,E=g+$;if(k){if(k.index>f.index){var A=d-k.x-k.vx,I=p-k.y-k.vy,D=A*A+I*I;D<E*E&&(A===0&&(A=bn(r),D+=A*A),I===0&&(I=bn(r),D+=I*I),D=(E-(D=Math.sqrt(D)))/D*i,f.vx+=(A*=D)*(E=($*=$)/(m+$)),f.vy+=(I*=D)*E,k.vx-=A*(E=1-E),k.vy-=I*E)}return}return b>d+E||w<d-E||_>p+E||S<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:Lt(+c),u(),a):t},a}function O9(t){return t.index}function I1(t,e){var n=t.get(e);if(!n)throw new Error("node not found: "+e);return n}function U9(t){var e=O9,n=h,r,i=Lt(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,k,$,E;v<x;++v)b=t[v],_=b.source,w=b.target,S=w.x+w.vx-_.x-_.vx||bn(c),k=w.y+w.vy-_.y-_.vy||bn(c),$=Math.sqrt(S*S+k*k),$=($-o[v])/$*m*r[v],S*=$,k*=$,w.vx-=S*(E=u[v]),w.vy-=k*E,_.vx+=S*(E=1-E),_.vy+=k*E}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=I1(v,b.source)),typeof b.target!="object"&&(b.target=I1(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:Lt(+m),p(),f):n},f.distance=function(m){return arguments.length?(i=typeof m=="function"?m:Lt(+m),g(),f):i},f}const B9=1664525,Y9=1013904223,R1=4294967296;function H9(){let t=1;return()=>(t=(B9*t+Y9)%R1)/R1}function W9(t){return t.x}function q9(t){return t.y}var j9=10,X9=Math.PI*(3-Math.sqrt(5));function N1(t){var e,n=1,r=.001,i=1-Math.pow(r,1/300),o=0,a=.6,s=new Map,u=Xa(h),c=Nn("tick","end"),l=H9();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=j9*Math.sqrt(.5+g),v=g*X9;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,k;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&&(k=S,y=w);return k},on:function(g,m){return arguments.length>1?(c.on(g,m),e):c.on(g)}}}function F1(){var t,e,n,r,i=Lt(-30),o,a=1,s=1/0,u=.81;function c(d){var p,g=t.length,m=us(t,W9,q9).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=bn(n),b+=y*y),x===0&&(x=bn(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=bn(n),b+=y*y),x===0&&(x=bn(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:Lt(+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 V9(t,e,n){var r,i=Lt(.1),o,a;typeof t!="function"&&(t=Lt(+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:Lt(+c),u(),s):i},s.radius=function(c){return arguments.length?(t=typeof c=="function"?c:Lt(+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 G1(t){var e=Lt(.1),n,r,i;typeof t!="function"&&(t=Lt(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:Lt(+s),a(),o):e},o.x=function(s){return arguments.length?(t=typeof s=="function"?s:Lt(+s),a(),o):t},o}function z1(t){var e=Lt(.1),n,r,i;typeof t!="function"&&(t=Lt(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:Lt(+s),a(),o):e},o.y=function(s){return arguments.length?(t=typeof s=="function"?s:Lt(+s),a(),o):t},o}function Z9(t){return Math.abs(t=Math.round(t))>=1e21?t.toLocaleString("en").replace(/,/g,""):t.toString(10)}function cs(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 Hr(t){return t=cs(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 Q9(t){return function(e){return e.replace(/[0-9]/g,function(n){return t[+n]})}}var J9=/^(?:(.)?([<>=^]))?([+\-( ])?([$#])?(0)?(\d+)?(,)?(\.\d+)?(~)?([a-z%])?$/i;function Wr(t){if(!(e=J9.exec(t)))throw new Error("invalid format: "+t);var e;return new ls({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]})}Wr.prototype=ls.prototype;function ls(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+""}ls.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 tT(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 O1;function eT(t,e){var n=cs(t,e);if(!n)return t+"";var r=n[0],i=n[1],o=i-(O1=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")+cs(t,Math.max(0,e+o-1))[0]}function U1(t,e){var n=cs(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 B1={"%":(t,e)=>(t*100).toFixed(e),b:t=>Math.round(t).toString(2),c:t=>t+"",d:Z9,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)=>U1(t*100,e),r:U1,s:eT,X:t=>Math.round(t).toString(16).toUpperCase(),x:t=>Math.round(t).toString(16)};function Y1(t){return t}var H1=Array.prototype.map,W1=["y","z","a","f","p","n","µ","m","","k","M","G","T","P","E","Z","Y"];function q1(t){var e=t.grouping===void 0||t.thousands===void 0?Y1:K9(H1.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?Y1:Q9(H1.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=Wr(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"):B1[_]||(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:"",k=B1[_],$=/[defgprs%]/.test(_);v=v===void 0?6:/[gprs]/.test(_)?Math.max(1,Math.min(21,v)):Math.max(0,Math.min(20,v));function E(A){var I=w,D=S,T,C,P;if(_==="c")D=k(A)+D,A="";else{A=+A;var R=A<0||1/A<0;if(A=isNaN(A)?u:k(Math.abs(A),v),b&&(A=tT(A)),R&&+A==0&&p!=="+"&&(R=!1),I=(R?p==="("?p:s:p==="-"||p==="("?"":p)+I,D=(_==="s"?W1[8+O1/3]:"")+D+(R&&p==="("?")":""),$){for(T=-1,C=A.length;++T<C;)if(P=A.charCodeAt(T),48>P||P>57){D=(P===46?i+A.slice(T+1):A.slice(T))+D,A=A.slice(0,T);break}}}x&&!m&&(A=e(A,1/0));var G=I.length+A.length+D.length,M=G<y?new Array(y-G+1).join(f):"";switch(x&&m&&(A=e(M+A,M.length?y-D.length:1/0),M=""),d){case"<":A=I+A+D+M;break;case"=":A=I+M+A+D;break;case"^":A=M.slice(0,G=M.length>>1)+I+A+D+M.slice(G);break;default:A=M+I+A+D;break}return o(A)}return E.toString=function(){return h+""},E}function l(h,f){var d=c((h=Wr(h),h.type="f",h)),p=Math.max(-8,Math.min(8,Math.floor(Hr(f)/3)))*3,g=Math.pow(10,-p),m=W1[8+p/3];return function(y){return d(g*y)+m}}return{format:c,formatPrefix:l}}var fs,eo,Gl;j1({thousands:",",grouping:[3],currency:["$",""]});function j1(t){return fs=q1(t),eo=fs.format,Gl=fs.formatPrefix,fs}function X1(t){return Math.max(0,-Hr(Math.abs(t)))}function V1(t,e){return Math.max(0,Math.max(-8,Math.min(8,Math.floor(Hr(e)/3)))*3-Hr(Math.abs(t)))}function Z1(t,e){return t=Math.abs(t),e=Math.abs(e)-t,Math.max(0,Hr(e)-Hr(t))+1}var et=1e-6,no=1e-12,ht=Math.PI,St=ht/2,hs=ht/4,jt=ht*2,yt=180/ht,rt=ht/180,dt=Math.abs,qr=Math.atan,Xt=Math.atan2,J=Math.cos,ds=Math.ceil,K1=Math.exp,zl=Math.hypot,ps=Math.log,Ol=Math.pow,K=Math.sin,de=Math.sign||function(t){return t>0?1:t<0?-1:0},It=Math.sqrt,Ul=Math.tan;function Q1(t){return t>1?0:t<-1?ht:Math.acos(t)}function Vt(t){return t>1?St:t<-1?-St:Math.asin(t)}function J1(t){return(t=K(t/2))*t}function wt(){}function gs(t,e){t&&em.hasOwnProperty(t.type)&&em[t.type](t,e)}var tm={Feature:function(t,e){gs(t.geometry,e)},FeatureCollection:function(t,e){for(var n=t.features,r=-1,i=n.length;++r<i;)gs(n[r].geometry,e)}},em={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){Bl(t.coordinates,e,0)},MultiLineString:function(t,e){for(var n=t.coordinates,r=-1,i=n.length;++r<i;)Bl(n[r],e,0)},Polygon:function(t,e){nm(t.coordinates,e)},MultiPolygon:function(t,e){for(var n=t.coordinates,r=-1,i=n.length;++r<i;)nm(n[r],e)},GeometryCollection:function(t,e){for(var n=t.geometries,r=-1,i=n.length;++r<i;)gs(n[r],e)}};function Bl(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 nm(t,e){var n=-1,r=t.length;for(e.polygonStart();++n<r;)Bl(t[n],e,1);e.polygonEnd()}function Pe(t,e){t&&tm.hasOwnProperty(t.type)?tm[t.type](t,e):gs(t,e)}var ms=new Dt,ys=new Dt,rm,im,Yl,Hl,Wl,Ge={point:wt,lineStart:wt,lineEnd:wt,polygonStart:function(){ms=new Dt,Ge.lineStart=nT,Ge.lineEnd=rT},polygonEnd:function(){var t=+ms;ys.add(t<0?jt+t:t),this.lineStart=this.lineEnd=this.point=wt},sphere:function(){ys.add(jt)}};function nT(){Ge.point=iT}function rT(){om(rm,im)}function iT(t,e){Ge.point=om,rm=t,im=e,t*=rt,e*=rt,Yl=t,Hl=J(e=e/2+hs),Wl=K(e)}function om(t,e){t*=rt,e*=rt,e=e/2+hs;var n=t-Yl,r=n>=0?1:-1,i=r*n,o=J(e),a=K(e),s=Wl*a,u=Hl*o+s*J(i),c=s*r*K(i);ms.add(Xt(c,u)),Yl=t,Hl=o,Wl=a}function oT(t){return ys=new Dt,Pe(t,Ge),ys*2}function bs(t){return[Xt(t[1],t[0]),Vt(t[2])]}function Kn(t){var e=t[0],n=t[1],r=J(n);return[r*J(e),r*K(e),K(n)]}function vs(t,e){return t[0]*e[0]+t[1]*e[1]+t[2]*e[2]}function jr(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 ql(t,e){t[0]+=e[0],t[1]+=e[1],t[2]+=e[2]}function xs(t,e){return[t[0]*e,t[1]*e,t[2]*e]}function _s(t){var e=It(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,ue,Qn,am,sm,Xr,ro,vn,Qe,Je={point:jl,lineStart:cm,lineEnd:lm,polygonStart:function(){Je.point=fm,Je.lineStart=aT,Je.lineEnd=sT,ro=new Dt,Ge.polygonStart()},polygonEnd:function(){Ge.polygonEnd(),Je.point=jl,Je.lineStart=cm,Je.lineEnd=lm,ms<0?($t=-(At=180),re=-(ue=90)):ro>et?ue=90:ro<-et&&(re=-90),Qe[0]=$t,Qe[1]=At},sphere:function(){$t=-(At=180),re=-(ue=90)}};function jl(t,e){vn.push(Qe=[$t=t,At=t]),e<re&&(re=e),e>ue&&(ue=e)}function um(t,e){var n=Kn([t*rt,e*rt]);if(Xr){var r=jr(Xr,n),i=[r[1],-r[0],0],o=jr(i,r);_s(o),o=bs(o);var a=t-Qn,s=a>0?1:-1,u=o[0]*yt*s,c,l=dt(a)>180;l^(s*Qn<u&&u<s*t)?(c=o[1]*yt,c>ue&&(ue=c)):(u=(u+360)%360-180,l^(s*Qn<u&&u<s*t)?(c=-o[1]*yt,c<re&&(re=c)):(e<re&&(re=e),e>ue&&(ue=e))),l?t<Qn?ce($t,t)>ce($t,At)&&(At=t):ce(t,At)>ce($t,At)&&($t=t):At>=$t?(t<$t&&($t=t),t>At&&(At=t)):t>Qn?ce($t,t)>ce($t,At)&&(At=t):ce(t,At)>ce($t,At)&&($t=t)}else vn.push(Qe=[$t=t,At=t]);e<re&&(re=e),e>ue&&(ue=e),Xr=n,Qn=t}function cm(){Je.point=um}function lm(){Qe[0]=$t,Qe[1]=At,Je.point=jl,Xr=null}function fm(t,e){if(Xr){var n=t-Qn;ro.add(dt(n)>180?n+(n>0?360:-360):n)}else am=t,sm=e;Ge.point(t,e),um(t,e)}function aT(){Ge.lineStart()}function sT(){fm(am,sm),Ge.lineEnd(),dt(ro)>et&&($t=-(At=180)),Qe[0]=$t,Qe[1]=At,Xr=null}function ce(t,e){return(e-=t)<0?e+360:e}function uT(t,e){return t[0]-e[0]}function hm(t,e){return t[0]<=t[1]?t[0]<=e&&e<=t[1]:e<t[0]||t[1]<e}function cT(t){var e,n,r,i,o,a,s;if(ue=At=-($t=re=1/0),vn=[],Pe(t,Je),n=vn.length){for(vn.sort(uT),e=1,r=vn[0],o=[r];e<n;++e)i=vn[e],hm(r,i[0])||hm(r,i[1])?(ce(r[0],i[1])>ce(r[0],r[1])&&(r[1]=i[1]),ce(i[0],r[1])>ce(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=ce(r[1],i[0]))>a&&(a=s,$t=i[0],At=r[1])}return vn=Qe=null,$t===1/0||re===1/0?[[NaN,NaN],[NaN,NaN]]:[[$t,re],[At,ue]]}var io,ws,$s,Ss,As,Ms,Ts,Ps,Xl,Vl,Zl,dm,pm,Zt,Kt,Qt,De={sphere:wt,point:Kl,lineStart:gm,lineEnd:mm,polygonStart:function(){De.lineStart=hT,De.lineEnd=dT},polygonEnd:function(){De.lineStart=gm,De.lineEnd=mm}};function Kl(t,e){t*=rt,e*=rt;var n=J(e);oo(n*J(t),n*K(t),K(e))}function oo(t,e,n){++io,$s+=(t-$s)/io,Ss+=(e-Ss)/io,As+=(n-As)/io}function gm(){De.point=lT}function lT(t,e){t*=rt,e*=rt;var n=J(e);Zt=n*J(t),Kt=n*K(t),Qt=K(e),De.point=fT,oo(Zt,Kt,Qt)}function fT(t,e){t*=rt,e*=rt;var n=J(e),r=n*J(t),i=n*K(t),o=K(e),a=Xt(It((a=Kt*o-Qt*i)*a+(a=Qt*r-Zt*o)*a+(a=Zt*i-Kt*r)*a),Zt*r+Kt*i+Qt*o);ws+=a,Ms+=a*(Zt+(Zt=r)),Ts+=a*(Kt+(Kt=i)),Ps+=a*(Qt+(Qt=o)),oo(Zt,Kt,Qt)}function mm(){De.point=Kl}function hT(){De.point=pT}function dT(){ym(dm,pm),De.point=Kl}function pT(t,e){dm=t,pm=e,t*=rt,e*=rt,De.point=ym;var n=J(e);Zt=n*J(t),Kt=n*K(t),Qt=K(e),oo(Zt,Kt,Qt)}function ym(t,e){t*=rt,e*=rt;var n=J(e),r=n*J(t),i=n*K(t),o=K(e),a=Kt*o-Qt*i,s=Qt*r-Zt*o,u=Zt*i-Kt*r,c=zl(a,s,u),l=Vt(c),h=c&&-l/c;Xl.add(h*a),Vl.add(h*s),Zl.add(h*u),ws+=l,Ms+=l*(Zt+(Zt=r)),Ts+=l*(Kt+(Kt=i)),Ps+=l*(Qt+(Qt=o)),oo(Zt,Kt,Qt)}function gT(t){io=ws=$s=Ss=As=Ms=Ts=Ps=0,Xl=new Dt,Vl=new Dt,Zl=new Dt,Pe(t,De);var e=+Xl,n=+Vl,r=+Zl,i=zl(e,n,r);return i<no&&(e=Ms,n=Ts,r=Ps,ws<et&&(e=$s,n=Ss,r=As),i=zl(e,n,r),i<no)?[NaN,NaN]:[Xt(n,e)*yt,Vt(r/i)*yt]}function Vr(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 Jl(t,e){return dt(t)>ht&&(t-=Math.round(t/jt)*jt),[t,e]}Jl.invert=Jl;function tf(t,e,n){return(t%=jt)?e||n?Ql(vm(t),xm(e,n)):vm(t):e||n?xm(e,n):Jl}function bm(t){return function(e,n){return e+=t,dt(e)>ht&&(e-=Math.round(e/jt)*jt),[e,n]}}function vm(t){var e=bm(t);return e.invert=bm(-t),e}function xm(t,e){var n=J(t),r=K(t),i=J(e),o=K(e);function a(s,u){var c=J(u),l=J(s)*c,h=K(s)*c,f=K(u),d=f*n+l*r;return[Xt(h*i-d*o,l*n-f*r),Vt(d*i+h*o)]}return a.invert=function(s,u){var c=J(u),l=J(s)*c,h=K(s)*c,f=K(u),d=f*i-h*o;return[Xt(h*i+f*o,l*n+d*r),Vt(d*n-l*r)]},a}function _m(t){t=tf(t[0]*rt,t[1]*rt,t.length>2?t[2]*rt:0);function e(n){return n=t(n[0]*rt,n[1]*rt),n[0]*=yt,n[1]*=yt,n}return e.invert=function(n){return n=t.invert(n[0]*rt,n[1]*rt),n[0]*=yt,n[1]*=yt,n},e}function wm(t,e,n,r,i,o){if(n){var a=J(e),s=K(e),u=r*n;i==null?(i=e+r*jt,o=e-u/2):(i=$m(a,i),o=$m(a,o),(r>0?i<o:i>o)&&(i+=r*jt));for(var c,l=i;r>0?l>o:l<o;l-=u)c=bs([a,-s*J(l),-s*K(l)]),t.point(c[0],c[1])}}function $m(t,e){e=Kn(e),e[0]-=t,_s(e);var n=Q1(-e[1]);return((-e[2]<0?-n:n)+jt-et)%jt}function mT(){var t=Vr([0,0]),e=Vr(90),n=Vr(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)*rt,l=n.apply(this,arguments)*rt;return r=[],i=tf(-u[0]*rt,-u[1]*rt,0).invert,wm(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:Vr([+u[0],+u[1]]),s):t},s.radius=function(u){return arguments.length?(e=typeof u=="function"?u:Vr(+u),s):e},s.precision=function(u){return arguments.length?(n=typeof u=="function"?u:Vr(+u),s):n},s}function Sm(){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 Ds(t,e){return dt(t[0]-e[0])<et&&dt(t[1]-e[1])<et}function Ls(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 Am(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(Ds(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*et}o.push(x=new Ls(m,p,null,!0)),a.push(x.o=new Ls(m,null,x,!1)),o.push(x=new Ls(y,p,null,!1)),a.push(x.o=new Ls(y,null,x,!0))}}),!!o.length){for(a.sort(e),Mm(o),Mm(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 Mm(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 ef(t){return dt(t[0])<=ht?t[0]:de(t[0])*((dt(t[0])+ht)%jt-ht)}function Tm(t,e){var n=ef(e),r=e[1],i=K(r),o=[K(n),-J(n),0],a=0,s=0,u=new Dt;i===1?r=St+et:i===-1&&(r=-St-et);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=ef(d),g=d[1]/2+hs,m=K(g),y=J(g),x=0;x<f;++x,p=b,m=w,y=S,d=v){var v=h[x],b=ef(v),_=v[1]/2+hs,w=K(_),S=J(_),k=b-p,$=k>=0?1:-1,E=$*k,A=E>ht,I=m*w;if(u.add(Xt(I*$*K(E),y*S+I*J(E))),a+=A?k+$*jt:k,A^p>=n^b>=n){var D=jr(Kn(d),Kn(v));_s(D);var T=jr(o,D);_s(T);var C=(A^k>=0?-1:1)*Vt(T[2]);(r>C||r===C&&(D[0]||D[1]))&&(s+=A^k>=0?1:-1)}}return(a<-et||a<et&&u<-no)^s&1}function Pm(t,e,n,r){return function(i){var o=e(i),a=Sm(),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=kc(l);var b=Tm(c,r);l.length?(u||(i.polygonStart(),u=!0),Am(l,bT,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,k,$,E;if(h.pop(),c.push(h),h=null,!!S){if(b&1){if($=_[0],(k=$.length-1)>0){for(u||(i.polygonStart(),u=!0),i.lineStart(),w=0;w<k;++w)i.point((E=$[w])[0],E[1]);i.lineEnd()}return}S>1&&b&2&&_.push(_.pop().concat(_.shift())),l.push(_.filter(yT))}}return f}}function yT(t){return t.length>1}function bT(t,e){return((t=t.x)[0]<0?t[1]-St-et:St-t[1])-((e=e.x)[0]<0?e[1]-St-et:St-e[1])}const nf=Pm(function(){return!0},vT,_T,[-ht,-St]);function vT(t){var e=NaN,n=NaN,r=NaN,i;return{lineStart:function(){t.lineStart(),i=1},point:function(o,a){var s=o>0?ht:-ht,u=dt(o-e);dt(u-ht)<et?(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>=ht&&(dt(e-r)<et&&(e-=r*et),dt(o-s)<et&&(o-=s*et),n=xT(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 xT(t,e,n,r){var i,o,a=K(t-n);return dt(a)>et?qr((K(e)*(o=J(r))*K(n)-K(r)*(i=J(e))*K(t))/(i*o*a)):(e+r)/2}function _T(t,e,n,r){var i;if(t==null)i=n*St,r.point(-ht,i),r.point(0,i),r.point(ht,i),r.point(ht,0),r.point(ht,-i),r.point(0,-i),r.point(-ht,-i),r.point(-ht,0),r.point(-ht,i);else if(dt(t[0]-e[0])>et){var o=t[0]<e[0]?ht:-ht;i=n*o/2,r.point(-o,i),r.point(0,i),r.point(o,i)}else r.point(e[0],e[1])}function Dm(t){var e=J(t),n=2*rt,r=e>0,i=dt(e)>et;function o(l,h,f,d){wm(d,t,n,f,l,h)}function a(l,h){return J(l)*J(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?ht:-ht),y):0;if(!h&&(p=d=b)&&l.lineStart(),b!==d&&(v=u(h,x),(!v||Ds(h,v)||Ds(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||!Ds(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=Kn(l),p=Kn(h),g=[1,0,0],m=jr(d,p),y=vs(m,m),x=m[0],v=y-x*x;if(!v)return!f&&l;var b=e*y/v,_=-e*x/v,w=jr(g,m),S=xs(g,b),k=xs(m,_);ql(S,k);var $=w,E=vs(S,$),A=vs($,$),I=E*E-A*(vs(S,S)-1);if(!(I<0)){var D=It(I),T=xs($,(-E-D)/A);if(ql(T,S),T=bs(T),!f)return T;var C=l[0],P=h[0],R=l[1],G=h[1],M;P<C&&(M=C,C=P,P=M);var N=P-C,z=dt(N-ht)<et,L=z||N<et;if(!z&&G<R&&(M=R,R=G,G=M),L?z?R+G>0^T[1]<(dt(T[0]-C)<et?R:G):R<=T[1]&&T[1]<=G:N>ht^(C<=T[0]&&T[0]<=P)){var j=xs($,(-E+D)/A);return ql(j,S),[T,bs(j)]}}}function c(l,h){var f=r?t:ht-t,d=0;return l<-f?d|=1:l>f&&(d|=2),h<-f?d|=4:h>f&&(d|=8),d}return Pm(a,s,o,r?[0,-t]:[-ht,t-ht])}function wT(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 ao=1e9,Es=-ao;function ks(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 dt(c[0]-t)<et?l>0?0:3:dt(c[0]-n)<et?l>0?2:1:dt(c[1]-e)<et?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=Sm(),f,d,p,g,m,y,x,v,b,_,w,S={point:k,lineStart:I,lineEnd:D,polygonStart:E,polygonEnd:A};function k(C,P){i(C,P)&&l.point(C,P)}function $(){for(var C=0,P=0,R=d.length;P<R;++P)for(var G=d[P],M=1,N=G.length,z=G[0],L,j,q=z[0],Y=z[1];M<N;++M)L=q,j=Y,z=G[M],q=z[0],Y=z[1],j<=r?Y>r&&(q-L)*(r-j)>(Y-j)*(t-L)&&++C:Y<=r&&(q-L)*(r-j)<(Y-j)*(t-L)&&--C;return C}function E(){l=h,f=[],d=[],w=!0}function A(){var C=$(),P=w&&C,R=(f=kc(f)).length;(P||R)&&(c.polygonStart(),P&&(c.lineStart(),o(null,null,1,c),c.lineEnd()),R&&Am(f,s,C,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 D(){f&&(T(g,m),y&&b&&h.rejoin(),f.push(h.result())),S.point=k,b&&l.lineEnd()}function T(C,P){var R=i(C,P);if(d&&p.push([C,P]),_)g=C,m=P,y=R,_=!1,R&&(l.lineStart(),l.point(C,P));else if(R&&b)l.point(C,P);else{var G=[x=Math.max(Es,Math.min(ao,x)),v=Math.max(Es,Math.min(ao,v))],M=[C=Math.max(Es,Math.min(ao,C)),P=Math.max(Es,Math.min(ao,P))];wT(G,M,t,e,n,r)?(b||(l.lineStart(),l.point(G[0],G[1])),l.point(M[0],M[1]),R||l.lineEnd(),w=!1):R&&(l.lineStart(),l.point(C,P),w=!1)}x=C,v=P,b=R}return S}}function $T(){var t=0,e=0,n=960,r=500,i,o,a;return a={stream:function(s){return i&&o===s?i:i=ks(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 rf,of,Cs,Is,Zr={sphere:wt,point:wt,lineStart:ST,lineEnd:wt,polygonStart:wt,polygonEnd:wt};function ST(){Zr.point=MT,Zr.lineEnd=AT}function AT(){Zr.point=Zr.lineEnd=wt}function MT(t,e){t*=rt,e*=rt,of=t,Cs=K(e),Is=J(e),Zr.point=TT}function TT(t,e){t*=rt,e*=rt;var n=K(e),r=J(e),i=dt(t-of),o=J(i),a=K(i),s=r*a,u=Is*n-Cs*r*o,c=Cs*n+Is*r*o;rf.add(Xt(It(s*s+u*u),c)),of=t,Cs=n,Is=r}function Lm(t){return rf=new Dt,Pe(t,Zr),+rf}var af=[null,null],PT={type:"LineString",coordinates:af};function Rs(t,e){return af[0]=t,af[1]=e,Lm(PT)}var Em={Feature:function(t,e){return Ns(t.geometry,e)},FeatureCollection:function(t,e){for(var n=t.features,r=-1,i=n.length;++r<i;)if(Ns(n[r].geometry,e))return!0;return!1}},km={Sphere:function(){return!0},Point:function(t,e){return Cm(t.coordinates,e)},MultiPoint:function(t,e){for(var n=t.coordinates,r=-1,i=n.length;++r<i;)if(Cm(n[r],e))return!0;return!1},LineString:function(t,e){return Im(t.coordinates,e)},MultiLineString:function(t,e){for(var n=t.coordinates,r=-1,i=n.length;++r<i;)if(Im(n[r],e))return!0;return!1},Polygon:function(t,e){return Rm(t.coordinates,e)},MultiPolygon:function(t,e){for(var n=t.coordinates,r=-1,i=n.length;++r<i;)if(Rm(n[r],e))return!0;return!1},GeometryCollection:function(t,e){for(var n=t.geometries,r=-1,i=n.length;++r<i;)if(Ns(n[r],e))return!0;return!1}};function Ns(t,e){return t&&km.hasOwnProperty(t.type)?km[t.type](t,e):!1}function Cm(t,e){return Rs(t,e)===0}function Im(t,e){for(var n,r,i,o=0,a=t.length;o<a;o++){if(r=Rs(t[o],e),r===0||o>0&&(i=Rs(t[o],t[o-1]),i>0&&n<=i&&r<=i&&(n+r-i)*(1-Math.pow((n-r)/i,2))<no*i))return!0;n=r}return!1}function Rm(t,e){return!!Tm(t.map(DT),Nm(e))}function DT(t){return t=t.map(Nm),t.pop(),t}function Nm(t){return[t[0]*rt,t[1]*rt]}function LT(t,e){return(t&&Em.hasOwnProperty(t.type)?Em[t.type]:Ns)(t,e)}function Fm(t,e,n){var r=hn(t,e-et,n).concat(e);return function(i){return r.map(function(o){return[i,o]})}}function Gm(t,e,n){var r=hn(t,e-et,n).concat(e);return function(i){return r.map(function(o){return[o,i]})}}function zm(){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 hn(ds(r/l)*l,n,l).map(p).concat(hn(ds(s/h)*h,a,h).map(g)).concat(hn(ds(e/u)*u,t,u).filter(function(v){return dt(v%l)>et}).map(f)).concat(hn(ds(o/c)*c,i,c).filter(function(v){return dt(v%h)>et}).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=Fm(o,i,90),d=Gm(e,t,m),p=Fm(s,a,90),g=Gm(r,n,m),y):m},y.extentMajor([[-180,-90+et],[180,90-et]]).extentMinor([[-180,-80-et],[180,80+et]])}function ET(){return zm()()}function kT(t,e){var n=t[0]*rt,r=t[1]*rt,i=e[0]*rt,o=e[1]*rt,a=J(r),s=K(r),u=J(o),c=K(o),l=a*J(n),h=a*K(n),f=u*J(i),d=u*K(i),p=2*Vt(It(J1(o-r)+a*u*J1(i-n))),g=K(p),m=p?function(y){var x=K(y*=p)/g,v=K(p-y)/g,b=v*l+x*f,_=v*h+x*d,w=v*s+x*c;return[Xt(_,b)*yt,Xt(w,It(b*b+_*_))*yt]}:function(){return[n*yt,r*yt]};return m.distance=p,m}const so=t=>t;var sf=new Dt,uf=new Dt,Om,Um,cf,lf,tn={point:wt,lineStart:wt,lineEnd:wt,polygonStart:function(){tn.lineStart=CT,tn.lineEnd=RT},polygonEnd:function(){tn.lineStart=tn.lineEnd=tn.point=wt,sf.add(dt(uf)),uf=new Dt},result:function(){var t=sf/2;return sf=new Dt,t}};function CT(){tn.point=IT}function IT(t,e){tn.point=Bm,Om=cf=t,Um=lf=e}function Bm(t,e){uf.add(lf*t-cf*e),cf=t,lf=e}function RT(){Bm(Om,Um)}var Kr=1/0,Fs=Kr,uo=-Kr,Gs=uo,zs={point:NT,lineStart:wt,lineEnd:wt,polygonStart:wt,polygonEnd:wt,result:function(){var t=[[Kr,Fs],[uo,Gs]];return uo=Gs=-(Fs=Kr=1/0),t}};function NT(t,e){t<Kr&&(Kr=t),t>uo&&(uo=t),e<Fs&&(Fs=e),e>Gs&&(Gs=e)}var ff=0,hf=0,co=0,Os=0,Us=0,Qr=0,df=0,pf=0,lo=0,Ym,Hm,ze,Oe,pe={point:Jn,lineStart:Wm,lineEnd:qm,polygonStart:function(){pe.lineStart=zT,pe.lineEnd=OT},polygonEnd:function(){pe.point=Jn,pe.lineStart=Wm,pe.lineEnd=qm},result:function(){var t=lo?[df/lo,pf/lo]:Qr?[Os/Qr,Us/Qr]:co?[ff/co,hf/co]:[NaN,NaN];return ff=hf=co=Os=Us=Qr=df=pf=lo=0,t}};function Jn(t,e){ff+=t,hf+=e,++co}function Wm(){pe.point=FT}function FT(t,e){pe.point=GT,Jn(ze=t,Oe=e)}function GT(t,e){var n=t-ze,r=e-Oe,i=It(n*n+r*r);Os+=i*(ze+t)/2,Us+=i*(Oe+e)/2,Qr+=i,Jn(ze=t,Oe=e)}function qm(){pe.point=Jn}function zT(){pe.point=UT}function OT(){jm(Ym,Hm)}function UT(t,e){pe.point=jm,Jn(Ym=ze=t,Hm=Oe=e)}function jm(t,e){var n=t-ze,r=e-Oe,i=It(n*n+r*r);Os+=i*(ze+t)/2,Us+=i*(Oe+e)/2,Qr+=i,i=Oe*t-ze*e,df+=i*(ze+t),pf+=i*(Oe+e),lo+=i*3,Jn(ze=t,Oe=e)}function Xm(t){this._context=t}Xm.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,jt);break}}},result:wt};var gf=new Dt,mf,Vm,Zm,fo,ho,po={point:wt,lineStart:function(){po.point=BT},lineEnd:function(){mf&&Km(Vm,Zm),po.point=wt},polygonStart:function(){mf=!0},polygonEnd:function(){mf=null},result:function(){var t=+gf;return gf=new Dt,t}};function BT(t,e){po.point=Km,Vm=fo=t,Zm=ho=e}function Km(t,e){fo-=t,ho-=e,gf.add(It(fo*fo+ho*ho)),fo=t,ho=e}let Qm,Bs,Jm,ty;class ey{constructor(e){this._append=e==null?ny:YT(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!==Jm||this._append!==Bs){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`,Jm=r,Bs=this._append,ty=this._,this._=i}this._+=ty;break}}}result(){const e=this._;return this._="",e.length?e:null}}function ny(t){let e=1;this._+=t[0];for(const n=t.length;e<n;++e)this._+=arguments[e]+t[e]}function YT(t){const e=Math.floor(t);if(!(e>=0))throw new RangeError(`invalid digits: ${t}`);if(e>15)return ny;if(e!==Qm){const n=10**e;Qm=e,Bs=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 Bs}function HT(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(po)),po.result()},a.bounds=function(s){return Pe(s,i(zs)),zs.result()},a.centroid=function(s){return Pe(s,i(pe)),pe.result()},a.projection=function(s){return arguments.length?(i=s==null?(t=null,so):(t=s).stream,a):t},a.context=function(s){return arguments.length?(o=s==null?(e=null,new ey(n)):new Xm(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 ey(n)),a},a.projection(t).digits(n).context(e)}function WT(t){return{stream:go(t)}}function go(t){return function(e){var n=new yf;for(var r in t)n[r]=t[r];return n.stream=e,n}}function yf(){}yf.prototype={constructor:yf,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 bf(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(zs)),e(zs.result()),r!=null&&t.clipExtent(r),t}function Ys(t,e,n){return bf(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 vf(t,e,n){return Ys(t,[[0,0],e],n)}function xf(t,e,n){return bf(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 _f(t,e,n){return bf(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 ry=16,qT=J(30*rt);function iy(t,e){return+e?XT(t,e):jT(t)}function jT(t){return go({point:function(e,n){e=t(e,n),this.stream.point(e[0],e[1])}})}function XT(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=It(b*b+_*_+w*w),k=Vt(w/=S),$=dt(dt(w)-1)<et||dt(o-h)<et?(o+h)/2:Xt(_,b),E=t($,k),A=E[0],I=E[1],D=A-r,T=I-i,C=x*D-y*T;(C*C/v>e||dt((y*D+x*T)/v-.5)>.3||a*f+s*d+u*p<qT)&&(n(r,i,o,a,s,u,A,I,$,b/=S,_/=S,w,g,m),m.point(A,I),n(A,I,$,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(k,$){k=t(k,$),r.point(k[0],k[1])}function x(){h=NaN,m.point=v,r.lineStart()}function v(k,$){var E=Kn([k,$]),A=t(k,$);n(h,f,l,d,p,g,h=A[0],f=A[1],l=k,d=E[0],p=E[1],g=E[2],ry,r),r.point(h,f)}function b(){m.point=y,r.lineEnd()}function _(){x(),m.point=w,m.lineEnd=S}function w(k,$){v(i=k,$),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,ry,r),m.lineEnd=b,b()}return m}}var VT=go({point:function(t,e){this.stream.point(t*rt,e*rt)}});function ZT(t){return go({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 oy(t,e,n,r,i,o){if(!o)return KT(t,e,n,r,i);var a=J(o),s=K(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 Ue(t){return wf(function(){return t})()}function wf(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=nf,m=null,y,x,v,b=so,_=.5,w,S,k,$,E;function A(C){return k(C[0]*rt,C[1]*rt)}function I(C){return C=k.invert(C[0],C[1]),C&&[C[0]*yt,C[1]*yt]}A.stream=function(C){return $&&E===C?$:$=VT(ZT(l)(g(w(b(E=C)))))},A.preclip=function(C){return arguments.length?(g=C,p=void 0,T()):g},A.postclip=function(C){return arguments.length?(b=C,m=y=x=v=null,T()):b},A.clipAngle=function(C){return arguments.length?(g=+C?Dm(p=C*rt):(p=null,nf),T()):p*yt},A.clipExtent=function(C){return arguments.length?(b=C==null?(m=y=x=v=null,so):ks(m=+C[0][0],y=+C[0][1],x=+C[1][0],v=+C[1][1]),T()):m==null?null:[[m,y],[x,v]]},A.scale=function(C){return arguments.length?(n=+C,D()):n},A.translate=function(C){return arguments.length?(r=+C[0],i=+C[1],D()):[r,i]},A.center=function(C){return arguments.length?(o=C[0]%360*rt,a=C[1]%360*rt,D()):[o*yt,a*yt]},A.rotate=function(C){return arguments.length?(s=C[0]%360*rt,u=C[1]%360*rt,c=C.length>2?C[2]%360*rt:0,D()):[s*yt,u*yt,c*yt]},A.angle=function(C){return arguments.length?(h=C%360*rt,D()):h*yt},A.reflectX=function(C){return arguments.length?(f=C?-1:1,D()):f<0},A.reflectY=function(C){return arguments.length?(d=C?-1:1,D()):d<0},A.precision=function(C){return arguments.length?(w=iy(S,_=C*C),T()):It(_)},A.fitExtent=function(C,P){return Ys(A,C,P)},A.fitSize=function(C,P){return vf(A,C,P)},A.fitWidth=function(C,P){return xf(A,C,P)},A.fitHeight=function(C,P){return _f(A,C,P)};function D(){var C=oy(n,0,0,f,d,h).apply(null,e(o,a)),P=oy(n,r-C[0],i-C[1],f,d,h);return l=tf(s,u,c),S=Ql(e,P),k=Ql(l,S),w=iy(S,_),T()}function T(){return $=E=null,A}return function(){return e=t.apply(this,arguments),A.invert=e.invert&&I,D()}}function $f(t){var e=0,n=ht/3,r=wf(t),i=r(e,n);return i.parallels=function(o){return arguments.length?r(e=o[0]*rt,n=o[1]*rt):[e*yt,n*yt]},i}function QT(t){var e=J(t);function n(r,i){return[r*e,K(i)/e]}return n.invert=function(r,i){return[r/e,Vt(i*e)]},n}function ay(t,e){var n=K(t),r=(n+K(e))/2;if(dt(r)<et)return QT(t);var i=1+n*(2*r-n),o=It(i)/r;function a(s,u){var c=It(i-2*r*K(u))/r;return[c*K(s*=r),o-c*J(s)]}return a.invert=function(s,u){var c=o-u,l=Xt(s,dt(c))*de(c);return c*r<0&&(l-=ht*de(s)*de(c)),[l/r,Vt((i-(s*s+c*c)*r*r)/(2*r))]},a}function Hs(){return $f(ay).scale(155.424).center([0,33.6442])}function sy(){return Hs().parallels([29.5,45.5]).scale(1070).translate([480,250]).rotate([96,0]).center([-.6,38.7])}function JT(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 tP(){var t,e,n=sy(),r,i=Hs().rotate([154,0]).center([-2,58.5]).parallels([55,65]),o,a=Hs().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=JT([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+et,g+.12*d+et],[p-.214*d-et,g+.234*d-et]]).stream(c),s=a.translate([p-.205*d,g+.212*d]).clipExtent([[p-.214*d+et,g+.166*d+et],[p-.115*d-et,g+.234*d-et]]).stream(c),h()},l.fitExtent=function(f,d){return Ys(l,f,d)},l.fitSize=function(f,d){return vf(l,f,d)},l.fitWidth=function(f,d){return xf(l,f,d)},l.fitHeight=function(f,d){return _f(l,f,d)};function h(){return t=e=null,l}return l.scale(1070)}function uy(t){return function(e,n){var r=J(e),i=J(n),o=t(r*i);return o===1/0?[2,0]:[o*i*K(e),o*K(n)]}}function mo(t){return function(e,n){var r=It(e*e+n*n),i=t(r),o=K(i),a=J(i);return[Xt(e*o,r*a),Vt(r&&n*o/r)]}}var Sf=uy(function(t){return It(2/(1+t))});Sf.invert=mo(function(t){return 2*Vt(t/2)});function eP(){return Ue(Sf).scale(124.75).clipAngle(180-.001)}var Af=uy(function(t){return(t=Q1(t))&&t/K(t)});Af.invert=mo(function(t){return t});function nP(){return Ue(Af).scale(79.4188).clipAngle(180-.001)}function yo(t,e){return[t,ps(Ul((St+e)/2))]}yo.invert=function(t,e){return[t,2*qr(K1(e))-St]};function rP(){return cy(yo).scale(961/jt)}function cy(t){var e=Ue(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=ht*r(),f=e(_m(e.rotate()).invert([0,0]));return o(a==null?[[f[0]-h,f[1]-h],[f[0]+h,f[1]+h]]:t===yo?[[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 Ws(t){return Ul((St+t)/2)}function ly(t,e){var n=J(t),r=t===e?K(t):ps(n/J(e))/ps(Ws(e)/Ws(t)),i=n*Ol(Ws(t),r)/r;if(!r)return yo;function o(a,s){i>0?s<-St+et&&(s=-St+et):s>St-et&&(s=St-et);var u=i/Ol(Ws(s),r);return[u*K(r*a),i-u*J(r*a)]}return o.invert=function(a,s){var u=i-s,c=de(r)*It(a*a+u*u),l=Xt(a,dt(u))*de(u);return u*r<0&&(l-=ht*de(a)*de(u)),[l/r,2*qr(Ol(i/c,1/r))-St]},o}function iP(){return $f(ly).scale(109.5).parallels([30,30])}function bo(t,e){return[t,e]}bo.invert=bo;function oP(){return Ue(bo).scale(152.63)}function fy(t,e){var n=J(t),r=t===e?K(t):(n-J(e))/(e-t),i=n/r+t;if(dt(r)<et)return bo;function o(a,s){var u=i-s,c=r*a;return[u*K(c),i-u*J(c)]}return o.invert=function(a,s){var u=i-s,c=Xt(a,dt(u))*de(u);return u*r<0&&(c-=ht*de(a)*de(u)),[c/r,i-de(r)*It(a*a+u*u)]},o}function aP(){return $f(fy).scale(131.154).center([0,13.9389])}var vo=1.340264,xo=-.081106,_o=893e-6,wo=.003796,qs=It(3)/2,sP=12;function Mf(t,e){var n=Vt(qs*K(e)),r=n*n,i=r*r*r;return[t*J(n)/(qs*(vo+3*xo*r+i*(7*_o+9*wo*r))),n*(vo+xo*r+i*(_o+wo*r))]}Mf.invert=function(t,e){for(var n=e,r=n*n,i=r*r*r,o=0,a,s,u;o<sP&&(s=n*(vo+xo*r+i*(_o+wo*r))-e,u=vo+3*xo*r+i*(7*_o+9*wo*r),n-=a=s/u,r=n*n,i=r*r*r,!(dt(a)<no));++o);return[qs*t*(vo+3*xo*r+i*(7*_o+9*wo*r))/J(n),Vt(K(n)/qs)]};function uP(){return Ue(Mf).scale(177.158)}function Tf(t,e){var n=J(e),r=J(t)*n;return[n*K(t)/r,K(e)/r]}Tf.invert=mo(qr);function cP(){return Ue(Tf).scale(144.049).clipAngle(60)}function lP(){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=go({point:function(b,_){var w=v([b,_]);this.stream.point(w[0],w[1])}}),g=so,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,so):ks(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*rt,s=K(o),a=J(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 Ys(v,b,_)},v.fitSize=function(b,_){return vf(v,b,_)},v.fitWidth=function(b,_){return xf(v,b,_)},v.fitHeight=function(b,_){return _f(v,b,_)},v}function Pf(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)))]}Pf.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(dt(i)>et&&--r>0);return[t/(.8707+(o=n*n)*(-.131979+o*(-.013791+o*o*o*(.003971-.001529*o)))),n]};function fP(){return Ue(Pf).scale(175.295)}function Df(t,e){return[J(e)*K(t),K(e)]}Df.invert=mo(Vt);function hP(){return Ue(Df).scale(249.5).clipAngle(90+et)}function Lf(t,e){var n=J(e),r=1+J(t)*n;return[n*K(t)/r,K(e)/r]}Lf.invert=mo(function(t){return 2*qr(t)});function dP(){return Ue(Lf).scale(250).clipAngle(142)}function Ef(t,e){return[ps(Ul((St+e)/2)),-t]}Ef.invert=function(t,e){return[-e,2*qr(K1(t))-St]};function pP(){var t=cy(Ef),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 gP(t,e){return t.parent===e.parent?1:2}function mP(t){return t.reduce(yP,0)/t.length}function yP(t,e){return t+e.x}function bP(t){return 1+t.reduce(vP,0)}function vP(t,e){return Math.max(t,e.y)}function xP(t){for(var e;e=t.children;)t=e[0];return t}function _P(t){for(var e;e=t.children;)t=e[e.length-1];return t}function wP(){var t=gP,e=1,n=1,r=!1;function i(o){var a,s=0;o.eachAfter(function(f){var d=f.children;d?(f.x=mP(d),f.y=bP(d)):(f.x=a?s+=t(f,a):0,f.y=0,a=f)});var u=xP(o),c=_P(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 $P(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 SP(){return this.eachAfter($P)}function AP(t,e){let n=-1;for(const r of this)t.call(e,r,++n,this);return this}function MP(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 TP(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 PP(t,e){let n=-1;for(const r of this)if(t.call(e,r,++n,this))return r}function DP(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 EP(t){for(var e=this,n=kP(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 kP(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 CP(){for(var t=this,e=[t];t=t.parent;)e.push(t);return e}function IP(){return Array.from(this)}function RP(){var t=[];return this.eachBefore(function(e){e.children||t.push(e)}),t}function NP(){var t=this,e=[];return t.each(function(n){n!==t&&e.push({source:n.parent,target:n})}),e}function*FP(){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 js(t,e){t instanceof Map?(t=[void 0,t],e===void 0&&(e=OP)):e===void 0&&(e=zP);for(var n=new tr(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 tr(a[s])),o.parent=r,o.depth=r.depth+1;return n.eachBefore(hy)}function GP(){return js(this).eachBefore(UP)}function zP(t){return t.children}function OP(t){return Array.isArray(t)?t[1]:null}function UP(t){t.data.value!==void 0&&(t.value=t.data.value),t.data=t.data.data}function hy(t){var e=0;do t.height=e;while((t=t.parent)&&t.height<++e)}function tr(t){this.data=t,this.depth=this.height=0,this.parent=null}tr.prototype=js.prototype={constructor:tr,count:SP,each:AP,eachAfter:TP,eachBefore:MP,find:PP,sum:DP,sort:LP,path:EP,ancestors:CP,descendants:IP,leaves:RP,links:NP,copy:GP,[Symbol.iterator]:FP};function Xs(t){return t==null?null:dy(t)}function dy(t){if(typeof t!="function")throw new Error;return t}function er(){return 0}function Jr(t){return function(){return t}}const BP=1664525,YP=1013904223,py=4294967296;function kf(){let t=1;return()=>(t=(BP*t+YP)%py)/py}function HP(t){return typeof t=="object"&&"length"in t?t:Array.from(t)}function WP(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 qP(t){return gy(t,kf())}function gy(t,e){for(var n=0,r=(t=WP(Array.from(t),e)).length,i=[],o,a;n<r;)o=t[n],a&&my(a,o)?++n:(a=XP(i=jP(i,o)),n=0);return a}function jP(t,e){var n,r;if(Cf(e,t))return[e];for(n=0;n<t.length;++n)if(Vs(e,t[n])&&Cf($o(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(Vs($o(t[n],t[r]),e)&&Vs($o(t[n],e),t[r])&&Vs($o(t[r],e),t[n])&&Cf(yy(t[n],t[r],e),t))return[t[n],t[r],e];throw new Error}function Vs(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 my(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 Cf(t,e){for(var n=0;n<e.length;++n)if(!my(t,e[n]))return!1;return!0}function XP(t){switch(t.length){case 1:return VP(t[0]);case 2:return $o(t[0],t[1]);case 3:return yy(t[0],t[1],t[2])}}function VP(t){return{x:t.x,y:t.y,r:t.r}}function $o(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 yy(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)/_,k=(d*v-f*b)/(_*2)-i,$=(f*y-d*m)/_,E=S*S+$*$-1,A=2*(o+w*S+k*$),I=w*w+k*k-o*o,D=-(Math.abs(E)>1e-6?(A+Math.sqrt(A*A-4*E*I))/(2*E):I/A);return{x:r+w+S*D,y:i+k+$*D,r:D}}function by(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 vy(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 xy(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 Zs(t){this._=t,this.next=null,this.previous=null}function _y(t,e){if(!(o=(t=HP(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;by(r,n,i=t[2]),n=new Zs(n),r=new Zs(r),i=new Zs(i),n.next=i.previous=r,r.next=n.previous=i,i.next=r.previous=n;t:for(u=3;u<o;++u){by(n._,r._,i=t[u]),i=new Zs(i),c=r.next,l=n.previous,h=r._.r,f=n._.r;do if(h<=f){if(vy(c._,i._)){r=c,n.next=r,r.previous=n,--u;continue t}h+=c._.r,c=c.next}else{if(vy(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=xy(n);(i=i.next)!==r;)(s=xy(i))<a&&(n=i,a=s);r=n.next}for(n=[r._],i=r;(i=i.next)!==r;)n.push(i._);for(i=gy(n,e),u=0;u<o;++u)n=t[u],n.x-=i.x,n.y-=i.y;return i.r}function ZP(t){return _y(t,kf()),t}function KP(t){return Math.sqrt(t.value)}function QP(){var t=null,e=1,n=1,r=er;function i(o){const a=kf();return o.x=e/2,o.y=n/2,t?o.eachBefore(wy(t)).eachAfter(If(r,.5,a)).eachBefore($y(1)):o.eachBefore(wy(KP)).eachAfter(If(er,1,a)).eachAfter(If(r,o.r/Math.min(e,n),a)).eachBefore($y(Math.min(e,n)/(2*o.r))),o}return i.radius=function(o){return arguments.length?(t=Xs(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 wy(t){return function(e){e.children||(e.r=Math.max(0,+t(e)||0))}}function If(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=_y(i,n),s)for(o=0;o<a;++o)i[o].r-=s;r.r=u+s}}}function $y(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 Sy(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 So(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 JP(){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(Sy),a}function o(a,s){return function(u){u.children&&So(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 tD={depth:-1},Ay={},Rf={};function eD(t){return t.id}function nD(t){return t.parentId}function rD(){var t=eD,e=nD,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,_)=>iD(n(b,_,i))),x=y.map(My),v=new Set(y).add("");for(const b of x)v.has(b)||(v.add(b),y.push(b),x.push(My(b)),o.push(Rf));a=(b,_)=>y[_],s=(b,_)=>x[_]}for(l=0,u=o.length;l<u;++l)c=o[l],d=o[l]=new tr(c),(p=a(c,l,i))!=null&&(p+="")&&(g=d.id=p,m.set(g,m.has(g)?Ay: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===Ay)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===Rf&&h.children.length===1;)h=h.children[0],--u;for(let y=o.length-1;y>=0&&(d=o[y],d.data===Rf);--y)d.data=null}if(h.parent=tD,h.eachBefore(function(y){y.depth=y.parent.depth+1,--u}).eachBefore(hy),h.parent=null,u>0)throw new Error("cycle");return h}return r.id=function(i){return arguments.length?(t=Xs(i),r):t},r.parentId=function(i){return arguments.length?(e=Xs(i),r):e},r.path=function(i){return arguments.length?(n=Xs(i),r):n},r}function iD(t){t=`${t}`;let e=t.length;return Nf(t,e-1)&&!Nf(t,e-2)&&(t=t.slice(0,-1)),t[0]==="/"?t:`/${t}`}function My(t){let e=t.length;if(e<2)return"";for(;--e>1&&!Nf(t,e););return t.slice(0,e)}function Nf(t,e){if(t[e]==="/"){let n=0;for(;e>0&&t[--e]==="\\";)++n;if(!(n&1))return!0}return!1}function oD(t,e){return t.parent===e.parent?1:2}function Ff(t){var e=t.children;return e?e[0]:t.t}function Gf(t){var e=t.children;return e?e[e.length-1]:t.t}function aD(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 sD(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 uD(t,e,n){return t.a.parent===e.parent?t.a:n}function Ks(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}Ks.prototype=Object.create(tr.prototype);function cD(t){for(var e=new Ks(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 Ks(o[a],a)),i.parent=n;return(e.parent=new Ks(null,0)).children=[e],e}function lD(){var t=oD,e=1,n=1,r=null;function i(c){var l=cD(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){sD(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=Gf(p),f=Ff(f),p&&f;)g=Ff(g),d=Gf(d),d.a=c,b=p.z+x-f.z-m+t(p._,f._),b>0&&(aD(uD(p,c,h),c,b),m+=b,y+=b),x+=p.m,m+=f.m,v+=g.m,y+=d.m;p&&!Gf(d)&&(d.t=p,d.m+=x-y),f&&!Ff(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 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 Ty=(1+Math.sqrt(5))/2;function Py(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?So(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 zf=function t(e){function n(r,i,o,a,s){Py(e,r,i,o,a,s)}return n.ratio=function(r){return t((r=+r)>1?r:1)},n}(Ty);function Dy(){var t=zf,e=!1,n=1,r=1,i=[0],o=er,a=er,s=er,u=er,c=er;function l(f){return f.x0=f.y0=0,f.x1=n,f.y1=r,f.eachBefore(h),i=[0],e&&f.eachBefore(Sy),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=dy(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 fD(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 k=c[_]-v,$=d-k;if(m-p>y-g){var E=d?(p*$+m*k)/d:m;l(h,_,k,p,g,E,y),l(_,f,$,E,g,m,y)}else{var A=d?(g*$+y*k)/d:y;l(h,_,k,p,g,m,A),l(_,f,$,p,A,m,y)}}}function hD(t,e,n,r,i){(t.depth&1?Qs:So)(t,e,n,r,i)}const dD=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?So(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=Py(e,r,i,o,a,s),u.ratio=e}return n.ratio=function(r){return t((r=+r)>1?r:1)},n}(Ty);function pD(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 gD(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 mD(t,e,n){return(e[0]-t[0])*(n[1]-t[1])-(e[1]-t[1])*(n[0]-t[0])}function yD(t,e){return t[0]-e[0]||t[1]-e[1]}function Ly(t){const e=t.length,n=[0,1];let r=2,i;for(i=2;i<e;++i){for(;r>1&&mD(t[n[r-2]],t[n[r-1]],t[i])<=0;)--r;n[r++]=i}return n.slice(0,r)}function bD(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(yD),e=0;e<n;++e)i[e]=[r[e][0],-r[e][1]];var o=Ly(r),a=Ly(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 vD(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 xD(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 Nt=Math.random,_D=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}(Nt),wD=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}(Nt),Of=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}(Nt),$D=function t(e){var n=Of.source(e);function r(){var i=n.apply(this,arguments);return function(){return Math.exp(i())}}return r.source=t,r}(Nt),Ey=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}(Nt),SD=function t(e){var n=Ey.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}(Nt),AD=function t(e){function n(r){return function(){return-Math.log1p(-e())/r}}return n.source=t,n}(Nt),MD=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}(Nt),TD=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}(Nt),ky=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}(Nt),Uf=function t(e){var n=Of.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}(Nt),Cy=function t(e){var n=Uf.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}(Nt),Iy=function t(e){var n=ky.source(e),r=Cy.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}(Nt),PD=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}(Nt),DD=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}(Nt),LD=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}(Nt),ED=function t(e){var n=Uf.source(e),r=Iy.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}(Nt),kD=1664525,CD=1013904223,Ry=1/4294967296;function ID(t=Math.random()){let e=(0<=t&&t<1?t/Ry:Math.abs(t))|0;return()=>(e=kD*e+CD|0,Ry*(e>>>0))}function ge(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 Bf=Symbol("implicit");function Yf(){var t=new Ei,e=[],n=[],r=Bf;function i(o){let a=t.get(o);if(a===void 0){if(r!==Bf)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 Ei;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 Yf(e,n).unknown(r)},ge.apply(i,arguments),i}function Hf(){var t=Yf().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=hn(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 Hf(e(),[r,i]).round(s).paddingInner(u).paddingOuter(c).align(l)},ge.apply(h(),arguments)}function Ny(t){var e=t.copy;return t.padding=t.paddingOuter,delete t.paddingInner,delete t.paddingOuter,t.copy=function(){return Ny(e())},t}function Wf(){return Ny(Hf.apply(null,arguments).paddingInner(1))}function RD(t){return function(){return t}}function Js(t){return+t}var Fy=[0,1];function Jt(t){return t}function qf(t,e){return(e-=t=+t)?function(n){return(n-t)/e}:RD(isNaN(e)?NaN:.5)}function ND(t,e){var n;return t>e&&(n=t,t=e,e=n),function(r){return Math.max(t,Math.min(e,r))}}function FD(t,e,n){var r=t[0],i=t[1],o=e[0],a=e[1];return i<r?(r=qf(i,r),o=n(a,o)):(r=qf(r,i),o=n(o,a)),function(s){return o(r(s))}}function GD(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]=qf(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 Ao(t,e){return e.domain(t.domain()).range(t.range()).interpolate(t.interpolate()).clamp(t.clamp()).unknown(t.unknown())}function tu(){var t=Fy,e=Fy,n=gn,r,i,o,a=Jt,s,u,c;function l(){var f=Math.min(t.length,e.length);return a!==Jt&&(a=ND(t[0],t[f-1])),s=f>2?GD:FD,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),he)))(f)))},h.domain=function(f){return arguments.length?(t=Array.from(f,Js),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=Ba,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 jf(){return tu()(Jt,Jt)}function Gy(t,e,n,r){var i=va(t,e,n),o;switch(r=Wr(r??",f"),r.type){case"s":{var a=Math.max(Math.abs(t),Math.abs(e));return r.precision==null&&!isNaN(o=V1(i,a))&&(r.precision=o),Gl(r,a)}case"":case"e":case"g":case"p":case"r":{r.precision==null&&!isNaN(o=Z1(i,Math.max(Math.abs(t),Math.abs(e))))&&(r.precision=o-(r.type==="e"));break}case"f":case"%":{r.precision==null&&!isNaN(o=X1(i))&&(r.precision=o-(r.type==="%")*2);break}}return eo(r)}function xn(t){var e=t.domain;return t.ticks=function(n){var r=e();return In(r[0],r[r.length-1],n??10)},t.tickFormat=function(n,r){var i=e();return Gy(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 Xf(){var t=jf();return t.copy=function(){return Ao(t,Xf())},ge.apply(t,arguments),xn(t)}function zy(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,Js),n):t.slice()},n.unknown=function(r){return arguments.length?(e=r,n):e},n.copy=function(){return zy(t).unknown(e)},t=arguments.length?Array.from(t,Js):[0,1],xn(n)}function Oy(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 Uy(t){return Math.log(t)}function By(t){return Math.exp(t)}function zD(t){return-Math.log(-t)}function OD(t){return-Math.exp(-t)}function UD(t){return isFinite(t)?+("1e"+t):t<0?0:t}function BD(t){return t===10?UD:t===Math.E?Math.exp:e=>Math.pow(t,e)}function YD(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 Yy(t){return(e,n)=>-t(-e,n)}function Vf(t){const e=t(Uy,By),n=e.domain;let r=10,i,o;function a(){return i=YD(r),o=BD(r),n()[0]<0?(i=Yy(i),o=Yy(o),t(zD,OD)):t(Uy,By),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=In(c,l,m))}else y=In(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=Wr(u)).precision==null&&(u.trim=!0),u=eo(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(Oy(n(),{floor:s=>o(Math.floor(i(s))),ceil:s=>o(Math.ceil(i(s)))})),e}function Hy(){const t=Vf(tu()).domain([1,10]);return t.copy=()=>Ao(t,Hy()).base(t.base()),ge.apply(t,arguments),t}function Wy(t){return function(e){return Math.sign(e)*Math.log1p(Math.abs(e/t))}}function qy(t){return function(e){return Math.sign(e)*Math.expm1(Math.abs(e))*t}}function Zf(t){var e=1,n=t(Wy(e),qy(e));return n.constant=function(r){return arguments.length?t(Wy(e=+r),qy(e)):e},xn(n)}function jy(){var t=Zf(tu());return t.copy=function(){return Ao(t,jy()).constant(t.constant())},ge.apply(t,arguments)}function Xy(t){return function(e){return e<0?-Math.pow(-e,t):Math.pow(e,t)}}function HD(t){return t<0?-Math.sqrt(-t):Math.sqrt(t)}function WD(t){return t<0?-t*t:t*t}function Kf(t){var e=t(Jt,Jt),n=1;function r(){return n===1?t(Jt,Jt):n===.5?t(HD,WD):t(Xy(n),Xy(1/n))}return e.exponent=function(i){return arguments.length?(n=+i,r()):n},xn(e)}function eu(){var t=Kf(tu());return t.copy=function(){return Ao(t,eu()).exponent(t.exponent())},ge.apply(t,arguments),t}function qD(){return eu.apply(null,arguments).exponent(.5)}function Vy(t){return Math.sign(t)*t*t}function jD(t){return Math.sign(t)*Math.sqrt(Math.abs(t))}function Zy(){var t=jf(),e=[0,1],n=!1,r;function i(o){var a=jD(t(o));return isNaN(a)?r:n?Math.round(a):a}return i.invert=function(o){return t.invert(Vy(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,Js)).map(Vy)),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 Zy(t.domain(),e).round(n).clamp(t.clamp()).unknown(r)},ge.apply(i,arguments),xn(i)}function Ky(){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]=Dg(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 Ky().domain(t).range(e).unknown(r)},ge.apply(o,arguments)}function Qy(){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 Qy().domain([t,e]).range(i).unknown(o)},ge.apply(xn(a),arguments)}function Jy(){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 Jy().domain(t).range(e).unknown(n)},ge.apply(i,arguments)}const Qf=new Date,Jf=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),Jf.setTime(+a),t(Qf),t(Jf),Math.floor(n(Qf,Jf))),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 ti=Tt(()=>{},(t,e)=>{t.setTime(+t+e)},(t,e)=>e-t);ti.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):ti);const tb=ti.range,nn=1e3,me=nn*60,rn=me*60,on=rn*24,th=on*7,eb=on*30,eh=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()),nb=an.range,nu=Tt(t=>{t.setTime(t-t.getMilliseconds()-t.getSeconds()*nn)},(t,e)=>{t.setTime(+t+e*me)},(t,e)=>(e-t)/me,t=>t.getMinutes()),XD=nu.range,ru=Tt(t=>{t.setUTCSeconds(0,0)},(t,e)=>{t.setTime(+t+e*me)},(t,e)=>(e-t)/me,t=>t.getUTCMinutes()),VD=ru.range,iu=Tt(t=>{t.setTime(t-t.getMilliseconds()-t.getSeconds()*nn-t.getMinutes()*me)},(t,e)=>{t.setTime(+t+e*rn)},(t,e)=>(e-t)/rn,t=>t.getHours()),ZD=iu.range,ou=Tt(t=>{t.setUTCMinutes(0,0,0)},(t,e)=>{t.setTime(+t+e*rn)},(t,e)=>(e-t)/rn,t=>t.getUTCHours()),KD=ou.range,ei=Tt(t=>t.setHours(0,0,0,0),(t,e)=>t.setDate(t.getDate()+e),(t,e)=>(e-t-(e.getTimezoneOffset()-t.getTimezoneOffset())*me)/on,t=>t.getDate()-1),QD=ei.range,Mo=Tt(t=>{t.setUTCHours(0,0,0,0)},(t,e)=>{t.setUTCDate(t.getUTCDate()+e)},(t,e)=>(e-t)/on,t=>t.getUTCDate()-1),JD=Mo.range,nh=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)),tL=nh.range;function nr(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())*me)/th)}const ni=nr(0),To=nr(1),rb=nr(2),ib=nr(3),rr=nr(4),ob=nr(5),ab=nr(6),sb=ni.range,eL=To.range,nL=rb.range,rL=ib.range,iL=rr.range,oL=ob.range,aL=ab.range;function ir(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)/th)}const ri=ir(0),Po=ir(1),ub=ir(2),cb=ir(3),or=ir(4),lb=ir(5),fb=ir(6),hb=ri.range,sL=Po.range,uL=ub.range,cL=cb.range,lL=or.range,fL=lb.range,hL=fb.range,au=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()),dL=au.range,su=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()),pL=su.range,Be=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());Be.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 gL=Be.range,Ye=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());Ye.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 mL=Ye.range;function db(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,me],[o,5,5*me],[o,15,15*me],[o,30,30*me],[i,1,rn],[i,3,3*rn],[i,6,6*rn],[i,12,12*rn],[r,1,on],[r,2,2*on],[n,1,th],[e,1,eb],[e,3,3*eb],[t,1,eh]];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=ga(([,,m])=>m).right(a,f);if(d===a.length)return t.every(va(c/eh,l/eh,h));if(d===0)return ti.every(Math.max(va(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[pb,gb]=db(Ye,su,ri,nh,ou,ru),[mb,yb]=db(Be,au,ni,ei,iu,nu);function rh(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 ih(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 Do(t,e,n){return{y:t,m:e,d:n,H:0,M:0,S:0,L:0}}function bb(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=Lo(i),l=Eo(i),h=Lo(o),f=Eo(o),d=Lo(a),p=Eo(a),g=Lo(s),m=Eo(s),y=Lo(u),x=Eo(u),v={a:R,A:G,b:M,B:N,c:null,d:Sb,e:Sb,f:zL,g:VL,G:KL,H:NL,I:FL,j:GL,L:Ab,m:OL,M:UL,p:z,q:L,Q:Eb,s:kb,S:BL,u:YL,U:HL,V:WL,w:qL,W:jL,x:null,X:null,y:XL,Y:ZL,Z:QL,"%":Lb},b={a:j,A:q,b:Y,B:X,c:null,d:Tb,e:Tb,f:nE,g:hE,G:pE,H:JL,I:tE,j:eE,L:Pb,m:rE,M:iE,p:Q,q:ct,Q:Eb,s:kb,S:oE,u:aE,U:sE,V:uE,w:cE,W:lE,x:null,X:null,y:fE,Y:dE,Z:gE,"%":Lb},_={a:E,A,b:I,B:D,c:T,d:wb,e:wb,f:kL,g:_b,G:xb,H:$b,I:$b,j:PL,L:EL,m:TL,M:DL,p:$,q:ML,Q:IL,s:RL,S:LL,u:_L,U:wL,V:$L,w:xL,W:SL,x:C,X:P,y:_b,Y:xb,Z:AL,"%":CL};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(O,tt){return function(st){var H=[],xt=-1,gt=0,Ft=O.length,te,it,Mt;for(st instanceof Date||(st=new Date(+st));++xt<Ft;)O.charCodeAt(xt)===37&&(H.push(O.slice(gt,xt)),(it=vb[te=O.charAt(++xt)])!=null?te=O.charAt(++xt):it=te==="e"?" ":"0",(Mt=tt[te])&&(te=Mt(st,it)),H.push(te),gt=xt+1);return H.push(O.slice(gt,xt)),H.join("")}}function S(O,tt){return function(st){var H=Do(1900,void 0,1),xt=k(H,O,st+="",0),gt,Ft;if(xt!=st.length)return null;if("Q"in H)return new Date(H.Q);if("s"in H)return new Date(H.s*1e3+("L"in H?H.L:0));if(tt&&!("Z"in H)&&(H.Z=0),"p"in H&&(H.H=H.H%12+H.p*12),H.m===void 0&&(H.m="q"in H?H.q:0),"V"in H){if(H.V<1||H.V>53)return null;"w"in H||(H.w=1),"Z"in H?(gt=ih(Do(H.y,0,1)),Ft=gt.getUTCDay(),gt=Ft>4||Ft===0?Po.ceil(gt):Po(gt),gt=Mo.offset(gt,(H.V-1)*7),H.y=gt.getUTCFullYear(),H.m=gt.getUTCMonth(),H.d=gt.getUTCDate()+(H.w+6)%7):(gt=rh(Do(H.y,0,1)),Ft=gt.getDay(),gt=Ft>4||Ft===0?To.ceil(gt):To(gt),gt=ei.offset(gt,(H.V-1)*7),H.y=gt.getFullYear(),H.m=gt.getMonth(),H.d=gt.getDate()+(H.w+6)%7)}else("W"in H||"U"in H)&&("w"in H||(H.w="u"in H?H.u%7:"W"in H?1:0),Ft="Z"in H?ih(Do(H.y,0,1)).getUTCDay():rh(Do(H.y,0,1)).getDay(),H.m=0,H.d="W"in H?(H.w+6)%7+H.W*7-(Ft+5)%7:H.w+H.U*7-(Ft+6)%7);return"Z"in H?(H.H+=H.Z/100|0,H.M+=H.Z%100,ih(H)):rh(H)}}function k(O,tt,st,H){for(var xt=0,gt=tt.length,Ft=st.length,te,it;xt<gt;){if(H>=Ft)return-1;if(te=tt.charCodeAt(xt++),te===37){if(te=tt.charAt(xt++),it=_[te in vb?tt.charAt(xt++):te],!it||(H=it(O,st,H))<0)return-1}else if(te!=st.charCodeAt(H++))return-1}return H}function $(O,tt,st){var H=c.exec(tt.slice(st));return H?(O.p=l.get(H[0].toLowerCase()),st+H[0].length):-1}function E(O,tt,st){var H=d.exec(tt.slice(st));return H?(O.w=p.get(H[0].toLowerCase()),st+H[0].length):-1}function A(O,tt,st){var H=h.exec(tt.slice(st));return H?(O.w=f.get(H[0].toLowerCase()),st+H[0].length):-1}function I(O,tt,st){var H=y.exec(tt.slice(st));return H?(O.m=x.get(H[0].toLowerCase()),st+H[0].length):-1}function D(O,tt,st){var H=g.exec(tt.slice(st));return H?(O.m=m.get(H[0].toLowerCase()),st+H[0].length):-1}function T(O,tt,st){return k(O,e,tt,st)}function C(O,tt,st){return k(O,n,tt,st)}function P(O,tt,st){return k(O,r,tt,st)}function R(O){return a[O.getDay()]}function G(O){return o[O.getDay()]}function M(O){return u[O.getMonth()]}function N(O){return s[O.getMonth()]}function z(O){return i[+(O.getHours()>=12)]}function L(O){return 1+~~(O.getMonth()/3)}function j(O){return a[O.getUTCDay()]}function q(O){return o[O.getUTCDay()]}function Y(O){return u[O.getUTCMonth()]}function X(O){return s[O.getUTCMonth()]}function Q(O){return i[+(O.getUTCHours()>=12)]}function ct(O){return 1+~~(O.getUTCMonth()/3)}return{format:function(O){var tt=w(O+="",v);return tt.toString=function(){return O},tt},parse:function(O){var tt=S(O+="",!1);return tt.toString=function(){return O},tt},utcFormat:function(O){var tt=w(O+="",b);return tt.toString=function(){return O},tt},utcParse:function(O){var tt=S(O+="",!0);return tt.toString=function(){return O},tt}}}var vb={"-":"",_:" ",0:"0"},Rt=/^\s*\d+/,yL=/^%/,bL=/[\\^$*+?|[\]().{}]/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 vL(t){return t.replace(bL,"\\$&")}function Lo(t){return new RegExp("^(?:"+t.map(vL).join("|")+")","i")}function Eo(t){return new Map(t.map((e,n)=>[e.toLowerCase(),n]))}function xL(t,e,n){var r=Rt.exec(e.slice(n,n+1));return r?(t.w=+r[0],n+r[0].length):-1}function _L(t,e,n){var r=Rt.exec(e.slice(n,n+1));return r?(t.u=+r[0],n+r[0].length):-1}function wL(t,e,n){var r=Rt.exec(e.slice(n,n+2));return r?(t.U=+r[0],n+r[0].length):-1}function $L(t,e,n){var r=Rt.exec(e.slice(n,n+2));return r?(t.V=+r[0],n+r[0].length):-1}function SL(t,e,n){var r=Rt.exec(e.slice(n,n+2));return r?(t.W=+r[0],n+r[0].length):-1}function xb(t,e,n){var r=Rt.exec(e.slice(n,n+4));return r?(t.y=+r[0],n+r[0].length):-1}function _b(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 AL(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 ML(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 TL(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 wb(t,e,n){var r=Rt.exec(e.slice(n,n+2));return r?(t.d=+r[0],n+r[0].length):-1}function PL(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 $b(t,e,n){var r=Rt.exec(e.slice(n,n+2));return r?(t.H=+r[0],n+r[0].length):-1}function DL(t,e,n){var r=Rt.exec(e.slice(n,n+2));return r?(t.M=+r[0],n+r[0].length):-1}function LL(t,e,n){var r=Rt.exec(e.slice(n,n+2));return r?(t.S=+r[0],n+r[0].length):-1}function EL(t,e,n){var r=Rt.exec(e.slice(n,n+3));return r?(t.L=+r[0],n+r[0].length):-1}function kL(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 CL(t,e,n){var r=yL.exec(e.slice(n,n+1));return r?n+r[0].length:-1}function IL(t,e,n){var r=Rt.exec(e.slice(n));return r?(t.Q=+r[0],n+r[0].length):-1}function RL(t,e,n){var r=Rt.exec(e.slice(n));return r?(t.s=+r[0],n+r[0].length):-1}function Sb(t,e){return pt(t.getDate(),e,2)}function NL(t,e){return pt(t.getHours(),e,2)}function FL(t,e){return pt(t.getHours()%12||12,e,2)}function GL(t,e){return pt(1+ei.count(Be(t),t),e,3)}function Ab(t,e){return pt(t.getMilliseconds(),e,3)}function zL(t,e){return Ab(t,e)+"000"}function OL(t,e){return pt(t.getMonth()+1,e,2)}function UL(t,e){return pt(t.getMinutes(),e,2)}function BL(t,e){return pt(t.getSeconds(),e,2)}function YL(t){var e=t.getDay();return e===0?7:e}function HL(t,e){return pt(ni.count(Be(t)-1,t),e,2)}function Mb(t){var e=t.getDay();return e>=4||e===0?rr(t):rr.ceil(t)}function WL(t,e){return t=Mb(t),pt(rr.count(Be(t),t)+(Be(t).getDay()===4),e,2)}function qL(t){return t.getDay()}function jL(t,e){return pt(To.count(Be(t)-1,t),e,2)}function XL(t,e){return pt(t.getFullYear()%100,e,2)}function VL(t,e){return t=Mb(t),pt(t.getFullYear()%100,e,2)}function ZL(t,e){return pt(t.getFullYear()%1e4,e,4)}function KL(t,e){var n=t.getDay();return t=n>=4||n===0?rr(t):rr.ceil(t),pt(t.getFullYear()%1e4,e,4)}function QL(t){var e=t.getTimezoneOffset();return(e>0?"-":(e*=-1,"+"))+pt(e/60|0,"0",2)+pt(e%60,"0",2)}function Tb(t,e){return pt(t.getUTCDate(),e,2)}function JL(t,e){return pt(t.getUTCHours(),e,2)}function tE(t,e){return pt(t.getUTCHours()%12||12,e,2)}function eE(t,e){return pt(1+Mo.count(Ye(t),t),e,3)}function Pb(t,e){return pt(t.getUTCMilliseconds(),e,3)}function nE(t,e){return Pb(t,e)+"000"}function rE(t,e){return pt(t.getUTCMonth()+1,e,2)}function iE(t,e){return pt(t.getUTCMinutes(),e,2)}function oE(t,e){return pt(t.getUTCSeconds(),e,2)}function aE(t){var e=t.getUTCDay();return e===0?7:e}function sE(t,e){return pt(ri.count(Ye(t)-1,t),e,2)}function Db(t){var e=t.getUTCDay();return e>=4||e===0?or(t):or.ceil(t)}function uE(t,e){return t=Db(t),pt(or.count(Ye(t),t)+(Ye(t).getUTCDay()===4),e,2)}function cE(t){return t.getUTCDay()}function lE(t,e){return pt(Po.count(Ye(t)-1,t),e,2)}function fE(t,e){return pt(t.getUTCFullYear()%100,e,2)}function hE(t,e){return t=Db(t),pt(t.getUTCFullYear()%100,e,2)}function dE(t,e){return pt(t.getUTCFullYear()%1e4,e,4)}function pE(t,e){var n=t.getUTCDay();return t=n>=4||n===0?or(t):or.ceil(t),pt(t.getUTCFullYear()%1e4,e,4)}function gE(){return"+0000"}function Lb(){return"%"}function Eb(t){return+t}function kb(t){return Math.floor(+t/1e3)}var ii,oh,Cb,uu,ah;Ib({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 Ib(t){return ii=bb(t),oh=ii.format,Cb=ii.parse,uu=ii.utcFormat,ah=ii.utcParse,ii}var Rb="%Y-%m-%dT%H:%M:%S.%LZ";function mE(t){return t.toISOString()}var yE=Date.prototype.toISOString?mE:uu(Rb);const bE=yE;function vE(t){var e=new Date(t);return isNaN(e)?null:e}var xE=+new Date("2000-01-01T00:00:00.000Z")?vE:ah(Rb);const _E=xE;function wE(t){return new Date(t)}function $E(t){return t instanceof Date?+t:+new Date(+t)}function sh(t,e,n,r,i,o,a,s,u,c){var l=jf(),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,$E)):f().map(wE)},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(Oy(S,w)):l},l.copy=function(){return Ao(l,sh(t,e,n,r,i,o,a,s,u,c))},l}function SE(){return ge.apply(sh(mb,yb,Be,au,ni,ei,iu,nu,an,oh).domain([new Date(2e3,0,1),new Date(2e3,0,2)]),arguments)}function AE(){return ge.apply(sh(pb,gb,Ye,su,ri,Mo,ou,ru,an,uu).domain([Date.UTC(2e3,0,1),Date.UTC(2e3,0,2)]),arguments)}function cu(){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(gn),c.rangeRound=l(Ba),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 _n(t,e){return e.domain(t.domain()).interpolator(t.interpolator()).clamp(t.clamp()).unknown(t.unknown())}function Nb(){var t=xn(cu()(Jt));return t.copy=function(){return _n(t,Nb())},en.apply(t,arguments)}function Fb(){var t=Vf(cu()).domain([1,10]);return t.copy=function(){return _n(t,Fb()).base(t.base())},en.apply(t,arguments)}function Gb(){var t=Zf(cu());return t.copy=function(){return _n(t,Gb()).constant(t.constant())},en.apply(t,arguments)}function uh(){var t=Kf(cu());return t.copy=function(){return _n(t,uh()).exponent(t.exponent())},en.apply(t,arguments)}function ME(){return uh.apply(null,arguments).exponent(.5)}function zb(){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)=>Ii(t,o/r))},n.copy=function(){return zb(e).domain(t)},en.apply(n,arguments)}function lu(){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=O0(g,[y,x,v]),d):[c(0),c(.5),c(1)]}}return d.range=p(gn),d.rangeRound=p(Ba),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 Ob(){var t=xn(lu()(Jt));return t.copy=function(){return _n(t,Ob())},en.apply(t,arguments)}function Ub(){var t=Vf(lu()).domain([.1,1,10]);return t.copy=function(){return _n(t,Ub()).base(t.base())},en.apply(t,arguments)}function Bb(){var t=Zf(lu());return t.copy=function(){return _n(t,Bb()).constant(t.constant())},en.apply(t,arguments)}function ch(){var t=Kf(lu());return t.copy=function(){return _n(t,ch()).exponent(t.exponent())},en.apply(t,arguments)}function TE(){return ch.apply(null,arguments).exponent(.5)}function ut(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 PE=ut("1f77b4ff7f0e2ca02cd627289467bd8c564be377c27f7f7fbcbd2217becf"),DE=ut("7fc97fbeaed4fdc086ffff99386cb0f0027fbf5b17666666"),LE=ut("1b9e77d95f027570b3e7298a66a61ee6ab02a6761d666666"),EE=ut("4269d0efb118ff725c6cc5b03ca951ff8ab7a463f297bbf59c6b4e9498a0"),kE=ut("a6cee31f78b4b2df8a33a02cfb9a99e31a1cfdbf6fff7f00cab2d66a3d9affff99b15928"),CE=ut("fbb4aeb3cde3ccebc5decbe4fed9a6ffffcce5d8bdfddaecf2f2f2"),IE=ut("b3e2cdfdcdaccbd5e8f4cae4e6f5c9fff2aef1e2cccccccc"),RE=ut("e41a1c377eb84daf4a984ea3ff7f00ffff33a65628f781bf999999"),NE=ut("66c2a5fc8d628da0cbe78ac3a6d854ffd92fe5c494b3b3b3"),FE=ut("8dd3c7ffffb3bebadafb807280b1d3fdb462b3de69fccde5d9d9d9bc80bdccebc5ffed6f"),GE=ut("4e79a7f28e2ce1575976b7b259a14fedc949af7aa1ff9da79c755fbab0ab"),bt=t=>A0(t[t.length-1]);var Yb=new Array(3).concat("d8b365f5f5f55ab4ac","a6611adfc27d80cdc1018571","a6611adfc27df5f5f580cdc1018571","8c510ad8b365f6e8c3c7eae55ab4ac01665e","8c510ad8b365f6e8c3f5f5f5c7eae55ab4ac01665e","8c510abf812ddfc27df6e8c3c7eae580cdc135978f01665e","8c510abf812ddfc27df6e8c3f5f5f5c7eae580cdc135978f01665e","5430058c510abf812ddfc27df6e8c3c7eae580cdc135978f01665e003c30","5430058c510abf812ddfc27df6e8c3f5f5f5c7eae580cdc135978f01665e003c30").map(ut);const zE=bt(Yb);var Hb=new Array(3).concat("af8dc3f7f7f77fbf7b","7b3294c2a5cfa6dba0008837","7b3294c2a5cff7f7f7a6dba0008837","762a83af8dc3e7d4e8d9f0d37fbf7b1b7837","762a83af8dc3e7d4e8f7f7f7d9f0d37fbf7b1b7837","762a839970abc2a5cfe7d4e8d9f0d3a6dba05aae611b7837","762a839970abc2a5cfe7d4e8f7f7f7d9f0d3a6dba05aae611b7837","40004b762a839970abc2a5cfe7d4e8d9f0d3a6dba05aae611b783700441b","40004b762a839970abc2a5cfe7d4e8f7f7f7d9f0d3a6dba05aae611b783700441b").map(ut);const OE=bt(Hb);var Wb=new Array(3).concat("e9a3c9f7f7f7a1d76a","d01c8bf1b6dab8e1864dac26","d01c8bf1b6daf7f7f7b8e1864dac26","c51b7de9a3c9fde0efe6f5d0a1d76a4d9221","c51b7de9a3c9fde0eff7f7f7e6f5d0a1d76a4d9221","c51b7dde77aef1b6dafde0efe6f5d0b8e1867fbc414d9221","c51b7dde77aef1b6dafde0eff7f7f7e6f5d0b8e1867fbc414d9221","8e0152c51b7dde77aef1b6dafde0efe6f5d0b8e1867fbc414d9221276419","8e0152c51b7dde77aef1b6dafde0eff7f7f7e6f5d0b8e1867fbc414d9221276419").map(ut);const UE=bt(Wb);var qb=new Array(3).concat("998ec3f7f7f7f1a340","5e3c99b2abd2fdb863e66101","5e3c99b2abd2f7f7f7fdb863e66101","542788998ec3d8daebfee0b6f1a340b35806","542788998ec3d8daebf7f7f7fee0b6f1a340b35806","5427888073acb2abd2d8daebfee0b6fdb863e08214b35806","5427888073acb2abd2d8daebf7f7f7fee0b6fdb863e08214b35806","2d004b5427888073acb2abd2d8daebfee0b6fdb863e08214b358067f3b08","2d004b5427888073acb2abd2d8daebf7f7f7fee0b6fdb863e08214b358067f3b08").map(ut);const BE=bt(qb);var jb=new Array(3).concat("ef8a62f7f7f767a9cf","ca0020f4a58292c5de0571b0","ca0020f4a582f7f7f792c5de0571b0","b2182bef8a62fddbc7d1e5f067a9cf2166ac","b2182bef8a62fddbc7f7f7f7d1e5f067a9cf2166ac","b2182bd6604df4a582fddbc7d1e5f092c5de4393c32166ac","b2182bd6604df4a582fddbc7f7f7f7d1e5f092c5de4393c32166ac","67001fb2182bd6604df4a582fddbc7d1e5f092c5de4393c32166ac053061","67001fb2182bd6604df4a582fddbc7f7f7f7d1e5f092c5de4393c32166ac053061").map(ut);const YE=bt(jb);var Xb=new Array(3).concat("ef8a62ffffff999999","ca0020f4a582bababa404040","ca0020f4a582ffffffbababa404040","b2182bef8a62fddbc7e0e0e09999994d4d4d","b2182bef8a62fddbc7ffffffe0e0e09999994d4d4d","b2182bd6604df4a582fddbc7e0e0e0bababa8787874d4d4d","b2182bd6604df4a582fddbc7ffffffe0e0e0bababa8787874d4d4d","67001fb2182bd6604df4a582fddbc7e0e0e0bababa8787874d4d4d1a1a1a","67001fb2182bd6604df4a582fddbc7ffffffe0e0e0bababa8787874d4d4d1a1a1a").map(ut);const HE=bt(Xb);var Vb=new Array(3).concat("fc8d59ffffbf91bfdb","d7191cfdae61abd9e92c7bb6","d7191cfdae61ffffbfabd9e92c7bb6","d73027fc8d59fee090e0f3f891bfdb4575b4","d73027fc8d59fee090ffffbfe0f3f891bfdb4575b4","d73027f46d43fdae61fee090e0f3f8abd9e974add14575b4","d73027f46d43fdae61fee090ffffbfe0f3f8abd9e974add14575b4","a50026d73027f46d43fdae61fee090e0f3f8abd9e974add14575b4313695","a50026d73027f46d43fdae61fee090ffffbfe0f3f8abd9e974add14575b4313695").map(ut);const WE=bt(Vb);var Zb=new Array(3).concat("fc8d59ffffbf91cf60","d7191cfdae61a6d96a1a9641","d7191cfdae61ffffbfa6d96a1a9641","d73027fc8d59fee08bd9ef8b91cf601a9850","d73027fc8d59fee08bffffbfd9ef8b91cf601a9850","d73027f46d43fdae61fee08bd9ef8ba6d96a66bd631a9850","d73027f46d43fdae61fee08bffffbfd9ef8ba6d96a66bd631a9850","a50026d73027f46d43fdae61fee08bd9ef8ba6d96a66bd631a9850006837","a50026d73027f46d43fdae61fee08bffffbfd9ef8ba6d96a66bd631a9850006837").map(ut);const qE=bt(Zb);var Kb=new Array(3).concat("fc8d59ffffbf99d594","d7191cfdae61abdda42b83ba","d7191cfdae61ffffbfabdda42b83ba","d53e4ffc8d59fee08be6f59899d5943288bd","d53e4ffc8d59fee08bffffbfe6f59899d5943288bd","d53e4ff46d43fdae61fee08be6f598abdda466c2a53288bd","d53e4ff46d43fdae61fee08bffffbfe6f598abdda466c2a53288bd","9e0142d53e4ff46d43fdae61fee08be6f598abdda466c2a53288bd5e4fa2","9e0142d53e4ff46d43fdae61fee08bffffbfe6f598abdda466c2a53288bd5e4fa2").map(ut);const jE=bt(Kb);var Qb=new Array(3).concat("e5f5f999d8c92ca25f","edf8fbb2e2e266c2a4238b45","edf8fbb2e2e266c2a42ca25f006d2c","edf8fbccece699d8c966c2a42ca25f006d2c","edf8fbccece699d8c966c2a441ae76238b45005824","f7fcfde5f5f9ccece699d8c966c2a441ae76238b45005824","f7fcfde5f5f9ccece699d8c966c2a441ae76238b45006d2c00441b").map(ut);const XE=bt(Qb);var Jb=new Array(3).concat("e0ecf49ebcda8856a7","edf8fbb3cde38c96c688419d","edf8fbb3cde38c96c68856a7810f7c","edf8fbbfd3e69ebcda8c96c68856a7810f7c","edf8fbbfd3e69ebcda8c96c68c6bb188419d6e016b","f7fcfde0ecf4bfd3e69ebcda8c96c68c6bb188419d6e016b","f7fcfde0ecf4bfd3e69ebcda8c96c68c6bb188419d810f7c4d004b").map(ut);const VE=bt(Jb);var tv=new Array(3).concat("e0f3dba8ddb543a2ca","f0f9e8bae4bc7bccc42b8cbe","f0f9e8bae4bc7bccc443a2ca0868ac","f0f9e8ccebc5a8ddb57bccc443a2ca0868ac","f0f9e8ccebc5a8ddb57bccc44eb3d32b8cbe08589e","f7fcf0e0f3dbccebc5a8ddb57bccc44eb3d32b8cbe08589e","f7fcf0e0f3dbccebc5a8ddb57bccc44eb3d32b8cbe0868ac084081").map(ut);const ZE=bt(tv);var ev=new Array(3).concat("fee8c8fdbb84e34a33","fef0d9fdcc8afc8d59d7301f","fef0d9fdcc8afc8d59e34a33b30000","fef0d9fdd49efdbb84fc8d59e34a33b30000","fef0d9fdd49efdbb84fc8d59ef6548d7301f990000","fff7ecfee8c8fdd49efdbb84fc8d59ef6548d7301f990000","fff7ecfee8c8fdd49efdbb84fc8d59ef6548d7301fb300007f0000").map(ut);const KE=bt(ev);var nv=new Array(3).concat("ece2f0a6bddb1c9099","f6eff7bdc9e167a9cf02818a","f6eff7bdc9e167a9cf1c9099016c59","f6eff7d0d1e6a6bddb67a9cf1c9099016c59","f6eff7d0d1e6a6bddb67a9cf3690c002818a016450","fff7fbece2f0d0d1e6a6bddb67a9cf3690c002818a016450","fff7fbece2f0d0d1e6a6bddb67a9cf3690c002818a016c59014636").map(ut);const QE=bt(nv);var rv=new Array(3).concat("ece7f2a6bddb2b8cbe","f1eef6bdc9e174a9cf0570b0","f1eef6bdc9e174a9cf2b8cbe045a8d","f1eef6d0d1e6a6bddb74a9cf2b8cbe045a8d","f1eef6d0d1e6a6bddb74a9cf3690c00570b0034e7b","fff7fbece7f2d0d1e6a6bddb74a9cf3690c00570b0034e7b","fff7fbece7f2d0d1e6a6bddb74a9cf3690c00570b0045a8d023858").map(ut);const JE=bt(rv);var iv=new Array(3).concat("e7e1efc994c7dd1c77","f1eef6d7b5d8df65b0ce1256","f1eef6d7b5d8df65b0dd1c77980043","f1eef6d4b9dac994c7df65b0dd1c77980043","f1eef6d4b9dac994c7df65b0e7298ace125691003f","f7f4f9e7e1efd4b9dac994c7df65b0e7298ace125691003f","f7f4f9e7e1efd4b9dac994c7df65b0e7298ace125698004367001f").map(ut);const tk=bt(iv);var ov=new Array(3).concat("fde0ddfa9fb5c51b8a","feebe2fbb4b9f768a1ae017e","feebe2fbb4b9f768a1c51b8a7a0177","feebe2fcc5c0fa9fb5f768a1c51b8a7a0177","feebe2fcc5c0fa9fb5f768a1dd3497ae017e7a0177","fff7f3fde0ddfcc5c0fa9fb5f768a1dd3497ae017e7a0177","fff7f3fde0ddfcc5c0fa9fb5f768a1dd3497ae017e7a017749006a").map(ut);const ek=bt(ov);var av=new Array(3).concat("edf8b17fcdbb2c7fb8","ffffcca1dab441b6c4225ea8","ffffcca1dab441b6c42c7fb8253494","ffffccc7e9b47fcdbb41b6c42c7fb8253494","ffffccc7e9b47fcdbb41b6c41d91c0225ea80c2c84","ffffd9edf8b1c7e9b47fcdbb41b6c41d91c0225ea80c2c84","ffffd9edf8b1c7e9b47fcdbb41b6c41d91c0225ea8253494081d58").map(ut);const nk=bt(av);var sv=new Array(3).concat("f7fcb9addd8e31a354","ffffccc2e69978c679238443","ffffccc2e69978c67931a354006837","ffffccd9f0a3addd8e78c67931a354006837","ffffccd9f0a3addd8e78c67941ab5d238443005a32","ffffe5f7fcb9d9f0a3addd8e78c67941ab5d238443005a32","ffffe5f7fcb9d9f0a3addd8e78c67941ab5d238443006837004529").map(ut);const rk=bt(sv);var uv=new Array(3).concat("fff7bcfec44fd95f0e","ffffd4fed98efe9929cc4c02","ffffd4fed98efe9929d95f0e993404","ffffd4fee391fec44ffe9929d95f0e993404","ffffd4fee391fec44ffe9929ec7014cc4c028c2d04","ffffe5fff7bcfee391fec44ffe9929ec7014cc4c028c2d04","ffffe5fff7bcfee391fec44ffe9929ec7014cc4c02993404662506").map(ut);const ik=bt(uv);var cv=new Array(3).concat("ffeda0feb24cf03b20","ffffb2fecc5cfd8d3ce31a1c","ffffb2fecc5cfd8d3cf03b20bd0026","ffffb2fed976feb24cfd8d3cf03b20bd0026","ffffb2fed976feb24cfd8d3cfc4e2ae31a1cb10026","ffffccffeda0fed976feb24cfd8d3cfc4e2ae31a1cb10026","ffffccffeda0fed976feb24cfd8d3cfc4e2ae31a1cbd0026800026").map(ut);const ok=bt(cv);var lv=new Array(3).concat("deebf79ecae13182bd","eff3ffbdd7e76baed62171b5","eff3ffbdd7e76baed63182bd08519c","eff3ffc6dbef9ecae16baed63182bd08519c","eff3ffc6dbef9ecae16baed64292c62171b5084594","f7fbffdeebf7c6dbef9ecae16baed64292c62171b5084594","f7fbffdeebf7c6dbef9ecae16baed64292c62171b508519c08306b").map(ut);const ak=bt(lv);var fv=new Array(3).concat("e5f5e0a1d99b31a354","edf8e9bae4b374c476238b45","edf8e9bae4b374c47631a354006d2c","edf8e9c7e9c0a1d99b74c47631a354006d2c","edf8e9c7e9c0a1d99b74c47641ab5d238b45005a32","f7fcf5e5f5e0c7e9c0a1d99b74c47641ab5d238b45005a32","f7fcf5e5f5e0c7e9c0a1d99b74c47641ab5d238b45006d2c00441b").map(ut);const sk=bt(fv);var hv=new Array(3).concat("f0f0f0bdbdbd636363","f7f7f7cccccc969696525252","f7f7f7cccccc969696636363252525","f7f7f7d9d9d9bdbdbd969696636363252525","f7f7f7d9d9d9bdbdbd969696737373525252252525","fffffff0f0f0d9d9d9bdbdbd969696737373525252252525","fffffff0f0f0d9d9d9bdbdbd969696737373525252252525000000").map(ut);const uk=bt(hv);var dv=new Array(3).concat("efedf5bcbddc756bb1","f2f0f7cbc9e29e9ac86a51a3","f2f0f7cbc9e29e9ac8756bb154278f","f2f0f7dadaebbcbddc9e9ac8756bb154278f","f2f0f7dadaebbcbddc9e9ac8807dba6a51a34a1486","fcfbfdefedf5dadaebbcbddc9e9ac8807dba6a51a34a1486","fcfbfdefedf5dadaebbcbddc9e9ac8807dba6a51a354278f3f007d").map(ut);const ck=bt(dv);var pv=new Array(3).concat("fee0d2fc9272de2d26","fee5d9fcae91fb6a4acb181d","fee5d9fcae91fb6a4ade2d26a50f15","fee5d9fcbba1fc9272fb6a4ade2d26a50f15","fee5d9fcbba1fc9272fb6a4aef3b2ccb181d99000d","fff5f0fee0d2fcbba1fc9272fb6a4aef3b2ccb181d99000d","fff5f0fee0d2fcbba1fc9272fb6a4aef3b2ccb181da50f1567000d").map(ut);const lk=bt(pv);var gv=new Array(3).concat("fee6cefdae6be6550d","feeddefdbe85fd8d3cd94701","feeddefdbe85fd8d3ce6550da63603","feeddefdd0a2fdae6bfd8d3ce6550da63603","feeddefdd0a2fdae6bfd8d3cf16913d948018c2d04","fff5ebfee6cefdd0a2fdae6bfd8d3cf16913d948018c2d04","fff5ebfee6cefdd0a2fdae6bfd8d3cf16913d94801a636037f2704").map(ut);const fk=bt(gv);function hk(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 dk=Ha(Me(300,.5,0),Me(-240,.5,1));var pk=Ha(Me(-100,.75,.35),Me(80,1.5,.8)),gk=Ha(Me(260,.75,.35),Me(80,1.5,.8)),fu=Me();function mk(t){(t<0||t>1)&&(t-=Math.floor(t));var e=Math.abs(t-.5);return fu.h=360*t-100,fu.s=1.5-1.5*e,fu.l=.8-.9*e,fu+""}var hu=Cr(),yk=Math.PI/3,bk=Math.PI*2/3;function vk(t){var e;return t=(.5-t)*Math.PI,hu.r=255*(e=Math.sin(t))*e,hu.g=255*(e=Math.sin(t+yk))*e,hu.b=255*(e=Math.sin(t+bk))*e,hu+""}function xk(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 du(t){var e=t.length;return function(n){return t[Math.max(0,Math.min(e-1,Math.floor(n*e)))]}}const _k=du(ut("44015444025645045745055946075a46085c460a5d460b5e470d60470e6147106347116447136548146748166848176948186a481a6c481b6d481c6e481d6f481f70482071482173482374482475482576482677482878482979472a7a472c7a472d7b472e7c472f7d46307e46327e46337f463480453581453781453882443983443a83443b84433d84433e85423f854240864241864142874144874045884046883f47883f48893e49893e4a893e4c8a3d4d8a3d4e8a3c4f8a3c508b3b518b3b528b3a538b3a548c39558c39568c38588c38598c375a8c375b8d365c8d365d8d355e8d355f8d34608d34618d33628d33638d32648e32658e31668e31678e31688e30698e306a8e2f6b8e2f6c8e2e6d8e2e6e8e2e6f8e2d708e2d718e2c718e2c728e2c738e2b748e2b758e2a768e2a778e2a788e29798e297a8e297b8e287c8e287d8e277e8e277f8e27808e26818e26828e26828e25838e25848e25858e24868e24878e23888e23898e238a8d228b8d228c8d228d8d218e8d218f8d21908d21918c20928c20928c20938c1f948c1f958b1f968b1f978b1f988b1f998a1f9a8a1e9b8a1e9c891e9d891f9e891f9f881fa0881fa1881fa1871fa28720a38620a48621a58521a68522a78522a88423a98324aa8325ab8225ac8226ad8127ad8128ae8029af7f2ab07f2cb17e2db27d2eb37c2fb47c31b57b32b67a34b67935b77937b87838b9773aba763bbb753dbc743fbc7340bd7242be7144bf7046c06f48c16e4ac16d4cc26c4ec36b50c46a52c56954c56856c66758c7655ac8645cc8635ec96260ca6063cb5f65cb5e67cc5c69cd5b6ccd5a6ece5870cf5773d05675d05477d1537ad1517cd2507fd34e81d34d84d44b86d54989d5488bd6468ed64590d74393d74195d84098d83e9bd93c9dd93ba0da39a2da37a5db36a8db34aadc32addc30b0dd2fb2dd2db5de2bb8de29bade28bddf26c0df25c2df23c5e021c8e020cae11fcde11dd0e11cd2e21bd5e21ad8e219dae319dde318dfe318e2e418e5e419e7e419eae51aece51befe51cf1e51df4e61ef6e620f8e621fbe723fde725"));var wk=du(ut("00000401000501010601010802010902020b02020d03030f03031204041405041606051806051a07061c08071e0907200a08220b09240c09260d0a290e0b2b100b2d110c2f120d31130d34140e36150e38160f3b180f3d19103f1a10421c10441d11471e114920114b21114e22115024125325125527125829115a2a115c2c115f2d11612f116331116533106734106936106b38106c390f6e3b0f703d0f713f0f72400f74420f75440f764510774710784910784a10794c117a4e117b4f127b51127c52137c54137d56147d57157e59157e5a167e5c167f5d177f5f187f601880621980641a80651a80671b80681c816a1c816b1d816d1d816e1e81701f81721f817320817521817621817822817922827b23827c23827e24828025828125818326818426818627818827818928818b29818c29818e2a81902a81912b81932b80942c80962c80982d80992d809b2e7f9c2e7f9e2f7fa02f7fa1307ea3307ea5317ea6317da8327daa337dab337cad347cae347bb0357bb2357bb3367ab5367ab73779b83779ba3878bc3978bd3977bf3a77c03a76c23b75c43c75c53c74c73d73c83e73ca3e72cc3f71cd4071cf4070d0416fd2426fd3436ed5446dd6456cd8456cd9466bdb476adc4869de4968df4a68e04c67e24d66e34e65e44f64e55064e75263e85362e95462ea5661eb5760ec5860ed5a5fee5b5eef5d5ef05f5ef1605df2625df2645cf3655cf4675cf4695cf56b5cf66c5cf66e5cf7705cf7725cf8745cf8765cf9785df9795df97b5dfa7d5efa7f5efa815ffb835ffb8560fb8761fc8961fc8a62fc8c63fc8e64fc9065fd9266fd9467fd9668fd9869fd9a6afd9b6bfe9d6cfe9f6dfea16efea36ffea571fea772fea973feaa74feac76feae77feb078feb27afeb47bfeb67cfeb77efeb97ffebb81febd82febf84fec185fec287fec488fec68afec88cfeca8dfecc8ffecd90fecf92fed194fed395fed597fed799fed89afdda9cfddc9efddea0fde0a1fde2a3fde3a5fde5a7fde7a9fde9aafdebacfcecaefceeb0fcf0b2fcf2b4fcf4b6fcf6b8fcf7b9fcf9bbfcfbbdfcfdbf")),$k=du(ut("00000401000501010601010802010a02020c02020e03021004031204031405041706041907051b08051d09061f0a07220b07240c08260d08290e092b10092d110a30120a32140b34150b37160b39180c3c190c3e1b0c411c0c431e0c451f0c48210c4a230c4c240c4f260c51280b53290b552b0b572d0b592f0a5b310a5c320a5e340a5f3609613809623909633b09643d09653e0966400a67420a68440a68450a69470b6a490b6a4a0c6b4c0c6b4d0d6c4f0d6c510e6c520e6d540f6d550f6d57106e59106e5a116e5c126e5d126e5f136e61136e62146e64156e65156e67166e69166e6a176e6c186e6d186e6f196e71196e721a6e741a6e751b6e771c6d781c6d7a1d6d7c1d6d7d1e6d7f1e6c801f6c82206c84206b85216b87216b88226a8a226a8c23698d23698f24699025689225689326679526679727669827669a28659b29649d29649f2a63a02a63a22b62a32c61a52c60a62d60a82e5fa92e5eab2f5ead305dae305cb0315bb1325ab3325ab43359b63458b73557b93556ba3655bc3754bd3853bf3952c03a51c13a50c33b4fc43c4ec63d4dc73e4cc83f4bca404acb4149cc4248ce4347cf4446d04545d24644d34743d44842d54a41d74b3fd84c3ed94d3dda4e3cdb503bdd513ade5238df5337e05536e15635e25734e35933e45a31e55c30e65d2fe75e2ee8602de9612bea632aeb6429eb6628ec6726ed6925ee6a24ef6c23ef6e21f06f20f1711ff1731df2741cf3761bf37819f47918f57b17f57d15f67e14f68013f78212f78410f8850ff8870ef8890cf98b0bf98c0af98e09fa9008fa9207fa9407fb9606fb9706fb9906fb9b06fb9d07fc9f07fca108fca309fca50afca60cfca80dfcaa0ffcac11fcae12fcb014fcb216fcb418fbb61afbb81dfbba1ffbbc21fbbe23fac026fac228fac42afac62df9c72ff9c932f9cb35f8cd37f8cf3af7d13df7d340f6d543f6d746f5d949f5db4cf4dd4ff4df53f4e156f3e35af3e55df2e661f2e865f2ea69f1ec6df1ed71f1ef75f1f179f2f27df2f482f3f586f3f68af4f88ef5f992f6fa96f8fb9af9fc9dfafda1fcffa4")),Sk=du(ut("0d088710078813078916078a19068c1b068d1d068e20068f2206902406912605912805922a05932c05942e05952f059631059733059735049837049938049a3a049a3c049b3e049c3f049c41049d43039e44039e46039f48039f4903a04b03a14c02a14e02a25002a25102a35302a35502a45601a45801a45901a55b01a55c01a65e01a66001a66100a76300a76400a76600a76700a86900a86a00a86c00a86e00a86f00a87100a87201a87401a87501a87701a87801a87a02a87b02a87d03a87e03a88004a88104a78305a78405a78606a68707a68808a68a09a58b0aa58d0ba58e0ca48f0da4910ea3920fa39410a29511a19613a19814a099159f9a169f9c179e9d189d9e199da01a9ca11b9ba21d9aa31e9aa51f99a62098a72197a82296aa2395ab2494ac2694ad2793ae2892b02991b12a90b22b8fb32c8eb42e8db52f8cb6308bb7318ab83289ba3388bb3488bc3587bd3786be3885bf3984c03a83c13b82c23c81c33d80c43e7fc5407ec6417dc7427cc8437bc9447aca457acb4679cc4778cc4977cd4a76ce4b75cf4c74d04d73d14e72d24f71d35171d45270d5536fd5546ed6556dd7566cd8576bd9586ada5a6ada5b69db5c68dc5d67dd5e66de5f65de6164df6263e06363e16462e26561e26660e3685fe4695ee56a5de56b5de66c5ce76e5be76f5ae87059e97158e97257ea7457eb7556eb7655ec7754ed7953ed7a52ee7b51ef7c51ef7e50f07f4ff0804ef1814df1834cf2844bf3854bf3874af48849f48948f58b47f58c46f68d45f68f44f79044f79143f79342f89441f89540f9973ff9983ef99a3efa9b3dfa9c3cfa9e3bfb9f3afba139fba238fca338fca537fca636fca835fca934fdab33fdac33fdae32fdaf31fdb130fdb22ffdb42ffdb52efeb72dfeb82cfeba2cfebb2bfebd2afebe2afec029fdc229fdc328fdc527fdc627fdc827fdca26fdcb26fccd25fcce25fcd025fcd225fbd324fbd524fbd724fad824fada24f9dc24f9dd25f8df25f8e125f7e225f7e425f6e626f6e826f5e926f5eb27f4ed27f3ee27f3f027f2f227f1f426f1f525f0f724f0f921"));function at(t){return function(){return t}}const mv=Math.abs,Ut=Math.atan2,sn=Math.cos,Ak=Math.max,oi=Math.min,ie=Math.sin,vt=Math.sqrt,Bt=1e-12,wn=Math.PI,pu=wn/2,$n=2*wn;function Mk(t){return t>1?0:t<-1?wn:Math.acos(t)}function yv(t){return t>=1?pu:t<=-1?-pu:Math.asin(t)}function ko(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 Ki(e)}function Tk(t){return t.innerRadius}function Pk(t){return t.outerRadius}function Dk(t){return t.startAngle}function Lk(t){return t.endAngle}function Ek(t){return t&&t.padAngle}function kk(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<Bt))return f=(l*(e-o)-h*(t-i))/f,[t+f*u,e+f*c]}function gu(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(Ak(0,_*_*b-w*w)),k=(w*v-x*S)/b,$=(-w*x-v*S)/b,E=(w*v+x*S)/b,A=(-w*x+v*S)/b,I=k-m,D=$-y,T=E-m,C=A-y;return I*I+D*D>T*T+C*C&&(k=E,$=A),{cx:k,cy:$,x01:-l,y01:-h,x11:k*(i/_-1),y11:$*(i/_-1)}}function bv(){var t=Tk,e=Pk,n=at(0),r=null,i=Dk,o=Lk,a=Ek,s=null,u=ko(c);function c(){var l,h,f=+t.apply(this,arguments),d=+e.apply(this,arguments),p=i.apply(this,arguments)-pu,g=o.apply(this,arguments)-pu,m=mv(g-p),y=g>p;if(s||(s=l=u()),d<f&&(h=d,d=f,f=h),!(d>Bt))s.moveTo(0,0);else if(m>$n-Bt)s.moveTo(d*sn(p),d*ie(p)),s.arc(0,0,d,p,g,!y),f>Bt&&(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,k=a.apply(this,arguments)/2,$=k>Bt&&(r?+r.apply(this,arguments):vt(f*f+d*d)),E=oi(mv(d-f)/2,+n.apply(this,arguments)),A=E,I=E,D,T;if($>Bt){var C=yv($/f*ie(k)),P=yv($/d*ie(k));(w-=C*2)>Bt?(C*=y?1:-1,b+=C,_-=C):(w=0,b=_=(p+g)/2),(S-=P*2)>Bt?(P*=y?1:-1,x+=P,v-=P):(S=0,x=v=(p+g)/2)}var R=d*sn(x),G=d*ie(x),M=f*sn(_),N=f*ie(_);if(E>Bt){var z=d*sn(v),L=d*ie(v),j=f*sn(b),q=f*ie(b),Y;if(m<wn)if(Y=kk(R,G,j,q,z,L,M,N)){var X=R-Y[0],Q=G-Y[1],ct=z-Y[0],O=L-Y[1],tt=1/ie(Mk((X*ct+Q*O)/(vt(X*X+Q*Q)*vt(ct*ct+O*O)))/2),st=vt(Y[0]*Y[0]+Y[1]*Y[1]);A=oi(E,(f-st)/(tt-1)),I=oi(E,(d-st)/(tt+1))}else A=I=0}S>Bt?I>Bt?(D=gu(j,q,R,G,d,I,y),T=gu(z,L,M,N,d,I,y),s.moveTo(D.cx+D.x01,D.cy+D.y01),I<E?s.arc(D.cx,D.cy,I,Ut(D.y01,D.x01),Ut(T.y01,T.x01),!y):(s.arc(D.cx,D.cy,I,Ut(D.y01,D.x01),Ut(D.y11,D.x11),!y),s.arc(0,0,d,Ut(D.cy+D.y11,D.cx+D.x11),Ut(T.cy+T.y11,T.cx+T.x11),!y),s.arc(T.cx,T.cy,I,Ut(T.y11,T.x11),Ut(T.y01,T.x01),!y))):(s.moveTo(R,G),s.arc(0,0,d,x,v,!y)):s.moveTo(R,G),!(f>Bt)||!(w>Bt)?s.lineTo(M,N):A>Bt?(D=gu(M,N,z,L,f,-A,y),T=gu(R,G,j,q,f,-A,y),s.lineTo(D.cx+D.x01,D.cy+D.y01),A<E?s.arc(D.cx,D.cy,A,Ut(D.y01,D.x01),Ut(T.y01,T.x01),!y):(s.arc(D.cx,D.cy,A,Ut(D.y01,D.x01),Ut(D.y11,D.x11),!y),s.arc(0,0,f,Ut(D.cy+D.y11,D.cx+D.x11),Ut(T.cy+T.y11,T.cx+T.x11),y),s.arc(T.cx,T.cy,A,Ut(T.y11,T.x11),Ut(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-wn/2;return[sn(h)*l,ie(h)*l]},c.innerRadius=function(l){return arguments.length?(t=typeof l=="function"?l:at(+l),c):t},c.outerRadius=function(l){return arguments.length?(e=typeof l=="function"?l:at(+l),c):e},c.cornerRadius=function(l){return arguments.length?(n=typeof l=="function"?l:at(+l),c):n},c.padRadius=function(l){return arguments.length?(r=l==null?null:typeof l=="function"?l:at(+l),c):r},c.startAngle=function(l){return arguments.length?(i=typeof l=="function"?l:at(+l),c):i},c.endAngle=function(l){return arguments.length?(o=typeof l=="function"?l:at(+l),c):o},c.padAngle=function(l){return arguments.length?(a=typeof l=="function"?l:at(+l),c):a},c.context=function(l){return arguments.length?(s=l??null,c):s},c}var Ck=Array.prototype.slice;function mu(t){return typeof t=="object"&&"length"in t?t:Array.from(t)}function vv(t){this._context=t}vv.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 yu(t){return new vv(t)}function lh(t){return t[0]}function fh(t){return t[1]}function bu(t,e){var n=at(!0),r=null,i=yu,o=null,a=ko(s);t=typeof t=="function"?t:t===void 0?lh:at(t),e=typeof e=="function"?e:e===void 0?fh:at(e);function s(u){var c,l=(u=mu(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:at(+u),s):t},s.y=function(u){return arguments.length?(e=typeof u=="function"?u:at(+u),s):e},s.defined=function(u){return arguments.length?(n=typeof u=="function"?u:at(!!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 hh(t,e,n){var r=null,i=at(!0),o=null,a=yu,s=null,u=ko(c);t=typeof t=="function"?t:t===void 0?lh:at(+t),e=typeof e=="function"?e:at(e===void 0?0:+e),n=typeof n=="function"?n:n===void 0?fh:at(+n);function c(h){var f,d,p,g=(h=mu(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 bu().defined(i).curve(a).context(o)}return c.x=function(h){return arguments.length?(t=typeof h=="function"?h:at(+h),r=null,c):t},c.x0=function(h){return arguments.length?(t=typeof h=="function"?h:at(+h),c):t},c.x1=function(h){return arguments.length?(r=h==null?null:typeof h=="function"?h:at(+h),c):r},c.y=function(h){return arguments.length?(e=typeof h=="function"?h:at(+h),n=null,c):e},c.y0=function(h){return arguments.length?(e=typeof h=="function"?h:at(+h),c):e},c.y1=function(h){return arguments.length?(n=h==null?null:typeof h=="function"?h:at(+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:at(!!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 Ik(t,e){return e<t?-1:e>t?1:e>=t?0:NaN}function Rk(t){return t}function xv(){var t=Rk,e=Ik,n=null,r=at(0),i=at($n),o=at(0);function a(s){var u,c=(s=mu(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:at(+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:at(+s),a):r},a.endAngle=function(s){return arguments.length?(i=typeof s=="function"?s:at(+s),a):i},a.padAngle=function(s){return arguments.length?(o=typeof s=="function"?s:at(+s),a):o},a}var _v=dh(yu);function wv(t){this._curve=t}wv.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 dh(t){function e(n){return new wv(t(n))}return e._curve=t,e}function Co(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(dh(n)):e()._curve},t}function $v(){return Co(bu().curve(_v))}function Sv(){var t=hh().curve(_v),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 Co(n())},delete t.lineX0,t.lineEndAngle=function(){return Co(r())},delete t.lineX1,t.lineInnerRadius=function(){return Co(i())},delete t.lineY0,t.lineOuterRadius=function(){return Co(o())},delete t.lineY1,t.curve=function(a){return arguments.length?e(dh(a)):e()._curve},t}function Io(t,e){return[(e=+e)*Math.cos(t-=Math.PI/2),e*Math.sin(t)]}class Av{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 Nk{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=Io(this._x0,this._y0),i=Io(this._x0,this._y0=(this._y0+n)/2),o=Io(e,this._y0),a=Io(e,n);this._context.moveTo(...r),this._context.bezierCurveTo(...i,...o,...a)}this._x0=e,this._y0=n}}function Mv(t){return new Av(t,!0)}function Tv(t){return new Av(t,!1)}function Fk(t){return new Nk(t)}function Gk(t){return t.source}function zk(t){return t.target}function vu(t){let e=Gk,n=zk,r=lh,i=fh,o=null,a=null,s=ko(u);function u(){let c;const l=Ck.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:at(+c),u):r},u.y=function(c){return arguments.length?(i=typeof c=="function"?c:at(+c),u):i},u.context=function(c){return arguments.length?(c==null?o=a=null:a=t(o=c),u):o},u}function Ok(){return vu(Mv)}function Uk(){return vu(Tv)}function Bk(){const t=vu(Fk);return t.angle=t.x,delete t.x,t.radius=t.y,delete t.y,t}const Yk=vt(3),Pv={draw(t,e){const n=vt(e+oi(e/28,.75))*.59436,r=n/2,i=r*Yk;t.moveTo(0,n),t.lineTo(0,-n),t.moveTo(-i,-r),t.lineTo(i,r),t.moveTo(-i,r),t.lineTo(i,-r)}},xu={draw(t,e){const n=vt(e/wn);t.moveTo(n,0),t.arc(0,0,n,0,$n)}},Dv={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()}},Lv=vt(1/3),Hk=Lv*2,Ev={draw(t,e){const n=vt(e/Hk),r=n*Lv;t.moveTo(0,-n),t.lineTo(r,0),t.lineTo(0,n),t.lineTo(-r,0),t.closePath()}},kv={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()}},Cv={draw(t,e){const n=vt(e-oi(e/7,2))*.87559;t.moveTo(-n,0),t.lineTo(n,0),t.moveTo(0,n),t.lineTo(0,-n)}},Iv={draw(t,e){const n=vt(e),r=-n/2;t.rect(r,r,n,n)}},Rv={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()}},Wk=.8908130915292852,Nv=ie(wn/10)/ie(7*wn/10),qk=ie($n/10)*Nv,jk=-sn($n/10)*Nv,Fv={draw(t,e){const n=vt(e*Wk),r=qk*n,i=jk*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()}},ph=vt(3),Gv={draw(t,e){const n=-vt(e/(ph*3));t.moveTo(0,n*2),t.lineTo(-ph*n,-n),t.lineTo(ph*n,-n),t.closePath()}},Xk=vt(3),zv={draw(t,e){const n=vt(e)*.6824,r=n/2,i=n*Xk/2;t.moveTo(0,-n),t.lineTo(i,r),t.lineTo(-i,r),t.closePath()}},ye=-.5,be=vt(3)/2,gh=1/vt(12),Vk=(gh/2+1)*3,Ov={draw(t,e){const n=vt(e/Vk),r=n/2,i=n*gh,o=r,a=n*gh+n,s=-o,u=a;t.moveTo(r,i),t.lineTo(o,a),t.lineTo(s,u),t.lineTo(ye*r-be*i,be*r+ye*i),t.lineTo(ye*o-be*a,be*o+ye*a),t.lineTo(ye*s-be*u,be*s+ye*u),t.lineTo(ye*r+be*i,ye*i-be*r),t.lineTo(ye*o+be*a,ye*a-be*o),t.lineTo(ye*s+be*u,ye*u-be*s),t.closePath()}},mh={draw(t,e){const n=vt(e-oi(e/6,1.7))*.6189;t.moveTo(-n,-n),t.lineTo(n,n),t.moveTo(-n,n),t.lineTo(n,-n)}},Uv=[xu,Dv,Ev,Iv,Fv,Gv,Ov],Zk=[xu,Cv,mh,zv,Pv,Rv,kv];function Kk(t,e){let n=null,r=ko(i);t=typeof t=="function"?t:at(t||xu),e=typeof e=="function"?e:at(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:at(o),i):t},i.size=function(o){return arguments.length?(e=typeof o=="function"?o:at(+o),i):e},i.context=function(o){return arguments.length?(n=o??null,i):n},i}function Sn(){}function _u(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 wu(t){this._context=t}wu.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:_u(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:_u(this,t,e);break}this._x0=this._x1,this._x1=t,this._y0=this._y1,this._y1=e}};function Qk(t){return new wu(t)}function Bv(t){this._context=t}Bv.prototype={areaStart:Sn,areaEnd:Sn,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:_u(this,t,e);break}this._x0=this._x1,this._x1=t,this._y0=this._y1,this._y1=e}};function Jk(t){return new Bv(t)}function Yv(t){this._context=t}Yv.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:_u(this,t,e);break}this._x0=this._x1,this._x1=t,this._y0=this._y1,this._y1=e}};function tC(t){return new Yv(t)}function Hv(t,e){this._basis=new wu(t),this._beta=e}Hv.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 eC=function t(e){function n(r){return e===1?new wu(r):new Hv(r,e)}return n.beta=function(r){return t(+r)},n}(.85);function $u(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 yh(t,e){this._context=t,this._k=(1-e)/6}yh.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:$u(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:$u(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 nC=function t(e){function n(r){return new yh(r,e)}return n.tension=function(r){return t(+r)},n}(0);function bh(t,e){this._context=t,this._k=(1-e)/6}bh.prototype={areaStart:Sn,areaEnd:Sn,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:$u(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 rC=function t(e){function n(r){return new bh(r,e)}return n.tension=function(r){return t(+r)},n}(0);function vh(t,e){this._context=t,this._k=(1-e)/6}vh.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:$u(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 iC=function t(e){function n(r){return new vh(r,e)}return n.tension=function(r){return t(+r)},n}(0);function xh(t,e,n){var r=t._x1,i=t._y1,o=t._x2,a=t._y2;if(t._l01_a>Bt){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>Bt){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 Wv(t,e){this._context=t,this._alpha=e}Wv.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:xh(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 oC=function t(e){function n(r){return e?new Wv(r,e):new yh(r,0)}return n.alpha=function(r){return t(+r)},n}(.5);function qv(t,e){this._context=t,this._alpha=e}qv.prototype={areaStart:Sn,areaEnd:Sn,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:xh(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 aC=function t(e){function n(r){return e?new qv(r,e):new bh(r,0)}return n.alpha=function(r){return t(+r)},n}(.5);function jv(t,e){this._context=t,this._alpha=e}jv.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:xh(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 sC=function t(e){function n(r){return e?new jv(r,e):new vh(r,0)}return n.alpha=function(r){return t(+r)},n}(.5);function Xv(t){this._context=t}Xv.prototype={areaStart:Sn,areaEnd:Sn,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 uC(t){return new Xv(t)}function Vv(t){return t<0?-1:1}function Zv(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(Vv(o)+Vv(a))*Math.min(Math.abs(o),Math.abs(a),.5*Math.abs(s))||0}function Kv(t,e){var n=t._x1-t._x0;return n?(3*(t._y1-t._y0)/n-e)/2:e}function _h(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 Su(t){this._context=t}Su.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:_h(this,this._t0,Kv(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,_h(this,Kv(this,n=Zv(this,t,e)),n);break;default:_h(this,this._t0,n=Zv(this,t,e));break}this._x0=this._x1,this._x1=t,this._y0=this._y1,this._y1=e,this._t0=n}}};function Qv(t){this._context=new Jv(t)}(Qv.prototype=Object.create(Su.prototype)).point=function(t,e){Su.prototype.point.call(this,e,t)};function Jv(t){this._context=t}Jv.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 cC(t){return new Su(t)}function lC(t){return new Qv(t)}function t2(t){this._context=t}t2.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=e2(t),i=e2(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 e2(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 fC(t){return new t2(t)}function Au(t,e){this._context=t,this._t=e}Au.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 hC(t){return new Au(t,.5)}function dC(t){return new Au(t,0)}function pC(t){return new Au(t,1)}function ai(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 si(t){for(var e=t.length,n=new Array(e);--e>=0;)n[e]=e;return n}function gC(t,e){return t[e]}function mC(t){const e=[];return e.key=t,e}function yC(){var t=at([]),e=si,n=ai,r=gC;function i(o){var a=Array.from(t.apply(this,arguments),mC),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=mu(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:at(Array.from(o)),i):t},i.value=function(o){return arguments.length?(r=typeof o=="function"?o:at(+o),i):r},i.order=function(o){return arguments.length?(e=o==null?si:typeof o=="function"?o:at(Array.from(o)),i):e},i.offset=function(o){return arguments.length?(n=o??ai,i):n},i}function bC(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}ai(t,e)}}function vC(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 xC(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}ai(t,e)}}function _C(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,ai(t,e)}}function n2(t){var e=t.map(wC);return si(t).sort(function(n,r){return e[n]-e[r]})}function wC(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 r2(t){var e=t.map(i2);return si(t).sort(function(n,r){return e[n]-e[r]})}function i2(t){for(var e=0,n=-1,r=t.length,i;++n<r;)(i=+t[n][1])&&(e+=i);return e}function $C(t){return r2(t).reverse()}function SC(t){var e=t.length,n,r,i=t.map(i2),o=n2(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 si(t).reverse()}const Mu=t=>()=>t;function MC(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 He(t,e,n){this.k=t,this.x=e,this.y=n}He.prototype={constructor:He,scale:function(t){return t===1?this:new He(this.k*t,this.x,this.y)},translate:function(t,e){return t===0&e===0?this:new He(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 Tu=new He(1,0,0);o2.prototype=He.prototype;function o2(t){for(;!t.__zoom;)if(!(t=t.parentNode))return Tu;return t.__zoom}function wh(t){t.stopImmediatePropagation()}function Ro(t){t.preventDefault(),t.stopImmediatePropagation()}function TC(t){return(!t.ctrlKey||t.type==="wheel")&&!t.button}function PC(){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 a2(){return this.__zoom||Tu}function DC(t){return-t.deltaY*(t.deltaMode===1?.05:t.deltaMode?1:.002)*(t.ctrlKey?10:1)}function LC(){return navigator.maxTouchPoints||"ontouchstart"in this}function EC(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 s2(){var t=TC,e=PC,n=EC,r=DC,i=LC,o=[0,1/0],a=[[-1/0,-1/0],[1/0,1/0]],s=250,u=N0,c=Nn("start","zoom","end"),l,h,f,d=500,p=150,g=0,m=10;function y(T){T.property("__zoom",a2).on("wheel.zoom",k,{passive:!1}).on("mousedown.zoom",$).on("dblclick.zoom",E).filter(i).on("touchstart.zoom",A).on("touchmove.zoom",I).on("touchend.zoom touchcancel.zoom",D).style("-webkit-tap-highlight-color","rgba(0,0,0,0)")}y.transform=function(T,C,P,R){var G=T.selection?T.selection():T;G.property("__zoom",a2),T!==G?_(T,C,P,R):G.interrupt().each(function(){w(this,arguments).event(R).start().zoom(null,typeof C=="function"?C.apply(this,arguments):C).end()})},y.scaleBy=function(T,C,P,R){y.scaleTo(T,function(){var G=this.__zoom.k,M=typeof C=="function"?C.apply(this,arguments):C;return G*M},P,R)},y.scaleTo=function(T,C,P,R){y.transform(T,function(){var G=e.apply(this,arguments),M=this.__zoom,N=P==null?b(G):typeof P=="function"?P.apply(this,arguments):P,z=M.invert(N),L=typeof C=="function"?C.apply(this,arguments):C;return n(v(x(M,L),N,z),G,a)},P,R)},y.translateBy=function(T,C,P,R){y.transform(T,function(){return n(this.__zoom.translate(typeof C=="function"?C.apply(this,arguments):C,typeof P=="function"?P.apply(this,arguments):P),e.apply(this,arguments),a)},null,R)},y.translateTo=function(T,C,P,R,G){y.transform(T,function(){var M=e.apply(this,arguments),N=this.__zoom,z=R==null?b(M):typeof R=="function"?R.apply(this,arguments):R;return n(Tu.translate(z[0],z[1]).scale(N.k).translate(typeof C=="function"?-C.apply(this,arguments):-C,typeof P=="function"?-P.apply(this,arguments):-P),M,a)},R,G)};function x(T,C){return C=Math.max(o[0],Math.min(o[1],C)),C===T.k?T:new He(C,T.x,T.y)}function v(T,C,P){var R=C[0]-P[0]*T.k,G=C[1]-P[1]*T.k;return R===T.x&&G===T.y?T:new He(T.k,R,G)}function b(T){return[(+T[0][0]+ +T[1][0])/2,(+T[0][1]+ +T[1][1])/2]}function _(T,C,P,R){T.on("start.zoom",function(){w(this,arguments).event(R).start()}).on("interrupt.zoom end.zoom",function(){w(this,arguments).event(R).end()}).tween("zoom",function(){var G=this,M=arguments,N=w(G,M).event(R),z=e.apply(G,M),L=P==null?b(z):typeof P=="function"?P.apply(G,M):P,j=Math.max(z[1][0]-z[0][0],z[1][1]-z[0][1]),q=G.__zoom,Y=typeof C=="function"?C.apply(G,M):C,X=u(q.invert(L).concat(j/q.k),Y.invert(L).concat(j/Y.k));return function(Q){if(Q===1)Q=Y;else{var ct=X(Q),O=j/ct[2];Q=new He(O,L[0]-ct[0]*O,L[1]-ct[1]*O)}N.zoom(null,Q)}})}function w(T,C,P){return!P&&T.__zooming||new S(T,C)}function S(T,C){this.that=T,this.args=C,this.active=0,this.sourceEvent=null,this.extent=e.apply(T,C),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,C){return this.mouse&&T!=="mouse"&&(this.mouse[1]=C.invert(this.mouse[0])),this.touch0&&T!=="touch"&&(this.touch0[1]=C.invert(this.touch0[0])),this.touch1&&T!=="touch"&&(this.touch1[1]=C.invert(this.touch1[0])),this.that.__zoom=C,this.emit("zoom"),this},end:function(){return--this.active===0&&(delete this.that.__zooming,this.emit("end")),this},emit:function(T){var C=V(this.that).datum();c.call(T,this.that,new MC(T,{sourceEvent:this.sourceEvent,target:y,type:T,transform:this.that.__zoom,dispatch:c}),C)}};function k(T,...C){if(!t.apply(this,arguments))return;var P=w(this,C).event(T),R=this.__zoom,G=Math.max(o[0],Math.min(o[1],R.k*Math.pow(2,r.apply(this,arguments)))),M=se(T);if(P.wheel)(P.mouse[0][0]!==M[0]||P.mouse[0][1]!==M[1])&&(P.mouse[1]=R.invert(P.mouse[0]=M)),clearTimeout(P.wheel);else{if(R.k===G)return;P.mouse=[M,R.invert(M)],Hn(this),P.start()}Ro(T),P.wheel=setTimeout(N,p),P.zoom("mouse",n(v(x(R,G),P.mouse[0],P.mouse[1]),P.extent,a));function N(){P.wheel=null,P.end()}}function $(T,...C){if(f||!t.apply(this,arguments))return;var P=T.currentTarget,R=w(this,C,!0).event(T),G=V(T.view).on("mousemove.zoom",L,!0).on("mouseup.zoom",j,!0),M=se(T,P),N=T.clientX,z=T.clientY;Da(T.view),wh(T),R.mouse=[M,this.__zoom.invert(M)],Hn(this),R.start();function L(q){if(Ro(q),!R.moved){var Y=q.clientX-N,X=q.clientY-z;R.moved=Y*Y+X*X>g}R.event(q).zoom("mouse",n(v(R.that.__zoom,R.mouse[0]=se(q,P),R.mouse[1]),R.extent,a))}function j(q){G.on("mousemove.zoom mouseup.zoom",null),La(q.view,R.moved),Ro(q),R.event(q).end()}}function E(T,...C){if(t.apply(this,arguments)){var P=this.__zoom,R=se(T.changedTouches?T.changedTouches[0]:T,this),G=P.invert(R),M=P.k*(T.shiftKey?.5:2),N=n(v(x(P,M),R,G),e.apply(this,C),a);Ro(T),s>0?V(this).transition().duration(s).call(_,N,R,T):V(this).call(y.transform,N,R,T)}}function A(T,...C){if(t.apply(this,arguments)){var P=T.touches,R=P.length,G=w(this,C,T.changedTouches.length===R).event(T),M,N,z,L;for(wh(T),N=0;N<R;++N)z=P[N],L=se(z,this),L=[L,this.__zoom.invert(L),z.identifier],G.touch0?!G.touch1&&G.touch0[2]!==L[2]&&(G.touch1=L,G.taps=0):(G.touch0=L,M=!0,G.taps=1+!!l);l&&(l=clearTimeout(l)),M&&(G.taps<2&&(h=L[0],l=setTimeout(function(){l=null},d)),Hn(this),G.start())}}function I(T,...C){if(this.__zooming){var P=w(this,C).event(T),R=T.changedTouches,G=R.length,M,N,z,L;for(Ro(T),M=0;M<G;++M)N=R[M],z=se(N,this),P.touch0&&P.touch0[2]===N.identifier?P.touch0[0]=z:P.touch1&&P.touch1[2]===N.identifier&&(P.touch1[0]=z);if(N=P.that.__zoom,P.touch1){var j=P.touch0[0],q=P.touch0[1],Y=P.touch1[0],X=P.touch1[1],Q=(Q=Y[0]-j[0])*Q+(Q=Y[1]-j[1])*Q,ct=(ct=X[0]-q[0])*ct+(ct=X[1]-q[1])*ct;N=x(N,Math.sqrt(Q/ct)),z=[(j[0]+Y[0])/2,(j[1]+Y[1])/2],L=[(q[0]+X[0])/2,(q[1]+X[1])/2]}else if(P.touch0)z=P.touch0[0],L=P.touch0[1];else return;P.zoom("touch",n(v(N,z,L),P.extent,a))}}function D(T,...C){if(this.__zooming){var P=w(this,C).event(T),R=T.changedTouches,G=R.length,M,N;for(wh(T),f&&clearTimeout(f),f=setTimeout(function(){f=null},d),M=0;M<G;++M)N=R[M],P.touch0&&P.touch0[2]===N.identifier?delete P.touch0:P.touch1&&P.touch1[2]===N.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&&(N=se(N,this),Math.hypot(h[0]-N[0],h[1]-N[1])<m)){var z=V(this).on("dblclick.zoom");z&&z.apply(this,arguments)}}}return y.wheelDelta=function(T){return arguments.length?(r=typeof T=="function"?T:Mu(+T),y):r},y.filter=function(T){return arguments.length?(t=typeof T=="function"?T:Mu(!!T),y):t},y.touchable=function(T){return arguments.length?(i=typeof T=="function"?T:Mu(!!T),y):i},y.extent=function(T){return arguments.length?(e=typeof T=="function"?T:Mu([[+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 $h=Object.freeze(Object.defineProperty({__proto__:null,Adder:Dt,Delaunay:kl,FormatSpecifier:ls,InternMap:Ei,InternSet:Cn,Node:tr,Path:Ki,Voronoi:S1,ZoomTransform:He,active:RM,arc:bv,area:hh,areaRadial:Sv,ascending:_t,autoType:o9,axisBottom:T5,axisLeft:Gg,axisRight:M5,axisTop:Fg,bin:Tg,bisect:kn,bisectCenter:wA,bisectLeft:_A,bisectRight:hg,bisector:ga,blob:u9,blur:$A,blur2:dg,blurImage:SA,brush:XM,brushSelection:WM,brushX:qM,brushY:jM,buffer:l9,chord:ZM,chordDirected:QM,chordTranspose:KM,cluster:wP,color:pn,contourDensity:S7,contours:Tl,count:ya,create:u8,creator:Ma,cross:EA,csv:d9,csvFormat:X7,csvFormatBody:V7,csvFormatRow:K7,csvFormatRows:Z7,csvFormatValue:Q7,csvParse:P1,csvParseRows:j7,cubehelix:Me,cumsum:kA,curveBasis:Qk,curveBasisClosed:Jk,curveBasisOpen:tC,curveBumpX:Mv,curveBumpY:Tv,curveBundle:eC,curveCardinal:nC,curveCardinalClosed:rC,curveCardinalOpen:iC,curveCatmullRom:oC,curveCatmullRomClosed:aC,curveCatmullRomOpen:sC,curveLinear:yu,curveLinearClosed:uC,curveMonotoneX:cC,curveMonotoneY:lC,curveNatural:fC,curveStep:hC,curveStepAfter:pC,curveStepBefore:dC,descending:lg,deviation:mg,difference:p5,disjoint:g5,dispatch:Nn,drag:Zg,dragDisable:Da,dragEnable:La,dsv:h9,dsvFormat:as,easeBack:i1,easeBackIn:TM,easeBackInOut:i1,easeBackOut:PM,easeBounce:Vi,easeBounceIn:AM,easeBounceInOut:MM,easeBounceOut:Vi,easeCircle:r1,easeCircleIn:gM,easeCircleInOut:r1,easeCircleOut:mM,easeCubic:Xi,easeCubicIn:sM,easeCubicInOut:Xi,easeCubicOut:uM,easeElastic:Ja,easeElasticIn:DM,easeElasticInOut:LM,easeElasticOut:Ja,easeExp:n1,easeExpIn:dM,easeExpInOut:n1,easeExpOut:pM,easeLinear:iM,easePoly:Q0,easePolyIn:cM,easePolyInOut:Q0,easePolyOut:lM,easeQuad:K0,easeQuadIn:oM,easeQuadInOut:K0,easeQuadOut:aM,easeSin:e1,easeSinIn:fM,easeSinInOut:e1,easeSinOut:hM,every:u5,extent:Li,fcumsum:IA,filter:l5,flatGroup:RA,flatRollup:NA,forceCenter:_9,forceCollide:C1,forceLink:U9,forceManyBody:F1,forceRadial:V9,forceSimulation:N1,forceX:G1,forceY:z1,get format(){return eo},formatDefaultLocale:j1,formatLocale:q1,get formatPrefix(){return Gl},formatSpecifier:Wr,fsum:CA,geoAlbers:sy,geoAlbersUsa:tP,geoArea:oT,geoAzimuthalEqualArea:eP,geoAzimuthalEqualAreaRaw:Sf,geoAzimuthalEquidistant:nP,geoAzimuthalEquidistantRaw:Af,geoBounds:cT,geoCentroid:gT,geoCircle:mT,geoClipAntimeridian:nf,geoClipCircle:Dm,geoClipExtent:$T,geoClipRectangle:ks,geoConicConformal:iP,geoConicConformalRaw:ly,geoConicEqualArea:Hs,geoConicEqualAreaRaw:ay,geoConicEquidistant:aP,geoConicEquidistantRaw:fy,geoContains:LT,geoDistance:Rs,geoEqualEarth:uP,geoEqualEarthRaw:Mf,geoEquirectangular:oP,geoEquirectangularRaw:bo,geoGnomonic:cP,geoGnomonicRaw:Tf,geoGraticule:zm,geoGraticule10:ET,geoIdentity:lP,geoInterpolate:kT,geoLength:Lm,geoMercator:rP,geoMercatorRaw:yo,geoNaturalEarth1:fP,geoNaturalEarth1Raw:Pf,geoOrthographic:hP,geoOrthographicRaw:Df,geoPath:HT,geoProjection:Ue,geoProjectionMutator:wf,geoRotation:_m,geoStereographic:dP,geoStereographicRaw:Lf,geoStream:Pe,geoTransform:WT,geoTransverseMercator:pP,geoTransverseMercatorRaw:Ef,gray:P8,greatest:Pg,greatestIndex:n5,group:xg,groupSort:zA,groups:_g,hcl:Ga,hierarchy:js,histogram:Tg,hsl:Ia,html:v9,image:g9,index:FA,indexes:GA,interpolate:gn,interpolateArray:I8,interpolateBasis:_0,interpolateBasisClosed:w0,interpolateBlues:ak,interpolateBrBG:zE,interpolateBuGn:XE,interpolateBuPu:VE,interpolateCividis:hk,interpolateCool:gk,interpolateCubehelix:V8,interpolateCubehelixDefault:dk,interpolateCubehelixLong:Ha,interpolateDate:P0,interpolateDiscrete:F8,interpolateGnBu:ZE,interpolateGreens:sk,interpolateGreys:uk,interpolateHcl:j8,interpolateHclLong:X8,interpolateHsl:H8,interpolateHslLong:W8,interpolateHue:G8,interpolateInferno:$k,interpolateLab:q8,interpolateMagma:wk,interpolateNumber:he,interpolateNumberArray:Qc,interpolateObject:D0,interpolateOrRd:KE,interpolateOranges:fk,interpolatePRGn:OE,interpolatePiYG:UE,interpolatePlasma:Sk,interpolatePuBu:JE,interpolatePuBuGn:QE,interpolatePuOr:BE,interpolatePuRd:tk,interpolatePurples:ck,interpolateRainbow:mk,interpolateRdBu:YE,interpolateRdGy:HE,interpolateRdPu:ek,interpolateRdYlBu:WE,interpolateRdYlGn:qE,interpolateReds:lk,interpolateRgb:Ui,interpolateRgbBasis:A0,interpolateRgbBasisClosed:C8,interpolateRound:Ba,interpolateSinebow:vk,interpolateSpectral:jE,interpolateString:el,interpolateTransformCss:C0,interpolateTransformSvg:I0,interpolateTurbo:xk,interpolateViridis:_k,interpolateWarm:pk,interpolateYlGn:rk,interpolateYlGnBu:nk,interpolateYlOrBr:ik,interpolateYlOrRd:ok,interpolateZoom:N0,interrupt:Hn,intersection:m5,interval:t4,isoFormat:bE,isoParse:_E,json:y9,lab:Fa,lch:D8,least:e5,leastIndex:Eg,line:bu,lineRadial:$v,link:vu,linkHorizontal:Ok,linkRadial:Bk,linkVertical:Uk,local:Xg,map:f5,matcher:Fc,max:ki,maxIndex:Lc,mean:jA,median:XA,medianIndex:VA,merge:kc,min:xa,minIndex:Ec,mode:KA,namespace:Ni,namespaces:Rc,nice:Pc,now:qi,pack:QP,packEnclose:qP,packSiblings:ZP,pairs:QA,partition:JP,path:Ml,pathRound:e7,permute:Mg,pie:xv,piecewise:O0,pointRadial:Io,pointer:se,pointers:l8,polygonArea:pD,polygonCentroid:gD,polygonContains:vD,polygonHull:bD,polygonLength:xD,precisionFixed:X1,precisionPrefix:V1,precisionRound:Z1,quadtree:us,quantile:Ii,quantileIndex:Lg,quantileSorted:Dg,quantize:Z8,quickselect:_a,radialArea:Sv,radialLine:$v,randomBates:SD,randomBernoulli:TD,randomBeta:Cy,randomBinomial:Iy,randomCauchy:DD,randomExponential:AD,randomGamma:Uf,randomGeometric:ky,randomInt:wD,randomIrwinHall:Ey,randomLcg:ID,randomLogNormal:$D,randomLogistic:LD,randomNormal:Of,randomPareto:MD,randomPoisson:ED,randomUniform:_D,randomWeibull:PD,range:hn,rank:t5,reduce:h5,reverse:d5,rgb:Cr,ribbon:c7,ribbonArrow:l7,rollup:$g,rollups:Sg,scaleBand:Hf,scaleDiverging:Ob,scaleDivergingLog:Ub,scaleDivergingPow:ch,scaleDivergingSqrt:TE,scaleDivergingSymlog:Bb,scaleIdentity:zy,scaleImplicit:Bf,scaleLinear:Xf,scaleLog:Hy,scaleOrdinal:Yf,scalePoint:Wf,scalePow:eu,scaleQuantile:Ky,scaleQuantize:Qy,scaleRadial:Zy,scaleSequential:Nb,scaleSequentialLog:Fb,scaleSequentialPow:uh,scaleSequentialQuantile:zb,scaleSequentialSqrt:ME,scaleSequentialSymlog:Gb,scaleSqrt:qD,scaleSymlog:jy,scaleThreshold:Jy,scaleTime:SE,scaleUtc:AE,scan:r5,schemeAccent:DE,schemeBlues:lv,schemeBrBG:Yb,schemeBuGn:Qb,schemeBuPu:Jb,schemeCategory10:PE,schemeDark2:LE,schemeGnBu:tv,schemeGreens:fv,schemeGreys:hv,schemeObservable10:EE,schemeOrRd:ev,schemeOranges:gv,schemePRGn:Hb,schemePaired:kE,schemePastel1:CE,schemePastel2:IE,schemePiYG:Wb,schemePuBu:rv,schemePuBuGn:nv,schemePuOr:qb,schemePuRd:iv,schemePurples:dv,schemeRdBu:jb,schemeRdGy:Xb,schemeRdPu:ov,schemeRdYlBu:Vb,schemeRdYlGn:Zb,schemeReds:pv,schemeSet1:RE,schemeSet2:NE,schemeSet3:FE,schemeSpectral:Kb,schemeTableau10:GE,schemeYlGn:sv,schemeYlGnBu:av,schemeYlOrBr:uv,schemeYlOrRd:cv,select:V,selectAll:f8,selection:Gn,selector:Ta,selectorAll:Nc,shuffle:i5,shuffler:kg,some:c5,sort:Ac,stack:yC,stackOffsetDiverging:vC,stackOffsetExpand:bC,stackOffsetNone:ai,stackOffsetSilhouette:xC,stackOffsetWiggle:_C,stackOrderAppearance:n2,stackOrderAscending:r2,stackOrderDescending:$C,stackOrderInsideOut:SC,stackOrderNone:si,stackOrderReverse:AC,stratify:rD,style:Fn,subset:b5,sum:o5,superset:Ig,svg:x9,symbol:Kk,symbolAsterisk:Pv,symbolCircle:xu,symbolCross:Dv,symbolDiamond:Ev,symbolDiamond2:kv,symbolPlus:Cv,symbolSquare:Iv,symbolSquare2:Rv,symbolStar:Fv,symbolTimes:mh,symbolTriangle:Gv,symbolTriangle2:zv,symbolWye:Ov,symbolX:mh,symbols:Uv,symbolsFill:Uv,symbolsStroke:Zk,text:ss,thresholdFreedmanDiaconis:WA,thresholdScott:qA,thresholdSturges:Dc,tickFormat:Gy,tickIncrement:Rn,tickStep:va,ticks:In,timeDay:ei,timeDays:QD,get timeFormat(){return oh},timeFormatDefaultLocale:Ib,timeFormatLocale:bb,timeFriday:ob,timeFridays:oL,timeHour:iu,timeHours:ZD,timeInterval:Tt,timeMillisecond:ti,timeMilliseconds:tb,timeMinute:nu,timeMinutes:XD,timeMonday:To,timeMondays:eL,timeMonth:au,timeMonths:dL,get timeParse(){return Cb},timeSaturday:ab,timeSaturdays:aL,timeSecond:an,timeSeconds:nb,timeSunday:ni,timeSundays:sb,timeThursday:rr,timeThursdays:iL,timeTickInterval:yb,timeTicks:mb,timeTuesday:rb,timeTuesdays:nL,timeWednesday:ib,timeWednesdays:rL,timeWeek:ni,timeWeeks:sb,timeYear:Be,timeYears:gL,timeout:il,timer:Xa,timerFlush:Y0,transition:V0,transpose:Cg,tree:lD,treemap:Dy,treemapBinary:fD,treemapDice:So,treemapResquarify:dD,treemapSlice:Qs,treemapSliceDice:hD,treemapSquarify:zf,tsv:p9,tsvFormat:t9,tsvFormatBody:e9,tsvFormatRow:r9,tsvFormatRows:n9,tsvFormatValue:i9,tsvParse:D1,tsvParseRows:J7,union:v5,unixDay:nh,unixDays:tL,utcDay:Mo,utcDays:JD,get utcFormat(){return uu},utcFriday:lb,utcFridays:fL,utcHour:ou,utcHours:KD,utcMillisecond:ti,utcMilliseconds:tb,utcMinute:ru,utcMinutes:VD,utcMonday:Po,utcMondays:sL,utcMonth:su,utcMonths:pL,get utcParse(){return ah},utcSaturday:fb,utcSaturdays:hL,utcSecond:an,utcSeconds:nb,utcSunday:ri,utcSundays:hb,utcThursday:or,utcThursdays:lL,utcTickInterval:gb,utcTicks:pb,utcTuesday:ub,utcTuesdays:uL,utcWednesday:cb,utcWednesdays:cL,utcWeek:ri,utcWeeks:hb,utcYear:Ye,utcYears:mL,variance:gg,window:Gc,xml:b9,zip:s5,zoom:s2,zoomIdentity:Tu,zoomTransform:o2},Symbol.toStringTag,{value:"Module"}));function u2(t){try{return t.node().getBBox()}catch(e){throw new Error(e)}}function kC(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 ar(t){return t.substring(0,4)!=="ease"?Xi:$h[t]??Xi}function Pu({axisWidth:t,innerRadius:e,outerRadius:n,padAngle:r,cornerRadius:i}){const o=Xf().domain([0,1]).range([0,t/2]),a=o(n);return bv().innerRadius(o(e)).outerRadius(a).padAngle(r).padRadius(a).cornerRadius(i)}const Sh=(t,e)=>e instanceof Function?e(t):eo(e)(t);function c2(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 CC(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 IC(t){const e=t.filter(n=>n.value!=null&&n.visible!=!1).map(n=>n.value);return CC(e)}function Et(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 Ah({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 ot(t,e,n){const r=n?`--${n}`:"";return`orbcharts-${t}__${e}${r}`}function An(t,e){const r=Math.random().toString(36).substr(2,5);return ot(t,e,r)}const ui=({selection:t,pluginName:e,clipPathID:n,existSeriesLabels$:r,gridContainer$:i,gridAxesTransform$:o,gridGraphicTransform$:a})=>{const s=ot(e,"series"),u=ot(e,"axes"),c=ot(e,"graphic"),l=r.pipe(U((p,g)=>t.selectAll(`g.${s}`).data(p,m=>m).join(m=>m.append("g").classed(s,!0).each((y,x,v)=>{V(v[x]).selectAll(`g.${u}`).data([x]).join(b=>b.append("g").classed(u,!0).attr("clip-path",`url(#${n})`).each((_,w,S)=>{V(S[w]).selectAll("defs").data([w]).join("defs"),V(S[w]).selectAll("g").data([w]).join("g").classed(c,!0)}),b=>b,b=>b.remove())}),m=>m,m=>m.remove())),B(p=>W({seriesSelection:fi(p),gridContainer:i})),U(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)),Le(1)),h=W({seriesSelection:l,gridAxesTransform:o}).pipe(B(async p=>p),U(p=>p.seriesSelection.select(`g.${u}`).style("transform",p.gridAxesTransform.value)),Le(1)),f=h.pipe(U(p=>p.select("defs")),Le(1)),d=W({axesSelection:h,gridGraphicTransform:a}).pipe(B(async p=>p),U(p=>{const g=p.axesSelection.select(`g.${c}`);return g.transition().duration(50).style("transform",p.gridGraphicTransform.value),g}),Le(1));return{seriesSelection$:l,axesSelection$:h,defsSelection$:f,graphicGSelection$:d}},Mh=({fullDataFormatter$:t,gridAxesSize$:e,computedData$:n,fullChartParams$:r})=>{const i=new nt,o=new lt(a=>{W({dataFormatter:t,computedData:n}).pipe(F(i),B(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=>{W({dataFormatter:t,axisSize:e,fullChartParams:r,scaleRangeGroupLabels:o}).pipe(F(i),B(async s=>s)).subscribe(s=>{const u=s.dataFormatter.grid.valueAxis.position==="right"||s.dataFormatter.grid.valueAxis.position==="bottom",c=yA({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 RC(t="curveLinear"){return bu().x(e=>e.axisX).y(e=>e.axisY).curve($h[t])}function NC(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 FC({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 GC({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?V(o[i]).style("opacity",1):V(o[i]).style("opacity",n.styles.unhighlightedOpacity)})}function zC({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)=>{V(a[o]).selectAll("rect").data([i]).join(s=>{const u=s.append("rect");return u.transition().duration(n).ease(ar(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 l2=(t,{selection:e,computedData$:n,existSeriesLabels$: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 nt,m=An(t,"clipPath-box"),y=ot(t,"path"),{seriesSelection$:x,axesSelection$:v,defsSelection$:b,graphicGSelection$:_}=ui({selection:e,pluginName:t,clipPathID:m,existSeriesLabels$:r,gridContainer$:d,gridAxesTransform$:c,gridGraphicTransform$:l}),w=new lt(D=>{const T=a.pipe(F(g)).subscribe(C=>{if(!C)return;const P=RC(C.lineCurve);D.next(P)});return()=>{T.unsubscribe()}}),S=new lt(D=>{n.pipe(F(g),B(async T=>T)).subscribe(T=>{const C=T[0]&&T[0][0]?T.map(P=>P[0].seriesLabel):[];D.next(C)})}),k=u.pipe(U(D=>D.transitionDuration),ft()),$=u.pipe(U(D=>D.transitionEase),ft());W({defsSelection:b,seriesLabels:S,axisSize:h,transitionDuration:k,transitionEase:$}).pipe(F(g),B(async D=>D)).subscribe(D=>{const C=[{id:m,width:D.axisSize.width,height:D.axisSize.height}].concat(D.seriesLabels.map(P=>({id:`orbcharts__clipPath_${P}`,width:D.axisSize.width,height:D.axisSize.height})));zC({defsSelection:D.defsSelection,clipPathData:C,transitionDuration:D.transitionDuration,transitionEase:D.transitionEase})});const E=n.pipe(U(D=>{const T=new Map;return D.flat().forEach(C=>T.set(C.id,C)),T})),A=Mh({fullDataFormatter$:s,gridAxesSize$:h,computedData$:n,fullChartParams$:u}),I=u.pipe(F(g),U(D=>D.highlightTarget),ft());return W({graphicGSelection:_,seriesLabels:S,computedData:n,SeriesDataMap:i,GroupDataMap:o,linePath:w,params:a,highlightTarget:I,gridGroupPositionFn:A}).pipe(F(g),B(async D=>D)).subscribe(D=>{D.graphicGSelection.each((T,C,P)=>{const R=NC(D.computedData[C]??[]);FC({selection:V(P[C]),pathClassName:y,linePath:D.linePath,segmentData:R,params:D.params}).on("mouseover",(M,N)=>{M.stopPropagation();const z=N[0]?N[0].seriesLabel:"",{groupIndex:L,groupLabel:j}=D.gridGroupPositionFn(M),X=D.GroupDataMap.get(j).find(Q=>Q.seriesLabel===z)??N[0];p.next({type:"grid",eventName:"mouseover",pluginName:t,highlightTarget:D.highlightTarget,datum:X,gridIndex:X.gridIndex,series:D.SeriesDataMap.get(X.seriesLabel),seriesIndex:X.seriesIndex,seriesLabel:X.seriesLabel,groups:D.GroupDataMap.get(X.groupLabel),groupIndex:X.groupIndex,groupLabel:X.groupLabel,event:M,data:D.computedData})}).on("mousemove",(M,N)=>{M.stopPropagation();const z=N[0]?N[0].seriesLabel:"",{groupIndex:L,groupLabel:j}=D.gridGroupPositionFn(M),X=D.GroupDataMap.get(j).find(Q=>Q.seriesLabel===z)??N[0];p.next({type:"grid",eventName:"mousemove",pluginName:t,highlightTarget:D.highlightTarget,datum:X,gridIndex:X.gridIndex,series:D.SeriesDataMap.get(X.seriesLabel),seriesIndex:X.seriesIndex,seriesLabel:X.seriesLabel,groups:D.GroupDataMap.get(X.groupLabel),groupIndex:X.groupIndex,groupLabel:X.groupLabel,event:M,data:D.computedData})}).on("mouseout",(M,N)=>{M.stopPropagation();const z=N[0]?N[0].seriesLabel:"",{groupIndex:L,groupLabel:j}=D.gridGroupPositionFn(M),X=D.GroupDataMap.get(j).find(Q=>Q.seriesLabel===z)??N[0];p.next({type:"grid",eventName:"mouseout",pluginName:t,highlightTarget:D.highlightTarget,datum:X,gridIndex:X.gridIndex,series:D.SeriesDataMap.get(X.seriesLabel),seriesIndex:X.seriesIndex,seriesLabel:X.seriesLabel,groups:D.GroupDataMap.get(X.groupLabel),groupIndex:X.groupIndex,groupLabel:X.groupLabel,event:M,data:D.computedData})}).on("click",(M,N)=>{M.stopPropagation();const z=N[0]?N[0].seriesLabel:"",{groupIndex:L,groupLabel:j}=D.gridGroupPositionFn(M),X=D.GroupDataMap.get(j).find(Q=>Q.seriesLabel===z)??N[0];p.next({type:"grid",eventName:"click",pluginName:t,highlightTarget:D.highlightTarget,datum:X,gridIndex:X.gridIndex,series:D.SeriesDataMap.get(X.seriesLabel),seriesIndex:X.seriesIndex,seriesLabel:X.seriesLabel,groups:D.GroupDataMap.get(X.groupLabel),groupIndex:X.groupIndex,groupLabel:X.groupLabel,event:M,data:D.computedData})})})}),u.pipe(F(g),hi(D=>D.highlightTarget==="series"),B(D=>W({graphicGSelection:_,gridHighlight:f,DataMap:E,fullChartParams:u}).pipe(F(g),B(async T=>T)))).subscribe(D=>{const T=D.gridHighlight[0]?D.gridHighlight[0].seriesLabel:null;GC({selection:D.graphicGSelection,seriesLabel:T,fullChartParams:D.fullChartParams})}),()=>{g.next(void 0)}},f2="Lines",OC=ae(f2,cr)(({selection:t,name:e,observer:n,subject:r})=>{const i=new nt,o=l2(f2,{selection:t,computedData$:n.computedData$,existSeriesLabels$:n.existSeriesLabels$,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()}});function UC(t="curveLinear",e){return hh().x(n=>n.axisX).y0(n=>e).y1(n=>n.axisY).curve($h[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 YC({selection:t,pathClassName:e,segmentData:n,areaPath:r,linearGradientIds:i,params:o}){return t.selectAll("path").data(n,(s,u)=>s.length?`${s[0].id}_${s[s.length-1].id}`:u).join(s=>s.append("path").classed(e,!0).attr("fill","none").style("vector-effect","non-scaling-stroke").style("cursor","pointer"),s=>s,s=>s.remove()).attr("fill",(s,u)=>s[0]?`url(#${i[s[0].seriesIndex]})`:"").attr("d",s=>r(s))}function HC({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?V(o[i]).style("opacity",1):V(o[i]).style("opacity",n.styles.unhighlightedOpacity)})}function WC({defsSelection:t,computedData:e,linearGradientIds:n,params:r}){t.selectAll("linearGradient").data(e??[]).join(i=>i.append("linearGradient").attr("x1","0%").attr("x2","0%").attr("y1","100%").attr("y2","0%").attr("spreadMethod","pad"),i=>i,i=>i.remove()).attr("id",(i,o)=>i[0]?n[i[0].seriesIndex]:"").html((i,o)=>{const a=i[0]?i[0].color:"";return`
10
10
  <stop offset="0%" stop-color="${a}" stop-opacity="${r.linearGradientOpacity[0]}"/>
11
11
  <stop offset="100%" stop-color="${a}" stop-opacity="${r.linearGradientOpacity[1]}"/>
12
- `})}function zC({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)=>{V(a[o]).selectAll("rect").data([i]).join(s=>{const u=s.append("rect");return u.transition().duration(n).ease(ar(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 OC=(t,{selection:e,computedData$:n,existSeriesLabels$:r,SeriesDataMap$:i,GroupDataMap$:o,fullParams$:a,fullDataFormatter$:s,fullChartParams$:u,gridAxesTransform$:c,gridGraphicTransform$:l,gridAxesSize$:h,gridHighlight$:f,gridContainer$:d,layout$:p,event$:g})=>{const m=new rt,y=$n(t,"clipPath-box"),v=ot(t,"path"),{seriesSelection$:x,axesSelection$:b,defsSelection$:w,graphicGSelection$:$}=si({selection:e,pluginName:t,clipPathID:y,existSeriesLabels$:r,gridContainer$:d,gridAxesTransform$:c,gridGraphicTransform$:l}),A=l.pipe(F(m),U(S=>-S.translate[1]/S.scale[1])),_=new lt(S=>{const R=H({fullParams:a,valueAxisStart:A}).pipe(F(m)).subscribe(G=>{const M=IC(G.fullParams.lineCurve,G.valueAxisStart);S.next(M)});return()=>{R.unsubscribe()}}),L=new lt(S=>{n.pipe(F(m),B(async R=>R)).subscribe(R=>{const G=R[0]&&R[0][0]?R.map(M=>M[0].seriesLabel):[];S.next(G)})}),E=u.pipe(U(S=>S.transitionDuration),ft()),T=u.pipe(U(S=>S.transitionEase),ft());H({defsSelection:w,seriesLabels:L,axisSize:h,transitionDuration:E,transitionEase:T}).pipe(F(m),B(async S=>S)).subscribe(S=>{const G=[{id:y,width:S.axisSize.width,height:S.axisSize.height}].concat(S.seriesLabels.map(M=>({id:`orbcharts__clipPath_${M}`,width:S.axisSize.width,height:S.axisSize.height})));zC({defsSelection:S.defsSelection,clipPathData:G,transitionDuration:S.transitionDuration,transitionEase:S.transitionEase})});const I=n.pipe(U(S=>{const R=new Map;return S.flat().forEach(G=>R.set(G.id,G)),R})),P=Sh({fullDataFormatter$:s,gridAxesSize$:h,computedData$:n,fullChartParams$:u}),D=u.pipe(F(m),U(S=>S.highlightTarget),ft()),C=L.pipe(F(m),U(S=>S.map((R,G)=>$n(t,`lineargradient-${R}`))));return H({graphicGSelection:$,defsSelection:w,seriesLabels:L,computedData:n,linearGradientIds:C,SeriesDataMap:i,GroupDataMap:o,areaPath:_,params:a,highlightTarget:D,gridGroupPositionFn:P}).pipe(F(m),B(async S=>S)).subscribe(S=>{S.graphicGSelection.each((R,G,M)=>{const N=RC(S.computedData[G]??[]),z=NC({selection:V(M[G]),pathClassName:v,areaPath:S.areaPath,segmentData:N,linearGradientIds:S.linearGradientIds,params:S.params});GC({defsSelection:S.defsSelection,computedData:S.computedData,linearGradientIds:S.linearGradientIds,params:S.params}),z.on("mouseover",(k,Y)=>{k.stopPropagation();const j=Y[0]?Y[0].seriesLabel:"",{groupIndex:W,groupLabel:X}=S.gridGroupPositionFn(k),O=S.GroupDataMap.get(X).find(tt=>tt.seriesLabel===j)??Y[0];g.next({type:"grid",eventName:"mouseover",pluginName:t,highlightTarget:S.highlightTarget,datum:O,gridIndex:O.gridIndex,series:S.SeriesDataMap.get(O.seriesLabel),seriesIndex:O.seriesIndex,seriesLabel:O.seriesLabel,groups:S.GroupDataMap.get(O.groupLabel),groupIndex:O.groupIndex,groupLabel:O.groupLabel,event:k,data:S.computedData})}).on("mousemove",(k,Y)=>{k.stopPropagation();const j=Y[0]?Y[0].seriesLabel:"",{groupIndex:W,groupLabel:X}=S.gridGroupPositionFn(k),O=S.GroupDataMap.get(X).find(tt=>tt.seriesLabel===j)??Y[0];g.next({type:"grid",eventName:"mousemove",pluginName:t,highlightTarget:S.highlightTarget,datum:O,gridIndex:O.gridIndex,series:S.SeriesDataMap.get(O.seriesLabel),seriesIndex:O.seriesIndex,seriesLabel:O.seriesLabel,groups:S.GroupDataMap.get(O.groupLabel),groupIndex:O.groupIndex,groupLabel:O.groupLabel,event:k,data:S.computedData})}).on("mouseout",(k,Y)=>{k.stopPropagation();const j=Y[0]?Y[0].seriesLabel:"",{groupIndex:W,groupLabel:X}=S.gridGroupPositionFn(k),O=S.GroupDataMap.get(X).find(tt=>tt.seriesLabel===j)??Y[0];g.next({type:"grid",eventName:"mouseout",pluginName:t,highlightTarget:S.highlightTarget,datum:O,gridIndex:O.gridIndex,series:S.SeriesDataMap.get(O.seriesLabel),seriesIndex:O.seriesIndex,seriesLabel:O.seriesLabel,groups:S.GroupDataMap.get(O.groupLabel),groupIndex:O.groupIndex,groupLabel:O.groupLabel,event:k,data:S.computedData})}).on("click",(k,Y)=>{k.stopPropagation();const j=Y[0]?Y[0].seriesLabel:"",{groupIndex:W,groupLabel:X}=S.gridGroupPositionFn(k),O=S.GroupDataMap.get(X).find(tt=>tt.seriesLabel===j)??Y[0];g.next({type:"grid",eventName:"click",pluginName:t,highlightTarget:S.highlightTarget,datum:O,gridIndex:O.gridIndex,series:S.SeriesDataMap.get(O.seriesLabel),seriesIndex:O.seriesIndex,seriesLabel:O.seriesLabel,groups:S.GroupDataMap.get(O.groupLabel),groupIndex:O.groupIndex,groupLabel:O.groupLabel,event:k,data:S.computedData})})})}),u.pipe(F(m),fi(S=>S.highlightTarget==="series"),B(S=>H({graphicGSelection:$,highlight:f,DataMap:I,fullChartParams:u}).pipe(F(m),B(async R=>R)))).subscribe(S=>{const R=S.DataMap.get(S.highlight[0]);FC({selection:S.graphicGSelection,seriesLabel:R&&R.seriesLabel?R.seriesLabel:null,fullChartParams:S.fullChartParams})}),()=>{m.next(void 0)}},f2="LineAreas",UC=ae(f2,Uh)(({selection:t,name:e,observer:n,subject:r})=>{const i=new rt,o=OC(f2,{selection:t,computedData$:n.computedData$,existSeriesLabels$:n.existSeriesLabels$,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$,layout$:n.layout$,event$:r.event$});return()=>{i.next(void 0),o()}}),h2=.3;function d2({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 BC(t,e,n){const r=t/2,i=t*e.length+n.barPadding*e.length;return Yf().domain(e).range([-i/2+r,i/2-r])}function YC(t,e){return t<=1?0:e/(t-1)*h2}function WC(t,e){return t<=1?e:e*(1-h2)}function HC({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)=>{V(y[m]).selectAll(`rect.${e}`).data(n[m]??[],v=>v.id).join(v=>v.append("rect").classed(e,!0).attr("cursor","pointer").attr("height",x=>0),v=>v,v=>v.remove()).attr("transform",(v,x)=>`translate(${(v?v.axisX:0)-d}, 0)`).attr("fill",v=>v.color).attr("y",v=>v.axisY<r[m]?v.axisY:r[m]).attr("x",v=>f?0:o(v.seriesLabel)).attr("width",u).attr("rx",c[m][0]??1).attr("ry",c[m][1]??1).transition().duration(h).ease(ar(s.transitionEase)).delay((v,x)=>v.groupIndex*l).attr("height",v=>Math.abs(v.axisYFromZero))}),t.selectAll(`rect.${e}`)}function qC({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)=>{V(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 XC({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)?V(o[i]).style("opacity",1):V(o[i]).style("opacity",n.styles.unhighlightedOpacity)})}const Ah=(t,{selection:e,computedData$:n,visibleComputedData$:r,existSeriesLabels$: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 rt,v=$n(t,"clipPath-box"),x=ot(t,"rect"),{seriesSelection$:b,axesSelection$:w,defsSelection$:$,graphicGSelection$:A}=si({selection:e,pluginName:t,clipPathID:v,existSeriesLabels$:i,gridContainer$:p,gridAxesTransform$:c,gridGraphicTransform$:l}),_=r.pipe(F(y),U(M=>M.map(N=>N[0]?N[0].axisY-N[0].axisYFromZero:0)),ft()),L=H({computedData:n,visibleComputedData:r,params:s,gridAxesSize:f,isSeriesPositionSeprate:g}).pipe(F(y),B(async M=>M),U(M=>M.params.barWidth?M.params.barWidth:M.isSeriesPositionSeprate?d2({axisWidth:M.gridAxesSize.width,groupAmount:M.computedData[0]?M.computedData[0].length:0,barAmountOfGroup:1,barPadding:M.params.barPadding,barGroupPadding:M.params.barGroupPadding}):d2({axisWidth:M.gridAxesSize.width,groupAmount:M.computedData[0]?M.computedData[0].length:0,barAmountOfGroup:M.visibleComputedData.length,barPadding:M.params.barPadding,barGroupPadding:M.params.barGroupPadding})),ft()),E=H({computedData:n,barWidth:L,params:s,gridGraphicReverseScale:h}).pipe(F(y),B(async M=>M),U(M=>{const N=M.barWidth/2,z=M.params.barRadius===!0?N:M.params.barRadius===!1?0:typeof M.params.barRadius=="number"?M.params.barRadius:0;return M.computedData.map((k,Y)=>{const j=M.gridGraphicReverseScale[Y]??M.gridGraphicReverseScale[0];let W=z*j[0],X=z*j[1];if(W>N){const Q=N/W;W=W*Q,X=X*Q}return[W,X]})})),T=r.pipe(F(y),U(M=>{const N=new Set;return M.forEach(z=>{z.forEach(k=>{N.add(k.seriesLabel)})}),Array.from(N)})),I=r.pipe(F(y),U(M=>{const N=new Set;return M.forEach(z=>{z.forEach(k=>{N.add(k.groupLabel)})}),Array.from(N)})),P=H({seriesLabels:T,barWidth:L,params:s}).pipe(F(y),B(async M=>M),U(M=>BC(M.barWidth,M.seriesLabels,M.params))),D=u.pipe(F(y),U(M=>M.transitionDuration),ft()),C=new lt(M=>{H({groupLabels:I,transitionDuration:D}).pipe(B(async N=>N)).subscribe(N=>{const z=YC(N.groupLabels.length,N.transitionDuration);M.next(z)})}).pipe(F(y),ft()),S=new lt(M=>{H({groupLabels:I,transitionDuration:D}).pipe(B(async N=>N)).subscribe(N=>{const z=WC(N.groupLabels.length,N.transitionDuration);M.next(z)})}).pipe(F(y),ft());H({defsSelection:$,gridAxesSize:f}).pipe(F(y),B(async M=>M)).subscribe(M=>{const N=[{id:v,width:M.gridAxesSize.width,height:M.gridAxesSize.height}];qC({defsSelection:M.defsSelection,clipPathData:N})});const R=u.pipe(F(y),U(M=>M.highlightTarget),ft()),G=new rt;return H({graphicGSelection:A,computedData:n,zeroYArr:_,groupLabels:I,barScale:P,params:s,chartParams:u,highlightTarget:R,barWidth:L,transformedBarRadius:E,delayGroup:C,transitionItem:S,SeriesDataMap:o,GroupDataMap:a,isSeriesPositionSeprate:g}).pipe(F(y),B(async M=>M)).subscribe(M=>{const N=HC({graphicGSelection:M.graphicGSelection,rectClassName:x,computedData:M.computedData,zeroYArr:M.zeroYArr,groupLabels:M.groupLabels,barScale:M.barScale,params:M.params,chartParams:M.chartParams,barWidth:M.barWidth,transformedBarRadius:M.transformedBarRadius,delayGroup:M.delayGroup,transitionItem:M.transitionItem,isSeriesPositionSeprate:M.isSeriesPositionSeprate});N.on("mouseover",(z,k)=>{z.stopPropagation(),m.next({type:"grid",eventName:"mouseover",pluginName:t,highlightTarget:M.highlightTarget,datum:k,gridIndex:k.gridIndex,series:M.SeriesDataMap.get(k.seriesLabel),seriesIndex:k.seriesIndex,seriesLabel:k.seriesLabel,groups:M.GroupDataMap.get(k.groupLabel),groupIndex:k.groupIndex,groupLabel:k.groupLabel,event:z,data:M.computedData})}).on("mousemove",(z,k)=>{z.stopPropagation(),m.next({type:"grid",eventName:"mousemove",pluginName:t,highlightTarget:M.highlightTarget,datum:k,gridIndex:k.gridIndex,series:M.SeriesDataMap.get(k.seriesLabel),seriesIndex:k.seriesIndex,seriesLabel:k.seriesLabel,groups:M.GroupDataMap.get(k.groupLabel),groupIndex:k.groupIndex,groupLabel:k.groupLabel,event:z,data:M.computedData})}).on("mouseout",(z,k)=>{z.stopPropagation(),m.next({type:"grid",eventName:"mouseout",pluginName:t,highlightTarget:M.highlightTarget,datum:k,gridIndex:k.gridIndex,series:M.SeriesDataMap.get(k.seriesLabel),seriesIndex:k.seriesIndex,seriesLabel:k.seriesLabel,groups:M.GroupDataMap.get(k.groupLabel),groupIndex:k.groupIndex,groupLabel:k.groupLabel,event:z,data:M.computedData})}).on("click",(z,k)=>{z.stopPropagation(),m.next({type:"grid",eventName:"click",pluginName:t,highlightTarget:M.highlightTarget,datum:k,gridIndex:k.gridIndex,series:M.SeriesDataMap.get(k.seriesLabel),seriesIndex:k.seriesIndex,seriesLabel:k.seriesLabel,groups:M.GroupDataMap.get(k.groupLabel),groupIndex:k.groupIndex,groupLabel:k.groupLabel,event:z,data:M.computedData})}),G.next(N)}),H({barSelection:G,highlight:d,fullChartParams:u}).pipe(F(y),B(async M=>M)).subscribe(M=>{XC({selection:M.barSelection,ids:M.highlight,fullChartParams:M.fullChartParams})}),()=>{y.next(void 0)}},p2="Bars",jC=ae(p2,Fo)(({selection:t,name:e,subject:n,observer:r})=>{const i=new rt,o=Ah(p2,{selection:t,computedData$:r.computedData$,visibleComputedData$:r.visibleComputedData$,existSeriesLabels$:r.existSeriesLabels$,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()}}),g2="BarsDiverging",VC=ae(g2,Fo)(({selection:t,name:e,subject:n,observer:r})=>{const i=new rt,o=Ah(g2,{selection:t,computedData$:r.computedData$,visibleComputedData$:r.visibleComputedData$,existSeriesLabels$:r.existSeriesLabels$,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$:li(!0),event$:n.event$});return()=>{i.next(void 0),o()}}),m2=.3;function ZC({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)*m2}function QC(t,e){return t<=1?e:e*(1-m2)}function JC({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)=>{V(m[g]).selectAll(`rect.${e}`).data(n[g]??[],y=>y.id).join(y=>y.append("rect").classed(e,!0).attr("cursor","pointer").attr("height",v=>0),y=>y,y=>y.remove()).attr("transform",(y,v)=>`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(ar(a.transitionEase)).delay((y,v)=>y.groupIndex*c).attr("y",y=>y._barStartY).attr("height",y=>Math.abs(y._barHeight))}),t.selectAll(`rect.${e}`)}function tI({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)=>{V(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 eI({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)?V(o[i]).style("opacity",1):V(o[i]).style("opacity",n.styles.unhighlightedOpacity)})}const y2=(t,{selection:e,computedData$:n,visibleComputedData$:r,existSeriesLabels$: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 v=new rt,x=$n(t,"clipPath-box"),b=ot(t,"rect"),{seriesSelection$:w,axesSelection$:$,defsSelection$:A,graphicGSelection$:_}=si({selection:e,pluginName:t,clipPathID:x,existSeriesLabels$:i,gridContainer$:g,gridAxesTransform$:l,gridGraphicTransform$:h}),L=r.pipe(F(v),U(k=>k[0]&&k[0][0]?k[0][0].axisY-k[0][0].axisYFromZero:0),ft()),E=H({computedData:n,params:s,axisSize:d,isSeriesPositionSeprate:m}).pipe(F(v),B(async k=>k),U(k=>k.params.barWidth?k.params.barWidth:ZC({axisWidth:k.axisSize.width,groupAmount:k.computedData[0]?k.computedData[0].length:0,barGroupPadding:k.params.barGroupPadding})),ft()),T=H({computedData:n,barWidth:E,params:s,gridGraphicReverseScale:f}).pipe(F(v),B(async k=>k),U(k=>{const Y=k.barWidth/2,j=k.params.barRadius===!0?Y:k.params.barRadius===!1?0:typeof k.params.barRadius=="number"?k.params.barRadius:0;return k.computedData.map((W,X)=>{const Q=k.gridGraphicReverseScale[X]??k.gridGraphicReverseScale[0],ct=j*Q[0],O=j*Q[1];return[ct,O]})})),I=r.pipe(F(v),U(k=>{const Y=new Set;return k.forEach(j=>{j.forEach(W=>{Y.add(W.groupLabel)})}),Array.from(Y)})),P=c.pipe(F(v),U(k=>k.transitionDuration),ft()),D=new lt(k=>{H({groupLabels:I,transitionDuration:P}).pipe(B(async Y=>Y)).subscribe(Y=>{const j=KC(Y.groupLabels.length,Y.transitionDuration);k.next(j)})}).pipe(F(v),ft()),C=new lt(k=>{H({groupLabels:I,transitionDuration:P}).pipe(B(async Y=>Y)).subscribe(Y=>{const j=QC(Y.groupLabels.length,Y.transitionDuration);k.next(j)})}).pipe(F(v),ft()),S=H({computedData:n,dataFormatter:u}).pipe(F(v),B(async k=>k),U(k=>{const j=k.computedData[0]?k.computedData[0].length-1:0,W=k.dataFormatter.grid.groupAxis.scaleDomain[0]==="auto"?0-k.dataFormatter.grid.groupAxis.scalePadding:k.dataFormatter.grid.groupAxis.scaleDomain[0]-k.dataFormatter.grid.groupAxis.scalePadding,X=k.dataFormatter.grid.groupAxis.scaleDomain[1]==="auto"?j+k.dataFormatter.grid.groupAxis.scalePadding:k.dataFormatter.grid.groupAxis.scaleDomain[1]+k.dataFormatter.grid.groupAxis.scalePadding,Q=k.computedData.map(ct=>ct.filter((O,tt)=>O.groupIndex>=W&&O.groupIndex<=X));if(Q.length<=1)return 1;{const ct=Q.flat().map(q=>q.axisYFromZero),O=Math.max(...ct),tt=k.computedData[0]?k.computedData[0].map((q,xt)=>k.computedData.reduce((gt,Ft)=>gt+Ft[xt].axisYFromZero,0)):[],st=Math.max(...tt);return O/st}})),R=H({computedData:n,yRatio:S,zeroY:L}).pipe(F(v),U(k=>{let Y=k.computedData[0]?k.computedData[0].map(()=>k.zeroY):[];return k.computedData.map((j,W)=>j.map((X,Q)=>{const ct=Y[Q],O=X.axisYFromZero*k.yRatio;return Y[Q]=Y[Q]+O,{...X,_barStartY:ct,_barHeight:O}}))})),G=H({computedData:n,zeroY:L}).pipe(F(v),U(k=>k.computedData.map((Y,j)=>Y.map((W,X)=>({...W,_barStartY:k.zeroY,_barHeight:W.axisYFromZero}))))),M=m.pipe(B(k=>$d(()=>k,G,R)));H({defsSelection:A,gridAxesSize:d}).pipe(F(v),B(async k=>k)).subscribe(k=>{const Y=[{id:x,width:k.gridAxesSize.width,height:k.gridAxesSize.height}];tI({defsSelection:k.defsSelection,clipPathData:Y})});const N=c.pipe(F(v),U(k=>k.highlightTarget),ft()),z=new rt;return H({graphicGSelection:_,graphicData:M,zeroY:L,groupLabels:I,params:s,chartParams:c,highlightTarget:N,barWidth:E,transformedBarRadius:T,delayGroup:D,transitionItem:C,SeriesDataMap:o,GroupDataMap:a,isSeriesPositionSeprate:m}).pipe(F(v),B(async k=>k)).subscribe(k=>{const Y=JC({graphicGSelection:k.graphicGSelection,rectClassName:b,barData:k.graphicData,zeroY:k.zeroY,groupLabels:k.groupLabels,params:k.params,chartParams:k.chartParams,barWidth:k.barWidth,transformedBarRadius:k.transformedBarRadius,delayGroup:k.delayGroup,transitionItem:k.transitionItem,isSeriesPositionSeprate:k.isSeriesPositionSeprate});Y.on("mouseover",(j,W)=>{j.stopPropagation(),y.next({type:"grid",eventName:"mouseover",pluginName:t,highlightTarget:k.highlightTarget,datum:W,gridIndex:W.gridIndex,series:k.SeriesDataMap.get(W.seriesLabel),seriesIndex:W.seriesIndex,seriesLabel:W.seriesLabel,groups:k.GroupDataMap.get(W.groupLabel),groupIndex:W.groupIndex,groupLabel:W.groupLabel,event:j,data:k.graphicData})}).on("mousemove",(j,W)=>{j.stopPropagation(),y.next({type:"grid",eventName:"mousemove",pluginName:t,highlightTarget:k.highlightTarget,datum:W,gridIndex:W.gridIndex,series:k.SeriesDataMap.get(W.seriesLabel),seriesIndex:W.seriesIndex,seriesLabel:W.seriesLabel,groups:k.GroupDataMap.get(W.groupLabel),groupIndex:W.groupIndex,groupLabel:W.groupLabel,event:j,data:k.graphicData})}).on("mouseout",(j,W)=>{j.stopPropagation(),y.next({type:"grid",eventName:"mouseout",pluginName:t,highlightTarget:k.highlightTarget,datum:W,gridIndex:W.gridIndex,series:k.SeriesDataMap.get(W.seriesLabel),seriesIndex:W.seriesIndex,seriesLabel:W.seriesLabel,groups:k.GroupDataMap.get(W.groupLabel),groupIndex:W.groupIndex,groupLabel:W.groupLabel,event:j,data:k.graphicData})}).on("click",(j,W)=>{j.stopPropagation(),y.next({type:"grid",eventName:"click",pluginName:t,highlightTarget:k.highlightTarget,datum:W,gridIndex:W.gridIndex,series:k.SeriesDataMap.get(W.seriesLabel),seriesIndex:W.seriesIndex,seriesLabel:W.seriesLabel,groups:k.GroupDataMap.get(W.groupLabel),groupIndex:W.groupIndex,groupLabel:W.groupLabel,event:j,data:k.graphicData})}),z.next(Y)}),H({barSelection:z,highlight:p,fullChartParams:c}).pipe(F(v),B(async k=>k)).subscribe(k=>{eI({selection:k.barSelection,ids:k.highlight,fullChartParams:k.fullChartParams})}),()=>{v.next(void 0)}},b2="BarStack",nI=ae(b2,Wh)(({selection:t,name:e,subject:n,observer:r})=>{const i=new rt,o=y2(b2,{selection:t,computedData$:r.computedData$,visibleComputedData$:r.visibleComputedData$,existSeriesLabels$:r.existSeriesLabels$,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()}}),v2=.3;function x2({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 rI(t,e,n){const r=t/2,i=t*e.length+n.barPadding*e.length;return Yf().domain(e).range([-i/2+r,i/2-r])}function iI(t,e){return t<=1?0:e/(t-1)*v2}function oI(t,e){return t<=1?e:e*(1-v2)}function aI({graphicGSelection:t,pathGClassName:e,pathClassName:n,computedData:r,linearGradientIds:i,zeroYArr:o,groupLabels:a,barScale:s,params:u,chartParams:c,barWidth:l,delayGroup:h,transitionItem:f,isSeriesPositionSeprate:d}){const p=l/2;return t.each((m,y,v)=>{V(v[y]).selectAll(`g.${e}`).data(r[y]??[]).join(b=>{const w=b.append("g").classed(e,!0).attr("cursor","pointer");return w.append("path").classed(n,!0).style("vector-effect","non-scaling-stroke").attr("d",$=>{const A=-p,_=o[y],L=o[y];return`M${A},${_} L${A+l/2},${L} ${A+l},${_}`}),w},b=>b,b=>b.remove()).attr("transform",b=>`translate(${d?0:s(b.seriesLabel)}, 0)`).select(`path.${n}`).attr("height",b=>Math.abs(b.axisYFromZero)).attr("y",b=>b.axisY<o[y]?b.axisY:o[y]).attr("x",b=>d?0:s(b.seriesLabel)).style("fill",b=>`url(#${i[b.seriesIndex]})`).attr("stroke",b=>b.color).attr("transform",b=>`translate(${b?b.axisX:0}, 0)`).transition().duration(f).ease(ar(c.transitionEase)).delay((b,w)=>b.groupIndex*h).attr("d",b=>{const w=-p,$=o[y],A=b.axisY;return`M${w},${$} L${w+l/2},${A} ${w+l},${$}`})}),t.selectAll(`path.${n}`)}function sI({defsSelection:t,computedData:e,linearGradientIds:n,params:r}){t.selectAll("linearGradient").data(e??[]).join(i=>i.append("linearGradient").attr("x1","0%").attr("x2","0%").attr("y1","100%").attr("y2","0%").attr("spreadMethod","pad"),i=>i,i=>i.remove()).attr("id",(i,o)=>i[0]?n[i[0].seriesIndex]:"").html((i,o)=>{const a=i[0]?i[0].color:"";return`
12
+ `})}function qC({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)=>{V(a[o]).selectAll("rect").data([i]).join(s=>{const u=s.append("rect");return u.transition().duration(n).ease(ar(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 h2=(t,{selection:e,computedData$:n,existSeriesLabels$:r,SeriesDataMap$:i,GroupDataMap$:o,fullParams$:a,fullDataFormatter$:s,fullChartParams$:u,gridAxesTransform$:c,gridGraphicTransform$:l,gridAxesSize$:h,gridHighlight$:f,gridContainer$:d,layout$:p,event$:g})=>{const m=new nt,y=An(t,"clipPath-box"),x=ot(t,"path"),{seriesSelection$:v,axesSelection$:b,defsSelection$:_,graphicGSelection$:w}=ui({selection:e,pluginName:t,clipPathID:y,existSeriesLabels$:r,gridContainer$:d,gridAxesTransform$:c,gridGraphicTransform$:l}),S=l.pipe(F(m),U(P=>-P.translate[1]/P.scale[1])),k=new lt(P=>{const R=W({fullParams:a,valueAxisStart:S}).pipe(F(m)).subscribe(G=>{const M=UC(G.fullParams.lineCurve,G.valueAxisStart);P.next(M)});return()=>{R.unsubscribe()}}),$=new lt(P=>{n.pipe(F(m),B(async R=>R)).subscribe(R=>{const G=R[0]&&R[0][0]?R.map(M=>M[0].seriesLabel):[];P.next(G)})}),E=u.pipe(U(P=>P.transitionDuration),ft()),A=u.pipe(U(P=>P.transitionEase),ft());W({defsSelection:_,seriesLabels:$,axisSize:h,transitionDuration:E,transitionEase:A}).pipe(F(m),B(async P=>P)).subscribe(P=>{const G=[{id:y,width:P.axisSize.width,height:P.axisSize.height}].concat(P.seriesLabels.map(M=>({id:`orbcharts__clipPath_${M}`,width:P.axisSize.width,height:P.axisSize.height})));qC({defsSelection:P.defsSelection,clipPathData:G,transitionDuration:P.transitionDuration,transitionEase:P.transitionEase})});const I=n.pipe(U(P=>{const R=new Map;return P.flat().forEach(G=>R.set(G.id,G)),R})),D=Mh({fullDataFormatter$:s,gridAxesSize$:h,computedData$:n,fullChartParams$:u}),T=u.pipe(F(m),U(P=>P.highlightTarget),ft()),C=$.pipe(F(m),U(P=>P.map((R,G)=>An(t,`lineargradient-${R}`))));return W({graphicGSelection:w,defsSelection:_,seriesLabels:$,computedData:n,linearGradientIds:C,SeriesDataMap:i,GroupDataMap:o,areaPath:k,params:a,highlightTarget:T,gridGroupPositionFn:D}).pipe(F(m),B(async P=>P)).subscribe(P=>{P.graphicGSelection.each((R,G,M)=>{const N=BC(P.computedData[G]??[]),z=YC({selection:V(M[G]),pathClassName:x,areaPath:P.areaPath,segmentData:N,linearGradientIds:P.linearGradientIds,params:P.params});WC({defsSelection:P.defsSelection,computedData:P.computedData,linearGradientIds:P.linearGradientIds,params:P.params}),z.on("mouseover",(L,j)=>{L.stopPropagation();const q=j[0]?j[0].seriesLabel:"",{groupIndex:Y,groupLabel:X}=P.gridGroupPositionFn(L),O=P.GroupDataMap.get(X).find(tt=>tt.seriesLabel===q)??j[0];g.next({type:"grid",eventName:"mouseover",pluginName:t,highlightTarget:P.highlightTarget,datum:O,gridIndex:O.gridIndex,series:P.SeriesDataMap.get(O.seriesLabel),seriesIndex:O.seriesIndex,seriesLabel:O.seriesLabel,groups:P.GroupDataMap.get(O.groupLabel),groupIndex:O.groupIndex,groupLabel:O.groupLabel,event:L,data:P.computedData})}).on("mousemove",(L,j)=>{L.stopPropagation();const q=j[0]?j[0].seriesLabel:"",{groupIndex:Y,groupLabel:X}=P.gridGroupPositionFn(L),O=P.GroupDataMap.get(X).find(tt=>tt.seriesLabel===q)??j[0];g.next({type:"grid",eventName:"mousemove",pluginName:t,highlightTarget:P.highlightTarget,datum:O,gridIndex:O.gridIndex,series:P.SeriesDataMap.get(O.seriesLabel),seriesIndex:O.seriesIndex,seriesLabel:O.seriesLabel,groups:P.GroupDataMap.get(O.groupLabel),groupIndex:O.groupIndex,groupLabel:O.groupLabel,event:L,data:P.computedData})}).on("mouseout",(L,j)=>{L.stopPropagation();const q=j[0]?j[0].seriesLabel:"",{groupIndex:Y,groupLabel:X}=P.gridGroupPositionFn(L),O=P.GroupDataMap.get(X).find(tt=>tt.seriesLabel===q)??j[0];g.next({type:"grid",eventName:"mouseout",pluginName:t,highlightTarget:P.highlightTarget,datum:O,gridIndex:O.gridIndex,series:P.SeriesDataMap.get(O.seriesLabel),seriesIndex:O.seriesIndex,seriesLabel:O.seriesLabel,groups:P.GroupDataMap.get(O.groupLabel),groupIndex:O.groupIndex,groupLabel:O.groupLabel,event:L,data:P.computedData})}).on("click",(L,j)=>{L.stopPropagation();const q=j[0]?j[0].seriesLabel:"",{groupIndex:Y,groupLabel:X}=P.gridGroupPositionFn(L),O=P.GroupDataMap.get(X).find(tt=>tt.seriesLabel===q)??j[0];g.next({type:"grid",eventName:"click",pluginName:t,highlightTarget:P.highlightTarget,datum:O,gridIndex:O.gridIndex,series:P.SeriesDataMap.get(O.seriesLabel),seriesIndex:O.seriesIndex,seriesLabel:O.seriesLabel,groups:P.GroupDataMap.get(O.groupLabel),groupIndex:O.groupIndex,groupLabel:O.groupLabel,event:L,data:P.computedData})})})}),u.pipe(F(m),hi(P=>P.highlightTarget==="series"),B(P=>W({graphicGSelection:w,gridHighlight:f,DataMap:I,fullChartParams:u}).pipe(F(m),B(async R=>R)))).subscribe(P=>{const R=P.gridHighlight[0]?P.gridHighlight[0].seriesLabel:null;HC({selection:P.graphicGSelection,seriesLabel:R,fullChartParams:P.fullChartParams})}),()=>{m.next(void 0)}},d2="LineAreas",jC=ae(d2,Hh)(({selection:t,name:e,observer:n,subject:r})=>{const i=new nt,o=h2(d2,{selection:t,computedData$:n.computedData$,existSeriesLabels$:n.existSeriesLabels$,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$,layout$:n.layout$,event$:r.event$});return()=>{i.next(void 0),o()}}),p2=.3;function g2({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 XC(t,e,n){const r=t/2,i=t*e.length+n.barPadding*e.length;return Wf().domain(e).range([-i/2+r,i/2-r])}function VC(t,e){return t<=1?0:e/(t-1)*p2}function ZC(t,e){return t<=1?e:e*(1-p2)}function KC({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)=>{V(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(ar(s.transitionEase)).delay((x,v)=>x.groupIndex*l).attr("height",x=>Math.abs(x.axisYFromZero))}),t.selectAll(`rect.${e}`)}function QC({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)=>{V(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 JC({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)?V(o[i]).style("opacity",1):V(o[i]).style("opacity",n.styles.unhighlightedOpacity)})}const Th=(t,{selection:e,computedData$:n,visibleComputedData$:r,existSeriesLabels$: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 nt,x=An(t,"clipPath-box"),v=ot(t,"rect"),{seriesSelection$:b,axesSelection$:_,defsSelection$:w,graphicGSelection$:S}=ui({selection:e,pluginName:t,clipPathID:x,existSeriesLabels$:i,gridContainer$:p,gridAxesTransform$:c,gridGraphicTransform$:l}),k=r.pipe(F(y),U(M=>M.map(N=>N[0]?N[0].axisY-N[0].axisYFromZero:0)),ft()),$=W({computedData:n,visibleComputedData:r,params:s,gridAxesSize:f,isSeriesPositionSeprate:g}).pipe(F(y),B(async M=>M),U(M=>M.params.barWidth?M.params.barWidth:M.isSeriesPositionSeprate?g2({axisWidth:M.gridAxesSize.width,groupAmount:M.computedData[0]?M.computedData[0].length:0,barAmountOfGroup:1,barPadding:M.params.barPadding,barGroupPadding:M.params.barGroupPadding}):g2({axisWidth:M.gridAxesSize.width,groupAmount:M.computedData[0]?M.computedData[0].length:0,barAmountOfGroup:M.visibleComputedData.length,barPadding:M.params.barPadding,barGroupPadding:M.params.barGroupPadding})),ft()),E=W({computedData:n,barWidth:$,params:s,gridGraphicReverseScale:h}).pipe(F(y),B(async M=>M),U(M=>{const N=M.barWidth/2,z=M.params.barRadius===!0?N:M.params.barRadius===!1?0:typeof M.params.barRadius=="number"?M.params.barRadius:0;return M.computedData.map((L,j)=>{const q=M.gridGraphicReverseScale[j]??M.gridGraphicReverseScale[0];let Y=z*q[0],X=z*q[1];if(Y>N){const Q=N/Y;Y=Y*Q,X=X*Q}return[Y,X]})})),A=r.pipe(F(y),U(M=>{const N=new Set;return M.forEach(z=>{z.forEach(L=>{N.add(L.seriesLabel)})}),Array.from(N)})),I=r.pipe(F(y),U(M=>{const N=new Set;return M.forEach(z=>{z.forEach(L=>{N.add(L.groupLabel)})}),Array.from(N)})),D=W({seriesLabels:A,barWidth:$,params:s}).pipe(F(y),B(async M=>M),U(M=>XC(M.barWidth,M.seriesLabels,M.params))),T=u.pipe(F(y),U(M=>M.transitionDuration),ft()),C=new lt(M=>{W({groupLabels:I,transitionDuration:T}).pipe(B(async N=>N)).subscribe(N=>{const z=VC(N.groupLabels.length,N.transitionDuration);M.next(z)})}).pipe(F(y),ft()),P=new lt(M=>{W({groupLabels:I,transitionDuration:T}).pipe(B(async N=>N)).subscribe(N=>{const z=ZC(N.groupLabels.length,N.transitionDuration);M.next(z)})}).pipe(F(y),ft());W({defsSelection:w,gridAxesSize:f}).pipe(F(y),B(async M=>M)).subscribe(M=>{const N=[{id:x,width:M.gridAxesSize.width,height:M.gridAxesSize.height}];QC({defsSelection:M.defsSelection,clipPathData:N})});const R=u.pipe(F(y),U(M=>M.highlightTarget),ft()),G=new nt;return W({graphicGSelection:S,computedData:n,zeroYArr:k,groupLabels:I,barScale:D,params:s,chartParams:u,highlightTarget:R,barWidth:$,transformedBarRadius:E,delayGroup:C,transitionItem:P,SeriesDataMap:o,GroupDataMap:a,isSeriesPositionSeprate:g}).pipe(F(y),B(async M=>M)).subscribe(M=>{const N=KC({graphicGSelection:M.graphicGSelection,rectClassName:v,computedData:M.computedData,zeroYArr:M.zeroYArr,groupLabels:M.groupLabels,barScale:M.barScale,params:M.params,chartParams:M.chartParams,barWidth:M.barWidth,transformedBarRadius:M.transformedBarRadius,delayGroup:M.delayGroup,transitionItem:M.transitionItem,isSeriesPositionSeprate:M.isSeriesPositionSeprate});N.on("mouseover",(z,L)=>{z.stopPropagation(),m.next({type:"grid",eventName:"mouseover",pluginName:t,highlightTarget:M.highlightTarget,datum:L,gridIndex:L.gridIndex,series:M.SeriesDataMap.get(L.seriesLabel),seriesIndex:L.seriesIndex,seriesLabel:L.seriesLabel,groups:M.GroupDataMap.get(L.groupLabel),groupIndex:L.groupIndex,groupLabel:L.groupLabel,event:z,data:M.computedData})}).on("mousemove",(z,L)=>{z.stopPropagation(),m.next({type:"grid",eventName:"mousemove",pluginName:t,highlightTarget:M.highlightTarget,datum:L,gridIndex:L.gridIndex,series:M.SeriesDataMap.get(L.seriesLabel),seriesIndex:L.seriesIndex,seriesLabel:L.seriesLabel,groups:M.GroupDataMap.get(L.groupLabel),groupIndex:L.groupIndex,groupLabel:L.groupLabel,event:z,data:M.computedData})}).on("mouseout",(z,L)=>{z.stopPropagation(),m.next({type:"grid",eventName:"mouseout",pluginName:t,highlightTarget:M.highlightTarget,datum:L,gridIndex:L.gridIndex,series:M.SeriesDataMap.get(L.seriesLabel),seriesIndex:L.seriesIndex,seriesLabel:L.seriesLabel,groups:M.GroupDataMap.get(L.groupLabel),groupIndex:L.groupIndex,groupLabel:L.groupLabel,event:z,data:M.computedData})}).on("click",(z,L)=>{z.stopPropagation(),m.next({type:"grid",eventName:"click",pluginName:t,highlightTarget:M.highlightTarget,datum:L,gridIndex:L.gridIndex,series:M.SeriesDataMap.get(L.seriesLabel),seriesIndex:L.seriesIndex,seriesLabel:L.seriesLabel,groups:M.GroupDataMap.get(L.groupLabel),groupIndex:L.groupIndex,groupLabel:L.groupLabel,event:z,data:M.computedData})}),G.next(N)}),W({barSelection:G,highlight:d.pipe(U(M=>M.map(N=>N.id))),fullChartParams:u}).pipe(F(y),B(async M=>M)).subscribe(M=>{JC({selection:M.barSelection,ids:M.highlight,fullChartParams:M.fullChartParams})}),()=>{y.next(void 0)}},m2="Bars",tI=ae(m2,Fo)(({selection:t,name:e,subject:n,observer:r})=>{const i=new nt,o=Th(m2,{selection:t,computedData$:r.computedData$,visibleComputedData$:r.visibleComputedData$,existSeriesLabels$:r.existSeriesLabels$,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()}}),y2="BarsDiverging",eI=ae(y2,Fo)(({selection:t,name:e,subject:n,observer:r})=>{const i=new nt,o=Th(y2,{selection:t,computedData$:r.computedData$,visibleComputedData$:r.visibleComputedData$,existSeriesLabels$:r.existSeriesLabels$,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$:fi(!0),event$:n.event$});return()=>{i.next(void 0),o()}}),b2=.3;function nI({axisWidth:t,groupAmount:e,barGroupPadding:n=0}){const i=t/(e-1)-n;return i>1?i:1}function rI(t,e){return t<=1?0:e/(t-1)*b2}function iI(t,e){return t<=1?e:e*(1-b2)}function oI({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)=>{V(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(ar(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 aI({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)=>{V(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 sI({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)?V(o[i]).style("opacity",1):V(o[i]).style("opacity",n.styles.unhighlightedOpacity)})}const v2=(t,{selection:e,computedData$:n,visibleComputedData$:r,existSeriesLabels$: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 nt,v=An(t,"clipPath-box"),b=ot(t,"rect"),{seriesSelection$:_,axesSelection$:w,defsSelection$:S,graphicGSelection$:k}=ui({selection:e,pluginName:t,clipPathID:v,existSeriesLabels$:i,gridContainer$:g,gridAxesTransform$:l,gridGraphicTransform$:h}),$=r.pipe(F(x),U(L=>L[0]&&L[0][0]?L[0][0].axisY-L[0][0].axisYFromZero:0),ft()),E=W({computedData:n,params:s,axisSize:d,isSeriesPositionSeprate:m}).pipe(F(x),B(async L=>L),U(L=>L.params.barWidth?L.params.barWidth:nI({axisWidth:L.axisSize.width,groupAmount:L.computedData[0]?L.computedData[0].length:0,barGroupPadding:L.params.barGroupPadding})),ft()),A=W({computedData:n,barWidth:E,params:s,gridGraphicReverseScale:f}).pipe(F(x),B(async L=>L),U(L=>{const j=L.barWidth/2,q=L.params.barRadius===!0?j:L.params.barRadius===!1?0:typeof L.params.barRadius=="number"?L.params.barRadius:0;return L.computedData.map((Y,X)=>{const Q=L.gridGraphicReverseScale[X]??L.gridGraphicReverseScale[0],ct=q*Q[0],O=q*Q[1];return[ct,O]})})),I=r.pipe(F(x),U(L=>{const j=new Set;return L.forEach(q=>{q.forEach(Y=>{j.add(Y.groupLabel)})}),Array.from(j)})),D=c.pipe(F(x),U(L=>L.transitionDuration),ft()),T=new lt(L=>{W({groupLabels:I,transitionDuration:D}).pipe(B(async j=>j)).subscribe(j=>{const q=rI(j.groupLabels.length,j.transitionDuration);L.next(q)})}).pipe(F(x),ft()),C=new lt(L=>{W({groupLabels:I,transitionDuration:D}).pipe(B(async j=>j)).subscribe(j=>{const q=iI(j.groupLabels.length,j.transitionDuration);L.next(q)})}).pipe(F(x),ft()),P=W({computedData:n,dataFormatter:u}).pipe(F(x),B(async L=>L),U(L=>{const q=L.computedData[0]?L.computedData[0].length-1:0,Y=L.dataFormatter.grid.groupAxis.scaleDomain[0]==="auto"?0-L.dataFormatter.grid.groupAxis.scalePadding:L.dataFormatter.grid.groupAxis.scaleDomain[0]-L.dataFormatter.grid.groupAxis.scalePadding,X=L.dataFormatter.grid.groupAxis.scaleDomain[1]==="auto"?q+L.dataFormatter.grid.groupAxis.scalePadding:L.dataFormatter.grid.groupAxis.scaleDomain[1]+L.dataFormatter.grid.groupAxis.scalePadding,Q=L.computedData.map(ct=>ct.filter((O,tt)=>O.groupIndex>=Y&&O.groupIndex<=X));if(Q.length<=1)return 1;{const ct=Q.flat().map(H=>H.axisYFromZero),O=Math.max(...ct),tt=L.computedData[0]?L.computedData[0].map((H,xt)=>L.computedData.reduce((gt,Ft)=>gt+Ft[xt].axisYFromZero,0)):[],st=Math.max(...tt);return O/st}})),R=W({computedData:n,yRatio:P,zeroY:$}).pipe(F(x),U(L=>{let j=L.computedData[0]?L.computedData[0].map(()=>L.zeroY):[];return L.computedData.map((q,Y)=>q.map((X,Q)=>{const ct=j[Q],O=X.axisYFromZero*L.yRatio;return j[Q]=j[Q]+O,{...X,_barStartY:ct,_barHeight:O}}))})),G=W({computedData:n,zeroY:$}).pipe(F(x),U(L=>L.computedData.map((j,q)=>j.map((Y,X)=>({...Y,_barStartY:L.zeroY,_barHeight:Y.axisYFromZero}))))),M=m.pipe(B(L=>Md(()=>L,G,R)));W({defsSelection:S,gridAxesSize:d}).pipe(F(x),B(async L=>L)).subscribe(L=>{const j=[{id:v,width:L.gridAxesSize.width,height:L.gridAxesSize.height}];aI({defsSelection:L.defsSelection,clipPathData:j})});const N=c.pipe(F(x),U(L=>L.highlightTarget),ft()),z=new nt;return W({graphicGSelection:k,graphicData:M,zeroY:$,groupLabels:I,params:s,chartParams:c,highlightTarget:N,barWidth:E,transformedBarRadius:A,delayGroup:T,transitionItem:C,SeriesDataMap:o,GroupDataMap:a,isSeriesPositionSeprate:m}).pipe(F(x),B(async L=>L)).subscribe(L=>{const j=oI({graphicGSelection:L.graphicGSelection,rectClassName:b,barData:L.graphicData,zeroY:L.zeroY,groupLabels:L.groupLabels,params:L.params,chartParams:L.chartParams,barWidth:L.barWidth,transformedBarRadius:L.transformedBarRadius,delayGroup:L.delayGroup,transitionItem:L.transitionItem,isSeriesPositionSeprate:L.isSeriesPositionSeprate});j.on("mouseover",(q,Y)=>{q.stopPropagation(),y.next({type:"grid",eventName:"mouseover",pluginName:t,highlightTarget:L.highlightTarget,datum:Y,gridIndex:Y.gridIndex,series:L.SeriesDataMap.get(Y.seriesLabel),seriesIndex:Y.seriesIndex,seriesLabel:Y.seriesLabel,groups:L.GroupDataMap.get(Y.groupLabel),groupIndex:Y.groupIndex,groupLabel:Y.groupLabel,event:q,data:L.graphicData})}).on("mousemove",(q,Y)=>{q.stopPropagation(),y.next({type:"grid",eventName:"mousemove",pluginName:t,highlightTarget:L.highlightTarget,datum:Y,gridIndex:Y.gridIndex,series:L.SeriesDataMap.get(Y.seriesLabel),seriesIndex:Y.seriesIndex,seriesLabel:Y.seriesLabel,groups:L.GroupDataMap.get(Y.groupLabel),groupIndex:Y.groupIndex,groupLabel:Y.groupLabel,event:q,data:L.graphicData})}).on("mouseout",(q,Y)=>{q.stopPropagation(),y.next({type:"grid",eventName:"mouseout",pluginName:t,highlightTarget:L.highlightTarget,datum:Y,gridIndex:Y.gridIndex,series:L.SeriesDataMap.get(Y.seriesLabel),seriesIndex:Y.seriesIndex,seriesLabel:Y.seriesLabel,groups:L.GroupDataMap.get(Y.groupLabel),groupIndex:Y.groupIndex,groupLabel:Y.groupLabel,event:q,data:L.graphicData})}).on("click",(q,Y)=>{q.stopPropagation(),y.next({type:"grid",eventName:"click",pluginName:t,highlightTarget:L.highlightTarget,datum:Y,gridIndex:Y.gridIndex,series:L.SeriesDataMap.get(Y.seriesLabel),seriesIndex:Y.seriesIndex,seriesLabel:Y.seriesLabel,groups:L.GroupDataMap.get(Y.groupLabel),groupIndex:Y.groupIndex,groupLabel:Y.groupLabel,event:q,data:L.graphicData})}),z.next(j)}),W({barSelection:z,highlight:p.pipe(U(L=>L.map(j=>j.id))),fullChartParams:c}).pipe(F(x),B(async L=>L)).subscribe(L=>{sI({selection:L.barSelection,ids:L.highlight,fullChartParams:L.fullChartParams})}),()=>{x.next(void 0)}},x2="BarStack",uI=ae(x2,jh)(({selection:t,name:e,subject:n,observer:r})=>{const i=new nt,o=v2(x2,{selection:t,computedData$:r.computedData$,visibleComputedData$:r.visibleComputedData$,existSeriesLabels$:r.existSeriesLabels$,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()}}),_2=.3;function w2({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 cI(t,e,n){const r=t/2,i=t*e.length+n.barPadding*e.length;return Wf().domain(e).range([-i/2+r,i/2-r])}function lI(t,e){return t<=1?0:e/(t-1)*_2}function fI(t,e){return t<=1?e:e*(1-_2)}function hI({graphicGSelection:t,pathGClassName:e,pathClassName:n,computedData:r,linearGradientIds:i,zeroYArr:o,groupLabels:a,barScale:s,params:u,chartParams:c,barWidth:l,delayGroup:h,transitionItem:f,isSeriesPositionSeprate:d}){const p=l/2;return t.each((m,y,x)=>{V(x[y]).selectAll(`g.${e}`).data(r[y]??[]).join(b=>{const _=b.append("g").classed(e,!0).attr("cursor","pointer");return _.append("path").classed(n,!0).style("vector-effect","non-scaling-stroke").attr("d",w=>{const S=-p,k=o[y],$=o[y];return`M${S},${k} L${S+l/2},${$} ${S+l},${k}`}),_},b=>b,b=>b.remove()).attr("transform",b=>`translate(${d?0:s(b.seriesLabel)}, 0)`).select(`path.${n}`).attr("height",b=>Math.abs(b.axisYFromZero)).attr("y",b=>b.axisY<o[y]?b.axisY:o[y]).attr("x",b=>d?0:s(b.seriesLabel)).style("fill",b=>`url(#${i[b.seriesIndex]})`).attr("stroke",b=>b.color).attr("transform",b=>`translate(${b?b.axisX:0}, 0)`).transition().duration(f).ease(ar(c.transitionEase)).delay((b,_)=>b.groupIndex*h).attr("d",b=>{const _=-p,w=o[y],S=b.axisY;return`M${_},${w} L${_+l/2},${S} ${_+l},${w}`})}),t.selectAll(`path.${n}`)}function dI({defsSelection:t,computedData:e,linearGradientIds:n,params:r}){t.selectAll("linearGradient").data(e??[]).join(i=>i.append("linearGradient").attr("x1","0%").attr("x2","0%").attr("y1","100%").attr("y2","0%").attr("spreadMethod","pad"),i=>i,i=>i.remove()).attr("id",(i,o)=>i[0]?n[i[0].seriesIndex]:"").html((i,o)=>{const a=i[0]?i[0].color:"";return`
13
13
  <stop offset="0%" stop-color="${a}" stop-opacity="${r.linearGradientOpacity[0]}"/>
14
14
  <stop offset="100%" stop-color="${a}" stop-opacity="${r.linearGradientOpacity[1]}"/>
15
- `})}function uI({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)=>{V(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 cI({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)?V(a[o]).style("opacity",1):V(a[o]).style("opacity",n.styles.unhighlightedOpacity)})}const _2=(t,{selection:e,computedData$:n,visibleComputedData$:r,existSeriesLabels$: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 rt,y=$n(t,"clipPath-box"),v=ot(t,"pathG"),x=ot(t,"path"),{seriesSelection$:b,axesSelection$:w,defsSelection$:$,graphicGSelection$:A}=si({selection:e,pluginName:t,clipPathID:y,existSeriesLabels$:i,gridContainer$:d,gridAxesTransform$:c,gridGraphicTransform$:l});l.pipe(F(m),U(M=>-M.translate[1]/M.scale[1]));const _=r.pipe(U(M=>M.map(N=>N[0]?N[0].axisY-N[0].axisYFromZero:0)),ft()),L=H({computedData:n,visibleComputedData:r,params:s,gridAxesSize:h,isSeriesPositionSeprate:p}).pipe(F(m),B(async M=>M),U(M=>M.params.barWidth?M.params.barWidth:M.isSeriesPositionSeprate?x2({axisWidth:M.gridAxesSize.width,groupAmount:M.computedData[0]?M.computedData[0].length:0,barAmountOfGroup:1,barPadding:M.params.barPadding,barGroupPadding:M.params.barGroupPadding}):x2({axisWidth:M.gridAxesSize.width,groupAmount:M.computedData[0]?M.computedData[0].length:0,barAmountOfGroup:M.visibleComputedData.length,barPadding:M.params.barPadding,barGroupPadding:M.params.barGroupPadding}))),E=r.pipe(F(m),U(M=>{const N=new Set;return M.forEach(z=>{z.forEach(k=>{N.add(k.seriesLabel)})}),Array.from(N)})),T=r.pipe(F(m),U(M=>{const N=new Set;return M.forEach(z=>{z.forEach(k=>{N.add(k.groupLabel)})}),Array.from(N)})),I=new lt(M=>{H({seriesLabels:E,barWidth:L,params:s}).pipe(F(m),B(async N=>N)).subscribe(N=>{const z=rI(N.barWidth,N.seriesLabels,N.params);M.next(z)})}),P=u.pipe(F(m),U(M=>M.transitionDuration),ft()),D=new lt(M=>{H({groupLabels:T,transitionDuration:P}).pipe(B(async N=>N)).subscribe(N=>{const z=iI(N.groupLabels.length,N.transitionDuration);M.next(z)})}).pipe(F(m),ft()),C=new lt(M=>{H({groupLabels:T,transitionDuration:P}).pipe(B(async N=>N)).subscribe(N=>{const z=oI(N.groupLabels.length,N.transitionDuration);M.next(z)})}).pipe(F(m),ft());H({defsSelection:$,gridAxesSize:h}).pipe(F(m),B(async M=>M)).subscribe(M=>{const N=[{id:y,width:M.gridAxesSize.width,height:M.gridAxesSize.height}];uI({defsSelection:M.defsSelection,clipPathData:N})});const S=u.pipe(F(m),U(M=>M.highlightTarget),ft()),R=new rt,G=E.pipe(F(m),U(M=>M.map((N,z)=>$n(t,`lineargradient-${N}`))));return H({graphicGSelection:A,defsSelection:$,computedData:n,linearGradientIds:G,zeroYArr:_,groupLabels:T,barScale:I,params:s,chartParams:u,highlightTarget:S,barWidth:L,delayGroup:D,transitionItem:C,SeriesDataMap:o,GroupDataMap:a,isSeriesPositionSeprate:p}).pipe(F(m),B(async M=>M)).subscribe(M=>{const N=aI({graphicGSelection:M.graphicGSelection,pathGClassName:v,pathClassName:x,computedData:M.computedData,linearGradientIds:M.linearGradientIds,zeroYArr:M.zeroYArr,groupLabels:M.groupLabels,barScale:M.barScale,params:M.params,chartParams:M.chartParams,barWidth:M.barWidth,delayGroup:M.delayGroup,transitionItem:M.transitionItem,isSeriesPositionSeprate:M.isSeriesPositionSeprate});sI({defsSelection:M.defsSelection,computedData:M.computedData,linearGradientIds:M.linearGradientIds,params:M.params}),N.on("mouseover",(z,k)=>{z.stopPropagation(),g.next({type:"grid",eventName:"mouseover",pluginName:t,highlightTarget:M.highlightTarget,datum:k,gridIndex:k.gridIndex,series:M.SeriesDataMap.get(k.seriesLabel),seriesIndex:k.seriesIndex,seriesLabel:k.seriesLabel,groups:M.GroupDataMap.get(k.groupLabel),groupIndex:k.groupIndex,groupLabel:k.groupLabel,event:z,data:M.computedData})}).on("mousemove",(z,k)=>{z.stopPropagation(),g.next({type:"grid",eventName:"mousemove",pluginName:t,highlightTarget:M.highlightTarget,datum:k,gridIndex:k.gridIndex,series:M.SeriesDataMap.get(k.seriesLabel),seriesIndex:k.seriesIndex,seriesLabel:k.seriesLabel,groups:M.GroupDataMap.get(k.groupLabel),groupIndex:k.groupIndex,groupLabel:k.groupLabel,event:z,data:M.computedData})}).on("mouseout",(z,k)=>{z.stopPropagation(),g.next({type:"grid",eventName:"mouseout",pluginName:t,highlightTarget:M.highlightTarget,datum:k,gridIndex:k.gridIndex,series:M.SeriesDataMap.get(k.seriesLabel),seriesIndex:k.seriesIndex,seriesLabel:k.seriesLabel,groups:M.GroupDataMap.get(k.groupLabel),groupIndex:k.groupIndex,groupLabel:k.groupLabel,event:z,data:M.computedData})}).on("click",(z,k)=>{z.stopPropagation(),g.next({type:"grid",eventName:"click",pluginName:t,highlightTarget:M.highlightTarget,datum:k,gridIndex:k.gridIndex,series:M.SeriesDataMap.get(k.seriesLabel),seriesIndex:k.seriesIndex,seriesLabel:k.seriesLabel,groups:M.GroupDataMap.get(k.groupLabel),groupIndex:k.groupIndex,groupLabel:k.groupLabel,event:z,data:M.computedData})}),R.next(N)}),H({barSelection:R,highlight:f,fullChartParams:u}).pipe(F(m),B(async M=>M)).subscribe(M=>{cI({selection:M.barSelection,ids:M.highlight,fullChartParams:M.fullChartParams})}),()=>{m.next(void 0)}},w2="BarsTriangle",lI=ae(w2,Hh)(({selection:t,name:e,subject:n,observer:r})=>{const i=new rt,o=_2(w2,{selection:t,computedData$:r.computedData$,visibleComputedData$:r.visibleComputedData$,existSeriesLabels$:r.existSeriesLabels$,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 fI({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)=>{V(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)=>{V(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,v)=>p*u).attr("opacity",1),m=>m.transition().duration(50).attr("opacity",1),m=>m.remove()).attr("r",i.radius).attr("fill",(m,y)=>$h({datum:m,colorType:i.fillColorType,fullChartParams:o})).attr("stroke",(m,y)=>$h({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 hI({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)?V(a[o]).style("opacity",1).transition("highlight").duration(200):V(a[o]).style("opacity",n===!0?0:r.styles.unhighlightedOpacity).transition("highlight").duration(200)})}function dI({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)=>{V(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 $2=(t,{selection:e,computedData$:n,visibleComputedData$:r,existSeriesLabels$: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 rt,y=$n(t,"clipPath-box"),v=ot(t,"circleG"),x=ot(t,"circle"),b=new rt,{seriesSelection$:w,axesSelection$:$,defsSelection$:A,graphicGSelection$:_}=si({selection:e,pluginName:t,clipPathID:y,existSeriesLabels$:i,gridContainer$:p,gridAxesTransform$:c,gridGraphicTransform$:l}),L=H({computedData:n,gridGraphicReverseScale:h}).pipe(F(m),B(async P=>P),U(P=>P.computedData.map((D,C)=>P.gridGraphicReverseScale[C])));H({defsSelection:A,gridAxesSize:f}).pipe(F(m),B(async P=>P)).subscribe(P=>{const D=[{id:y,width:P.gridAxesSize.width,height:P.gridAxesSize.height}];dI({defsSelection:P.defsSelection,clipPathData:D})});const E=u.pipe(F(m),U(P=>P.highlightTarget),ft());H({graphicGSelection:_,computedData:n,visibleComputedData:r,SeriesDataMap:o,GroupDataMap:a,graphicReverseScale:L,fullChartParams:u,fullParams:s,highlightTarget:E}).pipe(F(m),B(async P=>P)).subscribe(P=>{const D=fI({graphicGSelection:P.graphicGSelection,circleGClassName:v,circleClassName:x,data:P.visibleComputedData,fullParams:P.fullParams,fullChartParams:P.fullChartParams,graphicReverseScale:P.graphicReverseScale});D.on("mouseover",(C,S)=>{C.stopPropagation(),g.next({type:"grid",eventName:"mouseover",pluginName:t,highlightTarget:P.highlightTarget,datum:S,gridIndex:S.gridIndex,series:P.SeriesDataMap.get(S.seriesLabel),seriesIndex:S.seriesIndex,seriesLabel:S.seriesLabel,groups:P.GroupDataMap.get(S.groupLabel),groupIndex:S.groupIndex,groupLabel:S.groupLabel,event:C,data:P.computedData})}).on("mousemove",(C,S)=>{C.stopPropagation(),g.next({type:"grid",eventName:"mousemove",pluginName:t,highlightTarget:P.highlightTarget,data:P.computedData,datum:S,gridIndex:S.gridIndex,series:P.SeriesDataMap.get(S.seriesLabel),seriesIndex:S.seriesIndex,seriesLabel:S.seriesLabel,groups:P.GroupDataMap.get(S.groupLabel),groupIndex:S.groupIndex,groupLabel:S.groupLabel,event:C})}).on("mouseout",(C,S)=>{C.stopPropagation(),g.next({type:"grid",eventName:"mouseout",pluginName:t,highlightTarget:P.highlightTarget,datum:S,gridIndex:S.gridIndex,series:P.SeriesDataMap.get(S.seriesLabel),seriesIndex:S.seriesIndex,seriesLabel:S.seriesLabel,groups:P.GroupDataMap.get(S.groupLabel),groupIndex:S.groupIndex,groupLabel:S.groupLabel,event:C,data:P.computedData})}).on("click",(C,S)=>{C.stopPropagation(),g.next({type:"grid",eventName:"click",pluginName:t,highlightTarget:P.highlightTarget,datum:S,gridIndex:S.gridIndex,series:P.SeriesDataMap.get(S.seriesLabel),seriesIndex:S.seriesIndex,seriesLabel:S.seriesLabel,groups:P.GroupDataMap.get(S.groupLabel),groupIndex:S.groupIndex,groupLabel:S.groupLabel,event:C,data:P.computedData})}),b.next(D)});const T=d.subscribe(),I=s.pipe(F(m),U(P=>P.onlyShowHighlighted),ft());return u.pipe(F(m),B(P=>H({graphicSelection:b,highlight:d,onlyShowHighlighted:I,fullChartParams:u}).pipe(F(m),B(async D=>D)))).subscribe(P=>{hI({selection:P.graphicSelection,ids:P.highlight,onlyShowHighlighted:P.onlyShowHighlighted,fullChartParams:P.fullChartParams})}),()=>{m.next(void 0),T.unsubscribe()}},S2="Dots",pI=ae(S2,Bh)(({selection:t,name:e,subject:n,observer:r})=>{const i=new rt,o=$2(S2,{selection:t,computedData$:r.computedData$,visibleComputedData$:r.visibleComputedData$,existSeriesLabels$:r.existSeriesLabels$,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()}}),gI={listRectWidth:14,listRectHeight:14,listRectRadius:0};function A2(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]}const Pu=(t,{rootSelection:e,seriesLabels$:n,fullParams$:r,layout$:i,fullChartParams$:o})=>{const a=ot(t,"root-position"),s=ot(t,"legend-card"),u=ot(t,"legend-list"),c=ot(t,"legend-item"),l=new rt,h=H({seriesLabels:n,fullChartParams:o}).pipe(F(l),B(async _=>_),U(_=>{const L=new Map;let E=0;return _.seriesLabels.forEach((T,I)=>{if(!L.has(T)){const P=A2(E,_.fullChartParams);L.set(T,P),E++}}),L})),f=n.pipe(F(l),U(_=>{const L=new Set;let E=[];return _.forEach(T=>{L.has(T)?E.push(!1):E.push(!0),L.add(T)}),E})),d=r.pipe(F(l),U(_=>_.position==="bottom"||_.position==="top"?"row":"column")),p=H({fullParams:r,layout:i}).pipe(F(l),B(async _=>_),U(_=>{const L=_.fullParams.padding*2+_.fullParams.gap*2;return _.fullParams.position==="bottom"||_.fullParams.position==="top"?_.layout.rootWidth-L:_.layout.rootHeight-L})),m=H({layout:i,fullParams:r}).pipe(F(l),B(async _=>_),U(_=>{let L=0,E=0;return _.fullParams.position==="bottom"?(E=_.layout.rootHeight,_.fullParams.justify==="start"?L=0:_.fullParams.justify==="center"?L=_.layout.rootWidth/2:_.fullParams.justify==="end"&&(L=_.layout.rootWidth)):_.fullParams.position==="right"?(L=_.layout.rootWidth,_.fullParams.justify==="start"?E=0:_.fullParams.justify==="center"?E=_.layout.rootHeight/2:_.fullParams.justify==="end"&&(E=_.layout.rootHeight)):_.fullParams.position==="top"?(E=0,_.fullParams.justify==="start"?L=0:_.fullParams.justify==="center"?L=_.layout.rootWidth/2:_.fullParams.justify==="end"&&(L=_.layout.rootWidth)):_.fullParams.position==="left"&&(L=0,_.fullParams.justify==="start"?E=0:_.fullParams.justify==="center"?E=_.layout.rootHeight/2:_.fullParams.justify==="end"&&(E=_.layout.rootHeight)),{x:L,y:E}})).pipe(F(l),U(_=>e.selectAll(`g.${a}`).data([_]).join(L=>L.append("g").classed(a,!0).attr("transform",E=>`translate(${E.x}, ${E.y})`),L=>L.transition().attr("transform",E=>`translate(${E.x}, ${E.y})`),L=>L.remove()))),y=r.pipe(F(l),U(_=>_.seriesList[0]?_.seriesList[0]:gI)),v=H({visibleList:f,fullParams:r,fullChartParams:o,seriesLabels:n,lineDirection:d,lineMaxSize:p,defaultListStyle:y,SeriesLabelColorMap:h}).pipe(F(l),B(async _=>_),U(_=>_.seriesLabels.reduce((L,E,T)=>{if(!_.visibleList[T])return L;const I=u2(E,_.fullChartParams.styles.textSize),P=_.fullChartParams.styles.textSize*1.5+I,D=_.SeriesLabelColorMap.get(E),C=L[0]&&L[0][0]?L[L.length-1][L[L.length-1].length-1]:null,{translateX:S,translateY:R,lineIndex:G,itemIndex:M}=((z,k,Y)=>{let j=0,W=0,X=0,Q=0;if(z.lineDirection==="column"){let ct=Y?Y.translateY+z.fullChartParams.styles.textSize+z.fullParams.gap:0;if(ct+z.fullChartParams.styles.textSize>z.lineMaxSize){X=Y.lineIndex+1,Q=0,W=0;const O=k[k.length-1].reduce((tt,st)=>st.itemWidth>tt?st.itemWidth:tt,0);j=Y.translateX+O+z.fullParams.gap}else X=Y?Y.lineIndex:0,Q=Y?Y.itemIndex+1:0,W=ct,j=Y?Y.translateX:0}else{let ct=Y?Y.translateX+Y.itemWidth+z.fullParams.gap:0;ct+P>z.lineMaxSize?(X=Y.lineIndex+1,Q=0,j=0):(X=Y?Y.lineIndex:0,Q=Y?Y.itemIndex+1:0,j=ct),W=(z.fullChartParams.styles.textSize+z.fullParams.gap)*X}return{translateX:j,translateY:W,lineIndex:X,itemIndex:Q}})(_,L,C);L[G]||(L[G]=[]);const N=_.fullParams.seriesList[M]?_.fullParams.seriesList[M]:_.defaultListStyle;return L[G].push({id:E,seriesLabel:E,seriesIndex:T,lineIndex:G,itemIndex:M,text:E,itemWidth:P,translateX:S,translateY:R,color:D,listRectWidth:N.listRectWidth,listRectHeight:N.listRectHeight,listRectRadius:N.listRectRadius}),L},[])),Ye(1)),x=H({fullParams:r,fullChartParams:o,lineDirection:d,lengendItems:v}).pipe(F(l),B(async _=>_),U(_=>{const{width:L,height:E}=((T,I)=>{let P=0,D=0;if(!I.length||!I[0].length)return{width:P,height:D};const C=I[0][I[0].length-1];return T.lineDirection==="column"?(P=I.reduce((S,R)=>{const G=R.reduce((M,N)=>N.itemWidth>M?N.itemWidth:M,0);return S+G},0),P+=T.fullParams.gap*(I.length-1),D=C.translateY+T.fullChartParams.styles.textSize):(P=C.translateX+C.itemWidth,D=T.fullChartParams.styles.textSize*I.length+T.fullParams.gap*(I.length-1)),{width:P,height:D}})(_,_.lengendItems);return{direction:_.lineDirection,width:L,height:E,translateX:_.fullParams.gap,translateY:_.fullParams.gap}}),Ye(1)),b=H({fullParams:r,lengendList:x}).pipe(F(l),B(async _=>_),U(_=>{const L=_.lengendList.width+_.fullParams.gap*2,E=_.lengendList.height+_.fullParams.gap*2;let T=0,I=0;return _.fullParams.position==="left"?_.fullParams.justify==="start"?(T=_.fullParams.padding,I=_.fullParams.padding):_.fullParams.justify==="center"?(T=_.fullParams.padding,I=-E/2):_.fullParams.justify==="end"&&(T=_.fullParams.padding,I=-E-_.fullParams.padding):_.fullParams.position==="right"?_.fullParams.justify==="start"?(T=-L-_.fullParams.padding,I=_.fullParams.padding):_.fullParams.justify==="center"?(T=-L-_.fullParams.padding,I=-E/2):_.fullParams.justify==="end"&&(T=-L-_.fullParams.padding,I=-E-_.fullParams.padding):_.fullParams.position==="top"?_.fullParams.justify==="start"?(T=_.fullParams.padding,I=_.fullParams.padding):_.fullParams.justify==="center"?(T=-L/2,I=_.fullParams.padding):_.fullParams.justify==="end"&&(T=-L-_.fullParams.padding,I=_.fullParams.padding):_.fullParams.justify==="start"?(T=_.fullParams.padding,I=-E-_.fullParams.padding):_.fullParams.justify==="center"?(T=-L/2,I=-E-_.fullParams.padding):_.fullParams.justify==="end"&&(T=-L-_.fullParams.padding,I=-E-_.fullParams.padding),{width:L,height:E,translateX:T,translateY:I}})),w=H({rootPositionSelection:m,fullParams:r,fullChartParams:o,legendCard:b}).pipe(F(l),B(async _=>_),U(_=>_.rootPositionSelection.selectAll("g").data([_.legendCard]).join(L=>L.append("g").classed(s,!0).attr("transform",E=>`translate(${E.translateX}, ${E.translateY})`),L=>L.transition().attr("transform",E=>`translate(${E.translateX}, ${E.translateY})`),L=>L.remove()).each((L,E,T)=>{V(T[E]).selectAll("rect").data([L]).join("rect").attr("width",I=>I.width).attr("height",I=>I.height).attr("fill",Et(_.fullParams.backgroundFill,_.fullChartParams)).attr("stroke",Et(_.fullParams.backgroundStroke,_.fullChartParams))}))),$=H({lengendCardSelection:w,fullParams:r,lengendList:x}).pipe(F(l),B(async _=>_),U(_=>_.lengendCardSelection.selectAll("g").data([_.lengendList]).join(L=>L.append("g").classed(u,!0).attr("transform",E=>`translate(${E.translateX}, ${E.translateY})`),L=>L.transition().attr("transform",E=>`translate(${E.translateX}, ${E.translateY})`),L=>L.remove())));return H({lengendListSelection:$,fullParams:r,fullChartParams:o,lengendItems:v}).pipe(F(l),B(async _=>_),U(_=>{const L=_.lengendItems[0]?_.lengendItems.flat():[];return _.lengendListSelection.selectAll(`g.${c}`).data(L).join(E=>E.append("g").classed(c,!0).attr("cursor","default"),E=>E,E=>E.remove()).attr("transform",(E,T)=>`translate(${E.translateX}, ${E.translateY})`).each((E,T,I)=>{const P=_.fullChartParams.styles.textSize/2,D=-E.listRectWidth/2,C=-E.listRectHeight/2;V(I[T]).selectAll("rect").data([E]).join("rect").attr("x",P).attr("y",P).attr("width",S=>S.listRectWidth).attr("height",S=>S.listRectHeight).attr("transform",S=>`translate(${D}, ${C})`).attr("fill",S=>S.color).attr("rx",S=>S.listRectRadius),V(I[T]).selectAll("text").data([E]).join(S=>S.append("text").attr("dominant-baseline","hanging"),S=>S,S=>S.remove()).attr("x",_.fullChartParams.styles.textSize*1.5).attr("font-size",_.fullChartParams.styles.textSize).attr("fill",S=>_.fullParams.textColorType==="series"?A2(S.seriesIndex,_.fullChartParams):Et(_.fullParams.textColorType,_.fullChartParams)).text(S=>S.text)})})).subscribe(),()=>{l.next(void 0)}},M2="GridLegend",mI=ae(M2,Vh)(({selection:t,rootSelection:e,observer:n,subject:r})=>{const i=new rt,o=n.SeriesDataMap$.pipe(F(i),U(u=>Array.from(u.keys()))),a=n.fullParams$.pipe(F(i),U(u=>{const c=[{listRectWidth:u.listRectWidth,listRectHeight:u.listRectHeight,listRectRadius:u.listRectRadius}];return{...u,seriesList:c}})),s=Pu(M2,{rootSelection:e,seriesLabels$:o,fullParams$:a,layout$:n.layout$,fullChartParams$:n.fullChartParams$});return()=>{i.next(void 0),s()}}),Mh=6;function yI({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)=>{V(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",Et(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-Mh-r.labelOffset[1]})`);const f=Ng(c).scale(c).tickSize(r.tickFullLine==!0?-a.height:Mh).tickSizeOuter(0).tickFormat(p=>wh(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?Et(r.tickColorType,u):"none").style("stroke-dasharray",r.tickFullLineDasharray).attr("pointer-events","none"),d.selectAll("path").style("fill","none").style("stroke",r.axisLineVisible==!0?Et(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",Et(r.tickTextColorType,u)).attr("text-anchor",i.textAnchor).attr("dominant-baseline",i.dominantBaseline).attr("transform-origin",`0 -${r.tickPadding+Mh}`).style("transform",l),h}const T2=(t,{selection:e,computedData$:n,fullParams$:r,fullDataFormatter$:i,fullChartParams$:o,gridAxesTransform$:a,gridAxesReverseTransform$:s,gridAxesSize$:u,gridContainer$:c,isSeriesPositionSeprate$:l})=>{const h=new rt,f=ot(t,"container"),d=ot(t,"xAxisG"),p=ot(t,"xAxis"),g=ot(t,"groupingLabel"),m=H({computedData:n.pipe(ft(($,A)=>$.length===A.length)),isSeriesPositionSeprate:l}).pipe(F(h),B(async $=>$),U($=>$.isSeriesPositionSeprate?$.computedData:[$.computedData[0]]),U(($,A)=>e.selectAll(`g.${f}`).data($,_=>_[0]?_[0].seriesIndex:A).join("g").classed(f,!0))),y=m.pipe(F(h),U(($,A)=>$.selectAll(`g.${d}`).data([d]).join("g").classed(d,!0)));H({containerSelection:m,gridContainer:c}).pipe(F(h),B(async $=>$)).subscribe($=>{$.containerSelection.attr("transform",(A,_)=>{const L=$.gridContainer[_]??$.gridContainer[0],E=L.translate,T=L.scale;return`translate(${E[0]}, ${E[1]}) scale(${T[0]}, ${T[1]})`})}),H({axisSelection:y,gridAxesTransform:a}).pipe(F(h),B(async $=>$)).subscribe($=>{$.axisSelection.style("transform",$.gridAxesTransform.value)});const v=H({fullParams:r,fullDataFormatter:i,gridAxesReverseTransform:s,gridContainer:c}).pipe(F(h),B(async $=>$),U($=>{const A=`translate(${$.gridAxesReverseTransform.translate[0]}px, ${$.gridAxesReverseTransform.translate[1]}px)`,_=`rotate(${$.gridAxesReverseTransform.rotate}deg) rotateX(${$.gridAxesReverseTransform.rotateX}deg) rotateY(${$.gridAxesReverseTransform.rotateY}deg)`,L=`scale(${1/$.gridContainer[0].scale[0]}, ${1/$.gridContainer[0].scale[1]})`,T=`rotate(${$.fullDataFormatter.grid.groupAxis.position==="left"&&$.fullDataFormatter.grid.valueAxis.position==="top"||$.fullDataFormatter.grid.groupAxis.position==="right"&&$.fullDataFormatter.grid.valueAxis.position==="bottom"?$.fullParams.tickTextRotate+180:$.fullParams.tickTextRotate}deg)`;return`${A} ${_} ${L} ${T}`}),ft()),x=new lt($=>{H({fullDataFormatter:i,gridAxesSize:u,computedData:n}).pipe(F(h),B(async A=>A)).subscribe(A=>{const L=A.computedData[0]?A.computedData[0].length-1:0,E=A.fullDataFormatter.grid.groupAxis.scaleDomain[0]==="auto"?0-A.fullDataFormatter.grid.groupAxis.scalePadding:A.fullDataFormatter.grid.groupAxis.scaleDomain[0]-A.fullDataFormatter.grid.groupAxis.scalePadding,T=A.fullDataFormatter.grid.groupAxis.scaleDomain[1]==="auto"?L+A.fullDataFormatter.grid.groupAxis.scalePadding:A.fullDataFormatter.grid.groupAxis.scaleDomain[1]+A.fullDataFormatter.grid.groupAxis.scalePadding,I=A.computedData[0]?A.computedData[0].length:0;let P=(A.computedData[0]??[]).map(R=>R.groupLabel);const D=new Array(I).fill(0).map((R,G)=>P[G]!=null?P[G]:String(G)).filter((R,G)=>G>=E&&G<=T),C=A.fullDataFormatter.grid.groupAxis.scalePadding,S=ag({axisLabels:D,axisWidth:A.gridAxesSize.width,padding:C});$.next(S)})}),b=H({fullDataFormatter:i,fullParams:r}).pipe(F(h),B(async $=>$),U($=>{let A="middle",_="hanging";return $.fullDataFormatter.grid.groupAxis.position==="bottom"?(A=$.fullParams.tickTextRotate?"end":"middle",_="hanging"):$.fullDataFormatter.grid.groupAxis.position==="top"?(A=$.fullParams.tickTextRotate?"end":"middle",_="auto"):$.fullDataFormatter.grid.groupAxis.position==="left"?(A="end",_="middle"):$.fullDataFormatter.grid.groupAxis.position==="right"&&(A="start",_="middle"),{textAnchor:A,dominantBaseline:_}})),w=i.pipe(F(h),U($=>{let A="start",_="hanging";return $.grid.groupAxis.position==="bottom"?_="hanging":$.grid.groupAxis.position==="top"?_="auto":$.grid.groupAxis.position==="left"?A="end":$.grid.groupAxis.position==="right"&&(A="start"),$.grid.valueAxis.position==="left"?A="start":$.grid.valueAxis.position==="right"?A="end":$.grid.valueAxis.position==="bottom"?_="auto":$.grid.valueAxis.position==="top"&&(_="hanging"),{textAnchor:A,dominantBaseline:_}}));return H({axisSelection:y,params:r,tickTextAlign:b,axisLabelAlign:w,gridAxesSize:u,fullDataFormatter:i,chartParams:o,groupScale:x,textTransform:v}).pipe(F(h),B(async $=>$)).subscribe($=>{yI({selection:$.axisSelection,xAxisClassName:p,groupingLabelClassName:g,params:$.params,tickTextAlign:$.tickTextAlign,axisLabelAlign:$.axisLabelAlign,gridAxesSize:$.gridAxesSize,fullDataFormatter:$.fullDataFormatter,chartParams:$.chartParams,groupScale:$.groupScale,textTransform:$.textTransform})}),()=>{h.next(void 0)}},P2="GroupAxis",bI=ae(P2,qh)(({selection:t,name:e,observer:n,subject:r})=>{const i=new rt,o=T2(P2,{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()}}),D2=6;function vI({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,v,x)=>{V(x[v]).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",Et(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=Fg(c).scale(c).ticks(d>r.ticks?r.ticks:h[0]===0&&h[1]===0?1:Math.ceil(d)).tickFormat(y=>wh(y,r.tickFormat)).tickSize(r.tickFullLine==!0?-a.width:D2).tickPadding(r.tickPadding),g=f.transition().duration(100).call(p);return g.selectAll("line").style("fill","none").style("stroke",r.tickLineVisible==!0?Et(r.tickColorType,u):"none").style("stroke-dasharray",r.tickFullLineDasharray).attr("pointer-events","none"),g.selectAll("path").style("fill","none").style("stroke",r.axisLineVisible==!0?Et(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",Et(r.tickTextColorType,u)).attr("text-anchor",i.textAnchor).attr("dominant-baseline",i.dominantBaseline).attr("transform-origin",`-${r.tickPadding+D2} 0`).style("transform",l),f}const Du=(t,{selection:e,computedData$:n,fullParams$:r,fullDataFormatter$:i,fullChartParams$:o,gridAxesTransform$:a,gridAxesReverseTransform$:s,gridAxesSize$:u,gridContainer$:c,isSeriesPositionSeprate$:l})=>{const h=new rt,f=ot(t,"container"),d=ot(t,"yAxisG"),p=ot(t,"yAxis"),g=ot(t,"text"),m=H({computedData:n.pipe(ft((A,_)=>A.length===_.length)),isSeriesPositionSeprate:l}).pipe(F(h),B(async A=>A),U(A=>A.isSeriesPositionSeprate?A.computedData:[A.computedData[0]]),U((A,_)=>e.selectAll(`g.${f}`).data(A,L=>L[0]?L[0].seriesIndex:_).join("g").classed(f,!0))),y=m.pipe(F(h),U((A,_)=>A.selectAll(`g.${d}`).data([d]).join("g").classed(d,!0)));H({containerSelection:m,gridContainer:c}).pipe(F(h),B(async A=>A)).subscribe(A=>{A.containerSelection.attr("transform",(_,L)=>{const E=A.gridContainer[L]??A.gridContainer[0],T=E.translate,I=E.scale;return`translate(${T[0]}, ${T[1]}) scale(${I[0]}, ${I[1]})`})}),H({axisSelection:y,gridAxesTransform:a}).pipe(F(h),B(async A=>A)).subscribe(A=>{A.axisSelection.style("transform",A.gridAxesTransform.value)});const v=H({fullParams:r,fullDataFormatter:i,gridAxesReverseTransform:s,gridContainer:c}).pipe(F(h),B(async A=>A),U(A=>{const _=`translate(${A.gridAxesReverseTransform.translate[0]}px, ${A.gridAxesReverseTransform.translate[1]}px)`,L=`rotate(${A.gridAxesReverseTransform.rotate}deg) rotateX(${A.gridAxesReverseTransform.rotateX}deg) rotateY(${A.gridAxesReverseTransform.rotateY}deg)`,E=`scale(${1/A.gridContainer[0].scale[0]}, ${1/A.gridContainer[0].scale[1]})`,I=`rotate(${A.fullDataFormatter.grid.groupAxis.position==="left"&&A.fullDataFormatter.grid.valueAxis.position==="top"||A.fullDataFormatter.grid.groupAxis.position==="right"&&A.fullDataFormatter.grid.valueAxis.position==="bottom"?A.fullParams.tickTextRotate+180:A.fullParams.tickTextRotate}deg)`;return`${_} ${L} ${E} ${I}`}),ft()),x=new lt(A=>{H({fullDataFormatter:i,gridAxesSize:u,computedData:n}).pipe(F(h),B(async _=>_)).subscribe(_=>{const E=_.computedData[0]?_.computedData[0].length-1:0,T=_.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"?E+_.fullDataFormatter.grid.groupAxis.scalePadding:_.fullDataFormatter.grid.groupAxis.scaleDomain[1]+_.fullDataFormatter.grid.groupAxis.scalePadding,P=_.computedData.map((C,S)=>C.filter((R,G)=>G>=T&&G<=I)),D=TC(P.flat());A.next(D)})}),b=new lt(A=>{H({fullDataFormatter:i,gridAxesSize:u,minAndMax:x}).pipe(F(h),B(async _=>_)).subscribe(_=>{const L=og({maxValue:_.minAndMax[1],minValue:_.minAndMax[0],axisWidth:_.gridAxesSize.height,scaleDomain:_.fullDataFormatter.grid.valueAxis.scaleDomain,scaleRange:_.fullDataFormatter.grid.valueAxis.scaleRange});A.next(L)})}),w=i.pipe(F(h),U(A=>{let _="start",L="hanging";return A.grid.valueAxis.position==="left"?(_="end",L="middle"):A.grid.valueAxis.position==="right"?(_="start",L="middle"):A.grid.valueAxis.position==="bottom"?(_="middle",L="hanging"):A.grid.valueAxis.position==="top"&&(_="middle",L="auto"),{textAnchor:_,dominantBaseline:L}})),$=i.pipe(F(h),U(A=>{let _="start",L="hanging";return A.grid.groupAxis.position==="bottom"?L="auto":A.grid.groupAxis.position==="top"?L="hanging":A.grid.groupAxis.position==="left"?_="start":A.grid.groupAxis.position==="right"&&(_="end"),A.grid.valueAxis.position==="left"?_="end":A.grid.valueAxis.position==="right"?_="start":A.grid.valueAxis.position==="bottom"?L="hanging":A.grid.valueAxis.position==="top"&&(L="auto"),{textAnchor:_,dominantBaseline:L}}));return H({axisSelection:y,fullParams:r,tickTextAlign:w,axisLabelAlign:$,computedData:n,gridAxesSize:u,fullDataFormatter:i,fullChartParams:o,valueScale:b,textTransform:v,minAndMax:x}).pipe(F(h),B(async A=>A)).subscribe(A=>{vI({selection:A.axisSelection,yAxisClassName:p,textClassName:g,fullParams:A.fullParams,tickTextAlign:A.tickTextAlign,axisLabelAlign:A.axisLabelAlign,gridAxesSize:A.gridAxesSize,fullDataFormatter:A.fullDataFormatter,fullChartParams:A.fullChartParams,valueScale:A.valueScale,textTransform:A.textTransform,minAndMax:A.minAndMax})}),()=>{h.next(void 0)}},L2="ValueAxis",xI=ae(L2,Lu)(({selection:t,name:e,observer:n,subject:r})=>{const i=new rt,o=Du(L2,{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()}}),E2="ValueStackAxis",_I=ae(E2,Xh)(({selection:t,name:e,observer:n,subject:r})=>{const i=new rt,o=n.computedData$.pipe(F(i),U(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=Du(E2,{selection:t,computedData$:n.isSeriesPositionSeprate$.pipe(B(s=>$d(()=>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()}}),k2="ScalingArea",wI=ot(k2,"rect"),$I=ae(k2,jh)(({selection:t,rootSelection:e,name:n,observer:r,subject:i})=>{const o=new rt,a=e.insert("rect","g").classed(wI,!0).attr("opacity",0);let s={k:1,x:0,y:0};r.layout$.pipe(F(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(U(c=>c[0]?c[0].length-1:0),ft());return H({initGroupAxis:r.fullDataFormatter$.pipe(U(c=>c.grid.groupAxis),hi()),fullDataFormatter:r.fullDataFormatter$,groupMaxIndex:u,layout:r.layout$,axisSize:r.gridAxesSize$}).pipe(F(o),B(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,g=og({maxValue:c.groupMaxIndex,minValue:0,axisWidth:c.axisSize.width,scaleDomain:[f,d],scaleRange:[0,1]}).copy(),m=a2().on("zoom",function(v){const x=v.transform,b=A=>{const _=Math.round(A);return Math.min(h,Math.max(0,_))},w=c.fullDataFormatter.grid.groupAxis.position==="bottom"||c.fullDataFormatter.grid.groupAxis.position==="top"?x.rescaleX(g).domain().map(b):x.rescaleY(g).domain().map(b);w[0]<=0&&w[1]>=h?x.k<s.k&&(x.k=s.k,x.x=s.x,x.y=s.y):w[1]-w[0]<=1&&x.k>s.k&&(x.k=s.k,x.x=s.x,x.y=s.y),s.k=x.k,s.x=x.x,s.y=x.y;const $={...c.fullDataFormatter,grid:{...c.fullDataFormatter.grid,groupAxis:{...c.fullDataFormatter.grid.groupAxis,scaleDomain:w}}};i.dataFormatter$.next($)});e.call(m)}),()=>{o.next(void 0),a.remove()}});function SI(t,e){let n=new lt(()=>{});return t.each(function(){const r=Yu(this,e);n=Wu(n,r)}),n}const Th="GroupAux",Ph=ot(Th,"label-box");function AI({groupLabel:t,axisX:e,axisHeight:n,fullParams:r}){return r.showLine&&t?[{id:t,x1:e,x2:e,y1:0,y2:n}]:[]}function MI({selection:t,pluginName:e,lineData:n,fullParams:r,fullChartParams:i}){const o=ot(e,"auxline"),a=t.selectAll(`line.${o}`).data(n),s=a.enter().append("line").classed(o,!0).style("stroke",c=>Et(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 TI(t){t.selectAll("line").data([]).exit().remove()}function PI({groupLabel:t,axisX:e,fullParams:n}){return n.showLabel&&t?[{id:t,x:e,y:-n.labelPadding,text:wh(t,n.labelTextFormat)}]:[]}function DI({selection:t,labelData:e,fullParams:n,fullChartParams:r,gridAxesReverseTransformValue:i}){const o=r.styles.textSize+4,a=t.selectAll(`g.${Ph}`).data(e),s=a.enter().append("g").classed(Ph,!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=u2(c.text,r.styles.textSize)+12,d=-f/2,p=V(h[l]).selectAll("rect").data([c]),g=p.enter().append("rect").attr("height",`${o}px`).attr("fill",v=>Et(n.labelColorType,r)).attr("x",d).attr("y",-2).attr("rx",5).attr("ry",5).style("cursor","pointer");p.merge(g).attr("width",v=>`${f}px`).style("transform",i),p.exit().remove();const m=V(h[l]).selectAll("text").data([c]),y=m.enter().append("text").style("dominant-baseline","hanging").style("cursor","pointer");m.merge(y).text(v=>v.text).style("transform",i).attr("fill",v=>Et(n.labelTextColorType,r)).attr("font-size",r.styles.textSize).attr("x",d+6),m.exit().remove()}),u}function LI(t){t.selectAll(`g.${Ph}`).data([]).exit().remove()}const EI=ae(Th,Yh)(({selection:t,rootSelection:e,name:n,subject:r,observer:i})=>{const o=new rt,a=e.insert("rect","g").classed(ot(Th,"rect"),!0).attr("opacity",0),s=t.append("g");i.layout$.pipe(F(o)).subscribe(f=>{a.attr("width",f.rootWidth).attr("height",f.rootHeight)}),i.gridAxesTransform$.pipe(F(o),U(f=>f.value),ft()).subscribe(f=>{s.style("transform",f)});const u=new lt(f=>{H({fullDataFormatter:i.fullDataFormatter$,gridAxesSize:i.gridAxesSize$,computedData:i.computedData$}).pipe(F(o),B(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,v=d.computedData[0]?d.computedData[0].length:0;let x=d.fullDataFormatter.grid.gridData.seriesDirection==="row"?(d.computedData[0]??[]).map(A=>A.groupLabel):d.computedData.map(A=>A[0].groupLabel);const b=new Array(v).fill(0).map((A,_)=>x[_]!=null?x[_]:String(_)).filter((A,_)=>_>=m&&_<=y),w=d.fullDataFormatter.grid.groupAxis.scalePadding,$=ag({axisLabels:b,axisWidth:d.gridAxesSize.width,padding:w});f.next($)})}),c=Sh({fullDataFormatter$:i.fullDataFormatter$,gridAxesSize$:i.gridAxesSize$,computedData$:i.computedData$,fullChartParams$:i.fullChartParams$}),l=i.fullChartParams$.pipe(F(o),U(f=>f.highlightTarget),ft());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(F(o),B(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,gridIndex:0,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,gridIndex:0,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,gridIndex:0,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,gridIndex:0,series:[],seriesIndex:-1,seriesLabel:"",groups:f.GroupDataMap.get(m)??[],groupIndex:g,groupLabel:m,event:d,data:f.computedData})})}),H({event:r.event$.pipe(fi(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(F(o),B(async f=>f)).subscribe(f=>{const d=f.groupScale(f.event.groupLabel)??0,p=AI({groupLabel:f.event.groupLabel,axisX:d,axisHeight:f.gridAxesSize.height,fullParams:f.fullParams});MI({selection:s,pluginName:n,lineData:p,fullParams:f.fullParams,fullChartParams:f.fullChartParams});const g=PI({groupLabel:f.event.groupLabel,axisX:d,fullParams:f.fullParams});DI({selection:s,labelData:g,fullParams:f.fullParams,fullChartParams:f.fullChartParams,gridAxesReverseTransformValue:f.gridAxesReverseTransform.value}).on("mouseover",(y,v)=>{const{groupIndex:x,groupLabel:b}=f.gridGroupPositionFn(y);r.event$.next({type:"grid",pluginName:n,eventName:"mouseover",highlightTarget:f.highlightTarget,datum:null,gridIndex:0,series:[],seriesIndex:-1,seriesLabel:"",groups:f.event.groups,groupIndex:x,groupLabel:b,event:y,data:f.computedData})}).on("mousemove",(y,v)=>{const{groupIndex:x,groupLabel:b}=f.gridGroupPositionFn(y);r.event$.next({type:"grid",pluginName:n,eventName:"mousemove",highlightTarget:f.highlightTarget,datum:null,gridIndex:0,series:[],seriesIndex:-1,seriesLabel:"",groups:f.event.groups,groupIndex:x,groupLabel:b,event:y,data:f.computedData})}).on("mouseout",(y,v)=>{const{groupIndex:x,groupLabel:b}=f.gridGroupPositionFn(y);r.event$.next({type:"grid",pluginName:n,eventName:"mouseout",highlightTarget:f.highlightTarget,datum:null,gridIndex:0,series:[],seriesIndex:-1,seriesLabel:"",groups:f.event.groups,groupIndex:x,groupLabel:b,event:y,data:f.computedData})}).on("click",(y,v)=>{const{groupIndex:x,groupLabel:b}=f.gridGroupPositionFn(y);r.event$.next({type:"grid",pluginName:n,eventName:"click",highlightTarget:f.highlightTarget,datum:null,gridIndex:0,series:[],seriesIndex:-1,seriesLabel:"",groups:f.event.groups,groupIndex:x,groupLabel:b,event:y,data:f.computedData})})}),SI(a,"mouseout").pipe(F(o)).subscribe(f=>{console.log("rootMouseout"),TI(s),LI(s)}),()=>{o.next(void 0),a.remove()}}),C2={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}],textColorType:"primary"},I2={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]},R2={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]},N2={barWidth:0,barPadding:1,barGroupPadding:40,barRadius:!1,gridIndexes:[0]},F2={barWidth:0,barGroupPadding:10,barRadius:!1,gridIndexes:[0]},G2={barWidth:0,barPadding:1,barGroupPadding:20,linearGradientOpacity:[1,0],gridIndexes:[0]},z2={lineCurve:"curveLinear",lineWidth:2,gridIndexes:[1]},O2={radius:4,fillColorType:"white",strokeColorType:"series",strokeWidth:2,onlyShowHighlighted:!1,gridIndexes:[1]},U2={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]},B2="MultiGridLegend",kI=Xe(B2,C2)(({selection:t,rootSelection:e,observer:n,subject:r})=>{const i=new rt,o=n.multiGridEachDetail$.pipe(F(i),U(c=>c.map((h,f)=>h.SeriesDataMap$.pipe(U(d=>Array.from(d.keys()))))),B(c=>H(c)),U(c=>c.flat())),a=H({fullParams:n.fullParams$,multiGrid:n.multiGridEachDetail$,computedData:n.computedData$}).pipe(F(i),B(async c=>c),U(c=>c.computedData.map((l,h)=>{const f=fc(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(F(i),B(async c=>c),U(c=>({...c.fullParams,seriesList:c.seriesList}))),u=Pu(B2,{rootSelection:e,seriesLabels$:o,fullParams$:s,layout$:n.layout$,fullChartParams$:n.fullChartParams$});return()=>{i.next(void 0),u()}}),Sn=t=>{const e=t.fullParams$.pipe(U(r=>r.gridIndexes),ft(),Ye(1)),n=new rt;return e.pipe(U(r=>r.map(i=>{n.next(void 0);const o=li(i).pipe(F(n),Ye(1)),a=H({computedData:t.computedData$,gridIndex:o}).pipe(F(n),U(w=>w.computedData[w.gridIndex]??w.computedData[0])),s=H({fullDataFormatter:t.fullDataFormatter$,gridIndex:o}).pipe(F(n),U(w=>{const $=w.fullDataFormatter.gridList[0];return{type:"grid",grid:{...w.fullDataFormatter.gridList[w.gridIndex]??$},container:{...w.fullDataFormatter.container}}})),u=H({multiGridEachDetail:t.multiGridEachDetail$,gridIndex:o}).pipe(F(n),B(async w=>w),U(w=>w.multiGridEachDetail[w.gridIndex]??w.multiGridEachDetail[0]),Ye(1)),c=u.pipe(B(w=>w.isSeriesPositionSeprate$)),l=u.pipe(B(w=>w.gridContainer$)),h=u.pipe(B(w=>w.gridAxesTransform$)),f=u.pipe(B(w=>w.gridAxesReverseTransform$)),d=u.pipe(B(w=>w.gridAxesSize$)),p=u.pipe(B(w=>w.gridGraphicTransform$)),g=u.pipe(B(w=>w.gridGraphicReverseScale$)),m=u.pipe(B(w=>w.gridHighlight$)),y=u.pipe(B(w=>w.existSeriesLabels$)),v=u.pipe(B(w=>w.SeriesDataMap$)),x=u.pipe(B(w=>w.GroupDataMap$)),b=u.pipe(B(w=>w.visibleComputedData$));return{gridComputedData$:a,gridDataFormatter$:s,gridAxesTransform$:h,gridGraphicTransform$:p,gridGraphicReverseScale$:g,gridAxesReverseTransform$:f,gridAxesSize$:d,gridHighlight$:m,existSeriesLabels$:y,SeriesDataMap$:v,GroupDataMap$:x,visibleComputedData$:b,isSeriesPositionSeprate$:c,gridContainer$:l}})))},Dh="MultiBars",Y2=ot(Dh,"grid"),CI=Xe(Dh,N2)(({selection:t,name:e,subject:n,observer:r})=>{const i=new rt,o=[];return Sn(r).subscribe(s=>{o.forEach(u=>u()),t.selectAll(`g.${Y2}`).data(s).join("g").attr("class",Y2).each((u,c,l)=>{const h=V(l[c]);o[c]=Ah(Dh,{selection:h,computedData$:u.gridComputedData$,visibleComputedData$:u.visibleComputedData$,existSeriesLabels$:u.existSeriesLabels$,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())}}),Lh="MultiBarStack",W2=ot(Lh,"grid"),II=Xe(Lh,F2)(({selection:t,name:e,subject:n,observer:r})=>{const i=new rt,o=[];return Sn(r).subscribe(s=>{o.forEach(u=>u()),t.selectAll(`g.${W2}`).data(s).join("g").attr("class",W2).each((u,c,l)=>{const h=V(l[c]);o[c]=y2(Lh,{selection:h,computedData$:u.gridComputedData$,visibleComputedData$:u.visibleComputedData$,existSeriesLabels$:u.existSeriesLabels$,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())}}),Eh="MultiBarsTriangle",H2=ot(Eh,"grid"),RI=Xe(Eh,G2)(({selection:t,name:e,subject:n,observer:r})=>{const i=new rt,o=[];return Sn(r).subscribe(s=>{o.forEach(u=>u()),t.selectAll(`g.${H2}`).data(s).join("g").attr("class",H2).each((u,c,l)=>{const h=V(l[c]);o[c]=_2(Eh,{selection:h,computedData$:u.gridComputedData$,visibleComputedData$:u.visibleComputedData$,existSeriesLabels$:u.existSeriesLabels$,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())}}),kh="MultiLines",q2=ot(kh,"grid"),NI=Xe(kh,z2)(({selection:t,name:e,subject:n,observer:r})=>{const i=new rt,o=[];return Sn(r).subscribe(s=>{o.forEach(u=>u()),t.selectAll(`g.${q2}`).data(s).join("g").attr("class",q2).each((u,c,l)=>{const h=V(l[c]);o[c]=c2(kh,{selection:h,computedData$:u.gridComputedData$,existSeriesLabels$:u.existSeriesLabels$,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())}}),Ch="MultiDots",X2=ot(Ch,"grid"),FI=Xe(Ch,O2)(({selection:t,name:e,subject:n,observer:r})=>{const i=new rt,o=[];return Sn(r).subscribe(s=>{o.forEach(u=>u()),t.selectAll(`g.${X2}`).data(s).join("g").attr("class",X2).each((u,c,l)=>{const h=V(l[c]);o[c]=$2(Ch,{selection:h,computedData$:u.gridComputedData$,visibleComputedData$:u.visibleComputedData$,existSeriesLabels$:u.existSeriesLabels$,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())}}),Ih="MultiGroupAxis",j2=ot(Ih,"grid"),GI=Xe(Ih,I2)(({selection:t,name:e,subject:n,observer:r})=>{const i=new rt,o=[];return Sn(r).subscribe(s=>{o.forEach(u=>u()),t.selectAll(`g.${j2}`).data(s).join("g").attr("class",j2).each((u,c,l)=>{const h=V(l[c]);o[c]=T2(Ih,{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())}}),Rh="MultiValueAxis",V2=ot(Rh,"grid"),zI=Xe(Rh,R2)(({selection:t,name:e,subject:n,observer:r})=>{const i=new rt,o=[];return Sn(r).subscribe(s=>{o.forEach(u=>u()),t.selectAll(`g.${V2}`).data(s).join("g").attr("class",V2).each((u,c,l)=>{const h=V(l[c]);o[c]=Du(Rh,{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 Z2(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 OI=({fullDataFormatter$:t,layout$:e})=>{const n=new rt;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(F(n),B(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)}))},UI=({gridAxesTransform$:t})=>t.pipe(U(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)`}})),BI=({computedData$:t,fullDataFormatter$:e,fullChartParams$:n,layout$:r})=>H({computedData:t,fullDataFormatter:e,fullChartParams:n,layout:r}).pipe(B(async o=>o),U(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}=Z2(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}=Z2(o.layout,o.fullDataFormatter.container,c,u);return{slotIndex:a.slotIndex,rowIndex:c,columnIndex:u,translate:f,scale:d}})}})),Nh="OverlappingValueAxes",K2=ot(Nh,"grid"),YI=Xe(Nh,U2)(({selection:t,name:e,subject:n,observer:r})=>{const i=new rt,o=[],a=r.fullParams$.pipe(F(i),U(l=>l.gridIndexes[0])),s=r.fullParams$.pipe(F(i),U(l=>l.gridIndexes[1])),u=H({firstGridIndex:a,secondGridIndex:s}).pipe(F(i),B(l=>r.fullDataFormatter$.pipe(F(i),U(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 li(r).pipe(F(i),U(l=>({...l,fullParams$:l.fullParams$.pipe(U(h=>(h.gridIndexes.length>2&&(h.gridIndexes.length=2),h)))})),B(l=>Sn(l)),U(l=>l.map((h,f)=>{if(f===0)return h;const d=OI({fullDataFormatter$:u,layout$:r.layout$}),p=UI({gridAxesTransform$:d}),g=BI({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.${K2}`).data(l).join("g").attr("class",K2).each((h,f,d)=>{if(f>1)return;const p=V(d[f]);o[f]=Du(Nh,{selection:p,computedData$:h.gridComputedData$,fullParams$:r.fullParams$.pipe(U(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())}}),Q2={header:{height:36,text:[],textStyle:[]},footer:{height:0,text:[],textStyle:[]}},J2={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(i=>i.value),r=n.length>5?n.slice(0,5).join(",")+"...":n.join(",");return[e,r]}else if(t.highlightTarget==="group"){const e=t.groupLabel,n=t.series.map(i=>i.value),r=n.length>5?n.slice(0,5).join(",")+"...":n.join(",");return[e,r]}else if(t.highlightTarget==="category"){const e=t.categoryLabel,n=t.category.map(i=>i.value),r=n.length>5?n.slice(0,5).join(",")+"...":n.join(",");return[e,r]}return[]},svgRenderFn:null},WI=sg("Container",Q2)(({selection:t})=>function(){}),Fh="Tooltip",tx=ot(Fh,"g"),HI=ot(Fh,"box");function qI(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 XI({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.${tx}`).data(u).join(b=>b.append("g").classed(tx,!0).attr("pointer-events","none"),b=>b,b=>b.style("opacity",0).remove()).attr("transform",()=>`translate(${a.offsetX}, ${a.offsetY})`).selectAll(`g.${HI}`).data(c).join(b=>b.append("g").classed(ot(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(ot(e,"content"),!0).attr("transform",()=>`translate(${o.padding}, ${o.padding})`));u.length&&AC(d,u[0]);const p=d!=null&&d.node()?s2(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()?s2(h):{width:0,height:0},m=n-g.width,y=r-g.height,v=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(${v}, ${x})`),h.attr("transform",b=>`translate(${v}, ${x})`)}const jI=sg(Fh,J2)(({selection:t,rootSelection:e,name:n,chartType:r,observer:i,subject:o})=>{const a=new rt,s=o.event$.pipe(F(a),fi(p=>p.eventName==="mouseover"||p.eventName==="mousemove")),u=o.event$.pipe(F(a),fi(p=>p.eventName==="mouseout")),c=H({fullChartParams:i.fullChartParams$,fullParams:i.fullParams$}).pipe(F(a),B(async p=>p),U(p=>({backgroundColor:Et(p.fullParams.backgroundColorType,p.fullChartParams),backgroundOpacity:p.fullParams.backgroundOpacity,strokeColor:Et(p.fullParams.strokeColorType,p.fullChartParams),offset:p.fullParams.offset,padding:p.fullParams.padding,textSize:p.fullChartParams.styles.textSize,textColor:Et(p.fullParams.textColorType,p.fullChartParams)}))),l=H({fullParams:i.fullParams$,tooltipStyle:c}).pipe(F(a),B(async p=>p),U(p=>p.fullParams.svgRenderFn?p.fullParams.svgRenderFn:g=>{const m=p.fullParams.textRenderFn(g);return qI(m,p.tooltipStyle)})),h=H({event:s,contentRenderFn:l}).pipe(F(a),B(async p=>p),U(p=>p.contentRenderFn(p.event))),f=u.pipe(F(a),U(p=>"")),d=Wu(s,u).pipe(F(a),U(p=>p.event));return H({svgString:Wu(h,f),event:d,layout:i.layout$,tooltipStyle:c}).pipe(F(a),B(async p=>p)).subscribe(p=>{XI({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)}}),ex={force:{strength:.03,velocityDecay:.2,collisionSpacing:2},bubbleText:{fillRate:.6,lineHeight:12,lineLengthMin:4},highlightRIncrease:0,bubbleScaleType:"area"},nx={outerRadius:.95,innerRadius:0,outerMouseoverRadius:1,enterDuration:800,startAngle:0,endAngle:Math.PI*2,padAngle:.02,cornerRadius:0},rx={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"}]},ix={outerRadius:.95,outerMouseoverRadius:1,startAngle:0,endAngle:Math.PI*2,labelCentroid:2.3,labelColorType:"series",labelFn:t=>String(t.value)},ox={position:"right",justify:"end",padding:28,backgroundFill:"none",backgroundStroke:"none",gap:10,listRectWidth:14,listRectHeight:14,listRectRadius:0,textColorType:"primary"};function VI(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 v=" ";i&&(v="");for(let x=0,b=d.length;x<b;++x){const w=(g.text?g.text+v:"")+d[x],$=u(w);(m+$)/2<p?(g.width=m=$,g.text=w):(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,v=d[g].width/2;p=Math.max(p,Math.sqrt(v**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),v=h(y);let x=d.select("text");x.size()||(x=d.append("text")),x.attr("transform",`translate(0,0) scale(${n/v})`);const b=x.selectAll("tspan").data(y),w=b.enter().append("tspan").attr("x",0).merge(b).attr("y",($,A)=>(A-y.length/2+.8)*r).text($=>$.text);return b.exit().remove(),b.merge(w)}return f(t,e)}let sr;function ZI(t,e){return R1().velocityDecay(e.force.velocityDecay).force("collision",k1().radius(n=>n.r+e.force.collisionSpacing)).force("charge",N1().strength(n=>-Math.pow(n.r,2)*e.force.strength)).on("tick",()=>{t.attr("transform",n=>`translate(${n.x},${n.y})`)})}function KI({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 QI({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=KI({data:a,bubbleGroupR:o,maxValue:s,avgValue:u}),l=i==="area"?.5:1,h=tu().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 ax({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=V(u[s]);let l=!0;a.label.length<=n.bubbleText.lineLengthMin&&(l=!1),c.call(VI,{text:a.label,radius:a.r*n.bubbleText.fillRate,lineHeight:n.bubbleText.lineHeight,isBreakAll:l})}),o}function JI({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 tR(){return Vg().on("start",(t,e)=>{t.active||sr.alpha(1).restart(),e.fx=e.x,e.fy=e.y}).on("drag",(t,e)=>{t.active||sr.alphaTarget(0),e.fx=t.x,e.fy=t.y}).on("end",(t,e)=>{e.fx=null,e.fy=null})}function sx({fullParams:t,graphicWidth:e,graphicHeight:n}){sr.force("x",F1().strength(t.force.strength).x(0)).force("y",G1().strength(t.force.strength).y(0)),sr.alpha(1).restart()}function eR({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=V(o[i]);e.includes(r.id)?a.style("opacity",1).transition("highlight").ease(Qa).duration(500):a.style("opacity",n.styles.unhighlightedOpacity)})}const nR=Di("Bubbles",ex)(({selection:t,name:e,observer:n,subject:r})=>{const i=new rt,o=t.append("g"),a=new rt;let s=new Map;n.layout$.pipe(hi()).subscribe(h=>{t.attr("transform",`translate(${h.width/2}, ${h.height/2})`),n.layout$.pipe(F(i)).subscribe(f=>{t.transition().attr("transform",`translate(${f.width/2}, ${f.height/2})`)})});const u=n.fullParams$.pipe(F(i),U(h=>h.bubbleScaleType),ft()),c=new lt(h=>{H({layout:n.layout$,computedData:n.computedData$,scaleType:u}).pipe(F(i),B(async f=>f)).subscribe(f=>{const d=QI({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(F(i),U(h=>h.highlightTarget),ft());return H({layout:n.layout$,computedData:n.computedData$,bubblesData:c,SeriesDataMap:n.SeriesDataMap$,fullParams:n.fullParams$,highlightTarget:l}).pipe(F(i),B(async h=>h)).subscribe(h=>{const f=ax({graphicSelection:o,bubblesData:h.bubblesData,fullParams:h.fullParams});sr=ZI(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(tR()),sr.nodes(h.bubblesData),sx({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(F(i),B(async h=>h)).subscribe(h=>{eR({bubblesSelection:h.bubblesSelection,highlightIds:h.highlight,fullChartParams:h.fullChartParams}),h.fullParams.highlightRIncrease&&(JI({data:h.bubblesData,highlightRIncrease:h.fullParams.highlightRIncrease,highlightIds:h.highlight}),ax({graphicSelection:o,bubblesData:h.bubblesData,fullParams:h.fullParams})),sx({fullParams:h.fullParams,graphicWidth:h.layout.width,graphicHeight:h.layout.height}),sr.nodes(h.bubblesData)}),()=>{i.next(void 0)}});function ux({computedDataSeries:t,startAngle:e,endAngle:n}){return vv().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 cx="Pie",rR=ot(cx,"path");function iR({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 Gh(a,i.startAngle,i.endAngle,1)}:o=>Gh(n,i.startAngle,i.endAngle,o)}function Gh(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 lx({selection:t,renderData:e,arc:n}){let r=t.selectAll("path").data(e,s=>s.id),i=r.enter().append("path").classed(rR,!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 oR({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=V(s[a]);e.includes(o.data.id)?u.style("opacity",1).transition("highlight").ease(Qa).duration(500).attr("d",c=>i(c)):u.style("opacity",n.styles.unhighlightedOpacity).transition("highlight").attr("d",c=>r(c))})}const aR=Di(cx,nx)(({selection:t,name:e,observer:n,subject:r})=>{const i=new rt,o=t.append("g"),a=new rt;let s=[],u=[];n.layout$.pipe(hi()).subscribe(p=>{t.attr("transform",`translate(${p.width/2}, ${p.height/2})`),n.layout$.pipe(F(i)).subscribe(g=>{t.transition().attr("transform",`translate(${g.width/2}, ${g.height/2})`)})});const c=n.layout$.pipe(F(i),U(p=>p.width<p.height?p.width:p.height)),l=new lt(p=>{H({computedData:n.computedData$,fullParams:n.fullParams$}).pipe(F(i),B(async g=>g)).subscribe(g=>{const m=ux({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(F(i),B(async g=>g)).subscribe(g=>{const m=Tu({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(F(i),B(async g=>g)).subscribe(g=>{const m=Tu({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(F(i),U(p=>p.highlightTarget),ft());return H({pieData:l,SeriesDataMap:n.SeriesDataMap$,arc:h,arcMouseover:f,computedData:n.computedData$,fullParams:n.fullParams$,fullChartParams:n.fullChartParams$,highlightTarget:d}).pipe(F(i),B(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 v=iR({enter:m,exit:y,data:p.pieData,lastData:s,fullParams:p.fullParams});o.transition("graphicMove").duration(p.fullChartParams.transitionDuration).ease(ar(p.fullChartParams.transitionEase)).tween("move",(x,b)=>w=>{u=v(w),lx({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=Gh(p.pieData,p.fullParams.startAngle,p.fullParams.endAngle,1);const w=lx({selection:o,renderData:u,arc:p.arc});a.next(w),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}),w.on("mouseover",($,A)=>{$.stopPropagation(),r.event$.next({type:"series",eventName:"mouseover",pluginName:e,highlightTarget:p.highlightTarget,datum:A.data,series:p.SeriesDataMap.get(A.data.seriesLabel),seriesIndex:A.data.seriesIndex,seriesLabel:A.data.seriesLabel,event:$,data:p.computedData})}).on("mousemove",($,A)=>{$.stopPropagation(),r.event$.next({type:"series",eventName:"mousemove",pluginName:e,highlightTarget:p.highlightTarget,datum:A.data,series:p.SeriesDataMap.get(A.data.seriesLabel),seriesIndex:A.data.seriesIndex,seriesLabel:A.data.seriesLabel,event:$,data:p.computedData})}).on("mouseout",($,A)=>{$.stopPropagation(),r.event$.next({type:"series",eventName:"mouseout",pluginName:e,highlightTarget:p.highlightTarget,datum:A.data,series:p.SeriesDataMap.get(A.data.seriesLabel),seriesIndex:A.data.seriesIndex,seriesLabel:A.data.seriesLabel,event:$,data:p.computedData})}).on("click",($,A)=>{$.stopPropagation(),r.event$.next({type:"series",eventName:"click",pluginName:e,highlightTarget:p.highlightTarget,datum:A.data,series:p.SeriesDataMap.get(A.data.seriesLabel),seriesIndex:A.data.seriesIndex,seriesLabel:A.data.seriesLabel,event:$,data:p.computedData})})})}),H({pathSelection:a,highlight:n.seriesHighlight$,fullChartParams:n.fullChartParams$,arc:h,arcMouseover:f}).pipe(F(i),B(async p=>p)).subscribe(p=>{oR({pathSelection:p.pathSelection,ids:p.highlight,fullChartParams:p.fullChartParams,arc:p.arc,arcMouseover:p.arcMouseover})}),()=>{i.next(void 0)}}),fx="PieEventTexts",hx=ot(fx,"text");function zh(t,e){const n=t.selectAll(`text.${hx}`).data(e),r=n.enter().append("text").classed(hx,!0),i=n.merge(r);return i.each((o,a,s)=>{const u=V(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 Oh({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 sR=Di(fx,rx)(({selection:t,name:e,observer:n,subject:r})=>{const i=new rt,o=t.append("g");let a;n.layout$.pipe(hi()).subscribe(u=>{t.attr("transform",`translate(${u.width/2}, ${u.height/2})`),n.layout$.pipe(F(i)).subscribe(c=>{t.transition().attr("transform",`translate(${c.width/2}, ${c.height/2})`)})});const s=n.fullChartParams$.pipe(F(i),U(u=>u.highlightTarget),ft());return H({computedData:n.computedData$,fullParams:n.fullParams$,fullChartParams:n.fullChartParams$,highlightTarget:s}).pipe(F(i),B(async u=>u)).subscribe(u=>{o.transition().duration(u.fullChartParams.transitionDuration).ease(ar(u.fullChartParams.transitionEase)).tween("move",(c,l)=>h=>{const f=Oh({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});zh(o,f)}).on("end",(c,l)=>{const h=Oh({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});zh(o,h),a&&a.unsubscribe(),a=r.event$.subscribe(f=>{const d=Oh({eventData:f,eventName:f.eventName,t:1,eventFn:u.fullParams.eventFn,textAttrs:u.fullParams.textAttrs,textStyles:u.fullParams.textStyles});zh(o,d)})})}),()=>{i.next(void 0)}}),dx="PieLabels",uR=ot(dx,"text");function cR(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 lR(t,e,n,r){let i=t.selectAll("text").data(e,u=>u.pieDatum.id),o=i.enter().append("text").classed(uR,!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)=>$h({datum:u.pieDatum.data,colorType:n.labelColorType,fullChartParams:r})).transition().attr("transform",u=>"translate("+u.x+","+u.y+")"),a.remove(),s}function fR({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=V(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 hR=Di(dx,ix)(({selection:t,observer:e,subject:n})=>{const r=new rt,i=t.append("g");let o=new rt,a=[];return e.layout$.pipe(hi()).subscribe(s=>{t.attr("transform",`translate(${s.width/2}, ${s.height/2})`),e.layout$.pipe(F(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(F(r),B(async s=>s)).subscribe(s=>{const u=s.layout.width<s.layout.height?s.layout.width:s.layout.height,c=Tu({axisWidth:u,innerRadius:0,outerRadius:s.fullParams.outerRadius,padAngle:0,cornerRadius:0}),l=Tu({axisWidth:u,innerRadius:0,outerRadius:s.fullParams.outerMouseoverRadius,padAngle:0,cornerRadius:0}),h=ux({computedDataSeries:s.computedData,startAngle:s.fullParams.startAngle,endAngle:s.fullParams.endAngle});a=cR(h,c,l,s.fullParams.labelCentroid);const f=lR(i,a,s.fullParams,s.fullChartParams);o.next(f)}),H({labelSelection:o,highlight:e.seriesHighlight$,fullChartParams:e.fullChartParams$}).pipe(F(r),B(async s=>s)).subscribe(s=>{fR({labelSelection:s.labelSelection,ids:s.highlight,fullChartParams:s.fullChartParams})}),()=>{r.next(void 0)}}),px="SeriesLegend",dR=Di(px,ox)(({selection:t,rootSelection:e,observer:n,subject:r})=>{const i=new rt,o=n.SeriesDataMap$.pipe(F(i),U(u=>Array.from(u.keys()))),a=n.fullParams$.pipe(F(i),U(u=>{const c=[{listRectWidth:u.listRectWidth,listRectHeight:u.listRectHeight,listRectRadius:u.listRectRadius}];return{...u,seriesList:c}})),s=Pu(px,{rootSelection:e,seriesLabels$:o,fullParams$:a,layout$:n.layout$,fullChartParams$:n.fullChartParams$});return()=>{i.next(void 0),s()}}),gx={paddingInner:2,paddingOuter:2,labelColorType:"primary",squarifyRatio:1.618034,sort:(t,e)=>e.value-t.value},mx={position:"right",justify:"end",padding:28,backgroundFill:"none",backgroundStroke:"none",gap:10,listRectWidth:14,listRectHeight:14,listRectRadius:0,textColorType:"primary"},yx="TreeLegend",pR=ug(yx,mx)(({selection:t,rootSelection:e,observer:n,subject:r})=>{const i=new rt,o=n.CategoryDataMap$.pipe(F(i),U(u=>Array.from(u.keys()))),a=n.fullParams$.pipe(F(i),U(u=>{const c=[{listRectWidth:u.listRectWidth,listRectHeight:u.listRectHeight,listRectRadius:u.listRectRadius}];return{...u,seriesList:c}})),s=Pu(yx,{rootSelection:e,seriesLabels$:o,fullParams$:a,layout$:n.layout$,fullChartParams$:n.fullChartParams$});return()=>{i.next(void 0),s()}}),ur="TreeMap",bx=ot(ur,"tree"),vx=ot(ur,"tile");function gR({selection:t,treeData:e,fullParams:n,fullChartParams:r}){const i=r.styles.textSize/2,o=t.selectAll(`g.${bx}`).data(e,a=>a.data.id).join("g").attr("class",bx);return o.attr("transform",a=>!a.x0||!a.y0?null:`translate(${a.x0},${a.y0})`).each((a,s,u)=>{const c=V(u[s]);c.selectAll(`rect.${vx}`).data([a],l=>l.data.id).join("rect").attr("id",l=>l.data.id).attr("class",vx).attr("cursor","pointer").attr("width",l=>l.x1-l.x0).attr("height",l=>l.y1-l.y0).attr("fill",l=>l.data.color).attr("data-name",l=>l.data.label).attr("data-category",l=>l.data.categoryLabel).attr("data-value",l=>l.data.value),c.selectAll("g").data([a]).join("g").each((l,h,f)=>{V(f[h]).selectAll("text").data([l]).join("text").text(p=>p.data.label).attr("dominant-baseline","hanging").attr("x",i).attr("y",i).attr("font-size",r.styles.textSize).each(function(p){const g=V(this),m=p.data.label.split(/\s+/).reverse();let y,v=[];const x=r.styles.textSize,b=g.attr("x");let w=g.attr("y"),$=0,A=g.text(null).append("tspan").attr("cursor","pointer").attr("fill",Et(n.labelColorType,r)).attr("font-size",r.styles.textSize).attr("x",b).attr("y",w);for(;y=m.pop();)v.push(y),A.text(v.join(" ")),A.node().getComputedTextLength()>p.x1-p.x0-i&&(v.pop(),A.text(v.join(" ")),v=[y],$+=x,A=g.append("tspan").attr("cursor","pointer").attr("fill",Et(n.labelColorType,r)).attr("font-size",r.styles.textSize).attr("x",b).attr("y",w).attr("dy",$+"px").text(y))})})}),o}function mR({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.data.id)?V(o[i]).style("opacity",1):V(o[i]).style("opacity",n.styles.unhighlightedOpacity)})}const yR=ug(ur,gx)(({selection:t,name:e,subject:n,observer:r})=>{const i=new rt,o=H({layout:r.layout$,visibleComputedData:r.visibleComputedData$,fullParams:r.fullParams$,fullDataFormatter:r.fullDataFormatter$,fullChartParams:r.fullChartParams$}).pipe(F(i),B(async u=>u),U(u=>{const c=Py().size([u.layout.width,u.layout.height]).paddingInner(u.fullParams.paddingInner).paddingOuter(u.fullParams.paddingOuter).round(!0).tile(Ff.ratio(u.fullParams.squarifyRatio)),l=qs(u.visibleComputedData).sum(f=>f.value).sort(u.fullParams.sort);return c(l),l.leaves()})),a=H({selection:li(t),treeData:o,fullParams:r.fullParams$,fullChartParams:r.fullChartParams$}).pipe(F(i),B(async u=>u),U(u=>gR({selection:t,treeData:u.treeData,fullParams:u.fullParams,fullChartParams:u.fullChartParams}))),s=r.fullChartParams$.pipe(F(i),U(u=>u.highlightTarget),ft());return H({cellSelection:a,computedData:r.computedData$,treeData:o,fullParams:r.fullParams$,fullChartParams:r.fullChartParams$,highlightTarget:s,CategoryDataMap:r.CategoryDataMap$}).pipe(F(i),B(async u=>u)).subscribe(u=>{u.cellSelection.on("mouseover",(c,l)=>{c.stopPropagation(),n.event$.next({type:"tree",eventName:"mouseover",pluginName:ur,highlightTarget:u.highlightTarget,datum:l.data,category:u.CategoryDataMap.get(l.data.categoryLabel),categoryIndex:l.data.categoryIndex,categoryLabel:l.data.categoryLabel,event:c,data:u.computedData})}).on("mousemove",(c,l)=>{c.stopPropagation(),n.event$.next({type:"tree",eventName:"mousemove",pluginName:ur,highlightTarget:u.highlightTarget,datum:l.data,category:u.CategoryDataMap.get(l.data.categoryLabel),categoryIndex:l.data.categoryIndex,categoryLabel:l.data.categoryLabel,event:c,data:u.computedData})}).on("mouseout",(c,l)=>{c.stopPropagation(),n.event$.next({type:"tree",eventName:"mouseout",pluginName:ur,highlightTarget:u.highlightTarget,datum:l.data,category:u.CategoryDataMap.get(l.data.categoryLabel),categoryIndex:l.data.categoryIndex,categoryLabel:l.data.categoryLabel,event:c,data:u.computedData})}).on("click",(c,l)=>{c.stopPropagation(),n.event$.next({type:"tree",eventName:"click",pluginName:ur,highlightTarget:u.highlightTarget,datum:l.data,category:u.CategoryDataMap.get(l.data.categoryLabel),categoryIndex:l.data.categoryIndex,categoryLabel:l.data.categoryLabel,event:c,data:u.computedData})})}),H({cellSelection:a,highlight:r.treeHighlight$,fullChartParams:r.fullChartParams$}).pipe(F(i),B(async u=>u)).subscribe(u=>{mR({selection:u.cellSelection,ids:u.highlight,fullChartParams:u.fullChartParams})}),()=>{i.next(void 0)}});Z.BarStack=nI,Z.Bars=jC,Z.BarsDiverging=VC,Z.BarsTriangle=lI,Z.Bubbles=nR,Z.CONTAINER_PLUGIN_PARAMS=Q2,Z.Container=WI,Z.DEFAULT_BARS_DIVERGING_PARAMS=xx,Z.DEFAULT_BARS_PARAMS=Fo,Z.DEFAULT_BARS_TRIANGLE_PARAMS=Hh,Z.DEFAULT_BAR_STACK_PARAMS=Wh,Z.DEFAULT_BUBBLES_PARAMS=ex,Z.DEFAULT_DOTS_PARAMS=Bh,Z.DEFAULT_GRID_LEGEND_PARAMS=Vh,Z.DEFAULT_GROUP_AREA_PARAMS=Yh,Z.DEFAULT_GROUP_AXIS_PARAMS=qh,Z.DEFAULT_LINES_PARAMS=cr,Z.DEFAULT_LINE_AREAS_PARAMS=Uh,Z.DEFAULT_MULTI_BARS_PARAMS=N2,Z.DEFAULT_MULTI_BARS_TRIANGLE_PARAMS=G2,Z.DEFAULT_MULTI_BAR_STACK_PARAMS=F2,Z.DEFAULT_MULTI_DOTS_PARAMS=O2,Z.DEFAULT_MULTI_GRID_LEGEND_PARAMS=C2,Z.DEFAULT_MULTI_GROUP_AXIS_PARAMS=I2,Z.DEFAULT_MULTI_LINES_PARAMS=z2,Z.DEFAULT_MULTI_VALUE_AXIS_PARAMS=R2,Z.DEFAULT_OVERLAPPING_VALUE_AXES_PARAMS=U2,Z.DEFAULT_PIE_EVENT_TEXTS_PARAMS=rx,Z.DEFAULT_PIE_LABELS_PARAMS=ix,Z.DEFAULT_PIE_PARAMS=nx,Z.DEFAULT_SCALING_AREA_PARAMS=jh,Z.DEFAULT_SERIES_LEGEND_PARAMS=ox,Z.DEFAULT_TREE_LEGEND_PARAMS=mx,Z.DEFAULT_TREE_MAP_PARAMS=gx,Z.DEFAULT_VALUE_AXIS_PARAMS=Lu,Z.DEFAULT_VALUE_STACK_AXIS_PARAMS=Xh,Z.Dots=pI,Z.GridLegend=mI,Z.GroupAux=EI,Z.GroupAxis=bI,Z.LineAreas=UC,Z.Lines=CC,Z.MultiBarStack=II,Z.MultiBars=CI,Z.MultiBarsTriangle=RI,Z.MultiDots=FI,Z.MultiGridLegend=kI,Z.MultiGroupAxis=GI,Z.MultiLines=NI,Z.MultiValueAxis=zI,Z.OverlappingValueAxes=YI,Z.Pie=aR,Z.PieEventTexts=sR,Z.PieLabels=hR,Z.ScalingArea=$I,Z.SeriesLegend=dR,Z.TOOLTIP_PARAMS=J2,Z.Tooltip=jI,Z.TreeLegend=pR,Z.TreeMap=yR,Z.ValueAxis=xI,Z.ValueStackAxis=_I,Object.defineProperty(Z,Symbol.toStringTag,{value:"Module"})});
15
+ `})}function pI({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)=>{V(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 gI({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)?V(a[o]).style("opacity",1):V(a[o]).style("opacity",n.styles.unhighlightedOpacity)})}const $2=(t,{selection:e,computedData$:n,visibleComputedData$:r,existSeriesLabels$: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 nt,y=An(t,"clipPath-box"),x=ot(t,"pathG"),v=ot(t,"path"),{seriesSelection$:b,axesSelection$:_,defsSelection$:w,graphicGSelection$:S}=ui({selection:e,pluginName:t,clipPathID:y,existSeriesLabels$:i,gridContainer$:d,gridAxesTransform$:c,gridGraphicTransform$:l});l.pipe(F(m),U(M=>-M.translate[1]/M.scale[1]));const k=r.pipe(U(M=>M.map(N=>N[0]?N[0].axisY-N[0].axisYFromZero:0)),ft()),$=W({computedData:n,visibleComputedData:r,params:s,gridAxesSize:h,isSeriesPositionSeprate:p}).pipe(F(m),B(async M=>M),U(M=>M.params.barWidth?M.params.barWidth:M.isSeriesPositionSeprate?w2({axisWidth:M.gridAxesSize.width,groupAmount:M.computedData[0]?M.computedData[0].length:0,barAmountOfGroup:1,barPadding:M.params.barPadding,barGroupPadding:M.params.barGroupPadding}):w2({axisWidth:M.gridAxesSize.width,groupAmount:M.computedData[0]?M.computedData[0].length:0,barAmountOfGroup:M.visibleComputedData.length,barPadding:M.params.barPadding,barGroupPadding:M.params.barGroupPadding}))),E=r.pipe(F(m),U(M=>{const N=new Set;return M.forEach(z=>{z.forEach(L=>{N.add(L.seriesLabel)})}),Array.from(N)})),A=r.pipe(F(m),U(M=>{const N=new Set;return M.forEach(z=>{z.forEach(L=>{N.add(L.groupLabel)})}),Array.from(N)})),I=new lt(M=>{W({seriesLabels:E,barWidth:$,params:s}).pipe(F(m),B(async N=>N)).subscribe(N=>{const z=cI(N.barWidth,N.seriesLabels,N.params);M.next(z)})}),D=u.pipe(F(m),U(M=>M.transitionDuration),ft()),T=new lt(M=>{W({groupLabels:A,transitionDuration:D}).pipe(B(async N=>N)).subscribe(N=>{const z=lI(N.groupLabels.length,N.transitionDuration);M.next(z)})}).pipe(F(m),ft()),C=new lt(M=>{W({groupLabels:A,transitionDuration:D}).pipe(B(async N=>N)).subscribe(N=>{const z=fI(N.groupLabels.length,N.transitionDuration);M.next(z)})}).pipe(F(m),ft());W({defsSelection:w,gridAxesSize:h}).pipe(F(m),B(async M=>M)).subscribe(M=>{const N=[{id:y,width:M.gridAxesSize.width,height:M.gridAxesSize.height}];pI({defsSelection:M.defsSelection,clipPathData:N})});const P=u.pipe(F(m),U(M=>M.highlightTarget),ft()),R=new nt,G=E.pipe(F(m),U(M=>M.map((N,z)=>An(t,`lineargradient-${N}`))));return W({graphicGSelection:S,defsSelection:w,computedData:n,linearGradientIds:G,zeroYArr:k,groupLabels:A,barScale:I,params:s,chartParams:u,highlightTarget:P,barWidth:$,delayGroup:T,transitionItem:C,SeriesDataMap:o,GroupDataMap:a,isSeriesPositionSeprate:p}).pipe(F(m),B(async M=>M)).subscribe(M=>{const N=hI({graphicGSelection:M.graphicGSelection,pathGClassName:x,pathClassName:v,computedData:M.computedData,linearGradientIds:M.linearGradientIds,zeroYArr:M.zeroYArr,groupLabels:M.groupLabels,barScale:M.barScale,params:M.params,chartParams:M.chartParams,barWidth:M.barWidth,delayGroup:M.delayGroup,transitionItem:M.transitionItem,isSeriesPositionSeprate:M.isSeriesPositionSeprate});dI({defsSelection:M.defsSelection,computedData:M.computedData,linearGradientIds:M.linearGradientIds,params:M.params}),N.on("mouseover",(z,L)=>{z.stopPropagation(),g.next({type:"grid",eventName:"mouseover",pluginName:t,highlightTarget:M.highlightTarget,datum:L,gridIndex:L.gridIndex,series:M.SeriesDataMap.get(L.seriesLabel),seriesIndex:L.seriesIndex,seriesLabel:L.seriesLabel,groups:M.GroupDataMap.get(L.groupLabel),groupIndex:L.groupIndex,groupLabel:L.groupLabel,event:z,data:M.computedData})}).on("mousemove",(z,L)=>{z.stopPropagation(),g.next({type:"grid",eventName:"mousemove",pluginName:t,highlightTarget:M.highlightTarget,datum:L,gridIndex:L.gridIndex,series:M.SeriesDataMap.get(L.seriesLabel),seriesIndex:L.seriesIndex,seriesLabel:L.seriesLabel,groups:M.GroupDataMap.get(L.groupLabel),groupIndex:L.groupIndex,groupLabel:L.groupLabel,event:z,data:M.computedData})}).on("mouseout",(z,L)=>{z.stopPropagation(),g.next({type:"grid",eventName:"mouseout",pluginName:t,highlightTarget:M.highlightTarget,datum:L,gridIndex:L.gridIndex,series:M.SeriesDataMap.get(L.seriesLabel),seriesIndex:L.seriesIndex,seriesLabel:L.seriesLabel,groups:M.GroupDataMap.get(L.groupLabel),groupIndex:L.groupIndex,groupLabel:L.groupLabel,event:z,data:M.computedData})}).on("click",(z,L)=>{z.stopPropagation(),g.next({type:"grid",eventName:"click",pluginName:t,highlightTarget:M.highlightTarget,datum:L,gridIndex:L.gridIndex,series:M.SeriesDataMap.get(L.seriesLabel),seriesIndex:L.seriesIndex,seriesLabel:L.seriesLabel,groups:M.GroupDataMap.get(L.groupLabel),groupIndex:L.groupIndex,groupLabel:L.groupLabel,event:z,data:M.computedData})}),R.next(N)}),W({barSelection:R,highlight:f.pipe(U(M=>M.map(N=>N.id))),fullChartParams:u}).pipe(F(m),B(async M=>M)).subscribe(M=>{gI({selection:M.barSelection,ids:M.highlight,fullChartParams:M.fullChartParams})}),()=>{m.next(void 0)}},S2="BarsTriangle",mI=ae(S2,Xh)(({selection:t,name:e,subject:n,observer:r})=>{const i=new nt,o=$2(S2,{selection:t,computedData$:r.computedData$,visibleComputedData$:r.visibleComputedData$,existSeriesLabels$:r.existSeriesLabels$,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 yI({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)=>{V(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)=>{V(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)=>Ah({datum:m,colorType:i.fillColorType,fullChartParams:o})).attr("stroke",(m,y)=>Ah({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 bI({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)?V(a[o]).style("opacity",1).transition("highlight").duration(200):V(a[o]).style("opacity",n===!0?0:r.styles.unhighlightedOpacity).transition("highlight").duration(200)})}function vI({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)=>{V(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 A2=(t,{selection:e,computedData$:n,visibleComputedData$:r,existSeriesLabels$: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 nt,y=An(t,"clipPath-box"),x=ot(t,"circleG"),v=ot(t,"circle"),b=new nt,{seriesSelection$:_,axesSelection$:w,defsSelection$:S,graphicGSelection$:k}=ui({selection:e,pluginName:t,clipPathID:y,existSeriesLabels$:i,gridContainer$:p,gridAxesTransform$:c,gridGraphicTransform$:l}),$=W({computedData:n,gridGraphicReverseScale:h}).pipe(F(m),B(async I=>I),U(I=>I.computedData.map((D,T)=>I.gridGraphicReverseScale[T])));W({defsSelection:S,gridAxesSize:f}).pipe(F(m),B(async I=>I)).subscribe(I=>{const D=[{id:y,width:I.gridAxesSize.width,height:I.gridAxesSize.height}];vI({defsSelection:I.defsSelection,clipPathData:D})});const E=u.pipe(F(m),U(I=>I.highlightTarget),ft());W({graphicGSelection:k,computedData:n,visibleComputedData:r,SeriesDataMap:o,GroupDataMap:a,graphicReverseScale:$,fullChartParams:u,fullParams:s,highlightTarget:E}).pipe(F(m),B(async I=>I)).subscribe(I=>{const D=yI({graphicGSelection:I.graphicGSelection,circleGClassName:x,circleClassName:v,data:I.visibleComputedData,fullParams:I.fullParams,fullChartParams:I.fullChartParams,graphicReverseScale:I.graphicReverseScale});D.on("mouseover",(T,C)=>{T.stopPropagation(),g.next({type:"grid",eventName:"mouseover",pluginName:t,highlightTarget:I.highlightTarget,datum:C,gridIndex:C.gridIndex,series:I.SeriesDataMap.get(C.seriesLabel),seriesIndex:C.seriesIndex,seriesLabel:C.seriesLabel,groups:I.GroupDataMap.get(C.groupLabel),groupIndex:C.groupIndex,groupLabel:C.groupLabel,event:T,data:I.computedData})}).on("mousemove",(T,C)=>{T.stopPropagation(),g.next({type:"grid",eventName:"mousemove",pluginName:t,highlightTarget:I.highlightTarget,data:I.computedData,datum:C,gridIndex:C.gridIndex,series:I.SeriesDataMap.get(C.seriesLabel),seriesIndex:C.seriesIndex,seriesLabel:C.seriesLabel,groups:I.GroupDataMap.get(C.groupLabel),groupIndex:C.groupIndex,groupLabel:C.groupLabel,event:T})}).on("mouseout",(T,C)=>{T.stopPropagation(),g.next({type:"grid",eventName:"mouseout",pluginName:t,highlightTarget:I.highlightTarget,datum:C,gridIndex:C.gridIndex,series:I.SeriesDataMap.get(C.seriesLabel),seriesIndex:C.seriesIndex,seriesLabel:C.seriesLabel,groups:I.GroupDataMap.get(C.groupLabel),groupIndex:C.groupIndex,groupLabel:C.groupLabel,event:T,data:I.computedData})}).on("click",(T,C)=>{T.stopPropagation(),g.next({type:"grid",eventName:"click",pluginName:t,highlightTarget:I.highlightTarget,datum:C,gridIndex:C.gridIndex,series:I.SeriesDataMap.get(C.seriesLabel),seriesIndex:C.seriesIndex,seriesLabel:C.seriesLabel,groups:I.GroupDataMap.get(C.groupLabel),groupIndex:C.groupIndex,groupLabel:C.groupLabel,event:T,data:I.computedData})}),b.next(D)});const A=s.pipe(F(m),U(I=>I.onlyShowHighlighted),ft());return u.pipe(F(m),B(I=>W({graphicSelection:b,highlight:d.pipe(U(D=>D.map(T=>T.id))),onlyShowHighlighted:A,fullChartParams:u}).pipe(F(m),B(async D=>D)))).subscribe(I=>{bI({selection:I.graphicSelection,ids:I.highlight,onlyShowHighlighted:I.onlyShowHighlighted,fullChartParams:I.fullChartParams})}),()=>{m.next(void 0)}},M2="Dots",xI=ae(M2,Wh)(({selection:t,name:e,subject:n,observer:r})=>{const i=new nt,o=A2(M2,{selection:t,computedData$:r.computedData$,visibleComputedData$:r.visibleComputedData$,existSeriesLabels$:r.existSeriesLabels$,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()}}),_I={listRectWidth:14,listRectHeight:14,listRectRadius:0};function T2(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]}const Du=(t,{rootSelection:e,seriesLabels$:n,fullParams$:r,layout$:i,fullChartParams$:o,textSizePx$:a})=>{const s=ot(t,"root-position"),u=ot(t,"legend-card"),c=ot(t,"legend-list"),l=ot(t,"legend-item"),h=new nt,f=W({seriesLabels:n,fullChartParams:o}).pipe(F(h),B(async $=>$),U($=>{const E=new Map;let A=0;return $.seriesLabels.forEach((I,D)=>{if(!E.has(I)){const T=T2(A,$.fullChartParams);E.set(I,T),A++}}),E})),d=n.pipe(F(h),U($=>{const E=new Set;let A=[];return $.forEach(I=>{E.has(I)?A.push(!1):A.push(!0),E.add(I)}),A})),p=r.pipe(F(h),U($=>$.position==="bottom"||$.position==="top"?"row":"column")),g=W({fullParams:r,layout:i}).pipe(F(h),B(async $=>$),U($=>{const E=$.fullParams.padding*2+$.fullParams.gap*2;return $.fullParams.position==="bottom"||$.fullParams.position==="top"?$.layout.rootWidth-E:$.layout.rootHeight-E})),y=W({layout:i,fullParams:r}).pipe(F(h),B(async $=>$),U($=>{let E=0,A=0;return $.fullParams.position==="bottom"?(A=$.layout.rootHeight,$.fullParams.justify==="start"?E=0:$.fullParams.justify==="center"?E=$.layout.rootWidth/2:$.fullParams.justify==="end"&&(E=$.layout.rootWidth)):$.fullParams.position==="right"?(E=$.layout.rootWidth,$.fullParams.justify==="start"?A=0:$.fullParams.justify==="center"?A=$.layout.rootHeight/2:$.fullParams.justify==="end"&&(A=$.layout.rootHeight)):$.fullParams.position==="top"?(A=0,$.fullParams.justify==="start"?E=0:$.fullParams.justify==="center"?E=$.layout.rootWidth/2:$.fullParams.justify==="end"&&(E=$.layout.rootWidth)):$.fullParams.position==="left"&&(E=0,$.fullParams.justify==="start"?A=0:$.fullParams.justify==="center"?A=$.layout.rootHeight/2:$.fullParams.justify==="end"&&(A=$.layout.rootHeight)),{x:E,y:A}})).pipe(F(h),U($=>e.selectAll(`g.${s}`).data([$]).join(E=>E.append("g").classed(s,!0).attr("transform",A=>`translate(${A.x}, ${A.y})`),E=>E.transition().attr("transform",A=>`translate(${A.x}, ${A.y})`),E=>E.remove()))),x=r.pipe(F(h),U($=>$.seriesList[0]?$.seriesList[0]:_I)),v=W({visibleList:d,fullParams:r,fullChartParams:o,seriesLabels:n,lineDirection:p,lineMaxSize:g,defaultListStyle:x,SeriesLabelColorMap:f,textSizePx:a}).pipe(F(h),B(async $=>$),U($=>$.seriesLabels.reduce((E,A,I)=>{if(!$.visibleList[I])return E;const D=c2(A,$.textSizePx),T=$.textSizePx*1.5+D,C=$.SeriesLabelColorMap.get(A),P=E[0]&&E[0][0]?E[E.length-1][E[E.length-1].length-1]:null,{translateX:R,translateY:G,lineIndex:M,itemIndex:N}=((L,j,q)=>{let Y=0,X=0,Q=0,ct=0;if(L.lineDirection==="column"){let O=q?q.translateY+L.textSizePx+L.fullParams.gap:0;if(O+L.textSizePx>L.lineMaxSize){Q=q.lineIndex+1,ct=0,X=0;const tt=j[j.length-1].reduce((st,H)=>H.itemWidth>st?H.itemWidth:st,0);Y=q.translateX+tt+L.fullParams.gap}else Q=q?q.lineIndex:0,ct=q?q.itemIndex+1:0,X=O,Y=q?q.translateX:0}else{let O=q?q.translateX+q.itemWidth+L.fullParams.gap:0;O+T>L.lineMaxSize?(Q=q.lineIndex+1,ct=0,Y=0):(Q=q?q.lineIndex:0,ct=q?q.itemIndex+1:0,Y=O),X=(L.textSizePx+L.fullParams.gap)*Q}return{translateX:Y,translateY:X,lineIndex:Q,itemIndex:ct}})($,E,P);E[M]||(E[M]=[]);const z=$.fullParams.seriesList[N]?$.fullParams.seriesList[N]:$.defaultListStyle;return E[M].push({id:A,seriesLabel:A,seriesIndex:I,lineIndex:M,itemIndex:N,text:A,itemWidth:T,translateX:R,translateY:G,color:C,listRectWidth:z.listRectWidth,listRectHeight:z.listRectHeight,listRectRadius:z.listRectRadius}),E},[])),Le(1)),b=W({fullParams:r,fullChartParams:o,lineDirection:p,lengendItems:v,textSizePx:a}).pipe(F(h),B(async $=>$),U($=>{const{width:E,height:A}=((I,D)=>{let T=0,C=0;if(!D.length||!D[0].length)return{width:T,height:C};const P=D[0][D[0].length-1];return I.lineDirection==="column"?(T=D.reduce((R,G)=>{const M=G.reduce((N,z)=>z.itemWidth>N?z.itemWidth:N,0);return R+M},0),T+=I.fullParams.gap*(D.length-1),C=P.translateY+I.textSizePx):(T=P.translateX+P.itemWidth,C=I.textSizePx*D.length+I.fullParams.gap*(D.length-1)),{width:T,height:C}})($,$.lengendItems);return{direction:$.lineDirection,width:E,height:A,translateX:$.fullParams.gap,translateY:$.fullParams.gap}}),Le(1)),_=W({fullParams:r,lengendList:b}).pipe(F(h),B(async $=>$),U($=>{const E=$.lengendList.width+$.fullParams.gap*2,A=$.lengendList.height+$.fullParams.gap*2;let I=0,D=0;return $.fullParams.position==="left"?$.fullParams.justify==="start"?(I=$.fullParams.padding,D=$.fullParams.padding):$.fullParams.justify==="center"?(I=$.fullParams.padding,D=-A/2):$.fullParams.justify==="end"&&(I=$.fullParams.padding,D=-A-$.fullParams.padding):$.fullParams.position==="right"?$.fullParams.justify==="start"?(I=-E-$.fullParams.padding,D=$.fullParams.padding):$.fullParams.justify==="center"?(I=-E-$.fullParams.padding,D=-A/2):$.fullParams.justify==="end"&&(I=-E-$.fullParams.padding,D=-A-$.fullParams.padding):$.fullParams.position==="top"?$.fullParams.justify==="start"?(I=$.fullParams.padding,D=$.fullParams.padding):$.fullParams.justify==="center"?(I=-E/2,D=$.fullParams.padding):$.fullParams.justify==="end"&&(I=-E-$.fullParams.padding,D=$.fullParams.padding):$.fullParams.justify==="start"?(I=$.fullParams.padding,D=-A-$.fullParams.padding):$.fullParams.justify==="center"?(I=-E/2,D=-A-$.fullParams.padding):$.fullParams.justify==="end"&&(I=-E-$.fullParams.padding,D=-A-$.fullParams.padding),{width:E,height:A,translateX:I,translateY:D}})),w=W({rootPositionSelection:y,fullParams:r,fullChartParams:o,legendCard:_}).pipe(F(h),B(async $=>$),U($=>$.rootPositionSelection.selectAll("g").data([$.legendCard]).join(E=>E.append("g").classed(u,!0).attr("transform",A=>`translate(${A.translateX}, ${A.translateY})`),E=>E.transition().attr("transform",A=>`translate(${A.translateX}, ${A.translateY})`),E=>E.remove()).each((E,A,I)=>{V(I[A]).selectAll("rect").data([E]).join("rect").attr("width",D=>D.width).attr("height",D=>D.height).attr("fill",Et($.fullParams.backgroundFill,$.fullChartParams)).attr("stroke",Et($.fullParams.backgroundStroke,$.fullChartParams))}))),S=W({lengendCardSelection:w,fullParams:r,lengendList:b}).pipe(F(h),B(async $=>$),U($=>$.lengendCardSelection.selectAll("g").data([$.lengendList]).join(E=>E.append("g").classed(c,!0).attr("transform",A=>`translate(${A.translateX}, ${A.translateY})`),E=>E.transition().attr("transform",A=>`translate(${A.translateX}, ${A.translateY})`),E=>E.remove())));return W({lengendListSelection:S,fullParams:r,fullChartParams:o,lengendItems:v,textSizePx:a}).pipe(F(h),B(async $=>$),U($=>{const E=$.lengendItems[0]?$.lengendItems.flat():[];return $.lengendListSelection.selectAll(`g.${l}`).data(E).join(A=>A.append("g").classed(l,!0).attr("cursor","default"),A=>A,A=>A.remove()).attr("transform",(A,I)=>`translate(${A.translateX}, ${A.translateY})`).each((A,I,D)=>{const T=$.textSizePx/2,C=-A.listRectWidth/2,P=-A.listRectHeight/2;V(D[I]).selectAll("rect").data([A]).join("rect").attr("x",T).attr("y",T).attr("width",R=>R.listRectWidth).attr("height",R=>R.listRectHeight).attr("transform",R=>`translate(${C}, ${P})`).attr("fill",R=>R.color).attr("rx",R=>R.listRectRadius),V(D[I]).selectAll("text").data([A]).join(R=>R.append("text").attr("dominant-baseline","hanging"),R=>R,R=>R.remove()).attr("x",$.textSizePx*1.5).attr("font-size",$.fullChartParams.styles.textSize).attr("fill",R=>$.fullParams.textColorType==="series"?T2(R.seriesIndex,$.fullChartParams):Et($.fullParams.textColorType,$.fullChartParams)).text(R=>R.text)})})).subscribe(),()=>{h.next(void 0)}},P2="GridLegend",wI=ae(P2,Qh)(({selection:t,rootSelection:e,observer:n,subject:r})=>{const i=new nt,o=n.SeriesDataMap$.pipe(F(i),U(u=>Array.from(u.keys()))),a=n.fullParams$.pipe(F(i),U(u=>{const c=[{listRectWidth:u.listRectWidth,listRectHeight:u.listRectHeight,listRectRadius:u.listRectRadius}];return{...u,seriesList:c}})),s=Du(P2,{rootSelection:e,seriesLabels$:o,fullParams$:a,layout$:n.layout$,fullChartParams$:n.fullChartParams$,textSizePx$:n.textSizePx$});return()=>{i.next(void 0),s()}}),Ph=6;function $I({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)=>{V(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).attr("font-size",u.styles.textSize).style("fill",Et(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-Ph-r.labelOffset[1]})`);const f=Fg(c).scale(c).tickSize(r.tickFullLine==!0?-a.height:Ph).tickSizeOuter(0).tickFormat(p=>Sh(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?Et(r.tickColorType,u):"none").style("stroke-dasharray",r.tickFullLineDasharray).attr("pointer-events","none"),d.selectAll("path").style("fill","none").style("stroke",r.axisLineVisible==!0?Et(r.axisLineColorType,u):"none").style("shape-rendering","crispEdges"),h.selectAll("text").attr("font-size",u.styles.textSize).style("color",Et(r.tickTextColorType,u)).attr("text-anchor",i.textAnchor).attr("dominant-baseline",i.dominantBaseline).attr("transform-origin",`0 -${r.tickPadding+Ph}`).style("transform",l),h}const D2=(t,{selection:e,computedData$:n,fullParams$:r,fullDataFormatter$:i,fullChartParams$:o,gridAxesTransform$:a,gridAxesReverseTransform$:s,gridAxesSize$:u,gridContainer$:c,isSeriesPositionSeprate$:l})=>{const h=new nt,f=ot(t,"container"),d=ot(t,"xAxisG"),p=ot(t,"xAxis"),g=ot(t,"groupingLabel"),m=W({computedData:n.pipe(ft((w,S)=>w.length===S.length)),isSeriesPositionSeprate:l}).pipe(F(h),B(async w=>w),U(w=>w.isSeriesPositionSeprate?w.computedData:[w.computedData[0]]),U((w,S)=>e.selectAll(`g.${f}`).data(w,k=>k[0]?k[0].seriesIndex:S).join("g").classed(f,!0))),y=m.pipe(F(h),U((w,S)=>w.selectAll(`g.${d}`).data([d]).join("g").classed(d,!0)));W({containerSelection:m,gridContainer:c}).pipe(F(h),B(async w=>w)).subscribe(w=>{w.containerSelection.attr("transform",(S,k)=>{const $=w.gridContainer[k]??w.gridContainer[0],E=$.translate,A=$.scale;return`translate(${E[0]}, ${E[1]}) scale(${A[0]}, ${A[1]})`})}),W({axisSelection:y,gridAxesTransform:a}).pipe(F(h),B(async w=>w)).subscribe(w=>{w.axisSelection.style("transform",w.gridAxesTransform.value)});const x=W({fullParams:r,fullDataFormatter:i,gridAxesReverseTransform:s,gridContainer:c}).pipe(F(h),B(async w=>w),U(w=>{const S=`translate(${w.gridAxesReverseTransform.translate[0]}px, ${w.gridAxesReverseTransform.translate[1]}px)`,k=`rotate(${w.gridAxesReverseTransform.rotate}deg) rotateX(${w.gridAxesReverseTransform.rotateX}deg) rotateY(${w.gridAxesReverseTransform.rotateY}deg)`,$=`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} ${k} ${$} ${A}`}),ft()),v=new lt(w=>{W({fullDataFormatter:i,gridAxesSize:u,computedData:n}).pipe(F(h),B(async S=>S)).subscribe(S=>{const $=S.computedData[0]?S.computedData[0].length-1:0,E=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"?$+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 D=(S.computedData[0]??[]).map(R=>R.groupLabel);const T=new Array(I).fill(0).map((R,G)=>D[G]!=null?D[G]:String(G)).filter((R,G)=>G>=E&&G<=A),C=S.fullDataFormatter.grid.groupAxis.scalePadding,P=sg({axisLabels:T,axisWidth:S.gridAxesSize.width,padding:C});w.next(P)})}),b=W({fullDataFormatter:i,fullParams:r}).pipe(F(h),B(async w=>w),U(w=>{let S="middle",k="hanging";return w.fullDataFormatter.grid.groupAxis.position==="bottom"?(S=w.fullParams.tickTextRotate?"end":"middle",k="hanging"):w.fullDataFormatter.grid.groupAxis.position==="top"?(S=w.fullParams.tickTextRotate?"end":"middle",k="auto"):w.fullDataFormatter.grid.groupAxis.position==="left"?(S="end",k="middle"):w.fullDataFormatter.grid.groupAxis.position==="right"&&(S="start",k="middle"),{textAnchor:S,dominantBaseline:k}})),_=i.pipe(F(h),U(w=>{let S="start",k="hanging";return w.grid.groupAxis.position==="bottom"?k="hanging":w.grid.groupAxis.position==="top"?k="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"?k="auto":w.grid.valueAxis.position==="top"&&(k="hanging"),{textAnchor:S,dominantBaseline:k}}));return W({axisSelection:y,params:r,tickTextAlign:b,axisLabelAlign:_,gridAxesSize:u,fullDataFormatter:i,chartParams:o,groupScale:v,textTransform:x}).pipe(F(h),B(async w=>w)).subscribe(w=>{$I({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)}},L2="GroupAxis",SI=ae(L2,Vh)(({selection:t,name:e,observer:n,subject:r})=>{const i=new nt,o=D2(L2,{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()}}),E2=6;function AI({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)=>{V(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).attr("font-size",u.styles.textSize).style("fill",Et(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=Gg(c).scale(c).ticks(d>r.ticks?r.ticks:h[0]===0&&h[1]===0?1:Math.ceil(d)).tickFormat(y=>Sh(y,r.tickFormat)).tickSize(r.tickFullLine==!0?-a.width:E2).tickPadding(r.tickPadding),g=f.transition().duration(100).call(p);return g.selectAll("line").style("fill","none").style("stroke",r.tickLineVisible==!0?Et(r.tickColorType,u):"none").style("stroke-dasharray",r.tickFullLineDasharray).attr("pointer-events","none"),g.selectAll("path").style("fill","none").style("stroke",r.axisLineVisible==!0?Et(r.axisLineColorType,u):"none").style("shape-rendering","crispEdges"),f.selectAll("text").attr("font-size",u.styles.textSize).style("color",Et(r.tickTextColorType,u)).attr("text-anchor",i.textAnchor).attr("dominant-baseline",i.dominantBaseline).attr("transform-origin",`-${r.tickPadding+E2} 0`).style("transform",l),f}const Lu=(t,{selection:e,computedData$:n,fullParams$:r,fullDataFormatter$:i,fullChartParams$:o,gridAxesTransform$:a,gridAxesReverseTransform$:s,gridAxesSize$:u,gridContainer$:c,isSeriesPositionSeprate$:l})=>{const h=new nt,f=ot(t,"container"),d=ot(t,"yAxisG"),p=ot(t,"yAxis"),g=ot(t,"text"),m=W({computedData:n.pipe(ft((S,k)=>S.length===k.length)),isSeriesPositionSeprate:l}).pipe(F(h),B(async S=>S),U(S=>S.isSeriesPositionSeprate?S.computedData:[S.computedData[0]]),U((S,k)=>e.selectAll(`g.${f}`).data(S,$=>$[0]?$[0].seriesIndex:k).join("g").classed(f,!0))),y=m.pipe(F(h),U((S,k)=>S.selectAll(`g.${d}`).data([d]).join("g").classed(d,!0)));W({containerSelection:m,gridContainer:c}).pipe(F(h),B(async S=>S)).subscribe(S=>{S.containerSelection.attr("transform",(k,$)=>{const E=S.gridContainer[$]??S.gridContainer[0],A=E.translate,I=E.scale;return`translate(${A[0]}, ${A[1]}) scale(${I[0]}, ${I[1]})`})}),W({axisSelection:y,gridAxesTransform:a}).pipe(F(h),B(async S=>S)).subscribe(S=>{S.axisSelection.style("transform",S.gridAxesTransform.value)});const x=W({fullParams:r,fullDataFormatter:i,gridAxesReverseTransform:s,gridContainer:c}).pipe(F(h),B(async S=>S),U(S=>{const k=`translate(${S.gridAxesReverseTransform.translate[0]}px, ${S.gridAxesReverseTransform.translate[1]}px)`,$=`rotate(${S.gridAxesReverseTransform.rotate}deg) rotateX(${S.gridAxesReverseTransform.rotateX}deg) rotateY(${S.gridAxesReverseTransform.rotateY}deg)`,E=`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`${k} ${$} ${E} ${I}`}),ft()),v=new lt(S=>{W({fullDataFormatter:i,gridAxesSize:u,computedData:n}).pipe(F(h),B(async k=>k)).subscribe(k=>{const E=k.computedData[0]?k.computedData[0].length-1:0,A=k.fullDataFormatter.grid.groupAxis.scaleDomain[0]==="auto"?0-k.fullDataFormatter.grid.groupAxis.scalePadding:k.fullDataFormatter.grid.groupAxis.scaleDomain[0]-k.fullDataFormatter.grid.groupAxis.scalePadding,I=k.fullDataFormatter.grid.groupAxis.scaleDomain[1]==="auto"?E+k.fullDataFormatter.grid.groupAxis.scalePadding:k.fullDataFormatter.grid.groupAxis.scaleDomain[1]+k.fullDataFormatter.grid.groupAxis.scalePadding,D=k.computedData.map((C,P)=>C.filter((R,G)=>G>=A&&G<=I)),T=IC(D.flat());S.next(T)})}),b=new lt(S=>{W({fullDataFormatter:i,gridAxesSize:u,minAndMax:v}).pipe(F(h),B(async k=>k)).subscribe(k=>{const $=ag({maxValue:k.minAndMax[1],minValue:k.minAndMax[0],axisWidth:k.gridAxesSize.height,scaleDomain:k.fullDataFormatter.grid.valueAxis.scaleDomain,scaleRange:k.fullDataFormatter.grid.valueAxis.scaleRange});S.next($)})}),_=i.pipe(F(h),U(S=>{let k="start",$="hanging";return S.grid.valueAxis.position==="left"?(k="end",$="middle"):S.grid.valueAxis.position==="right"?(k="start",$="middle"):S.grid.valueAxis.position==="bottom"?(k="middle",$="hanging"):S.grid.valueAxis.position==="top"&&(k="middle",$="auto"),{textAnchor:k,dominantBaseline:$}})),w=i.pipe(F(h),U(S=>{let k="start",$="hanging";return S.grid.groupAxis.position==="bottom"?$="auto":S.grid.groupAxis.position==="top"?$="hanging":S.grid.groupAxis.position==="left"?k="start":S.grid.groupAxis.position==="right"&&(k="end"),S.grid.valueAxis.position==="left"?k="end":S.grid.valueAxis.position==="right"?k="start":S.grid.valueAxis.position==="bottom"?$="hanging":S.grid.valueAxis.position==="top"&&($="auto"),{textAnchor:k,dominantBaseline:$}}));return W({axisSelection:y,fullParams:r,tickTextAlign:_,axisLabelAlign:w,computedData:n,gridAxesSize:u,fullDataFormatter:i,fullChartParams:o,valueScale:b,textTransform:x,minAndMax:v}).pipe(F(h),B(async S=>S)).subscribe(S=>{AI({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)}},k2="ValueAxis",MI=ae(k2,Eu)(({selection:t,name:e,observer:n,subject:r})=>{const i=new nt,o=Lu(k2,{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()}}),C2="ValueStackAxis",TI=ae(C2,Zh)(({selection:t,name:e,observer:n,subject:r})=>{const i=new nt,o=n.computedData$.pipe(F(i),U(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=Lu(C2,{selection:t,computedData$:n.isSeriesPositionSeprate$.pipe(B(s=>Md(()=>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()}}),I2="ScalingArea",PI=ot(I2,"rect"),DI=ae(I2,Kh)(({selection:t,rootSelection:e,name:n,observer:r,subject:i})=>{const o=new nt,a=e.insert("rect","g").classed(PI,!0).attr("opacity",0);let s={k:1,x:0,y:0};r.layout$.pipe(F(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(U(c=>c[0]?c[0].length-1:0),ft());return W({initGroupAxis:r.fullDataFormatter$.pipe(U(c=>c.grid.groupAxis),di()),fullDataFormatter:r.fullDataFormatter$,groupMaxIndex:u,layout:r.layout$,axisSize:r.gridAxesSize$}).pipe(F(o),B(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,g=ag({maxValue:c.groupMaxIndex,minValue:0,axisWidth:c.axisSize.width,scaleDomain:[f,d],scaleRange:[0,1]}).copy(),m=s2().on("zoom",function(x){const v=x.transform,b=S=>{const k=Math.round(S);return Math.min(h,Math.max(0,k))},_=c.fullDataFormatter.grid.groupAxis.position==="bottom"||c.fullDataFormatter.grid.groupAxis.position==="top"?v.rescaleX(g).domain().map(b):v.rescaleY(g).domain().map(b);_[0]<=0&&_[1]>=h?v.k<s.k&&(v.k=s.k,v.x=s.x,v.y=s.y):_[1]-_[0]<=1&&v.k>s.k&&(v.k=s.k,v.x=s.x,v.y=s.y),s.k=v.k,s.x=v.x,s.y=v.y;const w={...c.fullDataFormatter,grid:{...c.fullDataFormatter.grid,groupAxis:{...c.fullDataFormatter.grid.groupAxis,scaleDomain:_}}};i.dataFormatter$.next(w)});e.call(m)}),()=>{o.next(void 0),a.remove()}});function LI(t,e){let n=new lt(()=>{});return t.each(function(){const r=Hu(this,e);n=Wu(n,r)}),n}const Dh="GroupAux",Lh=ot(Dh,"label-box");function EI({groupLabel:t,axisX:e,axisHeight:n,fullParams:r}){return r.showLine&&t?[{id:t,x1:e,x2:e,y1:0,y2:n}]:[]}function kI({selection:t,pluginName:e,lineData:n,fullParams:r,fullChartParams:i}){const o=ot(e,"auxline"),a=t.selectAll(`line.${o}`).data(n),s=a.enter().append("line").classed(o,!0).style("stroke",c=>Et(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 CI(t){t.selectAll("line").data([]).exit().remove()}function II({groupLabel:t,axisX:e,fullParams:n}){return n.showLabel&&t?[{id:t,x:e,y:-n.labelPadding,text:Sh(t,n.labelTextFormat)}]:[]}function RI({selection:t,labelData:e,fullParams:n,fullChartParams:r,gridAxesReverseTransformValue:i,textSizePx:o}){const a=o+4,s=t.selectAll(`g.${Lh}`).data(e),u=s.enter().append("g").classed(Lh,!0).style("cursor","pointer"),c=u.merge(s);return u.attr("transform",(l,h)=>`translate(${l.x}, ${l.y})`),s.transition().duration(50).attr("transform",(l,h)=>`translate(${l.x}, ${l.y})`),s.exit().remove(),c.each((l,h,f)=>{const d=c2(l.text,o)+12,p=-d/2,g=V(f[h]).selectAll("rect").data([l]),m=g.enter().append("rect").attr("height",`${a}px`).attr("fill",v=>Et(n.labelColorType,r)).attr("x",p).attr("y",-2).attr("rx",5).attr("ry",5).style("cursor","pointer");g.merge(m).attr("width",v=>`${d}px`).style("transform",i),g.exit().remove();const y=V(f[h]).selectAll("text").data([l]),x=y.enter().append("text").style("dominant-baseline","hanging").style("cursor","pointer");y.merge(x).text(v=>v.text).style("transform",i).attr("fill",v=>Et(n.labelTextColorType,r)).attr("font-size",r.styles.textSize).attr("x",p+6),y.exit().remove()}),c}function NI(t){t.selectAll(`g.${Lh}`).data([]).exit().remove()}const FI=ae(Dh,qh)(({selection:t,rootSelection:e,name:n,subject:r,observer:i})=>{const o=new nt,a=e.insert("rect","g").classed(ot(Dh,"rect"),!0).attr("opacity",0),s=t.append("g");i.layout$.pipe(F(o)).subscribe(f=>{a.attr("width",f.rootWidth).attr("height",f.rootHeight)}),i.gridAxesTransform$.pipe(F(o),U(f=>f.value),ft()).subscribe(f=>{s.style("transform",f)});const u=new lt(f=>{W({fullDataFormatter:i.fullDataFormatter$,gridAxesSize:i.gridAxesSize$,computedData:i.computedData$}).pipe(F(o),B(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,k)=>v[k]!=null?v[k]:String(k)).filter((S,k)=>k>=m&&k<=y),_=d.fullDataFormatter.grid.groupAxis.scalePadding,w=sg({axisLabels:b,axisWidth:d.gridAxesSize.width,padding:_});f.next(w)})}),c=Mh({fullDataFormatter$:i.fullDataFormatter$,gridAxesSize$:i.gridAxesSize$,computedData$:i.computedData$,fullChartParams$:i.fullChartParams$}),l=i.fullChartParams$.pipe(F(o),U(f=>f.highlightTarget),ft());return W({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(F(o),B(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,gridIndex:0,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,gridIndex:0,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,gridIndex:0,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,gridIndex:0,series:[],seriesIndex:-1,seriesLabel:"",groups:f.GroupDataMap.get(m)??[],groupIndex:g,groupLabel:m,event:d,data:f.computedData})})}),W({event:r.event$.pipe(hi(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,textSizePx:i.textSizePx$}).pipe(F(o),B(async f=>f)).subscribe(f=>{const d=f.groupScale(f.event.groupLabel)??0,p=EI({groupLabel:f.event.groupLabel,axisX:d,axisHeight:f.gridAxesSize.height,fullParams:f.fullParams});kI({selection:s,pluginName:n,lineData:p,fullParams:f.fullParams,fullChartParams:f.fullChartParams});const g=II({groupLabel:f.event.groupLabel,axisX:d,fullParams:f.fullParams});RI({selection:s,labelData:g,fullParams:f.fullParams,fullChartParams:f.fullChartParams,gridAxesReverseTransformValue:f.gridAxesReverseTransform.value,textSizePx:f.textSizePx}).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,gridIndex:0,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,gridIndex:0,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,gridIndex:0,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,gridIndex:0,series:[],seriesIndex:-1,seriesLabel:"",groups:f.event.groups,groupIndex:v,groupLabel:b,event:y,data:f.computedData})})}),LI(a,"mouseout").pipe(F(o)).subscribe(f=>{console.log("rootMouseout"),CI(s),NI(s)}),()=>{o.next(void 0),a.remove()}}),R2={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}],textColorType:"primary"},N2={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]},F2={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]},G2={barWidth:0,barPadding:1,barGroupPadding:40,barRadius:!1,gridIndexes:[0]},z2={barWidth:0,barGroupPadding:10,barRadius:!1,gridIndexes:[0]},O2={barWidth:0,barPadding:1,barGroupPadding:20,linearGradientOpacity:[1,0],gridIndexes:[0]},U2={lineCurve:"curveLinear",lineWidth:2,gridIndexes:[1]},B2={lineCurve:"curveLinear",linearGradientOpacity:[1,0],gridIndexes:[1]},Y2={radius:4,fillColorType:"white",strokeColorType:"series",strokeWidth:2,onlyShowHighlighted:!1,gridIndexes:[1]},H2={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]},W2="MultiGridLegend",GI=Ce(W2,R2)(({selection:t,rootSelection:e,observer:n,subject:r})=>{const i=new nt,o=n.multiGridEachDetail$.pipe(F(i),U(c=>c.map((h,f)=>h.SeriesDataMap$.pipe(U(d=>Array.from(d.keys()))))),B(c=>W(c)),U(c=>c.flat())),a=W({fullParams:n.fullParams$,multiGrid:n.multiGridEachDetail$,computedData:n.computedData$}).pipe(F(i),B(async c=>c),U(c=>c.computedData.map((l,h)=>{const f=hc(c.fullParams.gridList[h]??{},{listRectWidth:c.fullParams.listRectWidth,listRectHeight:c.fullParams.listRectHeight,listRectRadius:c.fullParams.listRectRadius});return l.map(d=>f)}).flat())),s=W({fullParams:n.fullParams$,seriesList:a}).pipe(F(i),B(async c=>c),U(c=>({...c.fullParams,seriesList:c.seriesList}))),u=Du(W2,{rootSelection:e,seriesLabels$:o,fullParams$:s,layout$:n.layout$,fullChartParams$:n.fullChartParams$,textSizePx$:n.textSizePx$});return()=>{i.next(void 0),u()}}),un=t=>{const e=t.fullParams$.pipe(U(i=>i.gridIndexes),ft(),Le(1)),n=new nt,r=t.multiGridEachDetail$.pipe(B(i=>W(i.map(o=>o.gridHighlight$))),U(i=>i.flat()),Le(1));return e.pipe(U(i=>i.map(o=>{n.next(void 0);const a=fi(o).pipe(F(n),Le(1)),s=W({computedData:t.computedData$,gridIndex:a}).pipe(F(n),U(_=>_.computedData[_.gridIndex]??_.computedData[0])),u=W({fullDataFormatter:t.fullDataFormatter$,gridIndex:a}).pipe(F(n),U(_=>{const w=_.fullDataFormatter.gridList[0];return{type:"grid",grid:{..._.fullDataFormatter.gridList[_.gridIndex]??w},container:{..._.fullDataFormatter.container}}})),c=W({multiGridEachDetail:t.multiGridEachDetail$,gridIndex:a}).pipe(F(n),B(async _=>_),U(_=>_.multiGridEachDetail[_.gridIndex]??_.multiGridEachDetail[0]),Le(1)),l=c.pipe(B(_=>_.isSeriesPositionSeprate$)),h=c.pipe(B(_=>_.gridContainer$)),f=c.pipe(B(_=>_.gridAxesTransform$)),d=c.pipe(B(_=>_.gridAxesReverseTransform$)),p=c.pipe(B(_=>_.gridAxesSize$)),g=c.pipe(B(_=>_.gridGraphicTransform$)),m=c.pipe(B(_=>_.gridGraphicReverseScale$)),y=c.pipe(B(_=>_.existSeriesLabels$)),x=c.pipe(B(_=>_.SeriesDataMap$)),v=c.pipe(B(_=>_.GroupDataMap$)),b=c.pipe(B(_=>_.visibleComputedData$));return{gridComputedData$:s,gridDataFormatter$:u,gridAxesTransform$:f,gridGraphicTransform$:g,gridGraphicReverseScale$:m,gridAxesReverseTransform$:d,gridAxesSize$:p,gridHighlight$:r,existSeriesLabels$:y,SeriesDataMap$:x,GroupDataMap$:v,visibleComputedData$:b,isSeriesPositionSeprate$:l,gridContainer$:h}})))},Eh="MultiBars",q2=ot(Eh,"grid"),zI=Ce(Eh,G2)(({selection:t,name:e,subject:n,observer:r})=>{const i=new nt,o=[];return un(r).subscribe(s=>{o.forEach(u=>u()),t.selectAll(`g.${q2}`).data(s).join("g").attr("class",q2).each((u,c,l)=>{const h=V(l[c]);o[c]=Th(Eh,{selection:h,computedData$:u.gridComputedData$,visibleComputedData$:u.visibleComputedData$,existSeriesLabels$:u.existSeriesLabels$,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())}}),kh="MultiBarStack",j2=ot(kh,"grid"),OI=Ce(kh,z2)(({selection:t,name:e,subject:n,observer:r})=>{const i=new nt,o=[];return un(r).subscribe(s=>{o.forEach(u=>u()),t.selectAll(`g.${j2}`).data(s).join("g").attr("class",j2).each((u,c,l)=>{const h=V(l[c]);o[c]=v2(kh,{selection:h,computedData$:u.gridComputedData$,visibleComputedData$:u.visibleComputedData$,existSeriesLabels$:u.existSeriesLabels$,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())}}),Ch="MultiBarsTriangle",X2=ot(Ch,"grid"),UI=Ce(Ch,O2)(({selection:t,name:e,subject:n,observer:r})=>{const i=new nt,o=[];return un(r).subscribe(s=>{o.forEach(u=>u()),t.selectAll(`g.${X2}`).data(s).join("g").attr("class",X2).each((u,c,l)=>{const h=V(l[c]);o[c]=$2(Ch,{selection:h,computedData$:u.gridComputedData$,visibleComputedData$:u.visibleComputedData$,existSeriesLabels$:u.existSeriesLabels$,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())}}),Ih="MultiLines",V2=ot(Ih,"grid"),BI=Ce(Ih,U2)(({selection:t,name:e,subject:n,observer:r})=>{const i=new nt,o=[];return un(r).subscribe(s=>{o.forEach(u=>u()),t.selectAll(`g.${V2}`).data(s).join("g").attr("class",V2).each((u,c,l)=>{const h=V(l[c]);o[c]=l2(Ih,{selection:h,computedData$:u.gridComputedData$,existSeriesLabels$:u.existSeriesLabels$,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())}}),Rh="MultiLineAreas",Z2=ot(Rh,"grid"),YI=Ce(Rh,B2)(({selection:t,name:e,subject:n,observer:r})=>{const i=new nt,o=[];return un(r).subscribe(s=>{o.forEach(u=>u()),t.selectAll(`g.${Z2}`).data(s).join("g").attr("class",Z2).each((u,c,l)=>{const h=V(l[c]);o[c]=h2(Rh,{selection:h,computedData$:u.gridComputedData$,existSeriesLabels$:u.existSeriesLabels$,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$,layout$:r.layout$,event$:n.event$})})}),()=>{i.next(void 0),o.forEach(s=>s())}}),Nh="MultiDots",K2=ot(Nh,"grid"),HI=Ce(Nh,Y2)(({selection:t,name:e,subject:n,observer:r})=>{const i=new nt,o=[];return un(r).subscribe(s=>{o.forEach(u=>u()),t.selectAll(`g.${K2}`).data(s).join("g").attr("class",K2).each((u,c,l)=>{const h=V(l[c]);o[c]=A2(Nh,{selection:h,computedData$:u.gridComputedData$,visibleComputedData$:u.visibleComputedData$,existSeriesLabels$:u.existSeriesLabels$,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())}}),Fh="MultiGroupAxis",Q2=ot(Fh,"grid"),WI=Ce(Fh,N2)(({selection:t,name:e,subject:n,observer:r})=>{const i=new nt,o=[];return un(r).subscribe(s=>{o.forEach(u=>u()),t.selectAll(`g.${Q2}`).data(s).join("g").attr("class",Q2).each((u,c,l)=>{const h=V(l[c]);o[c]=D2(Fh,{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())}}),Gh="MultiValueAxis",J2=ot(Gh,"grid"),qI=Ce(Gh,F2)(({selection:t,name:e,subject:n,observer:r})=>{const i=new nt,o=[];return un(r).subscribe(s=>{o.forEach(u=>u()),t.selectAll(`g.${J2}`).data(s).join("g").attr("class",J2).each((u,c,l)=>{const h=V(l[c]);o[c]=Lu(Gh,{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 tx(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 jI=({fullDataFormatter$:t,layout$:e})=>{const n=new nt;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=>(W({fullDataFormatter:t,layout:e}).pipe(F(n),B(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)}))},XI=({gridAxesTransform$:t})=>t.pipe(U(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)`}})),VI=({computedData$:t,fullDataFormatter$:e,fullChartParams$:n,layout$:r})=>W({computedData:t,fullDataFormatter:e,fullChartParams:n,layout:r}).pipe(B(async o=>o),U(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}=tx(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}=tx(o.layout,o.fullDataFormatter.container,c,u);return{slotIndex:a.slotIndex,rowIndex:c,columnIndex:u,translate:f,scale:d}})}})),zh="OverlappingValueAxes",ex=ot(zh,"grid"),ZI=Ce(zh,H2)(({selection:t,name:e,subject:n,observer:r})=>{const i=new nt,o=[],a=r.fullParams$.pipe(F(i),U(l=>l.gridIndexes[0])),s=r.fullParams$.pipe(F(i),U(l=>l.gridIndexes[1])),u=W({firstGridIndex:a,secondGridIndex:s}).pipe(F(i),B(l=>r.fullDataFormatter$.pipe(F(i),U(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"),{type:"grid",grid:{...h.gridList[l.secondGridIndex],valueAxis:{...h.gridList[l.secondGridIndex].valueAxis,position:f}},container:{...h.container}}}))));return fi(r).pipe(F(i),U(l=>({...l,fullParams$:l.fullParams$.pipe(U(h=>(h.gridIndexes.length>2&&(h.gridIndexes.length=2),h)))})),B(l=>un(l)),U(l=>l.map((h,f)=>{if(f===0)return h;const d=jI({fullDataFormatter$:u,layout$:r.layout$}),p=XI({gridAxesTransform$:d}),g=VI({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.${ex}`).data(l).join("g").attr("class",ex).each((h,f,d)=>{if(f>1)return;const p=V(d[f]);o[f]=Lu(zh,{selection:p,computedData$:h.gridComputedData$,fullParams$:r.fullParams$.pipe(U(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())}}),nx={header:{height:36,text:[],textStyle:[]},footer:{height:0,text:[],textStyle:[]}},rx={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(i=>i.value),r=n.length>5?n.slice(0,5).join(",")+"...":n.join(",");return[e,r]}else if(t.highlightTarget==="group"){const e=t.groupLabel,n=t.series.map(i=>i.value),r=n.length>5?n.slice(0,5).join(",")+"...":n.join(",");return[e,r]}else if(t.highlightTarget==="category"){const e=t.categoryLabel,n=t.category.map(i=>i.value),r=n.length>5?n.slice(0,5).join(",")+"...":n.join(",");return[e,r]}return[]},svgRenderFn:null},KI=ug("Container",nx)(({selection:t})=>function(){}),Oh="Tooltip",ix=ot(Oh,"g"),QI=ot(Oh,"box");function JI(t,e){const n=e.textSizePx*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.${ix}`).data(u).join(b=>b.append("g").classed(ix,!0).attr("pointer-events","none"),b=>b,b=>b.style("opacity",0).remove()).attr("transform",()=>`translate(${a.offsetX}, ${a.offsetY})`).selectAll(`g.${QI}`).data(c).join(b=>b.append("g").classed(ot(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(ot(e,"content"),!0).attr("transform",()=>`translate(${o.padding}, ${o.padding})`));u.length&&kC(d,u[0]);const p=d!=null&&d.node()?u2(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()?u2(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 eR=ug(Oh,rx)(({selection:t,rootSelection:e,name:n,chartType:r,observer:i,subject:o})=>{const a=new nt,s=o.event$.pipe(F(a),hi(g=>g.eventName==="mouseover"||g.eventName==="mousemove")),u=o.event$.pipe(F(a),hi(g=>g.eventName==="mouseout")),c=mA(i.fullChartParams$),l=W({fullChartParams:i.fullChartParams$,fullParams:i.fullParams$,textSizePx:c}).pipe(F(a),B(async g=>g),U(g=>({backgroundColor:Et(g.fullParams.backgroundColorType,g.fullChartParams),backgroundOpacity:g.fullParams.backgroundOpacity,strokeColor:Et(g.fullParams.strokeColorType,g.fullChartParams),offset:g.fullParams.offset,padding:g.fullParams.padding,textSize:g.fullChartParams.styles.textSize,textSizePx:g.textSizePx,textColor:Et(g.fullParams.textColorType,g.fullChartParams)}))),h=W({fullParams:i.fullParams$,tooltipStyle:l}).pipe(F(a),B(async g=>g),U(g=>g.fullParams.svgRenderFn?g.fullParams.svgRenderFn:m=>{const y=g.fullParams.textRenderFn(m);return JI(y,g.tooltipStyle)})),f=W({event:s,contentRenderFn:h}).pipe(F(a),B(async g=>g),U(g=>g.contentRenderFn(g.event))),d=u.pipe(F(a),U(g=>"")),p=Wu(s,u).pipe(F(a),U(g=>g.event));return W({svgString:Wu(f,d),event:p,layout:i.layout$,tooltipStyle:l}).pipe(F(a),B(async g=>g)).subscribe(g=>{tR({rootSelection:e,pluginName:n,rootWidth:g.layout.rootWidth,rootHeight:g.layout.rootHeight,svgString:g.svgString,tooltipStyle:g.tooltipStyle,event:g.event})}),function(){a.next(void 0)}}),ox={force:{strength:.03,velocityDecay:.2,collisionSpacing:2},bubbleText:{fillRate:.6,lineHeight:12,lineLengthMin:4},highlightRIncrease:0,bubbleScaleType:"area"},ax={outerRadius:.95,innerRadius:0,outerMouseoverRadius:1,enterDuration:800,startAngle:0,endAngle:Math.PI*2,padAngle:.02,cornerRadius:0},sx={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"}]},ux={outerRadius:.95,outerMouseoverRadius:1,startAngle:0,endAngle:Math.PI*2,labelCentroid:2.3,labelColorType:"series",labelFn:t=>String(t.value)},cx={position:"right",justify:"end",padding:28,backgroundFill:"none",backgroundStroke:"none",gap:10,listRectWidth:14,listRectHeight:14,listRectRadius:0,textColorType:"primary"};function nR(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 sr;function rR(t,e){return N1().velocityDecay(e.force.velocityDecay).force("collision",C1().radius(n=>n.r+e.force.collisionSpacing)).force("charge",F1().strength(n=>-Math.pow(n.r,2)*e.force.strength)).on("tick",()=>{t.attr("transform",n=>`translate(${n.x},${n.y})`)})}function iR({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 oR({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=iR({data:a,bubbleGroupR:o,maxValue:s,avgValue:u}),l=i==="area"?.5:1,h=eu().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 lx({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.attr("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=V(u[s]);let l=!0;a.label.length<=n.bubbleText.lineLengthMin&&(l=!1),c.call(nR,{text:a.label,radius:a.r*n.bubbleText.fillRate,lineHeight:n.bubbleText.lineHeight,isBreakAll:l})}),o}function aR({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 sR(){return Zg().on("start",(t,e)=>{t.active||sr.alpha(1).restart(),e.fx=e.x,e.fy=e.y}).on("drag",(t,e)=>{t.active||sr.alphaTarget(0),e.fx=t.x,e.fy=t.y}).on("end",(t,e)=>{e.fx=null,e.fy=null})}function fx({fullParams:t,graphicWidth:e,graphicHeight:n}){sr.force("x",G1().strength(t.force.strength).x(0)).force("y",z1().strength(t.force.strength).y(0)),sr.alpha(1).restart()}function uR({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=V(o[i]);e.includes(r.id)?a.style("opacity",1).transition("highlight").ease(Ja).duration(500):a.style("opacity",n.styles.unhighlightedOpacity)})}const cR=Di("Bubbles",ox)(({selection:t,name:e,observer:n,subject:r})=>{const i=new nt,o=t.append("g"),a=new nt;let s=new Map;n.layout$.pipe(di()).subscribe(h=>{t.attr("transform",`translate(${h.width/2}, ${h.height/2})`),n.layout$.pipe(F(i)).subscribe(f=>{t.transition().attr("transform",`translate(${f.width/2}, ${f.height/2})`)})});const u=n.fullParams$.pipe(F(i),U(h=>h.bubbleScaleType),ft()),c=new lt(h=>{W({layout:n.layout$,computedData:n.computedData$,scaleType:u}).pipe(F(i),B(async f=>f)).subscribe(f=>{const d=oR({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(F(i),U(h=>h.highlightTarget),ft());return W({layout:n.layout$,computedData:n.computedData$,bubblesData:c,SeriesDataMap:n.SeriesDataMap$,fullParams:n.fullParams$,highlightTarget:l}).pipe(F(i),B(async h=>h)).subscribe(h=>{const f=lx({graphicSelection:o,bubblesData:h.bubblesData,fullParams:h.fullParams});sr=rR(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(sR()),sr.nodes(h.bubblesData),fx({fullParams:h.fullParams,graphicWidth:h.layout.width,graphicHeight:h.layout.height}),a.next(f)}),W({bubblesSelection:a,bubblesData:c,highlight:n.seriesHighlight$.pipe(U(h=>h.map(f=>f.id))),fullChartParams:n.fullChartParams$,fullParams:n.fullParams$,layout:n.layout$}).pipe(F(i),B(async h=>h)).subscribe(h=>{uR({bubblesSelection:h.bubblesSelection,highlightIds:h.highlight,fullChartParams:h.fullChartParams}),h.fullParams.highlightRIncrease&&(aR({data:h.bubblesData,highlightRIncrease:h.fullParams.highlightRIncrease,highlightIds:h.highlight}),lx({graphicSelection:o,bubblesData:h.bubblesData,fullParams:h.fullParams})),fx({fullParams:h.fullParams,graphicWidth:h.layout.width,graphicHeight:h.layout.height}),sr.nodes(h.bubblesData)}),()=>{i.next(void 0)}});function hx({computedDataSeries:t,startAngle:e,endAngle:n}){return xv().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 dx="Pie",lR=ot(dx,"path");function fR({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 Uh(a,i.startAngle,i.endAngle,1)}:o=>Uh(n,i.startAngle,i.endAngle,o)}function Uh(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 px({selection:t,renderData:e,arc:n}){let r=t.selectAll("path").data(e,s=>s.id),i=r.enter().append("path").classed(lR,!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 hR({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=V(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 dR=Di(dx,ax)(({selection:t,name:e,observer:n,subject:r})=>{const i=new nt,o=t.append("g"),a=new nt;let s=[],u=[];n.layout$.pipe(di()).subscribe(p=>{t.attr("transform",`translate(${p.width/2}, ${p.height/2})`),n.layout$.pipe(F(i)).subscribe(g=>{t.transition().attr("transform",`translate(${g.width/2}, ${g.height/2})`)})});const c=n.layout$.pipe(F(i),U(p=>p.width<p.height?p.width:p.height)),l=new lt(p=>{W({computedData:n.computedData$,fullParams:n.fullParams$}).pipe(F(i),B(async g=>g)).subscribe(g=>{const m=hx({computedDataSeries:g.computedData,startAngle:g.fullParams.startAngle,endAngle:g.fullParams.endAngle});p.next(m)})}),h=new lt(p=>{W({shorterSideWith:c,fullParams:n.fullParams$}).pipe(F(i),B(async g=>g)).subscribe(g=>{const m=Pu({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=>{W({shorterSideWith:c,fullParams:n.fullParams$}).pipe(F(i),B(async g=>g)).subscribe(g=>{const m=Pu({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(F(i),U(p=>p.highlightTarget),ft());return W({pieData:l,SeriesDataMap:n.SeriesDataMap$,arc:h,arcMouseover:f,computedData:n.computedData$,fullParams:n.fullParams$,fullChartParams:n.fullChartParams$,highlightTarget:d}).pipe(F(i),B(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=fR({enter:m,exit:y,data:p.pieData,lastData:s,fullParams:p.fullParams});o.transition("graphicMove").duration(p.fullChartParams.transitionDuration).ease(ar(p.fullChartParams.transitionEase)).tween("move",(v,b)=>_=>{u=x(_),px({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=Uh(p.pieData,p.fullParams.startAngle,p.fullParams.endAngle,1);const _=px({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})})})}),W({pathSelection:a,highlight:n.seriesHighlight$.pipe(U(p=>p.map(g=>g.id))),fullChartParams:n.fullChartParams$,arc:h,arcMouseover:f}).pipe(F(i),B(async p=>p)).subscribe(p=>{hR({pathSelection:p.pathSelection,ids:p.highlight,fullChartParams:p.fullChartParams,arc:p.arc,arcMouseover:p.arcMouseover})}),()=>{i.next(void 0)}}),gx="PieEventTexts",mx=ot(gx,"text");function Bh(t,e){const n=t.selectAll(`text.${mx}`).data(e),r=n.enter().append("text").classed(mx,!0),i=n.merge(r);return i.each((o,a,s)=>{const u=V(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 Yh({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 pR=Di(gx,sx)(({selection:t,name:e,observer:n,subject:r})=>{const i=new nt,o=t.append("g");let a;n.layout$.pipe(di()).subscribe(u=>{t.attr("transform",`translate(${u.width/2}, ${u.height/2})`),n.layout$.pipe(F(i)).subscribe(c=>{t.transition().attr("transform",`translate(${c.width/2}, ${c.height/2})`)})});const s=n.fullChartParams$.pipe(F(i),U(u=>u.highlightTarget),ft());return W({computedData:n.computedData$,fullParams:n.fullParams$,fullChartParams:n.fullChartParams$,highlightTarget:s}).pipe(F(i),B(async u=>u)).subscribe(u=>{o.transition().duration(u.fullChartParams.transitionDuration).ease(ar(u.fullChartParams.transitionEase)).tween("move",(c,l)=>h=>{const f=Yh({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});Bh(o,f)}).on("end",(c,l)=>{const h=Yh({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});Bh(o,h),a&&a.unsubscribe(),a=r.event$.subscribe(f=>{const d=Yh({eventData:f,eventName:f.eventName,t:1,eventFn:u.fullParams.eventFn,textAttrs:u.fullParams.textAttrs,textStyles:u.fullParams.textStyles});Bh(o,d)})})}),()=>{i.next(void 0)}}),yx="PieLabels",gR=ot(yx,"text");function mR(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 yR(t,e,n,r){let i=t.selectAll("text").data(e,u=>u.pieDatum.id),o=i.enter().append("text").classed(gR,!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)=>Ah({datum:u.pieDatum.data,colorType:n.labelColorType,fullChartParams:r})).transition().attr("transform",u=>"translate("+u.x+","+u.y+")"),a.remove(),s}function bR({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=V(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 vR=Di(yx,ux)(({selection:t,observer:e,subject:n})=>{const r=new nt,i=t.append("g");let o=new nt,a=[];return e.layout$.pipe(di()).subscribe(s=>{t.attr("transform",`translate(${s.width/2}, ${s.height/2})`),e.layout$.pipe(F(r)).subscribe(u=>{t.transition().attr("transform",`translate(${u.width/2}, ${u.height/2})`)})}),W({layout:e.layout$,computedData:e.computedData$,fullParams:e.fullParams$,fullChartParams:e.fullChartParams$}).pipe(F(r),B(async s=>s)).subscribe(s=>{const u=s.layout.width<s.layout.height?s.layout.width:s.layout.height,c=Pu({axisWidth:u,innerRadius:0,outerRadius:s.fullParams.outerRadius,padAngle:0,cornerRadius:0}),l=Pu({axisWidth:u,innerRadius:0,outerRadius:s.fullParams.outerMouseoverRadius,padAngle:0,cornerRadius:0}),h=hx({computedDataSeries:s.computedData,startAngle:s.fullParams.startAngle,endAngle:s.fullParams.endAngle});a=mR(h,c,l,s.fullParams.labelCentroid);const f=yR(i,a,s.fullParams,s.fullChartParams);o.next(f)}),W({labelSelection:o,highlight:e.seriesHighlight$.pipe(U(s=>s.map(u=>u.id))),fullChartParams:e.fullChartParams$}).pipe(F(r),B(async s=>s)).subscribe(s=>{bR({labelSelection:s.labelSelection,ids:s.highlight,fullChartParams:s.fullChartParams})}),()=>{r.next(void 0)}}),bx="SeriesLegend",xR=Di(bx,cx)(({selection:t,rootSelection:e,observer:n,subject:r})=>{const i=new nt,o=n.SeriesDataMap$.pipe(F(i),U(u=>Array.from(u.keys()))),a=n.fullParams$.pipe(F(i),U(u=>{const c=[{listRectWidth:u.listRectWidth,listRectHeight:u.listRectHeight,listRectRadius:u.listRectRadius}];return{...u,seriesList:c}})),s=Du(bx,{rootSelection:e,seriesLabels$:o,fullParams$:a,layout$:n.layout$,fullChartParams$:n.fullChartParams$,textSizePx$:n.textSizePx$});return()=>{i.next(void 0),s()}}),vx={paddingInner:2,paddingOuter:2,labelColorType:"primary",squarifyRatio:1.618034,sort:(t,e)=>e.value-t.value},xx={position:"right",justify:"end",padding:28,backgroundFill:"none",backgroundStroke:"none",gap:10,listRectWidth:14,listRectHeight:14,listRectRadius:0,textColorType:"primary"},_x="TreeLegend",_R=cg(_x,xx)(({selection:t,rootSelection:e,observer:n,subject:r})=>{const i=new nt,o=n.CategoryDataMap$.pipe(F(i),U(u=>Array.from(u.keys()))),a=n.fullParams$.pipe(F(i),U(u=>{const c=[{listRectWidth:u.listRectWidth,listRectHeight:u.listRectHeight,listRectRadius:u.listRectRadius}];return{...u,seriesList:c}})),s=Du(_x,{rootSelection:e,seriesLabels$:o,fullParams$:a,layout$:n.layout$,fullChartParams$:n.fullChartParams$,textSizePx$:n.textSizePx$});return()=>{i.next(void 0),s()}}),ur="TreeMap",wx=ot(ur,"tree"),$x=ot(ur,"tile");function wR({selection:t,treeData:e,fullParams:n,fullChartParams:r,textSizePx:i}){const o=i/2,a=i,s=t.selectAll(`g.${wx}`).data(e,u=>u.data.id).join("g").attr("class",wx);return s.attr("transform",u=>!u.x0||!u.y0?null:`translate(${u.x0},${u.y0})`).each((u,c,l)=>{const h=V(l[c]);h.selectAll(`rect.${$x}`).data([u],f=>f.data.id).join("rect").attr("id",f=>f.data.id).attr("class",$x).attr("cursor","pointer").attr("width",f=>f.x1-f.x0).attr("height",f=>f.y1-f.y0).attr("fill",f=>f.data.color).attr("data-name",f=>f.data.label).attr("data-category",f=>f.data.categoryLabel).attr("data-value",f=>f.data.value),h.selectAll("g").data([u]).join("g").each((f,d,p)=>{V(p[d]).selectAll("text").data([f]).join("text").text(m=>m.data.label).attr("dominant-baseline","hanging").attr("x",o).attr("y",o).attr("font-size",r.styles.textSize).each(function(m){const y=V(this),x=m.data.label.split(/\s+/).reverse();let v,b=[];const _=y.attr("x");let w=y.attr("y"),S=0,k=y.text(null).append("tspan").attr("cursor","pointer").attr("fill",Et(n.labelColorType,r)).attr("font-size",r.styles.textSize).attr("x",_).attr("y",w);for(;v=x.pop();)b.push(v),k.text(b.join(" ")),k.node().getComputedTextLength()>m.x1-m.x0-o&&(b.pop(),k.text(b.join(" ")),b=[v],S+=a,k=y.append("tspan").attr("cursor","pointer").attr("fill",Et(n.labelColorType,r)).attr("font-size",r.styles.textSize).attr("x",_).attr("y",w).attr("dy",S+"px").text(v))})})}),s}function $R({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.data.id)?V(o[i]).style("opacity",1):V(o[i]).style("opacity",n.styles.unhighlightedOpacity)})}const SR=cg(ur,vx)(({selection:t,name:e,subject:n,observer:r})=>{const i=new nt,o=W({layout:r.layout$,visibleComputedData:r.visibleComputedData$,fullParams:r.fullParams$,fullDataFormatter:r.fullDataFormatter$,fullChartParams:r.fullChartParams$}).pipe(F(i),B(async u=>u),U(u=>{const c=Dy().size([u.layout.width,u.layout.height]).paddingInner(u.fullParams.paddingInner).paddingOuter(u.fullParams.paddingOuter).round(!0).tile(zf.ratio(u.fullParams.squarifyRatio)),l=js(u.visibleComputedData).sum(f=>f.value).sort(u.fullParams.sort);return c(l),l.leaves()})),a=W({selection:fi(t),treeData:o,fullParams:r.fullParams$,fullChartParams:r.fullChartParams$,textSizePx:r.textSizePx$}).pipe(F(i),B(async u=>u),U(u=>wR({selection:t,treeData:u.treeData,fullParams:u.fullParams,fullChartParams:u.fullChartParams,textSizePx:u.textSizePx}))),s=r.fullChartParams$.pipe(F(i),U(u=>u.highlightTarget),ft());return W({cellSelection:a,computedData:r.computedData$,treeData:o,fullParams:r.fullParams$,fullChartParams:r.fullChartParams$,highlightTarget:s,CategoryDataMap:r.CategoryDataMap$}).pipe(F(i),B(async u=>u)).subscribe(u=>{u.cellSelection.on("mouseover",(c,l)=>{c.stopPropagation(),n.event$.next({type:"tree",eventName:"mouseover",pluginName:ur,highlightTarget:u.highlightTarget,datum:l.data,category:u.CategoryDataMap.get(l.data.categoryLabel),categoryIndex:l.data.categoryIndex,categoryLabel:l.data.categoryLabel,event:c,data:u.computedData})}).on("mousemove",(c,l)=>{c.stopPropagation(),n.event$.next({type:"tree",eventName:"mousemove",pluginName:ur,highlightTarget:u.highlightTarget,datum:l.data,category:u.CategoryDataMap.get(l.data.categoryLabel),categoryIndex:l.data.categoryIndex,categoryLabel:l.data.categoryLabel,event:c,data:u.computedData})}).on("mouseout",(c,l)=>{c.stopPropagation(),n.event$.next({type:"tree",eventName:"mouseout",pluginName:ur,highlightTarget:u.highlightTarget,datum:l.data,category:u.CategoryDataMap.get(l.data.categoryLabel),categoryIndex:l.data.categoryIndex,categoryLabel:l.data.categoryLabel,event:c,data:u.computedData})}).on("click",(c,l)=>{c.stopPropagation(),n.event$.next({type:"tree",eventName:"click",pluginName:ur,highlightTarget:u.highlightTarget,datum:l.data,category:u.CategoryDataMap.get(l.data.categoryLabel),categoryIndex:l.data.categoryIndex,categoryLabel:l.data.categoryLabel,event:c,data:u.computedData})})}),W({cellSelection:a,highlight:r.treeHighlight$.pipe(U(u=>u.map(c=>c.id))),fullChartParams:r.fullChartParams$}).pipe(F(i),B(async u=>u)).subscribe(u=>{$R({selection:u.cellSelection,ids:u.highlight,fullChartParams:u.fullChartParams})}),()=>{i.next(void 0)}});Z.BarStack=uI,Z.Bars=tI,Z.BarsDiverging=eI,Z.BarsTriangle=mI,Z.Bubbles=cR,Z.CONTAINER_PLUGIN_PARAMS=nx,Z.Container=KI,Z.DEFAULT_BARS_DIVERGING_PARAMS=Sx,Z.DEFAULT_BARS_PARAMS=Fo,Z.DEFAULT_BARS_TRIANGLE_PARAMS=Xh,Z.DEFAULT_BAR_STACK_PARAMS=jh,Z.DEFAULT_BUBBLES_PARAMS=ox,Z.DEFAULT_DOTS_PARAMS=Wh,Z.DEFAULT_GRID_LEGEND_PARAMS=Qh,Z.DEFAULT_GROUP_AREA_PARAMS=qh,Z.DEFAULT_GROUP_AXIS_PARAMS=Vh,Z.DEFAULT_LINES_PARAMS=cr,Z.DEFAULT_LINE_AREAS_PARAMS=Hh,Z.DEFAULT_MULTI_BARS_PARAMS=G2,Z.DEFAULT_MULTI_BARS_TRIANGLE_PARAMS=O2,Z.DEFAULT_MULTI_BAR_STACK_PARAMS=z2,Z.DEFAULT_MULTI_DOTS_PARAMS=Y2,Z.DEFAULT_MULTI_GRID_LEGEND_PARAMS=R2,Z.DEFAULT_MULTI_GROUP_AXIS_PARAMS=N2,Z.DEFAULT_MULTI_LINES_PARAMS=U2,Z.DEFAULT_MULTI_LINE_AREAS_PARAMS=B2,Z.DEFAULT_MULTI_VALUE_AXIS_PARAMS=F2,Z.DEFAULT_OVERLAPPING_VALUE_AXES_PARAMS=H2,Z.DEFAULT_PIE_EVENT_TEXTS_PARAMS=sx,Z.DEFAULT_PIE_LABELS_PARAMS=ux,Z.DEFAULT_PIE_PARAMS=ax,Z.DEFAULT_SCALING_AREA_PARAMS=Kh,Z.DEFAULT_SERIES_LEGEND_PARAMS=cx,Z.DEFAULT_TREE_LEGEND_PARAMS=xx,Z.DEFAULT_TREE_MAP_PARAMS=vx,Z.DEFAULT_VALUE_AXIS_PARAMS=Eu,Z.DEFAULT_VALUE_STACK_AXIS_PARAMS=Zh,Z.Dots=xI,Z.GridLegend=wI,Z.GroupAux=FI,Z.GroupAxis=SI,Z.LineAreas=jC,Z.Lines=OC,Z.MultiBarStack=OI,Z.MultiBars=zI,Z.MultiBarsTriangle=UI,Z.MultiDots=HI,Z.MultiGridLegend=GI,Z.MultiGroupAxis=WI,Z.MultiLineAreas=YI,Z.MultiLines=BI,Z.MultiValueAxis=qI,Z.OverlappingValueAxes=ZI,Z.Pie=dR,Z.PieEventTexts=pR,Z.PieLabels=vR,Z.ScalingArea=DI,Z.SeriesLegend=xR,Z.TOOLTIP_PARAMS=rx,Z.Tooltip=eR,Z.TreeLegend=_R,Z.TreeMap=SR,Z.ValueAxis=MI,Z.ValueStackAxis=TI,Object.defineProperty(Z,Symbol.toStringTag,{value:"Module"})});