@opendatasoft/visualizations
Version:
Opendatasoft's components to easily build dashboards and visualizations.
19 lines • 1.53 MB
JavaScript
!function(t,e){"object"==typeof exports&&"undefined"!=typeof module?e(exports):"function"==typeof define&&define.amd?define(["exports"],e):e(((t="undefined"!=typeof globalThis?globalThis:t||self).opendatasoft=t.opendatasoft||{},t.opendatasoft.visualizations={}))}(this,(function(t){"use strict";function e(t,e,i){return e=d(e),function(t,e){if(e&&("object"==typeof e||"function"==typeof e))return e;if(void 0!==e)throw new TypeError("Derived constructors may only return object or undefined");return p(t)}(t,n()?Reflect.construct(e,[],d(t).constructor):e.apply(t,i))}function n(){try{var t=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){})))}catch(t){}return(n=function(){return!!t})()}function i(t,e){var n=Object.keys(t);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(t);e&&(i=i.filter((function(e){return Object.getOwnPropertyDescriptor(t,e).enumerable}))),n.push.apply(n,i)}return n}function r(t){for(var e=1;e<arguments.length;e++){var n=null!=arguments[e]?arguments[e]:{};e%2?i(Object(n),!0).forEach((function(e){u(t,e,n[e])})):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(n)):i(Object(n)).forEach((function(e){Object.defineProperty(t,e,Object.getOwnPropertyDescriptor(n,e))}))}return t}function o(){o=function(){return e};var t,e={},n=Object.prototype,i=n.hasOwnProperty,r=Object.defineProperty||function(t,e,n){t[e]=n.value},s="function"==typeof Symbol?Symbol:{},a=s.iterator||"@@iterator",l=s.asyncIterator||"@@asyncIterator",c=s.toStringTag||"@@toStringTag";function u(t,e,n){return Object.defineProperty(t,e,{value:n,enumerable:!0,configurable:!0,writable:!0}),t[e]}try{u({},"")}catch(t){u=function(t,e,n){return t[e]=n}}function h(t,e,n,i){var o=e&&e.prototype instanceof _?e:_,s=Object.create(o.prototype),a=new I(i||[]);return r(s,"_invoke",{value:T(t,n,a)}),s}function d(t,e,n){try{return{type:"normal",arg:t.call(e,n)}}catch(t){return{type:"throw",arg:t}}}e.wrap=h;var f="suspendedStart",p="suspendedYield",m="executing",g="completed",y={};function _(){}function v(){}function x(){}var b={};u(b,a,(function(){return this}));var w=Object.getPrototypeOf,k=w&&w(w(P([])));k&&k!==n&&i.call(k,a)&&(b=k);var S=x.prototype=_.prototype=Object.create(b);function C(t){["next","throw","return"].forEach((function(e){u(t,e,(function(t){return this._invoke(e,t)}))}))}function M(t,e){function n(r,o,s,a){var l=d(t[r],t,o);if("throw"!==l.type){var c=l.arg,u=c.value;return u&&"object"==typeof u&&i.call(u,"__await")?e.resolve(u.__await).then((function(t){n("next",t,s,a)}),(function(t){n("throw",t,s,a)})):e.resolve(u).then((function(t){c.value=t,s(c)}),(function(t){return n("throw",t,s,a)}))}a(l.arg)}var o;r(this,"_invoke",{value:function(t,i){function r(){return new e((function(e,r){n(t,i,e,r)}))}return o=o?o.then(r,r):r()}})}function T(e,n,i){var r=f;return function(o,s){if(r===m)throw new Error("Generator is already running");if(r===g){if("throw"===o)throw s;return{value:t,done:!0}}for(i.method=o,i.arg=s;;){var a=i.delegate;if(a){var l=E(a,i);if(l){if(l===y)continue;return l}}if("next"===i.method)i.sent=i._sent=i.arg;else if("throw"===i.method){if(r===f)throw r=g,i.arg;i.dispatchException(i.arg)}else"return"===i.method&&i.abrupt("return",i.arg);r=m;var c=d(e,n,i);if("normal"===c.type){if(r=i.done?g:p,c.arg===y)continue;return{value:c.arg,done:i.done}}"throw"===c.type&&(r=g,i.method="throw",i.arg=c.arg)}}}function E(e,n){var i=n.method,r=e.iterator[i];if(r===t)return n.delegate=null,"throw"===i&&e.iterator.return&&(n.method="return",n.arg=t,E(e,n),"throw"===n.method)||"return"!==i&&(n.method="throw",n.arg=new TypeError("The iterator does not provide a '"+i+"' method")),y;var o=d(r,e.iterator,n.arg);if("throw"===o.type)return n.method="throw",n.arg=o.arg,n.delegate=null,y;var s=o.arg;return s?s.done?(n[e.resultName]=s.value,n.next=e.nextLoc,"return"!==n.method&&(n.method="next",n.arg=t),n.delegate=null,y):s:(n.method="throw",n.arg=new TypeError("iterator result is not an object"),n.delegate=null,y)}function A(t){var e={tryLoc:t[0]};1 in t&&(e.catchLoc=t[1]),2 in t&&(e.finallyLoc=t[2],e.afterLoc=t[3]),this.tryEntries.push(e)}function D(t){var e=t.completion||{};e.type="normal",delete e.arg,t.completion=e}function I(t){this.tryEntries=[{tryLoc:"root"}],t.forEach(A,this),this.reset(!0)}function P(e){if(e||""===e){var n=e[a];if(n)return n.call(e);if("function"==typeof e.next)return e;if(!isNaN(e.length)){var r=-1,o=function n(){for(;++r<e.length;)if(i.call(e,r))return n.value=e[r],n.done=!1,n;return n.value=t,n.done=!0,n};return o.next=o}}throw new TypeError(typeof e+" is not iterable")}return v.prototype=x,r(S,"constructor",{value:x,configurable:!0}),r(x,"constructor",{value:v,configurable:!0}),v.displayName=u(x,c,"GeneratorFunction"),e.isGeneratorFunction=function(t){var e="function"==typeof t&&t.constructor;return!!e&&(e===v||"GeneratorFunction"===(e.displayName||e.name))},e.mark=function(t){return Object.setPrototypeOf?Object.setPrototypeOf(t,x):(t.__proto__=x,u(t,c,"GeneratorFunction")),t.prototype=Object.create(S),t},e.awrap=function(t){return{__await:t}},C(M.prototype),u(M.prototype,l,(function(){return this})),e.AsyncIterator=M,e.async=function(t,n,i,r,o){void 0===o&&(o=Promise);var s=new M(h(t,n,i,r),o);return e.isGeneratorFunction(n)?s:s.next().then((function(t){return t.done?t.value:s.next()}))},C(S),u(S,c,"Generator"),u(S,a,(function(){return this})),u(S,"toString",(function(){return"[object Generator]"})),e.keys=function(t){var e=Object(t),n=[];for(var i in e)n.push(i);return n.reverse(),function t(){for(;n.length;){var i=n.pop();if(i in e)return t.value=i,t.done=!1,t}return t.done=!0,t}},e.values=P,I.prototype={constructor:I,reset:function(e){if(this.prev=0,this.next=0,this.sent=this._sent=t,this.done=!1,this.delegate=null,this.method="next",this.arg=t,this.tryEntries.forEach(D),!e)for(var n in this)"t"===n.charAt(0)&&i.call(this,n)&&!isNaN(+n.slice(1))&&(this[n]=t)},stop:function(){this.done=!0;var t=this.tryEntries[0].completion;if("throw"===t.type)throw t.arg;return this.rval},dispatchException:function(e){if(this.done)throw e;var n=this;function r(i,r){return a.type="throw",a.arg=e,n.next=i,r&&(n.method="next",n.arg=t),!!r}for(var o=this.tryEntries.length-1;o>=0;--o){var s=this.tryEntries[o],a=s.completion;if("root"===s.tryLoc)return r("end");if(s.tryLoc<=this.prev){var l=i.call(s,"catchLoc"),c=i.call(s,"finallyLoc");if(l&&c){if(this.prev<s.catchLoc)return r(s.catchLoc,!0);if(this.prev<s.finallyLoc)return r(s.finallyLoc)}else if(l){if(this.prev<s.catchLoc)return r(s.catchLoc,!0)}else{if(!c)throw new Error("try statement without catch or finally");if(this.prev<s.finallyLoc)return r(s.finallyLoc)}}}},abrupt:function(t,e){for(var n=this.tryEntries.length-1;n>=0;--n){var r=this.tryEntries[n];if(r.tryLoc<=this.prev&&i.call(r,"finallyLoc")&&this.prev<r.finallyLoc){var o=r;break}}o&&("break"===t||"continue"===t)&&o.tryLoc<=e&&e<=o.finallyLoc&&(o=null);var s=o?o.completion:{};return s.type=t,s.arg=e,o?(this.method="next",this.next=o.finallyLoc,y):this.complete(s)},complete:function(t,e){if("throw"===t.type)throw t.arg;return"break"===t.type||"continue"===t.type?this.next=t.arg:"return"===t.type?(this.rval=this.arg=t.arg,this.method="return",this.next="end"):"normal"===t.type&&e&&(this.next=e),y},finish:function(t){for(var e=this.tryEntries.length-1;e>=0;--e){var n=this.tryEntries[e];if(n.finallyLoc===t)return this.complete(n.completion,n.afterLoc),D(n),y}},catch:function(t){for(var e=this.tryEntries.length-1;e>=0;--e){var n=this.tryEntries[e];if(n.tryLoc===t){var i=n.completion;if("throw"===i.type){var r=i.arg;D(n)}return r}}throw new Error("illegal catch attempt")},delegateYield:function(e,n,i){return this.delegate={iterator:P(e),resultName:n,nextLoc:i},"next"===this.method&&(this.arg=t),y}},e}function s(t){var e=function(t,e){if("object"!=typeof t||!t)return t;var n=t[Symbol.toPrimitive];if(void 0!==n){var i=n.call(t,e||"default");if("object"!=typeof i)return i;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===e?String:Number)(t)}(t,"string");return"symbol"==typeof e?e:String(e)}function a(t,e,n,i,r,o,s){try{var a=t[o](s),l=a.value}catch(t){return void n(t)}a.done?e(l):Promise.resolve(l).then(i,r)}function l(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}function c(t,e,n){return e&&function(t,e){for(var n=0;n<e.length;n++){var i=e[n];i.enumerable=i.enumerable||!1,i.configurable=!0,"value"in i&&(i.writable=!0),Object.defineProperty(t,s(i.key),i)}}(t.prototype,e),Object.defineProperty(t,"prototype",{writable:!1}),t}function u(t,e,n){return(e=s(e))in t?Object.defineProperty(t,e,{value:n,enumerable:!0,configurable:!0,writable:!0}):t[e]=n,t}function h(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function");t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,writable:!0,configurable:!0}}),Object.defineProperty(t,"prototype",{writable:!1}),e&&f(t,e)}function d(t){return d=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(t){return t.__proto__||Object.getPrototypeOf(t)},d(t)}function f(t,e){return f=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(t,e){return t.__proto__=e,t},f(t,e)}function p(t){if(void 0===t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return t}function m(t,e){return function(t){if(Array.isArray(t))return t}(t)||function(t,e){var n=null==t?null:"undefined"!=typeof Symbol&&t[Symbol.iterator]||t["@@iterator"];if(null!=n){var i,r,o,s,a=[],l=!0,c=!1;try{if(o=(n=n.call(t)).next,0===e){if(Object(n)!==n)return;l=!1}else for(;!(l=(i=o.call(n)).done)&&(a.push(i.value),a.length!==e);l=!0);}catch(t){c=!0,r=t}finally{try{if(!l&&null!=n.return&&(s=n.return(),Object(s)!==s))return}finally{if(c)throw r}}return a}}(t,e)||y(t,e)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}
/*!
* @kurkle/color v0.3.2
* https://github.com/kurkle/color#readme
* (c) 2023 Jukka Kurkela
* Released under the MIT License
*/()}function g(t){return function(t){if(Array.isArray(t))return _(t)}(t)||function(t){if("undefined"!=typeof Symbol&&null!=t[Symbol.iterator]||null!=t["@@iterator"])return Array.from(t)}(t)||y(t)||function(){throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function y(t,e){if(t){if("string"==typeof t)return _(t,e);var n=Object.prototype.toString.call(t).slice(8,-1);return"Object"===n&&t.constructor&&(n=t.constructor.name),"Map"===n||"Set"===n?Array.from(t):"Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?_(t,e):void 0}}function _(t,e){(null==e||e>t.length)&&(e=t.length);for(var n=0,i=new Array(e);n<e;n++)i[n]=t[n];return i}function v(t){return t+.5|0}const x=(t,e,n)=>Math.max(Math.min(t,n),e);function b(t){return x(v(2.55*t),0,255)}function w(t){return x(v(255*t),0,255)}function k(t){return x(v(t/2.55)/100,0,1)}function S(t){return x(v(100*t),0,100)}const C={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},M=[..."0123456789ABCDEF"],T=t=>M[15&t],E=t=>M[(240&t)>>4]+M[15&t],A=t=>(240&t)>>4==(15&t);function D(t){var e=(t=>A(t.r)&&A(t.g)&&A(t.b)&&A(t.a))(t)?T:E;return t?"#"+e(t.r)+e(t.g)+e(t.b)+((t,e)=>t<255?e(t):"")(t.a,e):void 0}const I=/^(hsla?|hwb|hsv)\(\s*([-+.e\d]+)(?:deg)?[\s,]+([-+.e\d]+)%[\s,]+([-+.e\d]+)%(?:[\s,]+([-+.e\d]+)(%)?)?\s*\)$/;function P(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 z(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 L(t,e,n){const i=P(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 F(t){const e=t.r/255,n=t.g/255,i=t.b/255,r=Math.max(e,n,i),o=Math.min(e,n,i),s=(r+o)/2;let a,l,c;return r!==o&&(c=r-o,l=s>.5?c/(2-r-o):c/(r+o),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,s]}function O(t,e,n,i){return(Array.isArray(e)?t(e[0],e[1],e[2]):t(e,n,i)).map(w)}function R(t,e,n){return O(P,t,e,n)}function $(t){return(t%360+360)%360}function B(t){const e=I.exec(t);let n,i=255;if(!e)return;e[5]!==n&&(i=e[6]?b(+e[5]):w(+e[5]));const r=$(+e[2]),o=+e[3]/100,s=+e[4]/100;return n="hwb"===e[1]?function(t,e,n){return O(L,t,e,n)}(r,o,s):"hsv"===e[1]?function(t,e,n){return O(z,t,e,n)}(r,o,s):R(r,o,s),{r:n[0],g:n[1],b:n[2],a:i}}const N={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"},V={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 j;function q(t){j||(j=function(){const t={},e=Object.keys(V),n=Object.keys(N);let i,r,o,s,a;for(i=0;i<e.length;i++){for(s=a=e[i],r=0;r<n.length;r++)o=n[r],a=a.replace(o,N[o]);o=parseInt(V[s],16),t[a]=[o>>16&255,o>>8&255,255&o]}return t}(),j.transparent=[0,0,0,0]);const e=j[t.toLowerCase()];return e&&{r:e[0],g:e[1],b:e[2],a:4===e.length?e[3]:255}}const U=/^rgba?\(\s*([-+.\d]+)(%)?[\s,]+([-+.e\d]+)(%)?[\s,]+([-+.e\d]+)(%)?(?:[\s,/]+([-+.e\d]+)(%)?)?\s*\)$/;const Z=t=>t<=.0031308?12.92*t:1.055*Math.pow(t,1/2.4)-.055,W=t=>t<=.04045?t/12.92:Math.pow((t+.055)/1.055,2.4);function H(t,e,n){if(t){let i=F(t);i[e]=Math.max(0,Math.min(i[e]+i[e]*n,0===e?360:1)),i=R(i),t.r=i[0],t.g=i[1],t.b=i[2]}}function G(t,e){return t?Object.assign(e||{},t):t}function X(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=w(t[3]))):(e=G(t,{r:0,g:0,b:0,a:1})).a=w(e.a),e}function Y(t){return"r"===t.charAt(0)?function(t){const e=U.exec(t);let n,i,r,o=255;if(e){if(e[7]!==n){const t=+e[7];o=e[8]?b(t):x(255*t,0,255)}return n=+e[1],i=+e[3],r=+e[5],n=255&(e[2]?b(n):x(n,0,255)),i=255&(e[4]?b(i):x(i,0,255)),r=255&(e[6]?b(r):x(r,0,255)),{r:n,g:i,b:r,a:o}}}(t):B(t)}class K{constructor(t){if(t instanceof K)return t;const e=typeof t;let n;var i,r,o;"object"===e?n=X(t):"string"===e&&(o=(i=t).length,"#"===i[0]&&(4===o||5===o?r={r:255&17*C[i[1]],g:255&17*C[i[2]],b:255&17*C[i[3]],a:5===o?17*C[i[4]]:255}:7!==o&&9!==o||(r={r:C[i[1]]<<4|C[i[2]],g:C[i[3]]<<4|C[i[4]],b:C[i[5]]<<4|C[i[6]],a:9===o?C[i[7]]<<4|C[i[8]]:255})),n=r||q(t)||Y(t)),this._rgb=n,this._valid=!!n}get valid(){return this._valid}get rgb(){var t=G(this._rgb);return t&&(t.a=k(t.a)),t}set rgb(t){this._rgb=X(t)}rgbString(){return this._valid?(t=this._rgb)&&(t.a<255?`rgba(${t.r}, ${t.g}, ${t.b}, ${k(t.a)})`:`rgb(${t.r}, ${t.g}, ${t.b})`):void 0;var t}hexString(){return this._valid?D(this._rgb):void 0}hslString(){return this._valid?function(t){if(!t)return;const e=F(t),n=e[0],i=S(e[1]),r=S(e[2]);return t.a<255?`hsla(${n}, ${i}%, ${r}%, ${k(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 o=e===r?.5:e,s=2*o-1,a=n.a-i.a,l=((s*a==-1?s:(s+a)/(1+s*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=o*n.a+(1-o)*i.a,this.rgb=n}return this}interpolate(t,e){return t&&(this._rgb=function(t,e,n){const i=W(k(t.r)),r=W(k(t.g)),o=W(k(t.b));return{r:w(Z(i+n*(W(k(e.r))-i))),g:w(Z(r+n*(W(k(e.g))-r))),b:w(Z(o+n*(W(k(e.b))-o))),a:t.a+n*(e.a-t.a)}}(this._rgb,t._rgb,e)),this}clone(){return new K(this.rgb)}alpha(t){return this._rgb.a=w(t),this}clearer(t){return this._rgb.a*=1-t,this}greyscale(){const t=this._rgb,e=v(.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 H(this._rgb,2,t),this}darken(t){return H(this._rgb,2,-t),this}saturate(t){return H(this._rgb,1,t),this}desaturate(t){return H(this._rgb,1,-t),this}rotate(t){return function(t,e){var n=F(t);n[0]=$(n[0]+e),n=R(n),t.r=n[0],t.g=n[1],t.b=n[2]}(this._rgb,t),this}}
/*!
* Chart.js v4.4.2
* https://www.chartjs.org
* (c) 2024 Chart.js Contributors
* Released under the MIT License
*/function J(){}const Q=(()=>{let t=0;return()=>t++})();function tt(t){return null==t}function et(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 nt(t){return null!==t&&"[object Object]"===Object.prototype.toString.call(t)}function it(t){return("number"==typeof t||t instanceof Number)&&isFinite(+t)}function rt(t,e){return it(t)?t:e}function ot(t,e){return void 0===t?e:t}const st=(t,e)=>"string"==typeof t&&t.endsWith("%")?parseFloat(t)/100*e:+t;function at(t,e,n){if(t&&"function"==typeof t.call)return t.apply(n,e)}function lt(t,e,n,i){let r,o,s;if(et(t))for(o=t.length,r=0;r<o;r++)e.call(n,t[r],r);else if(nt(t))for(s=Object.keys(t),o=s.length,r=0;r<o;r++)e.call(n,t[s[r]],s[r])}function ct(t,e){let n,i,r,o;if(!t||!e||t.length!==e.length)return!1;for(n=0,i=t.length;n<i;++n)if(r=t[n],o=e[n],r.datasetIndex!==o.datasetIndex||r.index!==o.index)return!1;return!0}function ut(t){if(et(t))return t.map(ut);if(nt(t)){const e=Object.create(null),n=Object.keys(t),i=n.length;let r=0;for(;r<i;++r)e[n[r]]=ut(t[n[r]]);return e}return t}function ht(t){return-1===["__proto__","prototype","constructor"].indexOf(t)}function dt(t,e,n,i){if(!ht(t))return;const r=e[t],o=n[t];nt(r)&&nt(o)?ft(r,o,i):e[t]=ut(o)}function ft(t,e,n){const i=et(e)?e:[e],r=i.length;if(!nt(t))return t;const o=(n=n||{}).merger||dt;let s;for(let e=0;e<r;++e){if(s=i[e],!nt(s))continue;const r=Object.keys(s);for(let e=0,i=r.length;e<i;++e)o(r[e],t,s,n)}return t}function pt(t,e){return ft(t,e,{merger:mt})}function mt(t,e,n){if(!ht(t))return;const i=e[t],r=n[t];nt(i)&&nt(r)?pt(i,r):Object.prototype.hasOwnProperty.call(e,t)||(e[t]=ut(r))}const gt={"":t=>t,x:t=>t.x,y:t=>t.y};function yt(t,e){const n=gt[e]||(gt[e]=function(t){const e=function(t){const e=t.split("."),n=[];let i="";for(const t of e)i+=t,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 _t(t){return t.charAt(0).toUpperCase()+t.slice(1)}const vt=t=>void 0!==t,xt=t=>"function"==typeof t,bt=(t,e)=>{if(t.size!==e.size)return!1;for(const n of t)if(!e.has(n))return!1;return!0};const wt=Math.PI,kt=2*wt,St=kt+wt,Ct=Number.POSITIVE_INFINITY,Mt=wt/180,Tt=wt/2,Et=wt/4,At=2*wt/3,Dt=Math.log10,It=Math.sign;function Pt(t,e,n){return Math.abs(t-e)<n}function zt(t){const e=Math.round(t);t=Pt(t,e,t/1e3)?e:t;const n=Math.pow(10,Math.floor(Dt(t))),i=t/n;return(i<=1?1:i<=2?2:i<=5?5:10)*n}function Lt(t){return!isNaN(parseFloat(t))&&isFinite(t)}function Ft(t,e,n){let i,r,o;for(i=0,r=t.length;i<r;i++)o=t[i][n],isNaN(o)||(e.min=Math.min(e.min,o),e.max=Math.max(e.max,o))}function Ot(t){return t*(wt/180)}function Rt(t){return t*(180/wt)}function $t(t){if(!it(t))return;let e=1,n=0;for(;Math.round(t*e)/e!==t;)e*=10,n++;return n}function Bt(t,e){const n=e.x-t.x,i=e.y-t.y,r=Math.sqrt(n*n+i*i);let o=Math.atan2(i,n);return o<-.5*wt&&(o+=kt),{angle:o,distance:r}}function Nt(t,e){return Math.sqrt(Math.pow(e.x-t.x,2)+Math.pow(e.y-t.y,2))}function Vt(t,e){return(t-e+St)%kt-wt}function jt(t){return(t%kt+kt)%kt}function qt(t,e,n,i){const r=jt(t),o=jt(e),s=jt(n),a=jt(o-r),l=jt(s-r),c=jt(r-o),u=jt(r-s);return r===o||r===s||i&&o===s||a>l&&c<u}function Ut(t,e,n){return Math.max(e,Math.min(n,t))}function Zt(t,e,n,i=1e-6){return t>=Math.min(e,n)-i&&t<=Math.max(e,n)+i}function Wt(t,e,n){n=n||(n=>t[n]<e);let i,r=t.length-1,o=0;for(;r-o>1;)i=o+r>>1,n(i)?o=i:r=i;return{lo:o,hi:r}}const Ht=(t,e,n,i)=>Wt(t,n,i?i=>{const r=t[i][e];return r<n||r===n&&t[i+1][e]===n}:i=>t[i][e]<n),Gt=(t,e,n)=>Wt(t,n,(i=>t[i][e]>=n));const Xt=["push","pop","shift","splice","unshift"];function Yt(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||(Xt.forEach((e=>{delete t[e]})),delete t._chartjs)}function Kt(t){const e=new Set(t);return e.size===t.length?t:Array.from(e)}const Jt="undefined"==typeof window?function(t){return t()}:window.requestAnimationFrame;function Qt(t,e){let n=[],i=!1;return function(...r){n=r,i||(i=!0,Jt.call(window,(()=>{i=!1,t.apply(e,n)})))}}const te=t=>"start"===t?"left":"end"===t?"right":"center",ee=(t,e,n)=>"start"===t?e:"end"===t?n:(e+n)/2;function ne(t,e,n){const i=e.length;let r=0,o=i;if(t._sorted){const{iScale:s,_parsed:a}=t,l=s.axis,{min:c,max:u,minDefined:h,maxDefined:d}=s.getUserBounds();h&&(r=Ut(Math.min(Ht(a,l,c).lo,n?i:Ht(e,l,s.getPixelForValue(c)).lo),0,i-1)),o=d?Ut(Math.max(Ht(a,s.axis,u,!0).hi+1,n?0:Ht(e,l,s.getPixelForValue(u),!0).hi+1),r,i)-r:i-r}return{start:r,count:o}}function ie(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 o=i.xmin!==e.min||i.xmax!==e.max||i.ymin!==n.min||i.ymax!==n.max;return Object.assign(i,r),o}const re=t=>0===t||1===t,oe=(t,e,n)=>-Math.pow(2,10*(t-=1))*Math.sin((t-e)*kt/n),se=(t,e,n)=>Math.pow(2,-10*t)*Math.sin((t-e)*kt/n)+1,ae={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*Tt),easeOutSine:t=>Math.sin(t*Tt),easeInOutSine:t=>-.5*(Math.cos(wt*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=>re(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=>re(t)?t:oe(t,.075,.3),easeOutElastic:t=>re(t)?t:se(t,.075,.3),easeInOutElastic(t){const e=.1125;return re(t)?t:t<.5?.5*oe(2*t,e,.45):.5+.5*se(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-ae.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*ae.easeInBounce(2*t):.5*ae.easeOutBounce(2*t-1)+.5};function le(t){if(t&&"object"==typeof t){const e=t.toString();return"[object CanvasPattern]"===e||"[object CanvasGradient]"===e}return!1}function ce(t){return le(t)?t:new K(t)}function ue(t){return le(t)?t:new K(t).saturate(.5).darken(.1).hexString()}const he=["x","y","borderWidth","radius","tension"],de=["color","borderColor","backgroundColor"];const fe=new Map;function pe(t,e,n){return function(t,e){e=e||{};const n=t+JSON.stringify(e);let i=fe.get(n);return i||(i=new Intl.NumberFormat(t,e),fe.set(n,i)),i}(e,n).format(t)}const me={values:t=>et(t)?t:""+t,numeric(t,e,n){if(0===t)return"0";const i=this.chart.options.locale;let r,o=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"),o=function(t,e){let n=e.length>3?e[2].value-e[1].value:e[1].value-e[0].value;Math.abs(n)>=1&&t!==Math.floor(t)&&(n=t-Math.floor(t));return n}(t,n)}const s=Dt(Math.abs(o)),a=isNaN(s)?1:Math.max(Math.min(-1*Math.floor(s),20),0),l={notation:r,minimumFractionDigits:a,maximumFractionDigits:a};return Object.assign(l,this.options.ticks.format),pe(t,i,l)},logarithmic(t,e,n){if(0===t)return"0";const i=n[e].significand||t/Math.pow(10,Math.floor(Dt(t)));return[1,2,3,5,10,15].includes(i)||e>.8*n.length?me.numeric.call(this,t,e,n):""}};var ge={formatters:me};const ye=Object.create(null),_e=Object.create(null);function ve(t,e){if(!e)return t;const n=e.split(".");for(let e=0,i=n.length;e<i;++e){const i=n[e];t=t[i]||(t[i]=Object.create(null))}return t}function xe(t,e,n){return"string"==typeof e?ft(ve(t,e),n):ft(ve(t,""),e)}class be{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)=>ue(e.backgroundColor),this.hoverBorderColor=(t,e)=>ue(e.borderColor),this.hoverColor=(t,e)=>ue(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 xe(this,t,e)}get(t){return ve(this,t)}describe(t,e){return xe(_e,t,e)}override(t,e){return xe(ye,t,e)}route(t,e,n,i){const r=ve(this,t),o=ve(this,n),s="_"+e;Object.defineProperties(r,{[s]:{value:r[e],writable:!0},[e]:{enumerable:!0,get(){const t=this[s],e=o[i];return nt(t)?Object.assign({},e,t):ot(t,e)},set(t){this[s]=t}}})}apply(t){t.forEach((t=>t(this)))}}var we=new be({_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:de},numbers:{type:"number",properties:he}}),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",clip:!0,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:ge.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 ke(t,e,n,i,r){let o=e[r];return o||(o=e[r]=t.measureText(r).width,n.push(r)),o>i&&(i=o),i}function Se(t,e,n,i){let r=(i=i||{}).data=i.data||{},o=i.garbageCollect=i.garbageCollect||[];i.font!==e&&(r=i.data={},o=i.garbageCollect=[],i.font=e),t.save(),t.font=e;let s=0;const a=n.length;let l,c,u,h,d;for(l=0;l<a;l++)if(h=n[l],null==h||et(h)){if(et(h))for(c=0,u=h.length;c<u;c++)d=h[c],null==d||et(d)||(s=ke(t,r,o,s,d))}else s=ke(t,r,o,s,h);t.restore();const f=o.length/2;if(f>n.length){for(l=0;l<f;l++)delete r[o[l]];o.splice(0,f)}return s}function Ce(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 Me(t,e){(e=e||t.getContext("2d")).save(),e.resetTransform(),e.clearRect(0,0,t.width,t.height),e.restore()}function Te(t,e,n,i){Ee(t,e,n,i,null)}function Ee(t,e,n,i,r){let o,s,a,l,c,u,h,d;const f=e.pointStyle,p=e.rotation,m=e.radius;let g=(p||0)*Mt;if(f&&"object"==typeof f&&(o=f.toString(),"[object HTMLImageElement]"===o||"[object HTMLCanvasElement]"===o))return t.save(),t.translate(n,i),t.rotate(g),t.drawImage(f,-f.width/2,-f.height/2,f.width,f.height),void t.restore();if(!(isNaN(m)||m<=0)){switch(t.beginPath(),f){default:r?t.ellipse(n,i,r/2,m,0,0,kt):t.arc(n,i,m,0,kt),t.closePath();break;case"triangle":u=r?r/2:m,t.moveTo(n+Math.sin(g)*u,i-Math.cos(g)*m),g+=At,t.lineTo(n+Math.sin(g)*u,i-Math.cos(g)*m),g+=At,t.lineTo(n+Math.sin(g)*u,i-Math.cos(g)*m),t.closePath();break;case"rectRounded":c=.516*m,l=m-c,s=Math.cos(g+Et)*l,h=Math.cos(g+Et)*(r?r/2-c:l),a=Math.sin(g+Et)*l,d=Math.sin(g+Et)*(r?r/2-c:l),t.arc(n-h,i-a,c,g-wt,g-Tt),t.arc(n+d,i-s,c,g-Tt,g),t.arc(n+h,i+a,c,g,g+Tt),t.arc(n-d,i+s,c,g+Tt,g+wt),t.closePath();break;case"rect":if(!p){l=Math.SQRT1_2*m,u=r?r/2:l,t.rect(n-u,i-l,2*u,2*l);break}g+=Et;case"rectRot":h=Math.cos(g)*(r?r/2:m),s=Math.cos(g)*m,a=Math.sin(g)*m,d=Math.sin(g)*(r?r/2:m),t.moveTo(n-h,i-a),t.lineTo(n+d,i-s),t.lineTo(n+h,i+a),t.lineTo(n-d,i+s),t.closePath();break;case"crossRot":g+=Et;case"cross":h=Math.cos(g)*(r?r/2:m),s=Math.cos(g)*m,a=Math.sin(g)*m,d=Math.sin(g)*(r?r/2:m),t.moveTo(n-h,i-a),t.lineTo(n+h,i+a),t.moveTo(n+d,i-s),t.lineTo(n-d,i+s);break;case"star":h=Math.cos(g)*(r?r/2:m),s=Math.cos(g)*m,a=Math.sin(g)*m,d=Math.sin(g)*(r?r/2:m),t.moveTo(n-h,i-a),t.lineTo(n+h,i+a),t.moveTo(n+d,i-s),t.lineTo(n-d,i+s),g+=Et,h=Math.cos(g)*(r?r/2:m),s=Math.cos(g)*m,a=Math.sin(g)*m,d=Math.sin(g)*(r?r/2:m),t.moveTo(n-h,i-a),t.lineTo(n+h,i+a),t.moveTo(n+d,i-s),t.lineTo(n-d,i+s);break;case"line":s=r?r/2:Math.cos(g)*m,a=Math.sin(g)*m,t.moveTo(n-s,i-a),t.lineTo(n+s,i+a);break;case"dash":t.moveTo(n,i),t.lineTo(n+Math.cos(g)*(r?r/2:m),i+Math.sin(g)*m);break;case!1:t.closePath()}t.fill(),e.borderWidth>0&&t.stroke()}}function Ae(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 De(t,e){t.save(),t.beginPath(),t.rect(e.left,e.top,e.right-e.left,e.bottom-e.top),t.clip()}function Ie(t){t.restore()}function Pe(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 ze(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 Le(t,e,n,i,r){if(r.strikethrough||r.underline){const o=t.measureText(i),s=e-o.actualBoundingBoxLeft,a=e+o.actualBoundingBoxRight,l=n-o.actualBoundingBoxAscent,c=n+o.actualBoundingBoxDescent,u=r.strikethrough?(l+c)/2:c;t.strokeStyle=t.fillStyle,t.beginPath(),t.lineWidth=r.decorationWidth||2,t.moveTo(s,u),t.lineTo(a,u),t.stroke()}}function Fe(t,e){const n=t.fillStyle;t.fillStyle=e.color,t.fillRect(e.left,e.top,e.width,e.height),t.fillStyle=n}function Oe(t,e,n,i,r,o={}){const s=et(e)?e:[e],a=o.strokeWidth>0&&""!==o.strokeColor;let l,c;for(t.save(),t.font=r.string,function(t,e){e.translation&&t.translate(e.translation[0],e.translation[1]),tt(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,o),l=0;l<s.length;++l)c=s[l],o.backdrop&&Fe(t,o.backdrop),a&&(o.strokeColor&&(t.strokeStyle=o.strokeColor),tt(o.strokeWidth)||(t.lineWidth=o.strokeWidth),t.strokeText(c,n,i,o.maxWidth)),t.fillText(c,n,i,o.maxWidth),Le(t,n,i,c,o),i+=Number(r.lineHeight);t.restore()}function Re(t,e){const{x:n,y:i,w:r,h:o,radius:s}=e;t.arc(n+s.topLeft,i+s.topLeft,s.topLeft,1.5*wt,wt,!0),t.lineTo(n,i+o-s.bottomLeft),t.arc(n+s.bottomLeft,i+o-s.bottomLeft,s.bottomLeft,wt,Tt,!0),t.lineTo(n+r-s.bottomRight,i+o),t.arc(n+r-s.bottomRight,i+o-s.bottomRight,s.bottomRight,Tt,0,!0),t.lineTo(n+r,i+s.topRight),t.arc(n+r-s.topRight,i+s.topRight,s.topRight,0,-Tt,!0),t.lineTo(n+s.topLeft,i)}const $e=/^(normal|(\d+(?:\.\d+)?)(px|em|%)?)$/,Be=/^(normal|italic|initial|inherit|unset|(oblique( -?[0-9]?[0-9]deg)?))$/;function Ne(t,e){const n=(""+t).match($e);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 Ve=t=>+t||0;function je(t,e){const n={},i=nt(e),r=i?Object.keys(e):e,o=nt(t)?i?n=>ot(t[n],t[e[n]]):e=>t[e]:()=>t;for(const t of r)n[t]=Ve(o(t));return n}function qe(t){return je(t,{top:"y",right:"x",bottom:"y",left:"x"})}function Ue(t){return je(t,["topLeft","topRight","bottomLeft","bottomRight"])}function Ze(t){const e=qe(t);return e.width=e.left+e.right,e.height=e.top+e.bottom,e}function We(t,e){t=t||{},e=e||we.font;let n=ot(t.size,e.size);"string"==typeof n&&(n=parseInt(n,10));let i=ot(t.style,e.style);i&&!(""+i).match(Be)&&(console.warn('Invalid font style specified: "'+i+'"'),i=void 0);const r={family:ot(t.family,e.family),lineHeight:Ne(ot(t.lineHeight,e.lineHeight),n),size:n,style:i,weight:ot(t.weight,e.weight),string:""};return r.string=function(t){return!t||tt(t.size)||tt(t.family)?null:(t.style?t.style+" ":"")+(t.weight?t.weight+" ":"")+t.size+"px "+t.family}(r),r}function He(t,e,n,i){let r,o,s;for(r=0,o=t.length;r<o;++r)if(s=t[r],void 0!==s&&(void 0!==e&&"function"==typeof s&&(s=s(e)),void 0!==n&&et(s)&&(s=s[n%s.length]),void 0!==s))return s}function Ge(t,e){return Object.assign(Object.create(t),e)}function Xe(t,e=[""],n,i,r=(()=>t[0])){const o=n||t;void 0===i&&(i=an("_fallback",t));const s={[Symbol.toStringTag]:"Object",_cacheable:!0,_scopes:t,_rootScopes:o,_fallback:i,_getTarget:r,override:n=>Xe([n,...t],e,o,i)};return new Proxy(s,{deleteProperty:(e,n)=>(delete e[n],delete e._keys,delete t[0][n],!0),get:(n,i)=>tn(n,i,(()=>function(t,e,n,i){let r;for(const o of e)if(r=an(Je(o,t),n),void 0!==r)return Qe(t,r)?on(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)=>ln(t).includes(e),ownKeys:t=>ln(t),set(t,e,n){const i=t._storage||(t._storage=r());return t[e]=i[e]=n,delete t._keys,!0}})}function Ye(t,e,n,i){const r={_cacheable:!1,_proxy:t,_context:e,_subProxy:n,_stack:new Set,_descriptors:Ke(t,i),setContext:e=>Ye(t,e,n,i),override:r=>Ye(t.override(r),e,n,i)};return new Proxy(r,{deleteProperty:(e,n)=>(delete e[n],delete t[n],!0),get:(t,e,n)=>tn(t,e,(()=>function(t,e,n){const{_proxy:i,_context:r,_subProxy:o,_descriptors:s}=t;let a=i[e];xt(a)&&s.isScriptable(e)&&(a=function(t,e,n,i){const{_proxy:r,_context:o,_subProxy:s,_stack:a}=n;if(a.has(t))throw new Error("Recursion detected: "+Array.from(a).join("->")+"->"+t);a.add(t);let l=e(o,s||i);a.delete(t),Qe(t,l)&&(l=on(r._scopes,r,t,l));return l}(e,a,t,n));et(a)&&a.length&&(a=function(t,e,n,i){const{_proxy:r,_context:o,_subProxy:s,_descriptors:a}=n;if(void 0!==o.index&&i(t))return e[o.index%e.length];if(nt(e[0])){const n=e,i=r._scopes.filter((t=>t!==n));e=[];for(const l of n){const n=on(i,r,t,l);e.push(Ye(n,o,s&&s[t],a))}}return e}(e,a,t,s.isIndexable));Qe(e,a)&&(a=Ye(a,r,o&&o[e],s));return 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 Ke(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:xt(n)?n:()=>n,isIndexable:xt(i)?i:()=>i}}const Je=(t,e)=>t?t+_t(e):e,Qe=(t,e)=>nt(e)&&"adapters"!==t&&(null===Object.getPrototypeOf(e)||e.constructor===Object);function tn(t,e,n){if(Object.prototype.hasOwnProperty.call(t,e))return t[e];const i=n();return t[e]=i,i}function en(t,e,n){return xt(t)?t(e,n):t}const nn=(t,e)=>!0===t?e:"string"==typeof t?yt(e,t):void 0;function rn(t,e,n,i,r){for(const o of e){const e=nn(n,o);if(e){t.add(e);const o=en(e._fallback,n,r);if(void 0!==o&&o!==n&&o!==i)return o}else if(!1===e&&void 0!==i&&n!==i)return null}return!1}function on(t,e,n,i){const r=e._rootScopes,o=en(e._fallback,n,i),s=[...t,...r],a=new Set;a.add(i);let l=sn(a,s,n,o||n,i);return null!==l&&((void 0===o||o===n||(l=sn(a,s,o,l,i),null!==l))&&Xe(Array.from(a),[""],r,o,(()=>function(t,e,n){const i=t._getTarget();e in i||(i[e]={});const r=i[e];if(et(r)&&nt(n))return n;return r||{}}(e,n,i))))}function sn(t,e,n,i,r){for(;n;)n=rn(t,e,n,i,r);return n}function an(t,e){for(const n of e){if(!n)continue;const e=n[t];if(void 0!==e)return e}}function ln(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 cn(t,e,n,i){const{iScale:r}=t,{key:o="r"}=this._parsing,s=new Array(i);let a,l,c,u;for(a=0,l=i;a<l;++a)c=a+n,u=e[c],s[a]={r:r.parse(yt(u,o),c)};return s}const un=Number.EPSILON||1e-14,hn=(t,e)=>e<t.length&&!t[e].skip&&t[e],dn=t=>"x"===t?"y":"x";function fn(t,e,n,i){const r=t.skip?e:t,o=e,s=n.skip?e:n,a=Nt(o,r),l=Nt(s,o);let c=a/(a+l),u=l/(a+l);c=isNaN(c)?0:c,u=isNaN(u)?0:u;const h=i*c,d=i*u;return{previous:{x:o.x-h*(s.x-r.x),y:o.y-h*(s.y-r.y)},next:{x:o.x+d*(s.x-r.x),y:o.y+d*(s.y-r.y)}}}function pn(t,e="x"){const n=dn(e),i=t.length,r=Array(i).fill(0),o=Array(i);let s,a,l,c=hn(t,0);for(s=0;s<i;++s)if(a=l,l=c,c=hn(t,s+1),l){if(c){const t=c[e]-l[e];r[s]=0!==t?(c[n]-l[n])/t:0}o[s]=a?c?It(r[s-1])!==It(r[s])?0:(r[s-1]+r[s])/2:r[s-1]:r[s]}!function(t,e,n){const i=t.length;let r,o,s,a,l,c=hn(t,0);for(let u=0;u<i-1;++u)l=c,c=hn(t,u+1),l&&c&&(Pt(e[u],0,un)?n[u]=n[u+1]=0:(r=n[u]/e[u],o=n[u+1]/e[u],a=Math.pow(r,2)+Math.pow(o,2),a<=9||(s=3/Math.sqrt(a),n[u]=r*s*e[u],n[u+1]=o*s*e[u])))}(t,r,o),function(t,e,n="x"){const i=dn(n),r=t.length;let o,s,a,l=hn(t,0);for(let c=0;c<r;++c){if(s=a,a=l,l=hn(t,c+1),!a)continue;const r=a[n],u=a[i];s&&(o=(r-s[n])/3,a[`cp1${n}`]=r-o,a[`cp1${i}`]=u-o*e[c]),l&&(o=(l[n]-r)/3,a[`cp2${n}`]=r+o,a[`cp2${i}`]=u+o*e[c])}}(t,o,e)}function mn(t,e,n){return Math.max(Math.min(t,n),e)}function gn(t,e,n,i,r){let o,s,a,l;if(e.spanGaps&&(t=t.filter((t=>!t.skip))),"monotone"===e.cubicInterpolationMode)pn(t,r);else{let n=i?t[t.length-1]:t[0];for(o=0,s=t.length;o<s;++o)a=t[o],l=fn(n,a,t[Math.min(o+1,s-(i?0:1))%s],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,o,s,a=Ae(t[0],e);for(n=0,i=t.length;n<i;++n)s=o,o=a,a=n<i-1&&Ae(t[n+1],e),o&&(r=t[n],s&&(r.cp1x=mn(r.cp1x,e.left,e.right),r.cp1y=mn(r.cp1y,e.top,e.bottom)),a&&(r.cp2x=mn(r.cp2x,e.left,e.right),r.cp2y=mn(r.cp2y,e.top,e.bottom)))}(t,n)}function yn(){return"undefined"!=typeof window&&"undefined"!=typeof document}function _n(t){let e=t.parentNode;return e&&"[object ShadowRoot]"===e.toString()&&(e=e.host),e}function vn(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 xn=t=>t.ownerDocument.defaultView.getComputedStyle(t,null);const bn=["top","right","bottom","left"];function wn(t,e,n){const i={};n=n?"-"+n:"";for(let r=0;r<4;r++){const o=bn[r];i[o]=parseFloat(t[e+"-"+o+n])||0}return i.width=i.left+i.right,i.height=i.top+i.bottom,i}const kn=(t,e,n)=>(t>0||e>0)&&(!n||!n.shadowRoot);function Sn(t,e){if("native"in t)return t;const{canvas:n,currentDevicePixelRatio:i}=e,r=xn(n),o="border-box"===r.boxSizing,s=wn(r,"padding"),a=wn(r,"border","width"),{x:l,y:c,box:u}=function(t,e){const n=t.touches,i=n&&n.length?n[0]:t,{offsetX:r,offsetY:o}=i;let s,a,l=!1;if(kn(r,o,t.target))s=r,a=o;else{const t=e.getBoundingClientRect();s=i.clientX-t.left,a=i.clientY-t.top,l=!0}return{x:s,y:a,box:l}}(t,n),h=s.left+(u&&a.left),d=s.top+(u&&a.top);let{width:f,height:p}=e;return o&&(f-=s.width+a.width,p-=s.height+a.height),{x:Math.round((l-h)/f*n.width/i),y:Math.round((c-d)/p*n.height/i)}}const Cn=t=>Math.round(10*t)/10;function Mn(t,e,n,i){const r=xn(t),o=wn(r,"margin"),s=vn(r.maxWidth,t,"clientWidth")||Ct,a=vn(r.maxHeight,t,"clientHeight")||Ct,l=function(t,e,n){let i,r;if(void 0===e||void 0===n){const o=_n(t);if(o){const t=o.getBoundingClientRect(),s=xn(o),a=wn(s,"border","width"),l=wn(s,"padding");e=t.width-l.width-a.width,n=t.height-l.height-a.height,i=vn(s.maxWidth,o,"clientWidth"),r=vn(s.maxHeight,o,"clientHeight")}else e=t.clientWidth,n=t.clientHeight}return{width:e,height:n,maxWidth:i||Ct,maxHeight:r||Ct}}(t,e,n);let{width:c,height:u}=l;if("content-box"===r.boxSizing){const t=wn(r,"border","width"),e=wn(r,"padding");c-=e.width+t.width,u-=e.height+t.height}c=Math.max(0,c-o.width),u=Math.max(0,i?c/i:u-o.height),c=Cn(Math.min(c,s,l.maxWidth)),u=Cn(Math.min(u,a,l.maxHeight)),c&&!u&&(u=Cn(c/2));return(void 0!==e||void 0!==n)&&i&&l.height&&u>l.height&&(u=l.height,c=Cn(Math.floor(u*i))),{width:c,height:u}}function Tn(t,e,n){const i=e||1,r=Math.floor(t.height*i),o=Math.floor(t.width*i);t.height=Math.floor(t.height),t.width=Math.floor(t.width);const s=t.canvas;return s.style&&(n||!s.style.height&&!s.style.width)&&(s.style.height=`${t.height}px`,s.style.width=`${t.width}px`),(t.currentDevicePixelRatio!==i||s.height!==r||s.width!==o)&&(t.currentDevicePixelRatio=i,s.height=r,s.width=o,t.ctx.setTransform(i,0,0,i,0,0),!0)}const En=function(){let t=!1;try{const e={get passive(){return t=!0,!1}};yn()&&(window.addEventListener("test",null,e),window.removeEventListener("test",null,e))}catch(t){}return t}();function An(t,e){const n=function(t,e){return xn(t).getPropertyValue(e)}(t,e),i=n&&n.match(/^(\d+)(\.\d+)?px$/);return i?+i[1]:void 0}function Dn(t,e,n,i){return{x:t.x+n*(e.x-t.x),y:t.y+n*(e.y-t.y)}}function In(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 Pn(t,e,n,i){const r={x:t.cp2x,y:t.cp2y},o={x:e.cp1x,y:e.cp1y},s=Dn(t,r,n),a=Dn(r,o,n),l=Dn(o,e,n),c=Dn(s,a,n),u=Dn(a,l,n);return Dn(c,u,n)}function zn(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 Ln(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 Fn(t,e){void 0!==e&&(delete t.prevTextDirection,t.canvas.style.setProperty("direction",e[0],e[1]))}function On(t){return"angle"===t?{between:qt,compare:Vt,normalize:jt}:{between:Zt,compare:(t,e)=>t-e,normalize:t=>t}}function Rn({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 $n(t,e,n){if(!n)return[t];const{property:i,start:r,end:o}=n,s=e.length,{compare:a,between:l,normalize:c}=On(i),{start:u,end:h,loop:d,style:f}=function(t,e,n){const{property:i,start:r,end:o}=n,{between:s,normalize:a}=On(i),l=e.length;let c,u,{start:h,end:d,loop:f}=t;if(f){for(h+=l,d+=l,c=0,u=l;c<u&&s(a(e[h%l][i]),r,o);++c)h--,d--;h%=l,d%=l}return d<h&&(d+=l),{start:h,end:d,loop:f,style:t.style}}(t,e,n),p=[];let m,g,y,_=!1,v=null;const x=()=>_||l(r,y,m)&&0!==a(r,y),b=()=>!_||0===a(o,m)||l(o,y,m);for(let t=u,n=u;t<=h;++t)g=e[t%s],g.skip||(m=c(g[i]),m!==y&&(_=l(m,r,o),null===v&&x()&&(v=0===a(m,r)?t:n),null!==v&&b()&&(p.push(Rn({start:v,end:t,loop:d,count:s,style:f})),v=null),n=t,y=m));return null!==v&&p.push(Rn({start:v,end:h,loop:d,count:s,style:f})),p}function Bn(t,e){const n=[],i=t.segments;for(let r=0;r<i.length;r++){const o=$n(i[r],t.points,e);o.length&&n.push(...o)}return n}function Nn(t,e,n,i){return i&&i.setContext&&n?function(t,e,n,i){const r=t._chart.getContext(),o=Vn(t.options),{_datasetIndex:s,options:{spanGaps:a}}=t,l=n.length,c=[];let u=o,h=e[0].start,d=h;function f(t,e,i,r){const o=a?-1:1;if(t!==e){for(t+=l;n[t%l].skip;)t-=o;for(;n[e%l].skip;)e+=o;t%l!=e%l&&(c.push({start:t%l,end:e%l,loop:i,style:r}),u=r,h=e%l)}}for(const t of e){h=a?h:t.start;let e,o=n[h%l];for(d=h+1;d<=t.end;d++){const a=n[d%l];e=Vn(i.setContext(Ge(r,{type:"segment",p0:o,p1:a,p0DataIndex:(d-1)%l,p1DataIndex:d%l,datasetIndex:s}))),jn(e,u)&&f(h,d-1,t.loop,u),o=a,u=e}h<d-1&&f(h,d-1,t.loop,u)}return c}(t,e,n,i):e}function Vn(t){return{backgroundColor:t.backgroundColor,borderCapStyle:t.borderCapStyle,borderDash:t.borderDash,borderDashOffset:t.borderDashOffset,borderJoinStyle:t.borderJoinStyle,borderWidth:t.borderWidth,borderColor:t.borderColor}}function jn(t,e){if(!e)return!1;const n=[],i=function(t,e){return le(e)?(n.includes(e)||n.push(e),n.indexOf(e)):e};return JSON.stringify(t,i)!==JSON.stringify(e,i)}
/*!
* Chart.js v4.4.2
* https://www.chartjs.org
* (c) 2024 Chart.js Contributors
* Released under the MIT License
*/class qn{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],o=e.duration;r.forEach((i=>i({chart:t,initial:e.initial,numSteps:o,currentStep:Math.min(n-e.start,o)})))}_refresh(){this._request||(this._running=!0,this._request=Jt.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 o,s=r.length-1,a=!1;for(;s>=0;--s)o=r[s],o._active?(o._total>n.duration&&(n.duration=o._total),o.tick(t),a=!0):(r[s]=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 Un=new qn;const Zn="transparent",Wn={boolean:(t,e,n)=>n>.5?e:t,color(t,e,n){const i=ce(t||Zn),r=i.valid&&ce(e||Zn);return r&&r.valid?r.mix(i,n).hexString():e},number:(t,e,n)=>t+(e-t)*n};class Hn{constructor(t,e,n,i){const r=e[n];i=He([t.to,i,r,t.from]);const o=He([t.from,r,i]);this._active=!0,this._fn=t.fn||Wn[t.type||typeof o],this._easing=ae[t.easing]||ae.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=o,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,o=this._duration-r;this._start=n,this._duration=Math.floor(Math.max(o,t.duration)),this._total+=r,this._loop=!!t.loop,this._to=He([t.to,e,i,t.from]),this._from=He([t.from,i,e])}}cancel(){this._active&&(this.tick(Date.now()),this._active=!1,this._notify(!1))}