25 | !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(369);var r=n(36);t.exports=r},function(t,e,n){n(2),n(66),n(67),n(68),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(92),n(97),n(98),n(99),n(101),n(104),n(106),n(108),n(109),n(110),n(111),n(113),n(114),n(116),n(117),n(118),n(119),n(121),n(122),n(124),n(125),n(126),n(127),n(128),n(129),n(130),n(132),n(133),n(134),n(138),n(140),n(141),n(142),n(143),n(145),n(146),n(147),n(148),n(150),n(153),n(154),n(155),n(156),n(157),n(158),n(160),n(161),n(162),n(163),n(164),n(165),n(166),n(167),n(168),n(170),n(172),n(173),n(174),n(175),n(176),n(177),n(179),n(183),n(184),n(192),n(194),n(198),n(199),n(200),n(202),n(203),n(204),n(205),n(209),n(210),n(211),n(212),n(215),n(216),n(217),n(218),n(219),n(220),n(221),n(222),n(223),n(224),n(225),n(226),n(227),n(228),n(186),n(230),n(231),n(232),n(233),n(234),n(236),n(238),n(239),n(240),n(242),n(244),n(245),n(246),n(247),n(248),n(249),n(250),n(252),n(253),n(255),n(256),n(257),n(259),n(260),n(262),n(263),n(265),n(266),n(267),n(268),n(269),n(270),n(271),n(272),n(273),n(274),n(275),n(276),n(277),n(279),n(280),n(282),n(283),n(284),n(296),n(297),n(298),n(299),n(302),n(303),n(305),n(306),n(311),n(313),n(314),n(315),n(321),n(322),n(323),n(324),n(325),n(326),n(327),n(328),n(329),n(330),n(331),n(332),n(333),n(334),n(336),n(337),n(338),n(339),n(340),n(341),n(342),n(343),n(344),n(345),n(346),n(347),n(348),n(349),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(362),n(363),n(364),n(365),n(366),n(367),n(368);var r=n(36);t.exports=r},function(t,e,n){"use strict";var r=n(3),i=n(4),a=n(35),o=n(30),s=n(6),u=n(46),c=n(50),l=n(7),f=n(16),h=n(51),d=n(15),g=n(21),p=n(52),v=n(10),y=n(14),x=n(9),_=n(53),m=n(55),b=n(37),w=n(57),T=n(44),A=n(5),S=n(20),E=n(8),k=n(19),M=n(22),O=n(29),C=n(28),R=n(32),L=n(31),I=n(58),D=n(59),P=n(60),z=n(61),F=n(26),N=n(62).forEach,X=C("hidden"),j="Symbol",B=I("toPrimitive"),$=F.set,U=F.getterFor(j),Y=Object.prototype,V=i.Symbol,G=a("JSON","stringify"),H=A.f,W=S.f,q=w.f,Z=E.f,K=O("symbols"),J=O("op-symbols"),Q=O("string-to-symbol-registry"),tt=O("symbol-to-string-registry"),et=O("wks"),nt=i.QObject,rt=!nt||!nt.prototype||!nt.prototype.findChild,it=s&&l((function(){return 7!=_(W({},"a",{get:function(){return W(this,"a",{value:7}).a}})).a}))?function(t,e,n){var r=H(Y,e);r&&delete Y[e],W(t,e,n),r&&t!==Y&&W(Y,e,r)}:W,at=function(t,e){var n=K[t]=_(V.prototype);return $(n,{type:j,tag:t,description:e}),s||(n.description=e),n},ot=c?function(t){return"symbol"==typeof t}:function(t){return Object(t)instanceof V},st=function(t,e,n){t===Y&&st(J,e,n),g(t);var r=y(e,!0);return g(n),f(K,r)?(n.enumerable?(f(t,X)&&t[X][r]&&(t[X][r]=!1),n=_(n,{enumerable:x(0,!1)})):(f(t,X)||W(t,X,x(1,{})),t[X][r]=!0),it(t,r,n)):W(t,r,n)},ut=function(t,e){g(t);var n=v(e),r=m(n).concat(ht(n));return N(r,(function(e){s&&!ct.call(n,e)||st(t,e,n[e])})),t},ct=function(t){var e=y(t,!0),n=Z.call(this,e);return!(this===Y&&f(K,e)&&!f(J,e))&&(!(n||!f(this,e)||!f(K,e)||f(this,X)&&this[X][e])||n)},lt=function(t,e){var n=v(t),r=y(e,!0);if(n!==Y||!f(K,r)||f(J,r)){var i=H(n,r);return!i||!f(K,r)||f(n,X)&&n[X][r]||(i.enumerable=!0),i}},ft=function(t){var e=q(v(t)),n=[];return N(e,(function(t){f(K,t)||f(R,t)||n.push(t)})),n},ht=function(t){var e=t===Y,n=q(e?J:v(t)),r=[];return N(n,(function(t){!f(K,t)||e&&!f(Y,t)||r.push(K[t])})),r};(u||(M((V=function(){if(this instanceof V)throw TypeError("Symbol is not a constructor");var t=arguments.length&&void 0!==arguments[0]?String(arguments[0]):void 0,e=L(t),n=function(t){this===Y&&n.call(J,t),f(this,X)&&f(this[X],e)&&(this[X][e]=!1),it(this,e,x(1,t))};return s&&rt&&it(Y,e,{configurable:!0,set:n}),at(e,t)}).prototype,"toString",(function(){return U(this).tag})),M(V,"withoutSetter",(function(t){return at(L(t),t)})),E.f=ct,S.f=st,A.f=lt,b.f=w.f=ft,T.f=ht,D.f=function(t){return at(I(t),t)},s&&(W(V.prototype,"description",{configurable:!0,get:function(){return U(this).description}}),o||M(Y,"propertyIsEnumerable",ct,{unsafe:!0}))),r({global:!0,wrap:!0,forced:!u,sham:!u},{Symbol:V}),N(m(et),(function(t){P(t)})),r({target:j,stat:!0,forced:!u},{for:function(t){var e=String(t);if(f(Q,e))return Q[e];var n=V(e);return Q[e]=n,tt[n]=e,n},keyFor:function(t){if(!ot(t))throw TypeError(t+" is not a symbol");if(f(tt,t))return tt[t]},useSetter:function(){rt=!0},useSimple:function(){rt=!1}}),r({target:"Object",stat:!0,forced:!u,sham:!s},{create:function(t,e){return void 0===e?_(t):ut(_(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:l((function(){T.f(1)}))},{getOwnPropertySymbols:function(t){return T.f(p(t))}}),G)&&r({target:"JSON",stat:!0,forced:!u||l((function(){var t=V();return"[null]"!=G([t])||"{}"!=G({a:t})||"{}"!=G(Object(t))}))},{stringify:function(t,e,n){for(var r,i=[t],a=1;arguments.length>a;)i.push(arguments[a++]);if(r=e,(d(e)||void 0!==t)&&!ot(t))return h(e)||(e=function(t,e){if("function"==typeof r&&(e=r.call(this,t,e)),!ot(e))return e}),i[1]=e,G.apply(null,i)}});V.prototype[B]||k(V.prototype,B,V.prototype.valueOf),z(V,j),R[X]=!0},function(t,e,n){var r=n(4),i=n(5).f,a=n(19),o=n(22),s=n(23),u=n(33),c=n(45);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(6),i=n(8),a=n(9),o=n(10),s=n(14),u=n(16),c=n(17),l=Object.getOwnPropertyDescriptor;e.f=r?l:function(t,e){if(t=o(t),e=s(e,!0),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(7);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(11),i=n(13);t.exports=function(t){return r(i(t))}},function(t,e,n){var r=n(7),i=n(12),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(15);t.exports=function(t,e){if(!r(t))return t;var n,i;if(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(!e&&"function"==typeof(n=t.toString)&&!r(i=n.call(t)))return i;throw TypeError("Can't convert object to primitive value")}},function(t){t.exports=function(t){return"object"==typeof t?null!==t:"function"==typeof t}},function(t){var e={}.hasOwnProperty;t.exports=function(t,n){return e.call(t,n)}},function(t,e,n){var r=n(6),i=n(7),a=n(18);t.exports=!r&&!i((function(){return 7!=Object.defineProperty(a("div"),"a",{get:function(){return 7}}).a}))},function(t,e,n){var r=n(4),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(6),i=n(20),a=n(9);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(6),i=n(17),a=n(21),o=n(14),s=Object.defineProperty;e.f=r?s:function(t,e,n){if(a(t),e=o(e,!0),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(4),i=n(19),a=n(16),o=n(23),s=n(24),u=n(26),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(4),i=n(19);t.exports=function(t,e){try{i(r,t,e)}catch(n){r[t]=e}return e}},function(t,e,n){var r=n(25),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=n(4),i=n(23),a="__core-js_shared__",o=r[a]||i(a,{});t.exports=o},function(t,e,n){var r,i,a,o=n(27),s=n(4),u=n(15),c=n(19),l=n(16),f=n(25),h=n(28),d=n(32),g=s.WeakMap;if(o){var p=f.state||(f.state=new g),v=p.get,y=p.has,x=p.set;r=function(t,e){return e.facade=t,x.call(p,t,e),e},i=function(t){return v.call(p,t)||{}},a=function(t){return y.call(p,t)}}else{var _=h("state");d[_]=!0,r=function(t,e){return e.facade=t,c(t,_,e),e},i=function(t){return l(t,_)?t[_]:{}},a=function(t){return l(t,_)}}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(4),i=n(24),a=r.WeakMap;t.exports="function"==typeof a&&/native code/.test(i(a))},function(t,e,n){var r=n(29),i=n(31),a=r("keys");t.exports=function(t){return a[t]||(a[t]=i(t))}},function(t,e,n){var r=n(30),i=n(25);(t.exports=function(t,e){return i[t]||(i[t]=void 0!==e?e:{})})("versions",[]).push({version:"3.9.1",mode:r?"pure":"global",copyright:"© 2021 Denis Pushkarev (zloirock.ru)"})},function(t){t.exports=!1},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){t.exports={}},function(t,e,n){var r=n(16),i=n(34),a=n(5),o=n(20);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(35),i=n(37),a=n(44),o=n(21);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(36),i=n(4),a=function(t){return"function"==typeof t?t:void 0};t.exports=function(t,e){return arguments.length<2?a(r[t])||a(i[t]):r[t]&&r[t][e]||i[t]&&i[t][e]}},function(t,e,n){var r=n(4);t.exports=r},function(t,e,n){var r=n(38),i=n(43).concat("length","prototype");e.f=Object.getOwnPropertyNames||function(t){return r(t,i)}},function(t,e,n){var r=n(16),i=n(10),a=n(39).indexOf,o=n(32);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(10),i=n(40),a=n(42),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(41),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(41),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(7),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(47),i=n(48),a=n(7);t.exports=!!Object.getOwnPropertySymbols&&!a((function(){return!Symbol.sham&&(r?38===i:i>37&&i<41)}))},function(t,e,n){var r=n(12),i=n(4);t.exports="process"==r(i.process)},function(t,e,n){var r,i,a=n(4),o=n(49),s=a.process,u=s&&s.versions,c=u&&u.v8;c?i=(r=c.split("."))[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(35);t.exports=r("navigator","userAgent")||""},function(t,e,n){var r=n(46);t.exports=r&&!Symbol.sham&&"symbol"==typeof Symbol.iterator},function(t,e,n){var r=n(12);t.exports=Array.isArray||function(t){return"Array"==r(t)}},function(t,e,n){var r=n(13);t.exports=function(t){return Object(r(t))}},function(t,e,n){var r,i=n(21),a=n(54),o=n(43),s=n(32),u=n(56),c=n(18),l=n(28),f=l("IE_PROTO"),h=function(){},d=function(t){return"<script>"+t+"</"+"script>"},g=function(){try{r=document.domain&&new ActiveXObject("htmlfile")}catch(t){}var t,e;g=r?function(t){t.write(d("")),t.close();var e=t.parentWindow.Object;return t=null,e}(r):((e=c("iframe")).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);for(var n=o.length;n--;)delete g.prototype[o[n]];return g()};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=g(),void 0===e?n:a(n,e)}},function(t,e,n){var r=n(6),i=n(20),a=n(21),o=n(55);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(38),i=n(43);t.exports=Object.keys||function(t){return r(t,i)}},function(t,e,n){var r=n(35);t.exports=r("document","documentElement")},function(t,e,n){var r=n(10),i=n(37).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(4),i=n(29),a=n(16),o=n(31),s=n(46),u=n(50),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(58);e.f=r},function(t,e,n){var r=n(36),i=n(16),a=n(59),o=n(20).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(20).f,i=n(16),a=n(58)("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(63),i=n(11),a=n(52),o=n(40),s=n(65),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,E=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)E[A]=_;else if(_)switch(t){case 3:return!0;case 5:return x;case 6:return A;case 2:u.call(E,x)}else switch(t){case 4:return!1;case 7:u.call(E,x)}return f?-1:c||l?l:E}};t.exports={forEach:c(0),map:c(1),filter:c(2),some:c(3),every:c(4),find:c(5),findIndex:c(6),filterOut:c(7)}},function(t,e,n){var r=n(64);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(15),i=n(51),a=n(58)("species");t.exports=function(t,e){var n;return i(t)&&("function"!=typeof(n=t.constructor)||n!==Array&&!i(n.prototype)?r(n)&&null===(n=n[a])&&(n=void 0):n=void 0),new(void 0===n?Array:n)(0===e?0:e)}},function(t,e,n){n(60)("asyncIterator")},function(t,e,n){"use strict";var r=n(3),i=n(6),a=n(4),o=n(16),s=n(15),u=n(20).f,c=n(33),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(60)("hasInstance")},function(t,e,n){n(60)("isConcatSpreadable")},function(t,e,n){n(60)("iterator")},function(t,e,n){n(60)("match")},function(t,e,n){n(60)("matchAll")},function(t,e,n){n(60)("replace")},function(t,e,n){n(60)("search")},function(t,e,n){n(60)("species")},function(t,e,n){n(60)("split")},function(t,e,n){n(60)("toPrimitive")},function(t,e,n){n(60)("toStringTag")},function(t,e,n){n(60)("unscopables")},function(t,e,n){"use strict";var r=n(3),i=n(81),a=n(83),o=n(53),s=n(19),u=n(9),c=n(85),l=function(t,e){var n=this;if(!(n instanceof l))return new l(t,e);a&&(n=a(new Error(void 0),i(n))),void 0!==e&&s(n,"message",String(e));var r=[];return c(t,r.push,{that:r}),s(n,"errors",r),n};l.prototype=o(Error.prototype,{constructor:u(5,l),message:u(5,""),name:u(5,"AggregateError")}),r({global:!0},{AggregateError:l})},function(t,e,n){var r=n(16),i=n(52),a=n(28),o=n(82),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(7);t.exports=!r((function(){function t(){}return t.prototype.constructor=null,Object.getPrototypeOf(new t)!==t.prototype}))},function(t,e,n){var r=n(21),i=n(84);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(21),i=n(86),a=n(40),o=n(63),s=n(88),u=n(91),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(58),i=n(87),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(89),i=n(87),a=n(58)("iterator");t.exports=function(t){if(null!=t)return t[a]||t["@@iterator"]||i[r(t)]}},function(t,e,n){var r=n(90),i=n(12),a=n(58)("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(58)("toStringTag")]="z",t.exports="[object z]"===String(r)},function(t,e,n){var r=n(21);t.exports=function(t){var e=t.return;if(void 0!==e)return r(e.call(t)).value}},function(t,e,n){var r=n(3),i=n(93);r({target:"Array",stat:!0,forced:!n(96)((function(t){Array.from(t)}))},{from:i})},function(t,e,n){"use strict";var r=n(63),i=n(52),a=n(94),o=n(86),s=n(40),u=n(95),c=n(88);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(21),i=n(91);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){"use strict";var r=n(14),i=n(20),a=n(9);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(58)("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){n(3)({target:"Array",stat:!0},{isArray:n(51)})},function(t,e,n){"use strict";var r=n(3),i=n(7),a=n(95);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(3),i=n(7),a=n(51),o=n(15),s=n(52),u=n(40),c=n(95),l=n(65),f=n(100),h=n(58),d=n(48),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){var r=n(7),i=n(58),a=n(48),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(3),i=n(102),a=n(103);r({target:"Array",proto:!0},{copyWithin:i}),a("copyWithin")},function(t,e,n){"use strict";var r=n(52),i=n(42),a=n(40),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(58),i=n(53),a=n(20),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(3),i=n(62).every;r({target:"Array",proto:!0,forced:!n(105)("every")},{every:function(t){return i(this,t,arguments.length>1?arguments[1]:void 0)}})},function(t,e,n){"use strict";var r=n(7);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(3),i=n(107),a=n(103);r({target:"Array",proto:!0},{fill:i}),a("fill")},function(t,e,n){"use strict";var r=n(52),i=n(42),a=n(40);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(3),i=n(62).filter;r({target:"Array",proto:!0,forced:!n(100)("filter")},{filter:function(t){return i(this,t,arguments.length>1?arguments[1]:void 0)}})},function(t,e,n){"use strict";var r=n(3),i=n(62).find,a=n(103),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(3),i=n(62).findIndex,a=n(103),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(3),i=n(112),a=n(52),o=n(40),s=n(41),u=n(65);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(51),i=n(40),a=n(63),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(3),i=n(112),a=n(52),o=n(40),s=n(64),u=n(65);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(3),i=n(115);r({target:"Array",proto:!0,forced:[].forEach!=i},{forEach:i})},function(t,e,n){"use strict";var r=n(62).forEach,i=n(105)("forEach");t.exports=i?[].forEach:function(t){return r(this,t,arguments.length>1?arguments[1]:void 0)}},function(t,e,n){"use strict";var r=n(3),i=n(39).includes,a=n(103);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(3),i=n(39).indexOf,a=n(105),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){"use strict";var r=n(3),i=n(11),a=n(10),o=n(105),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(3),i=n(120);r({target:"Array",proto:!0,forced:i!==[].lastIndexOf},{lastIndexOf:i})},function(t,e,n){"use strict";var r=n(10),i=n(41),a=n(40),o=n(105),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(3),i=n(62).map;r({target:"Array",proto:!0,forced:!n(100)("map")},{map:function(t){return i(this,t,arguments.length>1?arguments[1]:void 0)}})},function(t,e,n){"use strict";var r=n(3),i=n(123).left,a=n(105),o=n(48),s=n(47);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(64),i=n(52),a=n(11),o=n(40),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){"use strict";var r=n(3),i=n(123).right,a=n(105),o=n(48),s=n(47);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(3),i=n(51),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(3),i=n(15),a=n(51),o=n(42),s=n(40),u=n(10),c=n(95),l=n(58),f=n(100)("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(3),i=n(62).some;r({target:"Array",proto:!0,forced:!n(105)("some")},{some:function(t){return i(this,t,arguments.length>1?arguments[1]:void 0)}})},function(t,e,n){"use strict";var r=n(3),i=n(64),a=n(52),o=n(7),s=n(105),u=[],c=u.sort,l=o((function(){u.sort(void 0)})),f=o((function(){u.sort(null)})),h=s("sort");r({target:"Array",proto:!0,forced:l||!f||!h},{sort:function(t){return void 0===t?c.call(a(this)):c.call(a(this),i(t))}})},function(t,e,n){"use strict";var r=n(3),i=n(42),a=n(41),o=n(40),s=n(52),u=n(65),c=n(95),l=n(100)("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(131)("Array")},function(t,e,n){"use strict";var r=n(35),i=n(20),a=n(58),o=n(6),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){n(103)("flat")},function(t,e,n){n(103)("flatMap")},function(t,e,n){"use strict";var r=n(10),i=n(103),a=n(87),o=n(26),s=n(135),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(3),i=n(136),a=n(81),o=n(83),s=n(61),u=n(19),c=n(22),l=n(58),f=n(30),h=n(87),d=n(137),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,E=function(t){if(t===d&&R)return R;if(!p&&t in O)return O[t];switch(t){case y:case x:case _:return function(){return new n(this,t)}}return function(){return new n(this)}},k=e+" Iterator",M=!1,O=t.prototype,C=O[v]||O["@@iterator"]||d&&O[d],R=!p&&C||E(d),L="Array"==e&&O.entries||C;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,k,!0,!0),f&&(h[k]=m))),d==x&&C&&C.name!==x&&(M=!0,R=function(){return C.call(this)}),f&&!w||O[v]===R||u(O,v,R),h[e]=R,d)if(A={values:E(x),keys:b?R:E(y),entries:E(_)},w)for(S in A)(p||M||!(S in O))&&c(O,S,A[S]);else r({target:e,proto:!0,forced:p||M},A);return A}},function(t,e,n){"use strict";var r=n(137).IteratorPrototype,i=n(53),a=n(9),o=n(61),s=n(87),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(7),s=n(81),u=n(19),c=n(16),l=n(58),f=n(30),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){n(3)({target:"Function",proto:!0},{bind:n(139)})},function(t,e,n){"use strict";var r=n(64),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){var r=n(6),i=n(20).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){"use strict";var r=n(15),i=n(20),a=n(81),o=n(58)("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){n(3)({global:!0},{globalThis:n(4)})},function(t,e,n){var r=n(3),i=n(144);r({target:"Object",stat:!0,forced:Object.assign!==i},{assign:i})},function(t,e,n){"use strict";var r=n(6),i=n(7),a=n(55),o=n(44),s=n(8),u=n(52),c=n(11),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(3)({target:"Object",stat:!0,sham:!n(6)},{create:n(53)})},function(t,e,n){var r=n(3),i=n(6);r({target:"Object",stat:!0,forced:!i,sham:!i},{defineProperty:n(20).f})},function(t,e,n){var r=n(3),i=n(6);r({target:"Object",stat:!0,forced:!i,sham:!i},{defineProperties:n(54)})},function(t,e,n){var r=n(3),i=n(149).entries;r({target:"Object",stat:!0},{entries:function(t){return i(t)}})},function(t,e,n){var r=n(6),i=n(55),a=n(10),o=n(8).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(3),i=n(151),a=n(7),o=n(15),s=n(152).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(7);t.exports=!r((function(){return Object.isExtensible(Object.preventExtensions({}))}))},function(t,e,n){var r=n(32),i=n(15),a=n(16),o=n(20).f,s=n(31),u=n(151),c=s("meta"),l=0,f=Object.isExtensible||function(){return!0},h=function(t){o(t,c,{value:{objectID:"O"+ ++l,weakData:{}}})},d=t.exports={REQUIRED:!1,fastKey:function(t,e){if(!i(t))return"symbol"==typeof t?t:("string"==typeof t?"S":"P")+t;if(!a(t,c)){if(!f(t))return"F";if(!e)return"E";h(t)}return t[c].objectID},getWeakData:function(t,e){if(!a(t,c)){if(!f(t))return!0;if(!e)return!1;h(t)}return t[c].weakData},onFreeze:function(t){return u&&d.REQUIRED&&f(t)&&!a(t,c)&&h(t),t}};r[c]=!0},function(t,e,n){var r=n(3),i=n(85),a=n(95);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(3),i=n(7),a=n(10),o=n(5).f,s=n(6),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(3),i=n(6),a=n(34),o=n(10),s=n(5),u=n(95);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(3),i=n(7),a=n(57).f;r({target:"Object",stat:!0,forced:i((function(){return!Object.getOwnPropertyNames(1)}))},{getOwnPropertyNames:a})},function(t,e,n){var r=n(3),i=n(7),a=n(52),o=n(81),s=n(82);r({target:"Object",stat:!0,forced:i((function(){o(1)})),sham:!s},{getPrototypeOf:function(t){return o(a(t))}})},function(t,e,n){n(3)({target:"Object",stat:!0},{is:n(159)})},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(3),i=n(7),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(3),i=n(7),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(3),i=n(7),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(3),i=n(52),a=n(55);r({target:"Object",stat:!0,forced:n(7)((function(){a(1)}))},{keys:function(t){return a(i(t))}})},function(t,e,n){var r=n(3),i=n(15),a=n(152).onFreeze,o=n(151),s=n(7),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(3),i=n(15),a=n(152).onFreeze,o=n(151),s=n(7),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(3)({target:"Object",stat:!0},{setPrototypeOf:n(83)})},function(t,e,n){var r=n(3),i=n(149).values;r({target:"Object",stat:!0},{values:function(t){return i(t)}})},function(t,e,n){var r=n(90),i=n(22),a=n(169);r||i(Object.prototype,"toString",a,{unsafe:!0})},function(t,e,n){"use strict";var r=n(90),i=n(89);t.exports=r?{}.toString:function(){return"[object "+i(this)+"]"}},function(t,e,n){"use strict";var r=n(3),i=n(6),a=n(171),o=n(52),s=n(64),u=n(20);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(30),i=n(4),a=n(7);t.exports=r||!a((function(){var t=Math.random();__defineSetter__.call(null,t,(function(){})),delete i[t]}))},function(t,e,n){"use strict";var r=n(3),i=n(6),a=n(171),o=n(52),s=n(64),u=n(20);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){"use strict";var r=n(3),i=n(6),a=n(171),o=n(52),s=n(14),u=n(81),c=n(5).f;i&&r({target:"Object",proto:!0,forced:a},{__lookupGetter__:function(t){var e,n=o(this),r=s(t,!0);do{if(e=c(n,r))return e.get}while(n=u(n))}})},function(t,e,n){"use strict";var r=n(3),i=n(6),a=n(171),o=n(52),s=n(14),u=n(81),c=n(5).f;i&&r({target:"Object",proto:!0,forced:a},{__lookupSetter__:function(t){var e,n=o(this),r=s(t,!0);do{if(e=c(n,r))return e.set}while(n=u(n))}})},function(t,e,n){var r=n(3),i=n(42),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){var r=n(3),i=n(10),a=n(40);r({target:"String",stat:!0},{raw:function(t){for(var e=i(t.raw),n=a(e.length),r=arguments.length,o=[],s=0;n>s;)o.push(String(e[s++])),s<r&&o.push(String(arguments[s]));return o.join("")}})},function(t,e,n){"use strict";var r=n(3),i=n(178).codeAt;r({target:"String",proto:!0},{codePointAt:function(t){return i(this,t)}})},function(t,e,n){var r=n(41),i=n(13),a=function(t){return function(e,n){var a,o,s=String(i(e)),u=r(n),c=s.length;return u<0||u>=c?t?"":void 0:(a=s.charCodeAt(u))<55296||a>56319||u+1===c||(o=s.charCodeAt(u+1))<56320||o>57343?t?s.charAt(u):a:t?s.slice(u,u+2):o-56320+(a-55296<<10)+65536}};t.exports={codeAt:a(!1),charAt:a(!0)}},function(t,e,n){"use strict";var r,i=n(3),a=n(5).f,o=n(40),s=n(180),u=n(13),c=n(182),l=n(30),f="".endsWith,h=Math.min,d=c("endsWith");i({target:"String",proto:!0,forced:!!(l||d||(r=a(String.prototype,"endsWith"),!r||r.writable))&&!d},{endsWith:function(t){var e=String(u(this));s(t);var n=arguments.length>1?arguments[1]:void 0,r=o(e.length),i=void 0===n?r:h(o(n),r),a=String(t);return f?f.call(e,a,i):e.slice(i-a.length,i)===a}})},function(t,e,n){var r=n(181);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(15),i=n(12),a=n(58)("match");t.exports=function(t){var e;return r(t)&&(void 0!==(e=t[a])?!!e:"RegExp"==i(t))}},function(t,e,n){var r=n(58)("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){"use strict";var r=n(3),i=n(180),a=n(13);r({target:"String",proto:!0,forced:!n(182)("includes")},{includes:function(t){return!!~String(a(this)).indexOf(i(t),arguments.length>1?arguments[1]:void 0)}})},function(t,e,n){"use strict";var r=n(185),i=n(21),a=n(40),o=n(13),s=n(190),u=n(191);r("match",1,(function(t,e,n){return[function(e){var n=o(this),r=null==e?void 0:e[t];return void 0!==r?r.call(e,n):new RegExp(e)[t](String(n))},function(t){var r=n(e,t,this);if(r.done)return r.value;var o=i(t),c=String(this);if(!o.global)return u(o,c);var l=o.unicode;o.lastIndex=0;for(var f,h=[],d=0;null!==(f=u(o,c));){var g=String(f[0]);h[d]=g,""===g&&(o.lastIndex=s(c,a(o.lastIndex),l)),d++}return 0===d?null:h}]}))},function(t,e,n){"use strict";n(186);var r=n(22),i=n(7),a=n(58),o=n(187),s=n(19),u=a("species"),c=!i((function(){var t=/./;return t.exec=function(){var t=[];return t.groups={a:"7"},t},"7"!=="".replace(t,"$<a>")})),l="$0"==="a".replace(/./,"$0"),f=a("replace"),h=!!/./[f]&&""===/./[f]("a","$0"),d=!i((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]}));t.exports=function(t,e,n,f){var g=a(t),p=!i((function(){var e={};return e[g]=function(){return 7},7!=""[t](e)})),v=p&&!i((function(){var e=!1,n=/a/;return"split"===t&&((n={}).constructor={},n.constructor[u]=function(){return n},n.flags="",n[g]=/./[g]),n.exec=function(){return e=!0,null},n[g](""),!e}));if(!p||!v||"replace"===t&&(!c||!l||h)||"split"===t&&!d){var y=/./[g],x=n(g,""[t],(function(t,e,n,r,i){return e.exec===o?p&&!i?{done:!0,value:y.call(e,n,r)}:{done:!0,value:t.call(n,e,r)}:{done:!1}}),{REPLACE_KEEPS_$0:l,REGEXP_REPLACE_SUBSTITUTES_UNDEFINED_CAPTURE:h}),_=x[0],m=x[1];r(String.prototype,t,_),r(RegExp.prototype,g,2==e?function(t,e){return m.call(t,this,e)}:function(t){return m.call(t,this)})}f&&s(RegExp.prototype[g],"sham",!0)}},function(t,e,n){"use strict";var r=n(3),i=n(187);r({target:"RegExp",proto:!0,forced:/./.exec!==i},{exec:i})},function(t,e,n){"use strict";var r,i,a=n(188),o=n(189),s=RegExp.prototype.exec,u=String.prototype.replace,c=s,l=(r=/a/,i=/b*/g,s.call(r,"a"),s.call(i,"a"),0!==r.lastIndex||0!==i.lastIndex),f=o.UNSUPPORTED_Y||o.BROKEN_CARET,h=void 0!==/()??/.exec("")[1];(l||h||f)&&(c=function(t){var e,n,r,i,o=this,c=f&&o.sticky,d=a.call(o),g=o.source,p=0,v=t;return c&&(-1===(d=d.replace("y","")).indexOf("g")&&(d+="g"),v=String(t).slice(o.lastIndex),o.lastIndex>0&&(!o.multiline||o.multiline&&"\n"!==t[o.lastIndex-1])&&(g="(?: "+g+")",v=" "+v,p++),n=new RegExp("^(?:"+g+")",d)),h&&(n=new RegExp("^"+g+"$(?!\\s)",d)),l&&(e=o.lastIndex),r=s.call(c?n:o,v),c?r?(r.input=r.input.slice(p),r[0]=r[0].slice(p),r.index=o.lastIndex,o.lastIndex+=r[0].length):o.lastIndex=0:l&&r&&(o.lastIndex=o.global?r.index+r[0].length:e),h&&r&&r.length>1&&u.call(r[0],n,(function(){for(i=1;i<arguments.length-2;i++)void 0===arguments[i]&&(r[i]=void 0)})),r}),t.exports=c},function(t,e,n){"use strict";var r=n(21);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){"use strict";var r=n(7);function i(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){"use strict";var r=n(178).charAt;t.exports=function(t,e,n){return e+(n?r(t,e).length:1)}},function(t,e,n){var r=n(12),i=n(187);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(3),i=n(136),a=n(13),o=n(40),s=n(64),u=n(21),c=n(12),l=n(181),f=n(188),h=n(19),d=n(7),g=n(58),p=n(193),v=n(190),y=n(26),x=n(30),_=g("matchAll"),m="RegExp String",b="RegExp String Iterator",w=y.set,T=y.getterFor(b),A=RegExp.prototype,S=A.exec,E="".matchAll,k=!!E&&!d((function(){"a".matchAll(/./)})),M=i((function(t,e,n,r){w(this,{type:b,regexp:t,string:e,global:n,unicode:r,done:!1})}),m,(function(){var t=T(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 S.call(t,e)}(e,n);return null===r?{value:void 0,done:t.done=!0}:t.global?(""==String(r[0])&&(e.lastIndex=v(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,s,c=u(this),l=String(t);return e=p(c,RegExp),void 0===(n=c.flags)&&c instanceof RegExp&&!("flags"in A)&&(n=f.call(c)),r=void 0===n?"":String(n),i=new e(e===RegExp?c.source:c,r),a=!!~r.indexOf("g"),s=!!~r.indexOf("u"),i.lastIndex=o(c.lastIndex),new M(i,l,a,s)};r({target:"String",proto:!0,forced:k},{matchAll:function(t){var e,n,r,i=a(this);if(null!=t){if(l(t)&&!~String(a("flags"in A?t.flags:f.call(t))).indexOf("g"))throw TypeError("`.matchAll` does not allow non-global regexes");if(k)return E.apply(i,arguments);if(void 0===(n=t[_])&&x&&"RegExp"==c(t)&&(n=O),null!=n)return s(n).call(t,i)}else if(k)return E.apply(i,arguments);return e=String(i),r=new RegExp(t,"g"),x?O.call(r,e):r[_](e)}}),x||_ in A||h(A,_,O)},function(t,e,n){var r=n(21),i=n(64),a=n(58)("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){"use strict";var r=n(3),i=n(195).end;r({target:"String",proto:!0,forced:n(197)},{padEnd:function(t){return i(this,t,arguments.length>1?arguments[1]:void 0)}})},function(t,e,n){var r=n(40),i=n(196),a=n(13),o=Math.ceil,s=function(t){return function(e,n,s){var u,c,l=String(a(e)),f=l.length,h=void 0===s?" ":String(s),d=r(n);return d<=f||""==h?l:(u=d-f,(c=i.call(h,o(u/h.length))).length>u&&(c=c.slice(0,u)),t?l+c:c+l)}};t.exports={start:s(!1),end:s(!0)}},function(t,e,n){"use strict";var r=n(41),i=n(13);t.exports="".repeat||function(t){var e=String(i(this)),n="",a=r(t);if(a<0||a==1/0)throw RangeError("Wrong number of repetitions");for(;a>0;(a>>>=1)&&(e+=e))1&a&&(n+=e);return n}},function(t,e,n){var r=n(49);t.exports=/Version\/10\.\d+(\.\d+)?( Mobile\/\w+)? Safari\//.test(r)},function(t,e,n){"use strict";var r=n(3),i=n(195).start;r({target:"String",proto:!0,forced:n(197)},{padStart:function(t){return i(this,t,arguments.length>1?arguments[1]:void 0)}})},function(t,e,n){n(3)({target:"String",proto:!0},{repeat:n(196)})},function(t,e,n){"use strict";var r=n(185),i=n(21),a=n(40),o=n(41),s=n(13),u=n(190),c=n(201),l=n(191),f=Math.max,h=Math.min;r("replace",2,(function(t,e,n,r){var d=r.REGEXP_REPLACE_SUBSTITUTES_UNDEFINED_CAPTURE,g=r.REPLACE_KEEPS_$0,p=d?"$":"$0";return[function(n,r){var i=s(this),a=null==n?void 0:n[t];return void 0!==a?a.call(n,i,r):e.call(String(i),n,r)},function(t,r){if(!d&&g||"string"==typeof r&&-1===r.indexOf(p)){var s=n(e,t,this,r);if(s.done)return s.value}var v=i(t),y=String(this),x="function"==typeof r;x||(r=String(r));var _=v.global;if(_){var m=v.unicode;v.lastIndex=0}for(var b=[];;){var w=l(v,y);if(null===w)break;if(b.push(w),!_)break;""===String(w[0])&&(v.lastIndex=u(y,a(v.lastIndex),m))}for(var T,A="",S=0,E=0;E<b.length;E++){w=b[E];for(var k=String(w[0]),M=f(h(o(w.index),y.length),0),O=[],C=1;C<w.length;C++)O.push(void 0===(T=w[C])?T:String(T));var R=w.groups;if(x){var L=[k].concat(O,M,y);void 0!==R&&L.push(R);var I=String(r.apply(void 0,L))}else I=c(k,y,M,O,R,r);M>=S&&(A+=y.slice(S,M)+I,S=M+k.length)}return A+y.slice(S)}]}))},function(t,e,n){var r=n(52),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(185),i=n(21),a=n(13),o=n(159),s=n(191);r("search",1,(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](String(n))},function(t){var r=n(e,t,this);if(r.done)return r.value;var a=i(t),u=String(this),c=a.lastIndex;o(c,0)||(a.lastIndex=0);var l=s(a,u);return o(a.lastIndex,c)||(a.lastIndex=c),null===l?-1:l.index}]}))},function(t,e,n){"use strict";var r=n(185),i=n(181),a=n(21),o=n(13),s=n(193),u=n(190),c=n(40),l=n(191),f=n(187),h=n(7),d=[].push,g=Math.min,p=4294967295,v=!h((function(){return!RegExp(p,"y")}));r("split",2,(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=String(o(this)),a=void 0===n?p: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,l=[],h=(t.ignoreCase?"i":"")+(t.multiline?"m":"")+(t.unicode?"u":"")+(t.sticky?"y":""),g=0,v=new RegExp(t.source,h+"g");(s=f.call(v,r))&&!((u=v.lastIndex)>g&&(l.push(r.slice(g,s.index)),s.length>1&&s.index<r.length&&d.apply(l,s.slice(1)),c=s[0].length,g=u,l.length>=a));)v.lastIndex===s.index&&v.lastIndex++;return g===r.length?!c&&v.test("")||l.push(""):l.push(r.slice(g)),l.length>a?l.slice(0,a):l}:"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(String(i),e,n)},function(t,i){var o=n(r,t,this,i,r!==e);if(o.done)return o.value;var f=a(t),h=String(this),d=s(f,RegExp),y=f.unicode,x=(f.ignoreCase?"i":"")+(f.multiline?"m":"")+(f.unicode?"u":"")+(v?"y":"g"),_=new d(v?f:"^(?:"+f.source+")",x),m=void 0===i?p:i>>>0;if(0===m)return[];if(0===h.length)return null===l(_,h)?[h]:[];for(var b=0,w=0,T=[];w<h.length;){_.lastIndex=v?w:0;var A,S=l(_,v?h:h.slice(w));if(null===S||(A=g(c(_.lastIndex+(v?0:w)),h.length))===b)w=u(h,w,y);else{if(T.push(h.slice(b,w)),T.length===m)return T;for(var E=1;E<=S.length-1;E++)if(T.push(S[E]),T.length===m)return T;w=b=A}}return T.push(h.slice(b)),T}]}),!v)},function(t,e,n){"use strict";var r,i=n(3),a=n(5).f,o=n(40),s=n(180),u=n(13),c=n(182),l=n(30),f="".startsWith,h=Math.min,d=c("startsWith");i({target:"String",proto:!0,forced:!!(l||d||(r=a(String.prototype,"startsWith"),!r||r.writable))&&!d},{startsWith:function(t){var e=String(u(this));s(t);var n=o(h(arguments.length>1?arguments[1]:void 0,e.length)),r=String(t);return f?f.call(e,r,n):e.slice(n,n+r.length)===r}})},function(t,e,n){"use strict";var r=n(3),i=n(206).trim;r({target:"String",proto:!0,forced:n(208)("trim")},{trim:function(){return i(this)}})},function(t,e,n){var r=n(13),i="["+n(207)+"]",a=RegExp("^"+i+i+"*"),o=RegExp(i+i+"*$"),s=function(t){return function(e){var n=String(r(e));return 1&t&&(n=n.replace(a,"")),2&t&&(n=n.replace(o,"")),n}};t.exports={start:s(1),end:s(2),trim:s(3)}},function(t){t.exports="\t\n\v\f\r \u2028\u2029\ufeff"},function(t,e,n){var r=n(7),i=n(207);t.exports=function(t){return r((function(){return!!i[t]()||"
"!="
"[t]()||i[t].name!==t}))}},function(t,e,n){"use strict";var r=n(3),i=n(206).start,a=n(208)("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(3),i=n(206).end,a=n(208)("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(178).charAt,i=n(26),a=n(135),o="String Iterator",s=i.set,u=i.getterFor(o);a(String,"String",(function(t){s(this,{type:o,string:String(t),index:0})}),(function(){var t,e=u(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(3),i=n(213);r({target:"String",proto:!0,forced:n(214)("anchor")},{anchor:function(t){return i(this,"a","name",t)}})},function(t,e,n){var r=n(13),i=/"/g;t.exports=function(t,e,n,a){var o=String(r(t)),s="<"+e;return""!==n&&(s+=" "+n+'="'+String(a).replace(i,""")+'"'),s+">"+o+"</"+e+">"}},function(t,e,n){var r=n(7);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(3),i=n(213);r({target:"String",proto:!0,forced:n(214)("big")},{big:function(){return i(this,"big","","")}})},function(t,e,n){"use strict";var r=n(3),i=n(213);r({target:"String",proto:!0,forced:n(214)("blink")},{blink:function(){return i(this,"blink","","")}})},function(t,e,n){"use strict";var r=n(3),i=n(213);r({target:"String",proto:!0,forced:n(214)("bold")},{bold:function(){return i(this,"b","","")}})},function(t,e,n){"use strict";var r=n(3),i=n(213);r({target:"String",proto:!0,forced:n(214)("fixed")},{fixed:function(){return i(this,"tt","","")}})},function(t,e,n){"use strict";var r=n(3),i=n(213);r({target:"String",proto:!0,forced:n(214)("fontcolor")},{fontcolor:function(t){return i(this,"font","color",t)}})},function(t,e,n){"use strict";var r=n(3),i=n(213);r({target:"String",proto:!0,forced:n(214)("fontsize")},{fontsize:function(t){return i(this,"font","size",t)}})},function(t,e,n){"use strict";var r=n(3),i=n(213);r({target:"String",proto:!0,forced:n(214)("italics")},{italics:function(){return i(this,"i","","")}})},function(t,e,n){"use strict";var r=n(3),i=n(213);r({target:"String",proto:!0,forced:n(214)("link")},{link:function(t){return i(this,"a","href",t)}})},function(t,e,n){"use strict";var r=n(3),i=n(213);r({target:"String",proto:!0,forced:n(214)("small")},{small:function(){return i(this,"small","","")}})},function(t,e,n){"use strict";var r=n(3),i=n(213);r({target:"String",proto:!0,forced:n(214)("strike")},{strike:function(){return i(this,"strike","","")}})},function(t,e,n){"use strict";var r=n(3),i=n(213);r({target:"String",proto:!0,forced:n(214)("sub")},{sub:function(){return i(this,"sub","","")}})},function(t,e,n){"use strict";var r=n(3),i=n(213);r({target:"String",proto:!0,forced:n(214)("sup")},{sup:function(){return i(this,"sup","","")}})},function(t,e,n){"use strict";var r=n(3),i=n(13),a=n(181),o=n(188),s=n(201),u=n(58),c=n(30),l=u("replace"),f=RegExp.prototype,h=Math.max,d=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,u,g,p,v,y,x,_=i(this),m=0,b=0,w="";if(null!=t){if((n=a(t))&&!~String(i("flags"in f?t.flags:o.call(t))).indexOf("g"))throw TypeError("`.replaceAll` does not allow non-global regexes");if(void 0!==(r=t[l]))return r.call(t,_,e);if(c&&n)return String(_).replace(t,e)}for(u=String(_),g=String(t),(p="function"==typeof e)||(e=String(e)),v=g.length,y=h(1,v),m=d(u,g,0);-1!==m;)x=p?String(e(g,m,u)):s(g,u,m,[],void 0,e),w+=u.slice(b,m)+x,b=m+v,m=d(u,g,m+y);return b<u.length&&(w+=u.slice(b)),w}})},function(t,e,n){var r=n(6),i=n(4),a=n(45),o=n(229),s=n(20).f,u=n(37).f,c=n(181),l=n(188),f=n(189),h=n(22),d=n(7),g=n(26).set,p=n(131),v=n(58)("match"),y=i.RegExp,x=y.prototype,_=/a/g,m=/a/g,b=new y(_)!==_,w=f.UNSUPPORTED_Y;if(r&&a("RegExp",!b||w||d((function(){return m[v]=!1,y(_)!=_||y(m)==m||"/a/i"!=y(_,"i")})))){for(var T=function(t,e){var n,r=this instanceof T,i=c(t),a=void 0===e;if(!r&&i&&t.constructor===T&&a)return t;b?i&&!a&&(t=t.source):t instanceof T&&(a&&(e=l.call(t)),t=t.source),w&&(n=!!e&&e.indexOf("y")>-1)&&(e=e.replace(/y/g,""));var s=o(b?new y(t,e):y(t,e),r?this:x,T);return w&&n&&g(s,{sticky:n}),s},A=function(t){t in T||s(T,t,{configurable:!0,get:function(){return y[t]},set:function(e){y[t]=e}})},S=u(y),E=0;S.length>E;)A(S[E++]);x.constructor=T,T.prototype=x,h(i,"RegExp",T)}p("RegExp")},function(t,e,n){var r=n(15),i=n(83);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){var r=n(6),i=n(20),a=n(188),o=n(189).UNSUPPORTED_Y;r&&("g"!=/./g.flags||o)&&i.f(RegExp.prototype,"flags",{configurable:!0,get:a})},function(t,e,n){var r=n(6),i=n(189).UNSUPPORTED_Y,a=n(20).f,o=n(26).get,s=RegExp.prototype;r&&i&&a(RegExp.prototype,"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(186);var r,i,a=n(3),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(22),i=n(21),a=n(7),o=n(188),s="toString",u=RegExp.prototype,c=u.toString,l=a((function(){return"/a/b"!=c.call({source:"a",flags:"b"})})),f=c.name!=s;(l||f)&&r(RegExp.prototype,s,(function(){var t=i(this),e=String(t.source),n=t.flags;return"/"+e+"/"+String(void 0===n&&t instanceof RegExp&&!("flags"in u)?o.call(t):n)}),{unsafe:!0})},function(t,e,n){var r=n(3),i=n(235);r({global:!0,forced:parseInt!=i},{parseInt:i})},function(t,e,n){var r=n(4),i=n(206).trim,a=n(207),o=r.parseInt,s=/^[+-]?0[Xx]/,u=8!==o(a+"08")||22!==o(a+"0x16");t.exports=u?function(t,e){var n=i(String(t));return o(n,e>>>0||(s.test(n)?16:10))}:o},function(t,e,n){var r=n(3),i=n(237);r({global:!0,forced:parseFloat!=i},{parseFloat:i})},function(t,e,n){var r=n(4),i=n(206).trim,a=n(207),o=r.parseFloat,s=1/o(a+"-0")!=-1/0;t.exports=s?function(t){var e=i(String(t)),n=o(e);return 0===n&&"-"==e.charAt(0)?-0:n}:o},function(t,e,n){"use strict";var r=n(6),i=n(4),a=n(45),o=n(22),s=n(16),u=n(12),c=n(229),l=n(14),f=n(7),h=n(53),d=n(37).f,g=n(5).f,p=n(20).f,v=n(206).trim,y="Number",x=i.Number,_=x.prototype,m=u(h(_))==y,b=function(t){var e,n,r,i,a,o,s,u,c=l(t,!1);if("string"==typeof c&&c.length>2)if(43===(e=(c=v(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(y,!x(" 0o1")||!x("0b1")||x("+0x1"))){for(var w,T=function(t){var e=arguments.length<1?0:t,n=this;return n instanceof T&&(m?f((function(){_.valueOf.call(n)})):u(n)!=y)?c(new x(b(e)),n,T):b(e)},A=r?d(x):"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(","),S=0;A.length>S;S++)s(x,w=A[S])&&!s(T,w)&&p(T,w,g(x,w));T.prototype=_,_.constructor=T,o(i,y,T)}},function(t,e,n){n(3)({target:"Number",stat:!0},{EPSILON:Math.pow(2,-52)})},function(t,e,n){n(3)({target:"Number",stat:!0},{isFinite:n(241)})},function(t,e,n){var r=n(4).isFinite;t.exports=Number.isFinite||function(t){return"number"==typeof t&&r(t)}},function(t,e,n){n(3)({target:"Number",stat:!0},{isInteger:n(243)})},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(3)({target:"Number",stat:!0},{isNaN:function(t){return t!=t}})},function(t,e,n){var r=n(3),i=n(243),a=Math.abs;r({target:"Number",stat:!0},{isSafeInteger:function(t){return i(t)&&a(t)<=9007199254740991}})},function(t,e,n){n(3)({target:"Number",stat:!0},{MAX_SAFE_INTEGER:9007199254740991})},function(t,e,n){n(3)({target:"Number",stat:!0},{MIN_SAFE_INTEGER:-9007199254740991})},function(t,e,n){var r=n(3),i=n(237);r({target:"Number",stat:!0,forced:Number.parseFloat!=i},{parseFloat:i})},function(t,e,n){var r=n(3),i=n(235);r({target:"Number",stat:!0,forced:Number.parseInt!=i},{parseInt:i})},function(t,e,n){"use strict";var r=n(3),i=n(41),a=n(251),o=n(196),s=n(7),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(12);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(3),i=n(7),a=n(251),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(3),i=n(254),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(3),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(3),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(3),i=n(258),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(3),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(3),i=n(261),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(3),i=n(261);r({target:"Math",stat:!0,forced:i!=Math.expm1},{expm1:i})},function(t,e,n){n(3)({target:"Math",stat:!0},{fround:n(264)})},function(t,e,n){var r=n(258),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(3),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(3),i=n(7),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(3),i=Math.log,a=Math.LOG10E;r({target:"Math",stat:!0},{log10:function(t){return i(t)*a}})},function(t,e,n){n(3)({target:"Math",stat:!0},{log1p:n(254)})},function(t,e,n){var r=n(3),i=Math.log,a=Math.LN2;r({target:"Math",stat:!0},{log2:function(t){return i(t)/a}})},function(t,e,n){n(3)({target:"Math",stat:!0},{sign:n(258)})},function(t,e,n){var r=n(3),i=n(7),a=n(261),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(3),i=n(261),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(61)(Math,"Math",!0)},function(t,e,n){var r=n(3),i=Math.ceil,a=Math.floor;r({target:"Math",stat:!0},{trunc:function(t){return(t>0?a:i)(t)}})},function(t,e,n){n(3)({target:"Date",stat:!0},{now:function(){return(new Date).getTime()}})},function(t,e,n){"use strict";var r=n(3),i=n(7),a=n(52),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);return"number"!=typeof n||isFinite(n)?e.toISOString():null}})},function(t,e,n){var r=n(3),i=n(278);r({target:"Date",proto:!0,forced:Date.prototype.toISOString!==i},{toISOString:i})},function(t,e,n){"use strict";var r=n(7),i=n(195).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(22),i=Date.prototype,a="Invalid Date",o="toString",s=i.toString,u=i.getTime;new Date(NaN)+""!=a&&r(i,o,(function(){var t=u.call(this);return t==t?s.call(this):a}))},function(t,e,n){var r=n(19),i=n(281),a=n(58)("toPrimitive"),o=Date.prototype;a in o||r(o,a,i)},function(t,e,n){"use strict";var r=n(21),i=n(14);t.exports=function(t){if("string"!==t&&"number"!==t&&"default"!==t)throw TypeError("Incorrect hint");return i(r(this),"number"!==t)}},function(t,e,n){var r=n(3),i=n(35),a=n(7),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(4);n(61)(r.JSON,"JSON",!0)},function(t,e,n){"use strict";var r,i,a,o,s=n(3),u=n(30),c=n(4),l=n(35),f=n(285),h=n(22),d=n(286),g=n(61),p=n(131),v=n(15),y=n(64),x=n(287),_=n(24),m=n(85),b=n(96),w=n(193),T=n(288).set,A=n(290),S=n(292),E=n(294),k=n(293),M=n(295),O=n(26),C=n(45),R=n(58),L=n(47),I=n(48),D=R("species"),P="Promise",z=O.get,F=O.set,N=O.getterFor(P),X=f,j=c.TypeError,B=c.document,$=c.process,U=l("fetch"),Y=k.f,V=Y,G=!!(B&&B.createEvent&&c.dispatchEvent),H="function"==typeof PromiseRejectionEvent,W="unhandledrejection",q=C(P,(function(){if(!(_(X)!==String(X))){if(66===I)return!0;if(!L&&!H)return!0}if(u&&!X.prototype.finally)return!0;if(I>=51&&/native code/.test(X))return!1;var t=X.resolve(1),e=function(t){t((function(){}),(function(){}))};return(t.constructor={})[D]=e,!(t.then((function(){}))instanceof e)})),Z=q||!b((function(t){X.all(t).catch((function(){}))})),K=function(t){var e;return!(!v(t)||"function"!=typeof(e=t.then))&&e},J=function(t,e){if(!t.notified){t.notified=!0;var n=t.reactions;A((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&&nt(t),t.rejection=1),!0===l?o=r:(d&&d.enter(),o=l(r),d&&(d.exit(),u=!0)),o===c.promise?h(j("Promise-chain cycle")):(s=K(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&&tt(t)}))}},Q=function(t,e,n){var r,i;G?((r=B.createEvent("Event")).promise=e,r.reason=n,r.initEvent(t,!1,!0),c.dispatchEvent(r)):r={promise:e,reason:n},!H&&(i=c["on"+t])?i(r):t===W&&E("Unhandled promise rejection",n)},tt=function(t){T.call(c,(function(){var e,n=t.facade,r=t.value;if(et(t)&&(e=M((function(){L?$.emit("unhandledRejection",r,n):Q(W,n,r)})),t.rejection=L||et(t)?2:1,e.error))throw e.value}))},et=function(t){return 1!==t.rejection&&!t.parent},nt=function(t){T.call(c,(function(){var e=t.facade;L?$.emit("rejectionHandled",e):Q("rejectionhandled",e,t.value)}))},rt=function(t,e,n){return function(r){t(e,r,n)}},it=function(t,e,n){t.done||(t.done=!0,n&&(t=n),t.value=e,t.state=2,J(t,!0))},at=function(t,e,n){if(!t.done){t.done=!0,n&&(t=n);try{if(t.facade===e)throw j("Promise can't be resolved itself");var r=K(e);r?A((function(){var n={done:!1};try{r.call(e,rt(at,n,t),rt(it,n,t))}catch(e){it(n,e,t)}})):(t.value=e,t.state=1,J(t,!1))}catch(e){it({done:!1},e,t)}}};q&&(X=function(t){x(this,X,P),y(t),r.call(this);var e=z(this);try{t(rt(at,e),rt(it,e))}catch(t){it(e,t)}},(r=function(t){F(this,{type:P,done:!1,notified:!1,parent:!1,reactions:[],rejection:!1,state:0,value:void 0})}).prototype=d(X.prototype,{then:function(t,e){var n=N(this),r=Y(w(this,X));return r.ok="function"!=typeof t||t,r.fail="function"==typeof e&&e,r.domain=L?$.domain:void 0,n.parent=!0,n.reactions.push(r),0!=n.state&&J(n,!1),r.promise},catch:function(t){return this.then(void 0,t)}}),i=function(){var t=new r,e=z(t);this.promise=t,this.resolve=rt(at,e),this.reject=rt(it,e)},k.f=Y=function(t){return t===X||t===a?new i(t):V(t)},u||"function"!=typeof f||(o=f.prototype.then,h(f.prototype,"then",(function(t,e){var n=this;return new X((function(t,e){o.call(n,t,e)})).then(t,e)}),{unsafe:!0}),"function"==typeof U&&s({global:!0,enumerable:!0,forced:!0},{fetch:function(t){return S(X,U.apply(c,arguments))}}))),s({global:!0,wrap:!0,forced:q},{Promise:X}),g(X,P,!1,!0),p(P),a=l(P),s({target:P,stat:!0,forced:q},{reject:function(t){var e=Y(this);return e.reject.call(void 0,t),e.promise}}),s({target:P,stat:!0,forced:u||q},{resolve:function(t){return S(u&&this===a?X:this,t)}}),s({target:P,stat:!0,forced:Z},{all:function(t){var e=this,n=Y(e),r=n.resolve,i=n.reject,a=M((function(){var n=y(e.resolve),a=[],o=0,s=1;m(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=Y(e),r=n.reject,i=M((function(){var i=y(e.resolve);m(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(4);t.exports=r.Promise},function(t,e,n){var r=n(22);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,i,a,o=n(4),s=n(7),u=n(63),c=n(56),l=n(18),f=n(289),h=n(47),d=o.location,g=o.setImmediate,p=o.clearImmediate,v=o.process,y=o.MessageChannel,x=o.Dispatch,_=0,m={},b="onreadystatechange",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){o.postMessage(t+"",d.protocol+"//"+d.host)};g&&p||(g=function(t){for(var e=[],n=1;arguments.length>n;)e.push(arguments[n++]);return m[++_]=function(){("function"==typeof t?t:Function(t)).apply(void 0,e)},r(_),_},p=function(t){delete m[t]},h?r=function(t){v.nextTick(T(t))}:x&&x.now?r=function(t){x.now(T(t))}:y&&!f?(a=(i=new y).port2,i.port1.onmessage=A,r=u(a.postMessage,a,1)):o.addEventListener&&"function"==typeof postMessage&&!o.importScripts&&d&&"file:"!==d.protocol&&!s(S)?(r=S,o.addEventListener("message",A,!1)):r=b in l("script")?function(t){c.appendChild(l("script")).onreadystatechange=function(){c.removeChild(this),w(t)}}:function(t){setTimeout(T(t),0)}),t.exports={set:g,clear:p}},function(t,e,n){var r=n(49);t.exports=/(iphone|ipod|ipad).*applewebkit/i.test(r)},function(t,e,n){var r,i,a,o,s,u,c,l,f=n(4),h=n(5).f,d=n(288).set,g=n(289),p=n(291),v=n(47),y=f.MutationObserver||f.WebKitMutationObserver,x=f.document,_=f.process,m=f.Promise,b=h(f,"queueMicrotask"),w=b&&b.value;w||(r=function(){var t,e;for(v&&(t=_.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||v||p||!y||!x?m&&m.resolve?(c=m.resolve(void 0),l=c.then,o=function(){l.call(c,r)}):o=v?function(){_.nextTick(r)}:function(){d.call(f,r)}:(s=!0,u=x.createTextNode(""),new y(r).observe(u,{characterData:!0}),o=function(){u.data=s=!s})),t.exports=w||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(49);t.exports=/web0s(?!.*chrome)/i.test(r)},function(t,e,n){var r=n(21),i=n(15),a=n(293);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(64),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(4);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,e,n){"use strict";var r=n(3),i=n(64),a=n(293),o=n(295),s=n(85);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(3),i=n(64),a=n(35),o=n(293),s=n(295),u=n(85),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(3),i=n(30),a=n(285),o=n(7),s=n(35),u=n(193),c=n(292),l=n(22);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||a.prototype.finally||l(a.prototype,"finally",s("Promise").prototype.finally)},function(t,e,n){"use strict";var r=n(300),i=n(301);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(3),i=n(4),a=n(45),o=n(22),s=n(152),u=n(85),c=n(287),l=n(15),f=n(7),h=n(96),d=n(61),g=n(229);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.REQUIRED=!0;else if(a(t,!0)){var T=new m,A=T[y](v?{}:-0,1)!=T,S=f((function(){T.has(1)})),E=h((function(t){new x(t)})),k=!v&&f((function(){for(var t=new x,e=5;e--;)t[y](e,e);return!t.has(-0)}));E||((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||k)&&(w("delete"),w("has"),p&&w("get")),(k||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){"use strict";var r=n(20).f,i=n(53),a=n(286),o=n(63),s=n(287),u=n(85),c=n(135),l=n(131),f=n(6),h=n(152).fastKey,d=n(26),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){"use strict";var r=n(300),i=n(301);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,i=n(4),a=n(286),o=n(152),s=n(300),u=n(304),c=n(15),l=n(26).enforce,f=n(27),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.REQUIRED=!0;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(286),i=n(152).getWeakData,a=n(21),o=n(15),s=n(287),u=n(85),c=n(62),l=n(16),f=n(26),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(300)("WeakSet",(function(t){return function(){return t(this,arguments.length?arguments[0]:void 0)}}),n(304))},function(t,e,n){"use strict";var r=n(3),i=n(4),a=n(307),o=n(131),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(4),i=n(6),a=n(308),o=n(19),s=n(286),u=n(7),c=n(287),l=n(41),f=n(40),h=n(309),d=n(310),g=n(81),p=n(83),v=n(37).f,y=n(20).f,x=n(107),_=n(61),m=n(26),b=m.get,w=m.set,T="ArrayBuffer",A="DataView",S="Wrong index",E=r.ArrayBuffer,k=E,M=r.DataView,O=M&&M.prototype,C=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)},X=function(t){return L(t,52,8)},j=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(){E(1)}))||!u((function(){new E(-1)}))||u((function(){return new E,new E(1.5),new E(NaN),E.name!=T}))){for(var U,Y=(k=function(t){return c(this,k),new E(h(t))}).prototype=E.prototype,V=v(E),G=0;V.length>G;)(U=V[G++])in k||o(k,U,E[U]);Y.constructor=k}p&&g(O)!==C&&p(O,C);var H=new M(new k(2)),W=O.setInt8;H.setInt8(0,2147483648),H.setInt8(1,2147483649),!H.getInt8(0)&&H.getInt8(1)||s(O,{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 k=function(t){c(this,k,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,k,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&&(j(k,"byteLength"),j(M,"buffer"),j(M,"byteLength"),j(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,X,e,arguments.length>2?arguments[2]:void 0)}});_(k,T),_(M,A),t.exports={ArrayBuffer:k,DataView:M}},function(t){t.exports="undefined"!=typeof ArrayBuffer&&"undefined"!=typeof DataView},function(t,e,n){var r=n(41),i=n(40);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(3),i=n(312);r({target:"ArrayBuffer",stat:!0,forced:!i.NATIVE_ARRAY_BUFFER_VIEWS},{isView:i.isView})},function(t,e,n){"use strict";var r,i=n(308),a=n(6),o=n(4),s=n(15),u=n(16),c=n(89),l=n(19),f=n(22),h=n(20).f,d=n(81),g=n(83),p=n(58),v=n(31),y=o.Int8Array,x=y&&y.prototype,_=o.Uint8ClampedArray,m=_&&_.prototype,b=y&&d(y),w=x&&d(x),T=Object.prototype,A=T.isPrototypeOf,S=p("toStringTag"),E=v("TYPED_ARRAY_TAG"),k=i&&!!g&&"Opera"!==c(o.opera),M=!1,O={Int8Array:1,Uint8Array:1,Uint8ClampedArray:1,Int16Array:2,Uint16Array:2,Int32Array:4,Uint32Array:4,Float32Array:4,Float64Array:8},C={BigInt64Array:8,BigUint64Array:8},R=function(t){if(!s(t))return!1;var e=c(t);return u(O,e)||u(C,e)};for(r in O)o[r]||(k=!1);if((!k||"function"!=typeof b||b===Function.prototype)&&(b=function(){throw TypeError("Incorrect invocation")},k))for(r in O)o[r]&&g(o[r],b);if((!k||!w||w===T)&&(w=b.prototype,k))for(r in O)o[r]&&g(o[r].prototype,w);if(k&&d(m)!==w&&g(m,w),a&&!u(w,S))for(r in M=!0,h(w,S,{get:function(){return s(this)?this[E]:void 0}}),O)o[r]&&l(o[r],E,r);t.exports={NATIVE_ARRAY_BUFFER_VIEWS:k,TYPED_ARRAY_TAG:M&&E,aTypedArray:function(t){if(R(t))return t;throw TypeError("Target is not a typed array")},aTypedArrayConstructor:function(t){if(g){if(A.call(b,t))return t}else for(var e in O)if(u(O,r)){var n=o[e];if(n&&(t===n||A.call(n,t)))return t}throw TypeError("Target is not a typed array constructor")},exportTypedArrayMethod:function(t,e,n){if(a){if(n)for(var r in O){var i=o[r];i&&u(i.prototype,t)&&delete i.prototype[t]}w[t]&&!n||f(w,t,n?e:k&&x[t]||e)}},exportTypedArrayStaticMethod:function(t,e,n){var r,i;if(a){if(g){if(n)for(r in O)(i=o[r])&&u(i,t)&&delete i[t];if(b[t]&&!n)return;try{return f(b,t,n?e:k&&y[t]||e)}catch(t){}}for(r in O)!(i=o[r])||i[t]&&!n||f(i,t,e)}},isView:function(t){if(!s(t))return!1;var e=c(t);return"DataView"===e||u(O,e)||u(C,e)},isTypedArray:R,TypedArray:b,TypedArrayPrototype:w}},function(t,e,n){"use strict";var r=n(3),i=n(7),a=n(307),o=n(21),s=n(42),u=n(40),c=n(193),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(3),i=n(307);r({global:!0,forced:!n(308)},{DataView:i.DataView})},function(t,e,n){n(316)("Int8",(function(t){return function(e,n,r){return t(this,e,n,r)}}))},function(t,e,n){"use strict";var r=n(3),i=n(4),a=n(6),o=n(317),s=n(312),u=n(307),c=n(287),l=n(9),f=n(19),h=n(40),d=n(309),g=n(318),p=n(14),v=n(16),y=n(89),x=n(15),_=n(53),m=n(83),b=n(37).f,w=n(320),T=n(62).forEach,A=n(131),S=n(20),E=n(5),k=n(26),M=n(229),O=k.get,C=k.set,R=S.f,L=E.f,I=Math.round,D=i.RangeError,P=u.ArrayBuffer,z=u.DataView,F=s.NATIVE_ARRAY_BUFFER_VIEWS,N=s.TYPED_ARRAY_TAG,X=s.TypedArray,j=s.TypedArrayPrototype,B=s.aTypedArrayConstructor,$=s.isTypedArray,U="BYTES_PER_ELEMENT",Y="Wrong length",V=function(t,e){for(var n=0,r=e.length,i=new(B(t))(r);r>n;)i[n]=e[n++];return i},G=function(t,e){R(t,e,{get:function(){return O(this)[e]}})},H=function(t){var e;return t instanceof P||"ArrayBuffer"==(e=y(t))||"SharedArrayBuffer"==e},W=function(t,e){return $(t)&&"symbol"!=typeof e&&e in t&&String(+e)==String(e)},q=function(t,e){return W(t,e=p(e,!0))?l(2,t[e]):L(t,e)},Z=function(t,e,n){return!(W(t,e=p(e,!0))&&x(n)&&v(n,"value"))||v(n,"get")||v(n,"set")||n.configurable||v(n,"writable")&&!n.writable||v(n,"enumerable")&&!n.enumerable?R(t,e,n):(t[e]=n.value,t)};a?(F||(E.f=q,S.f=Z,G(j,"buffer"),G(j,"byteOffset"),G(j,"byteLength"),G(j,"length")),r({target:"Object",stat:!0,forced:!F},{getOwnPropertyDescriptor:q,defineProperty:Z}),t.exports=function(t,e,n){var a=t.match(/\d+$/)[0]/8,s=t+(n?"Clamped":"")+"Array",u="get"+t,l="set"+t,p=i[s],v=p,y=v&&v.prototype,S={},E=function(t,e){R(t,e,{get:function(){return function(t,e){var n=O(t);return n.view[u](e*a+n.byteOffset,!0)}(this,e)},set:function(t){return function(t,e,r){var i=O(t);n&&(r=(r=I(r))<0?0:r>255?255:255&r),i.view[l](e*a+i.byteOffset,r,!0)}(this,e,t)},enumerable:!0})};F?o&&(v=e((function(t,e,n,r){return c(t,v,s),M(x(e)?H(e)?void 0!==r?new p(e,g(n,a),r):void 0!==n?new p(e,g(n,a)):new p(e):$(e)?V(v,e):w.call(v,e):new p(d(e)),t,v)})),m&&m(v,X),T(b(p),(function(t){t in v||f(v,t,p[t])})),v.prototype=y):(v=e((function(t,e,n,r){c(t,v,s);var i,o,u,l=0,f=0;if(x(e)){if(!H(e))return $(e)?V(v,e):w.call(v,e);i=e,f=g(n,a);var p=e.byteLength;if(void 0===r){if(p%a)throw D(Y);if((o=p-f)<0)throw D(Y)}else if((o=h(r)*a)+f>p)throw D(Y);u=o/a}else u=d(e),i=new P(o=u*a);for(C(t,{buffer:i,byteOffset:f,byteLength:o,length:u,view:new z(i)});l<u;)E(t,l++)})),m&&m(v,X),y=v.prototype=_(j)),y.constructor!==v&&f(y,"constructor",v),N&&f(y,N,s),S[s]=v,r({global:!0,forced:v!=p,sham:!F},S),U in v||f(v,U,a),U in y||f(y,U,a),A(s)}):t.exports=function(){}},function(t,e,n){var r=n(4),i=n(7),a=n(96),o=n(312).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(319);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(41);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(52),i=n(40),a=n(88),o=n(86),s=n(63),u=n(312).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(316)("Uint8",(function(t){return function(e,n,r){return t(this,e,n,r)}}))},function(t,e,n){n(316)("Uint8",(function(t){return function(e,n,r){return t(this,e,n,r)}}),!0)},function(t,e,n){n(316)("Int16",(function(t){return function(e,n,r){return t(this,e,n,r)}}))},function(t,e,n){n(316)("Uint16",(function(t){return function(e,n,r){return t(this,e,n,r)}}))},function(t,e,n){n(316)("Int32",(function(t){return function(e,n,r){return t(this,e,n,r)}}))},function(t,e,n){n(316)("Uint32",(function(t){return function(e,n,r){return t(this,e,n,r)}}))},function(t,e,n){n(316)("Float32",(function(t){return function(e,n,r){return t(this,e,n,r)}}))},function(t,e,n){n(316)("Float64",(function(t){return function(e,n,r){return t(this,e,n,r)}}))},function(t,e,n){"use strict";var r=n(317);(0,n(312).exportTypedArrayStaticMethod)("from",n(320),r)},function(t,e,n){"use strict";var r=n(312),i=n(317),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(312),i=n(102),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(312),i=n(62).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(312),i=n(107),a=r.aTypedArray;(0,r.exportTypedArrayMethod)("fill",(function(t){return i.apply(a(this),arguments)}))},function(t,e,n){"use strict";var r=n(312),i=n(62).filter,a=n(335),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(312).aTypedArrayConstructor,i=n(193);t.exports=function(t,e){for(var n=i(t,t.constructor),a=0,o=e.length,s=new(r(n))(o);o>a;)s[a]=e[a++];return s}},function(t,e,n){"use strict";var r=n(312),i=n(62).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(312),i=n(62).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(312),i=n(62).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(312),i=n(39).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(312),i=n(39).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(4),i=n(312),a=n(134),o=n(58)("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(312),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(312),i=n(120),a=r.aTypedArray;(0,r.exportTypedArrayMethod)("lastIndexOf",(function(t){return i.apply(a(this),arguments)}))},function(t,e,n){"use strict";var r=n(312),i=n(62).map,a=n(193),o=r.aTypedArray,s=r.aTypedArrayConstructor;(0,r.exportTypedArrayMethod)("map",(function(t){return i(o(this),t,arguments.length>1?arguments[1]:void 0,(function(t,e){return new(s(a(t,t.constructor)))(e)}))}))},function(t,e,n){"use strict";var r=n(312),i=n(123).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(312),i=n(123).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(312),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(312),i=n(40),a=n(318),o=n(52),s=n(7),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(312),i=n(193),a=n(7),o=r.aTypedArray,s=r.aTypedArrayConstructor,u=r.exportTypedArrayMethod,c=[].slice;u("slice",(function(t,e){for(var n=c.call(o(this),t,e),r=i(this,this.constructor),a=0,u=n.length,l=new(s(r))(u);u>a;)l[a]=n[a++];return l}),a((function(){new Int8Array(1).slice()})))},function(t,e,n){"use strict";var r=n(312),i=n(62).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(312),i=r.aTypedArray,a=r.exportTypedArrayMethod,o=[].sort;a("sort",(function(t){return o.call(i(this),t)}))},function(t,e,n){"use strict";var r=n(312),i=n(40),a=n(42),o=n(193),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.constructor))(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(4),i=n(312),a=n(7),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(312).exportTypedArrayMethod,i=n(7),a=n(4).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){var r=n(3),i=n(35),a=n(64),o=n(21),s=n(7),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(3),i=n(35),a=n(64),o=n(21),s=n(15),u=n(53),c=n(139),l=n(7),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(3),i=n(6),a=n(21),o=n(14),s=n(20);r({target:"Reflect",stat:!0,forced:n(7)((function(){Reflect.defineProperty(s.f({},1,{value:1}),1,{value:2})})),sham:!i},{defineProperty:function(t,e,n){a(t);var r=o(e,!0);a(n);try{return s.f(t,r,n),!0}catch(t){return!1}}})},function(t,e,n){var r=n(3),i=n(21),a=n(5).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(3),i=n(15),a=n(21),o=n(16),s=n(5),u=n(81);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(3),i=n(6),a=n(21),o=n(5);r({target:"Reflect",stat:!0,sham:!i},{getOwnPropertyDescriptor:function(t,e){return o.f(a(t),e)}})},function(t,e,n){var r=n(3),i=n(21),a=n(81);r({target:"Reflect",stat:!0,sham:!n(82)},{getPrototypeOf:function(t){return a(i(t))}})},function(t,e,n){n(3)({target:"Reflect",stat:!0},{has:function(t,e){return e in t}})},function(t,e,n){var r=n(3),i=n(21),a=Object.isExtensible;r({target:"Reflect",stat:!0},{isExtensible:function(t){return i(t),!a||a(t)}})},function(t,e,n){n(3)({target:"Reflect",stat:!0},{ownKeys:n(34)})},function(t,e,n){var r=n(3),i=n(35),a=n(21);r({target:"Reflect",stat:!0,sham:!n(151)},{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(3),i=n(21),a=n(15),o=n(16),s=n(7),u=n(20),c=n(5),l=n(81),f=n(9);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(3),i=n(21),a=n(84),o=n(83);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(3),i=n(4),a=n(61);r({global:!0},{Reflect:{}}),a(i.Reflect,"Reflect",!0)},function(t,e,n){n(370),n(372),n(373),n(374),n(375),n(376),n(381),n(379);var r=n(36);t.exports=r},function(t,e,n){var r=n(4),i=n(371),a=n(115),o=n(19);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(4),i=n(371),a=n(134),o=n(19),s=n(58),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(3),i=n(4),a=n(288);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(3),i=n(4),a=n(290),o=n(47),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(3),i=n(4),a=n(49),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(211);var r,i=n(3),a=n(6),o=n(377),s=n(4),u=n(54),c=n(22),l=n(287),f=n(16),h=n(144),d=n(93),g=n(178).codeAt,p=n(378),v=n(61),y=n(379),x=n(26),_=s.URL,m=y.URLSearchParams,b=y.getState,w=x.set,T=x.getterFor("URL"),A=Math.floor,S=Math.pow,E="Invalid scheme",k="Invalid host",M="Invalid port",O=/[A-Za-z]/,C=/[\d+-.A-Za-z]/,R=/\d/,L=/^(0x|0X)/,I=/^[0-7]+$/,D=/^\d+$/,P=/^[\dA-Fa-f]+$/,z=/[\u0000\t\u000A\u000D #%/:?@[\\]]/,F=/[\u0000\t\u000A\u000D #/:?@[\\]]/,N=/^[\u0000-\u001F ]+|[\u0000-\u001F ]+$/g,X=/[\t\u000A\u000D]/g,j=function(t,e){var n,r,i;if("["==e.charAt(0)){if("]"!=e.charAt(e.length-1))return k;if(!(n=$(e.slice(1,-1))))return k;t.host=n}else if(Z(t)){if(e=p(e),z.test(e))return k;if(null===(n=B(e)))return k;t.host=n}else{if(F.test(e))return k;for(n="",r=d(e),i=0;i<r.length;i++)n+=W(r[i],Y);t.host=n}},B=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=L.test(i)?16:8,i=i.slice(8==a?1:2)),""===i)o=0;else{if(!(10==a?D:8==a?I:P).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>=S(256,5-e))return null}else if(o>255)return null;for(s=n.pop(),r=0;r<n.length;r++)s+=n[r]*S(256,3-r);return s},$=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&&P.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(!R.test(h()))return;for(;R.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},U=function(t){var e,n,r,i;if("number"==typeof t){for(e=[],n=0;n<4;n++)e.unshift(t%256),t=A(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},Y={},V=h({},Y,{" ":1,'"':1,"<":1,">":1,"`":1}),G=h({},V,{"#":1,"?":1,"{":1,"}":1}),H=h({},G,{"/":1,":":1,";":1,"=":1,"@":1,"[":1,"\\":1,"]":1,"^":1,"|":1}),W=function(t,e){var n=g(t,0);return n>32&&n<127&&!f(e,t)?t:encodeURIComponent(t)},q={ftp:21,file:null,http:80,https:443,ws:80,wss:443},Z=function(t){return f(q,t.scheme)},K=function(t){return""!=t.username||""!=t.password},J=function(t){return!t.host||t.cannotBeABaseURL||"file"==t.scheme},Q=function(t,e){var n;return 2==t.length&&O.test(t.charAt(0))&&(":"==(n=t.charAt(1))||!e&&"|"==n)},tt=function(t){var e;return t.length>1&&Q(t.slice(0,2))&&(2==t.length||"/"===(e=t.charAt(2))||"\\"===e||"?"===e||"#"===e)},et=function(t){var e=t.path,n=e.length;!n||"file"==t.scheme&&1==n&&Q(e[0],!0)||e.pop()},nt=function(t){return"."===t||"%2e"===t.toLowerCase()},rt={},it={},at={},ot={},st={},ut={},ct={},lt={},ft={},ht={},dt={},gt={},pt={},vt={},yt={},xt={},_t={},mt={},bt={},wt={},Tt={},At=function(t,e,n,i){var a,o,s,u,c,l=n||rt,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(N,"")),e=e.replace(X,""),a=d(e);h<=a.length;){switch(o=a[h],l){case rt:if(!o||!O.test(o)){if(n)return E;l=at;continue}g+=o.toLowerCase(),l=it;break;case it:if(o&&(C.test(o)||"+"==o||"-"==o||"."==o))g+=o.toLowerCase();else{if(":"!=o){if(n)return E;g="",l=at,h=0;continue}if(n&&(Z(t)!=f(q,g)||"file"==g&&(K(t)||null!==t.port)||"file"==t.scheme&&!t.host))return;if(t.scheme=g,n)return void(Z(t)&&q[t.scheme]==t.port&&(t.port=null));g="","file"==t.scheme?l=vt:Z(t)&&i&&i.scheme==t.scheme?l=ot:Z(t)?l=lt:"/"==a[h+1]?(l=st,h++):(t.cannotBeABaseURL=!0,t.path.push(""),l=bt)}break;case at: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=Tt;break}l="file"==i.scheme?vt:ut;continue;case ot:if("/"!=o||"/"!=a[h+1]){l=ut;continue}l=ft,h++;break;case st:if("/"==o){l=ht;break}l=mt;continue;case ut: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&&Z(t))l=ct;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=wt;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=mt;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=Tt}break;case ct:if(!Z(t)||"/"!=o&&"\\"!=o){if("/"!=o){t.username=i.username,t.password=i.password,t.host=i.host,t.port=i.port,l=mt;continue}l=ht}else l=ft;break;case lt:if(l=ft,"/"!=o||"/"!=g.charAt(h+1))continue;h++;break;case ft:if("/"!=o&&"\\"!=o){l=ht;continue}break;case ht: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=W(_,H);y?t.password+=m:t.username+=m}else y=!0}g=""}else if(o==r||"/"==o||"?"==o||"#"==o||"\\"==o&&Z(t)){if(p&&""==g)return"Invalid authority";h-=d(g).length+1,g="",l=dt}else g+=o;break;case dt:case gt:if(n&&"file"==t.scheme){l=xt;continue}if(":"!=o||v){if(o==r||"/"==o||"?"==o||"#"==o||"\\"==o&&Z(t)){if(Z(t)&&""==g)return k;if(n&&""==g&&(K(t)||null!==t.port))return;if(u=j(t,g))return u;if(g="",l=_t,n)return;continue}"["==o?v=!0:"]"==o&&(v=!1),g+=o}else{if(""==g)return k;if(u=j(t,g))return u;if(g="",l=pt,n==gt)return}break;case pt:if(!R.test(o)){if(o==r||"/"==o||"?"==o||"#"==o||"\\"==o&&Z(t)||n){if(""!=g){var b=parseInt(g,10);if(b>65535)return M;t.port=Z(t)&&b===q[t.scheme]?null:b,g=""}if(n)return;l=_t;continue}return M}g+=o;break;case vt:if(t.scheme="file","/"==o||"\\"==o)l=yt;else{if(!i||"file"!=i.scheme){l=mt;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=wt;else{if("#"!=o){tt(a.slice(h).join(""))||(t.host=i.host,t.path=i.path.slice(),et(t)),l=mt;continue}t.host=i.host,t.path=i.path.slice(),t.query=i.query,t.fragment="",l=Tt}}break;case yt:if("/"==o||"\\"==o){l=xt;break}i&&"file"==i.scheme&&!tt(a.slice(h).join(""))&&(Q(i.path[0],!0)?t.path.push(i.path[0]):t.host=i.host),l=mt;continue;case xt:if(o==r||"/"==o||"\\"==o||"?"==o||"#"==o){if(!n&&Q(g))l=mt;else if(""==g){if(t.host="",n)return;l=_t}else{if(u=j(t,g))return u;if("localhost"==t.host&&(t.host=""),n)return;g="",l=_t}continue}g+=o;break;case _t:if(Z(t)){if(l=mt,"/"!=o&&"\\"!=o)continue}else if(n||"?"!=o)if(n||"#"!=o){if(o!=r&&(l=mt,"/"!=o))continue}else t.fragment="",l=Tt;else t.query="",l=wt;break;case mt:if(o==r||"/"==o||"\\"==o&&Z(t)||!n&&("?"==o||"#"==o)){if(".."===(c=(c=g).toLowerCase())||"%2e."===c||".%2e"===c||"%2e%2e"===c?(et(t),"/"==o||"\\"==o&&Z(t)||t.path.push("")):nt(g)?"/"==o||"\\"==o&&Z(t)||t.path.push(""):("file"==t.scheme&&!t.path.length&&Q(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=wt):"#"==o&&(t.fragment="",l=Tt)}else g+=W(o,G);break;case bt:"?"==o?(t.query="",l=wt):"#"==o?(t.fragment="",l=Tt):o!=r&&(t.path[0]+=W(o,Y));break;case wt:n||"#"!=o?o!=r&&("'"==o&&Z(t)?t.query+="%27":t.query+="#"==o?"%23":W(o,Y)):(t.fragment="",l=Tt);break;case Tt:o!=r&&(t.fragment+=W(o,V))}h++}},St=function(t){var e,n,r=l(this,St,"URL"),i=arguments.length>1?arguments[1]:void 0,o=String(t),s=w(r,{type:"URL"});if(void 0!==i)if(i instanceof St)e=T(i);else if(n=At(e={},String(i)))throw TypeError(n);if(n=At(s,o,null,e))throw TypeError(n);var u=s.searchParams=new m,c=b(u);c.updateSearchParams(s.query),c.updateURL=function(){s.query=String(u)||null},a||(r.href=kt.call(r),r.origin=Mt.call(r),r.protocol=Ot.call(r),r.username=Ct.call(r),r.password=Rt.call(r),r.host=Lt.call(r),r.hostname=It.call(r),r.port=Dt.call(r),r.pathname=Pt.call(r),r.search=zt.call(r),r.searchParams=Ft.call(r),r.hash=Nt.call(r))},Et=St.prototype,kt=function(){var t=T(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+="//",K(t)&&(c+=n+(r?":"+r:"")+"@"),c+=U(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},Mt=function(){var t=T(this),e=t.scheme,n=t.port;if("blob"==e)try{return new URL(e.path[0]).origin}catch(t){return"null"}return"file"!=e&&Z(t)?e+"://"+U(t.host)+(null!==n?":"+n:""):"null"},Ot=function(){return T(this).scheme+":"},Ct=function(){return T(this).username},Rt=function(){return T(this).password},Lt=function(){var t=T(this),e=t.host,n=t.port;return null===e?"":null===n?U(e):U(e)+":"+n},It=function(){var t=T(this).host;return null===t?"":U(t)},Dt=function(){var t=T(this).port;return null===t?"":String(t)},Pt=function(){var t=T(this),e=t.path;return t.cannotBeABaseURL?e[0]:e.length?"/"+e.join("/"):""},zt=function(){var t=T(this).query;return t?"?"+t:""},Ft=function(){return T(this).searchParams},Nt=function(){var t=T(this).fragment;return t?"#"+t:""},Xt=function(t,e){return{get:t,set:e,configurable:!0,enumerable:!0}};if(a&&u(Et,{href:Xt(kt,(function(t){var e=T(this),n=String(t),r=At(e,n);if(r)throw TypeError(r);b(e.searchParams).updateSearchParams(e.query)})),origin:Xt(Mt),protocol:Xt(Ot,(function(t){var e=T(this);At(e,String(t)+":",rt)})),username:Xt(Ct,(function(t){var e=T(this),n=d(String(t));if(!J(e)){e.username="";for(var r=0;r<n.length;r++)e.username+=W(n[r],H)}})),password:Xt(Rt,(function(t){var e=T(this),n=d(String(t));if(!J(e)){e.password="";for(var r=0;r<n.length;r++)e.password+=W(n[r],H)}})),host:Xt(Lt,(function(t){var e=T(this);e.cannotBeABaseURL||At(e,String(t),dt)})),hostname:Xt(It,(function(t){var e=T(this);e.cannotBeABaseURL||At(e,String(t),gt)})),port:Xt(Dt,(function(t){var e=T(this);J(e)||(""==(t=String(t))?e.port=null:At(e,t,pt))})),pathname:Xt(Pt,(function(t){var e=T(this);e.cannotBeABaseURL||(e.path=[],At(e,t+"",_t))})),search:Xt(zt,(function(t){var e=T(this);""==(t=String(t))?e.query=null:("?"==t.charAt(0)&&(t=t.slice(1)),e.query="",At(e,t,wt)),b(e.searchParams).updateSearchParams(e.query)})),searchParams:Xt(Ft),hash:Xt(Nt,(function(t){var e=T(this);""!=(t=String(t))?("#"==t.charAt(0)&&(t=t.slice(1)),e.fragment="",At(e,t,Tt)):e.fragment=null}))}),c(Et,"toJSON",(function(){return kt.call(this)}),{enumerable:!0}),c(Et,"toString",(function(){return kt.call(this)}),{enumerable:!0}),_){var jt=_.createObjectURL,Bt=_.revokeObjectURL;jt&&c(St,"createObjectURL",(function(t){return jt.apply(_,arguments)})),Bt&&c(St,"revokeObjectURL",(function(t){return Bt.apply(_,arguments)}))}v(St,"URL"),i({global:!0,forced:!o,sham:!a},{URL:St})},function(t,e,n){var r=n(7),i=n(58),a=n(30),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(134);var r=n(3),i=n(35),a=n(377),o=n(22),s=n(286),u=n(61),c=n(136),l=n(26),f=n(287),h=n(16),d=n(63),g=n(89),p=n(21),v=n(15),y=n(53),x=n(9),_=n(380),m=n(88),b=n(58),w=i("fetch"),T=i("Headers"),A=b("iterator"),S="URLSearchParams",E="URLSearchParamsIterator",k=l.set,M=l.getterFor(S),O=l.getterFor(E),C=/\+/g,R=Array(4),L=function(t){return R[t-1]||(R[t-1]=RegExp("((?:%[\\da-f]{2}){"+t+"})","gi"))},I=function(t){try{return decodeURIComponent(t)}catch(e){return t}},D=function(t){var e=t.replace(C," "),n=4;try{return decodeURIComponent(e)}catch(t){for(;n;)e=e.replace(L(n--),I);return e}},P=/[!'()~]|%20/g,z={"!":"%21","'":"%27","(":"%28",")":"%29","~":"%7E","%20":"+"},F=function(t){return z[t]},N=function(t){return encodeURIComponent(t).replace(P,F)},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:D(r.shift()),value:D(r.join("="))}))},j=function(t){this.entries.length=0,X(this.entries,t)},B=function(t,e){if(t<e)throw TypeError("Not enough arguments")},$=c((function(t,e){k(this,{type:E,iterator:_(M(t).entries),kind:e})}),"Iterator",(function(){var t=O(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})),U=function(){f(this,U,S);var t,e,n,r,i,a,o,s,u,c=arguments.length>0?arguments[0]:void 0,l=this,d=[];if(k(l,{type:S,entries:d,updateURL:function(){},updateSearchParams:j}),void 0!==c)if(v(c))if("function"==typeof(t=m(c)))for(n=(e=t.call(c)).next;!(r=n.call(e)).done;){if((o=(a=(i=_(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:o.value+"",value:s.value+""})}else for(u in c)h(c,u)&&d.push({key:u,value:c[u]+""});else X(d,"string"==typeof c?"?"===c.charAt(0)?c.slice(1):c:c+"")},Y=U.prototype;s(Y,{append:function(t,e){B(arguments.length,2);var n=M(this);n.entries.push({key:t+"",value:e+""}),n.updateURL()},delete:function(t){B(arguments.length,1);for(var e=M(this),n=e.entries,r=t+"",i=0;i<n.length;)n[i].key===r?n.splice(i,1):i++;e.updateURL()},get:function(t){B(arguments.length,1);for(var e=M(this).entries,n=t+"",r=0;r<e.length;r++)if(e[r].key===n)return e[r].value;return null},getAll:function(t){B(arguments.length,1);for(var e=M(this).entries,n=t+"",r=[],i=0;i<e.length;i++)e[i].key===n&&r.push(e[i].value);return r},has:function(t){B(arguments.length,1);for(var e=M(this).entries,n=t+"",r=0;r<e.length;)if(e[r++].key===n)return!0;return!1},set:function(t,e){B(arguments.length,1);for(var n,r=M(this),i=r.entries,a=!1,o=t+"",s=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=M(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=M(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 $(this,"keys")},values:function(){return new $(this,"values")},entries:function(){return new $(this,"entries")}},{enumerable:!0}),o(Y,A,Y.entries),o(Y,"toString",(function(){for(var t,e=M(this).entries,n=[],r=0;r<e.length;)t=e[r++],n.push(N(t.key)+"="+N(t.value));return n.join("&")}),{enumerable:!0}),u(U,S),r({global:!0,forced:!a},{URLSearchParams:U}),a||"function"!=typeof w||"function"!=typeof T||r({global:!0,enumerable:!0,forced:!0},{fetch:function(t){var e,n,r,i=[t];return arguments.length>1&&(v(e=arguments[1])&&(n=e.body,g(n)===S&&((r=e.headers?new T(e.headers):new T).has("content-type")||r.set("content-type","application/x-www-form-urlencoded;charset=UTF-8"),e=y(e,{body:x(0,String(n)),headers:x(0,r)}))),i.push(e)),w.apply(this,i)}}),t.exports={URLSearchParams:U,getState:M}},function(t,e,n){var r=n(21),i=n(88);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(3)({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 C()}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 _={};_[a]=function(){return this};var m=Object.getPrototypeOf,b=m&&m(m(O([])));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 E(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 k(t){var e=t.completion||{};e.type="normal",delete e.arg,t.completion=e}function M(t){this.tryEntries=[{tryLoc:"root"}],t.forEach(E,this),this.reset(!0)}function O(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:C}}function C(){return{value:e,done:!0}}return y.prototype=w.constructor=x,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),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"),w[a]=function(){return this},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=O,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(k),!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),k(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;k(n)}return i}}throw new Error("illegal catch attempt")},delegateYield:function(t,n,r){return this.delegate={iterator:O(t),resultName:n,nextLoc:r},"next"===this.method&&(this.arg=e),p}},t}(t.exports);try{regeneratorRuntime=e}catch(t){Function("r","regeneratorRuntime = r")(e)}},function(t,e,n){"use strict";n.r(e),n.d(e,{bb:function(){return Vh},default:function(){return Vh}});var r={};n.r(r),n.d(r,{area:function(){return Jf},areaLineRange:function(){return Qf},areaSpline:function(){return th},areaSplineRange:function(){return eh},areaStep:function(){return nh},bar:function(){return lh},bubble:function(){return fh},candlestick:function(){return hh},donut:function(){return oh},gauge:function(){return sh},line:function(){return rh},pie:function(){return uh},radar:function(){return ch},scatter:function(){return dh},spline:function(){return ih},step:function(){return ah}});var i={};n.r(i),n.d(i,{selection:function(){return Bh},subchart:function(){return $h},zoom:function(){return Uh}});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;function d(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 g=d(0),p=d(1),v=d(2),y=d(3),x=d(4),_=d(5),m=d(6),b=(g.range,p.range,v.range,y.range,x.range,_.range,m.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}))),w=b;b.range;function T(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 A=T(0),S=T(1),E=T(2),k=T(3),M=T(4),O=T(5),C=T(6),R=(A.range,S.range,E.range,k.range,M.range,O.range,C.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}))),L=R,I=(R.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()})));I.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 D=I,P=(I.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()})));P.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 z=P;P.range;function F(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 N(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 X(t,e,n){return{y:t,m:e,d:n,H:0,M:0,S:0,L:0}}var j,B,$,U,Y,V={"-":"",_:" ",0:"0"},G=/^\s*\d+/,H=/^%/,W=/[\\^$*+?|[\]().{}]/g;function q(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 Z(t){return t.replace(W,"\\$&")}function K(t){return new RegExp("^(?:"+t.map(Z).join("|")+")","i")}function J(t){return new Map(t.map((function(t,e){return[t.toLowerCase(),e]})))}function Q(t,e,n){var r=G.exec(e.slice(n,n+1));return r?(t.w=+r[0],n+r[0].length):-1}function tt(t,e,n){var r=G.exec(e.slice(n,n+1));return r?(t.u=+r[0],n+r[0].length):-1}function et(t,e,n){var r=G.exec(e.slice(n,n+2));return r?(t.U=+r[0],n+r[0].length):-1}function nt(t,e,n){var r=G.exec(e.slice(n,n+2));return r?(t.V=+r[0],n+r[0].length):-1}function rt(t,e,n){var r=G.exec(e.slice(n,n+2));return r?(t.W=+r[0],n+r[0].length):-1}function it(t,e,n){var r=G.exec(e.slice(n,n+4));return r?(t.y=+r[0],n+r[0].length):-1}function at(t,e,n){var r=G.exec(e.slice(n,n+2));return r?(t.y=+r[0]+(+r[0]>68?1900:2e3),n+r[0].length):-1}function ot(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 st(t,e,n){var r=G.exec(e.slice(n,n+1));return r?(t.q=3*r[0]-3,n+r[0].length):-1}function ut(t,e,n){var r=G.exec(e.slice(n,n+2));return r?(t.m=r[0]-1,n+r[0].length):-1}function ct(t,e,n){var r=G.exec(e.slice(n,n+2));return r?(t.d=+r[0],n+r[0].length):-1}function lt(t,e,n){var r=G.exec(e.slice(n,n+3));return r?(t.m=0,t.d=+r[0],n+r[0].length):-1}function ft(t,e,n){var r=G.exec(e.slice(n,n+2));return r?(t.H=+r[0],n+r[0].length):-1}function ht(t,e,n){var r=G.exec(e.slice(n,n+2));return r?(t.M=+r[0],n+r[0].length):-1}function dt(t,e,n){var r=G.exec(e.slice(n,n+2));return r?(t.S=+r[0],n+r[0].length):-1}function gt(t,e,n){var r=G.exec(e.slice(n,n+3));return r?(t.L=+r[0],n+r[0].length):-1}function pt(t,e,n){var r=G.exec(e.slice(n,n+6));return r?(t.L=Math.floor(r[0]/1e3),n+r[0].length):-1}function vt(t,e,n){var r=H.exec(e.slice(n,n+1));return r?n+r[0].length:-1}function yt(t,e,n){var r=G.exec(e.slice(n));return r?(t.Q=+r[0],n+r[0].length):-1}function xt(t,e,n){var r=G.exec(e.slice(n));return r?(t.s=+r[0],n+r[0].length):-1}function _t(t,e){return q(t.getDate(),e,2)}function mt(t,e){return q(t.getHours(),e,2)}function bt(t,e){return q(t.getHours()%12||12,e,2)}function wt(t,e){return q(1+L.count(D(t),t),e,3)}function Tt(t,e){return q(t.getMilliseconds(),e,3)}function At(t,e){return Tt(t,e)+"000"}function St(t,e){return q(t.getMonth()+1,e,2)}function Et(t,e){return q(t.getMinutes(),e,2)}function kt(t,e){return q(t.getSeconds(),e,2)}function Mt(t){var e=t.getDay();return 0===e?7:e}function Ot(t,e){return q(A.count(D(t)-1,t),e,2)}function Ct(t){var e=t.getDay();return e>=4||0===e?M(t):M.ceil(t)}function Rt(t,e){return t=Ct(t),q(M.count(D(t),t)+(4===D(t).getDay()),e,2)}function Lt(t){return t.getDay()}function It(t,e){return q(S.count(D(t)-1,t),e,2)}function Dt(t,e){return q(t.getFullYear()%100,e,2)}function Pt(t,e){return q((t=Ct(t)).getFullYear()%100,e,2)}function zt(t,e){return q(t.getFullYear()%1e4,e,4)}function Ft(t,e){var n=t.getDay();return q((t=n>=4||0===n?M(t):M.ceil(t)).getFullYear()%1e4,e,4)}function Nt(t){var e=t.getTimezoneOffset();return(e>0?"-":(e*=-1,"+"))+q(e/60|0,"0",2)+q(e%60,"0",2)}function Xt(t,e){return q(t.getUTCDate(),e,2)}function jt(t,e){return q(t.getUTCHours(),e,2)}function Bt(t,e){return q(t.getUTCHours()%12||12,e,2)}function $t(t,e){return q(1+w.count(z(t),t),e,3)}function Ut(t,e){return q(t.getUTCMilliseconds(),e,3)}function Yt(t,e){return Ut(t,e)+"000"}function Vt(t,e){return q(t.getUTCMonth()+1,e,2)}function Gt(t,e){return q(t.getUTCMinutes(),e,2)}function Ht(t,e){return q(t.getUTCSeconds(),e,2)}function Wt(t){var e=t.getUTCDay();return 0===e?7:e}function qt(t,e){return q(g.count(z(t)-1,t),e,2)}function Zt(t){var e=t.getUTCDay();return e>=4||0===e?x(t):x.ceil(t)}function Kt(t,e){return t=Zt(t),q(x.count(z(t),t)+(4===z(t).getUTCDay()),e,2)}function Jt(t){return t.getUTCDay()}function Qt(t,e){return q(p.count(z(t)-1,t),e,2)}function te(t,e){return q(t.getUTCFullYear()%100,e,2)}function ee(t,e){return q((t=Zt(t)).getUTCFullYear()%100,e,2)}function ne(t,e){return q(t.getUTCFullYear()%1e4,e,4)}function re(t,e){var n=t.getUTCDay();return q((t=n>=4||0===n?x(t):x.ceil(t)).getUTCFullYear()%1e4,e,4)}function ie(){return"+0000"}function ae(){return"%"}function oe(t){return+t}function se(t){return Math.floor(+t/1e3)}function ue(){}function ce(t){return null==t?ue:function(){return this.querySelector(t)}}function le(t){return"object"==typeof t&&"length"in t?t:Array.from(t)}function fe(){return[]}function he(t){return null==t?fe:function(){return this.querySelectorAll(t)}}function de(t){return function(){return this.matches(t)}}function ge(t){return function(e){return e.matches(t)}}j=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=V[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=X(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=N(X(o.y,0,1))).getUTCDay(),i=a>4||0===a?p.ceil(i):p(i),i=w.offset(i,7*(o.V-1)),o.y=i.getUTCFullYear(),o.m=i.getUTCMonth(),o.d=i.getUTCDate()+(o.w+6)%7):(a=(i=F(X(o.y,0,1))).getDay(),i=a>4||0===a?S.ceil(i):S(i),i=L.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?N(X(o.y,0,1)).getUTCDay():F(X(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,N(o)):F(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 V?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=K(s),d=J(s),g=K(u),v=J(u),y=K(c),x=J(c),_=K(l),m=J(l),b=K(f),T=J(f),A={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:_t,e:_t,f:At,g:Pt,G:Ft,H:mt,I:bt,j:wt,L:Tt,m:St,M:Et,p:function(t){return s[+(t.getHours()>=12)]},q:function(t){return 1+~~(t.getMonth()/3)},Q:oe,s:se,S:kt,u:Mt,U:Ot,V:Rt,w:Lt,W:It,x:null,X:null,y:Dt,Y:zt,Z:Nt,"%":ae},E={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:Xt,e:Xt,f:Yt,g:ee,G:re,H:jt,I:Bt,j:$t,L:Ut,m:Vt,M:Gt,p:function(t){return s[+(t.getUTCHours()>=12)]},q:function(t){return 1+~~(t.getUTCMonth()/3)},Q:oe,s:se,S:Ht,u:Wt,U:qt,V:Kt,w:Jt,W:Qt,x:null,X:null,y:te,Y:ne,Z:ie,"%":ae},k={a:function(t,e,n){var r=y.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=v.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=T.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:ct,e:ct,f:pt,g:at,G:it,H:ft,I:ft,j:lt,L:gt,m:ut,M:ht,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:st,Q:yt,s:xt,S:dt,u:tt,U:et,V:nt,w:Q,W:rt,x:function(t,e,n){return r(t,a,e,n)},X:function(t,e,n){return r(t,o,e,n)},y:at,Y:it,Z:ot,"%":vt};return A.x=e(a,A),A.X=e(o,A),A.c=e(i,A),E.x=e(a,E),E.X=e(o,E),E.c=e(i,E),{format:function(t){var n=e(t+="",A);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+="",E);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"]}),B=j.format,$=j.parse,U=j.utcFormat,Y=j.utcParse;var pe=Array.prototype.find;function ve(){return this.firstElementChild}var ye=Array.prototype.filter;function xe(){return this.children}function _e(t){return Array(t.length)}function me(t,e){this.ownerDocument=t.ownerDocument,this.namespaceURI=t.namespaceURI,this._next=null,this._parent=t,this.__data__=e}function be(t){return function(){return t}}function we(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 me(t,a[s]);for(;s<u;++s)(o=e[s])&&(i[s]=o)}function Te(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 me(t,a[s]);for(s=0;s<f;++s)(u=e[s])&&l.get(d[s])===u&&(i[s]=u)}function Ae(t){return t.__data__}function Se(t,e){return t<e?-1:t>e?1:t>=e?0:NaN}function Ee(t,e){var n;if("undefined"==typeof Symbol||null==t[Symbol.iterator]){if(Array.isArray(t)||(n=function(t,e){if(t){if("string"==typeof t)return ke(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)?ke(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.")}return(n=t[Symbol.iterator]()).next.bind(n)}function ke(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}me.prototype={constructor:me,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 Me="http://www.w3.org/1999/xhtml",Oe={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 Ce(t){var e=t+="",n=e.indexOf(":");return n>=0&&"xmlns"!==(e=t.slice(0,n))&&(t=t.slice(n+1)),Oe.hasOwnProperty(e)?{space:Oe[e],local:t}:t}function Re(t){return function(){this.removeAttribute(t)}}function Le(t){return function(){this.removeAttributeNS(t.space,t.local)}}function Ie(t,e){return function(){this.setAttribute(t,e)}}function De(t,e){return function(){this.setAttributeNS(t.space,t.local,e)}}function Pe(t,e){return function(){var n=e.apply(this,arguments);null==n?this.removeAttribute(t):this.setAttribute(t,n)}}function ze(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 Fe(t){return t.ownerDocument&&t.ownerDocument.defaultView||t.document&&t||t.defaultView}function Ne(t){return function(){this.style.removeProperty(t)}}function Xe(t,e,n){return function(){this.style.setProperty(t,e,n)}}function je(t,e,n){return function(){var r=e.apply(this,arguments);null==r?this.style.removeProperty(t):this.style.setProperty(t,r,n)}}function Be(t,e){return t.style.getPropertyValue(e)||Fe(t).getComputedStyle(t,null).getPropertyValue(e)}function $e(t){return function(){delete this[t]}}function Ue(t,e){return function(){this[t]=e}}function Ye(t,e){return function(){var n=e.apply(this,arguments);null==n?delete this[t]:this[t]=n}}function Ve(t){return t.trim().split(/^|\s+/)}function Ge(t){return t.classList||new He(t)}function He(t){this._node=t,this._names=Ve(t.getAttribute("class")||"")}function We(t,e){for(var n=Ge(t),r=-1,i=e.length;++r<i;)n.add(e[r])}function qe(t,e){for(var n=Ge(t),r=-1,i=e.length;++r<i;)n.remove(e[r])}function Ze(t){return function(){We(this,t)}}function Ke(t){return function(){qe(this,t)}}function Je(t,e){return function(){(e.apply(this,arguments)?We:qe)(this,t)}}function Qe(){this.textContent=""}function tn(t){return function(){this.textContent=t}}function en(t){return function(){var e=t.apply(this,arguments);this.textContent=null==e?"":e}}function nn(){this.innerHTML=""}function rn(t){return function(){this.innerHTML=t}}function an(t){return function(){var e=t.apply(this,arguments);this.innerHTML=null==e?"":e}}function on(){this.nextSibling&&this.parentNode.appendChild(this)}function sn(){this.previousSibling&&this.parentNode.insertBefore(this,this.parentNode.firstChild)}function un(t){return function(){var e=this.ownerDocument,n=this.namespaceURI;return n===Me&&e.documentElement.namespaceURI===Me?e.createElement(t):e.createElementNS(n,t)}}function cn(t){return function(){return this.ownerDocument.createElementNS(t.space,t.local)}}function ln(t){var e=Ce(t);return(e.local?cn:un)(e)}function fn(){return null}function hn(){var t=this.parentNode;t&&t.removeChild(this)}function dn(){var t=this.cloneNode(!1),e=this.parentNode;return e?e.insertBefore(t,this.nextSibling):t}function gn(){var t=this.cloneNode(!0),e=this.parentNode;return e?e.insertBefore(t,this.nextSibling):t}function pn(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 vn(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 yn(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 xn(t,e,n){var r=Fe(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 _n(t,e){return function(){return xn(this,t,e)}}function mn(t,e){return function(){return xn(this,t,e.apply(this,arguments))}}He.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 bn,wn=n(384),Tn=n.n(wn),An=Tn().mark(Sn);function Sn(){var t,e,n,r,i,a,o;return Tn().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()}}),An,this)}var En=[null];function kn(t,e){this._groups=t,this._parents=e}function Mn(){return new kn([[document.documentElement]],En)}kn.prototype=Mn.prototype=((bn={constructor:kn,select:function(t){"function"!=typeof t&&(t=ce(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 kn(r,this._parents)},selectAll:function(t){t="function"==typeof t?function(t){return function(){var e=t.apply(this,arguments);return null==e?[]:le(e)}}(t):he(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 kn(r,i)},selectChild:function(t){return this.select(null==t?ve:function(t){return function(){return pe.call(this.children,t)}}("function"==typeof t?t:ge(t)))},selectChildren:function(t){return this.selectAll(null==t?xe:function(t){return function(){return ye.call(this.children,t)}}("function"==typeof t?t:ge(t)))},filter:function(t){"function"!=typeof t&&(t=de(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 kn(r,this._parents)},data:function(t,e){if(!arguments.length)return Array.from(this,Ae);var n=e?Te:we,r=this._parents,i=this._groups;"function"!=typeof t&&(t=be(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=le(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 kn(o,r))._enter=s,o._exit=u,o},enter:function(){return new kn(this._enter||this._groups.map(_e),this._parents)},exit:function(){return new kn(this._exit||this._groups.map(_e),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 kn))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 kn(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=Se);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 kn(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=Ee(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=Ce(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?Le:Re:"function"==typeof e?n.local?ze:Pe:n.local?De:Ie)(n,e))},style:function(t,e,n){return arguments.length>1?this.each((null==e?Ne:"function"==typeof e?je:Xe)(t,e,null==n?"":n)):Be(this.node(),t)},property:function(t,e){return arguments.length>1?this.each((null==e?$e:"function"==typeof e?Ye:Ue)(t,e)):this.node()[t]},classed:function(t,e){var n=Ve(t+"");if(arguments.length<2){for(var r=Ge(this.node()),i=-1,a=n.length;++i<a;)if(!r.contains(n[i]))return!1;return!0}return this.each(("function"==typeof e?Je:e?Ze:Ke)(n,e))},text:function(t){return arguments.length?this.each(null==t?Qe:("function"==typeof t?en:tn)(t)):this.node().textContent},html:function(t){return arguments.length?this.each(null==t?nn:("function"==typeof t?an:rn)(t)):this.node().innerHTML},raise:function(){return this.each(on)},lower:function(){return this.each(sn)},append:function(t){var e="function"==typeof t?t:ln(t);return this.select((function(){return this.appendChild(e.apply(this,arguments))}))},insert:function(t,e){var n="function"==typeof t?t:ln(t),r=null==e?fn:"function"==typeof e?e:ce(e);return this.select((function(){return this.insertBefore(n.apply(this,arguments),r.apply(this,arguments)||null)}))},remove:function(){return this.each(hn)},clone:function(t){return this.select(t?gn:dn)},datum:function(t){return arguments.length?this.property("__data__",t):this.node().__data__},on:function(t,e,n){var r,i,a=pn(t+""),o=a.length;if(!(arguments.length<2)){for(s=e?yn:vn,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?mn:_n)(t,e))}})[Symbol.iterator]=Sn,bn);var On=Mn;function Cn(t){return"string"==typeof t?new kn([[document.querySelector(t)]],[document.documentElement]):new kn([[t]],En)}var Rn={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"},Ln={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}},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}}}},In=function(){function t(){var t=this;Object.keys(Ln).forEach((function(e){t[e]=new Ln[e]}))}return t.prototype.getStore=function(t){return this[t]},t}();function Dn(t,e,n){return e in t?Object.defineProperty(t,e,{value:n,enumerable:!0,configurable:!0,writable:!0}):t[e]=n,t}var Pn={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:[]},zn={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_colors:void 0,data_labels_position:{},data_hide:!1,data_filter:void 0,data_onclick:function(){},data_onover:function(){},data_onout:function(){},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:""},Fn={color_pattern:[],color_tiles:void 0,color_threshold:{},color_onover:void 0},Nn={interaction_enabled:!0,interaction_brighten:!0,interaction_inputType_mouse:!0,interaction_inputType_touch:{}},Xn={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},jn={title_text:void 0,title_padding:{top:0,right:0,bottom:0,left:0},title_position:"center"},Bn={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 $n(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 Un={value:function(){}};function Yn(){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 Vn(r)}function Vn(t){this._=t}function Gn(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 Hn(t,e){for(var n,r=0,i=t.length;r<i;++r)if((n=t[r]).name===e)return n.value}function Wn(t,e,n){for(var r=0,i=t.length;r<i;++r)if(t[r].name===e){t[r]=Un,t=t.slice(0,r).concat(t.slice(r+1));break}return null!=n&&t.push({name:e,value:n}),t}Vn.prototype=Yn.prototype={constructor:Vn,on:function(t,e){var n,r=this._,i=Gn(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]=Wn(r[n],t.name,e);else if(null==e)for(n in r)r[n]=Wn(r[n],t.name,null);return this}for(;++a<o;)if((n=(t=i[a]).type)&&(n=Hn(r[n],t.name)))return n},copy:function(){var t={},e=this._;for(var n in e)t[n]=e[n].slice();return new Vn(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 qn=Yn;function Zn(t){t.stopImmediatePropagation()}function Kn(t){t.preventDefault(),t.stopImmediatePropagation()}function Jn(t){var e=t.document.documentElement,n=Cn(t).on("dragstart.drag",Kn,!0);"onselectstart"in e?n.on("selectstart.drag",Kn,!0):(e.__noselect=e.style.MozUserSelect,e.style.MozUserSelect="none")}function Qn(t,e){var n=t.document.documentElement,r=Cn(t).on("dragstart.drag",null);e&&(r.on("click.drag",Kn,!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 tr(t,e,n){t.prototype=e.prototype=n,n.constructor=t}function er(t,e){var n=Object.create(t.prototype);for(var r in e)n[r]=e[r];return n}function nr(){}var rr=.7,ir=1/rr,ar=/^#([0-9a-f]{3,8})$/,or=new RegExp("^rgb\\(\\s*([+-]?\\d+)\\s*,\\s*([+-]?\\d+)\\s*,\\s*([+-]?\\d+)\\s*\\)$"),sr=new RegExp("^rgb\\(\\s*([+-]?\\d*\\.?\\d+(?:[eE][+-]?\\d+)?)%\\s*,\\s*([+-]?\\d*\\.?\\d+(?:[eE][+-]?\\d+)?)%\\s*,\\s*([+-]?\\d*\\.?\\d+(?:[eE][+-]?\\d+)?)%\\s*\\)$"),ur=new RegExp("^rgba\\(\\s*([+-]?\\d+)\\s*,\\s*([+-]?\\d+)\\s*,\\s*([+-]?\\d+)\\s*,\\s*([+-]?\\d*\\.?\\d+(?:[eE][+-]?\\d+)?)\\s*\\)$"),cr=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*\\)$"),lr=new RegExp("^hsl\\(\\s*([+-]?\\d*\\.?\\d+(?:[eE][+-]?\\d+)?)\\s*,\\s*([+-]?\\d*\\.?\\d+(?:[eE][+-]?\\d+)?)%\\s*,\\s*([+-]?\\d*\\.?\\d+(?:[eE][+-]?\\d+)?)%\\s*\\)$"),fr=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*\\)$"),hr={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 dr(){return this.rgb().formatHex()}function gr(){return this.rgb().formatRgb()}function pr(t){var e,n;return t=(t+"").trim().toLowerCase(),(e=ar.exec(t))?(n=e[1].length,e=parseInt(e[1],16),6===n?vr(e):3===n?new mr(e>>8&15|e>>4&240,e>>4&15|240&e,(15&e)<<4|15&e,1):8===n?yr(e>>24&255,e>>16&255,e>>8&255,(255&e)/255):4===n?yr(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=or.exec(t))?new mr(e[1],e[2],e[3],1):(e=sr.exec(t))?new mr(255*e[1]/100,255*e[2]/100,255*e[3]/100,1):(e=ur.exec(t))?yr(e[1],e[2],e[3],e[4]):(e=cr.exec(t))?yr(255*e[1]/100,255*e[2]/100,255*e[3]/100,e[4]):(e=lr.exec(t))?Ar(e[1],e[2]/100,e[3]/100,1):(e=fr.exec(t))?Ar(e[1],e[2]/100,e[3]/100,e[4]):hr.hasOwnProperty(t)?vr(hr[t]):"transparent"===t?new mr(NaN,NaN,NaN,0):null}function vr(t){return new mr(t>>16&255,t>>8&255,255&t,1)}function yr(t,e,n,r){return r<=0&&(t=e=n=NaN),new mr(t,e,n,r)}function xr(t){return t instanceof nr||(t=pr(t)),t?new mr((t=t.rgb()).r,t.g,t.b,t.opacity):new mr}function _r(t,e,n,r){return 1===arguments.length?xr(t):new mr(t,e,n,null==r?1:r)}function mr(t,e,n,r){this.r=+t,this.g=+e,this.b=+n,this.opacity=+r}function br(){return"#"+Tr(this.r)+Tr(this.g)+Tr(this.b)}function wr(){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 Tr(t){return((t=Math.max(0,Math.min(255,Math.round(t)||0)))<16?"0":"")+t.toString(16)}function Ar(t,e,n,r){return r<=0?t=e=n=NaN:n<=0||n>=1?t=e=NaN:e<=0&&(t=NaN),new Er(t,e,n,r)}function Sr(t){if(t instanceof Er)return new Er(t.h,t.s,t.l,t.opacity);if(t instanceof nr||(t=pr(t)),!t)return new Er;if(t instanceof Er)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 Er(o,s,u,t.opacity)}function Er(t,e,n,r){this.h=+t,this.s=+e,this.l=+n,this.opacity=+r}function kr(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 Mr(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}tr(nr,pr,{copy:function(t){return Object.assign(new this.constructor,this,t)},displayable:function(){return this.rgb().displayable()},hex:dr,formatHex:dr,formatHsl:function(){return Sr(this).formatHsl()},formatRgb:gr,toString:gr}),tr(mr,_r,er(nr,{brighter:function(t){return t=null==t?ir:Math.pow(ir,t),new mr(this.r*t,this.g*t,this.b*t,this.opacity)},darker:function(t){return t=null==t?rr:Math.pow(rr,t),new mr(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:br,formatHex:br,formatRgb:wr,toString:wr})),tr(Er,(function(t,e,n,r){return 1===arguments.length?Sr(t):new Er(t,e,n,null==r?1:r)}),er(nr,{brighter:function(t){return t=null==t?ir:Math.pow(ir,t),new Er(this.h,this.s,this.l*t,this.opacity)},darker:function(t){return t=null==t?rr:Math.pow(rr,t),new Er(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 mr(kr(t>=240?t-240:t+120,i,r),kr(t,i,r),kr(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 Or=function(t){return function(){return t}};function Cr(t,e){return function(n){return t+n*e}}function Rr(t){return 1==(t=+t)?Lr: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):Or(isNaN(e)?n:e)}}function Lr(t,e){var n=e-t;return n?Cr(t,n):Or(isNaN(t)?e:t)}var Ir=function t(e){function n(t,e){var n=r((t=_r(t)).r,(e=_r(e)).r),i=r(t.g,e.g),a=r(t.b,e.b),o=Lr(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=Rr(e);return n.gamma=t,n}(1);function Dr(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=_r(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+""}}}Dr((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 Mr((n-r/e)*e,o,i,a,s)}})),Dr((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 Mr((n-r/e)*e,i,a,o,s)}}));function Pr(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 zr(t){return ArrayBuffer.isView(t)&&!(t instanceof DataView)}function Fr(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]=Yr(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 Nr(t,e){var n=new Date;return t=+t,e=+e,function(r){return n.setTime(t*(1-r)+e*r),n}}function Xr(t,e){return t=+t,e=+e,function(n){return t*(1-n)+e*n}}function jr(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]=Yr(t[n],e[n]):i[n]=e[n];return function(t){for(n in r)i[n]=r[n](t);return i}}var Br=/[-+]?(?:\d+\.?\d*|\.?\d+)(?:[eE][-+]?\d+)?/g,$r=new RegExp(Br.source,"g");function Ur(t,e){var n,r,i,a=Br.lastIndex=$r.lastIndex=0,o=-1,s=[],u=[];for(t+="",e+="";(n=Br.exec(t))&&(r=$r.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:Xr(n,r)})),a=$r.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 Yr(t,e){var n,r=typeof e;return null==e||"boolean"===r?Or(e):("number"===r?Xr:"string"===r?(n=pr(e))?(e=n,Ir):Ur:e instanceof pr?Ir:e instanceof Date?Nr:zr(e)?Pr:Array.isArray(e)?Fr:"function"!=typeof e.valueOf&&"function"!=typeof e.toString||isNaN(e)?jr:Xr)(t,e)}var Vr,Gr,Hr=0,Wr=0,qr=0,Zr=0,Kr=0,Jr=0,Qr="object"==typeof performance&&performance.now?performance:Date,ti="object"==typeof window&&window.requestAnimationFrame?window.requestAnimationFrame.bind(window):function(t){setTimeout(t,17)};function ei(){return Kr||(ti(ni),Kr=Qr.now()+Jr)}function ni(){Kr=0}function ri(){this._call=this._time=this._next=null}function ii(t,e,n){var r=new ri;return r.restart(t,e,n),r}function ai(){Kr=(Zr=Qr.now())+Jr,Hr=Wr=0;try{!function(){ei(),++Hr;for(var t,e=Vr;e;)(t=Kr-e._time)>=0&&e._call.call(null,t),e=e._next;--Hr}()}finally{Hr=0,function(){for(var t,e,n=Vr,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:Vr=e);Gr=t,si(r)}(),Kr=0}}function oi(){var t=Qr.now(),e=t-Zr;e>1e3&&(Jr-=e,Zr=t)}function si(t){Hr||(Wr&&(Wr=clearTimeout(Wr)),t-Kr>24?(t<1/0&&(Wr=setTimeout(ai,t-Qr.now()-Jr)),qr&&(qr=clearInterval(qr))):(!qr&&(Zr=Qr.now(),qr=setInterval(oi,1e3)),Hr=1,ti(ai)))}function ui(t,e,n){var r=new ri;return e=null==e?0:+e,r.restart((function(n){r.stop(),t(n+e)}),e,n),r}ri.prototype=ii.prototype={constructor:ri,restart:function(t,e,n){if("function"!=typeof t)throw new TypeError("callback is not a function");n=(null==n?ei():+n)+(null==e?0:+e),this._next||Gr===this||(Gr?Gr._next=this:Vr=this,Gr=this),this._call=t,this._time=n,si()},stop:function(){this._call&&(this._call=null,this._time=1/0,si())}};var ci=qn("start","end","cancel","interrupt"),li=[];function fi(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 ui(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(ui((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=ii((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:ci,tween:li,time:a.time,delay:a.delay,duration:a.duration,ease:a.ease,timer:null,state:0})}function hi(t,e){var n=gi(t,e);if(n.state>0)throw new Error("too late; already scheduled");return n}function di(t,e){var n=gi(t,e);if(n.state>3)throw new Error("too late; already running");return n}function gi(t,e){var n=t.__transition;if(!n||!(n=n[e]))throw new Error("transition not found");return n}function pi(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 vi,yi=180/Math.PI,xi={translateX:0,translateY:0,rotate:0,skewX:0,scaleX:1,scaleY:1};function _i(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)*yi,skewX:Math.atan(u)*yi,scaleX:o,scaleY:s}}function mi(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:Xr(t,i)},{i:u-2,x:Xr(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:Xr(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:Xr(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:Xr(t,n)},{i:s-2,x:Xr(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 bi=mi((function(t){var e=new("function"==typeof DOMMatrix?DOMMatrix:WebKitCSSMatrix)(t+"");return e.isIdentity?xi:_i(e.a,e.b,e.c,e.d,e.e,e.f)}),"px, ","px)","deg)"),wi=mi((function(t){return null==t?xi:(vi||(vi=document.createElementNS("http://www.w3.org/2000/svg","g")),vi.setAttribute("transform",t),(t=vi.transform.baseVal.consolidate())?_i((t=t.matrix).a,t.b,t.c,t.d,t.e,t.f):xi)}),", ",")",")");function Ti(t,e){var n,r;return function(){var i=di(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 Ai(t,e,n){var r,i;if("function"!=typeof n)throw new Error;return function(){var a=di(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 Si(t,e,n){var r=t._id;return t.each((function(){var t=di(this,r);(t.value||(t.value={}))[e]=n.apply(this,arguments)})),function(t){return gi(t,r).value[e]}}function Ei(t,e){var n;return("number"==typeof e?Xr:e instanceof pr?Ir:(n=pr(e))?(e=n,Ir):Ur)(t,e)}function ki(t){return function(){this.removeAttribute(t)}}function Mi(t){return function(){this.removeAttributeNS(t.space,t.local)}}function Oi(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 Ci(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 Ri(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 Li(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 Ii(t,e){return function(n){this.setAttribute(t,e.call(this,n))}}function Di(t,e){return function(n){this.setAttributeNS(t.space,t.local,e.call(this,n))}}function Pi(t,e){function n(){var n=e.apply(this,arguments);return n!==i&&(r=(i=n)&&Di(t,n)),r}var r,i;return n._value=e,n}function zi(t,e){function n(){var n=e.apply(this,arguments);return n!==i&&(r=(i=n)&&Ii(t,n)),r}var r,i;return n._value=e,n}function Fi(t,e){return function(){hi(this,t).delay=+e.apply(this,arguments)}}function Ni(t,e){return e=+e,function(){hi(this,t).delay=e}}function Xi(t,e){return function(){di(this,t).duration=+e.apply(this,arguments)}}function ji(t,e){return e=+e,function(){di(this,t).duration=e}}function Bi(t,e){if("function"!=typeof e)throw new Error;return function(){di(this,t).ease=e}}function $i(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)?hi:di;return function(){var o=a(this,t),s=o.on;s!==r&&(i=(r=s).copy()).on(e,n),o.on=i}}var Ui,Yi=On.prototype.constructor;function Vi(t){return function(){this.style.removeProperty(t)}}function Gi(t,e,n){return function(r){this.style.setProperty(t,e.call(this,r),n)}}function Hi(t,e,n){function r(){var r=e.apply(this,arguments);return r!==a&&(i=(a=r)&&Gi(t,r,n)),i}var i,a;return r._value=e,r}function Wi(t){return function(e){this.textContent=t.call(this,e)}}function qi(t){function e(){var e=t.apply(this,arguments);return e!==r&&(n=(r=e)&&Wi(e)),n}var n,r;return e._value=t,e}var Zi=0;function Ki(t,e,n,r){this._groups=t,this._parents=e,this._name=n,this._id=r}function Ji(t){return On().transition(t)}function Qi(){return++Zi}var ta=On.prototype;Ki.prototype=Ji.prototype=((Ui={constructor:Ki,select:function(t){var e=this._name,n=this._id;"function"!=typeof t&&(t=ce(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,fi(f[h],e,n,h,f,gi(s,n)));return new Ki(a,this._parents,e,n)},selectAll:function(t){var e=this._name,n=this._id;"function"!=typeof t&&(t=he(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=gi(u,n),p=0,v=d.length;p<v;++p)(h=d[p])&&fi(h,e,n,p,d,g);a.push(d),o.push(u)}return new Ki(a,o,e,n)},filter:function(t){"function"!=typeof t&&(t=de(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 Ki(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 Ki(o,this._parents,this._name,this._id)},selection:function(){return new Yi(this._groups,this._parents)},transition:function(){for(var t=this._name,e=this._id,n=Qi(),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=gi(o,e);fi(o,t,n,c,s,{time:l.time+l.delay+l.duration,delay:0,duration:l.duration,ease:l.ease})}return new Ki(r,this._parents,t,n)},call:ta.call,nodes:ta.nodes,node:ta.node,size:ta.size,empty:ta.empty,each:ta.each,on:function(t,e){var n=this._id;return arguments.length<2?gi(this.node(),n).on.on(t):this.each($i(n,t,e))},attr:function(t,e){var n=Ce(t),r="transform"===n?wi:Ei;return this.attrTween(t,"function"==typeof e?(n.local?Li:Ri)(n,r,Si(this,"attr."+t,e)):null==e?(n.local?Mi:ki)(n):(n.local?Ci:Oi)(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=Ce(t);return this.tween(n,(r.local?Pi:zi)(r,e))},style:function(t,e,n){var r="transform"==(t+="")?bi:Ei;return null==e?this.styleTween(t,function(t,e){var n,r,i;return function(){var a=Be(this,t),o=(this.style.removeProperty(t),Be(this,t));return a===o?null:a===n&&o===r?i:i=e(n=a,r=o)}}(t,r)).on("end.style."+t,Vi(t)):"function"==typeof e?this.styleTween(t,function(t,e,n){var r,i,a;return function(){var o=Be(this,t),s=n(this),u=s+"";return null==s&&(this.style.removeProperty(t),u=s=Be(this,t)),o===u?null:o===r&&u===i?a:(i=u,a=e(r=o,s))}}(t,r,Si(this,"style."+t,e))).each(function(t,e){var n,r,i,a,o="style."+e;return function(){var s=di(this,t),u=s.on,c=null==s.value[o]?a||(a=Vi(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=Be(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,Hi(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}}(Si(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,qi(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=gi(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?Ti:Ai)(n,t,e))},delay:function(t){var e=this._id;return arguments.length?this.each(("function"==typeof t?Fi:Ni)(e,t)):gi(this.node(),e).delay},duration:function(t){var e=this._id;return arguments.length?this.each(("function"==typeof t?Xi:ji)(e,t)):gi(this.node(),e).duration},ease:function(t){var e=this._id;return arguments.length?this.each(Bi(e,t)):gi(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;di(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=di(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]=ta[Symbol.iterator],Ui);var ea={time:null,delay:0,duration:250,ease:function(t){return((t*=2)<=1?t*t*t:(t-=2)*t*t+2)/2}};function na(t,e){for(var n;!(n=t.__transition)||!(n=n[e]);)if(!(t=t.parentNode))throw new Error("transition "+e+" not found");return n}On.prototype.interrupt=function(t){return this.each((function(){pi(this,t)}))},On.prototype.transition=function(t){var e,n;t instanceof Ki?(e=t._id,t=t._name):(e=Qi(),(n=ea).time=ei(),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])&&fi(o,t,e,c,s,n||na(o,e));return new Ki(r,this._parents,t,e)};var ra=function(t){return function(){return t}};function ia(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 aa(t){t.stopImmediatePropagation()}function oa(t){t.preventDefault(),t.stopImmediatePropagation()}function sa(t,e){var n;if("undefined"==typeof Symbol||null==t[Symbol.iterator]){if(Array.isArray(t)||(n=function(t,e){if(t){if("string"==typeof t)return ua(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)?ua(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.")}return(n=t[Symbol.iterator]()).next.bind(n)}function ua(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 ca={name:"drag"},la={name:"space"},fa={name:"handle"},ha={name:"center"},da=Math.abs,ga=Math.max,pa=Math.min;function va(t){return[+t[0],+t[1]]}function ya(t){return[va(t[0]),va(t[1])]}var xa={name:"x",handles:["w","e"].map(Sa),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]]}},_a={name:"y",handles:["n","s"].map(Sa),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]]}},ma=(["n","w","e","s","nw","ne","sw","se"].map(Sa),{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"}),ba={e:"w",w:"e",nw:"ne",ne:"nw",se:"sw",sw:"se"},wa={n:"s",s:"n",nw:"sw",ne:"se",se:"ne",sw:"nw"},Ta={overlay:1,selection:1,n:null,e:1,s:null,w:-1,nw:-1,ne:1,se:1,sw:-1},Aa={overlay:1,selection:1,n:-1,e:null,s:1,w:null,nw:-1,ne:-1,se:1,sw:1};function Sa(t){return{type:t}}function Ea(t){return!t.ctrlKey&&!t.button}function ka(){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 Ma(){return navigator.maxTouchPoints||"ontouchstart"in this}function Oa(t){for(;!t.__brush;)if(!(t=t.parentNode))return;return t.__brush}function Ca(t){return t[0][0]===t[1][0]||t[0][1]===t[1][1]}function Ra(t){var e=t.__brush;return e?e.dim.output(e.selection):null}function La(t){function e(e){var r=e.property("__brush",u).selectAll(".overlay").data([Sa("overlay")]);r.enter().append("rect").attr("class","overlay").attr("pointer-events","all").attr("cursor",ma.overlay).merge(r).each((function(){var t=Oa(this).extent;Cn(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([Sa("selection")]).enter().append("rect").attr("class","selection").attr("cursor",ma.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 ma[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=Cn(this),e=Oa(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=sa(t.changedTouches||[t]);!(e=r()).done;){n=e.value;for(var i,o,s=sa(N);!(i=s()).done;)(o=i.value).identifier===n.identifier&&(o.cur=$n(n,T))}if(F&&!b&&!w&&1===N.length){var u=N[0];da(u.cur[0]-u[0])>da(u.cur[1]-u[1])?w=!0:b=!0}for(var c,l,f=sa(N);!(c=f()).done;)(l=c.value).cur&&(l[0]=l.cur[0],l[1]=l.cur[1]);m=!0,oa(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 la:case ca:E&&(P=ga(R-l,pa(I-v,P)),h=l+P,y=v+P),k&&(z=ga(L-g,pa(D-x,z)),p=g+z,_=x+z);break;case fa:N[1]?(E&&(h=ga(R,pa(I,N[0][0])),y=ga(R,pa(I,N[1][0])),E=1),k&&(p=ga(L,pa(D,N[0][1])),_=ga(L,pa(D,N[1][1])),k=1)):(E<0?(P=ga(R-l,pa(I-l,P)),h=l+P,y=v):E>0&&(P=ga(R-v,pa(I-v,P)),h=l,y=v+P),k<0?(z=ga(L-g,pa(D-g,z)),p=g+z,_=x):k>0&&(z=ga(L-x,pa(D-x,z)),p=g,_=x+z));break;case ha:E&&(h=ga(R,pa(I,l-P*E)),y=ga(R,pa(I,v+P*E))),k&&(p=ga(L,pa(D,g-z*k)),_=ga(L,pa(D,x+z*k)))}y<h&&(E*=-1,e=l,l=v,v=e,e=h,h=y,y=e,A in ba&&B.attr("cursor",ma[A=ba[A]])),_<p&&(k*=-1,e=g,g=x,x=e,e=p,p=_,_=e,A in wa&&B.attr("cursor",ma[A=wa[A]])),M.selection&&(C=M.selection),b&&(h=C[0][0],y=C[1][0]),w&&(p=C[0][1],_=C[1][1]),(C[0][0]!==h||C[0][1]!==p||C[1][0]!==y||C[1][1]!==_)&&(M.selection=[[h,p],[y,_]],n.call(T),$.brush(t,S.name))}function o(t){if(aa(t),t.touches){if(t.touches.length)return;c&&clearTimeout(c),c=setTimeout((function(){c=null}),500)}else Qn(t.view,m),U.on("keydown.brush keyup.brush mousemove.brush mouseup.brush",null);j.attr("pointer-events","all"),B.attr("cursor",ma.overlay),M.selection&&(C=M.selection),Ca(C)&&(M.selection=null,n.call(T)),$.end(t,S.name)}function s(t){switch(t.keyCode){case 16:F=E&&k;break;case 18:S===fa&&(E&&(v=y-P*E,l=h+P*E),k&&(x=_-z*k,g=p+z*k),S=ha,a());break;case 32:(S===fa||S===ha)&&(E<0?v=y-P:E>0&&(l=h-P),k<0?x=_-z:k>0&&(g=p-z),S=la,B.attr("cursor",ma.selection),a());break;default:return}oa(t)}function u(t){switch(t.keyCode){case 16:F&&(b=w=F=!1,a());break;case 18:S===ha&&(E<0?v=y:E>0&&(l=h),k<0?x=_:k>0&&(g=p),S=fa,a());break;case 32:S===la&&(t.altKey?(E&&(v=y-P*E,l=h+P*E),k&&(x=_-z*k,g=p+z*k),S=ha):(E<0?v=y:E>0&&(l=h),k<0?x=_:k>0&&(g=p),S=fa),B.attr("cursor",ma[A]),a());break;default:return}oa(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)?ca:d&&e.altKey?ha:fa,E=t===_a?null:Ta[A],k=t===xa?null:Aa[A],M=Oa(T),O=M.extent,C=M.selection,R=O[0][0],L=O[0][1],I=O[1][0],D=O[1][1],P=0,z=0,F=E&&k&&d&&e.shiftKey,N=Array.from(e.touches||[e],(function(t){var e=t.identifier;return(t=$n(t,T)).point0=t.slice(),t.identifier=e,t}));if("overlay"===A){C&&(m=!0);var X=[N[0],N[1]||N[0]];M.selection=C=[[l=t===_a?R:pa(X[0][0],X[1][0]),g=t===xa?L:pa(X[0][1],X[1][1])],[v=t===_a?I:ga(X[0][0],X[1][0]),x=t===xa?D:ga(X[0][1],X[1][1])]],N.length>1&&a()}else l=C[0][0],g=C[0][1],v=C[1][0],x=C[1][1];h=l,p=g,y=v,_=x;var j=Cn(T).attr("pointer-events","none"),B=j.selectAll(".overlay").attr("cursor",ma[A]);pi(T);var $=r(T,arguments,!0).beforestart();if(e.touches)$.moved=i,$.ended=o;else{var U=Cn(e.view).on("mousemove.brush",i,!0).on("mouseup.brush",o,!0);d&&U.on("keydown.brush",s,!0).on("keyup.brush",u,!0),Jn(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=ya(l.apply(this,arguments)),e.dim=t,e}var c,l=ka,f=Ea,h=Ma,d=!0,g=qn("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=Yr(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();pi(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=Cn(this.that).datum();g.call(n,this.that,new ia(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:ra(ya(t)),e):l},e.filter=function(t){return arguments.length?(f="function"==typeof t?t:ra(!!t),e):f},e.touchable=function(t){return arguments.length?(h="function"==typeof t?t:ra(!!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 Ia="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")(),Da=Ia&&Ia.document;function Pa(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 za(t){for(var e,n=1;n<arguments.length;n++)e=null==arguments[n]?{}:arguments[n],n%2?Pa(Object(e),!0).forEach((function(n){Dn(t,n,e[n])})):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(e)):Pa(Object(e)).forEach((function(n){Object.defineProperty(t,n,Object.getOwnPropertyDescriptor(e,n))}));return t}var Fa=function(t){return t||0===t},Na=function(t){return"function"==typeof t},Xa=function(t){return"string"==typeof t},ja=function(t){return"number"==typeof t},Ba=function(t){return void 0===t},$a=function(t){return void 0!==t},Ua=function(t){return"boolean"==typeof t},Ya=function(t){return 10*Math.ceil(t/10)},Va=function(t){return Math.ceil(t)+.5},Ga=function(t){return t[1]-t[0]},Ha=function(t){return"object"==typeof t},Wa=function(t){return Ba(t)||null===t||Xa(t)&&0===t.length||Ha(t)&&!(t instanceof Date)&&0===Object.keys(t).length||ja(t)&&isNaN(t)},qa=function(t){return!Wa(t)},Za=function(t){return Array.isArray(t)},Ka=function(t){return t&&!t.nodeType&&Ha(t)&&!Za(t)};function Ja(t,e,n){return $a(t[e])?t[e]:n}function Qa(t){for(var e=Na(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 to(t,e){var n=0;t.each((function(){return++n})).on("end",(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))}))}function eo(t){return Xa(t)?t.replace(/</g,"<").replace(/>/g,">"):t}function no(t,e,n,r){if(void 0===n&&(n=[-1,1]),void 0===r&&(r=!1),t&&Xa(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 ro(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 io(t,e){var n=t&&(t.touches||t.sourceEvent&&t.sourceEvent.touches);return t?$n(n?n[0]:t,e):[0,0]}function ao(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("."+Rn.brush).node())&&(e=Ra(e)),e}function oo(t){return!("rect"in t)||"rect"in t&&t.hasAttribute("width")&&t.rect.width!==+t.getAttribute("width")?t.rect=t.getBoundingClientRect():t.rect}function so(t){void 0===t&&(t=!0);var e=Math.random();return t?e+"":e}function uo(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?uo(t,e,n,a-1,i):uo(t,e,a+1,r,i)}function co(t){var e=ao(t);return!e||e[0]===e[1]}function lo(t,e){for(var n in void 0===t&&(t={}),Za(e)&&e.forEach((function(e){return lo(t,e)})),e)/^\d+$/.test(n)||n in t||(t[n]=e[n]);return t}var fo=function(t){return t.charAt(0).toUpperCase()+t.slice(1)},ho=function(t){return[].slice.call(t)};var go=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 po(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 vo(t){return t&&t.length?t.reduce((function(t,e){return t.concat(e)})):[]}function yo(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 Ka(t)&&Ka(i)&&Object.keys(i).forEach((function(e){var n=i[e];Ka(n)?(!t[e]&&(t[e]={}),t[e]=yo(t[e],n)):t[e]=Za(n)?n.concat():n})),yo.apply(void 0,[t].concat(n))}function xo(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 _o(t,e){var n=e.filter((function(t){return qa(t)}));return n.length?ja(n[0])?n=Math[t].apply(Math,n):n[0]instanceof Date&&(n=xo(n,"min"===t)[0]):n=void 0,n}var mo=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},bo={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=Da.createEvent("MouseEvent");r.initMouseEvent(e,n.bubbles,n.cancelable,Ia,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(yo({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 wo(t,e){var n=t;for(var r in e)n=n.replace(new RegExp("{="+r+"}","g"),e[r]);return n}function To(t){var e;if(t instanceof Date)e=t;else if(Xa(t)){var n=this.config;e=this.format.dataTime(n.data_xFormat)(t)}else ja(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 Ao(){return!Da.hidden}function So(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 Eo(t){for(var e,n=1;n<arguments.length;n++)e=null==arguments[n]?{}:arguments[n],n%2?So(Object(e),!0).forEach((function(n){Dn(t,n,e[n])})):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(e)):So(Object(e)).forEach((function(n){Object.defineProperty(t,n,Object.getOwnPropertyDescriptor(e,n))}));return t}var ko=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(Ka(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 za(za({},t),e)}))}(Pn,zn,Fn,Nn,Xn,jn,Bn,t.data)}return t.setOptions=function(t){this.data=t.reduce((function(t,e){return Eo(Eo({},t),e)}),this.data)},t}();ko.data={};var Mo="$baseLength",Oo="__colorPattern__",Co="$dataMinMax",Ro="$dataTotalSum",Lo="$totalPerIndex",Io="legendItemTextBox",Do="$radarPoints",Po="setOverOut",zo="callOverOutForTouch",Fo="textRect",No=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;ho(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 Fa(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}(),Xo=Ia.setTimeout,jo=Ia.clearTimeout;function Bo(){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&&jo(r),a===t.length?n&&n():r=Xo(e,50)}()};return e.add=function(e){Za(e)?t=t.concat(e):t.push(e)},e}var $o={},Uo={};function Yo(t){return new Function("d","return {"+t.map((function(t,e){return JSON.stringify(t)+": d["+e+'] || ""'})).join(",")+"}")}function Vo(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 Go(t,e){var n=t+"",r=n.length;return r<e?Array(e-r+1).join(0)+n:n}function Ho(t){var e=t.getUTCHours(),n=t.getUTCMinutes(),r=t.getUTCSeconds(),i=t.getUTCMilliseconds();return isNaN(t)?"Invalid Date":function(t){return t<0?"-"+Go(-t,6):t>9999?"+"+Go(t,6):Go(t,4)}(t.getUTCFullYear())+"-"+Go(t.getUTCMonth()+1,2)+"-"+Go(t.getUTCDate(),2)+(i?"T"+Go(e,2)+":"+Go(n,2)+":"+Go(r,2)+"."+Go(i,3)+"Z":r?"T"+Go(e,2)+":"+Go(n,2)+":"+Go(r,2)+"Z":n||e?"T"+Go(e,2)+":"+Go(n,2)+"Z":"")}function Wo(t){function e(t,e){function n(){if(c)return Uo;if(l)return l=!1,$o;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())!==Uo;){for(var f=[];r!==$o&&r!==Uo;)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?Ho(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=Yo(t);return function(r,i){return e(n(r),i,t)}}(t,n):Yo(t)))}));return a.columns=i||[],a},parseRows:e,format:function(e,r){return null==r&&(r=Vo(e)),[r.map(i).join(t)].concat(n(e,r)).join("\n")},formatBody:function(t,e){return null==e&&(e=Vo(t)),n(t,e).join("\n")},formatRows:function(t){return t.map(r).join("\n")},formatRow:r,formatValue:i}}var qo=Wo(","),Zo=qo.parse,Ko=qo.parseRows,Jo=(qo.format,qo.formatBody,qo.formatRows,qo.formatRow,qo.formatValue,Wo("\t")),Qo=Jo.parse,ts=Jo.parseRows,es=(Jo.format,Jo.formatBody,Jo.formatRows,Jo.formatRow,Jo.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 Za(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"+fo(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:Ko,parse:Zo},t)},convertTsvToData:function(t){return this.convertCsvTsvToData({rows:ts,parse:Qo},t)},convertJsonToData:function(t,e){var n,r,i=this,a=this.config,o=[];if(Za(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 Ba(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(Ba(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(Ba(e[i-1])&&(e[i-1]={}),Ba(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(Fa).map((function(t,e){return r.generateTargetX(t,i,e)}))):a.data_x?l=n.getOtherTargetXs():qa(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}));return{id:i,id_org:e,values:t.map((function(t,s){var c,h=t[u],d=t[e];return d=null===d||isNaN(d)||Ka(d)?Za(d)||Ka(d)?d:null:+d,!l&&!o.hasRadar||0!==n||Ba(h)?c=r.generateTargetX(h,e,s):(!f&&0===n&&0===s&&(a.axis_x_categories=[]),-1===(c=a.axis_x_categories.indexOf(h))&&(c=a.axis_x_categories.length,a.axis_x_categories.push(h))),(Ba(d)||r.data.xs[e].length<=s)&&(c=void 0),{x:c,value:d,id:i}})).filter((function(t){return $a(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}}),ns={isX:function(t){var e=this.config,n=e.data_x&&t===e.data_x,r=qa(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:qa(e.data_xs)?e.data_xs[t]:null},getXValuesOfXKey:function(t,e){var n,r=this;return(e&&qa(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(Xa(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]&&Fa(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 qa(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 Fa(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=To.bind(r);a=o(t||r.getXValue(e,n))}else i&&i.isCustomX()&&!i.isCategorized()&&(a=Fa(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 $a(e)?e:null},getNextX:function(t){var e=this.axis.xs[t+1];return $a(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(ja);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=Co,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=Lo,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]+=ja(t.value)?t.value:0}))}))),n},getTotalDataSum:function(t){var e=this,n=Ro,r=e.cache.get(n);if(!ja(r)){var i=vo(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=xo(po(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?Za(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=po(vo(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}))),xo(n)},addHiddenTargetIds:function(t){this.state.hiddenTargetIds=this.state.hiddenTargetIds.concat(t)},removeHiddenTargetIds:function(t){this.state.hiddenTargetIds=this.state.hiddenTargetIds.filter((function(e){return t.indexOf(e)<0}))},addHiddenLegendIds:function(t){this.state.hiddenLegendIds=this.state.hiddenLegendIds.concat(t)},removeHiddenLegendIds:function(t){this.state.hiddenLegendIds=this.state.hiddenLegendIds.filter((function(e){return t.indexOf(e)<0}))},getValuesAsIdKeyed:function(t){var e=this,n=e.state.hasAxis,r={},i=e.isMultipleX(),a=i?e.mapTargetsToUniqueXs(t).map((function(t){return Xa(t)?t:+t})):null;return t.forEach((function(t){var o=[];t.values.filter((function(t){return Fa(t.value)})).forEach((function(t){var r=t.value;e.isCandlestickType(t)&&(r=Za(r)?r.slice(0,4):[r.open,r.high,r.low,r.close]),Za(r)?o.push.apply(o,r):Ka(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}))},_checkOrder:function(t){var e=this.config.data_order;return Xa(e)&&e.toLowerCase()===t},isOrderDesc:function(){return this._checkOrder("desc")},isOrderAsc:function(){return this._checkOrder("asc")},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,r=n.config,i=n.isOrderAsc(),a=n.isOrderDesc();return i||a?e=function(e,n){var r=function(t,e){return t+Math.abs(e.value)},a=e.values.reduce(r,0),o=n.values.reduce(r,0);return t?i?a-o:o-a:i?o-a:a-o}:Na(r.data_order)&&(e=r.data_order.bind(n.api)),e||null},filterByX:function(t,e){return vo(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 Fa(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 Ua(t)&&t||Ha(t)&&qa(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 uo(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&&Fa(t.value)})),s=i.point_sensitivity;return o.filter((function(t){return r.isBarType(t.id)})).forEach((function(t){var e=a.select("."+Rn.bars+r.getTargetSelectorSuffix(t.id)+" ."+Rn.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=Za(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=Za(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 Ba(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(Za(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(ja(t)?t:0)+e[n]}))})),f=f.map((function(t,e){return t-h[e]})))}e.ratio=ja(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)&&(Ka(t.value)&&("z"in t.value||"y"in t.value)||Za(t.value)&&2===t.value.length)},getDataById:function(t){var e=this.cache.get(t)||this.api.data(t);return Za(e)?e[0]:e}},rs={load:function(t,e){var n=this,r=t;r&&(e.filter&&(r=r.filter(e.filter)),(e.type||e.types)&&r.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<r.length;e++)if(t.id===r[e].id){t.values=r[e].values,r.splice(e,1);break}})),n.data.targets=n.data.targets.concat(r)),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)}));n&&e.load(e.convertDataToTargets(n),t)}},unload:function(t,e){var n=this,r=n.state,i=n.$el,a=e,o=t;return n.cache.reset(),a||(a=function(){}),(o=o.filter((function(t){return n.hasTarget(n.data.targets,t)})))&&0!==o.length?(i.svg.selectAll(o.map((function(t){return n.selectorTarget(t)}))).transition().style("opacity","0").remove().call(to,a),o.forEach((function(t){r.withoutFadeIn[t]=!1,i.legend&&i.legend.selectAll("."+Rn.legendItem+n.getTargetSelectorSuffix(t)).remove(),n.data.targets=n.data.targets.filter((function(e){return e.id!==t}))})),void n.updateTypesElements()):void a()}},is=function(t){return function(){return t}};function as(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 os(t){return!t.ctrlKey&&!t.button}function ss(){return this.parentNode}function us(t,e){return null==e?{x:t.x,y:t.y}:e}function cs(){return navigator.maxTouchPoints||"ontouchstart"in this}function ls(){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&&(Cn(t.view).on("mousemove.drag",n,!0).on("mouseup.drag",r,!0),Jn(t.view),Zn(t),l=!1,u=t.clientX,c=t.clientY,i("start",t))}}function n(t){if(Kn(t),!l){var e=t.clientX-u,n=t.clientY-c;l=e*e+n*n>_}v.mouse("drag",t)}function r(t){Cn(t.view).on("mousemove.drag mouseup.drag",null),Qn(t.view,l),Kn(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]))&&(Zn(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])&&(Kn(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])&&(Zn(t),n("end",t,r[e]))}function s(e,n,r,i,a,o){var s,u,c,l=y.copy(),f=$n(o||r,n);if(null!=(c=g.call(e,new as("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=$n(d||h,n),g=x}l.call(o,e,new as(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=os,d=ss,g=us,p=cs,v={},y=qn("start","drag","end"),x=0,_=0;return t.filter=function(e){return arguments.length?(h="function"==typeof e?e:is(!!e),t):h},t.container=function(e){return arguments.length?(d="function"==typeof e?e:is(e),t):d},t.subject=function(e){return arguments.length?(g="function"==typeof e?e:is(e),t):g},t.touchable=function(e){return arguments.length?(p="function"==typeof e?e:is(!!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}as.prototype.on=function(){var t=this._.on.apply(this._,arguments);return t===this._?this:t};var fs={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("."+Rn.shape+"-"+n).each((function(){Cn(this).classed(Rn.EXPANDED,!0),o&&e.style("cursor",s?"pointer":null),c||(r.hideGridFocus&&r.hideGridFocus(),r.hideTooltip(),!s&&r.expandCirclesBars(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.expandCirclesBars(n,t.id)})))}))},expandCirclesBars:function(t,e,n){var r=this,i=r.config,a=r.$el,o=a.bar;a.circle&&i.point_focus_expand_enabled&&r.expandCircles(t,e,n),o&&r.expandBars(t,e,n)},setOverOut:function(t,e){var n=this,r=n.config,i=n.state.hasRadar,a=n.$el.main,o=Ka(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("."+Rn.arc+n.getTargetSelectorSuffix(e.id)).node());else if(r.tooltip_grouped)t&&(r.point_focus_only&&i?n.showCircleFocus(n.getAllValuesOnIndex(e,!0)):n.expandCirclesBars(e,null,!0)),n.isMultipleX()||a.selectAll("."+Rn.shape+"-"+e).each((function(t){s(t,this)}));else{var u=n.cache.get(Po)||[],c=a.selectAll("."+Rn.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(Cn(t).datum(),t)})),u=[]),n.cache.add(Po,u)}}},callOverOutForTouch:function(t){var e=this,n=e.cache.get(zo);(Ka(t)&&n?t.id!==n.id:t!==n)&&((n||ja(n))&&e.setOverOut(!1,n),(t||ja(t))&&e.setOverOut(!0,t),e.cache.add(zo,t))},getDraggableSelection:function(){var t=this,e=t.config,n=t.state;return e.interaction_enabled&&e.data_selection_draggable&&t.drag?ls().on("drag",(function(e){n.event=e,t.drag(io(e,this))})).on("start",(function(e){n.event=e,t.dragstart(io(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("."+Rn.axis+"-"+e+" text"):l||f.selectAll("."+Rn.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);bo[/^(mouse|click)/.test(t)?"mouse":"touch"](g,t,{screenX:m,screenY:b,clientX:m,clientY:b})},setDragStatus:function(t){this.state.dragging=t}},hs={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(Rn[r?"shapes":"shape"],s[a]):"")+n.generateClass(Rn[t],s[i?"id":a])).trim()}},getChartClass:function(t){var e=this;return function(n){return Rn["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(Rn.region,e)+" "+("class"in t?t.class:"")},classTarget:function(t){var e=this.config.data_classes[t],n="";return e&&(n=" "+Rn.target+"-"+e),this.generateClass(Rn.target,t)+n},classFocus:function(t){return this.classFocused(t)+this.classDefocused(t)},classFocused:function(t){return" "+(this.state.focusedTargetIds.indexOf(t.id)>=0?Rn.focused:"")},classDefocused:function(t){return" "+(this.state.defocusedTargetIds.indexOf(t.id)>=0?Rn.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+"."+(Rn.target+r)+", "+n+"."+(Rn.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"."+(Rn.legendItem+this.getTargetSelectorSuffix(t))},selectorLegends:function(t){var e=this;return t&&t.length?t.map((function(t){return e.selectorLegend(t)})):null}};function ds(t,e){switch(arguments.length){case 0:break;case 1:this.range(t);break;default:this.range(e).domain(t)}return this}function gs(t,e){var n;if("undefined"==typeof Symbol||null==t[Symbol.iterator]){if(Array.isArray(t)||(n=function(t,e){if(t){if("string"==typeof t)return ps(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)?ps(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.")}return(n=t[Symbol.iterator]()).next.bind(n)}function ps(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 vs=Symbol("implicit");function ys(){function t(t){var a=t+"",o=e.get(a);if(!o){if(i!==vs)return i;e.set(a,o=n.push(t))}return r[(o-1)%r.length]}var e=new Map,n=[],r=[],i=vs;return t.domain=function(r){if(!arguments.length)return n.slice();n=[],e=new Map;for(var i,a=gs(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 ys(n,r).unknown(i)},ds.apply(t,arguments),t}var xs=["#1f77b4","#ff7f0e","#2ca02c","#d62728","#9467bd","#8c564b","#e377c2","#7f7f7f","#bcbd22","#17becf"],_s={getColorFromCss:function(){var t=Oo,e=Da.body,n=e[t];if(!n){var r=Da.createElement("span");r.className=Rn.colorPattern,r.style.display="none",e.appendChild(r);var i=Ia.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=qa(e.color_pattern)?e.color_pattern:ys(t.getColorFromCss()||xs).range(),o=a;if(Na(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=Cn(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 Na(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),Na(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 qa(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},setOverColor:function(t,e){var n=this,r=n.config,i=n.$el.main,a=r.color_onover,o=t?a:n.color;Ka(o)?o=function(t){var e=t.id;return e in a?a[e]:n.color(e)}:Xa(o)?o=function(){return a}:Na(a)&&(o=o.bind(n.api)),i.selectAll(Ka(e)?"."+Rn.arc+n.getTargetSelectorSuffix(e.id):"."+Rn.shape+"-"+e).style("fill",o)}},ms={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"},bs={Area:[ms.AREA,ms.AREA_SPLINE,ms.AREA_SPLINE_RANGE,ms.AREA_LINE_RANGE,ms.AREA_STEP],AreaRange:[ms.AREA_SPLINE_RANGE,ms.AREA_LINE_RANGE],Arc:[ms.PIE,ms.DONUT,ms.GAUGE,ms.RADAR],Line:[ms.LINE,ms.SPLINE,ms.AREA,ms.AREA_SPLINE,ms.AREA_SPLINE_RANGE,ms.AREA_LINE_RANGE,ms.STEP,ms.AREA_STEP],Step:[ms.STEP,ms.AREA_STEP],Spline:[ms.SPLINE,ms.AREA_SPLINE,ms.AREA_SPLINE_RANGE]},ws={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)}(),_o(e,Object.keys(u).map((function(t){return _o(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=[ms.BAR,ms.BUBBLE,ms.SCATTER].concat(bs.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=Fa(f)?f:Fa(h)?d<h?d:h-10:d,g=Fa(h)?h:Fa(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;(Fa(f)&&m||Fa(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($a(p)){var A=Math.max(Math.abs(d),Math.abs(g));g=p+A,d=p-A}if(x){var S=Ga(o.y.range()),E=r.getDataLabelLength(d,g,"width").map((function(t){return t/S}));["bottom","top"].forEach((function(t,e){T[t]+=w*(E[e]/(1-E[0]-E[1]))}))}else if(_){var k=r.getDataLabelLength(d,g,"height");["bottom","top"].forEach((function(t,e){T[t]+=i.convertPixelsToAxisPadding(k[e],w)}))}var M=a[s+"_padding"];qa(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 O=u?[d,g].map((function(t){return t<0?0:t})):[d-T.bottom,g+T.top];return y?O.reverse():O},getXDomainMinMax:function(t,e){var n=this.config["axis_x_"+e],r=_o(e,t.map((function(t){return _o(e,t.values.map((function(t){return t.x})))}))),i=Ka(n)?n.value:n;return i=$a(i)&&this.axis.isTimeSeries()?To.bind(this)(i):i,Ka(n)&&n.fit&&("min"===e&&i<r||"max"===e&&i>r)&&(i=void 0),$a(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 Ka(s)&&qa(s)?(u=Fa(s.left)?s.left:n,c=Fa(s.right)?s.right:n):ja(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||xo(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||co(a)?s.xDomain:ao(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 $a(t.zoom_x_min)&&(n=_o("min",[n,t.zoom_x_min])),$a(t.zoom_x_max)&&(r=_o("max",[r,t.zoom_x_max])),[n,r]}};function Ts(t,e,n){var r=t.config,i="axis_"+e+"_tick_format";return(r[i]?r[i]:t.defaultValueFormat)(n)}var As={getYFormat:function(t){var e=this,n=e.yFormat,r=e.y2Format;return t&&!e.hasType("gauge")&&(n=e.defaultArcValueFormat,r=e.defaultArcValueFormat),function(t,i,a){return(e.axis&&"y2"===e.axis.getId(a)?r:n).call(e,t,i)}},yFormat:function(t){return Ts(this,"y",t)},y2Format:function(t){return Ts(this,"y2",t)},defaultValueFormat:function(t){return Fa(t)?+t:""},defaultArcValueFormat:function(t,e){return(100*e).toFixed(1)+"%"},dataLabelFormat:function(t){var e=this.config.data_labels,n=function(t){return Fa(t)?+t:""},r=n;return Na(e.format)?r=e.format:Ha(e.format)&&(r=e.format[t]?!0===e.format[t]?n:e.format[t]:function(){return""}),r.bind(this.api)}},Ss={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(Rn.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=Ja(u,"withTransition",!0),u.withTransitionForTransform=Ja(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("."+Rn.legendItem).classed(Rn.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=Cn(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=Na(i)?i.bind(t.api)(e,t.color(e),t.api.data(e)[0].values):wo(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("."+Rn.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},opacityForLegend:function(t){return t.classed(Rn.legendItemHidden)?null:"1"},opacityForUnfocusedLegend:function(t){return t.classed(Rn.legendItemHidden)?null:"0.3"},toggleFocusLegend:function(t,e){var n=this,r=n.$el.legend,i=n.mapToTargetIds(t);r&&r.selectAll("."+Rn.legendItem).filter((function(t){return i.indexOf(t)>=0})).classed(Rn.legendItemFocused,e).transition().duration(100).style("opacity",(function(){return(e?n.opacityForLegend:n.opacityForUnfocusedLegend).call(n,Cn(this))}))},revertLegend:function(){var t=this,e=t.$el.legend;e&&e.selectAll("."+Rn.legendItem).classed(Rn.legendItemFocused,!1).transition().duration(100).style("opacity",(function(){return t.opacityForLegend(Cn(this))}))},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","visible"):e.initLegend(),!e.state.legendHasRendered&&e.updateLegend()),e.removeHiddenLegendIds(t),r.legend.selectAll(e.selectorLegends(t)).style("visibility","visible").transition().style("opacity",(function(){return e.opacityForLegend(Cn(this))}))},hideLegend:function(t){var e=this,n=e.config,r=e.$el.legend;n.legend_show&&Wa(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=Io;return t&&(!(n=!a.redrawing&&i.get(o)||{})[t]&&(n[t]=r.getTextRect(e,Rn.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=Cn(this);return(!n.empty()&&n.attr("class")||"")+e.generateClass(Rn.legendItem,t)})).style("visibility",(function(t){return e.isLegendToShow(t)?"visible":"hidden"})),r.interaction_enabled&&(t.style("cursor","pointer").on("click",(function(t,i){Qa(r.legend_item_onclick,n,i)||(t.altKey?(n.hide(),n.show(i)):(n.toggle(i),Cn(this).classed(Rn.legendItemFocused,!1).style("opacity",null))),a&&e.hideTooltip()})),!a&&t.on("mouseout",(function(t,i){Qa(r.legend_item_onout,n,i)||(Cn(this).classed(Rn.legendItemFocused,!1),o&&e.undoMarkOverlapped(e,"."+Rn.gaugeValue),e.api.revert())})).on("mouseover",(function(t,a){Qa(r.legend_item_onover,n,a)||(Cn(this).classed(Rn.legendItemFocused,!0),o&&e.markOverlapped(a,e,"."+Rn.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!$a(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 E=_?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-E*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},E=function(t,e){return n(t,e)-2+o.legend_item_tile_width},k=function(t,e){return r(t,e)+9},M=function(t,e){return r(t,e)-5},O=function(t,e){return r(t,e)+4},C=-200,R=u.selectAll("."+Rn.legendItem).data(m).enter().append("g");a.setLegendItem(R),R.append("text").text((function(t){return $a(o.data_names[t])?o.data_names[t]:t})).each((function(t,e){w(this,t,e)})).style("pointer-events","none").attr("x",_?T:C).attr("y",_?C:k),R.append("rect").attr("class",Rn.legendItemEvent).style("fill-opacity","0").attr("x",_?A:C).attr("y",_?C: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=qa(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"),Da.createElementNS(Oe.svg,"hasValidPointType"in a&&a.hasValidPointType(n)?n:"use")})).attr("class",Rn.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",Rn.legendItemTile).style("stroke",L).style("pointer-events","none").attr("x1",_?S:C).attr("y1",_?C:O).attr("x2",_?E:C).attr("y2",_?C:O).attr("stroke-width",o.legend_item_tile_height);i=u.select("."+Rn.legendBackground+" rect"),s.isLegendInset&&l>0&&0===i.size()&&(i=u.insert("g","."+Rn.legendItem).attr("class",Rn.legendBackground).append("rect"));var P=u.selectAll("text").data(m).text((function(t){return $a(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",k);var z=u.selectAll("rect."+Rn.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("."+Rn.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}Cn(this).attr(a,(function(t){return S(t)+u})).attr(s,(function(t){return O(t)-c})).attr("r",t).attr("width",e).attr("height",n)}))}else{var N=u.selectAll("line."+Rn.legendItemTile).data(m);(b?N.transition():N).style("stroke",L).attr("x1",S).attr("y1",O).attr("x2",E).attr("y2",O)}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)}},Es={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."+Rn.text+"."+Rn.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=fo(t);(/^(line|area)$/.test(t)&&e.hasTypeOf(n)||e.hasType(t))&&e["update"+n](f)})),i.text&&a.selectAll("."+Rn.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)&&Ao(),l=i.getRedrawList(s,e,u,c),f=e||a.onrendered?function(){u&&u(),o.redrawing=!1,Qa(a.onrendered,i.api)}:null;if(f)if(c&&l.length){var h=Bo();Ji().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=fo(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)&&qa(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=Ja(t,"withTransition",!0),t.withTransform=Ja(t,"withTransform",!1),t.withLegend=Ja(t,"withLegend",!1),t.withUpdateXDomain=!0,t.withUpdateOrgXDomain=!0,t.withTransitionForExit=!1,t.withTransitionForTransform=Ja(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})}},ks=Math.sqrt(50),Ms=Math.sqrt(10),Os=Math.sqrt(2);function Cs(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=Rs(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 Rs(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>=ks?10:a>=Ms?5:a>=Os?2:1)*Math.pow(10,i):-Math.pow(10,-i)/(a>=ks?10:a>=Ms?5:a>=Os?2:1)}function Ls(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>=ks?i*=10:a>=Ms?i*=5:a>=Os&&(i*=2),e<t?-i:i}function Is(t,e){return t<e?-1:t>e?1:t>=e?0:NaN}function Ds(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 Is(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 Ps=Ds(Is),zs=Ps.right,Fs=(Ps.left,Ds((function(t){return null===t?NaN:+t})).center,zs);function Ns(t,e){return t=+t,e=+e,function(n){return Math.round(t*(1-n)+e*n)}}function Xs(t){return+t}var js=[0,1];function Bs(t){return t}function $s(t,e){return(e-=t=+t)?function(n){return(n-t)/e}:function(t){return function(){return t}}(isNaN(e)?NaN:.5)}function Us(t,e,n){var r=t[0],i=t[1],a=e[0],o=e[1];return i<r?(r=$s(i,r),a=n(o,a)):(r=$s(r,i),a=n(a,o)),function(t){return a(r(t))}}function Ys(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]=$s(t[o],t[o+1]),a[o]=n(e[o],e[o+1]);return function(e){var n=Fs(t,e,1,r)-1;return a[n](i[n](e))}}function Vs(t,e){return e.domain(t.domain()).range(t.range()).interpolate(t.interpolate()).clamp(t.clamp()).unknown(t.unknown())}function Gs(){function t(){var t,n,r,i=Math.min(u.length,c.length);return f!==Bs&&(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?Ys:Us,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=js,c=js,l=Yr,f=Bs;return e.invert=function(t){return f(r((s||(s=a(c,u.map(n),Xr)))(t)))},e.domain=function(e){return arguments.length?(u=Array.from(e,Xs),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=Ns,t()},e.clamp=function(e){return arguments.length?(f=!!e||Bs,t()):f!==Bs},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 Hs(){return Gs()(Bs,Bs)}var Ws,qs=/^(?:(.)?([<>=^]))?([+\-( ])?([$#])?(0)?(\d+)?(,)?(\.\d+)?(~)?([a-z%])?$/i;function Zs(t){if(!(e=qs.exec(t)))throw new Error("invalid format: "+t);var e;return new Ks({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 Ks(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 Js(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 Qs(t){return(t=Js(Math.abs(t)))?t[1]:NaN}function tu(t,e){var n=Js(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")}Zs.prototype=Ks.prototype,Ks.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 eu={"%":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 tu(100*t,e)},r:tu,s:function(t,e){var n=Js(t,e);if(!n)return t+"";var r=n[0],i=n[1],a=i-(Ws=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")+Js(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 nu(t){return t}var ru,iu,au,ou=Array.prototype.map,su=["y","z","a","f","p","n","µ","m","","k","M","G","T","P","E","Z","Y"];function uu(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"===_?su[8+Ws/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,E=S<p?Array(p-S+1).join(n):"";switch(v&&g&&(t=i(E+t,E.length?p-d.length:1/0),E=""),r){case"<":t=c+t+d+E;break;case"=":t=c+E+t+d;break;case"^":t=E.slice(0,S=E.length>>1)+c+t+d+E.slice(S);break;default:t=E+c+t+d}return u(t)}var n=(t=Zs(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"):!eu[_]&&(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=eu[_],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?nu:(n=ou.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?nu:function(t){return function(e){return e.replace(/[0-9]/g,(function(e){return t[+e]}))}}(ou.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=Zs(t)).type="f",t)),i=3*Math.max(-8,Math.min(8,Math.floor(Qs(n)/3))),a=Math.pow(10,-i),o=su[8+i/3];return function(t){return r(a*t)+o}}}}function cu(t,e,n,r){var i,a=Ls(t,e,n);switch((r=Zs(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(Qs(e)/3)))-Qs(Math.abs(t)))}(a,o))||(r.precision=i),au(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,Qs(e)-Qs(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,-Qs(Math.abs(t)))}(a))||(r.precision=i-2*("%"===r.type))}return iu(r)}function lu(t){var e=t.domain;return t.ticks=function(t){var n=e();return Cs(n[0],n[n.length-1],null==t?10:t)},t.tickFormat=function(t,n){var r=e();return cu(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=Rs(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 fu(){var t=Hs();return t.copy=function(){return Vs(t,fu())},ds.apply(t,arguments),lu(t)}function hu(t){return function(e){return Math.sign(e)*Math.log1p(Math.abs(e/t))}}function du(t){return function(e){return Math.sign(e)*Math.expm1(Math.abs(e))*t}}function gu(t){var e=1,n=t(hu(e),du(e));return n.constant=function(n){return arguments.length?t(hu(e=+n),du(e)):e},lu(n)}function pu(){var t=gu(Gs());return t.copy=function(){return Vs(t,pu()).constant(t.constant())},ds.apply(t,arguments)}function vu(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 yu(t){return Math.log(t)}function xu(t){return Math.exp(t)}function _u(t){return-Math.log(-t)}function mu(t){return-Math.exp(-t)}function bu(t){return isFinite(t)?+("1e"+t):t<0?0:t}function wu(t){return function(e){return-t(-e)}}function Tu(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?bu:t===Math.E?Math.exp:function(e){return Math.pow(t,e)}}(o),a()[0]<0?(n=wu(n),r=wu(r),t(_u,mu)):t(yu,xu),i}var n,r,i=t(yu,xu),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=Cs(s,u,g))}else p=Cs(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=iu(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(vu(a(),{floor:function(t){return r(Math.floor(n(t)))},ceil:function(t){return r(Math.ceil(n(t)))}}))},i}function Au(){var t=Tu(Gs()).domain([1,10]);return t.copy=function(){return Vs(t,Au()).base(t.base())},ds.apply(t,arguments),t}!function(t){ru=uu(t),iu=ru.format,au=ru.formatPrefix}({thousands:",",grouping:[3],currency:["$",""]});var Su=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()})),Eu=Su,ku=(Su.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()}))),Mu=ku,Ou=(ku.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()}))),Cu=Ou,Ru=(Ou.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()}))),Lu=Ru,Iu=(Ru.range,s((function(){}),(function(t,e){t.setTime(+t+e)}),(function(t,e){return e-t})));Iu.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})):Iu:null};var Du=Iu,Pu=(Iu.range,31536e6);function zu(t){return new Date(t)}function Fu(t){return t instanceof Date?+t:+new Date(+t)}function Nu(t,e,n,r,i,a,o,s,u){function c(s){return(o(s)<s?g:a(s)<s?p:i(s)<s?v:r(s)<s?y:e(s)<s?n(s)<s?x:_:t(s)<s?m:b)(s)}function l(e,n,r){if(null==e&&(e=10),"number"==typeof e){var i,a=Math.abs(r-n)/e,o=Ds((function(t){return t[2]})).right(w,a);return o===w.length?(i=Ls(n/Pu,r/Pu,e),e=t):o?(i=(o=w[a/w[o-1][2]<w[o][2]/a?o-1:o])[1],e=o[0]):(i=Math.max(Ls(n,r,e),1),e=s),e.every(i)}return e}var f=Hs(),h=f.invert,d=f.domain,g=u(".%L"),p=u(":%S"),v=u("%I:%M"),y=u("%I %p"),x=u("%a %d"),_=u("%b %d"),m=u("%B"),b=u("%Y"),w=[[o,1,1e3],[o,5,5e3],[o,15,15e3],[o,30,3e4],[a,1,6e4],[a,5,3e5],[a,15,9e5],[a,30,18e5],[i,1,36e5],[i,3,108e5],[i,6,216e5],[i,12,432e5],[r,1,864e5],[r,2,1728e5],[n,1,6048e5],[e,1,2592e6],[e,3,7776e6],[t,1,Pu]];return f.invert=function(t){return new Date(h(t))},f.domain=function(t){return arguments.length?d(Array.from(t,Fu)):d().map(zu)},f.ticks=function(t){var e,n=d(),r=n[0],i=n[n.length-1],a=i<r;return a&&(e=r,r=i,i=e),e=(e=l(t,r,i))?e.range(r,i+1):[],a?e.reverse():e},f.tickFormat=function(t,e){return null==e?c:u(e)},f.nice=function(t){var e=d();return(t=l(t,e[0],e[e.length-1]))?d(vu(e,t)):f},f.copy=function(){return Vs(f,Nu(t,e,n,r,i,a,o,s,u))},f}function Xu(){return ds.apply(Nu(D,Eu,A,L,Mu,Cu,Lu,Du,B).domain([new Date(2e3,0,1),new Date(2e3,0,2)]),arguments)}function ju(t,e,n){void 0===t&&(t="linear"),void 0===e&&(e=0),void 0===n&&(n=1);var r={linear:fu,log:pu,_log:Au,time:Xu}[t]();return r.type=t,/_?log/.test(t)&&r.clamp(!0),r.range([e,n])}var Bu={getXScale:function(t,e,n,r){var i=this,a=i.scale.zoom||ju(i.axis.getAxisType("x"),t,e);return i.getCustomizedScale(n?a.domain(n):a,r)},getYScale:function(t,e,n,r){var i=ju(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(Fa(t.x)?t.x:t):null},xv:function(t){var e=this,n=e.axis,r=e.config,i=e.scale.x,a=e.getBaseValue(t);return n.isTimeSeries()?a=To.call(e,a):n.isCategorized()&&Xa(a)&&(a=r.axis_x_categories.indexOf(a)),Math.ceil(i(a))},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 $u(t,e,n){t._context.bezierCurveTo((2*t._x0+t._x1)/3,(2*t._y0+t._y1)/3,(t._x0+2*t._x1)/3,(t._y0+2*t._y1)/3,(t._x0+4*t._x1+e)/6,(t._y0+4*t._y1+n)/6)}function Uu(t){this._context=t}function Yu(t){return new Uu(t)}function Vu(){}function Gu(t){this._context=t}function Hu(t){return new Gu(t)}function Wu(t){this._context=t}function qu(t){return new Wu(t)}function Zu(t,e){this._basis=new Uu(t),this._beta=e}Uu.prototype={areaStart:function(){this._line=0},areaEnd:function(){this._line=NaN},lineStart:function(){this._x0=this._x1=this._y0=this._y1=NaN,this._point=0},lineEnd:function(){switch(this._point){case 3:$u(this,this._x1,this._y1);case 2:this._context.lineTo(this._x1,this._y1)}(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:$u(this,t,e)}this._x0=this._x1,this._x1=t,this._y0=this._y1,this._y1=e}},Gu.prototype={areaStart:Vu,areaEnd:Vu,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:$u(this,t,e)}this._x0=this._x1,this._x1=t,this._y0=this._y1,this._y1=e}},Wu.prototype={areaStart:function(){this._line=0},areaEnd:function(){this._line=NaN},lineStart:function(){this._x0=this._x1=this._y0=this._y1=NaN,this._point=0},lineEnd:function(){(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:$u(this,t,e)}this._x0=this._x1,this._x1=t,this._y0=this._y1,this._y1=e}},Zu.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 Ku=function t(e){function n(t){return 1===e?new Uu(t):new Zu(t,e)}return n.beta=function(e){return t(+e)},n}(.85);function Ju(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 Qu(t,e){this._context=t,this._k=(1-e)/6}Qu.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:Ju(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:Ju(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 tc=function t(e){function n(t){return new Qu(t,e)}return n.tension=function(e){return t(+e)},n}(0);function ec(t,e){this._context=t,this._k=(1-e)/6}ec.prototype={areaStart:Vu,areaEnd:Vu,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:Ju(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 nc=function t(e){function n(t){return new ec(t,e)}return n.tension=function(e){return t(+e)},n}(0);function rc(t,e){this._context=t,this._k=(1-e)/6}rc.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:Ju(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 ic=function t(e){function n(t){return new rc(t,e)}return n.tension=function(e){return t(+e)},n}(0),ac=Math.abs,oc=Math.atan2,sc=Math.cos,uc=Math.max,cc=Math.min,lc=Math.sin,fc=Math.sqrt,hc=1e-12,dc=Math.PI,gc=dc/2,pc=2*dc;function vc(t){return t>1?0:t<-1?dc:Math.acos(t)}function yc(t){return t>=1?gc:t<=-1?-gc:Math.asin(t)}function xc(t,e,n){var r=t._x1,i=t._y1,a=t._x2,o=t._y2;if(t._l01_a>hc){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>hc){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 _c(t,e){this._context=t,this._alpha=e}_c.prototype={areaStart:function(){this._line=0},areaEnd:function(){this._line=NaN},lineStart:function(){this._x0=this._x1=this._x2=this._y0=this._y1=this._y2=NaN,this._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:xc(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 mc=function t(e){function n(t){return e?new _c(t,e):new Qu(t,0)}return n.alpha=function(e){return t(+e)},n}(.5);function bc(t,e){this._context=t,this._alpha=e}bc.prototype={areaStart:Vu,areaEnd:Vu,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:xc(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 wc=function t(e){function n(t){return e?new bc(t,e):new ec(t,0)}return n.alpha=function(e){return t(+e)},n}(.5);function Tc(t,e){this._context=t,this._alpha=e}Tc.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:xc(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 Ac=function t(e){function n(t){return e?new Tc(t,e):new rc(t,0)}return n.alpha=function(e){return t(+e)},n}(.5);function Sc(t){return t<0?-1:1}function Ec(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(Sc(a)+Sc(o))*Math.min(Math.abs(a),Math.abs(o),.5*Math.abs((a*i+o*r)/(r+i)))||0}function kc(t,e){var n=t._x1-t._x0;return n?(3*(t._y1-t._y0)/n-e)/2:e}function Mc(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 Oc(t){this._context=t}function Cc(t){this._context=new Rc(t)}function Rc(t){this._context=t}function Lc(t){return new Oc(t)}function Ic(t){return new Cc(t)}function Dc(t){this._context=t}function Pc(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 zc(t){return new Dc(t)}function Fc(t){this._context=t}function Nc(t){return new Fc(t)}function Xc(t){this._context=t}function jc(t){return new Xc(t)}function Bc(t,e){this._context=t,this._t=e}function $c(t){return new Bc(t,.5)}function Uc(t){return new Bc(t,0)}function Yc(t){return new Bc(t,1)}Oc.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:Mc(this,this._t0,kc(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,Mc(this,kc(this,n=Ec(this,t,e)),n);break;default:Mc(this,this._t0,n=Ec(this,t,e))}this._x0=this._x1,this._x1=t,this._y0=this._y1,this._y1=e,this._t0=n}}},(Cc.prototype=Object.create(Oc.prototype)).point=function(t,e){Oc.prototype.point.call(this,e,t)},Rc.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)}},Dc.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=Pc(t),i=Pc(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)}},Fc.prototype={areaStart:Vu,areaEnd:Vu,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))}},Xc.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)}}},Bc.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 Vc={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=fo(/^(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=qa(r),a={},o=i?{}:0;return i&&po(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}Ba(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 qa(n)?t[n[e]]:t},getIndicesMax:function(t){return qa(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=Ha(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(qa(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-(ja(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 ja(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=r.getIndices(e,t.id),u=r.getYScaleById(t.id,n),c=u(r.getShapeYMin(t.id)),l=+t.x,f=c;return a.filter((function(e){return e.id!==t.id})).forEach((function(e){if(s[e.id]===s[t.id]&&o[e.id]<o[t.id]){var n=e.rowValues[i];n&&+n.x===l||(n=e.rowValueMapByXValue[l]),n&&n.value*t.value>=0&&(f+=u(e.values[l])-c)}})),f}},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=ja(e)?e:n?l*r/n:0;return a&&o>a?a:o},h=f();return!u&&Ha(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},isWithinShape:function(t,e){var n,r=this,i=Cn(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(Rn.bar)||r.isWithinBar(t)):n=!1,n},getInterpolate:function(t){var e=this.getInterpolateType(t);return{basis:Yu,"basis-closed":Hu,"basis-open":qu,bundle:Ku,cardinal:tc,"cardinal-closed":nc,"cardinal-open":ic,"catmull-rom":mc,"catmull-rom-closed":wc,"catmull-rom-open":Ac,"monotone-x":Lc,"monotone-y":Ic,natural:zc,"linear-closed":Nc,linear:jc,step:$c,"step-after":Yc,"step-before":Uc}[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"}},Gc={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=Fa(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(Fa(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(Fa(n.padding_left)?n.padding_left:r&&i?n.axis_x_show?Math.max(Ya(s),40):1:!r||n.axis_y_show&&!n.axis_y_inner?Ya(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(Fa(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(Ya(o)+i,s):Math.max(2+i+(e.axis.getAxisLabelPosition("y2").isOuter?20:0),s))+o*a},getParentRectValue:function(t){for(var e,n="offset"+fo(t),r=this.$el.chart.node();!e&&r&&"BODY"!==r.tagName;){try{e=r.getBoundingClientRect()[t]}catch(t){n in r&&(e=r[n])}r=r.parentNode}if("width"===t){var i=Da.body.offsetWidth;e>i&&(e=i)}return e},getParentWidth:function(){return this.getParentRectValue("width")},getParentHeight:function(){var t=this.$el.chart.style("height");return t.indexOf("px")>0?parseInt(t,10):0},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?Rn.axisX:Rn.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("."+Rn.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 Hc(t){return"string"==typeof t?new kn([document.querySelectorAll(t)],[document.documentElement]):new kn([null==t?[]:le(t)],En)}var Wc={opacityForText:function(t){var e=this;return e.isBarType(t)&&!e.meetsLabelThreshold(Math.abs(e.getRatio("bar",t)),"bar")?"0":e.hasDataLabel?"1":"0"},initText:function(){this.$el.main.select("."+Rn.chart).append("g").attr("class",Rn.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("."+Rn.chartTexts).selectAll("."+Rn.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.config,r=e.$el,i=e.getClass("text","index"),a=r.main.selectAll("."+Rn.texts).selectAll("."+Rn.text).data(e.labelishData.bind(e));a.exit().transition().duration(t).style("fill-opacity","0").remove(),r.text=a.enter().append("text").merge(a).attr("class",i).attr("text-anchor",(function(t){var r=t.value<0;if(e.isCandlestickType(t)){var i=e.getCandlestickData(t);r=i&&!i._isUp}return n.axis_rotated?r?"end":"start":"middle"})).style("fill",e.updateTextColor.bind(e)).style("fill-opacity","0").each((function(t,n,r){var i=Cn(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),ja(a)?this.textContent=a:no(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(Xa(i))e=i;else if(Ka(i)){e=i[(t.data||t).id]}else Na(i)&&(e=i.bind(n.api)(a,t));if(n.isCandlestickType(t)&&!Na(i)){var o=n.getCandlestickData(t);if(o&&!o._isUp){var s=r.candlestick_color_down;e=Ka(s)?s[t.id]:s}}return e||a},redrawText:function(t,e,n,r){var i=this,a=so(!0);return i.$el.text.style("fill",i.updateTextColor.bind(i)).style("fill-opacity",n?0:i.opacityForText.bind(i)).each((function(n,i){var o=r&&this.getAttribute("x")?Cn(this).transition(a):Cn(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=Fo+"-"+i.replace(/\W/g,"_"),o=n.cache.get(a);return o||(n.$el.svg.append("text").style("visibility","hidden").style("font",Cn(r).style("font")).classed(e,!0).text(i).call((function(t){o=oo(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"+fo(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=oo(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=oo(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=oo(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],ja(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=go(a.node()),s=function(t,e){return Math.sqrt(Math.pow(t,2)+Math.pow(e,2))};a.node()&&i.each((function(){var t=go(this),e=Cn(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(Rn.TextOverlapping,r&&i)}))},undoMarkOverlapped:function(t,e){t.$el.arcs.selectAll(e).each((function(){Hc([this,this.previousSibling]).classed(Rn.TextOverlapping,!1)}))},meetsLabelThreshold:function(t,e){void 0===t&&(t=0);return t>=(this.config[e+"_label_threshold"]||0)}};function qc(t,e){void 0===t&&(t="left");var n=ja(e);return t.indexOf("center")>-1?n?e/2:"middle":t.indexOf("right")>-1?n?e:"end":n?0:"start"}var Zc={initTitle:function(){var t=this.config,e=this.$el;t.title_text&&(e.title=e.svg.append("g"),no(e.title.append("text").style("text-anchor",qc(t.title_position)).attr("class",Rn.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("+qc(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,Rn.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,Rn.title).height},getTitlePadding:function(){return this.yForTitle()+(this.config.title_padding.bottom||0)}},Kc={initTooltip:function(){var t=this,e=t.config,n=t.$el;n.tooltip=Cn(e.tooltip_contents.bindto),n.tooltip.empty()&&(n.tooltip=n.chart.style("position","relative").append("div").attr("class",Rn.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()&&Xa(e.tooltip_init_x)){var s,u,c=t.data.targets[0];for(e.tooltip_init_x=To.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.getYFormat(t.hasArcType(null,["radar"])),t.color)),e.tooltip_contents.bindto||n.tooltip.style("top",e.tooltip_init_position.top).style("left",e.tooltip_init_position.left).style("display","block")}},getTooltipHTML:function(){var t=this,e=t.api,n=t.config;return Na(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 Na(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})):Na(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(Ba(_)){var E=(s.hasAxis||s.hasRadar)&&eo(c?c(m.x):m.x);_=wo(A[0],{CLASS_TOOLTIP:Rn.tooltip,TITLE:Fa(E)?v?E:'<tr><th colspan="2">'+E+"</th></tr>":""})}if(!m.ratio&&i.$el.arcs&&(m.ratio=i.getRatio("arc",i.$el.arcs.select("path."+Rn.arc+"-"+m.id).data()[0])),b=[m.ratio,m.id,m.index,t],w=eo(f.apply(void 0,[d(m)].concat(b))),i.isAreaRangeType(m)){var k=["high","low"].map((function(t){return eo(f.apply(void 0,[i.getRangedData(m,t)].concat(b)))})),M=k[0],O=k[1];w="<b>Mid:</b> "+w+" <b>High:</b> "+M+" <b>Low:</b> "+O}else if(i.isCandlestickType(m)){var C=["open","high","low","close","volume"].map((function(t){return eo(f.apply(void 0,[i.getRangedData(m,t,"candlestick")].concat(b)))})),R=C[0],L=C[1],I=C[2],D=C[3],P=C[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=eo(l.apply(void 0,[m.name].concat(b))),e=g(m),n={CLASS_TOOLTIP_NAME:Rn.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&&Ka(p.text)){var r=y.indexOf(m.id);Object.keys(p.text).forEach((function(t){n[t]=p.text[t][r]}))}_+=wo(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=io(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.zoomScale?_: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=n.hasArcType(null,["radar"]),u=t.filter((function(t){return t&&Fa(n.getBaseValue(t))}));if(a&&0!==u.length&&r.tooltip_show){var c=a.datum(),l=c||{},f=l.width,h=void 0===f?0:f,d=l.height,g=void 0===d?0:d,p=JSON.stringify(t);if(!c||c.current!==p){var v=t.concat().sort()[0].index;Qa(r.tooltip_onshow,n.api,t),a.html(n.getTooltipHTML(t,n.axis?n.axis.getXAxisTickFormat():n.categoryName.bind(n),n.getYFormat(s),n.color)).style("display",null).style("visibility",null).datum(c={index:v,current:p,width:h=a.property("offsetWidth"),height:g=a.property("offsetHeight")}),Qa(r.tooltip_onshown,n.api,t),n._handleLinkedCharts(!0,v)}if(!o){var y=(r.tooltip_position||n.tooltipPosition).call(this,u,h,g,e);["top","left"].forEach((function(t){var e=y[t];a.style(t,e+"px"),"left"!==t||c.xPosInPercent||(c.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);Qa(r.tooltip_onhide,n,a),i.style("display","none").style("visibility","hidden").datum(null),Qa(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=Da.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){}}}))}}},Jc={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=Va(o.margin.left),r=Va(o.margin.top);else if("context"===t)n=Va(o.margin2.left),r=Va(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=Va(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("."+Rn.axisX),t&&(n=n.transition())),e&&e.axisY?r=e.axisY:(r=o.select("."+Rn.axisY),t&&(r=r.transition())),e&&e.axisY2?i=e.axisY2:(i=o.select("."+Rn.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("."+Rn.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)}},Qc={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(ms).forEach((function(n){var r=ms[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 bs)&&!bs[t].filter((function(t){return-1===n.indexOf(t)})).every((function(t){return!r.hasType(t,e)}))},isTypeOf:function(t,e){var n=Xa(t)?t:t.id,r=this.config.data_types[n]||this.config.data_type;return Za(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=Xa(t)?t:t.id;return!this.config.data_types[e]||this.isTypeOf(e,bs.Line)},isStepType:function(t){return this.isTypeOf(t,bs.Step)},isSplineType:function(t){return this.isTypeOf(t,bs.Spline)},isAreaType:function(t){return this.isTypeOf(t,bs.Area)},isAreaRangeType:function(t){return this.isTypeOf(t,bs.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||Za(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 ja(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}},tl=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 ko,e.cache=new No;var n=new In;e.$el=n.getStore("element"),e.state=n.getStore("state")}var e=t.prototype;return e.beforeInit=function(){var t=this;t.callPluginHook("$beforeInit"),Qa(t.config.onbeforeinit,t.api)},e.afterInit=function(){var t=this;t.callPluginHook("$afterInit"),Qa(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"};Ka(e.bindto)&&(i.element=e.bindto.element||"#chart",i.classname=e.bindto.classname||i.classname),r.chart=Na(i.element.node)?e.bindto.element:Cn(i.element||[]),r.chart.empty()&&(r.chart=Cn(Da.body.appendChild(Da.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=Ia.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,r.axisTime=n.axis_x_localtime?B:U;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(Ia.navigator.userAgent)&&e){var r=Ia.navigator&&"maxTouchPoints"in Ia.navigator&&Ia.navigator.maxTouchPoints>0,i="ontouchmove"in Ia||Ia.DocumentTouch&&Da instanceof Ia.DocumentTouch;n=r||i}return(t&&!n&&"onmouseover"in Ia?"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(xo(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 Qa(n.onover,e.api)})).on(p?"touchend":"mouseleave",(function(){return Qa(n.onout,e.api)}))}n.svg_classname&&a.svg.attr("class",n.svg_classname);var v=Na(n.color_tiles)&&e.patterns;(s||v)&&(a.defs=a.svg.append("defs"),s&&["id","idXAxis","idYAxis","idGrid"].forEach((function(t){e.appendClip(a.defs,i.clip[t])})),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(Rn.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",Rn.text+" "+Rn.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",Rn.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(),Qa(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();Qa(n.data_onmin,e.api,x.min),Qa(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=fo(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]()})),qa(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(qa(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=fo(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("."+Rn.target).filter((function(e){return t.isTargetToShow(e.id)})).transition().duration(e.transition_duration).style("opacity","1")},e.getWithOption=function(t){var e={Y:!0,Subchart:!0,Transition:!0,EventRect:!0,Dimension:!0,TrimXDomain:!0,Transform:!1,UpdateXDomain:!1,UpdateOrgXDomain:!1,Legend:!1,UpdateXAxis:"UpdateXDomain",TransitionForExit:"Transition",TransitionForAxis:"Transition"};return Object.keys(e).forEach((function(n){var r=e[n];Xa(r)&&(r=e[r]),e[n]=Ja(t,"with"+n,r)})),e},e.initialOpacity=function(t){var e=this.state.withoutFadeIn;return null!==this.getBaseValue(t)&&e[t.id]?"1":"0"},e.bindResize=function(){var t=this,e=t.config,n=t.state,r=function(){var t,e=[],n=function(){n.clear(),t=Xo((function(){e.forEach((function(t){return t()}))}),200)};return n.clear=function(){t&&(jo(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 Qa(e.onresize,t,t.api)})),e.resize_auto&&i.push((function(){n.resizing=!0,t.api.flush(!1)})),i.push((function(){Qa(e.onresized,t,t.api),n.resizing=!1})),i.forEach((function(t){return r.add(t)})),t.resizeFunction=r,Ia.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 el(t){var e,n,r,i=this.config,a=function(){var t=n.shift();return t&&e&&Ha(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(),$a(r)&&(i[o]=r)}))}lo(tl.prototype,[es,ns,rs,{categoryName:function(t){var e=this.config.axis_x_categories;return e&&t<e.length?e[t]:t}},hs,_s,ws,fs,As,Ss,Es,Bu,Vc,Gc,Wc,Zc,Kc,Jc,Qc]);var nl={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=this.internal,n=e.state;n.rendered?(n.resizing?e.brush&&e.brush.updateResize():e.axis&&e.axis.setOrient(),e.scale.zoom=null,t?e.redraw({withTransform:!0,withUpdateXDomain:!0,withUpdateOrgXDomain:!0,withLegend:!0}):e.updateAndRedraw({withLegend:!0,withTransition:!1,withTransitionForTransform:!1}),!n.resizing&&e.brush&&(e.brush.getSelection().call(e.brush.move),e.unselectRect())):e.initToRender(!0)},destroy:function(){var t=this,e=this.internal,n=e.$el,r=n.chart,i=n.svg;if(qa(e))for(var a in e.callPluginHook("$willDestroy"),e.charts.splice(e.charts.indexOf(this),1),i.select("*").interrupt(),e.resizeFunction.clear(),Ia.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&&($a(e)?(i[a]=e,r=e,n&&this.flush()):r=i[a]),r}};function rl(t){var e=this.internal.data.targets;if(!Ba(t)){var n=Za(t)?t:[t];return e.filter((function(t){return n.some((function(e){return e===t.id}))}))}return e}lo(rl,{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&&Za(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 il(t,e,n){var r,i,a=e||n,o=a.width,s=a.height,u=new XMLSerializer,c=t.cloneNode(!0),l=(r=ho(Da.styleSheets),i=[],r.forEach((function(t){try{t.cssRules&&t.cssRules.length&&(i=i.concat(ho(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",Oe.xhtml);var f=u.serializeToString(c),h=Da.createElement("style");h.appendChild(Da.createTextNode(l.join("\n")));var d=u.serializeToString(h),g=('<svg xmlns="'+Oe.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 al={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=yo({width:s,height:u,preserveAspectRatio:!0,mimeType:"image/png"},t),l=il(a.node(),c,{width:s,height:u});if(e&&Na(e)){var f=new Image;f.crossOrigin="Anonymous",f.onload=function(){var t=Da.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 ol(t,e,n){var r=this.internal,i=r.mapToTargetIds(e);r.state.toggling=!0,r[(t?"remove":"add")+"HiddenTargetIds"](i);var a=r.$el.svg.selectAll(r.selectorTargets(i)),o=t?"1":"0";t&&a.style("display",null),a.transition().style("opacity",o,"important").call(to,(function(){t||a.style("display","none"),a.style("opacity",o)})),n.withLegend&&r[(t?"show":"hide")+"Legend"](i),r.redraw({withUpdateOrgXDomain:!0,withUpdateXDomain:!0,withLegend:!0}),r.state.toggling=!1}var sl=function t(e){this.plugins=[],this.internal=void 0;var n=new tl(this);this.internal=n,function t(e,n,r){Object.keys(e).forEach((function(i){var a=Na(e[i]),o=n!==r,s=Object.keys(e[i]).length>0;a&&(!o&&s||o)?n[i]=e[i].bind(r):!a&&(n[i]={}),s&&t(e[i],n[i],r)}))}(t.prototype,this,this),el.call(n,e),n.beforeInit(),n.init()};function ul(t,e,n){var r=t.config,i="axis_y_"+e,a="axis_y2_"+e;$a(n)&&(Ha(n)?(Fa(n.x)&&(r["axis_x_"+e]=n.x),Fa(n.y)&&(r[i]=n.y),Fa(n.y2)&&(r[a]=n.y2)):(r[i]=n,r[a]=n),t.redraw({withUpdateOrgXDomain:!0,withUpdateXDomain:!0}))}function cl(t,e){var n=t.config;return{x:n["axis_x_"+e],y:n["axis_y_"+e],y2:n["axis_y2_"+e]}}lo(sl.prototype,[nl,{color:function(t){return this.internal.color(t)}},{data:rl},al,{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(Rn.focused,!0).classed(Rn.defocused,!1),e.hasArcType()&&!n.hasRadar&&(e.expandArc(r),e.hasType("gauge")&&e.markOverlapped(t,e,"."+Rn.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(Rn.focused,!1).classed(Rn.defocused,!0),e.hasArcType()&&(e.unexpandArc(r),e.hasType("gauge")&&e.undoMarkOverlapped(e,"."+Rn.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(Rn.focused,!1).classed(Rn.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 Cn(this).classed(Rn.legendItemFocused)})).classed(Rn.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(){return e.loadFromArgs(t)})):e.loadFromArgs(t)},unload:function(t){var e=this,n=this.internal,r=t||{};Za(r)?r={ids:r}:Xa(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={}),ol.call(this,!0,t,e)},hide:function(t,e){void 0===e&&(e={}),ol.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=Fa(o.index)?o.index:r.getIndexByX(o.x))}else $a(t.x)?e=r.getIndexByX(t.x):$a(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.unexpandBars&&t.unexpandBars()}}}]);var ll={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 Fa(t)?ul(e,"min",t):cl(e,"min")},max:function(t){var e=this.internal;return arguments.length?ul(e,"max",t):cl(e,"max")},range:function(t){var e=this.axis;if(!arguments.length)return{max:e.max(),min:e.min()};$a(t.max)&&e.max(t.max),$a(t.min)&&e.min(t.min)}}};function fl(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}lo(fl,{add:function(t){return this.xgrids(this.internal.config.grid_x_lines.concat(t||[]))},remove:function(t){this.internal.removeGridLines(t,!0)}});var hl={xgrids:fl};function dl(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}lo(dl,{add:function(t){return this.ygrids(this.internal.config.grid_y_lines.concat(t||[]))},remove:function(t){this.internal.removeGridLines(t,!1)}});var gl={ygrids:dl},pl={groups:function(t){var e=this.internal,n=e.config;return Ba(t)||(n.data_groups=t,e.redraw()),n.data_groups}};function vl(t){var e=this.internal,n=e.config;return t?(n.regions=t,e.redrawWithoutRescale(),t):n.regions}lo(vl,{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=Ja(r,"duration",n.transition_duration),a=Ja(r,"classes",[Rn.region]),o=e.$el.main.select("."+Rn.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 yl={regions:vl},xl={x:function(t){var e=this.internal,n=e.axis,r=e.data,i=n.isCustomX()&&n.isCategorized();return Za(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 Ka(t)&&(e.updateTargetXs(e.data.targets,t),e.redraw({withUpdateOrgXDomain:!0,withUpdateXDomain:!0})),e.data.xs}},_l={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)),e&&Ao()){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];$a(t.to)?(o=0,i=f?To.call(a,t.to):t.to,h.values.forEach((function(t){t.x<i&&o++}))):$a(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:Fa(t.duration)?t.duration:a.config.transition_duration,done:t.done,orgDataCount:c},withLegend:!0,withTransition:c>1,withTrimXDomain:!1,withUpdateXAxis:!0})}}},ml=Array.prototype.slice;function bl(t){return t}var wl=1e-6;function Tl(t){return"translate("+t+",0)"}function Al(t){return"translate(0,"+t+")"}function Sl(t){return function(e){return+t(e)}}function El(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 kl(){return!this.__axis}function Ml(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):bl:a,p=Math.max(o,0)+u,v=e.range(),y=+v[0]+c,x=+v[v.length-1]+c,_=(e.bandwidth?El:Sl)(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"),E=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)),E=E.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),E=E.transition(n),T=T.transition(n).attr("opacity",wl).attr("transform",(function(t){return isFinite(t=_(t))?h(t+c):this.getAttribute("transform")})),A.attr("opacity",wl).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),E.attr(f,l*p).text(g),m.filter(kl).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?Tl:Al;return n.scale=function(t){return arguments.length?(e=t,n):e},n.ticks=function(){return r=ml.call(arguments),n},n.tickArguments=function(t){return arguments.length?(r=null==t?[]:ml.call(t),n):r.slice()},n.tickValues=function(t){return arguments.length?(i=null==t?null:ml.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 Ol(t){return Ml(1,t)}function Cl(t){return Ml(2,t)}function Rl(t){return Ml(3,t)}function Ll(t){return Ml(4,t)}var Il=function(){function t(t){this.owner=void 0,this.config=void 0,this.scale=void 0;var e=ju(),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=ju("_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 Xa(t)&&ja(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 $a(r)?r:""},e.transitionise=function(t){var e=this.config;return e.withoutTransition?t.interrupt():t.transition(e.transition)},t}(),Dl=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 Il(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=Cn(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(r.transitionise(b).selection()).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,_),E=S.enter().insert("g",".domain").attr("class","tick").style("opacity","1"),k=S.exit().remove();S=E.merge(S),T&&E.append("line"),A&&E.append("text");var M=Il.getSizeFor1Char(S),O=[],C=S.select("text").selectAll("tspan").data((function(t,e){var n=i.tickMultiline?s(t,_,w,u,M.w):Za(r.textFormatted(t))?r.textFormatted(t).concat():[r.textFormatted(t)];return O[e]=n.length,n.map((function(t){return{index:e,splitted:t}}))}));C.exit().remove(),(C=C.enter().append("tspan").merge(C).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?-((O[t.index]-1)*(M.h/2)-3):0===m.y?".71em":0)),ja(n)&&m.y?n+m.y:n||".71em"}));var R=S.select("line"),L=S.select("text");if(E.select("line").attr(f+"2",v*h),E.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(k,_);l(E,p),l(r.transitionise(S).style("opacity","1"),_)}})),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=Xa(o)&&o.indexOf("\n")>-1?o.split("\n"):[];if(s.length)return s;if(Za(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;if(this.params.isCategory)e=2*this.config.tickOffset;else{e=(this.g.select("path.domain").node().getTotalLength()-2*this.config.outerTickSize)/(t||this.g.selectAll("line").size());var r=this.config.tickValues.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,r.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=ho(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(Na(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}(),Pl={getAxisInstance:function(){return this.axis||new zl(this)}},zl=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 Rn.axis+" "+Rn["axis"+fo(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||qa(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="time":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=Rn["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"]?"visible":"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?Ll:Rl:"y"===t?e=o?Rl:Ll:"y2"===t&&(e=o?Ol:Cl),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(Na(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"]?"visible":"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"];Na(d)&&(a=d.bind(o.api))}var g=this.tick[c],p=yo({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 Dl(p).scale(u&&o.scale.zoom||e).orient(f);if(u&&this.isTimeSeries()&&g&&!Na(g)){var y=To.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),Wa(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?Na(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},Na(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(Na(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 Xa(e)?e:e?e.text:null},e.setLabelText=function(t,e){var n=this.owner.config,r=this.getLabelOptionByAxisId(t);Xa(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=Ha(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=Za(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=ju(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;if(Wa(n)?n={left:0,right:0}:(n.left=n.left||0,n.right=n.right||0),e.axis.isTimeSeries()){var r=+e.getXDomainMin(e.data.targets),i=+e.getXDomainMax(e.data.targets)-r,a=i+n.left+n.right,o=0,s=0;if(t&&a){var u=i/t/a;o=n.left/a/u,s=n.right/a/u}n={left:o,right:s}}return n},e.updateLabels=function(t){var e=this,n=this.owner.$el.main,r={x:n.select("."+Rn.axisX+" ."+Rn.axisXLabel),y:n.select("."+Rn.axisY+" ."+Rn.axisYLabel),y2:n.select("."+Rn.axisY2+" ."+Rn.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=ja(t)?t:t[e];return Fa(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=Na(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":"1";["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"+fo(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=xo(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":"block"}))}else c.style("display","block");if("x"===t){var g=i.maxTickWidths.x.clipPath?r.pathXAxisTickTexts:null;a.svg.selectAll("."+Rn.axisX+" .tick text").attr("clip-path",g)}}}))},t}(),Fl={initEventRect:function(){this.$el.main.select("."+Rn.chart).append("g").attr("class",Rn.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("."+Rn.eventRects).style("cursor",e.zoom_enabled&&"drag"!==e.zoom_type?e.axis_rotated?"ns-resize":"ew-resize":null).classed(Rn.eventRectsMultiple,i).classed(Rn.eventRectsSingle,!i).selectAll("."+Rn.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=Ua(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(Rn.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(Rn.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",Rn.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 Na(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=io(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.expandCirclesBars(o.index,o.id,!0),e.showGridFocus(s),(e.isBarType(o.id)||e.dist(o,a)<n.point_sensitivity)&&(e.$el.svg.select("."+Rn.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.bar,i=n.circle,a=n.tooltip;t.$el.svg.select("."+Rn.eventRect).style("cursor",null),t.hideGridFocus(),a&&(t.hideTooltip(),t._handleLinkedCharts(!1)),i&&!e.point_focus_only&&t.unexpandCircles(),r&&t.unexpandBars()},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&&io(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("."+Rn.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=io(r.event,this),o=e.findClosestFromTargets(i,a);!o||(e.isBarType(o.id)||e.dist(o,a)<n.point_sensitivity)&&e.$el.main.selectAll("."+Rn.shapes+e.getTargetSelectorSuffix(o.id)).selectAll("."+Rn.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))}))}}},Nl=function(t){return+t},Xl={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=Bo();d.add(Object.keys(t).map((function(e){return n=t[e].transition().ease(Nl).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("."+Rn[t]+"-"+n);a.selectAll("."+Rn[t+"s"]).selectAll(e).remove()})),a.select("."+Rn.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=Ga(h)/2:i=s(f[0])-s(h[0]),"translate("+i+",0) scale("+Ga(f)/Ga(h)+",1)"}},jl={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("+(!!Ia.navigator&&Ia.navigator.appVersion.toLowerCase().indexOf("msie 9.")>=0?"":Da.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)}},Bl=function(t){return Fa(t.position)||"end"},$l=function(t){return"start"===t.position?4:"middle"===t.position?0:-4};function Ul(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 Yl(t,e){"grid"===e&&t.each((function(){var t=Cn(this);["x1","x2","y1","y2"].forEach((function(e){return t.attr(e,Math.ceil(+t.attr(e)))}))}))}var Vl={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","."+Rn.chart+(e.grid_lines_front?" + *":"")).attr("clip-path",n.pathGrid).attr("class",Rn.grid+" "+Rn.gridLines),r.gridLines.main.append("g").attr("class",Rn.xgridLines),r.gridLines.main.append("g").attr("class",Rn.ygridLines),r.gridLines.x=Hc([]))},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("."+Rn.xgrids).selectAll("."+Rn.xgrid).data(c),s.x.exit().remove(),s.x=s.x.enter().append("line").attr("class",Rn.xgrid).merge(s.x),t||s.x.each((function(){var t=Cn(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":"1"}))}))}))},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("."+Rn.ygrids).selectAll("."+Rn.ygrid).data(s),i.y.exit().remove(),i.y=i.y.enter().append("line").attr("class",Rn.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),Yl(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":"visible"),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("."+Rn.xgridLines).selectAll("."+Rn.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(Rn.xgridLine+" "+(t.class||"")).trim()})).select("text").attr("text-anchor",Bl).attr("dx",$l).transition().duration(t).text((function(t){return t.text})).transition().style("opacity","1"),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("."+Rn.ygridLines).selectAll("."+Rn.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(Rn.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","1"),u.select("text").attr("text-anchor",Bl).attr("dx",$l).transition().duration(t).attr("dy",-5).attr("x",Ul(s,i,a)).attr("y",l).text((function(t){return t.text})).transition().style("opacity","1"),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",Ul(!n,i,a)).attr("y",s).text((function(t){return t.text})),[u.style("opacity","1"),c.style("opacity","1")]},initFocusGrid:function(){var t=this,e=t.config,n=t.state.clip,r=t.$el,i=e.grid_front,a="."+Rn[i&&r.gridLines.main?"gridLines":"chart"]+(i?" + *":""),o=r.main.insert("g",a).attr("clip-path",n.pathGrid).attr("class",Rn.grid);r.grid.main=o,e.grid_x_show&&o.append("g").attr("class",Rn.xgrids),e.grid_y_show&&o.append("g").attr("class",Rn.ygrids),e.interaction_enabled&&e.grid_focus_show&&(o.append("g").attr("class",Rn.xgridFocus).append("line").attr("class",Rn.xgridFocus),e.grid_focus_y&&!e.tooltip_grouped&&o.append("g").attr("class",Rn.ygridFocus).append("line").attr("class",Rn.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."+Rn.xgridFocus+", line."+Rn.ygridFocus),u=(t||[s.datum()]).filter((function(t){return t&&Fa(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","visible").data(u.concat(u)).each((function(t){var n,r=Cn(this),s={x:l(t),y:e.getYScaleById(t.id)(t.value)};if(r.classed(Rn.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])}))})),Yl(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."+Rn.xgridFocus+", line."+Rn.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."+Rn.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("."+Rn.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(Za(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?Rn.xgridLines:Rn.ygridLines,o=e?Rn.xgridLine:Rn.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)}))}},Gl={initRegion:function(){var t=this.$el;t.region.main=t.main.append("g").attr("clip-path",this.state.clip.path).attr("class",Rn.regions)},updateRegion:function(t){var e=this,n=e.config,r=e.$el;r.region.main||e.initRegion(),r.region.main.style("visibility",e.hasArcType()?"hidden":"visible");var i=r.main.select("."+Rn.regions).selectAll("."+Rn.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.region.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 Fa(t.opacity)?t.opacity:"0.1"})).on("end",(function(){Cn(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()?To.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()?To.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}},Hl={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)}},Wl={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:[]},ql={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 Zl(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 Kl(t){for(var e,n=1;n<arguments.length;n++)e=null==arguments[n]?{}:arguments[n],n%2?Zl(Object(e),!0).forEach((function(n){Dn(t,n,e[n])})):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(e)):Zl(Object(e)).forEach((function(n){Object.defineProperty(t,n,Object.getOwnPropertyDescriptor(e,n))}));return t}var Jl=Kl(Kl(Kl({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:[]}),Wl),ql),Ql=[ll,{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}},hl,gl,_l,pl,yl,xl],tf=[Pl,jl,Fl,Xl,Vl,Gl,Hl],ef=[{data_xs:{},data_xFormat:"%Y-%m-%d",data_xLocaltime:!0,data_xSort:!0,data_axes:{},data_regions:{},data_stack_normalize:!1},Jl,{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 nf(t){return"object"==typeof t&&"length"in t?t:Array.from(t)}function rf(t){return function(){return t}}function af(t,e){return e<t?-1:e>t?1:e>=t?0:NaN}function of(t){return t}var sf=Math.PI,uf=2*sf,cf=1e-6,lf=uf-cf;function ff(){this._x0=this._y0=this._x1=this._y1=null,this._=""}function hf(){return new ff}ff.prototype=hf.prototype={constructor:ff,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>cf)if(Math.abs(l*s-u*c)>cf&&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((sf-Math.acos((g+f-(h*h+d*d))/(2*p*v)))/2),x=y/v,_=y/p;Math.abs(x-1)>cf&&(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)>cf||Math.abs(this._y1-c)>cf)&&(this._+="L"+u+","+c),n&&(f<0&&(f=f%uf+uf),f>lf?this._+="A"+n+","+n+",0,1,"+l+","+(t-o)+","+(e-s)+"A"+n+","+n+",0,1,"+l+","+(this._x1=u)+","+(this._y1=c):f>cf&&(this._+="A"+n+","+n+",0,"+ +(f>=sf)+","+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 df=hf;function gf(t){return t.innerRadius}function pf(t){return t.outerRadius}function vf(t){return t.startAngle}function yf(t){return t.endAngle}function xf(t){return t&&t.padAngle}function _f(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<hc))return[t+(h=(l*(e-a)-f*(t-i))/h)*u,e+h*c]}function mf(t,e,n,r,i,a,o){var s=t-n,u=e-r,c=(o?a:-a)/fc(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)*fc(uc(0,b*b*m-w*w)),A=(w*_-x*T)/m,S=(-w*x-_*T)/m,E=(w*_+x*T)/m,k=(-w*x+_*T)/m,M=A-v,O=S-y,C=E-v,R=k-y;return M*M+O*O>C*C+R*R&&(A=E,S=k),{cx:A,cy:S,x01:-l,y01:-f,x11:A*(i/b-1),y11:S*(i/b-1)}}function bf(){function t(){var t,c,l=+e.apply(this,arguments),f=+n.apply(this,arguments),h=a.apply(this,arguments)-gc,d=o.apply(this,arguments)-gc,g=ac(d-h),p=d>h;if(u||(u=t=df()),f<l&&(c=f,f=l,l=c),f>hc)if(g>pc-hc)u.moveTo(f*sc(h),f*lc(h)),u.arc(0,0,f,h,d,!p),l>hc&&(u.moveTo(l*sc(d),l*lc(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>hc&&(i?+i.apply(this,arguments):fc(l*l+f*f)),E=cc(ac(f-l)/2,+r.apply(this,arguments)),k=E,M=E;if(S>hc){var O=yc(S/l*lc(A)),C=yc(S/f*lc(A));(w-=2*O)>hc?(m+=O*=p?1:-1,b-=O):(w=0,m=b=(h+d)/2),(T-=2*C)>hc?(x+=C*=p?1:-1,_-=C):(T=0,x=_=(h+d)/2)}var R=f*sc(x),L=f*lc(x),I=l*sc(b),D=l*lc(b);if(E>hc){var P,z=f*sc(_),F=f*lc(_),N=l*sc(m),X=l*lc(m);if(g<dc&&(P=_f(R,L,N,X,z,F,I,D))){var j=R-P[0],B=L-P[1],$=z-P[0],U=F-P[1],Y=1/lc(vc((j*$+B*U)/(fc(j*j+B*B)*fc($*$+U*U)))/2),V=fc(P[0]*P[0]+P[1]*P[1]);k=cc(E,(l-V)/(Y-1)),M=cc(E,(f-V)/(Y+1))}}T>hc?M>hc?(v=mf(N,X,R,L,f,M,p),y=mf(z,F,I,D,f,M,p),u.moveTo(v.cx+v.x01,v.cy+v.y01),M<E?u.arc(v.cx,v.cy,M,oc(v.y01,v.x01),oc(y.y01,y.x01),!p):(u.arc(v.cx,v.cy,M,oc(v.y01,v.x01),oc(v.y11,v.x11),!p),u.arc(0,0,f,oc(v.cy+v.y11,v.cx+v.x11),oc(y.cy+y.y11,y.cx+y.x11),!p),u.arc(y.cx,y.cy,M,oc(y.y11,y.x11),oc(y.y01,y.x01),!p))):(u.moveTo(R,L),u.arc(0,0,f,x,_,!p)):u.moveTo(R,L),l>hc&&w>hc?k>hc?(v=mf(I,D,z,F,l,-k,p),y=mf(R,L,N,X,l,-k,p),u.lineTo(v.cx+v.x01,v.cy+v.y01),k<E?u.arc(v.cx,v.cy,k,oc(v.y01,v.x01),oc(y.y01,y.x01),!p):(u.arc(v.cx,v.cy,k,oc(v.y01,v.x01),oc(v.y11,v.x11),!p),u.arc(0,0,l,oc(v.cy+v.y11,v.cx+v.x11),oc(y.cy+y.y11,y.cx+y.x11),p),u.arc(y.cx,y.cy,k,oc(y.y11,y.x11),oc(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=gf,n=pf,r=rf(0),i=null,a=vf,o=yf,s=xf,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-dc/2;return[sc(r)*t,lc(r)*t]},t.innerRadius=function(n){return arguments.length?(e="function"==typeof n?n:rf(+n),t):e},t.outerRadius=function(e){return arguments.length?(n="function"==typeof e?e:rf(+e),t):n},t.cornerRadius=function(e){return arguments.length?(r="function"==typeof e?e:rf(+e),t):r},t.padRadius=function(e){return arguments.length?(i=null==e?null:"function"==typeof e?e:rf(+e),t):i},t.startAngle=function(e){return arguments.length?(a="function"==typeof e?e:rf(+e),t):a},t.endAngle=function(e){return arguments.length?(o="function"==typeof e?e:rf(+e),t):o},t.padAngle=function(e){return arguments.length?(s="function"==typeof e?e:rf(+e),t):s},t.context=function(e){return arguments.length?(u=null==e?null:e,t):u},t}var wf={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=nf(t)).length,d=0,g=Array(h),p=Array(h),v=+i.apply(this,arguments),y=Math.min(pc,Math.max(-pc,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=of,n=af,r=null,i=rf(0),a=rf(pc),o=rf(0);return t.value=function(n){return arguments.length?(e="function"==typeof n?n:rf(+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:rf(+e),t):i},t.endAngle=function(e){return arguments.length?(a="function"==typeof e?e:rf(+e),t):a},t.padAngle=function(e){return arguments.length?(o="function"==typeof e?e:rf(+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!ja(r)&&e&&(r=r[e.id]||0),Ka(i)&&e&&e.id in i?i=i[e.id]:!ja(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=u*(e.getTotalDataSum(r.rendered)/(n.gauge_max-n.gauge_min));i=i.startAngle(s).endAngle(c+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 l=n.gauge_min,f=n.gauge_max,h=a.value<l?0:a.value<f?a.value-l:f-l;a.startAngle=s,a.endAngle=s+u/(f-l)*h}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=bf().innerRadius((function(i){var a=t.getRadius(i).innerRadius;return r?e.radius-n*(i.index+1):ja(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=bf().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?Na(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)).each((function(t){var r=Cn(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;no(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("."+Rn.legendItemFocused).size()>0&&e.expandArc(t))}),10);else{var a=e.mapToTargetIds(t);r.svg.selectAll(e.selectorTargets(a,"."+Rn.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"));Cn(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,"."+Rn.chartArc)).selectAll("path").transition().duration((function(t){return e.getExpandConfig(t.data.id,"duration")})).attr("d",e.svgArc),r.selectAll(""+Rn.arc).style("opacity","1")}},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),Na(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("."+Rn.chartArcs),u=s.selectAll("."+Rn.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("."+Rn.target+" text")},initArc:function(){var t=this,e=t.$el;e.arcs=e.main.select("."+Rn.chart).append("g").attr("class",Rn.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",Rn[n?"chartArcsGaugeTitle":"chartArcsTitle"]).style("text-anchor","middle");n&&r.attr("dy","-0.3em").style("font-size","27px"),no(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("."+Rn.arcs).selectAll("."+Rn.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":"1"})).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=Yr(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","1").call(to,(function(){if(r.levelColor){var t=Cn(this),e=t.datum();r.updateLegendItemColor(e.data.id,t.style("fill"))}a.transiting=!1,Qa(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":"")+"."+Rn.chartArcsBackground);if(r){var u=0;(s=s.selectAll("path."+Rn.chartArcsBackground).data(t.data.targets)).enter().append("path").attr("class",(function(t,e){return Rn.chartArcsBackground+" "+Rn.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 Cn(Da.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),Ba(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("."+Rn.chartArc).select("text").style("opacity","0").attr("class",(function(t){return n.isGaugeType(t.data)?Rn.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)?"1":"0"})),c&&e.attr("dy","-.1em")),o.select("."+Rn.chartArcsTitle).style("opacity",n.hasType("donut")||u?"1":"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("."+Rn.chartArcsGaugeUnit).attr("dy",(l?1.5:.75)+"em").text(r.gauge_units),s.select("."+Rn.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("."+Rn.chartArcsGaugeMax).attr("dx",i.innerRadius+(i.radius-i.innerRadius)/2+"px").attr("dy","1.2em").text(n.textForGaugeMinMax(r.gauge_max,!0)))}}};function Tf(t){return t[0]}function Af(t){return t[1]}function Sf(t,e){function n(n){var s,u,c,l=(n=nf(n)).length,f=!1;for(null==i&&(o=a(c=df())),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=rf(!0),i=null,a=jc,o=null;return t="function"==typeof t?t:void 0===t?Tf:rf(t),e="function"==typeof e?e:void 0===e?Af:rf(e),n.x=function(e){return arguments.length?(t="function"==typeof e?e:rf(+e),n):t},n.y=function(t){return arguments.length?(e="function"==typeof t?t:rf(+t),n):e},n.defined=function(t){return arguments.length?(r="function"==typeof t?t:rf(!!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 Ef={initArea:function(t){var e=this.config;t.insert("g","."+Rn[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=Na(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("."+Rn.areas).selectAll("."+Rn.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=Cn(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(so()):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=nf(r)).length,p=!1,v=Array(g),y=Array(g);for(null==s&&(c=u(d=df())),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 Sf().defined(o).curve(u).context(s)}var a=null,o=rf(!0),s=null,u=jc,c=null;return t="function"==typeof t?t:void 0===t?Tf:rf(+t),e="function"==typeof e?e:rf(void 0===e?0:+e),n="function"==typeof n?n:void 0===n?Af:rf(+n),r.x=function(e){return arguments.length?(t="function"==typeof e?e:rf(+e),a=null,r):t},r.x0=function(e){return arguments.length?(t="function"==typeof e?e:rf(+e),r):t},r.x1=function(t){return arguments.length?(a=null==t?null:"function"==typeof t?t:rf(+t),r):a},r.y=function(t){return arguments.length?(e="function"==typeof t?t:rf(+t),n=null,r):e},r.y0=function(t){return arguments.length?(e="function"==typeof t?t:rf(+t),r):e},r.y1=function(t){return arguments.length?(n=null==t?null:"function"==typeof t?t:rf(+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:rf(!!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]]}}},kf={initBar:function(){var t=this.$el;t.bar=t.main.select("."+Rn.chart).insert("g",":first-child").attr("class",Rn.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("."+Rn.chartBars).selectAll("."+Rn.chartBar).data(t).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("."+Rn.bars).selectAll("."+Rn.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(so()):r).attr("d",t).style("fill",this.color).style("opacity","1")]},getBars:function(t,e){var n=this.$el.main,r=Fa(t)?"-"+t:"";return(e?n.selectAll("."+Rn.bars+this.getTargetSelectorSuffix(e)):n).selectAll("."+Rn.bar+r)},expandBars:function(t,e,n){n&&this.unexpandBars(),this.getBars(t,e).classed(Rn.EXPANDED,!0)},unexpandBars:function(t){this.getBars(t).classed(Rn.EXPANDED,!1)},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=ja(o)&&o>0?function(){return o}:ja(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=ja(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=io(this.state.event,t),n=ro(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 Mf(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 Of={initCandlestick:function(){var t=this.$el;t.candlestick=t.main.select("."+Rn.chart).append("g").attr("class",Rn.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("."+Rn.chartCandlesticks).selectAll("."+Rn.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("."+Rn.chartCandlestick).selectAll("."+Rn.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(Rn[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):Ka(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=ja(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=so(!0);return[r.each((function(n,r){var a=e?Cn(this).transition(i):Cn(this);t(n,r,a)})).style("opacity","1")]},getCandlestickData:function(t){var e,n=t.value;if(Za(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 Ka(n)&&(e=function(t){for(var e,n=1;n<arguments.length;n++)e=null==arguments[n]?{}:arguments[n],n%2?Mf(Object(e),!0).forEach((function(n){Dn(t,n,e[n])})):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(e)):Mf(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}},Cf={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",Rn.chartArcsBackground).style("fill",!i&&e.gauge_background||null),e.gauge_units&&r(Rn.chartArcsGaugeUnit),e.gauge_label_show&&(r(Rn.chartArcsGaugeMin),!e.gauge_fullCircle&&r(Rn.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_max&&(e.gauge_max=r)},redrawMultiArcGauge:function(){var t=this,e=t.config,n=t.state,r=t.$el,i=t.state.hiddenTargetIds,a=r.main.selectAll("."+Rn.arcs).selectAll("."+Rn.arcLabelLine).data(t.arcData.bind(t));a.enter().append("rect").attr("class",(function(t){return Rn.arcLabelLine+" "+Rn.target+" "+Rn.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?"":"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+")"}Cn(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 Na(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)}},Rf={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=Mo,a=t.cache.get(i);return a||t.cache.add(i,a=_o("min",[n,r])),a},getBubbleR:function(t){var e=this,n=e.config.bubble_maxR;Na(n)?n=n.bind(e.api)(t):!ja(n)&&(n=e.getBaseLength()/(2*e.getMaxDataCount())+12);var r=_o("max",e.getMinMaxData().max.map((function(t){return e.isBubbleZType(t)?e.getBubbleZData(t.value,"y"):Ka(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 Ka(t)?t[e]:t["y"===e?0:1]}},Lf={initLine:function(){var t=this.$el;t.line=t.main.select("."+Rn.chart).append("g").attr("class",Rn.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("."+Rn.chartLines).selectAll("."+Rn.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("."+Rn.lines).selectAll("."+Rn.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(so()):r).attr("d",t).style("stroke",this.color).style("opacity","1")]},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=Sf();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 i,s=u(t.id,e),c=a?n.filterRemoveNull(t.values):t.values,l=0,d=0;if(n.isLineType(t)){var g=r.data_regions[t.id];g?i=n.lineWithRegions(c,h,s,g):(n.isStepType(t)&&(c=n.convertValuesToStep(c)),i=f.curve(n.getCurve(t))(c))}else c[0]&&(l=h(c[0].x),d=s(c[0].value)),i=o?"M "+d+" "+l:"M "+l+" "+d;return i||"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($a(r))for(var g,p=function(t,e){return Ba(t)?e:l?To.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")},E="",k=0;m=t[k];k++){var M=t[k-1],O=M&&Fa(M.value);_=d(m.x,h);if(Fa(m.value))if(!Ba(h)&&_&&O){if(O){try{_=_.dasharray.split(" ")}catch(t){_="2 2".split(" ")}i=ju(S.x,M.x+f,m.x+f),a=ju(S.y,M.value,m.value);var C=e(m.x)-e(M.x),R=n(m.value)-n(M.value),L=Math.sqrt(Math.pow(C,2)+Math.pow(R,2));s=(o=_[0]/L)*_[1];for(var I=o;I<=1;I+=s)E+=A(M,m,I,o),I+s>=1&&(E+=A(M,m,1,0))}}else E+=(k&&O?"L":"M")+b(m)+","+w(m)}return E},isWithinStep:function(t,e){return Math.abs(e-io(this.state.event,t)[1])<30},shouldDrawPointsForLine:function(t){var e=this.config.line_point;return!0===e||Za(e)&&-1!==e.indexOf(t.id)}},If=function(){return so()},Df={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 Ha(e)&&Na(e.create)&&Na(e.update)},initialOpacityForCircle:function(t){var e=this.config,n=this.state.withoutFadeIn,r=e.point_opacity;return Ba(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 Ba(n)&&(n=e.point_show&&!e.point_focus_only?"1":"0",n=Fa(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("."+Rn.chartCircles).empty()&&e.select("."+Rn.chart).append("g").attr("class",Rn.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("."+Rn.chartCircles).style("pointer-events","none").selectAll("."+Rn.circles).data(l).attr("class",c);h.exit().remove(),f=h.enter()}s&&f.append("g").attr("class",(function(t){return r.generateClass(Rn.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("."+Rn.selectedCircles+r.getTargetSelectorSuffix(t.id)).selectAll(""+Rn.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("."+Rn.circles).selectAll("."+Rn.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("."+Rn.circles+" ."+Rn.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("."+Rn.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=so(),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||Ba(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&&Cn(this).datum(n[0])}))),u.attr("class",this.updatePointClass.bind(this)).style("opacity","1").each((function(t){var n=t.id,r=t.index,i=t.value,a="hidden";Fa(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=Fa(t)?"-"+t:"";return(e?n.$el.main.selectAll("."+Rn.circles+n.getTargetSelectorSuffix(e)):n.$el.main).selectAll("."+Rn.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(Rn.EXPANDED,!0),o=i(a)/r.config.point_r,s=1-o;r.isCirclePoint()?a.attr("r",i):a.each((function(){var t=Cn(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 Cn(this).classed(Rn.EXPANDED)})).classed(Rn.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):Na(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 Na(e)?e(t):e||4*this.pointR(t)},isWithinCircle:function(t,e){var n=io(this.state.event,t),r=Cn(t),i=this.isCirclePoint(t)?"c":"",a=+r.attr(i+"x"),o=+r.attr(i+"y");if(!a&&!o&&1===t.nodeType){var s=oo(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=Da.createElementNS(Oe.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=Cn(i);"innerHTML"in i?a.html(r.innerHTML):ho(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(Ka(t)||n)&&(r=!0===t?n.each((function(t){var n=e.getClass("circle",!0)(t);this.getAttribute("class").indexOf(Rn.EXPANDED)>-1&&(n+=" "+Rn.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=qa(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=Cn(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 e(t)-u/2},f=t;if(i){var h=If();a&&f.attr("x",l),f=f.transition(h),o&&o.transition(If())}return f.attr("x",l).attr("y",(function(t){return n(t)-c/2})).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=If();a&&u.attr("cx",e),u.attr("cx")&&(u=u.transition(c)),o&&o.transition(If())}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=If();a&&c.attr("x",u),c=c.transition(l),o&&o.transition(If())}return c.attr("x",u).attr("y",(function(t){return n(t)-s})).style("fill",r)}}};var Pf=Do,zf={initRadar:function(){var t=this,e=t.config,n=t.state.current,r=t.$el;t.hasType("radar")&&(r.radar=r.main.select("."+Rn.chart).append("g").attr("class",Rn.chartRadars),r.radar.levels=r.radar.append("g").attr("class",Rn.levels),r.radar.axes=r.radar.append("g").attr("class",Rn.axis),r.radar.shapes=r.radar.append("g").attr("class",Rn.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;Wa(e.axis_x_categories)&&(e.axis_x_categories=mo(0,_o("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=ho(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,$a(n)?n:"x"===t?o:s,ja(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(Pf)||{},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(Pf,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("."+Rn.chartTexts).attr("transform",a),e.generateRadarPoints(),e.updateRadarLevel(),e.updateRadarAxes(),e.updateRadarShape(t))},generateGetRadarPoints:function(){var t=this.cache.get(Pf);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=mo(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 mo(0,u).map((function(e){return t.getRadarPosition(["x","y"],e,n,1).join(",")})).join(" ")})),v=l.selectAll("."+Rn.level).data(f);v.exit().remove();var y=v.enter().append("g").attr("class",(function(t,e){return Rn.level+" "+Rn.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 Ba(t)?a:p[t].split(",")[0]})).attr("y",(function(t){return Ba(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 Rn.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){no(Cn(this),t+"",[-.6,1.2])}))})).datum((function(t,e){return{index:e}})).attr("transform",(function(e){Ba(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=Cn(e).datum();return n&&1===Object.keys(n).length?n.index:void 0},h=function(e){var n=f(e),r=Ba(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(Pf),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(Pf)[t.id][t.index][0]},radarCircleY:function(t){return this.cache.get(Pf)[t.id][t.index][1]}},Ff={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"},Nf={area_above:!1,area_front:!0,area_linearGradient:!1,area_zerobased:!0},Xf={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},jf={bubble_maxR:35,bubble_zerobased:!1},Bf={candlestick_width:void 0,candlestick_width_ratio:.6,candlestick_width_max:void 0,candlestick_color_down:"red"},$f={line_connectNull:!1,line_step_type:"step",line_zerobased:!1,line_classes:void 0,line_point:!0},Uf={scatter_zerobased:!1},Yf={spline_interpolation_type:"cardinal"},Vf={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},Gf={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},Hf={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},Wf={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 qf(t,e){lo(tl.prototype,tf.concat(t)),lo(sl.prototype,Ql),ko.setOptions(ef.concat(e||[]))}function Zf(t,e){qf([Df,Lf].concat(t||[])),ko.setOptions([Ff,$f].concat(e||[]))}function Kf(t,e){lo(tl.prototype,[wf].concat(t||[])),ko.setOptions(e)}var Jf=function(){return Zf(Ef,[Nf]),(Jf=function(){return ms.AREA})()},Qf=function(){return Zf(Ef,[Nf]),(Qf=function(){return ms.AREA_LINE_RANGE})()},th=function(){return Zf(Ef,[Nf,Yf]),(th=function(){return ms.AREA_SPLINE})()},eh=function(){return Zf(Ef,[Nf,Yf]),(eh=function(){return ms.AREA_SPLINE_RANGE})()},nh=function(){return Zf(Ef,[Nf]),(nh=function(){return ms.AREA_STEP})()},rh=function(){return Zf(),(rh=function(){return ms.LINE})()},ih=function(){return Zf(void 0,[Yf]),(ih=function(){return ms.SPLINE})()},ah=function(){return Zf(),(ah=function(){return ms.STEP})()},oh=function(){return Kf(void 0,[Vf]),(oh=function(){return ms.DONUT})()},sh=function(){return Kf([Cf],[Gf]),(sh=function(){return ms.GAUGE})()},uh=function(){return Kf(void 0,[Hf]),(uh=function(){return ms.PIE})()},ch=function(){return Kf([Df,zf],[Ff,Wf]),(ch=function(){return ms.RADAR})()},lh=function(){return qf([kf],Xf),(lh=function(){return ms.BAR})()},fh=function(){return qf([Df,Rf],[jf,Ff]),(fh=function(){return ms.BUBBLE})()},hh=function(){return qf([Of],[Bf]),(hh=function(){return ms.CANDLESTICK})()},dh=function(){return qf([Df],[Ff,Uf]),(dh=function(){return ms.SCATTER})()},gh={selected:function(t){var e=this.internal,n=[];return e.$el.main.selectAll("."+(Rn.shapes+e.getTargetSelectorSuffix(t))).selectAll("."+Rn.shape).filter((function(){return Cn(this).classed(Rn.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("."+Rn.shapes).selectAll("."+Rn.shape).each((function(a,o){var s=Cn(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(Rn.SELECTED);s.classed(Rn.line)||s.classed(Rn.area)||(l&&f?i.data_selection_isselectable.bind(r.api)(a)&&!h&&c(!0,s.classed(Rn.SELECTED,!0),a,o):$a(n)&&n&&h&&c(!1,s.classed(Rn.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("."+Rn.shapes).selectAll("."+Rn.shape).each((function(i,a){var o=Cn(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(Rn.SELECTED);o.classed(Rn.line)||o.classed(Rn.area)||c&&l&&r.data_selection_isselectable.bind(n.api)(i)&&f&&u(!1,o.classed(Rn.SELECTED,!1),i,a)}))}},ph={subchart:{show:function(){var t=this.internal,e=t.$el.subchart,n=t.config,r=n.subchart_show;if(!r){n.subchart_show=!r,e.main||t.initSubchart();var i=e.main.selectAll("."+Rn.target);t.data.targets.length!==i.size()&&(t.updateSizes(),t.updateTargetsForSubchart(t.data.targets),i=e.main.selectAll("."+Rn.target)),i.style("opacity","1"),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 vh(t){return((t=Math.exp(t))+1/t)/2}var yh=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=vh(_),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/vh(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),xh=function(t){return function(){return t}};function _h(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 mh(t,e,n){this.k=t,this.x=e,this.y=n}mh.prototype={constructor:mh,scale:function(t){return 1===t?this:new mh(this.k*t,this.x,this.y)},translate:function(t,e){return 0===t&0===e?this:new mh(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 bh=new mh(1,0,0);function wh(t){for(;!t.__zoom;)if(!(t=t.parentNode))return bh;return t.__zoom}function Th(t){t.stopImmediatePropagation()}function Ah(t){t.preventDefault(),t.stopImmediatePropagation()}function Sh(t){return!(t.ctrlKey&&"wheel"!==t.type||t.button)}function Eh(){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 kh(){return this.__zoom||bh}function Mh(t){return-t.deltaY*(1===t.deltaMode?.05:t.deltaMode?1:.002)*(t.ctrlKey?10:1)}function Oh(){return navigator.maxTouchPoints||"ontouchstart"in this}function Ch(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))}wh.prototype=mh.prototype;var Rh=function(t){var e,n=this.internal,r=n.config,i=n.scale,a=t;if(r.zoom_enabled&&a){if(n.axis.isTimeSeries()&&(a=a.map((function(t){return To.bind(n)(t)}))),function(t,e){var n=e[0],r=e[1];return t.every((function(t,e){return 0===e?t>=n:t<=r}))}(a,n.getZoomDomain())){if(n.api.tooltip.hide(),r.subchart_show){var o=i.zoom||i.x;n.brush.getSelection().call(n.brush.move,[o(a[0]),o(a[1])]),e=a}else i.x.domain(a),i.zoom=i.x,n.axis.x.scale(i.zoom),e=i.zoom.orgDomain();n.redraw({withTransition:!0,withY:r.zoom_rescale,withDimension:!1}),n.setZoomResetButton(),Qa(r.zoom_onzoom,n.api,e)}}else e=i.zoom?i.zoom.domain():i.x.orgDomain();return e};lo(Rh,{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=_o("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=_o("min",[r[0],t])),n.zoom_x_min},range:function(t){var e=this.zoom;if(Ka(t)){var n=t.min,r=t.max;$a(n)&&e.min(n),$a(r)&&e.max(r)}return{min:e.min(),max:e.max()}}});var Lh={zoom:Rh,unzoom:function(){var t=this.internal,e=t.config;if(t.scale.zoom){e.subchart_show?t.brush.getSelection().call(t.brush.move,null):t.zoom.updateTransformScale(bh),t.updateZoom(!0),t.zoom.resetBtn&&t.zoom.resetBtn.style("display","none");var n=t.$el.main.select("."+Rn.eventRects);wh(n.node())!==bh&&t.zoom.transform(n,bh),t.redraw({withTransition:!0,withUpdateXDomain:!0,withUpdateOrgXDomain:!0,withY:e.zoom_rescale})}}};function Ih(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 Dh(t){for(var e,n=1;n<arguments.length;n++)e=null==arguments[n]?{}:arguments[n],n%2?Ih(Object(e),!0).forEach((function(n){Dn(t,n,e[n])})):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(e)):Ih(Object(e)).forEach((function(n){Object.defineProperty(t,n,Object.getOwnPropertyDescriptor(e,n))}));return t}var Ph=Dh(Dh({},{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("."+Rn.dragarea).attr("x",h).attr("y",g).attr("width",d-h).attr("height",p-g),i.selectAll("."+Rn.shapes).selectAll("."+Rn.shape).filter((function(t){return o&&o.bind(e.api)(t)})).each((function(t,n){var r,i=Cn(this),a=i.classed(Rn.SELECTED),o=i.classed(Rn.INCLUDED),s=!1;if(i.classed(Rn.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(Rn.bar))return;var l=function(t){var e=t.getBoundingClientRect(),n=e.width,r=e.height,i=ro(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(Rn.INCLUDED,!o),i.classed(Rn.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("."+Rn.chart).append("rect").attr("class",Rn.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("."+Rn.dragarea).transition().duration(100).style("opacity","0").remove(),n.selectAll("."+Rn.shape).classed(Rn.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);Qa(i.data_onselected,r.api,e,t.node()),a.select("."+Rn.selectedCircles+r.getTargetSelectorSuffix(e.id)).selectAll("."+Rn.selectedCircle+"-"+n).data([e]).enter().append("circle").attr("class",(function(){return r.generateClass(Rn.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;Qa(i.data_onunselected,r.api,e,t.node()),a.main.select("."+Rn.selectedCircles+r.getTargetSelectorSuffix(e.id)).selectAll("."+Rn.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;Qa(r.data_onselected,n.api,e,t.node()),r.interaction_brighten&&t.transition().duration(100).style("fill",(function(){return _r(n.color(e)).brighter(.75)}))},unselectPath:function(t,e){var n=this,r=n.config;Qa(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=Cn(t),u=s.classed(Rn.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="."+Rn.shapes;a.data_selection_grouped&&(l+=i.getTargetSelectorSuffix(e.id)),o.selectAll(l).selectAll("."+Rn.shape).each((function(t,e){var n=Cn(this);n.classed(Rn.SELECTED)&&(r=n,c(!1,n.classed(Rn.SELECTED,!1),t,e))}))}r&&r.node()===s.node()||(s.classed(Rn.SELECTED,!u),c(!u,s,e,n))}}}),zh={initBrush:function(){var t=this,e=t.config,n=t.scale,r=t.$el.subchart,i=e.axis_rotated;t.brush=La(i?_a:xa);var a,o,s=function(){t.redrawForBrush()};t.brush.on("start",(function(){"touch"===t.state.inputType&&t.hideTooltip(),s()})).on("brush",s).on("end",(function(){a=n.x.orgDomain()})),t.brush.updateResize=function(){var t=this;o&&clearTimeout(o),o=setTimeout((function(){var e=t.getSelection();a&&Ra(e.node())&&t.move(e,a.map(n.subX.orgScale()))}),0)},t.brush.update=function(){return 0===this.extent()()[1].filter((function(t){return isNaN(t)})).length&&r.main&&r.main.select("."+Rn.brush).call(this),this},t.brush.scale=function(n){var r=e.subchart_size_height||function(){var e=t.$el.svg.select("."+Rn.brush+" .overlay"),n={width:0,height:0};return e.size()&&(n.width=+e.attr("width"),n.height=+e.attr("height")),n[i?"width":"height"]}(),a=t.getExtent();!a&&n.range?a=[[0,0],[n.range()[1],r]]:Za(a)&&(a=a.map((function(t,e){return[t,e>0?r:e]}))),i&&a[1].reverse(),this.extent(a),this.update()},t.brush.getSelection=function(){return r.main?r.main.select("."+Rn.brush):Cn([])}},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?"visible":"hidden",f=r.id+"-subchart",h=t.getClipPath(f);r.idSubchart=f,t.appendClip(o,f),t.initBrush(),u.main=s.append("g").classed(Rn.subchart,!0).attr("transform",t.getTranslate("context"));var d=u.main;d.style("visibility",l),d.append("g").attr("clip-path",h).attr("class",Rn.chart),["bar","line","bubble","candlestick","scatter"].forEach((function(e){var n=fo(/^(bubble|scatter)$/.test(e)?"circle":e);if(t.hasType(e)||t.hasTypeOf(n)){var r=d.select("."+Rn.chart),i=Rn["chart"+n+"s"];r.select("."+i).empty()&&r.append("g").attr("class",i)}})),d.append("g").attr("clip-path",h).attr("class",Rn.brush).call(t.brush),c.subX=d.append("g").attr("class",Rn.axisX).attr("transform",t.getTranslate("subX")).attr("clip-path",e.axis_rotated?"":r.pathXAxis).style("visibility",e.subchart_axis_x_show?l:"hidden")}},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(fo(t))})).forEach((function(n){var r=/^(bubble|scatter)$/.test(n),a=fo(r?"circle":n),o=e.getChartClass(a,!0),s=e.getClass(r?"circles":n+"s",!0),u=i.select("."+Rn["chart"+a+"s"]);if(r){var c=u.selectAll("."+Rn.circles).data(t.filter(e["is"+fo(n)+"Type"].bind(e))).attr("class",s);c.exit().remove(),c.enter().append("g").attr("class",s)}else{var l=u.selectAll("."+Rn["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("."+Rn.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?"visible":"hidden"),i.subchart_show&&(o.event&&"zoom"===o.event.type&&r.brush.update(),t&&(co(r)||r.brush.update(),Object.keys(n.type).forEach((function(t){var i=fo(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 u=n.pos.cx,c=r.updateCircleY(!0);r.updateCircle(!0),r.redrawCircle(u,c,s,void 0,!0)}},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("."+Rn.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(Na(r))r=r.bind(t.api)(t.getXDomain(t.data.targets),n.subX);else if(t.axis.isTimeSeries()&&r.every(isNaN)){var i=To.bind(t);r=r.map((function(t){return n.subX(i(t))}))}return r}},Fh={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,r=e.$el.main,i=n.zoom_enabled,a=r.select("."+Rn.eventRects);i&&t?!n.subchart_show&&e.bindZoomOnEventRect(a,n.zoom_type):!1===t&&(e.api.unzoom(),a.on(".zoom",null).on(".drag",null))},generateZoom:function(){var t=this,e=t.config,n=t.org,r=t.scale,i=function(){function t(t){t.property("__zoom",kh).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 mh(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 mh(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 mh(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=$n(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)],pi(this),u.start()}Ah(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(Ah(t),!u.moved){var e=t.clientX-h,r=t.clientY-d;u.moved=e*e+r*r>E}u.event(t).zoom("mouse",x(n(u.that.__zoom,u.mouse[0]=$n(t,f),u.mouse[1]),u.extent,w))}function r(t){c.on("mousemove.zoom mouseup.zoom",null),Qn(t.view,u.moved),Ah(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=Cn(t.view).on("mousemove.zoom",e,!0).on("mouseup.zoom",r,!0),l=$n(t,f),f=t.currentTarget,h=t.clientX,d=t.clientY;Jn(t.view),Th(t),u.mouse=[l,this.__zoom.invert(l)],pi(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=$n(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);Ah(r),T>0?Cn(this).transition().duration(T).call(i,h,c,r):Cn(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(Th(t),o=0;o<l;++o)u=[u=$n(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)),pi(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(Ah(t),s=0;s<d;++s)c=$n(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(Th(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=$n(o,this),Math.hypot(g[0]-o[0],g[1]-o[1])<k)){var l=Cn(this).on("dblclick.zoom");l&&l.apply(this,arguments)}}}var d,g,p,v=Sh,y=Eh,x=Ch,_=Mh,m=Oh,b=[0,1/0],w=[[-1/0,-1/0],[1/0,1/0]],T=250,A=yh,S=qn("start","zoom","end"),E=0,k=10;return t.transform=function(t,e,n,r){var o=t.selection?t.selection():t;o.property("__zoom",kh),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(bh.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=Cn(this.that).datum();S.call(e,this.that,new _h(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:xh(+e),t):_},t.filter=function(e){return arguments.length?(v="function"==typeof e?e:xh(!!e),t):v},t.touchable=function(e){return arguments.length?(m="function"==typeof e?e:xh(!!e),t):m},t.extent=function(e){return arguments.length?(y="function"==typeof e?e:xh([[+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?(E=(e=+e)*e,t):Math.sqrt(E)},t.tapDistance=function(e){return arguments.length?(k=+e,t):k},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=Ga(t.scale.x.orgDomain())/Ga(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),r.zoom=t.getCustomizedScale(a),t.axis.x.scale(r.zoom),s&&(!n.xScale&&(n.xScale=r.x.copy()),r.x.domain(o))},t.zoom=i},onZoomStart:function(t){var e=this,n=t.sourceEvent;n&&(e.zoom.startEvent=n,e.state.zooming=!0,Qa(e.config.zoom_onzoomstart,e.api,t))},onZoom:function(t){var e=this,n=e.config,r=e.scale,i=e.org,a=t.sourceEvent;if(n.zoom_enabled&&t.sourceEvent&&0!==e.filterTargetsToShow(e.data.targets).length&&(r.zoom||!(a.type.indexOf("touch")>-1)||1!==a.touches.length)){var o="mousemove"===a.type,s=a.wheelDelta<0,u=t.transform;!o&&s&&r.x.domain().every((function(t,e){return t!==i.xDomain[e]}))&&r.x.domain(i.xDomain),e.zoom.updateTransformScale(u),e.axis.isCategorized()&&r.x.orgDomain()[0]===i.xDomain[0]&&r.x.domain([i.xDomain[0]-1e-10,r.x.orgDomain()[1]]),e.redraw({withTransition:!1,withY:n.zoom_rescale,withSubchart:!1,withEventRect:!1,withDimension:!1}),e.state.cancelClick=o,Qa(n.zoom_onzoom,e.api,r.zoom.domain())}},onZoomEnd:function(t){var e=this,n=e.config,r=e.scale,i=e.zoom.startEvent,a=t&&t.sourceEvent;i&&i.type.indexOf("touch")>-1&&(i=i.changedTouches[0],a=a.changedTouches[0]),!i||a&&i.clientX===a.clientX&&i.clientY===a.clientY||(e.redrawEventRect(),e.updateZoom(),e.state.zooming=!1,Qa(n.zoom_onzoomend,e.api,r[r.zoom?"zoom":"subX"].domain()))},getZoomDomain:function(){var t=this.config,e=this.org.xDomain,n=e[0],r=e[1];return $a(t.zoom_x_min)&&(n=_o("min",[n,t.zoom_x_min])),$a(t.zoom_x_max)&&(r=_o("max",[r,t.zoom_x_max])),[n,r]},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(t,e){var n=this,r="drag"===e?n.zoomBehaviour:n.zoom;n.$el.svg.on("wheel",(function(){})),t.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=ls().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",Rn.zoomBrush).attr("width",i?r.width:0).attr("height",i?0:r.height)),a=io(n,this)[s.index],o=a,t.attr(s.axis,a).attr(s.attr,0),e.onZoomStart(n)})).on("drag",(function(e){o=io(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;if(r.event=n,e.setDragStatus(!1),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.onZoomEnd(n);else if(e.isMultipleX())e.clickHandlerForMultipleXS.bind(this)(e);else{var c=io(n),l=c[0],f=c[1],h=Da.elementFromPoint(l,f);e.clickHandlerForSingleX.bind(h)(Cn(h).datum(),e)}}))},setZoomResetButton:function(){var t=this,e=t.config,n=e.zoom_resetButton;n&&"drag"===e.zoom_type&&(t.zoom.resetBtn?t.zoom.resetBtn.style("display",null):t.zoom.resetBtn=t.$el.chart.append("div").classed(Rn.button,!0).append("span").on("click",(function(){Na(n.onclick)&&n.onclick.bind(t.api)(this),t.api.unzoom()})).classed(Rn.buttonZoomReset,!0).text(n.text||"Reset Zoom"))}},Nh={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(){}},Xh={subchart_show:!1,subchart_size_height:60,subchart_axis_x_show:!0,subchart_axis_x_tick_show:!0,subchart_axis_x_tick_text_show:!0,subchart_onbrush:function(){}},jh={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},Bh=function(){return lo(tl.prototype,Ph),lo(sl.prototype,gh),ko.setOptions([Nh]),(Bh=function(){return!0})()},$h=function(){return lo(tl.prototype,zh),lo(sl.prototype,ph),ko.setOptions([Xh]),($h=function(){return!0})()},Uh=function(){return lo(tl.prototype,Fh),lo(sl.prototype,Lh),ko.setOptions([jh]),(Uh=function(){return!0})()},Yh={},Vh={version:"3.0.1",generate:function(t){var e=yo({},Yh,t),n=new sl(e);return n.internal.charts=this.instance,this.instance.push(n),n},defaults:function(t){return Ka(t)&&(Yh=t),Yh},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(382)}],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(383)}()})); |