1 2!function(){try{var e="undefined"!=typeof window?window:"undefined"!=typeof global?global:"undefined"!=typeof globalThis?globalThis:"undefined"!=typeof self?self:{},n=(new e.Error).stack;n&&(e._sentryDebugIds=e._sentryDebugIds||{},e._sentryDebugIds[n]="46347378-d528-5bab-acf3-91571b07378b")}catch(e){}}(); 3import{a as xr,b as br}from"./chunk-57L2L2KE.js";import{b as Cr,c as Sr,d as Mr}from"./chunk-JPLGMUWX.js";import{a as yr,c as vr}from"./chunk-5DOXNI7X.js";import{a as _r}from"./chunk-QVJJMUBK.js";import{a as gr}from"./chunk-JAVMB36G.js";import"./chunk-6LNBE75W.js";import"./chunk-VPK6OXM7.js";import{a as wr,b as Pr}from"./chunk-CHLHHRME.js";import{a as Bs,b as mr}from"./chunk-XFUUM7S4.js";import"./chunk-CQ33QSNQ.js";import"./chunk-RIHVVWEY.js";import{a as pr}from"./chunk-7MPZYJHZ.js";import{a as fr}from"./chunk-2XU7TDDV.js";import{a as ur}from"./chunk-WCY25GHR.js";import"./chunk-LYWBHDNF.js";import{b as mi}from"./chunk-H3D2HL7Q.js";import{a as gi}from"./chunk-IP7HYHUR.js";import{A as nr,B as sr,C as or,D as ar,E as rr,F as lr,G as cr,H as Bt,I as xi,J as dr,K as wn,L as hr,a as Rt,b as _i,c as Fs,d as yn,e as vn,g as _t,h as zs,n as Be,o as Cn,p as Sn,q as er,r as ir}from"./chunk-RZCIXBDP.js";import"./chunk-6TEJOYNN.js";import{a as Kt}from"./chunk-BXEAVBW5.js";import"./chunk-VZCLJPEW.js";import"./chunk-P4U5MZI6.js";import"./chunk-6FL5NH35.js";import"./chunk-KYKGDHNG.js";import"./chunk-CGOHAIKO.js";import{a as tr}from"./chunk-J6TAHOQ5.js";import{C as Ra,Fb as pi,Gb as Xa,Gc as Ka,Hc as Zh,Ld as Ls,Md as _n,Nd as Rs,W as pn,X as mn,Xd as Ga,Y as gn,Yd as Qh,Zd as xn,_d as Za,be as bn,ce as Qa,db as Ya,eb as Kh,fb as qa,gb as Gh,l as Da,m as Ea,n as Ia,re as Ja,se as Jh,z as ui}from"./chunk-EHJF6UKK.js";import{J as za,K as Yh,M as Ba,N as qh,U as un,V as Wa,Y as $a,Z as Xh,ba as fn,ca as Ua,d as Aa,e as Hh,f as La,g as Wh,h as cn,i as Fa,j as Uh}from"./chunk-7XEC5R2G.js";import{c as Ms,d as Nh,k as ka,n as ln,o as Ta,r as Es}from"./chunk-OV4F6N7I.js";import{a as Is,c as $h}from"./chunk-J5NV6OCA.js";import"./chunk-PF63PJ47.js";import{Cb as dn,Db as ae,Eb as hn,Lb as Na,Rb as Va,Sb as Xt,Vb as ja,jc as Ha,vc as fi}from"./chunk-4MUTHA5V.js";import{D as hi,g as Pa,k as Ma,l as Oa,v as an,y as rn}from"./chunk-W7MJW6UT.js";import{$c as yt,Bb as qt,Ca as ga,Da as Zi,Ib as S,Ja as it,Jb as V,Ka as _a,La as Qi,Lc as z,Ma as xa,Nc as k,Rb as tn,Tc as nn,Ua as se,Uc as sn,V as pa,Va as B,Vc as on,Wa as N,Yc as Ts,Zb as ba,Zc as D,Zd as ot,_c as I,eb as Ji,ec as $,fb as st,fc as ya,fd as Sa,gd as nt,h as fa,hc as E,hd as As,ic as ze,jc as kt,lc as en,oc as q,od as Tt,pc as ks,pd as wa,qc as oe,qd as Lt,ra as Vh,rc as xt,sa as jh,sc as bt,tc as C,uc as w,ud as Ds,vc as T,wc as va,xa as Os,xc as Ca,ya as ma,zc as ht}from"./chunk-7RQO36LL.js";import"./chunk-IGDKMAHN.js";import"./chunk-2EFPAZRG.js";import"./chunk-XHJ7RZ2T.js";import"./chunk-DMQT3QOG.js";import"./chunk-43G5BLPL.js";import"./chunk-GCEDPD4V.js";import"./chunk-YUF7ANVY.js";import{a as Yt,b as Ki,j as Gi,l as ua,m as J}from"./chunk-7Q6MBNO6.js";Es();ot();var Or=(()=>{class e{static{this.ɵfac=function(n){return new(n||e)();};}static{this.ɵcmp=it({type:e,selectors:[["social-accounts-screen"]],standalone:!0,features:[nt],decls:9,vars:0,consts:[[1,"social-accounts-screen-component"],[1,"back-to-dashboard-button-container"],[1,"back-button-container"],["routerLink","/social-channels"],["src","/img/blue-left-arrow.svg","alt","Back to Channels"],[1,"back-text-container"],[1,"social-channels-accounts-container"]],template:function(n,s){n&1&&(C(0,"div",0)(1,"div",1)(2,"div",2)(3,"a",3),T(4,"img",4),w()(),C(5,"div",5),D(6,"Social Channels"),w()(),C(7,"div",6),T(8,"social-channels-accounts"),w()());},dependencies:[Ta,mr],styles:[".social-accounts-screen-component[_ngcontent-%COMP%]{width:100%;height:fit-content;margin:0 auto;display:flex;flex-direction:column;align-items:flex-start;justify-content:flex-start;padding-left:18px}.back-to-dashboard-button-container[_ngcontent-%COMP%]{margin:10px 0 0;display:flex;align-items:center}.back-button-container[_ngcontent-%COMP%]{background-color:#25365814;border-radius:10px;width:32px;height:32px;display:flex;justify-content:center;align-items:center;margin-right:10px}.back-button-container[_ngcontent-%COMP%] img[_ngcontent-%COMP%]{width:100%;height:100%;object-fit:contain}.back-text-container[_ngcontent-%COMP%]{color:#253658;font-size:20px;opacity:.3;font-family:Inter-ExtraBold}.social-channels-accounts-container[_ngcontent-%COMP%]{width:100%}@media (min-width: 501px) and (max-width: 768px){.back-text-container[_ngcontent-%COMP%]{display:none}}@media (max-width: 500px){.back-text-container[_ngcontent-%COMP%]{display:none}}"]});}}return e;})();Rs();Hh();Ia();ot();Es();hi();gn();var Pn=Gi(cn());fi();Ra();ot();var kr=()=>[0,1,2,3];function tu(e,i){e&1&&(C(0,"div",5),T(1,"span",4),w());}function eu(e,i){e&1&&(C(0,"div",1)(1,"div",3),T(2,"span",4),w(),xt(3,tu,2,0,"div",5,oe),C(5,"div",6),T(6,"span",4),w(),T(7,"div",7),w()),e&2&&(S(3),bt(As(0,kr)));}function iu(e,i){e&1&&(C(0,"div",13),T(1,"span",17),w());}function nu(e,i){e&1&&(C(0,"div",2)(1,"div",8),T(2,"span",9),C(3,"div",10),T(4,"span",11)(5,"span",12),w()(),xt(6,iu,2,0,"div",13,oe),C(8,"div",14),T(9,"span",15),w(),T(10,"div",16),w()),e&2&&(S(6),bt(As(0,kr)));}var Tr=(()=>{class e{constructor(){this.rowCount=5,this.bodyOnly=!1;}get rows(){return Array.from({length:this.rowCount},(t,n)=>n);}static{this.ɵfac=function(n){return new(n||e)();};}static{this.ɵcmp=it({type:e,selectors:[["social-posts-table-shimmer"]],inputs:{rowCount:"rowCount",bodyOnly:"bodyOnly"},standalone:!0,features:[nt],decls:4,vars:1,consts:[[1,"posts-shimmer"],[1,"posts-shimmer__header"],[1,"posts-shimmer__row"],[1,"posts-shimmer__head","posts-shimmer__col-post"],[1,"posts-shimmer__line","posts-shimmer__line--head"],[1,"posts-shimmer__head","posts-shimmer__col-num"],[1,"posts-shimmer__head","posts-shimmer__col-performance"],[1,"posts-shimmer__head","posts-shimmer__col-actions"],[1,"posts-shimmer__cell","posts-shimmer__col-post"],[1,"posts-shimmer__thumb"],[1,"posts-shimmer__body"],[1,"posts-shimmer__line","posts-shimmer__line--title"],[1,"posts-shimmer__line","posts-shimmer__line--meta"],[1,"posts-shimmer__cell","posts-shimmer__col-num"],[1,"posts-shimmer__cell","posts-shimmer__col-performance"],[1,"posts-shimmer__line","posts-shimmer__line--bar"],[1,"posts-shimmer__cell","posts-shimmer__col-actions"],[1,"posts-shimmer__line","posts-shimmer__line--num"]],template:function(n,s){n&1&&(C(0,"div",0),$(1,eu,8,1,"div",1),xt(2,nu,11,1,"div",2,oe),w()),n&2&&(S(),q(1,s.bodyOnly?-1:1),S(),bt(s.rows));},styles:["[_nghost-%COMP%]{display:block;width:100%}.posts-shimmer[_ngcontent-%COMP%]{display:flex;flex-direction:column;gap:4px;width:100%}.posts-shimmer__header[_ngcontent-%COMP%]{display:flex;align-items:center;padding:4px 0}.posts-shimmer__head[_ngcontent-%COMP%]{display:flex;align-items:center;padding:8px}.posts-shimmer__row[_ngcontent-%COMP%]{display:flex;align-items:stretch}.posts-shimmer__cell[_ngcontent-%COMP%]{display:flex;align-items:center;padding:12px 8px;background:#f9fafb}.posts-shimmer__col-post[_ngcontent-%COMP%]{flex:1 1 auto;min-width:0;gap:10px;padding:8px 12px}.posts-shimmer__col-num[_ngcontent-%COMP%]{flex:0 0 110px;padding-left:8px}.posts-shimmer__col-performance[_ngcontent-%COMP%]{flex:0 0 150px;padding-left:8px}.posts-shimmer__col-actions[_ngcontent-%COMP%]{flex:0 0 48px}.posts-shimmer__thumb[_ngcontent-%COMP%]{background:linear-gradient(105deg,#f1f1f1 25%,#e9e9e9,#f1f1f1 75%);background-size:200px 100%;animation:shimmer-sweep 2s infinite linear;flex:0 0 auto;width:48px;height:61px;border-radius:12px}.posts-shimmer__body[_ngcontent-%COMP%]{display:flex;flex-direction:column;gap:8px;flex:1 1 auto}.posts-shimmer__line[_ngcontent-%COMP%]{background:linear-gradient(105deg,#f1f1f1 25%,#e9e9e9,#f1f1f1 75%);background-size:200px 100%;animation:shimmer-sweep 2s infinite linear;border-radius:4px;display:block;height:12px}.posts-shimmer__line--head[_ngcontent-%COMP%]{width:60px;height:10px}.posts-shimmer__line--title[_ngcontent-%COMP%]{width:60%;height:14px}.posts-shimmer__line--meta[_ngcontent-%COMP%]{width:30%}
3.posts-shimmer__line--num[_ngcontent-%COMP%]{width:44px}.posts-shimmer__line--bar[_ngcontent-%COMP%]{width:100%;height:8px;border-radius:999px}"]});}}return e;})();ot();gn();var ou=(e,i)=>i.id;function au(e,i){e&1&&T(0,"social-posts-table-shimmer");}function ru(e,i){if(e&1){let t=ht();C(0,"div",1),T(1,"app-tracking-eyes"),C(2,"div",2)(3,"p",3),D(4),w(),C(5,"p",4),D(6),w()(),C(7,"lib-button",5),z("clicked",function(){B(t);let s=k();return N(s.openContentPlanner());}),D(8),w()();}if(e&2){let t=k();S(4),I(t.emptyTitle),S(2),I(t.emptySubtitle),S(2),I(t.emptyCta);}}function lu(e,i){e&1&&T(0,"span",20);}function cu(e,i){if(e&1){let t=ht();C(0,"img",33),z("error",function(s){B(t);let o=k(3);return N(o.onThumbError(s));}),w();}if(e&2){let t=k().$implicit,n=k(2);E("src",t.postImg||n.fallbackThumb,qt);}}function du(e,i){if(e&1&&(C(0,"span",24),T(1,"img",34),D(2),w()),e&2){let t=k().$implicit;S(),E("src",t.providerIcon,qt),S(),yt(" ",t.providerName," ");}}function hu(e,i){if(e&1&&T(0,"lib-badge",25),e&2){let t=k().$implicit,n=k(2);E("text",n.failedLabel)("matTooltip",t.errorMessage||null);}}function uu(e,i){if(e&1&&T(0,"lib-badge",26),e&2){let t=k(3);E("text",t.scheduledLabel);}}function fu(e,i){if(e&1&&T(0,"lib-badge",27),e&2){let t=i.$implicit,n=k(3);E("color",n.tagColors[t])("text",n.tagLabels[t]);}}function pu(e,i){if(e&1&&(C(0,"div",29)(1,"span"),D(2),w(),C(3,"span",35),D(4),w()()),e&2){let t=k().$implicit,n=k(2);S(2),I(n.scheduledDate(t)),S(2),I(n.scheduledIn(t));}}function mu(e,i){if(e&1&&D(0),e&2){let t=k().$implicit;yt(" ",t.createdAtLabel," ");}}function gu(e,i){if(e&1&&(C(0,"td",30),T(1,"app-progress-track",36),w()),e&2){let t,n=k().$implicit,s=k(2);S(),E("progress",(t=s.uploadProgress.get(n.id))!==null&&t!==void 0?t:0)("showPercent",!0);}}function _u(e,i){e&1&&D(0," - ");}function xu(e,i){e&1&&T(0,"span",38);}function bu(e,i){if(e&1&&(C(0,"div",39),T(1,"app-progress-track",36),C(2,"span",40),D(3),w()()),e&2){let t=k(2).$implicit,n=k(2);kt("posts-table__score--disabled",t.needsResync),E("matTooltip",t.needsResync?n.resyncTooltip(t):null),S(),E("progress",t.performance.score)("showPercent",!1),S(2),I(t.performance.score);}}function yu(e,i){if(e&1&&(C(0,"td",28),D(1),Tt(2,"longNumber"),w(),C(3,"td",28),D(4),Tt(5,"number"),w(),C(6,"td",37),$(7,_u,1,0)(8,xu,1,0)(9,bu,4,6),w()),e&2){let t=k().$implicit,n=k(2);S(),yt(" ",t.engagementTotal!==null?Lt(2,3,t.engagementTotal,1):"-"," "),S(3),yt(" ",t.engagementRate!==null?Lt(5,6,t.engagementRate,"1.0-2")+"%":"-"," "),S(3),q(7,t.isScheduled||t.performance.score===null?7:n.isLoading?8:9);}}function vu(e,i){if(e&1){let t=ht();C(0,"lib-dropdown",41),z("selectionChange",function(s){B(t);let o=k().$implicit,a=k(2);return N(a.onMenuSelect(o,s));}),w();}if(e&2){let t=k().$implicit,n=k(2);E("options",n.menuOptionsById.get(t.id))("iconOnly",!0)("showSelected",!1)("label",!1)("required",!1);}}function Cu(e,i){if(e&1){let t=ht();C(0,"tr",16),z("click",function(){let s=B(t).$implicit,o=k(2);return N(o.onRowClick(s));}),C(1,"td",17)(2,"div",18)(3,"div",19),$(4,lu,1,0,"span",20)(5,cu,1,1),w(),C(6,"div",21)(7,"span",22),D(8),w(),C(9,"div",23),$(10,du,3,2,"span",24)(11,hu,1,2,"lib-badge",25)(12,uu,1,1,"lib-badge",26),xt(13,fu,1,2,"lib-badge",27,oe),w()()()(),C(15,"td",28),$(16,pu,5,2,"div",29)(17,mu,1,1),w(),C(18,"td",28),D(19),Tt(20,"longNumber"),w(),$(21,gu,2,2,"td",30)(22,yu,10,9),C(23,"td",31),z("click",function(s){return B(t),N(s.stopPropagation());}),$(24,vu,1,5,"lib-dropdown",32),w()();}if(e&2){let t,n=i.$implicit,s=k(2);kt("posts-table__row--disabled",n.needsResync)("posts-table__row--link",n.postUrl),S(4),q(4,s.isUploading(n)?4:5),S(4),I(n.title),S(2),q(10,n.providerIcon?10:-1),S(),q(11,s.isFailed(n)?11:-1),S(),q(12,n.isScheduled?12:-1),S(),bt(n.performance.tags),S(3),q(16,n.isScheduled?16:17),S(3),yt(" ",n.views!==null?Lt(20,13,n.views,1):"-"," "),S(2),q(21,s.isUploading(n)?21:22),S(3),q(24,(t=s.menuOptionsById.get(n.id))!=null&&t.length?24:-1);}}function Su(e,i){e&1&&T(0,"social-posts-table-shimmer",15),e&2&&E("rowCount",2)("bodyOnly",!0);}function wu(e,i){if(e&1){let t=ht();C(0,"table",6)(1,"thead")(2,"tr")(3,"th",7),D(4),w(),C(5,"th",8)(6,"app-sortable-header",9),z("sort",function(s){B(t);let o=k();return N(o.onSort(s));}),D(7),w()(),C(8,"th",8)(9,"app-sortable-header",10),z("sort",function(s){B(t);let o=k();return N(o.onSort(s));}),D(10),w()(),C(11,"th",8)(12,"app-sortable-header",11),z("sort",function(s){B(t);let o=k();return N(o.onSort(s));}),D(13),w()(),C(14,"th",8),D(15),w(),C(16,"th",12),D(17),w(),T(18,"th",13),w()(),C(19,"tbody"),xt(20,Cu,25,16,"tr",14,ou),w()(),$(22,Su,1,2,"social-posts-table-shimmer",15);}if(e&2){let t=k();S(4),I(t.columns.post),S(2),E("activeColumn",t.sort.sb)("direction",t.sort.sd),S(),I(t.columns.date),S(2),E("activeColumn",t.sort.sb)("direction",t.sort.sd),S(),I(t.columns.views),S(2),E("activeColumn",t.sort.sb)("direction",t.sort.sd),S(),I(t.columns.engagement),S(2),I(t.columns.engagementRate),S(2),I(t.columns.performance),S(3),bt(t.posts),S(2),q(22,t.isLoading?22:-1);}}var Pu={[Bt.RECONNECT_CHANNEL]:"/img/icon-library/symbols/retry-reload.svg",[Bt.DELETE_FROM_ANALYTICS]:"/img/icon-library/basic-ui/delete-trash.svg",[Bt.DELETE_FROM_CHANNEL]:"/img/icon-library/basic-ui/delete-trash.svg",[Bt.DELETE_FROM_SCHEDULE]:"/img/icon-library/basic-ui/delete-trash.svg"},Ar=(()=>{class e{constructor(){this.posts=[],this.isLoading=!1,this.uploadProgress=new Map(),this.period=Rt.lastMonth,this.sort={sb:"createdAt",sd:"down"},this.sortChange=new st(),this.postAction=new st(),this.postOpen=new st(),this.fallbackThumb=sr,this.columns={post:"Post",date:"Date",views:"Views",engagement:"Engagement",engagementRate:"Eng. rate",performance:"Performance"},this.tagLabels={top:"TOP","needs-resync":"Needs re-sync"},this.tagColors={top:"success","needs-resync":"warning"},this.scheduledLabel="Scheduled",this.failedLabel="Failed",this.router=Zi(ln),this.emptyTitles={[Rt.lastWeek]:"No posts in the last 7 days",[Rt.lastMonth]:"No posts in the last 30 days",[Rt.lastThreeMonths]:"No posts in the last 3 months"},this.emptySubtitle="Plan your next post in the Content Planner and it will show up here once it's published.",this.emptyCta="Plan a post",this.menuOptionsById=new Map();}get emptyTitle(){return this.emptyTitles[this.period]??this.emptyTitles[Rt.lastMonth];}openContentPlanner(){this.router.navigate(["/content-planner"]);}
3ngOnChanges(t){t.posts&&(this.menuOptionsById=new Map((this.posts??[]).map(n=>[n.id,this.toDropdownOptions(n)])));}isFailed(t){return t.status===Be.failed;}isUploading(t){return t.status===Be.processing;}scheduledDate(t){return(0,Pn.default)(t.scheduledAt).format("MMM D, HH:mm");}scheduledIn(t){return(0,Pn.default)(t.scheduledAt).fromNow();}resyncTooltip(t){let n=(0,Pn.default)(t.lastSynced).format("MMM D, YYYY");return"Last synced "+n+". Re-sync to see current views.";}onSort(t){let n=t,s=this.sort.sb===n&&this.sort.sd==="down"?"up":"down";this.sortChange.emit({sb:n,sd:s});}onMenuSelect(t,n){n&&this.postAction.emit({post:t,option:new ui(n.value,n.name)});}onRowClick(t){t.postUrl&&this.postOpen.emit(t);}onThumbError(t){t.target.src=this.fallbackThumb;}toDropdownOptions(t){return(t.menuOptions??[]).map(n=>({value:n.value,name:n.name,sideIconClass:Pu[n.value]}));}static{this.ɵfac=function(n){return new(n||e)();};}static{this.ɵcmp=it({type:e,selectors:[["social-posts-table"]],inputs:{posts:"posts",isLoading:"isLoading",uploadProgress:"uploadProgress",period:"period",sort:"sort"},outputs:{sortChange:"sortChange",postAction:"postAction",postOpen:"postOpen"},standalone:!0,features:[se,nt],decls:4,vars:1,consts:[[1,"posts-table"],[1,"posts-table__empty"],[1,"posts-table__empty-text"],[1,"posts-table__empty-title"],[1,"posts-table__empty-subtitle"],["variant","primary","size","md",3,"clicked"],[1,"posts-table__table"],[1,"posts-table__col-post"],[1,"posts-table__col-num"],["column","createdAt",3,"sort","activeColumn","direction"],["column","views",3,"sort","activeColumn","direction"],["column","engagement",3,"sort","activeColumn","direction"],[1,"posts-table__col-performance"],[1,"posts-table__col-actions"],[1,"posts-table__row",3,"posts-table__row--disabled","posts-table__row--link"],[3,"rowCount","bodyOnly"],[1,"posts-table__row",3,"click"],[1,"posts-table__col-post","posts-table__cell","posts-table__cell--post"],[1,"posts-table__post"],[1,"posts-table__thumb"],["aria-hidden","true",1,"posts-table__spinner"],[1,"posts-table__post-body"],[1,"posts-table__title"],[1,"posts-table__meta"],[1,"posts-table__provider"],["size","small","shape","rounded","color","danger","matTooltipPosition","above","matTooltipClass","tooltip-custom-black-take",3,"text","matTooltip"],["size","small","shape","rounded","color","primary",3,"text"],["size","small","shape","rounded",3,"color","text"],[1,"posts-table__col-num","posts-table__cell"],[1,"posts-table__scheduled"],["colspan","3",1,"posts-table__cell","posts-table__cell--upload"],[1,"posts-table__col-actions","posts-table__cell",3,"click"],[3,"options","iconOnly","showSelected","label","required"],["alt","",3,"error","src"],["alt","",3,"src"],[1,"posts-table__scheduled-in"],[3,"progress","showPercent"],[1,"posts-table__col-performance","posts-table__cell"],[1,"posts-table__score-shimmer"],["matTooltipPosition","above","matTooltipClass","tooltip-custom-black",1,"posts-table__score",3,"matTooltip"],[1,"posts-table__score-value"],[3,"selectionChange","options","iconOnly","showSelected","label","required"]],template:function(n,s){n&1&&(C(0,"div",0),$(1,au,1,0,"social-posts-table-shimmer")(2,ru,9,3)(3,wu,23,13),w()),n&2&&(S(),q(1,s.isLoading&&s.posts.length===0?1:s.posts.length===0?2:3));},dependencies:[an,mn,pn,Kt,dn,ae,Xt,ur,_r,Tr,pr],styles:["[_nghost-%COMP%]{display:block;width:100%}.posts-table[_ngcontent-%COMP%]{width:100%;font-family:Inter,sans-serif}.posts-table__empty[_ngcontent-%COMP%]{display:flex;flex-direction:column;align-items:center;justify-content:center;gap:24px;width:100%;min-height:480px;padding:112px 0 128px}.posts-table__empty-text[_ngcontent-%COMP%]{margin-top:16px;display:flex;flex-direction:column;align-items:center;gap:6px;max-width:380px;text-align:center}.posts-table__empty-text[_ngcontent-%COMP%] p[_ngcontent-%COMP%]{margin:0}.posts-table__empty-title[_ngcontent-%COMP%]{font-size:18px;font-weight:500;line-height:1.4;color:#253658}.posts-table__empty-subtitle[_ngcontent-%COMP%]{font-size:14px;line-height:1.4;letter-spacing:-.14px;color:#6b7280}.posts-table__table[_ngcontent-%COMP%]{width:100%;table-layout:fixed;border-collapse:separate;border-spacing:0 4px;margin-top:-4px}.posts-table[_ngcontent-%COMP%] thead[_ngcontent-%COMP%] th[_ngcontent-%COMP%]{position:sticky;top:var(--posts-sticky-top, 0);z-index:2;text-align:left;padding:12px 8px 8px;font-size:12px;font-weight:500;line-height:1.4;letter-spacing:.12px;color:#9ca3af;background:#fff;white-space:nowrap}.posts-table__cell[_ngcontent-%COMP%]{overflow:hidden;text-overflow:ellipsis;padding:12px 8px;font-size:14px;font-weight:400;line-height:1.4;letter-spacing:-.14px;color:#4b5563;vertical-align:middle;background-color:#f9fafb;transition:background-color .15s ease;white-space:nowrap}.posts-table__cell--post[_ngcontent-%COMP%]{padding:8px 12px;white-space:normal}.posts-table__cell--upload[_ngcontent-%COMP%] app-progress-track[_ngcontent-%COMP%]{display:block}.posts-table__row--link[_ngcontent-%COMP%]{cursor:pointer}.posts-table__row[_ngcontent-%COMP%]:hover .posts-table__cell[_ngcontent-%COMP%]{background-color:#ebf2ff}.posts-table__row--disabled[_ngcontent-%COMP%] .posts-table__cell[_ngcontent-%COMP%], .posts-table__row--disabled[_ngcontent-%COMP%] .posts-table__title[_ngcontent-%COMP%]{color:#9ca3af}.posts-table__col-post[_ngcontent-%COMP%]{width:auto;min-width:0}.posts-table__col-num[_ngcontent-%COMP%]{width:110px}.posts-table__col-performance[_ngcontent-%COMP%]{width:150px}.posts-table__col-actions[_ngcontent-%COMP%]{width:48px;text-align:right}.posts-table__post[_ngcontent-%COMP%]{display:flex;align-items:center;gap:10px;min-width:0}.posts-table__thumb[_ngcontent-%COMP%]{flex:0 0 auto;width:48px;height:61px;border-radius:12px;border:1px solid #E5E7EB;background:#ebf2ff;overflow:hidden;display:flex}.posts-table__thumb[_ngcontent-%COMP%] img[_ngcontent-%COMP%]{display:block;width:100%;height:100%;object-fit:cover}.posts-table__post-body[_ngcontent-%COMP%]{display:flex;flex-direction:column;gap:4px;min-width:0}.posts-table__title[_ngcontent-%COMP%]{font-size:14px;font-weight:500;line-height:1.4;letter-spacing:-.14px;color:#253658;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}.posts-table__meta[_ngcontent-%COMP%]{display:flex;align-items:center;gap:8px}.posts-table__provider[_ngcontent-%COMP%]{display:inline-flex;align-items:center;gap:4px;font-size:12px;letter-spacing:-.12px;color:#6b7280}.posts-table__provider[_ngcontent-%COMP%] img[_ngcontent-%COMP%]{width:16px;height:16px}.posts-table__scheduled[_ngcontent-%COMP%]{display:flex;flex-direction:column;gap:2px;line-height:1.3}.posts-table__scheduled-in[_ngcontent-%COMP%]{font-size:12px;color:#4481fd}.posts-table__score[_ngcontent-%COMP%]{display:flex;align-items:center;gap:4px}.posts-table__score[_ngcontent-%COMP%] app-progress-track[_ngcontent-%COMP%]{display:block;flex:1 1 auto;min-width:0}.posts-table__score--disabled[_ngcontent-%COMP%] .progress-track .fill{background:#9ca3af}.posts-table__score--disabled[_ngcontent-%COMP%] .posts-table__score-value[_ngcontent-%COMP%]{color:#9ca3af}.posts-table__spinner[_ngcontent-%COMP%]{display:block;width:18px;height:18px;margin:auto;border:2px solid transparent;border-top-color:#253658;border-radius:50%;animation:_ngcontent-%COMP%_posts-table-spin 1s linear infinite}.posts-table__score-shimmer[_ngcontent-%COMP%]{background:linear-gradient(105deg,#f1f1f1 25%,#e9e9e9,#f1f1f1 75%);background-size:200px 100%;animation:shimmer-sweep 2s infinite linear;display:block;height:8px;border-radius:999px}.posts-table__score-value[_ngcontent-%COMP%]{width:32px;text-align:center;font-size:12px;font-weight:500;letter-spacing:-.12px;color:#253658}@keyframes _ngcontent-%COMP%_posts-table-spin{to{transform:rotate(360deg)}}"]});}}return e;})();ot();fi();ot();ot();var Dr=(()=>{class e{constructor(){this.longPressDelay=500,this.longPress=new st(),this.host=Zi(Ji),this.timer=null,this.fired=!1,this.swallowClick=t=>{this.fired&&(this.fired=!1,t.stopImmediatePropagation(),t.preventDefault());},this.host.nativeElement.addEventListener("click",this.swallowClick,!0);}onPointerDown(t){t.button!==0&&t.pointerType==="mouse"||(this.clear(),this.fired=!1,this.timer=setTimeout(()=>{this.timer=null,this.fired=!0,this.longPress.emit(t);},this.longPressDelay));}onPointerEnd(){this.clear();}onContextMenu(t){(this.timer||this.fired)&&t.preventDefault();}ngOnDestroy(){this.clear(),this.host.nativeElement.removeEventListener("click",this.swallowClick,!0);}clear(){this.timer&&(clearTimeout(this.timer),this.timer=null);}static{this.ɵfac=function(n){return new(n||e)();};}static{this.ɵdir=Qi({type:e,selectors:[["","longPress",""]],hostBindings:function(n,s){n&1&&z("pointerdown",function(a){return s.onPointerDown(a);})("pointerup",function(){return s.onPointerEnd();})("pointerleave",function(){return s.onPointerEnd();})("pointercancel",function(){return s.onPointerEnd();})("contextmenu",function(a){return s.onContextMenu(a);});},inputs:{longPressDelay:"longPressDelay"},outputs:{longPress:"longPress"},standalone:!0});}}return e;})();ot();function Mu(e,i){if(e&1){let t=ht();C(0,"span",2),z("longPress",function(){B(t);let s=k();return N(s.onLongPress());})("click",function(s){B(t);let o=k();return N(o.onTriggerClick(s));}),C(1,"lib-button",3),D(2),w()();}if(e&2){let t=k();S(),E("leftIconContent",t.icon),S(),I(t.label);}}var bi=function(e){return e.DOWNLOAD_POSTS="download-posts",e.DOWNLOAD_ACCOUNTS="download-accounts",e;}(bi||{}),Er=(()=>{class e{constructor(){this.copy=new st(),this.downloadPosts=new st(),this.downloadAccounts=new st(),this.label="CSV",this.icon="/img/icon-library/basic-ui/copy-text-storke.svg",this.options=[{value:bi.DOWNLOAD_POSTS,name:"Download posts CSV"},{value:bi.DOWNLOAD_ACCOUNTS,name:"Download accounts CSV"}];}onTriggerClick(t){t.stopPropagation(),t.defaultPrevented||this.copy.emit();}onLongPress(){this.dropdown.openDropdown();}onSelect(t){t?.value===bi.DOWNLOAD_POSTS?this.downloadPosts.emit():t?.value===bi.DOWNLOAD_ACCOUNTS&&this.downloadAccounts.emit();}static{this.ɵfac=function(n){return new(n||e)();};}static{this.ɵcmp=it({type:e,selectors:[["social-csv-button"]],viewQuery:function(n,s){if(n&1&&nn(Xt,5),n&2){let o;sn(o=on())&&(s.dropdown=o.first);}},outputs:{copy:"copy",downloadPosts:"downloadPosts",downloadAccounts:"downloadAccounts"},standalone:!0,features:[nt],decls:2,vars:4,consts:[[1,"csv-menu",3,"selectionChange","options","showSelected","label","required"],["libDropdownTrigger",""],["longPress","",1,"csv-menu__trigger",3,"longPress","click"],["size","sm","variant","secondary",3,"leftIconContent"]],template:function(n,s){n&1&&(C(0,"lib-dropdown",0),z("selectionChange",function(a){return s.onSelect(a);}),$(1,Mu,3,2,"ng-template",1),w()),n&2&&E("options",s.options)("showSelected",!1)("label",!1)("required",!1);},dependencies:[ae,Xt,Va,Dr],styles:["[_nghost-%COMP%]{display:inline-block}.csv-menu[_ngcontent-%COMP%]{--dropdown-button-width: fit-content}.csv-menu__trigger[_ngcontent-%COMP%]{display:inline-flex;-webkit-user-select:none;user-select:none;-webkit-touch-callout:none}"]});}}return e;})();var Lr=Gi(cn()),Ou="\uFEFF",Ir=`\r 4`;function Rr(e){return Ou+e.map(i=>i.map(ku).join(",")).join(Ir)+Ir;}function ku(e){if(e==null)return"";let i=typeof e=="string"&&/^[=+\-@\t\r]/.test(e)?`'${e}`:String(e);return /[",\r\n]/.test(i)?`"${i.replace(/"/g,'""')}"`:i;}function Ns(e,i=new Date()){return`bigvu-social-${e}-${(0,Lr.default)(i).format("YYYYMMDD-HHmm")}.csv`;}var Tu=["accountName","provider","type","status","createdAt","title","postUrl","thumbnailUrl","views","likes","reactions","comments","shares","engagement","engagementRate","performanceScore","tags","lastSynced","postId"];function Vs(e){let i=e.map(t=>[t.accountName,t.provider,t.type,t.status,t.createdAt,t.title,t.postUrl,t.postImg,t.metrics.views,t.metrics.likes,t.metrics.reactions,t.metrics.comments,t.metrics.shares,t.engagementTotal,t.engagementRate,t.performance.score,t.performance.tags.join("|"),t.lastSynced,t.id]);return Rr([Tu,...i]);}var Au=["accountName","provider","followers","followersChange","views","engagement","engagementChange","link","lastUpdate","accountId","externalId"];function Fr(e,i){let t=new Map(i.map(s=>[s.id,s])),n=e.map(s=>{let o=t.get(s.id);return[s.channel.title,s.channel.provider,o?.followers?.total??s.channel.memberCount,o?.followers?.change,o?.reach?.total,o?.engagement?.total,o?.engagement?.change,s.link,s.lastSynced,s.id,s.externalId];});return Rr([Au,...n]);}function js(e,i){let t=new Blob([i],{type:"text/csv;charset=utf-8"}),n=URL.createObjectURL(t),s=document.createElement("a");s.href=n,s.download=e,s.click(),URL.revokeObjectURL(n);}ot();gn();var Hs=Gi(cn());fi();Ra();hi();ot();var zr=(()=>{class e{transform(t="0"){return Math.abs(+t);}static{this.ɵfac=function(n){return new(n||e)();};}static{this.ɵpipe=xa({name:"absolute",type:e,pure:!0,standalone:!0});}}return e;})();ot();function Du(e,i){e&1&&(C(0,"span",0),D(1,"-"),w());}function Eu(e,i){e&1&&T(0,"span",2);}function Iu(e,i){if(e&1&&(C(0,"span",1),$(1,Eu,1,0,"span",2),C(2,"span",3),D(3),Tt(4,"absolute"),Tt(5,"number"),w()()),e&2){let t=k();en("social-trend social-trend--"+t.direction),S(),q(1,t.direction!=="flat"?1:-1),S(2),I(Lt(5,6,wa(4,4,t.change),"1.0-2")+"%");}}var Br=(()=>{class e{get direction(){return this.change?this.change>0?"up":"down":"flat";}static{this.ɵfac=function(n){return new(n||e)();};}static{this.ɵcmp=it({type:e,selectors:[["social-trend"]],inputs:{change:"change"},standalone:!0,features:[nt],decls:2,vars:1,consts:[[1,"social-trend","social-trend--none"],[1,"social-trend"],[1,"social-trend__arrow"],[1,"social-trend__value"]],template:function(n,s){n&1&&$(0,Du,2,0,"span",0)(1,Iu,6,9),n&2&&q(0,s.change===null?0:s.change!==void 0?1:-1);},dependencies:[an,zr],styles:[".social-trend[_ngcontent-%COMP%]{display:inline-flex;align-items:center;gap:2px;font-family:Inter,sans-serif;font-size:11px;font-weight:700;line-height:1;color:#25365880}.social-trend__arrow[_ngcontent-%COMP%]{width:10px;height:10px;background-color:currentColor;mask:url(/img/icon-library/symbols/arrow-down.svg) center/contain no-repeat;-webkit-mask:url(/img/icon-library/symbols/arrow-down.svg) center/contain no-repeat}.social-trend--up[_ngcontent-%COMP%]{color:#00d096}.social-trend--up[_ngcontent-%COMP%] .social-trend__arrow[_ngcontent-%COMP%]{transform:rotate(180deg)}.social-trend--down[_ngcontent-%COMP%]{color:#ff4d5b}"]});}}return e;})();ot();function Lu(e,i){e&1&&(C(0,"div",1),T(1,"span",9),C(2,"div",10),T(3,"span",11)(4,"span",12),w()());}var Mn=(()=>{class e{constructor(){this.bodyOnly=!1;}static{this.ɵfac=function(n){return new(n||e)();};}static{this.ɵcmp=it({type:e,selectors:[["social-channels-chart-shimmer"]],inputs:{bodyOnly:"bodyOnly"},standalone:!0,features:[nt],decls:13,vars:3,consts:[[1,"card-shimmer"],[1,"card-shimmer__header"],[1,"card-shimmer__body"],[1,"card-shimmer__line","card-shimmer__line--label"],[1,"card-shimmer__line","card-shimmer__line--value"],[1,"card-shimmer__plot"],[1,"card-shimmer__footer"],[1,"card-shimmer__stat"],[1,"card-shimmer__line","card-shimmer__line--stat"],[1,"card-shimmer__avatar"],[1,"card-shimmer__names"],[1,"card-shimmer__line","card-shimmer__line--name"],[1,"card-shimmer__line","card-shimmer__line--scope"]],template:function(n,s){n&1&&(C(0,"div",0),$(1,Lu,5,0,"div",1),C(2,"div",2),T(3,"span",3)(4,"span",4)(5,"span",5),w(),C(6,"div",6)(7,"div",7),T(8,"span",3)(9,"span",8),w(),C(10,"div",7),T(11,"span",3)(12,"span",8),w()()()),n&2&&(kt("card-s
4himmer--body-only",s.bodyOnly),S(),q(1,s.bodyOnly?-1:1));},styles:["[_nghost-%COMP%]{display:block;height:100%}.card-shimmer[_ngcontent-%COMP%]{display:flex;flex-direction:column;height:100%;min-height:309px;padding:16px 23px;border-radius:20px;border:.5px solid rgba(123,141,177,.6);background:#fff;box-sizing:border-box}.card-shimmer--body-only[_ngcontent-%COMP%]{min-height:0;padding:0;border:0;border-radius:0;flex:1 1 auto}.card-shimmer__header[_ngcontent-%COMP%]{display:flex;align-items:center;gap:20px}.card-shimmer__avatar[_ngcontent-%COMP%]{background:linear-gradient(105deg,#f1f1f1 25%,#e9e9e9,#f1f1f1 75%);background-size:200px 100%;animation:shimmer-sweep 2s infinite linear;width:50px;height:50px;border-radius:50%;flex:0 0 auto}.card-shimmer__names[_ngcontent-%COMP%]{display:flex;flex-direction:column;gap:8px}.card-shimmer__line[_ngcontent-%COMP%]{background:linear-gradient(105deg,#f1f1f1 25%,#e9e9e9,#f1f1f1 75%);background-size:200px 100%;animation:shimmer-sweep 2s infinite linear;border-radius:4px;display:block;height:12px}.card-shimmer__line--name[_ngcontent-%COMP%]{width:110px;height:14px}.card-shimmer__line--scope[_ngcontent-%COMP%]{width:60px}.card-shimmer__line--label[_ngcontent-%COMP%]{width:58px}.card-shimmer__line--value[_ngcontent-%COMP%]{width:90px;height:24px}.card-shimmer__line--stat[_ngcontent-%COMP%]{width:70px;height:14px}.card-shimmer__body[_ngcontent-%COMP%]{display:flex;flex-direction:column;gap:8px;margin-top:20px}.card-shimmer__plot[_ngcontent-%COMP%]{background:linear-gradient(105deg,#f1f1f1 25%,#e9e9e9,#f1f1f1 75%);background-size:200px 100%;animation:shimmer-sweep 2s infinite linear;display:block;height:77px;margin-top:4px;border-radius:8px}.card-shimmer__footer[_ngcontent-%COMP%]{display:flex;justify-content:space-around;gap:24px;margin-top:auto;padding-top:20px;border-top:1px solid rgba(0,0,0,.08)}.card-shimmer__stat[_ngcontent-%COMP%]{display:flex;flex-direction:column;gap:6px}"]});}}return e;})();ot();gn();function Ru(e,i){if(e&1&&T(0,"img",5),e&2){let t=k();E("src",t.providerIcon,qt);}}function Fu(e,i){e&1&&T(0,"social-channels-chart-shimmer",10),e&2&&E("bodyOnly",!0);}function zu(e,i){if(e&1&&(C(0,"div",17)(1,"p"),D(2),w()()),e&2){let t=k(2);S(2),I(t.emptyTitle);}}function Bu(e,i){if(e&1&&(C(0,"span"),D(1),w()),e&2){let t=i.$implicit;S(),I(t);}}function Nu(e,i){if(e&1&&T(0,"apx-chart",26),e&2){let t=k(3);E("series",t.series)("chart",t.chart)("stroke",t.stroke)("fill",t.fill)("colors",t.colors)("markers",t.markers)("tooltip",t.tooltip)("xaxis",t.xaxis)("yaxis",t.yaxis)("grid",t.grid)("dataLabels",t.dataLabels);}}function Vu(e,i){e&1&&T(0,"div",29);}function ju(e,i){e&1&&T(0,"span",28);}function Hu(e,i){if(e&1&&(C(0,"div",23)(1,"div",24),xt(2,Bu,2,1,"span",null,ks),w(),C(4,"div",25),$(5,Nu,1,11,"apx-chart",26)(6,Vu,1,0),C(7,"div",27),xt(8,ju,1,0,"span",28,ks),w()()()),e&2){let t=k(2);S(2),bt(t.yTicks),S(3),q(5,t.hasPoints?5:6),S(3),bt(t.points);}}function Wu(e,i){if(e&1){let t=ht();C(0,"section",18),T(1,"lib-badge",30),C(2,"span",31),D(3),w(),C(4,"lib-link",32),z("click",function(s){B(t);let o=k(2);return N(o.onReconnect(s));}),w()();}if(e&2){let t=k(2);S(),E("hasIcon",!0)("icon",t.alertIcon)("text",t.expiredTitle),S(2),I(t.lastSyncedLabel),S(),E("text",t.reconnectTitle)("external",!1);}}function $u(e,i){if(e&1&&(C(0,"section",11)(1,"div",12)(2,"span",13),D(3),w(),C(4,"div",14)(5,"span",15),D(6),Tt(7,"longNumber"),w(),T(8,"social-trend",16),w()(),$(9,zu,3,1,"div",17)(10,Hu,10,1)(11,Wu,5,6,"section",18),w(),C(12,"footer",19)(13,"div",20)(14,"span",13),D(15),w(),C(16,"div",21)(17,"span",22),D(18),w(),T(19,"social-trend",16),w()(),C(20,"div",20)(21,"span",13),D(22),w(),C(23,"div",21)(24,"span",22),D(25),w(),T(26,"social-trend",16),w()()()),e&2){let t,n=k();kt("account-card__body--expired",n.isExpired),S(3),I(n.terms.audience),S(3),I(Lt(7,15,(t=n.data==null||n.data.followers==null?null:n.data.followers.total)!==null&&t!==void 0?t:0,1)),S(2),E("change",n.data==null||n.data.followers==null?null:n.data.followers.change),S(),q(9,n.isEmpty?9:10),S(2),q(11,n.isExpired?11:-1),S(2),E("matTooltip",n.reachTooltipValue),S(2),I(n.terms.views),S(3),I(n.metricLabel(n.data==null||n.data.reach==null?null:n.data.reach.total)),S(),E("change",n.data==null||n.data.reach==null?null:n.data.reach.change),S(),E("matTooltip",n.engagementTooltipValue),S(2),I(n.terms.engagement),S(3),I(n.metricLabel(n.data==null||n.data.engagement==null?null:n.data.engagement.total)),S(),E("change",n.data==null||n.data.engagement==null?null:n.data.engagement.change);}}var Me=function(e){return e.REFRESH="refresh",e.REMOVE="remove",e;}(Me||{}),Nr=(()=>{class e{constructor(t){this.longNumber=t,this.selectMenuOption=new st(),this.LINE_COLOR="#4481fd",this.defaultLogo=or,this.defaultTitle="UNKNOWN",this.emptyTitle="Nothing to chart yet",this.expiredTitle="Connection expired",this.reconnectTitle="Reconnect",this.alertIcon="/img/icon-library/symbols/alert-stroke.svg",this.reachTooltipValue=rr,this.engagementTooltipValue=ar,this.menuOptions=[{value:Me.REFRESH,name:"Refresh Connection",sideIconClass:"/img/icon-library/symbols/retry-reload.svg"},{value:Me.REMOVE,name:"Remove Channel",sideIconClass:"/img/icon-library/basic-ui/delete-trash.svg"}],this.terms=_i,this.points=[],this.yTicks=[],this.series=[],this.chart=this.buildChartConfig(),this.stroke={curve:"straight",width:2,lineCap:"round"},this.fill=this.buildFillConfig(),this.markers=this.buildMarkersConfig(),this.tooltip=this.buildTooltipConfig(),this.xaxis=this.buildXAxisConfig(),this.yaxis={show:!1},this.grid={show:!1,padding:{left:0,right:0,top:0,bottom:0}},this.dataLabels={enabled:!1},this.colors=[this.LINE_COLOR],this.renderTooltip=n=>{let{series:s,seriesIndex:o,dataPointIndex:a,w:r}=n,l=s[o][a]??0,c=a>0?s[o][a-1]:null,d=r.config?.series?.[o]?.data?.[a],u=(d&&typeof d=="object"&&"x"in d?d.x:void 0)??r.globals.categoryLabels?.[a]??r.globals.labels?.[a]??"",f=(0,Hs.default)(u);return` 5 <div class="social-chart-tooltip"> 6 <div class="social-chart-tooltip__label">${f.isValid()?f.format("MMM D"):String(u)}</div> 7 <div class="social-chart-tooltip__body">
8 <span class="social-chart-tooltip__value">${this.formatTooltipNumber(l)}</span> 9 ${this.renderTooltipDelta(l,c)} 10 </div> 11 </div> 12 `;};}get hasPoints(){return this.points.length>1;}ngOnChanges(t){let{data:n}=t;n?.currentValue&&(this.terms=yn(n.currentValue.provider),this.providerIcon=vn(n.currentValue.provider),this.isEmpty=qu(n.currentValue),this.points=this.isEmpty?[]:[...(this.data?.chartStream??[])],this.series=[{name:this.terms.audience,data:this.points.map(s=>({x:s.name,y:s.value??0}))}],this.applyYScale());}get isExpired(){return!!this.data?.accountData?.taskError;}get lastSyncedLabel(){let t=(0,Hs.default)(this.data?.accountData?.lastSynced).format("MMM D");return"Last synced "+t+"";}onReconnect(t){t.defaultPrevented||(t.preventDefault(),this.selectMenuOption.emit(new ui(Me.REFRESH,this.reconnectTitle)));}metricLabel(t){return typeof t=="number"&&t>=0?this.longNumber.transform(t,1):"-";}onMenuSelect(t){t&&this.selectMenuOption.emit(new ui(t.value,t.name));}applyYScale(){let t=this.points.map(a=>a.value??0);if(t.length===0){this.yTicks=[],this.yaxis={show:!1};return;}let{min:n,max:s}=Uu(Math.min(...t),Math.max(...t));this.yaxis={show:!1,min:n,max:s};let o=Yu((s-n)/2);this.yTicks=[s,(s+n)/2,n].map(a=>this.longNumber.transform(a,o));}buildChartConfig(){return{type:"area",height:65,width:"100%",sparkline:{enabled:!0},toolbar:{show:!1},zoom:{enabled:!1},animations:{enabled:!0,speed:400},dropShadow:{enabled:!0,enabledOnSeries:[0],top:4,left:0,blur:6,color:this.LINE_COLOR,opacity:.35},parentHeightOffset:0,events:{mounted:t=>this.stripSvgTitles(t?.el),updated:t=>this.stripSvgTitles(t?.el)}};}stripSvgTitles(t){t?.querySelectorAll("title").forEach(n=>n.remove());}buildFillConfig(){return{type:"gradient",gradient:{shadeIntensity:1,opacityFrom:.45,opacityTo:.05,stops:[0,100]}};}buildMarkersConfig(){return{size:0,colors:["#ffffff"],strokeColors:this.LINE_COLOR,strokeWidth:2,hover:{size:5,sizeOffset:0}};}buildTooltipConfig(){return{enabled:!0,shared:!1,intersect:!1,followCursor:!0,fixed:{enabled:!1},theme:"light",custom:t=>this.renderTooltip(t)};}renderTooltipDelta(t,n){if(n===null)return'<span class="social-chart-tooltip__delta social-chart-tooltip__delta--neutral">\u2014</span>';let s=t-n;if(s===0)return'<span class="social-chart-tooltip__delta social-chart-tooltip__delta--neutral">0%</span>';let o=s>0,a=o?"social-chart-tooltip__delta--positive":"social-chart-tooltip__delta--negative",r=o?"social-chart-tooltip__arrow--up":"social-chart-tooltip__arrow--down",l=n===0?"100%":`${this.formatTooltipNumber(Math.abs(s)/n*100)}%`;return` 13 <span class="social-chart-tooltip__delta ${a}"> 14 <span class="social-chart-tooltip__arrow ${r}"></span> 15 <span>${l}</span> 16 </span> 17 `;}formatTooltipNumber(t){return Number.isFinite(t)?Number(t.toFixed(2)).toString():"0";}buildXAxisConfig(){return{type:"category",labels:{show:!1},axisBorder:{show:!1},axisTicks:{show:!1},crosshairs:{show:!1},tooltip:{enabled:!1}};}static{this.ɵfac=function(n){return new(n||e)(V(Kt));};}static{this.ɵcmp=it({type:e,selectors:[["social-channels-chart"]],inputs:{data:"data",isLoading:"isLoading",active:"active"},outputs:{selectMenuOption:"selectMenuOption"},standalone:!0,features:[Sa([Kt]),se,nt],decls:14,vars:13,consts:[[1,"account-card"],[1,"account-card__header"],[1,"account-card__identity"],[1,"account-card__avatar"],["variant","round","customSize","50px",3,"avatarImage","imageFallback"],["alt","",1,"account-card__provider",3,"src"],[1,"account-card__names"],[1,"account-card__name"],[1,"account-card__scope"],[1,"account-card__menu",3,"selectionChange","options","iconOnly","showSelected","label","required"],[3,"bodyOnly"],[1,"account-card__body"],[1,"account-card__metric"],[1,"account-card__label"],[1,"account-card__value-row"],[1,"account-card__value"],[3,"change"],[1,"account-card__empty"],[1,"account-card__expired"],[1,"account-card__footer"],["matTooltipPosition","above","matTooltipClass","tooltip-custom-black-take",1,"account-card__stat",3,"matTooltip"],[1,"account-card__stat-row"],[1,"account-card__stat-value"],[1,"account-card__chart"],["aria-hidden","true",1,"account-card__y-ticks"],[1,"account-card__plot"],[3,"series","chart","stroke","fill","colors","markers","tooltip","xaxis","yaxis","grid","dataLabels"],["aria-hidden","true",1,"account-card__x-ticks"],[1,"account-card__tick"],[1,"account-card__plot-empty"],["shape","rounded","color","warning","size","regular",3,"hasIcon","icon","text"],[1,"account-card__expired-synced"],["href","",1,"account-card__reconnect",3,"click","text","external"]],template:function(n,s){n&1&&(C(0,"div",0)(1,"header",1)(2,"div",2)(3,"div",3),T(4,"lib-avatar",4),$(5,Ru,1,1,"img",5),w(),C(6,"div",6)(7,"span",7),D(8),w(),C(9,"span",8),D(10),w()()(),C(11,"lib-dropdown",9),z("selectionChange",function(a){return s.onMenuSelect(a);}),w()(),$(12,Fu,1,1,"social-channels-chart-shimmer",10)(13,$u,27,18),w()),n&2&&(kt("account-card--active",s.active),S(4),E("avatarImage",(s.data==null||s.data.accountData==null?null:s.data.accountData.accountAvatar)||s.defaultLogo)("imageFallback",s.defaultLogo),S(),q(5,s.providerIcon?5:-1),S(3),I((s.data==null||s.data.accountData==null?null:s.data.accountData.accountName)||s.defaultTitle),S(2),I(s.data==null||s.data.accountData==null?null:s.data.accountData.workspaceName),S(),E("options",s.menuOptions)("iconOnly",!0)("showSelected",!1)("label",!1)("required",!1),S(),q(12,s.isLoading?12:13));},dependencies:[br,xr,mn,pn,Kt,Na,dn,ja,Xt,Br,Mn],styles:["[_nghost-%COMP%]{display:block;height:100%}.account-card[_ngcontent-%COMP%]{display:flex;flex-direction:column;height:100%;min-height:309px;padding:16px 23px;border-radius:20px;border:.5px solid rgba(123,141,177,.6);background:#fff;font-family:Inter,sans-serif;color:#253658;box-sizing:border-box}.account-card--active[_ngcontent-%COMP%]{border-color:#4481fd}.account-card__header[_ngcontent-%COMP%]{display:flex;align-items:flex-start;justify-content:space-between;gap:12px}.account-card__identity[_ngcontent-%COMP%]{display:flex;align-items:center;gap:20px;min-width:0}
17.account-card__avatar[_ngcontent-%COMP%]{position:relative;flex:0 0 auto;width:50px;height:50px}.account-card__provider[_ngcontent-%COMP%]{position:absolute;right:-10px;bottom:0;width:20px;height:20px;border-radius:50%;background:#fff}.account-card__names[_ngcontent-%COMP%]{display:flex;flex-direction:column;gap:4px;min-width:0}.account-card__name[_ngcontent-%COMP%]{font-size:14px;font-weight:600;line-height:17px;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}.account-card__scope[_ngcontent-%COMP%]{font-size:12px;line-height:15px;color:#25365899}.account-card__menu[_ngcontent-%COMP%]{flex:0 0 auto;margin:-4px -8px 0 0}.account-card__body[_ngcontent-%COMP%]{position:relative;display:flex;flex-direction:column;gap:9px;margin-top:20px}.account-card__body--expired[_ngcontent-%COMP%] > [_ngcontent-%COMP%]:not(.account-card__expired){filter:blur(2px);opacity:.6;pointer-events:none;-webkit-user-select:none;user-select:none}.account-card__label[_ngcontent-%COMP%]{font-size:12px;line-height:15px;color:#0009}.account-card__metric[_ngcontent-%COMP%]{display:flex;flex-direction:column}.account-card__value-row[_ngcontent-%COMP%]{display:flex;align-items:center;gap:6px}.account-card__value[_ngcontent-%COMP%]{font-size:24px;font-weight:700;line-height:30px;color:#000}.account-card__chart[_ngcontent-%COMP%]{display:flex;gap:12px;height:77px}.account-card__y-ticks[_ngcontent-%COMP%]{display:flex;flex-direction:column;justify-content:space-between;flex:0 0 auto;min-width:18px;font-size:9px;line-height:11px;color:#0000004d}.account-card__plot[_ngcontent-%COMP%]{display:flex;flex-direction:column;justify-content:flex-end;flex:1 1 auto;min-width:0}.account-card__plot[_ngcontent-%COMP%] apx-chart[_ngcontent-%COMP%]{display:block;width:100%}.account-card__plot-empty[_ngcontent-%COMP%]{flex:1 1 auto;border-bottom:1px dashed rgba(123,141,177,.3)}.account-card__x-ticks[_ngcontent-%COMP%]{display:flex;justify-content:space-between;align-items:center;height:4px;margin-top:8px}.account-card__tick[_ngcontent-%COMP%]{flex:0 0 auto;width:4px;height:4px;border-radius:50%;background:#00000014}.account-card__empty[_ngcontent-%COMP%]{display:flex;height:77px;align-items:center;justify-content:center;font-size:16px;line-height:1.4;letter-spacing:-.16px;color:#9ca3af;text-align:center}.account-card__empty[_ngcontent-%COMP%] p[_ngcontent-%COMP%]{margin:0}.account-card__expired[_ngcontent-%COMP%]{position:absolute;inset:0;display:flex;flex-direction:column;align-items:center;justify-content:center;gap:8px;background:#fff9}.account-card__expired-synced[_ngcontent-%COMP%]{font-size:12px;line-height:1.4;letter-spacing:-.12px;color:#9ca3af}.account-card__footer[_ngcontent-%COMP%]{display:flex;justify-content:space-around;gap:24px;margin-top:auto;flex:0 0 auto;padding-top:20px;border-top:1px solid rgba(0,0,0,.08)}.account-card__stat[_ngcontent-%COMP%]{display:flex;flex-direction:column;gap:5px}.account-card__stat-row[_ngcontent-%COMP%]{display:flex;align-items:center;gap:8px}.account-card__stat-value[_ngcontent-%COMP%]{font-size:13px;font-weight:700;line-height:16px;color:#000} .social-chart-tooltip{padding:8px 10px;font-family:Inter,sans-serif;color:#253658;min-width:90px} .social-chart-tooltip__label{font-size:11px;color:#25365899;margin-bottom:4px} .social-chart-tooltip__body{display:flex;align-items:baseline;gap:6px} .social-chart-tooltip__value{font-size:14px;font-weight:700} .social-chart-tooltip__delta{display:inline-flex;align-items:center;gap:3px;font-size:11px;font-weight:600;line-height:1} .social-chart-tooltip__delta--positive{color:#00d096} .social-chart-tooltip__delta--negative{color:#ff4d5b} .social-chart-tooltip__delta--neutral{color:#25365880} .social-chart-tooltip__arrow{display:inline-block;width:0;height:0;border-left:3px solid transparent;border-right:3px solid transparent} .social-chart-tooltip__arrow--up{border-bottom:5px solid currentColor} .social-chart-tooltip__arrow--down{border-top:5px solid currentColor}"]});}}return e;})();function Uu(e,i){if(e===i){let r=Math.max(1,Math.abs(e)*.1);e-=r,i+=r;}let t=(i-e)/2,n=Math.pow(10,Math.floor(Math.log10(t))),s=t/n,a=(s<=1?1:s<=2?2:s<=5?5:10)*n;return{min:Math.max(0,Math.floor(e/a)*a),max:Math.ceil(i/a)*a};}function Yu(e){return e<=0||e>=1e3?0:Math.min(2,Math.max(0,3-Math.floor(Math.log10(e))));}function qu(e){return!!e.empty||!(e.chartStream??[]).some(i=>(i.value??0)>0);}ot();function Xu(e,i){if(e&1&&(C(0,"div",6),T(1,"span",7),C(2,"div",8),T(3,"span",9)(4,"span",10),w()()),e&2){let t=i.$implicit;en("donut-shimmer__callout donut-shimmer__callout--"+t);}}var Vr=(()=>{class e{constructor(){this.callouts=["top-right","bottom-right","bottom-left","top-left"];}static{this.ɵfac=function(n){return new(n||e)();};}static{this.ɵcmp=it({type:e,selectors:[["social-donut-shimmer"]],standalone:!0,features:[nt],decls:7,vars:0,consts:[[1,"donut-shimmer"],[1,"donut-shimmer__ring"],[1,"donut-shimmer__center"],[1,"donut-shimmer__line","donut-shimmer__line--total"],[1,"donut-shimmer__line","donut-shimmer__line--title"],[1,"donut-shimmer__callout",3,"class"],[1,"donut-shimmer__callout"],[1,"donut-shimmer__icon"],[1,"donut-shimmer__numbers"],[1,"donut-shimmer__line","donut-shimmer__line--value"],[1,"donut-shimmer__line","donut-shimmer__line--share"]],template:function(n,s){n&1&&(C(0,"div",0)(1,"div",1)(2,"div",2),T(3,"span",3)(4,"span",4),w()(),xt(5,Xu,5,2,"div",5,oe),w()),n&2&&(S(5),bt(s.callouts));},styles:["[_nghost-%COMP%]{display:block;width:100%;height:100%}.donut-shimmer[_ngcontent-%COMP%]{position:relative;display:flex;align-items:center;justify-content:center;width:100%;height:100%}.donut-shimmer__ring[_ngcontent-%COMP%]{background:linear-gradient(105deg,#f1f1f1 25%,#e9e9e9,#f1f1f1 75%);background-size:200px 100%;animation:shimmer-sweep 2s infinite linear;position:relative;width:164px;
17height:164px;border-radius:50%;mask:radial-gradient(circle,transparent 69%,#000 70%);-webkit-mask:radial-gradient(circle,transparent 69%,#000 70%)}.donut-shimmer__center[_ngcontent-%COMP%]{position:absolute;inset:0;display:flex;flex-direction:column;align-items:center;justify-content:center;gap:6px}.donut-shimmer__line[_ngcontent-%COMP%]{background:linear-gradient(105deg,#f1f1f1 25%,#e9e9e9,#f1f1f1 75%);background-size:200px 100%;animation:shimmer-sweep 2s infinite linear;border-radius:4px;display:block;height:10px}.donut-shimmer__line--total[_ngcontent-%COMP%]{width:52px;height:16px}.donut-shimmer__line--title[_ngcontent-%COMP%]{width:80px}.donut-shimmer__line--value[_ngcontent-%COMP%]{width:34px}.donut-shimmer__line--share[_ngcontent-%COMP%]{width:22px;height:8px}.donut-shimmer__callout[_ngcontent-%COMP%]{position:absolute;display:flex;align-items:center;gap:6px}.donut-shimmer__callout--top-right[_ngcontent-%COMP%]{left:calc(50% + 46px);top:calc(50% - 96px)}.donut-shimmer__callout--bottom-right[_ngcontent-%COMP%]{left:calc(50% + 66px);top:calc(50% + 46px)}.donut-shimmer__callout--bottom-left[_ngcontent-%COMP%]{right:calc(50% + 46px);top:calc(50% + 76px);flex-direction:row-reverse}.donut-shimmer__callout--top-left[_ngcontent-%COMP%]{right:calc(50% + 66px);top:calc(50% - 56px);flex-direction:row-reverse}.donut-shimmer__icon[_ngcontent-%COMP%]{background:linear-gradient(105deg,#f1f1f1 25%,#e9e9e9,#f1f1f1 75%);background-size:200px 100%;animation:shimmer-sweep 2s infinite linear;width:24px;height:24px;border-radius:50%;flex:0 0 auto}.donut-shimmer__numbers[_ngcontent-%COMP%]{display:flex;flex-direction:column;gap:4px}"]});}}return e;})();hi();ot();hi();$h();Jh();ot();Zh();Xa();Ua();Rs();Qa();Qh();Za();Wa();Wh();var jr=(()=>{class e extends vr{constructor(t,n,s,o,a,r,l,c,d,h){super(t,n,s,o,a,r,c,d,h,l),this.workspacePermissionService=t,this.workspaceInvitationService=n,this.workspaceHelperService=s,this.adminRequestsService=o,this.deskManagerHelperService=a,this.dialogHelperService=r,this.eventsService=l,this.userHelperService=c,this.planHelperService=d,this.notifier=h,this.onBtnClickStart=new st(),this.onBtnClickFinish=new st(),this.buttonTxt="Invite viewer",this.clickBtn=()=>J(this,null,function*(){(yield this.workspacePermissionService.canInviteExternals(Is.VIEWER))?this.workspaceInvitationService.openInvitationDialog(this.sendGuestInvitationRequest,void 0,Is.VIEWER):this.notifier.error("You don't have invitation permissions. Please advise your admin");});}ngOnInit(){return J(this,null,function*(){yield ua(e.prototype,this,"ngOnInit").call(this);});}ngOnDestroy(){super.ngOnDestroy();}static{this.ɵfac=function(n){return new(n||e)(V(Ka),V(fr),V(pi),V(fn),V(pi),V(_n),V(bn),V(Ga),V(xn),V(un));};}static{this.ɵcmp=it({type:e,selectors:[["app-portable-collaborate-btn"]],outputs:{onBtnClickStart:"onBtnClickStart",onBtnClickFinish:"onBtnClickFinish"},standalone:!0,features:[ba,nt],decls:2,vars:1,consts:[["variant","half-filled-royal","iconLeft","mouse-web-icon-blue-700",3,"onClick"]],template:function(n,s){n&1&&(C(0,"ui-button",0),z("onClick",function(){return s.clickBtn();}),D(1),w()),n&2&&(S(),I(s.buttonTxt));},dependencies:[rn,Ja,La],styles:[".invite-btn[_ngcontent-%COMP%] button[_ngcontent-%COMP%]{border-radius:10px;padding:10px;display:flex;align-items:center;justify-content:center;gap:4px;font-weight:700;font-size:12px;line-height:15px;font-family:Inter-Bold;cursor:pointer;background:linear-gradient(270deg,#28b3f7 .65%,#506aff 99.35%);color:#fff}.invite-btn[_ngcontent-%COMP%] img[_ngcontent-%COMP%]{width:24px;height:24px}"]});}}return e;})();ot();ot();ot();function Ci(e){return e+.5|0;}var re=(e,i,t)=>Math.max(Math.min(e,t),i);function yi(e){return re(Ci(e*2.55),0,255);}function le(e){return re(Ci(e*255),0,255);}function Gt(e){return re(Ci(e/2.55)/100,0,1);}function Hr(e){return re(Ci(e*100),0,100);}var At={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},$s=[..."0123456789ABCDEF"],ef=e=>$s[e&15],nf=e=>$s[(e&240)>>4]+$s[e&15],On=e=>(e&240)>>4===(e&15),sf=e=>On(e.r)&&On(e.g)&&On(e.b)&&On(e.a);function of(e){var i=e.length,t;return e[0]==="#"&&(i===4||i===5?t={r:255&At[e[1]]*17,g:255&At[e[2]]*17,b:255&At[e[3]]*17,a:i===5?At[e[4]]*17:255}
vendor: 5,889 bytes, line 17
17:(i===7||i===9)&&(t={r:At[e[1]]<<4|At[e[2]],g:At[e[3]]<<4|At[e[4]],b:At[e[5]]<<4|At[e[6]],a:i===9?At[e[7]]<<4|At[e[8]]:255})),t;}var af=(e,i)=>e<255?i(e):"";function rf(e){var i=sf(e)?ef:nf;return e?"#"+i(e.r)+i(e.g)+i(e.b)+af(e.a,i):void 0;}var lf=/^(hsla?|hwb|hsv)\(\s*([-+.e\d]+)(?:deg)?[\s,]+([-+.e\d]+)%[\s,]+([-+.e\d]+)%(?:[\s,]+([-+.e\d]+)(%)?)?\s*\)$/;function Yr(e,i,t){let n=i*Math.min(t,1-t),s=(o,a=(o+e/30)%12)=>t-n*Math.max(Math.min(a-3,9-a,1),-1);return[s(0),s(8),s(4)];}function cf(e,i,t){let n=(s,o=(s+e/60)%6)=>t-t*i*Math.max(Math.min(o,4-o,1),0);return[n(5),n(3),n(1)];}function df(e,i,t){let n=Yr(e,1,.5),s;for(i+t>1&&(s=1/(i+t),i*=s,t*=s),s=0;s<3;s++)n[s]*=1-i-t,n[s]+=i;return n;}function hf(e,i,t,n,s){return e===s?(i-t)/n+(i<t?6:0):i===s?(t-e)/n+2:(e-i)/n+4;}function Us(e){let t=e.r/255,n=e.g/255,s=e.b/255,o=Math.max(t,n,s),a=Math.min(t,n,s),r=(o+a)/2,l,c,d;return o!==a&&(d=o-a,c=r>.5?d/(2-o-a):d/(o+a),l=hf(t,n,s,d,o),l=l*60+.5),[l|0,c||0,r];}function Ys(e,i,t,n){return(Array.isArray(i)?e(i[0],i[1],i[2]):e(i,t,n)).map(le);}function qs(e,i,t){return Ys(Yr,e,i,t);}function uf(e,i,t){return Ys(df,e,i,t);}function ff(e,i,t){return Ys(cf,e,i,t);}function qr(e){return(e%360+360)%360;}function pf(e){let i=lf.exec(e),t=255,n;if(!i)return;i[5]!==n&&(t=i[6]?yi(+i[5]):le(+i[5]));let s=qr(+i[2]),o=+i[3]/100,a=+i[4]/100;return i[1]==="hwb"?n=uf(s,o,a):i[1]==="hsv"?n=ff(s,o,a):n=qs(s,o,a),{r:n[0],g:n[1],b:n[2],a:t};}function mf(e,i){var t=Us(e);t[0]=qr(t[0]+i),t=qs(t),e.r=t[0],e.g=t[1],e.b=t[2];}function gf(e){if(!e)return;let i=Us(e),t=i[0],n=Hr(i[1]),s=Hr(i[2]);return e.a<255?`hsla(${t}, ${n}%, ${s}%, ${Gt(e.a)})`:`hsl(${t}, ${n}%, ${s}%)`;}var Wr={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"},$r={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"};function _f(){let e={},i=Object.keys($r),t=Object.keys(Wr),n,s,o,a,r;for(n=0;n<i.length;n++){for(a=r=i[n],s=0;s<t.length;s++)o=t[s],r=r.replace(o,Wr[o]);o=parseInt($r[a],16),e[r]=[o>>16&255,o>>8&255,o&255];}return e;}var kn;function xf(e){kn||(kn=_f(),kn.transparent=[0,0,0,0]);let i=kn[e.toLowerCase()];return i&&{r:i[0],g:i[1],b:i[2],a:i.length===4?i[3]:255};}var bf=/^rgba?\(\s*([-+.\d]+)(%)?[\s,]+([-+.e\d]+)(%)?[\s,]+([-+.e\d]+)(%)?(?:[\s,/]+([-+.e\d]+)(%)?)?\s*\)$/;function yf(e){let i=bf.exec(e),t=255,n,s,o;if(i){if(i[7]!==n){let a=+i[7];t=i[8]?yi(a):re(a*255,0,255);}return n=+i[1],s=+i[3],o=+i[5],n=255&(i[2]?yi(n):re(n,0,255)),s=255&(i[4]?yi(s):re(s,0,255)),o=255&(i[6]?yi(o):re(o,0,255)),{r:n,g:s,b:o,a:t};}}function vf(e){return e&&(e.a<255?`rgba(${e.r}, ${e.g}, ${e.b}, ${Gt(e.a)})`:`rgb(${e.r}, ${e.g}, ${e.b})`);}var Ws=e=>e<=.0031308?e*12.92:Math.pow(e,1/2.4)*1.055-.055,Ne=e=>e<=.04045?e/12.92:Math.pow((e+.055)/1.055,2.4);function Cf(e,i,t){let n=Ne(Gt(e.r)),s=Ne(Gt(e.g)),o=Ne(Gt(e.b));return{r:le(Ws(n+t*(Ne(Gt(i.r))-n))),g:le(Ws(s+t*(Ne(Gt(i.g))-s))),b:le(Ws(o+t*(Ne(Gt(i.b))-o))),a:e.a+t*(i.a-e.a)};}function Tn(e,i,t){if(e){let n=Us(e);n[i]=Math.max(0,Math.min(n[i]+n[i]*t,i===0?360:1)),n=qs(n),e.r=n[0],e.g=n[1],e.b=n[2];}}function Xr(e,i){return e&&Object.assign(i||{},e);}function Ur(e){var i={r:0,g:0,b:0,a:255};return Array.isArray(e)?e.length>=3&&(i={r:e[0],g:e[1],b:e[2],a:255},e.length>3&&(i.a=le(e[3]))):(i=Xr(e,{r:0,g:0,b:0,a:1}),i.a=le(i.a)),i;}function Sf(e){return e.charAt(0)==="r"?yf(e):pf(e);}var vi=class e{constructor(i){if(i instanceof e)return i;let t=typeof i,n;t==="object"?n=Ur(i):t==="string"&&(n=of(i)||xf(i)||Sf(i)),this._rgb=n,this._val
17id=!!n;}get valid(){return this._valid;}get rgb(){var i=Xr(this._rgb);return i&&(i.a=Gt(i.a)),i;}set rgb(i){this._rgb=Ur(i);}rgbString(){return this._valid?vf(this._rgb):void 0;}hexString(){return this._valid?rf(this._rgb):void 0;}hslString(){return this._valid?gf(this._rgb):void 0;}mix(i,t){if(i){let n=this.rgb,s=i.rgb,o,a=t===o?.5:t,r=2*a-1,l=n.a-s.a,c=((r*l===-1?r:(r+l)/(1+r*l))+1)/2;o=1-c,n.r=255&c*n.r+o*s.r+.5,n.g=255&c*n.g+o*s.g+.5,n.b=255&c*n.b+o*s.b+.5,n.a=a*n.a+(1-a)*s.a,this.rgb=n;}return this;}interpolate(i,t){return i&&(this._rgb=Cf(this._rgb,i._rgb,t)),this;}clone(){return new e(this.rgb);}alpha(i){return this._rgb.a=le(i),this;}clearer(i){let t=this._rgb;return t.a*=1-i,this;}greyscale(){let i=this._rgb,t=Ci(i.r*.3+i.g*.59+i.b*.11);return i.r=i.g=i.b=t,this;}opaquer(i){let t=this._rgb;return t.a*=1+i,this;}negate(){let i=this._rgb;return i.r=255-i.r,i.g=255-i.g,i.b=255-i.b,this;}lighten(i){return Tn(this._rgb,2,i),this;}darken(i){return Tn(this._rgb,2,-i),this;}saturate(i){return Tn(this._rgb,1,i),this;}desaturate(i){return Tn(this._rgb,1,-i),this;}rotate(i){return mf(this._rgb,i),this;}};function jt(){}var ol=(()=>{let e=0;return()=>e++;})();function W(e){return e==null;}function G(e){if(Array.isArray&&Array.isArray(e))return!0;let i=Object.prototype.toString.call(e);return i.slice(0,7)==="[object"&&i.slice(-6)==="Array]";}function j(e){return e!==null&&Object.prototype.toString.call(e)==="[object Object]";}function at(e){return(typeof e=="number"||e instanceof Number)&&isFinite(+e);}function St(e,i){return at(e)?e:i;}function L(e,i){return typeof e>"u"?i:e;}var al=(e,i)=>typeof e=="string"&&e.endsWith("%")?parseFloat(e)/100:+e/i,Zs=(e,i)=>typeof e=="string"&&e.endsWith("%")?parseFloat(e)/100*i:+e;function X(e,i,t){if(e&&typeof e.call=="function")return e.apply(t,i);}function U(e,i,t,n){let s,o,a;if(G(e)){if(o=e.length,n)for(s=o-1;s>=0;s--)i.call(t,e[s],s);else for(s=0;s<o;s++)i.call(t,e[s],s);}else if(j(e))for(a=Object.keys(e),o=a.length,s=0;s<o;s++)i.call(t,e[a[s]],a[s]);}function Pi(e,i){let t,n,s,o;if(!e||!i||e.length!==i.length)return!1;for(t=0,n=e.length;t<n;++t)if(s=e[t],o=i[t],s.datasetIndex!==o.datasetIndex||s.index!==o.index)return!1;return!0;}function In(e){if(G(e))return e.map(In);if(j(e)){let i=Object.create(null),t=Object.keys(e),n=t.length,s=0;for(;s<n;++s)i[t[s]]=In(e[t[s]]);return i;}return e;}function rl(e){return["__proto__","prototype","constructor"].indexOf(e)===-1;}function wf(e,i,t,n){if(!rl(e))return;let s=i[e],o=t[e];j(s)&&j(o)?je(s,o,n):i[e]=In(o);}function je(e,i,t){let n=G(i)?i:[i],s=n.length;if(!j(e))return e;t=t||{};let o=t.merger||wf,a;for(let r=0;r<s;++r){if(a=n[r],!j(a))continue;let l=Object.keys(a);for(let c=0,d=l.length;c<d;++c)o(l[c],e,a,t);}return e;}function We(e,i){return je(e,i,{merger:Pf});}function Pf(e,i,t){if(!rl(e))return;let n=i[e],s=t[e];j(n)&&j(s)?We(n,s):Object.prototype.hasOwnProperty.call(i,e)||(i[e]=In(s));}var Kr={"":e=>e,x:e=>e.x,y:e=>e.y};function Mf(e){let i=e.split("."),t=[],n="";for(let s of i)n+=s,n.endsWith("\\")?n=n.slice(0,-1)+".":(t.push(n),n="");return t;}function Of(e){let i=Mf(e);return t=>{for(let n of i){if(n==="")break;t=t&&t[n];}return t;};}function Jt(e,i){return(Kr[i]||(Kr[i]=Of(i)))(e);}function zn(e){return e.charAt(0).toUpperCase()+e.slice(1);}var $e=e=>typeof e<"u",Zt=e=>typeof e=="function",Qs=(e,i)=>{if(e.size!==i.size)return!1;for(let t of e)if(!i.has(t))return!1;return!0;};function ll(e){return e.type==="mouseup"||e.type==="click"||e.type==="contextmenu";}var Z=Math.PI,Q=2*Z,kf=Q+Z,Ln=Number.POSITIVE_INFINITY,Tf=Z/180,rt=Z/2,Oe=Z/4,Gr=Z*2/3,Qt=Math.log10,Ft=Math.sign;function Ue(e,i,t){return Math.abs(e-i)<t;}function Js(e){let i=Math.round(e);e=Ue(e,i,e/1e3)?i:e;let t=Math.pow(10,Math.floor(Qt(e))),n=e/t;return(n<=1?1:n<=2?2:n<=5?5:10)*t;}function cl(e){let i=[],t=Math.sqrt(e),n;for(n=1;n<t;n++)e%n===0&&(i.push(n),i.push(e/n));return t===(t|0)&&i.push(t),i.sort((s,o)=>s-o).pop(),i;}function Ae(e){return!isNaN(parseFloat(e))&&isFinite(e);}function dl(e,i){let t=Math.round(e);return t-i<=e&&t+i>=e;}function to(e,i,t){let n,s,o;for(n=0,s=e.length;n<s;n++)o=e[n][t],isNaN(o)||(i.min=Math.min(i.min,o),i.max=Math.max(i.max,o));}function Dt(e){return e*(Z/180);}function Bn(e){return e*(180/Z);}function eo(e){if(!at(e))return;let i=1,t=0;for(;Math.round(e*i)/i!==e;)i*=10,t++;return t;}function io(e,i){let t=i.x-e.x,n=i.y-e.y,s=Math.sqrt(t*t+n*n),o=Math.atan2(n,t);return o<-.5*Z&&(o+=Q),{angle:o,distance:s};}function Rn(e,i){return Math.sqrt(Math.pow(i.x-e.x,2)+Math.pow(i.y-e.y,2));}function Af(e,i){return(e-i+kf)%Q-Z;}function Ct(e){return(e%Q+Q)%Q;}function Ye(e,i,t,n){let s=Ct(e),o=Ct(i),a=Ct(t),r=Ct(o-s),l=Ct(a-s),c=Ct(s-o),d=Ct(s-a);return s===o||s===a||n&&o===a||r>l&&c<d;}function dt(e,i,t){return Math.max(i,Math.min(t,e));}function hl(e){return dt(e,-32768,32767);}function Ht(e,i,t,n=1e-6){return e>=Math.min(i,t)-n&&e<=Math.max(i,t)+n;}function Nn(e,i,t){t=t||(a=>e[a]<i);let n=e.length-1,s=0,o;for(;n-s>1;)o=s+n>>1,t(o)?s=o:n=o;return{lo:s,hi:n};}var Nt=(e,i,t,n)=>Nn(e,t,n?s=>{let o=e[s][i];return o<t||o===t&&e[s+1][i]===t;}:s=>e[s][i]<t),ul=(e,i,t)=>Nn(e,t,n=>e[n][i]>=t);function fl(e,i,t){let n=0,s=e.length;for(;n<s&&e[n]<i;)n++;for(;s>n&&e[s-1]>t;)s--;return n>0||s<e.length?e.slice(n,s):e;}var pl=["push","pop","shift","splice","unshift"];function ml(e,i){if(e._chartjs){e._chartjs.listeners.push(i);return;}Object.defineProperty(e,"_chartjs",{configurable:!0,enumerable:!1,value:{listeners:[i]}}),pl.forEach(t=>{let n="_onData"+zn(t),s=e[t];Object.defineProperty(e,t,{configurable:!0,enumerable:!1,value(...o){let a=s.apply(this,o);
17return e._chartjs.listeners.forEach(r=>{typeof r[n]=="function"&&r[n](...o);}),a;}});});}function no(e,i){let t=e._chartjs;if(!t)return;let n=t.listeners,s=n.indexOf(i);s!==-1&&n.splice(s,1),!(n.length>0)&&(pl.forEach(o=>{delete e[o];}),delete e._chartjs);}function so(e){let i=new Set(e);return i.size===e.length?e:Array.from(i);}var oo=function(){return typeof window>"u"?function(e){return e();}:window.requestAnimationFrame;}();function ao(e,i){let t=[],n=!1;return function(...s){t=s,n||(n=!0,oo.call(window,()=>{n=!1,e.apply(i,t);}));};}function gl(e,i){let t;return function(...n){return i?(clearTimeout(t),t=setTimeout(e,i,n)):e.apply(this,n),i;};}var Vn=e=>e==="start"?"left":e==="end"?"right":"center",ft=(e,i,t)=>e==="start"?i:e==="end"?t:(i+t)/2,_l=(e,i,t,n)=>e===(n?"left":"right")?t:e==="center"?(i+t)/2:i;function ro(e,i,t){let n=i.length,s=0,o=n;if(e._sorted){let{iScale:a,_parsed:r}=e,l=a.axis,{min:c,max:d,minDefined:h,maxDefined:u}=a.getUserBounds();h&&(s=dt(Math.min(Nt(r,l,c).lo,t?n:Nt(i,l,a.getPixelForValue(c)).lo),0,n-1)),u?o=dt(Math.max(Nt(r,a.axis,d,!0).hi+1,t?0:Nt(i,l,a.getPixelForValue(d),!0).hi+1),s,n)-s:o=n-s;}return{start:s,count:o};}function lo(e){let{xScale:i,yScale:t,_scaleRanges:n}=e,s={xmin:i.min,xmax:i.max,ymin:t.min,ymax:t.max};if(!n)return e._scaleRanges=s,!0;let o=n.xmin!==i.min||n.xmax!==i.max||n.ymin!==t.min||n.ymax!==t.max;return Object.assign(n,s),o;}var An=e=>e===0||e===1,Zr=(e,i,t)=>-(Math.pow(2,10*(e-=1))*Math.sin((e-i)*Q/t)),Qr=(e,i,t)=>Math.pow(2,-10*e)*Math.sin((e-i)*Q/t)+1,Ve={linear:e=>e,easeInQuad:e=>e*e,easeOutQuad:e=>-e*(e-2),easeInOutQuad:e=>(e/=.5)<1?.5*e*e:-.5*(--e*(e-2)-1),easeInCubic:e=>e*e*e,easeOutCubic:e=>(e-=1)*e*e+1,easeInOutCubic:e=>(e/=.5)<1?.5*e*e*e:.5*((e-=2)*e*e+2),easeInQuart:e=>e*e*e*e,easeOutQuart:e=>-((e-=1)*e*e*e-1),easeInOutQuart:e=>(e/=.5)<1?.5*e*e*e*e:-.5*((e-=2)*e*e*e-2),easeInQuint:e=>e*e*e*e*e,easeOutQuint:e=>(e-=1)*e*e*e*e+1,easeInOutQuint:e=>(e/=.5)<1?.5*e*e*e*e*e:.5*((e-=2)*e*e*e*e+2),easeInSine:e=>-Math.cos(e*rt)+1,easeOutSine:e=>Math.sin(e*rt),easeInOutSine:e=>-.5*(Math.cos(Z*e)-1),easeInExpo:e=>e===0?0:Math.pow(2,10*(e-1)),easeOutExpo:e=>e===1?1:-Math.pow(2,-10*e)+1,easeInOutExpo:e=>An(e)?e:e<.5?.5*Math.pow(2,10*(e*2-1)):.5*(-Math.pow(2,-10*(e*2-1))+2),easeInCirc:e=>e>=1?e:-(Math.sqrt(1-e*e)-1),easeOutCirc:e=>Math.sqrt(1-(e-=1)*e),easeInOutCirc:e=>(e/=.5)<1?-.5*(Math.sqrt(1-e*e)-1):.5*(Math.sqrt(1-(e-=2)*e)+1),easeInElastic:e=>An(e)?e:Zr(e,.075,.3),easeOutElastic:e=>An(e)?e:Qr(e,.075,.3),easeInOutElastic(e){return An(e)?e:e<.5?.5*Zr(e*2,.1125,.45):.5+.5*Qr(e*2-1,.1125,.45);},easeInBack(e){return e*e*((1.70158+1)*e-1.70158);},easeOutBack(e){return(e-=1)*e*((1.70158+1)*e+1.70158)+1;},easeInOutBack(e){let i=1.70158;return(e/=.5)<1?.5*(e*e*(((i*=1.525)+1)*e-i)):.5*((e-=2)*e*(((i*=1.525)+1)*e+i)+2);},easeInBounce:e=>1-Ve.easeOutBounce(1-e),easeOutBounce(e){return e<1/2.75?7.5625*e*e:e<2/2.75?7.5625*(e-=1.5/2.75)*e+.75:e<2.5/2.75?7.5625*(e-=2.25/2.75)*e+.9375:7.5625*(e-=2.625/2.75)*e+.984375;},easeInOutBounce:e=>e<.5?Ve.easeInBounce(e*2)*.5:Ve.easeOutBounce(e*2-1)*.5+.5};function co(e){if(e&&typeof e=="object"){let i=e.toString();return i==="[object CanvasPattern]"||i==="[object CanvasGradient]";}return!1;}function ho(e){return co(e)?e:new vi(e);}function Xs(e){return co(e)?e:new vi(e).saturate(.5).darken(.1).hexString();}var Df=["x","y","borderWidth","radius","tension"],Ef=["color","borderColor","backgroundColor"];function If(e){e.set("animation",{delay:void 0,duration:1e3,easing:"easeOutQuart",fn:void 0,from:void 0,loop:void 0,to:void 0,type:void 0}),e.describe("animation",{_fallback:!1,_indexable:!1,_scriptable:i=>i!=="onProgress"&&i!=="onComplete"&&i!=="fn"}),e.set("animations",{colors:{type:"color",properties:Ef},numbers:{type:"number",properties:Df}}),e.describe("animations",{_fallback:"animation"}),e.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:i=>i|0}}}});}function Lf(e){e.set("layout",{autoPadding:!0,padding:{top:0,right:0,bottom:0,left:0}});}
17var Jr=new Map();function Rf(e,i){i=i||{};let t=e+JSON.stringify(i),n=Jr.get(t);return n||(n=new Intl.NumberFormat(e,i),Jr.set(t,n)),n;}function qe(e,i,t){return Rf(i,t).format(e);}var xl={values(e){return G(e)?e:""+e;},numeric(e,i,t){if(e===0)return"0";let n=this.chart.options.locale,s,o=e;if(t.length>1){let c=Math.max(Math.abs(t[0].value),Math.abs(t[t.length-1].value));(c<1e-4||c>1e15)&&(s="scientific"),o=Ff(e,t);}let a=Qt(Math.abs(o)),r=isNaN(a)?1:Math.max(Math.min(-1*Math.floor(a),20),0),l={notation:s,minimumFractionDigits:r,maximumFractionDigits:r};return Object.assign(l,this.options.ticks.format),qe(e,n,l);},logarithmic(e,i,t){if(e===0)return"0";let n=t[i].significand||e/Math.pow(10,Math.floor(Qt(e)));return[1,2,3,5,10,15].includes(n)||i>.8*t.length?xl.numeric.call(this,e,i,t):"";}};function Ff(e,i){let t=i.length>3?i[2].value-i[1].value:i[1].value-i[0].value;return Math.abs(t)>=1&&e!==Math.floor(e)&&(t=e-Math.floor(e)),t;}var Mi={formatters:xl};function zf(e){e.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:(i,t)=>t.lineWidth,tickColor:(i,t)=>t.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:Mi.formatters.values,minor:{},major:{},align:"center",crossAlign:"near",showLabelBackdrop:!1,backdropColor:"rgba(255, 255, 255, 0.75)",backdropPadding:2}}),e.route("scale.ticks","color","","color"),e.route("scale.grid","color","","borderColor"),e.route("scale.border","color","","borderColor"),e.route("scale.title","color","","color"),e.describe("scale",{_fallback:!1,_scriptable:i=>!i.startsWith("before")&&!i.startsWith("after")&&i!=="callback"&&i!=="parser",_indexable:i=>i!=="borderDash"&&i!=="tickBorderDash"&&i!=="dash"}),e.describe("scales",{_fallback:"scale"}),e.describe("scale.ticks",{_scriptable:i=>i!=="backdropPadding"&&i!=="callback",_indexable:i=>i!=="backdropPadding"});}var de=Object.create(null),jn=Object.create(null);function Si(e,i){if(!i)return e;let t=i.split(".");for(let n=0,s=t.length;n<s;++n){let o=t[n];e=e[o]||(e[o]=Object.create(null));}return e;}function Ks(e,i,t){return typeof i=="string"?je(Si(e,i),t):je(Si(e,""),i);}var Gs=class{constructor(i,t){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=n=>n.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=(n,s)=>Xs(s.backgroundColor),this.hoverBorderColor=(n,s)=>Xs(s.borderColor),this.hoverColor=(n,s)=>Xs(s.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={}
vendor: 5,078 bytes, line 17
17,this.showLine=!0,this.drawActiveElementsOnTop=!0,this.describe(i),this.apply(t);}set(i,t){return Ks(this,i,t);}get(i){return Si(this,i);}describe(i,t){return Ks(jn,i,t);}override(i,t){return Ks(de,i,t);}route(i,t,n,s){let o=Si(this,i),a=Si(this,n),r="_"+t;Object.defineProperties(o,{[r]:{value:o[t],writable:!0},[t]:{enumerable:!0,get(){let l=this[r],c=a[s];return j(l)?Object.assign({},c,l):L(l,c);},set(l){this[r]=l;}}});}apply(i){i.forEach(t=>t(this));}},K=new Gs({_scriptable:e=>!e.startsWith("on"),_indexable:e=>e!=="events",hover:{_fallback:"interaction"},interaction:{_scriptable:!1,_indexable:!1}},[If,Lf,zf]);function Bf(e){return!e||W(e.size)||W(e.family)?null:(e.style?e.style+" ":"")+(e.weight?e.weight+" ":"")+e.size+"px "+e.family;}function wi(e,i,t,n,s){let o=i[s];return o||(o=i[s]=e.measureText(s).width,t.push(s)),o>n&&(n=o),n;}function bl(e,i,t,n){n=n||{};let s=n.data=n.data||{},o=n.garbageCollect=n.garbageCollect||[];n.font!==i&&(s=n.data={},o=n.garbageCollect=[],n.font=i),e.save(),e.font=i;let a=0,r=t.length,l,c,d,h,u;for(l=0;l<r;l++)if(h=t[l],h!=null&&!G(h))a=wi(e,s,o,a,h);else if(G(h))for(c=0,d=h.length;c<d;c++)u=h[c],u!=null&&!G(u)&&(a=wi(e,s,o,a,u));e.restore();let f=o.length/2;if(f>t.length){for(l=0;l<f;l++)delete s[o[l]];o.splice(0,f);}return a;}function he(e,i,t){let n=e.currentDevicePixelRatio,s=t!==0?Math.max(t/2,.5):0;return Math.round((i-s)*n)/n+s;}function uo(e,i){!i&&!e||(i=i||e.getContext("2d"),i.save(),i.resetTransform(),i.clearRect(0,0,e.width,e.height),i.restore());}function Hn(e,i,t,n){fo(e,i,t,n,null);}function fo(e,i,t,n,s){let o,a,r,l,c,d,h,u,f=i.pointStyle,m=i.rotation,g=i.radius,x=(m||0)*Tf;if(f&&typeof f=="object"&&(o=f.toString(),o==="[object HTMLImageElement]"||o==="[object HTMLCanvasElement]")){e.save(),e.translate(t,n),e.rotate(x),e.drawImage(f,-f.width/2,-f.height/2,f.width,f.height),e.restore();return;}if(!(isNaN(g)||g<=0)){switch(e.beginPath(),f){default:s?e.ellipse(t,n,s/2,g,0,0,Q):e.arc(t,n,g,0,Q),e.closePath();break;case"triangle":d=s?s/2:g,e.moveTo(t+Math.sin(x)*d,n-Math.cos(x)*g),x+=Gr,e.lineTo(t+Math.sin(x)*d,n-Math.cos(x)*g),x+=Gr,e.lineTo(t+Math.sin(x)*d,n-Math.cos(x)*g),e.closePath();break;case"rectRounded":c=g*.516,l=g-c,a=Math.cos(x+Oe)*l,h=Math.cos(x+Oe)*(s?s/2-c:l),r=Math.sin(x+Oe)*l,u=Math.sin(x+Oe)*(s?s/2-c:l),e.arc(t-h,n-r,c,x-Z,x-rt),e.arc(t+u,n-a,c,x-rt,x),e.arc(t+h,n+r,c,x,x+rt),e.arc(t-u,n+a,c,x+rt,x+Z),e.closePath();break;case"rect":if(!m){l=Math.SQRT1_2*g,d=s?s/2:l,e.rect(t-d,n-l,2*d,2*l);break;}x+=Oe;case"rectRot":h=Math.cos(x)*(s?s/2:g),a=Math.cos(x)*g,r=Math.sin(x)*g,u=Math.sin(x)*(s?s/2:g),e.moveTo(t-h,n-r),e.lineTo(t+u,n-a),e.lineTo(t+h,n+r),e.lineTo(t-u,n+a),e.closePath();break;case"crossRot":x+=Oe;case"cross":h=Math.cos(x)*(s?s/2:g),a=Math.cos(x)*g,r=Math.sin(x)*g,u=Math.sin(x)*(s?s/2:g),e.moveTo(t-h,n-r),e.lineTo(t+h,n+r),e.moveTo(t+u,n-a),e.lineTo(t-u,n+a);break;case"star":h=Math.cos(x)*(s?s/2:g),a=Math.cos(x)*g,r=Math.sin(x)*g,u=Math.sin(x)*(s?s/2:g),e.moveTo(t-h,n-r),e.lineTo(t+h,n+r),e.moveTo(t+u,n-a),e.lineTo(t-u,n+a),x+=Oe,h=Math.cos(x)*(s?s/2:g),a=Math.cos(x)*g,r=Math.sin(x)*g,u=Math.sin(x)*(s?s/2:g),e.moveTo(t-h,n-r),e.lineTo(t+h,n+r),e.moveTo(t+u,n-a),e.lineTo(t-u,n+a);break;case"line":a=s?s/2:Math.cos(x)*g,r=Math.sin(x)*g,e.moveTo(t-a,n-r),e.lineTo(t+a,n+r);break;case"dash":e.moveTo(t,n),e.lineTo(t+Math.cos(x)*(s?s/2:g),n+Math.sin(x)*g);break;case!1:e.closePath();break;}e.fill(),i.borderWidth>0&&e.stroke();}}function Vt(e,i,t){return t=t||.5,!i||e&&e.x>i.left-t&&e.x<i.right+t&&e.y>i.top-t&&e.y<i.bottom+t;}function Oi(e,i){e.save(),e.beginPath(),e.rect(i.left,i.top,i.right-i.left,i.bottom-i.top),e.clip();}function ki(e){e.restore();}function yl(e,i,t,n,s){if(!i)return e.lineTo(t.x,t.y);if(s==="middle"){let o=(i.x+t.x)/2;e.lineTo(o,i.y),e.lineTo(o,t.y);}else s==="after"!=!!n?e.lineTo(i.x,t.y):e.lineTo(t.x,i.y);e.lineTo(t.x,t.y);}function vl(e,i,t,n){if(!i)return e.lineTo(t.x,t.y);e.bezierCurveTo(n?i.cp1x:i.cp2x,n?i.cp1y:i.cp2y,n?t.cp2x:t.cp1x,n?t.cp2y:t.cp1y,t.x,t.y);}function Nf(e,i){i.translation&&e.translate(i.translation[0],i.translation[1]),W(i.rotation)||e.rotate(i.rotation),i.color&&(e.fillStyle=i.color),i.textAlign&&(e.textAlign=i.textAlign),i.textBaseline&&(e.textBaseline=i.textBaseline);}function Vf(e,i,t,n,s){if(s.strikethrough||s.underline){let o=e.measureText(n),a=i-o.actualBoundingBoxLeft,r=i+o.actualBoundingBoxRight,l=t-o.actualBoundingBoxAscent,c=t+o.actualBoundingBoxDescent,d=s.strikethrough?(l+c)/2:c;e.strokeStyle=e.fillStyle,e.beginPath(),e.lineWidth=s.decorationWidth||2,e.moveTo(a,d),e.lineTo(r,d),e.stroke();}}function jf(e,i){let t=e.fillStyle;e.fillStyle=i.color,e.fillRect(i.left,i.top,i.width,i.height),e.fillStyle=t;}function ue(e,i,t,n,s,o={}){let a=G(i)?i:[i],r=o.strokeWidth>0&&o.strokeColor!=="",l,c;for(e.save(),e.font=s.string,Nf(e,o),l=0;l<a.length;++l)c=a[l],o.backdrop&&jf(e,o.backdrop),r&&(o.strokeColor&&(e.strokeStyle=o.strokeColor),W(o.strokeWidth)||(e.lineWidth=o.strokeWidth),e.strokeText(c,t,n,o.maxWidth)),e.fillText(c,t,n,o.maxWidth),Vf(e,t,n,c,o),n+=Number(s.lineHeight);
17e.restore();}function Xe(e,i){let{x:t,y:n,w:s,h:o,radius:a}=i;e.arc(t+a.topLeft,n+a.topLeft,a.topLeft,1.5*Z,Z,!0),e.lineTo(t,n+o-a.bottomLeft),e.arc(t+a.bottomLeft,n+o-a.bottomLeft,a.bottomLeft,Z,rt,!0),e.lineTo(t+s-a.bottomRight,n+o),e.arc(t+s-a.bottomRight,n+o-a.bottomRight,a.bottomRight,rt,0,!0),e.lineTo(t+s,n+a.topRight),e.arc(t+s-a.topRight,n+a.topRight,a.topRight,0,-rt,!0),e.lineTo(t+a.topLeft,n);}var Hf=/^(normal|(\d+(?:\.\d+)?)(px|em|%)?)$/,Wf=/^(normal|italic|initial|inherit|unset|(oblique( -?[0-9]?[0-9]deg)?))$/;function $f(e,i){let t=(""+e).match(Hf);if(!t||t[1]==="normal")return i*1.2;switch(e=+t[2],t[3]){case"px":return e;case"%":e/=100;break;}return i*e;}var Uf=e=>+e||0;function Wn(e,i){let t={},n=j(i),s=n?Object.keys(i):i,o=j(e)?n?a=>L(e[a],e[i[a]]):a=>e[a]:()=>e;for(let a of s)t[a]=Uf(o(a));return t;}function po(e){return Wn(e,{top:"y",right:"x",bottom:"y",left:"x"});}function fe(e){return Wn(e,["topLeft","topRight","bottomLeft","bottomRight"]);}function pt(e){let i=po(e);return i.width=i.left+i.right,i.height=i.top+i.bottom,i;}function ct(e,i){e=e||{},i=i||K.font;let t=L(e.size,i.size);typeof t=="string"&&(t=parseInt(t,10));let n=L(e.style,i.style);n&&!(""+n).match(Wf)&&(console.warn('Invalid font style specified: "'+n+'"'),n=void 0);let s={family:L(e.family,i.family),lineHeight:$f(L(e.lineHeight,i.lineHeight),t),size:t,style:n,weight:L(e.weight,i.weight),string:""};return s.string=Bf(s),s;}function Ke(e,i,t,n){let s=!0,o,a,r;for(o=0,a=e.length;o<a;++o)if(r=e[o],r!==void 0&&(i!==void 0&&typeof r=="function"&&(r=r(i),s=!1),t!==void 0&&G(r)&&(r=r[t%r.length],s=!1),r!==void 0))return n&&!s&&(n.cacheable=!1),r;}function Cl(e,i,t){let{min:n,max:s}=e,o=Zs(i,(s-n)/2),a=(r,l)=>t&&r===0?0:r+l;return{min:a(n,-Math.abs(o)),max:a(s,o)};}function te(e,i){return Object.assign(Object.create(e),i);}function $n(e,i=[""],t,n,s=()=>e[0]){let o=t||e;typeof n>"u"&&(n=Pl("_fallback",e));let a={[Symbol.toStringTag]:"Object",_cacheable:!0,_scopes:e,_rootScopes:o,_fallback:n,_getTarget:s,override:r=>$n([r,...e],i,o,n)};return new Proxy(a,{deleteProperty(r,l){return delete r[l],delete r._keys,delete e[0][l],!0;},get(r,l){return Sl(r,l,()=>Jf(l,i,e,r));},getOwnPropertyDescriptor(r,l){return Reflect.getOwnPropertyDescriptor(r._scopes[0],l);},getPrototypeOf(){return Reflect.getPrototypeOf(e[0]);},has(r,l){return el(r).includes(l);},ownKeys(r){return el(r);},set(r,l,c){let d=r._storage||(r._storage=s());return r[l]=d[l]=c,delete r._keys,!0;}});}function Te(e,i,t,n){let s={_cacheable:!1,_proxy:e,_context:i,_subProxy:t,_stack:new Set(),_descriptors:mo(e,n),setContext:o=>Te(e,o,t,n),override:o=>Te(e.override(o),i,t,n)};return new Proxy(s,{deleteProperty(o,a){return delete o[a],delete e[a],!0;},get(o,a,r){return Sl(o,a,()=>qf(o,a,r));},getOwnPropertyDescriptor(o,a){return o._descriptors.allKeys?Reflect.has(e,a)?{enumerable:!0,configurable:!0}:void 0:Reflect.getOwnPropertyDescriptor(e,a);},getPrototypeOf(){return Reflect.getPrototypeOf(e);},has(o,a){return Reflect.has(e,a);},ownKeys(){return Reflect.ownKeys(e);},set(o,a,r){return e[a]=r,delete o[a],!0;}});}function mo(e,i={scriptable:!0,indexable:!0}){let{_scriptable:t=i.scriptable,_indexable:n=i.indexable,_allKeys:s=i.allKeys}=e;return{allKeys:s,scriptable:t,indexable:n,isScriptable:Zt(t)?t:()=>t,isIndexable:Zt(n)?n:()=>n};}var Yf=(e,i)=>e?e+zn(i):i,go=(e,i)=>j(i)&&e!=="adapters"&&(Object.getPrototypeOf(i)===null||i.constructor===Object);function Sl(e,i,t){if(Object.prototype.hasOwnProperty.call(e,i)||i==="constructor")return e[i];let n=t();return e[i]=n,n;}function qf(e,i,t){let{_proxy:n,_context:s,_subProxy:o,_descriptors:a}=e,r=n[i];return Zt(r)&&a.isScriptable(i)&&(r=Xf(i,r,e,t)),G(r)&&r.length&&(r=Kf(i,r,e,a.isIndexable)),go(i,r)&&(r=Te(r,s,o&&o[i],a)),r;}function Xf(e,i,t,n){let{_proxy:s,_context:o,_subProxy:a,_stack:r}=t;if(r.has(e))throw new Error("Recursion detected: "+Array.from(r).join("->")+"->"+e);r.add(e);let l=i(o,a||n);return r.delete(e),go(e,l)&&(l=_o(s._scopes,s,e,l)),l;}function Kf(e,i,t,n){let{_proxy:s,_context:o,_subProxy:a,_descriptors:r}=t;if(typeof o.index<"u"&&n(e))return i[o.index%i.length];if(j(i[0])){let l=i,c=s._scopes.filter(d=>d!==l);i=[];for(let d of l){let h=_o(c,s,e,d);i.push(Te(h,o,a&&a[e],r));}}return i;}function wl(e,i,t){return Zt(e)?e(i,t):e;}var Gf=(e,i)=>e===!0?i:typeof e=="string"?Jt(i,e):void 0;function Zf(e,i,t,n,s){for(let o of i){let a=Gf(t,o);if(a){e.add(a);let r=wl(a._fallback,t,s);if(typeof r<"u"&&r!==t&&r!==n)return r;}else if(a===!1&&typeof n<"u"&&t!==n)return null;}return!1;}function _o(e,i,t,n){let s=i._rootScopes,o=wl(i._fallback,t,n),a=[...e,...s],r=new Set();r.add(n);let l=tl(r,a,t,o||t,n);return l===null||typeof o<"u"&&o!==t&&(l=tl(r,a,o,l,n),l===null)?!1:$n(Array.from(r),[""],s,o,()=>Qf(i,t,n));}function tl(e,i,t,n,s){for(;t;)t=Zf(e,i,t,n,s);return t;}function Qf(e,i,t){let n=e._getTarget();i in n||(n[i]={});let s=n[i];return G(s)&&j(t)?t:s||{};}function Jf(e,i,t,n){let s;for(let o of i)if(s=Pl(Yf(o,e),t),typeof s<"u")return go(e,s)?_o(t,n,e,s):s;}function Pl(e,i){for(let t of i){if(!t)continue;let n=t[e];if(typeof n<"u")return n;}}function el(e){let i=e._keys;
17return i||(i=e._keys=tp(e._scopes)),i;}function tp(e){let i=new Set();for(let t of e)for(let n of Object.keys(t).filter(s=>!s.startsWith("_")))i.add(n);return Array.from(i);}function xo(e,i,t,n){let{iScale:s}=e,{key:o="r"}=this._parsing,a=new Array(n),r,l,c,d;for(r=0,l=n;r<l;++r)c=r+t,d=i[c],a[r]={r:s.parse(Jt(d,o),c)};return a;}var ep=Number.EPSILON||1e-14,He=(e,i)=>i<e.length&&!e[i].skip&&e[i],Ml=e=>e==="x"?"y":"x";function ip(e,i,t,n){let s=e.skip?i:e,o=i,a=t.skip?i:t,r=Rn(o,s),l=Rn(a,o),c=r/(r+l),d=l/(r+l);c=isNaN(c)?0:c,d=isNaN(d)?0:d;let h=n*c,u=n*d;return{previous:{x:o.x-h*(a.x-s.x),y:o.y-h*(a.y-s.y)},next:{x:o.x+u*(a.x-s.x),y:o.y+u*(a.y-s.y)}};}function np(e,i,t){let n=e.length,s,o,a,r,l,c=He(e,0);for(let d=0;d<n-1;++d)if(l=c,c=He(e,d+1),!(!l||!c)){if(Ue(i[d],0,ep)){t[d]=t[d+1]=0;continue;}s=t[d]/i[d],o=t[d+1]/i[d],r=Math.pow(s,2)+Math.pow(o,2),!(r<=9)&&(a=3/Math.sqrt(r),t[d]=s*a*i[d],t[d+1]=o*a*i[d]);}}function sp(e,i,t="x"){let n=Ml(t),s=e.length,o,a,r,l=He(e,0);for(let c=0;c<s;++c){if(a=r,r=l,l=He(e,c+1),!r)continue;let d=r[t],h=r[n];a&&(o=(d-a[t])/3,r[`cp1${t}`]=d-o,r[`cp1${n}`]=h-o*i[c]),l&&(o=(l[t]-d)/3,r[`cp2${t}`]=d+o,r[`cp2${n}`]=h+o*i[c]);}}function op(e,i="x"){let t=Ml(i),n=e.length,s=Array(n).fill(0),o=Array(n),a,r,l,c=He(e,0);for(a=0;a<n;++a)if(r=l,l=c,c=He(e,a+1),!!l){if(c){let d=c[i]-l[i];s[a]=d!==0?(c[t]-l[t])/d:0;}o[a]=r?c?Ft(s[a-1])!==Ft(s[a])?0:(s[a-1]+s[a])/2:s[a-1]:s[a];}np(e,s,o),sp(e,o,i);}function Dn(e,i,t){return Math.max(Math.min(e,t),i);}function ap(e,i){let t,n,s,o,a,r=Vt(e[0],i);for(t=0,n=e.length;t<n;++t)a=o,o=r,r=t<n-1&&Vt(e[t+1],i),o&&(s=e[t],a&&(s.cp1x=Dn(s.cp1x,i.left,i.right),s.cp1y=Dn(s.cp1y,i.top,i.bottom)),r&&(s.cp2x=Dn(s.cp2x,i.left,i.right),s.cp2y=Dn(s.cp2y,i.top,i.bottom)));}function Ol(e,i,t,n,s){let o,a,r,l;if(i.spanGaps&&(e=e.filter(c=>!c.skip)),i.cubicInterpolationMode==="monotone")op(e,s);else{let c=n?e[e.length-1]:e[0];for(o=0,a=e.length;o<a;++o)r=e[o],l=ip(c,r,e[Math.min(o+1,a-(n?0:1))%a],i.tension),r.cp1x=l.previous.x,r.cp1y=l.previous.y,r.cp2x=l.next.x,r.cp2y=l.next.y,c=r;}i.capBezierPoints&&ap(e,t);}function Un(){return typeof window<"u"&&typeof document<"u";}function Yn(e){let i=e.parentNode;return i&&i.toString()==="[object ShadowRoot]"&&(i=i.host),i;}function Fn(e,i,t){let n;return typeof e=="string"?(n=parseInt(e,10),e.indexOf("%")!==-1&&(n=n/100*i.parentNode[t])):n=e,n;}var qn=e=>e.ownerDocument.defaultView.getComputedStyle(e,null);function rp(e,i){return qn(e).getPropertyValue(i);}var lp=["top","right","bottom","left"];function ke(e,i,t){let n={};t=t?"-"+t:"";for(let s=0;s<4;s++){let o=lp[s];n[o]=parseFloat(e[i+"-"+o+t])||0;}return n.width=n.left+n.right,n.height=n.top+n.bottom,n;}var cp=(e,i,t)=>(e>0||i>0)&&(!t||!t.shadowRoot);function dp(e,i){let t=e.touches,n=t&&t.length?t[0]:e,{offsetX:s,offsetY:o}=n,a=!1,r,l;if(cp(s,o,e.target))r=s,l=o;else{let c=i.getBoundingClientRect();r=n.clientX-c.left,l=n.clientY-c.top,a=!0;}return{x:r,y:l,box:a};}function pe(e,i){if("native"in e)return e;let{canvas:t,currentDevicePixelRatio:n}=i,s=qn(t),o=s.boxSizing==="border-box",a=ke(s,"padding"),r=ke(s,"border","width"),{x:l,y:c,box:d}=dp(e,t),h=a.left+(d&&r.left),u=a.top+(d&&r.top),{width:f,height:m}=i;return o&&(f-=a.width+r.width,m-=a.height+r.height),{x:Math.round((l-h)/f*t.width/n),y:Math.round((c-u)/m*t.height/n)};}function hp(e,i,t){let n,s;if(i===void 0||t===void 0){let o=e&&Yn(e);if(!o)i=e.clientWidth,t=e.clientHeight;else{let a=o.getBoundingClientRect(),r=qn(o),l=ke(r,"border","width"),c=ke(r,"padding");i=a.width-c.width-l.width,t=a.height-c.height-l.height,n=Fn(r.maxWidth,o,"clientWidth"),s=Fn(r.maxHeight,o,"clientHeight");}}return{width:i,height:t,maxWidth:n||Ln,maxHeight:s||Ln};}var En=e=>Math.round(e*10)/10;function kl(e,i,t,n){let s=qn(e),o=ke(s,"margin"),a=Fn(s.maxWidth,e,"clientWidth")||Ln,r=Fn(s.maxHeight,e,"clientHeight")||Ln,l=hp(e,i,t),{width:c,height:d}=l;if(s.boxSizing==="content-box"){let u=ke(s,"border","width"),f=ke(s,"padding");c-=f.width+u.width,d-=f.height+u.height;}return c=Math.max(0,c-o.width),d=Math.max(0,n?c/n:d-o.height),c=En(Math.min(c,a,l.maxWidth)),d=En(Math.min(d,r,l.maxHeight)),c&&!d&&(d=En(c/2)),(i!==void 0||t!==void 0)&&n&&l.height&&d>l.height&&(d=l.height,c=En(Math.floor(d*n))),{width:c,height:d};}function bo(e,i,t){let n=i||1,s=Math.floor(e.height*n),o=Math.floor(e.width*n);e.height=Math.floor(e.height),e.width=Math.floor(e.width);let a=e.canvas;return a.style&&(t||!a.style.height&&!a.style.width)&&(a.style.height=`${e.height}px`,a.style.width=`${e.width}px`),e.currentDevicePixelRatio!==n||a.height!==s||a.width!==o?(e.currentDevicePixelRatio=n,a.height=s,a.width=o,e.ctx.setTransform(n,0,0,n,0,0),!0):!1;}var Tl=function(){let e=!1;
vendor: 14,478 bytes, line 17
17try{let i={get passive(){return e=!0,!1;}};Un()&&(window.addEventListener("test",null,i),window.removeEventListener("test",null,i));}catch{}return e;}();function yo(e,i){let t=rp(e,i),n=t&&t.match(/^(\d+)(\.\d+)?px$/);return n?+n[1]:void 0;}function ce(e,i,t,n){return{x:e.x+t*(i.x-e.x),y:e.y+t*(i.y-e.y)};}function Al(e,i,t,n){return{x:e.x+t*(i.x-e.x),y:n==="middle"?t<.5?e.y:i.y:n==="after"?t<1?e.y:i.y:t>0?i.y:e.y};}function Dl(e,i,t,n){let s={x:e.cp2x,y:e.cp2y},o={x:i.cp1x,y:i.cp1y},a=ce(e,s,t),r=ce(s,o,t),l=ce(o,i,t),c=ce(a,r,t),d=ce(r,l,t);return ce(c,d,t);}var up=function(e,i){return{x(t){return e+e+i-t;},setWidth(t){i=t;},textAlign(t){return t==="center"?t:t==="right"?"left":"right";},xPlus(t,n){return t-n;},leftForLtr(t,n){return t-n;}};},fp=function(){return{x(e){return e;},setWidth(e){},textAlign(e){return e;},xPlus(e,i){return e+i;},leftForLtr(e,i){return e;}};};function De(e,i,t){return e?up(i,t):fp();}function vo(e,i){let t,n;(i==="ltr"||i==="rtl")&&(t=e.canvas.style,n=[t.getPropertyValue("direction"),t.getPropertyPriority("direction")],t.setProperty("direction",i,"important"),e.prevTextDirection=n);}function Co(e,i){i!==void 0&&(delete e.prevTextDirection,e.canvas.style.setProperty("direction",i[0],i[1]));}function El(e){return e==="angle"?{between:Ye,compare:Af,normalize:Ct}:{between:Ht,compare:(i,t)=>i-t,normalize:i=>i};}function il({start:e,end:i,count:t,loop:n,style:s}){return{start:e%t,end:i%t,loop:n&&(i-e+1)%t===0,style:s};}function pp(e,i,t){let{property:n,start:s,end:o}=t,{between:a,normalize:r}=El(n),l=i.length,{start:c,end:d,loop:h}=e,u,f;if(h){for(c+=l,d+=l,u=0,f=l;u<f&&a(r(i[c%l][n]),s,o);++u)c--,d--;c%=l,d%=l;}return d<c&&(d+=l),{start:c,end:d,loop:h,style:e.style};}function So(e,i,t){if(!t)return[e];let{property:n,start:s,end:o}=t,a=i.length,{compare:r,between:l,normalize:c}=El(n),{start:d,end:h,loop:u,style:f}=pp(e,i,t),m=[],g=!1,x=null,v,p,_,b=()=>l(s,_,v)&&r(s,_)!==0,y=()=>r(o,v)===0||l(o,_,v),P=()=>g||b(),O=()=>!g||y();for(let M=d,A=d;M<=h;++M)p=i[M%a],!p.skip&&(v=c(p[n]),v!==_&&(g=l(v,s,o),x===null&&P()&&(x=r(v,s)===0?M:A),x!==null&&O()&&(m.push(il({start:x,end:M,loop:u,count:a,style:f})),x=null),A=M,_=v));return x!==null&&m.push(il({start:x,end:h,loop:u,count:a,style:f})),m;}function wo(e,i){let t=[],n=e.segments;for(let s=0;s<n.length;s++){let o=So(n[s],e.points,i);o.length&&t.push(...o);}return t;}function mp(e,i,t,n){let s=0,o=i-1;if(t&&!n)for(;s<i&&!e[s].skip;)s++;for(;s<i&&e[s].skip;)s++;for(s%=i,t&&(o+=s);o>s&&e[o%i].skip;)o--;return o%=i,{start:s,end:o};}function gp(e,i,t,n){let s=e.length,o=[],a=i,r=e[i],l;for(l=i+1;l<=t;++l){let c=e[l%s];c.skip||c.stop?r.skip||(n=!1,o.push({start:i%s,end:(l-1)%s,loop:n}),i=a=c.stop?l:null):(a=l,r.skip&&(i=l)),r=c;}return a!==null&&o.push({start:i%s,end:a%s,loop:n}),o;}function Il(e,i){let t=e.points,n=e.options.spanGaps,s=t.length;if(!s)return[];let o=!!e._loop,{start:a,end:r}=mp(t,s,o,n);if(n===!0)return nl(e,[{start:a,end:r,loop:o}],t,i);let l=r<a?r+s:r,c=!!e._fullLoop&&a===0&&r===s-1;return nl(e,gp(t,a,l,c),t,i);}function nl(e,i,t,n){return!n||!n.setContext||!t?i:_p(e,i,t,n);}function _p(e,i,t,n){let s=e._chart.getContext(),o=sl(e.options),{_datasetIndex:a,options:{spanGaps:r}}=e,l=t.length,c=[],d=o,h=i[0].start,u=h;function f(m,g,x,v){let p=r?-1:1;if(m!==g){for(m+=l;t[m%l].skip;)m-=p;for(;t[g%l].skip;)g+=p;m%l!==g%l&&(c.push({start:m%l,end:g%l,loop:x,style:v}),d=v,h=g%l);}}for(let m of i){h=r?h:m.start;let g=t[h%l],x;for(u=h+1;u<=m.end;u++){let v=t[u%l];x=sl(n.setContext(te(s,{type:"segment",p0:g,p1:v,p0DataIndex:(u-1)%l,p1DataIndex:u%l,datasetIndex:a}))),xp(x,d)&&f(h,u-1,m.loop,d),g=v,d=x;}h<u-1&&f(h,u-1,m.loop,d);}return c;}function sl(e){return{backgroundColor:e.backgroundColor,borderCapStyle:e.borderCapStyle,borderDash:e.borderDash,borderDashOffset:e.borderDashOffset,borderJoinStyle:e.borderJoinStyle,borderWidth:e.borderWidth,borderColor:e.borderColor};}function xp(e,i){if(!i)return!1;let t=[],n=function(s,o){return co(o)?(t.includes(o)||t.push(o),t.indexOf(o)):o;};return JSON.stringify(e,n)!==JSON.stringify(i,n);}var Ro=class{constructor(){this._request=null,this._charts=new Map(),this._running=!1,this._lastDate=void 0;}_notify(i,t,n,s){let o=t.listeners[s],a=t.duration;o.forEach(r=>r({chart:i,initial:t.initial,numSteps:a,currentStep:Math.min(n-t.start,a)}));}_refresh(){this._request||(this._running=!0,this._request=oo.call(window,()=>{this._update(),this._request=null,this._running&&this._refresh();}));}_update(i=Date.now()){let t=0;this._charts.forEach((n,s)=>{if(!n.running||!n.items.length)return;let o=n.items,a=o.length-1,r=!1,l;for(;a>=0;--a)l=o[a],l._active?(l._total>n.duration&&(n.duration=l._total),l.tick(i),r=!0):(o[a]=o[o.length-1],o.pop());r&&(s.draw(),this._notify(s,n,i,"progress")),o.length||(n.running=!1,this._notify(s,n,i,"complete"),n.initial=!1),t+=o.length;}),this._lastDate=i,t===0&&(this._running=!1);}_getAnims(i){let t=this._charts,n=t.get(i);return n||(n={running:!1,initial:!0,items:[],listeners:{complete:[],progress:[]}},t.set(i,n)),n;}listen(i,t,n){this._getAnims(i).listeners[t].push(n);}add(i,t){!t||!t.length||this._getAnims(i).items.push(...t);}has(i){return this._getAnims(i).items.length>0;}start(i){let t=this._charts.get(i);t&&(t.running=!0,t.start=Date.now(),t.duration=t.items.reduce((n,s)=>Math.max(n,s._duration),0),this._refresh());}running(i){if(!this._running)return!1;let t=this._charts.get(i);return!(!t||!t.running||!t.items.length);}stop(i){let t=this._charts.get(i);if(!t||!t.items.length)return;let n=t.items,s=n.length-1;for(;s>=0;--s)n[s].cancel();t.items=[],this._notify(i,t,Date.now(),"complete");}remove(i){return this._charts.delete(i);}},ee=new Ro(),Ll="transparent",bp={boolean(e,i,t){return t>.5?i:e;},color(e,i,t){let n=ho(e||Ll),s=n.valid&&ho(i||Ll);return s&&s.valid?s.mix(n,t).hexString():i;},number(e,i,t){return e+(i-e)*t;}},Fo=class{constructor(i,t,n,s){let o=t[n];s=Ke([i.to,s,o,i.from]);let a=Ke([i.from,o,s]);this._active=!0,this._fn=i.fn||bp[i.type||typeof a],this._easing=Ve[i.easing]||Ve.linear,this._start=Math.floor(Date.now()+(i.delay||0)),this._duration=this._total=Math.floor(i.duration),this._loop=!!i.loop,this._target=t,this._prop=n,this._from=a,this._to=s,this._promises=void 0;}active(){return this._active;}update(i,t,n){if(this._active){this._notify(!1);let s=this._target[this._prop],o=n-this._start,a=this._duration-o;this._start=n,this._duration=Math.floor(Math.max(a,i.duration)),this._total+=o,this._loop=!!i.loop,this._to=Ke([i.to,t,s,i.from]),this._from=Ke([i.from,s,t]);}}cancel(){this._active&&(this.tick(Date.now()),this._active=!1,this._notify(!1));}tick(i){let t=i-this._start,n=this._duration,s=this._prop,o=this._from,a=this._loop,r=this._to,l;if(this._active=o!==r&&(a||t<n),!this._active){this._target[s]=r,this._notify(!0);return;}if(t<0){this._target[s]=o;return;}l=t/n%2,l=a&&l>1?2-l:l,l=this._easing(Math.min(1,Math.max(0,l))),this._target[s]=this._fn(o,r,l);}wait(){let i=this._promises||(this._promises=[]);return new Promise((t,n)=>{i.push({res:t,rej:n});});}_notify(i){let t=i?"res":"rej",n=this._promises||[];for(let s=0;s<n.length;s++)n[s][t]();}},ns=class{constructor(i,t){this._chart=i,this._properties=new Map(),this.configure(t);}configure(i){if(!j(i))return;let t=Object.keys(K.animation),n=this._properties;Object.getOwnPropertyNames(i).forEach(s=>{let o=i[s];if(!j(o))return;let a={};for(let r of t)a[r]=o[r];(G(o.properties)&&o.properties||[s]).forEach(r=>{(r===s||!n.has(r))&&n.set(r,a);});});}_animateOptions(i,t){let n=t.options,s=vp(i,n);if(!s)return[];let o=this._createAnimations(s,n);return n.$shared&&yp(i.options.$animations,n).then(()=>{i.options=n;},()=>{}),o;}_createAnimations(i,t){let n=this._properties,s=[],o=i.$animations||(i.$animations={}),a=Object.keys(t),r=Date.now(),l;for(l=a.length-1;l>=0;--l){let c=a[l];if(c.charAt(0)==="$")continue;if(c==="options"){s.push(...this._animateOptions(i,t));continue;}let d=t[c],h=o[c],u=n.get(c);if(h)if(u&&h.active()){h.update(u,d,r);continue;}else h.cancel();if(!u||!u.duration){i[c]=d;continue;}o[c]=h=new Fo(u,i,c,d),s.push(h);}return s;}update(i,t){if(this._properties.size===0){Object.assign(i,t);return;}let n=this._createAnimations(i,t);if(n.length)return ee.add(this._chart,n),!0;}};function yp(e,i){let t=[],n=Object.keys(i);for(let s=0;s<n.length;s++){let o=e[n[s]];o&&o.active()&&t.push(o.wait());}return Promise.all(t);}function vp(e,i){if(!i)return;let t=e.options;if(!t){e.options=i;return;}return t.$shared&&(e.options=t=Object.assign({},t,{$shared:!1,$animations:{}})),t;}function Rl(e,i){let t=e&&e.options||{},n=t.reverse,s=t.min===void 0?i:0,o=t.max===void 0?i:0;return{start:n?o:s,end:n?s:o};}function Cp(e,i,t){if(t===!1)return!1;let n=Rl(e,t),s=Rl(i,t);return{top:s.end,right:n.end,bottom:s.start,left:n.start};}function Sp(e){let i,t,n,s;return j(e)?(i=e.top,t=e.right,n=e.bottom,s=e.left):i=t=n=s=e,{top:i,right:t,bottom:n,left:s,disabled:e===!1};}function Lc(e,i){let t=[],n=e._getSortedDatasetMetas(i),s,o;for(s=0,o=n.length;s<o;++s)t.push(n[s].index);return t;}function Fl(e,i,t,n={}){let s=e.keys,o=n.mode==="single",a,r,l,c;if(i===null)return;let d=!1;for(a=0,r=s.length;a<r;++a){if(l=+s[a],l===t){if(d=!0,n.all)continue;break;}c=e.values[l],at(c)&&(o||i===0||Ft(i)===Ft(c))&&(i+=c);}return!d&&!n.all?0:i;}function wp(e,i){let{iScale:t,vScale:n}=i,s=t.axis==="x"?"x":"y",o=n.axis==="x"?"x":"y",a=Object.keys(e),r=new Array(a.length),l,c,d;for(l=0,c=a.length;l<c;++l)d=a[l],r[l]={[s]:d,[o]:e[d]};return r;}function Po(e,i){let t=e&&e.options.stacked;return t||t===void 0&&i.stack!==void 0;}function Pp(e,i,t){return`${e.id}.${i.id}.${t.stack||t.type}`;}function Mp(e){let{min:i,max:t,minDefined:n,maxDefined:s}=e.getUserBounds();return{min:n?i:Number.NEGATIVE_INFINITY,max:s?t:Number.POSITIVE_INFINITY};}function Op(e,i,t){let n=e[i]||(e[i]={});return n[t]||(n[t]={});}function zl(e,i,t,n){for(let s of i.getMatchingVisibleMetas(n).reverse()){let o=e[s.index];if(t&&o>0||!t&&o<0)return s.index;}return null;}function Bl(e,i){let{chart:t,_cachedMeta:n}=e,s=t._stacks||(t._stacks={}),{iScale:o,vScale:a,index:r}=n,l=o.axis,c=a.axis,d=Pp(o,a,n),h=i.length,u;for(let f=0;f<h;++f){let m=i[f],{[l]:g,[c]:x}=m,v=m._stacks||(m._stacks={});u=v[c]=Op(s,d,g),u[r]=x,u._top=zl(u,a,!0,n.type),u._bottom=zl(u,a,!1,n.type);let p=u._visualValues||(u._visualValues={});p[r]=x;}}function Mo(e,i){let t=e.scales;return Object.keys(t).filter(n=>t[n].axis===i).shift();}function kp(e,i){return te(e,{active:!1,dataset:void 0,datasetIndex:i,index:i,mode:"default",type:"dataset"});}function Tp(e,i,t){return te(e,{active:!1,dataIndex:i,parsed:void 0,raw:void 0,element:t,index:i,mode:"default",type:"data"});}function Ti(e,i){let t=e.controller.index,n=e.vScale&&e.vScale.axis;if(n){i=i||e._parsed;for(let s of i){let o=s._stacks;if(!o||o[n]===void 0||o[n][t]===void 0)return;delete o[n][t],o[n]._visualValues!==void 0&&o[n]._visualValues[t]!==void 0&&delete o[n]._visualValues[t];}}}var Oo=e=>e==="reset"||e==="none",Nl=(e,i)=>i?e:Object.assign({},e),Ap=(e,i,t)=>e&&!i.hidden&&i._stacked&&{keys:Lc(t,!0),values:null},ge=(()=>{class e{static defaults={};static datasetElementType=null;static dataElementType=null;constructor(t,n){this.chart=t,this._ctx=t.ctx,this.index=n,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(){let t=this._cachedMeta;this.configure(),this.linkScales(),t._stacked=Po(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&&Ti(this._cachedMeta),this.index=t;}linkScales(){let t=this.chart,n=this._cachedMeta,s=this.getDataset(),o=(u,f,m,g)=>u==="x"?f:u==="r"?g:m,a=n.xAxisID=L(s.xAxisID,Mo(t,"x")),r=n.yAxisID=L(s.yAxisID,Mo(t,"y")),l=n.rAxisID=L(s.rAxisID,Mo(t,"r")),c=n.indexAxis,d=n.iAxisID=o(c,a,r,l),h=n.vAxisID=o(c,r,a,l);n.xScale=this.getScaleForId(a),n.yScale=this.getScaleForId(r),n.rScale=this.getScaleForId(l),n.iScale=this.getScaleForId(d),n.vScale=this.getScaleForId(h);}getDataset(){return this.chart.data.datasets[this.index];}getMeta(){return this.chart.getDatasetMeta(this.index);}getScaleForId(t){return this.chart.scales[t];}_getOtherScale(t){let n=this._cachedMeta;return t===n.iScale?n.vScale:n.iScale;}reset(){this._update("reset");}_destroy(){let t=this._cachedMeta;this._data&&no(this._data,this),t._stacked&&Ti(t);}_dataCheck(){let t=this.getDataset(),n=t.data||(t.data=[]),s=this._data;if(j(n)){let o=this._cachedMeta;this._data=wp(n,o);}else if(s!==n){if(s){no(s,this);let o=this._cachedMeta;Ti(o),o._parsed=[];}n&&Object.isExtensible(n)&&ml(n,this),this._syncList=[],this._data=n;}}addElements(){let t=this._cachedMeta;this._dataCheck(),this.datasetElementType&&(t.dataset=new this.datasetElementType());}buildOrUpdateElements(t){let n=this._cachedMeta,s=this.getDataset(),o=!1;this._dataCheck();let a=n._stacked;n._stacked=Po(n.vScale,n),n.stack!==s.stack&&(o=!0,Ti(n),n.stack=s.stack),this._resyncElements(t),(o||a!==n._stacked)&&(Bl(this,n._parsed),n._stacked=Po(n.vScale,n));}configure(){let t=this.chart.config,n=t.datasetScopeKeys(this._type),s=t.getOptionScopes(this.getDataset(),n,!0);this.options=t.createResolver(s,this.getContext()),this._parsing=this.options.parsing,this._cachedDataOpts={};}parse(t,n){let{_cachedMeta:s,_data:o}=this,{iScale:a,_stacked:r}=s,l=a.axis,c=t===0&&n===o.length?!0:s._sorted,d=t>0&&s._parsed[t-1],h,u,f;if(this._parsing===!1)s._parsed=o,s._sorted=!0,f=o;else{G(o[t])?f=this.parseArrayData(s,o,t,n):j(o[t])?f=this.parseObjectData(s,o,t,n):f=this.parsePrimitiveData(s,o,t,n);let m=()=>u[l]===null||d&&u[l]<d[l];for(h=0;h<n;++h)s._parsed[h+t]=u=f[h],c&&(m()&&(c=!1),d=u);s._sorted=c;}r&&Bl(this,f);}parsePrimitiveData(t,n,s,o){let{iScale:a,vScale:r}=t,l=a.axis,c=r.axis,d=a.getLabels(),h=a===r,u=new Array(o),f,m,g;for(f=0,m=o;f<m;++f)g=f+s,u[f]={[l]:h||a.parse(d[g],g),[c]:r.parse(n[g],g)};return u;}parseArrayData(t,n,s,o){let{xScale:a,yScale:r}=t,l=new Array(o),c,d,h,u;
17for(c=0,d=o;c<d;++c)h=c+s,u=n[h],l[c]={x:a.parse(u[0],h),y:r.parse(u[1],h)};return l;}parseObjectData(t,n,s,o){let{xScale:a,yScale:r}=t,{xAxisKey:l="x",yAxisKey:c="y"}=this._parsing,d=new Array(o),h,u,f,m;for(h=0,u=o;h<u;++h)f=h+s,m=n[f],d[h]={x:a.parse(Jt(m,l),f),y:r.parse(Jt(m,c),f)};return d;}getParsed(t){return this._cachedMeta._parsed[t];}getDataElement(t){return this._cachedMeta.data[t];}applyStack(t,n,s){let o=this.chart,a=this._cachedMeta,r=n[t.axis],l={keys:Lc(o,!0),values:n._stacks[t.axis]._visualValues};return Fl(l,r,a.index,{mode:s});}updateRangeFromParsed(t,n,s,o){let a=s[n.axis],r=a===null?NaN:a,l=o&&s._stacks[n.axis];o&&l&&(o.values=l,r=Fl(o,a,this._cachedMeta.index)),t.min=Math.min(t.min,r),t.max=Math.max(t.max,r);}getMinMax(t,n){let s=this._cachedMeta,o=s._parsed,a=s._sorted&&t===s.iScale,r=o.length,l=this._getOtherScale(t),c=Ap(n,s,this.chart),d={min:Number.POSITIVE_INFINITY,max:Number.NEGATIVE_INFINITY},{min:h,max:u}=Mp(l),f,m;function g(){m=o[f];let x=m[l.axis];return!at(m[t.axis])||h>x||u<x;}for(f=0;f<r&&!(!g()&&(this.updateRangeFromParsed(d,t,m,c),a));++f);if(a){for(f=r-1;f>=0;--f)if(!g()){this.updateRangeFromParsed(d,t,m,c);break;}}return d;}getAllParsedValues(t){let n=this._cachedMeta._parsed,s=[],o,a,r;for(o=0,a=n.length;o<a;++o)r=n[o][t.axis],at(r)&&s.push(r);return s;}getMaxOverflow(){return!1;}getLabelAndValue(t){let n=this._cachedMeta,s=n.iScale,o=n.vScale,a=this.getParsed(t);return{label:s?""+s.getLabelForValue(a[s.axis]):"",value:o?""+o.getLabelForValue(a[o.axis]):""};}_update(t){let n=this._cachedMeta;this.update(t||"default"),n._clip=Sp(L(this.options.clip,Cp(n.xScale,n.yScale,this.getMaxOverflow())));}update(t){}draw(){let t=this._ctx,n=this.chart,s=this._cachedMeta,o=s.data||[],a=n.chartArea,r=[],l=this._drawStart||0,c=this._drawCount||o.length-l,d=this.options.drawActiveElementsOnTop,h;for(s.dataset&&s.dataset.draw(t,a,l,c),h=l;h<l+c;++h){let u=o[h];u.hidden||(u.active&&d?r.push(u):u.draw(t,a));}for(h=0;h<r.length;++h)r[h].draw(t,a);}getStyle(t,n){let s=n?"active":"default";return t===void 0&&this._cachedMeta.dataset?this.resolveDatasetElementOptions(s):this.resolveDataElementOptions(t||0,s);}getContext(t,n,s){let o=this.getDataset(),a;if(t>=0&&t<this._cachedMeta.data.length){let r=this._cachedMeta.data[t];a=r.$context||(r.$context=Tp(this.getContext(),t,r)),a.parsed=this.getParsed(t),a.raw=o.data[t],a.index=a.dataIndex=t;}else a=this.$context||(this.$context=kp(this.chart.getContext(),this.index)),a.dataset=o,a.index=a.datasetIndex=this.index;return a.active=!!n,a.mode=s,a;}resolveDatasetElementOptions(t){return this._resolveElementOptions(this.datasetElementType.id,t);}resolveDataElementOptions(t,n){return this._resolveElementOptions(this.dataElementType.id,n,t);}_resolveElementOptions(t,n="default",s){let o=n==="active",a=this._cachedDataOpts,r=t+"-"+n,l=a[r],c=this.enableOptionSharing&&$e(s);if(l)return Nl(l,c);let d=this.chart.config,h=d.datasetElementScopeKeys(this._type,t),u=o?[`${t}Hover`,"hover",t,""]:[t,""],f=d.getOptionScopes(this.getDataset(),h),m=Object.keys(K.elements[t]),g=()=>this.getContext(s,o,n),x=d.resolveNamedOptions(f,m,g,u);return x.$shared&&(x.$shared=c,a[r]=Object.freeze(Nl(x,c))),x;}_resolveAnimations(t,n,s){let o=this.chart,a=this._cachedDataOpts,r=`animation-${n}`,l=a[r];if(l)return l;let c;if(o.options.animation!==!1){let h=this.chart.config,u=h.datasetAnimationScopeKeys(this._type,n),f=h.getOptionScopes(this.getDataset(),u);c=h.createResolver(f,this.getContext(t,s,n));}let d=new ns(o,c&&c.animations);return c&&c._cacheable&&(a[r]=Object.freeze(d)),d;}getSharedOptions(t){if(t.$shared)return this._sharedOptions||(this._sharedOptions=Object.assign({},t));}includeOptions(t,n){return!n||Oo(t)||this.chart._animationsDisabled;}_getSharedOptions(t,n){let s=this.resolveDataElementOptions(t,n),o=this._sharedOptions,a=this.getSharedOptions(s),r=this.includeOptions(n,a)||a!==o;return this.updateSharedOptions(a,n,s),{sharedOptions:a,includeOptions:r};}updateElement(t,n,s,o){Oo(o)?Object.assign(t,s):this._resolveAnimations(n,o).update(t,s);}updateSharedOptions(t,n,s){t&&!Oo(n)&&this._resolveAnimations(void 0,n).update(t,s);}_setStyle(t,n,s,o){t.active=o;let a=this.getStyle(n,o);
vendor: 5,494 bytes, line 17
17this._resolveAnimations(n,s,o).update(t,{options:!o&&this.getSharedOptions(a)||a});}removeHoverStyle(t,n,s){this._setStyle(t,s,"active",!1);}setHoverStyle(t,n,s){this._setStyle(t,s,"active",!0);}_removeDatasetHoverStyle(){let t=this._cachedMeta.dataset;t&&this._setStyle(t,void 0,"active",!1);}_setDatasetHoverStyle(){let t=this._cachedMeta.dataset;t&&this._setStyle(t,void 0,"active",!0);}_resyncElements(t){let n=this._data,s=this._cachedMeta.data;for(let[l,c,d]of this._syncList)this[l](c,d);this._syncList=[];let o=s.length,a=n.length,r=Math.min(a,o);r&&this.parse(0,r),a>o?this._insertElements(o,a-o,t):a<o&&this._removeElements(a,o-a);}_insertElements(t,n,s=!0){let o=this._cachedMeta,a=o.data,r=t+n,l,c=d=>{for(d.length+=n,l=d.length-1;l>=r;l--)d[l]=d[l-n];};for(c(a),l=t;l<r;++l)a[l]=new this.dataElementType();this._parsing&&c(o._parsed),this.parse(t,n),s&&this.updateElements(a,t,n,"reset");}updateElements(t,n,s,o){}_removeElements(t,n){let s=this._cachedMeta;if(this._parsing){let o=s._parsed.splice(t,n);s._stacked&&Ti(s,o);}s.data.splice(t,n);}_sync(t){if(this._parsing)this._syncList.push(t);else{let[n,s,o]=t;this[n](s,o);}this.chart._dataChanges.push([this.index,...t]);}_onDataPush(){let 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,n){n&&this._sync(["_removeElements",t,n]);let s=arguments.length-2;s&&this._sync(["_insertElements",t,s]);}_onDataUnshift(){this._sync(["_insertElements",0,arguments.length]);}}return e;})();function Dp(e,i){if(!e._cache.$bar){let t=e.getMatchingVisibleMetas(i),n=[];for(let s=0,o=t.length;s<o;s++)n=n.concat(t[s].controller.getAllParsedValues(e));e._cache.$bar=so(n.sort((s,o)=>s-o));}return e._cache.$bar;}function Ep(e){let i=e.iScale,t=Dp(i,e.type),n=i._length,s,o,a,r,l=()=>{a===32767||a===-32768||($e(r)&&(n=Math.min(n,Math.abs(a-r)||n)),r=a);};for(s=0,o=t.length;s<o;++s)a=i.getPixelForValue(t[s]),l();for(r=void 0,s=0,o=i.ticks.length;s<o;++s)a=i.getPixelForTick(s),l();return n;}function Ip(e,i,t,n){let s=t.barThickness,o,a;return W(s)?(o=i.min*t.categoryPercentage,a=t.barPercentage):(o=s*n,a=1),{chunk:o/n,ratio:a,start:i.pixels[e]-o/2};}function Lp(e,i,t,n){let s=i.pixels,o=s[e],a=e>0?s[e-1]:null,r=e<s.length-1?s[e+1]:null,l=t.categoryPercentage;a===null&&(a=o-(r===null?i.end-i.start:r-o)),r===null&&(r=o+o-a);let c=o-(o-Math.min(a,r))/2*l;return{chunk:Math.abs(r-a)/2*l/n,ratio:t.barPercentage,start:c};}function Rp(e,i,t,n){let s=t.parse(e[0],n),o=t.parse(e[1],n),a=Math.min(s,o),r=Math.max(s,o),l=a,c=r;Math.abs(a)>Math.abs(r)&&(l=r,c=a),i[t.axis]=c,i._custom={barStart:l,barEnd:c,start:s,end:o,min:a,max:r};}function Rc(e,i,t,n){return G(e)?Rp(e,i,t,n):i[t.axis]=t.parse(e,n),i;}function Vl(e,i,t,n){let s=e.iScale,o=e.vScale,a=s.getLabels(),r=s===o,l=[],c,d,h,u;for(c=t,d=t+n;c<d;++c)u=i[c],h={},h[s.axis]=r||s.parse(a[c],c),l.push(Rc(u,h,o,c));return l;}function ko(e){return e&&e.barStart!==void 0&&e.barEnd!==void 0;}function Fp(e,i,t){return e!==0?Ft(e):(i.isHorizontal()?1:-1)*(i.min>=t?1:-1);}function zp(e){let i,t,n,s,o;return e.horizontal?(i=e.base>e.x,t="left",n="right"):(i=e.base<e.y,t="bottom",n="top"),i?(s="end",o="start"):(s="start",o="end"),{start:t,end:n,reverse:i,top:s,bottom:o};}function Bp(e,i,t,n){let s=i.borderSkipped,o={};if(!s){e.borderSkipped=o;return;}if(s===!0){e.borderSkipped={top:!0,right:!0,bottom:!0,left:!0};return;}let{start:a,end:r,reverse:l,top:c,bottom:d}=zp(e);s==="middle"&&t&&(e.enableBorderRadius=!0,(t._top||0)===n?s=c:(t._bottom||0)===n?s=d:(o[jl(d,a,r,l)]=!0,s=c)),o[jl(s,a,r,l)]=!0,e.borderSkipped=o;}function jl(e,i,t,n){return n?(e=Np(e,i,t),e=Hl(e,t,i)):e=Hl(e,i,t),e;}function Np(e,i,t){return e===i?t:e===t?i:e;}function Hl(e,i,t){return e==="start"?i:e==="end"?t:e;}function Vp(e,{inflateAmount:i},t){e.inflateAmount=i==="auto"?t===1?.33:0:i;}var jp=(()=>{class e extends ge{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,n,s,o){return Vl(t,n,s,o);}parseArrayData(t,n,s,o){return Vl(t,n,s,o);}parseObjectData(t,n,s,o){let{iScale:a,vScale:r}=t,{xAxisKey:l="x",yAxisKey:c="y"}=this._parsing,d=a.axis==="x"?l:c,h=r.axis==="x"?l:c,u=[],f,m,g,x;for(f=s,m=s+o;f<m;++f)x=n[f],g={},g[a.axis]=a.parse(Jt(x,d),f),u.push(Rc(Jt(x,h),g,r,f));return u;}updateRangeFromParsed(t,n,s,o){super.updateRangeFromParsed(t,n,s,o);let a=s._custom;a&&n===this._cachedMeta.vScale&&(t.min=Math.min(t.min,a.min),t.max=Math.max(t.max,a.max));}getMaxOverflow(){return 0;}getLabelAndValue(t){let n=this._cachedMeta,{iScale:s,vScale:o}=n,a=this.getParsed(t),r=a._custom,l=ko(r)?"["+r.start+", "+r.end+"]":""+o.getLabelForValue(a[o.axis]);return{label:""+s.getLabelForValue(a[s.axis]),value:l};}initialize(){this.enableOptionSharing=!0,super.initialize();let t=this._cachedMeta;t.stack=this.getDataset().stack;}update(t){let n=this._cachedMeta;this.updateElements(n.data,0,n.data.length,t);}updateElements(t,n,s,o){let a=o==="reset",{index:r,_cachedMeta:{vScale:l}}=this,c=l.getBasePixel(),d=l.isHorizontal(),h=this._getRuler(),{sharedOptions:u,includeOptions:f}=this._getSharedOptions(n,o);for(let m=n;m<n+s;
17m++){let g=this.getParsed(m),x=a||W(g[l.axis])?{base:c,head:c}:this._calculateBarValuePixels(m),v=this._calculateBarIndexPixels(m,h),p=(g._stacks||{})[l.axis],_={horizontal:d,base:x.base,enableBorderRadius:!p||ko(g._custom)||r===p._top||r===p._bottom,x:d?x.head:v.center,y:d?v.center:x.head,height:d?v.size:Math.abs(x.size),width:d?Math.abs(x.size):v.size};f&&(_.options=u||this.resolveDataElementOptions(m,t[m].active?"active":o));let b=_.options||t[m].options;Bp(_,b,p,r),Vp(_,b,h.ratio),this.updateElement(t[m],m,_,o);}}_getStacks(t,n){let{iScale:s}=this._cachedMeta,o=s.getMatchingVisibleMetas(this._type).filter(h=>h.controller.options.grouped),a=s.options.stacked,r=[],l=this._cachedMeta.controller.getParsed(n),c=l&&l[s.axis],d=h=>{let u=h._parsed.find(m=>m[s.axis]===c),f=u&&u[h.vScale.axis];if(W(f)||isNaN(f))return!0;};for(let h of o)if(!(n!==void 0&&d(h))&&((a===!1||r.indexOf(h.stack)===-1||a===void 0&&h.stack===void 0)&&r.push(h.stack),h.index===t))break;return r.length||r.push(void 0),r;}_getStackCount(t){return this._getStacks(void 0,t).length;}_getStackIndex(t,n,s){let o=this._getStacks(t,s),a=n!==void 0?o.indexOf(n):-1;return a===-1?o.length-1:a;}_getRuler(){let t=this.options,n=this._cachedMeta,s=n.iScale,o=[],a,r;for(a=0,r=n.data.length;a<r;++a)o.push(s.getPixelForValue(this.getParsed(a)[s.axis],a));let l=t.barThickness;return{min:l||Ep(n),pixels:o,start:s._startPixel,end:s._endPixel,stackCount:this._getStackCount(),scale:s,grouped:t.grouped,ratio:l?1:t.categoryPercentage*t.barPercentage};}_calculateBarValuePixels(t){let{_cachedMeta:{vScale:n,_stacked:s,index:o},options:{base:a,minBarLength:r}}=this,l=a||0,c=this.getParsed(t),d=c._custom,h=ko(d),u=c[n.axis],f=0,m=s?this.applyStack(n,c,s):u,g,x;m!==u&&(f=m-u,m=u),h&&(u=d.barStart,m=d.barEnd-d.barStart,u!==0&&Ft(u)!==Ft(d.barEnd)&&(f=0),f+=u);let v=!W(a)&&!h?a:f,p=n.getPixelForValue(v);if(this.chart.getDataVisibility(t)?g=n.getPixelForValue(f+m):g=p,x=g-p,Math.abs(x)<r){x=Fp(x,n,l)*r,u===l&&(p-=x/2);let _=n.getPixelForDecimal(0),b=n.getPixelForDecimal(1),y=Math.min(_,b),P=Math.max(_,b);p=Math.max(Math.min(p,P),y),g=p+x,s&&!h&&(c._stacks[n.axis]._visualValues[o]=n.getValueForPixel(g)-n.getValueForPixel(p));}if(p===n.getPixelForValue(l)){let _=Ft(x)*n.getLineWidthForValue(l)/2;p+=_,x-=_;}return{size:x,base:p,head:g,center:g+x/2};}_calculateBarIndexPixels(t,n){let s=n.scale,o=this.options,a=o.skipNull,r=L(o.maxBarThickness,1/0),l,c;if(n.grouped){let d=a?this._getStackCount(t):n.stackCount,h=o.barThickness==="flex"?Lp(t,n,o,d):Ip(t,n,o,d),u=this._getStackIndex(this.index,this._cachedMeta.stack,a?t:void 0);l=h.start+h.chunk*u+h.chunk/2,c=Math.min(r,h.chunk*h.ratio);}else l=s.getPixelForValue(this.getParsed(t)[s.axis],t),c=Math.min(r,n.min*n.ratio);return{base:l-c/2,head:l+c/2,center:l,size:c};}draw(){let t=this._cachedMeta,n=t.vScale,s=t.data,o=s.length,a=0;for(;a<o;++a)this.getParsed(a)[n.axis]!==null&&!s[a].hidden&&s[a].draw(this._ctx);}}return e;})(),Hp=(()=>{class e extends ge{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,n,s,o){let a=super.parsePrimitiveData(t,n,s,o);for(let r=0;r<a.length;r++)a[r]._custom=this.resolveDataElementOptions(r+s).radius;return a;}parseArrayData(t,n,s,o){let a=super.parseArrayData(t,n,s,o);for(let r=0;r<a.length;r++){let l=n[s+r];a[r]._custom=L(l[2],this.resolveDataElementOptions(r+s).radius);}return a;}parseObjectData(t,n,s,o){let a=super.parseObjectData(t,n,s,o);for(let r=0;r<a.length;r++){let l=n[s+r];a[r]._custom=L(l&&l.r&&+l.r,this.resolveDataElementOptions(r+s).radius);}return a;}getMaxOverflow(){let t=this._cachedMeta.data,n=0;for(let s=t.length-1;s>=0;--s)n=Math.max(n,t[s].size(this.resolveDataElementOptions(s))/2);return n>0&&n;}getLabelAndValue(t){let n=this._cachedMeta,s=this.chart.data.labels||[],{xScale:o,yScale:a}=n,r=this.getParsed(t),l=o.getLabelForValue(r.x),c=a.getLabelForValue(r.y),d=r._custom;return{label:s[t]||"",value:"("+l+", "+c+(d?", "+d:"")+")"};}update(t){let n=this._cachedMeta.data;this.updateElements(n,0,n.length,t);}updateElements(t,n,s,o){let a=o==="reset",{iScale:r,vScale:l}=this._cachedMeta,{sharedOptions:c,includeOptions:d}=this._getSharedOptions(n,o),h=r.axis,u=l.axis;for(let f=n;f<n+s;f++){let m=t[f],g=!a&&this.getParsed(f),x={},v=x[h]=a?r.getPixelForDecimal(.5):r.getPixelForValue(g[h]),p=x[u]=a?l.getBasePixel():l.getPixelForValue(g[u]);x.skip=isNaN(v)||isNaN(p),d&&(x.options=c||this.resolveDataElementOptions(f,m.active?"active":o),a&&(x.options.radius=0)),this.updateElement(m,f,x,o);}}resolveDataElementOptions(t,n){let s=this.getParsed(t),o=super.resolveDataElementOptions(t,n);o.$shared&&(o=Object.assign({},o,{$shared:!1}));let a=o.radius;return n!=="active"&&(o.radius=0),o.radius+=L(s&&s._custom,a),o;}}return e;})();function Wp(e,i,t){let n=1,s=1,o=0,a=0;
17if(i<Q){let r=e,l=r+i,c=Math.cos(r),d=Math.sin(r),h=Math.cos(l),u=Math.sin(l),f=(_,b,y)=>Ye(_,r,l,!0)?1:Math.max(b,b*t,y,y*t),m=(_,b,y)=>Ye(_,r,l,!0)?-1:Math.min(b,b*t,y,y*t),g=f(0,c,h),x=f(rt,d,u),v=m(Z,c,h),p=m(Z+rt,d,u);n=(g-v)/2,s=(x-p)/2,o=-(g+v)/2,a=-(x+p)/2;}return{ratioX:n,ratioY:s,offsetX:o,offsetY:a};}var ia=(()=>{class e extends ge{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=>t!=="spacing",_indexable:t=>t!=="spacing"&&!t.startsWith("borderDash")&&!t.startsWith("hoverBorderDash")};static overrides={aspectRatio:1,plugins:{legend:{labels:{generateLabels(t){let n=t.data;if(n.labels.length&&n.datasets.length){let{labels:{pointStyle:s,color:o}}=t.legend.options;return n.labels.map((a,r)=>{let c=t.getDatasetMeta(0).controller.getStyle(r);return{text:a,fillStyle:c.backgroundColor,strokeStyle:c.borderColor,fontColor:o,lineWidth:c.borderWidth,pointStyle:s,hidden:!t.getDataVisibility(r),index:r};});}return[];}},onClick(t,n,s){s.chart.toggleDataVisibility(n.index),s.chart.update();}}}};constructor(t,n){super(t,n),this.enableOptionSharing=!0,this.innerRadius=void 0,this.outerRadius=void 0,this.offsetX=void 0,this.offsetY=void 0;}linkScales(){}parse(t,n){let s=this.getDataset().data,o=this._cachedMeta;if(this._parsing===!1)o._parsed=s;else{let a=c=>+s[c];if(j(s[t])){let{key:c="value"}=this._parsing;a=d=>+Jt(s[d],c);}let r,l;for(r=t,l=t+n;r<l;++r)o._parsed[r]=a(r);}}_getRotation(){return Dt(this.options.rotation-90);}_getCircumference(){return Dt(this.options.circumference);}_getRotationExtents(){let t=Q,n=-Q;for(let s=0;s<this.chart.data.datasets.length;++s)if(this.chart.isDatasetVisible(s)&&this.chart.getDatasetMeta(s).type===this._type){let o=this.chart.getDatasetMeta(s).controller,a=o._getRotation(),r=o._getCircumference();t=Math.min(t,a),n=Math.max(n,a+r);}return{rotation:t,circumference:n-t};}update(t){let n=this.chart,{chartArea:s}=n,o=this._cachedMeta,a=o.data,r=this.getMaxBorderWidth()+this.getMaxOffset(a
17)+this.options.spacing,l=Math.max((Math.min(s.width,s.height)-r)/2,0),c=Math.min(al(this.options.cutout,l),1),d=this._getRingWeight(this.index),{circumference:h,rotation:u}=this._getRotationExtents(),{ratioX:f,ratioY:m,offsetX:g,offsetY:x}=Wp(u,h,c),v=(s.width-r)/f,p=(s.height-r)/m,_=Math.max(Math.min(v,p)/2,0),b=Zs(this.options.radius,_),y=Math.max(b*c,0),P=(b-y)/this._getVisibleDatasetWeightTotal();this.offsetX=g*b,this.offsetY=x*b,o.total=this.calculateTotal(),this.outerRadius=b-P*this._getRingWeightOffset(this.index),this.innerRadius=Math.max(this.outerRadius-P*d,0),this.updateElements(a,0,a.length,t);}_circumference(t,n){let s=this.options,o=this._cachedMeta,a=this._getCircumference();return n&&s.animation.animateRotate||!this.chart.getDataVisibility(t)||o._parsed[t]===null||o.data[t].hidden?0:this.calculateCircumference(o._parsed[t]*a/Q);}updateElements(t,n,s,o){let a=o==="reset",r=this.chart,l=r.chartArea,d=r.options.animation,h=(l.left+l.right)/2,u=(l.top+l.bottom)/2,f=a&&d.animateScale,m=f?0:this.innerRadius,g=f?0:this.outerRadius,{sharedOptions:x,includeOptions:v}=this._getSharedOptions(n,o),p=this._getRotation(),_;for(_=0;_<n;++_)p+=this._circumference(_,a);for(_=n;_<n+s;++_){let b=this._circumference(_,a),y=t[_],P={x:h+this.offsetX,y:u+this.offsetY,startAngle:p,endAngle:p+b,circumference:b,outerRadius:g,innerRadius:m};v&&(P.options=x||this.resolveDataElementOptions(_,y.active?"active":o)),p+=b,this.updateElement(y,_,P,o);}}calculateTotal(){let t=this._cachedMeta,n=t.data,s=0,o;for(o=0;o<n.length;o++){let a=t._parsed[o];a!==null&&!isNaN(a)&&this.chart.getDataVisibility(o)&&!n[o].hidden&&(s+=Math.abs(a));}return s;}calculateCircumference(t){let n=this._cachedMeta.total;return n>0&&!isNaN(t)?Q*(Math.abs(t)/n):0;}getLabelAndValue(t){let n=this._cachedMeta,s=this.chart,o=s.data.labels||[],a=qe(n._parsed[t],s.options.locale);return{label:o[t]||"",value:a};}getMaxBorderWidth(t){let n=0,s=this.chart,o,a,r,l,c;if(!t){for(o=0,a=s.data.datasets.length;o<a;++o)if(s.isDatasetVisible(o)){r=s.getDatasetMeta(o),t=r.data,l=r.controller;break;}}if(!t)return 0;for(o=0,a=t.length;o<a;++o)c=l.resolveDataElementOptions(o),c.borderAlign!=="inner"&&(n=Math.max(n,c.borderWidth||0,c.hoverBorderWidth||0));return n;}getMaxOffset(t){let n=0;for(let s=0,o=t.length;s<o;++s){let a=this.resolveDataElementOptions(s);n=Math.max(n,a.offset||0,a.hoverOffset||0);}return n;}_getRingWeightOffset(t){let n=0;for(let s=0;s<t;++s)this.chart.isDatasetVisible(s)&&(n+=this._getRingWeight(s));return n;}_getRingWeight(t){return Math.max(L(this.chart.data.datasets[t].weight,1),0);}_getVisibleDatasetWeightTotal(){return this._getRingWeightOffset(this.chart.data.datasets.length)||1;}}return e;})(),$p=(()=>{class e extends ge{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){let n=this._cachedMeta,{dataset:s,data:o=[],_dataset:a}=n,r=this.chart._animationsDisabled,{start:l,count:c}=ro(n,o,r);this._drawStart=l,this._drawCount=c,lo(n)&&(l=0,c=o.length),s._chart=this.chart,s._datasetIndex=this.index,s._decimated=!!a._decimated,s.points=o;let d=this.resolveDatasetElementOptions(t);this.options.showLine||(d.borderWidth=0),d.segment=this.options.segment,this.updateElement(s,void 0,{animated:!r,options:d},t),this.updateElements(o,l,c,t);}updateElements(t,n,s,o){let a=o==="reset",{iScale:r,vScale:l,_stacked:c,_dataset:d}=this._cachedMeta,{sharedOptions:h,includeOptions:u}=this._getSharedOptions(n,o),f=r.axis,m=l.axis,{spanGaps:g,segment:x}=this.options,v=Ae(g)?g:Number.POSITIVE_INFINITY,p=this.chart._animationsDisabled||a||o==="none",_=n+s,b=t.length,y=n>0&&this.getParsed(n-1);for(let P=0;P<b;++P){let O=t[P],M=p?O:{};if(P<n||P>=_){M.skip=!0;continue;}let A=this.getParsed(P),F=W(A[m]),R=M[f]=r.getPixelForValue(A[f],P),H=M[m]=a||F?l.getBasePixel():l.getPixelForValue(c?this.applyStack(l,A,c):A[m],P);M.skip=isNaN(R)||isNaN(H)||F,M.stop=P>0&&Math.abs(A[f]-y[f])>v,x&&(M.parsed=A,M.raw=d.data[P]),u&&(M.options=h||this.resolveDataElementOptions(P,O.active?"active":o)),p||this.updateElement(O,P,M,o),y=A;}}getMaxOverflow(){let t=this._cachedMeta,n=t.dataset,s=n.options&&n.options.borderWidth||0,o=t.data||[];if(!o.length)return s;let a=o[0].size(this.resolveDataElementOptions(0)),r=o[o.length-1].size(this.resolveDataElementOptions(o.length-1));return Math.max(s,a,r)/2;}draw(){let t=this._cachedMeta;t.dataset.updateControlPoints(this.chart.chartArea,t.iScale.axis),super.draw();}}return e;})(),Fc=(()=>{class e extends ge{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){let n=t.data;if(n.labels.length&&n.datasets.length){let{labels:{pointStyle:s,color:o}}=t.legend.options;return n.labels.map((a,r)=>
17{let c=t.getDatasetMeta(0).controller.getStyle(r);return{text:a,fillStyle:c.backgroundColor,strokeStyle:c.borderColor,fontColor:o,lineWidth:c.borderWidth,pointStyle:s,hidden:!t.getDataVisibility(r),index:r};});}return[];}},onClick(t,n,s){s.chart.toggleDataVisibility(n.index),s.chart.update();}}},scales:{r:{type:"radialLinear",angleLines:{display:!1},beginAtZero:!0,grid:{circular:!0},pointLabels:{display:!1},startAngle:0}}};constructor(t,n){super(t,n),this.innerRadius=void 0,this.outerRadius=void 0;}getLabelAndValue(t){let n=this._cachedMeta,s=this.chart,o=s.data.labels||[],a=qe(n._parsed[t].r,s.options.locale);return{label:o[t]||"",value:a};}parseObjectData(t,n,s,o){return xo.bind(this)(t,n,s,o);}update(t){let n=this._cachedMeta.data;this._updateRadius(),this.updateElements(n,0,n.length,t);}getMinMax(){let t=this._cachedMeta,n={min:Number.POSITIVE_INFINITY,max:Number.NEGATIVE_INFINITY};return t.data.forEach((s,o)=>{let a=this.getParsed(o).r;!isNaN(a)&&this.chart.getDataVisibility(o)&&(a<n.min&&(n.min=a),a>n.max&&(n.max=a));}),n;}_updateRadius(){let t=this.chart,n=t.chartArea,s=t.options,o=Math.min(n.right-n.left,n.bottom-n.top),a=Math.max(o/2,0),r=Math.max(s.cutoutPercentage?a/100*s.cutoutPercentage:1,0),l=(a-r)/t.getVisibleDatasetCount();this.outerRadius=a-l*this.index,this.innerRadius=this.outerRadius-l;}updateElements(t,n,s,o){let a=o==="reset",r=this.chart,c=r.options.animation,d=this._cachedMeta.rScale,h=d.xCenter,u=d.yCenter,f=d.getIndexAngle(0)-.5*Z,m=f,g,x=360/this.countVisibleElements();for(g=0;g<n;++g)m+=this._computeAngle(g,o,x);for(g=n;g<n+s;g++){let v=t[g],p=m,_=m+this._computeAngle(g,o,x),b=r.getDataVisibility(g)?d.getDistanceFromCenterForValue(this.getParsed(g).r):0;m=_,a&&(c.animateScale&&(b=0),c.animateRotate&&(p=_=f));let y={x:h,y:u,innerRadius:0,outerRadius:b,startAngle:p,endAngle:_,options:this.resolveDataElementOptions(g,v.active?"active":o)};this.updateElement(v,g,y,o);}}countVisibleElements(){let t=this._cachedMeta,n=0;return t.data.forEach((s,o)=>{!isNaN(this.getParsed(o).r)&&this.chart.getDataVisibility(o)&&n++;}),n;}_computeAngle(t,n,s){return this.chart.getDataVisibility(t)?Dt(this.resolveDataElementOptions(t,n).angle||s):0;}}return e;})(),Up=(()=>{class e extends ia{static id="pie";static defaults={cutout:0,rotation:0,circumference:360,radius:"100%"};}return e;})(),Yp=(()=>{class e extends ge{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){let n=this._cachedMeta.vScale,s=this.getParsed(t);return{label:n.getLabels()[t],value:""+n.getLabelForValue(s[n.axis])};}parseObjectData(t,n,s,o){return xo.bind(this)(t,n,s,o);}update(t){let n=this._cachedMeta,s=n.dataset,o=n.data||[],a=n.iScale.getLabels();if(s.points=o,t!=="resize"){let r=this.resolveDatasetElementOptions(t);this.options.showLine||(r.borderWidth=0);let l={_loop:!0,_fullLoop:a.length===o.length,options:r};this.updateElement(s,void 0,l,t);}this.updateElements(o,0,o.length,t);}updateElements(t,n,s,o){let a=this._cachedMeta.rScale,r=o==="reset";for(let l=n;l<n+s;l++){let c=t[l],d=this.resolveDataElementOptions(l,c.active?"active":o),h=a.getPointPositionForValue(l,this.getParsed(l).r),u=r?a.xCenter:h.x,f=r?a.yCenter:h.y,m={x:u,y:f,angle:h.angle,skip:isNaN(u)||isNaN(f),options:d};this.updateElement(c,l,m,o);}}}return e;})(),qp=(()=>{class e extends ge{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){let n=this._cachedMeta,s=this.chart.data.labels||[],{xScale:o,yScale:a}=n,r=this.getParsed(t),l=o.getLabelForValue(r.x),c=a.getLabelForValue(r.y);return{label:s[t]||"",value:"("+l+", "+c+")"};}update(t){let n=this._cachedMeta,{data:s=[]}=n,o=this.chart._animationsDisabled,{start:a,count:r}=ro(n,s,o);if(this._drawStart=a,this._drawCount=r,lo(n)&&(a=0,r=s.length),this.options.showLine){this.datasetElementType||this.addElements();let{dataset:l,_dataset:c}=n;l._chart=this.chart,l._datasetIndex=this.index,l._decimated=!!c._decimated,l.points=s;let d=this.resolveDatasetElementOptions(t);d.segment=this.options.segment,this.updateElement(l,void 0,{animated:!o,options:d},t);}else this.datasetElementType&&(delete n.dataset,this.datasetElementType=!1);this.updateElements(s,a,r,t);}addElements(){let{showLine:t}=this.options;!this.datasetElementType&&t&&(this.datasetElementType=this.chart.registry.getElement("line")),super.addElements();}updateElements(t,n,s,o){let a=o==="reset",{iScale:r,vScale:l,_stacked:c,_dataset:
17d}=this._cachedMeta,h=this.resolveDataElementOptions(n,o),u=this.getSharedOptions(h),f=this.includeOptions(o,u),m=r.axis,g=l.axis,{spanGaps:x,segment:v}=this.options,p=Ae(x)?x:Number.POSITIVE_INFINITY,_=this.chart._animationsDisabled||a||o==="none",b=n>0&&this.getParsed(n-1);for(let y=n;y<n+s;++y){let P=t[y],O=this.getParsed(y),M=_?P:{},A=W(O[g]),F=M[m]=r.getPixelForValue(O[m],y),R=M[g]=a||A?l.getBasePixel():l.getPixelForValue(c?this.applyStack(l,O,c):O[g],y);M.skip=isNaN(F)||isNaN(R)||A,M.stop=y>0&&Math.abs(O[m]-b[m])>p,v&&(M.parsed=O,M.raw=d.data[y]),f&&(M.options=u||this.resolveDataElementOptions(y,P.active?"active":o)),_||this.updateElement(P,y,M,o),b=O;}this.updateSharedOptions(u,o,h);}getMaxOverflow(){let t=this._cachedMeta,n=t.data||[];if(!this.options.showLine){let l=0;for(let c=n.length-1;c>=0;--c)l=Math.max(l,n[c].size(this.resolveDataElementOptions(c))/2);return l>0&&l;}let s=t.dataset,o=s.options&&s.options.borderWidth||0;if(!n.length)return o;let a=n[0].size(this.resolveDataElementOptions(0)),r=n[n.length-1].size(this.resolveDataElementOptions(n.length-1));return Math.max(o,a,r)/2;}}return e;})(),Xp=Object.freeze({__proto__:null,BarController:jp,BubbleController:Hp,DoughnutController:ia,LineController:$p,PieController:Up,PolarAreaController:Fc,RadarController:Yp,ScatterController:qp});function Ee(){throw new Error("This method is not implemented: Check that a complete date adapter is provided.");}var zo=class e{static override(i){Object.assign(e.prototype,i);}options;constructor(i){this.options=i||{};}init(){}formats(){return Ee();}parse(){return Ee();}format(){return Ee();}add(){return Ee();}diff(){return Ee();}startOf(){return Ee();}endOf(){return Ee();}},Kp={_date:zo};function Gp(e,i,t,n){let{controller:s,data:o,_sorted:a}=e,r=s._cachedMeta.iScale;if(r&&i===r.axis&&i!=="r"&&a&&o.length){let l=r._reversePixels?ul:Nt;if(n){if(s._sharedOptions){let c=o[0],d=typeof c.getRange=="function"&&c.getRange(i);if(d){let h=l(o,i,t-d),u=l(o,i,t+d);return{lo:h.lo,hi:u.hi};}}}else return l(o,i,t);}return{lo:0,hi:o.length-1};}function Ni(e,i,t,n,s){let o=e.getSortedVisibleDatasetMetas(),a=t[i];for(let r=0,l=o.length;r<l;++r){let{index:c,data:d}=o[r],{lo:h,hi:u}=Gp(o[r],i,a,s);for(let f=h;f<=u;++f){let m=d[f];m.skip||n(m,c,f);}}}function Zp(e){let i=e.indexOf("x")!==-1,t=e.indexOf("y")!==-1;return function(n,s){let o=i?Math.abs(n.x-s.x):0,a=t?Math.abs(n.y-s.y):0;return Math.sqrt(Math.pow(o,2)+Math.pow(a,2));};}function To(e,i,t,n,s){let o=[];return!s&&!e.isPointInArea(i)||Ni(e,t,i,function(r,l,c){!s&&!Vt(r,e.chartArea,0)||r.inRange(i.x,i.y,n)&&o.push({element:r,datasetIndex:l,index:c});},!0),o;}function Qp(e,i,t,n){let s=[];function o(a,r,l){let{startAngle:c,endAngle:d}=a.getProps(["startAngle","endAngle"],n),{angle:h}=io(a,{x:i.x,y:i.y});Ye(h,c,d)&&s.push({element:a,datasetIndex:r,index:l});}return Ni(e,t,i,o),s;}function Jp(e,i,t,n,s,o){let a=[],r=Zp(t),l=Number.POSITIVE_INFINITY;function c(d,h,u){let f=d.inRange(i.x,i.y,s);if(n&&!f)return;let m=d.getCenterPoint(s);if(!(!!o||e.isPointInArea(m))&&!f)return;let x=r(i,m);x<l?(a=[{element:d,datasetIndex:h,index:u}],l=x):x===l&&a.push({element:d,datasetIndex:h,index:u});}return Ni(e,t,i,c),a;}function Ao(e,i,t,n,s,o){return!o&&!e.isPointInArea(i)?[]:t==="r"&&!n?Qp(e,i,t,s):Jp(e,i,t,n,s,o);}function Wl(e,i,t,n,s){let o=[],a=t==="x"?"inXRange":"inYRange",r=!1;return Ni(e,t,i,(l,c,d)=>{l[a]&&l[a](i[t],s)&&(o.push({element:l,datasetIndex:c,index:d}),r=r||l.inRange(i.x,i.y,s));}),n&&!r?[]:o;}var tm={evaluateInteractionItems:Ni,modes:{index(e,i,t,n){let s=pe(i,e),o=t.axis||"x",a=t.includeInvisible||!1,r=t.intersect?To(e,s,o,n,a):Ao(e,s,o,!1,n,a),l=[];return r.length?(e.getSortedVisibleDatasetMetas().forEach(c=>{let d=r[0].index,h=c.data[d];h&&!h.skip&&l.push({element:h,datasetIndex:c.index,index:d});}),l):[];},dataset(e,i,t,n){let s=pe(i,e),o=t.axis||"xy",a=t.includeInvisible||!1,r=t.intersect?To(e,s,o,n,a):Ao(e,s,o,!1,n,a);if(r.length>0){let l=r[0].datasetIndex,c=e.getDatasetMeta(l).data;r=[];for(let d=0;d<c.length;++d)r.push({element:c[d],datasetIndex:l,index:d});}return r;},point(e,i,t,n){let s=pe(i,e),o=t.axis||"xy",a=t.includeInvisible||!1;return To(e,s,o,n,a);},nearest(e,i,t,n){let s=pe(i,e),o=t.axis||"xy",a=t.includeInvisible||!1;return Ao(e,s,o,t.intersect,n,a);},x(e,i,t,n){let s=pe(i,e);return Wl(e,s,"x",t.intersect,n);},y(e,i,t,n){let s=pe(i,e);return Wl(e,s,"y",t.intersect,n);}}},zc=["left","top","right","bottom"];function Ai(e,i){return e.filter(t=>t.pos===i);}function $l(e,i){return e.filter(t=>zc.indexOf(t.pos)===-1&&t.box.axis===i);}function Di(e,i){return e.sort((t,n)=>{let s=i?n:t,o=i?t:n;return s.weight===o.weight?s.index-o.index:s.weight-o.weight;});}function em(e){let i=[],t,n,s,o,a,r;for(t=0,n=(e||[]).length;t<n;++t)s=e[t],({position:o,options:{stack:a,stackWeight:r=1}}=s),i.push({index:t,box:s,pos:o,horizontal:s.isHorizontal(),weight:s.weight,stack:a&&o+a,stackWeight:r});return i;}function im(e){let i={};for(let t of e){let{stack:n,pos:s,stackWeight:o}=t;if(!n||!zc.includes(s))continue;let a=i[n]||(i[n]={count:0,placed:0,weight:0,size:0});a.count++,a.weight+=o;}return i;}function nm(e,i){let t=im(e),{vBoxMaxWidth:n,hBoxMaxHeight:s}=i,o,a,r;for(o=0,a=e.length;o<a;++o){r=e[o];let{fullSize:l}=r.box,c=t[r.stack],d=c&&r.stackWeight/c.weight;r.horizontal?(r.width=d?d*n:l&&i.availableWidth,r.height=s):(r.width=n,r.he
vendor: 4,130 bytes, line 17
17ight=d?d*s:l&&i.availableHeight);}return t;}function sm(e){let i=em(e),t=Di(i.filter(c=>c.box.fullSize),!0),n=Di(Ai(i,"left"),!0),s=Di(Ai(i,"right")),o=Di(Ai(i,"top"),!0),a=Di(Ai(i,"bottom")),r=$l(i,"x"),l=$l(i,"y");return{fullSize:t,leftAndTop:n.concat(o),rightAndBottom:s.concat(l).concat(a).concat(r),chartArea:Ai(i,"chartArea"),vertical:n.concat(s).concat(l),horizontal:o.concat(a).concat(r)};}function Ul(e,i,t,n){return Math.max(e[t],i[t])+Math.max(e[n],i[n]);}function Bc(e,i){e.top=Math.max(e.top,i.top),e.left=Math.max(e.left,i.left),e.bottom=Math.max(e.bottom,i.bottom),e.right=Math.max(e.right,i.right);}function om(e,i,t,n){let{pos:s,box:o}=t,a=e.maxPadding;if(!j(s)){t.size&&(e[s]-=t.size);let h=n[t.stack]||{size:0,count:1};h.size=Math.max(h.size,t.horizontal?o.height:o.width),t.size=h.size/h.count,e[s]+=t.size;}o.getPadding&&Bc(a,o.getPadding());let r=Math.max(0,i.outerWidth-Ul(a,e,"left","right")),l=Math.max(0,i.outerHeight-Ul(a,e,"top","bottom")),c=r!==e.w,d=l!==e.h;return e.w=r,e.h=l,t.horizontal?{same:c,other:d}:{same:d,other:c};}function am(e){let i=e.maxPadding;function t(n){let s=Math.max(i[n]-e[n],0);return e[n]+=s,s;}e.y+=t("top"),e.x+=t("left"),t("right"),t("bottom");}function rm(e,i){let t=i.maxPadding;function n(s){let o={left:0,top:0,right:0,bottom:0};return s.forEach(a=>{o[a]=Math.max(i[a],t[a]);}),o;}return n(e?["left","right"]:["top","bottom"]);}function Li(e,i,t,n){let s=[],o,a,r,l,c,d;for(o=0,a=e.length,c=0;o<a;++o){r=e[o],l=r.box,l.update(r.width||i.w,r.height||i.h,rm(r.horizontal,i));let{same:h,other:u}=om(i,t,r,n);c|=h&&s.length,d=d||u,l.fullSize||s.push(r);}return c&&Li(s,i,t,n)||d;}function Xn(e,i,t,n,s){e.top=t,e.left=i,e.right=i+n,e.bottom=t+s,e.width=n,e.height=s;}function Yl(e,i,t,n){let s=t.padding,{x:o,y:a}=i;for(let r of e){let l=r.box,c=n[r.stack]||{count:1,placed:0,weight:1},d=r.stackWeight/c.weight||1;if(r.horizontal){let h=i.w*d,u=c.size||l.height;$e(c.start)&&(a=c.start),l.fullSize?Xn(l,s.left,a,t.outerWidth-s.right-s.left,u):Xn(l,i.left+c.placed,a,h,u),c.start=a,c.placed+=h,a=l.bottom;}else{let h=i.h*d,u=c.size||l.width;$e(c.start)&&(o=c.start),l.fullSize?Xn(l,o,s.top,u,t.outerHeight-s.bottom-s.top):Xn(l,o,i.top+c.placed,u,h),c.start=o,c.placed+=h,o=l.right;}}i.x=o,i.y=a;}var gt={addBox(e,i){e.boxes||(e.boxes=[]),i.fullSize=i.fullSize||!1,i.position=i.position||"top",i.weight=i.weight||0,i._layers=i._layers||function(){return[{z:0,draw(t){i.draw(t);}}];},e.boxes.push(i);},removeBox(e,i){let t=e.boxes?e.boxes.indexOf(i):-1;t!==-1&&e.boxes.splice(t,1);},configure(e,i,t){i.fullSize=t.fullSize,i.position=t.position,i.weight=t.weight;},update(e,i,t,n){if(!e)return;let s=pt(e.options.layout.padding),o=Math.max(i-s.width,0),a=Math.max(t-s.height,0),r=sm(e.boxes),l=r.vertical,c=r.horizontal;U(e.boxes,g=>{typeof g.beforeLayout=="function"&&g.beforeLayout();});let d=l.reduce((g,x)=>x.box.options&&x.box.options.display===!1?g:g+1,0)||1,h=Object.freeze({outerWidth:i,outerHeight:t,padding:s,availableWidth:o,availableHeight:a,vBoxMaxWidth:o/2/d,hBoxMaxHeight:a/2}),u=Object.assign({},s);Bc(u,pt(n));let f=Object.assign({maxPadding:u,w:o,h:a,x:s.left,y:s.top},s),m=nm(l.concat(c),h);Li(r.fullSize,f,h,m),Li(l,f,h,m),Li(c,f,h,m)&&Li(l,f,h,m),am(f),Yl(r.leftAndTop,f,h,m),f.x+=f.w,f.y+=f.h,Yl(r.rightAndBottom,f,h,m),e.chartArea={left:f.left,top:f.top,right:f.left+f.w,bottom:f.top+f.h,height:f.h,width:f.w},U(r.chartArea,g=>{let x=g.box;Object.assign(x,e.chartArea),x.update(f.w,f.h,{left:0,top:0,right:0,bottom:0});});}},ss=class{acquireContext(i,t){}releaseContext(i){return!1;}addEventListener(i,t,n){}removeEventListener(i,t,n){}getDevicePixelRatio(){return 1;}getMaximumSize(i,t,n,s){return t=Math.max(0,t||i.width),n=n||i.height,{width:t,height:Math.max(0,s?Math.floor(t/s):n)};}isAttached(i){return!0;}updateConfig(i){}},Bo=class extends ss{acquireContext(i){return i&&i.getContext&&i.getContext("2d")||null;}updateConfig(i){i.options.animation=!1;}},es="$chartjs",lm={touchstart:"mousedown",touchmove:"mousemove",touchend:"mouseup",pointerenter:"mouseenter",pointerdown:"mousedown",pointermove:"mousemove",pointerup:"mouseup",pointerleave:"mou
17seout",pointerout:"mouseout"},ql=e=>e===null||e==="";function cm(e,i){let t=e.style,n=e.getAttribute("height"),s=e.getAttribute("width");if(e[es]={initial:{height:n,width:s,style:{display:t.display,height:t.height,width:t.width}}},t.display=t.display||"block",t.boxSizing=t.boxSizing||"border-box",ql(s)){let o=yo(e,"width");o!==void 0&&(e.width=o);}if(ql(n))if(e.style.height==="")e.height=e.width/(i||2);else{let o=yo(e,"height");o!==void 0&&(e.height=o);}return e;}var Nc=Tl?{passive:!0}:!1;function dm(e,i,t){e&&e.addEventListener(i,t,Nc);}function hm(e,i,t){e&&e.canvas&&e.canvas.removeEventListener(i,t,Nc);}function um(e,i){let t=lm[e.type]||e.type,{x:n,y:s}=pe(e,i);return{type:t,chart:i,native:e,x:n!==void 0?n:null,y:s!==void 0?s:null};}function os(e,i){for(let t of e)if(t===i||t.contains(i))return!0;}function fm(e,i,t){let n=e.canvas,s=new MutationObserver(o=>{let a=!1;for(let r of o)a=a||os(r.addedNodes,n),a=a&&!os(r.removedNodes,n);a&&t();});return s.observe(document,{childList:!0,subtree:!0}),s;}function pm(e,i,t){let n=e.canvas,s=new MutationObserver(o=>{let a=!1;for(let r of o)a=a||os(r.removedNodes,n),a=a&&!os(r.addedNodes,n);a&&t();});return s.observe(document,{childList:!0,subtree:!0}),s;}var Fi=new Map(),Xl=0;function Vc(){let e=window.devicePixelRatio;e!==Xl&&(Xl=e,Fi.forEach((i,t)=>{t.currentDevicePixelRatio!==e&&i();}));}function mm(e,i){Fi.size||window.addEventListener("resize",Vc),Fi.set(e,i);}function gm(e){Fi.delete(e),Fi.size||window.removeEventListener("resize",Vc);}function _m(e,i,t){let n=e.canvas,s=n&&Yn(n);if(!s)return;let o=ao((r,l)=>{let c=s.clientWidth;t(r,l),c<s.clientWidth&&t();},window),a=new ResizeObserver(r=>{let l=r[0],c=l.contentRect.width,d=l.contentRect.height;c===0&&d===0||o(c,d);});return a.observe(s),mm(e,o),a;}function Do(e,i,t){t&&t.disconnect(),i==="resize"&&gm(e);}function xm(e,i,t){let n=e.canvas,s=ao(o=>{e.ctx!==null&&t(um(o,e));},e);return dm(n,i,s),s;}var No=class extends ss{acquireContext(i,t){let n=i&&i.getContext&&i.getContext("2d");return n&&n.canvas===i?(cm(i,t),n):null;}releaseContext(i){let t=i.canvas;if(!t[es])return!1;let n=t[es].initial;["height","width"].forEach(o=>{let a=n[o];W(a)?t.removeAttribute(o):t.setAttribute(o,a);});let s=n.style||{};return Object.keys(s).forEach(o=>{t.style[o]=s[o];}),t.width=t.width,delete t[es],!0;}addEventListener(i,t,n){this.removeEventListener(i,t);let s=i.$proxies||(i.$proxies={}),a={attach:fm,detach:pm,resize:_m}[t]||xm;s[t]=a(i,t,n);}removeEventListener(i,t){let n=i.$proxies||(i.$proxies={}),s=n[t];if(!s)return;(({attach:Do,detach:Do,resize:Do})[t]||hm)(i,t,s),n[t]=void 0;}getDevicePixelRatio(){return window.devicePixelRatio;}getMaximumSize(i,t,n,s){return kl(i,t,n,s);}isAttached(i){let t=i&&Yn(i);return!!(t&&t.isConnected);}};function bm(e){return!Un()||typeof OffscreenCanvas<"u"&&e instanceof OffscreenCanvas?Bo:No;}var zt=class{static defaults={};static defaultRoutes=void 0;x;y;active=!1;options;$animations;tooltipPosition(i){let{x:t,y:n}=this.getProps(["x","y"],i);return{x:t,y:n};}hasValue(){return Ae(this.x)&&Ae(this.y);}getProps(i,t){let n=this.$animations;if(!t||!n)return this;let s={};return i.forEach(o=>{s[o]=n[o]&&n[o].active()?n[o]._to:this[o];}),s;}};function ym(e,i){let t=e.options.ticks,n=vm(e),s=Math.min(t.maxTicksLimit||n,n),o=t.major.enabled?Sm(i):[],a=o.length,r=o[0],l=o[a-1],c=[];if(a>s)return wm(i,c,o,a/s),c;let d=Cm(o,i,s);if(a>0){let h,u,f=a>1?Math.round((l-r)/(a-1)):null;for(Kn(i,c,d,W(f)?0:r-f,r),h=0,u=a-1;h<u;h++)Kn(i,c,d,o[h],o[h+1]);return Kn(i,c,d,l,W(f)?i.length:l+f),c;}return Kn(i,c,d),c;}function vm(e){let i=e.options.offset,t=e._tickSize(),n=e._length/t+(i?0:1),s=e._maxLength/t;return Math.floor(Math.min(n,s));}function Cm(e,i,t){let n=Pm(e),s=i.length/t;if(!n)return Math.max(s,1);let o=cl(n);for(let a=0,r=o.length-1;a<r;a++){let l=o[a];if(l>s)return l;}return Math.max(s,1);}function Sm(e){let i=[],t,n;for(t=0,n=e.length;t<n;t++)e[t].major&&i.push(t);return i;}function wm(e,i,t,n){let s=0,o=t[0],a;for(n=Math.ceil(n),a=0;a<e.length;a++)a===o&&(i.push(e[a]),s++,o=t[s*n]);}function Kn(e,i,t,n,s){let o=L(n,0),a=Math.min(L(s,e.length),e.length),r=0,l,c,d;for(t=Math.ceil(t),s&&(l=s-n,t=l/Math.floor(l/t)),d=o;d<0;)r++,d=Math.round(o+r*t);for(c=Math.max(o,0);c<a;c++)c===d&&(i.push(e[c]),r++,d=Math.round(o+r*t));}function Pm(e){let i=e.length,t,n;if(i<2)return!1;for(n=e[0],t=1;t<i;++t)if(e[t]-e[t-1]!==n)return!1;return n;}var Mm=e=>
vendor: 14,006 bytes, line 17
17e==="left"?"right":e==="right"?"left":e,Kl=(e,i,t)=>i==="top"||i==="left"?e[i]+t:e[i]-t,Gl=(e,i)=>Math.min(i||e,e);function Zl(e,i){let t=[],n=e.length/i,s=e.length,o=0;for(;o<s;o+=n)t.push(e[Math.floor(o)]);return t;}function Om(e,i,t){let n=e.ticks.length,s=Math.min(i,n-1),o=e._startPixel,a=e._endPixel,r=1e-6,l=e.getPixelForTick(s),c;if(!(t&&(n===1?c=Math.max(l-o,a-l):i===0?c=(e.getPixelForTick(1)-l)/2:c=(l-e.getPixelForTick(s-1))/2,l+=s<i?c:-c,l<o-r||l>a+r)))return l;}function km(e,i){U(e,t=>{let n=t.gc,s=n.length/2,o;if(s>i){for(o=0;o<s;++o)delete t.data[n[o]];n.splice(0,s);}});}function Ei(e){return e.drawTicks?e.tickLength:0;}function Ql(e,i){if(!e.display)return 0;let t=ct(e.font,i),n=pt(e.padding);return(G(e.text)?e.text.length:1)*t.lineHeight+n.height;}function Tm(e,i){return te(e,{scale:i,type:"scale"});}function Am(e,i,t){return te(e,{tick:t,index:i,type:"tick"});}function Dm(e,i,t){let n=Vn(e);return(t&&i!=="right"||!t&&i==="right")&&(n=Mm(n)),n;}function Em(e,i,t,n){let{top:s,left:o,bottom:a,right:r,chart:l}=e,{chartArea:c,scales:d}=l,h=0,u,f,m,g=a-s,x=r-o;if(e.isHorizontal()){if(f=ft(n,o,r),j(t)){let v=Object.keys(t)[0],p=t[v];m=d[v].getPixelForValue(p)+g-i;}else t==="center"?m=(c.bottom+c.top)/2+g-i:m=Kl(e,t,i);u=r-o;}else{if(j(t)){let v=Object.keys(t)[0],p=t[v];f=d[v].getPixelForValue(p)-x+i;}else t==="center"?f=(c.left+c.right)/2-x+i:f=Kl(e,t,i);m=ft(n,a,s),h=t==="left"?-rt:rt;}return{titleX:f,titleY:m,maxWidth:u,rotation:h};}var Le=class e extends zt{constructor(i){super(),this.id=i.id,this.type=i.type,this.options=void 0,this.ctx=i.ctx,this.chart=i.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(i){this.options=i.setContext(this.getContext()),this.axis=i.axis,this._userMin=this.parse(i.min),this._userMax=this.parse(i.max),this._suggestedMin=this.parse(i.suggestedMin),this._suggestedMax=this.parse(i.suggestedMax);}parse(i,t){return i;}getUserBounds(){let{_userMin:i,_userMax:t,_suggestedMin:n,_suggestedMax:s}=this;return i=St(i,Number.POSITIVE_INFINITY),t=St(t,Number.NEGATIVE_INFINITY),n=St(n,Number.POSITIVE_INFINITY),s=St(s,Number.NEGATIVE_INFINITY),{min:St(i,n),max:St(t,s),minDefined:at(i),maxDefined:at(t)};}getMinMax(i){let{min:t,max:n,minDefined:s,maxDefined:o}=this.getUserBounds(),a;if(s&&o)return{min:t,max:n};let r=this.getMatchingVisibleMetas();for(let l=0,c=r.length;l<c;++l)a=r[l].controller.getMinMax(this,i),s||(t=Math.min(t,a.min)),o||(n=Math.max(n,a.max));return t=o&&t>n?n:t,n=s&&t>n?t:n,{min:St(t,St(n,t)),max:St(n,St(t,n))};}getPadding(){return{left:this.paddingLeft||0,top:this.paddingTop||0,right:this.paddingRight||0,bottom:this.paddingBottom||0};}getTicks(){return this.ticks;}getLabels(){let i=this.chart.data;return this.options.labels||(this.isHorizontal()?i.xLabels:i.yLabels)||i.labels||[];}getLabelItems(i=this.chart.chartArea){return this._labelItems||(this._labelItems=this._computeLabelItems(i));}beforeLayout(){this._cache={},this._dataLimitsCached=!1;}beforeUpdate(){X(this.options.beforeUpdate,[this]);}update(i,t,n){let{beginAtZero:s,grace:o,ticks:a}=this.options,r=a.sampleSize;this.beforeUpdate(),this.maxWidth=i,this.maxHeight=t,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=Cl(this,o,s),this._dataLimitsCached=!0),this.beforeBuildTicks(),this.ticks=this.buildTicks()||[],this.afterBuildTicks();let l=r<this.ticks.length;this._convertTicksToLabels(l?Zl(this.ticks,r):this.ticks),this.configure(),this.beforeCalculateLabelRotation(),this.calculateLabelRotation(),this.afterCalculateLabelRotation(),a.display&&(a.autoSkip||a.source==="auto")&&(this.ticks=ym(this,this.ticks),this._labelSizes=null,this.afterAutoSkip()),l&&this._convertTicksToLabels(this.ticks),this.beforeFit(),this.fit(),this.afterFit(),this.afterUpdate();}configure(){let i=this.options.reverse,t,n;this.isHorizontal()?(t=this.left,n=this.right):(t=this.top,n=this.bottom,i=!i),this._startPixel=t,this._endPixel=n,this._reversePixels=i,this._length=n-t,this._alignToPixels=this.options.alignToPixels;}afterUpdate(){X(this.options.afterUpdate,[this]);}beforeSetDimensions(){X(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(){X(this.options.afterSetDimensions,[this]);}_callHooks(i){this.chart.notifyPlugins(i,this.getContext()),X(this.options[i],[this]);}beforeDataLimits(){this._callHooks("beforeDataLimits");}determineDataLimits(){}afterDataLimits(){this._callHooks("afterDataLimits");}beforeBuildTicks(){this._callHooks("beforeBuildTicks");}buildTicks(){return[];}afterBuildTicks(){this._callHooks("afterBuildTicks");}beforeTickToLabelConversion(){X(this.options.beforeTickToLabelConversion,[this]);}generateTickLabels(i){let t=this.options.ticks,n,s,o;for(n=0,s=i.length;n<s;n++)o=i[n],o.label=X(t.callback,[o.value,n,i],this);}afterTickToLabelConversion(){X(this.options.afterTickToLabelConversion,[this]);}beforeCalculateLabelRotation(){X(this.options.beforeCalculateLabelRotation,[this]);}calculateLabelRotation(){let i=this.options,t=i.ticks,n=Gl(this.ticks.length,i.ticks.maxTicksLimit),s=t.minRotation||0,o=t.maxRotation,a=s,r,l,c;if(!this._isVisible()||!t.display||s>=o||n<=1||!this.isHorizontal()){this.labelRotation=s;return;}let d=this._getLabelSizes(),h=d.widest.width,u=d.highest.height,f=dt(this.chart.width-h,0,this.maxWidth);r=i.offset?this.maxWidth/n:f/(n-1),h+6>r&&(r=f/(n-(i.offset?.5:1)),l=this.maxHeight-Ei(i.grid)-t.padding-Ql(i.title,this.chart.options.font),c=Math.sqrt(h*h+u*u),a=Bn(Math.min(Math.asin(dt((d.highest.height+6)/r,-1,1)),Math.asin(dt(l/c,-1,1))-Math.asin(dt(u/c,-1,1)))),a=Math.max(s,Math.min(o,a))),this.labelRotation=a;}afterCalculateLabelRotation(){X(this.options.afterCalculateLabelRotation,[this]);}afterAutoSkip(){}beforeFit(){X(this.options.beforeFit,[this]);}fit(){let i={width:0,height:0},{chart:t,options:{ticks:n,title:s,grid:o}}=this,a=this._isVisible(),r=this.isHorizontal();if(a){let l=Ql(s,t.options.font);if(r?(i.width=this.maxWidth,i.height=Ei(o)+l):(i.height=this.maxHeight,i.width=Ei(o)+l),n.display&&this.ticks.length){let{first:c,last:d,widest:h,highest:u}=this._getLabelSizes(),f=n.padding*2,m=Dt(this.labelRotation),g=Math.cos(m),x=Math.sin(m);if(r){let v=n.mirror?0:x*h.width+g*u.height;i.height=Math.min(this.maxHeight,i.height+v+f);}else{let v=n.mirror?0:g*h.width+x*u.height;i.width=Math.min(this.maxWidth,i.width+v+f);}this._calculatePadding(c,d,x,g);}}this._handleMargins(),r?(this.width=this._length=t.width-this._margins.left-this._margins.right,this.height=i.height):(this.width=i.width,this.height=this._length=t.height-this._margins.top-this._margins.bottom);}_calculatePadding(i,t,n,s){let{ticks:{align:o,padding:a},position:r}=this.options,l=this.labelRotation!==0,c=r!=="top"&&this.axis==="x";if(this.isHorizontal()){let d=this.getPixelForTick(0)-this.left,h=this.right-this.getPixelForTick(this.ticks.length-1),u=0,f=0;l?c?(u=s*i.width,f=n*t.height):(u=n*i.height,f=s*t.width):o==="start"?f=t.width:o==="end"?u=i.width:o!=="inner"&&(u=i.width/2,f=t.width/2),this.paddingLeft=Math.max((u-d+a)*this.width/(this.width-d),0),this.paddingRight=Math.max((f-h+a)*this.width/(this.width-h),0);}else{let d=t.height/2,h=i.height/2;o==="start"?(d=0,h=i.height):o==="end"&&(d=t.height,h=0),this.paddingTop=d+a,this.paddingBottom=h+a;}}_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(){X(this.options.afterFit,[this]);}isHorizontal(){let{axis:i,position:t}=this.options;return t==="top"||t==="bottom"||i==="x";}isFullSize(){return this.options.fullSize;}_convertTicksToLabels(i){this.beforeTickToLabelConversion(),this.generateTickLabels(i);let t,n;for(t=0,n=i.length;t<n;t++)W(i[t].label)&&(i.splice(t,1),n--,t--);this.afterTickToLabelConversion();}_getLabelSizes(){let i=this._labelSizes;if(!i){let t=this.options.ticks.sampleSize,n=this.ticks;t<n.length&&(n=Zl(n,t)),this._labelSizes=i=this._computeLabelSizes(n,n.length,this.options.ticks.maxTicksLimit);}return i;}_computeLabelSizes(i,t,n){let{ctx:s,_longestTextCache:o}=this,a=[],r=[],l=Math.floor(t/Gl(t,n)),c=0,d=0,h,u,f,m,g,x,v,p,_,b,y;for(h=0;h<t;h+=l){if(m=i[h].label,g=this._resolveTickFontOptions(h),s.font=x=g.string,v=o[x]=o[x]||{data:{},gc:[]},p=g.lineHeight,_=b=0,!W(m)&&!G(m))_=wi(s,v.data,v.gc,_,m),b=p;else if(G(m))for(u=0,f=m.length;u<f;++u)y=m[u],!W(y)&&!G(y)&&(_=wi(s,v.data,v.gc,_,y),b+=p);a.push(_),r.push(b),c=Math.max(_,c),d=Math.max(b,d);}km(o,t);let P=a.indexOf(c),O=r.indexOf(d),M=A=>({width:a[A]||0,height:r[A]||0});return{first:M(0),last:M(t-1),widest:M(P),highest:M(O),widths:a,heights:r};}getLabelForValue(i){return i;}getPixelForValue(i,t){return NaN;}getValueForPixel(i){}getPixelForTick(i){let t=this.ticks;return i<0||i>t.length-1?null:this.getPixelForValue(t[i].value);}getPixelForDecimal(i){this._reversePixels&&(i=1-i);let t=this._startPixel+i*this._length;return hl(this._alignToPixels?he(this.chart,t,0):t);}getDecimalForPixel(i){let t=(i-this._startPixel)/this._length;return this._reversePixels?1-t:t;}getBasePixel(){return this.getPixelForValue(this.getBaseValue());}getBaseValue(){let{min:i,max:t}=this;return i<0&&t<0?t:i>0&&t>0?i:0;}getContext(i){let t=this.ticks||[];if(i>=0&&i<t.length){let n=t[i];return n.$context||(n.$context=Am(this.getContext(),i,n));}return this.$context||(this.$context=Tm(this.chart.getContext(),this));}_tickSize(){let i=this.options.ticks,t=Dt(this.labelRotation),n=Math.abs(Math.cos(t)),s=Math.abs(Math.sin(t)),o=this._getLabelSizes(),a=i.autoSkipPadding||0,r=o?o.widest.width+a:0,l=o?o.highest.height+a:0;return this.isHorizontal()?l*n>r*s?r/n:l/s:l*s<r*n?l/n:r/s;}_isVisible(){let i=this.options.display;return i!=="auto"?!!i:this.getMatchingVisibleMetas().length>0;}_computeGridLineItems(i){let t=this.axis,n=this.chart,s=this.options,{grid:o,position:a,border:r}=s,l=o.offset,c=this.isHorizontal(),h=this.ticks.length+(l?1:0),u=Ei(o),f=[],m=r.setContext(this.getContext()),g=m.display?m.width:0,x=g/2,v=function(et){return he(n,et,g);},p,_,b,y,P,O,M,A,F,R,H,ut;if(a==="top")p=v(this.bottom),O=this.bottom-u,A=p-x,R=v(i.top)+x,ut=i.bottom;else if(a==="bottom")p=v(this.top),R=i.top,ut=v(i.bottom)-x,O=p+x,A=this.top+u;else if(a==="left")p=v(this.right),P=this.right-u,M=p-x,F=v(i.left)+x,H=i.right;else if(a==="right")p=v(this.left),F=i.left,H=v(i.right)-x,P=p+x,M=this.left+u;else if(t==="x"){if(a==="center")p=v((i.top+i.bottom)/2+.5);else if(j(a)){let et=Object.keys(a)[0],lt=a[et];p=v(this.chart.scales[et].getPixelForValue(lt));}R=i.top,ut=i.bottom,O=p+x,A=O+u;}else if(t==="y"){if(a==="center")p=v((i.left+i.right)/2);else if(j(a)){let et=Object.keys(a)[0],lt=a[et];p=v(this.chart.scales[et].getPixelForValue(lt));}P=p-x,M=P-u,F=i.left,H=i.right;}let Ot=L(s.ticks.maxTicksLimit,h),Y=Math.max(1,Math.ceil(h/Ot));for(_=0;_<h;_+=Y){let et=this.getContext(_),lt=o.setContext(et),It=r.setContext(et),mt=lt.lineWidth,Re=lt.color,Xi=It.dash||[],Fe=It.dashOffset,ci=lt.tickWidth,we=lt.tickColor,di=lt.tickBorderDash||[],Pe=lt.tickBorderDashOffset;b=Om(this,_,l),b!==void 0&&(y=he(n,b,mt),c?P=M=F=H=y:O=A=R=ut=y,f.push({tx1:P,ty1:O,tx2:M,ty2:A,x1:F,y1:R,x2:H,y2:ut,width:mt,color:Re,borderDash:Xi,borderDashOffset:Fe,tickWidth:ci,tickColor:we,tickBorderDash:di,tickBorderDashOffset:Pe}));}return this._ticksLength=h,this._borderValue=p,f;}_computeLabelItems(i){let t=this.axis,n=this.options,{position:s,ticks:o}=n,a=this.isHorizontal(),r=this.ticks,{align:l,crossAlign:c,padding:d,mirror:h}=o,u=Ei(n.grid),f=u+d,m=h?-d:f,g=-Dt(this.labelRotation),x=[],v,p,_,b,y,P,O,M,A,F,R,H,ut="middle";if(s==="top")P=this.bottom-m,O=this._getXAxisLabelAlignment();else if(s==="bottom")P=this.top+m,O=this._getXAxisLabelAlignment();else if(s==="left"){let Y=this._getYAxisLabelAlignment(u);O=Y.textAlign,y=Y.x;}else if(s==="right"){let Y=this._getYAxisLabelAlignment(u);O=Y.textAlign,y=Y.x;}else if(t==="x"){if(s==="center")P=(i.top+i.bottom)/2+f;else if(j(s)){let Y=Object.keys(s)[0],et=s[Y];P=this.chart.scales[Y].getPixelForValue(et)+f;}O=this._getXAxisLabelAlignment();}else if(t==="y"){if(s==="center")y=(i.left+i.right)/2-f;else if(j(s)){let Y=Object.keys(s)[0],et=s[Y];y=this.chart.scales[Y].getPixelForValue(et);}O=this._getYAxisLabelAlignment(u).textAlign;}t==="y"&&(l==="start"?ut="top":l==="end"&&(ut="bottom"));let Ot=this._getLabelSizes();for(v=0,p=r.length;v<p;++v){_=r[v],b=_.label;let Y=o.setContext(this.getContext(v));M=this.getPixelForTick(v)+o.labelOffset,A=this._resolveTickFontOptions(v),F=A.lineHeight,R=G(b)?b.length:1;let et=R/2,lt=Y.color,It=Y.textStrokeColor,mt=Y.textStrokeWidth,Re=O;
17a?(y=M,O==="inner"&&(v===p-1?Re=this.options.reverse?"left":"right":v===0?Re=this.options.reverse?"right":"left":Re="center"),s==="top"?c==="near"||g!==0?H=-R*F+F/2:c==="center"?H=-Ot.highest.height/2-et*F+F:H=-Ot.highest.height+F/2:c==="near"||g!==0?H=F/2:c==="center"?H=Ot.highest.height/2-et*F:H=Ot.highest.height-R*F,h&&(H*=-1),g!==0&&!Y.showLabelBackdrop&&(y+=F/2*Math.sin(g))):(P=M,H=(1-R)*F/2);let Xi;if(Y.showLabelBackdrop){let Fe=pt(Y.backdropPadding),ci=Ot.heights[v],we=Ot.widths[v],di=H-Fe.top,Pe=0-Fe.left;switch(ut){case"middle":di-=ci/2;break;case"bottom":di-=ci;break;}switch(O){case"center":Pe-=we/2;break;case"right":Pe-=we;break;case"inner":v===p-1?Pe-=we:v>0&&(Pe-=we/2);break;}Xi={left:Pe,top:di,width:we+Fe.width,height:ci+Fe.height,color:Y.backdropColor};}x.push({label:b,font:A,textOffset:H,options:{rotation:g,color:lt,strokeColor:It,strokeWidth:mt,textAlign:Re,textBaseline:ut,translation:[y,P],backdrop:Xi}});}return x;}_getXAxisLabelAlignment(){let{position:i,ticks:t}=this.options;if(-Dt(this.labelRotation))return i==="top"?"left":"right";let s="center";return t.align==="start"?s="left":t.align==="end"?s="right":t.align==="inner"&&(s="inner"),s;}_getYAxisLabelAlignment(i){let{position:t,ticks:{crossAlign:n,mirror:s,padding:o}}=this.options,a=this._getLabelSizes(),r=i+o,l=a.widest.width,c,d;return t==="left"?s?(d=this.right+o,n==="near"?c="left":n==="center"?(c="center",d+=l/2):(c="right",d+=l)):(d=this.right-r,n==="near"?c="right":n==="center"?(c="center",d-=l/2):(c="left",d=this.left)):t==="right"?s?(d=this.left+o,n==="near"?c="right":n==="center"?(c="center",d-=l/2):(c="left",d-=l)):(d=this.left+r,n==="near"?c="left":n==="center"?(c="center",d+=l/2):(c="right",d=this.right)):c="right",{textAlign:c,x:d};}_computeLabelArea(){if(this.options.ticks.mirror)return;let i=this.chart,t=this.options.position;if(t==="left"||t==="right")return{top:0,left:this.left,bottom:i.height,right:this.right};
vendor: 3,834 bytes, line 17
17if(t==="top"||t==="bottom")return{top:this.top,left:0,bottom:this.bottom,right:i.width};}drawBackground(){let{ctx:i,options:{backgroundColor:t},left:n,top:s,width:o,height:a}=this;t&&(i.save(),i.fillStyle=t,i.fillRect(n,s,o,a),i.restore());}getLineWidthForValue(i){let t=this.options.grid;if(!this._isVisible()||!t.display)return 0;let s=this.ticks.findIndex(o=>o.value===i);return s>=0?t.setContext(this.getContext(s)).lineWidth:0;}drawGrid(i){let t=this.options.grid,n=this.ctx,s=this._gridLineItems||(this._gridLineItems=this._computeGridLineItems(i)),o,a,r=(l,c,d)=>{!d.width||!d.color||(n.save(),n.lineWidth=d.width,n.strokeStyle=d.color,n.setLineDash(d.borderDash||[]),n.lineDashOffset=d.borderDashOffset,n.beginPath(),n.moveTo(l.x,l.y),n.lineTo(c.x,c.y),n.stroke(),n.restore());};if(t.display)for(o=0,a=s.length;o<a;++o){let l=s[o];t.drawOnChartArea&&r({x:l.x1,y:l.y1},{x:l.x2,y:l.y2},l),t.drawTicks&&r({x:l.tx1,y:l.ty1},{x:l.tx2,y:l.ty2},{color:l.tickColor,width:l.tickWidth,borderDash:l.tickBorderDash,borderDashOffset:l.tickBorderDashOffset});}}drawBorder(){let{chart:i,ctx:t,options:{border:n,grid:s}}=this,o=n.setContext(this.getContext()),a=n.display?o.width:0;if(!a)return;let r=s.setContext(this.getContext(0)).lineWidth,l=this._borderValue,c,d,h,u;this.isHorizontal()?(c=he(i,this.left,a)-a/2,d=he(i,this.right,r)+r/2,h=u=l):(h=he(i,this.top,a)-a/2,u=he(i,this.bottom,r)+r/2,c=d=l),t.save(),t.lineWidth=o.width,t.strokeStyle=o.color,t.beginPath(),t.moveTo(c,h),t.lineTo(d,u),t.stroke(),t.restore();}drawLabels(i){if(!this.options.ticks.display)return;let n=this.ctx,s=this._computeLabelArea();s&&Oi(n,s);let o=this.getLabelItems(i);for(let a of o){let r=a.options,l=a.font,c=a.label,d=a.textOffset;ue(n,c,0,d,l,r);}s&&ki(n);}drawTitle(){let{ctx:i,options:{position:t,title:n,reverse:s}}=this;if(!n.display)return;let o=ct(n.font),a=pt(n.padding),r=n.align,l=o.lineHeight/2;t==="bottom"||t==="center"||j(t)?(l+=a.bottom,G(n.text)&&(l+=o.lineHeight*(n.text.length-1))):l+=a.top;let{titleX:c,titleY:d,maxWidth:h,rotation:u}=Em(this,l,t,r);ue(i,n.text,0,0,o,{color:n.color,maxWidth:h,rotation:u,textAlign:Dm(r,t,s),textBaseline:"middle",translation:[c,d]});}draw(i){this._isVisible()&&(this.drawBackground(),this.drawGrid(i),this.drawBorder(),this.drawTitle(),this.drawLabels(i));}_layers(){let i=this.options,t=i.ticks&&i.ticks.z||0,n=L(i.grid&&i.grid.z,-1),s=L(i.border&&i.border.z,0);return!this._isVisible()||this.draw!==e.prototype.draw?[{z:t,draw:o=>{this.draw(o);}}]:[{z:n,draw:o=>{this.drawBackground(),this.drawGrid(o),this.drawTitle();}},{z:s,draw:()=>{this.drawBorder();}},{z:t,draw:o=>{this.drawLabels(o);}}];}getMatchingVisibleMetas(i){let t=this.chart.getSortedVisibleDatasetMetas(),n=this.axis+"AxisID",s=[],o,a;for(o=0,a=t.length;o<a;++o){let r=t[o];r[n]===this.id&&(!i||r.type===i)&&s.push(r);}return s;}_resolveTickFontOptions(i){let t=this.options.ticks.setContext(this.getContext(i));return ct(t.font);}_maxDigits(){let i=this._resolveTickFontOptions(0).lineHeight;return(this.isHorizontal()?this.width:this.height)/i;}},Ze=class{constructor(i,t,n){this.type=i,this.scope=t,this.override=n,this.items=Object.create(null);}isForType(i){return Object.prototype.isPrototypeOf.call(this.type.prototype,i.prototype);}register(i){let t=Object.getPrototypeOf(i),n;Rm(t)&&(n=this.register(t));let s=this.items,o=i.id,a=this.scope+"."+o;if(!o)throw new Error("class does not have id: "+i);return o in s||(s[o]=i,Im(i,a,n),this.override&&K.override(i.id,i.overrides)),a;}get(i){return this.items[i];}unregister(i){let t=this.items,n=i.id,s=this.scope;n in t&&delete t[n],s&&n in K[s]&&(delete K[s][n],this.override&&delete de[n]);}};function Im(e,i,t){let n=je(Object.create(null),[t?K.get(t):{},K.get(i),e.defaults]);K.set(i,n),e.defaultRoutes&&Lm(i,e.defaultRoutes),e.descriptors&&K.describe(i,e.descriptors);}
17function Lm(e,i){Object.keys(i).forEach(t=>{let n=t.split("."),s=n.pop(),o=[e].concat(n).join("."),a=i[t].split("."),r=a.pop(),l=a.join(".");K.route(o,s,l,r);});}function Rm(e){return"id"in e&&"defaults"in e;}var Vo=class{constructor(){this.controllers=new Ze(ge,"datasets",!0),this.elements=new Ze(zt,"elements"),this.plugins=new Ze(Object,"plugins"),this.scales=new Ze(Le,"scales"),this._typedRegistries=[this.controllers,this.scales,this.elements];}add(...i){this._each("register",i);}remove(...i){this._each("unregister",i);}addControllers(...i){this._each("register",i,this.controllers);}addElements(...i){this._each("register",i,this.elements);}addPlugins(...i){this._each("register",i,this.plugins);}addScales(...i){this._each("register",i,this.scales);}getController(i){return this._get(i,this.controllers,"controller");}getElement(i){return this._get(i,this.elements,"element");}getPlugin(i){return this._get(i,this.plugins,"plugin");}getScale(i){return this._get(i,this.scales,"scale");}removeControllers(...i){this._each("unregister",i,this.controllers);}removeElements(...i){this._each("unregister",i,this.elements);}removePlugins(...i){this._each("unregister",i,this.plugins);}removeScales(...i){this._each("unregister",i,this.scales);}_each(i,t,n){[...t].forEach(s=>{let o=n||this._getRegistryForType(s);n||o.isForType(s)||o===this.plugins&&s.id?this._exec(i,o,s):U(s,a=>{let r=n||this._getRegistryForType(a);this._exec(i,r,a);});});}_exec(i,t,n){let s=zn(i);X(n["before"+s],[],n),t[i](n),X(n["after"+s],[],n);}_getRegistryForType(i){for(let t=0;t<this._typedRegistries.length;t++){let n=this._typedRegistries[t];if(n.isForType(i))return n;}return this.plugins;}_get(i,t,n){let s=t.get(i);if(s===void 0)throw new Error('"'+i+'" is not a registered '+n+".");return s;}},$t=new Vo(),jo=class{constructor(){this._init=[];}notify(i,t,n,s){t==="beforeInit"&&(this._init=this._createDescriptors(i,!0),this._notify(this._init,i,"install"));let o=s?this._descriptors(i).filter(s):this._descriptors(i),a=this._notify(o,i,t,n);return t==="afterDestroy"&&(this._notify(o,i,"stop"),this._notify(this._init,i,"uninstall")),a;}_notify(i,t,n,s){s=s||{};for(let o of i){let a=o.plugin,r=a[n],l=[t,s,o.options];if(X(r,l,a)===!1&&s.cancelable)return!1;}return!0;}invalidate(){W(this._cache)||(this._oldCache=this._cache,this._cache=void 0);}_descriptors(i){if(this._cache)return this._cache;let t=this._cache=this._createDescriptors(i);return this._notifyStateChanges(i),t;}_createDescriptors(i,t){let n=i&&i.config,s=L(n.options&&n.options.plugins,{}),o=Fm(n);return s===!1&&!t?[]:Bm(i,o,s,t);}_notifyStateChanges(i){let t=this._oldCache||[],n=this._cache,s=(o,a)=>o.filter(r=>!a.some(l=>r.plugin.id===l.plugin.id));this._notify(s(t,n),i,"stop"),this._notify(s(n,t),i,"start");}};function Fm(e){let i={},t=[],n=Object.keys($t.plugins.items);for(let o=0;o<n.length;o++)t.push($t.getPlugin(n[o]));let s=e.plugins||[];for(let o=0;o<s.length;o++){let a=s[o];t.indexOf(a)===-1&&(t.push(a),i[a.id]=!0);}return{plugins:t,localIds:i};}function zm(e,i){return!i&&e===!1?null:e===!0?{}:e;}function Bm(e,{plugins:i,localIds:t},n,s){let o=[],a=e.getContext();for(let r of i){let l=r.id,c=zm(n[l],s);c!==null&&o.push({plugin:r,options:Nm(e.config,{plugin:r,local:t[l]},c,a)});}return o;}function Nm(e,{plugin:i,local:t},n,s){let o=e.pluginScopeKeys(i),a=e.getOptionScopes(n,o);return t&&i.defaults&&a.push(i.defaults),e.createResolver(a,s,[""],{scriptable:!1,indexable:!1,allKeys:!0});}function Ho(e,i){let t=K.datasets[e]||{};return((i.datasets||{})[e]||{}).indexAxis||i.indexAxis||t.indexAxis||"x";}function Vm(e,i){let t=e;return e==="_index_"?t=i:e==="_value_"&&(t=i==="x"?"y":"x"),t;}function jm(e,i){return e===i?"_index_":"_value_";}function Jl(e){if(e==="x"||e==="y"||e==="r")return e;}function Hm(e){if(e==="top"||e==="bottom")return"x";if(e==="left"||e==="right")return"y";}function Wo(e,...i){if(Jl(e))return e;for(let t of i){let n=t.axis||Hm(t.position)||e.length>1&&Jl(e[0].toLowerCase());if(n)return n;}throw new Error(`Cannot determine type of '${e}' axis. Please provide 'axis' or 'position' option.`);}function tc(e,i,t){if(t[i+"AxisID"]===e)return{axis:i};}function Wm(e,i){if(i.data&&i.data.datasets){let t=i.data.datasets.filter(n=>n.xAxisID===e||n.yAxisID===e);if(t.length)return tc(e,"x",t[0])||tc(e,"y",t[0]);}return{};}function $m(e,i){let t=de[e.type]||{scales:{}},n=i.scales||{},s=Ho(e.type,i),o=Object.create(null);
17return Object.keys(n).forEach(a=>{let r=n[a];if(!j(r))return console.error(`Invalid scale configuration for scale: ${a}`);if(r._proxy)return console.warn(`Ignoring resolver passed as options for scale: ${a}`);let l=Wo(a,r,Wm(a,e),K.scales[r.type]),c=jm(l,s),d=t.scales||{};o[a]=We(Object.create(null),[{axis:l},r,d[l],d[c]]);}),e.data.datasets.forEach(a=>{let r=a.type||e.type,l=a.indexAxis||Ho(r,i),d=(de[r]||{}).scales||{};Object.keys(d).forEach(h=>{let u=Vm(h,l),f=a[u+"AxisID"]||u;o[f]=o[f]||Object.create(null),We(o[f],[{axis:u},n[f],d[h]]);});}),Object.keys(o).forEach(a=>{let r=o[a];We(r,[K.scales[r.type],K.scale]);}),o;}function jc(e){let i=e.options||(e.options={});i.plugins=L(i.plugins,{}),i.scales=$m(e,i);}function Hc(e){return e=e||{},e.datasets=e.datasets||[],e.labels=e.labels||[],e;}function Um(e){return e=e||{},e.data=Hc(e.data),jc(e),e;}var ec=new Map(),Wc=new Set();function Gn(e,i){let t=ec.get(e);return t||(t=i(),ec.set(e,t),Wc.add(t)),t;}var Ii=(e,i,t)=>{let n=Jt(i,t);n!==void 0&&e.add(n);},$o=class{constructor(i){this._config=Um(i),this._scopeCache=new Map(),this._resolverCache=new Map();}get platform(){return this._config.platform;}get type(){return this._config.type;}set type(i){this._config.type=i;}get data(){return this._config.data;}set data(i){this._config.data=Hc(i);}get options(){return this._config.options;}set options(i){this._config.options=i;}get plugins(){return this._config.plugins;}update(){let i=this._config;this.clearCache(),jc(i);}clearCache(){this._scopeCache.clear(),this._resolverCache.clear();}datasetScopeKeys(i){return Gn(i,()=>[[`datasets.${i}`,""]]);}datasetAnimationScopeKeys(i,t){return Gn(`${i}.transition.${t}`,()=>[[`datasets.${i}.transitions.${t}`,`transitions.${t}`],[`datasets.${i}`,""]]);}datasetElementScopeKeys(i,t){return Gn(`${i}-${t}`,()=>[[`datasets.${i}.elements.${t}`,`datasets.${i}`,`elements.${t}`,""]]);}pluginScopeKeys(i){let t=i.id,n=this.type;return Gn(`${n}-plugin-${t}`,()=>[[`plugins.${t}`,...(i.additionalOptionScopes||[])]]);}_cachedScopes(i,t){let n=this._scopeCache,s=n.get(i);return(!s||t)&&(s=new Map(),n.set(i,s)),s;}getOptionScopes(i,t,n){let{options:s,type:o}=this,a=this._cachedScopes(i,n),r=a.get(t);if(r)return r;let l=new Set();t.forEach(d=>{i&&(l.add(i),d.forEach(h=>Ii(l,i,h))),d.forEach(h=>Ii(l,s,h)),d.forEach(h=>Ii(l,de[o]||{},h)),d.forEach(h=>Ii(l,K,h)),d.forEach(h=>Ii(l,jn,h));});let c=Array.from(l);return c.length===0&&c.push(Object.create(null)),Wc.has(t)&&a.set(t,c),c;}chartOptionScopes(){let{options:i,type:t}=this;return[i,de[t]||{},K.datasets[t]||{},{type:t},K,jn];}resolveNamedOptions(i,t,n,s=[""]){let o={$shared:!0},{resolver:a,subPrefixes:r}=ic(this._resolverCache,i,s),l=a;if(qm(a,t)){o.$shared=!1,n=Zt(n)?n():n;let c=this.createResolver(i,n,r);l=Te(a,n,c);}for(let c of t)o[c]=l[c];return o;}createResolver(i,t,n=[""],s){let{resolver:o}=ic(this._resolverCache,i,n);return j(t)?Te(o,t,void 0,s):o;}};function ic(e,i,t){let n=e.get(i);n||(n=new Map(),e.set(i,n));let s=t.join(),o=n.get(s);return o||(o={resolver:$n(i,t),subPrefixes:t.filter(r=>!r.toLowerCase().includes("hover"))},n.set(s,o)),o;}var Ym=e=>j(e)&&Object.getOwnPropertyNames(e).some(i=>Zt(e[i]));function qm(e,i){let{isScriptable:t,isIndexable:n}=mo(e);for(let s of i){let o=t(s),a=n(s),r=(a||o)&&e[s];if(o&&(Zt(r)||Ym(r))||a&&G(r))return!0;}return!1;}var Xm="4.4.7",Km=["top","bottom","left","right","chartArea"];function nc(e,i){return e==="top"||e==="bottom"||Km.indexOf(e)===-1&&i==="x";}function sc(e,i){return function(t,n){return t[e]===n[e]?t[i]-n[i]:t[e]-n[e];};}function oc(e){let i=e.chart,t=i.options.animation;i.notifyPlugins("afterRender"),X(t&&t.onComplete,[e],i);}function Gm(e){let i=e.chart,t=i.options.animation;X(t&&t.onProgress,[e],i);}function $c(e){return Un()&&typeof e=="string"?e=document.getElementById(e):e&&e.length&&(e=e[0]),e&&e.canvas&&(e=e.canvas),e;}var is={},ac=e=>{let i=$c(e);return Object.values(is).filter(t=>t.canvas===i).pop();};function Zm(e,i,t){let n=Object.keys(e);for(let s of n){let o=+s;if(o>=i){let a=e[s];delete e[s],(t>0||o>i)&&(e[o+t]=a);}}}function Qm(e,i,t,n){return!t||e.type==="mouseout"?null:n?i:e;}function Zn(e,i,t){return e.options.clip?e[t]:i[t];}function Jm(e,i){let{xScale:t,yScale:n}=e;
17return t&&n?{left:Zn(t,i,"left"),right:Zn(t,i,"right"),top:Zn(n,i,"top"),bottom:Zn(n,i,"bottom")}:i;}var Vi=(()=>{class e{static defaults=K;static instances=is;static overrides=de;static registry=$t;static version=Xm;static getChart=ac;static register(...t){$t.add(...t),rc();}static unregister(...t){$t.remove(...t),rc();}constructor(t,n){let s=this.config=new $o(n),o=$c(t),a=ac(o);if(a)throw new Error("Canvas is already in use. Chart with ID '"+a.id+"' must be destroyed before the canvas with ID '"+a.canvas.id+"' can be reused.");let r=s.createResolver(s.chartOptionScopes(),this.getContext());this.platform=new(s.platform||bm(o))(),this.platform.updateConfig(s);let l=this.platform.acquireContext(o,r.aspectRatio),c=l&&l.canvas,d=c&&c.height,h=c&&c.width;if(this.id=ol(),this.ctx=l,this.canvas=c,this.width=h,this.height=d,this._options=r,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 jo(),this.$proxies={},this._hiddenIndices={},this.attached=!1,this._animationsDisabled=void 0,this.$context=void 0,this._doResize=gl(u=>this.update(u),r.resizeDelay||0),this._dataChanges=[],is[this.id]=this,!l||!c){console.error("Failed to create chart: can't acquire context from the given item");return;}ee.listen(this,"complete",oc),ee.listen(this,"progress",Gm),this._initialize(),this.attached&&this.update();}get aspectRatio(){let{options:{aspectRatio:t,maintainAspectRatio:n},width:s,height:o,_aspectRatio:a}=this;return W(t)?n&&a?a:o?s/o: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 $t;}_initialize(){return this.notifyPlugins("beforeInit"),this.options.responsive?this.resize():bo(this,this.options.devicePixelRatio),this.bindEvents(),this.notifyPlugins("afterInit"),this;}clear(){return uo(this.canvas,this.ctx),this;}stop(){return ee.stop(this),this;}resize(t,n){ee.running(this)?this._resizeBeforeDraw={width:t,height:n}:this._resize(t,n);}_resize(t,n){let s=this.options,o=this.canvas,a=s.maintainAspectRatio&&this.aspectRatio,r=this.platform.getMaximumSize(o,t,n,a),l=s.devicePixelRatio||this.platform.getDevicePixelRatio(),c=this.width?"resize":"attach";this.width=r.width,this.height=r.height,this._aspectRatio=this.aspectRatio,bo(this,l,!0)&&(this.notifyPlugins("resize",{size:r}),X(s.onResize,[this,r],this),this.attached&&this._doResize(c)&&this.render());}ensureScalesHaveIDs(){let n=this.options.scales||{};U(n,(s,o)=>{s.id=o;});}buildOrUpdateScales(){let t=this.options,n=t.scales,s=this.scales,o=Object.keys(s).reduce((r,l)=>(r[l]=!1,r),{}),a=[];n&&(a=a.concat(Object.keys(n).map(r=>{let l=n[r],c=Wo(r,l),d=c==="r",h=c==="x";return{options:l,dposition:d?"chartArea":h?"bottom":"left",dtype:d?"radialLinear":h?"category":"linear"};}))),U(a,r=>{let l=r.options,c=l.id,d=Wo(c,l),h=L(l.type,r.dtype);(l.position===void 0||nc(l.position,d)!==nc(r.dposition))&&(l.position=r.dposition),o[c]=!0;let u=null;if(c in s&&s[c].type===h)u=s[c];else{let f=$t.getScale(h);u=new f({id:c,type:h,ctx:this.ctx,chart:this}),s[u.id]=u;}u.init(l,t);}),U(o,(r,l)=>{r||delete s[l];}),U(s,r=>{gt.configure(this,r,r.options),gt.addBox(this,r);});}_updateMetasets(){let t=this._metasets,n=this.data.datasets.length,s=t.length;if(t.sort((o,a)=>o.index-a.index),s>n){for(let o=n;o<s;++o)this._destroyDatasetMeta(o);t.splice(n,s-n);}this._sortedMetasets=t.slice(0).sort(sc("order","index"));}_removeUnreferencedMetasets(){let{_metasets:t,data:{datasets:n}}=this;t.length>n.length&&delete this._stacks,t.forEach((s,o)=>{n.filter(a=>a===s._dataset).length===0&&this._destroyDatasetMeta(o);});}buildOrUpdateControllers(){let t=[],n=this.data.datasets,s,o;for(this._removeUnreferencedMetasets(),s=0,o=n.length;s<o;s++){let a=n[s],r=this.getDatasetMeta(s),l=a.type||this.config.type;if(r.type&&r.type!==l&&(this._destroyDatasetMeta(s),r=this.getDatasetMeta(s)),r.type=l,r.indexAxis=a.indexAxis||Ho(l,this.options),r.order=a.order||0,r.index=s,r.label=""+a.label,r.visible=this.isDatasetVisible(s),r.controller)r.controller.updateIndex(s),r.controller.linkScales();else{let c=$t.getController(l),{datasetElementType:d,dataElementType:h}=K.datasets[l];Object.assign(c,{dataElementType:$t.getElement(h),datasetElementType:d&&$t.getElement(d)}),r.controller=new c(this,s),t.push(r.controller);}}return this._updateMetasets(),t;}_resetElements(){U(this.data.datasets,(t,n)=>{this.getDatasetMeta(n).controller.reset();},this);}reset(){this._resetElements(),this.notifyPlugins("reset");}update(t){let n=this.config;n.update();let s=this._options=n.createResolver(n.chartOptionScopes(),this.getContext()),o=this._animationsDisabled=!s.animation;if(this._updateScales(),this._checkEventBindings(),this._updateHiddenIndices(),this._plugins.invalidate(),this.notifyPlugins("beforeUpdate",{mode:t,cancelable:!0})===!1)return;let a=this.buildOrUpdateControllers();this.notifyPlugins("beforeElementsUpdate");let r=0;for(let d=0,h=this.data.datasets.length;d<h;d++){let{controller:u}=this.getDatasetMeta(d),f=!o&&a.indexOf(u)===-1;u.buildOrUpdateElements(f),r=Math.max(+u.getMaxOverflow(),r);}r=this._minPadding=s.layout.autoPadding?r:0,this._updateLayout(r),o||U(a,d=>{d.reset();}),this._updateDatasets(t),this.notifyPlugins("afterUpdate",{mode:t}),this._layers.sort(sc("z","_idx"));let{_active:l,_lastEvent:c}=this;c?this._eventHandler(c,!0):l.length&&this._updateHoverStyles(l,l,!0),this.render();}_updateScales(){U(this.scales,t=>{gt.removeBox(this,t);}),this.ensureScalesHaveIDs(),this.buildOrUpdateScales();}_checkEventBindings(){let t=this.options,n=new Set(Object.keys(this._listeners)),s=new Set(t.events);(!Qs(n,s)||!!this._responsiveListeners!==t.responsive)&&(this.unbindEvents(),this.bindEvents());}_updateHiddenIndices(){let{_hiddenIndices:t}=this,n=this._getUniformDataChanges()||[];for(let{method:s,start:o,count:a}of n){let r=s==="_removeElements"?-a:a;Zm(t,o,r);}}_getUniformDataChanges(){let t=this._dataChanges;if(!t||!t.length)return;this._dataChanges=[];let n=this.data.datasets.length,s=a=>new Set(t.filter(r=>r[0]===a).map((r,l)=>l+","+r.splice(1).join(","))),o=s(0);for(let a=1;a<n;a++)if(!Qs(o,s(a)))return;return Array.from(o).map(a=>a.split(",")).map(a=>({method:a[1],start:+a[2],count:+a[3]}));}_updateLayout(t){if(this.notifyPlugins("beforeLayout",{cancelable:!0})===!1)return;gt.update(this,this.width,this.height,t);let n=this.chartArea,s=n.width<=0||n.height<=0;this._layers=[],U(this.boxes,o=>{s&&o.position==="chartArea"||(o.configure&&o.configure(),this._layers.push(...o._layers()));}
vendor: 6,562 bytes, line 17
17,this),this._layers.forEach((o,a)=>{o._idx=a;}),this.notifyPlugins("afterLayout");}_updateDatasets(t){if(this.notifyPlugins("beforeDatasetsUpdate",{mode:t,cancelable:!0})!==!1){for(let n=0,s=this.data.datasets.length;n<s;++n)this.getDatasetMeta(n).controller.configure();for(let n=0,s=this.data.datasets.length;n<s;++n)this._updateDataset(n,Zt(t)?t({datasetIndex:n}):t);this.notifyPlugins("afterDatasetsUpdate",{mode:t});}}_updateDataset(t,n){let s=this.getDatasetMeta(t),o={meta:s,index:t,mode:n,cancelable:!0};this.notifyPlugins("beforeDatasetUpdate",o)!==!1&&(s.controller._update(n),o.cancelable=!1,this.notifyPlugins("afterDatasetUpdate",o));}render(){this.notifyPlugins("beforeRender",{cancelable:!0})!==!1&&(ee.has(this)?this.attached&&!ee.running(this)&&ee.start(this):(this.draw(),oc({chart:this})));}draw(){let t;if(this._resizeBeforeDraw){let{width:s,height:o}=this._resizeBeforeDraw;this._resizeBeforeDraw=null,this._resize(s,o);}if(this.clear(),this.width<=0||this.height<=0||this.notifyPlugins("beforeDraw",{cancelable:!0})===!1)return;let n=this._layers;for(t=0;t<n.length&&n[t].z<=0;++t)n[t].draw(this.chartArea);for(this._drawDatasets();t<n.length;++t)n[t].draw(this.chartArea);this.notifyPlugins("afterDraw");}_getSortedDatasetMetas(t){let n=this._sortedMetasets,s=[],o,a;for(o=0,a=n.length;o<a;++o){let r=n[o];(!t||r.visible)&&s.push(r);}return s;}getSortedVisibleDatasetMetas(){return this._getSortedDatasetMetas(!0);}_drawDatasets(){if(this.notifyPlugins("beforeDatasetsDraw",{cancelable:!0})===!1)return;let t=this.getSortedVisibleDatasetMetas();for(let n=t.length-1;n>=0;--n)this._drawDataset(t[n]);this.notifyPlugins("afterDatasetsDraw");}_drawDataset(t){let n=this.ctx,s=t._clip,o=!s.disabled,a=Jm(t,this.chartArea),r={meta:t,index:t.index,cancelable:!0};this.notifyPlugins("beforeDatasetDraw",r)!==!1&&(o&&Oi(n,{left:s.left===!1?0:a.left-s.left,right:s.right===!1?this.width:a.right+s.right,top:s.top===!1?0:a.top-s.top,bottom:s.bottom===!1?this.height:a.bottom+s.bottom}),t.controller.draw(),o&&ki(n),r.cancelable=!1,this.notifyPlugins("afterDatasetDraw",r));}isPointInArea(t){return Vt(t,this.chartArea,this._minPadding);}getElementsAtEventForMode(t,n,s,o){let a=tm.modes[n];return typeof a=="function"?a(this,t,s,o):[];}getDatasetMeta(t){let n=this.data.datasets[t],s=this._metasets,o=s.filter(a=>a&&a._dataset===n).pop();return o||(o={type:null,data:[],dataset:null,controller:null,hidden:null,xAxisID:null,yAxisID:null,order:n&&n.order||0,index:t,_dataset:n,_parsed:[],_sorted:!1},s.push(o)),o;}getContext(){return this.$context||(this.$context=te(null,{chart:this,type:"chart"}));}getVisibleDatasetCount(){return this.getSortedVisibleDatasetMetas().length;}isDatasetVisible(t){let n=this.data.datasets[t];if(!n)return!1;let s=this.getDatasetMeta(t);return typeof s.hidden=="boolean"?!s.hidden:!n.hidden;}setDatasetVisibility(t,n){let s=this.getDatasetMeta(t);s.hidden=!n;}toggleDataVisibility(t){this._hiddenIndices[t]=!this._hiddenIndices[t];}getDataVisibility(t){return!this._hiddenIndices[t];}_updateVisibility(t,n,s){let o=s?"show":"hide",a=this.getDatasetMeta(t),r=a.controller._resolveAnimations(void 0,o);$e(n)?(a.data[n].hidden=!s,this.update()):(this.setDatasetVisibility(t,s),r.update(a,{visible:s}),this.update(l=>l.datasetIndex===t?o:void 0));}hide(t,n){this._updateVisibility(t,n,!1);}show(t,n){this._updateVisibility(t,n,!0);}_destroyDatasetMeta(t){let n=this._metasets[t];n&&n.controller&&n.controller._destroy(),delete this._metasets[t];}_stop(){let t,n;for(this.stop(),ee.remove(this),t=0,n=this.data.datasets.length;t<n;++t)this._destroyDatasetMeta(t);}destroy(){this.notifyPlugins("beforeDestroy");let{canvas:t,ctx:n}=this;this._stop(),this.config.clearCache(),t&&(this.unbindEvents(),uo(t,n),this.platform.releaseContext(n),this.canvas=null,this.ctx=null),delete is[this.id],this.notifyPlugins("afterDestroy");}toBase64Image(...t){return this.canvas.toDataURL(...t);}bindEvents(){this.bindUserEvents(),this.options.responsive?this.bindResponsiveEvents():this.attached=!0;}bindUserEvents(){let t=this._listeners,n=this.platform,s=(a,r)=>{n.addEventListener(this,a,r),t[a]=r;},o=(a,r,l)=>{a.offsetX=r,a.offsetY=l,this._eventHandler(a);};U(this.options.events,a=>s(a,o));}bindResponsiveEvents(){this._responsiveListeners||(this._responsiveListeners={});let t=this._responsiveListeners,n=this.platform,s=(c,d)=>{n.addEventListener(this,c,d),t[c]=d;},o=(c,d)=>{t[c]&&(n.removeEventListener(this,c,d),delete t[c]);},a=(c,d)=>{this.canvas&&this.resize(c,d);},r,l=()=>{o("attach",l),this.attached=!0,this.resize(),s("resize",a),s("detach",r);};r=()=>{this.attached=!1,o("resize",a),this._stop(),this._resize(0,0),s("attach",l);},n.isAttached(this.canvas)?l():r();}unbindEvents(){U(this._listeners,(t,n)=>{this.platform.removeEventListener(this,n,t);}),this._listeners={},U(this._responsiveListeners,(t,n)=>{this.platform.removeEventListener(this,n,t);}),this._responsiveListeners=void 0;}updateHoverStyle(t,n,s){let o=s?"set":"remove",a,r,l,c;for(n==="dataset"&&(a=this.getDatasetMeta(t[0].datasetIndex),a.controller["_"+o+"DatasetHoverStyle"]()),l=0,c=t.length;l<c;++l){r=t[l];let d=r&&this.getDatasetMeta(r.datasetIndex).controller;d&&d[o+"HoverStyle"](r.element,r.datasetIndex,r.index);}}getActiveElements(){return this._active||[];}setActiveElements(t){let n=this._active||[],s=t.map(({datasetIndex:a,index:r})=>{let l=this.getDatasetMeta(a);if(!l)throw new Error("No dataset found at index "+a);return{datasetIndex:a,element:l.data[r],index:r};});!Pi(s,n)&&(this._active=s,this._lastEvent=null,this._updateHoverStyles(s,n));}notifyPlugins(t,n,s){return this._plugins.notify(this,t,n,s);}isPluginEnabled(t){return this._plugins._cache.filter(n=>n.plugin.id===t).length===1;}_updateHoverStyles(t,n,s){let o=this.options.hover,a=(c,d)=>c.filter(h=>!d.some(u=>h.datasetIndex===u.datasetIndex&&h.index===u.index)),r=a(n,t),l=s?t:a(t,n);r.length&&this.updateHoverStyle(r,o.mode,!1),l.length&&o.mode&&this.updateHoverStyle(l,o.mode,!0);}_eventHandler(t,n){let s={event:t,replay:n,cancelable:!0,inChartArea:this.isPointInArea(t)},o=r=>(r.options.events||this.options.events).includes(t.native.type);if(this.notifyPlugins("beforeEvent",s,o)===!1)return;let a=this._handleEvent(t,n,s.inChartArea);return s.cancelable=!1,this.notifyPlugins("afterEvent",s,o),(a||s.changed)&&this.render(),this;}_handleEvent(t,n,s){let{_active:o=[],options:a}=this,r=n,l=this._getActiveElements(t,o,s,r),c=ll(t),d=Qm(t,this._lastEvent,s,c);s&&(this._lastEvent=null,X(a.onHover,[t,l,this],this),c&&X(a.onClick,[t,l,this],this));let h=!Pi(l,o);
17return(h||n)&&(this._active=l,this._updateHoverStyles(l,o,n)),this._lastEvent=d,h;}_getActiveElements(t,n,s,o){if(t.type==="mouseout")return[];if(!s)return n;let a=this.options.hover;return this.getElementsAtEventForMode(t,a.mode,a,o);}}return e;})();function rc(){return U(Vi.instances,e=>e._plugins.invalidate());}function tg(e,i,t){let{startAngle:n,pixelMargin:s,x:o,y:a,outerRadius:r,innerRadius:l}=i,c=s/r;e.beginPath(),e.arc(o,a,r,n-c,t+c),l>s?(c=s/l,e.arc(o,a,l,t+c,n-c,!0)):e.arc(o,a,s,t+rt,n-rt),e.closePath(),e.clip();}function eg(e){return Wn(e,["outerStart","outerEnd","innerStart","innerEnd"]);}function ig(e,i,t,n){let s=eg(e.options.borderRadius),o=(t-i)/2,a=Math.min(o,n*i/2),r=l=>{let c=(t-Math.min(o,l))*n/2;return dt(l,0,Math.min(o,c));};return{outerStart:r(s.outerStart),outerEnd:r(s.outerEnd),innerStart:dt(s.innerStart,0,a),innerEnd:dt(s.innerEnd,0,a)};}function Ge(e,i,t,n){return{x:t+e*Math.cos(i),y:n+e*Math.sin(i)};}function as(e,i,t,n,s,o){let{x:a,y:r,startAngle:l,pixelMargin:c,innerRadius:d}=i,h=Math.max(i.outerRadius+n+t-c,0),u=d>0?d+n+t+c:0,f=0,m=s-l;if(n){let Y=d>0?d-n:0,et=h>0?h-n:0,lt=(Y+et)/2,It=lt!==0?m*lt/(lt+n):m;f=(m-It)/2;}let g=Math.max(.001,m*h-t/Z)/h,x=(m-g)/2,v=l+x+f,p=s-x-f,{outerStart:_,outerEnd:b,innerStart:y,innerEnd:P}=ig(i,u,h,p-v),O=h-_,M=h-b,A=v+_/O,F=p-b/M,R=u+y,H=u+P,ut=v+y/R,Ot=p-P/H;if(e.beginPath(),o){let Y=(A+F)/2;if(e.arc(a,r,h,A,Y),e.arc(a,r,h,Y,F),b>0){let mt=Ge(M,F,a,r);e.arc(mt.x,mt.y,b,F,p+rt);}let et=Ge(H,p,a,r);if(e.lineTo(et.x,et.y),P>0){let mt=Ge(H,Ot,a,r);e.arc(mt.x,mt.y,P,p+rt,Ot+Math.PI);}let lt=(p-P/u+(v+y/u))/2;if(e.arc(a,r,u,p-P/u,lt,!0),e.arc(a,r,u,lt,v+y/u,!0),y>0){let mt=Ge(R,ut,a,r);e.arc(mt.x,mt.y,y,ut+Math.PI,v-rt);}let It=Ge(O,v,a,r);if(e.lineTo(It.x,It.y),_>0){let mt=Ge(O,A,a,r);e.arc(mt.x,mt.y,_,v-rt,A);}}else{e.moveTo(a,r);let Y=Math.cos(A)*h+a,et=Math.sin(A)*h+r;e.lineTo(Y,et);let lt=Math.cos(F)*h+a,It=Math.sin(F)*h+r;e.lineTo(lt,It);}e.closePath();}function ng(e,i,t,n,s){let{fullCircles:o,startAngle:a,circumference:r}=i,l=i.endAngle;if(o){as(e,i,t,n,l,s);for(let c=0;c<o;++c)e.fill();isNaN(r)||(l=a+(r%Q||Q));}return as(e,i,t,n,l,s),e.fill(),l;}function sg(e,i,t,n,s){let{fullCircles:o,startAngle:a,circumference:r,options:l}=i,{borderWidth:c,borderJoinStyle:d,borderDash:h,borderDashOffset:u}=l,f=l.borderAlign==="inner";if(!c)return;e.setLineDash(h||[]),e.lineDashOffset=u,f?(e.lineWidth=c*2,e.lineJoin=d||"round"):(e.lineWidth=c,e.lineJoin=d||"bevel");let m=i.endAngle;if(o){as(e,i,t,n,m,s);for(let g=0;g<o;++g)e.stroke();isNaN(r)||(m=a+(r%Q||Q));}f&&tg(e,i,m),o||(as(e,i,t,n,m,s),e.stroke());}var Uo=class extends zt{static id="arc";static defaults={borderAlign:"center",borderColor:"#fff",borderDash:[],borderDashOffset:0,borderJoinStyle:void 0,borderRadius:0,borderWidth:2,offset:0,spacing:0,angle:void 0,circular:!0};static defaultRoutes={backgroundColor:"backgroundColor"};static descriptors={_scriptable:!0,_indexable:i=>i!=="borderDash"};circumference;endAngle;fullCircles;innerRadius;outerRadius;pixelMargin;startAngle;constructor(i){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,i&&Object.assign(this,i);}inRange(i,t,n){let s=this.getProps(["x","y"],n),{angle:o,distance:a}=io(s,{x:i,y:t}),{startAngle:r,endAngle:l,innerRadius:c,outerRadius:d,circumference:h}=this.getProps(["startAngle","endAngle","innerRadius","outerRadius","circumference"],n),u=(this.options.spacing+this.options.borderWidth)/2,f=L(h,l-r),m=Ye(o,r,l)&&r!==l,g=f>=Q||m,x=Ht(a,c+u,d+u);return g&&x;}getCenterPoint(i){let{x:t,y:n,startAngle:s,endAngle:o,innerRadius:a,outerRadius:r}=this.getProps(["x","y","startAngle","endAngle","innerRadius","outerRadius"],i),{offset:l,spacing:c}=this.options,d=(s+o)/2,h=(a+r+c+l)/2;return{x:t+Math.cos(d)*h,y:n+Math.sin(d)*h};}tooltipPosition(i){return this.getCenterPoint(i);}draw(i){let{options:t,circumference:n}=this,s=(t.offset||0)/4,o=(t.spacing||0)/2,a=t.circular;if(this.pixelMargin=t.borderAlign==="inner"?.33:0,this.fullCircles=n>Q?Math.floor(n/Q):0,n===0||this.innerRadius<0||this.outerRadius<0)return;i.save();let r=(this.startAngle+this.endAngle)/2;i.translate(Math.cos(r)*s,Math.sin(r)*s);let l=1-Math.sin(Math.min(Z,n||0)),c=s*l;i.fillStyle=t.backgroundColor,i.strokeStyle=t.borderColor,ng(i,this,c,o,a),sg(i,this,c,o,a),i.restore(
vendor: 6,961 bytes, line 17
17);}};function Uc(e,i,t=i){e.lineCap=L(t.borderCapStyle,i.borderCapStyle),e.setLineDash(L(t.borderDash,i.borderDash)),e.lineDashOffset=L(t.borderDashOffset,i.borderDashOffset),e.lineJoin=L(t.borderJoinStyle,i.borderJoinStyle),e.lineWidth=L(t.borderWidth,i.borderWidth),e.strokeStyle=L(t.borderColor,i.borderColor);}function og(e,i,t){e.lineTo(t.x,t.y);}function ag(e){return e.stepped?yl:e.tension||e.cubicInterpolationMode==="monotone"?vl:og;}function Yc(e,i,t={}){let n=e.length,{start:s=0,end:o=n-1}=t,{start:a,end:r}=i,l=Math.max(s,a),c=Math.min(o,r),d=s<a&&o<a||s>r&&o>r;return{count:n,start:l,loop:i.loop,ilen:c<l&&!d?n+c-l:c-l};}function rg(e,i,t,n){let{points:s,options:o}=i,{count:a,start:r,loop:l,ilen:c}=Yc(s,t,n),d=ag(o),{move:h=!0,reverse:u}=n||{},f,m,g;for(f=0;f<=c;++f)m=s[(r+(u?c-f:f))%a],!m.skip&&(h?(e.moveTo(m.x,m.y),h=!1):d(e,g,m,u,o.stepped),g=m);return l&&(m=s[(r+(u?c:0))%a],d(e,g,m,u,o.stepped)),!!l;}function lg(e,i,t,n){let s=i.points,{count:o,start:a,ilen:r}=Yc(s,t,n),{move:l=!0,reverse:c}=n||{},d=0,h=0,u,f,m,g,x,v,p=b=>(a+(c?r-b:b))%o,_=()=>{g!==x&&(e.lineTo(d,x),e.lineTo(d,g),e.lineTo(d,v));};for(l&&(f=s[p(0)],e.moveTo(f.x,f.y)),u=0;u<=r;++u){if(f=s[p(u)],f.skip)continue;let b=f.x,y=f.y,P=b|0;P===m?(y<g?g=y:y>x&&(x=y),d=(h*d+b)/++h):(_(),e.lineTo(b,y),m=P,h=0,g=x=y),v=y;}_();}function Yo(e){let i=e.options,t=i.borderDash&&i.borderDash.length;return!e._decimated&&!e._loop&&!i.tension&&i.cubicInterpolationMode!=="monotone"&&!i.stepped&&!t?lg:rg;}function cg(e){return e.stepped?Al:e.tension||e.cubicInterpolationMode==="monotone"?Dl:ce;}function dg(e,i,t,n){let s=i._path;s||(s=i._path=new Path2D(),i.path(s,t,n)&&s.closePath()),Uc(e,i.options),e.stroke(s);}function hg(e,i,t,n){let{segments:s,options:o}=i,a=Yo(i);for(let r of s)Uc(e,o,r.style),e.beginPath(),a(e,i,r,{start:t,end:t+n-1})&&e.closePath(),e.stroke();}var ug=typeof Path2D=="function";function fg(e,i,t,n){ug&&!i.options.segment?dg(e,i,t,n):hg(e,i,t,n);}var cs=(()=>{class e extends zt{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=>t!=="borderDash"&&t!=="fill"};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,n){let s=this.options;if((s.tension||s.cubicInterpolationMode==="monotone")&&!s.stepped&&!this._pointsUpdated){let o=s.spanGaps?this._loop:this._fullLoop;Ol(this._points,s,t,o,n),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=Il(this,this.options.segment));}first(){let t=this.segments,n=this.points;return t.length&&n[t[0].start];}last(){let t=this.segments,n=this.points,s=t.length;return s&&n[t[s-1].end];}interpolate(t,n){let s=this.options,o=t[n],a=this.points,r=wo(this,{property:n,start:o,end:o});if(!r.length)return;let l=[],c=cg(s),d,h;for(d=0,h=r.length;d<h;++d){let{start:u,end:f}=r[d],m=a[u],g=a[f];if(m===g){l.push(m);continue;}let x=Math.abs((o-m[n])/(g[n]-m[n])),v=c(m,g,x,s.stepped);v[n]=t[n],l.push(v);}return l.length===1?l[0]:l;}pathSegment(t,n,s){return Yo(this)(t,this,n,s);}path(t,n,s){let o=this.segments,a=Yo(this),r=this._loop;n=n||0,s=s||this.points.length-n;for(let l of o)r&=a(t,this,l,{start:n,end:n+s-1});return!!r;}draw(t,n,s,o){let a=this.options||{};(this.points||[]).length&&a.borderWidth&&(t.save(),fg(t,this,s,o),t.restore()),this.animated&&(this._pointsUpdated=!1,this._path=void 0);}}return e;})();function lc(e,i,t,n){let s=e.options,{[t]:o}=e.getProps([t],n);return Math.abs(i-o)<s.radius+s.hitRadius;}var pg=(()=>{class e extends zt{static id="point";parsed;skip;stop;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,n,s){let o=this.options,{x:a,y:r}=this.getProps(["x","y"],s);return Math.pow(t-a,2)+Math.pow(n-r,2)<Math.pow(o.hitRadius+o.radius,2);}inXRange(t,n){return lc(this,t,"x",n);}inYRange(t,n){return lc(this,t,"y",n);}getCenterPoint(t){let{x:n,y:s}=this.getProps(["x","y"],t);return{x:n,y:s};}size(t){t=t||this.options||{};let n=t.radius||0;n=Math.max(n,n&&t.hoverRadius||0);let s=n&&t.borderWidth||0;return(n+s)*2;}draw(t,n){let s=this.options;this.skip||s.radius<.1||!Vt(this,n,this.size(s)/2)||(t.strokeStyle=s.borderColor,t.lineWidth=s.borderWidth,t.fillStyle=s.backgroundColor,Hn(t,s,this.x,this.y));}getRange(){let t=this.options||{};return t.radius+t.hitRadius;}}return e;})();function qc(e,i){let{x:t,y:n,base:s,width:o,height:a}=e.getProps(["x","y","base","width","height"],i),r,l,c,d,h;return e.horizontal?(h=a/2,r=Math.min(t,s),l=Math.max(t,s),c=n-h,d=n+h):(h=o/2,r=t-h,l=t+h,c=Math.min(n,s),d=Math.max(n,s)),{left:r,top:c,right:l,bottom:d};}function me(e,i,t,n){return e?0:dt(i,t,n);}function mg(e,i,t){let n=e.options.borderWidth,s=e.borderSkipped,o=po(n);return{t:me(s.top,o.top,0,t),r:me(s.right,o.right,0,i),b:me(s.bottom,o.bottom,0,t),l:me(s.left,o.left,0,i)};}function gg(e,i,t){let{enableBorderRadius:n}=e.getProps(["enableBorderRadius"]),s=e.options.borderRadius,o=fe(s),a=Math.min(i,t),r=e.borderSkipped,l=n||j(s);return{topLeft:me(!l||r.top||r.left,o.topLeft,0,a),topRight:me(!l||r.top||r.right,o.topRight,0,a),bottomLeft:me(!l||r.bottom||r.left,o.bottomLeft,0,a),bottomRight:me(!l||r.bottom||r.right,o.bottomRight,0,a)};}function _g(e){let i=qc(e),t=i.right-i.left,n=i.bottom-i.top,s=mg(e,t/2,n/2),o=gg(e,t/2,n/2);return{outer:{x:i.left,y:i.top,w:t,h:n,radius:o},inner:{x:i.left+s.l,y:i.top+s.t,w:t-s.l-s.r,h:n-s.t-s.b,radius:{topLeft:Math.max(0,o.topLeft-Math.max(s.t,s.l)),topRight:Math.max(0,o.topRight-Math.max(s.t,s.r)),bottomLeft:Math.max(0,o.bottomLeft-Math.max(s.b,s.l)),bottomRight:Math.max(0,o.bottomRight-Math.max(s.b,s.r))}}};}function Eo(e,i,t,n){let s=i===null,o=t===null,r=e&&!(s&&o)&&qc(e,n);return r&&(s||Ht(i,r.left,r.right))&&(o||Ht(t,r.top,r.bottom));}function xg(e){return e.topLeft||e.topRight||e.bottomLeft||e.bottomRight;}function bg(e,i){e.rect(i.x,i.y,i.w,i.h);}function Io(e,i,t={}){let n=e.x!==t.x?-i:0,s=e.y!==t.y?-i:0,o=(e.x+e.w!==t.x+t.w?i:0)-n,a=(e.y+e.h!==t.y+t.h?i:0)-s;return{x:e.x+n,y:e.y+s,w:e.w+o,h:e.h+a,radius:e.radius};}var qo=class extends zt{static id="bar";static defaults={borderSkipped:"start",borderWidth:0,borderRadius:0,inflateAmou
17nt:"auto",pointStyle:void 0};static defaultRoutes={backgroundColor:"backgroundColor",borderColor:"borderColor"};constructor(i){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,i&&Object.assign(this,i);}draw(i){let{inflateAmount:t,options:{borderColor:n,backgroundColor:s}}=this,{inner:o,outer:a}=_g(this),r=xg(a.radius)?Xe:bg;i.save(),(a.w!==o.w||a.h!==o.h)&&(i.beginPath(),r(i,Io(a,t,o)),i.clip(),r(i,Io(o,-t,a)),i.fillStyle=n,i.fill("evenodd")),i.beginPath(),r(i,Io(o,t)),i.fillStyle=s,i.fill(),i.restore();}inRange(i,t,n){return Eo(this,i,t,n);}inXRange(i,t){return Eo(this,i,null,t);}inYRange(i,t){return Eo(this,null,i,t);}getCenterPoint(i){let{x:t,y:n,base:s,horizontal:o}=this.getProps(["x","y","base","horizontal"],i);return{x:o?(t+s)/2:t,y:o?n:(n+s)/2};}getRange(i){return i==="x"?this.width/2:this.height/2;}},yg=Object.freeze({__proto__:null,ArcElement:Uo,BarElement:qo,LineElement:cs,PointElement:pg}),Xo=["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)"],cc=Xo.map(e=>e.replace("rgb(","rgba(").replace(")",", 0.5)"));function Xc(e){return Xo[e%Xo.length];}function Kc(e){return cc[e%cc.length];}function vg(e,i){return e.borderColor=Xc(i),e.backgroundColor=Kc(i),++i;}function Cg(e,i){return e.backgroundColor=e.data.map(()=>Xc(i++)),i;}function Sg(e,i){return e.backgroundColor=e.data.map(()=>Kc(i++)),i;}function wg(e){let i=0;return(t,n)=>{let s=e.getDatasetMeta(n).controller;s instanceof ia?i=Cg(t,i):s instanceof Fc?i=Sg(t,i):s&&(i=vg(t,i));};}function dc(e){let i;for(i in e)if(e[i].borderColor||e[i].backgroundColor)return!0;return!1;}function Pg(e){return e&&(e.borderColor||e.backgroundColor);}function Mg(){return K.borderColor!=="rgba(0,0,0,0.1)"||K.backgroundColor!=="rgba(0,0,0,0.1)";}var Og={id:"colors",defaults:{enabled:!0,forceOverride:!1},beforeLayout(e,i,t){if(!t.enabled)return;let{data:{datasets:n},options:s}=e.config,{elements:o}=s,a=dc(n)||Pg(s)||o&&dc(o)||Mg();if(!t.forceOverride&&a)return;let r=wg(e);n.forEach(r);}};function kg(e,i,t,n,s){let o=s.samples||n;if(o>=t)return e.slice(i,i+t);let a=[],r=(t-2)/(o-2),l=0,c=i+t-1,d=i,h,u,f,m,g;for(a[l++]=e[d],h=0;h<o-2;h++){let x=0,v=0,p,_=Math.floor((h+1)*r)+1+i,b=Math.min(Math.floor((h+2)*r)+1,t)+i,y=b-_;for(p=_;p<b;p++)x+=e[p].x,v+=e[p].y;x/=y,v/=y;let P=Math.floor(h*r)+1+i,O=Math.min(Math.floor((h+1)*r)+1,t)+i,{x:M,y:A}=e[d];for(f=m=-1,p=P;p<O;p++)m=.5*Math.abs((M-x)*(e[p].y-A)-(M-e[p].x)*(v-A)),m>f&&(f=m,u=e[p],g=p);a[l++]=u,d=g;}return a[l++]=e[c],a;}function Tg(e,i,t,n){let s=0,o=0,a,r,l,c,d,h,u,f,m,g,x=[],v=i+t-1,p=e[i].x,b=e[v].x-p;for(a=i;a<i+t;++a){r=e[a],l=(r.x-p)/b*n,c=r.y;let y=l|0;if(y===d)c<m?(m=c,h=a):c>g&&(g=c,u=a),s=(o*s+r.x)/++o;else{let P=a-1;if(!W(h)&&!W(u)){let O=Math.min(h,u),M=Math.max(h,u);O!==f&&O!==P&&x.push(Ki(Yt({},e[O]),{x:s})),M!==f&&M!==P&&x.push(Ki(Yt({},e[M]),{x:s}));}a>0&&P!==f&&x.push(e[P]),x.push(r),d=y,o=0,m=g=c,h=u=f=a;}}return x;}function Gc(e){if(e._decimated){let i=e._data;delete e._decimated,delete e._data,Object.defineProperty(e,"data",{configurable:!0,enumerable:!0,writable:!0,value:i});}}function hc(e){e.data.datasets.forEach(i=>{Gc(i);});}function Ag(e,i){let t=i.length,n=0,s,{iScale:o}=e,{min:a,max:r,minDefined:l,maxDefined:c}=o.getUserBounds();return l&&(n=dt(Nt(i,o.axis,a).lo,0,t-1)),c?s=dt(Nt(i,o.axis,r).hi+1,n,t)-n:s=t-n,{start:n,count:s};}var Dg={id:"decimation",defaults:{algorithm:"min-max",enabled:!1},beforeElementsUpdate:(e,i,t)=>{if(!t.enabled){hc(e);return;}let n=e.width;e.data.datasets.forEach((s,o)=>{let{_data:a,indexAxis:r}=s,l=e.getDatasetMeta(o),c=a||s.data;if(Ke([r,e.options.indexAxis])==="y"||!l.controller.supportsDecimation)return;let d=e.scales[l.xAxisID];if(d.type!=="linear"&&d.type!=="time"||e.options.parsing)return;let{start:h,count:u}=Ag(l,c),f=t.threshold||4*n;if(u<=f){Gc(s);return;}W(a)&&(s._data=c,delete s.data,Object.defineProperty(s,"data",{configurable:!0,enumerable:!0,get:function(){return this._decimated;},set:function(g){this._data=g;}}));let m;switch(t.algorithm){case"lttb":m=kg(c,h,u,n,t);break;case"min-max":m=Tg(c,h,u,n);break;default:throw new Error(`Unsupported decimation algorithm '${t.algorithm}'`);}s._decimated=m;});},destroy(e){hc(e);}};function Eg(e,i,t){let n=e.segments,s=e.points,o=i.points,a=[];for(let r of n){let{start:l,end:c}=r;c=na(l,c,s);let d=Ko(t,s[l],s[c],r.loop);if(!i.segments){a.push({source:r,target:d,start:s[l],end:s[c]});continue;}let h=wo(i,d);for(let u of h){let f=Ko(t,o[u.start],o[u.end],u.loop),m=So(r,s,f);for(let g of m)a.push({source:g,target:u,start:{[t]:uc(d,f,"start",Math.max)},end:{[t]:uc(d,f,"end",Math.min)}});}}return a;}function Ko(e,i,t,n){if(n)return;let s=i[e],o=t[e];return e==="angle"&&(s=Ct(s),o=Ct(o)),{property:e,start:s,end:o};}function Ig(e,i){let{x:t=null,y:n=null}=e||{},s=i.points,o=[];
vendor: 4,461 bytes, line 17
17return i.segments.forEach(({start:a,end:r})=>{r=na(a,r,s);let l=s[a],c=s[r];n!==null?(o.push({x:l.x,y:n}),o.push({x:c.x,y:n})):t!==null&&(o.push({x:t,y:l.y}),o.push({x:t,y:c.y}));}),o;}function na(e,i,t){for(;i>e;i--){let n=t[i];if(!isNaN(n.x)&&!isNaN(n.y))break;}return i;}function uc(e,i,t,n){return e&&i?n(e[t],i[t]):e?e[t]:i?i[t]:0;}function Zc(e,i){let t=[],n=!1;return G(e)?(n=!0,t=e):t=Ig(e,i),t.length?new cs({points:t,options:{tension:0},_loop:n,_fullLoop:n}):null;}function fc(e){return e&&e.fill!==!1;}function Lg(e,i,t){let s=e[i].fill,o=[i],a;if(!t)return s;for(;s!==!1&&o.indexOf(s)===-1;){if(!at(s))return s;if(a=e[s],!a)return!1;if(a.visible)return s;o.push(s),s=a.fill;}return!1;}function Rg(e,i,t){let n=Ng(e);if(j(n))return isNaN(n.value)?!1:n;let s=parseFloat(n);return at(s)&&Math.floor(s)===s?Fg(n[0],i,s,t):["origin","start","end","stack","shape"].indexOf(n)>=0&&n;}function Fg(e,i,t,n){return(e==="-"||e==="+")&&(t=i+t),t===i||t<0||t>=n?!1:t;}function zg(e,i){let t=null;return e==="start"?t=i.bottom:e==="end"?t=i.top:j(e)?t=i.getPixelForValue(e.value):i.getBasePixel&&(t=i.getBasePixel()),t;}function Bg(e,i,t){let n;return e==="start"?n=t:e==="end"?n=i.options.reverse?i.min:i.max:j(e)?n=e.value:n=i.getBaseValue(),n;}function Ng(e){let i=e.options,t=i.fill,n=L(t&&t.target,t);return n===void 0&&(n=!!i.backgroundColor),n===!1||n===null?!1:n===!0?"origin":n;}function Vg(e){let{scale:i,index:t,line:n}=e,s=[],o=n.segments,a=n.points,r=jg(i,t);r.push(Zc({x:null,y:i.bottom},n));for(let l=0;l<o.length;l++){let c=o[l];for(let d=c.start;d<=c.end;d++)Hg(s,a[d],r);}return new cs({points:s,options:{}});}function jg(e,i){let t=[],n=e.getMatchingVisibleMetas("line");for(let s=0;s<n.length;s++){let o=n[s];if(o.index===i)break;o.hidden||t.unshift(o.dataset);}return t;}function Hg(e,i,t){let n=[];for(let s=0;s<t.length;s++){let o=t[s],{first:a,last:r,point:l}=Wg(o,i,"x");if(!(!l||a&&r)){if(a)n.unshift(l);else if(e.push(l),!r)break;}}e.push(...n);}function Wg(e,i,t){let n=e.interpolate(i,t);if(!n)return{};let s=n[t],o=e.segments,a=e.points,r=!1,l=!1;for(let c=0;c<o.length;c++){let d=o[c],h=a[d.start][t],u=a[d.end][t];if(Ht(s,h,u)){r=s===h,l=s===u;break;}}return{first:r,last:l,point:n};}var rs=class{constructor(i){this.x=i.x,this.y=i.y,this.radius=i.radius;}pathSegment(i,t,n){let{x:s,y:o,radius:a}=this;return t=t||{start:0,end:Q},i.arc(s,o,a,t.end,t.start,!0),!n.bounds;}interpolate(i){let{x:t,y:n,radius:s}=this,o=i.angle;return{x:t+Math.cos(o)*s,y:n+Math.sin(o)*s,angle:o};}};function $g(e){let{chart:i,fill:t,line:n}=e;if(at(t))return Ug(i,t);if(t==="stack")return Vg(e);if(t==="shape")return!0;let s=Yg(e);return s instanceof rs?s:Zc(s,n);}function Ug(e,i){let t=e.getDatasetMeta(i);return t&&e.isDatasetVisible(i)?t.dataset:null;}function Yg(e){return(e.scale||{}).getPointPositionForValue?Xg(e):qg(e);}function qg(e){let{scale:i={},fill:t}=e,n=zg(t,i);if(at(n)){let s=i.isHorizontal();return{x:s?n:null,y:s?null:n};}return null;}function Xg(e){let{scale:i,fill:t}=e,n=i.options,s=i.getLabels().length,o=n.reverse?i.max:i.min,a=Bg(t,i,o),r=[];if(n.grid.circular){let l=i.getPointPositionForValue(0,o);return new rs({x:l.x,y:l.y,radius:i.getDistanceFromCenterForValue(a)});}for(let l=0;l<s;++l)r.push(i.getPointPositionForValue(l,a));return r;}function Lo(e,i,t){let n=$g(i),{line:s,scale:o,axis:a}=i,r=s.options,l=r.fill,c=r.backgroundColor,{above:d=c,below:h=c}=l||{};n&&s.points.length&&(Oi(e,t),Kg(e,{line:s,target:n,above:d,below:h,area:t,scale:o,axis:a}),ki(e));}function Kg(e,i){let{line:t,target:n,above:s,below:o,area:a,scale:r}=i,l=t._loop?"angle":i.axis;e.save(),l==="x"&&o!==s&&(pc(e,n,a.top),mc(e,{line:t,target:n,color:s,scale:r,property:l}),e.restore(),e.save(),pc(e,n,a.bottom)),mc(e,{line:t,target:n,color:o,scale:r,property:l}),e.restore();}function pc(e,i,t){let{segments:n,points:s}=i,o=!0,a=!1;e.beginPath();for(let r of n){let{start:l,end:c}=r,d=s[l],h=s[na(l,c,s)];o?(e.moveTo(d.x,d.y),o=!1):(e.lineTo(d.x,t),e.lineTo(d.x,d.y)),a=!!i.pathSegment(e,r,{move:a}),a?e.closePath():e.lineTo(h.x,t);}e.lineTo(i.first().x,t),e.closePath(),e.clip();}function mc(e,i){let{line:t,target:n,property:s,color:o,scale:a}=i,r=Eg(t,n,s);for(let{source:l,target:c,start:d,end:h}of r){let{style:{backgroundColor:u=o}={}}=l,f=n!==!0;e.save(),e.fillStyle=u,Gg(e,a,f&&Ko(s,d,h)),e.beginPath();let m=!!t.pathSegment(e,l),g;if(f){m?e.closePath():gc(e,n,h,s);let x=!!n.pathSegment(e,c,{move:m,reverse:!0});g=m&&x,g||gc(e,n,d,s);}
17e.closePath(),e.fill(g?"evenodd":"nonzero"),e.restore();}}function Gg(e,i,t){let{top:n,bottom:s}=i.chart.chartArea,{property:o,start:a,end:r}=t||{};o==="x"&&(e.beginPath(),e.rect(a,n,r-a,s-n),e.clip());}function gc(e,i,t,n){let s=i.interpolate(t,n);s&&e.lineTo(s.x,s.y);}var Zg={id:"filler",afterDatasetsUpdate(e,i,t){let n=(e.data.datasets||[]).length,s=[],o,a,r,l;for(a=0;a<n;++a)o=e.getDatasetMeta(a),r=o.dataset,l=null,r&&r.options&&r instanceof cs&&(l={visible:e.isDatasetVisible(a),index:a,fill:Rg(r,a,n),chart:e,axis:o.controller.options.indexAxis,scale:o.vScale,line:r}),o.$filler=l,s.push(l);for(a=0;a<n;++a)l=s[a],!(!l||l.fill===!1)&&(l.fill=Lg(s,a,t.propagate));},beforeDraw(e,i,t){let n=t.drawTime==="beforeDraw",s=e.getSortedVisibleDatasetMetas(),o=e.chartArea;for(let a=s.length-1;a>=0;--a){let r=s[a].$filler;r&&(r.line.updateControlPoints(o,r.axis),n&&r.fill&&Lo(e.ctx,r,o));}},beforeDatasetsDraw(e,i,t){if(t.drawTime!=="beforeDatasetsDraw")return;let n=e.getSortedVisibleDatasetMetas();for(let s=n.length-1;s>=0;--s){let o=n[s].$filler;fc(o)&&Lo(e.ctx,o,e.chartArea);}},beforeDatasetDraw(e,i,t){let n=i.meta.$filler;!fc(n)||t.drawTime!=="beforeDatasetDraw"||Lo(e.ctx,n,e.chartArea);},defaults:{propagate:!0,drawTime:"beforeDatasetDraw"}},_c=(e,i)=>{let{boxHeight:t=i,boxWidth:n=i}=e;return e.usePointStyle&&(t=Math.min(t,i),n=e.pointStyleWidth||Math.min(n,i)),{boxWidth:n,boxHeight:t,itemHeight:Math.max(i,t)};},Qg=(e,i)=>e!==null&&i!==null&&e.datasetIndex===i.datasetIndex&&e.index===i.index,ls=class extends zt{constructor(i){super(),this._added=!1,this.legendHitBoxes=[],this._hoveredItem=null,this.doughnutMode=!1,this.chart=i.chart,this.options=i.options,this.ctx=i.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(i,t,n){this.maxWidth=i,this.maxHeight=t,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(){let i=this.options.labels||{},t=X(i.generateLabels,[this.chart],this)||[];i.filter&&(t=t.filter(n=>i.filter(n,this.chart.data))),i.sort&&(t=t.sort((n,s)=>i.sort(n,s,this.chart.data))),this.options.reverse&&t.reverse(),this.legendItems=t;}fit(){let{options:i,ctx:t}=this;if(!i.display){this.width=this.height=0;return;}let n=i.labels,s=ct(n.font),o=s.size,a=this._computeTitleHeight(),{boxWidth:r,itemHeight:l}=_c(n,o),c,d;t.font=s.string,this.isHorizontal()?(c=this.maxWidth,d=this._fitRows(a,o,r,l)+10):(d=this.maxHeight,c=this._fitCols(a,s,r,l)+10),this.width=Math.min(c,i.maxWidth||this.maxWidth),this.height=Math.min(d,i.maxHeight||this.maxHeight);}_fitRows(i,t,n,s){let{ctx:o,maxWidth:a,options:{labels:{padding:r}}}=this,l=this.legendHitBoxes=[],c=this.lineWidths=[0],d=s+r,h=i;o.textAlign="left",o.textBaseline="middle";let u=-1,f=-d;return this.legendItems.forEach((m,g)=>{let x=n+t/2+o.measureText(m.text).width;(g===0||c[c.length-1]+x+2*r>a)&&(h+=d,c[c.length-(g>0?0:1)]=0,f+=d,u++),l[g]={left:0,top:f,row:u,width:x,height:s},c[c.length-1]+=x+r;}),h;}_fitCols(i,t,n,s){let{ctx:o,maxHeight:a,options:{labels:{padding:r}}}=this,l=this.legendHitBoxes=[],c=this.columnSizes=[],d=a-i,h=r,u=0,f=0,m=0,g=0;return this.legendItems.forEach((x,v)=>{let{itemWidth:p,itemHeight:_}=Jg(n,t,o,x,s);v>0&&f+_+2*r>d&&(h+=u+r,c.push({width:u,height:f}),m+=u+r,g++,u=f=0),l[v]={left:m,top:f,col:g,width:p,height:_},u=Math.max(u,p),f+=_+r;}),h+=u,c.push({width:u,height:f}),h;}adjustHitBoxes(){if(!this.options.display)return;let i=this._computeTitleHeight(),{legendHitBoxes:t,options:{align:n,labels:{padding:s},rtl:o}}=this,a=De(o,this.left,this.width);if(this.isHorizontal()){let r=0,l=ft(n,this.left+s,this.right-this.lineWidths[r]);for(let c of t)r!==c.row&&(r=c.row,l=ft(n,this.left+s,this.right-this.lineWidths[r])),c.top+=this.top+i+s,c.left=a.leftForLtr(a.x(l),c.width),l+=c.width+s;}else{let r=0,l=ft(n,this.top+i+s,this.bottom-this.columnSizes[r].height);for(let c of t)c.col!==r&&(r=c.col,l=ft(n,this.top+i+s,this.bottom-this.columnSizes[r].height)),c.top=l,c.left+=this.left+s,c.left=a.leftForLtr(a.x(c.left),c.width),l+=c.height+s;}}isHorizontal(){return this.options.position==="top"||this.options.position==="bottom";}draw(){if(this.options.display){let i=this.ctx;Oi(i,this),this._draw(),ki(i);}}_draw(){let{options:i,columnSizes:t,lineWidths:n,ctx:s}=this,{align:o,labels:a}=i,r=K.color,l=De(i.rtl,this.left,this.width),c=ct(a.font),{padding:d}=a,h=c.size,u=h/2,f;this.drawTitle(),s.textAlign=l.textAlign("left"),s.textBaseline="middle",s.lineWidth=.5,s.font=c.string;let{boxWidth:m,boxHeight:g,itemHeight:x}=_c(a,h),v=function(P,O,M){if(isNaN(m)||m<=0||isNaN(g)||g<0)return;s.save();let A=L(M.lineWidth,1);if(s.fillStyle=L(M.fillStyle,r),s.lineCap=L(M.lineCap,"butt"),s.lineDashOffset=L(M.lineDashOffset,0),s.lineJoin=L(M.lineJoin,"miter"),s.lineWidth=A,s.strokeStyle=L(M.strokeStyle,r),s.setLineDash(L(M.lineDash,[])),a.usePointStyle){let F={radius:g*Math.SQRT2/2,pointStyle:M.pointStyle,rotation:M.rotation,borderWidth:A},R=l.xPlus(P,m/2),H=O+u;fo(s,F,R,H,a.pointStyleWidth&&m);}else{let F=O+Math.max((h-g)/2,0),R=l.leftForLtr(P,m),H=fe(M.borderRadius);s.beginPath(),Object.values(H).some(ut=>ut!==0)?Xe(s,{x:R,y:F,w:m,h:g,radius:H}):s.rect(R,F,m,g),s.fill(),A!==0&&s.stroke();}
17s.restore();},p=function(P,O,M){ue(s,M.text,P,O+x/2,c,{strikethrough:M.hidden,textAlign:l.textAlign(M.textAlign)});},_=this.isHorizontal(),b=this._computeTitleHeight();_?f={x:ft(o,this.left+d,this.right-n[0]),y:this.top+d+b,line:0}:f={x:this.left+d,y:ft(o,this.top+b+d,this.bottom-t[0].height),line:0},vo(this.ctx,i.textDirection);let y=x+d;this.legendItems.forEach((P,O)=>{s.strokeStyle=P.fontColor,s.fillStyle=P.fontColor;let M=s.measureText(P.text).width,A=l.textAlign(P.textAlign||(P.textAlign=a.textAlign)),F=m+u+M,R=f.x,H=f.y;l.setWidth(this.width),_?O>0&&R+F+d>this.right&&(H=f.y+=y,f.line++,R=f.x=ft(o,this.left+d,this.right-n[f.line])):O>0&&H+y>this.bottom&&(R=f.x=R+t[f.line].width+d,f.line++,H=f.y=ft(o,this.top+b+d,this.bottom-t[f.line].height));let ut=l.x(R);if(v(ut,H,P),R=_l(A,R+m+u,_?R+F:this.right,i.rtl),p(l.x(R),H,P),_)f.x+=F+d;else if(typeof P.text!="string"){let Ot=c.lineHeight;f.y+=Qc(P,Ot)+d;}else f.y+=y;}),Co(this.ctx,i.textDirection);}drawTitle(){let i=this.options,t=i.title,n=ct(t.font),s=pt(t.padding);if(!t.display)return;let o=De(i.rtl,this.left,this.width),a=this.ctx,r=t.position,l=n.size/2,c=s.top+l,d,h=this.left,u=this.width;if(this.isHorizontal())u=Math.max(...this.lineWidths),d=this.top+c,h=ft(i.align,h,this.right-u);else{let m=this.columnSizes.reduce((g,x)=>Math.max(g,x.height),0);d=c+ft(i.align,this.top,this.bottom-m-i.labels.padding-this._computeTitleHeight());}let f=ft(r,h,h+u);a.textAlign=o.textAlign(Vn(r)),a.textBaseline="middle",a.strokeStyle=t.color,a.fillStyle=t.color,a.font=n.string,ue(a,t.text,f,d,n);}_computeTitleHeight(){let i=this.options.title,t=ct(i.font),n=pt(i.padding);return i.display?t.lineHeight+n.height:0;}_getLegendItemAt(i,t){let n,s,o;if(Ht(i,this.left,this.right)&&Ht(t,this.top,this.bottom)){for(o=this.legendHitBoxes,n=0;n<o.length;++n)if(s=o[n],Ht(i,s.left,s.left+s.width)&&Ht(t,s.top,s.top+s.height))return this.legendItems[n];}return null;}handleEvent(i){let t=this.options;if(!i_(i.type,t))return;let n=this._getLegendItemAt(i.x,i.y);if(i.type==="mousemove"||i.type==="mouseout"){let s=this._hoveredItem,o=Qg(s,n);s&&!o&&X(t.onLeave,[i,s,this],this),this._hoveredItem=n,n&&!o&&X(t.onHover,[i,n,this],this);}else n&&X(t.onClick,[i,n,this],this);}};function Jg(e,i,t,n,s){let o=t_(n,e,i,t),a=e_(s,n,i.lineHeight);return{itemWidth:o,itemHeight:a};}function t_(e,i,t,n){let s=e.text;return s&&typeof s!="string"&&(s=s.reduce((o,a)=>o.length>a.length?o:a)),i+t.size/2+n.measureText(s).width;}function e_(e,i,t){let n=e;return typeof i.text!="string"&&(n=Qc(i,t)),n;}function Qc(e,i){let t=e.text?e.text.length:0;return i*t;}function i_(e,i){return!!((e==="mousemove"||e==="mouseout")&&(i.onHover||i.onLeave)||i.onClick&&(e==="click"||e==="mouseup"));}var n_={id:"legend",_element:ls,start(e,i,t){let n=e.legend=new ls({ctx:e.ctx,options:t,chart:e});gt.configure(e,n,t),gt.addBox(e,n);},stop(e){gt.removeBox(e,e.legend),delete e.legend;},beforeUpdate(e,i,t){let n=e.legend;gt.configure(e,n,t),n.options=t;},afterUpdate(e){let i=e.legend;i.buildLabels(),i.adjustHitBoxes();},afterEvent(e,i){i.replay||e.legend.handleEvent(i.event);},defaults:{display:!0,position:"top",align:"center",fullSize:!0,reverse:!1,weight:1e3,onClick(e,i,t){let n=i.datasetIndex,s=t.chart;s.isDatasetVisible(n)?(s.hide(n),i.hidden=!0):(s.show(n),i.hidden=!1);},onHover:null,onLeave:null,labels:{color:e=>e.chart.options.color,boxWidth:40,padding:10,generateLabels(e){let i=e.data.datasets,{labels:{usePointStyle:t,pointStyle:n,textAlign:s,color:o,useBorderRadius:a,borderRadius:r}}=e.legend.options;
17return e._getSortedDatasetMetas().map(l=>{let c=l.controller.getStyle(t?0:void 0),d=pt(c.borderWidth);return{text:i[l.index].label,fillStyle:c.backgroundColor,fontColor:o,hidden:!l.visible,lineCap:c.borderCapStyle,lineDash:c.borderDash,lineDashOffset:c.borderDashOffset,lineJoin:c.borderJoinStyle,lineWidth:(d.width+d.height)/4,strokeStyle:c.borderColor,pointStyle:n||c.pointStyle,rotation:c.rotation,textAlign:s||c.textAlign,borderRadius:a&&(r||c.borderRadius),datasetIndex:l.index};},this);}},title:{color:e=>e.chart.options.color,display:!1,position:"center",text:""}},descriptors:{_scriptable:e=>!e.startsWith("on"),labels:{_scriptable:e=>!["generateLabels","filter","sort"].includes(e)}}},zi=class extends zt{constructor(i){super(),this.chart=i.chart,this.options=i.options,this.ctx=i.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(i,t){let n=this.options;if(this.left=0,this.top=0,!n.display){this.width=this.height=this.right=this.bottom=0;return;}this.width=this.right=i,this.height=this.bottom=t;let s=G(n.text)?n.text.length:1;this._padding=pt(n.padding);let o=s*ct(n.font).lineHeight+this._padding.height;this.isHorizontal()?this.height=o:this.width=o;}isHorizontal(){let i=this.options.position;return i==="top"||i==="bottom";}_drawArgs(i){let{top:t,left:n,bottom:s,right:o,options:a}=this,r=a.align,l=0,c,d,h;return this.isHorizontal()?(d=ft(r,n,o),h=t+i,c=o-n):(a.position==="left"?(d=n+i,h=ft(r,s,t),l=Z*-.5):(d=o-i,h=ft(r,t,s),l=Z*.5),c=s-t),{titleX:d,titleY:h,maxWidth:c,rotation:l};}draw(){let i=this.ctx,t=this.options;if(!t.display)return;let n=ct(t.font),o=n.lineHeight/2+this._padding.top,{titleX:a,titleY:r,maxWidth:l,rotation:c}=this._drawArgs(o);ue(i,t.text,0,0,n,{color:t.color,maxWidth:l,rotation:c,textAlign:Vn(t.align),textBaseline:"middle",translation:[a,r]});}};function s_(e,i){let t=new zi({ctx:e.ctx,options:i,chart:e});gt.configure(e,t,i),gt.addBox(e,t),e.titleBlock=t;}var o_={id:"title",_element:zi,start(e,i,t){s_(e,t);},stop(e){let i=e.titleBlock;gt.removeBox(e,i),delete e.titleBlock;},beforeUpdate(e,i,t){let n=e.titleBlock;gt.configure(e,n,t),n.options=t;},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}},Qn=new WeakMap(),a_={id:"subtitle",start(e,i,t){let n=new zi({ctx:e.ctx,options:t,chart:e});gt.configure(e,n,t),gt.addBox(e,n),Qn.set(e,n);},stop(e){gt.removeBox(e,Qn.get(e)),Qn.delete(e);},beforeUpdate(e,i,t){let n=Qn.get(e);gt.configure(e,n,t),n.options=t;},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}},Ri={average(e){if(!e.length)return!1;let i,t,n=new Set(),s=0,o=0;for(i=0,t=e.length;i<t;++i){let r=e[i].element;if(r&&r.hasValue()){let l=r.tooltipPosition();n.add(l.x),s+=l.y,++o;}}return o===0||n.size===0?!1:{x:[...n].reduce((r,l)=>r+l)/n.size,y:s/o};},nearest(e,i){if(!e.length)return!1;let t=i.x,n=i.y,s=Number.POSITIVE_INFINITY,o,a,r;for(o=0,a=e.length;o<a;++o){let l=e[o].element;if(l&&l.hasValue()){let c=l.getCenterPoint(),d=Rn(i,c);d<s&&(s=d,r=l);}}if(r){let l=r.tooltipPosition();t=l.x,n=l.y;}return{x:t,y:n};}};function Wt(e,i){return i&&(G(i)?Array.prototype.push.apply(e,i):e.push(i)),e;}function ie(e){return(typeof e=="string"||e instanceof String)&&e.indexOf(` 18`)>-1?e.split(` 19`):e;}function r_(e,i){let{element:t,datasetIndex:n,index:s}=i,o=e.getDatasetMeta(n).controller,{label:a,value:r}=o.getLabelAndValue(s);return{chart:e,label:a,parsed:o.getParsed(s),raw:e.data.datasets[n].data[s],formattedValue:r,dataset:o.getDataset(),dataIndex:s,datasetIndex:n,element:t};}function xc(e,i){let t=e.chart.ctx,{body:n,footer:s,title:o}=e,{boxWidth:a,boxHeight:r}=i,l=ct(i.bodyFont),c=ct(i.titleFont),d=ct(i.footerFont),h=o.length,u=s.length,f=n.length,m=pt(i.padding),g=m.height,x=0,v=n.reduce((b,y)=>b+y.before.length+y.lines.length+y.after.length,0);if(v+=e.beforeBody.length+e.afterBody.length,h&&(g+=h*c.lineHeight+(h-1)*i.titleSpacing+i.titleMarginBottom),v){let b=i.displayColors?Math.max(r,l.lineHeight):l.lineHeight;g+=f*b+(v-f)*l.lineHeight+(v-1)*i.bodySpacing;}u&&(g+=i.footerMarginTop+u*d.lineHeight+(u-1)*i.footerSpacing);let p=0,_=function(b){x=Math.max(x,t.measureText(b).width+p);};return t.save(),t.font=c.string,U(e.title,_),t.font=l.string,U(e.beforeBody.concat(e.afterBody),_),p=i.displayColors?a+2+i.boxPadding:0,U(n,b=>{U(b.before,_),U(b.lines,_),U(b.after,_);}
vendor: 23,469 bytes, line 19
19),p=0,t.font=d.string,U(e.footer,_),t.restore(),x+=m.width,{width:x,height:g};}function l_(e,i){let{y:t,height:n}=i;return t<n/2?"top":t>e.height-n/2?"bottom":"center";}function c_(e,i,t,n){let{x:s,width:o}=n,a=t.caretSize+t.caretPadding;if(e==="left"&&s+o+a>i.width||e==="right"&&s-o-a<0)return!0;}function d_(e,i,t,n){let{x:s,width:o}=t,{width:a,chartArea:{left:r,right:l}}=e,c="center";return n==="center"?c=s<=(r+l)/2?"left":"right":s<=o/2?c="left":s>=a-o/2&&(c="right"),c_(c,e,i,t)&&(c="center"),c;}function bc(e,i,t){let n=t.yAlign||i.yAlign||l_(e,t);return{xAlign:t.xAlign||i.xAlign||d_(e,i,t,n),yAlign:n};}function h_(e,i){let{x:t,width:n}=e;return i==="right"?t-=n:i==="center"&&(t-=n/2),t;}function u_(e,i,t){let{y:n,height:s}=e;return i==="top"?n+=t:i==="bottom"?n-=s+t:n-=s/2,n;}function yc(e,i,t,n){let{caretSize:s,caretPadding:o,cornerRadius:a}=e,{xAlign:r,yAlign:l}=t,c=s+o,{topLeft:d,topRight:h,bottomLeft:u,bottomRight:f}=fe(a),m=h_(i,r),g=u_(i,l,c);return l==="center"?r==="left"?m+=c:r==="right"&&(m-=c):r==="left"?m-=Math.max(d,u)+s:r==="right"&&(m+=Math.max(h,f)+s),{x:dt(m,0,n.width-i.width),y:dt(g,0,n.height-i.height)};}function Jn(e,i,t){let n=pt(t.padding);return i==="center"?e.x+e.width/2:i==="right"?e.x+e.width-n.right:e.x+n.left;}function vc(e){return Wt([],ie(e));}function f_(e,i,t){return te(e,{tooltip:i,tooltipItems:t,type:"tooltip"});}function Cc(e,i){let t=i&&i.dataset&&i.dataset.tooltip&&i.dataset.tooltip.callbacks;return t?e.override(t):e;}var Jc={beforeTitle:jt,title(e){if(e.length>0){let i=e[0],t=i.chart.data.labels,n=t?t.length:0;if(this&&this.options&&this.options.mode==="dataset")return i.dataset.label||"";if(i.label)return i.label;if(n>0&&i.dataIndex<n)return t[i.dataIndex];}return"";},afterTitle:jt,beforeBody:jt,beforeLabel:jt,label(e){if(this&&this.options&&this.options.mode==="dataset")return e.label+": "+e.formattedValue||e.formattedValue;let i=e.dataset.label||"";i&&(i+=": ");let t=e.formattedValue;return W(t)||(i+=t),i;},labelColor(e){let t=e.chart.getDatasetMeta(e.datasetIndex).controller.getStyle(e.dataIndex);return{borderColor:t.borderColor,backgroundColor:t.backgroundColor,borderWidth:t.borderWidth,borderDash:t.borderDash,borderDashOffset:t.borderDashOffset,borderRadius:0};},labelTextColor(){return this.options.bodyColor;},labelPointStyle(e){let t=e.chart.getDatasetMeta(e.datasetIndex).controller.getStyle(e.dataIndex);return{pointStyle:t.pointStyle,rotation:t.rotation};},afterLabel:jt,afterBody:jt,beforeFooter:jt,footer:jt,afterFooter:jt};function wt(e,i,t,n){let s=e[i].call(t,n);return typeof s>"u"?Jc[i].call(t,n):s;}var Sc=(()=>{class e extends zt{static positioners=Ri;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(){let t=this._cachedAnimations;if(t)return t;let n=this.chart,s=this.options.setContext(this.getContext()),o=s.enabled&&n.options.animation&&s.animations,a=new ns(this.chart,o);return o._cacheable&&(this._cachedAnimations=Object.freeze(a)),a;}getContext(){return this.$context||(this.$context=f_(this.chart.getContext(),this,this._tooltipItems));}getTitle(t,n){let{callbacks:s}=n,o=wt(s,"beforeTitle",this,t),a=wt(s,"title",this,t),r=wt(s,"afterTitle",this,t),l=[];return l=Wt(l,ie(o)),l=Wt(l,ie(a)),l=Wt(l,ie(r)),l;}getBeforeBody(t,n){return vc(wt(n.callbacks,"beforeBody",this,t));}getBody(t,n){let{callbacks:s}=n,o=[];return U(t,a=>{let r={before:[],lines:[],after:[]},l=Cc(s,a);Wt(r.before,ie(wt(l,"beforeLabel",this,a))),Wt(r.lines,wt(l,"label",this,a)),Wt(r.after,ie(wt(l,"afterLabel",this,a))),o.push(r);}),o;}getAfterBody(t,n){return vc(wt(n.callbacks,"afterBody",this,t));}getFooter(t,n){let{callbacks:s}=n,o=wt(s,"beforeFooter",this,t),a=wt(s,"footer",this,t),r=wt(s,"afterFooter",this,t),l=[];return l=Wt(l,ie(o)),l=Wt(l,ie(a)),l=Wt(l,ie(r)),l;}_createItems(t){let n=this._active,s=this.chart.data,o=[],a=[],r=[],l=[],c,d;for(c=0,d=n.length;c<d;++c)l.push(r_(this.chart,n[c]));return t.filter&&(l=l.filter((h,u,f)=>t.filter(h,u,f,s))),t.itemSort&&(l=l.sort((h,u)=>t.itemSort(h,u,s))),U(l,h=>{let u=Cc(t.callbacks,h);o.push(wt(u,"labelColor",this,h)),a.push(wt(u,"labelPointStyle",this,h)),r.push(wt(u,"labelTextColor",this,h));}),this.labelColors=o,this.labelPointStyles=a,this.labelTextColors=r,this.dataPoints=l,l;}update(t,n){let s=this.options.setContext(this.getContext()),o=this._active,a,r=[];if(!o.length)this.opacity!==0&&(a={opacity:0});else{let l=Ri[s.position].call(this,o,this._eventPosition);r=this._createItems(s),this.title=this.getTitle(r,s),this.beforeBody=this.getBeforeBody(r,s),this.body=this.getBody(r,s),this.afterBody=this.getAfterBody(r,s),this.footer=this.getFooter(r,s);let c=this._size=xc(this,s),d=Object.assign({},l,c),h=bc(this.chart,s,d),u=yc(s,d,h,this.chart);this.xAlign=h.xAlign,this.yAlign=h.yAlign,a={opacity:1,x:u.x,y:u.y,width:c.width,height:c.height,caretX:l.x,caretY:l.y};}this._tooltipItems=r,this.$context=void 0,a&&this._resolveAnimations().update(this,a),t&&s.external&&s.external.call(this,{chart:this.chart,tooltip:this,replay:n});}drawCaret(t,n,s,o){let a=this.getCaretPosition(t,s,o);n.lineTo(a.x1,a.y1),n.lineTo(a.x2,a.y2),n.lineTo(a.x3,a.y3);}getCaretPosition(t,n,s){let{xAlign:o,yAlign:a}=this,{caretSize:r,cornerRadius:l}=s,{topLeft:c,topRight:d,bottomLeft:h,bottomRight:u}=fe(l),{x:f,y:m}=t,{width:g,height:x}=n,v,p,_,b,y,P;return a==="center"?(y=m+x/2,o==="left"?(v=f,p=v-r,b=y+r,P=y-r):(v=f+g,p=v+r,b=y-r,P=y+r),_=v):(o==="left"?p=f+Math.max(c,h)+r:o==="right"?p=f+g-Math.max(d,u)-r:p=this.caretX,a==="top"?(b=m,y=b-r,v=p-r,_=p+r):(b=m+x,y=b+r,v=p+r,_=p-r),P=b),{x1:v,x2:p,x3:_,y1:b,y2:y,y3:P};}drawTitle(t,n,s){let o=this.title,a=o.length,r,l,c;if(a){let d=De(s.rtl,this.x,this.width);for(t.x=Jn(this,s.titleAlign,s),n.textAlign=d.textAlign(s.titleAlign),n.textBaseline="middle",r=ct(s.titleFont),l=s.titleSpacing,n.fillStyle=s.titleColor,n.font=r.string,c=0;c<a;++c)n.fillText(o[c],d.x(t.x),t.y+r.lineHeight/2),t.y+=r.lineHeight+l,c+1===a&&(t.y+=s.titleMarginBottom-l);}}_drawColorBox(t,n,s,o,a){let r=this.labelColors[s],l=this.labelPointStyles[s],{boxHeight:c,boxWidth:d}=a,h=ct(a.bodyFont),u=Jn(this,"left",a),f=o.x(u),m=c<h.lineHeight?(h.lineHeight-c)/2:0,g=n.y+m;if(a.usePointStyle){let x={radius:Math.min(d,c)/2,pointStyle:l.pointStyle,rotation:l.rotation,borderWidth:1},v=o.leftForLtr(f,d)+d/2,p=g+c/2;t.strokeStyle=a.multiKeyBackground,t.fillStyle=a.multiKeyBackground,Hn(t,x,v,p),t.strokeStyle=r.borderColor,t.fillStyle=r.backgroundColor,Hn(t,x,v,p);}else{t.lineWidth=j(r.borderWidth)?Math.max(...Object.values(r.borderWidth)):r.borderWidth||1,t.strokeStyle=r.borderColor,t.setLineDash(r.borderDash||[]),t.lineDashOffset=r.borderDashOffset||0;let x=o.leftForLtr(f,d),v=o.leftForLtr(o.xPlus(f,1),d-2),p=fe(r.borderRadius);Object.values(p).some(_=>_!==0)?(t.beginPath(),t.fillStyle=a.multiKeyBackground,Xe(t,{x,y:g,w:d,h:c,radius:p}),t.fill(),t.stroke(),t.fillStyle=r.backgroundColor,t.beginPath(),Xe(t,{x:v,y:g+1,w:d-2,h:c-2,radius:p}),t.fill()):(t.fillStyle=a.multiKeyBackground,t.fillRect(x,g,d,c),t.strokeRect(x,g,d,c),t.fillStyle=r.backgroundColor,t.fillRect(v,g+1,d-2,c-2));}t.fillStyle=this.labelTextColors[s];}drawBody(t,n,s){let{body:o}=this,{bodySpacing:a,bodyAlign:r,displayColors:l,boxHeight:c,boxWidth:d,boxPadding:h}=s,u=ct(s.bodyFont),f=u.lineHeight,m=0,g=De(s.rtl,this.x,this.width),x=function(A){n.fillText(A,g.x(t.x+m),t.y+f/2),t.y+=f+a;},v=g.textAlign(r),p,_,b,y,P,O,M;for(n.textAlign=r,n.textBaseline="middle",n.font=u.string,t.x=Jn(this,v,s),n.fillStyle=s.bodyColor,U(this.beforeBody,x),m=l&&v!=="right"?r==="center"?d/2+h:d+2+h:0,y=0,O=o.length;y<O;++y){for(p=o[y],_=this.labelTextColors[y],n.fillStyle=_,U(p.before,x),b=p.lines,l&&b.length&&(this._drawColorBox(n,t,y,g,s),f=Math.max(u.lineHeight,c)),P=0,M=b.length;P<M;++P)x(b[P]),f=u.lineHeight;U(p.after,x);}m=0,f=u.lineHeight,U(this.afterBody,x),t.y-=a;}drawFooter(t,n,s){let o=this.footer,a=o.length,r,l;if(a){let c=De(s.rtl,this.x,this.width);for(t.x=Jn(this,s.footerAlign,s),t.y+=s.footerMarginTop,n.textAlign=c.textAlign(s.footerAlign),n.textBaseline="middle",r=ct(s.footerFont),n.fillStyle=s.footerColor,n.font=r.string,l=0;l<a;++l)n.fillText(o[l],c.x(t.x),t.y+r.lineHeight/2),t.y+=r.lineHeight+s.footerSpacing;}}drawBackground(t,n,s,o){let{xAlign:a,yAlign:r}=this,{x:l,y:c}=t,{width:d,height:h}=s,{topLeft:u,topRight:f,bottomLeft:m,bottomRight:g}=fe(o.cornerRadius);n.fillStyle=o.backgroundColor,n.strokeStyle=o.borderColor,n.lineWidth=o.borderWidth,n.beginPath(),n.moveTo(l+u,c),r==="top"&&this.drawCaret(t,n,s,o),n.lineTo(l+d-f,c),n.quadraticCurveTo(l+d,c,l+d,c+f),r==="center"&&a==="right"&&this.drawCaret(t,n,s,o),n.lineTo(l+d,c+h-g),n.quadraticCurveTo(l+d,c+h,l+d-g,c+h),r==="bottom"&&this.drawCaret(t,n,s,o),n.lineTo(l+m,c+h),n.quadraticCurveTo(l,c+h,l,c+h-m),r==="center"&&a==="left"&&this.drawCaret(t,n,s,o),n.lineTo(l,c+u),n.quadraticCurveTo(l,c,l+u,c),n.closePath(),n.fill(),o.borderWidth>0&&n.stroke();}_updateAnimationTarget(t){let n=this.chart,s=this.$animations,o=s&&s.x,a=s&&s.y;if(o||a){let r=Ri[t.position].call(this,this._active,this._eventPosition);if(!r)return;let l=this._size=xc(this,t),c=Object.assign({},r,this._size),d=bc(n,t,c),h=yc(t,c,d,n);(o._to!==h.x||a._to!==h.y)&&(this.xAlign=d.xAlign,this.yAlign=d.yAlign,this.width=l.width,this.height=l.height,this.caretX=r.x,this.caretY=r.y,this._resolveAnimations().update(this,h));}}_willRender(){return!!this.opacity;}draw(t){let n=this.options.setContext(this.getContext()),s=this.opacity;if(!s)return;this._updateAnimationTarget(n);let o={width:this.width,height:this.height},a={x:this.x,y:this.y};s=Math.abs(s)<.001?0:s;let r=pt(n.padding),l=this.title.length||this.beforeBody.length||this.body.length||this.afterBody.length||this.footer.length;n.enabled&&l&&(t.save(),t.globalAlpha=s,this.drawBackground(a,t,o,n),vo(t,n.textDirection),a.y+=r.top,this.drawTitle(a,t,n),this.drawBody(a,t,n),this.drawFooter(a,t,n),Co(t,n.textDirection),t.restore());}getActiveElements(){return this._active||[];}setActiveElements(t,n){let s=this._active,o=t.map(({datasetIndex:l,index:c})=>{let d=this.chart.getDatasetMeta(l);if(!d)throw new Error("Cannot find a dataset at index "+l);return{datasetIndex:l,element:d.data[c],index:c};}),a=!Pi(s,o),r=this._positionChanged(o,n);(a||r)&&(this._active=o,this._eventPosition=n,this._ignoreReplayEvents=!0,this.update(!0));}handleEvent(t,n,s=!0){if(n&&this._ignoreReplayEvents)return!1;this._ignoreReplayEvents=!1;let o=this.options,a=this._active||[],r=this._getActiveElements(t,a,n,s),l=this._positionChanged(r,t),c=n||!Pi(r,a)||l;return c&&(this._active=r,(o.enabled||o.external)&&(this._eventPosition={x:t.x,y:t.y},this.update(!0,n))),c;}_getActiveElements(t,n,s,o){let a=this.options;if(t.type==="mouseout")return[];if(!o)return n.filter(l=>this.chart.data.datasets[l.datasetIndex]&&this.chart.getDatasetMeta(l.datasetIndex).controller.getParsed(l.index)!==void 0);let r=this.chart.getElementsAtEventForMode(t,a.mode,a,s);return a.reverse&&r.reverse(),r;}_positionChanged(t,n){let{caretX:s,caretY:o,options:a}=this,r=Ri[a.position].call(this,t,n);return r!==!1&&(s!==r.x||o!==r.y);}}return e;})(),p_={id:"tooltip",_element:Sc,positioners:Ri,afterInit(e,i,t){t&&(e.tooltip=new Sc({chart:e,options:t}));},beforeUpdate(e,i,t){e.tooltip&&e.tooltip.initialize(t);},reset(e,i,t){e.tooltip&&e.tooltip.initialize(t);},afterDraw(e){let i=e.tooltip;if(i&&i._willRender()){let t={tooltip:i};if(e.notifyPlugins("beforeTooltipDraw",Ki(Yt({},t),{cancelable:!0}))===!1)return;i.draw(e.ctx),e.notifyPlugins("afterTooltipDraw",t);}},afterEvent(e,i){if(e.tooltip){let t=i.replay;e.tooltip.handleEvent(i.event,t,i.inChartArea)&&(i.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:(e,i)=>i.bodyFont.size,boxWidth:(e,i)=>i.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:Jc},defaultRoutes:{bodyFont:"font",footerFont:"font",titleFont:"font"},descriptors:{_scriptable:e=>e!=="filter"&&e!=="itemSort"&&e!=="external",_indexable:!1,callbacks:{_scriptable:!1,_indexable:!1},animation:{_fallback:!1},animations:{_fallback:"animation"}},additionalOptionScopes:["interaction"]},m_=Object.freeze({__proto__:null,Colors:Og,Decimation:Dg,Filler:Zg,Legend:n_,SubTitle:a_,Title:o_,Tooltip:p_}),g_=(e,i,t,n)=>(typeof i=="string"?(t=e.push(i)-1,n.unshift({index:t,label:i})):isNaN(i)&&(t=null),t);function __(e,i,t,n){let s=e.indexOf(i);if(s===-1)return g_(e,i,t,n);let o=e.lastIndexOf(i);return s!==o?t:s;}var x_=(e,i)=>e===null?null:dt(Math.round(e),0,i);function wc(e){let i=this.getLabels();return e>=0&&e<i.length?i[e]:e;}var b_=(()=>{class e extends Le{static id="category";static defaults={ticks:{callback:wc}};constructor(t){super(t),this._startValue=void 0,this._valueRange=0,this._addedLabels=[];}init(t){let n=this._addedLabels;if(n.length){let s=this.getLabels();for(let{index:o,label:a}of n)s[o]===a&&s.splice(o,1);this._addedLabels=[];}super.init(t);}parse(t,n){if(W(t))return null;let s=this.getLabels();return n=isFinite(n)&&s[n]===t?n:__(s,t,L(n,t),this._addedLabels),x_(n,s.length-1);}determineDataLimits(){let{minDefined:t,maxDefined:n}=this.getUserBounds(),{min:s,max:o}=this.getMinMax(!0);this.options.bounds==="ticks"&&(t||(s=0),n||(o=this.getLabels().length-1)),this.min=s,this.max=o;}buildTicks(){let t=this.min,n=this.max,s=this.options.offset,o=[],a=this.getLabels();a=t===0&&n===a.length-1?a:a.slice(t,n+1),this._valueRange=Math.max(a.length-(s?0:1),1),this._startValue=this.min-(s?.5:0);for(let r=t;r<=n;r++)o.push({value:r});return o;}getLabelForValue(t){return wc.call(this,t);}configure(){super.configure(),this.isHorizontal()||(this._reversePixels=!this._reversePixels);}getPixelForValue(t){return typeof t!="number"&&(t=this.parse(t)),t===null?NaN:this.getPixelForDecimal((t-this._startValue)/this._valueRange);}getPixelForTick(t){let n=this.ticks;return t<0||t>n.length-1?null:this.getPixelForValue(n[t].value);}getValueForPixel(t){return Math.round(this._startValue+this.getDecimalForPixel(t)*this._valueRange);}getBasePixel(){return this.bottom;}}return e;})();function y_(e,i){let t=[],{bounds:s,step:o,min:a,max:r,precision:l,count:c,maxTicks:d,maxDigits:h,includeBounds:u}=e,f=o||1,m=d-1,{min:g,max:x}=i,v=!W(a),p=!W(r),_=!W(c),b=(x-g)/(h+1),y=Js((x-g)/m/f)*f,P,O,M,A;if(y<1e-14&&!v&&!p)return[{value:g},{value:x}];A=Math.ceil(x/y)-Math.floor(g/y),A>m&&(y=Js(A*y/m/f)*f),W(l)||(P=Math.pow(10,l),y=Math.ceil(y*P)/P),s==="ticks"?(O=Math.floor(g/y)*y,M=Math.ceil(x/y)*y):(O=g,M=x),v&&p&&o&&dl((r-a)/o,y/1e3)?(A=Math.round(Math.min((r-a)/y,d)),y=(r-a)/A,O=a,M=r):_?(O=v?a:O,M=p?r:M,A=c-1,y=(M-O)/A):(A=(M-O)/y,Ue(A,Math.round(A),y/1e3)?A=Math.round(A):A=Math.ceil(A));let F=Math.max(eo(y),eo(O));P=Math.pow(10,W(l)?F:l),O=Math.round(O*P)/P,M=Math.round(M*P)/P;let R=0;for(v&&(u&&O!==a?(t.push({value:a}),O<a&&R++,Ue(Math.round((O+R*y)*P)/P,a,Pc(a,b,e))&&R++):O<a&&R++);R<A;++R){let H=Math.round((O+R*y)*P)/P;if(p&&H>r)break;t.push({value:H});}return p&&u&&M!==r?t.length&&Ue(t[t.length-1].value,r,Pc(r,b,e))?t[t.length-1].value=r:t.push({value:r}):(!p||M===r)&&t.push({value:M}),t;}function Pc(e,i,{horizontal:t,minRotation:n}){let s=Dt(n),o=(t?Math.sin(s):Math.cos(s))||.001,a=.75*i*(""+e).length;return Math.min(i/o,a);}var Qe=class extends Le{constructor(i){super(i),this.start=void 0,this.end=void 0,this._startValue=void 0,this._endValue=void 0,this._valueRange=0;}parse(i,t){return W(i)||(typeof i=="number"||i instanceof Number)&&!isFinite(+i)?null:+i;}handleTickRangeOptions(){let{beginAtZero:i}=this.options,{minDefined:t,maxDefined:n}=this.getUserBounds(),{min:s,max:o}=this,a=l=>s=t?s:l,r=l=>o=n?o:l;if(i){let l=Ft(s),c=Ft(o);l<0&&c<0?r(0):l>0&&c>0&&a(0);}if(s===o){let l=o===0?1:Math.abs(o*.05);r(o+l),i||a(s-l);}this.min=s,this.max=o;}getTickLimit(){let i=this.options.ticks,{maxTicksLimit:t,stepSize:n}=i,s;return n?(s=Math.ceil(this.max/n)-Math.floor(this.min/n)+1,s>1e3&&(console.warn(`scales.${this.id}.ticks.stepSize: ${n} would result generating up to ${s} ticks. Limiting to 1000.`),s=1e3)):(s=this.computeTickLimit(),t=t||11),t&&(s=Math.min(t,s)),s;}computeTickLimit(){return Number.POSITIVE_INFINITY;}buildTicks(){let i=this.options,t=i.ticks,n=this.getTickLimit();n=Math.max(2,n);let s={maxTicks:n,bounds:i.bounds,min:i.min,max:i.max,precision:t.precision,step:t.stepSize,count:t.count,maxDigits:this._maxDigits(),horizontal:this.isHorizontal(),minRotation:t.minRotation||0,includeBounds:t.includeBounds!==!1},o=this._range||this,a=y_(s,o);return i.bounds==="ticks"&&to(a,this,"value"),i.reverse?(a.reverse(),this.start=this.max,this.end=this.min):(this.start=this.min,this.end=this.max),a;}configure(){let i=this.ticks,t=this.min,n=this.max;if(super.configure(),this.options.offset&&i.length){let s=(n-t)/Math.max(i.length-1,1)/2;t-=s,n+=s;}this._startValue=t,this._endValue=n,this._valueRange=n-t;}getLabelForValue(i){return qe(i,this.chart.options.locale,this.options.ticks.format);}},Go=class extends Qe{static id="linear";static defaults={ticks:{callback:Mi.formatters.numeric}};determineDataLimits(){let{min:i,max:t}=this.getMinMax(!0);this.min=at(i)?i:0,this.max=at(t)?t:1,this.handleTickRangeOptions();}computeTickLimit(){let i=this.isHorizontal(),t=i?this.width:this.height,n=Dt(this.options.ticks.minRotation),s=(i?Math.sin(n):Math.cos(n))||.001,o=this._resolveTickFontOptions(0);return Math.ceil(t/Math.min(40,o.lineHeight/s));}getPixelForValue(i){return i===null?NaN:this.getPixelForDecimal((i-this._startValue)/this._valueRange);}getValueForPixel(i){return this._startValue+this.getDecimalForPixel(i)*this._valueRange;}},Bi=e=>Math.floor(Qt(e)),Ie=(e,i)=>Math.pow(10,Bi(e)+i);function Mc(e){return e/Math.pow(10,Bi(e))===1;}function Oc(e,i,t){let n=Math.pow(10,t),s=Math.floor(e/n);return Math.ceil(i/n)-s;}function v_(e,i){let t=i-e,n=Bi(t);for(;Oc(e,i,n)>10;)n++;for(;Oc(e,i,n)<10;)n--;return Math.min(n,Bi(e));}function C_(e,{min:i,max:t}){i=St(e.min,i);let n=[],s=Bi(i),o=v_(i,t),a=o<0?Math.pow(10,Math.abs(o)):1,r=Math.pow(10,o),l=s>o?Math.pow(10,s):0,c=Math.round((i-l)*a)/a,d=Math.floor((i-l)/r/10)*r*10,h=Math.floor((c-d)/Math.pow(10,o)),u=St(e.min,Math.round((l+d+h*Math.pow(10,o))*a)/a);for(;u<t;)n.push({value:u,major:Mc(u),significand:h}),h>=10?h=h<15?15:20:h++,h>=20&&(o++,h=2,a=o>=0?1:a),u=Math.round((l+d+h*Math.pow(10,o))*a)/a;let f=St(e.max,u);return n.push({value:f,major:Mc(f),significand:h}),n;}var Zo=class extends Le{static id="logarithmic";static defaults={ticks:{callback:Mi.formatters.logarithmic,major:{enabled:!0}}};constructor(i){super(i),this.start=void 0,this.end=void 0,this._startValue=void 0,this._valueRange=0;}parse(i,t){let n=Qe.prototype.parse.apply(this,[i,t]);if(n===0){this._zero=!0;return;}return at(n)&&n>0?n:null;}determineDataLimits(){let{min:i,max:t}=this.getMinMax(!0);this.min=at(i)?Math.max(0,i):null,this.max=at(t)?Math.max(0,t):null,this.options.beginAtZero&&(this._zero=!0),this._zero&&this.min!==this._suggestedMin&&!at(this._userMin)&&(this.min=i===Ie(this.min,0)?Ie(this.min,-1):Ie(this.min,0)),this.handleTickRangeOptions();}handleTickRangeOptions(){let{minDefined:i,maxDefined:t}=this.getUserBounds(),n=this.min,s=this.max,o=r=>n=i?n:r,a=r=>s=t?s:r;n===s&&(n<=0?(o(1),a(10)):(o(Ie(n,-1)),a(Ie(s,1)))),n<=0&&o(Ie(s,-1)),s<=0&&a(Ie(n,1)),this.min=n,this.max=s;}buildTicks(){let i=this.options,t={min:this._userMin,max:this._userMax},n=C_(t,this);return i.bounds==="ticks"&&to(n,this,"value"),i.reverse?(n.reverse(),this.start=this.max,this.end=this.min):(this.start=this.min,this.end=this.max),n;}getLabelForValue(i){return i===void 0?"0":qe(i,this.chart.options.locale,this.options.ticks.format);}configure(){let i=this.min;super.configure(),this._startValue=Qt(i),this._valueRange=Qt(this.max)-Qt(i);}getPixelForValue(i){return(i===void 0||i===0)&&(i=this.min),i===null||isNaN(i)?NaN:this.getPixelForDecimal(i===this.min?0:(Qt(i)-this._startValue)/this._valueRange);}getValueForPixel(i){let t=this.getDecimalForPixel(i);return Math.pow(10,this._startValue+t*this._valueRange);}};function Qo(e){let i=e.ticks;if(i.display&&e.display){let t=pt(i.backdropPadding);return L(i.font&&i.font.size,K.font.size)+t.height;}return 0;}function S_(e,i,t){return t=G(t)?t:[t],{w:bl(e,i.string,t),h:t.length*i.lineHeight};}function kc(e,i,t,n,s){return e===n||e===s?{start:i-t/2,end:i+t/2}:e<n||e>s?{start:i-t,end:i}:{start:i,end:i+t};}function w_(e){let i={l:e.left+e._padding.left,r:e.right-e._padding.right,t:e.top+e._padding.top,b:e.bottom-e._padding.bottom},t=Object.assign({},i),n=[],s=[],o=e._pointLabels.length,a=e.options.pointLabels,r=a.centerPointLabels?Z/o:0;for(let l=0;l<o;l++){let c=a.setContext(e.getPointLabelContext(l));s[l]=c.padding;let d=e.getPointPosition(l,e.drawingArea+s[l],r),h=ct(c.font),u=S_(e.ctx,h,e._pointLabels[l]);n[l]=u;let f=Ct(e.getIndexAngle(l)+r),m=Math.round(Bn(f)),g=kc(m,d.x,u.w,0,180),x=kc(m,d.y,u.h,90,270);P_(t,i,f,g,x);}e.setCenterPoint(i.l-t.l,t.r-i.r,i.t-t.t,t.b-i.b),e._pointLabelItems=k_(e,n,s);}function P_(e,i,t,n,s){let o=Math.abs(Math.sin(t)),a=Math.abs(Math.cos(t)),r=0,l=0;n.start<i.l?(r=(i.l-n.start)/o,e.l=Math.min(e.l,i.l-r)):n.end>i.r&&(r=(n.end-i.r)/o,e.r=Math.max(e.r,i.r+r)),s.start<i.t?(l=(i.t-s.start)/a,e.t=Math.min(e.t,i.t-l)):s.end>i.b&&(l=(s.end-i.b)/a,e.b=Math.max(e.b,i.b+l));}function M_(e,i,t){let n=e.drawingArea,{extra:s,additionalAngle:o,padding:a,size:r}=t,l=e.getPointPosition(i,n+s+a,o),c=Math.round(Bn(Ct(l.angle+rt))),d=D_(l.y,r.h,c),h=T_(c),u=A_(l.x,r.w,h);return{visible:!0,x:l.x,y:d,textAlign:h,left:u,top:d,right:u+r.w,bottom:d+r.h};}function O_(e,i){if(!i)return!0;let{left:t,top:n,right:s,bottom:o}=e;return!(Vt({x:t,y:n},i)||Vt({x:t,y:o},i)||Vt({x:s,y:n},i)||Vt({x:s,y:o},i));}function k_(e,i,t){let n=[],s=e._pointLabels.length,o=e.options,{centerPointLabels:a,display:r}=o.pointLabels,l={extra:Qo(o)/2,additionalAngle:a?Z/s:0},c;for(let d=0;d<s;d++){l.padding=t[d],l.size=i[d];let h=M_(e,d,l);n.push(h),r==="auto"&&(h.visible=O_(h,c),h.visible&&(c=h));}return n;}function T_(e){return e===0||e===180?"center":e<180?"left":"right";}function A_(e,i,t){return t==="right"?e-=i:t==="center"&&(e-=i/2),e;}function D_(e,i,t){return t===90||t===270?e-=i/2:(t>270||t<90)&&(e-=i),e;}function E_(e,i,t){let{left:n,top:s,right:o,bottom:a}=t,{backdropColor:r}=i;if(!W(r)){let l=fe(i.borderRadius),c=pt(i.backdropPadding);e.fillStyle=r;let d=n-c.left,h=s-c.top,u=o-n+c.width,f=a-s+c.height;
vendor: 10,394 bytes, line 19
19Object.values(l).some(m=>m!==0)?(e.beginPath(),Xe(e,{x:d,y:h,w:u,h:f,radius:l}),e.fill()):e.fillRect(d,h,u,f);}}function I_(e,i){let{ctx:t,options:{pointLabels:n}}=e;for(let s=i-1;s>=0;s--){let o=e._pointLabelItems[s];if(!o.visible)continue;let a=n.setContext(e.getPointLabelContext(s));E_(t,a,o);let r=ct(a.font),{x:l,y:c,textAlign:d}=o;ue(t,e._pointLabels[s],l,c+r.lineHeight/2,r,{color:a.color,textAlign:d,textBaseline:"middle"});}}function td(e,i,t,n){let{ctx:s}=e;if(t)s.arc(e.xCenter,e.yCenter,i,0,Q);else{let o=e.getPointPosition(0,i);s.moveTo(o.x,o.y);for(let a=1;a<n;a++)o=e.getPointPosition(a,i),s.lineTo(o.x,o.y);}}function L_(e,i,t,n,s){let o=e.ctx,a=i.circular,{color:r,lineWidth:l}=i;!a&&!n||!r||!l||t<0||(o.save(),o.strokeStyle=r,o.lineWidth=l,o.setLineDash(s.dash||[]),o.lineDashOffset=s.dashOffset,o.beginPath(),td(e,t,a,n),o.closePath(),o.stroke(),o.restore());}function R_(e,i,t){return te(e,{label:t,index:i,type:"pointLabel"});}var Jo=class extends Qe{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:Mi.formatters.numeric},pointLabels:{backdropColor:void 0,backdropPadding:2,display:!0,font:{size:10},callback(i){return i;},padding:5,centerPointLabels:!1}};static defaultRoutes={"angleLines.color":"borderColor","pointLabels.color":"color","ticks.color":"color"};static descriptors={angleLines:{_fallback:"grid"}};constructor(i){super(i),this.xCenter=void 0,this.yCenter=void 0,this.drawingArea=void 0,this._pointLabels=[],this._pointLabelItems=[];}setDimensions(){let i=this._padding=pt(Qo(this.options)/2),t=this.width=this.maxWidth-i.width,n=this.height=this.maxHeight-i.height;this.xCenter=Math.floor(this.left+t/2+i.left),this.yCenter=Math.floor(this.top+n/2+i.top),this.drawingArea=Math.floor(Math.min(t,n)/2);}determineDataLimits(){let{min:i,max:t}=this.getMinMax(!1);this.min=at(i)&&!isNaN(i)?i:0,this.max=at(t)&&!isNaN(t)?t:0,this.handleTickRangeOptions();}computeTickLimit(){return Math.ceil(this.drawingArea/Qo(this.options));}generateTickLabels(i){Qe.prototype.generateTickLabels.call(this,i),this._pointLabels=this.getLabels().map((t,n)=>{let s=X(this.options.pointLabels.callback,[t,n],this);return s||s===0?s:"";}).filter((t,n)=>this.chart.getDataVisibility(n));}fit(){let i=this.options;i.display&&i.pointLabels.display?w_(this):this.setCenterPoint(0,0,0,0);}setCenterPoint(i,t,n,s){this.xCenter+=Math.floor((i-t)/2),this.yCenter+=Math.floor((n-s)/2),this.drawingArea-=Math.min(this.drawingArea/2,Math.max(i,t,n,s));}getIndexAngle(i){let t=Q/(this._pointLabels.length||1),n=this.options.startAngle||0;return Ct(i*t+Dt(n));}getDistanceFromCenterForValue(i){if(W(i))return NaN;let t=this.drawingArea/(this.max-this.min);return this.options.reverse?(this.max-i)*t:(i-this.min)*t;}getValueForDistanceFromCenter(i){if(W(i))return NaN;let t=i/(this.drawingArea/(this.max-this.min));return this.options.reverse?this.max-t:this.min+t;}getPointLabelContext(i){let t=this._pointLabels||[];if(i>=0&&i<t.length){let n=t[i];return R_(this.getContext(),i,n);}}getPointPosition(i,t,n=0){let s=this.getIndexAngle(i)-rt+n;return{x:Math.cos(s)*t+this.xCenter,y:Math.sin(s)*t+this.yCenter,angle:s};}getPointPositionForValue(i,t){return this.getPointPosition(i,this.getDistanceFromCenterForValue(t));}getBasePosition(i){return this.getPointPositionForValue(i||0,this.getBaseValue());}getPointLabelPosition(i){let{left:t,top:n,right:s,bottom:o}=this._pointLabelItems[i];return{left:t,top:n,right:s,bottom:o};}drawBackground(){let{backgroundColor:i,grid:{circular:t}}=this.options;if(i){let n=this.ctx;n.save(),n.beginPath(),td(this,this.getDistanceFromCenterForValue(this._endValue),t,this._pointLabels.length),n.closePath(),n.fillStyle=i,n.fill(),n.restore();}}drawGrid(){let i=this.ctx,t=this.options,{angleLines:n,grid:s,border:o}=t,a=this._pointLabels.length,r,l,c;if(t.pointLabels.display&&I_(this,a),s.display&&this.ticks.forEach((d,h)=>{if(h!==0||h===0&&this.min<0){l=this.getDistanceFromCenterForValue(d.value);let u=this.getContext(h),f=s.setContext(u),m=o.setContext(u);L_(this,f,l,a,m);}}),n.display){for(i.save(),r=a-1;r>=0;r--){let d=n.setContext(this.getPointLabelContext(r)),{color:h,lineWidth:u}=d;!u||!h||(i.lineWidth=u,i.strokeStyle=h,i.setLineDash(d.borderDash),i.lineDashOffset=d.borderDashOffset,l=this.getDistanceFromCenterForValue(t.reverse?this.min:this.max),c=this.getPointPosition(r,l),i.beginPath(),i.moveTo(this.xCenter,this.yCenter),i.lineTo(c.x,c.y),i.stroke());}i.restore();}}drawBorder(){}drawLabels(){let i=this.ctx,t=this.options,n=t.ticks;if(!n.display)return;let s=this.getIndexAngle(0),o,a;i.save(),i.translate(this.xCenter,this.yCenter),i.rotate(s),i.textAlign="center",i.textBaseline="middle",this.ticks.forEach((r,l)=>{if(l===0&&this.min>=0&&!t.reverse)return;let c=n.setContext(this.getContext(l)),d=ct(c.font);if(o=this.getDistanceFromCenterForValue(this.ticks[l].value),c.showLabelBackdrop){i.font=d.string,a=i.measureText(r.label).width,i.fillStyle=c.backdropColor;let h=pt(c.backdropPadding);i.fillRect(-a/2-h.left,-o-d.size/2-h.top,a+h.width,d.size+h.height);}ue(i,r.label,0,-o,d,{color:c.color,strokeColor:c.textStrokeColor,strokeWidth:c.textStrokeWidth});}),i.restore();}drawTitle(){}},ds={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}},Pt=Object.keys(ds);function Tc(e,i){return e-i;}function Ac(e,i){if(W(i))return null;let t=e._adapter,{parser:n,round:s,isoWeekday:o}=e._parseOpts,a=i;return typeof n=="function"&&(a=n(a)),at(a)||(a=typeof n=="string"?t.parse(a,n):t.parse(a)),a===null?null:(s&&(a=s==="week"&&(Ae(o)||o===!0)?t.startOf(a,"isoWeek",o):t.startOf(a,s)),+a);}function Dc(e,i,t,n){let s=Pt.length;for(let o=Pt.indexOf(e);o<s-1;++o){let a=ds[Pt[o]],r=a.steps?a.steps:Number.MAX_SAFE_INTEGER;if(a.common&&Math.ceil((t-i)/(r*a.size))<=n)return Pt[o];}return Pt[s-1];}function F_(e,i,t,n,s){for(let o=Pt.length-1;o>=Pt.indexOf(t);o--){let a=Pt[o];if(ds[a].common&&e._adapter.diff(s,n,a)>=i-1)return a;}return Pt[t?Pt.indexOf(t):0];}function z_(e){for(let i=Pt.indexOf(e)+1,t=Pt.length;i<t;++i)if(ds[Pt[i]].common)return Pt[i];}function Ec(e,i,t){if(!t)e[i]=!0;else if(t.length){let{lo:n,hi:s}=Nn(t,i),o=t[n]>=i?t[n]:t[s];e[o]=!0;}}function B_(e,i,t,n){let s=e._adapter,o=+s.startOf(i[0].value,n),a=i[i.length-1].value,r,l;for(r=o;r<=a;r=+s.add(r,1,n))l=t[r],l>=0&&(i[l].major=!0);return i;}function Ic(e,i,t){let n=[],s={},o=i.length,a,r;for(a=0;a<o;++a)r=i[a],s[r]=a,n.push({value:r,major:!1});return o===0||!t?n:B_(e,n,s,t);}var ta=(()=>{class e extends Le{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,n={}){let s=t.time||(t.time={}),o=this._adapter=new Kp._date(t.adapters.date);o.init(n),We(s.displayFormats,o.formats()),this._parseOpts={parser:s.parser,round:s.round,isoWeekday:s.isoWeekday},super.init(t),this._normalized=n.normalized;}parse(t,n){return t===void 0?null:Ac(this,t);}beforeLayout(){super.beforeLayout(),this._cache={data:[],labels:[],all:[]};}determineDataLimits(){let t=this.options,n=this._adapter,s=t.time.unit||"day",{min:o,max:a,minDefined:r,maxDefined:l}=this.getUserBounds();function c(d){!r&&!isNaN(d.min)&&(o=Math.min(o,d.min)),!l&&!isNaN(d.max)&&(a=Math.max(a,d.max));}(!r||!l)&&(c(this._getLabelBounds()),(t.bounds!=="ticks"||t.ticks.source!=="labels")&&c(this.getMinMax(!1))),o=at(o)&&!isNaN(o)?o:+n.startOf(Date.now(),s),a=at(a)&&!isNaN(a)?a:+n.endOf(Date.now(),s)+1,this.min=Math.min(o,a-1),this.max=Math.max(o+1,a);}_getLabelBounds(){let t=this.getLabelTimestamps(),n=Number.POSITIVE_INFINITY,s=Number.NEGATIVE_INFINITY;return t.length&&(n=t[0],s=t[t.length-1]),{min:n,max:s};}buildTicks(){let t=this.options,n=t.time,s=t.ticks,o=s.source==="labels"?this.getLabelTimestamps():this._generate();t.bounds==="ticks"&&o.length&&(this.min=this._userMin||o[0],this.max=this._userMax||o[o.length-1]);let a=this.min,r=this.max,l=fl(o,a,r);return this._unit=n.unit||(s.autoSkip?Dc(n.minUnit,this.min,this.max,this._getLabelCapacity(a)):F_(this,l.length,n.minUnit,this.min,this.max)),this._majorUnit=!s.major.enabled||this._unit==="year"?void 0:z_(this._unit),this.initOffsets(o),t.reverse&&l.reverse(),Ic(this,l,this._majorUnit);}afterAutoSkip(){this.options.offsetAfterAutoskip&&this.initOffsets(this.ticks.map(t=>+t.value));}initOffsets(t=[]){let n=0,s=0,o,a;this.options.offset&&t.length&&(o=this.getDecimalForValue(t[0]),t.length===1?n=1-o:n=(this.getDecimalForValue(t[1])-o)/2,a=this.getDecimalForValue(t[t.length-1]),t.length===1?s=a:s=(a-this.getDecimalForValue(t[t.length-2]))/2);let r=t.length<3?.5:.25;n=dt(n,0,r),s=dt(s,0,r),this._offsets={start:n,end:s,factor:1/(n+1+s)};}_generate(){let t=this._adapter,n=this.min,s=this.max,o=this.options,a=o.time,r=a.unit||Dc(a.minUnit,n,s,this._getLabelCapacity(n)),l=L(o.ticks.stepSize,1),c=r==="week"?a.isoWeekday:!1,d=Ae(c)||c===!0,h={},u=n,f,m;if(d&&(u=+t.startOf(u,"isoWeek",c)),u=+t.startOf(u,d?"day":r),t.diff(s,n,r)>1e5*l)throw new Error(n+" and "+s+" are too far apart with stepSize of "+l+" "+r);let g=o.ticks.source==="data"&&this.getDataTimestamps();for(f=u,m=0;f<s;f=+t.add(f,l,r),m++)Ec(h,f,g);return(f===s||o.bounds==="ticks"||m===1)&&Ec(h,f,g),Object.keys(h).sort(Tc).map(x=>+x);}getLabelForValue(t){let n=this._adapter,s=this.options.time;return s.tooltipFormat?n.format(t,s.tooltipFormat):n.format(t,s.displayFormats.datetime);}format(t,n){let o=this.options.time.displayFormats,a=this._unit,r=n||o[a];return this._adapter.format(t,r);}_tickFormatFunction(t,n,s,o){let a=this.options,r=a.ticks.callback;if(r)return X(r,[t,n,s],this);let l=a.time.displayFormats,c=this._unit,d=this._majorUnit,h=c&&l[c],u=d&&l[d],f=s[n],m=d&&u&&f&&f.major;return this._adapter.format(t,o||(m?u:h));}generateTickLabels(t){let n,s,o;for(n=0,s=t.length;n<s;
19++n)o=t[n],o.label=this._tickFormatFunction(o.value,n,t);}getDecimalForValue(t){return t===null?NaN:(t-this.min)/(this.max-this.min);}getPixelForValue(t){let n=this._offsets,s=this.getDecimalForValue(t);return this.getPixelForDecimal((n.start+s)*n.factor);}getValueForPixel(t){let n=this._offsets,s=this.getDecimalForPixel(t)/n.factor-n.end;return this.min+s*(this.max-this.min);}_getLabelSize(t){let n=this.options.ticks,s=this.ctx.measureText(t).width,o=Dt(this.isHorizontal()?n.maxRotation:n.minRotation),a=Math.cos(o),r=Math.sin(o),l=this._resolveTickFontOptions(0).size;return{w:s*a+l*r,h:s*r+l*a};}_getLabelCapacity(t){let n=this.options.time,s=n.displayFormats,o=s[n.unit]||s.millisecond,a=this._tickFormatFunction(t,0,Ic(this,[t],this._majorUnit),o),r=this._getLabelSize(a),l=Math.floor(this.isHorizontal()?this.width/r.w:this.height/r.h)-1;return l>0?l:1;}getDataTimestamps(){let t=this._cache.data||[],n,s;if(t.length)return t;let o=this.getMatchingVisibleMetas();if(this._normalized&&o.length)return this._cache.data=o[0].controller.getAllParsedValues(this);for(n=0,s=o.length;n<s;++n)t=t.concat(o[n].controller.getAllParsedValues(this));return this._cache.data=this.normalize(t);}getLabelTimestamps(){let t=this._cache.labels||[],n,s;if(t.length)return t;let o=this.getLabels();for(n=0,s=o.length;n<s;++n)t.push(Ac(this,o[n]));return this._cache.labels=this._normalized?t:this.normalize(t);}normalize(t){return so(t.sort(Tc));}}return e;})();function ts(e,i,t){let n=0,s=e.length-1,o,a,r,l;t?(i>=e[n].pos&&i<=e[s].pos&&({lo:n,hi:s}=Nt(e,"pos",i)),({pos:o,time:r}=e[n]),({pos:a,time:l}=e[s])):(i>=e[n].time&&i<=e[s].time&&({lo:n,hi:s}=Nt(e,"time",i)),({time:o,pos:r}=e[n]),({time:a,pos:l}=e[s]));let c=a-o;return c?r+(l-r)*(i-o)/c:r;}var ea=class extends ta{static id="timeseries";static defaults=ta.defaults;constructor(i){super(i),this._table=[],this._minPos=void 0,this._tableRange=void 0;}initOffsets(){let i=this._getTimestampsForTable(),t=this._table=this.buildLookupTable(i);this._minPos=ts(t,this.min),this._tableRange=ts(t,this.max)-this._minPos,super.initOffsets(i);}buildLookupTable(i){let{min:t,max:n}=this,s=[],o=[],a,r,l,c,d;for(a=0,r=i.length;a<r;++a)c=i[a],c>=t&&c<=n&&s.push(c);if(s.length<2)return[{time:t,pos:0},{time:n,pos:1}];for(a=0,r=s.length;a<r;++a)d=s[a+1],l=s[a-1],c=s[a],Math.round((d+l)/2)!==c&&o.push({time:c,pos:a/(r-1)});return o;}_generate(){let i=this.min,t=this.max,n=super.getDataTimestamps();return(!n.includes(i)||!n.length)&&n.splice(0,0,i),(!n.includes(t)||n.length===1)&&n.push(t),n.sort((s,o)=>s-o);}_getTimestampsForTable(){let i=this._cache.all||[];if(i.length)return i;let t=this.getDataTimestamps(),n=this.getLabelTimestamps();return t.length&&n.length?i=this.normalize(t.concat(n)):i=t.length?t:n,i=this._cache.all=i,i;}getDecimalForValue(i){return(ts(this._table,i)-this._minPos)/this._tableRange;}getValueForPixel(i){let t=this._offsets,n=this.getDecimalForPixel(i)/t.factor-t.end;return ts(this._table,n*this._tableRange+this._minPos,!0);}},N_=Object.freeze({__proto__:null,CategoryScale:b_,LinearScale:Go,LogarithmicScale:Zo,RadialLinearScale:Jo,TimeScale:ta,TimeSeriesScale:ea}),ed=[Xp,yg,m_,N_];jh();var V_=typeof global=="object"&&global&&global.Object===Object&&global,hs=V_;var j_=typeof self=="object"&&self&&self.Object===Object&&self,H_=hs||j_||Function("return this")(),Et=H_;var W_=Et.Symbol,Je=W_;var id=Object.prototype,$_=id.hasOwnProperty,U_=id.toString,ji=Je?Je.toStringTag:void 0;function Y_(e){var i=$_.call(e,ji),t=e[ji];try{e[ji]=void 0;var n=!0;}catch{}var s=U_.call(e);return n&&(i?e[ji]=t:delete e[ji]),s;}var nd=Y_;var q_=Object.prototype,X_=q_.toString;function K_(e){return X_.call(e);}var sd=K_;var G_="[object Null]",Z_="[object Undefined]",od=Je?Je.toStringTag:void 0;function Q_(e){return e==null?e===void 0?Z_:G_:od&&od in Object(e)?nd(e):sd(e);}var _e=Q_;function J_(e){return e!=null&&typeof e=="object";}var Ut=J_;var t0=Array.isArray,Hi=t0;function e0(e){var i=typeof e;return e!=null&&(i=="object"||i=="function");}var Mt=e0;function i0(e){return e;}var us=i0;var n0="[object AsyncFunction]",s0="[object Function]",o0="[object GeneratorFunction]",a0="[object Proxy]";function r0(e){if(!Mt(e))return!1;var i=_e(e);return i==s0||i==o0||i==n0||i==a0;}var ti=r0;var l0=Et["__core-js_shared__"],fs=l0;var ad=function(){var e=/[^.]+$/.exec(fs&&fs.keys&&fs.keys.IE_PROTO||"");
19return e?"Symbol(src)_1."+e:"";}();function c0(e){return!!ad&&ad in e;}var rd=c0;var d0=Function.prototype,h0=d0.toString;function u0(e){if(e!=null){try{return h0.call(e);}catch{}try{return e+"";}catch{}}return"";}var ld=u0;var f0=/[\\^$.*+?()[\]{}|]/g,p0=/^\[object .+?Constructor\]$/,m0=Function.prototype,g0=Object.prototype,_0=m0.toString,x0=g0.hasOwnProperty,b0=RegExp("^"+_0.call(x0).replace(f0,"\\$&").replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g,"$1.*?")+"$");function y0(e){if(!Mt(e)||rd(e))return!1;var i=ti(e)?b0:p0;return i.test(ld(e));}var cd=y0;function v0(e,i){return e?.[i];}var dd=v0;function C0(e,i){var t=dd(e,i);return cd(t)?t:void 0;}var ei=C0;var hd=Object.create,S0=function(){function e(){}return function(i){if(!Mt(i))return{};if(hd)return hd(i);e.prototype=i;var t=new e();return e.prototype=void 0,t;};}(),ud=S0;function w0(e,i,t){switch(t.length){case 0:return e.call(i);case 1:return e.call(i,t[0]);case 2:return e.call(i,t[0],t[1]);case 3:return e.call(i,t[0],t[1],t[2]);}return e.apply(i,t);}var fd=w0;function P0(e,i){var t=-1,n=e.length;for(i||(i=Array(n));++t<n;)i[t]=e[t];return i;}var pd=P0;var M0=800,O0=16,k0=Date.now;function T0(e){var i=0,t=0;return function(){var n=k0(),s=O0-(n-t);if(t=n,s>0){if(++i>=M0)return arguments[0];}else i=0;return e.apply(void 0,arguments);};}var md=T0;function A0(e){return function(){return e;};}var gd=A0;var D0=function(){try{var e=ei(Object,"defineProperty");return e({},"",{}),e;}catch{}}(),ii=D0;var E0=ii?function(e,i){return ii(e,"toString",{configurable:!0,enumerable:!1,value:gd(i),writable:!0});}:us,_d=E0;var I0=md(_d),xd=I0;var L0=9007199254740991,R0=/^(?:0|[1-9]\d*)$/;function F0(e,i){var t=typeof e;return i=i??L0,!!i&&(t=="number"||t!="symbol"&&R0.test(e))&&e>-1&&e%1==0&&e<i;}var ps=F0;function z0(e,i,t){i=="__proto__"&&ii?ii(e,i,{configurable:!0,enumerable:!0,value:t,writable:!0}):e[i]=t;}var ni=z0;function B0(e,i){return e===i||e!==e&&i!==i;}var xe=B0;var N0=Object.prototype,V0=N0.hasOwnProperty;function j0(e,i,t){var n=e[i];(!(V0.call(e,i)&&xe(n,t))||t===void 0&&!(i in e))&&ni(e,i,t);}var bd=j0;function H0(e,i,t,n){var s=!t;t||(t={});for(var o=-1,a=i.length;++o<a;){var r=i[o],l=n?n(t[r],e[r],r,t,e):void 0;l===void 0&&(l=e[r]),s?ni(t,r,l):bd(t,r,l);}return t;}var yd=H0;var vd=Math.max;function W0(e,i,t){return i=vd(i===void 0?e.length-1:i,0),function(){for(var n=arguments,s=-1,o=vd(n.length-i,0),a=Array(o);++s<o;)a[s]=n[i+s];s=-1;for(var r=Array(i+1);++s<i;)r[s]=n[s];return r[i]=t(a),fd(e,this,r);};}var Cd=W0;function $0(e,i){return xd(Cd(e,i,us),e+"");}var Sd=$0;var U0=9007199254740991;function Y0(e){return typeof e=="number"&&e>-1&&e%1==0&&e<=U0;}var ms=Y0;function q0(e){return e!=null&&ms(e.length)&&!ti(e);}var si=q0;function X0(e,i,t){if(!Mt(t))return!1;var n=typeof i;return(n=="number"?si(t)&&ps(i,t.length):n=="string"&&i in t)?xe(t[i],e):!1;}var wd=X0;function K0(e){return Sd(function(i,t){var n=-1,s=t.length,o=s>1?t[s-1]:void 0,a=s>2?t[2]:void 0;for(o=e.length>3&&typeof o=="function"?(s--,o):void 0,a&&wd(t[0],t[1],a)&&(o=s<3?void 0:o,s=1),i=Object(i);++n<s;){var r=t[n];r&&e(i,r,n,o);}return i;});}var Pd=K0;var G0=Object.prototype;function Z0(e){var i=e&&e.constructor,t=typeof i=="function"&&i.prototype||G0;return e===t;}var gs=Z0;function Q0(e,i){for(var t=-1,n=Array(e);++t<e;)n[t]=i(t);return n;}var Md=Q0;var J0="[object Arguments]";function tx(e){return Ut(e)&&_e(e)==J0;}var sa=tx;var Od=Object.prototype,ex=Od.hasOwnProperty,ix=Od.propertyIsEnumerable,nx=sa(function(){return arguments;}())?sa:function(e){return Ut(e)&&ex.call(e,"callee")&&!ix.call(e,"callee");},Wi=nx;function sx(){return!1;}var kd=sx;var Dd=typeof exports=="object"&&exports&&!exports.nodeType&&exports,Td=Dd&&typeof module=="object"&&module&&!module.nodeType&&module,ox=Td&&Td.exports===Dd,Ad=ox?Et.Buffer:void 0,ax=Ad?Ad.isBuffer:void 0,rx=ax||kd,_s=rx;var lx="[object Arguments]",cx="[object Array]",dx="[object Boolean]",hx="[object Date]",ux="[object Error]",fx="[object Function]",px="[object Map]",mx="[object Number]",gx="[object Object]",_x="[object RegExp]",xx="[object Set]",bx="[object String]",yx="[object WeakMap]",vx="[object ArrayBuffer]",Cx="[object DataView]",Sx="[object Float32Array]",wx="[object Float64Array
19]",Px="[object Int8Array]",Mx="[object Int16Array]",Ox="[object Int32Array]",kx="[object Uint8Array]",Tx="[object Uint8ClampedArray]",Ax="[object Uint16Array]",Dx="[object Uint32Array]",tt={};tt[Sx]=tt[wx]=tt[Px]=tt[Mx]=tt[Ox]=tt[kx]=tt[Tx]=tt[Ax]=tt[Dx]=!0;tt[lx]=tt[cx]=tt[vx]=tt[dx]=tt[Cx]=tt[hx]=tt[ux]=tt[fx]=tt[px]=tt[mx]=tt[gx]=tt[_x]=tt[xx]=tt[bx]=tt[yx]=!1;function Ex(e){return Ut(e)&&ms(e.length)&&!!tt[_e(e)];}var Ed=Ex;function Ix(e){return function(i){return e(i);};}var Id=Ix;var Ld=typeof exports=="object"&&exports&&!exports.nodeType&&exports,$i=Ld&&typeof module=="object"&&module&&!module.nodeType&&module,Lx=$i&&$i.exports===Ld,oa=Lx&&hs.process,Rx=function(){try{var e=$i&&$i.require&&$i.require("util").types;return e||oa&&oa.binding&&oa.binding("util");}catch{}}(),aa=Rx;var Rd=aa&&aa.isTypedArray,Fx=Rd?Id(Rd):Ed,xs=Fx;var zx=Object.prototype,Bx=zx.hasOwnProperty;function Nx(e,i){var t=Hi(e),n=!t&&Wi(e),s=!t&&!n&&_s(e),o=!t&&!n&&!s&&xs(e),a=t||n||s||o,r=a?Md(e.length,String):[],l=r.length;for(var c in e)(i||Bx.call(e,c))&&!(a&&(c=="length"||s&&(c=="offset"||c=="parent")||o&&(c=="buffer"||c=="byteLength"||c=="byteOffset")||ps(c,l)))&&r.push(c);return r;}var Fd=Nx;function Vx(e,i){return function(t){return e(i(t));};}var zd=Vx;function jx(e){var i=[];if(e!=null)for(var t in Object(e))i.push(t);return i;}var Bd=jx;var Hx=Object.prototype,Wx=Hx.hasOwnProperty;function $x(e){if(!Mt(e))return Bd(e);var i=gs(e),t=[];for(var n in e)n=="constructor"&&(i||!Wx.call(e,n))||t.push(n);return t;}var Nd=$x;function Ux(e){return si(e)?Fd(e,!0):Nd(e);}var bs=Ux;var Yx=ei(Object,"create"),ne=Yx;function qx(){this.__data__=ne?ne(null):{},this.size=0;}var Vd=qx;function Xx(e){var i=this.has(e)&&delete this.__data__[e];return this.size-=i?1:0,i;}var jd=Xx;var Kx="__lodash_hash_undefined__",Gx=Object.prototype,Zx=Gx.hasOwnProperty;function Qx(e){var i=this.__data__;if(ne){var t=i[e];return t===Kx?void 0:t;}return Zx.call(i,e)?i[e]:void 0;}var Hd=Qx;var Jx=Object.prototype,tb=Jx.hasOwnProperty;function eb(e){var i=this.__data__;return ne?i[e]!==void 0:tb.call(i,e);}var Wd=eb;var ib="__lodash_hash_undefined__";function nb(e,i){var t=this.__data__;return this.size+=this.has(e)?0:1,t[e]=ne&&i===void 0?ib:i,this;}var $d=nb;function oi(e){var i=-1,t=e==null?0:e.length;for(this.clear();++i<t;){var n=e[i];this.set(n[0],n[1]);}}oi.prototype.clear=Vd;oi.prototype.delete=jd;oi.prototype.get=Hd;oi.prototype.has=Wd;oi.prototype.set=$d;var ra=oi;function sb(){this.__data__=[],this.size=0;}var Ud=sb;function ob(e,i){for(var t=e.length;t--;)if(xe(e[t][0],i))return t;return-1;}var be=ob;var ab=Array.prototype,rb=ab.splice;function lb(e){var i=this.__data__,t=be(i,e);if(t<0)return!1;var n=i.length-1;return t==n?i.pop():rb.call(i,t,1),--this.size,!0;}var Yd=lb;function cb(e){var i=this.__data__,t=be(i,e);return t<0?void 0:i[t][1];}var qd=cb;function db(e){return be(this.__data__,e)>-1;}var Xd=db;function hb(e,i){var t=this.__data__,n=be(t,e);return n<0?(++this.size,t.push([e,i])):t[n][1]=i,this;}var Kd=hb;function ai(e){var i=-1,t=e==null?0:e.length;for(this.clear();++i<t;){var n=e[i];this.set(n[0],n[1]);}}ai.prototype.clear=Ud;ai.prototype.delete=Yd;ai.prototype.get=qd;ai.prototype.has=Xd;ai.prototype.set=Kd;var ye=ai;var ub=ei(Et,"Map"),ys=ub;function fb(){this.size=0,this.__data__={hash:new ra(),map:new(ys||ye)(),string:new ra()};}var Gd=fb;function pb(e){var i=typeof e;return i=="string"||i=="number"||i=="symbol"||i=="boolean"?e!=="__proto__":e===null;}var Zd=pb;function mb(e,i){var t=e.__data__;return Zd(i)?t[typeof i=="string"?"string":"hash"]:t.map;}var ve=mb;function gb(e){var i=ve(this,e).delete(e);return this.size-=i?1:0,i;}var Qd=gb;function _b(e){return ve(this,e).get(e);}var Jd=_b;function xb(e){return ve(this,e).has(e);}var th=xb;function bb(e,i){var t=ve(this,e),n=t.size;return t.set(e,i),this.size+=t.size==n?0:1,this;}var eh=bb;function ri(e){var i=-1,t=e==null?0:e.length;for(this.clear();++i<t;){var n=e[i];this.set(n[0],n[1]);}}ri.prototype.clear=Gd;ri.prototype.delete=Qd;ri.prototype.get=Jd;ri.prototype.has=th;ri.prototype.set=eh;var ih=ri;var yb=zd(Object.getPrototypeOf,Object),vs=yb;var vb="[object Object]",Cb=Function.prototype,Sb=Object.prototype,nh=Cb.toString,wb=Sb.hasOwnProperty,Pb=nh.call(Object);function Mb(e){if(!Ut(e)||_e(e)!=vb)return!1;var i=vs(e);if(i===null)return!0;var t=wb.call(i,"constructor")&&i.constructor;return typeof t=="function"&&t instanceof t&&nh.call(t)==Pb;}var sh=Mb;function Ob(){this.__data__=new ye(),this.size=0;}var oh=Ob;function kb(e){var i=this.__data__,t=i.delete(e);return this.size=i.size,t;}var ah=kb;function Tb(e){return this.__data__.get(e);}var rh=Tb;function Ab(e){return this.__data__.has(e);}var lh=Ab;var Db=200;function Eb(e,i){var t=this.__data__;if(t instanceof ye){var n=t.__data__;if(!ys||n.length<Db-1)return n.push([e,i]),this.size=++t.size,this;t=this.__data__=new ih(n);}return t.set(e,i),this.size=t.size,this;}var ch=Eb;function li(e){var i=this.__data__=new ye(e);this.size=i.size;}li.prototype.clear=oh;li.prototype.delete=ah;li.prototype.get=rh;li.prototype.has=lh;li.prototype.set=ch;var dh=li;var ph=typeof exports=="object"&&exports&&!exports.nodeType&&exports,hh=ph&&typeof module=="object"&&module&&!module.nodeType&&module,Ib=hh&&hh.exports===ph,uh=Ib?Et.Buffer:void 0,fh=uh?uh.allocUnsafe:void 0;
19function Lb(e,i){if(i)return e.slice();var t=e.length,n=fh?fh(t):new e.constructor(t);return e.copy(n),n;}var mh=Lb;var Rb=Et.Uint8Array,la=Rb;function Fb(e){var i=new e.constructor(e.byteLength);return new la(i).set(new la(e)),i;}var gh=Fb;function zb(e,i){var t=i?gh(e.buffer):e.buffer;return new e.constructor(t,e.byteOffset,e.length);}var _h=zb;function Bb(e){return typeof e.constructor=="function"&&!gs(e)?ud(vs(e)):{};}var xh=Bb;function Nb(e){return function(i,t,n){for(var s=-1,o=Object(i),a=n(i),r=a.length;r--;){var l=a[e?r:++s];if(t(o[l],l,o)===!1)break;}return i;};}var bh=Nb;var Vb=bh(),yh=Vb;function jb(e,i,t){(t!==void 0&&!xe(e[i],t)||t===void 0&&!(i in e))&&ni(e,i,t);}var Ui=jb;function Hb(e){return Ut(e)&&si(e);}var vh=Hb;function Wb(e,i){if(!(i==="constructor"&&typeof e[i]=="function")&&i!="__proto__")return e[i];}var Yi=Wb;function $b(e){return yd(e,bs(e));}var Ch=$b;function Ub(e,i,t,n,s,o,a){var r=Yi(e,t),l=Yi(i,t),c=a.get(l);if(c){Ui(e,t,c);return;}var d=o?o(r,l,t+"",e,i,a):void 0,h=d===void 0;if(h){var u=Hi(l),f=!u&&_s(l),m=!u&&!f&&xs(l);d=l,u||f||m?Hi(r)?d=r:vh(r)?d=pd(r):f?(h=!1,d=mh(l,!0)):m?(h=!1,d=_h(l,!0)):d=[]:sh(l)||Wi(l)?(d=r,Wi(r)?d=Ch(r):(!Mt(r)||ti(r))&&(d=xh(l))):h=!1;}h&&(a.set(l,d),s(d,l,n,o,a),a.delete(l)),Ui(e,t,d);}var Sh=Ub;function wh(e,i,t,n,s){e!==i&&yh(i,function(o,a){if(s||(s=new dh()),Mt(o))Sh(e,i,a,t,wh,n,s);else{var r=n?n(Yi(e,a),o,a+"",e,i,s):void 0;r===void 0&&(r=o),Ui(e,a,r);}},bs);}var Ph=wh;var Yb=Pd(function(e,i,t){Ph(e,i,t);}),Cs=Yb;Vh();var qb=(()=>{class e{constructor(){this.colorschemesOptions=new fa(void 0);}setColorschemesOptions(t){this.pColorschemesOptions=t,this.colorschemesOptions.next(t);}getColorschemesOptions(){return this.pColorschemesOptions;}}return e.ɵfac=function(t){return new(t||e)();},e.ɵprov=Os({token:e,factory:e.ɵfac,providedIn:"root"}),e;})(),Ss=(()=>{class e{constructor(t,n,s){this.zone=n,this.themeService=s,this.type="bar",this.plugins=[],this.chartClick=new st(),this.chartHover=new st(),this.subs=[],this.themeOverrides={},this.ctx=t.nativeElement.getContext("2d"),this.subs.push(this.themeService.colorschemesOptions.pipe(pa()).subscribe(o=>this.themeChanged(o)));}ngOnChanges(t){let n=["type"],s=Object.getOwnPropertyNames(t);if(s.some(o=>n.includes(o))||s.every(o=>t[o].isFirstChange()))this.render();else{let o=this.getChartConfiguration();this.chart&&(Object.assign(this.chart.config.data,o.data),this.chart.config.plugins&&Object.assign(this.chart.config.plugins,o.plugins),this.chart.config.options&&Object.assign(this.chart.config.options,o.options)),this.update();}}ngOnDestroy(){this.chart&&(this.chart.destroy(),this.chart=void 0),this.subs.forEach(t=>t.unsubscribe());}render(){return this.chart&&this.chart.destroy(),this.zone.runOutsideAngular(()=>this.chart=new Vi(this.ctx,this.getChartConfiguration()));}update(t){this.chart&&this.zone.runOutsideAngular(()=>this.chart?.update(t));}hideDataset(t,n){this.chart&&(this.chart.getDatasetMeta(t).hidden=n,this.update());}isDatasetHidden(t){return this.chart?.getDatasetMeta(t)?.hidden;}toBase64Image(){return this.chart?.toBase64Image();}themeChanged(t){this.themeOverrides=t,this.chart&&(this.chart.config.options&&Object.assign(this.chart.config.options,this.getChartOptions()),this.update());}getChartOptions(){return Cs({onHover:(t,n)=>{!this.chartHover.observed&&!this.chartHover.observers?.length||this.zone.run(()=>this.chartHover.emit({event:t,active:n}));},onClick:(t,n)=>{!this.chartClick.observed&&!this.chartClick.observers?.length||this.zone.run(()=>this.chartClick.emit({event:t,active:n}));}},this.themeOverrides,this.options,{plugins:{legend:{display:this.legend}}});}getChartConfiguration(){return{type:this.type,data:this.getChartData(),options:this.getChartOptions(),plugins:this.plugins};}getChartData(){return this.data?this.data:{labels:this.labels||[],datasets:this.datasets||[]};}}return e.ɵfac=function(t){return new(t||e)(V(Ji),V(tn),V(qb));},e.ɵdir=Qi({type:e,selectors:[["canvas","baseChart",""]],inputs:{type:"type",legend:"legend",data:"data",options:"options",plugins:"plugins",labels:"labels",datasets:"datasets"},outputs:{chartClick:"chartClick",chartHover:"chartHover"},exportAs:["base-chart"],features:[se]}),e;})(),Xb=[[255,99,132],[54,162,235],[255,206,86],[231,233,237],[75,192,192],[151,187,205],[220,220,220],[247,70,74],[70,191,189],[253,180,92],[148,159,177],[77,83,96]],Kb={plugins:{colors:{enabled:!1}},datasets:{line:{backgroundColor:e=>Ce(Se(e.datasetIndex),.4),borderColor:e=>
19Ce(Se(e.datasetIndex),1),pointBackgroundColor:e=>Ce(Se(e.datasetIndex),1),pointBorderColor:"#fff"},bar:{backgroundColor:e=>Ce(Se(e.datasetIndex),.6),borderColor:e=>Ce(Se(e.datasetIndex),1)},get radar(){return this.line;},doughnut:{backgroundColor:e=>Ce(Se(e.dataIndex),.6),borderColor:"#fff"},get pie(){return this.doughnut;},polarArea:{backgroundColor:e=>Ce(Se(e.dataIndex),.6),borderColor:e=>Ce(Se(e.dataIndex),1)},get bubble(){return this.doughnut;},get scatter(){return this.doughnut;},get area(){return this.polarArea;}}};function Ce(e,i){return"rgba("+e.concat(i).join(",")+")";}function ca(e,i){return Math.floor(Math.random()*(i-e+1))+e;}function Gb(){return[ca(0,255),ca(0,255),ca(0,255)];}function Se(e=0){return Xb[e]||Gb();}var Mh=(()=>{class e{constructor(){this.generateColors=!0;}}return e.ɵfac=function(t){return new(t||e)();},e.ɵprov=Os({token:e,factory:e.ɵfac,providedIn:"root"}),e;})();Vi.register(...ed);var Oh=(()=>{class e{constructor(t){t?.plugins&&Vi.register(...t?.plugins);let n=Cs(t?.generateColors?Kb:{},t?.defaults||{});K.set(n);}static forRoot(t){return{ngModule:e,providers:[{provide:Mh,useValue:t}]};}}return e.ɵfac=function(t){return new(t||e)(ga(Mh,8));},e.ɵmod=_a({type:e}),e.ɵinj=ma({}),e;})();ot();var Jb=(e,i)=>i.name;function ty(e,i){if(e&1&&T(0,"img",8),e&2){let t=k().$implicit;E("src",t.icon,qt)("alt",t.name);}}function ey(e,i){if(e&1&&(C(0,"div",7),$(1,ty,1,2,"img",8),C(2,"div",9)(3,"span",10),D(4),Tt(5,"longNumber"),w(),C(6,"span",11),D(7),w()()()),e&2){let t=i.$implicit,n=k();ze("--dx",t.left,"px")("--dy",t.top,"px"),kt("donut__callout--left",t.side==="left")("donut__callout--dimmed",n.currentlyActive&&n.currentlyActive!==t.name),S(),q(1,t.icon?1:-1),S(3),I(Lt(5,11,t.value,1)),S(3),I(n.shareLabel(t.share));}}var Dh=164,da=6,iy=Dh+da*2,ha=Dh/2+22,ny=Math.PI/12,kh=34,ws=["#4481FD","#84A9FF","#C7D9FE","#A5B7D2","#EBF2FF","#6690FF"],sy="66",Th="#E1E7F0",Eh=(()=>{class e{constructor(t,n){this.socialAccountsChangeMonitorService=t,this.zone=n,this.onProviderSelect=new st(),this.ringBox=iy,this.calloutScale=1,this.visibleSlices=[],this.audienceTotalTitle=_i.audienceTotal,this.callouts=[],this.initChart=s=>{let o=s.filter(a=>a.value>0);this.visibleSlices=o,this.audienceTotalTitle=s.length===1?yn(s[0].provider).audienceTotal:_i.audienceTotal,this.currentlyActive=void 0,this.calloutScale=ry(o.length),this.callouts=this.isEmpty?[]:oy(o,this.calloutScale),this.chartData=this.isEmpty?{labels:[],datasets:[{data:[1],backgroundColor:[Th],hoverBackgroundColor:[Th],borderWidth:0,hoverOffset:0}]}:{labels:o.map(a=>a.name),datasets:[{data:o.map(a=>a.value),backgroundColor:this.sliceColors(),hoverBackgroundColor:o.map((a,r)=>ws[r%ws.length]),borderWidth:0,borderRadius:6,spacing:3,hoverOffset:da}]},this.chartOptions={cutout:"70%",responsive:!0,maintainAspectRatio:!1,layout:{padding:da},animation:{animateRotate:!0,duration:600},plugins:{legend:{display:!1},tooltip:{enabled:!1}},onHover:(a,r)=>{let l=a.native?.target;l&&(l.style.cursor=r.length&&!this.isEmpty?"pointer":"default");},onClick:this.handleClick.bind(this)};},this.outsideFilterApplied=s=>{this.currentlyActive=s===_t?void 0:this.visibleSlices.find(o=>o.name.toLowerCase()===s.toLowerCase())?.name,this.repaintSlices();},this.commonClickLogic=s=>{let o=this.visibleSlices[s].name;this.currentlyActive=this.currentlyActive===o?void 0:o,this.repaintSlices(),this.onProviderSelect.emit(o);};}ngOnInit(){this.eventSubscriptions=[this.socialAccountsChangeMonitorService.getSocialAccountFilterApplied().subscribe(this.outsideFilterApplied)];}ngOnChanges(t){let{data:n}=t;n?.currentValue&&this.initChart(n.currentValue);}ngOnDestroy(){this.eventSubscriptions.forEach(t=>t.unsubscribe());}shareLabel(t){return t>0&&t<1?"<1%":`${Math.round(t)}%`;}get isEmpty(){return!this.data?.some(t=>t.value>0);}handleClick(t,n){if(n.length>0&&!this.isEmpty){let s=this.chart.chart.getElementsAtEventForMode(t,"nearest",{intersect:!0},!0);this.zone.run(()=>this.commonClickLogic(s[0].index));}}repaintSlices(){this.chart?.chart&&(this.chart.chart.data.datasets[0].backgroundColor=this.sliceColors(),this.chart.chart.update(
19));}sliceColors(){return this.visibleSlices.map((t,n)=>{let s=ws[n%ws.length];return this.currentlyActive&&this.currentlyActive!==t.name?s+sy:s;});}static{this.ɵfac=function(n){return new(n||e)(V(wn),V(tn));};}static{this.ɵcmp=it({type:e,selectors:[["app-social-chart-controller"]],viewQuery:function(n,s){if(n&1&&nn(Ss,5),n&2){let o;sn(o=on())&&(s.chart=o.first);}},inputs:{dataTotal:"dataTotal",data:"data"},outputs:{onProviderSelect:"onProviderSelect"},standalone:!0,features:[se,nt],decls:11,vars:12,consts:[[1,"donut"],[1,"donut__ring"],["baseChart","",3,"data","options","type"],[1,"donut__center"],[1,"donut__total"],[1,"donut__title"],[1,"donut__callout",3,"donut__callout--left","donut__callout--dimmed","--dx","--dy"],[1,"donut__callout"],[1,"donut__icon",3,"src","alt"],[1,"donut__numbers"],[1,"donut__value"],[1,"donut__share"]],template:function(n,s){n&1&&(C(0,"div",0)(1,"div",1),T(2,"canvas",2),C(3,"div",3)(4,"span",4),D(5),Tt(6,"longNumber"),w(),C(7,"span",5),D(8),w()()(),xt(9,ey,8,14,"div",6,Jb),w()),n&2&&(ze("--ring-box",s.ringBox,"px")("--callout-scale",s.calloutScale),S(2),E("data",s.chartData)("options",s.chartOptions)("type","doughnut"),S(3),I(Lt(6,9,s.dataTotal,1)),S(3),I(s.audienceTotalTitle),S(),bt(s.callouts));},dependencies:[Oh,Ss,Kt],styles:["[_nghost-%COMP%]{display:block;width:100%;height:100%}.donut[_ngcontent-%COMP%]{position:relative;display:flex;align-items:center;justify-content:center;width:100%;height:100%;font-family:Inter,sans-serif}.donut__ring[_ngcontent-%COMP%]{position:relative;width:var(--ring-box);height:var(--ring-box)}.donut__center[_ngcontent-%COMP%]{animation:_ngcontent-%COMP%_social-donut-fade-in .4s ease-out both;position:absolute;inset:0;display:flex;flex-direction:column;align-items:center;justify-content:center;gap:2px;pointer-events:none}.donut__total[_ngcontent-%COMP%]{font-size:18px;font-weight:600;line-height:22px;color:#000}.donut__title[_ngcontent-%COMP%]{font-size:13px;line-height:16px;color:#25365899}.donut__callout[_ngcontent-%COMP%]{animation:_ngcontent-%COMP%_social-donut-fade .4s ease-out both;animation-delay:.25s;position:absolute;display:flex;align-items:center;gap:6px;left:calc(50% + var(--dx));top:calc(50% + var(--dy));transform:translate(calc(-12px * var(--callout-scale)),-50%);pointer-events:none;transition:opacity .2s ease}.donut__callout--left[_ngcontent-%COMP%]{flex-direction:row-reverse;text-align:right;transform:translate(calc(-100% + 12px * var(--callout-scale)),-50%)}.donut__callout--dimmed[_ngcontent-%COMP%]{opacity:.4}.donut__icon[_ngcontent-%COMP%]{width:calc(24px * var(--callout-scale));height:calc(24px * var(--callout-scale));flex:0 0 auto}.donut__numbers[_ngcontent-%COMP%]{display:flex;flex-direction:column;gap:1px}.donut__value[_ngcontent-%COMP%]{font-size:calc(12px * var(--callout-scale));font-weight:700;line-height:1.25;color:#000;white-space:nowrap}.donut__share[_ngcontent-%COMP%]{font-size:calc(10px * var(--callout-scale));line-height:1.2;color:#0009}@keyframes _ngcontent-%COMP%_social-donut-fade-in{0%{opacity:0;transform:translateY(4px)}to{opacity:1;transform:translateY(0)}}@keyframes _ngcontent-%COMP%_social-donut-fade{0%{opacity:0}to{opacity:1}}"]});}}return e;})();function oy(e,i=1){let t=e.reduce((a,r)=>a+r.value,0),n=ay(e.map(a=>a.value),t),s=-Math.PI/2,o=e.map((a,r)=>{let l=s+n[r]/2;s+=n[r];let c=Math.cos(l);return{name:a.name,icon:vn(a.provider),value:a.value,share:t>0?a.value/t*100:0,left:c*ha,top:Math.sin(l)*ha,side:c>=0?"right":"left"};});return Ah(o.filter(a=>a.side==="right"),kh*i),Ah(o.filter(a=>a.side==="left"),kh*i),o;}function Ah(e,i){let t=ha;e.sort((n,s)=>n.top-s.top);for(let n=1;n<e.length;n++)e[n].top=Math.max(e[n].top,e[n-1].top+i);for(let n=e.length-1;n>=0;n--){let s=n===e.length-1?t:e[n+1].top-i;e[n].top=Math.min(e[n].top,s);}for(let n of e){n.top=Math.max(-t,n.top);let s=Math.sqrt(Math.max(0,t*t-n.top*n.top));n.left=n.side==="right"?s:-s;}}function ay(e,i){let t=Math.PI*2,n=t/e.length,s=Math.min(ny,n),o=e.map(r=>Math.max(i>0?r/i*t:n,s)),a=t/o.reduce((r,l)=>r+l,0);return o.map(r=>r*a);}function ry(e){return e<=4?1:e<=6?.85:.72;}Uh();Nh();ot();fi();ot();var Ih=(()=>{class e{constructor(){this.auditRunning=!1,this.auditProgress=0,this.run=new st(),this.dismiss=new st(),this.title="Get Your Social Media Audit",this.subtitle="Your brand\u2019s online performance across channels, activity, and engagement.",this.ctaTitle="Run Social Media Audit",this.closeTitle="Close",this.runningTitle="Auditing\u2026";}get ctaText(){return this.auditRunning?`${this.runningTitle} ${this.auditProgress}%`:this.ctaTitle;}static{this.ɵfac=function(n){return new(n||e)();};}static{this.ɵcmp=it({type:e,selectors:[["social-audit-banner"]],inputs:{auditRunning:"auditRunning",auditProgress:"auditProgress"}
19,outputs:{run:"run",dismiss:"dismiss"},standalone:!0,features:[nt],decls:15,vars:6,consts:[[1,"audit-banner"],[1,"audit-banner__text"],[1,"audit-banner__title"],[1,"audit-banner__subtitle"],["aria-hidden","true",1,"audit-banner__cluster"],["src","/img/social-channels/audit-banner/linkedin.svg","alt","",1,"audit-banner__tile","audit-banner__tile--linkedin"],["src","/img/social-channels/audit-banner/youtube.svg","alt","",1,"audit-banner__tile","audit-banner__tile--youtube"],["src","/img/social-channels/audit-banner/tiktok.svg","alt","",1,"audit-banner__tile","audit-banner__tile--tiktok"],["src","/img/social-channels/audit-banner/instagram.svg","alt","",1,"audit-banner__tile","audit-banner__tile--instagram"],[1,"audit-banner__actions"],["size","lg","variant","primary",3,"clicked","disabled"],["size","md","variant","ghost",3,"clicked","iconContent","ariaLabel"]],template:function(n,s){n&1&&(C(0,"div",0)(1,"div",1)(2,"h2",2),D(3),w(),C(4,"p",3),D(5),w()(),C(6,"div",4),T(7,"img",5)(8,"img",6)(9,"img",7)(10,"img",8),w(),C(11,"div",9)(12,"lib-button",10),z("clicked",function(){return s.run.emit();}),D(13),w(),C(14,"lib-button-icon",11),z("clicked",function(){return s.dismiss.emit();}),w()()()),n&2&&(S(3),I(s.title),S(2),I(s.subtitle),S(7),E("disabled",s.auditRunning),S(),yt(" ",s.ctaText," "),S(),E("iconContent","/img/icon-library/symbols/exit-close.svg")("ariaLabel",s.closeTitle));},dependencies:[ae,hn],styles:["[_nghost-%COMP%]{display:block;container:audit-banner/inline-size;width:100%}.audit-banner[_ngcontent-%COMP%]{display:flex;align-items:center;justify-content:space-between;gap:24px;box-sizing:border-box;width:100%;min-height:122px;padding:24px;border-radius:16px;background:#ebf2ff;overflow:hidden}.audit-banner__text[_ngcontent-%COMP%]{display:flex;flex:1 1 auto;flex-direction:column;gap:6px;min-width:280px;color:#253658}.audit-banner__title[_ngcontent-%COMP%]{margin:0;font-size:20px;font-weight:700;line-height:1.4;letter-spacing:-.2px}.audit-banner__subtitle[_ngcontent-%COMP%]{margin:0;font-size:14px;font-weight:400;line-height:1.4;letter-spacing:-.14px}.audit-banner__cluster[_ngcontent-%COMP%]{position:relative;flex:0 0 450px;width:450px;height:63px;transform-origin:left center}.audit-banner__tile[_ngcontent-%COMP%]{position:absolute;box-sizing:border-box;object-fit:contain;background:#ffffffb3;box-shadow:0 0 13.746px #2536581f}.audit-banner__tile--linkedin[_ngcontent-%COMP%]{top:-23.04px;left:130.54px;width:99.97px;height:99.97px;padding:20.22px;border-radius:21.58px;transform:rotate(-10.99deg)}.audit-banner__tile--youtube[_ngcontent-%COMP%]{top:13.64px;left:218.77px;width:81.1px;height:81.1px;padding:14.66px;border-radius:14.35px;transform:rotate(11.89deg)}.audit-banner__tile--tiktok[_ngcontent-%COMP%]{top:-41.83px;left:296.18px;width:132.97px;height:132.97px;padding:24.03px;border-radius:25.64px;transform:rotate(-16.53deg)}.audit-banner__tile--instagram[_ngcontent-%COMP%]{top:-29.86px;left:12.6px;width:124.34px;height:124.34px;padding:22.47px;border-radius:22.25px;background:#ffffffe6;transform:rotate(12.64deg)}.audit-banner__actions[_ngcontent-%COMP%]{display:flex;flex-shrink:0;align-items:center;gap:12px;white-space:nowrap}@container audit-banner (max-width: 1150px){.audit-banner__cluster[_ngcontent-%COMP%]{flex:0 0 338px;transform:scale(.75)}}@container audit-banner (max-width: 1024px){.audit-banner__cluster[_ngcontent-%COMP%]{display:none}}@container audit-banner (max-width: 700px){.audit-banner[_ngcontent-%COMP%]{flex-direction:column;align-items:stretch;gap:16px;min-height:0}.audit-banner__text[_ngcontent-%COMP%]{flex:0 0 auto;min-width:0}.audit-banner__actions[_ngcontent-%COMP%]{justify-content:space-between}}"]});}}return e;})();fi();function qi(e){return typeof e=="number"&&Number.isFinite(e)?e:null;}function ly(e){return(qi(e.reactions)??qi(e.likes)??0)+(qi(e.comments)??0)+(qi(e.shares)??0);}function cy(e){let i=qi(e.views);return i===null||i<=0?null:Math.round(ly(e)/i*100*100)/100;}function dy(e){let i=e.length;return e.map(t=>{let n=e.filter(o=>o<t).length,s=e.filter(o=>o===t).length;return Math.floor((n+s/2)/i*100+.5);});}function Lh(e){let i=e.map(n=>({id:n.id,rate:cy(n),score:null})),t=new Map();
19i.forEach((n,s)=>{let o=e[s].accountId;n.rate!==null&&o&&t.set(o,[...(t.get(o)??[]),s]);});for(let n of t.values()){let s=dy(n.map(o=>i[o].rate));n.forEach((o,a)=>{i[o].score=s[a];});}return i;}Yh();qh();function Rh(e){let i=e?.actions?.some(o=>za.includes(o)),t=e?.supplementary?.[1]?.id;if(!i||typeof t!="string")return null;let n=e.status===Ba.failed,s=typeof e.percent=="number"&&Number.isFinite(e.percent)?Math.min(100,Math.max(0,e.percent)):null;return!n&&s===null?null:{postId:t,percent:s,failed:n};}var Bh=Gi(cn());var Fh=["html","image"];function zh(e){return e?.success?e.type==="html"?e.htmlUrl?{type:"html",url:e.htmlUrl}:null:e.image?{type:"image",url:e.image}:null:null;}ot();Es();hi();Za();Rs();Gh();Qa();Xa();Wa();Xh();Ua();Kh();Ia();function hy(e,i){if(e&1){let t=ht();C(0,"lib-button-icon",13),z("clicked",function(){B(t);let s=k();return N(s.openLatestSocialMediaAudit());}),w();}e&2&&E("iconContent","/img/icon-library/other/file.svg");}function uy(e,i){if(e&1){let t=ht();C(0,"social-audit-banner",30),z("run",function(){B(t);let s=k(2);return N(s.socialMediaAuditDialogOpen(!0));})("dismiss",function(){B(t);let s=k(2);return N(s.dismissAuditBanner());}),w();}if(e&2){let t=k(2);E("auditRunning",t.auditRunning)("auditProgress",t.auditProgress);}}function fy(e,i){e&1&&T(0,"social-donut-shimmer");}function py(e,i){if(e&1){let t=ht();C(0,"app-social-chart-controller",31),z("onProviderSelect",function(s){B(t);let o=k(2);return N(o.onFilterProviderClick(s));}),w();}if(e&2){let t=k(2);E("dataTotal",t.summaryChartDataTotal)("data",t.summaryChartData);}}function my(e,i){if(e&1){let t=ht();C(0,"div",33),z("click",function(){let s=B(t).index,o=k(3);return N(o.onAccountChartCLick(s,null));}),C(1,"social-channels-chart",34),z("selectMenuOption",function(s){let o=B(t).$implicit,a=k(3);return N(a.onAccountCardAction(o,s));}),w()();}if(e&2){let t=i.$implicit,n=i.index,s=k(3);S(),E("active",s.selectedChartIndex===n)("data",t)("isLoading",t==null?null:t.isLoading);}}function gy(e,i){if(e&1&&(va(0),$(1,my,2,3,"div",32),Ca()),e&2){let t=k(2);S(),E("ngForOf",t.filteredFormattedChartData);}}function _y(e,i){e&1&&(C(0,"div",24),T(1,"social-channels-chart-shimmer"),w(),C(2,"div",24),T(3,"social-channels-chart-shimmer"),w()),e&2&&(S(2),ze("opacity",.5));}function xy(e,i){if(e&1){let t=ht();C(0,"main"),$(1,uy,1,2,"social-audit-banner",14),C(2,"section",15)(3,"div",16)(4,"lib-tab",17),z("tabChange",function(s){B(t);let o=k();return N(o.onPeriodTabChange(s));}),w()(),T(5,"app-portable-collaborate-btn",18),w(),C(6,"section",19)(7,"div",20)(8,"h2"),D(9),w(),C(10,"lib-button-icon",21),z("clicked",function(){B(t);let s=k();return N(s.toggleAudience());}),w()(),C(11,"div",22)(12,"section",23)(13,"div",24),$(14,fy,1,0,"social-donut-shimmer")(15,py,1,2),w(),$(16,gy,2,1,"ng-container",10)(17,_y,4,2,"ng-template",null,1,Ds),w()()(),C(19,"section",25)(20,"div",26)(21,"h2"),D(22),w(),C(23,"div",27)(24,"lib-dropdown",28),z("valueChange",function(s){B(t);let o=k();return N(o.onStatusFilterChange(s));}),w(),C(25,"lib-dropdown",28),z("valueChange",function(s){B(t);let o=k();return N(o.onMemberFilterChange(s));}),w(),C(26,"lib-dropdown",28),z("valueChange",function(s){B(t);let o=k();return N(o.onChannelFilterChange(s));}),w()()(),C(27,"social-posts-table",29),z("sortChange",function(s){B(t);let o=k();return N(o.onPostsSortChange(s));})("postAction",function(s){B(t);let o=k();return N(o.onPostMenuOptionSelection(s.post,s.option));})("postOpen",function(s){B(t);let o=k();return N(o.openPost(s));}),w()()();}if(e&2){let t=Ts(18),n=k();S(),E("ngIf",n.showAuditBanner),S(3),E("tabs",n.periodTabs)("activeTab",n.currentTimeFilter.value),S(),E("hidden",!n.canCollaborate)("pageOrigin","social-dashboard"),S(4),I(n.audienceTitle),S(),kt("audience-header__toggle--collapsed",n.isAudienceCollapsed),E("iconContent","/img/icon-library/symbols/chevron-right.svg"),ya("aria-expanded",!n.isAudienceCollapsed),S(),kt("collapse-section-content--collapsed",n.isAudienceCollapsed),S(3),q(14,n.isChartsLoading?14:15),S(2),E("ngIf",!n.isChartsLoading)("ngIfElse",t),S(6),I(n.recentTitle),S(2),E("options",n.statusOptions)("value",n.statusFilterValue)("labelText",n.showTitle)("label",!1)("required",!1)("showSelected",!0),S(),E("options",n.memberOptions)("value",n.memberFilterValue)("labelText",n.memberTitle)("label",!1)("required",!1)("showSelected",!0),S(),E("options",n.channelOptions)("value",n.currentProviderFilter)("labelText",n.channelTitle)("label",!1)("required",!1)("showSelected",!0),S(),E("posts",n.postsData)("isLoading",n.isPostsLoading)("uploadProgress",n.uploadProgress)("period",n.currentTimeFilter==null?null:n.currentTimeFilter.value)("sort",n.postsSort);}}function by(e,i){if(e&1){let t=ht();C(0,"section",35)(1,"div",36),T(2,"img",37),w(),C(3,"div",38)(4,"div",39),D(5),w(),C(6,"div",40),D(7),w(),C(8,"button",41),z("click",function(){B(t);let s=k();return N(s.navigateToAccounts());}),D(9),w()()();}if(e&2){let t=k();S(2),E("src",t.emptyAccountsImg,qt),S(3),yt(" ",t.titleEmpty," "),S(2),yt(" ",t.bodyEmpty," "),S(2),yt(" ",t.btnEmpty," ");}}var yy={[Rt.lastWeek]:7,[Rt.lastMonth]:30,[Rt.lastThreeMonths]:90},Ps=(()=>{class e{get statusFilterValue(){return this.selectedPostStatus?.value??_t;}get memberFilterValue(){return this.selectedAccountId??_t;}constructor(t,n,s,o,a,r,l,c,d,h,u,f,m,g,x,v){this.router=t,this.route=n,this.location=s,this.channelsHelperService=o,this.planHelperService=a,this.socialNetworksHelperService=r,this.dialogHelperService=l,this.errorParseService=c,this.eventsService=d,this.workspaceHelperService=h,this.notifier=u,this.websocketService=f,this.adminRequestsService=m,this.socialAccountsChangeMonitorService=g,this.spinnerService=x,this.socialAuditProgressService=v,this._EVENTS_PATH=this.eventsService.events.social,this.tutorialCourseId="6537f4cd4d0c6dc8baa47e2a",this.tutorialLessonId="6537f77e91f1
19d8dbcc964e0f",this.tutorialBtnStyle=gr.blue,this.POSTS_SPINNER_ID="posts-spinner",this.postsData=[],this.uploadProgress=new Map(),this.statusOptions=[],this.memberOptions=[],this.channelOptions=[{value:_t,name:"All"},...lr.map(p=>({value:p.id,name:p.name,sideIconClass:p.image}))],this.formattedChartData=[],this.filteredFormattedChartData=[],this.asocialAccountsData=new Set(),this.summaryChartData=[],this.currentProviderIndex=0,this.periodTabs=[],this.currentPage=0,this.postsRequestId=0,this.chartsRequestId=0,this.isPostsLoading=!0,this.postsSort={sb:"createdAt",sd:"down"},this.isChartsLoading=!0,this.auditSubscription=null,this.runningAuditLookup=Promise.resolve(),this.isAudienceCollapsed=!1,this.socialMediaAuditType=null,this.auditRunning=!1,this.auditProgress=0,this.AUDIT_BANNER_DISMISSED_KEY="social-audit-banner-dismissed",this.showAuditBanner=!this.isAuditBannerDismissed(),this.emptyAccountsImg=nr,this.showEmptyScreen=!1,this.titleEmpty="Free analytics of your videos on social media",this.bodyEmpty="Get a free weekly performance reports delivered straight to your inbox. Connect your social accounts to track video performance, amount of followers, and engagement across all social media platforms. Share your dashboard for free and receive weekly reports by email.",this.btnEmpty="Link social accounts",this.pageTitle="Social Channels",this.pageSubTitle="Manage Accounts",this.tutorialTitle="Tutorial",this.socialMediaAuditTitle="Social Media Audit",this.socialMediaAuditRunningTitle="Auditing\u2026",this.audienceTitle="Audience",this.recentTitle="Recent Posts",this.showTitle="Show",this.copiedTitle="Copied to clipboard",this.copyFailedTitle="Could not copy to clipboard",this.memberTitle="Member",this.channelTitle="Channel",this.syncingTitle="Syncing\u2026",this.removeAccountTitle="Remove social account",this.removeAccountMsg="Are you sure you want to remove this social account? Its analytics will no longer appear on this dashboard.",this.removeAccountConfirm="Remove",this.removeAccountCancel="Cancel",this.removeAccountSuccess="Social account removed successfully",this.removeAccountError="The channel can only be removed by the user who established the connection.",this.SOCIAL_MEDIA_AUDIT_SPINNER_ID="social-media-audit-spinner",this.setEventSubscriptions=()=>{this.eventSubscriptions=[this.workspaceHelperService.workspaceChanged.subscribe(this.onWorkspaceChange),this.websocketService.progressUpdate$.subscribe(this.onUploadProgress),this.websocketService.socialPostId$.subscribe(p=>{p&&p.id&&this.postsData.some(_=>_.id===p.id)&&(this.currentPage=0,this.fillPostData());})];},this.onWorkspaceChange=p=>{if(p!==null){let{workspaceId:_,workspaceName:b}=p;this.workspaceId!==_&&(this.workspaceId=_,this.workspaceName=b,this.resetFilters(),this.fillPostData(),this.fillSummaryChartPie().then(()=>{this.fillChartsData();}),this.loadWorkspaceMembers(),this.runningAuditLookup=this.restoreRunningAudit());}},this.resetFilters=()=>{this.currentProviderFilter=_t,this.currentTimeFilter=this.defaultPeriod,this.selectedPostStatus=this.postStatusMenu[0],this.postsSort={sb:"createdAt",sd:"down"},this.isAudienceCollapsed=!1,this.currentPage=0,this.selectedAccountId=void 0;},this.fillSummaryChartPie=()=>J(this,null,function*(){try{this.isChartsLoading=!0,this.summaryChartData=[],this.summaryChartDataTotal=0;let p=yield this.socialNetworksHelperService.getLinkedAccounts(this.workspaceId,100,this.currentPage>0?this.currentPage-1:0,!0,this.selectedAccountId),_=Array.from(new Set(p.data.reverse().map(y=>y.externalId))).map(y=>p.data.find(P=>P.externalId===y&&P.channel.isShared)||p.data.find(P=>P.externalId===y&&!P.channel.isShared)).filter(Boolean);this.asocialAccountsData=new Set(_);let b={};for(let y of this.asocialAccountsData){let P=zs(y.channel.provider);!P||!Fs(y.channel.provider)||(b[P]??={name:P,value:0,provider:y.channel.provider},b[P].value+=Number(y.channel.memberCount)||0);}this.summaryChartData=Object.values(b),this.summaryChartDataTotal=this.summaryChartData.reduce((y,P)=>y+P.value,0);}catch(p){this.isChartsLoading=!1,console.error(p);}finally{this.showEmptyScreen=this.asocialAccountsData.size===0;}}),this.fillPostData=()=>J(this,null,function*(){let p=++this.postsRequestId;try{this.isPostsLoading=!0,this.postsData=[];let _=yield this.getPostDataPromise();if(p!==this.postsRequestId)return;this.postsData=this.sortedPosts(_),this.refreshPostsPerformance(),this.syncUploadTracking();}catch(_){if(p!==this.postsRequestId)return;this.notifier.error("Failed to load your posts. Please try again"),this.eventsService.log(this._EVENTS_PATH.socialAnalyticsError,{message:"Failed to load your posts. Please try again"}),console.error(_);}finally{p===this.postsRequestId&&(this.isPostsLoading=!1);}}),this.onUploadProgress=p=>{let _=Rh(p),b=_&&this.postsData.find(y=>y.id===_.postId);if(b){if(_.failed){b.status=Be.failed,this.postsData=[...this.postsData],this.syncUploadTracking();return;}this.uploadProgress=new Map(this.uploadProgress).set(b.id,_.percent);}},this.syncUploadTracking=()=>{let p=new Set(this.postsData.filter(_=>_.status===Be.processing).map(_=>_.id));this.uploadProgress=new Map([...this.uploadProgress].filter(([_])=>p.has(_))),p.size>0&&this.websocketService.connect();},this.refreshPostsPerformance=()=>{let p=this.postsData.filter(b=>
19!b.isScheduled),_=new Map(Lh(p.map(b=>Yt({id:b.id,accountId:b.accountId},b.metrics))).map(b=>[b.id,b]));for(let b of p){let y=_.get(b.id);b.engagementRate=y.rate,b.performance=cr(y.score,b.needsResync);}},this.getPostDataPromise=()=>this.channelsHelperService.getPosts({deskId:this.workspaceId,provider:[this.currentProviderFilter],page:this.currentPage,userId:this.selectedAccountId,status:this.selectedPostStatus?.value,sort:this.isLocalSort?void 0:this.postsSort,range:this.periodRange}),this.fillChartsData=()=>J(this,null,function*(){let p=++this.chartsRequestId;try{this.setChartsLoadingStatus(!0);let _=yield this.channelsHelperService.getChartData(this.workspaceId,this.currentTimeFilter.value,this.periodRange);if(p!==this.chartsRequestId)return;this.addProviderDataToCharts(_);}catch(_){if(p!==this.chartsRequestId)return;this.notifier.error("Failed to load your posts. Please try again"),console.error(_),this.eventsService.log(this._EVENTS_PATH.socialAnalyticsError,{message:"Failed to load your posts. Please try again"}),this.setChartsLoadingStatus(!1);}finally{p===this.chartsRequestId&&(this.isChartsLoading=!1);}}),this.addProviderDataToCharts=p=>{this.formattedChartData=[],this.filteredFormattedChartData=[];for(let _ of this.asocialAccountsData){if(!Fs(_.channel.provider))continue;let b=p.find(P=>P.id===_.id),y=Yt({id:_.id,provider:_.channel.provider,accountData:{accountAvatar:_.channel.profileImgUrl,accountName:_.channel.title,socialLogo:_.channel.logoUrl,workspaceName:_.channel.isShared?"Workspace":"Personal",externalId:_.externalId,taskError:_.taskError,lastSynced:_.lastSynced},empty:!b,followers:{total:Number(_.channel.memberCount)||0,change:void 0}},b);this.formattedChartData.push(y),this.filteredFormattedChartData.push(y);}},this.setChartsLoadingStatus=p=>{Object.values(this.filteredFormattedChartData).forEach(_=>{_.isLoading=p;});},this.toggleAudience=()=>{this.isAudienceCollapsed=!this.isAudienceCollapsed;},this.onPostsSortChange=p=>J(this,null,function*(){let _=this.isLocalSort;if(this.postsSort=p,!this.isLocalSort||!_){this.currentPage=0,this.fillPostData();return;}let b=this.postsData;this.isPostsLoading=!0,this.postsData=[],yield new Promise(y=>setTimeout(y)),this.postsData=this.sortedPosts(b),this.isPostsLoading=!1;}),this.sortedPosts=p=>{if(!this.isLocalSort)return p;let _=this.postsSort.sd==="down"?-1:1;return[...p].sort((b,y)=>b.engagementTotal===null||y.engagementTotal===null?(b.engagementTotal===null?1:0)-(y.engagementTotal===null?1:0):_*(b.engagementTotal-y.engagementTotal));},this.onStatusFilterChange=p=>{this.selectedPostStatus=this.postStatusMenu.find(_=>(_.value??_t)===p)??this.postStatusMenu[0],this.currentPage=0,this.fillPostData();},this.onMemberFilterChange=p=>{this.selectedAccountId=p===_t?void 0:p,this.selectedAccountId&&this.sendFilterEvent(Cn.memberFilter,Sn.member,void 0,void 0),this.currentPage=0,this.fillPostData();},this.onChannelFilterChange=p=>{this.currentProviderFilter=p??_t,this.currentProviderFilter!==_t&&this.sendFilterEvent(Cn.channelFilter,Sn.channel,this.currentProviderFilter,void 0),this.socialAccountsChangeMonitorService.setSocialAccountFilterApplied(this.currentProviderFilter),this.currentPage=0,this.fillPostData();},this.onAccountChartCLick=(p,_)=>{this.selectedChartIndex===p?this.selectedChartIndex=-1:this.selectedChartIndex=p;},this.onPostMenuOptionSelection=(p,_)=>J(this,null,function*(){switch(_.value){case Bt.DELETE_FROM_SCHEDULE:this.onPostRemoveFromSchedule(p);break;case Bt.DELETE_FROM_ANALYTICS:this.onPostRemovalRequest(p,xi.ANALYTICS);break;case Bt.DELETE_FROM_CHANNEL:this.onPostRemovalRequest(p,xi.PROVIDER);break;case Bt.RECONNECT_CHANNEL:this.reconnectProvider(p.provider,p.externalId);break;default:break;}this.eventsService.log(this._EVENTS_PATH.postAction,{postId:p.id,social:p.provider.toLowerCase(),action:_.name.toLowerCase(),reach:p.reach,engagement:p.engagement});}),this.reloadDashboard=()=>{this.fillPostData(),this.fillSummaryChartPie().then(()=>{this.fillChartsData();});},this.reconnectProvider=(p,_)=>J(this,null,function*(){try{return yield this.socialNetworksHelperService.syncSocialProvider(this.workspaceId,p,_),this.resetFilters(),this.reloadDashboard(),"";}catch(b){console.error(b);let y=typeof b=="string"?b:"Failed to sync";return this.notifier.error(y),this.eventsService.log(this._EVENTS_PATH.socialAnalyticsError,{message:y}),y;}}),this.onAccountCardAction=(p,_)=>{switch(_.value){case Me.REFRESH:this.refreshAccountConnection(p);break;case Me.REMOVE:this.onAccountRemoveRequest(p);break;default:break;}},this.refreshAccountConnection=p=>J(this,null,function*(){this.notifier.info(this.syncingTitle);let _=yield this.reconnectProvider(p.provider,p.accountData?.externalId);this.logAccountEvent(p,Bs.sync,_);}),this.onAccountRemoveRequest=p=>{this.dialogHelperService.showNewConfirmationDialog({title:this.removeAccountTitle,msg:this.removeAccountMsg,confirmationText:this.removeAccountConfirm,cancellationText:this.removeAccountCancel,confirmButtonDestructive:!0,onSubmit:()=>this.removeAccount(p)}),this.eventsService.log(this._EVENTS_PATH.deleteStart,{social:p.provider.toLowerCase()});},this.removeAccount=p=>J(this,null,function*(){let _="";try{yield this.adminRequestsService.unlinkSocialProvider(p.id),this.socialAccountsChangeMonitorService.setSocialAccountDeleted(p.id),this.notifier.success(this.removeAccountSuccess),this.eventsService.log(this._EVENTS_PATH.delete,{social:p.provider.toLowerCase()}),this.reloadDashboard();}catch(b){console.error(b),_=b?.responseJSON?.msg??this.removeAccountError,this.notifier.error(_);}finally{this.dialogHelperService.close(),this.logAccountEvent(p,Bs.unlink,_);}}),this.logAccountEvent=(p,_,b)=>{this.eventsService.log(this._EVENTS_PATH.add,{provider:p.provider.toLowerCase(),action:_,url:"",followers:p.followers?.total,error:b});},this.onPostRemoveFromSchedule=p=>{this.dialogHelperService.showUiConfirmationDialog({title:"Remove Post from Schedule",msg:"Are you sure you want to remove your post from schedule? This will permanently remove your post from the social media",confirmationText:"Yes",cancellationText:"Cancel",onSubmit:()=>this.removeFromSchedule(p)});},this.removeFromSchedule=p=>J(this,null,function*(){try{yield this.adminRequestsService.scheduleRemove(void 0,p.eventId,"event"),this.removePost(p.id,xi.PROVIDER);}catch(_){this.notifier.error("Failed to remove your post from schedule"),console.error(_);}}),this.onPostRemovalRequest=(p,_)=>{let b=`Are you sure you want to remove your post from ${p.provider}? `;b+=_===xi.PROVIDER?"This will permanently remove your post from the social media":"This will only affect our analytics. Your post will still be available on social media",this.dialogHelperService.showUiConfirmationDialog({title:"Remove Post",msg:b,confirmationText:"Yes",cancellationText:"Cancel",onSubmit:()=>this.removePost(p.id,_)});},this.removePost=(p,_)=>J(this,null,function*(){try{yield this.channelsHelperService.removePost(p,_);let b=this.postsData.findIndex(y=>y.id===p);b>-1&&this.postsData.splice(b,1),this.notifier.info("Your post was successfully removed"),this.dialogHelperService.close();}catch(b){let y=this.errorParseService.parseSocialPostError(b.responseJSON);this.notifier.error(y||"Failed to remove your post"),this.eventsService.log(this._EVENTS_PATH.socialAnalyticsError,{message:y||"Failed to remove your post"}),console.error(b);}finally{}}),this.copyPostsCsv=()=>J(this,null,function*(){try{yield window.navigator.clipboard.writeText(Vs(this.postsData)),this.notifier.info(this.copiedTitle);}catch(p){console.error(p),this.notifier.error(p?.responseJSON?.msg??this.copyFailedTitle);}}),this.downloadPostsCsv=()=>{js(Ns("posts"),Vs(this.postsData));},this.downloadAccountsCsv=()=>{js(Ns("accounts"),Fr([...this.asocialAccountsData],this.formattedChartData));},this.navigateToAccounts=()=>{this.router.navigate(["social-channels/accounts"]);},this.onFilterProviderClick=p=>{try{if(this.isChartsLoading=!0,this.currentProviderFilter===p.toLowerCase())this.currentProviderFilter=_t,this.filteredFormattedChartData=this.formattedChartData;else{this.currentProviderFilter=p.toLowerCase(),this.filteredFormattedChartData=this.formattedChartData.filter(b=>zs(b.provider).toLowerCase()===this.currentProviderFilter.toLowerCase());let _=this.filteredFormattedChartData.map(b=>b.followers?.total||0).reduce((b,y)=>b+y,0);this.sendFilterEvent(Cn.pie,Sn.channel,this.currentProviderFilter,_);}this.currentPage=0,this.isChartsLoading=!1,this.fillPostData();}catch(_){console.error(_);}finally{this.isChartsLoading=!1;}},this.onScrollLoadMorePosts=()=>J(this,null,function*(){if(this.currentPage>=0&&!this.isPostsLoading&&this.isAnyPostLeft()){let p=++this.postsRequestId;try{this.isPostsLoading=!0,this.currentPage++;let _=yield this.getPostDataPromise();if(p!==this.postsRequestId)return;this.postsData=this.sortedPosts(this.postsData.concat(_)),this.syncUploadTracking(),_.length==0?this.currentPage=-1:this.refreshPostsPerformance();}catch{if(p!==this.postsRequestId)return;this.eventsService.log(this._EVENTS_PATH.socialAnalyticsError,{message:"Failed to load your posts. Please try again"}),this.currentPage=-1,this.notifier.error("Failed to load your posts. Please try again");}finally{p===this.postsRequestId&&(this.isPostsLoading=!1);}}}),this.onPeriodTabChange=p=>{this.applyPeriod(this.timeButtons.find(_=>_.value===p));},this.applyPeriod=p=>{this.currentTimeFilter=p,this.fillChartsData(),this.currentPage=0,this.fillPostData(),this.eventsService.log(this._EVENTS_PATH.postAnalyticsTimeChange,{newTime:this.periodEventValue()});},this.periodEventValue=()=>this.currentTimeFilter.value.split("last")[1].toLowerCase(),this.openPost=p=>{window.open(p.postUrl,"_blank","noopener,noreferrer"),this.eventsService.log(this._EVENTS_PATH.postClick,{postId:p.id,social:p.provider.toLowerCase(),url:p.postUrl,reach:p.reach,engagement:p.engagement});},this.onTutorialBtnClick=p=>{this.eventsService.log(this._EVENTS_PATH.socialAnalyticsTutorial,{feature:"Social Channels Dashboard"});let _="course/"+this.tutorialCourseId+"/"+this.tutorialLessonId;this.router.navigate([_]);},this.onRefreshBtnClick=p=>{this.resetFilters(),this.reloadDashboard(),this.eventsService.log(this._EVENTS_PATH.socialAnalyticsRefresh);},this.sendFilterEvent=(p,_,b=void 0,y=void 0)=>{let P=Yt(Yt({filterSource:p,filterType:_},b&&{social:b}),y&&{followers:y});this.eventsService.log(this._EVENTS_PATH.socialAnalyticsFilter,P);},this.loadWorkspaceMembers=()=>J(this,null,function*(){try{let _=(yield this.adminRequestsService.pullUserList(void 0,this.workspaceId,0,void 0,void 0,void 0,void 0,void 0,void 0,void 0,void 0,void 0,void 0,void 0,void 0,void 0,void 0,void 0,"approved")).result||[];
19this.memberOptions=[{value:_t,name:"All"},..._.map(b=>({value:b.userId,name:this._getMemberName(b),subtitle:yr.get(b.organizationRole),sideIconClass:this._getThumbnailUrl(b)||Ms.globals.emptyProfileImgUrl}))];}catch(p){console.error(p);}}),this.dismissAuditBanner=()=>{this.showAuditBanner=!1;try{localStorage.setItem(this.AUDIT_BANNER_DISMISSED_KEY,"true");}catch(p){console.error(`Local storage write failed for "${this.AUDIT_BANNER_DISMISSED_KEY}":`,p);}},this.socialMediaAuditDialogOpen=(p=!1)=>{p&&this.location.replaceState("/social-channels/audit");let _=new Cr(),b=new Ls();_.deskId=this.workspaceId,_.onSubmit=y=>this.onSocialMediaAuditSubmit(y),_.onClose=()=>{this.dialogHelperService.close(),this.clearAuditRoute();},b.panelClass="common-dialog",this.dialogHelperService.open(_,Sr,b);},this.onSocialMediaAuditSubmit=p=>J(this,null,function*(){try{this.spinnerService.spin(this.SOCIAL_MEDIA_AUDIT_SPINNER_ID);let _=yield this.socialAuditProgressService.start(this.workspaceId,p.selectedAccountIds);this.eventsService.log(this._EVENTS_PATH.auditFinish,{numSelectedChannels:p.selectedAccountIds.length,totalFollowers:p.totalFollowers,providers:p.providers,numChannels:p.totalChannels}),this.notifier.success(_==="already-running"?"A social media audit is already running for this workspace":"Social media audit submitted successfully"),this.dialogHelperService.close(),this.clearAuditRoute(),this.trackAudit();}catch(_){this.notifier.error("Failed to submit social media audit. Please try again."),this.eventsService.log(this._EVENTS_PATH.auditError,{error:_.message}),console.error(_);}finally{this.spinnerService.stop(this.SOCIAL_MEDIA_AUDIT_SPINNER_ID);}}),this.trackAudit=(p=0)=>{this.auditSubscription?.unsubscribe(),this.auditRunning=!0,this.auditProgress=p,this.auditSubscription=this.socialAuditProgressService.progress$(this.workspaceId).subscribe(_=>{this.auditProgress=_.percent,_.status!=="running"&&(this.auditRunning=!1,this.auditSubscription=null,_.status==="completed"?this.getLatestSocialMediaAudit():(this.notifier.error("Your social media audit failed. Please try again."),this.eventsService.log(this._EVENTS_PATH.auditError,{error:"audit-failed"})));});},this.restoreRunningAudit=()=>J(this,null,function*(){let p=this.workspaceId,_=yield this.socialAuditProgressService.findRunning(p);_&&p===this.workspaceId&&this.trackAudit(_.percent);}),this._getThumbnailUrl=p=>new Fa(p).getThumbnailUrl()||Ms.globals.emptyProfileImgUrl,this._getMemberName=p=>p.status===100||!p.fullName?p.email:p.fullName,this.getLatestSocialMediaAudit=()=>J(this,null,function*(){try{yield this.fetchLatestSocialMediaAudit();}catch(p){console.error("Failed to load latest audit: ",p);}}),this.fetchLatestSocialMediaAudit=()=>J(this,null,function*(){let p=yield this.adminRequestsService.getLatestSocialAccountAudit(this.workspaceId,Fh),_=zh(p);return this.socialMediaAuditType=_?.type??null,this.socialMediaAuditImage=_?.type==="image"?_.url:void 0,_;}),this.openLatestSocialMediaAudit=()=>J(this,null,function*(){if(this.socialMediaAuditType!=="html"){this.openSocialMediaAuditImage(!0);return;}let p=window.open("","_blank"),_=null;try{_=yield this.fetchLatestSocialMediaAudit();}catch(b){console.error("Failed to load latest audit: ",b);}if(_?.type==="html"){this.eventsService.log(this._EVENTS_PATH.auditOpen,{mode:"view"}),p?(p.opener=null,p.location.href=_.url):window.open(_.url,"_blank","noopener");return;}if(p?.close(),_?.type==="image"){this.openSocialMediaAuditImage(!0);return;}this.notifier.error("Sorry, something went wrong. Please try again.");}),this.openLatestSocialMediaDeckHere=()=>J(this,null,function*(){let p=null;try{p=yield this.fetchLatestSocialMediaAudit();}catch(_){console.error("Failed to load latest audit: ",_);}p?.type==="html"?(this.eventsService.log(this._EVENTS_PATH.auditOpen,{mode:"view"}),this.location.replaceState("/social-channels"),window.location.assign(p.url)):p?.type==="image"?this.openSocialMediaAuditImage():this.socialMediaAuditDialogOpen();}),this.openSocialMediaAuditImage=(p=!1)=>{if(!this.socialMediaAuditImage)return;p&&this.location.replaceState("/social-channels/audit/latest"),this.eventsService.log(this._EVENTS_PATH.auditOpen,{mode:"view"});let _=new Pr();_.imageUrl=this.socialMediaAuditImage,_.title=this.socialMediaAuditTitle,_.onClose=()=>{this.dialogHelperService.close(),this.clearAuditRoute();};let b=new Ls();b.panelClass="image-viewer-dialog-panel",this.dialogHelperService.open(_,wr,b);},this.navigateToAudit=()=>{this.router.navigate(["social-channels/audit"],{replaceUrl:!0});},this.navigateToLatestAudit=()=>{this.router.navigate(["social-channels/audit/latest"],{replaceUrl:!0});},this.clearAuditRoute=()=>{this.router.navigate(["social-channels"],{replaceUrl:!0});};}ngOnInit(){return J(this,null,function*(){this.currentProviderFilter=_t,this.timeButtons=er(),this.currentTimeFilter=this.defaultPeriod,this.periodTabs=this.timeButtons.map(t=>({label:t.name,value:t.value})),this.postStatusMenu=ir(),this.selectedPostStatus=this.postStatusMenu[0],this.statusOptions=this.postStatusMenu.map(t=>({value:t.value??_t,name:t.name})),this.isAudienceCollapsed=!1,this.canCollaborate=yield this.planHelperService.canInviteViewer(),yield this.getLatestSocialMediaAudit(
19),this.setEventSubscriptions(),this.checkForAuditRoute();});}checkForAuditRoute(){return J(this,null,function*(){if(this.route.snapshot.data.openAudit&&this.socialMediaAuditDialogOpen(),this.route.snapshot.data.openLatestAudit){if(yield this.runningAuditLookup,this.auditRunning)return;this.socialMediaAuditType==="html"?yield this.openLatestSocialMediaDeckHere():this.socialMediaAuditImage?this.openSocialMediaAuditImage():this.socialMediaAuditDialogOpen();}});}ngOnDestroy(){this.eventSubscriptions.forEach(t=>t.unsubscribe()),this.auditSubscription?.unsubscribe();}get defaultPeriod(){return this.timeButtons.find(t=>t.value===Rt.lastMonth);}get periodRange(){let t=yy[this.currentTimeFilter?.value]??7;return{from:(0,Bh.default)().subtract(t-1,"days").toDate(),to:new Date()};}get isLocalSort(){return this.postsSort.sb==="engagement";}isAnyPostLeft(){return this.postsData.length<this.channelsHelperService.getTotalPosts();}isAuditBannerDismissed(){try{return localStorage.getItem(this.AUDIT_BANNER_DISMISSED_KEY)==="true";}catch{return!1;}}static{this.ɵfac=function(n){return new(n||e)(V(ln),V(ka),V(Pa),V(dr),V(xn),V(hr),V(_n),V(qa),V(bn),V(pi),V(un),V($a),V(fn),V(wn),V(Ya),V(Mr));};}static{this.ɵcmp=it({type:e,selectors:[["social-channels-dashboard"]],standalone:!0,features:[nt],decls:20,vars:11,consts:[["emptyAccounts",""],["chartsLoading",""],[1,"social-channels-container"],[1,"left-control-section"],["size","sm","variant","secondary",1,"not-mobile",3,"clicked"],["size","sm","variant","secondary",1,"not-mobile",3,"clicked","disabled"],["size","sm","variant","secondary","class","not-mobile",3,"iconContent","clicked",4,"ngIf"],[1,"not-mobile",3,"copy","downloadPosts","downloadAccounts"],["size","sm","variant","secondary",1,"not-mobile",3,"clicked","leftIconContent"],[1,"dashboard-scroll"],[4,"ngIf","ngIfElse"],["appInfiniteScroll","",3,"scrolled"],["name","social-media-audit-spinner"],["size","sm","variant","secondary",1,"not-mobile",3,"clicked","iconContent"],[3,"auditRunning","auditProgress","run","dismiss",4,"ngIf"],[1,"dashboard"],[1,"period-wrap"],["variant","slider","size","small",1,"period-tabs",3,"tabChange","tabs","activeTab"],[3,"hidden","pageOrigin"],[1,"audience"],[1,"audience-header"],["size","xs","variant","ghost",1,"audience-header__toggle",3,"clicked","iconContent"],[1,"collapse-section-content"],[1,"charts-list"],[1,"chart-container"],[1,"recent-post-container"],[1,"posts-header"],[1,"posts-filters"],["variant","button","buttonStyle","primary","buttonSize","small",1,"posts-filter",3,"valueChange","options","value","labelText","label","required","showSelected"],[3,"sortChange","postAction","postOpen","posts","isLoading","uploadProgress","period","sort"],[3,"run","dismiss","auditRunning","auditProgress"],[3,"onProviderSelect","dataTotal","data"],["class","chart-container",3,"click",4,"ngFor","ngForOf"],[1,"chart-container",3,"click"],[3,"selectMenuOption","active","data","isLoading"],[1,"empty-screen"],[1,"empty-ac-img"],["alt","social-promo",3,"src"],[1,"empty-ac-text-section"],[1,"empty-ac-title"],[1,"empty-ac-text"],[1,"empty-ac-button",3,"click"]],template:function(n,s){if(n&1){let o=ht();C(0,"div",2)(1,"header")(2,"section",3)(3,"h1"),D(4),w(),C(5,"lib-button",4),z("clicked",function(){return B(o),N(s.navigateToAccounts());}),D(6),w(),C(7,"lib-button",5),z("clicked",function(){return B(o),N(s.socialMediaAuditDialogOpen(!0));}),D(8),w(),$(9,hy,1,1,"lib-button-icon",6),C(10,"social-csv-button",7),z("copy",function(){return B(o),N(s.copyPostsCsv());})("downloadPosts",function(){return B(o),N(s.downloadPostsCsv());})("downloadAccounts",function(){return B(o),N(s.downloadAccountsCsv());}),w(),C(11,"lib-button",8),z("clicked",function(r){return B(o),N(s.onTutorialBtnClick(r));}),D(12),w()()(),C(13,"div",9),$(14,xy,28,39,"main",10)(15,by,10,4,"ng-template",null,0,Ds),C(17,"div",11),z("scrolled",function(){return B(o),N(s.onScrollLoadMorePosts());}),w()()(),C(18,"ngx-spinner",12),T(19,"lottie-loader"),w();}if(n&2){let o=Ts(16);S(4),I(s.pageTitle),S(2),I(s.pageSubTitle),S(),E("disabled",s.auditRunning),S(),yt(" ",s.auditRunning?s.socialMediaAuditRunningTitle+" "+s.auditProgress+"%":s.socialMediaAuditTitle," "),S(),E("ngIf",s.socialMediaAuditType),S(2),E("leftIconContent","/img/icon-library/video/play-stroke.svg"),S(),yt(" ",s.tutorialTitle," "),S(2),E("ngIf",!s.showEmptyScreen)("ngIfElse",o),S(3),ze("height",1,"px");}},dependencies:[rn,Ma,Oa,Nr,Mn,Vr,Ar,Er,Ea,Da,Aa,Xt,Ha,jr,Eh,tr,hn,ae,Ih],styles:[".social-channels-container[_ngcontent-%COMP%]{width:100%;margin:0 auto;display:flex;flex-direction:column;align-items:flex-start;justify-content:flex-start;gap:24px 0;padding:24px 24px 0;height:calc(100vh - 56px);overflow:hidden;box-sizing:border-box}.dashboard-scroll[_ngcontent-%COMP%]{flex:1 1 auto;min-height:0;width:100%;overflow-y:auto;padding-bottom:24px}.dashboard-scroll[_ngcontent-%COMP%]::-webkit-scrollbar{display:none}header[_ngcontent-%COMP%]{display:flex;flex-direction:row;gap:12px 24px;align-items:center;justify-content:space-between;flex-wrap:wrap;width:100%}header[_ngcontent-%COMP%] h1[_ngcontent-%COMP%]{font-size:32px;font-weight:800;color:#253658;font-family:Inter-ExtraBold;margin:0;padding:0;flex-shrink:0}.left-control-section[_ngcontent-%COMP%]{display:flex;flex-wrap:wrap;align-items:center;justify-content:flex-start;gap:8px}.left-control-section[_ngcontent-%COMP%] h1[_ngcontent-%COMP%]{margin-right:16px}.update-section[_ngcontent-%COMP%]{display:flex;align-items:center;justify-content:flex-start}.update-section[_ngcontent-%COMP%] button[_ngcontent-%COMP%]{display:flex;width:40px;height:36px;padding:10px;justify-content:center;align-items:center;gap:4px;background-color:#00abfe;border-radius:10px}.update-section[_ngcontent-%COMP%] button[_ngcontent-%COMP%] img[_ngcontent-%COMP%]{width:20px;height:20px;object-fit:cover;object-position:center}
19.refresh-time[_ngcontent-%COMP%]{color:#7b8db1;font-size:12px;font-weight:400}main[_ngcontent-%COMP%]{width:100%;margin:0 auto;display:flex;flex-direction:column;align-items:flex-start;justify-content:flex-start;gap:24px}.dashboard[_ngcontent-%COMP%]{display:flex;flex-direction:row;width:100%;align-items:center;justify-content:space-between;gap:24px;padding-right:60px}.dashboard[_ngcontent-%COMP%] h2[_ngcontent-%COMP%]{font-size:18px;color:#253658;font-weight:700;font-family:Inter-Bold;margin:0}.audience[_ngcontent-%COMP%]{width:100%}.audience-header[_ngcontent-%COMP%]{display:flex;align-items:center;gap:8px;margin-bottom:16px}.audience-header__toggle[_ngcontent-%COMP%]{transform:rotate(-90deg);transition:transform .2s ease}.audience-header__toggle--collapsed[_ngcontent-%COMP%]{transform:rotate(90deg)}.collapse-section-content[_ngcontent-%COMP%]{display:grid;grid-template-rows:1fr;transition:grid-template-rows .3s ease,opacity .3s ease;opacity:1}.collapse-section-content--collapsed[_ngcontent-%COMP%]{grid-template-rows:0fr;opacity:0}.collapse-section-content[_ngcontent-%COMP%] > .charts-list[_ngcontent-%COMP%]{min-height:0;overflow:hidden}.charts-list[_ngcontent-%COMP%]{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:24px;width:100%}.chart-shimmer[_ngcontent-%COMP%]{width:100%;display:flex;flex-wrap:wrap;flex-direction:row;justify-content:flex-start;align-items:flex-start}.chart-container[_ngcontent-%COMP%]{min-width:0;height:309px}.not-mobile-controls[_ngcontent-%COMP%]{display:flex;flex-direction:row;align-items:center;gap:0 24px}.period-wrap[_ngcontent-%COMP%]{position:relative;display:flex;align-items:center}.btn-not-active[_ngcontent-%COMP%]{height:36px;width:auto;background-color:#7b8db114;border:solid 2px transparent;border-radius:10px;color:#7b8db1;font-size:12px;font-family:Inter-Bold;padding:0 8px}.btn-active[_ngcontent-%COMP%]{height:36px;width:auto;background-color:#7b8db114;border-radius:10px;border:solid 2px #00abfe;color:#7b8db1;font-size:12px;font-family:Inter-Bold;padding:0 8px}.btn-time[_ngcontent-%COMP%]{width:114px;height:36px;background-color:#7b8db114;border:solid 2px transparent;border-radius:10px;color:#7b8db1;font-size:12px;font-family:Inter-Bold;padding:0 8px}.btn-not-active[_ngcontent-%COMP%] img[_ngcontent-%COMP%], .btn-active[_ngcontent-%COMP%] img[_ngcontent-%COMP%]{width:24px;height:24px}.recent-post-container[_ngcontent-%COMP%]{--posts-sticky-top: 56px;width:100%}.posts-header[_ngcontent-%COMP%]{position:sticky;top:0;z-index:3;display:flex;align-items:center;justify-content:space-between;gap:16px;height:var(--posts-sticky-top);background:#fff}.audience[_ngcontent-%COMP%] h2[_ngcontent-%COMP%], .posts-header[_ngcontent-%COMP%] h2[_ngcontent-%COMP%]{font-size:18px;color:#253658;font-weight:700;font-family:Inter-Bold;margin:0;flex-shrink:0}.posts-filters[_ngcontent-%COMP%]{display:flex;align-items:center;gap:8px}.posts-filter[_ngcontent-%COMP%]{--dropdown-button-width: fit-content}.empty-screen[_ngcontent-%COMP%]{width:100%;display:flex;gap:64px;margin-top:40px}.empty-ac-img[_ngcontent-%COMP%]{width:501px}.empty-ac-img[_ngcontent-%COMP%] img[_ngcontent-%COMP%]{width:100%;height:100%;object-fit:contain;object-position:center}.empty-ac-text-section[_ngcontent-%COMP%]{width:470px;display:flex;flex-direction:column;gap:16px}.empty-ac-title[_ngcontent-%COMP%]{width:100%;font-size:21px;font-weight:700}.empty-ac-text[_ngcontent-%COMP%]{width:100%;font-size:16px;font-weight:400}.empty-ac-button[_ngcontent-%COMP%]{margin-top:12px;width:90%;color:#fff;text-align:center;font-size:20px;font-weight:700;display:flex;height:64px;padding:10px 24px;justify-content:center;align-items:center;gap:10px;flex-shrink:0;border-radius:12px;background:linear-gradient(270deg,#28b3f7 .65%,#506aff 99.35%)}@media screen and (max-width: 1024px){.charts-list[_ngcontent-%COMP%]{grid-template-columns:repeat(2,minmax(0,1fr))}.empty-screen[_ngcontent-%COMP%]{gap:32px;flex-wrap:wrap}.empty-ac-img[_ngcontent-%COMP%]{width:365px}.empty-ac-text-section[_ngcontent-%COMP%]{width:330px}}@media screen and (max-width: 724px){.charts-list[_ngcontent-%COMP%]{grid-template-columns:minmax(0,1fr)}.posts-header[_ngcontent-%COMP%]{position:static;height:auto;flex-wrap:wrap}}
19.mobile[_ngcontent-%COMP%], .mobile-controls[_ngcontent-%COMP%]{display:none}@media screen and (min-width: 1600px){.charts-list[_ngcontent-%COMP%]{grid-template-columns:repeat(auto-fill,minmax(360px,1fr))}}"]});}}return e;})();var qM=[{path:"",component:Ps,canActivate:[mi,gi],data:{title:"Social Channels"}},{path:"accounts",component:Or,canActivate:[mi,gi],data:{title:"Social Accounts"}},{path:"audit",component:Ps,canActivate:[mi,gi],data:{title:"Social Channels",openAudit:!0}},{path:"audit/latest",component:Ps,canActivate:[mi,gi],data:{title:"Social Channels",openLatestAudit:!0}}];export{qM as routes};/**i18n:a22416d48d5d315853b2ff30dd429c3cf66bb88014970864ad6c2ff7ea890e29*/ 20//# debugId=46347378-d528-5bab-acf3-91571b07378b
Line numbers count LF bytes from the start of the resource, as the search results do. Vendor segments are library code the classifier recognised; they are stored but not indexed. Bytes are shown as Latin1 characters, one per byte.