HumanBreak/assets/common-legacy-bb6717a0.js
2023-04-28 16:00:59 +00:00

30 lines
308 KiB
JavaScript
Raw Blame History

This file contains ambiguous Unicode characters

This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

System.register(["./antdv-legacy-069f5173.js"],(function(t,e){"use strict";var n;return{setters:[t=>{n=t.c}],execute:function(){t({G:function(t,e){if("sin"===t)return f(e,(t=>(Math.cosh(2*t)-1)/(d-1)));if("tan"===t){const t=t=>1*Math.tanh(3*t)/g;return f(e,(e=>1-t(1-e)),t)}if("sec"===t){const t=t=>1/Math.cosh(t);return f(e,(e=>1-2*(t(e*p)-.5)))}throw new TypeError("Unexpected parameters are delivered in hyper timing function.")},H:function(t,e,...n){const i=[t].concat(n);i.push(e);const r=i.length,s=Array(r).fill(0).map(((t,e)=>u(e,r-1)));return t=>{const e=s.map(((e,n)=>e*i[n][0]*(1-t)**(r-n-1)*t**n)),n=s.map(((e,n)=>e*i[n][1]*(1-t)**(r-n-1)*t**n));return[c(...e),c(...n)]}},O:function(){return t=>t},R:async function(t){return new Promise((e=>setTimeout(e,t)))},c:function(t,e){if(!Number.isInteger(t))throw new TypeError("The first parameter of power timing function only allow integer.");return f(e,(e=>e**t))},q:function(...t){const e=[0].concat(t);e.push(1);const n=e.length,i=Array(n).fill(0).map(((t,e)=>u(e,n-1)));return t=>{const r=i.map(((i,r)=>i*e[r]*(1-t)**(n-r-1)*t**r));return c(...r)}}});var e=Object.defineProperty,i=(t,n,i)=>(((t,n,i)=>{n in t?e(t,n,{enumerable:!0,configurable:!0,writable:!0,value:i}):t[n]=i})(t,"symbol"!=typeof n?n+"":n,i),i);let r=[];const s=t=>{for(const n of r)if("running"===n.status)try{for(const e of n.funcs)e(t-n.startTime)}catch(e){n.destroy(),console.error(e)}requestAnimationFrame(s)};requestAnimationFrame(s);class o{constructor(){i(this,"funcs",[]),i(this,"status","stop"),i(this,"startTime",0),this.status="running",r.push(this),requestAnimationFrame((t=>this.startTime=t))}add(t,e=!1){return e?this.funcs.unshift(t):this.funcs.push(t),this}remove(t){const e=this.funcs.findIndex((e=>e===t));if(-1===e)throw new ReferenceError("You are going to remove nonexistent ticker function.");return this.funcs.splice(e,1),this}clear(){this.funcs=[]}destroy(){this.clear(),this.stop()}stop(){this.status="stop",r=r.filter((t=>t!==this))}}t("I",o);class a{constructor(){i(this,"timing"),i(this,"relation","absolute"),i(this,"easeTime",0),i(this,"applying",{}),i(this,"getTime",Date.now),i(this,"ticker",new o),i(this,"value",{}),i(this,"listener",{}),this.timing=t=>t}async all(){if(Object.values(this.applying).every((t=>!0===t)))throw new ReferenceError("There is no animates to be waited.");await new Promise((t=>{const e=()=>{Object.values(this.applying).every((t=>!1===t))&&(this.unlisten("end",e),t("all animated."))};this.listen("end",e)}))}async n(t){const e=Object.values(this.applying).filter((t=>!0===t)).length;if(e<t)throw new ReferenceError(`You are trying to wait ${t} animate, but there are only ${e} animate animating.`);let n=0;await new Promise((e=>{const i=()=>{n++,n===t&&(this.unlisten("end",i),e(`${t} animated.`))};this.listen("end",i)}))}async w(t){if(!1===this.applying[t])throw new ReferenceError(`The ${t} animate is not animating.`);await new Promise((e=>{const n=()=>{!1===this.applying[t]&&(this.unlisten("end",n),e(`${t} animated.`))};this.listen("end",n)}))}listen(t,e){var n;null!=(n=this.listener)[t]||(n[t]=[]),this.listener[t].push(e)}unlisten(t,e){const n=this.listener[t].findIndex((t=>t===e));if(-1===n)throw new ReferenceError("You are trying to remove a nonexistent listener.");this.listener[t].splice(n,1)}hook(...t){const e=Object.entries(this.listener).filter((e=>t.includes(e[0])));for(const[n,i]of e)for(const t of i)t(this,n)}}function l(t){return null!=t}t("Y",class extends a{constructor(){super(),i(this,"shakeTiming"),i(this,"path"),i(this,"multiTiming"),i(this,"value",{}),i(this,"size",1),i(this,"angle",0),i(this,"targetValue",{system:{move:[0,0],moveAs:[0,0],resize:0,rotate:0,shake:0,"@@bind":[]},custom:{}}),i(this,"animateFn",{system:{move:[()=>0,()=>0],moveAs:()=>0,resize:()=>0,rotate:()=>0,shake:()=>0,"@@bind":()=>0},custom:{}}),i(this,"ox",0),i(this,"oy",0),i(this,"sx",0),i(this,"sy",0),i(this,"bindInfo",[]),this.timing=t=>t,this.shakeTiming=t=>t,this.multiTiming=t=>[t,t],this.path=t=>[t,t],this.applying={move:!1,scale:!1,rotate:!1,shake:!1},this.ticker.add((()=>{const{running:t}=this.listener;if(l(t))for(const e of t)e(this,"running")}))}get x(){return this.ox+this.sx}get y(){return this.oy+this.sy}mode(t,e=!1){return"number"==typeof t(0)?e?this.shakeTiming=t:this.timing=t:this.multiTiming=t,this}time(t){return this.easeTime=t,this}relative(){return this.relation="relative",this}absolute(){return this.relation="absolute",this}bind(...t){return!0===this.applying["@@bind"]&&this.end(!1,"@@bind"),this.bindInfo=t,this}unbind(){return!0===this.applying["@@bind"]&&this.end(!1,"@@bind"),this.bindInfo=[],this}move(t,e){return this.applying.move&&this.end(!0,"move"),this.applySys("ox",t,"move"),this.applySys("oy",e,"move"),this}rotate(t){return this.applySys("angle",t,"rotate"),this}scale(t){return this.applySys("size",t,"resize"),this}shake(t,e){!0===this.applying.shake&&this.end(!0,"shake"),this.applying.shake=!0;const{easeTime:n,shakeTiming:i}=this,r=this.getTime();this.hook("start","shakestart");const s=()=>{const o=this.getTime()-r;o>n&&(this.ticker.remove(s),this.applying.shake=!1,this.sx=0,this.sy=0,this.hook("end","shakeend"));const a=i(o/n);this.sx=a*t,this.sy=a*e};return this.ticker.add(s),this.animateFn.system.shake=s,this}moveAs(t){this.applying.moveAs&&this.end(!0,"moveAs"),this.applying.moveAs=!0,this.path=t;const{easeTime:e,relation:n,timing:i}=this,r=this.getTime(),[s,o]=[this.x,this.y],[a,l]=(()=>{if("absolute"===n)return t(1);{const[e,n]=t(1);return[s+e,o+n]}})();this.hook("start","movestart");const c=()=>{const a=this.getTime()-r;if(a>e)return void this.end(!0,"moveAs");const l=a/e,[c,h]=t(i(l));"absolute"===n?(this.ox=c,this.oy=h):(this.ox=s+c,this.oy=o+h)};return this.ticker.add(c,!0),this.animateFn.system.moveAs=c,this.targetValue.system.moveAs=[a,l],this}register(t,e){if("number"==typeof this.value[t])return this.error(`Property ${t} has been regietered twice.`,"reregister");this.value[t]=e,this.applying[t]=!1}apply(t,e,n=!1){!0===this.applying[t]&&this.end(!1,t),t in this.value||this.error(`You are trying to execute nonexistent property ${t}.`),this.applying[t]=!0;const i=this.value[t],r=this.getTime(),{timing:s,relation:o,easeTime:a}=this,l="absolute"===o?e-i:e;this.hook("start");const c=()=>{const e=this.getTime()-r;if(e>a)return void this.end(!1,t);const n=s(e/a);this.value[t]=i+n*l};return this.ticker.add(c,n),this.animateFn.custom[t]=c,this.targetValue.custom[t]=l+i,this}applyMulti(t=!1){!0===this.applying["@@bind"]&&this.end(!1,"@@bind"),this.applying["@@bind"]=!0;const e=this.bindInfo,n=e.map((t=>this.value[t])),i=this.getTime(),{multiTiming:r,relation:s,easeTime:o}=this,a=r(1);if(a.length!==n.length)throw new TypeError(`The number of binded animate attributes and timing function returns's length does not match. binded: ${e.length}, timing: ${a.length}`);this.hook("start");const l=()=>{const t=this.getTime()-i;if(t>o)return void this.end(!1,"@@bind");const a=r(t/o);e.forEach(((t,e)=>{this.value[t]="absolute"===s?a[e]:n[e]+a[e]}))};return this.ticker.add(l,t),this.animateFn.custom["@@bind"]=l,this.targetValue.system["@@bind"]=a,this}applySys(t,e,n){"move"!==n&&!0===this.applying[n]&&this.end(!0,n),this.applying[n]=!0;const i=this[t],r=this.getTime(),s=this.timing,o=this.relation,a=this.easeTime,l="absolute"===o?e-i:e;this.hook("start",`${n}start`);const c=()=>{const e=this.getTime()-r;if(e>a)return void this.end(!0,n);const o=s(e/a);this[t]=i+l*o,"oy"!==t&&this.hook(n)};this.ticker.add(c,!0),"ox"===t?this.animateFn.system.move[0]=c:"oy"===t?this.animateFn.system.move[1]=c:this.animateFn.system[n]=c,"move"===n?("ox"===t&&(this.targetValue.system.move[0]=l+i),"oy"===t&&(this.targetValue.system.move[1]=l+i)):"shake"!==n&&(this.targetValue.system[n]=l+i)}error(t,e){throw"repeat"===e?new Error(`Cannot execute the same animation twice. Info: ${t}`):"reregister"===e?new Error(`Cannot register a animated property twice. Info: ${t}`):new Error(t)}end(t,e){if(!0===t)if(this.applying[e]=!1,"move"===e?(this.ticker.remove(this.animateFn.system.move[0]),this.ticker.remove(this.animateFn.system.move[1])):"moveAs"===e?this.ticker.remove(this.animateFn.system.moveAs):"@@bind"===e?this.ticker.remove(this.animateFn.system["@@bind"]):this.ticker.remove(this.animateFn.system[e]),"move"===e){const[t,e]=this.targetValue.system.move;this.ox=t,this.oy=e,this.hook("moveend","end")}else if("moveAs"===e){const[t,e]=this.targetValue.system.moveAs;this.ox=t,this.oy=e,this.hook("moveend","end")}else"rotate"===e?(this.angle=this.targetValue.system.rotate,this.hook("rotateend","end")):"resize"===e?(this.size=this.targetValue.system.resize,this.hook("resizeend","end")):"@@bind"===e?this.bindInfo.forEach(((t,e)=>{this.value[t]=this.targetValue.system["@@bind"][e]})):(this.sx=0,this.sy=0,this.hook("shakeend","end"));else this.applying[e]=!1,this.ticker.remove(this.animateFn.custom[e]),this.value[e]=this.targetValue.custom[e],this.hook("end")}}),t("j",class extends a{constructor(){super(),i(this,"now",{}),i(this,"target",{}),i(this,"transitionFn",{}),i(this,"value"),i(this,"handleSet",((t,e,n)=>(this.transition(e,n),!0))),i(this,"handleGet",((t,e)=>this.now[e])),this.timing=t=>t,this.value=new Proxy(this.target,{set:this.handleSet,get:this.handleGet})}mode(t){return this.timing=t,this}time(t){return this.easeTime=t,this}relative(){return this.relation="relative",this}absolute(){return this.relation="absolute",this}transition(t,e){if(e===this.target[t])return this;if(!l(this.now[t]))return this.now[t]=e,this;this.applying[t]&&this.end(t,!0),this.applying[t]=!0,this.hook("start");const n=this.getTime(),i=this.easeTime,r=this.timing,s=this.now[t],o=e+("absolute"===this.relation?0:s),a=o-s;this.target[t]=o;const c=()=>{const e=this.getTime()-n;e>=i&&this.end(t);const o=e/i;this.now[t]=r(o)*a+s,this.hook("running")};return this.transitionFn[t]=c,this.ticker.add(c),this}end(t,e=!1){if(!l(this.transitionFn[t]))throw new ReferenceError(`You are trying to end an ended transition: ${t}`);this.ticker.remove(this.transitionFn[t]),delete this.transitionFn[t],this.applying[t]=!1,this.hook("end"),e||(this.now[t]=this.target[t])}});const c=(...t)=>t.reduce(((t,e)=>t+e),0),h=t=>{if(0===t)return 1;let e=t;for(;t>1;)e*=--t;return e},u=(t,e)=>Math.round(h(e)/(h(t)*h(e-t))),f=(t,e,n=(t=>1-e(1-t)))=>"in"===t?e:"out"===t?n:"in-out"===t?t=>t<.5?e(2*t)/2:.5+n(2*(t-.5))/2:t=>t<.5?n(2*t)/2:.5+e(2*(t-.5))/2,d=Math.cosh(2),p=Math.acosh(2),g=Math.tanh(3);var m=t("l",{}),b={get exports(){return m},set exports(e){t("l",m=e)}};function _(t,e){return function(){return t.apply(e,arguments)}}
/**
* @license
* Lodash <https://lodash.com/>
* Copyright OpenJS Foundation and other contributors <https://openjsf.org/>
* Released under MIT license <https://lodash.com/license>
* Based on Underscore.js 1.8.3 <http://underscorejs.org/LICENSE>
* Copyright Jeremy Ashkenas, DocumentCloud and Investigative Reporters & Editors
*/
!function(t,e){(function(){var i,r="Expected a function",s="__lodash_hash_undefined__",o="__lodash_placeholder__",a=16,l=32,c=64,h=128,u=256,f=1/0,d=9007199254740991,p=NaN,g=4294967295,m=[["ary",h],["bind",1],["bindKey",2],["curry",8],["curryRight",a],["flip",512],["partial",l],["partialRight",c],["rearg",u]],b="[object Arguments]",_="[object Array]",y="[object Boolean]",x="[object Date]",v="[object Error]",w="[object Function]",k="[object GeneratorFunction]",M="[object Map]",S="[object Number]",O="[object Object]",A="[object Promise]",P="[object RegExp]",E="[object Set]",T="[object String]",C="[object Symbol]",D="[object WeakMap]",R="[object ArrayBuffer]",L="[object DataView]",I="[object Float32Array]",F="[object Float64Array]",z="[object Int8Array]",j="[object Int16Array]",B="[object Int32Array]",N="[object Uint8Array]",V="[object Uint8ClampedArray]",W="[object Uint16Array]",H="[object Uint32Array]",U=/\b__p \+= '';/g,$=/\b(__p \+=) '' \+/g,Y=/(__e\(.*?\)|\b__t\)) \+\n'';/g,q=/&(?:amp|lt|gt|quot|#39);/g,X=/[&<>"']/g,K=RegExp(q.source),J=RegExp(X.source),G=/<%-([\s\S]+?)%>/g,Z=/<%([\s\S]+?)%>/g,Q=/<%=([\s\S]+?)%>/g,tt=/\.|\[(?:[^[\]]*|(["'])(?:(?!\1)[^\\]|\\.)*?\1)\]/,et=/^\w*$/,nt=/[^.[\]]+|\[(?:(-?\d+(?:\.\d+)?)|(["'])((?:(?!\2)[^\\]|\\.)*?)\2)\]|(?=(?:\.|\[\])(?:\.|\[\]|$))/g,it=/[\\^$.*+?()[\]{}|]/g,rt=RegExp(it.source),st=/^\s+/,ot=/\s/,at=/\{(?:\n\/\* \[wrapped with .+\] \*\/)?\n?/,lt=/\{\n\/\* \[wrapped with (.+)\] \*/,ct=/,? & /,ht=/[^\x00-\x2f\x3a-\x40\x5b-\x60\x7b-\x7f]+/g,ut=/[()=,{}\[\]\/\s]/,ft=/\\(\\)?/g,dt=/\$\{([^\\}]*(?:\\.[^\\}]*)*)\}/g,pt=/\w*$/,gt=/^[-+]0x[0-9a-f]+$/i,mt=/^0b[01]+$/i,bt=/^\[object .+?Constructor\]$/,_t=/^0o[0-7]+$/i,yt=/^(?:0|[1-9]\d*)$/,xt=/[\xc0-\xd6\xd8-\xf6\xf8-\xff\u0100-\u017f]/g,vt=/($^)/,wt=/['\n\r\u2028\u2029\\]/g,kt="\\ud800-\\udfff",Mt="\\u0300-\\u036f\\ufe20-\\ufe2f\\u20d0-\\u20ff",St="\\u2700-\\u27bf",Ot="a-z\\xdf-\\xf6\\xf8-\\xff",At="A-Z\\xc0-\\xd6\\xd8-\\xde",Pt="\\ufe0e\\ufe0f",Et="\\xac\\xb1\\xd7\\xf7\\x00-\\x2f\\x3a-\\x40\\x5b-\\x60\\x7b-\\xbf\\u2000-\\u206f \\t\\x0b\\f\\xa0\\ufeff\\n\\r\\u2028\\u2029\\u1680\\u180e\\u2000\\u2001\\u2002\\u2003\\u2004\\u2005\\u2006\\u2007\\u2008\\u2009\\u200a\\u202f\\u205f\\u3000",Tt="[']",Ct="["+kt+"]",Dt="["+Et+"]",Rt="["+Mt+"]",Lt="\\d+",It="["+St+"]",Ft="["+Ot+"]",zt="[^"+kt+Et+Lt+St+Ot+At+"]",jt="\\ud83c[\\udffb-\\udfff]",Bt="[^"+kt+"]",Nt="(?:\\ud83c[\\udde6-\\uddff]){2}",Vt="[\\ud800-\\udbff][\\udc00-\\udfff]",Wt="["+At+"]",Ht="\\u200d",Ut="(?:"+Ft+"|"+zt+")",$t="(?:"+Wt+"|"+zt+")",Yt="(?:['](?:d|ll|m|re|s|t|ve))?",qt="(?:['](?:D|LL|M|RE|S|T|VE))?",Xt="(?:"+Rt+"|"+jt+")?",Kt="["+Pt+"]?",Jt=Kt+Xt+"(?:"+Ht+"(?:"+[Bt,Nt,Vt].join("|")+")"+Kt+Xt+")*",Gt="(?:"+[It,Nt,Vt].join("|")+")"+Jt,Zt="(?:"+[Bt+Rt+"?",Rt,Nt,Vt,Ct].join("|")+")",Qt=RegExp(Tt,"g"),te=RegExp(Rt,"g"),ee=RegExp(jt+"(?="+jt+")|"+Zt+Jt,"g"),ne=RegExp([Wt+"?"+Ft+"+"+Yt+"(?="+[Dt,Wt,"$"].join("|")+")",$t+"+"+qt+"(?="+[Dt,Wt+Ut,"$"].join("|")+")",Wt+"?"+Ut+"+"+Yt,Wt+"+"+qt,"\\d*(?:1ST|2ND|3RD|(?![123])\\dTH)(?=\\b|[a-z_])","\\d*(?:1st|2nd|3rd|(?![123])\\dth)(?=\\b|[A-Z_])",Lt,Gt].join("|"),"g"),ie=RegExp("["+Ht+kt+Mt+Pt+"]"),re=/[a-z][A-Z]|[A-Z]{2}[a-z]|[0-9][a-zA-Z]|[a-zA-Z][0-9]|[^a-zA-Z0-9 ]/,se=["Array","Buffer","DataView","Date","Error","Float32Array","Float64Array","Function","Int8Array","Int16Array","Int32Array","Map","Math","Object","Promise","RegExp","Set","String","Symbol","TypeError","Uint8Array","Uint8ClampedArray","Uint16Array","Uint32Array","WeakMap","_","clearTimeout","isFinite","parseInt","setTimeout"],oe=-1,ae={};ae[I]=ae[F]=ae[z]=ae[j]=ae[B]=ae[N]=ae[V]=ae[W]=ae[H]=!0,ae[b]=ae[_]=ae[R]=ae[y]=ae[L]=ae[x]=ae[v]=ae[w]=ae[M]=ae[S]=ae[O]=ae[P]=ae[E]=ae[T]=ae[D]=!1;var le={};le[b]=le[_]=le[R]=le[L]=le[y]=le[x]=le[I]=le[F]=le[z]=le[j]=le[B]=le[M]=le[S]=le[O]=le[P]=le[E]=le[T]=le[C]=le[N]=le[V]=le[W]=le[H]=!0,le[v]=le[w]=le[D]=!1;var ce={"\\":"\\","'":"'","\n":"n","\r":"r","\u2028":"u2028","\u2029":"u2029"},he=parseFloat,ue=parseInt,fe="object"==typeof n&&n&&n.Object===Object&&n,de="object"==typeof self&&self&&self.Object===Object&&self,pe=fe||de||Function("return this")(),ge=e&&!e.nodeType&&e,me=ge&&t&&!t.nodeType&&t,be=me&&me.exports===ge,_e=be&&fe.process,ye=function(){try{var t=me&&me.require&&me.require("util").types;return t||_e&&_e.binding&&_e.binding("util")}catch(e){}}(),xe=ye&&ye.isArrayBuffer,ve=ye&&ye.isDate,we=ye&&ye.isMap,ke=ye&&ye.isRegExp,Me=ye&&ye.isSet,Se=ye&&ye.isTypedArray;function Oe(t,e,n){switch(n.length){case 0:return t.call(e);case 1:return t.call(e,n[0]);case 2:return t.call(e,n[0],n[1]);case 3:return t.call(e,n[0],n[1],n[2])}return t.apply(e,n)}function Ae(t,e,n,i){for(var r=-1,s=null==t?0:t.length;++r<s;){var o=t[r];e(i,o,n(o),t)}return i}function Pe(t,e){for(var n=-1,i=null==t?0:t.length;++n<i&&!1!==e(t[n],n,t););return t}function Ee(t,e){for(var n=null==t?0:t.length;n--&&!1!==e(t[n],n,t););return t}function Te(t,e){for(var n=-1,i=null==t?0:t.length;++n<i;)if(!e(t[n],n,t))return!1;return!0}function Ce(t,e){for(var n=-1,i=null==t?0:t.length,r=0,s=[];++n<i;){var o=t[n];e(o,n,t)&&(s[r++]=o)}return s}function De(t,e){return!(null==t||!t.length)&&We(t,e,0)>-1}function Re(t,e,n){for(var i=-1,r=null==t?0:t.length;++i<r;)if(n(e,t[i]))return!0;return!1}function Le(t,e){for(var n=-1,i=null==t?0:t.length,r=Array(i);++n<i;)r[n]=e(t[n],n,t);return r}function Ie(t,e){for(var n=-1,i=e.length,r=t.length;++n<i;)t[r+n]=e[n];return t}function Fe(t,e,n,i){var r=-1,s=null==t?0:t.length;for(i&&s&&(n=t[++r]);++r<s;)n=e(n,t[r],r,t);return n}function ze(t,e,n,i){var r=null==t?0:t.length;for(i&&r&&(n=t[--r]);r--;)n=e(n,t[r],r,t);return n}function je(t,e){for(var n=-1,i=null==t?0:t.length;++n<i;)if(e(t[n],n,t))return!0;return!1}var Be=Ye("length");function Ne(t,e,n){var i;return n(t,(function(t,n,r){if(e(t,n,r))return i=n,!1})),i}function Ve(t,e,n,i){for(var r=t.length,s=n+(i?1:-1);i?s--:++s<r;)if(e(t[s],s,t))return s;return-1}function We(t,e,n){return e==e?function(t,e,n){for(var i=n-1,r=t.length;++i<r;)if(t[i]===e)return i;return-1}(t,e,n):Ve(t,Ue,n)}function He(t,e,n,i){for(var r=n-1,s=t.length;++r<s;)if(i(t[r],e))return r;return-1}function Ue(t){return t!=t}function $e(t,e){var n=null==t?0:t.length;return n?Ke(t,e)/n:p}function Ye(t){return function(e){return null==e?i:e[t]}}function qe(t){return function(e){return null==t?i:t[e]}}function Xe(t,e,n,i,r){return r(t,(function(t,r,s){n=i?(i=!1,t):e(n,t,r,s)})),n}function Ke(t,e){for(var n,r=-1,s=t.length;++r<s;){var o=e(t[r]);o!==i&&(n=n===i?o:n+o)}return n}function Je(t,e){for(var n=-1,i=Array(t);++n<t;)i[n]=e(n);return i}function Ge(t){return t?t.slice(0,gn(t)+1).replace(st,""):t}function Ze(t){return function(e){return t(e)}}function Qe(t,e){return Le(e,(function(e){return t[e]}))}function tn(t,e){return t.has(e)}function en(t,e){for(var n=-1,i=t.length;++n<i&&We(e,t[n],0)>-1;);return n}function nn(t,e){for(var n=t.length;n--&&We(e,t[n],0)>-1;);return n}var rn=qe({"À":"A","Á":"A","Â":"A","Ã":"A","Ä":"A","Å":"A","à":"a","á":"a","â":"a","ã":"a","ä":"a","å":"a","Ç":"C","ç":"c","Ð":"D","ð":"d","È":"E","É":"E","Ê":"E","Ë":"E","è":"e","é":"e","ê":"e","ë":"e","Ì":"I","Í":"I","Î":"I","Ï":"I","ì":"i","í":"i","î":"i","ï":"i","Ñ":"N","ñ":"n","Ò":"O","Ó":"O","Ô":"O","Õ":"O","Ö":"O","Ø":"O","ò":"o","ó":"o","ô":"o","õ":"o","ö":"o","ø":"o","Ù":"U","Ú":"U","Û":"U","Ü":"U","ù":"u","ú":"u","û":"u","ü":"u","Ý":"Y","ý":"y","ÿ":"y","Æ":"Ae","æ":"ae","Þ":"Th","þ":"th","ß":"ss","Ā":"A","Ă":"A","Ą":"A","ā":"a","ă":"a","ą":"a","Ć":"C","Ĉ":"C","Ċ":"C","Č":"C","ć":"c","ĉ":"c","ċ":"c","č":"c","Ď":"D","Đ":"D","ď":"d","đ":"d","Ē":"E","Ĕ":"E","Ė":"E","Ę":"E","Ě":"E","ē":"e","ĕ":"e","ė":"e","ę":"e","ě":"e","Ĝ":"G","Ğ":"G","Ġ":"G","Ģ":"G","ĝ":"g","ğ":"g","ġ":"g","ģ":"g","Ĥ":"H","Ħ":"H","ĥ":"h","ħ":"h","Ĩ":"I","Ī":"I","Ĭ":"I","Į":"I","İ":"I","ĩ":"i","ī":"i","ĭ":"i","į":"i","ı":"i","Ĵ":"J","ĵ":"j","Ķ":"K","ķ":"k","ĸ":"k","Ĺ":"L","Ļ":"L","Ľ":"L","Ŀ":"L","Ł":"L","ĺ":"l","ļ":"l","ľ":"l","ŀ":"l","ł":"l","Ń":"N","Ņ":"N","Ň":"N","Ŋ":"N","ń":"n","ņ":"n","ň":"n","ŋ":"n","Ō":"O","Ŏ":"O","Ő":"O","ō":"o","ŏ":"o","ő":"o","Ŕ":"R","Ŗ":"R","Ř":"R","ŕ":"r","ŗ":"r","ř":"r","Ś":"S","Ŝ":"S","Ş":"S","Š":"S","ś":"s","ŝ":"s","ş":"s","š":"s","Ţ":"T","Ť":"T","Ŧ":"T","ţ":"t","ť":"t","ŧ":"t","Ũ":"U","Ū":"U","Ŭ":"U","Ů":"U","Ű":"U","Ų":"U","ũ":"u","ū":"u","ŭ":"u","ů":"u","ű":"u","ų":"u","Ŵ":"W","ŵ":"w","Ŷ":"Y","ŷ":"y","Ÿ":"Y","Ź":"Z","Ż":"Z","Ž":"Z","ź":"z","ż":"z","ž":"z","IJ":"IJ","ij":"ij","Œ":"Oe","œ":"oe","ʼn":"'n","ſ":"s"}),sn=qe({"&":"&amp;","<":"&lt;",">":"&gt;",'"':"&quot;","'":"&#39;"});function on(t){return"\\"+ce[t]}function an(t){return ie.test(t)}function ln(t){var e=-1,n=Array(t.size);return t.forEach((function(t,i){n[++e]=[i,t]})),n}function cn(t,e){return function(n){return t(e(n))}}function hn(t,e){for(var n=-1,i=t.length,r=0,s=[];++n<i;){var a=t[n];a!==e&&a!==o||(t[n]=o,s[r++]=n)}return s}function un(t){var e=-1,n=Array(t.size);return t.forEach((function(t){n[++e]=t})),n}function fn(t){var e=-1,n=Array(t.size);return t.forEach((function(t){n[++e]=[t,t]})),n}function dn(t){return an(t)?function(t){for(var e=ee.lastIndex=0;ee.test(t);)++e;return e}(t):Be(t)}function pn(t){return an(t)?function(t){return t.match(ee)||[]}(t):function(t){return t.split("")}(t)}function gn(t){for(var e=t.length;e--&&ot.test(t.charAt(e)););return e}var mn=qe({"&amp;":"&","&lt;":"<","&gt;":">","&quot;":'"',"&#39;":"'"}),bn=function t(e){var n=(e=null==e?pe:bn.defaults(pe.Object(),e,bn.pick(pe,se))).Array,ot=e.Date,kt=e.Error,Mt=e.Function,St=e.Math,Ot=e.Object,At=e.RegExp,Pt=e.String,Et=e.TypeError,Tt=n.prototype,Ct=Mt.prototype,Dt=Ot.prototype,Rt=e["__core-js_shared__"],Lt=Ct.toString,It=Dt.hasOwnProperty,Ft=0,zt=function(){var t=/[^.]+$/.exec(Rt&&Rt.keys&&Rt.keys.IE_PROTO||"");return t?"Symbol(src)_1."+t:""}(),jt=Dt.toString,Bt=Lt.call(Ot),Nt=pe._,Vt=At("^"+Lt.call(It).replace(it,"\\$&").replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g,"$1.*?")+"$"),Wt=be?e.Buffer:i,Ht=e.Symbol,Ut=e.Uint8Array,$t=Wt?Wt.allocUnsafe:i,Yt=cn(Ot.getPrototypeOf,Ot),qt=Ot.create,Xt=Dt.propertyIsEnumerable,Kt=Tt.splice,Jt=Ht?Ht.isConcatSpreadable:i,Gt=Ht?Ht.iterator:i,Zt=Ht?Ht.toStringTag:i,ee=function(){try{var t=us(Ot,"defineProperty");return t({},"",{}),t}catch(e){}}(),ie=e.clearTimeout!==pe.clearTimeout&&e.clearTimeout,ce=ot&&ot.now!==pe.Date.now&&ot.now,fe=e.setTimeout!==pe.setTimeout&&e.setTimeout,de=St.ceil,ge=St.floor,me=Ot.getOwnPropertySymbols,_e=Wt?Wt.isBuffer:i,ye=e.isFinite,Be=Tt.join,qe=cn(Ot.keys,Ot),_n=St.max,yn=St.min,xn=ot.now,vn=e.parseInt,wn=St.random,kn=Tt.reverse,Mn=us(e,"DataView"),Sn=us(e,"Map"),On=us(e,"Promise"),An=us(e,"Set"),Pn=us(e,"WeakMap"),En=us(Ot,"create"),Tn=Pn&&new Pn,Cn={},Dn=zs(Mn),Rn=zs(Sn),Ln=zs(On),In=zs(An),Fn=zs(Pn),zn=Ht?Ht.prototype:i,jn=zn?zn.valueOf:i,Bn=zn?zn.toString:i;function Nn(t){if(ea(t)&&!Uo(t)&&!(t instanceof Un)){if(t instanceof Hn)return t;if(It.call(t,"__wrapped__"))return js(t)}return new Hn(t)}var Vn=function(){function t(){}return function(e){if(!ta(e))return{};if(qt)return qt(e);t.prototype=e;var n=new t;return t.prototype=i,n}}();function Wn(){}function Hn(t,e){this.__wrapped__=t,this.__actions__=[],this.__chain__=!!e,this.__index__=0,this.__values__=i}function Un(t){this.__wrapped__=t,this.__actions__=[],this.__dir__=1,this.__filtered__=!1,this.__iteratees__=[],this.__takeCount__=g,this.__views__=[]}function $n(t){var e=-1,n=null==t?0:t.length;for(this.clear();++e<n;){var i=t[e];this.set(i[0],i[1])}}function Yn(t){var e=-1,n=null==t?0:t.length;for(this.clear();++e<n;){var i=t[e];this.set(i[0],i[1])}}function qn(t){var e=-1,n=null==t?0:t.length;for(this.clear();++e<n;){var i=t[e];this.set(i[0],i[1])}}function Xn(t){var e=-1,n=null==t?0:t.length;for(this.__data__=new qn;++e<n;)this.add(t[e])}function Kn(t){var e=this.__data__=new Yn(t);this.size=e.size}function Jn(t,e){var n=Uo(t),i=!n&&Ho(t),r=!n&&!i&&Xo(t),s=!n&&!i&&!r&&ca(t),o=n||i||r||s,a=o?Je(t.length,Pt):[],l=a.length;for(var c in t)!e&&!It.call(t,c)||o&&("length"==c||r&&("offset"==c||"parent"==c)||s&&("buffer"==c||"byteLength"==c||"byteOffset"==c)||_s(c,l))||a.push(c);return a}function Gn(t){var e=t.length;return e?t[Xi(0,e-1)]:i}function Zn(t,e){return Ls(Er(t),ai(e,0,t.length))}function Qn(t){return Ls(Er(t))}function ti(t,e,n){(n!==i&&!No(t[e],n)||n===i&&!(e in t))&&si(t,e,n)}function ei(t,e,n){var r=t[e];It.call(t,e)&&No(r,n)&&(n!==i||e in t)||si(t,e,n)}function ni(t,e){for(var n=t.length;n--;)if(No(t[n][0],e))return n;return-1}function ii(t,e,n,i){return fi(t,(function(t,r,s){e(i,t,n(t),s)})),i}function ri(t,e){return t&&Tr(e,Ca(e),t)}function si(t,e,n){"__proto__"==e&&ee?ee(t,e,{configurable:!0,enumerable:!0,value:n,writable:!0}):t[e]=n}function oi(t,e){for(var r=-1,s=e.length,o=n(s),a=null==t;++r<s;)o[r]=a?i:Oa(t,e[r]);return o}function ai(t,e,n){return t==t&&(n!==i&&(t=t<=n?t:n),e!==i&&(t=t>=e?t:e)),t}function li(t,e,n,r,s,o){var a,l=1&e,c=2&e,h=4&e;if(n&&(a=s?n(t,r,s,o):n(t)),a!==i)return a;if(!ta(t))return t;var u=Uo(t);if(u){if(a=function(t){var e=t.length,n=new t.constructor(e);return e&&"string"==typeof t[0]&&It.call(t,"index")&&(n.index=t.index,n.input=t.input),n}(t),!l)return Er(t,a)}else{var f=ps(t),d=f==w||f==k;if(Xo(t))return kr(t,l);if(f==O||f==b||d&&!s){if(a=c||d?{}:ms(t),!l)return c?function(t,e){return Tr(t,ds(t),e)}(t,function(t,e){return t&&Tr(e,Da(e),t)}(a,t)):function(t,e){return Tr(t,fs(t),e)}(t,ri(a,t))}else{if(!le[f])return s?t:{};a=function(t,e,n){var i,r=t.constructor;switch(e){case R:return Mr(t);case y:case x:return new r(+t);case L:return function(t,e){var n=e?Mr(t.buffer):t.buffer;return new t.constructor(n,t.byteOffset,t.byteLength)}(t,n);case I:case F:case z:case j:case B:case N:case V:case W:case H:return Sr(t,n);case M:return new r;case S:case T:return new r(t);case P:return function(t){var e=new t.constructor(t.source,pt.exec(t));return e.lastIndex=t.lastIndex,e}(t);case E:return new r;case C:return i=t,jn?Ot(jn.call(i)):{}}}(t,f,l)}}o||(o=new Kn);var p=o.get(t);if(p)return p;o.set(t,a),oa(t)?t.forEach((function(i){a.add(li(i,e,n,i,t,o))})):na(t)&&t.forEach((function(i,r){a.set(r,li(i,e,n,r,t,o))}));var g=u?i:(h?c?rs:is:c?Da:Ca)(t);return Pe(g||t,(function(i,r){g&&(i=t[r=i]),ei(a,r,li(i,e,n,r,t,o))})),a}function ci(t,e,n){var r=n.length;if(null==t)return!r;for(t=Ot(t);r--;){var s=n[r],o=e[s],a=t[s];if(a===i&&!(s in t)||!o(a))return!1}return!0}function hi(t,e,n){if("function"!=typeof t)throw new Et(r);return Ts((function(){t.apply(i,n)}),e)}function ui(t,e,n,i){var r=-1,s=De,o=!0,a=t.length,l=[],c=e.length;if(!a)return l;n&&(e=Le(e,Ze(n))),i?(s=Re,o=!1):e.length>=200&&(s=tn,o=!1,e=new Xn(e));t:for(;++r<a;){var h=t[r],u=null==n?h:n(h);if(h=i||0!==h?h:0,o&&u==u){for(var f=c;f--;)if(e[f]===u)continue t;l.push(h)}else s(e,u,i)||l.push(h)}return l}Nn.templateSettings={escape:G,evaluate:Z,interpolate:Q,variable:"",imports:{_:Nn}},Nn.prototype=Wn.prototype,Nn.prototype.constructor=Nn,Hn.prototype=Vn(Wn.prototype),Hn.prototype.constructor=Hn,Un.prototype=Vn(Wn.prototype),Un.prototype.constructor=Un,$n.prototype.clear=function(){this.__data__=En?En(null):{},this.size=0},$n.prototype.delete=function(t){var e=this.has(t)&&delete this.__data__[t];return this.size-=e?1:0,e},$n.prototype.get=function(t){var e=this.__data__;if(En){var n=e[t];return n===s?i:n}return It.call(e,t)?e[t]:i},$n.prototype.has=function(t){var e=this.__data__;return En?e[t]!==i:It.call(e,t)},$n.prototype.set=function(t,e){var n=this.__data__;return this.size+=this.has(t)?0:1,n[t]=En&&e===i?s:e,this},Yn.prototype.clear=function(){this.__data__=[],this.size=0},Yn.prototype.delete=function(t){var e=this.__data__,n=ni(e,t);return!(n<0||(n==e.length-1?e.pop():Kt.call(e,n,1),--this.size,0))},Yn.prototype.get=function(t){var e=this.__data__,n=ni(e,t);return n<0?i:e[n][1]},Yn.prototype.has=function(t){return ni(this.__data__,t)>-1},Yn.prototype.set=function(t,e){var n=this.__data__,i=ni(n,t);return i<0?(++this.size,n.push([t,e])):n[i][1]=e,this},qn.prototype.clear=function(){this.size=0,this.__data__={hash:new $n,map:new(Sn||Yn),string:new $n}},qn.prototype.delete=function(t){var e=cs(this,t).delete(t);return this.size-=e?1:0,e},qn.prototype.get=function(t){return cs(this,t).get(t)},qn.prototype.has=function(t){return cs(this,t).has(t)},qn.prototype.set=function(t,e){var n=cs(this,t),i=n.size;return n.set(t,e),this.size+=n.size==i?0:1,this},Xn.prototype.add=Xn.prototype.push=function(t){return this.__data__.set(t,s),this},Xn.prototype.has=function(t){return this.__data__.has(t)},Kn.prototype.clear=function(){this.__data__=new Yn,this.size=0},Kn.prototype.delete=function(t){var e=this.__data__,n=e.delete(t);return this.size=e.size,n},Kn.prototype.get=function(t){return this.__data__.get(t)},Kn.prototype.has=function(t){return this.__data__.has(t)},Kn.prototype.set=function(t,e){var n=this.__data__;if(n instanceof Yn){var i=n.__data__;if(!Sn||i.length<199)return i.push([t,e]),this.size=++n.size,this;n=this.__data__=new qn(i)}return n.set(t,e),this.size=n.size,this};var fi=Rr(xi),di=Rr(vi,!0);function pi(t,e){var n=!0;return fi(t,(function(t,i,r){return n=!!e(t,i,r)})),n}function gi(t,e,n){for(var r=-1,s=t.length;++r<s;){var o=t[r],a=e(o);if(null!=a&&(l===i?a==a&&!la(a):n(a,l)))var l=a,c=o}return c}function mi(t,e){var n=[];return fi(t,(function(t,i,r){e(t,i,r)&&n.push(t)})),n}function bi(t,e,n,i,r){var s=-1,o=t.length;for(n||(n=bs),r||(r=[]);++s<o;){var a=t[s];e>0&&n(a)?e>1?bi(a,e-1,n,i,r):Ie(r,a):i||(r[r.length]=a)}return r}var _i=Lr(),yi=Lr(!0);function xi(t,e){return t&&_i(t,e,Ca)}function vi(t,e){return t&&yi(t,e,Ca)}function wi(t,e){return Ce(e,(function(e){return Go(t[e])}))}function ki(t,e){for(var n=0,r=(e=yr(e,t)).length;null!=t&&n<r;)t=t[Fs(e[n++])];return n&&n==r?t:i}function Mi(t,e,n){var i=e(t);return Uo(t)?i:Ie(i,n(t))}function Si(t){return null==t?t===i?"[object Undefined]":"[object Null]":Zt&&Zt in Ot(t)?function(t){var e=It.call(t,Zt),n=t[Zt];try{t[Zt]=i;var r=!0}catch(o){}var s=jt.call(t);return r&&(e?t[Zt]=n:delete t[Zt]),s}(t):function(t){return jt.call(t)}(t)}function Oi(t,e){return t>e}function Ai(t,e){return null!=t&&It.call(t,e)}function Pi(t,e){return null!=t&&e in Ot(t)}function Ei(t,e,r){for(var s=r?Re:De,o=t[0].length,a=t.length,l=a,c=n(a),h=1/0,u=[];l--;){var f=t[l];l&&e&&(f=Le(f,Ze(e))),h=yn(f.length,h),c[l]=!r&&(e||o>=120&&f.length>=120)?new Xn(l&&f):i}f=t[0];var d=-1,p=c[0];t:for(;++d<o&&u.length<h;){var g=f[d],m=e?e(g):g;if(g=r||0!==g?g:0,!(p?tn(p,m):s(u,m,r))){for(l=a;--l;){var b=c[l];if(!(b?tn(b,m):s(t[l],m,r)))continue t}p&&p.push(m),u.push(g)}}return u}function Ti(t,e,n){var r=null==(t=As(t,e=yr(e,t)))?t:t[Fs(Ks(e))];return null==r?i:Oe(r,t,n)}function Ci(t){return ea(t)&&Si(t)==b}function Di(t,e,n,r,s){return t===e||(null==t||null==e||!ea(t)&&!ea(e)?t!=t&&e!=e:function(t,e,n,r,s,o){var a=Uo(t),l=Uo(e),c=a?_:ps(t),h=l?_:ps(e),u=(c=c==b?O:c)==O,f=(h=h==b?O:h)==O,d=c==h;if(d&&Xo(t)){if(!Xo(e))return!1;a=!0,u=!1}if(d&&!u)return o||(o=new Kn),a||ca(t)?es(t,e,n,r,s,o):function(t,e,n,i,r,s,o){switch(n){case L:if(t.byteLength!=e.byteLength||t.byteOffset!=e.byteOffset)return!1;t=t.buffer,e=e.buffer;case R:return!(t.byteLength!=e.byteLength||!s(new Ut(t),new Ut(e)));case y:case x:case S:return No(+t,+e);case v:return t.name==e.name&&t.message==e.message;case P:case T:return t==e+"";case M:var a=ln;case E:var l=1&i;if(a||(a=un),t.size!=e.size&&!l)return!1;var c=o.get(t);if(c)return c==e;i|=2,o.set(t,e);var h=es(a(t),a(e),i,r,s,o);return o.delete(t),h;case C:if(jn)return jn.call(t)==jn.call(e)}return!1}(t,e,c,n,r,s,o);if(!(1&n)){var p=u&&It.call(t,"__wrapped__"),g=f&&It.call(e,"__wrapped__");if(p||g){var m=p?t.value():t,w=g?e.value():e;return o||(o=new Kn),s(m,w,n,r,o)}}return!!d&&(o||(o=new Kn),function(t,e,n,r,s,o){var a=1&n,l=is(t),c=l.length,h=is(e),u=h.length;if(c!=u&&!a)return!1;for(var f=c;f--;){var d=l[f];if(!(a?d in e:It.call(e,d)))return!1}var p=o.get(t),g=o.get(e);if(p&&g)return p==e&&g==t;var m=!0;o.set(t,e),o.set(e,t);for(var b=a;++f<c;){var _=t[d=l[f]],y=e[d];if(r)var x=a?r(y,_,d,e,t,o):r(_,y,d,t,e,o);if(!(x===i?_===y||s(_,y,n,r,o):x)){m=!1;break}b||(b="constructor"==d)}if(m&&!b){var v=t.constructor,w=e.constructor;v==w||!("constructor"in t)||!("constructor"in e)||"function"==typeof v&&v instanceof v&&"function"==typeof w&&w instanceof w||(m=!1)}return o.delete(t),o.delete(e),m}(t,e,n,r,s,o))}(t,e,n,r,Di,s))}function Ri(t,e,n,r){var s=n.length,o=s,a=!r;if(null==t)return!o;for(t=Ot(t);s--;){var l=n[s];if(a&&l[2]?l[1]!==t[l[0]]:!(l[0]in t))return!1}for(;++s<o;){var c=(l=n[s])[0],h=t[c],u=l[1];if(a&&l[2]){if(h===i&&!(c in t))return!1}else{var f=new Kn;if(r)var d=r(h,u,c,t,e,f);if(!(d===i?Di(u,h,3,r,f):d))return!1}}return!0}function Li(t){return!(!ta(t)||(e=t,zt&&zt in e))&&(Go(t)?Vt:bt).test(zs(t));var e}function Ii(t){return"function"==typeof t?t:null==t?il:"object"==typeof t?Uo(t)?Vi(t[0],t[1]):Ni(t):fl(t)}function Fi(t){if(!ks(t))return qe(t);var e=[];for(var n in Ot(t))It.call(t,n)&&"constructor"!=n&&e.push(n);return e}function zi(t){if(!ta(t))return function(t){var e=[];if(null!=t)for(var n in Ot(t))e.push(n);return e}(t);var e=ks(t),n=[];for(var i in t)("constructor"!=i||!e&&It.call(t,i))&&n.push(i);return n}function ji(t,e){return t<e}function Bi(t,e){var i=-1,r=Yo(t)?n(t.length):[];return fi(t,(function(t,n,s){r[++i]=e(t,n,s)})),r}function Ni(t){var e=hs(t);return 1==e.length&&e[0][2]?Ss(e[0][0],e[0][1]):function(n){return n===t||Ri(n,t,e)}}function Vi(t,e){return xs(t)&&Ms(e)?Ss(Fs(t),e):function(n){var r=Oa(n,t);return r===i&&r===e?Aa(n,t):Di(e,r,3)}}function Wi(t,e,n,r,s){t!==e&&_i(e,(function(o,a){if(s||(s=new Kn),ta(o))!function(t,e,n,r,s,o,a){var l=Ps(t,n),c=Ps(e,n),h=a.get(c);if(h)ti(t,n,h);else{var u=o?o(l,c,n+"",t,e,a):i,f=u===i;if(f){var d=Uo(c),p=!d&&Xo(c),g=!d&&!p&&ca(c);u=c,d||p||g?Uo(l)?u=l:qo(l)?u=Er(l):p?(f=!1,u=kr(c,!0)):g?(f=!1,u=Sr(c,!0)):u=[]:ra(c)||Ho(c)?(u=l,Ho(l)?u=ba(l):ta(l)&&!Go(l)||(u=ms(c))):f=!1}f&&(a.set(c,u),s(u,c,r,o,a),a.delete(c)),ti(t,n,u)}}(t,e,a,n,Wi,r,s);else{var l=r?r(Ps(t,a),o,a+"",t,e,s):i;l===i&&(l=o),ti(t,a,l)}}),Da)}function Hi(t,e){var n=t.length;if(n)return _s(e+=e<0?n:0,n)?t[e]:i}function Ui(t,e,n){e=e.length?Le(e,(function(t){return Uo(t)?function(e){return ki(e,1===t.length?t[0]:t)}:t})):[il];var i=-1;e=Le(e,Ze(ls()));var r=Bi(t,(function(t,n,r){var s=Le(e,(function(e){return e(t)}));return{criteria:s,index:++i,value:t}}));return function(t,e){var n=t.length;for(t.sort(e);n--;)t[n]=t[n].value;return t}(r,(function(t,e){return function(t,e,n){for(var i=-1,r=t.criteria,s=e.criteria,o=r.length,a=n.length;++i<o;){var l=Or(r[i],s[i]);if(l)return i>=a?l:l*("desc"==n[i]?-1:1)}return t.index-e.index}(t,e,n)}))}function $i(t,e,n){for(var i=-1,r=e.length,s={};++i<r;){var o=e[i],a=ki(t,o);n(a,o)&&Qi(s,yr(o,t),a)}return s}function Yi(t,e,n,i){var r=i?He:We,s=-1,o=e.length,a=t;for(t===e&&(e=Er(e)),n&&(a=Le(t,Ze(n)));++s<o;)for(var l=0,c=e[s],h=n?n(c):c;(l=r(a,h,l,i))>-1;)a!==t&&Kt.call(a,l,1),Kt.call(t,l,1);return t}function qi(t,e){for(var n=t?e.length:0,i=n-1;n--;){var r=e[n];if(n==i||r!==s){var s=r;_s(r)?Kt.call(t,r,1):ur(t,r)}}return t}function Xi(t,e){return t+ge(wn()*(e-t+1))}function Ki(t,e){var n="";if(!t||e<1||e>d)return n;do{e%2&&(n+=t),(e=ge(e/2))&&(t+=t)}while(e);return n}function Ji(t,e){return Cs(Os(t,e,il),t+"")}function Gi(t){return Gn(Na(t))}function Zi(t,e){var n=Na(t);return Ls(n,ai(e,0,n.length))}function Qi(t,e,n,r){if(!ta(t))return t;for(var s=-1,o=(e=yr(e,t)).length,a=o-1,l=t;null!=l&&++s<o;){var c=Fs(e[s]),h=n;if("__proto__"===c||"constructor"===c||"prototype"===c)return t;if(s!=a){var u=l[c];(h=r?r(u,c,l):i)===i&&(h=ta(u)?u:_s(e[s+1])?[]:{})}ei(l,c,h),l=l[c]}return t}var tr=Tn?function(t,e){return Tn.set(t,e),t}:il,er=ee?function(t,e){return ee(t,"toString",{configurable:!0,enumerable:!1,value:tl(e),writable:!0})}:il;function nr(t){return Ls(Na(t))}function ir(t,e,i){var r=-1,s=t.length;e<0&&(e=-e>s?0:s+e),(i=i>s?s:i)<0&&(i+=s),s=e>i?0:i-e>>>0,e>>>=0;for(var o=n(s);++r<s;)o[r]=t[r+e];return o}function rr(t,e){var n;return fi(t,(function(t,i,r){return!(n=e(t,i,r))})),!!n}function sr(t,e,n){var i=0,r=null==t?i:t.length;if("number"==typeof e&&e==e&&r<=2147483647){for(;i<r;){var s=i+r>>>1,o=t[s];null!==o&&!la(o)&&(n?o<=e:o<e)?i=s+1:r=s}return r}return or(t,e,il,n)}function or(t,e,n,r){var s=0,o=null==t?0:t.length;if(0===o)return 0;for(var a=(e=n(e))!=e,l=null===e,c=la(e),h=e===i;s<o;){var u=ge((s+o)/2),f=n(t[u]),d=f!==i,p=null===f,g=f==f,m=la(f);if(a)var b=r||g;else b=h?g&&(r||d):l?g&&d&&(r||!p):c?g&&d&&!p&&(r||!m):!p&&!m&&(r?f<=e:f<e);b?s=u+1:o=u}return yn(o,4294967294)}function ar(t,e){for(var n=-1,i=t.length,r=0,s=[];++n<i;){var o=t[n],a=e?e(o):o;if(!n||!No(a,l)){var l=a;s[r++]=0===o?0:o}}return s}function lr(t){return"number"==typeof t?t:la(t)?p:+t}function cr(t){if("string"==typeof t)return t;if(Uo(t))return Le(t,cr)+"";if(la(t))return Bn?Bn.call(t):"";var e=t+"";return"0"==e&&1/t==-1/0?"-0":e}function hr(t,e,n){var i=-1,r=De,s=t.length,o=!0,a=[],l=a;if(n)o=!1,r=Re;else if(s>=200){var c=e?null:Kr(t);if(c)return un(c);o=!1,r=tn,l=new Xn}else l=e?[]:a;t:for(;++i<s;){var h=t[i],u=e?e(h):h;if(h=n||0!==h?h:0,o&&u==u){for(var f=l.length;f--;)if(l[f]===u)continue t;e&&l.push(u),a.push(h)}else r(l,u,n)||(l!==a&&l.push(u),a.push(h))}return a}function ur(t,e){return null==(t=As(t,e=yr(e,t)))||delete t[Fs(Ks(e))]}function fr(t,e,n,i){return Qi(t,e,n(ki(t,e)),i)}function dr(t,e,n,i){for(var r=t.length,s=i?r:-1;(i?s--:++s<r)&&e(t[s],s,t););return n?ir(t,i?0:s,i?s+1:r):ir(t,i?s+1:0,i?r:s)}function pr(t,e){var n=t;return n instanceof Un&&(n=n.value()),Fe(e,(function(t,e){return e.func.apply(e.thisArg,Ie([t],e.args))}),n)}function gr(t,e,i){var r=t.length;if(r<2)return r?hr(t[0]):[];for(var s=-1,o=n(r);++s<r;)for(var a=t[s],l=-1;++l<r;)l!=s&&(o[s]=ui(o[s]||a,t[l],e,i));return hr(bi(o,1),e,i)}function mr(t,e,n){for(var r=-1,s=t.length,o=e.length,a={};++r<s;){var l=r<o?e[r]:i;n(a,t[r],l)}return a}function br(t){return qo(t)?t:[]}function _r(t){return"function"==typeof t?t:il}function yr(t,e){return Uo(t)?t:xs(t,e)?[t]:Is(_a(t))}var xr=Ji;function vr(t,e,n){var r=t.length;return n=n===i?r:n,!e&&n>=r?t:ir(t,e,n)}var wr=ie||function(t){return pe.clearTimeout(t)};function kr(t,e){if(e)return t.slice();var n=t.length,i=$t?$t(n):new t.constructor(n);return t.copy(i),i}function Mr(t){var e=new t.constructor(t.byteLength);return new Ut(e).set(new Ut(t)),e}function Sr(t,e){var n=e?Mr(t.buffer):t.buffer;return new t.constructor(n,t.byteOffset,t.length)}function Or(t,e){if(t!==e){var n=t!==i,r=null===t,s=t==t,o=la(t),a=e!==i,l=null===e,c=e==e,h=la(e);if(!l&&!h&&!o&&t>e||o&&a&&c&&!l&&!h||r&&a&&c||!n&&c||!s)return 1;if(!r&&!o&&!h&&t<e||h&&n&&s&&!r&&!o||l&&n&&s||!a&&s||!c)return-1}return 0}function Ar(t,e,i,r){for(var s=-1,o=t.length,a=i.length,l=-1,c=e.length,h=_n(o-a,0),u=n(c+h),f=!r;++l<c;)u[l]=e[l];for(;++s<a;)(f||s<o)&&(u[i[s]]=t[s]);for(;h--;)u[l++]=t[s++];return u}function Pr(t,e,i,r){for(var s=-1,o=t.length,a=-1,l=i.length,c=-1,h=e.length,u=_n(o-l,0),f=n(u+h),d=!r;++s<u;)f[s]=t[s];for(var p=s;++c<h;)f[p+c]=e[c];for(;++a<l;)(d||s<o)&&(f[p+i[a]]=t[s++]);return f}function Er(t,e){var i=-1,r=t.length;for(e||(e=n(r));++i<r;)e[i]=t[i];return e}function Tr(t,e,n,r){var s=!n;n||(n={});for(var o=-1,a=e.length;++o<a;){var l=e[o],c=r?r(n[l],t[l],l,n,t):i;c===i&&(c=t[l]),s?si(n,l,c):ei(n,l,c)}return n}function Cr(t,e){return function(n,i){var r=Uo(n)?Ae:ii,s=e?e():{};return r(n,t,ls(i,2),s)}}function Dr(t){return Ji((function(e,n){var r=-1,s=n.length,o=s>1?n[s-1]:i,a=s>2?n[2]:i;for(o=t.length>3&&"function"==typeof o?(s--,o):i,a&&ys(n[0],n[1],a)&&(o=s<3?i:o,s=1),e=Ot(e);++r<s;){var l=n[r];l&&t(e,l,r,o)}return e}))}function Rr(t,e){return function(n,i){if(null==n)return n;if(!Yo(n))return t(n,i);for(var r=n.length,s=e?r:-1,o=Ot(n);(e?s--:++s<r)&&!1!==i(o[s],s,o););return n}}function Lr(t){return function(e,n,i){for(var r=-1,s=Ot(e),o=i(e),a=o.length;a--;){var l=o[t?a:++r];if(!1===n(s[l],l,s))break}return e}}function Ir(t){return function(e){var n=an(e=_a(e))?pn(e):i,r=n?n[0]:e.charAt(0),s=n?vr(n,1).join(""):e.slice(1);return r[t]()+s}}function Fr(t){return function(e){return Fe(Ga(Ha(e).replace(Qt,"")),t,"")}}function zr(t){return function(){var e=arguments;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]);case 5:return new t(e[0],e[1],e[2],e[3],e[4]);case 6:return new t(e[0],e[1],e[2],e[3],e[4],e[5]);case 7:return new t(e[0],e[1],e[2],e[3],e[4],e[5],e[6])}var n=Vn(t.prototype),i=t.apply(n,e);return ta(i)?i:n}}function jr(t){return function(e,n,r){var s=Ot(e);if(!Yo(e)){var o=ls(n,3);e=Ca(e),n=function(t){return o(s[t],t,s)}}var a=t(e,n,r);return a>-1?s[o?e[a]:a]:i}}function Br(t){return ns((function(e){var n=e.length,s=n,o=Hn.prototype.thru;for(t&&e.reverse();s--;){var a=e[s];if("function"!=typeof a)throw new Et(r);if(o&&!l&&"wrapper"==os(a))var l=new Hn([],!0)}for(s=l?s:n;++s<n;){var c=os(a=e[s]),h="wrapper"==c?ss(a):i;l=h&&vs(h[0])&&424==h[1]&&!h[4].length&&1==h[9]?l[os(h[0])].apply(l,h[3]):1==a.length&&vs(a)?l[c]():l.thru(a)}return function(){var t=arguments,i=t[0];if(l&&1==t.length&&Uo(i))return l.plant(i).value();for(var r=0,s=n?e[r].apply(this,t):i;++r<n;)s=e[r].call(this,s);return s}}))}function Nr(t,e,r,s,o,a,l,c,u,f){var d=e&h,p=1&e,g=2&e,m=24&e,b=512&e,_=g?i:zr(t);return function h(){for(var y=arguments.length,x=n(y),v=y;v--;)x[v]=arguments[v];if(m)var w=as(h),k=function(t,e){for(var n=t.length,i=0;n--;)t[n]===e&&++i;return i}(x,w);if(s&&(x=Ar(x,s,o,m)),a&&(x=Pr(x,a,l,m)),y-=k,m&&y<f){var M=hn(x,w);return qr(t,e,Nr,h.placeholder,r,x,M,c,u,f-y)}var S=p?r:this,O=g?S[t]:t;return y=x.length,c?x=function(t,e){for(var n=t.length,r=yn(e.length,n),s=Er(t);r--;){var o=e[r];t[r]=_s(o,n)?s[o]:i}return t}(x,c):b&&y>1&&x.reverse(),d&&u<y&&(x.length=u),this&&this!==pe&&this instanceof h&&(O=_||zr(O)),O.apply(S,x)}}function Vr(t,e){return function(n,i){return function(t,e,n,i){return xi(t,(function(t,r,s){e(i,n(t),r,s)})),i}(n,t,e(i),{})}}function Wr(t,e){return function(n,r){var s;if(n===i&&r===i)return e;if(n!==i&&(s=n),r!==i){if(s===i)return r;"string"==typeof n||"string"==typeof r?(n=cr(n),r=cr(r)):(n=lr(n),r=lr(r)),s=t(n,r)}return s}}function Hr(t){return ns((function(e){return e=Le(e,Ze(ls())),Ji((function(n){var i=this;return t(e,(function(t){return Oe(t,i,n)}))}))}))}function Ur(t,e){var n=(e=e===i?" ":cr(e)).length;if(n<2)return n?Ki(e,t):e;var r=Ki(e,de(t/dn(e)));return an(e)?vr(pn(r),0,t).join(""):r.slice(0,t)}function $r(t){return function(e,r,s){return s&&"number"!=typeof s&&ys(e,r,s)&&(r=s=i),e=da(e),r===i?(r=e,e=0):r=da(r),function(t,e,i,r){for(var s=-1,o=_n(de((e-t)/(i||1)),0),a=n(o);o--;)a[r?o:++s]=t,t+=i;return a}(e,r,s=s===i?e<r?1:-1:da(s),t)}}function Yr(t){return function(e,n){return"string"==typeof e&&"string"==typeof n||(e=ma(e),n=ma(n)),t(e,n)}}function qr(t,e,n,r,s,o,a,h,u,f){var d=8&e;e|=d?l:c,4&(e&=~(d?c:l))||(e&=-4);var p=[t,e,s,d?o:i,d?a:i,d?i:o,d?i:a,h,u,f],g=n.apply(i,p);return vs(t)&&Es(g,p),g.placeholder=r,Ds(g,t,e)}function Xr(t){var e=St[t];return function(t,n){if(t=ma(t),(n=null==n?0:yn(pa(n),292))&&ye(t)){var i=(_a(t)+"e").split("e");return+((i=(_a(e(i[0]+"e"+(+i[1]+n)))+"e").split("e"))[0]+"e"+(+i[1]-n))}return e(t)}}var Kr=An&&1/un(new An([,-0]))[1]==f?function(t){return new An(t)}:ll;function Jr(t){return function(e){var n=ps(e);return n==M?ln(e):n==E?fn(e):function(t,e){return Le(e,(function(e){return[e,t[e]]}))}(e,t(e))}}function Gr(t,e,s,f,d,p,g,m){var b=2&e;if(!b&&"function"!=typeof t)throw new Et(r);var _=f?f.length:0;if(_||(e&=-97,f=d=i),g=g===i?g:_n(pa(g),0),m=m===i?m:pa(m),_-=d?d.length:0,e&c){var y=f,x=d;f=d=i}var v=b?i:ss(t),w=[t,e,s,f,d,y,x,p,g,m];if(v&&function(t,e){var n=t[1],i=e[1],r=n|i,s=r<131,a=i==h&&8==n||i==h&&n==u&&t[7].length<=e[8]||384==i&&e[7].length<=e[8]&&8==n;if(!s&&!a)return t;1&i&&(t[2]=e[2],r|=1&n?0:4);var l=e[3];if(l){var c=t[3];t[3]=c?Ar(c,l,e[4]):l,t[4]=c?hn(t[3],o):e[4]}(l=e[5])&&(c=t[5],t[5]=c?Pr(c,l,e[6]):l,t[6]=c?hn(t[5],o):e[6]),(l=e[7])&&(t[7]=l),i&h&&(t[8]=null==t[8]?e[8]:yn(t[8],e[8])),null==t[9]&&(t[9]=e[9]),t[0]=e[0],t[1]=r}(w,v),t=w[0],e=w[1],s=w[2],f=w[3],d=w[4],!(m=w[9]=w[9]===i?b?0:t.length:_n(w[9]-_,0))&&24&e&&(e&=-25),e&&1!=e)k=8==e||e==a?function(t,e,r){var s=zr(t);return function o(){for(var a=arguments.length,l=n(a),c=a,h=as(o);c--;)l[c]=arguments[c];var u=a<3&&l[0]!==h&&l[a-1]!==h?[]:hn(l,h);return(a-=u.length)<r?qr(t,e,Nr,o.placeholder,i,l,u,i,i,r-a):Oe(this&&this!==pe&&this instanceof o?s:t,this,l)}}(t,e,m):e!=l&&33!=e||d.length?Nr.apply(i,w):function(t,e,i,r){var s=1&e,o=zr(t);return function e(){for(var a=-1,l=arguments.length,c=-1,h=r.length,u=n(h+l),f=this&&this!==pe&&this instanceof e?o:t;++c<h;)u[c]=r[c];for(;l--;)u[c++]=arguments[++a];return Oe(f,s?i:this,u)}}(t,e,s,f);else var k=function(t,e,n){var i=1&e,r=zr(t);return function e(){return(this&&this!==pe&&this instanceof e?r:t).apply(i?n:this,arguments)}}(t,e,s);return Ds((v?tr:Es)(k,w),t,e)}function Zr(t,e,n,r){return t===i||No(t,Dt[n])&&!It.call(r,n)?e:t}function Qr(t,e,n,r,s,o){return ta(t)&&ta(e)&&(o.set(e,t),Wi(t,e,i,Qr,o),o.delete(e)),t}function ts(t){return ra(t)?i:t}function es(t,e,n,r,s,o){var a=1&n,l=t.length,c=e.length;if(l!=c&&!(a&&c>l))return!1;var h=o.get(t),u=o.get(e);if(h&&u)return h==e&&u==t;var f=-1,d=!0,p=2&n?new Xn:i;for(o.set(t,e),o.set(e,t);++f<l;){var g=t[f],m=e[f];if(r)var b=a?r(m,g,f,e,t,o):r(g,m,f,t,e,o);if(b!==i){if(b)continue;d=!1;break}if(p){if(!je(e,(function(t,e){if(!tn(p,e)&&(g===t||s(g,t,n,r,o)))return p.push(e)}))){d=!1;break}}else if(g!==m&&!s(g,m,n,r,o)){d=!1;break}}return o.delete(t),o.delete(e),d}function ns(t){return Cs(Os(t,i,Us),t+"")}function is(t){return Mi(t,Ca,fs)}function rs(t){return Mi(t,Da,ds)}var ss=Tn?function(t){return Tn.get(t)}:ll;function os(t){for(var e=t.name+"",n=Cn[e],i=It.call(Cn,e)?n.length:0;i--;){var r=n[i],s=r.func;if(null==s||s==t)return r.name}return e}function as(t){return(It.call(Nn,"placeholder")?Nn:t).placeholder}function ls(){var t=Nn.iteratee||rl;return t=t===rl?Ii:t,arguments.length?t(arguments[0],arguments[1]):t}function cs(t,e){var n,i,r=t.__data__;return("string"==(i=typeof(n=e))||"number"==i||"symbol"==i||"boolean"==i?"__proto__"!==n:null===n)?r["string"==typeof e?"string":"hash"]:r.map}function hs(t){for(var e=Ca(t),n=e.length;n--;){var i=e[n],r=t[i];e[n]=[i,r,Ms(r)]}return e}function us(t,e){var n=function(t,e){return null==t?i:t[e]}(t,e);return Li(n)?n:i}var fs=me?function(t){return null==t?[]:(t=Ot(t),Ce(me(t),(function(e){return Xt.call(t,e)})))}:gl,ds=me?function(t){for(var e=[];t;)Ie(e,fs(t)),t=Yt(t);return e}:gl,ps=Si;function gs(t,e,n){for(var i=-1,r=(e=yr(e,t)).length,s=!1;++i<r;){var o=Fs(e[i]);if(!(s=null!=t&&n(t,o)))break;t=t[o]}return s||++i!=r?s:!!(r=null==t?0:t.length)&&Qo(r)&&_s(o,r)&&(Uo(t)||Ho(t))}function ms(t){return"function"!=typeof t.constructor||ks(t)?{}:Vn(Yt(t))}function bs(t){return Uo(t)||Ho(t)||!!(Jt&&t&&t[Jt])}function _s(t,e){var n=typeof t;return!!(e=null==e?d:e)&&("number"==n||"symbol"!=n&&yt.test(t))&&t>-1&&t%1==0&&t<e}function ys(t,e,n){if(!ta(n))return!1;var i=typeof e;return!!("number"==i?Yo(n)&&_s(e,n.length):"string"==i&&e in n)&&No(n[e],t)}function xs(t,e){if(Uo(t))return!1;var n=typeof t;return!("number"!=n&&"symbol"!=n&&"boolean"!=n&&null!=t&&!la(t))||et.test(t)||!tt.test(t)||null!=e&&t in Ot(e)}function vs(t){var e=os(t),n=Nn[e];if("function"!=typeof n||!(e in Un.prototype))return!1;if(t===n)return!0;var i=ss(n);return!!i&&t===i[0]}(Mn&&ps(new Mn(new ArrayBuffer(1)))!=L||Sn&&ps(new Sn)!=M||On&&ps(On.resolve())!=A||An&&ps(new An)!=E||Pn&&ps(new Pn)!=D)&&(ps=function(t){var e=Si(t),n=e==O?t.constructor:i,r=n?zs(n):"";if(r)switch(r){case Dn:return L;case Rn:return M;case Ln:return A;case In:return E;case Fn:return D}return e});var ws=Rt?Go:ml;function ks(t){var e=t&&t.constructor;return t===("function"==typeof e&&e.prototype||Dt)}function Ms(t){return t==t&&!ta(t)}function Ss(t,e){return function(n){return null!=n&&n[t]===e&&(e!==i||t in Ot(n))}}function Os(t,e,r){return e=_n(e===i?t.length-1:e,0),function(){for(var i=arguments,s=-1,o=_n(i.length-e,0),a=n(o);++s<o;)a[s]=i[e+s];s=-1;for(var l=n(e+1);++s<e;)l[s]=i[s];return l[e]=r(a),Oe(t,this,l)}}function As(t,e){return e.length<2?t:ki(t,ir(e,0,-1))}function Ps(t,e){if(("constructor"!==e||"function"!=typeof t[e])&&"__proto__"!=e)return t[e]}var Es=Rs(tr),Ts=fe||function(t,e){return pe.setTimeout(t,e)},Cs=Rs(er);function Ds(t,e,n){var i=e+"";return Cs(t,function(t,e){var n=e.length;if(!n)return t;var i=n-1;return e[i]=(n>1?"& ":"")+e[i],e=e.join(n>2?", ":" "),t.replace(at,"{\n/* [wrapped with "+e+"] */\n")}(i,function(t,e){return Pe(m,(function(n){var i="_."+n[0];e&n[1]&&!De(t,i)&&t.push(i)})),t.sort()}(function(t){var e=t.match(lt);return e?e[1].split(ct):[]}(i),n)))}function Rs(t){var e=0,n=0;return function(){var r=xn(),s=16-(r-n);if(n=r,s>0){if(++e>=800)return arguments[0]}else e=0;return t.apply(i,arguments)}}function Ls(t,e){var n=-1,r=t.length,s=r-1;for(e=e===i?r:e;++n<e;){var o=Xi(n,s),a=t[o];t[o]=t[n],t[n]=a}return t.length=e,t}var Is=function(t){var e=Lo(t,(function(t){return 500===n.size&&n.clear(),t})),n=e.cache;return e}((function(t){var e=[];return 46===t.charCodeAt(0)&&e.push(""),t.replace(nt,(function(t,n,i,r){e.push(i?r.replace(ft,"$1"):n||t)})),e}));function Fs(t){if("string"==typeof t||la(t))return t;var e=t+"";return"0"==e&&1/t==-1/0?"-0":e}function zs(t){if(null!=t){try{return Lt.call(t)}catch(e){}try{return t+""}catch(e){}}return""}function js(t){if(t instanceof Un)return t.clone();var e=new Hn(t.__wrapped__,t.__chain__);return e.__actions__=Er(t.__actions__),e.__index__=t.__index__,e.__values__=t.__values__,e}var Bs=Ji((function(t,e){return qo(t)?ui(t,bi(e,1,qo,!0)):[]})),Ns=Ji((function(t,e){var n=Ks(e);return qo(n)&&(n=i),qo(t)?ui(t,bi(e,1,qo,!0),ls(n,2)):[]})),Vs=Ji((function(t,e){var n=Ks(e);return qo(n)&&(n=i),qo(t)?ui(t,bi(e,1,qo,!0),i,n):[]}));function Ws(t,e,n){var i=null==t?0:t.length;if(!i)return-1;var r=null==n?0:pa(n);return r<0&&(r=_n(i+r,0)),Ve(t,ls(e,3),r)}function Hs(t,e,n){var r=null==t?0:t.length;if(!r)return-1;var s=r-1;return n!==i&&(s=pa(n),s=n<0?_n(r+s,0):yn(s,r-1)),Ve(t,ls(e,3),s,!0)}function Us(t){return null!=t&&t.length?bi(t,1):[]}function $s(t){return t&&t.length?t[0]:i}var Ys=Ji((function(t){var e=Le(t,br);return e.length&&e[0]===t[0]?Ei(e):[]})),qs=Ji((function(t){var e=Ks(t),n=Le(t,br);return e===Ks(n)?e=i:n.pop(),n.length&&n[0]===t[0]?Ei(n,ls(e,2)):[]})),Xs=Ji((function(t){var e=Ks(t),n=Le(t,br);return(e="function"==typeof e?e:i)&&n.pop(),n.length&&n[0]===t[0]?Ei(n,i,e):[]}));function Ks(t){var e=null==t?0:t.length;return e?t[e-1]:i}var Js=Ji(Gs);function Gs(t,e){return t&&t.length&&e&&e.length?Yi(t,e):t}var Zs=ns((function(t,e){var n=null==t?0:t.length,i=oi(t,e);return qi(t,Le(e,(function(t){return _s(t,n)?+t:t})).sort(Or)),i}));function Qs(t){return null==t?t:kn.call(t)}var to=Ji((function(t){return hr(bi(t,1,qo,!0))})),eo=Ji((function(t){var e=Ks(t);return qo(e)&&(e=i),hr(bi(t,1,qo,!0),ls(e,2))})),no=Ji((function(t){var e=Ks(t);return e="function"==typeof e?e:i,hr(bi(t,1,qo,!0),i,e)}));function io(t){if(!t||!t.length)return[];var e=0;return t=Ce(t,(function(t){if(qo(t))return e=_n(t.length,e),!0})),Je(e,(function(e){return Le(t,Ye(e))}))}function ro(t,e){if(!t||!t.length)return[];var n=io(t);return null==e?n:Le(n,(function(t){return Oe(e,i,t)}))}var so=Ji((function(t,e){return qo(t)?ui(t,e):[]})),oo=Ji((function(t){return gr(Ce(t,qo))})),ao=Ji((function(t){var e=Ks(t);return qo(e)&&(e=i),gr(Ce(t,qo),ls(e,2))})),lo=Ji((function(t){var e=Ks(t);return e="function"==typeof e?e:i,gr(Ce(t,qo),i,e)})),co=Ji(io),ho=Ji((function(t){var e=t.length,n=e>1?t[e-1]:i;return n="function"==typeof n?(t.pop(),n):i,ro(t,n)}));function uo(t){var e=Nn(t);return e.__chain__=!0,e}function fo(t,e){return e(t)}var po=ns((function(t){var e=t.length,n=e?t[0]:0,r=this.__wrapped__,s=function(e){return oi(e,t)};return!(e>1||this.__actions__.length)&&r instanceof Un&&_s(n)?((r=r.slice(n,+n+(e?1:0))).__actions__.push({func:fo,args:[s],thisArg:i}),new Hn(r,this.__chain__).thru((function(t){return e&&!t.length&&t.push(i),t}))):this.thru(s)})),go=Cr((function(t,e,n){It.call(t,n)?++t[n]:si(t,n,1)})),mo=jr(Ws),bo=jr(Hs);function _o(t,e){return(Uo(t)?Pe:fi)(t,ls(e,3))}function yo(t,e){return(Uo(t)?Ee:di)(t,ls(e,3))}var xo=Cr((function(t,e,n){It.call(t,n)?t[n].push(e):si(t,n,[e])})),vo=Ji((function(t,e,i){var r=-1,s="function"==typeof e,o=Yo(t)?n(t.length):[];return fi(t,(function(t){o[++r]=s?Oe(e,t,i):Ti(t,e,i)})),o})),wo=Cr((function(t,e,n){si(t,n,e)}));function ko(t,e){return(Uo(t)?Le:Bi)(t,ls(e,3))}var Mo=Cr((function(t,e,n){t[n?0:1].push(e)}),(function(){return[[],[]]})),So=Ji((function(t,e){if(null==t)return[];var n=e.length;return n>1&&ys(t,e[0],e[1])?e=[]:n>2&&ys(e[0],e[1],e[2])&&(e=[e[0]]),Ui(t,bi(e,1),[])})),Oo=ce||function(){return pe.Date.now()};function Ao(t,e,n){return e=n?i:e,e=t&&null==e?t.length:e,Gr(t,h,i,i,i,i,e)}function Po(t,e){var n;if("function"!=typeof e)throw new Et(r);return t=pa(t),function(){return--t>0&&(n=e.apply(this,arguments)),t<=1&&(e=i),n}}var Eo=Ji((function(t,e,n){var i=1;if(n.length){var r=hn(n,as(Eo));i|=l}return Gr(t,i,e,n,r)})),To=Ji((function(t,e,n){var i=3;if(n.length){var r=hn(n,as(To));i|=l}return Gr(e,i,t,n,r)}));function Co(t,e,n){var s,o,a,l,c,h,u=0,f=!1,d=!1,p=!0;if("function"!=typeof t)throw new Et(r);function g(e){var n=s,r=o;return s=o=i,u=e,l=t.apply(r,n)}function m(t){var n=t-h;return h===i||n>=e||n<0||d&&t-u>=a}function b(){var t=Oo();if(m(t))return _(t);c=Ts(b,function(t){var n=e-(t-h);return d?yn(n,a-(t-u)):n}(t))}function _(t){return c=i,p&&s?g(t):(s=o=i,l)}function y(){var t=Oo(),n=m(t);if(s=arguments,o=this,h=t,n){if(c===i)return function(t){return u=t,c=Ts(b,e),f?g(t):l}(h);if(d)return wr(c),c=Ts(b,e),g(h)}return c===i&&(c=Ts(b,e)),l}return e=ma(e)||0,ta(n)&&(f=!!n.leading,a=(d="maxWait"in n)?_n(ma(n.maxWait)||0,e):a,p="trailing"in n?!!n.trailing:p),y.cancel=function(){c!==i&&wr(c),u=0,s=h=o=c=i},y.flush=function(){return c===i?l:_(Oo())},y}var Do=Ji((function(t,e){return hi(t,1,e)})),Ro=Ji((function(t,e,n){return hi(t,ma(e)||0,n)}));function Lo(t,e){if("function"!=typeof t||null!=e&&"function"!=typeof e)throw new Et(r);var n=function(){var i=arguments,r=e?e.apply(this,i):i[0],s=n.cache;if(s.has(r))return s.get(r);var o=t.apply(this,i);return n.cache=s.set(r,o)||s,o};return n.cache=new(Lo.Cache||qn),n}function Io(t){if("function"!=typeof t)throw new Et(r);return function(){var e=arguments;switch(e.length){case 0:return!t.call(this);case 1:return!t.call(this,e[0]);case 2:return!t.call(this,e[0],e[1]);case 3:return!t.call(this,e[0],e[1],e[2])}return!t.apply(this,e)}}Lo.Cache=qn;var Fo=xr((function(t,e){var n=(e=1==e.length&&Uo(e[0])?Le(e[0],Ze(ls())):Le(bi(e,1),Ze(ls()))).length;return Ji((function(i){for(var r=-1,s=yn(i.length,n);++r<s;)i[r]=e[r].call(this,i[r]);return Oe(t,this,i)}))})),zo=Ji((function(t,e){var n=hn(e,as(zo));return Gr(t,l,i,e,n)})),jo=Ji((function(t,e){var n=hn(e,as(jo));return Gr(t,c,i,e,n)})),Bo=ns((function(t,e){return Gr(t,u,i,i,i,e)}));function No(t,e){return t===e||t!=t&&e!=e}var Vo=Yr(Oi),Wo=Yr((function(t,e){return t>=e})),Ho=Ci(function(){return arguments}())?Ci:function(t){return ea(t)&&It.call(t,"callee")&&!Xt.call(t,"callee")},Uo=n.isArray,$o=xe?Ze(xe):function(t){return ea(t)&&Si(t)==R};function Yo(t){return null!=t&&Qo(t.length)&&!Go(t)}function qo(t){return ea(t)&&Yo(t)}var Xo=_e||ml,Ko=ve?Ze(ve):function(t){return ea(t)&&Si(t)==x};function Jo(t){if(!ea(t))return!1;var e=Si(t);return e==v||"[object DOMException]"==e||"string"==typeof t.message&&"string"==typeof t.name&&!ra(t)}function Go(t){if(!ta(t))return!1;var e=Si(t);return e==w||e==k||"[object AsyncFunction]"==e||"[object Proxy]"==e}function Zo(t){return"number"==typeof t&&t==pa(t)}function Qo(t){return"number"==typeof t&&t>-1&&t%1==0&&t<=d}function ta(t){var e=typeof t;return null!=t&&("object"==e||"function"==e)}function ea(t){return null!=t&&"object"==typeof t}var na=we?Ze(we):function(t){return ea(t)&&ps(t)==M};function ia(t){return"number"==typeof t||ea(t)&&Si(t)==S}function ra(t){if(!ea(t)||Si(t)!=O)return!1;var e=Yt(t);if(null===e)return!0;var n=It.call(e,"constructor")&&e.constructor;return"function"==typeof n&&n instanceof n&&Lt.call(n)==Bt}var sa=ke?Ze(ke):function(t){return ea(t)&&Si(t)==P},oa=Me?Ze(Me):function(t){return ea(t)&&ps(t)==E};function aa(t){return"string"==typeof t||!Uo(t)&&ea(t)&&Si(t)==T}function la(t){return"symbol"==typeof t||ea(t)&&Si(t)==C}var ca=Se?Ze(Se):function(t){return ea(t)&&Qo(t.length)&&!!ae[Si(t)]},ha=Yr(ji),ua=Yr((function(t,e){return t<=e}));function fa(t){if(!t)return[];if(Yo(t))return aa(t)?pn(t):Er(t);if(Gt&&t[Gt])return function(t){for(var e,n=[];!(e=t.next()).done;)n.push(e.value);return n}(t[Gt]());var e=ps(t);return(e==M?ln:e==E?un:Na)(t)}function da(t){return t?(t=ma(t))===f||t===-1/0?17976931348623157e292*(t<0?-1:1):t==t?t:0:0===t?t:0}function pa(t){var e=da(t),n=e%1;return e==e?n?e-n:e:0}function ga(t){return t?ai(pa(t),0,g):0}function ma(t){if("number"==typeof t)return t;if(la(t))return p;if(ta(t)){var e="function"==typeof t.valueOf?t.valueOf():t;t=ta(e)?e+"":e}if("string"!=typeof t)return 0===t?t:+t;t=Ge(t);var n=mt.test(t);return n||_t.test(t)?ue(t.slice(2),n?2:8):gt.test(t)?p:+t}function ba(t){return Tr(t,Da(t))}function _a(t){return null==t?"":cr(t)}var ya=Dr((function(t,e){if(ks(e)||Yo(e))Tr(e,Ca(e),t);else for(var n in e)It.call(e,n)&&ei(t,n,e[n])})),xa=Dr((function(t,e){Tr(e,Da(e),t)})),va=Dr((function(t,e,n,i){Tr(e,Da(e),t,i)})),wa=Dr((function(t,e,n,i){Tr(e,Ca(e),t,i)})),ka=ns(oi),Ma=Ji((function(t,e){t=Ot(t);var n=-1,r=e.length,s=r>2?e[2]:i;for(s&&ys(e[0],e[1],s)&&(r=1);++n<r;)for(var o=e[n],a=Da(o),l=-1,c=a.length;++l<c;){var h=a[l],u=t[h];(u===i||No(u,Dt[h])&&!It.call(t,h))&&(t[h]=o[h])}return t})),Sa=Ji((function(t){return t.push(i,Qr),Oe(La,i,t)}));function Oa(t,e,n){var r=null==t?i:ki(t,e);return r===i?n:r}function Aa(t,e){return null!=t&&gs(t,e,Pi)}var Pa=Vr((function(t,e,n){null!=e&&"function"!=typeof e.toString&&(e=jt.call(e)),t[e]=n}),tl(il)),Ea=Vr((function(t,e,n){null!=e&&"function"!=typeof e.toString&&(e=jt.call(e)),It.call(t,e)?t[e].push(n):t[e]=[n]}),ls),Ta=Ji(Ti);function Ca(t){return Yo(t)?Jn(t):Fi(t)}function Da(t){return Yo(t)?Jn(t,!0):zi(t)}var Ra=Dr((function(t,e,n){Wi(t,e,n)})),La=Dr((function(t,e,n,i){Wi(t,e,n,i)})),Ia=ns((function(t,e){var n={};if(null==t)return n;var i=!1;e=Le(e,(function(e){return e=yr(e,t),i||(i=e.length>1),e})),Tr(t,rs(t),n),i&&(n=li(n,7,ts));for(var r=e.length;r--;)ur(n,e[r]);return n})),Fa=ns((function(t,e){return null==t?{}:function(t,e){return $i(t,e,(function(e,n){return Aa(t,n)}))}(t,e)}));function za(t,e){if(null==t)return{};var n=Le(rs(t),(function(t){return[t]}));return e=ls(e),$i(t,n,(function(t,n){return e(t,n[0])}))}var ja=Jr(Ca),Ba=Jr(Da);function Na(t){return null==t?[]:Qe(t,Ca(t))}var Va=Fr((function(t,e,n){return e=e.toLowerCase(),t+(n?Wa(e):e)}));function Wa(t){return Ja(_a(t).toLowerCase())}function Ha(t){return(t=_a(t))&&t.replace(xt,rn).replace(te,"")}var Ua=Fr((function(t,e,n){return t+(n?"-":"")+e.toLowerCase()})),$a=Fr((function(t,e,n){return t+(n?" ":"")+e.toLowerCase()})),Ya=Ir("toLowerCase"),qa=Fr((function(t,e,n){return t+(n?"_":"")+e.toLowerCase()})),Xa=Fr((function(t,e,n){return t+(n?" ":"")+Ja(e)})),Ka=Fr((function(t,e,n){return t+(n?" ":"")+e.toUpperCase()})),Ja=Ir("toUpperCase");function Ga(t,e,n){return t=_a(t),(e=n?i:e)===i?function(t){return re.test(t)}(t)?function(t){return t.match(ne)||[]}(t):function(t){return t.match(ht)||[]}(t):t.match(e)||[]}var Za=Ji((function(t,e){try{return Oe(t,i,e)}catch(n){return Jo(n)?n:new kt(n)}})),Qa=ns((function(t,e){return Pe(e,(function(e){e=Fs(e),si(t,e,Eo(t[e],t))})),t}));function tl(t){return function(){return t}}var el=Br(),nl=Br(!0);function il(t){return t}function rl(t){return Ii("function"==typeof t?t:li(t,1))}var sl=Ji((function(t,e){return function(n){return Ti(n,t,e)}})),ol=Ji((function(t,e){return function(n){return Ti(t,n,e)}}));function al(t,e,n){var i=Ca(e),r=wi(e,i);null!=n||ta(e)&&(r.length||!i.length)||(n=e,e=t,t=this,r=wi(e,Ca(e)));var s=!(ta(n)&&"chain"in n&&!n.chain),o=Go(t);return Pe(r,(function(n){var i=e[n];t[n]=i,o&&(t.prototype[n]=function(){var e=this.__chain__;if(s||e){var n=t(this.__wrapped__);return(n.__actions__=Er(this.__actions__)).push({func:i,args:arguments,thisArg:t}),n.__chain__=e,n}return i.apply(t,Ie([this.value()],arguments))})})),t}function ll(){}var cl=Hr(Le),hl=Hr(Te),ul=Hr(je);function fl(t){return xs(t)?Ye(Fs(t)):function(t){return function(e){return ki(e,t)}}(t)}var dl=$r(),pl=$r(!0);function gl(){return[]}function ml(){return!1}var bl,_l=Wr((function(t,e){return t+e}),0),yl=Xr("ceil"),xl=Wr((function(t,e){return t/e}),1),vl=Xr("floor"),wl=Wr((function(t,e){return t*e}),1),kl=Xr("round"),Ml=Wr((function(t,e){return t-e}),0);return Nn.after=function(t,e){if("function"!=typeof e)throw new Et(r);return t=pa(t),function(){if(--t<1)return e.apply(this,arguments)}},Nn.ary=Ao,Nn.assign=ya,Nn.assignIn=xa,Nn.assignInWith=va,Nn.assignWith=wa,Nn.at=ka,Nn.before=Po,Nn.bind=Eo,Nn.bindAll=Qa,Nn.bindKey=To,Nn.castArray=function(){if(!arguments.length)return[];var t=arguments[0];return Uo(t)?t:[t]},Nn.chain=uo,Nn.chunk=function(t,e,r){e=(r?ys(t,e,r):e===i)?1:_n(pa(e),0);var s=null==t?0:t.length;if(!s||e<1)return[];for(var o=0,a=0,l=n(de(s/e));o<s;)l[a++]=ir(t,o,o+=e);return l},Nn.compact=function(t){for(var e=-1,n=null==t?0:t.length,i=0,r=[];++e<n;){var s=t[e];s&&(r[i++]=s)}return r},Nn.concat=function(){var t=arguments.length;if(!t)return[];for(var e=n(t-1),i=arguments[0],r=t;r--;)e[r-1]=arguments[r];return Ie(Uo(i)?Er(i):[i],bi(e,1))},Nn.cond=function(t){var e=null==t?0:t.length,n=ls();return t=e?Le(t,(function(t){if("function"!=typeof t[1])throw new Et(r);return[n(t[0]),t[1]]})):[],Ji((function(n){for(var i=-1;++i<e;){var r=t[i];if(Oe(r[0],this,n))return Oe(r[1],this,n)}}))},Nn.conforms=function(t){return function(t){var e=Ca(t);return function(n){return ci(n,t,e)}}(li(t,1))},Nn.constant=tl,Nn.countBy=go,Nn.create=function(t,e){var n=Vn(t);return null==e?n:ri(n,e)},Nn.curry=function t(e,n,r){var s=Gr(e,8,i,i,i,i,i,n=r?i:n);return s.placeholder=t.placeholder,s},Nn.curryRight=function t(e,n,r){var s=Gr(e,a,i,i,i,i,i,n=r?i:n);return s.placeholder=t.placeholder,s},Nn.debounce=Co,Nn.defaults=Ma,Nn.defaultsDeep=Sa,Nn.defer=Do,Nn.delay=Ro,Nn.difference=Bs,Nn.differenceBy=Ns,Nn.differenceWith=Vs,Nn.drop=function(t,e,n){var r=null==t?0:t.length;return r?ir(t,(e=n||e===i?1:pa(e))<0?0:e,r):[]},Nn.dropRight=function(t,e,n){var r=null==t?0:t.length;return r?ir(t,0,(e=r-(e=n||e===i?1:pa(e)))<0?0:e):[]},Nn.dropRightWhile=function(t,e){return t&&t.length?dr(t,ls(e,3),!0,!0):[]},Nn.dropWhile=function(t,e){return t&&t.length?dr(t,ls(e,3),!0):[]},Nn.fill=function(t,e,n,r){var s=null==t?0:t.length;return s?(n&&"number"!=typeof n&&ys(t,e,n)&&(n=0,r=s),function(t,e,n,r){var s=t.length;for((n=pa(n))<0&&(n=-n>s?0:s+n),(r=r===i||r>s?s:pa(r))<0&&(r+=s),r=n>r?0:ga(r);n<r;)t[n++]=e;return t}(t,e,n,r)):[]},Nn.filter=function(t,e){return(Uo(t)?Ce:mi)(t,ls(e,3))},Nn.flatMap=function(t,e){return bi(ko(t,e),1)},Nn.flatMapDeep=function(t,e){return bi(ko(t,e),f)},Nn.flatMapDepth=function(t,e,n){return n=n===i?1:pa(n),bi(ko(t,e),n)},Nn.flatten=Us,Nn.flattenDeep=function(t){return null!=t&&t.length?bi(t,f):[]},Nn.flattenDepth=function(t,e){return null!=t&&t.length?bi(t,e=e===i?1:pa(e)):[]},Nn.flip=function(t){return Gr(t,512)},Nn.flow=el,Nn.flowRight=nl,Nn.fromPairs=function(t){for(var e=-1,n=null==t?0:t.length,i={};++e<n;){var r=t[e];i[r[0]]=r[1]}return i},Nn.functions=function(t){return null==t?[]:wi(t,Ca(t))},Nn.functionsIn=function(t){return null==t?[]:wi(t,Da(t))},Nn.groupBy=xo,Nn.initial=function(t){return null!=t&&t.length?ir(t,0,-1):[]},Nn.intersection=Ys,Nn.intersectionBy=qs,Nn.intersectionWith=Xs,Nn.invert=Pa,Nn.invertBy=Ea,Nn.invokeMap=vo,Nn.iteratee=rl,Nn.keyBy=wo,Nn.keys=Ca,Nn.keysIn=Da,Nn.map=ko,Nn.mapKeys=function(t,e){var n={};return e=ls(e,3),xi(t,(function(t,i,r){si(n,e(t,i,r),t)})),n},Nn.mapValues=function(t,e){var n={};return e=ls(e,3),xi(t,(function(t,i,r){si(n,i,e(t,i,r))})),n},Nn.matches=function(t){return Ni(li(t,1))},Nn.matchesProperty=function(t,e){return Vi(t,li(e,1))},Nn.memoize=Lo,Nn.merge=Ra,Nn.mergeWith=La,Nn.method=sl,Nn.methodOf=ol,Nn.mixin=al,Nn.negate=Io,Nn.nthArg=function(t){return t=pa(t),Ji((function(e){return Hi(e,t)}))},Nn.omit=Ia,Nn.omitBy=function(t,e){return za(t,Io(ls(e)))},Nn.once=function(t){return Po(2,t)},Nn.orderBy=function(t,e,n,r){return null==t?[]:(Uo(e)||(e=null==e?[]:[e]),Uo(n=r?i:n)||(n=null==n?[]:[n]),Ui(t,e,n))},Nn.over=cl,Nn.overArgs=Fo,Nn.overEvery=hl,Nn.overSome=ul,Nn.partial=zo,Nn.partialRight=jo,Nn.partition=Mo,Nn.pick=Fa,Nn.pickBy=za,Nn.property=fl,Nn.propertyOf=function(t){return function(e){return null==t?i:ki(t,e)}},Nn.pull=Js,Nn.pullAll=Gs,Nn.pullAllBy=function(t,e,n){return t&&t.length&&e&&e.length?Yi(t,e,ls(n,2)):t},Nn.pullAllWith=function(t,e,n){return t&&t.length&&e&&e.length?Yi(t,e,i,n):t},Nn.pullAt=Zs,Nn.range=dl,Nn.rangeRight=pl,Nn.rearg=Bo,Nn.reject=function(t,e){return(Uo(t)?Ce:mi)(t,Io(ls(e,3)))},Nn.remove=function(t,e){var n=[];if(!t||!t.length)return n;var i=-1,r=[],s=t.length;for(e=ls(e,3);++i<s;){var o=t[i];e(o,i,t)&&(n.push(o),r.push(i))}return qi(t,r),n},Nn.rest=function(t,e){if("function"!=typeof t)throw new Et(r);return Ji(t,e=e===i?e:pa(e))},Nn.reverse=Qs,Nn.sampleSize=function(t,e,n){return e=(n?ys(t,e,n):e===i)?1:pa(e),(Uo(t)?Zn:Zi)(t,e)},Nn.set=function(t,e,n){return null==t?t:Qi(t,e,n)},Nn.setWith=function(t,e,n,r){return r="function"==typeof r?r:i,null==t?t:Qi(t,e,n,r)},Nn.shuffle=function(t){return(Uo(t)?Qn:nr)(t)},Nn.slice=function(t,e,n){var r=null==t?0:t.length;return r?(n&&"number"!=typeof n&&ys(t,e,n)?(e=0,n=r):(e=null==e?0:pa(e),n=n===i?r:pa(n)),ir(t,e,n)):[]},Nn.sortBy=So,Nn.sortedUniq=function(t){return t&&t.length?ar(t):[]},Nn.sortedUniqBy=function(t,e){return t&&t.length?ar(t,ls(e,2)):[]},Nn.split=function(t,e,n){return n&&"number"!=typeof n&&ys(t,e,n)&&(e=n=i),(n=n===i?g:n>>>0)?(t=_a(t))&&("string"==typeof e||null!=e&&!sa(e))&&!(e=cr(e))&&an(t)?vr(pn(t),0,n):t.split(e,n):[]},Nn.spread=function(t,e){if("function"!=typeof t)throw new Et(r);return e=null==e?0:_n(pa(e),0),Ji((function(n){var i=n[e],r=vr(n,0,e);return i&&Ie(r,i),Oe(t,this,r)}))},Nn.tail=function(t){var e=null==t?0:t.length;return e?ir(t,1,e):[]},Nn.take=function(t,e,n){return t&&t.length?ir(t,0,(e=n||e===i?1:pa(e))<0?0:e):[]},Nn.takeRight=function(t,e,n){var r=null==t?0:t.length;return r?ir(t,(e=r-(e=n||e===i?1:pa(e)))<0?0:e,r):[]},Nn.takeRightWhile=function(t,e){return t&&t.length?dr(t,ls(e,3),!1,!0):[]},Nn.takeWhile=function(t,e){return t&&t.length?dr(t,ls(e,3)):[]},Nn.tap=function(t,e){return e(t),t},Nn.throttle=function(t,e,n){var i=!0,s=!0;if("function"!=typeof t)throw new Et(r);return ta(n)&&(i="leading"in n?!!n.leading:i,s="trailing"in n?!!n.trailing:s),Co(t,e,{leading:i,maxWait:e,trailing:s})},Nn.thru=fo,Nn.toArray=fa,Nn.toPairs=ja,Nn.toPairsIn=Ba,Nn.toPath=function(t){return Uo(t)?Le(t,Fs):la(t)?[t]:Er(Is(_a(t)))},Nn.toPlainObject=ba,Nn.transform=function(t,e,n){var i=Uo(t),r=i||Xo(t)||ca(t);if(e=ls(e,4),null==n){var s=t&&t.constructor;n=r?i?new s:[]:ta(t)&&Go(s)?Vn(Yt(t)):{}}return(r?Pe:xi)(t,(function(t,i,r){return e(n,t,i,r)})),n},Nn.unary=function(t){return Ao(t,1)},Nn.union=to,Nn.unionBy=eo,Nn.unionWith=no,Nn.uniq=function(t){return t&&t.length?hr(t):[]},Nn.uniqBy=function(t,e){return t&&t.length?hr(t,ls(e,2)):[]},Nn.uniqWith=function(t,e){return e="function"==typeof e?e:i,t&&t.length?hr(t,i,e):[]},Nn.unset=function(t,e){return null==t||ur(t,e)},Nn.unzip=io,Nn.unzipWith=ro,Nn.update=function(t,e,n){return null==t?t:fr(t,e,_r(n))},Nn.updateWith=function(t,e,n,r){return r="function"==typeof r?r:i,null==t?t:fr(t,e,_r(n),r)},Nn.values=Na,Nn.valuesIn=function(t){return null==t?[]:Qe(t,Da(t))},Nn.without=so,Nn.words=Ga,Nn.wrap=function(t,e){return zo(_r(e),t)},Nn.xor=oo,Nn.xorBy=ao,Nn.xorWith=lo,Nn.zip=co,Nn.zipObject=function(t,e){return mr(t||[],e||[],ei)},Nn.zipObjectDeep=function(t,e){return mr(t||[],e||[],Qi)},Nn.zipWith=ho,Nn.entries=ja,Nn.entriesIn=Ba,Nn.extend=xa,Nn.extendWith=va,al(Nn,Nn),Nn.add=_l,Nn.attempt=Za,Nn.camelCase=Va,Nn.capitalize=Wa,Nn.ceil=yl,Nn.clamp=function(t,e,n){return n===i&&(n=e,e=i),n!==i&&(n=(n=ma(n))==n?n:0),e!==i&&(e=(e=ma(e))==e?e:0),ai(ma(t),e,n)},Nn.clone=function(t){return li(t,4)},Nn.cloneDeep=function(t){return li(t,5)},Nn.cloneDeepWith=function(t,e){return li(t,5,e="function"==typeof e?e:i)},Nn.cloneWith=function(t,e){return li(t,4,e="function"==typeof e?e:i)},Nn.conformsTo=function(t,e){return null==e||ci(t,e,Ca(e))},Nn.deburr=Ha,Nn.defaultTo=function(t,e){return null==t||t!=t?e:t},Nn.divide=xl,Nn.endsWith=function(t,e,n){t=_a(t),e=cr(e);var r=t.length,s=n=n===i?r:ai(pa(n),0,r);return(n-=e.length)>=0&&t.slice(n,s)==e},Nn.eq=No,Nn.escape=function(t){return(t=_a(t))&&J.test(t)?t.replace(X,sn):t},Nn.escapeRegExp=function(t){return(t=_a(t))&&rt.test(t)?t.replace(it,"\\$&"):t},Nn.every=function(t,e,n){var r=Uo(t)?Te:pi;return n&&ys(t,e,n)&&(e=i),r(t,ls(e,3))},Nn.find=mo,Nn.findIndex=Ws,Nn.findKey=function(t,e){return Ne(t,ls(e,3),xi)},Nn.findLast=bo,Nn.findLastIndex=Hs,Nn.findLastKey=function(t,e){return Ne(t,ls(e,3),vi)},Nn.floor=vl,Nn.forEach=_o,Nn.forEachRight=yo,Nn.forIn=function(t,e){return null==t?t:_i(t,ls(e,3),Da)},Nn.forInRight=function(t,e){return null==t?t:yi(t,ls(e,3),Da)},Nn.forOwn=function(t,e){return t&&xi(t,ls(e,3))},Nn.forOwnRight=function(t,e){return t&&vi(t,ls(e,3))},Nn.get=Oa,Nn.gt=Vo,Nn.gte=Wo,Nn.has=function(t,e){return null!=t&&gs(t,e,Ai)},Nn.hasIn=Aa,Nn.head=$s,Nn.identity=il,Nn.includes=function(t,e,n,i){t=Yo(t)?t:Na(t),n=n&&!i?pa(n):0;var r=t.length;return n<0&&(n=_n(r+n,0)),aa(t)?n<=r&&t.indexOf(e,n)>-1:!!r&&We(t,e,n)>-1},Nn.indexOf=function(t,e,n){var i=null==t?0:t.length;if(!i)return-1;var r=null==n?0:pa(n);return r<0&&(r=_n(i+r,0)),We(t,e,r)},Nn.inRange=function(t,e,n){return e=da(e),n===i?(n=e,e=0):n=da(n),function(t,e,n){return t>=yn(e,n)&&t<_n(e,n)}(t=ma(t),e,n)},Nn.invoke=Ta,Nn.isArguments=Ho,Nn.isArray=Uo,Nn.isArrayBuffer=$o,Nn.isArrayLike=Yo,Nn.isArrayLikeObject=qo,Nn.isBoolean=function(t){return!0===t||!1===t||ea(t)&&Si(t)==y},Nn.isBuffer=Xo,Nn.isDate=Ko,Nn.isElement=function(t){return ea(t)&&1===t.nodeType&&!ra(t)},Nn.isEmpty=function(t){if(null==t)return!0;if(Yo(t)&&(Uo(t)||"string"==typeof t||"function"==typeof t.splice||Xo(t)||ca(t)||Ho(t)))return!t.length;var e=ps(t);if(e==M||e==E)return!t.size;if(ks(t))return!Fi(t).length;for(var n in t)if(It.call(t,n))return!1;return!0},Nn.isEqual=function(t,e){return Di(t,e)},Nn.isEqualWith=function(t,e,n){var r=(n="function"==typeof n?n:i)?n(t,e):i;return r===i?Di(t,e,i,n):!!r},Nn.isError=Jo,Nn.isFinite=function(t){return"number"==typeof t&&ye(t)},Nn.isFunction=Go,Nn.isInteger=Zo,Nn.isLength=Qo,Nn.isMap=na,Nn.isMatch=function(t,e){return t===e||Ri(t,e,hs(e))},Nn.isMatchWith=function(t,e,n){return n="function"==typeof n?n:i,Ri(t,e,hs(e),n)},Nn.isNaN=function(t){return ia(t)&&t!=+t},Nn.isNative=function(t){if(ws(t))throw new kt("Unsupported core-js use. Try https://npms.io/search?q=ponyfill.");return Li(t)},Nn.isNil=function(t){return null==t},Nn.isNull=function(t){return null===t},Nn.isNumber=ia,Nn.isObject=ta,Nn.isObjectLike=ea,Nn.isPlainObject=ra,Nn.isRegExp=sa,Nn.isSafeInteger=function(t){return Zo(t)&&t>=-9007199254740991&&t<=d},Nn.isSet=oa,Nn.isString=aa,Nn.isSymbol=la,Nn.isTypedArray=ca,Nn.isUndefined=function(t){return t===i},Nn.isWeakMap=function(t){return ea(t)&&ps(t)==D},Nn.isWeakSet=function(t){return ea(t)&&"[object WeakSet]"==Si(t)},Nn.join=function(t,e){return null==t?"":Be.call(t,e)},Nn.kebabCase=Ua,Nn.last=Ks,Nn.lastIndexOf=function(t,e,n){var r=null==t?0:t.length;if(!r)return-1;var s=r;return n!==i&&(s=(s=pa(n))<0?_n(r+s,0):yn(s,r-1)),e==e?function(t,e,n){for(var i=n+1;i--;)if(t[i]===e)return i;return i}(t,e,s):Ve(t,Ue,s,!0)},Nn.lowerCase=$a,Nn.lowerFirst=Ya,Nn.lt=ha,Nn.lte=ua,Nn.max=function(t){return t&&t.length?gi(t,il,Oi):i},Nn.maxBy=function(t,e){return t&&t.length?gi(t,ls(e,2),Oi):i},Nn.mean=function(t){return $e(t,il)},Nn.meanBy=function(t,e){return $e(t,ls(e,2))},Nn.min=function(t){return t&&t.length?gi(t,il,ji):i},Nn.minBy=function(t,e){return t&&t.length?gi(t,ls(e,2),ji):i},Nn.stubArray=gl,Nn.stubFalse=ml,Nn.stubObject=function(){return{}},Nn.stubString=function(){return""},Nn.stubTrue=function(){return!0},Nn.multiply=wl,Nn.nth=function(t,e){return t&&t.length?Hi(t,pa(e)):i},Nn.noConflict=function(){return pe._===this&&(pe._=Nt),this},Nn.noop=ll,Nn.now=Oo,Nn.pad=function(t,e,n){t=_a(t);var i=(e=pa(e))?dn(t):0;if(!e||i>=e)return t;var r=(e-i)/2;return Ur(ge(r),n)+t+Ur(de(r),n)},Nn.padEnd=function(t,e,n){t=_a(t);var i=(e=pa(e))?dn(t):0;return e&&i<e?t+Ur(e-i,n):t},Nn.padStart=function(t,e,n){t=_a(t);var i=(e=pa(e))?dn(t):0;return e&&i<e?Ur(e-i,n)+t:t},Nn.parseInt=function(t,e,n){return n||null==e?e=0:e&&(e=+e),vn(_a(t).replace(st,""),e||0)},Nn.random=function(t,e,n){if(n&&"boolean"!=typeof n&&ys(t,e,n)&&(e=n=i),n===i&&("boolean"==typeof e?(n=e,e=i):"boolean"==typeof t&&(n=t,t=i)),t===i&&e===i?(t=0,e=1):(t=da(t),e===i?(e=t,t=0):e=da(e)),t>e){var r=t;t=e,e=r}if(n||t%1||e%1){var s=wn();return yn(t+s*(e-t+he("1e-"+((s+"").length-1))),e)}return Xi(t,e)},Nn.reduce=function(t,e,n){var i=Uo(t)?Fe:Xe,r=arguments.length<3;return i(t,ls(e,4),n,r,fi)},Nn.reduceRight=function(t,e,n){var i=Uo(t)?ze:Xe,r=arguments.length<3;return i(t,ls(e,4),n,r,di)},Nn.repeat=function(t,e,n){return e=(n?ys(t,e,n):e===i)?1:pa(e),Ki(_a(t),e)},Nn.replace=function(){var t=arguments,e=_a(t[0]);return t.length<3?e:e.replace(t[1],t[2])},Nn.result=function(t,e,n){var r=-1,s=(e=yr(e,t)).length;for(s||(s=1,t=i);++r<s;){var o=null==t?i:t[Fs(e[r])];o===i&&(r=s,o=n),t=Go(o)?o.call(t):o}return t},Nn.round=kl,Nn.runInContext=t,Nn.sample=function(t){return(Uo(t)?Gn:Gi)(t)},Nn.size=function(t){if(null==t)return 0;if(Yo(t))return aa(t)?dn(t):t.length;var e=ps(t);return e==M||e==E?t.size:Fi(t).length},Nn.snakeCase=qa,Nn.some=function(t,e,n){var r=Uo(t)?je:rr;return n&&ys(t,e,n)&&(e=i),r(t,ls(e,3))},Nn.sortedIndex=function(t,e){return sr(t,e)},Nn.sortedIndexBy=function(t,e,n){return or(t,e,ls(n,2))},Nn.sortedIndexOf=function(t,e){var n=null==t?0:t.length;if(n){var i=sr(t,e);if(i<n&&No(t[i],e))return i}return-1},Nn.sortedLastIndex=function(t,e){return sr(t,e,!0)},Nn.sortedLastIndexBy=function(t,e,n){return or(t,e,ls(n,2),!0)},Nn.sortedLastIndexOf=function(t,e){if(null!=t&&t.length){var n=sr(t,e,!0)-1;if(No(t[n],e))return n}return-1},Nn.startCase=Xa,Nn.startsWith=function(t,e,n){return t=_a(t),n=null==n?0:ai(pa(n),0,t.length),e=cr(e),t.slice(n,n+e.length)==e},Nn.subtract=Ml,Nn.sum=function(t){return t&&t.length?Ke(t,il):0},Nn.sumBy=function(t,e){return t&&t.length?Ke(t,ls(e,2)):0},Nn.template=function(t,e,n){var r=Nn.templateSettings;n&&ys(t,e,n)&&(e=i),t=_a(t),e=va({},e,r,Zr);var s,o,a=va({},e.imports,r.imports,Zr),l=Ca(a),c=Qe(a,l),h=0,u=e.interpolate||vt,f="__p += '",d=At((e.escape||vt).source+"|"+u.source+"|"+(u===Q?dt:vt).source+"|"+(e.evaluate||vt).source+"|$","g"),p="//# sourceURL="+(It.call(e,"sourceURL")?(e.sourceURL+"").replace(/\s/g," "):"lodash.templateSources["+ ++oe+"]")+"\n";t.replace(d,(function(e,n,i,r,a,l){return i||(i=r),f+=t.slice(h,l).replace(wt,on),n&&(s=!0,f+="' +\n__e("+n+") +\n'"),a&&(o=!0,f+="';\n"+a+";\n__p += '"),i&&(f+="' +\n((__t = ("+i+")) == null ? '' : __t) +\n'"),h=l+e.length,e})),f+="';\n";var g=It.call(e,"variable")&&e.variable;if(g){if(ut.test(g))throw new kt("Invalid `variable` option passed into `_.template`")}else f="with (obj) {\n"+f+"\n}\n";f=(o?f.replace(U,""):f).replace($,"$1").replace(Y,"$1;"),f="function("+(g||"obj")+") {\n"+(g?"":"obj || (obj = {});\n")+"var __t, __p = ''"+(s?", __e = _.escape":"")+(o?", __j = Array.prototype.join;\nfunction print() { __p += __j.call(arguments, '') }\n":";\n")+f+"return __p\n}";var m=Za((function(){return Mt(l,p+"return "+f).apply(i,c)}));if(m.source=f,Jo(m))throw m;return m},Nn.times=function(t,e){if((t=pa(t))<1||t>d)return[];var n=g,i=yn(t,g);e=ls(e),t-=g;for(var r=Je(i,e);++n<t;)e(n);return r},Nn.toFinite=da,Nn.toInteger=pa,Nn.toLength=ga,Nn.toLower=function(t){return _a(t).toLowerCase()},Nn.toNumber=ma,Nn.toSafeInteger=function(t){return t?ai(pa(t),-9007199254740991,d):0===t?t:0},Nn.toString=_a,Nn.toUpper=function(t){return _a(t).toUpperCase()},Nn.trim=function(t,e,n){if((t=_a(t))&&(n||e===i))return Ge(t);if(!t||!(e=cr(e)))return t;var r=pn(t),s=pn(e);return vr(r,en(r,s),nn(r,s)+1).join("")},Nn.trimEnd=function(t,e,n){if((t=_a(t))&&(n||e===i))return t.slice(0,gn(t)+1);if(!t||!(e=cr(e)))return t;var r=pn(t);return vr(r,0,nn(r,pn(e))+1).join("")},Nn.trimStart=function(t,e,n){if((t=_a(t))&&(n||e===i))return t.replace(st,"");if(!t||!(e=cr(e)))return t;var r=pn(t);return vr(r,en(r,pn(e))).join("")},Nn.truncate=function(t,e){var n=30,r="...";if(ta(e)){var s="separator"in e?e.separator:s;n="length"in e?pa(e.length):n,r="omission"in e?cr(e.omission):r}var o=(t=_a(t)).length;if(an(t)){var a=pn(t);o=a.length}if(n>=o)return t;var l=n-dn(r);if(l<1)return r;var c=a?vr(a,0,l).join(""):t.slice(0,l);if(s===i)return c+r;if(a&&(l+=c.length-l),sa(s)){if(t.slice(l).search(s)){var h,u=c;for(s.global||(s=At(s.source,_a(pt.exec(s))+"g")),s.lastIndex=0;h=s.exec(u);)var f=h.index;c=c.slice(0,f===i?l:f)}}else if(t.indexOf(cr(s),l)!=l){var d=c.lastIndexOf(s);d>-1&&(c=c.slice(0,d))}return c+r},Nn.unescape=function(t){return(t=_a(t))&&K.test(t)?t.replace(q,mn):t},Nn.uniqueId=function(t){var e=++Ft;return _a(t)+e},Nn.upperCase=Ka,Nn.upperFirst=Ja,Nn.each=_o,Nn.eachRight=yo,Nn.first=$s,al(Nn,(bl={},xi(Nn,(function(t,e){It.call(Nn.prototype,e)||(bl[e]=t)})),bl),{chain:!1}),Nn.VERSION="4.17.21",Pe(["bind","bindKey","curry","curryRight","partial","partialRight"],(function(t){Nn[t].placeholder=Nn})),Pe(["drop","take"],(function(t,e){Un.prototype[t]=function(n){n=n===i?1:_n(pa(n),0);var r=this.__filtered__&&!e?new Un(this):this.clone();return r.__filtered__?r.__takeCount__=yn(n,r.__takeCount__):r.__views__.push({size:yn(n,g),type:t+(r.__dir__<0?"Right":"")}),r},Un.prototype[t+"Right"]=function(e){return this.reverse()[t](e).reverse()}})),Pe(["filter","map","takeWhile"],(function(t,e){var n=e+1,i=1==n||3==n;Un.prototype[t]=function(t){var e=this.clone();return e.__iteratees__.push({iteratee:ls(t,3),type:n}),e.__filtered__=e.__filtered__||i,e}})),Pe(["head","last"],(function(t,e){var n="take"+(e?"Right":"");Un.prototype[t]=function(){return this[n](1).value()[0]}})),Pe(["initial","tail"],(function(t,e){var n="drop"+(e?"":"Right");Un.prototype[t]=function(){return this.__filtered__?new Un(this):this[n](1)}})),Un.prototype.compact=function(){return this.filter(il)},Un.prototype.find=function(t){return this.filter(t).head()},Un.prototype.findLast=function(t){return this.reverse().find(t)},Un.prototype.invokeMap=Ji((function(t,e){return"function"==typeof t?new Un(this):this.map((function(n){return Ti(n,t,e)}))})),Un.prototype.reject=function(t){return this.filter(Io(ls(t)))},Un.prototype.slice=function(t,e){t=pa(t);var n=this;return n.__filtered__&&(t>0||e<0)?new Un(n):(t<0?n=n.takeRight(-t):t&&(n=n.drop(t)),e!==i&&(n=(e=pa(e))<0?n.dropRight(-e):n.take(e-t)),n)},Un.prototype.takeRightWhile=function(t){return this.reverse().takeWhile(t).reverse()},Un.prototype.toArray=function(){return this.take(g)},xi(Un.prototype,(function(t,e){var n=/^(?:filter|find|map|reject)|While$/.test(e),r=/^(?:head|last)$/.test(e),s=Nn[r?"take"+("last"==e?"Right":""):e],o=r||/^find/.test(e);s&&(Nn.prototype[e]=function(){var e=this.__wrapped__,a=r?[1]:arguments,l=e instanceof Un,c=a[0],h=l||Uo(e),u=function(t){var e=s.apply(Nn,Ie([t],a));return r&&f?e[0]:e};h&&n&&"function"==typeof c&&1!=c.length&&(l=h=!1);var f=this.__chain__,d=!!this.__actions__.length,p=o&&!f,g=l&&!d;if(!o&&h){e=g?e:new Un(this);var m=t.apply(e,a);return m.__actions__.push({func:fo,args:[u],thisArg:i}),new Hn(m,f)}return p&&g?t.apply(this,a):(m=this.thru(u),p?r?m.value()[0]:m.value():m)})})),Pe(["pop","push","shift","sort","splice","unshift"],(function(t){var e=Tt[t],n=/^(?:push|sort|unshift)$/.test(t)?"tap":"thru",i=/^(?:pop|shift)$/.test(t);Nn.prototype[t]=function(){var t=arguments;if(i&&!this.__chain__){var r=this.value();return e.apply(Uo(r)?r:[],t)}return this[n]((function(n){return e.apply(Uo(n)?n:[],t)}))}})),xi(Un.prototype,(function(t,e){var n=Nn[e];if(n){var i=n.name+"";It.call(Cn,i)||(Cn[i]=[]),Cn[i].push({name:e,func:n})}})),Cn[Nr(i,2).name]=[{name:"wrapper",func:i}],Un.prototype.clone=function(){var t=new Un(this.__wrapped__);return t.__actions__=Er(this.__actions__),t.__dir__=this.__dir__,t.__filtered__=this.__filtered__,t.__iteratees__=Er(this.__iteratees__),t.__takeCount__=this.__takeCount__,t.__views__=Er(this.__views__),t},Un.prototype.reverse=function(){if(this.__filtered__){var t=new Un(this);t.__dir__=-1,t.__filtered__=!0}else(t=this.clone()).__dir__*=-1;return t},Un.prototype.value=function(){var t=this.__wrapped__.value(),e=this.__dir__,n=Uo(t),i=e<0,r=n?t.length:0,s=function(t,e,n){for(var i=-1,r=n.length;++i<r;){var s=n[i],o=s.size;switch(s.type){case"drop":t+=o;break;case"dropRight":e-=o;break;case"take":e=yn(e,t+o);break;case"takeRight":t=_n(t,e-o)}}return{start:t,end:e}}(0,r,this.__views__),o=s.start,a=s.end,l=a-o,c=i?a:o-1,h=this.__iteratees__,u=h.length,f=0,d=yn(l,this.__takeCount__);if(!n||!i&&r==l&&d==l)return pr(t,this.__actions__);var p=[];t:for(;l--&&f<d;){for(var g=-1,m=t[c+=e];++g<u;){var b=h[g],_=b.iteratee,y=b.type,x=_(m);if(2==y)m=x;else if(!x){if(1==y)continue t;break t}}p[f++]=m}return p},Nn.prototype.at=po,Nn.prototype.chain=function(){return uo(this)},Nn.prototype.commit=function(){return new Hn(this.value(),this.__chain__)},Nn.prototype.next=function(){this.__values__===i&&(this.__values__=fa(this.value()));var t=this.__index__>=this.__values__.length;return{done:t,value:t?i:this.__values__[this.__index__++]}},Nn.prototype.plant=function(t){for(var e,n=this;n instanceof Wn;){var r=js(n);r.__index__=0,r.__values__=i,e?s.__wrapped__=r:e=r;var s=r;n=n.__wrapped__}return s.__wrapped__=t,e},Nn.prototype.reverse=function(){var t=this.__wrapped__;if(t instanceof Un){var e=t;return this.__actions__.length&&(e=new Un(this)),(e=e.reverse()).__actions__.push({func:fo,args:[Qs],thisArg:i}),new Hn(e,this.__chain__)}return this.thru(Qs)},Nn.prototype.toJSON=Nn.prototype.valueOf=Nn.prototype.value=function(){return pr(this.__wrapped__,this.__actions__)},Nn.prototype.first=Nn.prototype.head,Gt&&(Nn.prototype[Gt]=function(){return this}),Nn}();me?((me.exports=bn)._=bn,ge._=bn):pe._=bn}).call(n)}(b,m);const{toString:y}=Object.prototype,{getPrototypeOf:x}=Object,v=(w=Object.create(null),t=>{const e=y.call(t);return w[e]||(w[e]=e.slice(8,-1).toLowerCase())});var w;const k=t=>(t=t.toLowerCase(),e=>v(e)===t),M=t=>e=>typeof e===t,{isArray:S}=Array,O=M("undefined"),A=k("ArrayBuffer"),P=M("string"),E=M("function"),T=M("number"),C=t=>null!==t&&"object"==typeof t,D=t=>{if("object"!==v(t))return!1;const e=x(t);return!(null!==e&&e!==Object.prototype&&null!==Object.getPrototypeOf(e)||Symbol.toStringTag in t||Symbol.iterator in t)},R=k("Date"),L=k("File"),I=k("Blob"),F=k("FileList"),z=k("URLSearchParams");function j(t,e,{allOwnKeys:n=!1}={}){if(null==t)return;let i,r;if("object"!=typeof t&&(t=[t]),S(t))for(i=0,r=t.length;i<r;i++)e.call(null,t[i],i,t);else{const r=n?Object.getOwnPropertyNames(t):Object.keys(t),s=r.length;let o;for(i=0;i<s;i++)o=r[i],e.call(null,t[o],o,t)}}function B(t,e){e=e.toLowerCase();const n=Object.keys(t);let i,r=n.length;for(;r-- >0;)if(i=n[r],e===i.toLowerCase())return i;return null}const N="undefined"!=typeof globalThis?globalThis:"undefined"!=typeof self?self:"undefined"!=typeof window?window:global,V=t=>!O(t)&&t!==N,W=(H="undefined"!=typeof Uint8Array&&x(Uint8Array),t=>H&&t instanceof H);var H;const U=k("HTMLFormElement"),$=(({hasOwnProperty:t})=>(e,n)=>t.call(e,n))(Object.prototype),Y=k("RegExp"),q=(t,e)=>{const n=Object.getOwnPropertyDescriptors(t),i={};j(n,((n,r)=>{!1!==e(n,r,t)&&(i[r]=n)})),Object.defineProperties(t,i)},X="abcdefghijklmnopqrstuvwxyz",K="0123456789",J={DIGIT:K,ALPHA:X,ALPHA_DIGIT:X+X.toUpperCase()+K},G={isArray:S,isArrayBuffer:A,isBuffer:function(t){return null!==t&&!O(t)&&null!==t.constructor&&!O(t.constructor)&&E(t.constructor.isBuffer)&&t.constructor.isBuffer(t)},isFormData:t=>{const e="[object FormData]";return t&&("function"==typeof FormData&&t instanceof FormData||y.call(t)===e||E(t.toString)&&t.toString()===e)},isArrayBufferView:function(t){let e;return e="undefined"!=typeof ArrayBuffer&&ArrayBuffer.isView?ArrayBuffer.isView(t):t&&t.buffer&&A(t.buffer),e},isString:P,isNumber:T,isBoolean:t=>!0===t||!1===t,isObject:C,isPlainObject:D,isUndefined:O,isDate:R,isFile:L,isBlob:I,isRegExp:Y,isFunction:E,isStream:t=>C(t)&&E(t.pipe),isURLSearchParams:z,isTypedArray:W,isFileList:F,forEach:j,merge:function t(){const{caseless:e}=V(this)&&this||{},n={},i=(i,r)=>{const s=e&&B(n,r)||r;D(n[s])&&D(i)?n[s]=t(n[s],i):D(i)?n[s]=t({},i):S(i)?n[s]=i.slice():n[s]=i};for(let r=0,s=arguments.length;r<s;r++)arguments[r]&&j(arguments[r],i);return n},extend:(t,e,n,{allOwnKeys:i}={})=>(j(e,((e,i)=>{n&&E(e)?t[i]=_(e,n):t[i]=e}),{allOwnKeys:i}),t),trim:t=>t.trim?t.trim():t.replace(/^[\s\uFEFF\xA0]+|[\s\uFEFF\xA0]+$/g,""),stripBOM:t=>(65279===t.charCodeAt(0)&&(t=t.slice(1)),t),inherits:(t,e,n,i)=>{t.prototype=Object.create(e.prototype,i),t.prototype.constructor=t,Object.defineProperty(t,"super",{value:e.prototype}),n&&Object.assign(t.prototype,n)},toFlatObject:(t,e,n,i)=>{let r,s,o;const a={};if(e=e||{},null==t)return e;do{for(r=Object.getOwnPropertyNames(t),s=r.length;s-- >0;)o=r[s],i&&!i(o,t,e)||a[o]||(e[o]=t[o],a[o]=!0);t=!1!==n&&x(t)}while(t&&(!n||n(t,e))&&t!==Object.prototype);return e},kindOf:v,kindOfTest:k,endsWith:(t,e,n)=>{t=String(t),(void 0===n||n>t.length)&&(n=t.length),n-=e.length;const i=t.indexOf(e,n);return-1!==i&&i===n},toArray:t=>{if(!t)return null;if(S(t))return t;let e=t.length;if(!T(e))return null;const n=new Array(e);for(;e-- >0;)n[e]=t[e];return n},forEachEntry:(t,e)=>{const n=(t&&t[Symbol.iterator]).call(t);let i;for(;(i=n.next())&&!i.done;){const n=i.value;e.call(t,n[0],n[1])}},matchAll:(t,e)=>{let n;const i=[];for(;null!==(n=t.exec(e));)i.push(n);return i},isHTMLForm:U,hasOwnProperty:$,hasOwnProp:$,reduceDescriptors:q,freezeMethods:t=>{q(t,((e,n)=>{if(E(t)&&-1!==["arguments","caller","callee"].indexOf(n))return!1;const i=t[n];E(i)&&(e.enumerable=!1,"writable"in e?e.writable=!1:e.set||(e.set=()=>{throw Error("Can not rewrite read-only method '"+n+"'")}))}))},toObjectSet:(t,e)=>{const n={},i=t=>{t.forEach((t=>{n[t]=!0}))};return S(t)?i(t):i(String(t).split(e)),n},toCamelCase:t=>t.toLowerCase().replace(/[-_\s]([a-z\d])(\w*)/g,(function(t,e,n){return e.toUpperCase()+n})),noop:()=>{},toFiniteNumber:(t,e)=>(t=+t,Number.isFinite(t)?t:e),findKey:B,global:N,isContextDefined:V,ALPHABET:J,generateString:(t=16,e=J.ALPHA_DIGIT)=>{let n="";const{length:i}=e;for(;t--;)n+=e[Math.random()*i|0];return n},isSpecCompliantForm:function(t){return!!(t&&E(t.append)&&"FormData"===t[Symbol.toStringTag]&&t[Symbol.iterator])},toJSONObject:t=>{const e=new Array(10),n=(t,i)=>{if(C(t)){if(e.indexOf(t)>=0)return;if(!("toJSON"in t)){e[i]=t;const r=S(t)?[]:{};return j(t,((t,e)=>{const s=n(t,i+1);!O(s)&&(r[e]=s)})),e[i]=void 0,r}}return t};return n(t,0)}};function Z(t,e,n,i,r){Error.call(this),Error.captureStackTrace?Error.captureStackTrace(this,this.constructor):this.stack=(new Error).stack,this.message=t,this.name="AxiosError",e&&(this.code=e),n&&(this.config=n),i&&(this.request=i),r&&(this.response=r)}G.inherits(Z,Error,{toJSON:function(){return{message:this.message,name:this.name,description:this.description,number:this.number,fileName:this.fileName,lineNumber:this.lineNumber,columnNumber:this.columnNumber,stack:this.stack,config:G.toJSONObject(this.config),code:this.code,status:this.response&&this.response.status?this.response.status:null}}});const Q=Z.prototype,tt={};function et(t){return G.isPlainObject(t)||G.isArray(t)}function nt(t){return G.endsWith(t,"[]")?t.slice(0,-2):t}function it(t,e,n){return t?t.concat(e).map((function(t,e){return t=nt(t),!n&&e?"["+t+"]":t})).join(n?".":""):e}["ERR_BAD_OPTION_VALUE","ERR_BAD_OPTION","ECONNABORTED","ETIMEDOUT","ERR_NETWORK","ERR_FR_TOO_MANY_REDIRECTS","ERR_DEPRECATED","ERR_BAD_RESPONSE","ERR_BAD_REQUEST","ERR_CANCELED","ERR_NOT_SUPPORT","ERR_INVALID_URL"].forEach((t=>{tt[t]={value:t}})),Object.defineProperties(Z,tt),Object.defineProperty(Q,"isAxiosError",{value:!0}),Z.from=(t,e,n,i,r,s)=>{const o=Object.create(Q);return G.toFlatObject(t,o,(function(t){return t!==Error.prototype}),(t=>"isAxiosError"!==t)),Z.call(o,t.message,e,n,i,r),o.cause=t,o.name=t.name,s&&Object.assign(o,s),o};const rt=G.toFlatObject(G,{},null,(function(t){return/^is[A-Z]/.test(t)}));function st(t,e,n){if(!G.isObject(t))throw new TypeError("target must be an object");e=e||new FormData;const i=(n=G.toFlatObject(n,{metaTokens:!0,dots:!1,indexes:!1},!1,(function(t,e){return!G.isUndefined(e[t])}))).metaTokens,r=n.visitor||c,s=n.dots,o=n.indexes,a=(n.Blob||"undefined"!=typeof Blob&&Blob)&&G.isSpecCompliantForm(e);if(!G.isFunction(r))throw new TypeError("visitor must be a function");function l(t){if(null===t)return"";if(G.isDate(t))return t.toISOString();if(!a&&G.isBlob(t))throw new Z("Blob is not supported. Use a Buffer instead.");return G.isArrayBuffer(t)||G.isTypedArray(t)?a&&"function"==typeof Blob?new Blob([t]):Buffer.from(t):t}function c(t,n,r){let a=t;if(t&&!r&&"object"==typeof t)if(G.endsWith(n,"{}"))n=i?n:n.slice(0,-2),t=JSON.stringify(t);else if(G.isArray(t)&&function(t){return G.isArray(t)&&!t.some(et)}(t)||(G.isFileList(t)||G.endsWith(n,"[]"))&&(a=G.toArray(t)))return n=nt(n),a.forEach((function(t,i){!G.isUndefined(t)&&null!==t&&e.append(!0===o?it([n],i,s):null===o?n:n+"[]",l(t))})),!1;return!!et(t)||(e.append(it(r,n,s),l(t)),!1)}const h=[],u=Object.assign(rt,{defaultVisitor:c,convertValue:l,isVisitable:et});if(!G.isObject(t))throw new TypeError("data must be an object");return function t(n,i){if(!G.isUndefined(n)){if(-1!==h.indexOf(n))throw Error("Circular reference detected in "+i.join("."));h.push(n),G.forEach(n,(function(n,s){!0===(!(G.isUndefined(n)||null===n)&&r.call(e,n,G.isString(s)?s.trim():s,i,u))&&t(n,i?i.concat(s):[s])})),h.pop()}}(t),e}function ot(t){const e={"!":"%21","'":"%27","(":"%28",")":"%29","~":"%7E","%20":"+","%00":"\0"};return encodeURIComponent(t).replace(/[!'()~]|%20|%00/g,(function(t){return e[t]}))}function at(t,e){this._pairs=[],t&&st(t,this,e)}const lt=at.prototype;function ct(t){return encodeURIComponent(t).replace(/%3A/gi,":").replace(/%24/g,"$").replace(/%2C/gi,",").replace(/%20/g,"+").replace(/%5B/gi,"[").replace(/%5D/gi,"]")}function ht(t,e,n){if(!e)return t;const i=n&&n.encode||ct,r=n&&n.serialize;let s;if(s=r?r(e,n):G.isURLSearchParams(e)?e.toString():new at(e,n).toString(i),s){const e=t.indexOf("#");-1!==e&&(t=t.slice(0,e)),t+=(-1===t.indexOf("?")?"?":"&")+s}return t}lt.append=function(t,e){this._pairs.push([t,e])},lt.toString=function(t){const e=t?function(e){return t.call(this,e,ot)}:ot;return this._pairs.map((function(t){return e(t[0])+"="+e(t[1])}),"").join("&")};const ut=class{constructor(){this.handlers=[]}use(t,e,n){return this.handlers.push({fulfilled:t,rejected:e,synchronous:!!n&&n.synchronous,runWhen:n?n.runWhen:null}),this.handlers.length-1}eject(t){this.handlers[t]&&(this.handlers[t]=null)}clear(){this.handlers&&(this.handlers=[])}forEach(t){G.forEach(this.handlers,(function(e){null!==e&&t(e)}))}},ft={silentJSONParsing:!0,forcedJSONParsing:!0,clarifyTimeoutError:!1},dt={isBrowser:!0,classes:{URLSearchParams:"undefined"!=typeof URLSearchParams?URLSearchParams:at,FormData:"undefined"!=typeof FormData?FormData:null,Blob:"undefined"!=typeof Blob?Blob:null},isStandardBrowserEnv:(()=>{let t;return("undefined"==typeof navigator||"ReactNative"!==(t=navigator.product)&&"NativeScript"!==t&&"NS"!==t)&&"undefined"!=typeof window&&"undefined"!=typeof document})(),isStandardBrowserWebWorkerEnv:"undefined"!=typeof WorkerGlobalScope&&self instanceof WorkerGlobalScope&&"function"==typeof self.importScripts,protocols:["http","https","file","blob","url","data"]};function pt(t){function e(t,n,i,r){let s=t[r++];const o=Number.isFinite(+s),a=r>=t.length;return s=!s&&G.isArray(i)?i.length:s,a?(G.hasOwnProp(i,s)?i[s]=[i[s],n]:i[s]=n,!o):(i[s]&&G.isObject(i[s])||(i[s]=[]),e(t,n,i[s],r)&&G.isArray(i[s])&&(i[s]=function(t){const e={},n=Object.keys(t);let i;const r=n.length;let s;for(i=0;i<r;i++)s=n[i],e[s]=t[s];return e}(i[s])),!o)}if(G.isFormData(t)&&G.isFunction(t.entries)){const n={};return G.forEachEntry(t,((t,i)=>{e(function(t){return G.matchAll(/\w+|\[(\w*)]/g,t).map((t=>"[]"===t[0]?"":t[1]||t[0]))}(t),i,n,0)})),n}return null}const gt={"Content-Type":void 0},mt={transitional:ft,adapter:["xhr","http"],transformRequest:[function(t,e){const n=e.getContentType()||"",i=n.indexOf("application/json")>-1,r=G.isObject(t);if(r&&G.isHTMLForm(t)&&(t=new FormData(t)),G.isFormData(t))return i&&i?JSON.stringify(pt(t)):t;if(G.isArrayBuffer(t)||G.isBuffer(t)||G.isStream(t)||G.isFile(t)||G.isBlob(t))return t;if(G.isArrayBufferView(t))return t.buffer;if(G.isURLSearchParams(t))return e.setContentType("application/x-www-form-urlencoded;charset=utf-8",!1),t.toString();let s;if(r){if(n.indexOf("application/x-www-form-urlencoded")>-1)return function(t,e){return st(t,new dt.classes.URLSearchParams,Object.assign({visitor:function(t,e,n,i){return dt.isNode&&G.isBuffer(t)?(this.append(e,t.toString("base64")),!1):i.defaultVisitor.apply(this,arguments)}},e))}(t,this.formSerializer).toString();if((s=G.isFileList(t))||n.indexOf("multipart/form-data")>-1){const e=this.env&&this.env.FormData;return st(s?{"files[]":t}:t,e&&new e,this.formSerializer)}}return r||i?(e.setContentType("application/json",!1),function(t,e,n){if(G.isString(t))try{return(e||JSON.parse)(t),G.trim(t)}catch(i){if("SyntaxError"!==i.name)throw i}return(n||JSON.stringify)(t)}(t)):t}],transformResponse:[function(t){const e=this.transitional||mt.transitional,n=e&&e.forcedJSONParsing,i="json"===this.responseType;if(t&&G.isString(t)&&(n&&!this.responseType||i)){const n=!(e&&e.silentJSONParsing)&&i;try{return JSON.parse(t)}catch(r){if(n){if("SyntaxError"===r.name)throw Z.from(r,Z.ERR_BAD_RESPONSE,this,null,this.response);throw r}}}return t}],timeout:0,xsrfCookieName:"XSRF-TOKEN",xsrfHeaderName:"X-XSRF-TOKEN",maxContentLength:-1,maxBodyLength:-1,env:{FormData:dt.classes.FormData,Blob:dt.classes.Blob},validateStatus:function(t){return t>=200&&t<300},headers:{common:{Accept:"application/json, text/plain, */*"}}};G.forEach(["delete","get","head"],(function(t){mt.headers[t]={}})),G.forEach(["post","put","patch"],(function(t){mt.headers[t]=G.merge(gt)}));const bt=mt,_t=G.toObjectSet(["age","authorization","content-length","content-type","etag","expires","from","host","if-modified-since","if-unmodified-since","last-modified","location","max-forwards","proxy-authorization","referer","retry-after","user-agent"]),yt=Symbol("internals");function xt(t){return t&&String(t).trim().toLowerCase()}function vt(t){return!1===t||null==t?t:G.isArray(t)?t.map(vt):String(t)}function wt(t,e,n,i,r){return G.isFunction(i)?i.call(this,e,n):(r&&(e=n),G.isString(e)?G.isString(i)?-1!==e.indexOf(i):G.isRegExp(i)?i.test(e):void 0:void 0)}class kt{constructor(t){t&&this.set(t)}set(t,e,n){const i=this;function r(t,e,n){const r=xt(e);if(!r)throw new Error("header name must be a non-empty string");const s=G.findKey(i,r);(!s||void 0===i[s]||!0===n||void 0===n&&!1!==i[s])&&(i[s||e]=vt(t))}const s=(t,e)=>G.forEach(t,((t,n)=>r(t,n,e)));return G.isPlainObject(t)||t instanceof this.constructor?s(t,e):G.isString(t)&&(t=t.trim())&&!/^[-_a-zA-Z0-9^`|~,!#$%&'*+.]+$/.test(t.trim())?s((t=>{const e={};let n,i,r;return t&&t.split("\n").forEach((function(t){r=t.indexOf(":"),n=t.substring(0,r).trim().toLowerCase(),i=t.substring(r+1).trim(),!n||e[n]&&_t[n]||("set-cookie"===n?e[n]?e[n].push(i):e[n]=[i]:e[n]=e[n]?e[n]+", "+i:i)})),e})(t),e):null!=t&&r(e,t,n),this}get(t,e){if(t=xt(t)){const n=G.findKey(this,t);if(n){const t=this[n];if(!e)return t;if(!0===e)return function(t){const e=Object.create(null),n=/([^\s,;=]+)\s*(?:=\s*([^,;]+))?/g;let i;for(;i=n.exec(t);)e[i[1]]=i[2];return e}(t);if(G.isFunction(e))return e.call(this,t,n);if(G.isRegExp(e))return e.exec(t);throw new TypeError("parser must be boolean|regexp|function")}}}has(t,e){if(t=xt(t)){const n=G.findKey(this,t);return!(!n||void 0===this[n]||e&&!wt(0,this[n],n,e))}return!1}delete(t,e){const n=this;let i=!1;function r(t){if(t=xt(t)){const r=G.findKey(n,t);!r||e&&!wt(0,n[r],r,e)||(delete n[r],i=!0)}}return G.isArray(t)?t.forEach(r):r(t),i}clear(t){const e=Object.keys(this);let n=e.length,i=!1;for(;n--;){const r=e[n];t&&!wt(0,this[r],r,t,!0)||(delete this[r],i=!0)}return i}normalize(t){const e=this,n={};return G.forEach(this,((i,r)=>{const s=G.findKey(n,r);if(s)return e[s]=vt(i),void delete e[r];const o=t?function(t){return t.trim().toLowerCase().replace(/([a-z\d])(\w*)/g,((t,e,n)=>e.toUpperCase()+n))}(r):String(r).trim();o!==r&&delete e[r],e[o]=vt(i),n[o]=!0})),this}concat(...t){return this.constructor.concat(this,...t)}toJSON(t){const e=Object.create(null);return G.forEach(this,((n,i)=>{null!=n&&!1!==n&&(e[i]=t&&G.isArray(n)?n.join(", "):n)})),e}[Symbol.iterator](){return Object.entries(this.toJSON())[Symbol.iterator]()}toString(){return Object.entries(this.toJSON()).map((([t,e])=>t+": "+e)).join("\n")}get[Symbol.toStringTag](){return"AxiosHeaders"}static from(t){return t instanceof this?t:new this(t)}static concat(t,...e){const n=new this(t);return e.forEach((t=>n.set(t))),n}static accessor(t){const e=(this[yt]=this[yt]={accessors:{}}).accessors,n=this.prototype;function i(t){const i=xt(t);e[i]||(function(t,e){const n=G.toCamelCase(" "+e);["get","set","has"].forEach((i=>{Object.defineProperty(t,i+n,{value:function(t,n,r){return this[i].call(this,e,t,n,r)},configurable:!0})}))}(n,t),e[i]=!0)}return G.isArray(t)?t.forEach(i):i(t),this}}kt.accessor(["Content-Type","Content-Length","Accept","Accept-Encoding","User-Agent","Authorization"]),G.freezeMethods(kt.prototype),G.freezeMethods(kt);const Mt=kt;function St(t,e){const n=this||bt,i=e||n,r=Mt.from(i.headers);let s=i.data;return G.forEach(t,(function(t){s=t.call(n,s,r.normalize(),e?e.status:void 0)})),r.normalize(),s}function Ot(t){return!(!t||!t.__CANCEL__)}function At(t,e,n){Z.call(this,null==t?"canceled":t,Z.ERR_CANCELED,e,n),this.name="CanceledError"}G.inherits(At,Z,{__CANCEL__:!0});const Pt=dt.isStandardBrowserEnv?{write:function(t,e,n,i,r,s){const o=[];o.push(t+"="+encodeURIComponent(e)),G.isNumber(n)&&o.push("expires="+new Date(n).toGMTString()),G.isString(i)&&o.push("path="+i),G.isString(r)&&o.push("domain="+r),!0===s&&o.push("secure"),document.cookie=o.join("; ")},read:function(t){const e=document.cookie.match(new RegExp("(^|;\\s*)("+t+")=([^;]*)"));return e?decodeURIComponent(e[3]):null},remove:function(t){this.write(t,"",Date.now()-864e5)}}:{write:function(){},read:function(){return null},remove:function(){}};function Et(t,e){return t&&!/^([a-z][a-z\d+\-.]*:)?\/\//i.test(e)?function(t,e){return e?t.replace(/\/+$/,"")+"/"+e.replace(/^\/+/,""):t}(t,e):e}const Tt=dt.isStandardBrowserEnv?function(){const t=/(msie|trident)/i.test(navigator.userAgent),e=document.createElement("a");let n;function i(n){let i=n;return t&&(e.setAttribute("href",i),i=e.href),e.setAttribute("href",i),{href:e.href,protocol:e.protocol?e.protocol.replace(/:$/,""):"",host:e.host,search:e.search?e.search.replace(/^\?/,""):"",hash:e.hash?e.hash.replace(/^#/,""):"",hostname:e.hostname,port:e.port,pathname:"/"===e.pathname.charAt(0)?e.pathname:"/"+e.pathname}}return n=i(window.location.href),function(t){const e=G.isString(t)?i(t):t;return e.protocol===n.protocol&&e.host===n.host}}():function(){return!0};function Ct(t,e){let n=0;const i=function(t,e){t=t||10;const n=new Array(t),i=new Array(t);let r,s=0,o=0;return e=void 0!==e?e:1e3,function(a){const l=Date.now(),c=i[o];r||(r=l),n[s]=a,i[s]=l;let h=o,u=0;for(;h!==s;)u+=n[h++],h%=t;if(s=(s+1)%t,s===o&&(o=(o+1)%t),l-r<e)return;const f=c&&l-c;return f?Math.round(1e3*u/f):void 0}}(50,250);return r=>{const s=r.loaded,o=r.lengthComputable?r.total:void 0,a=s-n,l=i(a);n=s;const c={loaded:s,total:o,progress:o?s/o:void 0,bytes:a,rate:l||void 0,estimated:l&&o&&s<=o?(o-s)/l:void 0,event:r};c[e?"download":"upload"]=!0,t(c)}}const Dt="undefined"!=typeof XMLHttpRequest&&function(t){return new Promise((function(e,n){let i=t.data;const r=Mt.from(t.headers).normalize(),s=t.responseType;let o;function a(){t.cancelToken&&t.cancelToken.unsubscribe(o),t.signal&&t.signal.removeEventListener("abort",o)}G.isFormData(i)&&(dt.isStandardBrowserEnv||dt.isStandardBrowserWebWorkerEnv)&&r.setContentType(!1);let l=new XMLHttpRequest;if(t.auth){const e=t.auth.username||"",n=t.auth.password?unescape(encodeURIComponent(t.auth.password)):"";r.set("Authorization","Basic "+btoa(e+":"+n))}const c=Et(t.baseURL,t.url);function h(){if(!l)return;const i=Mt.from("getAllResponseHeaders"in l&&l.getAllResponseHeaders());!function(t,e,n){const i=n.config.validateStatus;n.status&&i&&!i(n.status)?e(new Z("Request failed with status code "+n.status,[Z.ERR_BAD_REQUEST,Z.ERR_BAD_RESPONSE][Math.floor(n.status/100)-4],n.config,n.request,n)):t(n)}((function(t){e(t),a()}),(function(t){n(t),a()}),{data:s&&"text"!==s&&"json"!==s?l.response:l.responseText,status:l.status,statusText:l.statusText,headers:i,config:t,request:l}),l=null}if(l.open(t.method.toUpperCase(),ht(c,t.params,t.paramsSerializer),!0),l.timeout=t.timeout,"onloadend"in l?l.onloadend=h:l.onreadystatechange=function(){l&&4===l.readyState&&(0!==l.status||l.responseURL&&0===l.responseURL.indexOf("file:"))&&setTimeout(h)},l.onabort=function(){l&&(n(new Z("Request aborted",Z.ECONNABORTED,t,l)),l=null)},l.onerror=function(){n(new Z("Network Error",Z.ERR_NETWORK,t,l)),l=null},l.ontimeout=function(){let e=t.timeout?"timeout of "+t.timeout+"ms exceeded":"timeout exceeded";const i=t.transitional||ft;t.timeoutErrorMessage&&(e=t.timeoutErrorMessage),n(new Z(e,i.clarifyTimeoutError?Z.ETIMEDOUT:Z.ECONNABORTED,t,l)),l=null},dt.isStandardBrowserEnv){const e=(t.withCredentials||Tt(c))&&t.xsrfCookieName&&Pt.read(t.xsrfCookieName);e&&r.set(t.xsrfHeaderName,e)}void 0===i&&r.setContentType(null),"setRequestHeader"in l&&G.forEach(r.toJSON(),(function(t,e){l.setRequestHeader(e,t)})),G.isUndefined(t.withCredentials)||(l.withCredentials=!!t.withCredentials),s&&"json"!==s&&(l.responseType=t.responseType),"function"==typeof t.onDownloadProgress&&l.addEventListener("progress",Ct(t.onDownloadProgress,!0)),"function"==typeof t.onUploadProgress&&l.upload&&l.upload.addEventListener("progress",Ct(t.onUploadProgress)),(t.cancelToken||t.signal)&&(o=e=>{l&&(n(!e||e.type?new At(null,t,l):e),l.abort(),l=null)},t.cancelToken&&t.cancelToken.subscribe(o),t.signal&&(t.signal.aborted?o():t.signal.addEventListener("abort",o)));const u=function(t){const e=/^([-+\w]{1,25})(:?\/\/|:)/.exec(t);return e&&e[1]||""}(c);u&&-1===dt.protocols.indexOf(u)?n(new Z("Unsupported protocol "+u+":",Z.ERR_BAD_REQUEST,t)):l.send(i||null)}))},Rt={http:null,xhr:Dt};G.forEach(Rt,((t,e)=>{if(t){try{Object.defineProperty(t,"name",{value:e})}catch(n){}Object.defineProperty(t,"adapterName",{value:e})}}));const Lt=t=>{t=G.isArray(t)?t:[t];const{length:e}=t;let n,i;for(let r=0;r<e&&(n=t[r],!(i=G.isString(n)?Rt[n.toLowerCase()]:n));r++);if(!i){if(!1===i)throw new Z(`Adapter ${n} is not supported by the environment`,"ERR_NOT_SUPPORT");throw new Error(G.hasOwnProp(Rt,n)?`Adapter '${n}' is not available in the build`:`Unknown adapter '${n}'`)}if(!G.isFunction(i))throw new TypeError("adapter is not a function");return i};function It(t){if(t.cancelToken&&t.cancelToken.throwIfRequested(),t.signal&&t.signal.aborted)throw new At(null,t)}function Ft(t){return It(t),t.headers=Mt.from(t.headers),t.data=St.call(t,t.transformRequest),-1!==["post","put","patch"].indexOf(t.method)&&t.headers.setContentType("application/x-www-form-urlencoded",!1),Lt(t.adapter||bt.adapter)(t).then((function(e){return It(t),e.data=St.call(t,t.transformResponse,e),e.headers=Mt.from(e.headers),e}),(function(e){return Ot(e)||(It(t),e&&e.response&&(e.response.data=St.call(t,t.transformResponse,e.response),e.response.headers=Mt.from(e.response.headers))),Promise.reject(e)}))}const zt=t=>t instanceof Mt?t.toJSON():t;function jt(t,e){e=e||{};const n={};function i(t,e,n){return G.isPlainObject(t)&&G.isPlainObject(e)?G.merge.call({caseless:n},t,e):G.isPlainObject(e)?G.merge({},e):G.isArray(e)?e.slice():e}function r(t,e,n){return G.isUndefined(e)?G.isUndefined(t)?void 0:i(void 0,t,n):i(t,e,n)}function s(t,e){if(!G.isUndefined(e))return i(void 0,e)}function o(t,e){return G.isUndefined(e)?G.isUndefined(t)?void 0:i(void 0,t):i(void 0,e)}function a(n,r,s){return s in e?i(n,r):s in t?i(void 0,n):void 0}const l={url:s,method:s,data:s,baseURL:o,transformRequest:o,transformResponse:o,paramsSerializer:o,timeout:o,timeoutMessage:o,withCredentials:o,adapter:o,responseType:o,xsrfCookieName:o,xsrfHeaderName:o,onUploadProgress:o,onDownloadProgress:o,decompress:o,maxContentLength:o,maxBodyLength:o,beforeRedirect:o,transport:o,httpAgent:o,httpsAgent:o,cancelToken:o,socketPath:o,responseEncoding:o,validateStatus:a,headers:(t,e)=>r(zt(t),zt(e),!0)};return G.forEach(Object.keys(t).concat(Object.keys(e)),(function(i){const s=l[i]||r,o=s(t[i],e[i],i);G.isUndefined(o)&&s!==a||(n[i]=o)})),n}const Bt="1.3.5",Nt={};["object","boolean","number","function","string","symbol"].forEach(((t,e)=>{Nt[t]=function(n){return typeof n===t||"a"+(e<1?"n ":" ")+t}}));const Vt={};Nt.transitional=function(t,e,n){function i(t,e){return"[Axios v1.3.5] Transitional option '"+t+"'"+e+(n?". "+n:"")}return(n,r,s)=>{if(!1===t)throw new Z(i(r," has been removed"+(e?" in "+e:"")),Z.ERR_DEPRECATED);return e&&!Vt[r]&&(Vt[r]=!0,console.warn(i(r," has been deprecated since v"+e+" and will be removed in the near future"))),!t||t(n,r,s)}};const Wt={assertOptions:function(t,e,n){if("object"!=typeof t)throw new Z("options must be an object",Z.ERR_BAD_OPTION_VALUE);const i=Object.keys(t);let r=i.length;for(;r-- >0;){const s=i[r],o=e[s];if(o){const e=t[s],n=void 0===e||o(e,s,t);if(!0!==n)throw new Z("option "+s+" must be "+n,Z.ERR_BAD_OPTION_VALUE)}else if(!0!==n)throw new Z("Unknown option "+s,Z.ERR_BAD_OPTION)}},validators:Nt},Ht=Wt.validators;class Ut{constructor(t){this.defaults=t,this.interceptors={request:new ut,response:new ut}}request(t,e){"string"==typeof t?(e=e||{}).url=t:e=t||{},e=jt(this.defaults,e);const{transitional:n,paramsSerializer:i,headers:r}=e;let s;void 0!==n&&Wt.assertOptions(n,{silentJSONParsing:Ht.transitional(Ht.boolean),forcedJSONParsing:Ht.transitional(Ht.boolean),clarifyTimeoutError:Ht.transitional(Ht.boolean)},!1),null!=i&&(G.isFunction(i)?e.paramsSerializer={serialize:i}:Wt.assertOptions(i,{encode:Ht.function,serialize:Ht.function},!0)),e.method=(e.method||this.defaults.method||"get").toLowerCase(),s=r&&G.merge(r.common,r[e.method]),s&&G.forEach(["delete","get","head","post","put","patch","common"],(t=>{delete r[t]})),e.headers=Mt.concat(s,r);const o=[];let a=!0;this.interceptors.request.forEach((function(t){"function"==typeof t.runWhen&&!1===t.runWhen(e)||(a=a&&t.synchronous,o.unshift(t.fulfilled,t.rejected))}));const l=[];let c;this.interceptors.response.forEach((function(t){l.push(t.fulfilled,t.rejected)}));let h,u=0;if(!a){const t=[Ft.bind(this),void 0];for(t.unshift.apply(t,o),t.push.apply(t,l),h=t.length,c=Promise.resolve(e);u<h;)c=c.then(t[u++],t[u++]);return c}h=o.length;let f=e;for(u=0;u<h;){const t=o[u++],e=o[u++];try{f=t(f)}catch(d){e.call(this,d);break}}try{c=Ft.call(this,f)}catch(d){return Promise.reject(d)}for(u=0,h=l.length;u<h;)c=c.then(l[u++],l[u++]);return c}getUri(t){return ht(Et((t=jt(this.defaults,t)).baseURL,t.url),t.params,t.paramsSerializer)}}G.forEach(["delete","get","head","options"],(function(t){Ut.prototype[t]=function(e,n){return this.request(jt(n||{},{method:t,url:e,data:(n||{}).data}))}})),G.forEach(["post","put","patch"],(function(t){function e(e){return function(n,i,r){return this.request(jt(r||{},{method:t,headers:e?{"Content-Type":"multipart/form-data"}:{},url:n,data:i}))}}Ut.prototype[t]=e(),Ut.prototype[t+"Form"]=e(!0)}));const $t=Ut;class Yt{constructor(t){if("function"!=typeof t)throw new TypeError("executor must be a function.");let e;this.promise=new Promise((function(t){e=t}));const n=this;this.promise.then((t=>{if(!n._listeners)return;let e=n._listeners.length;for(;e-- >0;)n._listeners[e](t);n._listeners=null})),this.promise.then=t=>{let e;const i=new Promise((t=>{n.subscribe(t),e=t})).then(t);return i.cancel=function(){n.unsubscribe(e)},i},t((function(t,i,r){n.reason||(n.reason=new At(t,i,r),e(n.reason))}))}throwIfRequested(){if(this.reason)throw this.reason}subscribe(t){this.reason?t(this.reason):this._listeners?this._listeners.push(t):this._listeners=[t]}unsubscribe(t){if(!this._listeners)return;const e=this._listeners.indexOf(t);-1!==e&&this._listeners.splice(e,1)}static source(){let t;return{token:new Yt((function(e){t=e})),cancel:t}}}const qt=Yt,Xt={Continue:100,SwitchingProtocols:101,Processing:102,EarlyHints:103,Ok:200,Created:201,Accepted:202,NonAuthoritativeInformation:203,NoContent:204,ResetContent:205,PartialContent:206,MultiStatus:207,AlreadyReported:208,ImUsed:226,MultipleChoices:300,MovedPermanently:301,Found:302,SeeOther:303,NotModified:304,UseProxy:305,Unused:306,TemporaryRedirect:307,PermanentRedirect:308,BadRequest:400,Unauthorized:401,PaymentRequired:402,Forbidden:403,NotFound:404,MethodNotAllowed:405,NotAcceptable:406,ProxyAuthenticationRequired:407,RequestTimeout:408,Conflict:409,Gone:410,LengthRequired:411,PreconditionFailed:412,PayloadTooLarge:413,UriTooLong:414,UnsupportedMediaType:415,RangeNotSatisfiable:416,ExpectationFailed:417,ImATeapot:418,MisdirectedRequest:421,UnprocessableEntity:422,Locked:423,FailedDependency:424,TooEarly:425,UpgradeRequired:426,PreconditionRequired:428,TooManyRequests:429,RequestHeaderFieldsTooLarge:431,UnavailableForLegalReasons:451,InternalServerError:500,NotImplemented:501,BadGateway:502,ServiceUnavailable:503,GatewayTimeout:504,HttpVersionNotSupported:505,VariantAlsoNegotiates:506,InsufficientStorage:507,LoopDetected:508,NotExtended:510,NetworkAuthenticationRequired:511};Object.entries(Xt).forEach((([t,e])=>{Xt[e]=t}));const Kt=Xt,Jt=function t(e){const n=new $t(e),i=_($t.prototype.request,n);return G.extend(i,$t.prototype,n,{allOwnKeys:!0}),G.extend(i,n,null,{allOwnKeys:!0}),i.create=function(n){return t(jt(e,n))},i}(bt);Jt.Axios=$t,Jt.CanceledError=At,Jt.CancelToken=qt,Jt.isCancel=Ot,Jt.VERSION=Bt,Jt.toFormData=st,Jt.AxiosError=Z,Jt.Cancel=Jt.CanceledError,Jt.all=function(t){return Promise.all(t)},Jt.spread=function(t){return function(e){return t.apply(null,e)}},Jt.isAxiosError=function(t){return G.isObject(t)&&!0===t.isAxiosError},Jt.mergeConfig=jt,Jt.AxiosHeaders=Mt,Jt.formToJSON=t=>pt(G.isHTMLForm(t)?new FormData(t):t),Jt.HttpStatusCode=Kt,Jt.default=Jt,t("a",Jt);var Gt=t("b",{}),Zt={get exports(){return Gt},set exports(e){t("b",Gt=e)}};
/*!
* @kurkle/color v0.3.2
* https://github.com/kurkle/color#readme
* (c) 2023 Jukka Kurkela
* Released under the MIT License
*/
function Qt(t){return t+.5|0}!function(t){var e=function(){var t=String.fromCharCode,e="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/=",n="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+-$",i={};function r(t,e){if(!i[t]){i[t]={};for(var n=0;n<t.length;n++)i[t][t.charAt(n)]=n}return i[t][e]}var s={compressToBase64:function(t){if(null==t)return"";var n=s._compress(t,6,(function(t){return e.charAt(t)}));switch(n.length%4){default:case 0:return n;case 1:return n+"===";case 2:return n+"==";case 3:return n+"="}},decompressFromBase64:function(t){return null==t?"":""==t?null:s._decompress(t.length,32,(function(n){return r(e,t.charAt(n))}))},compressToUTF16:function(e){return null==e?"":s._compress(e,15,(function(e){return t(e+32)}))+" "},decompressFromUTF16:function(t){return null==t?"":""==t?null:s._decompress(t.length,16384,(function(e){return t.charCodeAt(e)-32}))},compressToUint8Array:function(t){for(var e=s.compress(t),n=new Uint8Array(2*e.length),i=0,r=e.length;i<r;i++){var o=e.charCodeAt(i);n[2*i]=o>>>8,n[2*i+1]=o%256}return n},decompressFromUint8Array:function(e){if(null==e)return s.decompress(e);for(var n=new Array(e.length/2),i=0,r=n.length;i<r;i++)n[i]=256*e[2*i]+e[2*i+1];var o=[];return n.forEach((function(e){o.push(t(e))})),s.decompress(o.join(""))},compressToEncodedURIComponent:function(t){return null==t?"":s._compress(t,6,(function(t){return n.charAt(t)}))},decompressFromEncodedURIComponent:function(t){return null==t?"":""==t?null:(t=t.replace(/ /g,"+"),s._decompress(t.length,32,(function(e){return r(n,t.charAt(e))})))},compress:function(e){return s._compress(e,16,(function(e){return t(e)}))},_compress:function(t,e,n){if(null==t)return"";var i,r,s,o={},a={},l="",c="",h="",u=2,f=3,d=2,p=[],g=0,m=0;for(s=0;s<t.length;s+=1)if(l=t.charAt(s),Object.prototype.hasOwnProperty.call(o,l)||(o[l]=f++,a[l]=!0),c=h+l,Object.prototype.hasOwnProperty.call(o,c))h=c;else{if(Object.prototype.hasOwnProperty.call(a,h)){if(h.charCodeAt(0)<256){for(i=0;i<d;i++)g<<=1,m==e-1?(m=0,p.push(n(g)),g=0):m++;for(r=h.charCodeAt(0),i=0;i<8;i++)g=g<<1|1&r,m==e-1?(m=0,p.push(n(g)),g=0):m++,r>>=1}else{for(r=1,i=0;i<d;i++)g=g<<1|r,m==e-1?(m=0,p.push(n(g)),g=0):m++,r=0;for(r=h.charCodeAt(0),i=0;i<16;i++)g=g<<1|1&r,m==e-1?(m=0,p.push(n(g)),g=0):m++,r>>=1}0==--u&&(u=Math.pow(2,d),d++),delete a[h]}else for(r=o[h],i=0;i<d;i++)g=g<<1|1&r,m==e-1?(m=0,p.push(n(g)),g=0):m++,r>>=1;0==--u&&(u=Math.pow(2,d),d++),o[c]=f++,h=String(l)}if(""!==h){if(Object.prototype.hasOwnProperty.call(a,h)){if(h.charCodeAt(0)<256){for(i=0;i<d;i++)g<<=1,m==e-1?(m=0,p.push(n(g)),g=0):m++;for(r=h.charCodeAt(0),i=0;i<8;i++)g=g<<1|1&r,m==e-1?(m=0,p.push(n(g)),g=0):m++,r>>=1}else{for(r=1,i=0;i<d;i++)g=g<<1|r,m==e-1?(m=0,p.push(n(g)),g=0):m++,r=0;for(r=h.charCodeAt(0),i=0;i<16;i++)g=g<<1|1&r,m==e-1?(m=0,p.push(n(g)),g=0):m++,r>>=1}0==--u&&(u=Math.pow(2,d),d++),delete a[h]}else for(r=o[h],i=0;i<d;i++)g=g<<1|1&r,m==e-1?(m=0,p.push(n(g)),g=0):m++,r>>=1;0==--u&&(u=Math.pow(2,d),d++)}for(r=2,i=0;i<d;i++)g=g<<1|1&r,m==e-1?(m=0,p.push(n(g)),g=0):m++,r>>=1;for(;;){if(g<<=1,m==e-1){p.push(n(g));break}m++}return p.join("")},decompress:function(t){return null==t?"":""==t?null:s._decompress(t.length,32768,(function(e){return t.charCodeAt(e)}))},_decompress:function(e,n,i){var r,s,o,a,l,c,h,u=[],f=4,d=4,p=3,g="",m=[],b={val:i(0),position:n,index:1};for(r=0;r<3;r+=1)u[r]=r;for(o=0,l=Math.pow(2,2),c=1;c!=l;)a=b.val&b.position,b.position>>=1,0==b.position&&(b.position=n,b.val=i(b.index++)),o|=(a>0?1:0)*c,c<<=1;switch(o){case 0:for(o=0,l=Math.pow(2,8),c=1;c!=l;)a=b.val&b.position,b.position>>=1,0==b.position&&(b.position=n,b.val=i(b.index++)),o|=(a>0?1:0)*c,c<<=1;h=t(o);break;case 1:for(o=0,l=Math.pow(2,16),c=1;c!=l;)a=b.val&b.position,b.position>>=1,0==b.position&&(b.position=n,b.val=i(b.index++)),o|=(a>0?1:0)*c,c<<=1;h=t(o);break;case 2:return""}for(u[3]=h,s=h,m.push(h);;){if(b.index>e)return"";for(o=0,l=Math.pow(2,p),c=1;c!=l;)a=b.val&b.position,b.position>>=1,0==b.position&&(b.position=n,b.val=i(b.index++)),o|=(a>0?1:0)*c,c<<=1;switch(h=o){case 0:for(o=0,l=Math.pow(2,8),c=1;c!=l;)a=b.val&b.position,b.position>>=1,0==b.position&&(b.position=n,b.val=i(b.index++)),o|=(a>0?1:0)*c,c<<=1;u[d++]=t(o),h=d-1,f--;break;case 1:for(o=0,l=Math.pow(2,16),c=1;c!=l;)a=b.val&b.position,b.position>>=1,0==b.position&&(b.position=n,b.val=i(b.index++)),o|=(a>0?1:0)*c,c<<=1;u[d++]=t(o),h=d-1,f--;break;case 2:return m.join("")}if(0==f&&(f=Math.pow(2,p),p++),u[h])g=u[h];else{if(h!==d)return null;g=s+s.charAt(0)}m.push(g),u[d++]=s+g.charAt(0),s=g,0==--f&&(f=Math.pow(2,p),p++)}}};return s}();null!=t?t.exports=e:"undefined"!=typeof angular&&null!=angular&&angular.module("LZString",[]).factory("LZString",(function(){return e}))}(Zt);const te=(t,e,n)=>Math.max(Math.min(t,n),e);function ee(t){return te(Qt(2.55*t),0,255)}function ne(t){return te(Qt(255*t),0,255)}function ie(t){return te(Qt(t/2.55)/100,0,1)}function re(t){return te(Qt(100*t),0,100)}const se={0:0,1:1,2:2,3:3,4:4,5:5,6:6,7:7,8:8,9:9,A:10,B:11,C:12,D:13,E:14,F:15,a:10,b:11,c:12,d:13,e:14,f:15},oe=[..."0123456789ABCDEF"],ae=t=>oe[15&t],le=t=>oe[(240&t)>>4]+oe[15&t],ce=t=>(240&t)>>4==(15&t);function he(t){var e=(t=>ce(t.r)&&ce(t.g)&&ce(t.b)&&ce(t.a))(t)?ae:le;return t?"#"+e(t.r)+e(t.g)+e(t.b)+((t,e)=>t<255?e(t):"")(t.a,e):void 0}const ue=/^(hsla?|hwb|hsv)\(\s*([-+.e\d]+)(?:deg)?[\s,]+([-+.e\d]+)%[\s,]+([-+.e\d]+)%(?:[\s,]+([-+.e\d]+)(%)?)?\s*\)$/;function fe(t,e,n){const i=e*Math.min(n,1-n),r=(e,r=(e+t/30)%12)=>n-i*Math.max(Math.min(r-3,9-r,1),-1);return[r(0),r(8),r(4)]}function de(t,e,n){const i=(i,r=(i+t/60)%6)=>n-n*e*Math.max(Math.min(r,4-r,1),0);return[i(5),i(3),i(1)]}function pe(t,e,n){const i=fe(t,1,.5);let r;for(e+n>1&&(r=1/(e+n),e*=r,n*=r),r=0;r<3;r++)i[r]*=1-e-n,i[r]+=e;return i}function ge(t){const e=t.r/255,n=t.g/255,i=t.b/255,r=Math.max(e,n,i),s=Math.min(e,n,i),o=(r+s)/2;let a,l,c;return r!==s&&(c=r-s,l=o>.5?c/(2-r-s):c/(r+s),a=function(t,e,n,i,r){return t===r?(e-n)/i+(e<n?6:0):e===r?(n-t)/i+2:(t-e)/i+4}(e,n,i,c,r),a=60*a+.5),[0|a,l||0,o]}function me(t,e,n,i){return(Array.isArray(e)?t(e[0],e[1],e[2]):t(e,n,i)).map(ne)}function be(t,e,n){return me(fe,t,e,n)}function _e(t){return(t%360+360)%360}function ye(t){const e=ue.exec(t);let n,i=255;if(!e)return;e[5]!==n&&(i=e[6]?ee(+e[5]):ne(+e[5]));const r=_e(+e[2]),s=+e[3]/100,o=+e[4]/100;return n="hwb"===e[1]?function(t,e,n){return me(pe,t,e,n)}(r,s,o):"hsv"===e[1]?function(t,e,n){return me(de,t,e,n)}(r,s,o):be(r,s,o),{r:n[0],g:n[1],b:n[2],a:i}}const xe={x:"dark",Z:"light",Y:"re",X:"blu",W:"gr",V:"medium",U:"slate",A:"ee",T:"ol",S:"or",B:"ra",C:"lateg",D:"ights",R:"in",Q:"turquois",E:"hi",P:"ro",O:"al",N:"le",M:"de",L:"yello",F:"en",K:"ch",G:"arks",H:"ea",I:"ightg",J:"wh"},ve={OiceXe:"f0f8ff",antiquewEte:"faebd7",aqua:"ffff",aquamarRe:"7fffd4",azuY:"f0ffff",beige:"f5f5dc",bisque:"ffe4c4",black:"0",blanKedOmond:"ffebcd",Xe:"ff",XeviTet:"8a2be2",bPwn:"a52a2a",burlywood:"deb887",caMtXe:"5f9ea0",KartYuse:"7fff00",KocTate:"d2691e",cSO:"ff7f50",cSnflowerXe:"6495ed",cSnsilk:"fff8dc",crimson:"dc143c",cyan:"ffff",xXe:"8b",xcyan:"8b8b",xgTMnPd:"b8860b",xWay:"a9a9a9",xgYF:"6400",xgYy:"a9a9a9",xkhaki:"bdb76b",xmagFta:"8b008b",xTivegYF:"556b2f",xSange:"ff8c00",xScEd:"9932cc",xYd:"8b0000",xsOmon:"e9967a",xsHgYF:"8fbc8f",xUXe:"483d8b",xUWay:"2f4f4f",xUgYy:"2f4f4f",xQe:"ced1",xviTet:"9400d3",dAppRk:"ff1493",dApskyXe:"bfff",dimWay:"696969",dimgYy:"696969",dodgerXe:"1e90ff",fiYbrick:"b22222",flSOwEte:"fffaf0",foYstWAn:"228b22",fuKsia:"ff00ff",gaRsbSo:"dcdcdc",ghostwEte:"f8f8ff",gTd:"ffd700",gTMnPd:"daa520",Way:"808080",gYF:"8000",gYFLw:"adff2f",gYy:"808080",honeyMw:"f0fff0",hotpRk:"ff69b4",RdianYd:"cd5c5c",Rdigo:"4b0082",ivSy:"fffff0",khaki:"f0e68c",lavFMr:"e6e6fa",lavFMrXsh:"fff0f5",lawngYF:"7cfc00",NmoncEffon:"fffacd",ZXe:"add8e6",ZcSO:"f08080",Zcyan:"e0ffff",ZgTMnPdLw:"fafad2",ZWay:"d3d3d3",ZgYF:"90ee90",ZgYy:"d3d3d3",ZpRk:"ffb6c1",ZsOmon:"ffa07a",ZsHgYF:"20b2aa",ZskyXe:"87cefa",ZUWay:"778899",ZUgYy:"778899",ZstAlXe:"b0c4de",ZLw:"ffffe0",lime:"ff00",limegYF:"32cd32",lRF:"faf0e6",magFta:"ff00ff",maPon:"800000",VaquamarRe:"66cdaa",VXe:"cd",VScEd:"ba55d3",VpurpN:"9370db",VsHgYF:"3cb371",VUXe:"7b68ee",VsprRggYF:"fa9a",VQe:"48d1cc",VviTetYd:"c71585",midnightXe:"191970",mRtcYam:"f5fffa",mistyPse:"ffe4e1",moccasR:"ffe4b5",navajowEte:"ffdead",navy:"80",Tdlace:"fdf5e6",Tive:"808000",TivedBb:"6b8e23",Sange:"ffa500",SangeYd:"ff4500",ScEd:"da70d6",pOegTMnPd:"eee8aa",pOegYF:"98fb98",pOeQe:"afeeee",pOeviTetYd:"db7093",papayawEp:"ffefd5",pHKpuff:"ffdab9",peru:"cd853f",pRk:"ffc0cb",plum:"dda0dd",powMrXe:"b0e0e6",purpN:"800080",YbeccapurpN:"663399",Yd:"ff0000",Psybrown:"bc8f8f",PyOXe:"4169e1",saddNbPwn:"8b4513",sOmon:"fa8072",sandybPwn:"f4a460",sHgYF:"2e8b57",sHshell:"fff5ee",siFna:"a0522d",silver:"c0c0c0",skyXe:"87ceeb",UXe:"6a5acd",UWay:"708090",UgYy:"708090",snow:"fffafa",sprRggYF:"ff7f",stAlXe:"4682b4",tan:"d2b48c",teO:"8080",tEstN:"d8bfd8",tomato:"ff6347",Qe:"40e0d0",viTet:"ee82ee",JHt:"f5deb3",wEte:"ffffff",wEtesmoke:"f5f5f5",Lw:"ffff00",LwgYF:"9acd32"};let we;function ke(t){we||(we=function(){const t={},e=Object.keys(ve),n=Object.keys(xe);let i,r,s,o,a;for(i=0;i<e.length;i++){for(o=a=e[i],r=0;r<n.length;r++)s=n[r],a=a.replace(s,xe[s]);s=parseInt(ve[o],16),t[a]=[s>>16&255,s>>8&255,255&s]}return t}(),we.transparent=[0,0,0,0]);const e=we[t.toLowerCase()];return e&&{r:e[0],g:e[1],b:e[2],a:4===e.length?e[3]:255}}const Me=/^rgba?\(\s*([-+.\d]+)(%)?[\s,]+([-+.e\d]+)(%)?[\s,]+([-+.e\d]+)(%)?(?:[\s,/]+([-+.e\d]+)(%)?)?\s*\)$/,Se=t=>t<=.0031308?12.92*t:1.055*Math.pow(t,1/2.4)-.055,Oe=t=>t<=.04045?t/12.92:Math.pow((t+.055)/1.055,2.4);function Ae(t,e,n){if(t){let i=ge(t);i[e]=Math.max(0,Math.min(i[e]+i[e]*n,0===e?360:1)),i=be(i),t.r=i[0],t.g=i[1],t.b=i[2]}}function Pe(t,e){return t?Object.assign(e||{},t):t}function Ee(t){var e={r:0,g:0,b:0,a:255};return Array.isArray(t)?t.length>=3&&(e={r:t[0],g:t[1],b:t[2],a:255},t.length>3&&(e.a=ne(t[3]))):(e=Pe(t,{r:0,g:0,b:0,a:1})).a=ne(e.a),e}function Te(t){return"r"===t.charAt(0)?function(t){const e=Me.exec(t);let n,i,r,s=255;if(e){if(e[7]!==n){const t=+e[7];s=e[8]?ee(t):te(255*t,0,255)}return n=+e[1],i=+e[3],r=+e[5],n=255&(e[2]?ee(n):te(n,0,255)),i=255&(e[4]?ee(i):te(i,0,255)),r=255&(e[6]?ee(r):te(r,0,255)),{r:n,g:i,b:r,a:s}}}(t):ye(t)}class Ce{constructor(t){if(t instanceof Ce)return t;const e=typeof t;let n;var i,r,s;"object"===e?n=Ee(t):"string"===e&&(s=(i=t).length,"#"===i[0]&&(4===s||5===s?r={r:255&17*se[i[1]],g:255&17*se[i[2]],b:255&17*se[i[3]],a:5===s?17*se[i[4]]:255}:7!==s&&9!==s||(r={r:se[i[1]]<<4|se[i[2]],g:se[i[3]]<<4|se[i[4]],b:se[i[5]]<<4|se[i[6]],a:9===s?se[i[7]]<<4|se[i[8]]:255})),n=r||ke(t)||Te(t)),this._rgb=n,this._valid=!!n}get valid(){return this._valid}get rgb(){var t=Pe(this._rgb);return t&&(t.a=ie(t.a)),t}set rgb(t){this._rgb=Ee(t)}rgbString(){return this._valid?function(t){return t&&(t.a<255?`rgba(${t.r}, ${t.g}, ${t.b}, ${ie(t.a)})`:`rgb(${t.r}, ${t.g}, ${t.b})`)}(this._rgb):void 0}hexString(){return this._valid?he(this._rgb):void 0}hslString(){return this._valid?function(t){if(!t)return;const e=ge(t),n=e[0],i=re(e[1]),r=re(e[2]);return t.a<255?`hsla(${n}, ${i}%, ${r}%, ${ie(t.a)})`:`hsl(${n}, ${i}%, ${r}%)`}(this._rgb):void 0}mix(t,e){if(t){const n=this.rgb,i=t.rgb;let r;const s=e===r?.5:e,o=2*s-1,a=n.a-i.a,l=((o*a==-1?o:(o+a)/(1+o*a))+1)/2;r=1-l,n.r=255&l*n.r+r*i.r+.5,n.g=255&l*n.g+r*i.g+.5,n.b=255&l*n.b+r*i.b+.5,n.a=s*n.a+(1-s)*i.a,this.rgb=n}return this}interpolate(t,e){return t&&(this._rgb=function(t,e,n){const i=Oe(ie(t.r)),r=Oe(ie(t.g)),s=Oe(ie(t.b));return{r:ne(Se(i+n*(Oe(ie(e.r))-i))),g:ne(Se(r+n*(Oe(ie(e.g))-r))),b:ne(Se(s+n*(Oe(ie(e.b))-s))),a:t.a+n*(e.a-t.a)}}(this._rgb,t._rgb,e)),this}clone(){return new Ce(this.rgb)}alpha(t){return this._rgb.a=ne(t),this}clearer(t){return this._rgb.a*=1-t,this}greyscale(){const t=this._rgb,e=Qt(.3*t.r+.59*t.g+.11*t.b);return t.r=t.g=t.b=e,this}opaquer(t){return this._rgb.a*=1+t,this}negate(){const t=this._rgb;return t.r=255-t.r,t.g=255-t.g,t.b=255-t.b,this}lighten(t){return Ae(this._rgb,2,t),this}darken(t){return Ae(this._rgb,2,-t),this}saturate(t){return Ae(this._rgb,1,t),this}desaturate(t){return Ae(this._rgb,1,-t),this}rotate(t){return function(t,e){var n=ge(t);n[0]=_e(n[0]+e),n=be(n),t.r=n[0],t.g=n[1],t.b=n[2]}(this._rgb,t),this}}
/*!
* Chart.js v4.2.1
* https://www.chartjs.org
* (c) 2023 Chart.js Contributors
* Released under the MIT License
*/function De(){}const Re=(()=>{let t=0;return()=>t++})();function Le(t){return null==t}function Ie(t){if(Array.isArray&&Array.isArray(t))return!0;const e=Object.prototype.toString.call(t);return"[object"===e.slice(0,7)&&"Array]"===e.slice(-6)}function Fe(t){return null!==t&&"[object Object]"===Object.prototype.toString.call(t)}function ze(t){return("number"==typeof t||t instanceof Number)&&isFinite(+t)}function je(t,e){return ze(t)?t:e}function Be(t,e){return void 0===t?e:t}const Ne=(t,e)=>"string"==typeof t&&t.endsWith("%")?parseFloat(t)/100*e:+t;function Ve(t,e,n){if(t&&"function"==typeof t.call)return t.apply(n,e)}function We(t,e,n,i){let r,s,o;if(Ie(t))if(s=t.length,i)for(r=s-1;r>=0;r--)e.call(n,t[r],r);else for(r=0;r<s;r++)e.call(n,t[r],r);else if(Fe(t))for(o=Object.keys(t),s=o.length,r=0;r<s;r++)e.call(n,t[o[r]],o[r])}function He(t,e){let n,i,r,s;if(!t||!e||t.length!==e.length)return!1;for(n=0,i=t.length;n<i;++n)if(r=t[n],s=e[n],r.datasetIndex!==s.datasetIndex||r.index!==s.index)return!1;return!0}function Ue(t){if(Ie(t))return t.map(Ue);if(Fe(t)){const e=Object.create(null),n=Object.keys(t),i=n.length;let r=0;for(;r<i;++r)e[n[r]]=Ue(t[n[r]]);return e}return t}function $e(t){return-1===["__proto__","prototype","constructor"].indexOf(t)}function Ye(t,e,n,i){if(!$e(t))return;const r=e[t],s=n[t];Fe(r)&&Fe(s)?qe(r,s,i):e[t]=Ue(s)}function qe(t,e,n){const i=Ie(e)?e:[e],r=i.length;if(!Fe(t))return t;const s=(n=n||{}).merger||Ye;let o;for(let a=0;a<r;++a){if(o=i[a],!Fe(o))continue;const e=Object.keys(o);for(let i=0,r=e.length;i<r;++i)s(e[i],t,o,n)}return t}function Xe(t,e){return qe(t,e,{merger:Ke})}function Ke(t,e,n){if(!$e(t))return;const i=e[t],r=n[t];Fe(i)&&Fe(r)?Xe(i,r):Object.prototype.hasOwnProperty.call(e,t)||(e[t]=Ue(r))}const Je={"":t=>t,x:t=>t.x,y:t=>t.y};function Ge(t,e){const n=Je[e]||(Je[e]=function(t){const e=function(t){const e=t.split("."),n=[];let i="";for(const r of e)i+=r,i.endsWith("\\")?i=i.slice(0,-1)+".":(n.push(i),i="");return n}(t);return t=>{for(const n of e){if(""===n)break;t=t&&t[n]}return t}}(e));return n(t)}function Ze(t){return t.charAt(0).toUpperCase()+t.slice(1)}const Qe=t=>void 0!==t,tn=t=>"function"==typeof t,en=(t,e)=>{if(t.size!==e.size)return!1;for(const n of t)if(!e.has(n))return!1;return!0},nn=Math.PI,rn=2*nn,sn=rn+nn,on=Number.POSITIVE_INFINITY,an=nn/180,ln=nn/2,cn=nn/4,hn=2*nn/3,un=Math.log10,fn=Math.sign;function dn(t,e,n){return Math.abs(t-e)<n}function pn(t){const e=Math.round(t);t=dn(t,e,t/1e3)?e:t;const n=Math.pow(10,Math.floor(un(t))),i=t/n;return(i<=1?1:i<=2?2:i<=5?5:10)*n}function gn(t){return!isNaN(parseFloat(t))&&isFinite(t)}function mn(t,e,n){let i,r,s;for(i=0,r=t.length;i<r;i++)s=t[i][n],isNaN(s)||(e.min=Math.min(e.min,s),e.max=Math.max(e.max,s))}function bn(t){return t*(nn/180)}function _n(t){return t*(180/nn)}function yn(t){if(!ze(t))return;let e=1,n=0;for(;Math.round(t*e)/e!==t;)e*=10,n++;return n}function xn(t,e){const n=e.x-t.x,i=e.y-t.y,r=Math.sqrt(n*n+i*i);let s=Math.atan2(i,n);return s<-.5*nn&&(s+=rn),{angle:s,distance:r}}function vn(t,e){return Math.sqrt(Math.pow(e.x-t.x,2)+Math.pow(e.y-t.y,2))}function wn(t,e){return(t-e+sn)%rn-nn}function kn(t){return(t%rn+rn)%rn}function Mn(t,e,n,i){const r=kn(t),s=kn(e),o=kn(n),a=kn(s-r),l=kn(o-r),c=kn(r-s),h=kn(r-o);return r===s||r===o||i&&s===o||a>l&&c<h}function Sn(t,e,n){return Math.max(e,Math.min(n,t))}function On(t,e,n,i=1e-6){return t>=Math.min(e,n)-i&&t<=Math.max(e,n)+i}function An(t,e,n){n=n||(n=>t[n]<e);let i,r=t.length-1,s=0;for(;r-s>1;)i=s+r>>1,n(i)?s=i:r=i;return{lo:s,hi:r}}const Pn=(t,e,n,i)=>An(t,n,i?i=>{const r=t[i][e];return r<n||r===n&&t[i+1][e]===n}:i=>t[i][e]<n),En=(t,e,n)=>An(t,n,(i=>t[i][e]>=n)),Tn=["push","pop","shift","splice","unshift"];function Cn(t,e){const n=t._chartjs;if(!n)return;const i=n.listeners,r=i.indexOf(e);-1!==r&&i.splice(r,1),i.length>0||(Tn.forEach((e=>{delete t[e]})),delete t._chartjs)}function Dn(t){const e=new Set;let n,i;for(n=0,i=t.length;n<i;++n)e.add(t[n]);return e.size===i?t:Array.from(e)}const Rn="undefined"==typeof window?function(t){return t()}:window.requestAnimationFrame;function Ln(t,e){let n=[],i=!1;return function(...r){n=r,i||(i=!0,Rn.call(window,(()=>{i=!1,t.apply(e,n)})))}}const In=t=>"start"===t?"left":"end"===t?"right":"center",Fn=(t,e,n)=>"start"===t?e:"end"===t?n:(e+n)/2;function zn(t,e,n){const i=e.length;let r=0,s=i;if(t._sorted){const{iScale:o,_parsed:a}=t,l=o.axis,{min:c,max:h,minDefined:u,maxDefined:f}=o.getUserBounds();u&&(r=Sn(Math.min(Pn(a,o.axis,c).lo,n?i:Pn(e,l,o.getPixelForValue(c)).lo),0,i-1)),s=f?Sn(Math.max(Pn(a,o.axis,h,!0).hi+1,n?0:Pn(e,l,o.getPixelForValue(h),!0).hi+1),r,i)-r:i-r}return{start:r,count:s}}function jn(t){const{xScale:e,yScale:n,_scaleRanges:i}=t,r={xmin:e.min,xmax:e.max,ymin:n.min,ymax:n.max};if(!i)return t._scaleRanges=r,!0;const s=i.xmin!==e.min||i.xmax!==e.max||i.ymin!==n.min||i.ymax!==n.max;return Object.assign(i,r),s}const Bn=t=>0===t||1===t,Nn=(t,e,n)=>-Math.pow(2,10*(t-=1))*Math.sin((t-e)*rn/n),Vn=(t,e,n)=>Math.pow(2,-10*t)*Math.sin((t-e)*rn/n)+1,Wn={linear:t=>t,easeInQuad:t=>t*t,easeOutQuad:t=>-t*(t-2),easeInOutQuad:t=>(t/=.5)<1?.5*t*t:-.5*(--t*(t-2)-1),easeInCubic:t=>t*t*t,easeOutCubic:t=>(t-=1)*t*t+1,easeInOutCubic:t=>(t/=.5)<1?.5*t*t*t:.5*((t-=2)*t*t+2),easeInQuart:t=>t*t*t*t,easeOutQuart:t=>-((t-=1)*t*t*t-1),easeInOutQuart:t=>(t/=.5)<1?.5*t*t*t*t:-.5*((t-=2)*t*t*t-2),easeInQuint:t=>t*t*t*t*t,easeOutQuint:t=>(t-=1)*t*t*t*t+1,easeInOutQuint:t=>(t/=.5)<1?.5*t*t*t*t*t:.5*((t-=2)*t*t*t*t+2),easeInSine:t=>1-Math.cos(t*ln),easeOutSine:t=>Math.sin(t*ln),easeInOutSine:t=>-.5*(Math.cos(nn*t)-1),easeInExpo:t=>0===t?0:Math.pow(2,10*(t-1)),easeOutExpo:t=>1===t?1:1-Math.pow(2,-10*t),easeInOutExpo:t=>Bn(t)?t:t<.5?.5*Math.pow(2,10*(2*t-1)):.5*(2-Math.pow(2,-10*(2*t-1))),easeInCirc:t=>t>=1?t:-(Math.sqrt(1-t*t)-1),easeOutCirc:t=>Math.sqrt(1-(t-=1)*t),easeInOutCirc:t=>(t/=.5)<1?-.5*(Math.sqrt(1-t*t)-1):.5*(Math.sqrt(1-(t-=2)*t)+1),easeInElastic:t=>Bn(t)?t:Nn(t,.075,.3),easeOutElastic:t=>Bn(t)?t:Vn(t,.075,.3),easeInOutElastic(t){const e=.1125;return Bn(t)?t:t<.5?.5*Nn(2*t,e,.45):.5+.5*Vn(2*t-1,e,.45)},easeInBack(t){const e=1.70158;return t*t*((e+1)*t-e)},easeOutBack(t){const e=1.70158;return(t-=1)*t*((e+1)*t+e)+1},easeInOutBack(t){let e=1.70158;return(t/=.5)<1?t*t*((1+(e*=1.525))*t-e)*.5:.5*((t-=2)*t*((1+(e*=1.525))*t+e)+2)},easeInBounce:t=>1-Wn.easeOutBounce(1-t),easeOutBounce(t){const e=7.5625,n=2.75;return t<1/n?e*t*t:t<2/n?e*(t-=1.5/n)*t+.75:t<2.5/n?e*(t-=2.25/n)*t+.9375:e*(t-=2.625/n)*t+.984375},easeInOutBounce:t=>t<.5?.5*Wn.easeInBounce(2*t):.5*Wn.easeOutBounce(2*t-1)+.5};function Hn(t){if(t&&"object"==typeof t){const e=t.toString();return"[object CanvasPattern]"===e||"[object CanvasGradient]"===e}return!1}function Un(t){return Hn(t)?t:new Ce(t)}function $n(t){return Hn(t)?t:new Ce(t).saturate(.5).darken(.1).hexString()}const Yn=["x","y","borderWidth","radius","tension"],qn=["color","borderColor","backgroundColor"],Xn=new Map;function Kn(t,e,n){return function(t,e){e=e||{};const n=t+JSON.stringify(e);let i=Xn.get(n);return i||(i=new Intl.NumberFormat(t,e),Xn.set(n,i)),i}(e,n).format(t)}const Jn={values:t=>Ie(t)?t:""+t,numeric(t,e,n){if(0===t)return"0";const i=this.chart.options.locale;let r,s=t;if(n.length>1){const e=Math.max(Math.abs(n[0].value),Math.abs(n[n.length-1].value));(e<1e-4||e>1e15)&&(r="scientific"),s=function(t,e){let n=e.length>3?e[2].value-e[1].value:e[1].value-e[0].value;return Math.abs(n)>=1&&t!==Math.floor(t)&&(n=t-Math.floor(t)),n}(t,n)}const o=un(Math.abs(s)),a=Math.max(Math.min(-1*Math.floor(o),20),0),l={notation:r,minimumFractionDigits:a,maximumFractionDigits:a};return Object.assign(l,this.options.ticks.format),Kn(t,i,l)},logarithmic(t,e,n){if(0===t)return"0";const i=n[e].significand||t/Math.pow(10,Math.floor(un(t)));return[1,2,3,5,10,15].includes(i)||e>.8*n.length?Jn.numeric.call(this,t,e,n):""}};var Gn={formatters:Jn};const Zn=Object.create(null),Qn=Object.create(null);function ti(t,e){if(!e)return t;const n=e.split(".");for(let i=0,r=n.length;i<r;++i){const e=n[i];t=t[e]||(t[e]=Object.create(null))}return t}function ei(t,e,n){return"string"==typeof e?qe(ti(t,e),n):qe(ti(t,""),e)}class ni{constructor(t,e){this.animation=void 0,this.backgroundColor="rgba(0,0,0,0.1)",this.borderColor="rgba(0,0,0,0.1)",this.color="#666",this.datasets={},this.devicePixelRatio=t=>t.chart.platform.getDevicePixelRatio(),this.elements={},this.events=["mousemove","mouseout","click","touchstart","touchmove"],this.font={family:"'Helvetica Neue', 'Helvetica', 'Arial', sans-serif",size:12,style:"normal",lineHeight:1.2,weight:null},this.hover={},this.hoverBackgroundColor=(t,e)=>$n(e.backgroundColor),this.hoverBorderColor=(t,e)=>$n(e.borderColor),this.hoverColor=(t,e)=>$n(e.color),this.indexAxis="x",this.interaction={mode:"nearest",intersect:!0,includeInvisible:!1},this.maintainAspectRatio=!0,this.onHover=null,this.onClick=null,this.parsing=!0,this.plugins={},this.responsive=!0,this.scale=void 0,this.scales={},this.showLine=!0,this.drawActiveElementsOnTop=!0,this.describe(t),this.apply(e)}set(t,e){return ei(this,t,e)}get(t){return ti(this,t)}describe(t,e){return ei(Qn,t,e)}override(t,e){return ei(Zn,t,e)}route(t,e,n,i){const r=ti(this,t),s=ti(this,n),o="_"+e;Object.defineProperties(r,{[o]:{value:r[e],writable:!0},[e]:{enumerable:!0,get(){const t=this[o],e=s[i];return Fe(t)?Object.assign({},e,t):Be(t,e)},set(t){this[o]=t}}})}apply(t){t.forEach((t=>t(this)))}}var ii=new ni({_scriptable:t=>!t.startsWith("on"),_indexable:t=>"events"!==t,hover:{_fallback:"interaction"},interaction:{_scriptable:!1,_indexable:!1}},[function(t){t.set("animation",{delay:void 0,duration:1e3,easing:"easeOutQuart",fn:void 0,from:void 0,loop:void 0,to:void 0,type:void 0}),t.describe("animation",{_fallback:!1,_indexable:!1,_scriptable:t=>"onProgress"!==t&&"onComplete"!==t&&"fn"!==t}),t.set("animations",{colors:{type:"color",properties:qn},numbers:{type:"number",properties:Yn}}),t.describe("animations",{_fallback:"animation"}),t.set("transitions",{active:{animation:{duration:400}},resize:{animation:{duration:0}},show:{animations:{colors:{from:"transparent"},visible:{type:"boolean",duration:0}}},hide:{animations:{colors:{to:"transparent"},visible:{type:"boolean",easing:"linear",fn:t=>0|t}}}})},function(t){t.set("layout",{autoPadding:!0,padding:{top:0,right:0,bottom:0,left:0}})},function(t){t.set("scale",{display:!0,offset:!1,reverse:!1,beginAtZero:!1,bounds:"ticks",grace:0,grid:{display:!0,lineWidth:1,drawOnChartArea:!0,drawTicks:!0,tickLength:8,tickWidth:(t,e)=>e.lineWidth,tickColor:(t,e)=>e.color,offset:!1},border:{display:!0,dash:[],dashOffset:0,width:1},title:{display:!1,text:"",padding:{top:4,bottom:4}},ticks:{minRotation:0,maxRotation:50,mirror:!1,textStrokeWidth:0,textStrokeColor:"",padding:3,display:!0,autoSkip:!0,autoSkipPadding:3,labelOffset:0,callback:Gn.formatters.values,minor:{},major:{},align:"center",crossAlign:"near",showLabelBackdrop:!1,backdropColor:"rgba(255, 255, 255, 0.75)",backdropPadding:2}}),t.route("scale.ticks","color","","color"),t.route("scale.grid","color","","borderColor"),t.route("scale.border","color","","borderColor"),t.route("scale.title","color","","color"),t.describe("scale",{_fallback:!1,_scriptable:t=>!t.startsWith("before")&&!t.startsWith("after")&&"callback"!==t&&"parser"!==t,_indexable:t=>"borderDash"!==t&&"tickBorderDash"!==t&&"dash"!==t}),t.describe("scales",{_fallback:"scale"}),t.describe("scale.ticks",{_scriptable:t=>"backdropPadding"!==t&&"callback"!==t,_indexable:t=>"backdropPadding"!==t})}]);function ri(t,e,n,i,r){let s=e[r];return s||(s=e[r]=t.measureText(r).width,n.push(r)),s>i&&(i=s),i}function si(t,e,n,i){let r=(i=i||{}).data=i.data||{},s=i.garbageCollect=i.garbageCollect||[];i.font!==e&&(r=i.data={},s=i.garbageCollect=[],i.font=e),t.save(),t.font=e;let o=0;const a=n.length;let l,c,h,u,f;for(l=0;l<a;l++)if(u=n[l],null!=u&&!0!==Ie(u))o=ri(t,r,s,o,u);else if(Ie(u))for(c=0,h=u.length;c<h;c++)f=u[c],null==f||Ie(f)||(o=ri(t,r,s,o,f));t.restore();const d=s.length/2;if(d>n.length){for(l=0;l<d;l++)delete r[s[l]];s.splice(0,d)}return o}function oi(t,e,n){const i=t.currentDevicePixelRatio,r=0!==n?Math.max(n/2,.5):0;return Math.round((e-r)*i)/i+r}function ai(t,e){(e=e||t.getContext("2d")).save(),e.resetTransform(),e.clearRect(0,0,t.width,t.height),e.restore()}function li(t,e,n,i){ci(t,e,n,i,null)}function ci(t,e,n,i,r){let s,o,a,l,c,h,u,f;const d=e.pointStyle,p=e.rotation,g=e.radius;let m=(p||0)*an;if(d&&"object"==typeof d&&(s=d.toString(),"[object HTMLImageElement]"===s||"[object HTMLCanvasElement]"===s))return t.save(),t.translate(n,i),t.rotate(m),t.drawImage(d,-d.width/2,-d.height/2,d.width,d.height),void t.restore();if(!(isNaN(g)||g<=0)){switch(t.beginPath(),d){default:r?t.ellipse(n,i,r/2,g,0,0,rn):t.arc(n,i,g,0,rn),t.closePath();break;case"triangle":h=r?r/2:g,t.moveTo(n+Math.sin(m)*h,i-Math.cos(m)*g),m+=hn,t.lineTo(n+Math.sin(m)*h,i-Math.cos(m)*g),m+=hn,t.lineTo(n+Math.sin(m)*h,i-Math.cos(m)*g),t.closePath();break;case"rectRounded":c=.516*g,l=g-c,o=Math.cos(m+cn)*l,u=Math.cos(m+cn)*(r?r/2-c:l),a=Math.sin(m+cn)*l,f=Math.sin(m+cn)*(r?r/2-c:l),t.arc(n-u,i-a,c,m-nn,m-ln),t.arc(n+f,i-o,c,m-ln,m),t.arc(n+u,i+a,c,m,m+ln),t.arc(n-f,i+o,c,m+ln,m+nn),t.closePath();break;case"rect":if(!p){l=Math.SQRT1_2*g,h=r?r/2:l,t.rect(n-h,i-l,2*h,2*l);break}m+=cn;case"rectRot":u=Math.cos(m)*(r?r/2:g),o=Math.cos(m)*g,a=Math.sin(m)*g,f=Math.sin(m)*(r?r/2:g),t.moveTo(n-u,i-a),t.lineTo(n+f,i-o),t.lineTo(n+u,i+a),t.lineTo(n-f,i+o),t.closePath();break;case"crossRot":m+=cn;case"cross":u=Math.cos(m)*(r?r/2:g),o=Math.cos(m)*g,a=Math.sin(m)*g,f=Math.sin(m)*(r?r/2:g),t.moveTo(n-u,i-a),t.lineTo(n+u,i+a),t.moveTo(n+f,i-o),t.lineTo(n-f,i+o);break;case"star":u=Math.cos(m)*(r?r/2:g),o=Math.cos(m)*g,a=Math.sin(m)*g,f=Math.sin(m)*(r?r/2:g),t.moveTo(n-u,i-a),t.lineTo(n+u,i+a),t.moveTo(n+f,i-o),t.lineTo(n-f,i+o),m+=cn,u=Math.cos(m)*(r?r/2:g),o=Math.cos(m)*g,a=Math.sin(m)*g,f=Math.sin(m)*(r?r/2:g),t.moveTo(n-u,i-a),t.lineTo(n+u,i+a),t.moveTo(n+f,i-o),t.lineTo(n-f,i+o);break;case"line":o=r?r/2:Math.cos(m)*g,a=Math.sin(m)*g,t.moveTo(n-o,i-a),t.lineTo(n+o,i+a);break;case"dash":t.moveTo(n,i),t.lineTo(n+Math.cos(m)*(r?r/2:g),i+Math.sin(m)*g);break;case!1:t.closePath()}t.fill(),e.borderWidth>0&&t.stroke()}}function hi(t,e,n){return n=n||.5,!e||t&&t.x>e.left-n&&t.x<e.right+n&&t.y>e.top-n&&t.y<e.bottom+n}function ui(t,e){t.save(),t.beginPath(),t.rect(e.left,e.top,e.right-e.left,e.bottom-e.top),t.clip()}function fi(t){t.restore()}function di(t,e,n,i,r){if(!e)return t.lineTo(n.x,n.y);if("middle"===r){const i=(e.x+n.x)/2;t.lineTo(i,e.y),t.lineTo(i,n.y)}else"after"===r!=!!i?t.lineTo(e.x,n.y):t.lineTo(n.x,e.y);t.lineTo(n.x,n.y)}function pi(t,e,n,i){if(!e)return t.lineTo(n.x,n.y);t.bezierCurveTo(i?e.cp1x:e.cp2x,i?e.cp1y:e.cp2y,i?n.cp2x:n.cp1x,i?n.cp2y:n.cp1y,n.x,n.y)}function gi(t,e,n,i,r,s={}){const o=Ie(e)?e:[e],a=s.strokeWidth>0&&""!==s.strokeColor;let l,c;for(t.save(),t.font=r.string,function(t,e){e.translation&&t.translate(e.translation[0],e.translation[1]),Le(e.rotation)||t.rotate(e.rotation),e.color&&(t.fillStyle=e.color),e.textAlign&&(t.textAlign=e.textAlign),e.textBaseline&&(t.textBaseline=e.textBaseline)}(t,s),l=0;l<o.length;++l)c=o[l],s.backdrop&&bi(t,s.backdrop),a&&(s.strokeColor&&(t.strokeStyle=s.strokeColor),Le(s.strokeWidth)||(t.lineWidth=s.strokeWidth),t.strokeText(c,n,i,s.maxWidth)),t.fillText(c,n,i,s.maxWidth),mi(t,n,i,c,s),i+=r.lineHeight;t.restore()}function mi(t,e,n,i,r){if(r.strikethrough||r.underline){const s=t.measureText(i),o=e-s.actualBoundingBoxLeft,a=e+s.actualBoundingBoxRight,l=n-s.actualBoundingBoxAscent,c=n+s.actualBoundingBoxDescent,h=r.strikethrough?(l+c)/2:c;t.strokeStyle=t.fillStyle,t.beginPath(),t.lineWidth=r.decorationWidth||2,t.moveTo(o,h),t.lineTo(a,h),t.stroke()}}function bi(t,e){const n=t.fillStyle;t.fillStyle=e.color,t.fillRect(e.left,e.top,e.width,e.height),t.fillStyle=n}function _i(t,e){const{x:n,y:i,w:r,h:s,radius:o}=e;t.arc(n+o.topLeft,i+o.topLeft,o.topLeft,-ln,nn,!0),t.lineTo(n,i+s-o.bottomLeft),t.arc(n+o.bottomLeft,i+s-o.bottomLeft,o.bottomLeft,nn,ln,!0),t.lineTo(n+r-o.bottomRight,i+s),t.arc(n+r-o.bottomRight,i+s-o.bottomRight,o.bottomRight,ln,0,!0),t.lineTo(n+r,i+o.topRight),t.arc(n+r-o.topRight,i+o.topRight,o.topRight,0,-ln,!0),t.lineTo(n+o.topLeft,i)}const yi=/^(normal|(\d+(?:\.\d+)?)(px|em|%)?)$/,xi=/^(normal|italic|initial|inherit|unset|(oblique( -?[0-9]?[0-9]deg)?))$/;function vi(t,e){const n=(""+t).match(yi);if(!n||"normal"===n[1])return 1.2*e;switch(t=+n[2],n[3]){case"px":return t;case"%":t/=100}return e*t}const wi=t=>+t||0;function ki(t,e){const n={},i=Fe(e),r=i?Object.keys(e):e,s=Fe(t)?i?n=>Be(t[n],t[e[n]]):e=>t[e]:()=>t;for(const o of r)n[o]=wi(s(o));return n}function Mi(t){return ki(t,{top:"y",right:"x",bottom:"y",left:"x"})}function Si(t){return ki(t,["topLeft","topRight","bottomLeft","bottomRight"])}function Oi(t){const e=Mi(t);return e.width=e.left+e.right,e.height=e.top+e.bottom,e}function Ai(t,e){t=t||{},e=e||ii.font;let n=Be(t.size,e.size);"string"==typeof n&&(n=parseInt(n,10));let i=Be(t.style,e.style);i&&!(""+i).match(xi)&&(console.warn('Invalid font style specified: "'+i+'"'),i=void 0);const r={family:Be(t.family,e.family),lineHeight:vi(Be(t.lineHeight,e.lineHeight),n),size:n,style:i,weight:Be(t.weight,e.weight),string:""};return r.string=function(t){return!t||Le(t.size)||Le(t.family)?null:(t.style?t.style+" ":"")+(t.weight?t.weight+" ":"")+t.size+"px "+t.family}(r),r}function Pi(t,e,n,i){let r,s,o,a=!0;for(r=0,s=t.length;r<s;++r)if(o=t[r],void 0!==o&&(void 0!==e&&"function"==typeof o&&(o=o(e),a=!1),void 0!==n&&Ie(o)&&(o=o[n%o.length],a=!1),void 0!==o))return i&&!a&&(i.cacheable=!1),o}function Ei(t,e){return Object.assign(Object.create(t),e)}function Ti(t,e=[""],n=t,i,r=(()=>t[0])){Qe(i)||(i=Vi("_fallback",t));const s={[Symbol.toStringTag]:"Object",_cacheable:!0,_scopes:t,_rootScopes:n,_fallback:i,_getTarget:r,override:r=>Ti([r,...t],e,n,i)};return new Proxy(s,{deleteProperty:(e,n)=>(delete e[n],delete e._keys,delete t[0][n],!0),get:(n,i)=>Ii(n,i,(()=>function(t,e,n,i){let r;for(const s of e)if(r=Vi(Ri(s,t),n),Qe(r))return Li(t,r)?Bi(n,i,t,r):r}(i,e,t,n))),getOwnPropertyDescriptor:(t,e)=>Reflect.getOwnPropertyDescriptor(t._scopes[0],e),getPrototypeOf:()=>Reflect.getPrototypeOf(t[0]),has:(t,e)=>Wi(t).includes(e),ownKeys:t=>Wi(t),set(t,e,n){const i=t._storage||(t._storage=r());return t[e]=i[e]=n,delete t._keys,!0}})}function Ci(t,e,n,i){const r={_cacheable:!1,_proxy:t,_context:e,_subProxy:n,_stack:new Set,_descriptors:Di(t,i),setContext:e=>Ci(t,e,n,i),override:r=>Ci(t.override(r),e,n,i)};return new Proxy(r,{deleteProperty:(e,n)=>(delete e[n],delete t[n],!0),get:(t,e,n)=>Ii(t,e,(()=>function(t,e,n){const{_proxy:i,_context:r,_subProxy:s,_descriptors:o}=t;let a=i[e];return tn(a)&&o.isScriptable(e)&&(a=function(t,e,n,i){const{_proxy:r,_context:s,_subProxy:o,_stack:a}=n;if(a.has(t))throw new Error("Recursion detected: "+Array.from(a).join("->")+"->"+t);return a.add(t),e=e(s,o||i),a.delete(t),Li(t,e)&&(e=Bi(r._scopes,r,t,e)),e}(e,a,t,n)),Ie(a)&&a.length&&(a=function(t,e,n,i){const{_proxy:r,_context:s,_subProxy:o,_descriptors:a}=n;if(Qe(s.index)&&i(t))e=e[s.index%e.length];else if(Fe(e[0])){const n=e,i=r._scopes.filter((t=>t!==n));e=[];for(const l of n){const n=Bi(i,r,t,l);e.push(Ci(n,s,o&&o[t],a))}}return e}(e,a,t,o.isIndexable)),Li(e,a)&&(a=Ci(a,r,s&&s[e],o)),a}(t,e,n))),getOwnPropertyDescriptor:(e,n)=>e._descriptors.allKeys?Reflect.has(t,n)?{enumerable:!0,configurable:!0}:void 0:Reflect.getOwnPropertyDescriptor(t,n),getPrototypeOf:()=>Reflect.getPrototypeOf(t),has:(e,n)=>Reflect.has(t,n),ownKeys:()=>Reflect.ownKeys(t),set:(e,n,i)=>(t[n]=i,delete e[n],!0)})}function Di(t,e={scriptable:!0,indexable:!0}){const{_scriptable:n=e.scriptable,_indexable:i=e.indexable,_allKeys:r=e.allKeys}=t;return{allKeys:r,scriptable:n,indexable:i,isScriptable:tn(n)?n:()=>n,isIndexable:tn(i)?i:()=>i}}const Ri=(t,e)=>t?t+Ze(e):e,Li=(t,e)=>Fe(e)&&"adapters"!==t&&(null===Object.getPrototypeOf(e)||e.constructor===Object);function Ii(t,e,n){if(Object.prototype.hasOwnProperty.call(t,e))return t[e];const i=n();return t[e]=i,i}function Fi(t,e,n){return tn(t)?t(e,n):t}const zi=(t,e)=>!0===t?e:"string"==typeof t?Ge(e,t):void 0;function ji(t,e,n,i,r){for(const s of e){const e=zi(n,s);if(e){t.add(e);const s=Fi(e._fallback,n,r);if(Qe(s)&&s!==n&&s!==i)return s}else if(!1===e&&Qe(i)&&n!==i)return null}return!1}function Bi(t,e,n,i){const r=e._rootScopes,s=Fi(e._fallback,n,i),o=[...t,...r],a=new Set;a.add(i);let l=Ni(a,o,n,s||n,i);return null!==l&&(!Qe(s)||s===n||(l=Ni(a,o,s,l,i),null!==l))&&Ti(Array.from(a),[""],r,s,(()=>function(t,e,n){const i=t._getTarget();e in i||(i[e]={});const r=i[e];return Ie(r)&&Fe(n)?n:r||{}}(e,n,i)))}function Ni(t,e,n,i,r){for(;n;)n=ji(t,e,n,i,r);return n}function Vi(t,e){for(const n of e){if(!n)continue;const e=n[t];if(Qe(e))return e}}function Wi(t){let e=t._keys;return e||(e=t._keys=function(t){const e=new Set;for(const n of t)for(const t of Object.keys(n).filter((t=>!t.startsWith("_"))))e.add(t);return Array.from(e)}(t._scopes)),e}function Hi(t,e,n,i){const{iScale:r}=t,{key:s="r"}=this._parsing,o=new Array(i);let a,l,c,h;for(a=0,l=i;a<l;++a)c=a+n,h=e[c],o[a]={r:r.parse(Ge(h,s),c)};return o}const Ui=Number.EPSILON||1e-14,$i=(t,e)=>e<t.length&&!t[e].skip&&t[e],Yi=t=>"x"===t?"y":"x";function qi(t,e,n,i){const r=t.skip?e:t,s=e,o=n.skip?e:n,a=vn(s,r),l=vn(o,s);let c=a/(a+l),h=l/(a+l);c=isNaN(c)?0:c,h=isNaN(h)?0:h;const u=i*c,f=i*h;return{previous:{x:s.x-u*(o.x-r.x),y:s.y-u*(o.y-r.y)},next:{x:s.x+f*(o.x-r.x),y:s.y+f*(o.y-r.y)}}}function Xi(t,e="x"){const n=Yi(e),i=t.length,r=Array(i).fill(0),s=Array(i);let o,a,l,c=$i(t,0);for(o=0;o<i;++o)if(a=l,l=c,c=$i(t,o+1),l){if(c){const t=c[e]-l[e];r[o]=0!==t?(c[n]-l[n])/t:0}s[o]=a?c?fn(r[o-1])!==fn(r[o])?0:(r[o-1]+r[o])/2:r[o-1]:r[o]}!function(t,e,n){const i=t.length;let r,s,o,a,l,c=$i(t,0);for(let h=0;h<i-1;++h)l=c,c=$i(t,h+1),l&&c&&(dn(e[h],0,Ui)?n[h]=n[h+1]=0:(r=n[h]/e[h],s=n[h+1]/e[h],a=Math.pow(r,2)+Math.pow(s,2),a<=9||(o=3/Math.sqrt(a),n[h]=r*o*e[h],n[h+1]=s*o*e[h])))}(t,r,s),function(t,e,n="x"){const i=Yi(n),r=t.length;let s,o,a,l=$i(t,0);for(let c=0;c<r;++c){if(o=a,a=l,l=$i(t,c+1),!a)continue;const r=a[n],h=a[i];o&&(s=(r-o[n])/3,a[`cp1${n}`]=r-s,a[`cp1${i}`]=h-s*e[c]),l&&(s=(l[n]-r)/3,a[`cp2${n}`]=r+s,a[`cp2${i}`]=h+s*e[c])}}(t,s,e)}function Ki(t,e,n){return Math.max(Math.min(t,n),e)}function Ji(t,e,n,i,r){let s,o,a,l;if(e.spanGaps&&(t=t.filter((t=>!t.skip))),"monotone"===e.cubicInterpolationMode)Xi(t,r);else{let n=i?t[t.length-1]:t[0];for(s=0,o=t.length;s<o;++s)a=t[s],l=qi(n,a,t[Math.min(s+1,o-(i?0:1))%o],e.tension),a.cp1x=l.previous.x,a.cp1y=l.previous.y,a.cp2x=l.next.x,a.cp2y=l.next.y,n=a}e.capBezierPoints&&function(t,e){let n,i,r,s,o,a=hi(t[0],e);for(n=0,i=t.length;n<i;++n)o=s,s=a,a=n<i-1&&hi(t[n+1],e),s&&(r=t[n],o&&(r.cp1x=Ki(r.cp1x,e.left,e.right),r.cp1y=Ki(r.cp1y,e.top,e.bottom)),a&&(r.cp2x=Ki(r.cp2x,e.left,e.right),r.cp2y=Ki(r.cp2y,e.top,e.bottom)))}(t,n)}function Gi(){return"undefined"!=typeof window&&"undefined"!=typeof document}function Zi(t){let e=t.parentNode;return e&&"[object ShadowRoot]"===e.toString()&&(e=e.host),e}function Qi(t,e,n){let i;return"string"==typeof t?(i=parseInt(t,10),-1!==t.indexOf("%")&&(i=i/100*e.parentNode[n])):i=t,i}const tr=t=>t.ownerDocument.defaultView.getComputedStyle(t,null),er=["top","right","bottom","left"];function nr(t,e,n){const i={};n=n?"-"+n:"";for(let r=0;r<4;r++){const s=er[r];i[s]=parseFloat(t[e+"-"+s+n])||0}return i.width=i.left+i.right,i.height=i.top+i.bottom,i}const ir=(t,e,n)=>(t>0||e>0)&&(!n||!n.shadowRoot);function rr(t,e){if("native"in t)return t;const{canvas:n,currentDevicePixelRatio:i}=e,r=tr(n),s="border-box"===r.boxSizing,o=nr(r,"padding"),a=nr(r,"border","width"),{x:l,y:c,box:h}=function(t,e){const n=t.touches,i=n&&n.length?n[0]:t,{offsetX:r,offsetY:s}=i;let o,a,l=!1;if(ir(r,s,t.target))o=r,a=s;else{const t=e.getBoundingClientRect();o=i.clientX-t.left,a=i.clientY-t.top,l=!0}return{x:o,y:a,box:l}}(t,n),u=o.left+(h&&a.left),f=o.top+(h&&a.top);let{width:d,height:p}=e;return s&&(d-=o.width+a.width,p-=o.height+a.height),{x:Math.round((l-u)/d*n.width/i),y:Math.round((c-f)/p*n.height/i)}}const sr=t=>Math.round(10*t)/10;function or(t,e,n,i){const r=tr(t),s=nr(r,"margin"),o=Qi(r.maxWidth,t,"clientWidth")||on,a=Qi(r.maxHeight,t,"clientHeight")||on,l=function(t,e,n){let i,r;if(void 0===e||void 0===n){const s=Zi(t);if(s){const t=s.getBoundingClientRect(),o=tr(s),a=nr(o,"border","width"),l=nr(o,"padding");e=t.width-l.width-a.width,n=t.height-l.height-a.height,i=Qi(o.maxWidth,s,"clientWidth"),r=Qi(o.maxHeight,s,"clientHeight")}else e=t.clientWidth,n=t.clientHeight}return{width:e,height:n,maxWidth:i||on,maxHeight:r||on}}(t,e,n);let{width:c,height:h}=l;if("content-box"===r.boxSizing){const t=nr(r,"border","width"),e=nr(r,"padding");c-=e.width+t.width,h-=e.height+t.height}return c=Math.max(0,c-s.width),h=Math.max(0,i?c/i:h-s.height),c=sr(Math.min(c,o,l.maxWidth)),h=sr(Math.min(h,a,l.maxHeight)),c&&!h&&(h=sr(c/2)),(void 0!==e||void 0!==n)&&i&&l.height&&h>l.height&&(h=l.height,c=sr(Math.floor(h*i))),{width:c,height:h}}function ar(t,e,n){const i=e||1,r=Math.floor(t.height*i),s=Math.floor(t.width*i);t.height=Math.floor(t.height),t.width=Math.floor(t.width);const o=t.canvas;return o.style&&(n||!o.style.height&&!o.style.width)&&(o.style.height=`${t.height}px`,o.style.width=`${t.width}px`),(t.currentDevicePixelRatio!==i||o.height!==r||o.width!==s)&&(t.currentDevicePixelRatio=i,o.height=r,o.width=s,t.ctx.setTransform(i,0,0,i,0,0),!0)}const lr=function(){let t=!1;try{const e={get passive(){return t=!0,!1}};window.addEventListener("test",null,e),window.removeEventListener("test",null,e)}catch(e){}return t}();function cr(t,e){const n=function(t,e){return tr(t).getPropertyValue(e)}(t,e),i=n&&n.match(/^(\d+)(\.\d+)?px$/);return i?+i[1]:void 0}function hr(t,e,n,i){return{x:t.x+n*(e.x-t.x),y:t.y+n*(e.y-t.y)}}function ur(t,e,n,i){return{x:t.x+n*(e.x-t.x),y:"middle"===i?n<.5?t.y:e.y:"after"===i?n<1?t.y:e.y:n>0?e.y:t.y}}function fr(t,e,n,i){const r={x:t.cp2x,y:t.cp2y},s={x:e.cp1x,y:e.cp1y},o=hr(t,r,n),a=hr(r,s,n),l=hr(s,e,n),c=hr(o,a,n),h=hr(a,l,n);return hr(c,h,n)}function dr(t,e,n){return t?function(t,e){return{x:n=>t+t+e-n,setWidth(t){e=t},textAlign:t=>"center"===t?t:"right"===t?"left":"right",xPlus:(t,e)=>t-e,leftForLtr:(t,e)=>t-e}}(e,n):{x:t=>t,setWidth(t){},textAlign:t=>t,xPlus:(t,e)=>t+e,leftForLtr:(t,e)=>t}}function pr(t,e){let n,i;"ltr"!==e&&"rtl"!==e||(n=t.canvas.style,i=[n.getPropertyValue("direction"),n.getPropertyPriority("direction")],n.setProperty("direction",e,"important"),t.prevTextDirection=i)}function gr(t,e){void 0!==e&&(delete t.prevTextDirection,t.canvas.style.setProperty("direction",e[0],e[1]))}function mr(t){return"angle"===t?{between:Mn,compare:wn,normalize:kn}:{between:On,compare:(t,e)=>t-e,normalize:t=>t}}function br({start:t,end:e,count:n,loop:i,style:r}){return{start:t%n,end:e%n,loop:i&&(e-t+1)%n==0,style:r}}function _r(t,e,n){if(!n)return[t];const{property:i,start:r,end:s}=n,o=e.length,{compare:a,between:l,normalize:c}=mr(i),{start:h,end:u,loop:f,style:d}=function(t,e,n){const{property:i,start:r,end:s}=n,{between:o,normalize:a}=mr(i),l=e.length;let c,h,{start:u,end:f,loop:d}=t;if(d){for(u+=l,f+=l,c=0,h=l;c<h&&o(a(e[u%l][i]),r,s);++c)u--,f--;u%=l,f%=l}return f<u&&(f+=l),{start:u,end:f,loop:d,style:t.style}}(t,e,n),p=[];let g,m,b,_=!1,y=null;const x=()=>_||l(r,b,g)&&0!==a(r,b),v=()=>!_||0===a(s,g)||l(s,b,g);for(let w=h,k=h;w<=u;++w)m=e[w%o],m.skip||(g=c(m[i]),g!==b&&(_=l(g,r,s),null===y&&x()&&(y=0===a(g,r)?w:k),null!==y&&v()&&(p.push(br({start:y,end:w,loop:f,count:o,style:d})),y=null),k=w,b=g));return null!==y&&p.push(br({start:y,end:u,loop:f,count:o,style:d})),p}function yr(t,e){const n=[],i=t.segments;for(let r=0;r<i.length;r++){const s=_r(i[r],t.points,e);s.length&&n.push(...s)}return n}function xr(t,e,n,i){return i&&i.setContext&&n?function(t,e,n,i){const r=t._chart.getContext(),s=vr(t.options),{_datasetIndex:o,options:{spanGaps:a}}=t,l=n.length,c=[];let h=s,u=e[0].start,f=u;function d(t,e,i,r){const s=a?-1:1;if(t!==e){for(t+=l;n[t%l].skip;)t-=s;for(;n[e%l].skip;)e+=s;t%l!=e%l&&(c.push({start:t%l,end:e%l,loop:i,style:r}),h=r,u=e%l)}}for(const p of e){u=a?u:p.start;let t,e=n[u%l];for(f=u+1;f<=p.end;f++){const s=n[f%l];t=vr(i.setContext(Ei(r,{type:"segment",p0:e,p1:s,p0DataIndex:(f-1)%l,p1DataIndex:f%l,datasetIndex:o}))),wr(t,h)&&d(u,f-1,p.loop,h),e=s,h=t}u<f-1&&d(u,f-1,p.loop,h)}return c}(t,e,n,i):e}function vr(t){return{backgroundColor:t.backgroundColor,borderCapStyle:t.borderCapStyle,borderDash:t.borderDash,borderDashOffset:t.borderDashOffset,borderJoinStyle:t.borderJoinStyle,borderWidth:t.borderWidth,borderColor:t.borderColor}}function wr(t,e){return e&&JSON.stringify(t)!==JSON.stringify(e)}
/*!
* Chart.js v4.2.1
* https://www.chartjs.org
* (c) 2023 Chart.js Contributors
* Released under the MIT License
*/class kr{constructor(){this._request=null,this._charts=new Map,this._running=!1,this._lastDate=void 0}_notify(t,e,n,i){const r=e.listeners[i],s=e.duration;r.forEach((i=>i({chart:t,initial:e.initial,numSteps:s,currentStep:Math.min(n-e.start,s)})))}_refresh(){this._request||(this._running=!0,this._request=Rn.call(window,(()=>{this._update(),this._request=null,this._running&&this._refresh()})))}_update(t=Date.now()){let e=0;this._charts.forEach(((n,i)=>{if(!n.running||!n.items.length)return;const r=n.items;let s,o=r.length-1,a=!1;for(;o>=0;--o)s=r[o],s._active?(s._total>n.duration&&(n.duration=s._total),s.tick(t),a=!0):(r[o]=r[r.length-1],r.pop());a&&(i.draw(),this._notify(i,n,t,"progress")),r.length||(n.running=!1,this._notify(i,n,t,"complete"),n.initial=!1),e+=r.length})),this._lastDate=t,0===e&&(this._running=!1)}_getAnims(t){const e=this._charts;let n=e.get(t);return n||(n={running:!1,initial:!0,items:[],listeners:{complete:[],progress:[]}},e.set(t,n)),n}listen(t,e,n){this._getAnims(t).listeners[e].push(n)}add(t,e){e&&e.length&&this._getAnims(t).items.push(...e)}has(t){return this._getAnims(t).items.length>0}start(t){const e=this._charts.get(t);e&&(e.running=!0,e.start=Date.now(),e.duration=e.items.reduce(((t,e)=>Math.max(t,e._duration)),0),this._refresh())}running(t){if(!this._running)return!1;const e=this._charts.get(t);return!!(e&&e.running&&e.items.length)}stop(t){const e=this._charts.get(t);if(!e||!e.items.length)return;const n=e.items;let i=n.length-1;for(;i>=0;--i)n[i].cancel();e.items=[],this._notify(t,e,Date.now(),"complete")}remove(t){return this._charts.delete(t)}}var Mr=new kr;const Sr="transparent",Or={boolean:(t,e,n)=>n>.5?e:t,color(t,e,n){const i=Un(t||Sr),r=i.valid&&Un(e||Sr);return r&&r.valid?r.mix(i,n).hexString():e},number:(t,e,n)=>t+(e-t)*n};class Ar{constructor(t,e,n,i){const r=e[n];i=Pi([t.to,i,r,t.from]);const s=Pi([t.from,r,i]);this._active=!0,this._fn=t.fn||Or[t.type||typeof s],this._easing=Wn[t.easing]||Wn.linear,this._start=Math.floor(Date.now()+(t.delay||0)),this._duration=this._total=Math.floor(t.duration),this._loop=!!t.loop,this._target=e,this._prop=n,this._from=s,this._to=i,this._promises=void 0}active(){return this._active}update(t,e,n){if(this._active){this._notify(!1);const i=this._target[this._prop],r=n-this._start,s=this._duration-r;this._start=n,this._duration=Math.floor(Math.max(s,t.duration)),this._total+=r,this._loop=!!t.loop,this._to=Pi([t.to,e,i,t.from]),this._from=Pi([t.from,i,e])}}cancel(){this._active&&(this.tick(Date.now()),this._active=!1,this._notify(!1))}tick(t){const e=t-this._start,n=this._duration,i=this._prop,r=this._from,s=this._loop,o=this._to;let a;if(this._active=r!==o&&(s||e<n),!this._active)return this._target[i]=o,void this._notify(!0);e<0?this._target[i]=r:(a=e/n%2,a=s&&a>1?2-a:a,a=this._easing(Math.min(1,Math.max(0,a))),this._target[i]=this._fn(r,o,a))}wait(){const t=this._promises||(this._promises=[]);return new Promise(((e,n)=>{t.push({res:e,rej:n})}))}_notify(t){const e=t?"res":"rej",n=this._promises||[];for(let i=0;i<n.length;i++)n[i][e]()}}class Pr{constructor(t,e){this._chart=t,this._properties=new Map,this.configure(e)}configure(t){if(!Fe(t))return;const e=Object.keys(ii.animation),n=this._properties;Object.getOwnPropertyNames(t).forEach((i=>{const r=t[i];if(!Fe(r))return;const s={};for(const t of e)s[t]=r[t];(Ie(r.properties)&&r.properties||[i]).forEach((t=>{t!==i&&n.has(t)||n.set(t,s)}))}))}_animateOptions(t,e){const n=e.options,i=function(t,e){if(!e)return;let n=t.options;if(n)return n.$shared&&(t.options=n=Object.assign({},n,{$shared:!1,$animations:{}})),n;t.options=e}(t,n);if(!i)return[];const r=this._createAnimations(i,n);return n.$shared&&function(t,e){const n=[],i=Object.keys(e);for(let r=0;r<i.length;r++){const e=t[i[r]];e&&e.active()&&n.push(e.wait())}return Promise.all(n)}(t.options.$animations,n).then((()=>{t.options=n}),(()=>{})),r}_createAnimations(t,e){const n=this._properties,i=[],r=t.$animations||(t.$animations={}),s=Object.keys(e),o=Date.now();let a;for(a=s.length-1;a>=0;--a){const l=s[a];if("$"===l.charAt(0))continue;if("options"===l){i.push(...this._animateOptions(t,e));continue}const c=e[l];let h=r[l];const u=n.get(l);if(h){if(u&&h.active()){h.update(u,c,o);continue}h.cancel()}u&&u.duration?(r[l]=h=new Ar(u,t,l,c),i.push(h)):t[l]=c}return i}update(t,e){if(0===this._properties.size)return void Object.assign(t,e);const n=this._createAnimations(t,e);return n.length?(Mr.add(this._chart,n),!0):void 0}}function Er(t,e){const n=t&&t.options||{},i=n.reverse,r=void 0===n.min?e:0,s=void 0===n.max?e:0;return{start:i?s:r,end:i?r:s}}function Tr(t,e){const n=[],i=t._getSortedDatasetMetas(e);let r,s;for(r=0,s=i.length;r<s;++r)n.push(i[r].index);return n}function Cr(t,e,n,i={}){const r=t.keys,s="single"===i.mode;let o,a,l,c;if(null!==e){for(o=0,a=r.length;o<a;++o){if(l=+r[o],l===n){if(i.all)continue;break}c=t.values[l],ze(c)&&(s||0===e||fn(e)===fn(c))&&(e+=c)}return e}}function Dr(t,e){const n=t&&t.options.stacked;return n||void 0===n&&void 0!==e.stack}function Rr(t,e,n){const i=t[e]||(t[e]={});return i[n]||(i[n]={})}function Lr(t,e,n,i){for(const r of e.getMatchingVisibleMetas(i).reverse()){const e=t[r.index];if(n&&e>0||!n&&e<0)return r.index}return null}function Ir(t,e){const{chart:n,_cachedMeta:i}=t,r=n._stacks||(n._stacks={}),{iScale:s,vScale:o,index:a}=i,l=s.axis,c=o.axis,h=function(t,e,n){return`${t.id}.${e.id}.${n.stack||n.type}`}(s,o,i),u=e.length;let f;for(let d=0;d<u;++d){const t=e[d],{[l]:n,[c]:s}=t;f=(t._stacks||(t._stacks={}))[c]=Rr(r,h,n),f[a]=s,f._top=Lr(f,o,!0,i.type),f._bottom=Lr(f,o,!1,i.type),(f._visualValues||(f._visualValues={}))[a]=s}}function Fr(t,e){const n=t.scales;return Object.keys(n).filter((t=>n[t].axis===e)).shift()}function zr(t,e){const n=t.controller.index,i=t.vScale&&t.vScale.axis;if(i){e=e||t._parsed;for(const t of e){const e=t._stacks;if(!e||void 0===e[i]||void 0===e[i][n])return;delete e[i][n],void 0!==e[i]._visualValues&&void 0!==e[i]._visualValues[n]&&delete e[i]._visualValues[n]}}}const jr=t=>"reset"===t||"none"===t,Br=(t,e)=>e?t:Object.assign({},t);class Nr{static defaults={};static datasetElementType=null;static dataElementType=null;constructor(t,e){this.chart=t,this._ctx=t.ctx,this.index=e,this._cachedDataOpts={},this._cachedMeta=this.getMeta(),this._type=this._cachedMeta.type,this.options=void 0,this._parsing=!1,this._data=void 0,this._objectData=void 0,this._sharedOptions=void 0,this._drawStart=void 0,this._drawCount=void 0,this.enableOptionSharing=!1,this.supportsDecimation=!1,this.$context=void 0,this._syncList=[],this.datasetElementType=new.target.datasetElementType,this.dataElementType=new.target.dataElementType,this.initialize()}initialize(){const t=this._cachedMeta;this.configure(),this.linkScales(),t._stacked=Dr(t.vScale,t),this.addElements(),this.options.fill&&!this.chart.isPluginEnabled("filler")&&console.warn("Tried to use the 'fill' option without the 'Filler' plugin enabled. Please import and register the 'Filler' plugin and make sure it is not disabled in the options")}updateIndex(t){this.index!==t&&zr(this._cachedMeta),this.index=t}linkScales(){const t=this.chart,e=this._cachedMeta,n=this.getDataset(),i=(t,e,n,i)=>"x"===t?e:"r"===t?i:n,r=e.xAxisID=Be(n.xAxisID,Fr(t,"x")),s=e.yAxisID=Be(n.yAxisID,Fr(t,"y")),o=e.rAxisID=Be(n.rAxisID,Fr(t,"r")),a=e.indexAxis,l=e.iAxisID=i(a,r,s,o),c=e.vAxisID=i(a,s,r,o);e.xScale=this.getScaleForId(r),e.yScale=this.getScaleForId(s),e.rScale=this.getScaleForId(o),e.iScale=this.getScaleForId(l),e.vScale=this.getScaleForId(c)}getDataset(){return this.chart.data.datasets[this.index]}getMeta(){return this.chart.getDatasetMeta(this.index)}getScaleForId(t){return this.chart.scales[t]}_getOtherScale(t){const e=this._cachedMeta;return t===e.iScale?e.vScale:e.iScale}reset(){this._update("reset")}_destroy(){const t=this._cachedMeta;this._data&&Cn(this._data,this),t._stacked&&zr(t)}_dataCheck(){const t=this.getDataset(),e=t.data||(t.data=[]),n=this._data;if(Fe(e))this._data=function(t){const e=Object.keys(t),n=new Array(e.length);let i,r,s;for(i=0,r=e.length;i<r;++i)s=e[i],n[i]={x:s,y:t[s]};return n}(e);else if(n!==e){if(n){Cn(n,this);const t=this._cachedMeta;zr(t),t._parsed=[]}e&&Object.isExtensible(e)&&(r=this,(i=e)._chartjs?i._chartjs.listeners.push(r):(Object.defineProperty(i,"_chartjs",{configurable:!0,enumerable:!1,value:{listeners:[r]}}),Tn.forEach((t=>{const e="_onData"+Ze(t),n=i[t];Object.defineProperty(i,t,{configurable:!0,enumerable:!1,value(...t){const r=n.apply(this,t);return i._chartjs.listeners.forEach((n=>{"function"==typeof n[e]&&n[e](...t)})),r}})})))),this._syncList=[],this._data=e}var i,r}addElements(){const t=this._cachedMeta;this._dataCheck(),this.datasetElementType&&(t.dataset=new this.datasetElementType)}buildOrUpdateElements(t){const e=this._cachedMeta,n=this.getDataset();let i=!1;this._dataCheck();const r=e._stacked;e._stacked=Dr(e.vScale,e),e.stack!==n.stack&&(i=!0,zr(e),e.stack=n.stack),this._resyncElements(t),(i||r!==e._stacked)&&Ir(this,e._parsed)}configure(){const t=this.chart.config,e=t.datasetScopeKeys(this._type),n=t.getOptionScopes(this.getDataset(),e,!0);this.options=t.createResolver(n,this.getContext()),this._parsing=this.options.parsing,this._cachedDataOpts={}}parse(t,e){const{_cachedMeta:n,_data:i}=this,{iScale:r,_stacked:s}=n,o=r.axis;let a,l,c,h=0===t&&e===i.length||n._sorted,u=t>0&&n._parsed[t-1];if(!1===this._parsing)n._parsed=i,n._sorted=!0,c=i;else{c=Ie(i[t])?this.parseArrayData(n,i,t,e):Fe(i[t])?this.parseObjectData(n,i,t,e):this.parsePrimitiveData(n,i,t,e);const r=()=>null===l[o]||u&&l[o]<u[o];for(a=0;a<e;++a)n._parsed[a+t]=l=c[a],h&&(r()&&(h=!1),u=l);n._sorted=h}s&&Ir(this,c)}parsePrimitiveData(t,e,n,i){const{iScale:r,vScale:s}=t,o=r.axis,a=s.axis,l=r.getLabels(),c=r===s,h=new Array(i);let u,f,d;for(u=0,f=i;u<f;++u)d=u+n,h[u]={[o]:c||r.parse(l[d],d),[a]:s.parse(e[d],d)};return h}parseArrayData(t,e,n,i){const{xScale:r,yScale:s}=t,o=new Array(i);let a,l,c,h;for(a=0,l=i;a<l;++a)c=a+n,h=e[c],o[a]={x:r.parse(h[0],c),y:s.parse(h[1],c)};return o}parseObjectData(t,e,n,i){const{xScale:r,yScale:s}=t,{xAxisKey:o="x",yAxisKey:a="y"}=this._parsing,l=new Array(i);let c,h,u,f;for(c=0,h=i;c<h;++c)u=c+n,f=e[u],l[c]={x:r.parse(Ge(f,o),u),y:s.parse(Ge(f,a),u)};return l}getParsed(t){return this._cachedMeta._parsed[t]}getDataElement(t){return this._cachedMeta.data[t]}applyStack(t,e,n){const i=this.chart,r=this._cachedMeta,s=e[t.axis];return Cr({keys:Tr(i,!0),values:e._stacks[t.axis]._visualValues},s,r.index,{mode:n})}updateRangeFromParsed(t,e,n,i){const r=n[e.axis];let s=null===r?NaN:r;const o=i&&n._stacks[e.axis];i&&o&&(i.values=o,s=Cr(i,r,this._cachedMeta.index)),t.min=Math.min(t.min,s),t.max=Math.max(t.max,s)}getMinMax(t,e){const n=this._cachedMeta,i=n._parsed,r=n._sorted&&t===n.iScale,s=i.length,o=this._getOtherScale(t),a=((t,e,n)=>t&&!e.hidden&&e._stacked&&{keys:Tr(n,!0),values:null})(e,n,this.chart),l={min:Number.POSITIVE_INFINITY,max:Number.NEGATIVE_INFINITY},{min:c,max:h}=function(t){const{min:e,max:n,minDefined:i,maxDefined:r}=t.getUserBounds();return{min:i?e:Number.NEGATIVE_INFINITY,max:r?n:Number.POSITIVE_INFINITY}}(o);let u,f;function d(){f=i[u];const e=f[o.axis];return!ze(f[t.axis])||c>e||h<e}for(u=0;u<s&&(d()||(this.updateRangeFromParsed(l,t,f,a),!r));++u);if(r)for(u=s-1;u>=0;--u)if(!d()){this.updateRangeFromParsed(l,t,f,a);break}return l}getAllParsedValues(t){const e=this._cachedMeta._parsed,n=[];let i,r,s;for(i=0,r=e.length;i<r;++i)s=e[i][t.axis],ze(s)&&n.push(s);return n}getMaxOverflow(){return!1}getLabelAndValue(t){const e=this._cachedMeta,n=e.iScale,i=e.vScale,r=this.getParsed(t);return{label:n?""+n.getLabelForValue(r[n.axis]):"",value:i?""+i.getLabelForValue(r[i.axis]):""}}_update(t){const e=this._cachedMeta;this.update(t||"default"),e._clip=function(t){let e,n,i,r;return Fe(t)?(e=t.top,n=t.right,i=t.bottom,r=t.left):e=n=i=r=t,{top:e,right:n,bottom:i,left:r,disabled:!1===t}}(Be(this.options.clip,function(t,e,n){if(!1===n)return!1;const i=Er(t,n),r=Er(e,n);return{top:r.end,right:i.end,bottom:r.start,left:i.start}}(e.xScale,e.yScale,this.getMaxOverflow())))}update(t){}draw(){const t=this._ctx,e=this.chart,n=this._cachedMeta,i=n.data||[],r=e.chartArea,s=[],o=this._drawStart||0,a=this._drawCount||i.length-o,l=this.options.drawActiveElementsOnTop;let c;for(n.dataset&&n.dataset.draw(t,r,o,a),c=o;c<o+a;++c){const e=i[c];e.hidden||(e.active&&l?s.push(e):e.draw(t,r))}for(c=0;c<s.length;++c)s[c].draw(t,r)}getStyle(t,e){const n=e?"active":"default";return void 0===t&&this._cachedMeta.dataset?this.resolveDatasetElementOptions(n):this.resolveDataElementOptions(t||0,n)}getContext(t,e,n){const i=this.getDataset();let r;if(t>=0&&t<this._cachedMeta.data.length){const e=this._cachedMeta.data[t];r=e.$context||(e.$context=function(t,e,n){return Ei(t,{active:!1,dataIndex:e,parsed:void 0,raw:void 0,element:n,index:e,mode:"default",type:"data"})}(this.getContext(),t,e)),r.parsed=this.getParsed(t),r.raw=i.data[t],r.index=r.dataIndex=t}else r=this.$context||(this.$context=function(t,e){return Ei(t,{active:!1,dataset:void 0,datasetIndex:e,index:e,mode:"default",type:"dataset"})}(this.chart.getContext(),this.index)),r.dataset=i,r.index=r.datasetIndex=this.index;return r.active=!!e,r.mode=n,r}resolveDatasetElementOptions(t){return this._resolveElementOptions(this.datasetElementType.id,t)}resolveDataElementOptions(t,e){return this._resolveElementOptions(this.dataElementType.id,e,t)}_resolveElementOptions(t,e="default",n){const i="active"===e,r=this._cachedDataOpts,s=t+"-"+e,o=r[s],a=this.enableOptionSharing&&Qe(n);if(o)return Br(o,a);const l=this.chart.config,c=l.datasetElementScopeKeys(this._type,t),h=i?[`${t}Hover`,"hover",t,""]:[t,""],u=l.getOptionScopes(this.getDataset(),c),f=Object.keys(ii.elements[t]),d=l.resolveNamedOptions(u,f,(()=>this.getContext(n,i,e)),h);return d.$shared&&(d.$shared=a,r[s]=Object.freeze(Br(d,a))),d}_resolveAnimations(t,e,n){const i=this.chart,r=this._cachedDataOpts,s=`animation-${e}`,o=r[s];if(o)return o;let a;if(!1!==i.options.animation){const i=this.chart.config,r=i.datasetAnimationScopeKeys(this._type,e),s=i.getOptionScopes(this.getDataset(),r);a=i.createResolver(s,this.getContext(t,n,e))}const l=new Pr(i,a&&a.animations);return a&&a._cacheable&&(r[s]=Object.freeze(l)),l}getSharedOptions(t){if(t.$shared)return this._sharedOptions||(this._sharedOptions=Object.assign({},t))}includeOptions(t,e){return!e||jr(t)||this.chart._animationsDisabled}_getSharedOptions(t,e){const n=this.resolveDataElementOptions(t,e),i=this._sharedOptions,r=this.getSharedOptions(n),s=this.includeOptions(e,r)||r!==i;return this.updateSharedOptions(r,e,n),{sharedOptions:r,includeOptions:s}}updateElement(t,e,n,i){jr(i)?Object.assign(t,n):this._resolveAnimations(e,i).update(t,n)}updateSharedOptions(t,e,n){t&&!jr(e)&&this._resolveAnimations(void 0,e).update(t,n)}_setStyle(t,e,n,i){t.active=i;const r=this.getStyle(e,i);this._resolveAnimations(e,n,i).update(t,{options:!i&&this.getSharedOptions(r)||r})}removeHoverStyle(t,e,n){this._setStyle(t,n,"active",!1)}setHoverStyle(t,e,n){this._setStyle(t,n,"active",!0)}_removeDatasetHoverStyle(){const t=this._cachedMeta.dataset;t&&this._setStyle(t,void 0,"active",!1)}_setDatasetHoverStyle(){const t=this._cachedMeta.dataset;t&&this._setStyle(t,void 0,"active",!0)}_resyncElements(t){const e=this._data,n=this._cachedMeta.data;for(const[o,a,l]of this._syncList)this[o](a,l);this._syncList=[];const i=n.length,r=e.length,s=Math.min(r,i);s&&this.parse(0,s),r>i?this._insertElements(i,r-i,t):r<i&&this._removeElements(r,i-r)}_insertElements(t,e,n=!0){const i=this._cachedMeta,r=i.data,s=t+e;let o;const a=t=>{for(t.length+=e,o=t.length-1;o>=s;o--)t[o]=t[o-e]};for(a(r),o=t;o<s;++o)r[o]=new this.dataElementType;this._parsing&&a(i._parsed),this.parse(t,e),n&&this.updateElements(r,t,e,"reset")}updateElements(t,e,n,i){}_removeElements(t,e){const n=this._cachedMeta;if(this._parsing){const i=n._parsed.splice(t,e);n._stacked&&zr(n,i)}n.data.splice(t,e)}_sync(t){if(this._parsing)this._syncList.push(t);else{const[e,n,i]=t;this[e](n,i)}this.chart._dataChanges.push([this.index,...t])}_onDataPush(){const t=arguments.length;this._sync(["_insertElements",this.getDataset().data.length-t,t])}_onDataPop(){this._sync(["_removeElements",this._cachedMeta.data.length-1,1])}_onDataShift(){this._sync(["_removeElements",0,1])}_onDataSplice(t,e){e&&this._sync(["_removeElements",t,e]);const n=arguments.length-2;n&&this._sync(["_insertElements",t,n])}_onDataUnshift(){this._sync(["_insertElements",0,arguments.length])}}function Vr(t){const e=t.iScale,n=function(t,e){if(!t._cache.$bar){const n=t.getMatchingVisibleMetas(e);let i=[];for(let e=0,r=n.length;e<r;e++)i=i.concat(n[e].controller.getAllParsedValues(t));t._cache.$bar=Dn(i.sort(((t,e)=>t-e)))}return t._cache.$bar}(e,t.type);let i,r,s,o,a=e._length;const l=()=>{32767!==s&&-32768!==s&&(Qe(o)&&(a=Math.min(a,Math.abs(s-o)||a)),o=s)};for(i=0,r=n.length;i<r;++i)s=e.getPixelForValue(n[i]),l();for(o=void 0,i=0,r=e.ticks.length;i<r;++i)s=e.getPixelForTick(i),l();return a}function Wr(t,e,n,i){return Ie(t)?function(t,e,n,i){const r=n.parse(t[0],i),s=n.parse(t[1],i),o=Math.min(r,s),a=Math.max(r,s);let l=o,c=a;Math.abs(o)>Math.abs(a)&&(l=a,c=o),e[n.axis]=c,e._custom={barStart:l,barEnd:c,start:r,end:s,min:o,max:a}}(t,e,n,i):e[n.axis]=n.parse(t,i),e}function Hr(t,e,n,i){const r=t.iScale,s=t.vScale,o=r.getLabels(),a=r===s,l=[];let c,h,u,f;for(c=n,h=n+i;c<h;++c)f=e[c],u={},u[r.axis]=a||r.parse(o[c],c),l.push(Wr(f,u,s,c));return l}function Ur(t){return t&&void 0!==t.barStart&&void 0!==t.barEnd}function $r(t,e,n,i){let r=e.borderSkipped;const s={};if(!r)return void(t.borderSkipped=s);if(!0===r)return void(t.borderSkipped={top:!0,right:!0,bottom:!0,left:!0});const{start:o,end:a,reverse:l,top:c,bottom:h}=function(t){let e,n,i,r,s;return t.horizontal?(e=t.base>t.x,n="left",i="right"):(e=t.base<t.y,n="bottom",i="top"),e?(r="end",s="start"):(r="start",s="end"),{start:n,end:i,reverse:e,top:r,bottom:s}}(t);"middle"===r&&n&&(t.enableBorderRadius=!0,(n._top||0)===i?r=c:(n._bottom||0)===i?r=h:(s[Yr(h,o,a,l)]=!0,r=c)),s[Yr(r,o,a,l)]=!0,t.borderSkipped=s}function Yr(t,e,n,i){var r,s,o;return i?(o=n,t=qr(t=(r=t)===(s=e)?o:r===o?s:r,n,e)):t=qr(t,e,n),t}function qr(t,e,n){return"start"===t?e:"end"===t?n:t}function Xr(t,{inflateAmount:e},n){t.inflateAmount="auto"===e?1===n?.33:0:e}class Kr extends Nr{static id="doughnut";static defaults={datasetElementType:!1,dataElementType:"arc",animation:{animateRotate:!0,animateScale:!1},animations:{numbers:{type:"number",properties:["circumference","endAngle","innerRadius","outerRadius","startAngle","x","y","offset","borderWidth","spacing"]}},cutout:"50%",rotation:0,circumference:360,radius:"100%",spacing:0,indexAxis:"r"};static descriptors={_scriptable:t=>"spacing"!==t,_indexable:t=>"spacing"!==t};static overrides={aspectRatio:1,plugins:{legend:{labels:{generateLabels(t){const e=t.data;if(e.labels.length&&e.datasets.length){const{labels:{pointStyle:n,color:i}}=t.legend.options;return e.labels.map(((e,r)=>{const s=t.getDatasetMeta(0).controller.getStyle(r);return{text:e,fillStyle:s.backgroundColor,strokeStyle:s.borderColor,fontColor:i,lineWidth:s.borderWidth,pointStyle:n,hidden:!t.getDataVisibility(r),index:r}}))}return[]}},onClick(t,e,n){n.chart.toggleDataVisibility(e.index),n.chart.update()}}}};constructor(t,e){super(t,e),this.enableOptionSharing=!0,this.innerRadius=void 0,this.outerRadius=void 0,this.offsetX=void 0,this.offsetY=void 0}linkScales(){}parse(t,e){const n=this.getDataset().data,i=this._cachedMeta;if(!1===this._parsing)i._parsed=n;else{let r,s,o=t=>+n[t];if(Fe(n[t])){const{key:t="value"}=this._parsing;o=e=>+Ge(n[e],t)}for(r=t,s=t+e;r<s;++r)i._parsed[r]=o(r)}}_getRotation(){return bn(this.options.rotation-90)}_getCircumference(){return bn(this.options.circumference)}_getRotationExtents(){let t=rn,e=-rn;for(let n=0;n<this.chart.data.datasets.length;++n)if(this.chart.isDatasetVisible(n)&&this.chart.getDatasetMeta(n).type===this._type){const i=this.chart.getDatasetMeta(n).controller,r=i._getRotation(),s=i._getCircumference();t=Math.min(t,r),e=Math.max(e,r+s)}return{rotation:t,circumference:e-t}}update(t){const e=this.chart,{chartArea:n}=e,i=this._cachedMeta,r=i.data,s=this.getMaxBorderWidth()+this.getMaxOffset(r)+this.options.spacing,o=Math.max((Math.min(n.width,n.height)-s)/2,0),a=Math.min((l=this.options.cutout,c=o,"string"==typeof l&&l.endsWith("%")?parseFloat(l)/100:+l/c),1);var l,c;const h=this._getRingWeight(this.index),{circumference:u,rotation:f}=this._getRotationExtents(),{ratioX:d,ratioY:p,offsetX:g,offsetY:m}=function(t,e,n){let i=1,r=1,s=0,o=0;if(e<rn){const a=t,l=a+e,c=Math.cos(a),h=Math.sin(a),u=Math.cos(l),f=Math.sin(l),d=(t,e,i)=>Mn(t,a,l,!0)?1:Math.max(e,e*n,i,i*n),p=(t,e,i)=>Mn(t,a,l,!0)?-1:Math.min(e,e*n,i,i*n),g=d(0,c,u),m=d(ln,h,f),b=p(nn,c,u),_=p(nn+ln,h,f);i=(g-b)/2,r=(m-_)/2,s=-(g+b)/2,o=-(m+_)/2}return{ratioX:i,ratioY:r,offsetX:s,offsetY:o}}(f,u,a),b=(n.width-s)/d,_=(n.height-s)/p,y=Math.max(Math.min(b,_)/2,0),x=Ne(this.options.radius,y),v=(x-Math.max(x*a,0))/this._getVisibleDatasetWeightTotal();this.offsetX=g*x,this.offsetY=m*x,i.total=this.calculateTotal(),this.outerRadius=x-v*this._getRingWeightOffset(this.index),this.innerRadius=Math.max(this.outerRadius-v*h,0),this.updateElements(r,0,r.length,t)}_circumference(t,e){const n=this.options,i=this._cachedMeta,r=this._getCircumference();return e&&n.animation.animateRotate||!this.chart.getDataVisibility(t)||null===i._parsed[t]||i.data[t].hidden?0:this.calculateCircumference(i._parsed[t]*r/rn)}updateElements(t,e,n,i){const r="reset"===i,s=this.chart,o=s.chartArea,a=s.options.animation,l=(o.left+o.right)/2,c=(o.top+o.bottom)/2,h=r&&a.animateScale,u=h?0:this.innerRadius,f=h?0:this.outerRadius,{sharedOptions:d,includeOptions:p}=this._getSharedOptions(e,i);let g,m=this._getRotation();for(g=0;g<e;++g)m+=this._circumference(g,r);for(g=e;g<e+n;++g){const e=this._circumference(g,r),n=t[g],s={x:l+this.offsetX,y:c+this.offsetY,startAngle:m,endAngle:m+e,circumference:e,outerRadius:f,innerRadius:u};p&&(s.options=d||this.resolveDataElementOptions(g,n.active?"active":i)),m+=e,this.updateElement(n,g,s,i)}}calculateTotal(){const t=this._cachedMeta,e=t.data;let n,i=0;for(n=0;n<e.length;n++){const r=t._parsed[n];null===r||isNaN(r)||!this.chart.getDataVisibility(n)||e[n].hidden||(i+=Math.abs(r))}return i}calculateCircumference(t){const e=this._cachedMeta.total;return e>0&&!isNaN(t)?rn*(Math.abs(t)/e):0}getLabelAndValue(t){const e=this._cachedMeta,n=this.chart,i=n.data.labels||[],r=Kn(e._parsed[t],n.options.locale);return{label:i[t]||"",value:r}}getMaxBorderWidth(t){let e=0;const n=this.chart;let i,r,s,o,a;if(!t)for(i=0,r=n.data.datasets.length;i<r;++i)if(n.isDatasetVisible(i)){s=n.getDatasetMeta(i),t=s.data,o=s.controller;break}if(!t)return 0;for(i=0,r=t.length;i<r;++i)a=o.resolveDataElementOptions(i),"inner"!==a.borderAlign&&(e=Math.max(e,a.borderWidth||0,a.hoverBorderWidth||0));return e}getMaxOffset(t){let e=0;for(let n=0,i=t.length;n<i;++n){const t=this.resolveDataElementOptions(n);e=Math.max(e,t.offset||0,t.hoverOffset||0)}return e}_getRingWeightOffset(t){let e=0;for(let n=0;n<t;++n)this.chart.isDatasetVisible(n)&&(e+=this._getRingWeight(n));return e}_getRingWeight(t){return Math.max(Be(this.chart.data.datasets[t].weight,1),0)}_getVisibleDatasetWeightTotal(){return this._getRingWeightOffset(this.chart.data.datasets.length)||1}}class Jr extends Nr{static id="polarArea";static defaults={dataElementType:"arc",animation:{animateRotate:!0,animateScale:!0},animations:{numbers:{type:"number",properties:["x","y","startAngle","endAngle","innerRadius","outerRadius"]}},indexAxis:"r",startAngle:0};static overrides={aspectRatio:1,plugins:{legend:{labels:{generateLabels(t){const e=t.data;if(e.labels.length&&e.datasets.length){const{labels:{pointStyle:n,color:i}}=t.legend.options;return e.labels.map(((e,r)=>{const s=t.getDatasetMeta(0).controller.getStyle(r);return{text:e,fillStyle:s.backgroundColor,strokeStyle:s.borderColor,fontColor:i,lineWidth:s.borderWidth,pointStyle:n,hidden:!t.getDataVisibility(r),index:r}}))}return[]}},onClick(t,e,n){n.chart.toggleDataVisibility(e.index),n.chart.update()}}},scales:{r:{type:"radialLinear",angleLines:{display:!1},beginAtZero:!0,grid:{circular:!0},pointLabels:{display:!1},startAngle:0}}};constructor(t,e){super(t,e),this.innerRadius=void 0,this.outerRadius=void 0}getLabelAndValue(t){const e=this._cachedMeta,n=this.chart,i=n.data.labels||[],r=Kn(e._parsed[t].r,n.options.locale);return{label:i[t]||"",value:r}}parseObjectData(t,e,n,i){return Hi.bind(this)(t,e,n,i)}update(t){const e=this._cachedMeta.data;this._updateRadius(),this.updateElements(e,0,e.length,t)}getMinMax(){const t=this._cachedMeta,e={min:Number.POSITIVE_INFINITY,max:Number.NEGATIVE_INFINITY};return t.data.forEach(((t,n)=>{const i=this.getParsed(n).r;!isNaN(i)&&this.chart.getDataVisibility(n)&&(i<e.min&&(e.min=i),i>e.max&&(e.max=i))})),e}_updateRadius(){const t=this.chart,e=t.chartArea,n=t.options,i=Math.min(e.right-e.left,e.bottom-e.top),r=Math.max(i/2,0),s=(r-Math.max(n.cutoutPercentage?r/100*n.cutoutPercentage:1,0))/t.getVisibleDatasetCount();this.outerRadius=r-s*this.index,this.innerRadius=this.outerRadius-s}updateElements(t,e,n,i){const r="reset"===i,s=this.chart,o=s.options.animation,a=this._cachedMeta.rScale,l=a.xCenter,c=a.yCenter,h=a.getIndexAngle(0)-.5*nn;let u,f=h;const d=360/this.countVisibleElements();for(u=0;u<e;++u)f+=this._computeAngle(u,i,d);for(u=e;u<e+n;u++){const e=t[u];let n=f,p=f+this._computeAngle(u,i,d),g=s.getDataVisibility(u)?a.getDistanceFromCenterForValue(this.getParsed(u).r):0;f=p,r&&(o.animateScale&&(g=0),o.animateRotate&&(n=p=h));const m={x:l,y:c,innerRadius:0,outerRadius:g,startAngle:n,endAngle:p,options:this.resolveDataElementOptions(u,e.active?"active":i)};this.updateElement(e,u,m,i)}}countVisibleElements(){const t=this._cachedMeta;let e=0;return t.data.forEach(((t,n)=>{!isNaN(this.getParsed(n).r)&&this.chart.getDataVisibility(n)&&e++})),e}_computeAngle(t,e,n){return this.chart.getDataVisibility(t)?bn(this.resolveDataElementOptions(t,e).angle||n):0}}var Gr=Object.freeze({__proto__:null,BarController:class extends Nr{static id="bar";static defaults={datasetElementType:!1,dataElementType:"bar",categoryPercentage:.8,barPercentage:.9,grouped:!0,animations:{numbers:{type:"number",properties:["x","y","base","width","height"]}}};static overrides={scales:{_index_:{type:"category",offset:!0,grid:{offset:!0}},_value_:{type:"linear",beginAtZero:!0}}};parsePrimitiveData(t,e,n,i){return Hr(t,e,n,i)}parseArrayData(t,e,n,i){return Hr(t,e,n,i)}parseObjectData(t,e,n,i){const{iScale:r,vScale:s}=t,{xAxisKey:o="x",yAxisKey:a="y"}=this._parsing,l="x"===r.axis?o:a,c="x"===s.axis?o:a,h=[];let u,f,d,p;for(u=n,f=n+i;u<f;++u)p=e[u],d={},d[r.axis]=r.parse(Ge(p,l),u),h.push(Wr(Ge(p,c),d,s,u));return h}updateRangeFromParsed(t,e,n,i){super.updateRangeFromParsed(t,e,n,i);const r=n._custom;r&&e===this._cachedMeta.vScale&&(t.min=Math.min(t.min,r.min),t.max=Math.max(t.max,r.max))}getMaxOverflow(){return 0}getLabelAndValue(t){const e=this._cachedMeta,{iScale:n,vScale:i}=e,r=this.getParsed(t),s=r._custom,o=Ur(s)?"["+s.start+", "+s.end+"]":""+i.getLabelForValue(r[i.axis]);return{label:""+n.getLabelForValue(r[n.axis]),value:o}}initialize(){this.enableOptionSharing=!0,super.initialize(),this._cachedMeta.stack=this.getDataset().stack}update(t){const e=this._cachedMeta;this.updateElements(e.data,0,e.data.length,t)}updateElements(t,e,n,i){const r="reset"===i,{index:s,_cachedMeta:{vScale:o}}=this,a=o.getBasePixel(),l=o.isHorizontal(),c=this._getRuler(),{sharedOptions:h,includeOptions:u}=this._getSharedOptions(e,i);for(let f=e;f<e+n;f++){const e=this.getParsed(f),n=r||Le(e[o.axis])?{base:a,head:a}:this._calculateBarValuePixels(f),d=this._calculateBarIndexPixels(f,c),p=(e._stacks||{})[o.axis],g={horizontal:l,base:n.base,enableBorderRadius:!p||Ur(e._custom)||s===p._top||s===p._bottom,x:l?n.head:d.center,y:l?d.center:n.head,height:l?d.size:Math.abs(n.size),width:l?Math.abs(n.size):d.size};u&&(g.options=h||this.resolveDataElementOptions(f,t[f].active?"active":i));const m=g.options||t[f].options;$r(g,m,p,s),Xr(g,m,c.ratio),this.updateElement(t[f],f,g,i)}}_getStacks(t,e){const{iScale:n}=this._cachedMeta,i=n.getMatchingVisibleMetas(this._type).filter((t=>t.controller.options.grouped)),r=n.options.stacked,s=[],o=t=>{const n=t.controller.getParsed(e),i=n&&n[t.vScale.axis];if(Le(i)||isNaN(i))return!0};for(const a of i)if((void 0===e||!o(a))&&((!1===r||-1===s.indexOf(a.stack)||void 0===r&&void 0===a.stack)&&s.push(a.stack),a.index===t))break;return s.length||s.push(void 0),s}_getStackCount(t){return this._getStacks(void 0,t).length}_getStackIndex(t,e,n){const i=this._getStacks(t,n),r=void 0!==e?i.indexOf(e):-1;return-1===r?i.length-1:r}_getRuler(){const t=this.options,e=this._cachedMeta,n=e.iScale,i=[];let r,s;for(r=0,s=e.data.length;r<s;++r)i.push(n.getPixelForValue(this.getParsed(r)[n.axis],r));const o=t.barThickness;return{min:o||Vr(e),pixels:i,start:n._startPixel,end:n._endPixel,stackCount:this._getStackCount(),scale:n,grouped:t.grouped,ratio:o?1:t.categoryPercentage*t.barPercentage}}_calculateBarValuePixels(t){const{_cachedMeta:{vScale:e,_stacked:n,index:i},options:{base:r,minBarLength:s}}=this,o=r||0,a=this.getParsed(t),l=a._custom,c=Ur(l);let h,u,f=a[e.axis],d=0,p=n?this.applyStack(e,a,n):f;p!==f&&(d=p-f,p=f),c&&(f=l.barStart,p=l.barEnd-l.barStart,0!==f&&fn(f)!==fn(l.barEnd)&&(d=0),d+=f);const g=Le(r)||c?d:r;let m=e.getPixelForValue(g);if(h=this.chart.getDataVisibility(t)?e.getPixelForValue(d+p):m,u=h-m,Math.abs(u)<s){u=function(t,e,n){return 0!==t?fn(t):(e.isHorizontal()?1:-1)*(e.min>=n?1:-1)}(u,e,o)*s,f===o&&(m-=u/2);const t=e.getPixelForDecimal(0),r=e.getPixelForDecimal(1),l=Math.min(t,r),d=Math.max(t,r);m=Math.max(Math.min(m,d),l),h=m+u,n&&!c&&(a._stacks[e.axis]._visualValues[i]=e.getValueForPixel(h)-e.getValueForPixel(m))}if(m===e.getPixelForValue(o)){const t=fn(u)*e.getLineWidthForValue(o)/2;m+=t,u-=t}return{size:u,base:m,head:h,center:h+u/2}}_calculateBarIndexPixels(t,e){const n=e.scale,i=this.options,r=i.skipNull,s=Be(i.maxBarThickness,1/0);let o,a;if(e.grouped){const n=r?this._getStackCount(t):e.stackCount,l="flex"===i.barThickness?function(t,e,n,i){const r=e.pixels,s=r[t];let o=t>0?r[t-1]:null,a=t<r.length-1?r[t+1]:null;const l=n.categoryPercentage;null===o&&(o=s-(null===a?e.end-e.start:a-s)),null===a&&(a=s+s-o);const c=s-(s-Math.min(o,a))/2*l;return{chunk:Math.abs(a-o)/2*l/i,ratio:n.barPercentage,start:c}}(t,e,i,n):function(t,e,n,i){const r=n.barThickness;let s,o;return Le(r)?(s=e.min*n.categoryPercentage,o=n.barPercentage):(s=r*i,o=1),{chunk:s/i,ratio:o,start:e.pixels[t]-s/2}}(t,e,i,n),c=this._getStackIndex(this.index,this._cachedMeta.stack,r?t:void 0);o=l.start+l.chunk*c+l.chunk/2,a=Math.min(s,l.chunk*l.ratio)}else o=n.getPixelForValue(this.getParsed(t)[n.axis],t),a=Math.min(s,e.min*e.ratio);return{base:o-a/2,head:o+a/2,center:o,size:a}}draw(){const t=this._cachedMeta,e=t.vScale,n=t.data,i=n.length;let r=0;for(;r<i;++r)null!==this.getParsed(r)[e.axis]&&n[r].draw(this._ctx)}},BubbleController:class extends Nr{static id="bubble";static defaults={datasetElementType:!1,dataElementType:"point",animations:{numbers:{type:"number",properties:["x","y","borderWidth","radius"]}}};static overrides={scales:{x:{type:"linear"},y:{type:"linear"}}};initialize(){this.enableOptionSharing=!0,super.initialize()}parsePrimitiveData(t,e,n,i){const r=super.parsePrimitiveData(t,e,n,i);for(let s=0;s<r.length;s++)r[s]._custom=this.resolveDataElementOptions(s+n).radius;return r}parseArrayData(t,e,n,i){const r=super.parseArrayData(t,e,n,i);for(let s=0;s<r.length;s++){const t=e[n+s];r[s]._custom=Be(t[2],this.resolveDataElementOptions(s+n).radius)}return r}parseObjectData(t,e,n,i){const r=super.parseObjectData(t,e,n,i);for(let s=0;s<r.length;s++){const t=e[n+s];r[s]._custom=Be(t&&t.r&&+t.r,this.resolveDataElementOptions(s+n).radius)}return r}getMaxOverflow(){const t=this._cachedMeta.data;let e=0;for(let n=t.length-1;n>=0;--n)e=Math.max(e,t[n].size(this.resolveDataElementOptions(n))/2);return e>0&&e}getLabelAndValue(t){const e=this._cachedMeta,n=this.chart.data.labels||[],{xScale:i,yScale:r}=e,s=this.getParsed(t),o=i.getLabelForValue(s.x),a=r.getLabelForValue(s.y),l=s._custom;return{label:n[t]||"",value:"("+o+", "+a+(l?", "+l:"")+")"}}update(t){const e=this._cachedMeta.data;this.updateElements(e,0,e.length,t)}updateElements(t,e,n,i){const r="reset"===i,{iScale:s,vScale:o}=this._cachedMeta,{sharedOptions:a,includeOptions:l}=this._getSharedOptions(e,i),c=s.axis,h=o.axis;for(let u=e;u<e+n;u++){const e=t[u],n=!r&&this.getParsed(u),f={},d=f[c]=r?s.getPixelForDecimal(.5):s.getPixelForValue(n[c]),p=f[h]=r?o.getBasePixel():o.getPixelForValue(n[h]);f.skip=isNaN(d)||isNaN(p),l&&(f.options=a||this.resolveDataElementOptions(u,e.active?"active":i),r&&(f.options.radius=0)),this.updateElement(e,u,f,i)}}resolveDataElementOptions(t,e){const n=this.getParsed(t);let i=super.resolveDataElementOptions(t,e);i.$shared&&(i=Object.assign({},i,{$shared:!1}));const r=i.radius;return"active"!==e&&(i.radius=0),i.radius+=Be(n&&n._custom,r),i}},DoughnutController:Kr,LineController:class extends Nr{static id="line";static defaults={datasetElementType:"line",dataElementType:"point",showLine:!0,spanGaps:!1};static overrides={scales:{_index_:{type:"category"},_value_:{type:"linear"}}};initialize(){this.enableOptionSharing=!0,this.supportsDecimation=!0,super.initialize()}update(t){const e=this._cachedMeta,{dataset:n,data:i=[],_dataset:r}=e,s=this.chart._animationsDisabled;let{start:o,count:a}=zn(e,i,s);this._drawStart=o,this._drawCount=a,jn(e)&&(o=0,a=i.length),n._chart=this.chart,n._datasetIndex=this.index,n._decimated=!!r._decimated,n.points=i;const l=this.resolveDatasetElementOptions(t);this.options.showLine||(l.borderWidth=0),l.segment=this.options.segment,this.updateElement(n,void 0,{animated:!s,options:l},t),this.updateElements(i,o,a,t)}updateElements(t,e,n,i){const r="reset"===i,{iScale:s,vScale:o,_stacked:a,_dataset:l}=this._cachedMeta,{sharedOptions:c,includeOptions:h}=this._getSharedOptions(e,i),u=s.axis,f=o.axis,{spanGaps:d,segment:p}=this.options,g=gn(d)?d:Number.POSITIVE_INFINITY,m=this.chart._animationsDisabled||r||"none"===i,b=e+n,_=t.length;let y=e>0&&this.getParsed(e-1);for(let x=0;x<_;++x){const n=t[x],d=m?n:{};if(x<e||x>=b){d.skip=!0;continue}const _=this.getParsed(x),v=Le(_[f]),w=d[u]=s.getPixelForValue(_[u],x),k=d[f]=r||v?o.getBasePixel():o.getPixelForValue(a?this.applyStack(o,_,a):_[f],x);d.skip=isNaN(w)||isNaN(k)||v,d.stop=x>0&&Math.abs(_[u]-y[u])>g,p&&(d.parsed=_,d.raw=l.data[x]),h&&(d.options=c||this.resolveDataElementOptions(x,n.active?"active":i)),m||this.updateElement(n,x,d,i),y=_}}getMaxOverflow(){const t=this._cachedMeta,e=t.dataset,n=e.options&&e.options.borderWidth||0,i=t.data||[];if(!i.length)return n;const r=i[0].size(this.resolveDataElementOptions(0)),s=i[i.length-1].size(this.resolveDataElementOptions(i.length-1));return Math.max(n,r,s)/2}draw(){const t=this._cachedMeta;t.dataset.updateControlPoints(this.chart.chartArea,t.iScale.axis),super.draw()}},PolarAreaController:Jr,PieController:class extends Kr{static id="pie";static defaults={cutout:0,rotation:0,circumference:360,radius:"100%"}},RadarController:class extends Nr{static id="radar";static defaults={datasetElementType:"line",dataElementType:"point",indexAxis:"r",showLine:!0,elements:{line:{fill:"start"}}};static overrides={aspectRatio:1,scales:{r:{type:"radialLinear"}}};getLabelAndValue(t){const e=this._cachedMeta.vScale,n=this.getParsed(t);return{label:e.getLabels()[t],value:""+e.getLabelForValue(n[e.axis])}}parseObjectData(t,e,n,i){return Hi.bind(this)(t,e,n,i)}update(t){const e=this._cachedMeta,n=e.dataset,i=e.data||[],r=e.iScale.getLabels();if(n.points=i,"resize"!==t){const e=this.resolveDatasetElementOptions(t);this.options.showLine||(e.borderWidth=0);const s={_loop:!0,_fullLoop:r.length===i.length,options:e};this.updateElement(n,void 0,s,t)}this.updateElements(i,0,i.length,t)}updateElements(t,e,n,i){const r=this._cachedMeta.rScale,s="reset"===i;for(let o=e;o<e+n;o++){const e=t[o],n=this.resolveDataElementOptions(o,e.active?"active":i),a=r.getPointPositionForValue(o,this.getParsed(o).r),l=s?r.xCenter:a.x,c=s?r.yCenter:a.y,h={x:l,y:c,angle:a.angle,skip:isNaN(l)||isNaN(c),options:n};this.updateElement(e,o,h,i)}}},ScatterController:class extends Nr{static id="scatter";static defaults={datasetElementType:!1,dataElementType:"point",showLine:!1,fill:!1};static overrides={interaction:{mode:"point"},scales:{x:{type:"linear"},y:{type:"linear"}}};getLabelAndValue(t){const e=this._cachedMeta,n=this.chart.data.labels||[],{xScale:i,yScale:r}=e,s=this.getParsed(t),o=i.getLabelForValue(s.x),a=r.getLabelForValue(s.y);return{label:n[t]||"",value:"("+o+", "+a+")"}}update(t){const e=this._cachedMeta,{data:n=[]}=e,i=this.chart._animationsDisabled;let{start:r,count:s}=zn(e,n,i);if(this._drawStart=r,this._drawCount=s,jn(e)&&(r=0,s=n.length),this.options.showLine){const{dataset:r,_dataset:s}=e;r._chart=this.chart,r._datasetIndex=this.index,r._decimated=!!s._decimated,r.points=n;const o=this.resolveDatasetElementOptions(t);o.segment=this.options.segment,this.updateElement(r,void 0,{animated:!i,options:o},t)}this.updateElements(n,r,s,t)}addElements(){const{showLine:t}=this.options;!this.datasetElementType&&t&&(this.datasetElementType=this.chart.registry.getElement("line")),super.addElements()}updateElements(t,e,n,i){const r="reset"===i,{iScale:s,vScale:o,_stacked:a,_dataset:l}=this._cachedMeta,c=this.resolveDataElementOptions(e,i),h=this.getSharedOptions(c),u=this.includeOptions(i,h),f=s.axis,d=o.axis,{spanGaps:p,segment:g}=this.options,m=gn(p)?p:Number.POSITIVE_INFINITY,b=this.chart._animationsDisabled||r||"none"===i;let _=e>0&&this.getParsed(e-1);for(let y=e;y<e+n;++y){const e=t[y],n=this.getParsed(y),c=b?e:{},p=Le(n[d]),x=c[f]=s.getPixelForValue(n[f],y),v=c[d]=r||p?o.getBasePixel():o.getPixelForValue(a?this.applyStack(o,n,a):n[d],y);c.skip=isNaN(x)||isNaN(v)||p,c.stop=y>0&&Math.abs(n[f]-_[f])>m,g&&(c.parsed=n,c.raw=l.data[y]),u&&(c.options=h||this.resolveDataElementOptions(y,e.active?"active":i)),b||this.updateElement(e,y,c,i),_=n}this.updateSharedOptions(h,i,c)}getMaxOverflow(){const t=this._cachedMeta,e=t.data||[];if(!this.options.showLine){let t=0;for(let n=e.length-1;n>=0;--n)t=Math.max(t,e[n].size(this.resolveDataElementOptions(n))/2);return t>0&&t}const n=t.dataset,i=n.options&&n.options.borderWidth||0;if(!e.length)return i;const r=e[0].size(this.resolveDataElementOptions(0)),s=e[e.length-1].size(this.resolveDataElementOptions(e.length-1));return Math.max(i,r,s)/2}}});function Zr(){throw new Error("This method is not implemented: Check that a complete date adapter is provided.")}class Qr{static override(t){Object.assign(Qr.prototype,t)}constructor(t){this.options=t||{}}init(){}formats(){return Zr()}parse(){return Zr()}format(){return Zr()}add(){return Zr()}diff(){return Zr()}startOf(){return Zr()}endOf(){return Zr()}}var ts=Qr;function es(t,e,n,i){const{controller:r,data:s,_sorted:o}=t,a=r._cachedMeta.iScale;if(a&&e===a.axis&&"r"!==e&&o&&s.length){const t=a._reversePixels?En:Pn;if(!i)return t(s,e,n);if(r._sharedOptions){const i=s[0],r="function"==typeof i.getRange&&i.getRange(e);if(r){const i=t(s,e,n-r),o=t(s,e,n+r);return{lo:i.lo,hi:o.hi}}}}return{lo:0,hi:s.length-1}}function ns(t,e,n,i,r){const s=t.getSortedVisibleDatasetMetas(),o=n[e];for(let a=0,l=s.length;a<l;++a){const{index:t,data:n}=s[a],{lo:l,hi:c}=es(s[a],e,o,r);for(let e=l;e<=c;++e){const r=n[e];r.skip||i(r,t,e)}}}function is(t,e,n,i,r){const s=[];return r||t.isPointInArea(e)?(ns(t,n,e,(function(n,o,a){(r||hi(n,t.chartArea,0))&&n.inRange(e.x,e.y,i)&&s.push({element:n,datasetIndex:o,index:a})}),!0),s):s}function rs(t,e,n,i,r,s){let o=[];const a=function(t){const e=-1!==t.indexOf("x"),n=-1!==t.indexOf("y");return function(t,i){const r=e?Math.abs(t.x-i.x):0,s=n?Math.abs(t.y-i.y):0;return Math.sqrt(Math.pow(r,2)+Math.pow(s,2))}}(n);let l=Number.POSITIVE_INFINITY;return ns(t,n,e,(function(n,c,h){const u=n.inRange(e.x,e.y,r);if(i&&!u)return;const f=n.getCenterPoint(r);if(!s&&!t.isPointInArea(f)&&!u)return;const d=a(e,f);d<l?(o=[{element:n,datasetIndex:c,index:h}],l=d):d===l&&o.push({element:n,datasetIndex:c,index:h})})),o}function ss(t,e,n,i,r,s){return s||t.isPointInArea(e)?"r"!==n||i?rs(t,e,n,i,r,s):function(t,e,n,i){let r=[];return ns(t,n,e,(function(t,n,s){const{startAngle:o,endAngle:a}=t.getProps(["startAngle","endAngle"],i),{angle:l}=xn(t,{x:e.x,y:e.y});Mn(l,o,a)&&r.push({element:t,datasetIndex:n,index:s})})),r}(t,e,n,r):[]}function os(t,e,n,i,r){const s=[],o="x"===n?"inXRange":"inYRange";let a=!1;return ns(t,n,e,((t,i,l)=>{t[o](e[n],r)&&(s.push({element:t,datasetIndex:i,index:l}),a=a||t.inRange(e.x,e.y,r))})),i&&!a?[]:s}var as={evaluateInteractionItems:ns,modes:{index(t,e,n,i){const r=rr(e,t),s=n.axis||"x",o=n.includeInvisible||!1,a=n.intersect?is(t,r,s,i,o):ss(t,r,s,!1,i,o),l=[];return a.length?(t.getSortedVisibleDatasetMetas().forEach((t=>{const e=a[0].index,n=t.data[e];n&&!n.skip&&l.push({element:n,datasetIndex:t.index,index:e})})),l):[]},dataset(t,e,n,i){const r=rr(e,t),s=n.axis||"xy",o=n.includeInvisible||!1;let a=n.intersect?is(t,r,s,i,o):ss(t,r,s,!1,i,o);if(a.length>0){const e=a[0].datasetIndex,n=t.getDatasetMeta(e).data;a=[];for(let t=0;t<n.length;++t)a.push({element:n[t],datasetIndex:e,index:t})}return a},point:(t,e,n,i)=>is(t,rr(e,t),n.axis||"xy",i,n.includeInvisible||!1),nearest(t,e,n,i){const r=rr(e,t),s=n.axis||"xy",o=n.includeInvisible||!1;return ss(t,r,s,n.intersect,i,o)},x:(t,e,n,i)=>os(t,rr(e,t),"x",n.intersect,i),y:(t,e,n,i)=>os(t,rr(e,t),"y",n.intersect,i)}};const ls=["left","top","right","bottom"];function cs(t,e){return t.filter((t=>t.pos===e))}function hs(t,e){return t.filter((t=>-1===ls.indexOf(t.pos)&&t.box.axis===e))}function us(t,e){return t.sort(((t,n)=>{const i=e?n:t,r=e?t:n;return i.weight===r.weight?i.index-r.index:i.weight-r.weight}))}function fs(t,e){const n=function(t){const e={};for(const n of t){const{stack:t,pos:i,stackWeight:r}=n;if(!t||!ls.includes(i))continue;const s=e[t]||(e[t]={count:0,placed:0,weight:0,size:0});s.count++,s.weight+=r}return e}(t),{vBoxMaxWidth:i,hBoxMaxHeight:r}=e;let s,o,a;for(s=0,o=t.length;s<o;++s){a=t[s];const{fullSize:o}=a.box,l=n[a.stack],c=l&&a.stackWeight/l.weight;a.horizontal?(a.width=c?c*i:o&&e.availableWidth,a.height=r):(a.width=i,a.height=c?c*r:o&&e.availableHeight)}return n}function ds(t,e,n,i){return Math.max(t[n],e[n])+Math.max(t[i],e[i])}function ps(t,e){t.top=Math.max(t.top,e.top),t.left=Math.max(t.left,e.left),t.bottom=Math.max(t.bottom,e.bottom),t.right=Math.max(t.right,e.right)}function gs(t,e,n,i){const{pos:r,box:s}=n,o=t.maxPadding;if(!Fe(r)){n.size&&(t[r]-=n.size);const e=i[n.stack]||{size:0,count:1};e.size=Math.max(e.size,n.horizontal?s.height:s.width),n.size=e.size/e.count,t[r]+=n.size}s.getPadding&&ps(o,s.getPadding());const a=Math.max(0,e.outerWidth-ds(o,t,"left","right")),l=Math.max(0,e.outerHeight-ds(o,t,"top","bottom")),c=a!==t.w,h=l!==t.h;return t.w=a,t.h=l,n.horizontal?{same:c,other:h}:{same:h,other:c}}function ms(t,e){const n=e.maxPadding;function i(t){const i={left:0,top:0,right:0,bottom:0};return t.forEach((t=>{i[t]=Math.max(e[t],n[t])})),i}return i(t?["left","right"]:["top","bottom"])}function bs(t,e,n,i){const r=[];let s,o,a,l,c,h;for(s=0,o=t.length,c=0;s<o;++s){a=t[s],l=a.box,l.update(a.width||e.w,a.height||e.h,ms(a.horizontal,e));const{same:o,other:u}=gs(e,n,a,i);c|=o&&r.length,h=h||u,l.fullSize||r.push(a)}return c&&bs(r,e,n,i)||h}function _s(t,e,n,i,r){t.top=n,t.left=e,t.right=e+i,t.bottom=n+r,t.width=i,t.height=r}function ys(t,e,n,i){const r=n.padding;let{x:s,y:o}=e;for(const a of t){const t=a.box,l=i[a.stack]||{count:1,placed:0,weight:1},c=a.stackWeight/l.weight||1;if(a.horizontal){const i=e.w*c,s=l.size||t.height;Qe(l.start)&&(o=l.start),t.fullSize?_s(t,r.left,o,n.outerWidth-r.right-r.left,s):_s(t,e.left+l.placed,o,i,s),l.start=o,l.placed+=i,o=t.bottom}else{const i=e.h*c,o=l.size||t.width;Qe(l.start)&&(s=l.start),t.fullSize?_s(t,s,r.top,o,n.outerHeight-r.bottom-r.top):_s(t,s,e.top+l.placed,o,i),l.start=s,l.placed+=i,s=t.right}}e.x=s,e.y=o}var xs={addBox(t,e){t.boxes||(t.boxes=[]),e.fullSize=e.fullSize||!1,e.position=e.position||"top",e.weight=e.weight||0,e._layers=e._layers||function(){return[{z:0,draw(t){e.draw(t)}}]},t.boxes.push(e)},removeBox(t,e){const n=t.boxes?t.boxes.indexOf(e):-1;-1!==n&&t.boxes.splice(n,1)},configure(t,e,n){e.fullSize=n.fullSize,e.position=n.position,e.weight=n.weight},update(t,e,n,i){if(!t)return;const r=Oi(t.options.layout.padding),s=Math.max(e-r.width,0),o=Math.max(n-r.height,0),a=function(t){const e=function(t){const e=[];let n,i,r,s,o,a;for(n=0,i=(t||[]).length;n<i;++n)r=t[n],({position:s,options:{stack:o,stackWeight:a=1}}=r),e.push({index:n,box:r,pos:s,horizontal:r.isHorizontal(),weight:r.weight,stack:o&&s+o,stackWeight:a});return e}(t),n=us(e.filter((t=>t.box.fullSize)),!0),i=us(cs(e,"left"),!0),r=us(cs(e,"right")),s=us(cs(e,"top"),!0),o=us(cs(e,"bottom")),a=hs(e,"x"),l=hs(e,"y");return{fullSize:n,leftAndTop:i.concat(s),rightAndBottom:r.concat(l).concat(o).concat(a),chartArea:cs(e,"chartArea"),vertical:i.concat(r).concat(l),horizontal:s.concat(o).concat(a)}}(t.boxes),l=a.vertical,c=a.horizontal;We(t.boxes,(t=>{"function"==typeof t.beforeLayout&&t.beforeLayout()}));const h=l.reduce(((t,e)=>e.box.options&&!1===e.box.options.display?t:t+1),0)||1,u=Object.freeze({outerWidth:e,outerHeight:n,padding:r,availableWidth:s,availableHeight:o,vBoxMaxWidth:s/2/h,hBoxMaxHeight:o/2}),f=Object.assign({},r);ps(f,Oi(i));const d=Object.assign({maxPadding:f,w:s,h:o,x:r.left,y:r.top},r),p=fs(l.concat(c),u);bs(a.fullSize,d,u,p),bs(l,d,u,p),bs(c,d,u,p)&&bs(l,d,u,p),function(t){const e=t.maxPadding;function n(n){const i=Math.max(e[n]-t[n],0);return t[n]+=i,i}t.y+=n("top"),t.x+=n("left"),n("right"),n("bottom")}(d),ys(a.leftAndTop,d,u,p),d.x+=d.w,d.y+=d.h,ys(a.rightAndBottom,d,u,p),t.chartArea={left:d.left,top:d.top,right:d.left+d.w,bottom:d.top+d.h,height:d.h,width:d.w},We(a.chartArea,(e=>{const n=e.box;Object.assign(n,t.chartArea),n.update(d.w,d.h,{left:0,top:0,right:0,bottom:0})}))}};class vs{acquireContext(t,e){}releaseContext(t){return!1}addEventListener(t,e,n){}removeEventListener(t,e,n){}getDevicePixelRatio(){return 1}getMaximumSize(t,e,n,i){return e=Math.max(0,e||t.width),n=n||t.height,{width:e,height:Math.max(0,i?Math.floor(e/i):n)}}isAttached(t){return!0}updateConfig(t){}}class ws extends vs{acquireContext(t){return t&&t.getContext&&t.getContext("2d")||null}updateConfig(t){t.options.animation=!1}}const ks="$chartjs",Ms={touchstart:"mousedown",touchmove:"mousemove",touchend:"mouseup",pointerenter:"mouseenter",pointerdown:"mousedown",pointermove:"mousemove",pointerup:"mouseup",pointerleave:"mouseout",pointerout:"mouseout"},Ss=t=>null===t||""===t,Os=!!lr&&{passive:!0};function As(t,e,n){t.canvas.removeEventListener(e,n,Os)}function Ps(t,e){for(const n of t)if(n===e||n.contains(e))return!0}function Es(t,e,n){const i=t.canvas,r=new MutationObserver((t=>{let e=!1;for(const n of t)e=e||Ps(n.addedNodes,i),e=e&&!Ps(n.removedNodes,i);e&&n()}));return r.observe(document,{childList:!0,subtree:!0}),r}function Ts(t,e,n){const i=t.canvas,r=new MutationObserver((t=>{let e=!1;for(const n of t)e=e||Ps(n.removedNodes,i),e=e&&!Ps(n.addedNodes,i);e&&n()}));return r.observe(document,{childList:!0,subtree:!0}),r}const Cs=new Map;let Ds=0;function Rs(){const t=window.devicePixelRatio;t!==Ds&&(Ds=t,Cs.forEach(((e,n)=>{n.currentDevicePixelRatio!==t&&e()})))}function Ls(t,e,n){const i=t.canvas,r=i&&Zi(i);if(!r)return;const s=Ln(((t,e)=>{const i=r.clientWidth;n(t,e),i<r.clientWidth&&n()}),window),o=new ResizeObserver((t=>{const e=t[0],n=e.contentRect.width,i=e.contentRect.height;0===n&&0===i||s(n,i)}));return o.observe(r),function(t,e){Cs.size||window.addEventListener("resize",Rs),Cs.set(t,e)}(t,s),o}function Is(t,e,n){n&&n.disconnect(),"resize"===e&&function(t){Cs.delete(t),Cs.size||window.removeEventListener("resize",Rs)}(t)}function Fs(t,e,n){const i=t.canvas,r=Ln((e=>{null!==t.ctx&&n(function(t,e){const n=Ms[t.type]||t.type,{x:i,y:r}=rr(t,e);return{type:n,chart:e,native:t,x:void 0!==i?i:null,y:void 0!==r?r:null}}(e,t))}),t);return function(t,e,n){t.addEventListener(e,n,Os)}(i,e,r),r}class zs extends vs{acquireContext(t,e){const n=t&&t.getContext&&t.getContext("2d");return n&&n.canvas===t?(function(t,e){const n=t.style,i=t.getAttribute("height"),r=t.getAttribute("width");if(t[ks]={initial:{height:i,width:r,style:{display:n.display,height:n.height,width:n.width}}},n.display=n.display||"block",n.boxSizing=n.boxSizing||"border-box",Ss(r)){const e=cr(t,"width");void 0!==e&&(t.width=e)}if(Ss(i))if(""===t.style.height)t.height=t.width/(e||2);else{const e=cr(t,"height");void 0!==e&&(t.height=e)}}(t,e),n):null}releaseContext(t){const e=t.canvas;if(!e[ks])return!1;const n=e[ks].initial;["height","width"].forEach((t=>{const i=n[t];Le(i)?e.removeAttribute(t):e.setAttribute(t,i)}));const i=n.style||{};return Object.keys(i).forEach((t=>{e.style[t]=i[t]})),e.width=e.width,delete e[ks],!0}addEventListener(t,e,n){this.removeEventListener(t,e);const i=t.$proxies||(t.$proxies={}),r={attach:Es,detach:Ts,resize:Ls}[e]||Fs;i[e]=r(t,e,n)}removeEventListener(t,e){const n=t.$proxies||(t.$proxies={}),i=n[e];i&&(({attach:Is,detach:Is,resize:Is}[e]||As)(t,e,i),n[e]=void 0)}getDevicePixelRatio(){return window.devicePixelRatio}getMaximumSize(t,e,n,i){return or(t,e,n,i)}isAttached(t){const e=Zi(t);return!(!e||!e.isConnected)}}class js{static defaults={};static defaultRoutes=void 0;active=!1;tooltipPosition(t){const{x:e,y:n}=this.getProps(["x","y"],t);return{x:e,y:n}}hasValue(){return gn(this.x)&&gn(this.y)}getProps(t,e){const n=this.$animations;if(!e||!n)return this;const i={};return t.forEach((t=>{i[t]=n[t]&&n[t].active()?n[t]._to:this[t]})),i}}function Bs(t,e){const n=t.options.ticks,i=function(t){const e=t.options.offset,n=t._tickSize(),i=t._length/n+(e?0:1),r=t._maxLength/n;return Math.floor(Math.min(i,r))}(t),r=Math.min(n.maxTicksLimit||i,i),s=n.major.enabled?function(t){const e=[];let n,i;for(n=0,i=t.length;n<i;n++)t[n].major&&e.push(n);return e}(e):[],o=s.length,a=s[0],l=s[o-1],c=[];if(o>r)return function(t,e,n,i){let r,s=0,o=n[0];for(i=Math.ceil(i),r=0;r<t.length;r++)r===o&&(e.push(t[r]),s++,o=n[s*i])}(e,c,s,o/r),c;const h=function(t,e,n){const i=function(t){const e=t.length;let n,i;if(e<2)return!1;for(i=t[0],n=1;n<e;++n)if(t[n]-t[n-1]!==i)return!1;return i}(t),r=e.length/n;if(!i)return Math.max(r,1);const s=function(t){const e=[],n=Math.sqrt(t);let i;for(i=1;i<n;i++)t%i==0&&(e.push(i),e.push(t/i));return n===(0|n)&&e.push(n),e.sort(((t,e)=>t-e)).pop(),e}(i);for(let o=0,a=s.length-1;o<a;o++){const t=s[o];if(t>r)return t}return Math.max(r,1)}(s,e,r);if(o>0){let t,n;const i=o>1?Math.round((l-a)/(o-1)):null;for(Ns(e,c,h,Le(i)?0:a-i,a),t=0,n=o-1;t<n;t++)Ns(e,c,h,s[t],s[t+1]);return Ns(e,c,h,l,Le(i)?e.length:l+i),c}return Ns(e,c,h),c}function Ns(t,e,n,i,r){const s=Be(i,0),o=Math.min(Be(r,t.length),t.length);let a,l,c,h=0;for(n=Math.ceil(n),r&&(a=r-i,n=a/Math.floor(a/n)),c=s;c<0;)h++,c=Math.round(s+h*n);for(l=Math.max(s,0);l<o;l++)l===c&&(e.push(t[l]),h++,c=Math.round(s+h*n))}const Vs=(t,e,n)=>"top"===e||"left"===e?t[e]+n:t[e]-n,Ws=(t,e)=>Math.min(e||t,t);function Hs(t,e){const n=[],i=t.length/e,r=t.length;let s=0;for(;s<r;s+=i)n.push(t[Math.floor(s)]);return n}function Us(t,e,n){const i=t.ticks.length,r=Math.min(e,i-1),s=t._startPixel,o=t._endPixel,a=1e-6;let l,c=t.getPixelForTick(r);if(!(n&&(l=1===i?Math.max(c-s,o-c):0===e?(t.getPixelForTick(1)-c)/2:(c-t.getPixelForTick(r-1))/2,c+=r<e?l:-l,c<s-a||c>o+a)))return c}function $s(t){return t.drawTicks?t.tickLength:0}function Ys(t,e){if(!t.display)return 0;const n=Ai(t.font,e),i=Oi(t.padding);return(Ie(t.text)?t.text.length:1)*n.lineHeight+i.height}function qs(t,e,n){let i=In(t);return(n&&"right"!==e||!n&&"right"===e)&&(i=(t=>"left"===t?"right":"right"===t?"left":t)(i)),i}class Xs extends js{constructor(t){super(),this.id=t.id,this.type=t.type,this.options=void 0,this.ctx=t.ctx,this.chart=t.chart,this.top=void 0,this.bottom=void 0,this.left=void 0,this.right=void 0,this.width=void 0,this.height=void 0,this._margins={left:0,right:0,top:0,bottom:0},this.maxWidth=void 0,this.maxHeight=void 0,this.paddingTop=void 0,this.paddingBottom=void 0,this.paddingLeft=void 0,this.paddingRight=void 0,this.axis=void 0,this.labelRotation=void 0,this.min=void 0,this.max=void 0,this._range=void 0,this.ticks=[],this._gridLineItems=null,this._labelItems=null,this._labelSizes=null,this._length=0,this._maxLength=0,this._longestTextCache={},this._startPixel=void 0,this._endPixel=void 0,this._reversePixels=!1,this._userMax=void 0,this._userMin=void 0,this._suggestedMax=void 0,this._suggestedMin=void 0,this._ticksLength=0,this._borderValue=0,this._cache={},this._dataLimitsCached=!1,this.$context=void 0}init(t){this.options=t.setContext(this.getContext()),this.axis=t.axis,this._userMin=this.parse(t.min),this._userMax=this.parse(t.max),this._suggestedMin=this.parse(t.suggestedMin),this._suggestedMax=this.parse(t.suggestedMax)}parse(t,e){return t}getUserBounds(){let{_userMin:t,_userMax:e,_suggestedMin:n,_suggestedMax:i}=this;return t=je(t,Number.POSITIVE_INFINITY),e=je(e,Number.NEGATIVE_INFINITY),n=je(n,Number.POSITIVE_INFINITY),i=je(i,Number.NEGATIVE_INFINITY),{min:je(t,n),max:je(e,i),minDefined:ze(t),maxDefined:ze(e)}}getMinMax(t){let e,{min:n,max:i,minDefined:r,maxDefined:s}=this.getUserBounds();if(r&&s)return{min:n,max:i};const o=this.getMatchingVisibleMetas();for(let a=0,l=o.length;a<l;++a)e=o[a].controller.getMinMax(this,t),r||(n=Math.min(n,e.min)),s||(i=Math.max(i,e.max));return n=s&&n>i?i:n,i=r&&n>i?n:i,{min:je(n,je(i,n)),max:je(i,je(n,i))}}getPadding(){return{left:this.paddingLeft||0,top:this.paddingTop||0,right:this.paddingRight||0,bottom:this.paddingBottom||0}}getTicks(){return this.ticks}getLabels(){const t=this.chart.data;return this.options.labels||(this.isHorizontal()?t.xLabels:t.yLabels)||t.labels||[]}getLabelItems(t=this.chart.chartArea){return this._labelItems||(this._labelItems=this._computeLabelItems(t))}beforeLayout(){this._cache={},this._dataLimitsCached=!1}beforeUpdate(){Ve(this.options.beforeUpdate,[this])}update(t,e,n){const{beginAtZero:i,grace:r,ticks:s}=this.options,o=s.sampleSize;this.beforeUpdate(),this.maxWidth=t,this.maxHeight=e,this._margins=n=Object.assign({left:0,right:0,top:0,bottom:0},n),this.ticks=null,this._labelSizes=null,this._gridLineItems=null,this._labelItems=null,this.beforeSetDimensions(),this.setDimensions(),this.afterSetDimensions(),this._maxLength=this.isHorizontal()?this.width+n.left+n.right:this.height+n.top+n.bottom,this._dataLimitsCached||(this.beforeDataLimits(),this.determineDataLimits(),this.afterDataLimits(),this._range=function(t,e,n){const{min:i,max:r}=t,s=Ne(e,(r-i)/2),o=(t,e)=>n&&0===t?0:t+e;return{min:o(i,-Math.abs(s)),max:o(r,s)}}(this,r,i),this._dataLimitsCached=!0),this.beforeBuildTicks(),this.ticks=this.buildTicks()||[],this.afterBuildTicks();const a=o<this.ticks.length;this._convertTicksToLabels(a?Hs(this.ticks,o):this.ticks),this.configure(),this.beforeCalculateLabelRotation(),this.calculateLabelRotation(),this.afterCalculateLabelRotation(),s.display&&(s.autoSkip||"auto"===s.source)&&(this.ticks=Bs(this,this.ticks),this._labelSizes=null,this.afterAutoSkip()),a&&this._convertTicksToLabels(this.ticks),this.beforeFit(),this.fit(),this.afterFit(),this.afterUpdate()}configure(){let t,e,n=this.options.reverse;this.isHorizontal()?(t=this.left,e=this.right):(t=this.top,e=this.bottom,n=!n),this._startPixel=t,this._endPixel=e,this._reversePixels=n,this._length=e-t,this._alignToPixels=this.options.alignToPixels}afterUpdate(){Ve(this.options.afterUpdate,[this])}beforeSetDimensions(){Ve(this.options.beforeSetDimensions,[this])}setDimensions(){this.isHorizontal()?(this.width=this.maxWidth,this.left=0,this.right=this.width):(this.height=this.maxHeight,this.top=0,this.bottom=this.height),this.paddingLeft=0,this.paddingTop=0,this.paddingRight=0,this.paddingBottom=0}afterSetDimensions(){Ve(this.options.afterSetDimensions,[this])}_callHooks(t){this.chart.notifyPlugins(t,this.getContext()),Ve(this.options[t],[this])}beforeDataLimits(){this._callHooks("beforeDataLimits")}determineDataLimits(){}afterDataLimits(){this._callHooks("afterDataLimits")}beforeBuildTicks(){this._callHooks("beforeBuildTicks")}buildTicks(){return[]}afterBuildTicks(){this._callHooks("afterBuildTicks")}beforeTickToLabelConversion(){Ve(this.options.beforeTickToLabelConversion,[this])}generateTickLabels(t){const e=this.options.ticks;let n,i,r;for(n=0,i=t.length;n<i;n++)r=t[n],r.label=Ve(e.callback,[r.value,n,t],this)}afterTickToLabelConversion(){Ve(this.options.afterTickToLabelConversion,[this])}beforeCalculateLabelRotation(){Ve(this.options.beforeCalculateLabelRotation,[this])}calculateLabelRotation(){const t=this.options,e=t.ticks,n=Ws(this.ticks.length,t.ticks.maxTicksLimit),i=e.minRotation||0,r=e.maxRotation;let s,o,a,l=i;if(!this._isVisible()||!e.display||i>=r||n<=1||!this.isHorizontal())return void(this.labelRotation=i);const c=this._getLabelSizes(),h=c.widest.width,u=c.highest.height,f=Sn(this.chart.width-h,0,this.maxWidth);s=t.offset?this.maxWidth/n:f/(n-1),h+6>s&&(s=f/(n-(t.offset?.5:1)),o=this.maxHeight-$s(t.grid)-e.padding-Ys(t.title,this.chart.options.font),a=Math.sqrt(h*h+u*u),l=_n(Math.min(Math.asin(Sn((c.highest.height+6)/s,-1,1)),Math.asin(Sn(o/a,-1,1))-Math.asin(Sn(u/a,-1,1)))),l=Math.max(i,Math.min(r,l))),this.labelRotation=l}afterCalculateLabelRotation(){Ve(this.options.afterCalculateLabelRotation,[this])}afterAutoSkip(){}beforeFit(){Ve(this.options.beforeFit,[this])}fit(){const t={width:0,height:0},{chart:e,options:{ticks:n,title:i,grid:r}}=this,s=this._isVisible(),o=this.isHorizontal();if(s){const s=Ys(i,e.options.font);if(o?(t.width=this.maxWidth,t.height=$s(r)+s):(t.height=this.maxHeight,t.width=$s(r)+s),n.display&&this.ticks.length){const{first:e,last:i,widest:r,highest:s}=this._getLabelSizes(),a=2*n.padding,l=bn(this.labelRotation),c=Math.cos(l),h=Math.sin(l);if(o){const e=n.mirror?0:h*r.width+c*s.height;t.height=Math.min(this.maxHeight,t.height+e+a)}else{const e=n.mirror?0:c*r.width+h*s.height;t.width=Math.min(this.maxWidth,t.width+e+a)}this._calculatePadding(e,i,h,c)}}this._handleMargins(),o?(this.width=this._length=e.width-this._margins.left-this._margins.right,this.height=t.height):(this.width=t.width,this.height=this._length=e.height-this._margins.top-this._margins.bottom)}_calculatePadding(t,e,n,i){const{ticks:{align:r,padding:s},position:o}=this.options,a=0!==this.labelRotation,l="top"!==o&&"x"===this.axis;if(this.isHorizontal()){const o=this.getPixelForTick(0)-this.left,c=this.right-this.getPixelForTick(this.ticks.length-1);let h=0,u=0;a?l?(h=i*t.width,u=n*e.height):(h=n*t.height,u=i*e.width):"start"===r?u=e.width:"end"===r?h=t.width:"inner"!==r&&(h=t.width/2,u=e.width/2),this.paddingLeft=Math.max((h-o+s)*this.width/(this.width-o),0),this.paddingRight=Math.max((u-c+s)*this.width/(this.width-c),0)}else{let n=e.height/2,i=t.height/2;"start"===r?(n=0,i=t.height):"end"===r&&(n=e.height,i=0),this.paddingTop=n+s,this.paddingBottom=i+s}}_handleMargins(){this._margins&&(this._margins.left=Math.max(this.paddingLeft,this._margins.left),this._margins.top=Math.max(this.paddingTop,this._margins.top),this._margins.right=Math.max(this.paddingRight,this._margins.right),this._margins.bottom=Math.max(this.paddingBottom,this._margins.bottom))}afterFit(){Ve(this.options.afterFit,[this])}isHorizontal(){const{axis:t,position:e}=this.options;return"top"===e||"bottom"===e||"x"===t}isFullSize(){return this.options.fullSize}_convertTicksToLabels(t){let e,n;for(this.beforeTickToLabelConversion(),this.generateTickLabels(t),e=0,n=t.length;e<n;e++)Le(t[e].label)&&(t.splice(e,1),n--,e--);this.afterTickToLabelConversion()}_getLabelSizes(){let t=this._labelSizes;if(!t){const e=this.options.ticks.sampleSize;let n=this.ticks;e<n.length&&(n=Hs(n,e)),this._labelSizes=t=this._computeLabelSizes(n,n.length,this.options.ticks.maxTicksLimit)}return t}_computeLabelSizes(t,e,n){const{ctx:i,_longestTextCache:r}=this,s=[],o=[],a=Math.floor(e/Ws(e,n));let l,c,h,u,f,d,p,g,m,b,_,y=0,x=0;for(l=0;l<e;l+=a){if(u=t[l].label,f=this._resolveTickFontOptions(l),i.font=d=f.string,p=r[d]=r[d]||{data:{},gc:[]},g=f.lineHeight,m=b=0,Le(u)||Ie(u)){if(Ie(u))for(c=0,h=u.length;c<h;++c)_=u[c],Le(_)||Ie(_)||(m=ri(i,p.data,p.gc,m,_),b+=g)}else m=ri(i,p.data,p.gc,m,u),b=g;s.push(m),o.push(b),y=Math.max(m,y),x=Math.max(b,x)}!function(t,e){We(t,(t=>{const n=t.gc,i=n.length/2;let r;if(i>e){for(r=0;r<i;++r)delete t.data[n[r]];n.splice(0,i)}}))}(r,e);const v=s.indexOf(y),w=o.indexOf(x),k=t=>({width:s[t]||0,height:o[t]||0});return{first:k(0),last:k(e-1),widest:k(v),highest:k(w),widths:s,heights:o}}getLabelForValue(t){return t}getPixelForValue(t,e){return NaN}getValueForPixel(t){}getPixelForTick(t){const e=this.ticks;return t<0||t>e.length-1?null:this.getPixelForValue(e[t].value)}getPixelForDecimal(t){this._reversePixels&&(t=1-t);const e=this._startPixel+t*this._length;return Sn(this._alignToPixels?oi(this.chart,e,0):e,-32768,32767)}getDecimalForPixel(t){const e=(t-this._startPixel)/this._length;return this._reversePixels?1-e:e}getBasePixel(){return this.getPixelForValue(this.getBaseValue())}getBaseValue(){const{min:t,max:e}=this;return t<0&&e<0?e:t>0&&e>0?t:0}getContext(t){const e=this.ticks||[];if(t>=0&&t<e.length){const n=e[t];return n.$context||(n.$context=function(t,e,n){return Ei(t,{tick:n,index:e,type:"tick"})}(this.getContext(),t,n))}return this.$context||(this.$context=Ei(this.chart.getContext(),{scale:this,type:"scale"}))}_tickSize(){const t=this.options.ticks,e=bn(this.labelRotation),n=Math.abs(Math.cos(e)),i=Math.abs(Math.sin(e)),r=this._getLabelSizes(),s=t.autoSkipPadding||0,o=r?r.widest.width+s:0,a=r?r.highest.height+s:0;return this.isHorizontal()?a*n>o*i?o/n:a/i:a*i<o*n?a/n:o/i}_isVisible(){const t=this.options.display;return"auto"!==t?!!t:this.getMatchingVisibleMetas().length>0}_computeGridLineItems(t){const e=this.axis,n=this.chart,i=this.options,{grid:r,position:s,border:o}=i,a=r.offset,l=this.isHorizontal(),c=this.ticks.length+(a?1:0),h=$s(r),u=[],f=o.setContext(this.getContext()),d=f.display?f.width:0,p=d/2,g=function(t){return oi(n,t,d)};let m,b,_,y,x,v,w,k,M,S,O,A;if("top"===s)m=g(this.bottom),v=this.bottom-h,k=m-p,S=g(t.top)+p,A=t.bottom;else if("bottom"===s)m=g(this.top),S=t.top,A=g(t.bottom)-p,v=m+p,k=this.top+h;else if("left"===s)m=g(this.right),x=this.right-h,w=m-p,M=g(t.left)+p,O=t.right;else if("right"===s)m=g(this.left),M=t.left,O=g(t.right)-p,x=m+p,w=this.left+h;else if("x"===e){if("center"===s)m=g((t.top+t.bottom)/2+.5);else if(Fe(s)){const t=Object.keys(s)[0],e=s[t];m=g(this.chart.scales[t].getPixelForValue(e))}S=t.top,A=t.bottom,v=m+p,k=v+h}else if("y"===e){if("center"===s)m=g((t.left+t.right)/2);else if(Fe(s)){const t=Object.keys(s)[0],e=s[t];m=g(this.chart.scales[t].getPixelForValue(e))}x=m-p,w=x-h,M=t.left,O=t.right}const P=Be(i.ticks.maxTicksLimit,c),E=Math.max(1,Math.ceil(c/P));for(b=0;b<c;b+=E){const t=this.getContext(b),e=r.setContext(t),i=o.setContext(t),s=e.lineWidth,c=e.color,h=i.dash||[],f=i.dashOffset,d=e.tickWidth,p=e.tickColor,g=e.tickBorderDash||[],m=e.tickBorderDashOffset;_=Us(this,b,a),void 0!==_&&(y=oi(n,_,s),l?x=w=M=O=y:v=k=S=A=y,u.push({tx1:x,ty1:v,tx2:w,ty2:k,x1:M,y1:S,x2:O,y2:A,width:s,color:c,borderDash:h,borderDashOffset:f,tickWidth:d,tickColor:p,tickBorderDash:g,tickBorderDashOffset:m}))}return this._ticksLength=c,this._borderValue=m,u}_computeLabelItems(t){const e=this.axis,n=this.options,{position:i,ticks:r}=n,s=this.isHorizontal(),o=this.ticks,{align:a,crossAlign:l,padding:c,mirror:h}=r,u=$s(n.grid),f=u+c,d=h?-c:f,p=-bn(this.labelRotation),g=[];let m,b,_,y,x,v,w,k,M,S,O,A,P="middle";if("top"===i)v=this.bottom-d,w=this._getXAxisLabelAlignment();else if("bottom"===i)v=this.top+d,w=this._getXAxisLabelAlignment();else if("left"===i){const t=this._getYAxisLabelAlignment(u);w=t.textAlign,x=t.x}else if("right"===i){const t=this._getYAxisLabelAlignment(u);w=t.textAlign,x=t.x}else if("x"===e){if("center"===i)v=(t.top+t.bottom)/2+f;else if(Fe(i)){const t=Object.keys(i)[0],e=i[t];v=this.chart.scales[t].getPixelForValue(e)+f}w=this._getXAxisLabelAlignment()}else if("y"===e){if("center"===i)x=(t.left+t.right)/2-f;else if(Fe(i)){const t=Object.keys(i)[0],e=i[t];x=this.chart.scales[t].getPixelForValue(e)}w=this._getYAxisLabelAlignment(u).textAlign}"y"===e&&("start"===a?P="top":"end"===a&&(P="bottom"));const E=this._getLabelSizes();for(m=0,b=o.length;m<b;++m){_=o[m],y=_.label;const t=r.setContext(this.getContext(m));k=this.getPixelForTick(m)+r.labelOffset,M=this._resolveTickFontOptions(m),S=M.lineHeight,O=Ie(y)?y.length:1;const e=O/2,n=t.color,a=t.textStrokeColor,c=t.textStrokeWidth;let u,f=w;if(s?(x=k,"inner"===w&&(f=m===b-1?this.options.reverse?"left":"right":0===m?this.options.reverse?"right":"left":"center"),A="top"===i?"near"===l||0!==p?-O*S+S/2:"center"===l?-E.highest.height/2-e*S+S:-E.highest.height+S/2:"near"===l||0!==p?S/2:"center"===l?E.highest.height/2-e*S:E.highest.height-O*S,h&&(A*=-1),0===p||t.showLabelBackdrop||(x+=S/2*Math.sin(p))):(v=k,A=(1-O)*S/2),t.showLabelBackdrop){const e=Oi(t.backdropPadding),n=E.heights[m],i=E.widths[m];let r=A-e.top,s=0-e.left;switch(P){case"middle":r-=n/2;break;case"bottom":r-=n}switch(w){case"center":s-=i/2;break;case"right":s-=i}u={left:s,top:r,width:i+e.width,height:n+e.height,color:t.backdropColor}}g.push({label:y,font:M,textOffset:A,options:{rotation:p,color:n,strokeColor:a,strokeWidth:c,textAlign:f,textBaseline:P,translation:[x,v],backdrop:u}})}return g}_getXAxisLabelAlignment(){const{position:t,ticks:e}=this.options;if(-bn(this.labelRotation))return"top"===t?"left":"right";let n="center";return"start"===e.align?n="left":"end"===e.align?n="right":"inner"===e.align&&(n="inner"),n}_getYAxisLabelAlignment(t){const{position:e,ticks:{crossAlign:n,mirror:i,padding:r}}=this.options,s=t+r,o=this._getLabelSizes().widest.width;let a,l;return"left"===e?i?(l=this.right+r,"near"===n?a="left":"center"===n?(a="center",l+=o/2):(a="right",l+=o)):(l=this.right-s,"near"===n?a="right":"center"===n?(a="center",l-=o/2):(a="left",l=this.left)):"right"===e?i?(l=this.left+r,"near"===n?a="right":"center"===n?(a="center",l-=o/2):(a="left",l-=o)):(l=this.left+s,"near"===n?a="left":"center"===n?(a="center",l+=o/2):(a="right",l=this.right)):a="right",{textAlign:a,x:l}}_computeLabelArea(){if(this.options.ticks.mirror)return;const t=this.chart,e=this.options.position;return"left"===e||"right"===e?{top:0,left:this.left,bottom:t.height,right:this.right}:"top"===e||"bottom"===e?{top:this.top,left:0,bottom:this.bottom,right:t.width}:void 0}drawBackground(){const{ctx:t,options:{backgroundColor:e},left:n,top:i,width:r,height:s}=this;e&&(t.save(),t.fillStyle=e,t.fillRect(n,i,r,s),t.restore())}getLineWidthForValue(t){const e=this.options.grid;if(!this._isVisible()||!e.display)return 0;const n=this.ticks.findIndex((e=>e.value===t));return n>=0?e.setContext(this.getContext(n)).lineWidth:0}drawGrid(t){const e=this.options.grid,n=this.ctx,i=this._gridLineItems||(this._gridLineItems=this._computeGridLineItems(t));let r,s;const o=(t,e,i)=>{i.width&&i.color&&(n.save(),n.lineWidth=i.width,n.strokeStyle=i.color,n.setLineDash(i.borderDash||[]),n.lineDashOffset=i.borderDashOffset,n.beginPath(),n.moveTo(t.x,t.y),n.lineTo(e.x,e.y),n.stroke(),n.restore())};if(e.display)for(r=0,s=i.length;r<s;++r){const t=i[r];e.drawOnChartArea&&o({x:t.x1,y:t.y1},{x:t.x2,y:t.y2},t),e.drawTicks&&o({x:t.tx1,y:t.ty1},{x:t.tx2,y:t.ty2},{color:t.tickColor,width:t.tickWidth,borderDash:t.tickBorderDash,borderDashOffset:t.tickBorderDashOffset})}}drawBorder(){const{chart:t,ctx:e,options:{border:n,grid:i}}=this,r=n.setContext(this.getContext()),s=n.display?r.width:0;if(!s)return;const o=i.setContext(this.getContext(0)).lineWidth,a=this._borderValue;let l,c,h,u;this.isHorizontal()?(l=oi(t,this.left,s)-s/2,c=oi(t,this.right,o)+o/2,h=u=a):(h=oi(t,this.top,s)-s/2,u=oi(t,this.bottom,o)+o/2,l=c=a),e.save(),e.lineWidth=r.width,e.strokeStyle=r.color,e.beginPath(),e.moveTo(l,h),e.lineTo(c,u),e.stroke(),e.restore()}drawLabels(t){if(!this.options.ticks.display)return;const e=this.ctx,n=this._computeLabelArea();n&&ui(e,n);const i=this.getLabelItems(t);for(const r of i){const t=r.options,n=r.font;gi(e,r.label,0,r.textOffset,n,t)}n&&fi(e)}drawTitle(){const{ctx:t,options:{position:e,title:n,reverse:i}}=this;if(!n.display)return;const r=Ai(n.font),s=Oi(n.padding),o=n.align;let a=r.lineHeight/2;"bottom"===e||"center"===e||Fe(e)?(a+=s.bottom,Ie(n.text)&&(a+=r.lineHeight*(n.text.length-1))):a+=s.top;const{titleX:l,titleY:c,maxWidth:h,rotation:u}=function(t,e,n,i){const{top:r,left:s,bottom:o,right:a,chart:l}=t,{chartArea:c,scales:h}=l;let u,f,d,p=0;const g=o-r,m=a-s;if(t.isHorizontal()){if(f=Fn(i,s,a),Fe(n)){const t=Object.keys(n)[0],i=n[t];d=h[t].getPixelForValue(i)+g-e}else d="center"===n?(c.bottom+c.top)/2+g-e:Vs(t,n,e);u=a-s}else{if(Fe(n)){const t=Object.keys(n)[0],i=n[t];f=h[t].getPixelForValue(i)-m+e}else f="center"===n?(c.left+c.right)/2-m+e:Vs(t,n,e);d=Fn(i,o,r),p="left"===n?-ln:ln}return{titleX:f,titleY:d,maxWidth:u,rotation:p}}(this,a,e,o);gi(t,n.text,0,0,r,{color:n.color,maxWidth:h,rotation:u,textAlign:qs(o,e,i),textBaseline:"middle",translation:[l,c]})}draw(t){this._isVisible()&&(this.drawBackground(),this.drawGrid(t),this.drawBorder(),this.drawTitle(),this.drawLabels(t))}_layers(){const t=this.options,e=t.ticks&&t.ticks.z||0,n=Be(t.grid&&t.grid.z,-1),i=Be(t.border&&t.border.z,0);return this._isVisible()&&this.draw===Xs.prototype.draw?[{z:n,draw:t=>{this.drawBackground(),this.drawGrid(t),this.drawTitle()}},{z:i,draw:()=>{this.drawBorder()}},{z:e,draw:t=>{this.drawLabels(t)}}]:[{z:e,draw:t=>{this.draw(t)}}]}getMatchingVisibleMetas(t){const e=this.chart.getSortedVisibleDatasetMetas(),n=this.axis+"AxisID",i=[];let r,s;for(r=0,s=e.length;r<s;++r){const s=e[r];s[n]!==this.id||t&&s.type!==t||i.push(s)}return i}_resolveTickFontOptions(t){return Ai(this.options.ticks.setContext(this.getContext(t)).font)}_maxDigits(){const t=this._resolveTickFontOptions(0).lineHeight;return(this.isHorizontal()?this.width:this.height)/t}}class Ks{constructor(t,e,n){this.type=t,this.scope=e,this.override=n,this.items=Object.create(null)}isForType(t){return Object.prototype.isPrototypeOf.call(this.type.prototype,t.prototype)}register(t){const e=Object.getPrototypeOf(t);let n;(function(t){return"id"in t&&"defaults"in t})(e)&&(n=this.register(e));const i=this.items,r=t.id,s=this.scope+"."+r;if(!r)throw new Error("class does not have id: "+t);return r in i||(i[r]=t,function(t,e,n){const i=qe(Object.create(null),[n?ii.get(n):{},ii.get(e),t.defaults]);ii.set(e,i),t.defaultRoutes&&function(t,e){Object.keys(e).forEach((n=>{const i=n.split("."),r=i.pop(),s=[t].concat(i).join("."),o=e[n].split("."),a=o.pop(),l=o.join(".");ii.route(s,r,l,a)}))}(e,t.defaultRoutes),t.descriptors&&ii.describe(e,t.descriptors)}(t,s,n),this.override&&ii.override(t.id,t.overrides)),s}get(t){return this.items[t]}unregister(t){const e=this.items,n=t.id,i=this.scope;n in e&&delete e[n],i&&n in ii[i]&&(delete ii[i][n],this.override&&delete Zn[n])}}class Js{constructor(){this.controllers=new Ks(Nr,"datasets",!0),this.elements=new Ks(js,"elements"),this.plugins=new Ks(Object,"plugins"),this.scales=new Ks(Xs,"scales"),this._typedRegistries=[this.controllers,this.scales,this.elements]}add(...t){this._each("register",t)}remove(...t){this._each("unregister",t)}addControllers(...t){this._each("register",t,this.controllers)}addElements(...t){this._each("register",t,this.elements)}addPlugins(...t){this._each("register",t,this.plugins)}addScales(...t){this._each("register",t,this.scales)}getController(t){return this._get(t,this.controllers,"controller")}getElement(t){return this._get(t,this.elements,"element")}getPlugin(t){return this._get(t,this.plugins,"plugin")}getScale(t){return this._get(t,this.scales,"scale")}removeControllers(...t){this._each("unregister",t,this.controllers)}removeElements(...t){this._each("unregister",t,this.elements)}removePlugins(...t){this._each("unregister",t,this.plugins)}removeScales(...t){this._each("unregister",t,this.scales)}_each(t,e,n){[...e].forEach((e=>{const i=n||this._getRegistryForType(e);n||i.isForType(e)||i===this.plugins&&e.id?this._exec(t,i,e):We(e,(e=>{const i=n||this._getRegistryForType(e);this._exec(t,i,e)}))}))}_exec(t,e,n){const i=Ze(t);Ve(n["before"+i],[],n),e[t](n),Ve(n["after"+i],[],n)}_getRegistryForType(t){for(let e=0;e<this._typedRegistries.length;e++){const n=this._typedRegistries[e];if(n.isForType(t))return n}return this.plugins}_get(t,e,n){const i=e.get(t);if(void 0===i)throw new Error('"'+t+'" is not a registered '+n+".");return i}}var Gs=new Js;class Zs{constructor(){this._init=[]}notify(t,e,n,i){"beforeInit"===e&&(this._init=this._createDescriptors(t,!0),this._notify(this._init,t,"install"));const r=i?this._descriptors(t).filter(i):this._descriptors(t),s=this._notify(r,t,e,n);return"afterDestroy"===e&&(this._notify(r,t,"stop"),this._notify(this._init,t,"uninstall")),s}_notify(t,e,n,i){i=i||{};for(const r of t){const t=r.plugin;if(!1===Ve(t[n],[e,i,r.options],t)&&i.cancelable)return!1}return!0}invalidate(){Le(this._cache)||(this._oldCache=this._cache,this._cache=void 0)}_descriptors(t){if(this._cache)return this._cache;const e=this._cache=this._createDescriptors(t);return this._notifyStateChanges(t),e}_createDescriptors(t,e){const n=t&&t.config,i=Be(n.options&&n.options.plugins,{}),r=function(t){const e={},n=[],i=Object.keys(Gs.plugins.items);for(let s=0;s<i.length;s++)n.push(Gs.getPlugin(i[s]));const r=t.plugins||[];for(let s=0;s<r.length;s++){const t=r[s];-1===n.indexOf(t)&&(n.push(t),e[t.id]=!0)}return{plugins:n,localIds:e}}(n);return!1!==i||e?function(t,{plugins:e,localIds:n},i,r){const s=[],o=t.getContext();for(const a of e){const e=a.id,l=Qs(i[e],r);null!==l&&s.push({plugin:a,options:to(t.config,{plugin:a,local:n[e]},l,o)})}return s}(t,r,i,e):[]}_notifyStateChanges(t){const e=this._oldCache||[],n=this._cache,i=(t,e)=>t.filter((t=>!e.some((e=>t.plugin.id===e.plugin.id))));this._notify(i(e,n),t,"stop"),this._notify(i(n,e),t,"start")}}function Qs(t,e){return e||!1!==t?!0===t?{}:t:null}function to(t,{plugin:e,local:n},i,r){const s=t.pluginScopeKeys(e),o=t.getOptionScopes(i,s);return n&&e.defaults&&o.push(e.defaults),t.createResolver(o,r,[""],{scriptable:!1,indexable:!1,allKeys:!0})}function eo(t,e){const n=ii.datasets[t]||{};return((e.datasets||{})[t]||{}).indexAxis||e.indexAxis||n.indexAxis||"x"}function no(t,e){if("x"===t||"y"===t||"r"===t)return t;var n;if(t=e.axis||("top"===(n=e.position)||"bottom"===n?"x":"left"===n||"right"===n?"y":void 0)||t.length>1&&no(t[0].toLowerCase(),e))return t;throw new Error(`Cannot determine type of '${name}' axis. Please provide 'axis' or 'position' option.`)}function io(t){const e=t.options||(t.options={});e.plugins=Be(e.plugins,{}),e.scales=function(t,e){const n=Zn[t.type]||{scales:{}},i=e.scales||{},r=eo(t.type,e),s=Object.create(null);return Object.keys(i).forEach((t=>{const e=i[t];if(!Fe(e))return console.error(`Invalid scale configuration for scale: ${t}`);if(e._proxy)return console.warn(`Ignoring resolver passed as options for scale: ${t}`);const o=no(t,e),a=function(t,e){return t===e?"_index_":"_value_"}(o,r),l=n.scales||{};s[t]=Xe(Object.create(null),[{axis:o},e,l[o],l[a]])})),t.data.datasets.forEach((n=>{const r=n.type||t.type,o=n.indexAxis||eo(r,e),a=(Zn[r]||{}).scales||{};Object.keys(a).forEach((t=>{const e=function(t,e){let n=t;return"_index_"===t?n=e:"_value_"===t&&(n="x"===e?"y":"x"),n}(t,o),r=n[e+"AxisID"]||e;s[r]=s[r]||Object.create(null),Xe(s[r],[{axis:e},i[r],a[t]])}))})),Object.keys(s).forEach((t=>{const e=s[t];Xe(e,[ii.scales[e.type],ii.scale])})),s}(t,e)}function ro(t){return(t=t||{}).datasets=t.datasets||[],t.labels=t.labels||[],t}const so=new Map,oo=new Set;function ao(t,e){let n=so.get(t);return n||(n=e(),so.set(t,n),oo.add(n)),n}const lo=(t,e,n)=>{const i=Ge(e,n);void 0!==i&&t.add(i)};class co{constructor(t){this._config=function(t){return(t=t||{}).data=ro(t.data),io(t),t}(t),this._scopeCache=new Map,this._resolverCache=new Map}get platform(){return this._config.platform}get type(){return this._config.type}set type(t){this._config.type=t}get data(){return this._config.data}set data(t){this._config.data=ro(t)}get options(){return this._config.options}set options(t){this._config.options=t}get plugins(){return this._config.plugins}update(){const t=this._config;this.clearCache(),io(t)}clearCache(){this._scopeCache.clear(),this._resolverCache.clear()}datasetScopeKeys(t){return ao(t,(()=>[[`datasets.${t}`,""]]))}datasetAnimationScopeKeys(t,e){return ao(`${t}.transition.${e}`,(()=>[[`datasets.${t}.transitions.${e}`,`transitions.${e}`],[`datasets.${t}`,""]]))}datasetElementScopeKeys(t,e){return ao(`${t}-${e}`,(()=>[[`datasets.${t}.elements.${e}`,`datasets.${t}`,`elements.${e}`,""]]))}pluginScopeKeys(t){const e=t.id;return ao(`${this.type}-plugin-${e}`,(()=>[[`plugins.${e}`,...t.additionalOptionScopes||[]]]))}_cachedScopes(t,e){const n=this._scopeCache;let i=n.get(t);return i&&!e||(i=new Map,n.set(t,i)),i}getOptionScopes(t,e,n){const{options:i,type:r}=this,s=this._cachedScopes(t,n),o=s.get(e);if(o)return o;const a=new Set;e.forEach((e=>{t&&(a.add(t),e.forEach((e=>lo(a,t,e)))),e.forEach((t=>lo(a,i,t))),e.forEach((t=>lo(a,Zn[r]||{},t))),e.forEach((t=>lo(a,ii,t))),e.forEach((t=>lo(a,Qn,t)))}));const l=Array.from(a);return 0===l.length&&l.push(Object.create(null)),oo.has(e)&&s.set(e,l),l}chartOptionScopes(){const{options:t,type:e}=this;return[t,Zn[e]||{},ii.datasets[e]||{},{type:e},ii,Qn]}resolveNamedOptions(t,e,n,i=[""]){const r={$shared:!0},{resolver:s,subPrefixes:o}=ho(this._resolverCache,t,i);let a=s;(function(t,e){const{isScriptable:n,isIndexable:i}=Di(t);for(const r of e){const e=n(r),s=i(r),o=(s||e)&&t[r];if(e&&(tn(o)||uo(o))||s&&Ie(o))return!0}return!1})(s,e)&&(r.$shared=!1,a=Ci(s,n=tn(n)?n():n,this.createResolver(t,n,o)));for(const l of e)r[l]=a[l];return r}createResolver(t,e,n=[""],i){const{resolver:r}=ho(this._resolverCache,t,n);return Fe(e)?Ci(r,e,void 0,i):r}}function ho(t,e,n){let i=t.get(e);i||(i=new Map,t.set(e,i));const r=n.join();let s=i.get(r);return s||(s={resolver:Ti(e,n),subPrefixes:n.filter((t=>!t.toLowerCase().includes("hover")))},i.set(r,s)),s}const uo=t=>Fe(t)&&Object.getOwnPropertyNames(t).reduce(((e,n)=>e||tn(t[n])),!1),fo=["top","bottom","left","right","chartArea"];function po(t,e){return"top"===t||"bottom"===t||-1===fo.indexOf(t)&&"x"===e}function go(t,e){return function(n,i){return n[t]===i[t]?n[e]-i[e]:n[t]-i[t]}}function mo(t){const e=t.chart,n=e.options.animation;e.notifyPlugins("afterRender"),Ve(n&&n.onComplete,[t],e)}function bo(t){const e=t.chart,n=e.options.animation;Ve(n&&n.onProgress,[t],e)}function _o(t){return Gi()&&"string"==typeof t?t=document.getElementById(t):t&&t.length&&(t=t[0]),t&&t.canvas&&(t=t.canvas),t}const yo={},xo=t=>{const e=_o(t);return Object.values(yo).filter((t=>t.canvas===e)).pop()};function vo(t,e,n){const i=Object.keys(t);for(const r of i){const i=+r;if(i>=e){const s=t[r];delete t[r],(n>0||i>e)&&(t[i+n]=s)}}}class wo{static defaults=ii;static instances=yo;static overrides=Zn;static registry=Gs;static version="4.2.1";static getChart=xo;static register(...t){Gs.add(...t),ko()}static unregister(...t){Gs.remove(...t),ko()}constructor(t,e){const n=this.config=new co(e),i=_o(t),r=xo(i);if(r)throw new Error("Canvas is already in use. Chart with ID '"+r.id+"' must be destroyed before the canvas with ID '"+r.canvas.id+"' can be reused.");const s=n.createResolver(n.chartOptionScopes(),this.getContext());this.platform=new(n.platform||function(t){return!Gi()||"undefined"!=typeof OffscreenCanvas&&t instanceof OffscreenCanvas?ws:zs}(i)),this.platform.updateConfig(n);const o=this.platform.acquireContext(i,s.aspectRatio),a=o&&o.canvas,l=a&&a.height,c=a&&a.width;this.id=Re(),this.ctx=o,this.canvas=a,this.width=c,this.height=l,this._options=s,this._aspectRatio=this.aspectRatio,this._layers=[],this._metasets=[],this._stacks=void 0,this.boxes=[],this.currentDevicePixelRatio=void 0,this.chartArea=void 0,this._active=[],this._lastEvent=void 0,this._listeners={},this._responsiveListeners=void 0,this._sortedMetasets=[],this.scales={},this._plugins=new Zs,this.$proxies={},this._hiddenIndices={},this.attached=!1,this._animationsDisabled=void 0,this.$context=void 0,this._doResize=function(t,e){let n;return function(...i){return e?(clearTimeout(n),n=setTimeout(t,e,i)):t.apply(this,i),e}}((t=>this.update(t)),s.resizeDelay||0),this._dataChanges=[],yo[this.id]=this,o&&a?(Mr.listen(this,"complete",mo),Mr.listen(this,"progress",bo),this._initialize(),this.attached&&this.update()):console.error("Failed to create chart: can't acquire context from the given item")}get aspectRatio(){const{options:{aspectRatio:t,maintainAspectRatio:e},width:n,height:i,_aspectRatio:r}=this;return Le(t)?e&&r?r:i?n/i:null:t}get data(){return this.config.data}set data(t){this.config.data=t}get options(){return this._options}set options(t){this.config.options=t}get registry(){return Gs}_initialize(){return this.notifyPlugins("beforeInit"),this.options.responsive?this.resize():ar(this,this.options.devicePixelRatio),this.bindEvents(),this.notifyPlugins("afterInit"),this}clear(){return ai(this.canvas,this.ctx),this}stop(){return Mr.stop(this),this}resize(t,e){Mr.running(this)?this._resizeBeforeDraw={width:t,height:e}:this._resize(t,e)}_resize(t,e){const n=this.options,i=this.canvas,r=n.maintainAspectRatio&&this.aspectRatio,s=this.platform.getMaximumSize(i,t,e,r),o=n.devicePixelRatio||this.platform.getDevicePixelRatio(),a=this.width?"resize":"attach";this.width=s.width,this.height=s.height,this._aspectRatio=this.aspectRatio,ar(this,o,!0)&&(this.notifyPlugins("resize",{size:s}),Ve(n.onResize,[this,s],this),this.attached&&this._doResize(a)&&this.render())}ensureScalesHaveIDs(){We(this.options.scales||{},((t,e)=>{t.id=e}))}buildOrUpdateScales(){const t=this.options,e=t.scales,n=this.scales,i=Object.keys(n).reduce(((t,e)=>(t[e]=!1,t)),{});let r=[];e&&(r=r.concat(Object.keys(e).map((t=>{const n=e[t],i=no(t,n),r="r"===i,s="x"===i;return{options:n,dposition:r?"chartArea":s?"bottom":"left",dtype:r?"radialLinear":s?"category":"linear"}})))),We(r,(e=>{const r=e.options,s=r.id,o=no(s,r),a=Be(r.type,e.dtype);void 0!==r.position&&po(r.position,o)===po(e.dposition)||(r.position=e.dposition),i[s]=!0;let l=null;s in n&&n[s].type===a?l=n[s]:(l=new(Gs.getScale(a))({id:s,type:a,ctx:this.ctx,chart:this}),n[l.id]=l),l.init(r,t)})),We(i,((t,e)=>{t||delete n[e]})),We(n,(t=>{xs.configure(this,t,t.options),xs.addBox(this,t)}))}_updateMetasets(){const t=this._metasets,e=this.data.datasets.length,n=t.length;if(t.sort(((t,e)=>t.index-e.index)),n>e){for(let t=e;t<n;++t)this._destroyDatasetMeta(t);t.splice(e,n-e)}this._sortedMetasets=t.slice(0).sort(go("order","index"))}_removeUnreferencedMetasets(){const{_metasets:t,data:{datasets:e}}=this;t.length>e.length&&delete this._stacks,t.forEach(((t,n)=>{0===e.filter((e=>e===t._dataset)).length&&this._destroyDatasetMeta(n)}))}buildOrUpdateControllers(){const t=[],e=this.data.datasets;let n,i;for(this._removeUnreferencedMetasets(),n=0,i=e.length;n<i;n++){const i=e[n];let r=this.getDatasetMeta(n);const s=i.type||this.config.type;if(r.type&&r.type!==s&&(this._destroyDatasetMeta(n),r=this.getDatasetMeta(n)),r.type=s,r.indexAxis=i.indexAxis||eo(s,this.options),r.order=i.order||0,r.index=n,r.label=""+i.label,r.visible=this.isDatasetVisible(n),r.controller)r.controller.updateIndex(n),r.controller.linkScales();else{const e=Gs.getController(s),{datasetElementType:i,dataElementType:o}=ii.datasets[s];Object.assign(e,{dataElementType:Gs.getElement(o),datasetElementType:i&&Gs.getElement(i)}),r.controller=new e(this,n),t.push(r.controller)}}return this._updateMetasets(),t}_resetElements(){We(this.data.datasets,((t,e)=>{this.getDatasetMeta(e).controller.reset()}),this)}reset(){this._resetElements(),this.notifyPlugins("reset")}update(t){const e=this.config;e.update();const n=this._options=e.createResolver(e.chartOptionScopes(),this.getContext()),i=this._animationsDisabled=!n.animation;if(this._updateScales(),this._checkEventBindings(),this._updateHiddenIndices(),this._plugins.invalidate(),!1===this.notifyPlugins("beforeUpdate",{mode:t,cancelable:!0}))return;const r=this.buildOrUpdateControllers();this.notifyPlugins("beforeElementsUpdate");let s=0;for(let l=0,c=this.data.datasets.length;l<c;l++){const{controller:t}=this.getDatasetMeta(l),e=!i&&-1===r.indexOf(t);t.buildOrUpdateElements(e),s=Math.max(+t.getMaxOverflow(),s)}s=this._minPadding=n.layout.autoPadding?s:0,this._updateLayout(s),i||We(r,(t=>{t.reset()})),this._updateDatasets(t),this.notifyPlugins("afterUpdate",{mode:t}),this._layers.sort(go("z","_idx"));const{_active:o,_lastEvent:a}=this;a?this._eventHandler(a,!0):o.length&&this._updateHoverStyles(o,o,!0),this.render()}_updateScales(){We(this.scales,(t=>{xs.removeBox(this,t)})),this.ensureScalesHaveIDs(),this.buildOrUpdateScales()}_checkEventBindings(){const t=this.options,e=new Set(Object.keys(this._listeners)),n=new Set(t.events);en(e,n)&&!!this._responsiveListeners===t.responsive||(this.unbindEvents(),this.bindEvents())}_updateHiddenIndices(){const{_hiddenIndices:t}=this,e=this._getUniformDataChanges()||[];for(const{method:n,start:i,count:r}of e)vo(t,i,"_removeElements"===n?-r:r)}_getUniformDataChanges(){const t=this._dataChanges;if(!t||!t.length)return;this._dataChanges=[];const e=this.data.datasets.length,n=e=>new Set(t.filter((t=>t[0]===e)).map(((t,e)=>e+","+t.splice(1).join(",")))),i=n(0);for(let r=1;r<e;r++)if(!en(i,n(r)))return;return Array.from(i).map((t=>t.split(","))).map((t=>({method:t[1],start:+t[2],count:+t[3]})))}_updateLayout(t){if(!1===this.notifyPlugins("beforeLayout",{cancelable:!0}))return;xs.update(this,this.width,this.height,t);const e=this.chartArea,n=e.width<=0||e.height<=0;this._layers=[],We(this.boxes,(t=>{n&&"chartArea"===t.position||(t.configure&&t.configure(),this._layers.push(...t._layers()))}),this),this._layers.forEach(((t,e)=>{t._idx=e})),this.notifyPlugins("afterLayout")}_updateDatasets(t){if(!1!==this.notifyPlugins("beforeDatasetsUpdate",{mode:t,cancelable:!0})){for(let t=0,e=this.data.datasets.length;t<e;++t)this.getDatasetMeta(t).controller.configure();for(let e=0,n=this.data.datasets.length;e<n;++e)this._updateDataset(e,tn(t)?t({datasetIndex:e}):t);this.notifyPlugins("afterDatasetsUpdate",{mode:t})}}_updateDataset(t,e){const n=this.getDatasetMeta(t),i={meta:n,index:t,mode:e,cancelable:!0};!1!==this.notifyPlugins("beforeDatasetUpdate",i)&&(n.controller._update(e),i.cancelable=!1,this.notifyPlugins("afterDatasetUpdate",i))}render(){!1!==this.notifyPlugins("beforeRender",{cancelable:!0})&&(Mr.has(this)?this.attached&&!Mr.running(this)&&Mr.start(this):(this.draw(),mo({chart:this})))}draw(){let t;if(this._resizeBeforeDraw){const{width:t,height:e}=this._resizeBeforeDraw;this._resize(t,e),this._resizeBeforeDraw=null}if(this.clear(),this.width<=0||this.height<=0)return;if(!1===this.notifyPlugins("beforeDraw",{cancelable:!0}))return;const e=this._layers;for(t=0;t<e.length&&e[t].z<=0;++t)e[t].draw(this.chartArea);for(this._drawDatasets();t<e.length;++t)e[t].draw(this.chartArea);this.notifyPlugins("afterDraw")}_getSortedDatasetMetas(t){const e=this._sortedMetasets,n=[];let i,r;for(i=0,r=e.length;i<r;++i){const r=e[i];t&&!r.visible||n.push(r)}return n}getSortedVisibleDatasetMetas(){return this._getSortedDatasetMetas(!0)}_drawDatasets(){if(!1===this.notifyPlugins("beforeDatasetsDraw",{cancelable:!0}))return;const t=this.getSortedVisibleDatasetMetas();for(let e=t.length-1;e>=0;--e)this._drawDataset(t[e]);this.notifyPlugins("afterDatasetsDraw")}_drawDataset(t){const e=this.ctx,n=t._clip,i=!n.disabled,r=function(t){const{xScale:e,yScale:n}=t;if(e&&n)return{left:e.left,right:e.right,top:n.top,bottom:n.bottom}}(t)||this.chartArea,s={meta:t,index:t.index,cancelable:!0};!1!==this.notifyPlugins("beforeDatasetDraw",s)&&(i&&ui(e,{left:!1===n.left?0:r.left-n.left,right:!1===n.right?this.width:r.right+n.right,top:!1===n.top?0:r.top-n.top,bottom:!1===n.bottom?this.height:r.bottom+n.bottom}),t.controller.draw(),i&&fi(e),s.cancelable=!1,this.notifyPlugins("afterDatasetDraw",s))}isPointInArea(t){return hi(t,this.chartArea,this._minPadding)}getElementsAtEventForMode(t,e,n,i){const r=as.modes[e];return"function"==typeof r?r(this,t,n,i):[]}getDatasetMeta(t){const e=this.data.datasets[t],n=this._metasets;let i=n.filter((t=>t&&t._dataset===e)).pop();return i||(i={type:null,data:[],dataset:null,controller:null,hidden:null,xAxisID:null,yAxisID:null,order:e&&e.order||0,index:t,_dataset:e,_parsed:[],_sorted:!1},n.push(i)),i}getContext(){return this.$context||(this.$context=Ei(null,{chart:this,type:"chart"}))}getVisibleDatasetCount(){return this.getSortedVisibleDatasetMetas().length}isDatasetVisible(t){const e=this.data.datasets[t];if(!e)return!1;const n=this.getDatasetMeta(t);return"boolean"==typeof n.hidden?!n.hidden:!e.hidden}setDatasetVisibility(t,e){this.getDatasetMeta(t).hidden=!e}toggleDataVisibility(t){this._hiddenIndices[t]=!this._hiddenIndices[t]}getDataVisibility(t){return!this._hiddenIndices[t]}_updateVisibility(t,e,n){const i=n?"show":"hide",r=this.getDatasetMeta(t),s=r.controller._resolveAnimations(void 0,i);Qe(e)?(r.data[e].hidden=!n,this.update()):(this.setDatasetVisibility(t,n),s.update(r,{visible:n}),this.update((e=>e.datasetIndex===t?i:void 0)))}hide(t,e){this._updateVisibility(t,e,!1)}show(t,e){this._updateVisibility(t,e,!0)}_destroyDatasetMeta(t){const e=this._metasets[t];e&&e.controller&&e.controller._destroy(),delete this._metasets[t]}_stop(){let t,e;for(this.stop(),Mr.remove(this),t=0,e=this.data.datasets.length;t<e;++t)this._destroyDatasetMeta(t)}destroy(){this.notifyPlugins("beforeDestroy");const{canvas:t,ctx:e}=this;this._stop(),this.config.clearCache(),t&&(this.unbindEvents(),ai(t,e),this.platform.releaseContext(e),this.canvas=null,this.ctx=null),delete yo[this.id],this.notifyPlugins("afterDestroy")}toBase64Image(...t){return this.canvas.toDataURL(...t)}bindEvents(){this.bindUserEvents(),this.options.responsive?this.bindResponsiveEvents():this.attached=!0}bindUserEvents(){const t=this._listeners,e=this.platform,n=(n,i)=>{e.addEventListener(this,n,i),t[n]=i},i=(t,e,n)=>{t.offsetX=e,t.offsetY=n,this._eventHandler(t)};We(this.options.events,(t=>n(t,i)))}bindResponsiveEvents(){this._responsiveListeners||(this._responsiveListeners={});const t=this._responsiveListeners,e=this.platform,n=(n,i)=>{e.addEventListener(this,n,i),t[n]=i},i=(n,i)=>{t[n]&&(e.removeEventListener(this,n,i),delete t[n])},r=(t,e)=>{this.canvas&&this.resize(t,e)};let s;const o=()=>{i("attach",o),this.attached=!0,this.resize(),n("resize",r),n("detach",s)};s=()=>{this.attached=!1,i("resize",r),this._stop(),this._resize(0,0),n("attach",o)},e.isAttached(this.canvas)?o():s()}unbindEvents(){We(this._listeners,((t,e)=>{this.platform.removeEventListener(this,e,t)})),this._listeners={},We(this._responsiveListeners,((t,e)=>{this.platform.removeEventListener(this,e,t)})),this._responsiveListeners=void 0}updateHoverStyle(t,e,n){const i=n?"set":"remove";let r,s,o,a;for("dataset"===e&&(r=this.getDatasetMeta(t[0].datasetIndex),r.controller["_"+i+"DatasetHoverStyle"]()),o=0,a=t.length;o<a;++o){s=t[o];const e=s&&this.getDatasetMeta(s.datasetIndex).controller;e&&e[i+"HoverStyle"](s.element,s.datasetIndex,s.index)}}getActiveElements(){return this._active||[]}setActiveElements(t){const e=this._active||[],n=t.map((({datasetIndex:t,index:e})=>{const n=this.getDatasetMeta(t);if(!n)throw new Error("No dataset found at index "+t);return{datasetIndex:t,element:n.data[e],index:e}}));!He(n,e)&&(this._active=n,this._lastEvent=null,this._updateHoverStyles(n,e))}notifyPlugins(t,e,n){return this._plugins.notify(this,t,e,n)}isPluginEnabled(t){return 1===this._plugins._cache.filter((e=>e.plugin.id===t)).length}_updateHoverStyles(t,e,n){const i=this.options.hover,r=(t,e)=>t.filter((t=>!e.some((e=>t.datasetIndex===e.datasetIndex&&t.index===e.index)))),s=r(e,t),o=n?t:r(t,e);s.length&&this.updateHoverStyle(s,i.mode,!1),o.length&&i.mode&&this.updateHoverStyle(o,i.mode,!0)}_eventHandler(t,e){const n={event:t,replay:e,cancelable:!0,inChartArea:this.isPointInArea(t)},i=e=>(e.options.events||this.options.events).includes(t.native.type);if(!1===this.notifyPlugins("beforeEvent",n,i))return;const r=this._handleEvent(t,e,n.inChartArea);return n.cancelable=!1,this.notifyPlugins("afterEvent",n,i),(r||n.changed)&&this.render(),this}_handleEvent(t,e,n){const{_active:i=[],options:r}=this,s=e,o=this._getActiveElements(t,i,n,s),a=function(t){return"mouseup"===t.type||"click"===t.type||"contextmenu"===t.type}(t),l=function(t,e,n,i){return n&&"mouseout"!==t.type?i?e:t:null}(t,this._lastEvent,n,a);n&&(this._lastEvent=null,Ve(r.onHover,[t,o,this],this),a&&Ve(r.onClick,[t,o,this],this));const c=!He(o,i);return(c||e)&&(this._active=o,this._updateHoverStyles(o,i,e)),this._lastEvent=l,c}_getActiveElements(t,e,n,i){if("mouseout"===t.type)return[];if(!n)return e;const r=this.options.hover;return this.getElementsAtEventForMode(t,r.mode,r,i)}}function ko(){return We(wo.instances,(t=>t._plugins.invalidate()))}function Mo(t,e,n,i){const r=ki(t.options.borderRadius,["outerStart","outerEnd","innerStart","innerEnd"]),s=(n-e)/2,o=Math.min(s,i*e/2),a=t=>{const e=(n-Math.min(s,t))*i/2;return Sn(t,0,Math.min(s,e))};return{outerStart:a(r.outerStart),outerEnd:a(r.outerEnd),innerStart:Sn(r.innerStart,0,o),innerEnd:Sn(r.innerEnd,0,o)}}function So(t,e,n,i){return{x:n+t*Math.cos(e),y:i+t*Math.sin(e)}}function Oo(t,e,n,i,r,s){const{x:o,y:a,startAngle:l,pixelMargin:c,innerRadius:h}=e,u=Math.max(e.outerRadius+i+n-c,0),f=h>0?h+i+n+c:0;let d=0;const p=r-l;if(i){const t=((h>0?h-i:0)+(u>0?u-i:0))/2;d=(p-(0!==t?p*t/(t+i):p))/2}const g=(p-Math.max(.001,p*u-n/nn)/u)/2,m=l+g+d,b=r-g-d,{outerStart:_,outerEnd:y,innerStart:x,innerEnd:v}=Mo(e,f,u,b-m),w=u-_,k=u-y,M=m+_/w,S=b-y/k,O=f+x,A=f+v,P=m+x/O,E=b-v/A;if(t.beginPath(),s){const e=(M+S)/2;if(t.arc(o,a,u,M,e),t.arc(o,a,u,e,S),y>0){const e=So(k,S,o,a);t.arc(e.x,e.y,y,S,b+ln)}const n=So(A,b,o,a);if(t.lineTo(n.x,n.y),v>0){const e=So(A,E,o,a);t.arc(e.x,e.y,v,b+ln,E+Math.PI)}const i=(b-v/f+(m+x/f))/2;if(t.arc(o,a,f,b-v/f,i,!0),t.arc(o,a,f,i,m+x/f,!0),x>0){const e=So(O,P,o,a);t.arc(e.x,e.y,x,P+Math.PI,m-ln)}const r=So(w,m,o,a);if(t.lineTo(r.x,r.y),_>0){const e=So(w,M,o,a);t.arc(e.x,e.y,_,m-ln,M)}}else{t.moveTo(o,a);const e=Math.cos(M)*u+o,n=Math.sin(M)*u+a;t.lineTo(e,n);const i=Math.cos(S)*u+o,r=Math.sin(S)*u+a;t.lineTo(i,r)}t.closePath()}function Ao(t,e,n,i,r){const{fullCircles:s,startAngle:o,circumference:a,options:l}=e,{borderWidth:c,borderJoinStyle:h}=l,u="inner"===l.borderAlign;if(!c)return;u?(t.lineWidth=2*c,t.lineJoin=h||"round"):(t.lineWidth=c,t.lineJoin=h||"bevel");let f=e.endAngle;if(s){Oo(t,e,n,i,f,r);for(let e=0;e<s;++e)t.stroke();isNaN(a)||(f=o+(a%rn||rn))}u&&function(t,e,n){const{startAngle:i,pixelMargin:r,x:s,y:o,outerRadius:a,innerRadius:l}=e;let c=r/a;t.beginPath(),t.arc(s,o,a,i-c,n+c),l>r?(c=r/l,t.arc(s,o,l,n+c,i-c,!0)):t.arc(s,o,r,n+ln,i-ln),t.closePath(),t.clip()}(t,e,f),s||(Oo(t,e,n,i,f,r),t.stroke())}function Po(t,e,n=e){t.lineCap=Be(n.borderCapStyle,e.borderCapStyle),t.setLineDash(Be(n.borderDash,e.borderDash)),t.lineDashOffset=Be(n.borderDashOffset,e.borderDashOffset),t.lineJoin=Be(n.borderJoinStyle,e.borderJoinStyle),t.lineWidth=Be(n.borderWidth,e.borderWidth),t.strokeStyle=Be(n.borderColor,e.borderColor)}function Eo(t,e,n){t.lineTo(n.x,n.y)}function To(t,e,n={}){const i=t.length,{start:r=0,end:s=i-1}=n,{start:o,end:a}=e,l=Math.max(r,o),c=Math.min(s,a),h=r<o&&s<o||r>a&&s>a;return{count:i,start:l,loop:e.loop,ilen:c<l&&!h?i+c-l:c-l}}function Co(t,e,n,i){const{points:r,options:s}=e,{count:o,start:a,loop:l,ilen:c}=To(r,n,i),h=function(t){return t.stepped?di:t.tension||"monotone"===t.cubicInterpolationMode?pi:Eo}(s);let u,f,d,{move:p=!0,reverse:g}=i||{};for(u=0;u<=c;++u)f=r[(a+(g?c-u:u))%o],f.skip||(p?(t.moveTo(f.x,f.y),p=!1):h(t,d,f,g,s.stepped),d=f);return l&&(f=r[(a+(g?c:0))%o],h(t,d,f,g,s.stepped)),!!l}function Do(t,e,n,i){const r=e.points,{count:s,start:o,ilen:a}=To(r,n,i),{move:l=!0,reverse:c}=i||{};let h,u,f,d,p,g,m=0,b=0;const _=t=>(o+(c?a-t:t))%s,y=()=>{d!==p&&(t.lineTo(m,p),t.lineTo(m,d),t.lineTo(m,g))};for(l&&(u=r[_(0)],t.moveTo(u.x,u.y)),h=0;h<=a;++h){if(u=r[_(h)],u.skip)continue;const e=u.x,n=u.y,i=0|e;i===f?(n<d?d=n:n>p&&(p=n),m=(b*m+e)/++b):(y(),t.lineTo(e,n),f=i,b=0,d=p=n),g=n}y()}function Ro(t){const e=t.options,n=e.borderDash&&e.borderDash.length;return t._decimated||t._loop||e.tension||"monotone"===e.cubicInterpolationMode||e.stepped||n?Co:Do}t("C",wo);const Lo="function"==typeof Path2D;function Io(t,e,n,i){Lo&&!e.options.segment?function(t,e,n,i){let r=e._path;r||(r=e._path=new Path2D,e.path(r,n,i)&&r.closePath()),Po(t,e.options),t.stroke(r)}(t,e,n,i):function(t,e,n,i){const{segments:r,options:s}=e,o=Ro(e);for(const a of r)Po(t,s,a.style),t.beginPath(),o(t,e,a,{start:n,end:n+i-1})&&t.closePath(),t.stroke()}(t,e,n,i)}class Fo extends js{static id="line";static defaults={borderCapStyle:"butt",borderDash:[],borderDashOffset:0,borderJoinStyle:"miter",borderWidth:3,capBezierPoints:!0,cubicInterpolationMode:"default",fill:!1,spanGaps:!1,stepped:!1,tension:0};static defaultRoutes={backgroundColor:"backgroundColor",borderColor:"borderColor"};static descriptors={_scriptable:!0,_indexable:t=>"borderDash"!==t&&"fill"!==t};constructor(t){super(),this.animated=!0,this.options=void 0,this._chart=void 0,this._loop=void 0,this._fullLoop=void 0,this._path=void 0,this._points=void 0,this._segments=void 0,this._decimated=!1,this._pointsUpdated=!1,this._datasetIndex=void 0,t&&Object.assign(this,t)}updateControlPoints(t,e){const n=this.options;if((n.tension||"monotone"===n.cubicInterpolationMode)&&!n.stepped&&!this._pointsUpdated){const i=n.spanGaps?this._loop:this._fullLoop;Ji(this._points,n,t,i,e),this._pointsUpdated=!0}}set points(t){this._points=t,delete this._segments,delete this._path,this._pointsUpdated=!1}get points(){return this._points}get segments(){return this._segments||(this._segments=function(t,e){const n=t.points,i=t.options.spanGaps,r=n.length;if(!r)return[];const s=!!t._loop,{start:o,end:a}=function(t,e,n,i){let r=0,s=e-1;if(n&&!i)for(;r<e&&!t[r].skip;)r++;for(;r<e&&t[r].skip;)r++;for(r%=e,n&&(s+=r);s>r&&t[s%e].skip;)s--;return s%=e,{start:r,end:s}}(n,r,s,i);return xr(t,!0===i?[{start:o,end:a,loop:s}]:function(t,e,n,i){const r=t.length,s=[];let o,a=e,l=t[e];for(o=e+1;o<=n;++o){const n=t[o%r];n.skip||n.stop?l.skip||(i=!1,s.push({start:e%r,end:(o-1)%r,loop:i}),e=a=n.stop?o:null):(a=o,l.skip&&(e=o)),l=n}return null!==a&&s.push({start:e%r,end:a%r,loop:i}),s}(n,o,a<o?a+r:a,!!t._fullLoop&&0===o&&a===r-1),n,e)}(this,this.options.segment))}first(){const t=this.segments,e=this.points;return t.length&&e[t[0].start]}last(){const t=this.segments,e=this.points,n=t.length;return n&&e[t[n-1].end]}interpolate(t,e){const n=this.options,i=t[e],r=this.points,s=yr(this,{property:e,start:i,end:i});if(!s.length)return;const o=[],a=function(t){return t.stepped?ur:t.tension||"monotone"===t.cubicInterpolationMode?fr:hr}(n);let l,c;for(l=0,c=s.length;l<c;++l){const{start:c,end:h}=s[l],u=r[c],f=r[h];if(u===f){o.push(u);continue}const d=a(u,f,Math.abs((i-u[e])/(f[e]-u[e])),n.stepped);d[e]=t[e],o.push(d)}return 1===o.length?o[0]:o}pathSegment(t,e,n){return Ro(this)(t,this,e,n)}path(t,e,n){const i=this.segments,r=Ro(this);let s=this._loop;e=e||0,n=n||this.points.length-e;for(const o of i)s&=r(t,this,o,{start:e,end:e+n-1});return!!s}draw(t,e,n,i){const r=this.options||{};(this.points||[]).length&&r.borderWidth&&(t.save(),Io(t,this,n,i),t.restore()),this.animated&&(this._pointsUpdated=!1,this._path=void 0)}}function zo(t,e,n,i){const r=t.options,{[n]:s}=t.getProps([n],i);return Math.abs(e-s)<r.radius+r.hitRadius}function jo(t,e){const{x:n,y:i,base:r,width:s,height:o}=t.getProps(["x","y","base","width","height"],e);let a,l,c,h,u;return t.horizontal?(u=o/2,a=Math.min(n,r),l=Math.max(n,r),c=i-u,h=i+u):(u=s/2,a=n-u,l=n+u,c=Math.min(i,r),h=Math.max(i,r)),{left:a,top:c,right:l,bottom:h}}function Bo(t,e,n,i){return t?0:Sn(e,n,i)}function No(t){const e=jo(t),n=e.right-e.left,i=e.bottom-e.top,r=function(t,e,n){const i=t.options.borderWidth,r=t.borderSkipped,s=Mi(i);return{t:Bo(r.top,s.top,0,n),r:Bo(r.right,s.right,0,e),b:Bo(r.bottom,s.bottom,0,n),l:Bo(r.left,s.left,0,e)}}(t,n/2,i/2),s=function(t,e,n){const{enableBorderRadius:i}=t.getProps(["enableBorderRadius"]),r=t.options.borderRadius,s=Si(r),o=Math.min(e,n),a=t.borderSkipped,l=i||Fe(r);return{topLeft:Bo(!l||a.top||a.left,s.topLeft,0,o),topRight:Bo(!l||a.top||a.right,s.topRight,0,o),bottomLeft:Bo(!l||a.bottom||a.left,s.bottomLeft,0,o),bottomRight:Bo(!l||a.bottom||a.right,s.bottomRight,0,o)}}(t,n/2,i/2);return{outer:{x:e.left,y:e.top,w:n,h:i,radius:s},inner:{x:e.left+r.l,y:e.top+r.t,w:n-r.l-r.r,h:i-r.t-r.b,radius:{topLeft:Math.max(0,s.topLeft-Math.max(r.t,r.l)),topRight:Math.max(0,s.topRight-Math.max(r.t,r.r)),bottomLeft:Math.max(0,s.bottomLeft-Math.max(r.b,r.l)),bottomRight:Math.max(0,s.bottomRight-Math.max(r.b,r.r))}}}}function Vo(t,e,n,i){const r=null===e,s=null===n,o=t&&!(r&&s)&&jo(t,i);return o&&(r||On(e,o.left,o.right))&&(s||On(n,o.top,o.bottom))}function Wo(t,e){t.rect(e.x,e.y,e.w,e.h)}function Ho(t,e,n={}){const i=t.x!==n.x?-e:0,r=t.y!==n.y?-e:0,s=(t.x+t.w!==n.x+n.w?e:0)-i,o=(t.y+t.h!==n.y+n.h?e:0)-r;return{x:t.x+i,y:t.y+r,w:t.w+s,h:t.h+o,radius:t.radius}}var Uo=Object.freeze({__proto__:null,ArcElement:class extends js{static id="arc";static defaults={borderAlign:"center",borderColor:"#fff",borderJoinStyle:void 0,borderRadius:0,borderWidth:2,offset:0,spacing:0,angle:void 0,circular:!0};static defaultRoutes={backgroundColor:"backgroundColor"};constructor(t){super(),this.options=void 0,this.circumference=void 0,this.startAngle=void 0,this.endAngle=void 0,this.innerRadius=void 0,this.outerRadius=void 0,this.pixelMargin=0,this.fullCircles=0,t&&Object.assign(this,t)}inRange(t,e,n){const i=this.getProps(["x","y"],n),{angle:r,distance:s}=xn(i,{x:t,y:e}),{startAngle:o,endAngle:a,innerRadius:l,outerRadius:c,circumference:h}=this.getProps(["startAngle","endAngle","innerRadius","outerRadius","circumference"],n),u=this.options.spacing/2,f=Be(h,a-o)>=rn||Mn(r,o,a),d=On(s,l+u,c+u);return f&&d}getCenterPoint(t){const{x:e,y:n,startAngle:i,endAngle:r,innerRadius:s,outerRadius:o}=this.getProps(["x","y","startAngle","endAngle","innerRadius","outerRadius"],t),{offset:a,spacing:l}=this.options,c=(i+r)/2,h=(s+o+l+a)/2;return{x:e+Math.cos(c)*h,y:n+Math.sin(c)*h}}tooltipPosition(t){return this.getCenterPoint(t)}draw(t){const{options:e,circumference:n}=this,i=(e.offset||0)/4,r=(e.spacing||0)/2,s=e.circular;if(this.pixelMargin="inner"===e.borderAlign?.33:0,this.fullCircles=n>rn?Math.floor(n/rn):0,0===n||this.innerRadius<0||this.outerRadius<0)return;t.save();const o=(this.startAngle+this.endAngle)/2;t.translate(Math.cos(o)*i,Math.sin(o)*i);const a=i*(1-Math.sin(Math.min(nn,n||0)));t.fillStyle=e.backgroundColor,t.strokeStyle=e.borderColor,function(t,e,n,i,r){const{fullCircles:s,startAngle:o,circumference:a}=e;let l=e.endAngle;if(s){Oo(t,e,n,i,l,r);for(let e=0;e<s;++e)t.fill();isNaN(a)||(l=o+(a%rn||rn))}Oo(t,e,n,i,l,r),t.fill()}(t,this,a,r,s),Ao(t,this,a,r,s),t.restore()}},LineElement:Fo,PointElement:class extends js{static id="point";static defaults={borderWidth:1,hitRadius:1,hoverBorderWidth:1,hoverRadius:4,pointStyle:"circle",radius:3,rotation:0};static defaultRoutes={backgroundColor:"backgroundColor",borderColor:"borderColor"};constructor(t){super(),this.options=void 0,this.parsed=void 0,this.skip=void 0,this.stop=void 0,t&&Object.assign(this,t)}inRange(t,e,n){const i=this.options,{x:r,y:s}=this.getProps(["x","y"],n);return Math.pow(t-r,2)+Math.pow(e-s,2)<Math.pow(i.hitRadius+i.radius,2)}inXRange(t,e){return zo(this,t,"x",e)}inYRange(t,e){return zo(this,t,"y",e)}getCenterPoint(t){const{x:e,y:n}=this.getProps(["x","y"],t);return{x:e,y:n}}size(t){let e=(t=t||this.options||{}).radius||0;return e=Math.max(e,e&&t.hoverRadius||0),2*(e+(e&&t.borderWidth||0))}draw(t,e){const n=this.options;this.skip||n.radius<.1||!hi(this,e,this.size(n)/2)||(t.strokeStyle=n.borderColor,t.lineWidth=n.borderWidth,t.fillStyle=n.backgroundColor,li(t,n,this.x,this.y))}getRange(){const t=this.options||{};return t.radius+t.hitRadius}},BarElement:class extends js{static id="bar";static defaults={borderSkipped:"start",borderWidth:0,borderRadius:0,inflateAmount:"auto",pointStyle:void 0};static defaultRoutes={backgroundColor:"backgroundColor",borderColor:"borderColor"};constructor(t){super(),this.options=void 0,this.horizontal=void 0,this.base=void 0,this.width=void 0,this.height=void 0,this.inflateAmount=void 0,t&&Object.assign(this,t)}draw(t){const{inflateAmount:e,options:{borderColor:n,backgroundColor:i}}=this,{inner:r,outer:s}=No(this),o=(a=s.radius).topLeft||a.topRight||a.bottomLeft||a.bottomRight?_i:Wo;var a;t.save(),s.w===r.w&&s.h===r.h||(t.beginPath(),o(t,Ho(s,e,r)),t.clip(),o(t,Ho(r,-e,s)),t.fillStyle=n,t.fill("evenodd")),t.beginPath(),o(t,Ho(r,e)),t.fillStyle=i,t.fill(),t.restore()}inRange(t,e,n){return Vo(this,t,e,n)}inXRange(t,e){return Vo(this,t,null,e)}inYRange(t,e){return Vo(this,null,t,e)}getCenterPoint(t){const{x:e,y:n,base:i,horizontal:r}=this.getProps(["x","y","base","horizontal"],t);return{x:r?(e+i)/2:e,y:r?n:(n+i)/2}}getRange(t){return"x"===t?this.width/2:this.height/2}}});const $o=["rgb(54, 162, 235)","rgb(255, 99, 132)","rgb(255, 159, 64)","rgb(255, 205, 86)","rgb(75, 192, 192)","rgb(153, 102, 255)","rgb(201, 203, 207)"],Yo=$o.map((t=>t.replace("rgb(","rgba(").replace(")",", 0.5)")));function qo(t){return $o[t%$o.length]}function Xo(t){return Yo[t%Yo.length]}function Ko(t){let e=0;return(n,i)=>{const r=t.getDatasetMeta(i).controller;r instanceof Kr?e=function(t,e){return t.backgroundColor=t.data.map((()=>qo(e++))),e}(n,e):r instanceof Jr?e=function(t,e){return t.backgroundColor=t.data.map((()=>Xo(e++))),e}(n,e):r&&(e=function(t,e){return t.borderColor=qo(e),t.backgroundColor=Xo(e),++e}(n,e))}}function Jo(t){let e;for(e in t)if(t[e].borderColor||t[e].backgroundColor)return!0;return!1}var Go={id:"colors",defaults:{enabled:!0,forceOverride:!1},beforeLayout(t,e,n){if(!n.enabled)return;const{data:{datasets:i},options:r}=t.config,{elements:s}=r;if(!n.forceOverride&&(Jo(i)||(o=r)&&(o.borderColor||o.backgroundColor)||s&&Jo(s)))return;var o;const a=Ko(t);i.forEach(a)}};function Zo(t){if(t._decimated){const e=t._data;delete t._decimated,delete t._data,Object.defineProperty(t,"data",{configurable:!0,enumerable:!0,writable:!0,value:e})}}function Qo(t){t.data.datasets.forEach((t=>{Zo(t)}))}var ta={id:"decimation",defaults:{algorithm:"min-max",enabled:!1},beforeElementsUpdate:(t,e,n)=>{if(!n.enabled)return void Qo(t);const i=t.width;t.data.datasets.forEach(((e,r)=>{const{_data:s,indexAxis:o}=e,a=t.getDatasetMeta(r),l=s||e.data;if("y"===Pi([o,t.options.indexAxis]))return;if(!a.controller.supportsDecimation)return;const c=t.scales[a.xAxisID];if("linear"!==c.type&&"time"!==c.type)return;if(t.options.parsing)return;let h,{start:u,count:f}=function(t,e){const n=e.length;let i,r=0;const{iScale:s}=t,{min:o,max:a,minDefined:l,maxDefined:c}=s.getUserBounds();return l&&(r=Sn(Pn(e,s.axis,o).lo,0,n-1)),i=c?Sn(Pn(e,s.axis,a).hi+1,r,n)-r:n-r,{start:r,count:i}}(a,l);if(f<=(n.threshold||4*i))Zo(e);else{switch(Le(s)&&(e._data=l,delete e.data,Object.defineProperty(e,"data",{configurable:!0,enumerable:!0,get:function(){return this._decimated},set:function(t){this._data=t}})),n.algorithm){case"lttb":h=function(t,e,n,i,r){const s=r.samples||i;if(s>=n)return t.slice(e,e+n);const o=[],a=(n-2)/(s-2);let l=0;const c=e+n-1;let h,u,f,d,p,g=e;for(o[l++]=t[g],h=0;h<s-2;h++){let i,r=0,s=0;const c=Math.floor((h+1)*a)+1+e,m=Math.min(Math.floor((h+2)*a)+1,n)+e,b=m-c;for(i=c;i<m;i++)r+=t[i].x,s+=t[i].y;r/=b,s/=b;const _=Math.floor(h*a)+1+e,y=Math.min(Math.floor((h+1)*a)+1,n)+e,{x:x,y:v}=t[g];for(f=d=-1,i=_;i<y;i++)d=.5*Math.abs((x-r)*(t[i].y-v)-(x-t[i].x)*(s-v)),d>f&&(f=d,u=t[i],p=i);o[l++]=u,g=p}return o[l++]=t[c],o}(l,u,f,i,n);break;case"min-max":h=function(t,e,n,i){let r,s,o,a,l,c,h,u,f,d,p=0,g=0;const m=[],b=e+n-1,_=t[e].x,y=t[b].x-_;for(r=e;r<e+n;++r){s=t[r],o=(s.x-_)/y*i,a=s.y;const e=0|o;if(e===l)a<f?(f=a,c=r):a>d&&(d=a,h=r),p=(g*p+s.x)/++g;else{const n=r-1;if(!Le(c)&&!Le(h)){const e=Math.min(c,h),i=Math.max(c,h);e!==u&&e!==n&&m.push({...t[e],x:p}),i!==u&&i!==n&&m.push({...t[i],x:p})}r>0&&n!==u&&m.push(t[n]),m.push(s),l=e,g=0,f=d=a,c=h=u=r}}return m}(l,u,f,i);break;default:throw new Error(`Unsupported decimation algorithm '${n.algorithm}'`)}e._decimated=h}}))},destroy(t){Qo(t)}};function ea(t,e,n,i){if(i)return;let r=e[t],s=n[t];return"angle"===t&&(r=kn(r),s=kn(s)),{property:t,start:r,end:s}}function na(t,e,n){for(;e>t;e--){const t=n[e];if(!isNaN(t.x)&&!isNaN(t.y))break}return e}function ia(t,e,n,i){return t&&e?i(t[n],e[n]):t?t[n]:e?e[n]:0}function ra(t,e){let n=[],i=!1;return Ie(t)?(i=!0,n=t):n=function(t,e){const{x:n=null,y:i=null}=t||{},r=e.points,s=[];return e.segments.forEach((({start:t,end:e})=>{e=na(t,e,r);const o=r[t],a=r[e];null!==i?(s.push({x:o.x,y:i}),s.push({x:a.x,y:i})):null!==n&&(s.push({x:n,y:o.y}),s.push({x:n,y:a.y}))})),s}(t,e),n.length?new Fo({points:n,options:{tension:0},_loop:i,_fullLoop:i}):null}function sa(t){return t&&!1!==t.fill}function oa(t,e,n){let i=t[e].fill;const r=[e];let s;if(!n)return i;for(;!1!==i&&-1===r.indexOf(i);){if(!ze(i))return i;if(s=t[i],!s)return!1;if(s.visible)return i;r.push(i),i=s.fill}return!1}function aa(t,e,n){const i=function(t){const e=t.options,n=e.fill;let i=Be(n&&n.target,n);return void 0===i&&(i=!!e.backgroundColor),!1!==i&&null!==i&&(!0===i?"origin":i)}(t);if(Fe(i))return!isNaN(i.value)&&i;let r=parseFloat(i);return ze(r)&&Math.floor(r)===r?function(t,e,n,i){return"-"!==t&&"+"!==t||(n=e+n),!(n===e||n<0||n>=i)&&n}(i[0],e,r,n):["origin","start","end","stack","shape"].indexOf(i)>=0&&i}function la(t,e,n){const i=[];for(let r=0;r<n.length;r++){const s=n[r],{first:o,last:a,point:l}=ca(s,e,"x");if(!(!l||o&&a))if(o)i.unshift(l);else if(t.push(l),!a)break}t.push(...i)}function ca(t,e,n){const i=t.interpolate(e,n);if(!i)return{};const r=i[n],s=t.segments,o=t.points;let a=!1,l=!1;for(let c=0;c<s.length;c++){const t=s[c],e=o[t.start][n],i=o[t.end][n];if(On(r,e,i)){a=r===e,l=r===i;break}}return{first:a,last:l,point:i}}class ha{constructor(t){this.x=t.x,this.y=t.y,this.radius=t.radius}pathSegment(t,e,n){const{x:i,y:r,radius:s}=this;return e=e||{start:0,end:rn},t.arc(i,r,s,e.end,e.start,!0),!n.bounds}interpolate(t){const{x:e,y:n,radius:i}=this,r=t.angle;return{x:e+Math.cos(r)*i,y:n+Math.sin(r)*i,angle:r}}}function ua(t){const{chart:e,fill:n,line:i}=t;if(ze(n))return function(t,e){const n=t.getDatasetMeta(e),i=n&&t.isDatasetVisible(e);return i?n.dataset:null}(e,n);if("stack"===n)return function(t){const{scale:e,index:n,line:i}=t,r=[],s=i.segments,o=i.points,a=function(t,e){const n=[],i=t.getMatchingVisibleMetas("line");for(let r=0;r<i.length;r++){const t=i[r];if(t.index===e)break;t.hidden||n.unshift(t.dataset)}return n}(e,n);a.push(ra({x:null,y:e.bottom},i));for(let l=0;l<s.length;l++){const t=s[l];for(let e=t.start;e<=t.end;e++)la(r,o[e],a)}return new Fo({points:r,options:{}})}(t);if("shape"===n)return!0;const r=function(t){const e=t.scale||{};return e.getPointPositionForValue?function(t){const{scale:e,fill:n}=t,i=e.options,r=e.getLabels().length,s=i.reverse?e.max:e.min,o=function(t,e,n){let i;return i="start"===t?n:"end"===t?e.options.reverse?e.min:e.max:Fe(t)?t.value:e.getBaseValue(),i}(n,e,s),a=[];if(i.grid.circular){const t=e.getPointPositionForValue(0,s);return new ha({x:t.x,y:t.y,radius:e.getDistanceFromCenterForValue(o)})}for(let l=0;l<r;++l)a.push(e.getPointPositionForValue(l,o));return a}(t):function(t){const{scale:e={},fill:n}=t,i=function(t,e){let n=null;return"start"===t?n=e.bottom:"end"===t?n=e.top:Fe(t)?n=e.getPixelForValue(t.value):e.getBasePixel&&(n=e.getBasePixel()),n}(n,e);if(ze(i)){const t=e.isHorizontal();return{x:t?i:null,y:t?null:i}}return null}(t)}(t);return r instanceof ha?r:ra(r,i)}function fa(t,e,n){const i=ua(e),{line:r,scale:s,axis:o}=e,a=r.options,l=a.fill,c=a.backgroundColor,{above:h=c,below:u=c}=l||{};i&&r.points.length&&(ui(t,n),function(t,e){const{line:n,target:i,above:r,below:s,area:o,scale:a}=e,l=n._loop?"angle":e.axis;t.save(),"x"===l&&s!==r&&(da(t,i,o.top),pa(t,{line:n,target:i,color:r,scale:a,property:l}),t.restore(),t.save(),da(t,i,o.bottom)),pa(t,{line:n,target:i,color:s,scale:a,property:l}),t.restore()}(t,{line:r,target:i,above:h,below:u,area:n,scale:s,axis:o}),fi(t))}function da(t,e,n){const{segments:i,points:r}=e;let s=!0,o=!1;t.beginPath();for(const a of i){const{start:i,end:l}=a,c=r[i],h=r[na(i,l,r)];s?(t.moveTo(c.x,c.y),s=!1):(t.lineTo(c.x,n),t.lineTo(c.x,c.y)),o=!!e.pathSegment(t,a,{move:o}),o?t.closePath():t.lineTo(h.x,n)}t.lineTo(e.first().x,n),t.closePath(),t.clip()}function pa(t,e){const{line:n,target:i,property:r,color:s,scale:o}=e,a=function(t,e,n){const i=t.segments,r=t.points,s=e.points,o=[];for(const a of i){let{start:t,end:i}=a;i=na(t,i,r);const l=ea(n,r[t],r[i],a.loop);if(!e.segments){o.push({source:a,target:l,start:r[t],end:r[i]});continue}const c=yr(e,l);for(const e of c){const t=ea(n,s[e.start],s[e.end],e.loop),i=_r(a,r,t);for(const r of i)o.push({source:r,target:e,start:{[n]:ia(l,t,"start",Math.max)},end:{[n]:ia(l,t,"end",Math.min)}})}}return o}(n,i,r);for(const{source:l,target:c,start:h,end:u}of a){const{style:{backgroundColor:e=s}={}}=l,a=!0!==i;t.save(),t.fillStyle=e,ga(t,o,a&&ea(r,h,u)),t.beginPath();const f=!!n.pathSegment(t,l);let d;if(a){f?t.closePath():ma(t,i,u,r);const e=!!i.pathSegment(t,c,{move:f,reverse:!0});d=f&&e,d||ma(t,i,h,r)}t.closePath(),t.fill(d?"evenodd":"nonzero"),t.restore()}}function ga(t,e,n){const{top:i,bottom:r}=e.chart.chartArea,{property:s,start:o,end:a}=n||{};"x"===s&&(t.beginPath(),t.rect(o,i,a-o,r-i),t.clip())}function ma(t,e,n,i){const r=e.interpolate(n,i);r&&t.lineTo(r.x,r.y)}var ba={id:"filler",afterDatasetsUpdate(t,e,n){const i=(t.data.datasets||[]).length,r=[];let s,o,a,l;for(o=0;o<i;++o)s=t.getDatasetMeta(o),a=s.dataset,l=null,a&&a.options&&a instanceof Fo&&(l={visible:t.isDatasetVisible(o),index:o,fill:aa(a,o,i),chart:t,axis:s.controller.options.indexAxis,scale:s.vScale,line:a}),s.$filler=l,r.push(l);for(o=0;o<i;++o)l=r[o],l&&!1!==l.fill&&(l.fill=oa(r,o,n.propagate))},beforeDraw(t,e,n){const i="beforeDraw"===n.drawTime,r=t.getSortedVisibleDatasetMetas(),s=t.chartArea;for(let o=r.length-1;o>=0;--o){const e=r[o].$filler;e&&(e.line.updateControlPoints(s,e.axis),i&&e.fill&&fa(t.ctx,e,s))}},beforeDatasetsDraw(t,e,n){if("beforeDatasetsDraw"!==n.drawTime)return;const i=t.getSortedVisibleDatasetMetas();for(let r=i.length-1;r>=0;--r){const e=i[r].$filler;sa(e)&&fa(t.ctx,e,t.chartArea)}},beforeDatasetDraw(t,e,n){const i=e.meta.$filler;sa(i)&&"beforeDatasetDraw"===n.drawTime&&fa(t.ctx,i,t.chartArea)},defaults:{propagate:!0,drawTime:"beforeDatasetDraw"}};const _a=(t,e)=>{let{boxHeight:n=e,boxWidth:i=e}=t;return t.usePointStyle&&(n=Math.min(n,e),i=t.pointStyleWidth||Math.min(i,e)),{boxWidth:i,boxHeight:n,itemHeight:Math.max(e,n)}};class ya extends js{constructor(t){super(),this._added=!1,this.legendHitBoxes=[],this._hoveredItem=null,this.doughnutMode=!1,this.chart=t.chart,this.options=t.options,this.ctx=t.ctx,this.legendItems=void 0,this.columnSizes=void 0,this.lineWidths=void 0,this.maxHeight=void 0,this.maxWidth=void 0,this.top=void 0,this.bottom=void 0,this.left=void 0,this.right=void 0,this.height=void 0,this.width=void 0,this._margins=void 0,this.position=void 0,this.weight=void 0,this.fullSize=void 0}update(t,e,n){this.maxWidth=t,this.maxHeight=e,this._margins=n,this.setDimensions(),this.buildLabels(),this.fit()}setDimensions(){this.isHorizontal()?(this.width=this.maxWidth,this.left=this._margins.left,this.right=this.width):(this.height=this.maxHeight,this.top=this._margins.top,this.bottom=this.height)}buildLabels(){const t=this.options.labels||{};let e=Ve(t.generateLabels,[this.chart],this)||[];t.filter&&(e=e.filter((e=>t.filter(e,this.chart.data)))),t.sort&&(e=e.sort(((e,n)=>t.sort(e,n,this.chart.data)))),this.options.reverse&&e.reverse(),this.legendItems=e}fit(){const{options:t,ctx:e}=this;if(!t.display)return void(this.width=this.height=0);const n=t.labels,i=Ai(n.font),r=i.size,s=this._computeTitleHeight(),{boxWidth:o,itemHeight:a}=_a(n,r);let l,c;e.font=i.string,this.isHorizontal()?(l=this.maxWidth,c=this._fitRows(s,r,o,a)+10):(c=this.maxHeight,l=this._fitCols(s,i,o,a)+10),this.width=Math.min(l,t.maxWidth||this.maxWidth),this.height=Math.min(c,t.maxHeight||this.maxHeight)}_fitRows(t,e,n,i){const{ctx:r,maxWidth:s,options:{labels:{padding:o}}}=this,a=this.legendHitBoxes=[],l=this.lineWidths=[0],c=i+o;let h=t;r.textAlign="left",r.textBaseline="middle";let u=-1,f=-c;return this.legendItems.forEach(((t,d)=>{const p=n+e/2+r.measureText(t.text).width;(0===d||l[l.length-1]+p+2*o>s)&&(h+=c,l[l.length-(d>0?0:1)]=0,f+=c,u++),a[d]={left:0,top:f,row:u,width:p,height:i},l[l.length-1]+=p+o})),h}_fitCols(t,e,n,i){const{ctx:r,maxHeight:s,options:{labels:{padding:o}}}=this,a=this.legendHitBoxes=[],l=this.columnSizes=[],c=s-t;let h=o,u=0,f=0,d=0,p=0;return this.legendItems.forEach(((t,s)=>{const{itemWidth:g,itemHeight:m}=function(t,e,n,i,r){const s=function(t,e,n,i){let r=t.text;return r&&"string"!=typeof r&&(r=r.reduce(((t,e)=>t.length>e.length?t:e))),e+n.size/2+i.measureText(r).width}(i,t,e,n),o=function(t,e,n){let i=t;return"string"!=typeof e.text&&(i=xa(e,n)),i}(r,i,e.lineHeight);return{itemWidth:s,itemHeight:o}}(n,e,r,t,i);s>0&&f+m+2*o>c&&(h+=u+o,l.push({width:u,height:f}),d+=u+o,p++,u=f=0),a[s]={left:d,top:f,col:p,width:g,height:m},u=Math.max(u,g),f+=m+o})),h+=u,l.push({width:u,height:f}),h}adjustHitBoxes(){if(!this.options.display)return;const t=this._computeTitleHeight(),{legendHitBoxes:e,options:{align:n,labels:{padding:i},rtl:r}}=this,s=dr(r,this.left,this.width);if(this.isHorizontal()){let r=0,o=Fn(n,this.left+i,this.right-this.lineWidths[r]);for(const a of e)r!==a.row&&(r=a.row,o=Fn(n,this.left+i,this.right-this.lineWidths[r])),a.top+=this.top+t+i,a.left=s.leftForLtr(s.x(o),a.width),o+=a.width+i}else{let r=0,o=Fn(n,this.top+t+i,this.bottom-this.columnSizes[r].height);for(const a of e)a.col!==r&&(r=a.col,o=Fn(n,this.top+t+i,this.bottom-this.columnSizes[r].height)),a.top=o,a.left+=this.left+i,a.left=s.leftForLtr(s.x(a.left),a.width),o+=a.height+i}}isHorizontal(){return"top"===this.options.position||"bottom"===this.options.position}draw(){if(this.options.display){const t=this.ctx;ui(t,this),this._draw(),fi(t)}}_draw(){const{options:t,columnSizes:e,lineWidths:n,ctx:i}=this,{align:r,labels:s}=t,o=ii.color,a=dr(t.rtl,this.left,this.width),l=Ai(s.font),{padding:c}=s,h=l.size,u=h/2;let f;this.drawTitle(),i.textAlign=a.textAlign("left"),i.textBaseline="middle",i.lineWidth=.5,i.font=l.string;const{boxWidth:d,boxHeight:p,itemHeight:g}=_a(s,h),m=this.isHorizontal(),b=this._computeTitleHeight();f=m?{x:Fn(r,this.left+c,this.right-n[0]),y:this.top+c+b,line:0}:{x:this.left+c,y:Fn(r,this.top+b+c,this.bottom-e[0].height),line:0},pr(this.ctx,t.textDirection);const _=g+c;this.legendItems.forEach(((y,x)=>{i.strokeStyle=y.fontColor,i.fillStyle=y.fontColor;const v=i.measureText(y.text).width,w=a.textAlign(y.textAlign||(y.textAlign=s.textAlign)),k=d+u+v;let M=f.x,S=f.y;if(a.setWidth(this.width),m?x>0&&M+k+c>this.right&&(S=f.y+=_,f.line++,M=f.x=Fn(r,this.left+c,this.right-n[f.line])):x>0&&S+_>this.bottom&&(M=f.x=M+e[f.line].width+c,f.line++,S=f.y=Fn(r,this.top+b+c,this.bottom-e[f.line].height)),function(t,e,n){if(isNaN(d)||d<=0||isNaN(p)||p<0)return;i.save();const r=Be(n.lineWidth,1);if(i.fillStyle=Be(n.fillStyle,o),i.lineCap=Be(n.lineCap,"butt"),i.lineDashOffset=Be(n.lineDashOffset,0),i.lineJoin=Be(n.lineJoin,"miter"),i.lineWidth=r,i.strokeStyle=Be(n.strokeStyle,o),i.setLineDash(Be(n.lineDash,[])),s.usePointStyle){const o={radius:p*Math.SQRT2/2,pointStyle:n.pointStyle,rotation:n.rotation,borderWidth:r},l=a.xPlus(t,d/2);ci(i,o,l,e+u,s.pointStyleWidth&&d)}else{const s=e+Math.max((h-p)/2,0),o=a.leftForLtr(t,d),l=Si(n.borderRadius);i.beginPath(),Object.values(l).some((t=>0!==t))?_i(i,{x:o,y:s,w:d,h:p,radius:l}):i.rect(o,s,d,p),i.fill(),0!==r&&i.stroke()}i.restore()}(a.x(M),S,y),M=((t,e,n,i)=>t===(i?"left":"right")?n:"center"===t?(e+n)/2:e)(w,M+d+u,m?M+k:this.right,t.rtl),function(t,e,n){gi(i,n.text,t,e+g/2,l,{strikethrough:n.hidden,textAlign:a.textAlign(n.textAlign)})}(a.x(M),S,y),m)f.x+=k+c;else if("string"!=typeof y.text){const t=l.lineHeight;f.y+=xa(y,t)}else f.y+=_})),gr(this.ctx,t.textDirection)}drawTitle(){const t=this.options,e=t.title,n=Ai(e.font),i=Oi(e.padding);if(!e.display)return;const r=dr(t.rtl,this.left,this.width),s=this.ctx,o=e.position,a=n.size/2,l=i.top+a;let c,h=this.left,u=this.width;if(this.isHorizontal())u=Math.max(...this.lineWidths),c=this.top+l,h=Fn(t.align,h,this.right-u);else{const e=this.columnSizes.reduce(((t,e)=>Math.max(t,e.height)),0);c=l+Fn(t.align,this.top,this.bottom-e-t.labels.padding-this._computeTitleHeight())}const f=Fn(o,h,h+u);s.textAlign=r.textAlign(In(o)),s.textBaseline="middle",s.strokeStyle=e.color,s.fillStyle=e.color,s.font=n.string,gi(s,e.text,f,c,n)}_computeTitleHeight(){const t=this.options.title,e=Ai(t.font),n=Oi(t.padding);return t.display?e.lineHeight+n.height:0}_getLegendItemAt(t,e){let n,i,r;if(On(t,this.left,this.right)&&On(e,this.top,this.bottom))for(r=this.legendHitBoxes,n=0;n<r.length;++n)if(i=r[n],On(t,i.left,i.left+i.width)&&On(e,i.top,i.top+i.height))return this.legendItems[n];return null}handleEvent(t){const e=this.options;if(!function(t,e){return!("mousemove"!==t&&"mouseout"!==t||!e.onHover&&!e.onLeave)||!(!e.onClick||"click"!==t&&"mouseup"!==t)}(t.type,e))return;const n=this._getLegendItemAt(t.x,t.y);if("mousemove"===t.type||"mouseout"===t.type){const i=this._hoveredItem,r=((t,e)=>null!==t&&null!==e&&t.datasetIndex===e.datasetIndex&&t.index===e.index)(i,n);i&&!r&&Ve(e.onLeave,[t,i,this],this),this._hoveredItem=n,n&&!r&&Ve(e.onHover,[t,n,this],this)}else n&&Ve(e.onClick,[t,n,this],this)}}function xa(t,e){return e*(t.text?t.text.length+.5:0)}var va={id:"legend",_element:ya,start(t,e,n){const i=t.legend=new ya({ctx:t.ctx,options:n,chart:t});xs.configure(t,i,n),xs.addBox(t,i)},stop(t){xs.removeBox(t,t.legend),delete t.legend},beforeUpdate(t,e,n){const i=t.legend;xs.configure(t,i,n),i.options=n},afterUpdate(t){const e=t.legend;e.buildLabels(),e.adjustHitBoxes()},afterEvent(t,e){e.replay||t.legend.handleEvent(e.event)},defaults:{display:!0,position:"top",align:"center",fullSize:!0,reverse:!1,weight:1e3,onClick(t,e,n){const i=e.datasetIndex,r=n.chart;r.isDatasetVisible(i)?(r.hide(i),e.hidden=!0):(r.show(i),e.hidden=!1)},onHover:null,onLeave:null,labels:{color:t=>t.chart.options.color,boxWidth:40,padding:10,generateLabels(t){const e=t.data.datasets,{labels:{usePointStyle:n,pointStyle:i,textAlign:r,color:s,useBorderRadius:o,borderRadius:a}}=t.legend.options;return t._getSortedDatasetMetas().map((t=>{const l=t.controller.getStyle(n?0:void 0),c=Oi(l.borderWidth);return{text:e[t.index].label,fillStyle:l.backgroundColor,fontColor:s,hidden:!t.visible,lineCap:l.borderCapStyle,lineDash:l.borderDash,lineDashOffset:l.borderDashOffset,lineJoin:l.borderJoinStyle,lineWidth:(c.width+c.height)/4,strokeStyle:l.borderColor,pointStyle:i||l.pointStyle,rotation:l.rotation,textAlign:r||l.textAlign,borderRadius:o&&(a||l.borderRadius),datasetIndex:t.index}}),this)}},title:{color:t=>t.chart.options.color,display:!1,position:"center",text:""}},descriptors:{_scriptable:t=>!t.startsWith("on"),labels:{_scriptable:t=>!["generateLabels","filter","sort"].includes(t)}}};class wa extends js{constructor(t){super(),this.chart=t.chart,this.options=t.options,this.ctx=t.ctx,this._padding=void 0,this.top=void 0,this.bottom=void 0,this.left=void 0,this.right=void 0,this.width=void 0,this.height=void 0,this.position=void 0,this.weight=void 0,this.fullSize=void 0}update(t,e){const n=this.options;if(this.left=0,this.top=0,!n.display)return void(this.width=this.height=this.right=this.bottom=0);this.width=this.right=t,this.height=this.bottom=e;const i=Ie(n.text)?n.text.length:1;this._padding=Oi(n.padding);const r=i*Ai(n.font).lineHeight+this._padding.height;this.isHorizontal()?this.height=r:this.width=r}isHorizontal(){const t=this.options.position;return"top"===t||"bottom"===t}_drawArgs(t){const{top:e,left:n,bottom:i,right:r,options:s}=this,o=s.align;let a,l,c,h=0;return this.isHorizontal()?(l=Fn(o,n,r),c=e+t,a=r-n):("left"===s.position?(l=n+t,c=Fn(o,i,e),h=-.5*nn):(l=r-t,c=Fn(o,e,i),h=.5*nn),a=i-e),{titleX:l,titleY:c,maxWidth:a,rotation:h}}draw(){const t=this.ctx,e=this.options;if(!e.display)return;const n=Ai(e.font),i=n.lineHeight/2+this._padding.top,{titleX:r,titleY:s,maxWidth:o,rotation:a}=this._drawArgs(i);gi(t,e.text,0,0,n,{color:e.color,maxWidth:o,rotation:a,textAlign:In(e.align),textBaseline:"middle",translation:[r,s]})}}var ka={id:"title",_element:wa,start(t,e,n){!function(t,e){const n=new wa({ctx:t.ctx,options:e,chart:t});xs.configure(t,n,e),xs.addBox(t,n),t.titleBlock=n}(t,n)},stop(t){const e=t.titleBlock;xs.removeBox(t,e),delete t.titleBlock},beforeUpdate(t,e,n){const i=t.titleBlock;xs.configure(t,i,n),i.options=n},defaults:{align:"center",display:!1,font:{weight:"bold"},fullSize:!0,padding:10,position:"top",text:"",weight:2e3},defaultRoutes:{color:"color"},descriptors:{_scriptable:!0,_indexable:!1}};const Ma=new WeakMap;var Sa={id:"subtitle",start(t,e,n){const i=new wa({ctx:t.ctx,options:n,chart:t});xs.configure(t,i,n),xs.addBox(t,i),Ma.set(t,i)},stop(t){xs.removeBox(t,Ma.get(t)),Ma.delete(t)},beforeUpdate(t,e,n){const i=Ma.get(t);xs.configure(t,i,n),i.options=n},defaults:{align:"center",display:!1,font:{weight:"normal"},fullSize:!0,padding:0,position:"top",text:"",weight:1500},defaultRoutes:{color:"color"},descriptors:{_scriptable:!0,_indexable:!1}};const Oa={average(t){if(!t.length)return!1;let e,n,i=0,r=0,s=0;for(e=0,n=t.length;e<n;++e){const n=t[e].element;if(n&&n.hasValue()){const t=n.tooltipPosition();i+=t.x,r+=t.y,++s}}return{x:i/s,y:r/s}},nearest(t,e){if(!t.length)return!1;let n,i,r,s=e.x,o=e.y,a=Number.POSITIVE_INFINITY;for(n=0,i=t.length;n<i;++n){const i=t[n].element;if(i&&i.hasValue()){const t=vn(e,i.getCenterPoint());t<a&&(a=t,r=i)}}if(r){const t=r.tooltipPosition();s=t.x,o=t.y}return{x:s,y:o}}};function Aa(t,e){return e&&(Ie(e)?Array.prototype.push.apply(t,e):t.push(e)),t}function Pa(t){return("string"==typeof t||t instanceof String)&&t.indexOf("\n")>-1?t.split("\n"):t}function Ea(t,e){const{element:n,datasetIndex:i,index:r}=e,s=t.getDatasetMeta(i).controller,{label:o,value:a}=s.getLabelAndValue(r);return{chart:t,label:o,parsed:s.getParsed(r),raw:t.data.datasets[i].data[r],formattedValue:a,dataset:s.getDataset(),dataIndex:r,datasetIndex:i,element:n}}function Ta(t,e){const n=t.chart.ctx,{body:i,footer:r,title:s}=t,{boxWidth:o,boxHeight:a}=e,l=Ai(e.bodyFont),c=Ai(e.titleFont),h=Ai(e.footerFont),u=s.length,f=r.length,d=i.length,p=Oi(e.padding);let g=p.height,m=0,b=i.reduce(((t,e)=>t+e.before.length+e.lines.length+e.after.length),0);b+=t.beforeBody.length+t.afterBody.length,u&&(g+=u*c.lineHeight+(u-1)*e.titleSpacing+e.titleMarginBottom),b&&(g+=d*(e.displayColors?Math.max(a,l.lineHeight):l.lineHeight)+(b-d)*l.lineHeight+(b-1)*e.bodySpacing),f&&(g+=e.footerMarginTop+f*h.lineHeight+(f-1)*e.footerSpacing);let _=0;const y=function(t){m=Math.max(m,n.measureText(t).width+_)};return n.save(),n.font=c.string,We(t.title,y),n.font=l.string,We(t.beforeBody.concat(t.afterBody),y),_=e.displayColors?o+2+e.boxPadding:0,We(i,(t=>{We(t.before,y),We(t.lines,y),We(t.after,y)})),_=0,n.font=h.string,We(t.footer,y),n.restore(),m+=p.width,{width:m,height:g}}function Ca(t,e,n,i){const{x:r,width:s}=n,{width:o,chartArea:{left:a,right:l}}=t;let c="center";return"center"===i?c=r<=(a+l)/2?"left":"right":r<=s/2?c="left":r>=o-s/2&&(c="right"),function(t,e,n,i){const{x:r,width:s}=i,o=n.caretSize+n.caretPadding;return"left"===t&&r+s+o>e.width||"right"===t&&r-s-o<0||void 0}(c,t,e,n)&&(c="center"),c}function Da(t,e,n){const i=n.yAlign||e.yAlign||function(t,e){const{y:n,height:i}=e;return n<i/2?"top":n>t.height-i/2?"bottom":"center"}(t,n);return{xAlign:n.xAlign||e.xAlign||Ca(t,e,n,i),yAlign:i}}function Ra(t,e,n,i){const{caretSize:r,caretPadding:s,cornerRadius:o}=t,{xAlign:a,yAlign:l}=n,c=r+s,{topLeft:h,topRight:u,bottomLeft:f,bottomRight:d}=Si(o);let p=function(t,e){let{x:n,width:i}=t;return"right"===e?n-=i:"center"===e&&(n-=i/2),n}(e,a);const g=function(t,e,n){let{y:i,height:r}=t;return"top"===e?i+=n:i-="bottom"===e?r+n:r/2,i}(e,l,c);return"center"===l?"left"===a?p+=c:"right"===a&&(p-=c):"left"===a?p-=Math.max(h,f)+r:"right"===a&&(p+=Math.max(u,d)+r),{x:Sn(p,0,i.width-e.width),y:Sn(g,0,i.height-e.height)}}function La(t,e,n){const i=Oi(n.padding);return"center"===e?t.x+t.width/2:"right"===e?t.x+t.width-i.right:t.x+i.left}function Ia(t){return Aa([],Pa(t))}function Fa(t,e){const n=e&&e.dataset&&e.dataset.tooltip&&e.dataset.tooltip.callbacks;return n?t.override(n):t}const za={beforeTitle:De,title(t){if(t.length>0){const e=t[0],n=e.chart.data.labels,i=n?n.length:0;if(this&&this.options&&"dataset"===this.options.mode)return e.dataset.label||"";if(e.label)return e.label;if(i>0&&e.dataIndex<i)return n[e.dataIndex]}return""},afterTitle:De,beforeBody:De,beforeLabel:De,label(t){if(this&&this.options&&"dataset"===this.options.mode)return t.label+": "+t.formattedValue||t.formattedValue;let e=t.dataset.label||"";e&&(e+=": ");const n=t.formattedValue;return Le(n)||(e+=n),e},labelColor(t){const e=t.chart.getDatasetMeta(t.datasetIndex).controller.getStyle(t.dataIndex);return{borderColor:e.borderColor,backgroundColor:e.backgroundColor,borderWidth:e.borderWidth,borderDash:e.borderDash,borderDashOffset:e.borderDashOffset,borderRadius:0}},labelTextColor(){return this.options.bodyColor},labelPointStyle(t){const e=t.chart.getDatasetMeta(t.datasetIndex).controller.getStyle(t.dataIndex);return{pointStyle:e.pointStyle,rotation:e.rotation}},afterLabel:De,afterBody:De,beforeFooter:De,footer:De,afterFooter:De};function ja(t,e,n,i){const r=t[e].call(n,i);return void 0===r?za[e].call(n,i):r}class Ba extends js{static positioners=Oa;constructor(t){super(),this.opacity=0,this._active=[],this._eventPosition=void 0,this._size=void 0,this._cachedAnimations=void 0,this._tooltipItems=[],this.$animations=void 0,this.$context=void 0,this.chart=t.chart,this.options=t.options,this.dataPoints=void 0,this.title=void 0,this.beforeBody=void 0,this.body=void 0,this.afterBody=void 0,this.footer=void 0,this.xAlign=void 0,this.yAlign=void 0,this.x=void 0,this.y=void 0,this.height=void 0,this.width=void 0,this.caretX=void 0,this.caretY=void 0,this.labelColors=void 0,this.labelPointStyles=void 0,this.labelTextColors=void 0}initialize(t){this.options=t,this._cachedAnimations=void 0,this.$context=void 0}_resolveAnimations(){const t=this._cachedAnimations;if(t)return t;const e=this.chart,n=this.options.setContext(this.getContext()),i=n.enabled&&e.options.animation&&n.animations,r=new Pr(this.chart,i);return i._cacheable&&(this._cachedAnimations=Object.freeze(r)),r}getContext(){return this.$context||(this.$context=(t=this.chart.getContext(),e=this,n=this._tooltipItems,Ei(t,{tooltip:e,tooltipItems:n,type:"tooltip"})));var t,e,n}getTitle(t,e){const{callbacks:n}=e,i=ja(n,"beforeTitle",this,t),r=ja(n,"title",this,t),s=ja(n,"afterTitle",this,t);let o=[];return o=Aa(o,Pa(i)),o=Aa(o,Pa(r)),o=Aa(o,Pa(s)),o}getBeforeBody(t,e){return Ia(ja(e.callbacks,"beforeBody",this,t))}getBody(t,e){const{callbacks:n}=e,i=[];return We(t,(t=>{const e={before:[],lines:[],after:[]},r=Fa(n,t);Aa(e.before,Pa(ja(r,"beforeLabel",this,t))),Aa(e.lines,ja(r,"label",this,t)),Aa(e.after,Pa(ja(r,"afterLabel",this,t))),i.push(e)})),i}getAfterBody(t,e){return Ia(ja(e.callbacks,"afterBody",this,t))}getFooter(t,e){const{callbacks:n}=e,i=ja(n,"beforeFooter",this,t),r=ja(n,"footer",this,t),s=ja(n,"afterFooter",this,t);let o=[];return o=Aa(o,Pa(i)),o=Aa(o,Pa(r)),o=Aa(o,Pa(s)),o}_createItems(t){const e=this._active,n=this.chart.data,i=[],r=[],s=[];let o,a,l=[];for(o=0,a=e.length;o<a;++o)l.push(Ea(this.chart,e[o]));return t.filter&&(l=l.filter(((e,i,r)=>t.filter(e,i,r,n)))),t.itemSort&&(l=l.sort(((e,i)=>t.itemSort(e,i,n)))),We(l,(e=>{const n=Fa(t.callbacks,e);i.push(ja(n,"labelColor",this,e)),r.push(ja(n,"labelPointStyle",this,e)),s.push(ja(n,"labelTextColor",this,e))})),this.labelColors=i,this.labelPointStyles=r,this.labelTextColors=s,this.dataPoints=l,l}update(t,e){const n=this.options.setContext(this.getContext()),i=this._active;let r,s=[];if(i.length){const t=Oa[n.position].call(this,i,this._eventPosition);s=this._createItems(n),this.title=this.getTitle(s,n),this.beforeBody=this.getBeforeBody(s,n),this.body=this.getBody(s,n),this.afterBody=this.getAfterBody(s,n),this.footer=this.getFooter(s,n);const e=this._size=Ta(this,n),o=Object.assign({},t,e),a=Da(this.chart,n,o),l=Ra(n,o,a,this.chart);this.xAlign=a.xAlign,this.yAlign=a.yAlign,r={opacity:1,x:l.x,y:l.y,width:e.width,height:e.height,caretX:t.x,caretY:t.y}}else 0!==this.opacity&&(r={opacity:0});this._tooltipItems=s,this.$context=void 0,r&&this._resolveAnimations().update(this,r),t&&n.external&&n.external.call(this,{chart:this.chart,tooltip:this,replay:e})}drawCaret(t,e,n,i){const r=this.getCaretPosition(t,n,i);e.lineTo(r.x1,r.y1),e.lineTo(r.x2,r.y2),e.lineTo(r.x3,r.y3)}getCaretPosition(t,e,n){const{xAlign:i,yAlign:r}=this,{caretSize:s,cornerRadius:o}=n,{topLeft:a,topRight:l,bottomLeft:c,bottomRight:h}=Si(o),{x:u,y:f}=t,{width:d,height:p}=e;let g,m,b,_,y,x;return"center"===r?(y=f+p/2,"left"===i?(g=u,m=g-s,_=y+s,x=y-s):(g=u+d,m=g+s,_=y-s,x=y+s),b=g):(m="left"===i?u+Math.max(a,c)+s:"right"===i?u+d-Math.max(l,h)-s:this.caretX,"top"===r?(_=f,y=_-s,g=m-s,b=m+s):(_=f+p,y=_+s,g=m+s,b=m-s),x=_),{x1:g,x2:m,x3:b,y1:_,y2:y,y3:x}}drawTitle(t,e,n){const i=this.title,r=i.length;let s,o,a;if(r){const l=dr(n.rtl,this.x,this.width);for(t.x=La(this,n.titleAlign,n),e.textAlign=l.textAlign(n.titleAlign),e.textBaseline="middle",s=Ai(n.titleFont),o=n.titleSpacing,e.fillStyle=n.titleColor,e.font=s.string,a=0;a<r;++a)e.fillText(i[a],l.x(t.x),t.y+s.lineHeight/2),t.y+=s.lineHeight+o,a+1===r&&(t.y+=n.titleMarginBottom-o)}}_drawColorBox(t,e,n,i,r){const s=this.labelColors[n],o=this.labelPointStyles[n],{boxHeight:a,boxWidth:l,boxPadding:c}=r,h=Ai(r.bodyFont),u=La(this,"left",r),f=i.x(u),d=a<h.lineHeight?(h.lineHeight-a)/2:0,p=e.y+d;if(r.usePointStyle){const e={radius:Math.min(l,a)/2,pointStyle:o.pointStyle,rotation:o.rotation,borderWidth:1},n=i.leftForLtr(f,l)+l/2,c=p+a/2;t.strokeStyle=r.multiKeyBackground,t.fillStyle=r.multiKeyBackground,li(t,e,n,c),t.strokeStyle=s.borderColor,t.fillStyle=s.backgroundColor,li(t,e,n,c)}else{t.lineWidth=Fe(s.borderWidth)?Math.max(...Object.values(s.borderWidth)):s.borderWidth||1,t.strokeStyle=s.borderColor,t.setLineDash(s.borderDash||[]),t.lineDashOffset=s.borderDashOffset||0;const e=i.leftForLtr(f,l-c),n=i.leftForLtr(i.xPlus(f,1),l-c-2),o=Si(s.borderRadius);Object.values(o).some((t=>0!==t))?(t.beginPath(),t.fillStyle=r.multiKeyBackground,_i(t,{x:e,y:p,w:l,h:a,radius:o}),t.fill(),t.stroke(),t.fillStyle=s.backgroundColor,t.beginPath(),_i(t,{x:n,y:p+1,w:l-2,h:a-2,radius:o}),t.fill()):(t.fillStyle=r.multiKeyBackground,t.fillRect(e,p,l,a),t.strokeRect(e,p,l,a),t.fillStyle=s.backgroundColor,t.fillRect(n,p+1,l-2,a-2))}t.fillStyle=this.labelTextColors[n]}drawBody(t,e,n){const{body:i}=this,{bodySpacing:r,bodyAlign:s,displayColors:o,boxHeight:a,boxWidth:l,boxPadding:c}=n,h=Ai(n.bodyFont);let u=h.lineHeight,f=0;const d=dr(n.rtl,this.x,this.width),p=function(n){e.fillText(n,d.x(t.x+f),t.y+u/2),t.y+=u+r},g=d.textAlign(s);let m,b,_,y,x,v,w;for(e.textAlign=s,e.textBaseline="middle",e.font=h.string,t.x=La(this,g,n),e.fillStyle=n.bodyColor,We(this.beforeBody,p),f=o&&"right"!==g?"center"===s?l/2+c:l+2+c:0,y=0,v=i.length;y<v;++y){for(m=i[y],b=this.labelTextColors[y],e.fillStyle=b,We(m.before,p),_=m.lines,o&&_.length&&(this._drawColorBox(e,t,y,d,n),u=Math.max(h.lineHeight,a)),x=0,w=_.length;x<w;++x)p(_[x]),u=h.lineHeight;We(m.after,p)}f=0,u=h.lineHeight,We(this.afterBody,p),t.y-=r}drawFooter(t,e,n){const i=this.footer,r=i.length;let s,o;if(r){const a=dr(n.rtl,this.x,this.width);for(t.x=La(this,n.footerAlign,n),t.y+=n.footerMarginTop,e.textAlign=a.textAlign(n.footerAlign),e.textBaseline="middle",s=Ai(n.footerFont),e.fillStyle=n.footerColor,e.font=s.string,o=0;o<r;++o)e.fillText(i[o],a.x(t.x),t.y+s.lineHeight/2),t.y+=s.lineHeight+n.footerSpacing}}drawBackground(t,e,n,i){const{xAlign:r,yAlign:s}=this,{x:o,y:a}=t,{width:l,height:c}=n,{topLeft:h,topRight:u,bottomLeft:f,bottomRight:d}=Si(i.cornerRadius);e.fillStyle=i.backgroundColor,e.strokeStyle=i.borderColor,e.lineWidth=i.borderWidth,e.beginPath(),e.moveTo(o+h,a),"top"===s&&this.drawCaret(t,e,n,i),e.lineTo(o+l-u,a),e.quadraticCurveTo(o+l,a,o+l,a+u),"center"===s&&"right"===r&&this.drawCaret(t,e,n,i),e.lineTo(o+l,a+c-d),e.quadraticCurveTo(o+l,a+c,o+l-d,a+c),"bottom"===s&&this.drawCaret(t,e,n,i),e.lineTo(o+f,a+c),e.quadraticCurveTo(o,a+c,o,a+c-f),"center"===s&&"left"===r&&this.drawCaret(t,e,n,i),e.lineTo(o,a+h),e.quadraticCurveTo(o,a,o+h,a),e.closePath(),e.fill(),i.borderWidth>0&&e.stroke()}_updateAnimationTarget(t){const e=this.chart,n=this.$animations,i=n&&n.x,r=n&&n.y;if(i||r){const n=Oa[t.position].call(this,this._active,this._eventPosition);if(!n)return;const s=this._size=Ta(this,t),o=Object.assign({},n,this._size),a=Da(e,t,o),l=Ra(t,o,a,e);i._to===l.x&&r._to===l.y||(this.xAlign=a.xAlign,this.yAlign=a.yAlign,this.width=s.width,this.height=s.height,this.caretX=n.x,this.caretY=n.y,this._resolveAnimations().update(this,l))}}_willRender(){return!!this.opacity}draw(t){const e=this.options.setContext(this.getContext());let n=this.opacity;if(!n)return;this._updateAnimationTarget(e);const i={width:this.width,height:this.height},r={x:this.x,y:this.y};n=Math.abs(n)<.001?0:n;const s=Oi(e.padding),o=this.title.length||this.beforeBody.length||this.body.length||this.afterBody.length||this.footer.length;e.enabled&&o&&(t.save(),t.globalAlpha=n,this.drawBackground(r,t,i,e),pr(t,e.textDirection),r.y+=s.top,this.drawTitle(r,t,e),this.drawBody(r,t,e),this.drawFooter(r,t,e),gr(t,e.textDirection),t.restore())}getActiveElements(){return this._active||[]}setActiveElements(t,e){const n=this._active,i=t.map((({datasetIndex:t,index:e})=>{const n=this.chart.getDatasetMeta(t);if(!n)throw new Error("Cannot find a dataset at index "+t);return{datasetIndex:t,element:n.data[e],index:e}})),r=!He(n,i),s=this._positionChanged(i,e);(r||s)&&(this._active=i,this._eventPosition=e,this._ignoreReplayEvents=!0,this.update(!0))}handleEvent(t,e,n=!0){if(e&&this._ignoreReplayEvents)return!1;this._ignoreReplayEvents=!1;const i=this.options,r=this._active||[],s=this._getActiveElements(t,r,e,n),o=this._positionChanged(s,t),a=e||!He(s,r)||o;return a&&(this._active=s,(i.enabled||i.external)&&(this._eventPosition={x:t.x,y:t.y},this.update(!0,e))),a}_getActiveElements(t,e,n,i){const r=this.options;if("mouseout"===t.type)return[];if(!i)return e;const s=this.chart.getElementsAtEventForMode(t,r.mode,r,n);return r.reverse&&s.reverse(),s}_positionChanged(t,e){const{caretX:n,caretY:i,options:r}=this,s=Oa[r.position].call(this,t,e);return!1!==s&&(n!==s.x||i!==s.y)}}var Na={id:"tooltip",_element:Ba,positioners:Oa,afterInit(t,e,n){n&&(t.tooltip=new Ba({chart:t,options:n}))},beforeUpdate(t,e,n){t.tooltip&&t.tooltip.initialize(n)},reset(t,e,n){t.tooltip&&t.tooltip.initialize(n)},afterDraw(t){const e=t.tooltip;if(e&&e._willRender()){const n={tooltip:e};if(!1===t.notifyPlugins("beforeTooltipDraw",{...n,cancelable:!0}))return;e.draw(t.ctx),t.notifyPlugins("afterTooltipDraw",n)}},afterEvent(t,e){if(t.tooltip){const n=e.replay;t.tooltip.handleEvent(e.event,n,e.inChartArea)&&(e.changed=!0)}},defaults:{enabled:!0,external:null,position:"average",backgroundColor:"rgba(0,0,0,0.8)",titleColor:"#fff",titleFont:{weight:"bold"},titleSpacing:2,titleMarginBottom:6,titleAlign:"left",bodyColor:"#fff",bodySpacing:2,bodyFont:{},bodyAlign:"left",footerColor:"#fff",footerSpacing:2,footerMarginTop:6,footerFont:{weight:"bold"},footerAlign:"left",padding:6,caretPadding:2,caretSize:5,cornerRadius:6,boxHeight:(t,e)=>e.bodyFont.size,boxWidth:(t,e)=>e.bodyFont.size,multiKeyBackground:"#fff",displayColors:!0,boxPadding:0,borderColor:"rgba(0,0,0,0)",borderWidth:0,animation:{duration:400,easing:"easeOutQuart"},animations:{numbers:{type:"number",properties:["x","y","width","height","caretX","caretY"]},opacity:{easing:"linear",duration:200}},callbacks:za},defaultRoutes:{bodyFont:"font",footerFont:"font",titleFont:"font"},descriptors:{_scriptable:t=>"filter"!==t&&"itemSort"!==t&&"external"!==t,_indexable:!1,callbacks:{_scriptable:!1,_indexable:!1},animation:{_fallback:!1},animations:{_fallback:"animation"}},additionalOptionScopes:["interaction"]},Va=Object.freeze({__proto__:null,Colors:Go,Decimation:ta,Filler:ba,Legend:va,SubTitle:Sa,Title:ka,Tooltip:Na});function Wa(t,e,n,i){const r=t.indexOf(e);return-1===r?((t,e,n,i)=>("string"==typeof e?(n=t.push(e)-1,i.unshift({index:n,label:e})):isNaN(e)&&(n=null),n))(t,e,n,i):r!==t.lastIndexOf(e)?n:r}function Ha(t){const e=this.getLabels();return t>=0&&t<e.length?e[t]:t}function Ua(t,e){const n=[],{bounds:i,step:r,min:s,max:o,precision:a,count:l,maxTicks:c,maxDigits:h,includeBounds:u}=t,f=r||1,d=c-1,{min:p,max:g}=e,m=!Le(s),b=!Le(o),_=!Le(l),y=(g-p)/(h+1);let x,v,w,k,M=pn((g-p)/d/f)*f;if(M<1e-14&&!m&&!b)return[{value:p},{value:g}];k=Math.ceil(g/M)-Math.floor(p/M),k>d&&(M=pn(k*M/d/f)*f),Le(a)||(x=Math.pow(10,a),M=Math.ceil(M*x)/x),"ticks"===i?(v=Math.floor(p/M)*M,w=Math.ceil(g/M)*M):(v=p,w=g),m&&b&&r&&function(t,e){const n=Math.round(t);return n-e<=t&&n+e>=t}((o-s)/r,M/1e3)?(k=Math.round(Math.min((o-s)/M,c)),M=(o-s)/k,v=s,w=o):_?(v=m?s:v,w=b?o:w,k=l-1,M=(w-v)/k):(k=(w-v)/M,k=dn(k,Math.round(k),M/1e3)?Math.round(k):Math.ceil(k));const S=Math.max(yn(M),yn(v));x=Math.pow(10,Le(a)?S:a),v=Math.round(v*x)/x,w=Math.round(w*x)/x;let O=0;for(m&&(u&&v!==s?(n.push({value:s}),v<s&&O++,dn(Math.round((v+O*M)*x)/x,s,$a(s,y,t))&&O++):v<s&&O++);O<k;++O)n.push({value:Math.round((v+O*M)*x)/x});return b&&u&&w!==o?n.length&&dn(n[n.length-1].value,o,$a(o,y,t))?n[n.length-1].value=o:n.push({value:o}):b&&w!==o||n.push({value:w}),n}function $a(t,e,{horizontal:n,minRotation:i}){const r=bn(i),s=(n?Math.sin(r):Math.cos(r))||.001,o=.75*e*(""+t).length;return Math.min(e/s,o)}class Ya extends Xs{constructor(t){super(t),this.start=void 0,this.end=void 0,this._startValue=void 0,this._endValue=void 0,this._valueRange=0}parse(t,e){return Le(t)||("number"==typeof t||t instanceof Number)&&!isFinite(+t)?null:+t}handleTickRangeOptions(){const{beginAtZero:t}=this.options,{minDefined:e,maxDefined:n}=this.getUserBounds();let{min:i,max:r}=this;const s=t=>i=e?i:t,o=t=>r=n?r:t;if(t){const t=fn(i),e=fn(r);t<0&&e<0?o(0):t>0&&e>0&&s(0)}if(i===r){let e=0===r?1:Math.abs(.05*r);o(r+e),t||s(i-e)}this.min=i,this.max=r}getTickLimit(){const t=this.options.ticks;let e,{maxTicksLimit:n,stepSize:i}=t;return i?(e=Math.ceil(this.max/i)-Math.floor(this.min/i)+1,e>1e3&&(console.warn(`scales.${this.id}.ticks.stepSize: ${i} would result generating up to ${e} ticks. Limiting to 1000.`),e=1e3)):(e=this.computeTickLimit(),n=n||11),n&&(e=Math.min(n,e)),e}computeTickLimit(){return Number.POSITIVE_INFINITY}buildTicks(){const t=this.options,e=t.ticks;let n=this.getTickLimit();n=Math.max(2,n);const i=Ua({maxTicks:n,bounds:t.bounds,min:t.min,max:t.max,precision:e.precision,step:e.stepSize,count:e.count,maxDigits:this._maxDigits(),horizontal:this.isHorizontal(),minRotation:e.minRotation||0,includeBounds:!1!==e.includeBounds},this._range||this);return"ticks"===t.bounds&&mn(i,this,"value"),t.reverse?(i.reverse(),this.start=this.max,this.end=this.min):(this.start=this.min,this.end=this.max),i}configure(){const t=this.ticks;let e=this.min,n=this.max;if(super.configure(),this.options.offset&&t.length){const i=(n-e)/Math.max(t.length-1,1)/2;e-=i,n+=i}this._startValue=e,this._endValue=n,this._valueRange=n-e}getLabelForValue(t){return Kn(t,this.chart.options.locale,this.options.ticks.format)}}class qa extends Ya{static id="linear";static defaults={ticks:{callback:Gn.formatters.numeric}};determineDataLimits(){const{min:t,max:e}=this.getMinMax(!0);this.min=ze(t)?t:0,this.max=ze(e)?e:1,this.handleTickRangeOptions()}computeTickLimit(){const t=this.isHorizontal(),e=t?this.width:this.height,n=bn(this.options.ticks.minRotation),i=(t?Math.sin(n):Math.cos(n))||.001,r=this._resolveTickFontOptions(0);return Math.ceil(e/Math.min(40,r.lineHeight/i))}getPixelForValue(t){return null===t?NaN:this.getPixelForDecimal((t-this._startValue)/this._valueRange)}getValueForPixel(t){return this._startValue+this.getDecimalForPixel(t)*this._valueRange}}const Xa=t=>Math.floor(un(t)),Ka=(t,e)=>Math.pow(10,Xa(t)+e);function Ja(t){return 1==t/Math.pow(10,Xa(t))}function Ga(t,e,n){const i=Math.pow(10,n),r=Math.floor(t/i);return Math.ceil(e/i)-r}function Za(t,{min:e,max:n}){e=je(t.min,e);const i=[],r=Xa(e);let s=function(t,e){let n=Xa(e-t);for(;Ga(t,e,n)>10;)n++;for(;Ga(t,e,n)<10;)n--;return Math.min(n,Xa(t))}(e,n),o=s<0?Math.pow(10,Math.abs(s)):1;const a=Math.pow(10,s),l=r>s?Math.pow(10,r):0,c=Math.round((e-l)*o)/o,h=Math.floor((e-l)/a/10)*a*10;let u=Math.floor((c-h)/Math.pow(10,s)),f=je(t.min,Math.round((l+h+u*Math.pow(10,s))*o)/o);for(;f<n;)i.push({value:f,major:Ja(f),significand:u}),u>=10?u=u<15?15:20:u++,u>=20&&(s++,u=2,o=s>=0?1:o),f=Math.round((l+h+u*Math.pow(10,s))*o)/o;const d=je(t.max,f);return i.push({value:d,major:Ja(d),significand:u}),i}class Qa extends Xs{static id="logarithmic";static defaults={ticks:{callback:Gn.formatters.logarithmic,major:{enabled:!0}}};constructor(t){super(t),this.start=void 0,this.end=void 0,this._startValue=void 0,this._valueRange=0}parse(t,e){const n=Ya.prototype.parse.apply(this,[t,e]);if(0!==n)return ze(n)&&n>0?n:null;this._zero=!0}determineDataLimits(){const{min:t,max:e}=this.getMinMax(!0);this.min=ze(t)?Math.max(0,t):null,this.max=ze(e)?Math.max(0,e):null,this.options.beginAtZero&&(this._zero=!0),this._zero&&this.min!==this._suggestedMin&&!ze(this._userMin)&&(this.min=t===Ka(this.min,0)?Ka(this.min,-1):Ka(this.min,0)),this.handleTickRangeOptions()}handleTickRangeOptions(){const{minDefined:t,maxDefined:e}=this.getUserBounds();let n=this.min,i=this.max;const r=e=>n=t?n:e,s=t=>i=e?i:t;n===i&&(n<=0?(r(1),s(10)):(r(Ka(n,-1)),s(Ka(i,1)))),n<=0&&r(Ka(i,-1)),i<=0&&s(Ka(n,1)),this.min=n,this.max=i}buildTicks(){const t=this.options,e=Za({min:this._userMin,max:this._userMax},this);return"ticks"===t.bounds&&mn(e,this,"value"),t.reverse?(e.reverse(),this.start=this.max,this.end=this.min):(this.start=this.min,this.end=this.max),e}getLabelForValue(t){return void 0===t?"0":Kn(t,this.chart.options.locale,this.options.ticks.format)}configure(){const t=this.min;super.configure(),this._startValue=un(t),this._valueRange=un(this.max)-un(t)}getPixelForValue(t){return void 0!==t&&0!==t||(t=this.min),null===t||isNaN(t)?NaN:this.getPixelForDecimal(t===this.min?0:(un(t)-this._startValue)/this._valueRange)}getValueForPixel(t){const e=this.getDecimalForPixel(t);return Math.pow(10,this._startValue+e*this._valueRange)}}function tl(t){const e=t.ticks;if(e.display&&t.display){const t=Oi(e.backdropPadding);return Be(e.font&&e.font.size,ii.font.size)+t.height}return 0}function el(t,e,n,i,r){return t===i||t===r?{start:e-n/2,end:e+n/2}:t<i||t>r?{start:e-n,end:e}:{start:e,end:e+n}}function nl(t){const e={l:t.left+t._padding.left,r:t.right-t._padding.right,t:t.top+t._padding.top,b:t.bottom-t._padding.bottom},n=Object.assign({},e),i=[],r=[],s=t._pointLabels.length,o=t.options.pointLabels,a=o.centerPointLabels?nn/s:0;for(let u=0;u<s;u++){const s=o.setContext(t.getPointLabelContext(u));r[u]=s.padding;const f=t.getPointPosition(u,t.drawingArea+r[u],a),d=Ai(s.font),p=(l=t.ctx,c=d,h=Ie(h=t._pointLabels[u])?h:[h],{w:si(l,c.string,h),h:h.length*c.lineHeight});i[u]=p;const g=kn(t.getIndexAngle(u)+a),m=Math.round(_n(g));il(n,e,g,el(m,f.x,p.w,0,180),el(m,f.y,p.h,90,270))}var l,c,h;t.setCenterPoint(e.l-n.l,n.r-e.r,e.t-n.t,n.b-e.b),t._pointLabelItems=function(t,e,n){const i=[],r=t._pointLabels.length,s=t.options,o=tl(s)/2,a=t.drawingArea,l=s.pointLabels.centerPointLabels?nn/r:0;for(let c=0;c<r;c++){const r=t.getPointPosition(c,a+o+n[c],l),s=Math.round(_n(kn(r.angle+ln))),h=e[c],u=ol(r.y,h.h,s),f=rl(s),d=sl(r.x,h.w,f);i.push({x:r.x,y:u,textAlign:f,left:d,top:u,right:d+h.w,bottom:u+h.h})}return i}(t,i,r)}function il(t,e,n,i,r){const s=Math.abs(Math.sin(n)),o=Math.abs(Math.cos(n));let a=0,l=0;i.start<e.l?(a=(e.l-i.start)/s,t.l=Math.min(t.l,e.l-a)):i.end>e.r&&(a=(i.end-e.r)/s,t.r=Math.max(t.r,e.r+a)),r.start<e.t?(l=(e.t-r.start)/o,t.t=Math.min(t.t,e.t-l)):r.end>e.b&&(l=(r.end-e.b)/o,t.b=Math.max(t.b,e.b+l))}function rl(t){return 0===t||180===t?"center":t<180?"left":"right"}function sl(t,e,n){return"right"===n?t-=e:"center"===n&&(t-=e/2),t}function ol(t,e,n){return 90===n||270===n?t-=e/2:(n>270||n<90)&&(t-=e),t}function al(t,e,n,i){const{ctx:r}=t;if(n)r.arc(t.xCenter,t.yCenter,e,0,rn);else{let n=t.getPointPosition(0,e);r.moveTo(n.x,n.y);for(let s=1;s<i;s++)n=t.getPointPosition(s,e),r.lineTo(n.x,n.y)}}class ll extends Ya{static id="radialLinear";static defaults={display:!0,animate:!0,position:"chartArea",angleLines:{display:!0,lineWidth:1,borderDash:[],borderDashOffset:0},grid:{circular:!1},startAngle:0,ticks:{showLabelBackdrop:!0,callback:Gn.formatters.numeric},pointLabels:{backdropColor:void 0,backdropPadding:2,display:!0,font:{size:10},callback:t=>t,padding:5,centerPointLabels:!1}};static defaultRoutes={"angleLines.color":"borderColor","pointLabels.color":"color","ticks.color":"color"};static descriptors={angleLines:{_fallback:"grid"}};constructor(t){super(t),this.xCenter=void 0,this.yCenter=void 0,this.drawingArea=void 0,this._pointLabels=[],this._pointLabelItems=[]}setDimensions(){const t=this._padding=Oi(tl(this.options)/2),e=this.width=this.maxWidth-t.width,n=this.height=this.maxHeight-t.height;this.xCenter=Math.floor(this.left+e/2+t.left),this.yCenter=Math.floor(this.top+n/2+t.top),this.drawingArea=Math.floor(Math.min(e,n)/2)}determineDataLimits(){const{min:t,max:e}=this.getMinMax(!1);this.min=ze(t)&&!isNaN(t)?t:0,this.max=ze(e)&&!isNaN(e)?e:0,this.handleTickRangeOptions()}computeTickLimit(){return Math.ceil(this.drawingArea/tl(this.options))}generateTickLabels(t){Ya.prototype.generateTickLabels.call(this,t),this._pointLabels=this.getLabels().map(((t,e)=>{const n=Ve(this.options.pointLabels.callback,[t,e],this);return n||0===n?n:""})).filter(((t,e)=>this.chart.getDataVisibility(e)))}fit(){const t=this.options;t.display&&t.pointLabels.display?nl(this):this.setCenterPoint(0,0,0,0)}setCenterPoint(t,e,n,i){this.xCenter+=Math.floor((t-e)/2),this.yCenter+=Math.floor((n-i)/2),this.drawingArea-=Math.min(this.drawingArea/2,Math.max(t,e,n,i))}getIndexAngle(t){return kn(t*(rn/(this._pointLabels.length||1))+bn(this.options.startAngle||0))}getDistanceFromCenterForValue(t){if(Le(t))return NaN;const e=this.drawingArea/(this.max-this.min);return this.options.reverse?(this.max-t)*e:(t-this.min)*e}getValueForDistanceFromCenter(t){if(Le(t))return NaN;const e=t/(this.drawingArea/(this.max-this.min));return this.options.reverse?this.max-e:this.min+e}getPointLabelContext(t){const e=this._pointLabels||[];if(t>=0&&t<e.length){const n=e[t];return function(t,e,n){return Ei(t,{label:n,index:e,type:"pointLabel"})}(this.getContext(),t,n)}}getPointPosition(t,e,n=0){const i=this.getIndexAngle(t)-ln+n;return{x:Math.cos(i)*e+this.xCenter,y:Math.sin(i)*e+this.yCenter,angle:i}}getPointPositionForValue(t,e){return this.getPointPosition(t,this.getDistanceFromCenterForValue(e))}getBasePosition(t){return this.getPointPositionForValue(t||0,this.getBaseValue())}getPointLabelPosition(t){const{left:e,top:n,right:i,bottom:r}=this._pointLabelItems[t];return{left:e,top:n,right:i,bottom:r}}drawBackground(){const{backgroundColor:t,grid:{circular:e}}=this.options;if(t){const n=this.ctx;n.save(),n.beginPath(),al(this,this.getDistanceFromCenterForValue(this._endValue),e,this._pointLabels.length),n.closePath(),n.fillStyle=t,n.fill(),n.restore()}}drawGrid(){const t=this.ctx,e=this.options,{angleLines:n,grid:i,border:r}=e,s=this._pointLabels.length;let o,a,l;if(e.pointLabels.display&&function(t,e){const{ctx:n,options:{pointLabels:i}}=t;for(let r=e-1;r>=0;r--){const e=i.setContext(t.getPointLabelContext(r)),s=Ai(e.font),{x:o,y:a,textAlign:l,left:c,top:h,right:u,bottom:f}=t._pointLabelItems[r],{backdropColor:d}=e;if(!Le(d)){const t=Si(e.borderRadius),i=Oi(e.backdropPadding);n.fillStyle=d;const r=c-i.left,s=h-i.top,o=u-c+i.width,a=f-h+i.height;Object.values(t).some((t=>0!==t))?(n.beginPath(),_i(n,{x:r,y:s,w:o,h:a,radius:t}),n.fill()):n.fillRect(r,s,o,a)}gi(n,t._pointLabels[r],o,a+s.lineHeight/2,s,{color:e.color,textAlign:l,textBaseline:"middle"})}}(this,s),i.display&&this.ticks.forEach(((t,e)=>{if(0!==e){a=this.getDistanceFromCenterForValue(t.value);const n=this.getContext(e),o=i.setContext(n),l=r.setContext(n);!function(t,e,n,i,r){const s=t.ctx,o=e.circular,{color:a,lineWidth:l}=e;!o&&!i||!a||!l||n<0||(s.save(),s.strokeStyle=a,s.lineWidth=l,s.setLineDash(r.dash),s.lineDashOffset=r.dashOffset,s.beginPath(),al(t,n,o,i),s.closePath(),s.stroke(),s.restore())}(this,o,a,s,l)}})),n.display){for(t.save(),o=s-1;o>=0;o--){const i=n.setContext(this.getPointLabelContext(o)),{color:r,lineWidth:s}=i;s&&r&&(t.lineWidth=s,t.strokeStyle=r,t.setLineDash(i.borderDash),t.lineDashOffset=i.borderDashOffset,a=this.getDistanceFromCenterForValue(e.ticks.reverse?this.min:this.max),l=this.getPointPosition(o,a),t.beginPath(),t.moveTo(this.xCenter,this.yCenter),t.lineTo(l.x,l.y),t.stroke())}t.restore()}}drawBorder(){}drawLabels(){const t=this.ctx,e=this.options,n=e.ticks;if(!n.display)return;const i=this.getIndexAngle(0);let r,s;t.save(),t.translate(this.xCenter,this.yCenter),t.rotate(i),t.textAlign="center",t.textBaseline="middle",this.ticks.forEach(((i,o)=>{if(0===o&&!e.reverse)return;const a=n.setContext(this.getContext(o)),l=Ai(a.font);if(r=this.getDistanceFromCenterForValue(this.ticks[o].value),a.showLabelBackdrop){t.font=l.string,s=t.measureText(i.label).width,t.fillStyle=a.backdropColor;const e=Oi(a.backdropPadding);t.fillRect(-s/2-e.left,-r-l.size/2-e.top,s+e.width,l.size+e.height)}gi(t,i.label,0,-r,l,{color:a.color})})),t.restore()}drawTitle(){}}const cl={millisecond:{common:!0,size:1,steps:1e3},second:{common:!0,size:1e3,steps:60},minute:{common:!0,size:6e4,steps:60},hour:{common:!0,size:36e5,steps:24},day:{common:!0,size:864e5,steps:30},week:{common:!1,size:6048e5,steps:4},month:{common:!0,size:2628e6,steps:12},quarter:{common:!1,size:7884e6,steps:4},year:{common:!0,size:3154e7}},hl=Object.keys(cl);function ul(t,e){return t-e}function fl(t,e){if(Le(e))return null;const n=t._adapter,{parser:i,round:r,isoWeekday:s}=t._parseOpts;let o=e;return"function"==typeof i&&(o=i(o)),ze(o)||(o="string"==typeof i?n.parse(o,i):n.parse(o)),null===o?null:(r&&(o="week"!==r||!gn(s)&&!0!==s?n.startOf(o,r):n.startOf(o,"isoWeek",s)),+o)}function dl(t,e,n,i){const r=hl.length;for(let s=hl.indexOf(t);s<r-1;++s){const t=cl[hl[s]],r=t.steps?t.steps:Number.MAX_SAFE_INTEGER;if(t.common&&Math.ceil((n-e)/(r*t.size))<=i)return hl[s]}return hl[r-1]}function pl(t,e,n){if(n){if(n.length){const{lo:i,hi:r}=An(n,e);t[n[i]>=e?n[i]:n[r]]=!0}}else t[e]=!0}function gl(t,e,n){const i=[],r={},s=e.length;let o,a;for(o=0;o<s;++o)a=e[o],r[a]=o,i.push({value:a,major:!1});return 0!==s&&n?function(t,e,n,i){const r=t._adapter,s=+r.startOf(e[0].value,i),o=e[e.length-1].value;let a,l;for(a=s;a<=o;a=+r.add(a,1,i))l=n[a],l>=0&&(e[l].major=!0);return e}(t,i,r,n):i}class ml extends Xs{static id="time";static defaults={bounds:"data",adapters:{},time:{parser:!1,unit:!1,round:!1,isoWeekday:!1,minUnit:"millisecond",displayFormats:{}},ticks:{source:"auto",callback:!1,major:{enabled:!1}}};constructor(t){super(t),this._cache={data:[],labels:[],all:[]},this._unit="day",this._majorUnit=void 0,this._offsets={},this._normalized=!1,this._parseOpts=void 0}init(t,e={}){const n=t.time||(t.time={}),i=this._adapter=new ts(t.adapters.date);i.init(e),Xe(n.displayFormats,i.formats()),this._parseOpts={parser:n.parser,round:n.round,isoWeekday:n.isoWeekday},super.init(t),this._normalized=e.normalized}parse(t,e){return void 0===t?null:fl(this,t)}beforeLayout(){super.beforeLayout(),this._cache={data:[],labels:[],all:[]}}determineDataLimits(){const t=this.options,e=this._adapter,n=t.time.unit||"day";let{min:i,max:r,minDefined:s,maxDefined:o}=this.getUserBounds();function a(t){s||isNaN(t.min)||(i=Math.min(i,t.min)),o||isNaN(t.max)||(r=Math.max(r,t.max))}s&&o||(a(this._getLabelBounds()),"ticks"===t.bounds&&"labels"===t.ticks.source||a(this.getMinMax(!1))),i=ze(i)&&!isNaN(i)?i:+e.startOf(Date.now(),n),r=ze(r)&&!isNaN(r)?r:+e.endOf(Date.now(),n)+1,this.min=Math.min(i,r-1),this.max=Math.max(i+1,r)}_getLabelBounds(){const t=this.getLabelTimestamps();let e=Number.POSITIVE_INFINITY,n=Number.NEGATIVE_INFINITY;return t.length&&(e=t[0],n=t[t.length-1]),{min:e,max:n}}buildTicks(){const t=this.options,e=t.time,n=t.ticks,i="labels"===n.source?this.getLabelTimestamps():this._generate();"ticks"===t.bounds&&i.length&&(this.min=this._userMin||i[0],this.max=this._userMax||i[i.length-1]);const r=this.min,s=function(t,e,n){let i=0,r=t.length;for(;i<r&&t[i]<e;)i++;for(;r>i&&t[r-1]>n;)r--;return i>0||r<t.length?t.slice(i,r):t}(i,r,this.max);return this._unit=e.unit||(n.autoSkip?dl(e.minUnit,this.min,this.max,this._getLabelCapacity(r)):function(t,e,n,i,r){for(let s=hl.length-1;s>=hl.indexOf(n);s--){const n=hl[s];if(cl[n].common&&t._adapter.diff(r,i,n)>=e-1)return n}return hl[n?hl.indexOf(n):0]}(this,s.length,e.minUnit,this.min,this.max)),this._majorUnit=n.major.enabled&&"year"!==this._unit?function(t){for(let e=hl.indexOf(t)+1,n=hl.length;e<n;++e)if(cl[hl[e]].common)return hl[e]}(this._unit):void 0,this.initOffsets(i),t.reverse&&s.reverse(),gl(this,s,this._majorUnit)}afterAutoSkip(){this.options.offsetAfterAutoskip&&this.initOffsets(this.ticks.map((t=>+t.value)))}initOffsets(t=[]){let e,n,i=0,r=0;this.options.offset&&t.length&&(e=this.getDecimalForValue(t[0]),i=1===t.length?1-e:(this.getDecimalForValue(t[1])-e)/2,n=this.getDecimalForValue(t[t.length-1]),r=1===t.length?n:(n-this.getDecimalForValue(t[t.length-2]))/2);const s=t.length<3?.5:.25;i=Sn(i,0,s),r=Sn(r,0,s),this._offsets={start:i,end:r,factor:1/(i+1+r)}}_generate(){const t=this._adapter,e=this.min,n=this.max,i=this.options,r=i.time,s=r.unit||dl(r.minUnit,e,n,this._getLabelCapacity(e)),o=Be(i.ticks.stepSize,1),a="week"===s&&r.isoWeekday,l=gn(a)||!0===a,c={};let h,u,f=e;if(l&&(f=+t.startOf(f,"isoWeek",a)),f=+t.startOf(f,l?"day":s),t.diff(n,e,s)>1e5*o)throw new Error(e+" and "+n+" are too far apart with stepSize of "+o+" "+s);const d="data"===i.ticks.source&&this.getDataTimestamps();for(h=f,u=0;h<n;h=+t.add(h,o,s),u++)pl(c,h,d);return h!==n&&"ticks"!==i.bounds&&1!==u||pl(c,h,d),Object.keys(c).sort(((t,e)=>t-e)).map((t=>+t))}getLabelForValue(t){const e=this._adapter,n=this.options.time;return n.tooltipFormat?e.format(t,n.tooltipFormat):e.format(t,n.displayFormats.datetime)}format(t,e){const n=this.options.time.displayFormats,i=this._unit,r=e||n[i];return this._adapter.format(t,r)}_tickFormatFunction(t,e,n,i){const r=this.options,s=r.ticks.callback;if(s)return Ve(s,[t,e,n],this);const o=r.time.displayFormats,a=this._unit,l=this._majorUnit,c=a&&o[a],h=l&&o[l],u=n[e],f=l&&h&&u&&u.major;return this._adapter.format(t,i||(f?h:c))}generateTickLabels(t){let e,n,i;for(e=0,n=t.length;e<n;++e)i=t[e],i.label=this._tickFormatFunction(i.value,e,t)}getDecimalForValue(t){return null===t?NaN:(t-this.min)/(this.max-this.min)}getPixelForValue(t){const e=this._offsets,n=this.getDecimalForValue(t);return this.getPixelForDecimal((e.start+n)*e.factor)}getValueForPixel(t){const e=this._offsets,n=this.getDecimalForPixel(t)/e.factor-e.end;return this.min+n*(this.max-this.min)}_getLabelSize(t){const e=this.options.ticks,n=this.ctx.measureText(t).width,i=bn(this.isHorizontal()?e.maxRotation:e.minRotation),r=Math.cos(i),s=Math.sin(i),o=this._resolveTickFontOptions(0).size;return{w:n*r+o*s,h:n*s+o*r}}_getLabelCapacity(t){const e=this.options.time,n=e.displayFormats,i=n[e.unit]||n.millisecond,r=this._tickFormatFunction(t,0,gl(this,[t],this._majorUnit),i),s=this._getLabelSize(r),o=Math.floor(this.isHorizontal()?this.width/s.w:this.height/s.h)-1;return o>0?o:1}getDataTimestamps(){let t,e,n=this._cache.data||[];if(n.length)return n;const i=this.getMatchingVisibleMetas();if(this._normalized&&i.length)return this._cache.data=i[0].controller.getAllParsedValues(this);for(t=0,e=i.length;t<e;++t)n=n.concat(i[t].controller.getAllParsedValues(this));return this._cache.data=this.normalize(n)}getLabelTimestamps(){const t=this._cache.labels||[];let e,n;if(t.length)return t;const i=this.getLabels();for(e=0,n=i.length;e<n;++e)t.push(fl(this,i[e]));return this._cache.labels=this._normalized?t:this.normalize(t)}normalize(t){return Dn(t.sort(ul))}}function bl(t,e,n){let i,r,s,o,a=0,l=t.length-1;n?(e>=t[a].pos&&e<=t[l].pos&&({lo:a,hi:l}=Pn(t,"pos",e)),({pos:i,time:s}=t[a]),({pos:r,time:o}=t[l])):(e>=t[a].time&&e<=t[l].time&&({lo:a,hi:l}=Pn(t,"time",e)),({time:i,pos:s}=t[a]),({time:r,pos:o}=t[l]));const c=r-i;return c?s+(o-s)*(e-i)/c:s}var _l=Object.freeze({__proto__:null,CategoryScale:class extends Xs{static id="category";static defaults={ticks:{callback:Ha}};constructor(t){super(t),this._startValue=void 0,this._valueRange=0,this._addedLabels=[]}init(t){const e=this._addedLabels;if(e.length){const t=this.getLabels();for(const{index:n,label:i}of e)t[n]===i&&t.splice(n,1);this._addedLabels=[]}super.init(t)}parse(t,e){if(Le(t))return null;const n=this.getLabels();return((t,e)=>null===t?null:Sn(Math.round(t),0,e))(e=isFinite(e)&&n[e]===t?e:Wa(n,t,Be(e,t),this._addedLabels),n.length-1)}determineDataLimits(){const{minDefined:t,maxDefined:e}=this.getUserBounds();let{min:n,max:i}=this.getMinMax(!0);"ticks"===this.options.bounds&&(t||(n=0),e||(i=this.getLabels().length-1)),this.min=n,this.max=i}buildTicks(){const t=this.min,e=this.max,n=this.options.offset,i=[];let r=this.getLabels();r=0===t&&e===r.length-1?r:r.slice(t,e+1),this._valueRange=Math.max(r.length-(n?0:1),1),this._startValue=this.min-(n?.5:0);for(let s=t;s<=e;s++)i.push({value:s});return i}getLabelForValue(t){return Ha.call(this,t)}configure(){super.configure(),this.isHorizontal()||(this._reversePixels=!this._reversePixels)}getPixelForValue(t){return"number"!=typeof t&&(t=this.parse(t)),null===t?NaN:this.getPixelForDecimal((t-this._startValue)/this._valueRange)}getPixelForTick(t){const e=this.ticks;return t<0||t>e.length-1?null:this.getPixelForValue(e[t].value)}getValueForPixel(t){return Math.round(this._startValue+this.getDecimalForPixel(t)*this._valueRange)}getBasePixel(){return this.bottom}},LinearScale:qa,LogarithmicScale:Qa,RadialLinearScale:ll,TimeScale:ml,TimeSeriesScale:class extends ml{static id="timeseries";static defaults=ml.defaults;constructor(t){super(t),this._table=[],this._minPos=void 0,this._tableRange=void 0}initOffsets(){const t=this._getTimestampsForTable(),e=this._table=this.buildLookupTable(t);this._minPos=bl(e,this.min),this._tableRange=bl(e,this.max)-this._minPos,super.initOffsets(t)}buildLookupTable(t){const{min:e,max:n}=this,i=[],r=[];let s,o,a,l,c;for(s=0,o=t.length;s<o;++s)l=t[s],l>=e&&l<=n&&i.push(l);if(i.length<2)return[{time:e,pos:0},{time:n,pos:1}];for(s=0,o=i.length;s<o;++s)c=i[s+1],a=i[s-1],l=i[s],Math.round((c+a)/2)!==l&&r.push({time:l,pos:s/(o-1)});return r}_getTimestampsForTable(){let t=this._cache.all||[];if(t.length)return t;const e=this.getDataTimestamps(),n=this.getLabelTimestamps();return t=e.length&&n.length?this.normalize(e.concat(n)):e.length?e:n,t=this._cache.all=t,t}getDecimalForValue(t){return(bl(this._table,t)-this._minPos)/this._tableRange}getValueForPixel(t){const e=this._offsets,n=this.getDecimalForPixel(t)/e.factor-e.end;return bl(this._table,n*this._tableRange+this._minPos,!0)}}});t("r",[Gr,Uo,Va,_l])}}}));