text: /*!
   * 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 3.1.5
   *
   * All-in-one packaged file for ease use of 'billboard.js' with dependant d3.js modules & polyfills.
   * - d3-axis ^2.1.0
   * - d3-brush ^2.1.0
   * - d3-color ^2.0.0
   * - d3-drag ^2.0.0
   * - d3-dsv ^2.0.0
   * - d3-ease ^2.0.0
   * - d3-interpolate ^2.0.1
   * - d3-scale ^3.3.0
   * - d3-selection ^2.0.0
   * - d3-shape ^2.1.0
   * - d3-time-format ^3.0.0
   * - d3-transition ^2.0.0
   * - d3-zoom ^2.0.0
   */
  !function(t,e){if("object"==typeof exports&&"object"==typeof module)module.exports=e();else if("function"==typeof define&&define.amd)define([],e);else{var n=e();for(var r in n)("object"==typeof exports?exports:t)[r]=n[r]}}(this,(function(){return function(){var t=[function(t,e,n){n(1),n(69),n(70),n(71),n(72),n(73),n(74),n(75),n(76),n(77),n(78),n(79),n(80),n(81),n(82),n(83),n(95),n(98),n(101),n(103),n(105),n(106),n(107),n(108),n(110),n(111),n(113),n(117),n(118),n(119),n(120),n(124),n(125),n(127),n(128),n(129),n(132),n(133),n(134),n(135),n(136),n(141),n(143),n(144),n(145),n(146),n(153),n(155),n(157),n(158),n(159),n(160),n(161),n(162),n(166),n(167),n(169),n(170),n(171),n(173),n(174),n(175),n(176),n(177),n(178),n(184),n(186),n(187),n(188),n(190),n(191),n(193),n(194),n(196),n(197),n(198),n(199),n(200),n(201),n(202),n(203),n(204),n(205),n(206),n(209),n(210),n(212),n(214),n(215),n(216),n(217),n(218),n(220),n(222),n(224),n(225),n(227),n(228),n(230),n(231),n(232),n(233),n(235),n(236),n(237),n(238),n(239),n(240),n(241),n(243),n(244),n(245),n(246),n(247),n(248),n(249),n(250),n(251),n(252),n(254),n(255),n(256),n(257),n(269),n(270),n(271),n(272),n(273),n(274),n(275),n(276),n(277),n(278),n(279),n(280),n(281),n(282),n(283),n(284),n(285),n(286),n(292),n(293),n(295),n(296),n(297),n(298),n(299),n(300),n(302),n(305),n(306),n(307),n(308),n(312),n(313),n(315),n(316),n(317),n(318),n(320),n(321),n(322),n(323),n(324),n(325),n(327),n(328),n(329),n(332),n(333),n(334),n(335),n(336),n(337),n(338),n(339),n(340),n(341),n(342),n(343),n(344),n(350),n(351),n(352),n(353),n(354),n(355),n(356),n(357),n(358),n(359),n(360),n(361),n(365),n(366),n(367),n(368),n(369),n(370),n(371),n(372),n(373),n(374),n(375),n(376),n(377),n(378),n(379),n(380),n(381),n(382),n(383),n(384),n(385),n(386),n(387),n(389),n(390),n(392),n(393),n(394),n(395),n(396),n(401),n(399),n(62)},function(t,e,n){"use strict";var r=n(2),i=n(3),a=n(17),o=n(25),s=n(5),u=n(19),c=n(6),l=n(28),f=n(53),h=n(15),d=n(16),g=n(35),p=n(29),v=n(9),y=n(13),x=n(54),_=n(8),m=n(55),b=n(57),w=n(44),T=n(59),A=n(51),S=n(4),k=n(34),E=n(7),M=n(33),C=n(36),O=n(24),R=n(40),L=n(41),I=n(30),D=n(23),P=n(60),z=n(61),F=n(63),N=n(38),j=n(64).forEach,X=R("hidden"),B="Symbol",$=D("toPrimitive"),U=N.set,Y=N.getterFor(B),V=Object.prototype,G=i.Symbol,H=a("JSON","stringify"),W=S.f,q=k.f,Z=T.f,K=E.f,J=O("symbols"),Q=O("op-symbols"),tt=O("string-to-symbol-registry"),et=O("symbol-to-string-registry"),nt=O("wks"),rt=i.QObject,it=!rt||!rt.prototype||!rt.prototype.findChild,at=s&&c((function(){return 7!=m(q({},"a",{get:function(){return q(this,"a",{value:7}).a}})).a}))?function(t,e,n){var r=W(V,e);r&&delete V[e],q(t,e,n),r&&t!==V&&q(V,e,r)}:q,ot=function(t,e){var n=J[t]=m(G.prototype);return U(n,{type:B,tag:t,description:e}),s||(n.description=e),n},st=function(t,e,n){t===V&&st(Q,e,n),g(t);var r=y(e);return g(n),l(J,r)?(n.enumerable?(l(t,X)&&t[X][r]&&(t[X][r]=!1),n=m(n,{enumerable:_(0,!1)})):(l(t,X)||q(t,X,_(1,{})),t[X][r]=!0),at(t,r,n)):q(t,r,n)},ut=function(t,e){g(t);var n=v(e),r=b(n).concat(ht(n));return j(r,(function(e){s&&!ct.call(n,e)||st(t,e,n[e])})),t},ct=function(t){var e=y(t),n=K.call(this,e);return!(this===V&&l(J,e)&&!l(Q,e))&&(!(n||!l(this,e)||!l(J,e)||l(this,X)&&this[X][e])||n)},lt=function(t,e){var n=v(t),r=y(e);if(n!==V||!l(J,r)||l(Q,r)){var i=W(n,r);return!i||!l(J,r)||l(n,X)&&n[X][r]||(i.enumerable=!0),i}},ft=function(t){var e=Z(v(t)),n=[];return j(e,(function(t){l(J,t)||l(L,t)||n.push(t)})),n},ht=function(t){var e=t===V,n=Z(e?Q:v(t)),r=[];return j(n,(function(t){!l(J,t)||e&&!l(V,t)||r.push(J[t])})),r};(u||(C((G=function(){if(this instanceof G)throw TypeError("Symbol is not a constructor");var t=arguments.length&&void 0!==arguments[0]?x(arguments[0]):void 0,e=I(t),n=function(t){this===V&&n.call(Q,t),l(this,X)&&l(this[X],e)&&(this[X][e]=!1),at(this,e,_(1,t))};return s&&it&&at(V,e,{configurable:!0,set:n}),ot(e,t)}).prototype,"toString",(function(){return Y(this).tag})),C(G,"withoutSetter",(function(t){return ot(I(t),t)})),E.f=ct,k.f=st,S.f=lt,w.f=T.f=ft,A.f=ht,P.f=function(t){return ot(D(t),t)},s&&(q(G.prototype,"description",{configurable:!0,get:function(){return Y(this).description}}),o||C(V,"propertyIsEnumerable",ct,{unsafe:!0}))),r({global:!0,wrap:!0,forced:!u,sham:!u},{Symbol:G}),j(b(nt),(function(t){z(t)})),r({target:B,stat:!0,forced:!u},{for:function(t){var e=x(t);if(l(tt,e))return tt[e];var n=G(e);return tt[e]=n,et[n]=e,n},keyFor:function(t){if(!d(t))throw TypeError(t+" is not a symbol");if(l(et,t))return et[t]},useSetter:function(){it=!0},useSimple:function(){it=!1}}),r({target:"Object",stat:!0,forced:!u,sham:!s},{create:function(t,e){return void 0===e?m(t):ut(m(t),e)},defineProperty:st,defineProperties:ut,getOwnPropertyDescriptor:lt}),r({target:"Object",stat:!0,forced:!u},{getOwnPropertyNames:ft,getOwnPropertySymbols:ht}),r({target:"Object",stat:!0,forced:c((function(){A.f(1)}))},{getOwnPropertySymbols:function(t){return A.f(p(t))}}),H)&&r({target:"JSON",stat:!0,forced:!u||c((function(){var t=G();return"[null]"!=H([t])||"{}"!=H({a:t})||"{}"!=H(Object(t))}))},{stringify:function(t,e,n){for(var r,i=[t],a=1;arguments.length>a;)i.push(arguments[a++]);if(r=e,(h(e)||void 0!==t)&&!d(t))return f(e)||(e=function(t,e){if("function"==typeof r&&(e=r.call(this,t,e)),!d(e))return e}),i[1]=e,H.apply(null,i)}});G.prototype[$]||M(G.prototype,$,G.prototype.valueOf),F(G,B),L[X]=!0},function(t,e,n){var r=n(3),i=n(4).f,a=n(33),o=n(36),s=n(27),u=n(42),c=n(52);t.exports=function(t,e){var n,l,f,h,d,g=t.target,p=t.global,v=t.stat;if(n=p?r:v?r[g]||s(g,{}):(r[g]||{}).prototype)for(l in e){if(h=e[l],f=t.noTargetGet?(d=i(n,l))&&d.value:n[l],!c(p?l:g+(v?".":"#")+l,t.forced)&&void 0!==f){if(typeof h==typeof f)continue;u(h,f)}(t.sham||f&&f.sham)&&a(h,"sham",!0),o(n,l,h,t)}}},function(t){var e=function(t){return t&&t.Math==Math&&t};t.exports=e("object"==typeof globalThis&&globalThis)||e("object"==typeof window&&window)||e("object"==typeof self&&self)||e("object"==typeof global&&global)||function(){return this}()||Function("return this")()},function(t,e,n){var r=n(5),i=n(7),a=n(8),o=n(9),s=n(13),u=n(28),c=n(31),l=Object.getOwnPropertyDescriptor;e.f=r?l:function(t,e){if(t=o(t),e=s(e),c)try{return l(t,e)}catch(t){}if(u(t,e))return a(!i.f.call(t,e),t[e])}},function(t,e,n){var r=n(6);t.exports=!r((function(){return 7!=Object.defineProperty({},1,{get:function(){return 7}})[1]}))},function(t){t.exports=function(t){try{return!!t()}catch(t){return!0}}},function(t,e){"use strict";var n={}.propertyIsEnumerable,r=Object.getOwnPropertyDescriptor,i=r&&!n.call({1:2},1);e.f=i?function(t){var e=r(this,t);return!!e&&e.enumerable}:n},function(t){t.exports=function(t,e){return{enumerable:!(1&t),configurable:!(2&t),writable:!(4&t),value:e}}},function(t,e,n){var r=n(10),i=n(12);t.exports=function(t){return r(i(t))}},function(t,e,n){var r=n(6),i=n(11),a="".split;t.exports=r((function(){return!Object("z").propertyIsEnumerable(0)}))?function(t){return"String"==i(t)?a.call(t,""):Object(t)}:Object},function(t){var e={}.toString;t.exports=function(t){return e.call(t).slice(8,-1)}},function(t){t.exports=function(t){if(null==t)throw TypeError("Can't call method on "+t);return t}},function(t,e,n){var r=n(14),i=n(16);t.exports=function(t){var e=r(t,"string");return i(e)?e:String(e)}},function(t,e,n){var r=n(15),i=n(16),a=n(22),o=n(23)("toPrimitive");t.exports=function(t,e){if(!r(t)||i(t))return t;var n,s=t[o];if(void 0!==s){if(void 0===e&&(e="default"),n=s.call(t,e),!r(n)||i(n))return n;throw TypeError("Can't convert object to primitive value")}return void 0===e&&(e="number"),a(t,e)}},function(t){t.exports=function(t){return"object"==typeof t?null!==t:"function"==typeof t}},function(t,e,n){var r=n(17),i=n(18);t.exports=i?function(t){return"symbol"==typeof t}:function(t){var e=r("Symbol");return"function"==typeof e&&Object(t)instanceof e}},function(t,e,n){var r=n(3),i=function(t){return"function"==typeof t?t:void 0};t.exports=function(t,e){return arguments.length<2?i(r[t]):r[t]&&r[t][e]}},function(t,e,n){var r=n(19);t.exports=r&&!Symbol.sham&&"symbol"==typeof Symbol.iterator},function(t,e,n){var r=n(20),i=n(6);t.exports=!!Object.getOwnPropertySymbols&&!i((function(){var t=Symbol();return!String(t)||!(Object(t)instanceof Symbol)||!Symbol.sham&&r&&r<41}))},function(t,e,n){var r,i,a=n(3),o=n(21),s=a.process,u=a.Deno,c=s&&s.versions||u&&u.version,l=c&&c.v8;l?i=(r=l.split("."))[0]<4?1:r[0]+r[1]:o&&(!(r=o.match(/Edge\/(\d+)/))||r[1]>=74)&&(r=o.match(/Chrome\/(\d+)/))&&(i=r[1]),t.exports=i&&+i},function(t,e,n){var r=n(17);t.exports=r("navigator","userAgent")||""},function(t,e,n){var r=n(15);t.exports=function(t,e){var n,i;if("string"===e&&"function"==typeof(n=t.toString)&&!r(i=n.call(t)))return i;if("function"==typeof(n=t.valueOf)&&!r(i=n.call(t)))return i;if("string"!==e&&"function"==typeof(n=t.toString)&&!r(i=n.call(t)))return i;throw TypeError("Can't convert object to primitive value")}},function(t,e,n){var r=n(3),i=n(24),a=n(28),o=n(30),s=n(19),u=n(18),c=i("wks"),l=r.Symbol,f=u?l:l&&l.withoutSetter||o;t.exports=function(t){return a(c,t)&&(s||"string"==typeof c[t])||(s&&a(l,t)?c[t]=l[t]:c[t]=f("Symbol."+t)),c[t]}},function(t,e,n){var r=n(25),i=n(26);(t.exports=function(t,e){return i[t]||(i[t]=void 0!==e?e:{})})("versions",[]).push({version:"3.16.1",mode:r?"pure":"global",copyright:"© 2021 Denis Pushkarev (zloirock.ru)"})},function(t){t.exports=!1},function(t,e,n){var r=n(3),i=n(27),a="__core-js_shared__",o=r[a]||i(a,{});t.exports=o},function(t,e,n){var r=n(3);t.exports=function(t,e){try{Object.defineProperty(r,t,{value:e,configurable:!0,writable:!0})}catch(n){r[t]=e}return e}},function(t,e,n){var r=n(29),i={}.hasOwnProperty;t.exports=Object.hasOwn||function(t,e){return i.call(r(t),e)}},function(t,e,n){var r=n(12);t.exports=function(t){return Object(r(t))}},function(t){var e=0,n=Math.random();t.exports=function(t){return"Symbol("+String(void 0===t?"":t)+")_"+(++e+n).toString(36)}},function(t,e,n){var r=n(5),i=n(6),a=n(32);t.exports=!r&&!i((function(){return 7!=Object.defineProperty(a("div"),"a",{get:function(){return 7}}).a}))},function(t,e,n){var r=n(3),i=n(15),a=r.document,o=i(a)&&i(a.createElement);t.exports=function(t){return o?a.createElement(t):{}}},function(t,e,n){var r=n(5),i=n(34),a=n(8);t.exports=r?function(t,e,n){return i.f(t,e,a(1,n))}:function(t,e,n){return t[e]=n,t}},function(t,e,n){var r=n(5),i=n(31),a=n(35),o=n(13),s=Object.defineProperty;e.f=r?s:function(t,e,n){if(a(t),e=o(e),a(n),i)try{return s(t,e,n)}catch(t){}if("get"in n||"set"in n)throw TypeError("Accessors not supported");return"value"in n&&(t[e]=n.value),t}},function(t,e,n){var r=n(15);t.exports=function(t){if(!r(t))throw TypeError(String(t)+" is not an object");return t}},function(t,e,n){var r=n(3),i=n(33),a=n(28),o=n(27),s=n(37),u=n(38),c=u.get,l=u.enforce,f=String(String).split("String");(t.exports=function(t,e,n,s){var u,c=!!s&&!!s.unsafe,h=!!s&&!!s.enumerable,d=!!s&&!!s.noTargetGet;"function"==typeof n&&("string"!=typeof e||a(n,"name")||i(n,"name",e),(u=l(n)).source||(u.source=f.join("string"==typeof e?e:""))),t!==r?(c?!d&&t[e]&&(h=!0):delete t[e],h?t[e]=n:i(t,e,n)):h?t[e]=n:o(e,n)})(Function.prototype,"toString",(function(){return"function"==typeof this&&c(this).source||s(this)}))},function(t,e,n){var r=n(26),i=Function.toString;"function"!=typeof r.inspectSource&&(r.inspectSource=function(t){return i.call(t)}),t.exports=r.inspectSource},function(t,e,n){var r,i,a,o=n(39),s=n(3),u=n(15),c=n(33),l=n(28),f=n(26),h=n(40),d=n(41),g="Object already initialized",p=s.WeakMap;if(o||f.state){var v=f.state||(f.state=new p),y=v.get,x=v.has,_=v.set;r=function(t,e){if(x.call(v,t))throw new TypeError(g);return e.facade=t,_.call(v,t,e),e},i=function(t){return y.call(v,t)||{}},a=function(t){return x.call(v,t)}}else{var m=h("state");d[m]=!0,r=function(t,e){if(l(t,m))throw new TypeError(g);return e.facade=t,c(t,m,e),e},i=function(t){return l(t,m)?t[m]:{}},a=function(t){return l(t,m)}}t.exports={set:r,get:i,has:a,enforce:function(t){return a(t)?i(t):r(t,{})},getterFor:function(t){return function(e){var n;if(!u(e)||(n=i(e)).type!==t)throw TypeError("Incompatible receiver, "+t+" required");return n}}}},function(t,e,n){var r=n(3),i=n(37),a=r.WeakMap;t.exports="function"==typeof a&&/native code/.test(i(a))},function(t,e,n){var r=n(24),i=n(30),a=r("keys");t.exports=function(t){return a[t]||(a[t]=i(t))}},function(t){t.exports={}},function(t,e,n){var r=n(28),i=n(43),a=n(4),o=n(34);t.exports=function(t,e){for(var n=i(e),s=o.f,u=a.f,c=0;c<n.length;c++){var l=n[c];r(t,l)||s(t,l,u(e,l))}}},function(t,e,n){var r=n(17),i=n(44),a=n(51),o=n(35);t.exports=r("Reflect","ownKeys")||function(t){var e=i.f(o(t)),n=a.f;return n?e.concat(n(t)):e}},function(t,e,n){var r=n(45),i=n(50).concat("length","prototype");e.f=Object.getOwnPropertyNames||function(t){return r(t,i)}},function(t,e,n){var r=n(28),i=n(9),a=n(46).indexOf,o=n(41);t.exports=function(t,e){var n,s=i(t),u=0,c=[];for(n in s)!r(o,n)&&r(s,n)&&c.push(n);for(;e.length>u;)r(s,n=e[u++])&&(~a(c,n)||c.push(n));return c}},function(t,e,n){var r=n(9),i=n(47),a=n(49),o=function(t){return function(e,n,o){var s,u=r(e),c=i(u.length),l=a(o,c);if(t&&n!=n){for(;c>l;)if((s=u[l++])!=s)return!0}else for(;c>l;l++)if((t||l in u)&&u[l]===n)return t||l||0;return!t&&-1}};t.exports={includes:o(!0),indexOf:o(!1)}},function(t,e,n){var r=n(48),i=Math.min;t.exports=function(t){return t>0?i(r(t),9007199254740991):0}},function(t){var e=Math.ceil,n=Math.floor;t.exports=function(t){return isNaN(t=+t)?0:(t>0?n:e)(t)}},function(t,e,n){var r=n(48),i=Math.max,a=Math.min;t.exports=function(t,e){var n=r(t);return n<0?i(n+e,0):a(n,e)}},function(t){t.exports=["constructor","hasOwnProperty","isPrototypeOf","propertyIsEnumerable","toLocaleString","toString","valueOf"]},function(t,e){e.f=Object.getOwnPropertySymbols},function(t,e,n){var r=n(6),i=/#|\.prototype\./,a=function(t,e){var n=s[o(t)];return n==c||n!=u&&("function"==typeof e?r(e):!!e)},o=a.normalize=function(t){return String(t).replace(i,".").toLowerCase()},s=a.data={},u=a.NATIVE="N",c=a.POLYFILL="P";t.exports=a},function(t,e,n){var r=n(11);t.exports=Array.isArray||function(t){return"Array"==r(t)}},function(t,e,n){var r=n(16);t.exports=function(t){if(r(t))throw TypeError("Cannot convert a Symbol value to a string");return String(t)}},function(t,e,n){var r,i=n(35),a=n(56),o=n(50),s=n(41),u=n(58),c=n(32),l=n(40),f=l("IE_PROTO"),h=function(){},d=function(t){return"<script>"+t+"</"+"script>"},g=function(t){t.write(d("")),t.close();var e=t.parentWindow.Object;return t=null,e},p=function(){try{r=new ActiveXObject("htmlfile")}catch(t){}p=document.domain&&r?g(r):function(){var t,e=c("iframe");if(e.style)return e.style.display="none",u.appendChild(e),e.src=String("javascript:"),(t=e.contentWindow.document).open(),t.write(d("document.F=Object")),t.close(),t.F}()||g(r);for(var t=o.length;t--;)delete p.prototype[o[t]];return p()};s[f]=!0,t.exports=Object.create||function(t,e){var n;return null!==t?(h.prototype=i(t),n=new h,h.prototype=null,n[f]=t):n=p(),void 0===e?n:a(n,e)}},function(t,e,n){var r=n(5),i=n(34),a=n(35),o=n(57);t.exports=r?Object.defineProperties:function(t,e){a(t);for(var n,r=o(e),s=r.length,u=0;s>u;)i.f(t,n=r[u++],e[n]);return t}},function(t,e,n){var r=n(45),i=n(50);t.exports=Object.keys||function(t){return r(t,i)}},function(t,e,n){var r=n(17);t.exports=r("document","documentElement")},function(t,e,n){var r=n(9),i=n(44).f,a={}.toString,o="object"==typeof window&&window&&Object.getOwnPropertyNames?Object.getOwnPropertyNames(window):[];t.exports.f=function(t){return o&&"[object Window]"==a.call(t)?function(t){try{return i(t)}catch(t){return o.slice()}}(t):i(r(t))}},function(t,e,n){var r=n(23);e.f=r},function(t,e,n){var r=n(62),i=n(28),a=n(60),o=n(34).f;t.exports=function(t){var e=r.Symbol||(r.Symbol={});i(e,t)||o(e,t,{value:a.f(t)})}},function(t,e,n){var r=n(3);t.exports=r},function(t,e,n){var r=n(34).f,i=n(28),a=n(23)("toStringTag");t.exports=function(t,e,n){t&&!i(t=n?t:t.prototype,a)&&r(t,a,{configurable:!0,value:e})}},function(t,e,n){var r=n(65),i=n(10),a=n(29),o=n(47),s=n(67),u=[].push,c=function(t){var e=1==t,n=2==t,c=3==t,l=4==t,f=6==t,h=7==t,d=5==t||f;return function(g,p,v,y){for(var x,_,m=a(g),b=i(m),w=r(p,v,3),T=o(b.length),A=0,S=y||s,k=e?S(g,T):n||h?S(g,0):void 0;T>A;A++)if((d||A in b)&&(_=w(x=b[A],A,m),t))if(e)k[A]=_;else if(_)switch(t){case 3:return!0;case 5:return x;case 6:return A;case 2:u.call(k,x)}else switch(t){case 4:return!1;case 7:u.call(k,x)}return f?-1:c||l?l:k}};t.exports={forEach:c(0),map:c(1),filter:c(2),some:c(3),every:c(4),find:c(5),findIndex:c(6),filterReject:c(7)}},function(t,e,n){var r=n(66);t.exports=function(t,e,n){if(r(t),void 0===e)return t;switch(n){case 0:return function(){return t.call(e)};case 1:return function(n){return t.call(e,n)};case 2:return function(n,r){return t.call(e,n,r)};case 3:return function(n,r,i){return t.call(e,n,r,i)}}return function(){return t.apply(e,arguments)}}},function(t){t.exports=function(t){if("function"!=typeof t)throw TypeError(String(t)+" is not a function");return t}},function(t,e,n){var r=n(68);t.exports=function(t,e){return new(r(t))(0===e?0:e)}},function(t,e,n){var r=n(15),i=n(53),a=n(23)("species");t.exports=function(t){var e;return i(t)&&("function"!=typeof(e=t.constructor)||e!==Array&&!i(e.prototype)?r(e)&&null===(e=e[a])&&(e=void 0):e=void 0),void 0===e?Array:e}},function(t,e,n){"use strict";var r=n(2),i=n(5),a=n(3),o=n(28),s=n(15),u=n(34).f,c=n(42),l=a.Symbol;if(i&&"function"==typeof l&&(!("description"in l.prototype)||void 0!==l().description)){var f={},h=function(){var t=arguments.length<1||void 0===arguments[0]?void 0:String(arguments[0]),e=this instanceof h?new l(t):void 0===t?l():l(t);return""===t&&(f[e]=!0),e};c(h,l);var d=h.prototype=l.prototype;d.constructor=h;var g=d.toString,p="Symbol(test)"==String(l("test")),v=/^Symbol\((.*)\)[^)]+$/;u(d,"description",{configurable:!0,get:function(){var t=s(this)?this.valueOf():this,e=g.call(t);if(o(f,t))return"";var n=p?e.slice(7,-1):e.replace(v,"$1");return""===n?void 0:n}}),r({global:!0,forced:!0},{Symbol:h})}},function(t,e,n){n(61)("asyncIterator")},function(t,e,n){n(61)("hasInstance")},function(t,e,n){n(61)("isConcatSpreadable")},function(t,e,n){n(61)("iterator")},function(t,e,n){n(61)("match")},function(t,e,n){n(61)("matchAll")},function(t,e,n){n(61)("replace")},function(t,e,n){n(61)("search")},function(t,e,n){n(61)("species")},function(t,e,n){n(61)("split")},function(t,e,n){n(61)("toPrimitive")},function(t,e,n){n(61)("toStringTag")},function(t,e,n){n(61)("unscopables")},function(t,e,n){"use strict";var r=n(2),i=n(84),a=n(86),o=n(55),s=n(33),u=n(8),c=n(88),l=n(54),f=function(t,e){var n=this;if(!(n instanceof f))return new f(t,e);a&&(n=a(new Error(void 0),i(n))),void 0!==e&&s(n,"message",l(e));var r=[];return c(t,r.push,{that:r}),s(n,"errors",r),n};f.prototype=o(Error.prototype,{constructor:u(5,f),message:u(5,""),name:u(5,"AggregateError")}),r({global:!0},{AggregateError:f})},function(t,e,n){var r=n(28),i=n(29),a=n(40),o=n(85),s=a("IE_PROTO"),u=Object.prototype;t.exports=o?Object.getPrototypeOf:function(t){return t=i(t),r(t,s)?t[s]:"function"==typeof t.constructor&&t instanceof t.constructor?t.constructor.prototype:t instanceof Object?u:null}},function(t,e,n){var r=n(6);t.exports=!r((function(){function t(){}return t.prototype.constructor=null,Object.getPrototypeOf(new t)!==t.prototype}))},function(t,e,n){var r=n(35),i=n(87);t.exports=Object.setPrototypeOf||("__proto__"in{}?function(){var t,e=!1,n={};try{(t=Object.getOwnPropertyDescriptor(Object.prototype,"__proto__").set).call(n,[]),e=n instanceof Array}catch(t){}return function(n,a){return r(n),i(a),e?t.call(n,a):n.__proto__=a,n}}():void 0)},function(t,e,n){var r=n(15);t.exports=function(t){if(!r(t)&&null!==t)throw TypeError("Can't set "+String(t)+" as a prototype");return t}},function(t,e,n){var r=n(35),i=n(89),a=n(47),o=n(65),s=n(91),u=n(94),c=function(t,e){this.stopped=t,this.result=e};t.exports=function(t,e,n){var l,f,h,d,g,p,v,y=n&&n.that,x=!(!n||!n.AS_ENTRIES),_=!(!n||!n.IS_ITERATOR),m=!(!n||!n.INTERRUPTED),b=o(e,y,1+x+m),w=function(t){return l&&u(l),new c(!0,t)},T=function(t){return x?(r(t),m?b(t[0],t[1],w):b(t[0],t[1])):m?b(t,w):b(t)};if(_)l=t;else{if("function"!=typeof(f=s(t)))throw TypeError("Target is not iterable");if(i(f)){for(h=0,d=a(t.length);d>h;h++)if((g=T(t[h]))&&g instanceof c)return g;return new c(!1)}l=f.call(t)}for(p=l.next;!(v=p.call(l)).done;){try{g=T(v.value)}catch(t){throw u(l),t}if("object"==typeof g&&g&&g instanceof c)return g}return new c(!1)}},function(t,e,n){var r=n(23),i=n(90),a=r("iterator"),o=Array.prototype;t.exports=function(t){return void 0!==t&&(i.Array===t||o[a]===t)}},function(t){t.exports={}},function(t,e,n){var r=n(92),i=n(90),a=n(23)("iterator");t.exports=function(t){if(null!=t)return t[a]||t["@@iterator"]||i[r(t)]}},function(t,e,n){var r=n(93),i=n(11),a=n(23)("toStringTag"),o="Arguments"==i(function(){return arguments}());t.exports=r?i:function(t){var e,n,r;return void 0===t?"Undefined":null===t?"Null":"string"==typeof(n=function(t,e){try{return t[e]}catch(t){}}(e=Object(t),a))?n:o?i(e):"Object"==(r=i(e))&&"function"==typeof e.callee?"Arguments":r}},function(t,e,n){var r={};r[n(23)("toStringTag")]="z",t.exports="[object z]"===String(r)},function(t,e,n){var r=n(35);t.exports=function(t){var e=t.return;if(void 0!==e)return r(e.call(t)).value}},function(t,e,n){"use strict";var r=n(2),i=n(6),a=n(53),o=n(15),s=n(29),u=n(47),c=n(96),l=n(67),f=n(97),h=n(23),d=n(20),g=h("isConcatSpreadable"),p=9007199254740991,v="Maximum allowed index exceeded",y=d>=51||!i((function(){var t=[];return t[g]=!1,t.concat()[0]!==t})),x=f("concat"),_=function(t){if(!o(t))return!1;var e=t[g];return void 0!==e?!!e:a(t)};r({target:"Array",proto:!0,forced:!y||!x},{concat:function(t){var e,n,r,i,a,o=s(this),f=l(o,0),h=0;for(e=-1,r=arguments.length;e<r;e++)if(_(a=-1===e?o:arguments[e])){if(h+(i=u(a.length))>p)throw TypeError(v);for(n=0;n<i;n++,h++)n in a&&c(f,h,a[n])}else{if(h>=p)throw TypeError(v);c(f,h++,a)}return f.length=h,f}})},function(t,e,n){"use strict";var r=n(13),i=n(34),a=n(8);t.exports=function(t,e,n){var o=r(e);o in t?i.f(t,o,a(0,n)):t[o]=n}},function(t,e,n){var r=n(6),i=n(23),a=n(20),o=i("species");t.exports=function(t){return a>=51||!r((function(){var e=[];return(e.constructor={})[o]=function(){return{foo:1}},1!==e[t](Boolean).foo}))}},function(t,e,n){var r=n(2),i=n(99),a=n(100);r({target:"Array",proto:!0},{copyWithin:i}),a("copyWithin")},function(t,e,n){"use strict";var r=n(29),i=n(49),a=n(47),o=Math.min;t.exports=[].copyWithin||function(t,e){var n=r(this),s=a(n.length),u=i(t,s),c=i(e,s),l=arguments.length>2?arguments[2]:void 0,f=o((void 0===l?s:i(l,s))-c,s-u),h=1;for(c<u&&u<c+f&&(h=-1,c+=f-1,u+=f-1);f-- >0;)c in n?n[u]=n[c]:delete n[u],u+=h,c+=h;return n}},function(t,e,n){var r=n(23),i=n(55),a=n(34),o=r("unscopables"),s=Array.prototype;null==s[o]&&a.f(s,o,{configurable:!0,value:i(null)}),t.exports=function(t){s[o][t]=!0}},function(t,e,n){"use strict";var r=n(2),i=n(64).every;r({target:"Array",proto:!0,forced:!n(102)("every")},{every:function(t){return i(this,t,arguments.length>1?arguments[1]:void 0)}})},function(t,e,n){"use strict";var r=n(6);t.exports=function(t,e){var n=[][t];return!!n&&r((function(){n.call(null,e||function(){throw 1},1)}))}},function(t,e,n){var r=n(2),i=n(104),a=n(100);r({target:"Array",proto:!0},{fill:i}),a("fill")},function(t,e,n){"use strict";var r=n(29),i=n(49),a=n(47);t.exports=function(t){for(var e=r(this),n=a(e.length),o=arguments.length,s=i(o>1?arguments[1]:void 0,n),u=o>2?arguments[2]:void 0,c=void 0===u?n:i(u,n);c>s;)e[s++]=t;return e}},function(t,e,n){"use strict";var r=n(2),i=n(64).filter;r({target:"Array",proto:!0,forced:!n(97)("filter")},{filter:function(t){return i(this,t,arguments.length>1?arguments[1]:void 0)}})},function(t,e,n){"use strict";var r=n(2),i=n(64).find,a=n(100),o="find",s=!0;o in[]&&Array(1).find((function(){s=!1})),r({target:"Array",proto:!0,forced:s},{find:function(t){return i(this,t,arguments.length>1?arguments[1]:void 0)}}),a(o)},function(t,e,n){"use strict";var r=n(2),i=n(64).findIndex,a=n(100),o="findIndex",s=!0;o in[]&&Array(1).findIndex((function(){s=!1})),r({target:"Array",proto:!0,forced:s},{findIndex:function(t){return i(this,t,arguments.length>1?arguments[1]:void 0)}}),a(o)},function(t,e,n){"use strict";var r=n(2),i=n(109),a=n(29),o=n(47),s=n(48),u=n(67);r({target:"Array",proto:!0},{flat:function(){var t=arguments.length?arguments[0]:void 0,e=a(this),n=o(e.length),r=u(e,0);return r.length=i(r,e,e,n,0,void 0===t?1:s(t)),r}})},function(t,e,n){"use strict";var r=n(53),i=n(47),a=n(65),o=function(t,e,n,s,u,c,l,f){for(var h,d=u,g=0,p=!!l&&a(l,f,3);g<s;){if(g in n){if(h=p?p(n[g],g,e):n[g],c>0&&r(h))d=o(t,e,h,i(h.length),d,c-1)-1;else{if(d>=9007199254740991)throw TypeError("Exceed the acceptable array length");t[d]=h}d++}g++}return d};t.exports=o},function(t,e,n){"use strict";var r=n(2),i=n(109),a=n(29),o=n(47),s=n(66),u=n(67);r({target:"Array",proto:!0},{flatMap:function(t){var e,n=a(this),r=o(n.length);return s(t),(e=u(n,0)).length=i(e,n,n,r,0,1,t,arguments.length>1?arguments[1]:void 0),e}})},function(t,e,n){"use strict";var r=n(2),i=n(112);r({target:"Array",proto:!0,forced:[].forEach!=i},{forEach:i})},function(t,e,n){"use strict";var r=n(64).forEach,i=n(102)("forEach");t.exports=i?[].forEach:function(t){return r(this,t,arguments.length>1?arguments[1]:void 0)}},function(t,e,n){var r=n(2),i=n(114);r({target:"Array",stat:!0,forced:!n(116)((function(t){Array.from(t)}))},{from:i})},function(t,e,n){"use strict";var r=n(65),i=n(29),a=n(115),o=n(89),s=n(47),u=n(96),c=n(91);t.exports=function(t){var e,n,l,f,h,d,g=i(t),p="function"==typeof this?this:Array,v=arguments.length,y=v>1?arguments[1]:void 0,x=void 0!==y,_=c(g),m=0;if(x&&(y=r(y,v>2?arguments[2]:void 0,2)),null==_||p==Array&&o(_))for(n=new p(e=s(g.length));e>m;m++)d=x?y(g[m],m):g[m],u(n,m,d);else for(h=(f=_.call(g)).next,n=new p;!(l=h.call(f)).done;m++)d=x?a(f,y,[l.value,m],!0):l.value,u(n,m,d);return n.length=m,n}},function(t,e,n){var r=n(35),i=n(94);t.exports=function(t,e,n,a){try{return a?e(r(n)[0],n[1]):e(n)}catch(e){throw i(t),e}}},function(t,e,n){var r=n(23)("iterator"),i=!1;try{var a=0,o={next:function(){return{done:!!a++}},return:function(){i=!0}};o[r]=function(){return this},Array.from(o,(function(){throw 2}))}catch(t){}t.exports=function(t,e){if(!e&&!i)return!1;var n=!1;try{var a={};a[r]=function(){return{next:function(){return{done:n=!0}}}},t(a)}catch(t){}return n}},function(t,e,n){"use strict";var r=n(2),i=n(46).includes,a=n(100);r({target:"Array",proto:!0},{includes:function(t){return i(this,t,arguments.length>1?arguments[1]:void 0)}}),a("includes")},function(t,e,n){"use strict";var r=n(2),i=n(46).indexOf,a=n(102),o=[].indexOf,s=!!o&&1/[1].indexOf(1,-0)<0,u=a("indexOf");r({target:"Array",proto:!0,forced:s||!u},{indexOf:function(t){return s?o.apply(this,arguments)||0:i(this,t,arguments.length>1?arguments[1]:void 0)}})},function(t,e,n){n(2)({target:"Array",stat:!0},{isArray:n(53)})},function(t,e,n){"use strict";var r=n(9),i=n(100),a=n(90),o=n(38),s=n(121),u="Array Iterator",c=o.set,l=o.getterFor(u);t.exports=s(Array,"Array",(function(t,e){c(this,{type:u,target:r(t),index:0,kind:e})}),(function(){var t=l(this),e=t.target,n=t.kind,r=t.index++;return!e||r>=e.length?(t.target=void 0,{value:void 0,done:!0}):"keys"==n?{value:r,done:!1}:"values"==n?{value:e[r],done:!1}:{value:[r,e[r]],done:!1}}),"values"),a.Arguments=a.Array,i("keys"),i("values"),i("entries")},function(t,e,n){"use strict";var r=n(2),i=n(122),a=n(84),o=n(86),s=n(63),u=n(33),c=n(36),l=n(23),f=n(25),h=n(90),d=n(123),g=d.IteratorPrototype,p=d.BUGGY_SAFARI_ITERATORS,v=l("iterator"),y="keys",x="values",_="entries",m=function(){return this};t.exports=function(t,e,n,l,d,b,w){i(n,e,l);var T,A,S,k=function(t){if(t===d&&R)return R;if(!p&&t in C)return C[t];switch(t){case y:case x:case _:return function(){return new n(this,t)}}return function(){return new n(this)}},E=e+" Iterator",M=!1,C=t.prototype,O=C[v]||C["@@iterator"]||d&&C[d],R=!p&&O||k(d),L="Array"==e&&C.entries||O;if(L&&(T=a(L.call(new t)),g!==Object.prototype&&T.next&&(f||a(T)===g||(o?o(T,g):"function"!=typeof T[v]&&u(T,v,m)),s(T,E,!0,!0),f&&(h[E]=m))),d==x&&O&&O.name!==x&&(M=!0,R=function(){return O.call(this)}),f&&!w||C[v]===R||u(C,v,R),h[e]=R,d)if(A={values:k(x),keys:b?R:k(y),entries:k(_)},w)for(S in A)(p||M||!(S in C))&&c(C,S,A[S]);else r({target:e,proto:!0,forced:p||M},A);return A}},function(t,e,n){"use strict";var r=n(123).IteratorPrototype,i=n(55),a=n(8),o=n(63),s=n(90),u=function(){return this};t.exports=function(t,e,n){var c=e+" Iterator";return t.prototype=i(r,{next:a(1,n)}),o(t,c,!1,!0),s[c]=u,t}},function(t,e,n){"use strict";var r,i,a,o=n(6),s=n(84),u=n(33),c=n(28),l=n(23),f=n(25),h=l("iterator"),d=!1;[].keys&&("next"in(a=[].keys())?(i=s(s(a)))!==Object.prototype&&(r=i):d=!0);var g=null==r||o((function(){var t={};return r[h].call(t)!==t}));g&&(r={}),f&&!g||c(r,h)||u(r,h,(function(){return this})),t.exports={IteratorPrototype:r,BUGGY_SAFARI_ITERATORS:d}},function(t,e,n){"use strict";var r=n(2),i=n(10),a=n(9),o=n(102),s=[].join,u=i!=Object,c=o("join",",");r({target:"Array",proto:!0,forced:u||!c},{join:function(t){return s.call(a(this),void 0===t?",":t)}})},function(t,e,n){var r=n(2),i=n(126);r({target:"Array",proto:!0,forced:i!==[].lastIndexOf},{lastIndexOf:i})},function(t,e,n){"use strict";var r=n(9),i=n(48),a=n(47),o=n(102),s=Math.min,u=[].lastIndexOf,c=!!u&&1/[1].lastIndexOf(1,-0)<0,l=o("lastIndexOf"),f=c||!l;t.exports=f?function(t){if(c)return u.apply(this,arguments)||0;var e=r(this),n=a(e.length),o=n-1;for(arguments.length>1&&(o=s(o,i(arguments[1]))),o<0&&(o=n+o);o>=0;o--)if(o in e&&e[o]===t)return o||0;return-1}:u},function(t,e,n){"use strict";var r=n(2),i=n(64).map;r({target:"Array",proto:!0,forced:!n(97)("map")},{map:function(t){return i(this,t,arguments.length>1?arguments[1]:void 0)}})},function(t,e,n){"use strict";var r=n(2),i=n(6),a=n(96);r({target:"Array",stat:!0,forced:i((function(){function t(){}return!(Array.of.call(t)instanceof t)}))},{of:function(){for(var t=0,e=arguments.length,n=new("function"==typeof this?this:Array)(e);e>t;)a(n,t,arguments[t++]);return n.length=e,n}})},function(t,e,n){"use strict";var r=n(2),i=n(130).left,a=n(102),o=n(20),s=n(131);r({target:"Array",proto:!0,forced:!a("reduce")||!s&&o>79&&o<83},{reduce:function(t){return i(this,t,arguments.length,arguments.length>1?arguments[1]:void 0)}})},function(t,e,n){var r=n(66),i=n(29),a=n(10),o=n(47),s=function(t){return function(e,n,s,u){r(n);var c=i(e),l=a(c),f=o(c.length),h=t?f-1:0,d=t?-1:1;if(s<2)for(;;){if(h in l){u=l[h],h+=d;break}if(h+=d,t?h<0:f<=h)throw TypeError("Reduce of empty array with no initial value")}for(;t?h>=0:f>h;h+=d)h in l&&(u=n(u,l[h],h,c));return u}};t.exports={left:s(!1),right:s(!0)}},function(t,e,n){var r=n(11),i=n(3);t.exports="process"==r(i.process)},function(t,e,n){"use strict";var r=n(2),i=n(130).right,a=n(102),o=n(20),s=n(131);r({target:"Array",proto:!0,forced:!a("reduceRight")||!s&&o>79&&o<83},{reduceRight:function(t){return i(this,t,arguments.length,arguments.length>1?arguments[1]:void 0)}})},function(t,e,n){"use strict";var r=n(2),i=n(53),a=[].reverse,o=[1,2];r({target:"Array",proto:!0,forced:String(o)===String(o.reverse())},{reverse:function(){return i(this)&&(this.length=this.length),a.call(this)}})},function(t,e,n){"use strict";var r=n(2),i=n(15),a=n(53),o=n(49),s=n(47),u=n(9),c=n(96),l=n(23),f=n(97)("slice"),h=l("species"),d=[].slice,g=Math.max;r({target:"Array",proto:!0,forced:!f},{slice:function(t,e){var n,r,l,f=u(this),p=s(f.length),v=o(t,p),y=o(void 0===e?p:e,p);if(a(f)&&("function"!=typeof(n=f.constructor)||n!==Array&&!a(n.prototype)?i(n)&&null===(n=n[h])&&(n=void 0):n=void 0,n===Array||void 0===n))return d.call(f,v,y);for(r=new(void 0===n?Array:n)(g(y-v,0)),l=0;v<y;v++,l++)v in f&&c(r,l,f[v]);return r.length=l,r}})},function(t,e,n){"use strict";var r=n(2),i=n(64).some;r({target:"Array",proto:!0,forced:!n(102)("some")},{some:function(t){return i(this,t,arguments.length>1?arguments[1]:void 0)}})},function(t,e,n){"use strict";var r=n(2),i=n(66),a=n(29),o=n(47),s=n(54),u=n(6),c=n(137),l=n(102),f=n(138),h=n(139),d=n(20),g=n(140),p=[],v=p.sort,y=u((function(){p.sort(void 0)})),x=u((function(){p.sort(null)})),_=l("sort"),m=!u((function(){if(d)return d<70;if(!(f&&f>3)){if(h)return!0;if(g)return g<603;var t,e,n,r,i="";for(t=65;t<76;t++){switch(e=String.fromCharCode(t),t){case 66:case 69:case 70:case 72:n=3;break;case 68:case 71:n=4;break;default:n=2}for(r=0;r<47;r++)p.push({k:e+r,v:n})}for(p.sort((function(t,e){return e.v-t.v})),r=0;r<p.length;r++)e=p[r].k.charAt(0),i.charAt(i.length-1)!==e&&(i+=e);return"DGBEFHACIJK"!==i}}));r({target:"Array",proto:!0,forced:y||!x||!_||!m},{sort:function(t){void 0!==t&&i(t);var e=a(this);if(m)return void 0===t?v.call(e):v.call(e,t);var n,r,u=[],l=o(e.length);for(r=0;r<l;r++)r in e&&u.push(e[r]);for(n=(u=c(u,function(t){return function(e,n){return void 0===n?-1:void 0===e?1:void 0!==t?+t(e,n)||0:s(e)>s(n)?1:-1}}(t))).length,r=0;r<n;)e[r]=u[r++];for(;r<l;)delete e[r++];return e}})},function(t){var e=Math.floor,n=function(t,a){var o=t.length,s=e(o/2);return o<8?r(t,a):i(n(t.slice(0,s),a),n(t.slice(s),a),a)},r=function(t,e){for(var n,r,i=t.length,a=1;a<i;){for(r=a,n=t[a];r&&e(t[r-1],n)>0;)t[r]=t[--r];r!==a++&&(t[r]=n)}return t},i=function(t,e,n){for(var r=t.length,i=e.length,a=0,o=0,s=[];a<r||o<i;)a<r&&o<i?s.push(n(t[a],e[o])<=0?t[a++]:e[o++]):s.push(a<r?t[a++]:e[o++]);return s};t.exports=n},function(t,e,n){var r=n(21).match(/firefox\/(\d+)/i);t.exports=!!r&&+r[1]},function(t,e,n){var r=n(21);t.exports=/MSIE|Trident/.test(r)},function(t,e,n){var r=n(21).match(/AppleWebKit\/(\d+)\./);t.exports=!!r&&+r[1]},function(t,e,n){n(142)("Array")},function(t,e,n){"use strict";var r=n(17),i=n(34),a=n(23),o=n(5),s=a("species");t.exports=function(t){var e=r(t),n=i.f;o&&e&&!e[s]&&n(e,s,{configurable:!0,get:function(){return this}})}},function(t,e,n){"use strict";var r=n(2),i=n(49),a=n(48),o=n(47),s=n(29),u=n(67),c=n(96),l=n(97)("splice"),f=Math.max,h=Math.min,d=9007199254740991,g="Maximum allowed length exceeded";r({target:"Array",proto:!0,forced:!l},{splice:function(t,e){var n,r,l,p,v,y,x=s(this),_=o(x.length),m=i(t,_),b=arguments.length;if(0===b?n=r=0:1===b?(n=0,r=_-m):(n=b-2,r=h(f(a(e),0),_-m)),_+n-r>d)throw TypeError(g);for(l=u(x,r),p=0;p<r;p++)(v=m+p)in x&&c(l,p,x[v]);if(l.length=r,n<r){for(p=m;p<_-r;p++)y=p+n,(v=p+r)in x?x[y]=x[v]:delete x[y];for(p=_;p>_-r+n;p--)delete x[p-1]}else if(n>r)for(p=_-r;p>m;p--)y=p+n-1,(v=p+r-1)in x?x[y]=x[v]:delete x[y];for(p=0;p<n;p++)x[p+m]=arguments[p+2];return x.length=_-r+n,l}})},function(t,e,n){n(100)("flat")},function(t,e,n){n(100)("flatMap")},function(t,e,n){"use strict";var r=n(2),i=n(3),a=n(147),o=n(142),s="ArrayBuffer",u=a.ArrayBuffer;r({global:!0,forced:i.ArrayBuffer!==u},{ArrayBuffer:u}),o(s)},function(t,e,n){"use strict";var r=n(3),i=n(5),a=n(148),o=n(33),s=n(149),u=n(6),c=n(150),l=n(48),f=n(47),h=n(151),d=n(152),g=n(84),p=n(86),v=n(44).f,y=n(34).f,x=n(104),_=n(63),m=n(38),b=m.get,w=m.set,T="ArrayBuffer",A="DataView",S="Wrong index",k=r.ArrayBuffer,E=k,M=r.DataView,C=M&&M.prototype,O=Object.prototype,R=r.RangeError,L=d.pack,I=d.unpack,D=function(t){return[255&t]},P=function(t){return[255&t,t>>8&255]},z=function(t){return[255&t,t>>8&255,t>>16&255,t>>24&255]},F=function(t){return t[3]<<24|t[2]<<16|t[1]<<8|t[0]},N=function(t){return L(t,23,4)},j=function(t){return L(t,52,8)},X=function(t,e){y(t.prototype,e,{get:function(){return b(this)[e]}})},B=function(t,e,n,r){var i=h(n),a=b(t);if(i+e>a.byteLength)throw R(S);var o=b(a.buffer).bytes,s=i+a.byteOffset,u=o.slice(s,s+e);return r?u:u.reverse()},$=function(t,e,n,r,i,a){var o=h(n),s=b(t);if(o+e>s.byteLength)throw R(S);for(var u=b(s.buffer).bytes,c=o+s.byteOffset,l=r(+i),f=0;f<e;f++)u[c+f]=l[a?f:e-f-1]};if(a){if(!u((function(){k(1)}))||!u((function(){new k(-1)}))||u((function(){return new k,new k(1.5),new k(NaN),k.name!=T}))){for(var U,Y=(E=function(t){return c(this,E),new k(h(t))}).prototype=k.prototype,V=v(k),G=0;V.length>G;)(U=V[G++])in E||o(E,U,k[U]);Y.constructor=E}p&&g(C)!==O&&p(C,O);var H=new M(new E(2)),W=C.setInt8;H.setInt8(0,2147483648),H.setInt8(1,2147483649),!H.getInt8(0)&&H.getInt8(1)||s(C,{setInt8:function(t,e){W.call(this,t,e<<24>>24)},setUint8:function(t,e){W.call(this,t,e<<24>>24)}},{unsafe:!0})}else E=function(t){c(this,E,T);var e=h(t);w(this,{bytes:x.call(new Array(e),0),byteLength:e}),i||(this.byteLength=e)},M=function(t,e,n){c(this,M,A),c(t,E,A);var r=b(t).byteLength,a=l(e);if(a<0||a>r)throw R("Wrong offset");if(a+(n=void 0===n?r-a:f(n))>r)throw R("Wrong length");w(this,{buffer:t,byteLength:n,byteOffset:a}),i||(this.buffer=t,this.byteLength=n,this.byteOffset=a)},i&&(X(E,"byteLength"),X(M,"buffer"),X(M,"byteLength"),X(M,"byteOffset")),s(M.prototype,{getInt8:function(t){return B(this,1,t)[0]<<24>>24},getUint8:function(t){return B(this,1,t)[0]},getInt16:function(t){var e=B(this,2,t,arguments.length>1?arguments[1]:void 0);return(e[1]<<8|e[0])<<16>>16},getUint16:function(t){var e=B(this,2,t,arguments.length>1?arguments[1]:void 0);return e[1]<<8|e[0]},getInt32:function(t){return F(B(this,4,t,arguments.length>1?arguments[1]:void 0))},getUint32:function(t){return F(B(this,4,t,arguments.length>1?arguments[1]:void 0))>>>0},getFloat32:function(t){return I(B(this,4,t,arguments.length>1?arguments[1]:void 0),23)},getFloat64:function(t){return I(B(this,8,t,arguments.length>1?arguments[1]:void 0),52)},setInt8:function(t,e){$(this,1,t,D,e)},setUint8:function(t,e){$(this,1,t,D,e)},setInt16:function(t,e){$(this,2,t,P,e,arguments.length>2?arguments[2]:void 0)},setUint16:function(t,e){$(this,2,t,P,e,arguments.length>2?arguments[2]:void 0)},setInt32:function(t,e){$(this,4,t,z,e,arguments.length>2?arguments[2]:void 0)},setUint32:function(t,e){$(this,4,t,z,e,arguments.length>2?arguments[2]:void 0)},setFloat32:function(t,e){$(this,4,t,N,e,arguments.length>2?arguments[2]:void 0)},setFloat64:function(t,e){$(this,8,t,j,e,arguments.length>2?arguments[2]:void 0)}});_(E,T),_(M,A),t.exports={ArrayBuffer:E,DataView:M}},function(t){t.exports="undefined"!=typeof ArrayBuffer&&"undefined"!=typeof DataView},function(t,e,n){var r=n(36);t.exports=function(t,e,n){for(var i in e)r(t,i,e[i],n);return t}},function(t){t.exports=function(t,e,n){if(!(t instanceof e))throw TypeError("Incorrect "+(n?n+" ":"")+"invocation");return t}},function(t,e,n){var r=n(48),i=n(47);t.exports=function(t){if(void 0===t)return 0;var e=r(t),n=i(e);if(e!==n)throw RangeError("Wrong length or index");return n}},function(t){var e=Math.abs,n=Math.pow,r=Math.floor,i=Math.log,a=Math.LN2;t.exports={pack:function(t,o,s){var u,c,l,f=new Array(s),h=8*s-o-1,d=(1<<h)-1,g=d>>1,p=23===o?n(2,-24)-n(2,-77):0,v=t<0||0===t&&1/t<0?1:0,y=0;for((t=e(t))!=t||t===1/0?(c=t!=t?1:0,u=d):(u=r(i(t)/a),t*(l=n(2,-u))<1&&(u--,l*=2),(t+=u+g>=1?p/l:p*n(2,1-g))*l>=2&&(u++,l/=2),u+g>=d?(c=0,u=d):u+g>=1?(c=(t*l-1)*n(2,o),u+=g):(c=t*n(2,g-1)*n(2,o),u=0));o>=8;f[y++]=255&c,c/=256,o-=8);for(u=u<<o|c,h+=o;h>0;f[y++]=255&u,u/=256,h-=8);return f[--y]|=128*v,f},unpack:function(t,e){var r,i=t.length,a=8*i-e-1,o=(1<<a)-1,s=o>>1,u=a-7,c=i-1,l=t[c--],f=127&l;for(l>>=7;u>0;f=256*f+t[c],c--,u-=8);for(r=f&(1<<-u)-1,f>>=-u,u+=e;u>0;r=256*r+t[c],c--,u-=8);if(0===f)f=1-s;else{if(f===o)return r?NaN:l?-1/0:1/0;r+=n(2,e),f-=s}return(l?-1:1)*r*n(2,f-e)}}},function(t,e,n){var r=n(2),i=n(154);r({target:"ArrayBuffer",stat:!0,forced:!i.NATIVE_ARRAY_BUFFER_VIEWS},{isView:i.isView})},function(t,e,n){"use strict";var r,i,a,o=n(148),s=n(5),u=n(3),c=n(15),l=n(28),f=n(92),h=n(33),d=n(36),g=n(34).f,p=n(84),v=n(86),y=n(23),x=n(30),_=u.Int8Array,m=_&&_.prototype,b=u.Uint8ClampedArray,w=b&&b.prototype,T=_&&p(_),A=m&&p(m),S=Object.prototype,k=S.isPrototypeOf,E=y("toStringTag"),M=x("TYPED_ARRAY_TAG"),C=x("TYPED_ARRAY_CONSTRUCTOR"),O=o&&!!v&&"Opera"!==f(u.opera),R=!1,L={Int8Array:1,Uint8Array:1,Uint8ClampedArray:1,Int16Array:2,Uint16Array:2,Int32Array:4,Uint32Array:4,Float32Array:4,Float64Array:8},I={BigInt64Array:8,BigUint64Array:8},D=function(t){if(!c(t))return!1;var e=f(t);return l(L,e)||l(I,e)};for(r in L)(a=(i=u[r])&&i.prototype)?h(a,C,i):O=!1;for(r in I)(a=(i=u[r])&&i.prototype)&&h(a,C,i);if((!O||"function"!=typeof T||T===Function.prototype)&&(T=function(){throw TypeError("Incorrect invocation")},O))for(r in L)u[r]&&v(u[r],T);if((!O||!A||A===S)&&(A=T.prototype,O))for(r in L)u[r]&&v(u[r].prototype,A);if(O&&p(w)!==A&&v(w,A),s&&!l(A,E))for(r in R=!0,g(A,E,{get:function(){return c(this)?this[M]:void 0}}),L)u[r]&&h(u[r],M,r);t.exports={NATIVE_ARRAY_BUFFER_VIEWS:O,TYPED_ARRAY_CONSTRUCTOR:C,TYPED_ARRAY_TAG:R&&M,aTypedArray:function(t){if(D(t))return t;throw TypeError("Target is not a typed array")},aTypedArrayConstructor:function(t){if(v&&!k.call(T,t))throw TypeError("Target is not a typed array constructor");return t},exportTypedArrayMethod:function(t,e,n){if(s){if(n)for(var r in L){var i=u[r];if(i&&l(i.prototype,t))try{delete i.prototype[t]}catch(t){}}A[t]&&!n||d(A,t,n?e:O&&m[t]||e)}},exportTypedArrayStaticMethod:function(t,e,n){var r,i;if(s){if(v){if(n)for(r in L)if((i=u[r])&&l(i,t))try{delete i[t]}catch(t){}if(T[t]&&!n)return;try{return d(T,t,n?e:O&&T[t]||e)}catch(t){}}for(r in L)!(i=u[r])||i[t]&&!n||d(i,t,e)}},isView:function(t){if(!c(t))return!1;var e=f(t);return"DataView"===e||l(L,e)||l(I,e)},isTypedArray:D,TypedArray:T,TypedArrayPrototype:A}},function(t,e,n){"use strict";var r=n(2),i=n(6),a=n(147),o=n(35),s=n(49),u=n(47),c=n(156),l=a.ArrayBuffer,f=a.DataView,h=l.prototype.slice;r({target:"ArrayBuffer",proto:!0,unsafe:!0,forced:i((function(){return!new l(2).slice(1,void 0).byteLength}))},{slice:function(t,e){if(void 0!==h&&void 0===e)return h.call(o(this),t);for(var n=o(this).byteLength,r=s(t,n),i=s(void 0===e?n:e,n),a=new(c(this,l))(u(i-r)),d=new f(this),g=new f(a),p=0;r<i;)g.setUint8(p++,d.getUint8(r++));return a}})},function(t,e,n){var r=n(35),i=n(66),a=n(23)("species");t.exports=function(t,e){var n,o=r(t).constructor;return void 0===o||null==(n=r(o)[a])?e:i(n)}},function(t,e,n){var r=n(2),i=n(147);r({global:!0,forced:!n(148)},{DataView:i.DataView})},function(t,e,n){"use strict";var r=n(2),i=n(6)((function(){return 120!==new Date(16e11).getYear()})),a=Date.prototype.getFullYear;r({target:"Date",proto:!0,forced:i},{getYear:function(){return a.call(this)-1900}})},function(t,e,n){n(2)({target:"Date",stat:!0},{now:function(){return(new Date).getTime()}})},function(t,e,n){"use strict";var r=n(2),i=n(48),a=Date.prototype.getTime,o=Date.prototype.setFullYear;r({target:"Date",proto:!0},{setYear:function(t){a.call(this);var e=i(t),n=0<=e&&e<=99?e+1900:e;return o.call(this,n)}})},function(t,e,n){n(2)({target:"Date",proto:!0},{toGMTString:Date.prototype.toUTCString})},function(t,e,n){var r=n(2),i=n(163);r({target:"Date",proto:!0,forced:Date.prototype.toISOString!==i},{toISOString:i})},function(t,e,n){"use strict";var r=n(6),i=n(164).start,a=Math.abs,o=Date.prototype,s=o.getTime,u=o.toISOString;t.exports=r((function(){return"0385-07-25T07:06:39.999Z"!=u.call(new Date(-50000000000001))}))||!r((function(){u.call(new Date(NaN))}))?function(){if(!isFinite(s.call(this)))throw RangeError("Invalid time value");var t=this,e=t.getUTCFullYear(),n=t.getUTCMilliseconds(),r=e<0?"-":e>9999?"+":"";return r+i(a(e),r?6:4,0)+"-"+i(t.getUTCMonth()+1,2,0)+"-"+i(t.getUTCDate(),2,0)+"T"+i(t.getUTCHours(),2,0)+":"+i(t.getUTCMinutes(),2,0)+":"+i(t.getUTCSeconds(),2,0)+"."+i(n,3,0)+"Z"}:u},function(t,e,n){var r=n(47),i=n(54),a=n(165),o=n(12),s=Math.ceil,u=function(t){return function(e,n,u){var c,l,f=i(o(e)),h=f.length,d=void 0===u?" ":i(u),g=r(n);return g<=h||""==d?f:(c=g-h,(l=a.call(d,s(c/d.length))).length>c&&(l=l.slice(0,c)),t?f+l:l+f)}};t.exports={start:u(!1),end:u(!0)}},function(t,e,n){"use strict";var r=n(48),i=n(54),a=n(12);t.exports=function(t){var e=i(a(this)),n="",o=r(t);if(o<0||o==1/0)throw RangeError("Wrong number of repetitions");for(;o>0;(o>>>=1)&&(e+=e))1&o&&(n+=e);return n}},function(t,e,n){"use strict";var r=n(2),i=n(6),a=n(29),o=n(14);r({target:"Date",proto:!0,forced:i((function(){return null!==new Date(NaN).toJSON()||1!==Date.prototype.toJSON.call({toISOString:function(){return 1}})}))},{toJSON:function(t){var e=a(this),n=o(e,"number");return"number"!=typeof n||isFinite(n)?e.toISOString():null}})},function(t,e,n){var r=n(33),i=n(168),a=n(23)("toPrimitive"),o=Date.prototype;a in o||r(o,a,i)},function(t,e,n){"use strict";var r=n(35),i=n(22);t.exports=function(t){if(r(this),"string"===t||"default"===t)t="string";else if("number"!==t)throw TypeError("Incorrect hint");return i(this,t)}},function(t,e,n){var r=n(36),i=Date.prototype,a="Invalid Date",o="toString",s=i.toString,u=i.getTime;String(new Date(NaN))!=a&&r(i,o,(function(){var t=u.call(this);return t==t?s.call(this):a}))},function(t,e,n){"use strict";var r=n(2),i=n(54),a=/[\w*+\-./@]/,o=function(t,e){for(var n=t.toString(16);n.length<e;)n="0"+n;return n};r({global:!0},{escape:function(t){for(var e,n,r=i(t),s="",u=r.length,c=0;c<u;)e=r.charAt(c++),a.test(e)?s+=e:s+=(n=e.charCodeAt(0))<256?"%"+o(n,2):"%u"+o(n,4).toUpperCase();return s}})},function(t,e,n){n(2)({target:"Function",proto:!0},{bind:n(172)})},function(t,e,n){"use strict";var r=n(66),i=n(15),a=[].slice,o={},s=function(t,e,n){if(!(e in o)){for(var r=[],i=0;i<e;i++)r[i]="a["+i+"]";o[e]=Function("C,a","return new C("+r.join(",")+")")}return o[e](t,n)};t.exports=Function.bind||function(t){var e=r(this),n=a.call(arguments,1),o=function(){var r=n.concat(a.call(arguments));return this instanceof o?s(e,r.length,r):e.apply(t,r)};return i(e.prototype)&&(o.prototype=e.prototype),o}},function(t,e,n){"use strict";var r=n(15),i=n(34),a=n(84),o=n(23)("hasInstance"),s=Function.prototype;o in s||i.f(s,o,{value:function(t){if("function"!=typeof this||!r(t))return!1;if(!r(this.prototype))return t instanceof this;for(;t=a(t);)if(this.prototype===t)return!0;return!1}})},function(t,e,n){var r=n(5),i=n(34).f,a=Function.prototype,o=a.toString,s=/^\s*function ([^ (]*)/,u="name";r&&!(u in a)&&i(a,u,{configurable:!0,get:function(){try{return o.call(this).match(s)[1]}catch(t){return""}}})},function(t,e,n){n(2)({global:!0},{globalThis:n(3)})},function(t,e,n){var r=n(2),i=n(17),a=n(6),o=i("JSON","stringify"),s=/[\uD800-\uDFFF]/g,u=/^[\uD800-\uDBFF]$/,c=/^[\uDC00-\uDFFF]$/,l=function(t,e,n){var r=n.charAt(e-1),i=n.charAt(e+1);return u.test(t)&&!c.test(i)||c.test(t)&&!u.test(r)?"\\u"+t.charCodeAt(0).toString(16):t},f=a((function(){return'"\\udf06\\ud834"'!==o("\udf06\ud834")||'"\\udead"'!==o("\udead")}));o&&r({target:"JSON",stat:!0,forced:f},{stringify:function(t,e,n){var r=o.apply(null,arguments);return"string"==typeof r?r.replace(s,l):r}})},function(t,e,n){var r=n(3);n(63)(r.JSON,"JSON",!0)},function(t,e,n){"use strict";var r=n(179),i=n(183);t.exports=r("Map",(function(t){return function(){return t(this,arguments.length?arguments[0]:void 0)}}),i)},function(t,e,n){"use strict";var r=n(2),i=n(3),a=n(52),o=n(36),s=n(180),u=n(88),c=n(150),l=n(15),f=n(6),h=n(116),d=n(63),g=n(182);t.exports=function(t,e,n){var p=-1!==t.indexOf("Map"),v=-1!==t.indexOf("Weak"),y=p?"set":"add",x=i[t],_=x&&x.prototype,m=x,b={},w=function(t){var e=_[t];o(_,t,"add"==t?function(t){return e.call(this,0===t?0:t),this}:"delete"==t?function(t){return!(v&&!l(t))&&e.call(this,0===t?0:t)}:"get"==t?function(t){return v&&!l(t)?void 0:e.call(this,0===t?0:t)}:"has"==t?function(t){return!(v&&!l(t))&&e.call(this,0===t?0:t)}:function(t,n){return e.call(this,0===t?0:t,n),this})};if(a(t,"function"!=typeof x||!(v||_.forEach&&!f((function(){(new x).entries().next()})))))m=n.getConstructor(e,t,p,y),s.enable();else if(a(t,!0)){var T=new m,A=T[y](v?{}:-0,1)!=T,S=f((function(){T.has(1)})),k=h((function(t){new x(t)})),E=!v&&f((function(){for(var t=new x,e=5;e--;)t[y](e,e);return!t.has(-0)}));k||((m=e((function(e,n){c(e,m,t);var r=g(new x,e,m);return null!=n&&u(n,r[y],{that:r,AS_ENTRIES:p}),r}))).prototype=_,_.constructor=m),(S||E)&&(w("delete"),w("has"),p&&w("get")),(E||A)&&w(y),v&&_.clear&&delete _.clear}return b[t]=m,r({global:!0,forced:m!=x},b),d(m,t),v||n.setStrong(m,t,p),m}},function(t,e,n){var r=n(2),i=n(41),a=n(15),o=n(28),s=n(34).f,u=n(44),c=n(59),l=n(30),f=n(181),h=!1,d=l("meta"),g=0,p=Object.isExtensible||function(){return!0},v=function(t){s(t,d,{value:{objectID:"O"+g++,weakData:{}}})},y=t.exports={enable:function(){y.enable=function(){},h=!0;var t=u.f,e=[].splice,n={};n[d]=1,t(n).length&&(u.f=function(n){for(var r=t(n),i=0,a=r.length;i<a;i++)if(r[i]===d){e.call(r,i,1);break}return r},r({target:"Object",stat:!0,forced:!0},{getOwnPropertyNames:c.f}))},fastKey:function(t,e){if(!a(t))return"symbol"==typeof t?t:("string"==typeof t?"S":"P")+t;if(!o(t,d)){if(!p(t))return"F";if(!e)return"E";v(t)}return t[d].objectID},getWeakData:function(t,e){if(!o(t,d)){if(!p(t))return!0;if(!e)return!1;v(t)}return t[d].weakData},onFreeze:function(t){return f&&h&&p(t)&&!o(t,d)&&v(t),t}};i[d]=!0},function(t,e,n){var r=n(6);t.exports=!r((function(){return Object.isExtensible(Object.preventExtensions({}))}))},function(t,e,n){var r=n(15),i=n(86);t.exports=function(t,e,n){var a,o;return i&&"function"==typeof(a=e.constructor)&&a!==n&&r(o=a.prototype)&&o!==n.prototype&&i(t,o),t}},function(t,e,n){"use strict";var r=n(34).f,i=n(55),a=n(149),o=n(65),s=n(150),u=n(88),c=n(121),l=n(142),f=n(5),h=n(180).fastKey,d=n(38),g=d.set,p=d.getterFor;t.exports={getConstructor:function(t,e,n,c){var l=t((function(t,r){s(t,l,e),g(t,{type:e,index:i(null),first:void 0,last:void 0,size:0}),f||(t.size=0),null!=r&&u(r,t[c],{that:t,AS_ENTRIES:n})})),d=p(e),v=function(t,e,n){var r,i,a=d(t),o=y(t,e);return o?o.value=n:(a.last=o={index:i=h(e,!0),key:e,value:n,previous:r=a.last,next:void 0,removed:!1},a.first||(a.first=o),r&&(r.next=o),f?a.size++:t.size++,"F"!==i&&(a.index[i]=o)),t},y=function(t,e){var n,r=d(t),i=h(e);if("F"!==i)return r.index[i];for(n=r.first;n;n=n.next)if(n.key==e)return n};return a(l.prototype,{clear:function(){for(var t=d(this),e=t.index,n=t.first;n;)n.removed=!0,n.previous&&(n.previous=n.previous.next=void 0),delete e[n.index],n=n.next;t.first=t.last=void 0,f?t.size=0:this.size=0},delete:function(t){var e=this,n=d(e),r=y(e,t);if(r){var i=r.next,a=r.previous;delete n.index[r.index],r.removed=!0,a&&(a.next=i),i&&(i.previous=a),n.first==r&&(n.first=i),n.last==r&&(n.last=a),f?n.size--:e.size--}return!!r},forEach:function(t){for(var e,n=d(this),r=o(t,arguments.length>1?arguments[1]:void 0,3);e=e?e.next:n.first;)for(r(e.value,e.key,this);e&&e.removed;)e=e.previous},has:function(t){return!!y(this,t)}}),a(l.prototype,n?{get:function(t){var e=y(this,t);return e&&e.value},set:function(t,e){return v(this,0===t?0:t,e)}}:{add:function(t){return v(this,t=0===t?0:t,t)}}),f&&r(l.prototype,"size",{get:function(){return d(this).size}}),l},setStrong:function(t,e,n){var r=e+" Iterator",i=p(e),a=p(r);c(t,e,(function(t,e){g(this,{type:r,target:t,state:i(t),kind:e,last:void 0})}),(function(){for(var t=a(this),e=t.kind,n=t.last;n&&n.removed;)n=n.previous;return t.target&&(t.last=n=n?n.next:t.state.first)?"keys"==e?{value:n.key,done:!1}:"values"==e?{value:n.value,done:!1}:{value:[n.key,n.value],done:!1}:(t.target=void 0,{value:void 0,done:!0})}),n?"entries":"values",!n,!0),l(e)}}},function(t,e,n){var r=n(2),i=n(185),a=Math.acosh,o=Math.log,s=Math.sqrt,u=Math.LN2;r({target:"Math",stat:!0,forced:!a||710!=Math.floor(a(Number.MAX_VALUE))||a(1/0)!=1/0},{acosh:function(t){return(t=+t)<1?NaN:t>94906265.62425156?o(t)+u:i(t-1+s(t-1)*s(t+1))}})},function(t){var e=Math.log;t.exports=Math.log1p||function(t){return(t=+t)>-1e-8&&t<1e-8?t-t*t/2:e(1+t)}},function(t,e,n){var r=n(2),i=Math.asinh,a=Math.log,o=Math.sqrt;r({target:"Math",stat:!0,forced:!(i&&1/i(0)>0)},{asinh:function t(e){return isFinite(e=+e)&&0!=e?e<0?-t(-e):a(e+o(e*e+1)):e}})},function(t,e,n){var r=n(2),i=Math.atanh,a=Math.log;r({target:"Math",stat:!0,forced:!(i&&1/i(-0)<0)},{atanh:function(t){return 0==(t=+t)?t:a((1+t)/(1-t))/2}})},function(t,e,n){var r=n(2),i=n(189),a=Math.abs,o=Math.pow;r({target:"Math",stat:!0},{cbrt:function(t){return i(t=+t)*o(a(t),1/3)}})},function(t){t.exports=Math.sign||function(t){return 0==(t=+t)||t!=t?t:t<0?-1:1}},function(t,e,n){var r=n(2),i=Math.floor,a=Math.log,o=Math.LOG2E;r({target:"Math",stat:!0},{clz32:function(t){return(t>>>=0)?31-i(a(t+.5)*o):32}})},function(t,e,n){var r=n(2),i=n(192),a=Math.cosh,o=Math.abs,s=Math.E;r({target:"Math",stat:!0,forced:!a||a(710)===1/0},{cosh:function(t){var e=i(o(t)-1)+1;return(e+1/(e*s*s))*(s/2)}})},function(t){var e=Math.expm1,n=Math.exp;t.exports=!e||e(10)>22025.465794806718||e(10)<22025.465794806718||-2e-17!=e(-2e-17)?function(t){return 0==(t=+t)?t:t>-1e-6&&t<1e-6?t+t*t/2:n(t)-1}:e},function(t,e,n){var r=n(2),i=n(192);r({target:"Math",stat:!0,forced:i!=Math.expm1},{expm1:i})},function(t,e,n){n(2)({target:"Math",stat:!0},{fround:n(195)})},function(t,e,n){var r=n(189),i=Math.abs,a=Math.pow,o=a(2,-52),s=a(2,-23),u=a(2,127)*(2-s),c=a(2,-126);t.exports=Math.fround||function(t){var e,n,a=i(t),l=r(t);return a<c?l*(a/c/s+1/o-1/o)*c*s:(n=(e=(1+s/o)*a)-(e-a))>u||n!=n?l*(1/0):l*n}},function(t,e,n){var r=n(2),i=Math.hypot,a=Math.abs,o=Math.sqrt;r({target:"Math",stat:!0,forced:!!i&&i(1/0,NaN)!==1/0},{hypot:function(t,e){for(var n,r,i=0,s=0,u=arguments.length,c=0;s<u;)c<(n=a(arguments[s++]))?(i=i*(r=c/n)*r+1,c=n):i+=n>0?(r=n/c)*r:n;return c===1/0?1/0:c*o(i)}})},function(t,e,n){var r=n(2),i=n(6),a=Math.imul;r({target:"Math",stat:!0,forced:i((function(){return-5!=a(4294967295,5)||2!=a.length}))},{imul:function(t,e){var n=65535,r=+t,i=+e,a=n&r,o=n&i;return 0|a*o+((n&r>>>16)*o+a*(n&i>>>16)<<16>>>0)}})},function(t,e,n){var r=n(2),i=Math.log,a=Math.LOG10E;r({target:"Math",stat:!0},{log10:function(t){return i(t)*a}})},function(t,e,n){n(2)({target:"Math",stat:!0},{log1p:n(185)})},function(t,e,n){var r=n(2),i=Math.log,a=Math.LN2;r({target:"Math",stat:!0},{log2:function(t){return i(t)/a}})},function(t,e,n){n(2)({target:"Math",stat:!0},{sign:n(189)})},function(t,e,n){var r=n(2),i=n(6),a=n(192),o=Math.abs,s=Math.exp,u=Math.E;r({target:"Math",stat:!0,forced:i((function(){return-2e-17!=Math.sinh(-2e-17)}))},{sinh:function(t){return o(t=+t)<1?(a(t)-a(-t))/2:(s(t-1)-s(-t-1))*(u/2)}})},function(t,e,n){var r=n(2),i=n(192),a=Math.exp;r({target:"Math",stat:!0},{tanh:function(t){var e=i(t=+t),n=i(-t);return e==1/0?1:n==1/0?-1:(e-n)/(a(t)+a(-t))}})},function(t,e,n){n(63)(Math,"Math",!0)},function(t,e,n){var r=n(2),i=Math.ceil,a=Math.floor;r({target:"Math",stat:!0},{trunc:function(t){return(t>0?a:i)(t)}})},function(t,e,n){"use strict";var r=n(5),i=n(3),a=n(52),o=n(36),s=n(28),u=n(11),c=n(182),l=n(16),f=n(14),h=n(6),d=n(55),g=n(44).f,p=n(4).f,v=n(34).f,y=n(207).trim,x="Number",_=i.Number,m=_.prototype,b=u(d(m))==x,w=function(t){if(l(t))throw TypeError("Cannot convert a Symbol value to a number");var e,n,r,i,a,o,s,u,c=f(t,"number");if("string"==typeof c&&c.length>2)if(43===(e=(c=y(c)).charCodeAt(0))||45===e){if(88===(n=c.charCodeAt(2))||120===n)return NaN}else if(48===e){switch(c.charCodeAt(1)){case 66:case 98:r=2,i=49;break;case 79:case 111:r=8,i=55;break;default:return+c}for(o=(a=c.slice(2)).length,s=0;s<o;s++)if((u=a.charCodeAt(s))<48||u>i)return NaN;return parseInt(a,r)}return+c};if(a(x,!_(" 0o1")||!_("0b1")||_("+0x1"))){for(var T,A=function(t){var e=arguments.length<1?0:t,n=this;return n instanceof A&&(b?h((function(){m.valueOf.call(n)})):u(n)!=x)?c(new _(w(e)),n,A):w(e)},S=r?g(_):"MAX_VALUE,MIN_VALUE,NaN,NEGATIVE_INFINITY,POSITIVE_INFINITY,EPSILON,isFinite,isInteger,isNaN,isSafeInteger,MAX_SAFE_INTEGER,MIN_SAFE_INTEGER,parseFloat,parseInt,isInteger,fromString,range".split(","),k=0;S.length>k;k++)s(_,T=S[k])&&!s(A,T)&&v(A,T,p(_,T));A.prototype=m,m.constructor=A,o(i,x,A)}},function(t,e,n){var r=n(12),i=n(54),a="["+n(208)+"]",o=RegExp("^"+a+a+"*"),s=RegExp(a+a+"*$"),u=function(t){return function(e){var n=i(r(e));return 1&t&&(n=n.replace(o,"")),2&t&&(n=n.replace(s,"")),n}};t.exports={start:u(1),end:u(2),trim:u(3)}},function(t){t.exports="\t\n\v\f\r                　\u2028\u2029\ufeff"},function(t,e,n){n(2)({target:"Number",stat:!0},{EPSILON:Math.pow(2,-52)})},function(t,e,n){n(2)({target:"Number",stat:!0},{isFinite:n(211)})},function(t,e,n){var r=n(3).isFinite;t.exports=Number.isFinite||function(t){return"number"==typeof t&&r(t)}},function(t,e,n){n(2)({target:"Number",stat:!0},{isInteger:n(213)})},function(t,e,n){var r=n(15),i=Math.floor;t.exports=function(t){return!r(t)&&isFinite(t)&&i(t)===t}},function(t,e,n){n(2)({target:"Number",stat:!0},{isNaN:function(t){return t!=t}})},function(t,e,n){var r=n(2),i=n(213),a=Math.abs;r({target:"Number",stat:!0},{isSafeInteger:function(t){return i(t)&&a(t)<=9007199254740991}})},function(t,e,n){n(2)({target:"Number",stat:!0},{MAX_SAFE_INTEGER:9007199254740991})},function(t,e,n){n(2)({target:"Number",stat:!0},{MIN_SAFE_INTEGER:-9007199254740991})},function(t,e,n){var r=n(2),i=n(219);r({target:"Number",stat:!0,forced:Number.parseFloat!=i},{parseFloat:i})},function(t,e,n){var r=n(3),i=n(54),a=n(207).trim,o=n(208),s=r.parseFloat,u=1/s(o+"-0")!=-1/0;t.exports=u?function(t){var e=a(i(t)),n=s(e);return 0===n&&"-"==e.charAt(0)?-0:n}:s},function(t,e,n){var r=n(2),i=n(221);r({target:"Number",stat:!0,forced:Number.parseInt!=i},{parseInt:i})},function(t,e,n){var r=n(3),i=n(54),a=n(207).trim,o=n(208),s=r.parseInt,u=/^[+-]?0[Xx]/,c=8!==s(o+"08")||22!==s(o+"0x16");t.exports=c?function(t,e){var n=a(i(t));return s(n,e>>>0||(u.test(n)?16:10))}:s},function(t,e,n){"use strict";var r=n(2),i=n(48),a=n(223),o=n(165),s=n(6),u=1..toFixed,c=Math.floor,l=function(t,e,n){return 0===e?n:e%2==1?l(t,e-1,n*t):l(t*t,e/2,n)},f=function(t,e,n){for(var r=-1,i=n;++r<6;)i+=e*t[r],t[r]=i%1e7,i=c(i/1e7)},h=function(t,e){for(var n=6,r=0;--n>=0;)r+=t[n],t[n]=c(r/e),r=r%e*1e7},d=function(t){for(var e=6,n="";--e>=0;)if(""!==n||0===e||0!==t[e]){var r=String(t[e]);n=""===n?r:n+o.call("0",7-r.length)+r}return n};r({target:"Number",proto:!0,forced:u&&("0.000"!==8e-5.toFixed(3)||"1"!==.9.toFixed(0)||"1.25"!==1.255.toFixed(2)||"1000000000000000128"!==(0xde0b6b3a7640080).toFixed(0))||!s((function(){u.call({})}))},{toFixed:function(t){var e,n,r,s,u=a(this),c=i(t),g=[0,0,0,0,0,0],p="",v="0";if(c<0||c>20)throw RangeError("Incorrect fraction digits");if(u!=u)return"NaN";if(u<=-1e21||u>=1e21)return String(u);if(u<0&&(p="-",u=-u),u>1e-21)if(n=(e=function(t){for(var e=0,n=t;n>=4096;)e+=12,n/=4096;for(;n>=2;)e+=1,n/=2;return e}(u*l(2,69,1))-69)<0?u*l(2,-e,1):u/l(2,e,1),n*=4503599627370496,(e=52-e)>0){for(f(g,0,n),r=c;r>=7;)f(g,1e7,0),r-=7;for(f(g,l(10,r,1),0),r=e-1;r>=23;)h(g,1<<23),r-=23;h(g,1<<r),f(g,1,1),h(g,2),v=d(g)}else f(g,0,n),f(g,1<<-e,0),v=d(g)+o.call("0",c);return v=c>0?p+((s=v.length)<=c?"0."+o.call("0",c-s)+v:v.slice(0,s-c)+"."+v.slice(s-c)):p+v}})},function(t,e,n){var r=n(11);t.exports=function(t){if("number"!=typeof t&&"Number"!=r(t))throw TypeError("Incorrect invocation");return+t}},function(t,e,n){"use strict";var r=n(2),i=n(6),a=n(223),o=1..toPrecision;r({target:"Number",proto:!0,forced:i((function(){return"1"!==o.call(1,void 0)}))||!i((function(){o.call({})}))},{toPrecision:function(t){return void 0===t?o.call(a(this)):o.call(a(this),t)}})},function(t,e,n){var r=n(2),i=n(226);r({target:"Object",stat:!0,forced:Object.assign!==i},{assign:i})},function(t,e,n){"use strict";var r=n(5),i=n(6),a=n(57),o=n(51),s=n(7),u=n(29),c=n(10),l=Object.assign,f=Object.defineProperty;t.exports=!l||i((function(){if(r&&1!==l({b:1},l(f({},"a",{enumerable:!0,get:function(){f(this,"b",{value:3,enumerable:!1})}}),{b:2})).b)return!0;var t={},e={},n=Symbol(),i="abcdefghijklmnopqrst";return t[n]=7,i.split("").forEach((function(t){e[t]=t})),7!=l({},t)[n]||a(l({},e)).join("")!=i}))?function(t,e){for(var n=u(t),i=arguments.length,l=1,f=o.f,h=s.f;i>l;)for(var d,g=c(arguments[l++]),p=f?a(g).concat(f(g)):a(g),v=p.length,y=0;v>y;)d=p[y++],r&&!h.call(g,d)||(n[d]=g[d]);return n}:l},function(t,e,n){n(2)({target:"Object",stat:!0,sham:!n(5)},{create:n(55)})},function(t,e,n){"use strict";var r=n(2),i=n(5),a=n(229),o=n(29),s=n(66),u=n(34);i&&r({target:"Object",proto:!0,forced:a},{__defineGetter__:function(t,e){u.f(o(this),t,{get:s(e),enumerable:!0,configurable:!0})}})},function(t,e,n){"use strict";var r=n(25),i=n(3),a=n(6),o=n(140);t.exports=r||!a((function(){if(!(o&&o<535)){var t=Math.random();__defineSetter__.call(null,t,(function(){})),delete i[t]}}))},function(t,e,n){var r=n(2),i=n(5);r({target:"Object",stat:!0,forced:!i,sham:!i},{defineProperties:n(56)})},function(t,e,n){var r=n(2),i=n(5);r({target:"Object",stat:!0,forced:!i,sham:!i},{defineProperty:n(34).f})},function(t,e,n){"use strict";var r=n(2),i=n(5),a=n(229),o=n(29),s=n(66),u=n(34);i&&r({target:"Object",proto:!0,forced:a},{__defineSetter__:function(t,e){u.f(o(this),t,{set:s(e),enumerable:!0,configurable:!0})}})},function(t,e,n){var r=n(2),i=n(234).entries;r({target:"Object",stat:!0},{entries:function(t){return i(t)}})},function(t,e,n){var r=n(5),i=n(57),a=n(9),o=n(7).f,s=function(t){return function(e){for(var n,s=a(e),u=i(s),c=u.length,l=0,f=[];c>l;)n=u[l++],r&&!o.call(s,n)||f.push(t?[n,s[n]]:s[n]);return f}};t.exports={entries:s(!0),values:s(!1)}},function(t,e,n){var r=n(2),i=n(181),a=n(6),o=n(15),s=n(180).onFreeze,u=Object.freeze;r({target:"Object",stat:!0,forced:a((function(){u(1)})),sham:!i},{freeze:function(t){return u&&o(t)?u(s(t)):t}})},function(t,e,n){var r=n(2),i=n(88),a=n(96);r({target:"Object",stat:!0},{fromEntries:function(t){var e={};return i(t,(function(t,n){a(e,t,n)}),{AS_ENTRIES:!0}),e}})},function(t,e,n){var r=n(2),i=n(6),a=n(9),o=n(4).f,s=n(5),u=i((function(){o(1)}));r({target:"Object",stat:!0,forced:!s||u,sham:!s},{getOwnPropertyDescriptor:function(t,e){return o(a(t),e)}})},function(t,e,n){var r=n(2),i=n(5),a=n(43),o=n(9),s=n(4),u=n(96);r({target:"Object",stat:!0,sham:!i},{getOwnPropertyDescriptors:function(t){for(var e,n,r=o(t),i=s.f,c=a(r),l={},f=0;c.length>f;)void 0!==(n=i(r,e=c[f++]))&&u(l,e,n);return l}})},function(t,e,n){var r=n(2),i=n(6),a=n(59).f;r({target:"Object",stat:!0,forced:i((function(){return!Object.getOwnPropertyNames(1)}))},{getOwnPropertyNames:a})},function(t,e,n){var r=n(2),i=n(6),a=n(29),o=n(84),s=n(85);r({target:"Object",stat:!0,forced:i((function(){o(1)})),sham:!s},{getPrototypeOf:function(t){return o(a(t))}})},function(t,e,n){n(2)({target:"Object",stat:!0},{is:n(242)})},function(t){t.exports=Object.is||function(t,e){return t===e?0!==t||1/t==1/e:t!=t&&e!=e}},function(t,e,n){var r=n(2),i=n(6),a=n(15),o=Object.isExtensible;r({target:"Object",stat:!0,forced:i((function(){o(1)}))},{isExtensible:function(t){return!!a(t)&&(!o||o(t))}})},function(t,e,n){var r=n(2),i=n(6),a=n(15),o=Object.isFrozen;r({target:"Object",stat:!0,forced:i((function(){o(1)}))},{isFrozen:function(t){return!a(t)||!!o&&o(t)}})},function(t,e,n){var r=n(2),i=n(6),a=n(15),o=Object.isSealed;r({target:"Object",stat:!0,forced:i((function(){o(1)}))},{isSealed:function(t){return!a(t)||!!o&&o(t)}})},function(t,e,n){var r=n(2),i=n(29),a=n(57);r({target:"Object",stat:!0,forced:n(6)((function(){a(1)}))},{keys:function(t){return a(i(t))}})},function(t,e,n){"use strict";var r=n(2),i=n(5),a=n(229),o=n(29),s=n(13),u=n(84),c=n(4).f;i&&r({target:"Object",proto:!0,forced:a},{__lookupGetter__:function(t){var e,n=o(this),r=s(t);do{if(e=c(n,r))return e.get}while(n=u(n))}})},function(t,e,n){"use strict";var r=n(2),i=n(5),a=n(229),o=n(29),s=n(13),u=n(84),c=n(4).f;i&&r({target:"Object",proto:!0,forced:a},{__lookupSetter__:function(t){var e,n=o(this),r=s(t);do{if(e=c(n,r))return e.set}while(n=u(n))}})},function(t,e,n){var r=n(2),i=n(15),a=n(180).onFreeze,o=n(181),s=n(6),u=Object.preventExtensions;r({target:"Object",stat:!0,forced:s((function(){u(1)})),sham:!o},{preventExtensions:function(t){return u&&i(t)?u(a(t)):t}})},function(t,e,n){var r=n(2),i=n(15),a=n(180).onFreeze,o=n(181),s=n(6),u=Object.seal;r({target:"Object",stat:!0,forced:s((function(){u(1)})),sham:!o},{seal:function(t){return u&&i(t)?u(a(t)):t}})},function(t,e,n){n(2)({target:"Object",stat:!0},{setPrototypeOf:n(86)})},function(t,e,n){var r=n(93),i=n(36),a=n(253);r||i(Object.prototype,"toString",a,{unsafe:!0})},function(t,e,n){"use strict";var r=n(93),i=n(92);t.exports=r?{}.toString:function(){return"[object "+i(this)+"]"}},function(t,e,n){var r=n(2),i=n(234).values;r({target:"Object",stat:!0},{values:function(t){return i(t)}})},function(t,e,n){var r=n(2),i=n(219);r({global:!0,forced:parseFloat!=i},{parseFloat:i})},function(t,e,n){var r=n(2),i=n(221);r({global:!0,forced:parseInt!=i},{parseInt:i})},function(t,e,n){"use strict";var r,i,a,o,s=n(2),u=n(25),c=n(3),l=n(17),f=n(258),h=n(36),d=n(149),g=n(86),p=n(63),v=n(142),y=n(15),x=n(66),_=n(150),m=n(37),b=n(88),w=n(116),T=n(156),A=n(259).set,S=n(261),k=n(264),E=n(266),M=n(265),C=n(267),O=n(38),R=n(52),L=n(23),I=n(268),D=n(131),P=n(20),z=L("species"),F="Promise",N=O.get,j=O.set,X=O.getterFor(F),B=f&&f.prototype,$=f,U=B,Y=c.TypeError,V=c.document,G=c.process,H=M.f,W=H,q=!!(V&&V.createEvent&&c.dispatchEvent),Z="function"==typeof PromiseRejectionEvent,K="unhandledrejection",J=!1,Q=R(F,(function(){var t=m($),e=t!==String($);if(!e&&66===P)return!0;if(u&&!U.finally)return!0;if(P>=51&&/native code/.test(t))return!1;var n=new $((function(t){t(1)})),r=function(t){t((function(){}),(function(){}))};return(n.constructor={})[z]=r,!(J=n.then((function(){}))instanceof r)||!e&&I&&!Z})),tt=Q||!w((function(t){$.all(t).catch((function(){}))})),et=function(t){var e;return!(!y(t)||"function"!=typeof(e=t.then))&&e},nt=function(t,e){if(!t.notified){t.notified=!0;var n=t.reactions;S((function(){for(var r=t.value,i=1==t.state,a=0;n.length>a;){var o,s,u,c=n[a++],l=i?c.ok:c.fail,f=c.resolve,h=c.reject,d=c.domain;try{l?(i||(2===t.rejection&&ot(t),t.rejection=1),!0===l?o=r:(d&&d.enter(),o=l(r),d&&(d.exit(),u=!0)),o===c.promise?h(Y("Promise-chain cycle")):(s=et(o))?s.call(o,f,h):f(o)):h(r)}catch(t){d&&!u&&d.exit(),h(t)}}t.reactions=[],t.notified=!1,e&&!t.rejection&&it(t)}))}},rt=function(t,e,n){var r,i;q?((r=V.createEvent("Event")).promise=e,r.reason=n,r.initEvent(t,!1,!0),c.dispatchEvent(r)):r={promise:e,reason:n},!Z&&(i=c["on"+t])?i(r):t===K&&E("Unhandled promise rejection",n)},it=function(t){A.call(c,(function(){var e,n=t.facade,r=t.value;if(at(t)&&(e=C((function(){D?G.emit("unhandledRejection",r,n):rt(K,n,r)})),t.rejection=D||at(t)?2:1,e.error))throw e.value}))},at=function(t){return 1!==t.rejection&&!t.parent},ot=function(t){A.call(c,(function(){var e=t.facade;D?G.emit("rejectionHandled",e):rt("rejectionhandled",e,t.value)}))},st=function(t,e,n){return function(r){t(e,r,n)}},ut=function(t,e,n){t.done||(t.done=!0,n&&(t=n),t.value=e,t.state=2,nt(t,!0))},ct=function(t,e,n){if(!t.done){t.done=!0,n&&(t=n);try{if(t.facade===e)throw Y("Promise can't be resolved itself");var r=et(e);r?S((function(){var n={done:!1};try{r.call(e,st(ct,n,t),st(ut,n,t))}catch(e){ut(n,e,t)}})):(t.value=e,t.state=1,nt(t,!1))}catch(e){ut({done:!1},e,t)}}};if(Q&&(U=($=function(t){_(this,$,F),x(t),r.call(this);var e=N(this);try{t(st(ct,e),st(ut,e))}catch(t){ut(e,t)}}).prototype,(r=function(t){j(this,{type:F,done:!1,notified:!1,parent:!1,reactions:[],rejection:!1,state:0,value:void 0})}).prototype=d(U,{then:function(t,e){var n=X(this),r=H(T(this,$));return r.ok="function"!=typeof t||t,r.fail="function"==typeof e&&e,r.domain=D?G.domain:void 0,n.parent=!0,n.reactions.push(r),0!=n.state&&nt(n,!1),r.promise},catch:function(t){return this.then(void 0,t)}}),i=function(){var t=new r,e=N(t);this.promise=t,this.resolve=st(ct,e),this.reject=st(ut,e)},M.f=H=function(t){return t===$||t===a?new i(t):W(t)},!u&&"function"==typeof f&&B!==Object.prototype)){o=B.then,J||(h(B,"then",(function(t,e){var n=this;return new $((function(t,e){o.call(n,t,e)})).then(t,e)}),{unsafe:!0}),h(B,"catch",U.catch,{unsafe:!0}));try{delete B.constructor}catch(t){}g&&g(B,U)}s({global:!0,wrap:!0,forced:Q},{Promise:$}),p($,F,!1,!0),v(F),a=l(F),s({target:F,stat:!0,forced:Q},{reject:function(t){var e=H(this);return e.reject.call(void 0,t),e.promise}}),s({target:F,stat:!0,forced:u||Q},{resolve:function(t){return k(u&&this===a?$:this,t)}}),s({target:F,stat:!0,forced:tt},{all:function(t){var e=this,n=H(e),r=n.resolve,i=n.reject,a=C((function(){var n=x(e.resolve),a=[],o=0,s=1;b(t,(function(t){var u=o++,c=!1;a.push(void 0),s++,n.call(e,t).then((function(t){c||(c=!0,a[u]=t,--s||r(a))}),i)})),--s||r(a)}));return a.error&&i(a.value),n.promise},race:function(t){var e=this,n=H(e),r=n.reject,i=C((function(){var i=x(e.resolve);b(t,(function(t){i.call(e,t).then(n.resolve,r)}))}));return i.error&&r(i.value),n.promise}})},function(t,e,n){var r=n(3);t.exports=r.Promise},function(t,e,n){var r,i,a,o,s=n(3),u=n(6),c=n(65),l=n(58),f=n(32),h=n(260),d=n(131),g=s.setImmediate,p=s.clearImmediate,v=s.process,y=s.MessageChannel,x=s.Dispatch,_=0,m={},b="onreadystatechange";try{r=s.location}catch(t){}var w=function(t){if(m.hasOwnProperty(t)){var e=m[t];delete m[t],e()}},T=function(t){return function(){w(t)}},A=function(t){w(t.data)},S=function(t){s.postMessage(String(t),r.protocol+"//"+r.host)};g&&p||(g=function(t){for(var e=[],n=arguments.length,r=1;n>r;)e.push(arguments[r++]);return m[++_]=function(){("function"==typeof t?t:Function(t)).apply(void 0,e)},i(_),_},p=function(t){delete m[t]},d?i=function(t){v.nextTick(T(t))}:x&&x.now?i=function(t){x.now(T(t))}:y&&!h?(o=(a=new y).port2,a.port1.onmessage=A,i=c(o.postMessage,o,1)):s.addEventListener&&"function"==typeof postMessage&&!s.importScripts&&r&&"file:"!==r.protocol&&!u(S)?(i=S,s.addEventListener("message",A,!1)):i=b in f("script")?function(t){l.appendChild(f("script")).onreadystatechange=function(){l.removeChild(this),w(t)}}:function(t){setTimeout(T(t),0)}),t.exports={set:g,clear:p}},function(t,e,n){var r=n(21);t.exports=/(?:iphone|ipod|ipad).*applewebkit/i.test(r)},function(t,e,n){var r,i,a,o,s,u,c,l,f=n(3),h=n(4).f,d=n(259).set,g=n(260),p=n(262),v=n(263),y=n(131),x=f.MutationObserver||f.WebKitMutationObserver,_=f.document,m=f.process,b=f.Promise,w=h(f,"queueMicrotask"),T=w&&w.value;T||(r=function(){var t,e;for(y&&(t=m.domain)&&t.exit();i;){e=i.fn,i=i.next;try{e()}catch(t){throw i?o():a=void 0,t}}a=void 0,t&&t.enter()},g||y||v||!x||!_?!p&&b&&b.resolve?((c=b.resolve(void 0)).constructor=b,l=c.then,o=function(){l.call(c,r)}):o=y?function(){m.nextTick(r)}:function(){d.call(f,r)}:(s=!0,u=_.createTextNode(""),new x(r).observe(u,{characterData:!0}),o=function(){u.data=s=!s})),t.exports=T||function(t){var e={fn:t,next:void 0};a&&(a.next=e),i||(i=e,o()),a=e}},function(t,e,n){var r=n(21),i=n(3);t.exports=/iphone|ipod|ipad/i.test(r)&&void 0!==i.Pebble},function(t,e,n){var r=n(21);t.exports=/web0s(?!.*chrome)/i.test(r)},function(t,e,n){var r=n(35),i=n(15),a=n(265);t.exports=function(t,e){if(r(t),i(e)&&e.constructor===t)return e;var n=a.f(t);return(0,n.resolve)(e),n.promise}},function(t,e,n){"use strict";var r=n(66),i=function(t){var e,n;this.promise=new t((function(t,r){if(void 0!==e||void 0!==n)throw TypeError("Bad Promise constructor");e=t,n=r})),this.resolve=r(e),this.reject=r(n)};t.exports.f=function(t){return new i(t)}},function(t,e,n){var r=n(3);t.exports=function(t,e){var n=r.console;n&&n.error&&(1===arguments.length?n.error(t):n.error(t,e))}},function(t){t.exports=function(t){try{return{error:!1,value:t()}}catch(t){return{error:!0,value:t}}}},function(t){t.exports="object"==typeof window},function(t,e,n){"use strict";var r=n(2),i=n(66),a=n(265),o=n(267),s=n(88);r({target:"Promise",stat:!0},{allSettled:function(t){var e=this,n=a.f(e),r=n.resolve,u=n.reject,c=o((function(){var n=i(e.resolve),a=[],o=0,u=1;s(t,(function(t){var i=o++,s=!1;a.push(void 0),u++,n.call(e,t).then((function(t){s||(s=!0,a[i]={status:"fulfilled",value:t},--u||r(a))}),(function(t){s||(s=!0,a[i]={status:"rejected",reason:t},--u||r(a))}))})),--u||r(a)}));return c.error&&u(c.value),n.promise}})},function(t,e,n){"use strict";var r=n(2),i=n(66),a=n(17),o=n(265),s=n(267),u=n(88),c="No one promise resolved";r({target:"Promise",stat:!0},{any:function(t){var e=this,n=o.f(e),r=n.resolve,l=n.reject,f=s((function(){var n=i(e.resolve),o=[],s=0,f=1,h=!1;u(t,(function(t){var i=s++,u=!1;o.push(void 0),f++,n.call(e,t).then((function(t){u||h||(h=!0,r(t))}),(function(t){u||h||(u=!0,o[i]=t,--f||l(new(a("AggregateError"))(o,c)))}))})),--f||l(new(a("AggregateError"))(o,c))}));return f.error&&l(f.value),n.promise}})},function(t,e,n){"use strict";var r=n(2),i=n(25),a=n(258),o=n(6),s=n(17),u=n(156),c=n(264),l=n(36);if(r({target:"Promise",proto:!0,real:!0,forced:!!a&&o((function(){a.prototype.finally.call({then:function(){}},(function(){}))}))},{finally:function(t){var e=u(this,s("Promise")),n="function"==typeof t;return this.then(n?function(n){return c(e,t()).then((function(){return n}))}:t,n?function(n){return c(e,t()).then((function(){throw n}))}:t)}}),!i&&"function"==typeof a){var f=s("Promise").prototype.finally;a.prototype.finally!==f&&l(a.prototype,"finally",f,{unsafe:!0})}},function(t,e,n){var r=n(2),i=n(17),a=n(66),o=n(35),s=n(6),u=i("Reflect","apply"),c=Function.apply;r({target:"Reflect",stat:!0,forced:!s((function(){u((function(){}))}))},{apply:function(t,e,n){return a(t),o(n),u?u(t,e,n):c.call(t,e,n)}})},function(t,e,n){var r=n(2),i=n(17),a=n(66),o=n(35),s=n(15),u=n(55),c=n(172),l=n(6),f=i("Reflect","construct"),h=l((function(){function t(){}return!(f((function(){}),[],t)instanceof t)})),d=!l((function(){f((function(){}))})),g=h||d;r({target:"Reflect",stat:!0,forced:g,sham:g},{construct:function(t,e){a(t),o(e);var n=arguments.length<3?t:a(arguments[2]);if(d&&!h)return f(t,e,n);if(t==n){switch(e.length){case 0:return new t;case 1:return new t(e[0]);case 2:return new t(e[0],e[1]);case 3:return new t(e[0],e[1],e[2]);case 4:return new t(e[0],e[1],e[2],e[3])}var r=[null];return r.push.apply(r,e),new(c.apply(t,r))}var i=n.prototype,l=u(s(i)?i:Object.prototype),g=Function.apply.call(t,l,e);return s(g)?g:l}})},function(t,e,n){var r=n(2),i=n(5),a=n(35),o=n(13),s=n(34);r({target:"Reflect",stat:!0,forced:n(6)((function(){Reflect.defineProperty(s.f({},1,{value:1}),1,{value:2})})),sham:!i},{defineProperty:function(t,e,n){a(t);var r=o(e);a(n);try{return s.f(t,r,n),!0}catch(t){return!1}}})},function(t,e,n){var r=n(2),i=n(35),a=n(4).f;r({target:"Reflect",stat:!0},{deleteProperty:function(t,e){var n=a(i(t),e);return!(n&&!n.configurable)&&delete t[e]}})},function(t,e,n){var r=n(2),i=n(15),a=n(35),o=n(28),s=n(4),u=n(84);r({target:"Reflect",stat:!0},{get:function t(e,n){var r,c,l=arguments.length<3?e:arguments[2];return a(e)===l?e[n]:(r=s.f(e,n))?o(r,"value")?r.value:void 0===r.get?void 0:r.get.call(l):i(c=u(e))?t(c,n,l):void 0}})},function(t,e,n){var r=n(2),i=n(5),a=n(35),o=n(4);r({target:"Reflect",stat:!0,sham:!i},{getOwnPropertyDescriptor:function(t,e){return o.f(a(t),e)}})},function(t,e,n){var r=n(2),i=n(35),a=n(84);r({target:"Reflect",stat:!0,sham:!n(85)},{getPrototypeOf:function(t){return a(i(t))}})},function(t,e,n){n(2)({target:"Reflect",stat:!0},{has:function(t,e){return e in t}})},function(t,e,n){var r=n(2),i=n(35),a=Object.isExtensible;r({target:"Reflect",stat:!0},{isExtensible:function(t){return i(t),!a||a(t)}})},function(t,e,n){n(2)({target:"Reflect",stat:!0},{ownKeys:n(43)})},function(t,e,n){var r=n(2),i=n(17),a=n(35);r({target:"Reflect",stat:!0,sham:!n(181)},{preventExtensions:function(t){a(t);try{var e=i("Object","preventExtensions");return e&&e(t),!0}catch(t){return!1}}})},function(t,e,n){var r=n(2),i=n(35),a=n(15),o=n(28),s=n(6),u=n(34),c=n(4),l=n(84),f=n(8);r({target:"Reflect",stat:!0,forced:s((function(){var t=function(){},e=u.f(new t,"a",{configurable:!0});return!1!==Reflect.set(t.prototype,"a",1,e)}))},{set:function t(e,n,r){var s,h,d=arguments.length<4?e:arguments[3],g=c.f(i(e),n);if(!g){if(a(h=l(e)))return t(h,n,r,d);g=f(0)}if(o(g,"value")){if(!1===g.writable||!a(d))return!1;if(s=c.f(d,n)){if(s.get||s.set||!1===s.writable)return!1;s.value=r,u.f(d,n,s)}else u.f(d,n,f(0,r));return!0}return void 0!==g.set&&(g.set.call(d,r),!0)}})},function(t,e,n){var r=n(2),i=n(35),a=n(87),o=n(86);o&&r({target:"Reflect",stat:!0},{setPrototypeOf:function(t,e){i(t),a(e);try{return o(t,e),!0}catch(t){return!1}}})},function(t,e,n){var r=n(2),i=n(3),a=n(63);r({global:!0},{Reflect:{}}),a(i.Reflect,"Reflect",!0)},function(t,e,n){var r=n(5),i=n(3),a=n(52),o=n(182),s=n(33),u=n(34).f,c=n(44).f,l=n(287),f=n(54),h=n(288),d=n(289),g=n(36),p=n(6),v=n(28),y=n(38).enforce,x=n(142),_=n(23),m=n(290),b=n(291),w=_("match"),T=i.RegExp,A=T.prototype,S=/^\?<[^\s\d!#%&*+<=>@^][^\s!#%&*+<=>@^]*>/,k=/a/g,E=/a/g,M=new T(k)!==k,C=d.UNSUPPORTED_Y,O=r&&(!M||C||m||b||p((function(){return E[w]=!1,T(k)!=k||T(E)==E||"/a/i"!=T(k,"i")})));if(a("RegExp",O)){for(var R=function(t,e){var n,r,i,a,u,c,d=this instanceof R,g=l(t),p=void 0===e,x=[],_=t;if(!d&&g&&p&&t.constructor===R)return t;if((g||t instanceof R)&&(t=t.source,p&&(e="flags"in _?_.flags:h.call(_))),t=void 0===t?"":f(t),e=void 0===e?"":f(e),_=t,m&&"dotAll"in k&&(r=!!e&&e.indexOf("s")>-1)&&(e=e.replace(/s/g,"")),n=e,C&&"sticky"in k&&(i=!!e&&e.indexOf("y")>-1)&&(e=e.replace(/y/g,"")),b&&(t=(a=function(t){for(var e,n=t.length,r=0,i="",a=[],o={},s=!1,u=!1,c=0,l="";r<=n;r++){if("\\"===(e=t.charAt(r)))e+=t.charAt(++r);else if("]"===e)s=!1;else if(!s)switch(!0){case"["===e:s=!0;break;case"("===e:S.test(t.slice(r+1))&&(r+=2,u=!0),i+=e,c++;continue;case">"===e&&u:if(""===l||v(o,l))throw new SyntaxError("Invalid capture group name");o[l]=!0,a.push([l,c]),u=!1,l="";continue}u?l+=e:i+=e}return[i,a]}(t))[0],x=a[1]),u=o(T(t,e),d?this:A,R),(r||i||x.length)&&(c=y(u),r&&(c.dotAll=!0,c.raw=R(function(t){for(var e,n=t.length,r=0,i="",a=!1;r<=n;r++)"\\"!==(e=t.charAt(r))?a||"."!==e?("["===e?a=!0:"]"===e&&(a=!1),i+=e):i+="[\\s\\S]":i+=e+t.charAt(++r);return i}(t),n)),i&&(c.sticky=!0),x.length&&(c.groups=x)),t!==_)try{s(u,"source",""===_?"(?:)":_)}catch(t){}return u},L=function(t){t in R||u(R,t,{configurable:!0,get:function(){return T[t]},set:function(e){T[t]=e}})},I=c(T),D=0;I.length>D;)L(I[D++]);A.constructor=R,R.prototype=A,g(i,"RegExp",R)}x("RegExp")},function(t,e,n){var r=n(15),i=n(11),a=n(23)("match");t.exports=function(t){var e;return r(t)&&(void 0!==(e=t[a])?!!e:"RegExp"==i(t))}},function(t,e,n){"use strict";var r=n(35);t.exports=function(){var t=r(this),e="";return t.global&&(e+="g"),t.ignoreCase&&(e+="i"),t.multiline&&(e+="m"),t.dotAll&&(e+="s"),t.unicode&&(e+="u"),t.sticky&&(e+="y"),e}},function(t,e,n){var r=n(6),i=function(t,e){return RegExp(t,e)};e.UNSUPPORTED_Y=r((function(){var t=i("a","y");return t.lastIndex=2,null!=t.exec("abcd")})),e.BROKEN_CARET=r((function(){var t=i("^r","gy");return t.lastIndex=2,null!=t.exec("str")}))},function(t,e,n){var r=n(6);t.exports=r((function(){var t=RegExp(".","string".charAt(0));return!(t.dotAll&&t.exec("\n")&&"s"===t.flags)}))},function(t,e,n){var r=n(6);t.exports=r((function(){var t=RegExp("(?<a>b)","string".charAt(5));return"b"!==t.exec("b").groups.a||"bc"!=="b".replace(t,"$<a>c")}))},function(t,e,n){var r=n(5),i=n(290),a=n(34).f,o=n(38).get,s=RegExp.prototype;r&&i&&a(s,"dotAll",{configurable:!0,get:function(){if(this!==s){if(this instanceof RegExp)return!!o(this).dotAll;throw TypeError("Incompatible receiver, RegExp required")}}})},function(t,e,n){"use strict";var r=n(2),i=n(294);r({target:"RegExp",proto:!0,forced:/./.exec!==i},{exec:i})},function(t,e,n){"use strict";var r,i,a=n(54),o=n(288),s=n(289),u=n(24),c=n(55),l=n(38).get,f=n(290),h=n(291),d=RegExp.prototype.exec,g=u("native-string-replace",String.prototype.replace),p=d,v=(r=/a/,i=/b*/g,d.call(r,"a"),d.call(i,"a"),0!==r.lastIndex||0!==i.lastIndex),y=s.UNSUPPORTED_Y||s.BROKEN_CARET,x=void 0!==/()??/.exec("")[1];(v||x||y||f||h)&&(p=function(t){var e,n,r,i,s,u,f,h=this,_=l(h),m=a(t),b=_.raw;if(b)return b.lastIndex=h.lastIndex,e=p.call(b,m),h.lastIndex=b.lastIndex,e;var w=_.groups,T=y&&h.sticky,A=o.call(h),S=h.source,k=0,E=m;if(T&&(-1===(A=A.replace("y","")).indexOf("g")&&(A+="g"),E=m.slice(h.lastIndex),h.lastIndex>0&&(!h.multiline||h.multiline&&"\n"!==m.charAt(h.lastIndex-1))&&(S="(?: "+S+")",E=" "+E,k++),n=new RegExp("^(?:"+S+")",A)),x&&(n=new RegExp("^"+S+"$(?!\\s)",A)),v&&(r=h.lastIndex),i=d.call(T?n:h,E),T?i?(i.input=i.input.slice(k),i[0]=i[0].slice(k),i.index=h.lastIndex,h.lastIndex+=i[0].length):h.lastIndex=0:v&&i&&(h.lastIndex=h.global?i.index+i[0].length:r),x&&i&&i.length>1&&g.call(i[0],n,(function(){for(s=1;s<arguments.length-2;s++)void 0===arguments[s]&&(i[s]=void 0)})),i&&w)for(i.groups=u=c(null),s=0;s<w.length;s++)u[(f=w[s])[0]]=i[f[1]];return i}),t.exports=p},function(t,e,n){var r=n(5),i=n(34),a=n(288),o=n(6);r&&o((function(){return"sy"!==Object.getOwnPropertyDescriptor(RegExp.prototype,"flags").get.call({dotAll:!0,sticky:!0})}))&&i.f(RegExp.prototype,"flags",{configurable:!0,get:a})},function(t,e,n){var r=n(5),i=n(289).UNSUPPORTED_Y,a=n(34).f,o=n(38).get,s=RegExp.prototype;r&&i&&a(s,"sticky",{configurable:!0,get:function(){if(this!==s){if(this instanceof RegExp)return!!o(this).sticky;throw TypeError("Incompatible receiver, RegExp required")}}})},function(t,e,n){"use strict";n(293);var r,i,a=n(2),o=n(15),s=(r=!1,(i=/[ac]/).exec=function(){return r=!0,/./.exec.apply(this,arguments)},!0===i.test("abc")&&r),u=/./.test;a({target:"RegExp",proto:!0,forced:!s},{test:function(t){if("function"!=typeof this.exec)return u.call(this,t);var e=this.exec(t);if(null!==e&&!o(e))throw new Error("RegExp exec method returned something other than an Object or null");return!!e}})},function(t,e,n){"use strict";var r=n(36),i=n(35),a=n(54),o=n(6),s=n(288),u="toString",c=RegExp.prototype,l=c.toString,f=o((function(){return"/a/b"!=l.call({source:"a",flags:"b"})})),h=l.name!=u;(f||h)&&r(RegExp.prototype,u,(function(){var t=i(this),e=a(t.source),n=t.flags;return"/"+e+"/"+a(void 0===n&&t instanceof RegExp&&!("flags"in c)?s.call(t):n)}),{unsafe:!0})},function(t,e,n){"use strict";var r=n(179),i=n(183);t.exports=r("Set",(function(t){return function(){return t(this,arguments.length?arguments[0]:void 0)}}),i)},function(t,e,n){"use strict";var r=n(2),i=n(301).codeAt;r({target:"String",proto:!0},{codePointAt:function(t){return i(this,t)}})},function(t,e,n){var r=n(48),i=n(54),a=n(12),o=function(t){return function(e,n){var o,s,u=i(a(e)),c=r(n),l=u.length;return c<0||c>=l?t?"":void 0:(o=u.charCodeAt(c))<55296||o>56319||c+1===l||(s=u.charCodeAt(c+1))<56320||s>57343?t?u.charAt(c):o:t?u.slice(c,c+2):s-56320+(o-55296<<10)+65536}};t.exports={codeAt:o(!1),charAt:o(!0)}},function(t,e,n){"use strict";var r,i=n(2),a=n(4).f,o=n(47),s=n(54),u=n(303),c=n(12),l=n(304),f=n(25),h="".endsWith,d=Math.min,g=l("endsWith");i({target:"String",proto:!0,forced:!!(f||g||(r=a(String.prototype,"endsWith"),!r||r.writable))&&!g},{endsWith:function(t){var e=s(c(this));u(t);var n=arguments.length>1?arguments[1]:void 0,r=o(e.length),i=void 0===n?r:d(o(n),r),a=s(t);return h?h.call(e,a,i):e.slice(i-a.length,i)===a}})},function(t,e,n){var r=n(287);t.exports=function(t){if(r(t))throw TypeError("The method doesn't accept regular expressions");return t}},function(t,e,n){var r=n(23)("match");t.exports=function(t){var e=/./;try{"/./"[t](e)}catch(n){try{return e[r]=!1,"/./"[t](e)}catch(t){}}return!1}},function(t,e,n){var r=n(2),i=n(49),a=String.fromCharCode,o=String.fromCodePoint;r({target:"String",stat:!0,forced:!!o&&1!=o.length},{fromCodePoint:function(t){for(var e,n=[],r=arguments.length,o=0;r>o;){if(e=+arguments[o++],i(e,1114111)!==e)throw RangeError(e+" is not a valid code point");n.push(e<65536?a(e):a(55296+((e-=65536)>>10),e%1024+56320))}return n.join("")}})},function(t,e,n){"use strict";var r=n(2),i=n(303),a=n(12),o=n(54);r({target:"String",proto:!0,forced:!n(304)("includes")},{includes:function(t){return!!~o(a(this)).indexOf(o(i(t)),arguments.length>1?arguments[1]:void 0)}})},function(t,e,n){"use strict";var r=n(301).charAt,i=n(54),a=n(38),o=n(121),s="String Iterator",u=a.set,c=a.getterFor(s);o(String,"String",(function(t){u(this,{type:s,string:i(t),index:0})}),(function(){var t,e=c(this),n=e.string,i=e.index;return i>=n.length?{value:void 0,done:!0}:(t=r(n,i),e.index+=t.length,{value:t,done:!1})}))},function(t,e,n){"use strict";var r=n(309),i=n(35),a=n(47),o=n(54),s=n(12),u=n(310),c=n(311);r("match",(function(t,e,n){return[function(e){var n=s(this),r=null==e?void 0:e[t];return void 0!==r?r.call(e,n):new RegExp(e)[t](o(n))},function(t){var r=i(this),s=o(t),l=n(e,r,s);if(l.done)return l.value;if(!r.global)return c(r,s);var f=r.unicode;r.lastIndex=0;for(var h,d=[],g=0;null!==(h=c(r,s));){var p=o(h[0]);d[g]=p,""===p&&(r.lastIndex=u(s,a(r.lastIndex),f)),g++}return 0===g?null:d}]}))},function(t,e,n){"use strict";n(293);var r=n(36),i=n(294),a=n(6),o=n(23),s=n(33),u=o("species"),c=RegExp.prototype;t.exports=function(t,e,n,l){var f=o(t),h=!a((function(){var e={};return e[f]=function(){return 7},7!=""[t](e)})),d=h&&!a((function(){var e=!1,n=/a/;return"split"===t&&((n={}).constructor={},n.constructor[u]=function(){return n},n.flags="",n[f]=/./[f]),n.exec=function(){return e=!0,null},n[f](""),!e}));if(!h||!d||n){var g=/./[f],p=e(f,""[t],(function(t,e,n,r,a){var o=e.exec;return o===i||o===c.exec?h&&!a?{done:!0,value:g.call(e,n,r)}:{done:!0,value:t.call(n,e,r)}:{done:!1}}));r(String.prototype,t,p[0]),r(c,f,p[1])}l&&s(c[f],"sham",!0)}},function(t,e,n){"use strict";var r=n(301).charAt;t.exports=function(t,e,n){return e+(n?r(t,e).length:1)}},function(t,e,n){var r=n(11),i=n(294);t.exports=function(t,e){var n=t.exec;if("function"==typeof n){var a=n.call(t,e);if("object"!=typeof a)throw TypeError("RegExp exec method returned something other than an Object or null");return a}if("RegExp"!==r(t))throw TypeError("RegExp#exec called on incompatible receiver");return i.call(t,e)}},function(t,e,n){"use strict";var r=n(2),i=n(122),a=n(12),o=n(47),s=n(54),u=n(66),c=n(35),l=n(11),f=n(287),h=n(288),d=n(33),g=n(6),p=n(23),v=n(156),y=n(310),x=n(38),_=n(25),m=p("matchAll"),b="RegExp String",w="RegExp String Iterator",T=x.set,A=x.getterFor(w),S=RegExp.prototype,k=S.exec,E="".matchAll,M=!!E&&!g((function(){"a".matchAll(/./)})),C=i((function(t,e,n,r){T(this,{type:w,regexp:t,string:e,global:n,unicode:r,done:!1})}),b,(function(){var t=A(this);if(t.done)return{value:void 0,done:!0};var e=t.regexp,n=t.string,r=function(t,e){var n,r=t.exec;if("function"==typeof r){if("object"!=typeof(n=r.call(t,e)))throw TypeError("Incorrect exec result");return n}return k.call(t,e)}(e,n);return null===r?{value:void 0,done:t.done=!0}:t.global?(""===s(r[0])&&(e.lastIndex=y(n,o(e.lastIndex),t.unicode)),{value:r,done:!1}):(t.done=!0,{value:r,done:!1})})),O=function(t){var e,n,r,i,a,u,l=c(this),f=s(t);return e=v(l,RegExp),void 0===(n=l.flags)&&l instanceof RegExp&&!("flags"in S)&&(n=h.call(l)),r=void 0===n?"":s(n),i=new e(e===RegExp?l.source:l,r),a=!!~r.indexOf("g"),u=!!~r.indexOf("u"),i.lastIndex=o(l.lastIndex),new C(i,f,a,u)};r({target:"String",proto:!0,forced:M},{matchAll:function(t){var e,n,r,i=a(this);if(null!=t){if(f(t)&&!~s(a("flags"in S?t.flags:h.call(t))).indexOf("g"))throw TypeError("`.matchAll` does not allow non-global regexes");if(M)return E.apply(i,arguments);if(void 0===(n=t[m])&&_&&"RegExp"==l(t)&&(n=O),null!=n)return u(n).call(t,i)}else if(M)return E.apply(i,arguments);return e=s(i),r=new RegExp(t,"g"),_?O.call(r,e):r[m](e)}}),_||m in S||d(S,m,O)},function(t,e,n){"use strict";var r=n(2),i=n(164).end;r({target:"String",proto:!0,forced:n(314)},{padEnd:function(t){return i(this,t,arguments.length>1?arguments[1]:void 0)}})},function(t,e,n){var r=n(21);t.exports=/Version\/10(?:\.\d+){1,2}(?: [\w./]+)?(?: Mobile\/\w+)? Safari\//.test(r)},function(t,e,n){"use strict";var r=n(2),i=n(164).start;r({target:"String",proto:!0,forced:n(314)},{padStart:function(t){return i(this,t,arguments.length>1?arguments[1]:void 0)}})},function(t,e,n){var r=n(2),i=n(9),a=n(47),o=n(54);r({target:"String",stat:!0},{raw:function(t){for(var e=i(t.raw),n=a(e.length),r=arguments.length,s=[],u=0;n>u;)s.push(o(e[u++])),u<r&&s.push(o(arguments[u]));return s.join("")}})},function(t,e,n){n(2)({target:"String",proto:!0},{repeat:n(165)})},function(t,e,n){"use strict";var r=n(309),i=n(6),a=n(35),o=n(48),s=n(47),u=n(54),c=n(12),l=n(310),f=n(319),h=n(311),d=n(23)("replace"),g=Math.max,p=Math.min,v="$0"==="a".replace(/./,"$0"),y=!!/./[d]&&""===/./[d]("a","$0");r("replace",(function(t,e,n){var r=y?"$":"$0";return[function(t,n){var r=c(this),i=null==t?void 0:t[d];return void 0!==i?i.call(t,r,n):e.call(u(r),t,n)},function(t,i){var c=a(this),d=u(t);if("string"==typeof i&&-1===i.indexOf(r)&&-1===i.indexOf("$<")){var v=n(e,c,d,i);if(v.done)return v.value}var y="function"==typeof i;y||(i=u(i));var x=c.global;if(x){var _=c.unicode;c.lastIndex=0}for(var m=[];;){var b=h(c,d);if(null===b)break;if(m.push(b),!x)break;""===u(b[0])&&(c.lastIndex=l(d,s(c.lastIndex),_))}for(var w,T="",A=0,S=0;S<m.length;S++){b=m[S];for(var k=u(b[0]),E=g(p(o(b.index),d.length),0),M=[],C=1;C<b.length;C++)M.push(void 0===(w=b[C])?w:String(w));var O=b.groups;if(y){var R=[k].concat(M,E,d);void 0!==O&&R.push(O);var L=u(i.apply(void 0,R))}else L=f(k,d,E,M,O,i);E>=A&&(T+=d.slice(A,E)+L,A=E+k.length)}return T+d.slice(A)}]}),!!i((function(){var t=/./;return t.exec=function(){var t=[];return t.groups={a:"7"},t},"7"!=="".replace(t,"$<a>")}))||!v||y)},function(t,e,n){var r=n(29),i=Math.floor,a="".replace,o=/\$([$&'`]|\d{1,2}|<[^>]*>)/g,s=/\$([$&'`]|\d{1,2})/g;t.exports=function(t,e,n,u,c,l){var f=n+t.length,h=u.length,d=s;return void 0!==c&&(c=r(c),d=o),a.call(l,d,(function(r,a){var o;switch(a.charAt(0)){case"$":return"$";case"&":return t;case"`":return e.slice(0,n);case"'":return e.slice(f);case"<":o=c[a.slice(1,-1)];break;default:var s=+a;if(0===s)return r;if(s>h){var l=i(s/10);return 0===l?r:l<=h?void 0===u[l-1]?a.charAt(1):u[l-1]+a.charAt(1):r}o=u[s-1]}return void 0===o?"":o}))}},function(t,e,n){"use strict";var r=n(2),i=n(12),a=n(287),o=n(54),s=n(288),u=n(319),c=n(23),l=n(25),f=c("replace"),h=RegExp.prototype,d=Math.max,g=function(t,e,n){return n>t.length?-1:""===e?n:t.indexOf(e,n)};r({target:"String",proto:!0},{replaceAll:function(t,e){var n,r,c,p,v,y,x,_,m=i(this),b=0,w=0,T="";if(null!=t){if((n=a(t))&&!~o(i("flags"in h?t.flags:s.call(t))).indexOf("g"))throw TypeError("`.replaceAll` does not allow non-global regexes");if(void 0!==(r=t[f]))return r.call(t,m,e);if(l&&n)return o(m).replace(t,e)}for(c=o(m),p=o(t),(v="function"==typeof e)||(e=o(e)),y=p.length,x=d(1,y),b=g(c,p,0);-1!==b;)_=v?o(e(p,b,c)):u(p,c,b,[],void 0,e),T+=c.slice(w,b)+_,w=b+y,b=g(c,p,b+x);return w<c.length&&(T+=c.slice(w)),T}})},function(t,e,n){"use strict";var r=n(309),i=n(35),a=n(12),o=n(242),s=n(54),u=n(311);r("search",(function(t,e,n){return[function(e){var n=a(this),r=null==e?void 0:e[t];return void 0!==r?r.call(e,n):new RegExp(e)[t](s(n))},function(t){var r=i(this),a=s(t),c=n(e,r,a);if(c.done)return c.value;var l=r.lastIndex;o(l,0)||(r.lastIndex=0);var f=u(r,a);return o(r.lastIndex,l)||(r.lastIndex=l),null===f?-1:f.index}]}))},function(t,e,n){"use strict";var r=n(309),i=n(287),a=n(35),o=n(12),s=n(156),u=n(310),c=n(47),l=n(54),f=n(311),h=n(294),d=n(289),g=n(6),p=d.UNSUPPORTED_Y,v=[].push,y=Math.min,x=4294967295;r("split",(function(t,e,n){var r;return r="c"=="abbc".split(/(b)*/)[1]||4!="test".split(/(?:)/,-1).length||2!="ab".split(/(?:ab)*/).length||4!=".".split(/(.?)(.?)/).length||".".split(/()()/).length>1||"".split(/.?/).length?function(t,n){var r=l(o(this)),a=void 0===n?x:n>>>0;if(0===a)return[];if(void 0===t)return[r];if(!i(t))return e.call(r,t,a);for(var s,u,c,f=[],d=(t.ignoreCase?"i":"")+(t.multiline?"m":"")+(t.unicode?"u":"")+(t.sticky?"y":""),g=0,p=new RegExp(t.source,d+"g");(s=h.call(p,r))&&!((u=p.lastIndex)>g&&(f.push(r.slice(g,s.index)),s.length>1&&s.index<r.length&&v.apply(f,s.slice(1)),c=s[0].length,g=u,f.length>=a));)p.lastIndex===s.index&&p.lastIndex++;return g===r.length?!c&&p.test("")||f.push(""):f.push(r.slice(g)),f.length>a?f.slice(0,a):f}:"0".split(void 0,0).length?function(t,n){return void 0===t&&0===n?[]:e.call(this,t,n)}:e,[function(e,n){var i=o(this),a=null==e?void 0:e[t];return void 0!==a?a.call(e,i,n):r.call(l(i),e,n)},function(t,i){var o=a(this),h=l(t),d=n(r,o,h,i,r!==e);if(d.done)return d.value;var g=s(o,RegExp),v=o.unicode,_=(o.ignoreCase?"i":"")+(o.multiline?"m":"")+(o.unicode?"u":"")+(p?"g":"y"),m=new g(p?"^(?:"+o.source+")":o,_),b=void 0===i?x:i>>>0;if(0===b)return[];if(0===h.length)return null===f(m,h)?[h]:[];for(var w=0,T=0,A=[];T<h.length;){m.lastIndex=p?0:T;var S,k=f(m,p?h.slice(T):h);if(null===k||(S=y(c(m.lastIndex+(p?T:0)),h.length))===w)T=u(h,T,v);else{if(A.push(h.slice(w,T)),A.length===b)return A;for(var E=1;E<=k.length-1;E++)if(A.push(k[E]),A.length===b)return A;T=w=S}}return A.push(h.slice(w)),A}]}),!!g((function(){var t=/(?:)/,e=t.exec;t.exec=function(){return e.apply(this,arguments)};var n="ab".split(t);return 2!==n.length||"a"!==n[0]||"b"!==n[1]})),p)},function(t,e,n){"use strict";var r,i=n(2),a=n(4).f,o=n(47),s=n(54),u=n(303),c=n(12),l=n(304),f=n(25),h="".startsWith,d=Math.min,g=l("startsWith");i({target:"String",proto:!0,forced:!!(f||g||(r=a(String.prototype,"startsWith"),!r||r.writable))&&!g},{startsWith:function(t){var e=s(c(this));u(t);var n=o(d(arguments.length>1?arguments[1]:void 0,e.length)),r=s(t);return h?h.call(e,r,n):e.slice(n,n+r.length)===r}})},function(t,e,n){"use strict";var r=n(2),i=n(12),a=n(48),o=n(54),s="".slice,u=Math.max,c=Math.min;r({target:"String",proto:!0},{substr:function(t,e){var n,r,l=o(i(this)),f=l.length,h=a(t);return h===1/0&&(h=0),h<0&&(h=u(f+h,0)),(n=void 0===e?f:a(e))<=0||n===1/0||h>=(r=c(h+n,f))?"":s.call(l,h,r)}})},function(t,e,n){"use strict";var r=n(2),i=n(207).trim;r({target:"String",proto:!0,forced:n(326)("trim")},{trim:function(){return i(this)}})},function(t,e,n){var r=n(6),i=n(208);t.exports=function(t){return r((function(){return!!i[t]()||"​᠎"!="​᠎"[t]()||i[t].name!==t}))}},function(t,e,n){"use strict";var r=n(2),i=n(207).end,a=n(326)("trimEnd"),o=a?function(){return i(this)}:"".trimEnd;r({target:"String",proto:!0,forced:a},{trimEnd:o,trimRight:o})},function(t,e,n){"use strict";var r=n(2),i=n(207).start,a=n(326)("trimStart"),o=a?function(){return i(this)}:"".trimStart;r({target:"String",proto:!0,forced:a},{trimStart:o,trimLeft:o})},function(t,e,n){"use strict";var r=n(2),i=n(330);r({target:"String",proto:!0,forced:n(331)("anchor")},{anchor:function(t){return i(this,"a","name",t)}})},function(t,e,n){var r=n(12),i=n(54),a=/"/g;t.exports=function(t,e,n,o){var s=i(r(t)),u="<"+e;return""!==n&&(u+=" "+n+'="'+i(o).replace(a,"&quot;")+'"'),u+">"+s+"</"+e+">"}},function(t,e,n){var r=n(6);t.exports=function(t){return r((function(){var e=""[t]('"');return e!==e.toLowerCase()||e.split('"').length>3}))}},function(t,e,n){"use strict";var r=n(2),i=n(330);r({target:"String",proto:!0,forced:n(331)("big")},{big:function(){return i(this,"big","","")}})},function(t,e,n){"use strict";var r=n(2),i=n(330);r({target:"String",proto:!0,forced:n(331)("blink")},{blink:function(){return i(this,"blink","","")}})},function(t,e,n){"use strict";var r=n(2),i=n(330);r({target:"String",proto:!0,forced:n(331)("bold")},{bold:function(){return i(this,"b","","")}})},function(t,e,n){"use strict";var r=n(2),i=n(330);r({target:"String",proto:!0,forced:n(331)("fixed")},{fixed:function(){return i(this,"tt","","")}})},function(t,e,n){"use strict";var r=n(2),i=n(330);r({target:"String",proto:!0,forced:n(331)("fontcolor")},{fontcolor:function(t){return i(this,"font","color",t)}})},function(t,e,n){"use strict";var r=n(2),i=n(330);r({target:"String",proto:!0,forced:n(331)("fontsize")},{fontsize:function(t){return i(this,"font","size",t)}})},function(t,e,n){"use strict";var r=n(2),i=n(330);r({target:"String",proto:!0,forced:n(331)("italics")},{italics:function(){return i(this,"i","","")}})},function(t,e,n){"use strict";var r=n(2),i=n(330);r({target:"String",proto:!0,forced:n(331)("link")},{link:function(t){return i(this,"a","href",t)}})},function(t,e,n){"use strict";var r=n(2),i=n(330);r({target:"String",proto:!0,forced:n(331)("small")},{small:function(){return i(this,"small","","")}})},function(t,e,n){"use strict";var r=n(2),i=n(330);r({target:"String",proto:!0,forced:n(331)("strike")},{strike:function(){return i(this,"strike","","")}})},function(t,e,n){"use strict";var r=n(2),i=n(330);r({target:"String",proto:!0,forced:n(331)("sub")},{sub:function(){return i(this,"sub","","")}})},function(t,e,n){"use strict";var r=n(2),i=n(330);r({target:"String",proto:!0,forced:n(331)("sup")},{sup:function(){return i(this,"sup","","")}})},function(t,e,n){n(345)("Float32",(function(t){return function(e,n,r){return t(this,e,n,r)}}))},function(t,e,n){"use strict";var r=n(2),i=n(3),a=n(5),o=n(346),s=n(154),u=n(147),c=n(150),l=n(8),f=n(33),h=n(213),d=n(47),g=n(151),p=n(347),v=n(13),y=n(28),x=n(92),_=n(15),m=n(16),b=n(55),w=n(86),T=n(44).f,A=n(349),S=n(64).forEach,k=n(142),E=n(34),M=n(4),C=n(38),O=n(182),R=C.get,L=C.set,I=E.f,D=M.f,P=Math.round,z=i.RangeError,F=u.ArrayBuffer,N=u.DataView,j=s.NATIVE_ARRAY_BUFFER_VIEWS,X=s.TYPED_ARRAY_CONSTRUCTOR,B=s.TYPED_ARRAY_TAG,$=s.TypedArray,U=s.TypedArrayPrototype,Y=s.aTypedArrayConstructor,V=s.isTypedArray,G="BYTES_PER_ELEMENT",H="Wrong length",W=function(t,e){for(var n=0,r=e.length,i=new(Y(t))(r);r>n;)i[n]=e[n++];return i},q=function(t,e){I(t,e,{get:function(){return R(this)[e]}})},Z=function(t){var e;return t instanceof F||"ArrayBuffer"==(e=x(t))||"SharedArrayBuffer"==e},K=function(t,e){return V(t)&&!m(e)&&e in t&&h(+e)&&e>=0},J=function(t,e){return e=v(e),K(t,e)?l(2,t[e]):D(t,e)},Q=function(t,e,n){return e=v(e),!(K(t,e)&&_(n)&&y(n,"value"))||y(n,"get")||y(n,"set")||n.configurable||y(n,"writable")&&!n.writable||y(n,"enumerable")&&!n.enumerable?I(t,e,n):(t[e]=n.value,t)};a?(j||(M.f=J,E.f=Q,q(U,"buffer"),q(U,"byteOffset"),q(U,"byteLength"),q(U,"length")),r({target:"Object",stat:!0,forced:!j},{getOwnPropertyDescriptor:J,defineProperty:Q}),t.exports=function(t,e,n){var a=t.match(/\d+$/)[0]/8,s=t+(n?"Clamped":"")+"Array",u="get"+t,l="set"+t,h=i[s],v=h,y=v&&v.prototype,x={},m=function(t,e){I(t,e,{get:function(){return function(t,e){var n=R(t);return n.view[u](e*a+n.byteOffset,!0)}(this,e)},set:function(t){return function(t,e,r){var i=R(t);n&&(r=(r=P(r))<0?0:r>255?255:255&r),i.view[l](e*a+i.byteOffset,r,!0)}(this,e,t)},enumerable:!0})};j?o&&(v=e((function(t,e,n,r){return c(t,v,s),O(_(e)?Z(e)?void 0!==r?new h(e,p(n,a),r):void 0!==n?new h(e,p(n,a)):new h(e):V(e)?W(v,e):A.call(v,e):new h(g(e)),t,v)})),w&&w(v,$),S(T(h),(function(t){t in v||f(v,t,h[t])})),v.prototype=y):(v=e((function(t,e,n,r){c(t,v,s);var i,o,u,l=0,f=0;if(_(e)){if(!Z(e))return V(e)?W(v,e):A.call(v,e);i=e,f=p(n,a);var h=e.byteLength;if(void 0===r){if(h%a)throw z(H);if((o=h-f)<0)throw z(H)}else if((o=d(r)*a)+f>h)throw z(H);u=o/a}else u=g(e),i=new F(o=u*a);for(L(t,{buffer:i,byteOffset:f,byteLength:o,length:u,view:new N(i)});l<u;)m(t,l++)})),w&&w(v,$),y=v.prototype=b(U)),y.constructor!==v&&f(y,"constructor",v),f(y,X,v),B&&f(y,B,s),x[s]=v,r({global:!0,forced:v!=h,sham:!j},x),G in v||f(v,G,a),G in y||f(y,G,a),k(s)}):t.exports=function(){}},function(t,e,n){var r=n(3),i=n(6),a=n(116),o=n(154).NATIVE_ARRAY_BUFFER_VIEWS,s=r.ArrayBuffer,u=r.Int8Array;t.exports=!o||!i((function(){u(1)}))||!i((function(){new u(-1)}))||!a((function(t){new u,new u(null),new u(1.5),new u(t)}),!0)||i((function(){return 1!==new u(new s(2),1,void 0).length}))},function(t,e,n){var r=n(348);t.exports=function(t,e){var n=r(t);if(n%e)throw RangeError("Wrong offset");return n}},function(t,e,n){var r=n(48);t.exports=function(t){var e=r(t);if(e<0)throw RangeError("The argument can't be less than 0");return e}},function(t,e,n){var r=n(29),i=n(47),a=n(91),o=n(89),s=n(65),u=n(154).aTypedArrayConstructor;t.exports=function(t){var e,n,c,l,f,h,d=r(t),g=arguments.length,p=g>1?arguments[1]:void 0,v=void 0!==p,y=a(d);if(null!=y&&!o(y))for(h=(f=y.call(d)).next,d=[];!(l=h.call(f)).done;)d.push(l.value);for(v&&g>2&&(p=s(p,arguments[2],2)),n=i(d.length),c=new(u(this))(n),e=0;n>e;e++)c[e]=v?p(d[e],e):d[e];return c}},function(t,e,n){n(345)("Float64",(function(t){return function(e,n,r){return t(this,e,n,r)}}))},function(t,e,n){n(345)("Int8",(function(t){return function(e,n,r){return t(this,e,n,r)}}))},function(t,e,n){n(345)("Int16",(function(t){return function(e,n,r){return t(this,e,n,r)}}))},function(t,e,n){n(345)("Int32",(function(t){return function(e,n,r){return t(this,e,n,r)}}))},function(t,e,n){n(345)("Uint8",(function(t){return function(e,n,r){return t(this,e,n,r)}}))},function(t,e,n){n(345)("Uint8",(function(t){return function(e,n,r){return t(this,e,n,r)}}),!0)},function(t,e,n){n(345)("Uint16",(function(t){return function(e,n,r){return t(this,e,n,r)}}))},function(t,e,n){n(345)("Uint32",(function(t){return function(e,n,r){return t(this,e,n,r)}}))},function(t,e,n){"use strict";var r=n(154),i=n(99),a=r.aTypedArray;(0,r.exportTypedArrayMethod)("copyWithin",(function(t,e){return i.call(a(this),t,e,arguments.length>2?arguments[2]:void 0)}))},function(t,e,n){"use strict";var r=n(154),i=n(64).every,a=r.aTypedArray;(0,r.exportTypedArrayMethod)("every",(function(t){return i(a(this),t,arguments.length>1?arguments[1]:void 0)}))},function(t,e,n){"use strict";var r=n(154),i=n(104),a=r.aTypedArray;(0,r.exportTypedArrayMethod)("fill",(function(t){return i.apply(a(this),arguments)}))},function(t,e,n){"use strict";var r=n(154),i=n(64).filter,a=n(362),o=r.aTypedArray;(0,r.exportTypedArrayMethod)("filter",(function(t){var e=i(o(this),t,arguments.length>1?arguments[1]:void 0);return a(this,e)}))},function(t,e,n){var r=n(363),i=n(364);t.exports=function(t,e){return r(i(t),e)}},function(t){t.exports=function(t,e){for(var n=0,r=e.length,i=new t(r);r>n;)i[n]=e[n++];return i}},function(t,e,n){var r=n(154),i=n(156),a=r.TYPED_ARRAY_CONSTRUCTOR,o=r.aTypedArrayConstructor;t.exports=function(t){return o(i(t,t[a]))}},function(t,e,n){"use strict";var r=n(154),i=n(64).find,a=r.aTypedArray;(0,r.exportTypedArrayMethod)("find",(function(t){return i(a(this),t,arguments.length>1?arguments[1]:void 0)}))},function(t,e,n){"use strict";var r=n(154),i=n(64).findIndex,a=r.aTypedArray;(0,r.exportTypedArrayMethod)("findIndex",(function(t){return i(a(this),t,arguments.length>1?arguments[1]:void 0)}))},function(t,e,n){"use strict";var r=n(154),i=n(64).forEach,a=r.aTypedArray;(0,r.exportTypedArrayMethod)("forEach",(function(t){i(a(this),t,arguments.length>1?arguments[1]:void 0)}))},function(t,e,n){"use strict";var r=n(346);(0,n(154).exportTypedArrayStaticMethod)("from",n(349),r)},function(t,e,n){"use strict";var r=n(154),i=n(46).includes,a=r.aTypedArray;(0,r.exportTypedArrayMethod)("includes",(function(t){return i(a(this),t,arguments.length>1?arguments[1]:void 0)}))},function(t,e,n){"use strict";var r=n(154),i=n(46).indexOf,a=r.aTypedArray;(0,r.exportTypedArrayMethod)("indexOf",(function(t){return i(a(this),t,arguments.length>1?arguments[1]:void 0)}))},function(t,e,n){"use strict";var r=n(3),i=n(154),a=n(120),o=n(23)("iterator"),s=r.Uint8Array,u=a.values,c=a.keys,l=a.entries,f=i.aTypedArray,h=i.exportTypedArrayMethod,d=s&&s.prototype[o],g=!!d&&("values"==d.name||null==d.name),p=function(){return u.call(f(this))};h("entries",(function(){return l.call(f(this))})),h("keys",(function(){return c.call(f(this))})),h("values",p,!g),h(o,p,!g)},function(t,e,n){"use strict";var r=n(154),i=r.aTypedArray,a=r.exportTypedArrayMethod,o=[].join;a("join",(function(t){return o.apply(i(this),arguments)}))},function(t,e,n){"use strict";var r=n(154),i=n(126),a=r.aTypedArray;(0,r.exportTypedArrayMethod)("lastIndexOf",(function(t){return i.apply(a(this),arguments)}))},function(t,e,n){"use strict";var r=n(154),i=n(64).map,a=n(364),o=r.aTypedArray;(0,r.exportTypedArrayMethod)("map",(function(t){return i(o(this),t,arguments.length>1?arguments[1]:void 0,(function(t,e){return new(a(t))(e)}))}))},function(t,e,n){"use strict";var r=n(154),i=n(346),a=r.aTypedArrayConstructor;(0,r.exportTypedArrayStaticMethod)("of",(function(){for(var t=0,e=arguments.length,n=new(a(this))(e);e>t;)n[t]=arguments[t++];return n}),i)},function(t,e,n){"use strict";var r=n(154),i=n(130).left,a=r.aTypedArray;(0,r.exportTypedArrayMethod)("reduce",(function(t){return i(a(this),t,arguments.length,arguments.length>1?arguments[1]:void 0)}))},function(t,e,n){"use strict";var r=n(154),i=n(130).right,a=r.aTypedArray;(0,r.exportTypedArrayMethod)("reduceRight",(function(t){return i(a(this),t,arguments.length,arguments.length>1?arguments[1]:void 0)}))},function(t,e,n){"use strict";var r=n(154),i=r.aTypedArray,a=r.exportTypedArrayMethod,o=Math.floor;a("reverse",(function(){for(var t,e=this,n=i(e).length,r=o(n/2),a=0;a<r;)t=e[a],e[a++]=e[--n],e[n]=t;return e}))},function(t,e,n){"use strict";var r=n(154),i=n(47),a=n(347),o=n(29),s=n(6),u=r.aTypedArray;(0,r.exportTypedArrayMethod)("set",(function(t){u(this);var e=a(arguments.length>1?arguments[1]:void 0,1),n=this.length,r=o(t),s=i(r.length),c=0;if(s+e>n)throw RangeError("Wrong length");for(;c<s;)this[e+c]=r[c++]}),s((function(){new Int8Array(1).set({})})))},function(t,e,n){"use strict";var r=n(154),i=n(364),a=n(6),o=r.aTypedArray,s=r.exportTypedArrayMethod,u=[].slice;s("slice",(function(t,e){for(var n=u.call(o(this),t,e),r=i(this),a=0,s=n.length,c=new r(s);s>a;)c[a]=n[a++];return c}),a((function(){new Int8Array(1).slice()})))},function(t,e,n){"use strict";var r=n(154),i=n(64).some,a=r.aTypedArray;(0,r.exportTypedArrayMethod)("some",(function(t){return i(a(this),t,arguments.length>1?arguments[1]:void 0)}))},function(t,e,n){"use strict";var r=n(154),i=n(3),a=n(6),o=n(66),s=n(47),u=n(137),c=n(138),l=n(139),f=n(20),h=n(140),d=r.aTypedArray,g=r.exportTypedArrayMethod,p=i.Uint16Array,v=p&&p.prototype.sort,y=!!v&&!a((function(){var t=new p(2);t.sort(null),t.sort({})})),x=!!v&&!a((function(){if(f)return f<74;if(c)return c<67;if(l)return!0;if(h)return h<602;var t,e,n=new p(516),r=Array(516);for(t=0;t<516;t++)e=t%4,n[t]=515-t,r[t]=t-2*e+3;for(n.sort((function(t,e){return(t/4|0)-(e/4|0)})),t=0;t<516;t++)if(n[t]!==r[t])return!0}));g("sort",(function(t){var e=this;if(void 0!==t&&o(t),x)return v.call(e,t);d(e);var n,r=s(e.length),i=Array(r);for(n=0;n<r;n++)i[n]=e[n];for(i=u(e,function(t){return function(e,n){return void 0!==t?+t(e,n)||0:n!=n?-1:e!=e?1:0===e&&0===n?1/e>0&&1/n<0?1:-1:e>n}}(t)),n=0;n<r;n++)e[n]=i[n];return e}),!x||y)},function(t,e,n){"use strict";var r=n(154),i=n(47),a=n(49),o=n(364),s=r.aTypedArray;(0,r.exportTypedArrayMethod)("subarray",(function(t,e){var n=s(this),r=n.length,u=a(t,r);return new(o(n))(n.buffer,n.byteOffset+u*n.BYTES_PER_ELEMENT,i((void 0===e?r:a(e,r))-u))}))},function(t,e,n){"use strict";var r=n(3),i=n(154),a=n(6),o=r.Int8Array,s=i.aTypedArray,u=i.exportTypedArrayMethod,c=[].toLocaleString,l=[].slice,f=!!o&&a((function(){c.call(new o(1))}));u("toLocaleString",(function(){return c.apply(f?l.call(s(this)):s(this),arguments)}),a((function(){return[1,2].toLocaleString()!=new o([1,2]).toLocaleString()}))||!a((function(){o.prototype.toLocaleString.call([1,2])})))},function(t,e,n){"use strict";var r=n(154).exportTypedArrayMethod,i=n(6),a=n(3).Uint8Array,o=a&&a.prototype||{},s=[].toString,u=[].join;i((function(){s.call({})}))&&(s=function(){return u.call(this)});var c=o.toString!=s;r("toString",s,c)},function(t,e,n){"use strict";var r=n(2),i=n(54),a=String.fromCharCode,o=/^[\da-f]{2}$/i,s=/^[\da-f]{4}$/i;r({global:!0},{unescape:function(t){for(var e,n,r=i(t),u="",c=r.length,l=0;l<c;){if("%"===(e=r.charAt(l++)))if("u"===r.charAt(l)){if(n=r.slice(l+1,l+5),s.test(n)){u+=a(parseInt(n,16)),l+=5;continue}}else if(n=r.slice(l,l+2),o.test(n)){u+=a(parseInt(n,16)),l+=2;continue}u+=e}return u}})},function(t,e,n){"use strict";var r,i=n(3),a=n(149),o=n(180),s=n(179),u=n(388),c=n(15),l=n(38).enforce,f=n(39),h=!i.ActiveXObject&&"ActiveXObject"in i,d=Object.isExtensible,g=function(t){return function(){return t(this,arguments.length?arguments[0]:void 0)}},p=t.exports=s("WeakMap",g,u);if(f&&h){r=u.getConstructor(g,"WeakMap",!0),o.enable();var v=p.prototype,y=v.delete,x=v.has,_=v.get,m=v.set;a(v,{delete:function(t){if(c(t)&&!d(t)){var e=l(this);return e.frozen||(e.frozen=new r),y.call(this,t)||e.frozen.delete(t)}return y.call(this,t)},has:function(t){if(c(t)&&!d(t)){var e=l(this);return e.frozen||(e.frozen=new r),x.call(this,t)||e.frozen.has(t)}return x.call(this,t)},get:function(t){if(c(t)&&!d(t)){var e=l(this);return e.frozen||(e.frozen=new r),x.call(this,t)?_.call(this,t):e.frozen.get(t)}return _.call(this,t)},set:function(t,e){if(c(t)&&!d(t)){var n=l(this);n.frozen||(n.frozen=new r),x.call(this,t)?m.call(this,t,e):n.frozen.set(t,e)}else m.call(this,t,e);return this}})}},function(t,e,n){"use strict";var r=n(149),i=n(180).getWeakData,a=n(35),o=n(15),s=n(150),u=n(88),c=n(64),l=n(28),f=n(38),h=f.set,d=f.getterFor,g=c.find,p=c.findIndex,v=0,y=function(t){return t.frozen||(t.frozen=new x)},x=function(){this.entries=[]},_=function(t,e){return g(t.entries,(function(t){return t[0]===e}))};x.prototype={get:function(t){var e=_(this,t);if(e)return e[1]},has:function(t){return!!_(this,t)},set:function(t,e){var n=_(this,t);n?n[1]=e:this.entries.push([t,e])},delete:function(t){var e=p(this.entries,(function(e){return e[0]===t}));return~e&&this.entries.splice(e,1),!!~e}},t.exports={getConstructor:function(t,e,n,c){var f=t((function(t,r){s(t,f,e),h(t,{type:e,id:v++,frozen:void 0}),null!=r&&u(r,t[c],{that:t,AS_ENTRIES:n})})),g=d(e),p=function(t,e,n){var r=g(t),o=i(a(e),!0);return!0===o?y(r).set(e,n):o[r.id]=n,t};return r(f.prototype,{delete:function(t){var e=g(this);if(!o(t))return!1;var n=i(t);return!0===n?y(e).delete(t):n&&l(n,e.id)&&delete n[e.id]},has:function(t){var e=g(this);if(!o(t))return!1;var n=i(t);return!0===n?y(e).has(t):n&&l(n,e.id)}}),r(f.prototype,n?{get:function(t){var e=g(this);if(o(t)){var n=i(t);return!0===n?y(e).get(t):n?n[e.id]:void 0}},set:function(t,e){return p(this,t,e)}}:{add:function(t){return p(this,t,!0)}}),f}}},function(t,e,n){"use strict";n(179)("WeakSet",(function(t){return function(){return t(this,arguments.length?arguments[0]:void 0)}}),n(388))},function(t,e,n){var r=n(3),i=n(391),a=n(112),o=n(33);for(var s in i){var u=r[s],c=u&&u.prototype;if(c&&c.forEach!==a)try{o(c,"forEach",a)}catch(t){c.forEach=a}}},function(t){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,e,n){var r=n(3),i=n(391),a=n(120),o=n(33),s=n(23),u=s("iterator"),c=s("toStringTag"),l=a.values;for(var f in i){var h=r[f],d=h&&h.prototype;if(d){if(d[u]!==l)try{o(d,u,l)}catch(t){d[u]=l}if(d[c]||o(d,c,f),i[f])for(var g in a)if(d[g]!==a[g])try{o(d,g,a[g])}catch(t){d[g]=a[g]}}}},function(t,e,n){var r=n(2),i=n(3),a=n(259);r({global:!0,bind:!0,enumerable:!0,forced:!i.setImmediate||!i.clearImmediate},{setImmediate:a.set,clearImmediate:a.clear})},function(t,e,n){var r=n(2),i=n(3),a=n(261),o=n(131),s=i.process;r({global:!0,enumerable:!0,noTargetGet:!0},{queueMicrotask:function(t){var e=o&&s.domain;a(e?e.bind(t):t)}})},function(t,e,n){var r=n(2),i=n(3),a=n(21),o=[].slice,s=function(t){return function(e,n){var r=arguments.length>2,i=r?o.call(arguments,2):void 0;return t(r?function(){("function"==typeof e?e:Function(e)).apply(this,i)}:e,n)}};r({global:!0,bind:!0,forced:/MSIE .\./.test(a)},{setTimeout:s(i.setTimeout),setInterval:s(i.setInterval)})},function(t,e,n){"use strict";n(307);var r,i=n(2),a=n(5),o=n(397),s=n(3),u=n(56),c=n(36),l=n(150),f=n(28),h=n(226),d=n(114),g=n(301).codeAt,p=n(398),v=n(54),y=n(63),x=n(399),_=n(38),m=s.URL,b=x.URLSearchParams,w=x.getState,T=_.set,A=_.getterFor("URL"),S=Math.floor,k=Math.pow,E="Invalid scheme",M="Invalid host",C="Invalid port",O=/[A-Za-z]/,R=/[\d+-.A-Za-z]/,L=/\d/,I=/^0x/i,D=/^[0-7]+$/,P=/^\d+$/,z=/^[\dA-Fa-f]+$/,F=/[\0\t\n\r #%/:<>?@[\\\]^|]/,N=/[\0\t\n\r #/:<>?@[\\\]^|]/,j=/^[\u0000-\u0020]+|[\u0000-\u0020]+$/g,X=/[\t\n\r]/g,B=function(t,e){var n,r,i;if("["==e.charAt(0)){if("]"!=e.charAt(e.length-1))return M;if(!(n=U(e.slice(1,-1))))return M;t.host=n}else if(K(t)){if(e=p(e),F.test(e))return M;if(null===(n=$(e)))return M;t.host=n}else{if(N.test(e))return M;for(n="",r=d(e),i=0;i<r.length;i++)n+=q(r[i],V);t.host=n}},$=function(t){var e,n,r,i,a,o,s,u=t.split(".");if(u.length&&""==u[u.length-1]&&u.pop(),(e=u.length)>4)return t;for(n=[],r=0;r<e;r++){if(""==(i=u[r]))return t;if(a=10,i.length>1&&"0"==i.charAt(0)&&(a=I.test(i)?16:8,i=i.slice(8==a?1:2)),""===i)o=0;else{if(!(10==a?P:8==a?D:z).test(i))return t;o=parseInt(i,a)}n.push(o)}for(r=0;r<e;r++)if(o=n[r],r==e-1){if(o>=k(256,5-e))return null}else if(o>255)return null;for(s=n.pop(),r=0;r<n.length;r++)s+=n[r]*k(256,3-r);return s},U=function(t){var e,n,r,i,a,o,s,u=[0,0,0,0,0,0,0,0],c=0,l=null,f=0,h=function(){return t.charAt(f)};if(":"==h()){if(":"!=t.charAt(1))return;f+=2,l=++c}for(;h();){if(8==c)return;if(":"!=h()){for(e=n=0;n<4&&z.test(h());)e=16*e+parseInt(h(),16),f++,n++;if("."==h()){if(0==n)return;if(f-=n,c>6)return;for(r=0;h();){if(i=null,r>0){if(!("."==h()&&r<4))return;f++}if(!L.test(h()))return;for(;L.test(h());){if(a=parseInt(h(),10),null===i)i=a;else{if(0==i)return;i=10*i+a}if(i>255)return;f++}u[c]=256*u[c]+i,2!=++r&&4!=r||c++}if(4!=r)return;break}if(":"==h()){if(f++,!h())return}else if(h())return;u[c++]=e}else{if(null!==l)return;f++,l=++c}}if(null!==l)for(o=c-l,c=7;0!=c&&o>0;)s=u[c],u[c--]=u[l+o-1],u[l+--o]=s;else if(8!=c)return;return u},Y=function(t){var e,n,r,i;if("number"==typeof t){for(e=[],n=0;n<4;n++)e.unshift(t%256),t=S(t/256);return e.join(".")}if("object"==typeof t){for(e="",r=function(t){for(var e=null,n=1,r=null,i=0,a=0;a<8;a++)0!==t[a]?(i>n&&(e=r,n=i),r=null,i=0):(null===r&&(r=a),++i);return i>n&&(e=r,n=i),e}(t),n=0;n<8;n++)i&&0===t[n]||(i&&(i=!1),r===n?(e+=n?":":"::",i=!0):(e+=t[n].toString(16),n<7&&(e+=":")));return"["+e+"]"}return t},V={},G=h({},V,{" ":1,'"':1,"<":1,">":1,"`":1}),H=h({},G,{"#":1,"?":1,"{":1,"}":1}),W=h({},H,{"/":1,":":1,";":1,"=":1,"@":1,"[":1,"\\":1,"]":1,"^":1,"|":1}),q=function(t,e){var n=g(t,0);return n>32&&n<127&&!f(e,t)?t:encodeURIComponent(t)},Z={ftp:21,file:null,http:80,https:443,ws:80,wss:443},K=function(t){return f(Z,t.scheme)},J=function(t){return""!=t.username||""!=t.password},Q=function(t){return!t.host||t.cannotBeABaseURL||"file"==t.scheme},tt=function(t,e){var n;return 2==t.length&&O.test(t.charAt(0))&&(":"==(n=t.charAt(1))||!e&&"|"==n)},et=function(t){var e;return t.length>1&&tt(t.slice(0,2))&&(2==t.length||"/"===(e=t.charAt(2))||"\\"===e||"?"===e||"#"===e)},nt=function(t){var e=t.path,n=e.length;!n||"file"==t.scheme&&1==n&&tt(e[0],!0)||e.pop()},rt=function(t){return"."===t||"%2e"===t.toLowerCase()},it={},at={},ot={},st={},ut={},ct={},lt={},ft={},ht={},dt={},gt={},pt={},vt={},yt={},xt={},_t={},mt={},bt={},wt={},Tt={},At={},St=function(t,e,n,i){var a,o,s,u,c,l=n||it,h=0,g="",p=!1,v=!1,y=!1;for(n||(t.scheme="",t.username="",t.password="",t.host=null,t.port=null,t.path=[],t.query=null,t.fragment=null,t.cannotBeABaseURL=!1,e=e.replace(j,"")),e=e.replace(X,""),a=d(e);h<=a.length;){switch(o=a[h],l){case it:if(!o||!O.test(o)){if(n)return E;l=ot;continue}g+=o.toLowerCase(),l=at;break;case at:if(o&&(R.test(o)||"+"==o||"-"==o||"."==o))g+=o.toLowerCase();else{if(":"!=o){if(n)return E;g="",l=ot,h=0;continue}if(n&&(K(t)!=f(Z,g)||"file"==g&&(J(t)||null!==t.port)||"file"==t.scheme&&!t.host))return;if(t.scheme=g,n)return void(K(t)&&Z[t.scheme]==t.port&&(t.port=null));g="","file"==t.scheme?l=yt:K(t)&&i&&i.scheme==t.scheme?l=st:K(t)?l=ft:"/"==a[h+1]?(l=ut,h++):(t.cannotBeABaseURL=!0,t.path.push(""),l=wt)}break;case ot:if(!i||i.cannotBeABaseURL&&"#"!=o)return E;if(i.cannotBeABaseURL&&"#"==o){t.scheme=i.scheme,t.path=i.path.slice(),t.query=i.query,t.fragment="",t.cannotBeABaseURL=!0,l=At;break}l="file"==i.scheme?yt:ct;continue;case st:if("/"!=o||"/"!=a[h+1]){l=ct;continue}l=ht,h++;break;case ut:if("/"==o){l=dt;break}l=bt;continue;case ct:if(t.scheme=i.scheme,o==r)t.username=i.username,t.password=i.password,t.host=i.host,t.port=i.port,t.path=i.path.slice(),t.query=i.query;else if("/"==o||"\\"==o&&K(t))l=lt;else if("?"==o)t.username=i.username,t.password=i.password,t.host=i.host,t.port=i.port,t.path=i.path.slice(),t.query="",l=Tt;else{if("#"!=o){t.username=i.username,t.password=i.password,t.host=i.host,t.port=i.port,t.path=i.path.slice(),t.path.pop(),l=bt;continue}t.username=i.username,t.password=i.password,t.host=i.host,t.port=i.port,t.path=i.path.slice(),t.query=i.query,t.fragment="",l=At}break;case lt:if(!K(t)||"/"!=o&&"\\"!=o){if("/"!=o){t.username=i.username,t.password=i.password,t.host=i.host,t.port=i.port,l=bt;continue}l=dt}else l=ht;break;case ft:if(l=ht,"/"!=o||"/"!=g.charAt(h+1))continue;h++;break;case ht:if("/"!=o&&"\\"!=o){l=dt;continue}break;case dt:if("@"==o){p&&(g="%40"+g),p=!0,s=d(g);for(var x=0;x<s.length;x++){var _=s[x];if(":"!=_||y){var m=q(_,W);y?t.password+=m:t.username+=m}else y=!0}g=""}else if(o==r||"/"==o||"?"==o||"#"==o||"\\"==o&&K(t)){if(p&&""==g)return"Invalid authority";h-=d(g).length+1,g="",l=gt}else g+=o;break;case gt:case pt:if(n&&"file"==t.scheme){l=_t;continue}if(":"!=o||v){if(o==r||"/"==o||"?"==o||"#"==o||"\\"==o&&K(t)){if(K(t)&&""==g)return M;if(n&&""==g&&(J(t)||null!==t.port))return;if(u=B(t,g))return u;if(g="",l=mt,n)return;continue}"["==o?v=!0:"]"==o&&(v=!1),g+=o}else{if(""==g)return M;if(u=B(t,g))return u;if(g="",l=vt,n==pt)return}break;case vt:if(!L.test(o)){if(o==r||"/"==o||"?"==o||"#"==o||"\\"==o&&K(t)||n){if(""!=g){var b=parseInt(g,10);if(b>65535)return C;t.port=K(t)&&b===Z[t.scheme]?null:b,g=""}if(n)return;l=mt;continue}return C}g+=o;break;case yt:if(t.scheme="file","/"==o||"\\"==o)l=xt;else{if(!i||"file"!=i.scheme){l=bt;continue}if(o==r)t.host=i.host,t.path=i.path.slice(),t.query=i.query;else if("?"==o)t.host=i.host,t.path=i.path.slice(),t.query="",l=Tt;else{if("#"!=o){et(a.slice(h).join(""))||(t.host=i.host,t.path=i.path.slice(),nt(t)),l=bt;continue}t.host=i.host,t.path=i.path.slice(),t.query=i.query,t.fragment="",l=At}}break;case xt:if("/"==o||"\\"==o){l=_t;break}i&&"file"==i.scheme&&!et(a.slice(h).join(""))&&(tt(i.path[0],!0)?t.path.push(i.path[0]):t.host=i.host),l=bt;continue;case _t:if(o==r||"/"==o||"\\"==o||"?"==o||"#"==o){if(!n&&tt(g))l=bt;else if(""==g){if(t.host="",n)return;l=mt}else{if(u=B(t,g))return u;if("localhost"==t.host&&(t.host=""),n)return;g="",l=mt}continue}g+=o;break;case mt:if(K(t)){if(l=bt,"/"!=o&&"\\"!=o)continue}else if(n||"?"!=o)if(n||"#"!=o){if(o!=r&&(l=bt,"/"!=o))continue}else t.fragment="",l=At;else t.query="",l=Tt;break;case bt:if(o==r||"/"==o||"\\"==o&&K(t)||!n&&("?"==o||"#"==o)){if(".."===(c=(c=g).toLowerCase())||"%2e."===c||".%2e"===c||"%2e%2e"===c?(nt(t),"/"==o||"\\"==o&&K(t)||t.path.push("")):rt(g)?"/"==o||"\\"==o&&K(t)||t.path.push(""):("file"==t.scheme&&!t.path.length&&tt(g)&&(t.host&&(t.host=""),g=g.charAt(0)+":"),t.path.push(g)),g="","file"==t.scheme&&(o==r||"?"==o||"#"==o))for(;t.path.length>1&&""===t.path[0];)t.path.shift();"?"==o?(t.query="",l=Tt):"#"==o&&(t.fragment="",l=At)}else g+=q(o,H);break;case wt:"?"==o?(t.query="",l=Tt):"#"==o?(t.fragment="",l=At):o!=r&&(t.path[0]+=q(o,V));break;case Tt:n||"#"!=o?o!=r&&("'"==o&&K(t)?t.query+="%27":t.query+="#"==o?"%23":q(o,V)):(t.fragment="",l=At);break;case At:o!=r&&(t.fragment+=q(o,G))}h++}},kt=function(t){var e,n,r=l(this,kt,"URL"),i=arguments.length>1?arguments[1]:void 0,o=v(t),s=T(r,{type:"URL"});if(void 0!==i)if(i instanceof kt)e=A(i);else if(n=St(e={},v(i)))throw TypeError(n);if(n=St(s,o,null,e))throw TypeError(n);var u=s.searchParams=new b,c=w(u);c.updateSearchParams(s.query),c.updateURL=function(){s.query=String(u)||null},a||(r.href=Mt.call(r),r.origin=Ct.call(r),r.protocol=Ot.call(r),r.username=Rt.call(r),r.password=Lt.call(r),r.host=It.call(r),r.hostname=Dt.call(r),r.port=Pt.call(r),r.pathname=zt.call(r),r.search=Ft.call(r),r.searchParams=Nt.call(r),r.hash=jt.call(r))},Et=kt.prototype,Mt=function(){var t=A(this),e=t.scheme,n=t.username,r=t.password,i=t.host,a=t.port,o=t.path,s=t.query,u=t.fragment,c=e+":";return null!==i?(c+="//",J(t)&&(c+=n+(r?":"+r:"")+"@"),c+=Y(i),null!==a&&(c+=":"+a)):"file"==e&&(c+="//"),c+=t.cannotBeABaseURL?o[0]:o.length?"/"+o.join("/"):"",null!==s&&(c+="?"+s),null!==u&&(c+="#"+u),c},Ct=function(){var t=A(this),e=t.scheme,n=t.port;if("blob"==e)try{return new kt(e.path[0]).origin}catch(t){return"null"}return"file"!=e&&K(t)?e+"://"+Y(t.host)+(null!==n?":"+n:""):"null"},Ot=function(){return A(this).scheme+":"},Rt=function(){return A(this).username},Lt=function(){return A(this).password},It=function(){var t=A(this),e=t.host,n=t.port;return null===e?"":null===n?Y(e):Y(e)+":"+n},Dt=function(){var t=A(this).host;return null===t?"":Y(t)},Pt=function(){var t=A(this).port;return null===t?"":String(t)},zt=function(){var t=A(this),e=t.path;return t.cannotBeABaseURL?e[0]:e.length?"/"+e.join("/"):""},Ft=function(){var t=A(this).query;return t?"?"+t:""},Nt=function(){return A(this).searchParams},jt=function(){var t=A(this).fragment;return t?"#"+t:""},Xt=function(t,e){return{get:t,set:e,configurable:!0,enumerable:!0}};if(a&&u(Et,{href:Xt(Mt,(function(t){var e=A(this),n=v(t),r=St(e,n);if(r)throw TypeError(r);w(e.searchParams).updateSearchParams(e.query)})),origin:Xt(Ct),protocol:Xt(Ot,(function(t){var e=A(this);St(e,v(t)+":",it)})),username:Xt(Rt,(function(t){var e=A(this),n=d(v(t));if(!Q(e)){e.username="";for(var r=0;r<n.length;r++)e.username+=q(n[r],W)}})),password:Xt(Lt,(function(t){var e=A(this),n=d(v(t));if(!Q(e)){e.password="";for(var r=0;r<n.length;r++)e.password+=q(n[r],W)}})),host:Xt(It,(function(t){var e=A(this);e.cannotBeABaseURL||St(e,v(t),gt)})),hostname:Xt(Dt,(function(t){var e=A(this);e.cannotBeABaseURL||St(e,v(t),pt)})),port:Xt(Pt,(function(t){var e=A(this);Q(e)||(""==(t=v(t))?e.port=null:St(e,t,vt))})),pathname:Xt(zt,(function(t){var e=A(this);e.cannotBeABaseURL||(e.path=[],St(e,v(t),mt))})),search:Xt(Ft,(function(t){var e=A(this);""==(t=v(t))?e.query=null:("?"==t.charAt(0)&&(t=t.slice(1)),e.query="",St(e,t,Tt)),w(e.searchParams).updateSearchParams(e.query)})),searchParams:Xt(Nt),hash:Xt(jt,(function(t){var e=A(this);""!=(t=v(t))?("#"==t.charAt(0)&&(t=t.slice(1)),e.fragment="",St(e,t,At)):e.fragment=null}))}),c(Et,"toJSON",(function(){return Mt.call(this)}),{enumerable:!0}),c(Et,"toString",(function(){return Mt.call(this)}),{enumerable:!0}),m){var Bt=m.createObjectURL,$t=m.revokeObjectURL;Bt&&c(kt,"createObjectURL",(function(t){return Bt.apply(m,arguments)})),$t&&c(kt,"revokeObjectURL",(function(t){return $t.apply(m,arguments)}))}y(kt,"URL"),i({global:!0,forced:!o,sham:!a},{URL:kt})},function(t,e,n){var r=n(6),i=n(23),a=n(25),o=i("iterator");t.exports=!r((function(){var t=new URL("b?a=1&b=2&c=3","http://a"),e=t.searchParams,n="";return t.pathname="c%20d",e.forEach((function(t,r){e.delete("b"),n+=r+t})),a&&!t.toJSON||!e.sort||"http://a/c%20d?a=1&c=3"!==t.href||"3"!==e.get("c")||"a=1"!==String(new URLSearchParams("?a=1"))||!e[o]||"a"!==new URL("https://a@b").username||"b"!==new URLSearchParams(new URLSearchParams("a=b")).get("a")||"xn--e1aybc"!==new URL("http://тест").host||"#%D0%B1"!==new URL("http://a#б").hash||"a1c3"!==n||"x"!==new URL("http://x",void 0).host}))},function(t){"use strict";var e=2147483647,n=/[^\0-\u007E]/,r=/[.\u3002\uFF0E\uFF61]/g,i="Overflow: input needs wider integers to process",a=Math.floor,o=String.fromCharCode,s=function(t){return t+22+75*(t<26)},u=function(t,e,n){var r=0;for(t=n?a(t/700):t>>1,t+=a(t/e);t>455;r+=36)t=a(t/35);return a(r+36*t/(t+38))},c=function(t){var n,r,c=[],l=(t=function(t){for(var e=[],n=0,r=t.length;n<r;){var i=t.charCodeAt(n++);if(i>=55296&&i<=56319&&n<r){var a=t.charCodeAt(n++);56320==(64512&a)?e.push(((1023&i)<<10)+(1023&a)+65536):(e.push(i),n--)}else e.push(i)}return e}(t)).length,f=128,h=0,d=72;for(n=0;n<t.length;n++)(r=t[n])<128&&c.push(o(r));var g=c.length,p=g;for(g&&c.push("-");p<l;){var v=e;for(n=0;n<t.length;n++)(r=t[n])>=f&&r<v&&(v=r);var y=p+1;if(v-f>a((e-h)/y))throw RangeError(i);for(h+=(v-f)*y,f=v,n=0;n<t.length;n++){if((r=t[n])<f&&++h>e)throw RangeError(i);if(r==f){for(var x=h,_=36;;_+=36){var m=_<=d?1:_>=d+26?26:_-d;if(x<m)break;var b=x-m,w=36-m;c.push(o(s(m+b%w))),x=a(b/w)}c.push(o(s(x))),d=u(h,y,p==g),h=0,++p}}++h,++f}return c.join("")};t.exports=function(t){var e,i,a=[],o=t.toLowerCase().replace(r,".").split(".");for(e=0;e<o.length;e++)i=o[e],a.push(n.test(i)?"xn--"+c(i):i);return a.join(".")}},function(t,e,n){"use strict";n(120);var r=n(2),i=n(17),a=n(397),o=n(36),s=n(149),u=n(63),c=n(122),l=n(38),f=n(150),h=n(28),d=n(65),g=n(92),p=n(35),v=n(15),y=n(54),x=n(55),_=n(8),m=n(400),b=n(91),w=n(23),T=i("fetch"),A=i("Request"),S=A&&A.prototype,k=i("Headers"),E=w("iterator"),M="URLSearchParams",C="URLSearchParamsIterator",O=l.set,R=l.getterFor(M),L=l.getterFor(C),I=/\+/g,D=Array(4),P=function(t){return D[t-1]||(D[t-1]=RegExp("((?:%[\\da-f]{2}){"+t+"})","gi"))},z=function(t){try{return decodeURIComponent(t)}catch(e){return t}},F=function(t){var e=t.replace(I," "),n=4;try{return decodeURIComponent(e)}catch(t){for(;n;)e=e.replace(P(n--),z);return e}},N=/[!'()~]|%20/g,j={"!":"%21","'":"%27","(":"%28",")":"%29","~":"%7E","%20":"+"},X=function(t){return j[t]},B=function(t){return encodeURIComponent(t).replace(N,X)},$=function(t,e){if(e)for(var n,r,i=e.split("&"),a=0;a<i.length;)(n=i[a++]).length&&(r=n.split("="),t.push({key:F(r.shift()),value:F(r.join("="))}))},U=function(t){this.entries.length=0,$(this.entries,t)},Y=function(t,e){if(t<e)throw TypeError("Not enough arguments")},V=c((function(t,e){O(this,{type:C,iterator:m(R(t).entries),kind:e})}),"Iterator",(function(){var t=L(this),e=t.kind,n=t.iterator.next(),r=n.value;return n.done||(n.value="keys"===e?r.key:"values"===e?r.value:[r.key,r.value]),n})),G=function(){f(this,G,M);var t,e,n,r,i,a,o,s,u,c=arguments.length>0?arguments[0]:void 0,l=this,d=[];if(O(l,{type:M,entries:d,updateURL:function(){},updateSearchParams:U}),void 0!==c)if(v(c))if("function"==typeof(t=b(c)))for(n=(e=t.call(c)).next;!(r=n.call(e)).done;){if((o=(a=(i=m(p(r.value))).next).call(i)).done||(s=a.call(i)).done||!a.call(i).done)throw TypeError("Expected sequence with length 2");d.push({key:y(o.value),value:y(s.value)})}else for(u in c)h(c,u)&&d.push({key:u,value:y(c[u])});else $(d,"string"==typeof c?"?"===c.charAt(0)?c.slice(1):c:y(c))},H=G.prototype;if(s(H,{append:function(t,e){Y(arguments.length,2);var n=R(this);n.entries.push({key:y(t),value:y(e)}),n.updateURL()},delete:function(t){Y(arguments.length,1);for(var e=R(this),n=e.entries,r=y(t),i=0;i<n.length;)n[i].key===r?n.splice(i,1):i++;e.updateURL()},get:function(t){Y(arguments.length,1);for(var e=R(this).entries,n=y(t),r=0;r<e.length;r++)if(e[r].key===n)return e[r].value;return null},getAll:function(t){Y(arguments.length,1);for(var e=R(this).entries,n=y(t),r=[],i=0;i<e.length;i++)e[i].key===n&&r.push(e[i].value);return r},has:function(t){Y(arguments.length,1);for(var e=R(this).entries,n=y(t),r=0;r<e.length;)if(e[r++].key===n)return!0;return!1},set:function(t,e){Y(arguments.length,1);for(var n,r=R(this),i=r.entries,a=!1,o=y(t),s=y(e),u=0;u<i.length;u++)(n=i[u]).key===o&&(a?i.splice(u--,1):(a=!0,n.value=s));a||i.push({key:o,value:s}),r.updateURL()},sort:function(){var t,e,n,r=R(this),i=r.entries,a=i.slice();for(i.length=0,n=0;n<a.length;n++){for(t=a[n],e=0;e<n;e++)if(i[e].key>t.key){i.splice(e,0,t);break}e===n&&i.push(t)}r.updateURL()},forEach:function(t){for(var e,n=R(this).entries,r=d(t,arguments.length>1?arguments[1]:void 0,3),i=0;i<n.length;)r((e=n[i++]).value,e.key,this)},keys:function(){return new V(this,"keys")},values:function(){return new V(this,"values")},entries:function(){return new V(this,"entries")}},{enumerable:!0}),o(H,E,H.entries),o(H,"toString",(function(){for(var t,e=R(this).entries,n=[],r=0;r<e.length;)t=e[r++],n.push(B(t.key)+"="+B(t.value));return n.join("&")}),{enumerable:!0}),u(G,M),r({global:!0,forced:!a},{URLSearchParams:G}),!a&&"function"==typeof k){var W=function(t){if(v(t)){var e,n=t.body;if(g(n)===M)return(e=t.headers?new k(t.headers):new k).has("content-type")||e.set("content-type","application/x-www-form-urlencoded;charset=UTF-8"),x(t,{body:_(0,String(n)),headers:_(0,e)})}return t};if("function"==typeof T&&r({global:!0,enumerable:!0,forced:!0},{fetch:function(t){return T(t,arguments.length>1?W(arguments[1]):{})}}),"function"==typeof A){var q=function(t){return f(this,q,"Request"),new A(t,arguments.length>1?W(arguments[1]):{})};S.constructor=q,q.prototype=S,r({global:!0,forced:!0},{Request:q})}}t.exports={URLSearchParams:G,getState:R}},function(t,e,n){var r=n(35),i=n(91);t.exports=function(t){var e=i(t);if("function"!=typeof e)throw TypeError(String(t)+" is not iterable");return r(e.call(t))}},function(t,e,n){"use strict";n(2)({target:"URL",proto:!0,enumerable:!0},{toJSON:function(){return URL.prototype.toString.call(this)}})},function(t){var e=function(t){"use strict";var e,n=Object.prototype,r=n.hasOwnProperty,i="function"==typeof Symbol?Symbol:{},a=i.iterator||"@@iterator",o=i.asyncIterator||"@@asyncIterator",s=i.toStringTag||"@@toStringTag";function u(t,e,n){return Object.defineProperty(t,e,{value:n,enumerable:!0,configurable:!0,writable:!0}),t[e]}try{u({},"")}catch(t){u=function(t,e,n){return t[e]=n}}function c(t,e,n,r){var i=e&&e.prototype instanceof v?e:v,a=Object.create(i.prototype),o=new M(r||[]);return a._invoke=function(t,e,n){var r=f;return function(i,a){if(r===d)throw new Error("Generator is already running");if(r===g){if("throw"===i)throw a;return O()}for(n.method=i,n.arg=a;;){var o=n.delegate;if(o){var s=S(o,n);if(s){if(s===p)continue;return s}}if("next"===n.method)n.sent=n._sent=n.arg;else if("throw"===n.method){if(r===f)throw r=g,n.arg;n.dispatchException(n.arg)}else"return"===n.method&&n.abrupt("return",n.arg);r=d;var u=l(t,e,n);if("normal"===u.type){if(r=n.done?g:h,u.arg===p)continue;return{value:u.arg,done:n.done}}"throw"===u.type&&(r=g,n.method="throw",n.arg=u.arg)}}}(t,n,o),a}function l(t,e,n){try{return{type:"normal",arg:t.call(e,n)}}catch(t){return{type:"throw",arg:t}}}t.wrap=c;var f="suspendedStart",h="suspendedYield",d="executing",g="completed",p={};function v(){}function y(){}function x(){}var _={};u(_,a,(function(){return this}));var m=Object.getPrototypeOf,b=m&&m(m(C([])));b&&b!==n&&r.call(b,a)&&(_=b);var w=x.prototype=v.prototype=Object.create(_);function T(t){["next","throw","return"].forEach((function(e){u(t,e,(function(t){return this._invoke(e,t)}))}))}function A(t,e){function n(i,a,o,s){var u=l(t[i],t,a);if("throw"!==u.type){var c=u.arg,f=c.value;return f&&"object"==typeof f&&r.call(f,"__await")?e.resolve(f.__await).then((function(t){n("next",t,o,s)}),(function(t){n("throw",t,o,s)})):e.resolve(f).then((function(t){c.value=t,o(c)}),(function(t){return n("throw",t,o,s)}))}s(u.arg)}var i;this._invoke=function(t,r){function a(){return new e((function(e,i){n(t,r,e,i)}))}return i=i?i.then(a,a):a()}}function S(t,n){var r=t.iterator[n.method];if(r===e){if(n.delegate=null,"throw"===n.method){if(t.iterator.return&&(n.method="return",n.arg=e,S(t,n),"throw"===n.method))return p;n.method="throw",n.arg=new TypeError("The iterator does not provide a 'throw' method")}return p}var i=l(r,t.iterator,n.arg);if("throw"===i.type)return n.method="throw",n.arg=i.arg,n.delegate=null,p;var a=i.arg;return a?a.done?(n[t.resultName]=a.value,n.next=t.nextLoc,"return"!==n.method&&(n.method="next",n.arg=e),n.delegate=null,p):a:(n.method="throw",n.arg=new TypeError("iterator result is not an object"),n.delegate=null,p)}function k(t){var e={tryLoc:t[0]};1 in t&&(e.catchLoc=t[1]),2 in t&&(e.finallyLoc=t[2],e.afterLoc=t[3]),this.tryEntries.push(e)}function E(t){var e=t.completion||{};e.type="normal",delete e.arg,t.completion=e}function M(t){this.tryEntries=[{tryLoc:"root"}],t.forEach(k,this),this.reset(!0)}function C(t){if(t){var n=t[a];if(n)return n.call(t);if("function"==typeof t.next)return t;if(!isNaN(t.length)){var i=-1,o=function n(){for(;++i<t.length;)if(r.call(t,i))return n.value=t[i],n.done=!1,n;return n.value=e,n.done=!0,n};return o.next=o}}return{next:O}}function O(){return{value:e,done:!0}}return y.prototype=x,u(w,"constructor",x),u(x,"constructor",y),y.displayName=u(x,s,"GeneratorFunction"),t.isGeneratorFunction=function(t){var e="function"==typeof t&&t.constructor;return!!e&&(e===y||"GeneratorFunction"===(e.displayName||e.name))},t.mark=function(t){return Object.setPrototypeOf?Object.setPrototypeOf(t,x):(t.__proto__=x,u(t,s,"GeneratorFunction")),t.prototype=Object.create(w),t},t.awrap=function(t){return{__await:t}},T(A.prototype),u(A.prototype,o,(function(){return this})),t.AsyncIterator=A,t.async=function(e,n,r,i,a){void 0===a&&(a=Promise);var o=new A(c(e,n,r,i),a);return t.isGeneratorFunction(n)?o:o.next().then((function(t){return t.done?t.value:o.next()}))},T(w),u(w,s,"Generator"),u(w,a,(function(){return this})),u(w,"toString",(function(){return"[object Generator]"})),t.keys=function(t){var e=[];for(var n in t)e.push(n);return e.reverse(),function n(){for(;e.length;){var r=e.pop();if(r in t)return n.value=r,n.done=!1,n}return n.done=!0,n}},t.values=C,M.prototype={constructor:M,reset:function(t){if(this.prev=0,this.next=0,this.sent=this._sent=e,this.done=!1,this.delegate=null,this.method="next",this.arg=e,this.tryEntries.forEach(E),!t)for(var n in this)"t"===n.charAt(0)&&r.call(this,n)&&!isNaN(+n.slice(1))&&(this[n]=e)},stop:function(){this.done=!0;var t=this.tryEntries[0].completion;if("throw"===t.type)throw t.arg;return this.rval},dispatchException:function(t){if(this.done)throw t;var n=this;function i(r,i){return s.type="throw",s.arg=t,n.next=r,i&&(n.method="next",n.arg=e),!!i}for(var a=this.tryEntries.length-1;a>=0;--a){var o=this.tryEntries[a],s=o.completion;if("root"===o.tryLoc)return i("end");if(o.tryLoc<=this.prev){var u=r.call(o,"catchLoc"),c=r.call(o,"finallyLoc");if(u&&c){if(this.prev<o.catchLoc)return i(o.catchLoc,!0);if(this.prev<o.finallyLoc)return i(o.finallyLoc)}else if(u){if(this.prev<o.catchLoc)return i(o.catchLoc,!0)}else{if(!c)throw new Error("try statement without catch or finally");if(this.prev<o.finallyLoc)return i(o.finallyLoc)}}}},abrupt:function(t,e){for(var n=this.tryEntries.length-1;n>=0;--n){var i=this.tryEntries[n];if(i.tryLoc<=this.prev&&r.call(i,"finallyLoc")&&this.prev<i.finallyLoc){var a=i;break}}a&&("break"===t||"continue"===t)&&a.tryLoc<=e&&e<=a.finallyLoc&&(a=null);var o=a?a.completion:{};return o.type=t,o.arg=e,a?(this.method="next",this.next=a.finallyLoc,p):this.complete(o)},complete:function(t,e){if("throw"===t.type)throw t.arg;return"break"===t.type||"continue"===t.type?this.next=t.arg:"return"===t.type?(this.rval=this.arg=t.arg,this.method="return",this.next="end"):"normal"===t.type&&e&&(this.next=e),p},finish:function(t){for(var e=this.tryEntries.length-1;e>=0;--e){var n=this.tryEntries[e];if(n.finallyLoc===t)return this.complete(n.completion,n.afterLoc),E(n),p}},catch:function(t){for(var e=this.tryEntries.length-1;e>=0;--e){var n=this.tryEntries[e];if(n.tryLoc===t){var r=n.completion;if("throw"===r.type){var i=r.arg;E(n)}return i}}throw new Error("illegal catch attempt")},delegateYield:function(t,n,r){return this.delegate={iterator:C(t),resultName:n,nextLoc:r},"next"===this.method&&(this.arg=e),p}},t}(t.exports);try{regeneratorRuntime=e}catch(t){"object"==typeof globalThis?globalThis.regeneratorRuntime=e:Function("r","regeneratorRuntime = r")(e)}},function(t,e,n){"use strict";n.r(e),n.d(e,{bb:function(){return od},default:function(){return od}});var r={};n.r(r),n.d(r,{area:function(){return dh},areaLineRange:function(){return gh},areaSpline:function(){return ph},areaSplineRange:function(){return vh},areaStep:function(){return yh},bar:function(){return Sh},bubble:function(){return kh},candlestick:function(){return Eh},donut:function(){return bh},gauge:function(){return wh},line:function(){return xh},pie:function(){return Th},radar:function(){return Ah},scatter:function(){return Mh},spline:function(){return _h},step:function(){return mh}});var i={};n.r(i),n.d(i,{selection:function(){return nd},subchart:function(){return rd},zoom:function(){return id}});var a=new Date,o=new Date;function s(t,e,n,r){function i(e){return t(e=0===arguments.length?new Date:new Date(+e)),e}return i.floor=function(e){return t(e=new Date(+e)),e},i.ceil=function(n){return t(n=new Date(n-1)),e(n,1),t(n),n},i.round=function(t){var e=i(t),n=i.ceil(t);return t-e<n-t?e:n},i.offset=function(t,n){return e(t=new Date(+t),null==n?1:Math.floor(n)),t},i.range=function(n,r,a){var o,s=[];if(n=i.ceil(n),a=null==a?1:Math.floor(a),!(n<r&&a>0))return s;do{s.push(o=new Date(+n)),e(n,a),t(n)}while(o<n&&n<r);return s},i.filter=function(n){return s((function(e){if(e>=e)for(;t(e),!n(e);)e.setTime(e-1)}),(function(t,r){if(t>=t)if(r<0)for(;++r<=0;)for(;e(t,-1),!n(t););else for(;--r>=0;)for(;e(t,1),!n(t););}))},n&&(i.count=function(e,r){return a.setTime(+e),o.setTime(+r),t(a),t(o),Math.floor(n(a,o))},i.every=function(t){return t=Math.floor(t),isFinite(t)&&t>0?t>1?i.filter(r?function(e){return r(e)%t==0}:function(e){return i.count(0,e)%t==0}):i:null}),i}var u=1e3,c=6e4,l=36e5,f=864e5,h=6048e5,d=2592e6,g=31536e6;function p(t){return s((function(e){e.setUTCDate(e.getUTCDate()-(e.getUTCDay()+7-t)%7),e.setUTCHours(0,0,0,0)}),(function(t,e){t.setUTCDate(t.getUTCDate()+7*e)}),(function(t,e){return(e-t)/h}))}var v=p(0),y=p(1),x=p(2),_=p(3),m=p(4),b=p(5),w=p(6),T=(v.range,y.range,x.range,_.range,m.range,b.range,w.range,s((function(t){t.setUTCHours(0,0,0,0)}),(function(t,e){t.setUTCDate(t.getUTCDate()+e)}),(function(t,e){return(e-t)/f}),(function(t){return t.getUTCDate()-1}))),A=T;T.range;function S(t){return s((function(e){e.setDate(e.getDate()-(e.getDay()+7-t)%7),e.setHours(0,0,0,0)}),(function(t,e){t.setDate(t.getDate()+7*e)}),(function(t,e){return(e-t-(e.getTimezoneOffset()-t.getTimezoneOffset())*c)/h}))}var k=S(0),E=S(1),M=S(2),C=S(3),O=S(4),R=S(5),L=S(6),I=(k.range,E.range,M.range,C.range,O.range,R.range,L.range,s((function(t){return t.setHours(0,0,0,0)}),(function(t,e){return t.setDate(t.getDate()+e)}),(function(t,e){return(e-t-(e.getTimezoneOffset()-t.getTimezoneOffset())*c)/f}),(function(t){return t.getDate()-1}))),D=I,P=(I.range,s((function(t){t.setMonth(0,1),t.setHours(0,0,0,0)}),(function(t,e){t.setFullYear(t.getFullYear()+e)}),(function(t,e){return e.getFullYear()-t.getFullYear()}),(function(t){return t.getFullYear()})));P.every=function(t){return isFinite(t=Math.floor(t))&&t>0?s((function(e){e.setFullYear(Math.floor(e.getFullYear()/t)*t),e.setMonth(0,1),e.setHours(0,0,0,0)}),(function(e,n){e.setFullYear(e.getFullYear()+n*t)})):null};var z=P,F=(P.range,s((function(t){t.setUTCMonth(0,1),t.setUTCHours(0,0,0,0)}),(function(t,e){t.setUTCFullYear(t.getUTCFullYear()+e)}),(function(t,e){return e.getUTCFullYear()-t.getUTCFullYear()}),(function(t){return t.getUTCFullYear()})));F.every=function(t){return isFinite(t=Math.floor(t))&&t>0?s((function(e){e.setUTCFullYear(Math.floor(e.getUTCFullYear()/t)*t),e.setUTCMonth(0,1),e.setUTCHours(0,0,0,0)}),(function(e,n){e.setUTCFullYear(e.getUTCFullYear()+n*t)})):null};var N=F;F.range;function j(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 X(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 B(t,e,n){return{y:t,m:e,d:n,H:0,M:0,S:0,L:0}}var $,U,Y,V,G,H={"-":"",_:" ",0:"0"},W=/^\s*\d+/,q=/^%/,Z=/[\\^$*+?|[\]().{}]/g;function K(t,e,n){var r=t<0?"-":"",i=(r?-t:t)+"",a=i.length;return r+(a<n?Array(n-a+1).join(e)+i:i)}function J(t){return t.replace(Z,"\\$&")}function Q(t){return new RegExp("^(?:"+t.map(J).join("|")+")","i")}function tt(t){return new Map(t.map((function(t,e){return[t.toLowerCase(),e]})))}function et(t,e,n){var r=W.exec(e.slice(n,n+1));return r?(t.w=+r[0],n+r[0].length):-1}function nt(t,e,n){var r=W.exec(e.slice(n,n+1));return r?(t.u=+r[0],n+r[0].length):-1}function rt(t,e,n){var r=W.exec(e.slice(n,n+2));return r?(t.U=+r[0],n+r[0].length):-1}function it(t,e,n){var r=W.exec(e.slice(n,n+2));return r?(t.V=+r[0],n+r[0].length):-1}function at(t,e,n){var r=W.exec(e.slice(n,n+2));return r?(t.W=+r[0],n+r[0].length):-1}function ot(t,e,n){var r=W.exec(e.slice(n,n+4));return r?(t.y=+r[0],n+r[0].length):-1}function st(t,e,n){var r=W.exec(e.slice(n,n+2));return r?(t.y=+r[0]+(+r[0]>68?1900:2e3),n+r[0].length):-1}function ut(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 ct(t,e,n){var r=W.exec(e.slice(n,n+1));return r?(t.q=3*r[0]-3,n+r[0].length):-1}function lt(t,e,n){var r=W.exec(e.slice(n,n+2));return r?(t.m=r[0]-1,n+r[0].length):-1}function ft(t,e,n){var r=W.exec(e.slice(n,n+2));return r?(t.d=+r[0],n+r[0].length):-1}function ht(t,e,n){var r=W.exec(e.slice(n,n+3));return r?(t.m=0,t.d=+r[0],n+r[0].length):-1}function dt(t,e,n){var r=W.exec(e.slice(n,n+2));return r?(t.H=+r[0],n+r[0].length):-1}function gt(t,e,n){var r=W.exec(e.slice(n,n+2));return r?(t.M=+r[0],n+r[0].length):-1}function pt(t,e,n){var r=W.exec(e.slice(n,n+2));return r?(t.S=+r[0],n+r[0].length):-1}function vt(t,e,n){var r=W.exec(e.slice(n,n+3));return r?(t.L=+r[0],n+r[0].length):-1}function yt(t,e,n){var r=W.exec(e.slice(n,n+6));return r?(t.L=Math.floor(r[0]/1e3),n+r[0].length):-1}function xt(t,e,n){var r=q.exec(e.slice(n,n+1));return r?n+r[0].length:-1}function _t(t,e,n){var r=W.exec(e.slice(n));return r?(t.Q=+r[0],n+r[0].length):-1}function mt(t,e,n){var r=W.exec(e.slice(n));return r?(t.s=+r[0],n+r[0].length):-1}function bt(t,e){return K(t.getDate(),e,2)}function wt(t,e){return K(t.getHours(),e,2)}function Tt(t,e){return K(t.getHours()%12||12,e,2)}function At(t,e){return K(1+D.count(z(t),t),e,3)}function St(t,e){return K(t.getMilliseconds(),e,3)}function kt(t,e){return St(t,e)+"000"}function Et(t,e){return K(t.getMonth()+1,e,2)}function Mt(t,e){return K(t.getMinutes(),e,2)}function Ct(t,e){return K(t.getSeconds(),e,2)}function Ot(t){var e=t.getDay();return 0===e?7:e}function Rt(t,e){return K(k.count(z(t)-1,t),e,2)}function Lt(t){var e=t.getDay();return e>=4||0===e?O(t):O.ceil(t)}function It(t,e){return t=Lt(t),K(O.count(z(t),t)+(4===z(t).getDay()),e,2)}function Dt(t){return t.getDay()}function Pt(t,e){return K(E.count(z(t)-1,t),e,2)}function zt(t,e){return K(t.getFullYear()%100,e,2)}function Ft(t,e){return K((t=Lt(t)).getFullYear()%100,e,2)}function Nt(t,e){return K(t.getFullYear()%1e4,e,4)}function jt(t,e){var n=t.getDay();return K((t=n>=4||0===n?O(t):O.ceil(t)).getFullYear()%1e4,e,4)}function Xt(t){var e=t.getTimezoneOffset();return(e>0?"-":(e*=-1,"+"))+K(e/60|0,"0",2)+K(e%60,"0",2)}function Bt(t,e){return K(t.getUTCDate(),e,2)}function $t(t,e){return K(t.getUTCHours(),e,2)}function Ut(t,e){return K(t.getUTCHours()%12||12,e,2)}function Yt(t,e){return K(1+A.count(N(t),t),e,3)}function Vt(t,e){return K(t.getUTCMilliseconds(),e,3)}function Gt(t,e){return Vt(t,e)+"000"}function Ht(t,e){return K(t.getUTCMonth()+1,e,2)}function Wt(t,e){return K(t.getUTCMinutes(),e,2)}function qt(t,e){return K(t.getUTCSeconds(),e,2)}function Zt(t){var e=t.getUTCDay();return 0===e?7:e}function Kt(t,e){return K(v.count(N(t)-1,t),e,2)}function Jt(t){var e=t.getUTCDay();return e>=4||0===e?m(t):m.ceil(t)}function Qt(t,e){return t=Jt(t),K(m.count(N(t),t)+(4===N(t).getUTCDay()),e,2)}function te(t){return t.getUTCDay()}function ee(t,e){return K(y.count(N(t)-1,t),e,2)}function ne(t,e){return K(t.getUTCFullYear()%100,e,2)}function re(t,e){return K((t=Jt(t)).getUTCFullYear()%100,e,2)}function ie(t,e){return K(t.getUTCFullYear()%1e4,e,4)}function ae(t,e){var n=t.getUTCDay();return K((t=n>=4||0===n?m(t):m.ceil(t)).getUTCFullYear()%1e4,e,4)}function oe(){return"+0000"}function se(){return"%"}function ue(t){return+t}function ce(t){return Math.floor(+t/1e3)}function le(){}function fe(t){return null==t?le:function(){return this.querySelector(t)}}function he(t){return"object"==typeof t&&"length"in t?t:Array.from(t)}function de(){return[]}function ge(t){return null==t?de:function(){return this.querySelectorAll(t)}}function pe(t){return function(){return this.matches(t)}}function ve(t){return function(e){return e.matches(t)}}$=function(t){function e(t,e){return function(n){var r,i,a,o=[],s=-1,u=0,c=t.length;for(n instanceof Date||(n=new Date(+n));++s<c;)37===t.charCodeAt(s)&&(o.push(t.slice(u,s)),null==(i=H[r=t.charAt(++s)])?i="e"===r?" ":"0":r=t.charAt(++s),(a=e[r])&&(r=a(n,i)),o.push(r),u=s+1);return o.push(t.slice(u,s)),o.join("")}}function n(t,e){return function(n){var i,a,o=B(1900,void 0,1);if(r(o,t,n+="",0)!=n.length)return null;if("Q"in o)return new Date(o.Q);if("s"in o)return new Date(1e3*o.s+("L"in o?o.L:0));if(e&&!("Z"in o)&&(o.Z=0),"p"in o&&(o.H=o.H%12+12*o.p),void 0===o.m&&(o.m="q"in o?o.q:0),"V"in o){if(o.V<1||o.V>53)return null;"w"in o||(o.w=1),"Z"in o?(a=(i=X(B(o.y,0,1))).getUTCDay(),i=a>4||0===a?y.ceil(i):y(i),i=A.offset(i,7*(o.V-1)),o.y=i.getUTCFullYear(),o.m=i.getUTCMonth(),o.d=i.getUTCDate()+(o.w+6)%7):(a=(i=j(B(o.y,0,1))).getDay(),i=a>4||0===a?E.ceil(i):E(i),i=D.offset(i,7*(o.V-1)),o.y=i.getFullYear(),o.m=i.getMonth(),o.d=i.getDate()+(o.w+6)%7)}else("W"in o||"U"in o)&&("w"in o||(o.w="u"in o?o.u%7:"W"in o?1:0),a="Z"in o?X(B(o.y,0,1)).getUTCDay():j(B(o.y,0,1)).getDay(),o.m=0,o.d="W"in o?(o.w+6)%7+7*o.W-(a+5)%7:o.w+7*o.U-(a+6)%7);return"Z"in o?(o.H+=o.Z/100|0,o.M+=o.Z%100,X(o)):j(o)}}function r(t,e,n,r){for(var i,a,o=0,s=e.length,u=n.length;o<s;){if(r>=u)return-1;if(37===(i=e.charCodeAt(o++))){if(i=e.charAt(o++),!(a=k[i in H?e.charAt(o++):i])||(r=a(t,n,r))<0)return-1}else if(i!=n.charCodeAt(r++))return-1}return r}var i=t.dateTime,a=t.date,o=t.time,s=t.periods,u=t.days,c=t.shortDays,l=t.months,f=t.shortMonths,h=Q(s),d=tt(s),g=Q(u),p=tt(u),v=Q(c),x=tt(c),_=Q(l),m=tt(l),b=Q(f),w=tt(f),T={a:function(t){return c[t.getDay()]},A:function(t){return u[t.getDay()]},b:function(t){return f[t.getMonth()]},B:function(t){return l[t.getMonth()]},c:null,d:bt,e:bt,f:kt,g:Ft,G:jt,H:wt,I:Tt,j:At,L:St,m:Et,M:Mt,p:function(t){return s[+(t.getHours()>=12)]},q:function(t){return 1+~~(t.getMonth()/3)},Q:ue,s:ce,S:Ct,u:Ot,U:Rt,V:It,w:Dt,W:Pt,x:null,X:null,y:zt,Y:Nt,Z:Xt,"%":se},S={a:function(t){return c[t.getUTCDay()]},A:function(t){return u[t.getUTCDay()]},b:function(t){return f[t.getUTCMonth()]},B:function(t){return l[t.getUTCMonth()]},c:null,d:Bt,e:Bt,f:Gt,g:re,G:ae,H:$t,I:Ut,j:Yt,L:Vt,m:Ht,M:Wt,p:function(t){return s[+(t.getUTCHours()>=12)]},q:function(t){return 1+~~(t.getUTCMonth()/3)},Q:ue,s:ce,S:qt,u:Zt,U:Kt,V:Qt,w:te,W:ee,x:null,X:null,y:ne,Y:ie,Z:oe,"%":se},k={a:function(t,e,n){var r=v.exec(e.slice(n));return r?(t.w=x.get(r[0].toLowerCase()),n+r[0].length):-1},A:function(t,e,n){var r=g.exec(e.slice(n));return r?(t.w=p.get(r[0].toLowerCase()),n+r[0].length):-1},b:function(t,e,n){var r=b.exec(e.slice(n));return r?(t.m=w.get(r[0].toLowerCase()),n+r[0].length):-1},B:function(t,e,n){var r=_.exec(e.slice(n));return r?(t.m=m.get(r[0].toLowerCase()),n+r[0].length):-1},c:function(t,e,n){return r(t,i,e,n)},d:ft,e:ft,f:yt,g:st,G:ot,H:dt,I:dt,j:ht,L:vt,m:lt,M:gt,p:function(t,e,n){var r=h.exec(e.slice(n));return r?(t.p=d.get(r[0].toLowerCase()),n+r[0].length):-1},q:ct,Q:_t,s:mt,S:pt,u:nt,U:rt,V:it,w:et,W:at,x:function(t,e,n){return r(t,a,e,n)},X:function(t,e,n){return r(t,o,e,n)},y:st,Y:ot,Z:ut,"%":xt};return T.x=e(a,T),T.X=e(o,T),T.c=e(i,T),S.x=e(a,S),S.X=e(o,S),S.c=e(i,S),{format:function(t){var n=e(t+="",T);return n.toString=function(){return t},n},parse:function(t){var e=n(t+="",!1);return e.toString=function(){return t},e},utcFormat:function(t){var n=e(t+="",S);return n.toString=function(){return t},n},utcParse:function(t){var e=n(t+="",!0);return e.toString=function(){return t},e}}}({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"]}),U=$.format,Y=$.parse,V=$.utcFormat,G=$.utcParse;var ye=Array.prototype.find;function xe(){return this.firstElementChild}var _e=Array.prototype.filter;function me(){return this.children}function be(t){return Array(t.length)}function we(t,e){this.ownerDocument=t.ownerDocument,this.namespaceURI=t.namespaceURI,this._next=null,this._parent=t,this.__data__=e}function Te(t){return function(){return t}}function Ae(t,e,n,r,i,a){for(var o,s=0,u=e.length,c=a.length;s<c;++s)(o=e[s])?(o.__data__=a[s],r[s]=o):n[s]=new we(t,a[s]);for(;s<u;++s)(o=e[s])&&(i[s]=o)}function Se(t,e,n,r,i,a,o){var s,u,c,l=new Map,f=e.length,h=a.length,d=Array(f);for(s=0;s<f;++s)(u=e[s])&&(d[s]=c=o.call(u,u.__data__,s,e)+"",l.has(c)?i[s]=u:l.set(c,u));for(s=0;s<h;++s)c=o.call(t,a[s],s,a)+"",(u=l.get(c))?(r[s]=u,u.__data__=a[s],l.delete(c)):n[s]=new we(t,a[s]);for(s=0;s<f;++s)(u=e[s])&&l.get(d[s])===u&&(i[s]=u)}function ke(t){return t.__data__}function Ee(t,e){return t<e?-1:t>e?1:t>=e?0:NaN}function Me(t,e){var n="undefined"!=typeof Symbol&&t[Symbol.iterator]||t["@@iterator"];if(n)return(n=n.call(t)).next.bind(n);if(Array.isArray(t)||(n=function(t,e){if(t){if("string"==typeof t)return Ce(t,e);var n=Object.prototype.toString.call(t).slice(8,-1);return"Object"===n&&t.constructor&&(n=t.constructor.name),"Map"===n||"Set"===n?Array.from(t):"Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?Ce(t,e):void 0}}(t))||e&&t&&"number"==typeof t.length){n&&(t=n);var r=0;return function(){return r>=t.length?{done:!0}:{done:!1,value:t[r++]}}}throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}function Ce(t,e){(null==e||e>t.length)&&(e=t.length);for(var n=0,r=Array(e);n<e;n++)r[n]=t[n];return r}we.prototype={constructor:we,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)}};var Oe="http://www.w3.org/1999/xhtml",Re={svg:"http://www.w3.org/2000/svg",xhtml:"http://www.w3.org/1999/xhtml",xlink:"http://www.w3.org/1999/xlink",xml:"http://www.w3.org/XML/1998/namespace",xmlns:"http://www.w3.org/2000/xmlns/"};function Le(t){var e=t+="",n=e.indexOf(":");return n>=0&&"xmlns"!==(e=t.slice(0,n))&&(t=t.slice(n+1)),Re.hasOwnProperty(e)?{space:Re[e],local:t}:t}function Ie(t){return function(){this.removeAttribute(t)}}function De(t){return function(){this.removeAttributeNS(t.space,t.local)}}function Pe(t,e){return function(){this.setAttribute(t,e)}}function ze(t,e){return function(){this.setAttributeNS(t.space,t.local,e)}}function Fe(t,e){return function(){var n=e.apply(this,arguments);null==n?this.removeAttribute(t):this.setAttribute(t,n)}}function Ne(t,e){return function(){var n=e.apply(this,arguments);null==n?this.removeAttributeNS(t.space,t.local):this.setAttributeNS(t.space,t.local,n)}}function je(t){return t.ownerDocument&&t.ownerDocument.defaultView||t.document&&t||t.defaultView}function Xe(t){return function(){this.style.removeProperty(t)}}function Be(t,e,n){return function(){this.style.setProperty(t,e,n)}}function $e(t,e,n){return function(){var r=e.apply(this,arguments);null==r?this.style.removeProperty(t):this.style.setProperty(t,r,n)}}function Ue(t,e){return t.style.getPropertyValue(e)||je(t).getComputedStyle(t,null).getPropertyValue(e)}function Ye(t){return function(){delete this[t]}}function Ve(t,e){return function(){this[t]=e}}function Ge(t,e){return function(){var n=e.apply(this,arguments);null==n?delete this[t]:this[t]=n}}function He(t){return t.trim().split(/^|\s+/)}function We(t){return t.classList||new qe(t)}function qe(t){this._node=t,this._names=He(t.getAttribute("class")||"")}function Ze(t,e){for(var n=We(t),r=-1,i=e.length;++r<i;)n.add(e[r])}function Ke(t,e){for(var n=We(t),r=-1,i=e.length;++r<i;)n.remove(e[r])}function Je(t){return function(){Ze(this,t)}}function Qe(t){return function(){Ke(this,t)}}function tn(t,e){return function(){(e.apply(this,arguments)?Ze:Ke)(this,t)}}function en(){this.textContent=""}function nn(t){return function(){this.textContent=t}}function rn(t){return function(){var e=t.apply(this,arguments);this.textContent=null==e?"":e}}function an(){this.innerHTML=""}function on(t){return function(){this.innerHTML=t}}function sn(t){return function(){var e=t.apply(this,arguments);this.innerHTML=null==e?"":e}}function un(){this.nextSibling&&this.parentNode.appendChild(this)}function cn(){this.previousSibling&&this.parentNode.insertBefore(this,this.parentNode.firstChild)}function ln(t){return function(){var e=this.ownerDocument,n=this.namespaceURI;return n===Oe&&e.documentElement.namespaceURI===Oe?e.createElement(t):e.createElementNS(n,t)}}function fn(t){return function(){return this.ownerDocument.createElementNS(t.space,t.local)}}function hn(t){var e=Le(t);return(e.local?fn:ln)(e)}function dn(){return null}function gn(){var t=this.parentNode;t&&t.removeChild(this)}function pn(){var t=this.cloneNode(!1),e=this.parentNode;return e?e.insertBefore(t,this.nextSibling):t}function vn(){var t=this.cloneNode(!0),e=this.parentNode;return e?e.insertBefore(t,this.nextSibling):t}function yn(t){return t.trim().split(/^|\s+/).map((function(t){var e="",n=t.indexOf(".");return n>=0&&(e=t.slice(n+1),t=t.slice(0,n)),{type:t,name:e}}))}function xn(t){return function(){var e=this.__on;if(e){for(var n,r=0,i=-1,a=e.length;r<a;++r)n=e[r],t.type&&n.type!==t.type||n.name!==t.name?e[++i]=n:this.removeEventListener(n.type,n.listener,n.options);++i?e.length=i:delete this.__on}}}function _n(t,e,n){return function(){var r,i=this.__on,a=function(t){return function(e){t.call(this,e,this.__data__)}}(e);if(i)for(var o=0,s=i.length;o<s;++o)if((r=i[o]).type===t.type&&r.name===t.name)return this.removeEventListener(r.type,r.listener,r.options),this.addEventListener(r.type,r.listener=a,r.options=n),void(r.value=e);this.addEventListener(t.type,a,n),r={type:t.type,name:t.name,value:e,listener:a,options:n},i?i.push(r):this.__on=[r]}}function mn(t,e,n){var r=je(t),i=r.CustomEvent;"function"==typeof i?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 bn(t,e){return function(){return mn(this,t,e)}}function wn(t,e){return function(){return mn(this,t,e.apply(this,arguments))}}qe.prototype={add:function(t){this._names.indexOf(t)<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}};var Tn,An=n(404),Sn=n.n(An),kn=Sn().mark(En);function En(){var t,e,n,r,i,a,o;return Sn().wrap((function(s){for(;;)switch(s.prev=s.next){case 0:t=this._groups,e=0,n=t.length;case 1:if(!(e<n)){s.next=14;break}i=t[e],a=0,o=i.length;case 3:if(!(a<o)){s.next=11;break}if(s.t0=r=i[a],!s.t0){s.next=8;break}return s.next=8,r;case 8:++a,s.next=3;break;case 11:++e,s.next=1;break;case 14:case"end":return s.stop()}}),kn,this)}var Mn=[null];function Cn(t,e){this._groups=t,this._parents=e}function On(){return new Cn([[document.documentElement]],Mn)}Cn.prototype=On.prototype=((Tn={constructor:Cn,select:function(t){"function"!=typeof t&&(t=fe(t));for(var e=this._groups,n=e.length,r=Array(n),i=0;i<n;++i)for(var a,o,s=e[i],u=s.length,c=r[i]=Array(u),l=0;l<u;++l)(a=s[l])&&(o=t.call(a,a.__data__,l,s))&&("__data__"in a&&(o.__data__=a.__data__),c[l]=o);return new Cn(r,this._parents)},selectAll:function(t){t="function"==typeof t?function(t){return function(){var e=t.apply(this,arguments);return null==e?[]:he(e)}}(t):ge(t);for(var e=this._groups,n=e.length,r=[],i=[],a=0;a<n;++a)for(var o,s=e[a],u=s.length,c=0;c<u;++c)(o=s[c])&&(r.push(t.call(o,o.__data__,c,s)),i.push(o));return new Cn(r,i)},selectChild:function(t){return this.select(null==t?xe:function(t){return function(){return ye.call(this.children,t)}}("function"==typeof t?t:ve(t)))},selectChildren:function(t){return this.selectAll(null==t?me:function(t){return function(){return _e.call(this.children,t)}}("function"==typeof t?t:ve(t)))},filter:function(t){"function"!=typeof t&&(t=pe(t));for(var e=this._groups,n=e.length,r=Array(n),i=0;i<n;++i)for(var a,o=e[i],s=o.length,u=r[i]=[],c=0;c<s;++c)(a=o[c])&&t.call(a,a.__data__,c,o)&&u.push(a);return new Cn(r,this._parents)},data:function(t,e){if(!arguments.length)return Array.from(this,ke);var n=e?Se:Ae,r=this._parents,i=this._groups;"function"!=typeof t&&(t=Te(t));for(var a=i.length,o=Array(a),s=Array(a),u=Array(a),c=0;c<a;++c){var l=r[c],f=i[c],h=f.length,d=he(t.call(l,l&&l.__data__,c,r)),g=d.length,p=s[c]=Array(g),v=o[c]=Array(g),y=u[c]=Array(h);n(l,f,p,v,y,d,e);for(var x,_,m=0,b=0;m<g;++m)if(x=p[m]){for(m>=b&&(b=m+1);!(_=v[b])&&++b<g;);x._next=_||null}}return(o=new Cn(o,r))._enter=s,o._exit=u,o},enter:function(){return new Cn(this._enter||this._groups.map(be),this._parents)},exit:function(){return new Cn(this._exit||this._groups.map(be),this._parents)},join:function(t,e,n){var r=this.enter(),i=this,a=this.exit();return r="function"==typeof t?t(r):r.append(t+""),null!=e&&(i=e(i)),null==n?a.remove():n(a),r&&i?r.merge(i).order():i},merge:function(t){if(!(t instanceof Cn))throw new Error("invalid merge");for(var e=this._groups,n=t._groups,r=e.length,i=n.length,a=Math.min(r,i),o=Array(r),s=0;s<a;++s)for(var u,c=e[s],l=n[s],f=c.length,h=o[s]=Array(f),d=0;d<f;++d)(u=c[d]||l[d])&&(h[d]=u);for(;s<r;++s)o[s]=e[s];return new Cn(o,this._parents)},selection:function(){return this},order:function(){for(var t=this._groups,e=-1,n=t.length;++e<n;)for(var r,i=t[e],a=i.length-1,o=i[a];--a>=0;)(r=i[a])&&(o&&4^r.compareDocumentPosition(o)&&o.parentNode.insertBefore(r,o),o=r);return this},sort:function(t){function e(e,n){return e&&n?t(e.__data__,n.__data__):!e-!n}t||(t=Ee);for(var n=this._groups,r=n.length,i=Array(r),a=0;a<r;++a){for(var o,s=n[a],u=s.length,c=i[a]=Array(u),l=0;l<u;++l)(o=s[l])&&(c[l]=o);c.sort(e)}return new Cn(i,this._parents).order()},call:function(){var t=arguments[0];return arguments[0]=this,t.apply(null,arguments),this},nodes:function(){return Array.from(this)},node:function(){for(var t=this._groups,e=0,n=t.length;e<n;++e)for(var r,i=t[e],a=0,o=i.length;a<o;++a)if(r=i[a])return r;return null},size:function(){for(var t,e=0,n=Me(this);!(t=n()).done;)t.value,++e;return e},empty:function(){return!this.node()},each:function(t){for(var e=this._groups,n=0,r=e.length;n<r;++n)for(var i,a=e[n],o=0,s=a.length;o<s;++o)(i=a[o])&&t.call(i,i.__data__,o,a);return this},attr:function(t,e){var n=Le(t);if(arguments.length<2){var r=this.node();return n.local?r.getAttributeNS(n.space,n.local):r.getAttribute(n)}return this.each((null==e?n.local?De:Ie:"function"==typeof e?n.local?Ne:Fe:n.local?ze:Pe)(n,e))},style:function(t,e,n){return arguments.length>1?this.each((null==e?Xe:"function"==typeof e?$e:Be)(t,e,null==n?"":n)):Ue(this.node(),t)},property:function(t,e){return arguments.length>1?this.each((null==e?Ye:"function"==typeof e?Ge:Ve)(t,e)):this.node()[t]},classed:function(t,e){var n=He(t+"");if(arguments.length<2){for(var r=We(this.node()),i=-1,a=n.length;++i<a;)if(!r.contains(n[i]))return!1;return!0}return this.each(("function"==typeof e?tn:e?Je:Qe)(n,e))},text:function(t){return arguments.length?this.each(null==t?en:("function"==typeof t?rn:nn)(t)):this.node().textContent},html:function(t){return arguments.length?this.each(null==t?an:("function"==typeof t?sn:on)(t)):this.node().innerHTML},raise:function(){return this.each(un)},lower:function(){return this.each(cn)},append:function(t){var e="function"==typeof t?t:hn(t);return this.select((function(){return this.appendChild(e.apply(this,arguments))}))},insert:function(t,e){var n="function"==typeof t?t:hn(t),r=null==e?dn:"function"==typeof e?e:fe(e);return this.select((function(){return this.insertBefore(n.apply(this,arguments),r.apply(this,arguments)||null)}))},remove:function(){return this.each(gn)},clone:function(t){return this.select(t?vn:pn)},datum:function(t){return arguments.length?this.property("__data__",t):this.node().__data__},on:function(t,e,n){var r,i,a=yn(t+""),o=a.length;if(!(arguments.length<2)){for(s=e?_n:xn,r=0;r<o;++r)this.each(s(a[r],e,n));return this}var s=this.node().__on;if(s)for(var u,c=0,l=s.length;c<l;++c)for(r=0,u=s[c];r<o;++r)if((i=a[r]).type===u.type&&i.name===u.name)return u.value},dispatch:function(t,e){return this.each(("function"==typeof e?wn:bn)(t,e))}})[Symbol.iterator]=En,Tn);var Rn=On;function Ln(t){return"string"==typeof t?new Cn([[document.querySelector(t)]],[document.documentElement]):new Cn([[t]],Mn)}var In={arc:"bb-arc",arcLabelLine:"bb-arc-label-line",arcs:"bb-arcs",area:"bb-area",areas:"bb-areas",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",bar:"bb-bar",bars:"bb-bars",brush:"bb-brush",button:"bb-button",buttonZoomReset:"bb-zoom-reset",candlestick:"bb-candlestick",candlesticks:"bb-candlesticks",chart:"bb-chart",chartArc:"bb-chart-arc",chartArcs:"bb-chart-arcs",chartArcsBackground:"bb-chart-arcs-background",chartArcsGaugeMax:"bb-chart-arcs-gauge-max",chartArcsGaugeMin:"bb-chart-arcs-gauge-min",chartArcsGaugeUnit:"bb-chart-arcs-gauge-unit",chartArcsTitle:"bb-chart-arcs-title",chartArcsGaugeTitle:"bb-chart-arcs-gauge-title",chartBar:"bb-chart-bar",chartBars:"bb-chart-bars",chartCandlestick:"bb-chart-candlestick",chartCandlesticks:"bb-chart-candlesticks",chartCircles:"bb-chart-circles",chartLine:"bb-chart-line",chartLines:"bb-chart-lines",chartRadar:"bb-chart-radar",chartRadars:"bb-chart-radars",chartText:"bb-chart-text",chartTexts:"bb-chart-texts",circle:"bb-circle",circles:"bb-circles",colorPattern:"bb-color-pattern",colorScale:"bb-colorscale",defocused:"bb-defocused",dragarea:"bb-dragarea",empty:"bb-empty",eventRect:"bb-event-rect",eventRects:"bb-event-rects",eventRectsMultiple:"bb-event-rects-multiple",eventRectsSingle:"bb-event-rects-single",focused:"bb-focused",gaugeValue:"bb-gauge-value",grid:"bb-grid",gridLines:"bb-grid-lines",legend:"bb-legend",legendBackground:"bb-legend-background",legendItem:"bb-legend-item",legendItemEvent:"bb-legend-item-event",legendItemFocused:"bb-legend-item-focused",legendItemHidden:"bb-legend-item-hidden",legendItemPoint:"bb-legend-item-point",legendItemTile:"bb-legend-item-tile",level:"bb-level",levels:"bb-levels",line:"bb-line",lines:"bb-lines",main:"bb-main",region:"bb-region",regions:"bb-regions",selectedCircle:"bb-selected-circle",selectedCircles:"bb-selected-circles",shape:"bb-shape",shapes:"bb-shapes",stanfordElements:"bb-stanford-elements",stanfordLine:"bb-stanford-line",stanfordLines:"bb-stanford-lines",stanfordRegion:"bb-stanford-region",stanfordRegions:"bb-stanford-regions",subchart:"bb-subchart",target:"bb-target",text:"bb-text",texts:"bb-texts",title:"bb-title",tooltip:"bb-tooltip",tooltipContainer:"bb-tooltip-container",tooltipName:"bb-tooltip-name",valueDown:"bb-value-down",valueUp:"bb-value-up",xgrid:"bb-xgrid",xgridFocus:"bb-xgrid-focus",xgridLine:"bb-xgrid-line",xgridLines:"bb-xgrid-lines",xgrids:"bb-xgrids",ygrid:"bb-ygrid",ygridFocus:"bb-ygrid-focus",ygridLine:"bb-ygrid-line",ygridLines:"bb-ygrid-lines",ygrids:"bb-ygrids",zoomBrush:"bb-zoom-brush",EXPANDED:"_expanded_",SELECTED:"_selected_",INCLUDED:"_included_",TextOverlapping:"text-overlapping"},Dn={element:function(){return{chart:null,main:null,svg:null,axis:{x:null,y:null,y2:null,subX: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}},state:function(){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,hasRadar:!1,current:{width:0,height:0,dataMax:0,maxTickWidths:{x:{size:0,ticks:[],clipPath:0,domain:""},y:{size:0,domain:""},y2:{size:0,domain:""}},types:[]},isLegendRight:!1,isLegendInset:!1,isLegendTop:!1,isLegendLeft:!1,legendStep:0,legendItemWidth:0,legendItemHeight:0,legendHasRendered:!1,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,toggling:!1,zooming:!1,hasNegativeValue:!1,hasPositiveValue:!0,orgAreaOpacity:"0.2",hiddenTargetIds:[],hiddenLegendIds:[],focusedTargetIds:[],defocusedTargetIds:[],radius:0,innerRadius:0,outerRadius:void 0,innerRadiusRatio:0,gaugeArcWidth:0,radiusExpanded:0,xgridAttr:{x1:null,x2:null,y1:null,y2:null}}}},Pn=function(){function t(){var t=this;Object.keys(Dn).forEach((function(e){t[e]=new Dn[e]}))}return t.prototype.getStore=function(t){return this[t]},t}();function zn(t,e,n){return e in t?Object.defineProperty(t,e,{value:n,enumerable:!0,configurable:!0,writable:!0}):t[e]=n,t}var Fn={bindto:"#chart",background:{},clipPath:!0,svg_classname:void 0,size_width:void 0,size_height:void 0,padding_left:void 0,padding_right:void 0,padding_top:void 0,padding_bottom:void 0,resize_auto:!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:350,plugins:[],render:{},regions:[]},Nn={data_x:void 0,data_idConverter:function(t){return t},data_names:{},data_classes:{},data_type:void 0,data_types:{},data_order:"desc",data_groups:[],data_color:void 0,data_colors:{},data_labels:{},data_labels_backgroundColors:void 0,data_labels_colors:void 0,data_labels_position:{},data_hide:!1,data_filter:void 0,data_onclick:function(){},data_onover:function(){},data_onout:function(){},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:""},jn={color_pattern:[],color_tiles:void 0,color_threshold:{},color_onover:void 0},Xn={interaction_enabled:!0,interaction_brighten:!0,interaction_inputType_mouse:!0,interaction_inputType_touch:{}},Bn={legend_show:!0,legend_hide:!1,legend_contents_bindto:void 0,legend_contents_template:void 0,legend_position:"bottom",legend_inset_anchor:"top-left",legend_inset_x:10,legend_inset_y:0,legend_inset_step:void 0,legend_item_onclick:void 0,legend_item_onover:void 0,legend_item_onout:void 0,legend_equally:!1,legend_padding:0,legend_item_tile_width:10,legend_item_tile_height:10,legend_usePoint:!1},$n={title_text:void 0,title_padding:{top:0,right:0,bottom:0,left:0},title_position:"center"},Un={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:{top:"0px",left:"50px"},tooltip_linked:!1,tooltip_linked_name:"",tooltip_onshow:function(){},tooltip_onhide:function(){},tooltip_onshown:function(){},tooltip_onhidden:function(){},tooltip_order:null};function Yn(t,e){if(t=function(t){for(var e;e=t.sourceEvent;)t=e;return t}(t),void 0===e&&(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())).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]}var Vn={value:function(){}};function Gn(){for(var t,e=0,n=arguments.length,r={};e<n;++e){if(!(t=arguments[e]+"")||t in r||/[\s.]/.test(t))throw new Error("illegal type: "+t);r[t]=[]}return new Hn(r)}function Hn(t){this._=t}function Wn(t,e){return t.trim().split(/^|\s+/).map((function(t){var n="",r=t.indexOf(".");if(r>=0&&(n=t.slice(r+1),t=t.slice(0,r)),t&&!e.hasOwnProperty(t))throw new Error("unknown type: "+t);return{type:t,name:n}}))}function qn(t,e){for(var n,r=0,i=t.length;r<i;++r)if((n=t[r]).name===e)return n.value}function Zn(t,e,n){for(var r=0,i=t.length;r<i;++r)if(t[r].name===e){t[r]=Vn,t=t.slice(0,r).concat(t.slice(r+1));break}return null!=n&&t.push({name:e,value:n}),t}Hn.prototype=Gn.prototype={constructor:Hn,on:function(t,e){var n,r=this._,i=Wn(t+"",r),a=-1,o=i.length;if(!(arguments.length<2)){if(null!=e&&"function"!=typeof e)throw new Error("invalid callback: "+e);for(;++a<o;)if(n=(t=i[a]).type)r[n]=Zn(r[n],t.name,e);else if(null==e)for(n in r)r[n]=Zn(r[n],t.name,null);return this}for(;++a<o;)if((n=(t=i[a]).type)&&(n=qn(r[n],t.name)))return n},copy:function(){var t={},e=this._;for(var n in e)t[n]=e[n].slice();return new Hn(t)},call:function(t,e){if((n=arguments.length-2)>0)for(var n,r,i=Array(n),a=0;a<n;++a)i[a]=arguments[a+2];if(!this._.hasOwnProperty(t))throw new Error("unknown type: "+t);for(a=0,n=(r=this._[t]).length;a<n;++a)r[a].value.apply(e,i)},apply:function(t,e,n){if(!this._.hasOwnProperty(t))throw new Error("unknown type: "+t);for(var r=this._[t],i=0,a=r.length;i<a;++i)r[i].value.apply(e,n)}};var Kn=Gn;function Jn(t){t.stopImmediatePropagation()}function Qn(t){t.preventDefault(),t.stopImmediatePropagation()}function tr(t){var e=t.document.documentElement,n=Ln(t).on("dragstart.drag",Qn,!0);"onselectstart"in e?n.on("selectstart.drag",Qn,!0):(e.__noselect=e.style.MozUserSelect,e.style.MozUserSelect="none")}function er(t,e){var n=t.document.documentElement,r=Ln(t).on("dragstart.drag",null);e&&(r.on("click.drag",Qn,!0),setTimeout((function(){r.on("click.drag",null)}),0)),"onselectstart"in n?r.on("selectstart.drag",null):(n.style.MozUserSelect=n.__noselect,delete n.__noselect)}function nr(t,e,n){t.prototype=e.prototype=n,n.constructor=t}function rr(t,e){var n=Object.create(t.prototype);for(var r in e)n[r]=e[r];return n}function ir(){}var ar=.7,or=1/ar,sr=/^#([0-9a-f]{3,8})$/,ur=new RegExp("^rgb\\(\\s*([+-]?\\d+)\\s*,\\s*([+-]?\\d+)\\s*,\\s*([+-]?\\d+)\\s*\\)$"),cr=new RegExp("^rgb\\(\\s*([+-]?\\d*\\.?\\d+(?:[eE][+-]?\\d+)?)%\\s*,\\s*([+-]?\\d*\\.?\\d+(?:[eE][+-]?\\d+)?)%\\s*,\\s*([+-]?\\d*\\.?\\d+(?:[eE][+-]?\\d+)?)%\\s*\\)$"),lr=new RegExp("^rgba\\(\\s*([+-]?\\d+)\\s*,\\s*([+-]?\\d+)\\s*,\\s*([+-]?\\d+)\\s*,\\s*([+-]?\\d*\\.?\\d+(?:[eE][+-]?\\d+)?)\\s*\\)$"),fr=new RegExp("^rgba\\(\\s*([+-]?\\d*\\.?\\d+(?:[eE][+-]?\\d+)?)%\\s*,\\s*([+-]?\\d*\\.?\\d+(?:[eE][+-]?\\d+)?)%\\s*,\\s*([+-]?\\d*\\.?\\d+(?:[eE][+-]?\\d+)?)%\\s*,\\s*([+-]?\\d*\\.?\\d+(?:[eE][+-]?\\d+)?)\\s*\\)$"),hr=new RegExp("^hsl\\(\\s*([+-]?\\d*\\.?\\d+(?:[eE][+-]?\\d+)?)\\s*,\\s*([+-]?\\d*\\.?\\d+(?:[eE][+-]?\\d+)?)%\\s*,\\s*([+-]?\\d*\\.?\\d+(?:[eE][+-]?\\d+)?)%\\s*\\)$"),dr=new RegExp("^hsla\\(\\s*([+-]?\\d*\\.?\\d+(?:[eE][+-]?\\d+)?)\\s*,\\s*([+-]?\\d*\\.?\\d+(?:[eE][+-]?\\d+)?)%\\s*,\\s*([+-]?\\d*\\.?\\d+(?:[eE][+-]?\\d+)?)%\\s*,\\s*([+-]?\\d*\\.?\\d+(?:[eE][+-]?\\d+)?)\\s*\\)$"),gr={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};function pr(){return this.rgb().formatHex()}function vr(){return this.rgb().formatRgb()}function yr(t){var e,n;return t=(t+"").trim().toLowerCase(),(e=sr.exec(t))?(n=e[1].length,e=parseInt(e[1],16),6===n?xr(e):3===n?new wr(e>>8&15|e>>4&240,e>>4&15|240&e,(15&e)<<4|15&e,1):8===n?_r(e>>24&255,e>>16&255,e>>8&255,(255&e)/255):4===n?_r(e>>12&15|e>>8&240,e>>8&15|e>>4&240,e>>4&15|240&e,((15&e)<<4|15&e)/255):null):(e=ur.exec(t))?new wr(e[1],e[2],e[3],1):(e=cr.exec(t))?new wr(255*e[1]/100,255*e[2]/100,255*e[3]/100,1):(e=lr.exec(t))?_r(e[1],e[2],e[3],e[4]):(e=fr.exec(t))?_r(255*e[1]/100,255*e[2]/100,255*e[3]/100,e[4]):(e=hr.exec(t))?kr(e[1],e[2]/100,e[3]/100,1):(e=dr.exec(t))?kr(e[1],e[2]/100,e[3]/100,e[4]):gr.hasOwnProperty(t)?xr(gr[t]):"transparent"===t?new wr(NaN,NaN,NaN,0):null}function xr(t){return new wr(t>>16&255,t>>8&255,255&t,1)}function _r(t,e,n,r){return r<=0&&(t=e=n=NaN),new wr(t,e,n,r)}function mr(t){return t instanceof ir||(t=yr(t)),t?new wr((t=t.rgb()).r,t.g,t.b,t.opacity):new wr}function br(t,e,n,r){return 1===arguments.length?mr(t):new wr(t,e,n,null==r?1:r)}function wr(t,e,n,r){this.r=+t,this.g=+e,this.b=+n,this.opacity=+r}function Tr(){return"#"+Sr(this.r)+Sr(this.g)+Sr(this.b)}function Ar(){var t=this.opacity;return(1===(t=isNaN(t)?1:Math.max(0,Math.min(1,t)))?"rgb(":"rgba(")+Math.max(0,Math.min(255,Math.round(this.r)||0))+", "+Math.max(0,Math.min(255,Math.round(this.g)||0))+", "+Math.max(0,Math.min(255,Math.round(this.b)||0))+(1===t?")":", "+t+")")}function Sr(t){return((t=Math.max(0,Math.min(255,Math.round(t)||0)))<16?"0":"")+t.toString(16)}function kr(t,e,n,r){return r<=0?t=e=n=NaN:n<=0||n>=1?t=e=NaN:e<=0&&(t=NaN),new Mr(t,e,n,r)}function Er(t){if(t instanceof Mr)return new Mr(t.h,t.s,t.l,t.opacity);if(t instanceof ir||(t=yr(t)),!t)return new Mr;if(t instanceof Mr)return t;var e=(t=t.rgb()).r/255,n=t.g/255,r=t.b/255,i=Math.min(e,n,r),a=Math.max(e,n,r),o=NaN,s=a-i,u=(a+i)/2;return s?(o=e===a?(n-r)/s+6*(n<r):n===a?(r-e)/s+2:(e-n)/s+4,s/=u<.5?a+i:2-a-i,o*=60):s=u>0&&u<1?0:o,new Mr(o,s,u,t.opacity)}function Mr(t,e,n,r){this.h=+t,this.s=+e,this.l=+n,this.opacity=+r}function Cr(t,e,n){return 255*(t<60?e+(n-e)*t/60:t<180?n:t<240?e+(n-e)*(240-t)/60:e)}function Or(t,e,n,r,i){var a=t*t,o=a*t;return((1-3*t+3*a-o)*e+(4-6*a+3*o)*n+(1+3*t+3*a-3*o)*r+o*i)/6}nr(ir,yr,{copy:function(t){return Object.assign(new this.constructor,this,t)},displayable:function(){return this.rgb().displayable()},hex:pr,formatHex:pr,formatHsl:function(){return Er(this).formatHsl()},formatRgb:vr,toString:vr}),nr(wr,br,rr(ir,{brighter:function(t){return t=null==t?or:Math.pow(or,t),new wr(this.r*t,this.g*t,this.b*t,this.opacity)},darker:function(t){return t=null==t?ar:Math.pow(ar,t),new wr(this.r*t,this.g*t,this.b*t,this.opacity)},rgb:function(){return this},displayable:function(){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:Tr,formatHex:Tr,formatRgb:Ar,toString:Ar})),nr(Mr,(function(t,e,n,r){return 1===arguments.length?Er(t):new Mr(t,e,n,null==r?1:r)}),rr(ir,{brighter:function(t){return t=null==t?or:Math.pow(or,t),new Mr(this.h,this.s,this.l*t,this.opacity)},darker:function(t){return t=null==t?ar:Math.pow(ar,t),new Mr(this.h,this.s,this.l*t,this.opacity)},rgb:function(){var t=this.h%360+360*(this.h<0),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 wr(Cr(t>=240?t-240:t+120,i,r),Cr(t,i,r),Cr(t<120?t+240:t-120,i,r),this.opacity)},displayable:function(){return(0<=this.s&&this.s<=1||isNaN(this.s))&&0<=this.l&&this.l<=1&&0<=this.opacity&&this.opacity<=1},formatHsl:function(){var t=this.opacity;return(1===(t=isNaN(t)?1:Math.max(0,Math.min(1,t)))?"hsl(":"hsla(")+(this.h||0)+", "+100*(this.s||0)+"%, "+100*(this.l||0)+"%"+(1===t?")":", "+t+")")}}));var Rr=function(t){return function(){return t}};function Lr(t,e){return function(n){return t+n*e}}function Ir(t){return 1==(t=+t)?Dr:function(e,n){return n-e?function(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)}}(e,n,t):Rr(isNaN(e)?n:e)}}function Dr(t,e){var n=e-t;return n?Lr(t,n):Rr(isNaN(t)?e:t)}var Pr=function t(e){function n(t,e){var n=r((t=br(t)).r,(e=br(e)).r),i=r(t.g,e.g),a=r(t.b,e.b),o=Dr(t.opacity,e.opacity);return function(e){return t.r=n(e),t.g=i(e),t.b=a(e),t.opacity=o(e),t+""}}var r=Ir(e);return n.gamma=t,n}(1);function zr(t){return function(e){var n,r,i=e.length,a=Array(i),o=Array(i),s=Array(i);for(n=0;n<i;++n)r=br(e[n]),a[n]=r.r||0,o[n]=r.g||0,s[n]=r.b||0;return a=t(a),o=t(o),s=t(s),r.opacity=1,function(t){return r.r=a(t),r.g=o(t),r.b=s(t),r+""}}}zr((function(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],a=t[r+1],o=r>0?t[r-1]:2*i-a,s=r<e-1?t[r+2]:2*a-i;return Or((n-r/e)*e,o,i,a,s)}})),zr((function(t){var e=t.length;return function(n){var r=Math.floor(((n%=1)<0?++n:n)*e),i=t[(r+e-1)%e],a=t[r%e],o=t[(r+1)%e],s=t[(r+2)%e];return Or((n-r/e)*e,i,a,o,s)}}));function Fr(t,e){e||(e=[]);var n,r=t?Math.min(e.length,t.length):0,i=e.slice();return function(a){for(n=0;n<r;++n)i[n]=t[n]*(1-a)+e[n]*a;return i}}function Nr(t){return ArrayBuffer.isView(t)&&!(t instanceof DataView)}function jr(t,e){var n,r=e?e.length:0,i=t?Math.min(r,t.length):0,a=Array(i),o=Array(r);for(n=0;n<i;++n)a[n]=Gr(t[n],e[n]);for(;n<r;++n)o[n]=e[n];return function(t){for(n=0;n<i;++n)o[n]=a[n](t);return o}}function Xr(t,e){var n=new Date;return t=+t,e=+e,function(r){return n.setTime(t*(1-r)+e*r),n}}function Br(t,e){return t=+t,e=+e,function(n){return t*(1-n)+e*n}}function $r(t,e){var n,r={},i={};for(n in(null===t||"object"!=typeof t)&&(t={}),(null===e||"object"!=typeof e)&&(e={}),e)n in t?r[n]=Gr(t[n],e[n]):i[n]=e[n];return function(t){for(n in r)i[n]=r[n](t);return i}}var Ur=/[-+]?(?:\d+\.?\d*|\.?\d+)(?:[eE][-+]?\d+)?/g,Yr=new RegExp(Ur.source,"g");function Vr(t,e){var n,r,i,a=Ur.lastIndex=Yr.lastIndex=0,o=-1,s=[],u=[];for(t+="",e+="";(n=Ur.exec(t))&&(r=Yr.exec(e));)(i=r.index)>a&&(i=e.slice(a,i),s[o]?s[o]+=i:s[++o]=i),(n=n[0])===(r=r[0])?s[o]?s[o]+=r:s[++o]=r:(s[++o]=null,u.push({i:o,x:Br(n,r)})),a=Yr.lastIndex;return a<e.length&&(i=e.slice(a),s[o]?s[o]+=i:s[++o]=i),s.length<2?u[0]?function(t){return function(e){return t(e)+""}}(u[0].x):function(t){return function(){return t}}(e):(e=u.length,function(t){for(var n,r=0;r<e;++r)s[(n=u[r]).i]=n.x(t);return s.join("")})}function Gr(t,e){var n,r=typeof e;return null==e||"boolean"===r?Rr(e):("number"===r?Br:"string"===r?(n=yr(e))?(e=n,Pr):Vr:e instanceof yr?Pr:e instanceof Date?Xr:Nr(e)?Fr:Array.isArray(e)?jr:"function"!=typeof e.valueOf&&"function"!=typeof e.toString||isNaN(e)?$r:Br)(t,e)}var Hr,Wr,qr=0,Zr=0,Kr=0,Jr=0,Qr=0,ti=0,ei="object"==typeof performance&&performance.now?performance:Date,ni="object"==typeof window&&window.requestAnimationFrame?window.requestAnimationFrame.bind(window):function(t){setTimeout(t,17)};function ri(){return Qr||(ni(ii),Qr=ei.now()+ti)}function ii(){Qr=0}function ai(){this._call=this._time=this._next=null}function oi(t,e,n){var r=new ai;return r.restart(t,e,n),r}function si(){Qr=(Jr=ei.now())+ti,qr=Zr=0;try{!function(){ri(),++qr;for(var t,e=Hr;e;)(t=Qr-e._time)>=0&&e._call.call(null,t),e=e._next;--qr}()}finally{qr=0,function(){for(var t,e,n=Hr,r=1/0;n;)n._call?(r>n._time&&(r=n._time),t=n,n=n._next):(e=n._next,n._next=null,n=t?t._next=e:Hr=e);Wr=t,ci(r)}(),Qr=0}}function ui(){var t=ei.now(),e=t-Jr;e>1e3&&(ti-=e,Jr=t)}function ci(t){qr||(Zr&&(Zr=clearTimeout(Zr)),t-Qr>24?(t<1/0&&(Zr=setTimeout(si,t-ei.now()-ti)),Kr&&(Kr=clearInterval(Kr))):(!Kr&&(Jr=ei.now(),Kr=setInterval(ui,1e3)),qr=1,ni(si)))}function li(t,e,n){var r=new ai;return e=null==e?0:+e,r.restart((function(n){r.stop(),t(n+e)}),e,n),r}ai.prototype=oi.prototype={constructor:ai,restart:function(t,e,n){if("function"!=typeof t)throw new TypeError("callback is not a function");n=(null==n?ri():+n)+(null==e?0:+e),this._next||Wr===this||(Wr?Wr._next=this:Hr=this,Wr=this),this._call=t,this._time=n,ci()},stop:function(){this._call&&(this._call=null,this._time=1/0,ci())}};var fi=Kn("start","end","cancel","interrupt"),hi=[];function di(t,e,n,r,i,a){var o=t.__transition;if(o){if(n in o)return}else t.__transition={};!function(t,e,n){function r(u){var c,l,f,h;if(1!==n.state)return a();for(c in s)if((h=s[c]).name===n.name){if(3===h.state)return li(r);4===h.state?(h.state=6,h.timer.stop(),h.on.call("interrupt",t,t.__data__,h.index,h.group),delete s[c]):+c<e&&(h.state=6,h.timer.stop(),h.on.call("cancel",t,t.__data__,h.index,h.group),delete s[c])}if(li((function(){3===n.state&&(n.state=4,n.timer.restart(i,n.delay,n.time),i(u))})),n.state=2,n.on.call("start",t,t.__data__,n.index,n.group),2===n.state){for(n.state=3,o=Array(f=n.tween.length),c=0,l=-1;c<f;++c)(h=n.tween[c].value.call(t,t.__data__,n.index,n.group))&&(o[++l]=h);o.length=l+1}}function i(e){for(var r=e<n.duration?n.ease.call(null,e/n.duration):(n.timer.restart(a),n.state=5,1),i=-1,s=o.length;++i<s;)o[i].call(t,r);5===n.state&&(n.on.call("end",t,t.__data__,n.index,n.group),a())}function a(){for(var r in n.state=6,n.timer.stop(),delete s[e],s)return;delete t.__transition}var o,s=t.__transition;s[e]=n,n.timer=oi((function(t){n.state=1,n.timer.restart(r,n.delay,n.time),n.delay<=t&&r(t-n.delay)}),0,n.time)}(t,n,{name:e,index:r,group:i,on:fi,tween:hi,time:a.time,delay:a.delay,duration:a.duration,ease:a.ease,timer:null,state:0})}function gi(t,e){var n=vi(t,e);if(n.state>0)throw new Error("too late; already scheduled");return n}function pi(t,e){var n=vi(t,e);if(n.state>3)throw new Error("too late; already running");return n}function vi(t,e){var n=t.__transition;if(!n||!(n=n[e]))throw new Error("transition not found");return n}function yi(t,e){var n,r,i,a=t.__transition,o=!0;if(a){for(i in e=null==e?null:e+"",a)(n=a[i]).name===e?(r=n.state>2&&n.state<5,n.state=6,n.timer.stop(),n.on.call(r?"interrupt":"cancel",t,t.__data__,n.index,n.group),delete a[i]):o=!1;o&&delete t.__transition}}var xi,_i=180/Math.PI,mi={translateX:0,translateY:0,rotate:0,skewX:0,scaleX:1,scaleY:1};function bi(t,e,n,r,i,a){var o,s,u;return(o=Math.sqrt(t*t+e*e))&&(t/=o,e/=o),(u=t*n+e*r)&&(n-=t*u,r-=e*u),(s=Math.sqrt(n*n+r*r))&&(n/=s,r/=s,u/=s),t*r<e*n&&(t=-t,e=-e,u=-u,o=-o),{translateX:i,translateY:a,rotate:Math.atan2(e,t)*_i,skewX:Math.atan(u)*_i,scaleX:o,scaleY:s}}function wi(t,e,n,r){function i(t){return t.length?t.pop()+" ":""}return function(a,o){var s=[],u=[];return a=t(a),o=t(o),function(t,r,i,a,o,s){if(t!==i||r!==a){var u=o.push("translate(",null,e,null,n);s.push({i:u-4,x:Br(t,i)},{i:u-2,x:Br(r,a)})}else(i||a)&&o.push("translate("+i+e+a+n)}(a.translateX,a.translateY,o.translateX,o.translateY,s,u),function(t,e,n,a){t===e?e&&n.push(i(n)+"rotate("+e+r):(t-e>180?e+=360:e-t>180&&(t+=360),a.push({i:n.push(i(n)+"rotate(",null,r)-2,x:Br(t,e)}))}(a.rotate,o.rotate,s,u),function(t,e,n,a){t===e?e&&n.push(i(n)+"skewX("+e+r):a.push({i:n.push(i(n)+"skewX(",null,r)-2,x:Br(t,e)})}(a.skewX,o.skewX,s,u),function(t,e,n,r,a,o){if(t!==n||e!==r){var s=a.push(i(a)+"scale(",null,",",null,")");o.push({i:s-4,x:Br(t,n)},{i:s-2,x:Br(e,r)})}else(1!==n||1!==r)&&a.push(i(a)+"scale("+n+","+r+")")}(a.scaleX,a.scaleY,o.scaleX,o.scaleY,s,u),a=o=null,function(t){for(var e,n=-1,r=u.length;++n<r;)s[(e=u[n]).i]=e.x(t);return s.join("")}}}var Ti=wi((function(t){var e=new("function"==typeof DOMMatrix?DOMMatrix:WebKitCSSMatrix)(t+"");return e.isIdentity?mi:bi(e.a,e.b,e.c,e.d,e.e,e.f)}),"px, ","px)","deg)"),Ai=wi((function(t){return null==t?mi:(xi||(xi=document.createElementNS("http://www.w3.org/2000/svg","g")),xi.setAttribute("transform",t),(t=xi.transform.baseVal.consolidate())?bi((t=t.matrix).a,t.b,t.c,t.d,t.e,t.f):mi)}),", ",")",")");function Si(t,e){var n,r;return function(){var i=pi(this,t),a=i.tween;if(a!==n)for(var o=0,s=(r=n=a).length;o<s;++o)if(r[o].name===e){(r=r.slice()).splice(o,1);break}i.tween=r}}function ki(t,e,n){var r,i;if("function"!=typeof n)throw new Error;return function(){var a=pi(this,t),o=a.tween;if(o!==r){i=(r=o).slice();for(var s={name:e,value:n},u=0,c=i.length;u<c;++u)if(i[u].name===e){i[u]=s;break}u===c&&i.push(s)}a.tween=i}}function Ei(t,e,n){var r=t._id;return t.each((function(){var t=pi(this,r);(t.value||(t.value={}))[e]=n.apply(this,arguments)})),function(t){return vi(t,r).value[e]}}function Mi(t,e){var n;return("number"==typeof e?Br:e instanceof yr?Pr:(n=yr(e))?(e=n,Pr):Vr)(t,e)}function Ci(t){return function(){this.removeAttribute(t)}}function Oi(t){return function(){this.removeAttributeNS(t.space,t.local)}}function Ri(t,e,n){var r,i;return function(){var a=this.getAttribute(t);return a===n+""?null:a===r?i:i=e(r=a,n)}}function Li(t,e,n){var r,i;return function(){var a=this.getAttributeNS(t.space,t.local);return a===n+""?null:a===r?i:i=e(r=a,n)}}function Ii(t,e,n){var r,i,a;return function(){var o,s,u=n(this);return null==u?void this.removeAttribute(t):(o=this.getAttribute(t))===(s=u+"")?null:o===r&&s===i?a:(i=s,a=e(r=o,u))}}function Di(t,e,n){var r,i,a;return function(){var o,s,u=n(this);return null==u?void this.removeAttributeNS(t.space,t.local):(o=this.getAttributeNS(t.space,t.local))===(s=u+"")?null:o===r&&s===i?a:(i=s,a=e(r=o,u))}}function Pi(t,e){return function(n){this.setAttribute(t,e.call(this,n))}}function zi(t,e){return function(n){this.setAttributeNS(t.space,t.local,e.call(this,n))}}function Fi(t,e){function n(){var n=e.apply(this,arguments);return n!==i&&(r=(i=n)&&zi(t,n)),r}var r,i;return n._value=e,n}function Ni(t,e){function n(){var n=e.apply(this,arguments);return n!==i&&(r=(i=n)&&Pi(t,n)),r}var r,i;return n._value=e,n}function ji(t,e){return function(){gi(this,t).delay=+e.apply(this,arguments)}}function Xi(t,e){return e=+e,function(){gi(this,t).delay=e}}function Bi(t,e){return function(){pi(this,t).duration=+e.apply(this,arguments)}}function $i(t,e){return e=+e,function(){pi(this,t).duration=e}}function Ui(t,e){if("function"!=typeof e)throw new Error;return function(){pi(this,t).ease=e}}function Yi(t,e,n){var r,i,a=function(t){return(t+"").trim().split(/^|\s+/).every((function(t){var e=t.indexOf(".");return e>=0&&(t=t.slice(0,e)),!t||"start"===t}))}(e)?gi:pi;return function(){var o=a(this,t),s=o.on;s!==r&&(i=(r=s).copy()).on(e,n),o.on=i}}var Vi,Gi=Rn.prototype.constructor;function Hi(t){return function(){this.style.removeProperty(t)}}function Wi(t,e,n){return function(r){this.style.setProperty(t,e.call(this,r),n)}}function qi(t,e,n){function r(){var r=e.apply(this,arguments);return r!==a&&(i=(a=r)&&Wi(t,r,n)),i}var i,a;return r._value=e,r}function Zi(t){return function(e){this.textContent=t.call(this,e)}}function Ki(t){function e(){var e=t.apply(this,arguments);return e!==r&&(n=(r=e)&&Zi(e)),n}var n,r;return e._value=t,e}var Ji=0;function Qi(t,e,n,r){this._groups=t,this._parents=e,this._name=n,this._id=r}function ta(t){return Rn().transition(t)}function ea(){return++Ji}var na=Rn.prototype;Qi.prototype=ta.prototype=((Vi={constructor:Qi,select:function(t){var e=this._name,n=this._id;"function"!=typeof t&&(t=fe(t));for(var r=this._groups,i=r.length,a=Array(i),o=0;o<i;++o)for(var s,u,c=r[o],l=c.length,f=a[o]=Array(l),h=0;h<l;++h)(s=c[h])&&(u=t.call(s,s.__data__,h,c))&&("__data__"in s&&(u.__data__=s.__data__),f[h]=u,di(f[h],e,n,h,f,vi(s,n)));return new Qi(a,this._parents,e,n)},selectAll:function(t){var e=this._name,n=this._id;"function"!=typeof t&&(t=ge(t));for(var r=this._groups,i=r.length,a=[],o=[],s=0;s<i;++s)for(var u,c=r[s],l=c.length,f=0;f<l;++f)if(u=c[f]){for(var h,d=t.call(u,u.__data__,f,c),g=vi(u,n),p=0,v=d.length;p<v;++p)(h=d[p])&&di(h,e,n,p,d,g);a.push(d),o.push(u)}return new Qi(a,o,e,n)},filter:function(t){"function"!=typeof t&&(t=pe(t));for(var e=this._groups,n=e.length,r=Array(n),i=0;i<n;++i)for(var a,o=e[i],s=o.length,u=r[i]=[],c=0;c<s;++c)(a=o[c])&&t.call(a,a.__data__,c,o)&&u.push(a);return new Qi(r,this._parents,this._name,this._id)},merge:function(t){if(t._id!==this._id)throw new Error;for(var e=this._groups,n=t._groups,r=e.length,i=n.length,a=Math.min(r,i),o=Array(r),s=0;s<a;++s)for(var u,c=e[s],l=n[s],f=c.length,h=o[s]=Array(f),d=0;d<f;++d)(u=c[d]||l[d])&&(h[d]=u);for(;s<r;++s)o[s]=e[s];return new Qi(o,this._parents,this._name,this._id)},selection:function(){return new Gi(this._groups,this._parents)},transition:function(){for(var t=this._name,e=this._id,n=ea(),r=this._groups,i=r.length,a=0;a<i;++a)for(var o,s=r[a],u=s.length,c=0;c<u;++c)if(o=s[c]){var l=vi(o,e);di(o,t,n,c,s,{time:l.time+l.delay+l.duration,delay:0,duration:l.duration,ease:l.ease})}return new Qi(r,this._parents,t,n)},call:na.call,nodes:na.nodes,node:na.node,size:na.size,empty:na.empty,each:na.each,on:function(t,e){var n=this._id;return arguments.length<2?vi(this.node(),n).on.on(t):this.each(Yi(n,t,e))},attr:function(t,e){var n=Le(t),r="transform"===n?Ai:Mi;return this.attrTween(t,"function"==typeof e?(n.local?Di:Ii)(n,r,Ei(this,"attr."+t,e)):null==e?(n.local?Oi:Ci)(n):(n.local?Li:Ri)(n,r,e))},attrTween:function(t,e){var n="attr."+t;if(arguments.length<2)return(n=this.tween(n))&&n._value;if(null==e)return this.tween(n,null);if("function"!=typeof e)throw new Error;var r=Le(t);return this.tween(n,(r.local?Fi:Ni)(r,e))},style:function(t,e,n){var r="transform"==(t+="")?Ti:Mi;return null==e?this.styleTween(t,function(t,e){var n,r,i;return function(){var a=Ue(this,t),o=(this.style.removeProperty(t),Ue(this,t));return a===o?null:a===n&&o===r?i:i=e(n=a,r=o)}}(t,r)).on("end.style."+t,Hi(t)):"function"==typeof e?this.styleTween(t,function(t,e,n){var r,i,a;return function(){var o=Ue(this,t),s=n(this),u=s+"";return null==s&&(this.style.removeProperty(t),u=s=Ue(this,t)),o===u?null:o===r&&u===i?a:(i=u,a=e(r=o,s))}}(t,r,Ei(this,"style."+t,e))).each(function(t,e){var n,r,i,a,o="style."+e;return function(){var s=pi(this,t),u=s.on,c=null==s.value[o]?a||(a=Hi(e)):void 0;(u!==n||i!==c)&&(r=(n=u).copy()).on("end."+o,i=c),s.on=r}}(this._id,t)):this.styleTween(t,function(t,e,n){var r,i;return function(){var a=Ue(this,t);return a===n+""?null:a===r?i:i=e(r=a,n)}}(t,r,e),n).on("end.style."+t,null)},styleTween:function(t,e,n){var r="style."+(t+="");if(arguments.length<2)return(r=this.tween(r))&&r._value;if(null==e)return this.tween(r,null);if("function"!=typeof e)throw new Error;return this.tween(r,qi(t,e,null==n?"":n))},text:function(t){return this.tween("text","function"==typeof t?function(t){return function(){var e=t(this);this.textContent=null==e?"":e}}(Ei(this,"text",t)):function(t){return function(){this.textContent=t}}(null==t?"":t+""))},textTween:function(t){var e="text";if(arguments.length<1)return(e=this.tween(e))&&e._value;if(null==t)return this.tween(e,null);if("function"!=typeof t)throw new Error;return this.tween(e,Ki(t))},remove:function(){return this.on("end.remove",function(t){return function(){var e=this.parentNode;for(var n in this.__transition)if(+n!==t)return;e&&e.removeChild(this)}}(this._id))},tween:function(t,e){var n=this._id;if(t+="",arguments.length<2){for(var r,i=vi(this.node(),n).tween,a=0,o=i.length;a<o;++a)if((r=i[a]).name===t)return r.value;return null}return this.each((null==e?Si:ki)(n,t,e))},delay:function(t){var e=this._id;return arguments.length?this.each(("function"==typeof t?ji:Xi)(e,t)):vi(this.node(),e).delay},duration:function(t){var e=this._id;return arguments.length?this.each(("function"==typeof t?Bi:$i)(e,t)):vi(this.node(),e).duration},ease:function(t){var e=this._id;return arguments.length?this.each(Ui(e,t)):vi(this.node(),e).ease},easeVarying:function(t){if("function"!=typeof t)throw new Error;return this.each(function(t,e){return function(){var n=e.apply(this,arguments);if("function"!=typeof n)throw new Error;pi(this,t).ease=n}}(this._id,t))},end:function(){var t,e,n=this,r=n._id,i=n.size();return new Promise((function(a,o){var s={value:o},u={value:function(){0==--i&&a()}};n.each((function(){var n=pi(this,r),i=n.on;i!==t&&((e=(t=i).copy())._.cancel.push(s),e._.interrupt.push(s),e._.end.push(u)),n.on=e})),0===i&&a()}))}})[Symbol.iterator]=na[Symbol.iterator],Vi);var ra={time:null,delay:0,duration:250,ease:function(t){return((t*=2)<=1?t*t*t:(t-=2)*t*t+2)/2}};function ia(t,e){for(var n;!(n=t.__transition)||!(n=n[e]);)if(!(t=t.parentNode))throw new Error("transition "+e+" not found");return n}Rn.prototype.interrupt=function(t){return this.each((function(){yi(this,t)}))},Rn.prototype.transition=function(t){var e,n;t instanceof Qi?(e=t._id,t=t._name):(e=ea(),(n=ra).time=ri(),t=null==t?null:t+"");for(var r=this._groups,i=r.length,a=0;a<i;++a)for(var o,s=r[a],u=s.length,c=0;c<u;++c)(o=s[c])&&di(o,t,e,c,s,n||ia(o,e));return new Qi(r,this._parents,t,e)};var aa=function(t){return function(){return t}};function oa(t,e){var n=e.sourceEvent,r=e.target,i=e.selection,a=e.mode,o=e.dispatch;Object.defineProperties(this,{type:{value:t,enumerable:!0,configurable:!0},sourceEvent:{value:n,enumerable:!0,configurable:!0},target:{value:r,enumerable:!0,configurable:!0},selection:{value:i,enumerable:!0,configurable:!0},mode:{value:a,enumerable:!0,configurable:!0},_:{value:o}})}function sa(t){t.stopImmediatePropagation()}function ua(t){t.preventDefault(),t.stopImmediatePropagation()}function ca(t,e){var n="undefined"!=typeof Symbol&&t[Symbol.iterator]||t["@@iterator"];if(n)return(n=n.call(t)).next.bind(n);if(Array.isArray(t)||(n=function(t,e){if(t){if("string"==typeof t)return la(t,e);var n=Object.prototype.toString.call(t).slice(8,-1);return"Object"===n&&t.constructor&&(n=t.constructor.name),"Map"===n||"Set"===n?Array.from(t):"Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?la(t,e):void 0}}(t))||e&&t&&"number"==typeof t.length){n&&(t=n);var r=0;return function(){return r>=t.length?{done:!0}:{done:!1,value:t[r++]}}}throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}function la(t,e){(null==e||e>t.length)&&(e=t.length);for(var n=0,r=Array(e);n<e;n++)r[n]=t[n];return r}var fa={name:"drag"},ha={name:"space"},da={name:"handle"},ga={name:"center"},pa=Math.abs,va=Math.max,ya=Math.min;function xa(t){return[+t[0],+t[1]]}function _a(t){return[xa(t[0]),xa(t[1])]}var ma={name:"x",handles:["w","e"].map(Ea),input:function(t,e){return null==t?null:[[+t[0],e[0][1]],[+t[1],e[1][1]]]},output:function(t){return t&&[t[0][0],t[1][0]]}},ba={name:"y",handles:["n","s"].map(Ea),input:function(t,e){return null==t?null:[[e[0][0],+t[0]],[e[1][0],+t[1]]]},output:function(t){return t&&[t[0][1],t[1][1]]}},wa=(["n","w","e","s","nw","ne","sw","se"].map(Ea),{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"}),Ta={e:"w",w:"e",nw:"ne",ne:"nw",se:"sw",sw:"se"},Aa={n:"s",s:"n",nw:"sw",ne:"se",se:"ne",sw:"nw"},Sa={overlay:1,selection:1,n:null,e:1,s:null,w:-1,nw:-1,ne:1,se:1,sw:-1},ka={overlay:1,selection:1,n:-1,e:null,s:1,w:null,nw:-1,ne:-1,se:1,sw:1};function Ea(t){return{type:t}}function Ma(t){return!t.ctrlKey&&!t.button}function Ca(){var t=this.ownerSVGElement||this;return t.hasAttribute("viewBox")?[[(t=t.viewBox.baseVal).x,t.y],[t.x+t.width,t.y+t.height]]:[[0,0],[t.width.baseVal.value,t.height.baseVal.value]]}function Oa(){return navigator.maxTouchPoints||"ontouchstart"in this}function Ra(t){for(;!t.__brush;)if(!(t=t.parentNode))return;return t.__brush}function La(t){return t[0][0]===t[1][0]||t[0][1]===t[1][1]}function Ia(t){var e=t.__brush;return e?e.dim.output(e.selection):null}function Da(t){function e(e){var r=e.property("__brush",u).selectAll(".overlay").data([Ea("overlay")]);r.enter().append("rect").attr("class","overlay").attr("pointer-events","all").attr("cursor",wa.overlay).merge(r).each((function(){var t=Ra(this).extent;Ln(this).attr("x",t[0][0]).attr("y",t[0][1]).attr("width",t[1][0]-t[0][0]).attr("height",t[1][1]-t[0][1])})),e.selectAll(".selection").data([Ea("selection")]).enter().append("rect").attr("class","selection").attr("cursor",wa.selection).attr("fill","#777").attr("fill-opacity",.3).attr("stroke","#fff").attr("shape-rendering","crispEdges");var i=e.selectAll(".handle").data(t.handles,(function(t){return t.type}));i.exit().remove(),i.enter().append("rect").attr("class",(function(t){return"handle handle--"+t.type})).attr("cursor",(function(t){return wa[t.type]})),e.each(n).attr("fill","none").attr("pointer-events","all").on("mousedown.brush",a).filter(h).on("touchstart.brush",a).on("touchmove.brush",o).on("touchend.brush touchcancel.brush",s).style("touch-action","none").style("-webkit-tap-highlight-color","rgba(0,0,0,0)")}function n(){var t=Ln(this),e=Ra(this).selection;e?(t.selectAll(".selection").style("display",null).attr("x",e[0][0]).attr("y",e[0][1]).attr("width",e[1][0]-e[0][0]).attr("height",e[1][1]-e[0][1]),t.selectAll(".handle").style("display",null).attr("x",(function(t){return"e"===t.type[t.type.length-1]?e[1][0]-p/2:e[0][0]-p/2})).attr("y",(function(t){return"s"===t.type[0]?e[1][1]-p/2:e[0][1]-p/2})).attr("width",(function(t){return"n"===t.type||"s"===t.type?e[1][0]-e[0][0]+p:p})).attr("height",(function(t){return"e"===t.type||"w"===t.type?e[1][1]-e[0][1]+p:p}))):t.selectAll(".selection,.handle").style("display","none").attr("x",null).attr("y",null).attr("width",null).attr("height",null)}function r(t,e,n){var r=t.__brush.emitter;return!r||n&&r.clean?new i(t,e,n):r}function i(t,e,n){this.that=t,this.args=e,this.state=t.__brush,this.active=0,this.clean=n}function a(e){function i(t){for(var e,n,r=ca(t.changedTouches||[t]);!(e=r()).done;){n=e.value;for(var i,o,s=ca(N);!(i=s()).done;)(o=i.value).identifier===n.identifier&&(o.cur=Yn(n,T))}if(F&&!b&&!w&&1===N.length){var u=N[0];pa(u.cur[0]-u[0])>pa(u.cur[1]-u[1])?w=!0:b=!0}for(var c,l,f=ca(N);!(c=f()).done;)(l=c.value).cur&&(l[0]=l.cur[0],l[1]=l.cur[1]);m=!0,ua(t),a(t)}function a(t){var e,r=N[0],i=r.point0;switch(P=r[0]-i[0],z=r[1]-i[1],S){case ha:case fa:k&&(P=va(R-l,ya(I-v,P)),h=l+P,y=v+P),E&&(z=va(L-g,ya(D-x,z)),p=g+z,_=x+z);break;case da:N[1]?(k&&(h=va(R,ya(I,N[0][0])),y=va(R,ya(I,N[1][0])),k=1),E&&(p=va(L,ya(D,N[0][1])),_=va(L,ya(D,N[1][1])),E=1)):(k<0?(P=va(R-l,ya(I-l,P)),h=l+P,y=v):k>0&&(P=va(R-v,ya(I-v,P)),h=l,y=v+P),E<0?(z=va(L-g,ya(D-g,z)),p=g+z,_=x):E>0&&(z=va(L-x,ya(D-x,z)),p=g,_=x+z));break;case ga:k&&(h=va(R,ya(I,l-P*k)),y=va(R,ya(I,v+P*k))),E&&(p=va(L,ya(D,g-z*E)),_=va(L,ya(D,x+z*E)))}y<h&&(k*=-1,e=l,l=v,v=e,e=h,h=y,y=e,A in Ta&&B.attr("cursor",wa[A=Ta[A]])),_<p&&(E*=-1,e=g,g=x,x=e,e=p,p=_,_=e,A in Aa&&B.attr("cursor",wa[A=Aa[A]])),M.selection&&(O=M.selection),b&&(h=O[0][0],y=O[1][0]),w&&(p=O[0][1],_=O[1][1]),(O[0][0]!==h||O[0][1]!==p||O[1][0]!==y||O[1][1]!==_)&&(M.selection=[[h,p],[y,_]],n.call(T),$.brush(t,S.name))}function o(t){if(sa(t),t.touches){if(t.touches.length)return;c&&clearTimeout(c),c=setTimeout((function(){c=null}),500)}else er(t.view,m),U.on("keydown.brush keyup.brush mousemove.brush mouseup.brush",null);X.attr("pointer-events","all"),B.attr("cursor",wa.overlay),M.selection&&(O=M.selection),La(O)&&(M.selection=null,n.call(T)),$.end(t,S.name)}function s(t){switch(t.keyCode){case 16:F=k&&E;break;case 18:S===da&&(k&&(v=y-P*k,l=h+P*k),E&&(x=_-z*E,g=p+z*E),S=ga,a());break;case 32:(S===da||S===ga)&&(k<0?v=y-P:k>0&&(l=h-P),E<0?x=_-z:E>0&&(g=p-z),S=ha,B.attr("cursor",wa.selection),a());break;default:return}ua(t)}function u(t){switch(t.keyCode){case 16:F&&(b=w=F=!1,a());break;case 18:S===ga&&(k<0?v=y:k>0&&(l=h),E<0?x=_:E>0&&(g=p),S=da,a());break;case 32:S===ha&&(t.altKey?(k&&(v=y-P*k,l=h+P*k),E&&(x=_-z*E,g=p+z*E),S=ga):(k<0?v=y:k>0&&(l=h),E<0?x=_:E>0&&(g=p),S=da),B.attr("cursor",wa[A]),a());break;default:return}ua(t)}if((!c||e.touches)&&f.apply(this,arguments)){var l,h,g,p,v,y,x,_,m,b,w,T=this,A=e.target.__data__.type,S="selection"===(d&&e.metaKey?A="overlay":A)?fa:d&&e.altKey?ga:da,k=t===ba?null:Sa[A],E=t===ma?null:ka[A],M=Ra(T),C=M.extent,O=M.selection,R=C[0][0],L=C[0][1],I=C[1][0],D=C[1][1],P=0,z=0,F=k&&E&&d&&e.shiftKey,N=Array.from(e.touches||[e],(function(t){var e=t.identifier;return(t=Yn(t,T)).point0=t.slice(),t.identifier=e,t}));if("overlay"===A){O&&(m=!0);var j=[N[0],N[1]||N[0]];M.selection=O=[[l=t===ba?R:ya(j[0][0],j[1][0]),g=t===ma?L:ya(j[0][1],j[1][1])],[v=t===ba?I:va(j[0][0],j[1][0]),x=t===ma?D:va(j[0][1],j[1][1])]],N.length>1&&a()}else l=O[0][0],g=O[0][1],v=O[1][0],x=O[1][1];h=l,p=g,y=v,_=x;var X=Ln(T).attr("pointer-events","none"),B=X.selectAll(".overlay").attr("cursor",wa[A]);yi(T);var $=r(T,arguments,!0).beforestart();if(e.touches)$.moved=i,$.ended=o;else{var U=Ln(e.view).on("mousemove.brush",i,!0).on("mouseup.brush",o,!0);d&&U.on("keydown.brush",s,!0).on("keyup.brush",u,!0),tr(e.view)}n.call(T),$.start(e,S.name)}}function o(t){r(this,arguments).moved(t)}function s(t){r(this,arguments).ended(t)}function u(){var e=this.__brush||{selection:null};return e.extent=_a(l.apply(this,arguments)),e.dim=t,e}var c,l=Ca,f=Ma,h=Oa,d=!0,g=Kn("start","brush","end"),p=6;return e.move=function(e,i){e.tween?e.on("start.brush",(function(t){r(this,arguments).beforestart().start(t)})).on("interrupt.brush end.brush",(function(t){r(this,arguments).end(t)})).tween("brush",(function(){function e(t){o.selection=1===t&&null===c?null:l(t),n.call(a),s.brush()}var a=this,o=a.__brush,s=r(a,arguments),u=o.selection,c=t.input("function"==typeof i?i.apply(this,arguments):i,o.extent),l=Gr(u,c);return null!==u&&null!==c?e:e(1)})):e.each((function(){var e=this,a=arguments,o=e.__brush,s=t.input("function"==typeof i?i.apply(e,a):i,o.extent),u=r(e,a).beforestart();yi(e),o.selection=null===s?null:s,n.call(e),u.start().brush().end()}))},e.clear=function(t){e.move(t,null)},i.prototype={beforestart:function(){return 1==++this.active&&(this.state.emitter=this,this.starting=!0),this},start:function(t,e){return this.starting?(this.starting=!1,this.emit("start",t,e)):this.emit("brush",t),this},brush:function(t,e){return this.emit("brush",t,e),this},end:function(t,e){return 0==--this.active&&(delete this.state.emitter,this.emit("end",t,e)),this},emit:function(n,r,i){var a=Ln(this.that).datum();g.call(n,this.that,new oa(n,{sourceEvent:r,target:e,selection:t.output(this.state.selection),mode:i,dispatch:g}),a)}},e.extent=function(t){return arguments.length?(l="function"==typeof t?t:aa(_a(t)),e):l},e.filter=function(t){return arguments.length?(f="function"==typeof t?t:aa(!!t),e):f},e.touchable=function(t){return arguments.length?(h="function"==typeof t?t:aa(!!t),e):h},e.handleSize=function(t){return arguments.length?(p=+t,e):p},e.keyModifiers=function(t){return arguments.length?(d=!!t,e):d},e.on=function(){var t=g.on.apply(g,arguments);return t===g?e:t},e}var Pa="object"==typeof globalThis&&null!==globalThis&&globalThis.Object===Object&&globalThis||"object"==typeof global&&null!==global&&global.Object===Object&&global||"object"==typeof self&&null!==self&&self.Object===Object&&self||Function("return this")();Pa.requestIdleCallback=Pa.requestIdleCallback||function(t){return setTimeout(t,1)},Pa.cancelIdleCallback=Pa.cancelIdleCallback||function(t){return clearTimeout(t)};var za=Pa&&Pa.document;function Fa(t,e){var n=Object.keys(t);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(t);e&&(r=r.filter((function(e){return Object.getOwnPropertyDescriptor(t,e).enumerable}))),n.push.apply(n,r)}return n}function Na(t){for(var e,n=1;n<arguments.length;n++)e=null==arguments[n]?{}:arguments[n],n%2?Fa(Object(e),!0).forEach((function(n){zn(t,n,e[n])})):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(e)):Fa(Object(e)).forEach((function(n){Object.defineProperty(t,n,Object.getOwnPropertyDescriptor(e,n))}));return t}var ja=function(t){return t||0===t},Xa=function(t){return"function"==typeof t},Ba=function(t){return"string"==typeof t},$a=function(t){return"number"==typeof t},Ua=function(t){return void 0===t},Ya=function(t){return void 0!==t},Va=function(t){return"boolean"==typeof t},Ga=function(t){return 10*Math.ceil(t/10)},Ha=function(t){return Math.ceil(t)+.5},Wa=function(t){return t[1]-t[0]},qa=function(t){return"object"==typeof t},Za=function(t){return Ua(t)||null===t||Ba(t)&&0===t.length||qa(t)&&!(t instanceof Date)&&0===Object.keys(t).length||$a(t)&&isNaN(t)},Ka=function(t){return!Za(t)},Ja=function(t){return Array.isArray(t)},Qa=function(t){return t&&!t.nodeType&&qa(t)&&!Ja(t)};function to(t,e,n){return Ya(t[e])?t[e]:n}function eo(t){for(var e=Xa(t),n=arguments.length,r=Array(n>1?n-1:0),i=1;i<n;i++)r[i-1]=arguments[i];return e&&t.call.apply(t,r),e}function no(t,e){var n=0,r=function(){for(var t=arguments.length,r=Array(t),i=0;i<t;i++)r[i]=arguments[i];--n||e.apply.apply(e,[this].concat(r))};"duration"in t?t.each((function(){return++n})).on("end",r):(++n,t.call(r))}function ro(t){return Ba(t)?t.replace(/</g,"&lt;").replace(/>/g,"&gt;"):t}function io(t,e,n,r){if(void 0===n&&(n=[-1,1]),void 0===r&&(r=!1),t&&Ba(e))if(-1===e.indexOf("\n"))t.text(e);else{var i=[t.text(),e].map((function(t){return t.replace(/[\s\n]/g,"")}));if(i[0]!==i[1]){var a=e.split("\n"),o=r?a.length-1:1;t.html(""),a.forEach((function(e,r){t.append("tspan").attr("x",0).attr("dy",(0===r?n[0]*o:n[1])+"em").text(e)}))}}}function ao(t){var e=t.getBBox(),n=e.x,r=e.y,i=e.width,a=e.height;return[{x:n,y:r+a},{x:n,y:r},{x:n+i,y:r},{x:n+i,y:r+a}]}function oo(t,e){var n=t&&(t.touches||t.sourceEvent&&t.sourceEvent.touches);return t?Yn(n?n[0]:t,e):[0,0]}function so(t){var e,n=t.event,r=t.$el,i=r.subchart.main||r.main;return n&&"brush"===n.type?e=n.selection:i&&(e=i.select("."+In.brush).node())&&(e=Ia(e)),e}function uo(t){return!("rect"in t)||"rect"in t&&t.hasAttribute("width")&&t.rect.width!==+t.getAttribute("width")?t.rect=t.getBoundingClientRect():t.rect}function co(t){void 0===t&&(t=!0);var e=Math.random();return t?e+"":e}function lo(t,e,n,r,i){if(n>r)return-1;var a=Math.floor((n+r)/2),o=t[a],s=o.x,u=o.w,c=void 0===u?0:u;return i&&(s=t[a].y,c=t[a].h),e>=s&&e<=s+c?a:e<s?lo(t,e,n,a-1,i):lo(t,e,a+1,r,i)}function fo(t){var e=so(t);return!e||e[0]===e[1]}function ho(t,e){for(var n in void 0===t&&(t={}),Ja(e)&&e.forEach((function(e){return ho(t,e)})),e)/^\d+$/.test(n)||n in t||(t[n]=e[n]);return t}var go=function(t){return t.charAt(0).toUpperCase()+t.slice(1)},po=function(t){return[].slice.call(t)};var vo=function(t){var 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 yo(t){var e=t[0]instanceof Date,n=(e?t.map(Number):t).filter((function(t,e,n){return n.indexOf(t)===e}));return e?n.map((function(t){return new Date(t)})):n}function xo(t){return t&&t.length?t.reduce((function(t,e){return t.concat(e)})):[]}function _o(t){for(var e=arguments.length,n=Array(e>1?e-1:0),r=1;r<e;r++)n[r-1]=arguments[r];if(!n.length||1===n.length&&!n[0])return t;var i=n.shift();return Qa(t)&&Qa(i)&&Object.keys(i).forEach((function(e){var n=i[e];Qa(n)?(!t[e]&&(t[e]={}),t[e]=_o(t[e],n)):t[e]=Ja(n)?n.concat():n})),_o.apply(void 0,[t].concat(n))}function mo(t,e){var n;return void 0===e&&(e=!0),t[0]instanceof Date?n=e?function(t,e){return t-e}:function(t,e){return e-t}:e&&!t.every(isNaN)?n=function(t,e){return t-e}:!e&&(n=function(t,e){return(t>e?-1:t<e&&1)||t===e&&0}),t.concat().sort(n)}function bo(t,e){var n=e.filter((function(t){return Ka(t)}));return n.length?$a(n[0])?n=Math[t].apply(Math,n):n[0]instanceof Date&&(n=mo(n,"min"===t)[0]):n=void 0,n}var wo=function(t,e,n){void 0===n&&(n=1);for(var r=[],i=0|Math.max(0,Math.ceil((e-t)/n)),a=t;a<i;a++)r.push(t+a*n);return r},To={mouse:function(){try{return new MouseEvent("t"),function(t,e,n){void 0===n&&(n={bubbles:!1,cancelable:!1,screenX:0,screenY:0,clientX:0,clientY:0}),t.dispatchEvent(new MouseEvent(e,n))}}catch(t){return function(t,e,n){void 0===n&&(n={bubbles:!1,cancelable:!1,screenX:0,screenY:0,clientX:0,clientY:0});var r=za.createEvent("MouseEvent");r.initMouseEvent(e,n.bubbles,n.cancelable,Pa,0,n.screenX,n.screenY,n.clientX,n.clientY,!1,!1,!1,!1,0,null),t.dispatchEvent(r)}}}(),touch:function(t,e,n){var r=new Touch(_o({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]}))}};function Ao(t,e){var n=t;for(var r in e)n=n.replace(new RegExp("{="+r+"}","g"),e[r]);return n}function So(t){var e;if(t instanceof Date)e=t;else if(Ba(t)){var n=this.config;e=this.format.dataTime(n.data_xFormat)(t)}else $a(t)&&!isNaN(t)&&(e=new Date(+t));return(!e||isNaN(+e))&&console&&console.error&&console.error("Failed to parse x '"+t+"' to Date object"),e}function ko(){return!za.hidden}function Eo(t,e){var n=Object.keys(t);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(t);e&&(r=r.filter((function(e){return Object.getOwnPropertyDescriptor(t,e).enumerable}))),n.push.apply(n,r)}return n}function Mo(t){for(var e,n=1;n<arguments.length;n++)e=null==arguments[n]?{}:arguments[n],n%2?Eo(Object(e),!0).forEach((function(n){zn(t,n,e[n])})):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(e)):Eo(Object(e)).forEach((function(n){Object.defineProperty(t,n,Object.getOwnPropertyDescriptor(e,n))}));return t}var Co=function(){function t(){return function(){for(var t=function(t){function e(){return t.apply(this,arguments)}return e.toString=function(){return t.toString()},e}((function(e){if(Qa(e)&&e.constructor){var n=new e.constructor;for(var r in e)n[r]=t(e[r]);return n}return e})),e=arguments.length,n=Array(e),r=0;r<e;r++)n[r]=arguments[r];return n.map((function(e){return t(e)})).reduce((function(t,e){return Na(Na({},t),e)}))}(Fn,Nn,jn,Xn,Bn,$n,Un,t.data)}return t.setOptions=function(t){this.data=t.reduce((function(t,e){return Mo(Mo({},t),e)}),this.data)},t}();Co.data={};var Oo="$baseLength",Ro="__colorPattern__",Lo="$dataMinMax",Io="$dataTotalSum",Do="$totalPerIndex",Po="legendItemTextBox",zo="$radarPoints",Fo="setOverOut",No="callOverOutForTouch",jo="textRect",Xo=function(){function t(){this.cache={}}var e=t.prototype;return e.add=function(t,e,n){return void 0===n&&(n=!1),this.cache[t]=n?this.cloneTarget(e):e,this.cache[t]},e.remove=function(t){var e=this;po(t).forEach((function(t){return delete e.cache[t]}))},e.get=function(t,e){if(void 0===e&&(e=!1),e){for(var n,r=[],i=0;n=t[i];i++)n in this.cache&&r.push(this.cloneTarget(this.cache[n]));return r}var a=this.cache[t];return ja(a)?a:null},e.reset=function(t){for(var e in this.cache)(t||/^\$/.test(e))&&(this.cache[e]=null)},e.cloneTarget=function(t){return{id:t.id,id_org:t.id_org,values:t.values.map((function(t){return{x:t.x,value:t.value,id:t.id}}))}},t}(),Bo=Pa.setTimeout,$o=Pa.clearTimeout;function Uo(){var t=[],e=function(e,n){var r;!function e(){for(var i,a=0,o=0;i=t[o];o++)if(!0===i||i.empty&&i.empty())a++;else try{i.transition()}catch(t){a++}r&&$o(r),a===t.length?n&&n():r=Bo(e,50)}()};return e.add=function(e){Ja(e)?t=t.concat(e):t.push(e)},e}var Yo={},Vo={};function Go(t){return new Function("d","return {"+t.map((function(t,e){return JSON.stringify(t)+": d["+e+'] || ""'})).join(",")+"}")}function Ho(t){var e=Object.create(null),n=[];return t.forEach((function(t){for(var r in t)r in e||n.push(e[r]=r)})),n}function Wo(t,e){var n=t+"",r=n.length;return r<e?Array(e-r+1).join(0)+n:n}function qo(t){var e=t.getUTCHours(),n=t.getUTCMinutes(),r=t.getUTCSeconds(),i=t.getUTCMilliseconds();return isNaN(t)?"Invalid Date":function(t){return t<0?"-"+Wo(-t,6):t>9999?"+"+Wo(t,6):Wo(t,4)}(t.getUTCFullYear())+"-"+Wo(t.getUTCMonth()+1,2)+"-"+Wo(t.getUTCDate(),2)+(i?"T"+Wo(e,2)+":"+Wo(n,2)+":"+Wo(r,2)+"."+Wo(i,3)+"Z":r?"T"+Wo(e,2)+":"+Wo(n,2)+":"+Wo(r,2)+"Z":n||e?"T"+Wo(e,2)+":"+Wo(n,2)+"Z":"")}function Zo(t){function e(t,e){function n(){if(c)return Vo;if(l)return l=!1,Yo;var e,n,r=s;if(34===t.charCodeAt(r)){for(;s++<a&&34!==t.charCodeAt(s)||34===t.charCodeAt(++s););return(e=s)>=a?c=!0:10===(n=t.charCodeAt(s++))?l=!0:13===n&&(l=!0,10===t.charCodeAt(s)&&++s),t.slice(r+1,e-1).replace(/""/g,'"')}for(;s<a;){if(10===(n=t.charCodeAt(e=s++)))l=!0;else if(13===n)l=!0,10===t.charCodeAt(s)&&++s;else if(n!==o)continue;return t.slice(r,e)}return c=!0,t.slice(r,a)}var r,i=[],a=t.length,s=0,u=0,c=a<=0,l=!1;for(10===t.charCodeAt(a-1)&&--a,13===t.charCodeAt(a-1)&&--a;(r=n())!==Vo;){for(var f=[];r!==Yo&&r!==Vo;)f.push(r),r=n();e&&null==(f=e(f,u++))||i.push(f)}return i}function n(e,n){return e.map((function(e){return n.map((function(t){return i(e[t])})).join(t)}))}function r(e){return e.map(i).join(t)}function i(t){return null==t?"":t instanceof Date?qo(t):a.test(t+="")?'"'+t.replace(/"/g,'""')+'"':t}var a=new RegExp('["'+t+"\n\r]"),o=t.charCodeAt(0);return{parse:function(t,n){var r,i,a=e(t,(function(t,e){return r?r(t,e-1):(i=t,void(r=n?function(t,e){var n=Go(t);return function(r,i){return e(n(r),i,t)}}(t,n):Go(t)))}));return a.columns=i||[],a},parseRows:e,format:function(e,r){return null==r&&(r=Ho(e)),[r.map(i).join(t)].concat(n(e,r)).join("\n")},formatBody:function(t,e){return null==e&&(e=Ho(t)),n(t,e).join("\n")},formatRows:function(t){return t.map(r).join("\n")},formatRow:r,formatValue:i}}var Ko=Zo(","),Jo=Ko.parse,Qo=Ko.parseRows,ts=(Ko.format,Ko.formatBody,Ko.formatRows,Ko.formatRow,Ko.formatValue,Zo("\t")),es=ts.parse,ns=ts.parseRows,rs=(ts.format,ts.formatBody,ts.formatRows,ts.formatRow,ts.formatValue,{convertData:function(t,e){var n;if(t.bindto?(n={},["url","mimeType","headers","keys","json","keys","rows","columns"].forEach((function(e){var r="data_"+e;r in t&&(n[e]=t[r])}))):n=t,n.url&&e)this.convertUrlToData(n.url,n.mimeType,n.headers,n.keys,e);else if(n.json)n=this.convertJsonToData(n.json,n.keys);else if(n.rows)n=this.convertRowsToData(n.rows);else if(n.columns)n=this.convertColumnsToData(n.columns);else if(t.bindto)throw Error("url or json or rows or columns is required.");return Ja(n)&&n},convertUrlToData:function(t,e,n,r,i){var a=this;void 0===e&&(e="csv");var o=new XMLHttpRequest;o.open("GET",t),n&&Object.keys(n).forEach((function(t){o.setRequestHeader(t,n[t])})),o.onreadystatechange=function(){if(4===o.readyState){if(200!==o.status)throw new Error(t+": Something went wrong loading!");var n=o.responseText;n&&i.call(a,a["convert"+go(e)+"ToData"]("json"===e?JSON.parse(n):n,r))}},o.send()},convertCsvTsvToData:function(t,e){var n,r=t.rows(e);return 1===r.length?(n=[{}],r[0].forEach((function(t){n[0][t]=null}))):n=t.parse(e),n},convertCsvToData:function(t){return this.convertCsvTsvToData({rows:Qo,parse:Jo},t)},convertTsvToData:function(t){return this.convertCsvTsvToData({rows:ns,parse:es},t)},convertJsonToData:function(t,e){var n,r,i=this,a=this.config,o=[];if(Ja(t)){var s=e||a.data_keys;s.x?(n=s.value.concat(s.x),a.data_x=s.x):n=s.value,o.push(n),t.forEach((function(t){var e=n.map((function(e){var n=i.findValueInJson(t,e);return Ua(n)&&(n=null),n}));o.push(e)})),r=this.convertRowsToData(o)}else Object.keys(t).forEach((function(e){var n=t[e].concat();n.unshift(e),o.push(n)})),r=this.convertColumnsToData(o);return r},findValueInJson:function(t,e){if(void 0!==t[e])return t[e];var n=e.replace(/\[(\w+)\]/g,".$1").replace(/^\./,"").split("."),r=t;return n.some((function(t){return!(r=r&&t in r?r[t]:void 0)})),r},convertRowsToData:function(t){var e=t[0],n=[];return t.forEach((function(t,r){if(r>0){var i={};t.forEach((function(t,n){if(Ua(t))throw new Error("Source data is missing a component at ("+r+", "+n+")!");i[e[n]]=t})),n.push(i)}})),n},convertColumnsToData:function(t){var e=[];return t.forEach((function(t,n){var r=t[0];t.forEach((function(t,i){if(i>0){if(Ua(e[i-1])&&(e[i-1]={}),Ua(t))throw new Error("Source data is missing a component at ("+n+", "+i+")!");e[i-1][r]=t}}))})),e},convertDataToTargets:function(t,e){var n=this,r=this,i=r.axis,a=r.config,o=r.state,s=!1,u=!1,c=!1;i&&(s=i.isCategorized(),u=i.isTimeSeries(),c=i.isCustomX());var l,f=Object.keys(t[0]||{}),h=f.length?f.filter(r.isNotX,r):[],d=f.length?f.filter(r.isX,r):[];h.forEach((function(i){var o=n.getXKey(i);c||u?d.indexOf(o)>=0?l=(e&&r.data.xs[i]||[]).concat(t.map((function(t){return t[o]})).filter(ja).map((function(t,e){return r.generateTargetX(t,i,e)}))):a.data_x?l=n.getOtherTargetXs():Ka(a.data_xs)&&(l=r.getXValuesOfXKey(o,r.data.targets)):l=t.map((function(t,e){return e})),l&&(n.data.xs[i]=l)})),h.forEach((function(t){if(!n.data.xs[t])throw new Error('x is not defined for id = "'+t+'".')}));var g=h.map((function(e,n){var i=a.data_idConverter.bind(r.api)(e),u=r.getXKey(e),l=c&&s,f=l&&t.map((function(t){return t.x})).every((function(t){return a.axis_x_categories.indexOf(t)>-1})),h=t.__append__,d=null===u&&h?r.api.data.values(e).length:0;return{id:i,id_org:e,values:t.map((function(t,s){var c,g=t[u],p=t[e];return p=null===p||isNaN(p)||Qa(p)?Ja(p)||Qa(p)?p:null:+p,!l&&!o.hasRadar||0!==n||Ua(g)?c=r.generateTargetX(g,e,d+s):(!f&&0===n&&0===s&&!h&&(a.axis_x_categories=[]),-1===(c=a.axis_x_categories.indexOf(g))&&(c=a.axis_x_categories.length,a.axis_x_categories.push(g))),(Ua(p)||r.data.xs[e].length<=s)&&(c=void 0),{x:c,value:p,id:i}})).filter((function(t){return Ya(t.x)}))}}));return g.forEach((function(t){a.data_xSort&&(t.values=t.values.sort((function(t,e){return(t.x||0===t.x?t.x:1/0)-(e.x||0===e.x?e.x:1/0)}))),t.values.forEach((function(t,e){return t.index=e})),r.data.xs[t.id].sort((function(t,e){return t-e}))})),o.hasNegativeValue=r.hasNegativeValueInTargets(g),o.hasPositiveValue=r.hasPositiveValueInTargets(g),a.data_type&&r.setTargetType(r.mapToIds(g).filter((function(t){return!(t in a.data_types)})),a.data_type),g.forEach((function(t){return r.cache.add(t.id_org,t,!0)})),g}}),is={isX:function(t){var e=this.config,n=e.data_x&&t===e.data_x,r=Ka(e.data_xs)&&function(t,e){var n=!1;return Object.keys(t).forEach((function(r){return t[r]===e&&(n=!0)})),n}(e.data_xs,t);return n||r},isNotX:function(t){return!this.isX(t)},isStackNormalized:function(){var t=this.config;return!(!t.data_stack_normalize||!t.data_groups.length)},isGrouped:function(t){var e=this.config.data_groups;return t?e.some((function(e){return e.indexOf(t)>=0&&e.length>1})):e.length>0},getXKey:function(t){var e=this.config;return e.data_x?e.data_x:Ka(e.data_xs)?e.data_xs[t]:null},getXValuesOfXKey:function(t,e){var n,r=this;return(e&&Ka(e)?r.mapToIds(e):[]).forEach((function(e){r.getXKey(e)===t&&(n=r.data.xs[e])})),n},getIndexByX:function(t,e){return e?e.indexOf(Ba(t)?t:+t):(this.filterByX(this.data.targets,t)[0]||{index:null}).index},getXValue:function(t,e){var n=this;return t in n.data.xs&&n.data.xs[t]&&ja(n.data.xs[t][e])?n.data.xs[t][e]:e},getOtherTargetXs:function(){var t=Object.keys(this.data.xs);return t.length?this.data.xs[t[0]]:null},getOtherTargetX:function(t){var e=this.getOtherTargetXs();return e&&t<e.length?e[t]:null},addXs:function(t){var e=this.config;Object.keys(t).forEach((function(n){e.data_xs[n]=t[n]}))},isMultipleX:function(){return Ka(this.config.data_xs)||!this.config.data_xSort||this.hasType("bubble")||this.hasType("scatter")},addName:function(t){var e,n=this.config;return t&&(e=n.data_names[t.id],t.name=void 0===e?t.id:e),t},getAllValuesOnIndex:function(t,e){void 0===e&&(e=!1);var n=this,r=n.filterTargetsToShow(n.data.targets).map((function(e){return n.addName(n.getValueOnIndex(e.values,t))}));return e&&(r=r.filter((function(t){return ja(t.value)}))),r},getValueOnIndex:function(t,e){var n=t.filter((function(t){return t.index===e}));return n.length?n[0]:null},updateTargetX:function(t,e){var n=this;t.forEach((function(t){t.values.forEach((function(r,i){r.x=n.generateTargetX(e[i],t.id,i)})),n.data.xs[t.id]=e}))},updateTargetXs:function(t,e){var n=this;t.forEach((function(t){e[t.id]&&n.updateTargetX([t],e[t.id])}))},generateTargetX:function(t,e,n){var r=this,i=r.axis,a=i&&i.isCategorized()?n:t||n;if(i&&i.isTimeSeries()){var o=So.bind(r);a=o(t||r.getXValue(e,n))}else i&&i.isCustomX()&&!i.isCategorized()&&(a=ja(t)?+t:r.getXValue(e,n));return a},updateXs:function(t){t.length&&(this.axis.xs=t.map((function(t){return t.x})))},getPrevX:function(t){var e=this.axis.xs[t-1];return Ya(e)?e:null},getNextX:function(t){var e=this.axis.xs[t+1];return Ya(e)?e:null},getBaseValue:function(t){var e=this,n=e.state.hasAxis,r=t.value;return r&&n&&(e.isAreaRangeType(t)?r=e.getRangedData(t,"mid"):e.isBubbleZType(t)&&(r=e.getBubbleZData(r,"y"))),r},getMinMaxValue:function(t){var e,n,r=this.getBaseValue.bind(this);return(t||this.data.targets.map((function(t){return t.values}))).forEach((function(t,i){var a=t.map(r).filter($a);e=Math.min.apply(Math,[i?e:1/0].concat(a)),n=Math.max.apply(Math,[i?n:-1/0].concat(a))})),{min:e,max:n}},getMinMaxData:function(){var t=this,e=Lo,n=t.cache.get(e);if(!n){var r=t.data.targets.map((function(t){return t.values})),i=t.getMinMaxValue(r),a=[],o=[];r.forEach((function(e){var n=t.getFilteredDataByValue(e,i.min),r=t.getFilteredDataByValue(e,i.max);n.length&&(a=a.concat(n)),r.length&&(o=o.concat(r))})),t.cache.add(e,n={min:a,max:o})}return n},getTotalPerIndex:function(){var t=this,e=Do,n=t.cache.get(e);return t.isStackNormalized()&&!n&&(n=[],t.data.targets.forEach((function(t){t.values.forEach((function(t,e){n[e]||(n[e]=0),n[e]+=$a(t.value)?t.value:0}))}))),n},getTotalDataSum:function(t){var e=this,n=Io,r=e.cache.get(n);if(!$a(r)){var i=xo(e.data.targets.map((function(t){return t.values}))).map((function(t){return t.value})).reduce((function(t,e){return t+e}));e.cache.add(n,r=i)}return t&&(r-=e.getHiddenTotalDataSum()),r},getHiddenTotalDataSum:function(){var t=this.api,e=this.state.hiddenTargetIds,n=0;return e.length&&(n=t.data.values.bind(t)(e).reduce((function(t,e){return t+e}))),n},getFilteredDataByValue:function(t,e){var n=this;return t.filter((function(t){return n.getBaseValue(t)===e}))},getMaxDataCount:function(){return Math.max.apply(Math,this.data.targets.map((function(t){return t.values.length})))},getMaxDataCountTarget:function(){var t=this.filterTargetsToShow()||[],e=t.length;return e>1?t=mo(yo(t=t.map((function(t){return t.values})).reduce((function(t,e){return t.concat(e)})).map((function(t){return t.x})))).map((function(t,e){return{x:t,index:e}})):e&&(t=t[0].values),t},mapToIds:function(t){return t.map((function(t){return t.id}))},mapToTargetIds:function(t){return t?Ja(t)?t.concat():[t]:this.mapToIds(this.data.targets)},hasTarget:function(t,e){for(var n,r=this.mapToIds(t),i=0;n=r[i];i++)if(n===e)return!0;return!1},isTargetToShow:function(t){return this.state.hiddenTargetIds.indexOf(t)<0},isLegendToShow:function(t){return this.state.hiddenLegendIds.indexOf(t)<0},filterTargetsToShow:function(t){var e=this;return(t||e.data.targets).filter((function(t){return e.isTargetToShow(t.id)}))},mapTargetsToUniqueXs:function(t){var e=this.axis,n=[];return t&&t.length&&(n=yo(xo(t.map((function(t){return t.values.map((function(t){return+t.x}))})))),n=e&&e.isTimeSeries()?n.map((function(t){return new Date(+t)})):n.map((function(t){return+t}))),mo(n)},addTargetIds:function(t,e){var n=this.state;(Ja(e)?e:[e]).forEach((function(e){n[t].indexOf(e)<0&&n[t].push(e)}))},removeTargetIds:function(t,e){var n=this.state;(Ja(e)?e:[e]).forEach((function(e){var r=n[t].indexOf(e);r>=0&&n[t].splice(r,1)}))},addHiddenTargetIds:function(t){this.addTargetIds("hiddenTargetIds",t)},removeHiddenTargetIds:function(t){this.removeTargetIds("hiddenTargetIds",t)},addHiddenLegendIds:function(t){this.addTargetIds("hiddenLegendIds",t)},removeHiddenLegendIds:function(t){this.removeTargetIds("hiddenLegendIds",t)},getValuesAsIdKeyed:function(t){var e=this,n=e.state.hasAxis,r={},i=e.isMultipleX(),a=i?e.mapTargetsToUniqueXs(t).map((function(t){return Ba(t)?t:+t})):null;return t.forEach((function(t){var o=[];t.values.filter((function(t){var e=t.value;return ja(e)||null===e})).forEach((function(t){var r=t.value;null!==r&&e.isCandlestickType(t)&&(r=Ja(r)?r.slice(0,4):[r.open,r.high,r.low,r.close]),Ja(r)?o.push.apply(o,r):Qa(r)&&"high"in r?o.push.apply(o,Object.values(r)):e.isBubbleZType(t)?o.push(n&&e.getBubbleZData(r,"y")):i?o[e.getIndexByX(t.x,a)]=r:o.push(r)})),r[t.id]=o})),r},checkValueInTargets:function(t,e){for(var n,r=Object.keys(t),i=0;i<r.length;i++){n=t[r[i]].values;for(var a=0;a<n.length;a++)if(e(n[a].value))return!0}return!1},hasMultiTargets:function(){return this.filterTargetsToShow().length>1},hasNegativeValueInTargets:function(t){return this.checkValueInTargets(t,(function(t){return t<0}))},hasPositiveValueInTargets:function(t){return this.checkValueInTargets(t,(function(t){return t>0}))},orderTargets:function(t){var e=[].concat(t),n=this.getSortCompareFn();return n&&e.sort(n),e},getSortCompareFn:function(t){void 0===t&&(t=!1);var e,n=this.config.data_order,r=/asc/i.test(n),i=/desc/i.test(n);if(r||i){var a=function(t,e){return t+Math.abs(e.value)};e=function(e,n){var i=e.values.reduce(a,0),o=n.values.reduce(a,0);return t?r?i-o:o-i:r?o-i:i-o}}else Xa(n)&&(e=n.bind(this.api));return e||null},filterByX:function(t,e){return xo(t.map((function(t){return t.values}))).filter((function(t){return t.x-e==0}))},filterRemoveNull:function(t){var e=this;return t.filter((function(t){return ja(e.getBaseValue(t))}))},filterByXDomain:function(t,e){return t.map((function(t){return{id:t.id,id_org:t.id_org,values:t.values.filter((function(t){return e[0]<=t.x&&t.x<=e[1]}))}}))},hasDataLabel:function(){var t=this.config.data_labels;return Va(t)&&t||qa(t)&&Ka(t)},getDataIndexFromEvent:function(t){var e=this.config,n=this.state,r=n.inputType,i=n.eventReceiver,a=i.coords,o=i.rect,s=e.axis_rotated,u="touch"===r&&t.changedTouches?t.changedTouches[0]:t;return lo(a,s?u.clientY-o.top:u.clientX-o.left,0,a.length-1,s)},getDataLabelLength:function(t,e,n){var r=this,i=[0,0];return r.$el.chart.select("svg").selectAll(".dummy").data([t,e]).enter().append("text").text((function(t){return r.dataLabelFormat(t.id)(t)})).each((function(t,e){i[e]=1.3*this.getBoundingClientRect()[n]})).remove(),i},isNoneArc:function(t){return this.hasTarget(this.data.targets,t.id)},isArc:function(t){return"data"in t&&this.hasTarget(this.data.targets,t.data.id)},findSameXOfValues:function(t,e){var n,r=t[e].x,i=[];for(n=e-1;n>=0&&r===t[n].x;n--)i.push(t[n]);for(n=e;n<t.length&&r===t[n].x;n++)i.push(t[n]);return i},findClosestFromTargets:function(t,e){var n=this,r=t.map((function(t){return n.findClosest(t.values,e)}));return n.findClosest(r,e)},findClosest:function(t,e){var n,r=this,i=r.config,a=r.$el.main,o=t.filter((function(t){return t&&ja(t.value)})),s=i.point_sensitivity;return o.filter((function(t){return r.isBarType(t.id)})).forEach((function(t){var e=a.select("."+In.bars+r.getTargetSelectorSuffix(t.id)+" ."+In.bar+"-"+t.index).node();!n&&r.isWithinBar(e)&&(n=t)})),o.filter((function(t){return!r.isBarType(t.id)})).forEach((function(t){var i=r.dist(t,e);i<s&&(s=i,n=t)})),n},dist:function(t,e){var n=this,r=n.config.axis_rotated,i=n.scale,a=r?1:0,o=r?0:1,s=n.circleY(t,t.index),u=(i.zoom||i.x)(t.x);return Math.sqrt(Math.pow(u-e[a],2)+Math.pow(s-e[o],2))},convertValuesToStep:function(t){var e=this.axis,n=this.config.line_step_type,r=!!e&&e.isCategorized(),i=Ja(t)?t.concat():[t];if(!r&&!/step\-(after|before)/.test(n))return t;var a=i[0],o=i[i.length-1],s=a.id,u=a.x;return i.unshift({x:--u,value:a.value,id:s}),r&&"step-after"===n&&i.unshift({x:--u,value:a.value,id:s}),u=o.x,i.push({x:++u,value:o.value,id:s}),r&&"step-before"===n&&i.push({x:++u,value:o.value,id:s}),i},convertValuesToRange:function(t){var e=Ja(t)?t.concat():[t],n=[];return e.forEach((function(t){var e=t.x,r=t.id;n.push({x:e,id:r,value:t.value[0]}),n.push({x:e,id:r,value:t.value[2]})})),n},updateDataAttributes:function(t,e){var n=this.config["data_"+t];return Ua(e)||(Object.keys(e).forEach((function(t){n[t]=e[t]})),this.redraw({withLegend:!0})),n},getRangedData:function(t,e,n){void 0===e&&(e=""),void 0===n&&(n="areaRange");var r=null==t?void 0:t.value;if(Ja(r)){var i={areaRange:["high","mid","low"],candlestick:["open","high","low","close","volume"]}[n].indexOf(e);return i>=0&&r?r[i]:void 0}return r?r[e]:r},getRatio:function(t,e,n){var r=this,i=r.config,a=r.state,o=r.api,s=0;if(e&&o.data.shown().length)if(s=e.ratio||e.value,"arc"===t)if(r.pie.padAngle()())s=e.value/r.getTotalDataSum(!0);else{var u=i.gauge_fullCircle?r.getArcLength():-2*r.getStartAngle(),c=r.hasType("gauge")?u:2*Math.PI;s=(e.endAngle-e.startAngle)/c}else if("index"===t){var l=o.data.values.bind(o),f=this.getTotalPerIndex();if(a.hiddenTargetIds.length){var h=l(a.hiddenTargetIds,!1);h.length&&(h=h.reduce((function(t,e){return t.map((function(t,n){return($a(t)?t:0)+e[n]}))})),f=f.map((function(t,e){return t-h[e]})))}e.ratio=$a(e.value)&&f&&f[e.index]>0?e.value/f[e.index]:0,s=e.ratio}else if("radar"===t)s=parseFloat(Math.max(e.value,0)+"")/a.current.dataMax*i.radar_size_ratio;else if("bar"===t){var d=r.getYScaleById.bind(r)(e.id).domain().reduce((function(t,e){return e-t}));s=Math.abs(e.value)/d}return n&&s?100*s:s},updateDataIndexByX:function(t){var e=t.reduce((function(t,e,n){return t[+e.x]=n,t}),{});this.data.targets.forEach((function(t){t.values.forEach((function(t,n){var r=e[+t.x];void 0===r&&(r=n),t.index=r}))}))},isBubbleZType:function(t){return this.isBubbleType(t)&&(Qa(t.value)&&("z"in t.value||"y"in t.value)||Ja(t.value)&&2===t.value.length)},getDataById:function(t){var e=this.cache.get(t)||this.api.data(t);return Ja(e)?e[0]:e}},as={load:function(t,e){var n=this,r=e.append,i=t;i&&(e.filter&&(i=i.filter(e.filter)),(e.type||e.types)&&i.forEach((function(t){var r=e.types&&e.types[t.id]||e.type;n.setTargetType(t.id,r)})),n.data.targets.forEach((function(t){for(var e=0;e<i.length;e++)if(t.id===i[e].id){t.values=r?t.values.concat(i[e].values):i[e].values,i.splice(e,1);break}})),n.data.targets=n.data.targets.concat(i)),n.updateTargets(n.data.targets),n.redraw({withUpdateOrgXDomain:!0,withUpdateXDomain:!0,withLegend:!0}),n.updateTypesElements(),e.done&&e.done.call(n.api)},loadFromArgs:function(t){var e=this;if(e.config){e.cache.reset();var n=t.data||e.convertData(t,(function(n){return e.load(e.convertDataToTargets(n),t)}));t.append&&(n.__append__=!0),n&&e.load(e.convertDataToTargets(n),t)}},unload:function(t,e){var n=this,r=n.config,i=n.state,a=n.$el,o=e,s=t;if(n.cache.reset(),o||(o=function(){}),(s=s.filter((function(t){return n.hasTarget(n.data.targets,t)})))&&0!==s.length){var u=a.svg.selectAll(s.map((function(t){return n.selectorTarget(t)})));(r.transition_duration?u.transition().style("opacity","0"):u).remove().call(no,o),s.forEach((function(t){i.withoutFadeIn[t]=!1,a.legend&&a.legend.selectAll("."+In.legendItem+n.getTargetSelectorSuffix(t)).remove(),n.data.targets=n.data.targets.filter((function(e){return e.id!==t}))})),n.updateTypesElements()}else o()}},os=function(t){return function(){return t}};function ss(t,e){var n=e.sourceEvent,r=e.subject,i=e.target,a=e.identifier,o=e.active,s=e.x,u=e.y,c=e.dx,l=e.dy,f=e.dispatch;Object.defineProperties(this,{type:{value:t,enumerable:!0,configurable:!0},sourceEvent:{value:n,enumerable:!0,configurable:!0},subject:{value:r,enumerable:!0,configurable:!0},target:{value:i,enumerable:!0,configurable:!0},identifier:{value:a,enumerable:!0,configurable:!0},active:{value:o,enumerable:!0,configurable:!0},x:{value:s,enumerable:!0,configurable:!0},y:{value:u,enumerable:!0,configurable:!0},dx:{value:c,enumerable:!0,configurable:!0},dy:{value:l,enumerable:!0,configurable:!0},_:{value:f}})}function us(t){return!t.ctrlKey&&!t.button}function cs(){return this.parentNode}function ls(t,e){return null==e?{x:t.x,y:t.y}:e}function fs(){return navigator.maxTouchPoints||"ontouchstart"in this}function hs(){function t(t){t.on("mousedown.drag",e).filter(p).on("touchstart.drag",i).on("touchmove.drag",a).on("touchend.drag touchcancel.drag",o).style("touch-action","none").style("-webkit-tap-highlight-color","rgba(0,0,0,0)")}function e(t,e){if(!f&&h.call(this,t,e)){var i=s(this,d.call(this,t,e),t,e,"mouse");i&&(Ln(t.view).on("mousemove.drag",n,!0).on("mouseup.drag",r,!0),tr(t.view),Jn(t),l=!1,u=t.clientX,c=t.clientY,i("start",t))}}function n(t){if(Qn(t),!l){var e=t.clientX-u,n=t.clientY-c;l=e*e+n*n>_}v.mouse("drag",t)}function r(t){Ln(t.view).on("mousemove.drag mouseup.drag",null),er(t.view,l),Qn(t),v.mouse("end",t)}function i(t,e){if(h.call(this,t,e)){var n,r,i=t.changedTouches,a=d.call(this,t,e),o=i.length;for(n=0;n<o;++n)(r=s(this,a,t,e,i[n].identifier,i[n]))&&(Jn(t),r("start",t,i[n]))}}function a(t){var e,n,r=t.changedTouches,i=r.length;for(e=0;e<i;++e)(n=v[r[e].identifier])&&(Qn(t),n("drag",t,r[e]))}function o(t){var e,n,r=t.changedTouches,i=r.length;for(f&&clearTimeout(f),f=setTimeout((function(){f=null}),500),e=0;e<i;++e)(n=v[r[e].identifier])&&(Jn(t),n("end",t,r[e]))}function s(e,n,r,i,a,o){var s,u,c,l=y.copy(),f=Yn(o||r,n);if(null!=(c=g.call(e,new ss("beforestart",{sourceEvent:r,target:t,identifier:a,active:x,x:f[0],y:f[1],dx:0,dy:0,dispatch:l}),i)))return s=c.x-f[0]||0,u=c.y-f[1]||0,function r(o,h,d){var g,p=f;switch(o){case"start":v[a]=r,g=x++;break;case"end":delete v[a],--x;case"drag":f=Yn(d||h,n),g=x}l.call(o,e,new ss(o,{sourceEvent:h,subject:c,target:t,identifier:a,active:g,x:f[0]+s,y:f[1]+u,dx:f[0]-p[0],dy:f[1]-p[1],dispatch:l}),i)}}var u,c,l,f,h=us,d=cs,g=ls,p=fs,v={},y=Kn("start","drag","end"),x=0,_=0;return t.filter=function(e){return arguments.length?(h="function"==typeof e?e:os(!!e),t):h},t.container=function(e){return arguments.length?(d="function"==typeof e?e:os(e),t):d},t.subject=function(e){return arguments.length?(g="function"==typeof e?e:os(e),t):g},t.touchable=function(e){return arguments.length?(p="function"==typeof e?e:os(!!e),t):p},t.on=function(){var e=y.on.apply(y,arguments);return e===y?t:e},t.clickDistance=function(e){return arguments.length?(_=(e=+e)*e,t):Math.sqrt(_)},t}ss.prototype.on=function(){var t=this._.on.apply(this._,arguments);return t===this._?this:t};var ds={selectRectForSingle:function(t,e,n){var r=this,i=r.config,a=r.$el.main,o=i.data_selection_enabled,s=i.data_selection_grouped,u=i.data_selection_isselectable,c=i.tooltip_grouped,l=r.getAllValuesOnIndex(n);c&&(r.showTooltip(l,t),r.showGridFocus&&r.showGridFocus(l),!o||s)||a.selectAll("."+In.shape+"-"+n).each((function(){Ln(this).classed(In.EXPANDED,!0),o&&e.style("cursor",s?"pointer":null),c||(r.hideGridFocus&&r.hideGridFocus(),r.hideTooltip(),!s&&r.setExpand(n))})).filter((function(t){return r.isWithinShape(this,t)})).call((function(i){var a=i.data();o&&(s||u&&u.bind(r.api)(a))&&e.style("cursor","pointer"),c||(r.showTooltip(a,t),r.showGridFocus&&r.showGridFocus(a),r.unexpandCircles&&r.unexpandCircles(),i.each((function(t){return r.setExpand(n,t.id)})))}))},setExpand:function(t,e,n){var r=this,i=r.config;r.$el.circle&&i.point_focus_expand_enabled&&r.expandCircles(t,e,n),r.expandBarTypeShapes(!0,t,e,n)},expandBarTypeShapes:function(t,e,n,r){void 0===t&&(t=!0);var i=this;["bar","candlestick"].filter((function(t){return i.$el[t]})).forEach((function(a){r&&i.$el[a].classed(In.EXPANDED,!1),i.getShapeByIndex(a,e,n).classed(In.EXPANDED,t)}))},setOverOut:function(t,e){var n=this,r=n.config,i=n.state.hasRadar,a=n.$el.main,o=Qa(e);if(o||-1!==e){var s=r[t?"data_onover":"data_onout"].bind(n.api);if(r.color_onover&&n.setOverColor(t,e,o),o)s(e,a.select("."+In.arc+n.getTargetSelectorSuffix(e.id)).node());else if(r.tooltip_grouped)t&&(r.point_focus_only&&i?n.showCircleFocus(n.getAllValuesOnIndex(e,!0)):n.setExpand(e,null,!0)),n.isMultipleX()||a.selectAll("."+In.shape+"-"+e).each((function(t){s(t,this)}));else{var u=n.cache.get(Fo)||[],c=a.selectAll("."+In.shape+"-"+e).filter((function(t){return n.isWithinShape(this,t)}));c.each((function(t){var e=this;(0===u.length||u.every((function(t){return t!==e})))&&(s(t,this),u.push(this))})),u.length>0&&c.empty()&&(s=r.data_onout.bind(n.api),u.forEach((function(t){return s(Ln(t).datum(),t)})),u=[]),n.cache.add(Fo,u)}}},callOverOutForTouch:function(t){var e=this,n=e.cache.get(No);(Qa(t)&&n?t.id!==n.id:t!==n)&&((n||$a(n))&&e.setOverOut(!1,n),(t||$a(t))&&e.setOverOut(!0,t),e.cache.add(No,t))},getDraggableSelection:function(){var t=this,e=t.config,n=t.state;return e.interaction_enabled&&e.data_selection_draggable&&t.drag?hs().on("drag",(function(e){n.event=e,t.drag(oo(e,this))})).on("start",(function(e){n.event=e,t.dragstart(oo(e,this))})).on("end",(function(e){n.event=e,t.dragend()})):function(){}},dispatchEvent:function(t,e,n){var r=this,i=r.config,a=r.state,o=a.eventReceiver,s=a.hasAxis,u=a.hasRadar,c=r.$el,l=c.eventRect,f=c.arcs,h=c.radar,d=r.isMultipleX(),g=(u?h.axes.select("."+In.axis+"-"+e+" text"):l||f.selectAll("."+In.target+" path").filter((function(t,n){return n===e}))).node(),p=g.getBoundingClientRect(),v=p.width,y=p.left,x=p.top;if(s&&!u&&!d){var _=o.coords[e];v=_.w,y+=_.x,x+=_.y}var m=y+(n?n[0]:0)+(d||i.axis_rotated?0:v/2),b=x+(n?n[1]:0);To[/^(mouse|click)/.test(t)?"mouse":"touch"](g,t,{screenX:m,screenY:b,clientX:m,clientY:b})},setDragStatus:function(t){this.state.dragging=t},unbindZoomEvent:function(){var t,e=this.$el,n=e.eventRect,r=e.zoomResetBtn;n.on(".zoom",null).on(".drag",null),null==(t=r)||t.style("display","none")}},gs={generateClass:function(t,e){return" "+t+" "+(t+this.getTargetSelectorSuffix(e))},getClass:function(t,e){var n=this,r=/s$/.test(t),i=/^(area|arc|line)s?$/.test(t),a=r?"id":"index";return function(o){var s=o.data||o;return((e?n.generateClass(In[r?"shapes":"shape"],s[a]):"")+n.generateClass(In[t],s[i?"id":a])).trim()}},getChartClass:function(t){var e=this;return function(n){return In["chart"+t]+e.classTarget((n.data?n.data:n).id)}},generateExtraLineClass:function(){var t=this.config.line_classes||[],e=[];return function(n){var r=n.id||n.data&&n.data.id||n;return e.indexOf(r)<0&&e.push(r),t[e.indexOf(r)%t.length]}},classRegion:function(t,e){return this.generateClass(In.region,e)+" "+("class"in t?t.class:"")},classTarget:function(t){var e=this.config.data_classes[t],n="";return e&&(n=" "+In.target+"-"+e),this.generateClass(In.target,t)+n},classFocus:function(t){return this.classFocused(t)+this.classDefocused(t)},classFocused:function(t){return" "+(this.state.focusedTargetIds.indexOf(t.id)>=0?In.focused:"")},classDefocused:function(t){return" "+(this.state.defocusedTargetIds.indexOf(t.id)>=0?In.defocused:"")},getTargetSelectorSuffix:function(t){return(t||0===t?"-"+t:"").replace(/([\s?!@#$%^&*()_=+,.<>'":;\[\]\/|~`{}\\])/g,"-")},selectorTarget:function(t,e){var n=e||"",r=this.getTargetSelectorSuffix(t);return n+"."+(In.target+r)+", "+n+"."+(In.circles+r)},selectorTargets:function(t,e){var n=this,r=t||[];return r.length?r.map((function(t){return n.selectorTarget(t,e)})):null},selectorLegend:function(t){return"."+(In.legendItem+this.getTargetSelectorSuffix(t))},selectorLegends:function(t){var e=this;return t&&t.length?t.map((function(t){return e.selectorLegend(t)})):null}};function ps(t,e){switch(arguments.length){case 0:break;case 1:this.range(t);break;default:this.range(e).domain(t)}return this}function vs(t,e){var n="undefined"!=typeof Symbol&&t[Symbol.iterator]||t["@@iterator"];if(n)return(n=n.call(t)).next.bind(n);if(Array.isArray(t)||(n=function(t,e){if(t){if("string"==typeof t)return ys(t,e);var n=Object.prototype.toString.call(t).slice(8,-1);return"Object"===n&&t.constructor&&(n=t.constructor.name),"Map"===n||"Set"===n?Array.from(t):"Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?ys(t,e):void 0}}(t))||e&&t&&"number"==typeof t.length){n&&(t=n);var r=0;return function(){return r>=t.length?{done:!0}:{done:!1,value:t[r++]}}}throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}function ys(t,e){(null==e||e>t.length)&&(e=t.length);for(var n=0,r=Array(e);n<e;n++)r[n]=t[n];return r}var xs=Symbol("implicit");function _s(){function t(t){var a=t+"",o=e.get(a);if(!o){if(i!==xs)return i;e.set(a,o=n.push(t))}return r[(o-1)%r.length]}var e=new Map,n=[],r=[],i=xs;return t.domain=function(r){if(!arguments.length)return n.slice();n=[],e=new Map;for(var i,a=vs(r);!(i=a()).done;){var o=i.value,s=o+"";e.has(s)||e.set(s,n.push(o))}return t},t.range=function(e){return arguments.length?(r=Array.from(e),t):r.slice()},t.unknown=function(e){return arguments.length?(i=e,t):i},t.copy=function(){return _s(n,r).unknown(i)},ps.apply(t,arguments),t}var ms=["#1f77b4","#ff7f0e","#2ca02c","#d62728","#9467bd","#8c564b","#e377c2","#7f7f7f","#bcbd22","#17becf"],bs={getColorFromCss:function(){var t=Ro,e=za.body,n=e[t];if(!n){var r=za.createElement("span");r.className=In.colorPattern,r.style.display="none",e.appendChild(r);var i=Pa.getComputedStyle(r).backgroundImage;r.parentNode.removeChild(r),i.indexOf(";")>-1&&(n=i.replace(/url[^#]*|["'()]|(\s|%20)/g,"").split(";").map((function(t){return t.trim().replace(/[\"'\s]/g,"")})).filter(Boolean),e[t]=n)}return n},generateColor:function(){var t=this,e=t.config,n=e.data_colors,r=e.data_color,i=[],a=Ka(e.color_pattern)?e.color_pattern:_s(t.getColorFromCss()||ms).range(),o=a;if(Xa(e.color_tiles)){var s=e.color_tiles.bind(t.api)(),u=a.map((function(e,n){var r=e.replace(/[#\(\)\s,]/g,""),i=t.state.datetimeId+"-pattern-"+r+"-"+n;return function(t,e,n){var r=Ln(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()}}(s[n%s.length],e,i)}));a=u.map((function(t){return"url(#"+t.id+")"})),t.patterns=u}return function(s){var u,c=s.id||s.data&&s.data.id||s,l=t.isTypeOf(c,["line","spline","step"])||!e.data_types[c];return Xa(n[c])?u=n[c].bind(t.api)(s):n[c]?u=n[c]:(i.indexOf(c)<0&&i.push(c),u=l?o[i.indexOf(c)%o.length]:a[i.indexOf(c)%a.length],n[c]=u),Xa(r)?r.bind(t.api)(u,s):u}},generateLevelColor:function(){var t=this.config,e=t.color_pattern,n=t.color_threshold,r="value"===n.unit,i=n.max||100,a=n.values&&n.values.length?n.values:[];return Ka(n)?function(t){for(var n=r?t:100*t/i,o=e[e.length-1],s=0,u=a.length;s<u;s++)if(n<=a[s]){o=e[s];break}return o}:null},generateDataLabelBackgroundColorFilter:function(){var t=this,e=t.$el,n=t.config,r=t.state,i=n.data_labels_backgroundColors;if(i){var a=[];Ba(i)?a.push(""):Qa(i)&&(a=Object.keys(i)),a.forEach((function(n){var a=r.datetimeId+"-labels-bg"+t.getTargetSelectorSuffix(n);e.defs.append("filter").attr("x","0").attr("y","0").attr("width","1").attr("height","1").attr("id",a).html('<feFlood flood-color="'+(""===n?i:i[n])+'" /><feComposite in="SourceGraphic"/>')}))}},setOverColor:function(t,e){var n=this,r=n.config,i=n.$el.main,a=r.color_onover,o=t?a:n.color;Qa(o)?o=function(t){var e=t.id;return e in a?a[e]:n.color(e)}:Ba(o)?o=function(){return a}:Xa(a)&&(o=o.bind(n.api)),i.selectAll(Qa(e)?"."+In.arc+n.getTargetSelectorSuffix(e.id):"."+In.shape+"-"+e).style("fill",o)}},ws={AREA:"area",AREA_LINE_RANGE:"area-line-range",AREA_SPLINE:"area-spline",AREA_SPLINE_RANGE:"area-spline-range",AREA_STEP:"area-step",BAR:"bar",BUBBLE:"bubble",CANDLESTICK:"candlestick",DONUT:"donut",GAUGE:"gauge",LINE:"line",PIE:"pie",RADAR:"radar",SCATTER:"scatter",SPLINE:"spline",STEP:"step"},Ts={Area:[ws.AREA,ws.AREA_SPLINE,ws.AREA_SPLINE_RANGE,ws.AREA_LINE_RANGE,ws.AREA_STEP],AreaRange:[ws.AREA_SPLINE_RANGE,ws.AREA_LINE_RANGE],Arc:[ws.PIE,ws.DONUT,ws.GAUGE,ws.RADAR],Line:[ws.LINE,ws.SPLINE,ws.AREA,ws.AREA_SPLINE,ws.AREA_SPLINE_RANGE,ws.AREA_LINE_RANGE,ws.STEP,ws.AREA_STEP],Step:[ws.STEP,ws.AREA_STEP],Spline:[ws.SPLINE,ws.AREA_SPLINE,ws.AREA_SPLINE_RANGE]},As={getYDomainMinMax:function(t,e){var n=this,r=n.axis,i=n.config,a="min"===e,o=i.data_groups,s=n.mapToIds(t),u=n.getValuesAsIdKeyed(t);return o.length>0&&function(){for(var e,i=n["has"+(a?"Negative":"Positive")+"ValueInTargets"](t),c=function(t,n){if(0===(n=n.filter((function(t){return s.indexOf(t)>=0}))).length)return e=n,"continue";var o=n[0],c=r.getId(o);i&&u[o]&&(u[o]=u[o].map((function(t){return(a?t<0:t>0)?t:0})));for(var l,f=function(t,e){if(!u[e])return"continue";var n=r.getId(e);u[e].forEach((function(t,e){var r=+t;n!==c||i&&(a?r>0:r<0)||(u[o][e]+=r)}))},h=1;l=n[h];h++)f(0,l);e=n},l=0;e=o[l];l++)c(0,e)}(),bo(e,Object.keys(u).map((function(t){return bo(e,u[t])})))},getYDomainMin:function(t){return this.getYDomainMinMax(t,"min")},getYDomainMax:function(t){return this.getYDomainMinMax(t,"max")},isHiddenTargetWithYDomain:function(t){var e=this;return e.state.hiddenTargetIds.some((function(n){return e.axis.getId(n)===t}))},getYDomain:function(t,e,n){var r=this,i=r.axis,a=r.config,o=r.scale,s="axis_"+e;if(r.isStackNormalized())return[0,100];var u=o&&o[e]&&"log"===o[e].type,c=t.filter((function(t){return i.getId(t.id)===e})),l=n?r.filterByXDomain(c,n):c;if(0===l.length)return r.isHiddenTargetWithYDomain(e)?o[e].domain():"y2"===e?o.y.domain():r.getYDomain(t,"y2",n);var f=a[s+"_min"],h=a[s+"_max"],d=r.getYDomainMin(l),g=r.getYDomainMax(l),p=a[s+"_center"],v=[ws.BAR,ws.BUBBLE,ws.SCATTER].concat(Ts.Line).some((function(t){var e=t.indexOf("area")>-1?"area":t;return r.hasType(t,l)&&a[e+"_zerobased"]})),y=a[s+"_inverted"],x=r.hasDataLabel()&&a.axis_rotated,_=r.hasDataLabel()&&!a.axis_rotated;d=ja(f)?f:ja(h)?d<h?d:h-10:d,g=ja(h)?h:ja(f)?f<g?g:f+10:g,isNaN(d)&&(d=0),isNaN(g)&&(g=d),d===g&&(d<0?g=0:d=0);var m=d>=0&&g>=0,b=d<=0&&g<=0;(ja(f)&&m||ja(h)&&b)&&(v=!1),v&&(m&&(d=0),b&&(g=0));var w=Math.abs(g-d),T={top:.1*w,bottom:.1*w};if(Ya(p)){var A=Math.max(Math.abs(d),Math.abs(g));g=p+A,d=p-A}if(x){var S=Wa(o.y.range()),k=r.getDataLabelLength(d,g,"width").map((function(t){return t/S}));["bottom","top"].forEach((function(t,e){T[t]+=w*(k[e]/(1-k[0]-k[1]))}))}else if(_){var E=r.getDataLabelLength(d,g,"height");["bottom","top"].forEach((function(t,e){T[t]+=i.convertPixelsToAxisPadding(E[e],w)}))}var M=a[s+"_padding"];Ka(M)&&["bottom","top"].forEach((function(t){T[t]=i.getPadding(M,t,T[t],w)})),v&&(m&&(T.bottom=d),b&&(T.top=-g));var C=u?[d,g].map((function(t){return t<0?0:t})):[d-T.bottom,g+T.top];return y?C.reverse():C},getXDomainMinMax:function(t,e){var n=this.config["axis_x_"+e],r=bo(e,t.map((function(t){return bo(e,t.values.map((function(t){return t.x})))}))),i=Qa(n)?n.value:n;return i=Ya(i)&&this.axis.isTimeSeries()?So.bind(this)(i):i,Qa(n)&&n.fit&&("min"===e&&i<r||"max"===e&&i>r)&&(i=void 0),Ya(i)?i:r},getXDomainMin:function(t){return this.getXDomainMinMax(t,"min")},getXDomainMax:function(t){return this.getXDomainMinMax(t,"max")},getXDomainPadding:function(t){var e,n,r=this,i=r.axis,a=r.config,o=t[1]-t[0],s=a.axis_x_padding;i.isCategorized()?n=0:r.hasType("bar")?n=(e=r.getMaxDataCount())>1?o/(e-1)/2:.5:n=.01*o;var u=n,c=n;return Qa(s)&&Ka(s)?(u=ja(s.left)?s.left:n,c=ja(s.right)?s.right:n):$a(a.axis_x_padding)&&(u=s,c=s),{left:u,right:c}},getXDomain:function(t){var e=this,n="log"===e.scale.x.type,r=[e.getXDomainMin(t),e.getXDomainMax(t)],i=0,a=0;if(n)i=r[0],a=r[1];else{var o=e.axis.isCategorized(),s=e.axis.isTimeSeries(),u=e.getXDomainPadding(r),c=r[0],l=r[1];c-l!=0||o||(s?(c=new Date(.5*c.getTime()),l=new Date(1.5*l.getTime())):(c=0===c?1:.5*c,l=0===l?-1:1.5*l)),(c||0===c)&&(i=s?new Date(c.getTime()-u.left):c-u.left),(l||0===l)&&(a=s?new Date(l.getTime()+u.right):l+u.right)}return[i,a]},updateXDomain:function(t,e,n,r,i){var a=this,o=a.config,s=a.org,u=a.scale,c=u.x,l=u.subX,f=o.zoom_enabled;if(n&&(c.domain(i||mo(a.getXDomain(t))),s.xDomain=c.domain(),f&&a.zoom.updateScaleExtent(),l.domain(c.domain()),a.brush&&a.brush.scale(l)),e){var h=i||!a.brush||fo(a)?s.xDomain:so(a).map(l.invert);c.domain(h),f&&a.zoom.updateScaleExtent()}return r&&c.domain(a.trimXDomain(c.orgDomain())),c.domain()},trimXDomain:function(t){var e=this.getZoomDomain(),n=e[0],r=e[1];return t[0]<=n&&(t[1]=+t[1]+(n-t[0]),t[0]=n),r<=t[1]&&(t[0]=+t[0]-(t[1]-r),t[1]=r),t},getZoomDomain:function(){var t=this.config,e=this.org.xDomain,n=e[0],r=e[1];return Ya(t.zoom_x_min)&&(n=bo("min",[n,t.zoom_x_min])),Ya(t.zoom_x_max)&&(r=bo("max",[r,t.zoom_x_max])),[n,r]}};function Ss(t,e,n){var r=t.config,i="axis_"+e+"_tick_format";return(r[i]?r[i]:t.defaultValueFormat)(n)}var ks={yFormat:function(t){return Ss(this,"y",t)},y2Format:function(t){return Ss(this,"y2",t)},getDefaultValueFormat:function(){var t=this;return t.hasArcType()&&!t.hasType("gauge")?t.defaultArcValueFormat:t.defaultValueFormat},defaultValueFormat:function(t){return ja(t)?+t:""},defaultArcValueFormat:function(t,e){return(100*e).toFixed(1)+"%"},dataLabelFormat:function(t){var e=this.config.data_labels,n=function(t){return ja(t)?+t:""},r=n;return Xa(e.format)?r=e.format:qa(e.format)&&(r=e.format[t]?!0===e.format[t]?n:e.format[t]:function(){return""}),r.bind(this.api)}},Es={initLegend:function(){var t=this,e=t.config,n=t.$el;t.legendItemTextBox={},t.state.legendHasRendered=!1,e.legend_show?(!e.legend_contents_bindto&&(n.legend=t.$el.svg.append("g").classed(In.legend,!0).attr("transform",t.getTranslate("legend"))),t.updateLegend()):t.state.hiddenLegendIds=t.mapToIds(t.data.targets)},updateLegend:function(t,e,n){var r=this,i=r.config,a=r.state,o=r.scale,s=r.$el,u=e||{withTransform:!1,withTransitionForTransform:!1,withTransition:!1};u.withTransition=to(u,"withTransition",!0),u.withTransitionForTransform=to(u,"withTransitionForTransform",!0),i.legend_contents_bindto&&i.legend_contents_template?r.updateLegendTemplate():r.updateLegendElement(t||r.mapToIds(r.data.targets),u,n),s.legend.selectAll("."+In.legendItem).classed(In.legendItemHidden,(function(t){var e=!r.isTargetToShow(t);return e&&(this.style.opacity=null),e})),r.updateScales(!1,!o.zoom),r.updateSvgSize(),r.transformAll(u.withTransitionForTransform,n),a.legendHasRendered=!0},updateLegendTemplate:function(){var t=this,e=t.config,n=t.$el,r=Ln(e.legend_contents_bindto),i=e.legend_contents_template;if(!r.empty()){var a=t.mapToIds(t.data.targets),o=[],s="";a.forEach((function(e){var n=Xa(i)?i.bind(t.api)(e,t.color(e),t.api.data(e)[0].values):Ao(i,{COLOR:t.color(e),TITLE:e});n&&(o.push(e),s+=n)}));var u=r.html(s).selectAll((function(){return this.childNodes})).data(o);t.setLegendItem(u),n.legend=r}},updateSizeForLegend:function(t){var e=this,n=e.config,r=e.state,i=r.isLegendTop,a=r.isLegendLeft,o=r.isLegendRight,s=r.isLegendInset,u=r.current,c=t.width,l=t.height,f={top:i?e.getCurrentPaddingTop()+n.legend_inset_y+5.5:u.height-l-e.getCurrentPaddingBottom()-n.legend_inset_y,left:a?e.getCurrentPaddingLeft()+n.legend_inset_x+.5:u.width-c-e.getCurrentPaddingRight()-n.legend_inset_x+.5};e.state.margin3={top:o?0:s?f.top:u.height-l,right:NaN,bottom:0,left:o?u.width-c:s?f.left:0}},transformLegend:function(t){var e=this.$el.legend;(t?e.transition():e).attr("transform",this.getTranslate("legend"))},updateLegendStep:function(t){this.state.legendStep=t},updateLegendItemWidth:function(t){this.state.legendItemWidth=t},updateLegendItemHeight:function(t){this.state.legendItemHeight=t},updateLegendItemColor:function(t,e){var n=this.$el.legend;n&&n.select("."+In.legendItem+"-"+t+" line").style("stroke",e)},getLegendWidth:function(){var t=this.state,e=t.current.width,n=t.isLegendRight,r=t.isLegendInset,i=t.legendItemWidth,a=t.legendStep;return this.config.legend_show?n||r?i*(a+1):e:0},getLegendHeight:function(){var t=this.state,e=t.current,n=t.isLegendRight,r=t.legendItemHeight,i=t.legendStep;return this.config.legend_show?n?e.height:Math.max(20,r)*(i+1):0},opacityForUnfocusedLegend:function(t){return t.classed(In.legendItemHidden)?null:"0.3"},toggleFocusLegend:function(t,e){var n=this,r=n.$el.legend,i=n.mapToTargetIds(t);r&&r.selectAll("."+In.legendItem).filter((function(t){return i.indexOf(t)>=0})).classed(In.legendItemFocused,e).transition().duration(100).style("opacity",(function(){return e?null:n.opacityForUnfocusedLegend.call(n,Ln(this))}))},revertLegend:function(){var t=this.$el.legend;t&&t.selectAll("."+In.legendItem).classed(In.legendItemFocused,!1).transition().duration(100).style("opacity",null)},showLegend:function(t){var e=this,n=e.config,r=e.$el;n.legend_show||(n.legend_show=!0,r.legend?r.legend.style("visibility",null):e.initLegend(),!e.state.legendHasRendered&&e.updateLegend()),e.removeHiddenLegendIds(t),r.legend.selectAll(e.selectorLegends(t)).style("visibility",null).transition().style("opacity",null)},hideLegend:function(t){var e=this,n=e.config,r=e.$el.legend;n.legend_show&&Za(t)&&(n.legend_show=!1,r.style("visibility","hidden")),e.addHiddenLegendIds(t),r.selectAll(e.selectorLegends(t)).style("opacity","0").style("visibility","hidden")},getLegendItemTextBox:function(t,e){var n,r=this,i=r.cache,a=r.state,o=Po;return t&&(!(n=!a.redrawing&&i.get(o)||{})[t]&&(n[t]=r.getTextRect(e,In.legendItem),i.add(o,n)),n=n[t]),n},setLegendItem:function(t){var e=this,n=e.api,r=e.config,i=e.state,a="touch"===i.inputType,o=e.hasType("gauge");t.attr("class",(function(t){var n=Ln(this);return(!n.empty()&&n.attr("class")||"")+e.generateClass(In.legendItem,t)})).style("visibility",(function(t){return e.isLegendToShow(t)?null:"hidden"})),r.interaction_enabled&&(t.style("cursor","pointer").on("click",(function(t,i){eo(r.legend_item_onclick,n,i)||(t.altKey?(n.hide(),n.show(i)):(n.toggle(i),Ln(this).classed(In.legendItemFocused,!1))),a&&e.hideTooltip()})),!a&&t.on("mouseout",(function(t,i){eo(r.legend_item_onout,n,i)||(Ln(this).classed(In.legendItemFocused,!1),o&&e.undoMarkOverlapped(e,"."+In.gaugeValue),e.api.revert())})).on("mouseover",(function(t,a){eo(r.legend_item_onover,n,a)||(Ln(this).classed(In.legendItemFocused,!0),o&&e.markOverlapped(a,e,"."+In.gaugeValue),!i.transiting&&e.isTargetToShow(a)&&n.focus(a))})))},updateLegendElement:function(t,e){var n,r,i,a=this,o=a.config,s=a.state,u=a.$el.legend,c=o.legend_item_tile_width+5,l=0,f=0,h=0,d={},g={},p={},v=[0],y={},x=0,_=s.isLegendRight||s.isLegendInset,m=t.filter((function(t){return!Ya(o.data_names[t])||null!==o.data_names[t]})),b=e.withTransition,w=function(t,e,n){var r,i=n===m.length-1,u=a.getLegendItemTextBox(e,t),b=u.width+c+(i&&!_?0:10)+o.legend_padding,w=u.height+4,T=_?w:b,A=_?a.getLegendHeight():a.getLegendWidth(),S=function(t,e){e||(r=(A-h-T)/2)<10&&(r=(A-T)/2,h=0,x++),y[t]=x,v[x]=s.isLegendInset?10:r,d[t]=h,h+=T};if(0===n&&(h=0,x=0,l=0,f=0),o.legend_show&&!a.isLegendToShow(e))return g[e]=0,p[e]=0,y[e]=0,void(d[e]=0);g[e]=b,p[e]=w,(!l||b>=l)&&(l=b),(!f||w>=f)&&(f=w);var k=_?f:l;o.legend_equally?(Object.keys(g).forEach((function(t){return g[t]=l})),Object.keys(p).forEach((function(t){return p[t]=f})),(r=(A-k*m.length)/2)<10?(h=0,x=0,m.forEach((function(t){return S(t)}))):S(e,!0)):S(e)};s.isLegendInset&&(x=o.legend_inset_step?o.legend_inset_step:m.length,a.updateLegendStep(x)),s.isLegendRight?(n=function(t){return l*y[t]},r=function(t){return v[y[t]]+d[t]}):s.isLegendInset?(n=function(t){return l*y[t]+10},r=function(t){return v[y[t]]+d[t]}):(n=function(t){return v[y[t]]+d[t]},r=function(t){return f*y[t]});var T=function(t,e){return n(t,e)+4+o.legend_item_tile_width},A=function(t,e){return n(t,e)},S=function(t,e){return n(t,e)-2},k=function(t,e){return n(t,e)-2+o.legend_item_tile_width},E=function(t,e){return r(t,e)+9},M=function(t,e){return r(t,e)-5},C=function(t,e){return r(t,e)+4},O=-200,R=u.selectAll("."+In.legendItem).data(m).enter().append("g");a.setLegendItem(R),R.append("text").text((function(t){return Ya(o.data_names[t])?o.data_names[t]:t})).each((function(t,e){w(this,t,e)})).style("pointer-events","none").attr("x",_?T:O).attr("y",_?O:E),R.append("rect").attr("class",In.legendItemEvent).style("fill-opacity","0").attr("x",_?A:O).attr("y",_?O:M);var L=function(t){var e=a.getDataById(t);return a.levelColor?a.levelColor(e.values[0].value):a.color(e)},I=o.legend_usePoint;if(I){var D=[];R.append((function(t){var e=Ka(o.point_pattern)?o.point_pattern:[o.point_type];-1===D.indexOf(t)&&D.push(t);var n=e[D.indexOf(t)%e.length];return"rectangle"===n&&(n="rect"),za.createElementNS(Re.svg,"hasValidPointType"in a&&a.hasValidPointType(n)?n:"use")})).attr("class",In.legendItemPoint).style("fill",L).style("pointer-events","none").attr("href",(function(t,e,n){return"use"===n[e].nodeName.toLowerCase()?"#"+s.datetimeId+"-point-"+t:void 0}))}else R.append("line").attr("class",In.legendItemTile).style("stroke",L).style("pointer-events","none").attr("x1",_?S:O).attr("y1",_?O:C).attr("x2",_?k:O).attr("y2",_?O:C).attr("stroke-width",o.legend_item_tile_height);i=u.select("."+In.legendBackground+" rect"),s.isLegendInset&&l>0&&0===i.size()&&(i=u.insert("g","."+In.legendItem).attr("class",In.legendBackground).append("rect"));var P=u.selectAll("text").data(m).text((function(t){return Ya(o.data_names[t])?o.data_names[t]:t})).each((function(t,e){w(this,t,e)}));(b?P.transition():P).attr("x",T).attr("y",E);var z=u.selectAll("rect."+In.legendItemEvent).data(m);if((b?z.transition():z).attr("width",(function(t){return g[t]})).attr("height",(function(t){return p[t]})).attr("x",A).attr("y",M),I){var F=u.selectAll("."+In.legendItemPoint).data(m);(b?F.transition():F).each((function(){var t,e,n,r=this.nodeName.toLowerCase(),i=o.point_r,a="x",s="y",u=2,c=2.5;if("circle"===r){var l=.2*i;a="cx",s="cy",t=i+l,u=2*i,c=-l}else if("rect"===r){var f=2.5*i;e=f,n=f,c=3}Ln(this).attr(a,(function(t){return S(t)+u})).attr(s,(function(t){return C(t)-c})).attr("r",t).attr("width",e).attr("height",n)}))}else{var N=u.selectAll("line."+In.legendItemTile).data(m);(b?N.transition():N).style("stroke",L).attr("x1",S).attr("y1",C).attr("x2",k).attr("y2",C)}i&&(b?i.transition():i).attr("height",a.getLegendHeight()-12).attr("width",l*(x+1)+10),a.updateLegendItemWidth(l),a.updateLegendItemHeight(f),a.updateLegendStep(x)}},Ms={redraw:function(t){void 0===t&&(t={});var e=this,n=e.config,r=e.state,i=e.$el,a=i.main;r.redrawing=!0;var o=e.filterTargetsToShow(e.data.targets),s=t.initializing,u=t.flow,c=e.getWithOption(t),l=c.Transition?n.transition_duration:0,f=c.TransitionForExit?l:0,h=c.TransitionForAxis?l:0,d=e.axis&&e.axis.generateTransitions(h);e.updateSizes(s),c.Legend&&n.legend_show?(t.withTransition=!!l,e.updateLegend(e.mapToIds(e.data.targets),t,d)):c.Dimension&&e.updateDimension(!0),(!e.hasArcType()||r.hasRadar)&&e.updateCircleY&&(e.circleY=e.updateCircleY()),r.hasAxis?(e.axis.redrawAxis(o,c,d,u,s),n.data_empty_label_text&&a.select("text."+In.text+"."+In.empty).attr("x",r.width/2).attr("y",r.height/2).text(n.data_empty_label_text).style("display",o.length?"none":null),e.hasGrid()&&e.updateGrid(l),n.regions.length&&e.updateRegion(l),["bar","candlestick","line","area"].forEach((function(t){var n=go(t);(/^(line|area)$/.test(t)&&e.hasTypeOf(n)||e.hasType(t))&&e["update"+n](f)})),i.text&&a.selectAll("."+In.selectedCircles).filter(e.isBarType.bind(e)).selectAll("circle").remove(),n.interaction_enabled&&!u&&c.EventRect&&(e.redrawEventRect(),e.bindZoomEvent&&e.bindZoomEvent())):(i.arcs&&e.redrawArc(l,f,c.Transform),i.radar&&e.redrawRadar(f)),!r.resizing&&(e.hasPointType()||r.hasRadar)&&e.updateCircle(),e.hasDataLabel()&&!e.hasArcType(null,["radar"])&&e.updateText(f),e.redrawTitle&&e.redrawTitle(),s&&e.updateTypesElements(),e.generateRedrawList(o,u,l,c.Subchart),e.callPluginHook("$redraw",t,l)},generateRedrawList:function(t,e,n,r){var i=this,a=i.config,o=i.state,s=i.getDrawShape();o.hasAxis&&a.subchart_show&&i.redrawSubchart(r,n,s);var u=e&&i.generateFlow({targets:t,flow:e,duration:e.duration,shape:s,xv:i.xv.bind(i)}),c=(n||u)&&ko(),l=i.getRedrawList(s,e,u,c),f=function(){u&&u(),o.redrawing=!1,eo(a.onrendered,i.api)};if(f)if(c&&l.length){var h=Uo();ta().duration(n).each((function(){l.reduce((function(t,e){return t.concat(e)}),[]).forEach((function(t){return h.add(t)}))})).call(h,f)}else o.transiting||f();i.mapToIds(i.data.targets).forEach((function(t){o.withoutFadeIn[t]=!0}))},getRedrawList:function(t,e,n,r){var i=this,a=i.config,o=i.state,s=o.hasAxis,u=o.hasRadar,c=i.$el.grid,l=t.pos,f=l.cx,h=l.cy,d=l.xForText,g=l.yForText,p=[];return s&&((a.grid_x_lines.length||a.grid_y_lines.length)&&p.push(i.redrawGrid(r)),a.regions.length&&p.push(i.redrawRegion(r)),Object.keys(t.type).forEach((function(e){var n=go(e),a=t.type[e];(/^(area|line)$/.test(e)&&i.hasTypeOf(n)||i.hasType(e))&&p.push(i["redraw"+n](a,r))})),!e&&c.main&&p.push(i.updateGridFocus())),(!i.hasArcType()||u)&&Ka(a.data_labels)&&!1!==a.data_labels&&p.push(i.redrawText(d,g,e,r)),(i.hasPointType()||u)&&!a.point_focus_only&&i.redrawCircle&&p.push(i.redrawCircle(f,h,r,n)),p},updateAndRedraw:function(t){void 0===t&&(t={});var e,n=this,r=n.config,i=n.state;t.withTransition=to(t,"withTransition",!0),t.withTransform=to(t,"withTransform",!1),t.withLegend=to(t,"withLegend",!1),t.withUpdateXDomain=!0,t.withUpdateOrgXDomain=!0,t.withTransitionForExit=!1,t.withTransitionForTransform=to(t,"withTransitionForTransform",t.withTransition),t.withLegend&&r.legend_show||(i.hasAxis&&(e=n.axis.generateTransitions(t.withTransitionForAxis?r.transition_duration:0)),n.updateScales(),n.updateSvgSize(),n.transformAll(t.withTransitionForTransform,e)),n.redraw(t,e)},redrawWithoutRescale:function(){this.redraw({withY:!1,withSubchart:!1,withEventRect:!1,withTransitionForAxis:!1})}},Cs=Math.sqrt(50),Os=Math.sqrt(10),Rs=Math.sqrt(2);function Ls(t,e,n){var r,i,a,o,s=-1;if(n=+n,(t=+t)===(e=+e)&&n>0)return[t];if((r=e<t)&&(i=t,t=e,e=i),0===(o=Is(t,e,n))||!isFinite(o))return[];if(o>0){var u=Math.round(t/o),c=Math.round(e/o);for(u*o<t&&++u,c*o>e&&--c,a=Array(i=c-u+1);++s<i;)a[s]=(u+s)*o}else{o=-o;var l=Math.round(t*o),f=Math.round(e*o);for(l/o<t&&++l,f/o>e&&--f,a=Array(i=f-l+1);++s<i;)a[s]=(l+s)/o}return r&&a.reverse(),a}function Is(t,e,n){var r=(e-t)/Math.max(0,n),i=Math.floor(Math.log(r)/Math.LN10),a=r/Math.pow(10,i);return i>=0?(a>=Cs?10:a>=Os?5:a>=Rs?2:1)*Math.pow(10,i):-Math.pow(10,-i)/(a>=Cs?10:a>=Os?5:a>=Rs?2:1)}function Ds(t,e,n){var r=Math.abs(e-t)/Math.max(0,n),i=Math.pow(10,Math.floor(Math.log(r)/Math.LN10)),a=r/i;return a>=Cs?i*=10:a>=Os?i*=5:a>=Rs&&(i*=2),e<t?-i:i}function Ps(t,e){return t<e?-1:t>e?1:t>=e?0:NaN}function zs(t){function e(t,e,n,i){for(null==n&&(n=0),null==i&&(i=t.length);n<i;){var a=n+i>>>1;r(t[a],e)<0?n=a+1:i=a}return n}var n=t,r=t;return 1===t.length&&(n=function(e,n){return t(e)-n},r=function(t){return function(e,n){return Ps(t(e),n)}}(t)),{left:e,center:function(t,r,i,a){null==i&&(i=0),null==a&&(a=t.length);var o=e(t,r,i,a-1);return o>i&&n(t[o-1],r)>-n(t[o],r)?o-1:o},right:function(t,e,n,i){for(null==n&&(n=0),null==i&&(i=t.length);n<i;){var a=n+i>>>1;r(t[a],e)>0?i=a:n=a+1}return n}}}var Fs=zs(Ps),Ns=Fs.right,js=(Fs.left,zs((function(t){return null===t?NaN:+t})).center,Ns);function Xs(t,e){return t=+t,e=+e,function(n){return Math.round(t*(1-n)+e*n)}}function Bs(t){return+t}var $s=[0,1];function Us(t){return t}function Ys(t,e){return(e-=t=+t)?function(n){return(n-t)/e}:function(t){return function(){return t}}(isNaN(e)?NaN:.5)}function Vs(t,e,n){var r=t[0],i=t[1],a=e[0],o=e[1];return i<r?(r=Ys(i,r),a=n(o,a)):(r=Ys(r,i),a=n(a,o)),function(t){return a(r(t))}}function Gs(t,e,n){var r=Math.min(t.length,e.length)-1,i=Array(r),a=Array(r),o=-1;for(t[r]<t[0]&&(t=t.slice().reverse(),e=e.slice().reverse());++o<r;)i[o]=Ys(t[o],t[o+1]),a[o]=n(e[o],e[o+1]);return function(e){var n=js(t,e,1,r)-1;return a[n](i[n](e))}}function Hs(t,e){return e.domain(t.domain()).range(t.range()).interpolate(t.interpolate()).clamp(t.clamp()).unknown(t.unknown())}function Ws(){function t(){var t,n,r,i=Math.min(u.length,c.length);return f!==Us&&(t=u[0],n=u[i-1],t>n&&(r=t,t=n,n=r),f=function(e){return Math.max(t,Math.min(n,e))}),a=i>2?Gs:Vs,o=s=null,e}function e(t){return null==t||isNaN(t=+t)?i:(o||(o=a(u.map(n),c,l)))(n(f(t)))}var n,r,i,a,o,s,u=$s,c=$s,l=Gr,f=Us;return e.invert=function(t){return f(r((s||(s=a(c,u.map(n),Br)))(t)))},e.domain=function(e){return arguments.length?(u=Array.from(e,Bs),t()):u.slice()},e.range=function(e){return arguments.length?(c=Array.from(e),t()):c.slice()},e.rangeRound=function(e){return c=Array.from(e),l=Xs,t()},e.clamp=function(e){return arguments.length?(f=!!e||Us,t()):f!==Us},e.interpolate=function(e){return arguments.length?(l=e,t()):l},e.unknown=function(t){return arguments.length?(i=t,e):i},function(e,i){return n=e,r=i,t()}}function qs(){return Ws()(Us,Us)}var Zs,Ks=/^(?:(.)?([<>=^]))?([+\-( ])?([$#])?(0)?(\d+)?(,)?(\.\d+)?(~)?([a-z%])?$/i;function Js(t){if(!(e=Ks.exec(t)))throw new Error("invalid format: "+t);var e;return new Qs({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]})}function Qs(t){this.fill=void 0===t.fill?" ":t.fill+"",this.align=void 0===t.align?">":t.align+"",this.sign=void 0===t.sign?"-":t.sign+"",this.symbol=void 0===t.symbol?"":t.symbol+"",this.zero=!!t.zero,this.width=void 0===t.width?void 0:+t.width,this.comma=!!t.comma,this.precision=void 0===t.precision?void 0:+t.precision,this.trim=!!t.trim,this.type=void 0===t.type?"":t.type+""}function tu(t,e){if((n=(t=e?t.toExponential(e-1):t.toExponential()).indexOf("e"))<0)return null;var n,r=t.slice(0,n);return[r.length>1?r[0]+r.slice(2):r,+t.slice(n+1)]}function eu(t){return(t=tu(Math.abs(t)))?t[1]:NaN}function nu(t,e){var n=tu(t,e);if(!n)return t+"";var r=n[0],i=n[1];return i<0?"0."+Array(-i).join("0")+r:r.length>i+1?r.slice(0,i+1)+"."+r.slice(i+1):r+Array(i-r.length+2).join("0")}Js.prototype=Qs.prototype,Qs.prototype.toString=function(){return this.fill+this.align+this.sign+this.symbol+(this.zero?"0":"")+(void 0===this.width?"":Math.max(1,0|this.width))+(this.comma?",":"")+(void 0===this.precision?"":"."+Math.max(0,0|this.precision))+(this.trim?"~":"")+this.type};var ru={"%":function(t,e){return(100*t).toFixed(e)},b:function(t){return Math.round(t).toString(2)},c:function(t){return t+""},d:function(t){return Math.abs(t=Math.round(t))>=1e21?t.toLocaleString("en").replace(/,/g,""):t.toString(10)},e:function(t,e){return t.toExponential(e)},f:function(t,e){return t.toFixed(e)},g:function(t,e){return t.toPrecision(e)},o:function(t){return Math.round(t).toString(8)},p:function(t,e){return nu(100*t,e)},r:nu,s:function(t,e){var n=tu(t,e);if(!n)return t+"";var r=n[0],i=n[1],a=i-(Zs=3*Math.max(-8,Math.min(8,Math.floor(i/3))))+1,o=r.length;return a===o?r:a>o?r+Array(a-o+1).join("0"):a>0?r.slice(0,a)+"."+r.slice(a):"0."+Array(1-a).join("0")+tu(t,Math.max(0,e+a-1))[0]},X:function(t){return Math.round(t).toString(16).toUpperCase()},x:function(t){return Math.round(t).toString(16)}};function iu(t){return t}var au,ou,su,uu=Array.prototype.map,cu=["y","z","a","f","p","n","µ","m","","k","M","G","T","P","E","Z","Y"];function lu(t){function e(t){function e(t){var e,a,o,c=m,d=b;if("c"===_)d=w(t)+d,t="";else{var A=(t=+t)<0||1/t<0;if(t=isNaN(t)?f:w(Math.abs(t),y),x&&(t=function(t){t:for(var e,n=t.length,r=1,i=-1;r<n;++r)switch(t[r]){case".":i=e=r;break;case"0":0===i&&(i=r),e=r;break;default:if(!+t[r])break t;i>0&&(i=0)}return i>0?t.slice(0,i)+t.slice(e+1):t}(t)),A&&0==+t&&"+"!==h&&(A=!1),c=(A?"("===h?h:l:"-"===h||"("===h?"":h)+c,d=("s"===_?cu[8+Zs/3]:"")+d+(A&&"("===h?")":""),T)for(e=-1,a=t.length;++e<a;)if(48>(o=t.charCodeAt(e))||o>57){d=(46===o?s+t.slice(e+1):t.slice(e))+d,t=t.slice(0,e);break}}v&&!g&&(t=i(t,1/0));var S=c.length+t.length+d.length,k=S<p?Array(p-S+1).join(n):"";switch(v&&g&&(t=i(k+t,k.length?p-d.length:1/0),k=""),r){case"<":t=c+t+d+k;break;case"=":t=c+k+t+d;break;case"^":t=k.slice(0,S=k.length>>1)+c+t+d+k.slice(S);break;default:t=k+c+t+d}return u(t)}var n=(t=Js(t)).fill,r=t.align,h=t.sign,d=t.symbol,g=t.zero,p=t.width,v=t.comma,y=t.precision,x=t.trim,_=t.type;"n"===_?(v=!0,_="g"):!ru[_]&&(void 0===y&&(y=12),x=!0,_="g"),(g||"0"===n&&"="===r)&&(g=!0,n="0",r="=");var m="$"===d?a:"#"===d&&/[boxX]/.test(_)?"0"+_.toLowerCase():"",b="$"===d?o:/[%p]/.test(_)?c:"",w=ru[_],T=/[defgprs%]/.test(_);return y=void 0===y?6:/[gprs]/.test(_)?Math.max(1,Math.min(21,y)):Math.max(0,Math.min(20,y)),e.toString=function(){return t+""},e}var n,r,i=void 0===t.grouping||void 0===t.thousands?iu:(n=uu.call(t.grouping,Number),r=t.thousands+"",function(t,e){for(var i=t.length,a=[],o=0,s=n[0],u=0;i>0&&s>0&&(u+s+1>e&&(s=Math.max(1,e-u)),a.push(t.substring(i-=s,i+s)),!((u+=s+1)>e));)s=n[o=(o+1)%n.length];return a.reverse().join(r)}),a=void 0===t.currency?"":t.currency[0]+"",o=void 0===t.currency?"":t.currency[1]+"",s=void 0===t.decimal?".":t.decimal+"",u=void 0===t.numerals?iu:function(t){return function(e){return e.replace(/[0-9]/g,(function(e){return t[+e]}))}}(uu.call(t.numerals,String)),c=void 0===t.percent?"%":t.percent+"",l=void 0===t.minus?"−":t.minus+"",f=void 0===t.nan?"NaN":t.nan+"";return{format:e,formatPrefix:function(t,n){var r=e(((t=Js(t)).type="f",t)),i=3*Math.max(-8,Math.min(8,Math.floor(eu(n)/3))),a=Math.pow(10,-i),o=cu[8+i/3];return function(t){return r(a*t)+o}}}}function fu(t,e,n,r){var i,a=Ds(t,e,n);switch((r=Js(null==r?",f":r)).type){case"s":var o=Math.max(Math.abs(t),Math.abs(e));return null!=r.precision||isNaN(i=function(t,e){return Math.max(0,3*Math.max(-8,Math.min(8,Math.floor(eu(e)/3)))-eu(Math.abs(t)))}(a,o))||(r.precision=i),su(r,o);case"":case"e":case"g":case"p":case"r":null!=r.precision||isNaN(i=function(t,e){return t=Math.abs(t),e=Math.abs(e)-t,Math.max(0,eu(e)-eu(t))+1}(a,Math.max(Math.abs(t),Math.abs(e))))||(r.precision=i-("e"===r.type));break;case"f":case"%":null!=r.precision||isNaN(i=function(t){return Math.max(0,-eu(Math.abs(t)))}(a))||(r.precision=i-2*("%"===r.type))}return ou(r)}function hu(t){var e=t.domain;return t.ticks=function(t){var n=e();return Ls(n[0],n[n.length-1],null==t?10:t)},t.tickFormat=function(t,n){var r=e();return fu(r[0],r[r.length-1],null==t?10:t,n)},t.nice=function(n){null==n&&(n=10);var r,i,a=e(),o=0,s=a.length-1,u=a[o],c=a[s],l=10;for(c<u&&(i=u,u=c,c=i,i=o,o=s,s=i);l-- >0;){if((i=Is(u,c,n))===r)return a[o]=u,a[s]=c,e(a);if(i>0)u=Math.floor(u/i)*i,c=Math.ceil(c/i)*i;else{if(!(i<0))break;u=Math.ceil(u*i)/i,c=Math.floor(c*i)/i}r=i}return t},t}function du(){var t=qs();return t.copy=function(){return Hs(t,du())},ps.apply(t,arguments),hu(t)}function gu(t){return function(e){return Math.sign(e)*Math.log1p(Math.abs(e/t))}}function pu(t){return function(e){return Math.sign(e)*Math.expm1(Math.abs(e))*t}}function vu(t){var e=1,n=t(gu(e),pu(e));return n.constant=function(n){return arguments.length?t(gu(e=+n),pu(e)):e},hu(n)}function yu(){var t=vu(Ws());return t.copy=function(){return Hs(t,yu()).constant(t.constant())},ps.apply(t,arguments)}function xu(t,e){var n,r=0,i=(t=t.slice()).length-1,a=t[r],o=t[i];return o<a&&(n=r,r=i,i=n,n=a,a=o,o=n),t[r]=e.floor(a),t[i]=e.ceil(o),t}function _u(t){return Math.log(t)}function mu(t){return Math.exp(t)}function bu(t){return-Math.log(-t)}function wu(t){return-Math.exp(-t)}function Tu(t){return isFinite(t)?+("1e"+t):t<0?0:t}function Au(t){return function(e){return-t(-e)}}function Su(t){function e(){return n=function(t){return t===Math.E?Math.log:10===t&&Math.log10||2===t&&Math.log2||(t=Math.log(t),function(e){return Math.log(e)/t})}(o),r=function(t){return 10===t?Tu:t===Math.E?Math.exp:function(e){return Math.pow(t,e)}}(o),a()[0]<0?(n=Au(n),r=Au(r),t(bu,wu)):t(_u,mu),i}var n,r,i=t(_u,mu),a=i.domain,o=10;return i.base=function(t){return arguments.length?(o=+t,e()):o},i.domain=function(t){return arguments.length?(a(t),e()):a()},i.ticks=function(t){var e,i=a(),s=i[0],u=i[i.length-1];(e=u<s)&&(h=s,s=u,u=h);var c,l,f,h=n(s),d=n(u),g=null==t?10:+t,p=[];if(!(o%1)&&d-h<g){if(h=Math.floor(h),d=Math.ceil(d),s>0){for(;h<=d;++h)for(l=1,c=r(h);l<o;++l)if(!((f=c*l)<s)){if(f>u)break;p.push(f)}}else for(;h<=d;++h)for(l=o-1,c=r(h);l>=1;--l)if(!((f=c*l)<s)){if(f>u)break;p.push(f)}2*p.length<g&&(p=Ls(s,u,g))}else p=Ls(h,d,Math.min(d-h,g)).map(r);return e?p.reverse():p},i.tickFormat=function(t,e){if(null==e&&(e=10===o?".0e":","),"function"!=typeof e&&(e=ou(e)),t===1/0)return e;null==t&&(t=10);var a=Math.max(1,o*t/i.ticks().length);return function(t){var i=t/r(Math.round(n(t)));return i*o<o-.5&&(i*=o),i<=a?e(t):""}},i.nice=function(){return a(xu(a(),{floor:function(t){return r(Math.floor(n(t)))},ceil:function(t){return r(Math.ceil(n(t)))}}))},i}function ku(){var t=Su(Ws()).domain([1,10]);return t.copy=function(){return Hs(t,ku()).base(t.base())},ps.apply(t,arguments),t}!function(t){au=lu(t),ou=au.format,su=au.formatPrefix}({thousands:",",grouping:[3],currency:["$",""]});var Eu=s((function(){}),(function(t,e){t.setTime(+t+e)}),(function(t,e){return e-t}));Eu.every=function(t){return t=Math.floor(t),isFinite(t)&&t>0?t>1?s((function(e){e.setTime(Math.floor(e/t)*t)}),(function(e,n){e.setTime(+e+n*t)}),(function(e,n){return(n-e)/t})):Eu:null};var Mu=Eu,Cu=(Eu.range,s((function(t){t.setTime(t-t.getMilliseconds())}),(function(t,e){t.setTime(+t+e*u)}),(function(t,e){return(e-t)/u}),(function(t){return t.getUTCSeconds()}))),Ou=Cu,Ru=(Cu.range,s((function(t){t.setTime(t-t.getMilliseconds()-t.getSeconds()*u)}),(function(t,e){t.setTime(+t+e*c)}),(function(t,e){return(e-t)/c}),(function(t){return t.getMinutes()}))),Lu=Ru,Iu=(Ru.range,s((function(t){t.setTime(t-t.getMilliseconds()-t.getSeconds()*u-t.getMinutes()*c)}),(function(t,e){t.setTime(+t+e*l)}),(function(t,e){return(e-t)/l}),(function(t){return t.getHours()}))),Du=Iu,Pu=(Iu.range,s((function(t){t.setDate(1),t.setHours(0,0,0,0)}),(function(t,e){t.setMonth(t.getMonth()+e)}),(function(t,e){return e.getMonth()-t.getMonth()+12*(e.getFullYear()-t.getFullYear())}),(function(t){return t.getMonth()}))),zu=Pu,Fu=(Pu.range,s((function(t){t.setUTCSeconds(0,0)}),(function(t,e){t.setTime(+t+e*c)}),(function(t,e){return(e-t)/c}),(function(t){return t.getUTCMinutes()}))),Nu=Fu,ju=(Fu.range,s((function(t){t.setUTCMinutes(0,0,0)}),(function(t,e){t.setTime(+t+e*l)}),(function(t,e){return(e-t)/l}),(function(t){return t.getUTCHours()}))),Xu=ju,Bu=(ju.range,s((function(t){t.setUTCDate(1),t.setUTCHours(0,0,0,0)}),(function(t,e){t.setUTCMonth(t.getUTCMonth()+e)}),(function(t,e){return e.getUTCMonth()-t.getUTCMonth()+12*(e.getUTCFullYear()-t.getUTCFullYear())}),(function(t){return t.getUTCMonth()}))),$u=Bu;Bu.range;function Uu(t,e,n,r,i,a){function o(e,n,r){var i=Math.abs(n-e)/r,a=zs((function(t){return t[2]})).right(s,i);if(a===s.length)return t.every(Ds(e/g,n/g,r));if(0===a)return Mu.every(Math.max(Ds(e,n,r),1));var o=s[i/s[a-1][2]<s[a][2]/i?a-1:a],u=o[0],c=o[1];return u.every(c)}var s=[[Ou,1,u],[Ou,5,5e3],[Ou,15,15e3],[Ou,30,3e4],[a,1,c],[a,5,3e5],[a,15,9e5],[a,30,18e5],[i,1,l],[i,3,108e5],[i,6,216e5],[i,12,432e5],[r,1,f],[r,2,1728e5],[n,1,h],[e,1,d],[e,3,7776e6],[t,1,g]];return[function(t,e,n){var r,i=e<t;i&&(t=(r=[e,t])[0],e=r[1]);var a=n&&"function"==typeof n.range?n:o(t,e,n),s=a?a.range(t,+e+1):[];return i?s.reverse():s},o]}var Yu=Uu(N,$u,v,A,Xu,Nu),Vu=Yu[0],Gu=Yu[1],Hu=Uu(z,zu,k,D,Du,Lu),Wu=Hu[0],qu=Hu[1];function Zu(t){return new Date(t)}function Ku(t){return t instanceof Date?+t:+new Date(+t)}function Ju(t,e,n,r,i,a,o,s,u,c){function l(t){return(u(t)<t?g:s(t)<t?p:o(t)<t?v:a(t)<t?y:r(t)<t?i(t)<t?x:_:n(t)<t?m:b)(t)}var f=qs(),h=f.invert,d=f.domain,g=c(".%L"),p=c(":%S"),v=c("%I:%M"),y=c("%I %p"),x=c("%a %d"),_=c("%b %d"),m=c("%B"),b=c("%Y");return f.invert=function(t){return new Date(h(t))},f.domain=function(t){return arguments.length?d(Array.from(t,Ku)):d().map(Zu)},f.ticks=function(e){var n=d();return t(n[0],n[n.length-1],null==e?10:e)},f.tickFormat=function(t,e){return null==e?l:c(e)},f.nice=function(t){var n=d();return t&&"function"==typeof t.range||(t=e(n[0],n[n.length-1],null==t?10:t)),t?d(xu(n,t)):f},f.copy=function(){return Hs(f,Ju(t,e,n,r,i,a,o,s,u,c))},f}function Qu(){return ps.apply(Ju(Wu,qu,z,zu,k,D,Du,Lu,Ou,U).domain([new Date(2e3,0,1),new Date(2e3,0,2)]),arguments)}function tc(){return ps.apply(Ju(Vu,Gu,N,$u,v,A,Xu,Nu,Ou,V).domain([Date.UTC(2e3,0,1),Date.UTC(2e3,0,2)]),arguments)}function ec(t,e,n){void 0===t&&(t="linear"),void 0===e&&(e=0),void 0===n&&(n=1);var r={linear:du,log:yu,_log:ku,time:Qu,utc:tc}[t]();return r.type=t,/_?log/.test(t)&&r.clamp(!0),r.range([e,n])}var nc={getXScale:function(t,e,n,r){var i=this,a=i.scale.zoom||ec(i.axis.getAxisType("x"),t,e);return i.getCustomizedScale(n?a.domain(n):a,r)},getYScale:function(t,e,n,r){var i=ec(this.axis.getAxisType(t),e,n);return r&&i.domain(r),i},getYScaleById:function(t,e){void 0===e&&(e=!1);var n="y2"===this.axis.getId(t),r=e?n?"subY2":"subY":n?"y2":"y";return this.scale[r]},getCustomizedScale:function(t,e){var n=this,r=e||function(){return n.axis.x.tickOffset()},i=function(e,n){var i=t(e)+r();return n?i:Math.ceil(i)};for(var a in t)i[a]=t[a];return i.orgDomain=function(){return t.domain()},i.orgScale=function(){return t},n.axis.isCategorized()&&(i.domain=function(e){var n=e;return arguments.length?(t.domain(n),i):[(n=this.orgDomain())[0],n[1]+1]}),i},updateScales:function(t,e){void 0===e&&(e=!0);var n=this,r=n.axis,i=n.config,a=n.format,o=n.org,s=n.scale,u=n.state,c=u.width,l=u.height,f=u.width2,h=u.height2;if(u.hasAxis){var d=i.axis_rotated,g={x:d?1:0,y:d?0:l,subX:d?1:0,subY:d?0:h},p={x:d?l:c,y:d?c:1,subX:d?l:c,subY:d?f:1},v=e&&s.x&&s.x.orgDomain(),y=e&&o.xDomain;s.x=n.getXScale(g.x,p.x,v,(function(){return r.x.tickOffset()})),s.subX=n.getXScale(g.x,p.x,y,(function(t){return t%1?0:r.subX.tickOffset()})),a.xAxisTick=r.getXAxisTickFormat(),r.setAxis("x",s.x,i.axis_x_tick_outer,t),i.subchart_show&&r.setAxis("subX",s.subX,i.axis_x_tick_outer,t),s.y=n.getYScale("y",g.y,p.y,s.y?s.y.domain():i.axis_y_default),s.subY=n.getYScale("y",g.subY,p.subY,s.subY?s.subY.domain():i.axis_y_default),r.setAxis("y",s.y,i.axis_y_tick_outer,t),i.axis_y2_show&&(s.y2=n.getYScale("y2",g.y,p.y,s.y2?s.y2.domain():i.axis_y2_default),s.subY2=n.getYScale("y2",g.subY,p.subY,s.subY2?s.subY2.domain():i.axis_y2_default),r.setAxis("y2",s.y2,i.axis_y2_tick_outer,t))}else n.updateArc&&n.updateArc()},xx:function(t){var e=this.config,n=this.scale,r=n.x,i=n.zoom,a=e.zoom_enabled&&i?i:r;return t?a(ja(t.x)?t.x:t):null},xv:function(t){var e=this,n=e.axis,r=e.config,i=e.scale,a=i.x,o=i.zoom,s=r.zoom_enabled&&o?o:a,u=e.getBaseValue(t);return n.isTimeSeries()?u=So.call(e,u):n.isCategorized()&&Ba(u)&&(u=r.axis_x_categories.indexOf(u)),Math.ceil(s(u))},yv:function(t){var e=this.scale,n=e.y,r=e.y2,i=t.axis&&"y2"===t.axis?r:n;return Math.ceil(i(this.getBaseValue(t)))},subxx:function(t){return t?this.scale.subX(t.x):null}};function rc(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 ic(t){this._context=t}function ac(t){return new ic(t)}function oc(){}function sc(t){this._context=t}function uc(t){return new sc(t)}function cc(t){this._context=t}function lc(t){return new cc(t)}function fc(t,e){this._basis=new ic(t),this._beta=e}ic.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:rc(this,this._x1,this._y1);case 2:this._context.lineTo(this._x1,this._y1)}(this._line||0!==this._line&&1===this._point)&&this._context.closePath(),this._line=1-this._line},point:function(t,e){switch(t=+t,e=+e,this._point){case 0:this._point=1,this._line?this._context.lineTo(t,e):this._context.moveTo(t,e);break;case 1:this._point=2;break;case 2:this._point=3,this._context.lineTo((5*this._x0+this._x1)/6,(5*this._y0+this._y1)/6);default:rc(this,t,e)}this._x0=this._x1,this._x1=t,this._y0=this._y1,this._y1=e}},sc.prototype={areaStart:oc,areaEnd:oc,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)}},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:rc(this,t,e)}this._x0=this._x1,this._x1=t,this._y0=this._y1,this._y1=e}},cc.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||0!==this._line&&3===this._point)&&this._context.closePath(),this._line=1-this._line},point:function(t,e){switch(t=+t,e=+e,this._point){case 0:this._point=1;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:rc(this,t,e)}this._x0=this._x1,this._x1=t,this._y0=this._y1,this._y1=e}},fc.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,i=t[0],a=e[0],o=t[n]-i,s=e[n]-a,u=-1;++u<=n;)r=u/n,this._basis.point(this._beta*t[u]+(1-this._beta)*(i+r*o),this._beta*e[u]+(1-this._beta)*(a+r*s));this._x=this._y=null,this._basis.lineEnd()},point:function(t,e){this._x.push(+t),this._y.push(+e)}};var hc=function t(e){function n(t){return 1===e?new ic(t):new fc(t,e)}return n.beta=function(e){return t(+e)},n}(.85);function dc(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 gc(t,e){this._context=t,this._k=(1-e)/6}gc.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:dc(this,this._x1,this._y1)}(this._line||0!==this._line&&1===this._point)&&this._context.closePath(),this._line=1-this._line},point:function(t,e){switch(t=+t,e=+e,this._point){case 0:this._point=1,this._line?this._context.lineTo(t,e):this._context.moveTo(t,e);break;case 1:this._point=2,this._x1=t,this._y1=e;break;case 2:this._point=3;default:dc(this,t,e)}this._x0=this._x1,this._x1=this._x2,this._x2=t,this._y0=this._y1,this._y1=this._y2,this._y2=e}};var pc=function t(e){function n(t){return new gc(t,e)}return n.tension=function(e){return t(+e)},n}(0);function vc(t,e){this._context=t,this._k=(1-e)/6}vc.prototype={areaStart:oc,areaEnd:oc,lineStart:function(){this._x0=this._x1=this._x2=this._x3=this._x4=this._x5=this._y0=this._y1=this._y2=this._y3=this._y4=this._y5=NaN,this._point=0},lineEnd:function(){switch(this._point){case 1:this._context.moveTo(this._x3,this._y3),this._context.closePath();break;case 2:this._context.lineTo(this._x3,this._y3),this._context.closePath();break;case 3:this.point(this._x3,this._y3),this.point(this._x4,this._y4),this.point(this._x5,this._y5)}},point:function(t,e){switch(t=+t,e=+e,this._point){case 0:this._point=1,this._x3=t,this._y3=e;break;case 1:this._point=2,this._context.moveTo(this._x4=t,this._y4=e);break;case 2:this._point=3,this._x5=t,this._y5=e;break;default:dc(this,t,e)}this._x0=this._x1,this._x1=this._x2,this._x2=t,this._y0=this._y1,this._y1=this._y2,this._y2=e}};var yc=function t(e){function n(t){return new vc(t,e)}return n.tension=function(e){return t(+e)},n}(0);function xc(t,e){this._context=t,this._k=(1-e)/6}xc.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||0!==this._line&&3===this._point)&&this._context.closePath(),this._line=1-this._line},point:function(t,e){switch(t=+t,e=+e,this._point){case 0:this._point=1;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:dc(this,t,e)}this._x0=this._x1,this._x1=this._x2,this._x2=t,this._y0=this._y1,this._y1=this._y2,this._y2=e}};var _c=function t(e){function n(t){return new xc(t,e)}return n.tension=function(e){return t(+e)},n}(0),mc=Math.abs,bc=Math.atan2,wc=Math.cos,Tc=Math.max,Ac=Math.min,Sc=Math.sin,kc=Math.sqrt,Ec=1e-12,Mc=Math.PI,Cc=Mc/2,Oc=2*Mc;function Rc(t){return t>1?0:t<-1?Mc:Math.acos(t)}function Lc(t){return t>=1?Cc:t<=-1?-Cc:Math.asin(t)}function Ic(t,e,n){var r=t._x1,i=t._y1,a=t._x2,o=t._y2;if(t._l01_a>Ec){var s=2*t._l01_2a+3*t._l01_a*t._l12_a+t._l12_2a,u=3*t._l01_a*(t._l01_a+t._l12_a);r=(r*s-t._x0*t._l12_2a+t._x2*t._l01_2a)/u,i=(i*s-t._y0*t._l12_2a+t._y2*t._l01_2a)/u}if(t._l23_a>Ec){var c=2*t._l23_2a+3*t._l23_a*t._l12_a+t._l12_2a,l=3*t._l23_a*(t._l23_a+t._l12_a);a=(a*c+t._x1*t._l23_2a-e*t._l12_2a)/l,o=(o*c+t._y1*t._l23_2a-n*t._l12_2a)/l}t._context.bezierCurveTo(r,i,a,o,t._x2,t._y2)}function Dc(t,e){this._context=t,this._alpha=e}Dc.prototype={areaStart:function(){this._line=0},areaEnd:function(){this._line=NaN},lineStart:function(){this._x0=this._x1=this._x2=this._y0=this._y1=this._y2=NaN,this._l01_a=this._l12_a=this._l23_a=this._l01_2a=this._l12_2a=this._l23_2a=this._point=0},lineEnd:function(){switch(this._point){case 2:this._context.lineTo(this._x2,this._y2);break;case 3:this.point(this._x2,this._y2)}(this._line||0!==this._line&&1===this._point)&&this._context.closePath(),this._line=1-this._line},point:function(t,e){if(t=+t,e=+e,this._point){var n=this._x2-t,r=this._y2-e;this._l23_a=Math.sqrt(this._l23_2a=Math.pow(n*n+r*r,this._alpha))}switch(this._point){case 0:this._point=1,this._line?this._context.lineTo(t,e):this._context.moveTo(t,e);break;case 1:this._point=2;break;case 2:this._point=3;default:Ic(this,t,e)}this._l01_a=this._l12_a,this._l12_a=this._l23_a,this._l01_2a=this._l12_2a,this._l12_2a=this._l23_2a,this._x0=this._x1,this._x1=this._x2,this._x2=t,this._y0=this._y1,this._y1=this._y2,this._y2=e}};var Pc=function t(e){function n(t){return e?new Dc(t,e):new gc(t,0)}return n.alpha=function(e){return t(+e)},n}(.5);function zc(t,e){this._context=t,this._alpha=e}zc.prototype={areaStart:oc,areaEnd:oc,lineStart:function(){this._x0=this._x1=this._x2=this._x3=this._x4=this._x5=this._y0=this._y1=this._y2=this._y3=this._y4=this._y5=NaN,this._l01_a=this._l12_a=this._l23_a=this._l01_2a=this._l12_2a=this._l23_2a=this._point=0},lineEnd:function(){switch(this._point){case 1:this._context.moveTo(this._x3,this._y3),this._context.closePath();break;case 2:this._context.lineTo(this._x3,this._y3),this._context.closePath();break;case 3:this.point(this._x3,this._y3),this.point(this._x4,this._y4),this.point(this._x5,this._y5)}},point:function(t,e){if(t=+t,e=+e,this._point){var n=this._x2-t,r=this._y2-e;this._l23_a=Math.sqrt(this._l23_2a=Math.pow(n*n+r*r,this._alpha))}switch(this._point){case 0:this._point=1,this._x3=t,this._y3=e;break;case 1:this._point=2,this._context.moveTo(this._x4=t,this._y4=e);break;case 2:this._point=3,this._x5=t,this._y5=e;break;default:Ic(this,t,e)}this._l01_a=this._l12_a,this._l12_a=this._l23_a,this._l01_2a=this._l12_2a,this._l12_2a=this._l23_2a,this._x0=this._x1,this._x1=this._x2,this._x2=t,this._y0=this._y1,this._y1=this._y2,this._y2=e}};var Fc=function t(e){function n(t){return e?new zc(t,e):new vc(t,0)}return n.alpha=function(e){return t(+e)},n}(.5);function Nc(t,e){this._context=t,this._alpha=e}Nc.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||0!==this._line&&3===this._point)&&this._context.closePath(),this._line=1-this._line},point:function(t,e){if(t=+t,e=+e,this._point){var n=this._x2-t,r=this._y2-e;this._l23_a=Math.sqrt(this._l23_2a=Math.pow(n*n+r*r,this._alpha))}switch(this._point){case 0:this._point=1;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:Ic(this,t,e)}this._l01_a=this._l12_a,this._l12_a=this._l23_a,this._l01_2a=this._l12_2a,this._l12_2a=this._l23_2a,this._x0=this._x1,this._x1=this._x2,this._x2=t,this._y0=this._y1,this._y1=this._y2,this._y2=e}};var jc=function t(e){function n(t){return e?new Nc(t,e):new xc(t,0)}return n.alpha=function(e){return t(+e)},n}(.5);function Xc(t){return t<0?-1:1}function Bc(t,e,n){var r=t._x1-t._x0,i=e-t._x1,a=(t._y1-t._y0)/(r||i<0&&-0),o=(n-t._y1)/(i||r<0&&-0);return(Xc(a)+Xc(o))*Math.min(Math.abs(a),Math.abs(o),.5*Math.abs((a*i+o*r)/(r+i)))||0}function $c(t,e){var n=t._x1-t._x0;return n?(3*(t._y1-t._y0)/n-e)/2:e}function Uc(t,e,n){var r=t._x0,i=t._y0,a=t._x1,o=t._y1,s=(a-r)/3;t._context.bezierCurveTo(r+s,i+s*e,a-s,o-s*n,a,o)}function Yc(t){this._context=t}function Vc(t){this._context=new Gc(t)}function Gc(t){this._context=t}function Hc(t){return new Yc(t)}function Wc(t){return new Vc(t)}function qc(t){this._context=t}function Zc(t){var e,n,r=t.length-1,i=Array(r),a=Array(r),o=Array(r);for(i[0]=0,a[0]=2,o[0]=t[0]+2*t[1],e=1;e<r-1;++e)i[e]=1,a[e]=4,o[e]=4*t[e]+2*t[e+1];for(i[r-1]=2,a[r-1]=7,o[r-1]=8*t[r-1]+t[r],e=1;e<r;++e)n=i[e]/a[e-1],a[e]-=n,o[e]-=n*o[e-1];for(i[r-1]=o[r-1]/a[r-1],e=r-2;e>=0;--e)i[e]=(o[e]-i[e+1])/a[e];for(a[r-1]=(t[r]+i[r-1])/2,e=0;e<r-1;++e)a[e]=2*t[e+1]-i[e+1];return[i,a]}function Kc(t){return new qc(t)}function Jc(t){this._context=t}function Qc(t){return new Jc(t)}function tl(t){this._context=t}function el(t){return new tl(t)}function nl(t,e){this._context=t,this._t=e}function rl(t){return new nl(t,.5)}function il(t){return new nl(t,0)}function al(t){return new nl(t,1)}Yc.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:Uc(this,this._t0,$c(this,this._t0))}(this._line||0!==this._line&&1===this._point)&&this._context.closePath(),this._line=1-this._line},point:function(t,e){var n=NaN;if(e=+e,(t=+t)!==this._x1||e!==this._y1){switch(this._point){case 0:this._point=1,this._line?this._context.lineTo(t,e):this._context.moveTo(t,e);break;case 1:this._point=2;break;case 2:this._point=3,Uc(this,$c(this,n=Bc(this,t,e)),n);break;default:Uc(this,this._t0,n=Bc(this,t,e))}this._x0=this._x1,this._x1=t,this._y0=this._y1,this._y1=e,this._t0=n}}},(Vc.prototype=Object.create(Yc.prototype)).point=function(t,e){Yc.prototype.point.call(this,e,t)},Gc.prototype={moveTo:function(t,e){this._context.moveTo(e,t)},closePath:function(){this._context.closePath()},lineTo:function(t,e){this._context.lineTo(e,t)},bezierCurveTo:function(t,e,n,r,i,a){this._context.bezierCurveTo(e,t,r,n,a,i)}},qc.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]),2===n)this._context.lineTo(t[1],e[1]);else for(var r=Zc(t),i=Zc(e),a=0,o=1;o<n;++a,++o)this._context.bezierCurveTo(r[0][a],i[0][a],r[1][a],i[1][a],t[o],e[o]);(this._line||0!==this._line&&1===n)&&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)}},Jc.prototype={areaStart:oc,areaEnd:oc,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))}},tl.prototype={areaStart:function(){this._line=0},areaEnd:function(){this._line=NaN},lineStart:function(){this._point=0},lineEnd:function(){(this._line||0!==this._line&&1===this._point)&&this._context.closePath(),this._line=1-this._line},point:function(t,e){switch(t=+t,e=+e,this._point){case 0:this._point=1,this._line?this._context.lineTo(t,e):this._context.moveTo(t,e);break;case 1:this._point=2;default:this._context.lineTo(t,e)}}},nl.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&&2===this._point&&this._context.lineTo(this._x,this._y),(this._line||0!==this._line&&1===this._point)&&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)}}this._x=t,this._y=e}};var ol={getDrawShape:function(){var t=this,e=t.config.axis_rotated,n=t.state.hasRadar,r={type:{},indices:{},pos:{}};if(["bar","candlestick","line","area"].forEach((function(e){var n=go(/^(bubble|scatter)$/.test(e)?"line":e);if(t.hasType(e)||t.hasTypeOf(n)||"line"===e&&(t.hasType("bubble")||t.hasType("scatter"))){var i=t.getShapeIndices(t["is"+n+"Type"]),a=t["generateDraw"+n];r.indices[e]=i,r.type[e]=a?a.bind(t)(i,!1):void 0}})),!t.hasArcType()||n){var i=n?t.radarCircleX:e?t.circleY:t.circleX,a=n?t.radarCircleY:e?t.circleX:t.circleY;r.pos={xForText:t.generateXYForText(r.indices,!0),yForText:t.generateXYForText(r.indices,!1),cx:(i||function(){}).bind(t),cy:(a||function(){}).bind(t)}}return r},getShapeIndices:function(t){var e=this,n=e.config,r=n.data_xs,i=Ka(r),a={},o=i?{}:0;return i&&yo(Object.keys(r).map((function(t){return r[t]}))).forEach((function(t){o[t]=0,a[t]={}})),e.filterTargetsToShow(e.data.targets.filter(t,e)).forEach((function(t){for(var e,i=(t.id in r?r[t.id]:""),s=i?a[i]:a,u=0;e=n.data_groups[u];u++)if(!(e.indexOf(t.id)<0))for(var c,l=0;c=e[l];l++)if(c in s){s[t.id]=s[c];break}Ua(s[t.id])&&(s[t.id]=i?o[i]++:o++,s.__max__=(i?o[i]:o)-1)})),a},getIndices:function(t,e){var n=this.config.data_xs;return Ka(n)?t[n[e]]:t},getIndicesMax:function(t){return Ka(this.config.data_xs)?Object.keys(t).map((function(e){return t[e].__max__||0})).reduce((function(t,e){return t+e})):t.__max__},getShapeX:function(t,e,n){var r=this,i=r.config,a=r.scale,o=n?a.subX:a.zoom||a.x,s=i.bar_padding,u=function(t,e){return t+e},c=qa(t)&&(t._$total.length?t._$total.reduce(u)/2:0);return function(n){var i=r.getIndices(e,n.id),a=n.id in i?i[n.id]:0,l=(i.__max__||0)+1,f=0;if(Ka(n.x)){var h=o(n.x,!0);f=c?h-(t[n.id]||t._$width)+t._$total.slice(0,a+1).reduce(u)-c:h-($a(t)?t:t._$width)*(l/2-a)}return t&&f&&l>1&&s&&(a&&(f+=s*a),l>2?f-=(l-1)*s/2:2===l&&(f-=s/2)),f}},getShapeY:function(t){var e=this,n=e.isStackNormalized();return function(r){var i=r.value;return $a(r)?i=r:n?i=e.getRatio("index",r,!0):e.isBubbleZType(r)&&(i=e.getBubbleZData(r.value,"y")),e.getYScaleById(r.id,t)(i)}},getShapeYMin:function(t){var e=this,n=e.scale[e.axis.getId(t)].domain()[0];return!e.isGrouped(t)&&n>0?n:0},getShapeOffsetData:function(t){var e=this,n=e.orderTargets(e.filterTargetsToShow(e.data.targets.filter(t,e))),r=e.isStackNormalized(),i=n.map((function(t){var n=t.values,i={};e.isStepType(t)&&(n=e.convertValuesToStep(n));var a=n.reduce((function(t,n){var a=+n.x;return t[a]=n,i[a]=r?e.getRatio("index",n,!0):n.value,t}),{});return{id:t.id,rowValues:n,rowValueMapByXValue:a,values:i}}));return{indexMapByTargetId:n.reduce((function(t,e,n){return t[e.id]=n,t}),{}),shapeOffsetTargets:i}},getShapeOffset:function(t,e,n){var r=this,i=r.getShapeOffsetData(t),a=i.shapeOffsetTargets,o=i.indexMapByTargetId;return function(t,i){var s=t.id,u=t.value,c=t.x,l=r.getIndices(e,s),f=r.getYScaleById(s,n),h=f(r.getShapeYMin(s)),d=+c,g=h;return a.filter((function(t){return t.id!==s})).forEach((function(t){var e=t.id,n=t.rowValueMapByXValue,r=t.rowValues,a=t.values;if(l[e]===l[s]&&o[e]<o[s]){var c=r[i];c&&+c.x===d||(c=n[d]),c&&c.value*u>=0&&$a(a[d])&&(g+=f(a[d])-h)}})),g}},getBarW:function(t,e,n){var r=this,i=r.config,a=r.org,o=r.scale,s=r.getMaxDataCount(),u="bar"===t&&i.data_groups.length,c=t+"_width",l=o.zoom&&!r.axis.isCategorized()?a.xDomain.map((function(t){return o.zoom(t)})).reduce((function(t,e){return Math.abs(t)+e}))/s:e.tickInterval(s),f=function(t){var e=t?i[c][t]:i[c],r=t?e.ratio:i[c+"_ratio"],a=t?e.max:i[c+"_max"],o=$a(e)?e:n?l*r/n:0;return a&&o>a?a:o},h=f();return!u&&qa(i[c])&&(h={_$width:h,_$total:[]},r.filterTargetsToShow(r.data.targets).forEach((function(t){i[c][t.id]&&(h[t.id]=f(t.id),h._$total.push(h[t.id]||h._$width))}))),h},getShapeByIndex:function(t,e,n){var r=this.$el.main,i=ja(e)?"-"+e:"";return(n?r.selectAll("."+In[t+"s"]+this.getTargetSelectorSuffix(n)):r).selectAll("."+In[t]+i)},isWithinShape:function(t,e){var n,r=this,i=Ln(t);return r.isTargetToShow(e.id)?"hasValidPointType"in r&&r.hasValidPointType(t.nodeName)?n=r.isStepType(e)?r.isWithinStep(t,r.getYScaleById(e.id)(e.value)):r.isWithinCircle(t,r.isBubbleType(e)?1.5*r.pointSelectR(e):0):"path"===t.nodeName&&(n=!i.classed(In.bar)||r.isWithinBar(t)):n=!1,n},getInterpolate:function(t){var e=this.getInterpolateType(t);return{basis:ac,"basis-closed":uc,"basis-open":lc,bundle:hc,cardinal:pc,"cardinal-closed":yc,"cardinal-open":_c,"catmull-rom":Pc,"catmull-rom-closed":Fc,"catmull-rom-open":jc,"monotone-x":Hc,"monotone-y":Wc,natural:Kc,"linear-closed":Qc,linear:el,step:rl,"step-after":al,"step-before":il}[e]},getInterpolateType:function(t){var e=this,n=e.config,r=n.spline_interpolation_type,i=e.isInterpolationType(r)?r:"cardinal";return e.isSplineType(t)?i:e.isStepType(t)?n.line_step_type:"linear"}},sl={setContainerSize:function(){var t=this,e=t.state;e.current.width=t.getCurrentWidth(),e.current.height=t.getCurrentHeight()},getCurrentWidth:function(){return this.config.size_width||this.getParentWidth()},getCurrentHeight:function(){var t=this,e=t.config,n=e.size_height||t.getParentHeight();return n>0?n:320/(t.hasType("gauge")&&!e.gauge_fullCircle?2:1)},getCurrentPaddingTop:function(){var t=this,e=t.config,n=t.state.hasAxis,r=t.$el,i=n?e.axis_y2_axes.length:0,a=ja(e.padding_top)?e.padding_top:0;return r.title&&r.title.node()&&(a+=t.getTitlePadding()),i&&e.axis_rotated&&(a+=t.getHorizontalAxisHeight("y2")*i),a},getCurrentPaddingBottom:function(){var t=this,e=t.config,n=t.state.hasAxis,r=e.axis_rotated?"y":"x",i=n?e["axis_"+r+"_axes"].length:0;return(ja(e.padding_bottom)?e.padding_bottom:0)+(i?t.getHorizontalAxisHeight(r)*i:0)},getCurrentPaddingLeft:function(t){var e=this,n=e.config,r=e.state.hasAxis,i=n.axis_rotated,a=i?"x":"y",o=r?n["axis_"+a+"_axes"].length:0,s=r?e.getAxisWidthByAxisId(a,t):0;return(ja(n.padding_left)?n.padding_left:r&&i?n.axis_x_show?Math.max(Ga(s),40):1:!r||n.axis_y_show&&!n.axis_y_inner?Ga(s):e.axis.getAxisLabelPosition("y").isOuter?30:1)+s*o},getCurrentPaddingRight:function(t){void 0===t&&(t=!1);var e=this,n=e.config,r=e.state.hasAxis,i=e.state.isLegendRight?e.getLegendWidth()+20:0,a=r?n.axis_y2_axes.length:0,o=r?e.getAxisWidthByAxisId("y2"):0,s=t?e.axis.getXAxisTickTextY2Overflow(10):0;return(ja(n.padding_right)?n.padding_right+1:e.axis&&n.axis_rotated?10+i:!e.axis||n.axis_y2_show&&!n.axis_y2_inner?Math.max(Ga(o)+i,s):Math.max(2+i+(e.axis.getAxisLabelPosition("y2").isOuter?20:0),s))+o*a},getParentRectValue:function(t){for(var e="offset"+go(t),n=this.$el.chart.node(),r=0;r<30&&n&&"BODY"!==n.tagName;){try{r=n.getBoundingClientRect()[t]}catch(t){e in n&&(r=n[e])}n=n.parentNode}var i=za.body[e];return r>i&&(r=i),r},getParentWidth:function(){return this.getParentRectValue("width")},getParentHeight:function(){var t=this.$el.chart.style("height"),e=0;return t&&(e=/px$/.test(t)?parseInt(t,10):this.getParentRectValue("height")),e},getSvgLeft:function(t){var e=this,n=e.config,r=e.$el,i=n.axis_rotated||!n.axis_rotated&&!n.axis_y_inner,a=n.axis_rotated?In.axisX:In.axisY,o=r.main.select("."+a).node(),s=o&&i?o.getBoundingClientRect():{right:0},u=r.chart.node().getBoundingClientRect(),c=e.hasArcType(),l=s.right-u.left-(c?0:e.getCurrentPaddingLeft(t));return l>0?l:0},updateDimension:function(t){var e=this,n=e.config,r=e.state.hasAxis,i=e.$el;r&&!t&&e.axis.x&&n.axis_rotated&&e.axis.subX&&e.axis.subX.create(i.axis.subX),e.updateScales(t),e.updateSvgSize(),e.transformAll(!1)},updateSvgSize:function(){var t=this,e=t.state,n=e.clip,r=e.current,i=e.hasAxis,a=e.width,o=e.height,s=t.$el.svg;if(s.attr("width",r.width).attr("height",r.height),i){var u=s.select("."+In.brush+" .overlay"),c={width:0,height:0};u.size()&&(c.width=+u.attr("width"),c.height=+u.attr("height")),s.selectAll(["#"+n.id,"#"+n.idGrid]).select("rect").attr("width",a).attr("height",o),s.select("#"+n.idXAxis).select("rect").call(t.setXAxisClipPath.bind(t)),s.select("#"+n.idYAxis).select("rect").call(t.setYAxisClipPath.bind(t)),n.idSubchart&&s.select("#"+n.idSubchart).select("rect").attr("width",a).attr("height",c.height)}},updateSizes:function(t){var e=this,n=e.config,r=e.state,i=e.$el.legend,a=n.axis_rotated,o=e.hasArcType();t||e.setContainerSize();var s={width:i?e.getLegendWidth():0,height:i?e.getLegendHeight():0};!o&&n.axis_x_show&&n.axis_x_tick_autorotate&&e.updateXAxisTickClip();var u=r.isLegendRight||r.isLegendInset?0:s.height,c=a||o?0:e.getHorizontalAxisHeight("x"),l=n.subchart_axis_x_show&&n.subchart_axis_x_tick_text_show?c:30,f=n.subchart_show&&!o?n.subchart_size_height+l:0;r.margin=!o&&a?{top:e.getHorizontalAxisHeight("y2")+e.getCurrentPaddingTop(),right:o?0:e.getCurrentPaddingRight(!0),bottom:e.getHorizontalAxisHeight("y")+u+e.getCurrentPaddingBottom(),left:f+(o?0:e.getCurrentPaddingLeft())}:{top:4+e.getCurrentPaddingTop(),right:o?0:e.getCurrentPaddingRight(!0),bottom:c+f+u+e.getCurrentPaddingBottom(),left:o?0:e.getCurrentPaddingLeft()},r.margin2=a?{top:r.margin.top,right:NaN,bottom:20+u,left:e.state.rotatedPadding.left}:{top:r.current.height-f-u,right:NaN,bottom:l+u,left:r.margin.left},r.margin3={top:0,right:NaN,bottom:0,left:0},e.updateSizeForLegend&&e.updateSizeForLegend(s),r.width=r.current.width-r.margin.left-r.margin.right,r.height=r.current.height-r.margin.top-r.margin.bottom,r.width<0&&(r.width=0),r.height<0&&(r.height=0),r.width2=a?r.margin.left-r.rotatedPadding.left-r.rotatedPadding.right:r.width,r.height2=a?r.height:r.current.height-r.margin2.top-r.margin2.bottom,r.width2<0&&(r.width2=0),r.height2<0&&(r.height2=0);var h=e.hasType("gauge"),d=n.legend_show&&r.isLegendRight;r.arcWidth=r.width-(d?s.width+10:0),r.arcHeight=r.height-(d&&!h?0:10),h&&!n.gauge_fullCircle&&(r.arcHeight+=r.height-e.getPaddingBottomForGauge()),e.updateRadius&&e.updateRadius(),r.isLegendRight&&o&&(r.margin3.left=r.arcWidth/2+1.1*r.radiusExpanded)}};function ul(t){return"string"==typeof t?new Cn([document.querySelectorAll(t)],[document.documentElement]):new Cn([null==t?[]:he(t)],Mn)}var cl={opacityForText:function(t){var e=this;return e.isBarType(t)&&!e.meetsLabelThreshold(Math.abs(e.getRatio("bar",t)),"bar")?"0":e.hasDataLabel?null:"0"},initText:function(){this.$el.main.select("."+In.chart).append("g").attr("class",In.chartTexts)},updateTargetsForText:function(t){var e=this,n=e.getChartClass("Text"),r=e.getClass("texts","id"),i=e.classFocus.bind(e);e.$el.main.select("."+In.chartTexts).selectAll("."+In.chartText).data(t).attr("class",(function(t){return n(t)+i(t)})).enter().append("g").style("opacity","0").attr("class",n).style("pointer-events","none").append("g").attr("class",r)},updateText:function(t){var e=this,n=e.$el,r=e.config,i=e.getClass("text","index"),a=n.main.selectAll("."+In.texts).selectAll("."+In.text).data(e.labelishData.bind(e));a.exit().transition().duration(t).style("fill-opacity","0").remove(),n.text=a.enter().append("text").merge(a).attr("class",i).attr("text-anchor",(function(t){var n=t.value<0;if(e.isCandlestickType(t)){var i=e.getCandlestickData(t);n=i&&!i._isUp}return r.axis_rotated?n?"end":"start":"middle"})).style("fill",e.updateTextColor.bind(e)).style("fill-opacity","0").each((function(t,n,r){var i=Ln(this),a=t.value;if(e.isBubbleZType(t))a=e.getBubbleZData(a,"z");else if(e.isCandlestickType(t)){var o=e.getCandlestickData(t);o&&(a=o.close)}a=e.dataLabelFormat(t.id)(a,t.id,n,r),$a(a)?this.textContent=a:io(i,a)}))},updateTextColor:function(t){var e,n=this,r=n.config,i=r.data_labels_colors,a=n.isArcType(t)&&!n.isRadarType(t)?null:n.color(t);if(Ba(i))e=i;else if(Qa(i)){e=i[(t.data||t).id]}else Xa(i)&&(e=i.bind(n.api)(a,t));if(n.isCandlestickType(t)&&!Xa(i)){var o=n.getCandlestickData(t);if(o&&!o._isUp){var s=r.candlestick_color_down;e=Qa(s)?s[t.id]:s}}return e||a},updateTextBacgroundColor:function(t){var e=this,n=e.$el,r=e.config.data_labels_backgroundColors,i="";if(Ba(r)||Qa(r)){var a=Ba(r)?"":e.getTargetSelectorSuffix("id"in t?t.id:t.data.id),o=n.defs.select(["filter[id*='labels-bg","']"].join(a));o.size()&&(i="url(#"+o.attr("id")+")")}return i||null},redrawText:function(t,e,n,r){var i=this,a=co(!0);return i.$el.text.style("fill",i.updateTextColor.bind(i)).attr("filter",i.updateTextBacgroundColor.bind(i)).style("fill-opacity",n?0:i.opacityForText.bind(i)).each((function(n,i){var o=r&&this.getAttribute("x")?Ln(this).transition(a):Ln(this),s=t.bind(this)(n,i),u=e.bind(this)(n,i);this.childElementCount?o.attr("transform","translate("+s+" "+u+")"):o.attr("x",s).attr("y",u)})),!0},getTextRect:function(t,e){var n=this,r=t.node?t.node():t;/text/i.test(r.tagName)||(r=r.querySelector("text"));var i=r.textContent,a=jo+"-"+i.replace(/\W/g,"_"),o=n.cache.get(a);return o||(n.$el.svg.append("text").style("visibility","hidden").style("font",Ln(r).style("font")).classed(e,!0).text(i).call((function(t){o=uo(t.node())})).remove(),n.cache.add(a,o)),o},generateXYForText:function(t,e){var n=this,r=Object.keys(t),i={},a=e?n.getXForText:n.getYForText;return n.hasType("radar")&&r.push("radar"),r.forEach((function(e){i[e]=n["generateGet"+go(e)+"Points"](t[e],!1)})),function(t,e){var r=(n.isAreaType(t)?"area":n.isBarType(t)&&"bar")||n.isCandlestickType(t)&&"candlestick"||n.isRadarType(t)&&"radar"||"line";return a.call(n,i[r](t,e),t,this)}},getCenteredTextPos:function(t,e,n){var r=this.config,i=r.axis_rotated;if(r.data_labels.centered&&this.isBarType(t)){var a=uo(n),o=t.value>=0;if(i){var s=(o?e[1][1]-e[0][1]:e[0][1]-e[1][1])/2+a.width/2;return o?-s-3:s+2}var u=(o?e[0][1]-e[1][1]:e[1][1]-e[0][1])/2+a.height/2;return o?u:-u-2}return 0},getTextPos:function(t,e){var n=this.config.data_labels_position;return(t in n?n[t]:n)[e]||0},getXForText:function(t,e,n){var r=this,i=r.config,a=r.state,o=i.axis_rotated,s=t[0][0];if(r.hasType("candlestick"))o?s=r.getCandlestickData(e)._isUp?t[2][2]+4:t[2][1]-4:s+=(t[1][0]-s)/2;else if(o){var u=r.isBarType(e)?4:6;s=t[2][1]+u*(e.value<0?-1:1)}else s=r.hasType("bar")?(t[2][0]+t[0][0])/2:s;if(null===e.value)if(s>a.width){var c=uo(n).width;s=a.width-c}else s<0&&(s=4);return o&&(s+=r.getCenteredTextPos(e,t,n)),s+r.getTextPos(e.id,"x")},getYForText:function(t,e,n){var r,i=this,a=i.config,o=i.state,s=a.axis_rotated,u=a.point_r,c=uo(n),l=e.value,f=3;if(i.isCandlestickType(e))l=i.getCandlestickData(e),s?(r=t[0][0],r+=(t[1][0]-r)/2+f):r=l&&l._isUp?t[2][2]-f:t[2][1]+4*f;else if(s)r=(t[0][0]+t[2][0]+.6*c.height)/2;else if(r=t[2][1],$a(u)&&u>5&&(i.isLineType(e)||i.isScatterType(e))&&(f+=a.point_r/2.3),l<0||0===l&&!o.hasPositiveValue&&o.hasNegativeValue)r+=c.height+(i.isBarType(e)?-f:f);else{var h=2*-f;i.isBarType(e)?h=-f:i.isBubbleType(e)&&(h=f),r+=h}if(null===e.value&&!s){var d=c.height;r<d?r=d:r>o.height&&(r=o.height-4)}return s||(r+=i.getCenteredTextPos(e,t,n)),r+i.getTextPos(e.id,"y")},markOverlapped:function(t,e,n){var r=e.$el.arcs.selectAll(n),i=r.filter((function(e){return e.data.id!==t})),a=r.filter((function(e){return e.data.id===t})),o=vo(a.node()),s=function(t,e){return Math.sqrt(Math.pow(t,2)+Math.pow(e,2))};a.node()&&i.each((function(){var t=vo(this),e=Ln(this),n=s(o.e,o.f)>s(t.e,t.f)?a:e,r=Math.ceil(Math.abs(o.e-t.e))<Math.ceil(n.node().getComputedTextLength()),i=Math.ceil(Math.abs(o.f-t.f))<parseInt(a.style("font-size"),10);e.classed(In.TextOverlapping,r&&i)}))},undoMarkOverlapped:function(t,e){t.$el.arcs.selectAll(e).each((function(){ul([this,this.previousSibling]).classed(In.TextOverlapping,!1)}))},meetsLabelThreshold:function(t,e){void 0===t&&(t=0);return t>=(this.config[e+"_label_threshold"]||0)}};function ll(t,e){void 0===t&&(t="left");var n=$a(e);return t.indexOf("center")>-1?n?e/2:"middle":t.indexOf("right")>-1?n?e:"end":n?0:"start"}var fl={initTitle:function(){var t=this.config,e=this.$el;t.title_text&&(e.title=e.svg.append("g"),io(e.title.append("text").style("text-anchor",ll(t.title_position)).attr("class",In.title),t.title_text,[.3,1.5]))},redrawTitle:function(){var t=this,e=t.config,n=t.state.current,r=t.$el.title;if(r){var i=t.yForTitle.call(t);/g/i.test(r.node().tagName)?r.attr("transform","translate("+ll(e.title_position,n.width)+", "+i+")"):r.attr("x",t.xForTitle.call(t)).attr("y",i)}},xForTitle:function(){var t,e=this,n=e.config,r=e.state.current,i=n.title_position||"left",a=e.getTextRect(e.$el.title,In.title).width;return/(right|center)/.test(i)?(t=r.width-a,i.indexOf("right")>=0?t=r.width-a-n.title_padding.right:i.indexOf("center")>=0&&(t=(r.width-a)/2)):t=n.title_padding.left||0,t},yForTitle:function(){var t=this;return(t.config.title_padding.top||0)+t.getTextRect(t.$el.title,In.title).height},getTitlePadding:function(){return this.yForTitle()+(this.config.title_padding.bottom||0)}},hl={initTooltip:function(){var t=this,e=t.config,n=t.$el;n.tooltip=Ln(e.tooltip_contents.bindto),n.tooltip.empty()&&(n.tooltip=n.chart.style("position","relative").append("div").attr("class",In.tooltipContainer).style("position","absolute").style("pointer-events","none").style("display","none")),t.bindTooltipResizePos()},initShowTooltip:function(){var t=this,e=t.config,n=t.$el,r=t.state,i=r.hasAxis,a=r.hasRadar;if(e.tooltip_init_show){var o=!(i&&a);if(t.axis&&t.axis.isTimeSeries()&&Ba(e.tooltip_init_x)){var s,u,c=t.data.targets[0];for(e.tooltip_init_x=So.call(t,e.tooltip_init_x),s=0;(u=c.values[s])&&u.x-e.tooltip_init_x!=0;s++);e.tooltip_init_x=s}var l=t.data.targets.map((function(n){var r=o?0:e.tooltip_init_x;return t.addName(n.values[r])}));o&&(l=[l[e.tooltip_init_x]]),n.tooltip.html(t.getTooltipHTML(l,t.axis&&t.axis.getXAxisTickFormat(),t.getDefaultValueFormat(),t.color)),e.tooltip_contents.bindto||n.tooltip.style("top",e.tooltip_init_position.top).style("left",e.tooltip_init_position.left).style("display",null)}},getTooltipHTML:function(){var t=this,e=t.api,n=t.config;return Xa(n.tooltip_contents)?n.tooltip_contents.bind(e).apply(void 0,arguments):t.getTooltipContent.apply(t,arguments)},getTooltipContent:function(t,e,n,r){var i=this,a=i.api,o=i.config,s=i.state,u=["title","name","value"].map((function(t){var e=o["tooltip_format_"+t];return Xa(e)?e.bind(a):e})),c=u[0],l=u[1],f=u[2];c=c||e,l=l||function(t){return t},f=f||(i.isStackNormalized()?function(t,e){return(100*e).toFixed(2)+"%"}:n);var h=o.tooltip_order,d=function(t){return i.axis&&i.isBubbleZType(t)?i.getBubbleZData(t.value,"z"):i.getBaseValue(t)},g=i.levelColor?function(t){return i.levelColor(t.value)}:function(t){return r(t)},p=o.tooltip_contents,v=p.template,y=i.mapToTargetIds();if(null===h&&o.data_groups.length){var x=i.orderTargets(i.data.targets).map((function(t){return t.id})).reverse();t.sort((function(t,e){var n=t?t.value:null,r=e?e.value:null;return n>0&&r>0&&(n=t.id?x.indexOf(t.id):null,r=e.id?x.indexOf(e.id):null),n-r}))}else/^(asc|desc)$/.test(h)?t.sort((function(t,e){var n=t?d(t):null,r=e?d(e):null;return"asc"===h?n-r:r-n})):Xa(h)&&t.sort(h.bind(a));var _,m,b,w,T,A=i.getTooltipContentTemplate(v),S=t.length;for(T=0;T<S;T++)if((m=t[T])&&(d(m)||0===d(m))){if(Ua(_)){var k=(s.hasAxis||s.hasRadar)&&ro(c?c(m.x):m.x);_=Ao(A[0],{CLASS_TOOLTIP:In.tooltip,TITLE:ja(k)?v?k:'<tr><th colspan="2">'+k+"</th></tr>":""})}if(!m.ratio&&i.$el.arcs&&(m.ratio=i.getRatio("arc",i.$el.arcs.select("path."+In.arc+"-"+m.id).data()[0])),b=[m.ratio,m.id,m.index,t],w=ro(f.apply(void 0,[d(m)].concat(b))),i.isAreaRangeType(m)){var E=["high","low"].map((function(t){return ro(f.apply(void 0,[i.getRangedData(m,t)].concat(b)))})),M=E[0],C=E[1];w="<b>Mid:</b> "+w+" <b>High:</b> "+M+" <b>Low:</b> "+C}else if(i.isCandlestickType(m)){var O=["open","high","low","close","volume"].map((function(t){return ro(f.apply(void 0,[i.getRangedData(m,t,"candlestick")].concat(b)))})),R=O[0],L=O[1],I=O[2],D=O[3],P=O[4];w="<b>Open:</b> "+R+" <b>High:</b> "+L+" <b>Low:</b> "+I+" <b>Close:</b> "+D+(P?" <b>Volume:</b> "+P:"")}if(void 0!==w)if("continue"===function(){if(null===m.name)return"continue";var t=ro(l.apply(void 0,[m.name].concat(b))),e=g(m),n={CLASS_TOOLTIP_NAME:In.tooltipName+i.getTargetSelectorSuffix(m.id),COLOR:v||!i.patterns?e:'<svg><rect style="fill:'+e+'" width="10" height="10"></rect></svg>',NAME:t,VALUE:w};if(v&&Qa(p.text)){var r=y.indexOf(m.id);Object.keys(p.text).forEach((function(t){n[t]=p.text[t][r]}))}_+=Ao(A[1],n)}())continue}return _+"</table>"},getTooltipContentTemplate:function(t){return(t||'<table class="{=CLASS_TOOLTIP}"><tbody>\n\t\t\t\t{=TITLE}\n\t\t\t\t{{<tr class="{=CLASS_TOOLTIP_NAME}">\n\t\t\t\t\t<td class="name">'+(this.patterns?"{=COLOR}":'<span style="background-color:{=COLOR}"></span>')+'{=NAME}</td>\n\t\t\t\t\t<td class="value">{=VALUE}</td>\n\t\t\t\t</tr>}}\n\t\t\t</tbody></table>').replace(/(\r?\n|\t)/g,"").split(/{{(.*)}}/)},tooltipPosition:function(t,e,n,r){var i=this,a=i.config,o=i.scale,s=i.state,u=s.width,c=s.height,l=s.current,f=s.isLegendRight,h=s.inputType,d=s.event,g=i.hasType("gauge")&&!a.gauge_fullCircle,p=i.getSvgLeft(!0),v=p+l.width-i.getCurrentPaddingRight(),y=i.getCurrentPaddingLeft(!0),x=oo(d,r),_=x[0],m=x[1];if(i.hasArcType()){"touch"===h||i.hasType("radar")||(m+=g?c:c/2,_+=(u-(f?i.getLegendWidth():0))/2)}else{var b=o.x(t[0].x);a.axis_rotated?(m=b+20,_+=p+100,v-=p):(m-=5,_=p+y+20+(i.scale.zoom?_:b))}_+e+15>v&&(_-=e+y),m+n>l.height&&(m-=g?3*n:n+30);var w={top:m,left:_};return Object.keys(w).forEach((function(t){w[t]<0&&(w[t]=0)})),w},showTooltip:function(t,e){var n=this,r=n.config,i=n.state,a=n.$el.tooltip,o=r.tooltip_contents.bindto,s=t.filter((function(t){return t&&ja(n.getBaseValue(t))}));if(a&&0!==s.length&&r.tooltip_show){var u=a.datum(),c=u||{},l=c.width,f=void 0===l?0:l,h=c.height,d=void 0===h?0:h,g=JSON.stringify(t);if(!u||u.current!==g){var p=t.concat().sort()[0].index;eo(r.tooltip_onshow,n.api,t),a.html(n.getTooltipHTML(t,n.axis?n.axis.getXAxisTickFormat():n.categoryName.bind(n),n.getDefaultValueFormat(),n.color)).style("display",null).style("visibility",null).datum(u={index:p,current:g,width:f=a.property("offsetWidth"),height:d=a.property("offsetHeight")}),eo(r.tooltip_onshown,n.api,t),n._handleLinkedCharts(!0,p)}if(!o){var v,y=((null==(v=r.tooltip_position)?void 0:v.bind(n.api))||n.tooltipPosition.bind(n))(s,f,d,e);["top","left"].forEach((function(t){var e=y[t];a.style(t,e+"px"),"left"!==t||u.xPosInPercent||(u.xPosInPercent=e/i.current.width*100)}))}}},bindTooltipResizePos:function(){var t=this,e=t.resizeFunction,n=t.state,r=t.$el.tooltip;e.add((function(){if("block"===r.style("display")){var t=n.current,e=r.datum(),i=e.width,a=e.xPosInPercent,o=t.width/100*a,s=t.width-(o+i);s<0&&(o+=s),r.style("left",o+"px")}}))},hideTooltip:function(t){var e=this,n=e.api,r=e.config,i=e.$el.tooltip;if(i&&"none"!==i.style("display")&&(!r.tooltip_doNotHide||t)){var a=JSON.parse(i.datum().current);eo(r.tooltip_onhide,n,a),i.style("display","none").style("visibility","hidden").datum(null),eo(r.tooltip_onhidden,n,a)}},_handleLinkedCharts:function(t,e){var n=this,r=n.charts,i=n.config,a=n.state.event;if(a&&a.isTrusted&&i.tooltip_linked&&r.length>1){var o=i.tooltip_linked_name;r.filter((function(t){return t!==n.api})).forEach((function(n){var r=n.internal,i=r.config,a=r.$el,s=i.tooltip_linked,u=i.tooltip_linked_name,c=za.body.contains(a.chart.node());if(s&&o===u&&c){var l=a.tooltip.data()[0],f=e!==(l&&l.index);try{n.tooltip[t&&f?"show":"hide"]({index:e})}catch(t){}}}))}}},dl={getTranslate:function(t,e){void 0===e&&(e=0);var n,r,i=this,a=i.config,o=i.state,s=a.axis_rotated,u=0;if(e&&/^(x|y2?)$/.test(t)&&(u=i.getAxisSize(t)*e),"main"===t)n=Ha(o.margin.left),r=Ha(o.margin.top);else if("context"===t)n=Ha(o.margin2.left),r=Ha(o.margin2.top);else if("legend"===t)n=o.margin3.left,r=o.margin3.top;else if("x"===t)n=s?-u:0,r=s?0:o.height+u;else if("y"===t)n=s?0:-u,r=s?o.height+u:0;else if("y2"===t)n=s?0:o.width+u,r=s?1-u:0;else if("subX"===t)n=0,r=s?0:o.height2;else if("arc"===t)n=o.arcWidth/2,r=o.arcHeight/2;else if("radar"===t){var c=i.getRadarSize()[0];n=o.width/2-c,r=Ha(o.margin.top)}return"translate("+n+", "+r+")"},transformMain:function(t,e){var n,r,i,a=this,o=a.$el.main;e&&e.axisX?n=e.axisX:(n=o.select("."+In.axisX),t&&(n=n.transition())),e&&e.axisY?r=e.axisY:(r=o.select("."+In.axisY),t&&(r=r.transition())),e&&e.axisY2?i=e.axisY2:(i=o.select("."+In.axisY2),t&&(i=i.transition())),(t?o.transition():o).attr("transform",a.getTranslate("main")),n.attr("transform",a.getTranslate("x")),r.attr("transform",a.getTranslate("y")),i.attr("transform",a.getTranslate("y2")),o.select("."+In.chartArcs).attr("transform",a.getTranslate("arc"))},transformAll:function(t,e){var n=this,r=n.config,i=n.state.hasAxis,a=n.$el;n.transformMain(t,e),i&&r.subchart_show&&n.transformContext(t,e),a.legend&&n.transformLegend(t)}},gl={setTargetType:function(t,e){var n=this,r=n.config,i=n.state.withoutFadeIn;n.mapToTargetIds(t).forEach((function(t){i[t]=e===r.data_types[t],r.data_types[t]=e})),t||(r.data_type=e)},updateTypesElements:function(){var t=this,e=t.state.current;Object.keys(ws).forEach((function(n){var r=ws[n],i=t.hasType(r,null,!0),a=e.types.indexOf(r);-1===a&&i?e.types.push(r):a>-1&&!i&&e.types.splice(a,1)})),t.setChartElements()},hasType:function(t,e,n){void 0===n&&(n=!1);var r=this,i=r.config,a=r.state.current,o=i.data_types,s=e||r.data.targets,u=!1;return!n&&a.types.length&&a.types.indexOf(t)>-1?u=!0:s&&s.length?s.forEach((function(e){var n=o[e.id];n!==t&&(n||"line"!==t)||(u=!0)})):Object.keys(o).length?Object.keys(o).forEach((function(e){o[e]===t&&(u=!0)})):u=i.data_type===t,u},hasTypeOf:function(t,e,n){var r=this;return void 0===n&&(n=[]),!!(t in Ts)&&!Ts[t].filter((function(t){return-1===n.indexOf(t)})).every((function(t){return!r.hasType(t,e)}))},isTypeOf:function(t,e){var n=Ba(t)?t:t.id,r=this.config.data_types[n]||this.config.data_type;return Ja(e)?e.indexOf(r)>=0:r===e},hasPointType:function(){var t=this;return t.hasTypeOf("Line")||t.hasType("bubble")||t.hasType("scatter")},hasArcType:function(t,e){return this.hasTypeOf("Arc",t,e)},hasMultiArcGauge:function(){return this.hasType("gauge")&&"multi"===this.config.gauge_type},isLineType:function(t){var e=Ba(t)?t:t.id;return!this.config.data_types[e]||this.isTypeOf(e,Ts.Line)},isStepType:function(t){return this.isTypeOf(t,Ts.Step)},isSplineType:function(t){return this.isTypeOf(t,Ts.Spline)},isAreaType:function(t){return this.isTypeOf(t,Ts.Area)},isAreaRangeType:function(t){return this.isTypeOf(t,Ts.AreaRange)},isBarType:function(t){return this.isTypeOf(t,"bar")},isBubbleType:function(t){return this.isTypeOf(t,"bubble")},isCandlestickType:function(t){return this.isTypeOf(t,"candlestick")},isScatterType:function(t){return this.isTypeOf(t,"scatter")},isPieType:function(t){return this.isTypeOf(t,"pie")},isGaugeType:function(t){return this.isTypeOf(t,"gauge")},isDonutType:function(t){return this.isTypeOf(t,"donut")},isRadarType:function(t){return this.isTypeOf(t,"radar")},isArcType:function(t){return this.isPieType(t)||this.isDonutType(t)||this.isGaugeType(t)||this.isRadarType(t)},isCirclePoint:function(t){var e=this.config,n=e.point_pattern;return!(!t||"circle"!==t.tagName)||"circle"===e.point_type&&(!n||Ja(n)&&0===n.length)},lineData:function(t){return this.isLineType(t)?[t]:[]},arcData:function(t){return this.isArcType(t.data)?[t]:[]},labelishData:function(t){return this.isBarType(t)||this.isLineType(t)||this.isScatterType(t)||this.isBubbleType(t)||this.isCandlestickType(t)||this.isRadarType(t)?t.values.filter((function(t){return $a(t.value)||!!t.value})):[]},barLineBubbleData:function(t){return this.isBarType(t)||this.isLineType(t)||this.isBubbleType(t)?t.values:[]},isInterpolationType:function(t){return["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"].indexOf(t)>=0}},pl=function(){function t(t){this.api=void 0,this.config=void 0,this.cache=void 0,this.$el=void 0,this.state=void 0,this.charts=void 0,this.data={xs:{},targets:[]},this.axis=void 0,this.scale={x:null,y:null,y2:null,subX:null,subY:null,subY2:null,zoom:null},this.org={xScale:null,xDomain:null},this.color=void 0,this.patterns=void 0,this.levelColor=void 0,this.point=void 0,this.brush=void 0,this.format={extraLineClasses:null,xAxisTick:null,dataTime:null,defaultAxisTime:null,axisTime:null};var e=this;e.api=t,e.config=new Co,e.cache=new Xo;var n=new Pn;e.$el=n.getStore("element"),e.state=n.getStore("state")}var e=t.prototype;return e.$T=function(t,e,n){var r=this.config,i=this.state,a=r.transition_duration,o=r.subchart_show,s=t;s&&("tagName"in s&&(s=Ln(s)),s=(!1!==e&&a||e)&&(!i.zooming||i.dragging)&&!i.resizing&&i.rendered&&!o?s.transition(n).duration(a):s);return s},e.beforeInit=function(){var t=this;t.callPluginHook("$beforeInit"),eo(t.config.onbeforeinit,t.api)},e.afterInit=function(){var t=this;t.callPluginHook("$afterInit"),eo(t.config.onafterinit,t.api)},e.init=function(){var t=this,e=t.config,n=t.state,r=t.$el;n.hasAxis=!t.hasArcType(),n.hasRadar=!n.hasAxis&&t.hasType("radar"),t.initParams();var i={element:e.bindto,classname:"bb"};Qa(e.bindto)&&(i.element=e.bindto.element||"#chart",i.classname=e.bindto.classname||i.classname),r.chart=Xa(i.element.node)?e.bindto.element:Ln(i.element||[]),r.chart.empty()&&(r.chart=Ln(za.body.appendChild(za.createElement("div")))),r.chart.html("").classed(i.classname,!0),t.initToRender()},e.initToRender=function(t){var e=this,n=e.config,r=e.state,i=e.$el.chart,a=function(){return"none"===i.style("display")||"hidden"===i.style("visibility")},o=n.render.lazy||a(),s=Pa.MutationObserver;if(o&&s&&!1!==n.render.observe&&!t&&new s((function(t,n){a()||(n.disconnect(),!r.rendered&&e.initToRender(!0))})).observe(i.node(),{attributes:!0,attributeFilter:["class","style"]}),!o||t){var u=e.convertData(n,e.initWithData);u&&e.initWithData(u),e.afterInit()}},e.initParams=function(){var t=this,e=t,n=e.config,r=e.format,i=e.state,a=n.axis_rotated;if(i.datetimeId="bb-"+ +new Date,t.color=t.generateColor(),t.levelColor=t.generateLevelColor(),t.hasPointType()&&(t.point=t.generatePoint()),i.hasAxis){t.initClip(),r.extraLineClasses=t.generateExtraLineClass(),r.dataTime=n.data_xLocaltime?Y:G,r.axisTime=n.axis_x_localtime?U:V;var o=t.config.zoom_enabled&&"drag"===t.config.zoom_type;r.defaultAxisTime=function(e){var n=t.scale,i=n.x,a=n.zoom,s=o?a:a&&i.orgDomain().toString()!==a.domain().toString(),u=(e.getMilliseconds()?".%L":e.getSeconds()&&".:%S")||e.getMinutes()&&"%I:%M"||e.getHours()&&"%I %p"||1!==e.getDate()&&"%b %d"||s&&1===e.getDate()&&"%b'%y"||e.getMonth()&&"%-m/%-d"||"%Y";return r.axisTime(u)(e)}}i.isLegendRight="right"===n.legend_position,i.isLegendInset="inset"===n.legend_position,i.isLegendTop="top-left"===n.legend_inset_anchor||"top-right"===n.legend_inset_anchor,i.isLegendLeft="top-left"===n.legend_inset_anchor||"bottom-left"===n.legend_inset_anchor,i.rotatedPaddingRight=a&&!n.axis_x_show?0:30,i.inputType=function(t,e){var n=!1;if(/Mobi/.test(Pa.navigator.userAgent)&&e){var r=Pa.navigator&&"maxTouchPoints"in Pa.navigator&&Pa.navigator.maxTouchPoints>0,i="ontouchmove"in Pa||Pa.DocumentTouch&&za instanceof Pa.DocumentTouch;n=r||i}return(t&&!n&&"onmouseover"in Pa?"mouse":n&&"touch")||null}(n.interaction_inputType_mouse,n.interaction_inputType_touch)},e.initWithData=function(t){var e=this,n=e.config,r=e.scale,i=e.state,a=e.$el,o=e.org,s=i.hasAxis,u=n.interaction_enabled;s&&(e.axis=e.getAxisInstance(),n.zoom_enabled&&e.initZoom()),e.data.xs={},e.data.targets=e.convertDataToTargets(t),n.data_filter&&(e.data.targets=e.data.targets.filter(n.data_filter.bind(e.api))),n.data_hide&&e.addHiddenTargetIds(!0===n.data_hide?e.mapToIds(e.data.targets):n.data_hide),n.legend_hide&&e.addHiddenLegendIds(!0===n.legend_hide?e.mapToIds(e.data.targets):n.legend_hide),e.updateSizes(),e.updateScales(!0);var c=r.x,l=r.y,f=r.y2,h=r.subX,d=r.subY,g=r.subY2;if(c&&(c.domain(mo(e.getXDomain(e.data.targets))),h.domain(c.domain()),o.xDomain=c.domain()),l&&(l.domain(e.getYDomain(e.data.targets,"y")),d.domain(l.domain())),f&&(f.domain(e.getYDomain(e.data.targets,"y2")),g&&g.domain(f.domain())),a.svg=a.chart.append("svg").style("overflow","hidden").style("display","block"),u&&i.inputType){var p="touch"===i.inputType;a.svg.on(p?"touchstart":"mouseenter",(function(){return eo(n.onover,e.api)})).on(p?"touchend":"mouseleave",(function(){return eo(n.onout,e.api)}))}n.svg_classname&&a.svg.attr("class",n.svg_classname);var v=Xa(n.color_tiles)&&e.patterns;(s||v||n.data_labels_backgroundColors)&&(a.defs=a.svg.append("defs"),s&&["id","idXAxis","idYAxis","idGrid"].forEach((function(t){e.appendClip(a.defs,i.clip[t])})),e.generateDataLabelBackgroundColorFilter(),v&&e.patterns.forEach((function(t){return a.defs.append((function(){return t.node}))}))),e.updateSvgSize(),e.bindResize();var y=a.svg.append("g").classed(In.main,!0).attr("transform",e.getTranslate("main"));if(a.main=y,n.subchart_show&&e.initSubchart(),n.tooltip_show&&e.initTooltip(),n.title_text&&e.initTitle(),n.legend_show&&e.initLegend(),n.data_empty_label_text&&y.append("text").attr("class",In.text+" "+In.empty).attr("text-anchor","middle").attr("dominant-baseline","middle"),s&&(n.regions.length&&e.initRegion(),!n.clipPath&&e.axis.init()),y.append("g").attr("class",In.chart).attr("clip-path",i.clip.path),e.callPluginHook("$init"),s&&(u&&e.initEventRect&&e.initEventRect(),e.initGrid(),n.clipPath&&e.axis&&e.axis.init()),e.initChartElements(),e.updateTargets(e.data.targets),e.updateDimension(),eo(n.oninit,e.api),e.setBackground(),e.redraw({withTransition:!1,withTransform:!0,withUpdateXDomain:!0,withUpdateOrgXDomain:!0,withTransitionForAxis:!1,initializing:!0}),n.data_onmin||n.data_onmax){var x=e.getMinMaxData();eo(n.data_onmin,e.api,x.min),eo(n.data_onmax,e.api,x.max)}n.tooltip_show&&e.initShowTooltip(),i.rendered=!0},e.initChartElements=function(){var t=this,e=t.state,n=e.hasAxis,r=e.hasRadar,i=[];n?["bar","bubble","candlestick","line"].forEach((function(e){var n=go(e);("line"===e&&t.hasTypeOf(n)||t.hasType(e))&&i.push(n)})):(!r&&i.push("Arc","Pie"),t.hasType("gauge")?i.push("Gauge"):r&&i.push("Radar")),i.forEach((function(e){t["init"+e]()})),Ka(t.config.data_labels)&&!t.hasArcType(null,["radar"])&&t.initText()},e.setChartElements=function(){var t=this.$el,e=t.chart,n=t.svg,r=t.defs,i=t.main,a=t.tooltip,o=t.legend,s=t.title,u=t.grid,c=t.arcs,l=t.circle,f=t.bar,h=t.candlestick,d=t.line,g=t.area,p=t.text;this.api.$={chart:e,svg:n,defs:r,main:i,tooltip:a,legend:o,title:s,grid:u,arc:c,circles:l,bar:{bars:f},candlestick:h,line:{lines:d,areas:g},text:{texts:p}}},e.setBackground=function(){var t=this,e=t.config.background,n=t.state,r=t.$el.svg;if(Ka(e)){var i=r.select("g").insert(e.imgUrl?"image":"rect",":first-child");e.imgUrl?i.attr("href",e.imgUrl):e.color&&i.style("fill",e.color).attr("clip-path",n.clip.path),i.attr("class",e.class||null).attr("width","100%").attr("height","100%")}},e.updateTargets=function(t){var e=this,n=e.state,r=n.hasAxis,i=n.hasRadar;e.updateTargetsForText(t),r?(["bar","candlestick","line"].forEach((function(n){var r=go(n);("line"===n&&e.hasTypeOf(r)||e.hasType(n))&&e["updateTargetsFor"+r](t.filter(e["is"+r+"Type"].bind(e)))})),e.updateTargetsForSubchart&&e.updateTargetsForSubchart(t)):e.hasArcType(t)&&(i?e.updateTargetsForRadar(t.filter(e.isRadarType.bind(e))):e.updateTargetsForArc(t.filter(e.isArcType.bind(e)))),(e.hasType("bubble")||e.hasType("scatter"))&&e.updateTargetForCircle&&e.updateTargetForCircle(),e.showTargets()},e.showTargets=function(){var t=this,e=t.config;t.$el.svg.selectAll("."+In.target).filter((function(e){return t.isTargetToShow(e.id)})).transition().duration(e.transition_duration).style("opacity",null)},e.getWithOption=function(t){var e={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};return Object.keys(e).forEach((function(n){var r=e[n];Ba(r)&&(r=e[r]),e[n]=to(t,"with"+n,r)})),e},e.initialOpacity=function(t){var e=this.state.withoutFadeIn;return null!==this.getBaseValue(t)&&e[t.id]?null:"0"},e.bindResize=function(){var t=this,e=t.config,n=t.state,r=function(){var t,e=[],n=function(){n.clear(),t=Bo((function(){e.forEach((function(t){return t()}))}),200)};return n.clear=function(){t&&($o(t),t=null)},n.add=function(t){return e.push(t)},n.remove=function(t){return e.splice(e.indexOf(t),1)},n}(),i=[];i.push((function(){return eo(e.onresize,t,t.api)})),e.resize_auto&&i.push((function(){n.resizing=!0,t.api.flush(!1)})),i.push((function(){eo(e.onresized,t,t.api),n.resizing=!1})),i.forEach((function(t){return r.add(t)})),t.resizeFunction=r,Pa.addEventListener("resize",t.resizeFunction=r)},e.callPluginHook=function(t){for(var e=this,n=arguments.length,r=Array(n>1?n-1:0),i=1;i<n;i++)r[i-1]=arguments[i];this.config.plugins.forEach((function(n){"$beforeInit"===t&&(n.$$=e,e.api.plugins.push(n)),n[t].apply(n,r)}))},t}();function vl(t){var e,n,r,i=this.config,a=function(){var t=n.shift();return t&&e&&qa(e)&&t in e?(e=e[t],a()):t?void 0:e};Object.keys(i).forEach((function(o){e=t,n=o.split("_"),r=a(),Ya(r)&&(i[o]=r)}))}ho(pl.prototype,[rs,is,as,{categoryName:function(t){var e=this.config.axis_x_categories;return e&&t<e.length?e[t]:t}},gs,bs,As,ds,ks,Es,Ms,nc,ol,sl,cl,fl,hl,dl,gl]);var yl={resize:function(t){var e=this.internal,n=e.config,r=e.state;r.rendered&&(n.size_width=t?t.width:null,n.size_height=t?t.height:null,r.resizing=!0,this.flush(!1,!0),e.resizeFunction())},flush:function(t){var e,n=this.internal,r=n.state,i=n.$el.zoomResetBtn;r.rendered?(r.resizing?n.brush&&n.brush.updateResize():n.axis&&n.axis.setOrient(),null!=(e=i)&&e.style("display","none"),n.scale.zoom=null,t?n.redraw({withTransform:!0,withUpdateXDomain:!0,withUpdateOrgXDomain:!0,withLegend:!0}):n.updateAndRedraw({withLegend:!0,withTransition:!1,withTransitionForTransform:!1}),!r.resizing&&n.brush&&(n.brush.getSelection().call(n.brush.move),n.unselectRect())):n.initToRender(!0)},destroy:function(){var t=this,e=this.internal,n=e.$el,r=n.chart,i=n.svg;if(Ka(e))for(var a in e.callPluginHook("$willDestroy"),e.charts.splice(e.charts.indexOf(this),1),i.select("*").interrupt(),e.resizeFunction.clear(),Pa.removeEventListener("resize",e.resizeFunction),r.classed("bb",!1).html(""),Object.keys(this).forEach((function(n){"internal"===n&&Object.keys(e).forEach((function(t){e[t]=null})),t[n]=null,delete t[n]})),this)this[a]=function(){};return null},config:function(t,e,n){var r,i=this.internal.config,a=t&&t.replace(/\./g,"_");return a in i&&(Ya(e)?(i[a]=e,r=e,n&&this.flush()):r=i[a]),r}};function xl(t){var e=this.internal.data.targets;if(!Ua(t)){var n=Ja(t)?t:[t];return e.filter((function(t){return n.some((function(e){return e===t.id}))}))}return e}ho(xl,{shown:function(t){return this.internal.filterTargetsToShow(this.data(t))},values:function(t,e){void 0===e&&(e=!0);var n=null;if(t){var r=this.data(t);r&&Ja(r)&&(n=[],r.forEach((function(t){var r=t.values.map((function(t){return t.value}));e?n=n.concat(r):n.push(r)})))}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}});function _l(t,e,n){var r,i,a=e||n,o=a.width,s=a.height,u=new XMLSerializer,c=t.cloneNode(!0),l=(r=po(za.styleSheets),i=[],r.forEach((function(t){try{t.cssRules&&t.cssRules.length&&(i=i.concat(po(t.cssRules)))}catch(e){console.error("Error while reading rules from "+t.href+": "+e.toString())}})),i).filter((function(t){return t.cssText})).map((function(t){return t.cssText}));c.setAttribute("xmlns",Re.xhtml);var f=u.serializeToString(c),h=za.createElement("style");h.appendChild(za.createTextNode(l.join("\n")));var d=u.serializeToString(h),g=('<svg xmlns="'+Re.svg+'" width="'+o+'" height="'+s+'" \n\t\tviewBox="0 0 '+n.width+" "+n.height+'" \n\t\tpreserveAspectRatio="'+(e&&!1===e.preserveAspectRatio?"none":"xMinYMid meet")+'">\n\t\t\t<foreignObject width="100%" height="100%">\n\t\t\t\t'+d+"\n\t\t\t\t"+f.replace(/(url\()[^#]+/g,"$1")+"\n\t\t\t</foreignObject></svg>").replace("/\n/g","%0A");return"data:image/svg+xml;base64,"+btoa(encodeURIComponent(g).replace(/%([0-9A-F]{2})/g,(function(t,e){return String.fromCharCode(+("0x"+e))})))}var ml={export:function(t,e){var n=this,r=this.internal,i=r.state,a=r.$el.chart,o=i.current,s=o.width,u=o.height,c=_o({width:s,height:u,preserveAspectRatio:!0,mimeType:"image/png"},t),l=_l(a.node(),c,{width:s,height:u});if(e&&Xa(e)){var f=new Image;f.crossOrigin="Anonymous",f.onload=function(){var t=za.createElement("canvas"),r=t.getContext("2d");t.width=c.width||s,t.height=c.height||u,r.drawImage(f,0,0),e.bind(n)(t.toDataURL(c.mimeType))},f.src=l}return l}};function bl(t,e,n){var r=this,i=this.internal,a=i.mapToTargetIds(e),o=i.state.hiddenTargetIds.map((function(t){return a.indexOf(t)>-1&&t})).filter(Boolean);i.state.toggling=!0,i[(t?"remove":"add")+"HiddenTargetIds"](a);var s=i.$el.svg.selectAll(i.selectorTargets(a)),u=t?null:"0";t&&o.length&&(s.style("display",null),eo(i.config.data_onshown,this,o)),s.transition().style("opacity",u,"important").call(no,(function(){t||0!==o.length||(s.style("display","none"),eo(i.config.data_onhidden,r,a)),s.style("opacity",u)})),n.withLegend&&i[(t?"show":"hide")+"Legend"](a),i.redraw({withUpdateOrgXDomain:!0,withUpdateXDomain:!0,withLegend:!0}),i.state.toggling=!1}var wl=function t(e){this.plugins=[],this.internal=void 0;var n=new pl(this);this.internal=n,function t(e,n,r){Object.keys(e).forEach((function(i){var a=Xa(e[i]),o=n!==r,s=Ka(e[i]),u=s&&Object.keys(e[i]).length>0;n[i]=a&&(!o&&u||o)?e[i].bind(r):s&&!a?{}:e[i],u&&t(e[i],n[i],r)}))}(t.prototype,this,this),vl.call(n,e),n.beforeInit(),n.init()};function Tl(t,e,n){var r=t.config,i="axis_y_"+e,a="axis_y2_"+e;Ya(n)&&(qa(n)?(ja(n.x)&&(r["axis_x_"+e]=n.x),ja(n.y)&&(r[i]=n.y),ja(n.y2)&&(r[a]=n.y2)):(r[i]=n,r[a]=n),t.redraw({withUpdateOrgXDomain:!0,withUpdateXDomain:!0}))}function Al(t,e){var n=t.config;return{x:n["axis_x_"+e],y:n["axis_y_"+e],y2:n["axis_y2_"+e]}}ho(wl.prototype,[yl,{color:function(t){return this.internal.color(t)}},{data:xl},ml,{focus:function(t){var e=this.internal,n=e.state,r=e.mapToTargetIds(t),i=e.$el.svg.selectAll(e.selectorTargets(r.filter(e.isTargetToShow,e)));this.revert(),this.defocus(),i.classed(In.focused,!0).classed(In.defocused,!1),e.hasArcType()&&!n.hasRadar&&(e.expandArc(r),e.hasType("gauge")&&e.markOverlapped(t,e,"."+In.gaugeValue)),e.toggleFocusLegend(r,!0),n.focusedTargetIds=r,n.defocusedTargetIds=n.defocusedTargetIds.filter((function(t){return r.indexOf(t)<0}))},defocus:function(t){var e=this.internal,n=e.state,r=e.mapToTargetIds(t);e.$el.svg.selectAll(e.selectorTargets(r.filter(e.isTargetToShow,e))).classed(In.focused,!1).classed(In.defocused,!0),e.hasArcType()&&(e.unexpandArc(r),e.hasType("gauge")&&e.undoMarkOverlapped(e,"."+In.gaugeValue)),e.toggleFocusLegend(r,!1),n.focusedTargetIds=n.focusedTargetIds.filter((function(t){return r.indexOf(t)<0})),n.defocusedTargetIds=r},revert:function(t){var e=this.internal,n=e.config,r=e.state,i=e.$el,a=e.mapToTargetIds(t);i.svg.selectAll(e.selectorTargets(a)).classed(In.focused,!1).classed(In.defocused,!1),e.hasArcType()&&e.unexpandArc(a),n.legend_show&&(e.showLegend(a.filter(e.isLegendToShow.bind(e))),i.legend.selectAll(e.selectorLegends(a)).filter((function(){return Ln(this).classed(In.legendItemFocused)})).classed(In.legendItemFocused,!1)),r.focusedTargetIds=[],r.defocusedTargetIds=[]}},{legend:{show:function(t){var e=this.internal;e.showLegend(e.mapToTargetIds(t)),e.updateAndRedraw({withLegend:!0})},hide:function(t){var e=this.internal;e.hideLegend(e.mapToTargetIds(t)),e.updateAndRedraw({withLegend:!0})}}},{load:function(t){var e=this.internal,n=e.config;t.xs&&e.addXs(t.xs),"names"in t&&this.data.names(t.names),"classes"in t&&Object.keys(t.classes).forEach((function(e){n.data_classes[e]=t.classes[e]})),"categories"in t&&e.axis.isCategorized()&&(n.axis_x_categories=t.categories),"axes"in t&&Object.keys(t.axes).forEach((function(e){n.data_axes[e]=t.axes[e]})),"colors"in t&&Object.keys(t.colors).forEach((function(e){n.data_colors[e]=t.colors[e]})),"unload"in t&&!1!==t.unload?e.unload(e.mapToTargetIds(!0===t.unload?null:t.unload),(function(){Pa.requestIdleCallback((function(){return e.loadFromArgs(t)}))})):e.loadFromArgs(t)},unload:function(t){var e=this,n=this.internal,r=t||{};Ja(r)?r={ids:r}:Ba(r)&&(r={ids:[r]});var i=n.mapToTargetIds(r.ids);n.unload(i,(function(){n.redraw({withUpdateOrgXDomain:!0,withUpdateXDomain:!0,withLegend:!0}),n.cache.remove(i),r.done&&r.done.call(e)}))}},{show:function(t,e){void 0===e&&(e={}),bl.call(this,!0,t,e)},hide:function(t,e){void 0===e&&(e={}),bl.call(this,!1,t,e)},toggle:function(t,e){var n=this;void 0===e&&(e={});var r=this.internal,i={show:[],hide:[]};r.mapToTargetIds(t).forEach((function(t){return i[r.isTargetToShow(t)?"hide":"show"].push(t)})),i.show.length&&this.show(i.show,e),i.hide.length&&setTimeout((function(){return n.hide(i.hide,e)}),0)}},{tooltip:{show:function(t){var e,n,r=this.internal,i=r.config,a=r.state.inputType;if(t.mouse&&(n=t.mouse),t.data){var o=t.data,s=r.getYScaleById(o.id)(o.value);r.isMultipleX()?n=[r.scale.x(o.x),s]:(!i.tooltip_grouped&&(n=[0,s]),e=ja(o.index)?o.index:r.getIndexByX(o.x))}else Ya(t.x)?e=r.getIndexByX(t.x):Ya(t.index)&&(e=t.index);("mouse"===a?["mouseover","mousemove"]:["touchstart"]).forEach((function(t){r.dispatchEvent(t,e,n)}))},hide:function(){var t=this.internal,e=t.state.inputType,n=t.$el.tooltip,r=n&&n.datum();if(r){var i=JSON.parse(r.current)[0].index;("mouse"===e?["mouseout"]:["touchend"]).forEach((function(e){t.dispatchEvent(e,i)}))}"touch"===e&&t.callOverOutForTouch(),t.hideTooltip(!0),t.hideGridFocus(),t.unexpandCircles&&t.unexpandCircles(),t.expandBarTypeShapes(!1)}}}]);var Sl={axis:{labels:function(t){var e,n=this.internal;return t&&(Object.keys(t).forEach((function(e){n.axis.setLabelText(e,t[e])})),n.axis.updateLabels()),["x","y","y2"].forEach((function(t){var r=n.axis.getLabelText(t);r&&(!e&&(e={}),e[t]=r)})),e},min:function(t){var e=this.internal;return ja(t)?Tl(e,"min",t):Al(e,"min")},max:function(t){var e=this.internal;return arguments.length?Tl(e,"max",t):Al(e,"max")},range:function(t){var e=this.axis;if(!arguments.length)return{max:e.max(),min:e.min()};Ya(t.max)&&e.max(t.max),Ya(t.min)&&e.min(t.min)}}};function kl(t){var e=this.internal,n=e.config;return t?(n.grid_x_lines=t,e.redrawWithoutRescale(),n.grid_x_lines):n.grid_x_lines}ho(kl,{add:function(t){return this.xgrids(this.internal.config.grid_x_lines.concat(t||[]))},remove:function(t){this.internal.removeGridLines(t,!0)}});var El={xgrids:kl};function Ml(t){var e=this.internal,n=e.config;return t?(n.grid_y_lines=t,e.redrawWithoutRescale(),n.grid_y_lines):n.grid_y_lines}ho(Ml,{add:function(t){return this.ygrids(this.internal.config.grid_y_lines.concat(t||[]))},remove:function(t){this.internal.removeGridLines(t,!1)}});var Cl={ygrids:Ml},Ol={groups:function(t){var e=this.internal,n=e.config;return Ua(t)||(n.data_groups=t,e.redraw()),n.data_groups}};function Rl(t){var e=this.internal,n=e.config;return t?(n.regions=t,e.redrawWithoutRescale(),t):n.regions}ho(Rl,{add:function(t){var e=this.internal,n=e.config;return t?(n.regions=n.regions.concat(t),e.redrawWithoutRescale(),n.regions):n.regions},remove:function(t){var e=this.internal,n=e.config,r=t||{},i=to(r,"duration",n.transition_duration),a=to(r,"classes",[In.region]),o=e.$el.main.select("."+In.regions).selectAll(a.map((function(t){return"."+t})));return(i?o.transition().duration(i):o).style("opacity","0").remove(),o=n.regions,Object.keys(r).length?(o=o.filter((function(t){var e=!1;return!t.class||(t.class.split(" ").forEach((function(t){a.indexOf(t)>=0&&(e=!0)})),!e)})),n.regions=o):n.regions=[],o}});var Ll={regions:Rl},Il={x:function(t){var e=this.internal,n=e.axis,r=e.data,i=n.isCustomX()&&n.isCategorized();return Ja(t)&&(i?this.categories(t):(e.updateTargetX(r.targets,t),e.redraw({withUpdateOrgXDomain:!0,withUpdateXDomain:!0}))),i?this.categories():r.xs},xs:function(t){var e=this.internal;return Qa(t)&&(e.updateTargetXs(e.data.targets,t),e.redraw({withUpdateOrgXDomain:!0,withUpdateXDomain:!0})),e.data.xs}},Dl={flow:function(t){var e,n,r,i,a=this.internal,o=0,s=0;if((t.json||t.rows||t.columns)&&(e=a.convertData(t)),!a.state.redrawing&&e&&ko()){var u=[],c=a.getMaxDataCount(),l=a.convertDataToTargets(e,!0),f=a.axis.isTimeSeries();a.data.targets.forEach((function(t){for(var e=!1,n=0;n<l.length;n++)if(t.id===l[n].id){e=!0,t.values[t.values.length-1]&&(s=t.values[t.values.length-1].index+1),o=l[n].values.length;for(var r=0;r<o;r++)l[n].values[r].index=s+r,f||(l[n].values[r].x=s+r);t.values=t.values.concat(l[n].values),l.splice(n,1);break}e||u.push(t.id)})),a.data.targets.forEach((function(t){for(var e=0;e<u.length;e++)if(t.id===u[e]){s=t.values[t.values.length-1].index+1;for(var n=0;n<o;n++)t.values.push({id:t.id,index:s+n,x:f?a.getOtherTargetX(s+n):s+n,value:null})}})),a.data.targets.length&&l.forEach((function(t){for(var e=[],n=a.data.targets[0].values[0].index;n<s;n++)e.push({id:t.id,index:n,x:f?a.getOtherTargetX(n):n,value:null});t.values.forEach((function(t){t.index+=s,f||(t.x+=s)})),t.values=e.concat(t.values)})),a.data.targets=a.data.targets.concat(l);var h=a.data.targets[0],d=h.values[0];Ya(t.to)?(o=0,i=f?So.call(a,t.to):t.to,h.values.forEach((function(t){t.x<i&&o++}))):Ya(t.length)&&(o=t.length),c?1===c&&f&&(r=(h.values[h.values.length-1].x-d.x)/2,n=[new Date(+d.x-r),new Date(+d.x+r)]):(r=f?h.values.length>1?h.values[h.values.length-1].x-d.x:d.x-a.getXDomain(a.data.targets)[0]:1,n=[d.x-r,d.x]),n&&a.updateXDomain(null,!0,!0,!1,n),a.updateTargets(a.data.targets),a.redraw({flow:{index:d.index,length:o,duration:ja(t.duration)?t.duration:a.config.transition_duration,done:t.done,orgDataCount:c},withLegend:!0,withTransition:c>1,withTrimXDomain:!1,withUpdateXAxis:!0})}}},Pl=Array.prototype.slice;function zl(t){return t}var Fl=1e-6;function Nl(t){return"translate("+t+",0)"}function jl(t){return"translate(0,"+t+")"}function Xl(t){return function(e){return+t(e)}}function Bl(t,e){return e=Math.max(0,t.bandwidth()-2*e)/2,t.round()&&(e=Math.round(e)),function(n){return+t(n)+e}}function $l(){return!this.__axis}function Ul(t,e){function n(n){var d=null==i?e.ticks?e.ticks.apply(e,r):e.domain():i,g=null==a?e.tickFormat?e.tickFormat.apply(e,r):zl:a,p=Math.max(o,0)+u,v=e.range(),y=+v[0]+c,x=+v[v.length-1]+c,_=(e.bandwidth?Bl:Xl)(e.copy(),c),m=n.selection?n.selection():n,b=m.selectAll(".domain").data([null]),w=m.selectAll(".tick").data(d,e).order(),T=w.exit(),A=w.enter().append("g").attr("class","tick"),S=w.select("line"),k=w.select("text");b=b.merge(b.enter().insert("path",".tick").attr("class","domain").attr("stroke","currentColor")),w=w.merge(A),S=S.merge(A.append("line").attr("stroke","currentColor").attr(f+"2",l*o)),k=k.merge(A.append("text").attr("fill","currentColor").attr(f,l*p).attr("dy",1===t?"0em":3===t?"0.71em":"0.32em")),n!==m&&(b=b.transition(n),w=w.transition(n),S=S.transition(n),k=k.transition(n),T=T.transition(n).attr("opacity",Fl).attr("transform",(function(t){return isFinite(t=_(t))?h(t+c):this.getAttribute("transform")})),A.attr("opacity",Fl).attr("transform",(function(t){var e=this.parentNode.__axis;return h((e&&isFinite(e=e(t))?e:_(t))+c)}))),T.remove(),b.attr("d",4===t||2===t?s?"M"+l*s+","+y+"H"+c+"V"+x+"H"+l*s:"M"+c+","+y+"V"+x:s?"M"+y+","+l*s+"V"+c+"H"+x+"V"+l*s:"M"+y+","+c+"H"+x),w.attr("opacity",1).attr("transform",(function(t){return h(_(t)+c)})),S.attr(f+"2",l*o),k.attr(f,l*p).text(g),m.filter($l).attr("fill","none").attr("font-size",10).attr("font-family","sans-serif").attr("text-anchor",2===t?"start":4===t?"end":"middle"),m.each((function(){this.__axis=_}))}var r=[],i=null,a=null,o=6,s=6,u=3,c="undefined"!=typeof window&&window.devicePixelRatio>1?0:.5,l=1===t||4===t?-1:1,f=4===t||2===t?"x":"y",h=1===t||3===t?Nl:jl;return n.scale=function(t){return arguments.length?(e=t,n):e},n.ticks=function(){return r=Pl.call(arguments),n},n.tickArguments=function(t){return arguments.length?(r=null==t?[]:Pl.call(t),n):r.slice()},n.tickValues=function(t){return arguments.length?(i=null==t?null:Pl.call(t),n):i&&i.slice()},n.tickFormat=function(t){return arguments.length?(a=t,n):a},n.tickSize=function(t){return arguments.length?(o=s=+t,n):o},n.tickSizeInner=function(t){return arguments.length?(o=+t,n):o},n.tickSizeOuter=function(t){return arguments.length?(s=+t,n):s},n.tickPadding=function(t){return arguments.length?(u=+t,n):u},n.offset=function(t){return arguments.length?(c=+t,n):c},n}function Yl(t){return Ul(1,t)}function Vl(t){return Ul(2,t)}function Gl(t){return Ul(3,t)}function Hl(t){return Ul(4,t)}var Wl=function(){function t(t){this.owner=void 0,this.config=void 0,this.scale=void 0;var e=ec(),n=t.config,r=t.params;this.owner=t,this.config=n,this.scale=e,(n.noTransition||!r.config.transition_duration)&&(n.withoutTransition=!0),n.range=this.scaleExtent((r.orgXScale||e).range())}t.getSizeFor1Char=function(t){var e={w:5.5,h:11.5};return t.empty()||t.select("text").text("0").call((function(t){try{var n=t.node().getBBox(),r=n.width,i=n.height;r&&i&&(e.w=r,e.h=i)}catch(t){}finally{t.text("")}})),this.getSizeFor1Char=function(){return e},e};var e=t.prototype;return e.getTickTransformSetter=function(t){var e=this.config,n="x"===t?function(t){return"translate("+(t+e.tickOffset)+",0)"}:function(t){return"translate(0,"+t+")"};return function(t,e){t.attr("transform",(function(t){return n(Math.ceil(e(t)))}))}},e.scaleExtent=function(t){var e=t[0],n=t[t.length-1];return e<n?[e,n]:[n,e]},e.generateTicks=function(t,e){var n=this.owner.params.tickStepSize,r=t.domain(),i=r[0],a=r[1],o=[];if(e&&n)for(var s=i;s<=a;)o.push(s),s+=n;else if(t.ticks){var u=this.config.tickArguments;if("log"!==t.type||u)o=t.ticks.apply(t,this.config.tickArguments||[]);else{var c=ec("_log").domain([i>0?i:1,a]).range(t.range());o=c.ticks();for(var l=a.toFixed().length;o.length>15;l--)o=c.ticks(l);o.splice(0,1,i),o.splice(o.length-1,1,a)}o=o.map((function(t){return Ba(t)&&$a(t)&&!isNaN(t)&&Math.round(10*t)/10||t}))}else{for(var f=Math.ceil(i);f<a;f++)o.push(f);o.length>0&&o[0]>0&&o.unshift(o[0]-(o[1]-o[0]))}return o},e.copyScale=function(){var t=this.scale.copy();return t.domain().length||t.domain(this.scale.domain()),t.type=this.scale.type,t},e.textFormatted=function(t){var e=this.config.tickFormat,n=/\d+\.\d+0{5,}\d$/.test(t)?+(t+"").replace(/0+\d$/,""):t,r=e?e(n):n;return Ya(r)?r:""},e.transitionise=function(t){var e=this.config,n=t;if(e.withoutTransition)n=t.interrupt();else if(e.transition||!this.owner.params.noTransition)try{n=t.transition(e.transition)}catch(t){}return n},t}(),ql=function(){function t(t){void 0===t&&(t={}),this.helper=void 0,this.config=void 0,this.params=void 0,this.g=void 0;var e={innerTickSize:6,outerTickSize:t.outerTick?6:0,orient:"bottom",range:[],tickArguments:null,tickCentered:null,tickCulling:!0,tickFormat:null,tickLength:9,tickOffset:0,tickPadding:3,tickValues:null,transition:null,noTransition:t.noTransition};e.tickLength=Math.max(e.innerTickSize,0)+e.tickPadding,this.config=e,this.params=t,this.helper=new Wl(this)}var e=t.prototype;return e.create=function(t){var e=this,n=this.config,r=this.helper,i=this.params,a=r.scale,o=n.orient,s=this.splitTickText.bind(this),u=/^(left|right)$/.test(o),c=/^(top|bottom)$/.test(o),l=r.getTickTransformSetter(c?"x":"y"),f=l===r.axisX?"y":"x",h=/^(top|left)$/.test(o)?-1:1,d=i.tickTextRotate;this.config.range=a.rangeExtent?a.rangeExtent():r.scaleExtent((i.orgXScale||a).range());var g,p=n,v=p.innerTickSize,y=p.tickLength,x=p.range,_=i.id,m=_&&/^(x|y|y2)$/.test(_)?i.config["axis_"+_+"_tick_text_position"]:{x:0,y:0},b="subX"===_?"subchart_axis_x":"axis_"+_,w=i.config[b+"_show"],T=!!w&&i.config[b+"_tick_show"],A=!!w&&i.config[b+"_tick_text_show"];t.each((function(){var t=Ln(this),p=this.__chart__||a,_=r.copyScale();g=t,this.__chart__=_,n.tickOffset=i.isCategory?Math.ceil((_(1)-_(0))/2):0;var b=t.selectAll(".domain").data([0]);if(b.enter().append("path").attr("class","domain").merge(b).attr("d",(function(){var t=n.outerTickSize*h;return c?"M"+x[0]+","+t+"V0H"+x[1]+"V"+t:"M"+t+","+x[0]+"H0V"+x[1]+"H"+t})),T||A){var w=n.tickValues||r.generateTicks(_,u),S=t.selectAll(".tick").data(w,_),k=S.enter().insert("g",".domain").attr("class","tick"),E=S.exit().remove();S=k.merge(S),T&&k.append("line"),A&&k.append("text");var M=Wl.getSizeFor1Char(S),C=[],O=S.select("text").selectAll("tspan").data((function(t,e){var n=i.tickMultiline?s(t,_,w,u,M.w):Ja(r.textFormatted(t))?r.textFormatted(t).concat():[r.textFormatted(t)];return C[e]=n.length,n.map((function(t){return{index:e,splitted:t}}))}));O.exit().remove(),(O=O.enter().append("tspan").merge(O).text((function(t){return t.splitted}))).attr("x",c?0:y*h).attr("dx",function(){var t=0;return/(top|bottom)/.test(o)&&d&&(t=8*Math.sin(Math.PI*(d/180))*("top"===o?-1:1)),t+(m.x||0)}()).attr("dy",(function(t,e){var n=0;return"top"!==o&&(n=M.h,0===e&&(n=u?-((C[t.index]-1)*(M.h/2)-3):0===m.y?".71em":0)),$a(n)&&m.y?n+m.y:n||".71em"}));var R=S.select("line"),L=S.select("text");if(k.select("line").attr(f+"2",v*h),k.select("text").attr(f,y*h),e.setTickLineTextPosition(R,L),i.tickTitle){var I=L.select("title");(I.empty()?L.append("title"):I).text((function(t){return i.tickTitle[t]}))}if(_.bandwidth){var D=_,P=D.bandwidth()/2;_=p=function(t){return D(t)+P}}else p.bandwidth?p=_:l(E,_);l(k,p),l(r.transitionise(S).style("opacity",null),_)}})),this.g=g},e.getTickXY=function(){var t=this.config,e={x:0,y:0};return this.params.isCategory&&(e.x=t.tickCentered?0:t.tickOffset,e.y=t.tickCentered?t.tickOffset:0),e},e.getTickSize=function(t){var e=this.helper.scale,n=this.config,r=n,i=r.innerTickSize,a=r.range,o=e(t)+(n.tickCentered?0:n.tickOffset);return a[0]<o&&o<a[1]?i:0},e.setTickLineTextPosition=function(t,e){var n=this.getTickXY(),r=this.config,i=r.innerTickSize,a=r.orient,o=r.tickLength,s=r.tickOffset,u=this.params.tickTextRotate,c=function(t){var e=["start","end"];return"top"===a&&e.reverse(),t?t>0?e[0]:e[1]:"middle"},l=function(t){return t?"rotate("+t+")":null},f=function(t){return t?11.5-2.5*(t/("bottom"===a?15:23))*(t>0?1:-1):o};"bottom"===a?(t.attr("x1",n.x).attr("x2",n.x).attr("y2",this.getTickSize.bind(this)),e.attr("x",0).attr("y",f(u)).style("text-anchor",c(u)).attr("transform",l(u))):"top"===a?(t.attr("x2",0).attr("y2",-i),e.attr("x",0).attr("y",2*-f(u)).style("text-anchor",c(u)).attr("transform",l(u))):"left"===a?(t.attr("x2",-i).attr("y1",n.y).attr("y2",n.y),e.attr("x",-o).attr("y",s).style("text-anchor","end")):"right"===a&&(t.attr("x2",i).attr("y2",0),e.attr("x",o).attr("y",0).style("text-anchor","start"))},e.splitTickText=function(t,e,n,r,i){var a=this.params,o=this.helper.textFormatted(t),s=Ba(o)&&o.indexOf("\n")>-1?o.split("\n"):[];if(s.length)return s;if(Ja(o))return o;var u=a.tickWidth;return(!u||u<=0)&&(u=r?95:a.isCategory?Math.ceil(e(n[1])-e(n[0]))-12:110),function t(e,n){for(var r,a,o,s=1;s<n.length;s++)if(" "===n.charAt(s)&&(a=s),r=n.substr(0,s+1),o=i*r.length,u<o)return t(e.concat(n.substr(0,a||s)),n.slice(a?a+1:s));return e.concat(n)}(s,o+"")},e.scale=function(t){return arguments.length?(this.helper.scale=t,this):this.helper.scale},e.orient=function(t){return arguments.length?(this.config.orient=t in{top:1,right:1,bottom:1,left:1}?t+"":"bottom",this):this.config.orient},e.tickFormat=function(t){var e=this.config;return arguments.length?(e.tickFormat=t,this):e.tickFormat},e.tickCentered=function(t){var e=this.config;return arguments.length?(e.tickCentered=t,this):e.tickCentered},e.tickOffset=function(){return this.config.tickOffset},e.tickInterval=function(t){var e,n=this,r=this.config,i=r.outerTickSize,a=r.tickOffset,o=r.tickValues;if(this.params.isCategory)e=2*a;else{e=(this.g.select("path.domain").node().getTotalLength()-2*i)/(t||this.g.selectAll("line").size());var s=o?o.map((function(t,e,r){var i=e+1;return i<r.length?n.helper.scale(r[i])-n.helper.scale(t):null})).filter(Boolean):[];e=Math.min.apply(Math,s.concat([e]))}return e===1/0?0:e},e.ticks=function(){for(var t=this.config,e=arguments.length,n=Array(e),r=0;r<e;r++)n[r]=arguments[r];return n.length?(t.tickArguments=po(n),this):t.tickArguments},e.tickCulling=function(t){var e=this.config;return arguments.length?(e.tickCulling=t,this):e.tickCulling},e.tickValues=function(t){var e=this,n=this.config;if(Xa(t))n.tickValues=function(){return t(e.helper.scale.domain())};else{if(!arguments.length)return n.tickValues;n.tickValues=t}return this},e.setTransition=function(t){return this.config.transition=t,this},t}(),Zl={getAxisInstance:function(){return this.axis||new Kl(this)}},Kl=function(){function t(t){this.owner=void 0,this.x=void 0,this.subX=void 0,this.y=void 0,this.y2=void 0,this.axesList={},this.tick={x:null,y:null,y2:null},this.xs=[],this.orient={x:"bottom",y:"left",y2:"right",subX:"bottom"},this.owner=t,this.setOrient()}var e=t.prototype;return e.getAxisClassName=function(t){return In.axis+" "+In["axis"+go(t)]},e.isHorizontal=function(t,e){var n=t.config.axis_rotated;return e?n:!n},e.isCategorized=function(){var t=this.owner,e=t.config,n=t.state;return e.axis_x_type.indexOf("category")>=0||n.hasRadar},e.isCustomX=function(){var t=this.owner.config;return!this.isTimeSeries()&&(t.data_x||Ka(t.data_xs))},e.isTimeSeries=function(t){return void 0===t&&(t="x"),"timeseries"===this.owner.config["axis_"+t+"_type"]},e.isLog=function(t){return void 0===t&&(t="x"),"log"===this.owner.config["axis_"+t+"_type"]},e.isTimeSeriesY=function(){return this.isTimeSeries("y")},e.getAxisType=function(t){void 0===t&&(t="x");var e="linear";return this.isTimeSeries(t)?e=this.owner.config.axis_x_localtime?"time":"utc":this.isLog(t)&&(e="log"),e},e.init=function(){var t=this,e=this.owner,n=e.config,r=e.$el,i=r.main,a=r.axis,o=e.state.clip,s=n.axis_rotated,u=["x","y"];n.axis_y2_show&&u.push("y2"),u.forEach((function(r){var u=t.getAxisClassName(r),c=In["axis"+r.toUpperCase()+"Label"];a[r]=i.append("g").attr("class",u).attr("clip-path",(function(){var t=null;return"x"===r?t=o.pathXAxis:"y"===r&&(t=o.pathYAxis),t})).attr("transform",e.getTranslate(r)).style("visibility",n["axis_"+r+"_show"]?null:"hidden"),a[r].append("text").attr("class",c).attr("transform",["rotate(-90)",null]["x"===r?+!s:+s]).style("text-anchor",(function(){return t.textAnchorForAxisLabel(r)})),t.generateAxes(r)}))},e.setOrient=function(){var t=this.owner.config,e=t.axis_rotated,n=t.axis_y_inner,r=t.axis_y2_inner;this.orient={x:e?"left":"bottom",y:e?n?"top":"bottom":n?"right":"left",y2:e?r?"bottom":"top":r?"left":"right",subX:e?"left":"bottom"}},e.generateAxes=function(t){var e,n=this.owner,r=n.config,i=[],a=r["axis_"+t+"_axes"],o=r.axis_rotated;"x"===t?e=o?Hl:Gl:"y"===t?e=o?Gl:Hl:"y2"===t&&(e=o?Yl:Vl),a.length&&a.forEach((function(r){var a=r.tick||{},o=n.scale[t].copy();r.domain&&o.domain(r.domain),i.push(e(o).ticks(a.count).tickFormat(Xa(a.format)?a.format.bind(n.api):function(t){return t}).tickValues(a.values).tickSizeOuter(!1===a.outer?0:6))})),this.axesList[t]=i},e.updateAxes=function(){var t=this,e=this.owner,n=e.config,r=e.$el.main;Object.keys(this.axesList).forEach((function(i){var a=n["axis_"+i+"_axes"],o=e.scale[i].copy(),s=o.range();t.axesList[i].forEach((function(u,c){var l=u.scale().range();s.every((function(t,e){return t===l[e]}))||u.scale().range(s);var f=t.getAxisClassName(i)+"-"+(c+1),h=r.select("."+f.replace(/\s/,"."));h.empty()?h=r.append("g").attr("class",f).style("visibility",n["axis_"+i+"_show"]?null:"hidden").call(u):(a[c].domain&&o.domain(a[c].domain),t.x.helper.transitionise(h).call(u.scale(o))),h.attr("transform",e.getTranslate(i,c+1))}))}))},e.setAxis=function(t,e,n,r){var i=this.owner;"subX"!==t&&(this.tick[t]=this.getTickValues(t)),this[t]=this.getAxis(t,e,n,!("x"!==t||!(i.scale.zoom||i.config.subchart_show||i.state.resizing))||r)},e.getAxis=function(t,e,n,r,i){var a,o=this.owner,s=o.config,u=/^(x|subX)$/.test(t),c=u?"x":t,l=u&&this.isCategorized(),f=this.orient[t],h=i?0:o.getAxisTickRotate(c);if(u)a=o.format.xAxisTick;else{var d=s["axis_"+t+"_tick_format"];Xa(d)&&(a=d.bind(o.api))}var g=this.tick[c],p=_o({outerTick:n,noTransition:r,config:s,id:t,tickTextRotate:h},u&&{isCategory:l,tickMultiline:s.axis_x_tick_multiline,tickWidth:s.axis_x_tick_width,tickTitle:l&&s.axis_x_tick_tooltip&&o.api.categories(),orgXScale:o.scale.x});u||(p.tickStepSize=s["axis_"+c+"_tick_stepSize"]);var v=new ql(p).scale(u&&o.scale.zoom||e).orient(f);if(u&&this.isTimeSeries()&&g&&!Xa(g)){var y=So.bind(o);g=g.map((function(t){return y(t)}))}else!u&&this.isTimeSeriesY()&&(v.ticks(s.axis_y_tick_time_value),g=null);g&&v.tickValues(g),v.tickFormat(a||!u&&o.isStackNormalized()&&function(t){return t+"%"}),l&&(v.tickCentered(s.axis_x_tick_centered),Za(s.axis_x_tick_culling)&&(s.axis_x_tick_culling=!1));var x=s["axis_"+c+"_tick_count"];return x&&v.ticks(x),v},e.updateXAxisTickValues=function(t,e){var n,r=this.owner,i=r.config,a=i.axis_x_tick_fit,o=i.axis_x_tick_count;return(a||o&&a)&&(n=r.mapTargetsToUniqueXs(t),this.isCategorized()&&o>n.length&&(o=n.length),n=this.generateTickValues(n,o,this.isTimeSeries())),e?e.tickValues(n):this.x&&(this.x.tickValues(n),this.subX&&this.subX.tickValues(n)),n},e.getId=function(t){var e=this.owner,n=e.config,r=e.scale,i=n.data_axes[t];return i&&r[i]||(i="y"),i},e.getXAxisTickFormat=function(){var t,e=this.owner,n=e.config,r=e.format,i=n.axis_x_tick_format,a=this.isTimeSeries(),o=this.isCategorized();return i?Xa(i)?t=i.bind(e.api):a&&(t=function(t){return t?r.axisTime(i)(t):""}):t=a?r.defaultAxisTime:o?e.categoryName:function(t){return t<0?t.toFixed(0):t},Xa(t)?function(n){return t.apply(e,o?[n,e.categoryName(n)]:[n])}:t},e.getTickValues=function(t){var e=this.owner,n=e.config["axis_"+t+"_tick_values"],r=e[t+"Axis"];return(Xa(n)?n.call(e.api):n)||(r?r.tickValues():void 0)},e.getLabelOptionByAxisId=function(t){return this.owner.config["axis_"+t+"_label"]},e.getLabelText=function(t){var e=this.getLabelOptionByAxisId(t);return Ba(e)?e:e?e.text:null},e.setLabelText=function(t,e){var n=this.owner.config,r=this.getLabelOptionByAxisId(t);Ba(r)?n["axis_"+t+"_label"]=e:r&&(r.text=e)},e.getLabelPosition=function(t,e){var n=this.owner.config.axis_rotated,r=this.getLabelOptionByAxisId(t),i=qa(r)&&r.position?r.position:e[+!n],a=function(t){return!!~i.indexOf(t)};return{isInner:a("inner"),isOuter:a("outer"),isLeft:a("left"),isCenter:a("center"),isRight:a("right"),isTop:a("top"),isMiddle:a("middle"),isBottom:a("bottom")}},e.getAxisLabelPosition=function(t){return this.getLabelPosition(t,"x"===t?["inner-top","inner-right"]:["inner-right","inner-top"])},e.getLabelPositionById=function(t){return this.getAxisLabelPosition(t)},e.xForAxisLabel=function(t){var e=this.owner,n=e.state,r=n.width,i=n.height,a=this.getAxisLabelPosition(t),o=a.isMiddle?-i/2:0;return this.isHorizontal(e,"x"!==t)?o=a.isLeft?0:a.isCenter?r/2:r:a.isBottom&&(o=-i),o},e.dxForAxisLabel=function(t){var e=this.owner,n=this.getAxisLabelPosition(t),r=n.isBottom?"0.5em":"0";return this.isHorizontal(e,"x"!==t)?r=n.isLeft?"0.5em":n.isRight?"-0.5em":"0":n.isTop&&(r="-0.5em"),r},e.textAnchorForAxisLabel=function(t){var e=this.owner,n=this.getAxisLabelPosition(t),r=n.isMiddle?"middle":"end";return this.isHorizontal(e,"x"!==t)?r=n.isLeft?"start":n.isCenter?"middle":"end":n.isBottom&&(r="start"),r},e.dyForAxisLabel=function(t){var e,n=this.owner,r=n.config,i=r.axis_rotated,a=this.getAxisLabelPosition(t).isInner,o=r["axis_"+t+"_tick_rotate"]?n.getHorizontalAxisHeight(t):0,s=this.getMaxTickWidth(t);if("x"===t){var u=r.axis_x_height;e=i?a?"1.2em":-25-s:a?"-0.5em":u?u-10:o?o-10:"3em"}else e={y:["-0.5em",10,"3em","1.2em",10],y2:["1.2em",-20,"-2.2em","-0.5em",15]}[t],e=i?a?e[0]:o?o*("y2"===t?-1:1)-e[1]:e[2]:a?e[3]:(e[4]+(r["axis_"+t+"_inner"]?0:s+e[4]))*("y"===t?-1:1);return e},e.getMaxTickWidth=function(t,e){var n=this.owner,r=n.config,i=n.state.current,a=n.$el,o=a.svg,s=a.chart,u=i.maxTickWidths[t],c=0;if(e||!r["axis_"+t+"_show"]||0===n.filterTargetsToShow().length)return u.size;if(o){var l=/^y2?$/.test(t),f=n.filterTargetsToShow(n.data.targets),h=n.scale[t].copy().domain(n["get"+(l?"Y":"X")+"Domain"](f,t)),d=h.domain(),g=d[0]===d[1]&&d.every((function(t){return t>0})),p=Ja(u.domain)&&u.domain[0]===u.domain[1]&&u.domain.every((function(t){return t>0}));if(g||p)return u.size;u.domain=d,l||u.ticks.splice(0);var v=this.getAxis(t,h,!1,!1,!0),y=r["axis_"+t+"_tick_count"];!r["axis_"+t+"_tick_values"]&&y&&v.tickValues(this.generateTickValues(d,y,l?this.isTimeSeriesY():this.isTimeSeries())),l||this.updateXAxisTickValues(f,v);var x=s.append("svg").style("visibility","hidden").style("position","fixed").style("top","0px").style("left","0px");v.create(x),x.selectAll("text").each((function(t,e){var n=this.getBoundingClientRect().width;c=Math.max(c,n),l||(u.ticks[e]=n)})),x.remove()}return c>0&&(u.size=c),u.size},e.getXAxisTickTextY2Overflow=function(t){var e=this.owner,n=e.axis,r=e.config,i=e.state,a=e.getAxisTickRotate("x");if((n.isCategorized()||n.isTimeSeries())&&r.axis_x_tick_fit&&!r.axis_x_tick_culling&&!r.axis_x_tick_multiline&&a>0&&a<90){var o=i.current.width-e.getCurrentPaddingLeft(),s=this.getXAxisTickMaxOverflow(a,o-t),u=Math.max(0,s)+t;return Math.min(u,o/2)}return 0},e.getXAxisTickMaxOverflow=function(t,e){for(var n=this.owner,r=n.axis,i=n.config,a=n.state,o=r.isTimeSeries(),s=a.current.maxTickWidths.x.ticks,u=s.length,c=a.axis.x.padding,l=c.left,f=c.right,h=0,d=u-(o&&i.axis_x_tick_fit?.5:0),g=0;g<u;g++){var p=g+1,v=Math.cos(Math.PI*t/180)*s[g],y=p-(o?1:.5)+l;if(!(y<=0)){var x=(e-v)/y;h=Math.max(h,v-x/2-((d-p)*x+f*x))}}var _=n.filterTargetsToShow(n.data.targets),m=0;if(!o&&i.axis_x_tick_count<=_.length&&_[0].values.length){var b=ec(n.axis.getAxisType("x"),0,e-h).domain([-1*l,n.getXDomainMax(n.data.targets)+1+f]);m=Math.ceil((b(1)-b(0))/2)}return h+m},e.getXAxisPadding=function(t){var e=this.owner,n=e.config.axis_x_padding,r=$a(n)?{left:n,right:n}:n,i=r.left,a=void 0===i?0:i,o=r.right,s=void 0===o?0:o;if(e.axis.isTimeSeries()){var u=+e.getXDomainMin(e.data.targets),c=+e.getXDomainMax(e.data.targets)-u,l=c+a+s;if(t&&l){var f=c/t/l;a=a/l/f,s=s/l/f}}return{left:a,right:s}},e.updateLabels=function(t){var e=this,n=this.owner.$el.main,r={x:n.select("."+In.axisX+" ."+In.axisXLabel),y:n.select("."+In.axisY+" ."+In.axisYLabel),y2:n.select("."+In.axisY2+" ."+In.axisY2Label)};Object.keys(r).filter((function(t){return!r[t].empty()})).forEach((function(n){var i=r[n];(t?i.transition():i).attr("x",(function(){return e.xForAxisLabel(n)})).attr("dx",(function(){return e.dxForAxisLabel(n)})).attr("dy",(function(){return e.dyForAxisLabel(n)})).text((function(){return e.getLabelText(n)}))}))},e.getPadding=function(t,e,n,r){var i=$a(t)?t:t[e];return ja(i)?this.convertPixelsToAxisPadding(i,r):n},e.convertPixelsToAxisPadding=function(t,e){var n=this.owner,r=n.config,i=n.state,a=i.width,o=i.height;return e*(t/(r.axis_rotated?a:o))},e.generateTickValues=function(t,e,n){var r=t;if(e){var i=Xa(e)?e():e;if(1===i)r=[t[0]];else if(2===i)r=[t[0],t[t.length-1]];else if(i>2){var a,o=this.isCategorized(),s=i-2,u=t[0],c=t[t.length-1];r=[u];for(var l=0;l<s;l++)a=+u+(c-u)/(s+1)*(l+1),r.push(n?new Date(a):o?Math.round(a):a);r.push(c)}}return n||(r=r.sort((function(t,e){return t-e}))),r},e.generateTransitions=function(t){var e=this.owner.$el.axis,n=["x","y","y2","subX"].map((function(n){var r=e[n];return r&&t&&(r=r.transition().duration(t)),r}));return{axisX:n[0],axisY:n[1],axisY2:n[2],axisSubX:n[3]}},e.redraw=function(t,e,n){var r=this,i=this.owner,a=i.config,o=i.$el,s=e?"0":null;["x","y","y2","subX"].forEach((function(e){var i=r[e],u=o.axis[e];i&&u&&(!n&&!a.transition_duration&&(i.config.withoutTransition=!0),u.style("opacity",s),i.create(t["axis"+go(e)]))})),this.updateAxes()},e.redrawAxis=function(t,e,n,r,i){var a,o=this,s=this.owner,u=s.config,c=s.scale,l=s.$el,f=!!c.zoom;!f&&this.isCategorized()&&0===t.length&&c.x.domain([0,l.axis.x.selectAll(".tick").size()]),c.x&&t.length?(!f&&s.updateXDomain(t,e.UpdateXDomain,e.UpdateOrgXDomain,e.TrimXDomain),!u.axis_x_tick_values&&this.updateXAxisTickValues(t)):this.x&&(this.x.tickValues([]),this.subX&&this.subX.tickValues([])),u.zoom_rescale&&!r&&(a=c.x.orgDomain()),["y","y2"].forEach((function(e){var n=c[e];if(n){var r=u["axis_"+e+"_tick_values"],i=u["axis_"+e+"_tick_count"];if(n.domain(s.getYDomain(t,e,a)),!r&&i){var l=s.axis[e],f=n.domain();l.tickValues(o.generateTickValues(f,f.every((function(t){return 0===t}))?1:i,o.isTimeSeriesY()))}}})),this.redraw(n,s.hasArcType(),i),this.updateLabels(e.Transition),(e.UpdateXDomain||e.UpdateXAxis||e.Y)&&t.length&&this.setCulling(),e.Y&&(c.subY&&c.subY.domain(s.getYDomain(t,"y")),c.subY2&&c.subY2.domain(s.getYDomain(t,"y2")))},e.setCulling=function(){var t=this.owner,e=t.config,n=t.state,r=n.clip,i=n.current,a=t.$el;["subX","x","y","y2"].forEach((function(t){var n=a.axis[t],o="subX"===t?"x":t,s=e["axis_"+o+"_tick_culling"];if(n&&s){var u,c=n.selectAll(".tick text"),l=mo(c.data()),f=l.length,h=e["axis_"+o+"_tick_culling_max"];if(f){for(var d=1;d<f;d++)if(f/d<h){u=d;break}c.each((function(t){this.style.display=l.indexOf(t)%u?"none":null}))}else c.style("display",null);if("x"===t){var g=i.maxTickWidths.x.clipPath?r.pathXAxisTickTexts:null;a.svg.selectAll("."+In.axisX+" .tick text").attr("clip-path",g)}}}))},t}(),Jl={initEventRect:function(){this.$el.main.select("."+In.chart).append("g").attr("class",In.eventRects).style("fill-opacity","0")},redrawEventRect:function(){var t=this,e=t.config,n=t.state,r=t.$el,i=t.isMultipleX();if(r.eventRect)t.updateEventRect(r.eventRect,!0);else{var a=t.$el.main.select("."+In.eventRects).style("cursor",e.zoom_enabled&&"drag"!==e.zoom_type?e.axis_rotated?"ns-resize":"ew-resize":null).classed(In.eventRectsMultiple,i).classed(In.eventRectsSingle,!i).selectAll("."+In.eventRect).data([0]).enter().append("rect");t.updateEventRect(a),i?t.generateEventRectsForMultipleXs(a):t.generateEventRectsForSingleX(a),a.call(t.getDraggableSelection()),r.eventRect=a,"touch"!==t.state.inputType||r.svg.on("touchstart.eventRect")||t.hasArcType()||t.bindTouchOnEventRect(i)}if(!i){var o=t.getMaxDataCountTarget();t.updateDataIndexByX(o),t.updateXs(o),t.updatePointClass&&t.updatePointClass(!0),n.eventReceiver.data=o}t.updateEventRectData()},bindTouchOnEventRect:function(t){var e,n=this,r=n.config,i=n.state,a=n.$el,o=a.eventRect,s=a.svg,u=function(){n.unselectRect(),n.callOverOutForTouch()},c=r.interaction_inputType_touch.preventDefault,l=Va(c)&&c||!1,f=!isNaN(c)&&c||null;o.on("touchstart",(function(t){i.event=t,n.updateEventRect()})).on("touchstart.eventRect touchmove.eventRect",(function(a){if(i.event=a,!o.empty()&&o.classed(In.eventRect)){if(i.dragging||i.flowing||n.hasArcType()||a.touches.length>1)return;(function(t){var n=t.type,i=t.changedTouches[0]["client"+(r.axis_rotated?"Y":"X")];"touchstart"===n?l?t.preventDefault():null!==f&&(e=i):"touchmove"===n&&(l||!0===e||null!==f&&Math.abs(e-i)>=f)&&(e=!0,t.preventDefault())})(a),function(e){if(t)n.selectRectForMultipleXs(e);else{var r=n.getDataIndexFromEvent(i.event);n.callOverOutForTouch(r),-1===r?n.unselectRect():n.selectRectForSingle(e,o,r)}}(o.node())}else u()}),!0).on("touchend.eventRect",(function(t){i.event=t,!o.empty()&&o.classed(In.eventRect)&&(n.hasArcType()||!n.toggleShape||i.cancelClick)&&i.cancelClick&&(i.cancelClick=!1)}),!0),s.on("touchstart",(function(t){i.event=t;var e=t.target;e&&e!==o.node()&&u()}))},updateEventRect:function(t,e){void 0===e&&(e=!1);var n=this.state,r=this.$el,i=n,a=i.eventReceiver,o=i.width,s=i.height,u=i.rendered,c=i.resizing,l=t||r.eventRect;(!u||c||e)&&(l.attr("x",0).attr("y",0).attr("width",o).attr("height",s),!u&&l.attr("class",In.eventRect)),a&&(a.rect=l.node().getBoundingClientRect())},updateEventRectData:function(){var t,e,n,r,i=this,a=i.config,o=i.scale,s=i.state,u=o.zoom||o.x,c=a.axis_rotated;if(i.isMultipleX())t=0,e=0,n=s.width,r=s.height;else{var l,f;if(i.axis.isCategorized())l=i.getEventRectWidth(),f=function(t){return u(t.x)-l/2};else{var h=function(t){var e=t.index;return{prev:i.getPrevX(e),next:i.getNextX(e)}};l=function(t){var e=h(t);return null===e.prev&&null===e.next?c?s.height:s.width:(null===e.prev&&(e.prev=u.domain()[0]),null===e.next&&(e.next=u.domain()[1]),Math.max(0,(u(e.next)-u(e.prev))/2))},f=function(t){var e=h(t),n=t.x;return null===e.prev&&null===e.next?0:(null===e.prev&&(e.prev=u.domain()[0]),(u(n)+u(e.prev))/2)}}t=c?0:f,e=c?f:0,n=c?s.width:l,r=c?l:s.height}var d=s.eventReceiver,g=function(t,e){return Xa(t)?t(e):t};d.coords.splice(d.data.length),d.data.forEach((function(i,a){d.coords[a]={x:g(t,i),y:g(e,i),w:g(n,i),h:g(r,i)}}))},selectRectForMultipleXs:function(t){var e=this,n=e.config,r=e.state,i=e.filterTargetsToShow(e.data.targets);if(!r.dragging&&!e.hasArcType(i)){var a=oo(r.event,t),o=e.findClosestFromTargets(i,a);if(r.mouseover&&(!o||o.id!==r.mouseover.id)&&(n.data_onout.call(e.api,r.mouseover),r.mouseover=void 0),!o)return void e.unselectRect();var s=(e.isBubbleType(o)||e.isScatterType(o)||!n.tooltip_grouped?[o]:e.filterByX(i,o.x)).map((function(t){return e.addName(t)}));e.showTooltip(s,t),e.setExpand(o.index,o.id,!0),e.showGridFocus(s),(e.isBarType(o.id)||e.dist(o,a)<n.point_sensitivity)&&(e.$el.svg.select("."+In.eventRect).style("cursor","pointer"),!r.mouseover&&(n.data_onover.call(e.api,o),r.mouseover=o))}},unselectRect:function(){var t=this,e=t.config,n=t.$el,r=n.circle,i=n.tooltip;t.$el.svg.select("."+In.eventRect).style("cursor",null),t.hideGridFocus(),i&&(t.hideTooltip(),t._handleLinkedCharts(!1)),r&&!e.point_focus_only&&t.unexpandCircles(),t.expandBarTypeShapes(!1)},generateEventRectsForSingleX:function(t){var e=this,n=e.config,r=e.state,i=r.eventReceiver,a=t.style("cursor",n.data_selection_enabled&&n.data_selection_grouped?"pointer":null).on("click",(function(t){r.event=t;var n=i,a=n.currentIdx,o=n.data[-1===a?e.getDataIndexFromEvent(t):a];e.clickHandlerForSingleX.bind(this)(o,e)}));if("mouse"===r.inputType){a.on("mouseover",(function(t){r.event=t,e.updateEventRect()})).on("mousemove",(function(t){var o=function(t){var n=t?e.getDataIndexFromEvent(t):i.currentIdx;return n>-1?i.data[n]:null}(t);if(r.event=t,!(r.dragging||r.flowing||e.hasArcType()||!o||n.tooltip_grouped&&o&&o.index===i.currentIdx)){var s=o.index;e.isStepType(o)&&"step-after"===n.line_step_type&&oo(t,this)[0]<e.scale.x(e.getXValue(o.id,s))&&(s-=1),s!==i.currentIdx&&(e.setOverOut(!1,i.currentIdx),i.currentIdx=s),-1===s?e.unselectRect():e.selectRectForSingle(this,a,s),e.setOverOut(-1!==s,s)}})).on("mouseout",(function(t){r.event=t,!n||e.hasArcType()||-1===i.currentIdx||(e.unselectRect(),e.setOverOut(!1,i.currentIdx),i.currentIdx=-1)}))}return a},clickHandlerForSingleX:function(t,e){var n=e,r=n.config,i=n.state,a=n.$el.main;if(!t||n.hasArcType()||i.cancelClick)i.cancelClick&&(i.cancelClick=!1);else{var o=t.index;a.selectAll("."+In.shape+"-"+o).each((function(t){(r.data_selection_grouped||n.isWithinShape(this,t))&&(n.toggleShape&&n.toggleShape(this,t,o),r.data_onclick.bind(n.api)(t,this))}))}},generateEventRectsForMultipleXs:function(t){var e=this,n=e.state;t.on("click",(function(t){n.event=t,e.clickHandlerForMultipleXS.bind(this)(e)})),"mouse"===n.inputType&&t.on("mouseover mousemove",(function(t){n.event=t,e.selectRectForMultipleXs(this)})).on("mouseout",(function(t){n.event=t,!e.config||e.hasArcType()||e.unselectRect()}))},clickHandlerForMultipleXS:function(t){var e=t,n=e.config,r=e.state,i=e.filterTargetsToShow(e.data.targets);if(!e.hasArcType(i)){var a=oo(r.event,this),o=e.findClosestFromTargets(i,a);!o||(e.isBarType(o.id)||e.dist(o,a)<n.point_sensitivity)&&e.$el.main.selectAll("."+In.shapes+e.getTargetSelectorSuffix(o.id)).selectAll("."+In.shape+"-"+o.index).each((function(){(n.data_selection_grouped||e.isWithinShape(this,o))&&(e.toggleShape&&e.toggleShape(this,o,o.index),n.data_onclick.bind(e.api)(o,this))}))}}},Ql=function(t){return+t},tf={generateFlow:function(t){var e=this,n=e.data,r=e.state,i=e.$el;return function(){var a=t.flow.length;r.flowing=!0,n.targets.forEach((function(t){t.values.splice(0,a)})),e.updateXGrid&&e.updateXGrid(!0);var o={};["axis.x","grid.x","gridLines.x","region.list","text","bar","line","area","circle"].forEach((function(t){var e=t.split("."),n=i[e[0]];n&&e.length>1&&(n=n[e[1]]),n&&n.size()&&(o[t]=n)})),e.hideGridFocus(),e.setFlowList(o,t)}},setFlowList:function(t,e){var n,r=this,i=e.flow,a=e.targets,o=i,s=o.duration,u=void 0===s?e.duration:s,c=o.index,l=o.length,f=o.orgDataCount,h=r.getFlowTransform(a,f,c,l),d=Uo();d.add(Object.keys(t).map((function(e){return n=t[e].transition().ease(Ql).duration(u),n="axis.x"===e?n.call((function(t){r.axis.x.setTransition(t).create(t)})):"region.list"===e?n.filter(r.isRegionOnX).attr("transform",h):n.attr("transform",h)}))),n.call(d,(function(){r.cleanUpFlow(t,e)}))},cleanUpFlow:function(t,e){var n=this,r=n.config,i=n.state,a=n.$el.svg,o=r.axis_rotated,s=e.flow,u=e.shape,c=e.xv,l=u.pos,f=l.cx,h=l.cy,d=l.xForText,g=l.yForText,p=s,v=p.done,y=void 0===v?function(){}:v,x=p.length;x&&(["circle","text","shape","eventRect"].forEach((function(t){for(var e=[],n=0;n<x;n++)e.push("."+In[t]+"-"+n);a.selectAll("."+In[t+"s"]).selectAll(e).remove()})),a.select("."+In.xgrid).remove()),Object.keys(t).forEach((function(e){var a=t[e];if("axis.x"!==e&&a.attr("transform",null),"grid.x"===e)a.attr(i.xgridAttr);else if("gridLines.x"===e)a.attr("x1",o?0:c).attr("x2",o?i.width:c);else if("gridLines.x"===e)a.select("line").attr("x1",o?0:c).attr("x2",o?i.width:c),a.select("text").attr("x",o?i.width:0).attr("y",c);else if(/^(area|bar|line)$/.test(e))a.attr("d",u.type[e]);else if("text"===e)a.attr("x",d).attr("y",g).style("fill-opacity",n.opacityForText.bind(n));else if("circle"!==e)"region.list"===e&&a.select("rect").filter(n.isRegionOnX).attr("x",n.regionX.bind(n)).attr("width",n.regionWidth.bind(n));else if(n.isCirclePoint())a.attr("cx",f).attr("cy",h);else{a.attr("x",(function(t){return f(t)-r.point_r})).attr("y",(function(t){return h(t)-r.point_r})).attr("cx",f).attr("cy",h)}})),r.interaction_enabled&&n.redrawEventRect(),y.call(n.api),i.flowing=!1},getFlowTransform:function(t,e,n,r){var i,a=this,o=a.data,s=a.scale.x,u=o.targets[0].values,c=a.getValueOnIndex(u,n),l=a.getValueOnIndex(u,n+r),f=s.domain(),h=a.updateXDomain(t,!0,!0);return e?i=1===e||(c&&c.x)===(l&&l.x)||a.axis.isTimeSeries()?s(f[0])-s(h[0]):s(c.x)-s(l.x):1===u.length?a.axis.isTimeSeries()?(c=a.getValueOnIndex(u,0),l=a.getValueOnIndex(u,u.length-1),i=s(c.x)-s(l.x)):i=Wa(h)/2:i=s(f[0])-s(h[0]),"translate("+i+",0) scale("+Wa(f)/Wa(h)+",1)"}},ef={initClip:function(){var t=this,e=t.state.clip;e.id=t.state.datetimeId+"-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:function(t){var e=this.config;return!e.clipPath&&/-clip$/.test(t)||!e.axis_x_clipPath&&/-clip-xaxis$/.test(t)||!e.axis_y_clipPath&&/-clip-yaxis$/.test(t)?null:"url("+(!!Pa.navigator&&Pa.navigator.appVersion.toLowerCase().indexOf("msie 9.")>=0?"":za.URL.split("#")[0])+"#"+t+")"},appendClip:function(t,e){e&&t.append("clipPath").attr("id",e).append("rect")},setXAxisClipPath:function(t){var e=this.config,n=this.state,r=n.margin,i=n.width,a=n.height,o=e.axis_rotated,s=Math.max(30,r.left)-(o?0:20),u=o?-(1+s):-(s-1),c=-Math.max(15,r.top),l=o?r.left+20:i+10+s,f=(o?r.top+a+10:r.bottom)+20;t.attr("x",u).attr("y",c).attr("width",l).attr("height",f)},setYAxisClipPath:function(t){var e=this.config,n=this.state,r=n.margin,i=n.width,a=n.height,o=e.axis_rotated,s=Math.max(30,r.left)-(o?20:0),u=e.axis_y_inner,c=u?-1:o?-(1+s):-(s-1),l=-(o?20:r.top),f=(o?i+15+s:r.left+20)+(u?20:0),h=(o?r.bottom:r.top+a)+10;t.attr("x",c).attr("y",l).attr("width",f).attr("height",h)},updateXAxisTickClip:function(){var t=this,e=t.config,n=t.state,r=n.clip,i=n.xAxisHeight,a=t.$el.defs,o=t.getHorizontalAxisHeight("x");if(a&&!r.idXAxisTickTexts){var s=r.id+"-xaxisticktexts";t.appendClip(a,s),r.pathXAxisTickTexts=t.getClipPath(r.idXAxisTickTexts),r.idXAxisTickTexts=s}!e.axis_x_tick_multiline&&t.getAxisTickRotate("x")&&o!==i&&(t.setXAxisTickClipWidth(),t.setXAxisTickTextClipPathWidth()),t.state.xAxisHeight=o},setXAxisTickClipWidth:function(){var t=this,e=t.config,n=t.state.current.maxTickWidths,r=t.getAxisTickRotate("x");if(!e.axis_x_tick_multiline&&r){var i=Math.sin(Math.PI/180*Math.abs(r));n.x.clipPath=(t.getHorizontalAxisHeight("x")-20)/i}else n.x.clipPath=null},setXAxisTickTextClipPathWidth:function(){var t=this.state,e=t.clip,n=t.current,r=this.$el.svg;r&&r.select("#"+e.idXAxisTickTexts+" rect").attr("width",n.maxTickWidths.x.clipPath).attr("height",30)}},nf=function(t){return ja(t.position)||"end"},rf=function(t){return"start"===t.position?4:"middle"===t.position?0:-4};function af(t,e,n){return function(r){var i=t?0:e;return"start"===r.position?i=t?-n:0:"middle"===r.position&&(i=(t?-n:e)/2),i}}function of(t,e){"grid"===e&&t.each((function(){var t=Ln(this);["x1","x2","y1","y2"].forEach((function(e){return t.attr(e,Math.ceil(+t.attr(e)))}))}))}var sf={hasGrid:function(){var t=this.config;return["x","y"].some((function(e){return t["grid_"+e+"_show"]||t["grid_"+e+"_lines"].length}))},initGrid:function(){var t=this;t.hasGrid()&&t.initGridLines(),t.initFocusGrid()},initGridLines:function(){var t=this,e=t.config,n=t.state.clip,r=t.$el;(e.grid_x_lines.length||e.grid_y_lines.length)&&(r.gridLines.main=r.main.insert("g","."+In.chart+(e.grid_lines_front?" + *":"")).attr("clip-path",n.pathGrid).attr("class",In.grid+" "+In.gridLines),r.gridLines.main.append("g").attr("class",In.xgridLines),r.gridLines.main.append("g").attr("class",In.ygridLines),r.gridLines.x=ul([]))},updateXGrid:function(t){var e=this,n=e.config,r=e.scale,i=e.state,a=e.$el,o=a.main,s=a.grid,u=n.axis_rotated,c=e.generateGridData(n.grid_x_type,r.x),l=e.axis.isCategorized()?e.axis.x.tickOffset():0,f=function(t){return(r.zoom||r.x)(t)+l*(u?-1:1)};i.xgridAttr=u?{x1:0,x2:i.width,y1:f,y2:f}:{x1:f,x2:f,y1:0,y2:i.height},s.x=o.select("."+In.xgrids).selectAll("."+In.xgrid).data(c),s.x.exit().remove(),s.x=s.x.enter().append("line").attr("class",In.xgrid).merge(s.x),t||s.x.each((function(){var t=Ln(this);Object.keys(i.xgridAttr).forEach((function(e){t.attr(e,i.xgridAttr[e]).style("opacity",(function(){return t.attr(u?"y1":"x1")===(u?i.height:0)?"0":null}))}))}))},updateYGrid:function(){var t=this,e=t.config,n=t.state,r=t.$el,i=r.grid,a=r.main,o=e.axis_rotated,s=t.axis.y.tickValues()||t.scale.y.ticks(e.grid_y_ticks),u=function(e){return Math.ceil(t.scale.y(e))};i.y=a.select("."+In.ygrids).selectAll("."+In.ygrid).data(s),i.y.exit().remove(),i.y=i.y.enter().append("line").attr("class",In.ygrid).merge(i.y),i.y.attr("x1",o?u:0).attr("x2",o?u:n.width).attr("y1",o?0:u).attr("y2",o?n.height:u),of(i.y,"grid")},updateGrid:function(t){var e=this,n=e.$el,r=n.grid;n.gridLines.main||e.initGridLines(),r.main.style("visibility",e.hasArcType()?"hidden":null),e.hideGridFocus(),e.updateXGridLines(t),e.updateYGridLines(t)},updateXGridLines:function(t){var e=this,n=e.config,r=e.$el,i=r.gridLines,a=r.main,o=n.axis_rotated;n.grid_x_show&&e.updateXGrid();var s=a.select("."+In.xgridLines).selectAll("."+In.xgridLine).data(n.grid_x_lines);s.exit().transition().duration(t).style("opacity","0").remove();var u=s.enter().append("g");u.append("line").style("opacity","0"),u.append("text").attr("transform",o?"":"rotate(-90)").attr("dy",-5).style("opacity","0"),(s=u.merge(s)).attr("class",(function(t){return(In.xgridLine+" "+(t.class||"")).trim()})).select("text").attr("text-anchor",nf).attr("dx",rf).transition().duration(t).text((function(t){return t.text})).transition().style("opacity",null),i.x=s},updateYGridLines:function(t){var e=this,n=e.config,r=e.state,i=r.width,a=r.height,o=e.$el,s=n.axis_rotated;n.grid_y_show&&e.updateYGrid();var u=o.main.select("."+In.ygridLines).selectAll("."+In.ygridLine).data(n.grid_y_lines);u.exit().transition().duration(t).style("opacity","0").remove();var c=u.enter().append("g");c.append("line").style("opacity","0"),c.append("text").attr("transform",s?"rotate(-90)":"").style("opacity","0"),u=c.merge(u);var l=e.yv.bind(e);u.attr("class",(function(t){return(In.ygridLine+" "+(t.class||"")).trim()})).select("line").transition().duration(t).attr("x1",s?l:0).attr("x2",s?l:i).attr("y1",s?0:l).attr("y2",s?a:l).transition().style("opacity",null),u.select("text").attr("text-anchor",nf).attr("dx",rf).transition().duration(t).attr("dy",-5).attr("x",af(s,i,a)).attr("y",l).text((function(t){return t.text})).transition().style("opacity",null),o.gridLines.y=u},redrawGrid:function(t){var e=this,n=e.config.axis_rotated,r=e.state,i=r.width,a=r.height,o=e.$el.gridLines,s=e.xv.bind(e),u=o.x.select("line"),c=o.x.select("text");return u=(t?u.transition():u).attr("x1",n?0:s).attr("x2",n?i:s).attr("y1",n?s:0).attr("y2",n?s:a),c=(t?c.transition():c).attr("x",af(!n,i,a)).attr("y",s).text((function(t){return t.text})),[u.style("opacity",null),c.style("opacity",null)]},initFocusGrid:function(){var t=this,e=t.config,n=t.state.clip,r=t.$el,i=e.grid_front,a="."+In[i&&r.gridLines.main?"gridLines":"chart"]+(i?" + *":""),o=r.main.insert("g",a).attr("clip-path",n.pathGrid).attr("class",In.grid);r.grid.main=o,e.grid_x_show&&o.append("g").attr("class",In.xgrids),e.grid_y_show&&o.append("g").attr("class",In.ygrids),e.interaction_enabled&&e.grid_focus_show&&(o.append("g").attr("class",In.xgridFocus).append("line").attr("class",In.xgridFocus),e.grid_focus_y&&!e.tooltip_grouped&&o.append("g").attr("class",In.ygridFocus).append("line").attr("class",In.ygridFocus))},showGridFocus:function(t){var e=this,n=e.config,r=e.state,i=r.width,a=r.height,o=n.axis_rotated,s=e.$el.main.selectAll("line."+In.xgridFocus+", line."+In.ygridFocus),u=(t||[s.datum()]).filter((function(t){return t&&ja(e.getBaseValue(t))}));if(n.tooltip_show&&0!==u.length&&!e.hasType("bubble")&&!e.hasArcType()){var c=n.grid_focus_edge&&!n.tooltip_grouped,l=e.xx.bind(e);s.style("visibility",null).data(u.concat(u)).each((function(t){var n,r=Ln(this),s={x:l(t),y:e.getYScaleById(t.id)(t.value)};if(r.classed(In.xgridFocus))n=o?[null,s.x,c?s.y:i,s.x]:[s.x,c?s.y:null,s.x,a];else{var u="y2"===e.axis.getId(t.id);n=o?[s.y,c&&!u?s.x:null,s.y,c&&u?s.x:a]:[c&&u?s.x:null,s.y,c&&!u?s.x:i,s.y]}["x1","y1","x2","y2"].forEach((function(t,e){return r.attr(t,n[e])}))})),of(s,"grid"),e.showCircleFocus&&e.showCircleFocus(t)}},hideGridFocus:function(){var t=this,e=t.state,n=e.inputType,r=e.resizing,i=t.$el.main;"mouse"!==n&&r||(i.selectAll("line."+In.xgridFocus+", line."+In.ygridFocus).style("visibility","hidden"),t.hideCircleFocus&&t.hideCircleFocus())},updateGridFocus:function(){var t=this,e=t.state,n=e.inputType,r=e.width,i=e.height,a=e.resizing,o=t.$el.grid.main.select("line."+In.xgridFocus);if("touch"===n)o.empty()?a&&t.showCircleFocus():t.showGridFocus();else{var s=t.config.axis_rotated;o.attr("x1",s?0:-10).attr("x2",s?r:-10).attr("y1",s?-10:0).attr("y2",s?-10:i)}return!0},generateGridData:function(t,e){var n=this.$el.main.select("."+In.axisX).selectAll(".tick").size(),r=[];if("year"===t)for(var i=this.getXDomain(),a=i[0].getFullYear(),o=i[1].getFullYear(),s=a;s<=o;s++)r.push(new Date(s+"-01-01 00:00:00"));else(r=e.ticks(10)).length>n&&(r=r.filter((function(t){return(t+"").indexOf(".")<0})));return r},getGridFilterToRemove:function(t){return t?function(e){var n=!1;return(Ja(t)?t.concat():[t]).forEach((function(t){("value"in t&&e.value===t.value||"class"in t&&e.class===t.class)&&(n=!0)})),n}:function(){return!0}},removeGridLines:function(t,e){var n=this,r=n.config,i=n.getGridFilterToRemove(t),a=e?In.xgridLines:In.ygridLines,o=e?In.xgridLine:In.ygridLine;n.$el.main.select("."+a).selectAll("."+o).filter(i).transition().duration(r.transition_duration).style("opacity","0").remove();var s="grid_"+(e?"x":"y")+"_lines";r[s]=r[s].filter((function(t){return!i(t)}))}},uf={initRegion:function(){var t=this.$el;t.region.main=t.main.insert("g",":first-child").attr("clip-path",this.state.clip.path).attr("class",In.regions)},updateRegion:function(t){var e=this,n=e.config,r=e.$el.region;r.main||e.initRegion(),r.main.style("visibility",e.hasArcType()?"hidden":null);var i=r.main.selectAll("."+In.region).data(n.regions);i.exit().transition().duration(t).style("opacity","0").remove(),(i=i.enter().append("g").merge(i).attr("class",e.classRegion.bind(e))).append("rect").style("fill-opacity","0"),r.list=i},redrawRegion:function(t){var e=this,n=e.$el.region.list.select("rect");return n=(t?n.transition():n).attr("x",e.regionX.bind(e)).attr("y",e.regionY.bind(e)).attr("width",e.regionWidth.bind(e)).attr("height",e.regionHeight.bind(e)),[(t?n.transition():n).style("fill-opacity",(function(t){return ja(t.opacity)?t.opacity:null})).on("end",(function(){Ln(this.parentNode).selectAll("rect:not([x])").remove()}))]},getRegionXY:function(t,e){var n=this,r=n.config,i=n.scale,a=r.axis_rotated,o="x"===t,s="start",u=0;return"y"===e.axis||"y2"===e.axis?(!o&&(s="end"),(o?a:!a)&&s in e&&(u=(0,i[e.axis])(e[s]))):(o?!a:a)&&s in e&&(u=(i.zoom||i.x)(n.axis.isTimeSeries()?So.call(n,e[s]):e[s])),u},regionX:function(t){return this.getRegionXY("x",t)},regionY:function(t){return this.getRegionXY("y",t)},getRegionSize:function(t,e){var n=this,r=n.config,i=n.scale,a=n.state,o=r.axis_rotated,s="width"===t,u=n[s?"regionX":"regionY"](e),c="end",l=a[t];return"y"===e.axis||"y2"===e.axis?(!s&&(c="start"),(s?o:!o)&&c in e&&(l=(0,i[e.axis])(e[c]))):(s?!o:o)&&c in e&&(l=(i.zoom||i.x)(n.axis.isTimeSeries()?So.call(n,e[c]):e[c])),l<u?0:l-u},regionWidth:function(t){return this.getRegionSize("width",t)},regionHeight:function(t){return this.getRegionSize("height",t)},isRegionOnX:function(t){return!t.axis||"x"===t.axis}},cf={getAxisSize:function(t){var e=this,n=e.config.axis_rotated;return n&&"x"===t||!n&&/y2?/.test(t)?e.getAxisWidthByAxisId(t,!0):e.getHorizontalAxisHeight(t)},getAxisWidthByAxisId:function(t,e){var n=this;if(n.axis){var r=n.axis&&n.axis.getLabelPositionById(t);return n.axis.getMaxTickWidth(t,e)+(r.isInner?20:40)}return 40},getHorizontalAxisHeight:function(t){var e=this,n=e.config,r=e.state,i=r.current,a=r.rotatedPadding,o=r.isLegendRight,s=r.isLegendInset,u=n.axis_rotated,c=30;if("x"===t&&!n.axis_x_show)return 8;if("x"===t&&n.axis_x_height)return n.axis_x_height;if("y"===t&&!n.axis_y_show)return!n.legend_show||o||s?1:10;if("y2"===t&&!n.axis_y2_show)return a.top;var l=e.getAxisTickRotate(t);return("x"===t&&!u||/y2?/.test(t)&&u)&&l&&(c=30+e.axis.getMaxTickWidth(t)*Math.cos(Math.PI*(90-Math.abs(l))/180),!n.axis_x_tick_multiline&&i.height&&c>i.height/2&&(c=i.height/2)),c+(e.axis.getLabelPositionById(t).isInner?0:10)+("y2"!==t||u?0:-10)},getEventRectWidth:function(){return Math.max(0,this.axis.x.tickInterval())},getAxisTickRotate:function(t){var e=this,n=e.axis,r=e.config,i=e.state,a=e.$el,o=r["axis_"+t+"_tick_rotate"];if("x"===t){var s=n.isCategorized()||n.isTimeSeries();if(r.axis_x_tick_fit&&s){var u=r.axis_x_tick_count,c=i.current.maxTickWidths.x.ticks.length,l=0;u?l=u>c?c:u:c&&(l=c),l!==i.axis.x.tickCount&&(i.axis.x.padding=e.axis.getXAxisPadding(l)),i.axis.x.tickCount=l}a.svg&&r.axis_x_tick_fit&&!r.axis_x_tick_multiline&&!r.axis_x_tick_culling&&r.axis_x_tick_autorotate&&s&&(o=e.needToRotateXAxisTickTexts()?r.axis_x_tick_rotate:0)}return o},needToRotateXAxisTickTexts:function(){var t=this,e=t.state,n=e.axis,r=e.current.width-t.getCurrentPaddingLeft(!1)-t.getCurrentPaddingRight(),i=n.x.tickCount+n.x.padding.left+n.x.padding.right;return t.axis.getMaxTickWidth("x")>(i?r/i:0)}},lf={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_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:[]},ff={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_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:[]};function hf(t,e){var n=Object.keys(t);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(t);e&&(r=r.filter((function(e){return Object.getOwnPropertyDescriptor(t,e).enumerable}))),n.push.apply(n,r)}return n}function df(t){for(var e,n=1;n<arguments.length;n++)e=null==arguments[n]?{}:arguments[n],n%2?hf(Object(e),!0).forEach((function(n){zn(t,n,e[n])})):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(e)):hf(Object(e)).forEach((function(n){Object.defineProperty(t,n,Object.getOwnPropertyDescriptor(e,n))}));return t}var gf=df(df(df({axis_rotated:!1},{axis_x_clipPath:!0,axis_x_show:!0,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_count:void 0,axis_x_tick_show:!0,axis_x_tick_text_show:!0,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_padding:{},axis_x_height:void 0,axis_x_extent:void 0,axis_x_label:{},axis_x_axes:[]}),lf),ff),pf=[Sl,{category:function(t,e){var n=this.internal,r=n.config;return arguments.length>1&&(r.axis_x_categories[t]=e,n.redraw()),r.axis_x_categories[t]},categories:function(t){var e=this.internal,n=e.config;return arguments.length?(n.axis_x_categories=t,e.redraw(),n.axis_x_categories):n.axis_x_categories}},El,Cl,Dl,Ol,Ll,Il],vf=[Zl,ef,Jl,tf,sf,uf,cf],yf=[{data_xs:{},data_xFormat:"%Y-%m-%d",data_xLocaltime:!0,data_xSort:!0,data_axes:{},data_regions:{},data_stack_normalize:!1},gf,{grid_x_show:!1,grid_x_type:"tick",grid_x_lines:[],grid_y_show:!1,grid_y_lines:[],grid_y_ticks:10,grid_focus_edge:!1,grid_focus_show:!0,grid_focus_y:!1,grid_front:!1,grid_lines_front:!0}];Array.prototype.slice;function xf(t){return"object"==typeof t&&"length"in t?t:Array.from(t)}function _f(t){return function(){return t}}function mf(t,e){return e<t?-1:e>t?1:e>=t?0:NaN}function bf(t){return t}var wf=Math.PI,Tf=2*wf,Af=1e-6,Sf=Tf-Af;function kf(){this._x0=this._y0=this._x1=this._y1=null,this._=""}function Ef(){return new kf}kf.prototype=Ef.prototype={constructor:kf,moveTo:function(t,e){this._+="M"+(this._x0=this._x1=+t)+","+(this._y0=this._y1=+e)},closePath:function(){null!==this._x1&&(this._x1=this._x0,this._y1=this._y0,this._+="Z")},lineTo:function(t,e){this._+="L"+(this._x1=+t)+","+(this._y1=+e)},quadraticCurveTo:function(t,e,n,r){this._+="Q"+ +t+","+ +e+","+(this._x1=+n)+","+(this._y1=+r)},bezierCurveTo:function(t,e,n,r,i,a){this._+="C"+ +t+","+ +e+","+ +n+","+ +r+","+(this._x1=+i)+","+(this._y1=+a)},arcTo:function(t,e,n,r,i){t=+t,e=+e,n=+n,r=+r,i=+i;var a=this._x1,o=this._y1,s=n-t,u=r-e,c=a-t,l=o-e,f=c*c+l*l;if(i<0)throw new Error("negative radius: "+i);if(null===this._x1)this._+="M"+(this._x1=t)+","+(this._y1=e);else if(f>Af)if(Math.abs(l*s-u*c)>Af&&i){var h=n-a,d=r-o,g=s*s+u*u,p=Math.sqrt(g),v=Math.sqrt(f),y=i*Math.tan((wf-Math.acos((g+f-(h*h+d*d))/(2*p*v)))/2),x=y/v,_=y/p;Math.abs(x-1)>Af&&(this._+="L"+(t+x*c)+","+(e+x*l)),this._+="A"+i+","+i+",0,0,"+ +(l*h>c*d)+","+(this._x1=t+_*s)+","+(this._y1=e+_*u)}else this._+="L"+(this._x1=t)+","+(this._y1=e);else;},arc:function(t,e,n,r,i,a){t=+t,e=+e,a=!!a;var o=(n=+n)*Math.cos(r),s=n*Math.sin(r),u=t+o,c=e+s,l=1^a,f=a?r-i:i-r;if(n<0)throw new Error("negative radius: "+n);null===this._x1?this._+="M"+u+","+c:(Math.abs(this._x1-u)>Af||Math.abs(this._y1-c)>Af)&&(this._+="L"+u+","+c),n&&(f<0&&(f=f%Tf+Tf),f>Sf?this._+="A"+n+","+n+",0,1,"+l+","+(t-o)+","+(e-s)+"A"+n+","+n+",0,1,"+l+","+(this._x1=u)+","+(this._y1=c):f>Af&&(this._+="A"+n+","+n+",0,"+ +(f>=wf)+","+l+","+(this._x1=t+n*Math.cos(i))+","+(this._y1=e+n*Math.sin(i))))},rect:function(t,e,n,r){this._+="M"+(this._x0=this._x1=+t)+","+(this._y0=this._y1=+e)+"h"+ +n+"v"+ +r+"h"+-n+"Z"},toString:function(){return this._}};var Mf=Ef;function Cf(t){return t.innerRadius}function Of(t){return t.outerRadius}function Rf(t){return t.startAngle}function Lf(t){return t.endAngle}function If(t){return t&&t.padAngle}function Df(t,e,n,r,i,a,o,s){var u=n-t,c=r-e,l=o-i,f=s-a,h=f*u-l*c;if(!(h*h<Ec))return[t+(h=(l*(e-a)-f*(t-i))/h)*u,e+h*c]}function Pf(t,e,n,r,i,a,o){var s=t-n,u=e-r,c=(o?a:-a)/kc(s*s+u*u),l=c*u,f=-c*s,h=t+l,d=e+f,g=n+l,p=r+f,v=(h+g)/2,y=(d+p)/2,x=g-h,_=p-d,m=x*x+_*_,b=i-a,w=h*p-g*d,T=(_<0?-1:1)*kc(Tc(0,b*b*m-w*w)),A=(w*_-x*T)/m,S=(-w*x-_*T)/m,k=(w*_+x*T)/m,E=(-w*x+_*T)/m,M=A-v,C=S-y,O=k-v,R=E-y;return M*M+C*C>O*O+R*R&&(A=k,S=E),{cx:A,cy:S,x01:-l,y01:-f,x11:A*(i/b-1),y11:S*(i/b-1)}}function zf(){function t(){var t,c,l=+e.apply(this,arguments),f=+n.apply(this,arguments),h=a.apply(this,arguments)-Cc,d=o.apply(this,arguments)-Cc,g=mc(d-h),p=d>h;if(u||(u=t=Mf()),f<l&&(c=f,f=l,l=c),f>Ec)if(g>Oc-Ec)u.moveTo(f*wc(h),f*Sc(h)),u.arc(0,0,f,h,d,!p),l>Ec&&(u.moveTo(l*wc(d),l*Sc(d)),u.arc(0,0,l,d,h,p));else{var v,y,x=h,_=d,m=h,b=d,w=g,T=g,A=s.apply(this,arguments)/2,S=A>Ec&&(i?+i.apply(this,arguments):kc(l*l+f*f)),k=Ac(mc(f-l)/2,+r.apply(this,arguments)),E=k,M=k;if(S>Ec){var C=Lc(S/l*Sc(A)),O=Lc(S/f*Sc(A));(w-=2*C)>Ec?(m+=C*=p?1:-1,b-=C):(w=0,m=b=(h+d)/2),(T-=2*O)>Ec?(x+=O*=p?1:-1,_-=O):(T=0,x=_=(h+d)/2)}var R=f*wc(x),L=f*Sc(x),I=l*wc(b),D=l*Sc(b);if(k>Ec){var P,z=f*wc(_),F=f*Sc(_),N=l*wc(m),j=l*Sc(m);if(g<Mc&&(P=Df(R,L,N,j,z,F,I,D))){var X=R-P[0],B=L-P[1],$=z-P[0],U=F-P[1],Y=1/Sc(Rc((X*$+B*U)/(kc(X*X+B*B)*kc($*$+U*U)))/2),V=kc(P[0]*P[0]+P[1]*P[1]);E=Ac(k,(l-V)/(Y-1)),M=Ac(k,(f-V)/(Y+1))}}T>Ec?M>Ec?(v=Pf(N,j,R,L,f,M,p),y=Pf(z,F,I,D,f,M,p),u.moveTo(v.cx+v.x01,v.cy+v.y01),M<k?u.arc(v.cx,v.cy,M,bc(v.y01,v.x01),bc(y.y01,y.x01),!p):(u.arc(v.cx,v.cy,M,bc(v.y01,v.x01),bc(v.y11,v.x11),!p),u.arc(0,0,f,bc(v.cy+v.y11,v.cx+v.x11),bc(y.cy+y.y11,y.cx+y.x11),!p),u.arc(y.cx,y.cy,M,bc(y.y11,y.x11),bc(y.y01,y.x01),!p))):(u.moveTo(R,L),u.arc(0,0,f,x,_,!p)):u.moveTo(R,L),l>Ec&&w>Ec?E>Ec?(v=Pf(I,D,z,F,l,-E,p),y=Pf(R,L,N,j,l,-E,p),u.lineTo(v.cx+v.x01,v.cy+v.y01),E<k?u.arc(v.cx,v.cy,E,bc(v.y01,v.x01),bc(y.y01,y.x01),!p):(u.arc(v.cx,v.cy,E,bc(v.y01,v.x01),bc(v.y11,v.x11),!p),u.arc(0,0,l,bc(v.cy+v.y11,v.cx+v.x11),bc(y.cy+y.y11,y.cx+y.x11),p),u.arc(y.cx,y.cy,E,bc(y.y11,y.x11),bc(y.y01,y.x01),!p))):u.arc(0,0,l,b,m,p):u.lineTo(I,D)}else u.moveTo(0,0);return u.closePath(),t?(u=null,t+""||null):void 0}var e=Cf,n=Of,r=_f(0),i=null,a=Rf,o=Lf,s=If,u=null;return t.centroid=function(){var t=(+e.apply(this,arguments)+ +n.apply(this,arguments))/2,r=(+a.apply(this,arguments)+ +o.apply(this,arguments))/2-Mc/2;return[wc(r)*t,Sc(r)*t]},t.innerRadius=function(n){return arguments.length?(e="function"==typeof n?n:_f(+n),t):e},t.outerRadius=function(e){return arguments.length?(n="function"==typeof e?e:_f(+e),t):n},t.cornerRadius=function(e){return arguments.length?(r="function"==typeof e?e:_f(+e),t):r},t.padRadius=function(e){return arguments.length?(i=null==e?null:"function"==typeof e?e:_f(+e),t):i},t.startAngle=function(e){return arguments.length?(a="function"==typeof e?e:_f(+e),t):a},t.endAngle=function(e){return arguments.length?(o="function"==typeof e?e:_f(+e),t):o},t.padAngle=function(e){return arguments.length?(s="function"==typeof e?e:_f(+e),t):s},t.context=function(e){return arguments.length?(u=null==e?null:e,t):u},t}var Ff={initPie:function(){var t=this,e=t.config,n=e.data_type,r=e.pie_padding,i=e[n+"_startingAngle"]||0,a=(t.hasType("pie")&&r?.01*r:e[n+"_padAngle"])||0;t.pie=function(){function t(t){var s,u,c,l,f,h=(t=xf(t)).length,d=0,g=Array(h),p=Array(h),v=+i.apply(this,arguments),y=Math.min(Oc,Math.max(-Oc,a.apply(this,arguments)-v)),x=Math.min(Math.abs(y)/h,o.apply(this,arguments)),_=x*(y<0?-1:1);for(s=0;s<h;++s)(f=p[g[s]=s]=+e(t[s],s,t))>0&&(d+=f);for(null==n?null!=r&&g.sort((function(e,n){return r(t[e],t[n])})):g.sort((function(t,e){return n(p[t],p[e])})),s=0,c=d?(y-h*_)/d:0;s<h;++s,v=l)u=g[s],l=v+((f=p[u])>0?f*c:0)+_,p[u]={data:t[u],index:s,value:f,startAngle:v,endAngle:l,padAngle:x};return p}var e=bf,n=mf,r=null,i=_f(0),a=_f(Oc),o=_f(0);return t.value=function(n){return arguments.length?(e="function"==typeof n?n:_f(+n),t):e},t.sortValues=function(e){return arguments.length?(n=e,r=null,t):n},t.sort=function(e){return arguments.length?(r=e,n=null,t):r},t.startAngle=function(e){return arguments.length?(i="function"==typeof e?e:_f(+e),t):i},t.endAngle=function(e){return arguments.length?(a="function"==typeof e?e:_f(+e),t):a},t.padAngle=function(e){return arguments.length?(o="function"==typeof e?e:_f(+e),t):o},t}().startAngle(i).endAngle(i+2*Math.PI).padAngle(a).value((function(t){return t.values.reduce((function(t,e){return t+e.value}),0)})).sort(t.getSortCompareFn.bind(t)(!0))},updateRadius:function(){var t=this,e=t.config,n=t.state,r=e.pie_padding,i=e.gauge_width||e.donut_width,a=t.filterTargetsToShow(t.data.targets).length*e.gauge_arcs_minWidth;n.radiusExpanded=Math.min(n.arcWidth,n.arcHeight)/2*(t.hasMultiArcGauge()?.85:1),n.radius=.95*n.radiusExpanded,n.innerRadiusRatio=i?(n.radius-i)/n.radius:.6,n.gaugeArcWidth=i||(a<=n.radius-n.innerRadius?n.radius-n.innerRadius:a<=n.radius?a:n.radius);var o=e.pie_innerRadius||(r?r*(n.innerRadiusRatio+.1):0);n.outerRadius=e.pie_outerRadius,n.innerRadius=t.hasType("donut")||t.hasType("gauge")?n.radius*n.innerRadiusRatio:o},getRadius:function(t){var e=t&&t.data,n=this.state,r=n.innerRadius,i=n.outerRadius;return!$a(r)&&e&&(r=r[e.id]||0),Qa(i)&&e&&e.id in i?i=i[e.id]:!$a(i)&&(i=this.state.radius),{innerRadius:r,outerRadius:i}},updateArc:function(){var t=this;t.updateRadius(),t.svgArc=t.getSvgArc(),t.svgArcExpanded=t.getSvgArcExpanded()},getArcLength:function(){var t=3.6*this.config.gauge_arcLength,e=t/360*2;return t<-360?e=-2:t>360&&(e=2),e*Math.PI},getStartAngle:function(){var t=this.config,e=t.gauge_fullCircle,n=-1*Math.PI/2,r=Math.PI/2,i=t.gauge_startingAngle;return!e&&i<=n?i=n:!e&&i>=r?i=r:(i>Math.PI||i<-1*Math.PI)&&(i=Math.PI),i},updateAngle:function(t){var e=this,n=e.config,r=e.state,i=e.pie,a=t,o=!1;if(!n)return null;var s=e.getStartAngle(),u=n.gauge_fullCircle?e.getArcLength():-2*s;if(a.data&&e.isGaugeType(a.data)&&!e.hasMultiArcGauge()){var c=n,l=c.gauge_min,f=c.gauge_max,h=e.getTotalDataSum(r.rendered);i=i.startAngle(s).endAngle(u*((h-l)/(f-l))+s)}if(i(e.filterTargetsToShow()).forEach((function(t,e){o||t.data.id!==a.data.id||(o=!0,(a=t).index=e)})),isNaN(a.startAngle)&&(a.startAngle=0),isNaN(a.endAngle)&&(a.endAngle=a.startAngle),a.data&&e.hasMultiArcGauge()){var d=n.gauge_min,g=n.gauge_max,p=a.value<d?0:a.value<g?a.value-d:g-d;a.startAngle=s,a.endAngle=s+u/(g-d)*p}return o?a:null},getSvgArc:function(){var t=this,e=t.state,n=e.gaugeArcWidth/t.filterTargetsToShow(t.data.targets).length,r=t.hasMultiArcGauge(),i=zf().innerRadius((function(i){var a=t.getRadius(i).innerRadius;return r?e.radius-n*(i.index+1):$a(a)?a:0})).outerRadius((function(i){var a=t.getRadius(i).outerRadius;return r?e.radius-n*i.index:a})),a=function(e,n){var r="M 0 0";if(e.value||e.data){var a=!n&&t.updateAngle(e);n?r=i(e):a&&(r=i(a))}return r};return a.centroid=i.centroid,a},getSvgArcExpanded:function(t){var e=this,n=e.state,r=t||1,i=n.gaugeArcWidth/e.filterTargetsToShow(e.data.targets).length,a=e.hasMultiArcGauge(),o=Math.min(n.radiusExpanded*r-n.radius,.8*i-100*(1-r)),s=zf().innerRadius((function(t){return a?n.radius-i*(t.index+1):e.getRadius(t).innerRadius})).outerRadius((function(t){var s;if(a)s=n.radius-i*t.index+o;else{var u=e.getRadius(t).outerRadius,c=n.radiusExpanded;n.radius!==u&&(c-=Math.abs(n.radius-u)),s=c*r}return s}));return function(t){var n=e.updateAngle(t);return n?s(n):"M 0 0"}},getArc:function(t,e,n){return n||this.isArcType(t.data)?this.svgArc(t,e):"M 0 0"},transformForArcLabel:function(t){var e=this,n=e.config,r=e.state.radiusExpanded,i=e.updateAngle(t),a="";if(i)if(e.hasMultiArcGauge()){var o=Math.sin(i.endAngle-Math.PI/2);a="translate("+(c=Math.cos(i.endAngle-Math.PI/2)*(r+25))+","+(l=o*(r+15-Math.abs(10*o))+3)+")"}else if(!e.hasType("gauge")||e.data.targets.length>1){var s=e.getRadius(t).outerRadius,u=this.svgArc.centroid(i),c=isNaN(u[0])?0:u[0],l=isNaN(u[1])?0:u[1],f=Math.sqrt(c*c+l*l),h=e.hasType("donut")&&n.donut_label_ratio||e.hasType("pie")&&n.pie_label_ratio;a="translate("+c*(h=h?Xa(h)?h.bind(e.api)(t,s,f):h:s&&(f?(36/s>.375?1.175-36/s:.8)*s/f:0))+","+l*h+")"}return a},convertToArcData:function(t){return this.addName({id:t.data?t.data.id:t.id,value:t.value,ratio:this.getRatio("arc",t),index:t.index})},textForArcLabel:function(t){var e=this,n=e.hasType("gauge");e.shouldShowArcLabel()&&t.style("fill",e.updateTextColor.bind(e)).attr("filter",e.updateTextBacgroundColor.bind(e)).each((function(t){var r=Ln(this),i=e.updateAngle(t),a=e.getRatio("arc",i);if(e.meetsLabelThreshold(a,(e.hasType("donut")?"donut":e.hasType("gauge")&&"gauge")||e.hasType("pie")&&"pie")){var o=(i||t).value;io(r,(e.getArcLabelFormat()||e.defaultArcValueFormat)(o,a,t.data.id).toString(),[-1,1],n)}else r.text("")}))},expandArc:function(t){var e=this,n=e.state.transiting,r=e.$el;if(n)var i=setInterval((function(){n||(clearInterval(i),r.legend.selectAll("."+In.legendItemFocused).size()>0&&e.expandArc(t))}),10);else{var a=e.mapToTargetIds(t);r.svg.selectAll(e.selectorTargets(a,"."+In.chartArc)).each((function(t){if(e.shouldExpand(t.data.id)){var n=e.getExpandConfig(t.data.id,"duration"),r=e.getSvgArcExpanded(e.getExpandConfig(t.data.id,"rate"));Ln(this).selectAll("path").transition().duration(n).attr("d",e.svgArcExpanded).transition().duration(2*n).attr("d",r)}}))}},unexpandArc:function(t){var e=this,n=e.state.transiting,r=e.$el.svg;if(!n){var i=e.mapToTargetIds(t);r.selectAll(e.selectorTargets(i,"."+In.chartArc)).selectAll("path").transition().duration((function(t){return e.getExpandConfig(t.data.id,"duration")})).attr("d",e.svgArc),r.selectAll(""+In.arc).style("opacity",null)}},getExpandConfig:function(t,e){var n,r=this,i=r.config;return r.isDonutType(t)?n="donut":r.isGaugeType(t)?n="gauge":r.isPieType(t)&&(n="pie"),n?i[n+"_expand_"+e]:{duration:50,rate:.98}[e]},shouldExpand:function(t){var e=this,n=e.config;return e.isDonutType(t)&&n.donut_expand||e.isGaugeType(t)&&n.gauge_expand||e.isPieType(t)&&n.pie_expand},shouldShowArcLabel:function(){var t=this,e=t.config;return["pie","donut","gauge"].some((function(n){return t.hasType(n)&&e[n+"_label_show"]}))},getArcLabelFormat:function(){var t=this,e=t.config,n=e.pie_label_format;return t.hasType("gauge")?n=e.gauge_label_format:t.hasType("donut")&&(n=e.donut_label_format),Xa(n)?n.bind(t.api):n},getArcTitle:function(){var t=this,e=t.hasType("donut")?"donut":t.hasType("gauge")&&"gauge";return e?t.config[e+"_title"]:""},updateTargetsForArc:function(t){var e=this,n=e.$el,r=e.hasType("gauge"),i=e.getChartClass("Arc"),a=e.getClass("arcs",!0),o=e.classFocus.bind(e),s=n.main.select("."+In.chartArcs),u=s.selectAll("."+In.chartArc).data(e.pie(t)).attr("class",(function(t){return i(t)+o(t.data)})),c=u.enter().append("g").attr("class",i);c.append("g").attr("class",a).merge(u),c.append("text").attr("dy",r&&!e.hasMultiTargets()?"-.1em":".35em").style("opacity","0").style("text-anchor","middle").style("pointer-events","none"),n.text=s.selectAll("."+In.target+" text")},initArc:function(){var t=this,e=t.$el;e.arcs=e.main.select("."+In.chart).append("g").attr("class",In.chartArcs).attr("transform",t.getTranslate("arc")),t.setArcTitle()},setArcTitle:function(){var t=this,e=t.getArcTitle(),n=t.hasType("gauge");if(e){var r=t.$el.arcs.append("text").attr("class",In[n?"chartArcsGaugeTitle":"chartArcsTitle"]).style("text-anchor","middle");n&&r.attr("dy","-0.3em").style("font-size","27px"),io(r,e,n?void 0:[-.6,1.35],!0)}},redrawArc:function(t,e,n){var r=this,i=r.config,a=r.state,o=r.$el.main,s=i.interaction_enabled,u=s&&i.data_selection_isselectable,c=o.selectAll("."+In.arcs).selectAll("."+In.arc).data(r.arcData.bind(r));c.exit().transition().duration(e).style("opacity","0").remove(),c=c.enter().append("path").attr("class",r.getClass("arc",!0)).style("fill",(function(t){return r.color(t.data)})).style("cursor",(function(t){return u&&u.bind(r.api)(t)?"pointer":null})).style("opacity","0").each((function(t){r.isGaugeType(t.data)&&(t.startAngle=i.gauge_startingAngle,t.endAngle=i.gauge_startingAngle),this._current=t})).merge(c),r.hasType("gauge")&&(r.updateGaugeMax(),r.hasMultiArcGauge()&&r.redrawMultiArcGauge()),c.attr("transform",(function(t){return!r.isGaugeType(t.data)&&n?"scale(0)":""})).style("opacity",(function(t){return t===this._current?"0":null})).each((function(){a.transiting=!0})).transition().duration(t).attrTween("d",(function(t){var e=r.updateAngle(t);if(!e)return function(){return"M 0 0"};isNaN(this._current.startAngle)&&(this._current.startAngle=0),isNaN(this._current.endAngle)&&(this._current.endAngle=this._current.startAngle);var n=Gr(this._current,e);return this._current=n(0),function(e){var i=n(e);return i.data=t.data,r.getArc(i,!0)}})).attr("transform",n?"scale(1)":"").style("fill",(function(t){var e;return r.levelColor?(e=r.levelColor(t.data.values[0].value),i.data_colors[t.data.id]=e):e=r.color(t.data),e})).style("opacity",null).call(no,(function(){if(r.levelColor){var t=Ln(this),e=t.datum();r.updateLegendItemColor(e.data.id,t.style("fill"))}a.transiting=!1,eo(i.onrendered,r.api)})),s&&r.bindArcEvent(c),r.hasType("gauge")&&r.redrawBackgroundArcs(),r.redrawArcText(t)},redrawBackgroundArcs:function(){var t=this,e=t.config,n=t.state,r=t.hasMultiArcGauge(),i=e.gauge_fullCircle,a=t.getStartAngle(),o=i?a+t.getArcLength():-1*a,s=t.$el.arcs.select((r?"g":"")+"."+In.chartArcsBackground);if(r){var u=0;(s=s.selectAll("path."+In.chartArcsBackground).data(t.data.targets)).enter().append("path").attr("class",(function(t,e){return In.chartArcsBackground+" "+In.chartArcsBackground+"-"+e})).merge(s).style("fill",e.gauge_background||null).attr("d",(function(r){var i=r.id;if(n.hiddenTargetIds.indexOf(i)>=0)return"M 0 0";var s={data:[{value:e.gauge_max}],startAngle:a,endAngle:o,index:u++};return t.getArc(s,!0,!0)})),s.exit().remove()}else s.attr("d",(function(){var n={data:[{value:e.gauge_max}],startAngle:a,endAngle:o};return t.getArc(n,!0,!0)}))},bindArcEvent:function(t){function e(t,e,n){r.expandArc(n),r.api.focus(n),r.toggleFocusLegend(n,!0),r.showTooltip([e],t)}function n(t){var e=t&&t.id||void 0;r.unexpandArc(e),r.api.revert(),r.revertLegend(),r.hideTooltip()}var r=this,i=r.config,a=r.state,o="touch"===a.inputType,s="mouse"===a.inputType;if(t.on("click",(function(t,e,n){var a,o=r.updateAngle(e);o&&(a=r.convertToArcData(o),r.toggleShape&&r.toggleShape(this,a,n),i.data_onclick.bind(r.api)(a,this))})),s&&t.on("mouseover",(function(t,n){if(!a.transiting){a.event=t;var i=r.updateAngle(n),o=i?r.convertToArcData(i):null;e(this,o,o&&o.id||void 0),r.setOverOut(!0,o)}})).on("mouseout",(function(t,e){if(!a.transiting){a.event=t;var i=r.updateAngle(e),o=i?r.convertToArcData(i):null;n(),r.setOverOut(!1,o)}})).on("mousemove",(function(t,e){var n=r.updateAngle(e),i=n?r.convertToArcData(n):null;a.event=t,r.showTooltip([i],this)})),o&&r.hasArcType()&&!r.radars){r.$el.svg.on("touchstart touchmove",(function(t){if(!a.transiting){var i=function(t){var e=t.changedTouches[0];return Ln(za.elementFromPoint(e.clientX,e.clientY))}(t).datum(),o=i&&i.data&&i.data.id?r.updateAngle(i):null,s=o?r.convertToArcData(o):null,u=s&&s.id||void 0;r.callOverOutForTouch(s),Ua(u)?n():e(this,s,u)}}))}},redrawArcText:function(t){var e,n=this,r=n.config,i=n.state,a=n.$el,o=a.main,s=a.arcs,u=n.hasType("gauge"),c=n.hasMultiArcGauge();if(u&&1===n.data.targets.length&&r.gauge_title||(e=o.selectAll("."+In.chartArc).select("text").style("opacity","0").attr("class",(function(t){return n.isGaugeType(t.data)?In.gaugeValue:null})).call(n.textForArcLabel.bind(n)).attr("transform",n.transformForArcLabel.bind(n)).style("font-size",(function(t){return n.isGaugeType(t.data)&&1===n.data.targets.length&&!c?Math.round(i.radius/5)+"px":null})).transition().duration(t).style("opacity",(function(t){return n.isTargetToShow(t.data.id)&&n.isArcType(t.data)?null:"0"})),c&&e.attr("dy","-.1em")),o.select("."+In.chartArcsTitle).style("opacity",n.hasType("donut")||u?null:"0"),u){var l=r.gauge_fullCircle;l&&e&&e.attr("dy",""+(c?0:Math.round(i.radius/14))),r.gauge_label_show&&(s.select("."+In.chartArcsGaugeUnit).attr("dy",(l?1.5:.75)+"em").text(r.gauge_units),s.select("."+In.chartArcsGaugeMin).attr("dx",-1*(i.innerRadius+(i.radius-i.innerRadius)/(l?1:2))+"px").attr("dy","1.2em").text(n.textForGaugeMinMax(r.gauge_min,!1)),!l&&s.select("."+In.chartArcsGaugeMax).attr("dx",i.innerRadius+(i.radius-i.innerRadius)/2+"px").attr("dy","1.2em").text(n.textForGaugeMinMax(r.gauge_max,!0)))}}};function Nf(t){return t[0]}function jf(t){return t[1]}function Xf(t,e){function n(n){var s,u,c,l=(n=xf(n)).length,f=!1;for(null==i&&(o=a(c=Mf())),s=0;s<=l;++s)!(s<l&&r(u=n[s],s,n))===f&&((f=!f)?o.lineStart():o.lineEnd()),f&&o.point(+t(u,s,n),+e(u,s,n));if(c)return o=null,c+""||null}var r=_f(!0),i=null,a=el,o=null;return t="function"==typeof t?t:void 0===t?Nf:_f(t),e="function"==typeof e?e:void 0===e?jf:_f(e),n.x=function(e){return arguments.length?(t="function"==typeof e?e:_f(+e),n):t},n.y=function(t){return arguments.length?(e="function"==typeof t?t:_f(+t),n):e},n.defined=function(t){return arguments.length?(r="function"==typeof t?t:_f(!!t),n):r},n.curve=function(t){return arguments.length?(a=t,null!=i&&(o=a(i)),n):a},n.context=function(t){return arguments.length?(null==t?i=o=null:o=a(i=t),n):i},n}var Bf={initArea:function(t){var e=this.config;t.insert("g","."+In[e.area_front?"circles":"lines"]).attr("class",this.getClass("areas",!0))},updateAreaGradient:function(){var t=this,e=t.config,n=t.state.datetimeId,r=t.$el.defs;t.data.targets.forEach((function(i){var a=n+"-areaGradient"+t.getTargetSelectorSuffix(i.id);if(t.isAreaType(i)&&r.select("#"+a).empty()){var o=t.color(i),s=e.area_linearGradient,u=s.x,c=void 0===u?[0,0]:u,l=s.y,f=void 0===l?[0,1]:l,h=s.stops,d=void 0===h?[[0,o,1],[1,o,0]]:h,g=r.append("linearGradient").attr("id",""+a).attr("x1",c[0]).attr("x2",c[1]).attr("y1",f[0]).attr("y2",f[1]);d.forEach((function(e){var n=Xa(e[1])?e[1].bind(t.api)(i.id):e[1];g.append("stop").attr("offset",e[0]).attr("stop-color",n||o).attr("stop-opacity",e[2])}))}}))},updateAreaColor:function(t){var e=this;return e.config.area_linearGradient?"url(#"+e.state.datetimeId+"-areaGradient"+e.getTargetSelectorSuffix(t.id)+")":e.color(t)},updateArea:function(t,e){void 0===e&&(e=!1);var n=this,r=n.config,i=n.state,a=n.$el,o=e?a.subchart:a;r.area_linearGradient&&n.updateAreaGradient();var s=o.main.selectAll("."+In.areas).selectAll("."+In.area).data(n.lineData.bind(n));s.exit().transition().duration(t).style("opacity","0").remove(),o.area=s.enter().append("path").attr("class",n.getClass("area",!0)).style("fill",n.updateAreaColor.bind(n)).style("opacity",(function(){return i.orgAreaOpacity=Ln(this).style("opacity"),"0"})).merge(s),s.style("opacity",i.orgAreaOpacity)},redrawArea:function(t,e,n){void 0===n&&(n=!1);var r=this,i=(n?this.$el.subchart:this.$el).area,a=r.state.orgAreaOpacity;return[(e?i.transition(co()):i).attr("d",t).style("fill",r.updateAreaColor.bind(r)).style("opacity",(function(t){return(r.isAreaRangeType(t)?a/1.75:a)+""}))]},generateDrawArea:function(t,e){var n=this,r=n.config,i=r.line_connectNull,a=r.axis_rotated,o=n.generateGetAreaPoints(t,e),s=n.getYScaleById.bind(n),u=function(t){return(e?n.subxx:n.xx).call(n,t)},c=function(t,r){return n.isGrouped(t.id)?o(t,r)[0][1]:s(t.id,e)(n.isAreaRangeType(t)?n.getRangedData(t,"high"):n.getShapeYMin(t.id))},l=function(t,r){return n.isGrouped(t.id)?o(t,r)[1][1]:s(t.id,e)(n.isAreaRangeType(t)?n.getRangedData(t,"low"):t.value)};return function(t){var e,o=i?n.filterRemoveNull(t.values):t.values,s=0,f=0;if(n.isAreaType(t)){var h=function(t,e,n){function r(r){var i,l,f,h,d,g=(r=xf(r)).length,p=!1,v=Array(g),y=Array(g);for(null==s&&(c=u(d=Mf())),i=0;i<=g;++i){if(!(i<g&&o(h=r[i],i,r))===p)if(p=!p)l=i,c.areaStart(),c.lineStart();else{for(c.lineEnd(),c.lineStart(),f=i-1;f>=l;--f)c.point(v[f],y[f]);c.lineEnd(),c.areaEnd()}p&&(v[i]=+t(h,i,r),y[i]=+e(h,i,r),c.point(a?+a(h,i,r):v[i],n?+n(h,i,r):y[i]))}if(d)return c=null,d+""||null}function i(){return Xf().defined(o).curve(u).context(s)}var a=null,o=_f(!0),s=null,u=el,c=null;return t="function"==typeof t?t:void 0===t?Nf:_f(+t),e="function"==typeof e?e:_f(void 0===e?0:+e),n="function"==typeof n?n:void 0===n?jf:_f(+n),r.x=function(e){return arguments.length?(t="function"==typeof e?e:_f(+e),a=null,r):t},r.x0=function(e){return arguments.length?(t="function"==typeof e?e:_f(+e),r):t},r.x1=function(t){return arguments.length?(a=null==t?null:"function"==typeof t?t:_f(+t),r):a},r.y=function(t){return arguments.length?(e="function"==typeof t?t:_f(+t),n=null,r):e},r.y0=function(t){return arguments.length?(e="function"==typeof t?t:_f(+t),r):e},r.y1=function(t){return arguments.length?(n=null==t?null:"function"==typeof t?t:_f(+t),r):n},r.lineX0=r.lineY0=function(){return i().x(t).y(e)},r.lineY1=function(){return i().x(t).y(n)},r.lineX1=function(){return i().x(a).y(e)},r.defined=function(t){return arguments.length?(o="function"==typeof t?t:_f(!!t),r):o},r.curve=function(t){return arguments.length?(u=t,null!=s&&(c=u(s)),r):u},r.context=function(t){return arguments.length?(null==t?s=c=null:c=u(s=t),r):s},r}();h=a?h.y(u).x0(c).x1(l):h.x(u).y0(r.area_above?0:c).y1(l),i||(h=h.defined((function(t){return null!==n.getBaseValue(t)}))),n.isStepType(t)&&(o=n.convertValuesToStep(o)),e=h.curve(n.getCurve(t))(o)}else o[0]&&(s=n.scale.x(o[0].x),f=n.getYScaleById(t.id)(o[0].value)),e=a?"M "+f+" "+s:"M "+s+" "+f;return e||"M 0 0"}},generateGetAreaPoints:function(t,e){var n=this,r=n.config,i=n.getShapeX(0,t,e),a=n.getShapeY(!!e),o=n.getShapeOffset(n.isAreaType,t,e),s=n.getYScaleById.bind(n);return function(t,u){var c=s.call(n,t.id,e)(n.getShapeYMin(t.id)),l=o(t,u)||c,f=i(t),h=a(t);return r.axis_rotated&&(t.value>0&&h<c||t.value<0&&c<h)&&(h=c),[[f,l],[f,h-(c-l)],[f,h-(c-l)],[f,l]]}}},$f={initBar:function(){var t=this.$el;t.bar=t.main.select("."+In.chart).insert("g",":first-child").attr("class",In.chartBars)},updateTargetsForBar:function(t){var e=this,n=e.config,r=e.$el,i=e.getChartClass("Bar"),a=e.getClass("bars",!0),o=e.classFocus.bind(e),s=n.interaction_enabled&&n.data_selection_isselectable;r.bar||e.initBar(),e.$el.main.select("."+In.chartBars).selectAll("."+In.chartBar).data(t.filter((function(t){return!t.values.every((function(t){return!$a(t.value)}))}))).attr("class",(function(t){return i(t)+o(t)})).enter().append("g").attr("class",i).style("opacity","0").style("pointer-events","none").append("g").attr("class",a).style("cursor",(function(t){return s&&s.bind(e.api)(t)?"pointer":null}))},updateBar:function(t,e){void 0===e&&(e=!1);var n=this,r=e?n.$el.subchart:n.$el,i=n.getClass("bar",!0),a=n.initialOpacity.bind(n),o=r.main.selectAll("."+In.bars).selectAll("."+In.bar).data(n.labelishData.bind(n));o.exit().transition().duration(t).style("opacity","0").remove(),r.bar=o.enter().append("path").attr("class",i).style("fill",n.color).merge(o).style("opacity",a)},redrawBar:function(t,e,n){void 0===n&&(n=!1);var r=(n?this.$el.subchart:this.$el).bar;return[(e?r.transition(co()):r).attr("d",(function(e){return e.value&&t(e)})).style("fill",this.color).style("opacity",null)]},generateDrawBar:function(t,e){var n=this.config,r=this.generateGetBarPoints(t,e),i=n.axis_rotated,a=n.data_groups.length,o=n.bar_radius,s=n.bar_radius_ratio,u=$a(o)&&o>0?function(){return o}:$a(s)?function(t){return t*s}:null;return function(t,e){var n=r(t,e),o=+i,s=+!o,c=t.value<0,l=["",""],f=0;if(u&&!a){var h=i?s:o,d=n[2][h]-n[0][h],g="a"+(f=u(d))+","+f+" "+(c?"1 0 0":"0 0 1")+" ";l[+!i]=""+g+f+","+f,l[+i]=""+g+[-f,f][i?"sort":"reverse"](),c&&l.reverse()}var p=i?"H"+(n[1][o]-f)+" "+l[0]+"V"+(n[2][s]-f)+" "+l[1]+"H"+n[3][o]:"V"+(n[1][s]+(c?-f:f))+" "+l[0]+"H"+(n[2][o]-f)+" "+l[1]+"V"+n[3][s];return"M"+n[0][o]+","+n[0][s]+p+"z"}},generateGetBarPoints:function(t,e){var n=this,r=n.config,i=e?n.axis.subX:n.axis.x,a=n.getIndicesMax(t)+1,o=n.getBarW("bar",i,a),s=n.getShapeX(o,t,!!e),u=n.getShapeY(!!e),c=n.getShapeOffset(n.isBarType,t,!!e),l=n.getYScaleById.bind(n);return function(t,i){var a=l.call(n,t.id,e)(n.getShapeYMin(t.id)),f=c(t,i)||a,h=$a(o)?o:o[t.id]||o._$width,d=s(t),g=u(t);r.axis_rotated&&(t.value>0&&g<a||t.value<0&&a<g)&&(g=a);var p=d+h;return[[d,f],[d,g-=a-f],[p,g],[p,f]]}},isWithinBar:function(t){var e=oo(this.state.event,t),n=ao(t),r=n[0],i=n[1],a=Math.min(r.x,i.x),o=Math.min(r.y,i.y),s=this.config.bar_sensitivity,u=t.getBBox(),c=u.width,l=u.height;return a-s<e[0]&&e[0]<a+c+s&&o-s<e[1]&&e[1]<o+l+s}};function Uf(t,e){var n=Object.keys(t);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(t);e&&(r=r.filter((function(e){return Object.getOwnPropertyDescriptor(t,e).enumerable}))),n.push.apply(n,r)}return n}var Yf={initCandlestick:function(){var t=this.$el;t.candlestick=t.main.select("."+In.chart).append("g").attr("class",In.chartCandlesticks)},updateTargetsForCandlestick:function(t){var e=this,n=e.$el,r=e.getChartClass("Candlestick"),i=e.classFocus.bind(e);n.candlestick||e.initCandlestick(),e.$el.main.select("."+In.chartCandlesticks).selectAll("."+In.chartCandlestick).data(t).attr("class",(function(t){return r(t)+i(t)})).enter().append("g").attr("class",r).style("pointer-events","none")},updateCandlestick:function(t,e){void 0===e&&(e=!1);var n=this,r=n.$el,i=e?r.subchart:r,a=n.getClass("candlestick",!0),o=n.initialOpacity.bind(n),s=i.main.selectAll("."+In.chartCandlestick).selectAll("."+In.candlestick).data(n.labelishData.bind(n));s.exit().transition().duration(t).style("opacity","0").remove();var u=s.enter().filter((function(t){return t.value})).append("g").attr("class",a);u.append("line"),u.append("path"),i.candlestick||(i.candlestick={}),i.candlestick=s.merge(u).style("opacity",o)},generateDrawCandlestick:function(t,e){var n=this,r=n.config,i=n.generateGetCandlestickPoints(t,e),a=r.axis_rotated,o=r.candlestick_color_down;return function(t,e,r){var s,u=i(t,e),c=null==(s=n.getCandlestickData(t))?void 0:s._isUp,l=+a;r.classed&&r.classed(In[c?"valueUp":"valueDown"],!0);var f=a?"H"+u[1][1]+" V"+u[1][0]+" H"+u[0][1]:"V"+u[1][1]+" H"+u[1][0]+" V"+u[0][1];r.select("path").attr("d","M"+u[0][l]+","+u[0][+!l]+f+"z").style("fill",(function(t){return(c?n.color(t):Qa(o)?o[t.id]:o)||n.color(t)}));var h=r.select("line"),d=a?{x1:u[2][1],x2:u[2][2],y1:u[2][0],y2:u[2][0]}:{x1:u[2][0],x2:u[2][0],y1:u[2][1],y2:u[2][2]};for(var g in d)h.attr(g,d[g])}},generateGetCandlestickPoints:function(t,e){void 0===e&&(e=!1);var n=this,r=n.config,i=e?n.axis.subX:n.axis.x,a=n.getIndicesMax(t)+1,o=n.getBarW("candlestick",i,a),s=n.getShapeX(o,t,!!e),u=n.getShapeY(!!e),c=n.getShapeOffset(n.isBarType,t,!!e),l=n.getYScaleById.bind(n);return function(t,i){var a,f=l.call(n,t.id,e)(n.getShapeYMin(t.id)),h=c(t,i)||f,d=$a(o)?o:o[t.id]||o._$width,g=n.getCandlestickData(t);if(g){var p={start:s(t),end:0};p.end=p.start+d;var v={start:u(g.open),end:u(g.close)},y={x:p.start+d/2,high:u(g.high),low:u(g.low)};r.axis_rotated&&(t.value>0&&v.start<f||t.value<0&&f<v.start)&&(v.start=f),v.start-=f-h,a=[[p.start,v.start],[p.end,v.end],[y.x,y.low,y.high]]}else a=[[0,0],[0,0],[0,0,0]];return a}},redrawCandlestick:function(t,e,n){void 0===n&&(n=!1);var r=(n?this.$el.subchart:this.$el).candlestick,i=co(!0);return[r.each((function(n,r){var a=e?Ln(this).transition(i):Ln(this);t(n,r,a)})).style("opacity",null)]},getCandlestickData:function(t){var e,n=t.value;if(Ja(n)){var r=n[0],i=n[1],a=n[2],o=n[3],s=n[4],u=void 0!==s&&s;e={open:r,high:i,low:a,close:o},!1!==u&&(e.volume=u)}else Qa(n)&&(e=function(t){for(var e,n=1;n<arguments.length;n++)e=null==arguments[n]?{}:arguments[n],n%2?Uf(Object(e),!0).forEach((function(n){zn(t,n,e[n])})):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(e)):Uf(Object(e)).forEach((function(n){Object.defineProperty(t,n,Object.getOwnPropertyDescriptor(e,n))}));return t}({},n));return e&&(e._isUp=e.close>=e.open),e||null}},Vf={initGauge:function(){var t=this,e=t.config,n=t.$el.arcs,r=function(t){n.append("text").attr("class",t).style("text-anchor","middle").style("pointer-events","none")};if(t.hasType("gauge")){var i=t.hasMultiArcGauge();n.append(i?"g":"path").attr("class",In.chartArcsBackground).style("fill",!i&&e.gauge_background||null),e.gauge_units&&r(In.chartArcsGaugeUnit),e.gauge_label_show&&(r(In.chartArcsGaugeMin),!e.gauge_fullCircle&&r(In.chartArcsGaugeMax))}},updateGaugeMax:function(){var t=this,e=t.config,n=t.state,r=t.hasMultiArcGauge()?t.getMinMaxData().max[0].value:t.getTotalDataSum(n.rendered);r+e.gauge_min*(e.gauge_min>0?-1:1)>e.gauge_max&&(e.gauge_max=r-e.gauge_min)},redrawMultiArcGauge:function(){var t=this,e=t.config,n=t.state,r=t.$el,i=t.state.hiddenTargetIds,a=r.main.selectAll("."+In.arcs).selectAll("."+In.arcLabelLine).data(t.arcData.bind(t));a.enter().append("rect").attr("class",(function(t){return In.arcLabelLine+" "+In.target+" "+In.target+"-"+t.data.id})).merge(a).style("fill",(function(e){return t.levelColor?t.levelColor(e.data.values[0].value):t.color(e.data)})).style("display",e.gauge_label_show?null:"none").each((function(e){var r=0,a=0,o=0,s="";if(i.indexOf(e.data.id)<0){var u=t.updateAngle(e),c=n.gaugeArcWidth/t.filterTargetsToShow(t.data.targets).length*(u.index+1),l=u.endAngle-Math.PI/2,f=n.radius-c,h=l-(0===f?0:1/f);r=n.radiusExpanded-n.radius+c,a=Math.cos(h)*f,o=Math.sin(h)*f,s="rotate("+180*l/Math.PI+", "+a+", "+o+")"}Ln(this).attr("x",a).attr("y",o).attr("width",r).attr("height",2).attr("transform",s).style("stroke-dasharray","0, "+(r+2)+", 0")}))},textForGaugeMinMax:function(t,e){var n=this.config.gauge_label_extents;return Xa(n)?n.bind(this.api)(t,e):t},getGaugeLabelHeight:function(){var t=this.config;return this.config.gauge_label_show&&!t.gauge_fullCircle?20:0},getPaddingBottomForGauge:function(){return this.getGaugeLabelHeight()*(this.config.gauge_label_show?2:2.5)}},Gf={initBubble:function(){var t=this.config;this.hasType("bubble")&&(t.point_show=!0,t.point_type="circle",t.point_sensitivity=25)},getBaseLength:function(){var t=this,e=t.state,n=e.width,r=e.height,i=Oo,a=t.cache.get(i);return a||t.cache.add(i,a=bo("min",[n,r])),a},getBubbleR:function(t){var e=this,n=e.config.bubble_maxR;Xa(n)?n=n.bind(e.api)(t):!$a(n)&&(n=e.getBaseLength()/(2*e.getMaxDataCount())+12);var r=bo("max",e.getMinMaxData().max.map((function(t){return e.isBubbleZType(t)?e.getBubbleZData(t.value,"y"):Qa(t.value)?t.value.mid:t.value}))),i=n*n*Math.PI,a=(e.isBubbleZType(t)?e.getBubbleZData(t.value,"z"):t.value)*(i/r);return Math.sqrt(a/Math.PI)},getBubbleZData:function(t,e){return Qa(t)?t[e]:t["y"===e?0:1]}},Hf={initLine:function(){var t=this.$el;t.line=t.main.select("."+In.chart).append("g").attr("class",In.chartLines)},updateTargetsForLine:function(t){var e=this,n=e.$el,r=n.area,i=n.line,a=n.main,o=e.getChartClass("Line"),s=e.getClass("lines",!0),u=e.classFocus.bind(e);i||e.initLine();var c=t.filter((function(t){return!(e.isScatterType(t)||e.isBubbleType(t))})),l=a.select("."+In.chartLines).selectAll("."+In.chartLine).data(c).attr("class",(function(t){return o(t)+u(t)})),f=l.enter().append("g").attr("class",o).style("opacity","0").style("pointer-events","none");f.append("g").attr("class",s),e.hasTypeOf("Area")&&e.initArea(!r&&f.empty()?l:f),e.updateTargetForCircle(c,f)},updateLine:function(t,e){void 0===e&&(e=!1);var n=this,r=n.format.extraLineClasses,i=n.$el,a=e?i.subchart:i,o=a.main.selectAll("."+In.lines).selectAll("."+In.line).data(n.lineData.bind(n));o.exit().transition().duration(t).style("opacity","0").remove(),a.line=o.enter().append("path").attr("class",(function(t){return n.getClass("line",!0)(t)+" "+(r(t)||"")})).style("stroke",n.color).merge(o).style("opacity",n.initialOpacity.bind(n)).style("shape-rendering",(function(t){return n.isStepType(t)?"crispEdges":""})).attr("transform",null)},redrawLine:function(t,e,n){void 0===n&&(n=!1);var r=(n?this.$el.subchart:this.$el).line;return[(e?r.transition(co()):r).attr("d",t).style("stroke",this.color).style("opacity",null)]},getCurve:function(t){var e=this;return e.config.axis_rotated&&e.isStepType(t)?function(n){var r=e.getInterpolate(t)(n);return r.orgPoint=r.point,r.pointRotated=function(t,e){1===this._point&&(this._point=2);var n=this._y*(1-this._t)+e*this._t;this._context.lineTo(this._x,n),this._context.lineTo(t,n),this._x=t,this._y=e},r.point=function(t,e){0===this._point?this.orgPoint(t,e):this.pointRotated(t,e)},r}:e.getInterpolate(t)},generateDrawLine:function(t,e){var n=this,r=n.config,i=n.scale,a=r.line_connectNull,o=r.axis_rotated,s=n.generateGetLinePoints(t,e),u=n.getYScaleById.bind(n),c=function(t){return(e?n.subxx:n.xx).call(n,t)},l=function(t,r){return n.isGrouped(t.id)?s(t,r)[0][1]:u(t.id,e)(n.getBaseValue(t))},f=Xf();f=o?f.x(l).y(c):f.x(c).y(l),a||(f=f.defined((function(t){return null!==n.getBaseValue(t)})));var h=e?i.subX:i.x;return function(t){var s,c=u(t.id,e),l=a?n.filterRemoveNull(t.values):t.values,d=0,g=0;if(n.isLineType(t)){var p=r.data_regions[t.id];p?s=n.lineWithRegions(l,i.zoom||h,c,p):(n.isStepType(t)&&(l=n.convertValuesToStep(l)),s=f.curve(n.getCurve(t))(l))}else l[0]&&(d=h(l[0].x),g=c(l[0].value)),s=o?"M "+g+" "+d:"M "+d+" "+g;return s||"M 0 0"}},lineWithRegions:function(t,e,n,r){var i,a,o,s,u=this,c=u.config.axis_rotated,l=u.axis.isTimeSeries(),f=u.axis.isCategorized()?.5:0,h=[],d=function(t,e){for(var n,r=0;n=e[r];r++)if(n.start<t&&t<=n.end)return n.style;return!1};if(Ya(r))for(var g,p=function(t,e){return Ua(t)?e:l?So.call(u,t):t},v=0;g=r[v];v++){var y=p(g.start,t[0].x),x=p(g.end,t[t.length-1].x),_=g.style||{dasharray:"2 2"};h[v]={start:y,end:x,style:_}}for(var m,b=c?function(t){return n(t.value)}:function(t){return e(t.x)},w=c?function(t){return e(t.x)}:function(t){return n(t.value)},T=function(t){return"M"+t[0][0]+","+t[0][1]+"L"+t[1][0]+","+t[1][1]},A=l?function(t,r,i,s){var u=t.x.getTime(),l=r.x-t.x,f=new Date(u+l*i),h=new Date(u+l*(i+s)),d=c?[[n(a(i)),e(f)],[n(a(i+o)),e(h)]]:[[e(f),n(a(i))],[e(h),n(a(i+o))]];return T(d)}:function(t,r,o,s){var u=c?[[n(a(o),!0),e(i(o))],[n(a(o+s),!0),e(i(o+s))]]:[[e(i(o),!0),n(a(o))],[e(i(o+s),!0),n(a(o+s))]];return T(u)},S={x:u.axis.getAxisType("x"),y:u.axis.getAxisType("y")},k="",E=0;m=t[E];E++){var M=t[E-1],C=M&&ja(M.value);_=d(m.x,h);if(ja(m.value))if(!Ua(h)&&_&&C){if(C){try{_=_.dasharray.split(" ")}catch(t){_="2 2".split(" ")}i=ec(S.x,M.x+f,m.x+f),a=ec(S.y,M.value,m.value);var O=e(m.x)-e(M.x),R=n(m.value)-n(M.value),L=Math.sqrt(Math.pow(O,2)+Math.pow(R,2));s=(o=_[0]/L)*_[1];for(var I=o;I<=1;I+=s)k+=A(M,m,I,o),I+s>=1&&(k+=A(M,m,1,0))}}else k+=(E&&C?"L":"M")+b(m)+","+w(m)}return k},isWithinStep:function(t,e){return Math.abs(e-oo(this.state.event,t)[1])<30},shouldDrawPointsForLine:function(t){var e=this.config.line_point;return!0===e||Ja(e)&&-1!==e.indexOf(t.id)}},Wf=function(){return co()},qf={hasValidPointType:function(t){return/^(circle|rect(angle)?|polygon|ellipse|use)$/i.test(t||this.config.point_type)},hasValidPointDrawMethods:function(t){var e=t||this.config.point_type;return qa(e)&&Xa(e.create)&&Xa(e.update)},initialOpacityForCircle:function(t){var e=this.config,n=this.state.withoutFadeIn,r=e.point_opacity;return Ua(r)&&(r=null!==this.getBaseValue(t)&&n[t.id]?this.opacityForCircle(t):"0"),r},opacityForCircle:function(t){var e=this.config,n=e.point_opacity;return Ua(n)&&(n=e.point_show&&!e.point_focus_only?null:"0",n=ja(this.getBaseValue(t))?this.isBubbleType(t)||this.isScatterType(t)?"0.5":n:"0"),n},initCircle:function(){var t=this,e=t.$el.main;t.point=t.generatePoint(),(t.hasType("bubble")||t.hasType("scatter"))&&e.select("."+In.chartCircles).empty()&&e.select("."+In.chart).append("g").attr("class",In.chartCircles)},updateTargetForCircle:function(t,e){var n=this,r=this,i=r.config,a=r.data,o=r.$el,s=i.interaction_enabled&&i.data_selection_enabled,u=s&&i.data_selection_isselectable,c=r.getClass("circles",!0);if(i.point_show){o.circle||r.initCircle();var l=t,f=e;if(!l){l=a.targets.filter((function(t){return n.isScatterType(t)||n.isBubbleType(t)}));var h=o.main.select("."+In.chartCircles).style("pointer-events","none").selectAll("."+In.circles).data(l).attr("class",c);h.exit().remove(),f=h.enter()}s&&f.append("g").attr("class",(function(t){return r.generateClass(In.selectedCircles,t.id)})),f.append("g").attr("class",c).style("cursor",(function(t){return u&&u(t)?"pointer":null})),s&&l.forEach((function(t){o.main.selectAll("."+In.selectedCircles+r.getTargetSelectorSuffix(t.id)).selectAll(""+In.selectedCircle).each((function(e){e.value=t.values[e.index].value}))}))}},updateCircle:function(t){void 0===t&&(t=!1);var e=this,n=e.config,r=e.state,i=e.$el,a=n.point_focus_only,o=t?i.subchart:i;if(n.point_show&&!r.toggling){var s=o.main.selectAll("."+In.circles).selectAll("."+In.circle).data((function(t){return e.isLineType(t)&&e.shouldDrawPointsForLine(t)||e.isBubbleType(t)||e.isRadarType(t)||e.isScatterType(t)?a?[t.values[0]]:t.values:[]}));s.exit().remove(),s.enter().filter(Boolean).append(e.point("create",this,e.pointR.bind(e),e.color)),o.circle=o.main.selectAll("."+In.circles+" ."+In.circle).style("stroke",e.color).style("opacity",e.initialOpacityForCircle.bind(e))}},redrawCircle:function(t,e,n,r,i){void 0===i&&(i=!1);var a=this,o=a.state.rendered,s=a.$el,u=i?s.subchart:s,c=u.main.selectAll("."+In.selectedCircle);if(!a.config.point_show)return[];var l=a.point("update",a,t,e,a.color,n,r,c),f=a.isCirclePoint()?"c":"",h=co(),d=a.opacityForCircle.bind(a),g=[];return u.circle.each((function(t){var e=l.bind(this)(t);e=(n||!o?e.transition(h):e).style("opacity",d),g.push(e)})),[g,(n?c.transition():c).attr(f+"x",t).attr(f+"y",e)]},showCircleFocus:function(t){var e=this,n=e.config,r=e.state,i=r.hasRadar,a=r.resizing,o=r.toggling,s=r.transiting,u=e.$el.circle;if(!1===s&&n.point_focus_only&&u){var c=(i?e.radarCircleX:e.circleX).bind(e),l=(i?e.radarCircleY:e.circleY).bind(e),f=o||Ua(t),h=e.point("update",e,c,l,e.color,!a&&f);t&&(u=u.filter((function(e){var n=t.filter((function(t){return t.id===e.id}));return!!n.length&&Ln(this).datum(n[0])}))),u.attr("class",this.updatePointClass.bind(this)).style("opacity",null).each((function(t){var n=t.id,r=t.index,i=t.value,a="hidden";ja(i)&&(h.bind(this)(t),e.expandCircles(r,n),a=""),this.style.visibility=a}))}},hideCircleFocus:function(){var t=this,e=t.config,n=t.$el.circle;e.point_focus_only&&n&&(t.unexpandCircles(),n.style("visibility","hidden"))},circleX:function(t){return this.xx(t)},updateCircleY:function(t){void 0===t&&(t=!1);var e=this,n=e.generateGetLinePoints(e.getShapeIndices(e.isLineType),t);return function(r,i){var a=r.id;return e.isGrouped(a)?n(r,i)[0][1]:e.getYScaleById(a,t)(e.getBaseValue(r))}},getCircles:function(t,e){var n=this,r=ja(t)?"-"+t:"";return(e?n.$el.main.selectAll("."+In.circles+n.getTargetSelectorSuffix(e)):n.$el.main).selectAll("."+In.circle+r)},expandCircles:function(t,e,n){var r=this,i=r.pointExpandedR.bind(r);n&&r.unexpandCircles();var a=r.getCircles(t,e).classed(In.EXPANDED,!0),o=i(a)/r.config.point_r,s=1-o;r.isCirclePoint()?a.attr("r",i):a.each((function(){var t=Ln(this);if("circle"===this.tagName)t.attr("r",i);else{var e=this.getBBox(),n=e.width,r=e.height,a=s*(+t.attr("x")+n/2),u=s*(+t.attr("y")+r/2);t.attr("transform","translate("+a+" "+u+") scale("+o+")")}}))},unexpandCircles:function(t){var e=this,n=e.pointR.bind(e),r=e.getCircles(t).filter((function(){return Ln(this).classed(In.EXPANDED)})).classed(In.EXPANDED,!1);r.attr("r",n),e.isCirclePoint()||r.attr("transform","scale("+n(r)/e.config.point_r+")")},pointR:function(t){var e=this,n=e.config.point_r,r=n;return e.isBubbleType(t)?r=e.getBubbleR(t):Xa(n)&&(r=n.bind(e.api)(t)),r},pointExpandedR:function(t){var e=this,n=e.config,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:function(t){var e=this.config.point_select_r;return Xa(e)?e(t):e||4*this.pointR(t)},isWithinCircle:function(t,e){var n=oo(this.state.event,t),r=Ln(t),i=this.isCirclePoint(t)?"c":"",a=+r.attr(i+"x"),o=+r.attr(i+"y");if(!a&&!o&&1===t.nodeType){var s=uo(t);a=s.x,o=s.y}return Math.sqrt(Math.pow(a-n[0],2)+Math.pow(o-n[1],2))<(e||this.config.point_sensitivity)},insertPointInfoDefs:function(t,e){var n=function(t,e){for(var n,r=t.attributes,i=0;n=r[i];i++)n=n.name,e.setAttribute(n,t.getAttribute(n))},r=(new DOMParser).parseFromString(t,"image/svg+xml").documentElement,i=za.createElementNS(Re.svg,r.nodeName.toLowerCase());if(i.id=e,i.style.fill="inherit",i.style.stroke="inherit",n(r,i),r.childNodes&&r.childNodes.length){var a=Ln(i);"innerHTML"in i?a.html(r.innerHTML):po(r.childNodes).forEach((function(t){n(t,a.append(t.tagName).node())}))}this.$el.defs.node().appendChild(i)},pointFromDefs:function(t){return this.$el.defs.select("#"+t)},updatePointClass:function(t){var e=this,n=e.$el.circle,r=!1;return(Qa(t)||n)&&(r=!0===t?n.each((function(t){var n=e.getClass("circle",!0)(t);this.getAttribute("class").indexOf(In.EXPANDED)>-1&&(n+=" "+In.EXPANDED),this.setAttribute("class",n)})):e.getClass("circle",!0)(t)),r},generateGetLinePoints:function(t,e){var n=this,r=n.config,i=n.getShapeX(0,t,e),a=n.getShapeY(e),o=n.getShapeOffset(n.isLineType,t,e),s=n.getYScaleById.bind(n);return function(t,u){var c=s.call(n,t.id,e)(n.getShapeYMin(t.id)),l=o(t,u)||c,f=i(t),h=a(t);r.axis_rotated&&(t.value>0&&h<c||t.value<0&&c<h)&&(h=c);var d=[f,h-(c-l)];return[d,d,d,d]}},generatePoint:function(){var t=this,e=t.config,n=t.state.datetimeId,r=[],i=Ka(e.point_pattern)?e.point_pattern:[e.point_type];return function(e,a){for(var o=arguments.length,s=Array(o>2?o-2:0),u=2;u<o;u++)s[u-2]=arguments[u];return function(o){var u=t.getTargetSelectorSuffix(o.id||o.data&&o.data.id||o),c=Ln(this);r.indexOf(u)<0&&r.push(u);var l=i[r.indexOf(u)%i.length];if(t.hasValidPointType(l))l=t[l];else if(!t.hasValidPointDrawMethods(l)){var f=n+"-point"+u;if(t.pointFromDefs(f).size()<1&&t.insertPointInfoDefs(l,f),"create"===e)return t.custom.create.bind(a).apply(void 0,[c,f].concat(s));if("update"===e)return t.custom.update.bind(a).apply(void 0,[c].concat(s))}return l[e].bind(a).apply(void 0,[c].concat(s))}}},custom:{create:function(t,e,n,r){return t.append("use").attr("xlink:href","#"+e).attr("class",this.updatePointClass.bind(this)).style("fill",r).node()},update:function(t,e,n,r,i,a,o){var s=t.node().getBBox(),u=s.width,c=s.height,l=function(t){return ja(t.value)?e(t)-u/2:0},f=t;if(i){var h=Wf();a&&f.attr("x",l),f=f.transition(h),o&&o.transition(Wf())}return f.attr("x",l).attr("y",(function(t){return ja(t.value)?n(t)-c/2:0})).style("fill",r)}},circle:{create:function(t,e,n){return t.append("circle").attr("class",this.updatePointClass.bind(this)).attr("r",e).style("fill",n).node()},update:function(t,e,n,r,i,a,o){var s=this,u=t;if(s.hasType("bubble")&&u.attr("r",s.pointR.bind(s)),i){var c=Wf();a&&u.attr("cx",e),u.attr("cx")&&(u=u.transition(c)),o&&o.transition(Wf())}return u.attr("cx",e).attr("cy",n).style("fill",r)}},rectangle:{create:function(t,e,n){var r=function(t){return 2*e(t)};return t.append("rect").attr("class",this.updatePointClass.bind(this)).attr("width",r).attr("height",r).style("fill",n).node()},update:function(t,e,n,r,i,a,o){var s=this.config.point_r,u=function(t){return e(t)-s},c=t;if(i){var l=Wf();a&&c.attr("x",u),c=c.transition(l),o&&o.transition(Wf())}return c.attr("x",u).attr("y",(function(t){return n(t)-s})).style("fill",r)}}};var Zf=zo,Kf={initRadar:function(){var t=this,e=t.config,n=t.state.current,r=t.$el;t.hasType("radar")&&(r.radar=r.main.select("."+In.chart).append("g").attr("class",In.chartRadars),r.radar.levels=r.radar.append("g").attr("class",In.levels),r.radar.axes=r.radar.append("g").attr("class",In.axis),r.radar.shapes=r.radar.append("g").attr("class",In.shapes),n.dataMax=e.radar_axis_max||t.getMinMaxData().max[0].value)},getRadarSize:function(){var t=this.config,e=this.state,n=e.arcWidth,r=e.arcHeight,i=t.axis_x_categories.length<4?-20:10,a=(Math.min(n,r)-i)/2;return[a,a]},updateTargetsForRadar:function(t){var e=this.config;Za(e.axis_x_categories)&&(e.axis_x_categories=wo(0,bo("max",t.map((function(t){return t.values.length}))))),this.generateRadarPoints()},getRadarPosition:function(t,e,n,r){var i=this.config,a=this.getRadarSize(),o=a[0],s=a[1],u=i.axis_x_categories.length,c=i.radar_direction_clockwise,l=po(t).map((function(a){return function(t,e,n,r,i,a){var o=t&&r>0?n-r:r,s=2*Math.PI;return i*(1-a*("x"===e?Math.sin:Math.cos)(o*s/n))}(c,a,u,e,Ya(n)?n:"x"===t?o:s,$a(r)?r:i.radar_size_ratio)}));return 1===l.length?l[0]:l},generateRadarPoints:function(){var t=this,e=t.data.targets,n=t.getRadarSize(),r=n[0],i=n[1],a=t.cache.get(Zf)||{},o=a._size;o&&(o.width===r||o.height===i)||(e.forEach((function(e){a[e.id]=e.values.map((function(e,n){return t.getRadarPosition(["x","y"],n,void 0,t.getRatio("radar",e))}))})),a._size={width:r,height:i},t.cache.add(Zf,a))},redrawRadar:function(t){var e=this,n=e.$el,r=n.radar,i=n.main,a=e.getTranslate("radar");a&&(r.attr("transform",a),i.select("."+In.chartTexts).attr("transform",a),e.generateRadarPoints(),e.updateRadarLevel(),e.updateRadarAxes(),e.updateRadarShape(t))},generateGetRadarPoints:function(){var t=this.cache.get(Zf);return function(e,n){var r=t[e.id][n];return[r,r,r,r]}},updateRadarLevel:function(){var t=this,e=t.config,n=t.state,r=t.$el.radar,i=t.getRadarSize(),a=i[0],o=i[1],s=e.radar_level_depth,u=e.axis_x_categories.length,c=e.radar_level_text_show,l=r.levels,f=wo(0,s),h=e.radar_size_ratio*Math.min(a,o),d=f.map((function(t){return h*((t+1)/s)})),g=(e.radar_level_text_format||function(){}).bind(t.api),p=f.map((function(e){var n=d[e];return wo(0,u).map((function(e){return t.getRadarPosition(["x","y"],e,n,1).join(",")})).join(" ")})),v=l.selectAll("."+In.level).data(f);v.exit().remove();var y=v.enter().append("g").attr("class",(function(t,e){return In.level+" "+In.level+"-"+e}));y.append("polygon").style("visibility",e.radar_level_show?null:"hidden"),c&&(l.select("text").empty()&&l.append("text").attr("dx","-.5em").attr("dy","-.7em").style("text-anchor","end").text((function(){return g(0)})),y.append("text").attr("dx","-.5em").style("text-anchor","end").text((function(t){return g(n.current.dataMax/f.length*(t+1))}))),y.merge(v).attr("transform",(function(t){return"translate("+(a-d[t])+", "+(o-d[t])+")"})).selectAll("polygon").attr("points",(function(t){return p[t]})),c&&l.selectAll("text").attr("x",(function(t){return Ua(t)?a:p[t].split(",")[0]})).attr("y",(function(t){return Ua(t)?o:0}))},updateRadarAxes:function(){var t=this,e=t.config,n=t.$el.radar,r=t.getRadarSize(),i=r[0],a=r[1],o=e.axis_x_categories,s=n.axes.selectAll("g").data(o);s.exit().remove();var u=s.enter().append("g").attr("class",(function(t,e){return In.axis+"-"+e}));if(e.radar_axis_line_show&&u.append("line"),e.radar_axis_text_show&&u.append("text"),s=u.merge(s),e.radar_axis_line_show&&s.select("line").attr("x1",i).attr("y1",a).attr("x2",(function(e,n){return t.getRadarPosition("x",n)})).attr("y2",(function(e,n){return t.getRadarPosition("y",n)})),e.radar_axis_text_show){var c=e.radar_axis_text_position,l=c.x,f=void 0===l?0:l,h=c.y,d=void 0===h?0:h;s.select("text").style("text-anchor","middle").attr("dy",".5em").call((function(t){t.each((function(t){io(Ln(this),t+"",[-.6,1.2])}))})).datum((function(t,e){return{index:e}})).attr("transform",(function(e){Ua(this.width)&&(this.width=this.getBoundingClientRect().width/2);var n=t.getRadarPosition("x",e.index,void 0,1),r=Math.round(t.getRadarPosition("y",e.index,void 0,1));return n>i?n+=this.width+f:Math.round(n)<i&&(n-=this.width+f),r>a?(r/2===a&&"tspan"===this.firstChild.tagName&&this.firstChild.setAttribute("dy","0em"),r+=d):r<a&&(r-=d),"translate("+n+" "+r+")"}))}t.bindEvent()},bindEvent:function(){var t=this,e=t.config,n=t.state,r=t.$el,i=r.radar,a=r.svg,o=e.point_focus_only,s=n,u=s.inputType,c=s.transiting;if(e.interaction_enabled){var l="mouse"===u,f=function(t){var e=t.target;/tspan/i.test(e.tagName)&&(e=e.parentNode);var n=Ln(e).datum();return n&&1===Object.keys(n).length?n.index:void 0},h=function(e){var n=f(e),r=Ua(n);(l||r)&&(t.hideTooltip(),o?t.hideCircleFocus():t.unexpandCircles(),l?t.setOverOut(!1,n):r&&t.callOverOutForTouch())};i.axes.selectAll("text").on(l?"mouseover ":"touchstart",(function(e){if(!c){n.event=e;var r=f(e);t.selectRectForSingle(a.node(),null,r),l?t.setOverOut(!0,r):t.callOverOutForTouch(r)}})).on("mouseout",l?h:null),l||a.on("touchstart",h)}},updateRadarShape:function(t){var e=this,n=e.data.targets.filter((function(t){return e.isRadarType(t)})),r=e.cache.get(Zf),i=e.$el.radar.shapes.selectAll("polygon").data(n),a=i.enter().append("g").attr("class",e.getChartClass("Radar"));i.exit().transition().duration(t).remove(),a.append("polygon").merge(i).style("fill",e.color).style("stroke",e.color).attr("points",(function(t){return r[t.id].join(" ")})),e.updateTargetForCircle(n,a)},radarCircleX:function(t){return this.cache.get(Zf)[t.id][t.index][0]},radarCircleY:function(t){return this.cache.get(Zf)[t.id][t.index][1]}},Jf={point_show:!0,point_r:2.5,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"},Qf={area_above:!1,area_front:!0,area_linearGradient:!1,area_zerobased:!0},th={bar_label_threshold:0,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},eh={bubble_maxR:35,bubble_zerobased:!1},nh={candlestick_width:void 0,candlestick_width_ratio:.6,candlestick_width_max:void 0,candlestick_color_down:"red"},rh={line_connectNull:!1,line_step_type:"step",line_zerobased:!1,line_classes:void 0,line_point:!0},ih={scatter_zerobased:!1},ah={spline_interpolation_type:"cardinal"},oh={donut_label_show:!0,donut_label_format:void 0,donut_label_threshold:.05,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},sh={gauge_background:"",gauge_fullCircle:!1,gauge_label_show:!0,gauge_label_format:void 0,gauge_label_extents:void 0,gauge_label_threshold:0,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},uh={pie_label_show:!0,pie_label_format:void 0,pie_label_threshold:.05,pie_label_ratio: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},ch={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:function(t){return t%1==0?t:t.toFixed(2)},radar_level_text_show:!0,radar_size_ratio:.87,radar_direction_clockwise:!1};function lh(t,e){ho(pl.prototype,vf.concat(t)),ho(wl.prototype,pf),Co.setOptions(yf.concat(e||[]))}function fh(t,e){lh([qf,Hf].concat(t||[])),Co.setOptions([Jf,rh].concat(e||[]))}function hh(t,e){ho(pl.prototype,[Ff].concat(t||[])),Co.setOptions(e)}var dh=function(){return fh(Bf,[Qf]),(dh=function(){return ws.AREA})()},gh=function(){return fh(Bf,[Qf]),(gh=function(){return ws.AREA_LINE_RANGE})()},ph=function(){return fh(Bf,[Qf,ah]),(ph=function(){return ws.AREA_SPLINE})()},vh=function(){return fh(Bf,[Qf,ah]),(vh=function(){return ws.AREA_SPLINE_RANGE})()},yh=function(){return fh(Bf,[Qf]),(yh=function(){return ws.AREA_STEP})()},xh=function(){return fh(),(xh=function(){return ws.LINE})()},_h=function(){return fh(void 0,[ah]),(_h=function(){return ws.SPLINE})()},mh=function(){return fh(),(mh=function(){return ws.STEP})()},bh=function(){return hh(void 0,[oh]),(bh=function(){return ws.DONUT})()},wh=function(){return hh([Vf],[sh]),(wh=function(){return ws.GAUGE})()},Th=function(){return hh(void 0,[uh]),(Th=function(){return ws.PIE})()},Ah=function(){return hh([qf,Kf],[Jf,ch]),(Ah=function(){return ws.RADAR})()},Sh=function(){return lh([$f],th),(Sh=function(){return ws.BAR})()},kh=function(){return lh([qf,Gf],[eh,Jf]),(kh=function(){return ws.BUBBLE})()},Eh=function(){return lh([Yf],[nh]),(Eh=function(){return ws.CANDLESTICK})()},Mh=function(){return lh([qf],[Jf,ih]),(Mh=function(){return ws.SCATTER})()},Ch={selected:function(t){var e=this.internal,n=[];return e.$el.main.selectAll("."+(In.shapes+e.getTargetSelectorSuffix(t))).selectAll("."+In.shape).filter((function(){return Ln(this).classed(In.SELECTED)})).each((function(t){return n.push(t)})),n},select:function(t,e,n){var r=this.internal,i=r.config,a=r.$el;i.data_selection_enabled&&a.main.selectAll("."+In.shapes).selectAll("."+In.shape).each((function(a,o){var s=Ln(this),u=a.data?a.data.id:a.id,c=r.getToggle(this,a).bind(r),l=i.data_selection_grouped||!t||t.indexOf(u)>=0,f=!e||e.indexOf(o)>=0,h=s.classed(In.SELECTED);s.classed(In.line)||s.classed(In.area)||(l&&f?i.data_selection_isselectable.bind(r.api)(a)&&!h&&c(!0,s.classed(In.SELECTED,!0),a,o):Ya(n)&&n&&h&&c(!1,s.classed(In.SELECTED,!1),a,o))}))},unselect:function(t,e){var n=this.internal,r=n.config,i=n.$el;r.data_selection_enabled&&i.main.selectAll("."+In.shapes).selectAll("."+In.shape).each((function(i,a){var o=Ln(this),s=i.data?i.data.id:i.id,u=n.getToggle(this,i).bind(n),c=r.data_selection_grouped||!t||t.indexOf(s)>=0,l=!e||e.indexOf(a)>=0,f=o.classed(In.SELECTED);o.classed(In.line)||o.classed(In.area)||c&&l&&r.data_selection_isselectable.bind(n.api)(i)&&f&&u(!1,o.classed(In.SELECTED,!1),i,a)}))}},Oh={subchart:{show:function(){var t=this.internal,e=t.$el.subchart,n=t.config,r=n.subchart_show;if(!r){t.unbindZoomEvent(),n.subchart_show=!r,e.main||t.initSubchart();var i=e.main.selectAll("."+In.target);t.data.targets.length!==i.size()&&(t.updateSizes(),t.updateTargetsForSubchart(t.data.targets),i=e.main.selectAll("."+In.target)),i.style("opacity",null),e.main.style("display",null),this.flush()}},hide:function(){var t=this.internal,e=t.$el.subchart,n=t.config;n.subchart_show&&"none"!==e.main.style("display")&&(n.subchart_show=!1,e.main.style("display","none"),this.flush())},toggle:function(){var t=this.internal.config;this.subchart[t.subchart_show?"hide":"show"]()}}};function Rh(t){return((t=Math.exp(t))+1/t)/2}var Lh=function t(e,n,r){function i(t,i){var a,o,s=t[0],u=t[1],c=t[2],l=i[0],f=i[1],h=i[2],d=l-s,g=f-u,p=d*d+g*g;if(p<1e-12)o=Math.log(h/c)/e,a=function(t){return[s+t*d,u+t*g,c*Math.exp(e*t*o)]};else{var v=Math.sqrt(p),y=(h*h-c*c+r*p)/(2*c*n*v),x=(h*h-c*c-r*p)/(2*h*n*v),_=Math.log(Math.sqrt(y*y+1)-y),m=Math.log(Math.sqrt(x*x+1)-x);o=(m-_)/e,a=function(t){var r=t*o,i=Rh(_),a=c/(n*v)*(i*function(t){return((t=Math.exp(2*t))-1)/(t+1)}(e*r+_)-function(t){return((t=Math.exp(t))-1/t)/2}(_));return[s+a*d,u+a*g,c*i/Rh(e*r+_)]}}return a.duration=1e3*o*e/Math.SQRT2,a}return i.rho=function(e){var n=Math.max(.001,+e),r=n*n;return t(n,r,r*r)},i}(Math.SQRT2,2,4),Ih=function(t){return function(){return t}};function Dh(t,e){var n=e.sourceEvent,r=e.target,i=e.transform,a=e.dispatch;Object.defineProperties(this,{type:{value:t,enumerable:!0,configurable:!0},sourceEvent:{value:n,enumerable:!0,configurable:!0},target:{value:r,enumerable:!0,configurable:!0},transform:{value:i,enumerable:!0,configurable:!0},_:{value:a}})}function Ph(t,e,n){this.k=t,this.x=e,this.y=n}Ph.prototype={constructor:Ph,scale:function(t){return 1===t?this:new Ph(this.k*t,this.x,this.y)},translate:function(t,e){return 0===t&0===e?this:new Ph(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 zh=new Ph(1,0,0);function Fh(t){for(;!t.__zoom;)if(!(t=t.parentNode))return zh;return t.__zoom}function Nh(t){t.stopImmediatePropagation()}function jh(t){t.preventDefault(),t.stopImmediatePropagation()}function Xh(t){return!(t.ctrlKey&&"wheel"!==t.type||t.button)}function Bh(){var t=this;return t instanceof SVGElement?(t=t.ownerSVGElement||t).hasAttribute("viewBox")?[[(t=t.viewBox.baseVal).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 $h(){return this.__zoom||zh}function Uh(t){return-t.deltaY*(1===t.deltaMode?.05:t.deltaMode?1:.002)*(t.ctrlKey?10:1)}function Yh(){return navigator.maxTouchPoints||"ontouchstart"in this}function Vh(t,e,n){var r=t.invertX(e[0][0])-n[0][0],i=t.invertX(e[1][0])-n[1][0],a=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>a?(a+o)/2:Math.min(0,a)||Math.max(0,o))}Fh.prototype=Ph.prototype;var Gh=function(t){var e=this.internal,n=e.$el,r=e.config,i=e.org,a=e.scale,o=r.axis_rotated,s=e.axis.isCategorized(),u=t;if(r.zoom_enabled&&u){if(e.axis.isTimeSeries()&&(u=u.map((function(t){return So.bind(e)(t)}))),function(t,e,n){var r=n[0],i=n[1];return t.every((function(t,e){return 0===e?t>=r:t<=i}))&&(t[0]!==e[0]||t[1]!==e[1])}(u,e.getZoomDomain(!0),e.getZoomDomain())){if(s&&(u=u.map((function(t,e){return+t+(0===e?0:1)}))),e.api.tooltip.hide(),r.subchart_show){var c=a.zoom||a.x;e.brush.getSelection().call(e.brush.move,[c(u[0]),c(u[1])])}else{var l,f=s?a.x.orgScale():i.xScale||a.x,h=[-f(u[0]),0],d=(l=zh.scale(f.range()[1]/(f(u[1])-f(u[0])))).translate.apply(l,o?h.reverse():h);e.$T(n.eventRect).call(e.zoom.transform,d)}e.setZoomResetButton()}}else u=a.zoom?a.zoom.domain():a.x.orgDomain();return u};ho(Gh,{enable:function(t){var e=this.internal,n=e.config;/^(drag|wheel)$/.test(t)&&(n.zoom_type=t),n.zoom_enabled=!!t,e.zoom?!1===t&&e.bindZoomEvent(!1):(e.initZoom(),e.bindZoomEvent()),e.updateAndRedraw()},max:function(t){var e=this.internal,n=e.config,r=e.org.xDomain;return(0===t||t)&&(n.zoom_x_max=bo("max",[r[1],t])),n.zoom_x_max},min:function(t){var e=this.internal,n=e.config,r=e.org.xDomain;return(0===t||t)&&(n.zoom_x_min=bo("min",[r[0],t])),n.zoom_x_min},range:function(t){var e=this.zoom;if(Qa(t)){var n=t.min,r=t.max;Ya(n)&&e.min(n),Ya(r)&&e.max(r)}return{min:e.min(),max:e.max()}}});var Hh={zoom:Gh,unzoom:function(){var t,e=this.internal,n=e.config,r=e.$el,i=r.eventRect,a=r.zoomResetBtn;e.scale.zoom&&(n.subchart_show?e.brush.getSelection().call(e.brush.move,null):e.zoom.updateTransformScale(zh),e.updateZoom(!0),null!=(t=a)&&t.style("display","none"),Fh(i.node())!==zh&&e.zoom.transform(i,zh))}};function Wh(t,e){var n=Object.keys(t);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(t);e&&(r=r.filter((function(e){return Object.getOwnPropertyDescriptor(t,e).enumerable}))),n.push.apply(n,r)}return n}function qh(t){for(var e,n=1;n<arguments.length;n++)e=null==arguments[n]?{}:arguments[n],n%2?Wh(Object(e),!0).forEach((function(n){zn(t,n,e[n])})):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(e)):Wh(Object(e)).forEach((function(n){Object.defineProperty(t,n,Object.getOwnPropertyDescriptor(e,n))}));return t}var Zh=qh(qh({},{drag:function(t){var e=this,n=e.config,r=e.state,i=e.$el.main,a=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){var s=r.dragStart||[0,0],u=s[0],c=s[1],l=t[0],f=t[1],h=Math.min(u,l),d=Math.max(u,l),g=a?r.margin.top:Math.min(c,f),p=a?r.height:Math.max(c,f);i.select("."+In.dragarea).attr("x",h).attr("y",g).attr("width",d-h).attr("height",p-g),i.selectAll("."+In.shapes).selectAll("."+In.shape).filter((function(t){return o&&o.bind(e.api)(t)})).each((function(t,n){var r,i=Ln(this),a=i.classed(In.SELECTED),o=i.classed(In.INCLUDED),s=!1;if(i.classed(In.circle)){var u=1*+i.attr("cx"),c=1*+i.attr("cy");r=e.togglePoint,s=h<u&&u<d&&g<c&&c<p}else{if(!i.classed(In.bar))return;var l=function(t){var e=t.getBoundingClientRect(),n=e.width,r=e.height,i=ao(t);return{x:i[0].x,y:Math.min(i[0].y,i[1].y),width:n,height:r}}(this),f=l.x,v=(c=l.y,l.width),y=l.height;r=e.togglePath,s=!(d<f||f+v<h||p<c||c+y<g)}s^o&&(i.classed(In.INCLUDED,!o),i.classed(In.SELECTED,!a),r.call(e,!a,i,t,n))}))}},dragstart:function(t){var e=this,n=e.config,r=e.state,i=e.$el.main;e.hasArcType()||!n.data_selection_enabled||(r.dragStart=t,i.select("."+In.chart).append("rect").attr("class",In.dragarea).style("opacity","0.1"),e.setDragStatus(!0))},dragend:function(){var t=this,e=t.config,n=t.$el.main;t.hasArcType()||!e.data_selection_enabled||(n.select("."+In.dragarea).transition().duration(100).style("opacity","0").remove(),n.selectAll("."+In.shape).classed(In.INCLUDED,!1),t.setDragStatus(!1))}}),{},{selectPoint:function(t,e,n){var r=this,i=r.config,a=r.$el.main,o=i.axis_rotated,s=(o?r.circleY:r.circleX).bind(r),u=(o?r.circleX:r.circleY).bind(r),c=r.pointSelectR.bind(r);eo(i.data_onselected,r.api,e,t.node()),a.select("."+In.selectedCircles+r.getTargetSelectorSuffix(e.id)).selectAll("."+In.selectedCircle+"-"+n).data([e]).enter().append("circle").attr("class",(function(){return r.generateClass(In.selectedCircle,n)})).attr("cx",s).attr("cy",u).attr("stroke",r.color).attr("r",(function(t){return 1.4*r.pointSelectR(t)})).transition().duration(100).attr("r",c)},unselectPoint:function(t,e,n){var r=this,i=r.config,a=r.$el;eo(i.data_onunselected,r.api,e,t.node()),a.main.select("."+In.selectedCircles+r.getTargetSelectorSuffix(e.id)).selectAll("."+In.selectedCircle+"-"+n).transition().duration(100).attr("r",0).remove()},togglePoint:function(t,e,n,r){this[(t?"":"un")+"selectPoint"](e,n,r)},selectPath:function(t,e){var n=this,r=n.config;eo(r.data_onselected,n.api,e,t.node()),r.interaction_brighten&&t.transition().duration(100).style("fill",(function(){return br(n.color(e)).brighter(.75)}))},unselectPath:function(t,e){var n=this,r=n.config;eo(r.data_onunselected,n.api,e,t.node()),r.interaction_brighten&&t.transition().duration(100).style("fill",(function(){return n.color(e)}))},togglePath:function(t,e,n,r){this[(t?"":"un")+"selectPath"](e,n,r)},getToggle:function(t,e){var n=this;return"path"===t.nodeName?n.togglePath:n.isStepType(e)?function(){}:n.togglePoint},toggleShape:function(t,e,n){var r,i=this,a=i.config,o=i.$el.main,s=Ln(t),u=s.classed(In.SELECTED),c=i.getToggle(t,e).bind(i);if(a.data_selection_enabled&&a.data_selection_isselectable.bind(i.api)(e)){if(!a.data_selection_multiple){var l="."+In.shapes;a.data_selection_grouped&&(l+=i.getTargetSelectorSuffix(e.id)),o.selectAll(l).selectAll("."+In.shape).each((function(t,e){var n=Ln(this);n.classed(In.SELECTED)&&(r=n,c(!1,n.classed(In.SELECTED,!1),t,e))}))}r&&r.node()===s.node()||(s.classed(In.SELECTED,!u),c(!u,s,e,n))}}}),Kh={initBrush:function(){var t,e,n=this,r=n.config,i=n.scale,a=n.$el.subchart,o=r.axis_rotated;n.brush=Da(o?ba:ma).handleSize(5);n.brush.on("start brush end",(function(e){var r=e.selection,a=e.target,s=e.type;"start"===s&&"touch"===n.state.inputType&&n.hideTooltip(),/(start|brush)/.test(s)&&n.redrawForBrush(),"end"===s&&(t=i.x.orgDomain()),(null==a?void 0:a.handle)&&(null===r?n.brush.handle.attr("display","none"):n.brush.handle.attr("display",null).attr("transform",(function(t,e){return"translate("+(o?[33,r[e]-(0===e?30:24)]:[r[e],3])+")"})))})),n.brush.updateResize=function(){var n=this;e&&clearTimeout(e),e=setTimeout((function(){var e=n.getSelection();t&&Ia(e.node())&&n.move(e,t.map(i.subX.orgScale()))}),0)},n.brush.update=function(){return 0===this.extent()()[1].filter((function(t){return isNaN(t)})).length&&a.main&&a.main.select("."+In.brush).call(this),this},n.brush.scale=function(t){var e=r.subchart_size_height||function(){var t=n.$el.svg.select("."+In.brush+" .overlay"),e={width:0,height:0};return t.size()&&(e.width=+t.attr("width"),e.height=+t.attr("height")),e[o?"width":"height"]}(),i=n.getExtent();!i&&t.range?i=[[0,0],[t.range()[1],e]]:Ja(i)&&(i=i.map((function(t,n){return[t,n>0?e:n]}))),o&&i[1].reverse(),this.extent(i),this.update()},n.brush.getSelection=function(){return a.main?a.main.select("."+In.brush):Ln([])}},initSubchart:function(){var t=this,e=t.config,n=t.state,r=n.clip,i=n.hasAxis,a=t.$el,o=a.defs,s=a.svg,u=a.subchart,c=a.axis;if(i){var l=e.subchart_show?null:"hidden",f=r.id+"-subchart",h=t.getClipPath(f);r.idSubchart=f,t.appendClip(o,f),t.initBrush(),u.main=s.append("g").classed(In.subchart,!0).attr("transform",t.getTranslate("context"));var d=u.main;d.style("visibility",l),d.append("g").attr("clip-path",h).attr("class",In.chart),["bar","line","bubble","candlestick","scatter"].forEach((function(e){var n=go(/^(bubble|scatter)$/.test(e)?"circle":e);if(t.hasType(e)||t.hasTypeOf(n)){var r=d.select("."+In.chart),i=In["chart"+n+"s"];r.select("."+i).empty()&&r.append("g").attr("class",i)}}));var g=d.append("g").attr("clip-path",h).attr("class",In.brush).call(t.brush);e.subchart_showHandle&&t.addBrushHandle(g),c.subX=d.append("g").attr("class",In.axisX).attr("transform",t.getTranslate("subX")).attr("clip-path",e.axis_rotated?"":r.pathXAxis).style("visibility",e.subchart_axis_x_show?l:"hidden")}},addBrushHandle:function(t){var e=this.config,n=e.axis_rotated,r=e.subchart_init_range,i="handle--custom",a=n?["M 5.2491724,29.749209 a 6,6 0 0 0 -5.50000003,-6.5 H -5.7508276 a 6,6 0 0 0 -6.0000004,6.5 z m -5.00000003,-2 H -6.7508276 m 6.99999997,-2 H -6.7508276Z","M 5.2491724,23.249172 a 6,-6 0 0 1 -5.50000003,6.5 H -5.7508276 a 6,-6 0 0 1 -6.0000004,-6.5 z m -5.00000003,2 H -6.7508276 m 6.99999997,2 H -6.7508276Z"]:["M 0 18 A 6 6 0 0 0 -6.5 23.5 V 29 A 6 6 0 0 0 0 35 Z M -2 23 V 30 M -4 23 V 30Z","M 0 18 A 6 6 0 0 1 6.5 23.5 V 29 A 6 6 0 0 1 0 35 Z M 2 23 V 30 M 4 23 V 30Z"];this.brush.handle=t.selectAll(".handle--custom").data(n?[{type:"n"},{type:"s"}]:[{type:"w"},{type:"e"}]).enter().append("path").attr("class",i).attr("cursor",(n?"ns":"ew")+"-resize").attr("d",(function(t){return a[+/[se]/.test(t.type)]})).attr("display",r?null:"none")},updateTargetsForSubchart:function(t){var e=this,n=e.config,r=e.state,i=e.$el.subchart.main;n.subchart_show&&(["bar","line","bubble","candlestick","scatter"].filter((function(t){return e.hasType(t)||e.hasTypeOf(go(t))})).forEach((function(n){var r=/^(bubble|scatter)$/.test(n),a=go(r?"circle":n),o=e.getChartClass(a,!0),s=e.getClass(r?"circles":n+"s",!0),u=i.select("."+In["chart"+a+"s"]);if(r){var c=u.selectAll("."+In.circles).data(t.filter(e["is"+go(n)+"Type"].bind(e))).attr("class",s);c.exit().remove(),c.enter().append("g").attr("class",s)}else{var l=u.selectAll("."+In["chart"+a]).attr("class",o).data(t.filter(e["is"+a+"Type"].bind(e))),f=l.enter().append("g").style("opacity","0").attr("class",o).append("g").attr("class",s);l.exit().remove(),"line"===n&&e.hasTypeOf("Area")&&f.append("g").attr("class",e.getClass("areas",!0))}})),i.selectAll("."+In.brush+" rect").attr(n.axis_rotated?"width":"height",n.axis_rotated?r.width2:r.height2))},redrawSubchart:function(t,e,n){var r=this,i=r.config,a=r.$el.subchart.main,o=r.state,s=!!e;if(a.style("visibility",i.subchart_show?null:"hidden"),i.subchart_show&&(o.event&&"zoom"===o.event.type&&r.brush.update(),t)){var u=i.subchart_init_range;if(fo(r)||r.brush.update(),Object.keys(n.type).forEach((function(t){var i=go(t),a=r["generateDraw"+i](n.indices[t],!0);r["update"+i](e,!0),r["redraw"+i](a,s,!0)})),r.hasType("bubble")||r.hasType("scatter")){var c=n.pos.cx,l=r.updateCircleY(!0);r.updateCircle(!0),r.redrawCircle(c,l,s,void 0,!0)}!o.rendered&&u&&r.brush.move(r.brush.getSelection(),u.map(r.scale.x))}},redrawForBrush:function(){var t=this,e=t.config,n=e.subchart_onbrush,r=e.zoom_rescale,i=t.scale;t.redraw({withTransition:!1,withY:r,withSubchart:!1,withUpdateXDomain:!0,withDimension:!1}),n.bind(t.api)(i.x.orgDomain())},transformContext:function(t,e){var n,r=this,i=r.$el.subchart.main;e&&e.axisSubX?n=e.axisSubX:(n=i.select("."+In.axisX),t&&(n=n.transition())),i.attr("transform",r.getTranslate("context")),n.attr("transform",r.getTranslate("subX"))},getExtent:function(){var t=this,e=t.config,n=t.scale,r=e.axis_x_extent;if(r)if(Xa(r))r=r.bind(t.api)(t.getXDomain(t.data.targets),n.subX);else if(t.axis.isTimeSeries()&&r.every(isNaN)){var i=So.bind(t);r=r.map((function(t){return n.subX(i(t))}))}return r}},Jh={initZoom:function(){var t=this;t.scale.zoom=null,t.generateZoom(),t.initZoomBehaviour()},bindZoomEvent:function(t){void 0===t&&(t=!0);var e=this,n=e.config;n.zoom_enabled&&t?!n.subchart_show&&e.bindZoomOnEventRect():!1===t&&(e.api.unzoom(),e.unbindZoomEvent())},generateZoom:function(){var t=this,e=t.config,n=t.org,r=t.scale,i=function(){function t(t){t.property("__zoom",$h).on("wheel.zoom",s).on("mousedown.zoom",u).on("dblclick.zoom",c).filter(m).on("touchstart.zoom",l).on("touchmove.zoom",f).on("touchend.zoom touchcancel.zoom",h).style("-webkit-tap-highlight-color","rgba(0,0,0,0)")}function e(t,e){return(e=Math.max(b[0],Math.min(b[1],e)))===t.k?t:new Ph(e,t.x,t.y)}function n(t,e,n){var r=e[0]-n[0]*t.k,i=e[1]-n[1]*t.k;return r===t.x&&i===t.y?t:new Ph(t.k,r,i)}function r(t){return[(+t[0][0]+ +t[1][0])/2,(+t[0][1]+ +t[1][1])/2]}function i(t,e,n,i){t.on("start.zoom",(function(){a(this,arguments).event(i).start()})).on("interrupt.zoom end.zoom",(function(){a(this,arguments).event(i).end()})).tween("zoom",(function(){var t=this,o=arguments,s=a(t,o).event(i),u=y.apply(t,o),c=null==n?r(u):"function"==typeof n?n.apply(t,o):n,l=Math.max(u[1][0]-u[0][0],u[1][1]-u[0][1]),f=t.__zoom,h="function"==typeof e?e.apply(t,o):e,d=A(f.invert(c).concat(l/f.k),h.invert(c).concat(l/h.k));return function(t){if(1===t)t=h;else{var e=d(t),n=l/e[2];t=new Ph(n,c[0]-e[0]*n,c[1]-e[1]*n)}s.zoom(null,t)}}))}function a(t,e,n){return!n&&t.__zooming||new o(t,e)}function o(t,e){this.that=t,this.args=e,this.active=0,this.sourceEvent=null,this.extent=y.apply(t,e),this.taps=0}function s(t){function r(){u.wheel=null,u.end()}for(var i=arguments.length,o=Array(i>1?i-1:0),s=1;s<i;s++)o[s-1]=arguments[s];if(v.apply(this,arguments)){var u=a(this,o).event(t),c=this.__zoom,l=Math.max(b[0],Math.min(b[1],c.k*Math.pow(2,_.apply(this,arguments)))),f=Yn(t);if(u.wheel)(u.mouse[0][0]!==f[0]||u.mouse[0][1]!==f[1])&&(u.mouse[1]=c.invert(u.mouse[0]=f)),clearTimeout(u.wheel);else{if(c.k===l)return;u.mouse=[f,c.invert(f)],yi(this),u.start()}jh(t),u.wheel=setTimeout(r,150),u.zoom("mouse",x(n(e(c,l),u.mouse[0],u.mouse[1]),u.extent,w))}}function u(t){function e(t){if(jh(t),!u.moved){var e=t.clientX-h,r=t.clientY-d;u.moved=e*e+r*r>k}u.event(t).zoom("mouse",x(n(u.that.__zoom,u.mouse[0]=Yn(t,f),u.mouse[1]),u.extent,w))}function r(t){c.on("mousemove.zoom mouseup.zoom",null),er(t.view,u.moved),jh(t),u.event(t).end()}for(var i=arguments.length,o=Array(i>1?i-1:0),s=1;s<i;s++)o[s-1]=arguments[s];if(!p&&v.apply(this,arguments)){var u=a(this,o,!0).event(t),c=Ln(t.view).on("mousemove.zoom",e,!0).on("mouseup.zoom",r,!0),l=Yn(t,f),f=t.currentTarget,h=t.clientX,d=t.clientY;tr(t.view),Nh(t),u.mouse=[l,this.__zoom.invert(l)],yi(this),u.start()}}function c(r){for(var a=arguments.length,o=Array(a>1?a-1:0),s=1;s<a;s++)o[s-1]=arguments[s];if(v.apply(this,arguments)){var u=this.__zoom,c=Yn(r.changedTouches?r.changedTouches[0]:r,this),l=u.invert(c),f=u.k*(r.shiftKey?.5:2),h=x(n(e(u,f),c,l),y.apply(this,o),w);jh(r),T>0?Ln(this).transition().duration(T).call(i,h,c,r):Ln(this).call(t.transform,h,c,r)}}function l(t){for(var e=arguments.length,n=Array(e>1?e-1:0),r=1;r<e;r++)n[r-1]=arguments[r];if(v.apply(this,arguments)){var i,o,s,u,c=t.touches,l=c.length,f=a(this,n,t.changedTouches.length===l).event(t);for(Nh(t),o=0;o<l;++o)u=[u=Yn(s=c[o],this),this.__zoom.invert(u),s.identifier],f.touch0?!f.touch1&&f.touch0[2]!==u[2]&&(f.touch1=u,f.taps=0):(f.touch0=u,i=!0,f.taps=1+!!d);d&&(d=clearTimeout(d)),i&&(f.taps<2&&(g=u[0],d=setTimeout((function(){d=null}),500)),yi(this),f.start())}}function f(t){if(this.__zooming){for(var r=arguments.length,i=Array(r>1?r-1:0),o=1;o<r;o++)i[o-1]=arguments[o];var s,u,c,l,f=a(this,i).event(t),h=t.changedTouches,d=h.length;for(jh(t),s=0;s<d;++s)c=Yn(u=h[s],this),f.touch0&&f.touch0[2]===u.identifier?f.touch0[0]=c:f.touch1&&f.touch1[2]===u.identifier&&(f.touch1[0]=c);if(u=f.that.__zoom,f.touch1){var g=f.touch0[0],p=f.touch0[1],v=f.touch1[0],y=f.touch1[1],_=(_=v[0]-g[0])*_+(_=v[1]-g[1])*_,m=(m=y[0]-p[0])*m+(m=y[1]-p[1])*m;u=e(u,Math.sqrt(_/m)),c=[(g[0]+v[0])/2,(g[1]+v[1])/2],l=[(p[0]+y[0])/2,(p[1]+y[1])/2]}else{if(!f.touch0)return;c=f.touch0[0],l=f.touch0[1]}f.zoom("touch",x(n(u,c,l),f.extent,w))}}function h(t){for(var e=arguments.length,n=Array(e>1?e-1:0),r=1;r<e;r++)n[r-1]=arguments[r];if(this.__zooming){var i,o,s=a(this,n).event(t),u=t.changedTouches,c=u.length;for(Nh(t),p&&clearTimeout(p),p=setTimeout((function(){p=null}),500),i=0;i<c;++i)o=u[i],s.touch0&&s.touch0[2]===o.identifier?delete s.touch0:s.touch1&&s.touch1[2]===o.identifier&&delete s.touch1;if(s.touch1&&!s.touch0&&(s.touch0=s.touch1,delete s.touch1),s.touch0)s.touch0[1]=this.__zoom.invert(s.touch0[0]);else if(s.end(),2===s.taps&&(o=Yn(o,this),Math.hypot(g[0]-o[0],g[1]-o[1])<E)){var l=Ln(this).on("dblclick.zoom");l&&l.apply(this,arguments)}}}var d,g,p,v=Xh,y=Bh,x=Vh,_=Uh,m=Yh,b=[0,1/0],w=[[-1/0,-1/0],[1/0,1/0]],T=250,A=Lh,S=Kn("start","zoom","end"),k=0,E=10;return t.transform=function(t,e,n,r){var o=t.selection?t.selection():t;o.property("__zoom",$h),t===o?o.interrupt().each((function(){a(this,arguments).event(r).start().zoom(null,"function"==typeof e?e.apply(this,arguments):e).end()})):i(t,e,n,r)},t.scaleBy=function(e,n,r,i){t.scaleTo(e,(function(){return this.__zoom.k*("function"==typeof n?n.apply(this,arguments):n)}),r,i)},t.scaleTo=function(i,a,o,s){t.transform(i,(function(){var t=y.apply(this,arguments),i=this.__zoom,s=null==o?r(t):"function"==typeof o?o.apply(this,arguments):o,u=i.invert(s),c="function"==typeof a?a.apply(this,arguments):a;return x(n(e(i,c),s,u),t,w)}),o,s)},t.translateBy=function(e,n,r,i){t.transform(e,(function(){return x(this.__zoom.translate("function"==typeof n?n.apply(this,arguments):n,"function"==typeof r?r.apply(this,arguments):r),y.apply(this,arguments),w)}),null,i)},t.translateTo=function(e,n,i,a,o){t.transform(e,(function(){var t=y.apply(this,arguments),e=this.__zoom,o=null==a?r(t):"function"==typeof a?a.apply(this,arguments):a;return x(zh.translate(o[0],o[1]).scale(e.k).translate("function"==typeof n?-n.apply(this,arguments):-n,"function"==typeof i?-i.apply(this,arguments):-i),t,w)}),a,o)},o.prototype={event:function(t){return t&&(this.sourceEvent=t),this},start:function(){return 1==++this.active&&(this.that.__zooming=this,this.emit("start")),this},zoom:function(t,e){return this.mouse&&"mouse"!==t&&(this.mouse[1]=e.invert(this.mouse[0])),this.touch0&&"touch"!==t&&(this.touch0[1]=e.invert(this.touch0[0])),this.touch1&&"touch"!==t&&(this.touch1[1]=e.invert(this.touch1[0])),this.that.__zoom=e,this.emit("zoom"),this},end:function(){return 0==--this.active&&(delete this.that.__zooming,this.emit("end")),this},emit:function(e){var n=Ln(this.that).datum();S.call(e,this.that,new Dh(e,{sourceEvent:this.sourceEvent,target:t,type:e,transform:this.that.__zoom,dispatch:S}),n)}},t.wheelDelta=function(e){return arguments.length?(_="function"==typeof e?e:Ih(+e),t):_},t.filter=function(e){return arguments.length?(v="function"==typeof e?e:Ih(!!e),t):v},t.touchable=function(e){return arguments.length?(m="function"==typeof e?e:Ih(!!e),t):m},t.extent=function(e){return arguments.length?(y="function"==typeof e?e:Ih([[+e[0][0],+e[0][1]],[+e[1][0],+e[1][1]]]),t):y},t.scaleExtent=function(e){return arguments.length?(b[0]=+e[0],b[1]=+e[1],t):[b[0],b[1]]},t.translateExtent=function(e){return arguments.length?(w[0][0]=+e[0][0],w[1][0]=+e[1][0],w[0][1]=+e[0][1],w[1][1]=+e[1][1],t):[[w[0][0],w[0][1]],[w[1][0],w[1][1]]]},t.constrain=function(e){return arguments.length?(x=e,t):x},t.duration=function(e){return arguments.length?(T=+e,t):T},t.interpolate=function(e){return arguments.length?(A=e,t):A},t.on=function(){var e=S.on.apply(S,arguments);return e===S?t:e},t.clickDistance=function(e){return arguments.length?(k=(e=+e)*e,t):Math.sqrt(k)},t.tapDistance=function(e){return arguments.length?(E=+e,t):E},t}().duration(0).on("start",t.onZoomStart.bind(t)).on("zoom",t.onZoom.bind(t)).on("end",t.onZoomEnd.bind(t));i.orgScaleExtent=function(){var n=e.zoom_extent||[1,10];return[n[0],Math.max(t.getMaxDataCount()/n[1],n[1])]},i.updateScaleExtent=function(){var e=Wa(t.scale.x.orgDomain())/Wa(t.getZoomDomain()),n=this.orgScaleExtent();return this.scaleExtent([n[0]*e,n[1]*e]),this},i.updateTransformScale=function(i){n.xScale&&n.xScale.range(r.x.range());var a=i[e.axis_rotated?"rescaleY":"rescaleX"](n.xScale||r.x),o=t.trimXDomain(a.domain()),s=e.zoom_rescale;a.domain(o,n.xDomain),t.state.xTickOffset||(t.state.xTickOffset=t.axis.x.tickOffset()),r.zoom=t.getCustomizedScale(a),t.axis.x.scale(r.zoom),s&&(!n.xScale&&(n.xScale=r.x.copy()),r.x.domain(o))},i.getDomain=function(){var e=r[r.zoom?"zoom":"subX"].domain();return t.axis.isCategorized()&&(e[1]-=2),e},t.zoom=i},onZoomStart:function(t){var e=this,n=t.sourceEvent;n&&(e.zoom.startEvent=n,e.state.zooming=!0,eo(e.config.zoom_onzoomstart,e.api,t))},onZoom:function(t){var e,n,r,i,a=this,o=a.config,s=a.scale,u=a.state,c=a.org,l=t.sourceEvent,f=(null==t?void 0:t.transform)===zh;if(o.zoom_enabled&&0!==a.filterTargetsToShow(a.data.targets).length&&(s.zoom||!((null==(e=l)?void 0:e.type.indexOf("touch"))>-1)||1!==(null==(n=l)?void 0:n.touches.length))){var h="mousemove"===(null==(r=l)?void 0:r.type),d=(null==(i=l)?void 0:i.wheelDelta)<0,g=t.transform;!h&&d&&s.x.domain().every((function(t,e){return t!==c.xDomain[e]}))&&s.x.domain(c.xDomain),a.zoom.updateTransformScale(g);var p=o.transition_duration>0&&!o.subchart_show&&(u.dragging||f);a.redraw({withTransition:p,withY:o.zoom_rescale,withSubchart:!1,withEventRect:!1,withDimension:!1}),a.state.cancelClick=h,f||eo(o.zoom_onzoom,a.api,a.zoom.getDomain())}},onZoomEnd:function(t){var e=this,n=e.config,r=e.state,i=e.zoom.startEvent,a=null==t?void 0:t.sourceEvent,o=(null==t?void 0:t.transform)===zh;i&&i.type.indexOf("touch")>-1&&(i=i.changedTouches[0],a=a.changedTouches[0]),"drag"===n.zoom_type&&a&&i.clientX===a.clientX&&i.clientY===a.clientY||(e.redrawEventRect(),e.updateZoom(),r.zooming=!1,!o&&eo(n.zoom_onzoomend,e.api,e.zoom.getDomain()))},updateZoom:function(t){var e=this,n=e.scale,r=n.subX,i=n.x,a=n.zoom;if(a){var o=a.domain(),s=r.domain(),u=(o[0]<=s[0]||o[0]-.015<=s[0])&&(s[1]<=o[1]||s[1]<=o[1]-.015);(t||u)&&(e.axis.x.scale(r),i.domain(r.orgDomain()),e.scale.zoom=null)}},bindZoomOnEventRect:function(){var t=this,e=t.config,n=t.$el.eventRect,r="drag"===e.zoom_type?t.zoomBehaviour:t.zoom;t.$el.svg.on("wheel",(function(){})),n.call(r).on("dblclick.zoom",null)},initZoomBehaviour:function(){var t,e=this,n=e.config,r=e.state,i=n.axis_rotated,a=0,o=0,s={axis:i?"y":"x",attr:i?"height":"width",index:i?1:0};e.zoomBehaviour=hs().clickDistance(4).on("start",(function(n){r.event=n,e.setDragStatus(!0),e.unselectRect(),t||(t=e.$el.main.append("rect").attr("clip-path",r.clip.path).attr("class",In.zoomBrush).attr("width",i?r.width:0).attr("height",i?0:r.height)),a=oo(n,this)[s.index],o=a,t.attr(s.axis,a).attr(s.attr,0),e.onZoomStart(n)})).on("drag",(function(e){o=oo(e,this)[s.index],t.attr(s.axis,Math.min(a,o)).attr(s.attr,Math.abs(o-a))})).on("end",(function(n){var i,u=e.scale.zoom||e.scale.x;r.event=n,t.attr(s.axis,0).attr(s.attr,0),a>o&&(a=(i=[o,a])[0],o=i[1]),a<0&&(o+=Math.abs(a),a=0),a!==o&&e.api.zoom([a,o].map((function(t){return u.invert(t)}))),e.setDragStatus(!1)}))},setZoomResetButton:function(){var t=this,e=t.config,n=t.$el,r=e.zoom_resetButton;r&&"drag"===e.zoom_type&&(n.zoomResetBtn?n.zoomResetBtn.style("display",null):n.zoomResetBtn=t.$el.chart.append("div").classed(In.button,!0).append("span").on("click",(function(){Xa(r.onclick)&&r.onclick.bind(t.api)(this),t.api.unzoom()})).classed(In.buttonZoomReset,!0).text(r.text||"Reset Zoom"))}},Qh={data_selection_enabled:!1,data_selection_grouped:!1,data_selection_isselectable:function(){return!0},data_selection_multiple:!0,data_selection_draggable:!1,data_onselected:function(){},data_onunselected:function(){}},td={subchart_show:!1,subchart_showHandle:!1,subchart_size_height:60,subchart_axis_x_show:!0,subchart_axis_x_tick_show:!0,subchart_axis_x_tick_text_show:!0,subchart_init_range:void 0,subchart_onbrush:function(){}},ed={zoom_enabled:!1,zoom_type:"wheel",zoom_extent:void 0,zoom_privileged:!1,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},nd=function(){return ho(pl.prototype,Zh),ho(wl.prototype,Ch),Co.setOptions([Qh]),(nd=function(){return!0})()},rd=function(){return ho(pl.prototype,Kh),ho(wl.prototype,Oh),Co.setOptions([td]),(rd=function(){return!0})()},id=function(){return ho(pl.prototype,Jh),ho(wl.prototype,Hh),Co.setOptions([ed]),(id=function(){return!0})()},ad={},od={version:"3.1.5",generate:function(t){var e=_o({},ad,t),n=new wl(e);return n.internal.charts=this.instance,this.instance.push(n),n},defaults:function(t){return Qa(t)&&(ad=t),ad},instance:[],plugin:{}};Object.keys(r).forEach((function(t){return r[t]()})),Object.keys(i).forEach((function(t){return i[t]()}))},function(t,e,n){t.exports=n(402)}],e={};function n(r){var i=e[r];if(void 0!==i)return i.exports;var a=e[r]={exports:{}};return t[r](a,a.exports,n),a.exports}return n.n=function(t){var e=t&&t.__esModule?function(){return t.default}:function(){return t};return n.d(e,{a:e}),e},n.d=function(t,e){for(var r in e)n.o(e,r)&&!n.o(t,r)&&Object.defineProperty(t,r,{enumerable:!0,get:e[r]})},n.o=function(t,e){return Object.prototype.hasOwnProperty.call(t,e)},n.r=function(t){"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(t,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(t,"__esModule",{value:!0})},n(0),n(403)}()}));