billboard.js
Version:
Re-usable easy interface JavaScript chart library, based on D3 v4+
62 lines • 830 kB
JavaScript
/*!
* Copyright (c) 2017 ~ present NAVER Corp.
* billboard.js project is licensed under the MIT license
*
* billboard.js, JavaScript chart library
* https://naver.github.io/billboard.js/
*
* @version 4.1.1
*
* All-in-one packaged file for ease use of 'billboard.js' with dependant d3.js modules & polyfills.
* - @types/d3-selection ^3.0.12
* - @types/d3-transition ^3.0.9
* - d3-axis ^3.0.0
* - d3-brush ^3.0.0
* - d3-drag ^3.0.0
* - d3-hierarchy ^3.1.2
* - d3-interpolate ^3.0.1
* - d3-scale ^4.0.2
* - d3-selection ^3.0.0
* - d3-shape ^3.2.0
* - d3-time-format ^4.1.0
* - d3-transition ^3.0.1
* - d3-zoom ^3.0.0
*/(function(Es,ir){if(typeof exports=="object"&&typeof module=="object")module.exports=ir();else if(typeof define=="function"&&define.amd)define([],ir);else{var Cs=ir();for(var T in Cs)(typeof exports=="object"?exports:Es)[T]=Cs[T]}})(this,function(){return(function(){var Du=[(function(T,P,a){"use strict";a(1),a(100),a(101),a(102),a(103),a(104),a(105),a(106),a(107),a(108),a(109),a(110),a(111),a(112),a(113),a(114),a(115),a(116),a(130),a(131),a(133),a(143),a(144),a(145),a(147),a(151),a(154),a(156),a(158),a(159),a(160),a(161),a(163),a(164),a(166),a(167),a(169),a(173),a(174),a(175),a(176),a(181),a(182),a(184),a(185),a(186),a(187),a(191),a(192),a(193),a(194),a(195),a(200),a(202),a(203),a(204),a(207),a(208),a(209),a(210),a(211),a(212),a(223),a(225),a(226),a(228),a(229),a(232),a(235),a(241),a(242),a(243),a(244),a(245),a(246),a(250),a(251),a(253),a(254),a(256),a(257),a(259),a(260),a(261),a(262),a(263),a(267),a(268),a(274),a(275),a(276),a(277),a(279),a(280),a(281),a(282),a(283),a(284),a(285),a(286),a(291),a(292),a(293),a(294),a(94),a(296),a(297),a(304),a(306),a(307),a(308),a(310),a(311),a(312),a(313),a(314),a(316),a(317),a(318),a(319),a(320),a(321),a(323),a(324),a(325),a(326),a(327),a(328),a(329),a(330),a(331),a(334),a(335),a(337),a(339),a(340),a(341),a(342),a(343),a(345),a(347),a(348),a(349),a(350),a(352),a(353),a(355),a(356),a(357),a(358),a(360),a(361),a(362),a(363),a(364),a(365),a(366),a(367),a(368),a(370),a(371),a(372),a(373),a(374),a(375),a(376),a(377),a(378),a(379),a(380),a(382),a(383),a(384),a(385),a(409),a(410),a(411),a(412),a(413),a(414),a(421),a(422),a(423),a(424),a(425),a(426),a(427),a(429),a(430),a(431),a(432),a(433),a(434),a(435),a(436),a(437),a(438),a(446),a(448),a(449),a(451),a(452),a(453),a(454),a(455),a(457),a(467),a(469),a(471),a(473),a(475),a(478),a(480),a(481),a(483),a(486),a(487),a(488),a(489),a(490),a(494),a(495),a(497),a(498),a(499),a(500),a(502),a(503),a(504),a(505),a(506),a(507),a(508),a(510),a(513),a(516),a(519),a(520),a(521),a(522),a(523),a(524),a(525),a(526),a(527),a(528),a(529),a(530),a(531),a(539),a(540),a(541),a(542),a(543),a(544),a(545),a(546),a(547),a(548),a(549),a(550),a(551),a(553),a(554),a(555),a(556),a(557),a(558),a(559),a(560),a(561),a(562),a(563),a(564),a(565),a(566),a(567),a(568),a(569),a(570),a(571),a(572),a(573),a(574),a(575),a(576),a(577),a(578),a(579),a(583),a(585),a(587),a(588),a(589),a(590),a(591),a(594),a(596),a(599),a(601),a(602),a(603),a(606),a(607),a(609),a(610),a(611),a(615),a(616),a(617),a(618),a(621),a(627),a(628),a(629),a(630),a(631),a(632),a(633),a(80)}),(function(T,P,a){"use strict";a(2),a(91),a(93),a(94),a(99)}),(function(T,P,a){"use strict";var v=a(3),g=a(4),p=a(8),x=a(14),y=a(36),b=a(6),A=a(26),I=a(7),R=a(38),O=a(24),M=a(46),L=a(12),D=a(18),N=a(68),F=a(11),G=a(71),j=a(73),X=a(57),U=a(75),V=a(66),k=a(5),Y=a(44),K=a(72),J=a(10),Z=a(47),Q=a(77),at=a(34),et=a(53),rt=a(54),nt=a(40),ut=a(33),ht=a(78),pt=a(79),yt=a(81),At=a(82),Et=a(51),Ht=a(83).forEach,Ut=et("hidden"),kt="Symbol",Ct="prototype",It=Et.set,Dt=Et.getterFor(kt),Vt=Object[Ct],_t=g.Symbol,Nt=_t&&_t[Ct],Jt=g.RangeError,ne=g.TypeError,ve=g.QObject,le=k.f,fe=Y.f,Ce=U.f,Be=J.f,Ie=x([].push),ce=at("symbols"),xe=at("op-symbols"),Ue=at("wks"),Pt=!ve||!ve[Ct]||!ve[Ct].findChild,zt=function(Rt,Tt,wt){var Ft=le(Vt,Tt);return Ft&&delete Vt[Tt],fe(Rt,Tt,wt),Ft&&Rt!==Vt&&fe(Vt,Tt,Ft),Rt},jt=b&&I(function(){return G(fe({},"a",{get:function(){return fe(this,"a",{value:7}).a}})).a!==7})?zt:fe,we=function(Rt,Tt){var wt=ce[Rt]=G(Nt);return It(wt,{type:kt,tag:Rt,description:Tt}),b||(wt.description=Tt),wt},$t=function(Tt,wt,Ft){Tt===Vt&&$t(xe,wt,Ft),M(Tt);var Lt=D(wt);return M(Ft),R(ce,Lt)?(("enumerable"in Ft?!Ft.enumerable:!R(Tt,Lt)||R(Tt,Ut)&&Tt[Ut][Lt])?(R(Tt,Ut)||fe(Tt,Ut,F(1,G(null))),Tt[Ut][Lt]=!0):(R(Tt,Ut)&&Tt[Ut][Lt]&&(Tt[Ut][Lt]=!1),Ft=G(Ft,{enumerable:F(0,!1)})),jt(Tt,Lt,Ft)):fe(Tt,Lt,Ft)},Xt=function(Tt,wt){M(Tt);var Ft=L(wt),Lt=j(Ft).concat(vt(Ft));return Ht(Lt,function(ue){(!b||p(oe,Ft,ue))&&$t(Tt,ue,Ft[ue])}),Tt},re=function(Tt,wt){return wt===void 0?G(Tt):Xt(G(Tt),wt)},oe=function(Tt){var wt=D(Tt),Ft=p(Be,this,wt);return this===Vt&&R(ce,wt)&&!R(xe,wt)?!1:Ft||!R(this,wt)||!R(ce,wt)||R(this,Ut)&&this[Ut][wt]?Ft:!0},pe=function(Tt,wt){var Ft=L(Tt),Lt=D(wt);if(!(Ft===Vt&&R(ce,Lt)&&!R(xe,Lt))){var ue=le(Ft,Lt);return ue&&R(ce,Lt)&&!(R(Ft,Ut)&&Ft[Ut][Lt])&&(ue.enumerable=!0),ue}},rn=function(Tt){var wt=Ce(L(Tt)),Ft=[];return Ht(wt,function(Lt){!R(ce,Lt)&&!R(rt,Lt)&&Ie(Ft,Lt)}),Ft},vt=function(Rt){var Tt=Rt===Vt,wt=Ce(Tt?xe:L(Rt)),Ft=[];return Ht(wt,function(Lt){R(ce,Lt)&&(!Tt||R(Vt,Lt))&&Ie(Ft,ce[Lt])}),Ft};A||(_t=function(){if(O(Nt,this))throw new ne("Symbol is not a constructor");var Tt=!arguments.length||arguments[0]===void 0?void 0:N(arguments[0]),wt=nt(Tt),Ft=function(Lt){var ue=this===void 0?g:this;ue===Vt&&p(Ft,xe,Lt),R(ue,Ut)&&R(ue[Ut],wt)&&(ue[Ut][wt]=!1);var ye=F(1,Lt);try{jt(ue,wt,ye)}catch(Me){if(!(Me instanceof Jt))throw Me;zt(ue,wt,ye)}};return b&&Pt&&jt(Vt,wt,{configurable:!0,set:Ft}),we(wt,Tt)},Nt=_t[Ct],Z(Nt,"toString",function(){return Dt(this).tag}),Z(_t,"withoutSetter",function(Rt){return we(nt(Rt),Rt)}),J.f=oe,Y.f=$t,K.f=Xt,k.f=pe,X.f=U.f=rn,V.f=vt,ht.f=function(Rt){return we(ut(Rt),Rt)},b&&(Q(Nt,"description",{configurable:!0,get:function(){return Dt(this).description}}),y||Z(Vt,"propertyIsEnumerable",oe,{unsafe:!0}))),v({global:!0,constructor:!0,wrap:!0,forced:!A,sham:!A},{Symbol:_t}),Ht(j(Ue),function(Rt){pt(Rt)}),v({target:kt,stat:!0,forced:!A},{useSetter:function(){Pt=!0},useSimple:function(){Pt=!1}}),v({target:"Object",stat:!0,forced:!A,sham:!b},{create:re,defineProperty:$t,defineProperties:Xt,getOwnPropertyDescriptor:pe}),v({target:"Object",stat:!0,forced:!A},{getOwnPropertyNames:rn}),yt(),At(_t,kt),rt[Ut]=!0}),(function(T,P,a){"use strict";var v=a(4),g=a(5).f,p=a(43),x=a(47),y=a(37),b=a(55),A=a(67);T.exports=function(I,R){var O=I.target,M=I.global,L=I.stat,D,N,F,G,j,X;if(M?N=v:L?N=v[O]||y(O,{}):N=v[O]&&v[O].prototype,N)for(F in R){if(j=R[F],I.dontCallGetSet?(X=g(N,F),G=X&&X.value):G=N[F],D=A(M?F:O+(L?".":"#")+F,I.forced),!D&&G!==void 0){if(typeof j==typeof G)continue;b(j,G)}(I.sham||G&&G.sham)&&p(j,"sham",!0),x(N,F,j,I)}}}),(function(T){"use strict";var P=function(a){return a&&a.Math===Math&&a};T.exports=P(typeof globalThis=="object"&&globalThis)||P(typeof window=="object"&&window)||P(typeof self=="object"&&self)||P(typeof global=="object"&&global)||P(typeof this=="object"&&this)||(function(){return this})()||Function("return this")()}),(function(T,P,a){"use strict";var v=a(6),g=a(8),p=a(10),x=a(11),y=a(12),b=a(18),A=a(38),I=a(41),R=Object.getOwnPropertyDescriptor;P.f=v?R:function(M,L){if(M=y(M),L=b(L),I)try{return R(M,L)}catch(D){}if(A(M,L))return x(!g(p.f,M,L),M[L])}}),(function(T,P,a){"use strict";var v=a(7);T.exports=!v(function(){return Object.defineProperty({},1,{get:function(){return 7}})[1]!==7})}),(function(T){"use strict";T.exports=function(P){try{return!!P()}catch(a){return!0}}}),(function(T,P,a){"use strict";var v=a(9),g=Function.prototype.call;T.exports=v?g.bind(g):function(){return g.apply(g,arguments)}}),(function(T,P,a){"use strict";var v=a(7);T.exports=!v(function(){var g=function(){}.bind();return typeof g!="function"||g.hasOwnProperty("prototype")})}),(function(T,P){"use strict";var a={}.propertyIsEnumerable,v=Object.getOwnPropertyDescriptor,g=v&&!a.call({1:2},1);P.f=g?function(x){var y=v(this,x);return!!y&&y.enumerable}:a}),(function(T){"use strict";T.exports=function(P,a){return{enumerable:!(P&1),configurable:!(P&2),writable:!(P&4),value:a}}}),(function(T,P,a){"use strict";var v=a(13),g=a(16);T.exports=function(p){return v(g(p))}}),(function(T,P,a){"use strict";var v=a(14),g=a(7),p=a(15),x=Object,y=v("".split);T.exports=g(function(){return!x("z").propertyIsEnumerable(0)})?function(b){return p(b)==="String"?y(b,""):x(b)}:x}),(function(T,P,a){"use strict";var v=a(9),g=Function.prototype,p=g.call,x=v&&g.bind.bind(p,p);T.exports=v?x:function(y){return function(){return p.apply(y,arguments)}}}),(function(T,P,a){"use strict";var v=a(14),g=v({}.toString),p=v("".slice);T.exports=function(x){return p(g(x),8,-1)}}),(function(T,P,a){"use strict";var v=a(17),g=TypeError;T.exports=function(p){if(v(p))throw new g("Can't call method on "+p);return p}}),(function(T){"use strict";T.exports=function(P){return P==null}}),(function(T,P,a){"use strict";var v=a(19),g=a(22);T.exports=function(p){var x=v(p,"string");return g(x)?x:x+""}}),(function(T,P,a){"use strict";var v=a(8),g=a(20),p=a(22),x=a(29),y=a(32),b=a(33),A=TypeError,I=b("toPrimitive");T.exports=function(R,O){if(!g(R)||p(R))return R;var M=x(R,I),L;if(M){if(O===void 0&&(O="default"),L=v(M,R,O),!g(L)||p(L))return L;throw new A("Can't convert object to primitive value")}return O===void 0&&(O="number"),y(R,O)}}),(function(T,P,a){"use strict";var v=a(21);T.exports=function(g){return typeof g=="object"?g!==null:v(g)}}),(function(T){"use strict";var P=typeof document=="object"&&document.all;T.exports=typeof P=="undefined"&&P!==void 0?function(a){return typeof a=="function"||a===P}:function(a){return typeof a=="function"}}),(function(T,P,a){"use strict";var v=a(23),g=a(21),p=a(24),x=a(25),y=Object;T.exports=x?function(b){return typeof b=="symbol"}:function(b){var A=v("Symbol");return g(A)&&p(A.prototype,y(b))}}),(function(T,P,a){"use strict";var v=a(4),g=a(21),p=function(x){return g(x)?x:void 0};T.exports=function(x,y){return arguments.length<2?p(v[x]):v[x]&&v[x][y]}}),(function(T,P,a){"use strict";var v=a(14);T.exports=v({}.isPrototypeOf)}),(function(T,P,a){"use strict";var v=a(26);T.exports=v&&!Symbol.sham&&typeof Symbol.iterator=="symbol"}),(function(T,P,a){"use strict";var v=a(27),g=a(7),p=a(4),x=p.String;T.exports=!!Object.getOwnPropertySymbols&&!g(function(){var y=Symbol("symbol detection");return!x(y)||!(Object(y)instanceof Symbol)||!Symbol.sham&&v&&v<41})}),(function(T,P,a){"use strict";var v=a(4),g=a(28),p=v.process,x=v.Deno,y=p&&p.versions||x&&x.version,b=y&&y.v8,A,I;b&&(A=b.split("."),I=A[0]>0&&A[0]<4?1:+(A[0]+A[1])),!I&&g&&(A=g.match(/Edge\/(\d+)/),(!A||A[1]>=74)&&(A=g.match(/Chrome\/(\d+)/),A&&(I=+A[1]))),T.exports=I}),(function(T,P,a){"use strict";var v=a(4),g=v.navigator,p=g&&g.userAgent;T.exports=p?String(p):""}),(function(T,P,a){"use strict";var v=a(30),g=a(17);T.exports=function(p,x){var y=p[x];return g(y)?void 0:v(y)}}),(function(T,P,a){"use strict";var v=a(21),g=a(31),p=TypeError;T.exports=function(x){if(v(x))return x;throw new p(g(x)+" is not a function")}}),(function(T){"use strict";var P=String;T.exports=function(a){try{return P(a)}catch(v){return"Object"}}}),(function(T,P,a){"use strict";var v=a(8),g=a(21),p=a(20),x=TypeError;T.exports=function(y,b){var A,I;if(b==="string"&&g(A=y.toString)&&!p(I=v(A,y))||g(A=y.valueOf)&&!p(I=v(A,y))||b!=="string"&&g(A=y.toString)&&!p(I=v(A,y)))return I;throw new x("Can't convert object to primitive value")}}),(function(T,P,a){"use strict";var v=a(4),g=a(34),p=a(38),x=a(40),y=a(26),b=a(25),A=v.Symbol,I=g("wks"),R=b?A.for||A:A&&A.withoutSetter||x;T.exports=function(O){return p(I,O)||(I[O]=y&&p(A,O)?A[O]:R("Symbol."+O)),I[O]}}),(function(T,P,a){"use strict";var v=a(35),g=Object.create||Object;T.exports=function(p,x){return v[p]||(v[p]=x||g(null))}}),(function(T,P,a){"use strict";var v=a(36),g=a(4),p=a(37),x="__core-js_shared__",y=T.exports=g[x]||p(x,{});(y.versions||(y.versions=[])).push({version:"3.50.0",mode:v?"pure":"global",copyright:"\xA9 2013\u20132025 Denis Pushkarev (zloirock.ru), 2025\u20132026 CoreJS Company (core-js.io). All rights reserved.",license:"https://github.com/zloirock/core-js/blob/v3.50.0/LICENSE",source:"https://github.com/zloirock/core-js"})}),(function(T){"use strict";T.exports=!1}),(function(T,P,a){"use strict";var v=a(4),g=Object.defineProperty;T.exports=function(p,x){try{g(v,p,{value:x,configurable:!0,writable:!0})}catch(y){v[p]=x}return x}}),(function(T,P,a){"use strict";var v=a(14),g=a(39),p=v({}.hasOwnProperty);T.exports=Object.hasOwn||function(y,b){return p(g(y),b)}}),(function(T,P,a){"use strict";var v=a(16),g=Object;T.exports=function(p){return g(v(p))}}),(function(T,P,a){"use strict";var v=a(14),g=0,p=Math.random(),x=v(1.1.toString);T.exports=function(y){return"Symbol("+(y===void 0?"":y)+")_"+x(++g+p,36)}}),(function(T,P,a){"use strict";var v=a(6),g=a(7),p=a(42);T.exports=!v&&!g(function(){return Object.defineProperty(p("div"),"a",{get:function(){return 7}}).a!==7})}),(function(T,P,a){"use strict";var v=a(4),g=a(20),p=v.document,x=g(p)&&g(p.createElement);T.exports=function(y){return x?p.createElement(y):{}}}),(function(T,P,a){"use strict";var v=a(6),g=a(44),p=a(11);T.exports=v?function(x,y,b){return g.f(x,y,p(1,b))}:function(x,y,b){return x[y]=b,x}}),(function(T,P,a){"use strict";var v=a(6),g=a(41),p=a(45),x=a(46),y=a(18),b=TypeError,A=Object.defineProperty,I=Object.getOwnPropertyDescriptor,R="enumerable",O="configurable",M="writable";P.f=v?p?function(D,N,F){if(x(D),N=y(N),x(F),typeof D=="function"&&N==="prototype"&&"value"in F&&M in F&&!F[M]){var G=I(D,N);G&&G[M]&&(D[N]=F.value,F={configurable:O in F?F[O]:G[O],enumerable:R in F?F[R]:G[R],writable:!1})}return A(D,N,F)}:A:function(D,N,F){if(x(D),N=y(N),x(F),g)try{return A(D,N,F)}catch(G){}if("get"in F||"set"in F)throw new b("Accessors not supported");return"value"in F&&(D[N]=F.value),D}}),(function(T,P,a){"use strict";var v=a(6),g=a(7);T.exports=v&&g(function(){return Object.defineProperty(function(){},"prototype",{value:42,writable:!1}).prototype!==42})}),(function(T,P,a){"use strict";var v=a(20),g=String,p=TypeError;T.exports=function(x){if(v(x))return x;throw new p(g(x)+" is not an object")}}),(function(T,P,a){"use strict";var v=a(21),g=a(44),p=a(48),x=a(37);T.exports=function(y,b,A,I){I||(I={});var R=I.enumerable,O=I.name!==void 0?I.name:b;if(v(A)&&p(A,O,I),I.global)R?y[b]=A:x(b,A);else{try{I.unsafe?y[b]&&(R=!0):delete y[b]}catch(M){}R?y[b]=A:g.f(y,b,{value:A,enumerable:!1,configurable:!I.nonConfigurable,writable:!I.nonWritable})}return y}}),(function(T,P,a){"use strict";var v=a(14),g=a(7),p=a(21),x=a(38),y=a(6),b=a(49).CONFIGURABLE,A=a(50),I=a(51),R=I.enforce,O=I.get,M=String,L=Object.defineProperty,D=v("".slice),N=v("".replace),F=v([].join),G=y&&!g(function(){return L(function(){},"length",{value:8}).length!==8}),j=String(String).split("String"),X=T.exports=function(U,V,k){D(M(V),0,7)==="Symbol("&&(V="["+N(M(V),/^Symbol\(([^)]*)\).*$/,"$1")+"]"),k&&k.getter&&(V="get "+V),k&&k.setter&&(V="set "+V),(!x(U,"name")||b&&U.name!==V)&&(y?L(U,"name",{value:V,configurable:!0}):U.name=V),G&&k&&x(k,"arity")&&U.length!==k.arity&&L(U,"length",{value:k.arity});try{k&&x(k,"constructor")&&k.constructor?y&&L(U,"prototype",{writable:!1}):U.prototype&&(U.prototype=void 0)}catch(K){}var Y=R(U);return x(Y,"source")||(Y.source=F(j,typeof V=="string"?V:"")),U};Function.prototype.toString=X(function(){return p(this)&&O(this).source||A(this)},"toString")}),(function(T,P,a){"use strict";var v=a(6),g=a(38),p=Function.prototype,x=v&&Object.getOwnPropertyDescriptor,y=g(p,"name"),b=y&&function(){}.name==="something",A=y&&(!v||v&&x(p,"name").configurable);T.exports={EXISTS:y,PROPER:b,CONFIGURABLE:A}}),(function(T,P,a){"use strict";var v=a(14),g=a(21),p=a(35),x=v(Function.toString);g(p.inspectSource)||(p.inspectSource=function(y){return x(y)}),T.exports=p.inspectSource}),(function(T,P,a){"use strict";var v=a(52),g=a(4),p=a(20),x=a(43),y=a(38),b=a(35),A=a(53),I=a(54),R="Object already initialized",O=g.TypeError,M=g.WeakMap,L,D,N,F=function(U){return N(U)?D(U):L(U,{})},G=function(U){return function(V){var k;if(!p(V)||(k=D(V)).type!==U)throw new O("Incompatible receiver, "+U+" required");return k}};if(v||b.state){var j=b.state||(b.state=new M);j.get=j.get,j.has=j.has,j.set=j.set,L=function(U,V){if(j.has(U))throw new O(R);return V.facade=U,j.set(U,V),V},D=function(U){return j.get(U)||{}},N=function(U){return j.has(U)}}else{var X=A("state");I[X]=!0,L=function(U,V){if(y(U,X))throw new O(R);return V.facade=U,x(U,X,V),V},D=function(U){return y(U,X)?U[X]:{}},N=function(U){return y(U,X)}}T.exports={set:L,get:D,has:N,enforce:F,getterFor:G}}),(function(T,P,a){"use strict";var v=a(4),g=a(21),p=v.WeakMap;T.exports=g(p)&&/native code/.test(String(p))}),(function(T,P,a){"use strict";var v=a(34),g=a(40),p=v("keys");T.exports=function(x){return p[x]||(p[x]=g(x))}}),(function(T){"use strict";T.exports={}}),(function(T,P,a){"use strict";var v=a(38),g=a(56),p=a(5),x=a(44);T.exports=function(y,b,A){for(var I=g(b),R=x.f,O=p.f,M=0;M<I.length;M++){var L=I[M];!v(y,L)&&!(A&&v(A,L))&&R(y,L,O(b,L))}}}),(function(T,P,a){"use strict";var v=a(23),g=a(14),p=a(57),x=a(66),y=a(46),b=g([].concat);T.exports=v("Reflect","ownKeys")||function(I){var R=p.f(y(I)),O=x.f;return O?b(R,O(I)):R}}),(function(T,P,a){"use strict";var v=a(58),g=a(65),p=g.concat("length","prototype");P.f=Object.getOwnPropertyNames||function(y){return v(y,p)}}),(function(T,P,a){"use strict";var v=a(14),g=a(38),p=a(12),x=a(59).indexOf,y=a(54),b=v([].push);T.exports=function(A,I){var R=p(A),O=0,M=[],L;for(L in R)!g(y,L)&&g(R,L)&&b(M,L);for(;I.length>O;)g(R,L=I[O++])&&(~x(M,L)||b(M,L));return M}}),(function(T,P,a){"use strict";var v=a(12),g=a(60),p=a(63),x=function(y){return function(b,A,I){var R=v(b),O=p(R);if(O===0)return!y&&-1;var M=g(I,O),L;if(y&&A!==A){for(;O>M;)if(L=R[M++],L!==L)return!0}else for(;O>M;M++)if((y||M in R)&&R[M]===A)return y||M||0;return!y&&-1}};T.exports={includes:x(!0),indexOf:x(!1)}}),(function(T,P,a){"use strict";var v=a(61),g=Math.max,p=Math.min;T.exports=function(x,y){var b=v(x);return b<0?g(b+y,0):p(b,y)}}),(function(T,P,a){"use strict";var v=a(62);T.exports=function(g){var p=+g;return p!==p||p===0?0:v(p)}}),(function(T){"use strict";var P=Math.ceil,a=Math.floor;T.exports=Math.trunc||function(g){var p=+g;return(p>0?a:P)(p)}}),(function(T,P,a){"use strict";var v=a(64);T.exports=function(g){return v(g.length)}}),(function(T,P,a){"use strict";var v=a(61),g=Math.min;T.exports=function(p){var x=v(p);return x>0?g(x,9007199254740991):0}}),(function(T){"use strict";T.exports=["constructor","hasOwnProperty","isPrototypeOf","propertyIsEnumerable","toLocaleString","toString","valueOf"]}),(function(T,P){"use strict";P.f=Object.getOwnPropertySymbols}),(function(T,P,a){"use strict";var v=a(7),g=a(21),p=/#|\.prototype\./,x=function(R,O){var M=b[y(R)];return M===I?!0:M===A?!1:g(O)?v(O):!!O},y=x.normalize=function(R){return String(R).replace(p,".").toLowerCase()},b=x.data={},A=x.NATIVE="N",I=x.POLYFILL="P";T.exports=x}),(function(T,P,a){"use strict";var v=a(69),g=String;T.exports=function(p){if(v(p)==="Symbol")throw new TypeError("Cannot convert a Symbol value to a string");return g(p)}}),(function(T,P,a){"use strict";var v=a(70),g=a(21),p=a(15),x=a(33),y=x("toStringTag"),b=Object,A=p((function(){return arguments})())==="Arguments",I=function(R,O){try{return R[O]}catch(M){}};T.exports=v?p:function(R){var O,M,L;return R===void 0?"Undefined":R===null?"Null":typeof(M=I(O=b(R),y))=="string"?M:A?p(O):(L=p(O))==="Object"&&g(O.callee)?"Arguments":L}}),(function(T,P,a){"use strict";var v=a(33),g=v("toStringTag"),p={};p[g]="z",T.exports=String(p)==="[object z]"}),(function(T,P,a){"use strict";var v=a(46),g=a(72),p=a(65),x=a(54),y=a(74),b=a(42),A=a(53),I=">",R="<",O="prototype",M="script",L=A("IE_PROTO"),D=function(){},N=function(U){return R+M+I+U+R+"/"+M+I},F=function(U){U.write(N("")),U.close();var V=U.parentWindow.Object;return U=null,V},G=function(){var U=b("iframe"),V="java"+M+":",k;return U.style.display="none",y.appendChild(U),U.src=String(V),k=U.contentWindow.document,k.open(),k.write(N("document.F=Object")),k.close(),k.F},j,X=function(){try{j=new ActiveXObject("htmlfile")}catch(V){}X=typeof document!="undefined"?document.domain&&j?F(j):G():F(j);for(var U=p.length;U--;)delete X[O][p[U]];return X()};x[L]=!0,T.exports=Object.create||function(V,k){var Y;return V!==null?(D[O]=v(V),Y=new D,D[O]=null,Y[L]=V):Y=X(),k===void 0?Y:g.f(Y,k)}}),(function(T,P,a){"use strict";var v=a(6),g=a(45),p=a(44),x=a(46),y=a(12),b=a(73);P.f=v&&!g?Object.defineProperties:function(I,R){x(I);for(var O=y(R),M=b(R),L=M.length,D=0,N;L>D;)p.f(I,N=M[D++],O[N]);return I}}),(function(T,P,a){"use strict";var v=a(58),g=a(65);T.exports=Object.keys||function(x){return v(x,g)}}),(function(T,P,a){"use strict";var v=a(23);T.exports=v("document","documentElement")}),(function(T,P,a){"use strict";var v=a(15),g=a(12),p=a(57).f,x=a(76),y=typeof window=="object"&&window&&Object.getOwnPropertyNames?Object.getOwnPropertyNames(window):[],b=function(A){try{return p(A)}catch(I){return x(y)}};T.exports.f=function(I){return y&&v(I)==="Window"?b(I):p(g(I))}}),(function(T,P,a){"use strict";var v=a(14);T.exports=v([].slice)}),(function(T,P,a){"use strict";var v=a(48),g=a(44);T.exports=function(p,x,y){return y.get&&v(y.get,x,{getter:!0}),y.set&&v(y.set,x,{setter:!0}),g.f(p,x,y)}}),(function(T,P,a){"use strict";var v=a(33);P.f=v}),(function(T,P,a){"use strict";var v=a(80),g=a(38),p=a(78),x=a(44).f;T.exports=function(y){var b=v.Symbol||(v.Symbol={});g(b,y)||x(b,y,{value:p.f(y)})}}),(function(T,P,a){"use strict";var v=a(4);T.exports=v}),(function(T,P,a){"use strict";var v=a(8),g=a(23),p=a(33),x=a(47);T.exports=function(){var y=g("Symbol"),b=y&&y.prototype,A=b&&b.valueOf,I=p("toPrimitive");b&&!b[I]&&x(b,I,function(R){return v(A,this)},{arity:1})}}),(function(T,P,a){"use strict";var v=a(44).f,g=a(38),p=a(33),x=p("toStringTag");T.exports=function(y,b,A){y&&!A&&(y=y.prototype),y&&!g(y,x)&&v(y,x,{configurable:!0,value:b})}}),(function(T,P,a){"use strict";var v=a(84),g=a(13),p=a(39),x=a(63),y=a(86),b=a(90),A=function(I){var R=I===1,O=I===2,M=I===3,L=I===4,D=I===6,N=I===7,F=I===5||D;return function(G,j,X){for(var U=p(G),V=g(U),k=x(V),Y=v(j,X),K=0,J=0,Z=R?y(G,k):O||N?y(G,0):void 0,Q,at;k>K;K++)if((F||K in V)&&(Q=V[K],at=Y(Q,K,U),I))if(R)b(Z,K,at);else if(at)switch(I){case 3:return!0;case 5:return Q;case 6:return K;case 2:b(Z,J++,Q)}else switch(I){case 4:return!1;case 7:b(Z,J++,Q)}return D?-1:M||L?L:Z}};T.exports={forEach:A(0),map:A(1),filter:A(2),some:A(3),every:A(4),find:A(5),findIndex:A(6),filterReject:A(7)}}),(function(T,P,a){"use strict";var v=a(85),g=a(30),p=a(9),x=v(v.bind);T.exports=function(y,b){return g(y),b===void 0?y:p?x(y,b):function(){return y.apply(b,arguments)}}}),(function(T,P,a){"use strict";var v=a(15),g=a(14);T.exports=function(p){if(v(p)==="Function")return g(p)}}),(function(T,P,a){"use strict";var v=a(87);T.exports=function(g,p){return new(v(g))(p===0?0:p)}}),(function(T,P,a){"use strict";var v=a(88),g=a(89),p=a(20),x=a(33),y=x("species"),b=Array;T.exports=function(A){var I;return v(A)&&(I=A.constructor,g(I)&&(I===b||v(I.prototype))?I=void 0:p(I)&&(I=I[y],I===null&&(I=void 0))),I===void 0?b:I}}),(function(T,P,a){"use strict";var v=a(15);T.exports=Array.isArray||function(p){return v(p)==="Array"}}),(function(T,P,a){"use strict";var v=a(14),g=a(7),p=a(21),x=a(69),y=a(23),b=a(50),A=function(){},I=y("Reflect","construct"),R=/^\s*(?:class|function)\b/,O=v(R.exec),M=!R.test(A),L=function(F){if(!p(F))return!1;try{return I(A,[],F),!0}catch(G){return!1}},D=function(F){if(!p(F))return!1;switch(x(F)){case"AsyncFunction":case"GeneratorFunction":case"AsyncGeneratorFunction":return!1}try{return M||!!O(R,b(F))}catch(G){return!0}};D.sham=!0,T.exports=!I||g(function(){var N;return L(L.call)||!L(Object)||!L(function(){N=!0})||N})?D:L}),(function(T,P,a){"use strict";var v=a(6),g=a(44),p=a(11);T.exports=function(x,y,b){v?g.f(x,y,p(0,b)):x[y]=b}}),(function(T,P,a){"use strict";var v=a(3),g=a(23),p=a(38),x=a(68),y=a(34),b=a(92),A=y("string-to-symbol-registry"),I=y("symbol-to-string-registry");v({target:"Symbol",stat:!0,forced:!b},{for:function(R){var O=x(R);if(p(A,O))return A[O];var M=g("Symbol")(O);return A[O]=M,I[M]=O,M}})}),(function(T,P,a){"use strict";var v=a(26);T.exports=v&&!!Symbol.for&&!!Symbol.keyFor}),(function(T,P,a){"use strict";var v=a(3),g=a(38),p=a(22),x=a(31),y=a(34),b=a(92),A=y("symbol-to-string-registry");v({target:"Symbol",stat:!0,forced:!b},{keyFor:function(R){if(!p(R))throw new TypeError(x(R)+" is not a symbol");if(g(A,R))return A[R]}})}),(function(T,P,a){"use strict";var v=a(3),g=a(23),p=a(8),x=a(14),y=a(7),b=a(88),A=a(21),I=a(20),R=a(71),O=a(95),M=a(22),L=a(15),D=a(96),N=a(59).includes,F=a(38),G=a(68),j=a(97),X=a(40),U=a(26),V=a(98),k=String,Y=TypeError,K=g("JSON","stringify"),J=g("BigInt"),Z=x("".valueOf),Q=x((!0).valueOf),at=J&&x(J.prototype.valueOf),et=x(/./.exec),rt=x("".charAt),nt=x("".charCodeAt),ut=x("".replace),ht=x("".slice),pt=x([].push),yt=x([].pop),At=x(1.1.toString),Et=/[\uD800-\uDFFF]/g,Ht=/^[\uD800-\uDBFF]$/,Ut=/^[\uDC00-\uDFFF]$/,kt=/^\d+$/,Ct=X(),It=X(),Dt=X(),Vt=Ct.length,_t=It.length,Nt=!U||y(function(){var Pt=g("Symbol")("stringify detection");return K([Pt])!=="[null]"||K({a:Pt})!=="{}"||K(Object(Pt))!=="{}"}),Jt=y(function(){return K("\uDF06\uD834")!=='"\\udf06\\ud834"'||K("\uDEAD")!=='"\\udead"'}),ne=V?g("JSON","isRawJSON"):O,ve=Nt?function(Pt,zt,jt){return K(Pt,function(we,$t){var Xt=p(zt,this,we,$t);if(!M(Xt))return Xt},jt)}:K,le=function(Pt,zt,jt){var we=rt(jt,zt-1),$t=rt(jt,zt+1);return et(Ht,Pt)&&!et(Ut,$t)||et(Ut,Pt)&&!et(Ht,we)?"\\u"+At(nt(Pt,0),16):Pt},fe=function(Pt){if(b(Pt)){for(var zt=Pt.length,jt=[],we=R(null),$t=0;$t<zt;$t++){var Xt=Pt[$t],re;if(typeof Xt=="string")re=Xt;else if(typeof Xt=="number"||L(Xt)==="Number"||L(Xt)==="String")re=G(Xt);else continue;F(we,re)||(we[re]=!0,pt(jt,re))}return jt}},Ce=function(Pt,zt){try{return Pt(zt),!0}catch(jt){return!1}},Be=function(Pt){var zt=L(Pt);return zt==="Number"&&Ce(D,Pt)||zt==="String"&&Ce(Z,Pt)||zt==="Boolean"&&Ce(Q,Pt)||!!at&&zt==="BigInt"&&Ce(at,Pt)},Ie=function(Pt){if(!I(Pt)||A(Pt)||b(Pt))return!1;try{return!Be(Pt)}catch(zt){return!0}},ce=function(Pt,zt){return{toJSON:function(){var jt=Pt[zt];if(I(jt)||typeof jt=="bigint"){var we=jt.toJSON;A(we)&&(jt=p(we,jt,zt))}return jt}}},xe=function(Pt){for(var zt=0,jt=Pt.length;zt<jt;zt++)if(et(kt,Pt[zt]))return It;return""},Ue=function(Pt,zt,jt){for(var we=R(null),$t=0,Xt=zt.length;$t<Xt;$t++){var re=zt[$t];we[jt+re]=ce(Pt,re)}return we[Dt]=null,we};K&&v({target:"JSON",stat:!0,arity:3,forced:Nt||Jt||!V},{stringify:function(zt,jt,we){var $t=A(jt)?jt:void 0,Xt=$t?void 0:fe(jt),re=Xt&&xe(Xt),oe=[],pe=[],rn=[],vt,Rt=!1,Tt=!0,wt=ve(zt,function(tn,Ve){if(tn=k(tn),Xt){if(tn===Dt){yt(pe),vt=yt(rn);return}if(Tt)Tt=!1;else if(this!==vt&&!b(this)&&!N(Xt,tn))return}else $t&&(Ve=p($t,this,tn,Ve));if(ne(Ve))return V?Ve:(Rt=!0,Ct+(pt(oe,Ve.rawJSON)-1));if(Xt&&Ie(Ve)){if(N(pe,Ve))throw new Y("Converting circular structure to JSON");var _n=Ue(Ve,Xt,re);return pt(pe,Ve),pt(rn,vt),vt=_n,re&&(Rt=!0),_n}return Ve},we);if(typeof wt!="string"||(Jt&&(wt=ut(wt,Et,le)),!Rt))return wt;for(var Ft="",Lt=wt.length,ue=0;ue<Lt;ue++){var ye=rt(wt,ue);if(ye==='"'){var Me=j(wt,++ue).end-1,Fe=ht(wt,ue,Me);ht(Fe,0,Vt)===Ct?Ft+=oe[ht(Fe,Vt)]:ht(Fe,0,_t)===It?Ft+='"'+ht(Fe,_t)+'"':Ft+='"'+Fe+'"',ue=Me}else Ft+=ye}return Ft}})}),(function(T,P,a){"use strict";var v=a(20),g=a(51).get;T.exports=function(x){if(!v(x))return!1;var y=g(x);return!!y&&y.type==="RawJSON"}}),(function(T,P,a){"use strict";var v=a(14);T.exports=v(1.1.valueOf)}),(function(T,P,a){"use strict";var v=a(14),g=a(38),p=SyntaxError,x=parseInt,y=String.fromCharCode,b=v("".charAt),A=v("".slice),I=v(/./.exec),R={'\\"':'"',"\\\\":"\\","\\/":"/","\\b":"\b","\\f":"\f","\\n":`
`,"\\r":"\r","\\t":" "},O=/^[\da-f]{4}$/i,M=/^[\u0000-\u001F]$/;T.exports=function(L,D){for(var N=!0,F="";D<L.length;){var G=b(L,D);if(G==="\\"){var j=A(L,D,D+2);if(g(R,j))F+=R[j],D+=2;else if(j==="\\u"){D+=2;var X=A(L,D,D+4);if(!I(O,X))throw new p("Bad Unicode escape at: "+D);F+=y(x(X,16)),D+=4}else throw new p('Unknown escape sequence: "'+j+'"')}else if(G==='"'){N=!1,D++;break}else{if(I(M,G))throw new p("Bad control character in string literal at: "+D);F+=G,D++}}if(N)throw new p("Unterminated string at: "+D);return{value:F,end:D}}}),(function(T,P,a){"use strict";var v=a(7);T.exports=!v(function(){var g="9007199254740993",p=JSON.rawJSON(g);return!JSON.isRawJSON(p)||JSON.stringify(p)!==g})}),(function(T,P,a){"use strict";var v=a(3),g=a(26),p=a(7),x=a(66),y=a(39),b=!g||p(function(){x.f(1)});v({target:"Object",stat:!0,forced:b},{getOwnPropertySymbols:function(I){var R=x.f;return R?R(y(I)):[]}})}),(function(T,P,a){"use strict";var v=a(3),g=a(6),p=a(4),x=a(8),y=a(14),b=a(38),A=a(21),I=a(24),R=a(68),O=a(77),M=a(55),L=p.Symbol,D=L&&L.prototype;if(g&&A(L)&&(!("description"in D)||L().description!==void 0)){var N={},F=function(){var J=arguments.length<1||arguments[0]===void 0?void 0:R(arguments[0]),Z=I(D,this)?new L(J):J===void 0?L():L(J);return J===""&&(N[Z]=!0),Z};M(F,L);var G=F.for;F.for=function(K){var J=R(K),Z=x(G,this,J);return J===""&&(N[Z]=!0),Z},F.prototype=D,D.constructor=F;var j=String(L("description detection"))==="Symbol(description detection)",X=y(D.valueOf),U=y(D.toString),V=/^Symbol\((.*)\)[^)]+$/,k=y("".replace),Y=y("".slice);O(D,"description",{configurable:!0,get:function(){var J=X(this);if(b(N,J))return"";var Z=U(J),Q=j?Y(Z,7,-1):k(Z,V,"$1");return Q===""?void 0:Q}}),v({global:!0,constructor:!0,forced:!0},{Symbol:F})}}),(function(T,P,a){"use strict";var v=a(4),g=a(79),p=a(44).f,x=a(5).f,y=v.Symbol;if(g("asyncDispose"),y){var b=x(y,"asyncDispose");b.enumerable&&b.configurable&&b.writable&&p(y,"asyncDispose",{value:b.value,enumerable:!1,configurable:!1,writable:!1})}}),(function(T,P,a){"use strict";var v=a(79);v("asyncIterator")}),(function(T,P,a){"use strict";var v=a(4),g=a(79),p=a(44).f,x=a(5).f,y=v.Symbol;if(g("dispose"),y){var b=x(y,"dispose");b.enumerable&&b.configurable&&b.writable&&p(y,"dispose",{value:b.value,enumerable:!1,configurable:!1,writable:!1})}}),(function(T,P,a){"use strict";var v=a(79);v("hasInstance")}),(function(T,P,a){"use strict";var v=a(79);v("isConcatSpreadable")}),(function(T,P,a){"use strict";var v=a(79);v("iterator")}),(function(T,P,a){"use strict";var v=a(79);v("match")}),(function(T,P,a){"use strict";var v=a(79);v("matchAll")}),(function(T,P,a){"use strict";var v=a(79);v("replace")}),(function(T,P,a){"use strict";var v=a(79);v("search")}),(function(T,P,a){"use strict";var v=a(79);v("species")}),(function(T,P,a){"use strict";var v=a(79);v("split")}),(function(T,P,a){"use strict";var v=a(79),g=a(81);v("toPrimitive"),g()}),(function(T,P,a){"use strict";var v=a(23),g=a(79),p=a(82);g("toStringTag"),p(v("Symbol"),"Symbol")}),(function(T,P,a){"use strict";var v=a(79);v("unscopables")}),(function(T,P,a){"use strict";var v=a(3),g=a(4),p=a(117),x=a(118),y="WebAssembly",b=g[y],A=new Error("e",{cause:7}).cause!==7,I=function(O,M){var L={};L[O]=x(O,M,A),v({global:!0,constructor:!0,arity:1,forced:A},L)},R=function(O,M){if(b&&b[O]){var L={};L[O]=x(y+"."+O,M,A),v({target:y,stat:!0,constructor:!0,arity:1,forced:A},L)}};I("Error",function(O){return function(L){return p(O,this,arguments)}}),I("EvalError",function(O){return function(L){return p(O,this,arguments)}}),I("RangeError",function(O){return function(L){return p(O,this,arguments)}}),I("ReferenceError",function(O){return function(L){return p(O,this,arguments)}}),I("SyntaxError",function(O){return function(L){return p(O,this,arguments)}}),I("TypeError",function(O){return function(L){return p(O,this,arguments)}}),I("URIError",function(O){return function(L){return p(O,this,arguments)}}),R("CompileError",function(O){return function(L){return p(O,this,arguments)}}),R("LinkError",function(O){return function(L){return p(O,this,arguments)}}),R("RuntimeError",function(O){return function(L){return p(O,this,arguments)}})}),(function(T,P,a){"use strict";var v=a(9),g=Function.prototype,p=g.apply,x=g.call;T.exports=typeof Reflect=="object"&&Reflect.apply||(v?x.bind(p):function(){return x.apply(p,arguments)})}),(function(T,P,a){"use strict";var v=a(23),g=a(38),p=a(43),x=a(24),y=a(119),b=a(55),A=a(123),I=a(124),R=a(125),O=a(126),M=a(127),L=a(6),D=a(36);T.exports=function(N,F,G,j){var X="stackTraceLimit",U=j?2:1,V=N.split("."),k=V[V.length-1],Y=v.apply(null,V);if(Y){var K=Y.prototype;if(!D&&g(K,"cause")&&delete K.cause,!G)return Y;var J=v("Error"),Z=F(function(Q,at){var et=R(j?at:Q,void 0),rt=j?new Y(Q):new Y;return et!==void 0&&p(rt,"message",et),M(rt,Z,rt.stack,2),this&&x(K,this)&&I(rt,this,Z),arguments.length>U&&O(rt,arguments[U]),rt});if(Z.prototype=K,k!=="Error"?y?y(Z,J):b(Z,J,{name:!0}):L&&X in Y&&(A(Z,Y,X),A(Z,Y,"prepareStackTrace")),b(Z,Y),!D)try{K.name!==k&&p(K,"name",k),K.constructor=Z}catch(Q){}return Z}}}),(function(T,P,a){"use strict";var v=a(120),g=a(20),p=a(16),x=a(121);T.exports=Object.setPrototypeOf||("__proto__"in{}?(function(){var y=!1,b={},A;try{A=v(Object.prototype,"__proto__","set"),A(b,[]),y=b instanceof Array}catch(I){}return function(R,O){return p(R),x(O),g(R)&&(y?A(R,O):R.__proto__=O),R}})():void 0)}),(function(T,P,a){"use strict";var v=a(14),g=a(30);T.exports=function(p,x,y){try{return v(g(Object.getOwnPropertyDescriptor(p,x)[y]))}catch(b){}}}),(function(T,P,a){"use strict";var v=a(122),g=String,p=TypeError;T.exports=function(x){if(v(x))return x;throw new p("Can't set "+g(x)+" as a prototype")}}),(function(T,P,a){"use strict";var v=a(20);T.exports=function(g){return v(g)||g===null}}),(function(T,P,a){"use strict";var v=a(44).f;T.exports=function(g,p,x){x in g||v(g,x,{configurable:!0,get:function(){return p[x]},set:function(y){p[x]=y}})}}),(function(T,P,a){"use strict";var v=a(21),g=a(20),p=a(119);T.exports=function(x,y,b){var A,I;return p&&v(A=y.constructor)&&A!==b&&g(I=A.prototype)&&I!==b.prototype&&p(x,I),x}}),(function(T,P,a){"use strict";var v=a(68);T.exports=function(g,p){return g===void 0?arguments.length<2?"":p:v(g)}}),(function(T,P,a){"use strict";var v=a(20),g=a(43);T.exports=function(p,x){v(x)&&"cause"in x&&g(p,"cause",x.cause)}}),(function(T,P,a){"use strict";var v=a(43),g=a(128),p=a(129),x=Error.captureStackTrace;T.exports=function(y,b,A,I){p&&(x?x(y,b):v(y,"stack",g(A,I)))}}),(function(T,P,a){"use strict";var v=a(14),g=Error,p=v("".replace),x=(function(A){return String(new g(A).stack)})("zxcasd"),y=/\n\s*at [^:]*:[^\n]*/,b=y.test(x);T.exports=function(A,I){if(b&&typeof A=="string"&&!g.prepareStackTrace)for(;I--;)A=p(A,y,"");return A}}),(function(T,P,a){"use strict";var v=a(7),g=a(11);T.exports=!v(function(){var p=new Error("a");return"stack"in p?(Object.defineProperty(p,"stack",g(1,7)),p.stack!==7):!0})}),(function(T,P,a){"use strict";var v=a(3),g=a(23),p=a(20),x=a(69),y=a(7),b="Error",A="DOMException",I=Object.setPrototypeOf||{}.__proto__,R=g(A),O=Error,M=O.isError,L=!M||!I||y(function(){return R&&!M(new R(A))||!M(new O(b,{cause:function(){}}))||M(g("Object","create")(O.prototype))});v({target:"Error",stat:!0,sham:!0,forced:L},{isError:function(N){if(!p(N))return!1;var F=x(N);return F===b||F===A}})}),(function(T,P,a){"use strict";var v=a(47),g=a(132),p=Error.prototype;p.toString!==g&&v(p,"toString",g)}),(function(T,P,a){"use strict";var v=a(6),g=a(7),p=a(46),x=a(125),y=Error.prototype.toString,b=g(function(){if(v){var A=Object.create(Object.defineProperty({},"name",{get:function(){return this===A}}));if(y.call(A)!=="true")return!0}return y.call({message:1,name:2})!=="2: 1"||y.call({})!=="Error"});T.exports=b?function(){var I=p(this),R=x(I.name,"Error"),O=x(I.message);return R?O?R+": "+O:R:O}:y}),(function(T,P,a){"use strict";a(134)}),(function(T,P,a){"use strict";var v=a(3),g=a(24),p=a(135),x=a(119),y=a(55),b=a(71),A=a(43),I=a(11),R=a(126),O=a(127),M=a(137),L=a(125),D=a(33),N=D("toStringTag"),F=Error,G=[].push,j=function(V,k){var Y=g(X,this),K;x?K=x(new F,Y?p(this):X):(K=Y?this:b(X),A(K,N,"Error")),k!==void 0&&A(K,"message",L(k)),O(K,j,K.stack,1),arguments.length>2&&R(K,arguments[2]);var J=[];return M(V,G,{that:J}),A(K,"errors",J),K};x?x(j,F):y(j,F,{name:!0});var X=j.prototype=b(F.prototype,{constructor:I(1,j),message:I(1,""),name:I(1,"AggregateError")});v({global:!0,constructor:!0,arity:2},{AggregateError:j})}),(function(T,P,a){"use strict";var v=a(38),g=a(21),p=a(39),x=a(53),y=a(136),b=x("IE_PROTO"),A=Object,I=A.prototype;T.exports=y?A.getPrototypeOf:function(R){var O=p(R);if(v(O,b))return O[b];var M=O.constructor;return g(M)&&O instanceof M?M.prototype:O instanceof A?I:null}}),(function(T,P,a){"use strict";var v=a(7);T.exports=!v(function(){function g(){}return g.prototype.constructor=null,Object.getPrototypeOf(new g)!==g.prototype})}),(function(T,P,a){"use strict";var v=a(84),g=a(8),p=a(46),x=a(31),y=a(138),b=a(63),A=a(24),I=a(140),R=a(141),O=a(142),M=TypeError,L=function(N,F){this.stopped=N,this.result=F},D=L.prototype;T.exports=function(N,F,G){var j=G&&G.that,X=!!(G&&G.AS_ENTRIES),U=!!(G&&G.IS_RECORD),V=!!(G&&G.IS_ITERATOR),k=!!(G&&G.INTERRUPTED),Y=v(F,j),K,J,Z,Q,at,et,rt,nt=function(pt){var yt=K;return K=void 0,yt&&O(yt,"normal"),new L(!0,pt)},ut=function(pt){return X?(p(pt),k?Y(pt[0],pt[1],nt):Y(pt[0],pt[1])):k?Y(pt,nt):Y(pt)};if(U)K=N.iterator;else if(V)K=N;else{if(J=R(N),!J)throw new M(x(N)+" is not iterable");if(y(J)){for(Z=0,Q=b(N);Q>Z;Z++)if(at=ut(N[Z]),at&&A(D,at))return at;return new L(!1)}K=I(N,J)}for(et=U?N.next:K.next;!(rt=g(et,K)).done;){var ht=rt.value;try{at=ut(ht)}catch(pt){if(K)O(K,"throw",pt);else throw pt}if(typeof at=="object"&&at&&A(D,at))return at}return new L(!1)}}),(function(T,P,a){"use strict";var v=a(33),g=a(139),p=v("iterator"),x=Array.prototype;T.exports=function(y){return y!==void 0&&(g.Array===y||x[p]===y)}}),(function(T){"use strict";T.exports=Object.create?Object.create(null):{}}),(function(T,P,a){"use strict";var v=a(8),g=a(21),p=a(46),x=a(31),y=a(141),b=TypeError;T.exports=function(A,I){var R=arguments.length<2?y(A):I;if(g(R))return p(v(R,A));throw new b(x(A)+" is not iterable")}}),(function(T,P,a){"use strict";var v=a(15),g=a(17),p=a(29),x=a(33),y=x("iterator"),b=Array.prototype;T.exports=function(A){if(!g(A))return p(A,y)||p(A,"@@iterator")||(v(A)==="Arguments"?b[y]:void 0)}}),(function(T,P,a){"use strict";var v=a(8),g=a(46),p=a(29);T.exports=function(x,y,b){var A,I;g(x);try{if(A=p(x,"return"),!A){if(y==="throw")throw b;return b}A=v(A,x)}catch(R){I=!0,A=R}if(y==="throw")throw b;if(I)throw A;return g(A),b}}),(function(T,P,a){"use strict";var v=a(3),g=a(23),p=a(117),x=a(7),y=a(118),b="AggregateError",A=g(b),I=!x(function(){return A([1]).errors[0]!==1})&&x(function(){return A([1],b,{cause:7}).cause!==7});v({global:!0,constructor:!0,arity:2,forced:I},{AggregateError:y(b,function(R){return function(M,L){return p(R,this,arguments)}},I,!0)})}),(function(T,P,a){"use strict";var v=a(3),g=a(4),p=a(24),x=a(135),y=a(119),b=a(55),A=a(71),I=a(43),R=a(11),O=a(127),M=a(125),L=a(33),D=a(7),N=a(36),F=g.SuppressedError,G=L("toStringTag"),j=Error,X=!!F&&F.length!==3,U=!!F&&D(function(){return new F(1,2,3,{cause:4}).cause===4}),V=X||U,k=function(J,Z,Q){var at=p(Y,this),et;return y?et=V&&(!at||x(this)===Y)?new F:y(new j,at?x(this):Y):(et=at?this:A(Y),I(et,G,"Error")),Q!==void 0&&I(et,"message",M(Q)),O(et,k,et.stack,1),I(et,"error",J),I(et,"suppressed",Z),et};y?y(k,j):b(k,j,{name:!0});var Y=k.prototype=V?F.prototype:A(j.prototype,{constructor:R(1,k),message:R(1,""),name:R(1,"SuppressedError")});V&&!N&&(Y.constructor=k),v({global:!0,constructor:!0,arity:3,forced:V},{SuppressedError:k})}),(function(T,P,a){"use strict";var v=a(3),g=a(39),p=a(63),x=a(61),y=a(146);v({target:"Array",proto:!0},{at:function(A){var I=g(this),R=p(I),O=x(A),M=O>=0?O:R+O;return M<0||M>=R?void 0:I[M]}}),y("at")}),(function(T,P,a){"use strict";var v=a(33),g=a(71),p=a(44).f,x=v("unscopables"),y=Array.prototype;y[x]===void 0&&p(y,x,{configurable:!0,value:g(null)}),T.exports=function(b){y[x][b]=!0}}),(function(T,P,a){"use strict";var v=a(3),g=a(7),p=a(88),x=a(20),y=a(39),b=a(63),A=a(148),I=a(90),R=a(149),O=a(86),M=a(150),L=a(33),D=a(27),N=L("isConcatSpreadable"),F=D>=51||!g(function(){var X=[];return X[N]=!1,X.concat()[0]!==X}),G=function(X){if(!x(X))return!1;var U=X[N];return U!==void 0?!!U:p(X)},j=!F||!M("concat");v({target:"Array",proto:!0,arity:1,forced:j},{concat:function(U){var V=y(this),k=O(V,0),Y=0,K,J,Z,Q,at;for(K=-1,Z=arguments.length;K<Z;K++)if(at=K===-1?V:arguments[K],G(at))for(Q=b(at),A(Y+Q),J=0;J<Q;J++,Y++)J in at&&I(k,Y,at[J]);else A(Y+1),I(k,Y++,at);return R(k,Y),k}})}),(function(T){"use strict";var P=TypeError,a=9007199254740991;T.exports=function(v){if(v>a)throw new P("Maximum allowed index exceeded");return v}}),(function(T,P,a){"use strict";var v=a(6),g=a(88),p=TypeError,x=Object.getOwnPropertyDescriptor,y=v&&!(function(){if(this!==void 0)return!0;try{Object.defineProperty([],"length",{writable:!1}).length=1}catch(b){return b instanceof TypeError}})();T.exports=y?function(b,A){if(g(b)&&!x(b,"length").writable)throw new p("Cannot set read only .length");return b.length=A}:function(b,A){return b.length=A}}),(function(T,P,a){"use strict";var v=a(7),g=a(33),p=a(27),x=g("species");T.exports=function(y){return p>=51||!v(function(){var b=[],A=b.constructor={};return A[x]=function(){return{foo:1}},b[y](Boolean).foo!==1})}}),(function(T,P,a){"use strict";var v=a(3),g=a(152),p=a(146);v({target:"Array",proto:!0},{copyWithin:g}),p("copyWithin")}),(function(T,P,a){"use strict";var v=a(39),g=a(60),p=a(63),x=a(153),y=Math.min;T.exports=[].copyWithin||function(A,I){var R=v(this),O=p(R),M=g(A,O),L=g(I,O),D=arguments.length>2?arguments[2]:void 0,N=y((D===void 0?O:g(D,O))-L,O-M),F=1;for(L<M&&M<L+N&&(F=-1,L+=N-1,M+=N-1);N-- >0;)L in R?R[M]=R[L]:x(R,M),M+=F,L+=F;return R}}),(function(T,P,a){"use strict";var v=a(31),g=TypeError;T.exports=function(p,x){if(!delete p[x])throw new g("Cannot delete property "+v(x)+" of "+v(p))}}),(function(T,P,a){"use strict";var v=a(3),g=a(83).every,p=a(155),x=p("every");v({target:"Array",proto:!0,forced:!x},{every:function(b){return g(this,b,arguments.length>1?arguments[1]:void 0)}})}),(function(T,P,a){"use strict";var v=a(7);T.exports=function(g,p){var x=[][g];return!!x&&v(function(){x.call(null,p||function(){return 1},1)})}}),(function(T,P,a){"use strict";var v=a(3),g=a(157),p=a(146);v({target:"Array",proto:!0},{fill:g}),p("fill")}),(function(T,P,a){"use strict";var v=a(39),g=a(60),p=a(63);T.exports=[].fill||function(y){for(var b=v(this),A=p(b),I=arguments.length,R=g(I>1?arguments[1]:void 0,A),O=I>2?arguments[2]:void 0,M=O===void 0?A:g(O,A);M>R;)b[R++]=y;return b}}),(function(T,P,a){"use strict";var v=a(3),g=a(83).filter,p=a(150),x=p("filter");v({target:"Array",proto:!0,forced:!x},{filter:function(b){return g(this,b,arguments.length>1?arguments[1]:void 0)}})}),(function(T,P,a){"use strict";var v=a(3),g=a(83).find,p=a(146),x="find",y=!0;x in[]&&Array(1)[x](function(){y=!1}),v({target:"Array",proto:!0,forced:y},{find:function(A){return g(this,A,arguments.length>1?arguments[1]:void 0)}}),p(x)}),(function(T,P,a){"use strict";var v=a(3),g=a(83).findIndex,p=a(146),x="findIndex",y=!0;x in[]&&Array(1)[x](function(){y=!1}),v({target:"Array",proto:!0,forced:y},{findIndex:function(A){return g(this,A,arguments.length>1?arguments[1]:void 0)}}),p(x)}),(function(T,P,a){"use strict";var v=a(3),g=a(162).findLast,p=a(146);v({target:"Array",proto:!0},{findLast:function(y){return g(this,y,arguments.length>1?arguments[1]:void 0)}}),p("findLast")}),(function(T,P,a){"use strict";var v=a(84),g=a(13),p=a(39),x=a(63),y=function(b){var A=b===1;return function(I,R,O){for(var M=p(I),L=g(M),D=x(L),N=v(R,O),F,G;D-- >0;)if(F=L[D],G=N(F,D,M),G)switch(b){case 0:return F;case 1:return D}return A?-1:void 0}};T.exports={findLast:y(0),findLastIndex:y(1)}}),(function(T,P,a){"use strict";var v=a(3),g=a(162).findLastIndex,p=a(146);v({target:"Array",proto:!0},{findLastIndex:function(y){return g(this,y,arguments.length>1?arguments[1]:void 0)}}),p("findLastIndex")}),(function(T,P,a){"use strict";var v=a(3),g=a(165),p=a(39),x=a(63),y=a(61),b=a(86);v({target:"Array",proto:!0},{flat:function(){var I=arguments.length?arguments[0]:void 0,R=p(this),O=x(R),M=I===void 0?1:y(I),L=b(R,0);return g(L,R,R,O,0,M),L}})}),(function(T,P,a){"use strict";var v=a(88),g=a(63),p=a(148),x=a(84),y=a(90),b=function(A,I,R,O,M,L,D,N){for(var F=M,G=0,j=D?x(D,N):!1,X,U;G<O;)G in R&&(X=j?j(R[G],G,I):R[G],L>0&&v(X)?(U=g(X),F=b(A,I,X,U,F,L-1)-1):(p(F+1),y(A,F,X)),F++),G++;return F};T.exports=b}),(function(T,P,a){"use strict";var v=a(3),g=a(165),p=a(30),x=a(39),y=a(63),b=a(86);v({target:"Array",proto:!0},{flatMap:function(I){var R=x(this),O=y(R),M;return p(I),M=b(R,0),g(M,R,R,O,0,1,I,arguments.length>1?arguments[1]:void 0),M}})}),(function(T,P,a){"use strict";var v=a(3),g=a(168);v({target:"Array",proto:!0,forced:[].forEach!==g},{forEach:g})}),(function(T,P,a){"use strict";var v=a(83).forEach,g=a(155),p=g("forEach");T.exports=p?[].forEach:function(y){return v(this,y,arguments.length>1?arguments[1]:void 0)}}),(function(T,P,a){"use strict";var v=a(3),g=a(170),p=a(172),x=!p(function(y){Array.from(y)});v({target:"Array",stat:!0,forced:x},{from:g})}),(function(T,P,a){"use strict";var v=a(84),g=a(8),p=a(39),x=a(171),y=a(138),b=a(89),A=a(63),I=a(90),R=a(149),O=a(140),M=a(141),L=a(142),D=a(148),N=Array;T.exports=function(G){var j=b(this),X=arguments.length,U=X>1?arguments[1]:void 0,V=U!==void 0;V&&(U=v(U,X>2?arguments[2]:void 0));var k=p(G),Y=M(k),K=0,J,Z,Q,at,et,rt;if(Y&&!(this===N&&y(Y)))for(Z=j?new this:[],at=O(k,Y),et=at.next;!(Q=g(et,at)).done;K++){try{D(K)}catch(nt){L(at,"throw",nt)}rt=V?x(at,U,[Q.value,K],!0):Q.value;try{I(Z,K,rt)}catch(nt){L(at,"throw",nt)}}else for(J=A(k),Z=j?new this(J):N(J);J>K;K++)rt=V?U(k[K],K):k[K],I(Z,K,rt);return R(Z,K),Z}}),(function(T,P,a){"use strict";var v=a(46),g=a(142);T.exports=function(p,x,y,b){try{return b?x(v(y)[0],y[1]):x(y)}catch(A){g(p,"throw",A)}}}),(function(T,P,a){"use strict";var v=a(33),g=v("iterator"),p=!1;try{var x=0,y={next:function(){return{done:!!x++}},return:function(){p=!0}};y[g]=function(){return this},Array.from(y,function(){throw 2})}catch(b){}T.exports=function(b,A){try{if(!A&&!p)return!1}catch(O){return!1}var I=!1;try{var R={};R[g]=function(){return{next:function(){return{done:I=!0}}}},b(R)}catch(O){}return I}}),(function(T,P,a){"use strict";var v=a(3),g=a(59).includes,p=a(7),x=a(146),y=p(function(){return!Array(1).includes()}),b=p(function(){return[,1].includes(void 0,1)});v({target:"Array",proto:!0,forced:y||b},{includes:function(I){return g(this,I,arguments.length>1?arguments[1]:void 0)}}),x("includes")}),(function(T,P,a){"use strict";var v=a(3),g=a(85),p=a(59).indexOf,x=a(155),y=g([].indexOf),b=!!y&&1/y([1],1,-0)<0,A=b||!x("indexOf");v({target:"Array",proto:!0,forced:A},{indexOf:function(R){var O=arguments.length>1?arguments[1]:void 0;return b?y(this,R,O)||0:p(this,R,O)}})}),(function(T,P,a){"use strict";var v=a(3),g=a(88);v({target:"Array",stat:!0},{isArray:g})}),(function(T,P,a){"use strict";var v=a(12),g=a(146),p=a(139),x=a(51),y=a(44).f,b=a(177),A=a(180),I=a(36),R=a(6),O="Array Iterator",M=x.set,L=x.getterFor(O);T.exports=b(Array,"Array",function(N,F){M(this,{type:O,target:v(N),index:0,kind:F})},function(){var N=L(this),F=N.target,G=N.index++;if(!F||G>=F.length)return N.target=null,A(void 0,!0);switch(N.kind){case"keys":return A(G,!1);case"values":return A(F[G],!1)}return A([G,F[G]],!1)},"values");var D=p.Arguments=p.Array;if(g("keys"),g("values"),g("entries"),!I&&R&&D.name!=="values")try{y(D,"name",{value:"values"})}catch(N){}}),(function(T,P,a){"use strict";var v=a(3),g=a(8),p=a(36),x=a(49),y=a(21),b=a(178),A=a(135),I=a(119),R=a(82),O=a(43),M=a(47),L=a(33),D=a(139),N=a(179),F=x.PROPER,G=x.CONFIGURABLE,j=N.IteratorPrototype,X=N.BUGGY_SAFARI_ITERATORS,U=L("iterator"),V="keys",k="values",Y="entries",K=function(){return this};T.exports=function(J,Z,Q,at,et,rt,nt){b(Q,Z,at);var ut=function(It){if(It===et&&Et)return Et;if(!X&&It&&It in yt)return yt[It];switch(It){case V:return function(){return new Q(this,It)};case k:return function(){return new Q(this,It)};case Y:return function(){return new Q(this,It)}}return function(){return new Q(this)}},ht=Z+" Iterator",pt=!1,yt=J.prototype,At=yt[U]||yt["@@iterator"]||et&&yt[et],Et=!X&&At||ut(et),Ht=Z==="Array"&&yt.entries||At,Ut,kt,Ct;if(Ht&&(Ut=A(Ht.call(new J)),Ut!==Object.prototype&&Ut.next&&(!p&&A(Ut)!==j&&(I?I(Ut,j):y(Ut[U])||M(Ut,U,K)),R(Ut,ht,!0,!0),p&&(D[ht]=K))),F&&et===k&&At&&At.name!==k&&(!p&&G?O(yt,"name",k):(pt=!0,Et=function(){return g(At,this)})),et)if(kt={values:ut(k),keys:rt?Et:ut(V),entries:ut(Y)},nt)for(Ct in kt)(X||pt||!(Ct in yt))&&M(yt,Ct,kt[Ct]);else v({target:Z,proto:!0,forced:X||pt},kt);return(!p||nt)&&yt[U]!==Et&&M(yt,U,Et,{name:et}),D[Z]=Et,kt}}),(function(T,P,a){"use strict";var v=a(179).IteratorPrototype,g=a(71),p=a(11),x=a(82),y=a(139),b=function(){return this};T.exports=function(A,I,R,O){var M=I+" Iterator";return A.prototype=g(v,{next:p(+!O,R)}),x(A,M,!1,!0),y[M]=b,A}}),(function(T,P,a){"use strict";var v=a(7),g=a(21),p=a(20),x=a(71),y=a(135),b=a(47),A=a(33),I=a(36),R=A("iterator"),O=!1,M,L,D;[].keys&&(D=[].keys(),"next"in D?(L=y(y(D)),L!==Object.prototype&&(M=L)):O=!0);var N=!p(M)||v(function(){var F={};return M[R].call(F)!==F});N?M={}:I&&(M=x(M)),g(M[R])||b(M,R,function(){return this}),T.exports={IteratorPrototype:M,BUGGY_SAFARI_ITERATORS:O}}),(function(T){"use strict";T.exports=function(P,a){return{value:P,done:a}}}),(function(T,P,a){"use strict";var v=a(3),g=a(14),p=a(13),x=a(12),y=a(155),b=g([].join),A=p!==Object,I=A||!y("join",",");v({target:"Array",proto:!0,forced:I},{join:function(O){return b(x(this),O===void 0?",":O)}})}),(function(T,P,a){"use strict";var v=a(3),g=a(183);v({target:"Array",proto:!0,forced:g!==[].lastIndexOf},{lastIndexOf:g})}),(function(T,P,a){"use strict";var v=a(117),g=a(12),p=a(61),x=a(63),y=a(155),b=Math.min,A=[].lastIndexOf,I=!!A&&1/[1].lastIndexOf(1,-0)<0,R=y("lastIndexOf"),O=I||!R;T.exports=O?function(L){if(I)return v(A,this,arguments)||0;var D=g(this),N=x(D);if(N===0)return-1;var F=N-1;for(arguments.length>1&&(F=b(F,p(arguments[1]))),F<0&&(F=N+F);F>=0;F--)if(F in D&&D[F]===L)return F||0;return-1}:A}),(function(T,P,a){"use strict";var v=a(3),g=a(83).map,p=a(150),x=p("map");v({target:"Array",proto:!0,forced:!x},{map:function(b){return g(this,b,arguments.length>1?arguments[1]:void 0)}})}),(function(T,P,a){"use strict";var v=a(3),g=a(7),p=a(89),x=a(90),y=a(149),b=Array,A=g(function(){function I(){}return!(b.of.call(I)instanceof I)});v({target:"Array",stat:!0,forced:A},{of:function(){for(var R=0,O=arguments.length,M=new(p(this)?this:b)(O);O>R;)x(M,R,arguments[R++]);return y(M,O),M}})}),(function(T,P,a){"use strict";var v=a(3),g=a(39),p=a(63),x=a(149),y=a(148),b=a(7),A=b(function(){return[].push.call({length:4294967296},1)!==4294967297}),I=function(){try{Object.defineProperty([],"length",{writable:!1}).push()}catch(O){return O instanceof TypeError}},R=A||!I();v({target:"Array",proto:!0,arity:1,forced:R},{push:function(M){var L=g(this),D=p(L),N=arguments.length;y(D+N);for(var F=0;F<N;F++)L[D]=arguments[F],D++;return x(L,D),D}})}),(function(T,P,a){"use strict";var v=a(3),g=a(188).left,p=a(155),x=a(27),y=a(189),b=!y&&x>79&&x<83,A=b||!p("reduce");v({target:"Array",proto:!0,forced:A},{reduce:function(R){var O=arguments.length;return g(this,R,O,O>1?arguments[1]:void 0)}})}),(function(T,P,a){"use strict";var v=a(30),g=a(39),p=a(13),x=a(63),y=TypeError,b="Reduce of empty array with no initial value",A=function(I){return function(R,O,M,L){var D=g(R),N=p(D),F=x(D);if(v(O),F===0&&M<2)throw new y(b);var G=I?F-1:0,j=I?-1:1;if(M<2)for(;;){if(G in N){L=N[G],G+=j;break}if(G+=j,I?G<0:F<=G)throw new y(b)}for(;I?G>=0:F>G;G+=j)G in N&&(L=O(L,N[G],G,D));return L}};T.exports={left:A(!1),right:A(!0)}}),(function(T,P,a){"use strict";var v=a(190);T.exports=v==="NODE"}),(function(T,P,a){"use strict";var v=a(4),g=a(28),p=a(15),x=function(y){return g.slice(0,y.length)===y};T.exports=(function(){return x("Bun/")?"BUN":x("Cloudflare-Workers")?"CLOUDFLARE":x("Deno/")?"DENO":x("Node.js/")?"NODE":v.Bun&&typeof Bun.version=="string"?"BUN":v.Deno&&typeof Deno.version=="object"?"DENO":p(v.process)==="process"?"NODE":v.window&&v.document?"BROWSER":"REST"})()}),(function(T,P,a){"use strict";var v=a(3),g=a(188).right,p=a(155),x=a(27),y=a(189),b=!y&&x>79&&x<83,A=b||!p("reduceRight");v({target:"Array",proto:!0,forced:A},{reduceRight:function(R){return g(this,R,arguments.length,arguments.length>1?arguments[1]:void 0)}})}),(function(T,P,a){"use strict";var v=a(3),g=a(14),p=a(88),x=g([].reverse),y=[1,2];v({target:"Array",proto:!0,forced:String(y)===String(y.reverse())},{reverse:function(){return p(this)&&(this.length=this.length),x(this)}})}),(function(T,P,a){"use strict";var v=a(3),g=a(88),p=a(89),x=a(20),y=a(60),b=a(63),A=a(12),I=a(90),R=a(149),O=a(33),M=a(150),L=a(76),D=M("slice"),N=O("species"),F=Array,G=Math.max;v({target:"Array",proto:!0,forced:!D},{slice:function(X,U){var V=A(this),k=b(V),Y=y(X,k),K=y(U===void 0?k:U,k),J,Z,Q;if(g(V)&&(J=V.constructor,p(J)&&(J===F||g(J.prototype))?J=void 0:x(J)&&(J=J[N],J===null&&(J=void 0)),J===F||J===void 0))return L(V,Y,K);for(Z=new(J===void 0?F:J)(G(K-Y,0)),Q=0;Y<K;Y++,Q++)Y in V&&I(Z,Q,V[Y]);return R(Z,Q),Z}})}),(function(T,P,a){"use strict";var v=a(3),g=a(83).some,p=a(155),x=p("some");v({target:"Array",proto:!0,forced:!x},{some:function(b){return g(this,b,arguments.length>1?arguments[1]:void 0)}})}),(function(T,P,a){"use strict";var v=a(3),g=a(14),p=a(30),x=a(39),y=a(63),b=a(153),A=a(68),I=a(7),R=a(196),O=a(155),M=a(197),L=a(198),D=a(27),N=a(199),F=[],G=g(F.sort),j=g(F.push),X=I(function(){F.sort(void 0)}),U=I(function(){F.sort(null)}),V=O("sort"),k=!I(function(){if(D)return D<70;if(!(M&&M>3)){if(L)return!0;if(N)return N<603;var J="",Z,Q,at,et;for(Z=65;Z<76;Z++){switch(Q=String.fromCharCode(Z),Z){case 66:case 69:case 70:case 72:at=3;break;case 68:case 71:at=4;break;default:at=2}for(et=0;et<47;et++)F.push({k:Q+et,v:at})}for(F.sort(function(rt,nt){return nt.v-rt.v}),et=0;et<F.length;et++)Q=F[et].k.charAt(0),J.charAt(J.length-1)!==Q&&(J+=Q);return J!=="DGBEFHACIJK"}}),Y=X||!U||!V||!k,K=function(J){return function(Z,Q){if(Q===void 0)return-1;if(Z===void 0)return 1;if(J!==void 0)return+J(Z,Q)||0;var at=A(Z),et=A(Q);return at===et?0:at>et?1:-1}};v({target:"Array",proto:!0,forced:Y},{sort:function(Z){Z!==void 0&&p(Z);var Q=x(this);if(k)return Z===void 0?G(Q):G(Q,Z);var at=[],et=y(Q),rt,nt;for(nt=0;nt<et;nt++)nt in Q&&j(at,Q[nt]);for(R(at,K(Z)),rt=y(at),nt=0;nt<rt;)Q[nt]=at[nt++];for(;nt<et;)b(Q,nt++);return Q}})}),(function(T,P,a){"use strict";var v=a(76),g=Math.floor,p=function(x,y){var b=x.length;if(b<8)for(var A=1,I,R;A<b;){for(R=A,I=x[A];R&&y(x[R-1],I)>0;)x[R]=x[--R];R!==A++&&(x[R]=I)}else for(var O=g(b/2),M=p(v(x,0,O),y),L=p(v(x,O),y),D=M.length,N=L.length,F=0,G=0;F<D||G<N;)x[F+G]=F<D&&G<N?y(M[F],L[G])<=0?M[F++]:L[G++]:F<D?M[F++]:L[G++];return x};T.exports=p}),(function(T,P,a){"use strict";var v=a(28),g=v.match(/firefox\/(\d+)/i);T.exports=!!g&&+g[1]}),(function(T,P,a){"use strict";var v=a(28);T.exports=/MSIE|Trident/.test(v)}),(function(T,P,a){"use strict";var v=a(28),g=v.match(/AppleWebKit\/(\d+)\./);T.exports=!!g&&+g[1]}),(function(T,P,a){"use strict";var v=a(201);v("Array")}),(function(T,P,a){"use strict";var v=a(23),g=a(77),p=a(33),x=a(6),y=p("species");T.exports=function(b){var A=v(b);x&&A&&!A[y]&&g(A,y,{configurable:!0,get:function(){return this}})}}),(function(T,P,a){"use strict";var v=a(3),g=a(39),p=a(60),x=a(61),y=a(63),b=a(149),A=a(148),I=a(86),R=a(90),O=a(153),M=a(150),L=M("splice"),D=Math.max,N=Math.min;v({target:"Array",proto:!0,forced:!L},{splice:function(G,j){var X=g(this),U=y(X),V=p(G,U),k=arguments.length,Y,K,J,Z,Q,at;for(k===0?Y=K=0:k===1?(Y=0,K=U-V):(Y=k-2,K=N(D(x(j),0),U-V)),A(U+Y-K),J=I(X,K),Z=0;Z<K;Z++)Q=V+Z,Q in X&&R(J,Z,X[Q]);if(b(J,K),Y<K){for(Z=V;Z<U-K;Z++)Q=Z+K,at=Z+Y,Q in X?X[at]=X[Q]:O(X,at);for(Z=U;Z>U-K+Y;Z--)O(X,Z-1)}else if(Y>K)for(Z=U-K;Z>V;Z--)Q=Z+K-1,at=Z+Y-1,Q in X?X[at]=X[Q]:O(X,at);for(Z=0;Z<Y;Z++)X[Z+V]=arguments[Z+2];return b(X,U-K+Y),J}})}),(function(T,P,a){"use strict";var v=a(3),g=a(63),p=a(12),x=a(90),y=a(146),b=Array;v({target:"Array",proto:!0},{toReversed:function(){for(var I=p(this),R=g(I),O=new b(R),M=0;M<R;M++)x(O,M,I[R-M-1]);return O}}),y("toReversed")}),(function(T,P,a){"use strict";var v=a(3),g=a(14),p=a(30),x=a(12),y=a(205),b=a(206),A=a(146),I=Array,R=g(b("Array","sort"));v({target:"Array",proto:!0},{toSorted:function(M){M!==void 0&&p(M);var L=x(this),D=y(I,L);return R(D,M)}}),A("toSorted")}),(function(T,P,a){"use strict";var v=a(63);T.exports=function(g,p,x){for(var y=0,b=arguments.length>2?x:v(p),A=new g(b);b>y;)A[y]=p[y++];return A}}),(function(T,P,a){"use strict";var v=a(4);T.exports=function(g,p){var x=v[g],y=x&&x.prototype;return y&&y[p]}}),(function(T,P,a){"use strict";var v=a(3),g=a(146),p=a(148),x=a(63),y=a(60),b=a(12),A=a(61),I=a(90),R=Array,O=Math.max,M=Math.min;v({target:"Array",proto:!0},{toSpliced:function(D,N){var F=b(this),G=x(F),j=y(D,G),X=arguments.length,U=0,V,k,Y,K;for(X===0?V=k=0:X===1?(V=0,k=G-j):(V=X-2,k=M(O(A(N),0),G-j)),Y=p(G+V-k),K=R(Y);U<j;U++)I(K,U,F[U]);for(;U<j+V;U++)I(K,U,arguments[U-j+2]);for(;U<Y;U++)I(K,U,F[U+k-V]);return K}}),g("toSpliced")}),(function(T,P,a){"use strict";var v=a(146);v("flat")}),(function(T,P,a){"use strict";var v=a(146);v("flatMap")}),(function(T,P,a){"use strict";var v=a(3),g=a(39),p=a(63),x=a(149),y=a(153),b=a(148),A=[].unshift(0)!==1,I=function(){try{Object.defineProperty([],"length",{writable:!1}).unshift()}catch(O){return O instanceof TypeError}},R=A||!I();v({target:"Array",proto:!0,arity:1,forced:R},{unshift:function(M){var L=g(this),D=p(L),N=arguments.length;if(N){b(D+N);for(var F=D;F--;){var G=F+N;F in L?L[G]=L[F]:y(L,G)}for(var j=0;j<N;j++)L[j]=arguments[j]}return x(L,D+N)}})}),(function(T,P,a){"use strict";var v=a(3),g=a(63),p=a(61),x=a(12),y=a(90),b=Array,A=RangeError,I=(function(){try{[].with({valueOf:function(){throw 4}},null)}catch(R){return R!==4}})();v({target:"Array",proto:!0,forced:I},{with:function(R,O){var M=x(this),L=g(M),D=p(R),N=D<0?L+D:D;if(N>=L||N<0)throw new A("Incorrect index");for(var F=new b(L),G=0;G<L;G++)y(F,G,G===N?O:M[G]);return F}})}),(function(T,P,a){"use strict";var v=a(3),g=a(4),p=a(213),x=a(201),y="ArrayBuffer",b=p[y],A=g[y];v({global:!0,constructor:!0,forced:A!==b},{ArrayBuffer:b}),x(y)}),(function(T,P,a){"use strict";var v=a(4),g=a(14),p=a(6),x=a(214),y=a(49),b=a(43),A=a(77),I=a(215),R=a(7),O=a(216),M=a(61),L=a(217),D=a(218),N=a(222),F=a(135),G=a(119),j=a(157),X=a(76),U=a(124),V=a(55),k=a(82),Y=a(51),K=y.PROPER,J=y.CONFIGURABLE,Z="ArrayBuffer",Q="DataView",at="prototype",et="Wrong length",rt="Wrong index",nt=Y.getterFor(Z),ut=Y.getterFor(Q),ht=Y.set,pt=v[Z],yt=pt,At=yt&&yt[at],Et=v[Q],Ht=Et&&Et[at],Ut=Object.prototype,kt=v.Array,Ct=v.RangeError,It=g(j),Dt=g([].reverse),Vt=N.pack,_t=N.unpack,Nt=function(Pt){return[Pt&255]},Jt=function(Pt){return[Pt&255,Pt>>8&255]},ne=function(Pt){return[Pt&255,Pt>>8&255,Pt>>16&255,Pt>>24&255]},ve=function(Pt){return Pt[3]<<24|Pt[2]<<16|Pt[1]<<8|Pt[0]},le=function(Pt){return Vt(D(Pt),23,4)},fe=function(Pt){return Vt(Pt,52,8)},Ce=function(Pt,zt,jt){A(Pt[at],zt,{configurable:!0,get:function(){return jt(this)[zt]}})},Be=function(Pt,zt,jt,we){var $t=ut(Pt),Xt=L(jt),re=!!we;if(Xt+zt>$t.byteLength)throw new Ct(rt);var oe=$t.bytes,pe=Xt+$t.byteOffset,rn=X(oe,pe,pe+zt);return re?rn:Dt(rn)},Ie=function(Pt,zt,jt,we,$t,Xt){var re=ut(Pt),oe=L(jt),pe=we(+$t),rn=!!Xt;if(oe+zt>re.byteLength)throw new Ct(rt);for(var vt=re.bytes,Rt=oe+re.byteOffset,Tt=0;Tt<zt;Tt++)vt[Rt+Tt]=pe[rn?Tt:zt-Tt-1]};if(!x)yt=function(zt){O(this,At);var jt=L(zt);ht(this,{type:Z,bytes:It(kt(jt),0),byteLength:jt}),p||(this.byteLength=jt,this.detached=!1)},At=yt[at],Et=function(zt,jt,we){O(this,Ht),O(zt,At);var $t=nt(zt),Xt=$t.byteLength,re=M(jt);if(re<0||re>Xt)throw new Ct("Wrong offset");if(we=we===void 0?Xt-re:L(we),re+we>Xt)throw new Ct(et);ht(this,{type:Q,buffer:zt,byteLength:we,byteOffset:re,bytes:$t.bytes}),p||(this.buffer=zt,this.byteLength=we,this.byteOffset=re)},Ht=Et[at],p&&(Ce(yt,"byteLength",nt),Ce(Et,"buffer",ut),Ce(Et,"byteLength",ut),Ce(Et,"byteOffset",ut)),I(Ht,{getInt8:function(zt){return Be(this,1,zt)[0]<<24>>24},getUint8:function(zt){return Be(this,1,zt)[0]},getInt16:function(zt){var jt=Be(this,2,zt,arguments.length>1?arguments[1]:!1);return(jt[1]<<8|jt[0])<<16>>16},getUint16:function(zt){var jt=Be(this,2,zt,arguments.length>1?arguments[1]:!1);return jt[1]<<8|jt[0]},getInt32:function(zt){return ve(Be(this,4,zt,arguments.length>1?arguments[1]:!1))},getUint32:function(zt){return ve(Be(this,4,zt,arguments.length>1?arguments[1]:!1))>>>0},getFloat32:function(zt){return _t(Be(this,4,zt,arguments.length>1?arguments[1]:!1),23)},getFloat64:function(zt){return _t(Be(this,8,zt,arguments.length>1?arguments[1]:!1),52)},setInt8:function(zt,jt){Ie(this,1,zt,Nt,jt)},setUint8:function(zt,jt){Ie(this,1,zt,Nt,jt)},setInt16:function(zt,jt){Ie(this,2,zt,Jt,jt,arguments.length>2?arguments[2]:!1)},setUint16:function(zt,jt){Ie(this,2,zt,Jt,jt,arguments.length>2?arguments[2]:!1)},setInt32:function(zt,jt){Ie(this,4,zt,ne,jt,arguments.length>2?arguments[2]:!1)},setUint32:function(zt,jt){Ie(this,4,zt,ne,jt,arguments.length>2?arguments[2]:!1)},setFloat32:function(zt,jt){Ie(this,4,zt,le,jt,arguments.length>2?arguments[2]:!1)},setFloat64:function(zt,jt){Ie(this,8,zt,fe,jt,arguments.length>2?arguments[2]:!1)}});else{var ce=K&&pt.name!==Z;!R(function(){pt(1)})||!R(function(){new pt(-1)})||R(function(){return new pt,new pt(1.5),new pt(NaN),pt.length!==1||ce&&!J})?(yt=function(zt){return O(this,At),U(new pt(L(zt)),this,yt)},yt[at]=At,At.constructor=yt,V(yt,pt)):ce&&J&&b(pt,"name",Z),G&&F(Ht)!==Ut&&G(Ht,Ut);var xe=new Et(new yt(2)),Ue=g(Ht.setInt8);xe.setInt8(0,2147483648),xe.setInt8(1,2147483649),(xe.getInt8(0)||!xe.getInt8(1))&&I(Ht,{setInt8:function(zt,jt){Ue(this,zt,jt<<24>>24)},setUint8:function(zt,jt){Ue(this,zt,jt<<24>>24)}},{unsafe:!0})}k(yt,Z),k(Et,Q),T.exports={ArrayBuffer:yt,DataView:Et}}),(function(T){"use strict";T.exports=typeof ArrayBuffer!="undefined"&&typeof DataView!="undefined"}),(function(T,P,a){"use strict";var v=a(47);T.exports=function(g,p,x){for(var y in p)v(g,y,p[y],x);return g}}),(function(T,P,a){"use strict";var v=a(24),g=TypeError;T.exports=function(p,x){if(v(x,p))return p;throw new g("Incorrect invocation")}}),(function(T,P,a){"use strict";var v=a(61),g=a(64),p=RangeError;T.exports=function(x){if(x===void 0)return 0;var y=v(x),b=g(y);if(y!==b)throw new p("Wrong length or index");return b}}),(function(T,P,a){"use strict";var v=a(219),g=11920928955078125e-23,p=34028234663852886e22,x=11754943508222875e-54;T.exports=Math.fround||function(b){return v(b,g,p,x)}}),(function(T,P,a){"use strict";var v=a(220),g=a(221),p=Math.abs,x=2220446049250313e-31;T.exports=function(y,b,A,I){var R=+y,O=p(R),M=v(R);if(O<I)return M*g(O/I/b)*I*b;var L=(1+b/x)*O,D=L-(L-O);return D>A||D!==D?M*(1/0):M*D}}),(function(T){"use strict";T.exports=Math.sign||function(a){var v=+a;return v===0||v!==v?v:v<0?-1:1}}),(function(T){"use strict";var P=2220446049250313e-31,a=1/P;T.exports=function(v){return v+a-a}}),(function(T){"use strict";var P=Array,a=Math.abs,v=Math.pow,g=Math.floor,p=Math.log,x=Math.LN2,y=function(A,I,R){var O=P(R),M=R*8-I-1,L=(1<<M)-1,D=L>>1,N=I===23?v(2,-24)-v(2,-77):0,F=A<0||A===0&&1/A<0?1:0,G=0,j,X,U;for(A=a(A),A!==A||A===1/0?(X=A!==A?1:0,j=L):(j=g(p(A)/x),U=v(2,-j),A*U<1&&(j--,U*=2),j+D>=1?A+=N/U:A+=N*v(2,1-D),A*U>=2&&(j++,U/=2),j+D>=L?(X=0,j=L):j+D>=1?(X=(A*U-1)*v(2,I),j+=D):(X=A*v(2,D-1)*v(2,I),j=0));I>=8;)O[G++]=X&255,X/=256,I-=8;for(j=j<<I|X,M+=I;M>0;)O[G++]=j&255,j/=256,M-=8;return O[G-1]|=F*128,O},b=function(A,I){var R=A.length,O=R*8-I-1,M=(1<<O)-1,L=M>>1,D=O-7,N=R-1,F=A[N--],G=F&127,j;for(F>>=7;D>0;)G=G*256+A[N--],D-=8;for(j=G&(1<<-D)-1,G>>=-D,D+=I;D>0;)j=j*256+A[N--],D-=8;if(G===0)G=1-L;else{if(G===M)return j?NaN:F?-1/0:1/0;j+=v(2,I),G-=L}return(F?-1:1)*j*v(2,G-I)};T.exports={pack:y,unpack:b}}),(function(T,P,a){"use strict";var v=a(3),g=a(224),p=g.NATIVE_ARRAY_BUFFER_VIEWS;v({target:"ArrayBuffer",stat:!0,forced:!p},{isView:g.isView})}),(function(T,P,a){"use strict";var v=a(214),g=a(6),p=a(4),x=a(21),y=a(20),b=a(38),A=a(69),I=a(31),R=a(43),O=a(47),M=a(77),L=a(24),D=a(135),N=a(119),F=a(33),G=a(40),j=a(51),X=j.enforce,U=j.get,V=p.Int8Array,k=V&&V.prototype,Y=p.Uint8ClampedArray,K=Y&&Y.prototype,J=V&&D(V),Z=k&&D(k),Q=Object.prototype,at=p.TypeError,et=F("toStringTag"),rt=G("TYPED_ARRAY_TAG"),nt="TypedArrayConstructor",ut=v&&!!N&&A(p.opera)!=="Opera",ht=!1,pt,yt,At,Et={Int8Array:1,Uint8Array:1,Uint8ClampedArray:1,Int16Array:2,Uint16Array:2,Int32Array:4,Uint32Array:4,Float32Array:4,Float64Array:8},Ht={BigInt64Array:8,BigUint64Array:8},Ut=function(Jt){if(!y(Jt))return!1;var ne=A(Jt);return ne==="DataView"||b(Et,ne)||b(Ht,ne)},kt=function(Nt){var Jt=D(Nt);if(y(Jt)){var ne=U(Jt);return ne&&b(ne,nt)?ne[nt]:kt(Jt)}},Ct=function(Nt){if(!y(Nt))return!1;var Jt=A(Nt);return b(Et,Jt)||b(Ht,Jt)},It=function(Nt){if(Ct(Nt))return Nt;throw new at("Target is not a typed array")},Dt=function(Nt){if(x(Nt)&&(!N||L(J,Nt)))return Nt;throw new at(I(Nt)+" is not a typed array constructor")},Vt=function(Nt,Jt,ne,ve){if(g){if(ne)for(var le in Et){var fe=p[le];if(fe&&b(fe.prototype,Nt))try{delete fe.prototype[Nt]}catch(Ce){try{fe.prototype[Nt]=Jt}catch(Be){}}}(!Z[Nt]||ne)&&O(Z,Nt,ne?Jt:ut&&k[Nt]||Jt,ve)}},_t=function(Nt,Jt,ne){var ve,le;if(g){if(N){if(ne){for(ve in Et)if(le=p[ve],le&&b(le,Nt))try{delete le[Nt]}catch(fe){}}if(!J[Nt]||ne)try{return O(J,Nt,ne?Jt:ut&&J[Nt]||Jt)}catch(fe){}else return}for(ve in Et)le=p[ve],le&&(!le[Nt]||ne)&&O(le,Nt,Jt)}};for(pt in Et)yt=p[pt],At=yt&&yt.prototype,At?X(At)[nt]=yt:ut=!1;for(pt in Ht)yt=p[pt],At=yt&&yt.prototype,At&&(X(At)[nt]=yt);if((!ut||!x(J)||J===Function.prototype)&&(J=function(){throw new at("Incorrect invocation")},ut))for(pt in Et)p[pt]&&N(p[pt],J);if((!ut||!Z||Z===Q)&&(Z=J.prototype,ut))for(pt in Et)p[pt]&&N(p[pt].prototype,Z);if(ut&&D(K)!==Z&&N(K,Z),g&&!b(Z,et)){ht=!0,M(Z,et,{configurable:!0,get:function(){return y(this)?this[rt]:void 0}});for(pt in Et)p[pt]&&R(p[pt].prototype,rt,pt)}T.exports={NATIVE_ARRAY_BUFFER_VIEWS:ut,TYPED_ARRAY_TAG:ht&&rt,aTypedArray:It,aTypedArrayConstructor:Dt,exportTypedArrayMethod:Vt,exportTypedArrayStaticMethod:_t,getTypedArrayConstructor:kt,isView:Ut,isTypedArray:Ct,TypedArray:J,TypedArrayPrototype:Z}}),(function(T,P,a){"use strict";var v=a(3),g=a(85),p=a(7),x=a(213),y=a(46),b=a(60),A=a(64),I=x.ArrayBuffer,R=x.DataView,O=R.prototype,M=g(I.prototype.slice),L=g(O.getUint8),D=g(O.setUint8),N=p(function(){return!new I(2).slice(1,void 0).byteLength});v({target:"ArrayBuffer",proto:!0,unsafe:!0,forced:N},{slice:function(G,j){if(M&&j===void 0)return M(y(this),G);for(var X=y(this).byteLength,U=b(G,X),V=b(j===void 0?X:j,X),k=new I(A(V-U)),Y=new R(this),K=new R(k),J=0;U<V;)D(K,J++,L(Y,U++));return k}})}),(function(T,P,a){"use strict";a(227)}),(function(T,P,a){"use strict";var v=a(3),g=a(213),p=a(214);v({global:!0,constructor:!0,forced:!p},{DataView:g.DataView})}),(function(T,P,a){"use strict";var v=a(3),g=a(14),p=Math.pow,x=31,y=1023,b=p(2,-24),A=.0009765625,I=function(O){var M=O>>>15,L=O>>>10&x,D=O&y;return L===x?D===0?M===0?1/0:-1/0:NaN:L===0?D*(M===0?b:-b):p(2,L-15)*(M===0?1+D*A:-1-D*A)},R=g(DataView.prototype.getUint16);v({target:"DataView",proto:!0},{getFloat16:function(M){return I(R(this,M,arguments.length>1?arguments[1]:!1))}})}),(function(T,P,a){"use strict";var v=a(3),g=a(14),p=a(230),x=a(217),y=a(231),b=a(221),A=Math.floor,I=Math.pow,R=65520,O=61005353927612305e-21,M=16777216,L=1024,D=function(F){if(F!==F)return 32256;if(F===0)return(1/F===-1/0)<<15;var G=F<0;if(G&&(F=-F),F>=R)return G<<15|31744;if(F<O)return G<<15|b(F*M);var j=A(y(F));if(j===-15)return G<<15|L;var X=b((F*I(2,-j)-1)*L);return X===L?G<<15|j+16<<10:G<<15|j+15<<10|X},N=g(DataView.prototype.setUint16);v({target:"DataView",proto:!0},{setFloat16:function(G,j){N(p(this),x(G),D(+j),arguments.length>2?arguments[2]:!1)}})}),(function(T,P,a){"use strict";var v=a(69),g=TypeError;T.exports=function(p){if(v(p)==="DataView")return p;throw new g("Argument is not a DataView")}}),(function(T){"use strict";var P=Math.log,a=Math.LN2;T.exports=Math.log2||function(g){return P(g)/a}}),(function(T,P,a){"use strict";var v=a(6),g=a(77),p=a(233),x=ArrayBuffer.prototype;v&&!("detached"in x)&&g(x,"detached",{configurable:!0,get:function(){return p(this)}})}),(function(T,P,a){"use strict";var v=a(4),g=a(214),p=a(234),x=v.DataView;T.exports=function(y){if(!g||p(y)!==0)return!1;try{return new x(y),!1}catch(b){return!0}}}),(function(T,P,a){"use strict";var v=a(4),g=a(120),p=a(15),x=v.ArrayBuffer,y=v.TypeError;T.exports=x&&g(x.prototype,"byteLength","get")||function(b){if(p(b)!=="ArrayBuffer")throw new y("ArrayBuffer expected");return b.byteLength}}),(function(T,P,a){"use strict";var v=a(3),g=a(236);g&&v({target:"ArrayBuffer",proto:!0},{transfer:function(){return g(this,arguments.length?arguments[0]:void 0,!0)}})}),(function(T,P,a){"use strict";var v=a(4),g=a(14),p=a(120),x=a(217),y=a(237),b=a(234),A=a(238),I=a(240),R=v.structuredClone,O=v.ArrayBuffer,M=v.DataView,L=Math.max,D=Math.min,N=O.prototype,F=M.prototype,G=g(N.slice),j=p(N,"resizable","get"),X=p(N,"maxByteLength","get"),U=g(F.getInt8),V=g(F.setInt8);T.exports=(I||A)&&function(k,Y,K){var J=b(k),Z=Y===void 0?J:x(Y),Q=!j||!j(k),at;if(y(k),I&&(k=R(k,{transfer:[k]}),J===Z&&(K||Q)))return k;if(J>=Z&&(!K||Q))at=G(k,0,Z);else{var et=K&&!Q&&X?{maxByteLength:L(Z,X(k))}:void 0;at=new O(Z,et);for(var rt=new M(k),nt=new M(at),ut=D(Z,J),ht=0;ht<ut;ht++)V(nt,ht,U(rt,ht))}return I||A(k),at}}),(function(T,P,a){"use strict";var v=a(233),g=TypeError;T.exports=function(p){if(v(p))throw new g("ArrayBuffer is detached");return p}}),(function(T,P,a){"use strict";var v=a(4),g=a(239),p=a(240),x=v.structuredClone,y=v.ArrayBuffer,b=v.MessageChannel,A=!1,I,R,O,M;if(p)A=function(L){x(L,{transfer:[L]})};else if(y)try{b||(I=g("worker_threads"),I&&(b=I.MessageChannel)),b&&(R=new b,O=new y(2),M=function(L){R.port1.postMessage(null,[L])},O.byteLength===2&&(M(O),O.byteLength===0&&(A=M)))}catch(L){}T.exports=A}),(function(T,P,a){"use strict";var v=a(4),g=a(189);T.exports=function(p){if(g){try{return v.process.getBuiltinModule(p)}catch(x){}try{return Function('return require("'+p+'")')()}catch(x){}}}}),(function(T,P,a){"use strict";var v=a(4),g=a(7),p=a(27),x=a(190),y=v.structuredClone;T.exports=!!y&&!g(function(){if(x==="DENO"&&p>92||x==="NODE"&&p>94||x==="BROWSER"&&p>97)return!1;var b=new ArrayBuffer(8),A=y(b,{transfer:[b]});return b.byteLength!==0||A.byteLength!==8})}),(function(T,P,a){"use strict";var v=a(3),g=a(236);g&&v({target:"ArrayBuffer",proto:!0},{transferToFixedLength:function(){return g(this,arguments.length?arguments[0]:void 0,!1)}})}),(function(T,P,a){"use strict";var v=a(3),g=a(14),p=a(7),x=p(function(){return new Date(16e11).getYear()!==120}),y=g(Date.prototype.getFullYear);v({target:"Date",proto:!0,forced:x},{getYear:function(){return y(this)-1900}})}),(function(T,P,a){"use strict";var v=a(3),g=a(14),p=Date,x=g(p.prototype.getTime);v({target:"Date",stat:!0},{now:function(){return x(new p)}})}),(function(T,P,a){"use strict";var v=a(3),g=a(14),p=a(61),x=Date.prototype,y=g(x.getTime),b=g(x.setFullYear);v({target:"Date",proto:!0},{setYear:function(I){y(this);var R=+I;if(R!==R)return b(this,R);var O=p(R),M=O>=0&&O<=99?O+1900:O;return b(this,M)}})}),(function(T,P,a){"use strict";var v=a(3);v({target:"Date",proto:!0},{toGMTString:Date.prototype.toUTCString})}),(function(T,P,a){"use strict";var v=a(3),g=a(247);v({target:"Date",proto:!0,forced:Date.prototype.toISOString!==g},{toISOString:g})}),(function(T,P,a){"use strict";var v=a(14),g=a(7),p=a(248).start,x=RangeError,y=isFinite,b=Math.abs,A=Date.prototype,I=A.toISOString,R=v(A.getTime),O=v(A.getUTCDate),M=v(A.getUTCFullYear),L=v(A.getUTCHours),D=v(A.getUTCMilliseconds),N=v(A.getUTCMinutes),F=v(A.getUTCMonth),G=v(A.getUTCSeconds);T.exports=g(function(){return I.call(new Date(-50000000000001))!=="0385-07-25T07:06:39.999Z"})||!g(function(){I.call(new Date(NaN))})?function(){if(!y(R(this)))throw new x("Invalid time value");var X=this,U=M(X),V=D(X),k=U<0?"-":U>9999?"+":"";return k+p(b(U),k?6:4,0)+"-"+p(F(X)+1,2,0)+"-"+p(O(X),2,0)+"T"+p(L(X),2,0)+":"+p(N(X),2,0)+":"+p(G(X),2,0)+"."+p(V,3,0)+"Z"}:I}),(function(T,P,a){"use strict";var v=a(14),g=a(64),p=a(68),x=a(249),y=a(16),b=v(x),A=v("".slice),I=Math.ceil,R=function(O){return function(M,L,D){var N=p(y(M)),F=g(L),G=N.length;if(F<=G)return N;var j=D===void 0?" ":p(D),X,U;return j===""?N:(X=F-G,U=b(j,I(X/j.length)),U.length>X&&(U=A(U,0,X)),O?N+U:U+N)}};T.exports={start:R(!1),end:R(!0)}}),(function(T,P,a){"use strict";var v=a(61),g=a(68),p=a(16),x=RangeError,y=Math.floor;T.exports=function(A){var I=g(p(this)),R="",O=v(A);if(O<0||O===1/0)throw new x("Wrong number of repetitions");for(;O>0;(O=y(O/2))&&(I+=I))O%2&&(R+=I);return R}}),(function(T,P,a){"use strict";var v=a(3),g=a(7),p=a(39),x=a(19),y=g(function(){return new Date(NaN).toJSON()!==null||Date.prototype.toJSON.call({toISOString:function(){return 1}})!==1});v({target:"Date",proto:!0,forced:y},{toJSON:function(A){var I=p(this),R=x(I,"number");return typeof R=="number"&&!isFinite(R)?null:I.toISOString()}})}),(function(T,P,a){"use strict";var v=a(38),g=a(47),p=a(252),x=a(33),y=x("toPrimitive"),b=Date.prototype;v(b,y)||g(b,y,p)}),(function(T,P,a){"use strict";var v=a(46),g=a(32),p=TypeError;T.exports=function(x){if(v(this),x==="string"||x==="default")x="string";else if(x!=="number")throw new p("Incorrect hint");return g(this,x)}}),(function(T,P,a){"use strict";var v=a(14),g=a(47),p=Date.prototype,x="Invalid Date",y="toString",b=v(p[y]),A=v(p.getTime);String(new Date(NaN))!==x&&g(p,y,function(){var R=A(this);return R===R?b(this):x})}),(function(T,P,a){"use strict";var v=a(3),g=a(6),p=a(23),x=a(30),y=a(216),b=a(47),A=a(215),I=a(77),R=a(33),O=a(51),M=a(255),L=p("SuppressedError"),D=ReferenceError,N=R("dispose"),F=R("toStringTag"),G="DisposableStack",j=O.set,X=O.getterFor(G),U="sync-dispose",V="disposed",k="pending",Y=function(Z){var Q=X(Z);if(Q.state===V)throw new D(G+" already disposed");return Q},K=function(){j(y(this,J),{type:G,state:k,stack:[]}),g||(this.disposed=!1)},J=K.prototype;A(J,{dispose:function(){var Q=X(this);if(Q.state!==V){Q.state=V,g||(this.disposed=!0);for(var at=Q.stack,et=at.length,rt=!1,nt;et;){var ut=at[--et];at[et]=null;try{ut()}catch(ht){rt?nt=new L(ht,nt):(rt=!0,nt=ht)}}if(Q.stack=null,rt)throw nt}},use:function(Q){return M(Y(this),Q,U),Q},adopt:function(Q,at){var et=Y(this);return x(at),M(et,void 0,U,function(){at(Q)}),Q},defer:function(Q){var at=Y(this);x(Q),M(at,void 0,U,Q)},move:function(){var Q=Y(this),at=new K;return X(at).stack=Q.stack,Q.stack=[],Q.state=V,g||(this.disposed=!0),at}}),g&&I(J,"disposed",{configurable:!0,get:function(){return X(this).state===V}}),b(J,N,J.dispose,{name:"dispose"}),b(J,F,G,{nonWritable:!0}),v({global:!0,constructor:!0},{DisposableStack:K})}),(function(T,P,a){"use strict";var v=a(23),g=a(8),p=a(14),x=a(84),y=a(46),b=a(30),A=a(17),I=a(29),R=a(33),O=R("asyncDispose"),M=R("dispose"),L=p([].push),D=function(F,G){if(G==="async-dispose"){var j=I(F,O);return j!==void 0||(j=I(F,M),j===void 0)?j:function(){var X=this,U=v("Promise");return new U(function(V){g(j,X),V(void 0)})}}return I(F,M)},N=function(F,G,j){return arguments.length<3&&!A(F)&&(j=b(D(y(F),G))),j===void 0?function(){}:x(j,F)};T.exports=function(F,G,j,X){var U;if(arguments.length<4){if(A(G)&&j==="sync-dispose")return;U=N(G,j)}else U=N(void 0,j,X);L(F.stack,U)}}),(function(T,P,a){"use strict";var v=a(3),g=a(14),p=a(68),x=g("".charAt),y=g("".charCodeAt),b=g(/./.exec),A=g(1.1.toString),I=g("".toUpperCase),R=g([].join),O=Array,M=/[\w*+\-./@]/,L=function(D,N){for(var F=A(D,16);F.length<N;)F="0"+F;return F};v({global:!0},{escape:function(N){var F=p(N),G=F.length,j=O(G),X,U,V;for(X=0;X<G;X++)U=x(F,X),b(M,U)?j[X]=U:(V=y(U,0),V<256?j[X]="%"+I(L(V,2)):j[X]="%u"+I(L(V,4)));return R(j,"")}})}),(function(T,P,a){"use strict";var v=a(3),g=a(258);v({target:"Function",proto:!0,forced:Function.bind!==g},{bind:g})}),(function(T,P,a){"use strict";var v=a(14),g=a(30),p=a(20),x=a(38),y=a(76),b=a(9),A=Function,I=v([].concat),R=v([].join),O={},M=function(L,D,N){if(!x(O,D)){for(var F=[],G=0;G<D;G++)F[G]="a["+G+"]";O[D]=A("C,a","return new C("+R(F,",")+")")}return O[D](L,N)};T.exports=b?A.bind:function(D){var N=g(this),F=N.prototype,G=y(arguments,1),j=function(){var U=I(G,y(arguments));return this instanceof j?M(N,U.length,U):N.apply(D,U)};return p(F)&&(j.prototype=F),j}}),(function(T,P,a){"use strict";var v=a(21),g=a(20),p=a(44),x=a(24),y=a(33),b=a(48),A=y("hasInstance"),I=Function.prototype;A in I||p.f(I,A,{value:b(function(R){if(!v(this)||!g(R))return!1;var O=this.prototype;return g(O)?x(O,R):R instanceof this},A)})}),(function(T,P,a){"use strict";var v=a(6),g=a(49).EXISTS,p=a(14),x=a(77),y=Function.prototype,b=p(y.toString),A=/function\b(?:\s|\/\*[\S\s]*?\*\/|\/\/[^\n\r]*[\n\r]+)*([^\s(/]*)/,I=p(A.exec),R="name";v&&!g&&x(y,R,{configurable:!0,get:function(){try{return I(A,b(this))[1]}catch(O){return""}}})}),(function(T,P,a){"use strict";var v=a(3),g=a(4);v({global:!0,forced:g.globalThis!==g},{globalThis:g})}),(function(T,P,a){"use strict";var v=a(3),g=a(4),p=a(216),x=a(46),y=a(21),b=a(135),A=a(77),I=a(90),R=a(7),O=a(38),M=a(33),L=a(179).IteratorPrototype,D=a(6),N=a(36),F="constructor",G="Iterator",j=M("toStringTag"),X=TypeError,U=g[G],V=N||!y(U)||U.prototype!==L||!R(function(){U({})}),k=function(){if(p(this,L),b(this)===L)throw new X("Abstract class Iterator not directly constructable")},Y=function(K,J){D?A(L,K,{configurable:!0,get:function(){return J},set:function(Z){if(x(this),this===L)throw new X("You can't redefine this property");O(this,K)?this[K]=Z:I(this,K,Z)}}):L[K]=J};O(L,j)||Y(j,G),(V||!O(L,F)||L[F]===Object)&&Y(F,k),k.prototype=L,v({global:!0,constructor:!0,forced:V},{Iterator:k})}),(function(T,P,a){"use strict";var v=a(3),g=a(8),p=a(30),x=a(46),y=a(141),b=a(264),A=a(36),I=Array,R=b(function(){for(;;){var O=this.iterator;if(!O){var M=this.nextIterableIndex++,L=this.iterables;if(M>=L.length){this.done=!0;return}var D=L[M];this.iterables[M]=null,O=this.iterator=x(g(D.method,D.iterable)),this.next=O.next}var N=x(g(this.next,O));if(N.done){this.iterator=null,this.next=null;continue}return N.value}});v({target:"Iterator",stat:!0,forced:A},{concat:function(){for(var M=arguments.length,L=I(M),D=0;D<M;D++){var N=x(arguments[D]);L[D]={iterable:N,method:p(y(N))}}return new R({iterables:L,nextIterableIndex:0,iterator:null,next:null})}})}),(function(T,P,a){"use strict";var v=a(8),g=a(71),p=a(43),x=a(215),y=a(33),b=a(51),A=a(29),I=a(179).IteratorPrototype,R=a(180),O=a(142),M=a(265),L=a(266),D=y("toStringTag"),N="IteratorHelper",F="WrapForValidIterator",G="normal",j="throw",X=b.set,U=function(Y){var K=b.getterFor(Y?F:N);return x(g(I),{next:function(){var Z=K(this);if(Y)return Z.nextHandler();if(Z.done)return R(void 0,!0);try{var Q=Z.nextHandler();return Z.done&&L(Z),Z.returnHandlerResult?Q:R(Q,Z.done)}catch(at){throw Z.done=!0,L(Z),at}},return:function(){var J=K(this),Z=J.iterator,Q=J.inner,at=J.openIters,et=J.done;if(J.done=!0,Y){var rt=A(Z,"return");return rt?v(rt,Z):R(void 0,!0)}if(L(J),et)return R(void 0,!0);if(Q)try{O(Q.iterator,G)}catch(nt){return O(Z,j,nt)}if(at)try{M(at,G)}catch(nt){if(Z)return O(Z,j,nt);throw nt}return Z&&O(Z,G),R(void 0,!0)}})},V=U(!0),k=U(!1);p(k,D,"Iterator Helper"),T.exports=function(Y,K,J){var Z=function(at,et){et?(et.iterator=at.iterator,et.next=at.next):et=at,et.type=K?F:N,et.returnHandlerResult=!!J,et.nextHandler=Y,et.counter=0,et.done=!1,X(this,et)};return Z.prototype=K?V:k,Z}}),(function(T,P,a){"use strict";var v=a(142);T.exports=function(g,p,x){for(var y=g.length-1;y>=0;y--)if(g[y]!==void 0)try{x=v(g[y].iterator,p,x)}catch(b){p="throw",x=b}if(p==="throw")throw x;return x}}),(function(T){"use strict";T.exports=function(P){P.iterator=P.next=P.nextHandler=P.mapper=P.predicate=P.inner=P.iterables=P.iters=P.openIters=P.padding=P.finishResults=P.buffer=null}}),(function(T,P,a){"use strict";var v=a(8),g=a(47),p=a(29),x=a(38),y=a(33),b=a(179).IteratorPrototype,A=y("dispose");x(b,A)||g(b,A,function(){var I=p(this,"return");I&&v(I,this)})}),(function(T,P,a){"use strict";var v=a(3),g=a(8),p=a(46),x=a(269),y=a(270),b=a(271),A=a(142),I=a(264),R=a(272),O=a(273),M=a(36),L=RangeError,D=1/0,N=!M&&!R("drop",0),F=!M&&!N&&O("drop",RangeError),G=M||N||F||!(function(){try{Iterator.prototype.drop.call({next:function(){return{done:!0}}},9007199254740992)}catch(X){return X instanceof L}})(),j=I(function(){for(var X=this.iterator,U=this.next,V,k;this.remaining;)if(this.remaining--,V=p(g(U,X)),k=this.done=!!V.done,k)return;if(V=p(g(U,X)),k=this.done=!!V.done,!k)return V.value});v({target:"Iterator",proto:!0,real:!0,forced:G},{drop:function(U){p(this);var V;try{if(V=b(y(+U)),V>9007199254740991&&V!==D)throw new L("The argument should be a safe integer")}catch(k){A(this,"throw",k)}return F?g(F,this,V):new j(x(this),{remaining:V})}})}),(function(T){"use strict";T.exports=function(P){return{iterator:P,next:P.next,done:!1}}}),(function(T){"use strict";var P=RangeError;T.exports=function(a){if(a===a)return a;throw new P("NaN is not allowed")}}),(function(T,P,a){"use strict";var v=a(61),g=RangeError;T.exports=function(p){var x=v(p);if(x<0)throw new g("The argument can't be less than 0");return x}}),(function(T){"use strict";T.exports=function(P,a){var v=typeof Iterator=="function"&&Iterator.prototype[P];if(v)try{v.call({next:null},a).next()}catch(g){return!0}}}),(function(T,P,a){"use strict";var v=a(4);T.exports=function(g,p){var x=v.Iterator,y=x&&x.prototype,b=y&&y[g],A=!1;if(b)try{b.call({next:function(){return{done:!0}},return:function(){A=!0}},-1)}catch(I){I instanceof p||(A=!1)}if(!A)return b}}),(function(T,P,a){"use strict";var v=a(3),g=a(8),p=a(137),x=a(30),y=a(46),b=a(269),A=a(142),I=a(273),R=I("every",TypeError);v({target:"Iterator",proto:!0,real:!0,forced:R},{every:function(M){y(this);try{x(M)}catch(N){A(this,"throw",N)}if(R)return g(R,this,M);var L=b(this),D=0;return!p(L,function(N,F){if(!M(N,D++))return F()},{IS_RECORD:!0,INTERRUPTED:!0}).stopped}})}),(function(T,P,a){"use strict";var v=a(3),g=a(8),p=a(30),x=a(46),y=a(269),b=a(264),A=a(171),I=a(36),R=a(142),O=a(272),M=a(273),L=!I&&!O("filter",function(){}),D=!I&&!L&&M("filter",TypeError),N=I||L||D,F=b(function(){for(var G=this.iterator,j=this.predicate,X=this.next,U,V,k;;){if(U=x(g(X,G)),V=this.done=!!U.done,V)return;if(k=U.value,A(G,j,[k,this.counter++],!0))return k}});v({target:"Iterator",proto:!0,real:!0,forced:N},{filter:function(j){x(this);try{p(j)}catch(X){R(this,"throw",X)}return D?g(D,this,j):new F(y(this),{predicate:j})}})}),(function(T,P,a){"use strict";var v=a(3),g=a(8),p=a(137),x=a(30),y=a(46),b=a(269),A=a(142),I=a(273),R=I("find",TypeError);v({target:"Iterator",proto:!0,real:!0,forced:R},{find:function(M){y(this);try{x(M)}catch(N){A(this,"throw",N)}if(R)return g(R,this,M);var L=b(this),D=0;return p(L,function(N,F){if(M(N,D++))return F(N)},{IS_RECORD:!0,INTERRUPTED:!0}).result}})}),(function(T,P,a){"use strict";var v=a(3),g=a(8),p=a(30),x=a(46),y=a(269),b=a(278),A=a(264),I=a(142),R=a(7),O=a(36),M=a(272),L=a(273),D=!O&&R(function(){return[1].values().flatMap(function(){return[1]}).find(function(){return!0})!==1}),N=!O&&!D&&!M("flatMap",function(){}),F=!O&&!D&&!N&&L("flatMap",TypeError),G=O||D||N||F,j=A(function(){for(var X=this.iterator,U=this.mapper,V,k;;){if(k=this.inner)try{if(V=x(g(k.next,k.iterator)),!V.done)return V.value;this.inner=null}catch(Y){I(X,"throw",Y)}if(V=x(g(this.next,X)),this.done=!!V.done)return;try{this.inner=b(U(V.value,this.counter++),!1)}catch(Y){I(X,"throw",Y)}}});v({target:"Iterator",proto:!0,real:!0,forced:G},{flatMap:function(U){x(this);try{p(U)}catch(V){I(this,"throw",V)}return F?g(F,this,U):new j(y(this),{mapper:U,inner:null})}})}),(function(T,P,a){"use strict";var v=a(8),g=a(46),p=a(269),x=a(141);T.exports=function(y,b){(!b||typeof y!="string")&&g(y);var A=x(y);return p(g(A!==void 0?v(A,y):y))}}),(function(T,P,a){"use strict";var v=a(3),g=a(8),p=a(137),x=a(30),y=a(46),b=a(269),A=a(142),I=a(273),R=I("forEach",TypeError);v({target:"Iterator",proto:!0,real:!0,forced:R},{forEach:function(M){y(this);try{x(M)}catch(N){A(this,"throw",N)}if(R)return g(R,this,M);var L=b(this),D=0;p(L,function(N){M(N,D++)},{IS_RECORD:!0})}})}),(function(T,P,a){"use strict";var v=a(3),g=a(8),p=a(39),x=a(24),y=a(179).IteratorPrototype,b=a(264),A=a(278),I=a(36),R=I||(function(){try{Iterator.from({return:null}).return()}catch(M){return!0}})(),O=b(function(){return g(this.next,this.iterator)},!0);v({target:"Iterator",stat:!0,forced:R},{from:function(L){var D=A(typeof L=="string"?p(L):L,!0);return x(y,D.iterator)?D.iterator:new O(D)}})}),(function(T,P,a){"use strict";var v=a(3),g=a(8),p=a(30),x=a(46),y=a(269),b=a(264),A=a(171),I=a(142),R=a(272),O=a(273),M=a(36),L=!M&&!R("map",function(){}),D=!M&&!L&&O("map",TypeError),N=M||L||D,F=b(function(){var G=this.iterator,j=x(g(this.next,G)),X=this.done=!!j.done;if(!X)return A(G,this.mapper,[j.value,this.counter++],!0)});v({target:"Iterator",proto:!0,real:!0,forced:N},{map:function(j){x(this);try{p(j)}catch(X){I(this,"throw",X)}return D?g(D,this,j):new F(y(this),{mapper:j})}})}),(function(T,P,a){"use strict";var v=a(3),g=a(137),p=a(30),x=a(46),y=a(269),b=a(142),A=a(273),I=a(117),R=a(7),O=TypeError,M=R(function(){[].keys().reduce(function(){},void 0)}),L=!M&&A("reduce",O);v({target:"Iterator",proto:!0,real:!0,forced:M||L},{reduce:function(N){x(this);try{p(N)}catch(U){b(this,"throw",U)}var F=arguments.length<2,G=F?void 0:arguments[1];if(L)return I(L,this,F?[N]:[N,G]);var j=y(this),X=0;if(g(j,function(U){F?(F=!1,G=U):G=N(G,U,X),X++},{IS_RECORD:!0}),F)throw new O("Reduce of empty iterator with no initial value");return G}})}),(function(T,P,a){"use strict";var v=a(3),g=a(8),p=a(137),x=a(30),y=a(46),b=a(269),A=a(142),I=a(273),R=I("some",TypeError);v({target:"Iterator",proto:!0,real:!0,forced:R},{some:function(M){y(this);try{x(M)}catch(N){A(this,"throw",N)}if(R)return g(R,this,M);var L=b(this),D=0;return p(L,function(N,F){if(M(N,D++))return F()},{IS_RECORD:!0,INTERRUPTED:!0}).stopped}})}),(function(T,P,a){"use strict";var v=a(3),g=a(8),p=a(46),x=a(269),y=a(270),b=a(271),A=a(264),I=a(142),R=a(272),O=a(273),M=a(36),L=RangeError,D=1/0,N=!M&&!R("take",1),F=!M&&!N&&O("take",RangeError),G=M||N||F||!(function(){try{Iterator.prototype.take.call({next:function(){return{done:!0}}},9007199254740992)}catch(X){return X instanceof L}})(),j=A(function(){var X=this.iterator;if(!this.remaining--)return this.done=!0,I(X,"normal",void 0);var U=p(g(this.next,X)),V=this.done=!!U.done;if(!V)return U.value});v({target:"Iterator",proto:!0,real:!0,forced:G},{take:function(U){p(this);var V;try{if(V=b(y(+U)),V>9007199254740991&&V!==D)throw new L("The argument should be a safe integer")}catch(k){I(this,"throw",k)}return F?g(F,this,V):new j(x(this),{remaining:V})}})}),(function(T,P,a){"use strict";var v=a(3),g=a(46),p=a(90),x=a(137),y=a(269);v({target:"Iterator",proto:!0,real:!0},{toArray:function(){var A=[],I=0;return x(y(g(this)),function(R){p(A,I++,R)},{IS_RECORD:!0}),A}})}),(function(T,P,a){"use strict";var v=a(3),g=a(46),p=a(287),x=a(8),y=a(14),b=a(288),A=a(278),I=a(289),R=a(142),O=a(265),M=a(290),L=a(36),D=y([].concat),N=y([].push),F="throw";v({target:"Iterator",stat:!0,forced:L},{zip:function(j){g(j);for(var X=arguments.length>1?p(arguments[1]):void 0,U=I(X),V=U==="longest"?p(X&&X.padding):void 0,k=[],Y=[],K=b(j),J,Z,Q;!Z;){try{Q=g(x(K.next,K.iterator)),Z=Q.done}catch(ht){return O(k,F,ht)}if(!Z){try{J=A(Q.value,!1)}catch(ht){return O(D([K],k),F,ht)}N(k,J)}}var at=k.length,et,rt,nt;if(U==="longest")if(V===void 0)for(et=0;et<at;et++)N(Y,void 0);else{try{nt=b(V)}catch(ht){return O(k,F,ht)}var ut=!0;for(et=0;et<at;et++)if(ut){try{Q=g(x(nt.next,nt.iterator)),rt=Q.done,Q=Q.value}catch(ht){return O(k,F,ht)}rt?ut=!1:N(Y,Q)}else N(Y,void 0);if(ut)try{R(nt.iterator,"normal")}catch(ht){return O(k,F,ht)}}return M(k,U,Y)}})}),(function(T,P,a){"use strict";var v=a(20),g=String,p=TypeError;T.exports=function(x){if(x===void 0||v(x))return x;throw new p(g(x)+" is not an object or undefined")}}),(function(T,P,a){"use strict";var v=a(140),g=a(269);T.exports=function(p){return g(v(p))}}),(function(T){"use strict";var P=TypeError;T.exports=function(a){var v=a&&a.mode;if(v===void 0||v==="shortest"||v==="longest"||v==="strict")return v||"shortest";throw new P("Incorrect `mode` option")}}),(function(T,P,a){"use strict";var v=a(8),g=a(14),p=a(46),x=a(264),y=a(265),b=TypeError,A=g([].slice),I=g([].push),R="Iterator is exhausted",O="throw",M=x(function(){var L=this.iterCount;if(!L){this.done=!0;return}for(var D=this.openIters,N=this.iters,F=this.padding,G=this.mode,j=this.finishResults,X=[],U,V,k=0;k<L;k++){var Y=N[k];if(Y===null)U=F[k];else{try{U=p(v(Y.next,Y.iterator)),V=U.done,U=U.value}catch(Q){return D[k]=void 0,y(D,O,Q)}if(V){if(D[k]=void 0,this.openItersCount--,G==="shortest")return this.done=!0,y(D,"normal",void 0);if(G==="strict"){if(k)return y(D,O,new b(R));for(var K,J,Z=1;Z<L;Z++){try{K=p(v(N[Z].next,N[Z].iterator)),J=K.done,K=K.value}catch(Q){return D[Z]=void 0,y(D,O,Q)}if(J)D[Z]=void 0,this.openItersCount--;else return y(D,O,new b(R))}this.done=!0;return}if(!this.openItersCount){this.done=!0;return}N[k]=null,U=F[k]}}I(X,U)}return j?j(X):X});T.exports=function(L,D,N,F){var G=L.length;return new M({iters:L,iterCount:G,openIters:A(L,0),openItersCount:G,mode:D,padding:N,finishResults:F})}}),(function(T,P,a){"use strict";var v=a(3),g=a(46),p=a(287),x=a(90),y=a(8),b=a(14),A=a(23),I=a(10),R=a(278),O=a(289),M=a(265),L=a(290),D=a(36),N=b([].push),F="throw";v({target:"Iterator",stat:!0,forced:D},{zipKeyed:function(j){g(j);var X=arguments.length>1?p(arguments[1]):void 0,U=O(X),V=U==="longest"?p(X&&X.padding):void 0,k=[],Y=[],K=A("Reflect","ownKeys")(j),J=[],Z=I.f,Q,at,et;for(Q=0;Q<K.length;Q++)try{if(at=K[Q],!y(Z,j,at))continue;et=j[at],et!==void 0&&(N(J,at),N(k,R(et,!1)))}catch(nt){return M(k,F,nt)}var rt=k.length;if(U==="longest")if(V===void 0)for(Q=0;Q<rt;Q++)N(Y,void 0);else for(Q=0;Q<J.length;Q++){try{et=V[J[Q]]}catch(nt){return M(k,F,nt)}N(Y,et)}return L(k,U,Y,function(nt){for(var ut=A("Object","create")(null),ht=0;ht<rt;ht++)x(ut,J[ht],nt[ht]);return ut})}})}),(function(T,P,a){"use strict";var v=a(3),g=a(98),p=a(95);v({target:"JSON",stat:!0,forced:!g},{isRawJSON:p})}),(function(T,P,a){"use strict";var v=a(3),g=a(6),p=a(4),x=a(23),y=a(14),b=a(8),A=a(21),I=a(20),R=a(88),O=a(38),M=a(68),L=a(63),D=a(90),N=a(7),F=a(97),G=a(26),j=p.JSON,X=p.Number,U=p.SyntaxError,V=j&&j.parse,k=x("Object","keys"),Y=Object.getOwnPropertyDescriptor,K=y("".charAt),J=y("".slice),Z=y(/./.exec),Q=y([].push),at=/^\d$/,et=/^[1-9]$/,rt=/^[\d-]$/,nt=/^[\t\n\r ]$/,ut=0,ht=1,pt=function(Ct,It){Ct=M(Ct);var Dt=new Ht(Ct,0),Vt=Dt.parse(),_t=Vt.value,Nt=Dt.skip(nt,Vt.end);if(Nt<Ct.length)throw new U('Unexpected extra character: "'+K(Ct,Nt)+'" after the parsed data at: '+Nt);return A(It)?yt({"":_t},"",It,Vt):_t},yt=function(Ct,It,Dt,Vt){var _t=Ct[It],Nt=Vt&&_t===Vt.value,Jt=Nt&&typeof Vt.source=="string"?{source:Vt.source}:{},ne,ve,le,fe,Ce;if(I(_t)){var Be=R(_t),Ie=Nt?Vt.nodes:Be?[]:{};if(Be)for(ne=Ie.length,le=L(_t),fe=0;fe<le;fe++)At(_t,fe,yt(_t,""+fe,Dt,fe<ne?Ie[fe]:void 0));else for(ve=k(_t),le=L(ve),fe=0;fe<le;fe++)Ce=ve[fe],At(_t,Ce,yt(_t,Ce,Dt,O(Ie,Ce)?Ie[Ce]:void 0))}return b(Dt,Ct,It,_t,Jt)},At=function(Ct,It,Dt){if(g){var Vt=Y(Ct,It);if(Vt&&!Vt.configurable)return}Dt===void 0?delete Ct[It]:D(Ct,It,Dt)},Et=function(Ct,It,Dt,Vt){this.value=Ct,this.end=It,this.source=Dt,this.nodes=Vt},Ht=function(Ct,It){this.source=Ct,this.index=It};Ht.prototype={fork:function(Ct){return new Ht(this.source,Ct)},parse:function(){var Ct=this.source,It=this.skip(nt,this.index),Dt=this.fork(It),Vt=K(Ct,It);if(Z(rt,Vt))return Dt.number();switch(Vt){case"{":return Dt.object();case"[":return Dt.array();case'"':return Dt.string();case"t":return Dt.keyword(!0);case"f":return Dt.keyword(!1);case"n":return Dt.keyword(null)}throw new U('Unexpected character: "'+Vt+'" at: '+It)},node:function(Ct,It,Dt,Vt,_t){return new Et(It,Vt,Ct?null:J(this.source,Dt,Vt),_t)},object:function(){for(var Ct=this.source,It=this.index+1,Dt=!1,Vt={},_t={},Nt=!1;It<Ct.length;){if(It=this.until(['"',"}"],It),K(Ct,It)==="}"&&!Dt){It++,Nt=!0;break}var Jt=this.fork(It).string(),ne=Jt.value;It=Jt.end,It=this.until([":"],It)+1,It=this.skip(nt,It),Jt=this.fork(It).parse(),D(_t,ne,Jt),D(Vt,ne,Jt.value),It=this.until([",","}"],Jt.end);var ve=K(Ct,It);if(ve===",")Dt=!0,It++;else if(ve==="}"){It++,Nt=!0;break}}if(!Nt)throw new U("Unterminated object at: "+It);return this.node(ht,Vt,this.index,It,_t)},array:function(){for(var Ct=this.source,It=this.index+1,Dt=!1,Vt=[],_t=[],Nt=!1;It<Ct.length;){if(It=this.skip(nt,It),K(Ct,It)==="]"&&!Dt){It++,Nt=!0;break}var Jt=this.fork(It).parse();if(Q(_t,Jt),Q(Vt,Jt.value),It=this.until([",","]"],Jt.end),K(Ct,It)===",")Dt=!0,It++;else if(K(Ct,It)==="]"){It++,Nt=!0;break}}if(!Nt)throw new U("Unterminated array at: "+It);return this.node(ht,Vt,this.index,It,_t)},string:function(){var Ct=this.index,It=F(this.source,this.index+1);return this.node(ut,It.value,Ct,It.end)},number:function(){var Ct=this.source,It=this.index,Dt=It;if(K(Ct,Dt)==="-"&&Dt++,K(Ct,Dt)==="0")Dt++;else if(Z(et,K(Ct,Dt)))Dt=this.skip(at,Dt+1);else throw new U("Failed to parse number at: "+Dt);if(K(Ct,Dt)==="."){var Vt=Dt+1;if(Dt=this.skip(at,Vt),Vt===Dt)throw new U("Failed to parse number's fraction at: "+Dt)}if(K(Ct,Dt)==="e"||K(Ct,Dt)==="E"){Dt++,(K(Ct,Dt)==="+"||K(Ct,Dt)==="-")&&Dt++;var _t=Dt;if(Dt=this.skip(at,Dt),_t===Dt)throw new U("Failed to parse number's exponent value at: "+Dt)}return this.node(ut,X(J(Ct,It,Dt)),It,Dt)},keyword:function(Ct){var It=""+Ct,Dt=this.index,Vt=Dt+It.length;if(J(this.source,Dt,Vt)!==It)throw new U("Failed to parse value at: "+Dt);return this.node(ut,Ct,Dt,Vt)},skip:function(Ct,It){for(var Dt=this.source;It<Dt.length&&Z(Ct,K(Dt,It));It++);return It},until:function(Ct,It){It=this.skip(nt,It);for(var Dt=K(this.source,It),Vt=0;Vt<Ct.length;Vt++)if(Ct[Vt]===Dt)return It;throw new U('Unexpected character: "'+Dt+'" at: '+It)}};var Ut=N(function(){var Ct="9007199254740993",It;return V(Ct,function(Dt,Vt,_t){It=_t.source}),It!==Ct}),kt=G&&!N(function(){return 1/V("-0 ")!==-1/0});v({target:"JSON",stat:!0,forced:Ut},{parse:function(It,Dt){return kt&&!A(Dt)?V(It):pt(It,Dt)}})}),(function(T,P,a){"use strict";var v=a(3),g=a(295),p=a(98),x=a(23),y=a(14),b=a(68),A=a(90),I=a(51).set,R=SyntaxError,O=x("JSON","parse"),M=x("Object","create"),L=x("Object","freeze"),D=y("".charAt),N="Unacceptable as raw JSON",F=function(G){return G===" "||G===" "||G===`
`||G==="\r"};v({target:"JSON",stat:!0,forced:!p},{rawJSON:function(j){var X=b(j);if(X===""||F(D(X,0))||F(D(X,X.length-1)))throw new R(N);var U=O(X);if(typeof U=="object"&&U!==null)throw new R(N);var V=M(null);return I(V,{type:"RawJSON"}),A(V,"rawJSON",X),g?L(V):V}})}),(function(T,P,a){"use strict";var v=a(7);T.exports=!v(function(){return Object.isExtensible(Object.preventExtensions({}))})}),(function(T,P,a){"use strict";var v=a(4),g=a(82);g(v.JSON,"JSON",!0)}),(function(T,P,a){"use strict";a(298)}),(function(T,P,a){"use strict";var v=a(299),g=a(303);v("Map",function(p){return function(){return p(this,arguments.length?arguments[0]:void 0)}},g)}),(function(T,P,a){"use strict";var v=a(3),g=a(4),p=a(14),x=a(67),y=a(47),b=a(300),A=a(137),I=a(216),R=a(21),O=a(17),M=a(20),L=a(7),D=a(172),N=a(82),F=a(124);T.exports=function(G,j,X){var U=G.indexOf("Map")!==-1,V=G.indexOf("Weak")!==-1,k=U?"set":"add",Y=g[G],K=Y&&Y.prototype,J=Y,Z={},Q=function(pt){var yt=p(K[pt]);y(K,pt,pt==="add"?function(Et){return yt(this,Et===0?0:Et),this}:pt==="delete"?function(At){return V&&!M(At)?!1:yt(this,At===0?0:At)}:pt==="get"?function(Et){return V&&!M(Et)?void 0:yt(this,Et===0?0:Et)}:pt==="has"?function(Et){return V&&!M(Et)?!1:yt(this,Et===0?0:Et)}:function(Et,Ht){return yt(this,Et===0?0:Et,Ht),this})},at=x(G,!R(Y)||!(V||K.forEach&&!L(function(){new Y().entries().next()})));if(at)J=X.getConstructor(j,G,U,k),b.enable();else if(x(G,!0)){var et=new J,rt=et[k](V?{}:-0,1)!==et,nt=L(function(){et.has(1)}),ut=D(function(pt){new Y(pt)}),ht=!V&&L(function(){for(var pt=new Y,yt=5;yt--;)pt[k](yt,yt);return!pt.has(-0)});ut||(J=j(function(pt,yt){I(pt,K);var At=F(new Y,pt,J);return O(yt)||A(yt,At[k],{that:At,AS_ENTRIES:U}),At}),J.prototype=K,K.constructor=J),(nt||ht)&&(Q("delete"),Q("has"),U&&Q("get")),(ht||rt)&&Q(k),V&&K.clear&&delete K.clear}return Z[G]=J,v({global:!0,constructor:!0,forced:J!==Y},Z),N(J,G),V||X.setStrong(J,G,U),J}}),(function(T,P,a){"use strict";var v=a(3),g=a(14),p=a(54),x=a(20),y=a(38),b=a(44).f,A=a(57),I=a(75),R=a(301),O=a(40),M=a(295),L=!1,D=O("meta"),N=0,F=function(k){b(k,D,{value:{objectID:"O"+N++,weakData:{}}})},G=function(k,Y){if(!x(k))return typeof k=="symbol"?k:(typeof k=="string"?"S":"P")+k;if(!y(k,D)){if(!R(k))return"F";if(!Y)return"E";F(k)}return k[D].objectID},j=function(k,Y){if(!y(k,D)){if(!R(k))return!0;if(!Y)return!1;F(k)}return k[D].weakData},X=function(k){return M&&L&&R(k)&&!y(k,D)&&F(k),k},U=function(){V.enable=function(){},L=!0;var k=A.f,Y=g([].splice),K={};K[D]=1,k(K).length&&(A.f=function(J){for(var Z=k(J),Q=0,at=Z.length;Q<at;Q++)if(Z[Q]===D){Y(Z,Q,1);break}return Z},v({target:"Object",stat:!0,forced:!0},{getOwnPropertyNames:I.f}))},V=T.exports={enable:U,fastKey:G,getWeakData:j,onFreeze:X};p[D]=!0}),(function(T,P,a){"use strict";var v=a(7),g=a(20),p=a(15),x=a(302),y=Object.isExtensible,b=v(function(){y(1)});T.exports=b||x?function(I){return!g(I)||x&&p(I)==="ArrayBuffer"?!1:y?y(I):!0}:y}),(function(T,P,a){"use strict";var v=a(7);T.exports=v(function(){if(typeof ArrayBuffer=="function"){var g=new ArrayBuffer(8);Object.isExtensible(g)&&Object.defineProperty(g,"a",{value:8})}})}),(function(T,P,a){"use strict";var v=a(71),g=a(77),p=a(215),x=a(84),y=a(216),b=a(17),A=a(137),I=a(177),R=a(180),O=a(201),M=a(6),L=a(300).fastKey,D=a(51),N=D.set,F=D.getterFor;T.exports={getConstructor:function(G,j,X,U){var V=G(function(Z,Q){y(Z,k),N(Z,{type:j,index:v(null),first:null,last:null,size:0}),M||(Z.size=0),b(Q)||A(Q,Z[U],{that:Z,AS_ENTRIES:X})}),k=V.prototype,Y=F(j),K=function(Z,Q,at){var et=Y(Z),rt=J(Z,Q),nt,ut;return rt?rt.value=at:(et.last=rt={index:ut=L(Q,!0),key:Q,value:at,previous:nt=et.last,next:null,removed:!1},et.first||(et.first=rt),nt&&(nt.next=rt),M?et.size++:Z.size++,ut!=="F"&&(et.index[ut]=rt)),Z},J=function(Z,Q){var at=Y(Z),et=L(Q),rt;if(et!=="F")return at.index[et];for(rt=at.first;rt;rt=rt.next)if(rt.key===Q)return rt};return p(k,{clear:function(){for(var Q=this,at=Y(Q),et=at.first;et;)et.removed=!0,et.previous&&(et.previous=et.previous.next=null),et=et.next;at.first=at.last=null,at.index=v(null),M?at.size=0:Q.size=0},delete:function(Z){var Q=this,at=Y(Q),et=J(Q,Z);if(et){var rt=et.next,nt=et.previous;delete at.index[et.index],et.removed=!0,nt&&(nt.next=rt),rt&&(rt.previous=nt),at.first===et&&(at.first=rt),at.last===et&&(at.last=nt),M?at.size--:Q.size--}return!!et},forEach:function(Q){for(var at=Y(this),et=x(Q,arguments.length>1?arguments[1]:void 0),rt;rt=rt?rt.next:at.first;)for(et(rt.value,rt.key,this);rt&&rt.removed;)rt=rt.previous},has:function(Q){return!!J(this,Q)}}),p(k,X?{get:function(Q){var at=J(this,Q);return at&&at.value},set:function(Q,at){return K(this,Q===0?0:Q,at)}}:{add:function(Q){return K(this,Q=Q===0?0:Q,Q)}}),M&&g(k,"size",{configurable:!0,get:function(){return Y(this).size}}),V},setStrong:function(G,j,X){var U=j+" Iterator",V=F(j),k=F(U);I(G,j,function(Y,K){N(this,{type:U,target:Y,state:V(Y),kind:K,last:null})},function(){for(var Y=k(this),K=Y.kind,J=Y.last;J&&J.removed;)J=J.previous;return!Y.target||!(Y.last=J=J?J.next:Y.state.first)?(Y.target=null,R(void 0,!0)):R(K==="keys"?J.key:K==="values"?J.value:[J.key,J.value],!1)},X?"entries":"values",!X,!0),O(j)}}}),(function(T,P,a){"use strict";var v=a(3),g=a(14),p=a(30),x=a(16),y=a(137),b=a(148),A=a(305),I=a(36),R=a(7),O=A.Map,M=A.has,L=A.get,D=A.set,N=g([].push),F=I||R(function(){return O.groupBy("ab",function(G){return G}).get("a").length!==1});v({target:"Map",stat:!0,forced:I||F},{groupBy:function(j,X){x(j),p(X);var U=new O,V=0;return y(j,function(k){b(V);var Y=X(k,V++);M(U,Y)?N(L(U,Y),k):D(U,Y,[k])}),U}})}),(function(T,P,a){"use strict";var v=a(14),g=Map.prototype;T.exports={Map,set:v(g.set),get:v(g.get),has:v(g.has),remove:v(g.delete),proto:g}}),(function(T,P,a){"use strict";var v=a(3),g=a(305),p=a(36),x=g.get,y=g.has,b=g.set;v({target:"Map",proto:!0,real:!0,forced:p},{getOrInsert:function(I,R){return y(this,I)?x(this,I):(b(this,I,R),R)}})}),(function(T,P,a){"use strict";var v=a(3),g=a(30),p=a(305),x=a(36),y=p.get,b=p.has,A=p.set;v({target:"Map",proto:!0,real:!0,forced:x},{getOrInsertComputed:function(R,O){var M=b(this,R);if(g(O),M)return y(this,R);R===0&&1/R===-1/0&&(R=0);var L=O(R);return A(this,R,L),L}})}),(function(T,P,a){"use strict";var v=a(3),g=a(309),p=Math.acosh,x=Math.log,y=Math.sqrt,b=Math.LN2,A=!p||Math.floor(p(Number.MAX_VALUE))!==710||p(1/0)!==1/0;v({target:"Math",stat:!0,forced:A},{acosh:function(R){var O=+R;return O<1?NaN:O>9490626562425156e-8?x(O)+b:g(O-1+y(O-1)*y(O+1))}})}),(function(T){"use strict";var P=Math.log;T.exports=Math.log1p||function(v){var g=+v;if(g>-1e-8&&g<1e-8)return g-g*g/2;var p=1+g;return p===1?g:g===p-1?P(p):g*P(p)/(p-1)}}),(function(T,P,a){"use strict";var v=a(3),g=a(309),p=Math.asinh,x=Math.log,y=Math.sqrt,b=Math.LN2,A=9490626562425156e-8;function I(O){var M=+O;return!isFinite(M)||M===0?M:M<0?-I(-M):M>A?x(M)+b:M<1e-8?M:g(M+M*M/(1+y(M*M+1)))}var R=!(p&&1/p(0)>0);v({target:"Math",stat:!0,forced:R},{asinh:I})}),(function(T,P,a){"use strict";var v=a(3),g=a(309),p=Math.atanh,x=!(p&&1/p(-0)<0);v({target:"Math",stat:!0,forced:x},{atanh:function(b){var A=+b;return A===0?A:g(2*A/(1-A))/2}})}),(function(T,P,a){"use strict";var v=a(3),g=a(220),p=Math.abs,x=Math.pow;v({target:"Math",stat:!0},{cbrt:function(b){var A=+b,I=g(A)*x(p(A),1/3);return A!==0&&isFinite(A)?(2*I+A/(I*I))/3:I}})}),(function(T,P,a){"use strict";var v=a(3),g=Math.floor,p=Math.log,x=Math.LOG2E;v({target:"Math",stat:!0},{clz32:function(b){var A=b>>>0;return A?31-g(p(A+.5)*x):32}})}),(function(T,P,a){"use strict";var v=a(3),g=a(315),p=Math.cosh,x=Math.abs,y=Math.E,b=!p||p(710)===1/0;v({target:"Math",stat:!0,forced:b},{cosh:function(I){var R=g(x(I)-1)+1;return(R+1/(R*y*y))*(y/2)}})}),(function(T){"use strict";var P=Math.expm1,a=Math.exp;T.exports=!P||P(10)>22025.465794806718||P(10)<22025.465794806718||P(-2e-17)!==-2e-17?function(g){var p=+g;return p===0?p:p>-1e-6&&p<1e-6?p+p*p/2:a(p)-1}:P}),(function(T,P,a){"use strict";var v=a(3),g=a(315);v({target:"Math",stat:!0,forced:g!==Math.expm1},{expm1:g})}),(function(T,P,a){"use strict";var v=a(3),g=a(218);v({target:"Math",stat:!0},{fround:g})}),(function(T,P,a){"use strict";var v=a(3),g=a(219),p=.0009765625,x=65504,y=6103515625e-14;v({target:"Math",stat:!0},{f16round:function(A){return g(A,p,x,y)}})}),(function(T,P,a){"use strict";var v=a(3),g=Math.hypot,p=Math.abs,x=Math.sqrt,y=!!g&&g(1/0,NaN)!==1/0;v({target:"Math",stat:!0,arity:2,forced:y},{hypot:function(A,I){for(var R=0,O=0,M=arguments.length,L=0,D,N;O<M;)D=p(arguments[O++]),L<D?(N=L/D,R=R*N*N+1,L=D):D>0?(N=D/L,R+=N*N):R+=D;return L===1/0?1/0:L*x(R)}})}),(function(T,P,a){"use strict";var v=a(3),g=a(7),p=Math.imul,x=g(function(){return p(4294967295,5)!==-5||p.length!==2});v({target:"Math",stat:!0,forced:x},{imul:function(b,A){var I=65535,R=+b,O=+A,M=I&R,L=I&O;return 0|M*L+((I&R>>>16)*L+M*(I&O>>>16)<<16>>>0)}})}),(function(T,P,a){"use strict";var v=a(3),g=a(322);v({target:"Math",stat:!0},{log10:g})}),(function(T){"use strict";var P=Math.log,a=Math.LOG10E;T.exports=Math.log10||function(g){return P(g)*a}}),(function(T,P,a){"use strict";var v=a(3),g=a(309);v({target:"Math",stat:!0},{log1p:g})}),(function(T,P,a){"use strict";var v=a(3),g=a(231);v({target:"Math",stat:!0},{log2:g})}),(function(T,P,a){"use strict";var v=a(3),g=a(220);v({target:"Math",stat:!0},{sign:g})}),(function(T,P,a){"use strict";var v=a(3),g=a(7),p=a(315),x=Math.abs,y=Math.exp,b=Math.E,A=g(function(){return Math.sinh(-2e-17)!==-2e-17});v({target:"Math",stat:!0,forced:A},{sinh:function(R){var O=+R;return x(O)<1?(p(O)-p(-O))/2:(y(O-1)-y(-O-1))*(b/2)}})}),(function(T,P,a){"use strict";var v=a(3),g=a(14),p=a(137),x=RangeError,y=TypeError,b=1/0,A=NaN,I=Math.abs,R=Math.pow,O=g([].push),M=R(2,1023),L=R(2,53)-1,D=Number.MAX_VALUE,N=R(2,971),F={},G={},j={},X={},U={},V=function(k,Y){var K=k+Y,J=Y-(K-k);return{hi:K,lo:J}};v({target:"Math",stat:!0},{sumPrecise:function(Y){var K=[],J=0,Z=X;switch(p(Y,function(Ct){if(++J>L)throw new x("Maximum allowed index exceeded");if(typeof Ct!="number")throw new y("Value is not a number");Z!==F&&(Ct!==Ct?Z=F:Ct===b?Z=Z===G?F:j:Ct===-b?Z=Z===j?F:G:(Ct!==0||1/Ct===b)&&(Z===X||Z===U)&&(Z=U,O(K,Ct)))}),Z){case F:return A;case G:return-b;case j:return b;case X:return-0}for(var Q=[],at=0,et,rt,nt,ut,ht,pt,yt=0;yt<K.length;yt++){et=K[yt];for(var At=0,Et=0;Et<Q.length;Et++){if(rt=Q[Et],I(et)<I(rt)&&(pt=et,et=rt,rt=pt),nt=V(et,rt),ut=nt.hi,ht=nt.lo,I(ut)===b){var Ht=ut===b?1:-1;at+=Ht,et=et-Ht*M-Ht*M,I(et)<I(rt)&&(pt=et,et=rt,rt=pt),nt=V(et,rt),ut=nt.hi,ht=nt.lo}ht!==0&&(Q[At++]=ht),et=ut}Q.length=At,et!==0&&O(Q,et)}var Ut=Q.length-1;if(ut=0,ht=0,at!==0){var kt=Ut>=0?Q[Ut]:0;if(Ut--,I(at)>1||at>0&&kt>0||at<0&&kt<0)return at>0?b:-b;if(nt=V(at*M,kt/2),ut=nt.hi,ht=nt.lo,ht*=2,I(2*ut)===b)return ut>0?ut===M&&ht===-(N/2)&&Ut>=0&&Q[Ut]<0?D:b:ut===-M&&ht===N/2&&Ut>=0&&Q[Ut]>0?-D:-b;ht!==0&&(Q[++Ut]=ht,ht=0),ut*=2}for(;Ut>=0&&(nt=V(ut,Q[Ut--]),ut=nt.hi,ht=nt.lo,ht===0););return Ut>=0&&(ht<0&&Q[Ut]<0||ht>0&&Q[Ut]>0)&&(rt=ht*2,et=ut+rt,rt===et-ut&&(ut=et)),ut}})}),(function(T,P,a){"use strict";var v=a(3),g=a(315),p=Math.exp;v({target:"Math",stat:!0},{tanh:function(y){var b=+y,A=g(b),I=g(-b);return A===1/0?1:I===1/0?-1:(A-I)/(p(b)+p(-b))}})}),(function(T,P,a){"use strict";var v=a(82);v(Math,"Math",!0)}),(function(T,P,a){"use strict";var v=a(3),g=a(62);v({target:"Math",stat:!0},{trunc:g})}),(function(T,P,a){"use strict";var v=a(3),g=a(36),p=a(6),x=a(4),y=a(80),b=a(14),A=a(67),I=a(38),R=a(124),O=a(24),M=a(22),L=a(19),D=a(7),N=a(57).f,F=a(5).f,G=a(44).f,j=a(96),X=a(332).trim,U="Number",V=x[U],k=y[U],Y=V.prototype,K=x.TypeError,J=b("".slice),Z=b("".charCodeAt),Q=function(ht){var pt=L(ht,"number");return typeof pt=="bigint"?pt:at(pt)},at=function(ht){var pt=L(ht,"number"),yt,At,Et,Ht,Ut,kt,Ct,It;if(M(pt))throw new K("Cannot convert a Symbol value to a number");if(typeof pt=="string"&&pt.length>2){if(pt=X(pt),yt=Z(pt,0),yt===43||yt===45){if(At=Z(pt,2),At===88||At===120)return NaN}else if(yt===48){switch(Z(pt,1)){case 66:case 98:Et=2,Ht=49;break;case 79:case 111:Et=8,Ht=55;break;default:return+pt}for(Ut=J(pt,2),kt=Ut.length,Ct=0;Ct<kt;Ct++)if(It=Z(Ut,Ct),It<48||It>Ht)return NaN;return parseInt(Ut,Et)}}return+pt},et=A(U,!V(" 0o1")||!V("0b1")||V("+0x1")),rt=function(ht){return O(Y,ht)&&D(function(){j(ht)})},nt=function(pt){var yt=arguments.length<1?0:V(Q(pt));return rt(this)?R(Object(yt),this,nt):yt};nt.prototype=Y,et&&!g&&(Y.constructor=nt),v({global:!0,constructor:!0,wrap:!0,forced:et},{Number:nt});var ut=function(ht,pt){for(var yt=p?N(pt):"MAX_VALUE,MIN_VALUE,NaN,NEGATIVE_INFINITY,POSITIVE_INFINITY,EPSILON,MAX_SAFE_INTEGER,MIN_SAFE_INTEGER,isFinite,isInteger,isNaN,isSafeInteger,parseFloat,parseInt,fromString,range".split(","),At=0,Et;yt.length>At;At++)I(pt,Et=yt[At])&&!I(ht,Et)&&G(ht,Et,F(pt,Et))};g&&k&&ut(y[U],k),(et||g)&&ut(y[U],V)}),(function(T,P,a){"use strict";var v=a(14),g=a(16),p=a(68),x=a(333),y=v("".replace),b=RegExp("^["+x+"]+"),A=RegExp("(^|[^"+x+"])["+x+"]+$"),I=function(R){return function(O){var M=p(g(O));return R&1&&(M=y(M,b,"")),R&2&&(M=y(M,A,"$1")),M}};T.exports={start:I(1),end:I(2),trim:I(3)}}),(function(T){"use strict";T.exports=`
\v\f\r \xA0\u1680\u2000\u2001\u2002\u2003\u2004\u2005\u2006\u2007\u2008\u2009\u200A\u202F\u205F\u3000\u2028\u2029\uFEFF`}),(function(T,P,a){"use strict";var v=a(3);v({target:"Number",stat:!0,nonConfigurable:!0,nonWritable:!0},{EPSILON:Math.pow(2,-52)})}),(function(T,P,a){"use strict";var v=a(3),g=a(336);v({target:"Number",stat:!0},{isFinite:g})}),(function(T,P,a){"use strict";var v=a(4),g=v.isFinite;T.exports=Number.isFinite||function(x){return typeof x=="number"&&g(x)}}),(function(T,P,a){"use strict";var v=a(3),g=a(338);v({target:"Number",stat:!0},{isInteger:g})}),(function(T,P,a){"use strict";var v=a(20),g=Math.floor;T.exports=Number.isInteger||function(x){return!v(x)&&isFinite(x)&&g(x)===x}}),(function(T,P,a){"use strict";var v=a(3);v({target:"Number",stat:!0},{isNaN:function(p){return p!==p}})}),(function(T,P,a){"use strict";var v=a(3),g=a(338),p=Math.abs;v({target:"Number",stat:!0},{isSafeInteger:function(y){return g(y)&&p(y)<=9007199254740991}})}),(function(T,P,a){"use strict";var v=a(3);v({target:"Number",stat:!0,nonConfigurable:!0,nonWritable:!0},{MAX_SAFE_INTEGER:9007199254740991})}),(function(T,P,a){"use strict";var v=a(3);v({target:"Number",stat:!0,nonConfigurable:!0,nonWritable:!0},{MIN_SAFE_INTEGER:-9007199254740991})}),(function(T,P,a){"use strict";var v=a(3),g=a(344);v({target:"Number",stat:!0,forced:Number.parseFloat!==g},{parseFloat:g})}),(function(T,P,a){"use strict";var v=a(4),g=a(7),p=a(14),x=a(68),y=a(332).trim,b=a(333),A=p("".charAt),I=v.parseFloat,R=v.Symbol,O=R&&R.iterator,M=1/I(b+"-0")!==-1/0||O&&!g(function(){I(Object(O))});T.exports=M?function(D){var N=y(x(D)),F=I(N);return F===0&&A(N,0)==="-"?-0:F}:I}),(function(T,P,a){"use strict";var v=a(3),g=a(346);v({target:"Number",stat:!0,forced:Number.parseInt!==g},{parseInt:g})}),(function(T,P,a){"use strict";var v=a(4),g=a(7),p=a(14),x=a(68),y=a(332).trim,b=a(333),A=v.parseInt,I=v.Symbol,R=I&&I.iterator,O=/^[+-]?0x/i,M=p(O.exec),L=A(b+"08")!==8||A(b+"0x16")!==22||R&&!g(function(){A(Object(R))});T.exports=L?function(N,F){var G=y(x(N));return A(G,F>>>0||(M(O,G)?16:10))}:A}),(function(T,P,a){"use strict";var v=a(3),g=a(14),p=a(61),x=a(96),y=a(249),b=a(322),A=a(7),I=RangeError,R=String,O=isFinite,M=Math.abs,L=Math.floor,D=Math.pow,N=Math.round,F=g(1.1.toExponential),G=g(y),j=g("".slice),X=D(10,308),U=F(-69e-12,4)==="-6.9000e-11"&&F(1.255,2)==="1.25e+0"&&F(12345,3)==="1.235e+4"&&F(25,0)==="3e+1",V=function(){return A(function(){F(1,1/0)})&&A(function(){F(1,-1/0)})},k=function(){return!A(function(){F(1/0,1/0),F(NaN,1/0)})},Y=!U||!V()||!k();v({target:"Number",proto:!0,forced:Y},{toExponential:function(J){var Z=x(this);if(J===void 0)return F(Z);var Q=p(J);if(!O(Z))return String(Z);if(Q<0||Q>20)throw new I("Incorrect fraction digits");if(U)return F(Z,Q);var at="",et,rt,nt,ut,ht,pt,yt;return Z<0&&(at="-",Z=-Z),Z===0?(rt=0,et=G("0",Q+1)):(ht=b(Z),rt=L(ht),Q-rt>=308?yt=Z*X*D(10,Q-rt-308):yt=Z/D(10,rt-Q),pt=N(yt),yt-pt>=.5&&(pt+=1),pt>=D(10,Q+1)&&(pt/=10,rt+=1),et=R(pt)),Q!==0&&(et=j(et,0,1)+"."+j(et,1)),rt===0?(nt="+",ut="0"):(nt=rt>0?"+":"-",ut=R(M(rt))),et+="e"+nt+ut,at+et}})}),(function(T,P,a){"use strict";var v=a(3),g=a(14),p=a(61),x=a(96),y=a(249),b=a(7),A=RangeError,I=String,R=Math.floor,O=g(y),M=g("".slice),L=g(1.1.toFixed),D=function(U,V,k){return V===0?k:V%2===1?D(U,V-1,k*U):D(U*U,V/2,k)},N=function(U){for(var V=0,k=U;k>=4096;)V+=12,k/=4096;for(;k>=2;)V+=1,k/=2;return V},F=function(U,V,k){for(var Y=-1,K=k;++Y<6;)K+=V*U[Y],U[Y]=K%1e7,K=R(K/1e7)},G=function(U,V){for(var k=6,Y=0;--k>=0;)Y+=U[k],U[k]=R(Y/V),Y=Y%V*1e7},j=function(U){for(var V=6,k="";--V>=0;)if(k!==""||V===0||U[V]!==0){var Y=I(U[V]);k=k===""?Y:k+O("0",7-Y.length)+Y}return k},X=b(function(){return L(8e-5,3)!=="0.000"||L(.9,0)!=="1"||L(1.255,2)!=="1.25"||L(0xde0b6b3a7640080,0)!=="1000000000000000128"})||!b(function(){L({})});v({target:"Number",proto:!0,forced:X},{toFixed:function(V){var k=x(this),Y=p(V),K=[0,0,0,0,0,0],J="",Z="0",Q,at,et,rt;if(Y<0||Y>20)throw new A("Incorrect fraction digits");if(k!==k)return"NaN";if(k<=-1e21||k>=1e21)return I(k);if(k<0&&(J="-",k=-k),k>1e-21)if(Q=N(k*D(2,69,1))-69,at=Q<0?k*D(2,-Q,1):k/D(2,Q,1),at*=4503599627370496,Q=52-Q,Q>0){for(F(K,0,at),et=Y;et>=7;)F(K,1e7,0),et-=7;for(F(K,D(10,et,1),0),et=Q-1;et>=23;)G(K,8388608),et-=23;G(K,1<<et),F(K,1,1),G(K,2),Z=j(K)}else F(K,0,at),F(K,1<<-Q,0),Z=j(K)+O("0",Y);return Y>0?(rt=Z.length,Z=J+(rt<=Y?"0."+O("0",Y-rt)+Z:M(Z,0,rt-Y)+"."+M(Z,rt-Y))):Z=J+Z,Z}})}),(function(T,P,a){"use strict";var v=a(3),g=a(14),p=a(7),x=a(96),y=g(1.1.toPrecision),b=p(function(){return y(1,void 0)!=="1"})||!p(function(){y({})});v({target:"Number",proto:!0,forced:b},{toPrecision:function(I){return I===void 0?y(x(this)):y(x(this),I)}})}),(function(T,P,a){"use strict";var v=a(3),g=a(351);v({target:"Object",stat:!0,arity:2,forced:Object.assign!==g},{assign:g})}),(function(T,P,a){"use strict";var v=a(6),g=a(14),p=a(8),x=a(7),y=a(73),b=a(66),A=a(10),I=a(39),R=a(13),O=Object.assign,M=Object.defineProperty,L=g([].concat);T.exports=!O||x(function(){if(v&&O({b:1},O(M({},"a",{enumerable:!0,get:function(){M(this,"b",{value:3,enumerable:!1})}}),{b:2})).b!==1)return!0;var D={},N={},F=Symbol("assign detection"),G="abcdefghijklmnopqrst";return D[F]=7,G.split("").forEach(function(j){N[j]=j}),O({},D)[F]!==7||y(O({},N)).join("")!==G})?function(N,F){for(var G=I(N),j=arguments.length,X=1,U=b.f,V=A.f;j>X;)for(var k=R(arguments[X++]),Y=U?L(y(k),U(k)):y(k),K=Y.length,J=0,Z;K>J;)Z=Y[J++],(!v||p(V,k,Z))&&(G[Z]=k[Z]);return G}:O}),(function(T,P,a){"use strict";var v=a(3),g=a(6),p=a(71);v({target:"Object",stat:!0,sham:!g},{create:p})}),(function(T,P,a){"use strict";var v=a(3),g=a(6),p=a(354),x=a(30),y=a(39),b=a(44);g&&v({target:"Object",proto:!0,forced:p},{__defineGetter__:function(I,R){b.f(y(this),I,{get:x(R),enumerable:!0,configurable:!0})}})}),(function(T,P,a){"use strict";var v=a(36),g=a(4),p=a(7),x=a(199);T.exports=v||!p(function(){if(!(x&&x<535)){var y=Math.random();__defineSetter__.call(null,y,function(){}),delete g[y]}})}),(function(T,P,a){"use strict";var v=a(3),g=a(6),p=a(72).f;v({target:"Object",stat:!0,forced:Object.defineProperties!==p,sham:!g},{defineProperties:p})}),(function(T,P,a){"use strict";var v=a(3),g=a(6),p=a(44).f;v({target:"Object",stat:!0,forced:Object.defineProperty!==p,sham:!g},{defineProperty:p})}),(function(T,P,a){"use strict";var v=a(3),g=a(6),p=a(354),x=a(30),y=a(39),b=a(44);g&&v({target:"Object",proto:!0,forced:p},{__defineSetter__:function(I,R){b.f(y(this),I,{set:x(R),enumerable:!0,configurable:!0})}})}),(function(T,P,a){"use strict";var v=a(3),g=a(359).entries;v({target:"Object",stat:!0},{entries:function(x){return g(x)}})}),(function(T,P,a){"use strict";var v=a(6),g=a(7),p=a(14),x=a(135),y=a(73),b=a(12),A=a(10).f,I=p(A),R=p([].push),O=v&&g(function(){var L=Object.create(null);return L[2]=2,!I(L,2)}),M=function(L){return function(D){for(var N=b(D),F=y(N),G=O&&x(N)===null,j=F.length,X=0,U=[],V;j>X;)V=F[X++],(!v||(G?V in N:I(N,V)))&&R(U,L?[V,N[V]]:N[V]);return U}};T.exports={entries:M(!0),values:M(!1)}}),(function(T,P,a){"use strict";var v=a(3),g=a(295),p=a(7),x=a(20),y=a(300).onFreeze,b=Object.freeze,A=p(function(){b(1)});v({target:"Object",stat:!0,forced:A,sham:!g},{freeze:function(R){return b&&x(R)?b(y(R)):R}})}),(function(T,P,a){"use strict";var v=a(3),g=a(137),p=a(90);v({target:"Object",stat:!0},{fromEntries:function(y){var b={};return g(y,function(A,I){p(b,A,I)},{AS_ENTRIES:!0}),b}})}),(function(T,P,a){"use strict";var v=a(3),g=a(7),p=a(12),x=a(5).f,y=a(6),b=!y||g(function(){x(1)});v({target:"Object",stat:!0,forced:b,sham:!y},{getOwnPropertyDescriptor:function(I,R){return x(p(I),R)}})}),(function(T,P,a){"use strict";var v=a(3),g=a(6),p=a(56),x=a(12),y=a(5),b=a(90);v({target:"Object",stat:!0,sham:!g},{getOwnPropertyDescriptors:function(I){for(var R=x(I),O=y.f,M=p(R),L={},D=0,N,F;M.length>D;)F=O(R,N=M[D++]),F!==void 0&&b(L,N,F);return L}})}),(function(T,P,a){"use strict";var v=a(3),g=a(7),p=a(75).f,x=g(function(){return!Object.getOwnPropertyNames(1)});v({target:"Object",stat:!0,forced:x},{getOwnPropertyNames:p})}),(function(T,P,a){"use strict";var v=a(3),g=a(7),p=a(39),x=a(135),y=a(136),b=g(function(){x(1)});v({target:"Object",stat:!0,forced:b,sham:!y},{getPrototypeOf:function(I){return x(p(I))}})}),(function(T,P,a){"use strict";var v=a(3),g=a(90),p=a(23),x=a(14),y=a(30),b=a(16),A=a(18),I=a(137),R=a(148),O=a(7),M=Object.groupBy,L=p("Object","create"),D=x([].push),N=!M||O(function(){return M("ab",function(F){return F}).a.length!==1});v({target:"Object",stat:!0,forced:N},{groupBy:function(G,j){b(G),y(j);var X=L(null),U=0;return I(G,function(V){R(U);var k=A(j(V,U++));k in X?D(X[k],V):g(X,k,[V])}),X}})}),(function(T,P,a){"use strict";var v=a(3),g=a(38);v({target:"Object",stat:!0},{hasOwn:g})}),(function(T,P,a){"use strict";var v=a(3),g=a(369);v({target:"Object",stat:!0},{is:g})}),(function(T){"use strict";T.exports=Object.is||function(a,v){return a===v?a!==0||1/a===1/v:a!==a&&v!==v}}),(function(T,P,a){"use strict";var v=a(3),g=a(301);v({target:"Object",stat:!0,forced:Object.isExtensible!==g},{isExtensible:g})}),(function(T,P,a){"use strict";var v=a(3),g=a(7),p=a(20),x=a(15),y=a(302),b=Object.isFrozen,A=y||g(function(){b(1)});v({target:"Object",stat:!0,forced:A},{isFrozen:function(R){return!p(R)||y&&x(R)==="ArrayBuffer"?!0:b?b(R):!1}})}),(function(T,P,a){"use strict";var v=a(3),g=a(7),p=a(20),x=a(15),y=a(302),b=Object.isSealed,A=y||g(function(){b(1)});v({target:"Object",stat:!0,forced:A},{isSealed:function(R){return!p(R)||y&&x(R)==="ArrayBuffer"?!0:b?b(R):!1}})}),(function(T,P,a){"use strict";var v=a(3),g=a(39),p=a(73),x=a(7),y=x(function(){p(1)});v({target:"Object",stat:!0,forced:y},{keys:function(A){return p(g(A))}})}),(function(T,P,a){"use strict";var v=a(3),g=a(6),p=a(354),x=a(39),y=a(18),b=a(135),A=a(5).f;g&&v({target:"Object",proto:!0,forced:p},{__lookupGetter__:function(R){var O=x(this),M=y(R),L;do if(L=A(O,M))return L.get;while(O=b(O))}})}),(function(T,P,a){"use strict";var v=a(3),g=a(6),p=a(354),x=a(39),y=a(18),b=a(135),A=a(5).f;g&&v({target:"Object",proto:!0,forced:p},{__lookupSetter__:function(R){var O=x(this),M=y(R),L;do if(L=A(O,M))return L.set;while(O=b(O))}})}),(function(T,P,a){"use strict";var v=a(3),g=a(20),p=a(300).onFreeze,x=a(295),y=a(7),b=Object.preventExtensions,A=y(function(){b(1)});v({target:"Object",stat:!0,forced:A,sham:!x},{preventExtensions:function(R){return b&&g(R)?b(p(R)):R}})}),(function(T,P,a){"use strict";var v=a(6),g=a(77),p=a(20),x=a(122),y=a(39),b=a(16),A=Object.getPrototypeOf,I=Object.setPrototypeOf,R=Object.prototype,O="__proto__";if(v&&A&&I&&{}[O]!==R)try{g(R,O,{configurable:!0,get:function(){return A(y(this))},set:function(L){var D=b(this);x(L)&&p(D)&&I(D,L)}})}catch(M){}}),(function(T,P,a){"use strict";var v=a(3),g=a(20),p=a(300).onFreeze,x=a(295),y=a(7),b=Object.seal,A=y(function(){b(1)});v({target:"Object",stat:!0,forced:A,sham:!x},{seal:function(R){return b&&g(R)?b(p(R)):R}})}),(function(T,P,a){"use strict";var v=a(3),g=a(119);v({target:"Object",stat:!0},{setPrototypeOf:g})}),(function(T,P,a){"use strict";var v=a(70),g=a(47),p=a(381);v||g(Object.prototype,"toString",p,{unsafe:!0})}),(function(T,P,a){"use strict";var v=a(70),g=a(69);T.exports=v?{}.toString:function(){return"[object "+g(this)+"]"}}),(function(T,P,a){"use strict";var v=a(3),g=a(359).values;v({target:"Object",stat:!0},{values:function(x){return g(x)}})}),(function(T,P,a){"use strict";var v=a(3),g=a(344);v({global:!0,forced:parseFloat!==g},{parseFloat:g})}),(function(T,P,a){"use strict";var v=a(3),g=a(346);v({global:!0,forced:parseInt!==g},{parseInt:g})}),(function(T,P,a){"use strict";a(386),a(402),a(404),a(405),a(406),a(407)}),(function(T,P,a){"use strict";var v=a(3),g=a(36),p=a(189),x=a(4),y=a(80),b=a(8),A=a(47),I=a(119),R=a(82),O=a(201),M=a(30),L=a(21),D=a(20),N=a(216),F=a(387),G=a(389).set,j=a(392),X=a(397),U=a(398),V=a(394),k=a(51),Y=a(399),K=a(400),J=a(401),Z="Promise",Q=K.CONSTRUCTOR,at=K.REJECTION_EVENT,et=K.SUBCLASSING,rt=k.getterFor(Z),nt=k.set,ut=Y&&Y.prototype,ht=Y,pt=ut,yt=x.TypeError,At=x.document,Et=x.process,Ht=J.f,Ut=Ht,kt=!!(At&&At.createEvent&&x.dispatchEvent),Ct="unhandledrejection",It="rejectionhandled",Dt=0,Vt=1,_t=2,Nt=1,Jt=2,ne,ve,le,fe,Ce=function($t){var Xt;return D($t)&&L(Xt=$t.then)?Xt:!1},Be=function($t,Xt){var re=Xt.value,oe=Xt.state===Vt,pe=oe?$t.ok:$t.fail,rn=$t.resolve,vt=$t.reject,Rt=$t.domain,Tt,wt,Ft;try{pe?(oe||(Xt.rejection===Jt&&Pt(Xt),Xt.rejection=Nt),pe===!0?Tt=re:(Rt&&Rt.enter(),Tt=pe(re),Rt&&(Rt.exit(),Ft=!0)),Tt===$t.promise?vt(new yt("Promise-chain cycle")):(wt=Ce(Tt))?b(wt,Tt,rn,vt):rn(Tt)):vt(re)}catch(Lt){Rt&&!Ft&&Rt.exit(),vt(Lt)}},Ie=function($t,Xt){$t.notified||($t.notified=!0,j(function(){for(var re=$t.reactions,oe;oe=re.get();)Be(oe,$t);$t.notified=!1,Xt&&!$t.rejection&&xe($t)}))},ce=function($t,Xt,re){var oe,pe;kt?(oe=At.createEvent("Event"),oe.promise=Xt,oe.reason=re,oe.initEvent($t,!1,!0),x.dispatchEvent(oe)):oe={promise:Xt,reason:re},!at&&(pe=x["on"+$t])?pe(oe):$t===Ct&&X("Unhandled promise rejection",re)},xe=function($t){b(G,x,function(){var Xt=$t.facade,re=$t.value,oe=Ue($t),pe;if(oe&&(pe=U(function(){p?Et.emit("unhandledRejection",re,Xt):ce(Ct,Xt,re)}),$t.rejection=p||Ue($t)?Jt:Nt,pe.error))throw pe.value})},Ue=function($t){return $t.rejection!==Nt&&!$t.parent},Pt=function($t){b(G,x,function(){var Xt=$t.facade;p?Et.emit("rejectionHandled",Xt):ce(It,Xt,$t.value)})},zt=function($t,Xt,re){return function(oe){$t(Xt,oe,re)}},jt=function($t,Xt,re){$t.done||($t.done=!0,re&&($t=re),$t.value=Xt,$t.state=_t,Ie($t,!0))},we=function($t,Xt,re){if(!$t.done){$t.done=!0,re&&($t=re);try{if($t.facade===Xt)throw new yt("Promise can't be resolved itself");var oe=Ce(Xt);oe?j(function(){var pe={done:!1};try{b(oe,Xt,zt(we,pe,$t),zt(jt,pe,$t))}catch(rn){jt(pe,rn,$t)}}):($t.value=Xt,$t.state=Vt,Ie($t,!1))}catch(pe){jt({done:!1},pe,$t)}}};if(Q&&(ht=function(Xt){N(this,pt),M(Xt),b(ne,this);var re=rt(this);try{Xt(zt(we,re),zt(jt,re))}catch(oe){jt(re,oe)}},pt=ht.prototype,ne=function(Xt){nt(this,{type:Z,done:!1,notified:!1,parent:!1,reactions:new V,rejection:!1,state:Dt,value:null})},ne.prototype=A(pt,"then",function(Xt,re){var oe=rt(this),pe=Ht(F(this,ht));return oe.parent=!0,pe.ok=L(Xt)?Xt:!0,pe.fail=L(re)&&re,pe.domain=p?Et.domain:void 0,oe.state===Dt?oe.reactions.add(pe):j(function(){Be(pe,oe)}),pe.promise}),ve=function(){var $t=new ne,Xt=rt($t);this.promise=$t,this.resolve=zt(we,Xt),this.reject=zt(jt,Xt)},J.f=Ht=function($t){return $t===ht||$t===le?new ve($t):Ut($t)},!g&&L(Y)&&ut!==Object.prototype)){fe=ut.then,et||A(ut,"then",function(Xt,re){var oe=this;return new ht(function(pe,rn){b(fe,oe,pe,rn)}).then(Xt,re)},{unsafe:!0});try{delete ut.constructor}catch($t){}I&&I(ut,pt)}v({global:!0,constructor:!0,wrap:!0,forced:Q},{Promise:ht}),le=y.Promise,R(ht,Z,!1,!0),O(Z)}),(function(T,P,a){"use strict";var v=a(46),g=a(388),p=a(17),x=a(33),y=x("species");T.exports=function(b,A){var I=v(b).constructor,R;return I===void 0||p(R=v(I)[y])?A:g(R)}}),(function(T,P,a){"use strict";var v=a(89),g=a(31),p=TypeError;T.exports=function(x){if(v(x))return x;throw new p(g(x)+" is not a constructor")}}),(function(T,P,a){"use strict";var v=a(4),g=a(117),p=a(84),x=a(21),y=a(38),b=a(7),A=a(74),I=a(76),R=a(42),O=a(390),M=a(391),L=a(189),D=v.setImmediate,N=v.clearImmediate,F=v.process,G=v.Dispatch,j=v.Function,X=v.MessageChannel,U=v.String,V=0,k={},Y="onreadystatechange",K,J,Z,Q;b(function(){K=v.location});var at=function(ut){if(y(k,ut)){var ht=k[ut];delete k[ut],ht()}},et=function(ut){return function(){at(ut)}},rt=function(ut){at(ut.data)},nt=function(ut){v.postMessage(U(ut),K.protocol+"//"+K.host)};(!D||!N)&&(D=function(ht){O(arguments.length,1);var pt=x(ht)?ht:j(ht),yt=I(arguments,1);return k[++V]=function(){g(pt,void 0,yt)},J(V),V},N=function(ht){delete k[ht]},L?J=function(ut){F.nextTick(et(ut))}:G&&G.now?J=function(ut){G.now(et(ut))}:X&&!M?(Z=new X,Q=Z.port2,Z.port1.onmessage=rt,J=p(Q.postMessage,Q)):v.addEventListener&&x(v.postMessage)&&!v.importScripts&&K&&K.protocol!=="file:"&&!b(nt)?(J=nt,v.addEventListener("message",rt,!1)):Y in R("script")?J=function(ut){A.appendChild(R("script"))[Y]=function(){A.removeChild(this),at(ut)}}:J=function(ut){setTimeout(et(ut),0)}),T.exports={set:D,clear:N}}),(function(T){"use strict";var P=TypeError;T.exports=function(a,v){if(a<v)throw new P("Not enough arguments");return a}}),(function(T,P,a){"use strict";var v=a(28);T.exports=/ipad|iphone|ipod/i.test(v)&&/applewebkit/i.test(v)}),(function(T,P,a){"use strict";var v=a(4),g=a(393),p=a(84),x=a(389).set,y=a(394),b=a(391),A=a(395),I=a(396),R=a(189),O=v.MutationObserver||v.WebKitMutationObserver,M=v.document,L=v.process,D=v.Promise,N=g("queueMicrotask"),F,G,j,X,U;if(!N){var V=new y,k=function(){var Y,K;for(R&&(Y=L.domain)&&Y.exit();K=V.get();)try{K()}catch(J){throw V.head&&F(),J}Y&&Y.enter()};!b&&!R&&!I&&O&&M?(G=!0,j=M.createTextNode(""),new O(k).observe(j,{characterData:!0}),F=function(){j.data=G=!G}):!A&&D&&D.resolve?(X=D.resolve(void 0),X.constructor=D,U=p(X.then,X),F=function(){U(k)}):R?F=function(){L.nextTick(k)}:(x=p(x,v),F=function(){x(k)}),N=function(Y){V.head||F(),V.add(Y)}}T.exports=N}),(function(T,P,a){"use strict";var v=a(4),g=a(6),p=Object.getOwnPropertyDescriptor;T.exports=function(x){if(!g)return v[x];var y=p(v,x);return y&&y.value}}),(function(T){"use strict";var P=function(){this.head=null,this.tail=null};P.prototype={add:function(a){var v={item:a,next:null},g=this.tail;g?g.next=v:this.head=v,this.tail=v},get:function(){var a=this.head;if(a){var v=this.head=a.next;return v===null&&(this.tail=null),a.item}}},T.exports=P}),(function(T,P,a){"use strict";var v=a(28);T.exports=/ipad|iphone|ipod/i.test(v)&&typeof Pebble!="undefined"}),(function(T,P,a){"use strict";var v=a(28);T.exports=/web0s(?!.*chrome)/i.test(v)}),(function(T){"use strict";T.exports=function(P,a){try{arguments.length===1?console.error(P):console.error(P,a)}catch(v){}}}),(function(T){"use strict";T.exports=function(P){try{return{error:!1,value:P()}}catch(a){return{error:!0,value:a}}}}),(function(T,P,a){"use strict";var v=a(4);T.exports=v.Promise}),(function(T,P,a){"use strict";var v=a(4),g=a(399),p=a(21),x=a(67),y=a(50),b=a(33),A=a(190),I=a(36),R=a(27),O=g&&g.prototype,M=b("species"),L=!1,D=p(v.PromiseRejectionEvent),N=x("Promise",function(){var F=y(g),G=F!==String(g);if(!G&&R===66||I&&!(O.catch&&O.finally))return!0;if(!R||R<51||!/native code/.test(F)){var j=new g(function(V){V(1)}),X=function(V){V(function(){},function(){})},U=j.constructor={};if(U[M]=X,L=j.then(function(){})instanceof X,!L)return!0}return!G&&(A==="BROWSER"||A==="DENO")&&!D});T.exports={CONSTRUCTOR:N,REJECTION_EVENT:D,SUBCLASSING:L}}),(function(T,P,a){"use strict";var v=a(30),g=TypeError,p=function(x){var y,b;this.promise=new x(function(A,I){if(y!==void 0||b!==void 0)throw new g("Bad Promise constructor");y=A,b=I}),this.resolve=v(y),this.reject=v(b)};T.exports.f=function(x){return new p(x)}}),(function(T,P,a){"use strict";var v=a(3),g=a(8),p=a(30),x=a(401),y=a(398),b=a(137),A=a(403);v({target:"Promise",stat:!0,forced:A},{all:function(R){var O=this,M=x.f(O),L=M.resolve,D=M.reject,N=y(function(){var F=p(O.resolve),G=[],j=0,X=1;b(R,function(U){var V=j++,k=!1;X++,g(F,O,U).then(function(Y){k||(k=!0,G[V]=Y,--X||L(G))},D)}),--X||L(G)});return N.error&&D(N.value),M.promise}})}),(function(T,P,a){"use strict";var v=a(399),g=a(172),p=a(400).CONSTRUCTOR;T.exports=p||!g(function(x){v.all(x).then(void 0,function(){})})}),(function(T,P,a){"use strict";var v=a(3),g=a(36),p=a(400).CONSTRUCTOR,x=a(399),y=a(23),b=a(21),A=a(47),I=x&&x.prototype;if(v({target:"Promise",proto:!0,forced:p,real:!0},{catch:function(O){return this.then(void 0,O)}}),!g&&b(x)){var R=y("Promise").prototype.catch;I.catch!==R&&A(I,"catch",R,{unsafe:!0})}}),(function(T,P,a){"use strict";var v=a(3),g=a(8),p=a(30),x=a(401),y=a(398),b=a(137),A=a(403);v({target:"Promise",stat:!0,forced:A},{race:function(R){var O=this,M=x.f(O),L=M.reject,D=y(function(){var N=p(O.resolve);b(R,function(F){g(N,O,F).then(M.resolve,L)})});return D.error&&L(D.value),M.promise}})}),(function(T,P,a){"use strict";var v=a(3),g=a(401),p=a(400).CONSTRUCTOR;v({target:"Promise",stat:!0,forced:p},{reject:function(y){var b=g.f(this),A=b.reject;return A(y),b.promise}})}),(function(T,P,a){"use strict";var v=a(3),g=a(23),p=a(36),x=a(399),y=a(400).CONSTRUCTOR,b=a(408),A=g("Promise"),I=p&&!y;v({target:"Promise",stat:!0,forced:p||y},{resolve:function(O){return b(I&&this===A?x:this,O)}})}),(function(T,P,a){"use strict";var v=a(46),g=a(20),p=a(401);T.exports=function(x,y){if(v(x),g(y)&&y.constructor===x)return y;var b=p.f(x),A=b.resolve;return A(y),b.promise}}),(function(T,P,a){"use strict";var v=a(3),g=a(8),p=a(30),x=a(401),y=a(398),b=a(137),A=a(403);v({target:"Promise",stat:!0,forced:A},{allSettled:function(R){var O=this,M=x.f(O),L=M.resolve,D=M.reject,N=y(function(){var F=p(O.resolve),G=[],j=0,X=1;b(R,function(U){var V=j++,k=!1;X++,g(F,O,U).then(function(Y){k||(k=!0,G[V]={status:"fulfilled",value:Y},--X||L(G))},function(Y){k||(k=!0,G[V]={status:"rejected",reason:Y},--X||L(G))})}),--X||L(G)});return N.error&&D(N.value),M.promise}})}),(function(T,P,a){"use strict";var v=a(3),g=a(8),p=a(30),x=a(23),y=a(401),b=a(398),A=a(137),I=a(403),R="No one promise resolved";v({target:"Promise",stat:!0,forced:I},{any:function(M){var L=this,D=x("AggregateError"),N=y.f(L),F=N.resolve,G=N.reject,j=b(function(){var X=p(L.resolve),U=[],V=0,k=1,Y=!1;A(M,function(K){var J=V++,Z=!1;k++,g(X,L,K).then(function(Q){Z||Y||(Y=!0,F(Q))},function(Q){Z||Y||(Z=!0,U[J]=Q,--k||G(new D(U,R)))})}),--k||G(new D(U,R))});return j.error&&G(j.value),N.promise}})}),(function(T,P,a){"use strict";var v=a(3),g=a(36),p=a(399),x=a(7),y=a(23),b=a(21),A=a(387),I=a(408),R=a(47),O=p&&p.prototype,M=!!p&&x(function(){O.finally.call({then:function(){}},function(){})});if(v({target:"Promise",proto:!0,real:!0,forced:M},{finally:function(D){var N=A(this,y("Promise")),F=b(D);return this.then(F?function(G){return I(N,D()).then(function(){return G})}:D,F?function(G){return I(N,D()).then(function(){throw G})}:D)}}),!g&&b(p)){var L=y("Promise").prototype.finally;O.finally!==L&&R(O,"finally",L,{unsafe:!0})}}),(function(T,P,a){"use strict";var v=a(3),g=a(4),p=a(117),x=a(76),y=a(408),b=a(401),A=a(30),I=a(398),R=a(7),O=g.Promise,M=!1,L=!O||!O.try||R(function(){var D=O.resolve();return O.try(function(N){return M=N===8,D},8)!==D})||!M;v({target:"Promise",stat:!0,forced:L},{try:function(D){var N=arguments.length>1?x(arguments,1):[],F=I(function(){return p(A(D),void 0,N)});if(!F.error)return y(this,F.value);var G=b.f(this),j=G.reject;return j(F.value),G.promise}})}),(function(T,P,a){"use strict";var v=a(3),g=a(401);v({target:"Promise",stat:!0},{withResolvers:function(){var x=g.f(this);return{promise:x.promise,resolve:x.resolve,reject:x.reject}}})}),(function(T,P,a){"use strict";var v=a(3),g=a(415),p=a(7),x=Array.fromAsync,y=!x||p(function(){var b=0;return x.call(function(){return b++,[]},{length:0}),b!==1});v({target:"Array",stat:!0,forced:y},{fromAsync:g})}),(function(T,P,a){"use strict";var v=a(84),g=a(14),p=a(89),x=a(416),y=a(140),b=a(269),A=a(141),I=a(29),R=a(23),O=a(206),M=a(33),L=a(417),D=a(419).toArray,N=M("asyncIterator"),F=g(O("Array","values")),G=g(F([]).next),j=function(){return new X(this)},X=function(U){this.iterator=F(U)};X.prototype.next=function(){return G(this.iterator)},T.exports=function(V){var k=this,Y=arguments.length,K=Y>1?arguments[1]:void 0,J=Y>2?arguments[2]:void 0;return new(R("Promise"))(function(Z){K!==void 0&&(K=v(K,J));var Q=I(V,N),at=Q?void 0:A(V)||j,et=p(k)?new k:[],rt=Q?x(V,Q):new L(b(y(V,at)));Z(D(rt,K,et))})}}),(function(T,P,a){"use strict";var v=a(8),g=a(417),p=a(46),x=a(140),y=a(269),b=a(29),A=a(33),I=A("asyncIterator");T.exports=function(R,O){var M=arguments.length<2?b(R,I):O;return M?p(v(M,R)):new g(y(x(R)))}}),(function(T,P,a){"use strict";var v=a(8),g=a(46),p=a(71),x=a(29),y=a(215),b=a(51),A=a(142),I=a(23),R=a(418),O=a(180),M=I("Promise"),L="AsyncFromSyncIterator",D=b.set,N=b.getterFor(L),F=function(j,X,U,V,k){var Y=j.done;M.resolve(j.value).then(function(K){X(O(K,Y))},function(K){if(!Y&&k)try{A(V,"throw",K)}catch(J){K=J}U(K)})},G=function(X){X.type=L,D(this,X)};G.prototype=y(p(R),{next:function(){var X=N(this),U=arguments.length>0,V=U?arguments[0]:void 0;return new M(function(k,Y){var K=g(U?v(X.next,X.iterator,V):v(X.next,X.iterator));F(K,k,Y,X.iterator,!0)})},return:function(){var j=N(this),X=j.iterator,U=arguments.length>0,V=U?arguments[0]:void 0;return new M(function(k,Y){var K=x(X,"return");if(K===void 0)return k(O(V,!0));var J=g(U?v(K,X,V):v(K,X));F(J,k,Y,X)})},throw:function(){var j=N(this),X=j.iterator,U=arguments.length>0,V=U?arguments[0]:void 0;return new M(function(k,Y){var K=x(X,"throw");if(K===void 0){try{A(X,"normal")}catch(Z){return Y(Z)}return Y(new TypeError("The iterator does not provide a throw method"))}var J=g(U?v(K,X,V):v(K,X));F(J,k,Y,X,!0)})}}),T.exports=G}),(function(T,P,a){"use strict";var v=a(4),g=a(35),p=a(21),x=a(71),y=a(135),b=a(47),A=a(33),I=a(36),R="USE_FUNCTION_CONSTRUCTOR",O=A("asyncIterator"),M=v.AsyncIterator,L=g.AsyncIteratorPrototype,D,N;if(L)D=L;else if(p(M))D=M.prototype;else if(g[R]||v[R])try{N=y(y(y(Function("return async function*(){}()")()))),y(N)===Object.prototype&&(D=N)}catch(F){}D?I&&(D=x(D)):D={},p(D[O])||b(D,O,function(){return this}),T.exports=D}),(function(T,P,a){"use strict";var v=a(8),g=a(30),p=a(46),x=a(20),y=a(148),b=a(23),A=a(90),I=a(149),R=a(269),O=a(420),M=function(L){var D=L===0,N=L===1,F=L===2,G=L===3;return function(j,X,U){p(j);var V=X!==void 0;(V||!D)&&g(X);var k=R(j),Y=b("Promise"),K=k.iterator,J=k.next,Z=0;return new Y(function(Q,at){var et=function(nt){O(K,at,nt,at)},rt=function(){try{try{y(Z)}catch(nt){return et(nt)}Y.resolve(p(v(J,K))).then(function(nt){try{if(p(nt).done)D?(I(U,Z),Q(U)):Q(G?!1:F||void 0);else{var ut=nt.value;try{if(V){var ht=Z++,pt=X(ut,ht),yt=function(At){if(N)rt();else if(F)At?rt():O(K,Q,!1,at);else if(D)try{A(U,ht,At),rt()}catch(Et){et(Et)}else At?O(K,Q,G||ut,at):rt()};x(pt)?Y.resolve(pt).then(yt,et):yt(pt)}else A(U,Z++,ut),rt()}catch(At){et(At)}}}catch(At){at(At)}},at)}catch(nt){at(nt)}};rt()})}};T.exports={toArray:M(0),forEach:M(1),every:M(2),some:M(3),find:M(4)}}),(function(T,P,a){"use strict";var v=a(8),g=a(46),p=a(23),x=a(29);T.exports=function(y,b,A,I){try{var R=x(y,"return");if(R)return p("Promise").resolve(v(R,y)).then(function(O){try{b!==I&&g(O)}catch(M){I(M);return}b(A)},function(O){b===I?b(A):I(O)})}catch(O){return I(b===I?A:O)}b(A)}}),(function(T,P,a){"use strict";var v=a(3),g=a(6),p=a(23),x=a(30),y=a(216),b=a(47),A=a(215),I=a(77),R=a(33),O=a(51),M=a(255),L=a(27),D=p("Promise"),N=p("SuppressedError"),F=ReferenceError,G=R("asyncDispose"),j=R("toStringTag"),X="AsyncDisposableStack",U=O.set,V=O.getterFor(X),k="async-dispose",Y="disposed",K="pending",J=function(et){var rt=V(et);if(rt.state===Y)throw new F(X+" already disposed");return rt},Z=function(){U(y(this,Q),{type:X,state:K,stack:[]}),g||(this.disposed=!1)},Q=Z.prototype;A(Q,{disposeAsync:function(){var rt=this;return new D(function(nt,ut){var ht=V(rt);if(ht.state===Y)return nt(void 0);ht.state=Y,g||(rt.disposed=!0);var pt=ht.stack,yt=pt.length,At=!1,Et,Ht=function(kt){At?Et=new N(kt,Et):(At=!0,Et=kt),Ut()},Ut=function(){if(yt){var kt=pt[--yt];pt[yt]=null;try{D.resolve(kt()).then(Ut,Ht)}catch(Ct){Ht(Ct)}}else ht.stack=null,At?ut(Et):nt(void 0)};Ut()})},use:function(rt){return M(J(this),rt,k),rt},adopt:function(rt,nt){var ut=J(this);return x(nt),M(ut,void 0,k,function(){return nt(rt)}),rt},defer:function(rt){var nt=J(this);x(rt),M(nt,void 0,k,rt)},move:function(){var rt=J(this),nt=new Z;return V(nt).stack=rt.stack,rt.stack=[],rt.state=Y,g||(this.disposed=!0),nt}}),g&&I(Q,"disposed",{configurable:!0,get:function(){return V(this).state===Y}}),b(Q,G,Q.disposeAsync,{name:"disposeAsync"}),b(Q,j,X,{nonWritable:!0});var at=L&&L<136;v({global:!0,constructor:!0,forced:at},{AsyncDisposableStack:Z})}),(function(T,P,a){"use strict";var v=a(8),g=a(47),p=a(23),x=a(29),y=a(38),b=a(33),A=a(418),I=b("asyncDispose"),R=p("Promise");y(A,I)||g(A,I,function(){var O=this;return new R(function(M,L){var D=x(O,"return");D?R.resolve(v(D,O)).then(function(){M(void 0)},L):M(void 0)})})}),(function(T,P,a){"use strict";var v=a(3),g=a(117),p=a(30),x=a(46),y=a(7),b=!y(function(){Reflect.apply(function(){})});v({target:"Reflect",stat:!0,forced:b},{apply:function(I,R,O){return g(p(I),R,x(O))}})}),(function(T,P,a){"use strict";var v=a(3),g=a(23),p=a(117),x=a(258),y=a(388),b=a(46),A=a(20),I=a(71),R=a(7),O=g("Reflect","construct"),M=Object.prototype,L=[].push,D=R(function(){function G(){}return!(O(function(){},[],G)instanceof G)}),N=!R(function(){O(function(){})}),F=D||N;v({target:"Reflect",stat:!0,forced:F,sham:F},{construct:function(j,X){y(j);var U=arguments.length<3?j:y(arguments[2]);if(b(X),N&&!D)return O(j,X,U);if(j===U){switch(X.length){case 0:return new j;case 1:return new j(X[0]);case 2:return new j(X[0],X[1]);case 3:return new j(X[0],X[1],X[2]);case 4:return new j(X[0],X[1],X[2],X[3])}var V=[null];return p(L,V,X),new(p(x,j,V))}var k=U.prototype,Y=I(A(k)?k:M),K=p(j,Y,X);return A(K)?K:Y}})}),(function(T,P,a){"use strict";var v=a(3),g=a(6),p=a(46),x=a(18),y=a(44),b=a(21),A=a(7),I=TypeError,R=A(function(){Reflect.defineProperty(y.f({},1,{value:1}),1,{value:2})});v({target:"Reflect",stat:!0,forced:R,sham:!g},{defineProperty:function(M,L,D){p(M);var N=x(L),F,G;if(p(D),("get"in D||"set"in D)&&("get"in D&&!b(F=D.get)&&F!==void 0||"set"in D&&!b(G=D.set)&&G!==void 0||"value"in D||"writable"in D))throw new I("Invalid property descriptor");try{return y.f(M,N,D),!0}catch(j){return!1}}})}),(function(T,P,a){"use strict";var v=a(3),g=a(46),p=a(5).f,x=a(18);v({target:"Reflect",stat:!0},{deleteProperty:function(b,A){g(b);var I=x(A),R=p(b,I);return R&&!R.configurable?!1:delete b[I]}})}),(function(T,P,a){"use strict";var v=a(3),g=a(8),p=a(20),x=a(46),y=a(428),b=a(5),A=a(135),I=a(18),R=function(O,M,L){if(x(O)===L)return O[M];var D=b.f(O,M);if(D)return y(D)?D.value:D.get===void 0?void 0:g(D.get,L);var N=A(O);if(p(N))return R(N,M,L)};v({target:"Reflect",stat:!0},{get:function(M,L){return R(x(M),I(L),arguments.length<3?M:arguments[2])}})}),(function(T,P,a){"use strict";var v=a(38);T.exports=function(g){return g!==void 0&&(v(g,"value")||v(g,"writable"))}}),(function(T,P,a){"use strict";var v=a(3),g=a(6),p=a(46),x=a(5);v({target:"Reflect",stat:!0,sham:!g},{getOwnPropertyDescriptor:function(b,A){return x.f(p(b),A)}})}),(function(T,P,a){"use strict";var v=a(3),g=a(46),p=a(135),x=a(136);v({target:"Reflect",stat:!0,sham:!x},{getPrototypeOf:function(b){return p(g(b))}})}),(function(T,P,a){"use strict";var v=a(3);v({target:"Reflect",stat:!0},{has:function(p,x){return x in p}})}),(function(T,P,a){"use strict";var v=a(3),g=a(46),p=a(301);v({target:"Reflect",stat:!0},{isExtensible:function(y){return g(y),p(y)}})}),(function(T,P,a){"use strict";var v=a(3),g=a(56);v({target:"Reflect",stat:!0},{ownKeys:g})}),(function(T,P,a){"use strict";var v=a(3),g=a(23),p=a(46),x=a(295);v({target:"Reflect",stat:!0,sham:!x},{preventExtensions:function(b){p(b);try{var A=g("Object","preventExtensions");return A&&A(b),!0}catch(I){return!1}}})}),(function(T,P,a){"use strict";var v=a(3),g=a(8),p=a(46),x=a(20),y=a(428),b=a(7),A=a(44),I=a(5),R=a(135),O=a(11),M=a(18),L=function(N,F,G,j){var X=I.f(p(N),F),U,V,k;if(!X){if(x(V=R(N)))return L(V,F,G,j);X=O(0)}if(y(X)){if(X.writable===!1||!x(j))return!1;if(U=I.f(j,F)){if(!y(U)||U.writable===!1)return!1;A.f(j,F,{value:G})}else try{A.f(j,F,O(0,G))}catch(Y){return!1}}else{if(k=X.set,k===void 0)return!1;g(k,j,G)}return!0},D=b(function(){var N=function(){},F=A.f(new N,"a",{configurable:!0});return Reflect.set(N.prototype,"a",1,F)!==!1});v({target:"Reflect",stat:!0,forced:D},{set:function(F,G,j){return L(p(F),M(G),j,arguments.length<4?F:arguments[3])}})}),(function(T,P,a){"use strict";var v=a(3),g=a(46),p=a(121),x=a(119);x&&v({target:"Reflect",stat:!0},{setPrototypeOf:function(b,A){g(b),p(A);try{return x(b,A),!0}catch(I){return!1}}})}),(function(T,P,a){"use strict";var v=a(3),g=a(4),p=a(82);v({global:!0},{Reflect:{}}),p(g.Reflect,"Reflect",!0)}),(function(T,P,a){"use strict";var v=a(6),g=a(4),p=a(14),x=a(67),y=a(124),b=a(43),A=a(71),I=a(57).f,R=a(24),O=a(439),M=a(68),L=a(440),D=a(443),N=a(123),F=a(47),G=a(7),j=a(38),X=a(51).enforce,U=a(201),V=a(33),k=a(444),Y=a(445),K=V("match"),J=g.RegExp,Z=J.prototype,Q=g.SyntaxError,at=p(Z.exec),et=p("".charAt),rt=p("".replace),nt=p("".indexOf),ut=p("".slice),ht=/^\?<[^\s\d!#%&*+<=>@^][^\s!#%&*+<=>@^]*>/,pt=/a/g,yt=/a/g,At=new J(pt)!==pt,Et=D.MISSED_STICKY,Ht=D.UNSUPPORTED_Y,Ut=v&&(!At||Et||k||Y||G(function(){return yt[K]=!1,J(pt)!==pt||J(yt)===yt||String(J(pt,"i"))!=="/a/i"})),kt=function(_t){for(var Nt=_t.length,Jt=0,ne="",ve=!1,le;Jt<Nt;Jt++){if(le=et(_t,Jt),le==="\\"){ne+=le+et(_t,++Jt);continue}!ve&&le==="."?ne+="[\\s\\S]":(le==="["?ve=!0:le==="]"&&(ve=!1),ne+=le)}return ne},Ct=function(_t){for(var Nt=_t.length,Jt=0,ne="",ve=[],le=A(null),fe=!1,Ce=!1,Be=0,Ie="",ce;Jt<Nt;Jt++){if(ce=et(_t,Jt),ce==="\\"){if(ce+=et(_t,++Jt),!Ce&&et(ce,1)==="\\"){ne+="\\x5c";continue}}else if(ce==="]")fe=!1;else if(!fe)switch(!0){case ce==="[":fe=!0;break;case ce==="(":ne+=ce,at(ht,ut(_t,Jt+1))?(Jt+=2,Ce=!0,Be++):et(_t,Jt+1)!=="?"&&Be++;continue;case(ce===">"&&Ce):if(Ie===""||j(le,Ie))throw new Q("Invalid capture group name");le[Ie]=!0,ve[ve.length]=[Ie,Be],Ce=!1,Ie="";continue}Ce?Ie+=ce:ne+=ce}for(var xe=0;xe<ve.length;xe++)for(var Ue="\\k<"+ve[xe][0]+">",Pt="\\"+ve[xe][1];nt(ne,Ue)>-1;)ne=rt(ne,Ue,Pt);return[ne,ve]};if(x("RegExp",Ut)){for(var It=function(Nt,Jt){var ne=R(Z,this),ve=O(Nt),le=Jt===void 0,fe=[],Ce=Nt,Be,Ie,ce,xe,Ue,Pt;if(!ne&&ve&&le&&Nt.constructor===It)return Nt;if((ve||R(Z,Nt))&&(Nt=Nt.source,le&&(Jt=L(Ce))),Nt=Nt===void 0?"":M(Nt),Jt=Jt===void 0?"":M(Jt),Ce=Nt,k&&"dotAll"in pt&&(Ie=!!Jt&&nt(Jt,"s")>-1,Ie&&(Jt=rt(Jt,/s/g,""))),Be=Jt,Et&&"sticky"in pt&&(ce=!!Jt&&nt(Jt,"y")>-1,ce&&Ht&&(Jt=rt(Jt,/y/g,""))),Y&&(xe=Ct(Nt),Nt=xe[0],fe=xe[1]),Ue=y(J(Nt,Jt),ne?this:Z,It),(Ie||ce||fe.length)&&(Pt=X(Ue),Ie&&(Pt.dotAll=!0,Pt.raw=It(kt(Nt),Be)),ce&&(Pt.sticky=!0),fe.length&&(Pt.groups=fe)),Nt!==Ce)try{b(Ue,"source",Ce===""?"(?:)":Ce)}catch(zt){}return Ue},Dt=I(J),Vt=0;Dt.length>Vt;)N(It,J,Dt[Vt++]);Z.constructor=It,It.prototype=Z,F(g,"RegExp",It,{constructor:!0})}U("RegExp")}),(function(T,P,a){"use strict";var v=a(20),g=a(15),p=a(33),x=p("match");T.exports=function(y){var b;return v(y)&&((b=y[x])!==void 0?!!b:g(y)==="RegExp")}}),(function(T,P,a){"use strict";var v=a(8),g=a(38),p=a(24),x=a(441),y=a(442),b=RegExp.prototype;T.exports=x.correct?function(A){return A.flags}:function(A){return!x.correct&&p(b,A)&&!g(A,"flags")?v(y,A):A.flags}}),(function(T,P,a){"use strict";var v=a(4),g=a(7),p=v.RegExp,x=!g(function(){var y=!0;try{p(".","d")}catch(D){y=!1}var b={},A="",I=y?"dgimsy":"gimsy",R=function(D,N){Object.defineProperty(b,D,{get:function(){return A+=N,!0}})},O={dotAll:"s",global:"g",ignoreCase:"i",multiline:"m",sticky:"y"};y&&(O.hasIndices="d");for(var M in O)R(M,O[M]);var L=Object.getOwnPropertyDescriptor(p.prototype,"flags").get.call(b);return L!==I||A!==I});T.exports={correct:x}}),(function(T,P,a){"use strict";var v=a(46);T.exports=function(){var g=v(this),p="";return g.hasIndices&&(p+="d"),g.global&&(p+="g"),g.ignoreCase&&(p+="i"),g.multiline&&(p+="m"),g.dotAll&&(p+="s"),g.unicode&&(p+="u"),g.unicodeSets&&(p+="v"),g.sticky&&(p+="y"),p}}),(function(T,P,a){"use strict";var v=a(7),g=a(4),p=g.RegExp,x=v(function(){var A=p("a","y");return A.lastIndex=2,A.exec("abcd")!==null}),y=x||v(function(){return!p("a","y").sticky}),b=x||v(function(){var A=p("^r","gy");return A.lastIndex=2,A.exec("str")!==null});T.exports={BROKEN_CARET:b,MISSED_STICKY:y,UNSUPPORTED_Y:x}}),(function(T,P,a){"use strict";var v=a(7),g=a(4),p=g.RegExp;T.exports=v(function(){var x=p(".","s");return!(x.dotAll&&x.test(`
`)&&x.flags==="s")})}),(function(T,P,a){"use strict";var v=a(7),g=a(4),p=g.RegExp;T.exports=v(function(){var x=p("(?<a>b)","g");return x.exec("b").groups.a!=="b"||"b".replace(x,"$<a>c")!=="bc"})}),(function(T,P,a){"use strict";var v=a(3),g=a(14),p=a(447),x=a(38),y=a(248).start,b=a(333),A=Array,I=RegExp.escape,R=g("".charAt),O=g("".charCodeAt),M=g(1.1.toString),L=g([].join),D=/^[0-9a-z]/i,N=/^[$()*+./?[\\\]^{|}]/,F=RegExp("^[!\"#%&',\\-:;<=>@`~"+b+"]"),G=g(D.exec),j={" ":"t","\n":"n","\v":"v","\f":"f","\r":"r"},X=function(V){var k=M(O(V,0),16);return k.length<3?"\\x"+y(k,2,"0"):"\\u"+y(k,4,"0")},U=!I||I("ab")!=="\\x61b";v({target:"RegExp",stat:!0,forced:U},{escape:function(k){p(k);for(var Y=k.length,K=A(Y),J=0;J<Y;J++){var Z=R(k,J);if(J===0&&G(D,Z))K[J]=X(Z);else if(x(j,Z))K[J]="\\"+j[Z];else if(G(N,Z))K[J]="\\"+Z;else if(G(F,Z))K[J]=X(Z);else{var Q=O(Z,0);(Q&63488)!==55296?K[J]=Z:Q>=56320||J+1>=Y||(O(k,J+1)&64512)!==56320?K[J]=X(Z):(K[J]=Z,K[++J]=R(k,J))}}return L(K,"")}})}),(function(T){"use strict";var P=TypeError;T.exports=function(a){if(typeof a=="string")return a;throw new P("Argument is not a string")}}),(function(T,P,a){"use strict";var v=a(6),g=a(444),p=a(15),x=a(77),y=a(51).get,b=RegExp.prototype,A=TypeError;v&&g&&x(b,"dotAll",{configurable:!0,get:function(){if(this!==b){if(p(this)==="RegExp")return!!y(this).dotAll;throw new A("Incompatible receiver, RegExp required")}}})}),(function(T,P,a){"use strict";var v=a(3),g=a(450);v({target:"RegExp",proto:!0,forced:/./.exec!==g},{exec:g})}),(function(T,P,a){"use strict";var v=a(8),g=a(14),p=a(68),x=a(442),y=a(443),b=a(34),A=a(71),I=a(51).get,R=a(444),O=a(445),M=b("native-string-replace",String.prototype.replace),L=RegExp.prototype.exec,D=L,N=g("".charAt),F=g("".indexOf),G=g("".replace),j=g("".slice),X=(function(){var K=/a/,J=/b*/g;return v(L,K,"a"),v(L,J,"a"),K.lastIndex!==0||J.lastIndex!==0})(),U=y.BROKEN_CARET,V=/()??/.exec("")[1]!==void 0,k=X||V||U||R||O,Y=function(K,J){for(var Z=K.groups=A(null),Q=0;Q<J.length;Q++){var at=J[Q];Z[at[0]]=K[at[1]]}};k&&(D=function(J){var Z=this,Q=I(Z),at=p(J),et=Q.raw,rt,nt,ut;if(et)return et.lastIndex=Z.lastIndex,rt=v(D,et,at),Z.lastIndex=et.lastIndex,rt&&Q.groups&&Y(rt,Q.groups),rt;var ht=Q.groups,pt=U&&Z.sticky,yt=v(x,Z),At=Z.source,Et=0,Ht=at;if(pt){yt=G(yt,"y",""),F(yt,"g")===-1&&(yt+="g"),Ht=j(at,Z.lastIndex);var Ut=Z.lastIndex>0&&N(at,Z.lastIndex-1);Z.lastIndex>0&&(!Z.multiline||Z.multiline&&Ut!==`
`&&Ut!=="\r"&&Ut!=="\u2028"&&Ut!=="\u2029")&&(At="(?: (?:"+At+"))",Ht=" "+Ht,Et++),nt=new RegExp("^(?:"+At+")",yt)}V&&(nt=new RegExp("^"+At+"$(?!\\s)",yt)),X&&(ut=Z.lastIndex);var kt=v(L,pt?nt:Z,Ht);return pt?kt?(kt.input=at,kt[0]=j(kt[0],Et),kt.index=Z.lastIndex,Z.lastIndex+=kt[0].length):Z.lastIndex=0:X&&kt&&(Z.lastIndex=Z.global?kt.index+kt[0].length:ut),V&&kt&&kt.length>1&&v(M,kt[0],nt,function(){for(var Ct=1;Ct<arguments.length-2;Ct++)arguments[Ct]===void 0&&(kt[Ct]=void 0)}),kt&&ht&&Y(kt,ht),kt}),T.exports=D}),(function(T,P,a){"use strict";var v=a(6),g=a(77),p=a(441),x=a(442);v&&!p.correct&&(g(RegExp.prototype,"flags",{configurable:!0,get:x}),p.correct=!0)}),(function(T,P,a){"use strict";var v=a(6),g=a(443).MISSED_STICKY,p=a(15),x=a(77),y=a(51).get,b=RegExp.prototype,A=TypeError;v&&g&&x(b,"sticky",{configurable:!0,get:function(){if(this!==b){if(p(this)==="RegExp")return!!y(this).sticky;throw new A("Incompatible receiver, RegExp required")}}})}),(function(T,P,a){"use strict";a(449);var v=a(3),g=a(8),p=a(21),x=a(46),y=a(68),b=(function(){var I=!1,R=/[ac]/;return R.exec=function(){return I=!0,/./.exec.apply(this,arguments)},R.test("abc")===!0&&I})(),A=/./.test;v({target:"RegExp",proto:!0,forced:!b},{test:function(I){var R=x(this),O=y(I),M=R.exec;if(!p(M))return g(A,R,O);var L=g(M,R,O);return L===null?!1:(x(L),!0)}})}),(function(T,P,a){"use strict";var v=a(49).PROPER,g=a(47),p=a(46),x=a(68),y=a(7),b=a(440),A="toString",I=RegExp.prototype,R=I[A],O=y(function(){return R.call({source:"a",flags:"b"})!=="/a/b"}),M=v&&R.name!==A;(O||M)&&g(I,A,function(){var D=p(this),N=x(D.source),F=x(b(D));return"/"+N+"/"+F},{unsafe:!0})}),(function(T,P,a){"use strict";a(456)}),(function(T,P,a){"use strict";var v=a(299),g=a(303);v("Set",function(p){return function(){return p(this,arguments.length?arguments[0]:void 0)}},g)}),(function(T,P,a){"use strict";var v=a(3),g=a(458),p=a(7),x=a(466),y=!x("difference",function(A){return A.size===0}),b=y||p(function(){var A={size:1,has:function(){return!0},keys:function(){var R=0;return{next:function(){var O=R++>1;return I.has(1)&&I.clear(),{done:O,value:2}}}}},I=new Set([1,2,3,4]);return I.difference(A).size!==3});v({target:"Set",proto:!0,real:!0,forced:b},{difference:g})}),(function(T,P,a){"use strict";var v=a(459),g=a(460),p=a(461),x=a(464),y=a(465),b=a(462),A=a(463),I=g.has,R=g.remove;T.exports=function(M){var L=v(this),D=y(M),N=p(L);return x(N)<=D.size?b(N,function(F){D.includes(F)&&R(N,F)}):A(D.getIterator(),function(F){I(N,F)&&R(N,F)}),N}}),(function(T,P,a){"use strict";var v=a(460).has;T.exports=function(g){return v(g),g}}),(function(T,P,a){"use strict";var v=a(14),g=Set.prototype;T.exports={Set,add:v(g.add),has:v(g.has),remove:v(g.delete),proto:g}}),(function(T,P,a){"use strict";var v=a(460),g=a(462),p=v.Set,x=v.add;T.exports=function(y){var b=new p;return g(y,function(A){x(b,A)}),b}}),(function(T,P,a){"use strict";var v=a(14),g=a(463),p=a(460),x=p.Set,y=p.proto,b=v(y.forEach),A=v(y.keys),I=A(new x).next;T.exports=function(R,O,M){return M?g({iterator:A(R),next:I},O):b(R,O)}}),(function(T,P,a){"use strict";var v=a(8);T.exports=function(g,p,x){for(var y=x?g:g.iterator,b=g.next,A,I;!(A=v(b,y)).done;)if(I=p(A.value),I!==void 0)return I}}),(function(T,P,a){"use strict";var v=a(120),g=a(460);T.exports=v(g.proto,"size","get")||function(p){return p.size}}),(function(T,P,a){"use strict";var v=a(30),g=a(46),p=a(8),x=a(61),y=a(269),b="Invalid size",A=RangeError,I=TypeError,R=Math.max,O=function(M,L){this.set=M,this.size=R(L,0),this.has=v(M.has),this.keys=v(M.keys)};O.prototype={getIterator:function(){return y(g(p(this.keys,this.set)))},includes:function(M){return p(this.has,this.set,M)}},T.exports=function(M){g(M);var L=+M.size;if(L!==L)throw new I(b);var D=x(L);if(D<0)throw new A(b);return new O(M,D)}}),(function(T,P,a){"use strict";var v=a(23),g=function(x){return{size:x,has:function(){return!1},keys:function(){return{next:function(){return{done:!0}}}}}},p=function(x){return{size:x,has:function(){return!0},keys:function(){throw new Error("e")}}};T.exports=function(x,y){var b=v("Set");try{new b()[x](g(0));try{return new b()[x](g(-1)),!1}catch(I){if(!y)return!0;try{return new b()[x](p(-1/0)),!1}catch(R){var A=new b([1,2]);return y(A[x](p(1/0)))}}}catch(I){return!1}}}),(function(T,P,a){"use strict";var v=a(3),g=a(7),p=a(468),x=a(466),y=!x("intersection",function(b){return b.size===2&&b.has(1)&&b.has(2)})||g(function(){return String(Array.from(new Set([1,2,3]).intersection(new Set([3,2]))))!=="3,2"});v({target:"Set",proto:!0,real:!0,forced:y},{intersection:p})}),(function(T,P,a){"use strict";var v=a(459),g=a(460),p=a(464),x=a(465),y=a(462),b=a(463),A=g.Set,I=g.add,R=g.has;T.exports=function(M){var L=v(this),D=x(M),N=new A;return p(L)>D.size?b(D.getIterator(),function(F){R(L,F)&&I(N,F)}):y(L,function(F){D.includes(F)&&I(N,F)}),N}}),(function(T,P,a){"use strict";var v=a(3),g=a(470),p=a(466),x=!p("isDisjointFrom",function(y){return!y});v({target:"Set",proto:!0,real:!0,forced:x},{isDisjointFrom:g})}),(function(T,P,a){"use strict";var v=a(459),g=a(460).has,p=a(464),x=a(465),y=a(462),b=a(463),A=a(142);T.exports=function(R){var O=v(this),M=x(R);if(p(O)<=M.size)return y(O,function(D){if(M.includes(D))return!1},!0)!==!1;var L=M.getIterator();return b(L,function(D){if(g(O,D))return A(L.iterator,"normal",!1)})!==!1}}),(function(T,P,a){"use strict";var v=a(3),g=a(472),p=a(466),x=!p("isSubsetOf",function(y){return y});v({target:"Set",proto:!0,real:!0,forced:x},{isSubsetOf:g})}),(function(T,P,a){"use strict";var v=a(459),g=a(464),p=a(462),x=a(465);T.exports=function(b){var A=v(this),I=x(b);return g(A)>I.size?!1:p(A,function(R){if(!I.includes(R))return!1},!0)!==!1}}),(function(T,P,a){"use strict";var v=a(3),g=a(474),p=a(466),x=!p("isSupersetOf",function(y){return!y});v({target:"Set",proto:!0,real:!0,forced:x},{isSupersetOf:g})}),(function(T,P,a){"use strict";var v=a(459),g=a(460).has,p=a(464),x=a(465),y=a(463),b=a(142);T.exports=function(I){var R=v(this),O=x(I);if(p(R)<O.size)return!1;var M=O.getIterator();return y(M,function(L){if(!g(R,L))return b(M.iterator,"normal",!1)})!==!1}}),(function(T,P,a){"use strict";var v=a(3),g=a(476),p=a(477),x=a(466),y=!x("symmetricDifference")||!p("symmetricDifference");v({target:"Set",proto:!0,real:!0,forced:y},{symmetricDifference:g})}),(function(T,P,a){"use strict";var v=a(459),g=a(460),p=a(461),x=a(465),y=a(463),b=g.add,A=g.has,I=g.remove;T.exports=function(O){var M=v(this),L=x(O).getIterator(),D=p(M);return y(L,function(N){A(M,N)?I(D,N):b(D,N)}),D}}),(function(T){"use strict";T.exports=function(P){try{var a=new Set,v={size:0,has:function(){return!0},keys:function(){return Object.defineProperty({},"next",{get:function(){return a.clear(),a.add(4),function(){return{done:!0}}}})}},g=a[P](v);return g.size===1&&g.values().next().value===4}catch(p){return!1}}}),(function(T,P,a){"use strict";var v=a(3),g=a(479),p=a(477),x=a(466),y=!x("union")||!p("union");v({target:"Set",proto:!0,real:!0,forced:y},{union:g})}),(function(T,P,a){"use strict";var v=a(459),g=a(460).add,p=a(461),x=a(465),y=a(463);T.exports=function(A){var I=v(this),R=x(A).getIterator(),O=p(I);return y(R,function(M){g(O,M)}),O}}),(function(T,P,a){"use strict";var v=a(3),g=a(14),p=a(16),x=a(61),y=a(68),b=a(7),A=g("".charAt),I=b(function(){return"\u{20BB7}".at(-2)!=="\uD842"});v({target:"String",proto:!0,forced:I},{at:function(O){var M=y(p(this)),L=M.length,D=x(O),N=D>=0?D:L+D;return N<0||N>=L?void 0:A(M,N)}})}),(function(T,P,a){"use strict";var v=a(3),g=a(482).codeAt;v({target:"String",proto:!0},{codePointAt:function(x){return g(this,x)}})}),(function(T,P,a){"use strict";var v=a(14),g=a(61),p=a(68),x=a(16),y=v("".charAt),b=v("".charCodeAt),A=v("".slice),I=function(R){return function(O,M){var L=p(x(O)),D=g(M),N=L.length,F,G;return D<0||D>=N?R?"":void 0:(F=b(L,D),F<55296||F>56319||D+1===N||(G=b(L,D+1))<56320||G>57343?R?y(L,D):F:R?A(L,D,D+2):(F-55296<<10)+(G-56320)+65536)}};T.exports={codeAt:I(!1),charAt:I(!0)}}),(function(T,P,a){"use strict";var v=a(3),g=a(85),p=a(5).f,x=a(64),y=a(68),b=a(484),A=a(16),I=a(485),R=a(36),O=g("".slice),M=Math.min,L=I("endsWith"),D=!R&&!L&&!!(function(){var N=p(String.prototype,"endsWith");return N&&!N.writable})();v({target:"String",proto:!0,forced:!D&&!L},{endsWith:function(F){var G=y(A(this));b(F);var j=y(F),X=arguments.length>1?arguments[1]:void 0,U=G.length,V=X===void 0?U:M(x(X),U);return O(G,V-j.length,V)===j}})}),(function(T,P,a){"use strict";var v=a(439),g=TypeError;T.exports=function(p){if(v(p))throw new g("The method doesn't accept regular expressions");return p}}),(function(T,P,a){"use strict";var v=a(33),g=v("match");T.exports=function(p){var x=/./;try{"/./"[p](x)}catch(y){try{return x[g]=!1,"/./"[p](x)}catch(b){}}return!1}}),(function(T,P,a){"use strict";var v=a(3),g=a(14),p=a(60),x=RangeError,y=String.fromCharCode,b=String.fromCodePoint,A=g([].join),I=!!b&&b.length!==1;v({target:"String",stat:!0,arity:1,forced:I},{fromCodePoint:function(O){for(var M=[],L=arguments.length,D=0,N;L>D;){if(N=+arguments[D],p(N,1114111)!==N)throw new x(N+" is not a valid code point");M[D++]=N<65536?y(N):y(((N-=65536)>>10)+55296,N%1024+56320)}return A(M,"")}})}),(function(T,P,a){"use strict";var v=a(3),g=a(14),p=a(484),x=a(16),y=a(68),b=a(485),A=g("".indexOf);v({target:"String",proto:!0,forced:!b("includes")},{includes:function(R){return!!~A(y(x(this)),y(p(R)),arguments.length>1?arguments[1]:void 0)}})}),(function(T,P,a){"use strict";var v=a(3),g=a(14),p=a(16),x=a(68),y=g("".charCodeAt);v({target:"String",proto:!0},{isWellFormed:function(){for(var A=x(p(this)),I=A.length,R=0;R<I;R++){var O=y(A,R);if((O&63488)===55296&&(O>=56320||++R>=I||(y(A,R)&64512)!==56320))return!1}return!0}})}),(function(T,P,a){"use strict";var v=a(482).charAt,g=a(68),p=a(51),x=a(177),y=a(180),b="String Iterator",A=p.set,I=p.getterFor(b);x(String,"String",function(R){A(this,{type:b,string:g(R),index:0})},function(){var O=I(this),M=O.string,L=O.index,D;return L>=M.length?y(void 0,!0):(D=v(M,L),O.index+=D.length,y(D,!1))})}),(function(T,P,a){"use strict";var v=a(8),g=a(14),p=a(491),x=a(46),y=a(20),b=a(64),A=a(68),I=a(16),R=a(29),O=a(492),M=a(440),L=a(493),D=g("".indexOf);p("match",function(N,F,G){return[function(X){var U=I(this),V=y(X)?R(X,N):void 0;if(V)return v(V,X,U);var k=A(U);return new RegExp(X)[N](k)},function(j){var X=x(this),U=A(j),V=G(F,X,U);if(V.done)return V.value;var k=A(M(X));if(!~D(k,"g"))return L(X,U);var Y=!!~D(k,"u")||!!~D(k,"v");X.lastIndex=0;for(var K=[],J=0,Z;(Z=L(X,U))!==null;){var Q=A(Z[0]);K[J]=Q,Q===""&&(X.lastIndex=O(U,b(X.lastIndex),Y)),J++}return J===0?null:K}]})}),(function(T,P,a){"use strict";a(449);var v=a(8),g=a(47),p=a(450),x=a(7),y=a(33),b=a(43),A=y("species"),I=RegExp.prototype;T.exports=function(R,O,M,L){var D=y(R),N=!x(function(){var X={};return X[D]=function(){return 7},""[R](X)!==7}),F=N&&!x(function(){var X=!1,U=/a/;if(R==="split"){var V={};V[A]=function(){return U},U={constructor:V,flags:""},U[D]=/./[D]}return U.exec=function(){return X=!0,null},U[D](""),!X});if(!N||!F||M){var G=/./[D],j=O(D,""[R],function(X,U,V,k,Y){var K=U.exec;return K===p||K===I.exec?N&&!Y?{done:!0,value:v(G,U,V,k)}:{done:!0,value:v(X,V,U,k)}:{done:!1}});g(String.prototype,R,j[0]),g(I,D,j[1])}L&&b(I[D],"sham",!0)}}),(function(T,P,a){"use strict";var v=a(482).charAt;T.exports=function(g,p,x){return p+(x&&v(g,p).length||1)}}),(function(T,P,a){"use strict";var v=a(8),g=a(46),p=a(21),x=a(15),y=a(450),b=TypeError;T.exports=function(A,I){var R=A.exec;if(p(R)){var O=v(R,A,I);return O!==null&&g(O),O}if(x(A)==="RegExp")return v(y,A,I);throw new b("RegExp#exec called on incompatible receiver")}}),(function(T,P,a){"use strict";var v=a(3),g=a(8),p=a(85),x=a(178),y=a(180),b=a(16),A=a(64),I=a(68),R=a(46),O=a(20),M=a(15),L=a(439),D=a(440),N=a(29),F=a(47),G=a(7),j=a(33),X=a(387),U=a(492),V=a(493),k=a(51),Y=a(36),K=j("matchAll"),J="RegExp String",Z=J+" Iterator",Q=k.set,at=k.getterFor(Z),et=RegExp.prototype,rt=TypeError,nt=p("".indexOf),ut=p("".matchAll),ht=!!ut&&!G(function(){ut("a",/./)}),pt=x(function(Et,Ht,Ut,kt){Q(this,{type:Z,regexp:Et,string:Ht,global:Ut,unicode:kt,done:!1})},J,function(){var Et=at(this);if(Et.done)return y(void 0,!0);var Ht=Et.regexp,Ut=Et.string,kt=V(Ht,Ut);return kt===null?(Et.done=!0,y(void 0,!0)):Et.global?(I(kt[0])===""&&(Ht.lastIndex=U(Ut,A(Ht.lastIndex),Et.unicode)),y(kt,!1)):(Et.done=!0,y(kt,!1))}),yt=function(At){var Et=R(this),Ht=I(At),Ut=X(Et,RegExp),kt=I(D(Et)),Ct,It,Dt;return Ct=new Ut(Ut===RegExp?Et.source:Et,kt),It=!!~nt(kt,"g"),Dt=!!~nt(kt,"u")||!!~nt(kt,"v"),Ct.lastIndex=A(Et.lastIndex),new pt(Ct,Ht,It,Dt)};v({target:"String",proto:!0,forced:ht},{matchAll:function(Et){var Ht=b(this),Ut,kt,Ct,It;if(O(Et)){if(L(Et)&&(Ut=I(b(D(Et))),!~nt(Ut,"g")))throw new rt("`.matchAll` does not allow non-global regexes");if(ht)return ut(Ht,Et);if(Ct=N(Et,K),Ct===void 0&&Y&&M(Et)==="RegExp"&&(Ct=yt),Ct)return g(Ct,Et,Ht)}else if(ht)return ut(Ht,Et);return kt=I(Ht),It=new RegExp(Et,"g"),Y?g(yt,It,kt):It[K](kt)}}),Y||K in et||F(et,K,yt)}),(function(T,P,a){"use strict";var v=a(3),g=a(248).end,p=a(496);v({target:"String",proto:!0,forced:p},{padEnd:function(y){return g(this,y,arguments.length>1?arguments[1]:void 0)}})}),(function(T,P,a){"use strict";var v=a(28);T.exports=/Version\/10(?:\.\d+){1,2}(?: [\w./]+)?(?: Mobile\/\w+)? Safari\//.test(v)}),(function(T,P,a){"use strict";var v=a(3),g=a(248).start,p=a(496);v({target:"String",proto:!0,forced:p},{padStart:function(y){return g(this,y,arguments.length>1?arguments[1]:void 0)}})}),(function(T,P,a){"use strict";var v=a(3),g=a(14),p=a(12),x=a(39),y=a(68),b=a(63),A=g([].push),I=g([].join);v({target:"String",stat:!0},{raw:function(O){var M=p(x(O).raw),L=b(M);if(!L)return"";for(var D=arguments.length,N=[],F=0;;){if(A(N,y(M[F++])),F===L)return I(N,"");F<D&&A(N,y(arguments[F]))}}})}),(function(T,P,a){"use strict";var v=a(3),g=a(249);v({target:"String",proto:!0},{repeat:g})}),(function(T,P,a){"use strict";var v=a(117),g=a(8),p=a(14),x=a(491),y=a(7),b=a(46),A=a(21),I=a(20),R=a(61),O=a(64),M=a(68),L=a(16),D=a(492),N=a(29),F=a(501),G=a(440),j=a(493),X=a(33),U=X("replace"),V=Math.max,k=Math.min,Y=p([].concat),K=p([].push),J=p("".indexOf),Z=p("".slice),Q=function(nt){return nt===void 0?nt:String(nt)},at=(function(){return"a".replace(/./,"$0")==="$0"})(),et=(function(){return/./[U]?/./[U]("a","$0")==="":!1})(),rt=!y(function(){var nt=/./;return nt.exec=function(){var ut=[];return ut.groups={a:"7"},ut},"".replace(nt,"$<a>")!=="7"});x("replace",function(nt,ut,ht){var pt=et?"$":"$0";return[function(At,Et){var Ht=L(this),Ut=I(At)?N(At,U):void 0;return Ut?g(Ut,At,Ht,Et):g(ut,M(Ht),At,Et)},function(yt,At){var Et=b(this),Ht=M(yt),Ut=A(At);Ut||(At=M(At));var kt=M(G(Et));if(typeof At=="string"&&!~J(At,pt)&&!~J(At,"$<")&&!~J(kt,"y")){var Ct=ht(ut,Et,Ht,At);if(Ct.done)return Ct.value}var It=!!~J(kt,"g"),Dt;It&&(Dt=!!~J(kt,"u")||!!~J(kt,"v"),Et.lastIndex=0);for(var Vt=[],_t;_t=j(Et,Ht),!(_t===null||(K(Vt,_t),!It));){var Nt=M(_t[0]);Nt===""&&(Et.lastIndex=D(Ht,O(Et.lastIndex),Dt))}for(var Jt="",ne=0,ve=0;ve<Vt.length;ve++){_t=Vt[ve];for(var le=M(_t[0]),fe=V(k(R(_t.index),Ht.length),0),Ce=[],Be,Ie=1;Ie<_t.length;Ie++)K(Ce,Q(_t[Ie]));var ce=_t.groups;if(Ut){var xe=Y([le],Ce,fe,Ht);ce!==void 0&&K(xe,ce),Be=M(v(At,void 0,xe))}else Be=F(le,Ht,fe,Ce,ce,At);fe>=ne&&(Jt+=Z(Ht,ne,fe)+Be,ne=fe+le.length)}return Jt+Z(Ht,ne)}]},!rt||!at||et)}),(function(T,P,a){"use strict";var v=a(14),g=a(39),p=Math.floor,x=v("".charAt),y=v("".replace),b=v("".slice),A=/\$([$&'`]|\d{1,2}|<[^>]*>)/g,I=/\$([$&'`]|\d{1,2})/g;T.exports=function(R,O,M,L,D,N){var F=M+R.length,G=L.length,j=I;return D!==void 0&&(D=g(D),j=A),y(N,j,function(X,U){var V;switch(x(U,0)){case"$":return"$";case"&":return R;case"`":return b(O,0,M);case"'":return b(O,F);case"<":V=D[b(U,1,-1)];break;default:var k=+U;if(k===0)return X;if(k>G){var Y=p(k/10);return Y===0?X:Y<=G?L[Y-1]===void 0?x(U,1):L[Y-1]+x(U,1):X}V=L[k-1]}return V===void 0?"":V})}}),(function(T,P,a){"use strict";var v=a(3),g=a(8),p=a(14),x=a(16),y=a(21),b=a(20),A=a(439),I=a(68),R=a(29),O=a(440),M=a(501),L=a(33),D=a(36),N=L("replace"),F=TypeError,G=p("".indexOf),j=p("".replace),X=p("".slice),U=Math.max;v({target:"String",proto:!0},{replaceAll:function(k,Y){var K=x(this),J,Z,Q,at,et,rt,nt,ut,ht,pt,yt=0,At="";if(b(k)){if(J=A(k),J&&(Z=I(x(O(k))),!~G(Z,"g")))throw new F("`.replaceAll` does not allow non-global regexes");if(Q=R(k,N),Q)return g(Q,k,K,Y);if(D&&J)return j(I(K),k,Y)}for(at=I(K),et=I(k),rt=y(Y),rt||(Y=I(Y)),nt=et.length,ut=U(1,nt),ht=G(at,et);ht!==-1;)pt=rt?I(Y(et,ht,at)):M(et,at,ht,[],void 0,Y),At+=X(at,yt,ht)+pt,yt=ht+nt,ht=ht+ut>at.length?-1:G(at,et,ht+ut);return yt<at.length&&(At+=X(at,yt)),At}})}),(function(T,P,a){"use strict";var v=a(8),g=a(491),p=a(46),x=a(20),y=a(16),b=a(369),A=a(68),I=a(29),R=a(493);g("search",function(O,M,L){return[function(N){var F=y(this),G=x(N)?I(N,O):void 0;if(G)return v(G,N,F);var j=A(F);return new RegExp(N)[O](j)},function(D){var N=p(this),F=A(D),G=L(M,N,F);if(G.done)return G.value;var j=N.lastIndex;b(j,0)||(N.lastIndex=0);var X=R(N,F);return b(N.lastIndex,j)||(N.lastIndex=j),X===null?-1:X.index}]})}),(function(T,P,a){"use strict";var v=a(8),g=a(14),p=a(491),x=a(46),y=a(20),b=a(16),A=a(387),I=a(492),R=a(64),O=a(68),M=a(29),L=a(440),D=a(493),N=a(443),F=a(7),G=N.UNSUPPORTED_Y,j=4294967295,X=Math.min,U=g([].push),V=g("".slice),k=g("".indexOf),Y=!F(function(){var J=/(?:)/,Z=J.exec;J.exec=function(){return Z.apply(this,arguments)};var Q="ab".split(J);return Q.length!==2||Q[0]!=="a"||Q[1]!=="b"}),K="abbc".split(/(b)*/)[1]==="c"||"test".split(/(?:)/,-1).length!==4||"ab".split(/(?:ab)*/).length!==2||".".split(/(.?)(.?)/).length!==4||".".split(/()()/).length>1||"".split(/.?/).length;p("split",function(J,Z,Q){var at="0".split(void 0,0).length?function(et,rt){return et===void 0&&rt===0?[]:v(Z,this,et,rt)}:Z;return[function(rt,nt){var ut=b(this),ht=y(rt)?M(rt,J):void 0;return ht?v(ht,rt,ut,nt):v(at,O(ut),rt,nt)},function(et,rt){var nt=x(this),ut=O(et);if(!K){var ht=Q(at,nt,ut,rt,at!==Z);if(ht.done)return ht.value}var pt=A(nt,RegExp),yt=O(L(nt)),At=!!~k(yt,"u")||!!~k(yt,"v");G?~k(yt,"g")||(yt+="g"):~k(yt,"y")||(yt+="y");var Et=new pt(G?"^(?:"+nt.source+")":nt,yt),Ht=rt===void 0?j:rt>>>0;if(Ht===0)return[];if(ut.length===0)return D(Et,ut)===null?[ut]:[];for(var Ut=0,kt=0,Ct=[];kt<ut.length;){Et.lastIndex=G?0:kt;var It=D(Et,G?V(ut,kt):ut),Dt;if(It===null||(Dt=X(R(Et.lastIndex+(G?kt:0)),ut.length))===Ut)kt=I(ut,kt,At);else{if(U(Ct,V(ut,Ut,kt)),Ct.length===Ht)return Ct;for(var Vt=1;Vt<=It.length-1;Vt++)if(U(Ct,It[Vt]),Ct.length===Ht)return Ct;kt=Ut=Dt}}return U(Ct,V(ut,Ut)),Ct}]},K||!Y,G)}),(function(T,P,a){"use strict";var v=a(3),g=a(85),p=a(5).f,x=a(64),y=a(68),b=a(484),A=a(16),I=a(485),R=a(36),O=g("".slice),M=Math.min,L=I("startsWith"),D=!R&&!L&&!!(function(){var N=p(String.prototype,"startsWith");return N&&!N.writable})();v({target:"String",proto:!0,forced:!D&&!L},{startsWith:function(F){var G=y(A(this));b(F);var j=y(F),X=x(M(arguments.length>1?arguments[1]:void 0,G.length));return O(G,X,X+j.length)===j}})}),(function(T,P,a){"use strict";var v=a(3),g=a(14),p=a(16),x=a(61),y=a(68),b=g("".slice),A=Math.max,I=Math.min,R=!"".substr||"ab".substr(-1)!=="b";v({target:"String",proto:!0,forced:R},{substr:function(M,L){var D=y(p(this)),N=D.length,F=x(M),G=F<0?A(N+F,0):I(F,N),j=L===void 0?N:x(L);if(j<=0)return"";var X=I(G+j,N);return G>=X?"":b(D,G,X)}})}),(function(T,P,a){"use strict";var v=a(3),g=a(8),p=a(14),x=a(16),y=a(68),b=a(7),A=Array,I=p("".charAt),R=p("".charCodeAt),O=p([].join),M="".toWellFormed,L="\uFFFD",D=M&&b(function(){return g(M,1)!=="1"});v({target:"String",proto:!0,forced:D},{toWellFormed:function(){var F=y(x(this));if(D)return g(M,F);for(var G=F.length,j=A(G),X=0;X<G;X++){var U=R(F,X);(U&63488)!==55296?j[X]=I(F,X):U>=56320||X+1>=G||(R(F,X+1)&64512)!==56320?j[X]=L:(j[X]=I(F,X),j[++X]=I(F,X))}return O(j,"")}})}),(function(T,P,a){"use strict";var v=a(3),g=a(332).trim,p=a(509);v({target:"String",proto:!0,forced:p("trim")},{trim:function(){return g(this)}})}),(function(T,P,a){"use strict";var v=a(49).PROPER,g=a(7),p=a(333),x="\u200B\x85\u180E";T.exports=function(y){return g(function(){return!!p[y]()||x[y]()!==x||v&&p[y].name!==y})}}),(function(T,P,a){"use strict";a(511);var v=a(3),g=a(512);v({target:"String",proto:!0,name:"trimEnd",forced:"".trimEnd!==g},{trimEnd:g})}),(function(T,P,a){"use strict";var v=a(3),g=a(512);v({target:"String",proto:!0,name:"trimEnd",forced:"".trimRight!==g},{trimRight:g})}),(function(T,P,a){"use strict";var v=a(332).end,g=a(509);T.exports=g("trimEnd")?function(){return v(this)}:"".trimEnd}),(function(T,P,a){"use strict";a(514);var v=a(3),g=a(515);v({target:"String",proto:!0,name:"trimStart",forced:"".trimStart!==g},{trimStart:g})}),(function(T,P,a){"use strict";var v=a(3),g=a(515);v({target:"String",proto:!0,name:"trimStart",forced:"".trimLeft!==g},{trimLeft:g})}),(function(T,P,a){"use strict";var v=a(332).start,g=a(509);T.exports=g("trimStart")?function(){return v(this)}:"".trimStart}),(function(T,P,a){"use strict";var v=a(3),g=a(517),p=a(518);v({target:"String",proto:!0,forced:p("anchor")},{anchor:function(y){return g(this,"a","name",y)}})}),(function(T,P,a){"use strict";var v=a(14),g=a(16),p=a(68),x=/"/g,y=v("".replace);T.exports=function(b,A,I,R){var O=p(g(b)),M="<"+A;return I!==""&&(M+=" "+I+'="'+y(p(R),x,""")+'"'),M+">"+O+"</"+A+">"}}),(function(T,P,a){"use strict";var v=a(7);T.exports=function(g){return v(function(){var p=""[g]('"');return p!==p.toLowerCase()||p.split('"').length>3})}}),(function(T,P,a){"use strict";var v=a(3),g=a(517),p=a(518);v({target:"String",proto:!0,forced:p("big")},{big:function(){return g(this,"big","","")}})}),(function(T,P,a){"use strict";var v=a(3),g=a(517),p=a(518);v({target:"String",proto:!0,forced:p("blink")},{blink:function(){return g(this,"blink","","")}})}),(function(T,P,a){"use strict";var v=a(3),g=a(517),p=a(518);v({target:"String",proto:!0,forced:p("bold")},{bold:function(){return g(this,"b","","")}})}),(function(T,P,a){"use strict";var v=a(3),g=a(517),p=a(518);v({target:"String",proto:!0,forced:p("fixed")},{fixed:function(){return g(this,"tt","","")}})}),(function(T,P,a){"use strict";var v=a(3),g=a(517),p=a(518);v({target:"String",proto:!0,forced:p("fontcolor")},{fontcolor:function(y){return g(this,"font","color",y)}})}),(function(T,P,a){"use strict";var v=a(3),g=a(517),p=a(518);v({target:"String",proto:!0,forced:p("fontsize")},{fontsize:function(y){return g(this,"font","size",y)}})}),(function(T,P,a){"use strict";var v=a(3),g=a(517),p=a(518);v({target:"String",proto:!0,forced:p("italics")},{italics:function(){return g(this,"i","","")}})}),(function(T,P,a){"use strict";var v=a(3),g=a(517),p=a(518);v({target:"String",proto:!0,forced:p("link")},{link:function(y){return g(this,"a","href",y)}})}),(function(T,P,a){"use strict";var v=a(3),g=a(517),p=a(518);v({target:"String",proto:!0,forced:p("small")},{small:function(){return g(this,"small","","")}})}),(function(T,P,a){"use strict";var v=a(3),g=a(517),p=a(518);v({target:"String",proto:!0,forced:p("strike")},{strike:function(){return g(this,"strike","","")}})}),(function(T,P,a){"use strict";var v=a(3),g=a(517),p=a(518);v({target:"String",proto:!0,forced:p("sub")},{sub:function(){return g(this,"sub","","")}})}),(function(T,P,a){"use strict";var v=a(3),g=a(517),p=a(518);v({target:"String",proto:!0,forced:p("sup")},{sup:function(){return g(this,"sup","","")}})}),(function(T,P,a){"use strict";var v=a(532);v("Float32",function(g){return function(x,y,b){return g(this,x,y,b)}})}),(function(T,P,a){"use strict";var v=a(3),g=a(4),p=a(8),x=a(6),y=a(533),b=a(224),A=a(213),I=a(216),R=a(11),O=a(43),M=a(338),L=a(217),D=a(534),N=a(535),F=a(18),G=a(38),j=a(69),X=a(20),U=a(22),V=a(71),k=a(24),Y=a(119),K=a(57).f,J=a(536),Z=a(83).forEach,Q=a(201),at=a(77),et=a(44),rt=a(5),nt=a(205),ut=a(51),ht=a(124),pt=ut.get,yt=ut.set,At=ut.enforce,Et=et.f,Ht=rt.f,Ut=g.RangeError,kt=A.ArrayBuffer,Ct=kt.prototype,It=A.DataView,Dt=b.NATIVE_ARRAY_BUFFER_VIEWS,Vt=b.TYPED_ARRAY_TAG,_t=b.TypedArray,Nt=b.TypedArrayPrototype,Jt=b.isTypedArray,ne="BYTES_PER_ELEMENT",ve="Wrong length",le=function(ce,xe){at(ce,xe,{configurable:!0,get:function(){return pt(this)[xe]}})},fe=function(ce){var xe;return k(Ct,ce)||(xe=j(ce))==="ArrayBuffer"||xe==="SharedArrayBuffer"},Ce=function(ce,xe){return Jt(ce)&&!U(xe)&&xe in ce&&M(+xe)&&xe>=0},Be=function(xe,Ue){return Ue=F(Ue),Ce(xe,Ue)?R(2,xe[Ue]):Ht(xe,Ue)},Ie=function(xe,Ue,Pt){return Ue=F(Ue),Ce(xe,Ue)&&X(Pt)&&G(Pt,"value")&&!G(Pt,"get")&&!G(Pt,"set")&&!Pt.configurable&&(!G(Pt,"writable")||Pt.writable)&&(!G(Pt,"enumerable")||Pt.enumerable)?(xe[Ue]=Pt.value,xe):Et(xe,Ue,Pt)};x?(Dt||(rt.f=Be,et.f=Ie,le(Nt,"buffer"),le(Nt,"byteOffset"),le(Nt,"byteLength"),le(Nt,"length")),v({target:"Object",stat:!0,forced:!Dt},{getOwnPropertyDescriptor:Be,defineProperty:Ie}),T.exports=function(ce,xe,Ue){var Pt=ce.match(/\d+/)[0]/8,zt=ce+(Ue?"Clamped":"")+"Array",jt="get"+ce,we="set"+ce,$t=g[zt],Xt=$t,re=Xt&&Xt.prototype,oe={},pe=function(Tt,wt){var Ft=pt(Tt);return Ft.view[jt](wt*Pt+Ft.byteOffset,!0)},rn=function(Tt,wt,Ft){var Lt=pt(Tt);Lt.view[we](wt*Pt+Lt.byteOffset,Ue?N(Ft):Ft,!0)},vt=function(Tt,wt){Et(Tt,wt,{get:function(){return pe(this,wt)},set:function(Ft){return rn(this,wt,Ft)},enumerable:!0})};Dt?y&&(Xt=xe(function(Tt,wt,Ft,Lt){return I(Tt,re),ht((function(){return X(wt)?fe(wt)?Lt!==void 0?new $t(wt,D(Ft,Pt),Lt):Ft!==void 0?new $t(wt,D(Ft,Pt)):new $t(wt):Jt(wt)?nt(Xt,wt):p(J,Xt,wt):new $t(L(wt))})(),Tt,Xt)}),Y&&Y(Xt,_t),Z(K($t),function(Tt){Tt in Xt||O(Xt,Tt,$t[Tt])}),Xt.prototype=re):(Xt=xe(function(Tt,wt,Ft,Lt){I(Tt,re);var ue=0,ye=0,Me,Fe,tn;if(!X(wt))tn=L(wt),Fe=tn*Pt,Me=new kt(Fe);else if(fe(wt)){Me=wt,ye=D(Ft,Pt);var Ve=wt.byteLength;if(Lt===void 0){if(Ve%Pt)throw new Ut(ve);if(Fe=Ve-ye,Fe<0)throw new Ut(ve)}else if(Fe=L(Lt)*Pt,Fe+ye>Ve)throw new Ut(ve);tn=Fe/Pt}else return Jt(wt)?nt(Xt,wt):p(J,Xt,wt);for(yt(Tt,{buffer:Me,byteOffset:ye,byteLength:Fe,length:tn,view:new It(Me)});ue<tn;)vt(Tt,ue++)}),Y&&Y(Xt,_t),re=Xt.prototype=V(Nt)),re.constructor!==Xt&&O(re,"constructor",Xt),At(re).TypedArrayConstructor=Xt,Vt&&O(re,Vt,zt);var Rt=Xt!==$t;oe[zt]=Xt,v({global:!0,constructor:!0,forced:Rt,sham:!Dt},oe),ne in Xt||O(Xt,ne,Pt),ne in re||O(re,ne,Pt),Q(zt)}):T.exports=function(){}}),(function(T,P,a){"use strict";var v=a(4),g=a(7),p=a(172),x=a(224).NATIVE_ARRAY_BUFFER_VIEWS,y=v.ArrayBuffer,b=v.Int8Array;T.exports=!x||!g(function(){b(1)})||!g(function(){new b(-1)})||!p(function(A){new b,new b(null),new b(1.5),new b(A)},!0)||g(function(){return new b(new y(2),1,void 0).length!==1})}),(function(T,P,a){"use strict";var v=a(271),g=RangeError;T.exports=function(p,x){var y=v(p);if(y%x)throw new g("Wrong offset");return y}}),(function(T){"use strict";var P=Math.floor;T.exports=function(a){var v=+a;if(v!==v||v<=0)return 0;if(v>=255)return 255;var g=P(v);return g+.5<v?g+1:v<g+.5||g%2===0?g:g+1}}),(function(T,P,a){"use strict";var v=a(84),g=a(8),p=a(30),x=a(388),y=a(39),b=a(63),A=a(140),I=a(141),R=a(138),O=a(537),M=a(224).aTypedArrayConstructor,L=a(538);T.exports=function(N){var F=x(this),G=arguments.length,j=G>1?arguments[1]:void 0,X=j!==void 0;X&&p(j);var U=y(N),V=I(U),k,Y,K,J,Z,Q,at,et;if(V&&!R(V))for(at=A(U,V),et=at.next,U=[];!(Q=g(et,at)).done;)U.push(Q.value);for(X&&G>2&&(j=v(j,arguments[2])),Y=b(U),K=new(M(F))(Y),J=O(K),k=0;Y>k;k++)Z=X?j(U[k],k):U[k],K[k]=J?L(Z):+Z;return K}}),(function(T,P,a){"use strict";var v=a(69);T.exports=function(g){var p=v(g);return p==="BigInt64Array"||p==="BigUint64Array"}}),(function(T,P,a){"use strict";var v=a(19),g=TypeError;T.exports=function(p){var x=v(p,"number");if(typeof x=="number")throw new g("Can't convert number to bigint");return BigInt(x)}}),(function(T,P,a){"use strict";var v=a(532);v("Float64",function(g){return function(x,y,b){return g(this,x,y,b)}})}),(function(T,P,a){"use strict";var v=a(532);v("Int8",function(g){return function(x,y,b){return g(this,x,y,b)}})}),(function(T,P,a){"use strict";var v=a(532);v("Int16",function(g){return function(x,y,b){return g(this,x,y,b)}})}),(function(T,P,a){"use strict";var v=a(532);v("Int32",function(g){return function(x,y,b){return g(this,x,y,b)}})}),(function(T,P,a){"use strict";var v=a(532);v("Uint8",function(g){return function(x,y,b){return g(this,x,y,b)}})}),(function(T,P,a){"use strict";var v=a(532);v("Uint8",function(g){return function(x,y,b){return g(this,x,y,b)}},!0)}),(function(T,P,a){"use strict";var v=a(532);v("Uint16",function(g){return function(x,y,b){return g(this,x,y,b)}})}),(function(T,P,a){"use strict";var v=a(532);v("Uint32",function(g){return function(x,y,b){return g(this,x,y,b)}})}),(function(T,P,a){"use strict";var v=a(224),g=a(63),p=a(61),x=v.aTypedArray,y=v.exportTypedArrayMethod;y("at",function(A){var I=x(this),R=g(I),O=p(A),M=O>=0?O:R+O;return M<0||M>=R?void 0:I[M]})}),(function(T,P,a){"use strict";var v=a(14),g=a(224),p=a(152),x=v(p),y=g.aTypedArray,b=g.exportTypedArrayMethod;b("copyWithin",function(I,R){return x(y(this),I,R,arguments.length>2?arguments[2]:void 0)})}),(function(T,P,a){"use strict";var v=a(224),g=a(83).every,p=v.aTypedArray,x=v.exportTypedArrayMethod;x("every",function(b){return g(p(this),b,arguments.length>1?arguments[1]:void 0)})}),(function(T,P,a){"use strict";var v=a(224),g=a(157),p=a(538),x=a(69),y=a(8),b=a(14),A=a(7),I=v.aTypedArray,R=v.exportTypedArrayMethod,O=b("".slice),M=A(function(){var L=0;return new Int8Array(2).fill({valueOf:function(){return L++}}),L!==1});R("fill",function(D){var N=arguments.length;I(this);var F=O(x(this),0,3)==="Big"?p(D):+D;return y(g,this,F,N>1?arguments[1]:void 0,N>2?arguments[2]:void 0)},M)}),(function(T,P,a){"use strict";var v=a(224),g=a(83).filter,p=a(552),x=v.aTypedArray,y=v.exportTypedArrayMethod;y("filter",function(A){var I=g(x(this),A,arguments.length>1?arguments[1]:void 0);return p(this,I)})}),(function(T,P,a){"use strict";var v=a(205),g=a(224).getTypedArrayConstructor;T.exports=function(p,x){return v(g(p),x)}}),(function(T,P,a){"use strict";var v=a(224),g=a(83).find,p=v.aTypedArray,x=v.exportTypedArrayMethod;x("find",function(b){return g(p(this),b,arguments.length>1?arguments[1]:void 0)})}),(function(T,P,a){"use strict";var v=a(224),g=a(83).findIndex,p=v.aTypedArray,x=v.exportTypedArrayMethod;x("findIndex",function(b){return g(p(this),b,arguments.length>1?arguments[1]:void 0)})}),(function(T,P,a){"use strict";var v=a(224),g=a(162).findLast,p=v.aTypedArray,x=v.exportTypedArrayMethod;x("findLast",function(b){return g(p(this),b,arguments.length>1?arguments[1]:void 0)})}),(function(T,P,a){"use strict";var v=a(224),g=a(162).findLastIndex,p=v.aTypedArray,x=v.exportTypedArrayMethod;x("findLastIndex",function(b){return g(p(this),b,arguments.length>1?arguments[1]:void 0)})}),(function(T,P,a){"use strict";var v=a(224),g=a(83).forEach,p=v.aTypedArray,x=v.exportTypedArrayMethod;x("forEach",function(b){g(p(this),b,arguments.length>1?arguments[1]:void 0)})}),(function(T,P,a){"use strict";var v=a(533),g=a(224).exportTypedArrayStaticMethod,p=a(536);g("from",p,v)}),(function(T,P,a){"use strict";var v=a(224),g=a(59).includes,p=v.aTypedArray,x=v.exportTypedArrayMethod;x("includes",function(b){return g(p(this),b,arguments.length>1?arguments[1]:void 0)})}),(function(T,P,a){"use strict";var v=a(224),g=a(59).indexOf,p=v.aTypedArray,x=v.exportTypedArrayMethod;x("indexOf",function(b){return g(p(this),b,arguments.length>1?arguments[1]:void 0)})}),(function(T,P,a){"use strict";var v=a(4),g=a(7),p=a(14),x=a(224),y=a(176),b=a(33),A=b("iterator"),I=v.Uint8Array,R=p(y.values),O=p(y.keys),M=p(y.entries),L=x.aTypedArray,D=x.exportTypedArrayMethod,N=I&&I.prototype,F=!g(function(){N[A].call([1])}),G=!!N&&N.values&&N[A]===N.values&&N.values.name==="values",j=function(){return R(L(this))};D("entries",function(){return M(L(this))},F),D("keys",function(){return O(L(this))},F),D("values",j,F||!G,{name:"values"}),D(A,j,F||!G,{name:"values"})}),(function(T,P,a){"use strict";var v=a(224),g=a(14),p=v.aTypedArray,x=v.exportTypedArrayMethod,y=g([].join);x("join",function(A){return y(p(this),A)})}),(function(T,P,a){"use strict";var v=a(224),g=a(117),p=a(183),x=v.aTypedArray,y=v.exportTypedArrayMethod;y("lastIndexOf",function(A){var I=arguments.length;return g(p,x(this),I>1?[A,arguments[1]]:[A])})}),(function(T,P,a){"use strict";var v=a(224),g=a(83).map,p=a(552),x=v.aTypedArray,y=v.exportTypedArrayMethod;y("map",function(A){var I=g(x(this),A,arguments.length>1?arguments[1]:void 0);return p(this,I)})}),(function(T,P,a){"use strict";var v=a(224),g=a(533),p=v.aTypedArrayConstructor,x=v.exportTypedArrayStaticMethod;x("of",function(){for(var b=0,A=arguments.length,I=new(p(this))(A);A>b;)I[b]=arguments[b++];return I},g)}),(function(T,P,a){"use strict";var v=a(224),g=a(188).left,p=v.aTypedArray,x=v.exportTypedArrayMethod;x("reduce",function(b){var A=arguments.length;return g(p(this),b,A,A>1?arguments[1]:void 0)})}),(function(T,P,a){"use strict";var v=a(224),g=a(188).right,p=v.aTypedArray,x=v.exportTypedArrayMethod;x("reduceRight",function(b){var A=arguments.length;return g(p(this),b,A,A>1?arguments[1]:void 0)})}),(function(T,P,a){"use strict";var v=a(224),g=v.aTypedArray,p=v.exportTypedArrayMethod,x=Math.floor;p("reverse",function(){for(var b=this,A=g(b).length,I=x(A/2),R=0,O;R<I;)O=b[R],b[R++]=b[--A],b[A]=O;return b})}),(function(T,P,a){"use strict";var v=a(4),g=a(8),p=a(224),x=a(63),y=a(534),b=a(39),A=a(7),I=v.RangeError,R=v.Int8Array,O=R&&R.prototype,M=O&&O.set,L=p.aTypedArray,D=p.exportTypedArrayMethod,N=!A(function(){var G=new Uint8ClampedArray(2);return g(M,G,{length:1,0:3},1),G[1]!==3}),F=N&&p.NATIVE_ARRAY_BUFFER_VIEWS&&A(function(){var G=new R(2);return G.set(1),G.set("2",1),G[0]!==0||G[1]!==2});D("set",function(j){L(this);var X=y(arguments.length>1?arguments[1]:void 0,1),U=b(j);if(N)return g(M,this,U,X);var V=this.length,k=x(U),Y=0;if(k+X>V)throw new I("Wrong length");for(;Y<k;)this[X+Y]=U[Y++]},!N||F)}),(function(T,P,a){"use strict";var v=a(224),g=a(7),p=a(76),x=v.aTypedArray,y=v.getTypedArrayConstructor,b=v.exportTypedArrayMethod,A=g(function(){new Int8Array(1).slice()});b("slice",function(R,O){for(var M=p(x(this),R,O),L=y(this),D=0,N=M.length,F=new L(N);N>D;)F[D]=M[D++];return F},A)}),(function(T,P,a){"use strict";var v=a(224),g=a(83).some,p=v.aTypedArray,x=v.exportTypedArrayMethod;x("some",function(b){return g(p(this),b,arguments.length>1?arguments[1]:void 0)})}),(function(T,P,a){"use strict";var v=a(4),g=a(85),p=a(7),x=a(30),y=a(196),b=a(224),A=a(197),I=a(198),R=a(27),O=a(199),M=b.aTypedArray,L=b.exportTypedArrayMethod,D=v.Uint16Array,N=D&&g(D.prototype.sort),F=!!N&&!(p(function(){N(new D(2),null)})&&p(function(){N(new D(2),{})})),G=!!N&&!p(function(){if(R)return R<74;if(A)return A<67;if(I)return!0;if(O)return O<602;var X=new D(516),U=Array(516),V,k;for(V=0;V<516;V++)k=V%4,X[V]=515-V,U[V]=V-2*k+3;for(N(X,function(Y,K){return(Y/4|0)-(K/4|0)}),V=0;V<516;V++)if(X[V]!==U[V])return!0}),j=function(X){return function(U,V){return X!==void 0?+X(U,V)||0:V!==V?U!==U?0:-1:U!==U?1:U===0&&V===0?1/U>0?1/V>0?0:1:1/V>0?-1:0:U>V?1:U<V?-1:0}};L("sort",function(U){return U!==void 0&&x(U),G?N(this,U):y(M(this),j(U))},!G||F)}),(function(T,P,a){"use strict";var v=a(224),g=a(64),p=a(60),x=v.aTypedArray,y=v.getTypedArrayConstructor,b=v.exportTypedArrayMethod;b("subarray",function(I,R){var O=x(this),M=O.length,L=p(I,M),D=y(O);return new D(O.buffer,O.byteOffset+L*O.BYTES_PER_ELEMENT,g((R===void 0?M:p(R,M))-L))})}),(function(T,P,a){"use strict";var v=a(4),g=a(117),p=a(224),x=a(7),y=a(76),b=v.Int8Array,A=p.aTypedArray,I=p.exportTypedArrayMethod,R=[].toLocaleString,O=!!b&&x(function(){R.call(new b(1))}),M=x(function(){return[1,2].toLocaleString()!==new b([1,2]).toLocaleString()})||!x(function(){b.prototype.toLocaleString.call([1,2])});I("toLocaleString",function(){return g(R,O?y(A(this)):A(this),y(arguments))},M)}),(function(T,P,a){"use strict";var v=a(63),g=a(224),p=g.aTypedArray,x=g.exportTypedArrayMethod,y=g.getTypedArrayConstructor;x("toReversed",function(){for(var A=p(this),I=v(A),R=new(y(A))(I),O=0;O<I;O++)R[O]=A[I-O-1];return R})}),(function(T,P,a){"use strict";var v=a(224),g=a(14),p=a(30),x=a(205),y=v.aTypedArray,b=v.getTypedArrayConstructor,A=v.exportTypedArrayMethod,I=g(v.TypedArrayPrototype.sort);A("toSorted",function(O){O!==void 0&&p(O);var M=y(this),L=x(b(M),M);return I(L,O)})}),(function(T,P,a){"use strict";var v=a(224).exportTypedArrayMethod,g=a(7),p=a(4),x=a(14),y=p.Uint8Array,b=y&&y.prototype||{},A=[].toString,I=x([].join);g(function(){A.call({})})&&(A=function(){return I(this)});var R=b.toString!==A;v("toString",A,R)}),(function(T,P,a){"use strict";var v=a(224),g=a(537),p=a(63),x=a(61),y=a(538),b=v.aTypedArray,A=v.getTypedArrayConstructor,I=v.exportTypedArrayMethod,R=RangeError,O=(function(){try{new Int8Array(1).with(2,{valueOf:function(){throw 8}})}catch(L){return L===8}})(),M=O&&(function(){try{new Int8Array(1).with(-.5,1)}catch(L){return!0}})();I("with",function(L,D){var N=b(this),F=p(N),G=x(L),j=G<0?F+G:G,X=g(N)?y(D):+D;if(j>=F||j<0)throw new R("Incorrect index");for(var U=new(A(N))(F),V=0;V<F;V++)U[V]=V===j?X:N[V];return U},!O||M)}),(function(T,P,a){"use strict";var v=a(3),g=a(4),p=a(205),x=a(580),y=g.Uint8Array,b=!y||!y.fromBase64||!(function(){try{y.fromBase64("a");return}catch(A){}try{y.fromBase64("",null)}catch(A){return!0}})();y&&v({target:"Uint8Array",stat:!0,forced:b},{fromBase64:function(I){var R=x(I,arguments.length>1?arguments[1]:void 0,null,9007199254740991);return p(y,R.bytes)}})}),(function(T,P,a){"use strict";var v=a(4),g=a(14),p=a(287),x=a(447),y=a(38),b=a(581),A=a(582),I=a(237),R=b.c2i,O=b.c2iUrl,M=v.SyntaxError,L=v.TypeError,D=v.Array,N=g("".charAt),F=Math.floor,G=function(U,V){for(var k=U.length;V<k;V++){var Y=N(U,V);if(Y!==" "&&Y!==" "&&Y!==`
`&&Y!=="\f"&&Y!=="\r")break}return V},j=function(U,V,k){var Y=U.length;Y<4&&(U+=Y===2?"AA":"A");var K=(V[N(U,0)]<<18)+(V[N(U,1)]<<12)+(V[N(U,2)]<<6)+V[N(U,3)],J=[K>>16&255,K>>8&255,K&255];if(Y===2){if(k&&J[1]!==0)throw new M("Extra bits");return[J[0]]}if(Y===3){if(k&&J[2]!==0)throw new M("Extra bits");return[J[0],J[1]]}return J},X=function(U,V,k){for(var Y=V.length,K=0;K<Y;K++)U[k+K]=V[K];return k+Y};T.exports=function(U,V,k,Y){x(U),p(V);var K=A(V)==="base64"?R:O,J=V?V.lastChunkHandling:void 0;if(J===void 0&&(J="loose"),J!=="loose"&&J!=="strict"&&J!=="stop-before-partial")throw new L("Incorrect `lastChunkHandling` option");k&&I(k.buffer);var Z=U.length,Q=k||D(F(Z*3/4)),at=0,et=0,rt="",nt=0;if(Y)for(;;){if(nt=G(U,nt),nt===Z){if(rt.length>0){if(J==="stop-before-partial")break;if(J==="loose"){if(rt.length===1)throw new M("Malformed padding: exactly one additional character");at=X(Q,j(rt,K,!1),at)}else throw new M("Missing padding")}et=Z;break}var ut=N(U,nt);if(++nt,ut==="="){if(rt.length<2)throw new M("Padding is too early");if(nt=G(U,nt),rt.length===2){if(nt===Z){if(J==="stop-before-partial")break;throw new M("Malformed padding: only one =")}N(U,nt)==="="&&(++nt,nt=G(U,nt))}if(nt<Z)throw new M("Unexpected character after padding");at=X(Q,j(rt,K,J==="strict"),at),et=Z;break}if(!y(K,ut))throw new M("Unexpected character");var ht=Y-at;if(ht===1&&rt.length===2||ht===2&&rt.length===3||(rt+=ut,rt.length===4&&(at=X(Q,j(rt,K,!1),at),rt="",et=nt,at===Y)))break}return k||(Q.length=at),{bytes:Q,read:et,written:at}}}),(function(T){"use strict";var P="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789",a=P+"+/",v=P+"-_",g=function(p){for(var x={},y=0;y<64;y++)x[p.charAt(y)]=y;return x};T.exports={i2c:a,c2i:g(a),i2cUrl:v,c2iUrl:g(v)}}),(function(T){"use strict";var P=TypeError;T.exports=function(a){var v=a&&a.alphabet;if(v===void 0||v==="base64"||v==="base64url")return v||"base64";throw new P("Incorrect `alphabet` option")}}),(function(T,P,a){"use strict";var v=a(3),g=a(4),p=a(447),x=a(584);g.Uint8Array&&v({target:"Uint8Array",stat:!0},{fromHex:function(b){return x(p(b)).bytes}})}),(function(T,P,a){"use strict";var v=a(4),g=a(14),p=v.Uint8Array,x=v.SyntaxError,y=Math.min,b=g("".match);T.exports=function(A,I){var R=A.length;if(R%2!==0)throw new x("String should be an even number of characters");for(var O=I?y(I.length,R/2):R/2,M=I||new p(O),L=b(A,/[\S\s]{2}/g),D=0;D<O;D++){var N=+("0x"+L[D]+"0");if(N!==N)throw new x("String should only contain hex characters");M[D]=N>>4}return{bytes:M,read:D<<1}}}),(function(T,P,a){"use strict";var v=a(3),g=a(4),p=a(580),x=a(586),y=g.Uint8Array,b=!y||!y.prototype.setFromBase64||!(function(){var A=new y([255,255,255,255,255]);try{A.setFromBase64("",null);return}catch(I){}try{A.setFromBase64("a");return}catch(I){}try{A.setFromBase64("MjYyZg===")}catch(I){return A[0]===50&&A[1]===54&&A[2]===50&&A[3]===255&&A[4]===255}})();y&&v({target:"Uint8Array",proto:!0,forced:b},{setFromBase64:function(I){x(this);var R=p(I,arguments.length>1?arguments[1]:void 0,this,this.length);return{read:R.read,written:R.written}}})}),(function(T,P,a){"use strict";var v=a(69),g=TypeError;T.exports=function(p){if(v(p)==="Uint8Array")return p;throw new g("Argument is not an Uint8Array")}}),(function(T,P,a){"use strict";var v=a(3),g=a(4),p=a(447),x=a(586),y=a(237),b=a(584);function A(){try{var I=new ArrayBuffer(16,{maxByteLength:1024});new Uint8Array(I).setFromHex("cafed00d")}catch(R){return!0}}g.Uint8Array&&v({target:"Uint8Array",proto:!0,forced:A()},{setFromHex:function(R){x(this),p(R),y(this.buffer);var O=b(R,this).read;return{read:O,written:O/2}}})}),(function(T,P,a){"use strict";var v=a(3),g=a(4),p=a(14),x=a(287),y=a(586),b=a(237),A=a(581),I=a(582),R=A.i2c,O=A.i2cUrl,M=Math.floor,L=Math.ceil,D=p("".charAt),N=g.Uint8Array,F=g.Array,G=p([].join),j=!N||!N.prototype.toBase64||!(function(){try{var X=new N;X.toBase64(null)}catch(U){return!0}})();N&&v({target:"Uint8Array",proto:!0,forced:j},{toBase64:function(){var U=y(this),V=arguments.length?x(arguments[0]):void 0,k=I(V)==="base64"?R:O,Y=!!V&&!!V.omitPadding;b(this.buffer);for(var K=0,J=U.length,Z=F(Y?M(J/3)*4+(J%3?J%3+1:0):L(J/3)*4),Q=0,at,et=function(rt){return D(k,at>>6*rt&63)};K+2<J;K+=3)at=(U[K]<<16)+(U[K+1]<<8)+U[K+2],Z[Q++]=et(3),Z[Q++]=et(2),Z[Q++]=et(1),Z[Q++]=et(0);return K+2===J?(at=(U[K]<<16)+(U[K+1]<<8),Z[Q++]=et(3),Z[Q++]=et(2),Z[Q++]=et(1),Y||(Z[Q++]="=")):K+1===J&&(at=U[K]<<16,Z[Q++]=et(3),Z[Q++]=et(2),Y||(Z[Q++]="=",Z[Q++]="=")),G(Z,"")}})}),(function(T,P,a){"use strict";var v=a(3),g=a(4),p=a(14),x=a(586),y=a(237),b=p(1.1.toString),A=p([].join),I=Array,R=g.Uint8Array,O=!R||!R.prototype.toHex||!(function(){try{var M=new R([255,255,255,255,255,255,255,255]);return M.toHex()==="ffffffffffffffff"}catch(L){return!1}})();R&&v({target:"Uint8Array",proto:!0,forced:O},{toHex:function(){x(this),y(this.buffer);for(var L=I(this.length),D=0,N=this.length;D<N;D++){var F=b(this[D],16);L[D]=F.length===1?"0"+F:F}return A(L,"")}})}),(function(T,P,a){"use strict";var v=a(3),g=a(14),p=a(68),x=String.fromCharCode,y=g("".charAt),b=g(/./.exec),A=g("".slice),I=/^[\da-f]{2}$/i,R=/^[\da-f]{4}$/i;v({global:!0},{unescape:function(M){for(var L=p(M),D="",N=L.length,F=0,G,j;F<N;){if(G=y(L,F++),G==="%"){if(y(L,F)==="u"){if(j=A(L,F+1,F+5),b(R,j)){D+=x(parseInt(j,16)),F+=5;continue}}else if(j=A(L,F,F+2),b(I,j)){D+=x(parseInt(j,16)),F+=2;continue}}D+=G}return D}})}),(function(T,P,a){"use strict";a(592)}),(function(T,P,a){"use strict";var v=a(295),g=a(4),p=a(14),x=a(215),y=a(300),b=a(299),A=a(593),I=a(20),R=a(51).enforce,O=a(7),M=a(52),L=Object,D=Array.isArray,N=L.isExtensible,F=L.isFrozen,G=L.isSealed,j=L.freeze,X=L.seal,U=!g.ActiveXObject&&"ActiveXObject"in g,V,k=function(rt){return function(){return rt(this,arguments.length?arguments[0]:void 0)}},Y=b("WeakMap",k,A),K=Y.prototype,J=p(K.set),Z=function(){return v&&O(function(){var rt=j([]);return J(new Y,rt,1),!F(rt)})};if(M)if(U){V=A.getConstructor(k,"WeakMap",!0),y.enable();var Q=p(K.delete),at=p(K.has),et=p(K.get);x(K,{delete:function(rt){if(I(rt)&&!N(rt)){var nt=R(this);return nt.frozen||(nt.frozen=new V),Q(this,rt)||nt.frozen.delete(rt)}return Q(this,rt)},has:function(nt){if(I(nt)&&!N(nt)){var ut=R(this);return ut.frozen||(ut.frozen=new V),at(this,nt)||ut.frozen.has(nt)}return at(this,nt)},get:function(nt){if(I(nt)&&!N(nt)){var ut=R(this);return ut.frozen||(ut.frozen=new V),at(this,nt)?et(this,nt):ut.frozen.get(nt)}return et(this,nt)},set:function(nt,ut){if(I(nt)&&!N(nt)){var ht=R(this);ht.frozen||(ht.frozen=new V),at(this,nt)?J(this,nt,ut):ht.frozen.set(nt,ut)}else J(this,nt,ut);return this}})}else Z()&&x(K,{set:function(nt,ut){var ht;return D(nt)&&(F(nt)?ht=j:G(nt)&&(ht=X)),J(this,nt,ut),ht&&ht(nt),this}})}),(function(T,P,a){"use strict";var v=a(14),g=a(215),p=a(300).getWeakData,x=a(216),y=a(46),b=a(17),A=a(20),I=a(137),R=a(83),O=a(38),M=a(51),L=M.set,D=M.getterFor,N=R.find,F=R.findIndex,G=v([].splice),j=0,X=function(k){return k.frozen||(k.frozen=new U)},U=function(){this.entries=[]},V=function(k,Y){return N(k.entries,function(K){return K[0]===Y})};U.prototype={get:function(k){var Y=V(this,k);if(Y)return Y[1]},has:function(k){return!!V(this,k)},set:function(k,Y){var K=V(this,k);K?K[1]=Y:this.entries.push([k,Y])},delete:function(k){var Y=F(this.entries,function(K){return K[0]===k});return~Y&&G(this.entries,Y,1),!!~Y}},T.exports={getConstructor:function(k,Y,K,J){var Z=k(function(rt,nt){x(rt,Q),L(rt,{type:Y,id:j++,frozen:null}),b(nt)||I(nt,rt[J],{that:rt,AS_ENTRIES:K})}),Q=Z.prototype,at=D(Y),et=function(rt,nt,ut){var ht=at(rt),pt=p(y(nt),!0);return pt===!0?X(ht).set(nt,ut):pt[ht.id]=ut,rt};return g(Q,{delete:function(rt){var nt=at(this);if(!A(rt))return!1;var ut=p(rt);return ut===!0?X(nt).delete(rt):ut&&O(ut,nt.id)&&delete ut[nt.id]},has:function(nt){var ut=at(this);if(!A(nt))return!1;var ht=p(nt);return ht===!0?X(ut).has(nt):ht&&O(ht,ut.id)}}),g(Q,K?{get:function(nt){var ut=at(this);if(A(nt)){var ht=p(nt);if(ht===!0)return X(ut).get(nt);if(ht)return ht[ut.id]}},set:function(nt,ut){return et(this,nt,ut)}}:{add:function(nt){return et(this,nt,!0)}}),Z}}}),(function(T,P,a){"use strict";var v=a(3),g=a(595),p=a(36),x=g.get,y=g.has,b=g.set;v({target:"WeakMap",proto:!0,real:!0,forced:p},{getOrInsert:function(I,R){return y(this,I)?x(this,I):(b(this,I,R),R)}})}),(function(T,P,a){"use strict";var v=a(14),g=WeakMap.prototype;T.exports={WeakMap,set:v(g.set),get:v(g.get),has:v(g.has),remove:v(g.delete)}}),(function(T,P,a){"use strict";var v=a(3),g=a(30),p=a(597),x=a(598),y=a(595),b=a(36),A=y.get,I=y.has,R=y.set,O=b||!(function(){try{WeakMap.prototype.getOrInsertComputed&&new WeakMap().getOrInsertComputed(1,function(){throw 1})}catch(M){return M instanceof TypeError}})();v({target:"WeakMap",proto:!0,real:!0,forced:O},{getOrInsertComputed:function(L,D){if(b||p(this),x(L),g(D),I(this,L))return A(this,L);var N=D(L);return R(this,L,N),N}})}),(function(T,P,a){"use strict";var v=a(595).has;T.exports=function(g){return v(g),g}}),(function(T,P,a){"use strict";var v=a(595),g=new v.WeakMap,p=v.set,x=v.remove;T.exports=function(y){return p(g,y,1),x(g,y),y}}),(function(T,P,a){"use strict";a(600)}),(function(T,P,a){"use strict";var v=a(299),g=a(593);v("WeakSet",function(p){return function(){return p(this,arguments.length?arguments[0]:void 0)}},g)}),(function(T,P,a){"use strict";var v=a(3),g=a(4),p=a(23),x=a(14),y=a(8),b=a(7),A=a(68),I=a(390),R=a(581).c2i,O=/[^\d+/a-z]/i,M=/[\t\n\f\r ]+/g,L=/[=]{1,2}$/,D=p("atob"),N=Array,F=String.fromCharCode,G=x("".charAt),j=x("".replace),X=x([].join),U=x(O.exec),V=!!D&&!b(function(){return D("aGk=")!=="hi"}),k=V&&b(function(){return D(" ")!==""}),Y=V&&!b(function(){D("a")}),K=V&&!b(function(){D()}),J=V&&D.length!==1,Z=!V||k||Y||K||J;v({global:!0,bind:!0,enumerable:!0,forced:Z},{atob:function(at){if(I(arguments.length,1),V&&!k&&!Y)return y(D,g,at);var et=j(A(at),M,""),rt=0,nt=0,ut,ht,pt;et.length&3||(et=j(et,L,"")),ut=et.length;var yt=ut&3;if(yt===1||U(O,et))throw new(p("DOMException"))("The string is not correctly encoded","InvalidCharacterError");for(var At=new N((ut>>2)*3+(yt?yt-1:0)),Et=0;rt<ut;)ht=G(et,rt++),pt=nt&3?(pt<<6)+R[ht]:R[ht],nt++&3&&(At[Et++]=F(255&pt>>(-2*nt&6)));return X(At,"")}})}),(function(T,P,a){"use strict";var v=a(3),g=a(4),p=a(23),x=a(14),y=a(8),b=a(7),A=a(68),I=a(390),R=a(581).i2c,O=p("btoa"),M=Array,L=x([].join),D=x("".charAt),N=x("".charCodeAt),F=!!O&&!b(function(){return O("hi")!=="aGk="}),G=F&&!b(function(){O()}),j=F&&b(function(){return O(null)!=="bnVsbA=="}),X=F&&O.length!==1;v({global:!0,bind:!0,enumerable:!0,forced:!F||G||j||X},{btoa:function(V){if(I(arguments.length,1),F)return y(O,g,A(V));for(var k=A(V),Y=new M((k.length+2)/3<<2),K=0,J=0,Z=R,Q,at;D(k,J)||(Z="=",J%1);){if(at=N(k,J+=.75),at>255)throw new(p("DOMException"))("The string contains characters outside of the Latin1 range","InvalidCharacterError");Q=Q<<8|at,Y[K++]=D(Z,63&Q>>8-J%1*8)}return L(Y,"")}})}),(function(T,P,a){"use strict";var v=a(4),g=a(604),p=a(605),x=a(168),y=a(43),b=function(I){if(I&&I.forEach!==x)try{y(I,"forEach",x)}catch(R){I.forEach=x}};for(var A in g)g[A]&&b(v[A]&&v[A].prototype);b(p)}),(function(T){"use strict";T.exports={CSSRuleList:0,CSSStyleDeclaration:0,CSSValueList:0,ClientRectList:0,DOMRectList:0,DOMStringList:0,DOMTokenList:1,DataTransferItemList:0,FileList:0,HTMLAllCollection:0,HTMLCollection:0,HTMLFormElement:0,HTMLSelectElement:0,MediaList:0,MimeTypeArray:0,NamedNodeMap:0,NodeList:1,PaintRequestList:0,Plugin:0,PluginArray:0,SVGLengthList:0,SVGNumberList:0,SVGPathSegList:0,SVGPointList:0,SVGStringList:0,SVGTransformList:0,SourceBufferList:0,StyleSheetList:0,TextTrackCueList:0,TextTrackList:0,TouchList:0}}),(function(T,P,a){"use strict";var v=a(42),g=v("span").classList,p=g&&g.constructor&&g.constructor.prototype;T.exports=p===Object.prototype?void 0:p}),(function(T,P,a){"use strict";var v=a(4),g=a(604),p=a(605),x=a(176),y=a(43),b=a(82),A=a(33),I=A("iterator"),R=x.values,O=function(L,D){if(L){if(L[I]!==R)try{y(L,I,R)}catch(F){L[I]=R}if(b(L,D,!0),g[D]){for(var N in x)if(L[N]!==x[N])try{y(L,N,x[N])}catch(F){L[N]=x[N]}}}};for(var M in g)O(v[M]&&v[M].prototype,M);O(p,"DOMTokenList")}),(function(T,P,a){"use strict";var v=a(3),g=a(23),p=a(239),x=a(7),y=a(71),b=a(11),A=a(44).f,I=a(47),R=a(77),O=a(38),M=a(216),L=a(46),D=a(132),N=a(125),F=a(608),G=a(128),j=a(51),X=a(6),U=a(36),V="DOMException",k="DATA_CLONE_ERR",Y=g("Error"),K=g(V)||(function(){try{var Nt=g("MessageChannel")||p("worker_threads").MessageChannel;new Nt().port1.postMessage(new WeakMap)}catch(Jt){if(Jt.name===k&&Jt.code===25)return Jt.constructor}})(),J=K&&K.prototype,Z=Y.prototype,Q=j.set,at=j.getterFor(V),et="stack"in new Y(V),rt=function(Nt){return O(F,Nt)&&F[Nt].m?F[Nt].c:0},nt=function(){M(this,ut);var Jt=arguments.length,ne=N(Jt<1?void 0:arguments[0]),ve=N(Jt<2?void 0:arguments[1],"Error"),le=rt(ve);if(Q(this,{type:V,name:ve,message:ne,code:le}),X||(this.name=ve,this.message=ne,this.code=le),et){var fe=new Y(ne);fe.name=V,A(this,"stack",b(1,G(fe.stack,1)))}},ut=nt.prototype=y(Z),ht=function(Nt){return{enumerable:!0,configurable:!0,get:Nt}},pt=function(Nt){return ht(function(){return at(this)[Nt]})};X&&(R(ut,"code",pt("code")),R(ut,"message",pt("message")),R(ut,"name",pt("name"))),A(ut,"constructor",b(1,nt));var yt=x(function(){return!(new K instanceof Y)}),At=yt||x(function(){return Z.toString!==D||String(new K(1,2))!=="2: 1"}),Et=yt||x(function(){return new K(1,"DataCloneError").code!==25}),Ht=yt||K[k]!==25||J[k]!==25,Ut=U?At||Et||Ht:yt;v({global:!0,constructor:!0,forced:Ut},{DOMException:Ut?nt:K});var kt=g(V),Ct=kt.prototype;At&&(U||K===kt)&&I(Ct,"toString",D),Et&&X&&K===kt&&R(Ct,"code",ht(function(){return rt(L(this).name)}));for(var It in F)if(O(F,It)){var Dt=F[It],Vt=Dt.s,_t=b(6,Dt.c);O(kt,Vt)||A(kt,Vt,_t),O(Ct,Vt)||A(Ct,Vt,_t)}}),(function(T){"use strict";T.exports={IndexSizeError:{s:"INDEX_SIZE_ERR",c:1,m:1},DOMStringSizeError:{s:"DOMSTRING_SIZE_ERR",c:2,m:0},HierarchyRequestError:{s:"HIERARCHY_REQUEST_ERR",c:3,m:1},WrongDocumentError:{s:"WRONG_DOCUMENT_ERR",c:4,m:1},InvalidCharacterError:{s:"INVALID_CHARACTER_ERR",c:5,m:1},NoDataAllowedError:{s:"NO_DATA_ALLOWED_ERR",c:6,m:0},NoModificationAllowedError:{s:"NO_MODIFICATION_ALLOWED_ERR",c:7,m:1},NotFoundError:{s:"NOT_FOUND_ERR",c:8,m:1},NotSupportedError:{s:"NOT_SUPPORTED_ERR",c:9,m:1},InUseAttributeError:{s:"INUSE_ATTRIBUTE_ERR",c:10,m:1},InvalidStateError:{s:"INVALID_STATE_ERR",c:11,m:1},SyntaxError:{s:"SYNTAX_ERR",c:12,m:1},InvalidModificationError:{s:"INVALID_MODIFICATION_ERR",c:13,m:1},NamespaceError:{s:"NAMESPACE_ERR",c:14,m:1},InvalidAccessError:{s:"INVALID_ACCESS_ERR",c:15,m:1},ValidationError:{s:"VALIDATION_ERR",c:16,m:0},TypeMismatchError:{s:"TYPE_MISMATCH_ERR",c:17,m:1},SecurityError:{s:"SECURITY_ERR",c:18,m:1},NetworkError:{s:"NETWORK_ERR",c:19,m:1},AbortError:{s:"ABORT_ERR",c:20,m:1},URLMismatchError:{s:"URL_MISMATCH_ERR",c:21,m:1},QuotaExceededError:{s:"QUOTA_EXCEEDED_ERR",c:22,m:1},TimeoutError:{s:"TIMEOUT_ERR",c:23,m:1},InvalidNodeTypeError:{s:"INVALID_NODE_TYPE_ERR",c:24,m:1},DataCloneError:{s:"DATA_CLONE_ERR",c:25,m:1}}}),(function(T,P,a){"use strict";var v=a(3),g=a(4),p=a(23),x=a(11),y=a(44).f,b=a(38),A=a(216),I=a(124),R=a(125),O=a(608),M=a(128),L=a(6),D=a(36),N="DOMException",F=p("Error"),G=p(N),j=function(){A(this,X);var nt=arguments.length,ut=R(nt<1?void 0:arguments[0]),ht=R(nt<2?void 0:arguments[1],"Error"),pt=new G(ut,ht),yt=new F(ut);return yt.name=N,y(pt,"stack",x(1,M(yt.stack,1))),I(pt,this,j),pt},X=j.prototype=G.prototype,U="stack"in new F(N),V="stack"in new G(1,2),k=G&&L&&Object.getOwnPropertyDescriptor(g,N),Y=!!k&&!(k.writable&&k.configurable),K=U&&!Y&&!V;v({global:!0,constructor:!0,forced:D||K},{DOMException:K?j:G});var J=p(N),Z=J.prototype;if(Z.constructor!==J){D||y(Z,"constructor",x(1,J));for(var Q in O)if(b(O,Q)){var at=O[Q],et=at.s;b(J,et)||y(J,et,x(6,at.c))}}}),(function(T,P,a){"use strict";var v=a(23),g=a(82),p="DOMException";g(v(p),p)}),(function(T,P,a){"use strict";a(612),a(613)}),(function(T,P,a){"use strict";var v=a(3),g=a(4),p=a(389).clear;v({global:!0,bind:!0,enumerable:!0,forced:g.clearImmediate!==p},{clearImmediate:p})}),(function(T,P,a){"use strict";var v=a(3),g=a(4),p=a(389).set,x=a(614),y=g.setImmediate?x(p,!1):p;v({global:!0,bind:!0,enumerable:!0,forced:g.setImmediate!==y},{setImmediate:y})}),(function(T,P,a){"use strict";var v=a(4),g=a(117),p=a(21),x=a(190),y=a(28),b=a(76),A=a(390),I=v.Function,R=/MSIE .\./.test(y)||x==="BUN"&&(function(){var O=v.Bun.version.split(".");return O.length<3||O[0]==="0"&&(O[1]<3||O[1]==="3"&&O[2]==="0")})();T.exports=function(O,M){var L=M?2:1;return R?function(D,N){var F=A(arguments.length,1)>L,G=p(D)?D:I(D),j=F?b(arguments,L):[],X=F?function(){g(G,this,j)}:G;return M?O(X,N):O(X)}:O}}),(function(T,P,a){"use strict";var v=a(3),g=a(4),p=a(392),x=a(30),y=a(390),b=a(7),A=a(6),I=b(function(){return A&&Object.getOwnPropertyDescriptor(g,"queueMicrotask").value.length!==1});v({global:!0,enumerable:!0,dontCallGetSet:!0,forced:I},{queueMicrotask:function(O){y(arguments.length,1),p(x(O))}})}),(function(T,P,a){"use strict";var v=a(3),g=a(4),p=a(77),x=a(6),y=TypeError,b=Object.defineProperty,A=g.self!==g;try{if(x){var I=Object.getOwnPropertyDescriptor(g,"self");(A||!I||!I.get||!I.enumerable)&&p(g,"self",{get:function(){return g},set:function(O){if(this!==g)throw new y("Illegal invocation");b(g,"self",{value:O,writable:!0,configurable:!0,enumerable:!0})},configurable:!0,enumerable:!0})}else v({global:!0,simple:!0,forced:A},{self:g})}catch(R){}}),(function(T,P,a){"use strict";var v=a(36),g=a(3),p=a(4),x=a(23),y=a(14),b=a(7),A=a(40),I=a(21),R=a(89),O=a(17),M=a(20),L=a(22),D=a(137),N=a(46),F=a(69),G=a(38),j=a(90),X=a(43),U=a(63),V=a(390),k=a(440),Y=a(305),K=a(460),J=a(462),Z=a(238),Q=a(129),at=a(240),et=p.Object,rt=p.Array,nt=p.Date,ut=p.Error,ht=p.TypeError,pt=p.PerformanceMark,yt=x("DOMException"),At=Y.Map,Et=Y.has,Ht=Y.get,Ut=Y.set,kt=K.Set,Ct=K.add,It=K.has,Dt=x("Object","keys"),Vt=y([].push),_t=y((!0).valueOf),Nt=y(1.1.valueOf),Jt=y("".valueOf),ne=y(nt.prototype.getTime),ve=A("structuredClone"),le="DataCloneError",fe="Transferring",Ce=function(vt){return!b(function(){var Rt=new p.Set([7]),Tt=vt(Rt),wt=vt(et(7));return Tt===Rt||!Tt.has(7)||!M(wt)||+wt!=7})&&vt},Be=function(vt,Rt){return!b(function(){var Tt=new Rt,wt=vt({a:Tt,b:Tt});return!(wt&&wt.a===wt.b&&wt.a instanceof Rt&&wt.a.stack===Tt.stack)})},Ie=function(vt){return!b(function(){var Rt=vt(new p.AggregateError([1],ve,{cause:3}));return Rt.name!=="AggregateError"||Rt.errors[0]!==1||Rt.message!==ve||Rt.cause!==3})},ce=p.structuredClone,xe=v||!Be(ce,ut)||!Be(ce,yt)||!Ie(ce),Ue=!ce&&Ce(function(vt){return new pt(ve,{detail:vt}).detail}),Pt=Ce(ce)||Ue,zt=function(vt){throw new yt("Uncloneable type: "+vt,le)},jt=function(vt,Rt){throw new yt((Rt||"Cloning")+" of "+vt+" cannot be properly polyfilled in this engine",le)},we=function(vt,Rt){return Pt||jt(Rt),Pt(vt)},$t=function(){var vt;try{vt=new p.DataTransfer}catch(Rt){try{vt=new p.ClipboardEvent("").clipboardData}catch(Tt){}}return vt&&vt.items&&vt.files?vt:null},Xt=function(vt,Rt,Tt){if(Et(Rt,vt))return Ht(Rt,vt);var wt=Tt||F(vt),Ft,Lt,ue,ye,Me,Fe;if(wt==="SharedArrayBuffer")Pt?Ft=Pt(vt):Ft=vt;else{var tn=p.DataView;!tn&&!I(vt.slice)&&jt("ArrayBuffer");try{if(I(vt.slice)&&!vt.resizable)Ft=vt.slice(0);else for(Lt=vt.byteLength,ue=("maxByteLength"in vt)?{maxByteLength:vt.maxByteLength}:void 0,Ft=new ArrayBuffer(Lt,ue),ye=new tn(vt),Me=new tn(Ft),Fe=0;Fe<Lt;Fe++)Me.setUint8(Fe,ye.getUint8(Fe))}catch(Ve){throw new yt("ArrayBuffer is detached",le)}}return Ut(Rt,vt,Ft),Ft},re=function(vt,Rt,Tt,wt,Ft){var Lt=p[Rt];return M(Lt)||jt(Rt),new Lt(Xt(vt.buffer,Ft),Tt,wt)},oe=function(vt,Rt){if(L(vt)&&zt("Symbol"),!M(vt))return vt;if(Rt){if(Et(Rt,vt))return Ht(Rt,vt)}else Rt=new At;var Tt=F(vt),wt,Ft,Lt,ue,ye,Me,Fe,tn;switch(Tt){case"Array":Lt=rt(U(vt));break;case"Object":Lt={};break;case"Map":Lt=new At;break;case"Set":Lt=new kt;break;case"RegExp":Lt=new RegExp(vt.source,k(vt));break;case"Error":switch(Ft=vt.name,Ft){case"AggregateError":Lt=new(x(Ft))([]);break;case"EvalError":case"RangeError":case"ReferenceError":case"SuppressedError":case"SyntaxError":case"TypeError":case"URIError":Lt=new(x(Ft));break;case"CompileError":case"LinkError":case"RuntimeError":Lt=new(x("WebAssembly",Ft));break;default:Lt=new ut}break;case"DOMException":Lt=new yt(vt.message,vt.name);break;case"ArrayBuffer":case"SharedArrayBuffer":Lt=Xt(vt,Rt,Tt);break;case"DataView":case"Int8Array":case"Uint8Array":case"Uint8ClampedArray":case"Int16Array":case"Uint16Array":case"Int32Array":case"Uint32Array":case"Float16Array":case"Float32Array":case"Float64Array":case"BigInt64Array":case"BigUint64Array":Me=Tt==="DataView"?vt.byteLength:vt.length,Lt=re(vt,Tt,vt.byteOffset,Me,Rt);break;case"DOMQuad":try{Lt=new DOMQuad(oe(vt.p1,Rt),oe(vt.p2,Rt),oe(vt.p3,Rt),oe(vt.p4,Rt))}catch(Ve){Lt=we(vt,Tt)}break;case"File":if(Pt)try{Lt=Pt(vt),F(Lt)!==Tt&&(Lt=void 0)}catch(Ve){}if(!Lt)try{Lt=new File([vt],vt.name,vt)}catch(Ve){}Lt||jt(Tt);break;case"FileList":if(ue=$t(),ue){for(ye=0,Me=U(vt);ye<Me;ye++)ue.items.add(oe(vt[ye],Rt));Lt=ue.files}else Lt=we(vt,Tt);break;case"ImageData":try{Lt=new ImageData(oe(vt.data,Rt),vt.width,vt.height,{colorSpace:vt.colorSpace})}catch(Ve){Lt=we(vt,Tt)}break;default:if(Pt)Lt=Pt(vt);else switch(Tt){case"BigInt":Lt=et(vt.valueOf());break;case"Boolean":Lt=et(_t(vt));break;case"Number":Lt=et(Nt(vt));break;case"String":Lt=et(Jt(vt));break;case"Date":Lt=new nt(ne(vt));break;case"Blob":try{Lt=vt.slice(0,vt.size,vt.type)}catch(Ve){jt(Tt)}break;case"DOMPoint":case"DOMPointReadOnly":wt=p[Tt];try{Lt=wt.fromPoint?wt.fromPoint(vt):new wt(vt.x,vt.y,vt.z,vt.w)}catch(Ve){jt(Tt)}break;case"DOMRect":case"DOMRectReadOnly":wt=p[Tt];try{Lt=wt.fromRect?wt.fromRect(vt):new wt(vt.x,vt.y,vt.width,vt.height)}catch(Ve){jt(Tt)}break;case"DOMMatrix":case"DOMMatrixReadOnly":wt=p[Tt];try{Lt=wt.fromMatrix?wt.fromMatrix(vt):new wt(vt)}catch(Ve){jt(Tt)}break;case"AudioData":case"VideoFrame":I(vt.clone)||jt(Tt);try{Lt=vt.clone()}catch(Ve){zt(Tt)}break;case"CropTarget":case"CryptoKey":case"FileSystemDirectoryHandle":case"FileSystemFileHandle":case"FileSystemHandle":case"GPUCompilationInfo":case"GPUCompilationMessage":case"ImageBitmap":case"RTCCertificate":case"WebAssembly.Module":jt(Tt);default:zt(Tt)}}switch(Ut(Rt,vt,Lt),Tt){case"Array":case"Object":for(Fe=Dt(vt),ye=0,Me=U(Fe);ye<Me;ye++)tn=Fe[ye],j(Lt,tn,oe(vt[tn],Rt));break;case"Map":vt.forEach(function(Ve,_n){Ut(Lt,oe(_n,Rt),oe(Ve,Rt))});break;case"Set":vt.forEach(function(Ve){Ct(Lt,oe(Ve,Rt))});break;case"Error":X(Lt,"message",oe(vt.message,Rt)),G(vt,"cause")&&X(Lt,"cause",oe(vt.cause,Rt)),Ft==="AggregateError"?Lt.errors=oe(vt.errors,Rt):Ft==="SuppressedError"&&(Lt.error=oe(vt.error,Rt),Lt.suppressed=oe(vt.suppressed,Rt));case"DOMException":Q&&X(Lt,"stack",oe(vt.stack,Rt))}return Lt},pe=function(vt,Rt){if(!M(vt))throw new ht("Transfer option cannot be converted to a sequence");var Tt=[];D(vt,function(_n){Vt(Tt,N(_n))});for(var wt=0,Ft=U(Tt),Lt=new kt,ue,ye,Me,Fe,tn,Ve;wt<Ft;){if(ue=Tt[wt++],ye=F(ue),Fe=void 0,ye==="ArrayBuffer"?It(Lt,ue):Et(Rt,ue))throw new yt("Duplicate transferable",le);if(ye==="ArrayBuffer"){Ct(Lt,ue);continue}if(at)Fe=ce(ue,{transfer:[ue]});else switch(ye){case"ImageBitmap":Me=p.OffscreenCanvas,R(Me)||jt(ye,fe);try{tn=new Me(ue.width,ue.height),Ve=tn.getContext("bitmaprenderer"),Ve.transferFromImageBitmap(ue),Fe=tn.transferToImageBitmap()}catch(_n){}break;case"AudioData":case"VideoFrame":(!I(ue.clone)||!I(ue.close))&&jt(ye,fe);try{Fe=ue.clone(),ue.close()}catch(_n){}break;case"MediaSourceHandle":case"MessagePort":case"MIDIAccess":case"OffscreenCanvas":case"ReadableStream":case"RTCDataChannel":case"TransformStream":case"WebTransportReceiveStream":case"WebTransportSendStream":case"WritableStream":jt(ye,fe)}if(Fe===void 0)throw new yt("This object cannot be transferred: "+ye,le);Ut(Rt,ue,Fe)}return Lt},rn=function(vt){J(vt,function(Rt){at?ce(Rt,{transfer:[Rt]}):I(Rt.transfer)?Rt.transfer():Z?Z(Rt):jt("ArrayBuffer",fe)})};g({global:!0,enumerable:!0,sham:!at,forced:xe},{structuredClone:function(Rt){var Tt=V(arguments.length,1)>1&&!O(arguments[1])?N(arguments[1]):void 0,wt=Tt?Tt.transfer:void 0,Ft,Lt;wt!==void 0&&(Ft=new At,Lt=pe(wt,Ft));var ue=oe(Rt,Ft);return Lt&&rn(Lt),ue}})}),(function(T,P,a){"use strict";a(619),a(620)}),(function(T,P,a){"use strict";var v=a(3),g=a(4),p=a(614),x=p(g.setInterval,!0);v({global:!0,bind:!0,forced:g.setInterval!==x},{setInterval:x})}),(function(T,P,a){"use strict";var v=a(3),g=a(4),p=a(614),x=p(g.setTimeout,!0);v({global:!0,bind:!0,forced:g.setTimeout!==x},{setTimeout:x})}),(function(T,P,a){"use strict";a(622)}),(function(T,P,a){"use strict";a(489);var v=a(3),g=a(6),p=a(623),x=a(4),y=a(84),b=a(14),A=a(47),I=a(77),R=a(216),O=a(38),M=a(351),L=a(170),D=a(76),N=a(482).codeAt,F=a(624),G=a(625),j=a(68),X=a(82),U=a(390),V=a(626),k=a(51),Y=k.set,K=k.getterFor("URL"),J=V.URLSearchParams,Z=V.getState,Q=G.decode,at=G.encode,et=x.URL,rt=x.TypeError,nt=x.parseInt,ut=Math.floor,ht=Math.pow,pt=String.fromCharCode,yt=b("".charAt),At=b(/./.exec),Et=b([].join),Ht=b(1.1.toString),Ut=b([].pop),kt=b([].push),Ct=b("".replace),It=b([].shift),Dt=b("".split),Vt=b("".indexOf),_t=b("".slice),Nt=b("".toLowerCase),Jt=b([].unshift),ne="Invalid authority",ve="Invalid scheme",le="Invalid host",fe="Invalid port",Ce=/[a-z]/i,Be=/[\d+\-.a-z]/i,Ie=/\d/,ce=/^0x/i,xe=/^[0-7]+$/,Ue=/^\d+$/,Pt=/^[\da-f]+$/i,zt=/[\u0000-\u0020#%/:<>?@[\\\]^|\u007F]/,jt=/[\0\t\n\r #/:<>?@[\\\]^|]/,we=/^[\u0000-\u0020]+/,$t=/(^|[^\u0000-\u0020])[\u0000-\u0020]+$/,Xt=/[\t\n\r]/g,re=/[^\u0000-\u007F]/,oe="\xA8\xAF\xB4\xB8\u02D8\u02D9\u02DA\u02DB\u02DC\u02DD\u037A\u0384\u0385\u1FBD\u1FBF\u1FC0\u1FC1\u1FCD\u1FCE\u1FCF\u1FDD\u1FDE\u1FDF\u1FED\u1FEE\u1FFD\u1FFE\u2017\u203E\u2047\u2048\u2049\u2100\u2101\u2105\u2106\u2A74\u309B\u309C\uFC5E\uFC5F\uFC60\uFC61\uFC62\uFC63\uFDFA\uFDFB\uFE13\uFE16\uFE47\uFE48\uFE49\uFE4A\uFE4B\uFE4C\uFE55\uFE56\uFE5F\uFE64\uFE65\uFE68\uFE6A\uFE6B\uFE70\uFE72\uFE74\uFE76\uFE78\uFE7A\uFE7C\uFE7E\uFFE3",pe,rn=function(dt){return dt===173||dt===847||dt===8203||dt===12644||dt===65279||dt===65440||dt>=4447&&dt<=4448||dt>=6068&&dt<=6069||dt>=6155&&dt<=6159||dt>=8288&&dt<=8292||dt>=8298&&dt<=8303||dt>=65024&&dt<=65039||dt>=917760&&dt<=917999},vt=function(dt){return dt===65533||dt>=55296&&dt<=57343||dt>=128&&dt<=159||dt>=8206&&dt<=8207||dt>=8232&&dt<=8233||dt>=8234&&dt<=8238||dt>=8293&&dt<=8297||dt>=64976&&dt<=65007||(dt&65534)===65534||dt>=57344&&dt<=63743||dt>=983040&&dt<=1114109},Rt=function(dt){return dt>=65281&&dt<=65374?dt-65248:dt===160||dt===5760||dt===8239||dt===8287||dt===12288||dt>=8192&&dt<=8202||dt<=65535&&Vt(oe,pt(dt))>-1?32:dt},Tt=function(dt){if(!At(re,dt))return dt===""?null:F(dt);var Bt=L(dt),xt="",mt,Gt,Se;for(mt=0;mt<Bt.length;mt++){if(Gt=N(Bt[mt],0),vt(Gt))return null;rn(Gt)||(Se=Rt(Gt),xt+=Se===Gt?Bt[mt]:pt(Se))}return xt===""?null:F(xt)},wt=function(dt){var Bt=Dt(dt,"."),xt,mt;if(Bt[Bt.length-1]===""){if(Bt.length===1)return!1;Bt.length--}return xt=Bt[Bt.length-1],At(Ue,xt)?!0:At(ce,xt)?(mt=_t(xt,2),mt===""||!!At(Pt,mt)):!1},Ft=function(dt){var Bt=Dt(dt,"."),xt,mt,Gt,Se,de,dn,en;if(Bt.length&&Bt[Bt.length-1]===""&&Bt.length--,xt=Bt.length,xt>4)return null;for(mt=[],Gt=0;Gt<xt;Gt++){if(Se=Bt[Gt],Se==="")return null;if(de=10,Se.length>1&&yt(Se,0)==="0"&&(de=At(ce,Se)?16:8,Se=_t(Se,de===8?1:2)),Se==="")dn=0;else{if(!At(de===10?Ue:de===8?xe:Pt,Se))return null;dn=nt(Se,de)}kt(mt,dn)}for(Gt=0;Gt<xt;Gt++)if(dn=mt[Gt],Gt===xt-1){if(dn>=ht(256,5-xt))return null}else if(dn>255)return null;for(en=Ut(mt),Gt=0;Gt<mt.length;Gt++)en+=mt[Gt]*ht(256,3-Gt);return en},Lt=function(dt){var Bt=[0,0,0,0,0,0,0,0],xt=0,mt=null,Gt=0,Se,de,dn,en,Sn,Mn,Qt,hn=function(){return yt(dt,Gt)};if(hn()===":"){if(yt(dt,1)!==":")return;Gt+=2,xt++,mt=xt}for(;hn();){if(xt===8)return;if(hn()===":"){if(mt!==null)return;Gt++,xt++,mt=xt;continue}for(Se=de=0;de<4&&At(Pt,hn());)Se=Se*16+nt(hn(),16),Gt++,de++;if(hn()==="."){if(de===0||(Gt-=de,xt>6))return;for(dn=0;hn();){if(en=null,dn>0)if(hn()==="."&&dn<4)Gt++;else return;if(!At(Ie,hn()))return;for(;At(Ie,hn());){if(Sn=nt(hn(),10),en===null)en=Sn;else{if(en===0)return;en=en*10+Sn}if(en>255)return;Gt++}Bt[xt]=Bt[xt]*256+en,dn++,(dn===2||dn===4)&&xt++}if(dn!==4)return;break}else if(hn()===":"){if(Gt++,!hn())return}else if(hn())return;Bt[xt++]=Se}if(mt!==null)for(Mn=xt-mt,xt=7;xt!==0&&Mn>0;)Qt=Bt[xt],Bt[xt--]=Bt[mt+Mn-1],Bt[mt+--Mn]=Qt;else if(xt!==8)return;return Bt},ue=function(dt){for(var Bt=null,xt=1,mt=null,Gt=0,Se=0;Se<8;Se++)dt[Se]!==0?(Gt>xt&&(Bt=mt,xt=Gt),mt=null,Gt=0):(mt===null&&(mt=Se),++Gt);return Gt>xt?mt:Bt},ye=function(dt){var Bt,xt,mt,Gt;if(typeof dt=="number"){for(Bt=[],xt=0;xt<4;xt++)Jt(Bt,dt%256),dt=ut(dt/256);return Et(Bt,".")}if(typeof dt=="object"){for(Bt="",mt=ue(dt),xt=0;xt<8;xt++)Gt&&dt[xt]===0||(Gt&&(Gt=!1),mt===xt?(Bt+=xt?":":"::",Gt=!0):(Bt+=Ht(dt[xt],16),xt<7&&(Bt+=":")));return"["+Bt+"]"}return dt},Me={},Fe=M({},Me,{" ":1,'"':1,"#":1,"<":1,">":1}),tn=M({},Fe,{"'":1}),Ve=M({},Me,{" ":1,'"':1,"<":1,">":1,"`":1}),_n=M({},Ve,{"#":1,"?":1,"{":1,"}":1,"^":1}),Ci=M({},_n,{"/":1,":":1,";":1,"=":1,"@":1,"[":1,"\\":1,"]":1,"^":1,"|":1}),Ar=function(dt,Bt){var xt=N(dt,0);return xt>=32&&xt<127&&!O(Bt,dt)?dt:dt==="'"&&O(Bt,dt)?"%27":at(dt)},Ga={ftp:21,file:null,http:80,https:443,ws:80,wss:443},xa=function(dt,Bt){var xt;return dt.length===2&&At(Ce,yt(dt,0))&&((xt=yt(dt,1))===":"||!Bt&&xt==="|")},Is=function(dt){var Bt;return dt.length>1&&xa(_t(dt,0,2))&&(dt.length===2||(Bt=yt(dt,2))==="/"||Bt==="\\"||Bt==="?"||Bt==="#")},fl=function(dt){return dt==="."||Nt(dt)==="%2e"},Rs=function(dt){return dt=Nt(dt),dt===".."||dt==="%2e."||dt===".%2e"||dt==="%2e%2e"},Ii={},ws={},Ri={},Os={},Ps={},wi={},Ms={},Ls={},Xa={},Wa={},Oi={},Pi={},Mi={},Li={},Di={},Fi={},ra={},sr={},Ds={},hr={},fn={},Va=function(dt,Bt,xt){var mt=j(dt),Gt,Se,de;if(Bt){if(Se=this.parse(mt),Se)throw new rt(Se);this.searchParams=null}else{if(xt!==void 0&&(Gt=new Va(xt,!0)),Se=this.parse(mt,null,Gt),Se)throw new rt(Se);de=Z(new J),de.bindURL(this),this.searchParams=de}};Va.prototype={type:"URL",parse:function(dt,Bt,xt){var mt=this,Gt=Bt||Ii,Se=0,de="",dn=!1,en=!1,Sn=!1,Mn,Qt,hn,qn;for(dt=j(dt),Bt||(mt.scheme="",mt.username="",mt.password="",mt.host=null,mt.port=null,mt.path=[],mt.query=null,mt.fragment=null,mt.cannotBeABaseURL=!1,dt=Ct(dt,we,""),dt=Ct(dt,$t,"$1")),dt=Ct(dt,Xt,""),Mn=L(dt);Se<=Mn.length;){switch(Qt=Mn[Se],Gt){case Ii:if(Qt&&At(Ce,Qt))de+=Nt(Qt),Gt=ws;else{if(Bt)return ve;Gt=Ri;continue}break;case ws:if(Qt&&At(Be,Qt))de+=Nt(Qt);else if(Qt===":"){if(Bt&&(mt.isSpecial()!==O(Ga,de)||de==="file"&&(mt.includesCredentials()||mt.port!==null)||mt.scheme==="file"&&mt.host===""))return;if(mt.scheme=de,Bt){mt.isSpecial()&&Ga[mt.scheme]===mt.port&&(mt.port=null);return}de="",mt.scheme==="file"?Gt=Li:mt.isSpecial()&&xt&&xt.scheme===mt.scheme?Gt=Os:mt.isSpecial()?Gt=Ls:Mn[Se+1]==="/"?(Gt=Ps,Se++):(mt.cannotBeABaseURL=!0,kt(mt.path,""),Gt=Ds)}else{if(Bt)return ve;de="",Gt=Ri,Se=0;continue}break;case Ri:if(!xt||xt.cannotBeABaseURL&&Qt!=="#")return ve;if(xt.cannotBeABaseURL&&Qt==="#"){mt.scheme=xt.scheme,mt.path=D(xt.path),mt.query=xt.query,mt.fragment="",mt.cannotBeABaseURL=!0,Gt=fn;break}Gt=xt.scheme==="file"?Li:wi;continue;case Os:if(Qt==="/"&&Mn[Se+1]==="/")Gt=Xa,Se++;else{Gt=wi;continue}break;case Ps:if(Qt==="/"){Gt=Wa;break}else{Gt=sr;continue}case wi:if(mt.scheme=xt.scheme,Qt===pe)mt.username=xt.username,mt.password=xt.password,mt.host=xt.host,mt.port=xt.port,mt.path=D(xt.path),mt.query=xt.query;else if(Qt==="/"||Qt==="\\"&&mt.isSpecial())Gt=Ms;else if(Qt==="?")mt.username=xt.username,mt.password=xt.password,mt.host=xt.host,mt.port=xt.port,mt.path=D(xt.path),mt.query="",Gt=hr;else if(Qt==="#")mt.username=xt.username,mt.password=xt.password,mt.host=xt.host,mt.port=xt.port,mt.path=D(xt.path),mt.query=xt.query,mt.fragment="",Gt=fn;else{mt.username=xt.username,mt.password=xt.password,mt.host=xt.host,mt.port=xt.port,mt.path=D(xt.path),mt.path.length&&mt.path.length--,Gt=sr;continue}break;case Ms:if(mt.isSpecial()&&(Qt==="/"||Qt==="\\"))Gt=Xa;else if(Qt==="/")Gt=Wa;else{mt.username=xt.username,mt.password=xt.password,mt.host=xt.host,mt.port=xt.port,Gt=sr;continue}break;case Ls:if(Gt=Xa,Qt!=="/"||Mn[Se+1]!=="/")continue;Se++;break;case Xa:if(Qt!=="/"&&Qt!=="\\"){Gt=Wa;continue}break;case Wa:if(Qt==="@"){dn&&(de="%40"+de),dn=!0,hn=L(de);for(var ya=0;ya<hn.length;ya++){var ja=hn[ya];if(ja===":"&&!Sn){Sn=!0;continue}var Ta=Ar(ja,Ci);Sn?mt.password+=Ta:mt.username+=Ta}de=""}else if(Qt===pe||Qt==="/"||Qt==="?"||Qt==="#"||Qt==="\\"&&mt.isSpecial()){if(dn&&de==="")return ne;Se-=L(de).length+1,de="",Gt=Oi}else de+=Qt;break;case Oi:case Pi:if(Bt&&mt.scheme==="file"){Gt=Fi;continue}else if(Qt===":"&&!en){if(de==="")return le;if(Bt===Pi)return;if(qn=mt.parseHost(de),qn)return qn;de="",Gt=Mi}else if(Qt===pe||Qt==="/"||Qt==="?"||Qt==="#"||Qt==="\\"&&mt.isSpecial()){if(mt.isSpecial()&&de==="")return le;if(Bt&&de===""&&(mt.includesCredentials()||mt.port!==null))return;if(qn=mt.parseHost(de),qn)return qn;if(de="",Gt=ra,Bt)return;continue}else Qt==="["?en=!0:Qt==="]"&&(en=!1),de+=Qt;break;case Mi:if(At(Ie,Qt))de+=Qt;else if(Qt===pe||Qt==="/"||Qt==="?"||Qt==="#"||Qt==="\\"&&mt.isSpecial()||Bt){if(de!==""){var Ni=nt(de,10);if(Ni>65535)return fe;mt.port=mt.isSpecial()&&Ni===Ga[mt.scheme]?null:Ni,de=""}if(Bt)return;Gt=ra;continue}else return fe;break;case Li:if(mt.scheme="file",mt.host="",Qt==="/"||Qt==="\\")Gt=Di;else if(xt&&xt.scheme==="file")switch(Qt){case pe:mt.host=xt.host,mt.path=D(xt.path),mt.query=xt.query;break;case"?":mt.host=xt.host,mt.path=D(xt.path),mt.query="",Gt=hr;break;case"#":mt.host=xt.host,mt.path=D(xt.path),mt.query=xt.query,mt.fragment="",Gt=fn;break;default:mt.host=xt.host,Is(Et(D(Mn,Se),""))||(mt.path=D(xt.path),mt.shortenPath()),Gt=sr;continue}else{Gt=sr;continue}break;case Di:if(Qt==="/"||Qt==="\\"){Gt=Fi;break}xt&&xt.scheme==="file"&&(mt.host=xt.host,!Is(Et(D(Mn,Se),""))&&xa(xt.path[0],!0)&&kt(mt.path,xt.path[0])),Gt=sr;continue;case Fi:if(Qt===pe||Qt==="/"||Qt==="\\"||Qt==="?"||Qt==="#"){if(!Bt&&xa(de))Gt=sr;else if(de===""){if(mt.host="",Bt)return;Gt=ra}else{if(qn=mt.parseHost(de),qn)return qn;if(mt.host==="localhost"&&(mt.host=""),Bt)return;de="",Gt=ra}continue}else de+=Qt;break;case ra:if(mt.isSpecial()){if(Gt=sr,Qt!=="/"&&Qt!=="\\")continue}else if(!Bt&&Qt==="?")mt.query="",Gt=hr;else if(!Bt&&Qt==="#")mt.fragment="",Gt=fn;else if(Qt!==pe&&(Gt=sr,Qt!=="/"))continue;break;case sr:if(Qt===pe||Qt==="/"||Qt==="\\"&&mt.isSpecial()||!Bt&&(Qt==="?"||Qt==="#")){if(Rs(de)?(mt.shortenPath(),Qt!=="/"&&!(Qt==="\\"&&mt.isSpecial())&&kt(mt.path,"")):fl(de)?Qt!=="/"&&!(Qt==="\\"&&mt.isSpecial())&&kt(mt.path,""):(mt.scheme==="file"&&!mt.path.length&&xa(de)&&(mt.host!==null&&mt.host!==""&&(mt.host=""),de=yt(de,0)+":"),kt(mt.path,de)),de="",mt.scheme==="file"&&(Qt===pe||Qt==="?"||Qt==="#"))for(;mt.path.length>1&&mt.path[0]==="";)It(mt.path);Qt==="?"?(mt.query="",Gt=hr):Qt==="#"&&(mt.fragment="",Gt=fn)}else de+=Ar(Qt,_n);break;case Ds:Qt==="?"?(mt.query="",Gt=hr):Qt==="#"?(mt.fragment="",Gt=fn):Qt!==pe&&(Qt===" "?mt.path[0]+=Mn[Se+1]==="?"||Mn[Se+1]==="#"?"%20":" ":mt.path[0]+=Ar(Qt,Me));break;case hr:!Bt&&Qt==="#"?(mt.fragment="",Gt=fn):Qt!==pe&&(mt.query+=Ar(Qt,mt.isSpecial()?tn:Fe));break;case fn:Qt!==pe&&(mt.fragment+=Ar(Qt,Ve));break}Se++}},parseHost:function(dt){var Bt,xt,mt;if(yt(dt,0)==="["){if(yt(dt,dt.length-1)!=="]"||(Bt=Lt(_t(dt,1,-1)),!Bt))return le;this.host=Bt}else if(this.isSpecial()){if(dt=Tt(Q(dt)),dt===null||At(zt,dt))return le;if(wt(dt)){if(Bt=Ft(dt),Bt===null)return le;this.host=Bt}else this.host=dt}else{if(At(jt,dt))return le;for(Bt="",xt=L(dt),mt=0;mt<xt.length;mt++)Bt+=Ar(xt[mt],Me);this.host=Bt}},cannotHaveUsernamePasswordPort:function(){return this.host===null||this.host===""||this.cannotBeABaseURL||this.scheme==="file"},includesCredentials:function(){return this.username!==""||this.password!==""},isSpecial:function(){return O(Ga,this.scheme)},shortenPath:function(){var dt=this.path,Bt=dt.length;Bt&&(this.scheme!=="file"||Bt!==1||!xa(dt[0],!0))&&dt.length--},serialize:function(){var dt=this,Bt=dt.scheme,xt=dt.username,mt=dt.password,Gt=dt.host,Se=dt.port,de=dt.path,dn=dt.query,en=dt.fragment,Sn=Bt+":";return Gt!==null?(Sn+="//",dt.includesCredentials()&&(Sn+=xt+(mt?":"+mt:"")+"@"),Sn+=ye(Gt),Se!==null&&(Sn+=":"+Se)):Bt==="file"&&(Sn+="//"),Gt===null&&!dt.cannotBeABaseURL&&de.length>1&&de[0]===""&&(Sn+="/."),Sn+=dt.cannotBeABaseURL?de[0]:de.length?"/"+Et(de,"/"):"",dn!==null&&(Sn+="?"+dn),en!==null&&(Sn+="#"+en),Sn},setHref:function(dt){var Bt=this.parse(dt);if(Bt)throw new rt(Bt);this.searchParams.update()},getOrigin:function(){var dt=this.scheme,Bt=this.port;if(dt==="blob")try{return new aa(this.path[0]).origin}catch(xt){return"null"}return dt==="file"||!this.isSpecial()?"null":dt+"://"+ye(this.host)+(Bt!==null?":"+Bt:"")},getProtocol:function(){return this.scheme+":"},setProtocol:function(dt){this.parse(j(dt)+":",Ii)},getUsername:function(){return this.username},setUsername:function(dt){var Bt=L(j(dt));if(!this.cannotHaveUsernamePasswordPort()){this.username="";for(var xt=0;xt<Bt.length;xt++)this.username+=Ar(Bt[xt],Ci)}},getPassword:function(){return this.password},setPassword:function(dt){var Bt=L(j(dt));if(!this.cannotHaveUsernamePasswordPort()){this.password="";for(var xt=0;xt<Bt.length;xt++)this.password+=Ar(Bt[xt],Ci)}},getHost:function(){var dt=this.host,Bt=this.port;return dt===null?"":Bt===null?ye(dt):ye(dt)+":"+Bt},setHost:function(dt){this.cannotBeABaseURL||this.parse(dt,Oi)},getHostname:function(){var dt=this.host;return dt===null?"":ye(dt)},setHostname:function(dt){this.cannotBeABaseURL||this.parse(dt,Pi)},getPort:function(){var dt=this.port;return dt===null?"":j(dt)},setPort:function(dt){this.cannotHaveUsernamePasswordPort()||(dt=j(dt),dt===""?this.port=null:this.parse(dt,Mi))},getPathname:function(){var dt=this.path;return this.cannotBeABaseURL?dt[0]:dt.length?"/"+Et(dt,"/"):""},setPathname:function(dt){this.cannotBeABaseURL||(this.path=[],this.parse(dt,ra))},getSearch:function(){var dt=this.query;return dt?"?"+dt:""},setSearch:function(dt){dt=j(dt),dt===""?this.query=null:(yt(dt,0)==="?"&&(dt=_t(dt,1)),this.query="",this.parse(dt,hr)),this.searchParams.update()},getSearchParams:function(){return this.searchParams.facade},getHash:function(){var dt=this.fragment;return dt?"#"+dt:""},setHash:function(dt){if(dt=j(dt),dt===""){this.fragment=null;return}yt(dt,0)==="#"&&(dt=_t(dt,1)),this.fragment="",this.parse(dt,fn)},update:function(){this.query=this.searchParams.serialize()||null}};var aa=function(Bt){var xt=R(this,bn),mt=U(arguments.length,1)>1?arguments[1]:void 0,Gt=Y(xt,new Va(Bt,!1,mt));g||(xt.href=Gt.serialize(),xt.origin=Gt.getOrigin(),xt.protocol=Gt.getProtocol(),xt.username=Gt.getUsername(),xt.password=Gt.getPassword(),xt.host=Gt.getHost(),xt.hostname=Gt.getHostname(),xt.port=Gt.getPort(),xt.pathname=Gt.getPathname(),xt.search=Gt.getSearch(),xt.searchParams=Gt.getSearchParams(),xt.hash=Gt.getHash())},bn=aa.prototype,Yt=function(dt,Bt){return{get:function(){return K(this)[dt]()},set:Bt&&function(xt){return K(this)[Bt](xt)},configurable:!0,enumerable:!0}};if(g&&(I(bn,"href",Yt("serialize","setHref")),I(bn,"origin",Yt("getOrigin")),I(bn,"protocol",Yt("getProtocol","setProtocol")),I(bn,"username",Yt("getUsername","setUsername")),I(bn,"password",Yt("getPassword","setPassword")),I(bn,"host",Yt("getHost","setHost")),I(bn,"hostname",Yt("getHostname","setHostname")),I(bn,"port",Yt("getPort","setPort")),I(bn,"pathname",Yt("getPathname","setPathname")),I(bn,"search",Yt("getSearch","setSearch")),I(bn,"searchParams",Yt("getSearchParams")),I(bn,"hash",Yt("getHash","setHash"))),A(bn,"toJSON",function(){return K(this).serialize()},{enumerable:!0}),A(bn,"toString",function(){return K(this).serialize()},{enumerable:!0}),et){var qt=et.createObjectURL,Fs=et.revokeObjectURL;qt&&A(aa,"createObjectURL",y(qt,et)),Fs&&A(aa,"revokeObjectURL",y(Fs,et))}X(aa,"URL"),v({global:!0,constructor:!0,forced:!p,sham:!g},{URL:aa})}),(function(T,P,a){"use strict";var v=a(7),g=a(33),p=a(6),x=a(36),y=g("iterator");T.exports=!v(function(){var b=new URL("b?a=1&b=2&c=3","https://a"),A=b.searchParams,I=new URLSearchParams("a=1&a=2&b=3"),R="";return b.pathname="c%20d",A.forEach(function(O,M){A.delete("b"),R+=M+O}),I.delete("a",2),I.delete("b",void 0),x&&(!b.toJSON||!I.has("a",1)||I.has("a",2)||!I.has("a",void 0)||I.has("b"))||!A.size&&(x||!p)||!A.sort||b.href!=="https://a/c%20d?a=1&c=3"||A.get("c")!=="3"||String(new URLSearchParams("?a=1"))!=="a=1"||!A[y]||new URL("https://a@b").username!=="a"||new URLSearchParams(new URLSearchParams("a=b")).get("a")!=="b"||new URL("https://\u0442\u0435\u0441\u0442").host!=="xn--e1aybc"||new URL("https://a#\u0431").hash!=="#%D0%B1"||R!=="a1c3"||new URL("https://x",void 0).host!=="x"})}),(function(T,P,a){"use strict";var v=a(14),g=2147483647,p=36,x=1,y=26,b=38,A=700,I=72,R=128,O="-",M=/[^\0-\u007E]/,L=/[.\u3002\uFF0E\uFF61]/g,D="Overflow: input needs wider integers to process",N=p-x,F=RangeError,G=v(L.exec),j=Math.floor,X=String.fromCharCode,U=v("".charCodeAt),V=v([].join),k=v([].push),Y=v("".replace),K=v("".split),J=v("".toLowerCase),Z=function(rt){for(var nt=[],ut=0,ht=rt.length;ut<ht;){var pt=U(rt,ut++);if(pt>=55296&&pt<=56319&&ut<ht){var yt=U(rt,ut++);(yt&64512)===56320?k(nt,((pt&1023)<<10)+(yt&1023)+65536):(k(nt,pt),ut--)}else k(nt,pt)}return nt},Q=function(rt){return rt+22+75*(rt<26)},at=function(rt,nt,ut){var ht=0;for(rt=ut?j(rt/A):rt>>1,rt+=j(rt/nt);rt>N*y>>1;)rt=j(rt/N),ht+=p;return j(ht+(N+1)*rt/(rt+b))},et=function(rt){var nt=[];rt=Z(rt);var ut=rt.length,ht=R,pt=0,yt=I,At,Et;for(At=0;At<rt.length;At++)Et=rt[At],Et<128&&k(nt,X(Et));var Ht=nt.length,Ut=Ht;for(Ht&&k(nt,O);Ut<ut;){var kt=g;for(At=0;At<rt.length;At++)Et=rt[At],Et>=ht&&Et<kt&&(kt=Et);var Ct=Ut+1;if(kt-ht>j((g-pt)/Ct))throw new F(D);for(pt+=(kt-ht)*Ct,ht=kt,At=0;At<rt.length;At++){if(Et=rt[At],Et<ht&&++pt>g)throw new F(D);if(Et===ht){for(var It=pt,Dt=p;;){var Vt=Dt<=yt?x:Dt>=yt+y?y:Dt-yt;if(It<Vt)break;var _t=It-Vt,Nt=p-Vt;k(nt,X(Q(Vt+_t%Nt))),It=j(_t/Nt),Dt+=p}k(nt,X(Q(It))),yt=at(pt,Ct,Ut===Ht),pt=0,Ut++}}pt++,ht++}return V(nt,"")};T.exports=function(rt){var nt=[],ut=K(Y(J(rt),L,"."),"."),ht,pt;for(ht=0;ht<ut.length;ht++)pt=ut[ht],k(nt,G(M,pt)?"xn--"+et(pt):pt);return V(nt,".")}}),(function(T,P,a){"use strict";a(486);var v=a(23),g=a(14),p=String.fromCharCode,x=v("String","fromCodePoint"),y=encodeURIComponent,b=parseInt,A=g("".charAt),I=g([].push),R=g("".replace),O=g("".slice),M=g(/./.exec),L="\uFFFD",D=/^[0-9a-f]+$/i,N=/[\uD800-\uDBFF][\uDC00-\uDFFF]|[\uD800-\uDFFF]/g,F=function(k,Y){var K=O(k,Y,Y+2);return M(D,K)?b(K,16):NaN},G=function(k){for(var Y=0,K=128;K>0&&(k&K)!==0;K>>=1)Y++;return Y},j=function(k){var Y=null,K=k.length;switch(K){case 1:Y=k[0];break;case 2:Y=(k[0]&31)<<6|k[1]&63;break;case 3:Y=(k[0]&15)<<12|(k[1]&63)<<6|k[2]&63;break;case 4:Y=(k[0]&7)<<18|(k[1]&63)<<12|(k[2]&63)<<6|k[3]&63;break}return Y===null||Y>1114111||Y>=55296&&Y<=57343||Y<(K>3?65536:K>2?2048:K>1?128:0)?null:Y},X=function(k){return k.length===2?k:L},U=function(k){for(var Y=k.length,K="",J=0;J<Y;){var Z=A(k,J);if(Z==="%"){if(A(k,J+1)==="%"||J+3>Y){K+="%",J++;continue}var Q=F(k,J+1);if(Q!==Q){K+=Z,J++;continue}J+=2;var at=G(Q);if(at===0)Z=p(Q);else{if(at===1||at>4){K+=L,J++;continue}for(var et=[Q],rt=1;rt<at&&(J++,!(J+3>Y||A(k,J)!=="%"));){var nt=F(k,J+1);if(nt!==nt||nt>191||nt<128||rt===1&&(Q===224&&nt<160||Q===237&&nt>159||Q===240&&nt<144||Q===244&&nt>143))break;I(et,nt),J+=2,rt++}if(et.length!==at){K+=L;continue}var ut=j(et);if(ut===null){for(var ht=0;ht<at;ht++)K+=L;J++;continue}else Z=x(ut)}}K+=Z,J++}return K},V=function(k){try{return y(k)}catch(Y){return y(R(k,N,X))}};T.exports={decode:U,encode:V}}),(function(T,P,a){"use strict";a(176);var v=a(3),g=a(4),p=a(393),x=a(8),y=a(14),b=a(6),A=a(623),I=a(625),R=a(47),O=a(77),M=a(215),L=a(82),D=a(178),N=a(51),F=a(216),G=a(21),j=a(38),X=a(84),U=a(69),V=a(46),k=a(20),Y=a(68),K=a(71),J=a(11),Z=a(140),Q=a(141),at=a(180),et=a(390),rt=a(33),nt=a(196),ut=rt("iterator"),ht="URLSearchParams",pt=ht+"Iterator",yt=N.set,At=N.getterFor(ht),Et=N.getterFor(pt),Ht=I.decode,Ut=I.encode,kt=p("fetch"),Ct=p("Request"),It=p("Headers"),Dt=Ct&&Ct.prototype,Vt=It&&It.prototype,_t=g.TypeError,Nt=y("".charAt),Jt=y([].join),ne=y([].push),ve=y("".replace),le=y([].shift),fe=y([].splice),Ce=y("".split),Be=y("".slice),Ie=/\+/g,ce=function(vt){return Ht(ve(vt,Ie," "))},xe=/[!'()~]|%20/g,Ue={"!":"%21","'":"%27","(":"%28",")":"%29","~":"%7E","%20":"+"},Pt=function(vt){return Ue[vt]},zt=function(vt){return ve(Ut(vt),xe,Pt)},jt=D(function(Rt,Tt){yt(this,{type:pt,target:At(Rt).entries,index:0,kind:Tt})},ht,function(){var Rt=Et(this),Tt=Rt.target,wt=Rt.index++;if(!Tt||wt>=Tt.length)return Rt.target=null,at(void 0,!0);var Ft=Tt[wt];switch(Rt.kind){case"keys":return at(Ft.key,!1);case"values":return at(Ft.value,!1)}return at([Ft.key,Ft.value],!1)},!0),we=function(vt){this.entries=[],this.url=null,vt!==void 0&&(k(vt)?this.parseObject(vt):this.parseQuery(typeof vt=="string"?Nt(vt,0)==="?"?Be(vt,1):vt:Y(vt)))};we.prototype={type:ht,bindURL:function(vt){this.url=vt,this.update()},parseObject:function(vt){var Rt=this.entries,Tt=Q(vt),wt,Ft,Lt,ue,ye,Me,Fe;if(Tt)for(wt=Z(vt,Tt),Ft=wt.next;!(Lt=x(Ft,wt)).done;){if(ue=Z(V(Lt.value)),ye=ue.next,(Me=x(ye,ue)).done||(Fe=x(ye,ue)).done||!x(ye,ue).done)throw new _t("Expected sequence with length 2");ne(Rt,{key:Y(Me.value),value:Y(Fe.value)})}else for(var tn in vt)j(vt,tn)&&ne(Rt,{key:tn,value:Y(vt[tn])})},parseQuery:function(vt){if(vt)for(var Rt=this.entries,Tt=Ce(vt,"&"),wt=0,Ft,Lt;wt<Tt.length;)Ft=Tt[wt++],Ft.length&&(Lt=Ce(Ft,"="),ne(Rt,{key:ce(le(Lt)),value:ce(Jt(Lt,"="))}))},serialize:function(){for(var vt=this.entries,Rt=[],Tt=0,wt;Tt<vt.length;)wt=vt[Tt++],ne(Rt,zt(wt.key)+"="+zt(wt.value));return Jt(Rt,"&")},update:function(){this.entries.length=0,this.parseQuery(this.url.query)},updateURL:function(){this.url&&this.url.update()}};var $t=function(){F(this,Xt);var Rt=arguments.length>0?arguments[0]:void 0,Tt=yt(this,new we(Rt));b||(this.size=Tt.entries.length)},Xt=$t.prototype;if(M(Xt,{append:function(Rt,Tt){var wt=At(this);et(arguments.length,2),ne(wt.entries,{key:Y(Rt),value:Y(Tt)}),b||this.size++,wt.updateURL()},delete:function(vt){for(var Rt=At(this),Tt=et(arguments.length,1),wt=Rt.entries,Ft=Y(vt),Lt=Tt<2?void 0:arguments[1],ue=Lt===void 0?Lt:Y(Lt),ye=0;ye<wt.length;){var Me=wt[ye];Me.key===Ft&&(ue===void 0||Me.value===ue)?fe(wt,ye,1):ye++}b||(this.size=wt.length),Rt.updateURL()},get:function(Rt){var Tt=At(this).entries;et(arguments.length,1);for(var wt=Y(Rt),Ft=0;Ft<Tt.length;Ft++)if(Tt[Ft].key===wt)return Tt[Ft].value;return null},getAll:function(Rt){var Tt=At(this).entries;et(arguments.length,1);for(var wt=Y(Rt),Ft=[],Lt=0;Lt<Tt.length;Lt++)Tt[Lt].key===wt&&ne(Ft,Tt[Lt].value);return Ft},has:function(Rt){for(var Tt=At(this).entries,wt=et(arguments.length,1),Ft=Y(Rt),Lt=wt<2?void 0:arguments[1],ue=Lt===void 0?Lt:Y(Lt),ye=0;ye<Tt.length;){var Me=Tt[ye++];if(Me.key===Ft&&(ue===void 0||Me.value===ue))return!0}return!1},set:function(Rt,Tt){var wt=At(this);et(arguments.length,2);for(var Ft=wt.entries,Lt=!1,ue=Y(Rt),ye=Y(Tt),Me=0,Fe;Me<Ft.length;Me++)Fe=Ft[Me],Fe.key===ue&&(Lt?fe(Ft,Me--,1):(Lt=!0,Fe.value=ye));Lt||ne(Ft,{key:ue,value:ye}),b||(this.size=Ft.length),wt.updateURL()},sort:function(){var Rt=At(this);nt(Rt.entries,function(Tt,wt){return Tt.key>wt.key?1:-1}),Rt.updateURL()},forEach:function(Rt){for(var Tt=At(this).entries,wt=X(Rt,arguments.length>1?arguments[1]:void 0),Ft=0,Lt;Ft<Tt.length;)Lt=Tt[Ft++],wt(Lt.value,Lt.key,this)},keys:function(){return new jt(this,"keys")},values:function(){return new jt(this,"values")},entries:function(){return new jt(this,"entries")}},{enumerable:!0}),R(Xt,ut,Xt.entries,{name:"entries"}),R(Xt,"toString",function(){return At(this).serialize()},{enumerable:!0}),b&&O(Xt,"size",{get:function(){return At(this).entries.length},configurable:!0,enumerable:!0}),L($t,ht),v({global:!0,constructor:!0,forced:!A},{URLSearchParams:$t}),!A&&G(It)){var re=y(Vt.has),oe=y(Vt.set),pe=function(vt){if(k(vt)){var Rt=vt.body,Tt;if(U(Rt)===ht)return Tt=vt.headers?new It(vt.headers):new It,re(Tt,"content-type")||oe(Tt,"content-type","application/x-www-form-urlencoded;charset=UTF-8"),K(vt,{body:J(0,Y(Rt)),headers:J(0,Tt)})}return vt};if(G(kt)&&v({global:!0,enumerable:!0,dontCallGetSet:!0,forced:!0},{fetch:function(Rt){return kt(Rt,arguments.length>1?pe(arguments[1]):{})}}),G(Ct)){var rn=function(Rt){return F(this,Dt),new Ct(Rt,arguments.length>1?pe(arguments[1]):{})};Dt.constructor=rn,rn.prototype=Dt,v({global:!0,constructor:!0,dontCallGetSet:!0,forced:!0},{Request:rn})}}T.exports={URLSearchParams:$t,getState:At}}),(function(T,P,a){"use strict";var v=a(3),g=a(23),p=a(7),x=a(390),y=a(68),b=a(623),A=g("URL"),I=b&&p(function(){A.canParse()}),R=p(function(){return A.canParse.length!==1});v({target:"URL",stat:!0,forced:!I||R},{canParse:function(M){var L=x(arguments.length,1),D=y(M),N=L<2||arguments[1]===void 0?void 0:y(arguments[1]);try{return!!new A(D,N)}catch(F){return!1}}})}),(function(T,P,a){"use strict";var v=a(3),g=a(23),p=a(390),x=a(68),y=a(623),b=g("URL");v({target:"URL",stat:!0,forced:!y},{parse:function(I){var R=p(arguments.length,1),O=x(I),M=R<2||arguments[1]===void 0?void 0:x(arguments[1]);try{return new b(O,M)}catch(L){return null}}})}),(function(T,P,a){"use strict";var v=a(3),g=a(8),p=a(206),x=p("URL","toString");v({target:"URL",proto:!0,enumerable:!0},{toJSON:function(){return g(x,this)}})}),(function(T,P,a){"use strict";a(626)}),(function(T,P,a){"use strict";var v=a(47),g=a(14),p=a(68),x=a(390),y=URLSearchParams,b=y.prototype,A=g(b.append),I=g(b.delete),R=g(b.forEach),O=g([].push),M=new y("a=1&a=2&b=3");M.delete("a",1),M.delete("b",void 0),M+""!="a=2"&&v(b,"delete",function(L){var D=arguments.length,N=D<2?void 0:arguments[1];if(D&&N===void 0)return I(this,L);var F=[];R(this,function(k,Y){O(F,{key:Y,value:k})}),x(D,1);for(var G=p(L),j=p(N),X=0,U=F.length,V;X<U;)V=F[X],I(this,V.key),X++;for(X=0;X<U;)V=F[X++],V.key===G&&V.value===j||A(this,V.key,V.value)},{enumerable:!0,unsafe:!0})}),(function(T,P,a){"use strict";var v=a(47),g=a(14),p=a(68),x=a(390),y=URLSearchParams,b=y.prototype,A=g(b.getAll),I=g(b.has),R=new y("a=1");(R.has("a",2)||!R.has("a",void 0))&&v(b,"has",function(M){var L=arguments.length,D=L<2?void 0:arguments[1];if(L&&D===void 0)return I(this,M);var N=A(this,M);x(L,1);for(var F=p(D),G=0;G<N.length;)if(N[G++]===F)return!0;return!1},{enumerable:!0,unsafe:!0})}),(function(T,P,a){"use strict";var v=a(6),g=a(14),p=a(77),x=URLSearchParams.prototype,y=g(x.forEach);v&&!("size"in x)&&p(x,"size",{get:function(){var A=0;return y(this,function(){A++}),A},configurable:!0,enumerable:!0})}),(function(T,P,a){"use strict";a.r(P),a.d(P,{bb:function(){return nm},default:function(){return nm}});var v={};a.r(v),a.d(v,{selection:function(){return Fg},subchart:function(){return zg},zoom:function(){return jg}});var g={};a.r(g),a.d(g,{area:function(){return fp},areaLineRange:function(){return dp},areaSpline:function(){return vp},areaSplineRange:function(){return gp},areaStep:function(){return pp},areaStepRange:function(){return hp},bar:function(){return mp},bubble:function(){return xp},candlestick:function(){return Ap},donut:function(){return Lp},funnel:function(){return Bp},gauge:function(){return zp},line:function(){return Up},pie:function(){return Xp},polar:function(){return Vp},radar:function(){return Hp},scatter:function(){return Yp},spline:function(){return kp},step:function(){return Gp},treemap:function(){return em}});function p(){}function x(t){return t==null?p:function(){return this.querySelector(t)}}function y(t){typeof t!="function"&&(t=x(t));for(var e=this._groups,n=e.length,r=new Array(n),i=0;i<n;++i)for(var s=e[i],o=s.length,l=r[i]=new Array(o),c,u,f=0;f<o;++f)(c=s[f])&&(u=t.call(c,c.__data__,f,s))&&("__data__"in c&&(u.__data__=c.__data__),l[f]=u);return new fn(r,this._parents)}function b(t){return t==null?[]:Array.isArray(t)?t:Array.from(t)}function A(){return[]}function I(t){return t==null?A:function(){return this.querySelectorAll(t)}}function R(t){return function(){return b(t.apply(this,arguments))}}function O(t){typeof t=="function"?t=R(t):t=I(t);for(var e=this._groups,n=e.length,r=[],i=[],s=0;s<n;++s)for(var o=e[s],l=o.length,c,u=0;u<l;++u)(c=o[u])&&(r.push(t.call(c,c.__data__,u,o)),i.push(c));return new fn(r,i)}function M(t){return function(){return this.matches(t)}}function L(t){return function(e){return e.matches(t)}}var D=Array.prototype.find;function N(t){return function(){return D.call(this.children,t)}}function F(){return this.firstElementChild}function G(t){return this.select(t==null?F:N(typeof t=="function"?t:L(t)))}var j=Array.prototype.filter;function X(){return Array.from(this.children)}function U(t){return function(){return j.call(this.children,t)}}function V(t){return this.selectAll(t==null?X:U(typeof t=="function"?t:L(t)))}function k(t){typeof t!="function"&&(t=M(t));for(var e=this._groups,n=e.length,r=new Array(n),i=0;i<n;++i)for(var s=e[i],o=s.length,l=r[i]=[],c,u=0;u<o;++u)(c=s[u])&&t.call(c,c.__data__,u,s)&&l.push(c);return new fn(r,this._parents)}function Y(t){return new Array(t.length)}function K(){return new fn(this._enter||this._groups.map(Y),this._parents)}function J(t,e){this.ownerDocument=t.ownerDocument,this.namespaceURI=t.namespaceURI,this._next=null,this._parent=t,this.__data__=e}J.prototype={constructor:J,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 Z(t){return function(){return t}}function Q(t,e,n,r,i,s){for(var o=0,l,c=e.length,u=s.length;o<u;++o)(l=e[o])?(l.__data__=s[o],r[o]=l):n[o]=new J(t,s[o]);for(;o<c;++o)(l=e[o])&&(i[o]=l)}function at(t,e,n,r,i,s,o){var l,c,u=new Map,f=e.length,d=s.length,h=new Array(f),m;for(l=0;l<f;++l)(c=e[l])&&(h[l]=m=o.call(c,c.__data__,l,e)+"",u.has(m)?i[l]=c:u.set(m,c));for(l=0;l<d;++l)m=o.call(t,s[l],l,s)+"",(c=u.get(m))?(r[l]=c,c.__data__=s[l],u.delete(m)):n[l]=new J(t,s[l]);for(l=0;l<f;++l)(c=e[l])&&u.get(h[l])===c&&(i[l]=c)}function et(t){return t.__data__}function rt(t,e){if(!arguments.length)return Array.from(this,et);var n=e?at:Q,r=this._parents,i=this._groups;typeof t!="function"&&(t=Z(t));for(var s=i.length,o=new Array(s),l=new Array(s),c=new Array(s),u=0;u<s;++u){var f=r[u],d=i[u],h=d.length,m=nt(t.call(f,f&&f.__data__,u,r)),S=m.length,E=l[u]=new Array(S),C=o[u]=new Array(S),w=c[u]=new Array(h);n(f,d,E,C,w,m,e);for(var $=0,z=0,B,W;$<S;++$)if(B=E[$]){for($>=z&&(z=$+1);!(W=C[z])&&++z<S;);B._next=W||null}}return o=new fn(o,r),o._enter=l,o._exit=c,o}function nt(t){return typeof t=="object"&&"length"in t?t:Array.from(t)}function ut(){return new fn(this._exit||this._groups.map(Y),this._parents)}function ht(t,e,n){var r=this.enter(),i=this,s=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?s.remove():n(s),r&&i?r.merge(i).order():i}function pt(t){for(var e=t.selection?t.selection():t,n=this._groups,r=e._groups,i=n.length,s=r.length,o=Math.min(i,s),l=new Array(i),c=0;c<o;++c)for(var u=n[c],f=r[c],d=u.length,h=l[c]=new Array(d),m,S=0;S<d;++S)(m=u[S]||f[S])&&(h[S]=m);for(;c<i;++c)l[c]=n[c];return new fn(l,this._parents)}function yt(){for(var t=this._groups,e=-1,n=t.length;++e<n;)for(var r=t[e],i=r.length-1,s=r[i],o;--i>=0;)(o=r[i])&&(s&&o.compareDocumentPosition(s)^4&&s.parentNode.insertBefore(o,s),s=o);return this}function At(t){t||(t=Et);function e(d,h){return d&&h?t(d.__data__,h.__data__):!d-!h}for(var n=this._groups,r=n.length,i=new Array(r),s=0;s<r;++s){for(var o=n[s],l=o.length,c=i[s]=new Array(l),u,f=0;f<l;++f)(u=o[f])&&(c[f]=u);c.sort(e)}return new fn(i,this._parents).order()}function Et(t,e){return t<e?-1:t>e?1:t>=e?0:NaN}function Ht(){var t=arguments[0];return arguments[0]=this,t.apply(null,arguments),this}function Ut(){return Array.from(this)}function kt(){for(var t=this._groups,e=0,n=t.length;e<n;++e)for(var r=t[e],i=0,s=r.length;i<s;++i){var o=r[i];if(o)return o}return null}function Ct(){let t=0;for(const e of this)++t;return t}function It(){return!this.node()}function Dt(t){for(var e=this._groups,n=0,r=e.length;n<r;++n)for(var i=e[n],s=0,o=i.length,l;s<o;++s)(l=i[s])&&t.call(l,l.__data__,s,i);return this}var Vt="http://www.w3.org/1999/xhtml",_t={svg:"http://www.w3.org/2000/svg",xhtml:Vt,xlink:"http://www.w3.org/1999/xlink",xml:"http://www.w3.org/XML/1998/namespace",xmlns:"http://www.w3.org/2000/xmlns/"};function Nt(t){var e=t+="",n=e.indexOf(":");return n>=0&&(e=t.slice(0,n))!=="xmlns"&&(t=t.slice(n+1)),_t.hasOwnProperty(e)?{space:_t[e],local:t}:t}function Jt(t){return function(){this.removeAttribute(t)}}function ne(t){return function(){this.removeAttributeNS(t.space,t.local)}}function ve(t,e){return function(){this.setAttribute(t,e)}}function le(t,e){return function(){this.setAttributeNS(t.space,t.local,e)}}function fe(t,e){return function(){var n=e.apply(this,arguments);n==null?this.removeAttribute(t):this.setAttribute(t,n)}}function Ce(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 Be(t,e){var n=Nt(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?ne:Jt:typeof e=="function"?n.local?Ce:fe:n.local?le:ve)(n,e))}function Ie(t){return t.ownerDocument&&t.ownerDocument.defaultView||t.document&&t||t.defaultView}function ce(t){return function(){this.style.removeProperty(t)}}function xe(t,e,n){return function(){this.style.setProperty(t,e,n)}}function Ue(t,e,n){return function(){var r=e.apply(this,arguments);r==null?this.style.removeProperty(t):this.style.setProperty(t,r,n)}}function Pt(t,e,n){return arguments.length>1?this.each((e==null?ce:typeof e=="function"?Ue:xe)(t,e,n==null?"":n)):zt(this.node(),t)}function zt(t,e){return t.style.getPropertyValue(e)||Ie(t).getComputedStyle(t,null).getPropertyValue(e)}function jt(t){return function(){delete this[t]}}function we(t,e){return function(){this[t]=e}}function $t(t,e){return function(){var n=e.apply(this,arguments);n==null?delete this[t]:this[t]=n}}function Xt(t,e){return arguments.length>1?this.each((e==null?jt:typeof e=="function"?$t:we)(t,e)):this.node()[t]}function re(t){return t.trim().split(/^|\s+/)}function oe(t){return t.classList||new pe(t)}function pe(t){this._node=t,this._names=re(t.getAttribute("class")||"")}pe.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 rn(t,e){for(var n=oe(t),r=-1,i=e.length;++r<i;)n.add(e[r])}function vt(t,e){for(var n=oe(t),r=-1,i=e.length;++r<i;)n.remove(e[r])}function Rt(t){return function(){rn(this,t)}}function Tt(t){return function(){vt(this,t)}}function wt(t,e){return function(){(e.apply(this,arguments)?rn:vt)(this,t)}}function Ft(t,e){var n=re(t+"");if(arguments.length<2){for(var r=oe(this.node()),i=-1,s=n.length;++i<s;)if(!r.contains(n[i]))return!1;return!0}return this.each((typeof e=="function"?wt:e?Rt:Tt)(n,e))}function Lt(){this.textContent=""}function ue(t){return function(){this.textContent=t}}function ye(t){return function(){var e=t.apply(this,arguments);this.textContent=e==null?"":e}}function Me(t){return arguments.length?this.each(t==null?Lt:(typeof t=="function"?ye:ue)(t)):this.node().textContent}function Fe(){this.innerHTML=""}function tn(t){return function(){this.innerHTML=t}}function Ve(t){return function(){var e=t.apply(this,arguments);this.innerHTML=e==null?"":e}}function _n(t){return arguments.length?this.each(t==null?Fe:(typeof t=="function"?Ve:tn)(t)):this.node().innerHTML}function Ci(){this.nextSibling&&this.parentNode.appendChild(this)}function Ar(){return this.each(Ci)}function Ga(){this.previousSibling&&this.parentNode.insertBefore(this,this.parentNode.firstChild)}function xa(){return this.each(Ga)}function Is(t){return function(){var e=this.ownerDocument,n=this.namespaceURI;return n===Vt&&e.documentElement.namespaceURI===Vt?e.createElement(t):e.createElementNS(n,t)}}function fl(t){return function(){return this.ownerDocument.createElementNS(t.space,t.local)}}function Rs(t){var e=Nt(t);return(e.local?fl:Is)(e)}function Ii(t){var e=typeof t=="function"?t:Rs(t);return this.select(function(){return this.appendChild(e.apply(this,arguments))})}function ws(){return null}function Ri(t,e){var n=typeof t=="function"?t:Rs(t),r=e==null?ws:typeof e=="function"?e:x(e);return this.select(function(){return this.insertBefore(n.apply(this,arguments),r.apply(this,arguments)||null)})}function Os(){var t=this.parentNode;t&&t.removeChild(this)}function Ps(){return this.each(Os)}function wi(){var t=this.cloneNode(!1),e=this.parentNode;return e?e.insertBefore(t,this.nextSibling):t}function Ms(){var t=this.cloneNode(!0),e=this.parentNode;return e?e.insertBefore(t,this.nextSibling):t}function Ls(t){return this.select(t?Ms:wi)}function Xa(t){return arguments.length?this.property("__data__",t):this.node().__data__}function Wa(t){return function(e){t.call(this,e,this.__data__)}}function Oi(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 Pi(t){return function(){var e=this.__on;if(e){for(var n=0,r=-1,i=e.length,s;n<i;++n)s=e[n],(!t.type||s.type===t.type)&&s.name===t.name?this.removeEventListener(s.type,s.listener,s.options):e[++r]=s;++r?e.length=r:delete this.__on}}}function Mi(t,e,n){return function(){var r=this.__on,i,s=Wa(e);if(r){for(var o=0,l=r.length;o<l;++o)if((i=r[o]).type===t.type&&i.name===t.name){this.removeEventListener(i.type,i.listener,i.options),this.addEventListener(i.type,i.listener=s,i.options=n),i.value=e;return}}this.addEventListener(t.type,s,n),i={type:t.type,name:t.name,value:e,listener:s,options:n},r?r.push(i):this.__on=[i]}}function Li(t,e,n){var r=Oi(t+""),i,s=r.length,o;if(arguments.length<2){var l=this.node().__on;if(l){for(var c=0,u=l.length,f;c<u;++c)for(i=0,f=l[c];i<s;++i)if((o=r[i]).type===f.type&&o.name===f.name)return f.value}return}for(l=e?Mi:Pi,i=0;i<s;++i)this.each(l(r[i],e,n));return this}function Di(t,e,n){var r=Ie(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 Fi(t,e){return function(){return Di(this,t,e)}}function ra(t,e){return function(){return Di(this,t,e.apply(this,arguments))}}function sr(t,e){return this.each((typeof e=="function"?ra:Fi)(t,e))}function*Ds(){for(var t=this._groups,e=0,n=t.length;e<n;++e)for(var r=t[e],i=0,s=r.length,o;i<s;++i)(o=r[i])&&(yield o)}var hr=[null];function fn(t,e){this._groups=t,this._parents=e}function Va(){return new fn([[document.documentElement]],hr)}function aa(){return this}fn.prototype=Va.prototype={constructor:fn,select:y,selectAll:O,selectChild:G,selectChildren:V,filter:k,data:rt,enter:K,exit:ut,join:ht,merge:pt,selection:aa,order:yt,sort:At,call:Ht,nodes:Ut,node:kt,size:Ct,empty:It,each:Dt,attr:Be,style:Pt,property:Xt,classed:Ft,text:Me,html:_n,raise:Ar,lower:xa,append:Ii,insert:Ri,remove:Ps,clone:Ls,datum:Xa,on:Li,dispatch:sr,[Symbol.iterator]:Ds};var bn=Va;function Yt(t){return typeof t=="string"?new fn([[document.querySelector(t)]],[document.documentElement]):new fn([[t]],hr)}const qt={AREA:"area",AREA_LINE_RANGE:"area-line-range",AREA_SPLINE:"area-spline",AREA_SPLINE_RANGE:"area-spline-range",AREA_STEP:"area-step",AREA_STEP_RANGE:"area-step-range",BAR:"bar",BUBBLE:"bubble",CANDLESTICK:"candlestick",DONUT:"donut",FUNNEL:"funnel",GAUGE:"gauge",LINE:"line",PIE:"pie",POLAR:"polar",RADAR:"radar",SCATTER:"scatter",SPLINE:"spline",STEP:"step",TREEMAP:"treemap"},Fs={export:"exportApi",flow:"flow",xgrids:"grid",ygrids:"grid",regions:"regions",category:"category",categories:"category"},dt=16,Bt=10,xt=6,mt=3,Gt=xt+mt,Se=1,de={x:{start:"M0 -8.5 A6 6 0 0 0 -6.5 -3.5 V2.5 A6 6 0 0 0 0 8.5 Z M-2 -3.5 V3.5 M-4 -3.5 V3.5z",end:"M0 -8.5 A6 6 0 0 1 6.5 -3.5 V2.5 A6 6 0 0 1 0 8.5 Z M2 -3.5 V3.5 M4 -3.5 V3.5z"},y:{start:"M8.5 0 a6 6 0 0 0 -6 -6.5 H-2.5 a 6 6 0 0 0 -6 6.5 z m-5 -2 H-3.5 m7 -2 H-3.5z",end:"M8.5 0 a6 -6 0 0 1 -6 6.5 H-2.5 a 6 -6 0 0 1 -6 -6.5z m-5 2 H-3.5 m7 2 H-3.5z"}},dn={AREA:"initArea",AREA_LINE_RANGE:"initArea",AREA_SPLINE:"initArea",AREA_SPLINE_RANGE:"initArea",AREA_STEP:"initArea",AREA_STEP_RANGE:"initArea",BAR:"initBar",BUBBLE:"initCircle",CANDLESTICK:"initCandlestick",DONUT:"initArc",FUNNEL:"initFunnel",GAUGE:"initArc",LINE:"initLine",PIE:"initArc",POLAR:"initPolar",RADAR:"initCircle",SCATTER:"initCircle",SPLINE:"initLine",STEP:"initLine",TREEMAP:"initTreemap"},en={Area:[qt.AREA,qt.AREA_SPLINE,qt.AREA_SPLINE_RANGE,qt.AREA_LINE_RANGE,qt.AREA_STEP,qt.AREA_STEP_RANGE],AreaRange:[qt.AREA_SPLINE_RANGE,qt.AREA_LINE_RANGE,qt.AREA_STEP_RANGE],Arc:[qt.PIE,qt.DONUT,qt.GAUGE,qt.POLAR,qt.RADAR],Line:[qt.LINE,qt.SPLINE,qt.AREA,qt.AREA_SPLINE,qt.AREA_SPLINE_RANGE,qt.AREA_LINE_RANGE,qt.STEP,qt.AREA_STEP,qt.AREA_STEP_RANGE],Step:[qt.STEP,qt.AREA_STEP,qt.AREA_STEP_RANGE],Spline:[qt.SPLINE,qt.AREA_SPLINE,qt.AREA_SPLINE_RANGE]},Sn=Math.sqrt(50),Mn=Math.sqrt(10),Qt=Math.sqrt(2);function hn(t,e,n){const r=(e-t)/Math.max(0,n),i=Math.floor(Math.log10(r)),s=r/Math.pow(10,i),o=s>=Sn?10:s>=Mn?5:s>=Qt?2:1;let l,c,u;return i<0?(u=Math.pow(10,-i)/o,l=Math.round(t*u),c=Math.round(e*u),l/u<t&&++l,c/u>e&&--c,u=-u):(u=Math.pow(10,i)*o,l=Math.round(t/u),c=Math.round(e/u),l*u<t&&++l,c*u>e&&--c),c<l&&.5<=n&&n<2?hn(t,e,n*2):[l,c,u]}function qn(t,e,n){if(e=+e,t=+t,n=+n,!(n>0))return[];if(t===e)return[t];const r=e<t,[i,s,o]=r?hn(e,t,n):hn(t,e,n);if(!(s>=i))return[];const l=s-i+1,c=new Array(l);if(r)if(o<0)for(let u=0;u<l;++u)c[u]=(s-u)/-o;else for(let u=0;u<l;++u)c[u]=(s-u)*o;else if(o<0)for(let u=0;u<l;++u)c[u]=(i+u)/-o;else for(let u=0;u<l;++u)c[u]=(i+u)*o;return c}function ya(t,e,n){return e=+e,t=+t,n=+n,hn(t,e,n)[2]}function ja(t,e,n){e=+e,t=+t,n=+n;const r=e<t,i=r?ya(e,t,n):ya(t,e,n);return(r?-1:1)*(i<0?1/-i:i)}function Ta(t,e){return t==null||e==null?NaN:t<e?-1:t>e?1:t>=e?0:NaN}function Ni(t,e){return t==null||e==null?NaN:e<t?-1:e>t?1:e>=t?0:NaN}function dl(t){let e,n,r;t.length!==2?(e=Ta,n=(l,c)=>Ta(t(l),c),r=(l,c)=>t(l)-c):(e=t===Ta||t===Ni?t:am,n=t,r=t);function i(l,c,u=0,f=l.length){if(u<f){if(e(c,c)!==0)return f;do{const d=u+f>>>1;n(l[d],c)<0?u=d+1:f=d}while(u<f)}return u}function s(l,c,u=0,f=l.length){if(u<f){if(e(c,c)!==0)return f;do{const d=u+f>>>1;n(l[d],c)<=0?u=d+1:f=d}while(u<f)}return u}function o(l,c,u=0,f=l.length){const d=i(l,c,u,f-1);return d>u&&r(l[d-1],c)>-r(l[d],c)?d-1:d}return{left:i,center:o,right:s}}function am(){return 0}function im(t){return t===null?NaN:+t}function*GR(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 Fu=dl(Ta),sm=Fu.right,XR=Fu.left,WR=dl(im).center;var om=sm;function hl(t,e,n){t.prototype=e.prototype=n,n.constructor=t}function Nu(t,e){var n=Object.create(t.prototype);for(var r in e)n[r]=e[r];return n}function $i(){}var Bi=.7,Ns=1/Bi,Ha="\\s*([+-]?\\d+)\\s*",zi="\\s*([+-]?(?:\\d*\\.)?\\d+(?:[eE][+-]?\\d+)?)\\s*",Er="\\s*([+-]?(?:\\d*\\.)?\\d+(?:[eE][+-]?\\d+)?)%\\s*",lm=/^#([0-9a-f]{3,8})$/,cm=new RegExp(`^rgb\\(${Ha},${Ha},${Ha}\\)$`),um=new RegExp(`^rgb\\(${Er},${Er},${Er}\\)$`),fm=new RegExp(`^rgba\\(${Ha},${Ha},${Ha},${zi}\\)$`),dm=new RegExp(`^rgba\\(${Er},${Er},${Er},${zi}\\)$`),hm=new RegExp(`^hsl\\(${zi},${Er},${Er}\\)$`),vm=new RegExp(`^hsla\\(${zi},${Er},${Er},${zi}\\)$`),$u={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};hl($i,ba,{copy(t){return Object.assign(new this.constructor,this,t)},displayable(){return this.rgb().displayable()},hex:Bu,formatHex:Bu,formatHex8:gm,formatHsl:pm,formatRgb:zu,toString:zu});function Bu(){return this.rgb().formatHex()}function gm(){return this.rgb().formatHex8()}function pm(){return Wu(this).formatHsl()}function zu(){return this.rgb().formatRgb()}function ba(t){var e,n;return t=(t+"").trim().toLowerCase(),(e=lm.exec(t))?(n=e[1].length,e=parseInt(e[1],16),n===6?Uu(e):n===3?new Yn(e>>8&15|e>>4&240,e>>4&15|e&240,(e&15)<<4|e&15,1):n===8?$s(e>>24&255,e>>16&255,e>>8&255,(e&255)/255):n===4?$s(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=cm.exec(t))?new Yn(e[1],e[2],e[3],1):(e=um.exec(t))?new Yn(e[1]*255/100,e[2]*255/100,e[3]*255/100,1):(e=fm.exec(t))?$s(e[1],e[2],e[3],e[4]):(e=dm.exec(t))?$s(e[1]*255/100,e[2]*255/100,e[3]*255/100,e[4]):(e=hm.exec(t))?Xu(e[1],e[2]/100,e[3]/100,1):(e=vm.exec(t))?Xu(e[1],e[2]/100,e[3]/100,e[4]):$u.hasOwnProperty(t)?Uu($u[t]):t==="transparent"?new Yn(NaN,NaN,NaN,0):null}function Uu(t){return new Yn(t>>16&255,t>>8&255,t&255,1)}function $s(t,e,n,r){return r<=0&&(t=e=n=NaN),new Yn(t,e,n,r)}function mm(t){return t instanceof $i||(t=ba(t)),t?(t=t.rgb(),new Yn(t.r,t.g,t.b,t.opacity)):new Yn}function Bs(t,e,n,r){return arguments.length===1?mm(t):new Yn(t,e,n,r==null?1:r)}function Yn(t,e,n,r){this.r=+t,this.g=+e,this.b=+n,this.opacity=+r}hl(Yn,Bs,Nu($i,{brighter(t){return t=t==null?Ns:Math.pow(Ns,t),new Yn(this.r*t,this.g*t,this.b*t,this.opacity)},darker(t){return t=t==null?Bi:Math.pow(Bi,t),new Yn(this.r*t,this.g*t,this.b*t,this.opacity)},rgb(){return this},clamp(){return new Yn(Sa(this.r),Sa(this.g),Sa(this.b),zs(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:ku,formatHex:ku,formatHex8:xm,formatRgb:Gu,toString:Gu}));function ku(){return`#${Aa(this.r)}${Aa(this.g)}${Aa(this.b)}`}function xm(){return`#${Aa(this.r)}${Aa(this.g)}${Aa(this.b)}${Aa((isNaN(this.opacity)?1:this.opacity)*255)}`}function Gu(){const t=zs(this.opacity);return`${t===1?"rgb(":"rgba("}${Sa(this.r)}, ${Sa(this.g)}, ${Sa(this.b)}${t===1?")":`, ${t})`}`}function zs(t){return isNaN(t)?1:Math.max(0,Math.min(1,t))}function Sa(t){return Math.max(0,Math.min(255,Math.round(t)||0))}function Aa(t){return t=Sa(t),(t<16?"0":"")+t.toString(16)}function Xu(t,e,n,r){return r<=0?t=e=n=NaN:n<=0||n>=1?t=e=NaN:e<=0&&(t=NaN),new vr(t,e,n,r)}function Wu(t){if(t instanceof vr)return new vr(t.h,t.s,t.l,t.opacity);if(t instanceof $i||(t=ba(t)),!t)return new vr;if(t instanceof vr)return t;t=t.rgb();var e=t.r/255,n=t.g/255,r=t.b/255,i=Math.min(e,n,r),s=Math.max(e,n,r),o=NaN,l=s-i,c=(s+i)/2;return l?(e===s?o=(n-r)/l+(n<r)*6:n===s?o=(r-e)/l+2:o=(e-n)/l+4,l/=c<.5?s+i:2-s-i,o*=60):l=c>0&&c<1?0:o,new vr(o,l,c,t.opacity)}function ym(t,e,n,r){return arguments.length===1?Wu(t):new vr(t,e,n,r==null?1:r)}function vr(t,e,n,r){this.h=+t,this.s=+e,this.l=+n,this.opacity=+r}hl(vr,ym,Nu($i,{brighter(t){return t=t==null?Ns:Math.pow(Ns,t),new vr(this.h,this.s,this.l*t,this.opacity)},darker(t){return t=t==null?Bi:Math.pow(Bi,t),new vr(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 Yn(vl(t>=240?t-240:t+120,i,r),vl(t,i,r),vl(t<120?t+240:t-120,i,r),this.opacity)},clamp(){return new vr(Vu(this.h),Us(this.s),Us(this.l),zs(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=zs(this.opacity);return`${t===1?"hsl(":"hsla("}${Vu(this.h)}, ${Us(this.s)*100}%, ${Us(this.l)*100}%${t===1?")":`, ${t})`}`}}));function Vu(t){return t=(t||0)%360,t<0?t+360:t}function Us(t){return Math.max(0,Math.min(1,t||0))}function vl(t,e,n){return(t<60?e+(n-e)*t/60:t<180?n:t<240?e+(n-e)*(240-t)/60:e)*255}function ju(t,e,n,r,i){var s=t*t,o=s*t;return((1-3*t+3*s-o)*e+(4-6*s+3*o)*n+(1+3*t+3*s-3*o)*r+o*i)/6}function Tm(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],s=t[r+1],o=r>0?t[r-1]:2*i-s,l=r<e-1?t[r+2]:2*s-i;return ju((n-r/e)*e,o,i,s,l)}}function bm(t){var e=t.length;return function(n){var r=Math.floor(((n%=1)<0?++n:n)*e),i=t[(r+e-1)%e],s=t[r%e],o=t[(r+1)%e],l=t[(r+2)%e];return ju((n-r/e)*e,i,s,o,l)}}var ks=(t=>()=>t);function Hu(t,e){return function(n){return t+n*e}}function Sm(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 VR(t,e){var n=e-t;return n?Hu(t,n>180||n<-180?n-360*Math.round(n/360):n):ks(isNaN(t)?e:t)}function Am(t){return(t=+t)==1?Yu:function(e,n){return n-e?Sm(e,n,t):ks(isNaN(e)?n:e)}}function Yu(t,e){var n=e-t;return n?Hu(t,n):ks(isNaN(t)?e:t)}var Gs=(function t(e){var n=Am(e);function r(i,s){var o=n((i=Bs(i)).r,(s=Bs(s)).r),l=n(i.g,s.g),c=n(i.b,s.b),u=Yu(i.opacity,s.opacity);return function(f){return i.r=o(f),i.g=l(f),i.b=c(f),i.opacity=u(f),i+""}}return r.gamma=t,r})(1);function Ku(t){return function(e){var n=e.length,r=new Array(n),i=new Array(n),s=new Array(n),o,l;for(o=0;o<n;++o)l=Bs(e[o]),r[o]=l.r||0,i[o]=l.g||0,s[o]=l.b||0;return r=t(r),i=t(i),s=t(s),l.opacity=1,function(c){return l.r=r(c),l.g=i(c),l.b=s(c),l+""}}}var jR=Ku(Tm),HR=Ku(bm);function Zu(t,e){e||(e=[]);var n=t?Math.min(e.length,t.length):0,r=e.slice(),i;return function(s){for(i=0;i<n;++i)r[i]=t[i]*(1-s)+e[i]*s;return r}}function Ju(t){return ArrayBuffer.isView(t)&&!(t instanceof DataView)}function YR(t,e){return(Ju(e)?Zu:Qu)(t,e)}function Qu(t,e){var n=e?e.length:0,r=t?Math.min(n,t.length):0,i=new Array(r),s=new Array(n),o;for(o=0;o<r;++o)i[o]=Ya(t[o],e[o]);for(;o<n;++o)s[o]=e[o];return function(l){for(o=0;o<r;++o)s[o]=i[o](l);return s}}function Em(t,e){var n=new Date;return t=+t,e=+e,function(r){return n.setTime(t*(1-r)+e*r),n}}function gr(t,e){return t=+t,e=+e,function(n){return t*(1-n)+e*n}}function Cm(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]=Ya(t[i],e[i]):r[i]=e[i];return function(s){for(i in n)r[i]=n[i](s);return r}}var gl=/[-+]?(?:\d+\.?\d*|\.?\d+)(?:[eE][-+]?\d+)?/g,pl=new RegExp(gl.source,"g");function Im(t){return function(){return t}}function Rm(t){return function(e){return t(e)+""}}function _u(t,e){var n=gl.lastIndex=pl.lastIndex=0,r,i,s,o=-1,l=[],c=[];for(t=t+"",e=e+"";(r=gl.exec(t))&&(i=pl.exec(e));)(s=i.index)>n&&(s=e.slice(n,s),l[o]?l[o]+=s:l[++o]=s),(r=r[0])===(i=i[0])?l[o]?l[o]+=i:l[++o]=i:(l[++o]=null,c.push({i:o,x:gr(r,i)})),n=pl.lastIndex;return n<e.length&&(s=e.slice(n),l[o]?l[o]+=s:l[++o]=s),l.length<2?c[0]?Rm(c[0].x):Im(e):(e=c.length,function(u){for(var f=0,d;f<e;++f)l[(d=c[f]).i]=d.x(u);return l.join("")})}function Ya(t,e){var n=typeof e,r;return e==null||n==="boolean"?ks(e):(n==="number"?gr:n==="string"?(r=ba(e))?(e=r,Gs):_u:e instanceof ba?Gs:e instanceof Date?Em:Ju(e)?Zu:Array.isArray(e)?Qu:typeof e.valueOf!="function"&&typeof e.toString!="function"||isNaN(e)?Cm:gr)(t,e)}function wm(t,e){return t=+t,e=+e,function(n){return Math.round(t*(1-n)+e*n)}}function Om(t){return function(){return t}}function Pm(t){return+t}var qu=[0,1];function Ka(t){return t}function ml(t,e){return(e-=t=+t)?function(n){return(n-t)/e}:Om(isNaN(e)?NaN:.5)}function Mm(t,e){var n;return t>e&&(n=t,t=e,e=n),function(r){return Math.max(t,Math.min(e,r))}}function Lm(t,e,n){var r=t[0],i=t[1],s=e[0],o=e[1];return i<r?(r=ml(i,r),s=n(o,s)):(r=ml(r,i),s=n(s,o)),function(l){return s(r(l))}}function Dm(t,e,n){var r=Math.min(t.length,e.length)-1,i=new Array(r),s=new Array(r),o=-1;for(t[r]<t[0]&&(t=t.slice().reverse(),e=e.slice().reverse());++o<r;)i[o]=ml(t[o],t[o+1]),s[o]=n(e[o],e[o+1]);return function(l){var c=om(t,l,1,r)-1;return s[c](i[c](l))}}function Xs(t,e){return e.domain(t.domain()).range(t.range()).interpolate(t.interpolate()).clamp(t.clamp()).unknown(t.unknown())}function xl(){var t=qu,e=qu,n=Ya,r,i,s,o=Ka,l,c,u;function f(){var h=Math.min(t.length,e.length);return o!==Ka&&(o=Mm(t[0],t[h-1])),l=h>2?Dm:Lm,c=u=null,d}function d(h){return h==null||isNaN(h=+h)?s:(c||(c=l(t.map(r),e,n)))(r(o(h)))}return d.invert=function(h){return o(i((u||(u=l(e,t.map(r),gr)))(h)))},d.domain=function(h){return arguments.length?(t=Array.from(h,Pm),f()):t.slice()},d.range=function(h){return arguments.length?(e=Array.from(h),f()):e.slice()},d.rangeRound=function(h){return e=Array.from(h),n=wm,f()},d.clamp=function(h){return arguments.length?(o=h?!0:Ka,f()):o!==Ka},d.interpolate=function(h){return arguments.length?(n=h,f()):n},d.unknown=function(h){return arguments.length?(s=h,d):s},function(h,m){return r=h,i=m,f()}}function tf(){return xl()(Ka,Ka)}function Ui(t,e){switch(arguments.length){case 0:break;case 1:this.range(t);break;default:this.range(e).domain(t);break}return this}function KR(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}var Fm=/^(?:(.)?([<>=^]))?([+\-( ])?([$#])?(0)?(\d+)?(,)?(\.\d+)?(~)?([a-z%])?$/i;function ki(t){if(!(e=Fm.exec(t)))throw new Error("invalid format: "+t);var e;return new yl({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]})}ki.prototype=yl.prototype;function yl(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+""}yl.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 Nm(t){return Math.abs(t=Math.round(t))>=1e21?t.toLocaleString("en").replace(/,/g,""):t.toString(10)}function Ws(t,e){if(!isFinite(t)||t===0)return null;var n=(t=e?t.toExponential(e-1):t.toExponential()).indexOf("e"),r=t.slice(0,n);return[r.length>1?r[0]+r.slice(2):r,+t.slice(n+1)]}function Za(t){return t=Ws(Math.abs(t)),t?t[1]:NaN}function $m(t,e){return Math.max(0,Math.max(-8,Math.min(8,Math.floor(Za(e)/3)))*3-Za(Math.abs(t)))}function Bm(t,e){return function(n,r){for(var i=n.length,s=[],o=0,l=t[0],c=0;i>0&&l>0&&(c+l+1>r&&(l=Math.max(1,r-c)),s.push(n.substring(i-=l,i+l)),!((c+=l+1)>r));)l=t[o=(o+1)%t.length];return s.reverse().join(e)}}function zm(t){return function(e){return e.replace(/[0-9]/g,function(n){return t[+n]})}}function Um(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 Vs;function km(t,e){var n=Ws(t,e);if(!n)return Vs=void 0,t.toPrecision(e);var r=n[0],i=n[1],s=i-(Vs=Math.max(-8,Math.min(8,Math.floor(i/3)))*3)+1,o=r.length;return s===o?r:s>o?r+new Array(s-o+1).join("0"):s>0?r.slice(0,s)+"."+r.slice(s):"0."+new Array(1-s).join("0")+Ws(t,Math.max(0,e+s-1))[0]}function ef(t,e){var n=Ws(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")}var nf={"%":(t,e)=>(t*100).toFixed(e),b:t=>Math.round(t).toString(2),c:t=>t+"",d:Nm,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)=>ef(t*100,e),r:ef,s:km,X:t=>Math.round(t).toString(16).toUpperCase(),x:t=>Math.round(t).toString(16)};function rf(t){return t}var af=Array.prototype.map,sf=["y","z","a","f","p","n","\xB5","m","","k","M","G","T","P","E","Z","Y"];function Gm(t){var e=t.grouping===void 0||t.thousands===void 0?rf:Bm(af.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+"",s=t.numerals===void 0?rf:zm(af.call(t.numerals,String)),o=t.percent===void 0?"%":t.percent+"",l=t.minus===void 0?"\u2212":t.minus+"",c=t.nan===void 0?"NaN":t.nan+"";function u(d,h){d=ki(d);var m=d.fill,S=d.align,E=d.sign,C=d.symbol,w=d.zero,$=d.width,z=d.comma,B=d.precision,W=d.trim,H=d.type;H==="n"?(z=!0,H="g"):nf[H]||(B===void 0&&(B=12),W=!0,H="g"),(w||m==="0"&&S==="=")&&(w=!0,m="0",S="=");var _=(h&&h.prefix!==void 0?h.prefix:"")+(C==="$"?n:C==="#"&&/[boxX]/.test(H)?"0"+H.toLowerCase():""),q=(C==="$"?r:/[%p]/.test(H)?o:"")+(h&&h.suffix!==void 0?h.suffix:""),st=nf[H],it=/[defgprs%]/.test(H);B=B===void 0?6:/[gprs]/.test(H)?Math.max(1,Math.min(21,B)):Math.max(0,Math.min(20,B));function ot(ct){var gt=_,tt=q,ft,lt,bt;if(H==="c")tt=st(ct)+tt,ct="";else{ct=+ct;var St=ct<0||1/ct<0;if(ct=isNaN(ct)?c:st(Math.abs(ct),B),W&&(ct=Um(ct)),St&&+ct==0&&E!=="+"&&(St=!1),gt=(St?E==="("?E:l:E==="-"||E==="("?"":E)+gt,tt=(H==="s"&&!isNaN(ct)&&Vs!==void 0?sf[8+Vs/3]:"")+tt+(St&&E==="("?")":""),it){for(ft=-1,lt=ct.length;++ft<lt;)if(bt=ct.charCodeAt(ft),48>bt||bt>57){tt=(bt===46?i+ct.slice(ft+1):ct.slice(ft))+tt,ct=ct.slice(0,ft);break}}}z&&!w&&(ct=e(ct,1/0));var Mt=gt.length+ct.length+tt.length,Ot=Mt<$?new Array($-Mt+1).join(m):"";switch(z&&w&&(ct=e(Ot+ct,Ot.length?$-tt.length:1/0),Ot=""),S){case"<":ct=gt+ct+tt+Ot;break;case"=":ct=gt+Ot+ct+tt;break;case"^":ct=Ot.slice(0,Mt=Ot.length>>1)+gt+ct+tt+Ot.slice(Mt);break;default:ct=Ot+gt+ct+tt;break}return s(ct)}return ot.toString=function(){return d+""},ot}function f(d,h){var m=Math.max(-8,Math.min(8,Math.floor(Za(h)/3)))*3,S=Math.pow(10,-m),E=u((d=ki(d),d.type="f",d),{suffix:sf[8+m/3]});return function(C){return E(S*C)}}return{format:u,formatPrefix:f}}var js,Tl,of;Xm({thousands:",",grouping:[3],currency:["$",""]});function Xm(t){return js=Gm(t),Tl=js.format,of=js.formatPrefix,js}function Wm(t,e){return t=Math.abs(t),e=Math.abs(e)-t,Math.max(0,Za(e)-Za(t))+1}function Vm(t){return Math.max(0,-Za(Math.abs(t)))}function jm(t,e,n,r){var i=ja(t,e,n),s;switch(r=ki(r==null?",f":r),r.type){case"s":{var o=Math.max(Math.abs(t),Math.abs(e));return r.precision==null&&!isNaN(s=$m(i,o))&&(r.precision=s),of(r,o)}case"":case"e":case"g":case"p":case"r":{r.precision==null&&!isNaN(s=Wm(i,Math.max(Math.abs(t),Math.abs(e))))&&(r.precision=s-(r.type==="e"));break}case"f":case"%":{r.precision==null&&!isNaN(s=Vm(i))&&(r.precision=s-(r.type==="%")*2);break}}return Tl(r)}function lf(t){var e=t.domain;return t.ticks=function(n){var r=e();return qn(r[0],r[r.length-1],n==null?10:n)},t.tickFormat=function(n,r){var i=e();return jm(i[0],i[i.length-1],n==null?10:n,r)},t.nice=function(n){n==null&&(n=10);var r=e(),i=0,s=r.length-1,o=r[i],l=r[s],c,u,f=10;for(l<o&&(u=o,o=l,l=u,u=i,i=s,s=u);f-- >0;){if(u=ya(o,l,n),u===c)return r[i]=o,r[s]=l,e(r);if(u>0)o=Math.floor(o/u)*u,l=Math.ceil(l/u)*u;else if(u<0)o=Math.ceil(o*u)/u,l=Math.floor(l*u)/u;else break;c=u}return t},t}function Hs(){var t=tf();return t.copy=function(){return Xs(t,Hs())},Ui.apply(t,arguments),lf(t)}function cf(t){return function(e){return Math.sign(e)*Math.log1p(Math.abs(e/t))}}function uf(t){return function(e){return Math.sign(e)*Math.expm1(Math.abs(e))*t}}function Hm(t){var e=1,n=t(cf(e),uf(e));return n.constant=function(r){return arguments.length?t(cf(e=+r),uf(e)):e},lf(n)}function ff(){var t=Hm(xl());return t.copy=function(){return Xs(t,ff()).constant(t.constant())},Ui.apply(t,arguments)}function df(t,e){t=t.slice();var n=0,r=t.length-1,i=t[n],s=t[r],o;return s<i&&(o=n,n=r,r=o,o=i,i=s,s=o),t[n]=e.floor(i),t[r]=e.ceil(s),t}function hf(t){return Math.log(t)}function vf(t){return Math.exp(t)}function Ym(t){return-Math.log(-t)}function Km(t){return-Math.exp(-t)}function Zm(t){return isFinite(t)?+("1e"+t):t<0?0:t}function Jm(t){return t===10?Zm:t===Math.E?Math.exp:e=>Math.pow(t,e)}function Qm(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 gf(t){return(e,n)=>-t(-e,n)}function _m(t){const e=t(hf,vf),n=e.domain;let r=10,i,s;function o(){return i=Qm(r),s=Jm(r),n()[0]<0?(i=gf(i),s=gf(s),t(Ym,Km)):t(hf,vf),e}return e.base=function(l){return arguments.length?(r=+l,o()):r},e.domain=function(l){return arguments.length?(n(l),o()):n()},e.ticks=l=>{const c=n();let u=c[0],f=c[c.length-1];const d=f<u;d&&([u,f]=[f,u]);let h=i(u),m=i(f),S,E;const C=l==null?10:+l;let w=[];if(!(r%1)&&m-h<C){if(h=Math.floor(h),m=Math.ceil(m),u>0){for(;h<=m;++h)for(S=1;S<r;++S)if(E=h<0?S/s(-h):S*s(h),!(E<u)){if(E>f)break;w.push(E)}}else for(;h<=m;++h)for(S=r-1;S>=1;--S)if(E=h>0?S/s(-h):S*s(h),!(E<u)){if(E>f)break;w.push(E)}w.length*2<C&&(w=qn(u,f,C))}else w=qn(h,m,Math.min(m-h,C)).map(s);return d?w.reverse():w},e.tickFormat=(l,c)=>{if(l==null&&(l=10),c==null&&(c=r===10?"s":","),typeof c!="function"&&(!(r%1)&&(c=ki(c)).precision==null&&(c.trim=!0),c=Tl(c)),l===1/0)return c;const u=Math.max(1,r*l/e.ticks().length);return f=>{let d=f/s(Math.round(i(f)));return d*r<r-.5&&(d*=r),d<=u?c(f):""}},e.nice=()=>n(df(n(),{floor:l=>s(Math.floor(i(l))),ceil:l=>s(Math.ceil(i(l)))})),e}function pf(){const t=_m(xl()).domain([1,10]);return t.copy=()=>Xs(t,pf()).base(t.base()),Ui.apply(t,arguments),t}const $r=1e3,or=$r*60,Br=or*60,zr=Br*24,bl=zr*7,mf=zr*30,Sl=zr*365,Al=new Date,El=new Date;function In(t,e,n,r){function i(s){return t(s=arguments.length===0?new Date:new Date(+s)),s}return i.floor=s=>(t(s=new Date(+s)),s),i.ceil=s=>(t(s=new Date(s-1)),e(s,1),t(s),s),i.round=s=>{const o=i(s),l=i.ceil(s);return s-o<l-s?o:l},i.offset=(s,o)=>(e(s=new Date(+s),o==null?1:Math.floor(o)),s),i.range=(s,o,l)=>{const c=[];if(s=i.ceil(s),l=l==null?1:Math.floor(l),!(s<o)||!(l>0))return c;let u;do c.push(u=new Date(+s)),e(s,l),t(s);while(u<s&&s<o);return c},i.filter=s=>In(o=>{if(o>=o)for(;t(o),!s(o);)o.setTime(o-1)},(o,l)=>{if(o>=o)if(l<0)for(;++l<=0;)for(;e(o,-1),!s(o););else for(;--l>=0;)for(;e(o,1),!s(o););}),n&&(i.count=(s,o)=>(Al.setTime(+s),El.setTime(+o),t(Al),t(El),Math.floor(n(Al,El))),i.every=s=>(s=Math.floor(s),!isFinite(s)||!(s>0)?null:s>1?i.filter(r?o=>r(o)%s===0:o=>i.count(0,o)%s===0):i)),i}const Ys=In(()=>{},(t,e)=>{t.setTime(+t+e)},(t,e)=>e-t);Ys.every=t=>(t=Math.floor(t),!isFinite(t)||!(t>0)?null:t>1?In(e=>{e.setTime(Math.floor(e/t)*t)},(e,n)=>{e.setTime(+e+n*t)},(e,n)=>(n-e)/t):Ys);const ZR=Ys.range,Ea=In(t=>{t.setTime(t-t.getMilliseconds())},(t,e)=>{t.setTime(+t+e*$r)},(t,e)=>(e-t)/$r,t=>t.getUTCSeconds()),JR=Ea.range,Cl=In(t=>{t.setTime(t-t.getMilliseconds()-t.getSeconds()*$r)},(t,e)=>{t.setTime(+t+e*or)},(t,e)=>(e-t)/or,t=>t.getMinutes()),QR=Cl.range,Il=In(t=>{t.setUTCSeconds(0,0)},(t,e)=>{t.setTime(+t+e*or)},(t,e)=>(e-t)/or,t=>t.getUTCMinutes()),_R=Il.range,Rl=In(t=>{t.setTime(t-t.getMilliseconds()-t.getSeconds()*$r-t.getMinutes()*or)},(t,e)=>{t.setTime(+t+e*Br)},(t,e)=>(e-t)/Br,t=>t.getHours()),qR=Rl.range,wl=In(t=>{t.setUTCMinutes(0,0,0)},(t,e)=>{t.setTime(+t+e*Br)},(t,e)=>(e-t)/Br,t=>t.getUTCHours()),tw=wl.range,Gi=In(t=>t.setHours(0,0,0,0),(t,e)=>t.setDate(t.getDate()+e),(t,e)=>(e-t-(e.getTimezoneOffset()-t.getTimezoneOffset())*or)/zr,t=>t.getDate()-1),ew=Gi.range,Ks=In(t=>{t.setUTCHours(0,0,0,0)},(t,e)=>{t.setUTCDate(t.getUTCDate()+e)},(t,e)=>(e-t)/zr,t=>t.getUTCDate()-1),nw=Ks.range,xf=In(t=>{t.setUTCHours(0,0,0,0)},(t,e)=>{t.setUTCDate(t.getUTCDate()+e)},(t,e)=>(e-t)/zr,t=>Math.floor(t/zr)),rw=xf.range;function Ca(t){return In(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())*or)/bl)}const Zs=Ca(0),Js=Ca(1),qm=Ca(2),tx=Ca(3),Ja=Ca(4),ex=Ca(5),nx=Ca(6),aw=Zs.range,iw=Js.range,sw=qm.range,ow=tx.range,lw=Ja.range,cw=ex.range,uw=nx.range;function Ia(t){return In(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)/bl)}const Qs=Ia(0),_s=Ia(1),rx=Ia(2),ax=Ia(3),Qa=Ia(4),ix=Ia(5),sx=Ia(6),fw=Qs.range,dw=_s.range,hw=rx.range,vw=ax.range,gw=Qa.range,pw=ix.range,mw=sx.range,Ol=In(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()),xw=Ol.range,Pl=In(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()),yw=Pl.range,Ur=In(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());Ur.every=t=>!isFinite(t=Math.floor(t))||!(t>0)?null:In(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 Tw=Ur.range,kr=In(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());kr.every=t=>!isFinite(t=Math.floor(t))||!(t>0)?null:In(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 bw=kr.range;function yf(t,e,n,r,i,s){const o=[[Ea,1,$r],[Ea,5,5*$r],[Ea,15,15*$r],[Ea,30,30*$r],[s,1,or],[s,5,5*or],[s,15,15*or],[s,30,30*or],[i,1,Br],[i,3,3*Br],[i,6,6*Br],[i,12,12*Br],[r,1,zr],[r,2,2*zr],[n,1,bl],[e,1,mf],[e,3,3*mf],[t,1,Sl]];function l(u,f,d){const h=f<u;h&&([u,f]=[f,u]);const m=d&&typeof d.range=="function"?d:c(u,f,d),S=m?m.range(u,+f+1):[];return h?S.reverse():S}function c(u,f,d){const h=Math.abs(f-u)/d,m=dl(([,,C])=>C).right(o,h);if(m===o.length)return t.every(ja(u/Sl,f/Sl,d));if(m===0)return Ys.every(Math.max(ja(u,f,d),1));const[S,E]=o[h/o[m-1][2]<o[m][2]/h?m-1:m];return S.every(E)}return[l,c]}const[ox,lx]=yf(kr,Pl,Qs,xf,wl,Il),[cx,ux]=yf(Ur,Ol,Zs,Gi,Rl,Cl);function Ml(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 Ll(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 Xi(t,e,n){return{y:t,m:e,d:n,H:0,M:0,S:0,L:0}}function fx(t){var e=t.dateTime,n=t.date,r=t.time,i=t.periods,s=t.days,o=t.shortDays,l=t.months,c=t.shortMonths,u=Wi(i),f=Vi(i),d=Wi(s),h=Vi(s),m=Wi(o),S=Vi(o),E=Wi(l),C=Vi(l),w=Wi(c),$=Vi(c),z={a:bt,A:St,b:Mt,B:Ot,c:null,d:Cf,e:Cf,f:Fx,g:Vx,G:Hx,H:Mx,I:Lx,j:Dx,L:If,m:Nx,M:$x,p:Kt,q:ee,Q:Lf,s:Df,S:Bx,u:zx,U:Ux,V:kx,w:Gx,W:Xx,x:null,X:null,y:Wx,Y:jx,Z:Yx,"%":Mf},B={a:Ae,A:Ee,b:Te,B:De,c:null,d:wf,e:wf,f:Qx,g:oy,G:cy,H:Kx,I:Zx,j:Jx,L:Of,m:_x,M:qx,p:me,q:Pe,Q:Lf,s:Df,S:ty,u:ey,U:ny,V:ry,w:ay,W:iy,x:null,X:null,y:sy,Y:ly,Z:uy,"%":Mf},W={a:it,A:ot,b:ct,B:gt,c:tt,d:Af,e:Af,f:Rx,g:Sf,G:bf,H:Ef,I:Ef,j:Ax,L:Ix,m:Sx,M:Ex,p:st,q:bx,Q:Ox,s:Px,S:Cx,u:px,U:mx,V:xx,w:gx,W:yx,x:ft,X:lt,y:Sf,Y:bf,Z:Tx,"%":wx};z.x=H(n,z),z.X=H(r,z),z.c=H(e,z),B.x=H(n,B),B.X=H(r,B),B.c=H(e,B);function H(Zt,he){return function(ge){var Wt=[],We=-1,Xe=0,pn=Zt.length,Cn,be,un;for(ge instanceof Date||(ge=new Date(+ge));++We<pn;)Zt.charCodeAt(We)===37&&(Wt.push(Zt.slice(Xe,We)),(be=Tf[Cn=Zt.charAt(++We)])!=null?Cn=Zt.charAt(++We):be=Cn==="e"?" ":"0",(un=he[Cn])&&(Cn=un(ge,be)),Wt.push(Cn),Xe=We+1);return Wt.push(Zt.slice(Xe,We)),Wt.join("")}}function _(Zt,he){return function(ge){var Wt=Xi(1900,void 0,1),We=q(Wt,Zt,ge+="",0),Xe,pn;if(We!=ge.length)return null;if("Q"in Wt)return new Date(Wt.Q);if("s"in Wt)return new Date(Wt.s*1e3+("L"in Wt?Wt.L:0));if(he&&!("Z"in Wt)&&(Wt.Z=0),"p"in Wt&&(Wt.H=Wt.H%12+Wt.p*12),Wt.m===void 0&&(Wt.m="q"in Wt?Wt.q:0),"V"in Wt){if(Wt.V<1||Wt.V>53)return null;"w"in Wt||(Wt.w=1),"Z"in Wt?(Xe=Ll(Xi(Wt.y,0,1)),pn=Xe.getUTCDay(),Xe=pn>4||pn===0?_s.ceil(Xe):_s(Xe),Xe=Ks.offset(Xe,(Wt.V-1)*7),Wt.y=Xe.getUTCFullYear(),Wt.m=Xe.getUTCMonth(),Wt.d=Xe.getUTCDate()+(Wt.w+6)%7):(Xe=Ml(Xi(Wt.y,0,1)),pn=Xe.getDay(),Xe=pn>4||pn===0?Js.ceil(Xe):Js(Xe),Xe=Gi.offset(Xe,(Wt.V-1)*7),Wt.y=Xe.getFullYear(),Wt.m=Xe.getMonth(),Wt.d=Xe.getDate()+(Wt.w+6)%7)}else("W"in Wt||"U"in Wt)&&("w"in Wt||(Wt.w="u"in Wt?Wt.u%7:"W"in Wt?1:0),pn="Z"in Wt?Ll(Xi(Wt.y,0,1)).getUTCDay():Ml(Xi(Wt.y,0,1)).getDay(),Wt.m=0,Wt.d="W"in Wt?(Wt.w+6)%7+Wt.W*7-(pn+5)%7:Wt.w+Wt.U*7-(pn+6)%7);return"Z"in Wt?(Wt.H+=Wt.Z/100|0,Wt.M+=Wt.Z%100,Ll(Wt)):Ml(Wt)}}function q(Zt,he,ge,Wt){for(var We=0,Xe=he.length,pn=ge.length,Cn,be;We<Xe;){if(Wt>=pn)return-1;if(Cn=he.charCodeAt(We++),Cn===37){if(Cn=he.charAt(We++),be=W[Cn in Tf?he.charAt(We++):Cn],!be||(Wt=be(Zt,ge,Wt))<0)return-1}else if(Cn!=ge.charCodeAt(Wt++))return-1}return Wt}function st(Zt,he,ge){var Wt=u.exec(he.slice(ge));return Wt?(Zt.p=f.get(Wt[0].toLowerCase()),ge+Wt[0].length):-1}function it(Zt,he,ge){var Wt=m.exec(he.slice(ge));return Wt?(Zt.w=S.get(Wt[0].toLowerCase()),ge+Wt[0].length):-1}function ot(Zt,he,ge){var Wt=d.exec(he.slice(ge));return Wt?(Zt.w=h.get(Wt[0].toLowerCase()),ge+Wt[0].length):-1}function ct(Zt,he,ge){var Wt=w.exec(he.slice(ge));return Wt?(Zt.m=$.get(Wt[0].toLowerCase()),ge+Wt[0].length):-1}function gt(Zt,he,ge){var Wt=E.exec(he.slice(ge));return Wt?(Zt.m=C.get(Wt[0].toLowerCase()),ge+Wt[0].length):-1}function tt(Zt,he,ge){return q(Zt,e,he,ge)}function ft(Zt,he,ge){return q(Zt,n,he,ge)}function lt(Zt,he,ge){return q(Zt,r,he,ge)}function bt(Zt){return o[Zt.getDay()]}function St(Zt){return s[Zt.getDay()]}function Mt(Zt){return c[Zt.getMonth()]}function Ot(Zt){return l[Zt.getMonth()]}function Kt(Zt){return i[+(Zt.getHours()>=12)]}function ee(Zt){return 1+~~(Zt.getMonth()/3)}function Ae(Zt){return o[Zt.getUTCDay()]}function Ee(Zt){return s[Zt.getUTCDay()]}function Te(Zt){return c[Zt.getUTCMonth()]}function De(Zt){return l[Zt.getUTCMonth()]}function me(Zt){return i[+(Zt.getUTCHours()>=12)]}function Pe(Zt){return 1+~~(Zt.getUTCMonth()/3)}return{format:function(Zt){var he=H(Zt+="",z);return he.toString=function(){return Zt},he},parse:function(Zt){var he=_(Zt+="",!1);return he.toString=function(){return Zt},he},utcFormat:function(Zt){var he=H(Zt+="",B);return he.toString=function(){return Zt},he},utcParse:function(Zt){var he=_(Zt+="",!0);return he.toString=function(){return Zt},he}}}var Tf={"-":"",_:" ",0:"0"},On=/^\s*\d+/,dx=/^%/,hx=/[\\^$*+?|[\]().{}]/g;function _e(t,e,n){var r=t<0?"-":"",i=(r?-t:t)+"",s=i.length;return r+(s<n?new Array(n-s+1).join(e)+i:i)}function vx(t){return t.replace(hx,"\\$&")}function Wi(t){return new RegExp("^(?:"+t.map(vx).join("|")+")","i")}function Vi(t){return new Map(t.map((e,n)=>[e.toLowerCase(),n]))}function gx(t,e,n){var r=On.exec(e.slice(n,n+1));return r?(t.w=+r[0],n+r[0].length):-1}function px(t,e,n){var r=On.exec(e.slice(n,n+1));return r?(t.u=+r[0],n+r[0].length):-1}function mx(t,e,n){var r=On.exec(e.slice(n,n+2));return r?(t.U=+r[0],n+r[0].length):-1}function xx(t,e,n){var r=On.exec(e.slice(n,n+2));return r?(t.V=+r[0],n+r[0].length):-1}function yx(t,e,n){var r=On.exec(e.slice(n,n+2));return r?(t.W=+r[0],n+r[0].length):-1}function bf(t,e,n){var r=On.exec(e.slice(n,n+4));return r?(t.y=+r[0],n+r[0].length):-1}function Sf(t,e,n){var r=On.exec(e.slice(n,n+2));return r?(t.y=+r[0]+(+r[0]>68?1900:2e3),n+r[0].length):-1}function Tx(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 bx(t,e,n){var r=On.exec(e.slice(n,n+1));return r?(t.q=r[0]*3-3,n+r[0].length):-1}function Sx(t,e,n){var r=On.exec(e.slice(n,n+2));return r?(t.m=r[0]-1,n+r[0].length):-1}function Af(t,e,n){var r=On.exec(e.slice(n,n+2));return r?(t.d=+r[0],n+r[0].length):-1}function Ax(t,e,n){var r=On.exec(e.slice(n,n+3));return r?(t.m=0,t.d=+r[0],n+r[0].length):-1}function Ef(t,e,n){var r=On.exec(e.slice(n,n+2));return r?(t.H=+r[0],n+r[0].length):-1}function Ex(t,e,n){var r=On.exec(e.slice(n,n+2));return r?(t.M=+r[0],n+r[0].length):-1}function Cx(t,e,n){var r=On.exec(e.slice(n,n+2));return r?(t.S=+r[0],n+r[0].length):-1}function Ix(t,e,n){var r=On.exec(e.slice(n,n+3));return r?(t.L=+r[0],n+r[0].length):-1}function Rx(t,e,n){var r=On.exec(e.slice(n,n+6));return r?(t.L=Math.floor(r[0]/1e3),n+r[0].length):-1}function wx(t,e,n){var r=dx.exec(e.slice(n,n+1));return r?n+r[0].length:-1}function Ox(t,e,n){var r=On.exec(e.slice(n));return r?(t.Q=+r[0],n+r[0].length):-1}function Px(t,e,n){var r=On.exec(e.slice(n));return r?(t.s=+r[0],n+r[0].length):-1}function Cf(t,e){return _e(t.getDate(),e,2)}function Mx(t,e){return _e(t.getHours(),e,2)}function Lx(t,e){return _e(t.getHours()%12||12,e,2)}function Dx(t,e){return _e(1+Gi.count(Ur(t),t),e,3)}function If(t,e){return _e(t.getMilliseconds(),e,3)}function Fx(t,e){return If(t,e)+"000"}function Nx(t,e){return _e(t.getMonth()+1,e,2)}function $x(t,e){return _e(t.getMinutes(),e,2)}function Bx(t,e){return _e(t.getSeconds(),e,2)}function zx(t){var e=t.getDay();return e===0?7:e}function Ux(t,e){return _e(Zs.count(Ur(t)-1,t),e,2)}function Rf(t){var e=t.getDay();return e>=4||e===0?Ja(t):Ja.ceil(t)}function kx(t,e){return t=Rf(t),_e(Ja.count(Ur(t),t)+(Ur(t).getDay()===4),e,2)}function Gx(t){return t.getDay()}function Xx(t,e){return _e(Js.count(Ur(t)-1,t),e,2)}function Wx(t,e){return _e(t.getFullYear()%100,e,2)}function Vx(t,e){return t=Rf(t),_e(t.getFullYear()%100,e,2)}function jx(t,e){return _e(t.getFullYear()%1e4,e,4)}function Hx(t,e){var n=t.getDay();return t=n>=4||n===0?Ja(t):Ja.ceil(t),_e(t.getFullYear()%1e4,e,4)}function Yx(t){var e=t.getTimezoneOffset();return(e>0?"-":(e*=-1,"+"))+_e(e/60|0,"0",2)+_e(e%60,"0",2)}function wf(t,e){return _e(t.getUTCDate(),e,2)}function Kx(t,e){return _e(t.getUTCHours(),e,2)}function Zx(t,e){return _e(t.getUTCHours()%12||12,e,2)}function Jx(t,e){return _e(1+Ks.count(kr(t),t),e,3)}function Of(t,e){return _e(t.getUTCMilliseconds(),e,3)}function Qx(t,e){return Of(t,e)+"000"}function _x(t,e){return _e(t.getUTCMonth()+1,e,2)}function qx(t,e){return _e(t.getUTCMinutes(),e,2)}function ty(t,e){return _e(t.getUTCSeconds(),e,2)}function ey(t){var e=t.getUTCDay();return e===0?7:e}function ny(t,e){return _e(Qs.count(kr(t)-1,t),e,2)}function Pf(t){var e=t.getUTCDay();return e>=4||e===0?Qa(t):Qa.ceil(t)}function ry(t,e){return t=Pf(t),_e(Qa.count(kr(t),t)+(kr(t).getUTCDay()===4),e,2)}function ay(t){return t.getUTCDay()}function iy(t,e){return _e(_s.count(kr(t)-1,t),e,2)}function sy(t,e){return _e(t.getUTCFullYear()%100,e,2)}function oy(t,e){return t=Pf(t),_e(t.getUTCFullYear()%100,e,2)}function ly(t,e){return _e(t.getUTCFullYear()%1e4,e,4)}function cy(t,e){var n=t.getUTCDay();return t=n>=4||n===0?Qa(t):Qa.ceil(t),_e(t.getUTCFullYear()%1e4,e,4)}function uy(){return"+0000"}function Mf(){return"%"}function Lf(t){return+t}function Df(t){return Math.floor(+t/1e3)}var _a,Dl,Ff,Fl,Nf;fy({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 fy(t){return _a=fx(t),Dl=_a.format,Ff=_a.parse,Fl=_a.utcFormat,Nf=_a.utcParse,_a}function dy(t){return new Date(t)}function hy(t){return t instanceof Date?+t:+new Date(+t)}function Nl(t,e,n,r,i,s,o,l,c,u){var f=tf(),d=f.invert,h=f.domain,m=u(".%L"),S=u(":%S"),E=u("%I:%M"),C=u("%I %p"),w=u("%a %d"),$=u("%b %d"),z=u("%B"),B=u("%Y");function W(H){return(c(H)<H?m:l(H)<H?S:o(H)<H?E:s(H)<H?C:r(H)<H?i(H)<H?w:$:n(H)<H?z:B)(H)}return f.invert=function(H){return new Date(d(H))},f.domain=function(H){return arguments.length?h(Array.from(H,hy)):h().map(dy)},f.ticks=function(H){var _=h();return t(_[0],_[_.length-1],H==null?10:H)},f.tickFormat=function(H,_){return _==null?W:u(_)},f.nice=function(H){var _=h();return(!H||typeof H.range!="function")&&(H=e(_[0],_[_.length-1],H==null?10:H)),H?h(df(_,H)):f},f.copy=function(){return Xs(f,Nl(t,e,n,r,i,s,o,l,c,u))},f}function vy(){return Ui.apply(Nl(cx,ux,Ur,Ol,Zs,Gi,Rl,Cl,Ea,Dl).domain([new Date(2e3,0,1),new Date(2e3,0,2)]),arguments)}function gy(){return Ui.apply(Nl(ox,lx,kr,Pl,Qs,Ks,wl,Il,Ea,Fl).domain([Date.UTC(2e3,0,1),Date.UTC(2e3,0,2)]),arguments)}const Ge=t=>t||t===0,ie=t=>typeof t=="function",je=t=>typeof t=="string",ae=t=>typeof t=="number",mn=t=>typeof t=="undefined",sn=t=>typeof t!="undefined",Ra=t=>typeof t=="boolean",py=t=>Math.ceil(t/10)*10,qa=t=>Math.ceil(t)+.5,wa=t=>t[1]-t[0],Kn=t=>typeof t=="object",my=t=>{for(const e in t)if(Object.prototype.hasOwnProperty.call(t,e))return!1;return!0},lr=t=>mn(t)||t===null||je(t)&&t.length===0||Kn(t)&&!(t instanceof Date)&&my(t)||ae(t)&&isNaN(t),vn=t=>!lr(t),qe=t=>Array.isArray(t),He=t=>t&&!(t!=null&&t.nodeType)&&Kn(t)&&!qe(t);function xy(){return typeof globalThis=="object"&&globalThis!==null&&globalThis.Object===Object&&globalThis||typeof self=="object"&&self!==null&&self.Object===Object&&self||Function("return this")()}function yy(t){const e=typeof(t==null?void 0:t.requestAnimationFrame)=="function"&&typeof(t==null?void 0:t.cancelAnimationFrame)=="function",n=typeof(t==null?void 0:t.requestIdleCallback)=="function"&&typeof(t==null?void 0:t.cancelIdleCallback)=="function",r=s=>setTimeout(s,1),i=s=>clearTimeout(s);return[e?t.requestAnimationFrame:r,e?t.cancelAnimationFrame:i,n?t.requestIdleCallback:r,n?t.cancelIdleCallback:i]}const se=xy(),Ye=se==null?void 0:se.document,[$f,Ty,Bf,by]=yy(se),Sy=new Set(["span","div","p","br","b","i","em","small","strong","mark","u","s","sub","sup","h1","h2","h3","h4","h5","h6","ul","ol","li","dl","dt","dd","table","thead","tbody","tfoot","tr","th","td","caption","colgroup","col","hr","pre","code","blockquote","abbr","ins","del","a","img","figure","figcaption","svg","g","path","circle","ellipse","rect","line","polyline","polygon","text","tspan","textPath","use","defs","symbol","clipPath","mask","linearGradient","radialGradient","stop","pattern","marker","title","desc"]),Ay=new Set(["class","id","style","title","lang","dir","href","src","alt","width","height","colspan","rowspan","scope","headers","d","points","x","y","x1","x2","y1","y2","cx","cy","r","rx","ry","dx","dy","viewBox","preserveAspectRatio","transform","fill","fill-opacity","fill-rule","stroke","stroke-width","stroke-opacity","stroke-linecap","stroke-linejoin","stroke-dasharray","stroke-dashoffset","opacity","clip-path","clip-rule","mask","font-family","font-size","font-weight","font-style","text-anchor","dominant-baseline","offset","stop-color","stop-opacity","gradientUnits","gradientTransform","spreadMethod","patternUnits","patternTransform","marker-start","marker-mid","marker-end","markerWidth","markerHeight","refX","refY","xlink:href"]),qs=new Map;Sy.forEach(t=>qs.set(t.toLowerCase(),t));const to=new Map;Ay.forEach(t=>to.set(t.toLowerCase(),t));const Ey=new Set(["http:","https:","mailto:"]),Cy=new Set(["href","src","xlink:href"]),Iy=/^<\/?([a-zA-Z][a-zA-Z0-9]*)/,Ry=/^<\/([a-zA-Z][a-zA-Z0-9]*)\s*>$/,wy=/^<([a-zA-Z][a-zA-Z0-9]*)([\s\S]*?)(\/?)>$/,zf=/([a-zA-Z][\w:-]*)\s*(?:=\s*(?:"([^"]*)"|'([^']*)'|([^\s>]+)))?/g,Uf=/url\s*\(\s*["']?([^"')]+)["']?\s*\)/gi,Oy=["expression(","behavior:","binding:","@import","@charset","-moz-binding:"];function $l(t){return t.replace(/:/gi,":").replace(/&newline;/gi,`
`).replace(/&tab;/gi," ").replace(/ /gi," ").replace(/</gi,"<").replace(/>/gi,">").replace(/&/gi,"&").replace(/"/gi,'"').replace(/'/gi,"'").replace(/&#(\d+);?/gi,(e,n)=>String.fromCharCode(parseInt(n,10))).replace(/&#x([0-9a-f]+);?/gi,(e,n)=>String.fromCharCode(parseInt(n,16)))}function kf(t){const n=$l(t).trim().replace(/[\s\u0000-\u001f]/g,"").toLowerCase();if(!n||n.startsWith("#"))return!0;const r=n.match(/^[^/?#]*:/);return r?Ey.has(r[0]):!0}function Py(t){const n=$l(t).replace(/[\u0000-\u001f]/g,"");Uf.lastIndex=0;let r;for(;(r=Uf.exec(n))!==null;)if(!kf(r[1]))return null;const i=n.toLowerCase().replace(/\s/g,"");for(const s of Oy)if(i.includes(s))return null;return t}const My={'"':""","'":"'","`":"`"},Ly=/["'`]/g;function Bl(t){return t.replace(Ly,e=>My[e])}function Dy(t,e,n=!1){if(Cy.has(t))return kf(e)?n?Bl(e):e:null;if(t==="style"){const i=Py(e);return i===null?null:n?Bl(i):i}const r=$l(e).toLowerCase().replace(/\s/g,"");return/\bon\w+=/.test(r)?null:n?Bl(e):e}function Fy(t){const e=t.match(Iy);return e?e[1].toLowerCase():null}function Ny(t){const e=Fy(t);return e!==null&&qs.has(e)}function $y(t){var e,n,r;const i=t.match(Ry);if(i){const E=i[1].toLowerCase();return`</${(e=qs.get(E))!=null?e:E}>`}const s=t.match(wy);if(!s)return"";const[,o,l,c]=s,u=o.toLowerCase(),f=(n=qs.get(u))!=null?n:u,d=[];zf.lastIndex=0;let h;for(;(h=zf.exec(l))!==null;){const E=h[1].toLowerCase(),C=h[2],w=h[3],$=h[4];if(E.startsWith("on"))continue;const z=(r=to.get(E))!=null?r:E;let B,W;if(C!==void 0)B=C,W='"';else if(w!==void 0)B=w,W="'";else if($!==void 0)B=$,W='"';else{to.has(E)&&d.push(z);continue}if(to.has(E)){const _=Dy(E,B,$!==void 0);_!==null&&d.push(`${z}=${W}${_}${W}`)}}const m=d.length>0?` ${d.join(" ")}`:"";return`<${f}${m}${c?"/>":">"}`}function Gr(t){return typeof t!="string"||!t||t.indexOf("<")===-1?t:t.replace(/<\/?[^>]*>|[^<>\s]+>/g,e=>e.startsWith("<!--")?"":e.startsWith("<")?Ny(e)?$y(e):e.replace(/</g,"<"):e.slice(0,-1)+">")}var By=Object.defineProperty,Gf=Object.getOwnPropertySymbols,zy=Object.prototype.hasOwnProperty,Uy=Object.prototype.propertyIsEnumerable,Xf=(t,e,n)=>e in t?By(t,e,{enumerable:!0,configurable:!0,writable:!0,value:n}):t[e]=n,Wf=(t,e)=>{for(var n in e||(e={}))zy.call(e,n)&&Xf(t,n,e[n]);if(Gf)for(var n of Gf(e))Uy.call(e,n)&&Xf(t,n,e[n]);return t};function Vf(t,e){for(let n=0;n<t.length;n++){const r=t[n];r!==null&&sn(r)&&e(r,n)}}function ia(t,e,n){return sn(t[e])?t[e]:n}function ky(t,e){for(const n in t)if(t[n]===e)return!0;return!1}function Ne(t,e,...n){const r=ie(t);return r&&t.call(e,...n),r}function eo(t,e){let n=0;const r=function(...i){!--n&&e.apply(this,i)};"duration"in t?t.each(()=>++n).on("end",r):(++n,t.call(r))}const Ln=t=>t.charAt(0).toUpperCase()+t.slice(1);function Gy(t,e="-"){return t.split(e).map((n,r)=>r?n.charAt(0).toUpperCase()+n.slice(1).toLowerCase():n.toLowerCase()).join("")}const Oa=t=>[].slice.call(t);function Xy(...t){const e=n=>{if(qe(n))return n.map(e);if(He(n)&&n.constructor){const r=new n.constructor;for(const i in n)r[i]=e(n[i]);return r}return n};return t.map(n=>e(n)).reduce((n,r)=>Wf(Wf({},n),r))}function xn(t={},e){qe(e)&&e.forEach(n=>xn(t,n));for(const n in e)/^\d+$/.test(n)||n in t||(t[n]=e[n]);return t}function zl(t){const e=t[0]instanceof Date,n=Array.from(new Set(e?t.map(Number):t));return e?n.map(r=>new Date(r)):n}function Wy(t){return t&&t.length?t.reduce((e,n)=>e.concat(n)):[]}function Xr(t,...e){if(!e.length||e.length===1&&!e[0])return t;const n=e.shift();return He(t)&&He(n)&&Object.keys(n).forEach(r=>{if(!/^(__proto__|constructor|prototype)$/i.test(r)){const i=n[r];i instanceof Date?t[r]=new Date(i.getTime()):He(i)?(!t[r]&&(t[r]={}),t[r]=Xr(t[r],i)):t[r]=qe(i)?i.concat():i}}),Xr(t,...e)}function ti(t,e=!0){let n;return t[0]instanceof Date?n=e?(r,i)=>r-i:(r,i)=>i-r:e&&!t.every(isNaN)?n=(r,i)=>r-i:e||(n=(r,i)=>r>i&&-1||r<i&&1||r===i&&0),t.concat().sort(n)}function pr(t,e){let n=e.filter(r=>vn(r));if(n.length)if(ae(n[0])){let r=t==="min"?1/0:-1/0;for(const i of n)(t==="min"?i<r:i>r)&&(r=i);n=r}else n[0]instanceof Date&&(n=ti(n,t==="min")[0]);else n=void 0;return n}const no=(t,e,n=1)=>{const r=[],i=Math.max(0,Math.ceil((e-t)/n))|0;for(let s=0;s<i;s++)r.push(t+s*n);return r};let Vy=0;function Cr(t=!0){const e=++Vy;return t?String(e):e}function Ul(t,e,n,r,i){if(n>r)return-1;const s=Math.floor((n+r)/2);let{x:o,w:l=0}=t[s];return i&&(o=t[s].y,l=t[s].h),e>=o&&e<=o+l?s:e<o?Ul(t,e,n,s-1,i):Ul(t,e,s+1,r,i)}function Pa(t,e){return Gr(t.replace(/\{=([^}]+)\}/g,(n,r)=>{var i;return(i=e[r])!=null?i:""}))}function Wn(t){var e;let n;if(t instanceof Date)n=t;else if(je(t)){const{config:r,format:i}=this;n=(e=i.dataTime(r.data_xFormat)(t))!=null?e:new Date(t)}else ae(t)&&!isNaN(t)&&(n=new Date(+t));return(!n||isNaN(+n))&&console&&console.error&&console.error(`Failed to parse x '${t}' to Date object`),n}function jf(t){if(He(t)&&!je(t)){const o=t;return{top:o.top||0,right:o.right||0,bottom:o.bottom||0,left:o.left||0}}const e=(je(t)?t.trim().split(/\s+/):[t]).map(o=>+o||0),[n,r=n,i=n,s=r]=e;return{top:n,right:r,bottom:i,left:s}}function Hf(t,e){e()===!1?$f(()=>Hf(t,e)):t()}function Yf(t,e=(n=>n)){const n=new Set;return Vf(t,(r,i)=>{n.add(e(r,i))}),n}function Kf(t,e,n=(r=>r)){const r=new Map;return Vf(t,(i,s)=>{r.set(e(i,s),n(i,s))}),r}function sa(t="linear",e,n){const r={linear:Hs,log:ff,_log:pf,time:vy,utc:gy}[t]();return r.type=t,/_?log/.test(t)&&r.clamp(!0),r.range([e!=null?e:0,n!=null?n:1])}var jy={getXScale(t,e,n,r){const i=this,s=i.state.loading!=="append"&&i.scale.zoom||sa(i.axis.getAxisType("x"),t,e);return i.getCustomizedXScale(n?s.domain(n):s,r)},getYScale(t,e,n,r,i){const o=this.axis.getAxisType(t);if(i&&i.type===o)return i.range([e,n]),r&&i.domain(r),i;const l=sa(o,e,n);return r&&l.domain(r),l},getYScaleById(t,e=!1){var n;const r=((n=this.axis)==null?void 0:n.getId(t))==="y2",i=e?r?"subY2":"subY":r?"y2":"y";return this.scale[i]},getCustomizedXScale(t,e){const n=this,r=()=>(e?e():n.axis.x.tickOffset())||(n.axis.isCategorized()?(t(1)-t(0))/2:0),i=n.config.axis_x_inverted,s=function(o){return t(o)+r()};for(const o in t)s[o]=t[o];return s.orgDomain=()=>t.domain(),s.orgScale=()=>t,n.axis.isCategorized()&&(s.domain=function(o){let l=o;return arguments.length?(t.domain(l),s):(l=this.orgDomain(),i?[l[0]+1,l[1]]:[l[0],l[1]+1])}),s},updateScales(t,e=!0){var n,r,i,s,o,l,c,u,f;const d=this,{axis:h,config:m,format:S,org:E,scale:C,state:{current:w,width:$,height:z,width2:B,height2:W,hasAxis:H,hasTreemap:_}}=d;if(H){const q=m.axis_rotated,st=d.getResettedPadding(1),it={x:q?st:0,y:q?0:z,subX:q?1:0,subY:q?0:W},ot={x:q?z:$,y:q?$:st,subX:q?z:$,subY:q?B:1},ct=e?(n=C.x)==null?void 0:n.orgDomain():C.zoom||(i=(r=C.x)==null?void 0:r.domain)==null?void 0:i.call(r),gt=e?E.xDomain:C.zoom||(o=(s=C.subX)==null?void 0:s.domain)==null?void 0:o.call(s);C.x=d.getXScale(it.x,ot.x,ct,()=>h.x.tickOffset()),C.subX=d.getXScale(it.x,ot.x,gt,tt=>{var ft;return tt%1?0:((ft=h.subX)!=null?ft:h.x).tickOffset()}),S.xAxisTick=h.getXAxisTickFormat(),S.subXAxisTick=h.getXAxisTickFormat(!0),h.setAxis("x",C.x,m.axis_x_tick_outer,t),m.subchart_show&&h.setAxis("subX",C.subX,(l=m.subchart_axis_x_tick_outer)!=null?l:m.axis_x_tick_outer,t),C.y=d.getYScale("y",it.y,ot.y,C.y?C.y.domain():m.axis_y_default,C.y),C.subY=d.getYScale("y",it.subY,ot.subY,C.subY?C.subY.domain():m.axis_y_default,C.subY),h.setAxis("y",C.y,m.axis_y_tick_outer,t),m.subchart_show&&m.subchart_axis_y_show&&h.setAxis("subY",C.subY,(c=m.subchart_axis_y_tick_outer)!=null?c:m.axis_y_tick_outer,t),(m.axis_y2_show||m.subchart_axis_y2_show)&&(C.y2=d.getYScale("y2",it.y,ot.y,C.y2?C.y2.domain():m.axis_y2_default,C.y2),C.subY2=d.getYScale("y2",it.subY,ot.subY,C.subY2?C.subY2.domain():m.axis_y2_default,C.subY2),h.setAxis("y2",C.y2,m.axis_y2_tick_outer,t),m.subchart_show&&m.subchart_axis_y2_show&&h.setAxis("subY2",C.subY2,(u=m.subchart_axis_y2_tick_outer)!=null?u:m.axis_y2_tick_outer,t))}else if(_){const q=d.getCurrentPadding();C.x=Hs().rangeRound([q.left,w.width-q.right]),C.y=Hs().rangeRound([q.top,w.height-q.bottom])}else(f=d.updateArc)==null||f.call(d)},xx(t){const e=this,{config:n,scale:{x:r,zoom:i}}=e,s=n.zoom_enabled&&i?i:r;return t?s(Ge(t.x)?t.x:t):null},xv(t){const e=this,{axis:n,config:r,scale:{x:i,zoom:s}}=e,o=r.zoom_enabled&&s?s:i;let l=e.getBaseValue(t);return n.isTimeSeries()?l=Wn.call(e,l):n.isCategorized()&&je(l)&&(l=r.axis_x_categories.indexOf(l)),o(l)},yv(t){const e=this,{scale:{y:n,y2:r}}=e;return(t.axis&&t.axis==="y2"?r:n)(e.getBaseValue(t))},subxx(t){return t?this.scale.subX(t.x):null}};const Zf=1e5;function mr(t){const e=/(\d+(?:\.\d+)?)px/.exec(t),n=parseFloat(e?e[1]:t);return Number.isFinite(n)?n:12}function tr(t,e,n,r){return e.indices[n]||t.getShapeIndices(r)}function ei(t,e,n=[]){var r;const i=typeof e=="string"?e:e==null?void 0:e.id;return!((r=t.isGrouped)!=null&&r.call(t,i))||n.some(s=>s(t,e))}function oa(t,e){var n;const r=typeof e=="string"?e:e==null?void 0:e.id;return r&&((n=t.data_types)==null?void 0:n[r])||t.data_type||qt.LINE}function ro(t){const e=+t;return Number.isFinite(e)?e:null}function Jf(t){var e,n;const r=(n=(e=t.scale.zoom||t.scale.x)==null?void 0:e.domain)==null?void 0:n.call(e),i=ro(r==null?void 0:r[0]),s=ro(r==null?void 0:r[1]);return i===null||s===null?null:[Math.min(i,s),Math.max(i,s)]}function ao(t){return ro(t==null?void 0:t.x)}function Hy(t,e,n){let r=0,i=t.length;for(;r<i;){const s=r+i>>1,o=ao(t[s]);if(o===null)return 0;(n?o<e:o>e)?r=s+1:i=s}return r}function Yy(t,e,n){let r=0,i=t.length;for(;r<i;){const s=r+i>>1,o=ao(t[s]);if(o===null)return t.length;(n?o<=e:o>=e)?r=s+1:i=s}return r}function Wr(t,e,n=1){const r=(e==null?void 0:e.values)||[],i={start:0,end:r.length},s=Jf(t);if(!r.length||!s)return i;const o=t.state,l=o._canvasVisibleRangeCache||(o._canvasVisibleRangeCache=new Map),c=[e.id,r.length,o.dataGeneration,s[0],s[1],n].join(":"),u=l.get(e.id);if((u==null?void 0:u.key)===c)return u.range;const f=ao(r[0]),d=ao(r[r.length-1]);if(f===null||d===null)return i;const h=f<=d,m=Hy(r,s[0],h),S=Yy(r,s[1],h),E={start:Math.max(0,Math.min(m,S)-n),end:Math.min(r.length,Math.max(m,S)+n)};return l.set(e.id,{key:c,range:E}),E}function er(t,e){return oa(t.config,e)===qt.BAR}function ji(t,e){return en.Area.indexOf(oa(t.config,e))>-1}function ni(t,e){const n=oa(t.config,e);return en.Line.indexOf(n)>-1}function la(t,e){return oa(t.config,e)===qt.SCATTER}function ca(t,e){return oa(t.config,e)===qt.BUBBLE}function xr(t,e){return ni(t,e)||la(t,e)||ca(t,e)}function Vn(t,e){return oa(t.config,e)===qt.CANDLESTICK}function kl(t,e){return oa(t.config,e)===qt.TREEMAP}function Sw(t,e){const n=oa(t,e);return n===qt.BAR||en.Area.indexOf(n)>-1}function An(t,e){const n=t.getBaseValue(e);return n!=null}function gn(t,e){return Number.isFinite(t)&&Number.isFinite(e)}function Qf(t,e,n){const r=Math.ceil(n)+1,i=Math.max(1,Math.ceil(t)+r*2+1),s=Math.max(1,Math.ceil(e)+r*2+1);return{data:new Uint8Array(i*s),height:s,offset:r,width:i}}function _f(t,e,n){const r=Math.round(e)+t.offset,i=Math.round(n)+t.offset;if(r<0||r>=t.width||i<0||i>=t.height)return!1;const s=i*t.width+r;return t.data[s]?!1:(t.data[s]=1,!0)}function Nn(t,e,n,r=`axis_${e}`){const i=t[`${r}_tick_${n}`];return i!==void 0?i:t[`axis_${e}_tick_${n}`]}function io(t,e){const n=typeof t=="function"?t.call(e):t;return n!=null&&n.length?n:void 0}function qf(t,e,n){var r,i,s,o,l,c;if((i=(r=t.axis)==null?void 0:r.isTimeSeries)!=null&&i.call(r,n))return e instanceof Date?e:Wn.call(t,e);if(n==="x"&&((o=(s=t.axis)==null?void 0:s.isCategorized)!=null&&o.call(s))&&typeof e=="string"){const u=t.config.axis_x_categories.indexOf(e);return u>=0?u:e}return(c=(l=t.axis)==null?void 0:l.isLog)!=null&&c.call(l,n)&&e!==null&&e!==void 0?+e:e}function Vr(t,e){return qf(t,e,"x")}function Hi(t,e,n="y"){return qf(t,e,n)}function td(t,e,n="y"){return e.map(r=>Hi(t,r,n))}function Gl(t,e){return e.map(n=>Vr(t,n)).filter(n=>{var r,i;return!(typeof n=="string"&&((i=(r=t.axis)==null?void 0:r.isCategorized)!=null&&i.call(r)))})}function Ma(t,e){const n=typeof e=="function"?e():e;return t.ticks?t.ticks(n):t.domain()}function ed(t,e){const[n,r]=t.domain(),i=+n,s=+r;if(e||!Number.isFinite(i)||!Number.isFinite(s)||s<=0)return Ma(t,e);const o=sa("_log").domain([i>0?i:1,s]).range(t.range());let l=o.ticks();for(let c=s.toFixed().length;l.length>15;c--)l=o.ticks(c);return l.length&&(l.splice(0,1,n),l.splice(l.length-1,1,r)),l}function Yi(t,e){const n=+t,r=+e;return Number.isFinite(n)&&Number.isFinite(r)?Math.abs(n-r)<1e-6:t===e}function Ky(t,e){const[n,r]=e,i=t.slice();return n!==void 0&&!i.some(s=>Yi(s,n))&&i.unshift(n),r!==void 0&&!i.some(s=>Yi(s,r))&&i.push(r),i}function nd(t,e){const n=Vr(t,e);return ro(n)}function Xl(t){var e,n,r,i,s,o,l,c;const{scale:u}=t,f=(n=(e=u.zoom)==null?void 0:e.domain)==null?void 0:n.call(e),d=((i=(r=u.subX)==null?void 0:r.domain)==null?void 0:i.call(r))||((o=(s=u.x)==null?void 0:s.orgDomain)==null?void 0:o.call(s))||((c=(l=u.x)==null?void 0:l.domain)==null?void 0:c.call(l));return!(f!=null&&f.length)||!(d!=null&&d.length)?!1:!Yi(f[0],d[0])||!Yi(f[1],d[1])}function Zn(t){return Xl(t)?t.scale.zoom:t.scale.x}function Zy(t,e,n=0){var r,i;const s=(i=(r=Zn(t)).domain)==null?void 0:i.call(r);if(!(s!=null&&s.length))return!0;const o=nd(t,e),l=+s[0],c=+s[1];return o===null||!Number.isFinite(l)||!Number.isFinite(c)?!0:o>=Math.min(l,c)-n&&o<=Math.max(l,c)+n}function Jy(t,e){const n=[e>0?Math.abs(t[e]-t[e-1]):1/0,e<t.length-1?Math.abs(t[e+1]-t[e]):1/0].filter(Number.isFinite),r=Math.min(...n);return Number.isFinite(r)?r/2:0}function rd(t,e){let n=0,r=t.length;for(;n<r;){const i=n+r>>1;t[i]<e?n=i+1:r=i}return n}function Qy(t,e){let n=0,r=t.length;for(;n<r;){const i=n+r>>1;t[i]<=e?n=i+1:r=i}return n}function _y(t,e){var n;const{axis:r,state:i}=t,s=[i.dataGeneration,(n=r==null?void 0:r.isTimeSeries)!=null&&n.call(r)?1:0,e.map(u=>`${u.id}:${u.values.length}`).join(",")].join("|"),o=i._canvasXDataTickCache;if((o==null?void 0:o.key)===s)return o;const l=t.mapTargetsToUniqueXs(e),c={key:s,values:l,comparable:l.map(u=>{var f;return(f=nd(t,u))!=null?f:NaN})};return i._canvasXDataTickCache=c,c}function qy(t,e){const{values:n,comparable:r}=e;if(!Xl(t))return n;const i=Jf(t);if(!i||r.length!==n.length||!Number.isFinite(r[0]))return n.filter(f=>Zy(t,f));const[s,o]=i;let l=rd(r,s),c=Qy(r,o);const u=f=>{const d=rd(r,f);let h=-1,m=1/0;for(const S of[d-1,d]){const E=r[S],C=Math.abs(E-f);C<m&&(m=C,h=S)}h>-1&&h<r.length&&m<=Jy(r,h)+1e-6&&(l=Math.min(l,h),c=Math.max(c,h+1))};return u(s),u(o),n.slice(Math.max(0,l),Math.min(n.length,c))}function t0(t,e){return typeof t=="function"?`fn:${e}`:Array.isArray(t)?t.map(n=>n instanceof Date?+n:String(n)).join(","):""}function e0(t,e){var n,r,i;const{config:s,state:o}=t,c=(((r=(n=Zn(t)).domain)==null?void 0:r.call(n))||[]).map(f=>f instanceof Date?+f:String(f)).join(","),u=s.axis_rotated?o.height:o.width;return[e?1:0,o.dataGeneration,c,u,s.axis_x_tick_fit?1:0,s.axis_x_tick_count||"",s.axis_x_tick_culling,s.axis_x_tick_culling_max||"",s.axis_x_tick_culling_reverse?1:0,((i=s.axis_x_categories)==null?void 0:i.length)||0,t0(s.axis_x_tick_values,o.redrawGeneration)].join("|")}function Wl(t,e,n,r=!1){var i;return(i=t.axis)!=null&&i.generateTickValues?t.axis.generateTickValues(e,n,r):e}function n0(t,e){const[n,r]=t,i=[];if(!e||!Number.isFinite(e))return i;for(let s=Math.round(n);s<=r;s+=e)i.push(s);return i}function so(t,e=!0){var n,r,i,s,o,l,c;const{axis:u,config:f}=t,d=Zn(t),h=((n=t.getTargetsToShow)==null?void 0:n.call(t))||t.filterTargetsToShow(),m=t.state._canvasXTickValuesCache||(t.state._canvasXTickValuesCache=new Map),S=e0(t,e),E=m.get(S);if(E)return E;const C=z=>(m.set(S,z),z);if(!(h!=null&&h.length))return C([]);const w=io(f.axis_x_tick_values,t.api);if(w){const z=Gl(t,w);return C(e?jl(t,z):z)}if(f.axis_x_tick_fit&&(h!=null&&h.length)&&t.mapTargetsToUniqueXs){const z=_y(t,h),B=qy(t,z),W=Wl(t,B,f.axis_x_tick_count,(r=u==null?void 0:u.isTimeSeries)==null?void 0:r.call(u));return C(e?jl(t,W,!0):W)}if(Xl(t)&&!((i=u==null?void 0:u.isCategorized)!=null&&i.call(u))){const z=((o=(s=t.zoom)==null?void 0:s.getDomain)==null?void 0:o.call(s))||d.domain(),B=Ky(Ma(d,f.axis_x_tick_count||Bt),z);return C(e?lo(B,Hl(t)):B)}if((l=u==null?void 0:u.isCategorized)!=null&&l.call(u)&&((c=f.axis_x_categories)!=null&&c.length)){const z=f.axis_x_categories.map((B,W)=>W);return C(e?lo(z,Hl(t)):z)}const $=Ma(d,f.axis_x_tick_count||Bt);return C(e?lo($,Hl(t)):$)}function r0(t){const{config:e,state:{height2:n,width2:r}}=t,i=e.axis_rotated?n:r,s=Nn(e,"x","count","subchart_axis_x"),o=Nn(e,"x","culling","subchart_axis_x"),l=Nn(e,"x","culling_max","subchart_axis_x");if(s)return s;if(o!==!1)return Math.min(l||Bt,Math.max(2,Math.floor(i/70)))}function ad(t,e=!0){var n,r,i,s;const{axis:o,config:l,scale:c}=t,u=c.subX,f=((n=t.getTargetsToShow)==null?void 0:n.call(t))||t.filterTargetsToShow(),d=Nn(l,"x","count","subchart_axis_x"),h=r0(t),m=(C,w=!1)=>e?jl(t,C,w,"subchart_axis_x",h):C;if(!u||!(f!=null&&f.length))return[];const S=io(Nn(l,"x","values","subchart_axis_x"),t.api);if(S)return m(Gl(t,S));if(l.axis_x_tick_fit&&t.mapTargetsToUniqueXs){const C=Wl(t,t.mapTargetsToUniqueXs(f),d,(r=o==null?void 0:o.isTimeSeries)==null?void 0:r.call(o));return m(C,!0)}if((i=o==null?void 0:o.isCategorized)!=null&&i.call(o)&&((s=l.axis_x_categories)!=null&&s.length))return m(l.axis_x_categories.map((C,w)=>w),!0);const E=Ma(u,d||Bt);return m(E,!0)}function id(t,e=Zn(t),n=t.config.axis_x_tick_outer){var r,i;const s=e,o=((r=s.orgDomain)==null?void 0:r.call(s))||((i=s.domain)==null?void 0:i.call(s));if(!(o!=null&&o.length))return[];const l=+o[0],c=+o[o.length-1];if(!Number.isFinite(l)||!Number.isFinite(c))return[];const u=Math.ceil(Math.min(l,c)),f=Math.floor(Math.max(l,c)),d=Array.from({length:Math.max(0,f-u+1)},(h,m)=>u+m);return n?d.slice(1,-1):d}function Vl(t,e,n=Zn(t)){var r,i,s,o,l;const c=n,u=Vr(t,e);if((i=(r=t.axis)==null?void 0:r.isCategorized)!=null&&i.call(r)){const f=(s=c.orgScale)==null?void 0:s.call(c);if(f)return f(u);const d=((l=(o=t.axis.x)==null?void 0:o.tickOffset)==null?void 0:l.call(o))||(c(1)-c(0))/2;return c(u)-d}return c(u)}function sd(t,e,n,r=Zn(t)){if(e.length<2)return!1;const i=Math.max(1,n)/2,s=e.map(l=>Vl(t,l,r)).filter(Number.isFinite).sort((l,c)=>l-c);if(s.length<2)return!1;let o=s[0]+i;for(let l=1;l<s.length;l++){const c=s[l]-i,u=s[l]+i;if(c<=o+Se)return!0;o=Math.max(o,u)}return!1}function oo(t,e,n=Zn(t)){const r=new Set;return e.filter(i=>{const s=Vl(t,i,n),o=Math.round(s);return!Number.isFinite(s)||r.has(o)?!1:(r.add(o),!0)})}function a0(t,e,n=1){var r;const{axis:i,config:s}=t;if((r=i==null?void 0:i.isCategorized)!=null&&r.call(i)){const l=id(t);return oo(t,l)}if(s.axis_x_tick_culling===!1||s.axis_x_tick_culling_lines===!1)return e;const o=so(t,!1);return sd(t,o,n)?e:oo(t,o)}function i0(t,e,n=1){var r;const{axis:i,config:s,scale:o}=t,l=o.subX,c=Nn(s,"x","culling","subchart_axis_x"),u=Nn(s,"x","culling_lines","subchart_axis_x"),f=Nn(s,"x","outer","subchart_axis_x");if(!l)return[];if((r=i==null?void 0:i.isCategorized)!=null&&r.call(i)){const h=id(t,l,f);return oo(t,h,l)}if(c===!1||u===!1)return e;const d=ad(t,!1);return sd(t,d,n,l)?e:oo(t,d,l)}function Ki(t,e="y",n,r=!0,i=t.scale[e],s=`axis_${e}`){var o,l,c;const{axis:u,config:f}=t,d=`axis_${e}`,h=io(Nn(f,e,"values",s),t.api),m=C=>r?c0(t,e,C,s):C;if(h)return m(td(t,h,e));const S=n0(i.domain(),f[`${d}_tick_stepSize`]);if(S.length)return m(S);const E=n!=null?n:Nn(f,e,"count",s);if((o=u==null?void 0:u.isTimeSeries)!=null&&o.call(u,e)&&f[`${d}_tick_time_value`])return m(Ma(i,f[`${d}_tick_time_value`]));if((l=u==null?void 0:u.isLog)!=null&&l.call(u,e))return m(ed(i,E));if(E){const C=i.domain();return m(Wl(t,C,C.every(w=>w===0)?1:E,(c=u==null?void 0:u.isTimeSeries)==null?void 0:c.call(u,e)))}return m(Ma(i,Bt))}function s0(t,e,n){const r=e==="x"?Zn(t):t.scale[e],i=r!=null&&r.copy?r.copy():r;return n.domain&&(i!=null&&i.domain)&&i.domain(n.domain),i}function o0(t,e,n,r){var i,s,o;const l=r.tick||{},c=io(l.values,t.api);return c?e==="x"?Gl(t,c):td(t,c,e):e!=="x"&&((s=(i=t.axis)==null?void 0:i.isLog)!=null&&s.call(i,e))?ed(n,l.count):Ma(n,(o=l.count)!=null?o:Bt)}function l0(t,e){var n;const r=(n=e.tick)==null?void 0:n.format;return typeof r=="function"?r.bind(t.api):(i=>i)}function lo(t,e){const n=t.length-1;if(e&&n>e){const r=t.length-1;return e<=1?[t[0]]:Array.from({length:e},(i,s)=>t[Math.round(s*r/(e-1))])}return t}function c0(t,e,n,r=`axis_${e}`){const{config:i}=t;if(!Nn(i,e,"culling",r))return n;const o=Nn(i,e,"culling_max",r)||Bt,l=Nn(i,e,"culling_reverse",r),c=n.slice().sort((h,m)=>{const S=+h,E=+m,C=Number.isFinite(S)&&Number.isFinite(E)?S-E:String(h).localeCompare(String(m));return l?-C:C}),u=c.length;let f=0;for(let h=1;h<u;h++)if(u/h<o){f=h;break}if(!f)return n;const d=new Set(c.filter((h,m)=>m%f===0));return n.filter(h=>d.has(h))}function jl(t,e,n=!1,r="axis_x",i){const{config:s}=t;if(Nn(s,"x","culling",r)===!1)return e;const l=i||Nn(s,"x","culling_max",r)||Bt,c=Nn(s,"x","culling_reverse",r),u=n?e:e.slice().sort((m,S)=>{const E=+m,C=+S;return Number.isFinite(E)&&Number.isFinite(C)?c?C-E:E-C:c?String(S).localeCompare(String(m)):String(m).localeCompare(String(S))}),f=u.length;let d=0;for(let m=1;m<f;m++)if(f/m<l){d=m;break}if(!d)return e;if(n)return e.filter((m,S)=>c?(f-1-S)%d===0:S%d===0);const h=new Set(u.filter((m,S)=>S%d===0));return e.filter(m=>h.has(m))}function Hl(t){const{config:e,state:{height:n,width:r}}=t,i=e.axis_rotated?n:r;if(e.axis_x_tick_count)return e.axis_x_tick_count;if(e.axis_x_tick_culling!==!1)return Math.min(e.axis_x_tick_culling_max||Bt,Math.max(2,Math.floor(i/70)))}function u0(t){var e,n;const{axis:r,config:i}=t,s=(n=(e=r==null?void 0:r.y)==null?void 0:e.getGeneratedTicks)==null?void 0:n.call(e,i.grid_y_ticks);return s!=null&&s.length?s:i.grid_y_ticks?lo(Ki(t,"y",void 0,!1),i.grid_y_ticks):Ki(t,"y",void 0,!1)}var f0=Object.defineProperty,d0=(t,e,n)=>e in t?f0(t,e,{enumerable:!0,configurable:!0,writable:!0,value:n}):t[e]=n,h0=(t,e,n)=>d0(t,typeof e!="symbol"?e+"":e,n);class od{constructor(e){h0(this,"ctx",e)}get context(){return this.ctx}withContext(e,n){const r=this.ctx;this.ctx=e;try{n()}finally{this.ctx=r}}withState(e){const{ctx:n}=this;n.save();try{e(n)}finally{n.restore()}}withTranslation(e,n,r){this.withState(i=>{i.translate(e,n),r(i)})}clipRect(e,n){this.withState(r=>{r.beginPath(),r.rect(e.x,e.y,e.w,e.h),r.clip(),n(r)})}measureText(e){return this.ctx.measureText(e)}traceLine(e,n,r,i){const{ctx:s}=this;s.moveTo(e,n),s.lineTo(r,i)}traceCrispLine(e,n,r,i,s){this.traceLine(this.crisp(e,s),this.crisp(n,s),this.crisp(r,s),this.crisp(i,s))}traceCircle(e,n,r){this.ctx.moveTo(e+r,n),this.ctx.arc(e,n,r,0,Math.PI*2)}strokePath(e,n){this.withStyle(n,r=>{r.beginPath(),e(r),r.stroke()})}fillPath(e,n){this.withStyle(n,r=>{r.beginPath(),e(r),r.fill()})}fillRect(e,n){this.withStyle(n,r=>{r.fillRect(e.x,e.y,e.w,e.h)})}fillRoundRect(e,n=0,r){const i=this.normalizeRect(e),s=this.getRectRadii(i,n);if(!s.tl&&!s.tr&&!s.br&&!s.bl){this.fillRect(i,r);return}this.fillPath(o=>{this.traceRoundRect(o,i,s)},r)}strokeRoundRect(e,n=0,r){const i=this.normalizeRect(e),s=this.getRectRadii(i,n);if(!s.tl&&!s.tr&&!s.br&&!s.bl){this.strokeRect(i,r);return}this.strokePath(o=>{this.traceRoundRect(o,i,s)},r)}strokeRect(e,n){this.withStyle(n,r=>{r.strokeRect(e.x,e.y,e.w,e.h)})}text(e,n,r,i){const s=(l,c,u)=>{(i==null?void 0:i.maxWidth)===void 0?l.fillText(e,c,u):l.fillText(e,c,u,i.maxWidth)},o=l=>{i!=null&&i.angle?(l.translate(n,r),l.rotate(i.angle*Math.PI/180),s(l,0,0)):s(l,n,r)};i!=null&&i.angle?this.withState(l=>{this.applyStyle(i),o(l)}):this.withStyle(i,o)}textLines(e,n,r,i){this.withState(s=>{const o=e.split(`
`),l=mr((i==null?void 0:i.font)||s.font),c=o.length>1?-((o.length-1)*l):0;this.applyStyle(i),s.translate(n,r),i!=null&&i.angle&&s.rotate(i.angle*Math.PI/180),o.forEach((u,f)=>{const d=c+f*l;(i==null?void 0:i.maxWidth)===void 0?s.fillText(u,0,d):s.fillText(u,0,d,i.maxWidth)})})}point(e,n,r,i,s){this.withStyle(s,o=>{const l=!(s!=null&&s.stroke)||s.fill!==void 0,c=(s==null?void 0:s.stroke)!==void 0;if(e==="rectangle"){const u=i*2,f={x:n-i,y:r-i,w:u,h:u};l&&o.fillRect(f.x,f.y,f.w,f.h),c&&o.strokeRect(f.x,f.y,f.w,f.h)}else o.beginPath(),o.arc(n,r,i,0,Math.PI*2),l&&o.fill(),c&&o.stroke()})}getRectRadii(e,n){const r=typeof n=="number"?{tl:n,tr:n,br:n,bl:n}:{tl:n.tl||0,tr:n.tr||0,br:n.br||0,bl:n.bl||0},i=Math.max(0,Math.min(Math.abs(e.w),Math.abs(e.h))/2);return{tl:Math.max(0,Math.min(r.tl,i)),tr:Math.max(0,Math.min(r.tr,i)),br:Math.max(0,Math.min(r.br,i)),bl:Math.max(0,Math.min(r.bl,i))}}traceRoundRect(e,n,r){const{x:i,y:s,w:o,h:l}=n,c=i+o,u=s+l;e.moveTo(i+r.tl,s),e.lineTo(c-r.tr,s),r.tr?e.quadraticCurveTo(c,s,c,s+r.tr):e.lineTo(c,s),e.lineTo(c,u-r.br),r.br?e.quadraticCurveTo(c,u,c-r.br,u):e.lineTo(c,u),e.lineTo(i+r.bl,u),r.bl?e.quadraticCurveTo(i,u,i,u-r.bl):e.lineTo(i,u),e.lineTo(i,s+r.tl),r.tl?e.quadraticCurveTo(i,s,i+r.tl,s):e.lineTo(i,s),e.closePath()}normalizeRect(e){const n=e.w<0?e.x+e.w:e.x,r=e.h<0?e.y+e.h:e.y;return{x:n,y:r,w:Math.abs(e.w),h:Math.abs(e.h)}}applyStyle(e){if(!e)return;const{ctx:n}=this;e.fill!==void 0&&(n.fillStyle=e.fill),e.stroke!==void 0&&(n.strokeStyle=e.stroke),e.lineWidth!==void 0&&(n.lineWidth=e.lineWidth),e.alpha!==void 0&&(n.globalAlpha=e.alpha),e.font!==void 0&&(n.font=e.font),e.textAlign!==void 0&&(n.textAlign=e.textAlign),e.textBaseline!==void 0&&(n.textBaseline=e.textBaseline),e.lineDash!==void 0&&n.setLineDash(e.lineDash)}withStyle(e,n){e?this.withState(r=>{this.applyStyle(e),n(r)}):n(this.ctx)}crisp(e,n){return n%2?Math.round(e)+.5:Math.round(e)}}var v0=Object.defineProperty,g0=Object.defineProperties,p0=Object.getOwnPropertyDescriptors,ld=Object.getOwnPropertySymbols,m0=Object.prototype.hasOwnProperty,x0=Object.prototype.propertyIsEnumerable,Yl=(t,e,n)=>e in t?v0(t,e,{enumerable:!0,configurable:!0,writable:!0,value:n}):t[e]=n,cd=(t,e)=>{for(var n in e||(e={}))m0.call(e,n)&&Yl(t,n,e[n]);if(ld)for(var n of ld(e))x0.call(e,n)&&Yl(t,n,e[n]);return t},ud=(t,e)=>g0(t,p0(e)),Kl=(t,e,n)=>Yl(t,typeof e!="symbol"?e+"":e,n);const fd=20,dd=15;function Zl(t){return t?-1:1}function y0(t,e){return t?e?-1:1:e?1:-1}function T0(t,e){var n,r,i;const s=e==="y2"?"subY2":"subY",o=(i=(r=(n=t.axis)==null?void 0:n[s])==null?void 0:r.tickFormat)==null?void 0:i.call(r),l=t.config[`subchart_axis_${e}_tick_format`]||t.config[`axis_${e}_tick_format`];return o||(typeof l=="function"?l.bind(t.api):(c=>c))}function b0(t){return t?{stroke:t.lineColor,lineWidth:t.lineWidth,lineDash:t.dashArray}:void 0}function S0(t){return t?{fill:t.labelColor,font:t.labelFont}:void 0}function Jl(t,e,n){return{x:t.left-fd,y:0,w:e+fd*2,h:n}}function Ql(t,e,n){return{x:0,y:t.top-dd,w:e,h:n+dd*2}}function A0(t,e){var n,r;const i=(r=(n=t.config.axis_tooltip)==null?void 0:n.backgroundColor)!=null?r:"black";return typeof i=="string"?i:(i==null?void 0:i[e])||null}function E0(t,e,n){var r,i;const s=t.scale[e];if(!(s!=null&&s.invert))return null;const o=s.invert(n);if(o==null)return null;if(e==="x"&&((i=(r=t.axis)==null?void 0:r.isTimeSeries)!=null&&i.call(r)))return t.format.xAxisTick(o);const l=Number(o);return Number.isFinite(l)?l.toFixed(2):`${o}`}function C0(t,e){const{config:n,state:{height:r,margin:i,width:s}}=t,o=n.axis_rotated,l={x:i.left,y:i.top};return e==="x"?!o&&(l.y+=r):e==="y"?o&&(l.y+=r):o?l.y-=1:l.x+=s,l}function I0(t,e,n,r){return r?{x:t.x+n,y:t.y-e}:{x:t.x+e,y:t.y+n}}function hd(t,e){const n=t?t(e):e;return n==null?"":String(n)}function Zi(t,e){return t[`${e}TickFont`]||t.labelFont}function _l(t,e){const n=t.measureText("0"),r=(n.fontBoundingBoxAscent||0)+(n.fontBoundingBoxDescent||0),i=(n.actualBoundingBoxAscent||0)+(n.actualBoundingBoxDescent||0),s=(e||10)*(11.5/10);return Math.max(e,r,i,s)}function R0(t){return 11.5-2.5*(t/15)*(t>0?1:-1)}function w0(t){return 8*Math.sin(Math.PI*(t/180))}function ql(t,e){if(typeof t=="number")return t;if(typeof t=="string"){const n=parseFloat(t);return Number.isFinite(n)?/em$/.test(t.trim())?n*e:n:0}return 0}function O0(t,e,n){if(!e)return[t];const r=n.measureText("0").width||5.5;function i(s,o){let l;for(let c=1;c<o.length;c++)if(o.charAt(c)===" "&&(l=c),e<r*(c+1)){const u=l||c;return i(s.concat(o.slice(0,u)),o.slice(l?l+1:c))}return s.concat(o)}return i([],t)}function tc(t,e,n,r){var i,s;const o=t.config.axis_x_tick_width;if(o&&o>0)return o;if(n)return 95;if((s=(i=t.axis)==null?void 0:i.isCategorized)!=null&&s.call(i)&&e.length>1){const l=r(Vr(t,e[0])),c=r(Vr(t,e[1]));return Math.max(0,Math.abs(c-l)-12)}return 110}function vd(t,e,n,r,i=[],s=!1,o=Zn(t),l){const c=n?n(r):r;if(c==null)return[""];if(Array.isArray(c))return c.map(f=>String(f));const u=String(c);return u.indexOf(`
`)>-1?u.split(`
`):t.config.axis_x_tick_multiline?O0(u,l!=null?l:tc(t,i,s,o),e):[u]}function ec(t,e){const{isRotated:n,tickCount:r,tickIndex:i,tickRotate:s,tickTextDirection:o}=e,l=t.config.axis_x_tick_text_inner;let c=n?o>0?"left":"right":s?s>0?"left":"right":"center";return!n&&i===0&&(l===!0||l!=null&&l.first)?c="left":!n&&i===r-1&&(l===!0||l!=null&&l.last)&&(c="right"),c}function P0(t,e){var n,r;return((n=t==null?void 0:t.indexOf("center"))!=null?n:-1)>-1?{x:e/2,align:"center"}:((r=t==null?void 0:t.indexOf("right"))!=null?r:-1)>-1?{x:e,align:"right"}:{x:0,align:"left"}}function ua(t){return Number.isFinite(t)}function co(t,e,n){return ua(t)&&t>=Math.min(e,n)&&t<=Math.max(e,n)}function gd(t){return t?-1:1}function M0(t,e,n){return e?n?t.axis_y2_inner?1:-1:t.axis_y_inner?-1:1:n?t.axis_y2_inner?-1:1:t.axis_y_inner?1:-1}function nc(t,e,n=Zn(t)){return n(Vr(t,e))}function L0(t,e){var n,r;return(r=(n=t.axis)==null?void 0:n.isCategorized)!=null&&r.call(n)&&typeof e=="string"&&Number.isNaN(Number(e))?t.config.axis_x_categories.indexOf(e):Vr(t,e)}function D0(t,e){var n,r;return!!((r=(n=t.axis)==null?void 0:n.isCategorized)!=null&&r.call(n)&&Number.isNaN(Number(e)))}function pd(t,e,n,r){var i,s;if(e===void 0)return n;let o=Zn(t)(L0(t,e));if(D0(t,e)){const l=Zn(t),c=((s=(i=t.axis.x)==null?void 0:i.tickOffset)==null?void 0:s.call(i))||(l(1)-l(0))/2;o+=c*(r==="start"?-1:1)}return o}function md(t,e,n="y"){return t.scale[n||"y"](Hi(t,e,n))}function xd(t,e,n){return t==="start"?e+4:t==="middle"?(e+n)/2:n-4}function yd(t,e,n){return t==="start"?n-4:t==="middle"?(e+n)/2:e+4}function F0(t,e){const{config:n,scale:r,state:{width:i,height:s}}=t,o=e.axis||"x",l=n.axis_rotated;if(o==="x"){const h=pd(t,e.start,0,"start"),m=pd(t,e.end,l?s:i,"end"),S=Math.min(h,m),E=Math.abs(m-h);return l?{x:0,y:S,w:i,h:E}:{x:S,y:0,w:E,h:s}}if(!r[o])return null;const c=e.start===void 0?l?0:s:md(t,e.start,o),u=e.end===void 0?l?i:0:md(t,e.end,o),f=Math.min(c,u),d=Math.abs(u-c);return l?{x:f,y:0,w:d,h:s}:{x:0,y:f,w:i,h:d}}class N0{constructor(e,n){Kl(this,"engine",e),Kl(this,"theme",n),Kl(this,"painter"),this.painter=new od(e.ctx)}get ctx(){return this.painter.context}withContext(e,n){this.painter.withContext(e,n)}draw(e){this.drawRegions(e),this.drawGrid(e),this.drawAxis(e)}drawAxis(e){const{config:n}=e;n.axis_x_show&&this.drawXAxis(e),n.axis_y_show&&this.drawYAxis(e),n.axis_y2_show&&e.scale.y2&&this.drawYAxis(e,"y2"),this.drawAdditionalAxes(e),this.drawAxisLabels(e)}drawSubXAxis(e){var n,r,i,s;const{ctx:o,painter:l,theme:{style:{axis:c}}}=this,{config:u,format:f,scale:d,state:{current:h,margin2:m,width2:S,height2:E}}=e;if(!u.subchart_show||!u.subchart_axis_x_show||!d.subX||S<=0||E<=0)return;const C=u.axis_rotated,w=l.crisp(m.left,c.lineWidth),$=l.crisp(m.top+E,c.lineWidth),z=m.left,B=m.left+S,W=m.top,H=m.top+E,_=C?W:z,q=C?H:B,st=ad(e),it=i0(e,st,c.tickWidth),ot=(n=u.subchart_axis_x_tick_outer)!=null?n:u.axis_x_tick_outer,ct=C?u.axis_x_tick_inner?1:-1:u.axis_x_tick_inner?-1:1,gt=gd(C),tt=Zl(C),ft=u.axis_x_tick_text_position,lt=C?0:((r=e.getAxisTickRotate)==null?void 0:r.call(e,"x"))||0,bt=f.subXAxisTick||((s=(i=e.axis)==null?void 0:i.getXAxisTickFormat)==null?void 0:s.call(i,!0));l.clipRect(C?Ql(m,h.width,E):ud(cd({},Jl(m,S,h.height-m.top)),{y:m.top}),()=>{o.globalAlpha=1,o.strokeStyle=c.lineColor,o.lineWidth=c.lineWidth,o.setLineDash([]),l.strokePath(()=>{C?l.traceLine(w,W,w,H):l.traceLine(z,$,B,$),ot&&(C?(l.traceLine(w,W,w+xt*gt,W),l.traceLine(w,H,w+xt*gt,H)):(l.traceLine(z,$,z,$+xt*gt),l.traceLine(B,$,B,$+xt*gt)))});const St=Zi(c,"x");o.font=St,o.fillStyle=c.labelColor,o.textAlign=C?tt>0?"left":"right":"center",o.textBaseline=C?"middle":tt>0?"top":"bottom",o.strokeStyle=c.tickColor,o.lineWidth=c.tickWidth;const Mt=_l(l,mr(St)),Ot=tc(e,st,C,d.subX);if(u.subchart_axis_x_tick_show)for(const Kt of it){const ee=d.subX(Vr(e,Kt)),Ae=m.left+ee,Ee=m.top+ee;co(C?Ee:Ae,_,q)&&l.strokePath(()=>{C?l.traceLine(w,Ee,w+xt*ct,Ee):l.traceLine(Ae,$,Ae,$+xt*ct)})}for(const Kt of st){const ee=d.subX(Vr(e,Kt)),Ae=m.left+ee,Ee=m.top+ee;if(!co(C?Ee:Ae,_,q)||!u.subchart_axis_x_tick_text_show)continue;const De=vd(e,l,bt,Kt,st,C,d.subX,Ot);let me,Pe;C?(me=w+(xt+mt)*tt+(ft.x||0),Pe=Ee+(ft.y||0),o.textAlign=tt>0?"left":"right",o.textBaseline="middle"):(me=Ae+(ft.x||0),Pe=$+(xt+mt)*tt+(ft.y||0),o.textAlign=lt?lt>0?"left":"right":"center",o.textBaseline=tt>0?"top":"bottom"),l.withState(Zt=>{Zt.translate(me,Pe),lt&&Zt.rotate(lt*Math.PI/180),De.forEach((he,ge)=>{Zt.fillText(he,0,ge*Mt)})})}})}drawSubYAxes(e){const{config:n,scale:r,state:{margin2:i,width2:s,height2:o}}=e;!n.subchart_show||s<=0||o<=0||["y","y2"].forEach(l=>{var c;const u=l==="y2"?r.subY2:r.subY;!n[`subchart_axis_${l}_show`]||!u||this.drawYAxis(e,l,{scale:u,ticks:Ki(e,l,void 0,!0,u,`subchart_axis_${l}`),format:T0(e,l),index:0,outerTick:(c=n[`subchart_axis_${l}_tick_outer`])!=null?c:n[`axis_${l}_tick_outer`],margin:i,width:s,height:o,prefix:`subchart_axis_${l}`,tickShow:n[`subchart_axis_${l}_tick_show`],tickTextShow:n[`subchart_axis_${l}_tick_text_show`],tickTextPosition:n[`axis_${l}_tick_text_position`]})})}drawTitle(e){var n,r;const{ctx:i,painter:s,theme:{style:{title:o}}}=this,{config:l,state:{current:c}}=e;if(!l.title_text)return;const u=String(l.title_text).split(`
`),f=mr(o.font),d=f*1.5,{x:h,align:m}=P0(l.title_position,c.width),S=(r=(n=e.getCanvasTitleHeight)==null?void 0:n.call(e))!=null?r:f,E=(l.title_padding.top||0)+S;s.withState(()=>{i.font=o.font,i.fillStyle=o.color,i.textAlign=m,i.textBaseline="alphabetic",u.forEach((C,w)=>{i.fillText(C,h,E+(w?f+(w-1)*d:0))})})}drawAxisLabels(e){const{ctx:n,painter:r,theme:{style:{axis:i}}}=this,{axis:s,config:o}=e,l=mr(i.labelFont),c=["x","y","y2"],u={x:i.xLabelColor,y:i.yLabelColor,y2:i.y2LabelColor},f={start:"left",middle:"center",end:"right"};s&&r.withState(()=>{n.font=i.labelFont,n.textBaseline="alphabetic",c.forEach(d=>{const h=s.getLabelText(d);if(!h||!o[`axis_${d}_show`]||d==="y2"&&!e.scale.y2)return;const m=d==="x"&&o.axis_rotated||d!=="x"&&!o.axis_rotated,S=C0(e,d),E=s.xForAxisLabel(d)+ql(s.dxForAxisLabel(d),l),C=ql(s.dyForAxisLabel(d),l),{x:w,y:$}=I0(S,E,C,m),z=s.textAnchorForAxisLabel(d);n.fillStyle=u[d]||i.labelColor,n.textAlign=f[z]||"center",r.text(String(h),w,$,{angle:m?-90:0})})})}drawGrid(e){const{ctx:n,painter:r,theme:{style:{grid:i}}}=this,{config:s,scale:o,state:{height:l,margin:c,width:u}}=e;if(!i.lineColor)return;const f=s.axis_rotated,d=c.left,h=c.left+u,m=c.top,S=c.top+l;r.withState(()=>{n.strokeStyle=i.lineColor,n.lineWidth=i.lineWidth,i.dashArray.length&&n.setLineDash(i.dashArray),s.grid_x_show&&o.x&&r.strokePath(()=>{for(const E of so(e)){const C=nc(e,E);ua(C)&&(f?r.traceCrispLine(d,c.top+C,h,c.top+C,i.lineWidth):r.traceCrispLine(c.left+C,m,c.left+C,S,i.lineWidth))}}),s.grid_y_show&&o.y&&r.strokePath(()=>{for(const E of u0(e)){const C=Hi(e,E),w=o.y(C);ua(w)&&(f?r.traceCrispLine(c.left+w,m,c.left+w,S,i.lineWidth):r.traceCrispLine(d,c.top+w,h,c.top+w,i.lineWidth))}}),!s.grid_lines_front&&this.drawGridLines(e)})}drawRegions(e){const{ctx:n,painter:r,theme:{style:{region:i}}}=this,{config:s,state:{height:o,margin:l,width:c}}=e,u=s.regions||[];u.length&&r.clipRect({x:l.left,y:l.top,w:c,h:o},()=>{var f;n.fillStyle=i.fill,n.font=i.labelFont,n.textBaseline="top";for(const d of u){const h=F0(e,d);if(!h||!ua(h.x)||!ua(h.y)||!h.w||!h.h)continue;const m=l.left+h.x,S=l.top+h.y,E=h.w,C=h.h;if(n.globalAlpha=Number.isFinite(d.opacity)?d.opacity:i.opacity,r.fillRect({x:m,y:S,w:E,h:C}),(f=d.label)!=null&&f.text){const w=d.label,$=w.center||"",z=String(w.text),B=r.measureText(z).width,W=parseFloat(n.font)||12;let H=m+(w.x||0),_=S+(w.y||0);$.indexOf("x")>-1&&(H+=(E-B)/2),$.indexOf("y")>-1&&(_+=(C-W)/2),r.text(z,H,_,{angle:w.rotated?-90:0,alpha:1,fill:w.color||i.labelColor})}}})}drawGridLines(e){const{ctx:n,painter:r,theme:{style:{axis:i,grid:s}}}=this,{config:o,scale:l,state:{height:c,margin:u,width:f}}=e,d=o.axis_rotated,h=u.left,m=u.left+f,S=u.top,E=u.top+c;s.lineColor&&r.withState(()=>{n.strokeStyle=s.lineColor,n.lineWidth=s.lineWidth,n.font=s.labelFont||i.labelFont,n.fillStyle=s.labelColor,n.textBaseline="middle",n.setLineDash([]);const C=(W,H,_,q=!1,st)=>{W&&r.text(W,H,_,ud(cd({},st),{angle:q?-90:0}))},w=(W,H,_)=>{const q=b0(this.theme.getGridLineStyle(H,W,"line"));r.strokePath(_,q)},$=(W,H)=>S0(this.theme.getGridLineStyle(W,H,"text")),z=W=>{if(W.value===void 0||!l.x)return;const H=nc(e,W.value);if(ua(H))if(d){const _=u.top+H;w(W,"x",()=>{r.traceLine(h,_,m,_)}),n.textAlign=W.position==="start"?"left":W.position==="middle"?"center":"right",C(W.text,xd(W.position,h,m),_-5,!1,$("x",W))}else{const _=u.left+H;w(W,"x",()=>{r.traceLine(_,S,_,E)}),n.textAlign=W.position==="start"?"left":W.position==="middle"?"center":"right",C(W.text,_-5,yd(W.position,S,E),!0,$("x",W))}},B=W=>{const H=W.axis==="y2"?l.y2:l.y,_=W.axis==="y2"?"y2":"y";if(W.value===void 0||!H)return;const q=Hi(e,W.value,_),st=H(q);if(ua(st))if(d){const it=u.left+st;w(W,"y",()=>{r.traceLine(it,S,it,E)}),n.textAlign=W.position==="start"?"left":W.position==="middle"?"center":"right",C(W.text,it-5,yd(W.position,S,E),!0,$("y",W))}else{const it=u.top+st;w(W,"y",()=>{r.traceLine(h,it,m,it)}),n.textAlign=W.position==="start"?"left":W.position==="middle"?"center":"right",C(W.text,xd(W.position,h,m),it-5,!1,$("y",W))}};(o.grid_x_lines||[]).forEach(z),(o.grid_y_lines||[]).forEach(B)})}drawAdditionalAxes(e){["x","y","y2"].forEach(n=>{const r=e.config[`axis_${n}_axes`]||[];!r.length||!e.scale[n]||!e.config[`axis_${n}_show`]||r.forEach((i,s)=>{var o;const l=s0(e,n,i);if(!l)return;const c={scale:l,ticks:o0(e,n,l,i),format:l0(e,i),index:s+1,outerTick:((o=i.tick)==null?void 0:o.outer)!==!1};n==="x"?this.drawXAxis(e,c):this.drawYAxis(e,n,c)})})}drawXAxis(e,n){var r;const{ctx:i,painter:s,theme:{style:{axis:o}}}=this,{axis:l,config:c,state:{current:u,margin:f,width:d,height:h}}=e,m=c.axis_rotated,S=n!=null&&n.index?e.getAxisSize("x")*n.index:0,E=(n==null?void 0:n.scale)||Zn(e),C=s.crisp(f.left-(m?S:0),o.lineWidth),w=s.crisp(f.top+h+(m?0:S),o.lineWidth),$=f.left,z=f.left+d,B=f.top,W=f.top+h,H=m?B:$,_=m?W:z,q=(n==null?void 0:n.ticks)||so(e),st=(n==null?void 0:n.ticks)||a0(e,q,o.tickWidth),it=(n==null?void 0:n.format)||l.getXAxisTickFormat(),ot=n?n.outerTick:c.axis_x_tick_outer,ct=m?c.axis_x_tick_inner?1:-1:c.axis_x_tick_inner?-1:1,gt=gd(m),tt=Zl(m),ft=c.axis_x_tick_text_position,lt=m?0:((r=e.getAxisTickRotate)==null?void 0:r.call(e,"x"))||0;s.clipRect(m?Ql(f,u.width,h):Jl(f,d,u.height),()=>{if(i.strokeStyle=o.lineColor,i.lineWidth=o.lineWidth,s.strokePath(()=>{m?s.traceLine(C,B,C,W):s.traceLine($,w,z,w),ot&&(m?(s.traceLine(C,B,C+xt*gt,B),s.traceLine(C,W,C+xt*gt,W)):(s.traceLine($,w,$,w+xt*gt),s.traceLine(z,w,z,w+xt*gt)))}),i.font=Zi(o,"x"),i.fillStyle=o.labelColor,i.textAlign=m?tt>0?"left":"right":"center",i.textBaseline=m?"middle":tt>0?"top":"bottom",i.strokeStyle=o.tickColor,i.lineWidth=o.tickWidth,c.axis_x_tick_show&&s.strokePath(()=>{for(const Ot of st){const Kt=Vl(e,Ot,E),ee=f.left+Kt,Ae=f.top+Kt;co(m?Ae:ee,H,_)&&(m?s.traceLine(C,Ae,C+xt*ct,Ae):s.traceLine(ee,w,ee,w+xt*ct))}}),!n&&!c.axis_x_tick_text_show)return;const bt=Zi(o,"x"),St=_l(s,mr(bt)),Mt=tc(e,q,m,E);q.forEach((Ot,Kt)=>{this.drawXAxisTickText(e,Ot,it,o.labelColor,{isRotated:m,rangeEnd:_,rangeStart:H,tickCount:q.length,tickFont:bt,tickIndex:Kt,tickLineHeight:St,tickTextDirection:tt,tickTextWidth:Mt,tickRotate:lt,tickTextPosition:ft,targetScale:E,ticks:q,x:C,y:w})})})}drawFocusedXAxisTick(e,n){var r;const{painter:i,theme:{style:{axis:s}}}=this,{axis:o,config:l,state:{current:c,margin:u,width:f,height:d}}=e,h=(r=n==null?void 0:n[0])==null?void 0:r.x;if(h===void 0||!o||!l.axis_x_show||!l.axis_x_tick_text_show||!s.activeLabelColor||s.activeLabelColor===s.labelColor)return;const m=so(e),S=m.findIndex(_=>Yi(_,h)),E=m[S];if(E===void 0)return;const C=l.axis_rotated,w=i.crisp(u.left,s.lineWidth),$=i.crisp(u.top+d,s.lineWidth),z=C?u.top:u.left,B=C?u.top+d:u.left+f,W=o.getXAxisTickFormat(),H=Zl(C);i.clipRect(C?Ql(u,c.width,d):Jl(u,f,c.height),()=>{var _;this.drawXAxisTickText(e,E,W,s.activeLabelColor,{isRotated:C,rangeEnd:B,rangeStart:z,targetScale:Zn(e),tickCount:m.length,tickIndex:S,tickTextDirection:H,tickRotate:C?0:((_=e.getAxisTickRotate)==null?void 0:_.call(e,"x"))||0,tickTextPosition:l.axis_x_tick_text_position,ticks:m,x:w,y:$})})}drawAxisTooltip(e,n){const{ctx:r,painter:i,theme:{style:{axis:s,grid:o}}}=this,{config:l,state:{margin:c,width:u,height:f}}=e;if(!l.axis_tooltip||!n)return;const d=l.axis_rotated,h=n[0]-c.left,m=n[1]-c.top,S=h>=0&&h<=u,E=m>=0&&m<=f;if(!S&&!E)return;const C=c.left+h,w=c.top+m,$=mr(s.labelFont),z=$||10,B=(W,H,_,q,st)=>{const it=A0(e,W),ot=it&&E0(e,W,H);if(!ot)return;r.font=s.labelFont,r.textAlign=st,r.textBaseline="alphabetic";const ct=r.measureText(ot),gt=ct.width,tt=ct.actualBoundingBoxAscent||z*.8,ft=ct.actualBoundingBoxDescent||z*.2,lt=Math.max(2,gt*.15),bt=Math.max(3,z*.25),St=st==="right"?_-gt:st==="center"?_-gt/2:_,Mt=q-tt;r.fillStyle=it,r.fillRect(St-lt,Mt-bt,gt+lt*2,tt+ft+bt*2),r.fillStyle="#fff",r.fillText(ot,_,q)};i.withState(()=>{r.strokeStyle=o.lineColor,r.lineWidth=o.lineWidth,r.setLineDash([]),i.strokePath(()=>{S&&i.traceLine(C,c.top,C,c.top+f),E&&i.traceLine(c.left,w,c.left+u,w)}),r.setLineDash([]),d?(E&&l.axis_x_show&&B("x",m,c.left-$*.3,w+$*.4,"right"),S&&l.axis_y_show&&B("y",h,C-$*1.3,c.top+f+$*1.15,"left"),S&&l.axis_y2_show&&e.scale.y2&&B("y2",h,C-$*1.3,c.top-$*.4,"left")):(S&&l.axis_x_show&&B("x",h,C-$,c.top+f+$*1.15,"left"),E&&l.axis_y_show&&B("y",m,c.left-$*.4,w+$*.3,"right"),E&&l.axis_y2_show&&e.scale.y2&&B("y2",m,c.left+u+$*.4,w+$*.3,"left"))})}drawXAxisTickText(e,n,r,i,s){var o,l;const{ctx:c,painter:u,theme:{style:{axis:f}}}=this,{state:{margin:d}}=e,{isRotated:h,rangeEnd:m,rangeStart:S,tickTextDirection:E,tickRotate:C,tickTextPosition:w,targetScale:$,ticks:z,x:B,y:W}=s,H=nc(e,n,$),_=d.left+H,q=d.top+H;if(!co(h?q:_,S,m))return;const it=(o=s.tickFont)!=null?o:Zi(f,"x");c.font=it,c.fillStyle=i;const ot=vd(e,u,r,n,z,h,$,s.tickTextWidth),ct=(l=s.tickLineHeight)!=null?l:_l(u,mr(it));let gt,tt;if(h)gt=B+(xt+mt)*E+(w.x||0),tt=q+(w.y||0),c.textAlign=ec(e,s),c.textBaseline="middle";else if(C){const ft=mr(it),lt=w.y?ql(w.y,ft):.71*ft,bt=w0(C)+(w.x||0),St=R0(C)+lt;c.textAlign=ec(e,s),c.textBaseline="alphabetic",u.withState(Mt=>{Mt.translate(_,W),Mt.rotate(C*Math.PI/180),ot.forEach((Ot,Kt)=>{Mt.fillText(Ot,bt,St+Kt*ct)})});return}else gt=_+(w.x||0),tt=W+(xt+mt)*E+(w.y||0),c.textAlign=ec(e,s),c.textBaseline=E>0?"top":"bottom";u.withState(ft=>{ft.translate(gt,tt),C&&ft.rotate(C*Math.PI/180),ot.forEach((lt,bt)=>{ft.fillText(lt,0,bt*ct)})})}drawYAxis(e,n="y",r){var i,s,o,l,c,u,f,d;const{ctx:h,painter:m,theme:{style:{axis:S}}}=this,{config:E,scale:C,state:w}=e,{margin:$,width:z,height:B}=w,W=(r==null?void 0:r.margin)||$,H=(i=r==null?void 0:r.width)!=null?i:z,_=(s=r==null?void 0:r.height)!=null?s:B,q=(r==null?void 0:r.prefix)||`axis_${n}`,st=(r==null?void 0:r.scale)||C[n],it=n==="y2",ot=E.axis_rotated,ct=r!=null&&r.index?e.getAxisSize(n)*r.index:0,gt=m.crisp(W.left+(it?H+(ot?0:ct):-ct),S.lineWidth),tt=m.crisp(W.top+(ot?it?-ct-1:_+ct:0),S.lineWidth),ft=W.left,lt=W.left+H,bt=W.top,St=W.top+_,Mt=(r==null?void 0:r.ticks)||Ki(e,n),Ot=(r==null?void 0:r.ticks)||(E[`${q}_tick_culling`]&&E[`${q}_tick_culling_lines`]!==!1?Ki(e,n,void 0,!1):Mt),Kt=(r==null?void 0:r.format)||((c=(l=(o=e.axis)==null?void 0:o[n])==null?void 0:l.tickFormat)==null?void 0:c.call(l))||((u=E[`${q}_tick_format`])==null?void 0:u.bind(e.api))||(Zt=>Zt),ee=r?r.outerTick:E[`${q}_tick_outer`],Ae=ot?it?E.axis_y2_tick_inner?1:-1:E.axis_y_tick_inner?-1:1:it?E.axis_y2_tick_inner?-1:1:E.axis_y_tick_inner?1:-1,Ee=M0(E,ot,it),Te=y0(ot,it),De=(r==null?void 0:r.tickTextPosition)||E[`${q}_tick_text_position`]||E[`axis_${n}_tick_text_position`],me=(f=r==null?void 0:r.tickShow)!=null?f:r?!0:E[`${q}_tick_show`],Pe=(d=r==null?void 0:r.tickTextShow)!=null?d:r?!0:E[`${q}_tick_text_show`];m.withState(()=>{h.strokeStyle=S.lineColor,h.lineWidth=S.lineWidth,m.strokePath(()=>{ot?m.traceLine(ft,tt,lt,tt):m.traceLine(gt,bt,gt,St),ee&&(ot?(m.traceLine(ft,tt,ft,tt+xt*Ee),m.traceLine(lt,tt,lt,tt+xt*Ee)):(m.traceLine(gt,bt,gt+xt*Ee,bt),m.traceLine(gt,St,gt+xt*Ee,St)))});const Zt=Zi(S,n);h.font=Zt,h.fillStyle=S.labelColor,h.textAlign=ot?"center":Te>0?"left":"right",h.textBaseline=ot?Te>0?"top":"bottom":"middle",h.strokeStyle=S.tickColor,h.lineWidth=S.tickWidth;const he=[],ge=[],Wt=(We,Xe)=>{const pn=Hi(e,We,n),Cn=W.left+st(pn),be=W.top+st(pn);ua(ot?Cn:be)&&Xe.push({tick:We,tx:Cn,ty:be})};for(const We of Mt)Wt(We,he);for(const We of Ot)Wt(We,ge);if(me&&m.strokePath(()=>{for(const{tx:We,ty:Xe}of ge)ot?m.traceLine(We,tt,We,tt+xt*Ae):m.traceLine(gt,Xe,gt+xt*Ae,Xe)}),Pe)for(const{tick:We,tx:Xe,ty:pn}of he)ot?m.text(hd(Kt,We),Xe+(De.x||0),tt+xt*Te+(De.y||0)):m.text(hd(Kt,We),gt+(xt+mt)*Te+(De.x||0),pn+(De.y||0))})}}const cr={canvas:"bb-canvas",overlay:"bb-canvas-overlay",legend:"bb-canvas-legend",legendBottom:"bb-canvas-legend-bottom",legendInset:"bb-canvas-legend-inset",legendItemInteractive:"bb-legend-item-interactive",legendItemTileCircle:"bb-legend-item-tile-circle",legendItemTitle:"bb-legend-item-title",legendRight:"bb-canvas-legend-right"};var Aw=cr,$0=Object.defineProperty,B0=(t,e,n)=>e in t?$0(t,e,{enumerable:!0,configurable:!0,writable:!0,value:n}):t[e]=n,ri=(t,e,n)=>B0(t,typeof e!="symbol"?e+"":e,n);class z0{constructor(){ri(this,"canvas"),ri(this,"ctx"),ri(this,"dpr",1),ri(this,"frame",null),ri(this,"frameCtx",null),ri(this,"frameValid",!1)}init(e,n,r){this.canvas=Ye.createElement("canvas"),this.canvas.className=cr.canvas,this.canvas.style.display="block",e.appendChild(this.canvas),this.dpr=se.devicePixelRatio||1,this.ctx=this.canvas.getContext("2d"),this.resize(n,r)}resize(e,n){const r=Math.max(0,e),i=Math.max(0,n);this.dpr=se.devicePixelRatio||1,this.canvas.width=r*this.dpr,this.canvas.height=i*this.dpr,this.canvas.style.width=`${r}px`,this.canvas.style.height=`${i}px`,this.ctx.setTransform(this.dpr,0,0,this.dpr,0,0),this.frame=null,this.frameCtx=null,this.frameValid=!1}clearOverlay(){this.frameValid&&this.restoreFrame()}withOverlay(e){const{ctx:n}=this;this.frameValid?this.clearOverlay():this.captureFrame(),n.save(),n.setTransform(this.dpr,0,0,this.dpr,0,0);try{e(n)}finally{n.restore()}}beginFrame(e,n){const{ctx:r}=this;this.frameValid=!1,r.save(),r.setTransform(this.dpr,0,0,this.dpr,0,0),r.clearRect(0,0,e,n)}endFrame(){this.ctx.restore()}captureFrame(){const{canvas:e}=this;if(this.frameValid=!1,e.width&&e.height){let{frame:n,frameCtx:r}=this;if(!n){const i=Ye.createElement("canvas");n=i,r=i.getContext("2d"),this.frame=n,this.frameCtx=r}if(!n||!r)return;r.setTransform(1,0,0,1,0,0),n.width!==e.width||n.height!==e.height?(n.width=e.width,n.height=e.height):r.clearRect(0,0,e.width,e.height),r.drawImage(e,0,0),this.frameValid=!0}}restoreFrame(){if(!this.frameValid||!this.frame||!this.frameCtx)return;const{canvas:e,ctx:n}=this;n.save(),n.setTransform(1,0,0,1,0,0),n.clearRect(0,0,e.width,e.height),n.drawImage(this.frame,0,0),n.restore(),n.setTransform(this.dpr,0,0,this.dpr,0,0)}destroy(){var e;(e=this.canvas)==null||e.remove(),this.frame=null,this.frameCtx=null,this.frameValid=!1}}function rc(t){const{config:e,state:n}=t;return!!(e.subchart_grid_focus_continuous&&e.subchart_grid_focus!==!1&&e.subchart_show&&e.subchart_brush_enabled===!1&&n.width2>0&&n.height2>0)}function Td(t,e){var n;const{config:r,scale:i,state:s}=t,o=i.zoom||i.x,l=i.subX;if(!o||!l)return null;const c=r.axis_rotated?s.height2:s.width2,u=r.axis_rotated?s.height:s.width,f=(n=l.invert)==null?void 0:n.call(l,e);let d=f==null?NaN:o(f);return!Number.isFinite(d)&&c>0&&(d=Math.max(0,Math.min(1,e/c))*u),Number.isFinite(d)?Math.max(0,Math.min(u,d)):null}const ac=/[-+]?(?:\d+\.?\d*|\.?\d+)(?:[eE][-+]?\d+)?/g,bd=/([aAcChHlLmMqQsStTvVzZ])|([-+]?(?:\d+\.?\d*|\.?\d+)(?:[eE][-+]?\d+)?)/g;function U0(t){const e=new Set;let n=-1,r=0,i=!1,s;for(bd.lastIndex=0;s=bd.exec(t);)if(s[1])i=s[1]==="a"||s[1]==="A",r=0;else if(n++,i){const o=r%7;(o===2||o===3||o===4)&&e.add(n),r++}return e}function k0(t,e){const n=U0(e),r=[],i=[];let s=0,o=-1,l=-1,c,u;const f=m=>{r[o]?r[o]+=m:r[++o]=m};ac.lastIndex=0;const d=ac,h=new RegExp(ac.source,"g");for(t+="",e+="";(c=d.exec(t))&&(u=h.exec(e));){if(l++,u.index>s&&f(e.slice(s,u.index)),c[0]===u[0])f(u[0]);else{const m=+c[0],S=+u[0],E=n.has(l);r[++o]=null,i.push({index:o,fn:E?C=>Math.round(m+(S-m)*C):C=>m+(S-m)*C})}s=h.lastIndex}if(s<e.length&&f(e.slice(s)),!i.length){const m=r.join("");return()=>m}return m=>{for(let S=0,E=i.length;S<E;S++){const{index:C,fn:w}=i[S];r[C]=String(w(m))}return r.join("")}}function uo(t){const{bar_radius:e,bar_radius_ratio:n}=t.config;return ae(e)&&e>0?()=>e:ae(n)?r=>r*n:null}function ic(t){const{config:e,data:n}=t,r=new Set;if(!e.data_groups.length)return r;const i=t.orderTargets(t.filterTargetsToShow(n.targets.filter(t.isBarType,t)));for(const s of e.data_groups){const o=new Set(s),l=new Map,c=new Map;for(const u of i)if(o.has(u.id))for(const f of u.values)f.value===null||f.value===0||(f.value>0?l:c).set(f.index,u.id);for(const[u,f]of l)r.add(`${f}:${u}`);for(const[u,f]of c)r.add(`${f}:${u}`)}return r}function G0(t,e,n){return n?t?e?{tl:n,bl:n}:{tr:n,br:n}:e?{br:n,bl:n}:{tl:n,tr:n}:0}function X0(t,e,n,r){let i="";return n?r&&t[0]<e?i=`0 ${e-t[0]}px 0 0`:!r&&t[0]>e&&(i=`0 0 0 ${t[0]-e}px`):r&&t[1]>e?i=`${t[1]-e}px 0 0 0`:!r&&t[1]<e&&(i=`0 0 ${e-t[1]}px 0`),i?`inset(${i})`:null}function sc(t,e,n,r,i,s){const{config:o,state:l}=t,c=o.axis_rotated,u=+c,f=+!u,d=e.value<0,h=o[`axis_${t.axis.getId(e.id)}_inverted`],m=!h&&d||h&&!d,S=t.isGrouped(e.id),E=r&&S&&e.value!==0?l.hiddenTargetIds.has(e.id)&&s?s(e):i.has(`${e.id}:${e.index}`):!1,C=[n[0][u],n[0][f]];let w=0;if(r){const z=c?f:u,B=Math.abs(n[2][z]-n[0][z]);w=Math.max(0,!S||E?r(B):0)}const $=c?n[1][u]+(m?w:-w):n[1][f]+(m?-w:w);return{radius:w,corners:G0(c,m,w),clipPath:w?X0(C,$,c,m):null,indexX:u,indexY:f,isNegative:m,pos:$}}const Sd="2 2";function Ad(t,e,n){const r=t.axis.isTimeSeries(),i=(s,o)=>mn(s)?o:r?Wn.call(t,s):s;return(n||[]).map(s=>{var o,l;return{start:i(s.start,(o=e[0])==null?void 0:o.x),end:i(s.end,(l=e[e.length-1])==null?void 0:l.x),style:s.style||{dasharray:Sd}}})}function Ed(t,e){for(let n=0,r;r=e[n];n++)if(r.start<t&&t<=r.end)return r.style;return!1}function W0(t){const e=String((t==null?void 0:t.dasharray)||Sd).split(/[\s,]+/).map(Number).filter(Number.isFinite);return e.length?e:[2,2]}function V0(t,e,n,r,i){const s=t.config.axis_rotated,o=Ad(t,e,i),l=[];for(let c=1;c<e.length;c++){const u=e[c-1],f=e[c];if(!Ge(u.value)||!Ge(f.value)){l.push({isBreak:!0});continue}const d=Ed(f.x,o),h=n(u.x),m=r(u.value),S=n(f.x),E=r(f.value);l.push({start:s?[m,h]:[h,m],end:s?[E,S]:[S,E],dash:d?W0(d):[]})}return l}function fo(t,e){return t.config.axis_rotated?[e[1],e[0]]:[e[0],e[1]]}function Cd(t,e,n=1){const r=e.map(h=>fo(t,h)),i=r.map(([h])=>h),s=r.map(([,h])=>h),o=Math.min(...i),l=Math.min(...s),c=Math.max(...i)-o,u=Math.max(...s)-l,f=Math.max(n,c),d=Math.max(n,u);return{x:o-(f-c)/2,y:l-(d-u)/2,w:f,h:d}}function Ji(t,e){var n,r;const i=(n=t.isGrouped)!=null&&n.call(t,e.id)&&t.circleY?t.circleY(e,e.index):t.getYScaleById(e.id)(t.getBaseValue(e)),s=(r=t.xx(e))!=null?r:NaN;return t.config.axis_rotated?{x:i,y:s}:{x:s,y:i}}function j0(t,e,n){return{x:t.cx(e,n),y:t.cy(e,n)}}function H0(t,e){return{body:Cd(t,[e[0],e[1]]),wickStart:fo(t,[e[2][0],e[2][1]]),wickEnd:fo(t,[e[2][0],e[2][2]])}}function ai(t,e,n,r=!1){if(e===n)return{x:0,y:0,w:t.state.width,h:0};const{scale:{x:i,y:s}}=t,o=i(e.x0),l=s(e.y0),c=i(e.x1)-o,u=s(e.y1)-l;return{x:o,y:l,w:r?Math.max(0,c):c,h:r?Math.max(0,u):u}}function Y0(t,e,n,r){const{config:i}=t,{id:s,value:o,ratio:l=0}=e,c=i.treemap_label_format,u=typeof c=="function"?c.bind(t.api)(o,l,s,{width:n,height:r}):`${s}
${(l*100).toFixed(2)}%`;return u==null?null:String(u)}var Ew=Array.prototype.slice;function oc(t){return typeof t=="object"&&"length"in t?t:Array.from(t)}function Je(t){return function(){return t}}function Id(t){this._context=t}Id.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 ho(t){return new Id(t)}var K0=Math.pow;const lc=Math.PI,cc=2*lc,La=1e-6,Z0=cc-La;function Rd(t){this._+=t[0];for(let e=1,n=t.length;e<n;++e)this._+=arguments[e]+t[e]}function J0(t){let e=Math.floor(t);if(!(e>=0))throw new Error(`invalid digits: ${t}`);if(e>15)return Rd;const n=K0(10,e);return function(r){this._+=r[0];for(let i=1,s=r.length;i<s;++i)this._+=Math.round(arguments[i]*n)/n+r[i]}}class vo{constructor(e){this._x0=this._y0=this._x1=this._y1=null,this._="",this._append=e==null?Rd:J0(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,s,o){this._append`C${+e},${+n},${+r},${+i},${this._x1=+s},${this._y1=+o}`}arcTo(e,n,r,i,s){if(e=+e,n=+n,r=+r,i=+i,s=+s,s<0)throw new Error(`negative radius: ${s}`);let o=this._x1,l=this._y1,c=r-e,u=i-n,f=o-e,d=l-n,h=f*f+d*d;if(this._x1===null)this._append`M${this._x1=e},${this._y1=n}`;else if(h>La)if(!(Math.abs(d*c-u*f)>La)||!s)this._append`L${this._x1=e},${this._y1=n}`;else{let m=r-o,S=i-l,E=c*c+u*u,C=m*m+S*S,w=Math.sqrt(E),$=Math.sqrt(h),z=s*Math.tan((lc-Math.acos((E+h-C)/(2*w*$)))/2),B=z/$,W=z/w;Math.abs(B-1)>La&&this._append`L${e+B*f},${n+B*d}`,this._append`A${s},${s},0,0,${+(d*m>f*S)},${this._x1=e+W*c},${this._y1=n+W*u}`}}arc(e,n,r,i,s,o){if(e=+e,n=+n,r=+r,o=!!o,r<0)throw new Error(`negative radius: ${r}`);let l=r*Math.cos(i),c=r*Math.sin(i),u=e+l,f=n+c,d=1^o,h=o?i-s:s-i;this._x1===null?this._append`M${u},${f}`:(Math.abs(this._x1-u)>La||Math.abs(this._y1-f)>La)&&this._append`L${u},${f}`,r&&(h<0&&(h=h%cc+cc),h>Z0?this._append`A${r},${r},0,1,${d},${e-l},${n-c}A${r},${r},0,1,${d},${this._x1=u},${this._y1=f}`:h>La&&this._append`A${r},${r},0,${+(h>=lc)},${d},${this._x1=e+r*Math.cos(s)},${this._y1=n+r*Math.sin(s)}`)}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 Q0(){return new vo}Q0.prototype=vo.prototype;function Cw(t=3){return new vo(+t)}function uc(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 vo(e)}function wd(t){return t[0]}function Od(t){return t[1]}function fc(t,e){var n=Je(!0),r=null,i=ho,s=null,o=uc(l);t=typeof t=="function"?t:t===void 0?wd:Je(t),e=typeof e=="function"?e:e===void 0?Od:Je(e);function l(c){var u,f=(c=oc(c)).length,d,h=!1,m;for(r==null&&(s=i(m=o())),u=0;u<=f;++u)!(u<f&&n(d=c[u],u,c))===h&&((h=!h)?s.lineStart():s.lineEnd()),h&&s.point(+t(d,u,c),+e(d,u,c));if(m)return s=null,m+""||null}return l.x=function(c){return arguments.length?(t=typeof c=="function"?c:Je(+c),l):t},l.y=function(c){return arguments.length?(e=typeof c=="function"?c:Je(+c),l):e},l.defined=function(c){return arguments.length?(n=typeof c=="function"?c:Je(!!c),l):n},l.curve=function(c){return arguments.length?(i=c,r!=null&&(s=i(r)),l):i},l.context=function(c){return arguments.length?(c==null?r=s=null:s=i(r=c),l):r},l}function _0(t,e,n){var r=null,i=Je(!0),s=null,o=ho,l=null,c=uc(u);t=typeof t=="function"?t:t===void 0?wd:Je(+t),e=typeof e=="function"?e:Je(e===void 0?0:+e),n=typeof n=="function"?n:n===void 0?Od:Je(+n);function u(d){var h,m,S,E=(d=oc(d)).length,C,w=!1,$,z=new Array(E),B=new Array(E);for(s==null&&(l=o($=c())),h=0;h<=E;++h){if(!(h<E&&i(C=d[h],h,d))===w)if(w=!w)m=h,l.areaStart(),l.lineStart();else{for(l.lineEnd(),l.lineStart(),S=h-1;S>=m;--S)l.point(z[S],B[S]);l.lineEnd(),l.areaEnd()}w&&(z[h]=+t(C,h,d),B[h]=+e(C,h,d),l.point(r?+r(C,h,d):z[h],n?+n(C,h,d):B[h]))}if($)return l=null,$+""||null}function f(){return fc().defined(i).curve(o).context(s)}return u.x=function(d){return arguments.length?(t=typeof d=="function"?d:Je(+d),r=null,u):t},u.x0=function(d){return arguments.length?(t=typeof d=="function"?d:Je(+d),u):t},u.x1=function(d){return arguments.length?(r=d==null?null:typeof d=="function"?d:Je(+d),u):r},u.y=function(d){return arguments.length?(e=typeof d=="function"?d:Je(+d),n=null,u):e},u.y0=function(d){return arguments.length?(e=typeof d=="function"?d:Je(+d),u):e},u.y1=function(d){return arguments.length?(n=d==null?null:typeof d=="function"?d:Je(+d),u):n},u.lineX0=u.lineY0=function(){return f().x(t).y(e)},u.lineY1=function(){return f().x(t).y(n)},u.lineX1=function(){return f().x(r).y(e)},u.defined=function(d){return arguments.length?(i=typeof d=="function"?d:Je(!!d),u):i},u.curve=function(d){return arguments.length?(o=d,s!=null&&(l=o(s)),u):o},u.context=function(d){return arguments.length?(d==null?s=l=null:l=o(s=d),u):s},u}var q0=Object.defineProperty,tT=Object.defineProperties,eT=Object.getOwnPropertyDescriptors,Pd=Object.getOwnPropertySymbols,nT=Object.prototype.hasOwnProperty,rT=Object.prototype.propertyIsEnumerable,Md=(t,e,n)=>e in t?q0(t,e,{enumerable:!0,configurable:!0,writable:!0,value:n}):t[e]=n,Ld=(t,e)=>{for(var n in e||(e={}))nT.call(e,n)&&Md(t,n,e[n]);if(Pd)for(var n of Pd(e))rT.call(e,n)&&Md(t,n,e[n]);return t},Dd=(t,e)=>tT(t,eT(e));function Fd(t,e){return e?n=>{var r;const i=(r=t.getSubchartCandlestickShapeValue)==null?void 0:r.call(t,n,!0);return i===void 0?t.getBaseValue(n):i}:n=>t.getBaseValue(n)}function Nd(t,e,n){return n?e.map(r=>{var i;const s=(i=t.getSubchartCandlestickShapeValue)==null?void 0:i.call(t,r,n);return s===void 0?r:Dd(Ld({},r),{value:s})}):e}function aT(t,e,n){return t.isStepType(e)?t.convertValuesToStep(n):n}function $d(t,e,n,r){const{config:i,scale:s}=t,o=i.line_connectNull,l=i.axis_rotated,c=t.generateGetLinePoints(e,n),u=t.getYScaleById.bind(t),f=Fd(t,n),d=E=>(n?t.subxx:t.xx).call(t,E),h=(E,C)=>t.isGrouped(E.id)?c(E,C)[0][1]:u(E.id,n)(f(E));let m=fc();m=l?m.x(h).y(d):m.x(d).y(h),r&&(m=m.context(r)),o||(m=m.defined(E=>f(E)!==null));const S=n?s.subX:s.x;return E=>{const C=u(E.id,n);let w=o?t.filterRemoveNull(E.values):E.values,$=0,z=0,B;if(t.isLineType(E)){const W=i.data_regions[E.id];W&&!r&&t.lineWithRegions?(w=Nd(t,w,n),t.isAreaRangeType(E)&&(w=w.map(H=>Dd(Ld({},H),{value:t.getRangedData(H,"mid")}))),t.isStepType(E)&&(w=t.convertValuesToStep(w)),B=t.lineWithRegions(w,s.zoom||S,C,W)):B=m.curve(t.getCurve(E))(aT(t,E,w))}else w[0]&&($=S(w[0].x),z=C(f(w[0]))),B=l?`M ${z} ${$}`:`M ${$} ${z}`;return B||(r?void 0:"M 0 0")}}function Bd(t,e,n,r){const{config:i}=t,s=i.line_connectNull,o=i.axis_rotated,l=t.generateGetAreaPoints(e,n),c=t.getYScaleById.bind(t),u=Fd(t,n),f=new Map,d=E=>{let C=f.get(E);return C===void 0&&(C=t.getShapeYMin(E,n),f.set(E,C)),C},h=E=>(n?t.subxx:t.xx).call(t,E),m=(E,C)=>t.isGrouped(E.id)?l(E,C)[0][1]:c(E.id,n)(t.isAreaRangeType(E)?t.getRangedData(E,"high"):d(E.id)),S=(E,C)=>t.isGrouped(E.id)?l(E,C)[1][1]:c(E.id,n)(t.isAreaRangeType(E)?t.getRangedData(E,"low"):u(E));return E=>{let C=s?t.filterRemoveNull(E.values):E.values,w=0,$=0,z;if(t.isAreaType(E)){let B=_0();B=o?B.y(h).x0(m).x1(S):B.x(h).y0(i.area_above?0:i.area_below?n?t.state.height2:t.state.height:m).y1(S),r&&(B=B.context(r)),s||(B=B.defined(W=>u(W)!==null)),C=Nd(t,C,n),t.isStepType(E)&&(C=t.convertValuesToStep(C)),z=B.curve(t.getCurve(E))(C)}else C[0]&&(w=(n?t.scale.subX:t.scale.x)(C[0].x),$=t.getYScaleById(E.id,n)(u(C[0]))),z=o?`M ${$} ${w}`:`M ${w} ${$}`;return z||(r?void 0:"M 0 0")}}let jr;function go(t,e){if(!ae(e)||e>=1)return t;const n=t.match(/^#([\da-f]{3}|[\da-f]{6})$/i);if(n){const s=(n[1].length===3?n[1].split("").map(l=>l+l).join(""):n[1]).match(/.{2}/g);return s?`rgba(${s.map(l=>parseInt(l,16)).join(",")},${e})`:t}if(/^rgb\(/i.test(t))return t.replace(/^rgb\((.*)\)$/i,`rgba($1,${e})`);if(/^rgba\(/i.test(t))return t.replace(/^rgba\((.*),\s*([\d.]+)\)$/i,(i,s,o)=>`rgba(${s},${Number(o)*e})`);const r=iT(t);return r&&r!==t?go(r,e):t}function iT(t){if(!se.document||(jr===void 0&&(jr=se.document.createElement("canvas").getContext("2d")),!jr))return null;jr.fillStyle="#000",jr.fillStyle=t;const e=jr.fillStyle;jr.fillStyle="#fff",jr.fillStyle=t;const n=jr.fillStyle;return e===n?e:null}function Qi(t,e,n,r){const i=e(n,r),s=Cd(t,i);return gn(s.x,s.y)&&gn(s.x+s.w,s.y+s.h)?{points:i,rect:s}:null}function _i(t,e,n,r){const i=e(n,r),{body:s,wickStart:o,wickEnd:l}=H0(t,i);return gn(s.x,s.y)&&gn(s.x+s.w,s.y+s.h)&&gn(o[0],o[1])&&gn(l[0],l[1])?{body:s,points:i,wickStart:o,wickEnd:l}:null}const sT=1.2;function dc(t,e){var n,r,i;let{value:s}=e;if((n=t.isBubbleZType)!=null&&n.call(t,e))s=t.getBubbleZData(s,"z");else if((r=t.isCandlestickType)!=null&&r.call(t,e)){const o=(i=t.getCandlestickData)==null?void 0:i.call(t,e);o&&(s=o.close)}return s}function zd(t,e){const n=t.dataLabelFormat(e.id)(dc(t,e),e.id,e.index,[]);return n==null?null:String(n)}function Ud(t){return`${t.id}:${t.index}`}function hc(t,e,n){var r;if(!(e!=null&&e.length))return()=>!1;if(t.config.tooltip_grouped&&e.length>1){const s=(r=e[0])==null?void 0:r.index;return o=>s!==void 0&&o.index===s&&n(t,o)}const i=new Set(e.filter(s=>s&&n(t,s)).map(Ud));return s=>i.has(Ud(s))}function po(t,e,n,r){const i=t.config.data_labels_position;let s;if(ie(i))s=i.bind(t.api)(n,dc(t,e),e.id,e.index,r);else if(i){const o=e.id in i?i[e.id]:i;s=o==null?void 0:o[n]}return ae(s)?s:0}function oT(t,e){var n,r;const i=(n=t.config.data_labels)==null?void 0:n.image;if(ie(i))return(r=i.call(t.api,dc(t,e),e.id,e.index))!=null?r:null;if(i){const{url:s="",width:o=0,height:l=0,pos:c}=i;return{url:s,width:o,height:l,pos:c}}return null}function lT(t,e){return Pa(t.url,{ID:e.id})}function cT(t,e,n,r,i,s){var o,l,c;const{width:u=0,height:f=0,pos:d}=e,h=u/2,m=f/2,S=vc(t.canvasEngine.ctx,n,r,i).h,E=mr(t.canvasEngine.ctx.font),C=r-h,w=i-m-((o=t.isTreemapType)!=null&&o.call(t,s)?E*.7:S/2);let $=r,z=i;return t.config.axis_rotated?$+=h:z+=m,{x:C+((l=d==null?void 0:d.x)!=null?l:0),y:w+((c=d==null?void 0:d.y)!=null?c:0),textX:$,textY:z}}function kd(t,e,n){var r,i,s;const o=(r=t.updateTextColor)==null?void 0:r.call(t,e);return typeof o=="string"?o:(i=t.isTreemapType)!=null&&i.call(t,e)?n:((s=t.color)==null?void 0:s.call(t,e))||n}function uT(t,e){var n;const r=t.config.data_labels_backgroundColors;if(!r)return null;if(je(r))return r;if(ie(r)){const s=(n=t.color)==null?void 0:n.call(t,e),o=r.bind(t.api)(s,e);return o==null?null:String(o)}const i=r[e.id];return i==null?null:String(i)}function fT(t){var e,n,r;if(!t)return null;const i=He(t)?t:{};return{padding:jf((e=i.padding)!=null?e:"3 5"),radius:ae(i.radius)?i.radius:10,stroke:(n=i.stroke)!=null?n:"#000",strokeWidth:ae(i.strokeWidth)?i.strokeWidth:1,fill:(r=i.fill)!=null?r:"none"}}function vc(t,e,n,r,i={top:0,right:0,bottom:0,left:0}){var s,o;const l=e.split(`
`),c=l.map(w=>t.measureText(w)),u=Math.max(...c.map(w=>w.width),0),f=mr(t.font),d=f*sT,h=c[0]?(c[0].fontBoundingBoxAscent||0)+(c[0].fontBoundingBoxDescent||0):0,m=c[0]&&(c[0].fontBoundingBoxDescent||c[0].actualBoundingBoxDescent)||0,S=l.length>1?d*l.length:Math.max(f,h,((s=c[0])==null?void 0:s.actualBoundingBoxAscent)+((o=c[0])==null?void 0:o.actualBoundingBoxDescent)||0);let E=n,C=r;return t.textAlign==="center"?E-=u/2:(t.textAlign==="right"||t.textAlign==="end")&&(E-=u),t.textBaseline==="middle"?C-=S/2:t.textBaseline==="alphabetic"?C-=S-m:(t.textBaseline==="bottom"||t.textBaseline==="ideographic")&&(C-=S),{x:E-i.left,y:C-i.top,w:u+i.left+i.right,h:S+i.top+i.bottom}}function Gd(t,e,n,r,i,s){var o,l;const c=e.context,u=uT(t,n),f=fT((o=t.config.data_labels)==null?void 0:o.border),d=(l=f==null?void 0:f.padding)!=null?l:{top:0,right:0,bottom:0,left:0},h=vc(c,r,i,s,d),m=t.config.data_labels.rotate;e.withState(S=>{var E;m&&(S.translate(i,s),S.rotate(m*Math.PI/180),h.x-=i,h.y-=s),u&&e.fillRoundRect(h,(E=f==null?void 0:f.radius)!=null?E:0,{fill:u}),f&&(f.fill!=="none"&&e.fillRoundRect(h,f.radius,{fill:f.fill}),e.strokeRoundRect(h,f.radius,{stroke:f.stroke,lineWidth:f.strokeWidth}))})}function dT(t){let e="middle";return t>0&&t<=170?e="end":t>190&&t<=360&&(e="start"),e}function hT(t){return t==="start"?"left":t==="end"?"right":"center"}function vT(t,e,n,r){var i,s,o;const l=dT(t.config.data_labels.rotate),c=t.config.axis_rotated,u=t.config[`axis_${(i=t.axis)==null?void 0:i.getId(e.id)}_inverted`],f=Vn(t,e),{value:d}=e,h=ae(d)&&d<0||f&&!((o=(s=t.getCandlestickData)==null?void 0:s.call(t,e))!=null&&o._isUp),m=4,S=m*2;return c?l==="start"?(n+=h?0:S,r+=m):l==="middle"?(n+=S,r-=S):l==="end"&&(h&&(n-=S),r+=m):(l==="start"?(n+=m,h&&(r+=S*2)):l==="middle"?r-=S:l==="end"&&(n-=m,h&&(r+=S*2)),u&&(r+=h?-17:f?13:7)),{x:n,y:r,textAlign:hT(l)}}function Xd(t,e,n,r,i){var s;if(t.config.axis_rotated)r+=6,e.textAlign="left",e.textBaseline="middle";else if(ca(t,n))e.textAlign="center",e.textBaseline="middle";else{const{config:o,state:l}=t,c=o[`axis_${(s=t.axis)==null?void 0:s.getId(n.id)}_inverted`],u=n.value<0||n.value===0&&!l.hasPositiveValue&&l.hasNegativeValue;let f=3;ae(o.point_r)&&o.point_r>5&&(ni(t,n)||la(t,n))&&(f+=o.point_r/2.3),e.textAlign="center",(c?!u:u)?(i+=f,e.textBaseline="top"):(i-=f*2,e.textBaseline="bottom")}return{x:r,y:i}}var gT=Object.defineProperty,Wd=Object.getOwnPropertySymbols,pT=Object.prototype.hasOwnProperty,mT=Object.prototype.propertyIsEnumerable,Vd=(t,e,n)=>e in t?gT(t,e,{enumerable:!0,configurable:!0,writable:!0,value:n}):t[e]=n,Hr=(t,e)=>{for(var n in e||(e={}))pT.call(e,n)&&Vd(t,n,e[n]);if(Wd)for(var n of Wd(e))mT.call(e,n)&&Vd(t,n,e[n]);return t};const jd={x:0,y:0,w:8,h:8},gc=new Map,Hd=[1,0,0,1,0,0];function xT(t){return t==="circle"||t==="rectangle"}function Dn(t,e,n=0){const r=t.getAttribute(e),i=r===null?NaN:parseFloat(r);return Number.isFinite(i)?i:n}function yT(t){const e=(t.match(/[-+]?(?:\d+\.?\d*|\.\d+)(?:e[-+]?\d+)?/gi)||[]).map(Number).filter(Number.isFinite),n=[];for(let r=0;r<e.length-1;r+=2)n.push([e[r],e[r+1]]);return n}function TT(t){const e=(t==null?void 0:t.trim().split(/[\s,]+/).map(Number).filter(Number.isFinite))||[];return e.length===4?{x:e[0],y:e[1],w:e[2],h:e[3]}:null}function Yd(t){const e=t.map(([s])=>s),n=t.map(([,s])=>s),r=Math.min(...e),i=Math.min(...n);return{x:r,y:i,w:Math.max(...e)-r,h:Math.max(...n)-i}}function bT(t){const e=t.filter(o=>Number.isFinite(o.x)&&Number.isFinite(o.y)&&Number.isFinite(o.w)&&Number.isFinite(o.h));if(!e.length)return Hr({},jd);const n=Math.min(...e.map(o=>o.x)),r=Math.min(...e.map(o=>o.y)),i=Math.max(...e.map(o=>o.x+o.w)),s=Math.max(...e.map(o=>o.y+o.h));return{x:n,y:r,w:i-n,h:s-r}}function qi(t,e){return[t[0]*e[0]+t[2]*e[1],t[1]*e[0]+t[3]*e[1],t[0]*e[2]+t[2]*e[3],t[1]*e[2]+t[3]*e[3],t[0]*e[4]+t[2]*e[5]+t[4],t[1]*e[4]+t[3]*e[5]+t[5]]}function ST(t){let e=[...Hd];return((t==null?void 0:t.match(/[a-z]+\([^)]*\)/gi))||[]).forEach(n=>{var r;const[,i,s]=n.match(/^([a-z]+)\(([^)]*)\)$/i)||[],o=i==null?void 0:i.toLowerCase(),l=((s==null?void 0:s.match(/[-+]?(?:\d+\.?\d*|\.\d+)(?:e[-+]?\d+)?/gi))||[]).map(Number).filter(Number.isFinite);let c=null;if(o==="matrix"&&l.length>=6)c=l.slice(0,6);else if(o==="translate"&&l.length)c=[1,0,0,1,l[0],l[1]||0];else if(o==="scale"&&l.length)c=[l[0],0,0,(r=l[1])!=null?r:l[0],0,0];else if(o==="rotate"&&l.length){const u=l[0]*Math.PI/180,f=Math.cos(u),d=Math.sin(u),h=[f,d,-d,f,0,0];c=l.length>=3?qi(qi([1,0,0,1,l[1],l[2]],h),[1,0,0,1,-l[1],-l[2]]):h}else o==="skewx"&&l.length?c=[1,0,Math.tan(l[0]*Math.PI/180),1,0,0]:o==="skewy"&&l.length&&(c=[1,Math.tan(l[0]*Math.PI/180),0,1,0,0]);c&&(e=qi(e,c))}),e}function fa(t,e){const n=t.getAttribute("style"),r=t.getAttribute(e),i=n==null?void 0:n.match(new RegExp(`(?:^|;)\\s*${e}\\s*:\\s*([^;]+)`,"i"));return((i==null?void 0:i[1])||r||"").trim()||null}function AT(t,e){const n=Hr({},e),r=fa(t,"fill"),i=fa(t,"stroke"),s=fa(t,"stroke-width"),o=fa(t,"opacity"),l=fa(t,"fill-opacity"),c=fa(t,"stroke-opacity");if(r&&(n.fill=r==="none"?null:r),i&&(n.stroke=i==="none"?null:i),s){const u=parseFloat(s);Number.isFinite(u)&&(n.lineWidth=u)}return[o,l,c].forEach(u=>{var f;const d=u===null?NaN:parseFloat(u);Number.isFinite(d)&&(n.alpha=((f=n.alpha)!=null?f:1)*d)}),n}function ET(t){const e=new Map;return Array.from(t.querySelectorAll("[id]")).forEach(n=>{const r=n.getAttribute("id");r&&e.set(r,n)}),e}function Ir(t,e){const n=t==null?void 0:t.trim();return n?/%$/.test(n)?n:parseFloat(n):e}function Rr(t,e,n,r){if(typeof t=="number")return Number.isFinite(t)?t:r;if(typeof t=="string"&&/%$/.test(t)){const s=parseFloat(t);return Number.isFinite(s)?e+n*s/100:r}const i=parseFloat(t!=null?t:"");return Number.isFinite(i)?i:r}function CT(t){const e=(t==null?void 0:t.trim())||"0",n=parseFloat(e),r=/%$/.test(e)?n/100:n;return Math.max(0,Math.min(1,Number.isFinite(r)?r:0))}function IT(t){return Array.from(t.children||[]).filter(e=>e.tagName.toLowerCase()==="stop").map(e=>{const n=fa(e,"stop-color")||"#000",r=fa(e,"stop-opacity"),i=r===null?NaN:parseFloat(r);return{offset:CT(e.getAttribute("offset")),color:n,opacity:Number.isFinite(i)?i:void 0}})}function RT(t){const e=new Map;return t.forEach((n,r)=>{const i=n.tagName.toLowerCase(),s=IT(n);s.length&&(i==="lineargradient"?e.set(r,{type:"linearGradient",x1:Ir(n.getAttribute("x1"),"0%"),y1:Ir(n.getAttribute("y1"),"0%"),x2:Ir(n.getAttribute("x2"),"100%"),y2:Ir(n.getAttribute("y2"),"0%"),stops:s}):i==="radialgradient"&&e.set(r,{type:"radialGradient",cx:Ir(n.getAttribute("cx"),"50%"),cy:Ir(n.getAttribute("cy"),"50%"),r:Ir(n.getAttribute("r"),"50%"),fx:Ir(n.getAttribute("fx"),"50%"),fy:Ir(n.getAttribute("fy"),"50%"),fr:Ir(n.getAttribute("fr"),0),stops:s}))}),e}function pc(t,e,n,r=Hd,i={},s=new Set){const o=t.tagName.toLowerCase(),l=Array.from(t.children||[]),c=AT(t,i),u=qi(r,ST(t.getAttribute("transform"))),f={matrix:u,style:c};if(o==="defs")return[];if(o==="svg"||o==="g"||o==="symbol")return l.reduce((d,h)=>d.concat(pc(h,e,n,u,c,s)),[]);if(o==="use"){const d=t.getAttribute("href")||t.getAttribute("xlink:href")||"",h=d.charAt(0)==="#"?d.slice(1):"",m=h&&n.get(h);if(!m||s.has(h))return[];const S=Dn(t,"x",0),E=Dn(t,"y",0),C=qi(u,[1,0,0,1,S,E]);s.add(h);const w=pc(m,e,n,C,c,s);return s.delete(h),w}if(o==="polygon"||o==="polyline"){const d=yT(t.getAttribute("points")||"");return d.length?[Hr({type:o,points:d,box:Yd(d)},f)]:[]}if(o==="circle"){const d=Dn(t,"cx",0),h=Dn(t,"cy",0),m=Dn(t,"r",0);return m>0?[Hr({type:"circle",cx:d,cy:h,r:m,box:{x:d-m,y:h-m,w:m*2,h:m*2}},f)]:[]}if(o==="ellipse"){const d=Dn(t,"cx",0),h=Dn(t,"cy",0),m=Dn(t,"rx",0),S=Dn(t,"ry",0);return m>0&&S>0?[Hr({type:"ellipse",cx:d,cy:h,rx:m,ry:S,box:{x:d-m,y:h-S,w:m*2,h:S*2}},f)]:[]}if(o==="rect"){const d=Dn(t,"x",0),h=Dn(t,"y",0),m=Dn(t,"width",0),S=Dn(t,"height",0);return m>0&&S>0?[Hr({type:"rect",x:d,y:h,w:m,h:S,box:{x:d,y:h,w:m,h:S}},f)]:[]}if(o==="line"){const d=Dn(t,"x1",0),h=Dn(t,"y1",0),m=Dn(t,"x2",0),S=Dn(t,"y2",0);return[Hr({type:"line",x1:d,y1:h,x2:m,y2:S,box:Yd([[d,h],[m,S]])},f)]}if(o==="path"){const d=t.getAttribute("d")||"";return d?[Hr({type:"path",d,box:e},f)]:[]}return[]}function wT(t){if(!/^</.test(t))return null;if(gc.has(t))return gc.get(t)||null;let e=null;try{const r=new se.DOMParser().parseFromString(Gr(t),"image/svg+xml").documentElement,i=TT(r.getAttribute("viewBox"))||jd,s=ET(r),o=pc(r,i,s);o.length&&(e={shapes:o,box:r.tagName.toLowerCase()==="svg"?i:bT(o.map(l=>l.box)),paints:RT(s)})}catch(n){e=null}return gc.set(t,e),e}function OT(t,e){if(e.type==="polygon"||e.type==="polyline"){const[n,...r]=e.points;t.moveTo(n[0],n[1]),r.forEach(([i,s])=>t.lineTo(i,s)),e.type==="polygon"&&t.closePath()}else e.type==="circle"?(t.moveTo(e.cx+e.r,e.cy),t.arc(e.cx,e.cy,e.r,0,Math.PI*2)):e.type==="ellipse"?(t.moveTo(e.cx+e.rx,e.cy),t.ellipse(e.cx,e.cy,e.rx,e.ry,0,0,Math.PI*2)):e.type==="rect"?t.rect(e.x,e.y,e.w,e.h):e.type==="line"&&(t.moveTo(e.x1,e.y1),t.lineTo(e.x2,e.y2))}function mo(t){const e=t==null?void 0:t.match(/^url\(#([^)]+)\)$/);return(e==null?void 0:e[1])||null}function Kd(t,e,n){const{x:r,y:i,w:s,h:o}=n,l=e.type==="linearGradient"?t.createLinearGradient(Rr(e.x1,r,s,r),Rr(e.y1,i,o,i),Rr(e.x2,r,s,r+s),Rr(e.y2,i,o,i)):t.createRadialGradient(Rr(e.fx,r,s,r+s/2),Rr(e.fy,i,o,i+o/2),Rr(e.fr,r,Math.max(s,o),0),Rr(e.cx,r,s,r+s/2),Rr(e.cy,i,o,i+o/2),Math.max(.01,Rr(e.r,0,Math.max(s,o),Math.max(s,o)/2)));return e.stops.forEach(({offset:c,color:u,opacity:f})=>{l.addColorStop(c,f===void 0?u:go(u,f))}),l}function PT(t,e,n,r,i){const s=Hr({},e||{});if(n.fill!==void 0)if(n.fill===null)delete s.fill;else if(mo(n.fill)){const o=r.get(mo(n.fill));o&&(s.fill=Kd(t,o,i))}else/^url\(/.test(n.fill)||(s.fill=n.fill);if(n.stroke!==void 0)if(n.stroke===null)delete s.stroke;else if(mo(n.stroke)){const o=r.get(mo(n.stroke));o&&(s.stroke=Kd(t,o,i))}else/^url\(/.test(n.stroke)||(s.stroke=n.stroke);return n.lineWidth!==void 0&&(s.lineWidth=n.lineWidth),{style:s,shouldFill:n.fill!==null&&(!s.stroke||s.fill!==void 0),shouldStroke:n.stroke!==null&&s.stroke!==void 0,alpha:n.alpha}}function ts(t,e,n,r,i,s,o=i){if(xT(e)){t.point(e,n,r,i,s);return}const l=wT(e);if(!l||i<=0){t.point("circle",n,r,i,s);return}t.withState(c=>{const{box:u,paints:f,shapes:d}=l,h=o>0?i/o:1,m=S=>{const{style:E,shouldFill:C,shouldStroke:w,alpha:$}=PT(c,s,S.style,f,u);if(c.save(),t.applyStyle(E),$!==void 0&&(c.globalAlpha*=$),c.transform(...S.matrix),c.beginPath(),S.type==="path"){if(se.Path2D){const z=S.path2D||(S.path2D=new se.Path2D(S.d));C&&c.fill(z),w&&c.stroke(z)}}else OT(c,S),C&&c.fill(),w&&c.stroke();c.restore()};c.translate(n-(u.x+u.w/2)*h,r-(u.y+u.h/2)*h),c.scale(h,h),d.forEach(m)})}var MT=Object.defineProperty,LT=Object.defineProperties,DT=Object.getOwnPropertyDescriptors,Zd=Object.getOwnPropertySymbols,FT=Object.prototype.hasOwnProperty,NT=Object.prototype.propertyIsEnumerable,mc=(t,e,n)=>e in t?MT(t,e,{enumerable:!0,configurable:!0,writable:!0,value:n}):t[e]=n,Jd=(t,e)=>{for(var n in e||(e={}))FT.call(e,n)&&mc(t,n,e[n]);if(Zd)for(var n of Zd(e))NT.call(e,n)&&mc(t,n,e[n]);return t},Qd=(t,e)=>LT(t,DT(e)),ii=(t,e,n)=>mc(t,typeof e!="symbol"?e+"":e,n);const $T=[ji,er,xr,Vn],BT=1e3,_d=new WeakMap,qd=new Map;function th(t,e){if(!e||e==="none")return;const n=e.match(/^matrix\(([^)]+)\)$/),r=e.match(/^matrix3d\(([^)]+)\)$/);if(n){const i=n[1].split(",").map(s=>Number(s.trim()));i.length===6&&i.every(Number.isFinite)&&t.transform(i[0],i[1],i[2],i[3],i[4],i[5])}else if(r){const i=r[1].split(",").map(s=>Number(s.trim()));i.length===16&&i.every(Number.isFinite)&&t.transform(i[0],i[1],i[4],i[5],i[12],i[13])}}function zT(t,e,n){const r=t.naturalWidth||t.width,i=t.naturalHeight||t.height;if(!r||!i||!e||!n)return{x:0,y:0,w:e,h:n};const s=Math.min(e/r,n/i),o=r*s,l=i*s;return{x:(e-o)/2,y:(n-l)/2,w:o,h:l}}function UT(t){const{state:e}=t;return e.hasFunnel||e.hasTreemap?{x:0,y:0}:{x:qa(e.margin.left),y:qa(e.margin.top)}}function eh(t,e,n,r,i=!1){r.strokePath(s=>{$d(t,n,i,s)(e)},{lineDash:[]})}function nh(t,e,n,r,i=!1){r.fillPath(s=>{Bd(t,n,i,s)(e)})}function rh(t,e){const n=Wr(t,e);return n.start===0&&n.end===e.values.length?e:Qd(Jd({},e),{values:e.values.slice(n.start,n.end)})}function xc(t,e){if(!(t!=null&&t.length)||!(e!=null&&e.id))return null;let n=_d.get(t);if(!n){n=new Map;for(const r of t){if(!(r!=null&&r.id))continue;const i=`${r.id}:*`;n.has(i)||n.set(i,r),"index"in r&&n.set(`${r.id}:${r.index}`,r)}_d.set(t,n)}return"index"in e?n.get(`${e.id}:${e.index}`)||null:n.get(`${e.id}:*`)||null}function kT(t,e){const n=se.Path2D;if(!n)return null;const r=`${t}:${e}`,i=qd.get(r);if(i)return i;const s=new n(de[t][e]);return qd.set(r,s),s}function es(t,e){const n=t.config.color_onover;return!n||!e?null:He(n)?e.id in n?n[e.id]:null:je(n)?n:ie(n)?n.call(t.api,e):null}function GT(t,e,n){const r=xc(n,e);return es(t,r)||t.color(e.id)}function ah(t){var e;return(t==null?void 0:t.id)||((e=t==null?void 0:t.data)==null?void 0:e.id)}function ih(t,e){var n;const r=ah(e);return!!r&&((n=t.state.focusedTargetIds)==null?void 0:n.has(r))}function wr(t,e){var n;const r=ah(e);return r&&((n=t.state.defocusedTargetIds)!=null&&n.has(r))?t.canvasTheme.style.shape.targetDefocusedOpacity:1}function XT(t,e,n,r=!1){var i;const s=(i=t.generateGetAreaPoints)==null?void 0:i.call(t,n,r);if(!s)return null;const o=Wr(t,e);let l=1/0,c=1/0,u=-1/0,f=-1/0;for(let d=o.start;d<o.end;d++){const h=e.values[d];An(t,h)&&s(h,d).forEach(([m,S])=>{gn(m,S)&&(l=Math.min(l,m),c=Math.min(c,S),u=Math.max(u,m),f=Math.max(f,S))})}return Number.isFinite(l)&&Number.isFinite(c)?{x:l,y:c,w:u-l,h:f-c}:null}function xo(t,e,n){return e+n*(ae(t)?t:0)}function sh(t,e,n,r,i,s){const o=t.config[`${r}_linearGradient`];if(!o||!i||!i.w||!i.h)return s;const l=t.config.axis_rotated,c=typeof o=="object"?o:{},u=c.x||(l?[1,0]:[0,0]),f=c.y||(l?[0,0]:[0,1]),d=Array.isArray(c.stops)?c.stops:[[0,s,1],[1,s,0]],h=e.createLinearGradient(xo(u[0],i.x,i.w),xo(f[0],i.y,i.h),xo(u[1],i.x,i.w),xo(f[1],i.y,i.h));return d.forEach(([m,S,E])=>{const C=ie(S)?S.call(t.api,n.id):S,w=String(C||s),$=Number(m),z=Number.isFinite($)?Math.max(0,Math.min(1,$)):0;h.addColorStop(z,go(w,E))}),h}function Yr(t,e){return ei(t,e,$T)}function yo(t,e){const n=t.config.point_opacity;return Number.isFinite(n)?n:la(t,e)||ca(t,e)?.5:1}function ns(t,e,n){var r,i;const s=t.config.point_r;return ca(t,e)||ie(s)?(i=(r=t.pointR)==null?void 0:r.call(t,n))!=null?i:2.5:s}function WT(t,e,n,r){return!r&&n==="circle"&&la(t,e)&&!ie(t.config.point_r)&&e.values.length>Zf}function VT(t,e){const{bar_connectLine:n}=t.config,r=He(n)?n[e]:n;return/^(start|end)-(start|end)$/.test(r)?r:null}function jT(t,e,n){const{indexX:r,indexY:i,pos:s}=n;return t.config.axis_rotated?{x:e[0][r],y:e[0][i],width:e[0][r]-s,height:e[2][i]-e[0][i]}:{x:e[0][r],y:s,width:e[2][r]-e[0][r],height:e[3][i]-s}}function HT(t,e,n,r,i=1){if(r.length<2)return;const s=t.config.axis_rotated,o=/^start-(start|end)$/.test(n),l=/^end-(start|end)$/.test(n),c=/\w+-end$/.test(n),u=/\w+-start$/.test(n),f=m=>({x:s?l?m.x-m.width:m.x:m.x+m.width,y:s||o?m.y+m.height:m.y}),d=m=>({x:s?m.x-(c?m.width:0):m.x,y:s?m.y:m.y+(u?m.height:0)});let h=f(r[0]);e.strokePath(()=>{for(let m=1;m<r.length;m++){const S=d(r[m]);e.traceLine(h.x,h.y,S.x,S.y),m<r.length-1&&(h=f(r[m]))}},{alpha:i,stroke:t.canvasTheme.style.shape.barConnectLineColor,lineWidth:t.canvasTheme.style.shape.barConnectLineWidth,lineDash:[]})}function yc(t,e){var n;const{config:r}=t;if(ca(t,e))return"circle";const i=((n=t.mapToIds)==null?void 0:n.call(t,t.data.targets))||[],s=Array.isArray(r.point_pattern)&&r.point_pattern.length?r.point_pattern:[r.point_type],o=Math.max(0,i.indexOf(e.id)),l=s[o%s.length];return/^rect(angle)?$/i.test(l)||l==="rectangle"?"rectangle":l||"circle"}function YT(t,e,n,r,i,s,o){const l=t.config.point_radialGradient;if(!l||!s)return o;const c=He(l)?l:{},u=ae(c.cx)?c.cx:.3,f=ae(c.cy)?c.cy:.3,d=ae(c.r)?c.r:.7,h=Array.isArray(c.stops)?c.stops:[[.1,null,1],[.9,null,0]],m=r+(u-.5)*s*2,S=i+(f-.5)*s*2,E=e.createRadialGradient(m,S,0,m,S,Math.max(1,s*d*2));return h.forEach(([C,w,$])=>{let z=ie(w)?w.bind(t.api)(n.id):w;z||(z=o);const B=Number(C),W=Number.isFinite(B)?Math.max(0,Math.min(1,B)):0;E.addColorStop(W,go(z,$))}),E}function oh(t,e,n){const r=t.config.candlestick_color_down;return(n!=null&&n._isUp?t.color(e):r&&typeof r=="object"?r[e.id]:r)||t.color(e)}function KT(t,e){return t.shouldDrawPointsForLine?t.shouldDrawPointsForLine(e):!0}function ZT(t,e){return t.length===e.length&&t.every((n,r)=>n===e[r])}function JT(t,e,n){const{config:r,scale:i}=t,s=i.zoom||i.x,o=t.getYScaleById(e.id),l=r.line_connectNull?t.filterRemoveNull(e.values):e.values;let c=t.isAreaRangeType(e)?l.map(S=>Qd(Jd({},S),{value:t.getRangedData(S,"mid")})):l;t.isStepType(e)&&(c=t.convertValuesToStep(c));const u=V0(t,c,s,o,r.data_regions[e.id]);let f=null,d=[];const h=()=>{if(d.length<2||!f){d=[];return}n.strokePath(S=>{const[E,...C]=d;S.moveTo(E[0],E[1]),C.forEach(w=>{S.lineTo(w[0],w[1])})},{lineDash:f}),d=[]},m=(S,E,C)=>{!f||!ZT(f,C)?(h(),f=C,d=[S,E]):d.push(E)};for(const{start:S,end:E,dash:C,isBreak:w}of u){if(w||!S||!E||!C){h(),f=null;continue}if(!gn(S[0],S[1])||!gn(E[0],E[1])){h(),f=null;continue}m(S,E,C)}h()}class QT{constructor(e,n){ii(this,"engine",e),ii(this,"theme",n),ii(this,"painter"),ii(this,"labelImageCache",new Map),ii(this,"backgroundImageCache",new Map),ii(this,"backgroundClassStyleCache",new Map),this.painter=new od(e.ctx)}get ctx(){return this.painter.context}withContext(e,n){this.painter.withContext(e,n)}destroy(){const e=n=>{n.image.onload=null,n.image.onerror=null};this.labelImageCache.forEach(e),this.backgroundImageCache.forEach(e),this.labelImageCache.clear(),this.backgroundImageCache.clear(),this.backgroundClassStyleCache.clear()}getLabelImage(e,n){if(!e||!se.Image)return null;let r=this.labelImageCache.get(e);if(!r){const i={image:new se.Image,loaded:!1,loading:!0};r=i,this.labelImageCache.set(e,r),i.image.onload=()=>{var s;i.loaded=!0,i.loading=!1,(s=n.redraw)==null||s.call(n)},i.image.onerror=()=>{i.loaded=!1,i.loading=!1},i.image.src=e}return r}getBackgroundImage(e,n){if(!e||!se.Image)return null;let r=this.backgroundImageCache.get(e);if(!r){const i={image:new se.Image,loaded:!1,loading:!0};r=i,this.backgroundImageCache.set(e,r),i.image.onload=()=>{var s;i.loaded=!0,i.loading=!1,(s=n.renderCanvasFrame)==null||s.call(n,void 0,null,!1)},i.image.onerror=()=>{i.loaded=!1,i.loading=!1},i.image.src=e}return r}getBackgroundClassStyle(e,n){if(!n||!se.document)return{};const r=this.backgroundClassStyleCache.get(n);if(r)return r;const i=se.document.createElement("div");i.className=n,i.style.cssText="position:absolute;visibility:hidden;pointer-events:none;width:1px;height:1px;",e.$el.chart.node().appendChild(i);const s=se.getComputedStyle(i),o=parseFloat(s.opacity),l={opacity:Number.isFinite(o)?o:void 0,transform:s.transform||void 0};return i.remove(),this.backgroundClassStyleCache.set(n,l),l}drawBackground(e){const n=e.config.background;if(!(n!=null&&n.imgUrl)&&!(n!=null&&n.color))return;const{ctx:r,painter:i}=this,{current:s,margin:o,width:l,height:c}=e.state,u=this.getBackgroundClassStyle(e,n.class);i.withState(()=>{if(u.opacity!==void 0&&(r.globalAlpha*=u.opacity),n.imgUrl){const f=this.getBackgroundImage(n.imgUrl,e);if(f!=null&&f.loaded){const d=UT(e),h=zT(f.image,s.width,s.height);r.translate(d.x,d.y),th(r,u.transform),r.drawImage(f.image,h.x,h.y,h.w,h.h)}}else n.color&&(th(r,u.transform),i.fillRect({x:o.left,y:o.top,w:l,h:c},{fill:n.color}))})}drawLabelImage(e,n,r,i,s){const o=oT(e,n);if(!(o!=null&&o.url))return{x:i,y:s};const l=lT(o,n),c=cT(e,o,r,i,s,n),u=this.getLabelImage(l,e);return u!=null&&u.loaded&&this.ctx.drawImage(u.image,c.x,c.y,o.width,o.height),{x:c.textX,y:c.textY}}drawDataLabel(e,n,r,i,s){const{painter:o,theme:{style:l}}=this;if({x:i,y:s}=this.drawLabelImage(e,n,r,i,s),e.config.data_labels.rotate){const c=vT(e,n,i,s);i=c.x,s=c.y,this.ctx.textAlign=c.textAlign}this.ctx.fillStyle=kd(e,n,l.label.color),Gd(e,o,n,r,i,s),o.textLines(r,i,s,{angle:e.config.data_labels.rotate})}drawFocusLabels(e,n){var r;if(!((r=e.hasDataLabel)!=null&&r.call(e)))return;const{ctx:i,theme:{style:s}}=this,o=n.filter(c=>c&&An(e,c)&&xr(e,c)&&Yr(e,{id:c.id})),l={size:()=>o.length};o.length&&(i.font=s.label.font,o.forEach(c=>{const u=zd(e,c);let{x:f,y:d}=Ji(e,c);u&&({x:f,y:d}=Xd(e,i,c,f,d),f+=po(e,c,"x",l),d+=po(e,c,"y",l),gn(f,d)&&this.drawDataLabel(e,c,u,f,d))}))}draw(e,n,r){if(e.state.hasTreemap){this.drawTreemaps(e);return}const{margin:i,width:s,height:o}=e.state,l=()=>{e.config.area_front||this.drawAreas(e,n,r),this.drawLines(e,n),e.config.area_front&&this.drawAreas(e,n,r),this.drawCircles(e,n,r)},c=()=>{e.config.bar_front||this.drawBars(e,n,r),this.drawCandlesticks(e,n,r),l(),e.config.bar_front&&this.drawBars(e,n,r),this.drawSelections(e,n),this.drawLabels(e,n)};e.config.clipPath===!1?c():this.painter.clipRect({x:i.left,y:i.top,w:s,h:o},c)}drawSubchart(e,n){const{config:r,state:i}=e;if(!r.subchart_show||!i.hasAxis||i.width2<=0||i.height2<=0)return;const{ctx:s,painter:o,theme:{style:l}}=this,{margin2:c,width2:u,height2:f}=i,d={x:c.left,y:c.top,w:u,h:f};e.withSubchartTypeContext(()=>{var h;const m=e.filterTargetsToShow().filter(Yr.bind(null,e)),S=e.getDrawShape();(h=e.updateSubchartYDomain)==null||h.call(e,m),o.withState(()=>{o.clipRect(d,()=>{o.withTranslation(d.x,d.y,()=>{var E,C,w,$,z,B;const W=m.filter(ji.bind(null,e)),H=tr(e,S,qt.AREA,ji.bind(null,e));for(const ft of W)ft.values.some(An.bind(null,e))&&(s.globalAlpha=l.shape.areaOpacity*wr(e,ft),s.fillStyle=e.color(ft.id),nh(e,ft,H,o,!0));s.globalAlpha=1;const _=m.filter(er.bind(null,e)),q=tr(e,S,qt.BAR,er.bind(null,e)),st=(E=e.generateGetBarPoints)==null?void 0:E.call(e,q,!0);if(st){for(const ft of _)s.globalAlpha=l.shape.barOpacity*wr(e,ft),s.fillStyle=e.color(ft.id),ft.values.forEach((lt,bt)=>{var St;if(!An(e,lt))return;const Mt=Qi(e,st,lt,bt),Ot=((St=e.getSubchartCandlestickBarColor)==null?void 0:St.call(e,lt,!0))||s.fillStyle;Mt&&o.fillRect(Mt.rect,{fill:Ot})});s.globalAlpha=1}const it=m.filter(Vn.bind(null,e)),ot=tr(e,S,qt.CANDLESTICK,Vn.bind(null,e)),ct=(C=e.generateGetCandlestickPoints)==null?void 0:C.call(e,ot,!0);if(ct){s.lineWidth=l.shape.candlestickLineWidth;for(const ft of it){const lt=wr(e,ft);s.globalAlpha=lt,ft.values.forEach((bt,St)=>{var Mt;const Ot=(Mt=e.getCandlestickData)==null?void 0:Mt.call(e,bt),Kt=Ot&&_i(e,ct,bt,St);if(!Kt)return;const ee=oh(e,{id:ft.id},Ot);s.strokeStyle=ee,s.fillStyle=ee,o.strokePath(()=>{o.traceLine(Kt.wickStart[0],Kt.wickStart[1],Kt.wickEnd[0],Kt.wickEnd[1])}),o.fillRect(Kt.body,{fill:s.fillStyle})})}}const gt=m.filter(ni.bind(null,e)),tt=tr(e,S,qt.LINE,ni.bind(null,e));s.globalAlpha=1;for(const ft of gt)ft.values.some(An.bind(null,e))&&(s.globalAlpha=wr(e,ft),s.lineWidth=ih(e,ft)?l.shape.lineFocusedWidth:l.shape.lineWidth,s.strokeStyle=e.color(ft.id),eh(e,ft,tt,o,!0));if(s.globalAlpha=1,r.point_show&&!((w=e.isPointFocusOnly)!=null&&w.call(e))){const ft=($=e.updateCircleY)==null?void 0:$.call(e,!0),lt=(z=e.subxx)==null?void 0:z.bind(e);if(lt&&ft){for(const bt of m){if(!la(e,bt)&&!ca(e,bt))continue;const St=e.color(bt.id),Mt=l.shape.pointFillColor||St,Ot=l.shape.pointStrokeColor||St,Kt=Ot?(B=l.shape.pointLineWidth)!=null?B:1:0,ee=Ot&&Kt>0?{fill:Mt,stroke:Ot,lineWidth:Kt}:{fill:Mt};s.globalAlpha=yo(e,bt)*wr(e,bt),bt.values.forEach((Ae,Ee)=>{if(!An(e,Ae))return;const Te=r.axis_rotated?ft(Ae,Ee):lt(Ae),De=r.axis_rotated?lt(Ae):ft(Ae,Ee),me=Math.min(ns(e,bt,Ae),3);gn(Te,De)&&ts(o,"circle",Te,De,me,ee)})}s.globalAlpha=1}}})}),this.drawSubchartBrush(e)})})}drawSubchartBrush(e){var n,r;const{config:i,scale:s,state:o}=e,l=o.domain;if(!i.subchart_show||i.subchart_brush_enabled===!1||!(l!=null&&l.length)||!s.subX)return;const{margin2:c,width2:u,height2:f}=o,d=s.subX(l[0]),h=s.subX(l[1]),m=i.axis_rotated?f:u,S=(r=(n=e.axis)==null?void 0:n.getExtent)==null?void 0:r.call(n),E=Array.isArray(S)&&S.length>=2&&S.every(Number.isFinite)?S.slice(0,2):[0,m],C=Math.max(0,Math.min(m,Math.min(...E))),w=Math.max(0,Math.min(m,Math.max(...E))),$=Math.max(C,Math.min(w,Math.min(d,h))),z=Math.max(C,Math.min(w,Math.max(d,h))),B=z-$;if(B<=0)return;const W=i.axis_rotated?{x:c.left,y:c.top+$,w:u,h:B}:{x:c.left+$,y:c.top,w:B,h:f};this.painter.fillRect(W,{fill:this.theme.style.subchartBrush.fill,alpha:this.theme.style.subchartBrush.opacity}),i.subchart_showHandle&&(this.drawSubchartBrushHandle(e,$,"start"),this.drawSubchartBrushHandle(e,z,"end"))}drawSubchartBrushHandle(e,n,r){const{config:i,state:{margin2:s,width2:o,height2:l}}=e,{ctx:c,painter:u,theme:{style:f}}=this,d=i.axis_rotated,h=f.subchartBrush.handleFill,m=f.subchartBrush.handleStroke,S=d?s.left+o/2:s.left+n,E=d?s.top+n:s.top+l/2,C=kT(d?"y":"x",r);C&&u.withState(()=>{c.translate(S,E),c.fillStyle=h,c.strokeStyle=m,c.lineWidth=f.subchartBrush.handleLineWidth,c.globalAlpha=f.subchartBrush.handleOpacity,c.fill(C),c.globalAlpha=1,c.stroke(C)})}drawBars(e,n,r){const{ctx:i,painter:s,theme:{style:o}}=this,l=er.bind(null,e),c=hc(e,r,er),u=e.filterTargetsToShow().filter(l).filter(Yr.bind(null,e)),f=e.generateGetBarPoints(tr(e,n,qt.BAR,l),!1),{margin:d}=e.state,h=uo(e),m=h?ic(e):new Set;f&&s.withTranslation(d.left,d.top,()=>{var S;for(const E of u){const C=Wr(e,E),w=VT(e,E.id),$=wr(e,E),z=[],B=[];for(let W=C.start;W<C.end;W++){const H=E.values[W];if(!An(e,H))continue;const _=Qi(e,f,H,W);if(!_)continue;const{points:q,rect:st}=_,it=sc(e,H,q,h,m,(S=e.isStackingRadiusData)==null?void 0:S.bind(e));B.push({d:H,points:q,rect:st,radiusInfo:it}),w&&z.push(jT(e,q,it))}w&&o.shape.barConnectLineWidth>0&&HT(e,s,w,z,$);for(const{d:W,rect:H,radiusInfo:_}of B){const q=es(e,xc(r,W)),st=q||e.color(E.id),ot=(c(W)?o.shape.barExpandedOpacity:o.shape.barOpacity)*$;i.fillStyle=q?st:sh(e,i,E,"bar",H,st),h?s.fillRoundRect(H,_.corners,{alpha:ot}):s.fillRect(H,{alpha:ot}),o.shape.barLineWidth>0&&(i.strokeStyle=o.shape.barStrokeColor,i.lineWidth=o.shape.barLineWidth,h?s.strokeRoundRect(H,_.corners,{alpha:o.shape.barOpacity*$}):s.strokeRect(H,{alpha:o.shape.barOpacity*$}))}}})}drawCandlesticks(e,n,r){var i;const{ctx:s,painter:o,theme:{style:l}}=this,c=Vn.bind(null,e),u=hc(e,r,Vn),f=e.filterTargetsToShow().filter(c).filter(Yr.bind(null,e)),d=(i=e.generateGetCandlestickPoints)==null?void 0:i.call(e,tr(e,n,qt.CANDLESTICK,c),!1),{margin:h}=e.state;d&&o.withTranslation(h.left,h.top,()=>{var m;s.lineWidth=l.shape.candlestickLineWidth;for(const S of f){const E=Wr(e,S),C=wr(e,S),w=l.shape.candlestickLineWidth,$=l.shape.candlestickStrokeColor||"#000";for(let z=E.start;z<E.end;z++){const B=S.values[z],W=(m=e.getCandlestickData)==null?void 0:m.call(e,B);if(!W)continue;const H=_i(e,d,B,z);if(!H)continue;const{body:_,wickStart:q,wickEnd:st}=H;s.fillStyle=es(e,xc(r,B))||oh(e,B,W),s.strokeStyle=$,s.globalAlpha=C,w>0&&o.strokePath(()=>{o.traceLine(q[0],q[1],st[0],st[1])}),o.fillRect(_,{alpha:(u(B)?l.shape.candlestickExpandedOpacity:1)*C}),w>0&&o.strokeRect(_,{alpha:C,lineWidth:w,stroke:$})}}s.globalAlpha=1})}hasExpandedShapeFocus(e,n){return!!(n!=null&&n.some(r=>r&&(er(e,r)||Vn(e,r))))}drawLines(e,n){const{ctx:r,painter:i,theme:{style:s}}=this,o=ni.bind(null,e),l=e.filterTargetsToShow().filter(o).filter(Yr.bind(null,e)),c=tr(e,n,qt.LINE,o),{margin:u}=e.state;e.generateGetLinePoints&&i.withTranslation(u.left,u.top,()=>{var f;for(const d of l){const h=rh(e,d);h.values.some(An.bind(null,e))&&(r.globalAlpha=wr(e,d),r.lineWidth=ih(e,d)?s.shape.lineFocusedWidth:s.shape.lineWidth,r.strokeStyle=e.color(d.id),(f=e.config.data_regions)!=null&&f[h.id]?JT(e,h,i):eh(e,h,c,i))}r.globalAlpha=1})}drawAreas(e,n,r){const{ctx:i,painter:s,theme:{style:o}}=this,l=ji.bind(null,e),c=e.filterTargetsToShow().filter(l).filter(Yr.bind(null,e)),u=tr(e,n,qt.AREA,l),{margin:f}=e.state;e.generateGetAreaPoints&&s.withTranslation(f.left,f.top,()=>{for(const d of c){const h=rh(e,d);if(!h.values.some(An.bind(null,e)))continue;const m=GT(e,h,r);i.globalAlpha=o.shape.areaOpacity*wr(e,d),i.fillStyle=sh(e,i,h,"area",e.config.area_linearGradient?XT(e,d,u):null,m),nh(e,h,u,s)}i.globalAlpha=1})}drawCircles(e,n,r){var i;if(!e.config.point_show||(i=e.isPointFocusOnly)!=null&&i.call(e))return;const{ctx:s,painter:o,theme:{style:l}}=this,{cx:c,cy:u}=n.pos,{margin:f}=e.state,d=hc(e,r,xr),h=!!(r!=null&&r.some(m=>m&&xr(e,m)));!c||!u||o.withTranslation(f.left,f.top,()=>{var m,S,E;for(const C of e.filterTargetsToShow()){if(!xr(e,C)||!Yr(e,C)||ni(e,C)&&!KT(e,C))continue;const w=e.color(C.id),$=yc(e,C),z=wr(e,C),B=!!e.config.point_radialGradient,W=WT(e,C,$,B),H=Wr(e,C),_=H.end-H.start,q=W?Qf(e.state.width,e.state.height,ns(e,C,C.values[H.start]||C.values[0])):null,st=yo(e,C)*z;s.fillStyle=w,s.globalAlpha=st;const it=l.shape.pointFillColor||w,ot=l.shape.pointStrokeColor||w,ct=ot?(m=l.shape.pointLineWidth)!=null?m:1:0,gt=!!ot&&ct>0,tt=gt&&$==="circle"&&ae(st)&&st<1&&it===ot;if(!h&&!B&&$==="circle")if(s.fillStyle=it,gt&&!tt&&(s.strokeStyle=ot,s.lineWidth=ct),_>BT)for(let ft=H.start;ft<H.end;ft++){const lt=C.values[ft];if(!An(e,lt))continue;const bt=ns(e,C,lt),St=tt?bt+ct/2:bt,Mt=c(lt,ft),Ot=u(lt,ft);gn(Mt,Ot)&&(q&&!_f(q,Mt,Ot)||(s.beginPath(),s.arc(Mt,Ot,St,0,Math.PI*2),s.fill(),gt&&!tt&&s.stroke()))}else{s.beginPath();for(let ft=H.start;ft<H.end;ft++){const lt=C.values[ft];if(!An(e,lt))continue;const bt=ns(e,C,lt),St=tt?bt+ct/2:bt,Mt=c(lt,ft),Ot=u(lt,ft);gn(Mt,Ot)&&o.traceCircle(Mt,Ot,St)}s.fill(),gt&&!tt&&s.stroke()}else for(let ft=H.start;ft<H.end;ft++){const lt=C.values[ft];if(!An(e,lt))continue;const bt=d(lt),St=ns(e,C,lt),Mt=bt?(E=(S=e.pointExpandedR)==null?void 0:S.call(e,lt))!=null?E:St*1.75:St,Ot=c(lt,ft),Kt=u(lt,ft),ee=es(e,lt),Ae=ee||w,Ee=l.shape.pointFillColor||Ae,Te=l.shape.pointStrokeColor||Ae,De=bt&&(ee||l.focusPoint.fill)||Ee,me=bt?ee||l.focusPoint.stroke||Ae:Te,Pe=bt?l.focusPoint.lineWidth:ct,Zt=yo(e,lt)*z,he=!!me&&(Pe!=null?Pe:0)>0,ge=$==="circle"&&he&&ae(Zt)&&Zt<1&&De===me,Wt=ge?Mt+(Pe||0)/2:Mt;gn(Ot,Kt)&&(s.fillStyle=B?YT(e,s,lt,Ot,Kt,Mt,Ae):De,s.globalAlpha=Zt,ts(o,$,Ot,Kt,Wt,he&&!ge?{fill:s.fillStyle,stroke:me,lineWidth:Pe}:void 0,St))}}})}drawSelections(e,n){var r,i;const s=(r=e.getCanvasSelectedData)==null?void 0:r.call(e);if(!e.config.data_selection_enabled||!(s!=null&&s.length)||e.state.hasTreemap)return;const{ctx:o,painter:l,theme:{style:c}}=this,{margin:u}=e.state,f=er.bind(null,e),d=Vn.bind(null,e),h=s.some(f)?e.generateGetBarPoints(tr(e,n,qt.BAR,f),!1):null,m=s.some(d)?(i=e.generateGetCandlestickPoints)==null?void 0:i.call(e,tr(e,n,qt.CANDLESTICK,d),!1):null,S=h?uo(e):null,E=S?ic(e):new Set;l.withTranslation(u.left,u.top,()=>{s.forEach(C=>{var w,$,z,B,W,H,_;const q=e.color(C.id);if(f(C)&&h){const st=Qi(e,h,C,C.index);if(!st)return;const{points:it,rect:ot}=st,ct=S?sc(e,C,it,S,E).corners:0;S?l.fillRoundRect(ot,ct,{fill:"#fff",alpha:.3}):l.fillRect(ot,{fill:"#fff",alpha:.3}),S?l.strokeRoundRect(ot,ct,{stroke:q,lineWidth:2}):l.strokeRect(ot,{stroke:q,lineWidth:2})}else if(d(C)&&m){if(!((w=e.getCandlestickData)==null?void 0:w.call(e,C)))return;const it=_i(e,m,C,C.index);if(!it)return;const{body:ot,wickStart:ct,wickEnd:gt}=it;l.strokePath(()=>{l.traceLine(ct[0],ct[1],gt[0],gt[1])},{stroke:q,lineWidth:3}),l.fillRect(ot,{fill:"#fff",alpha:.3}),l.strokeRect(ot,{stroke:q,lineWidth:2})}else if(xr(e,C)){const st=yc(e,{id:C.id}),{x:it,y:ot}=Ji(e,C),ct=(z=($=e.pointR)==null?void 0:$.call(e,C))!=null?z:2.5,gt=(W=(B=e.pointSelectR)==null?void 0:B.call(e,C))!=null?W:ct*2;if(!gn(it,ot))return;ts(l,"circle",it,ot,gt,{fill:c.selectedPoint.fill,lineWidth:c.selectedPoint.lineWidth,stroke:c.selectedPoint.stroke||q}),(H=e.isPointFocusOnly)!=null&&H.call(e)||ts(l,st,it,ot,ct,{fill:c.shape.pointFillColor||q,stroke:c.shape.pointStrokeColor||q,lineWidth:(_=c.shape.pointLineWidth)!=null?_:1})}}),o.globalAlpha=1})}drawLabels(e,n){var r;if(!((r=e.hasDataLabel)!=null&&r.call(e)))return;const{ctx:i,painter:s,theme:{style:o}}=this,{margin:l}=e.state,{cx:c,cy:u}=n.pos,f=n.indices[qt.BAR]?e.generateGetBarPoints(n.indices[qt.BAR],!1):null,d=e.generateGetCandlestickPoints?e.generateGetCandlestickPoints(tr(e,n,qt.CANDLESTICK,Vn.bind(null,e)),!1):null,h=e.filterTargetsToShow().filter(C=>(er(e,C)||xr(e,C)||ji(e,C)||Vn(e,C))&&Yr(e,C)),m=[];let S=0;h.forEach(C=>{const w=Wr(e,C),$=e.labelishData(C),z=[];for(let B=0;B<$.length;B++){const W=$[B],H=zd(e,W);H&&W.index>=w.start&&W.index<w.end&&An(e,W)&&z.push({d:W,text:H})}S+=z.length,z.length&&m.push(z)});const E={size:()=>S};s.withTranslation(l.left,l.top,()=>{i.font=o.label.font,i.textAlign="center",m.forEach(C=>{var w,$;for(const{d:z,text:B}of C){let W,H;if(er(e,z)&&f){const _=Qi(e,f,z,z.index);if(!_)continue;const{points:q,rect:st}=_,it=e.getBaseValue(z),ot=fo(e,q[2]),ct=it<0,gt=vc(i,B,0,0).h;W=e.config.axis_rotated&&!e.config.data_labels.centered?ot[0]+(ct?-4:4):st.x+st.w/2,H=e.config.data_labels.centered||e.config.axis_rotated?st.y+st.h/2:ot[1]+(ct?gt-3:-3),i.textAlign=e.config.axis_rotated&&!e.config.data_labels.centered?ct?"right":"left":"center",i.textBaseline=e.config.data_labels.centered||e.config.axis_rotated?"middle":"alphabetic"}else if(Vn(e,z)&&d){const _=(w=e.getCandlestickData)==null?void 0:w.call(e,z),q=_i(e,d,z,z.index),st=_==null?void 0:_._isUp;if(!q)continue;const{wickEnd:it,wickStart:ot}=q,ct=e.config[`axis_${($=e.axis)==null?void 0:$.getId(z.id)}_inverted`];W=e.config.axis_rotated?st?it[0]+4:ot[0]-4:ot[0],H=e.config.axis_rotated?ot[1]+3:st?it[1]-3:ot[1]+12,!e.config.axis_rotated&&ct&&(H+=15*(st?1:-1)),i.textAlign=e.config.axis_rotated?st?"left":"right":"center",i.textBaseline="alphabetic"}else c&&u&&({x:W,y:H}=j0(n.pos,z,z.index),{x:W,y:H}=Xd(e,i,z,W,H));W+=po(e,z,"x",E),H+=po(e,z,"y",E),gn(W,H)&&this.drawDataLabel(e,z,B,W,H)}})})}drawEmptyLabel(e){const n=e.config.data_empty_label_text,r=e.filterTargetsToShow();if(!n||r.length)return;const{margin:i,width:s,height:o}=e.state,{style:l}=this.theme;this.painter.text(String(n),i.left+s/2,i.top+o/2,{fill:l.emptyLabel.color,font:l.emptyLabel.font,textAlign:"center",textBaseline:"middle"})}drawZoomBrush(e,n,r){const{axis_rotated:i}=e.config,{height:s,margin:o,width:l}=e.state,c=Math.min(n,r),u=Math.abs(r-n),f=i?{x:o.left,y:o.top+c,w:l,h:u}:{x:o.left+c,y:o.top,w:u,h:s};u<=0||this.painter.fillRect(f,{fill:this.theme.style.zoomBrush.fill,alpha:this.theme.style.zoomBrush.opacity})}drawSelectionDragArea(e,n){const{margin:r,width:i,height:s}=e.state,o={x:r.left,y:r.top,w:i,h:s},l=Math.max(o.x,n.x),c=Math.max(o.y,n.y),u=Math.min(o.x+o.w,n.x+n.w),f=Math.min(o.y+o.h,n.y+n.h);u<=l||f<=c||this.painter.fillRect({x:l,y:c,w:u-l,h:f-c},{fill:this.theme.style.zoomBrush.fill,alpha:this.theme.style.zoomBrush.opacity})}drawTreemaps(e){var n;const{ctx:r,painter:i,theme:{style:s}}=this,{config:o}=e,l=(n=e.getTreemapRoot)==null?void 0:n.call(e,e.data.targets),c=(l==null?void 0:l.children)||[];i.withState(()=>{var u;r.lineWidth=s.treemap.lineWidth,r.strokeStyle=s.treemap.stroke;for(const f of c){const{data:d}=f;if(!kl(e,d))continue;const{x:h,y:m,w:S,h:E}=ai(e,f,l,!0);if(!gn(h,m)||!gn(h+S,m+E)||S<=0||E<=0)continue;const C={x:h,y:m,w:S,h:E};if(r.fillStyle=e.color(d.name),i.fillRect(C),i.strokeRect(C),!o.treemap_label_show||(d.ratio||0)<(o.treemap_label_threshold||0))continue;const w=Y0(e,d,S,E);if(!w)continue;const $=w.split(`
`),z=!!o.data_labels.centered;r.font=s.label.font;const B=mr(r.font),W=r.measureText((u=$[0])!=null?u:""),H=(W.fontBoundingBoxAscent||0)+(W.fontBoundingBoxDescent||0)||(W.actualBoundingBoxAscent||0)+(W.actualBoundingBoxDescent||0),_=Math.max(B,H)+($.length-1)*B,q=z?m+E/2:m+_+5;let st=z?h+S/2:h+5,it=q-($.length-1)*B/(z?2:1);r.textAlign=z?"center":"left",r.textBaseline=z?"middle":"alphabetic",{x:st,y:it}=this.drawLabelImage(e,d,w,st,it),r.fillStyle=kd(e,d,s.label.color),Gd(e,i,d,w,st,z?it+($.length-1)*B/2:q),$.forEach((ot,ct)=>{i.text(ot,st,it+ct*B,{maxWidth:Math.max(0,S-8)})})}})}drawSubchartFocus(e,n){const{config:r,scale:i,state:s}=e,o=n==null?void 0:n.find(C=>C&&An(e,C));if(!o||!r.subchart_show||r.subchart_grid_focus_continuous||r.subchart_brush_enabled!==!1||r.grid_focus_show===!1||r.subchart_grid_focus===!1||!r.tooltip_show||r.axis_tooltip||!i.subX||s.width2<=0||s.height2<=0)return;const{margin2:l,width2:c,height2:u}=s,f=i.subX(o.x);if(!Number.isFinite(f))return;const{painter:d,theme:{style:h}}=this,m=h.axis.lineWidth,S=d.crisp(l.left+f,m),E=d.crisp(l.top+f,m);d.strokePath(()=>{r.axis_rotated?d.traceLine(l.left,E,l.left+c,E):d.traceLine(S,l.top,S,l.top+u)},{lineDash:h.focusGrid.dashArray,lineWidth:h.focusGrid.lineWidth,stroke:h.focusGrid.lineColor})}drawFocus(e,n){if(!(n!=null&&n.length))return;const{painter:r}=this,{style:i}=this.theme,{margin:s}=e.state,o=n.find(l=>l&&An(e,l));e.config.subchart_grid_focus!==!1&&!rc(e)&&this.drawSubchartFocus(e,n),r.withTranslation(s.left,s.top,()=>{if(e.config.tooltip_show&&e.config.grid_focus_show!==!1&&!e.config.axis_tooltip&&o){const{x:l,y:c}=Ji(e,o),u=i.axis.lineWidth,f=e.config.axis_rotated,d=Number.isFinite(f?c:l),h=Number.isFinite(f?l:c),m=z=>r.crisp(s.left+z,u)-s.left,S=z=>r.crisp(s.top+z,u)-s.top,E=e.config.grid_focus_edge&&!e.config.tooltip_grouped,C=rc(e),w=C?e.state.margin2.left-s.left+e.state.width2:e.state.width,$=C?e.state.margin2.top-s.top+e.state.height2:e.state.height;d&&r.strokePath(()=>{var z,B;if(f){if(r.traceLine(m(0),c,E&&h?l:m(w),c),h&&e.config.grid_focus_y&&!e.config.tooltip_grouped){const W=((z=e.axis)==null?void 0:z.getId(o.id))==="y2";r.traceLine(l,E&&!W?c:S(0),l,E&&W?c:S(e.state.height))}}else if(r.traceLine(l,E&&h?c:S(0),l,S($)),h&&e.config.grid_focus_y&&!e.config.tooltip_grouped){const W=((B=e.axis)==null?void 0:B.getId(o.id))==="y2";r.traceLine(E&&W?l:m(0),c,E&&!W?l:m(e.state.width),c)}},{lineDash:i.focusGrid.dashArray,lineWidth:i.focusGrid.lineWidth,stroke:i.focusGrid.lineColor})}e.config.point_show&&!e.state.canvasFocusMainRedraw&&n.filter(l=>l&&An(e,l)&&xr(e,l)&&Yr(e,{id:l.id})).forEach(l=>{var c,u,f,d;const h=yc(e,{id:l.id}),{x:m,y:S}=Ji(e,l),E=(u=(c=e.pointR)==null?void 0:c.call(e,l))!=null?u:2.5,C=(d=(f=e.pointExpandedR)==null?void 0:f.call(e,l))!=null?d:E*1.75,w=es(e,l),$=w||e.color(l.id),z=w||i.focusPoint.fill||i.shape.pointFillColor||$,B=w||i.focusPoint.stroke||$,W=i.focusPoint.lineWidth,H=yo(e,l),_=!!B&&(W!=null?W:0)>0,q=h==="circle"&&_&&ae(H)&&H<1&&z===B;gn(m,S)&&ts(r,h,m,S,q?C+(W||0)/2:C,_&&!q?{fill:z,lineWidth:W,stroke:B,alpha:H}:{fill:z,alpha:H},E)}),this.drawFocusLabels(e,n)})}}var _T=Object.defineProperty,lh=Object.getOwnPropertySymbols,qT=Object.prototype.hasOwnProperty,t1=Object.prototype.propertyIsEnumerable,e1=(t,e,n)=>e in t?_T(t,e,{enumerable:!0,configurable:!0,writable:!0,value:n}):t[e]=n,n1=(t,e)=>{var n={};for(var r in t)qT.call(t,r)&&e.indexOf(r)<0&&(n[r]=t[r]);if(t!=null&&lh)for(var r of lh(t))e.indexOf(r)<0&&t1.call(t,r)&&(n[r]=t[r]);return n},rs=(t,e,n)=>e1(t,typeof e!="symbol"?e+"":e,n);const Or="http://www.w3.org/2000/svg";function Le(t,e){const n=typeof t=="number"?t:parseFloat(t!=null?t:"");return Number.isFinite(n)?n:e}function Da(t,e){const n=Le(t.opacity,1),r=Le(t["fill-opacity"],1),i=n*r;return Number.isFinite(i)?i:e}function ke(t,e){const n=t==null?void 0:t.trim();return n&&!/^(none|transparent|rgba\(0,\s*0,\s*0,\s*0\))$/i.test(n)?n:e}function si(t,e){const n=ke(t,""),r=e?ke(e,""):"";return n&&n!==r?n:void 0}function oi(t,e){const n=typeof t=="number"?t:parseFloat(t!=null?t:""),r=typeof e=="number"?e:parseFloat(e!=null?e:"");return Number.isFinite(n)&&(!Number.isFinite(r)||n!==r)?n:void 0}function as(t){return Array.isArray(t)?t.filter(e=>Number.isFinite(e)&&e>0):(t||"").split(/[,\s]+/).map(e=>parseFloat(e)).filter(e=>Number.isFinite(e)&&e>0)}function r1(t,e){const n=t.getPropertyValue("font").trim();if(n)return n;const r=t.getPropertyValue("font-size").trim(),i=t.getPropertyValue("font-family").trim();if(!r||!i)return e;const s=t.getPropertyValue("font-style").trim(),o=t.getPropertyValue("font-variant").trim(),l=t.getPropertyValue("font-weight").trim(),c=t.getPropertyValue("line-height").trim(),u=c&&c!=="normal"?`${r}/${c}`:r;return[s&&s!=="normal"?s:"",o&&o!=="normal"?o:"",l&&!/^(normal|400)$/.test(l)?l:"",u,i].filter(Boolean).join(" ")}function Pr(t,e){var n;const r=e.replace(/-([a-z])/g,(i,s)=>s.toUpperCase());return(n=t[e])!=null?n:t[r]}function Ke(t,e){const n=Pr(t,e);return(n==null?"":ke(String(n),""))||void 0}function Pn(t,e){const n=Pr(t,e),r=typeof n=="number"?n:parseFloat(String(n!=null?n:""));return Number.isFinite(r)?r:void 0}function da(t){const e=Pn(t,"opacity"),n=Pn(t,"fill-opacity");return e===void 0&&n===void 0?void 0:(e!=null?e:1)*(n!=null?n:1)}function Tc(t){const e=Pr(t,"stroke-dasharray"),n=e==null?[]:as(e);return n.length?n:void 0}function nr(t){var e,n,r,i;const s=Pr(t,"font");if(s!=null&&String(s).trim())return String(s).trim();const o=Pr(t,"font-size"),l=Pr(t,"font-family");if(o==null||l==null)return;const c=String(o).trim(),u=String(l).trim();if(!c||!u)return;const f=String((e=Pr(t,"font-style"))!=null?e:"").trim(),d=String((n=Pr(t,"font-variant"))!=null?n:"").trim(),h=String((r=Pr(t,"font-weight"))!=null?r:"").trim(),m=String((i=Pr(t,"line-height"))!=null?i:"").trim();return[f&&f!=="normal"?f:"",d&&d!=="normal"?d:"",h&&!/^(normal|400)$/.test(h)?h:"",m&&m!=="normal"?`${c}/${m}`:c,u].filter(Boolean).join(" ")}function Qe(t,e,n){var r;const i=Object.keys(n).reduce((s,o)=>(n[o]!==void 0&&(s[o]=n[o]),s),{});Object.keys(i).length&&(t[e]=Xr((r=t[e])!=null?r:{},i))}function ch(t){return t.split(",").map(e=>e.trim().replace(/\s*>\s*/g," ").replace(/\s+/g," ").replace(/^(?:svg)?\.bb\s+/,"").replace(/(^|\s)(?:g|path|rect|line|text|circle)\./g,"$1.")).filter(Boolean)}function bc(t){return Object.keys(t).filter(e=>t[e]!==void 0)}function uh(t,e,n){return bc(e).forEach(r=>{n!=null&&n.has(r)||(t[r]=e[r])}),t}function fh(t){const e=t.split(" ");return e.every((n,r)=>n==="line"||n==="text"?r===e.length-1:/^(\.[A-Za-z_-][\w-]*)+$/.test(n))}function dh(t){const e=t.split(" "),n=e[e.length-1];return n==="line"||n==="text"?n:null}function a1(t){return(t||"").split(/\s+/).filter(Boolean)}function i1(t,e){const n=e==="text"?{labelColor:Ke(t,"fill"),labelFont:nr(t)}:{lineColor:Ke(t,"stroke"),lineWidth:Pn(t,"stroke-width"),dashArray:Tc(t)};return uh({},n)}function s1(t){const e=[];return Object.keys(t!=null?t:{}).forEach(n=>{ch(n).forEach(r=>{const i=dh(r)||"line",s=i1(t[n],i);fh(r)&&bc(s).length&&e.push({selector:r,target:i,style:s})})}),e}function o1(t,e,n,r){if(!fh(t))return!1;const i=dh(t);if(i&&i!==r)return!1;if(!i&&r==="text")return!1;const s=a1(n),o=`bb-${e}grid-line`,l=new Set(["bb-grid","bb-grid-lines",`bb-${e}grid-lines`,o,...s]),c=(t.match(/\.[A-Za-z_-][\w-]*/g)||[]).map(u=>u.slice(1));return!!c.length&&c.every(u=>l.has(u))&&(c.includes(o)||s.some(u=>c.includes(u)))}function l1(t,e,n){switch(e){case".bb-axis path.domain":case".bb-axis .domain":case".bb-axis-x path.domain":case".bb-axis-x .domain":case".bb-axis-y path.domain":case".bb-axis-y .domain":case".bb-axis-y2 path.domain":case".bb-axis-y2 .domain":Qe(t,"axis",{lineColor:Ke(n,"stroke"),lineWidth:Pn(n,"stroke-width")});break;case".bb-axis line":case".bb-axis .tick line":case".bb-axis-x line":case".bb-axis-x .tick line":case".bb-axis-y line":case".bb-axis-y .tick line":case".bb-axis-y2 line":case".bb-axis-y2 .tick line":Qe(t,"axis",{tickColor:Ke(n,"stroke"),tickWidth:Pn(n,"stroke-width")});break;case".bb-axis text":case".bb-axis .tick text":{const r=nr(n);Qe(t,"axis",{labelColor:Ke(n,"fill"),xTickFont:r,yTickFont:r,y2TickFont:r});break}case".bb-axis-x text":case".bb-axis-x .tick text":Qe(t,"axis",{labelColor:Ke(n,"fill"),xTickFont:nr(n)});break;case".bb-axis-y text":case".bb-axis-y .tick text":Qe(t,"axis",{labelColor:Ke(n,"fill"),yTickFont:nr(n)});break;case".bb-axis-y2 text":case".bb-axis-y2 .tick text":Qe(t,"axis",{labelColor:Ke(n,"fill"),y2TickFont:nr(n)});break;case".tick._active_ text":case".bb-axis .tick._active_ text":case".bb-axis-x .tick._active_ text":Qe(t,"axis",{activeLabelColor:Ke(n,"fill")});break;case".bb-axis-x-label":case".bb-axis-x .bb-axis-x-label":Qe(t,"axis",{labelFont:nr(n),xLabelColor:Ke(n,"fill")});break;case".bb-axis-y-label":case".bb-axis-y .bb-axis-y-label":Qe(t,"axis",{labelFont:nr(n),yLabelColor:Ke(n,"fill")});break;case".bb-axis-y2-label":case".bb-axis-y2 .bb-axis-y2-label":Qe(t,"axis",{labelFont:nr(n),y2LabelColor:Ke(n,"fill")});break;case".bb-grid line":case".bb-grid .bb-xgrid":case".bb-grid .bb-ygrid":case".bb-xgrid":case".bb-ygrid":Qe(t,"grid",{lineColor:Ke(n,"stroke"),lineWidth:Pn(n,"stroke-width"),dashArray:Tc(n)});break;case".bb-grid text":Qe(t,"grid",{labelColor:Ke(n,"fill"),labelFont:nr(n)});break;case".bb-xgrid-focus line":case".bb-grid .bb-xgrid-focus line":case".bb-grid .bb-xgrid-focus":Qe(t,"focusGrid",{lineColor:Ke(n,"stroke"),lineWidth:Pn(n,"stroke-width"),dashArray:Tc(n)});break;case".bb-region rect":case".bb-region":Qe(t,"region",{fill:Ke(n,"fill"),opacity:da(n)});break;case".bb-region text":Qe(t,"region",{labelColor:Ke(n,"fill"),labelFont:nr(n)});break;case".bb-bar":Qe(t,"shape",{barOpacity:da(n),barStrokeColor:Ke(n,"stroke"),barLineWidth:Pn(n,"stroke-width")});break;case".bb-bar._expanded_":Qe(t,"shape",{barExpandedOpacity:da(n)});break;case".bb-candlestick":Qe(t,"shape",{candlestickStrokeColor:Ke(n,"stroke"),candlestickLineWidth:Pn(n,"stroke-width")});break;case".bb-candlestick._expanded_":Qe(t,"shape",{candlestickExpandedOpacity:da(n)});break;case".bb-line":Qe(t,"shape",{barConnectLineColor:Ke(n,"stroke"),barConnectLineWidth:Pn(n,"stroke-width"),lineWidth:Pn(n,"stroke-width")});break;case".bb-target.bb-focused .bb-line":case".bb-target.bb-focused path.bb-line":Qe(t,"shape",{lineFocusedWidth:Pn(n,"stroke-width")});break;case".bb-target.bb-defocused":Qe(t,"shape",{targetDefocusedOpacity:Pn(n,"opacity")});break;case".bb-area":Qe(t,"shape",{areaOpacity:da(n)});break;case".bb-circle":Qe(t,"shape",{pointFillColor:Ke(n,"fill"),pointStrokeColor:Ke(n,"stroke"),pointLineWidth:Pn(n,"stroke-width")});break;case".bb-selected-circle":Qe(t,"selectedPoint",{fill:Ke(n,"fill"),stroke:Ke(n,"stroke"),lineWidth:Pn(n,"stroke-width")});break;case".bb-circle._expanded_":Qe(t,"focusPoint",{fill:Ke(n,"fill"),stroke:Ke(n,"stroke"),lineWidth:Pn(n,"stroke-width")});break;case".bb-zoom-brush":Qe(t,"zoomBrush",{fill:Ke(n,"fill"),opacity:da(n)});break;case".bb-brush .extent":case".bb-brush .selection":Qe(t,"subchartBrush",{fill:Ke(n,"fill"),opacity:da(n)});break;case".bb-brush .handle--custom":Qe(t,"subchartBrush",{handleFill:Ke(n,"fill"),handleOpacity:da(n),handleStroke:Ke(n,"stroke"),handleLineWidth:Pn(n,"stroke-width")});break;case".bb-chart-treemaps rect":case".bb-chart-treemaps":Qe(t,"treemap",{stroke:Ke(n,"stroke"),lineWidth:Pn(n,"stroke-width")});break;case".bb-text.bb-empty":case".bb-text .bb-empty":case".bb-empty":Qe(t,"emptyLabel",{color:Ke(n,"fill"),font:nr(n)});break;case".bb-text":Qe(t,"label",{color:Ke(n,"fill"),font:nr(n)});break;case".bb-title":Qe(t,"title",{color:Ke(n,"fill"),font:nr(n)});break}}function c1(t){const e={};return Object.keys(t!=null?t:{}).forEach(n=>{ch(n).forEach(r=>{l1(e,r,t[n])})}),e}function u1(t){if(!t)return{};const e=t,{selectors:n}=e,r=n1(e,["selectors"]);return Xr({},c1(n),r)}function hh(t,e){try{return JSON.stringify({className:t.className,style:t.getAttribute("style")||"",override:e||null})}catch(n){return null}}class f1{constructor(){rs(this,"style"),rs(this,"cacheContainer",null),rs(this,"cacheKey",null),rs(this,"gridLineSelectorOverrides",[]),rs(this,"directGridOverrideKeys",new Set)}load(e,n){var r,i,s,o,l;const c=Ye.createElementNS(Or,"svg");this.gridLineSelectorOverrides=s1(n==null?void 0:n.selectors),this.directGridOverrideKeys=new Set(Object.keys((r=n==null?void 0:n.grid)!=null?r:{})),c.setAttribute("class","bb"),c.style.cssText="position:absolute;visibility:hidden;pointer-events:none;width:0;height:0;overflow:hidden",e.appendChild(c);const u=(wn,Xn)=>{const Hn=se.getComputedStyle(wn),Qn={};for(const Fn of Xn)Qn[Fn]=Fn==="font"?r1(Hn,""):Hn.getPropertyValue(Fn).trim();return Qn},f=(wn,Xn,Hn)=>{const Qn=Ye.createElementNS(Or,wn);Qn.setAttribute("class",Xn),c.appendChild(Qn);const Fn=u(Qn,Hn);return c.removeChild(Qn),Fn},d=(wn,Xn,Hn,Qn)=>{const Fn=Ye.createElementNS(Or,"g"),dr=Ye.createElementNS(Or,Xn);Fn.setAttribute("class",wn),Hn&&dr.setAttribute("class",Hn),Fn.appendChild(dr),c.appendChild(Fn);const na=u(dr,Qn);return c.removeChild(Fn),na},h=(wn,Xn,Hn,Qn,Fn)=>{const dr=Ye.createElementNS(Or,"g"),na=Ye.createElementNS(Or,"g"),As=Ye.createElementNS(Or,Hn);dr.setAttribute("class",wn),na.setAttribute("class",Xn),Qn&&As.setAttribute("class",Qn),na.appendChild(As),dr.appendChild(na),c.appendChild(dr);const kR=u(As,Fn);return c.removeChild(dr),kR},m=(wn,Xn,Hn,Qn="")=>{const Fn=Ye.createElementNS(Or,"g"),dr=Ye.createElementNS(Or,"g"),na=Ye.createElementNS(Or,Xn);Fn.setAttribute("class",`bb-axis ${wn}`),dr.setAttribute("class",["tick",Qn].filter(Boolean).join(" ")),na.textContent=Xn==="text"?"0":"",dr.appendChild(na),Fn.appendChild(dr),c.appendChild(Fn);const As=u(na,Hn);return c.removeChild(Fn),As},S="rgb(1, 2, 3)",E=(wn,Xn)=>{const Hn=Ye.createElement("style");Hn.textContent=`
.bb-shapes-canvas-probe .bb-circle {
fill: ${S};
stroke: ${S};
}
`,Ye.head.appendChild(Hn);try{return d("bb-shapes bb-shapes-canvas-probe","circle",wn,Xn)}finally{Hn.remove()}},C=d("bb-axis bb-axis-x","path","domain",["stroke","stroke-width"]),w=m("bb-axis-x","line",["stroke","stroke-width"]),$=m("bb-axis-x","text",["fill","font"]),z=m("bb-axis-x","text",["fill"],"_active_"),B=m("bb-axis-y","text",["fill","font"]),W=m("bb-axis-y2","text",["fill","font"]),H=d("bb-axis bb-axis-x","text","bb-axis-x-label",["fill","font"]),_=d("bb-axis bb-axis-y","text","bb-axis-y-label",["fill","font"]),q=d("bb-axis bb-axis-y2","text","bb-axis-y2-label",["fill","font"]),st=f("circle","",["fill","stroke","stroke-width"]),it=d("bb-grid","line","bb-ygrid",["stroke","stroke-width","stroke-dasharray"]),ot=d("bb-grid","text","",["fill","font"]),ct=h("bb-grid","bb-xgrid-focus","line","bb-xgrid-focus",["stroke","stroke-width","stroke-dasharray"]),gt=f("text","bb-text bb-empty",["fill","font"]),tt=d("bb-region","rect","",["fill","fill-opacity"]),ft=d("bb-region","text","",["fill","font"]),lt=f("path","bb-bar",["opacity","fill-opacity","stroke","stroke-width"]),bt=f("path","bb-bar _expanded_",["opacity","fill-opacity"]),St=f("path","bb-candlestick",["stroke","stroke-width"]),Mt=f("path","bb-candlestick _expanded_",["opacity","fill-opacity"]),Ot=f("path","bb-line",["stroke-width"]),Kt=d("bb-target bb-focused","path","bb-line",["stroke-width"]),ee=f("g","bb-target bb-defocused",["opacity"]),Ae=f("path","bb-area",["opacity","fill-opacity"]),Ee=f("circle","bb-circle",["fill","stroke","stroke-width"]),Te=f("circle","bb-selected-circle",["fill","stroke","stroke-width"]),De=E("bb-circle _expanded_",["fill","stroke","stroke-width"]),me=f("rect","bb-zoom-brush",["fill","fill-opacity","opacity"]),Pe=d("bb-brush","rect","extent",["fill","fill-opacity","opacity"]),Zt=d("bb-brush","rect","selection",["fill","fill-opacity","opacity"]),he=d("bb-brush","path","handle--custom",["fill","fill-opacity","opacity","stroke","stroke-width"]),ge=d("bb-chart-treemaps","rect","",["stroke","stroke-width"]),Wt=f("text","bb-text",["fill","font"]),We=d("","text","bb-title",["fill","font"]),Xe=ke(me.fill,"#000"),pn=Le(me["fill-opacity"]||me.opacity,.1),Cn=ke(Zt.fill,ke(Pe.fill,Xe)),be=(l=(o=(s=(i=oi(Zt["fill-opacity"],1))!=null?i:oi(Zt.opacity,1))!=null?s:oi(Pe["fill-opacity"],1))!=null?o:oi(Pe.opacity,1))!=null?l:pn,un=ke(he.stroke,"transparent"),an={axis:{lineColor:ke(C.stroke,"#000"),lineWidth:Le(C["stroke-width"],1),tickColor:ke(w.stroke,ke(C.stroke,"#000")),tickWidth:Le(w["stroke-width"],Le(C["stroke-width"],1)),labelFont:_.font||B.font||"10px sans-serif",xTickFont:$.font||B.font||"10px sans-serif",yTickFont:B.font||"10px sans-serif",y2TickFont:W.font||B.font||"10px sans-serif",labelColor:ke(B.fill,"#000"),xLabelColor:ke(H.fill,ke($.fill,"#000")),yLabelColor:ke(_.fill,ke(B.fill,"#000")),y2LabelColor:ke(q.fill,ke(_.fill,ke(B.fill,"#000"))),activeLabelColor:si(z.fill,$.fill)||ke(B.fill,"#000")},grid:{lineColor:ke(it.stroke,"#aaa"),lineWidth:Le(it["stroke-width"],1),dashArray:as(it["stroke-dasharray"]),labelFont:ot.font||B.font||"10px sans-serif",labelColor:ke(ot.fill,"#aaa")},focusGrid:{lineColor:ke(ct.stroke,ke(it.stroke,"#aaa")),lineWidth:Le(ct["stroke-width"],Le(it["stroke-width"],1)),dashArray:as(ct["stroke-dasharray"]||it["stroke-dasharray"])},emptyLabel:{font:gt.font||Wt.font||B.font||"20px sans-serif",color:ke(gt.fill,"#808080")},region:{fill:ke(tt.fill,"steelblue"),opacity:Le(tt["fill-opacity"],.1),labelFont:ft.font||B.font||"10px sans-serif",labelColor:ke(ft.fill,"#000")},shape:{barOpacity:Da(lt,1),barExpandedOpacity:Le(Da(bt,Da(lt,1)),Da(lt,1)),barStrokeColor:ke(lt.stroke,"#000"),barLineWidth:Le(lt["stroke-width"],0),barConnectLineColor:ke(Ot.stroke,"#000"),barConnectLineWidth:Le(Ot["stroke-width"],1),candlestickStrokeColor:ke(St.stroke,"#000"),candlestickLineWidth:Le(St["stroke-width"],1),candlestickExpandedOpacity:Le(Da(Mt,1),1),lineWidth:Le(Ot["stroke-width"],1),lineFocusedWidth:Le(Kt["stroke-width"],2),areaOpacity:Da(Ae,.2),targetDefocusedOpacity:Le(ee.opacity,.3),pointFillColor:si(Ee.fill,st.fill),pointStrokeColor:si(Ee.stroke,st.stroke),pointLineWidth:oi(Ee["stroke-width"],st["stroke-width"])},selectedPoint:{fill:ke(Te.fill,"#fff"),stroke:si(Te.stroke),lineWidth:Le(Te["stroke-width"],2)},focusPoint:{fill:si(De.fill,S),stroke:si(De.stroke,S),lineWidth:Le(De["stroke-width"],1)},zoomBrush:{fill:Xe,opacity:pn},subchartBrush:{fill:Cn,opacity:be,handleFill:ke(he.fill,"transparent"),handleOpacity:Da(he,1),handleStroke:un,handleLineWidth:Le(he["stroke-width"],un==="transparent"?0:1)},treemap:{stroke:ke(ge.stroke,"#fff"),lineWidth:Le(ge["stroke-width"],1)},label:{font:Wt.font||B.font||"10px sans-serif",color:ke(Wt.fill,"#000")},title:{font:We.font||Wt.font||B.font||"14px sans-serif",color:ke(We.fill,"#000")}},Nr=u1(n),te=Xr(an,Nr),ma=n==null?void 0:n.axis,zR=!!ma&&Object.prototype.hasOwnProperty.call(ma,"labelColor"),UR=!!ma&&Object.prototype.hasOwnProperty.call(ma,"labelFont");if(te.axis.lineWidth=Le(te.axis.lineWidth,an.axis.lineWidth),te.axis.tickWidth=Le(te.axis.tickWidth,te.axis.lineWidth),UR){const wn=ma,Xn=te.axis.labelFont;wn.xTickFont===void 0&&(te.axis.xTickFont=Xn),wn.yTickFont===void 0&&(te.axis.yTickFont=Xn),wn.y2TickFont===void 0&&(te.axis.y2TickFont=Xn)}if(te.axis.labelFont=te.axis.labelFont||an.axis.labelFont,te.axis.xTickFont=te.axis.xTickFont||te.axis.labelFont,te.axis.yTickFont=te.axis.yTickFont||te.axis.labelFont,te.axis.y2TickFont=te.axis.y2TickFont||te.axis.yTickFont,te.axis.labelColor=ke(te.axis.labelColor,an.axis.labelColor),zR){const wn=te.axis.labelColor;ma.xLabelColor===void 0&&(te.axis.xLabelColor=wn),ma.yLabelColor===void 0&&(te.axis.yLabelColor=wn),ma.y2LabelColor===void 0&&(te.axis.y2LabelColor=wn)}te.axis.xLabelColor=ke(te.axis.xLabelColor,te.axis.labelColor),te.axis.yLabelColor=ke(te.axis.yLabelColor,te.axis.labelColor),te.axis.y2LabelColor=ke(te.axis.y2LabelColor,te.axis.yLabelColor),te.axis.activeLabelColor=ke(te.axis.activeLabelColor,te.axis.labelColor),te.grid.lineWidth=Le(te.grid.lineWidth,an.grid.lineWidth),te.grid.dashArray=as(te.grid.dashArray),te.focusGrid.lineWidth=Le(te.focusGrid.lineWidth,an.focusGrid.lineWidth),te.focusGrid.dashArray=as(te.focusGrid.dashArray),te.region.opacity=Le(te.region.opacity,an.region.opacity),te.shape.barOpacity=Le(te.shape.barOpacity,an.shape.barOpacity),te.shape.barExpandedOpacity=Le(te.shape.barExpandedOpacity,te.shape.barOpacity),te.shape.barLineWidth=Le(te.shape.barLineWidth,an.shape.barLineWidth),te.shape.barConnectLineWidth=Le(te.shape.barConnectLineWidth,an.shape.barConnectLineWidth),te.shape.candlestickLineWidth=Le(te.shape.candlestickLineWidth,an.shape.candlestickLineWidth),te.shape.candlestickStrokeColor=ke(te.shape.candlestickStrokeColor,an.shape.candlestickStrokeColor),te.shape.candlestickExpandedOpacity=Le(te.shape.candlestickExpandedOpacity,an.shape.candlestickExpandedOpacity),te.shape.lineWidth=Le(te.shape.lineWidth,an.shape.lineWidth),te.shape.lineFocusedWidth=Le(te.shape.lineFocusedWidth,an.shape.lineFocusedWidth),te.shape.areaOpacity=Le(te.shape.areaOpacity,an.shape.areaOpacity),te.shape.targetDefocusedOpacity=Le(te.shape.targetDefocusedOpacity,an.shape.targetDefocusedOpacity),te.shape.pointLineWidth=oi(te.shape.pointLineWidth),te.selectedPoint.lineWidth=Le(te.selectedPoint.lineWidth,an.selectedPoint.lineWidth),te.focusPoint.lineWidth=Le(te.focusPoint.lineWidth,an.focusPoint.lineWidth),te.zoomBrush.opacity=Le(te.zoomBrush.opacity,an.zoomBrush.opacity),te.subchartBrush.opacity=Le(te.subchartBrush.opacity,an.subchartBrush.opacity),te.subchartBrush.handleOpacity=Le(te.subchartBrush.handleOpacity,an.subchartBrush.handleOpacity),te.subchartBrush.handleLineWidth=Le(te.subchartBrush.handleLineWidth,an.subchartBrush.handleLineWidth),te.treemap.lineWidth=Le(te.treemap.lineWidth,an.treemap.lineWidth),this.style=te,this.cacheContainer=e,this.cacheKey=hh(e,n),c.remove()}reload(e,n){const r=hh(e,n);r!==null&&this.style&&this.cacheContainer===e&&this.cacheKey===r||this.load(e,n)}getGridLineStyle(e,n={},r="line"){const i={};for(const s of this.gridLineSelectorOverrides)o1(s.selector,e,n.class,r)&&uh(i,s.style,this.directGridOverrideKeys);return bc(i).length?i:void 0}}var d1=Object.defineProperty,h1=(t,e,n)=>e in t?d1(t,e,{enumerable:!0,configurable:!0,writable:!0,value:n}):t[e]=n,yr=(t,e,n)=>h1(t,typeof e!="symbol"?e+"":e,n);const Fa=24,vh=64,Sc=[xr,er,Vn];function li(t,e){return Math.floor(t/e)}function gh(t,e,n){var r,i;const s=li(e.x,n),o=li(e.x+((r=e.w)!=null?r:0),n),l=li(e.y,n),c=li(e.y+((i=e.h)!=null?i:0),n);for(let u=s;u<=o;u++)for(let f=l;f<=c;f++){const d=`${u}:${f}`,h=t.get(d);h?h.push(e):t.set(d,[e])}}function ph(t,e,n,r,i=0){const s=li(e,r),o=li(n,r),l=[];for(let c=-i;c<=i;c++)for(let u=-i;u<=i;u++){const f=t.get(`${s+c}:${o+u}`);if(f!=null&&f.length)for(let d=0;d<f.length;d++)l.push(f[d])}return l}function v1(t,e){var n,r,i;const s=t.config.point_sensitivity;if(Number.isFinite(s))return s;(n=t.pointR)==null||n.call(t,e);const o=(i=(r=t.getPointSensitivity)==null?void 0:r.call(t,e))!=null?i:Fa;return Number.isFinite(o)?o:Fa}function g1(t,e){return la(t,e)&&e.values.length>Zf&&!t.config.data_selection_enabled&&Number.isFinite(t.config.point_sensitivity)&&Number.isFinite(t.config.point_r)}class p1{constructor(){yr(this,"bars",[]),yr(this,"points",[]),yr(this,"indices",[]),yr(this,"barGrid",new Map),yr(this,"pointGrid",new Map),yr(this,"plot",{x:0,y:0,w:0,h:0}),yr(this,"pointCellSize",Fa),yr(this,"maxPointSensitivity",Fa),yr(this,"grouped",!1),yr(this,"pointBased",!1),yr(this,"indexAxis","x")}rebuild(e,n){var r,i,s;const{current:o,margin:l,width:c,height:u}=e.state,f=e.filterTargetsToShow();this.bars=[],this.points=[],this.indices=[],this.barGrid=new Map,this.pointGrid=new Map,this.maxPointSensitivity=Fa,this.indexAxis=e.config.axis_rotated?"y":"x",this.plot=e.state.hasTreemap?{x:0,y:0,w:o.width,h:o.height}:{x:l.left,y:l.top,w:c,h:u},this.grouped=!!e.config.tooltip_grouped&&!e.state.hasTreemap,this.pointBased=!(e.config.axis_x_forceAsSingle&&this.grouped)&&(!!((r=e.isMultipleX)!=null&&r.call(e))||f.some(C=>la(e,C)||ca(e,C)));const h=this.grouped&&(!this.pointBased||e.config.data_selection_enabled&&e.config.data_selection_grouped)?new Map:null,m=(C,w,$)=>{var z,B;if(!h)return;const W=(B=(z=e.getXCacheKey)==null?void 0:z.call(e,$.x))!=null?B:$.index;Number.isFinite($.index)&&!h.has(W)&&gn(C,w)&&h.set(W,{x:C,y:w,data:$})};if(e.state.hasTreemap){const C=(i=e.getTreemapRoot)==null?void 0:i.call(e,e.data.targets),w=(C==null?void 0:C.children)||[];for(const $ of w){const{data:z}=$;if(!kl(e,z))continue;const{x:B,y:W,w:H,h:_}=ai(e,$,C,!0);!gn(B,W)||!gn(B+H,W+_)||this.addBar({x:B,y:W,w:H,h:_,data:z})}this.indices=[];return}if(n.indices[qt.BAR]||f.some(er.bind(null,e))){const C=er.bind(null,e),w=tr(e,n,qt.BAR,C),$=e.generateGetBarPoints(w,!1);f.filter(C).filter(z=>ei(e,z,Sc)).forEach(z=>{const B=Wr(e,z);for(let W=B.start;W<B.end;W++){const H=z.values[W];if(!An(e,H))continue;const _=Qi(e,$,H,W);if(!_)continue;const{rect:q}=_,st=l.left+q.x,it=l.top+q.y,{w:ot,h:ct}=q;this.addBar({x:st,y:it,w:ot,h:ct,data:H}),m(st+ot/2,it+ct/2,H)}})}if(n.indices[qt.CANDLESTICK]||f.some(Vn.bind(null,e))){const C=Vn.bind(null,e),w=tr(e,n,qt.CANDLESTICK,C),$=(s=e.generateGetCandlestickPoints)==null?void 0:s.call(e,w,!1);$&&f.filter(C).filter(z=>ei(e,z,Sc)).forEach(z=>{var B;const W=Wr(e,z);for(let H=W.start;H<W.end;H++){const _=z.values[H];if(!((B=e.getCandlestickData)==null?void 0:B.call(e,_)))continue;const st=_i(e,$,_,H);if(!st)continue;const{body:it}=st,ot=l.left+it.x,ct=l.top+it.y,{w:gt,h:tt}=it;this.addBar({x:ot,y:ct,w:Math.max(1,gt),h:Math.max(1,tt),data:_}),m(ot+gt/2,ct+tt/2,_)}})}const{cx:S,cy:E}=n.pos;S&&E&&f.filter(xr.bind(null,e)).filter(C=>ei(e,C,Sc)).forEach(C=>{const w=Wr(e,C),$=g1(e,C)?Qf(c,u,e.config.point_r):null;for(let z=w.start;z<w.end;z++){const B=C.values[z];if(!An(e,B))continue;const W=l.left+S(B,z),H=l.top+E(B,z),_=v1(e,B);gn(W,H)&&($&&!_f($,W-l.left,H-l.top)||(this.addPoint({x:W,y:H,sensitivity:_,data:B}),m(W,H,B)))}}),this.buildPointGrid(),this.indices=h?Array.from(h.values()).sort((C,w)=>C[this.indexAxis]-w[this.indexAxis]):[]}hitBar(e,n){for(const r of ph(this.barGrid,e,n,vh)){const{w:i=0,h:s=0}=r;if(e>=r.x&&e<=r.x+i&&n>=r.y&&n<=r.y+s)return r.data}return null}hitPoint(e,n){var r,i;let s=null,o=Number.POSITIVE_INFINITY;for(const l of ph(this.pointGrid,e,n,this.pointCellSize,1)){const c=l.x-e,u=l.y-n,f=Math.sqrt(c*c+u*u),d=(r=l.sensitivity)!=null?r:Fa;f<=d&&f<o&&(o=f,s=l)}return(i=s==null?void 0:s.data)!=null?i:null}findNearest(e,n){const r=this.hitBar(e,n);if(r)return r;if(!this.pointBased&&this.grouped&&this.isWithinPlot(e,n)){const i=this.findNearestIndexItem(e,n);if(i)return i.data}return this.hitPoint(e,n)}findNearestShape(e,n){var r;return(r=this.hitBar(e,n))!=null?r:this.hitPoint(e,n)}findNearestIndexByCoord(e,n){var r,i;return(i=(r=this.findNearestIndexItem(e,n))==null?void 0:r.data)!=null?i:null}findInRect(e,n=!1){const r=Math.min(e.x,e.x+e.w),i=Math.max(e.x,e.x+e.w),s=Math.min(e.y,e.y+e.h),o=Math.max(e.y,e.y+e.h),l=new Set,c=[],u=f=>{const d=f.data,h=`${d.id}:${d.index}`;l.has(h)||(l.add(h),c.push(d))};if(n){const f=this.indexAxis,d=f==="y"?s:r,h=f==="y"?o:i;return this.indices.filter(m=>m[f]>=d&&m[f]<=h).forEach(u),c}return this.bars.filter(f=>{var d,h;const m=(d=f.w)!=null?d:0,S=(h=f.h)!=null?h:0;return!(i<f.x||f.x+m<r)&&!(o<f.y||f.y+S<s)}).forEach(u),this.points.filter(f=>f.x>=r&&f.x<=i&&f.y>=s&&f.y<=o).forEach(u),c}addBar(e){this.bars.push(e),gh(this.barGrid,e,vh)}addPoint(e){var n;const r=(n=e.sensitivity)!=null?n:Fa;this.maxPointSensitivity=Math.max(this.maxPointSensitivity,r),this.points.push(e)}buildPointGrid(){this.pointCellSize=Math.max(1,this.maxPointSensitivity),this.pointGrid=new Map;for(const e of this.points)gh(this.pointGrid,e,this.pointCellSize)}isWithinPlot(e,n){const{plot:r}=this;return e>=r.x&&e<=r.x+r.w&&n>=r.y&&n<=r.y+r.h}findNearestIndexItem(e,n){const{indexAxis:r,indices:i}=this,s=r==="y"?n:e;if(!i.length)return null;let o=0,l=i.length-1;for(;o<l;){const f=o+l>>1;i[f][r]<s?o=f+1:l=f}const c=i[o],u=i[o-1];return u&&Math.abs(u[r]-s)<Math.abs(c[r]-s)?u:c}}var m1=Object.defineProperty,mh=Object.getOwnPropertySymbols,x1=Object.prototype.hasOwnProperty,y1=Object.prototype.propertyIsEnumerable,xh=(t,e,n)=>e in t?m1(t,e,{enumerable:!0,configurable:!0,writable:!0,value:n}):t[e]=n,cn=(t,e)=>{for(var n in e||(e={}))x1.call(e,n)&&xh(t,n,e[n]);if(mh)for(var n of mh(e))y1.call(e,n)&&xh(t,n,e[n]);return t};const ze={button:"bb-button",chart:"bb-chart",empty:"bb-empty",main:"bb-main",target:"bb-target",EXPANDED:"_expanded_",dummy:"_dummy_"},Ze={arc:"bb-arc",arcLabelLine:"bb-arc-label-line",arcLabelLineText:"bb-arc-label-line-text",arcRange:"bb-arc-range",arcs:"bb-arcs",chartArc:"bb-chart-arc",chartArcs:"bb-chart-arcs",chartArcsBackground:"bb-chart-arcs-background",chartArcsTitle:"bb-chart-arcs-title",needle:"bb-needle"},To={area:"bb-area",areas:"bb-areas"},Rn={axis:"bb-axis",axisX:"bb-axis-x",axisXLabel:"bb-axis-x-label",axisY:"bb-axis-y",axisY2:"bb-axis-y2",axisY2Label:"bb-axis-y2-label",axisYLabel:"bb-axis-y-label",axisXTooltip:"bb-axis-x-tooltip",axisYTooltip:"bb-axis-y-tooltip",axisY2Tooltip:"bb-axis-y2-tooltip",axisTooltipX:"bb-axis-tooltip-x",axisTooltipY:"bb-axis-tooltip-y"},rr={bar:"bb-bar",bars:"bb-bars",chartBar:"bb-chart-bar",chartBars:"bb-chart-bars",barConnectLine:"bb-bar-connectLine"},Kr={candlestick:"bb-candlestick",candlesticks:"bb-candlesticks",chartCandlestick:"bb-chart-candlestick",chartCandlesticks:"bb-chart-candlesticks",valueDown:"bb-value-down",valueUp:"bb-value-up"},$n={chartCircles:"bb-chart-circles",circle:"bb-circle",circles:"bb-circles"},Ac={colorPattern:"bb-color-pattern",colorScale:"bb-colorscale"},Na={dragarea:"bb-dragarea",INCLUDED:"_included_"},is={funnel:"bb-funnel",chartFunnel:"bb-chart-funnel",chartFunnels:"bb-chart-funnels",funnelBackground:"bb-funnel-background"},ar={chartArcsGaugeMax:"bb-chart-arcs-gauge-max",chartArcsGaugeMin:"bb-chart-arcs-gauge-min",chartArcsGaugeUnit:"bb-chart-arcs-gauge-unit",chartArcsGaugeTitle:"bb-chart-arcs-gauge-title",gaugeValue:"bb-gauge-value"},$e={legend:"bb-legend",legendBackground:"bb-legend-background",legendItem:"bb-legend-item",legendItemEvent:"bb-legend-item-event",legendItemHidden:"bb-legend-item-hidden",legendItemPoint:"bb-legend-item-point",legendItemTile:"bb-legend-item-tile"},Mr={chartLine:"bb-chart-line",chartLines:"bb-chart-lines",line:"bb-line",lines:"bb-lines"},Zr={eventRect:"bb-event-rect",eventRects:"bb-event-rects",eventRectsMultiple:"bb-event-rects-multiple",eventRectsSingle:"bb-event-rects-single"},nn={focused:"bb-focused",defocused:"bb-defocused",legendItemFocused:"bb-legend-item-focused",xgridFocus:"bb-xgrid-focus",xgridFocusContinuous:"bb-xgrid-focus-continuous",ygridFocus:"bb-ygrid-focus"},yn={grid:"bb-grid",gridLines:"bb-grid-lines",xgrid:"bb-xgrid",xgridLine:"bb-xgrid-line",xgridLines:"bb-xgrid-lines",xgrids:"bb-xgrids",ygrid:"bb-ygrid",ygridLine:"bb-ygrid-line",ygridLines:"bb-ygrid-lines",ygrids:"bb-ygrids"},Jr={level:"bb-level",levels:"bb-levels"},yh={chartRadar:"bb-chart-radar",chartRadars:"bb-chart-radars"},ss={region:"bb-region",regions:"bb-regions"},on={selectedCircle:"bb-selected-circle",selectedCircles:"bb-selected-circles",SELECTED:"_selected_"},Tn={shape:"bb-shape",shapes:"bb-shapes"},Th={brush:"bb-brush",subchart:"bb-subchart"},En={chartText:"bb-chart-text",chartTexts:"bb-chart-texts",text:"bb-text",texts:"bb-texts",title:"bb-title",textBorderRect:"bb-text-border",textLabelImage:"bb-text-label-image",TextOverlapping:"text-overlapping"},bo={tooltip:"bb-tooltip",tooltipContainer:"bb-tooltip-container",tooltipName:"bb-tooltip-name"},bh={treemap:"bb-treemap",chartTreemap:"bb-chart-treemap",chartTreemaps:"bb-chart-treemaps"},Ec={buttonZoomReset:"bb-zoom-reset",zoomBrush:"bb-zoom-brush"};var Re=cn(cn(cn(cn(cn(cn(cn(cn(cn(cn(cn(cn(cn(cn(cn(cn(cn(cn(cn(cn(cn(cn(cn(cn(cn(cn({},ze),Ze),To),Rn),rr),Kr),$n),Ac),Na),ar),$e),Mr),Zr),nn),is),yn),Jr),yh),ss),on),Tn),Th),En),bo),bh),Ec),T1={boost_useCssRule:!1,boost_useWorker:!1,boost_workerUrl:void 0},b1={color_pattern:[],color_tiles:void 0,color_threshold:{},color_onover:void 0},S1={legend_contents_bindto:void 0,legend_contents_template:"<span style='color:#fff;padding:5px;background-color:{=COLOR}'>{=TITLE}</span>",legend_equally:!1,legend_hide:!1,legend_inset_anchor:"top-left",legend_inset_x:10,legend_inset_y:0,legend_inset_step:void 0,legend_item_interaction:!0,legend_item_dblclick:!1,legend_item_onclick:void 0,legend_item_onover:void 0,legend_item_onout:void 0,legend_item_tile_width:10,legend_item_tile_height:10,legend_item_tile_r:5,legend_item_tile_type:"rectangle",legend_format:void 0,legend_padding:0,legend_position:"bottom",legend_show:!0,legend_tooltip:!1,legend_usePoint:!1},A1={bindto:"#chart",background:{},clipPath:!0,svg_classname:void 0,size_width:void 0,size_height:void 0,padding:!0,padding_mode:void 0,padding_left:void 0,padding_right:void 0,padding_top:void 0,padding_bottom:void 0,resize_auto:!0,resize_timer:!0,resize_live:!1,onclick:void 0,onover:void 0,onout:void 0,onresize:void 0,onresized:void 0,onbeforeinit:void 0,oninit:void 0,onafterinit:void 0,onrendered:void 0,transition_duration:250,plugins:[],render:{},render_mode:"svg",canvas_theme:{},regions:[]},E1={title_text:void 0,title_padding:{top:0,right:0,bottom:0,left:0},title_position:"center"},C1={tooltip_show:!0,tooltip_doNotHide:!1,tooltip_grouped:!0,tooltip_format_title:void 0,tooltip_format_name:void 0,tooltip_format_value:void 0,tooltip_position:void 0,tooltip_contents:{},tooltip_init_show:!1,tooltip_init_x:0,tooltip_init_position:void 0,tooltip_linked:!1,tooltip_linked_name:"",tooltip_onshow:()=>{},tooltip_onhide:()=>{},tooltip_onshown:()=>{},tooltip_onhidden:()=>{},tooltip_order:null},I1={data_x:void 0,data_idConverter:t=>t,data_names:{},data_classes:{},data_type:void 0,data_types:{},data_order:"desc",data_groups:[],data_groupsZeroAs:"positive",data_color:void 0,data_colors:{},data_labels:{},data_labels_backgroundColors:void 0,data_labels_colors:void 0,data_labels_position:{},data_labels_imgUrl:void 0,data_hide:!1,data_filter:void 0,data_onclick:()=>{},data_onover:()=>{},data_onout:()=>{},data_onshown:void 0,data_onhidden:void 0,data_onmin:void 0,data_onmax:void 0,data_url:void 0,data_headers:void 0,data_json:void 0,data_rows:void 0,data_columns:void 0,data_mimeType:"csv",data_keys:void 0,data_empty_label_text:""},R1={interaction_enabled:!0,interaction_brighten:!0,interaction_inputType_mouse:!0,interaction_inputType_touch:{},interaction_onout:!0},w1=Object.defineProperty,O1=(t,e,n)=>e in t?w1(t,e,{enumerable:!0,configurable:!0,writable:!0,value:n}):t[e]=n,P1=(t,e,n)=>O1(t,typeof e!="symbol"?e+"":e,n);const Sh=class rm{static setOptions(e){for(let n=0;n<e.length;n++)Object.assign(this.data,e[n])}constructor(){return Xy(A1,T1,I1,b1,R1,S1,E1,C1,rm.data)}};P1(Sh,"data",{});let $a=Sh;class M1{constructor(){return{chart:null,main:null,svg:null,axis:{x:null,y:null,y2:null,subX:null,subY:null,subY2:null},axisTooltip:{x:null,y:null,y2:null},defs:null,tooltip:null,legend:null,title:null,subchart:{main:null,bar:null,line:null,area:null},arcs:null,bar:null,candlestick:null,line:null,area:null,circle:null,radar:null,text:null,grid:{main:null,x:null,y:null},gridLines:{main:null,x:null,y:null},region:{main:null,list:null},eventRect:null,zoomResetBtn:null}}}class L1{constructor(){return{width:0,width2:0,height:0,height2:0,margin:{top:0,bottom:0,left:0,right:0},margin2:{top:0,bottom:0,left:0,right:0},margin3:{top:0,bottom:0,left:0,right:0},arcWidth:0,arcHeight:0,xAxisHeight:0,hasAxis:!1,hasFunnel:!1,hasRadar:!1,hasTreemap:!1,isCanvasMode:!1,canvasShape:null,canvasFocusKey:null,canvasSubchartBrushDragging:!1,canvasSubchartBrushMode:null,canvasSubchartBrushStart:null,canvasSubchartBrushOrigin:null,canvasSubchartBrushMoved:!1,canvasFlowFrame:null,canvasFlowFinish:null,canvasFocusMainRedraw:!1,cssRule:{},loading:void 0,domain:void 0,subchartSourceTypes:void 0,current:{domain:void 0,width:0,height:0,dataMax:0,maxTickSize:{x:{width:0,height:0,ticks:[],clipPath:0,domain:""},y:{width:0,height:0,domain:""},y2:{width:0,height:0,domain:""}},types:[],needle:void 0,zoomDomain:null},isLegendRight:!1,isLegendInset:!1,isLegendTop:!1,isLegendLeft:!1,legendStep:0,legendItemWidth:0,legendItemHeight:0,legendHasRendered:!1,canvasInlineStyle:{minHeight:""},canvasSelection:new Set,canvasSelectionDragStart:null,canvasSelectionDragIncluded:new Set,canvasSelectionDragging:!1,canvasSelectionDragMoved:!1,canvasSelectionDragMoveHandler:null,canvasSelectionDragEndHandler:null,eventReceiver:{currentIdx:-1,rect:{},data:[],coords:[]},axis:{x:{padding:{left:0,right:0},tickCount:0}},rotatedPadding:{left:30,right:0,top:5},withoutFadeIn:{},inputType:"",datetimeId:"",clip:{id:"",idXAxis:"",idYAxis:"",idXAxisTickTexts:"",idGrid:"",idSubchart:"",path:"",pathXAxis:"",pathYAxis:"",pathXAxisTickTexts:"",pathGrid:""},event:null,dragStart:null,dragging:!1,flowing:!1,cancelClick:!1,mouseover:!1,rendered:!1,transiting:!1,redrawing:!1,resizing:!1,resizePreview:!1,resizeRedrawTime:0,resizeLiveScale:null,toggling:!1,zooming:!1,hasNegativeValue:!1,hasPositiveValue:!0,orgAreaOpacity:"0.2",orgConfig:{},hiddenTargetIds:new Set,hiddenLegendIds:new Set,focusedTargetIds:new Set,defocusedTargetIds:new Set,radius:0,innerRadius:0,outerRadius:void 0,innerRadiusRatio:0,gaugeArcWidth:0,radiusExpanded:0,xgridAttr:{x1:null,x2:null,y1:null,y2:null},pendingRaf:null,rafBatchQueue:[],dirty:{data:!1,visibility:!1,size:!1},redrawGeneration:0,dataGeneration:0,_targetsToShow:null,_cachedDrawShape:null,_canvasVisibleRangeCache:null,_canvasXDataTickCache:null,_canvasXTickValuesCache:null,_eventRectFingerprint:null,_lastTooltipMouse:null,_gridFocusEl:null,generateClassCache:new Map}}}const Ah={element:M1,state:L1};class D1{constructor(){Object.keys(Ah).forEach(e=>{this[e]=new Ah[e]})}getStore(e){return this[e]}}var F1=Object.defineProperty,N1=(t,e,n)=>e in t?F1(t,e,{enumerable:!0,configurable:!0,writable:!0,value:n}):t[e]=n,$1=(t,e,n)=>N1(t,typeof e!="symbol"?e+"":e,n);const Oe={bubbleBaseLength:"$baseLength",bubbleMaxValue:"$bubbleMaxValue",colorPattern:"__colorPattern__",dataMinMax:"$dataMinMax",dataTotalSum:"$dataTotalSum",dataTotalPerIndex:"$totalPerIndex",visibleTotalPerIndex:"$visibleTotalPerIndex",domainMinMax:"$domainMinMax",filteredTargets:"$filteredTargets",svgLeft:"$svgLeft",valuesByX:"$valuesByX",legendItemTextBox:"legendItemTextBox",legendItemMap:"$legendItemMap",radarPoints:"$radarPoints",radarTextWidth:"$radarTextWidth",setOverOut:"setOverOut",callOverOutForTouch:"callOverOutForTouch",textRect:"textRect",shapeOffset:"$shapeOffset",maxTickSize:"$maxTickSize",maxDataCountTarget:"$maxDataCountTarget",valuesXIndexMap:"$valuesXIndexMap"};class B1{constructor(){$1(this,"cache",new Map)}add(e,n,r=!1){const i=r?this.cloneTarget(n):n;return this.cache.set(e,i),i}remove(e){const n=je(e)?[e]:e;for(let r=0;r<n.length;r++)this.cache.delete(n[r])}get(e,n=!1){if(n&&Array.isArray(e)){const r=[];for(let i=0,s;s=e[i];i++)this.cache.has(s)&&r.push(this.cache.get(s));return r}else return this.cache.has(e)?this.cache.get(e):null}has(e){return this.cache.has(e)}getKeys(){return Array.from(this.cache.keys())}reset(e,n){e?this.cache.clear():this.cache.forEach((r,i)=>{/^\$/.test(i)&&(n!=null&&n.some(s=>i.startsWith(s))||this.cache.delete(i))})}cloneTarget(e){return{id:e.id,id_org:e.id_org,values:e.values.map(n=>({x:n.x,value:n.value,id:n.id}))}}}const Eh="https://github.com/naver/billboard.js/blob/master/MODULE_IMPORTS.md";function z1(t){const e=t,{config:n}=e;let r="";if(lr(n.data_type||n.data_types)&&!e[dn.LINE])r="line";else for(const i in dn){const s=qt[i];if(e.hasType(s)&&!e[dn[i]]){r=s;break}}r&&Ch(`Please, make sure if %c${Gy(r)}`,"module has been imported and specified correctly.",Eh)}function Iw(t){const e=Fs[t];e&&Ch(`Please, make sure if %c${e}`,"module has been imported and specified correctly.",Eh)}function Ch(t,e,n){var r;const i="[billboard.js]";if((r=se.console)==null?void 0:r.error){const o=e?["background:red;color:white;display:block;font-size:15px",e]:[];console.error(`\u274C ${i} ${t}`,"background:red;color:white;display:block;font-size:15px",...o),n&&console.info("%c\u2139\uFE0F","font-size:15px",n)}throw Error(`${i} ${t.replace(/\%c([a-z-]+)/i,"'$1' ")} ${e!=null?e:""}`)}function U1(t){let e;for(;e=t.sourceEvent;)t=e;return t}function ur(t,e){if(t=U1(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]}const k1=/\s?(bb-)/g,G1=/\.+/g;function X1(t){return t.replace(k1,".$1").replace(G1,".")}function Ih(t,e,n=!1){const r=s=>s[t?"getBoundingClientRect":"getBBox"](),i=t?"rectClient":"rectBBox";return n?r(e):!(i in e)||e.hasAttribute("width")&&e[i].width!==+(e.getAttribute("width")||0)?e[i]=r(e):e[i]}function ci(t,e,n=[-1,1],r=!1){if(!(!t||!je(e)))if(e.indexOf(`
`)===-1)t.text(e);else{const i=[t.text(),e].map(s=>s.replace(/[\s\n]/g,""));if(i[0]!==i[1]){const s=e.split(`
`),o=r?s.length-1:1;t.html(""),s.forEach((l,c)=>{t.append("tspan").attr("x",0).attr("dy",`${c===0?n[0]*o:n[1]}em`).text(l)})}}}function Rh(t){const{x:e,y:n,width:r,height:i}=ha(t,!0);return[{x:e,y:n+i},{x:e,y:n},{x:e+r,y:n},{x:e+r,y:n+i}]}function wh(t){const{width:e,height:n}=ln(t),r=Rh(t),i=r[0].x,s=Math.min(r[0].y,r[1].y);return{x:i,y:s,width:e,height:n}}function Jn(t,e){var n;const r=t&&((n=t.touches||t.sourceEvent&&t.sourceEvent.touches)==null?void 0:n[0]);let i=[0,0];try{i=ur(r||t,e)}catch(s){}return i.map(s=>isNaN(s)?0:s)}function ln(t,e=!1){return Ih(!0,t,e)}function ha(t,e=!1){return Ih(!1,t,e)}function W1(t,e,n){const{rootSelector:r="",sheet:i}=t,s=`${r} ${X1(e)} {${n.join(";")}}`;return i[i.insertRule?"insertRule":"addRule"](s,i.cssRules.length)}function V1(t){let e=[];return t.forEach(n=>{var r;try{n.cssRules&&n.cssRules.length&&(e=e.concat(Oa(n.cssRules)))}catch(i){(r=se.console)==null||r.warn(`Error while reading rules from ${n.href}: ${String(i)}`)}}),e}function Oh(t){var e,n,r,i,s,o;return{x:((n=(e=se.pageXOffset)!=null?e:se.scrollX)!=null?n:0)+((r=t.scrollLeft)!=null?r:0),y:((s=(i=se.pageYOffset)!=null?i:se.scrollY)!=null?s:0)+((o=t.scrollTop)!=null?o:0)}}function So(t,e=0,n=0,r=!0){const i=new DOMPoint(e,n),s=t.getScreenCTM(),o=i.matrixTransform(r?s==null?void 0:s.inverse():s);if(r===!1){const l=ln(t);o.x-=l.x,o.y-=l.y}return o}function Cc(t){const e=t?t.transform:null,n=e&&e.baseVal;return n&&n.numberOfItems?n.getItem(0).matrix:{a:0,b:0,c:0,d:0,e:0,f:0}}function Ic(t,e){var n;const r=(n=t==null?void 0:t.getAttribute)==null?void 0:n.call(t,e);if(r)return parseFloat(r);const i=Cc(t);return e==="x"?i.e:i.f}function Rc(t){const e=t.attr("viewBox");return e?e.trim().split(/[\s,]+/).length===4:!1}function j1(t,e,n=!1){const r=!!t.node;let i=!1;for(const[s,o]of Object.entries(e))if(i=r?t.style(s)===o:t.style[s]===o,n?!i:i)break;return i}function os(){var t,e;return((t=Ye)==null?void 0:t.hidden)===!1||((e=Ye)==null?void 0:e.visibilityState)==="visible"}function H1(t,e){const{DocumentTouch:n,matchMedia:r,navigator:i}=se,s=r==null?void 0:r("(pointer:coarse)").matches;let o=!1;if(e)if(i&&"maxTouchPoints"in i)o=i.maxTouchPoints>0;else if("ontouchmove"in se||n&&Ye instanceof n)o=!0;else if(s)o=!0;else{const c=i.userAgent;o=/\b(BlackBerry|webOS|iPhone|IEMobile)\b/i.test(c)||/\b(Android|Windows Phone|iPad|iPod)\b/i.test(c)}return t&&!s&&(r==null?void 0:r("(pointer:fine)").matches)&&"mouse"||o&&"touch"||"mouse"}function Ph(t,e){t.pendingRaf!==null?(se.cancelAnimationFrame(t.pendingRaf),t.pendingRaf=se.requestAnimationFrame(()=>{t.pendingRaf=null,e()})):(t.pendingRaf=se.requestAnimationFrame(()=>{t.pendingRaf=null}),e())}const wc={mouse:(()=>{const t=()=>({bubbles:!1,cancelable:!1,screenX:0,screenY:0,clientX:0,clientY:0});try{return new MouseEvent("t"),(e,n,r=t())=>{e.dispatchEvent(new MouseEvent(n,r))}}catch(e){return(n,r,i=t())=>{const s=Ye.createEvent("MouseEvent");s.initMouseEvent(r,i.bubbles,i.cancelable,se,0,i.screenX,i.screenY,i.clientX,i.clientY,!1,!1,!1,!1,0,null),n.dispatchEvent(s)}}})(),touch:(t,e,n)=>{const r=new Touch(Xr({identifier:Date.now(),target:t,radiusX:2.5,radiusY:2.5,rotationAngle:10,force:.5},n));t.dispatchEvent(new TouchEvent(e,{cancelable:!0,bubbles:!0,shiftKey:!0,touches:[r],targetTouches:[],changedTouches:[r]}))}},{setTimeout:Y1,clearTimeout:K1}=se;function Z1(t,e){const n=[];let r,i=null;const s=function(){s.clear(),e&&i===null&&(i=$f(()=>{i=null,e()})),t===!1?r=Bf(()=>{r=null,n.forEach(o=>o())},{timeout:200}):r=Y1(()=>{r=null,n.forEach(o=>o())},ae(t)?t:200)};return s.clear=()=>{r&&((t===!1?by:K1)(r),r=null)},s.clearLive=()=>{i!==null&&(Ty(i),i=null)},s.add=o=>n.push(o),s.remove=o=>{const l=n.indexOf(o);l!==-1&&n.splice(l,1)},s}function Mh(){let t=[];const e=function(n,r){function i(){var s;let o=0;for(let l=0,c;c=t[l];l++){if(c===!0||(s=c.empty)!=null&&s.call(c)){o++;continue}if(os()===!1){o=t.length;break}try{c.transition()}catch(u){o++}}return o===t.length}Hf(()=>{r==null||r()},i)};return e.add=function(n){qe(n)?t=t.concat(n):t.push(n)},e}const Lr={},Ao=new Set,Ba=new Map,J1=5e3,Lh=3;let Q1=0;function _1(){try{return"var bbWorker=(function(e){Object.defineProperty(e,Symbol.toStringTag,{value:`Module`});function t(e){let t=[];return e.forEach(function(e,n){let r=e[0];e.forEach(function(e,i){if(i>0){if(t[i-1]===void 0&&(t[i-1]={}),e===void 0)throw Error(`Source data is missing a component at (${n}, ${i})!`);t[i-1][r]=e}})}),t}function n(e){let t=e[0],n=[];return e.forEach(function(e,r){if(r>0){let i={};e.forEach(function(e,n){if(e===void 0)throw Error(`Source data is missing a component at (${r}, ${n})!`);i[t[n]]=e}),n.push(i)}}),n}function r(e,r){let i=[],a,o;if(Array.isArray(e)){let t=function(e,t){if(e[t]!==void 0)return e[t];let n=t.replace(/\\[(\\w+)\\]/g,`.$1`).replace(/^\\./,``).split(`.`),r=e;return n.some(function(e){return!(r=r&&typeof r==`object`&&e in r?r[e]:void 0)}),r};a=r.x?r.value.concat(r.x):r.value,i.push(a),e.forEach(function(e){let n=a.map(function(n){let r=t(e,n);return r===void 0&&(r=null),r});i.push(n)}),o=n(i)}else Object.keys(e).forEach(function(t){let n=[].concat(e[t]);n.unshift?.(t),i.push(n)}),o=t(i);return o}let i={columns:t,json:r,rows:n},a=self;function o({data:e}){let{args:t,id:n,op:r}=e;try{let e=i[r];if(!e)throw Error(`Unknown worker op: ${r}`);a.postMessage({id:n,result:e(...t)})}catch(e){a.postMessage({id:n,error:e&&(e.message||e.name)||String(e)})}}return typeof window>`u`&&(a.onmessage=o),e.handleMessage=o,e.ops=i,e})({});"}catch(t){return""}}function Oc(){const{Blob:t,Worker:e,URL:n}=se;return e&&t&&(n!=null&&n.createObjectURL)&&(n!=null&&n.revokeObjectURL)?{Blob:t,Worker:e,URL:n}:null}function Dh(){return se.Worker||null}function q1(t){var e,n;return typeof t=="number"?{timeout:t,workerUrl:""}:{timeout:(e=t==null?void 0:t.timeout)!=null?e:J1,workerUrl:(n=t==null?void 0:t.workerUrl)!=null?n:""}}function Fh(t,e=!1){var n,r;const i=Lr[t];e&&Ao.add(t),i&&((n=i.worker)==null||n.terminate(),i.revoke&&((r=Oc())==null||r.URL.revokeObjectURL(i.src)),delete Lr[t]);for(const s of Ba.keys())s.startsWith(`${t}:`)&&Ba.delete(s)}function tb(t,e){if(t===e)return!0;try{return JSON.stringify(t)===JSON.stringify(e)}catch(n){return!0}}function eb(t){const[e,...n]=t;return Array.isArray(e)?[e.slice(0,Lh).map(r=>Array.isArray(r)?r.slice(0,Lh+1):r),...n]:t}function Nh(t,e,n,r){const i=++Q1;let s=!1,o;const l=new Promise((c,u)=>{const f=(S,E)=>{s||(s=!0,o(),S(E))},d=function(S){var E;((E=S.data)==null?void 0:E.id)===i&&(S.data.error?f(u,new Error(S.data.error)):f(c,S.data.result))},h=function(){f(u,new Error("worker error"))},m=setTimeout(()=>f(u,new Error("worker timeout")),r);o=()=>{clearTimeout(m),t.removeEventListener("message",d),t.removeEventListener("error",h)},t.addEventListener("message",d),t.addEventListener("error",h)});try{t.postMessage({args:n,id:i,op:e})}catch(c){throw s=!0,o(),c}return l}function nb(t,e,n,r,i,s){const o=eb(i),l=Nh(t,n,o,s).then(c=>tb(c,r(...o)),()=>!1).then(c=>(c?Ba.set(e,!0):Ba.delete(e),c));return Ba.set(e,l),l}function rb(t,e=""){const n=!!Dh(),r=e?null:Oc(),i=e?"":_1(),s=e||"blob";if(!n||!e&&(!r||!i)||Ao.has(s))return null;if(!(s in Lr))try{if(e)Lr[s]={revoke:!1,src:e,worker:null};else if(r){const o=new r.Blob([i],{type:"text/javascript"});Lr[s]={revoke:!0,src:r.URL.createObjectURL(o),worker:null}}}catch(o){return null}return{key:s,src:Lr[s].src}}function ab(t,e){const n=Lr[t],r=Dh();if(!n||!r||Ao.has(t))return null;if(!n.worker)try{n.worker=new r(e)}catch(i){return Fh(t,!0),null}return n.worker}function Pc(t=!0,e,n,r,i){const{timeout:s,workerUrl:o}=q1(i),l=function(...u){const f=n(...u);r(f)};let c=l;if(t){const u=rb(e,o),f=u?ab(u.key,u.src):null;if(f&&u){const{key:d}=u;c=function(...h){var m;const S=()=>{Fh(d,!0),c=l,l(...h)};try{const E=`${d}:${e}`,C=(m=Ba.get(E))!=null?m:nb(f,E,e,n,h,s);Nh(f,e,h,s).then(w=>{C===!0?r(w):C.then($=>$?r(w):S())},S)}catch(E){S()}}}}return c}function ib(){const t=Oc();for(const e in Lr){const n=Lr[e];n.worker&&n.worker.terminate(),n.src&&n.revoke&&(t==null||t.URL.revokeObjectURL(n.src)),delete Lr[e]}Ao.clear(),Ba.clear()}const Mc=34,ls=10,Lc=13;function $h(t){const e=t.charCodeAt(0);function n(i,s){const o=[];let l=i.length,c=0,u=0,f=l<=0,d=!1;i.charCodeAt(0)===65279&&c++,i.charCodeAt(l-1)===ls&&--l,i.charCodeAt(l-1)===Lc&&--l;function h(){if(f)return null;if(d)return d=!1,null;const S=c;let E,C;if(i.charCodeAt(S)===Mc){for(;++c<l;)if(i.charCodeAt(c)===Mc){if(i.charCodeAt(c+1)!==Mc)break;c++}return(C=c++)>=l?f=!0:(E=i.charCodeAt(c++))===ls?d=!0:E===Lc&&(d=!0,i.charCodeAt(c)===ls&&++c),i.slice(S+1,C).replace(/""/g,'"')}for(;c<l;){if((E=i.charCodeAt(C=c++))===ls)d=!0;else if(E===Lc)d=!0,i.charCodeAt(c)===ls&&++c;else if(E!==e)continue;return i.slice(S,C)}return f=!0,i.slice(S,l)}let m;for(;(m=h())!==null;){const S=[];for(;m!==null;)S.push(m),m=h();if(s){const E=s(S,u++);E!=null&&o.push(E)}else o.push(S)}return o}function r(i,s){let o=[];return n(i,(l,c)=>{var u;if(c===0)return o=l,null;const f={};for(let d=0;d<o.length;d++)f[o[d]]=(u=l[d])!=null?u:"";return s?s(f,c-1,o):f})}return{parse:r,parseRows:n}}const Bh=$h(","),zh=$h(" "),sb=Bh.parse,ob=Bh.parseRows,lb=zh.parse,cb=zh.parseRows;function Uh(t){const e=[];return t.forEach(function(n,r){const i=n[0];n.forEach(function(s,o){if(o>0){if(typeof e[o-1]=="undefined"&&(e[o-1]={}),typeof s=="undefined")throw new Error(`Source data is missing a component at (${r}, ${o})!`);e[o-1][i]=s}})}),e}function kh(t){const e=t[0],n=[];return t.forEach(function(r,i){if(i>0){const s={};r.forEach(function(o,l){if(typeof o=="undefined")throw new Error(`Source data is missing a component at (${i}, ${l})!`);s[e[l]]=o}),n.push(s)}}),n}function Gh(t,e){const n=[];let r,i;if(Array.isArray(t)){const s=function(o,l){if(o[l]!==void 0)return o[l];const u=l.replace(/\[(\w+)\]/g,".$1").replace(/^\./,"").split(".");let f=o;return u.some(function(d){return!(f=f&&typeof f=="object"&&d in f?f[d]:void 0)}),f};e.x?r=e.value.concat(e.x):r=e.value,n.push(r),t.forEach(function(o){const l=r.map(function(c){let u=s(o,c);return typeof u=="undefined"&&(u=null),u});n.push(l)}),i=kh(n)}else Object.keys(t).forEach(function(s){var o;const l=[].concat(t[s]);(o=l.unshift)==null||o.call(l,s),n.push(l)}),i=Uh(n);return i}function ub(t,e="csv",n,r,i){const s=new XMLHttpRequest,o={csv:fb,tsv:db,json:Gh};s.open("GET",t),n&&Object.keys(n).forEach(function(l){s.setRequestHeader(l,n[l])}),s.onreadystatechange=function(){if(s.readyState===4)if(s.status===200){const l=s.responseText;l&&i.call(this,o[e](e==="json"?JSON.parse(l):l,r))}else throw new Error(`${t}: Something went wrong loading!`)},s.send()}function Xh(t,e){const n=t.rows(e);let r;return n.length===1?(r=[{}],n[0].forEach(i=>{r[0][i]=null})):r=t.parse(e),r}function fb(t){return Xh({rows:ob,parse:sb},t)}function db(t){return Xh({rows:cb,parse:lb},t)}const hb=5e3;function vb(t){var e,n;const r=t[0];if(qe(r)){let i=0;for(let s=0,o=t.length;s<o;s++)i+=(n=(e=t[s])==null?void 0:e.length)!=null?n:0;return i}return t.length*Object.keys(r!=null?r:{}).length}function Wh(t,e){const n=t||(e==null?void 0:e.data_keys);return n!=null&&n.x&&(e.data_x=n.x),n}function gb(t,e,n){const r=this,{config:i}=r;let s;t.forEach(o=>{const l=r.getXKey(o);if(n.customX||n.timeSeries?n.xs.indexOf(l)>=0?s=(n.appendXs&&r.data.xs[o]||[]).concat(e.map((c,u)=>{const f=c[l];return Ge(f)?r.generateTargetX(f,o,u):!1}).filter(c=>c!==!1)):i.data_x?s=this.getOtherTargetXs():vn(i.data_xs)&&(s=r.getXValuesOfXKey(l,r.data.targets)):s=e.map((c,u)=>u),s)r.data.xs[o]=s;else throw new Error(`x is not defined for id = "${o}".`)})}var pb={convertData(t,e){const{config:n}=this,r=o=>!(o!=null&&o.length)||lr(o[0])?!1:n.boost_useWorker==="auto"?vb(o)>=hb:!!n.boost_useWorker,i=n.boost_workerUrl?{workerUrl:n.boost_workerUrl}:void 0;let s=t;if(t.bindto&&(s={},["url","mimeType","headers","keys","json","rows","columns"].forEach(o=>{const l=`data_${o}`;l in t&&(s[o]=t[l])})),s.url&&e)ub(s.url,s.mimeType,s.headers,Wh(s.keys,n),e);else if(s.json)Pc(r(s.json),"json",Gh,e,i)(s.json,Wh(s.keys,n));else if(s.rows)Pc(r(s.rows),"rows",kh,e,i)(s.rows);else if(s.columns)Pc(r(s.columns),"columns",Uh,e,i)(s.columns);else if(t.bindto)throw Error("url or json or rows or columns is required.")},convertDataToTargets(t,e){const n=this,{axis:r,config:i,state:s}=n,o=i.data_type,l=Object.keys(t[0]||{}),{ids:c,xs:u}=l.length?l.reduce((S,E)=>(n.isX.call(n,E)?S.xs.push(E):S.ids.push(E),S),{ids:[],xs:[]}):{ids:[],xs:[]},f={appendXs:e,xs:u,categorized:r==null?void 0:r.isCategorized(),timeSeries:r==null?void 0:r.isTimeSeries(),customX:r==null?void 0:r.isCustomX()};gb.bind(n)(c,t,f);const d=f.customX&&f.categorized&&i.axis_x_categories.length?new Map(i.axis_x_categories.map((S,E)=>[S,E])):null,h=i.data_idConverter.bind(n.api),m=c.map((S,E)=>{const C=h(S),w=n.getXKey(S),$=f.customX&&f.categorized,z=$&&E===0&&(()=>{const H=Yf(i.axis_x_categories);return t.every(_=>H.has(_[w]))})(),B=t.__append__,W=w===null&&B?n.api.data.values(S).length:0;return{id:C,id_org:S,values:t.map((H,_)=>{var q;const st=H[w];let it=H[S],ot;if(it=it!==null&&!isNaN(it)&&!He(it)?+it:qe(it)||He(it)?it:null,($||s.hasRadar)&&E===0&&!mn(st)){!z&&_===0&&!B&&(i.axis_x_categories=[],d&&d.clear());const ct=String(st);ot=(q=d==null?void 0:d.get(ct))!=null?q:-1,ot===-1&&(ot=i.axis_x_categories.length,i.axis_x_categories.push(st),d==null||d.set(ct,ot))}else ot=n.generateTargetX(st,S,W+_);return(mn(it)||n.data.xs[S].length<=_)&&(ot=void 0),{x:ot,value:it,id:C,index:-1}}).filter(H=>sn(H.x))}});if(m.forEach(S=>{var E;i.data_xSort&&(S.values=S.values.sort((C,w)=>{const $=C.x||C.x===0?C.x:1/0,z=w.x||w.x===0?w.x:1/0;return $-z})),S.values.forEach((C,w)=>C.index=w),(E=n.data.xs[S.id])==null||E.sort((C,w)=>C-w)}),s.hasNegativeValue=m.some(S=>S.values.some(E=>E.value!==null&&E.value<0)),s.hasPositiveValue=m.some(S=>S.values.some(E=>E.value!==null&&E.value>0)),o&&n.isValidChartType(o)){const S=n.mapToIds(m).filter(E=>!(E in i.data_types)||!n.isValidChartType(i.data_types[E]));n.setTargetType(S,o)}return m.forEach(S=>n.cache.add(S.id_org,S,!0)),m}};const mb={areaRange:{high:0,mid:1,low:2},candlestick:{open:0,high:1,low:2,close:3,volume:4}};function Vh(t){return qe(t)?t:[t]}var xb={isX(t){const e=this,{config:n}=e,r=n.data_x&&t===n.data_x,i=vn(n.data_xs)&&ky(n.data_xs,t);return r||i},isStackNormalized(){const{config:t}=this;return!!((t.data_stack_normalize===!0||Kn(t.data_stack_normalize))&&t.data_groups.length)},isStackNormalizedPerGroup(){var t;const{config:e}=this;return!!(Kn(e.data_stack_normalize)&&((t=e.data_stack_normalize)!=null&&t.perGroup)&&e.data_groups.length)},isGrouped(t){const e=this.config.data_groups;return t?e.some(n=>n.indexOf(t)>=0&&n.length>1):e.length>0},hasAxisGroupedData(t){const e=this,{axis:n}=e;return e.data.targets.filter(s=>n.getId(s.id)===t).map(s=>s.id).some(s=>e.isGrouped(s))},getXKey(t){const e=this,{config:n}=e;return n.data_x?n.data_x:vn(n.data_xs)?n.data_xs[t]:null},getXValuesOfXKey(t,e){const n=this,r=e&&vn(e)?n.mapToIds(e):[];let i;return r.forEach(s=>{n.getXKey(s)===t&&(i=n.data.xs[s])}),i},getIndexByX(t,e){const n=this;return e?e.indexOf(je(t)?t:+t):(n.filterByX(n.data.targets,t)[0]||{index:null}).index},getXValue(t,e){const n=this;return t in n.data.xs&&n.data.xs[t]&&Ge(n.data.xs[t][e])?n.data.xs[t][e]:e},getOtherTargetXs(){const t=this,e=Object.keys(t.data.xs);return e.length?t.data.xs[e[0]]:null},getOtherTargetX(t){const e=this.getOtherTargetXs();return e&&t<e.length?e[t]:null},addXs(t){const e=this,{config:n}=e;Object.keys(t).forEach(r=>{n.data_xs[r]=t[r]})},isMultipleX(){return!this.config.axis_x_forceAsSingle&&(vn(this.config.data_xs)||this.hasType("bubble")||this.hasType("scatter"))},addName(t){const e=this,{config:n}=e;let r;return t&&(r=n.data_names[t.id],t.name=r!==void 0?r:t.id),t},getAllValuesOnIndex(t,e=!1){const n=this;let r=n.filterTargetsToShow(n.data.targets).map(i=>n.addName(n.getValueOnIndex(i.values,t)));return e&&(r=r.filter(i=>i&&"value"in i&&Ge(i.value))),r},getValueOnIndex(t,e){var n;if(((n=t[e])==null?void 0:n.index)===e)return t[e];const r=t.filter(i=>i.index===e);return r.length?r[0]:null},updateTargetX(t,e){const n=this;t.forEach(r=>{r.values.forEach((i,s)=>{i.x=n.generateTargetX(e[s],r.id,s)}),n.data.xs[r.id]=e})},updateTargetXs(t,e){const n=this;t.forEach(r=>{e[r.id]&&n.updateTargetX([r],e[r.id])})},generateTargetX(t,e,n){const r=this,{axis:i}=r;let s=i!=null&&i.isCategorized()?n:t||n;if(i!=null&&i.isTimeSeries()){const o=Wn.bind(r);s=o(t||r.getXValue(e,n))}else i!=null&&i.isCustomX()&&!(i!=null&&i.isCategorized())&&(s=Ge(t)?+t:r.getXValue(e,n));return s},updateXs(t){t.length&&(this.axis.xs=t.map(e=>e.x))},getPrevX(t){const e=this.axis.xs[t-1];return sn(e)?e:null},getNextX(t){const e=this.axis.xs[t+1];return sn(e)?e:null},getBaseValue(t){const e=this,{hasAxis:n}=e.state;let{value:r}=t;return r&&n&&(e.isAreaRangeType(t)?r=e.getRangedData(t,"mid"):e.isBubbleZType(t)&&(r=e.getBubbleZData(r,"y"))),r},getMinMaxValue(t){const e=this.getBaseValue.bind(this);let n=1/0,r=-1/0;const i=t||this.data.targets.map(s=>s.values);for(let s=0;s<i.length;s++){const o=i[s];for(let l=0;l<o.length;l++){const c=e(o[l]);ae(c)&&(c<n&&(n=c),c>r&&(r=c))}}return{min:n,max:r}},getMinMaxData(){const t=this,e=Oe.dataMinMax;let n=t.cache.get(e);if(!n){const r=t.data.targets.map(u=>u.values),i=t.getMinMaxValue(r),s=[],o=[],{min:l,max:c}=i;r.forEach(u=>{const f=t.getFilteredDataByValue(u,l),d=t.getFilteredDataByValue(u,c);if(f.length)for(let h=0;h<f.length;h++)s.push(f[h]);if(d.length)for(let h=0;h<d.length;h++)o.push(d[h])}),t.cache.add(e,n={min:s,max:o})}return n},getTotalPerIndex(t){const e=this,{config:n}=e,r=t?`${Oe.dataTotalPerIndex}-${t}`:Oe.dataTotalPerIndex,i=e.cache.get(r);let s=(i==null?void 0:i.generation)===e.state.dataGeneration?i.value:null;if((e.config.data_groups.length||e.isStackNormalized())&&!s){s=[];let{targets:o}=e.data;if(e.isStackNormalizedPerGroup()&&t){const l=n.data_groups.find(c=>c.indexOf(t)>=0);if(l)o=o.filter(c=>l.indexOf(c.id)>=0);else return null}o.forEach(l=>{l.values.forEach((c,u)=>{s[u]||(s[u]=0),s[u]+=ae(c.value)?c.value:0})}),e.cache.add(r,{generation:e.state.dataGeneration,value:s})}return s},getVisibleTotalPerIndex(t){const e=this,{api:n,config:r,state:i,cache:s}=e;let o=s.get(Oe.visibleTotalPerIndex);if((!o||o.generation!==i.dataGeneration)&&(o=s.add(Oe.visibleTotalPerIndex,{generation:i.dataGeneration,values:new Map})),o.values.has(t))return o.values.get(t);const l=n.data.values.bind(n),{hiddenTargetIds:c}=i;let u=e.getTotalPerIndex(t);if(u===null)return o.values.set(t,u),u;if(c.size){let f=[...c];if(t){const d=r.data_groups.find(h=>h.indexOf(t)>=0);d&&(f=f.filter(h=>d.indexOf(h)>=0))}if(f.length){let d=l(f,!1);d.length&&(d=d.reduce((h,m)=>h.map((S,E)=>(ae(S)?S:0)+m[E])),u=u.map((h,m)=>h-d[m]))}}return o.values.set(t,u),u},getTotalDataSum(t){const e=this,n=Oe.dataTotalSum;let r=e.cache.get(n);return ae(r)||(r=e.data.targets.reduce((i,s)=>i+s.values.reduce((o,l)=>{var c;return o+((c=l.value)!=null?c:0)},0),0),e.cache.add(n,r)),t&&(r-=e.getHiddenTotalDataSum()),r},getHiddenTotalDataSum(){const t=this,{api:e,state:{hiddenTargetIds:n}}=t;let r=0;return n.size&&(r=e.data.values.bind(e)([...n]).reduce((i,s)=>i+s,0)),r},getFilteredDataByValue(t,e){return t.filter(n=>this.getBaseValue(n)===e)},getMaxDataCount(){const{targets:t}=this.data;let e=0;for(let n=0;n<t.length;n++)t[n].values.length>e&&(e=t[n].values.length);return e},getMaxDataCountTarget(){const t=this,{cache:e,state:n}=t,r=e.get(Oe.maxDataCountTarget);if(r&&r.generation===n.dataGeneration)return r.value;let i=t.filterTargetsToShow()||[];const s=i.length,o=t.config.axis_x_inverted;if(s>1){const l=[];for(let c=0;c<i.length;c++){const u=i[c].values;for(let f=0;f<u.length;f++)l.push(u[f].x)}i=l,i=ti(zl(i)).map((c,u,f)=>({x:c,index:o?f.length-u-1:u}))}else s&&(i=i[0].values.concat());return e.add(Oe.maxDataCountTarget,{value:i,generation:n.dataGeneration}),i},mapToIds(t){return t.map(e=>e.id)},mapToTargetIds(t){const e=this;return t?qe(t)?t.concat():[t]:e.mapToIds(e.data.targets)},hasTarget(t,e){const n=this.mapToIds(t);for(let r=0,i;i=n[r];r++)if(i===e)return!0;return!1},isTargetToShow(t){return!this.state.hiddenTargetIds.has(t)},isLegendToShow(t){return!this.state.hiddenLegendIds.has(t)},getTargetsToShow(){var t;const{state:e}=this;return(t=e._targetsToShow)!=null?t:this.filterTargetsToShow()},filterTargetsToShow(t){const e=this;if(!t){const{cache:n,data:r,state:i}=e,s=Oe.filteredTargets,o=n.get(s);if(o&&o.generation===i.dataGeneration)return o.value;const l=r.targets.filter(c=>e.isTargetToShow(c.id));return n.add(s,{value:l,generation:i.dataGeneration}),l}return t.filter(n=>e.isTargetToShow(n.id))},mapTargetsToUniqueXs(t){const e=this,{axis:n}=e;let r=[];return t!=null&&t.length&&(r=zl(Wy(t.map(i=>i.values.map(s=>+s.x)))),r=n!=null&&n.isTimeSeries()?r.map(i=>new Date(+i)):r.map(Number)),ti(r)},addTargetIds(t,e){const{state:n}=this;Vh(e).forEach(r=>n[t].add(r))},removeTargetIds(t,e){const{state:n}=this;Vh(e).forEach(r=>n[t].delete(r))},addHiddenTargetIds(t){this.addTargetIds("hiddenTargetIds",t),this.cache.remove(Oe.visibleTotalPerIndex)},removeHiddenTargetIds(t){this.removeTargetIds("hiddenTargetIds",t),this.cache.remove(Oe.visibleTotalPerIndex)},addHiddenLegendIds(t){this.addTargetIds("hiddenLegendIds",t)},removeHiddenLegendIds(t){this.removeTargetIds("hiddenLegendIds",t)},getValuesAsIdKeyed(t){const e=this,{hasAxis:n}=e.state,r={},i=e.isMultipleX();let s=null;if(i){const o=e.cache.get(Oe.valuesXIndexMap);if(o&&o.generation===e.state.dataGeneration)s=o.value;else{const l=e.mapTargetsToUniqueXs(e.data.targets).map(c=>je(c)?c:+c);s=new Map(l.map((c,u)=>[c,u])),e.cache.add(Oe.valuesXIndexMap,{value:s,generation:e.state.dataGeneration})}}return t.forEach(o=>{const l=[];o.values.filter(({value:c})=>Ge(c)||c===null).forEach(c=>{let{value:u}=c;if(u!==null&&e.isCandlestickType(c)&&(u=qe(u)?u.slice(0,4):[u.open,u.high,u.low,u.close]),qe(u))l.push(...u);else if(He(u)&&"high"in u)l.push(...Object.values(u));else if(e.isBubbleZType(c))l.push(n&&e.getBubbleZData(u,"y"));else if(i&&s){const f=je(c.x)?c.x:+c.x,d=s.get(f);d!==void 0&&(l[d]=u)}else l.push(u)}),r[o.id]=l}),r},hasMultiTargets(){return this.filterTargetsToShow().length>1},orderTargets(t){const e=this,n=t.slice(),r=e.getSortCompareFn();return r&&n.sort(r),n},getSortCompareFn(t=!1){const e=this,{config:n}=e,r=n.data_order,i=/asc/i.test(r),s=/desc/i.test(r);let o;if(i||s){const l=(u,f)=>u+Math.abs(f.value),c=u=>ae(u)?u:"values"in u?u.values.reduce(l,0):u.value;o=(u,f)=>{const d=c(u),h=c(f);return t?i?d-h:h-d:i?h-d:d-h}}else ie(r)&&(o=r.bind(e.api));return o||null},filterByX(t,e){return this.getValuesByX(t).get(this.getXCacheKey(e))||[]},filterNullish(t){const e=n=>Ge(n.value);return t&&t.filter(n=>"value"in n?e(n):n.values.some(e))},filterRemoveNull(t){return t.filter(e=>Ge(this.getBaseValue(e)))},filterByXDomain(t,e){return t.map(n=>({id:n.id,id_org:n.id_org,values:n.values.filter(r=>e[0]<=r.x&&r.x<=e[1])}))},hasDataLabel(){const t=this.config.data_labels;return Ra(t)&&t||Kn(t)&&vn(t)},hasNullDataValue(t){return t.some(({value:e})=>e===null)},getDataIndexFromEvent(t){const e=this,{$el:n,config:r,state:{hasRadar:i,inputType:s,eventReceiver:{coords:o,rect:l}}}=e;let c;if(i){let u=t.target;/tspan/i.test(u.tagName)&&(u=u.parentNode);const f=Yt(u).datum();c=f&&Object.keys(f).length===1?f.index:void 0}else{const u=r.axis_rotated,f=Oh(n.chart.node()),d=s==="touch"&&t.changedTouches?t.changedTouches[0]:t;let h=u?d.clientY+f.y:d.clientX+f.x;if(Rc(n.svg)){const m=[h,0];u&&m.reverse(),h=So(n.eventRect.node(),...m)[u?"y":"x"]}else h-=u?l.top:l.left;c=Ul(o,h,0,o.length-1,u)}return c},getDataLabelLength(t,e,n){var r,i,s;const o=this,l=1.3,c=[t,e].map(u=>o.dataLabelFormat()(u));if(o.config.render_mode==="canvas"&&!o.$el.svg){const u=(i=(r=o.$el.chart)==null?void 0:r.node)==null?void 0:i.call(r),f=u==null?void 0:u.ownerDocument,d=f==null?void 0:f.createElementNS("http://www.w3.org/2000/svg","svg");if(u&&d){const h=c.map(S=>{const E=f.createElementNS("http://www.w3.org/2000/svg","text");return E.textContent=S,d.appendChild(E),E});d.style.cssText="position:absolute;visibility:hidden;left:-10000px;top:-10000px;",u.appendChild(d);const m=h.map(S=>S.getBoundingClientRect()[n]*l);return d.remove(),m}}return((s=o.getTextRect(c))==null?void 0:s.map(u=>u[n]*l))||[0,0]},isNoneArc(t){return this.hasTarget(this.data.targets,t.id)},isArc(t){return"data"in t&&this.hasTarget(this.data.targets,t.data.id)},findSameXOfValues(t,e){const n=t[e].x,r=[];let i;for(i=e-1;i>=0&&n===t[i].x;i--)r.push(t[i]);for(i=e;i<t.length&&n===t[i].x;i++)r.push(t[i]);return r},getXCacheKey(t){return je(t)?t:+t},getValuesByX(t){const e=this,{cache:n,state:r}=e,i=t.map(l=>{const{values:c}=l,u=c[0],f=c[c.length-1];return`${l.id}:${c.length}:${u?e.getXCacheKey(u.x):""}:${f?e.getXCacheKey(f.x):""}`}).join("|"),s=n.get(Oe.valuesByX);if(s&&s.generation===r.dataGeneration&&s.targetKey===i)return s.value;const o=new Map;for(let l=0;l<t.length;l++){const c=t[l].values;for(let u=0;u<c.length;u++){const f=c[u],d=e.getXCacheKey(f.x),h=o.get(d);h?h.push(f):o.set(d,[f])}}return n.add(Oe.valuesByX,{generation:r.dataGeneration,targetKey:i,value:o}),o},getClosestCandidates(t,e,n=!0){const r=this,{config:i,scale:s}=r,o=t.length,l=t[0];if(!n||o<200||!l||!i.data_xSort)return t;const c=r.isBarType(l.id),u=r.isCandlestickType(l.id),f=i.point_sensitivity;if(!(c||u)&&!ae(f))return t;const d=s.zoom||s.x,h=e[+i.axis_rotated],m=d(t[0].x)<=d(t[o-1].x);let S=0,E=o-1;for(;S<E;){const B=S+E>>1,W=d(t[B].x);(m?W<h:W>h)?S=B+1:E=B}const C=[],w=new Set,$=B=>{B>=0&&B<o&&!w.has(B)&&(w.add(B),C.push(t[B]))},z=B=>{if(B<0||B>=o)return;const W=r.getXCacheKey(t[B].x);let H=B;for(;H>=0&&r.getXCacheKey(t[H].x)===W;)$(H--);for(H=B+1;H<o&&r.getXCacheKey(t[H].x)===W;)$(H++)};if(c||u)for(let B=S-2;B<=S+2;B++)z(B);else{const B=f,W=(H,_)=>{for(let q=H;q>=0&&q<o;q+=_){const st=t[q];if(Math.abs(d(st.x)-h)>B)break;$(q)}};W(S,1),W(S-1,-1)}return C},findClosestFromTargets(t,e){const n=this,r=[];for(let i=0;i<t.length;i++){const s=n.findClosest(t[i].values,e);s&&r.push(s)}return n.findClosest(r,e,!1)},findClosest(t,e,n=!0){const r=this,{$el:{main:i}}=r,s=r.getClosestCandidates(t,e,n);let o,l;for(let c=0;c<s.length;c++){const u=s[c];if(!u||!Ge(u.value))continue;const f=r.isBarType(u.id),d=r.isCandlestickType(u.id);if(f||d){const h=f?`.${rr.chartBar}.${ze.target}${r.getTargetSelectorSuffix(u.id)} .${rr.bar}-${u.index}`:`.${Kr.chartCandlestick}.${ze.target}${r.getTargetSelectorSuffix(u.id)} .${Kr.candlestick}-${u.index} path`;!l&&r.isWithinBar(i.select(h).node())&&(l=u)}else{const h=r.dist(u,e),m=r.getPointSensitivity(u);h<m&&(o===void 0||h<o)&&(o=h,l=u)}}return l},dist(t,e){const n=this,{config:{axis_rotated:r},scale:i}=n,s=+r,o=+!r,l=n.circleY(t,t.index),u=(i.zoom||i.x)(t.x)-e[s],f=l-e[o];return Math.sqrt(u*u+f*f)},convertValuesToStep(t){const e=this,{axis:n,config:r}=e,i=r.line_step_type,s=n?n.isCategorized():!1,o=qe(t)?t.concat():[t];if(!(s||/step\-(after|before)/.test(i)))return t;if(o.length){const l=o[0],c=o[o.length-1],{id:u}=l;let{x:f}=l;o.unshift({x:--f,value:l.value,id:u}),s&&i==="step-after"&&o.unshift({x:f-1,value:l.value,id:u}),f=c.x,o.push({x:++f,value:c.value,id:u}),s&&i==="step-before"&&o.push({x:f+1,value:c.value,id:u})}return o},convertValuesToRange(t){const e=qe(t)?t.concat():[t],n=[];return e.forEach(r=>{const{x:i,id:s}=r;n.push({x:i,id:s,value:r.value[0]}),n.push({x:i,id:s,value:r.value[2]})}),n},updateDataAttributes(t,e){const n=this,{config:r}=n,i=r[`data_${t}`];return mn(e)||(Object.keys(e).forEach(s=>{i[s]=e[s]}),n.redraw({withLegend:!0})),i},getRangedData(t,e="",n="areaRange"){var r,i;const s=t==null?void 0:t.value;if(qe(s)){if(n==="bar")return s.reduce((o,l)=>l-o);{const o=(i=(r=mb[n])==null?void 0:r[e])!=null?i:-1;return o>=0?s[o]:void 0}}else if(s&&e)return s[e];return s},setRatioForGroupedData(t){const e=this,{config:n}=e;if(n.data_groups.length&&t.some(r=>e.isGrouped(r.id))){const r=i=>e.getRatio("index",i,!0);t.forEach(i=>{"values"in i?i.values.forEach(r):r(i)})}},getRatio(t,e,n=!1){const r=this,{config:i,state:s}=r,o=r.api;let l=0;if(e&&o.data.shown().length)if(l=e.ratio||e.value,t==="arc")if(r.pie.padAngle()())l=e.value/r.getTotalDataSum(!0);else{const c=i.gauge_fullCircle?r.getArcLength():r.getStartingAngle()*-2,u=r.hasType("gauge")?c:Math.PI*2;l=(e.endAngle-e.startAngle)/u}else if(t==="index"){const c=r.getVisibleTotalPerIndex(r.isStackNormalizedPerGroup()?e.id:void 0);if(c===null)return l;const u=c[e.index];e.ratio=ae(e.value)&&c&&u?e.value/u:0,l=e.ratio}else if(t==="radar")l=parseFloat(String(Math.max(e.value,0)))/s.current.dataMax*i.radar_size_ratio;else if(t==="bar"){const u=r.getYScaleById.bind(r)(e.id).domain().reduce((f,d)=>d-f);l=u===0?0:Math.abs(r.getRangedData(e,null,t)/u)}else t==="treemap"&&(l/=r.getTotalDataSum(!0));return n&&l?l*100:l},updateDataIndexByX(t){const e=this,n=t.reduce((r,i,s)=>(r[Number(i.x)]=s,r),{});e.data.targets.forEach(r=>{r.values.forEach((i,s)=>{let o=n[Number(i.x)];o===void 0&&(o=s),i.index=o})})},isBubbleZType(t){return this.isBubbleType(t)&&(He(t.value)&&("z"in t.value||"y"in t.value)||qe(t.value)&&t.value.length>=2)},isBarRangeType(t){var e;const n=this,{value:r}=t;return n.isBarType(t)&&!((e=n.isSubchartSourceTypeOf)!=null&&e.call(n,t,qt.CANDLESTICK))&&qe(r)&&r.length>=2&&r.every(ae)},getDataById(t){var e;const n=this.cache.get(t)||this.api.data(t);return(e=n==null?void 0:n[0])!=null?e:n}};function Eo(t,e=!1){const n=this,{api:r}=n;e&&n.api.flush(!0),t==null||t.call(r)}var yb={load(t,e){const n=this,{axis:r,data:i,org:s,scale:o}=n,{append:l}=e,c={domain:null,currentDomain:null,x:null};let u=t;if(u){e.filter&&(u=u.filter(e.filter)),(e.type||e.types)&&u.forEach(d=>{var h;const m=((h=e.types)==null?void 0:h[d.id])||e.type;n.setTargetType(d.id,m)});const f=new Map(u.map(d=>[d.id,d]));i.targets.forEach(d=>{const h=f.get(d.id);if(h){if(l){const m=h.values;for(let S=0;S<m.length;S++)d.values.push(m[S])}else d.values=h.values;f.delete(d.id)}}),f.forEach(d=>i.targets.push(d))}if(n.state.isCanvasMode){n.redraw({withUpdateOrgXDomain:!0,withUpdateXDomain:!0,withLegend:!0}),n.updateTypesElements(),Eo.call(n,e.done,e.resizeAfter);return}n.updateTargets(i.targets),o.zoom&&(c.x=r.isCategorized()?o.x.orgScale():(s.xScale||o.x).copy(),c.domain=n.getXDomain(i.targets),c.x.domain(c.domain),c.currentDomain=n.zoom.getDomain(),n.withinRange(c.currentDomain,void 0,c.domain)||(o.x.domain(c.domain),o.zoom=null,n.$el.eventRect.property("__zoom",null))),n.redraw({withUpdateOrgXDomain:!0,withUpdateXDomain:!0,withLegend:!0}),o.zoom?(s.xDomain=c.domain,s.xScale=c.x,r.isCategorized()&&(c.currentDomain=n.getZoomDomainValue(c.currentDomain),s.xDomain=n.getZoomDomainValue(s.xDomain),s.xScale=c.x.domain(s.xDomain)),n.updateCurrentZoomTransform(c.x,c.currentDomain)):s.xScale&&s.xScale.domain(s.xDomain),n.updateTypesElements(),Eo.call(n,e.done,e.resizeAfter)},loadFromArgs(t){const e=this;e.config&&(e.cache.reset(!1,[Oe.filteredTargets,Oe.maxDataCountTarget,Oe.valuesXIndexMap,Oe.maxTickSize]),e.convertData(t,n=>{const r=t.data||n;t.append&&(r.__append__=!0),r&&e.load(e.convertDataToTargets.call(e,r),t)}))},unload(t,e){var n;const r=this,{state:i,$el:s,$T:o}=r,l=!!((n=r.hasLegendDefsPoint)!=null&&n.call(r));let c=e,u=t;if(r.cache.reset(!1,[Oe.filteredTargets,Oe.maxDataCountTarget,Oe.valuesXIndexMap,Oe.maxTickSize]),c||(c=()=>{}),u=u.filter(h=>r.hasTarget(r.data.targets,h)),u.length===0){c();return}const f=new Set(u);if(i.isCanvasMode){u.forEach(h=>{i.withoutFadeIn[h]=!1}),r.data.targets=r.data.targets.filter(h=>!f.has(h.id)),r.removeHiddenTargetIds(u),r.removeHiddenLegendIds(u),r.updateTypesElements(),c();return}u.forEach(h=>{var m;const S=r.getTargetSelectorSuffix(h);i.withoutFadeIn[h]=!1,s.legend&&s.legend.selectAll(`.${$e.legendItem}${S}`).remove(),l&&((m=s.defs)==null||m.select(`#${r.getDefsPointId(S)}`).remove())}),r.data.targets=r.data.targets.filter(h=>!f.has(h.id)),i.hasFunnel&&r.updateFunnel(r.data.targets),i.hasTreemap&&r.updateTargetsForTreemap(r.data.targets),r.updateTypesElements();const d=s.svg.selectAll(u.map(h=>r.selectorTarget(h)));o(d).style("opacity","0").remove().call(eo,c)}},Tb={value:()=>{}};function jh(){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 Co(n)}function Co(t){this._=t}function bb(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}})}Co.prototype=jh.prototype={constructor:Co,on:function(t,e){var n=this._,r=bb(t+"",n),i,s=-1,o=r.length;if(arguments.length<2){for(;++s<o;)if((i=(t=r[s]).type)&&(i=Sb(n[i],t.name)))return i;return}if(e!=null&&typeof e!="function")throw new Error("invalid callback: "+e);for(;++s<o;)if(i=(t=r[s]).type)n[i]=Hh(n[i],t.name,e);else if(e==null)for(i in n)n[i]=Hh(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 Co(t)},call:function(t,e){if((i=arguments.length-2)>0)for(var n=new Array(i),r=0,i,s;r<i;++r)n[r]=arguments[r+2];if(!this._.hasOwnProperty(t))throw new Error("unknown type: "+t);for(s=this._[t],r=0,i=s.length;r<i;++r)s[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,s=r.length;i<s;++i)r[i].value.apply(e,n)}};function Sb(t,e){for(var n=0,r=t.length,i;n<r;++n)if((i=t[n]).name===e)return i.value}function Hh(t,e,n){for(var r=0,i=t.length;r<i;++r)if(t[r].name===e){t[r]=Tb,t=t.slice(0,r).concat(t.slice(r+1));break}return n!=null&&t.push({name:e,value:n}),t}var Io=jh;const Ab={passive:!1},cs={capture:!0,passive:!1};function Dc(t){t.stopImmediatePropagation()}function ui(t){t.preventDefault(),t.stopImmediatePropagation()}function Fc(t){var e=t.document.documentElement,n=Yt(t).on("dragstart.drag",ui,cs);"onselectstart"in e?n.on("selectstart.drag",ui,cs):(e.__noselect=e.style.MozUserSelect,e.style.MozUserSelect="none")}function Nc(t,e){var n=t.document.documentElement,r=Yt(t).on("dragstart.drag",null);e&&(r.on("click.drag",ui,cs),setTimeout(function(){r.on("click.drag",null)},0)),"onselectstart"in n?r.on("selectstart.drag",null):(n.style.MozUserSelect=n.__noselect,delete n.__noselect)}var Ro=(t=>()=>t);function $c(t,{sourceEvent:e,subject:n,target:r,identifier:i,active:s,x:o,y:l,dx:c,dy:u,dispatch:f}){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:s,enumerable:!0,configurable:!0},x:{value:o,enumerable:!0,configurable:!0},y:{value:l,enumerable:!0,configurable:!0},dx:{value:c,enumerable:!0,configurable:!0},dy:{value:u,enumerable:!0,configurable:!0},_:{value:f}})}$c.prototype.on=function(){var t=this._.on.apply(this._,arguments);return t===this._?this:t};function Eb(t){return!t.ctrlKey&&!t.button}function Cb(){return this.parentNode}function Ib(t,e){return e==null?{x:t.x,y:t.y}:e}function Rb(){return navigator.maxTouchPoints||"ontouchstart"in this}function Yh(){var t=Eb,e=Cb,n=Ib,r=Rb,i={},s=Io("start","drag","end"),o=0,l,c,u,f,d=0;function h(B){B.on("mousedown.drag",m).filter(r).on("touchstart.drag",C).on("touchmove.drag",w,Ab).on("touchend.drag touchcancel.drag",$).style("touch-action","none").style("-webkit-tap-highlight-color","rgba(0,0,0,0)")}function m(B,W){if(!(f||!t.call(this,B,W))){var H=z(this,e.call(this,B,W),B,W,"mouse");H&&(Yt(B.view).on("mousemove.drag",S,cs).on("mouseup.drag",E,cs),Fc(B.view),Dc(B),u=!1,l=B.clientX,c=B.clientY,H("start",B))}}function S(B){if(ui(B),!u){var W=B.clientX-l,H=B.clientY-c;u=W*W+H*H>d}i.mouse("drag",B)}function E(B){Yt(B.view).on("mousemove.drag mouseup.drag",null),Nc(B.view,u),ui(B),i.mouse("end",B)}function C(B,W){if(t.call(this,B,W)){var H=B.changedTouches,_=e.call(this,B,W),q=H.length,st,it;for(st=0;st<q;++st)(it=z(this,_,B,W,H[st].identifier,H[st]))&&(Dc(B),it("start",B,H[st]))}}function w(B){var W=B.changedTouches,H=W.length,_,q;for(_=0;_<H;++_)(q=i[W[_].identifier])&&(ui(B),q("drag",B,W[_]))}function $(B){var W=B.changedTouches,H=W.length,_,q;for(f&&clearTimeout(f),f=setTimeout(function(){f=null},500),_=0;_<H;++_)(q=i[W[_].identifier])&&(Dc(B),q("end",B,W[_]))}function z(B,W,H,_,q,st){var it=s.copy(),ot=ur(st||H,W),ct,gt,tt;if((tt=n.call(B,new $c("beforestart",{sourceEvent:H,target:h,identifier:q,active:o,x:ot[0],y:ot[1],dx:0,dy:0,dispatch:it}),_))!=null)return ct=tt.x-ot[0]||0,gt=tt.y-ot[1]||0,function ft(lt,bt,St){var Mt=ot,Ot;switch(lt){case"start":i[q]=ft,Ot=o++;break;case"end":delete i[q],--o;case"drag":ot=ur(St||bt,W),Ot=o;break}it.call(lt,B,new $c(lt,{sourceEvent:bt,subject:tt,target:h,identifier:q,active:Ot,x:ot[0]+ct,y:ot[1]+gt,dx:ot[0]-Mt[0],dy:ot[1]-Mt[1],dispatch:it}),_)}}return h.filter=function(B){return arguments.length?(t=typeof B=="function"?B:Ro(!!B),h):t},h.container=function(B){return arguments.length?(e=typeof B=="function"?B:Ro(B),h):e},h.subject=function(B){return arguments.length?(n=typeof B=="function"?B:Ro(B),h):n},h.touchable=function(B){return arguments.length?(r=typeof B=="function"?B:Ro(!!B),h):r},h.on=function(){var B=s.on.apply(s,arguments);return B===s?h:B},h.clickDistance=function(B){return arguments.length?(d=(B=+B)*B,h):Math.sqrt(d)},h}var wb={setExpand(t,e,n){const r=this,{config:i,$el:{circle:s}}=r;s&&i.point_focus_expand_enabled&&r.expandCircles(t,e,n),r.expandBarTypeShapes(!0,t,e,n)},expandBarTypeShapes(t=!0,e,n,r){const i=this;["bar","candlestick"].filter(s=>i.$el[s]).forEach(s=>{r&&i.$el[s].classed(ze.EXPANDED,!1),i.getShapeByIndex(s,e,n).classed(ze.EXPANDED,t)})},setOverOut(t,e){const n=this,{config:r,state:{hasFunnel:i,hasRadar:s,hasTreemap:o},$el:{main:l}}=n,c=He(e);if(c||e!==-1){const u=r[t?"data_onover":"data_onout"].bind(n.api);if(r.color_onover&&n.setOverColor(t,e,c),c){const f=n.getTargetSelectorSuffix(e.id),d=i||o?`${ze.target+f} .${Tn.shape}`:Ze.arc+f;u(e,l.select(`.${d}`).node())}else if(r.tooltip_grouped)t&&(s&&n.isPointFocusOnly()?n.showCircleFocus(n.getAllValuesOnIndex(e,!0)):n.setExpand(e,null,!0)),!n.isMultipleX()&&l.selectAll(`.${Tn.shape}-${e}`).each(function(f){u(f,this)});else{const f=n.cache.get(Oe.setOverOut)||[],d=l.selectAll(`.${Tn.shape}-${e}`).filter(function(m){return n.isWithinShape(this,m)}),h=d.filter(function(){return f.every(m=>m!==this)});if(!t||d.empty()||f.length===h.size()&&h.nodes().every((m,S)=>m!==f[S]))for(;f.length;){const m=f.pop();r.data_onout.bind(n.api)(Yt(m).datum(),m)}h.each(function(){t&&(u(Yt(this).datum(),this),f.push(this))}),n.cache.add(Oe.setOverOut,f)}}},callOverOutForTouch(t){const e=this,n=e.cache.get(Oe.callOverOutForTouch);(He(t)&&n?t.id!==n.id:t!==n)&&((n||ae(n))&&e.setOverOut(!1,n),(t||ae(t))&&e.setOverOut(!0,t),e.cache.add(Oe.callOverOutForTouch,t))},getDraggableSelection(){const t=this,{config:e,state:n}=t;return e.interaction_enabled&&e.data_selection_draggable&&t.drag?Yh().on("drag",function(r){n.event=r,t.drag(Jn(r,this))}).on("start",function(r){n.event=r,t.dragstart(Jn(r,this))}).on("end",r=>{n.event=r,t.dragend()}):()=>{}},dispatchEvent(t,e,n){var r,i,s;const o=this,{config:l,state:{eventReceiver:c,hasAxis:u,hasFunnel:f,hasRadar:d,hasTreemap:h},$el:{eventRect:m,funnel:S,radar:E,svg:C,treemap:w}}=o;let $=(s=(i=(f||h)&&c.rect||d&&E.axes.select(`.${Rn.axis}-${e} text`)||m||((r=o.getArcElementByIdOrIndex)==null?void 0:r.call(o,e)))==null?void 0:i.node)==null?void 0:s.call(i);if($){const z=o.isMultipleX(),B=l.axis_rotated;let{width:W,left:H,top:_}=ln($);if(u&&!d&&!z){const ot=c.coords[e];ot?(W=ot.w,H+=ot.x,_+=ot.y):(W=0,H=0,_=0)}let q=H+(n?n[0]:0)+(z||B?0:W/2),st=_+(n?n[1]:0)+(B?4:0);if(Rc(C)&&o.$el.eventRect){const ot=So(o.$el.eventRect.node(),q,st,!1);q=ot.x,st=ot.y}const it={screenX:q,screenY:st,clientX:q,clientY:st,bubbles:d};(f||h)&&($=(S!=null?S:w).node()),wc[/^(mouse|click)/.test(t)?"mouse":"touch"]($,t,it)}},setDragStatus(t){this.state.dragging=t},unbindZoomEvent(){const t=this,{$el:{canvas:e,eventRect:n,svg:r,zoomResetBtn:i}}=t;n==null||n.on(".zoom wheel.zoom .drag",null),e==null||e.on(".zoom wheel.zoom .drag",null),r==null||r.on("wheel",null),i==null||i.on("click",null).style("display","none")},unbindAllEvents(){var t;const e=this,{$el:{arcs:n,eventRect:r,legend:i,region:s,svg:o,treemap:l},brush:c}=e,u=["wheel","click","mouseover","mousemove","mouseout","touchstart","touchmove","touchend","touchstart.eventRect","touchmove.eventRect","touchend.eventRect",".brush",".drag",".zoom","wheel.zoom","dblclick.zoom"].join(" ");[o,r,s==null?void 0:s.list,c==null?void 0:c.getSelection(),n==null?void 0:n.selectAll("path"),i==null?void 0:i.selectAll("g"),l].forEach(f=>f==null?void 0:f.on(u,null)),(t=e.unbindZoomEvent)==null||t.call(e)}},Ob={categoryName(t){var e;const{axis_x_categories:n}=this.config;return(e=n==null?void 0:n[t])!=null?e:t}};const Pb=/[\x00-\x20\x7F-\xA0\s?!@#$%^&*()_=+,.<>'":;\[\]\/|~`{}\\]/g;var Mb={generateClass(t,e){const n=this.state.generateClassCache,r=`${t}\0${e}`;let i=n.get(r);return i||(i=` ${t} ${t+this.getTargetSelectorSuffix(e)}`,n.set(r,i)),i},getClass(t,e){const n=/s$/.test(t),r=/^(area|arc|line|funnel|treemap)s?$/.test(t),i=n?"id":"index";return s=>{const o=s.data||s;return((e?this.generateClass(Re[n?"shapes":"shape"],o[i]):"")+this.generateClass(Re[t],o[r?"id":i])).trim()}},getChartClass(t){return e=>Re[`chart${t}`]+this.classTarget((e.data?e.data:e).id)},generateExtraLineClass(){const e=this.config.line_classes||[],n=[];return function(r){var i;const s=r.id||((i=r.data)==null?void 0:i.id)||r;return n.indexOf(s)<0&&n.push(s),e[n.indexOf(s)%e.length]}},classRegion(t,e){return`${this.generateClass(Re.region,e)} ${"class"in t?t.class:""}`},classTarget(t){const e=this.config.data_classes[t];let n="";return e&&(n=` ${Re.target}-${e}`),this.generateClass(Re.target,t)+n},classFocus(t){return this.classFocused(t)+this.classDefocused(t)},classFocused(t){return` ${this.state.focusedTargetIds.has(t.id)?Re.focused:""}`},classDefocused(t){return` ${this.state.defocusedTargetIds.has(t.id)?Re.defocused:""}`},getTargetSelectorSuffix(t){return(t||t===0?`-${t}`:"").replace(Pb,"-")},selectorTarget(t,e="",n=""){const r=this.getTargetSelectorSuffix(t);return`${e}.${Re.target+r} ${n}, ${e}.${Re.circles+r} ${n}`},selectorTargets(t,e){const n=t||[];return n.length?n.map(r=>this.selectorTarget(r,e)):null},selectorLegend(t){return`.${Re.legendItem+this.getTargetSelectorSuffix(t)}`},selectorLegends(t){return t!=null&&t.length?t.map(e=>this.selectorLegend(e)):null}};const Lb=(t,e,n)=>{const r=Yt(t.cloneNode(!0));return r.attr("id",n).insert("rect",":first-child").attr("width",r.attr("width")).attr("height",r.attr("height")).style("fill",e),{id:n,node:r.node()}};function Db(t){const e=Oe.colorPattern,{body:n}=Ye;let r=n[e];if(!r){const s=t.classed(Ac.colorPattern,!0).style("background-image");t.classed(Ac.colorPattern,!1),s.indexOf(";")>-1&&(r=s.replace(/url[^#]*|["'()]|(\s|%20)/g,"").split(";").map(o=>o.trim().replace(/[\"'\s]/g,"")).filter(Boolean),n[e]=r)}return r}const Fb=["#1f77b4","#ff7f0e","#2ca02c","#d62728","#9467bd","#8c564b","#e377c2","#7f7f7f","#bcbd22","#17becf"];var Nb={generateColor(){const t=this,{$el:e,config:n}=t,r=[],i=n.area_linearGradient||n.bar_linearGradient||n.point_radialGradient;let s=vn(n.color_pattern)?n.color_pattern:[...Db(e.chart)||Fb];const o=s;if(ie(n.color_tiles)){const l=n.color_tiles.bind(t.api)(),c=s.map((u,f)=>{const d=u.replace(/[#\(\)\s,]/g,""),h=`${t.state.datetimeId}-pattern-${d}-${f}`;return Lb(l[f%l.length],u,h)});s=c.map(u=>`url(#${u.id})`),t.patterns=c}return function(l){var c;const u=n.data_colors,f=n.data_color,d=l.id||((c=l.data)==null?void 0:c.id)||l,h=t.isTypeOf(d,["line","spline","step"])||!n.data_types[d];let m;if(ie(u[d]))m=u[d].bind(t.api)(l);else if(u[d])m=u[d];else{let S=r.indexOf(d);S<0&&(r.push(d),S=r.length-1),m=h?o[S%o.length]:s[S%s.length],u[d]=m}if(m=ie(f)?f.call(t.api,m,l):m,i&&e.defs){const S=t.$el.defs.selectAll(`[id$='-gradient${t.getTargetSelectorSuffix(d)}'] stop`);let E;S.each(function(C,w){E=w===0?this.style.stopColor:this.style.stopColor===E}),E===!0&&S.attr("stop-color",m)}return m}},generateLevelColor(){const t=this,{config:e}=t,n=e.color_pattern,r=e.color_threshold,i=r.unit==="value",s=r.max||100,o=r.values&&r.values.length?r.values:[];return vn(r)?function(l){const c=i?l:l*100/s;let u=n[n.length-1];for(let f=0,d=o.length;f<d;f++)if(c<=o[f]){u=n[f];break}return u}:null},generateTextBGColorFilter(t,e={x:0,y:0,width:1,height:1}){const n=this,{$el:{defs:r},state:i}=n;if(t){let s=[];je(t)?s.push(""):He(t)?s=Object.keys(t):ie(t)&&(s=n.mapToTargetIds()),s.forEach(o=>{const l=`${i.datetimeId}-labels-bg${n.getTargetSelectorSuffix(o)}${je(t)?n.getTargetSelectorSuffix(t):""}`,c=Gr(o===""?t:(t==null?void 0:t[o])||"");if(r.select(`#${l}`).empty()){const u=r.append("filter").attr("x",e.x).attr("y",e.y).attr("width",e.width).attr("height",e.height).attr("id",l);u.append("feFlood").attr("flood-color",c),u.append("feComposite").attr("in","SourceGraphic")}})}},getGradienColortUrl(t){return`url(#${this.state.datetimeId}-gradient${this.getTargetSelectorSuffix(t)})`},updateLinearGradient(){const t=this,{config:e,data:{targets:n},state:{datetimeId:r},$el:{defs:i}}=t;n.forEach(s=>{const o=`${r}-gradient${t.getTargetSelectorSuffix(s.id)}`,l=t.hasPointType()&&e.point_radialGradient,c=t.isAreaType(s)&&"area"||t.isBarType(s)&&"bar";if((l||c)&&i.select(`#${o}`).empty()){const u=t.color(s),f={defs:null,stops:[]};if(l){const{cx:d=.3,cy:h=.3,r:m=.7,stops:S=[[.1,u,0],[.9,u,1]]}=l;f.stops=S,f.defs=i.append("radialGradient").attr("id",`${o}`).attr("cx",d).attr("cy",h).attr("r",m)}else{const d=e.axis_rotated,{x:h=d?[1,0]:[0,0],y:m=d?[0,0]:[0,1],stops:S=[[0,u,1],[1,u,0]]}=e[`${c}_linearGradient`];f.stops=S,f.defs=i.append("linearGradient").attr("id",`${o}`).attr("x1",h[0]).attr("x2",h[1]).attr("y1",m[0]).attr("y2",m[1])}f.stops.forEach(d=>{const[h,m,S]=d,E=ie(m)?m.bind(t.api)(s.id):m;f.defs&&f.defs.append("stop").attr("offset",h).attr("stop-color",E||u).attr("stop-opacity",S)})}})},setOverColor(t,e){const n=this,{config:r,$el:{main:i}}=n,s=r.color_onover;let o=t?s:n.color;He(o)?o=({id:l})=>l in s?s[l]:n.color(l):je(o)?o=()=>s:ie(s)&&(o=o.bind(n.api)),i.selectAll(He(e)?`.${Ze.arc}${n.getTargetSelectorSuffix(e.id)}`:`.${Tn.shape}-${e}`).style("fill",o)}},fi=0,us=0,fs=0,Kh=1e3,wo,ds,Oo=0,za=0,Po=0,hs=typeof performance=="object"&&performance.now?performance:Date,Zh=typeof window=="object"&&window.requestAnimationFrame?window.requestAnimationFrame.bind(window):function(t){setTimeout(t,17)};function Bc(){return za||(Zh($b),za=hs.now()+Po)}function $b(){za=0}function Mo(){this._call=this._time=this._next=null}Mo.prototype=Jh.prototype={constructor:Mo,restart:function(t,e,n){if(typeof t!="function")throw new TypeError("callback is not a function");n=(n==null?Bc():+n)+(e==null?0:+e),!this._next&&ds!==this&&(ds?ds._next=this:wo=this,ds=this),this._call=t,this._time=n,zc()},stop:function(){this._call&&(this._call=null,this._time=1/0,zc())}};function Jh(t,e,n){var r=new Mo;return r.restart(t,e,n),r}function Bb(){Bc(),++fi;for(var t=wo,e;t;)(e=za-t._time)>=0&&t._call.call(void 0,e),t=t._next;--fi}function Qh(){za=(Oo=hs.now())+Po,fi=us=0;try{Bb()}finally{fi=0,Ub(),za=0}}function zb(){var t=hs.now(),e=t-Oo;e>Kh&&(Po-=e,Oo=t)}function Ub(){for(var t,e=wo,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:wo=n);ds=t,zc(r)}function zc(t){if(!fi){us&&(us=clearTimeout(us));var e=t-za;e>24?(t<1/0&&(us=setTimeout(Qh,t-hs.now()-Po)),fs&&(fs=clearInterval(fs))):(fs||(Oo=hs.now(),fs=setInterval(zb,Kh)),fi=1,Zh(Qh))}}function _h(t,e,n){var r=new Mo;return e=e==null?0:+e,r.restart(i=>{r.stop(),t(i+e)},e,n),r}var kb=Io("start","end","cancel","interrupt"),Gb=[],qh=0,tv=1,Uc=2,Lo=3,ev=4,kc=5,Do=6;function Fo(t,e,n,r,i,s){var o=t.__transition;if(!o)t.__transition={};else if(n in o)return;Xb(t,n,{name:e,index:r,group:i,on:kb,tween:Gb,time:s.time,delay:s.delay,duration:s.duration,ease:s.ease,timer:null,state:qh})}function Gc(t,e){var n=Tr(t,e);if(n.state>qh)throw new Error("too late; already scheduled");return n}function Dr(t,e){var n=Tr(t,e);if(n.state>Lo)throw new Error("too late; already running");return n}function Tr(t,e){var n=t.__transition;if(!n||!(n=n[e]))throw new Error("transition not found");return n}function Xb(t,e,n){var r=t.__transition,i;r[e]=n,n.timer=Jh(s,0,n.time);function s(u){n.state=tv,n.timer.restart(o,n.delay,n.time),n.delay<=u&&o(u-n.delay)}function o(u){var f,d,h,m;if(n.state!==tv)return c();for(f in r)if(m=r[f],m.name===n.name){if(m.state===Lo)return _h(o);m.state===ev?(m.state=Do,m.timer.stop(),m.on.call("interrupt",t,t.__data__,m.index,m.group),delete r[f]):+f<e&&(m.state=Do,m.timer.stop(),m.on.call("cancel",t,t.__data__,m.index,m.group),delete r[f])}if(_h(function(){n.state===Lo&&(n.state=ev,n.timer.restart(l,n.delay,n.time),l(u))}),n.state=Uc,n.on.call("start",t,t.__data__,n.index,n.group),n.state===Uc){for(n.state=Lo,i=new Array(h=n.tween.length),f=0,d=-1;f<h;++f)(m=n.tween[f].value.call(t,t.__data__,n.index,n.group))&&(i[++d]=m);i.length=d+1}}function l(u){for(var f=u<n.duration?n.ease.call(null,u/n.duration):(n.timer.restart(c),n.state=kc,1),d=-1,h=i.length;++d<h;)i[d].call(t,f);n.state===kc&&(n.on.call("end",t,t.__data__,n.index,n.group),c())}function c(){n.state=Do,n.timer.stop(),delete r[e];for(var u in r)return;delete t.__transition}}function di(t,e){var n=t.__transition,r,i,s=!0,o;if(n){e=e==null?null:e+"";for(o in n){if((r=n[o]).name!==e){s=!1;continue}i=r.state>Uc&&r.state<kc,r.state=Do,r.timer.stop(),r.on.call(i?"interrupt":"cancel",t,t.__data__,r.index,r.group),delete n[o]}s&&delete t.__transition}}function Wb(t){return this.each(function(){di(this,t)})}var nv=180/Math.PI,Xc={translateX:0,translateY:0,rotate:0,skewX:0,scaleX:1,scaleY:1};function rv(t,e,n,r,i,s){var o,l,c;return(o=Math.sqrt(t*t+e*e))&&(t/=o,e/=o),(c=t*n+e*r)&&(n-=t*c,r-=e*c),(l=Math.sqrt(n*n+r*r))&&(n/=l,r/=l,c/=l),t*r<e*n&&(t=-t,e=-e,c=-c,o=-o),{translateX:i,translateY:s,rotate:Math.atan2(e,t)*nv,skewX:Math.atan(c)*nv,scaleX:o,scaleY:l}}var No;function Vb(t){const e=new(typeof DOMMatrix=="function"?DOMMatrix:WebKitCSSMatrix)(t+"");return e.isIdentity?Xc:rv(e.a,e.b,e.c,e.d,e.e,e.f)}function jb(t){return t==null||(No||(No=document.createElementNS("http://www.w3.org/2000/svg","g")),No.setAttribute("transform",t),!(t=No.transform.baseVal.consolidate()))?Xc:(t=t.matrix,rv(t.a,t.b,t.c,t.d,t.e,t.f))}function av(t,e,n,r){function i(u){return u.length?u.pop()+" ":""}function s(u,f,d,h,m,S){if(u!==d||f!==h){var E=m.push("translate(",null,e,null,n);S.push({i:E-4,x:gr(u,d)},{i:E-2,x:gr(f,h)})}else(d||h)&&m.push("translate("+d+e+h+n)}function o(u,f,d,h){u!==f?(u-f>180?f+=360:f-u>180&&(u+=360),h.push({i:d.push(i(d)+"rotate(",null,r)-2,x:gr(u,f)})):f&&d.push(i(d)+"rotate("+f+r)}function l(u,f,d,h){u!==f?h.push({i:d.push(i(d)+"skewX(",null,r)-2,x:gr(u,f)}):f&&d.push(i(d)+"skewX("+f+r)}function c(u,f,d,h,m,S){if(u!==d||f!==h){var E=m.push(i(m)+"scale(",null,",",null,")");S.push({i:E-4,x:gr(u,d)},{i:E-2,x:gr(f,h)})}else(d!==1||h!==1)&&m.push(i(m)+"scale("+d+","+h+")")}return function(u,f){var d=[],h=[];return u=t(u),f=t(f),s(u.translateX,u.translateY,f.translateX,f.translateY,d,h),o(u.rotate,f.rotate,d,h),l(u.skewX,f.skewX,d,h),c(u.scaleX,u.scaleY,f.scaleX,f.scaleY,d,h),u=f=null,function(m){for(var S=-1,E=h.length,C;++S<E;)d[(C=h[S]).i]=C.x(m);return d.join("")}}}var Hb=av(Vb,"px, ","px)","deg)"),Yb=av(jb,", ",")",")");function Kb(t,e){var n,r;return function(){var i=Dr(this,t),s=i.tween;if(s!==n){r=n=s;for(var o=0,l=r.length;o<l;++o)if(r[o].name===e){r=r.slice(),r.splice(o,1);break}}i.tween=r}}function Zb(t,e,n){var r,i;if(typeof n!="function")throw new Error;return function(){var s=Dr(this,t),o=s.tween;if(o!==r){i=(r=o).slice();for(var l={name:e,value:n},c=0,u=i.length;c<u;++c)if(i[c].name===e){i[c]=l;break}c===u&&i.push(l)}s.tween=i}}function Jb(t,e){var n=this._id;if(t+="",arguments.length<2){for(var r=Tr(this.node(),n).tween,i=0,s=r.length,o;i<s;++i)if((o=r[i]).name===t)return o.value;return null}return this.each((e==null?Kb:Zb)(n,t,e))}function Wc(t,e,n){var r=t._id;return t.each(function(){var i=Dr(this,r);(i.value||(i.value={}))[e]=n.apply(this,arguments)}),function(i){return Tr(i,r).value[e]}}function iv(t,e){var n;return(typeof e=="number"?gr:e instanceof ba?Gs:(n=ba(e))?(e=n,Gs):_u)(t,e)}function Qb(t){return function(){this.removeAttribute(t)}}function _b(t){return function(){this.removeAttributeNS(t.space,t.local)}}function qb(t,e,n){var r,i=n+"",s;return function(){var o=this.getAttribute(t);return o===i?null:o===r?s:s=e(r=o,n)}}function tS(t,e,n){var r,i=n+"",s;return function(){var o=this.getAttributeNS(t.space,t.local);return o===i?null:o===r?s:s=e(r=o,n)}}function eS(t,e,n){var r,i,s;return function(){var o,l=n(this),c;return l==null?void this.removeAttribute(t):(o=this.getAttribute(t),c=l+"",o===c?null:o===r&&c===i?s:(i=c,s=e(r=o,l)))}}function nS(t,e,n){var r,i,s;return function(){var o,l=n(this),c;return l==null?void this.removeAttributeNS(t.space,t.local):(o=this.getAttributeNS(t.space,t.local),c=l+"",o===c?null:o===r&&c===i?s:(i=c,s=e(r=o,l)))}}function rS(t,e){var n=Nt(t),r=n==="transform"?Yb:iv;return this.attrTween(t,typeof e=="function"?(n.local?nS:eS)(n,r,Wc(this,"attr."+t,e)):e==null?(n.local?_b:Qb)(n):(n.local?tS:qb)(n,r,e))}function aS(t,e){return function(n){this.setAttribute(t,e.call(this,n))}}function iS(t,e){return function(n){this.setAttributeNS(t.space,t.local,e.call(this,n))}}function sS(t,e){var n,r;function i(){var s=e.apply(this,arguments);return s!==r&&(n=(r=s)&&iS(t,s)),n}return i._value=e,i}function oS(t,e){var n,r;function i(){var s=e.apply(this,arguments);return s!==r&&(n=(r=s)&&aS(t,s)),n}return i._value=e,i}function lS(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=Nt(t);return this.tween(n,(r.local?sS:oS)(r,e))}function cS(t,e){return function(){Gc(this,t).delay=+e.apply(this,arguments)}}function uS(t,e){return e=+e,function(){Gc(this,t).delay=e}}function fS(t){var e=this._id;return arguments.length?this.each((typeof t=="function"?cS:uS)(e,t)):Tr(this.node(),e).delay}function dS(t,e){return function(){Dr(this,t).duration=+e.apply(this,arguments)}}function hS(t,e){return e=+e,function(){Dr(this,t).duration=e}}function vS(t){var e=this._id;return arguments.length?this.each((typeof t=="function"?dS:hS)(e,t)):Tr(this.node(),e).duration}function gS(t,e){if(typeof e!="function")throw new Error;return function(){Dr(this,t).ease=e}}function pS(t){var e=this._id;return arguments.length?this.each(gS(e,t)):Tr(this.node(),e).ease}function mS(t,e){return function(){var n=e.apply(this,arguments);if(typeof n!="function")throw new Error;Dr(this,t).ease=n}}function xS(t){if(typeof t!="function")throw new Error;return this.each(mS(this._id,t))}function yS(t){typeof t!="function"&&(t=M(t));for(var e=this._groups,n=e.length,r=new Array(n),i=0;i<n;++i)for(var s=e[i],o=s.length,l=r[i]=[],c,u=0;u<o;++u)(c=s[u])&&t.call(c,c.__data__,u,s)&&l.push(c);return new Qr(r,this._parents,this._name,this._id)}function TS(t){if(t._id!==this._id)throw new Error;for(var e=this._groups,n=t._groups,r=e.length,i=n.length,s=Math.min(r,i),o=new Array(r),l=0;l<s;++l)for(var c=e[l],u=n[l],f=c.length,d=o[l]=new Array(f),h,m=0;m<f;++m)(h=c[m]||u[m])&&(d[m]=h);for(;l<r;++l)o[l]=e[l];return new Qr(o,this._parents,this._name,this._id)}function bS(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 SS(t,e,n){var r,i,s=bS(e)?Gc:Dr;return function(){var o=s(this,t),l=o.on;l!==r&&(i=(r=l).copy()).on(e,n),o.on=i}}function AS(t,e){var n=this._id;return arguments.length<2?Tr(this.node(),n).on.on(t):this.each(SS(n,t,e))}function ES(t){return function(){var e=this.parentNode;for(var n in this.__transition)if(+n!==t)return;e&&e.removeChild(this)}}function CS(){return this.on("end.remove",ES(this._id))}function IS(t){var e=this._name,n=this._id;typeof t!="function"&&(t=x(t));for(var r=this._groups,i=r.length,s=new Array(i),o=0;o<i;++o)for(var l=r[o],c=l.length,u=s[o]=new Array(c),f,d,h=0;h<c;++h)(f=l[h])&&(d=t.call(f,f.__data__,h,l))&&("__data__"in f&&(d.__data__=f.__data__),u[h]=d,Fo(u[h],e,n,h,u,Tr(f,n)));return new Qr(s,this._parents,e,n)}function RS(t){var e=this._name,n=this._id;typeof t!="function"&&(t=I(t));for(var r=this._groups,i=r.length,s=[],o=[],l=0;l<i;++l)for(var c=r[l],u=c.length,f,d=0;d<u;++d)if(f=c[d]){for(var h=t.call(f,f.__data__,d,c),m,S=Tr(f,n),E=0,C=h.length;E<C;++E)(m=h[E])&&Fo(m,e,n,E,h,S);s.push(h),o.push(f)}return new Qr(s,o,e,n)}var wS=bn.prototype.constructor;function OS(){return new wS(this._groups,this._parents)}function PS(t,e){var n,r,i;return function(){var s=zt(this,t),o=(this.style.removeProperty(t),zt(this,t));return s===o?null:s===n&&o===r?i:i=e(n=s,r=o)}}function sv(t){return function(){this.style.removeProperty(t)}}function MS(t,e,n){var r,i=n+"",s;return function(){var o=zt(this,t);return o===i?null:o===r?s:s=e(r=o,n)}}function LS(t,e,n){var r,i,s;return function(){var o=zt(this,t),l=n(this),c=l+"";return l==null&&(c=l=(this.style.removeProperty(t),zt(this,t))),o===c?null:o===r&&c===i?s:(i=c,s=e(r=o,l))}}function DS(t,e){var n,r,i,s="style."+e,o="end."+s,l;return function(){var c=Dr(this,t),u=c.on,f=c.value[s]==null?l||(l=sv(e)):void 0;(u!==n||i!==f)&&(r=(n=u).copy()).on(o,i=f),c.on=r}}function FS(t,e,n){var r=(t+="")=="transform"?Hb:iv;return e==null?this.styleTween(t,PS(t,r)).on("end.style."+t,sv(t)):typeof e=="function"?this.styleTween(t,LS(t,r,Wc(this,"style."+t,e))).each(DS(this._id,t)):this.styleTween(t,MS(t,r,e),n).on("end.style."+t,null)}function NS(t,e,n){return function(r){this.style.setProperty(t,e.call(this,r),n)}}function $S(t,e,n){var r,i;function s(){var o=e.apply(this,arguments);return o!==i&&(r=(i=o)&&NS(t,o,n)),r}return s._value=e,s}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,$S(t,e,n==null?"":n))}function zS(t){return function(){this.textContent=t}}function US(t){return function(){var e=t(this);this.textContent=e==null?"":e}}function kS(t){return this.tween("text",typeof t=="function"?US(Wc(this,"text",t)):zS(t==null?"":t+""))}function GS(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)&&GS(i)),e}return r._value=t,r}function WS(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=lv(),r=this._groups,i=r.length,s=0;s<i;++s)for(var o=r[s],l=o.length,c,u=0;u<l;++u)if(c=o[u]){var f=Tr(c,e);Fo(c,t,n,u,o,{time:f.time+f.delay+f.duration,delay:0,duration:f.duration,ease:f.ease})}return new Qr(r,this._parents,t,n)}function jS(){var t,e,n=this,r=n._id,i=n.size();return new Promise(function(s,o){var l={value:o},c={value:function(){--i===0&&s()}};n.each(function(){var u=Dr(this,r),f=u.on;f!==t&&(e=(t=f).copy(),e._.cancel.push(l),e._.interrupt.push(l),e._.end.push(c)),u.on=e}),i===0&&s()})}var HS=0;function Qr(t,e,n,r){this._groups=t,this._parents=e,this._name=n,this._id=r}function ov(t){return bn().transition(t)}function lv(){return++HS}var _r=bn.prototype;Qr.prototype=ov.prototype={constructor:Qr,select:IS,selectAll:RS,selectChild:_r.selectChild,selectChildren:_r.selectChildren,filter:yS,merge:TS,selection:OS,transition:VS,call:_r.call,nodes:_r.nodes,node:_r.node,size:_r.size,empty:_r.empty,each:_r.each,on:AS,attr:rS,attrTween:lS,style:FS,styleTween:BS,text:kS,textTween:WS,remove:CS,tween:Jb,delay:fS,duration:vS,ease:pS,easeVarying:xS,end:jS,[Symbol.iterator]:_r[Symbol.iterator]};function Rw(t){return t*t*t}function ww(t){return--t*t*t+1}function YS(t){return((t*=2)<=1?t*t*t:(t-=2)*t*t+2)/2}var KS={time:null,delay:0,duration:250,ease:YS};function ZS(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 JS(t){var e,n;t instanceof Qr?(e=t._id,t=t._name):(e=lv(),(n=KS).time=Bc(),t=t==null?null:t+"");for(var r=this._groups,i=r.length,s=0;s<i;++s)for(var o=r[s],l=o.length,c,u=0;u<l;++u)(c=o[u])&&Fo(c,t,e,u,o,n||ZS(c,e));return new Qr(r,this._parents,t,e)}bn.prototype.interrupt=Wb,bn.prototype.transition=JS;var Vc=(t=>()=>t);function QS(t,{sourceEvent:e,target:n,selection:r,mode:i,dispatch:s}){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:s}})}function _S(t){t.stopImmediatePropagation()}function jc(t){t.preventDefault(),t.stopImmediatePropagation()}var cv={name:"drag"},Hc={name:"space"},hi={name:"handle"},vi={name:"center"};const{abs:uv,max:Bn,min:zn}=Math;function fv(t){return[+t[0],+t[1]]}function Yc(t){return[fv(t[0]),fv(t[1])]}var $o={name:"x",handles:["w","e"].map(vs),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]]}},Bo={name:"y",handles:["n","s"].map(vs),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]]}},qS={name:"xy",handles:["n","w","e","s","nw","ne","sw","se"].map(vs),input:function(t){return t==null?null:Yc(t)},output:function(t){return t}},qr={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"},dv={e:"w",w:"e",nw:"ne",ne:"nw",se:"sw",sw:"se"},hv={n:"s",s:"n",nw:"sw",ne:"se",se:"ne",sw:"nw"},tA={overlay:1,selection:1,n:null,e:1,s:null,w:-1,nw:-1,ne:1,se:1,sw:-1},eA={overlay:1,selection:1,n:-1,e:null,s:1,w:null,nw:-1,ne:-1,se:1,sw:1};function vs(t){return{type:t}}function nA(t){return!t.ctrlKey&&!t.button}function rA(){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 aA(){return navigator.maxTouchPoints||"ontouchstart"in this}function Kc(t){for(;!t.__brush;)if(!(t=t.parentNode))return;return t.__brush}function iA(t){return t[0][0]===t[1][0]||t[0][1]===t[1][1]}function vv(t){var e=t.__brush;return e?e.dim.output(e.selection):null}function sA(){return Zc($o)}function oA(){return Zc(Bo)}function Ow(){return Zc(qS)}function Zc(t){var e=rA,n=nA,r=aA,i=!0,s=Io("start","brush","end"),o=6,l;function c(C){var w=C.property("__brush",E).selectAll(".overlay").data([vs("overlay")]);w.enter().append("rect").attr("class","overlay").attr("pointer-events","all").attr("cursor",qr.overlay).merge(w).each(function(){var z=Kc(this).extent;Yt(this).attr("x",z[0][0]).attr("y",z[0][1]).attr("width",z[1][0]-z[0][0]).attr("height",z[1][1]-z[0][1])}),C.selectAll(".selection").data([vs("selection")]).enter().append("rect").attr("class","selection").attr("cursor",qr.selection).attr("fill","#777").attr("fill-opacity",.3).attr("stroke","#fff").attr("shape-rendering","crispEdges");var $=C.selectAll(".handle").data(t.handles,function(z){return z.type});$.exit().remove(),$.enter().append("rect").attr("class",function(z){return"handle handle--"+z.type}).attr("cursor",function(z){return qr[z.type]}),C.each(u).attr("fill","none").attr("pointer-events","all").on("mousedown.brush",h).filter(r).on("touchstart.brush",h).on("touchmove.brush",m).on("touchend.brush touchcancel.brush",S).style("touch-action","none").style("-webkit-tap-highlight-color","rgba(0,0,0,0)")}c.move=function(C,w,$){C.tween?C.on("start.brush",function(z){f(this,arguments).beforestart().start(z)}).on("interrupt.brush end.brush",function(z){f(this,arguments).end(z)}).tween("brush",function(){var z=this,B=z.__brush,W=f(z,arguments),H=B.selection,_=t.input(typeof w=="function"?w.apply(this,arguments):w,B.extent),q=Ya(H,_);function st(it){B.selection=it===1&&_===null?null:q(it),u.call(z),W.brush()}return H!==null&&_!==null?st:st(1)}):C.each(function(){var z=this,B=arguments,W=z.__brush,H=t.input(typeof w=="function"?w.apply(z,B):w,W.extent),_=f(z,B).beforestart();di(z),W.selection=H===null?null:H,u.call(z),_.start($).brush($).end($)})},c.clear=function(C,w){c.move(C,null,w)};function u(){var C=Yt(this),w=Kc(this).selection;w?(C.selectAll(".selection").style("display",null).attr("x",w[0][0]).attr("y",w[0][1]).attr("width",w[1][0]-w[0][0]).attr("height",w[1][1]-w[0][1]),C.selectAll(".handle").style("display",null).attr("x",function($){return $.type[$.type.length-1]==="e"?w[1][0]-o/2:w[0][0]-o/2}).attr("y",function($){return $.type[0]==="s"?w[1][1]-o/2:w[0][1]-o/2}).attr("width",function($){return $.type==="n"||$.type==="s"?w[1][0]-w[0][0]+o:o}).attr("height",function($){return $.type==="e"||$.type==="w"?w[1][1]-w[0][1]+o:o})):C.selectAll(".selection,.handle").style("display","none").attr("x",null).attr("y",null).attr("width",null).attr("height",null)}function f(C,w,$){var z=C.__brush.emitter;return z&&(!$||!z.clean)?z:new d(C,w,$)}function d(C,w,$){this.that=C,this.args=w,this.state=C.__brush,this.active=0,this.clean=$}d.prototype={beforestart:function(){return++this.active===1&&(this.state.emitter=this,this.starting=!0),this},start:function(C,w){return this.starting?(this.starting=!1,this.emit("start",C,w)):this.emit("brush",C),this},brush:function(C,w){return this.emit("brush",C,w),this},end:function(C,w){return--this.active===0&&(delete this.state.emitter,this.emit("end",C,w)),this},emit:function(C,w,$){var z=Yt(this.that).datum();s.call(C,this.that,new QS(C,{sourceEvent:w,target:c,selection:t.output(this.state.selection),mode:$,dispatch:s}),z)}};function h(C){if(l&&!C.touches||!n.apply(this,arguments))return;var w=this,$=C.target.__data__.type,z=(i&&C.metaKey?$="overlay":$)==="selection"?cv:i&&C.altKey?vi:hi,B=t===Bo?null:tA[$],W=t===$o?null:eA[$],H=Kc(w),_=H.extent,q=H.selection,st=_[0][0],it,ot,ct=_[0][1],gt,tt,ft=_[1][0],lt,bt,St=_[1][1],Mt,Ot,Kt=0,ee=0,Ae,Ee=B&&W&&i&&C.shiftKey,Te,De,me=Array.from(C.touches||[C],be=>{const un=be.identifier;return be=ur(be,w),be.point0=be.slice(),be.identifier=un,be});di(w);var Pe=f(w,arguments,!0).beforestart();if($==="overlay"){q&&(Ae=!0);const be=[me[0],me[1]||me[0]];H.selection=q=[[it=t===Bo?st:zn(be[0][0],be[1][0]),gt=t===$o?ct:zn(be[0][1],be[1][1])],[lt=t===Bo?ft:Bn(be[0][0],be[1][0]),Mt=t===$o?St:Bn(be[0][1],be[1][1])]],me.length>1&&We(C)}else it=q[0][0],gt=q[0][1],lt=q[1][0],Mt=q[1][1];ot=it,tt=gt,bt=lt,Ot=Mt;var Zt=Yt(w).attr("pointer-events","none"),he=Zt.selectAll(".overlay").attr("cursor",qr[$]);if(C.touches)Pe.moved=Wt,Pe.ended=Xe;else{var ge=Yt(C.view).on("mousemove.brush",Wt,!0).on("mouseup.brush",Xe,!0);i&&ge.on("keydown.brush",pn,!0).on("keyup.brush",Cn,!0),Fc(C.view)}u.call(w),Pe.start(C,z.name);function Wt(be){for(const un of be.changedTouches||[be])for(const an of me)an.identifier===un.identifier&&(an.cur=ur(un,w));if(Ee&&!Te&&!De&&me.length===1){const un=me[0];uv(un.cur[0]-un[0])>uv(un.cur[1]-un[1])?De=!0:Te=!0}for(const un of me)un.cur&&(un[0]=un.cur[0],un[1]=un.cur[1]);Ae=!0,jc(be),We(be)}function We(be){const un=me[0],an=un.point0;var Nr;switch(Kt=un[0]-an[0],ee=un[1]-an[1],z){case Hc:case cv:{B&&(Kt=Bn(st-it,zn(ft-lt,Kt)),ot=it+Kt,bt=lt+Kt),W&&(ee=Bn(ct-gt,zn(St-Mt,ee)),tt=gt+ee,Ot=Mt+ee);break}case hi:{me[1]?(B&&(ot=Bn(st,zn(ft,me[0][0])),bt=Bn(st,zn(ft,me[1][0])),B=1),W&&(tt=Bn(ct,zn(St,me[0][1])),Ot=Bn(ct,zn(St,me[1][1])),W=1)):(B<0?(Kt=Bn(st-it,zn(ft-it,Kt)),ot=it+Kt,bt=lt):B>0&&(Kt=Bn(st-lt,zn(ft-lt,Kt)),ot=it,bt=lt+Kt),W<0?(ee=Bn(ct-gt,zn(St-gt,ee)),tt=gt+ee,Ot=Mt):W>0&&(ee=Bn(ct-Mt,zn(St-Mt,ee)),tt=gt,Ot=Mt+ee));break}case vi:{B&&(ot=Bn(st,zn(ft,it-Kt*B)),bt=Bn(st,zn(ft,lt+Kt*B))),W&&(tt=Bn(ct,zn(St,gt-ee*W)),Ot=Bn(ct,zn(St,Mt+ee*W)));break}}bt<ot&&(B*=-1,Nr=it,it=lt,lt=Nr,Nr=ot,ot=bt,bt=Nr,$ in dv&&he.attr("cursor",qr[$=dv[$]])),Ot<tt&&(W*=-1,Nr=gt,gt=Mt,Mt=Nr,Nr=tt,tt=Ot,Ot=Nr,$ in hv&&he.attr("cursor",qr[$=hv[$]])),H.selection&&(q=H.selection),Te&&(ot=q[0][0],bt=q[1][0]),De&&(tt=q[0][1],Ot=q[1][1]),(q[0][0]!==ot||q[0][1]!==tt||q[1][0]!==bt||q[1][1]!==Ot)&&(H.selection=[[ot,tt],[bt,Ot]],u.call(w),Pe.brush(be,z.name))}function Xe(be){if(_S(be),be.touches){if(be.touches.length)return;l&&clearTimeout(l),l=setTimeout(function(){l=null},500)}else Nc(be.view,Ae),ge.on("keydown.brush keyup.brush mousemove.brush mouseup.brush",null);Zt.attr("pointer-events","all"),he.attr("cursor",qr.overlay),H.selection&&(q=H.selection),iA(q)&&(H.selection=null,u.call(w)),Pe.end(be,z.name)}function pn(be){switch(be.keyCode){case 16:{Ee=B&&W;break}case 18:{z===hi&&(B&&(lt=bt-Kt*B,it=ot+Kt*B),W&&(Mt=Ot-ee*W,gt=tt+ee*W),z=vi,We(be));break}case 32:{(z===hi||z===vi)&&(B<0?lt=bt-Kt:B>0&&(it=ot-Kt),W<0?Mt=Ot-ee:W>0&&(gt=tt-ee),z=Hc,he.attr("cursor",qr.selection),We(be));break}default:return}jc(be)}function Cn(be){switch(be.keyCode){case 16:{Ee&&(Te=De=Ee=!1,We(be));break}case 18:{z===vi&&(B<0?lt=bt:B>0&&(it=ot),W<0?Mt=Ot:W>0&&(gt=tt),z=hi,We(be));break}case 32:{z===Hc&&(be.altKey?(B&&(lt=bt-Kt*B,it=ot+Kt*B),W&&(Mt=Ot-ee*W,gt=tt+ee*W),z=vi):(B<0?lt=bt:B>0&&(it=ot),W<0?Mt=Ot:W>0&&(gt=tt),z=hi),he.attr("cursor",qr[$]),We(be));break}default:return}jc(be)}}function m(C){f(this,arguments).moved(C)}function S(C){f(this,arguments).ended(C)}function E(){var C=this.__brush||{selection:null};return C.extent=Yc(e.apply(this,arguments)),C.dim=t,C}return c.extent=function(C){return arguments.length?(e=typeof C=="function"?C:Vc(Yc(C)),c):e},c.filter=function(C){return arguments.length?(n=typeof C=="function"?C:Vc(!!C),c):n},c.touchable=function(C){return arguments.length?(r=typeof C=="function"?C:Vc(!!C),c):r},c.handleSize=function(C){return arguments.length?(o=+C,c):o},c.keyModifiers=function(C){return arguments.length?(i=!!C,c):i},c.on=function(){var C=s.on.apply(s,arguments);return C===s?c:C},c}function gv(t){const{event:e,$el:n}=t,r=n.subchart.main||n.main;let i;return e&&e.type==="brush"?i=e.selection:r&&(i=r.select(".bb-brush").node())&&(i=vv(i)),i}function pv(t){const e=gv(t);return e?e[0]===e[1]:!0}function mv(t,e){return e.map(n=>{var r,i,s,o,l,c,u,f,d;const{values:h}=n,m=h[0],S=h[h.length-1],E=m?(i=(r=t.getXCacheKey)==null?void 0:r.call(t,m.x))!=null?i:m.x:"",C=S?(o=(s=t.getXCacheKey)==null?void 0:s.call(t,S.x))!=null?o:S.x:"",w=(c=(l=t.getTargetType)==null?void 0:l.call(t,n))!=null?c:"",$=(d=(f=(u=t.state)==null?void 0:u.subchartSourceTypes)==null?void 0:f[n.id])!=null?d:"";return`${n.id}:${w}:${$}:${h.length}:${E}:${C}`}).join("|")}function xv(t,e){var n;const r=(n=t.data)==null?void 0:n.targets;if(!r)return!1;for(let i=0;i<e.length;i++){const s=e[i],o=r.find(l=>l.id===s.id);if(!o||o.values!==s.values)return!1}return!0}function Jc(t,e){vn(e)&&((t.min===void 0||e<t.min)&&(t.min=e),(t.max===void 0||e>t.max)&&(t.max=e))}function yv(t,e){for(let n=0;n<e.length;n++)Jc(t,e[n])}function lA(t,e){var n,r,i,s;const o={min:void 0,max:void 0},l=t.state.hasAxis;for(let c=0;c<e.length;c++){const u=e[c],f=(n=t.isCandlestickType)==null?void 0:n.call(t,u),d=!f&&!!((r=t.isSubchartSourceTypeOf)!=null&&r.call(t,u,qt.CANDLESTICK)),{values:h}=u;for(let m=0;m<h.length;m++){const S=h[m];let E=S.value;if(!(Ge(E)||E===null))continue;const C=d?(i=t.getSubchartCandlestickShapeValue)==null?void 0:i.call(t,S,!0):void 0;ae(C)?E=C:E!==null&&(f||d)&&(E=Array.isArray(E)?E.slice(0,4):[E.open,E.high,E.low,E.close]),Array.isArray(E)?yv(o,E):He(E)&&"high"in E?yv(o,Object.values(E)):(s=t.isBubbleZType)!=null&&s.call(t,S)?Jc(o,l&&t.getBubbleZData(E,"y")):Jc(o,E)}}return[o.min,o.max]}function cA(t,e){let n;for(let r=0;r<t.length;r++){const{values:i}=t[r];for(let s=0;s<i.length;s++){const{x:o}=i[s];vn(o)&&(n===void 0||(e==="min"?o<n:o>n))&&(n=o)}}return n}var uA={getYDomainMinMaxBoth(t){const e=this,{axis:n,cache:r,config:i,state:s}=e,l=xv(e,t)?`${Oe.domainMinMax}_y_${mv(e,t)}`:null,c=l&&r.get(l);if(c&&c.generation===s.dataGeneration)return c.value;const u=i.data_groups,f=e.mapToIds(t),d=Yf(f);let h;if(u.length>0){const m=e.getValuesAsIdKeyed(t),S=t.some(W=>W.values.some(H=>H.value<0)),E=t.some(W=>W.values.some(H=>H.value>0)),C=new Map(f.map(W=>[W,n.getId(W)])),w={},$={};for(const W in m)w[W]=m[W].slice(),$[W]=m[W].slice();u.forEach(W=>{const H=W.filter(_=>d.has(_));if(H.length){const _=H[0],q=C.get(_);w[_]&&S&&(w[_]=w[_].map(st=>st<0?st:0)),$[_]&&E&&($[_]=$[_].map(st=>st>0?st:0)),H.filter((st,it)=>it>0).forEach(st=>{if(w[st]){const it=C.get(st);w[st].forEach((ot,ct)=>{const gt=+ot;it===q&&!(S&>>0)&&(w[_][ct]+=gt)})}if($[st]){const it=C.get(st);$[st].forEach((ot,ct)=>{const gt=+ot;it===q&&!(E&><0)&&($[_][ct]+=gt)})}})}});const z=[],B=[];for(const W in w)z.push(pr("min",w[W])),B.push(pr("max",$[W]));h=[pr("min",z),pr("max",B)]}else h=lA(e,t);return l&&r.add(l,{generation:s.dataGeneration,value:h}),h},isHiddenTargetWithYDomain(t){const e=this;for(const n of e.state.hiddenTargetIds)if(e.axis.getId(n)===t)return!0;return!1},getYDomain(t,e,n){const r=this,{axis:i,config:s,scale:o}=r,l=`axis_${e}`;if(r.isStackNormalized()&&t.filter(tt=>i.getId(tt.id)===e).map(tt=>tt.id).some(tt=>r.isGrouped(tt)))return[0,100];const c=(o==null?void 0:o[e])&&o[e].type==="log",u=t.filter(ct=>i.getId(ct.id)===e),f=n?r.filterByXDomain(u,n):u;if(f.length===0)return r.isHiddenTargetWithYDomain(e)?o[e].domain():e==="y2"?o.y.domain():r.getYDomain(t,"y2",n);const d=s[`${l}_min`],h=s[`${l}_max`],m=s[`${l}_center`],S=s[`${l}_inverted`],E=r.hasDataLabel()&&s.axis_rotated,C=r.hasDataLabel()&&!s.axis_rotated,[w,$]=r.getYDomainMinMaxBoth(f);let z=w,B=$,W=[qt.BAR,qt.BUBBLE,qt.SCATTER,...en.Line].some(ct=>{const gt=ct.indexOf("area")>-1?"area":ct;return r.hasType(ct,f,!0)&&s[`${gt}_zerobased`]});z=Ge(d)?d:Ge(h)?z<=h?z:h-10:z,B=Ge(h)?h:Ge(d)?d<=B?B:d+10:B,isNaN(z)&&(z=0),isNaN(B)&&(B=z),z===B&&(z<0?B=0:z=0);const H=z>=0&&B>=0,_=z<=0&&B<=0;(Ge(d)&&H||Ge(h)&&_)&&(W=!1),W&&(H&&(z=0),_&&(B=0));const q=Math.abs(B-z);let st={top:q*.1,bottom:q*.1};if(sn(m)){const ct=Math.max(Math.abs(z),Math.abs(B));B=m+ct,z=m-ct}if(E){const ct=wa(o.y.range()),gt=r.getDataLabelLength(z,B,"width").map(tt=>{const ft=tt/ct;return isFinite(ft)?ft:0});["bottom","top"].forEach((tt,ft)=>{st[tt]+=q*(gt[ft]/(1-gt[0]-gt[1]))})}else if(C){const ct=r.getDataLabelLength(z,B,"height");["bottom","top"].forEach((gt,tt)=>{st[gt]+=r.convertPixelToScale("y",ct[tt],q)})}st=r.getResettedPadding(st);const it=s[`${l}_padding`];vn(it)&&["bottom","top"].forEach(ct=>{st[ct]=i.getPadding(it,ct,st[ct],q)}),W&&(H&&(st.bottom=z),_&&(st.top=-B));const ot=c?[z,B].map(ct=>ct<0?0:ct):[z-st.bottom,B+st.top];return S?ot.reverse():ot},getXDomainMinMax(t,e){var n;const r=this,{cache:i,state:s}=r,o=r.config[`axis_x_${e}`],c=xv(r,t)?`${Oe.domainMinMax}_x_${e}_${mv(r,t)}`:null,u=c&&i.get(c);let f=(u==null?void 0:u.generation)===s.dataGeneration?u.value:void 0;f===void 0&&(f=cA(t,e),c&&i.add(c,{generation:s.dataGeneration,value:f}));let d=He(o)?o.value:o;return d=sn(d)&&((n=r.axis)!=null&&n.isTimeSeries())?Wn.bind(this)(d):d,He(o)&&o.fit&&(e==="min"&&d<f||e==="max"&&d>f)&&(d=void 0),sn(d)?d:f},getXDomainPadding(t,e){const n=this,{axis:r,config:i}=n,s=i.axis_x_padding,o=r.isTimeSeries()&&e,l=wa(t);let c;if(r.isCategorized()||o)c=0;else if(n.hasType("bar")){const d=n.getMaxDataCount();c=d>1?l/(d-1)/2:.5}else c=n.getResettedPadding(l*.01);let{left:u=c,right:f=c}=ae(s)?{left:s,right:s}:s;if(s.unit==="px"){const d=Math.abs(l+l*.2);u=r.getPadding(s,"left",c,d),f=r.getPadding(s,"right",c,d)}else{const d=l+u+f;if(o&&d){const h=l/e/d;u=u/d/h,f=f/d/h}}return{left:u,right:f}},getXDomain(t){const e=this,{axis:n,config:r,scale:{x:i}}=e,s=r.axis_x_inverted,o=[e.getXDomainMinMax(t,"min"),e.getXDomainMinMax(t,"max")];let[l=0,c=0]=o;if(i.type!=="log"){const u=n.isCategorized(),f=n.isTimeSeries(),d=e.getXDomainPadding(o);let[h,m]=o;h-m===0&&!u&&(f?(h=new Date(h.getTime()*.5),m=new Date(m.getTime()*1.5)):(h=h===0?1:h*.5,m=m===0?-1:m*1.5)),(h||h===0)&&(l=f?new Date(h.getTime()-d.left):h-d.left),(m||m===0)&&(c=f?new Date(m.getTime()+d.right):m+d.right)}return s?[c,l]:[l,c]},updateXDomain(t,e,n,r,i){var s;const o=this,{config:l,org:c,scale:{x:u,subX:f}}=o,d=l.zoom_enabled;if(n&&(u.domain(i||ti(o.getXDomain(t),!l.axis_x_inverted)),c.xDomain=u.domain(),f.domain(u.domain()),(s=o.brush)==null||s.scale(f)),e){const h=i||!o.brush||pv(o)?c.xDomain:gv(o).map(f.invert);u.domain(h)}return(n||e)&&d&&o.zoom.updateScaleExtent(),r&&u.domain(o.trimXDomain(u.orgDomain())),u.domain()},trimXDomain(t){const e=this,n=e.config.axis_x_inverted,r=e.getZoomDomain(),[i,s]=r;return(n?t[0]>=i:t[0]<=i)&&(t[1]=+t[1]+(i-t[0]),t[0]=i),(n?t[1]<=s:t[1]>=s)&&(t[0]=+t[0]-(t[1]-s),t[1]=s),t},getZoomDomain(t="zoom",e=!1){const n=this,{config:r,scale:i,org:s}=n;let[o,l]=e&&i[t]?i[t].domain():s.xDomain;return t==="zoom"&&(sn(r.zoom_x_min)&&(o=pr("min",[o,r.zoom_x_min])),sn(r.zoom_x_max)&&(l=pr("max",[l,r.zoom_x_max]))),[o,l]},getZoomDomainValue(t){const e=this,{config:n,axis:r}=e;if(r.isCategorized()&&Array.isArray(t)){const i=n.axis_x_inverted;return t.map((o,l)=>Number(o)+(l===0?+i:+!i))}return t},convertPixelToScale(t,e,n){const r=this,{config:i,state:s}=r,o=i.axis_rotated;let l;return t==="x"?l=o?"height":"width":l=o?"width":"height",n*(e/s[l])},withinRange(t,e=[0,0],n){const i=this.config.axis_x_inverted,[s,o]=n;if(Array.isArray(t)){const l=i?t[1]:t[0],c=i?t[0]:t[1];if(l<c)return t.every((u,f)=>(f===0?i?+u<=s:+u>=s:i?+u>=o:+u<=o)&&!t.every((d,h)=>d===e[h]))}return!1}};function Tv(t,e,n){const{config:r}=t,i=`axis_${e}_tick_format`;return(r[i]?r[i]:t.defaultValueFormat).call(t.api,n)}var fA={yFormat(t){return Tv(this,"y",t)},y2Format(t){return Tv(this,"y2",t)},getDefaultValueFormat(){const t=this,{defaultArcValueFormat:e,yFormat:n,y2Format:r}=t,i=t.hasArcType(null,["gauge","polar","radar"]);return function(s,o,l){return(i?e:t.axis&&t.axis.getId(l)==="y2"?r:n).call(t,s,o)}},defaultValueFormat(t){return qe(t)?t.join("~"):Ge(t)?+t:""},defaultArcValueFormat(t,e){return`${(e*100).toFixed(1)}%`},defaultPolarValueFormat(t){return`${t}`},dataLabelFormat(t){const e=this,n=e.config.data_labels,r=s=>{let l=s;return qe(s)?l=s.join("~"):He(s)&&(l=Object.values(s).join("~")),l};let i=r;return ie(n.format)?i=n.format:Kn(n.format)&&(n.format[t]?i=n.format[t]===!0?r:n.format[t]:i=()=>""),i.bind(e.api)}};const bv=10,dA=750;function zo(t){const e=this,n=e.getDataById(t);return e.levelColor?e.levelColor(n.values[0].value):e.color(n)}function hA(t,e=!0){var n;const{config:r}=this;let i=(n=r.data_names[t])!=null?n:t;return e&&ie(r.legend_format)&&(i=r.legend_format(i,t!==i?t:void 0)),i}function vA(t,e){var n;if(!e||e.empty())return;const r=(n=t.$el.legend)==null?void 0:n.selectAll(`.${$e.legendItem}`);r&&!r.empty()&&(e=r);const i=[];e.each(function(o){i.push({id:o,node:this})});const s=Kf(i,o=>o.id,o=>o.node);t.cache.add(Oe.legendItemMap,s)}function Sv(t){var e,n;return((e=t.changedTouches)==null?void 0:e[0])||((n=t.touches)==null?void 0:n[0])}function gA(t,e,n){const r=Sv(n);t.state.legendTouch=r?{id:e,x:r.clientX,y:r.clientY,moved:!1}:null}function Av(t,e){const n=t.state.legendTouch,r=n&&Sv(e);r&&(n.moved=n.moved||Math.abs(r.clientX-n.x)>bv||Math.abs(r.clientY-n.y)>bv)}function pA(t,e,n){Av(t,n);const r=t.state.legendTouch;return t.state.legendTouch=null,!!r&&r.id===e&&!r.moved}function mA(t,e){t.state.legendLastTouchClickId=e,t.state.legendLastTouchClickTime=Date.now()}function xA(t,e){const{state:n}=t,r=n.legendLastTouchClickId===e&&Date.now()-(n.legendLastTouchClickTime||0)<dA;return r&&(n.legendLastTouchClickId=null,n.legendLastTouchClickTime=0),r}function yA(t){var e;const n=(e=t.config.interaction_inputType_touch)==null?void 0:e.preventDefault,r=Ra(n)&&n||!1,i=!isNaN(n)&&n||null;return{passive:!r&&i===null}}var TA={initLegend(){var t;const e=this,{config:n,$el:r}=e;if(e.legendItemTextBox={},e.state.legendHasRendered=!1,e.state.isCanvasMode){n.legend_show?(t=e.updateHtmlLegend)==null||t.call(e):e.state.hiddenLegendIds=new Set(e.mapToIds(e.data.targets));return}n.legend_show?(n.legend_contents_bindto||(r.legend=e.$el.svg.append("g").classed($e.legend,!0).attr("transform",e.getTranslate("legend"))),e.updateLegend()):e.state.hiddenLegendIds=new Set(e.mapToIds(e.data.targets))},updateLegend(t,e,n){var r;const i=this,{config:s,state:o,scale:l,$el:c}=i,u=e||{withTransform:!1,withTransitionForTransform:!1,withTransition:!1};u.withTransition=ia(u,"withTransition",!0),u.withTransitionForTransform=ia(u,"withTransitionForTransform",!0),s.legend_contents_bindto&&s.legend_contents_template?i.updateLegendTemplate():o.hasTreemap||i.updateLegendElement(t||i.mapToIds(i.data.targets),u),(r=c.legend)==null||r.selectAll(`.${$e.legendItem}`).classed($e.legendItemHidden,function(f){const d=!i.isTargetToShow(f);return d&&(this.style.opacity=null),d}),i.updateScales(!1,!l.zoom),i.updateSvgSize(),i.transformAll(u.withTransitionForTransform,n),o.legendHasRendered=!0},updateLegendTemplate(){const t=this,{config:e,$el:n}=t,r=Yt(e.legend_contents_bindto),i=e.legend_contents_template;if(!r.empty()){const s=t.mapToIds(t.data.targets),o=[];let l="";s.forEach(u=>{const f=ie(i)?Gr(i.call(t.api,u,t.color(u),t.api.data(u)[0].values)):Pa(i,{COLOR:t.color(u),TITLE:u});f&&(o.push(u),l+=f)});const c=r.html(l).selectAll(function(){return this.childNodes}).data(o);t.setLegendItem(c),n.legend=r}},updateSizeForLegend(t){const e=this,{config:n,state:{isLegendTop:r,isLegendLeft:i,isLegendRight:s,isLegendInset:o,current:l}}=e,{width:c,height:u}=t,f={top:r?e.getCurrentPaddingByDirection("top")+n.legend_inset_y+5.5:l.height-u-e.getCurrentPaddingByDirection("bottom")-n.legend_inset_y,left:i?e.getCurrentPaddingByDirection("left")+n.legend_inset_x+.5:l.width-c-e.getCurrentPaddingByDirection("right")-n.legend_inset_x+.5};e.state.margin3={top:s?0:o?f.top:l.height-u,right:NaN,bottom:0,left:s?l.width-c:o?f.left:0}},transformLegend(t){const e=this,{$el:{legend:n},$T:r}=e;r(n,t).attr("transform",e.getTranslate("legend"))},updateLegendItemColor(t,e){const n=this,{legend:r}=n.$el;if(r){const i=n.getLegendItemById(t);i&&Yt(i).select("line").style("stroke",e)}},getLegendWidth(){const t=this,{current:{width:e},isLegendRight:n,isLegendInset:r,legendItemWidth:i,legendStep:s}=t.state;return t.config.legend_show?n||r?i*(s+1):e:0},getLegendHeight(){var t;const e=this,{current:n,isLegendRight:r,legendItemHeight:i,legendStep:s}=e.state,l=((t=e.config.padding)==null?void 0:t.mode)==="fit"?10:20;return e.config.legend_show?r?n.height:Math.max(l,i)*(s+1):0},opacityForUnfocusedLegend(t){return t.classed($e.legendItemHidden)?null:"0.3"},toggleFocusLegend(t,e){const n=this,{$el:{legend:r},$T:i}=n,s=n.mapToTargetIds(t);r&&i(r.selectAll(`.${$e.legendItem}`).filter(o=>s.indexOf(o)>=0).classed(nn.legendItemFocused,e)).style("opacity",function(){return e?null:n.opacityForUnfocusedLegend.call(n,Yt(this))})},revertLegend(){const t=this,{$el:{legend:e},$T:n}=t;e&&n(e.selectAll(`.${$e.legendItem}`).classed(nn.legendItemFocused,!1)).style("opacity",null)},showLegend(t){const e=this,{config:n,$el:r,$T:i}=e;n.legend_show||(n.legend_show=!0,r.legend?r.legend.style("visibility",null):e.initLegend(),!e.state.legendHasRendered&&e.updateLegend()),e.removeHiddenLegendIds(t),i(r.legend.selectAll(e.selectorLegends(t)).style("visibility",null)).style("opacity",null)},hideLegend(t){const e=this,{config:n,$el:{legend:r}}=e;n.legend_show&&lr(t)&&(n.legend_show=!1,r==null||r.style("visibility","hidden")),e.addHiddenLegendIds(t),r==null||r.selectAll(e.selectorLegends(t)).style("opacity","0").style("visibility","hidden")},getLegendItemTextBox(t,e){const n=this,{cache:r,state:i}=n;let s;const o=Oe.legendItemTextBox;return t&&(s=!i.redrawing&&r.get(o)||{},s[t]||(s[t]=n.getTextRect(e,$e.legendItem),r.add(o,s)),s=s[t]),s},setLegendItem(t){const e=this,{$el:n,api:r,config:i,state:s}=e,o=s.inputType==="touch",l=e.hasType("gauge"),c=i.boost_useCssRule,u=i.legend_item_interaction,f=u.dblclick?"dblclick":"click",d=u||ie(i.legend_item_onclick),h=o?yA(e):void 0,m=function(S,E){var C;if(!Ne(i.legend_item_onclick,r,E,!s.hiddenTargetIds.has(E))){const{altKey:w,type:$}=S,z=Yt(this);$==="dblclick"||w?s.hiddenTargetIds.size&&!z.classed($e.legendItemHidden)?r.show():(r.hide(),r.show(E)):(r.toggle(E),z.classed(nn.legendItemFocused,!1))}o&&(e.hideTooltip(),(C=e.hideGridFocus)==null||C.call(e,!0))};t.attr("class",function(S){const E=Yt(this);return(!E.empty()&&E.attr("class")||"")+e.generateClass($e.legendItem,S)}).style("visibility",S=>e.isLegendToShow(S)?null:"hidden"),i.interaction_enabled&&(c&&[[`.${$e.legendItem}`,"cursor:pointer"],[`.${$e.legendItem} text`,"pointer-events:none"],[`.${$e.legendItemPoint} text`,"pointer-events:none"],[`.${$e.legendItemTile}`,"pointer-events:none"],[`.${$e.legendItemEvent}`,"fill-opacity:0"]].forEach(S=>{const[E,C]=S;e.setCssRule(!1,E,[C])(n.legend)}),t.on(f,d?function(S,E){o&&S.type==="click"&&xA(e,E)||m.call(this,S,E)}:null),o&&f==="click"&&d&&t.on("touchstart",function(S,E){gA(e,E,S)},h).on("touchmove",S=>{Av(e,S)},h).on("touchend",function(S,E){pA(e,E,S)&&(mA(e,E),m.call(this,S,E))},h),!o&&t.on("mouseout",u||ie(i.legend_item_onout)?function(S,E){Ne(i.legend_item_onout,r,E,!s.hiddenTargetIds.has(E))||(Yt(this).classed(nn.legendItemFocused,!1),l&&e.undoMarkOverlapped(e,`.${ar.gaugeValue}`),e.api.revert())}:null).on("mouseover",u||ie(i.legend_item_onover)?function(S,E){Ne(i.legend_item_onover,r,E,!s.hiddenTargetIds.has(E))||(Yt(this).classed(nn.legendItemFocused,!0),l&&e.markOverlapped(E,e,`.${ar.gaugeValue}`),!s.transiting&&e.isTargetToShow(E)&&r.focus(E))}:null),!t.empty()&&t.on("click mouseout mouseover")&&t.style("cursor",e.getStylePropValue("pointer"))),vA(e,t)},getLegendItemById(t){var e;const n=this,r=n.cache.get(Oe.legendItemMap);if(r&&r instanceof Map)return r.get(t)||null;const i=(e=n.$el.legend)==null?void 0:e.selectAll(`.${$e.legendItem}`).filter(s=>s===t);return(i==null?void 0:i.node())||null},updateLegendElement(t,e){const n=this,{config:r,state:i,$el:{legend:s},$T:o}=n,c=r.legend_item_tile_type!=="circle",u=r.legend_item_tile_r,f={width:c?r.legend_item_tile_width:u*2,height:c?r.legend_item_tile_height:u*2},d={padding:{top:4,right:10},max:{width:0,height:0},posMin:10,step:0,tileWidth:f.width+5,totalLength:0},h={offsets:{},widths:{},heights:{},margins:[0],steps:{}};let m,S,E;const C=t.filter(q=>!sn(r.data_names[q])||r.data_names[q]!==null),w=e.withTransition,$=i.isLegendRight||i.isLegendInset,z=hA.bind(n),B=n.getUpdateLegendPositions(C,d,h,$);i.isLegendInset&&(d.step=r.legend_inset_step?r.legend_inset_step:C.length,i.legendStep=d.step),i.isLegendRight?(m=q=>d.max.width*h.steps[q],S=q=>h.margins[h.steps[q]]+h.offsets[q]):i.isLegendInset?(m=q=>d.max.width*h.steps[q]+10,S=q=>h.margins[h.steps[q]]+h.offsets[q]):(m=q=>h.margins[h.steps[q]]+h.offsets[q],S=q=>d.max.height*h.steps[q]);const W={xText:(q,st)=>m(q,st)+4+f.width,xRect:(q,st)=>m(q,st),x1Tile:(q,st)=>m(q,st)-2,x2Tile:(q,st)=>m(q,st)-2+f.width,yText:(q,st)=>S(q,st)+9,yRect:(q,st)=>S(q,st)-5,yTile:(q,st)=>S(q,st)+4};n.generateLegendItem(C,f,B,W,$,z),E=s.select(`.${$e.legendBackground} rect`),i.isLegendInset&&d.max.width>0&&E.size()===0&&(E=s.insert("g",`.${$e.legendItem}`).attr("class",$e.legendBackground).append("rect")),r.legend_tooltip&&s.selectAll("title").data(C).text(q=>z(q,!1));const H=s.selectAll("text").data(C).text(q=>z(q)).each(function(q,st){B(this,q,st)});o(H,w).attr("x",W.xText).attr("y",W.yText);const _=s.selectAll(`rect.${$e.legendItemEvent}`).data(C);o(_,w).attr("width",q=>h.widths[q]).attr("height",q=>h.heights[q]).attr("x",W.xRect).attr("y",W.yRect),n.updateLegendItemPos(C,w,W),E&&o(E,w).attr("height",n.getLegendHeight()-12).attr("width",d.max.width*(d.step+1)+10),i.legendItemWidth=d.max.width,i.legendItemHeight=d.max.height,i.legendStep=d.step},getUpdateLegendPositions(t,e,n,r){const i=this,{config:s,state:o}=i;return function(l,c,u){const f=u===0,d=u===t.length-1,h=i.getLegendItemTextBox(c,l),m=h.width+e.tileWidth+(d&&!r?0:e.padding.right)+s.legend_padding,S=h.height+e.padding.top,E=r?S:m,C=r?i.getLegendHeight():i.getLegendWidth();let w;const $=function(B,W){W||(w=(C-e.totalLength-E)/2,w<e.posMin&&(w=(C-E)/2,e.totalLength=0,e.step++)),n.steps[B]=e.step,n.margins[e.step]=o.isLegendInset?10:w,n.offsets[B]=e.totalLength,e.totalLength+=E};if(f&&(e.totalLength=0,e.step=0,e.max.width=0,e.max.height=0),s.legend_show&&!i.isLegendToShow(c)){n.widths[c]=0,n.heights[c]=0,n.steps[c]=0,n.offsets[c]=0;return}n.widths[c]=m,n.heights[c]=S,(!e.max.width||m>=e.max.width)&&(e.max.width=m),(!e.max.height||S>=e.max.height)&&(e.max.height=S);const z=r?e.max.height:e.max.width;if(s.legend_equally){for(const B in n.widths)n.widths[B]=e.max.width;for(const B in n.heights)n.heights[B]=e.max.height;w=(C-z*t.length)/2,w<e.posMin?(e.totalLength=0,e.step=0,t.forEach(B=>$(B))):$(c,!0)}else $(c)}},generateLegendItem(t,e,n,r,i,s){const o=this,{config:l,state:c,$el:{legend:u}}=o,f=l.legend_usePoint,d=l.legend_item_tile_r,h=l.legend_item_tile_type,m=h!=="circle",S=-200,E=u.selectAll(`.${$e.legendItem}`).data(t).enter().append("g");if(o.setLegendItem(E),l.legend_tooltip&&E.append("title").text(C=>C),E.append("text").text(C=>s(C)).each(function(C,w){n(this,C,w)}).style("pointer-events",o.getStylePropValue("none")).attr("x",i?r.xText:S).attr("y",i?S:r.yText),E.append("rect").attr("class",$e.legendItemEvent).style("fill-opacity",o.getStylePropValue("0")).attr("x",i?r.xRect:S).attr("y",i?S:r.yRect),f){const C=[],w=o.getValidPointPattern();E.append($=>{C.indexOf($)===-1&&C.push($);let z=w[C.indexOf($)%w.length];return z==="rectangle"&&(z="rect"),Ye.createElementNS(_t.svg,"hasValidPointType"in o&&o.hasValidPointType(z)?z:"use")}).attr("class",$e.legendItemPoint).style("fill",zo.bind(o)).style("pointer-events",o.getStylePropValue("none")).attr("href",($,z,B)=>{const H=B[z].nodeName.toLowerCase(),_=o.getTargetSelectorSuffix($);return H==="use"?`#${c.datetimeId}-point${_}`:void 0})}else E.append(m?"line":h).attr("class",$e.legendItemTile).style("stroke",zo.bind(o)).style("pointer-events",o.getStylePropValue("none")).call(C=>{h==="circle"?C.attr("r",d).style("fill",zo.bind(o)).attr("cx",i?r.x2Tile:S).attr("cy",i?S:r.yTile):m&&C.attr("stroke-width",e.height).attr("x1",i?r.x1Tile:S).attr("y1",i?S:r.yTile).attr("x2",i?r.x2Tile:S).attr("y2",i?S:r.yTile)})},updateLegendItemPos(t,e,n){const r=this,{config:i,$el:{legend:s},$T:o}=r,l=i.legend_usePoint,c=i.legend_item_tile_type,u=c!=="circle";if(l){const f=s.selectAll(`.${$e.legendItemPoint}`).data(t),d=i.legend_item_tile_type!=="circle",h=d?i.legend_item_tile_width:i.legend_item_tile_r*2,m=d?i.legend_item_tile_height:i.legend_item_tile_r*2,S=h*.75,E=m*.75,C=h/8,w=m/8;o(f,e).each(function(){const $=this.nodeName.toLowerCase();let z="x",B="y",W=null,H=null,_=null;$==="circle"?(z="cx",B="cy",W=Math.min(S,E)/2):$==="rect"&&(H=S,_=E);const q=Yt(this).attr("transform",null).attr("x",null).attr("y",null).attr("cx",null).attr("cy",null).attr("r",W).attr("width",H).attr("height",_);$==="use"?q.attr("transform",st=>`translate(${n.x1Tile(st)} ${n.yTile(st)-m/2}) scale(${C} ${w})`):q.attr(z,st=>n.x1Tile(st)+(h-(H||0))/2).attr(B,st=>n.yTile(st)-(_||0)/2)})}else{const f=s.selectAll(`.${$e.legendItemTile}`).data(t);o(f,e).style("stroke",zo.bind(r)).call(d=>{c==="circle"?d.attr("cx",h=>{const m=n.x2Tile(h);return m-(m-n.x1Tile(h))/2}).attr("cy",n.yTile):u&&d.attr("x1",n.x1Tile).attr("y1",n.yTile).attr("x2",n.x2Tile).attr("y2",n.yTile)})}}},bA={redraw(t={}){var e,n,r,i,s,o,l,c,u,f;const d=this,{config:h,state:m,$el:S}=d,{main:E,treemap:C}=S;m.redrawing=!0,m.redrawGeneration++,(m.dirty.data||m.dirty.visibility||t.initializing)&&m.dataGeneration++,(t.initializing||m.dirty.size||m.dirty.data||!m.rendered)&&d.cache.remove([Oe.svgLeft]);const w=d.filterTargetsToShow(d.data.targets);m._targetsToShow=w;const $={data:m.dirty.data,visibility:m.dirty.visibility,size:m.dirty.size};m.dirty.data=!1,m.dirty.visibility=!1,m.dirty.size=!1;const{flow:z,initializing:B}=t,W=d.getWithOption(t),H=W.Transition?h.transition_duration:0,_=W.TransitionForExit?H:0,q=W.TransitionForAxis?H:0,st=(e=d.axis)==null?void 0:e.generateTransitions(q),it=$.data||$.visibility||B;if(m.isCanvasMode&&(d.setContainerSize(),(n=d.updateHtmlLegend)==null||n.call(d)),d.updateSizes(B),m.isCanvasMode){const ot=d.scale.zoom,ct=ot==null?void 0:ot.domain();ot&&(d.scale.zoom=null),d.updateScales(B,W.UpdateXDomain),ot&&(ot.range(d.scale.x.range()),ct&&ot.domain(ct),d.scale.zoom=d.getCustomizedXScale(ot),d.axis.x.scale(d.scale.zoom),d.scale.x.domain(h.zoom_rescale?ct:d.org.xDomain),d.scale.subX.domain(d.org.xDomain)),m.hasAxis&&d.axis.syncAxisDomains(w,W,z),m.hasAxis&&((r=d.applyCanvasSubchartDomain)==null||r.call(d));const gt=it?d.getDrawShape():m._cachedDrawShape||d.getDrawShape();it&&(m._cachedDrawShape=gt),h.legend_show&&S.legend&&!(h.legend_contents_bindto&&h.legend_contents_template)&&((i=d.positionHtmlLegend)==null||i.call(d)),(s=d.resizeCanvas)==null||s.call(d),m.canvasFocusKey=null,d.renderCanvasFrame(gt,null,!0),B&&d.updateTypesElements(),d.callPluginHook("$redraw",t,0),m.redrawing=!1,m._targetsToShow=null,m._cachedDrawShape=null,d.mapToIds(d.data.targets).forEach(tt=>{m.withoutFadeIn[tt]=!0}),Ne(h.onrendered,d.api);return}W.Legend&&h.legend_show?(t.withTransition=!!H,!C&&d.updateLegend(d.mapToIds(d.data.targets),t,st)):W.Dimension&&d.updateDimension(!0),h.data_empty_label_text&&E.select(`text.${En.text}.${ze.empty}`).attr("x",m.width/2).attr("y",m.height/2).text(h.data_empty_label_text).style("display",w.length?"none":null),(o=d.redrawTitle)==null||o.call(d),m.hasAxis?(d.axis.redrawAxis(w,W,st,z,B),(l=d.hasGrid)!=null&&l.call(d)&&d.updateGrid(),h.regions.length&&((c=d.updateRegion)==null||c.call(d)),["bar","candlestick","line","area"].forEach(ot=>{const ct=Ln(ot);(/^(line|area)$/.test(ot)&&d.hasTypeOf(ct)||d.hasType(ot))&&it&&d[`update${ct}`](W.TransitionForExit)}),S.text&&E.selectAll(`.${on.selectedCircles}`).filter(d.isBarType.bind(d)).selectAll("circle").remove(),h.interaction_enabled&&!z&&W.EventRect&&(d.redrawEventRect(),(u=d.bindZoomEvent)==null||u.call(d))):(S.arcs&&d.redrawArc(H,_,W.Transform),S.radar&&d.redrawRadar(),S.polar&&d.redrawPolar(),S.funnel&&d.redrawFunnel(),C&&d.updateTreemap(_)),!m.resizing&&!C&&(d.hasPointType()||m.hasRadar)?it&&d.updateCircle():(f=d.hasLegendDefsPoint)!=null&&f.call(d)&&d.data.targets.forEach(d.point("create",this)),d.hasDataLabel()&&!d.hasArcType(null,["radar"])&&it&&d.updateText(),B&&d.updateTypesElements(),d.generateRedrawList(w,z,H,W.Subchart,it),d.updateTooltipOnRedraw(),d.callPluginHook("$redraw",t,H)},generateRedrawList(t,e,n,r,i=!0){const s=this,{config:o,state:l}=s,c=i?s.getDrawShape():l._cachedDrawShape||s.getDrawShape();i&&(l._cachedDrawShape=c),l.hasAxis&&o.subchart_show&&s.redrawSubchart(r,n,c);const u=e&&s.generateFlow({targets:t,flow:e,duration:e.duration,shape:c,xv:s.xv.bind(s)}),f=(n||u)&&os(),d=s.getRedrawList(c,e,u,f),h=()=>{u&&u(),l.redrawing=!1,l._targetsToShow=null,l._cachedDrawShape=null,Ne(o.onrendered,s.api)};if(f&&d.length){const m=Mh();ov().duration(n).each(()=>{d.flatMap(S=>S).forEach(S=>m.add(S))}).call(m,h)}else l.transiting||h();s.mapToIds(s.data.targets).forEach(m=>{l.withoutFadeIn[m]=!0})},getRedrawList(t,e,n,r){const i=this,{config:s,state:{hasAxis:o,hasRadar:l,hasTreemap:c},$el:{grid:u}}=i,{cx:f,cy:d,xForText:h,yForText:m}=t.pos,S=[];if(o){i.redrawGrid&&(s.grid_x_lines.length||s.grid_y_lines.length)&&S.push(i.redrawGrid(r)),i.redrawRegion&&s.regions.length&&S.push(i.redrawRegion(r));for(const E in t.type){const C=Ln(E),w=t.type[E];(/^(area|line)$/.test(E)&&i.hasTypeOf(C)||i.hasType(E))&&S.push(i[`redraw${C}`](w,r))}!e&&u.main&&i.updateGridFocus&&S.push(i.updateGridFocus())}return(!i.hasArcType()||l)&&vn(s.data_labels)&&s.data_labels!==!1&&S.push(i.redrawText(h,m,e,r)),(i.hasPointType()||l)&&!i.isPointFocusOnly()&&i.redrawCircle&&S.push(i.redrawCircle(f,d,r,n)),c&&S.push(i.redrawTreemap(r)),S},updateAndRedraw(t={}){const e=this,{config:n,state:r}=e;let i;t.withTransition=ia(t,"withTransition",!0),t.withTransform=ia(t,"withTransform",!1),t.withLegend=ia(t,"withLegend",!1),t.withUpdateXDomain=!0,t.withUpdateOrgXDomain=!0,t.withTransitionForExit=!1,t.withTransitionForTransform=ia(t,"withTransitionForTransform",t.withTransition),t.withLegend&&n.legend_show||(r.hasAxis&&(i=e.axis.generateTransitions(t.withTransitionForAxis?n.transition_duration:0)),e.updateScales(),e.updateSvgSize(),e.transformAll(t.withTransitionForTransform,i)),e.redraw(t)}},SA={setContainerSize(){const t=this,{state:e}=t;e.current.width=t.getCurrentWidth(),e.current.height=t.getCurrentHeight()},getCurrentWidth(){const t=this;return t.config.size_width||t.getParentRectValue("width")},getCurrentHeight(){var t,e;const n=this,{config:r,state:i,$el:s}=n;let o=r.size_height;if(!o){const l=i.isCanvasMode?(t=s.chart)==null?void 0:t.node():null,c=l==null?void 0:l.style.minHeight;c&&(l.style.minHeight=""),o=n.getParentHeight(),c&&(l.style.minHeight=c);const u=l&&parseFloat((e=n.canvasEngine)==null?void 0:e.canvas.style.height)||0,f=i.current.height-u;f>0&&Math.round(o)===Math.round(u)&&(o+=f)}return o>0?o:320/(n.hasType("gauge")&&!r.gauge_fullCircle?2:1)},getParentRectValue(t){const e=`offset${Ln(t)}`;let n=this.$el.chart.node(),r=0;for(;r<30&&n&&n.tagName!=="BODY";){try{r=ln(n,!0)[t]}catch(s){e in n&&(r=n[e])}n=n.parentNode}const i=Ye.body[e];return r>i&&(r=i),r},getParentHeight(){const t=this.$el.chart.style("height");let e=0;return t&&(e=/px$/.test(t)?parseInt(t,10):this.getParentRectValue("height")),e},getSvgLeft(t){var e,n,r;const i=this,{cache:s,config:o,state:{hasAxis:l},$el:c}=i;if(t){const st=s.get(Oe.svgLeft);if(st!==null)return st}const u=o.axis_rotated,f=u||!u&&!o.axis_y_inner,d=u?Rn.axisX:Rn.axisY,h=c.main.select(`.${d}`).node(),m=l&&o[`axis_${u?"x":"y"}_label`],E=l&&(je(m)||je(m.text)||/^inner-/.test(m==null?void 0:m.position))?c.main.select(`.${d}-label`):null,C=E&&!E.empty()?E.node():null,w=!t,$={label:C?ln(C,w):null,leftAxis:h&&f?ln(h,w):null,chart:ln(c.chart.node(),w)},z=(n=(e=$.label)==null?void 0:e.left)!=null?n:0,B=(r=$.leftAxis)!=null?r:{right:0},W=$.chart.left+z,H=i.hasArcType(),_=B.right-W-(H?0:i.getCurrentPaddingByDirection("left",t)),q=_>0?_:0;return s.add(Oe.svgLeft,q),q},previewResize(){var t,e,n;const r=this,{state:i,$el:s}=r,{current:o}=i,l=r.getCurrentWidth(),c=r.getCurrentHeight();if(!(!l||!c||!o.width||!o.height||l===o.width&&c===o.height)){if(i.isCanvasMode){const u=(t=r.canvasEngine)==null?void 0:t.canvas;if(!u)return;s.chart.style("min-height",`${c}px`),u.style.width=`${l}px`,u.style.height=`${Math.max(0,c-((n=(e=r.getCanvasBottomLegendHeight)==null?void 0:e.call(r))!=null?n:0))}px`}else if(s.svg)s.svg.attr("viewBox",`0 0 ${o.width} ${o.height}`).attr("preserveAspectRatio","none").attr("width",l).attr("height",c);else return;i.resizePreview=!0}},clearResizePreview(){const t=this,{config:e,state:n,$el:r}=t;n.resizePreview&&(n.resizePreview=!1,!n.isCanvasMode&&r.svg&&e.resize_auto!=="viewBox"&&r.svg.attr("viewBox",null).attr("preserveAspectRatio",null))},updateDimension(t){var e,n;const r=this,{config:i,state:{hasAxis:s,isCanvasMode:o},$el:l}=r;if(s&&!t&&r.axis.x&&i.axis_rotated&&((e=r.axis.subX)==null||e.create(l.axis.subX)),r.updateScales(t),o){(n=r.resizeCanvas)==null||n.call(r);return}r.updateSvgSize(),r.transformAll(!1)},updateSvgSize(){var t;const e=this,{config:n,state:{clip:r,current:i,hasAxis:s,width:o,height:l},$el:{svg:c}}=e;if(!c){(t=e.resizeCanvas)==null||t.call(e);return}if(e.clearResizePreview(),n.resize_auto==="viewBox"?c.attr("viewBox",`0 0 ${i.width} ${i.height}`):c.attr("width",i.width).attr("height",i.height),s){const u=c.select(`.${Th.brush} .overlay`),f={width:0,height:0};u.size()&&(f.width=+u.attr("width"),f.height=+u.attr("height")),c.selectAll([`#${r.id}`,`#${r.idGrid}`]).select("rect").attr("width",o).attr("height",l),c.select(`#${r.idXAxis}`).select("rect").call(e.setXAxisClipPath.bind(e)),c.select(`#${r.idYAxis}`).select("rect").call(e.setYAxisClipPath.bind(e)),r.idSubchart&&c.select(`#${r.idSubchart}`).select("rect").attr("width",o).attr("height",f.height)}},getCurrentPaddingByDirection(t,e=!1,n=!1){var r;const i=this,{config:s,$el:o,state:{hasAxis:l,isCanvasMode:c}}=i,u=s.axis_rotated,f=((r=s.padding)==null?void 0:r.mode)==="fit",d=ae(s[`padding_${t}`])?s[`padding_${t}`]:void 0,h=l?{top:u?"y2":null,bottom:u?"y":"x",left:u?"x":"y",right:u?null:"y2"}[t]:null,m=/^(left|right)$/.test(t),S=h&&s[`axis_${h}_inner`],E=h&&s[`axis_${h}_show`],C=h?s[`axis_${h}_axes`].length:0;let w=h?m?i.getAxisWidthByAxisId(h,e):i.getHorizontalAxisHeight(h):0;const $=20;let z=0;!f&&m&&(w=py(w));let B=l&&m&&(S||mn(d)&&!E)?0:f?(E?w:0)+(d!=null?d:0):mn(d)?w:d;return m&&l?(h&&(f||S)&&s[`axis_${h}_label`].text&&(B+=i.axis.getAxisLabelPosition(h).isOuter?$:0),t==="right"?(B+=u?!f&&mn(d)?10:2:!E||S?f?2:1:0,B+=n?i.axis.getXAxisTickTextY2Overflow($):0):t==="left"&&u&&mn(d)&&(B=s.axis_x_show?f?w:Math.max(w,40):1)):t==="top"?((o.title&&o.title.node()||c&&s.title_text)&&(B+=i.getTitlePadding()),z=u&&!S?C:0):t==="bottom"&&l&&u&&!E&&(B+=1),B+w*C-z},getCurrentPadding(t=!1){const e=this,[n,r,i,s]=["top","bottom","left","right"].map(o=>e.getCurrentPaddingByDirection(o,null,t));return{top:n,bottom:r,left:i,right:s}},getResettedPadding(t){const e=this,{config:n}=e,r=ae(t);let i=r?0:{};return n.padding===!1?!r&&Object.keys(t).forEach(s=>{i[s]=!lr(n.data_labels)&&n.data_labels!==!1&&s==="top"?t[s]:0}):i=t,i},updateSizes(t){var e,n,r,i,s;const o=this,{config:l,state:c,$el:{legend:u}}=o,f=l.axis_rotated,d=o.hasArcType()||c.hasFunnel||c.hasTreemap,h=((e=l.padding)==null?void 0:e.mode)==="fit";!t&&o.setContainerSize();const m=u?o.getLegendWidth():0,S=u?o.getLegendHeight():0,E={width:m,height:S};!d&&l.axis_x_show&&l.axis_x_tick_autorotate&&o.updateXAxisTickClip();const C={right:l.legend_show&&c.isLegendRight?m+(h?0:20):0,bottom:!l.legend_show||c.isLegendRight||c.isLegendInset?0:S},w=f||d?0:o.getHorizontalAxisHeight("x"),$=l.subchart_axis_x_show&&l.subchart_axis_x_tick_text_show?w:30,z=l.subchart_show&&!d?l.subchart_size_height+$:0,B=o.hasType("gauge")&&l.arc_needle_show&&!l.gauge_fullCircle&&!l.gauge_label_show?10:0,W=o.getCurrentPadding(!0);if(c.margin=!d&&f?{top:W.top,right:d?0:W.right+C.right,bottom:C.bottom+W.bottom,left:z+(d?0:W.left)}:{top:(h?0:4)+W.top,right:d?0:W.right+C.right,bottom:B+z+C.bottom+W.bottom,left:d?0:W.left},c.margin=o.getResettedPadding(c.margin),c.margin2=f?{top:c.margin.top,right:NaN,bottom:20+C.bottom,left:o.state.rotatedPadding.left}:{top:c.current.height-z-C.bottom,right:NaN,bottom:$+C.bottom,left:c.margin.left},c.margin3={top:0,right:NaN,bottom:0,left:0},(n=o.updateSizeForLegend)==null||n.call(o,E),c.width=c.current.width-c.margin.left-c.margin.right,c.height=c.current.height-c.margin.top-c.margin.bottom,c.width<0&&(c.width=0),c.height<0&&(c.height=0),c.width2=f?c.margin.left-c.rotatedPadding.left-c.rotatedPadding.right:c.width,c.height2=f?c.height:c.current.height-c.margin2.top-c.margin2.bottom,c.width2<0&&(c.width2=0),c.height2<0&&(c.height2=0),o.hasArcType()){const H=o.hasType("gauge"),_=l.legend_show&&c.isLegendRight,q=(r=c.hasRadar&&o.cache.get(Oe.radarTextWidth))!=null?r:0;c.arcWidth=c.width-(_?E.width+10:0)-q,c.arcHeight=c.height-(_&&!H?0:10),(i=l.arc_rangeText_values)!=null&&i.length&&(H?(c.arcWidth-=25,c.arcHeight-=10,c.margin.left+=10):(c.arcHeight-=20,c.margin.top+=10)),H&&!l.gauge_fullCircle&&(c.arcHeight+=c.height-o.getPaddingBottomForGauge()),(s=o.updateRadius)==null||s.call(o)}c.isLegendRight&&d&&(c.margin3.left=c.arcWidth/2+c.radiusExpanded*1.1)}},AA={setCssRule(t,e,n,r){const i=this,{config:s,state:{cssRule:o,style:l}}=i;return s.boost_useCssRule?c=>{c.each(u=>{const f=r&&(r==null?void 0:r.call(i,u)),d=`${t?`.${Tn.shapes+i.getTargetSelectorSuffix(u.id)}`:""}${e}`;e in o&&l.sheet.deleteRule(o[d]),i.state.cssRule[d]=W1(l,d,n.filter(Boolean).map(h=>je(f)&&h.indexOf(":")===-1?`${h}: ${f}`:h||""))})}:()=>{}},getStylePropValue(t){const{config:{boost_useCssRule:e}}=this;return e?null:ie(t)?t.bind(this):t}};function Ev(t){return typeof t=="string"?new fn([document.querySelectorAll(t)],[document.documentElement]):new fn([b(t)],hr)}function EA(t){let e="middle";return t>0&&t<=170?e="end":t>190&&t<=360&&(e="start"),e}function CA(t,e,n,r,i){var s;const o=this,{value:l}=t,c=o.isCandlestickType(t),u=ae(l)&&l<0||c&&!((s=o.getCandlestickData(t))!=null&&s._isUp);let{x:f,y:d}=e;const h=4,m=h*2;return r?n==="start"?(f+=u?0:m,d+=h):n==="middle"?(f+=m,d-=m):n==="end"&&(u&&(f-=m),d+=h):(n==="start"?(f+=h,u&&(d+=m*2)):n==="middle"?d-=m:n==="end"&&(f-=h,u&&(d+=m*2)),i&&(d+=u?-17:c?13:7)),{x:f,y:d}}function Cv(t,e){var n;const r=this.config.data_labels_position,{id:i,index:s,value:o}=t;return(n=ie(r)?r.bind(this.api)(e,o,i,s,this.$el.text):(i in r?r[i]:r)[e])!=null?n:0}function IA(t,e,n){var r,i;const s=this,{config:o,$T:l}=s,c=o.axis_rotated,{border:{padding:u="3 5",radius:f=10,stroke:d="#000",strokeWidth:h=1,fill:m="none"}}=o.data_labels,S=jf(u),E=o.data_labels.border!==!0,C=ha(t);let w=Yt(t.previousElementSibling);(w.empty()||((r=w.node())==null?void 0:r.tagName)!=="rect"||!((i=w.attr("class"))!=null&&i.includes(n)))&&(w=Yt(t.parentNode).insert("rect",()=>t).attr("class",`${En.textBorderRect} ${n}`).attr("width",C.width+(E?S.left+S.right:0)).attr("height",C.height+(E?S.top+S.bottom:0)),E&&w.style("fill",m).style("stroke",d).style("stroke-width",`${h}px`).attr("rx",f).attr("ry",f)),l(w).attr("x",e.x-(E?S.left:0)-(c?0:C.width/2)).attr("y",e.y-(E?S.top:0)-C.height/4*3.2)}function Qc(t=0,e){const n=this,{config:r}=n,i=r[`${e}_label_threshold`]||0;return t>=i}function Iv(){const t=this,{$el:{text:e},config:n}=t;(t.state.arcWidth?t.getArcLabelConfig("image"):n.data_labels.image)&&e.filter(function(){const i=this.previousElementSibling;return i?i.tagName!=="image"||!i.classList.contains(En.textLabelImage):!0}).each(function(i){var s,o,l,c;const u=RA.call(t,i);if(!u)return;const{url:f,width:d,height:h,pos:m}=u;if(f){const S=Yt(this.parentNode);S==null||S.insert("image",`${(o=(s=this.getAttribute("class"))==null?void 0:s.replace(/(?:^(.)|\s)/g,".$1"))!=null?o:"text"}`).style("opacity","0").attr("href",E=>Pa(f,{ID:"id"in E?E.id:E.data.id})).attr("class",En.textLabelImage).style("pointer-events","none").attr("width",d).attr("height",h).attr("transform",m?`translate(${(l=m.x)!=null?l:0} ${(c=m.y)!=null?c:0})`:null)}})}function RA(t){var e;const n=this,{config:r,state:i}=n,s=i.arcWidth?n.getArcLabelConfig("image"):r.data_labels.image;if(ie(s))return(e=s.call(n.api,t.value,t.id,t.index))!=null?e:{url:"",width:0,height:0,pos:{x:0,y:0}};if(s){const{url:o="",width:l=0,height:c=0,pos:u}=s;return{url:o,width:l,height:c,pos:u}}return null}function Rv(t,e,n){var r;const i=this,{config:s,state:{arcWidth:o,hasTreemap:l}}=i,c=s.axis_rotated,u=Yt(t.previousElementSibling),f=d=>{var h;const m=d.style.opacity!=="0"&&d.style.fillOpacity!=="0";return(o?d.textContent:m)&&((h=this.previousElementSibling)==null?void 0:h.tagName)!=="image"};if(!u.empty()&&((r=u.node())==null?void 0:r.tagName)==="image"){const d=n||ln(t),h=+u.attr("width")/2,m=+u.attr("height")/2;let S=e.x-h,E=e.y-m-d.height/2;c?e.x+=h:(l&&(S=-h,E=-(m*2+d.height)),i.hasType("pie")||i.hasType("polar")||(e.y+=m)),i.$T(u).style("opacity",f(t)?null:"0").attr("x",S).attr("y",E)}}function wA(t){return Kf(t,e=>e,e=>ha(e,!0))}var OA={opacityForText(t){const e=this;return e.isBarType(t)&&!Qc.call(e,Math.abs(e.getRatio("bar",t)),"bar")?"0":e.hasDataLabel()?null:"0"},initText(){const{$el:t}=this;t.main.select(`.${ze.chart}`).append("g").attr("class",En.chartTexts).style("pointer-events",t.funnel||t.treemap?"none":null)},updateTargetsForText(t){const e=this,n=e.getChartClass("Text"),r=e.getClass("texts","id"),i=e.classFocus.bind(e);e.$el.main.select(`.${En.chartTexts}`).selectAll(`.${En.chartText}`).data(e.filterNullish(t)).attr("class",l=>`${n(l)}${i(l)}`.trim()).enter().append("g").style("opacity","0").attr("class",n).call(e.setCssRule(!0,` .${En.text}`,["fill","pointer-events:none"],e.updateTextColor)).append("g").attr("class",r)},updateText(){const t=this,{$el:e,$T:n,config:r,axis:i}=t,s=t.getClass("text","index"),o=r.data_labels.centered,l=e.main.selectAll(`.${En.texts}`).selectAll(`.${En.text}`).data(t.labelishData.bind(t));n(l.exit()).style("fill-opacity","0").remove(),e.text=l.enter().append("text").merge(l).attr("class",s).attr("text-anchor",c=>{let f=r[`axis_${i==null?void 0:i.getId(c.id)}_inverted`]?c.value>0:c.value<0;if(t.isCandlestickType(c)){const d=t.getCandlestickData(c);f=!(d!=null&&d._isUp)}else if(t.isTreemapType(c))return o?"middle":"start";return r.axis_rotated?f?"end":"start":"middle"}).style("fill",t.getStylePropValue(t.updateTextColor)).style("fill-opacity","0").each(function(c,u,f){const d=Yt(this);let{value:h}=c;if(t.isBubbleZType(c))h=t.getBubbleZData(h,"z");else if(t.isCandlestickType(c)){const m=t.getCandlestickData(c);m&&(h=m.close)}h=t.isTreemapType(c)?t.treemapDataLabelFormat(c)(d):t.dataLabelFormat(c.id)(h,c.id,c.index,f),ae(h)?this.textContent=h:ci(d,h,void 0,!0)}),Iv.call(t)},updateTextColor(t){const e=this,{config:n}=e,r=n.data_labels_colors,i=e.isArcType(t)&&!e.isRadarType(t)||e.isFunnelType(t)||e.isTreemapType(t)?null:e.color(t);let s;if(je(r))s=r;else if(He(r)){const{id:o}=t.data||t;s=r[o]}else ie(r)&&(s=r.bind(e.api)(i,t));if(e.isCandlestickType(t)&&!ie(r)){const o=e.getCandlestickData(t);if(!(o!=null&&o._isUp)){const l=n.candlestick_color_down;s=He(l)?l[t.id]:l}}return s||i},updateTextBGColor(t,e){const n=this,{$el:{defs:r}}=n;let i="";if(e){const s=je(e)?"":n.getTargetSelectorSuffix("id"in t?t.id:t.data.id),o=r.select(["filter[id*='labels-bg","']"].join(s));if(o.size()&&(i=`url(#${o.attr("id")})`),ie(e)){n.generateTextBGColorFilter(e);const l=n.color(t),c=e.bind(n.api)(l,t);c?o.select("feFlood").attr("flood-color",c):i=""}}return i||null},redrawText(t,e,n,r){const i=this,{$T:s,axis:o,config:l,state:{hasTreemap:c}}=i,u=Cr(!0),f=l.axis_rotated,d=l.data_labels.rotate,h=EA(d),m=d?`rotate(${d})`:"",S=i.$el.text.style("fill",i.getStylePropValue(i.updateTextColor)).attr("filter",w=>i.updateTextBGColor.bind(i)(w,l.data_labels_backgroundColors)).style("fill-opacity",n?0:i.opacityForText.bind(i)),E=new Map,C=[];return S.each(function(w){const $=this;E.set($,{rect:ln($)}),l.data_labels.centered&&(i.isBarType(w)||i.isTreemapType(w))&&C.push($)}),C.length>0&&wA(C).forEach((w,$)=>{const z=E.get($);z&&(z.bbox=w)}),S.each(function(w,$){const z=E.get(this),B=s(c&&this.childElementCount?this.parentNode:this,!!(r&&(this.getAttribute("x")||this.getAttribute("transform"))),u),W=l[`axis_${o==null?void 0:o.getId(w.id)}_inverted`];let H={x:t.call(this,w,$,z),y:e.call(this,w,$,z)};d&&(H=CA.bind(i)(w,H,h,f,W),B.attr("text-anchor",h)),Rv.call(i,this,H,z==null?void 0:z.rect),this.childElementCount||d?B.attr("transform",`translate(${H.x} ${H.y}) ${m}`):B.attr("x",H.x).attr("y",H.y),l.data_labels.border&&IA.call(i,B.node(),H,`${En.textBorderRect}-${$}`)}),!0},getTextRect(t,e){var n,r;const i=this;let s,o,l;Array.isArray(t)?s=`${Oe.textRect}-${t.join("_")}`:(o=(r=(n=t.node)==null?void 0:n.call(t))!=null?r:t,/text/i.test(o.tagName)||(o=o.querySelector("text")),l=o.textContent,s=`${Oe.textRect}-${l.replace(/\W/g,"_")}`);const c=i.cache.get(s)||[];return c.length===0&&((i.$el.svg||i.$el.chart.select("svg")).selectAll(`.${ze.dummy}`).data(l?[l]:t).enter().append("text").style("visibility","hidden").style("font",o?Yt(o).style("font"):null).classed(e||ze.dummy,!0).text(u=>u).each(function(u,f){c[f]=ln(this)}).remove(),i.cache.add(s,c)),c.length>1?c:c[0]},generateXYForText(t,e){const n=this,{state:{hasRadar:r,hasFunnel:i,hasTreemap:s}}=n,o=Object.keys(t),l={},c=e?n.getXForText:n.getYForText;return i&&o.push("funnel"),r&&o.push("radar"),s&&o.push("treemap"),o.forEach(u=>{l[u]=n[`generateGet${Ln(u)}Points`](t[u],!1)}),function(u,f,d){const h=n.isAreaType(u)&&"area"||n.isBarType(u)&&"bar"||n.isCandlestickType(u)&&"candlestick"||n.isFunnelType(u)&&"funnel"||n.isRadarType(u)&&"radar"||n.isTreemapType(u)&&"treemap"||"line";return c.call(n,l[h](u,f),u,this,d)}},getCenteredTextPos(t,e,n,r,i){const s=this,{config:o}=s,l=o.axis_rotated,c=s.isBarType(t),u=s.isTreemapType(t);if(o.data_labels.centered&&(c||u)){const f=(i==null?void 0:i.bbox)||ha(n);if(c){const d=s.getRangedData(t,null,"bar")>=0;if(l){const h=(d?e[1][1]-e[0][1]:e[0][1]-e[1][1])/2+f.width/2;return d?-h-3:h+2}else{const h=(d?e[0][1]-e[1][1]:e[1][1]-e[0][1])/2+f.height/2;return d?h:-h-2}}else if(u)return r==="x"?(e[1][0]-e[0][0])/2:(e[1][1]-e[0][1])/2-f.y-f.height/2}return 0},getXForText(t,e,n,r){var i,s,o;const l=this,{config:c}=l,u=c.axis_rotated,f=l.isFunnelType(e),d=l.isTreemapType(e);let h=t?t[0][0]:0;if(l.isCandlestickType(e))u?h=(i=l.getCandlestickData(e))!=null&&i._isUp?t[2][2]+4:t[2][1]-4:h+=(t[1][0]-h)/2;else if(f)if(t)h=(o=(s=t[2])==null?void 0:s[0])!=null?o:h;else return Ic(n,"x");else if(d)h+=c.data_labels.centered?0:5;else if(u){const m=c[`axis_${l.axis.getId(e.id)}_inverted`],S=l.isBarType(e)?4:6,E=e.value;h=t[2][1],h+=S*((m?E>0:E<0)?-1:1)}else h=l.hasType("bar")?(t[2][0]+t[0][0])/2:h;return(u||d||f)&&(h+=l.getCenteredTextPos(e,t,n,"x",r)),h+Cv.call(this,e,"x")},getYForText(t,e,n,r){var i,s;const o=this,{axis:l,config:c,state:u}=o,f=c.axis_rotated,d=c[`axis_${l==null?void 0:l.getId(e.id)}_inverted`],h=o.isBarType(e),m=o.isFunnelType(e),S=o.isTreemapType(e),E=c.point_r,C=(r==null?void 0:r.rect)||ln(n);let{value:w}=e,$=3,z;if(o.isCandlestickType(e))w=o.getCandlestickData(e),f?(z=t[0][0],z+=(t[1][0]-z)/2+$):(z=w&&w._isUp?t[2][2]-$:t[2][1]+$*4,d&&(z+=15*(w._isUp?1:-1)));else if(m)if(t)z=((s=(i=t[2])==null?void 0:i[1])!=null?s:t[0][1])+C.height/2-3;else return Ic(n,"y");else if(S)z=t[0][1]+(c.data_labels.centered?0:C.height+5);else if(f)z=(t[0][0]+t[2][0]+C.height*.6)/2;else if(z=t[2][1],ae(E)&&E>5&&(o.isLineType(e)||o.isScatterType(e))&&($+=c.point_r/2.3),w<0||w===0&&!u.hasPositiveValue&&u.hasNegativeValue)z+=d?h?-3:-5:C.height+(h?-$:$);else{let B=-$*2;h?B=-$:o.isBubbleType(e)&&(B=$),d&&(B=h?10:15),z+=B}return(!f||S)&&(z+=o.getCenteredTextPos(e,t,n,"y",r)),z+Cv.call(this,e,"y")},markOverlapped(t,e,n){const r=e.$el.arcs.selectAll(n),i=r.filter(f=>f.data.id!==t),s=r.filter(f=>f.data.id===t),o=Cc(s.node()),l=(f,d)=>Math.sqrt(f*f+d*d);if(!s.node())return;const c=parseInt(s.style("font-size"),10),u=[];i.each(function(){const f=Cc(this),d=l(o.e,o.f)>l(f.e,f.f)?s:Yt(this),h=Math.ceil(Math.abs(o.e-f.e))<Math.ceil(d.node().getComputedTextLength()),m=Math.ceil(Math.abs(o.f-f.f))<c;u.push({node:this,overlaps:h&&m})}),u.forEach(({node:f,overlaps:d})=>{Yt(f).classed(En.TextOverlapping,d)})},undoMarkOverlapped(t,e){t.$el.arcs.selectAll(e).each(function(){Ev([this,this.previousSibling]).classed(En.TextOverlapping,!1)})}};function wv(t="left",e){const n=ae(e);return t.includes("center")?n?e/2:"middle":t.includes("right")?n?e:"end":n?0:"start"}function PA(t){var e,n,r,i,s,o,l,c;const{config:u,$el:f}=t,d=((r=(n=(e=t.canvasTheme)==null?void 0:e.style)==null?void 0:n.title)==null?void 0:r.font)||((o=(s=(i=t.canvasTheme)==null?void 0:i.style)==null?void 0:s.label)==null?void 0:o.font)||"14px sans-serif",h=(c=(l=f.chart)==null?void 0:l.node)==null?void 0:c.call(l),m=h==null?void 0:h.ownerDocument;if(h&&m&&u.title_text){const S=m.createElementNS("http://www.w3.org/2000/svg","svg"),E=m.createElementNS("http://www.w3.org/2000/svg","text");S.style.cssText="position:absolute;visibility:hidden;left:-10000px;top:-10000px;",E.setAttribute("class",En.title),E.style.font=d,E.textContent=String(u.title_text),S.appendChild(E),h.appendChild(S);const C=ln(E).height;if(S.remove(),C)return C}return u.title_text?parseFloat(d)||14:0}var MA={initTitle(){const t=this,{config:e,$el:n}=t;if(e.title_text){n.title=n.svg.append("g");const r=n.title.append("text").style("text-anchor",wv(e.title_position)).attr("class",En.title);ci(r,e.title_text,[.3,1.5])}},redrawTitle(){const t=this,{config:e,state:{current:n},$el:{title:r}}=t;if(r){const i=wv(e.title_position,n.width),s=(e.title_padding.top||0)+t.getTextRect(t.$el.title,En.title).height;r.attr("transform",`translate(${i}, ${s})`)}},getCanvasTitleHeight(){return PA(this)},getTitlePadding(){const t=this,{$el:{title:e},config:n,state:r}=t,i=n.title_padding.top||0,s=n.title_padding.bottom||0;if(r.isCanvasMode&&n.title_text)return i+t.getCanvasTitleHeight()+s;if(!(e!=null&&e.node()))return i+s;const o=e.node(),l=Ic(o,"y");if(l){const c=ha(o);return l+c.y+c.height+s}return i+t.getTextRect(e,En.title).height+s}};const LA=/(\r?\n|\t)/g,DA=/{{(.*)}}/;var FA={initTooltip(){const t=this,{config:e,$el:n}=t;n.tooltip=Yt(e.tooltip_contents.bindto),n.tooltip.empty()&&(n.tooltip=n.chart.append("div").attr("class",bo.tooltipContainer).style("position","absolute").style("pointer-events","none").style("display","none")),t.bindTooltipResizePos()},initShowTooltip(){var t;const e=this,{config:n,$el:r,state:{hasAxis:i,hasRadar:s}}=e;if(n.tooltip_init_show){const o=!(i||s);(t=e.axis)!=null&&t.isTimeSeries()&&je(n.tooltip_init_x)&&(n.tooltip_init_x=Wn.call(e,n.tooltip_init_x)),e.api.tooltip.show({data:{[o?"index":"x"]:n.tooltip_init_x}});const l=n.tooltip_init_position;if(!n.tooltip_contents.bindto&&!lr(l)){const{top:c=0,left:u=50}=l;r.tooltip.style("top",je(c)?c:`${c}px`).style("left",je(u)?u:`${u}px`).style("display",null)}}},getTooltipHTML(...t){const e=this,{api:n,config:r}=e;return Gr(ie(r.tooltip_contents)?r.tooltip_contents.bind(n)(...t):e.getTooltipContent(...t))},getTooltipContent(t,e,n,r){var i;const s=this,{api:o,config:l,state:c,$el:u}=s,f=l.tooltip_format_title,d=l.tooltip_format_name,h=l.tooltip_format_value,m=ie(f)?f.bind(o):e,S=ie(d)?d.bind(o):(tt=>tt),E=ie(h)?h.bind(o):null,C=(tt,ft,lt,bt)=>{let St=E;return St||(c.hasTreemap||s.isStackNormalized()&&(!s.isStackNormalizedPerGroup()||s.isGrouped(lt))?St=(Mt,Ot)=>`${(Ot*100).toFixed(2)}%`:St=n),St(tt,ft,lt,bt)},w=l.tooltip_order,$=tt=>s.axis&&s.isBubbleZType(tt)?s.getBubbleZData(tt.value,"z"):s.getBaseValue(tt),z=s.levelColor?tt=>s.levelColor(tt.value):tt=>r(tt),B=l.tooltip_contents,W=B.template,H=s.mapToTargetIds();if(w===null&&l.data_groups.length){const tt=s.orderTargets(s.data.targets).map(ft=>ft.id).reverse();t.sort((ft,lt)=>{let bt=ft?ft.value:null,St=lt?lt.value:null;return bt>0&&St>0&&(bt=ft.id?tt.indexOf(ft.id):null,St=lt.id?tt.indexOf(lt.id):null),bt-St})}else if(/^(asc|desc)$/.test(w)){const tt=w==="asc";t.sort((ft,lt)=>{const bt=ft?$(ft):null,St=lt?$(lt):null;return tt?bt-St:St-bt})}else ie(w)&&t.sort(w.bind(o));const _=s.getTooltipContentTemplate(W),q=t.length;let st,it,ot,ct,gt;for(gt=0;gt<q;gt++){it=t[gt];const tt=it&&$(it);if(!(!it||!(tt||tt===0))){if(mn(st)){const ft=(c.hasAxis||c.hasRadar)&&m(it.x);st=Pa(_[0],{CLASS_TOOLTIP:bo.tooltip,TITLE:Ge(ft)?W?ft:`<tr><th colspan="2">${ft}</th></tr>`:""})}if(!it.ratio&&u.arcs&&(ot=["arc",s.$el.arcs.select(`path.${Ze.arc}-${it.id}`).data()[0]],it.ratio=s.getRatio(...ot)),ot=[it.ratio,it.id,it.index],s.isAreaRangeType(it)){const[ft,lt]=["high","low"].map(St=>C(s.getRangedData(it,St),...ot));ct=`<b>Mid:</b> ${C($(it),...ot)} <b>High:</b> ${ft} <b>Low:</b> ${lt}`}else if(s.isCandlestickType(it)){const[ft,lt,bt,St,Mt]=["open","high","low","close","volume"].map(Ot=>s.getRangedData(it,Ot,"candlestick")?C(s.getRangedData(it,Ot,"candlestick"),...ot):void 0);ct=`<b>Open:</b> ${ft} <b>High:</b> ${lt} <b>Low:</b> ${bt} <b>Close:</b> ${St}${Mt?` <b>Volume:</b> ${Mt}`:""}`}else if(s.isBarRangeType(it)){const{value:ft,id:lt,index:bt}=it;ct=`${C(ft,void 0,lt,bt)}`}else ct=C($(it),...ot);if(ct!==void 0){if(it.name===null)continue;const ft=S((i=it.name)!=null?i:it.id,...ot),lt=z(it),bt={CLASS_TOOLTIP_NAME:bo.tooltipName+s.getTargetSelectorSuffix(it.id),COLOR:W||!s.patterns?lt:`<svg><rect style="fill:${lt}" width="10" height="10"></rect></svg>`,NAME:ft,VALUE:ct};if(W&&He(B.text)){const St=H.indexOf(it.id);Object.keys(B.text).forEach(Mt=>{bt[Mt]=B.text[Mt][St]})}st+=Pa(_[1],bt)}}}return`${st}</table>`},getTooltipContentTemplate(t){return(t||`<table class="{=CLASS_TOOLTIP}"><tbody>
{=TITLE}
{{<tr class="{=CLASS_TOOLTIP_NAME}">
<td class="name">${this.patterns?"{=COLOR}":'<span style="background-color:{=COLOR}"></span>'}{=NAME}</td>
<td class="value">{=VALUE}</td>
</tr>}}
</tbody></table>`).replace(LA,"").split(DA)},setTooltipPosition(t,e){var n,r;const i=this,{config:s,scale:o,state:l,$el:{eventRect:c,tooltip:u,svg:f}}=i,{bindto:d}=s.tooltip_contents,h=s.axis_rotated,m=u==null?void 0:u.datum();if(!d&&m){const S=t!=null?t:m.data,[E,C]=Jn(l.event,e!=null?e:c==null?void 0:c.node()),w={x:E,y:C};if(l.hasAxis&&o.x&&m&&"x"in m){const W=(H=0,_,q="y")=>{var st;const it=o[_?(st=i.axis)==null?void 0:st.getId(_):q];return it?it(H)+(h?l.margin.left:l.margin.top):0};w.xAxis=o.x(m.x)+(s.tooltip_position?h?l.margin.top:l.margin.left:0),S.length===1?w.yAxis=W(S[0].value,S[0].id):w.yAxis=W}const{width:$=0,height:z=0}=m,B=(r=(n=s.tooltip_position)==null?void 0:n.bind(i.api)(S,$,z,c==null?void 0:c.node(),w))!=null?r:f&&Rc(f)?i.getTooltipPositionViewBox.bind(i)($,z,w):i.getTooltipPosition.bind(i)($,z,w);["top","left"].forEach(W=>{const H=B[W];u.style(W,`${H}px`),W==="left"&&!m.xPosInPercent&&(m.xPosInPercent=H/l.current.width*100)})}},getTooltipPositionViewBox(t,e,n){var r,i;const s=this,{$el:{eventRect:o,svg:l},config:c,state:u}=s,f=c.axis_rotated,d=s.hasArcType()||u.hasFunnel||u.hasTreemap,h=(i=(r=d?l:o)==null?void 0:r.node())!=null?i:u.event.target;let{x:m,y:S}=n;u.hasAxis&&(m=f?m:n.xAxis,S=f?n.xAxis:S);const E=So(h,m,S,!1),C=ln(h),w=So(h,20,0,!1).x;let $=E.y,z=E.x+t/2+w;return d&&(u.hasFunnel||u.hasTreemap||u.hasRadar?(z-=t/2+w,$+=e):($+=C.height/2,z+=C.width/2-(t-w))),z+t>C.width&&(z=C.width-t-w),$+e>C.height&&($-=e*2),{top:$,left:z}},getTooltipPosition(t,e,n){var r,i,s;const o=this,{config:l,scale:c,state:u}=o,{width:f,height:d,current:h,hasFunnel:m,hasRadar:S,hasTreemap:E,isLegendRight:C,inputType:w}=u,$=o.hasType("gauge")&&!l.gauge_fullCircle,z=l.axis_rotated,B=o.hasArcType(),W=u.isCanvasMode?0:o.getSvgLeft(!0);let H=W+h.width-o.getCurrentPaddingByDirection("right");const _=20;let{x:q,y:st}=n;if(S)q+=q>=f/2?15:-(t+15),st+=15;else if(B){if(w!=="touch"){let ct=(i=(r=o.getTitlePadding)==null?void 0:r.call(o))!=null?i:0;ct&&$&&((s=l.arc_rangeText_values)!=null&&s.length)&&(ct+=10),q+=(f-(C?o.getLegendWidth():0))/2,st+=($?d:d/2+e)+ct}}else if(m||E)st+=e;else{const ot={top:o.getCurrentPaddingByDirection("top",!0),left:o.getCurrentPaddingByDirection("left",!0)};z?(q+=W+ot.left+_,st=ot.top+n.xAxis+_,H-=W):(q=W+ot.left+_+(c.zoom?q:n.xAxis),st+=ot.top-5)}if(q+t+15>H&&(q-=t+(m||E||B?0:z?_*2:38)),st+e>h.height){const ot=E?e+10:30;st-=$?e*1.5:e+ot}const it={top:st,left:q};return it.top<0&&(it.top=0),it.left<0&&(it.left=0),it},showTooltip(t,e){const n=this,{config:r,$el:{tooltip:i}}=n;if(!i||!r.tooltip_show)return;let s=null,o=0,l=`${n.data.targets.length}:`,c;for(let d=0;d<t.length;d++){const h=t[d];d>0&&(l+=","),l+=`${h==null?void 0:h.index}|${h==null?void 0:h.id}|${h==null?void 0:h.value}`,!c&&h&&(c=h),h&&Ge(n.getBaseValue(h))?(o++,s==null||s.push(h)):s||(s=t.slice(0,d))}if(o===0||!c)return;const u=i.datum();let f=s;if(!u||u.current!==l){const{index:d,x:h}=c;f||(f=t.slice()),Ne(r.tooltip_onshow,n.api,t),i.html(n.getTooltipHTML(t,n.axis?n.axis.getXAxisTickFormat():n.categoryName.bind(n),n.getDefaultValueFormat(),n.color)).style("display",null).style("visibility",null),i.datum({index:d,x:h,current:l,data:t,width:i.property("offsetWidth"),height:i.property("offsetHeight")}),Ne(r.tooltip_onshown,n.api,t),n._handleLinkedCharts(!0,d)}n.setTooltipPosition(f||t,e)},bindTooltipResizePos(){const t=this,{resizeFunction:e,state:n,$el:{tooltip:r}}=t;e.add(()=>{if(r.style("display")==="block"){const{current:i}=n,{width:s,xPosInPercent:o}=r.datum();let l=i.width/100*o;const c=i.width-(l+s);c<0&&(l+=c),r.style("left",`${l}px`)}})},hideTooltip(t){var e;const n=this,{api:r,config:i,$el:{tooltip:s}}=n;if(s&&s.style("display")!=="none"&&(!i.tooltip_doNotHide||t)){const o=(e=s.datum().data)!=null?e:[];Ne(i.tooltip_onhide,r,o),s.style("display","none").datum(null),Ne(i.tooltip_onhidden,r,o)}},_handleLinkedCharts(t,e){const n=this,{charts:r,config:i,state:{event:s}}=n;if(s!=null&&s.isTrusted&&i.tooltip_linked&&r.length>1){const o=i.tooltip_linked_name;r.filter(l=>l!==n.api).forEach(l=>{var c,u;const{config:f,$el:d,state:h}=l.internal,m=f.tooltip_linked,S=f.tooltip_linked_name,E=Ye.body.contains(d.chart.node());if(m&&o===S&&E){const C=d.tooltip.data()[0],w=e!==(C==null?void 0:C.index);try{t&&w&&h.isCanvasMode?(u=(c=l.internal).showCanvasLinkedTooltip)==null||u.call(c,e):l.tooltip[t&&w?"show":"hide"]({index:e})}catch($){}}})}},updateTooltipOnRedraw(t,e){var n;const r=this,{config:i,$el:{eventRect:s,svg:o,tooltip:l},state:{event:c,hasAxis:u,hasRadar:f,hasTreemap:d}}=r;if(!r.state.isCanvasMode&&(l==null?void 0:l.style("display"))==="block"&&c){const h=t!=null?t:(n=f?o:s)==null?void 0:n.node();if(u||f)if(r.isMultipleX())r.selectRectForMultipleXs(h,!1);else{const m=e!=null?e:r.getDataIndexFromEvent(c);e===-1?r.api.tooltip.hide():(r.selectRectForSingle(h,m),r.setExpand(m,null,!0))}else{const{clientX:m,clientY:S}=c;setTimeout(()=>{let E=[m,S].every(Number.isFinite)&&Ye.elementFromPoint(m,S);const C=E&&Yt(E).datum();if(C){const w=r.hasArcType()?r.convertToArcData(r.updateAngle(C)):C==null?void 0:C.data;d&&(E=o.node()),w&&r.showTooltip([w],E)}else r.api.tooltip.hide()},i.transition_duration)}}}},NA={getTranslate(t,e=0){var n;const r=this,{config:i,state:s}=r,o=i.axis_rotated;let l=0,c,u;if(e&&/^(x|y2?)$/.test(t)&&(l=r.getAxisSize(t)*e),t==="main")c=qa(s.margin.left),u=qa(s.margin.top);else if(t==="context")c=qa(s.margin2.left),u=qa(s.margin2.top);else if(t==="legend")c=s.margin3.left,u=s.margin3.top;else if(t==="x")c=o?-l:0,u=o?0:s.height+l;else if(t==="y")c=o?0:-l,u=o?s.height+l:0;else if(t==="y2")c=o?0:s.width+l,u=o?-l-1:0;else if(t==="subX")c=0,u=o?0:s.height2;else if(t==="subY")c=0,u=o?s.height2:0;else if(t==="subY2")c=o?0:s.width2,u=o?-1:0;else if(t==="arc")c=s.arcWidth/2,u=s.arcHeight/2,(n=i.arc_rangeText_values)!=null&&n.length&&(u+=5+(r.hasType("gauge")&&i.title_text?10:0));else if(t==="polar")c=s.arcWidth/2,u=s.arcHeight/2;else if(t==="radar"){const[f,d]=r.getRadarSize();c=s.width/2-f,u=s.height/2-d}return`translate(${c}, ${u})`},transformMain(t,e){const n=this,{$el:{main:r},$T:i}=n,s=e!=null&&e.axisX?e.axisX:i(r.select(`.${Rn.axisX}`),t),o=e!=null&&e.axisY?e.axisY:i(r.select(`.${Rn.axisY}`),t),l=e!=null&&e.axisY2?e.axisY2:i(r.select(`.${Rn.axisY2}`),t);i(r,t).attr("transform",n.getTranslate("main")),s.attr("transform",n.getTranslate("x")),o.attr("transform",n.getTranslate("y")),l.attr("transform",n.getTranslate("y2")),r.select(`.${Ze.chartArcs}`).attr("transform",n.getTranslate("arc"))},transformAll(t,e){const n=this,{config:r,state:{hasAxis:i,hasFunnel:s,hasTreemap:o,isCanvasMode:l},$el:c}=n;l||(!s&&!o&&n.transformMain(t,e),i&&r.subchart_show&&n.transformContext(t,e),c.legend&&n.transformLegend(t))}};const $A=new Set(["basis","basis-closed","basis-open","bundle","cardinal","cardinal-closed","cardinal-open","catmull-rom","catmull-rom-closed","catmull-rom-open","linear","linear-closed","monotone-x","monotone-y","natural"]);var BA={isValidChartType(t){return!!(t&&Object.values(qt).indexOf(t)>-1)},getSubchartTargetType(t){const e=this,{config:n}=e,r=je(t)?t:t==null?void 0:t.id,i=n.subchart_types||{},s=n.subchart_type,o=n.data_types||{},l=r&&i[r];return l&&e.isValidChartType(l)?l:s&&e.isValidChartType(s)?s:r&&o[r]||n.data_type||qt.LINE},getTargetType(t){var e;const{config:n}=this,r=je(t)?t:t==null?void 0:t.id;return r&&((e=n.data_types)==null?void 0:e[r])||n.data_type||qt.LINE},getSubchartSourceTargetType(t){const{state:e}=this,n=je(t)?t:t==null?void 0:t.id,r=e.subchartSourceTypes;return n&&(r==null?void 0:r[n])||this.getTargetType(t)},isSubchartSourceTypeOf(t,e){const n=this.getSubchartSourceTargetType(t);return qe(e)?e.indexOf(n)>=0:n===e},withSubchartTypeContext(t){const e=this,{config:n,data:r,state:i}=e,s=n.data_type,o=n.data_types,l=i.current.types,c=i.subchartSourceTypes,u={},f={},d=n.subchart_type;e.mapToIds(r.targets).forEach(h=>{f[h]=e.getTargetType(h),u[h]=e.getSubchartTargetType(h)}),n.data_type=d&&e.isValidChartType(d)?d:s,n.data_types=u,i.current.types=[],i.subchartSourceTypes=f;try{return t()}finally{n.data_type=s,n.data_types=o,i.current.types=l,i.subchartSourceTypes=c}},setTargetType(t,e){const n=this,{config:r,state:{withoutFadeIn:i}}=n;n.mapToTargetIds(t).forEach(s=>{i[s]=e===r.data_types[s],r.data_types[s]=e}),t||(r.data_type=e)},updateTypesElements(){const t=this,{state:{current:e}}=t;Object.keys(qt).forEach(n=>{const r=qt[n],i=t.hasType(r,null,!0),s=e.types.indexOf(r);s===-1&&i?e.types.push(r):s>-1&&!i&&e.types.splice(s,1)}),t.setChartElements()},hasType(t,e,n=!1){var r;const i=this,{config:s,state:{current:o}}=i,l=s.data_types,c=e||i.data.targets;return!n&&((r=o.types)==null?void 0:r.indexOf(t))>-1?!0:c!=null&&c.length?c.some(u=>{const f=l[u.id];return f===t||!f&&t==="line"}):Object.keys(l).length?Object.values(l).some(u=>u===t):s.data_type===t},hasTypeOf(t,e,n=[]){return t in en?!en[t].filter(r=>n.indexOf(r)===-1).every(r=>!this.hasType(r,e)):!1},isTypeOf(t,e){const n=je(t)?t:t.id,r=this.config&&this.getTargetType(n);return qe(e)?e.indexOf(r)>=0:r===e},hasPointType(){const t=this;return t.hasTypeOf("Line")||t.hasType("bubble")||t.hasType("scatter")},hasArcType(t,e){return this.hasTypeOf("Arc",t,e)},hasMultiArcGauge(){return this.hasType("gauge")&&this.config.gauge_type==="multi"},isLineType(t){const e=je(t)?t:t.id;return!this.config.data_types[e]||this.isTypeOf(e,en.Line)},isStepType(t){return this.isTypeOf(t,en.Step)},isSplineType(t){return this.isTypeOf(t,en.Spline)},isAreaType(t){return this.isTypeOf(t,en.Area)},isAreaRangeType(t){return this.isTypeOf(t,en.AreaRange)},isBarType(t){return this.isTypeOf(t,"bar")},isBubbleType(t){return this.isTypeOf(t,"bubble")},isCandlestickType(t){return this.isTypeOf(t,"candlestick")},isScatterType(t){return this.isTypeOf(t,"scatter")},isTreemapType(t){return this.isTypeOf(t,"treemap")},isPieType(t){return this.isTypeOf(t,"pie")},isFunnelType(t){return this.isTypeOf(t,"funnel")},isGaugeType(t){return this.isTypeOf(t,"gauge")},isDonutType(t){return this.isTypeOf(t,"donut")},isPolarType(t){return this.isTypeOf(t,"polar")},isRadarType(t){return this.isTypeOf(t,"radar")},isArcType(t){return this.isPieType(t)||this.isDonutType(t)||this.isGaugeType(t)||this.isPolarType(t)||this.isRadarType(t)},isCirclePoint(t){const{config:e}=this,n=e.point_pattern;return(t==null?void 0:t.tagName)==="circle"||e.point_type==="circle"&&(!n||qe(n)&&n.length===0)},lineData(t){return this.isLineType(t)?[t]:[]},arcData(t){return this.isArcType(t.data)?[t]:[]},labelishData(t){return this.isBarType(t)||this.isLineType(t)||this.isScatterType(t)||this.isBubbleType(t)||this.isCandlestickType(t)||this.isFunnelType(t)||this.isRadarType(t)||this.isTreemapType(t)?t.values.filter(e=>ae(e.value)||!!e.value):[]},barLineBubbleData(t){return this.isBarType(t)||this.isLineType(t)||this.isBubbleType(t)?t.values:[]},isInterpolationType(t){return $A.has(t)}};function Uo(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 ko(t){this._context=t}ko.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:Uo(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:Uo(this,t,e);break}this._x0=this._x1,this._x1=t,this._y0=this._y1,this._y1=e}};function zA(t){return new ko(t)}function va(){}function Ov(t){this._context=t}Ov.prototype={areaStart:va,areaEnd:va,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:Uo(this,t,e);break}this._x0=this._x1,this._x1=t,this._y0=this._y1,this._y1=e}};function UA(t){return new Ov(t)}function Pv(t){this._context=t}Pv.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:Uo(this,t,e);break}this._x0=this._x1,this._x1=t,this._y0=this._y1,this._y1=e}};function kA(t){return new Pv(t)}function Mv(t,e){this._basis=new ko(t),this._beta=e}Mv.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],s=t[n]-r,o=e[n]-i,l=-1,c;++l<=n;)c=l/n,this._basis.point(this._beta*t[l]+(1-this._beta)*(r+c*s),this._beta*e[l]+(1-this._beta)*(i+c*o));this._x=this._y=null,this._basis.lineEnd()},point:function(t,e){this._x.push(+t),this._y.push(+e)}};var GA=(function t(e){function n(r){return e===1?new ko(r):new Mv(r,e)}return n.beta=function(r){return t(+r)},n})(.85);function Go(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 _c(t,e){this._context=t,this._k=(1-e)/6}_c.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:Go(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:Go(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}};var XA=(function t(e){function n(r){return new _c(r,e)}return n.tension=function(r){return t(+r)},n})(0);function qc(t,e){this._context=t,this._k=(1-e)/6}qc.prototype={areaStart:va,areaEnd:va,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:Go(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}};var WA=(function t(e){function n(r){return new qc(r,e)}return n.tension=function(r){return t(+r)},n})(0);function tu(t,e){this._context=t,this._k=(1-e)/6}tu.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:Go(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}};var VA=(function t(e){function n(r){return new tu(r,e)}return n.tension=function(r){return t(+r)},n})(0);const Lv=Math.abs,Un=Math.atan2,Ua=Math.cos,jA=Math.max,eu=Math.min,Fr=Math.sin,gi=Math.sqrt,kn=1e-12,gs=Math.PI,Xo=gs/2,Wo=2*gs;function HA(t){return t>1?0:t<-1?gs:Math.acos(t)}function Dv(t){return t>=1?Xo:t<=-1?-Xo:Math.asin(t)}function nu(t,e,n){var r=t._x1,i=t._y1,s=t._x2,o=t._y2;if(t._l01_a>kn){var l=2*t._l01_2a+3*t._l01_a*t._l12_a+t._l12_2a,c=3*t._l01_a*(t._l01_a+t._l12_a);r=(r*l-t._x0*t._l12_2a+t._x2*t._l01_2a)/c,i=(i*l-t._y0*t._l12_2a+t._y2*t._l01_2a)/c}if(t._l23_a>kn){var u=2*t._l23_2a+3*t._l23_a*t._l12_a+t._l12_2a,f=3*t._l23_a*(t._l23_a+t._l12_a);s=(s*u+t._x1*t._l23_2a-e*t._l12_2a)/f,o=(o*u+t._y1*t._l23_2a-n*t._l12_2a)/f}t._context.bezierCurveTo(r,i,s,o,t._x2,t._y2)}function Fv(t,e){this._context=t,this._alpha=e}Fv.prototype={areaStart:function(){this._line=0},areaEnd:function(){this._line=NaN},lineStart:function(){this._x0=this._x1=this._x2=this._y0=this._y1=this._y2=NaN,this._l01_a=this._l12_a=this._l23_a=this._l01_2a=this._l12_2a=this._l23_2a=this._point=0},lineEnd:function(){switch(this._point){case 2:this._context.lineTo(this._x2,this._y2);break;case 3:this.point(this._x2,this._y2);break}(this._line||this._line!==0&&this._point===1)&&this._context.closePath(),this._line=1-this._line},point:function(t,e){if(t=+t,e=+e,this._point){var n=this._x2-t,r=this._y2-e;this._l23_a=Math.sqrt(this._l23_2a=Math.pow(n*n+r*r,this._alpha))}switch(this._point){case 0:this._point=1,this._line?this._context.lineTo(t,e):this._context.moveTo(t,e);break;case 1:this._point=2;break;case 2:this._point=3;default:nu(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}};var YA=(function t(e){function n(r){return e?new Fv(r,e):new _c(r,0)}return n.alpha=function(r){return t(+r)},n})(.5);function Nv(t,e){this._context=t,this._alpha=e}Nv.prototype={areaStart:va,areaEnd:va,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:nu(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}};var KA=(function t(e){function n(r){return e?new Nv(r,e):new qc(r,0)}return n.alpha=function(r){return t(+r)},n})(.5);function $v(t,e){this._context=t,this._alpha=e}$v.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:nu(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}};var ZA=(function t(e){function n(r){return e?new $v(r,e):new tu(r,0)}return n.alpha=function(r){return t(+r)},n})(.5);function Bv(t){return t<0?-1:1}function zv(t,e,n){var r=t._x1-t._x0,i=e-t._x1,s=(t._y1-t._y0)/(r||i<0&&-0),o=(n-t._y1)/(i||r<0&&-0),l=(s*i+o*r)/(r+i);return(Bv(s)+Bv(o))*Math.min(Math.abs(s),Math.abs(o),.5*Math.abs(l))||0}function Uv(t,e){var n=t._x1-t._x0;return n?(3*(t._y1-t._y0)/n-e)/2:e}function ru(t,e,n){var r=t._x0,i=t._y0,s=t._x1,o=t._y1,l=(s-r)/3;t._context.bezierCurveTo(r+l,i+l*e,s-l,o-l*n,s,o)}function Vo(t){this._context=t}Vo.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:ru(this,this._t0,Uv(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,ru(this,Uv(this,n=zv(this,t,e)),n);break;default:ru(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 kv(t){this._context=new Gv(t)}(kv.prototype=Object.create(Vo.prototype)).point=function(t,e){Vo.prototype.point.call(this,e,t)};function Gv(t){this._context=t}Gv.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,s){this._context.bezierCurveTo(e,t,r,n,s,i)}};function JA(t){return new Vo(t)}function QA(t){return new kv(t)}function Xv(t){this._context=t}Xv.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=Wv(t),i=Wv(e),s=0,o=1;o<n;++s,++o)this._context.bezierCurveTo(r[0][s],i[0][s],r[1][s],i[1][s],t[o],e[o]);(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 Wv(t){var e,n=t.length-1,r,i=new Array(n),s=new Array(n),o=new Array(n);for(i[0]=0,s[0]=2,o[0]=t[0]+2*t[1],e=1;e<n-1;++e)i[e]=1,s[e]=4,o[e]=4*t[e]+2*t[e+1];for(i[n-1]=2,s[n-1]=7,o[n-1]=8*t[n-1]+t[n],e=1;e<n;++e)r=i[e]/s[e-1],s[e]-=r,o[e]-=r*o[e-1];for(i[n-1]=o[n-1]/s[n-1],e=n-2;e>=0;--e)i[e]=(o[e]-i[e+1])/s[e];for(s[n-1]=(t[n]+i[n-1])/2,e=0;e<n-1;++e)s[e]=2*t[e+1]-i[e+1];return[i,s]}function _A(t){return new Xv(t)}function Vv(t){this._context=t}Vv.prototype={areaStart:va,areaEnd:va,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 qA(t){return new Vv(t)}function jo(t,e){this._context=t,this._t=e}jo.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 tE(t){return new jo(t,.5)}function eE(t){return new jo(t,0)}function nE(t){return new jo(t,1)}const rE={basis:zA,"basis-closed":UA,"basis-open":kA,bundle:GA,cardinal:XA,"cardinal-closed":WA,"cardinal-open":VA,"catmull-rom":YA,"catmull-rom-closed":KA,"catmull-rom-open":ZA,"monotone-x":JA,"monotone-y":QA,natural:_A,"linear-closed":qA,linear:ho,step:tE,"step-after":nE,"step-before":eE};function au(t,e){var n,r;return t.isLineType(e)||((n=t.isScatterType)==null?void 0:n.call(t,e))||((r=t.isBubbleType)==null?void 0:r.call(t,e))}function jv(t){return e=>au(t,e)}function iu(t,e,n){var r,i,s;const o=n?Ho(t,e,n):void 0;return ae(o)?o:(r=t.isCandlestickType)!=null&&r.call(t,e)?(s=(i=t.getCandlestickData)==null?void 0:i.call(t,e))==null?void 0:s.close:t.getBaseValue(e)}function Ho(t,e,n){var r,i,s;if(!n||(r=t.isCandlestickType)!=null&&r.call(t,e)||!((i=t.isSubchartSourceTypeOf)!=null&&i.call(t,e,qt.CANDLESTICK)))return;const o=(s=t.getCandlestickData)==null?void 0:s.call(t,e);if(o)return t.isBarType(e)?ae(o.open)&&ae(o.close)?o._isUp?o.close:o.open:void 0:ae(o.close)?o.close:void 0}function Hv(t,e,n){const r=Ho(t,e,n);return ae(r)&&t.isBarType(e)}function aE(t,e,n){var r;if(!Hv(t,e,n))return null;const i=(r=t.getCandlestickData)==null?void 0:r.call(t,e);if(i!=null&&i._isUp)return t.color(e);const s=t.config.candlestick_color_down;return(s&&typeof s=="object"?s[e.id]:s)||t.color(e)}function iE(t){var e,n;const r=this;let i;if(au(r,t)){const s=jv(r);i=r.generateGetLinePoints(r.getShapeIndices(s),!1,s)}else r.isBarType(t)?i=r.generateGetBarPoints(r.getShapeIndices(r.isBarType)):(e=r.isCandlestickType)!=null&&e.call(r,t)&&(i=(n=r.generateGetCandlestickPoints)==null?void 0:n.call(r,r.getShapeIndices(r.isCandlestickType)));return i}function Yv(t,e,n){return this.config[e]?this.getGradienColortUrl(t.id):n(t)}function Kv(t){const{$el:e}=this,{elKey:n,className:r,cssRules:i,position:s}=t,o=e.main.select(`.${Re.chart}`);e[n]=s==="first"?o.insert("g",":first-child"):o.append("g"),e[n].attr("class",r),i!=null&&i.length&&e[n].call(this.setCssRule(!1,`.${r}`,i))}function su(t,e){const n=this,{$el:r}=n,{type:i,elKey:s,containerClass:o,itemClass:l,initFn:c,withFocus:u=!0,withStyles:f=!0}=e;r[s]||c.call(n);const d=n.getChartClass(i),h=u?n.classFocus.bind(n):()=>"",S=r.main.select(`.${o}`).selectAll(`.${l}`).data(n.filterNullish(t)).attr("class",E=>d(E)+h(E)).enter().append("g").attr("class",d);return f&&S.style("opacity","0").style("pointer-events",n.getStylePropValue("none")),S}var sE={getDrawShape(){const t=this,e=t.config.axis_rotated,{hasRadar:n,hasTreemap:r}=t.state,i={type:{},indices:{},pos:{}};if(!r&&["bar","candlestick","line","area"].forEach(s=>{const o=Ln(s);if(t.hasType(s)||t.hasTypeOf(o)||s==="line"&&(t.hasType("bubble")||t.hasType("scatter"))){const l=t.getShapeIndices(t[`is${o}Type`]),c=t[`generateDraw${o}`];i.indices[s]=l,i.type[s]=c?c.bind(t)(l,!1):void 0}}),!t.hasArcType()||n||r){let s,o,l,c;r||(s=n?t.radarCircleX:e?t.circleY:t.circleX,o=n?t.radarCircleY:e?t.circleX:t.circleY),r&&t.state.isCanvasMode?l=c=function(){}:(l=t.generateXYForText(i.indices,!0),c=t.generateXYForText(i.indices,!1)),i.pos={xForText:l,yForText:c,cx:(s||function(){}).bind(t),cy:(o||function(){}).bind(t)}}return i},getShapeIndices(t){const e=this,{config:n}=e,r=n.data_xs,i=vn(r),s={};let o=i?{}:0;return i&&zl(Object.keys(r).map(l=>r[l])).forEach(l=>{o[l]=0,s[l]={}}),e.filterTargetsToShow(e.data.targets.filter(t,e)).forEach(l=>{var c;const u=l.id in r?r[l.id]:"",f=u?s[u]:s;for(let d=0,h;h=n.data_groups[d];d++)if(!(h.indexOf(l.id)<0))for(let m=0,S;S=h[m];m++){if(S in f){f[l.id]=f[S];break}l.id!==S&&u&&(f[S]=(c=f[l.id])!=null?c:o[u])}mn(f[l.id])&&(f[l.id]=u?o[u]++:o++,f.__max__=(u?o[u]:o)-1)}),s},getIndices(t,e,n){const r=this,{data_xs:i,bar_indices_removeNull:s}=r.config,{id:o,index:l}=e;if(r.isBarType(o)&&s){const c={};return r.getAllValuesOnIndex(l,!0).forEach((u,f)=>{c[u.id]=f,c.__max__=f}),c}return vn(i)?t[i[o]]:t},getIndicesMax(t){if(!vn(this.config.data_xs))return t.__max__;let e=0;for(const n in t)e+=t[n].__max__||0;return e},getShapeX(t,e,n){const r=this,{config:i,scale:s}=r,o=n?s.subX:s.zoom||s.x,l=i.bar_overlap,c=i.bar_padding,u=(h,m)=>h+m,f=Kn(t)&&(t._$total.length?t._$total.reduce(u)/2:0),d=[];if(f&&Kn(t)&&t._$total.length){let h=0;for(const m of t._$total)h+=m,d.push(h)}return h=>{var m;const S=r.getIndices(e,h,"getShapeX"),E=h.id in S?S[h.id]:0,C=(S.__max__||0)+1;let w=0;if(vn(h.x)){const $=o(h.x,!0);if(f){const z=t[h.id]||t._$width;w=l?$-z/2:$-z+((m=d[E])!=null?m:t._$total.slice(0,E+1).reduce(u))-f}else w=$-(ae(t)?t:t._$width)*(C/2-(l?1:E))}return t&&w&&C>1&&c&&(E&&(w+=c*E),C>2?w-=(C-1)*c/2:C===2&&(w-=c/2)),w}},getShapeY(t){const e=this,n=e.isStackNormalized();return r=>{let{value:i}=r;const s=t?Ho(e,r,t):void 0;return ae(r)?i=r:ae(s)?i=s:e.isAreaRangeType(r)?i=e.getBaseValue(r,"mid"):n?i=e.getRatio("index",r,!0):e.isBubbleZType(r)?i=e.getBubbleZData(r.value,"y"):e.isBarRangeType(r)&&(i=i[1]),e.getYScaleById(r.id,t)(i)}},getShapeYMin(t,e=!1){const n=this,r=n.axis.getId(t),i=n.getYScaleById(t,e),[s]=i.domain(),o=n.config[`axis_${r}_inverted`];return!n.isGrouped(t)&&!o&&s>0?s:0},getShapeOffsetData(t,e){const n=this,r=n.orderTargets(n.filterTargetsToShow(n.data.targets.filter(t,n))),i=n.state.dataGeneration,s=r.map(h=>h.id).join("_"),o=`${Oe.shapeOffset}_${e?"sub":"main"}_${s}`,l=n.cache.get(o);if((l==null?void 0:l.generation)===i)return l;const c=n.isStackNormalized(),u=r.map(h=>{let m=h.values;const S={};n.isStepType(h)&&(m=n.convertValuesToStep(m));const E=m.reduce((C,w)=>{const $=Number(w.x),z=iu(n,w,e);return C[$]=w,S[$]=c?n.getRatio("index",w,!0):z,C},{});return{id:h.id,rowValues:m,rowValueMapByXValue:E,values:S}}),f=r.reduce((h,{id:m},S)=>(h[m]=S,h),{}),d={generation:i,indexMapByTargetId:f,shapeOffsetTargets:u};return n.cache.add(o,d),d},getShapeOffset(t,e,n){const r=this,{shapeOffsetTargets:i,indexMapByTargetId:s}=r.getShapeOffsetData(t,n),o=r.config.data_groupsZeroAs;let l=null;if(!r.config.bar_indices_removeNull){l=new Map;for(const c of i){const u=r.getIndices(e,{id:c.id,index:0});l.set(c.id,i.filter(f=>f.id!==c.id&&u[f.id]===u[c.id]))}}return(c,u)=>{var f;const{id:d,value:h,x:m}=c,S=iu(r,c,n),E=r.getIndices(e,c),C=r.getYScaleById(d,n);if(r.isBarRangeType(c))return C(h[0]);const w=Number(m),$=C(o==="zero"?0:r.getShapeYMin(d,n));let z=$;const B=(f=l==null?void 0:l.get(d))!=null?f:i.filter(W=>W.id!==d&&E[W.id]===E[d]);for(const W of B){const{id:H,rowValueMapByXValue:_,rowValues:q,values:st}=W;if(s[H]<s[d]){const it=st[w];let ot=q[u];(!ot||Number(ot.x)!==w)&&(ot=_[w]);const ct=ot&&iu(r,ot,n);ae(ct)&&ae(S)&&ct*S>=0&&ae(it)&&(S!==0||o==="positive"&&it>0||o==="negative"&&it<0)&&(z+=C(it)-$)}}return z}},generateGetLinePoints(t,e,n){const r=this,{config:i}=r,s=r.getShapeX(0,t,e),o=r.getShapeY(e),l=r.getShapeOffset(n||r.isLineType,t,e),c=r.getYScaleById.bind(r),u=new Map;return(f,d)=>{let h=u.get(f.id);h===void 0&&(h=c.call(r,f.id,e)(r.getShapeYMin(f.id,e)),u.set(f.id,h));const m=l(f,d)||h,S=s(f);let E=o(f);i.axis_rotated&&(f.value>0&&E<h||f.value<0&&h<E)&&(E=h);const C=[S,E-(h-m)];return[C,C,C,C]}},generateGetAreaPoints(t,e){const n=this,{config:r}=n,i=n.getShapeX(0,t,e),s=n.getShapeY(!!e),o=n.getShapeOffset(n.isAreaType,t,e),l=n.getYScaleById.bind(n),c=new Map;return function(u,f){let d=c.get(u.id);d===void 0&&(d=l.call(n,u.id,e)(n.getShapeYMin(u.id,e)),c.set(u.id,d));const h=o(u,f)||d,m=i(u),S=u.value;let E=s(u);return r.axis_rotated&&(S>0&&E<d||S<0&&d<E)&&(E=d),[[m,h],[m,E-(d-h)],[m,E-(d-h)],[m,h]]}},generateGetBarPoints(t,e){const n=this,{config:r}=n,i=e?n.axis.subX:n.axis.x,s=n.getIndicesMax(t)+1,o=n.getBarW("bar",i,s),l=n.getShapeX(o,t,!!e),c=n.getShapeY(!!e),u=n.getShapeOffset(n.isBarType,t,!!e),f=n.getYScaleById.bind(n),d=new Map;return(h,m)=>{const{id:S}=h;let E=d.get(S);E||(E={y0:f.call(n,S,e)(n.getShapeYMin(S,e)),isInverted:r[`axis_${n.axis.getId(S)}_inverted`]},d.set(S,E));const{y0:C,isInverted:w}=E,$=u(h,m)||C,z=ae(o)?o:o[h.id]||o._$width,B=h.value,W=l(h);let H=c(h);r.axis_rotated&&!w&&(B>0&&H<C||B<0&&C<H)&&(H=C),n.isBarRangeType(h)||(H-=C-$);const _=W+z;return[[W,$],[W,H],[_,H],[_,$]]}},circleY(t,e){const n=this,r=t.id;let i;return n.isGrouped(r)&&(i=iE.bind(n)(t)),i?i(t,e)[0][1]:n.getYScaleById(r)(n.getBaseValue(t))},circleX(t){return this.xx(t)},updateCircleY(t=!1){const e=this,n=jv(e),r=e.generateGetLinePoints(e.getShapeIndices(n),t,n),i=e.getShapeY(t);return(s,o)=>{const l=s.id;return e.isGrouped(l)&&au(e,s)?r(s,o)[0][1]:i(s)}},getSubchartCandlestickShapeValue(t,e){return Ho(this,t,e)},isSubchartCandlestickBarValue(t,e){return Hv(this,t,e)},getSubchartCandlestickBarColor(t,e){return aE(this,t,e)},pointR(t){const e=this,{config:n}=e,r=n.point_r;let i=r;return e.isBubbleType(t)?i=e.getBubbleR(t):ie(r)&&(i=r.bind(e.api)(t)),t.r=i,i},pointExpandedR(t){const e=this,{config:n}=e,r=e.isBubbleType(t)?1.15:1.75;return n.point_focus_expand_enabled?n.point_focus_expand_r||e.pointR(t)*r:e.pointR(t)},pointSelectR(t){const e=this,n=e.config.point_select_r;return ie(n)?n(t):n||e.pointR(t)*4},isPointFocusOnly(){const t=this;return t.config.point_focus_only&&!t.hasType("bubble")&&!t.hasType("scatter")&&!t.hasArcType(null,["radar"])},getPointSensitivity(t){const e=this;let n=e.config.point_sensitivity;if(t)ie(n)?n=n.call(e.api,t):n==="radius"&&(n=t.r);else return n;return n},getBarW(t,e,n){var r,i,s,o,l;const c=this,{config:u,org:f,scale:d,state:h}=c,m=c.getMaxDataCount(),S=t==="bar"&&((r=u.data_groups)==null?void 0:r.length),E=`${t}_width`,{k:C}=(s=(i=c.getZoomTransform)==null?void 0:i.call(c))!=null?s:{k:1},w=[(o=u.axis_x_min)!=null?o:f.xDomain[0],(l=u.axis_x_max)!=null?l:f.xDomain[1]].map(W=>c.axis.isTimeSeries()?Wn.call(c,W):Number(W));let $=e.tickInterval(m);if(d.zoom&&!c.axis.isCategorized()&&C>1){const W=w.every((H,_)=>H===f.xDomain[_]);$=f.xDomain.map((H,_)=>{const q=W?H:H-Math.abs(w[_]);return d.zoom(q)}).reduce((H,_)=>Math.abs(H)+_)/m}const z=W=>{const H=W?u[E][W]:u[E],_=W?H.ratio:u[`${E}_ratio`],q=W?H.max:u[`${E}_max`],st=ae(H)?H:ie(H)?H.call(c,h.width,n,m):n?$*_/n:0;return q&&st>q?q:st};let B=z();return!S&&Kn(u[E])&&(B={_$width:B,_$total:[]},c.getTargetsToShow().forEach(W=>{u[E][W.id]&&(B[W.id]=z(W.id),B._$total.push(B[W.id]||B._$width))})),B},getShapeByIndex(t,e,n){const r=this,{$el:i}=r,s=Ge(e)?`-${e}`:"";let o=i[t];return o&&!o.empty()?o=o.filter(l=>n?l.id===n:!0).filter(l=>Ge(e)?l.index===e:!0):o=(n?i.main.selectAll(`.${Re[`${t}s`]}${r.getTargetSelectorSuffix(n)}`):i.main).selectAll(`.${Re[t]}${s}`),o},isWithinShape(t,e){var n;const r=this,i=Yt(t);let s;return r.isTargetToShow(e.id)?(n=r.hasValidPointType)!=null&&n.call(r,t.nodeName)?s=r.isStepType(e)?r.isWithinStep(t,r.getYScaleById(e.id)(r.getBaseValue(e))):r.isWithinCircle(t,r.isBubbleType(e)?r.pointSelectR(e)*1.5:0):t.nodeName==="path"&&(s=i.classed(Re.bar)?r.isWithinBar(t):!0):s=!1,s},getInterpolate(t){const n=this.getInterpolateType(t);return rE[n]},getCurve(t){const e=this;return e.config.axis_rotated&&e.isStepType(t)?r=>{const i=e.getInterpolate(t)(r);return i.orgPoint=i.point,i.pointRotated=function(s,o){this._point===1&&(this._point=2);const l=this._y*(1-this._t)+o*this._t;this._context.lineTo(this._x,l),this._context.lineTo(s,l),this._x=s,this._y=o},i.point=function(s,o){this._point===0?this.orgPoint(s,o):this.pointRotated(s,o)},i}:e.getInterpolate(t)},getInterpolateType(t){const e=this,{config:n}=e,r=n.spline_interpolation_type,i=e.isInterpolationType(r)?r:"cardinal";return e.isSplineType(t)?i:e.isStepType(t)?n.line_step_type:"linear"},isWithinBar(t){const e=Jn(this.state.event,t),n=Rh(t),[r,i,s]=n,o=Math.min(r.x,i.x),l=Math.min(r.y,i.y),c=this.config.bar_sensitivity,u=Math.abs(s.x-i.x),f=Math.abs(r.y-i.y),d=o-c,h=o+u+c,m=l+f+c,S=l-c;return d<e[0]&&e[0]<h&&S<e[1]&&e[1]<m}},oE=Object.defineProperty,lE=(t,e,n)=>e in t?oE(t,e,{enumerable:!0,configurable:!0,writable:!0,value:n}):t[e]=n,Gn=(t,e,n)=>lE(t,typeof e!="symbol"?e+"":e,n);function Zv(){var t,e,n;return(n=(e=(t=se.performance)==null?void 0:t.now)==null?void 0:e.call(t))!=null?n:Date.now()}function cE(t){return t.hasArcType()?"arc charts":t.hasType("funnel")?"funnel chart":null}function uE(t){var e,n;const{config:r}=t,i=r.render_mode==="canvas"?cE(t):null;i&&((n=(e=se.console)==null?void 0:e.warn)==null||n.call(e,`[billboard.js] render.mode='canvas' is ignored for ${i}; falling back to SVG.`),r.render_mode="svg")}class br{constructor(e){Gn(this,"api"),Gn(this,"config"),Gn(this,"cache"),Gn(this,"$el"),Gn(this,"state"),Gn(this,"charts"),Gn(this,"data",{xs:{},targets:[]}),Gn(this,"axis"),Gn(this,"scale",{x:null,y:null,y2:null,subX:null,subY:null,subY2:null,zoom:null}),Gn(this,"org",{xScale:null,xDomain:null}),Gn(this,"color"),Gn(this,"patterns"),Gn(this,"levelColor"),Gn(this,"point"),Gn(this,"brush"),Gn(this,"format",{extraLineClasses:null,xAxisTick:null,dataTime:null,defaultAxisTime:null,axisTime:null});const n=this;n.api=e,n.config=new $a,n.cache=new B1;const r=new D1;n.$el=r.getStore("element"),n.state=r.getStore("state"),n.$T=n.$T.bind(n)}$T(e,n,r){const{config:i,state:s}=this,o=i.transition_duration,l=i.subchart_show;let c=e;return c&&("tagName"in c&&(c=Yt(c)),c=(n!==!1&&o||n)&&(!s.zooming||s.dragging)&&!s.resizing&&s.rendered&&!l?c.transition(r).duration(o):c),c}beforeInit(){const e=this;e.callPluginHook("$beforeInit"),Ne(e.config.onbeforeinit,e.api)}afterInit(){const e=this;e.callPluginHook("$afterInit"),Ne(e.config.onafterinit,e.api)}init(){const e=this,{config:n,state:r,$el:i}=e,{boost_useCssRule:s,bindto:o}=n;z1(e),uE(e);const l=e.hasArcType();if(r.hasRadar=!r.hasAxis&&e.hasType("radar"),r.hasFunnel=!r.hasAxis&&e.hasType("funnel"),r.hasTreemap=!r.hasAxis&&e.hasType("treemap"),r.hasAxis=!l&&!r.hasFunnel&&!r.hasTreemap,r.datetimeId=`bb-${+new Date*Cr()}`,s){const u=Ye.createElement("style");u.type="text/css",Ye.head.appendChild(u),r.style={rootSelector:`.${r.datetimeId}`,sheet:u.sheet},i.style=u}const c={element:o,classname:"bb"};He(o)&&(c.element=o.element||"#chart",c.classname=o.classname||c.classname),i.chart=ie(c.element.node)?o.element:Yt(c.element||[]),i.chart.empty()&&(i.chart=Yt(Ye.body.appendChild(Ye.createElement("div")))),i.chart.html("").classed(c.classname,!0).classed(r.datetimeId,s).style("position","relative"),e.initParams(),e.initToRender()}initToRender(e){const n=this,{config:r,state:i,$el:{chart:s}}=n,o=()=>j1(s,{display:"none",visibility:"hidden"}),l=r.render.lazy===!1?!1:r.render.lazy||o(),c=se.MutationObserver;l&&c&&r.render.observe!==!1&&!e&&new c((u,f)=>{o()||(f.disconnect(),!i.rendered&&n.initToRender(!0))}).observe(s.node(),{attributes:!0,attributeFilter:["class","style"]}),(!l||e)&&n.convertData(r,u=>{n.initWithData(u),n.afterInit()})}initParams(){var e,n;const r=this,{config:i,format:s,state:o}=r;if(i.render_mode==="canvas"&&((e=r.prepareCanvasConfig)==null||e.call(r)),r.color=r.generateColor(),r.levelColor=r.generateLevelColor(),i.padding===!1&&(i.axis_x_show=!1,i.axis_y_show=!1,i.axis_y2_show=!1,i.subchart_show=!1),i.render_mode!=="canvas"&&(r.hasPointType()||(n=r.hasLegendDefsPoint)!=null&&n.call(r))&&(r.point=r.generatePoint()),o.hasAxis){r.initClip(),s.extraLineClasses=r.generateExtraLineClass(),s.dataTime=i.data_xLocaltime?Ff:Nf,s.axisTime=i.axis_x_localtime?Dl:Fl;const f=i.zoom_enabled&&i.zoom_type==="drag";s.defaultAxisTime=d=>{const{x:h,zoom:m}=r.scale,S=f?m:m&&h.orgDomain().toString()!==m.domain().toString(),E=d.getMilliseconds()&&".%L"||d.getSeconds()&&".:%S"||d.getMinutes()&&"%I:%M"||d.getHours()&&"%I %p"||d.getDate()!==1&&"%b %d"||S&&d.getDate()===1&&"%b'%y"||d.getMonth()&&"%-m/%-d"||"%Y";return s.axisTime(E)(d)}}const{legend_position:l,legend_inset_anchor:c,axis_rotated:u}=i;o.isLegendRight=l==="right",o.isLegendInset=l==="inset",o.isLegendTop=c==="top-left"||c==="top-right",o.isLegendLeft=c==="top-left"||c==="bottom-left",o.rotatedPadding.top=r.getResettedPadding(o.rotatedPadding.top),o.rotatedPadding.right=u&&!i.axis_x_show?0:30,o.inputType=H1(i.interaction_inputType_mouse,i.interaction_inputType_touch)}initWithData(e){var n,r,i,s,o,l;const c=this,{config:u,scale:f,state:d,$el:h,org:m}=c,{hasAxis:S,hasFunnel:E,hasTreemap:C}=d,w=u.interaction_enabled,$=c.hasType("polar"),z=u.data_labels_backgroundColors;if(S&&(c.axis=c.getAxisInstance(),u.zoom_enabled&&c.initZoom()),c.data.xs={},c.data.targets=c.convertDataToTargets(e),u.data_filter&&(c.data.targets=c.data.targets.filter(u.data_filter.bind(c.api))),u.data_hide&&c.addHiddenTargetIds(u.data_hide===!0?c.mapToIds(c.data.targets):u.data_hide),u.legend_hide&&c.addHiddenLegendIds(u.legend_hide===!0?c.mapToIds(c.data.targets):u.legend_hide),c.updateSizes(),c.updateScales(!0),S){const{x:H,y:_,y2:q,subX:st,subY:it,subY2:ot}=f;H&&(H.domain(ti(c.getXDomain(c.data.targets),!u.axis_x_inverted)),st.domain(H.domain()),m.xDomain=H.domain()),_&&(_.domain(c.getYDomain(c.data.targets,"y")),it.domain(_.domain())),q&&(q.domain(c.getYDomain(c.data.targets,"y2")),ot&&ot.domain(q.domain()))}if(u.render_mode==="canvas"){if(!c.initCanvas)throw Error("[billboard.js] Please import and call canvas() to use render.mode='canvas'.");if(c.bindResize(),c.initCanvas(),u.tooltip_show&&c.initTooltip(),c.callPluginHook("$init"),Ne(u.oninit,c.api),c.redraw({withTransition:!1,withTransform:!0,withUpdateXDomain:!0,withUpdateOrgXDomain:!0,withTransitionForAxis:!1,initializing:!0}),u.data_onmin||u.data_onmax){const H=c.getMinMaxData();Ne(u.data_onmin,c.api,H.min),Ne(u.data_onmax,c.api,H.max)}d.rendered=!0;return}if(h.svg=h.chart.append("svg").style("overflow","hidden").style("display","block"),w&&d.inputType){const H=d.inputType==="touch",{onclick:_,onover:q,onout:st}=u,it=(n=u.interaction_inputType_touch)==null?void 0:n.preventDefault,ot=Ra(it)&&it||!1,ct=!isNaN(it)&&it||null,gt=H?{passive:!ot&&ct===null}:void 0;h.svg.on("click",(_==null?void 0:_.bind(c.api))||null).on(H?"touchstart":"mouseenter",(q==null?void 0:q.bind(c.api))||null,gt).on(H?"touchend":"mouseleave",(st==null?void 0:st.bind(c.api))||null)}u.svg_classname&&h.svg.attr("class",u.svg_classname);const B=ie(u.color_tiles)&&c.patterns;(S||B||$||C||z||(r=c.hasLegendDefsPoint)!=null&&r.call(c))&&(h.defs=h.svg.append("defs"),S&&["id","idXAxis","idYAxis","idGrid"].forEach(H=>{c.appendClip(h.defs,d.clip[H])}),c.generateTextBGColorFilter(z),B&&c.patterns.forEach(H=>h.defs.append(()=>H.node))),c.updateSvgSize(),c.bindResize();const W=h.svg.append("g").classed(ze.main,!0).attr("transform",E||C?null:c.getTranslate("main"));if(h.main=W,u.subchart_show&&c.initSubchart(),u.tooltip_show&&c.initTooltip(),u.title_text&&c.initTitle(),!C&&u.legend_show&&c.initLegend(),u.data_empty_label_text&&W.append("text").attr("class",`${En.text} ${ze.empty}`).attr("text-anchor","middle").attr("dominant-baseline","middle"),S&&(u.regions.length&&((i=c.initRegion)==null||i.call(c)),!u.clipPath&&c.axis.init()),W.append("g").classed(ze.chart,!0).attr("clip-path",S?d.clip.path:null),c.callPluginHook("$init"),c.initChartElements(),S&&(w&&((s=c.initEventRect)==null||s.call(c)),(o=c.initGrid)==null||o.call(c),u.clipPath&&((l=c.axis)==null||l.init())),c.updateTargets(c.data.targets),c.updateDimension(),Ne(u.oninit,c.api),c.setBackground(),c.redraw({withTransition:!1,withTransform:!0,withUpdateXDomain:!0,withUpdateOrgXDomain:!0,withTransitionForAxis:!1,initializing:!0}),u.data_onmin||u.data_onmax){const H=c.getMinMaxData();Ne(u.data_onmin,c.api,H.min),Ne(u.data_onmax,c.api,H.max)}u.tooltip_show&&c.initShowTooltip(),d.rendered=!0}initChartElements(){const e=this,{hasAxis:n,hasRadar:r,hasTreemap:i}=e.state,s=[];if(n){const o=["bar","bubble","candlestick","line"];e.config.bar_front&&o.push(o.shift());for(const l of o){const c=Ln(l);(l==="line"&&e.hasTypeOf(c)||e.hasType(l))&&s.push(c)}}else if(i)s.push("Treemap");else if(e.hasType("funnel"))s.push("Funnel");else{const o=e.hasType("polar"),l=e.hasType("gauge");r||s.push("Arc","Pie"),l?s.push("Gauge"):r?s.push("Radar"):o&&s.push("Polar")}for(const o of s)e[`init${o}`]();vn(e.config.data_labels)&&!e.hasArcType(null,["radar"])&&e.initText()}setChartElements(){const e=this,{$el:{chart:n,svg:r,defs:i,main:s,tooltip:o,legend:l,title:c,canvas:u,eventOverlay:f,grid:d,needle:h,arcs:m,circle:S,bar:E,candlestick:C,line:w,area:$,text:z}}=e;e.api.$={chart:n,svg:r,canvas:u,eventOverlay:f,defs:i,main:s,tooltip:o,legend:l,title:c,grid:d,arc:m,circles:S,bar:{bars:E},candlestick:C,line:{lines:w,areas:$},needle:h,text:{texts:z}}}setBackground(){const e=this,{config:{background:n},state:r,$el:{svg:i}}=e;if(vn(n)){const s=i.select("g").insert(n.imgUrl?"image":"rect",":first-child");n.imgUrl?s.attr("href",n.imgUrl):n.color&&s.style("fill",n.color).attr("clip-path",r.clip.path),s.attr("class",n.class||null).attr("width","100%").attr("height","100%")}}updateTargets(e){var n,r;const i=this,{hasAxis:s,hasFunnel:o,hasRadar:l,hasTreemap:c}=i.state,u=d=>i[`updateTargetsFor${d}`](e.filter(i[`is${d}Type`].bind(i)));if(i.updateTargetsForText(e),s){const d=["bar","candlestick","line"];for(const h of d){const m=Ln(h);(h==="line"&&i.hasTypeOf(m)||i.hasType(h))&&u(m)}(n=i.updateTargetsForSubchart)==null||n.call(i,e)}else if(i.hasArcType(e)){let d="Arc";l?d="Radar":i.hasType("polar")&&(d="Polar"),u(d)}else o?u("Funnel"):c&&u("Treemap");const f=i.hasType("bubble")||i.hasType("scatter");f&&((r=i.updateTargetForCircle)==null||r.call(i)),i.filterTargetsToShowAtInit(f)}filterTargetsToShowAtInit(e=!1){const n=this,{$el:{svg:r},$T:i}=n;let s=`.${ze.target}`;e&&(s+=`, .${$n.chartCircles} > .${$n.circles}`),i(r.selectAll(s).filter(o=>n.isTargetToShow(o.id))).style("opacity",null)}getWithOption(e){const n={Dimension:!0,EventRect:!0,Legend:!1,Subchart:!0,Transform:!1,Transition:!0,TrimXDomain:!0,UpdateXAxis:"UpdateXDomain",UpdateXDomain:!1,UpdateOrgXDomain:!1,TransitionForExit:"Transition",TransitionForAxis:"Transition",Y:!0};for(const[r,i]of Object.entries(n)){const s=je(i)?n[i]:i;n[r]=ia(e,`with${r}`,s)}return n}initialOpacity(e){const n=this,{withoutFadeIn:r}=n.state;return n.getBaseValue(e)!==null&&r[e.id]?null:"0"}bindResize(){var e,n;const r=this,{$el:i,config:s,state:o}=r,{resize_auto:l,resize_live:c}=s,u=/^(true|parent)$/.test(l),f=[],d=()=>{var S;const E=o.current.width,C=o.current.height;return r.setContainerSize(),!o.resizePreview&&E===o.current.width&&C===o.current.height?!1:(o.resizing=!0,o.dirty.size=!0,s.legend_show&&(r.updateSizes(),o.isCanvasMode?(S=r.updateHtmlLegend)==null||S.call(r):r.updateLegend()),r.api.flush(!1),!0)},h=()=>{if(o.resizeLiveScale===null&&(o.resizeLiveScale=o.resizeRedrawTime>dt),o.resizeLiveScale){r.previewResize();return}const S=Zv();d()&&(o.resizeRedrawTime=Zv()-S,o.resizeLiveScale=o.resizeRedrawTime>dt)},m=Z1(s.resize_timer,u&&c?h:void 0);f.push(()=>Ne(s.onresize,r.api)),u&&f.push(d),f.push(()=>{Ne(s.onresized,r.api),o.resizing=!1,o.resizeLiveScale=null}),f.forEach(S=>m.add(S)),r.resizeFunction=m,l==="parent"&&se.ResizeObserver?(r.resizeFunction.resizeObserver=new se.ResizeObserver(r.resizeFunction.bind(r))).observe(i.chart.node().parentNode):(l==="parent"&&((n=(e=se.console)==null?void 0:e.warn)==null||n.call(e,"[billboard.js] resize.auto='parent' requires ResizeObserver; falling back to window resize.")),se.addEventListener("resize",r.resizeFunction))}callPluginHook(e,...n){this.config.plugins.forEach(r=>{e==="$beforeInit"&&(r.$$=this,this.api.plugins.push(r)),r[e](...n)})}}xn(br.prototype,[pb,xb,yb,Ob,Mb,Nb,uA,wb,fA,TA,bA,jy,sE,SA,AA,OA,MA,FA,NA,BA]);const ou=[xr,er,Vn,kl],Jv=10,fE=750,Qv=6,dE=2,hE=1e5,vE={"&":"&","<":"<",">":">",'"':""","'":"'"},Yo=new WeakMap;function _v(t){var e,n;(n=(e=se.console)==null?void 0:e.warn)==null||n.call(e,`[billboard.js] ${t}`)}function Ko(t,e){var n;const{config:r}=t,i=(n=r.data_names[e])!=null?n:e;return ie(r.legend_format)?r.legend_format(i,e!==i?e:void 0):i}function gE(t){return`${t}`.replace(/[&<>"']/g,e=>vE[e])}function pE(t,e){var n,r;const{config:i}=t,s=((n=t.mapToIds)==null?void 0:n.call(t,t.data.targets))||[],o=((r=t.getValidPointPattern)==null?void 0:r.call(t))||(Array.isArray(i.point_pattern)&&i.point_pattern.length?i.point_pattern:[i.point_type]),l=Math.max(0,s.indexOf(e));return o[l%o.length]||"circle"}function mE(t,e){const n=gE(t.color(e)),r=pE(t,e),i='viewBox="0 0 8 8" aria-hidden="true" focusable="false" style="display:block;width:100%;height:100%;overflow:visible;pointer-events:none"',s=`fill="${n}" stroke="${n}"`;return/^rect(angle)?$/i.test(r)?`<svg ${i}><rect x="1" y="1" width="6" height="6" ${s}></rect></svg>`:!r||/^circle$/i.test(r)?`<svg ${i}><circle cx="4" cy="4" r="3" ${s}></circle></svg>`:`<svg ${i}><g ${s}>${Gr(r)}</g></svg>`}function xE(t,e){const n=new Map;e.each(function(r){n.set(r,this)}),t.cache.add(Oe.legendItemMap,n)}function qv(t,e){const{config:n}=t;e.attr("class",function(r){const s=`${Yt(this).attr("class")||""} ${t.generateClass($e.legendItem,r)}`;return Array.from(new Set(s.trim().split(/\s+/).filter(Boolean))).join(" ")}).style("visibility",r=>t.isLegendToShow(r)?null:"hidden").classed($e.legendItemHidden,r=>!t.isTargetToShow(r)).classed(cr.legendItemInteractive,!!n.interaction_enabled),xE(t,e)}function yE(t,e){var n;const{legend:r}=t.$el,i=((n=t.mapToTargetIds)==null?void 0:n.call(t,[e]))||[e];r==null||r.selectAll(`.${$e.legendItem}`).classed(nn.legendItemFocused,s=>i.indexOf(s)>=0).style("opacity",function(s){return i.indexOf(s)>=0?null:t.opacityForUnfocusedLegend.call(t,Yt(this))})}function TE(t){const{legend:e}=t.$el;e==null||e.selectAll(`.${$e.legendItem}`).classed(nn.legendItemFocused,!1).style("opacity",null)}function bE(t,e){var n,r,i;const{state:s}=t,l=(((n=t.mapToTargetIds)==null?void 0:n.call(t,[e]))||[e]).filter(t.isTargetToShow,t),c=new Set(l),u=(((r=t.mapToTargetIds)==null?void 0:r.call(t))||[]).filter(f=>!c.has(f)&&t.isTargetToShow(f));s.focusedTargetIds=c,s.defocusedTargetIds=new Set(u),(i=t.renderCanvasFrame)==null||i.call(t,void 0,null,!1)}function tg(t){var e,n,r;const{state:i}=t,s=!!((e=i.focusedTargetIds)!=null&&e.size)||!!((n=i.defocusedTargetIds)!=null&&n.size);i.focusedTargetIds=new Set,i.defocusedTargetIds=new Set,s&&((r=t.renderCanvasFrame)==null||r.call(t,void 0,null,!1))}function eg(t){var e,n;return((e=t.changedTouches)==null?void 0:e[0])||((n=t.touches)==null?void 0:n[0])}function SE(t,e,n){const r=eg(n);t.state.canvasLegendTouch=r?{id:e,x:r.clientX,y:r.clientY,moved:!1}:null}function ng(t,e){const n=t.state.canvasLegendTouch,r=n&&eg(e);r&&(n.moved=n.moved||Math.abs(r.clientX-n.x)>Jv||Math.abs(r.clientY-n.y)>Jv)}function AE(t,e,n){ng(t,n);const r=t.state.canvasLegendTouch;return t.state.canvasLegendTouch=null,!!r&&r.id===e&&!r.moved}function EE(t,e){t.state.canvasLegendLastTouchClickId=e,t.state.canvasLegendLastTouchClickTime=Date.now()}function CE(t,e){const{state:n}=t,r=n.canvasLegendLastTouchClickId===e&&Date.now()-(n.canvasLegendLastTouchClickTime||0)<fE;return r&&(n.canvasLegendLastTouchClickId=null,n.canvasLegendLastTouchClickTime=0),r}function rg(t,e){const{api:n,config:r,state:i}=t;if(e.on("click dblclick mouseover mouseout touchstart touchmove touchend",null),!r.interaction_enabled)return;const s=r.legend_item_interaction,o=typeof s=="object"&&(s!=null&&s.dblclick)?"dblclick":"click",l=i.inputType==="touch",c=s||ie(r.legend_item_onclick),u=l?ug(r):void 0,f=function(d,h){var m;if(!Ne(r.legend_item_onclick,n,h,!i.hiddenTargetIds.has(h))){const S=Yt(this);d.type==="dblclick"||d.altKey?i.hiddenTargetIds.size&&!S.classed($e.legendItemHidden)?n.show():(n.hide(),n.show(h)):(n.toggle(h),S.classed(nn.legendItemFocused,!1)),tg(t)}l&&((m=t.hideTooltip)==null||m.call(t))};e.on(o,c?function(d,h){l&&d.type==="click"&&CE(t,h)||f.call(this,d,h)}:null),l&&o==="click"&&c&&e.on("touchstart",function(d,h){SE(t,h,d)},u).on("touchmove",d=>{ng(t,d)},u).on("touchend",function(d,h){AE(t,h,d)&&(EE(t,h),f.call(this,d,h))},u),!l&&e.on("mouseover",s||ie(r.legend_item_onover)?function(d,h){Ne(r.legend_item_onover,n,h,!i.hiddenTargetIds.has(h))||!i.transiting&&t.isTargetToShow(h)&&(yE(t,h),bE(t,h))}:null).on("mouseout",s||ie(r.legend_item_onout)?function(d,h){Ne(r.legend_item_onout,n,h,!i.hiddenTargetIds.has(h))||(TE(t),tg(t))}:null)}function IE(t,e){var n,r;const i=(r=(n=t.$el.chart)==null?void 0:n.node)==null?void 0:r.call(n),s=i==null?void 0:i.ownerDocument;if(!i||!s)return null;const o=s.createElementNS("http://www.w3.org/2000/svg","svg"),l=s.createElementNS("http://www.w3.org/2000/svg","g"),c=s.createElementNS("http://www.w3.org/2000/svg","text");o.style.cssText="position:absolute;visibility:hidden;left:-10000px;top:-10000px;",l.setAttribute("class",$e.legendItem),c.textContent=e,l.appendChild(c),o.appendChild(l),i.appendChild(o);const u=ln(c);return o.remove(),u}function ag(t){return/^(indexed|category|log|timeseries)$/.test(t)}function Zo(t){return/^(indexed|log|timeseries)$/.test(t)}function RE(t){var e,n;const r=t;return((e=r.changedTouches)==null?void 0:e[0])||((n=r.touches)==null?void 0:n[0])||("clientX"in t?t:null)}function wE(t,e,n=!1){var r,i;const s=ps(t,e);return s?n?(i=(r=t.hitDetector).findNearestShape)==null?void 0:i.call(r,s[0],s[1]):t.hitDetector.findNearest(s[0],s[1]):null}function OE(t,e){var n;const{config:r,state:i}=t,{height:s,margin:o,width:l,xAxisHeight:c}=i,[u,f]=e,d=o.left,h=o.left+l,m=o.top,S=o.top+s,E=r.axis_x_show?Math.max(c||0,24):0;return(n=t.isMultipleX)!=null&&n.call(t)||i.hasTreemap?!1:r.axis_rotated?f>=m&&f<=S&&u>=d-E&&u<=h:u>=d&&u<=h&&f>=m&&f<=S+E}function PE(t,e){const{state:{height:n,margin:r,width:i}}=t,[s,o]=e;return s>=r.left&&s<=r.left+i&&o>=r.top&&o<=r.top+n}function ME(t,e){var n,r;return t.hitDetector.findNearest(e[0],e[1])||(OE(t,e)?(r=(n=t.hitDetector).findNearestIndexByCoord)==null?void 0:r.call(n,e[0],e[1]):null)}function ig(t,e){var n;const{config:r,state:i}=t,s=t.filterTargetsToShow(t.data.targets),o=cg(t,e),l=r.tooltip_grouped&&!i.hasTreemap&&!o?(n=t.filterByX)==null?void 0:n.call(t,s,e.x):null;return(i.hasTreemap?[e]:o?[e]:r.tooltip_grouped?l!=null&&l.length?l:s.map(c=>c.values[e.index]).filter(Boolean):[e]).map(c=>{var u;return((u=t.addName)==null?void 0:u.call(t,c))||c})}function LE(t,e,n){var r,i;return(r=t.isMultipleX)!=null&&r.call(t)&&!cg(t,e)?[((i=t.addName)==null?void 0:i.call(t,e))||e]:n}function ps(t,e){const n=RE(e);if(!n)return null;const r=t.$el.canvas.node(),i=ln(r,!0);return[n.clientX-i.left,n.clientY-i.top]}function lu(t,e){var n,r;if(!Array.isArray(e)||e.length<2)return null;const i=e.slice(0,2);return(r=(n=t.axis)==null?void 0:n.isTimeSeries)!=null&&r.call(n)?i.map(s=>Wn.call(t,s)):i}function ms(t){const{config:e,state:n}=t;return!e.subchart_show||!n.hasAxis||n.width2<=0||n.height2<=0?null:{x:n.margin2.left,y:n.margin2.top,w:n.width2,h:n.height2}}function sg(t,e){const n=ms(t);return!!n&&e[0]>=n.x&&e[0]<=n.x+n.w&&e[1]>=n.y&&e[1]<=n.y+n.h}function DE(t,e){const{config:n,state:r}=t,i=ms(t);if(n.subchart_brush_enabled!==!1||!i||!sg(t,e))return null;const s=Td(t,n.axis_rotated?e[1]-i.y:e[0]-i.x);return s===null?null:n.axis_rotated?[r.margin.left+r.width/2,r.margin.top+s]:[r.margin.left+s,r.margin.top+r.height/2]}function Jo(t){var e,n;const r=ms(t),i=r?t.config.axis_rotated?r.h:r.w:0,s=(n=(e=t.axis)==null?void 0:e.getExtent)==null?void 0:n.call(e),o=Array.isArray(s)?s.slice(0,2):[];if(o.length===2&&o.every(Number.isFinite)){const l=Math.max(0,Math.min(i,o[0])),c=Math.max(0,Math.min(i,o[1]));return[Math.min(l,c),Math.max(l,c)]}return[0,i]}function cu(t,e,n=!1){const r=ps(t,e),i=r&&ms(t);if(!r||!i||!sg(t,r))return null;const s=t.config.axis_rotated?r[1]-i.y:r[0]-i.x,[o,l]=Jo(t);return!n&&(s<o||s>l)?null:Math.max(o,Math.min(l,s))}function FE(t,e,n){const r=Math.min(e,n),i=Math.max(e,n);return[t.scale.subX.invert(r),t.scale.subX.invert(i)]}function og(t){const{scale:e,state:n}=t,r=n.domain;if(!(r!=null&&r.length)||!e.subX)return null;const i=ms(t),s=e.subX(r[0]),o=e.subX(r[1]);if(!i||!Number.isFinite(s)||!Number.isFinite(o))return null;const[l,c]=Jo(t);return[Math.max(l,Math.min(c,Math.min(s,o))),Math.max(l,Math.min(c,Math.max(s,o)))]}function lg(t,e){const n=og(t);if(!n)return"select";const[r,i]=n;return Math.abs(e-r)<=Qv?"resize-start":Math.abs(e-i)<=Qv?"resize-end":e>r&&e<i?"move":"select"}function uu(t,e,n){const[r,i]=Jo(t);return[Math.max(r,Math.min(i,e)),Math.max(r,Math.min(i,n))]}function NE(t,e){return/^resize/.test(e)?t.config.axis_rotated?"ns-resize":"ew-resize":e==="move"?"move":"crosshair"}function ga(t){return t?`${t.id}:${t.index}`:null}function $E(t,e){const n=t.state.canvasSelectionDragIncluded,r=Yo.get(t)||new Map,i=new Map,s=new Set,o=[];return e.filter(l=>fu(t,l)).forEach(l=>{const c=ga(l);c&&(s.add(c),!i.has(c)&&i.set(c,l))}),i.forEach((l,c)=>{!n.has(c)&&o.push(l)}),r.forEach((l,c)=>{!s.has(c)&&o.push(l)}),Yo.set(t,i),{included:s,rows:o}}function BE(t){return t?Array.isArray(t)?t:[t]:null}function fu(t,e){return e&&An(t,e)&&ei(t,e,ou)&&ou.some(n=>n(t,e))&&t.config.data_selection_isselectable.bind(t.api)(e)}function du(t,e){t.filterTargetsToShow(t.data.targets).filter(n=>ei(t,n,ou)).forEach(n=>{n.values.forEach(r=>{fu(t,r)&&e(r)})})}function cg(t,e){return!(t.config.axis_x_forceAsSingle&&t.config.tooltip_grouped)&&(la(t,e)||ca(t,e))}function zE(t){return t.interaction_inputType_touch!==!1}function ug(t){var e;const n=(e=t.interaction_inputType_touch)==null?void 0:e.preventDefault,r=Ra(n)&&n||!1,i=!isNaN(n)&&n||null;return{passive:!r&&i===null}}function UE(t){var e;const n=(e=t.interaction_inputType_touch)==null?void 0:e.preventDefault,r=Ra(n)&&n||!1,i=!isNaN(n)&&n||null;let s;return o=>{var l,c;const u=((l=o.changedTouches)==null?void 0:l[0])||((c=o.touches)==null?void 0:c[0]);if(!u)return;const f=u[`client${t.axis_rotated?"Y":"X"}`];o.type==="touchstart"?r?o.preventDefault():i!==null&&(s=f):o.type==="touchmove"&&(r||s===!0||i!==null&&Math.abs(s-f)>=i)&&(s=!0,o.preventDefault())}}function pi(t,e){return e.pointerType!=="mouse"&&t.state.inputType!=="touch"}function kE(t,e){const{state:n}=t,r=ga(e),i=r&&n.canvasLastInputClickKey===r&&Date.now()-(n.canvasLastInputClickTime||0)<750;return i&&(n.canvasLastInputClickKey=null,n.canvasLastInputClickTime=0),!!i}function GE(t,e){t.state.canvasLastInputClickKey=ga(e),t.state.canvasLastInputClickTime=Date.now()}function XE(){var t,e,n;return(n=(e=(t=se.performance)==null?void 0:t.now)==null?void 0:e.call(t))!=null?n:Date.now()}function fg(t,e=!1){return Array.isArray(t)&&t.length>=2&&t.every(n=>Number.isFinite(+n)&&(!e||+n>0))}function WE(t,e,n,r=!1){return t.slice(0,2).map((i,s)=>{const o=r?Math.exp(Math.log(+i)+(Math.log(+e[s])-Math.log(+i))*n):+i+(+e[s]-+i)*n;return i instanceof Date||e[s]instanceof Date?new Date(o):o})}function VE(t){return t.data.targets.reduce((e,n)=>e+n.values.length,0)}function jE(t){const{scale:e}=t,n=t.filterTargetsToShow(t.data.targets);["y","y2"].forEach(r=>{var i;(i=e[r])==null||i.domain(t.getYDomain(n,r))}),t.withSubchartTypeContext(()=>{var r,i;(r=e.subY)==null||r.domain(t.getYDomain(n,"y")),(i=e.subY2)==null||i.domain(t.getYDomain(n,"y2"))})}const HE={prepareCanvasConfig(){var t,e;const{config:n,state:r}=this;this.warnUnsupportedCanvasOptions(),(t=r.orgConfig)!=null&&t.transition&&Object.prototype.hasOwnProperty.call(r.orgConfig.transition,"duration")&&r.orgConfig.transition.duration&&_v("canvas mode: transition.duration is ignored; canvas redraws synchronously."),n.transition_duration=0,ag(n.axis_x_type)||(n.axis_x_type="indexed"),Zo(n.axis_y_type)||(n.axis_y_type="indexed"),Zo(n.axis_y2_type)||(n.axis_y2_type="indexed"),(e=this.hasType)!=null&&e.call(this,"bubble")&&(n.point_show=!0,n.point_type="circle")},applyCanvasSubchartDomain(){const t=this,{axis:e,config:n,scale:r,state:i}=t;if(!n.subchart_show||!i.hasAxis||!r.subX)return;!i.rendered&&!i.domain&&n.subchart_init_range&&(i.domain=lu(t,n.subchart_init_range));const s=lu(t,i.domain);!s||!t.withinRange(s,t.getZoomDomain("subX",!0),t.getZoomDomain("subX"))||(i.domain=s,r.x.domain(s),e.x.scale(r.x))},setCanvasSubchartDomain(t,e=!0,n=!1){const r=this,{config:i,scale:s,state:o}=r,l=lu(r,t);if(!(!i.subchart_show||!l||!r.withinRange(l,r.getZoomDomain("subX",!0),r.getZoomDomain("subX"))))return o.domain=l,s.zoom=null,e&&r.redraw({withTransition:!1,withY:i.zoom_rescale,withSubchart:!1,withEventRect:!1,withDimension:!1}),n&&i.subchart_onbrush.bind(r.api)(o.domain),o.domain},clearCanvasSubchartDomain(t=!0,e=!1){var n;const r=this,{axis:i,config:s,org:o,scale:l,state:c}=r;s.subchart_show&&(c.domain=void 0,l.zoom=null,(n=o.xDomain)!=null&&n.length&&(l.x.domain(o.xDomain),i.x.scale(l.x)),t&&r.redraw({withTransition:!1,withUpdateXDomain:!0,withUpdateOrgXDomain:!1,withY:s.zoom_rescale,withSubchart:!1,withEventRect:!1,withDimension:!1}),e&&s.subchart_onbrush.bind(r.api)(l.x.orgDomain()))},flushCanvasFlow(){var t,e;const{state:n}=this;n.canvasFlowFinish&&(n.canvasFlowFrame!==null&&((e=(t=se).cancelAnimationFrame)==null||e.call(t,n.canvasFlowFrame)),n.canvasFlowFrame=null,n.canvasFlowFinish())},animateCanvasFlow(t){var e,n,r,i,s,o,l,c,u,f,d;const h=this,{axis:m,data:S,org:E,scale:C,state:w}=h,{done:$=()=>{},duration:z,length:B,orgDataCount:W}=t,H=(e=se.requestAnimationFrame)==null?void 0:e.bind(se),_=!!((n=m.isLog)!=null&&n.call(m,"x"));if(!H||!z||!B||!W||VE(h)>hE)return!1;const q=C.x.domain().slice(0,2),st=(i=(r=E.xDomain)==null?void 0:r.slice)==null?void 0:i.call(r),it=(c=(o=(s=C.subX)==null?void 0:s.domain)==null?void 0:(l=o.call(s)).slice)==null?void 0:c.call(l);if(!fg(q,_))return!1;const ot=S.targets.map(St=>St.values.splice(0,B));h.updateXDomain(h.filterTargetsToShow(S.targets),!0,!0);const ct=C.x.domain().slice(0,2),gt=(f=(u=E.xDomain)==null?void 0:u.slice)==null?void 0:f.call(u);if(S.targets.forEach((St,Mt)=>{St.values.unshift(...ot[Mt])}),!fg(ct,_))return st&&(E.xDomain=st),C.x.domain(q),it&&C.subX.domain(it),m.x.scale(C.x),!1;jE(h);let tt=!1;const ft=XE(),lt=()=>{var St,Mt;tt||(tt=!0,S.targets.forEach(Ot=>{Ot.values.splice(0,B)}),gt&&(E.xDomain=gt),C.x.domain(ct),(Mt=(St=C.subX)==null?void 0:St.domain)==null||Mt.call(St,gt!=null?gt:ct),m.x.scale(C.x),w.dirty.data=!0,w._eventRectFingerprint=null,w.canvasShape=null,w._cachedDrawShape=null,h.redraw({withLegend:!0,withTransition:!1,withTrimXDomain:!1,withUpdateOrgXDomain:!0,withUpdateXAxis:!0,withUpdateXDomain:!0}),h.updateTypesElements(),w.canvasFlowFrame=null,w.canvasFlowFinish=null,w.flowing=!1,$.call(h.api))},bt=St=>{const Mt=Math.min(1,Math.max(0,(St-ft)/z)),Ot=WE(q,ct,Mt,_);C.x.domain(Ot),m.x.scale(C.x),w.canvasShape=null,w._cachedDrawShape=null,w._canvasVisibleRangeCache=null,w._canvasXTickValuesCache=null,h.renderCanvasFrame(void 0,null,!1),Mt<1?w.canvasFlowFrame=H(bt):lt()};return st&&(E.xDomain=st),C.x.domain(q),it&&C.subX.domain(it),m.x.scale(C.x),w.flowing=!0,w.cancelClick=!0,(d=h.hideTooltip)==null||d.call(h),w.canvasFlowFinish=lt,w.canvasFlowFrame=H(bt),!0},initCanvas(){var t;const e=this,{config:n,state:r,$el:i}=e,s=i.chart.node();r.isCanvasMode=!0,r.canvasInlineStyle.minHeight=s.style.minHeight,se.getComputedStyle(s).position==="static"&&i.chart.style("position","relative"),i.chart.style("min-height",`${r.current.height}px`),e.canvasEngine=new z0,e.canvasEngine.init(s,r.current.width,e.getCanvasSurfaceHeight()),i.canvas=Yt(e.canvasEngine.canvas),e.canvasTheme=new f1,e.canvasTheme.load(s,n.canvas_theme),e.canvasAxisRenderer=new N0(e.canvasEngine,e.canvasTheme),e.canvasRenderer=new QT(e.canvasEngine,e.canvasTheme),e.hitDetector=new p1,e.bindCanvasEvents(),n.zoom_enabled&&((t=e.bindZoomEvent)==null||t.call(e))},warnUnsupportedCanvasOptions(){var t,e,n,r;const{config:i}=this;[[!ag(i.axis_x_type),"axis.x.type other than indexed/category/log/timeseries"],[!Zo(i.axis_y_type),"axis.y.type other than indexed/log/timeseries"],[!Zo(i.axis_y2_type),"axis.y2.type other than indexed/log/timeseries"],[i.boost_useCssRule,"boost.useCssRule"],[(t=this.hasArcType)==null?void 0:t.call(this),"arc charts"],[(e=this.hasType)==null?void 0:e.call(this,"radar"),"radar chart"],[(n=this.hasType)==null?void 0:n.call(this,"polar"),"polar chart"],[(r=this.hasType)==null?void 0:r.call(this,"funnel"),"funnel chart"]].forEach(([o,l])=>{o&&_v(`canvas mode: ${l} is not yet supported.`)})},bindCanvasEvents(){const t=this,{config:e,state:n,$el:r}=t,i=r.canvas.node(),s=UE(e),o=ug(e);i.addEventListener("mousemove",t.onCanvasMouseMove.bind(t)),i.addEventListener("mouseenter",l=>{var c;n.event=l,(c=e.onover)==null||c.bind(t.api)(l)}),i.addEventListener("mouseout",t.onCanvasMouseOut.bind(t)),i.addEventListener("mouseleave",l=>{var c;n.event=l,(c=e.onout)==null||c.bind(t.api)(l)}),i.addEventListener("mousedown",l=>{var c;(c=t.onCanvasSubchartBrushStart)!=null&&c.call(t,l)||t.onCanvasSelectionDragStart(l)}),i.addEventListener("click",t.onCanvasClick.bind(t)),i.addEventListener("pointerdown",t.onCanvasPointerDown.bind(t)),i.addEventListener("pointerenter",t.onCanvasPointerEnter.bind(t)),i.addEventListener("pointermove",t.onCanvasPointerMove.bind(t)),i.addEventListener("pointerup",t.onCanvasPointerUp.bind(t)),i.addEventListener("pointerleave",t.onCanvasPointerOut.bind(t)),i.addEventListener("pointercancel",t.onCanvasPointerCancel.bind(t)),zE(e)&&(i.addEventListener("touchstart",l=>{s(l),t.onCanvasTouchStart(l)},o),i.addEventListener("touchmove",l=>{s(l),t.onCanvasTouchMove(l)},o),i.addEventListener("touchend",t.onCanvasTouchEnd.bind(t),o),i.addEventListener("touchcancel",t.onCanvasTouchCancel.bind(t),o))},updateHtmlLegend(){var t,e;const n=this,{config:r,state:i,$el:s}=n,o=s.chart.node();if(!r.legend_show||i.hasTreemap){i.hasTreemap?((t=s.legend)==null||t.remove(),s.legend=null):(e=s.legend)==null||e.style("visibility","hidden"),i.legendItemWidth=0,i.legendItemHeight=0,i.legendStep=0;return}const l=n.mapToIds(n.data.targets).filter(d=>r.data_names[d]!==null);if(r.legend_contents_bindto&&r.legend_contents_template){n.updateHtmlLegendTemplate(l)?(i.legendItemWidth=0,i.legendItemHeight=0,i.legendStep=0,i.legendHasRendered=!0):(i.legendItemWidth=0,i.legendItemHeight=0,i.legendStep=0);return}s.legend||(s.legend=Yt(o).append("div").classed($e.legend,!0).classed(cr.legend,!0)),s.legend.style("visibility",null);const c=s.legend.selectAll(`button.${$e.legendItem}`).data(l,d=>d);c.exit().remove();const u=c.enter().append("button").attr("type","button").attr("data-id",d=>d);u.append("span").classed($e.legendItemTile,!0),u.append("span").classed(cr.legendItemTitle,!0);const f=u.merge(c).attr("class",d=>n.generateClass($e.legendItem,d).trim());qv(n,f),f.select(`.${$e.legendItemTile}`).classed(cr.legendItemTileCircle,!r.legend_usePoint&&r.legend_item_tile_type==="circle").style("background-color",d=>r.legend_usePoint?null:n.color(d)).html(d=>r.legend_usePoint?mE(n,d):""),f.select(`.${cr.legendItemTitle}`).text(d=>Ko(n,d)),r.legend_tooltip&&f.attr("title",d=>Ko(n,d)),rg(n,f),n.updateHtmlLegendSize(l),n.positionHtmlLegend(),i.legendHasRendered=!0},updateHtmlLegendTemplate(t){const e=this,{api:n,config:r,$el:i}=e,s=Yt(r.legend_contents_bindto),o=r.legend_contents_template,l=[];let c="";if(s.empty())return!1;t.forEach(f=>{const d=ie(o)?Gr(o.call(n,f,e.color(f),n.data(f)[0].values)):Pa(o,{COLOR:e.color(f),TITLE:f});d&&(l.push(f),c+=d)});const u=s.html(c).classed($e.legend,!0).classed(cr.legend,!1).style("visibility",null).selectAll(function(){return this.children}).data(l);return qv(e,u),rg(e,u),i.legend=s,!0},updateHtmlLegendSize(t){const e=this,{config:n,state:r,$el:i}=e,s=[],o={};let l=0,c=0,u=0;const f=n.legend_contents_bindto&&n.legend_contents_template;if(f)i.legend.selectAll(`.${$e.legendItem}`).each(function(d){const h=ln(this,!0),m=`${Ko(e,d)}`,S=Math.max(32,m.length*7+24),E=20,C=Math.ceil(h.width||S),w=Math.ceil(h.height||E);s.push(C),l=Math.max(l,C),c=Math.max(c,w)});else if(t.length){const d=r.isLegendRight||r.isLegendInset,h=n.legend_item_tile_type!=="circle",m={width:h?n.legend_item_tile_width:n.legend_item_tile_r*2,height:h?n.legend_item_tile_height:n.legend_item_tile_r*2},S={padding:{top:4,right:10},max:{width:0,height:0},posMin:10,step:0,tileWidth:m.width+5,totalLength:0},E={offsets:{},widths:{},heights:{},margins:[0],steps:{}},C=t.map((_,q)=>{const st=`${Ko(e,_)}`,it=IE(e,st),ot=Math.max(32,st.length*7),ct=12,gt=q===t.length-1,tt=n.legend_show&&!e.isLegendToShow(_),ft=tt?0:((it==null?void 0:it.width)||ot)+S.tileWidth+(gt&&!d?0:S.padding.right)+n.legend_padding,lt=tt?0:((it==null?void 0:it.height)||ct)+S.padding.top;return S.max.width=Math.max(S.max.width,ft),S.max.height=Math.max(S.max.height,lt),{id:_,hidden:tt,width:ft,height:lt}}),w=d?e.getLegendHeight():e.getLegendWidth(),$=(_,q,st=!1)=>{let it;st||(it=(w-S.totalLength-q)/2,it<S.posMin&&(it=(w-q)/2,S.totalLength=0,S.step++)),E.steps[_]=S.step,E.margins[S.step]=r.isLegendInset?10:it,E.offsets[_]=S.totalLength,S.totalLength+=q};r.isLegendInset&&(S.step=n.legend_inset_step?n.legend_inset_step:t.length,r.legendStep=S.step),C.forEach(({id:_,hidden:q,width:st,height:it})=>{const ot=n.legend_equally&&!q?S.max.width:st,ct=n.legend_equally&&!q?S.max.height:it,gt=d?ct:ot;if(E.widths[_]=ot,E.heights[_]=ct,s.push(ot),l=Math.max(l,ot),c=Math.max(c,ct),q){E.steps[_]=0,E.offsets[_]=0;return}$(_,gt)});const z=r.isLegendRight?_=>S.max.width*E.steps[_]:r.isLegendInset?_=>S.max.width*E.steps[_]+10:_=>E.margins[E.steps[_]]+E.offsets[_],B=r.isLegendRight||r.isLegendInset?_=>E.margins[E.steps[_]]+E.offsets[_]:_=>S.max.height*E.steps[_],W=4+m.width,H=9;C.forEach(({id:_,hidden:q})=>{const st=q?0:z(_),it=q?0:B(_);o[_]={item:{x:st,y:it-5,width:E.widths[_],height:E.heights[_]},title:{x:W,y:0,height:E.heights[_]},tile:{x:-2,y:H-m.height/2,width:m.width,height:m.height}}}),u=S.step}if(!t.length){r.legendItemWidth=0,r.legendItemHeight=0,r.legendStep=0;return}if(f){const d=Math.max(1,r.current.width),h=10;let m=1,S=0;s.forEach(E=>{S&&S+h+E>d?(m++,S=E):S+=(S?h:0)+E}),r.legendStep=Math.max(0,m-1)}else r.legendStep=u;r.legendItemWidth=l,r.legendItemHeight=Math.max(12,c),f||i.legend.selectAll(`button.${$e.legendItem}`).each(function(d){const h=o[d],m=Yt(this);h&&(m.style("left",`${h.item.x}px`).style("top",`${h.item.y}px`).style("width",`${h.item.width}px`).style("height",`${h.item.height}px`),m.select(`.${cr.legendItemTitle}`).style("left",`${h.title.x}px`).style("top",`${h.title.y}px`).style("height",`${h.title.height}px`).style("line-height",`${h.title.height}px`),m.select(`.${$e.legendItemTile}`).style("left",`${h.tile.x}px`).style("top",`${h.tile.y}px`).style("width",`${h.tile.width}px`).style("height",`${h.tile.height}px`))})},getCanvasBottomLegendHeight(){var t;const e=this,{config:n,state:r,$el:i}=e;if(!n.legend_show||r.isLegendRight||r.isLegendInset||r.hasTreemap||!i.legend||!r.legendItemHeight)return 0;const s=ln(i.legend.node(),!0).height,o=r.legendItemHeight*(r.legendStep+1);return Math.ceil(Math.max(((t=e.getLegendHeight)==null?void 0:t.call(e))||0,s||o))},getCanvasSurfaceHeight(){const t=this;return Math.max(0,t.state.current.height-t.getCanvasBottomLegendHeight())},positionHtmlLegend(){var t;const e=this,{config:n,state:r,$el:i}=e,s=i.legend;if(s.classed(cr.legendBottom,!r.isLegendRight&&!r.isLegendInset).classed(cr.legendRight,r.isLegendRight).classed(cr.legendInset,r.isLegendInset).style("top",null).style("right",null).style("bottom",null).style("left",null).style("width",null).style("height",null).style("min-height",null),r.isLegendRight)s.style("top",`${r.margin3.top}px`).style("right","0").style("bottom",`${r.margin3.bottom}px`).style("width",`${Math.max(0,e.getLegendWidth())}px`);else if(r.isLegendInset){if(r.isLegendInset){const o=r.isLegendTop,l=r.isLegendLeft;s.style(o?"top":"bottom",`${n.legend_inset_y}px`).style(l?"left":"right",`${n.legend_inset_x}px`).style("width",`${Math.max(0,r.legendItemWidth*(r.legendStep+1)+20)}px`)}}else{const o=((t=e.getLegendHeight)==null?void 0:t.call(e))||0;s.style("top",`${Math.max(0,r.current.height-o)}px`).style("right","0").style("bottom","auto").style("left","0")}},getCanvasSelectedData(t){const e=this,n=e.state.canvasSelection,r=[];return!e.config.data_selection_enabled||!(n!=null&&n.size)||du(e,i=>{(!t||i.id===t)&&n.has(ga(i))&&r.push(i)}),r},setCanvasSelection(t=!1,e,n,r){var i;const s=this,{config:o,state:l}=s,c=l.canvasSelection,u=o.data_selection_grouped;let f=BE(e),d=!1;const h=t&&!o.data_selection_multiple;let m=!h;if(o.data_selection_enabled){if(h&&(n=n!=null&&n.length?[n[0]]:[0],!u))if(f)f=f.slice(0,1);else{const[S]=s.filterTargetsToShow(s.data.targets);f=S?[S.id]:[]}du(s,S=>{const E=ga(S),C=u||!f||f.indexOf(S.id)>=0,w=!n||n.indexOf(S.index)>=0,$=c.has(E);if(t)if(C&&w&&(!$||h)){if(m||(s.setCanvasSelection(!1),m=!0),c.has(E))return;c.add(E),Ne(o.data_onselected,s.api,S,s.canvasEngine.canvas),d=!0}else(!h||m)&&r&&$&&(c.delete(E),Ne(o.data_onunselected,s.api,S,s.canvasEngine.canvas),d=!0);else C&&w&&$&&(c.delete(E),Ne(o.data_onunselected,s.api,S,s.canvasEngine.canvas),d=!0)}),d&&((i=s.renderCanvasFrame)==null||i.call(s,void 0,null,!1))}},toggleCanvasSelection(t){var e;const n=this,{config:r,state:i}=n,s=i.canvasSelection;let o=!1;r.data_selection_enabled&&(t.filter(l=>fu(n,l)).forEach(l=>{const c=ga(l),u=s.has(c);r.data_selection_multiple||du(n,f=>{const d=ga(f);(r.data_selection_grouped?f.id===l.id:d!==c)&&s.has(d)&&(s.delete(d),Ne(r.data_onunselected,n.api,f,n.canvasEngine.canvas),o=!0)}),u&&s.has(c)?(s.delete(c),Ne(r.data_onunselected,n.api,l,n.canvasEngine.canvas)):(s.add(c),Ne(r.data_onselected,n.api,l,n.canvasEngine.canvas)),o=!0}),o&&((e=n.renderCanvasFrame)==null||e.call(n,void 0,null,!1)))},canStartCanvasSelectionDrag(t){const e=this,{config:n}=e,r=t;return!!(n.interaction_enabled&&n.data_selection_enabled&&n.data_selection_draggable&&n.data_selection_multiple&&!n.zoom_enabled&&(r.button===void 0||r.button===0))},getCanvasSelectionDragData(t){const e=this,{config:n}=e,r=e.hitDetector.findInRect(t,n.data_selection_grouped);if(!n.data_selection_grouped)return r;const i=new Set(r.map(s=>s.index));return e.filterTargetsToShow(e.data.targets).flatMap(s=>s.values.filter(o=>i.has(o.index)))},startCanvasSelectionDrag(t){var e,n;const r=this,{state:i}=r,s=ps(r,t);return!s||!r.canStartCanvasSelectionDrag(t)?!1:(i.dragStart=s,i.canvasSelectionDragStart=s,i.canvasSelectionDragIncluded=new Set,i.canvasSelectionDragging=!0,i.canvasSelectionDragMoved=!1,Yo.set(r,new Map),r.setDragStatus(!0),(e=r.hideTooltip)==null||e.call(r),(n=t.preventDefault)==null||n.call(t),!0)},updateCanvasSelectionDrag(t){var e;const n=this,{config:r,state:i}=n,s=i.canvasSelectionDragStart,o=ps(n,t);if(!i.canvasSelectionDragging||!s||!o)return!1;const[l,c]=s,[u,f]=o,d=Math.min(l,u),h=Math.max(l,u),m=r.data_selection_grouped?i.margin.top:Math.min(c,f),S=r.data_selection_grouped?i.margin.top+i.height:Math.max(c,f),E={x:d,y:m,w:h-d,h:S-m},C=Math.abs(u-l)>4||Math.abs(f-c)>4;if(i.canvasSelectionDragMoved=i.canvasSelectionDragMoved||C,C){const{included:w,rows:$}=$E(n,n.getCanvasSelectionDragData(E));$.length&&n.toggleCanvasSelection($),i.canvasSelectionDragIncluded=w,i.cancelClick=!0}return n.renderCanvasSelectionDrag(E),(e=t.preventDefault)==null||e.call(t),!0},endCanvasSelectionDrag(t){var e;const n=this,{state:r}=n;return r.canvasSelectionDragging?(n.updateCanvasSelectionDrag(t),r.cancelClick=r.cancelClick||r.canvasSelectionDragMoved,r.dragStart=null,r.canvasSelectionDragStart=null,r.canvasSelectionDragIncluded=new Set,r.canvasSelectionDragging=!1,r.canvasSelectionDragMoved=!1,Yo.delete(n),n.setDragStatus(!1),n.clearCanvasFocus(),(e=t.preventDefault)==null||e.call(t),!0):!1},dispatchCanvasDataOut(t){const e=this,{config:n,state:r}=e,i=r.canvasDataHover;i&&(r.canvasDataHover=null,r.canvasDataHoverKey=null,n.interaction_enabled&&Ne(n.data_onout,e.api,i,t))},dispatchCanvasDataOver(t,e){const n=this,{config:r,state:i}=n,s=ga(t);i.canvasDataHoverKey!==s&&(n.dispatchCanvasDataOut(e),i.canvasDataHover=t,i.canvasDataHoverKey=s,r.interaction_enabled&&t&&Ne(r.data_onover,n.api,t,e))},dispatchCanvasDataClick(t,e=!1){var n;const r=this,{config:i,$el:s}=r,o=s.canvas.node(),l=wE(r,t,!0);if(!l||kE(r,l))return l;if(i.interaction_enabled){const c=i.data_selection_grouped?r.filterTargetsToShow(r.data.targets).map(u=>u.values[l.index]).filter(Boolean):[l];(n=r.toggleCanvasSelection)==null||n.call(r,c),c.forEach(u=>Ne(i.data_onclick,r.api,u,o)),e&&GE(r,l)}return l},updateCanvasSubchartBrush(t){var e,n;const r=this,{config:i,state:s}=r,o=s.canvasSubchartBrushStart,l=s.canvasSubchartBrushOrigin,c=s.canvasSubchartBrushMode,u=cu(r,t,!0);if(i.subchart_brush_enabled===!1||!s.canvasSubchartBrushDragging||o===null||u===null||!c)return!1;const f=u-o;if(Math.abs(f)>dE&&(s.canvasSubchartBrushMoved=!0),!s.canvasSubchartBrushMoved)return(e=t.preventDefault)==null||e.call(t),!0;let d;if(c==="move"&&l){const[m,S]=Jo(r),E=l[1]-l[0];let C=l[0]+f,w=l[1]+f;C<m&&(w+=m-C,C=m),w>S&&(C-=w-S,w=S),d=[Math.max(m,Math.min(S-E,C)),Math.min(S,Math.max(m+E,w))]}else c==="resize-start"&&l?d=uu(r,u,l[1]):c==="resize-end"&&l?d=uu(r,l[0],u):d=uu(r,o,u);const h=FE(r,d[0],d[1]);return r.setCanvasSubchartDomain(h,!0),s.cancelClick=!0,(n=t.preventDefault)==null||n.call(t),!0},updateCanvasSubchartCursor(t){const e=this,n=e.$el.canvas.node();if(e.config.subchart_brush_enabled===!1)return n.style.cursor="",!1;const r=cu(e,t);if(r===null)return n.style.cursor="",!1;const i=lg(e,r);return n.style.cursor=NE(e,i),!0},startCanvasSubchartBrush(t){var e;const n=this,{state:r}=n;if(n.config.subchart_brush_enabled===!1)return!1;const i=cu(n,t);if(i===null)return!1;const s=lg(n,i);return r.event=t,r.canvasSubchartBrushDragging=!0,r.canvasSubchartBrushMode=s,r.canvasSubchartBrushStart=i,r.canvasSubchartBrushOrigin=og(n),r.canvasSubchartBrushMoved=!1,r.cancelClick=!0,n.setDragStatus(!0),(e=t.preventDefault)==null||e.call(t),!0},endCanvasSubchartBrush(t){var e,n,r;const i=this,{state:s}=i;if(!s.canvasSubchartBrushDragging)return!1;i.updateCanvasSubchartBrush(t);const o=s.canvasSubchartBrushMode==="select"&&!s.canvasSubchartBrushMoved,l=s.canvasSubchartBrushMoved||o;return o?(e=i.clearCanvasSubchartDomain)==null||e.call(i,!0,!0):l&&i.config.subchart_onbrush.bind(i.api)((n=s.domain)!=null?n:i.scale.x.orgDomain()),s.canvasSubchartBrushDragging=!1,s.canvasSubchartBrushMode=null,s.canvasSubchartBrushStart=null,s.canvasSubchartBrushOrigin=null,s.canvasSubchartBrushMoved=!1,i.setDragStatus(!1),(r=t.preventDefault)==null||r.call(t),!0},cancelCanvasSubchartBrush(t){var e;const n=this,{state:r}=n;return r.canvasSubchartBrushDragging?(r.canvasSubchartBrushDragging=!1,r.canvasSubchartBrushMode=null,r.canvasSubchartBrushStart=null,r.canvasSubchartBrushOrigin=null,r.canvasSubchartBrushMoved=!1,n.setDragStatus(!1),(e=t.preventDefault)==null||e.call(t),!0):!1},onCanvasSubchartBrushStart(t){const e=this;if(!e.startCanvasSubchartBrush(t))return!1;const n=i=>{e.updateCanvasSubchartBrush(i)},r=i=>{e.endCanvasSubchartBrush(i),se.removeEventListener("mousemove",n),se.removeEventListener("mouseup",r)};return se.addEventListener("mousemove",n),se.addEventListener("mouseup",r),!0},onCanvasClick(t){var e;const n=this,{config:r,state:i}=n;if(i.event=t,i.flowing||i.cancelClick){i.cancelClick=!1;return}n.dispatchCanvasDataClick(t),(e=r.onclick)==null||e.bind(n.api)(t)},onCanvasSelectionDragStart(t){const e=this,{state:n}=e;if(!e.startCanvasSelectionDrag(t))return;const r=s=>{e.updateCanvasSelectionDrag(s)},i=s=>{e.endCanvasSelectionDrag(s),se.removeEventListener("mousemove",r),se.removeEventListener("mouseup",i),n.canvasSelectionDragMoveHandler=null,n.canvasSelectionDragEndHandler=null};n.canvasSelectionDragMoveHandler=r,n.canvasSelectionDragEndHandler=i,se.addEventListener("mousemove",r),se.addEventListener("mouseup",i)},onCanvasPointerDown(t){var e;if(!pi(this,t))return;const n=this,r=n.$el.canvas.node();if(!n.startCanvasSubchartBrush(t))return;const i=t.pointerId,s=f=>f.pointerId===i,o=f=>{s(f)&&n.updateCanvasSubchartBrush(f)},l=f=>{s(f)&&(n.endCanvasSubchartBrush(f),u())},c=f=>{s(f)&&(n.cancelCanvasSubchartBrush(f),u())};function u(){var f;se.removeEventListener("pointermove",o),se.removeEventListener("pointerup",l),se.removeEventListener("pointercancel",c);try{(f=r.releasePointerCapture)==null||f.call(r,i)}catch(d){}}try{(e=r.setPointerCapture)==null||e.call(r,i)}catch(f){}se.addEventListener("pointermove",o),se.addEventListener("pointerup",l),se.addEventListener("pointercancel",c)},onCanvasPointerEnter(t){var e;pi(this,t)&&(this.state.event=t,(e=this.config.onover)==null||e.bind(this.api)(t))},onCanvasPointerMove(t){pi(this,t)&&(this.updateCanvasSubchartBrush(t)||this.onCanvasMouseMove(t))},onCanvasPointerUp(t){var e;if(pi(this,t)){if(this.state.event=t,this.endCanvasSubchartBrush(t)){(e=this.config.onout)==null||e.bind(this.api)(t);return}this.dispatchCanvasDataClick(t,!0),this.dispatchCanvasDataOut(this.$el.canvas.node())}},onCanvasPointerOut(t){var e;pi(this,t)&&(this.state.canvasSubchartBrushDragging||(this.state.event=t,this.onCanvasMouseOut(),(e=this.config.onout)==null||e.bind(this.api)(t)))},onCanvasPointerCancel(t){var e;if(pi(this,t)){if(this.state.event=t,this.cancelCanvasSubchartBrush(t)){(e=this.config.onout)==null||e.bind(this.api)(t);return}this.onCanvasPointerOut(t)}},onCanvasTouchStart(t){var e;t.touches.length>1||(this.state.event=t,!this.startCanvasSubchartBrush(t)&&(this.startCanvasSelectionDrag(t)||((e=this.config.onover)==null||e.bind(this.api)(t),this.onCanvasMouseMove(t))))},onCanvasTouchMove(t){t.touches.length>1||this.updateCanvasSubchartBrush(t)||this.updateCanvasSelectionDrag(t)||this.onCanvasMouseMove(t)},onCanvasTouchEnd(t){var e,n,r;if(this.state.event=t,this.endCanvasSubchartBrush(t)){(e=this.config.onout)==null||e.bind(this.api)(t);return}if(this.endCanvasSelectionDrag(t)){(n=this.config.onout)==null||n.bind(this.api)(t);return}this.dispatchCanvasDataClick(t,!0),this.dispatchCanvasDataOut(this.$el.canvas.node()),(r=this.config.onout)==null||r.bind(this.api)(t)},onCanvasTouchCancel(t){var e;this.state.event=t,this.cancelCanvasSubchartBrush(t),this.endCanvasSelectionDrag(t),this.onCanvasMouseOut(),(e=this.config.onout)==null||e.bind(this.api)(t)},onCanvasMouseMove(t){var e,n,r,i,s;const o=this,{config:l,state:c,$el:u}=o,f=u.canvas.node();if(c.event=t,c.flowing||c.canvasSelectionDragging)return;if((e=o.updateCanvasSubchartCursor)!=null&&e.call(o,t)){o.dispatchCanvasDataOut(f),c.canvasFocusKey&&(c.canvasFocusKey=null,o.clearCanvasFocus()),(n=o.hideTooltip)==null||n.call(o);return}const d=ps(o,t),h=d&&(DE(o,d)||d),m=h?ME(o,h):null;if(!m){if(o.dispatchCanvasDataOut(f),c.canvasFocusKey&&(c.canvasFocusKey=null,o.clearCanvasFocus()),d&&l.axis_tooltip&&PE(o,d)){o.renderCanvasAxisTooltip(d),(r=o.hideTooltip)==null||r.call(o);return}(i=o.hideTooltip)==null||i.call(o);return}o.dispatchCanvasDataOver(m,f);const S=ig(o,m),E=LE(o,m,S),C=E.map(w=>`${w.id}:${w.index}`).join("|");(c.canvasFocusKey!==C||l.axis_tooltip)&&(c.canvasFocusKey=C,o.renderCanvasFocus(E,h)),(s=o.showTooltip)==null||s.call(o,S,f)},onCanvasMouseOut(){var t;const e=this.$el.canvas.node();e.style.cursor="",this.dispatchCanvasDataOut(e),this.state.canvasFocusKey?(this.state.canvasFocusKey=null,this.clearCanvasFocus()):this.config.axis_tooltip&&this.clearCanvasFocus(),(t=this.hideTooltip)==null||t.call(this)},showCanvasLinkedTooltip(t){var e,n,r,i;const s=this,{$el:o,state:l}=s,c=(e=o.canvas)==null?void 0:e.node(),f=s.filterTargetsToShow(s.data.targets).map(w=>w.values[t]).find(Boolean);if(!c||!f)return(n=s.hideTooltip)==null||n.call(s),!1;const d=ig(s,f),h=d.find(w=>w&&An(s,w))||d[0];if(!d.length||!h)return(r=s.hideTooltip)==null||r.call(s),!1;const{left:m,top:S}=ln(c,!0),E=Ji(s,h),C=[l.margin.left+E.x,l.margin.top+E.y];return l.event={clientX:m+C[0],clientY:S+C[1],currentTarget:c,target:c},l.canvasFocusKey=d.map(w=>`${w.id}:${w.index}`).join("|"),s.renderCanvasFocus(d,C),(i=s.showTooltip)==null||i.call(s,d,c),!0},renderCanvasZoomBrush(t,e){const n=this;n.canvasEngine.withOverlay(r=>{n.canvasRenderer.withContext(r,()=>{n.canvasRenderer.drawZoomBrush(n,t,e)})})},clearCanvasZoomBrush(){this.canvasEngine.clearOverlay()},renderCanvasSelectionDrag(t){const e=this;e.canvasEngine.withOverlay(n=>{e.canvasRenderer.withContext(n,()=>{e.canvasRenderer.drawSelectionDragArea(e,t)})})},renderCanvasFrame(t,e,n=!1){const r=this,{state:i}=r,s=t||i.canvasShape||r.getDrawShape();i.canvasShape=s,i._canvasVisibleRangeCache=null,i._canvasXTickValuesCache=null,r.canvasEngine.beginFrame(i.current.width,r.getCanvasSurfaceHeight());try{r.canvasRenderer.drawBackground(r),r.canvasAxisRenderer.drawTitle(r),i.hasAxis&&r.canvasAxisRenderer.draw(r),r.canvasRenderer.draw(r,s),i.hasAxis&&r.config.grid_lines_front&&r.canvasAxisRenderer.drawGridLines(r),r.canvasRenderer.drawSubchart(r,s),i.hasAxis&&r.canvasAxisRenderer.drawSubXAxis(r),i.hasAxis&&r.canvasAxisRenderer.drawSubYAxes(r),r.canvasRenderer.drawEmptyLabel(r),n&&r.hitDetector.rebuild(r,s)}finally{r.canvasEngine.endFrame()}r.canvasEngine.clearOverlay(),i.canvasFocusMainRedraw=!1,e&&r.renderCanvasFocus(e)},renderCanvasFocus(t,e){var n,r;const i=this,{state:s}=i,o=(r=(n=i.canvasRenderer).hasExpandedShapeFocus)==null?void 0:r.call(n,i,t);if(o){const l=s.canvasShape||i.getDrawShape();i.canvasEngine.beginFrame(s.current.width,i.getCanvasSurfaceHeight());try{i.canvasRenderer.drawBackground(i),i.canvasAxisRenderer.drawTitle(i),s.hasAxis&&i.canvasAxisRenderer.draw(i),i.canvasRenderer.draw(i,l,t),s.hasAxis&&i.config.grid_lines_front&&i.canvasAxisRenderer.drawGridLines(i),i.canvasRenderer.drawSubchart(i,l),s.hasAxis&&i.canvasAxisRenderer.drawSubXAxis(i),s.hasAxis&&i.canvasAxisRenderer.drawSubYAxes(i),i.canvasRenderer.drawEmptyLabel(i)}finally{i.canvasEngine.endFrame()}}s.canvasFocusMainRedraw=!!o,i.canvasEngine.withOverlay(l=>{i.canvasRenderer.withContext(l,()=>{i.canvasRenderer.drawFocus(i,t)}),i.canvasAxisRenderer.withContext(l,()=>{i.canvasAxisRenderer.drawFocusedXAxisTick(i,t),e&&i.canvasAxisRenderer.drawAxisTooltip(i,e)})})},renderCanvasAxisTooltip(t){const e=this;e.canvasEngine.withOverlay(n=>{e.canvasAxisRenderer.withContext(n,()=>{e.canvasAxisRenderer.drawAxisTooltip(e,t)})})},clearCanvasFocus(){var t;const e=this;e.state.canvasFocusMainRedraw?(e.state.canvasFocusMainRedraw=!1,e.renderCanvasFrame(void 0,null,!1)):(t=e.canvasEngine)==null||t.clearOverlay()},resizeCanvas(){var t,e;const n=this,{config:r,state:i,$el:s}=n,o=s.chart.node();n.clearResizePreview(),s.chart.style("min-height",`${i.current.height}px`),(t=n.canvasEngine)==null||t.resize(i.current.width,n.getCanvasSurfaceHeight()),(e=n.canvasTheme)==null||e.reload(o,r.canvas_theme)}};let dg=()=>(xn(br.prototype,HE),(dg=()=>"canvas")());var hg={category(t,e){const n=this.internal,{config:r}=n;return arguments.length>1&&(r.axis_x_categories[t]=e,n.state.dirty.data=!0,n.redraw()),r.axis_x_categories[t]},categories(t){const e=this.internal,{config:n}=e;if(!t||!Array.isArray(t)){const r=n.axis_x_categories;return lr(r)?Object.values(e.data.xs)[0]:r}return n.axis_x_categories=t,e.state.dirty.data=!0,e.redraw(),n.axis_x_categories}};function YE(t){const e=this.config;let n,r,i;const s=()=>{const o=r.shift();if(o&&n&&Kn(n)&&o in n)return n=n[o],s();if(!o)return n};Object.keys(e).forEach(o=>{n=t,r=o.split("_"),i=s(),sn(i)&&(e[o]=i)}),this.api&&(this.state.orgConfig=t)}var KE={resize(t){const e=this.internal,{config:n,state:r}=e;r.rendered&&(n.size_width=t?t.width:null,n.size_height=t?t.height:null,r.resizing=!0,r.dirty.size=!0,this.flush(!1),e.resizeFunction())},flush(t){var e,n;const r=this.internal,{state:i,$el:{zoomResetBtn:s}}=r;i.rendered?(i.resizing?(e=r.brush)==null||e.updateResize():(n=r.axis)==null||n.setOrient(),s==null||s.style("display","none"),r.scale.zoom&&(i.current.zoomDomain=r.scale.zoom.domain()),r.scale.zoom=null,i.resizing||(i.dirty.data=!0),t?r.redraw({withTransform:!0,withUpdateXDomain:!0,withUpdateOrgXDomain:!0,withLegend:!0}):r.updateAndRedraw({withLegend:!0,withTransition:!1,withTransitionForTransform:!1}),!i.resizing&&r.brush&&(r.brush.getSelection().call(r.brush.move),r.unselectRect()),i.current.zoomDomain&&(r.api.zoom(i.current.zoomDomain),i.current.zoomDomain=null)):r.initToRender(!0)},destroy(){var t,e,n,r,i,s,o,l,c,u,f,d;const h=this.internal,{state:m,$el:{chart:S,style:E,svg:C}}=h;if(vn(h)){h.callPluginHook("$willDestroy"),(t=h.cache)==null||t.remove(["setOverOut","callOverOutForTouch"]),h.charts.splice(h.charts.indexOf(this),1),h.charts.length===0&&ib(),h.unbindAllEvents(),C==null||C.select("*").interrupt(),m.canvasFlowFrame!==null&&((n=(e=se).cancelAnimationFrame)==null||n.call(e,m.canvasFlowFrame)),m.canvasFlowFrame=null,m.canvasFlowFinish=null,m.pendingRaf!==null&&((i=(r=se).cancelAnimationFrame)==null||i.call(r,m.pendingRaf)),m.pendingRaf=null,(s=h.canvasRenderer)==null||s.destroy(),(o=h.canvasEngine)==null||o.destroy(),(l=h.resizeFunction)==null||l.clear(),(u=(c=h.resizeFunction)==null?void 0:c.clearLive)==null||u.call(c),(d=(f=h.resizeFunction)==null?void 0:f.resizeObserver)==null||d.disconnect(),h.resizeFunction&&se.removeEventListener("resize",h.resizeFunction),S.classed("bb",!1).style("position",null),m.isCanvasMode&&S.style("min-height",m.canvasInlineStyle.minHeight||null),S.selectChildren().remove(),E&&E.parentNode.removeChild(E),Object.keys(this).forEach(w=>{w==="internal"&&Object.keys(h).forEach($=>{h[$]=null}),this[w]=null,delete this[w]});for(const w in this)this[w]=()=>{}}return null},config(t,e,n){const r=this.internal,{config:i,state:s}=r,o=t==null?void 0:t.replace(/\./g,"_");let l;return t&&o in i?sn(e)?(i[o]=e,l=e,n&&this.flush()):l=i[o]:(arguments.length===0||lr(t))&&(l=s.orgConfig),l}},ZE={color(t){return this.internal.color(t)}};const vg=function(t){const{targets:e}=this.internal.data;if(!mn(t)){const n=qe(t)?t:[t];return e.filter(r=>n.some(i=>i===r.id))}return e};xn(vg,{shown:function(t){return this.internal.filterTargetsToShow(this.data(t))},values:function(t,e=!0){let n=null;if(t){const r=this.data(t);qe(r)&&(n=[],r.forEach(i=>{e?i.values.forEach(s=>n.push(s.value)):n.push(i.values.map(s=>s.value))}))}return n},names:function(t){return this.internal.updateDataAttributes("names",t)},colors:function(t){return this.internal.updateDataAttributes("colors",t)},axes:function(t){return this.internal.updateDataAttributes("axes",t)},min:function(){return this.internal.getMinMaxData().min},max:function(){return this.internal.getMinMaxData().max}});var JE={data:vg},QE={focus(t){var e;const n=this.internal,{state:r}=n,i=n.mapToTargetIds(t);if(r.isCanvasMode){const o=i.filter(n.isTargetToShow,n),l=new Set(o),c=n.mapToTargetIds().filter(u=>!l.has(u)&&n.isTargetToShow(u));n.revertLegend(),n.toggleFocusLegend(c,!1),n.toggleFocusLegend(o,!0),r.focusedTargetIds=l,r.defocusedTargetIds=new Set(c),(e=n.renderCanvasFrame)==null||e.call(n,void 0,null,!1);return}const s=n.$el.svg.selectAll(n.selectorTargets(i.filter(n.isTargetToShow,n)));this.revert(),this.defocus(),s.classed(nn.focused,!0).classed(nn.defocused,!1),n.hasArcType()&&!r.hasRadar&&(n.expandArc(i),n.hasType("gauge")&&n.markOverlapped(t,n,`.${ar.gaugeValue}`)),n.toggleFocusLegend(i,!0),r.focusedTargetIds=new Set(i),i.forEach(o=>r.defocusedTargetIds.delete(o))},defocus(t){var e;const n=this.internal,{state:r}=n,i=n.mapToTargetIds(t);if(r.isCanvasMode){const o=i.filter(n.isTargetToShow,n);n.toggleFocusLegend(o,!1),o.forEach(l=>r.focusedTargetIds.delete(l)),r.defocusedTargetIds=new Set(o),(e=n.renderCanvasFrame)==null||e.call(n,void 0,null,!1);return}n.$el.svg.selectAll(n.selectorTargets(i.filter(n.isTargetToShow,n))).classed(nn.focused,!1).classed(nn.defocused,!0),n.hasArcType(null,["polar"])&&(n.unexpandArc(i),n.hasType("gauge")&&n.undoMarkOverlapped(n,`.${ar.gaugeValue}`)),n.toggleFocusLegend(i,!1),i.forEach(o=>r.focusedTargetIds.delete(o)),r.defocusedTargetIds=new Set(i)},revert(t){var e,n,r;const i=this.internal,{config:s,state:o,$el:l}=i,c=i.mapToTargetIds(t),u=()=>{s.legend_show&&(i.showLegend(c.filter(i.isLegendToShow.bind(i))),l.legend.selectAll(i.selectorLegends(c)).filter(function(){return Yt(this).classed(nn.legendItemFocused)}).classed(nn.legendItemFocused,!1))};if(o.isCanvasMode){const d=!!((e=o.focusedTargetIds)!=null&&e.size)||!!((n=o.defocusedTargetIds)!=null&&n.size);u(),o.focusedTargetIds=new Set,o.defocusedTargetIds=new Set,d&&((r=i.renderCanvasFrame)==null||r.call(i,void 0,null,!1));return}l.svg.selectAll(i.selectorTargets(c)).classed(nn.focused,!1).classed(nn.defocused,!1),i.hasArcType(null,["polar"])&&i.unexpandArc(c),u(),o.focusedTargetIds=new Set,o.defocusedTargetIds=new Set}},_E={legend:{show:function(t){const e=this.internal;e.showLegend(e.mapToTargetIds(t)),e.updateAndRedraw({withLegend:!0})},hide:function(t){const e=this.internal;e.hideLegend(e.mapToTargetIds(t)),e.updateAndRedraw({withLegend:!0})}}},qE={load(t){const e=this.internal,{config:n}=e;e.state.dirty.data=!0,e.state._eventRectFingerprint=null,t.xs&&e.addXs(t.xs),"names"in t&&this.data.names(t.names),"classes"in t&&Object.keys(t.classes).forEach(s=>{n.data_classes[s]=t.classes[s]}),"categories"in t&&e.axis.isCategorized()&&(n.axis_x_categories=t.categories),"axes"in t&&Object.keys(t.axes).forEach(s=>{n.data_axes[s]=t.axes[s]}),"colors"in t&&Object.keys(t.colors).forEach(s=>{n.data_colors[s]=t.colors[s]}),"regions"in t&&(n.data_regions=t.regions||{});const r=["data","columns","rows","json","url"].some(s=>s in t),i="unload"in t&&t.unload!==!1;if("regions"in t&&!r&&!i){e.redraw({withUpdateOrgXDomain:!0,withUpdateXDomain:!0,withLegend:!0}),Eo.call(e,t.done,t.resizeAfter);return}if(i){const s=e.mapToTargetIds(t.unload===!0?null:t.unload);e.unload(s,()=>{!e.config||!e.cache||(e.cache.remove(s),Bf(()=>e.loadFromArgs(t)))})}else e.loadFromArgs(t)},unload(t){const e=this.internal;let n=t||{};lr(n)&&this.tooltip.hide(),qe(n)?n={ids:n}:je(n)&&(n={ids:[n]});const r=e.mapToTargetIds(n.ids);e.state.dirty.data=!0,e.state._eventRectFingerprint=null,e.unload(r,()=>{!e.config||!e.cache||(e.redraw({withUpdateOrgXDomain:!0,withUpdateXDomain:!0,withLegend:!0}),e.cache.remove(r),Eo.call(e,n.done,n.resizeAfter))})}};function Qo(t,e,n,r=!1){var i;const s=this.internal,o=s.mapToTargetIds(e),l=new Set(o),c=[...s.state.hiddenTargetIds].filter(d=>l.has(d));if(s.state.toggling=!0,s.state.dirty.visibility=!0,s[`${t?"remove":"add"}HiddenTargetIds`](o),s.state.isCanvasMode){t&&c.length?Ne(s.config.data_onshown,this,c):!t&&c.length===0&&Ne((i=s.config)==null?void 0:i.data_onhidden,this,o),r||s.redraw({withUpdateOrgXDomain:!0,withUpdateXDomain:!0,withLegend:!0}),s.state.toggling=!1;return}const u=s.$el.svg.selectAll(s.selectorTargets(o)),f=t?null:"0";t&&c.length&&(u.style("display",null),Ne(s.config.data_onshown,this,c)),s.$T(u).style("opacity",f,"important").call(eo,()=>{var d;!t&&c.length===0&&(u.style("display","none"),Ne((d=s.config)==null?void 0:d.data_onhidden,this,o)),u.style("opacity",f)}),n.withLegend&&s[`${t?"show":"hide"}Legend`](o),r||s.redraw({withUpdateOrgXDomain:!0,withUpdateXDomain:!0,withLegend:!0}),s.state.toggling=!1}var tC={show(t,e={}){Qo.call(this,!0,t,e)},hide(t,e={}){Qo.call(this,!1,t,e)},toggle(t,e={}){const n=this.internal,r={show:[],hide:[]};n.mapToTargetIds(t).forEach(i=>r[n.isTargetToShow(i)?"hide":"show"].push(i)),r.show.length&&r.hide.length?(Qo.call(this,!0,r.show,e,!0),Qo.call(this,!1,r.hide,e)):(r.show.length&&this.show(r.show,e),r.hide.length&&this.hide(r.hide,e))}},eC={tooltip:{show:function(t){var e,n,r,i,s,o,l,c,u,f,d,h;const m=this.internal,{$el:S,config:E,state:{eventReceiver:C,hasFunnel:w,hasTreemap:$,inputType:z}}=m;let B,W;if(t.mouse&&(W=t.mouse),t.data){const{data:H}=t,_=(e=m.getYScaleById(H.id))==null?void 0:e(H.value);if((w||$)&&H.id){const q=m.selectorTarget(H.id,void 0,`.${Tn.shape}`);C.rect=S.main.select(q)}else m.isMultipleX()?W=[m.xx(H),_]:(E.tooltip_grouped||(W=[0,_]),B=(r=H.index)!=null?r:m.hasArcType()&&H.id?(n=m.getArcElementByIdOrIndex(H.id))==null?void 0:n.datum().index:m.getIndexByX(H.x))}else sn(t.x)?B=m.getIndexByX(t.x):sn(t.index)&&(B=t.index);if(m.state.isCanvasMode){const H=((i=m.filterTargetsToShow)==null?void 0:i.call(m))||m.data.targets,_=(s=t.data)!=null&&s.id&&!E.tooltip_grouped?H.filter(ct=>ct.id===t.data.id).map(ct=>ct.values[B!=null?B:t.data.index]).filter(Boolean):H.map(ct=>ct.values[B]).filter(Boolean),q=(l=(o=S.canvas)==null?void 0:o.node)==null?void 0:l.call(o),st=m.state.canvasShape||((c=m.getDrawShape)==null?void 0:c.call(m)),it=_[0],ot=W||(it&&((u=st==null?void 0:st.pos)!=null&&u.cx)&&((f=st==null?void 0:st.pos)!=null&&f.cy)?[m.state.margin.left+st.pos.cx(it),m.state.margin.top+st.pos.cy(it)]:void 0);if(!_.length||!q)return;m.state.canvasFocusKey=_.map(ct=>`${ct.id}:${ct.index}`).join("|"),(d=m.renderCanvasFocus)==null||d.call(m,_,ot),(h=m.showTooltip)==null||h.call(m,_,q);return}(z==="mouse"?["mouseover","mousemove"]:["touchstart"]).forEach(H=>{m.dispatchEvent(H,B,W)})},hide:function(){var t,e,n,r,i;const s=this.internal,{state:{inputType:o,isCanvasMode:l},$el:{tooltip:c}}=s,u=c==null?void 0:c.datum();if(l){s.state.canvasFocusKey=null,s.hideTooltip(!0),(t=s.clearCanvasFocus)==null||t.call(s);return}if((e=u==null?void 0:u.data)!=null&&e[0]){const{index:f}=u.data[0];(o==="mouse"?["mouseout"]:["touchend"]).forEach(d=>{s.dispatchEvent(d,f)})}o==="touch"&&s.callOverOutForTouch(),s.hideTooltip(!0),(n=s.hideGridFocus)==null||n.call(s),(r=s.unexpandCircles)==null||r.call(s),(i=s.expandBarTypeShapes)==null||i.call(s,!1)}}},nC=Object.defineProperty,rC=(t,e,n)=>e in t?nC(t,e,{enumerable:!0,configurable:!0,writable:!0,value:n}):t[e]=n,gg=(t,e,n)=>rC(t,typeof e!="symbol"?e+"":e,n);class jn{constructor(e){gg(this,"plugins",[]),gg(this,"internal");const n=new br(this);this.internal=n,(function r(i,s,o){Object.keys(i).forEach(l=>{const c=ie(i[l]),u=s!==o,f=vn(i[l]),d=f&&Object.keys(i[l]).length>0;c&&(!u&&d||u)?s[l]=i[l].bind(o):f&&!c?s[l]={}:s[l]=i[l],d&&r(i[l],s[l],o)})})(jn.prototype,this,this),YE.call(n,e),n.beforeInit(),n.init()}}xn(jn.prototype,[KE,ZE,JE,QE,_E,qE,tC,eC]);let pg=()=>(jn.prototype.category=hg.category,jn.prototype.categories=hg.categories,(pg=()=>({}))());const aC=t=>{var e,n;return(n=(e=se).btoa)==null?void 0:n.call(e,encodeURIComponent(t).replace(/%([0-9A-F]{2})/g,(r,i)=>String.fromCharCode(+`0x${i}`)))};function iC(t,e,n){const{width:r,height:i}=e||n,s=new XMLSerializer,o=t.cloneNode(!0),l=V1(Oa(Ye.styleSheets)).filter(h=>h.cssText).map(h=>h.cssText);o.setAttribute("xmlns",_t.xhtml),o.style.margin="0",o.style.padding="0",e.preserveFontStyle&&o.querySelectorAll("text").forEach(h=>{h.innerHTML=""});const c=s.serializeToString(o),u=Ye.createElement("style");u.appendChild(Ye.createTextNode(l.join(`
`)));const f=s.serializeToString(u),d=`<svg xmlns="${_t.svg}" width="${r}" height="${i}"
viewBox="0 0 ${n.width} ${n.height}"
preserveAspectRatio="${(e==null?void 0:e.preserveAspectRatio)===!1?"none":"xMinYMid meet"}">
<foreignObject width="100%" height="100%">
${f}
${c.replace(/(url\()[^#]+/g,"$1")}
</foreignObject></svg>`;return`data:image/svg+xml;base64,${aC(d)}`}function sC(t,e){const{top:n,left:r}=e,{x:i,y:s}=ha(t,!0),{a:o,b:l,c,d:u,e:f,f:d}=t.getScreenCTM(),{width:h,height:m}=ln(t,!0);return{x:o*i+c*s+f-r,y:l*i+u*s+d-n+(m-Math.round(m/4)),width:h,height:m}}function oC(t){const{left:e,top:n}=ln(t),r=s=>s.textContent||s.childElementCount,i=[];return Oa(t.querySelectorAll("text")).filter(r).forEach(s=>{const o=l=>{const{fill:c,fontFamily:u,fontSize:f,textAnchor:d,transform:h}=se.getComputedStyle(l),{x:m,y:S,width:E,height:C}=sC(l,{left:e,top:n});return{[l.textContent]:{x:m,y:S,width:E,height:C,fill:c,fontFamily:u,fontSize:f,textAnchor:d,transform:h}}};s.childElementCount>1?Oa(s.querySelectorAll("tspan")).filter(r).forEach(l=>{i.push(o(l))}):i.push(o(s))}),i}function lC(t,e){e.forEach(n=>{Object.keys(n).forEach(r=>{const{x:i,y:s,width:o,height:l,fill:c,fontFamily:u,fontSize:f,transform:d}=n[r];if(t.save(),t.font=`${f} ${u}`,t.fillStyle=c,d==="none")t.fillText(r,i,s);else{const h=d.replace(/(matrix|\(|\))/g,"").split(",");h.splice(4).every(m=>+m==0)?(h.push(i+o-o/4),h.push(s-l+l/3)):(h.push(i),h.push(s)),t.transform(...h),t.fillText(r,0,0)}t.restore()})})}function cC(t,e,n){const{width:r,height:i}=e||n,s=Ye.createElement("canvas"),o=s.getContext("2d");if(s.width=r,s.height=i,o){let c=0,u=r,f=i;if((e==null?void 0:e.preserveAspectRatio)!==!1){const d=Math.min(r/n.width,i/n.height);u=n.width*d,f=n.height*d,c=(i-f)/2}o.drawImage(t,0,0,t.width,t.height,0,c,u,f)}return s.toDataURL(e.mimeType)}var uC={export(t,e){var n;const r=this.internal,{state:i,$el:{chart:s,svg:o}}=r,l=(n=r.canvasEngine)==null?void 0:n.canvas,c=i.isCanvasMode&&l?ln(l,!0):null,{width:u,height:f}=c&&c.width&&c.height?{width:c.width,height:c.height}:i.current,d=Xr(Object.create(null),{width:u,height:f,preserveAspectRatio:!0,preserveFontStyle:!1,mimeType:"image/png"},t);if(i.isCanvasMode&&l){const S=cC(l,d,{width:u,height:f});return e==null||e.bind(this)(S),S}const h=iC(s.node(),d,{width:u,height:f}),m=d.preserveFontStyle?oC(o.node()):[];if(e&&ie(e)){const S=new Image;S.crossOrigin="Anonymous",S.onload=()=>{const E=Ye.createElement("canvas"),C=E.getContext("2d");E.width=d.width||u,E.height=d.height||f,C.drawImage(S,0,0),m.length&&(lC(C,m),m.length=0),e.bind(this)(E.toDataURL(d.mimeType))},S.src=h}return h}};let mg=()=>(jn.prototype.export=uC.export,(mg=()=>({}))());var fC={flow(t){const e=this.internal;let n;(t.json||t.rows||t.columns)&&e.convertData(t,i=>{n=i,r()});function r(){var i,s,o;let l,c=0,u=0,f,d;if(e.state.redrawing||!n||!os())return;(i=e.flushCanvasFlow)==null||i.call(e);const h=[],m=e.getMaxDataCount(),S=e.convertDataToTargets(n,!0),E=e.axis.isTimeSeries();e.data.targets.forEach($=>{let z=!1;for(let B=0;B<S.length;B++)if($.id===S[B].id){z=!0,$.values[$.values.length-1]&&(u=$.values[$.values.length-1].index+1);const W=S[B].values;c=W.length;for(let H=0;H<c;H++)W[H].index=u+H,E||(W[H].x=u+H),$.values.push(W[H]);S.splice(B,1);break}!z&&h.push($.id)}),e.data.targets.forEach($=>{for(let z=0;z<h.length;z++)if($.id===h[z]){if(!$.values[$.values.length-1])continue;u=$.values[$.values.length-1].index+1;for(let B=0;B<c;B++)$.values.push({id:$.id,index:u+B,x:E?e.getOtherTargetX(u+B):u+B,value:null})}}),e.data.targets.length&&S.forEach($=>{const z=e.data.targets[0].values[0].index,B=$.values,W=B.length,H=Math.max(u-z,0);if(H){B.length=W+H;for(let _=W-1;_>=0;_--)B[_+H]=B[_];for(let _=0;_<H;_++){const q=z+_;B[_]={id:$.id,index:q,x:E?e.getOtherTargetX(q):q,value:null}}}for(let _=H;_<B.length;_++){const q=B[_];q.index+=u,E||(q.x+=u)}});for(let $=0;$<S.length;$++)e.data.targets.push(S[$]);const C=e.data.targets[0],w=C.values[0];if(sn(t.to)?(c=0,d=E?Wn.call(e,t.to):t.to,C.values.forEach($=>{$.x<d&&c++})):sn(t.length)&&(c=t.length),m?m===1&&E&&(f=(C.values[C.values.length-1].x-w.x)/2,l=[new Date(+w.x-f),new Date(+w.x+f)]):(E?f=C.values.length>1?C.values[C.values.length-1].x-w.x:w.x-e.getXDomain(e.data.targets)[0]:f=1,l=[w.x-f,w.x]),l&&e.updateXDomain(null,!0,!0,!1,l),e.state.isCanvasMode){const $=Ge(t.duration)?t.duration:e.config.transition_duration;if((s=e.animateCanvasFlow)==null?void 0:s.call(e,{done:t.done,duration:$,length:c,orgDataCount:m}))return;c&&m&&e.data.targets.forEach(B=>{B.values.splice(0,c)}),e.state.dirty.data=!0,e.state._eventRectFingerprint=null,e.redraw({withLegend:!0,withTransition:!1,withTrimXDomain:!1,withUpdateOrgXDomain:!0,withUpdateXAxis:!0,withUpdateXDomain:!0}),e.updateTypesElements(),(o=t.done)==null||o.call(e.api);return}e.updateTargets(e.data.targets),e.state.dirty.data=!0,e.state._eventRectFingerprint=null,e.redraw({flow:{index:w.index,length:c,duration:Ge(t.duration)?t.duration:e.config.transition_duration,done:t.done,orgDataCount:m},withLegend:!0,withTransition:m>1,withTrimXDomain:!1,withUpdateXAxis:!0})}}},dC={generateFlow(t){const e=this,{data:n,state:r,$el:i}=e;return function(){var s;const o=t.flow.length;r.flowing=!0,n.targets.forEach(c=>{c.values.splice(0,o)}),r.dataGeneration++,e.updateXGrid&&e.updateXGrid(!0);const l={};["axis.x","grid.x","gridLines.x","region.list","text","bar","line","area","circle"].forEach(c=>{const u=c.split(".");let f=i[u[0]];f&&u.length>1&&(f=f[u[1]]),f!=null&&f.size()&&(l[c]=f)}),(s=e.hideGridFocus)==null||s.call(e),e.setFlowList(l,t)}},setFlowList(t,e){const n=this,{flow:r,targets:i}=e,{duration:s=e.duration,index:o,length:l,orgDataCount:c}=r,u=n.getFlowTransform(i,c,o,l),f=Mh();let d;f.add(Object.keys(t).map(h=>(d=t[h].transition().ease(m=>+m).duration(s),h==="axis.x"?d=d.call(m=>{n.axis.x.setTransition(m).create(m)}):h==="region.list"?d=d.filter(n.isRegionOnX).attr("transform",u):d=d.attr("transform",u),d))),d.call(f,()=>{n.cleanUpFlow(t,e)})},cleanUpFlow(t,e){const n=this,{config:r,state:i,$el:{svg:s}}=n,o=r.axis_rotated,{flow:l,shape:c,xv:u}=e,{cx:f,cy:d,xForText:h,yForText:m}=c.pos,{done:S=()=>{},length:E}=l;E&&(["circle","text","shape","eventRect"].forEach(C=>{const w=[];for(let $=0;$<E;$++)w.push(`.${Re[C]}-${$}`);s.selectAll(`.${Re[`${C}s`]}`).selectAll(w).remove()}),s.select(`.${Re.xgrid}`).remove()),Object.keys(t).forEach(C=>{const w=t[C];if(C!=="axis.x"&&w.attr("transform",null),C==="grid.x")w.attr(i.xgridAttr);else if(C==="gridLines.x")w.attr("x1",o?0:u).attr("x2",o?i.width:u),w.select("text").attr("x",o?i.width:0).attr("y",u);else if(/^(area|bar|line)$/.test(C))w.attr("d",c.type[C]);else if(C==="text")w.attr("x",h).attr("y",m).style("fill-opacity",n.opacityForText.bind(n));else if(C==="circle")if(n.isCirclePoint())w.attr("cx",f).attr("cy",d);else{const $=B=>f(B)-r.point_r,z=B=>d(B)-r.point_r;w.attr("x",$).attr("y",z)}else C==="region.list"&&w.select("rect").filter(n.isRegionOnX).attr("x",n.regionX.bind(n)).attr("width",n.regionWidth.bind(n))}),r.interaction_enabled&&n.redrawEventRect(),S.call(n.api),i.flowing=!1},getFlowTransform(t,e,n,r){const i=this,{data:s,scale:{x:o}}=i,l=s.targets[0].values;let c=i.getValueOnIndex(l,n),u=i.getValueOnIndex(l,n+r),f;const d=o.domain(),h=i.updateXDomain(t,!0,!0);e?e===1||(c==null?void 0:c.x)===(u==null?void 0:u.x)?f=o(d[0])-o(h[0]):f=i.axis.isTimeSeries()?o(d[0])-o(h[0]):o((c==null?void 0:c.x)||0)-o(u.x):l.length!==1?f=o(d[0])-o(h[0]):i.axis.isTimeSeries()?(c=i.getValueOnIndex(l,0),u=i.getValueOnIndex(l,l.length-1),f=o(c.x)-o(u.x)):f=wa(h)/2;const m=wa(d)/wa(h);return`translate(${f},0) scale(${m},1)`}};let xg=()=>(xn(br.prototype,dC),jn.prototype.flow=fC.flow,(xg=()=>({}))());function yg(t){return Array.isArray(t)?t:[t]}function Tg(t){var e;t.state.canvasShape=null,(e=t.renderCanvasFrame)==null||e.call(t,void 0,null,!1)}function hu(t,e){const n=this.internal,{config:r}=n,i=r.transition_duration&&os(),s=`grid_${e}_lines`;return t?(r[s]=yg(t),n.state.isCanvasMode?(Tg(n),r[s]):(n.updateGrid(),n.redrawGrid(i),r[s])):r[s]}function bg(t,e){const n=`grid_${e}_lines`;return hu.bind(this)(this.internal.config[n].concat(t?yg(t):[]),e)}function Sg(t,e){var n;const r=this.internal;if(r.state.isCanvasMode){const i=((n=r.getGridFilterToRemove)==null?void 0:n.call(r,t))||(()=>!0),s=`grid_${e?"x":"y"}_lines`;r.config[s]=r.config[s].filter(o=>!i(o)),Tg(r);return}r.removeGridLines(t,e)}const Ag=function(t){return hu.bind(this)(t,"x")};xn(Ag,{add(t){return bg.bind(this)(t,"x")},remove(t){return Sg.bind(this)(t,!0)}});const Eg=function(t){return hu.bind(this)(t,"y")};xn(Eg,{add(t){return bg.bind(this)(t,"y")},remove(t){return Sg.bind(this)(t,!1)}});var Cg={xgrids:Ag,ygrids:Eg};const hC=`line.${nn.xgridFocus}:not(.${nn.xgridFocusContinuous}), line.${nn.ygridFocus}`,vC=t=>Ge(t.position)||"end",gC=t=>t.position==="start"?4:t.position==="middle"?0:-4;function Ig(t){var e;const{state:n,$el:{main:r}}=t,i=n._gridFocusEl,s=r.node(),o=((e=i==null?void 0:i.nodes)==null?void 0:e.call(i))||[];return o.length&&o.every(l=>s==null?void 0:s.contains(l))?i:n._gridFocusEl=r.selectAll(hC)}function Rg(t){t.$el.main.select(`line.${nn.xgridFocusContinuous}`).style("visibility","hidden")}function wg(t,e,n){return r=>{let i=t?0:e;return r.position==="start"?i=t?-n:0:r.position==="middle"&&(i=(t?-n:e)/2),i}}function Og(t,e){e==="grid"&&t.each(function(){const n=Yt(this);["x1","x2","y1","y2"].forEach(r=>n.attr(r,+n.attr(r)))})}var pC={hasGrid(){const{config:t}=this;return["x","y"].some(e=>t[`grid_${e}_show`]||t[`grid_${e}_lines`].length)},initGrid(){const t=this;t.hasGrid()&&t.initGridLines(),t.initFocusGrid()},initGridLines(){const t=this,{config:e,state:{clip:n},$el:r}=t;(e.grid_x_lines.length||e.grid_y_lines.length)&&(r.gridLines.main=r.main.insert("g",`.${ze.chart}${e.grid_lines_front?" + *":""}`).attr("clip-path",n.pathGrid).attr("class",`${yn.grid} ${yn.gridLines}`),r.gridLines.main.append("g").attr("class",yn.xgridLines),r.gridLines.main.append("g").attr("class",yn.ygridLines),r.gridLines.x=Ev([]))},updateXGrid(t){const e=this,{config:n,scale:r,state:i,$el:{main:s,grid:o}}=e,l=n.axis_rotated,c=e.generateGridData(n.grid_x_type,r.x),u=e.axis.isCategorized()?e.axis.x.tickOffset():0,f=d=>(r.zoom||r.x)(d)+u*(l?-1:1);i.xgridAttr=l?{x1:0,x2:i.width,y1:f,y2:f}:{x1:f,x2:f,y1:0,y2:i.height},o.x=s.select(`.${yn.xgrids}`).selectAll(`.${yn.xgrid}`).data(c),o.x.exit().remove(),o.x=o.x.enter().append("line").attr("class",yn.xgrid).merge(o.x),t||o.x.each(function(){const d=Yt(this);Object.keys(i.xgridAttr).forEach(h=>{d.attr(h,i.xgridAttr[h])}),d.style("opacity",()=>+d.attr(l?"y1":"x1")===(l?i.height:0)?"0":null)})},updateYGrid(){const t=this,{axis:e,config:n,scale:r,state:i,$el:{grid:s,main:o}}=t,l=n.axis_rotated,c=d=>r.y(d),u=e.y.getGeneratedTicks(n.grid_y_ticks),f=u!=null&&u.length?u:t.scale.y.ticks(n.grid_y_ticks);s.y=o.select(`.${yn.ygrids}`).selectAll(`.${yn.ygrid}`).data(f),s.y.exit().remove(),s.y=s.y.enter().append("line").attr("class",yn.ygrid).merge(s.y),s.y.attr("x1",l?c:0).attr("x2",l?c:i.width).attr("y1",l?0:c).attr("y2",l?i.height:c),Og(s.y,"grid")},updateGrid(){const t=this,{$el:{grid:e,gridLines:n}}=t;!n.main&&t.initGridLines(),e.main.style("visibility",t.hasArcType()?"hidden":null),t.hideGridFocus(),t.updateGridLines("x"),t.updateGridLines("y")},updateGridLines(t){const e=this,{config:n,$el:{gridLines:r,main:i},$T:s}=e,o=n.axis_rotated,l=t==="x";n[`grid_${t}_show`]&&e[`update${t.toUpperCase()}Grid`]();let c=i.select(`.${yn[`${t}gridLines`]}`).selectAll(`.${yn[`${t}gridLine`]}`).data(n[`grid_${t}_lines`]);s(c.exit()).style("opacity","0").remove();const u=c.enter().append("g");u.append("line").style("opacity","0"),c=u.merge(c),c.each(function(f){const d=Yt(this);d.select("text").empty()&&f.text&&d.append("text").style("opacity","0")}),s(c.attr("class",f=>`${yn[`${t}gridLine`]} ${f.class||""}`.trim()).select("text").attr("text-anchor",vC).attr("transform",()=>l?o?null:"rotate(-90)":o?"rotate(-90)":null).attr("dx",gC).attr("dy",-5)).text(function(f){var d;return(d=f.text)!=null?d:this.remove()}),r[t]=c},redrawGrid(t){const e=this,{config:{axis_rotated:n},state:{width:r,height:i},$el:{gridLines:s},$T:o}=e,l=e.xv.bind(e),c=e.yv.bind(e);let u=s.x.select("line"),f=s.x.select("text"),d=s.y.select("line"),h=s.y.select("text");return u=o(u,t).attr("x1",n?0:l).attr("x2",n?r:l).attr("y1",n?l:0).attr("y2",n?l:i),f=o(f,t).attr("x",wg(!n,r,i)).attr("y",l),d=o(d,t).attr("x1",n?c:0).attr("x2",n?c:r).attr("y1",n?0:c).attr("y2",n?i:c),h=o(h,t).attr("x",wg(n,r,i)).attr("y",c),[u.style("opacity",null),f.style("opacity",null),d.style("opacity",null),h.style("opacity",null)]},initFocusGrid(){const t=this,{config:e,state:n,state:{clip:r},$el:i}=t;n._gridFocusEl=null;const s=e.grid_front,o=`.${s&&i.gridLines.main?yn.gridLines:ze.chart}${s?" + *":""}`,l=i.main.insert("g",o).attr("clip-path",r.pathGrid).attr("class",yn.grid);if(i.grid.main=l,e.grid_x_show&&l.append("g").attr("class",yn.xgrids),e.grid_y_show&&l.append("g").attr("class",yn.ygrids),e.axis_tooltip){const c=l.append("g").attr("class","bb-axis-tooltip");c.append("line").attr("class","bb-axis-tooltip-x"),c.append("line").attr("class","bb-axis-tooltip-y")}e.interaction_enabled&&e.grid_focus_show&&!e.axis_tooltip&&(l.append("g").attr("class",nn.xgridFocus).append("line").attr("class",nn.xgridFocus),e.grid_focus_y&&!e.tooltip_grouped&&l.append("g").attr("class",nn.ygridFocus).append("line").attr("class",nn.ygridFocus),e.subchart_grid_focus_continuous&&e.subchart_grid_focus!==!1&&i.main.insert("g",o).attr("class",nn.xgridFocusContinuous).append("line").attr("class",`${nn.xgridFocus} ${nn.xgridFocusContinuous}`).style("visibility","hidden"))},showAxisGridFocus(){var t,e;const n=this,{config:r,format:i,state:{event:s,width:o,height:l}}=n,c=r.axis_rotated,[u,f]=Jn(s,(t=n.$el.eventRect)==null?void 0:t.node()),d={x:u,y:f};for(const[h,m]of Object.entries(n.$el.axisTooltip)){const S=h==="x"&&!c||h!=="x"&&c?"x":"y",E=d[S];let C=(e=n.scale[h])==null?void 0:e.invert(E);C&&(C=h==="x"&&n.axis.isTimeSeries()?i.xAxisTick(C):C==null?void 0:C.toFixed(2),m==null||m.attr(S,E).text(C))}n.$el.main.selectAll("line.bb-axis-tooltip-x, line.bb-axis-tooltip-y").style("visibility",null).each(function(h,m){const S=Yt(this);m===0?S.attr("x1",u).attr("x2",u).attr("y1",m?0:l).attr("y2",m?l:0):S.attr("x1",m?0:o).attr("x2",m?o:0).attr("y1",f).attr("y2",f)})},hideAxisGridFocus(){const t=this;t.$el.main.selectAll(`line.${Rn.axisTooltipX}, line.${Rn.axisTooltipY}`).style("visibility","hidden"),Object.values(t.$el.axisTooltip).forEach(e=>e==null?void 0:e.style("display","none"))},showGridFocus(t){var e;const n=this,{config:r,state:{width:i,height:s}}=n,o=r.axis_rotated,l=Ig(n),c=(t||[l.datum()]).filter(d=>d&&Ge(n.getBaseValue(d)));if(!r.tooltip_show||c.length===0||!r.axis_x_forceAsSingle&&n.hasType("bubble")||n.hasArcType())return;const u=r.grid_focus_edge&&!r.tooltip_grouped,f=n.xx.bind(n);l.style("visibility",null).data(c.concat(c)).each(function(d){const h=Yt(this),m={x:f(d),y:n.getYScaleById(d.id)(d.value)};let S;if(h.classed(nn.xgridFocus))S=o?[null,m.x,u?m.y:i,m.x]:[m.x,u?m.y:null,m.x,s];else{const E=n.axis.getId(d.id)==="y2";S=o?[m.y,u&&!E?m.x:null,m.y,u&&E?m.x:s]:[u&&E?m.x:null,m.y,u&&!E?m.x:i,m.y]}["x1","y1","x2","y2"].forEach((E,C)=>h.attr(E,S[C]))}),Og(l,"grid"),(e=n.showCircleFocus)==null||e.call(n,t)},hideGridFocus(t=!1){var e;const n=this,{state:{inputType:r,resizing:i}}=n;(t||r==="mouse"||!i)&&(Ig(n).style("visibility","hidden"),Rg(n),(e=n.hideCircleFocus)==null||e.call(n))},updateGridFocus(){var t;const e=this,{state:{inputType:n,width:r,height:i,resizing:s},$el:{grid:o}}=e,l=o.main.select(`line.${nn.xgridFocus}`);if(n==="touch")l.empty()?s&&((t=e.showCircleFocus)==null||t.call(e)):e.showGridFocus();else{const c=e.config.axis_rotated;l.attr("x1",c?0:-10).attr("x2",c?r:-10).attr("y1",c?-10:0).attr("y2",c?-10:i),Rg(e)}return!0},generateGridData(t,e){const n=this,r=n.$el.main.select(`.${Rn.axisX}`).selectAll(".tick").size();let i=[];if(t==="year"){const s=n.getXDomain(n.data.targets),[o,l]=s.map(c=>c.getFullYear());for(let c=o;c<=l;c++)i.push(new Date(`${c}-01-01 00:00:00`))}else i=e.ticks(Bt),i.length>r&&(i=i.filter(s=>String(s).indexOf(".")<0));return i},getGridFilterToRemove(t){return t?e=>{let n=!1;return(qe(t)?t.concat():[t]).forEach(r=>{("value"in r&&e.value===r.value||"class"in r&&e.class===r.class)&&(n=!0)}),n}:()=>!0},removeGridLines(t,e){const n=this,{config:r,$T:i}=n,s=n.getGridFilterToRemove(t),o=f=>!s(f),l=e?yn.xgridLines:yn.ygridLines,c=e?yn.xgridLine:yn.ygridLine;i(n.$el.main.select(`.${l}`).selectAll(`.${c}`).filter(s)).style("opacity","0").remove();const u=`grid_${e?"x":"y"}_lines`;r[u]=r[u].filter(o)}},mC={grid_x_show:!1,grid_x_type:"tick",grid_x_lines:[],grid_y_show:!1,grid_y_lines:[],grid_y_ticks:void 0,grid_focus_edge:!1,grid_focus_show:!0,grid_focus_y:!1,grid_front:!1,grid_lines_front:!0};let Pg=()=>(xn(br.prototype,pC),jn.prototype.xgrids=Cg.xgrids,jn.prototype.ygrids=Cg.ygrids,$a.setOptions([mC]),(Pg=()=>({}))());function Mg(t,e,n,r){const i=this,{config:s,$el:{main:o}}=i,l=s.data_selection_grouped,c=s.data_selection_isselectable.bind(i.api),u=sn(e)?[].concat(e):null,f=t&&!s.data_selection_multiple;let d=!f;const h=(m,S,E)=>{i.unselectPoint(m,S,E),m.interrupt().remove()};i.getTargetsToShow().forEach(m=>{const{id:S}=m,E=l||!u||u.indexOf(S)>=0,C=o.select(`.${on.selectedCircles}${i.getTargetSelectorSuffix(S)}`);m.values.forEach(w=>{const{index:$}=w,z=!n||n.indexOf($)>=0,B=C.selectAll(`.${on.selectedCircle}-${$}`),W=!B.empty();t?E&&z&&c(w)&&(!W||f)?(d||(Mg.call(i,!1),d=!0),i.selectPoint(null,w,$)):(!f||d)&&sn(r)&&r&&W&&h(B,w,$):E&&z&&W&&h(B,w,$)})})}function vu(t=!1,e,n,r){var i;const s=this,{config:o,$el:{main:l}}=s,c=o.data_selection_grouped,u=o.data_selection_isselectable.bind(s.api),f=t&&!o.data_selection_multiple;let d=!f;if(o.data_selection_enabled){if(f&&(n=n!=null&&n.length?[n[0]]:[0],c||(e=(sn(e)?[].concat(e):s.getTargetsToShow().map(m=>m.id)).slice(0,1))),(i=s.isPointFocusOnly)!=null&&i.call(s)){Mg.call(s,t,e,n,r);return}l.selectAll(`.${Tn.shapes}`).selectAll(`.${Tn.shape}`).each(function(h){const m=Yt(this),{id:S,index:E}=h.data?h.data:h,C=c||!e||e.indexOf(S)>=0,w=!n||n.indexOf(E)>=0;if(m.classed(Mr.line)||m.classed(To.area))return;const $=s.getToggle(this,h).bind(s),z=m.classed(on.SELECTED);t?C&&w&&u(h)&&(!z||f)?(d||(vu.call(s,!1),d=!0),!m.classed(on.SELECTED)&&$(!0,m.classed(on.SELECTED,!0),h,E)):(!f||d)&&sn(r)&&r&&z&&$(!1,m.classed(on.SELECTED,!1),h,E):C&&w&&u(h)&&z&&$(!1,m.classed(on.SELECTED,!1),h,E)})}}var xC={selected(t){var e,n;const r=this.internal,i=[];return r.state.isCanvasMode?((e=r.getCanvasSelectedData)==null?void 0:e.call(r,t))||i:(n=r.isPointFocusOnly)!=null&&n.call(r)?(r.$el.main.selectAll(`.${on.selectedCircles+r.getTargetSelectorSuffix(t)}`).selectAll(`.${on.selectedCircle}`).each(s=>i.push(s)),i):(r.$el.main.selectAll(`.${Tn.shapes+r.getTargetSelectorSuffix(t)}`).selectAll(`.${Tn.shape}`).filter(function(){return Yt(this).classed(on.SELECTED)}).each(s=>i.push(s)),i)},select(t,e,n){var r;const i=this.internal;if(i.state.isCanvasMode){(r=i.setCanvasSelection)==null||r.call(i,!0,t,e,n);return}vu.bind(i)(!0,t,e,n)},unselect(t,e){var n;const r=this.internal;if(r.state.isCanvasMode){(n=r.setCanvasSelection)==null||n.call(r,!1,t,e);return}vu.bind(r)(!1,t,e)}},yC={drag(t){const e=this,{config:n,state:r,$el:{main:i}}=e,s=n.data_selection_grouped,o=n.interaction_enabled&&n.data_selection_isselectable;if(e.hasArcType()||!n.data_selection_enabled||n.zoom_enabled&&!e.zoom.altDomain||!n.data_selection_multiple)return;const[l,c]=r.dragStart||[0,0],[u,f]=t,d=Math.min(l,u),h=Math.max(l,u),m=s?r.margin.top:Math.min(c,f),S=s?r.height:Math.max(c,f),E=()=>{!e||!e.$el||!e.$el.main||(i.select(`.${Na.dragarea}`).attr("x",d).attr("y",m).attr("width",h-d).attr("height",S-m),i.selectAll(`.${Tn.shapes}`).selectAll(`.${Tn.shape}`).filter(C=>o==null?void 0:o.bind(e.api)(C)).each(function(C,w){const $=Yt(this),z=$.classed(on.SELECTED),B=$.classed(Na.INCLUDED);let W,H;if($.classed($n.circle)){const _=+$.attr("cx"),q=+$.attr("cy");H=e.togglePoint,W=d<_&&_<h&&m<q&&q<S}else if($.classed(rr.bar)){const{x:_,y:q,width:st,height:it}=wh(this);H=e.togglePath,W=!(h<_||_+st<d)&&!(S<q||q+it<m)}else return;W^B&&($.classed(Na.INCLUDED,!B),$.classed(on.SELECTED,!z),H.call(e,!z,$,C,w))}))};Ph(e.state,E)},dragstart(t){const e=this,{config:n,state:r,$el:{main:i}}=e;e.hasArcType()||!n.data_selection_enabled||(r.dragStart=t,i.select(`.${ze.chart}`).append("rect").attr("class",Na.dragarea).style("opacity","0.1"),e.setDragStatus(!0))},dragend(){const t=this,{config:e,$el:{main:n},$T:r}=t;t.hasArcType()||!e.data_selection_enabled||(r(n.select(`.${Na.dragarea}`)).style("opacity","0").remove(),n.selectAll(`.${Tn.shape}`).classed(Na.INCLUDED,!1),t.setDragStatus(!1))}},TC=Object.defineProperty,bC=Object.defineProperties,SC=Object.getOwnPropertyDescriptors,Lg=Object.getOwnPropertySymbols,AC=Object.prototype.hasOwnProperty,EC=Object.prototype.propertyIsEnumerable,Dg=(t,e,n)=>e in t?TC(t,e,{enumerable:!0,configurable:!0,writable:!0,value:n}):t[e]=n,CC=(t,e)=>{for(var n in e||(e={}))AC.call(e,n)&&Dg(t,n,e[n]);if(Lg)for(var n of Lg(e))EC.call(e,n)&&Dg(t,n,e[n]);return t},IC=(t,e)=>bC(t,SC(e)),RC=IC(CC({},yC),{selectPoint(t,e,n){const r=this,{config:i,$el:{main:s},$T:o}=r,l=i.axis_rotated,c=(l?r.circleY:r.circleX).bind(r),u=(l?r.circleX:r.circleY).bind(r),f=r.pointSelectR.bind(r);Ne(i.data_onselected,r.api,e,t==null?void 0:t.node()),o(s.select(`.${on.selectedCircles}${r.getTargetSelectorSuffix(e.id)}`).selectAll(`.${on.selectedCircle}-${n}`).data([e]).enter().append("circle").attr("class",()=>r.generateClass(on.selectedCircle,n)).attr("cx",c).attr("cy",u).attr("stroke",r.color).attr("r",d=>r.pointSelectR(d)*1.4)).attr("r",f)},unselectPoint(t,e,n){const r=this,{config:i,$el:{main:s},$T:o}=r;Ne(i.data_onunselected,r.api,e,t==null?void 0:t.node()),o(s.select(`.${on.selectedCircles}${r.getTargetSelectorSuffix(e.id)}`).selectAll(`.${on.selectedCircle}-${n}`)).attr("r",0).remove()},togglePoint(t,e,n,r){this[`${t?"":"un"}selectPoint`](e,n,r)},selectPath(t,e){const n=this,{config:r}=n;Ne(r.data_onselected,n.api,e,t.node()),r.interaction_brighten&&t.style("filter","brightness(1.25)")},unselectPath(t,e){const n=this,{config:r}=n;Ne(r.data_onunselected,n.api,e,t.node()),r.interaction_brighten&&t.style("filter",null)},togglePath(t,e,n,r){this[`${t?"":"un"}selectPath`](e,n,r)},getToggle(t,e){const n=this;return t.nodeName==="path"?n.togglePath:n.isStepType(e)?()=>{}:n.togglePoint},toggleShape(t,e,n){var r;const i=this,{config:s,$el:{main:o}}=i;if(s.data_selection_enabled&&s.data_selection_isselectable.bind(i.api)(e)){const l=Yt(t),c=l.classed(on.SELECTED),u=i.getToggle(t,e).bind(i);let f;if(!s.data_selection_multiple){const d=(r=i.isPointFocusOnly)==null?void 0:r.call(i);let h=`.${d?on.selectedCircles:Tn.shapes}`;s.data_selection_grouped&&(h+=i.getTargetSelectorSuffix(e.id)),o.selectAll(h).selectAll(d?`.${on.selectedCircle}`:`.${Tn.shape}.${on.SELECTED}`).classed(on.SELECTED,!1).each(function(m){const S=Yt(this);f=S,u(!1,S,m,m.index)})}(!f||f.node()!==l.node())&&(l.classed(on.SELECTED,!c),u(!c,l,e,n))}}}),wC={data_selection_enabled:!1,data_selection_grouped:!1,data_selection_isselectable:()=>!0,data_selection_multiple:!0,data_selection_draggable:!1,data_onselected:()=>{},data_onunselected:()=>{}};let Fg=()=>(xn(br.prototype,RC),xn(jn.prototype,xC),$a.setOptions([wC]),(Fg=()=>!0)());const Ng=function(t){var e,n;const r=this.internal,{axis:i,brush:s,config:o,scale:{x:l,subX:c},state:u}=r;let f;return u.isCanvasMode?(o.subchart_show&&(f=t,Array.isArray(f)?(f=i.isTimeSeries()?f.map(d=>Wn.bind(r)(d)):f,f=r.setCanvasSubchartDomain(f)||u.domain):f=(e=u.domain)!=null?e:l.orgDomain()),f):(o.subchart_show&&(f=t,Array.isArray(f)?(i.isTimeSeries()&&(f=f.map(h=>Wn.bind(r)(h))),r.withinRange(f,r.getZoomDomain("subX",!0),r.getZoomDomain("subX"))&&(u.domain=f.slice(),s.move(s.getSelection(),f.map(c)))):f=(n=u.domain)!=null?n:l.orgDomain()),f)};xn(Ng,{show(){var t,e,n;const r=this.internal,{$el:{subchart:i},config:s}=r,o=s.subchart_show;if(!o){if(r.state.isCanvasMode){(t=r.unbindZoomEvent)==null||t.call(r),s.subchart_show=!0,this.resize();return}r.unbindZoomEvent(),s.subchart_show=!o,!i.main&&r.initSubchart();let l=i.main.selectAll(`.${ze.target}`);r.data.targets.length!==l.size()&&(r.updateSizes(),r.updateTargetsForSubchart(r.data.targets),l=(e=i.main)==null?void 0:e.selectAll(`.${ze.target}`)),l==null||l.style("opacity",null),(n=i.main)==null||n.style("display",null),this.resize()}},hide(){var t;const e=this.internal,{$el:{subchart:{main:n}},config:r}=e;if(e.state.isCanvasMode){r.subchart_show&&(r.subchart_show=!1,this.resize(),(t=e.bindZoomEvent)==null||t.call(e));return}r.subchart_show&&(n==null?void 0:n.style("display"))!=="none"&&(r.subchart_show=!1,n.style("display","none"),this.resize())},toggle(){const t=this.internal,{config:e}=t;this.subchart[e.subchart_show?"hide":"show"]()},reset(){var t;const e=this.internal,{brush:n}=e;if(e.state.isCanvasMode){(t=e.clearCanvasSubchartDomain)==null||t.call(e,!0,!1);return}n.clear(n.getSelection())}});var OC={subchart:Ng};const $g=["bar","line","bubble","candlestick","scatter"],PC=["opacity","stroke","stroke-dasharray","stroke-dashoffset","stroke-linecap","stroke-linejoin","stroke-miterlimit","stroke-opacity","stroke-width"];function Bg(t,e){var n,r;const i=(r=(n=t.$el.grid)==null?void 0:n.main)==null?void 0:r.select(`line.${Re.xgridFocus}`).node();if(!i||!se.getComputedStyle)return;const s=se.getComputedStyle(i);PC.forEach(o=>{const l=s.getPropertyValue(o);l&&e.style(o,l)})}function mi(t,e){const n=Number(t);return Number.isFinite(n)?n:e}function MC(t){var e,n;if(!rc(t))return!1;const{config:r,state:i,$el:s}=t,o=(n=(e=s.grid)==null?void 0:e.main)==null?void 0:n.select(`line.${Re.xgridFocus}:not(.${Re.xgridFocusContinuous})`),l=s.main.select(`line.${Re.xgridFocusContinuous}`);if(!(o!=null&&o.node())||!l.node())return!1;const c=i.margin2.left-i.margin.left+i.width2,u=i.margin2.top-i.margin.top+i.height2;return Bg(t,l),r.axis_rotated?l.attr("x1",mi(o.attr("x1"),0)).attr("x2",c).attr("y1",mi(o.attr("y1"),-10)).attr("y2",mi(o.attr("y2"),-10)):l.attr("x1",mi(o.attr("x1"),-10)).attr("x2",mi(o.attr("x2"),-10)).attr("y1",mi(o.attr("y1"),0)).attr("y2",u),l.style("visibility",null),o.style("visibility","hidden"),!0}function LC(t){var e;(e=t.$el.main)==null||e.select(`line.${Re.xgridFocusContinuous}`).style("visibility","hidden")}function DC(t,e,n){const{config:r,state:i}=t,[s,o]=Jn(e,n),l=Td(t,r.axis_rotated?o:s);return l===null?null:r.axis_rotated?[i.width/2,l]:[l,i.height/2]}function gu(t,e,n,r){var i,s;const o=(s=(i=t.$el.eventRect)==null?void 0:i.node)==null?void 0:s.call(i);if(!o)return;const l=DC(t,n,r)||[0,0],c=ln(o,!0),u=c.left+l[0],f=c.top+l[1],d={bubbles:!0,cancelable:!0,screenX:u,screenY:f,clientX:u,clientY:f};/^touch/.test(e)?wc.touch(o,e,d):wc.mouse(o,e,d)}var FC={isSubchartBrushEnabled(){const{config:t}=this;return t.subchart_show&&t.subchart_brush_enabled!==!1},bindSubchartEventRect(t){const e=this,{config:n,state:r}=e;t.on("mouseover mousemove mouseout touchstart touchmove touchend",null),n.interaction_enabled&&(r.inputType==="mouse"?t.on("mouseover mousemove",function(i){e.isSubchartBrushEnabled()||gu(e,i.type,i,this)}).on("mouseout",function(i){e.isSubchartBrushEnabled()||gu(e,"mouseout",i,this)}):r.inputType==="touch"&&t.on("touchstart touchmove touchend",function(i){var s;e.isSubchartBrushEnabled()||((s=i.touches)==null?void 0:s.length)>1||gu(e,i.type,i,this)}))},initBrush(){const t=this,{config:e,scale:n,$el:{subchart:r},state:i}=t,s=e.axis_rotated,o=e.subchart_size_height;let l,c,u;t.brush=(s?oA():sA()).handleSize(5),t.brush.on("start brush end",f=>{const{selection:d,sourceEvent:h,target:m,type:S}=f;S==="start"&&(t.state.inputType==="touch"&&t.hideTooltip(),c=h?d:null),/(start|brush)/.test(S)&&(S==="brush"&&h&&i.domain&&(c==null||c.forEach((E,C)=>{E!==d[C]&&(i.domain[C]=n.x.orgDomain()[C])})),t.redrawForBrush(S!=="start")),S==="end"&&(l=n.x.orgDomain()),m!=null&&m.handle&&(d===null?t.brush.handle.attr("display","none"):t.brush.handle.attr("display",null).attr("transform",(E,C)=>{const w=[d[C],o/2];return`translate(${s?w.reverse():w})`}))}),t.brush.updateResize=function(){u&&clearTimeout(u),u=setTimeout(()=>{const f=this.getSelection();l&&vv(f.node())&&this.move(f,l.map(n.subX.orgScale()))},0)},t.brush.update=function(){var f;return this.extent()()[1].filter(h=>isNaN(h)).length===0&&((f=r.main)==null||f.select(`.${Re.brush}`).call(this)),this},t.brush.scale=function(f){const d=e.subchart_size_height;let h=t.axis.getExtent();!h&&f.range?h=[[0,0],[f.range()[1],d]]:qe(h)&&(h=h.map((m,S)=>[m,S>0?d:S])),s&&h[1].reverse(),this.extent(h),this.update()},t.brush.getSelection=()=>r.main?r.main.select(`.${Re.brush}`):Yt([])},initSubchart(){const t=this,{config:e,state:{clip:n,hasAxis:r},$el:{defs:i,svg:s,subchart:o,axis:l}}=t;if(!r)return;const c=e.subchart_show?null:"hidden",u=`${n.id}-subchart`,f=t.getClipPath(u);n.idSubchart=u,t.appendClip(i,u),t.initBrush(),o.main=s.append("g").classed(Re.subchart,!0).attr("transform",t.getTranslate("context"));const{main:d}=o;d.style("visibility",c),d.append("g").attr("clip-path",f).attr("class",Re.chart),t.withSubchartTypeContext(()=>{$g.forEach(m=>{const S=Ln(/^(bubble|scatter)$/.test(m)?"circle":m);if(t.hasType(m)||t.hasTypeOf(S)){const E=d.select(`.${Re.chart}`),C=Re[`chart${S}s`];E.select(`.${C}`).empty()&&E.append("g").attr("class",C)}})});const h=d.append("g").attr("clip-path",f).attr("class",Re.brush).style("pointer-events",t.isSubchartBrushEnabled()?null:"none").call(t.brush);e.subchart_showHandle&&t.addBrushHandle(h),o.eventRect=d.append("g").attr("clip-path",f).attr("class",`${Re.eventRects} ${Re.eventRects}-subchart`).style("fill-opacity","0").style("pointer-events",t.isSubchartBrushEnabled()?"none":"all").append("rect").attr("class",`${Re.eventRect} ${Re.eventRect}-subchart`).attr("width",t.state.width2).attr("height",t.state.height2),t.bindSubchartEventRect(o.eventRect),d.append("g").attr("clip-path",f).attr("class",Re.xgridFocus).append("line").attr("class",Re.xgridFocus).style("visibility","hidden"),l.subX=d.append("g").attr("class",Re.axisX).attr("transform",t.getTranslate("subX")).attr("clip-path",e.axis_rotated?"":n.pathXAxis).style("visibility",e.subchart_axis_x_show?c:"hidden"),l.subY=d.append("g").attr("class",Re.axisY).attr("transform",t.getTranslate("subY")).style("visibility",e.subchart_axis_y_show?c:"hidden"),l.subY2=d.append("g").attr("class",Re.axisY2).attr("transform",t.getTranslate("subY2")).style("visibility",e.subchart_axis_y2_show?c:"hidden")},addBrushHandle(t){const e=this,{config:n}=e,r=n.axis_rotated,i=n.subchart_init_range,s="handle--custom",o=de[r?"y":"x"];e.brush.handle=t.selectAll(`.${s}`).data(r?[{type:"n"},{type:"s"}]:[{type:"w"},{type:"e"}]).enter().append("path").attr("class",s).attr("cursor",`${r?"ns":"ew"}-resize`).attr("d",l=>o[/[se]/.test(l.type)?"end":"start"]).attr("display",i?null:"none")},updateTargetsForSubchart(t){var e;const n=this,{config:r,state:i,$el:{subchart:{main:s}}}=n;r.subchart_show&&(n.withSubchartTypeContext(()=>{$g.filter(o=>n.hasType(o)||n.hasTypeOf(Ln(o))).forEach(o=>{const l=/^(bubble|scatter)$/.test(o),c=Ln(l?"circle":o),u=n.getChartClass(c,!0),f=n.getClass(l?"circles":`${o}s`,!0),d=s.select(`.${Re[`chart${`${c}s`}`]}`);if(l){const h=d.selectAll(`.${Re.circles}`).data(t.filter(n[`is${Ln(o)}Type`].bind(n))).attr("class",f);h.exit().remove(),h.enter().append("g").attr("class",f)}else{const h=d.selectAll(`.${Re[`chart${c}`]}`).attr("class",u).data(t.filter(n[`is${c}Type`].bind(n))),m=h.enter().append("g").style("opacity","0").attr("class",u).append("g").attr("class",f);h.exit().remove(),o==="line"&&n.hasTypeOf("Area")&&m.append("g").attr("class",n.getClass("areas",!0))}})}),s.selectAll(`.${Re.brush} rect`).attr(r.axis_rotated?"width":"height",r.axis_rotated?i.width2:i.height2),(e=n.$el.subchart.eventRect)==null||e.attr("width",i.width2).attr("height",i.height2).style("pointer-events",n.isSubchartBrushEnabled()?"none":"all"))},updateSubchartYDomain(t){var e,n;const r=this,{scale:i}=r,s=t||r.filterTargetsToShow(r.data.targets);(e=i.subY)==null||e.domain(r.getYDomain(s,"y")),(n=i.subY2)==null||n.domain(r.getYDomain(s,"y2"))},redrawSubchart(t,e){var n,r,i,s;const o=this,{config:l,$el:{subchart:{main:c}},state:u}=o,f=!!e;if(c.style("visibility",l.subchart_show?null:"hidden"),c.select(`.${Re.brush}`).style("pointer-events",o.isSubchartBrushEnabled()?null:"none"),(n=o.$el.subchart.eventRect)==null||n.style("pointer-events",o.isSubchartBrushEnabled()?"none":"all"),(r=o.$el.axis.subY)==null||r.style("visibility",l.subchart_axis_y_show?null:"hidden"),(i=o.$el.axis.subY2)==null||i.style("visibility",l.subchart_axis_y2_show?null:"hidden"),l.subchart_show&&(((s=u.event)==null?void 0:s.type)==="zoom"&&o.brush.update(),t)){const d=l.subchart_init_range;!pv(o)&&o.brush.update(),o.withSubchartTypeContext(()=>{const h=u._targetsToShow||o.filterTargetsToShow(o.data.targets);o.updateSubchartYDomain(h);const m=o.getDrawShape();if(Object.keys(m.type).forEach(S=>{const E=Ln(S),C=o[`generateDraw${E}`](m.indices[S],!0);o[`update${E}`](f,!0),o[`redraw${E}`](C,f,!0)}),o.hasType("bubble")||o.hasType("scatter")){const{cx:S}=m.pos,E=o.updateCircleY(!0);o.updateCircle(!0),o.redrawCircle(S,E,f,void 0,!0)}}),!u.rendered&&d&&(u.domain=d,o.brush.move(o.brush.getSelection(),d.map(o.scale.x)))}},showSubchartGridFocus(t){const e=this,{config:n,state:r,$el:{subchart:{main:i}}}=e;if(!i||!n.subchart_show||e.isSubchartBrushEnabled()||n.grid_focus_show===!1||n.subchart_grid_focus===!1||!n.tooltip_show||n.axis_tooltip)return;const o=(Array.isArray(t)?t:[t]).find(u=>u&&e.getBaseValue(u)!=null);if(!o){e.hideSubchartGridFocus();return}const l=e.scale.subX(o.x);if(!Number.isFinite(l)){e.hideSubchartGridFocus();return}const c=i.select(`g.${Re.xgridFocus} line.${Re.xgridFocus}`);if(MC(e)){c.style("visibility","hidden");return}Bg(e,c),n.axis_rotated?c.attr("x1",0).attr("x2",r.width2).attr("y1",l).attr("y2",l):c.attr("x1",l).attr("x2",l).attr("y1",0).attr("y2",r.height2),c.style("visibility",null)},hideSubchartGridFocus(){var t;LC(this),(t=this.$el.subchart.main)==null||t.select(`g.${Re.xgridFocus} line.${Re.xgridFocus}`).style("visibility","hidden")},redrawForBrush(t=!0){var e;const n=this,{config:{subchart_onbrush:r,zoom_rescale:i},scale:s,state:o}=n;n.redraw({withTransition:!1,withY:i,withSubchart:!1,withUpdateXDomain:!0,withDimension:!1}),t&&o.rendered&&r.bind(n.api)((e=o.domain)!=null?e:s.x.orgDomain())},transformContext(t,e){const n=this,{$el:{subchart:r},$T:i}=n,s=e!=null&&e.axisSubX?e.axisSubX:i(r.main.select(`.${Re.axisX}`),t),o=e!=null&&e.axisSubY?e.axisSubY:i(r.main.select(`.${Re.axisY}`),t),l=e!=null&&e.axisSubY2?e.axisSubY2:i(r.main.select(`.${Re.axisY2}`),t);r.main.attr("transform",n.getTranslate("context")),s.attr("transform",n.getTranslate("subX")),o.attr("transform",n.getTranslate("subY")),l.attr("transform",n.getTranslate("subY2"))}},NC={subchart_show:!1,subchart_type:void 0,subchart_types:{},subchart_brush_enabled:!0,subchart_showHandle:!1,subchart_size_height:60,subchart_grid_focus:!0,subchart_grid_focus_continuous:!1,subchart_axis_x_show:!0,subchart_axis_x_tick_show:!0,subchart_axis_x_tick_count:void 0,subchart_axis_x_tick_values:void 0,subchart_axis_x_tick_culling:void 0,subchart_axis_x_tick_culling_max:void 0,subchart_axis_x_tick_culling_lines:void 0,subchart_axis_x_tick_culling_reverse:void 0,subchart_axis_x_tick_outer:void 0,subchart_axis_x_tick_format:void 0,subchart_axis_x_tick_text_show:!0,subchart_axis_y_show:!1,subchart_axis_y_tick_show:!0,subchart_axis_y_tick_count:void 0,subchart_axis_y_tick_values:void 0,subchart_axis_y_tick_culling:void 0,subchart_axis_y_tick_culling_max:void 0,subchart_axis_y_tick_culling_lines:void 0,subchart_axis_y_tick_culling_reverse:void 0,subchart_axis_y_tick_outer:void 0,subchart_axis_y_tick_format:void 0,subchart_axis_y_tick_text_show:!0,subchart_axis_y2_show:!1,subchart_axis_y2_tick_show:!0,subchart_axis_y2_tick_count:void 0,subchart_axis_y2_tick_values:void 0,subchart_axis_y2_tick_culling:void 0,subchart_axis_y2_tick_culling_max:void 0,subchart_axis_y2_tick_culling_lines:void 0,subchart_axis_y2_tick_culling_reverse:void 0,subchart_axis_y2_tick_outer:void 0,subchart_axis_y2_tick_format:void 0,subchart_axis_y2_tick_text_show:!0,subchart_init_range:void 0,subchart_onbrush:()=>{}};let zg=()=>(xn(br.prototype,FC),xn(jn.prototype,OC),$a.setOptions([NC]),(zg=()=>!0)());var $C=1e-12;function Ug(t){return((t=Math.exp(t))+1/t)/2}function BC(t){return((t=Math.exp(t))-1/t)/2}function zC(t){return((t=Math.exp(2*t))-1)/(t+1)}var UC=(function t(e,n,r){function i(s,o){var l=s[0],c=s[1],u=s[2],f=o[0],d=o[1],h=o[2],m=f-l,S=d-c,E=m*m+S*S,C,w;if(E<$C)w=Math.log(h/u)/e,C=function(_){return[l+_*m,c+_*S,u*Math.exp(e*_*w)]};else{var $=Math.sqrt(E),z=(h*h-u*u+r*E)/(2*u*n*$),B=(h*h-u*u-r*E)/(2*h*n*$),W=Math.log(Math.sqrt(z*z+1)-z),H=Math.log(Math.sqrt(B*B+1)-B);w=(H-W)/e,C=function(_){var q=_*w,st=Ug(W),it=u/(n*$)*(st*zC(e*q+W)-BC(W));return[l+it*m,c+it*S,u*st/Ug(e*q+W)]}}return C.duration=w*1e3*e/Math.SQRT2,C}return i.rho=function(s){var o=Math.max(.001,+s),l=o*o,c=l*l;return t(o,l,c)},i})(Math.SQRT2,2,4),_o=(t=>()=>t);function kC(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 ta(t,e,n){this.k=t,this.x=e,this.y=n}ta.prototype={constructor:ta,scale:function(t){return t===1?this:new ta(this.k*t,this.x,this.y)},translate:function(t,e){return t===0&e===0?this:new ta(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 fr=new ta(1,0,0);pu.prototype=ta.prototype;function pu(t){for(;!t.__zoom;)if(!(t=t.parentNode))return fr;return t.__zoom}function mu(t){t.stopImmediatePropagation()}function xs(t){t.preventDefault(),t.stopImmediatePropagation()}function GC(t){return(!t.ctrlKey||t.type==="wheel")&&!t.button}function XC(){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 kg(){return this.__zoom||fr}function WC(t){return-t.deltaY*(t.deltaMode===1?.05:t.deltaMode?1:.002)*(t.ctrlKey?10:1)}function VC(){return navigator.maxTouchPoints||"ontouchstart"in this}function jC(t,e,n){var r=t.invertX(e[0][0])-n[0][0],i=t.invertX(e[1][0])-n[1][0],s=t.invertY(e[0][1])-n[0][1],o=t.invertY(e[1][1])-n[1][1];return t.translate(i>r?(r+i)/2:Math.min(0,r)||Math.max(0,i),o>s?(s+o)/2:Math.min(0,s)||Math.max(0,o))}function HC(){var t=GC,e=XC,n=jC,r=WC,i=VC,s=[0,1/0],o=[[-1/0,-1/0],[1/0,1/0]],l=250,c=UC,u=Io("start","zoom","end"),f,d,h,m=500,S=150,E=0,C=10;function w(tt){tt.property("__zoom",kg).on("wheel.zoom",q,{passive:!1}).on("mousedown.zoom",st).on("dblclick.zoom",it).filter(i).on("touchstart.zoom",ot).on("touchmove.zoom",ct).on("touchend.zoom touchcancel.zoom",gt).style("-webkit-tap-highlight-color","rgba(0,0,0,0)")}w.transform=function(tt,ft,lt,bt){var St=tt.selection?tt.selection():tt;St.property("__zoom",kg),tt!==St?W(tt,ft,lt,bt):St.interrupt().each(function(){H(this,arguments).event(bt).start().zoom(null,typeof ft=="function"?ft.apply(this,arguments):ft).end()})},w.scaleBy=function(tt,ft,lt,bt){w.scaleTo(tt,function(){var St=this.__zoom.k,Mt=typeof ft=="function"?ft.apply(this,arguments):ft;return St*Mt},lt,bt)},w.scaleTo=function(tt,ft,lt,bt){w.transform(tt,function(){var St=e.apply(this,arguments),Mt=this.__zoom,Ot=lt==null?B(St):typeof lt=="function"?lt.apply(this,arguments):lt,Kt=Mt.invert(Ot),ee=typeof ft=="function"?ft.apply(this,arguments):ft;return n(z($(Mt,ee),Ot,Kt),St,o)},lt,bt)},w.translateBy=function(tt,ft,lt,bt){w.transform(tt,function(){return n(this.__zoom.translate(typeof ft=="function"?ft.apply(this,arguments):ft,typeof lt=="function"?lt.apply(this,arguments):lt),e.apply(this,arguments),o)},null,bt)},w.translateTo=function(tt,ft,lt,bt,St){w.transform(tt,function(){var Mt=e.apply(this,arguments),Ot=this.__zoom,Kt=bt==null?B(Mt):typeof bt=="function"?bt.apply(this,arguments):bt;return n(fr.translate(Kt[0],Kt[1]).scale(Ot.k).translate(typeof ft=="function"?-ft.apply(this,arguments):-ft,typeof lt=="function"?-lt.apply(this,arguments):-lt),Mt,o)},bt,St)};function $(tt,ft){return ft=Math.max(s[0],Math.min(s[1],ft)),ft===tt.k?tt:new ta(ft,tt.x,tt.y)}function z(tt,ft,lt){var bt=ft[0]-lt[0]*tt.k,St=ft[1]-lt[1]*tt.k;return bt===tt.x&&St===tt.y?tt:new ta(tt.k,bt,St)}function B(tt){return[(+tt[0][0]+ +tt[1][0])/2,(+tt[0][1]+ +tt[1][1])/2]}function W(tt,ft,lt,bt){tt.on("start.zoom",function(){H(this,arguments).event(bt).start()}).on("interrupt.zoom end.zoom",function(){H(this,arguments).event(bt).end()}).tween("zoom",function(){var St=this,Mt=arguments,Ot=H(St,Mt).event(bt),Kt=e.apply(St,Mt),ee=lt==null?B(Kt):typeof lt=="function"?lt.apply(St,Mt):lt,Ae=Math.max(Kt[1][0]-Kt[0][0],Kt[1][1]-Kt[0][1]),Ee=St.__zoom,Te=typeof ft=="function"?ft.apply(St,Mt):ft,De=c(Ee.invert(ee).concat(Ae/Ee.k),Te.invert(ee).concat(Ae/Te.k));return function(me){if(me===1)me=Te;else{var Pe=De(me),Zt=Ae/Pe[2];me=new ta(Zt,ee[0]-Pe[0]*Zt,ee[1]-Pe[1]*Zt)}Ot.zoom(null,me)}})}function H(tt,ft,lt){return!lt&&tt.__zooming||new _(tt,ft)}function _(tt,ft){this.that=tt,this.args=ft,this.active=0,this.sourceEvent=null,this.extent=e.apply(tt,ft),this.taps=0}_.prototype={event:function(tt){return tt&&(this.sourceEvent=tt),this},start:function(){return++this.active===1&&(this.that.__zooming=this,this.emit("start")),this},zoom:function(tt,ft){return this.mouse&&tt!=="mouse"&&(this.mouse[1]=ft.invert(this.mouse[0])),this.touch0&&tt!=="touch"&&(this.touch0[1]=ft.invert(this.touch0[0])),this.touch1&&tt!=="touch"&&(this.touch1[1]=ft.invert(this.touch1[0])),this.that.__zoom=ft,this.emit("zoom"),this},end:function(){return--this.active===0&&(delete this.that.__zooming,this.emit("end")),this},emit:function(tt){var ft=Yt(this.that).datum();u.call(tt,this.that,new kC(tt,{sourceEvent:this.sourceEvent,target:w,type:tt,transform:this.that.__zoom,dispatch:u}),ft)}};function q(tt,...ft){if(!t.apply(this,arguments))return;var lt=H(this,ft).event(tt),bt=this.__zoom,St=Math.max(s[0],Math.min(s[1],bt.k*Math.pow(2,r.apply(this,arguments)))),Mt=ur(tt);if(lt.wheel)(lt.mouse[0][0]!==Mt[0]||lt.mouse[0][1]!==Mt[1])&&(lt.mouse[1]=bt.invert(lt.mouse[0]=Mt)),clearTimeout(lt.wheel);else{if(bt.k===St)return;lt.mouse=[Mt,bt.invert(Mt)],di(this),lt.start()}xs(tt),lt.wheel=setTimeout(Ot,S),lt.zoom("mouse",n(z($(bt,St),lt.mouse[0],lt.mouse[1]),lt.extent,o));function Ot(){lt.wheel=null,lt.end()}}function st(tt,...ft){if(h||!t.apply(this,arguments))return;var lt=tt.currentTarget,bt=H(this,ft,!0).event(tt),St=Yt(tt.view).on("mousemove.zoom",ee,!0).on("mouseup.zoom",Ae,!0),Mt=ur(tt,lt),Ot=tt.clientX,Kt=tt.clientY;Fc(tt.view),mu(tt),bt.mouse=[Mt,this.__zoom.invert(Mt)],di(this),bt.start();function ee(Ee){if(xs(Ee),!bt.moved){var Te=Ee.clientX-Ot,De=Ee.clientY-Kt;bt.moved=Te*Te+De*De>E}bt.event(Ee).zoom("mouse",n(z(bt.that.__zoom,bt.mouse[0]=ur(Ee,lt),bt.mouse[1]),bt.extent,o))}function Ae(Ee){St.on("mousemove.zoom mouseup.zoom",null),Nc(Ee.view,bt.moved),xs(Ee),bt.event(Ee).end()}}function it(tt,...ft){if(t.apply(this,arguments)){var lt=this.__zoom,bt=ur(tt.changedTouches?tt.changedTouches[0]:tt,this),St=lt.invert(bt),Mt=lt.k*(tt.shiftKey?.5:2),Ot=n(z($(lt,Mt),bt,St),e.apply(this,ft),o);xs(tt),l>0?Yt(this).transition().duration(l).call(W,Ot,bt,tt):Yt(this).call(w.transform,Ot,bt,tt)}}function ot(tt,...ft){if(t.apply(this,arguments)){var lt=tt.touches,bt=lt.length,St=H(this,ft,tt.changedTouches.length===bt).event(tt),Mt,Ot,Kt,ee;for(mu(tt),Ot=0;Ot<bt;++Ot)Kt=lt[Ot],ee=ur(Kt,this),ee=[ee,this.__zoom.invert(ee),Kt.identifier],St.touch0?!St.touch1&&St.touch0[2]!==ee[2]&&(St.touch1=ee,St.taps=0):(St.touch0=ee,Mt=!0,St.taps=1+!!f);f&&(f=clearTimeout(f)),Mt&&(St.taps<2&&(d=ee[0],f=setTimeout(function(){f=null},m)),di(this),St.start())}}function ct(tt,...ft){if(this.__zooming){var lt=H(this,ft).event(tt),bt=tt.changedTouches,St=bt.length,Mt,Ot,Kt,ee;for(xs(tt),Mt=0;Mt<St;++Mt)Ot=bt[Mt],Kt=ur(Ot,this),lt.touch0&<.touch0[2]===Ot.identifier?lt.touch0[0]=Kt:lt.touch1&<.touch1[2]===Ot.identifier&&(lt.touch1[0]=Kt);if(Ot=lt.that.__zoom,lt.touch1){var Ae=lt.touch0[0],Ee=lt.touch0[1],Te=lt.touch1[0],De=lt.touch1[1],me=(me=Te[0]-Ae[0])*me+(me=Te[1]-Ae[1])*me,Pe=(Pe=De[0]-Ee[0])*Pe+(Pe=De[1]-Ee[1])*Pe;Ot=$(Ot,Math.sqrt(me/Pe)),Kt=[(Ae[0]+Te[0])/2,(Ae[1]+Te[1])/2],ee=[(Ee[0]+De[0])/2,(Ee[1]+De[1])/2]}else if(lt.touch0)Kt=lt.touch0[0],ee=lt.touch0[1];else return;lt.zoom("touch",n(z(Ot,Kt,ee),lt.extent,o))}}function gt(tt,...ft){if(this.__zooming){var lt=H(this,ft).event(tt),bt=tt.changedTouches,St=bt.length,Mt,Ot;for(mu(tt),h&&clearTimeout(h),h=setTimeout(function(){h=null},m),Mt=0;Mt<St;++Mt)Ot=bt[Mt],lt.touch0&<.touch0[2]===Ot.identifier?delete lt.touch0:lt.touch1&<.touch1[2]===Ot.identifier&&delete lt.touch1;if(lt.touch1&&!lt.touch0&&(lt.touch0=lt.touch1,delete lt.touch1),lt.touch0)lt.touch0[1]=this.__zoom.invert(lt.touch0[0]);else if(lt.end(),lt.taps===2&&(Ot=ur(Ot,this),Math.hypot(d[0]-Ot[0],d[1]-Ot[1])<C)){var Kt=Yt(this).on("dblclick.zoom");Kt&&Kt.apply(this,arguments)}}}return w.wheelDelta=function(tt){return arguments.length?(r=typeof tt=="function"?tt:_o(+tt),w):r},w.filter=function(tt){return arguments.length?(t=typeof tt=="function"?tt:_o(!!tt),w):t},w.touchable=function(tt){return arguments.length?(i=typeof tt=="function"?tt:_o(!!tt),w):i},w.extent=function(tt){return arguments.length?(e=typeof tt=="function"?tt:_o([[+tt[0][0],+tt[0][1]],[+tt[1][0],+tt[1][1]]]),w):e},w.scaleExtent=function(tt){return arguments.length?(s[0]=+tt[0],s[1]=+tt[1],w):[s[0],s[1]]},w.translateExtent=function(tt){return arguments.length?(o[0][0]=+tt[0][0],o[1][0]=+tt[1][0],o[0][1]=+tt[0][1],o[1][1]=+tt[1][1],w):[[o[0][0],o[0][1]],[o[1][0],o[1][1]]]},w.constrain=function(tt){return arguments.length?(n=tt,w):n},w.duration=function(tt){return arguments.length?(l=+tt,w):l},w.interpolate=function(tt){return arguments.length?(c=tt,w):c},w.on=function(){var tt=u.on.apply(u,arguments);return tt===u?w:tt},w.clickDistance=function(tt){return arguments.length?(E=(tt=+tt)*tt,w):Math.sqrt(E)},w.tapDistance=function(tt){return arguments.length?(C=+tt,w):C},w}const Gg=function(t){var e,n;const r=this.internal,{axis:i,config:s,org:o,scale:l,state:c}=r;let u;if(!i)return;const f=i.isCategorized();if(s.zoom_enabled)if(u=t,Array.isArray(u)){if(i.isTimeSeries()&&(u=u.map(h=>Wn.bind(r)(h))),r.withinRange(u,r.getZoomDomain("zoom",!0),r.getZoomDomain("zoom"))){if(c.domain=u.slice(),u=r.getZoomDomainValue(u),r.api.tooltip.hide(),s.subchart_show)if(c.isCanvasMode)(e=r.setCanvasSubchartDomain)==null||e.call(r,u,!0,!1);else{const h=l.zoom||l.x;r.brush.getSelection().call(r.brush.move,u.map(h))}else{const h=f?l.x.orgScale():o.xScale||l.x;r.updateCurrentZoomTransform(h,u)}r.setZoomResetButton()}}else u=r.zoom.getDomain();return(n=c.domain)!=null?n:u};xn(Gg,{enable(t){var e;const n=this.internal,{axis:r,config:i}=n;if(!r){i.zoom_enabled=!1;return}/^(drag|wheel)$/.test(t)&&(i.zoom_type=t),i.zoom_enabled=!!t,n.zoom?t===!1&&n.bindZoomEvent(!1):n.initZoom(),t!==!1&&(i.zoom_type==="drag"&&!n.zoomBehaviour&&((e=n.initZoomBehaviour)==null||e.call(n)),n.bindZoomEvent()),n.updateAndRedraw()},max(t){const e=this.internal,{config:n,org:{xDomain:r}}=e;return(t===0||t)&&(n.zoom_x_max=pr("max",[r[1],t])),n.zoom_x_max},min(t){const e=this.internal,{config:n,org:{xDomain:r}}=e;return(t===0||t)&&(n.zoom_x_min=pr("min",[r[0],t])),n.zoom_x_min},range(t){const e=this.zoom;if(He(t)){const{min:n,max:r}=t;sn(n)&&e.min(n),sn(r)&&e.max(r)}return{min:e.min(),max:e.max()}}});var YC={zoom:Gg,unzoom(){var t;const e=this.internal,{config:n,$el:{canvas:r,eventRect:i,zoomResetBtn:s},scale:{zoom:o},state:l}=e,c=l.isCanvasMode?r:i;(o||l.isCanvasMode&&n.subchart_show&&l.domain)&&(n.subchart_show?l.isCanvasMode?(t=e.clearCanvasSubchartDomain)==null||t.call(e,!0,!1):e.brush.getSelection().call(e.brush.move,null):e.zoom.updateTransformScale(fr),e.updateZoom(!0),s==null||s.style("display","none"),c!=null&&c.node()&&pu(c.node())!==fr&&e.zoom.transform(c,fr),l.domain=void 0)}};function qo(t){return t.state.isCanvasMode?t.$el.canvas:t.$el.eventRect}function Xg(t,e){if(!t.state.isCanvasMode)return e;const{margin:n}=t.state;return fr.translate(e.x+(e.k-1)*n.left,e.y+(e.k-1)*n.top).scale(e.k)}function Wg(t,e){if(!t.state.isCanvasMode)return e;const{margin:n}=t.state;return fr.translate(e.x-(e.k-1)*n.left,e.y-(e.k-1)*n.top).scale(e.k)}function Vg(t,e,n){const r=Jn(e,n);if(t.state.isCanvasMode){const{margin:i}=t.state;r[0]-=i.left,r[1]-=i.top}return r}var KC={initZoom(){const t=this;t.scale.zoom=null,t.generateZoom(),t.config.zoom_type==="drag"&&t.initZoomBehaviour()},bindZoomEvent(t=!0){const e=this,{config:n}=e;n.zoom_enabled&&t?!n.subchart_show&&e.bindZoomOnEventRect():t===!1&&(e.api.unzoom(),e.unbindZoomEvent())},generateZoom(){const t=this,{config:e,org:n,scale:r}=t,i=HC().duration(0).on("start",t.onZoomStart.bind(t)).on("zoom",t.onZoom.bind(t)).on("end",t.onZoomEnd.bind(t));i.orgScaleExtent=()=>{const s=e.zoom_extent||[1,10];return[s[0],Math.max(t.getMaxDataCount()/s[1],s[1])]},i.updateScaleExtent=function(){const s=wa(t.scale.x.orgDomain())/wa(t.getZoomDomain()),o=this.orgScaleExtent();return this.scaleExtent([o[0]*s,o[1]*s]),this},i.updateTransformScale=(s,o)=>{var l,c;const u=e.axis_rotated,f=Xg(t,s);(l=n.xScale)==null||l.range(r.x.range());const d=f[u?"rescaleY":"rescaleX"](n.xScale||r.x);if(d.domain().some(S=>/(Invalid Date|NaN)/.test(S.toString())))return;const h=t.trimXDomain(d.domain()),m=e.zoom_rescale;if(d.domain(h,n.xDomain),o){const S=d(r.x.domain()[0]),E=u?f.x:S,C=u?S:f.y,w=Wg(t,fr.translate(E,C).scale(s.k));(c=qo(t))==null||c.property("__zoom",w)}r.zoom=t.getCustomizedXScale(d),t.axis.x.scale(r.zoom),m?(!n.xScale&&(n.xScale=r.x.copy()),r.x.domain(h)):n.xScale&&(r.x.domain(n.xScale.domain()),n.xScale=null)},i.getDomain=()=>{const s=r[r.zoom?"zoom":"subX"].domain();return t.axis.isCategorized()&&(s[1]-=2),s},t.zoom=i},onZoomStart(t){const e=this,{sourceEvent:n}=t;n&&(e.zoom.startEvent=n,e.state.zooming=!0,Ne(e.config.zoom_onzoomstart,e.api,t))},onZoom(t){const e=this,{config:n,scale:r,state:i,org:s}=e,{sourceEvent:o}=t,l=(t==null?void 0:t.transform)===fr;if(!n.zoom_enabled||e.filterTargetsToShow(e.data.targets).length===0||!r.zoom&&(o==null?void 0:o.type.indexOf("touch"))>-1&&(o==null?void 0:o.touches.length)===1)return;t.sourceEvent&&(i.zooming=!0,i.domain=void 0);const c=(o==null?void 0:o.type)==="mousemove",u=(o==null?void 0:o.wheelDelta)<0,{transform:f}=t;!c&&u&&r.x.domain().every((S,E)=>S!==s.xDomain[E])&&r.x.domain(s.xDomain),e.zoom.updateTransformScale(f,n.zoom_type==="wheel"&&o);const d=n.transition_duration>0&&!n.subchart_show&&(i.dragging||l||!t.sourceEvent),h=o&&c&&n.zoom_type!=="wheel",m=()=>{var S;e.config&&(e.redraw({withTransition:d,withY:n.zoom_rescale,withSubchart:!1,withEventRect:!1,withDimension:!1}),e.state.cancelClick=c,!l&&Ne(n.zoom_onzoom,e.api,(S=e.state.domain)!=null?S:e.zoom.getDomain()))};h?Ph(e.state,m):m()},onZoomEnd(t){var e,n;const r=this,{config:i,state:s}=r,o=r.zoom;if(!o)return;let{startEvent:l}=o,c=t==null?void 0:t.sourceEvent;const u=(t==null?void 0:t.transform)===fr;(l==null?void 0:l.type.indexOf("touch"))>-1&&(l=l.changedTouches[0],c=(e=c==null?void 0:c.changedTouches)==null?void 0:e[0]),!(i.zoom_type==="drag"&&c&&l.clientX===c.clientX&&l.clientY===c.clientY)&&(s.zooming=!1,!s.isCanvasMode&&r.redrawEventRect(),r.updateZoom(),!u&&(c||s.dragging)&&Ne(i.zoom_onzoomend,r.api,(n=r.state.domain)!=null?n:r.zoom.getDomain()))},updateZoom(t){const e=this,{subX:n,x:r,zoom:i}=e.scale;if(i){const s=i.domain(),o=n.domain(),l=.015,c=e.config.axis_x_inverted?(s[0]>=o[0]||s[0]+l>=o[0])&&(o[1]>=s[1]||o[1]>=s[1]+l):(s[0]<=o[0]||s[0]-l<=o[0])&&(o[1]<=s[1]||o[1]<=s[1]-l);(t||c)&&(e.axis.x.scale(n),r.domain(n.orgDomain()),e.scale.zoom=null)}},updateCurrentZoomTransform(t,e){var n;const r=this,{config:i}=r,s=i.axis_rotated,o=[-t(e[0]),0],l=fr.scale(t.range()[1]/(t(e[1])-t(e[0]))).translate(...s?o.reverse():o);(n=qo(r))==null||n.call(r.zoom.transform,Wg(r,l))},bindZoomOnEventRect(){var t,e;const n=this,{config:r,$el:{svg:i}}=n,s=qo(n),o=r.zoom_type==="drag"?n.zoomBehaviour:n.zoom;n.state.isCanvasMode&&((t=o==null?void 0:o.touchable)==null||t.call(o,()=>r.interaction_inputType_touch!==!1)),!n.state.isCanvasMode&&se.GestureEvent&&/^((?!chrome|android|mobile).)*safari/i.test((e=se.navigator)==null?void 0:e.userAgent)&&i.on("wheel",()=>{}),s==null||s.call(o).on("dblclick.zoom",null)},initZoomBehaviour(){const t=this,{config:e,state:n}=t,r=e.axis_rotated;let i=0,s=0,o,l;const c={axis:r?"y":"x",attr:r?"height":"width",index:r?1:0},u=f=>{const[d,h]=l!=null?l:[0,r?n.height:n.width];return Math.min(Math.max(f,d),h)};t.zoomBehaviour=Yh().touchable(()=>!n.isCanvasMode||e.interaction_inputType_touch!==!1).clickDistance(4).on("start",function(f){var d;l=t.scale.zoom?null:t.axis.getExtent(),n.event=f,t.setDragStatus(!0),t.unselectRect(),!n.isCanvasMode&&!o&&(o=t.$el.main.append("rect").attr("clip-path",n.clip.path).attr("class",Ec.zoomBrush).attr("width",r?n.width:0).attr("height",r?0:n.height)),o==null||o.attr(r?"width":"height",r?n.width:n.height),i=u(Vg(t,f,this)[c.index]),s=i,n.isCanvasMode?(d=t.renderCanvasZoomBrush)==null||d.call(t,i,s):o.attr(c.axis,i).attr(c.attr,0),t.onZoomStart(f)}).on("drag",function(f){var d;s=u(Vg(t,f,this)[c.index]),n.isCanvasMode?(d=t.renderCanvasZoomBrush)==null||d.call(t,i,s):o.attr(c.axis,Math.min(i,s)).attr(c.attr,Math.abs(s-i))}).on("end",f=>{var d;const h=t.scale.zoom||t.scale.x;n.event=f,s=u(s),n.isCanvasMode?(d=t.clearCanvasZoomBrush)==null||d.call(t):o.attr(c.axis,0).attr(c.attr,0),i>s&&([i,s]=[s,i]),i<0&&(s+=Math.abs(i),i=0),i!==s&&t.api.zoom([i,s].map(m=>h.invert(m))),t.setDragStatus(!1)})},setZoomResetButton(){const t=this,{config:e,$el:n}=t,r=e.zoom_resetButton;r&&e.zoom_type==="drag"&&(n.zoomResetBtn?n.zoomResetBtn.style("display",null):n.zoomResetBtn=t.$el.chart.append("div").classed(ze.button,!0).append("span").on("click",function(){ie(r.onclick)&&r.onclick.bind(t.api)(this),t.api.unzoom()}).classed(Ec.buttonZoomReset,!0).text(r.text||"Reset Zoom"))},getZoomTransform(){const t=this,e=qo(t),n=e==null?void 0:e.node();return n?Xg(t,pu(n)):{k:1}}},ZC={zoom_enabled:!1,zoom_type:"wheel",zoom_extent:void 0,zoom_rescale:!1,zoom_onzoom:void 0,zoom_onzoomstart:void 0,zoom_onzoomend:void 0,zoom_resetButton:!0,zoom_x_min:void 0,zoom_x_max:void 0};let jg=()=>(xn(br.prototype,KC),xn(jn.prototype,YC),$a.setOptions([ZC]),(jg=()=>!0)());function Hg(t){var e;t.state.canvasShape=null,(e=t.renderCanvasFrame)==null||e.call(t,void 0,null,!1)}function Yg(t,e=!1){const n=this.internal,{config:r}=n,i=r.transition_duration&&os();return t?(r.regions=e?r.regions.concat(t):t,n.state.isCanvasMode?(Hg(n),r.regions):(n.updateRegion(),n.redrawRegion(i),r.regions)):r.regions}const Kg=function(t){return Yg.bind(this)(t)};xn(Kg,{add:function(t){return Yg.bind(this)(t,!0)},remove:function(t){const e=this.internal,{config:n,$T:r}=e,i=t||{},s=ia(i,"classes",[ss.region]);let o=n.regions;if(e.state.isCanvasMode)return Object.keys(i).length?(o=o.filter(c=>{let u=!1;return c.class?(c.class.split(" ").forEach(f=>{s.indexOf(f)>=0&&(u=!0)}),!u):!0}),n.regions=o):n.regions=[],Hg(e),n.regions;const l=e.$el.main.select(`.${ss.regions}`).selectAll(s.map(c=>`.${c}`));return r(l).style("opacity","0").remove(),Object.keys(i).length?(o=o.filter(c=>{let u=!1;return c.class?(c.class.split(" ").forEach(f=>{s.indexOf(f)>=0&&(u=!0)}),!u):!0}),n.regions=o):n.regions=[],o}});var JC={regions:Kg},QC={initRegion(){const t=this,{$el:e}=t;e.region.main=e.main.insert("g",":first-child").attr("clip-path",t.state.clip.path).attr("class",ss.regions)},updateRegion(){const t=this,{config:e,$el:{region:n},$T:r}=t;n.main||t.initRegion(),n.main.style("visibility",t.hasArcType()?"hidden":null);const i=n.main.selectAll(`.${ss.region}`).data(e.regions);r(i.exit()).style("opacity","0").remove();const s=i.enter().append("g");s.append("rect").style("fill-opacity","0"),n.list=s.merge(i).attr("class",t.classRegion.bind(t)),n.list.each(function(o){var l;Yt(this).select("text").empty()&&((l=o.label)!=null&&l.text)&&Yt(this).append("text").style("opacity","0")})},redrawRegion(t){const e=this,{$el:{region:n},$T:r}=e,i=e.regionX.bind(e),s=e.regionY.bind(e),o=["width","height"];let l=n.list.select("rect"),c=n.list.selectAll("text");return l=r(l,t).attr("x",i).attr("y",s).attr("width",e.regionWidth.bind(e)).attr("height",e.regionHeight.bind(e)),c=r(c,t).text(u=>{var f;return(f=u.label)==null?void 0:f.text}).attr("transform",({label:u})=>u.rotated?" rotate(-90)":null).attr("transform",function(u){var f;const{x:d=0,y:h=0,center:m=!1,rotated:S=!1}=(f=u.label)!=null?f:{},E=this.previousElementSibling,C={x:0,y:0};return je(m)&&["x","y"].forEach((w,$)=>{m.indexOf(w)>-1&&(C[w]=(+E.getAttribute(o[$])-ln(this)[o[$]])/2)}),`translate(${i(u)+C.x+d}, ${s(u)+C.y+h})${S?" rotate(-90)":""}`}).attr("text-anchor",({label:u})=>u!=null&&u.rotated?"end":null).attr("dy","1em").style("fill",({label:u})=>{var f;return(f=u==null?void 0:u.color)!=null?f:null}),[l.style("fill-opacity",u=>Ge(u.opacity)?u.opacity:null).on("end",function(){Yt(this.parentNode).selectAll("rect:not([x])").remove()}),c.style("opacity",null)]},regionX(t){return this.getRegionSize("x",t)},regionY(t){return this.getRegionSize("y",t)},regionWidth(t){return this.getRegionSize("width",t)},regionHeight(t){return this.getRegionSize("height",t)},getRegionSize(t,e){const n=this,{config:r,scale:i,state:s}=n,o=r.axis_rotated,l=/(x|y|y2)/.test(t),c=l?t==="x":t==="width",u=!l&&n[c?"regionX":"regionY"](e);let f=l?"start":"end",d=l?0:s[t],h;if(e.axis==="y"||e.axis==="y2"?(!l&&!c?f="start":l&&!c&&(f="end"),(c?o:!o)&&f in e&&(h=i[e.axis])):(c?!o:o)&&f in e&&(h=i.zoom||i.x),h){let m=0;d=e[f],n.axis.isTimeSeries(e.axis)?d=Wn.call(n,d):/(x|width)/.test(t)&&n.axis.isCategorized()&&isNaN(d)&&(d=r.axis_x_categories.indexOf(d),m=n.axis.x.tickOffset()*(f==="start"?-1:1)),d=h(d)+m}return l?d:d<u?0:d-u},isRegionOnX(t){return!t.axis||t.axis==="x"}};let Zg=()=>(xn(br.prototype,QC),jn.prototype.regions=JC.regions,(Zg=()=>({}))());var xi={initArea(t){const e=this,{config:n}=e;t.insert("g",`.${n.area_front?$n.circles:Mr.lines}`).attr("class",e.getClass("areas",!0))},updateAreaColor(t){const e=this;return Yv.call(e,t,"area_linearGradient",e.color)},updateArea(t,e=!1){const n=this;if(n.state.isCanvasMode)return;const{config:r,state:i,$el:s,$T:o}=n,l=e?s.subchart:s;r.area_linearGradient&&n.updateLinearGradient();const c=l.main.selectAll(`.${To.areas}`).selectAll(`.${To.area}`).data(n.lineData.bind(n));o(c.exit(),t).style("opacity","0").remove(),l.area=c.enter().append("path").attr("class",n.getClass("area",!0)).style("fill",n.updateAreaColor.bind(n)).style("opacity",function(){return i.orgAreaOpacity=Yt(this).style("opacity"),"0"}).merge(c),c.style("opacity",i.orgAreaOpacity),n.setRatioForGroupedData(l.area.data())},redrawArea(t,e,n=!1){const r=this;if(r.state.isCanvasMode)return[];const{area:i}=n?this.$el.subchart:this.$el,{orgAreaOpacity:s}=r.state;return[r.$T(i,e,Cr()).attr("d",t).style("fill",r.updateAreaColor.bind(r)).style("opacity",o=>String(r.isAreaRangeType(o)?s/1.75:s))]},generateDrawArea(t,e){return Bd(this,t,e)}},yi={area_above:!1,area_below:!1,area_front:!0,area_linearGradient:!1,area_zerobased:!0},xu={spline_interpolation_type:"cardinal"};function _C(t){return Kn(t)&&ie(t.create)&&ie(t.update)}function qC(t,e){var n;const r=this,i=(c,u)=>{const f=c.attributes;for(let d=0,h;h=f[d];d++)h=h.name,u.setAttribute(h,c.getAttribute(h))},o=new DOMParser().parseFromString(Gr(t),"image/svg+xml").documentElement,l=Ye.createElementNS(_t.svg,o.nodeName.toLowerCase());if(l.id=e,l.style.fill="inherit",l.style.stroke="inherit",i(o,l),(n=o.childNodes)!=null&&n.length){const c=Yt(l);"innerHTML"in l?c.html(Gr(o.innerHTML)):Oa(o.childNodes).forEach(u=>{i(u,c.append(u.tagName).node())})}r.$el.defs.node().appendChild(l)}var Ti={hasValidPointType(t){return/^(circle|rect(angle)?|polygon|ellipse|use)$/i.test(t||this.config.point_type)},hasLegendDefsPoint(){var t;const{config:e}=this;return e.legend_show&&((t=e.point_pattern)==null?void 0:t.length)&&e.legend_usePoint},getDefsPointId(t){const{state:{datetimeId:e}}=this;return`${e}-point${t}`},getValidPointPattern(){const{config:t}=this,e=/^(circle|rect(angle)?)$/i.test(t.point_type)?t.point_type:"circle";return vn(t.point_pattern)?t.point_pattern:[e]},generatePoint(){const t=this,{$el:e,config:n}=t,r=[],i=t.getValidPointPattern();return function(s,o,...l){return function(c){var u,f,d,h;const m=t.getTargetSelectorSuffix(c.id||((u=c.data)==null?void 0:u.id)||c),S=Yt(this);r.indexOf(m)<0&&r.push(m);let E=i[r.indexOf(m)%i.length];if(t.hasValidPointType(E))E=t[E];else if(!_C(E||n.point_type)){const C=t.getDefsPointId(m);if(e.defs.select(`#${C}`).size()<1&&qC.call(t,E,C),s==="create")return(f=t.custom)==null?void 0:f.create.bind(o)(S,C,...l);if(s==="update")return(d=t.custom)==null?void 0:d.update.bind(o)(S,...l)}return(h=E[s])==null?void 0:h.bind(o)(S,...l)}}}};function t2(t,e,n,r=!1){const i=t?[t,0]:n;for(let s=t||n.reduce((o,l)=>o+l);s<=e;)n.forEach(o=>{s+o<=e&&i.push(o),s+=o});return i.length%2!==0&&i.push(r?n[1]:0),{dash:i.join(" "),length:i.reduce((s,o)=>s+o,0)}}var e2={initLine(){Kv.call(this,{elKey:"line",className:Mr.chartLines,cssRules:["pointer-events:none"]})},updateTargetsForLine(t){const e=this,{$el:{area:n,main:r}}=e,i=e.getClass("lines",!0),s=t.filter(l=>!(e.isScatterType(l)||e.isBubbleType(l))),o=su.call(e,s,{type:"Line",elKey:"line",containerClass:Mr.chartLines,itemClass:Mr.chartLine,initFn:e.initLine});if(o.append("g").attr("class",i),e.hasTypeOf("Area")){const l=r.select(`.${Mr.chartLines}`).selectAll(`.${Mr.chartLine}`),c=(!n&&o.empty()?l:o).filter(e.isAreaType.bind(e));e.initArea(c)}e.updateTargetForCircle(s,o)},updateLine(t,e=!1){const n=this;if(n.state.isCanvasMode)return;const{format:{extraLineClasses:r},$el:i,$T:s}=n,o=e?i.subchart:i,l=o.main.selectAll(`.${Mr.lines}`).selectAll(`.${Mr.line}`).data(n.lineData.bind(n));s(l.exit(),t).style("opacity","0").remove(),o.line=l.enter().append("path").attr("class",c=>`${n.getClass("line",!0)(c)} ${r(c)||""}`).style("stroke",n.color).merge(l).style("opacity",n.initialOpacity.bind(n)).attr("transform",null)},redrawLine(t,e,n=!1){const r=this;if(r.state.isCanvasMode)return[];const{$el:i,$T:s}=r,{line:o}=n?i.subchart:i;return[s(o,e,Cr()).attr("d",t).style("stroke",this.color).style("opacity",null)]},generateDrawLine(t,e){return $d(this,t,e)},lineWithRegions(t,e,n,r){const i=this,{config:s}=i,o=s.axis_rotated,l=i.axis.isTimeSeries(),c="2 2",u=Ad(i,t,r),f=i.hasNullDataValue(t);let d,h,m,S;const E=o?it=>n(it.value):it=>e(it.x),C=o?it=>e(it.x):it=>n(it.value),w=it=>`M${it[0][0]},${it[0][1]}L${it[1][0]},${it[1][1]}`,$=l?(it,ot,ct,gt)=>{const tt=it.x.getTime(),ft=ot.x-it.x,lt=new Date(tt+ft*ct),bt=new Date(tt+ft*(ct+gt)),St=o?[[n(h(ct)),e(lt)],[n(h(ct+m)),e(bt)]]:[[e(lt),n(h(ct))],[e(bt),n(h(ct+m))]];return w(St)}:(it,ot,ct,gt)=>{const tt=e(ot.x,!o),ft=n(ot.value,o),lt=ct+gt,bt=e(d(ct),!o),St=n(h(ct),o);let Mt=e(d(lt),!o),Ot=n(h(lt),o);Mt>tt&&(Mt=tt),it.value>ot.value&&(o?Ot<ft:Ot>ft)&&(Ot=ft);const Kt=[[bt,St],[Mt,Ot]];return o&&Kt.forEach(ee=>ee.reverse()),w(Kt)},z={x:i.axis.getAxisType("x"),y:i.axis.getAxisType("y")};let B="";if(!t.length)return B;const W=i.$el.line.filter(({id:it})=>it===t[0].id),H=W.clone().style("display","none"),_=(it,ot)=>it.attr("d",ot).node().getTotalLength(),q={dash:[],lastLength:0};let st=!1;for(let it=0,ot;ot=t[it];it++){const ct=t[it-1],gt=ct&&Ge(ct.value);let tt=i.isWithinRegions(ot.x,u);if(Ge(ot.value)){if(mn(u)||!tt||!gt)B+=`${it&>?"L":"M"}${E(ot)},${C(ot)}`;else if(gt)if(tt=((tt==null?void 0:tt.dasharray)||c).split(" ").map(Number),d=sa(z.x,ct.x,ot.x),h=sa(z.y,ct.value,ot.value),f){const ft=e(ot.x)-e(ct.x),lt=n(ot.value)-n(ct.value),bt=Math.sqrt(ft*ft+lt*lt);m=tt[0]/bt,S=m*tt[1];for(let St=m;St<=1;St+=S)B+=$(ct,ot,St,m),St+S>=1&&(B+=$(ct,ot,1,0))}else{let ft;if(st=ot.x===t[t.length-1].x,l){const Mt=+ct.x,Ot=new Date(Mt),Kt=new Date(Mt+(+ot.x-Mt));ft=[[e(Ot),n(h(0))],[e(Kt),n(h(1))]]}else ft=[[e(d(0)),n(h(0))],[e(d(1)),n(h(1))]];o&&ft.forEach(Mt=>Mt.reverse());const lt=_(H,B),bt=_(H,B+=`L${ft[1].join(",")}`),St=t2(lt-q.lastLength,bt-q.lastLength,tt,st);q.lastLength+=St.length,q.dash.push(St.dash)}}}return q.dash.length&&(!st&&q.dash.push(_(H,B)),W.attr("stroke-dasharray",q.dash.join(" "))),H.remove(),B},isWithinRegions(t,e){return Ed(t,e)},isWithinStep(t,e){return Math.abs(e-Jn(this.state.event,t)[1])<30},shouldDrawPointsForLine(t){const e=this.config.line_point;return e===!0||qe(e)&&e.indexOf(t.id)!==-1}};const bi=()=>Cr(),Jg=new WeakMap;function Qg(t){const e=t.getAttribute("height"),n=t.getAttribute("width"),r=t.getAttribute("href")||t.getAttribute("xlink:href"),i=Jg.get(t);if(i&&i.attrHeight===e&&i.attrWidth===n&&i.href===r)return i;const{width:s,height:o}=ha(t),l={attrHeight:e,attrWidth:n,height:o,href:r,width:s};return Jg.set(t,l),l}var tl={initialOpacityForCircle(t){const{config:e,state:{withoutFadeIn:n}}=this;let r=e.point_opacity;return mn(r)&&(r=this.getBaseValue(t)!==null&&n[t.id]?this.opacityForCircle(t):"0"),r},opacityForCircle(t){var e;const{config:n}=this;let r=n.point_opacity;return mn(r)&&(r=n.point_show&&!((e=this.isPointFocusOnly)!=null&&e.call(this))?null:"0",r=Ge(this.getBaseValue(t))?this.isBubbleType(t)||this.isScatterType(t)?"0.5":r:"0"),r},initCircle(){const t=this,{$el:{main:e}}=t;!t.point&&(t.point=t.generatePoint()),(t.hasType("bubble")||t.hasType("scatter"))&&e.select(`.${ze.chart} > .${$n.chartCircles}`).empty()&&e.select(`.${ze.chart}`).append("g").attr("class",$n.chartCircles)},updateTargetForCircle(t,e){const n=this,{config:r,data:i,$el:s}=n,o=r.interaction_enabled&&r.data_selection_enabled,l=o&&r.data_selection_isselectable,c=n.getClass("circles",!0);if(!r.point_show)return;n.initCircle();let u=t,f=e;if(!u){u=n.filterNullish(i.targets).filter(h=>this.isScatterType(h)||this.isBubbleType(h));const d=s.main.select(`.${$n.chartCircles}`).style("pointer-events","none").selectAll(`.${$n.circles}`).data(u);d.exit().remove(),f=d.enter()}o&&f.append("g").attr("class",d=>n.generateClass(on.selectedCircles,d.id)),f.append("g").attr("class",c).call(d=>{n.setCssRule(!0,`.${$n.circles}`,["cursor:pointer"],l)(d),n.setCssRule(!0,` .${$n.circle}`,["fill","stroke"],n.color)(d)}).style("opacity",function(){return Yt(this.parentNode).classed($n.chartCircles)?"0":null}),o&&u.forEach(d=>{s.main.selectAll(`.${on.selectedCircles}${n.getTargetSelectorSuffix(d.id)}`).selectAll(`${on.selectedCircle}`).each(h=>{h.value=d.values[h.index].value})})},updateCircle(t=!1){const e=this,{config:n,state:r,$el:i}=e,s=e.isPointFocusOnly(),o=t?i.subchart:i;if(n.point_show&&!r.toggling){n.point_radialGradient&&e.updateLinearGradient();const l=o.main.selectAll(`.${$n.circles}`).selectAll(`.${$n.circle}`).data(d=>{const h=e.isLineType(d)&&e.shouldDrawPointsForLine(d)||e.isBubbleType(d)||e.isRadarType(d)||e.isScatterType(d)?s?[d.values[0]]:d.values:[];return e.filterNullish(h)});l.exit().remove();const c=e.pointR.bind(e),u=e.generateUpdateCircleColor(),f=e.initialOpacityForCircle.bind(e);l.enter().filter(Boolean).append(e.point("create",this,c,u)),o.circle=o.main.selectAll(`.${$n.circles} .${$n.circle}`).style("stroke",e.getStylePropValue(e.color)).style("opacity",f)}},generateUpdateCircleColor(){const t=this,e=t.getStylePropValue(t.color);return n=>t.config.point_radialGradient?t.getGradienColortUrl(n.id):e?e(n):null},updateCircleColor(t){return this.generateUpdateCircleColor()(t)},redrawCircle(t,e,n,r,i=!1){const s=this,{state:{rendered:o},$el:l,$T:c}=s,u=i?l.subchart:l,f=u.main.selectAll(`.${on.selectedCircle}`);if(!s.config.point_show)return[];const d=s.isCirclePoint()?"c":"",h=Cr(),m=s.opacityForCircle.bind(s),S=s.generateUpdateCircleColor();if(s.isCirclePoint()){const w=u.circle;return s.hasType("bubble")&&w.attr("r",s.pointR.bind(s)),n?(r&&w.attr("cx",t),c(w.filter(function(){return!!this.getAttribute("cx")}),!0,`${h}-pos`).attr("cx",t).attr("cy",e).style("fill",S),w.filter(function(){return!this.getAttribute("cx")}).attr("cx",t).attr("cy",e).style("fill",S)):w.attr("cx",t).attr("cy",e).style("fill",S),[[c(w,n||!o,h).style("opacity",m)],c(f,n).attr("cx",t).attr("cy",e)]}const E=s.point("update",s,t,e,S,n,r,f),C=[];return u.circle.each(function(w){let $=E.bind(this)(w);$=c($,n||!o,h).style("opacity",m),C.push($)}),[C,c(f,n).attr(`${d}x`,t).attr(`${d}y`,e)]},showCircleFocus(t){const e=this,{state:{hasRadar:n,resizing:r,toggling:i,transiting:s},$el:o}=e;let{circle:l}=o;if(s===!1&&l&&e.isPointFocusOnly()){const c=(n?e.radarCircleX:e.circleX).bind(e),u=(n?e.radarCircleY:e.circleY).bind(e),f=i||mn(t),d=e.point("update",e,c,u,e.getStylePropValue(e.color),r?!1:f);t&&(l=l.filter(function(h){var m;const S=(m=t.filter)==null?void 0:m.call(t,E=>E.id===h.id);return S.length?Yt(this).datum(S[0]):!1})),l.attr("class",this.updatePointClass.bind(this)).style("opacity",null).each(function(h){const{id:m,index:S,value:E}=h;let C="hidden";Ge(E)&&(d.bind(this)(h),e.expandCircles(S,m),C=""),this.style.visibility=C})}},hideCircleFocus(){const t=this,{$el:{circle:e}}=t;t.isPointFocusOnly()&&e&&(t.unexpandCircles(),e.style("visibility","hidden"))},expandCircles(t,e,n){const r=this,i=r.pointExpandedR.bind(r);n&&r.unexpandCircles();const s=r.getShapeByIndex("circle",t,e).classed(ze.EXPANDED,!0),o=i(s)/r.config.point_r,l=1-o;r.isCirclePoint()?s.attr("r",i):s.each(function(){const c=Yt(this);if(this.tagName==="circle")c.attr("r",i);else{const{width:u,height:f}=Qg(this),d=l*(+c.attr("x")+u/2),h=l*(+c.attr("y")+f/2);c.attr("transform",`translate(${d} ${h}) scale(${o})`)}})},unexpandCircles(t){const e=this,n=e.pointR.bind(e),r=e.getShapeByIndex("circle",t).filter(function(){return Yt(this).classed(ze.EXPANDED)}).classed(ze.EXPANDED,!1);if(r.attr("r",n),!e.isCirclePoint()){const i=n(r)/e.config.point_r;r.attr("transform",i!==1?`scale(${i})`:null)}},isWithinCircle(t,e){const{state:n}=this,r=Jn(n.event,t),i=Yt(t),s=this.isCirclePoint(t)?"c":"",o=this.getPointSensitivity(i==null?void 0:i.datum());let l=+i.attr(`${s}x`),c=+i.attr(`${s}y`);if(!(l||c)&&t.nodeType===1){const{x:d,y:h}=ln(t);l=d,c=h}const u=l-r[0],f=c-r[1];return Math.sqrt(u*u+f*f)<(e||o)},updatePointClass(t){const e=this,{circle:n}=e.$el;let r=!1;return(He(t)||n)&&(r=t===!0?n.each(function(i){let s=e.getClass("circle",!0)(i);this.getAttribute("class").indexOf(ze.EXPANDED)>-1&&(s+=` ${ze.EXPANDED}`),this.setAttribute("class",s)}):e.getClass("circle",!0)(t)),r},custom:{create(t,e,n){return t.append("use").attr("xlink:href",`#${e}`).attr("class",this.updatePointClass.bind(this)).style("fill",n).node()},update(t,e,n,r,i,s,o){const l=this,{width:c,height:u}=Qg(t.node()),f=m=>Ge(m.value)?e(m)-c/2:0,d=m=>Ge(m.value)?n(m)-u/2:0;let h=t;return i&&(s&&h.attr("x",f),h=l.$T(h,i,bi()),o&&l.$T(o,i,bi())),h.attr("x",f).attr("y",d).style("fill",r)}},circle:{create(t,e,n){return t.append("circle").attr("class",this.updatePointClass.bind(this)).attr("r",e).style("fill",n).node()},update(t,e,n,r,i,s,o){const l=this;let c=t;return l.hasType("bubble")&&c.attr("r",l.pointR.bind(l)),i&&(s&&c.attr("cx",e),c.attr("cx")&&(c=l.$T(c,i,bi())),o&&l.$T(o,i,bi())),c.attr("cx",e).attr("cy",n).style("fill",r)}},rectangle:{create(t,e,n){const r=i=>e(i)*2;return t.append("rect").attr("class",this.updatePointClass.bind(this)).attr("width",r).attr("height",r).style("fill",n).node()},update(t,e,n,r,i,s,o){const l=this,c=l.config.point_r,u=h=>e(h)-c,f=h=>n(h)-c;let d=t;return i&&(s&&d.attr("x",u),d=l.$T(d,i,bi()),o&&l.$T(o,i,bi())),d.attr("x",u).attr("y",f).style("fill",r)}}},ka={point_show:!0,point_r:2.5,point_radialGradient:!1,point_sensitivity:10,point_focus_expand_enabled:!0,point_focus_expand_r:void 0,point_focus_only:!1,point_opacity:void 0,point_pattern:[],point_select_r:void 0,point_type:"circle"},n2={line_connectNull:!1,line_step_type:"step",line_step_tooltipMatch:!1,line_zerobased:!1,line_classes:void 0,line_point:!0};function _g(t,e,n){const{config:r}=t,i=(s,o)=>{const l=ae(o)?o:o===!1?void 0:null;l!==null&&(r[`axis_${s}_${e}`]=l)};sn(n)&&(Kn(n)?Object.keys(n).forEach(s=>{i(s,n[s])}):(ae(n)||n===!1)&&["y","y2"].forEach(s=>{i(s,n)}),t.state.dirty.data=!0,t.redraw({withUpdateOrgXDomain:!0,withUpdateXDomain:!0}))}function qg(t,e){const{config:n}=t;return{x:n[`axis_x_${e}`],y:n[`axis_y_${e}`],y2:n[`axis_y2_${e}`]}}var r2={axis:{labels:function(t){var e;const n=this.internal;let r;return t&&(Object.keys(t).forEach(i=>{n.axis.setLabelText(i,t[i])}),n.state.isCanvasMode?(e=n.renderCanvasFrame)==null||e.call(n,void 0,null,!1):n.axis.updateLabels()),["x","y","y2"].forEach(i=>{const s=n.axis.getLabelText(i);s&&(!r&&(r={}),r[i]=s)}),r},min:function(t){const e=this.internal;return Ge(t)||t===!1?_g(e,"min",t):qg(e,"min")},max:function(t){const e=this.internal;return Ge(t)||t===!1?_g(e,"max",t):qg(e,"max")},range:function(t){const{axis:e}=this;if(arguments.length){const{min:n,max:r}=t;sn(r)&&e.max(r),sn(n)&&e.min(n)}else return{max:e.max(),min:e.min()}}}},a2={groups(t){const e=this.internal,{config:n}=e;return mn(t)||(n.data_groups=t,e.state.dirty.data=!0,e.redraw()),n.data_groups}},i2={x(t){const e=this.internal,{axis:n,data:r}=e,i=n.isCustomX()&&n.isCategorized();return qe(t)&&(i?this.categories(t):(e.updateTargetX(r.targets,t),e.state.dirty.data=!0,e.redraw({withUpdateOrgXDomain:!0,withUpdateXDomain:!0}))),i?this.categories():r.xs},xs(t){const e=this.internal;return He(t)&&(e.updateTargetXs(e.data.targets,t),e.state.dirty.data=!0,e.redraw({withUpdateOrgXDomain:!0,withUpdateXDomain:!0})),e.data.xs}},s2=Object.defineProperty,o2=(t,e,n)=>e in t?s2(t,e,{enumerable:!0,configurable:!0,writable:!0,value:n}):t[e]=n,el=(t,e,n)=>o2(t,typeof e!="symbol"?e+"":e,n);class l2{constructor(e){el(this,"owner"),el(this,"config"),el(this,"scale"),el(this,"charSize",{});const n=sa(),{config:r,params:i}=e;this.owner=e,this.config=r,this.scale=n,(r.noTransition||!i.config.transition_duration)&&(r.withoutTransition=!0),r.range=this.scaleExtent((i.orgXScale||n).range())}getSizeFor1Char(e,n,r=!0){const i={w:5.5,h:11.5};return this.charSize[e]&&r?this.charSize[e]:(!n.empty()&&n.text("0").call(s=>{try{const{width:o,height:l}=ha(s.node(),!0);o&&l&&(i.w=o,i.h=l)}finally{s.text("")}}),this.charSize[e]=i,i)}getTickTransformSetter(e){const{config:n}=this,r=e==="x"?i=>`translate(${i+n.tickOffset},0)`:i=>`translate(0,${i})`;return(i,s)=>{i.attr("transform",o=>{const l=s(o);return Ge(o)?r(l):null})}}scaleExtent(e){const n=e[0],r=e[e.length-1];return n<r?[n,r]:[r,n]}generateTicks(e,n){const{tickStepSize:r}=this.owner.params,[i,s]=e.domain();let o=[];if(n&&r){let l=Math.round(i);for(;l<=s;)o.push(l),l+=r}else if(e.ticks){const{tickArguments:l}=this.config;if(e.type==="log"&&!l){const c=sa("_log").domain([i>0?i:1,s]).range(e.range());o=c.ticks();for(let u=s.toFixed().length;o.length>15;u--)o=c.ticks(u);o.splice(0,1,i),o.splice(o.length-1,1,s)}else o=e.ticks(...this.config.tickArguments||[])}return o}copyScale(){const e=this.scale.copy();return e.domain().length||e.domain(this.scale.domain()),e.type=this.scale.type,e}textFormatted(e){const n=this.config.tickFormat,r=/\d+\.\d+0{5,}\d$/.test(e)?+String(e).replace(/0+\d$/,""):e,i=n?n(r):r;return sn(i)?i:""}transitionise(e){const{config:n}=this;let r=e;if(n.withoutTransition)r=e.interrupt();else if(n.transition||!this.owner.params.noTransition)try{r=e.transition(n.transition)}catch(i){}return r}}var c2=Object.defineProperty,u2=(t,e,n)=>e in t?c2(t,e,{enumerable:!0,configurable:!0,writable:!0,value:n}):t[e]=n,ys=(t,e,n)=>u2(t,typeof e!="symbol"?e+"":e,n);function nl(t){return t==="subX"?"x":t==="subY"?"y":t==="subY2"?"y2":t}function f2(t){const e=nl(t);return/^sub/.test(t)?`subchart_axis_${e}`:`axis_${e}`}class tp{constructor(e={}){ys(this,"helper"),ys(this,"config"),ys(this,"params"),ys(this,"g"),ys(this,"generatedTicks",[]);const n={innerTickSize:xt,outerTickSize:e.outerTick?xt:0,orient:"bottom",range:[],tickArguments:null,tickCentered:null,tickCulling:!0,tickFormat:null,tickLength:Gt,tickOffset:0,tickPadding:mt,tickValues:null,transition:null,noTransition:e.noTransition};n.tickLength=Math.max(n.innerTickSize,0)+n.tickPadding,this.config=n,this.params=e,this.helper=new l2(this)}canReuseTickTextOnResize(e){const{config:n,params:r}=this,{config:i,id:s,owner:o}=r,l=/^(x|subX)$/.test(s),c=nl(s),u=/^sub/.test(s)?i[`subchart_axis_${c}_tick_format`]||i[`axis_${c}_tick_format`]:i[`axis_${c}_tick_format`],f=r.tickMultiline&&r.isCategory&&!e&&!(r.tickWidth>0);return!!(o.state.resizing&&!o.state.flowing&&!ie(i.axis_evalTextSize)&&!u&&!r.tickTitle&&!(l&&i.axis_x_tick_autorotate)&&!f&&n.withoutTransition)}canReuseTickNodesOnResize(e,n,r,i){if(i.tick||!i.text||!this.canReuseTickTextOnResize(r)||e.size()!==n.length)return!1;const s=e.nodes();for(let o=0;o<n.length;o++){const l=s[o].__data__,c=n[o];if(l instanceof Date||c instanceof Date){if(+l!=+c)return!1}else if(l!==c)return!1}return!0}create(e){const n=this,{config:r,helper:i,params:s}=n,{scale:o}=i,{orient:l}=r,c=this.splitTickText.bind(n),u=/^(left|right)$/.test(l),f=/^(top|bottom)$/.test(l),d=i.getTickTransformSetter(f?"x":"y"),h=d===i.axisX?"y":"x",m=/^(top|left)$/.test(l)?-1:1,S=s.tickTextRotate;this.config.range=o.rangeExtent?o.rangeExtent():i.scaleExtent((s.orgXScale||o).range());const{innerTickSize:E,tickLength:C,range:w}=r,$=s.id,z=nl($),{isSubAxes:B}=s,W=!B&&z&&/^(x|y|y2)$/.test(z)?s.config[`axis_${z}_tick_text_position`]:{x:0,y:0},H=f2($),_=s.config[`${H}_show`],q=B?{tick:!0,text:!0}:{tick:_?s.config[`${H}_tick_show`]:!1,text:_?s.config[`${H}_tick_text_show`]:!1},st=s.config.axis_evalTextSize;let it;e.each(function(){const ot=Yt(this);let ct=this.__chart__||o,gt=i.copyScale();it=ot,this.__chart__=gt,r.tickOffset=s.isCategory?(gt(1)-gt(0))/2:0;const tt=ot.selectAll(".domain").data([0]);if(tt.enter().append("path").attr("class","domain").merge(tt).attr("d",()=>{const ft=r.outerTickSize*m;return f?`M${w[0]},${ft}V0H${w[1]}V${ft}`:`M${ft},${w[0]}H0V${w[1]}H${ft}`}),q.tick||q.text){const ft=r.tickValues||i.generateTicks(gt,u||s.config.axis_rotated);n.generatedTicks=ft;let lt=ot.selectAll(".tick");if(n.canReuseTickNodesOnResize(lt,ft,u||s.config.axis_rotated,q))d(lt,gt);else{lt=lt.data(ft,gt);const St=lt.enter().insert("g",".domain").attr("class","tick"),Mt=lt.exit().remove();lt=St.merge(lt),q.tick&&St.append("line"),q.text&&St.append("text");const Ot=!St.empty()||!Mt.empty(),Kt=q.text&&!Ot&&n.canReuseTickTextOnResize(u||s.config.axis_rotated);let ee={w:0,h:0},Ae=lt.selectAll("text.__bb-empty");if(q.text&&!Kt){const Te=lt.select("text"),De=[];Ae=Te,ie(st)&&(ee=st.bind(n.params.owner.api)(Te.node(),$),this.classList.contains(ze.dummy)&&(this.sizeFor1Char=ee)),(!ee||ee.w===0||ee.h===0)&&(ee=n.helper.getSizeFor1Char(l,Te,!!st));let me=Te.selectAll("tspan").data((Pe,Zt)=>{let he;if(s.tickMultiline)he=c(Pe,gt,ft,u,ee.w);else{const ge=i.textFormatted(Pe);he=qe(ge)?ge.concat():[ge]}return De[Zt]=he.length,he.map(ge=>({index:Zt,splitted:ge}))});me.exit().remove(),me=me.enter().append("tspan").merge(me).text(Pe=>Pe.splitted),me.attr("x",f?0:C*m).attr("dx",(()=>{let Pe=0;return/(top|bottom)/.test(l)&&S&&(Pe=8*Math.sin(Math.PI*(S/180))*(l==="top"?-1:1)),Pe+(W.x||0)})()).attr("dy",(Pe,Zt)=>{const he=".71em";let ge=0;return l!=="top"&&(ge=ee.h,Zt===0&&(ge=u?-((De[Pe.index]-1)*(ee.h/2)-3):W.y===0?he:0)),ae(ge)&&W.y?ge+W.y:ge||he})}const Ee=lt.select("line");if(St.select("line").attr(`${h}2`,E*m),St.select("text").attr(h,C*m),n.setTickLineTextPosition(Ee,Ae,ee),s.tickTitle){const Te=Ae.select("title"),De=s.tickTitle;(Te.empty()?Ae.append("title"):Te).text(me=>De[Number(me)])}if(gt.bandwidth){const Te=gt,De=Te.bandwidth()/2;ct=me=>Te(me)+De,gt=ct}else ct.bandwidth?ct=gt:d(Mt,gt);lt=s.owner.state.flowing?i.transitionise(lt):s.owner.$T(lt),d(St,ct),d(lt.style("opacity",null),gt)}}}),this.g=it}getGeneratedTicks(e){var n;const r=((n=this.generatedTicks)==null?void 0:n.length)-1;let i=this.generatedTicks;if(r>e){const s=Math.round(r/e+.1);i=this.generatedTicks.map((o,l)=>l%s===0?o:null).filter(o=>o!==null).splice(0,e)}return i}getTickXY(){const{config:e}=this,n={x:0,y:0};return this.params.isCategory&&(n.x=e.tickCentered?0:e.tickOffset,n.y=e.tickCentered?e.tickOffset:0),n}getTickSize(e){const{scale:n}=this.helper,{config:r}=this,{innerTickSize:i,range:s}=r,o=n(e)+(r.tickCentered?0:r.tickOffset);return s[0]<o&&o<s[1]?i:0}setTickLineTextPosition(e,n,r){const i=this.getTickXY(),{innerTickSize:s,orient:o,tickLength:l,tickOffset:c}=this.config,u=this.params.id,f=this.params.tickTextRotate,d=6,h=r.h/2-d,m=z=>{const B=["start","end"];return o==="top"&&B.reverse(),z?B[z>0?0:1]:"middle"},S=z=>z?`rotate(${z})`:null,E=z=>{const B=z/(o==="bottom"?15:23);return z?11.5-2.5*B*(z>0?1:-1):l},{config:{axis_rotated:C,axis_x_tick_text_inner:w}}=this.params.owner,$=this.params.config[`axis_${nl(u)}_tick_inner`];switch(o){case"bottom":e.attr("x1",i.x).attr("x2",i.x).attr("y2",z=>this.getTickSize.bind(this)(z)*($?-1:1)),n.attr("x",0).attr("y",E(f)).style("text-anchor",(z,B,{length:W})=>!C&&B===0&&(w===!0||w.first)?"start":!C&&B===W-1&&(w===!0||w.last)?"end":m(f)).attr("transform",S(f));break;case"top":e.attr("x2",0).attr("y2",$?s:-s),n.attr("x",0).attr("y",-(E(f)+h+d)).style("text-anchor",m(f)).attr("transform",S(f));break;case"left":e.attr("x2",$?s:-s).attr("y1",i.y).attr("y2",i.y),n.attr("x",-l).attr("y",c+(C?h/4:h)).style("text-anchor","end");break;case"right":e.attr("x2",$?-s:s).attr("y2",0),n.attr("x",l).attr("y",h).style("text-anchor","start")}}splitTickText(e,n,r,i,s){const{params:o}=this,l=this.helper.textFormatted(e),c=je(l)&&l.indexOf(`
`)>-1?l.split(`
`):[];if(c.length)return c;if(qe(l))return l;let u=o.tickWidth;(!u||u<=0)&&(u=i?95:o.isCategory?(o.isInverted?n(r[0])-n(r[1]):n(r[1])-n(r[0]))-12:110);function f(d,h){let m,S,E;for(let C=1;C<h.length;C++)if(h.charAt(C)===" "&&(S=C),m=h.substr(0,C+1),E=s*m.length,u<E)return f(d.concat(h.substr(0,S||C)),h.slice(S?S+1:C));return d.concat(h)}return f(c,String(l))}scale(e){return arguments.length?(this.helper.scale=e,this):this.helper.scale}orient(e){return arguments.length?(this.config.orient=e in{top:1,right:1,bottom:1,left:1}?String(e):"bottom",this):this.config.orient}tickFormat(e){const{config:n}=this;return arguments.length?(n.tickFormat=e,this):n.tickFormat}tickCentered(e){const{config:n}=this;return arguments.length?(n.tickCentered=e,this):n.tickCentered}tickOffset(){return this.config.tickOffset}tickInterval(e){var n,r,i;const{outerTickSize:s,tickOffset:o,tickValues:l}=this.config;let c;if(this.params.isCategory){const u=(n=this.params.owner.scale.zoom)!=null?n:this.helper.scale;c=o*2||Math.abs(u(1)-u(0))}else{const u=(r=this.params.owner.scale.zoom)!=null?r:this.helper.scale;if(c=(this.g?this.g.select("path.domain").node().getTotalLength()-s*2:Math.abs(u.range()[1]-u.range()[0]))/(e||((i=this.g)==null?void 0:i.selectAll("line").size())||1),l)for(let d=0;d<l.length-1;d++){const h=u(l[d+1])-u(l[d]);h&&h<c&&(c=h)}}return c===1/0?0:c}ticks(...e){const{config:n}=this;return e.length?(n.tickArguments=Oa(e),this):n.tickArguments}tickCulling(e){const{config:n}=this;return arguments.length?(n.tickCulling=e,this):n.tickCulling}tickValues(e){const{config:n}=this;if(ie(e))n.tickValues=()=>e(this.helper.scale.domain());else{if(!arguments.length)return n.tickValues;n.tickValues=e}return this}setTransition(e){return this.config.transition=e,this}}var d2=Object.defineProperty,h2=Object.defineProperties,v2=Object.getOwnPropertyDescriptors,ep=Object.getOwnPropertySymbols,g2=Object.prototype.hasOwnProperty,p2=Object.prototype.propertyIsEnumerable,yu=(t,e,n)=>e in t?d2(t,e,{enumerable:!0,configurable:!0,writable:!0,value:n}):t[e]=n,m2=(t,e)=>{for(var n in e||(e={}))g2.call(e,n)&&yu(t,n,e[n]);if(ep)for(var n of ep(e))p2.call(e,n)&&yu(t,n,e[n]);return t},x2=(t,e)=>h2(t,v2(e)),Sr=(t,e,n)=>yu(t,typeof e!="symbol"?e+"":e,n);function Tu(t){return t==="subX"?"x":t==="subY"?"y":t==="subY2"?"y2":t}function rl(t){return/^sub/.test(t)}function pa(t,e,n){const r=Tu(e),i=t[`subchart_axis_${r}_tick_${n}`];return rl(e)&&i!==void 0?i:t[`axis_${r}_tick_${n}`]}function y2(t){var e,n;const r=[t[0],t[t.length-1]];let i=0,s=null;for(const l of t){const c=(n=(e=l.textContent)==null?void 0:e.length)!=null?n:0;c>i&&(i=c,s=l)}s&&!r.includes(s)&&r.push(s);const o=t[Math.floor(t.length/2)];return r.includes(o)||r.push(o),r}const al=50,bu=Symbol("tickWidthFallback");function T2(t){var e,n,r;const i=t.select("line").node(),s=(n=(e=i==null?void 0:i.ownerDocument)==null?void 0:e.defaultView)!=null&&n.getComputedStyle?parseFloat(i.ownerDocument.defaultView.getComputedStyle(i).strokeWidth):parseFloat((r=i==null?void 0:i.getAttribute)==null?void 0:r.call(i,"stroke-width"));return Number.isFinite(s)&&s>0?s:1}function b2(t,e,n){var r;const i=(r=t==null?void 0:t.scale)==null?void 0:r.call(t);if(!i||e.length<2)return!1;const s=Math.max(1,n)/2,o=e.map(c=>+i(c)).filter(Number.isFinite).sort((c,u)=>c-u);if(o.length<2)return!1;let l=o[0]+s;for(let c=1;c<o.length;c++){const u=o[c]-s,f=o[c]+s;if(u<=l+Se)return!0;l=Math.max(l,f)}return!1}function S2(t,e){if(t.length<=al)return t;const n=new Map,r=l=>{l>=0&&l<t.length&&n.set(l,t[l])};r(0),r(t.length-1),r(Math.floor(t.length/2));const i=Math.max(1,Math.floor(t.length/(al-3)));let s=-1,o=0;for(let l=0;l<t.length;l+=i){r(l);const c=t[l],u=e?e(c):c,f=Array.isArray(u)?u.join("").length:String(u!=null?u:"").length;f>s&&(s=f,o=l)}return r(o),Array.from(n.keys()).sort((l,c)=>l-c).map(l=>n.get(l))}function A2(t){return ie(t)?rp(t):!Array.isArray(t)||t.length<=al?t:{length:t.length,first:t[0],middle:t[Math.floor(t.length/2)],last:t[t.length-1]}}function Su(t){return t[bu]}function il(t,e){ae(e)?Object.defineProperty(t,bu,{configurable:!0,value:e,writable:!0}):delete t[bu]}function Au(t){t.length=0,il(t)}function E2(t,e,n){Au(t),t.length=e,il(t,n)}function C2(t){const e=[];return e.length=t.length,Object.keys(t).forEach(n=>{const r=+n;e[r]=t[r]}),il(e,Su(t)),e}function I2(t,e){Au(t),t.length=e.length,Object.keys(e).forEach(n=>{const r=+n;t[r]=e[r]}),il(t,Su(e))}function R2(t,e,n){const r=t[e];if(ae(r))return r;const i=Number(r);return Number.isFinite(i)?i:n}const np=new WeakMap;let w2=0;function rp(t){if(!t||!/^(function|object)$/.test(typeof t))return`${typeof t}:${String(t)}`;let e=np.get(t);return e||(e=++w2,np.set(t,e)),`${typeof t}:${e}`}function Eu(t){return t instanceof Date?`date:${+t}`:Array.isArray(t)?`[${t.map(e=>Eu(e)).join(",")}]`:t&&typeof t=="object"?`{${Object.keys(t).sort().map(e=>`${e}:${Eu(t[e])}`).join(",")}}`:typeof t=="function"?rp(t):`${typeof t}:${String(t)}`}function Cu(t){return t instanceof Date?new Date(+t):Array.isArray(t)?t.map(e=>Cu(e)):t}function O2(t){return{width:t.width,height:t.height,ticks:t.ticks&&C2(t.ticks),clipPath:t.clipPath,domain:Cu(t.domain)}}function P2(t,e){return t.width=e.width,t.height=e.height,t.clipPath=e.clipPath,t.domain=Cu(e.domain),t.ticks&&e.ticks&&I2(t.ticks,e.ticks),t}var M2={getAxisInstance:function(){return this.axis||new L2(this)}};class L2{constructor(e){Sr(this,"owner"),Sr(this,"x"),Sr(this,"subX"),Sr(this,"subY"),Sr(this,"subY2"),Sr(this,"y"),Sr(this,"y2"),Sr(this,"axesList",{}),Sr(this,"tick",{x:null,y:null,y2:null}),Sr(this,"xs",[]),Sr(this,"orient",{x:"bottom",y:"left",y2:"right",subX:"bottom",subY:"left",subY2:"right"}),this.owner=e,this.setOrient()}getAxisClassName(e){return`${Rn.axis} ${Rn[`axis${Ln(e)}`]}`}isHorizontal(e,n){const r=e.config.axis_rotated;return n?r:!r}isCategorized(){const{config:e,state:n}=this.owner;return e.axis_x_type.indexOf("category")>=0||n.hasRadar}isCustomX(){const{config:e}=this.owner;return!this.isTimeSeries()&&(e.data_x||vn(e.data_xs))}isTimeSeries(e="x"){return this.owner.config[`axis_${e}_type`]==="timeseries"}isLog(e="x"){return this.owner.config[`axis_${e}_type`]==="log"}isTimeSeriesY(){return this.isTimeSeries("y")}getAxisType(e="x"){let n="linear";return this.isTimeSeries(e)?n=this.owner.config.axis_x_localtime?"time":"utc":this.isLog(e)&&(n="log"),n}getExtent(){const e=this.owner,{config:n,scale:r}=e;let i=n.axis_x_extent;if(i){if(ie(i))i=i.bind(e.api)(e.getXDomain(e.data.targets),r.subX);else if(this.isTimeSeries()&&i.every(isNaN)){const s=Wn.bind(e);i=i.map(o=>r.subX(s(o)))}}return i}init(){const e=this.owner,{config:n,$el:{main:r,axis:i},state:{clip:s}}=e,o=["x","y"];n.axis_y2_show&&o.push("y2"),o.forEach(l=>{const c=this.getAxisClassName(l);i[l]=r.append("g").attr("class",c).attr("clip-path",()=>{let u=null;return l==="x"?u=s.pathXAxis:l==="y"&&(u=s.pathYAxis),u}).attr("transform",e.getTranslate(l)).style("visibility",n[`axis_${l}_show`]?null:"hidden"),this.generateAxes(l)})}setOrient(){const e=this.owner,{axis_rotated:n,axis_y_inner:r,axis_y2_inner:i}=e.config;this.orient={x:n?"left":"bottom",y:n?r?"top":"bottom":r?"right":"left",y2:n?i?"bottom":"top":i?"left":"right",subX:n?"left":"bottom",subY:n?r?"top":"bottom":r?"right":"left",subY2:n?i?"bottom":"top":i?"left":"right"}}generateAxes(e){const n=this.owner,{config:r}=n,i=[],s=r[`axis_${e}_axes`],o=r.axis_rotated;let l;e==="x"?l=o?"left":"bottom":e==="y"?l=o?"bottom":"left":e==="y2"&&(l=o?"top":"right"),s.length&&s.forEach(c=>{const u=c.tick||{},f=n.scale[e].copy();c.domain&&f.domain(c.domain);const d=new tp({outerTick:u.outer!==!1,noTransition:!1,config:r,id:e,isSubAxes:!0,owner:n}).scale(f).orient(l).tickFormat(ie(u.format)?u.format.bind(n.api):(h=>h));Ge(u.count)&&d.ticks(u.count),u.values&&d.tickValues(u.values),i.push(d)}),this.axesList[e]=i}updateAxes(){const e=this.owner,{config:n,$el:{main:r},$T:i}=e;Object.keys(this.axesList).forEach(s=>{const o=n[`axis_${s}_axes`],l=e.scale[s].copy(),c=l.range();this.axesList[s].forEach((u,f)=>{const d=u.scale().range();c.every((S,E)=>S===d[E])||u.scale().range(c);const h=`${this.getAxisClassName(s)}-${f+1}`;let m=r.select(`.${h.replace(/\s/,".")}`);m.empty()?(m=r.append("g").attr("class",h).style("visibility",n[`axis_${s}_show`]?null:"hidden"),u.create(m)):(o[f].domain&&l.domain(o[f].domain),u.scale(l).create(i(m))),m.attr("transform",e.getTranslate(s,f+1))})})}setAxis(e,n,r,i){const s=this.owner,o=Tu(e);rl(e)||(this.tick[o]=this.getTickValues(o)),this[e]=this.getAxis(e,n,r,e==="x"&&(s.scale.zoom||s.config.subchart_show||s.state.resizing)?!0:i)}getAxis(e,n,r,i,s){const o=this.owner,{config:l}=o,c=/^(x|subX)$/.test(e),u=Tu(e),f=c&&this.isCategorized(),d=this.orient[e],h=s?0:o.getAxisTickRotate(u);let m;if(c)m=e==="subX"?o.format.subXAxisTick:o.format.xAxisTick;else{const $=rl(e)?l[`subchart_axis_${u}_tick_format`]||l[`axis_${u}_tick_format`]:l[`axis_${u}_tick_format`];ie($)&&(m=$.bind(o.api))}let S=rl(e)?this.getTickValues(u,!0):this.tick[u];const E=Xr({outerTick:r,noTransition:i,config:l,id:e,tickTextRotate:h,owner:o},c&&{isCategory:f,isInverted:l.axis_x_inverted,tickMultiline:l.axis_x_tick_multiline,tickWidth:l.axis_x_tick_width,tickTitle:f&&l.axis_x_tick_tooltip&&o.api.categories(),orgXScale:o.scale.x});c||(E.tickStepSize=l[`axis_${u}_tick_stepSize`]);const C=new tp(E).scale(c&&o.scale.zoom||n).orient(d);if(c&&this.isTimeSeries()&&S&&!ie(S)){const $=Wn.bind(o);S=S.map(z=>$(z))}else!c&&this.isTimeSeriesY()&&(C.ticks(l.axis_y_tick_time_value),S=null);S&&C.tickValues(S),C.tickFormat(m||!c&&o.isStackNormalized()&&o.hasAxisGroupedData(u)&&($=>`${$}%`)),f&&(C.tickCentered(l.axis_x_tick_centered),lr(l.axis_x_tick_culling)&&(l.axis_x_tick_culling=!1));const w=pa(l,e,"count");return w&&C.ticks(w),C}updateXAxisTickValues(e,n){var r;const i=this.owner,{config:s}=i,o=s.axis_x_tick_fit,l=(u=s.axis_x_tick_count)=>{let f=u,d;return o&&(d=i.mapTargetsToUniqueXs(e),this.isCategorized()&&f>d.length&&(f=d.length),d=this.generateTickValues(d,f,this.isTimeSeries())),d},c=l();if(n)n.tickValues(c);else if(this.x){const u=this.getTickValues("x",!0),f=pa(s,"subX","count"),d=u!=null?u:f!==s.axis_x_tick_count?l(f):c;this.x.tickValues(c),(r=this.subX)==null||r.tickValues(d)}return c}getId(e){const{config:n,scale:r}=this.owner;let i=n.data_axes[e];return(!i||!r[i])&&(i="y"),i}getXAxisTickFormat(e){const n=this.owner,{config:r,format:i}=n,s=e&&r.subchart_axis_x_tick_format||r.axis_x_tick_format,o=this.isTimeSeries(),l=this.isCategorized();let c;return s?ie(s)?c=s.bind(n.api):o&&(c=u=>u?i.axisTime(s)(u):""):c=o?i.defaultAxisTime:l?n.categoryName:u=>u<0?u.toFixed(0):u,ie(c)?u=>c.apply(n,l?[u,n.categoryName(u)]:[u]):c}getTickValues(e,n=!1){const r=this.owner,i=n?pa(r.config,`sub${Ln(e)}`,"values"):r.config[`axis_${e}_tick_values`],s=ie(i)?i.call(r.api):i,o=r[`${e}Axis`];return n?s!=null?s:void 0:s||(o?o.tickValues():void 0)}getLabelOptionByAxisId(e){return this.owner.config[`axis_${e}_label`]}getLabelText(e){const n=this.getLabelOptionByAxisId(e);return je(n)?n:n?n.text:null}setLabelText(e,n){const r=this.owner,{config:i}=r,s=this.getLabelOptionByAxisId(e);je(s)?i[`axis_${e}_label`]=n:s&&(s.text=n)}getLabelPosition(e,n){const r=this.owner.config.axis_rotated,i=this.getLabelOptionByAxisId(e),s=Kn(i)&&i.position?i.position:n[+!r],o=l=>!!~s.indexOf(l);return{isInner:o("inner"),isOuter:o("outer"),isLeft:o("left"),isCenter:o("center"),isRight:o("right"),isTop:o("top"),isMiddle:o("middle"),isBottom:o("bottom")}}getAxisLabelPosition(e){return this.getLabelPosition(e,e==="x"?["inner-top","inner-right"]:["inner-right","inner-top"])}xForAxisLabel(e){const n=this.owner,{state:{width:r,height:i}}=n,s=this.getAxisLabelPosition(e);let o=s.isMiddle?-i/2:0;return this.isHorizontal(n,e!=="x")?o=s.isLeft?0:s.isCenter?r/2:r:s.isBottom&&(o=-i),o}textAnchorForAxisLabel(e){const n=this.owner,r=this.getAxisLabelPosition(e);let i=r.isMiddle?"middle":"end";return this.isHorizontal(n,e!=="x")?i=r.isLeft?"start":r.isCenter?"middle":"end":r.isBottom&&(i="start"),i}dxForAxisLabel(e){const n=this.owner,r=this.getAxisLabelPosition(e);let i=r.isBottom?"0.5em":"0";return this.isHorizontal(n,e!=="x")?i=r.isLeft?"0.5em":r.isRight?"-0.5em":"0":r.isTop&&(i="-0.5em"),i}dyForAxisLabel(e){const n=this.owner,{config:r}=n,i=r.axis_rotated,s=this.getAxisLabelPosition(e).isInner,o=r[`axis_${e}_tick_rotate`]?n.getHorizontalAxisHeight(e):0,{width:l}=this.getMaxTickSize(e);let c;if(e==="x"){const u=r.axis_x_height;i?c=s?"1.2em":-25-l:s?c="-0.5em":u?c=u-10:o?c=o-10:c="3em"}else c={y:["-0.5em",10,"3em","1.2em",10],y2:["1.2em",-20,"-2.2em","-0.5em",15]}[e],i?s?c=c[0]:o?c=o*(e==="y2"?-1:1)-c[1]:c=c[2]:c=s?c[3]:(c[4]+(r[`axis_${e}_inner`]?0:l+c[4]))*(e==="y"?-1:1);return c}getTickFormatCacheValue(e){const n=this.owner,{config:r}=n;return e==="x"?{format:r.axis_x_tick_format,type:r.axis_x_type,localtime:r.axis_x_localtime,categories:r.axis_x_categories}:{format:r[`axis_${e}_tick_format`],normalized:n.isStackNormalized(),grouped:n.hasAxisGroupedData(e),type:r[`axis_${e}_type`]}}getMaxTickSizeFingerprint(e,n,r,i,s,o){var l;const c=this.owner,{config:u,state:f}=c,d=e==="x",h=d?"axis_x":`axis_${e}`,m=i.tickValues();return Eu({id:e,withoutRecompute:!!o,dataGeneration:f.dataGeneration,size:[f.current.width,f.current.height],range:(l=n.range)==null?void 0:l.call(n),domain:r,type:n.type,orient:this.orient[e],axisRotated:u.axis_rotated,evalTextSize:u.axis_evalTextSize,format:this.getTickFormatCacheValue(e),ticks:{values:A2(m),rawValues:u[`${h}_tick_values`],arguments:i.ticks(),count:u[`${h}_tick_count`],rotate:s,show:u[`${h}_tick_show`],textShow:u[`${h}_tick_text_show`],textPosition:u[`${h}_tick_text_position`],inner:u[`${h}_tick_inner`],culling:u[`${h}_tick_culling`],cullingMax:u[`${h}_tick_culling_max`],cullingLines:u[`${h}_tick_culling_lines`],cullingReverse:u[`${h}_tick_culling_reverse`],stepSize:!d&&u[`${h}_tick_stepSize`],timeValue:!d&&u[`${h}_tick_time_value`],fit:d&&u.axis_x_tick_fit,autorotate:d&&u.axis_x_tick_autorotate,centered:d&&u.axis_x_tick_centered,inverted:d&&u.axis_x_inverted,multiline:d&&u.axis_x_tick_multiline,width:d&&u.axis_x_tick_width}})}getMaxTickSize(e,n){var r;const i=this.owner,{config:s,state:o,$el:{svg:l,chart:c}}=i,{current:u,resizing:f}=o,d=u.maxTickSize[e],h=`${Oe.maxTickSize}_${e}_${!!n}`,m=i.cache.get(h);if(m&&m.generation===o.redrawGeneration)return d;const S=`axis_${e}`,E={width:0,height:0};let C;if(f||n||!s[`${S}_show`]||d.width>0&&i.filterTargetsToShow().length===0)return d;if((l||s.render_mode==="canvas")&&((r=i.scale[e])!=null&&r.copy)){const w=/^y2?$/.test(e),$=i.getTargetsToShow(),z=i.scale[e].copy().domain(i[`get${w?"Y":"X"}Domain`]($,e)),B=z.domain(),W=B[0]===B[1]&&B.every(St=>St>0),H=qe(d.domain)&&d.domain[0]===d.domain[1]&&d.domain.every(St=>St>0);if(W||H)return d;d.domain=B,w||Au(d.ticks);const _=this.getAxis(e,z,!1,!1,!0),q=s[`${S}_tick_rotate`],st=s[`${S}_tick_count`];if(!s[`${S}_tick_values`]&&st&&_.tickValues(this.generateTickValues(B,st,w?this.isTimeSeriesY():this.isTimeSeries())),!w&&this.updateXAxisTickValues($,_),C=this.getMaxTickSizeFingerprint(e,z,B,_,q,n),(m==null?void 0:m.fingerprint)===C)return i.cache.add(h,x2(m2({},m),{generation:o.redrawGeneration})),P2(d,m.value);const ot=_.tickValues(),ct=!w&&Array.isArray(ot)&&ot.length>al;ct&&_.tickValues(S2(ot,_.tickFormat()));const gt=c.append("svg").style("visibility","hidden").style("position","fixed").style("top","0").style("left","0"),tt=gt.append("g").attr("class",`${Rn[`axis${Ln(e)}`]} ${ze.dummy}`);_.create(tt);const{sizeFor1Char:ft}=tt.node(),lt=gt.selectAll("text").attr("transform",ae(q)?`rotate(${q})`:null),bt=ct?ot.length:lt.size();if(ft)lt.each(function(St,Mt){const Ot=this.textContent.length*ft.w,Kt=ft.h;E.width=Math.max(E.width,Ot),E.height=Math.max(E.height,Kt),w||(d.ticks[Mt]=Ot)});else{const St=[];if(lt.each(function(){St.push(this)}),(St.length<=5?St:y2(St)).map(Ot=>ln(Ot,!0)).forEach(Ot=>{E.width=Math.max(E.width,Ot.width),E.height=Math.max(E.height,Ot.height)}),!w)for(let Ot=0;Ot<St.length;Ot++)d.ticks[Ot]=E.width}!w&&ct&&E2(d.ticks,bt,E.width),gt.remove()}return Object.keys(E).forEach(w=>{E[w]>0&&(d[w]=E[w])}),i.cache.add(h,{fingerprint:C,generation:o.redrawGeneration,value:O2(d)}),d}getXAxisTickTextY2Overflow(e){const n=this.owner,{axis:r,config:i,state:{current:s,isLegendRight:o,legendItemWidth:l}}=n,c=n.getAxisTickRotate("x"),u=c>0&&c<90;if((r.isCategorized()||r.isTimeSeries())&&i.axis_x_tick_fit&&(!i.axis_x_tick_culling||lr(i.axis_x_tick_culling))&&!i.axis_x_tick_multiline&&u){const f=i.axis_y2_show&&s.maxTickSize.y2.width||0,d=o&&l||0,h=s.width-n.getCurrentPaddingByDirection("left"),m=this.getXAxisTickMaxOverflow(c,h-e)-f-d,S=Math.max(0,m)+e;return Math.min(S,h/2)}return 0}getXAxisTickMaxOverflow(e,n){var r;const i=this.owner,{axis:s,config:o,state:l}=i,c=s.isTimeSeries(),u=l.current.maxTickSize.x.ticks,f=u.length,d=(r=Su(u))!=null?r:l.current.maxTickSize.x.width,{left:h,right:m}=l.axis.x.padding;let S=0;const E=f-(c&&o.axis_x_tick_fit?.5:0);for(let $=0;$<f;$++){const z=$+1,B=Math.cos(Math.PI*e/180)*R2(u,$,d),W=z-(c?1:.5)+h;if(W<=0)continue;const _=(n-B)/W,q=E-z,st=m*_,it=q*_+st,ot=B-_/2-it;S=Math.max(S,ot)}const C=i.getTargetsToShow();let w=0;if(!c&&o.axis_x_tick_count<=C.length&&C[0].values.length){const $=sa(i.axis.getAxisType("x"),0,n-S).domain([h*-1,i.getXDomainMax(i.data.targets)+1+m]);w=($(1)-$(0))/2}return S+w}updateLabels(e){const n=this.owner,{config:r,$el:{main:i},$T:s}=n,o=r.axis_rotated;["x","y","y2"].forEach(l=>{const c=this.getLabelText(l),u=`axis${Ln(l)}`,f=Rn[`${u}Label`];if(c){let d=i.select(`text.${f}`);d.empty()&&(d=i.select(`g.${Rn[u]}`).insert("text",":first-child").attr("class",f).attr("transform",["rotate(-90)",null][l==="x"?+!o:+o]).style("text-anchor",()=>this.textAnchorForAxisLabel(l))),s(d,e).attr("x",()=>this.xForAxisLabel(l)).attr("dx",()=>this.dxForAxisLabel(l)).attr("dy",()=>this.dyForAxisLabel(l)).text(c)}})}getPadding(e,n,r,i){const s=ae(e)?e:e[n];return Ge(s)?this.owner.convertPixelToScale(/(bottom|top)/.test(n)?"y":"x",s,i):r}generateTickValues(e,n,r){let i=e;if(n){const s=ie(n)?n():n;if(s===1)i=[e[0]];else if(s===2)i=[e[0],e[e.length-1]];else if(s>2){const o=this.isCategorized(),l=s-2,c=e[0],u=e[e.length-1],f=(u-c)/(l+1);let d;i=[c];for(let h=0;h<l;h++)d=+c+f*(h+1),i.push(r?new Date(d):o?Math.round(d):d);i.push(u)}}return r||(i=i.sort((s,o)=>s-o)),i}generateTransitions(e){const n=this.owner,{$el:{axis:r},$T:i}=n,[s,o,l,c,u,f]=["x","y","y2","subX","subY","subY2"].map(d=>i(r[d],e));return{axisX:s,axisY:o,axisY2:l,axisSubX:c,axisSubY:u,axisSubY2:f}}redraw(e,n,r){const i=this.owner,{config:s,state:o,$el:l}=i,c=n?"0":null;["x","y","y2","subX","subY","subY2"].forEach(u=>{const f=this[u],d=l.axis[u];f&&d&&(!r&&!s.transition_duration&&(f.config.withoutTransition=!0),d.style("opacity",c),f.create(e[`axis${Ln(u)}`]))}),this.updateAxes(),!o.rendered&&s.axis_tooltip&&this.setAxisTooltip()}syncAxisDomains(e,n,r){var i;const s=this.owner,{config:o,scale:l,$el:c}=s,u=!!l.zoom;let f;if(!u&&this.isCategorized()&&e.length===0&&c.axis.x&&l.x.domain([0,c.axis.x.selectAll(".tick").size()]),l.x&&e.length?(!u&&s.updateXDomain(e,n.UpdateXDomain,n.UpdateOrgXDomain,n.TrimXDomain),o.axis_x_tick_values||this.updateXAxisTickValues(e)):this.x&&(this.x.tickValues([]),(i=this.subX)==null||i.tickValues([])),o.zoom_rescale&&!r&&(f=l.x.orgDomain()),["y","y2"].forEach(d=>{const h=`axis_${d}_`,m=l[d];if(m){const S=o[`${h}tick_values`],E=o[`${h}tick_count`];if(m.domain(s.getYDomain(e,d,f)),!S&&E){const C=s.axis[d],w=m.domain();C.tickValues(this.generateTickValues(w,w.every($=>$===0)?1:E,this.isTimeSeriesY()))}}}),n.Y){const d=()=>{var h,m;(h=l.subY)==null||h.domain(s.getYDomain(e,"y")),(m=l.subY2)==null||m.domain(s.getYDomain(e,"y2")),["y","y2"].forEach(S=>{const E=S==="y2"?"subY2":"subY",C=l[E],w=s.axis[E],$=this.getTickValues(S,!0),z=pa(o,E,"count");if(!C||!w||$||!z)return;const B=C.domain();w.tickValues(this.generateTickValues(B,B.every(W=>W===0)?1:z,this.isTimeSeriesY()))})};o.subchart_show?s.withSubchartTypeContext(d):d()}}redrawAxis(e,n,r,i,s){const o=this.owner;this.syncAxisDomains(e,n,i),this.redraw(r,o.hasArcType(),s),this.updateLabels(n.Transition),(n.UpdateXDomain||n.UpdateXAxis||n.Y)&&e.length&&this.setCulling()}setCulling(){const e=this.owner,{config:n,state:{clip:r,current:i},$el:s}=e;["subX","x","y","y2","subY","subY2"].forEach(o=>{const l=s.axis[o],c=pa(n,o,"culling");if(l&&c){const u=l.selectAll(".tick"),f=ti(u.data(),!pa(n,o,"culling_reverse")),d=f.length,h=pa(n,o,"culling_max"),S=!pa(n,o,"culling_lines")||b2(this[o],f,T2(u));let E;if(d){for(let w=1;w<d;w++)if(d/w<h){E=w;break}E=E!=null?E:d;const C=new Map;for(let w=0;w<f.length;w++)C.set(f[w],w);u.each(function(w){var $;const z=S?this:this.querySelector("text");z&&(z.style.display=(($=C.get(w))!=null?$:0)%E?"none":null)})}else u.style("display",null);if(o==="x"){const C=i.maxTickSize.x.clipPath?r.pathXAxisTickTexts:null;s.svg.selectAll(`.${Rn.axisX} .tick text`).attr("clip-path",C)}}})}setAxisTooltip(){var e;const n=this.owner,{config:{axis_rotated:r,axis_tooltip:i},$el:{axis:s,axisTooltip:o}}=n,l=(e=i.backgroundColor)!=null?e:"black";n.generateTextBGColorFilter(l,{x:-.15,y:-.2,width:1.3,height:1.3}),["x","y","y2"].forEach(c=>{var u,f,d;if(je(l)||l[c])if(o[c]=(u=s[c])==null?void 0:u.append("text").classed(Rn[`axis${c.toUpperCase()}Tooltip`],!0).attr("filter",n.updateTextBGColor({id:c},l)),r){const h=c==="x"?"x":"y",m=c==="y"?"1.15em":c==="x"?"-0.3em":"-0.4em";(f=o[c])==null||f.attr(h,m).attr(`d${c==="x"?"y":"x"}`,c==="x"?"0.4em":"-1.3em").style("text-anchor",c==="x"?"end":null)}else{const h=c==="x"?"y":"x",m=c==="x"?"1.15em":`${c==="y"?"-":""}0.4em`;(d=o[c])==null||d.attr(h,m).attr(`d${c==="x"?"x":"y"}`,c==="x"?"-1em":"0.3em").style("text-anchor",c==="y"?"end":null)}})}}var ap=Math.pow,D2={initEventRect(){this.$el.main.select(`.${ze.chart}`).append("g").attr("class",Zr.eventRects).style("fill-opacity","0")},redrawEventRect(){var t;const e=this,{config:n,state:r,$el:i}=e,s=e.isMultipleX(),o=n.axis_x_inverted;if(i.eventRect)e.updateEventRect(i.eventRect,!0);else if(e.data.targets.length){const c=e.$el.main.select(`.${Zr.eventRects}`).style("cursor",n.zoom_enabled&&n.zoom_type!=="drag"?n.axis_rotated?"ns-resize":"ew-resize":null).classed(Zr.eventRectsMultiple,s).classed(Zr.eventRectsSingle,!s).selectAll(`.${Zr.eventRect}`).data([0]).enter().append("rect");e.updateEventRect(c),e.updateEventType(c),c.call(e.getDraggableSelection()),i.eventRect=c,e.state.inputType==="touch"&&!i.svg.on("touchstart.eventRect")&&!e.hasArcType()&&e.bindTouchOnEventRect(),r.rendered&&e.updateEventRect(i.eventRect,!0)}if(!s){const l=e.getMaxDataCountTarget();(!n.data_xSort||o)&&l.sort((c,u)=>o?u.x-c.x:c.x-u.x),e.updateDataIndexByX(l),e.updateXs(l),(t=e.updatePointClass)==null||t.call(e,!0),r.eventReceiver.data=l}e.updateEventRectData()},bindTouchOnEventRect(){const t=this,{config:e,state:n,$el:{eventRect:r,svg:i}}=t,s=m=>{if(t.isMultipleX())t.selectRectForMultipleXs(m);else{const S=t.getDataIndexFromEvent(n.event);t.callOverOutForTouch(S),S===-1?t.unselectRect():t.selectRectForSingle(m,S)}},o=()=>{t.unselectRect(),t.callOverOutForTouch()},l=e.interaction_inputType_touch.preventDefault,c=Ra(l)&&l||!1,u=!isNaN(l)&&l||null;let f;const d=!c&&u===null,h=m=>{const S=m.type,C=m.changedTouches[0][`client${e.axis_rotated?"Y":"X"}`];S==="touchstart"?c?m.preventDefault():u!==null&&(f=C):S==="touchmove"&&(c||f===!0||u!==null&&Math.abs(f-C)>=u)&&(f=!0,m.preventDefault())};r.on("touchstart",m=>{n.event=m,t.updateEventRect()},{passive:d}).on("touchstart.eventRect touchmove.eventRect",m=>{if(n.event=m,!r.empty()&&r.classed(Zr.eventRect)){if(n.dragging||n.flowing||t.hasArcType()||m.touches.length>1)return;h(m),s(r.node())}else o()},{passive:d}).on("touchend.eventRect",m=>{n.event=m,!r.empty()&&r.classed(Zr.eventRect)&&(t.hasArcType()||!t.toggleShape||n.cancelClick)&&n.cancelClick&&(n.cancelClick=!1)},{passive:d}),i.on("touchstart",m=>{n.event=m;const{target:S}=m;S&&S!==r.node()&&o()},{passive:d})},updateEventRect(t,e=!1){const n=this,{state:r,$el:i}=n,{eventReceiver:s,width:o,height:l,rendered:c,resizing:u}=r,f=t||i.eventRect,d=()=>{if(s){const h=Oh(i.chart.node());s.rect=ln(f.node(),!0).toJSON(),s.rect.top+=h.y,s.rect.left+=h.x}};(!c||u||e)&&(f.attr("x",0).attr("y",0).attr("width",o).attr("height",l),(!c||e)&&f.classed(Zr.eventRect,!0)),d()},updateEventType(t){const e=this,n=Ra(t),r=n?e.$el.eventRect:t,i=n?t!==(r==null?void 0:r.datum().multipleX):!1;r&&(i&&(r==null||r.on("mouseover mousemove mouseout click",null)),e.isMultipleX()?e.generateEventRectsForMultipleXs(r):e.generateEventRectsForSingleX(r))},updateEventRectData(){const t=this,{config:e,scale:n,state:r}=t,i=n.zoom||n.x,s=e.axis_rotated,o=t.isMultipleX(),l=i==null?void 0:i.domain(),c=l?`${l[0]}_${l[1]}_${r.width}_${r.height}_${t.data.targets.length}_${r.dataGeneration}_${[...r.hiddenTargetIds].join(",")}`:null;if(c&&c===r._eventRectFingerprint)return;r._eventRectFingerprint=c;let u,f,d,h;if(t.updateEventType(o),o)u=0,f=0,d=r.width,h=r.height;else{let E,C;if(t.axis.isCategorized())E=t.getEventRectWidth(),C=w=>i(w.x)-E/2;else{const w=({index:$})=>({prev:t.getPrevX($),next:t.getNextX($)});E=$=>{const z=w($),B=i.domain();let W;return z.prev===null&&z.next===null?W=s?r.height:r.width:z.prev===null?W=(i(z.next)+i($.x))/2:z.next===null?W=i(B[1])-(i(z.prev)+i($.x))/2:W=Math.max(0,(i(z.next)-i(z.prev))/2),W},C=$=>{const z=w($);let B;return z.prev===null&&z.next===null?B=0:z.prev===null?B=i(i.domain()[0]):B=(i($.x)+i(z.prev))/2,B}}u=s?0:C,f=s?C:0,d=s?r.width:E,h=s?E:r.height}const{eventReceiver:m}=r,S=(E,C)=>ie(E)?E(C):E;m.coords.splice(m.data.length),m.data.forEach((E,C)=>{m.coords[C]={x:S(u,E),y:S(f,E),w:S(d,E),h:S(h,E)}})},selectRectForSingle(t,e){var n,r,i,s,o,l,c;const u=this,{config:f,state:d,$el:{main:h,circle:m}}=u,S=f.data_selection_enabled,E=f.data_selection_grouped,C=f.data_selection_isselectable,w=f.tooltip_grouped,$=u.getAllValuesOnIndex(e);if(w&&(u.showTooltip($,t),(n=u.showGridFocus)==null||n.call(u,$),(r=u.showSubchartGridFocus)==null||r.call(u,$),!S||E))return;!m&&h.selectAll(`.${ze.EXPANDED}:not(.${Tn.shape}-${e})`).classed(ze.EXPANDED,!1);const z=h.selectAll(`.${Tn.shape}-${e}`).classed(ze.EXPANDED,!0).style("cursor",C?"pointer":null).filter(function(B){return u.isWithinShape(this,B)});if(z.call(B=>{var W,H,_;const q=B.data();S&&(E||C!=null&&C.bind(u.api)(q))&&(t.style.cursor="pointer"),w||(u.showTooltip(q,t),(W=u.showGridFocus)==null||W.call(u,q),(H=u.showSubchartGridFocus)==null||H.call(u,q),(_=u.unexpandCircles)==null||_.call(u),B.each(st=>u.setExpand(e,st.id)))}),!w&&z.empty()){const B=Jn(d.event,t),W=$.filter(H=>u.isTargetToShow(H.id)?u.dist(H,B)<u.getPointSensitivity(H):!1);if(W.length>0){let H=W[0],_=u.dist(H,B);for(let q=1;q<W.length;q++){const st=W[q],it=u.dist(st,B);it<_&&(_=it,H=st)}u.showTooltip([H],t),(i=u.showGridFocus)==null||i.call(u,[H]),(s=u.showSubchartGridFocus)==null||s.call(u,[H]),(o=u.unexpandCircles)==null||o.call(u),u.setExpand(e,H.id,!0),S&&(E||C!=null&&C.bind(u.api)(H))&&(t.style.cursor="pointer")}else f.interaction_onout&&((l=u.hideGridFocus)==null||l.call(u),(c=u.hideSubchartGridFocus)==null||c.call(u),u.hideTooltip(),!E&&u.setExpand(e))}},selectRectForMultipleXs(t,e=!0){var n,r;const i=this,{config:s,state:o}=i,l=i.getTargetsToShow();if(o.dragging||i.hasArcType(l))return;const c=Jn(o.event,t),u=i.findClosestFromTargets(l,c);if(e&&o.mouseover&&(!u||u.id!==o.mouseover.id)&&(s.data_onout.call(i.api,o.mouseover),o.mouseover=void 0),!u){i.unselectRect();return}const d=(i.isBubbleType(u)||i.isScatterType(u)||!s.tooltip_grouped?[u]:i.filterByX(l,u.x)).map(m=>i.addName(m));i.showTooltip(d,t),i.setExpand(u.index,u.id,!0),(n=i.showGridFocus)==null||n.call(i,d),(r=i.showSubchartGridFocus)==null||r.call(i,d);const h=i.dist(u,c);(i.isBarType(u.id)||h<i.getPointSensitivity(u))&&(i.$el.eventRect.style("cursor","pointer"),e&&(!o.mouseover||o.mouseover.x!==u.x||o.mouseover.id!==u.id)&&(s.data_onover.call(i.api,u),o.mouseover=u))},unselectRect(){var t,e,n,r;const i=this,{state:s,$el:{circle:o,tooltip:l}}=i;if(s._lastTooltipMouse=null,s.isCanvasMode){(t=i.clearCanvasFocus)==null||t.call(i),l&&i.hideTooltip();return}(e=i.$el.eventRect)==null||e.style("cursor",null),(n=i.hideGridFocus)==null||n.call(i),(r=i.hideSubchartGridFocus)==null||r.call(i),l&&(i.hideTooltip(),i._handleLinkedCharts(!1)),o&&!i.isPointFocusOnly()&&i.unexpandCircles(),i.expandBarTypeShapes(!1)},generateEventRectsForSingleX(t){const e=this,{config:n,state:r}=e,{eventReceiver:i}=r,s=t.style("cursor",n.data_selection_enabled&&n.data_selection_grouped?"pointer":null).on("click",function(o){r.event=o;const{currentIdx:l,data:c}=i,u=c[l===-1?e.getDataIndexFromEvent(o):l];e.clickHandlerForSingleX.bind(this)(u,e)}).datum({multipleX:!1});if(r.inputType==="mouse"){const o=l=>{const c=l?e.getDataIndexFromEvent(l):i.currentIdx;return c>-1?i.data[c]:null};s.on("mouseover",l=>{r.event=l,e.updateEventRect(),Object.values(e.$el.axisTooltip).forEach(c=>c==null?void 0:c.style("display",null))}).on("mousemove",function(l){var c;const u=o(l);if(r.event=l,!u)return;let{index:f}=u;const d=n.line_step_type;if(n.line_step_tooltipMatch&&e.hasType("step")&&/^step\-(before|after)$/.test(d)){const m=e.scale.zoom||e.scale.x,S=e.axis.xs[f],E=m.invert(Jn(l,this)[0]);d==="step-after"&&E<S?f-=1:d==="step-before"&&E>S&&(f+=1)}(c=e.showAxisGridFocus)==null||c.call(e);const h=n.tooltip_grouped&&f===i.currentIdx;if(r.dragging||r.flowing||e.hasArcType()||h){if(n.tooltip_show&&h){const[m,S]=Jn(l,this),E=r._lastTooltipMouse;(!E||ap(m-E[0],2)+ap(S-E[1],2)>=9)&&(r._lastTooltipMouse=[m,S],e.setTooltipPosition())}return}f!==i.currentIdx&&(e.setOverOut(!1,i.currentIdx),i.currentIdx=f),f===-1?e.unselectRect():e.selectRectForSingle(this,f),e.setOverOut(f!==-1,f)}).on("mouseout",l=>{var c;r.event=l,!(!e.config||e.hasArcType()||i.currentIdx===-1||!n.interaction_onout)&&((c=e.hideAxisGridFocus)==null||c.call(e),e.unselectRect(),e.setOverOut(!1,i.currentIdx),i.currentIdx=-1)})}return s},clickHandlerForSingleX(t,e){const n=e,{config:r,state:i,$el:{main:s}}=n;if(!t||n.hasArcType()||i.cancelClick){i.cancelClick&&(i.cancelClick=!1);return}const{index:o}=t;s.selectAll(`.${Tn.shape}-${o}`).each(function(l){var c;(r.data_selection_grouped||n.isWithinShape(this,l))&&((c=n.toggleShape)==null||c.call(n,this,l,o),r.data_onclick.bind(n.api)(l,this))})},generateEventRectsForMultipleXs(t){const e=this,{config:n,state:r}=e;t.on("click",function(i){r.event=i,e.clickHandlerForMultipleXS.bind(this)(e)}).datum({multipleX:!0}),r.inputType==="mouse"&&t.on("mouseover mousemove",function(i){r.event=i,e.selectRectForMultipleXs(this)}).on("mouseout",i=>{r.event=i,!(!e.config||e.hasArcType()||!n.interaction_onout)&&e.unselectRect()})},clickHandlerForMultipleXS(t){const e=t,{config:n,state:r}=e,i=e.getTargetsToShow();if(e.hasArcType(i))return;const s=Jn(r.event,this),o=e.findClosestFromTargets(i,s);if(!o)return;const l=e.getPointSensitivity(o);(e.isBarType(o.id)||e.dist(o,s)<l)&&e.$el.main.selectAll(`.${Tn.shapes}${e.getTargetSelectorSuffix(o.id)}`).selectAll(`.${Tn.shape}-${o.index}`).each(function(){var c;(n.data_selection_grouped||e.isWithinShape(this,o))&&((c=e.toggleShape)==null||c.call(e,this,o,o.index),n.data_onclick.bind(e.api)(o,this))})}},F2={initClip(){const t=this,{clip:e,datetimeId:n}=t.state;e.id=`${n}-clip`,e.idXAxis=`${e.id}-xaxis`,e.idYAxis=`${e.id}-yaxis`,e.idGrid=`${e.id}-grid`,e.path=t.getClipPath(e.id),e.pathXAxis=t.getClipPath(e.idXAxis),e.pathYAxis=t.getClipPath(e.idYAxis),e.pathGrid=t.getClipPath(e.idGrid)},getClipPath(t){const e=this,{config:n}=e;return!n.clipPath&&/-clip$/.test(t)||!n.axis_x_clipPath&&/-clip-xaxis$/.test(t)||!n.axis_y_clipPath&&/-clip-yaxis$/.test(t)?null:`url(#${t})`},appendClip(t,e){e&&t.append("clipPath").attr("id",e).append("rect")},setXAxisClipPath(t){const e=this,{config:n,state:{margin:r,width:i,height:s}}=e,o=n.axis_rotated,l=Math.max(30,r.left)-(o?0:20),c=(o?r.top+s+10:r.bottom)+20,u=o?-(1+l):-(l-1),f=-15,d=o?r.left+20:i+10+l;t.attr("x",u).attr("y",f).attr("width",d).attr("height",c)},setYAxisClipPath(t){const e=this,{config:n,state:{margin:r,width:i,height:s}}=e,o=n.axis_rotated,l=Math.max(30,r.left)-(o?20:0),c=n.axis_y_inner,u=c&&!o?n.axis_y_label.text?-20:-1:o?-(1+l):-(l-1),f=-(o?20:r.top),d=(o?i+15+l:r.left+20)+(c?20:0),h=(o?r.bottom+10:r.top+s)+10;t.attr("x",u).attr("y",f).attr("width",d).attr("height",h)},updateXAxisTickClip(){const t=this,{config:e,state:{clip:n,xAxisHeight:r},$el:{defs:i}}=t,s=t.getHorizontalAxisHeight("x");if(i&&!n.idXAxisTickTexts){const o=`${n.id}-xaxisticktexts`;t.appendClip(i,o),n.idXAxisTickTexts=o,n.pathXAxisTickTexts=t.getClipPath(n.idXAxisTickTexts)}!e.axis_x_tick_multiline&&t.getAxisTickRotate("x")&&s!==r&&(t.setXAxisTickClipWidth(),t.setXAxisTickTextClipPathWidth()),t.state.xAxisHeight=s},setXAxisTickClipWidth(){const t=this,{config:e,state:{current:{maxTickSize:n}}}=t,r=t.getAxisTickRotate("x");if(!e.axis_x_tick_multiline&&r){const i=Math.sin(Math.PI/180*Math.abs(r));n.x.clipPath=(t.getHorizontalAxisHeight("x")-20)/i}else n.x.clipPath=null},setXAxisTickTextClipPathWidth(){const t=this,{state:{clip:e,current:n},$el:{svg:r}}=t;r&&r.select(`#${e.idXAxisTickTexts} rect`).attr("width",n.maxTickSize.x.clipPath).attr("height",30)}},N2={getAxisSize(t){const e=this,n=e.config.axis_rotated;return n&&t==="x"||!n&&/y2?/.test(t)?e.getAxisWidthByAxisId(t,!0):e.getHorizontalAxisHeight(t)},getAxisWidthByAxisId(t,e){var n,r;const i=this;if(i.axis){const s=(n=i.axis)==null?void 0:n.getAxisLabelPosition(t),{width:o}=i.axis.getMaxTickSize(t,e),l=o===0?.5:0;return o+(((r=i.config.padding)==null?void 0:r.mode)==="fit"?s.isInner?10+l:10:s.isInner?20+l:40)}else return 40},getHorizontalAxisHeight(t){var e,n;const r=this,{config:i,state:s}=r,{rotatedPadding:o,isLegendRight:l,isLegendInset:c}=s,u=i.axis_rotated,f=((e=i.padding)==null?void 0:e.mode)==="fit",d=i[`axis_${t}_inner`],h=i[`axis_${t}_label`].text,m=13;let S=((n=i.padding)==null?void 0:n.mode)==="fit"?d&&!h?t==="y"?1:0:20:30;if(t==="x"&&!i.axis_x_show)return 8;if(t==="x"&&ae(i.axis_x_height))return i.axis_x_height;if(t==="y"&&!i.axis_y_show)return i.legend_show&&!l&&!c?10:1;if(t==="y2"&&!i.axis_y2_show)return f?0:o.top;const E=r.axis.getMaxTickSize(t),C=Math.abs(i.axis_x_tick_rotate)>0&&(!i.axis_x_tick_autorotate||r.needToRotateXAxisTickTexts());return(i.axis_x_tick_multiline||C)&&E.height>m&&(S+=E.height-m),S+(r.axis.getAxisLabelPosition(t).isInner?0:10)+(t==="y2"&&!u?-10:0)},getEventRectWidth(){const t=this,{config:e,axis:n}=t,r=e.axis_x_inverted,i=n.x.tickInterval();return Math.max(0,r?Math.abs(i):i)},getAxisTickRotate(t){const e=this,{axis:n,config:r,state:i,$el:s}=e;let o=r[`axis_${t}_tick_rotate`];if(t==="x"){const l=n.isCategorized()||n.isTimeSeries();if(r.axis_x_tick_fit&&l){const c=r.axis_x_tick_count,u=i.current.maxTickSize.x.ticks.length;let f=0;if(c?f=c>u?u:c:u&&(f=u),f!==i.axis.x.tickCount){const{targets:d}=e.data;i.axis.x.padding=e.getXDomainPadding([e.getXDomainMinMax(d,"min"),e.getXDomainMinMax(d,"max")],f)}i.axis.x.tickCount=f}(s.svg||i.isCanvasMode)&&r.axis_x_tick_autorotate&&r.axis_x_tick_fit&&!r.axis_x_tick_multiline&&!r.axis_x_tick_culling&&l&&(o=e.needToRotateXAxisTickTexts()?r.axis_x_tick_rotate:0)}return o},needToRotateXAxisTickTexts(){const t=this,{state:{axis:e,current:n,isLegendRight:r,legendItemWidth:i}}=t,s=r&&i,o=n.width-s-t.getCurrentPaddingByDirection("left")-t.getCurrentPaddingByDirection("right"),l=e.x.tickCount+e.x.padding.left+e.x.padding.right,{width:c}=t.axis.getMaxTickSize("x"),u=l?o/l:0;return c>u}},$2={axis_x_clipPath:!0,axis_x_show:!0,axis_x_forceAsSingle:!1,axis_x_type:"indexed",axis_x_localtime:!0,axis_x_categories:[],axis_x_tick_centered:!1,axis_x_tick_format:void 0,axis_x_tick_culling:{},axis_x_tick_culling_max:10,axis_x_tick_culling_lines:!0,axis_x_tick_culling_reverse:!1,axis_x_tick_count:void 0,axis_x_tick_inner:!1,axis_x_tick_show:!0,axis_x_tick_text_show:!0,axis_x_tick_text_inner:!1,axis_x_tick_text_position:{x:0,y:0},axis_x_tick_fit:!0,axis_x_tick_values:null,axis_x_tick_autorotate:!1,axis_x_tick_rotate:0,axis_x_tick_outer:!0,axis_x_tick_multiline:!0,axis_x_tick_width:null,axis_x_tick_tooltip:!1,axis_x_max:void 0,axis_x_min:void 0,axis_x_inverted:!1,axis_x_padding:{},axis_x_height:void 0,axis_x_extent:void 0,axis_x_label:{},axis_x_axes:[]},B2={axis_y_clipPath:!0,axis_y_show:!0,axis_y_type:"indexed",axis_y_max:void 0,axis_y_min:void 0,axis_y_inverted:!1,axis_y_center:void 0,axis_y_inner:!1,axis_y_label:{},axis_y_tick_format:void 0,axis_y_tick_culling:!1,axis_y_tick_culling_max:5,axis_y_tick_culling_lines:!0,axis_y_tick_culling_reverse:!1,axis_y_tick_inner:!1,axis_y_tick_outer:!0,axis_y_tick_values:null,axis_y_tick_rotate:0,axis_y_tick_count:void 0,axis_y_tick_show:!0,axis_y_tick_stepSize:null,axis_y_tick_text_show:!0,axis_y_tick_text_position:{x:0,y:0},axis_y_tick_time_value:void 0,axis_y_padding:{},axis_y_default:void 0,axis_y_axes:[]},z2={axis_y2_show:!1,axis_y2_type:"indexed",axis_y2_max:void 0,axis_y2_min:void 0,axis_y2_inverted:!1,axis_y2_center:void 0,axis_y2_inner:!1,axis_y2_label:{},axis_y2_tick_format:void 0,axis_y2_tick_culling:!1,axis_y2_tick_culling_max:5,axis_y2_tick_culling_lines:!0,axis_y2_tick_culling_reverse:!1,axis_y2_tick_inner:!1,axis_y2_tick_outer:!0,axis_y2_tick_values:null,axis_y2_tick_rotate:0,axis_y2_tick_count:void 0,axis_y2_tick_show:!0,axis_y2_tick_stepSize:null,axis_y2_tick_text_show:!0,axis_y2_tick_text_position:{x:0,y:0},axis_y2_padding:{},axis_y2_default:void 0,axis_y2_axes:[]},U2=Object.defineProperty,ip=Object.getOwnPropertySymbols,k2=Object.prototype.hasOwnProperty,G2=Object.prototype.propertyIsEnumerable,sp=(t,e,n)=>e in t?U2(t,e,{enumerable:!0,configurable:!0,writable:!0,value:n}):t[e]=n,Iu=(t,e)=>{for(var n in e||(e={}))k2.call(e,n)&&sp(t,n,e[n]);if(ip)for(var n of ip(e))G2.call(e,n)&&sp(t,n,e[n]);return t},X2=Iu(Iu(Iu({axis_evalTextSize:!0,axis_rotated:!1,axis_tooltip:!1},$2),B2),z2),W2={data_xs:{},data_xFormat:"%Y-%m-%d",data_xLocaltime:!0,data_xSort:!0,data_axes:{},data_regions:{},data_stack_normalize:!1};const V2=[r2,a2,i2],op={axis:M2,clip:F2,eventrect:D2,sizeAxis:N2},lp={optDataAxis:W2,optAxis:X2};function cp(t){return Object.keys(t).map(e=>t[e])}function up(t=[],e=[]){xn(br.prototype,cp(op).concat(t)),xn(jn.prototype,V2),$a.setOptions(cp(lp).concat(e))}function Ts(t=[],e=[]){up(t,e)}function ea(t,e=[]){const n=Array.isArray(t)?t:t?[t]:[];up([Ti,tl,e2].concat(n),[ka,n2].concat(e))}let fp=()=>(ea(xi,[yi]),(fp=()=>qt.AREA)()),dp=()=>(ea(xi,[yi]),(dp=()=>qt.AREA_LINE_RANGE)()),hp=()=>(ea(xi,[yi]),(hp=()=>qt.AREA_STEP_RANGE)()),vp=()=>(ea(xi,[yi,xu]),(vp=()=>qt.AREA_SPLINE)()),gp=()=>(ea(xi,[yi,xu]),(gp=()=>qt.AREA_SPLINE_RANGE)()),pp=()=>(ea(xi,[yi]),(pp=()=>qt.AREA_STEP)());function Ru(t){const e=this.config.bar_connectLine,n=(e==null?void 0:e[t])||e;return/^(start|end)\-(start|end)$/.test(n)?n:null}var j2={initBar(){const{$el:t,config:e,state:{clip:n}}=this;t.bar=t.main.select(`.${ze.chart}`),t.bar=e.bar_front?t.bar.append("g"):t.bar.insert("g",":first-child"),t.bar.attr("class",rr.chartBars).call(this.setCssRule(!1,`.${rr.chartBars}`,["pointer-events:none"])),e.clipPath===!1&&(e.bar_radius||e.bar_radius_ratio)&&t.bar.attr("clip-path",n.pathXAxis.replace(/#[^)]*/,`#${n.id}`))},updateTargetsForBar(t){const e=this,{config:n}=e,r=e.getClass("bars",!0),i=n.interaction_enabled&&n.data_selection_isselectable;su.call(e,t,{type:"Bar",elKey:"bar",containerClass:rr.chartBars,itemClass:rr.chartBar,initFn:e.initBar}).append("g").attr("class",r).style("cursor",o=>{var l;return(l=i==null?void 0:i.bind)!=null&&l.call(i,e.api)(o)?"pointer":null}).call(o=>{e.setCssRule(!0,` .${rr.bar}`,["fill"],e.color)(o),o.each(function(l){Ru.call(e,l.id)&&Yt(this).append("path").attr("class",rr.barConnectLine)})})},updateBar(t,e=!1){const n=this;if(n.state.isCanvasMode)return;const{config:r,$el:i,$T:s}=n,o=e?i.subchart:i,l=n.getClass("bar",!0),c=n.initialOpacity.bind(n);r.bar_linearGradient&&n.updateLinearGradient();const u=o.main.selectAll(`.${rr.bars}`).selectAll(`.${rr.bar}`).data(n.labelishData.bind(n));s(u.exit(),t).style("opacity","0").remove(),o.bar=u.enter().append("path").attr("class",l).style("fill",n.generateUpdateBarColor()).merge(u).style("opacity",c),n.setRatioForGroupedData(o.bar.data())},generateUpdateBarColor(){const t=this,e=t.getStylePropValue(t.color)||(()=>null);return n=>Yv.call(t,n,"bar_linearGradient",e)},updateBarColor(t){return this.generateUpdateBarColor()(t)},redrawBar(t,e,n=!1){const r=this;if(r.state.isCanvasMode)return[];const{bar:i}=n?r.$el.subchart:r.$el,s=[],o=new Map,l=uo(r),c=r.generateUpdateBarColor(),u=function(d,h,m){var S;const C=ae(d.value)||r.isBarRangeType(d)||((S=r.isSubchartCandlestickBarValue)==null?void 0:S.call(r,d,n))?t(d,h):[""];let w=o.get(d.id);if(w===void 0&&(w=Ru.call(r,d.id),o.set(d.id,w)),C.length>1&&s.push(C[1]),h===m.length-1&&s.length){const $=r.$T(Yt(this.parentNode.querySelector(`.${rr.barConnectLine}`)),e,Cr());r.updateConnectLine($,w,s),s.splice(0)}return C[0]},f=r.$T(i,e,Cr());return l&&typeof f.attrTween=="function"?f.attrTween("d",function(d,h,m){var S;const E=u.call(this,d,h,m);return k0((S=this.getAttribute("d"))!=null?S:"",E)}):f.attr("d",u),[f.style("fill",d=>{var h;return((h=r.getSubchartCandlestickBarColor)==null?void 0:h.call(r,d,n))||c(d)}).style("clip-path",d=>d.clipPath).style("opacity",null)]},generateDrawBar(t,e){const n=this,{config:r}=n,i=n.generateGetBarPoints(t,e),s=uo(n),o=s?ic(n):new Set,l=new Map;return(c,u)=>{const f=i(c,u),{indexX:d,indexY:h,isNegative:m,pos:S,radius:E,clipPath:C}=sc(n,c,f,s,o,n.isStackingRadiusData.bind(n)),w=["",""];if(c.clipPath=C,s){const W=`a${E} ${E} ${m?"1 0 0":"0 0 1"} `;w[h]=`${W}${E},${E}`,w[d]=`${W}${[-E,E][r.axis_rotated?"sort":"reverse"]()}`,m&&w.reverse()}const $=r.axis_rotated?`H${S} ${w[0]}V${f[2][h]-E} ${w[1]}H${f[3][d]}`:`V${S} ${w[0]}H${f[2][d]-E} ${w[1]}V${f[3][h]}`,z=[`M${f[0][d]},${f[0][h]}${$}z`];let B=l.get(c.id);return B===void 0&&(B=Ru.call(n,c.id),l.set(c.id,B)),B&&z.push(r.axis_rotated?{x:f[0][d],y:f[0][h],width:f[0][d]-S,height:f[2][h]-f[0][h]}:{x:f[0][d],y:S,width:f[2][d]-f[0][d],height:f[3][h]-S}),z}},isStackingRadiusData(t){const e=this,{$el:n,config:r,data:i,state:s}=e,{id:o,index:l,value:c}=t;if(s.hiddenTargetIds.has(o)){const h=n.bar.filter(m=>m.id===o&&m.value===c);return!h.empty()&&/a\d+/i.test(h.attr("d"))}const u=r.data_groups.find(h=>h.indexOf(o)>-1),d=e.orderTargets(e.filterTargetsToShow(i.targets.filter(e.isBarType,e))).filter(h=>u.indexOf(h.id)>-1).map(h=>{const m=h.values[l];if(m&&(ae(c)&&c>0?m.value>0:m.value<0))return m}).filter(Boolean).map(h=>h.id);return c!==0&&d.indexOf(o)===d.length-1},updateConnectLine(t,e,n){const r=n.map((i,s,o)=>{const l=this.config.axis_rotated,c=/^start-(start|end)$/.test(e),u=/^end-(start|end)$/.test(e),f=[],d=l?u?i.x-i.width:i.x:i.x+i.width,h=l||c?i.y+i.height:i.y;return s===0?f.push(`${d},${h}`):(f.push(l?`L${i.x-(/\w+-end$/.test(e)?i.width:0)},${i.y}`:`L${i.x},${i.y+(/\w+-start$/.test(e)?i.height:0)}`),s<o.length-1&&f.push(`M${d},${h}`)),f.join(" ")});t.attr("d",`M${r.join("")}z`)}},H2={bar_connectLine:!1,bar_front:!1,bar_indices_removeNull:!1,bar_label_threshold:0,bar_linearGradient:!1,bar_overlap:!1,bar_padding:0,bar_radius:void 0,bar_radius_ratio:void 0,bar_sensitivity:2,bar_width:void 0,bar_width_ratio:.6,bar_width_max:void 0,bar_zerobased:!0};let mp=()=>(Ts([j2,Ti],[H2,ka]),(mp=()=>qt.BAR)());var Y2={initBubble(){const t=this,{config:e}=t;t.hasType("bubble")&&(e.point_show=!0,e.point_type="circle")},getBaseLength(){const t=this,{width:e,height:n}=t.state,r=Oe.bubbleBaseLength;let i=t.cache.get(r);return i||t.cache.add(r,i=pr("min",[e,n])),i},getBubbleR(t){const e=this;let n=e.config.bubble_maxR;ie(n)?n=n.bind(e.api)(t):ae(n)||(n=e.getBaseLength()/(e.getMaxDataCount()*2)+12);const r=Oe.bubbleMaxValue;let i=e.cache.get(r);i===null&&e.cache.add(r,i=pr("max",e.getMinMaxData().max.map(l=>e.isBubbleZType(l)?e.getBubbleZData(l.value,"y"):He(l.value)?l.value.mid:l.value)));const s=n*n*Math.PI,o=(e.isBubbleZType(t)?e.getBubbleZData(t.value,"z"):t.value)*(s/i);return Math.sqrt(o/Math.PI)},getBubbleZData(t,e){return He(t)?t[e]:t[e==="y"?0:1]}},K2=Y2,Z2={bubble_maxR:35,bubble_zerobased:!1};let xp=()=>(Ts([Ti,tl,K2],[Z2,ka]),(xp=()=>qt.BUBBLE)());var J2=Object.defineProperty,yp=Object.getOwnPropertySymbols,Q2=Object.prototype.hasOwnProperty,_2=Object.prototype.propertyIsEnumerable,Tp=(t,e,n)=>e in t?J2(t,e,{enumerable:!0,configurable:!0,writable:!0,value:n}):t[e]=n,q2=(t,e)=>{for(var n in e||(e={}))Q2.call(e,n)&&Tp(t,n,e[n]);if(yp)for(var n of yp(e))_2.call(e,n)&&Tp(t,n,e[n]);return t},tI={generateGetCandlestickPoints(t,e=!1){const n=this,r=e?n.axis.subX:n.axis.x,i=n.getIndicesMax(t)+1,s=n.getBarW("candlestick",r,i),o=n.getShapeX(s,t,!!e),l=n.getShapeY(!!e),c=n.getShapeOffset(n.isCandlestickType,t,!!e),u=n.getYScaleById.bind(n);return(f,d)=>{const h=u.call(n,f.id,e)(n.getShapeYMin(f.id,e)),m=c(f,d)||h,S=ae(s)?s:s[f.id]||s._$width,E=n.getCandlestickData(f);let C;if(E&&ae(E.open)&&ae(E.close)){const w={start:o(f),end:0};w.end=w.start+S;const $={start:l(E.open),end:l(E.close)},z={x:w.start+S/2,high:l(E.high),low:l(E.low)},B=h-m;$.start-=B,$.end-=B,z.high-=B,z.low-=B,C=[[w.start,$.start],[w.end,$.end],[z.x,z.low,z.high]]}else C=[[0,0],[0,0],[0,0,0]];return C}},getCandlestickData({value:t}){let e;if(qe(t)){const[n,r,i,s,o=!1]=t;e={open:n,high:r,low:i,close:s},o!==!1&&(e.volume=o)}else He(t)&&(e=q2({},t));return e&&(e._isUp=e.close>=e.open),e||null}},eI=Object.defineProperty,nI=Object.defineProperties,rI=Object.getOwnPropertyDescriptors,bp=Object.getOwnPropertySymbols,aI=Object.prototype.hasOwnProperty,iI=Object.prototype.propertyIsEnumerable,Sp=(t,e,n)=>e in t?eI(t,e,{enumerable:!0,configurable:!0,writable:!0,value:n}):t[e]=n,sI=(t,e)=>{for(var n in e||(e={}))aI.call(e,n)&&Sp(t,n,e[n]);if(bp)for(var n of bp(e))iI.call(e,n)&&Sp(t,n,e[n]);return t},oI=(t,e)=>nI(t,rI(e)),lI=oI(sI({},tI),{initCandlestick(){Kv.call(this,{elKey:"candlestick",className:Kr.chartCandlesticks})},updateTargetsForCandlestick(t){su.call(this,t,{type:"Candlestick",elKey:"candlestick",containerClass:Kr.chartCandlesticks,itemClass:Kr.chartCandlestick,initFn:this.initCandlestick,withFocus:!1,withStyles:!1}).style("pointer-events","none")},updateCandlestick(t,e=!1){const n=this,{$el:r,$T:i}=n,s=e?r.subchart:r,o=n.getClass("candlestick",!0),l=n.initialOpacity.bind(n),c=s.main.selectAll(`.${Kr.chartCandlestick}`).selectAll(`.${Kr.candlestick}`).data(n.labelishData.bind(n));i(c.exit(),t).style("opacity","0").remove();const u=c.enter().filter(f=>f.value).append("g").attr("class",o);u.append("line"),u.append("path"),s.candlestick=c.merge(u).style("opacity",l)},generateDrawCandlestick(t,e){const n=this,{config:r}=n,i=n.generateGetCandlestickPoints(t,e),s=r.axis_rotated,o=r.candlestick_color_down;return(l,c,u)=>{const f=i(l,c),d=n.getCandlestickData(l),h=d==null?void 0:d._isUp,m=+s,S=+!m;u.classed&&u.classed(Kr[h?"valueUp":"valueDown"],!0);const E=s?`H${f[1][1]} V${f[1][0]} H${f[0][1]}`:`V${f[1][1]} H${f[1][0]} V${f[0][1]}`;u.select("path").attr("d",`M${f[0][m]},${f[0][S]}${E}z`).style("fill",$=>(h?n.color($):He(o)?o[$.id]:o)||n.color($));const C=u.select("line"),w=s?{x1:f[2][1],x2:f[2][2],y1:f[2][0],y2:f[2][0]}:{x1:f[2][0],x2:f[2][0],y1:f[2][1],y2:f[2][2]};for(const $ in w)C.attr($,w[$])}},redrawCandlestick(t,e,n=!1){const r=this,{$el:i,$T:s}=r,{candlestick:o}=n?i.subchart:i,l=Cr(!0);return[o.each(function(c,u){const f=s(Yt(this),e,l);t(c,u,f)}).style("opacity",null)]}}),cI={candlestick_width:void 0,candlestick_width_ratio:.6,candlestick_width_max:void 0,candlestick_color_down:"red"};let Ap=()=>(Ts([lI,Ti],[cI,ka]),(Ap=()=>qt.CANDLESTICK)());var sl={arc_cornerRadius:0,arc_cornerRadius_ratio:0,arc_needle_show:!1,arc_needle_color:void 0,arc_needle_value:void 0,arc_needle_path:void 0,arc_needle_length:100,arc_needle_top_rx:0,arc_needle_top_ry:0,arc_needle_top_width:0,arc_needle_bottom_rx:1,arc_needle_bottom_ry:1,arc_needle_bottom_width:15,arc_needle_bottom_len:0,arc_rangeText_values:void 0,arc_rangeText_unit:"absolute",arc_rangeText_fixed:!1,arc_rangeText_format:void 0,arc_rangeText_position:void 0},uI={donut_label_show:!0,donut_label_format:void 0,donut_label_threshold:.05,donut_label_line:!1,donut_label_image:void 0,donut_label_ratio:void 0,donut_width:void 0,donut_title:"",donut_expand:{},donut_expand_rate:.98,donut_expand_duration:50,donut_padAngle:0,donut_startingAngle:0};function fI(t,e){return e<t?-1:e>t?1:e>=t?0:NaN}function dI(t){return t}function hI(){var t=dI,e=fI,n=null,r=Je(0),i=Je(Wo),s=Je(0);function o(l){var c,u=(l=oc(l)).length,f,d,h=0,m=new Array(u),S=new Array(u),E=+r.apply(this,arguments),C=Math.min(Wo,Math.max(-Wo,i.apply(this,arguments)-E)),w,$=Math.min(Math.abs(C)/u,s.apply(this,arguments)),z=$*(C<0?-1:1),B;for(c=0;c<u;++c)(B=S[m[c]=c]=+t(l[c],c,l))>0&&(h+=B);for(e!=null?m.sort(function(W,H){return e(S[W],S[H])}):n!=null&&m.sort(function(W,H){return n(l[W],l[H])}),c=0,d=h?(C-u*z)/h:0;c<u;++c,E=w)f=m[c],B=S[f],w=E+(B>0?B*d:0)+z,S[f]={data:l[f],index:c,value:B,startAngle:E,endAngle:w,padAngle:$};return S}return o.value=function(l){return arguments.length?(t=typeof l=="function"?l:Je(+l),o):t},o.sortValues=function(l){return arguments.length?(e=l,n=null,o):e},o.sort=function(l){return arguments.length?(n=l,e=null,o):n},o.startAngle=function(l){return arguments.length?(r=typeof l=="function"?l:Je(+l),o):r},o.endAngle=function(l){return arguments.length?(i=typeof l=="function"?l:Je(+l),o):i},o.padAngle=function(l){return arguments.length?(s=typeof l=="function"?l:Je(+l),o):s},o}function vI(t){return t.innerRadius}function gI(t){return t.outerRadius}function pI(t){return t.startAngle}function mI(t){return t.endAngle}function xI(t){return t&&t.padAngle}function yI(t,e,n,r,i,s,o,l){var c=n-t,u=r-e,f=o-i,d=l-s,h=d*c-f*u;if(!(h*h<kn))return h=(f*(e-s)-d*(t-i))/h,[t+h*c,e+h*u]}function ol(t,e,n,r,i,s,o){var l=t-n,c=e-r,u=(o?s:-s)/gi(l*l+c*c),f=u*c,d=-u*l,h=t+f,m=e+d,S=n+f,E=r+d,C=(h+S)/2,w=(m+E)/2,$=S-h,z=E-m,B=$*$+z*z,W=i-s,H=h*E-S*m,_=(z<0?-1:1)*gi(jA(0,W*W*B-H*H)),q=(H*z-$*_)/B,st=(-H*$-z*_)/B,it=(H*z+$*_)/B,ot=(-H*$+z*_)/B,ct=q-C,gt=st-w,tt=it-C,ft=ot-w;return ct*ct+gt*gt>tt*tt+ft*ft&&(q=it,st=ot),{cx:q,cy:st,x01:-f,y01:-d,x11:q*(i/W-1),y11:st*(i/W-1)}}function Ep(){var t=vI,e=gI,n=Je(0),r=null,i=pI,s=mI,o=xI,l=null,c=uc(u);function u(){var f,d,h=+t.apply(this,arguments),m=+e.apply(this,arguments),S=i.apply(this,arguments)-Xo,E=s.apply(this,arguments)-Xo,C=Lv(E-S),w=E>S;if(l||(l=f=c()),m<h&&(d=m,m=h,h=d),!(m>kn))l.moveTo(0,0);else if(C>Wo-kn)l.moveTo(m*Ua(S),m*Fr(S)),l.arc(0,0,m,S,E,!w),h>kn&&(l.moveTo(h*Ua(E),h*Fr(E)),l.arc(0,0,h,E,S,w));else{var $=S,z=E,B=S,W=E,H=C,_=C,q=o.apply(this,arguments)/2,st=q>kn&&(r?+r.apply(this,arguments):gi(h*h+m*m)),it=eu(Lv(m-h)/2,+n.apply(this,arguments)),ot=it,ct=it,gt,tt;if(st>kn){var ft=Dv(st/h*Fr(q)),lt=Dv(st/m*Fr(q));(H-=ft*2)>kn?(ft*=w?1:-1,B+=ft,W-=ft):(H=0,B=W=(S+E)/2),(_-=lt*2)>kn?(lt*=w?1:-1,$+=lt,z-=lt):(_=0,$=z=(S+E)/2)}var bt=m*Ua($),St=m*Fr($),Mt=h*Ua(W),Ot=h*Fr(W);if(it>kn){var Kt=m*Ua(z),ee=m*Fr(z),Ae=h*Ua(B),Ee=h*Fr(B),Te;if(C<gs)if(Te=yI(bt,St,Ae,Ee,Kt,ee,Mt,Ot)){var De=bt-Te[0],me=St-Te[1],Pe=Kt-Te[0],Zt=ee-Te[1],he=1/Fr(HA((De*Pe+me*Zt)/(gi(De*De+me*me)*gi(Pe*Pe+Zt*Zt)))/2),ge=gi(Te[0]*Te[0]+Te[1]*Te[1]);ot=eu(it,(h-ge)/(he-1)),ct=eu(it,(m-ge)/(he+1))}else ot=ct=0}_>kn?ct>kn?(gt=ol(Ae,Ee,bt,St,m,ct,w),tt=ol(Kt,ee,Mt,Ot,m,ct,w),l.moveTo(gt.cx+gt.x01,gt.cy+gt.y01),ct<it?l.arc(gt.cx,gt.cy,ct,Un(gt.y01,gt.x01),Un(tt.y01,tt.x01),!w):(l.arc(gt.cx,gt.cy,ct,Un(gt.y01,gt.x01),Un(gt.y11,gt.x11),!w),l.arc(0,0,m,Un(gt.cy+gt.y11,gt.cx+gt.x11),Un(tt.cy+tt.y11,tt.cx+tt.x11),!w),l.arc(tt.cx,tt.cy,ct,Un(tt.y11,tt.x11),Un(tt.y01,tt.x01),!w))):(l.moveTo(bt,St),l.arc(0,0,m,$,z,!w)):l.moveTo(bt,St),!(h>kn)||!(H>kn)?l.lineTo(Mt,Ot):ot>kn?(gt=ol(Mt,Ot,Kt,ee,h,-ot,w),tt=ol(bt,St,Ae,Ee,h,-ot,w),l.lineTo(gt.cx+gt.x01,gt.cy+gt.y01),ot<it?l.arc(gt.cx,gt.cy,ot,Un(gt.y01,gt.x01),Un(tt.y01,tt.x01),!w):(l.arc(gt.cx,gt.cy,ot,Un(gt.y01,gt.x01),Un(gt.y11,gt.x11),!w),l.arc(0,0,h,Un(gt.cy+gt.y11,gt.cx+gt.x11),Un(tt.cy+tt.y11,tt.cx+tt.x11),w),l.arc(tt.cx,tt.cy,ot,Un(tt.y11,tt.x11),Un(tt.y01,tt.x01),!w))):l.arc(0,0,h,W,B,w)}if(l.closePath(),f)return l=null,f+""||null}return u.centroid=function(){var f=(+t.apply(this,arguments)+ +e.apply(this,arguments))/2,d=(+i.apply(this,arguments)+ +s.apply(this,arguments))/2-gs/2;return[Ua(d)*f,Fr(d)*f]},u.innerRadius=function(f){return arguments.length?(t=typeof f=="function"?f:Je(+f),u):t},u.outerRadius=function(f){return arguments.length?(e=typeof f=="function"?f:Je(+f),u):e},u.cornerRadius=function(f){return arguments.length?(n=typeof f=="function"?f:Je(+f),u):n},u.padRadius=function(f){return arguments.length?(r=f==null?null:typeof f=="function"?f:Je(+f),u):r},u.startAngle=function(f){return arguments.length?(i=typeof f=="function"?f:Je(+f),u):i},u.endAngle=function(f){return arguments.length?(s=typeof f=="function"?f:Je(+f),u):s},u.padAngle=function(f){return arguments.length?(o=typeof f=="function"?f:Je(+f),u):o},u.context=function(f){return arguments.length?(l=f==null?null:f,u):l},u}const TI=15,Cp=20,Ip=.35;function bI(t=!1){const e=this;return["donut","pie","polar","gauge"].find(n=>e.hasType(n)&&!(n==="gauge"&&t&&e.hasMultiArcGauge()))}function Rp(){const t=this,{config:e}=t,n=bI.call(t,!0),r=n&&e[`${n}_label_line`],i=Kn(r),s=(c,u,f)=>f,o={show:r===!0||i&&(r==null?void 0:r.show)!==!1,distance:i&&(r==null?void 0:r.distance)||Cp};if(r===!0)return{chartType:n,line:o,text:{formatter:s}};if(!i)return{chartType:n,line:{show:!1,distance:Cp},text:{formatter:null}};let l=s;return ie(r.text)?l=r.text:r.text===!1&&(l=null),{chartType:n,line:o,text:{formatter:l}}}function SI(t,e){const n=this,{state:r}=n,i=n.updateAngle(t);if(!i)return null;let{outerRadius:s}=n.getRadius(t),o=s;n.hasType("polar")&&(o=n.getPolarOuterRadius(t,s),s=r.radius);let l=(i.startAngle+i.endAngle)/2;Math.abs(i.endAngle-i.startAngle-2*Math.PI)<.01&&(l=Math.PI/2);const u=Math.sin(l),f=-Math.cos(l),d={x:u*o,y:f*o},h=s+TI,m={x:u*h,y:f*h},S=u>=0,E={x:m.x+e*(S?1:-1),y:m.y};return{startPoint:d,breakPoint:m,endPoint:E,isRight:S,midAngle:l}}function wp(){return Rp.call(this).line.show}function AI(t){const e=this,{$el:{arcs:n},$T:r}=e,{line:i,text:s}=Rp.call(e),o=i.distance;let l=null;n.selectAll(`.${Ze.chartArc}`).each(function(c){var u,f,d;const h=Yt(this),m=SI.call(e,c,o),{ratio:S,meetsThreshold:E,updated:C}=(u=c._cache)!=null?u:{};if(!C||!m)return;const w=e.isTargetToShow(c.data.id)&&E,{startPoint:$,breakPoint:z,endPoint:B,isRight:W}=m,H=`${$.x},${$.y} ${z.x},${z.y} ${B.x},${B.y}`;if(i.show){let q=h.select(`.${Ze.arcLabelLine}`);q.empty()&&(q=h.append("polyline").attr("class",Ze.arcLabelLine)),r(q,t).attr("points",H).style("stroke",e.color(c.data)).style("opacity",w?null:"0")}let _=h.select(`.${Ze.arcLabelLineText}`);if(_.empty()&&(_=h.append("text").attr("class",Ze.arcLabelLineText).style("pointer-events","none")),w){const{value:q}=C,{id:st}=c.data,it=((d=(f=s.formatter)!=null?f:e.getArcLabelConfig("format"))!=null?d:e.defaultArcValueFormat)(q,S,st).toString();ci(_,it,[-1,1],!1);const ot={x:B.x+5*(W?1:-1),y:B.y};_.style("text-anchor",W?"start":"end");const ct=_.node(),gt=ct==null?void 0:ct.querySelectorAll("tspan");if(l===null&&(l=parseFloat(se.getComputedStyle(ct).fontSize)||12),gt&>.length>1){const ft=(gt.length-3)/2;ot.y+=(-ft+Ip)*l}else ot.y+=Ip*l;r(_,t).attr("transform",`translate(${ot.x},${ot.y})`).style("opacity",null).style("fill",e.updateTextColor.bind(e)(c))}else r(_,t).style("opacity","0")})}var EI=Object.defineProperty,CI=Object.defineProperties,II=Object.getOwnPropertyDescriptors,Op=Object.getOwnPropertySymbols,RI=Object.prototype.hasOwnProperty,wI=Object.prototype.propertyIsEnumerable,Pp=(t,e,n)=>e in t?EI(t,e,{enumerable:!0,configurable:!0,writable:!0,value:n}):t[e]=n,OI=(t,e)=>{for(var n in e||(e={}))RI.call(e,n)&&Pp(t,n,e[n]);if(Op)for(var n of Op(e))wI.call(e,n)&&Pp(t,n,e[n]);return t},PI=(t,e)=>CI(t,II(e));const wu=["donut","gauge","pie","polar"];function MI(t){return["donut","pie","polar","gauge"].find(e=>t.hasType(e))}function LI(t,e,n,r){var i,s;const{config:o,state:{radiusExpanded:l}}=t,c=n.endAngle-Math.PI/2,u=Math.sin(c),f={x:Math.cos(c)*(l+(r?5:25)),y:u*(l+15-Math.abs(u*10))+3};if(r){const d=o.arc_rangeText_position;if(d){const h=o.arc_rangeText_values,m=ie(d)?d(h[e.index]):d;f.x+=(i=m==null?void 0:m.x)!=null?i:0,f.y+=(s=m==null?void 0:m.y)!=null?s:0}}return f}function DI(t,e,n,r){const{config:i}=t,s=MI(t);let o=s?i[`${s}_label_ratio`]:void 0;if(o)o=ie(o)?o.bind(t.api)(e,n,r):o;else{const d=36/n,h=d>.375;o=n&&r?(h?1.175-d:.8)*n/r:0}return o}function FI(t,e,n){let{outerRadius:r}=t.getRadius(e);t.hasType("polar")&&(r=t.getPolarOuterRadius(e,r));const[i,s]=t.svgArc.centroid(n).map(c=>isNaN(c)?0:c),o=Math.sqrt(i*i+s*s),l=DI(t,e,r,o);return{pos:{x:i,y:s},ratio:l}}function Mp(t=0){const e=this,{config:n,state:r}=e,i=e.hasMultiArcGauge(),s=r.gaugeArcWidth/e.getTargetsToShow().length,o=t?Math.min(r.radiusExpanded*t-r.radius,s*.8-(1-t)*100):0;return{inner(l){const{innerRadius:c}=e.getRadius(l);return i?r.radius-s*(l.index+1):ae(c)?c:0},outer(l){const{outerRadius:c}=e.getRadius(l);let u;if(i)u=r.radius-s*l.index+o;else if(e.hasType("polar")&&!t)u=e.getPolarOuterRadius(l,c);else if(u=c,t){let{radiusExpanded:f}=r;r.radius!==c&&(f-=Math.abs(r.radius-c)),u=f*t}return u},corner(l,c){const{arc_cornerRadius_ratio:u=0,arc_cornerRadius:f=0}=n,{data:{id:d},value:h}=l;let m;return u?m=u*c:m=ae(f)?f:f.call(e.api,d,h,c),m}}}function Ou(t){return function(e){const n=({startAngle:i=0,endAngle:s=0,padAngle:o=0})=>({startAngle:i,endAngle:s,padAngle:o}),r=Ya(n(this._current),n(e));return this._current=e,function(i){const s=r(i),{data:o,index:l,value:c}=e;return t(PI(OI({},s),{data:o,index:l,value:c}))}}}var NI={initPie(){const t=this,{config:e}=t,n=e.data_type,r=e[`${n}_padding`],i=e[`${n}_startingAngle`]||0,s=(r?r*.01:e[`${n}_padAngle`])||0;t.pie=hI().startAngle(i).endAngle(i+2*Math.PI).padAngle(s).value(o=>{var l,c;return(c=(l=o.values)==null?void 0:l.reduce((u,f)=>u+f.value,0))!=null?c:o}).sort(t.getSortCompareFn.bind(t)(!0))},updateRadius(){const t=this,{config:e,state:n}=t,r=e.data_type,i=e[`${r}_padding`],s=e.gauge_width||e.donut_width,o=t.getTargetsToShow().length*e.gauge_arcs_minWidth,l=.85,c=wp.call(t)?l:1;n.radiusExpanded=Math.min(n.arcWidth,n.arcHeight)/2*(t.hasMultiArcGauge()&&e.gauge_label_show?l:c),n.radius=n.radiusExpanded*.95,n.innerRadiusRatio=s?(n.radius-s)/n.radius:.6,n.gaugeArcWidth=s||(o<=n.radius-n.innerRadius?n.radius-n.innerRadius:o<=n.radius?o:n.radius);const u=e.pie_innerRadius||(i?i*(n.innerRadiusRatio+.1):0);n.outerRadius=e.pie_outerRadius,n.innerRadius=t.hasType("donut")||t.hasType("gauge")?n.radius*n.innerRadiusRatio:u},getRadius(t){const e=this,n=t==null?void 0:t.data;let{innerRadius:r,outerRadius:i}=e.state;return!ae(r)&&n&&(r=r[n.id]||0),He(i)&&n&&n.id in i?i=i[n.id]:ae(i)||(i=e.state.radius),{innerRadius:r,outerRadius:i}},updateArc(){const t=this;t.updateRadius(),t.svgArc=t.getSvgArc(),t.svgArcExpanded=t.getSvgArcExpanded()},getArcLength(){const t=this,{config:e}=t,n=e.gauge_arcLength*3.6;let r=2*(n/360);return n<-360?r=-2:n>360&&(r=2),r*Math.PI},getStartingAngle(){const t=this,{config:e}=t,n=e.data_type,r=t.hasType("gauge")?e.gauge_fullCircle:!1,i=-1*Math.PI/2,s=Math.PI/2;let o=e[`${n}_startingAngle`]||0;return!r&&o<=i?o=i:!r&&o>=s?o=s:(o>Math.PI||o<-1*Math.PI)&&(o=Math.PI),o},updateAngle(t,e=!1){var n;const r=this,{config:i,state:s}=r,o=e&&r.hasType("gauge");let{pie:l}=r,c=t,u=!1;if(!i)return null;const f=r.getStartingAngle(),d=i.gauge_fullCircle||e&&!o?r.getArcLength():f*-2,h=c.data&&r.isGaugeType(c.data)&&!r.hasMultiArcGauge();if(h){const{gauge_min:m,gauge_max:S}=i,E=r.getTotalDataSum(s.rendered),C=d*((E-m)/(S-m));l=l.startAngle(f).endAngle(C+f)}if(e===!1){let m;if(h)m=l(r.filterTargetsToShow());else{const S="$arcPieLayout";let E=r.cache.get(S);(!E||E.generation!==s.redrawGeneration)&&(E={generation:s.redrawGeneration,layout:l(r.filterTargetsToShow())},r.cache.add(S,E)),m=E.layout}m.forEach((S,E)=>{var C;!u&&S.data.id===((C=c.data)==null?void 0:C.id)&&(u=!0,c=S,c.index=E)})}if(isNaN(c.startAngle)&&(c.startAngle=0),isNaN(c.endAngle)&&(c.endAngle=c.startAngle),e||c.data&&(i.gauge_enforceMinMax||r.hasMultiArcGauge())){const{gauge_min:m,gauge_max:S}=i,E=e&&!o?r.getTotalDataSum(s.rendered):S,C=d/(E-m),w=(n=c.value)!=null?n:0,$=w<m?0:w<E?w-m:E-m;c.startAngle=f,c.endAngle=f+C*$}return u||e?c:null},getSvgArc(){const t=this,{inner:e,outer:n,corner:r}=Mp.call(t),i=Ep().innerRadius(e).outerRadius(n),s=function(o,l){var c;let u="M 0 0";if(o.value||o.data){const f=l?o:(c=t.updateAngle(o))!=null?c:null;f&&(u=i.cornerRadius(r(f,n(f)))(f))}return u};return s.centroid=i.centroid,s},getSvgArcExpanded(t=1){const e=this,{inner:n,outer:r,corner:i}=Mp.call(e,t),s=Ep().innerRadius(n).outerRadius(r);return o=>{const l=e.updateAngle(o),c=r(l);let u=0;return l&&(u=i(l,c)),l&&s.cornerRadius(u)(l)||"M 0 0"}},getArc(t,e,n){return n||this.isArcType(t.data)?this.svgArc(t,e):"M 0 0"},redrawArcRangeText(){const t=this,{config:e,$el:{arcs:n},state:r,$T:i}=t,s=e.arc_rangeText_format,o=t.hasType("gauge")&&e.arc_rangeText_fixed;let l=e.arc_rangeText_values;if(l!=null&&l.length){const c=e.arc_rangeText_unit==="%",u=t.getTotalDataSum(r.rendered);c&&(l=l.map(h=>u/100*h));const f=t.pie(l).map((h,m)=>(h.index=m,h));let d=n.selectAll(`.${Ze.arcRange}`).data(l);d.exit().remove(),d=i(d.enter().append("text").attr("class",Ze.arcRange).style("text-anchor","middle").style("pointer-events","none").style("opacity","0").text(h=>{const m=c?h/u*100:h;return ie(s)?s(m):`${m}${c?"%":""}`}).merge(d)),(!r.rendered||r.rendered&&!o)&&u>0&&d.attr("transform",function(h,m){return t.transformForArcLabel(this,f[m],!0)}),d.style("opacity",h=>!o&&(h>u||u===0)?"0":null)}},transformForArcLabel(t,e,n=!1){const r=this,i=r.updateAngle(e,n);if(!i)return"";let s,o=1;if(n||r.hasMultiArcGauge())s=LI(r,e,i,n);else if(!r.hasType("gauge")||r.data.targets.length>1){const l=FI(r,e,i);s=l.pos,o=l.ratio}else return"";return Rv.call(r,t,s),`translate(${s.x*o},${s.y*o})`},convertToArcData(t){return this.addName({id:"data"in t?t.data.id:t.id,value:t.value,ratio:this.getRatio("arc",t),index:t.index})},textForArcLabel(t){var e;const n=this,r=n.hasType("gauge"),i=(e=wu.filter(n.hasType.bind(n)))==null?void 0:e[0];n.shouldShowArcLabel()&&t.style("fill",n.updateTextColor.bind(n)).attr("filter",s=>n.updateTextBGColor.bind(n)(s,n.config.data_labels_backgroundColors)).each(function(s){const o=Yt(this),l=n.updateAngle(s),c=n.getRatio("arc",l),u=Qc.call(n,c,i);if(s._cache={updated:l,ratio:c,meetsThreshold:u},u){const{value:f}=l||s,d=(n.getArcLabelConfig("format")||n.defaultArcValueFormat)(f,c,s.data.id).toString();ci(o,d,[-1,1],r)}else o.text("")})},expandArc(t){const e=this,{state:{transiting:n},$el:r}=e;if(n){const s=setInterval(()=>{e.state.transiting||(clearInterval(s),r.legend.selectAll(`.${nn.legendItemFocused}`).size()>0&&e.expandArc(t))},10);return}const i=e.mapToTargetIds(t);r.svg.selectAll(e.selectorTargets(i,`.${Ze.chartArc}`)).each(function(s){if(!e.shouldExpand(s.data.id))return;const o=e.getExpandConfig(s.data.id,"duration"),l=e.getSvgArcExpanded(e.getExpandConfig(s.data.id,"rate"));Yt(this).selectAll("path").transition().duration(o).attrTween("d",Ou(e.svgArcExpanded.bind(e))).transition().duration(o*2).attrTween("d",Ou(l.bind(e)))})},unexpandArc(t){const e=this,{state:{transiting:n},$el:{svg:r}}=e;if(n)return;const i=e.mapToTargetIds(t);r.selectAll(e.selectorTargets(i,`.${Ze.chartArc}`)).selectAll("path").transition().duration(s=>e.getExpandConfig(s.data.id,"duration")).attrTween("d",Ou(e.svgArc.bind(e))),r.selectAll(`${Ze.arc}`).style("opacity",null)},getExpandConfig(t,e){const n=this,{config:r}=n,i={duration:50,rate:.98};let s;return n.isDonutType(t)?s="donut":n.isGaugeType(t)?s="gauge":n.isPieType(t)&&(s="pie"),s?r[`${s}_expand_${e}`]:i[e]},shouldExpand(t){const e=this,{config:n}=e,r=e.isDonutType(t)?"donut":e.isGaugeType(t)?"gauge":e.isPieType(t)?"pie":null;return r?!!n[`${r}_expand`]:!1},shouldShowArcLabel(){const t=this,{config:e}=t;return wu.some(n=>t.hasType(n)&&e[`${n}_label_show`])},getArcLabelConfig(t="format"){const e=this,{config:n}=e;let r=i=>i;return wu.filter(e.hasType.bind(e)).forEach(i=>{r=n[`${i}_label_${t}`]}),t==="format"&&ie(r)?r.bind(e.api):r},updateTargetsForArc(t){const e=this,{$el:n}=e,r=e.hasType("gauge"),i=e.getChartClass("Arc"),s=e.getClass("arcs",!0),o=e.classFocus.bind(e),l=n.main.select(`.${Ze.chartArcs}`),c=l.selectAll(`.${Ze.chartArc}`).data(e.pie(t)).attr("class",f=>i(f)+o(f.data)),u=c.enter().append("g").attr("class",i).call(this.setCssRule(!1,`.${Ze.chartArcs} text`,["pointer-events:none","text-anchor:middle"]));u.append("g").attr("class",s).merge(c),u.append("text").attr("dy",r&&!e.hasMultiTargets()?"-.1em":null).style("opacity","0").style("text-anchor",e.getStylePropValue("middle")).style("pointer-events",e.getStylePropValue("none")),n.text=l.selectAll(`.${ze.target} text`)},initArc(){const t=this,{$el:e}=t;e.arcs=e.main.select(`.${ze.chart}`).append("g").attr("class",Ze.chartArcs).attr("transform",t.getTranslate("arc")),t.setArcTitle()},setArcTitle(t){const e=this,n=t||e.getArcTitle(),r=e.hasType("gauge");if(n){const i=r?ar.chartArcsGaugeTitle:Ze.chartArcsTitle;let s=e.$el.arcs.select(`.${i}`);s.empty()&&(s=e.$el.arcs.append("text").attr("class",i).style("text-anchor","middle")),r&&s.attr("dy","-0.3em"),ci(s,n,r?void 0:[-.6,1.35],!0)}},getArcTitle(){const t=this,e=t.hasType("donut")&&"donut"||t.hasType("gauge")&&"gauge";return e?t.config[`${e}_title`]:""},getArcTitleWithNeedleValue(){const t=this,{config:e,state:n}=t,r=t.getArcTitle();if(r&&t.config.arc_needle_show&&/{=[A-Z_]+}/.test(r)){let i=n.current.needle;return ae(i)||(i=e.arc_needle_value),Pa(r,{NEEDLE_VALUE:~~i})}return!1},redrawArc(t,e,n){const r=this,{config:i,state:s,$el:{main:o}}=r,l=i.interaction_enabled,c=l&&i.data_selection_isselectable;let u=o.selectAll(`.${Ze.arcs}`).selectAll(`.${Ze.arc}`).data(r.arcData.bind(r));u.exit().transition().duration(e).style("opacity","0").remove(),u=u.enter().append("path").attr("class",r.getClass("arc",!0)).style("fill",f=>r.color(f.data)).style("cursor",f=>{var d;return(d=c==null?void 0:c.bind)!=null&&d.call(c,r.api)(f)?"pointer":null}).style("opacity","0").each(function(f){r.isGaugeType(f.data)&&(f.startAngle=i.gauge_startingAngle,f.endAngle=i.gauge_startingAngle),this._current=f}).merge(u),r.hasType("gauge")&&(r.updateGaugeMax(),r.hasMultiArcGauge()&&r.redrawArcGaugeLine()),u.attr("transform",f=>!r.isGaugeType(f.data)&&n?"scale(0)":"").style("opacity",function(f){return f===this._current?"0":null}).each(()=>{s.transiting=!0}).transition().duration(t).attrTween("d",function(f){const d=r.updateAngle(f);if(!d)return()=>"M 0 0";isNaN(this._current.startAngle)&&(this._current.startAngle=0),isNaN(this._current.endAngle)&&(this._current.endAngle=this._current.startAngle);const h=Ya(this._current,d);return this._current=h(0),function(m){const S=h(m);return S.data=f.data,r.getArc(S,!0)}}).attr("transform",n?"scale(1)":"").style("fill",f=>{let d;return r.levelColor?(d=r.levelColor(f.data.values[0].value),i.data_colors[f.data.id]=d):d=r.color(f.data),d}).style("opacity",null).call(eo,function(){if(r.levelColor){const f=Yt(this),d=f.datum(this._current);r.updateLegendItemColor(d.data.id,f.style("fill"))}s.transiting=!1,s.redrawing&&(s.redrawing=!1,s._targetsToShow=null,s._cachedDrawShape=null),Ne(i.onrendered,r.api)}),l&&r.bindArcEvent(u),r.hasType("polar")&&r.redrawPolar(),r.hasType("gauge")&&r.redrawBackgroundArcs(),i.arc_needle_show&&r.redrawNeedle(),r.redrawArcText(t),r.redrawArcRangeText()},redrawNeedle(){const t=this,{$el:e,config:n,state:{hiddenTargetIds:r,radius:i}}=t,s=(i-1)/100*n.arc_needle_length,o=r.size!==t.data.targets.length;let l=t.$el.arcs.select(`.${Ze.needle}`);const c=n.arc_needle_path,u=n.arc_needle_bottom_width/2,f=n.arc_needle_top_width/2,d=n.arc_needle_top_rx,h=n.arc_needle_top_ry,m=n.arc_needle_bottom_len,S=n.arc_needle_bottom_rx,E=n.arc_needle_bottom_ry,C=t.getNeedleAngle(),w=()=>{const $=t.getArcTitleWithNeedleValue();$&&t.setArcTitle($)};if(w(),l.empty()&&(l=e.arcs.append("path").classed(Ze.needle,!0),e.needle=l,e.needle.updateHelper=($,z=!1)=>{e.needle.style("display")!=="none"&&t.$T(e.needle).style("transform",`rotate(${t.getNeedleAngle($)}deg)`).call(eo,()=>{z&&(n.arc_needle_value=$),w()})}),o){const $=ie(c)?c.call(t,s):`M-${u} ${m} A${S} ${E} 0 0 0 ${u} ${m} L${f} -${s} A${d} ${h} 0 0 0 -${f} -${s} L-${u} ${m} Z`;t.$T(l).attr("d",$).style("fill",n.arc_needle_color).style("display",null).style("transform",`rotate(${C}deg)`)}else l.style("display","none")},getNeedleAngle(t){const e=this,{config:n,state:r}=e,i=e.getArcLength(),s=e.hasType("gauge"),o=e.getTotalDataSum(!0);let l=sn(t)?t:n.arc_needle_value,c=n[`${n.data_type}_startingAngle`]||0,u;if(ae(l)||(l=s&&e.data.targets.length===1?o:0),r.current.needle=l,s){c=e.getStartingAngle();const f=n.gauge_fullCircle?i:c*-2,{gauge_min:d,gauge_max:h}=n;u=f*((l-d)/(h-d))}else u=o?i*(l/o):0;return(c+u)*(180/Math.PI)},redrawBackgroundArcs(){const t=this,{config:e,state:n}=t,r=t.hasMultiArcGauge(),i=e.gauge_fullCircle,s=t.getTargetsToShow().length===0&&!!e.data_empty_label_text,o=t.getStartingAngle(),l=i?o+t.getArcLength():o*-1;let c=t.$el.arcs.select(`${r?"g":""}.${Ze.chartArcsBackground}`);if(r){let u=0;c=c.selectAll(`path.${Ze.chartArcsBackground}`).data(t.data.targets),c.enter().append("path").attr("class",(f,d)=>`${Ze.chartArcsBackground} ${Ze.chartArcsBackground}-${d}`).merge(c).style("fill",e.gauge_background||null).attr("d",({id:f})=>{if(s||n.hiddenTargetIds.has(f))return"M 0 0";const d={data:[{value:e.gauge_max}],startAngle:o,endAngle:l,index:u++};return t.getArc(d,!0,!0)}),c.exit().remove()}else c.attr("d",s?"M 0 0":()=>{const u={data:[{value:e.gauge_max}],startAngle:o,endAngle:l};return t.getArc(u,!0,!0)})},bindArcEvent(t){const e=this,{config:n,state:r}=e,i=r.inputType==="touch",s=r.inputType==="mouse",o=u=>{const f=e.updateAngle(u);return f?e.convertToArcData(f):null};function l(u,f,d){e.expandArc(d),e.api.focus(d),e.toggleFocusLegend(d,!0),e.showTooltip([f],u)}function c(u){const f=(u==null?void 0:u.id)||void 0;e.unexpandArc(f),e.api.revert(),e.revertLegend(),e.hideTooltip()}if(t.on("click",function(u,f,d){var h;const m=o(f);m&&((h=e.toggleShape)==null||h.call(e,this,m,d),n.data_onclick.bind(e.api)(m,this))}),s&&t.on("mouseover",function(u,f){if(r.transiting)return;r.event=u;const d=o(f),h=(d==null?void 0:d.id)||void 0;l(this,d,h),e.setOverOut(!0,d)}).on("mouseout",(u,f)=>{if(r.transiting||!n.interaction_onout)return;r.event=u;const d=o(f);c(),e.setOverOut(!1,d)}).on("mousemove",function(u,f){const d=o(f);r.event=u,e.showTooltip([d],this)}),i&&e.hasArcType()&&!e.radars){const u=f=>{var d,h;const{clientX:m,clientY:S}=(h=(d=f.changedTouches)==null?void 0:d[0])!=null?h:{clientX:0,clientY:0};return Yt(Ye.elementFromPoint(m,S))};e.$el.svg.on("touchstart touchmove",function(f){if(r.transiting)return;r.event=f;const h=u(f).datum(),m=h!=null&&h.data&&h.data.id?e.updateAngle(h):null,S=m?e.convertToArcData(m):null,E=(S==null?void 0:S.id)||void 0;e.callOverOutForTouch(S),mn(E)?c():l(this,S,E)},{passive:!0})}},redrawArcText(t){const e=this,{config:n,state:r,$el:{main:i,arcs:s}}=e,o=e.hasType("gauge"),l=e.hasMultiArcGauge();let c;if(o&&e.data.targets.length===1&&n.gauge_title||(c=i.selectAll(`.${Ze.chartArc}`).select("text").style("opacity","0").attr("class",u=>e.isGaugeType(u.data)?ar.gaugeValue:null).call(e.textForArcLabel.bind(e)).style("font-size",u=>e.isGaugeType(u.data)&&e.data.targets.length===1&&!l?`${Math.round(r.radius/5)}px`:null),Iv.call(e),c.attr("transform",function(u){return e.transformForArcLabel.bind(e)(this,u)}).transition().duration(t).style("opacity",u=>e.isTargetToShow(u.data.id)&&e.isArcType(u.data)?null:"0"),l&&c.attr("dy","-.1em")),i.select(`.${Ze.chartArcsTitle}`).style("opacity",e.hasType("donut")||o?null:"0"),o){const u=n.gauge_fullCircle;u&&(c==null||c.attr("dy",`${l?0:Math.round(r.radius/14)}`)),n.gauge_label_show&&(s.select(`.${ar.chartArcsGaugeUnit}`).attr("dy",`${u?1.5:.75}em`).text(n.gauge_units),s.select(`.${ar.chartArcsGaugeMin}`).attr("dx",`${-1*(r.innerRadius+(r.radius-r.innerRadius)/(u?1:2))}px`).attr("dy","1.2em").text(e.textForGaugeMinMax(n.gauge_min,!1)),!u&&s.select(`.${ar.chartArcsGaugeMax}`).attr("dx",`${r.innerRadius+(r.radius-r.innerRadius)/2}px`).attr("dy","1.2em").text(e.textForGaugeMinMax(n.gauge_max,!0)))}wp.call(e)&&AI.call(e,t)},getArcElementByIdOrIndex(t){const e=this,{$el:{arcs:n}}=e,r=ae(t)?i=>i.index===t:i=>i.data.id===t;return n==null?void 0:n.selectAll(`.${ze.target} path`).filter(r)}};function Si(t,e){xn(br.prototype,[NI,Ti].concat(t||[])),$a.setOptions([ka].concat(e||[]))}let Lp=()=>(Si(void 0,[sl,uI]),(Lp=()=>qt.DONUT)());var $I=Object.defineProperty,Dp=Object.getOwnPropertySymbols,BI=Object.prototype.hasOwnProperty,zI=Object.prototype.propertyIsEnumerable,Fp=(t,e,n)=>e in t?$I(t,e,{enumerable:!0,configurable:!0,writable:!0,value:n}):t[e]=n,UI=(t,e)=>{for(var n in e||(e={}))BI.call(e,n)&&Fp(t,n,e[n]);if(Dp)for(var n of Dp(e))zI.call(e,n)&&Fp(t,n,e[n]);return t};function Ai(t=!1){const e=this,{config:n,state:{current:{width:r,height:i}}}=e,s=e.getCurrentPadding(),o=UI({width:r-s.left-s.right,height:i-(n.legend_show?e.getLegendHeight()+10:0)-s.top-s.bottom},s);if(t){const l=Pu.call(e,o),c=n.funnel_rotated;o.width=Math.max(o.width,c?l.height:l.width),o.height=Math.max(o.height,c?l.width:l.height)}return o}function Pu(t){const e=this,{config:n}=e,r=n.funnel_rotated,[i,s]=[n.funnel_neck_width,n.funnel_neck_height].map((o,l)=>He(o)?t[r!==!l?"width":"height"]*o.ratio:o);return{width:i,height:s}}function kI(t){const e=this,n=e.config.funnel_rotated,{width:r,height:i}=Ai.call(e,!0),s=[];return t.forEach((o,l)=>{const{ratio:c=0}=o,u=l>0?s[l-1][2][n?0:1]:0,f=c+u;s.push(o.coords=n?[[u,0],[f,0],[f,i],[u,i],[u,0]]:[[0,u],[r,u],[r,f],[0,f],[0,u]])}),s}function GI(){const t=this,e=t.config.funnel_rotated,{width:n,height:r}=Ai.call(t,!0),i=Pu.call(t,{width:n,height:r});let s;if(e){const o=(r-i.width)/2,l=n-i.height;s=[[l,o],[n,o],[n,r-o],[l,r-o],[0,r]]}else{const o=(n-i.width)/2,l=r-i.height;s=[[n,0],[n-o,l],[n-o,r],[o,r],[o,l]]}return`M${[[0,0],...s,[0,0]].join("L")}z`}function XI(t){const e=this,{config:n}=e,r=t.map(i=>({id:i.id,value:i.values.reduce((s,o)=>s+o.value,0)}));return n.data_order&&r.sort(e.getSortCompareFn.bind(e)(!0)),Np.call(e,r)}function Np(t){const e=this,{width:n,height:r}=Ai.call(e),i=e.getTotalDataSum(!0),s=e.config.funnel_rotated?n:r;return t.forEach(o=>{o.ratio=o.value/i*s}),t}function WI(t){return t<.5?4*t*t*t:1-Math.pow(-2*t+2,3)/2}function $p(t,e,n,r,i){const s=[];for(let l=0;l<=20;l++){const c=l/20,u=t+(e-t)*c,f=n+(r-n)*WI(c);s.push(i?[u,f]:[f,u])}return s}function VI(){var t;const e=this,n=e.config.funnel_rotated,{width:r,height:i}=Ai.call(e,!0),s=Pu.call(e,{width:r,height:i}),o=fc().x(m=>m[0]).y(m=>m[1]).curve(ho),l=(n?i-s.width:r-s.width)/2,c=n?r-s.height:i-s.height,u=$p(0,c,n?0:r,n?l:r-l,n),f=[];if(s.height>0&&(u.push(n?[r,l]:[r-l,i]),f.push(n?[r,i-l]:[l,i])),f.push(...$p(c,0,n?i-l:l,n?i:0,n)),u.length>1){const[m,S]=n?[1,0]:[0,1];u.splice(1,0,[u[m][0],u[S][1]]);const E=f.length-1;E>0&&f.splice(E,0,[f[E-m][0],f[E-S][1]])}const d=o(u)||"",h=((t=o(f))==null?void 0:t.replace(/^M/,"L"))||"";return n?`${d}${h}z`:`M0,0${d.replace(/^M/,"L")}${h}z`}var jI={initFunnel(){const t=this,{$el:e}=t;e.funnel=e.main.select(`.${ze.chart}`).append("g").classed(is.chartFunnels,!0),e.funnel.background=e.funnel.append("path").classed(is.funnelBackground,!0),t.bindFunnelEvent()},bindFunnelEvent(){const t=this,{$el:{funnel:e},config:n,state:r}=t;if(!n.interaction_enabled)return;const i=o=>{var l;const c=o.isTrusted?o.target:(l=r.eventReceiver.rect)==null?void 0:l.node();if(c&&/^path$/i.test(c.tagName))return r.event=o,Yt(c).datum()},s=r.inputType==="touch";e.on(s?"touchstart":"mouseover mousemove",o=>{const l=i(o);l&&(t.showTooltip([l],o.target),/^(touchstart|mouseover)$/.test(o.type)&&t.setOverOut(!0,l))},s?{passive:!0}:void 0).on(s?"touchend":"mouseout",o=>{const l=i(o);n.interaction_onout&&(t.hideTooltip(),t.setOverOut(!1,l))})},updateTargetsForFunnel(t){const e=this,{$el:{funnel:n}}=e;n||e.initFunnel();const r=e.getChartClass("Funnel"),i=e.getClass("funnel",!0),s=XI.call(e,t.filter(e.isFunnelType.bind(e))),o=e.filterNullish(s),l=n.selectAll(`.${is.chartFunnel}`).data(o);l.exit().remove();const c=l.enter().insert("g",`.${is.funnelBackground}`);c.append("path"),n.path=c.merge(l).attr("class",r).select("path").attr("class",i).style("opacity","0").style("fill",e.color)},updateFunnel(t){const e=this,{$el:{funnel:n}}=e,r=t.map(({id:i})=>i);n.path=n.path.filter(i=>r.includes(i.id))},generateGetFunnelPoints(){const t=this,{config:e,$el:{funnel:n}}=t,r=e.funnel_rotated,i=t.filterTargetsToShow(n.path),{top:s,left:o,width:l,height:c}=Ai.call(t),u={};let f=0;return i.each(d=>{const h=f,{ratio:m}=d;f+=m;const S=r?o:s,E=S+h,C=S+f,w=(E+C)/2,$=r?s+c/2:o+l/2;u[d.id]=r?[[E,$],[C,$],[w,$]]:[[$,E],[$,C],[$,w]]}),d=>u[d.id]},redrawFunnel(){const t=this,{config:e,$T:n,$el:{funnel:r}}=t,i=t.filterTargetsToShow(r.path),s=kI.call(t,Np.call(t,i.data())),{top:o,left:l}=Ai.call(t),c=(e.funnel_spline?VI:GI).call(t);r.attr("transform",`translate(${l}, ${o})`).attr("clip-path",`path('${c}')`),r.background.attr("d",c),n(i).attr("d",(u,f)=>`M${s[f].join("L")}z`).style("opacity","1"),r.selectAll("g").style("opacity",null)}},HI={funnel_neck_width:0,funnel_neck_height:0,funnel_rotated:!1,funnel_spline:!1};let Bp=()=>(Si([jI],[HI]),(Bp=()=>qt.FUNNEL)());var YI={initGauge(){const t=this,{config:e,$el:{arcs:n}}=t,r=(i=null,s="")=>{n.append("text").attr("class",i).style("text-anchor","middle").style("pointer-events","none").text(s)};if(t.hasType("gauge")){const i=t.hasMultiArcGauge();n.append(i?"g":"path").attr("class",Ze.chartArcsBackground).style("fill",!i&&e.gauge_background||null),e.gauge_units&&r(ar.chartArcsGaugeUnit),e.gauge_label_show&&(r(ar.chartArcsGaugeMin),!e.gauge_fullCircle&&r(ar.chartArcsGaugeMax))}},updateGaugeMax(){const t=this,{config:e,state:n}=t,i=t.hasMultiArcGauge()?t.getMinMaxData().max[0].value:t.getTotalDataSum(n.rendered);!e.gauge_enforceMinMax&&i+e.gauge_min*(e.gauge_min>0?-1:1)>e.gauge_max&&(e.gauge_max=i-e.gauge_min)},redrawArcGaugeLine(){const t=this,{config:e,state:n,$el:r}=t,{hiddenTargetIds:i}=t.state,s=r.main.selectAll(`.${Ze.arcs}`).selectAll(`.${Ze.arcLabelLine}`).data(t.arcData.bind(t));s.enter().append("rect").attr("class",l=>`${Ze.arcLabelLine} ${ze.target} ${ze.target}-${l.data.id}`).merge(s).style("fill",l=>t.levelColor?t.levelColor(l.data.values[0].value):t.color(l.data)).style("display",e.gauge_label_show?null:"none").each(function(l){let c=0;const u=2;let f=0,d=0,h="";if(!i.has(l.data.id)){const m=t.updateAngle(l),S=n.gaugeArcWidth/t.getTargetsToShow().length*(m.index+1),E=m.endAngle-Math.PI/2,C=n.radius-S,w=E-(C===0?0:1/C);c=n.radiusExpanded-n.radius+S,f=Math.cos(w)*C,d=Math.sin(w)*C,h=`rotate(${E*180/Math.PI}, ${f}, ${d})`}Yt(this).attr("x",f).attr("y",d).attr("width",c).attr("height",u).attr("transform",h).style("stroke-dasharray",`0, ${c+u}, 0`)})},textForGaugeMinMax(t,e){const n=this,{config:r}=n,i=r.gauge_label_extents;return ie(i)?i.bind(n.api)(t,e):t},getGaugeLabelHeight(){const{config:t}=this;return this.config.gauge_label_show&&!t.gauge_fullCircle?20:0},getPaddingBottomForGauge(){return this.getGaugeLabelHeight()*2}},KI={gauge_background:"",gauge_fullCircle:!1,gauge_label_show:!0,gauge_label_extents:void 0,gauge_label_format:void 0,gauge_label_ratio:void 0,gauge_label_threshold:0,gauge_label_line:!1,gauge_label_image:void 0,gauge_enforceMinMax:!1,gauge_min:0,gauge_max:100,gauge_type:"single",gauge_startingAngle:-1*Math.PI/2,gauge_arcLength:100,gauge_title:"",gauge_units:void 0,gauge_width:void 0,gauge_arcs_minWidth:5,gauge_expand:{},gauge_expand_rate:.98,gauge_expand_duration:50};let zp=()=>(Si([YI],[sl,KI]),(zp=()=>qt.GAUGE)()),Up=()=>(ea(),(Up=()=>qt.LINE)()),kp=()=>(ea(void 0,[xu]),(kp=()=>qt.SPLINE)()),Gp=()=>(ea(),(Gp=()=>qt.STEP)());var ZI={pie_label_show:!0,pie_label_format:void 0,pie_label_ratio:void 0,pie_label_threshold:.05,pie_label_line:!1,pie_label_image:void 0,pie_expand:{},pie_expand_rate:.98,pie_expand_duration:50,pie_innerRadius:0,pie_outerRadius:void 0,pie_padAngle:0,pie_padding:0,pie_startingAngle:0};let Xp=()=>(Si(void 0,[sl,ZI]),(Xp=()=>qt.PIE)());function Wp(t){const e=t.config.polar_level_max;let n=t.getMinMaxData().max[0].value;return e&&e>n&&(n=e),n}var JI={initPolar(){const t=this,{$el:{arcs:e},config:n}=t,r=n.polar_level_text_show,i=n.polar_level_text_backgroundColor;e.levels=e.append("g").attr("class",Jr.levels),r&&i&&t.generateTextBGColorFilter(i)},getPolarOuterRadius(t,e){var n;const r=Wp(this);return((n=t==null?void 0:t.data.values[0].value)!=null?n:0)/r*e},updateTargetsForPolar(t){this.updateTargetsForArc(t)},redrawPolar(){const t=this,{config:e}=t;e.polar_level_show&&t.updatePolarLevel()},updatePolarLevel(){const t=this,{config:e,state:n,$el:{arcs:{levels:r}}}=t,i=e.polar_level_depth,s=Wp(t),o=no(0,i),l=n.radius,c=o.map(h=>l*((h+1)/i)),u=(e.polar_level_text_format||function(){}).bind(t.api),f=r.selectAll(`.${Jr.level}`).data(o);f.exit().remove();const d=f.enter().append("g").attr("class",(h,m)=>`${Jr.level} ${Jr.level}-${m}`);if(d.append("circle"),d.merge(f).selectAll("circle").style("visibility",e.polar_level_show?null:"hidden").attr("cx",0).attr("cy",0).attr("r",h=>c[h]),e.polar_level_text_show){const h=e.polar_level_text_backgroundColor,m=`#${n.datetimeId}-labels-bg${t.getTargetSelectorSuffix(h)}`;d.append("text").style("text-anchor","middle"),d.merge(f).selectAll("text").attr("dy",S=>-c[S]+5).attr("filter",h?`url(${m})`:null).text(S=>u(s/o.length*(S+1)))}}},QI={polar_label_show:!0,polar_label_format:void 0,polar_label_threshold:.05,polar_label_line:!1,polar_label_image:void 0,polar_label_ratio:void 0,polar_level_depth:3,polar_level_max:void 0,polar_level_show:!0,polar_level_text_backgroundColor:"#fff",polar_level_text_format:t=>t%1===0?t:t.toFixed(2),polar_level_text_show:!0,polar_padAngle:0,polar_padding:0,polar_startingAngle:0};let Vp=()=>(Si([JI],[sl,QI]),(Vp=()=>qt.POLAR)());function _I(t,e,n,r,i,s){const o=t&&r>0?n-r:r,l=2*Math.PI;return i*(1-s*(e==="x"?Math.sin:Math.cos)(o*l/n))}const Ei=Oe.radarPoints,jp=Oe.radarTextWidth;var qI={initRadar(){const t=this,{config:e,state:{current:n},$el:r}=t;t.hasType("radar")&&(r.radar=r.main.select(`.${ze.chart}`).append("g").attr("class",yh.chartRadars),r.radar.levels=r.radar.append("g").attr("class",Jr.levels),r.radar.axes=r.radar.append("g").attr("class",Rn.axis),r.radar.shapes=r.radar.append("g").attr("class",Tn.shapes),n.dataMax=e.radar_axis_max||t.getMinMaxData().max[0].value,e.radar_axis_text_show&&(e.interaction_enabled&&t.bindRadarEvent(),t.updateRadarLevel(),t.updateRadarAxes()))},getRadarSize(){const t=this,{config:e,state:{arcWidth:n,arcHeight:r}}=t,i=e.axis_x_categories.length<4?-20:10,s=(Math.min(n,r)-i)/2;return[s,s]},updateTargetsForRadar(t){const e=this,{config:n}=e;lr(n.axis_x_categories)&&(n.axis_x_categories=no(0,pr("max",t.map(r=>r.values.length)))),e.generateRadarPoints()},getRadarPosition(t,e,n,r){const i=this,{config:s}=i,[o,l]=i.getRadarSize(),c=s.axis_x_categories.length,u=s.radar_direction_clockwise,f=Oa(t).map(d=>_I(u,d,c,e,sn(n)?n:t==="x"?o:l,ae(r)?r:s.radar_size_ratio));return f.length===1?f[0]:f},generateRadarPoints(){const t=this,e=t.data.targets,[n,r]=t.getRadarSize(),i=t.cache.get(Ei)||{},s=i._size;(!s||s.width!==n&&s.height!==r)&&(e.forEach(o=>{i[o.id]=o.values.map((l,c)=>t.getRadarPosition(["x","y"],c,void 0,t.getRatio("radar",l)))}),i._size={width:n,height:r},t.cache.add(Ei,i))},redrawRadar(){const t=this,{radar:e,main:n}=t.$el,r=t.getTranslate("radar");r&&(e.attr("transform",r),n.select(`.${En.chartTexts}`).attr("transform",r),t.generateRadarPoints(),t.updateRadarLevel(),t.updateRadarAxes(),t.updateRadarShape())},generateGetRadarPoints(){const t=this.cache.get(Ei);return(e,n)=>{const r=t[e.id][n];return[r,r,r,r]}},updateRadarLevel(){const t=this,{config:e,state:n,$el:{radar:r}}=t,[i,s]=t.getRadarSize(),o=e.radar_level_depth,l=e.axis_x_categories.length,c=e.radar_level_text_show,u=r.levels,f=no(0,o),d=e.radar_size_ratio*Math.min(i,s),h=f.map(w=>d*((w+1)/o)),m=(e.radar_level_text_format||function(){}).bind(t.api),S=f.map(w=>{const $=h[w];return no(0,l).map(B=>t.getRadarPosition(["x","y"],B,$,1).join(",")).join(" ")}),E=u.selectAll(`.${Jr.level}`).data(f);E.exit().remove();const C=E.enter().append("g").attr("class",(w,$)=>`${Jr.level} ${Jr.level}-${$}`);C.append("polygon").style("visibility",e.radar_level_show?null:"hidden"),c&&(u.select("text").empty()&&u.append("text").attr("dx","-.5em").attr("dy","-.7em").style("text-anchor","end").text(()=>m(0)),C.append("text").attr("dx","-.5em").style("text-anchor","end").text(w=>m(n.current.dataMax/f.length*(w+1)))),C.merge(E).attr("transform",w=>`translate(${i-h[w]}, ${s-h[w]})`).selectAll("polygon").attr("points",w=>S[w]),c&&u.selectAll("text").attr("x",w=>mn(w)?i:S[w].split(",")[0]).attr("y",w=>mn(w)?s:0)},updateRadarAxes(){const t=this,{config:e,$el:{radar:n}}=t,[r,i]=t.getRadarSize(),s=e.axis_x_categories;let o=n.axes.selectAll("g").data(s);o.exit().remove();const l=o.enter().append("g").attr("class",(c,u)=>`${Rn.axis}-${u}`);if(e.radar_axis_line_show&&l.append("line"),e.radar_axis_text_show&&l.append("text"),o=l.merge(o),e.radar_axis_line_show&&o.select("line").attr("x1",r).attr("y1",i).attr("x2",(c,u)=>t.getRadarPosition("x",u)).attr("y2",(c,u)=>t.getRadarPosition("y",u)),e.radar_axis_text_show){const{x:c=0,y:u=0}=e.radar_axis_text_position,f=t.cache.get(jp)||0;if(o.select("text").style("text-anchor","middle").attr("dy",".5em").call(d=>{d.each(function(h){ci(Yt(this),String(h),[-.6,1.2])})}).datum((d,h)=>({index:h})).attr("transform",function(d){mn(this.width)&&(this.width=ln(this,!0).width/2);let h=t.getRadarPosition("x",d.index,void 0,1),m=Math.round(t.getRadarPosition("y",d.index,void 0,1));return h>r?h+=this.width+c:Math.round(h)<r&&(h-=this.width+c),m>i?(m/2===i&&this.firstChild.tagName==="tspan"&&this.firstChild.setAttribute("dy","0em"),m+=u):m<i&&(m-=u),`translate(${h} ${m})`}),!f){const d=[n.axes,n.levels].map(h=>wh(h.node()).width);d.every(h=>h>0)&&t.cache.add(jp,d[0]-d[1])}}},bindRadarEvent(){const t=this,{config:e,state:n,$el:{radar:r,svg:i}}=t,s=t.isPointFocusOnly(),{inputType:o,transiting:l}=n,c=o==="mouse",u=f=>{if(n.event=f,!e.interaction_onout)return;const d=t.getDataIndexFromEvent(f),h=mn(d);(c||h)&&(t.hideTooltip(),s?t.hideCircleFocus():t.unexpandCircles(),c?t.setOverOut(!1,d):h&&t.callOverOutForTouch())};r.axes.on(c?"mouseover ":"touchstart",f=>{if(l)return;n.event=f;const d=t.getDataIndexFromEvent(f);t.selectRectForSingle(i.node(),d),c?t.setOverOut(!0,d):t.callOverOutForTouch(d)},c?void 0:{passive:!0}).on("mouseout",c?u:null),c||i.on("touchstart",u,{passive:!0})},updateRadarShape(){const t=this,e=t.data.targets.filter(s=>t.isRadarType(s)),n=t.cache.get(Ei),r=t.$el.radar.shapes.selectAll("polygon").data(t.filterNullish(e)),i=r.enter().append("g").attr("class",t.getChartClass("Radar"));t.$T(r.exit()).remove(),i.append("polygon").merge(r).style("fill",t.color).style("stroke",t.color).attr("points",s=>n[s.id].join(" ")),t.updateTargetForCircle(e,i)},radarCircleX(t){return this.cache.get(Ei)[t.id][t.index][0]},radarCircleY(t){return this.cache.get(Ei)[t.id][t.index][1]}},tR={radar_axis_max:void 0,radar_axis_line_show:!0,radar_axis_text_show:!0,radar_axis_text_position:{},radar_level_depth:3,radar_level_show:!0,radar_level_text_format:t=>t%1===0?t:t.toFixed(2),radar_level_text_show:!0,radar_size_ratio:.87,radar_direction_clockwise:!1};let Hp=()=>(Si([op.eventrect,tl,qI],[ka,tR,{axis_x_categories:lp.optAxis.axis_x_categories}]),(Hp=()=>qt.RADAR)());var eR={scatter_zerobased:!1};let Yp=()=>(Ts([Ti,tl],[ka,eR]),(Yp=()=>qt.SCATTER)());function nR(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 ll(t,e,n,r,i){for(var s=t.children,o,l=-1,c=s.length,u=t.value&&(r-e)/t.value;++l<c;)o=s[l],o.y0=n,o.y1=i,o.x0=e,o.x1=e+=o.value*u}function cl(t,e,n,r,i){for(var s=t.children,o,l=-1,c=s.length,u=t.value&&(i-n)/t.value;++l<c;)o=s[l],o.x0=e,o.x1=r,o.y0=n,o.y1=n+=o.value*u}var Kp=(1+Math.sqrt(5))/2;function Zp(t,e,n,r,i,s){for(var o=[],l=e.children,c,u,f=0,d=0,h=l.length,m,S,E=e.value,C,w,$,z,B,W,H;f<h;){m=i-n,S=s-r;do C=l[d++].value;while(!C&&d<h);for(w=$=C,W=Math.max(S/m,m/S)/(E*t),H=C*C*W,B=Math.max($/H,H/w);d<h;++d){if(C+=u=l[d].value,u<w&&(w=u),u>$&&($=u),H=C*C*W,z=Math.max($/H,H/w),z>B){C-=u;break}B=z}o.push(c={value:C,dice:m<S,children:l.slice(f,d)}),c.dice?ll(c,n,r,i,E?r+=S*C/E:s):cl(c,n,r,E?n+=m*C/E:i,s),E-=C,f=d}return o}var Jp=(function t(e){function n(r,i,s,o,l){Zp(e,r,i,s,o,l)}return n.ratio=function(r){return t((r=+r)>1?r:1)},n})(Kp);function Dw(t){return t==null?null:Qp(t)}function Qp(t){if(typeof t!="function")throw new Error;return t}function bs(){return 0}function Ss(t){return function(){return t}}function rR(){var t=Jp,e=!1,n=1,r=1,i=[0],s=bs,o=bs,l=bs,c=bs,u=bs;function f(h){return h.x0=h.y0=0,h.x1=n,h.y1=r,h.eachBefore(d),i=[0],e&&h.eachBefore(nR),h}function d(h){var m=i[h.depth],S=h.x0+m,E=h.y0+m,C=h.x1-m,w=h.y1-m;C<S&&(S=C=(S+C)/2),w<E&&(E=w=(E+w)/2),h.x0=S,h.y0=E,h.x1=C,h.y1=w,h.children&&(m=i[h.depth+1]=s(h)/2,S+=u(h)-m,E+=o(h)-m,C-=l(h)-m,w-=c(h)-m,C<S&&(S=C=(S+C)/2),w<E&&(E=w=(E+w)/2),t(h,S,E,C,w))}return f.round=function(h){return arguments.length?(e=!!h,f):e},f.size=function(h){return arguments.length?(n=+h[0],r=+h[1],f):[n,r]},f.tile=function(h){return arguments.length?(t=Qp(h),f):t},f.padding=function(h){return arguments.length?f.paddingInner(h).paddingOuter(h):f.paddingInner()},f.paddingInner=function(h){return arguments.length?(s=typeof h=="function"?h:Ss(+h),f):s},f.paddingOuter=function(h){return arguments.length?f.paddingTop(h).paddingRight(h).paddingBottom(h).paddingLeft(h):f.paddingTop()},f.paddingTop=function(h){return arguments.length?(o=typeof h=="function"?h:Ss(+h),f):o},f.paddingRight=function(h){return arguments.length?(l=typeof h=="function"?h:Ss(+h),f):l},f.paddingBottom=function(h){return arguments.length?(c=typeof h=="function"?h:Ss(+h),f):c},f.paddingLeft=function(h){return arguments.length?(u=typeof h=="function"?h:Ss(+h),f):u},f}function _p(t,e,n,r,i){var s=t.children,o,l=s.length,c,u=new Array(l+1);for(u[0]=c=o=0;o<l;++o)u[o+1]=c+=s[o].value;f(0,l,t.value,e,n,r,i);function f(d,h,m,S,E,C,w){if(d>=h-1){var $=s[d];$.x0=S,$.y0=E,$.x1=C,$.y1=w;return}for(var z=u[d],B=m/2+z,W=d+1,H=h-1;W<H;){var _=W+H>>>1;u[_]<B?W=_+1:H=_}B-u[W-1]<u[W]-B&&d+1<W&&--W;var q=u[W]-z,st=m-q;if(C-S>w-E){var it=m?(S*st+C*q)/m:C;f(d,W,q,S,E,it,w),f(W,h,st,it,E,C,w)}else{var ot=m?(E*st+w*q)/m:w;f(d,W,q,S,E,C,ot),f(W,h,st,S,ot,C,w)}}}function aR(t,e,n,r,i){(t.depth&1?cl:ll)(t,e,n,r,i)}var iR=(function t(e){function n(r,i,s,o,l){if((c=r._squarify)&&c.ratio===e)for(var c,u,f,d,h=-1,m,S=c.length,E=r.value;++h<S;){for(u=c[h],f=u.children,d=u.value=0,m=f.length;d<m;++d)u.value+=f[d].value;u.dice?ll(u,i,s,o,E?s+=(l-s)*u.value/E:l):cl(u,i,s,E?i+=(o-i)*u.value/E:o,l),E-=u.value}else r._squarify=c=Zp(e,r,i,s,o,l),c.ratio=e}return n.ratio=function(r){return t((r=+r)>1?r:1)},n})(Kp);function sR(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 oR(){return this.eachAfter(sR)}function lR(t,e){let n=-1;for(const r of this)t.call(e,r,++n,this);return this}function cR(t,e){for(var n=this,r=[n],i,s,o=-1;n=r.pop();)if(t.call(e,n,++o,this),i=n.children)for(s=i.length-1;s>=0;--s)r.push(i[s]);return this}function uR(t,e){for(var n=this,r=[n],i=[],s,o,l,c=-1;n=r.pop();)if(i.push(n),s=n.children)for(o=0,l=s.length;o<l;++o)r.push(s[o]);for(;n=i.pop();)t.call(e,n,++c,this);return this}function fR(t,e){let n=-1;for(const r of this)if(t.call(e,r,++n,this))return r}function dR(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 hR(t){return this.eachBefore(function(e){e.children&&e.children.sort(t)})}function vR(t){for(var e=this,n=gR(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 gR(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 pR(){for(var t=this,e=[t];t=t.parent;)e.push(t);return e}function mR(){return Array.from(this)}function xR(){var t=[];return this.eachBefore(function(e){e.children||t.push(e)}),t}function yR(){var t=this,e=[];return t.each(function(n){n!==t&&e.push({source:n.parent,target:n})}),e}function*TR(){var t=this,e,n=[t],r,i,s;do for(e=n.reverse(),n=[];t=e.pop();)if(yield t,r=t.children)for(i=0,s=r.length;i<s;++i)n.push(r[i]);while(n.length)}function Mu(t,e){t instanceof Map?(t=[void 0,t],e===void 0&&(e=AR)):e===void 0&&(e=SR);for(var n=new ul(t),r,i=[n],s,o,l,c;r=i.pop();)if((o=e(r.data))&&(c=(o=Array.from(o)).length))for(r.children=o,l=c-1;l>=0;--l)i.push(s=o[l]=new ul(o[l])),s.parent=r,s.depth=r.depth+1;return n.eachBefore(CR)}function bR(){return Mu(this).eachBefore(ER)}function SR(t){return t.children}function AR(t){return Array.isArray(t)?t[1]:null}function ER(t){t.data.value!==void 0&&(t.value=t.data.value),t.data=t.data.data}function CR(t){var e=0;do t.height=e;while((t=t.parent)&&t.height<++e)}function ul(t){this.data=t,this.depth=this.height=0,this.parent=null}ul.prototype=Mu.prototype={constructor:ul,count:oR,each:lR,eachAfter:uR,eachBefore:cR,find:fR,sum:dR,sort:hR,path:vR,ancestors:pR,descendants:mR,leaves:xR,links:yR,copy:bR,[Symbol.iterator]:TR};function IR(t){const e=this;return t.map(n=>{const{id:r,values:i}=n,{value:s}=i[0];return{name:r,id:r,value:s,ratio:e.getRatio("treemap",i[0])}})}var RR={initTreemapLayout(){this.treemap=rR().tile(this.getTreemapTile())},getTreemapTile(){var t,e;const n=this,{config:r,state:{current:{width:i,height:s}}}=n,o=(e={binary:_p,dice:ll,slice:cl,sliceDice:aR,squarify:Jp,resquarify:iR}[(t=r.treemap_tile)!=null?t:"binary"])!=null?e:_p;return(l,c,u,f,d)=>{o(l,0,0,i,s);for(const h of l.children)h.x0=c+h.x0/i*(f-c),h.x1=c+h.x1/i*(f-c),h.y0=u+h.y0/s*(d-u),h.y1=u+h.y1/s*(d-u)}},getTreemapData(t){const e=this;return{name:"root",children:IR.bind(e)(e.filterTargetsToShow(t.filter(e.isTreemapType,e)))}},getTreemapRoot(t){const e=this,n=e.getTreemapData(t!=null?t:e.data.targets),r=Mu(n).sum(s=>s.value),i=e.getSortCompareFn(!0);return e.treemap||e.initTreemapLayout(),e.treemap(i?r.sort(i):r)}},wR=Object.defineProperty,OR=Object.defineProperties,PR=Object.getOwnPropertyDescriptors,qp=Object.getOwnPropertySymbols,MR=Object.prototype.hasOwnProperty,LR=Object.prototype.propertyIsEnumerable,tm=(t,e,n)=>e in t?wR(t,e,{enumerable:!0,configurable:!0,writable:!0,value:n}):t[e]=n,DR=(t,e)=>{for(var n in e||(e={}))MR.call(e,n)&&tm(t,n,e[n]);if(qp)for(var n of qp(e))LR.call(e,n)&&tm(t,n,e[n]);return t},FR=(t,e)=>OR(t,PR(e));function NR(t,e){const n=this;t.selectAll("g").attr("transform",r=>{const i=ai(n,r,e);return`translate(${i.x},${i.y})`}).select("rect").attr("width",r=>ai(n,r,e).w).attr("height",r=>ai(n,r,e).h)}var $R=FR(DR({},RR),{initTreemap(){const t=this,{$el:e,state:{current:{width:n,height:r},clip:i,datetimeId:s}}=t;i.id=`${s}-clip`,t.initTreemapLayout(),e.defs.append("clipPath").attr("id",i.id).append("rect").attr("width",n).attr("height",r),e.treemap=e.main.select(`.${ze.chart}`).attr("clip-path",`url(#${i.id})`).append("g").classed(bh.chartTreemaps,!0),t.bindTreemapEvent()},bindTreemapEvent(){const t=this,{$el:e,config:n,state:r}=t,i=s=>{var o;const l=s.isTrusted?s.target:(o=r.eventReceiver.rect)==null?void 0:o.node();let c;return l&&/^rect$/i.test(l.tagName)&&(r.event=s,c=Yt(l).datum()),c==null?void 0:c.data};if(n.interaction_enabled){const s=r.inputType==="touch";e.treemap.on(s?"touchstart":"mouseover mousemove",o=>{const l=i(o);l&&(t.showTooltip([l],o.currentTarget),/^(touchstart|mouseover)$/.test(o.type)&&t.setOverOut(!0,l))},s?{passive:!0}:void 0).on(s?"touchend":"mouseout",o=>{const l=i(o);n.interaction_onout&&(t.hideTooltip(),t.setOverOut(!1,l))})}},updateTargetsForTreemap(t){const e=this,{$el:{treemap:n}}=e,r=[e.getTreemapRoot(t!=null?t:e.data.targets)];n.data(e.filterNullish(r))},updateTreemap(t){const e=this,{$el:n,$T:r}=e,i=n.treemap.datum(),s=e.getChartClass("Treemap"),o=e.getClass("treemap",!0),l=n.treemap.selectAll("g").data(i.children);r(l.exit(),t).style("opacity","0").remove(),l.enter().append("g").append("rect"),n.treemap.selectAll("g").attr("class",s).select("rect").attr("class",o).attr("fill",c=>e.color(c.data.name))},generateGetTreemapPoints(){const t=this,{$el:e}=t,n={};return e.treemap.selectAll("g").each(r=>{const i=ai(t,r);n[r.data.name]=[[i.x,i.y],[i.x+i.w,i.y+i.h]]}),r=>n[r.id]},redrawTreemap(t){const e=this,{$el:n,state:{current:{width:r,height:i}}}=e;return n.defs.select("rect").attr("width",r).attr("height",i),[e.$T(n.treemap,t,Cr()).call(NR.bind(e),n.treemap.datum())]},treemapDataLabelFormat(t){const e=this,{$el:{treemap:n},config:r,scale:{x:i,y:s}}=e,{id:o,value:l}=t,c=r.treemap_label_format,u=e.getRatio("treemap",t),f=(u*100).toFixed(2),d=r.treemap_label_show&&Qc.call(e,u,"treemap")?null:"0",h=n.selectAll("g").filter(E=>E.data.id===o).datum();let m=0,S=0;if(h){const{x0:E,x1:C,y0:w,y1:$}=h;m=i(C)-i(E),S=s($)-s(w)}return function(E){return E.style("opacity",d),ie(c)?c.bind(e.api)(l,u,o,{width:m,height:S}):`${o}
${f}%`}}}),BR={treemap_tile:"binary",treemap_label_format:void 0,treemap_label_threshold:.05,treemap_label_show:!0};let em=()=>(Ts([$R],[BR]),(em=()=>qt.TREEMAP)()),Lu=Object.create(null);const nm={version:"4.1.1",generate(t){const e=Xr(Object.create(null),Lu,t),n=new jn(e);return n.internal.charts=this.instance,this.instance.push(n),n},defaults(t){return He(t)&&(Lu=t),Lu},instance:[],plugin:{}};Object.keys(g).forEach(t=>g[t]()),Object.keys(v).forEach(t=>v[t]()),mg(),xg(),Pg(),Zg(),pg(),dg()})],Es={};function ir(T){var P=Es[T];if(P!==void 0)return P.exports;var a=Es[T]={exports:{}};return Du[T].call(a.exports,a,a.exports,ir),a.exports}ir.d=function(T,P){for(var a in P)ir.o(P,a)&&!ir.o(T,a)&&Object.defineProperty(T,a,{enumerable:!0,get:P[a]})},ir.o=function(T,P){return Object.prototype.hasOwnProperty.call(T,P)},ir.r=function(T){typeof Symbol!="undefined"&&Symbol.toStringTag&&Object.defineProperty(T,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(T,"__esModule",{value:!0})},ir(0);var Cs=ir(634);return Cs})()});