"u")throw"'"+m.transport+"' is not a recognized auth transport";return function(p,g){var v=lu(p,m);ft.getAuthorizers()[m.transport](ft,v,m,T.UserAuthentication,g)}},Se=Ca,Ms=function(m,p){var g="socket_id="+encodeURIComponent(m.socketId);g+="&channel_name="+encodeURIComponent(m.channelName);for(var v in p.params)g+="&"+encodeURIComponent(v)+"="+encodeURIComponent(p.params[v]);if(p.paramsProvider!=null){var w=p.paramsProvider();for(var v in w)g+="&"+encodeURIComponent(v)+"="+encodeURIComponent(w[v])}return g},Ii=function(m){if(typeof ft.getAuthorizers()[m.transport]>"u")throw"'"+m.transport+"' is not a recognized auth transport";return function(p,g){var v=Ms(p,m);ft.getAuthorizers()[m.transport](ft,v,m,T.ChannelAuthorization,g)}},Aa=Ii,ka=function(m,p,g){var v={authTransport:p.transport,authEndpoint:p.endpoint,auth:{params:p.params,headers:p.headers}};return function(w,O){var F=m.channel(w.channelName),U=g(F,v);U.authorize(w.socketId,O)}},fi=function(){return fi=Object.assign||function(m){for(var p,g=1,v=arguments.length;gn,x:n=>n.x,y:n=>n.y};function iA(n){const t=n.split("."),e=[];let i="";for(const r of t)i+=r,i.endsWith("\\")?i=i.slice(0,-1)+".":(e.push(i),i="");return e}function rA(n){const t=iA(n);return e=>{for(const i of t){if(i==="")break;e=e&&e[i]}return e}}function Ai(n,t){return(Rg[t]||(Rg[t]=rA(t)))(n)}function Rf(n){return n.charAt(0).toUpperCase()+n.slice(1)}const Po=n=>typeof n<"u",ki=n=>typeof n=="function",Dg=(n,t)=>{if(n.size!==t.size)return!1;for(const e of n)if(!t.has(e))return!1;return!0};function sA(n){return n.type==="mouseup"||n.type==="click"||n.type==="contextmenu"}const At=Math.PI,Bt=2*At,oA=Bt+At,nl=Number.POSITIVE_INFINITY,aA=At/180,Gt=At/2,Ki=At/4,Lg=At*2/3,xi=Math.log10,Ln=Math.sign;function wo(n,t,e){return Math.abs(n-t)e&&l===0?0:l+u;return{min:a(i,-Math.abs(s)),max:a(r,s)}}function Pi(n,t){return Object.assign(Object.create(n),t)}function Bf(n,t=[""],e,i,r=()=>n[0]){const s=e||n;typeof i>"u"&&(i=ub("_fallback",n));const a={[Symbol.toStringTag]:"Object",_cacheable:!0,_scopes:n,_rootScopes:s,_fallback:i,_getTarget:r,override:l=>Bf([l,...n],t,s,i)};return new Proxy(a,{deleteProperty(l,u){return delete l[u],delete l._keys,delete n[0][u],!0},get(l,u){return cb(l,u,()=>qA(u,t,n,l))},getOwnPropertyDescriptor(l,u){return Reflect.getOwnPropertyDescriptor(l._scopes[0],u)},getPrototypeOf(){return Reflect.getPrototypeOf(n[0])},has(l,u){return Vg(l).includes(u)},ownKeys(l){return Vg(l)},set(l,u,h){const d=l._storage||(l._storage=r());return l[u]=d[u]=h,delete l._keys,!0}})}function Yr(n,t,e,i){const r={_cacheable:!1,_proxy:n,_context:t,_subProxy:e,_stack:new Set,_descriptors:ab(n,i),setContext:s=>Yr(n,s,e,i),override:s=>Yr(n.override(s),t,e,i)};return new Proxy(r,{deleteProperty(s,a){return delete s[a],delete n[a],!0},get(s,a,l){return cb(s,a,()=>HA(s,a,l))},getOwnPropertyDescriptor(s,a){return s._descriptors.allKeys?Reflect.has(n,a)?{enumerable:!0,configurable:!0}:void 0:Reflect.getOwnPropertyDescriptor(n,a)},getPrototypeOf(){return Reflect.getPrototypeOf(n)},has(s,a){return Reflect.has(n,a)},ownKeys(){return Reflect.ownKeys(n)},set(s,a,l){return n[a]=l,delete s[a],!0}})}function ab(n,t={scriptable:!0,indexable:!0}){const{_scriptable:e=t.scriptable,_indexable:i=t.indexable,_allKeys:r=t.allKeys}=n;return{allKeys:r,scriptable:e,indexable:i,isScriptable:ki(e)?e:()=>e,isIndexable:ki(i)?i:()=>i}}const BA=(n,t)=>n?n+Rf(t):t,Hf=(n,t)=>xt(t)&&n!=="adapters"&&(Object.getPrototypeOf(t)===null||t.constructor===Object);function cb(n,t,e){if(Object.prototype.hasOwnProperty.call(n,t)||t==="constructor")return n[t];const i=e();return n[t]=i,i}function HA(n,t,e){const{_proxy:i,_context:r,_subProxy:s,_descriptors:a}=n;let l=i[t];return ki(l)&&a.isScriptable(t)&&(l=zA(t,l,n,e)),jt(l)&&l.length&&(l=WA(t,l,n,a.isIndexable)),Hf(t,l)&&(l=Yr(l,r,s&&s[t],a)),l}function zA(n,t,e,i){const{_proxy:r,_context:s,_subProxy:a,_stack:l}=e;if(l.has(n))throw new Error("Recursion detected: "+Array.from(l).join("->")+"->"+n);l.add(n);let u=t(s,a||i);return l.delete(n),Hf(n,u)&&(u=zf(r._scopes,r,n,u)),u}function WA(n,t,e,i){const{_proxy:r,_context:s,_subProxy:a,_descriptors:l}=e;if(typeof s.index<"u"&&i(n))return t[s.index%t.length];if(xt(t[0])){const u=t,h=r._scopes.filter(d=>d!==u);t=[];for(const d of u){const b=zf(h,r,n,d);t.push(Yr(b,s,a&&a[n],l))}}return t}function lb(n,t,e){return ki(n)?n(t,e):n}const jA=(n,t)=>n===!0?t:typeof n=="string"?Ai(t,n):void 0;function UA(n,t,e,i,r){for(const s of t){const a=jA(e,s);if(a){n.add(a);const l=lb(a._fallback,e,r);if(typeof l<"u"&&l!==e&&l!==i)return l}else if(a===!1&&typeof i<"u"&&e!==i)return null}return!1}function zf(n,t,e,i){const r=t._rootScopes,s=lb(t._fallback,e,i),a=[...n,...r],l=new Set;l.add(i);let u=Ug(l,a,e,s||e,i);return u===null||typeof s<"u"&&s!==e&&(u=Ug(l,a,s,u,i),u===null)?!1:Bf(Array.from(l),[""],r,s,()=>VA(t,e,i))}function Ug(n,t,e,i,r){for(;e;)e=UA(n,t,e,i,r);return e}function VA(n,t,e){const i=n._getTarget();t in i||(i[t]={});const r=i[t];return jt(r)&&xt(e)?e:r||{}}function qA(n,t,e,i){let r;for(const s of t)if(r=ub(BA(s,n),e),typeof r<"u")return Hf(n,r)?zf(e,i,n,r):r}function ub(n,t){for(const e of t){if(!e)continue;const i=e[n];if(typeof i<"u")return i}}function Vg(n){let t=n._keys;return t||(t=n._keys=$A(n._scopes)),t}function $A(n){const t=new Set;for(const e of n)for(const i of Object.keys(e).filter(r=>!r.startsWith("_")))t.add(i);return Array.from(t)}function hb(n,t,e,i){const{iScale:r}=n,{key:s="r"}=this._parsing,a=new Array(i);let l,u,h,d;for(l=0,u=i;lt=0&&t0?r[n-1]:null,l=nt!=="spacing",_indexable:t=>t!=="spacing"&&!t.startsWith("borderDash")&&!t.startsWith("hoverBorderDash")}),Z(rr,"overrides",{aspectRatio:1,plugins:{legend:{labels:{generateLabels(t){const e=t.data;if(e.labels.length&&e.datasets.length){const{labels:{pointStyle:i,color:r}}=t.legend.options;return e.labels.map((s,a)=>{const u=t.getDatasetMeta(0).controller.getStyle(a);return{text:s,fillStyle:u.backgroundColor,strokeStyle:u.borderColor,fontColor:r,lineWidth:u.borderWidth,pointStyle:i,hidden:!t.getDataVisibility(a),index:a}})}return[]}},onClick(t,e,i){i.chart.toggleDataVisibility(e.index),i.chart.update()}}}});class Wc extends vn{initialize(){this.enableOptionSharing=!0,this.supportsDecimation=!0,super.initialize()}update(t){const e=this._cachedMeta,{dataset:i,data:r=[],_dataset:s}=e,a=this.chart._animationsDisabled;let{start:l,count:u}=nb(e,r,a);this._drawStart=l,this._drawCount=u,ib(e)&&(l=0,u=r.length),i._chart=this.chart,i._datasetIndex=this.index,i._decimated=!!s._decimated,i.points=r;const h=this.resolveDatasetElementOptions(t);this.options.showLine||(h.borderWidth=0),h.segment=this.options.segment,this.updateElement(i,void 0,{animated:!a,options:h},t),this.updateElements(r,l,u,t)}updateElements(t,e,i,r){const s=r==="reset",{iScale:a,vScale:l,_stacked:u,_dataset:h}=this._cachedMeta,{sharedOptions:d,includeOptions:b}=this._getSharedOptions(e,r),_=a.axis,x=l.axis,{spanGaps:S,segment:C}=this.options,T=Xr(S)?S:Number.POSITIVE_INFINITY,P=this.chart._animationsDisabled||s||r==="none",R=e+i,B=t.length;let H=e>0&&this.getParsed(e-1);for(let D=0;D=R){N.skip=!0;continue}const W=this.getParsed(D),V=_t(W[x]),X=N[_]=a.getPixelForValue(W[_],D),K=N[x]=s||V?l.getBasePixel():l.getPixelForValue(u?this.applyStack(l,W,u):W[x],D);N.skip=isNaN(X)||isNaN(K)||V,N.stop=D>0&&Math.abs(W[_]-H[_])>T,C&&(N.parsed=W,N.raw=h.data[D]),b&&(N.options=d||this.resolveDataElementOptions(D,L.active?"active":r)),P||this.updateElement(L,D,N,r),H=W}}getMaxOverflow(){const t=this._cachedMeta,e=t.dataset,i=e.options&&e.options.borderWidth||0,r=t.data||[];if(!r.length)return i;const s=r[0].size(this.resolveDataElementOptions(0)),a=r[r.length-1].size(this.resolveDataElementOptions(r.length-1));return Math.max(i,s,a)/2}draw(){const t=this._cachedMeta;t.dataset.updateControlPoints(this.chart.chartArea,t.iScale.axis),super.draw()}}Z(Wc,"id","line"),Z(Wc,"defaults",{datasetElementType:"line",dataElementType:"point",showLine:!0,spanGaps:!1}),Z(Wc,"overrides",{scales:{_index_:{type:"category"},_value_:{type:"linear"}}});class To extends vn{constructor(t,e){super(t,e),this.innerRadius=void 0,this.outerRadius=void 0}getLabelAndValue(t){const e=this._cachedMeta,i=this.chart,r=i.data.labels||[],s=Vo(e._parsed[t].r,i.options.locale);return{label:r[t]||"",value:s}}parseObjectData(t,e,i,r){return hb.bind(this)(t,e,i,r)}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((i,r)=>{const s=this.getParsed(r).r;!isNaN(s)&&this.chart.getDataVisibility(r)&&(s=At&&x===0&&d!=="miter"&&QE(n,t,C),s||(ol(n,t,e,i,C,r),n.stroke())}class po extends oi{constructor(e){super();Z(this,"circumference");Z(this,"endAngle");Z(this,"fullCircles");Z(this,"innerRadius");Z(this,"outerRadius");Z(this,"pixelMargin");Z(this,"startAngle");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,e&&Object.assign(this,e)}inRange(e,i,r){const s=this.getProps(["x","y"],r),{angle:a,distance:l}=Jv(s,{x:e,y:i}),{startAngle:u,endAngle:h,innerRadius:d,outerRadius:b,circumference:_}=this.getProps(["startAngle","endAngle","innerRadius","outerRadius","circumference"],r),x=(this.options.spacing+this.options.borderWidth)/2,S=dt(_,h-u),C=Mo(a,u,h)&&u!==h,T=S>=Bt||C,P=ni(l,d+x,b+x);return T&&P}getCenterPoint(e){const{x:i,y:r,startAngle:s,endAngle:a,innerRadius:l,outerRadius:u}=this.getProps(["x","y","startAngle","endAngle","innerRadius","outerRadius"],e),{offset:h,spacing:d}=this.options,b=(s+a)/2,_=(l+u+d+h)/2;return{x:i+Math.cos(b)*_,y:r+Math.sin(b)*_}}tooltipPosition(e){return this.getCenterPoint(e)}draw(e){const{options:i,circumference:r}=this,s=(i.offset||0)/4,a=(i.spacing||0)/2,l=i.circular;if(this.pixelMargin=i.borderAlign==="inner"?.33:0,this.fullCircles=r>Bt?Math.floor(r/Bt):0,r===0||this.innerRadius<0||this.outerRadius<0)return;e.save();const u=(this.startAngle+this.endAngle)/2;e.translate(Math.cos(u)*s,Math.sin(u)*s);const h=1-Math.sin(Math.min(At,r||0)),d=s*h;e.fillStyle=i.backgroundColor,e.strokeStyle=i.borderColor,iP(e,this,d,a,l),rP(e,this,d,a,l),e.restore()}}Z(po,"id","arc"),Z(po,"defaults",{borderAlign:"center",borderColor:"#fff",borderDash:[],borderDashOffset:0,borderJoinStyle:void 0,borderRadius:0,borderWidth:2,offset:0,spacing:0,angle:void 0,circular:!0,selfJoin:!1}),Z(po,"defaultRoutes",{backgroundColor:"backgroundColor"}),Z(po,"descriptors",{_scriptable:!0,_indexable:e=>e!=="borderDash"});function Mb(n,t,e=t){n.lineCap=dt(e.borderCapStyle,t.borderCapStyle),n.setLineDash(dt(e.borderDash,t.borderDash)),n.lineDashOffset=dt(e.borderDashOffset,t.borderDashOffset),n.lineJoin=dt(e.borderJoinStyle,t.borderJoinStyle),n.lineWidth=dt(e.borderWidth,t.borderWidth),n.strokeStyle=dt(e.borderColor,t.borderColor)}function sP(n,t,e){n.lineTo(e.x,e.y)}function oP(n){return n.stepped?kA:n.tension||n.cubicInterpolationMode==="monotone"?EA:sP}function Rb(n,t,e={}){const i=n.length,{start:r=0,end:s=i-1}=e,{start:a,end:l}=t,u=Math.max(r,a),h=Math.min(s,l),d=rl&&s>l;return{count:i,start:u,loop:t.loop,ilen:h(a+(h?l-H:H))%s,B=()=>{C!==T&&(n.lineTo(d,T),n.lineTo(d,C),n.lineTo(d,P))};for(u&&(x=r[R(0)],n.moveTo(x.x,x.y)),_=0;_<=l;++_){if(x=r[R(_)],x.skip)continue;const H=x.x,D=x.y,L=H|0;L===S?(DR!==0)?(t.beginPath(),t.fillStyle=s.multiKeyBackground,Ro(t,{x:C,y:S,w:h,h:u,radius:P}),t.fill(),t.stroke(),t.fillStyle=a.backgroundColor,t.beginPath(),Ro(t,{x:T,y:S+1,w:h-2,h:u-2,radius:P}),t.fill()):(t.fillStyle=s.multiKeyBackground,t.fillRect(C,S,h,u),t.strokeRect(C,S,h,u),t.fillStyle=a.backgroundColor,t.fillRect(T,S+1,h-2,u-2))}t.fillStyle=this.labelTextColors[i]}drawBody(t,e,i){const{body:r}=this,{bodySpacing:s,bodyAlign:a,displayColors:l,boxHeight:u,boxWidth:h,boxPadding:d}=i,b=re(i.bodyFont);let _=b.lineHeight,x=0;const S=Wr(i.rtl,this.x,this.width),C=function(W){e.fillText(W,S.x(t.x+x),t.y+_/2),t.y+=_+s},T=S.textAlign(a);let P,R,B,H,D,L,N;for(e.textAlign=a,e.textBaseline="middle",e.font=b.string,t.x=Pc(this,T,i),e.fillStyle=i.bodyColor,Dt(this.beforeBody,C),x=l&&T!=="right"?a==="center"?h/2+d:h+2+d:0,H=0,L=r.length;Ht.r&&(l=(i.end-t.r)/s,n.r=Math.max(n.r,t.r+l)),r.start+t.value))}initOffsets(t=[]){let e=0,i=0,r,s;this.options.offset&&t.length&&(r=this.getDecimalForValue(t[0]),t.length===1?e=1-r:e=(this.getDecimalForValue(t[1])-r)/2,s=this.getDecimalForValue(t[t.length-1]),t.length===1?i=s:i=(s-this.getDecimalForValue(t[t.length-2]))/2);const a=t.length<3?.5:.25;e=ae(e,0,a),i=ae(i,0,a),this._offsets={start:e,end:i,factor:1/(e+1+i)}}_generate(){const t=this._adapter,e=this.min,i=this.max,r=this.options,s=r.time,a=s.unit||Xm(s.minUnit,e,i,this._getLabelCapacity(e)),l=dt(r.ticks.stepSize,1),u=a==="week"?s.isoWeekday:!1,h=Xr(u)||u===!0,d={};let b=e,_,x;if(h&&(b=+t.startOf(b,"isoWeek",u)),b=+t.startOf(b,h?"day":a),t.diff(i,e,a)>1e5*l)throw new Error(e+" and "+i+" are too far apart with stepSize of "+l+" "+a);const S=r.ticks.source==="data"&&this.getDataTimestamps();for(_=b,x=0;_+C)}getLabelForValue(t){const e=this._adapter,i=this.options.time;return i.tooltipFormat?e.format(t,i.tooltipFormat):e.format(t,i.displayFormats.datetime)}format(t,e){const r=this.options.time.displayFormats,s=this._unit,a=e||r[s];return this._adapter.format(t,a)}_tickFormatFunction(t,e,i,r){const s=this.options,a=s.ticks.callback;if(a)return Nt(a,[t,e,i],this);const l=s.time.displayFormats,u=this._unit,h=this._majorUnit,d=u&&l[u],b=h&&l[h],_=i[e],x=h&&b&&_&&_.major;return this._adapter.format(t,r||(x?b:d))}generateTickLabels(t){let e,i,r;for(e=0,i=t.length;e0?l:1}getDataTimestamps(){let t=this._cache.data||[],e,i;if(t.length)return t;const r=this.getMatchingVisibleMetas();if(this._normalized&&r.length)return this._cache.data=r[0].controller.getAllParsedValues(this);for(e=0,i=r.length;e=n[i].pos&&t<=n[r].pos&&({lo:i,hi:r}=ii(n,"pos",t)),{pos:s,time:l}=n[i],{pos:a,time:u}=n[r]):(t>=n[i].time&&t<=n[r].time&&({lo:i,hi:r}=ii(n,"time",t)),{time:s,pos:l}=n[i],{time:a,pos:u}=n[r]);const h=a-s;return h?l+(u-l)*(t-s)/h:l}class df extends Io{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=Mc(e,this.min),this._tableRange=Mc(e,this.max)-this._minPos,super.initOffsets(t)}buildLookupTable(t){const{min:e,max:i}=this,r=[],s=[];let a,l,u,h,d;for(a=0,l=t.length;a