@xcpcio/board-app 0.46.2 → 0.46.3

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (22) hide show
  1. package/dist/404.html +1 -1
  2. package/dist/assets/{Board-5a18de8e.js → Board-6ef1c1b9.js} +1 -1
  3. package/dist/assets/{DataSourceInput.vue_vue_type_script_setup_true_lang-3f2e71b7.js → DataSourceInput.vue_vue_type_script_setup_true_lang-3f783706.js} +1 -1
  4. package/dist/assets/{TheInput.vue_vue_type_script_setup_true_lang-859ce89a.js → TheInput.vue_vue_type_script_setup_true_lang-51ad90e9.js} +1 -1
  5. package/dist/assets/{_...all_-8b9261ff.js → _...all_-5d9480a0.js} +1 -1
  6. package/dist/assets/{_name_-07451050.js → _name_-c9a7b268.js} +1 -1
  7. package/dist/assets/{about-ccab3fef.js → about-6219edda.js} +1 -1
  8. package/dist/assets/{board-fd754235.js → board-33bc86ab.js} +1 -1
  9. package/dist/assets/{board-layout-9f205eef.js → board-layout-b08cf01a.js} +1 -1
  10. package/dist/assets/{headless-84b0ba2a.js → headless-4d4f2337.js} +1 -1
  11. package/dist/assets/{home-51ee0a78.js → home-5f98843d.js} +1 -1
  12. package/dist/assets/{index-ae87348c.js → index-168068d2.js} +1 -1
  13. package/dist/assets/{index-f9b2eb26.js → index-3c0f7a79.js} +1 -1
  14. package/dist/assets/{index-b8520a7a.js → index-a771ea05.js} +3 -3
  15. package/dist/assets/{index-layout-69d341e2.js → index-layout-692a69df.js} +1 -1
  16. package/dist/assets/{query-f9ac0577.js → query-5fd73b94.js} +1 -1
  17. package/dist/assets/{test-1cc6e80d.js → test-4379792f.js} +1 -1
  18. package/dist/assets/{user-c860815d.js → user-62a1879b.js} +1 -1
  19. package/dist/assets/{virtual_pwa-register-6184380c.js → virtual_pwa-register-10abc341.js} +1 -1
  20. package/dist/index.html +1 -1
  21. package/dist/sw.js +1 -1
  22. package/package.json +3 -3
@@ -1,3 +1,3 @@
1
- var qe=Object.defineProperty;var Ke=(at,it,et)=>it in at?qe(at,it,{enumerable:!0,configurable:!0,writable:!0,value:et}):at[it]=et;var re=(at,it,et)=>(Ke(at,typeof it!="symbol"?it+"":it,et),et);import{g as Lt,s as kt,O as Ze,w as Jt,o as ut,c as ft,d as Z,x as Xt,P as pe,t as mt,n as At,Q as Vt,I as Gt,F as Ot,D as It,m as bt,N as Ht,S as Le,T as Je,j as _t,U as qt,l as U,b as Ct,M as jt,V as ie,W as Qe,X as ti,H as zt,J as te,Y as Ee,Z as fe,u as Kt,E as Nt,$ as De,a0 as Wt,a1 as ei,a2 as Ie,a3 as ye,a as Ut,G as ii,a4 as Qt,a5 as si,a6 as je,a7 as Be,a8 as ve,a9 as oi,aa as ni,ab as ze,ac as ri,ad as ke,ae as se,af as oe,ag as Re,v as ai,ah as li,ai as me,aj as Ne,L as hi,ak as ci,h as di,al as be,i as ui,am as pi,k as fi,y as mi,z as gi,an as xi,ao as yi,p as vi,ap as ki,aq as bi,ar as Si,R as wi,as as Ci,at as Mi,au as Ti}from"./index-b8520a7a.js";import{_ as $e}from"./TheInput.vue_vue_type_script_setup_true_lang-859ce89a.js";import{a as He,u as _i}from"./query-f9ac0577.js";const Ai={class:"relative bg-white dark:bg-gray-800 sm:p-4","rounded-sm":"","shadow-sm":""},Pi={class:"mb-4 border-b rounded-t pb-4 sm:mb-4 dark:border-gray-600",flex:"","items-center":"","justify-between":""},Oi={"text-gray-900":"","dark:text-white":"","text-xl":"","font-sans":"","font-semibold":"",italic:""},Li=Z("svg",{class:"h-5 w-5",fill:"currentColor",viewBox:"0 0 20 20",xmlns:"http://www.w3.org/2000/svg"},[Z("path",{"fill-rule":"evenodd",d:"M4.293 4.293a1 1 0 011.414 0L10 8.586l4.293-4.293a1 1 0 111.414 1.414L11.414 10l4.293 4.293a1 1 0 01-1.414 1.414L10 11.414l-4.293 4.293a1 1 0 01-1.414-1.414L8.586 10 4.293 5.707a1 1 0 010-1.414z","clip-rule":"evenodd"})],-1),Ei=Z("span",{"sr-only":""}," Close modal ",-1),Di=[Li,Ei],ce=Lt({__name:"Modal",props:{isHidden:{type:Boolean},title:null,width:null,mt:null},emits:["update:isHidden"],setup(at,{emit:it}){const et=at,w=kt({get(){return et.isHidden},set($){it("update:isHidden",$)}});function B(){w.value=!0}const{Escape:P}=Ze();return Jt(P,$=>{$&&B()}),($,q)=>(ut(),ft("div",{class:At(["md:inset-0 w-[100%] h-[100%]",[et.mt??"md:mt-32 sm:mt-16"]]),fixed:"","z-9997":"","of-x-hidden":"",flex:"","justify-center":"","items-start":""},[Z("div",{class:"w-[100%] h-[100%]",fixed:"","left-0":"","top-0":"","z-9998":"",style:Xt({backgroundColor:"rgba(0, 0, 0, 0.5)"}),onClick:B},null,4),Z("div",{class:At(["relative p-4",[et.width??"w-[78%]"]]),"z-9999":""},[Z("div",Ai,[Z("div",Pi,[pe($.$slots,"header",{},()=>[Z("h3",Oi,mt(et.title),1)]),Z("button",{type:"button",class:"hover:bg-gray-200 hover:text-gray-900 dark:hover:bg-gray-600 dark:hover:text-white","bg-transparent":"","ml-auto":"","p-1.5":"","text-sm":"","text-gray-400":"","items-center":"","inline-flex":"","rounded-lg":"",onClick:B},Di)]),pe($.$slots,"default")])],2)],2))}}),Bt={openOptions(at){at.$refs.input.focus(),at.showMenu=!0,at.mousedownState=!1},blurInput(at){at.mousedownState||(at.searchText="",at.closeOptions()),at.$emit("blur")},closeOptions(at){at.$refs.input.blur(),at.showMenu=!1},prevItem(at){const it=at.pointer-1,et=at.$el.offsetHeight*it;it>=0&&(at.pointer=it),at.$refs.menu.scrollTop=et},nextItem(at){const it=at.pointer+1,et=at.$el.offsetHeight*it;it<=at.filteredOptions.length-1&&(at.pointer=it);const w=at.$refs.menu.offsetHeight,B=Math.ceil((at.$refs.menu.scrollTop+at.$el.offsetHeight)/w),P=Math.ceil(et/w);B!==P&&(at.$refs.menu.scrollTop=(P-1)*at.$refs.menu.offsetHeight)},enterItem(at){const it=at.filteredOptions[at.pointer],et=it.disabled;it&&!et&&at.selectItem(it)},pointerSet(at,it){at.pointer=it},pointerAdjust(at){at.pointer>=at.filteredOptions.length-1&&(at.pointer=at.filteredOptions.length?at.filteredOptions.length-1:0)},mousedownItem(at){at.mousedownState=!0}};function Ii(at){return new RegExp(at.replace(/[.*+?^${}()|[\]\\]/g,"\\$&"),"i")}const Ge={props:{id:{default:null},name:{type:String,default:""},isError:{type:Boolean,default:!1},customAttr:{type:Function,default:()=>""},isDisabled:{type:Boolean,default:!1},placeholder:{type:String,default:""},filterPredicate:{type:Function,default:(at,it)=>at.match(Ii(it))}}},Fe=(at,it)=>{const et=at.__vccOpts||at;for(const[w,B]of it)et[w]=B;return et},ji={name:"ModelSelect",mixins:[Ge],emits:["blur","searchchange","update:modelValue"],props:{modelValue:{type:[String,Number,Object,Boolean]},customAttr:{type:Function,default:()=>""},options:{type:Array}},data(){return{showMenu:!1,searchText:"",mousedownState:!1,pointer:-1}},watch:{value(at){this.pointer=this.filteredOptions.findIndex(it=>it.value===this.optionValue(at))},filteredOptions(){this.pointerAdjust()},searchText(){this.$emit("searchchange",this.searchText)}},computed:{searchTextCustomAttr(){return this.selectedOption&&this.selectedOption.value?this.customAttr(this.selectedOption):""},inputText(){if(this.searchText)return"";{let at=this.placeholder;return this.selectedOption&&(at=this.selectedOption.text),at}},customAttrs(){try{if(Array.isArray(this.options))return this.options.map(at=>this.customAttr(at))}catch{}return[]},textClass(){return!this.selectedOption&&this.placeholder?"default":""},menuClass(){return{visible:this.showMenu,hidden:!this.showMenu}},menuStyle(){return{display:this.showMenu?"block":"none"}},filteredOptions(){return this.searchText?this.options.filter(at=>{try{return this.filterPredicate(at.text,this.searchText)}catch{return!0}}):this.options},selectedOption(){return this.options.find(at=>at.value===this.optionValue(this.modelValue))}},methods:{deleteTextOrItem(){!this.searchText&&this.modelValue&&(this.selectItem({}),this.openOptions())},openOptions(){Bt.openOptions(this)},blurInput(){Bt.blurInput(this)},closeOptions(){Bt.closeOptions(this)},prevItem(){Bt.prevItem(this)},nextItem(){Bt.nextItem(this)},enterItem(){Bt.enterItem(this)},pointerSet(at){Bt.pointerSet(this,at)},pointerAdjust(){Bt.pointerAdjust(this)},mousedownItem(){Bt.mousedownItem(this)},selectItem(at){this.searchText="",this.closeOptions(),typeof this.modelValue=="object"&&this.modelValue?this.$emit("update:modelValue",at):(this.$emit("update:modelValue",at.value),at.value!==void 0&&at.value===at.text&&(this.searchText=at.value))},optionValue(at){return typeof at=="object"&&at!==null?at.value:at}}},Bi=Z("i",{class:"dropdown icon"},null,-1),zi=["disabled","tabindex","id","name","value"],Ri=["data-vss-custom-attr"],Ni=["data-vss-custom-attr","onClick","onMouseenter"];function $i(at,it,et,w,B,P){return ut(),ft("div",{class:At(["ui fluid search selection dropdown",{"active visible":B.showMenu,error:at.isError,disabled:at.isDisabled}]),onClick:it[11]||(it[11]=(...$)=>P.openOptions&&P.openOptions(...$)),onFocus:it[12]||(it[12]=(...$)=>P.openOptions&&P.openOptions(...$))},[Bi,Z("input",{class:"search",autocomplete:"off",disabled:at.isDisabled,tabindex:at.isDisabled?-1:0,id:at.id,name:at.name,value:B.searchText,onInput:it[0]||(it[0]=$=>B.searchText=$.target.value),ref:"input",onFocus:it[1]||(it[1]=Vt((...$)=>P.openOptions&&P.openOptions(...$),["prevent"])),onKeyup:[it[2]||(it[2]=Gt((...$)=>P.closeOptions&&P.closeOptions(...$),["esc"])),it[7]||(it[7]=Gt(Vt((...$)=>P.enterItem&&P.enterItem(...$),["prevent"]),["enter"]))],onBlur:it[3]||(it[3]=(...$)=>P.blurInput&&P.blurInput(...$)),onKeydown:[it[4]||(it[4]=Gt((...$)=>P.prevItem&&P.prevItem(...$),["up"])),it[5]||(it[5]=Gt((...$)=>P.nextItem&&P.nextItem(...$),["down"])),it[6]||(it[6]=Gt(Vt(()=>{},["prevent"]),["enter"])),it[8]||(it[8]=Gt((...$)=>P.deleteTextOrItem&&P.deleteTextOrItem(...$),["delete"]))]},null,40,zi),Z("div",{class:At(["text",P.textClass]),"data-vss-custom-attr":P.searchTextCustomAttr},mt(P.inputText),11,Ri),Z("div",{class:At(["menu",P.menuClass]),ref:"menu",onMousedown:it[10]||(it[10]=Vt(()=>{},["prevent"])),style:Xt(P.menuStyle),tabindex:"-1"},[(ut(!0),ft(Ot,null,It(P.filteredOptions,($,q)=>(ut(),ft("div",{key:q,class:At(["item",{selected:$.selected||B.pointer===q,disabled:$.disabled}]),"data-vss-custom-attr":P.customAttrs[q]?P.customAttrs[q]:"",onClick:Vt(J=>P.selectItem($),["stop"]),onMousedown:it[9]||(it[9]=(...J)=>P.mousedownItem&&P.mousedownItem(...J)),onMouseenter:J=>P.pointerSet(q)},mt($.text),43,Ni))),128))],38)],34)}const Hi=Fe(ji,[["render",$i]]),Gi={name:"MultiSelect",mixins:[Ge],emits:["blur","searchchange","select"],props:{customAttr:{type:Function,default:()=>""},options:{type:Array},selectedOptions:{type:Array},cleanSearch:{type:Boolean,default:!0},hideSelectedOptions:{type:Boolean,default:!1}},data(){return{showMenu:!1,searchText:"",mousedownState:!1,pointer:-1}},watch:{selectedOptions(){this.pointer=-1},filteredOptions(){this.pointerAdjust()},searchText(){this.$emit("searchchange",this.searchText)}},computed:{inputText(){return this.searchText?"":this.placeholder},textClass(){return this.placeholder?"default":""},inputWidth(){return{width:(this.searchText.length+1)*8+20+"px"}},menuClass(){return{visible:this.showMenu,hidden:!this.showMenu}},menuStyle(){return{display:this.showMenu?"block":"none"}},nonSelectOptions(){return this.options.filter(at=>this.selectedOptions.findIndex(it=>it.value===at.value)===-1)},filteredOptions(){return this.searchText?this.nonSelectOptions.filter(at=>{try{return this.cleanSearch?this.filterPredicate(this.accentsTidy(at.text),this.searchText):this.filterPredicate(at.text,this.searchText)}catch{return!0}}):this.nonSelectOptions}},methods:{deleteTextOrLastItem(){!this.searchText&&this.selectedOptions.length>0&&this.deleteItem(this.selectedOptions[this.selectedOptions.length-1])},openOptions(){Bt.openOptions(this)},blurInput(){Bt.blurInput(this)},closeOptions(){Bt.closeOptions(this)},prevItem(){Bt.prevItem(this),this.openOptions()},nextItem(){Bt.nextItem(this),this.openOptions()},enterItem(){Bt.enterItem(this)},pointerSet(at){Bt.pointerSet(this,at)},pointerAdjust(){Bt.pointerAdjust(this)},mousedownItem(){Bt.mousedownItem(this)},selectItem(at){const it=this.selectedOptions.concat(at),et=it.filter((w,B)=>it.indexOf(w)===B);this.closeOptions(),this.searchText="",this.$emit("select",et,at,"insert")},deleteItem(at){const it=this.selectedOptions.filter(et=>et.value!==at.value);this.$emit("select",it,at,"delete")},accentsTidy(at){let it=at.toString().toLowerCase();return it=it.replace(new RegExp("[àáâãäå]","g"),"a"),it=it.replace(new RegExp("æ","g"),"ae"),it=it.replace(new RegExp("ç","g"),"c"),it=it.replace(new RegExp("[èéêë]","g"),"e"),it=it.replace(new RegExp("[ìíîï]","g"),"i"),it=it.replace(new RegExp("ñ","g"),"n"),it=it.replace(new RegExp("[òóôõö]","g"),"o"),it=it.replace(new RegExp("œ","g"),"oe"),it=it.replace(new RegExp("[ùúûü]","g"),"u"),it=it.replace(new RegExp("[ýÿ]","g"),"y"),it}}},Fi=Z("i",{class:"dropdown icon"},null,-1),Wi=["data-vss-custom-attr"],Xi=["onClick"],Ui=["disabled","tabindex","id","name"],Yi=["data-vss-custom-attr","onClick","onMouseenter"];function Vi(at,it,et,w,B,P){return ut(),ft("div",{class:At(["ui fluid search dropdown selection multiple",{"active visible":B.showMenu,error:at.isError,disabled:at.isDisabled}]),onClick:it[11]||(it[11]=(...$)=>P.openOptions&&P.openOptions(...$)),onFocus:it[12]||(it[12]=(...$)=>P.openOptions&&P.openOptions(...$))},[Fi,et.hideSelectedOptions?bt("",!0):(ut(!0),ft(Ot,{key:0},It(et.selectedOptions,($,q)=>(ut(),ft("a",{key:q,class:"ui label transition visible",style:{display:"inline-block !important"},"data-vss-custom-attr":et.customAttr($)},[Ht(mt($.text),1),Z("i",{class:"delete icon",onClick:J=>P.deleteItem($)},null,8,Xi)],8,Wi))),128)),Le(Z("input",{class:"search",autocomplete:"off",disabled:at.isDisabled,tabindex:at.isDisabled?-1:0,id:at.id,name:at.name,"onUpdate:modelValue":it[0]||(it[0]=$=>B.searchText=$),ref:"input",style:Xt(P.inputWidth),onFocus:it[1]||(it[1]=Vt((...$)=>P.openOptions&&P.openOptions(...$),["prevent"])),onKeyup:[it[2]||(it[2]=Gt((...$)=>P.closeOptions&&P.closeOptions(...$),["esc"])),it[7]||(it[7]=Gt(Vt((...$)=>P.enterItem&&P.enterItem(...$),["prevent"]),["enter"]))],onBlur:it[3]||(it[3]=(...$)=>P.blurInput&&P.blurInput(...$)),onKeydown:[it[4]||(it[4]=Gt((...$)=>P.prevItem&&P.prevItem(...$),["up"])),it[5]||(it[5]=Gt((...$)=>P.nextItem&&P.nextItem(...$),["down"])),it[6]||(it[6]=Gt(Vt(()=>{},["prevent"]),["enter"])),it[8]||(it[8]=Gt((...$)=>P.deleteTextOrLastItem&&P.deleteTextOrLastItem(...$),["delete"]))]},null,44,Ui),[[Je,B.searchText]]),Z("div",{class:At(["text",P.textClass])},mt(P.inputText),3),Z("div",{class:At(["menu",P.menuClass]),ref:"menu",onMousedown:it[10]||(it[10]=Vt(()=>{},["prevent"])),style:Xt(P.menuStyle),tabindex:"-1"},[(ut(!0),ft(Ot,null,It(P.filteredOptions,($,q)=>(ut(),ft("div",{key:q,class:At(["item",{selected:$.selected||B.pointer===q,disabled:$.disabled}]),"data-vss-custom-attr":et.customAttr($),onClick:Vt(J=>P.selectItem($),["stop"]),onMousedown:it[9]||(it[9]=(...J)=>P.mousedownItem&&P.mousedownItem(...J)),onMouseenter:J=>P.pointerSet(q)},mt($.text),43,Yi))),128))],38)],34)}const Zt=Fe(Gi,[["render",Vi]]),qi={"ml-4":"","mt-2":""},Ki={"ml-4":"","mt-2":"",grid:"","grid-cols-6":"","gap-y-4":""},Zi=Z("div",{flex:"","items-center":"","text-sm":""}," Name: ",-1),Ji={flex:"","items-center":"","w-full":"","col-span-5":""},Qi=Z("div",null," Refresh Name ",-1),ts={key:0,flex:"","items-center":"","text-sm":""},es={key:1,flex:"","items-center":"","w-full":"","col-span-5":""},is=Z("div",{"text-sm":"",flex:"","items-center":""}," Team: ",-1),ss={flex:"","items-center":"","w-full":"","col-span-5":""},os=Lt({__name:"GiantsOptions",props:{rank:null,orgOptions:null,teamsOptions:null,giants:null},emits:["update:giants"],setup(at,{emit:it}){const et=at,w=kt({get(){return et.giants},set(X){it("update:giants",X)}}),B=_t(w.value.filterOrganizations);function P(X,C){B.value=X,w.value.setFilterOrganizations(X)}const $=_t(w.value.filterTeams);function q(X,C){$.value=X,w.value.setFilterTeams(X)}const J=kt(()=>`${w.value.type===qt.BLUE?"Blue":"Red"} Team`),Y=kt(()=>w.value.type===qt.BLUE?"#0000FF":"#FF0000");return(X,C)=>{const R=$e,N=ie;return ut(),ft("div",qi,[Z("div",{flex:"","text-sm":"",style:Xt({color:U(Y)})},mt(U(J)),5),Z("div",Ki,[Zi,Z("div",Ji,[Ct(R,{modelValue:U(w).name,"onUpdate:modelValue":C[0]||(C[0]=x=>U(w).name=x),"text-align":"left"},null,8,["modelValue"]),Ct(N,null,{popper:jt(()=>[Qi]),default:jt(()=>[Z("div",{"i-material-symbols-refresh":"","cursor-pointer":"",btn:"","text-2xl":"","ml-2":"",onClick:C[1]||(C[1]=x=>U(w).refreshName())})]),_:1})]),at.rank.contest.organization?(ut(),ft("div",ts,mt(at.rank.contest.organization)+": ",1)):bt("",!0),at.rank.contest.organization?(ut(),ft("div",es,[Ct(U(Zt),{options:at.orgOptions,"selected-options":U(B),onSelect:P},null,8,["options","selected-options"])])):bt("",!0),is,Z("div",ss,[Ct(U(Zt),{options:at.teamsOptions,"selected-options":U($),onSelect:q},null,8,["options","selected-options"])])])])}}}),ns={relative:"","inline-flex":"","items-center":"","cursor-pointer":""},rs=Z("div",{class:"w-11 h-6 bg-gray-200 peer-focus:outline-none peer-focus:ring-4 peer-focus:ring-blue-300 dark:peer-focus:ring-blue-800 rounded-full peer dark:bg-gray-700 peer-checked:after:translate-x-full peer-checked:after:border-white after:content-[''] after:absolute after:top-[2px] after:left-[2px] after:bg-white after:border-gray-300 after:border after:rounded-full after:h-5 after:w-5 after:transition-all dark:border-gray-600 peer-checked:bg-blue-600"},null,-1),as=Lt({__name:"TheCheckbox",props:{modelValue:{type:Boolean}},emits:["update:modelValue"],setup(at){const{modelValue:it}=Qe("modelValue");return(et,w)=>(ut(),ft("label",ns,[Le(Z("input",{"onUpdate:modelValue":w[0]||(w[0]=B=>zt(it)?it.value=B:null),type:"checkbox",class:"sr-only peer"},null,512),[[ti,U(it)]]),rs,pe(et.$slots,"default")]))}});function ls(){return`filter-organizations-${te().path}`}function hs(){return`filter-teams-${te().path}`}function cs(){const it=`filter-organizations-${te().path}`;return Ee(it,[])}function ds(){const it=`filter-teams-${te().path}`;return Ee(it,[])}const us={"w-full":"","font-bold":"","font-mono":"","text-base":"",flex:"","flex-col":"","gap-4":"","items-center":"","justify-center":""},ps={flex:"","flex-col":"","w-full":""},fs=Z("div",{flex:""}," Filter ",-1),ms={"ml-8":"","mt-2":"",grid:"","grid-cols-6":"","gap-y-4":""},gs={key:0,flex:"","items-center":"","text-sm":""},xs={key:1,flex:"","items-center":"","w-full":"","col-span-5":""},ys=Z("div",{"text-sm":"",flex:"","items-center":""}," Team: ",-1),vs={flex:"","items-center":"","w-full":"","col-span-5":""},ks={flex:"","flex-col":"","w-full":""},bs=Z("div",{flex:""}," Battle of Giants ",-1),Ss={"ml-4":"","mt-2":""},ws={grid:"","grid-cols-8":"","items-center":""},Cs=Z("span",{"text-sm":"","font-medium":"","text-gray-900":"","dark:text-gray-300":""}," Enable ",-1),Ms=Z("span",{"text-sm":"","font-medium":"","text-gray-900":"","dark:text-gray-300":""}," Equal Teams ",-1),Ts=Z("span",{"text-sm":"","font-medium":"","text-gray-900":"","dark:text-gray-300":""}," Persist ",-1),_s=Z("span",{"text-sm":"","font-medium":"","text-gray-900":"","dark:text-gray-300":""}," TopX ",-1),As={flex:"","flex-col":"","w-full":""},Ps=Z("div",{flex:""}," Feature ",-1),Os={"ml-4":"","mt-2":""},Ls={flex:"","flex-row":""},Es=Z("span",{"ml-3":"","text-sm":"","font-medium":"","text-gray-900":"","dark:text-gray-300":""}," Submission Queue ",-1),Ds={"w-full":"",flex:"","flex-row-reverse":"","items-center":"","gap-x-4":""},Is=Lt({__name:"OptionsModal",props:{isHidden:{type:Boolean},rank:null,rankOptions:null},emits:["update:isHidden","update:rankOptions"],setup(at,{emit:it}){const et=at,w=fe.cloneDeep(et.rankOptions),{t:B}=Kt(),P=kt({get(){return et.isHidden},set(o){it("update:isHidden",o)}}),$=kt({get(){return et.rankOptions},set(o){it("update:rankOptions",o)}}),q=kt(()=>et.rank),J=kt(()=>B("type_menu.options")),Y=_t(!1);function X(){Y.value=!0}function C(){Y.value=!1}function R(o){Y.value&&o.stopPropagation()}const N=kt(()=>q.value.organizations.map(r=>({value:r,text:r}))),x=_t($.value.filterOrganizations);function v(o,r){x.value=o,$.value.setFilterOrganizations(o)}const _=kt(()=>q.value.originTeams.map(r=>({value:r.id,text:r.organization?`${r.name} - ${r.organization}`:r.name}))),A=_t($.value.filterTeams);function c(o,r){A.value=o,$.value.setFilterTeams(o)}const y=He();function k(){$.value.battleOfGiants.persist?y.value=$.value.battleOfGiants.ToBase64():y.value=void 0}Jt(()=>$.value.battleOfGiants.persist,()=>{k()});async function g(){$.value.setSelf(w),await De(),k(),P.value=!0}const O=ls(),b=hs();function S(){localStorage.setItem(O,JSON.stringify(x.value)),localStorage.setItem(b,JSON.stringify(A.value)),k(),P.value=!0}return(o,r)=>{const u=as,h=$e,d=os,e=ce;return ut(),Nt(e,{isHidden:U(P),"onUpdate:isHidden":r[5]||(r[5]=t=>zt(P)?P.value=t:null),title:U(J),width:"w-200",mt:"mt-4"},{default:jt(()=>[Z("div",us,[Z("div",ps,[fs,Z("div",ms,[U(q).contest.organization?(ut(),ft("div",gs,mt(U(q).contest.organization)+": ",1)):bt("",!0),U(q).contest.organization?(ut(),ft("div",xs,[Ct(U(Zt),{options:U(N),"selected-options":U(x),onSelect:v,onCompositionstart:X,onCompositionend:C,onKeydownCapture:Gt(R,["delete"])},null,8,["options","selected-options","onKeydownCapture"])])):bt("",!0),ys,Z("div",vs,[Ct(U(Zt),{options:U(_),"selected-options":U(A),onSelect:c},null,8,["options","selected-options"])])])]),Z("div",ks,[bs,Z("div",Ss,[Z("div",ws,[Cs,Ct(u,{modelValue:U($).battleOfGiants.enable,"onUpdate:modelValue":r[0]||(r[0]=t=>U($).battleOfGiants.enable=t)},null,8,["modelValue"]),Ms,Ct(u,{modelValue:U($).battleOfGiants.equalTeams,"onUpdate:modelValue":r[1]||(r[1]=t=>U($).battleOfGiants.equalTeams=t)},null,8,["modelValue"]),Ts,Ct(u,{modelValue:U($).battleOfGiants.persist,"onUpdate:modelValue":r[2]||(r[2]=t=>U($).battleOfGiants.persist=t)},null,8,["modelValue"]),_s,Ct(h,{modelValue:U($).battleOfGiants.topX,"onUpdate:modelValue":r[3]||(r[3]=t=>U($).battleOfGiants.topX=t),"text-align":"left","text-type":"number"},null,8,["modelValue"])])]),Ct(d,{rank:U(q),"org-options":U(N),"teams-options":U(_),giants:U($).battleOfGiants.blueTeam},null,8,["rank","org-options","teams-options","giants"]),Ct(d,{rank:U(q),"org-options":U(N),"teams-options":U(_),giants:U($).battleOfGiants.redTeam},null,8,["rank","org-options","teams-options","giants"])]),Z("div",As,[Ps,Z("div",Os,[Z("div",Ls,[Ct(u,{modelValue:U($).enableAnimatedSubmissions,"onUpdate:modelValue":r[4]||(r[4]=t=>U($).enableAnimatedSubmissions=t)},{default:jt(()=>[Es]),_:1},8,["modelValue"])])])]),Z("div",Ds,[Z("button",{type:"submit",class:"text-white bg-primary-700 hover:bg-primary-800 focus:ring-4 focus:outline-none focus:ring-primary-300 px-5 py-2.5 text-center dark:bg-primary-600 dark:hover:bg-primary-700 dark:focus:ring-primary-800","font-medium":"","text-sm":"","rounded-md":"",onClick:S},mt(U(B)("button.confirm")),1),Z("button",{type:"reset",class:"py-2.5 px-5 text-gray-900 focus:outline-none bg-white border border-gray-200 hover:bg-gray-100 hover:text-primary-700 focus:z-10 focus:ring-4 focus:ring-gray-200 dark:focus:ring-gray-700 dark:bg-gray-800 dark:text-gray-400 dark:border-gray-600 dark:hover:text-white dark:hover:bg-gray-700","font-medium":"","text-sm":"","rounded-md":"",onClick:g},mt(U(B)("button.cancel")),1)])])]),_:1},8,["isHidden","title"])}}});function js(at){const it={backgroundColor:"#fff",color:"#000"};if(at.awards.includes(Wt.GOLD))return it.backgroundColor="#fff566",it;if(at.awards.includes(Wt.SILVER))return it.backgroundColor="#ffadd2",it;if(at.awards.includes(Wt.BRONZE))return it.backgroundColor="#f0c0a0",it;if(at.awards.includes(Wt.HONORABLE))return it.backgroundColor="#e6f7ff",it}function Bs(at){return at.isFirstSolved?"#3db03d":at.isAccepted()?"#e1ffb5":at.isPending()?"#c8d6fa":"#ffd0d0"}var ee=(at=>(at[at.SUBMISSION_STATUS=0]="SUBMISSION_STATUS",at[at.SUBMIT_TIMESTAMP=1]="SUBMIT_TIMESTAMP",at))(ee||{});const zs={"h-7":"","w-124":"","text-gray-200":"","font-mono":"",flex:"","flex-row":"","justify-center":"","items-center":"",class:"bg-resolver-bg-zero"},Rs={"h-full":"","w-92":"","pl-1":"",truncate:""},Ns={"h-full":"","w-4":""},$s=Lt({__name:"AnimatedSubmissionBlock",props:{item:null,lastBlockDisplayType:null},setup(at){const it=at,et=kt(()=>it.item);function w(){const B=et.value.submission;if(it.lastBlockDisplayType===ee.SUBMISSION_STATUS)return ei[B.status];if(it.lastBlockDisplayType===ee.SUBMIT_TIMESTAMP)return B.timestampToMinute}return(B,P)=>(ut(),ft("div",zs,[Z("div",{"h-full":"","w-10":"",style:Xt(U(js)(U(et).team)),flex:"","justify-center":"","items-center":""},[Z("div",null,mt(U(et).team.rank),1)],4),Z("div",Rs,mt(U(et).displayName),1),Z("div",Ns,mt(U(et).team.solvedProblemNum),1),Z("div",{"h-full":"","w-6":"","border-b-3":"",flex:"","justify-center":"",style:Xt({borderColor:U(et).problem.balloonColor.background_color})},mt(U(et).problem.label),5),Z("div",{"h-full":"","w-12":"",flex:"","justify-center":"","font-sans":"","font-medium":"","text-zinc-800":"",style:Xt({backgroundColor:("getStandingsStatusColor"in B?B.getStandingsStatusColor:U(Bs))(U(et).submission)})},mt(w()),5)]))}}),Hs={absolute:"",fixed:"","z-99":"","bottom-4":"","left-4":"","opacity-80":""},Gs={flex:"","flex-col":""},Fs={flex:"","flex-col":"","mt-6":""},Ws=Lt({__name:"AnimatedSubmissionsModal",props:{rank:{}},setup(at){const it=at,et=kt(()=>it.rank),w=kt(()=>{const $=et.value.getSubmissions().sort(Ie.compare).reverse();let q=0;const J=10,Y=[];let X=0;const C=6,R=[];for(let N=0;N<$.length&&(X<C||q<J);N++){const x=$[N],v=x.teamId,_=x.problemId,A=et.value.teamsMap.get(v);if(!A||et.value.filterTeamByOrg(A))continue;const c=et.value.contest.problemsMap.get(_);if(!c)continue;let y=A.name;A.organization&&(y=`${A.organization} - ${y}`);const k={submission:x,team:A,problem:c,displayName:y};q<J&&(Y.push(k),++q),x.isSolved&&X<C&&(R.push(k),++X)}return R.reverse(),Y.reverse(),{acceptedRes:R,allRes:Y}}),B=kt(()=>w.value.acceptedRes),P=kt(()=>w.value.allRes);return($,q)=>{const J=$s;return ut(),ft("div",Hs,[Z("div",Gs,[Z("div",null,[Ct(ye,{name:"list",tag:"ul"},{default:jt(()=>[(ut(!0),ft(Ot,null,It(U(B),Y=>(ut(),ft("div",{key:Y.submission.id},[Ct(J,{item:Y,"last-block-display-type":U(ee).SUBMIT_TIMESTAMP},null,8,["item","last-block-display-type"])]))),128))]),_:1})])]),Z("div",Fs,[Z("div",null,[Ct(ye,{name:"list",tag:"ul"},{default:jt(()=>[(ut(!0),ft(Ot,null,It(U(P),Y=>(ut(),ft("div",{key:Y.submission.id},[Z("div",null,[Ct(J,{item:Y,"last-block-display-type":U(ee).SUBMISSION_STATUS},null,8,["item","last-block-display-type"])])]))),128))]),_:1})])])])}}});const Xs=Ut(Ws,[["__scopeId","data-v-c5c85310"]]),Us={"w-full":"",flex:"","mt-4":"","gap-4":""},Ys={btn:"",title:"Submissions",disabled:"true"},Vs={"w-full":"",flex:"","mt-4":"","gap-4":""},qs=["href"],Ks=Lt({__name:"Utility",setup(at){const{t:it}=Kt(),et=te(),w=ii(),B=kt(()=>`https://resolver.xcpcio.com/resolver?xcpcio-data-source=${et.path}`);function P(){w.push(`/balloon/?data-source=${et.path}`)}function $(){w.push(`/countdown/?data-source=${et.path}`)}return(q,J)=>(ut(),ft(Ot,null,[Z("div",Us,[Z("button",{btn:"",title:"Balloon",onClick:P},mt(U(it)("type_menu.balloon")),1),Z("button",Ys,mt(U(it)("type_menu.submissions")),1)]),Z("div",Vs,[Z("a",{btn:"",href:U(B),target:"_blank",title:"Resolver"},mt(U(it)("type_menu.resolver")),9,qs),Z("button",{btn:"",title:"Countdown",onClick:$},mt(U(it)("type_menu.countdown")),1)])],64))}});var We={exports:{}};(function(at,it){(function(et,w){w()})(Qt,function(){function et(Y,X){return typeof X>"u"?X={autoBom:!1}:typeof X!="object"&&(console.warn("Deprecated: Expected third argument to be a object"),X={autoBom:!X}),X.autoBom&&/^\s*(?:text\/\S*|application\/xml|\S*\/\S*\+xml)\s*;.*charset\s*=\s*utf-8/i.test(Y.type)?new Blob(["\uFEFF",Y],{type:Y.type}):Y}function w(Y,X,C){var R=new XMLHttpRequest;R.open("GET",Y),R.responseType="blob",R.onload=function(){J(R.response,X,C)},R.onerror=function(){console.error("could not download file")},R.send()}function B(Y){var X=new XMLHttpRequest;X.open("HEAD",Y,!1);try{X.send()}catch{}return 200<=X.status&&299>=X.status}function P(Y){try{Y.dispatchEvent(new MouseEvent("click"))}catch{var X=document.createEvent("MouseEvents");X.initMouseEvent("click",!0,!0,window,0,0,0,80,20,!1,!1,!1,!1,0,null),Y.dispatchEvent(X)}}var $=typeof window=="object"&&window.window===window?window:typeof self=="object"&&self.self===self?self:typeof Qt=="object"&&Qt.global===Qt?Qt:void 0,q=$.navigator&&/Macintosh/.test(navigator.userAgent)&&/AppleWebKit/.test(navigator.userAgent)&&!/Safari/.test(navigator.userAgent),J=$.saveAs||(typeof window!="object"||window!==$?function(){}:"download"in HTMLAnchorElement.prototype&&!q?function(Y,X,C){var R=$.URL||$.webkitURL,N=document.createElement("a");X=X||Y.name||"download",N.download=X,N.rel="noopener",typeof Y=="string"?(N.href=Y,N.origin===location.origin?P(N):B(N.href)?w(Y,X,C):P(N,N.target="_blank")):(N.href=R.createObjectURL(Y),setTimeout(function(){R.revokeObjectURL(N.href)},4e4),setTimeout(function(){P(N)},0))}:"msSaveOrOpenBlob"in navigator?function(Y,X,C){if(X=X||Y.name||"download",typeof Y!="string")navigator.msSaveOrOpenBlob(et(Y,C),X);else if(B(Y))w(Y,X,C);else{var R=document.createElement("a");R.href=Y,R.target="_blank",setTimeout(function(){P(R)})}}:function(Y,X,C,R){if(R=R||open("","_blank"),R&&(R.document.title=R.document.body.innerText="downloading..."),typeof Y=="string")return w(Y,X,C);var N=Y.type==="application/octet-stream",x=/constructor/i.test($.HTMLElement)||$.safari,v=/CriOS\/[\d]+/.test(navigator.userAgent);if((v||N&&x||q)&&typeof FileReader<"u"){var _=new FileReader;_.onloadend=function(){var y=_.result;y=v?y:y.replace(/^data:[^;]*;/,"data:attachment/file;"),R?R.location.href=y:location=y,R=null},_.readAsDataURL(Y)}else{var A=$.URL||$.webkitURL,c=A.createObjectURL(Y);R?R.location=c:location.href=c,R=null,setTimeout(function(){A.revokeObjectURL(c)},4e4)}});$.saveAs=J.saveAs=J,at.exports=J})})(We);var Zs=We.exports;const Se=si(Zs);var Js=setTimeout;function Qs(at,it){var et=it.useCachedSetTimeout?Js:setTimeout;return new Promise(function(w){et(w,at)})}function to(at){var it=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},et=it.useCachedSetTimeout,w=Qs(at,{useCachedSetTimeout:et});function B(P){return w.then(function(){return P})}return B.then=function(){return w.then.apply(w,arguments)},B.catch=Promise.resolve().catch,B}const eo={flex:"","flex-col":""},io={"w-160":"","font-bold":""},so={"mt-8":""},oo={key:0,flex:"","flex-row":"","justify-center":"","gap-4":""},no=["disabled"],ro=["disabled"],ao={key:1,flex:"","justify-center":""},lo=["disabled"],ho={key:2,flex:"","justify-center":""},co=["disabled"],uo=Lt({__name:"Export",props:{rank:null},setup(at){const it=at,et=je.useToast(),{copy:w,isSupported:B}=Be(),P=kt(()=>it.rank),$=_t({value:"cf-dat",text:"Codeforces Gym Ghost(dat)"}),q=_t([{value:"cf-dat",text:"Codeforces Gym Ghost(dat)"},{value:"general-xlsx",text:"Excel Table(xlsx)"},{value:"icpc-standings-csv",text:"ICPC Standings(csv)"}]),J=_t({CfDatDownload:!1,CfDatCopy:!1,GeneralXLSXDownload:!1,ICPCStandingsCsvDownload:!1});async function Y(){await De(),await to(16)}async function X(){J.value.CfDatDownload=!0,await Y();const v=new ve().convert(P.value),_=new Blob([v],{type:"text/plain;charset=utf-8"});Se.saveAs(_,"contest.dat"),J.value.CfDatDownload=!1}async function C(){if(!B.value){et.warning("clipboard is not supported");return}J.value.CfDatCopy=!0,await Y();const v=new ve().convert(P.value);w(v),J.value.CfDatCopy=!1,et.success("Copy Success")}async function R(){J.value.GeneralXLSXDownload=!0,await Y(),new oi().convertAndWrite(P.value,`${P.value.contest.name}.xlsx`),J.value.GeneralXLSXDownload=!1}async function N(){J.value.ICPCStandingsCsvDownload=!0,await Y();const v=new ni().convert(P.value),_=new Blob([v],{type:"text/csv;charset=utf-8"});Se.saveAs(_,"standings.csv"),J.value.ICPCStandingsCsvDownload=!1}return(x,v)=>(ut(),ft("div",eo,[Z("div",io,[Ct(U(Hi),{modelValue:U($),"onUpdate:modelValue":v[0]||(v[0]=_=>zt($)?$.value=_:null),options:U(q),placeholder:"Export Type"},null,8,["modelValue","options"])]),Z("div",so,[U($).value==="cf-dat"?(ut(),ft("div",oo,[Z("button",{disabled:U(J).CfDatDownload,btn:"",onClick:X}," Download ",8,no),Z("button",{disabled:U(J).CfDatCopy,btn:"",onClick:C}," Copy to Clipboard ",8,ro)])):bt("",!0),U($).value==="general-xlsx"?(ut(),ft("div",ao,[Z("button",{disabled:U(J).GeneralXLSXDownload,btn:"",onClick:R}," Download ",8,lo)])):bt("",!0),U($).value==="icpc-standings-csv"?(ut(),ft("div",ho,[Z("button",{disabled:U(J).ICPCStandingsCsvDownload,btn:"",onClick:N}," Download ",8,co)])):bt("",!0)])]))}});function ge(at,it,et,w,B,P){return{colors:P,chart:window.innerWidth<992?{type:"bar",backgroundColor:"transparent"}:{type:"column",backgroundColor:"transparent",height:"420px"},title:{text:at},xAxis:{categories:w,labels:{style:{fontSize:"16px"}},title:{text:it,style:{fontSize:"16px"}}},yAxis:{min:0,title:{text:et,style:{fontSize:"16px",height:"320px"}},stackLabels:{enabled:!0,style:{fontSize:"16px"}}},tooltip:{enabled:!0,headerFormat:"",pointFormat:"{series.name}:{point.y}"},plotOptions:{bar:{stacking:"normal"},column:{stacking:"normal"}},credits:{enabled:!1},series:B}}function po(at){const it=[];at.contest.problems.forEach((P,$)=>{it.push({problem_id:P.label,index:$,solved:P.statistics.acceptedNum})}),it.sort((P,$)=>P.solved>$.solved?-1:P.solved<$.solved?1:P.index<$.index?-1:P.index>$.index?1:0);const{cat:et,series:w,colors:B}=(()=>{const P=[],$=[];return it.forEach(Y=>{P.push(Y.problem_id),$.push(Y.solved)}),{cat:P,series:[{name:"队伍数",showInLegend:!1,data:$}],colors:["rgb(124, 181, 236)"]}})();return ge("题目通过数","题目编号","通过数",et,w,B)}function fo(at){const it=at.rankStatistics.teamSolvedNum.map((P,$)=>({index:$,cnt:P})),{cat:et,series:w,colors:B}=(()=>{const P=[],$=[];return it.forEach(Y=>{P.push(Y.index),$.push(Y.cnt)}),{cat:P,series:[{name:"队伍数",showInLegend:!1,data:$}],colors:["rgb(124, 181, 236)"]}})();return ge("队伍过题数","过题数","队伍数",et,w,B)}function mo(at){const{cat:it,series:et,colors:w}=(()=>{const B=[],P=[],$=[],q=[];return at.contest.problems.forEach(X=>{P.push(X.statistics.acceptedNum),$.push(X.statistics.rejectedNum),q.push(X.statistics.pendingNum),B.push(X.label)}),{cat:B,series:[{name:"Accepted",showInLegend:!1,data:P},{name:"Rejected",showInLegend:!1,data:$},{name:"Pending",showInLegend:!1,data:q}],colors:["#E1FFB5","#FFD0D0","#C8D6FA"]}})();return ge("提交分类","题目编号","提交数",it,et,w)}function go(at,it){const et=it.placeChartPoints.map(B=>{var P,$;return{x:B.timePoint,y:B.rank,showX:ze(B.timePoint),lastSolved:(P=B.lastSolvedProblem)!=null&&P.label?`Last Solved Problem ${($=B.lastSolvedProblem)==null?void 0:$.label}`:""}});return{chart:{type:"spline"},title:{text:"排名变化趋势图"},series:[{showInLegend:!1,allowPointSelect:!1,name:"rank",type:"spline",data:et,marker:{symbol:"circle",radius:4,lineWidth:2,fillColor:"yellow",lineColor:"yellow"}}],xAxis:[{allowDecimals:!1,title:{text:"Time(min)"},crosshair:!0}],yAxis:[{allowDecimals:!1,title:{text:"Place"},reversed:!0,gridLineWidth:1}],plotOptions:{line:{color:"#efbc47",dataLabels:{enabled:!1},enableMouseTracking:!0,marker:{enabled:!0,fillColor:"#fff566"}}},tooltip:{enabled:!0,headerFormat:"",pointFormat:"Time: {point.showX} <br/> Place: {point.y} <br/> {point.lastSolved}"},credits:{enabled:!1},exporting:{enabled:!0},navigation:{menuItemStyle:{fontSize:"10px"}}}}var Xe={exports:{}},ue={exports:{}},we;function xo(){return we||(we=1,function(at){(function(it,et){at.exports?(et.default=et,at.exports=it.document?et(it):et):(it.Highcharts&&it.Highcharts.error(16,!0),it.Highcharts=et(it))})(typeof window<"u"?window:Qt,function(it){function et(B,P,$,q){B.hasOwnProperty(P)||(B[P]=q.apply(null,$),typeof CustomEvent=="function"&&it.dispatchEvent(new CustomEvent("HighchartsModuleLoaded",{detail:{path:P,module:B[P]}})))}var w={};return et(w,"Core/Globals.js",[],function(){var B;return function(P){P.SVG_NS="http://www.w3.org/2000/svg",P.product="Highcharts",P.version="11.1.0",P.win=typeof it<"u"?it:{},P.doc=P.win.document,P.svg=P.doc&&P.doc.createElementNS&&!!P.doc.createElementNS(P.SVG_NS,"svg").createSVGRect,P.userAgent=P.win.navigator&&P.win.navigator.userAgent||"",P.isChrome=P.userAgent.indexOf("Chrome")!==-1,P.isFirefox=P.userAgent.indexOf("Firefox")!==-1,P.isMS=/(edge|msie|trident)/i.test(P.userAgent)&&!P.win.opera,P.isSafari=!P.isChrome&&P.userAgent.indexOf("Safari")!==-1,P.isTouchDevice=/(Mobile|Android|Windows Phone)/.test(P.userAgent),P.isWebKit=P.userAgent.indexOf("AppleWebKit")!==-1,P.deg2rad=2*Math.PI/360,P.hasBidiBug=P.isFirefox&&4>parseInt(P.userAgent.split("Firefox/")[1],10),P.hasTouch=!!P.win.TouchEvent,P.marginNames=["plotTop","marginRight","marginBottom","plotLeft"],P.noop=function(){},P.supportsPassiveEvents=function(){let $=!1;if(!P.isMS){const q=Object.defineProperty({},"passive",{get:function(){$=!0}});P.win.addEventListener&&P.win.removeEventListener&&(P.win.addEventListener("testPassive",P.noop,q),P.win.removeEventListener("testPassive",P.noop,q))}return $}(),P.charts=[],P.dateFormats={},P.seriesTypes={},P.symbolSizes={},P.chartCount=0}(B||(B={})),B}),et(w,"Core/Utilities.js",[w["Core/Globals.js"]],function(B){function P(t,i,l,p){const E=i?"Highcharts error":"Highcharts warning";t===32&&(t=`${E}: Deprecated member`);const a=R(t);let L=a?`${E} #${t}: www.highcharts.com/errors/${t}/`:t.toString();if(typeof p<"u"){let W="";a&&(L+="?"),O(p,function(Q,nt){W+=`
1
+ var qe=Object.defineProperty;var Ke=(at,it,et)=>it in at?qe(at,it,{enumerable:!0,configurable:!0,writable:!0,value:et}):at[it]=et;var re=(at,it,et)=>(Ke(at,typeof it!="symbol"?it+"":it,et),et);import{g as Lt,s as kt,O as Ze,w as Jt,o as ut,c as ft,d as Z,x as Xt,P as pe,t as mt,n as At,Q as Vt,I as Gt,F as Ot,D as It,m as bt,N as Ht,S as Le,T as Je,j as _t,U as qt,l as U,b as Ct,M as jt,V as ie,W as Qe,X as ti,H as zt,J as te,Y as Ee,Z as fe,u as Kt,E as Nt,$ as De,a0 as Wt,a1 as ei,a2 as Ie,a3 as ye,a as Ut,G as ii,a4 as Qt,a5 as si,a6 as je,a7 as Be,a8 as ve,a9 as oi,aa as ni,ab as ze,ac as ri,ad as ke,ae as se,af as oe,ag as Re,v as ai,ah as li,ai as me,aj as Ne,L as hi,ak as ci,h as di,al as be,i as ui,am as pi,k as fi,y as mi,z as gi,an as xi,ao as yi,p as vi,ap as ki,aq as bi,ar as Si,R as wi,as as Ci,at as Mi,au as Ti}from"./index-a771ea05.js";import{_ as $e}from"./TheInput.vue_vue_type_script_setup_true_lang-51ad90e9.js";import{a as He,u as _i}from"./query-5fd73b94.js";const Ai={class:"relative bg-white dark:bg-gray-800 sm:p-4","rounded-sm":"","shadow-sm":""},Pi={class:"mb-4 border-b rounded-t pb-4 sm:mb-4 dark:border-gray-600",flex:"","items-center":"","justify-between":""},Oi={"text-gray-900":"","dark:text-white":"","text-xl":"","font-sans":"","font-semibold":"",italic:""},Li=Z("svg",{class:"h-5 w-5",fill:"currentColor",viewBox:"0 0 20 20",xmlns:"http://www.w3.org/2000/svg"},[Z("path",{"fill-rule":"evenodd",d:"M4.293 4.293a1 1 0 011.414 0L10 8.586l4.293-4.293a1 1 0 111.414 1.414L11.414 10l4.293 4.293a1 1 0 01-1.414 1.414L10 11.414l-4.293 4.293a1 1 0 01-1.414-1.414L8.586 10 4.293 5.707a1 1 0 010-1.414z","clip-rule":"evenodd"})],-1),Ei=Z("span",{"sr-only":""}," Close modal ",-1),Di=[Li,Ei],ce=Lt({__name:"Modal",props:{isHidden:{type:Boolean},title:null,width:null,mt:null},emits:["update:isHidden"],setup(at,{emit:it}){const et=at,w=kt({get(){return et.isHidden},set($){it("update:isHidden",$)}});function B(){w.value=!0}const{Escape:P}=Ze();return Jt(P,$=>{$&&B()}),($,q)=>(ut(),ft("div",{class:At(["md:inset-0 w-[100%] h-[100%]",[et.mt??"md:mt-32 sm:mt-16"]]),fixed:"","z-9997":"","of-x-hidden":"",flex:"","justify-center":"","items-start":""},[Z("div",{class:"w-[100%] h-[100%]",fixed:"","left-0":"","top-0":"","z-9998":"",style:Xt({backgroundColor:"rgba(0, 0, 0, 0.5)"}),onClick:B},null,4),Z("div",{class:At(["relative p-4",[et.width??"w-[78%]"]]),"z-9999":""},[Z("div",Ai,[Z("div",Pi,[pe($.$slots,"header",{},()=>[Z("h3",Oi,mt(et.title),1)]),Z("button",{type:"button",class:"hover:bg-gray-200 hover:text-gray-900 dark:hover:bg-gray-600 dark:hover:text-white","bg-transparent":"","ml-auto":"","p-1.5":"","text-sm":"","text-gray-400":"","items-center":"","inline-flex":"","rounded-lg":"",onClick:B},Di)]),pe($.$slots,"default")])],2)],2))}}),Bt={openOptions(at){at.$refs.input.focus(),at.showMenu=!0,at.mousedownState=!1},blurInput(at){at.mousedownState||(at.searchText="",at.closeOptions()),at.$emit("blur")},closeOptions(at){at.$refs.input.blur(),at.showMenu=!1},prevItem(at){const it=at.pointer-1,et=at.$el.offsetHeight*it;it>=0&&(at.pointer=it),at.$refs.menu.scrollTop=et},nextItem(at){const it=at.pointer+1,et=at.$el.offsetHeight*it;it<=at.filteredOptions.length-1&&(at.pointer=it);const w=at.$refs.menu.offsetHeight,B=Math.ceil((at.$refs.menu.scrollTop+at.$el.offsetHeight)/w),P=Math.ceil(et/w);B!==P&&(at.$refs.menu.scrollTop=(P-1)*at.$refs.menu.offsetHeight)},enterItem(at){const it=at.filteredOptions[at.pointer],et=it.disabled;it&&!et&&at.selectItem(it)},pointerSet(at,it){at.pointer=it},pointerAdjust(at){at.pointer>=at.filteredOptions.length-1&&(at.pointer=at.filteredOptions.length?at.filteredOptions.length-1:0)},mousedownItem(at){at.mousedownState=!0}};function Ii(at){return new RegExp(at.replace(/[.*+?^${}()|[\]\\]/g,"\\$&"),"i")}const Ge={props:{id:{default:null},name:{type:String,default:""},isError:{type:Boolean,default:!1},customAttr:{type:Function,default:()=>""},isDisabled:{type:Boolean,default:!1},placeholder:{type:String,default:""},filterPredicate:{type:Function,default:(at,it)=>at.match(Ii(it))}}},Fe=(at,it)=>{const et=at.__vccOpts||at;for(const[w,B]of it)et[w]=B;return et},ji={name:"ModelSelect",mixins:[Ge],emits:["blur","searchchange","update:modelValue"],props:{modelValue:{type:[String,Number,Object,Boolean]},customAttr:{type:Function,default:()=>""},options:{type:Array}},data(){return{showMenu:!1,searchText:"",mousedownState:!1,pointer:-1}},watch:{value(at){this.pointer=this.filteredOptions.findIndex(it=>it.value===this.optionValue(at))},filteredOptions(){this.pointerAdjust()},searchText(){this.$emit("searchchange",this.searchText)}},computed:{searchTextCustomAttr(){return this.selectedOption&&this.selectedOption.value?this.customAttr(this.selectedOption):""},inputText(){if(this.searchText)return"";{let at=this.placeholder;return this.selectedOption&&(at=this.selectedOption.text),at}},customAttrs(){try{if(Array.isArray(this.options))return this.options.map(at=>this.customAttr(at))}catch{}return[]},textClass(){return!this.selectedOption&&this.placeholder?"default":""},menuClass(){return{visible:this.showMenu,hidden:!this.showMenu}},menuStyle(){return{display:this.showMenu?"block":"none"}},filteredOptions(){return this.searchText?this.options.filter(at=>{try{return this.filterPredicate(at.text,this.searchText)}catch{return!0}}):this.options},selectedOption(){return this.options.find(at=>at.value===this.optionValue(this.modelValue))}},methods:{deleteTextOrItem(){!this.searchText&&this.modelValue&&(this.selectItem({}),this.openOptions())},openOptions(){Bt.openOptions(this)},blurInput(){Bt.blurInput(this)},closeOptions(){Bt.closeOptions(this)},prevItem(){Bt.prevItem(this)},nextItem(){Bt.nextItem(this)},enterItem(){Bt.enterItem(this)},pointerSet(at){Bt.pointerSet(this,at)},pointerAdjust(){Bt.pointerAdjust(this)},mousedownItem(){Bt.mousedownItem(this)},selectItem(at){this.searchText="",this.closeOptions(),typeof this.modelValue=="object"&&this.modelValue?this.$emit("update:modelValue",at):(this.$emit("update:modelValue",at.value),at.value!==void 0&&at.value===at.text&&(this.searchText=at.value))},optionValue(at){return typeof at=="object"&&at!==null?at.value:at}}},Bi=Z("i",{class:"dropdown icon"},null,-1),zi=["disabled","tabindex","id","name","value"],Ri=["data-vss-custom-attr"],Ni=["data-vss-custom-attr","onClick","onMouseenter"];function $i(at,it,et,w,B,P){return ut(),ft("div",{class:At(["ui fluid search selection dropdown",{"active visible":B.showMenu,error:at.isError,disabled:at.isDisabled}]),onClick:it[11]||(it[11]=(...$)=>P.openOptions&&P.openOptions(...$)),onFocus:it[12]||(it[12]=(...$)=>P.openOptions&&P.openOptions(...$))},[Bi,Z("input",{class:"search",autocomplete:"off",disabled:at.isDisabled,tabindex:at.isDisabled?-1:0,id:at.id,name:at.name,value:B.searchText,onInput:it[0]||(it[0]=$=>B.searchText=$.target.value),ref:"input",onFocus:it[1]||(it[1]=Vt((...$)=>P.openOptions&&P.openOptions(...$),["prevent"])),onKeyup:[it[2]||(it[2]=Gt((...$)=>P.closeOptions&&P.closeOptions(...$),["esc"])),it[7]||(it[7]=Gt(Vt((...$)=>P.enterItem&&P.enterItem(...$),["prevent"]),["enter"]))],onBlur:it[3]||(it[3]=(...$)=>P.blurInput&&P.blurInput(...$)),onKeydown:[it[4]||(it[4]=Gt((...$)=>P.prevItem&&P.prevItem(...$),["up"])),it[5]||(it[5]=Gt((...$)=>P.nextItem&&P.nextItem(...$),["down"])),it[6]||(it[6]=Gt(Vt(()=>{},["prevent"]),["enter"])),it[8]||(it[8]=Gt((...$)=>P.deleteTextOrItem&&P.deleteTextOrItem(...$),["delete"]))]},null,40,zi),Z("div",{class:At(["text",P.textClass]),"data-vss-custom-attr":P.searchTextCustomAttr},mt(P.inputText),11,Ri),Z("div",{class:At(["menu",P.menuClass]),ref:"menu",onMousedown:it[10]||(it[10]=Vt(()=>{},["prevent"])),style:Xt(P.menuStyle),tabindex:"-1"},[(ut(!0),ft(Ot,null,It(P.filteredOptions,($,q)=>(ut(),ft("div",{key:q,class:At(["item",{selected:$.selected||B.pointer===q,disabled:$.disabled}]),"data-vss-custom-attr":P.customAttrs[q]?P.customAttrs[q]:"",onClick:Vt(J=>P.selectItem($),["stop"]),onMousedown:it[9]||(it[9]=(...J)=>P.mousedownItem&&P.mousedownItem(...J)),onMouseenter:J=>P.pointerSet(q)},mt($.text),43,Ni))),128))],38)],34)}const Hi=Fe(ji,[["render",$i]]),Gi={name:"MultiSelect",mixins:[Ge],emits:["blur","searchchange","select"],props:{customAttr:{type:Function,default:()=>""},options:{type:Array},selectedOptions:{type:Array},cleanSearch:{type:Boolean,default:!0},hideSelectedOptions:{type:Boolean,default:!1}},data(){return{showMenu:!1,searchText:"",mousedownState:!1,pointer:-1}},watch:{selectedOptions(){this.pointer=-1},filteredOptions(){this.pointerAdjust()},searchText(){this.$emit("searchchange",this.searchText)}},computed:{inputText(){return this.searchText?"":this.placeholder},textClass(){return this.placeholder?"default":""},inputWidth(){return{width:(this.searchText.length+1)*8+20+"px"}},menuClass(){return{visible:this.showMenu,hidden:!this.showMenu}},menuStyle(){return{display:this.showMenu?"block":"none"}},nonSelectOptions(){return this.options.filter(at=>this.selectedOptions.findIndex(it=>it.value===at.value)===-1)},filteredOptions(){return this.searchText?this.nonSelectOptions.filter(at=>{try{return this.cleanSearch?this.filterPredicate(this.accentsTidy(at.text),this.searchText):this.filterPredicate(at.text,this.searchText)}catch{return!0}}):this.nonSelectOptions}},methods:{deleteTextOrLastItem(){!this.searchText&&this.selectedOptions.length>0&&this.deleteItem(this.selectedOptions[this.selectedOptions.length-1])},openOptions(){Bt.openOptions(this)},blurInput(){Bt.blurInput(this)},closeOptions(){Bt.closeOptions(this)},prevItem(){Bt.prevItem(this),this.openOptions()},nextItem(){Bt.nextItem(this),this.openOptions()},enterItem(){Bt.enterItem(this)},pointerSet(at){Bt.pointerSet(this,at)},pointerAdjust(){Bt.pointerAdjust(this)},mousedownItem(){Bt.mousedownItem(this)},selectItem(at){const it=this.selectedOptions.concat(at),et=it.filter((w,B)=>it.indexOf(w)===B);this.closeOptions(),this.searchText="",this.$emit("select",et,at,"insert")},deleteItem(at){const it=this.selectedOptions.filter(et=>et.value!==at.value);this.$emit("select",it,at,"delete")},accentsTidy(at){let it=at.toString().toLowerCase();return it=it.replace(new RegExp("[àáâãäå]","g"),"a"),it=it.replace(new RegExp("æ","g"),"ae"),it=it.replace(new RegExp("ç","g"),"c"),it=it.replace(new RegExp("[èéêë]","g"),"e"),it=it.replace(new RegExp("[ìíîï]","g"),"i"),it=it.replace(new RegExp("ñ","g"),"n"),it=it.replace(new RegExp("[òóôõö]","g"),"o"),it=it.replace(new RegExp("œ","g"),"oe"),it=it.replace(new RegExp("[ùúûü]","g"),"u"),it=it.replace(new RegExp("[ýÿ]","g"),"y"),it}}},Fi=Z("i",{class:"dropdown icon"},null,-1),Wi=["data-vss-custom-attr"],Xi=["onClick"],Ui=["disabled","tabindex","id","name"],Yi=["data-vss-custom-attr","onClick","onMouseenter"];function Vi(at,it,et,w,B,P){return ut(),ft("div",{class:At(["ui fluid search dropdown selection multiple",{"active visible":B.showMenu,error:at.isError,disabled:at.isDisabled}]),onClick:it[11]||(it[11]=(...$)=>P.openOptions&&P.openOptions(...$)),onFocus:it[12]||(it[12]=(...$)=>P.openOptions&&P.openOptions(...$))},[Fi,et.hideSelectedOptions?bt("",!0):(ut(!0),ft(Ot,{key:0},It(et.selectedOptions,($,q)=>(ut(),ft("a",{key:q,class:"ui label transition visible",style:{display:"inline-block !important"},"data-vss-custom-attr":et.customAttr($)},[Ht(mt($.text),1),Z("i",{class:"delete icon",onClick:J=>P.deleteItem($)},null,8,Xi)],8,Wi))),128)),Le(Z("input",{class:"search",autocomplete:"off",disabled:at.isDisabled,tabindex:at.isDisabled?-1:0,id:at.id,name:at.name,"onUpdate:modelValue":it[0]||(it[0]=$=>B.searchText=$),ref:"input",style:Xt(P.inputWidth),onFocus:it[1]||(it[1]=Vt((...$)=>P.openOptions&&P.openOptions(...$),["prevent"])),onKeyup:[it[2]||(it[2]=Gt((...$)=>P.closeOptions&&P.closeOptions(...$),["esc"])),it[7]||(it[7]=Gt(Vt((...$)=>P.enterItem&&P.enterItem(...$),["prevent"]),["enter"]))],onBlur:it[3]||(it[3]=(...$)=>P.blurInput&&P.blurInput(...$)),onKeydown:[it[4]||(it[4]=Gt((...$)=>P.prevItem&&P.prevItem(...$),["up"])),it[5]||(it[5]=Gt((...$)=>P.nextItem&&P.nextItem(...$),["down"])),it[6]||(it[6]=Gt(Vt(()=>{},["prevent"]),["enter"])),it[8]||(it[8]=Gt((...$)=>P.deleteTextOrLastItem&&P.deleteTextOrLastItem(...$),["delete"]))]},null,44,Ui),[[Je,B.searchText]]),Z("div",{class:At(["text",P.textClass])},mt(P.inputText),3),Z("div",{class:At(["menu",P.menuClass]),ref:"menu",onMousedown:it[10]||(it[10]=Vt(()=>{},["prevent"])),style:Xt(P.menuStyle),tabindex:"-1"},[(ut(!0),ft(Ot,null,It(P.filteredOptions,($,q)=>(ut(),ft("div",{key:q,class:At(["item",{selected:$.selected||B.pointer===q,disabled:$.disabled}]),"data-vss-custom-attr":et.customAttr($),onClick:Vt(J=>P.selectItem($),["stop"]),onMousedown:it[9]||(it[9]=(...J)=>P.mousedownItem&&P.mousedownItem(...J)),onMouseenter:J=>P.pointerSet(q)},mt($.text),43,Yi))),128))],38)],34)}const Zt=Fe(Gi,[["render",Vi]]),qi={"ml-4":"","mt-2":""},Ki={"ml-4":"","mt-2":"",grid:"","grid-cols-6":"","gap-y-4":""},Zi=Z("div",{flex:"","items-center":"","text-sm":""}," Name: ",-1),Ji={flex:"","items-center":"","w-full":"","col-span-5":""},Qi=Z("div",null," Refresh Name ",-1),ts={key:0,flex:"","items-center":"","text-sm":""},es={key:1,flex:"","items-center":"","w-full":"","col-span-5":""},is=Z("div",{"text-sm":"",flex:"","items-center":""}," Team: ",-1),ss={flex:"","items-center":"","w-full":"","col-span-5":""},os=Lt({__name:"GiantsOptions",props:{rank:null,orgOptions:null,teamsOptions:null,giants:null},emits:["update:giants"],setup(at,{emit:it}){const et=at,w=kt({get(){return et.giants},set(X){it("update:giants",X)}}),B=_t(w.value.filterOrganizations);function P(X,C){B.value=X,w.value.setFilterOrganizations(X)}const $=_t(w.value.filterTeams);function q(X,C){$.value=X,w.value.setFilterTeams(X)}const J=kt(()=>`${w.value.type===qt.BLUE?"Blue":"Red"} Team`),Y=kt(()=>w.value.type===qt.BLUE?"#0000FF":"#FF0000");return(X,C)=>{const R=$e,N=ie;return ut(),ft("div",qi,[Z("div",{flex:"","text-sm":"",style:Xt({color:U(Y)})},mt(U(J)),5),Z("div",Ki,[Zi,Z("div",Ji,[Ct(R,{modelValue:U(w).name,"onUpdate:modelValue":C[0]||(C[0]=x=>U(w).name=x),"text-align":"left"},null,8,["modelValue"]),Ct(N,null,{popper:jt(()=>[Qi]),default:jt(()=>[Z("div",{"i-material-symbols-refresh":"","cursor-pointer":"",btn:"","text-2xl":"","ml-2":"",onClick:C[1]||(C[1]=x=>U(w).refreshName())})]),_:1})]),at.rank.contest.organization?(ut(),ft("div",ts,mt(at.rank.contest.organization)+": ",1)):bt("",!0),at.rank.contest.organization?(ut(),ft("div",es,[Ct(U(Zt),{options:at.orgOptions,"selected-options":U(B),onSelect:P},null,8,["options","selected-options"])])):bt("",!0),is,Z("div",ss,[Ct(U(Zt),{options:at.teamsOptions,"selected-options":U($),onSelect:q},null,8,["options","selected-options"])])])])}}}),ns={relative:"","inline-flex":"","items-center":"","cursor-pointer":""},rs=Z("div",{class:"w-11 h-6 bg-gray-200 peer-focus:outline-none peer-focus:ring-4 peer-focus:ring-blue-300 dark:peer-focus:ring-blue-800 rounded-full peer dark:bg-gray-700 peer-checked:after:translate-x-full peer-checked:after:border-white after:content-[''] after:absolute after:top-[2px] after:left-[2px] after:bg-white after:border-gray-300 after:border after:rounded-full after:h-5 after:w-5 after:transition-all dark:border-gray-600 peer-checked:bg-blue-600"},null,-1),as=Lt({__name:"TheCheckbox",props:{modelValue:{type:Boolean}},emits:["update:modelValue"],setup(at){const{modelValue:it}=Qe("modelValue");return(et,w)=>(ut(),ft("label",ns,[Le(Z("input",{"onUpdate:modelValue":w[0]||(w[0]=B=>zt(it)?it.value=B:null),type:"checkbox",class:"sr-only peer"},null,512),[[ti,U(it)]]),rs,pe(et.$slots,"default")]))}});function ls(){return`filter-organizations-${te().path}`}function hs(){return`filter-teams-${te().path}`}function cs(){const it=`filter-organizations-${te().path}`;return Ee(it,[])}function ds(){const it=`filter-teams-${te().path}`;return Ee(it,[])}const us={"w-full":"","font-bold":"","font-mono":"","text-base":"",flex:"","flex-col":"","gap-4":"","items-center":"","justify-center":""},ps={flex:"","flex-col":"","w-full":""},fs=Z("div",{flex:""}," Filter ",-1),ms={"ml-8":"","mt-2":"",grid:"","grid-cols-6":"","gap-y-4":""},gs={key:0,flex:"","items-center":"","text-sm":""},xs={key:1,flex:"","items-center":"","w-full":"","col-span-5":""},ys=Z("div",{"text-sm":"",flex:"","items-center":""}," Team: ",-1),vs={flex:"","items-center":"","w-full":"","col-span-5":""},ks={flex:"","flex-col":"","w-full":""},bs=Z("div",{flex:""}," Battle of Giants ",-1),Ss={"ml-4":"","mt-2":""},ws={grid:"","grid-cols-8":"","items-center":""},Cs=Z("span",{"text-sm":"","font-medium":"","text-gray-900":"","dark:text-gray-300":""}," Enable ",-1),Ms=Z("span",{"text-sm":"","font-medium":"","text-gray-900":"","dark:text-gray-300":""}," Equal Teams ",-1),Ts=Z("span",{"text-sm":"","font-medium":"","text-gray-900":"","dark:text-gray-300":""}," Persist ",-1),_s=Z("span",{"text-sm":"","font-medium":"","text-gray-900":"","dark:text-gray-300":""}," TopX ",-1),As={flex:"","flex-col":"","w-full":""},Ps=Z("div",{flex:""}," Feature ",-1),Os={"ml-4":"","mt-2":""},Ls={flex:"","flex-row":""},Es=Z("span",{"ml-3":"","text-sm":"","font-medium":"","text-gray-900":"","dark:text-gray-300":""}," Submission Queue ",-1),Ds={"w-full":"",flex:"","flex-row-reverse":"","items-center":"","gap-x-4":""},Is=Lt({__name:"OptionsModal",props:{isHidden:{type:Boolean},rank:null,rankOptions:null},emits:["update:isHidden","update:rankOptions"],setup(at,{emit:it}){const et=at,w=fe.cloneDeep(et.rankOptions),{t:B}=Kt(),P=kt({get(){return et.isHidden},set(o){it("update:isHidden",o)}}),$=kt({get(){return et.rankOptions},set(o){it("update:rankOptions",o)}}),q=kt(()=>et.rank),J=kt(()=>B("type_menu.options")),Y=_t(!1);function X(){Y.value=!0}function C(){Y.value=!1}function R(o){Y.value&&o.stopPropagation()}const N=kt(()=>q.value.organizations.map(r=>({value:r,text:r}))),x=_t($.value.filterOrganizations);function v(o,r){x.value=o,$.value.setFilterOrganizations(o)}const _=kt(()=>q.value.originTeams.map(r=>({value:r.id,text:r.organization?`${r.name} - ${r.organization}`:r.name}))),A=_t($.value.filterTeams);function c(o,r){A.value=o,$.value.setFilterTeams(o)}const y=He();function k(){$.value.battleOfGiants.persist?y.value=$.value.battleOfGiants.ToBase64():y.value=void 0}Jt(()=>$.value.battleOfGiants.persist,()=>{k()});async function g(){$.value.setSelf(w),await De(),k(),P.value=!0}const O=ls(),b=hs();function S(){localStorage.setItem(O,JSON.stringify(x.value)),localStorage.setItem(b,JSON.stringify(A.value)),k(),P.value=!0}return(o,r)=>{const u=as,h=$e,d=os,e=ce;return ut(),Nt(e,{isHidden:U(P),"onUpdate:isHidden":r[5]||(r[5]=t=>zt(P)?P.value=t:null),title:U(J),width:"w-200",mt:"mt-4"},{default:jt(()=>[Z("div",us,[Z("div",ps,[fs,Z("div",ms,[U(q).contest.organization?(ut(),ft("div",gs,mt(U(q).contest.organization)+": ",1)):bt("",!0),U(q).contest.organization?(ut(),ft("div",xs,[Ct(U(Zt),{options:U(N),"selected-options":U(x),onSelect:v,onCompositionstart:X,onCompositionend:C,onKeydownCapture:Gt(R,["delete"])},null,8,["options","selected-options","onKeydownCapture"])])):bt("",!0),ys,Z("div",vs,[Ct(U(Zt),{options:U(_),"selected-options":U(A),onSelect:c},null,8,["options","selected-options"])])])]),Z("div",ks,[bs,Z("div",Ss,[Z("div",ws,[Cs,Ct(u,{modelValue:U($).battleOfGiants.enable,"onUpdate:modelValue":r[0]||(r[0]=t=>U($).battleOfGiants.enable=t)},null,8,["modelValue"]),Ms,Ct(u,{modelValue:U($).battleOfGiants.equalTeams,"onUpdate:modelValue":r[1]||(r[1]=t=>U($).battleOfGiants.equalTeams=t)},null,8,["modelValue"]),Ts,Ct(u,{modelValue:U($).battleOfGiants.persist,"onUpdate:modelValue":r[2]||(r[2]=t=>U($).battleOfGiants.persist=t)},null,8,["modelValue"]),_s,Ct(h,{modelValue:U($).battleOfGiants.topX,"onUpdate:modelValue":r[3]||(r[3]=t=>U($).battleOfGiants.topX=t),"text-align":"left","text-type":"number"},null,8,["modelValue"])])]),Ct(d,{rank:U(q),"org-options":U(N),"teams-options":U(_),giants:U($).battleOfGiants.blueTeam},null,8,["rank","org-options","teams-options","giants"]),Ct(d,{rank:U(q),"org-options":U(N),"teams-options":U(_),giants:U($).battleOfGiants.redTeam},null,8,["rank","org-options","teams-options","giants"])]),Z("div",As,[Ps,Z("div",Os,[Z("div",Ls,[Ct(u,{modelValue:U($).enableAnimatedSubmissions,"onUpdate:modelValue":r[4]||(r[4]=t=>U($).enableAnimatedSubmissions=t)},{default:jt(()=>[Es]),_:1},8,["modelValue"])])])]),Z("div",Ds,[Z("button",{type:"submit",class:"text-white bg-primary-700 hover:bg-primary-800 focus:ring-4 focus:outline-none focus:ring-primary-300 px-5 py-2.5 text-center dark:bg-primary-600 dark:hover:bg-primary-700 dark:focus:ring-primary-800","font-medium":"","text-sm":"","rounded-md":"",onClick:S},mt(U(B)("button.confirm")),1),Z("button",{type:"reset",class:"py-2.5 px-5 text-gray-900 focus:outline-none bg-white border border-gray-200 hover:bg-gray-100 hover:text-primary-700 focus:z-10 focus:ring-4 focus:ring-gray-200 dark:focus:ring-gray-700 dark:bg-gray-800 dark:text-gray-400 dark:border-gray-600 dark:hover:text-white dark:hover:bg-gray-700","font-medium":"","text-sm":"","rounded-md":"",onClick:g},mt(U(B)("button.cancel")),1)])])]),_:1},8,["isHidden","title"])}}});function js(at){const it={backgroundColor:"#fff",color:"#000"};if(at.awards.includes(Wt.GOLD))return it.backgroundColor="#fff566",it;if(at.awards.includes(Wt.SILVER))return it.backgroundColor="#ffadd2",it;if(at.awards.includes(Wt.BRONZE))return it.backgroundColor="#f0c0a0",it;if(at.awards.includes(Wt.HONORABLE))return it.backgroundColor="#e6f7ff",it}function Bs(at){return at.isFirstSolved?"#3db03d":at.isAccepted()?"#e1ffb5":at.isPending()?"#c8d6fa":"#ffd0d0"}var ee=(at=>(at[at.SUBMISSION_STATUS=0]="SUBMISSION_STATUS",at[at.SUBMIT_TIMESTAMP=1]="SUBMIT_TIMESTAMP",at))(ee||{});const zs={"h-7":"","w-124":"","text-gray-200":"","font-mono":"",flex:"","flex-row":"","justify-center":"","items-center":"",class:"bg-resolver-bg-zero"},Rs={"h-full":"","w-92":"","pl-1":"",truncate:""},Ns={"h-full":"","w-4":""},$s=Lt({__name:"AnimatedSubmissionBlock",props:{item:null,lastBlockDisplayType:null},setup(at){const it=at,et=kt(()=>it.item);function w(){const B=et.value.submission;if(it.lastBlockDisplayType===ee.SUBMISSION_STATUS)return ei[B.status];if(it.lastBlockDisplayType===ee.SUBMIT_TIMESTAMP)return B.timestampToMinute}return(B,P)=>(ut(),ft("div",zs,[Z("div",{"h-full":"","w-10":"",style:Xt(U(js)(U(et).team)),flex:"","justify-center":"","items-center":""},[Z("div",null,mt(U(et).team.rank),1)],4),Z("div",Rs,mt(U(et).displayName),1),Z("div",Ns,mt(U(et).team.solvedProblemNum),1),Z("div",{"h-full":"","w-6":"","border-b-3":"",flex:"","justify-center":"",style:Xt({borderColor:U(et).problem.balloonColor.background_color})},mt(U(et).problem.label),5),Z("div",{"h-full":"","w-12":"",flex:"","justify-center":"","font-sans":"","font-medium":"","text-zinc-800":"",style:Xt({backgroundColor:("getStandingsStatusColor"in B?B.getStandingsStatusColor:U(Bs))(U(et).submission)})},mt(w()),5)]))}}),Hs={absolute:"",fixed:"","z-99":"","bottom-4":"","left-4":"","opacity-80":""},Gs={flex:"","flex-col":""},Fs={flex:"","flex-col":"","mt-6":""},Ws=Lt({__name:"AnimatedSubmissionsModal",props:{rank:{}},setup(at){const it=at,et=kt(()=>it.rank),w=kt(()=>{const $=et.value.getSubmissions().sort(Ie.compare).reverse();let q=0;const J=10,Y=[];let X=0;const C=6,R=[];for(let N=0;N<$.length&&(X<C||q<J);N++){const x=$[N],v=x.teamId,_=x.problemId,A=et.value.teamsMap.get(v);if(!A||et.value.filterTeamByOrg(A))continue;const c=et.value.contest.problemsMap.get(_);if(!c)continue;let y=A.name;A.organization&&(y=`${A.organization} - ${y}`);const k={submission:x,team:A,problem:c,displayName:y};q<J&&(Y.push(k),++q),x.isSolved&&X<C&&(R.push(k),++X)}return R.reverse(),Y.reverse(),{acceptedRes:R,allRes:Y}}),B=kt(()=>w.value.acceptedRes),P=kt(()=>w.value.allRes);return($,q)=>{const J=$s;return ut(),ft("div",Hs,[Z("div",Gs,[Z("div",null,[Ct(ye,{name:"list",tag:"ul"},{default:jt(()=>[(ut(!0),ft(Ot,null,It(U(B),Y=>(ut(),ft("div",{key:Y.submission.id},[Ct(J,{item:Y,"last-block-display-type":U(ee).SUBMIT_TIMESTAMP},null,8,["item","last-block-display-type"])]))),128))]),_:1})])]),Z("div",Fs,[Z("div",null,[Ct(ye,{name:"list",tag:"ul"},{default:jt(()=>[(ut(!0),ft(Ot,null,It(U(P),Y=>(ut(),ft("div",{key:Y.submission.id},[Z("div",null,[Ct(J,{item:Y,"last-block-display-type":U(ee).SUBMISSION_STATUS},null,8,["item","last-block-display-type"])])]))),128))]),_:1})])])])}}});const Xs=Ut(Ws,[["__scopeId","data-v-c5c85310"]]),Us={"w-full":"",flex:"","mt-4":"","gap-4":""},Ys={btn:"",title:"Submissions",disabled:"true"},Vs={"w-full":"",flex:"","mt-4":"","gap-4":""},qs=["href"],Ks=Lt({__name:"Utility",setup(at){const{t:it}=Kt(),et=te(),w=ii(),B=kt(()=>`https://resolver.xcpcio.com/resolver?xcpcio-data-source=${et.path}`);function P(){w.push(`/balloon/?data-source=${et.path}`)}function $(){w.push(`/countdown/?data-source=${et.path}`)}return(q,J)=>(ut(),ft(Ot,null,[Z("div",Us,[Z("button",{btn:"",title:"Balloon",onClick:P},mt(U(it)("type_menu.balloon")),1),Z("button",Ys,mt(U(it)("type_menu.submissions")),1)]),Z("div",Vs,[Z("a",{btn:"",href:U(B),target:"_blank",title:"Resolver"},mt(U(it)("type_menu.resolver")),9,qs),Z("button",{btn:"",title:"Countdown",onClick:$},mt(U(it)("type_menu.countdown")),1)])],64))}});var We={exports:{}};(function(at,it){(function(et,w){w()})(Qt,function(){function et(Y,X){return typeof X>"u"?X={autoBom:!1}:typeof X!="object"&&(console.warn("Deprecated: Expected third argument to be a object"),X={autoBom:!X}),X.autoBom&&/^\s*(?:text\/\S*|application\/xml|\S*\/\S*\+xml)\s*;.*charset\s*=\s*utf-8/i.test(Y.type)?new Blob(["\uFEFF",Y],{type:Y.type}):Y}function w(Y,X,C){var R=new XMLHttpRequest;R.open("GET",Y),R.responseType="blob",R.onload=function(){J(R.response,X,C)},R.onerror=function(){console.error("could not download file")},R.send()}function B(Y){var X=new XMLHttpRequest;X.open("HEAD",Y,!1);try{X.send()}catch{}return 200<=X.status&&299>=X.status}function P(Y){try{Y.dispatchEvent(new MouseEvent("click"))}catch{var X=document.createEvent("MouseEvents");X.initMouseEvent("click",!0,!0,window,0,0,0,80,20,!1,!1,!1,!1,0,null),Y.dispatchEvent(X)}}var $=typeof window=="object"&&window.window===window?window:typeof self=="object"&&self.self===self?self:typeof Qt=="object"&&Qt.global===Qt?Qt:void 0,q=$.navigator&&/Macintosh/.test(navigator.userAgent)&&/AppleWebKit/.test(navigator.userAgent)&&!/Safari/.test(navigator.userAgent),J=$.saveAs||(typeof window!="object"||window!==$?function(){}:"download"in HTMLAnchorElement.prototype&&!q?function(Y,X,C){var R=$.URL||$.webkitURL,N=document.createElement("a");X=X||Y.name||"download",N.download=X,N.rel="noopener",typeof Y=="string"?(N.href=Y,N.origin===location.origin?P(N):B(N.href)?w(Y,X,C):P(N,N.target="_blank")):(N.href=R.createObjectURL(Y),setTimeout(function(){R.revokeObjectURL(N.href)},4e4),setTimeout(function(){P(N)},0))}:"msSaveOrOpenBlob"in navigator?function(Y,X,C){if(X=X||Y.name||"download",typeof Y!="string")navigator.msSaveOrOpenBlob(et(Y,C),X);else if(B(Y))w(Y,X,C);else{var R=document.createElement("a");R.href=Y,R.target="_blank",setTimeout(function(){P(R)})}}:function(Y,X,C,R){if(R=R||open("","_blank"),R&&(R.document.title=R.document.body.innerText="downloading..."),typeof Y=="string")return w(Y,X,C);var N=Y.type==="application/octet-stream",x=/constructor/i.test($.HTMLElement)||$.safari,v=/CriOS\/[\d]+/.test(navigator.userAgent);if((v||N&&x||q)&&typeof FileReader<"u"){var _=new FileReader;_.onloadend=function(){var y=_.result;y=v?y:y.replace(/^data:[^;]*;/,"data:attachment/file;"),R?R.location.href=y:location=y,R=null},_.readAsDataURL(Y)}else{var A=$.URL||$.webkitURL,c=A.createObjectURL(Y);R?R.location=c:location.href=c,R=null,setTimeout(function(){A.revokeObjectURL(c)},4e4)}});$.saveAs=J.saveAs=J,at.exports=J})})(We);var Zs=We.exports;const Se=si(Zs);var Js=setTimeout;function Qs(at,it){var et=it.useCachedSetTimeout?Js:setTimeout;return new Promise(function(w){et(w,at)})}function to(at){var it=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},et=it.useCachedSetTimeout,w=Qs(at,{useCachedSetTimeout:et});function B(P){return w.then(function(){return P})}return B.then=function(){return w.then.apply(w,arguments)},B.catch=Promise.resolve().catch,B}const eo={flex:"","flex-col":""},io={"w-160":"","font-bold":""},so={"mt-8":""},oo={key:0,flex:"","flex-row":"","justify-center":"","gap-4":""},no=["disabled"],ro=["disabled"],ao={key:1,flex:"","justify-center":""},lo=["disabled"],ho={key:2,flex:"","justify-center":""},co=["disabled"],uo=Lt({__name:"Export",props:{rank:null},setup(at){const it=at,et=je.useToast(),{copy:w,isSupported:B}=Be(),P=kt(()=>it.rank),$=_t({value:"cf-dat",text:"Codeforces Gym Ghost(dat)"}),q=_t([{value:"cf-dat",text:"Codeforces Gym Ghost(dat)"},{value:"general-xlsx",text:"Excel Table(xlsx)"},{value:"icpc-standings-csv",text:"ICPC Standings(csv)"}]),J=_t({CfDatDownload:!1,CfDatCopy:!1,GeneralXLSXDownload:!1,ICPCStandingsCsvDownload:!1});async function Y(){await De(),await to(16)}async function X(){J.value.CfDatDownload=!0,await Y();const v=new ve().convert(P.value),_=new Blob([v],{type:"text/plain;charset=utf-8"});Se.saveAs(_,"contest.dat"),J.value.CfDatDownload=!1}async function C(){if(!B.value){et.warning("clipboard is not supported");return}J.value.CfDatCopy=!0,await Y();const v=new ve().convert(P.value);w(v),J.value.CfDatCopy=!1,et.success("Copy Success")}async function R(){J.value.GeneralXLSXDownload=!0,await Y(),new oi().convertAndWrite(P.value,`${P.value.contest.name}.xlsx`),J.value.GeneralXLSXDownload=!1}async function N(){J.value.ICPCStandingsCsvDownload=!0,await Y();const v=new ni().convert(P.value),_=new Blob([v],{type:"text/csv;charset=utf-8"});Se.saveAs(_,"standings.csv"),J.value.ICPCStandingsCsvDownload=!1}return(x,v)=>(ut(),ft("div",eo,[Z("div",io,[Ct(U(Hi),{modelValue:U($),"onUpdate:modelValue":v[0]||(v[0]=_=>zt($)?$.value=_:null),options:U(q),placeholder:"Export Type"},null,8,["modelValue","options"])]),Z("div",so,[U($).value==="cf-dat"?(ut(),ft("div",oo,[Z("button",{disabled:U(J).CfDatDownload,btn:"",onClick:X}," Download ",8,no),Z("button",{disabled:U(J).CfDatCopy,btn:"",onClick:C}," Copy to Clipboard ",8,ro)])):bt("",!0),U($).value==="general-xlsx"?(ut(),ft("div",ao,[Z("button",{disabled:U(J).GeneralXLSXDownload,btn:"",onClick:R}," Download ",8,lo)])):bt("",!0),U($).value==="icpc-standings-csv"?(ut(),ft("div",ho,[Z("button",{disabled:U(J).ICPCStandingsCsvDownload,btn:"",onClick:N}," Download ",8,co)])):bt("",!0)])]))}});function ge(at,it,et,w,B,P){return{colors:P,chart:window.innerWidth<992?{type:"bar",backgroundColor:"transparent"}:{type:"column",backgroundColor:"transparent",height:"420px"},title:{text:at},xAxis:{categories:w,labels:{style:{fontSize:"16px"}},title:{text:it,style:{fontSize:"16px"}}},yAxis:{min:0,title:{text:et,style:{fontSize:"16px",height:"320px"}},stackLabels:{enabled:!0,style:{fontSize:"16px"}}},tooltip:{enabled:!0,headerFormat:"",pointFormat:"{series.name}:{point.y}"},plotOptions:{bar:{stacking:"normal"},column:{stacking:"normal"}},credits:{enabled:!1},series:B}}function po(at){const it=[];at.contest.problems.forEach((P,$)=>{it.push({problem_id:P.label,index:$,solved:P.statistics.acceptedNum})}),it.sort((P,$)=>P.solved>$.solved?-1:P.solved<$.solved?1:P.index<$.index?-1:P.index>$.index?1:0);const{cat:et,series:w,colors:B}=(()=>{const P=[],$=[];return it.forEach(Y=>{P.push(Y.problem_id),$.push(Y.solved)}),{cat:P,series:[{name:"队伍数",showInLegend:!1,data:$}],colors:["rgb(124, 181, 236)"]}})();return ge("题目通过数","题目编号","通过数",et,w,B)}function fo(at){const it=at.rankStatistics.teamSolvedNum.map((P,$)=>({index:$,cnt:P})),{cat:et,series:w,colors:B}=(()=>{const P=[],$=[];return it.forEach(Y=>{P.push(Y.index),$.push(Y.cnt)}),{cat:P,series:[{name:"队伍数",showInLegend:!1,data:$}],colors:["rgb(124, 181, 236)"]}})();return ge("队伍过题数","过题数","队伍数",et,w,B)}function mo(at){const{cat:it,series:et,colors:w}=(()=>{const B=[],P=[],$=[],q=[];return at.contest.problems.forEach(X=>{P.push(X.statistics.acceptedNum),$.push(X.statistics.rejectedNum),q.push(X.statistics.pendingNum),B.push(X.label)}),{cat:B,series:[{name:"Accepted",showInLegend:!1,data:P},{name:"Rejected",showInLegend:!1,data:$},{name:"Pending",showInLegend:!1,data:q}],colors:["#E1FFB5","#FFD0D0","#C8D6FA"]}})();return ge("提交分类","题目编号","提交数",it,et,w)}function go(at,it){const et=it.placeChartPoints.map(B=>{var P,$;return{x:B.timePoint,y:B.rank,showX:ze(B.timePoint),lastSolved:(P=B.lastSolvedProblem)!=null&&P.label?`Last Solved Problem ${($=B.lastSolvedProblem)==null?void 0:$.label}`:""}});return{chart:{type:"spline"},title:{text:"排名变化趋势图"},series:[{showInLegend:!1,allowPointSelect:!1,name:"rank",type:"spline",data:et,marker:{symbol:"circle",radius:4,lineWidth:2,fillColor:"yellow",lineColor:"yellow"}}],xAxis:[{allowDecimals:!1,title:{text:"Time(min)"},crosshair:!0}],yAxis:[{allowDecimals:!1,title:{text:"Place"},reversed:!0,gridLineWidth:1}],plotOptions:{line:{color:"#efbc47",dataLabels:{enabled:!1},enableMouseTracking:!0,marker:{enabled:!0,fillColor:"#fff566"}}},tooltip:{enabled:!0,headerFormat:"",pointFormat:"Time: {point.showX} <br/> Place: {point.y} <br/> {point.lastSolved}"},credits:{enabled:!1},exporting:{enabled:!0},navigation:{menuItemStyle:{fontSize:"10px"}}}}var Xe={exports:{}},ue={exports:{}},we;function xo(){return we||(we=1,function(at){(function(it,et){at.exports?(et.default=et,at.exports=it.document?et(it):et):(it.Highcharts&&it.Highcharts.error(16,!0),it.Highcharts=et(it))})(typeof window<"u"?window:Qt,function(it){function et(B,P,$,q){B.hasOwnProperty(P)||(B[P]=q.apply(null,$),typeof CustomEvent=="function"&&it.dispatchEvent(new CustomEvent("HighchartsModuleLoaded",{detail:{path:P,module:B[P]}})))}var w={};return et(w,"Core/Globals.js",[],function(){var B;return function(P){P.SVG_NS="http://www.w3.org/2000/svg",P.product="Highcharts",P.version="11.1.0",P.win=typeof it<"u"?it:{},P.doc=P.win.document,P.svg=P.doc&&P.doc.createElementNS&&!!P.doc.createElementNS(P.SVG_NS,"svg").createSVGRect,P.userAgent=P.win.navigator&&P.win.navigator.userAgent||"",P.isChrome=P.userAgent.indexOf("Chrome")!==-1,P.isFirefox=P.userAgent.indexOf("Firefox")!==-1,P.isMS=/(edge|msie|trident)/i.test(P.userAgent)&&!P.win.opera,P.isSafari=!P.isChrome&&P.userAgent.indexOf("Safari")!==-1,P.isTouchDevice=/(Mobile|Android|Windows Phone)/.test(P.userAgent),P.isWebKit=P.userAgent.indexOf("AppleWebKit")!==-1,P.deg2rad=2*Math.PI/360,P.hasBidiBug=P.isFirefox&&4>parseInt(P.userAgent.split("Firefox/")[1],10),P.hasTouch=!!P.win.TouchEvent,P.marginNames=["plotTop","marginRight","marginBottom","plotLeft"],P.noop=function(){},P.supportsPassiveEvents=function(){let $=!1;if(!P.isMS){const q=Object.defineProperty({},"passive",{get:function(){$=!0}});P.win.addEventListener&&P.win.removeEventListener&&(P.win.addEventListener("testPassive",P.noop,q),P.win.removeEventListener("testPassive",P.noop,q))}return $}(),P.charts=[],P.dateFormats={},P.seriesTypes={},P.symbolSizes={},P.chartCount=0}(B||(B={})),B}),et(w,"Core/Utilities.js",[w["Core/Globals.js"]],function(B){function P(t,i,l,p){const E=i?"Highcharts error":"Highcharts warning";t===32&&(t=`${E}: Deprecated member`);const a=R(t);let L=a?`${E} #${t}: www.highcharts.com/errors/${t}/`:t.toString();if(typeof p<"u"){let W="";a&&(L+="?"),O(p,function(Q,nt){W+=`
2
2
  - ${nt}: ${Q}`,a&&(L+=encodeURI(nt)+"="+encodeURI(Q))}),L+=W}S(B,"displayError",{chart:l,code:t,message:L,params:p},function(){if(i)throw Error(L);u.console&&P.messages.indexOf(L)===-1&&console.warn(L)}),P.messages.push(L)}function $(t,i){return parseInt(t,i||10)}function q(t){return typeof t=="string"}function J(t){return t=Object.prototype.toString.call(t),t==="[object Array]"||t==="[object Array Iterator]"}function Y(t,i){return!!t&&typeof t=="object"&&(!i||!J(t))}function X(t){return Y(t)&&typeof t.nodeType=="number"}function C(t){const i=t&&t.constructor;return!(!Y(t,!0)||X(t)||!i||!i.name||i.name==="Object")}function R(t){return typeof t=="number"&&!isNaN(t)&&1/0>t&&-1/0<t}function N(t){return typeof t<"u"&&t!==null}function x(t,i,l){const p=q(i)&&!N(l);let E;const a=(L,W)=>{N(L)?t.setAttribute(W,L):p?(E=t.getAttribute(W))||W!=="class"||(E=t.getAttribute(W+"Name")):t.removeAttribute(W)};return q(i)?a(l,i):O(i,a),E}function v(t){return J(t)?t:[t]}function _(t,i){let l;t||(t={});for(l in i)t[l]=i[l];return t}function A(){const t=arguments,i=t.length;for(let l=0;l<i;l++){const p=t[l];if(typeof p<"u"&&p!==null)return p}}function c(t,i){B.isMS&&!B.svg&&i&&N(i.opacity)&&(i.filter=`alpha(opacity=${100*i.opacity})`),_(t.style,i)}function y(t){return Math.pow(10,Math.floor(Math.log(t)/Math.LN10))}function k(t,i){return 1e14<t?t:parseFloat(t.toPrecision(i||14))}function g(t,i,l){let p;return i==="width"?(i=Math.min(t.offsetWidth,t.scrollWidth),l=t.getBoundingClientRect&&t.getBoundingClientRect().width,l<i&&l>=i-1&&(i=Math.floor(l)),Math.max(0,i-(g(t,"padding-left",!0)||0)-(g(t,"padding-right",!0)||0))):i==="height"?Math.max(0,Math.min(t.offsetHeight,t.scrollHeight)-(g(t,"padding-top",!0)||0)-(g(t,"padding-bottom",!0)||0)):((t=u.getComputedStyle(t,void 0))&&(p=t.getPropertyValue(i),A(l,i!=="opacity")&&(p=$(p))),p)}function O(t,i,l){for(const p in t)Object.hasOwnProperty.call(t,p)&&i.call(l||t[p],t[p],p,t)}function b(t,i,l){function p(L,W){const Q=t.removeEventListener;Q&&Q.call(t,L,W,!1)}function E(L){let W,Q;t.nodeName&&(i?(W={},W[i]=!0):W=L,O(W,function(nt,D){if(L[D])for(Q=L[D].length;Q--;)p(D,L[D][Q].fn)}))}var a=typeof t=="function"&&t.prototype||t;if(Object.hasOwnProperty.call(a,"hcEvents")){const L=a.hcEvents;i?(a=L[i]||[],l?(L[i]=a.filter(function(W){return l!==W.fn}),p(i,l)):(E(L),L[i]=[])):(E(L),delete a.hcEvents)}}function S(t,i,l,p){if(l=l||{},r.createEvent&&(t.dispatchEvent||t.fireEvent&&t!==B)){var E=r.createEvent("Events");E.initEvent(i,!0,!0),l=_(E,l),t.dispatchEvent?t.dispatchEvent(l):t.fireEvent(i,l)}else if(t.hcEvents){l.target||_(l,{preventDefault:function(){l.defaultPrevented=!0},target:t,type:i}),E=[];let a=t,L=!1;for(;a.hcEvents;)Object.hasOwnProperty.call(a,"hcEvents")&&a.hcEvents[i]&&(E.length&&(L=!0),E.unshift.apply(E,a.hcEvents[i])),a=Object.getPrototypeOf(a);L&&E.sort((W,Q)=>W.order-Q.order),E.forEach(W=>{W.fn.call(t,l)===!1&&l.preventDefault()})}p&&!l.defaultPrevented&&p.call(t,l)}const{charts:o,doc:r,win:u}=B;(P||(P={})).messages=[],Math.easeInOutSine=function(t){return-.5*(Math.cos(Math.PI*t)-1)};var h=Array.prototype.find?function(t,i){return t.find(i)}:function(t,i){let l;const p=t.length;for(l=0;l<p;l++)if(i(t[l],l))return t[l]};O({map:"map",each:"forEach",grep:"filter",reduce:"reduce",some:"some"},function(t,i){B[i]=function(l){return P(32,!1,void 0,{[`Highcharts.${i}`]:`use Array.${t}`}),Array.prototype[t].apply(l,[].slice.call(arguments,1))}});let d;const e=function(){const t=Math.random().toString(36).substring(2,9)+"-";let i=0;return function(){return"highcharts-"+(d?"":t)+i++}}();return u.jQuery&&(u.jQuery.fn.highcharts=function(){const t=[].slice.call(arguments);if(this[0])return t[0]?(new B[q(t[0])?t.shift():"Chart"](this[0],t[0],t[1]),this):o[x(this[0],"data-highcharts-chart")]}),h={addEvent:function(t,i,l,p={}){var E=typeof t=="function"&&t.prototype||t;Object.hasOwnProperty.call(E,"hcEvents")||(E.hcEvents={}),E=E.hcEvents,B.Point&&t instanceof B.Point&&t.series&&t.series.chart&&(t.series.chart.runTrackerClick=!0);const a=t.addEventListener;return a&&a.call(t,i,l,B.supportsPassiveEvents?{passive:p.passive===void 0?i.indexOf("touch")!==-1:p.passive,capture:!1}:!1),E[i]||(E[i]=[]),E[i].push({fn:l,order:typeof p.order=="number"?p.order:1/0}),E[i].sort((L,W)=>L.order-W.order),function(){b(t,i,l)}},arrayMax:function(t){let i=t.length,l=t[0];for(;i--;)t[i]>l&&(l=t[i]);return l},arrayMin:function(t){let i=t.length,l=t[0];for(;i--;)t[i]<l&&(l=t[i]);return l},attr:x,clamp:function(t,i,l){return t>i?t<l?t:l:i},clearTimeout:function(t){N(t)&&clearTimeout(t)},correctFloat:k,createElement:function(t,i,l,p,E){return t=r.createElement(t),i&&_(t,i),E&&c(t,{padding:"0",border:"none",margin:"0"}),l&&c(t,l),p&&p.appendChild(t),t},css:c,defined:N,destroyObjectProperties:function(t,i){O(t,function(l,p){l&&l!==i&&l.destroy&&l.destroy(),delete t[p]})},diffObjects:function(t,i,l,p){function E(L,W,Q,nt){const D=l?W:L;O(L,function(s,M){if(!nt&&p&&-1<p.indexOf(M)&&W[M]){s=v(s),Q[M]=[];for(let z=0;z<Math.max(s.length,W[M].length);z++)W[M][z]&&(s[z]===void 0?Q[M][z]=W[M][z]:(Q[M][z]={},E(s[z],W[M][z],Q[M][z],nt+1)))}else Y(s,!0)&&!s.nodeType?(Q[M]=J(s)?[]:{},E(s,W[M]||{},Q[M],nt+1),Object.keys(Q[M]).length!==0||M==="colorAxis"&&nt===0||delete Q[M]):(L[M]!==W[M]||M in L&&!(M in W))&&(Q[M]=D[M])})}const a={};return E(t,i,a,0),a},discardElement:function(t){t&&t.parentElement&&t.parentElement.removeChild(t)},erase:function(t,i){let l=t.length;for(;l--;)if(t[l]===i){t.splice(l,1);break}},error:P,extend:_,extendClass:function(t,i){const l=function(){};return l.prototype=new t,_(l.prototype,i),l},find:h,fireEvent:S,getClosestDistance:function(t,i){const l=!i;let p,E,a;return t.forEach(L=>{if(1<L.length)for(a=L.length-1;0<a;a--)E=L[a]-L[a-1],0>E&&!l?(i==null||i(),i=void 0):E&&(typeof p>"u"||E<p)&&(p=E)}),p},getMagnitude:y,getNestedProperty:function(t,i){for(t=t.split(".");t.length&&N(i);){const l=t.shift();if(typeof l>"u"||l==="__proto__")return;if(l==="this"){let p;return Y(i)&&(p=i["@this"]),p??i}if(i=i[l],!N(i)||typeof i=="function"||typeof i.nodeType=="number"||i===u)return}return i},getStyle:g,inArray:function(t,i,l){return P(32,!1,void 0,{"Highcharts.inArray":"use Array.indexOf"}),i.indexOf(t,l)},insertItem:function(t,i){const l=t.options.index,p=i.length;let E;for(E=t.options.isInternal?p:0;E<p+1;E++)if(!i[E]||R(l)&&l<A(i[E].options.index,i[E]._i)||i[E].options.isInternal){i.splice(E,0,t);break}return E},isArray:J,isClass:C,isDOMElement:X,isFunction:function(t){return typeof t=="function"},isNumber:R,isObject:Y,isString:q,keys:function(t){return P(32,!1,void 0,{"Highcharts.keys":"use Object.keys"}),Object.keys(t)},merge:function(){let t,i=arguments,l={};const p=function(a,L){return typeof a!="object"&&(a={}),O(L,function(W,Q){Q!=="__proto__"&&Q!=="constructor"&&(!Y(W,!0)||C(W)||X(W)?a[Q]=L[Q]:a[Q]=p(a[Q]||{},W))}),a};i[0]===!0&&(l=i[1],i=Array.prototype.slice.call(i,2));const E=i.length;for(t=0;t<E;t++)l=p(l,i[t]);return l},normalizeTickInterval:function(t,i,l,p,E){let a=t;l=A(l,y(t));const L=t/l;for(i||(i=E?[1,1.2,1.5,2,2.5,3,4,5,6,8,10]:[1,2,2.5,5,10],p===!1&&(l===1?i=i.filter(function(W){return W%1===0}):.1>=l&&(i=[1/l]))),p=0;p<i.length&&(a=i[p],!(E&&a*l>=t||!E&&L<=(i[p]+(i[p+1]||i[p]))/2));p++);return a=k(a*l,-Math.round(Math.log(.001)/Math.LN10))},objectEach:O,offset:function(t){const i=r.documentElement;return t=t.parentElement||t.parentNode?t.getBoundingClientRect():{top:0,left:0,width:0,height:0},{top:t.top+(u.pageYOffset||i.scrollTop)-(i.clientTop||0),left:t.left+(u.pageXOffset||i.scrollLeft)-(i.clientLeft||0),width:t.width,height:t.height}},pad:function(t,i,l){return Array((i||2)+1-String(t).replace("-","").length).join(l||"0")+t},pick:A,pInt:$,pushUnique:function(t,i){return 0>t.indexOf(i)&&!!t.push(i)},relativeLength:function(t,i,l){return/%$/.test(t)?i*parseFloat(t)/100+(l||0):parseFloat(t)},removeEvent:b,splat:v,stableSort:function(t,i){const l=t.length;let p,E;for(E=0;E<l;E++)t[E].safeI=E;for(t.sort(function(a,L){return p=i(a,L),p===0?a.safeI-L.safeI:p}),E=0;E<l;E++)delete t[E].safeI},syncTimeout:function(t,i,l){return 0<i?setTimeout(t,i,l):(t.call(0,l),-1)},timeUnits:{millisecond:1,second:1e3,minute:6e4,hour:36e5,day:864e5,week:6048e5,month:24192e5,year:314496e5},uniqueKey:e,useSerialIds:function(t){return d=A(t,d)},wrap:function(t,i,l){const p=t[i];t[i]=function(){const E=arguments,a=this;return l.apply(this,[function(){return p.apply(a,arguments.length?arguments:E)}].concat([].slice.call(arguments)))}}},h}),et(w,"Core/Chart/ChartDefaults.js",[],function(){return{alignThresholds:!1,panning:{enabled:!1,type:"x"},styledMode:!1,borderRadius:0,colorCount:10,allowMutatingData:!0,ignoreHiddenSeries:!0,spacing:[10,10,15,10],resetZoomButton:{theme:{zIndex:6},position:{align:"right",x:-10,y:10}},reflow:!0,type:"line",zooming:{singleTouch:!1,resetButton:{theme:{zIndex:6},position:{align:"right",x:-10,y:10}}},width:null,height:null,borderColor:"#334eff",backgroundColor:"#ffffff",plotBorderColor:"#cccccc"}}),et(w,"Core/Color/Color.js",[w["Core/Globals.js"],w["Core/Utilities.js"]],function(B,P){const{isNumber:$,merge:q,pInt:J}=P;class Y{static parse(C){return C?new Y(C):Y.None}constructor(C){this.rgba=[NaN,NaN,NaN,NaN],this.input=C;const R=B.Color;if(R&&R!==Y)return new R(C);this.init(C)}init(C){let R,N;if(typeof C=="object"&&typeof C.stops<"u")this.stops=C.stops.map(_=>new Y(_[1]));else if(typeof C=="string"){if(this.input=C=Y.names[C.toLowerCase()]||C,C.charAt(0)==="#"){var x=C.length,v=parseInt(C.substr(1),16);x===7?R=[(v&16711680)>>16,(v&65280)>>8,v&255,1]:x===4&&(R=[(v&3840)>>4|(v&3840)>>8,(v&240)>>4|v&240,(v&15)<<4|v&15,1])}if(!R)for(v=Y.parsers.length;v--&&!R;)N=Y.parsers[v],(x=N.regex.exec(C))&&(R=N.parse(x))}R&&(this.rgba=R)}get(C){const R=this.input,N=this.rgba;if(typeof R=="object"&&typeof this.stops<"u"){const x=q(R);return x.stops=[].slice.call(x.stops),this.stops.forEach((v,_)=>{x.stops[_]=[x.stops[_][0],v.get(C)]}),x}return N&&$(N[0])?C==="rgb"||!C&&N[3]===1?"rgb("+N[0]+","+N[1]+","+N[2]+")":C==="a"?`${N[3]}`:"rgba("+N.join(",")+")":R}brighten(C){const R=this.rgba;if(this.stops)this.stops.forEach(function(N){N.brighten(C)});else if($(C)&&C!==0)for(let N=0;3>N;N++)R[N]+=J(255*C),0>R[N]&&(R[N]=0),255<R[N]&&(R[N]=255);return this}setOpacity(C){return this.rgba[3]=C,this}tweenTo(C,R){const N=this.rgba,x=C.rgba;return!$(N[0])||!$(x[0])?C.input||"none":(C=x[3]!==1||N[3]!==1,(C?"rgba(":"rgb(")+Math.round(x[0]+(N[0]-x[0])*(1-R))+","+Math.round(x[1]+(N[1]-x[1])*(1-R))+","+Math.round(x[2]+(N[2]-x[2])*(1-R))+(C?","+(x[3]+(N[3]-x[3])*(1-R)):"")+")")}}return Y.names={white:"#ffffff",black:"#000000"},Y.parsers=[{regex:/rgba\(\s*([0-9]{1,3})\s*,\s*([0-9]{1,3})\s*,\s*([0-9]{1,3})\s*,\s*([0-9]?(?:\.[0-9]+)?)\s*\)/,parse:function(X){return[J(X[1]),J(X[2]),J(X[3]),parseFloat(X[4],10)]}},{regex:/rgb\(\s*([0-9]{1,3})\s*,\s*([0-9]{1,3})\s*,\s*([0-9]{1,3})\s*\)/,parse:function(X){return[J(X[1]),J(X[2]),J(X[3]),1]}}],Y.None=new Y(""),Y}),et(w,"Core/Color/Palettes.js",[],function(){return{colors:"#2caffe #544fc5 #00e272 #fe6a35 #6b8abc #d568fb #2ee0ca #fa4b42 #feb56a #91e8e1".split(" ")}}),et(w,"Core/Time.js",[w["Core/Globals.js"],w["Core/Utilities.js"]],function(B,P){const{win:$}=B,{defined:q,error:J,extend:Y,isObject:X,merge:C,objectEach:R,pad:N,pick:x,splat:v,timeUnits:_}=P,A=B.isSafari&&$.Intl&&$.Intl.DateTimeFormat.prototype.formatRange,c=B.isSafari&&$.Intl&&!$.Intl.DateTimeFormat.prototype.formatRange;class y{constructor(g){this.options={},this.variableTimezone=this.useUTC=!1,this.Date=$.Date,this.getTimezoneOffset=this.timezoneOffsetFunction(),this.update(g)}get(g,O){if(this.variableTimezone||this.timezoneOffset){const b=O.getTime(),S=b-this.getTimezoneOffset(O);return O.setTime(S),g=O["getUTC"+g](),O.setTime(b),g}return this.useUTC?O["getUTC"+g]():O["get"+g]()}set(g,O,b){if(this.variableTimezone||this.timezoneOffset){if(g==="Milliseconds"||g==="Seconds"||g==="Minutes"&&this.getTimezoneOffset(O)%36e5===0)return O["setUTC"+g](b);var S=this.getTimezoneOffset(O);return S=O.getTime()-S,O.setTime(S),O["setUTC"+g](b),g=this.getTimezoneOffset(O),S=O.getTime()+g,O.setTime(S)}return this.useUTC||A&&g==="FullYear"?O["setUTC"+g](b):O["set"+g](b)}update(g={}){const O=x(g.useUTC,!0);this.options=g=C(!0,this.options,g),this.Date=g.Date||$.Date||Date,this.timezoneOffset=(this.useUTC=O)&&g.timezoneOffset||void 0,this.getTimezoneOffset=this.timezoneOffsetFunction(),this.variableTimezone=O&&!(!g.getTimezoneOffset&&!g.timezone)}makeTime(g,O,b,S,o,r){let u,h,d;return this.useUTC?(u=this.Date.UTC.apply(0,arguments),h=this.getTimezoneOffset(u),u+=h,d=this.getTimezoneOffset(u),h!==d?u+=d-h:h-36e5!==this.getTimezoneOffset(u-36e5)||c||(u-=36e5)):u=new this.Date(g,O,x(b,1),x(S,0),x(o,0),x(r,0)).getTime(),u}timezoneOffsetFunction(){const g=this,O=this.options,b=O.getTimezoneOffset,S=O.moment||$.moment;if(!this.useUTC)return function(o){return 6e4*new Date(o.toString()).getTimezoneOffset()};if(O.timezone){if(S)return function(o){return 6e4*-S.tz(o,O.timezone).utcOffset()};J(25)}return this.useUTC&&b?function(o){return 6e4*b(o.valueOf())}:function(){return 6e4*(g.timezoneOffset||0)}}dateFormat(g,O,b){if(!q(O)||isNaN(O))return B.defaultOptions.lang&&B.defaultOptions.lang.invalidDate||"";g=x(g,"%Y-%m-%d %H:%M:%S");const S=this;var o=new this.Date(O);const r=this.get("Hours",o),u=this.get("Day",o),h=this.get("Date",o),d=this.get("Month",o),e=this.get("FullYear",o),t=B.defaultOptions.lang,i=t&&t.weekdays,l=t&&t.shortWeekdays;return o=Y({a:l?l[u]:i[u].substr(0,3),A:i[u],d:N(h),e:N(h,2," "),w:u,b:t.shortMonths[d],B:t.months[d],m:N(d+1),o:d+1,y:e.toString().substr(2,2),Y:e,H:N(r),k:r,I:N(r%12||12),l:r%12||12,M:N(this.get("Minutes",o)),p:12>r?"AM":"PM",P:12>r?"am":"pm",S:N(o.getSeconds()),L:N(Math.floor(O%1e3),3)},B.dateFormats),R(o,function(p,E){for(;g.indexOf("%"+E)!==-1;)g=g.replace("%"+E,typeof p=="function"?p.call(S,O):p)}),b?g.substr(0,1).toUpperCase()+g.substr(1):g}resolveDTLFormat(g){return X(g,!0)?g:(g=v(g),{main:g[0],from:g[1],to:g[2]})}getTimeTicks(g,O,b,S){const o=this,r=[],u={};var h=new o.Date(O);const d=g.unitRange,e=g.count||1;let t;if(S=x(S,1),q(O)){if(o.set("Milliseconds",h,d>=_.second?0:e*Math.floor(o.get("Milliseconds",h)/e)),d>=_.second&&o.set("Seconds",h,d>=_.minute?0:e*Math.floor(o.get("Seconds",h)/e)),d>=_.minute&&o.set("Minutes",h,d>=_.hour?0:e*Math.floor(o.get("Minutes",h)/e)),d>=_.hour&&o.set("Hours",h,d>=_.day?0:e*Math.floor(o.get("Hours",h)/e)),d>=_.day&&o.set("Date",h,d>=_.month?1:Math.max(1,e*Math.floor(o.get("Date",h)/e))),d>=_.month){o.set("Month",h,d>=_.year?0:e*Math.floor(o.get("Month",h)/e));var i=o.get("FullYear",h)}d>=_.year&&o.set("FullYear",h,i-i%e),d===_.week&&(i=o.get("Day",h),o.set("Date",h,o.get("Date",h)-i+S+(i<S?-7:0))),i=o.get("FullYear",h),S=o.get("Month",h);const l=o.get("Date",h),p=o.get("Hours",h);for(O=h.getTime(),!o.variableTimezone&&o.useUTC||!q(b)||(t=b-O>4*_.month||o.getTimezoneOffset(O)!==o.getTimezoneOffset(b)),O=h.getTime(),h=1;O<b;)r.push(O),O=d===_.year?o.makeTime(i+h*e,0):d===_.month?o.makeTime(i,S+h*e):!t||d!==_.day&&d!==_.week?t&&d===_.hour&&1<e?o.makeTime(i,S,l,p+h*e):O+d*e:o.makeTime(i,S,l+h*e*(d===_.day?1:7)),h++;r.push(O),d<=_.hour&&1e4>r.length&&r.forEach(function(E){E%18e5===0&&o.dateFormat("%H%M%S%L",E)==="000000000"&&(u[E]="day")})}return r.info=Y(g,{higherRanks:u,totalRange:d*e}),r}getDateFormat(g,O,b,S){const o=this.dateFormat("%m-%d %H:%M:%S.%L",O),r={millisecond:15,second:12,minute:9,hour:6,day:3};let u,h="millisecond";for(u in _){if(g===_.week&&+this.dateFormat("%w",O)===b&&o.substr(6)==="00:00:00.000"){u="week";break}if(_[u]>g){u=h;break}if(r[u]&&o.substr(r[u])!=="01-01 00:00:00.000".substr(r[u]))break;u!=="week"&&(h=u)}return this.resolveDTLFormat(S[u]).main}}return y}),et(w,"Core/Defaults.js",[w["Core/Chart/ChartDefaults.js"],w["Core/Color/Color.js"],w["Core/Globals.js"],w["Core/Color/Palettes.js"],w["Core/Time.js"],w["Core/Utilities.js"]],function(B,P,$,q,J,Y){const{isTouchDevice:X,svg:C}=$,{merge:R}=Y,N={colors:q.colors,symbols:["circle","diamond","square","triangle","triangle-down"],lang:{loading:"Loading...",months:"January February March April May June July August September October November December".split(" "),shortMonths:"Jan Feb Mar Apr May Jun Jul Aug Sep Oct Nov Dec".split(" "),weekdays:"Sunday Monday Tuesday Wednesday Thursday Friday Saturday".split(" "),decimalPoint:".",numericSymbols:"kMGTPE".split(""),resetZoom:"Reset zoom",resetZoomTitle:"Reset zoom level 1:1",thousandsSep:" "},global:{},time:{Date:void 0,getTimezoneOffset:void 0,timezone:void 0,timezoneOffset:0,useUTC:!0},chart:B,title:{style:{color:"#333333",fontWeight:"bold"},text:"Chart title",align:"center",margin:15,widthAdjust:-44},subtitle:{style:{color:"#666666",fontSize:"0.8em"},text:"",align:"center",widthAdjust:-44},caption:{margin:15,style:{color:"#666666",fontSize:"0.8em"},text:"",align:"left",verticalAlign:"bottom"},plotOptions:{},legend:{enabled:!0,align:"center",alignColumns:!0,className:"highcharts-no-tooltip",layout:"horizontal",itemMarginBottom:2,itemMarginTop:2,labelFormatter:function(){return this.name},borderColor:"#999999",borderRadius:0,navigation:{style:{fontSize:"0.8em"},activeColor:"#0022ff",inactiveColor:"#cccccc"},itemStyle:{color:"#333333",cursor:"pointer",fontSize:"0.8em",textDecoration:"none",textOverflow:"ellipsis"},itemHoverStyle:{color:"#000000"},itemHiddenStyle:{color:"#666666",textDecoration:"line-through"},shadow:!1,itemCheckboxStyle:{position:"absolute",width:"13px",height:"13px"},squareSymbol:!0,symbolPadding:5,verticalAlign:"bottom",x:0,y:0,title:{style:{fontSize:"0.8em",fontWeight:"bold"}}},loading:{labelStyle:{fontWeight:"bold",position:"relative",top:"45%"},style:{position:"absolute",backgroundColor:"#ffffff",opacity:.5,textAlign:"center"}},tooltip:{enabled:!0,animation:C,borderRadius:3,dateTimeLabelFormats:{millisecond:"%A, %e %b, %H:%M:%S.%L",second:"%A, %e %b, %H:%M:%S",minute:"%A, %e %b, %H:%M",hour:"%A, %e %b, %H:%M",day:"%A, %e %b %Y",week:"Week from %A, %e %b %Y",month:"%B %Y",year:"%Y"},footerFormat:"",headerShape:"callout",hideDelay:500,padding:8,shape:"callout",shared:!1,snap:X?25:10,headerFormat:'<span style="font-size: 0.8em">{point.key}</span><br/>',pointFormat:'<span style="color:{point.color}">●</span> {series.name}: <b>{point.y}</b><br/>',backgroundColor:"#ffffff",borderWidth:void 0,shadow:!0,stickOnContact:!1,style:{color:"#333333",cursor:"default",fontSize:"0.8em"},useHTML:!1},credits:{enabled:!0,href:"https://www.highcharts.com?credits",position:{align:"right",x:-10,verticalAlign:"bottom",y:-5},style:{cursor:"pointer",color:"#999999",fontSize:"0.6em"},text:"Highcharts.com"}};N.chart.styledMode=!1;const x=new J(N.time);return B={defaultOptions:N,defaultTime:x,getOptions:function(){return N},setOptions:function(v){return R(!0,N,v),(v.time||v.global)&&($.time?$.time.update(R(N.global,N.time,v.global,v.time)):$.time=x),N}},B}),et(w,"Core/Animation/Fx.js",[w["Core/Color/Color.js"],w["Core/Globals.js"],w["Core/Utilities.js"]],function(B,P,$){const{parse:q}=B,{win:J}=P,{isNumber:Y,objectEach:X}=$;class C{constructor(N,x,v){this.pos=NaN,this.options=x,this.elem=N,this.prop=v}dSetter(){var N=this.paths;const x=N&&N[0];N=N&&N[1];const v=this.now||0;let _=[];if(v!==1&&x&&N)if(x.length===N.length&&1>v)for(let A=0;A<N.length;A++){const c=x[A],y=N[A],k=[];for(let g=0;g<y.length;g++){const O=c[g],b=y[g];Y(O)&&Y(b)&&(y[0]!=="A"||g!==4&&g!==5)?k[g]=O+v*(b-O):k[g]=b}_.push(k)}else _=N;else _=this.toD||[];this.elem.attr("d",_,void 0,!0)}update(){const N=this.elem,x=this.prop,v=this.now,_=this.options.step;this[x+"Setter"]?this[x+"Setter"]():N.attr?N.element&&N.attr(x,v,null,!0):N.style[x]=v+this.unit,_&&_.call(N,v,this)}run(N,x,v){const _=this,A=_.options,c=function(g){return c.stopped?!1:_.step(g)},y=J.requestAnimationFrame||function(g){setTimeout(g,13)},k=function(){for(let g=0;g<C.timers.length;g++)C.timers[g]()||C.timers.splice(g--,1);C.timers.length&&y(k)};N!==x||this.elem["forceAnimate:"+this.prop]?(this.startTime=+new Date,this.start=N,this.end=x,this.unit=v,this.now=this.start,this.pos=0,c.elem=this.elem,c.prop=this.prop,c()&&C.timers.push(c)===1&&y(k)):(delete A.curAnim[this.prop],A.complete&&Object.keys(A.curAnim).length===0&&A.complete.call(this.elem))}step(N){const x=+new Date,v=this.options,_=this.elem,A=v.complete,c=v.duration,y=v.curAnim;let k;return _.attr&&!_.element?N=!1:N||x>=c+this.startTime?(this.now=this.end,this.pos=1,this.update(),k=y[this.prop]=!0,X(y,function(g){g!==!0&&(k=!1)}),k&&A&&A.call(_),N=!1):(this.pos=v.easing((x-this.startTime)/c),this.now=this.start+(this.end-this.start)*this.pos,this.update(),N=!0),N}initPath(N,x,v){function _(o,r){for(;o.length<b;){var u=o[0];const h=r[b-o.length];h&&u[0]==="M"&&(o[0]=h[0]==="C"?["C",u[1],u[2],u[1],u[2],u[1],u[2]]:["L",u[1],u[2]]),o.unshift(u),k&&(u=o.pop(),o.push(o[o.length-1],u))}}function A(o,r){for(;o.length<b;)if(r=o[Math.floor(o.length/g)-1].slice(),r[0]==="C"&&(r[1]=r[5],r[2]=r[6]),k){const u=o[Math.floor(o.length/g)].slice();o.splice(o.length/2,0,r,u)}else o.push(r)}const c=N.startX,y=N.endX;v=v.slice();const k=N.isArea,g=k?2:1;let O,b,S;if(x=x&&x.slice(),!x)return[v,v];if(c&&y&&y.length){for(N=0;N<c.length;N++)if(c[N]===y[0]){O=N;break}else if(c[0]===y[y.length-c.length+N]){O=N,S=!0;break}else if(c[c.length-1]===y[y.length-c.length+N]){O=c.length-N;break}typeof O>"u"&&(x=[])}return x.length&&Y(O)&&(b=v.length+O*g,S?(_(x,v),A(v,x)):(_(v,x),A(x,v))),[x,v]}fillSetter(){C.prototype.strokeSetter.apply(this,arguments)}strokeSetter(){this.elem.attr(this.prop,q(this.start).tweenTo(q(this.end),this.pos),void 0,!0)}}return C.timers=[],C}),et(w,"Core/Animation/AnimationUtilities.js",[w["Core/Animation/Fx.js"],w["Core/Utilities.js"]],function(B,P){function $(_){return R(_)?N({duration:500,defer:0},_):{duration:_?500:0,defer:0}}function q(_,A){let c=B.timers.length;for(;c--;)B.timers[c].elem!==_||A&&A!==B.timers[c].prop||(B.timers[c].stopped=!0)}const{defined:J,getStyle:Y,isArray:X,isNumber:C,isObject:R,merge:N,objectEach:x,pick:v}=P;return{animate:function(_,A,c){let y,k="",g,O,b;R(c)||(b=arguments,c={duration:b[2],easing:b[3],complete:b[4]}),C(c.duration)||(c.duration=400),c.easing=typeof c.easing=="function"?c.easing:Math[c.easing]||Math.easeInOutSine,c.curAnim=N(A),x(A,function(S,o){q(_,o),O=new B(_,c,o),g=void 0,o==="d"&&X(A.d)?(O.paths=O.initPath(_,_.pathArray,A.d),O.toD=A.d,y=0,g=1):_.attr?y=_.attr(o):(y=parseFloat(Y(_,o))||0,o!=="opacity"&&(k="px")),g||(g=S),typeof g=="string"&&g.match("px")&&(g=g.replace(/px/g,"")),O.run(y,g,k)})},animObject:$,getDeferredAnimation:function(_,A,c){const y=$(A);let k=0,g=0;return(c?[c]:_.series).forEach(O=>{O=$(O.options.animation),k=A&&J(A.defer)?y.defer:Math.max(k,O.duration+O.defer),g=Math.min(y.duration,O.duration)}),_.renderer.forExport&&(k=0),{defer:Math.max(0,k-g),duration:Math.min(k,g)}},setAnimation:function(_,A){A.renderer.globalAnimation=v(_,A.options.chart.animation,!0)},stop:q}}),et(w,"Core/Renderer/HTML/AST.js",[w["Core/Globals.js"],w["Core/Utilities.js"]],function(B,P){const{SVG_NS:$,win:q}=B,{attr:J,createElement:Y,css:X,error:C,isFunction:R,isString:N,objectEach:x,splat:v}=P;({trustedTypes:P}=q);const _=P&&R(P.createPolicy)&&P.createPolicy("highcharts",{createHTML:k=>k});P=_?_.createHTML(""):"";try{var A=!!new DOMParser().parseFromString(P,"text/html")}catch{A=!1}const c=A;class y{static filterUserAttributes(g){return x(g,(O,b)=>{let S=!0;y.allowedAttributes.indexOf(b)===-1&&(S=!1),["background","dynsrc","href","lowsrc","src"].indexOf(b)!==-1&&(S=N(O)&&y.allowedReferences.some(o=>O.indexOf(o)===0)),S||(C(33,!1,void 0,{"Invalid attribute in config":`${b}`}),delete g[b]),N(O)&&g[b]&&(g[b]=O.replace(/</g,"&lt;"))}),g}static parseStyle(g){return g.split(";").reduce((O,b)=>{b=b.split(":").map(o=>o.trim());const S=b.shift();return S&&b.length&&(O[S.replace(/-([a-z])/g,o=>o[1].toUpperCase())]=b.join(":")),O},{})}static setElementHTML(g,O){g.innerHTML=y.emptyHTML,O&&new y(O).addToDOM(g)}constructor(g){this.nodes=typeof g=="string"?this.parseMarkup(g):g}addToDOM(g){function O(b,S){let o;return v(b).forEach(function(r){var u=r.tagName;const h=r.textContent?B.doc.createTextNode(r.textContent):void 0,d=y.bypassHTMLFiltering;let e;if(u)if(u==="#text")e=h;else if(y.allowedTags.indexOf(u)!==-1||d){u=B.doc.createElementNS(u==="svg"?$:S.namespaceURI||$,u);const t=r.attributes||{};x(r,function(i,l){l!=="tagName"&&l!=="attributes"&&l!=="children"&&l!=="style"&&l!=="textContent"&&(t[l]=i)}),J(u,d?t:y.filterUserAttributes(t)),r.style&&X(u,r.style),h&&u.appendChild(h),O(r.children||[],u),e=u}else C(33,!1,void 0,{"Invalid tagName in config":u});e&&S.appendChild(e),o=e}),o}return O(this.nodes,g)}parseMarkup(g){const O=[];if(g=g.trim().replace(/ style=(["'])/g," data-style=$1"),c)g=new DOMParser().parseFromString(_?_.createHTML(g):g,"text/html");else{const S=Y("div");S.innerHTML=g,g={body:S}}const b=(S,o)=>{var r=S.nodeName.toLowerCase();const u={tagName:r};if(r==="#text"&&(u.textContent=S.textContent||""),r=S.attributes){const h={};[].forEach.call(r,d=>{d.name==="data-style"?u.style=y.parseStyle(d.value):h[d.name]=d.value}),u.attributes=h}if(S.childNodes.length){const h=[];[].forEach.call(S.childNodes,d=>{b(d,h)}),h.length&&(u.children=h)}o.push(u)};return[].forEach.call(g.body.childNodes,S=>b(S,O)),O}}return y.allowedAttributes="alt aria-controls aria-describedby aria-expanded aria-haspopup aria-hidden aria-label aria-labelledby aria-live aria-pressed aria-readonly aria-roledescription aria-selected class clip-path color colspan cx cy d dx dy disabled fill flood-color flood-opacity height href id in markerHeight markerWidth offset opacity orient padding paddingLeft paddingRight patternUnits r refX refY role scope slope src startOffset stdDeviation stroke stroke-linecap stroke-width style tableValues result rowspan summary target tabindex text-align text-anchor textAnchor textLength title type valign width x x1 x2 xlink:href y y1 y2 zIndex".split(" "),y.allowedReferences="https:// http:// mailto: / ../ ./ #".split(" "),y.allowedTags="a abbr b br button caption circle clipPath code dd defs div dl dt em feComponentTransfer feDropShadow feFuncA feFuncB feFuncG feFuncR feGaussianBlur feOffset feMerge feMergeNode filter h1 h2 h3 h4 h5 h6 hr i img li linearGradient marker ol p path pattern pre rect small span stop strong style sub sup svg table text textPath thead title tbody tspan td th tr u ul #text".split(" "),y.emptyHTML=P,y.bypassHTMLFiltering=!1,y}),et(w,"Core/Templating.js",[w["Core/Defaults.js"],w["Core/Utilities.js"]],function(B,P){function $(c="",y,k){const g=/\{([a-zA-Z0-9:\.,;\-\/<>%_@"'= #\(\)]+)\}/g,O=/\(([a-zA-Z0-9:\.,;\-\/<>%_@"'= ]+)\)/g,b=[],S=/f$/,o=/\.([0-9])/,r=J.lang,u=k&&k.time||Y,h=k&&k.numberFormatter||q,d=(a="")=>{let L;return a==="true"?!0:a==="false"?!1:(L=Number(a)).toString()===a?L:C(a,y)};let e,t,i=0,l;for(;(e=g.exec(c))!==null;){const a=O.exec(e[1]);a&&(e=a,l=!0),t&&t.isBlock||(t={ctx:y,expression:e[1],find:e[0],isBlock:e[1].charAt(0)==="#",start:e.index,startInner:e.index+e[0].length,length:e[0].length});var p=e[1].split(" ")[0].replace("#","");if(A[p]&&(t.isBlock&&p===t.fn&&i++,t.fn||(t.fn=p)),p=e[1]==="else",t.isBlock&&t.fn&&(e[1]===`/${t.fn}`||p))if(i)p||i--;else{var E=t.startInner;E=c.substr(E,e.index-E),t.body===void 0?(t.body=E,t.startInner=e.index+e[0].length):t.elseBody=E,t.find+=E+e[0],p||(b.push(t),t=void 0)}else t.isBlock||b.push(t);if(a&&(t==null||!t.isBlock))break}return b.forEach(a=>{const{body:L,elseBody:W,expression:Q,fn:nt}=a;var D;if(nt){var s=[a],M=Q.split(" ");for(D=A[nt].length;D--;)s.unshift(d(M[D+1]));D=A[nt].apply(y,s),a.isBlock&&typeof D=="boolean"&&(D=$(D?L:W,y))}else s=Q.split(":"),D=d(s.shift()||""),s.length&&typeof D=="number"&&(s=s.join(":"),S.test(s)?(M=parseInt((s.match(o)||["","-1"])[1],10),D!==null&&(D=h(D,M,r.decimalPoint,-1<s.indexOf(",")?r.thousandsSep:""))):D=u.dateFormat(s,D));c=c.replace(a.find,v(D,""))}),l?$(c,y,k):c}function q(c,y,k,g){c=+c||0,y=+y;const O=J.lang;var b=(c.toString().split(".")[1]||"").split("e")[0].length;const S=c.toString().split("e"),o=y;if(y===-1)y=Math.min(b,20);else if(!N(y))y=2;else if(y&&S[1]&&0>S[1]){var r=y+ +S[1];0<=r?(S[0]=(+S[0]).toExponential(r).split("e")[0],y=r):(S[0]=S[0].split(".")[0]||0,c=20>y?(S[0]*Math.pow(10,S[1])).toFixed(y):0,S[1]=0)}r=(Math.abs(S[1]?S[0]:c)+Math.pow(10,-Math.max(y,b)-1)).toFixed(y),b=String(_(r));const u=3<b.length?b.length%3:0;return k=v(k,O.decimalPoint),g=v(g,O.thousandsSep),c=(0>c?"-":"")+(u?b.substr(0,u)+g:""),c=0>+S[1]&&!o?"0":c+b.substr(u).replace(/(\d{3})(?=\d)/g,"$1"+g),y&&(c+=k+r.slice(-y)),S[1]&&+c!=0&&(c+="e"+S[1]),c}const{defaultOptions:J,defaultTime:Y}=B,{extend:X,getNestedProperty:C,isArray:R,isNumber:N,isObject:x,pick:v,pInt:_}=P,A={add:(c,y)=>c+y,divide:(c,y)=>y!==0?c/y:"",eq:(c,y)=>c==y,each:function(c){const y=arguments[arguments.length-1];return R(c)?c.map((k,g)=>$(y.body,X(x(k)?k:{"@this":k},{"@index":g,"@first":g===0,"@last":g===c.length-1}))).join(""):!1},ge:(c,y)=>c>=y,gt:(c,y)=>c>y,if:c=>!!c,le:(c,y)=>c<=y,lt:(c,y)=>c<y,multiply:(c,y)=>c*y,ne:(c,y)=>c!=y,subtract:(c,y)=>c-y,unless:c=>!c};return{dateFormat:function(c,y,k){return Y.dateFormat(c,y,k)},format:$,helpers:A,numberFormat:q}}),et(w,"Core/Renderer/RendererUtilities.js",[w["Core/Utilities.js"]],function(B){const{clamp:P,pick:$,stableSort:q}=B;var J;return function(Y){function X(C,R,N){const x=C;var v=x.reducedLen||R,_=(O,b)=>(b.rank||0)-(O.rank||0);const A=(O,b)=>O.target-b.target;let c,y=!0,k=[],g=0;for(c=C.length;c--;)g+=C[c].size;if(g>v){for(q(C,_),g=c=0;g<=v;)g+=C[c].size,c++;k=C.splice(c-1,C.length)}for(q(C,A),C=C.map(O=>({size:O.size,targets:[O.target],align:$(O.align,.5)}));y;){for(c=C.length;c--;)v=C[c],_=(Math.min.apply(0,v.targets)+Math.max.apply(0,v.targets))/2,v.pos=P(_-v.size*v.align,0,R-v.size);for(c=C.length,y=!1;c--;)0<c&&C[c-1].pos+C[c-1].size>C[c].pos&&(C[c-1].size+=C[c].size,C[c-1].targets=C[c-1].targets.concat(C[c].targets),C[c-1].align=.5,C[c-1].pos+C[c-1].size>R&&(C[c-1].pos=R-C[c-1].size),C.splice(c,1),y=!0)}return x.push.apply(x,k),c=0,C.some(O=>{let b=0;return(O.targets||[]).some(()=>(x[c].pos=O.pos+b,typeof N<"u"&&Math.abs(x[c].pos-x[c].target)>N?(x.slice(0,c+1).forEach(S=>delete S.pos),x.reducedLen=(x.reducedLen||R)-.1*R,x.reducedLen>.1*R&&X(x,R,N),!0):(b+=x[c].size,c++,!1)))}),q(x,A),x}Y.distribute=X}(J||(J={})),J}),et(w,"Core/Renderer/SVG/SVGElement.js",[w["Core/Animation/AnimationUtilities.js"],w["Core/Color/Color.js"],w["Core/Globals.js"],w["Core/Utilities.js"]],function(B,P,$,q){const{animate:J,animObject:Y,stop:X}=B,{deg2rad:C,doc:R,svg:N,SVG_NS:x,win:v}=$,{addEvent:_,attr:A,createElement:c,css:y,defined:k,erase:g,extend:O,fireEvent:b,isArray:S,isFunction:o,isObject:r,isString:u,merge:h,objectEach:d,pick:e,pInt:t,syncTimeout:i,uniqueKey:l}=q;class p{constructor(){this.element=void 0,this.onEvents={},this.opacity=1,this.renderer=void 0,this.SVG_NS=x}_defaultGetter(a){return a=e(this[a+"Value"],this[a],this.element?this.element.getAttribute(a):null,0),/^[\-0-9\.]+$/.test(a)&&(a=parseFloat(a)),a}_defaultSetter(a,L,W){W.setAttribute(L,a)}add(a){const L=this.renderer,W=this.element;let Q;return a&&(this.parentGroup=a),typeof this.textStr<"u"&&this.element.nodeName==="text"&&L.buildText(this),this.added=!0,(!a||a.handleZ||this.zIndex)&&(Q=this.zIndexSetter()),Q||(a?a.element:L.box).appendChild(W),this.onAdd&&this.onAdd(),this}addClass(a,L){const W=L?"":this.attr("class")||"";return a=(a||"").split(/ /g).reduce(function(Q,nt){return W.indexOf(nt)===-1&&Q.push(nt),Q},W?[W]:[]).join(" "),a!==W&&this.attr("class",a),this}afterSetters(){this.doTransform&&(this.updateTransform(),this.doTransform=!1)}align(a,L,W){const Q={};var nt=this.renderer,D=nt.alignedObjects,s;let M,z;a?(this.alignOptions=a,this.alignByTranslate=L,(!W||u(W))&&(this.alignTo=s=W||"renderer",g(D,this),D.push(this),W=void 0)):(a=this.alignOptions,L=this.alignByTranslate,s=this.alignTo),W=e(W,nt[s],s==="scrollablePlotBox"?nt.plotBox:void 0,nt),s=a.align;const j=a.verticalAlign;return nt=(W.x||0)+(a.x||0),D=(W.y||0)+(a.y||0),s==="right"?M=1:s==="center"&&(M=2),M&&(nt+=(W.width-(a.width||0))/M),Q[L?"translateX":"x"]=Math.round(nt),j==="bottom"?z=1:j==="middle"&&(z=2),z&&(D+=(W.height-(a.height||0))/z),Q[L?"translateY":"y"]=Math.round(D),this[this.placed?"animate":"attr"](Q),this.placed=!0,this.alignAttr=Q,this}alignSetter(a){const L={left:"start",center:"middle",right:"end"};L[a]&&(this.alignValue=a,this.element.setAttribute("text-anchor",L[a]))}animate(a,L,W){const Q=Y(e(L,this.renderer.globalAnimation,!0));return L=Q.defer,R.hidden&&(Q.duration=0),Q.duration!==0?(W&&(Q.complete=W),i(()=>{this.element&&J(this,a,Q)},L)):(this.attr(a,void 0,W||Q.complete),d(a,function(nt,D){Q.step&&Q.step.call(this,nt,{prop:D,pos:1,elem:this})},this)),this}applyTextOutline(a){const L=this.element;a.indexOf("contrast")!==-1&&(a=a.replace(/contrast/g,this.renderer.getContrast(L.style.fill)));var W=a.split(" ");if(a=W[W.length-1],(W=W[0])&&W!=="none"&&$.svg){this.fakeTS=!0,W=W.replace(/(^[\d\.]+)(.*?)$/g,function(D,s,M){return 2*Number(s)+M}),this.removeTextOutline();const Q=R.createElementNS(x,"tspan");A(Q,{class:"highcharts-text-outline",fill:a,stroke:a,"stroke-width":W,"stroke-linejoin":"round"}),a=L.querySelector("textPath")||L,[].forEach.call(a.childNodes,D=>{const s=D.cloneNode(!0);s.removeAttribute&&["fill","stroke","stroke-width","stroke"].forEach(M=>s.removeAttribute(M)),Q.appendChild(s)});let nt=0;[].forEach.call(a.querySelectorAll("text tspan"),D=>{nt+=Number(D.getAttribute("dy"))}),W=R.createElementNS(x,"tspan"),W.textContent="​",A(W,{x:Number(L.getAttribute("x")),dy:-nt}),Q.appendChild(W),a.insertBefore(Q,a.firstChild)}}attr(a,L,W,Q){const nt=this.element,D=p.symbolCustomAttribs;let s,M,z=this,j,K;return typeof a=="string"&&typeof L<"u"&&(s=a,a={},a[s]=L),typeof a=="string"?z=(this[a+"Getter"]||this._defaultGetter).call(this,a,nt):(d(a,function(n,f){j=!1,Q||X(this,f),this.symbolName&&D.indexOf(f)!==-1&&(M||(this.symbolAttr(a),M=!0),j=!0),!this.rotation||f!=="x"&&f!=="y"||(this.doTransform=!0),j||(K=this[f+"Setter"]||this._defaultSetter,K.call(this,n,f,nt))},this),this.afterSetters()),W&&W.call(this),z}clip(a){return this.attr("clip-path",a?"url("+this.renderer.url+"#"+a.id+")":"none")}crisp(a,L){L=L||a.strokeWidth||0;const W=Math.round(L)%2/2;return a.x=Math.floor(a.x||this.x||0)+W,a.y=Math.floor(a.y||this.y||0)+W,a.width=Math.floor((a.width||this.width||0)-2*W),a.height=Math.floor((a.height||this.height||0)-2*W),k(a.strokeWidth)&&(a.strokeWidth=L),a}complexColor(a,L,W){const Q=this.renderer;let nt,D,s,M,z,j,K,n,f,m,G=[],F;b(this.renderer,"complexColor",{args:arguments},function(){if(a.radialGradient?D="radialGradient":a.linearGradient&&(D="linearGradient"),D){if(s=a[D],z=Q.gradients,j=a.stops,f=W.radialReference,S(s)&&(a[D]=s={x1:s[0],y1:s[1],x2:s[2],y2:s[3],gradientUnits:"userSpaceOnUse"}),D==="radialGradient"&&f&&!k(s.gradientUnits)&&(M=s,s=h(s,Q.getRadialAttr(f,M),{gradientUnits:"userSpaceOnUse"})),d(s,function(H,st){st!=="id"&&G.push(st,H)}),d(j,function(H){G.push(H)}),G=G.join(","),z[G])m=z[G].attr("id");else{s.id=m=l();const H=z[G]=Q.createElement(D).attr(s).add(Q.defs);H.radAttr=M,H.stops=[],j.forEach(function(st){st[1].indexOf("rgba")===0?(nt=P.parse(st[1]),K=nt.get("rgb"),n=nt.get("a")):(K=st[1],n=1),st=Q.createElement("stop").attr({offset:st[0],"stop-color":K,"stop-opacity":n}).add(H),H.stops.push(st)})}F="url("+Q.url+"#"+m+")",W.setAttribute(L,F),W.gradient=G,a.toString=function(){return F}}})}css(a){const L=this.styles,W={},Q=this.element;let nt,D=!L;if(L&&d(a,function(s,M){L&&L[M]!==s&&(W[M]=s,D=!0)}),D){L&&(a=O(L,W)),a.width===null||a.width==="auto"?delete this.textWidth:Q.nodeName.toLowerCase()==="text"&&a.width&&(nt=this.textWidth=t(a.width)),this.styles=a,nt&&!N&&this.renderer.forExport&&delete a.width;const s=h(a);Q.namespaceURI===this.SVG_NS&&(["textOutline","textOverflow","width"].forEach(M=>s&&delete s[M]),s.color&&(s.fill=s.color)),y(Q,s)}return this.added&&(this.element.nodeName==="text"&&this.renderer.buildText(this),a.textOutline&&this.applyTextOutline(a.textOutline)),this}dashstyleSetter(a){let L=this["stroke-width"];if(L==="inherit"&&(L=1),a=a&&a.toLowerCase()){const W=a.replace("shortdashdotdot","3,1,1,1,1,1,").replace("shortdashdot","3,1,1,1").replace("shortdot","1,1,").replace("shortdash","3,1,").replace("longdash","8,3,").replace(/dot/g,"1,3,").replace("dash","4,3,").replace(/,$/,"").split(",");for(a=W.length;a--;)W[a]=""+t(W[a])*e(L,NaN);a=W.join(",").replace(/NaN/g,"none"),this.element.setAttribute("stroke-dasharray",a)}}destroy(){const a=this;var L=a.element||{};const W=a.renderer;var Q=L.ownerSVGElement;let nt=L.nodeName==="SPAN"&&a.parentGroup||void 0;if(L.onclick=L.onmouseout=L.onmouseover=L.onmousemove=L.point=null,X(a),a.clipPath&&Q){const D=a.clipPath;[].forEach.call(Q.querySelectorAll("[clip-path],[CLIP-PATH]"),function(s){-1<s.getAttribute("clip-path").indexOf(D.element.id)&&s.removeAttribute("clip-path")}),a.clipPath=D.destroy()}if(a.stops){for(Q=0;Q<a.stops.length;Q++)a.stops[Q].destroy();a.stops.length=0,a.stops=void 0}for(a.safeRemoveChild(L);nt&&nt.div&&nt.div.childNodes.length===0;)L=nt.parentGroup,a.safeRemoveChild(nt.div),delete nt.div,nt=L;a.alignTo&&g(W.alignedObjects,a),d(a,function(D,s){a[s]&&a[s].parentGroup===a&&a[s].destroy&&a[s].destroy(),delete a[s]})}dSetter(a,L,W){S(a)&&(typeof a[0]=="string"&&(a=this.renderer.pathToSegments(a)),this.pathArray=a,a=a.reduce((Q,nt,D)=>nt&&nt.join?(D?Q+" ":"")+nt.join(" "):(nt||"").toString(),"")),/(NaN| {2}|^$)/.test(a)&&(a="M 0 0"),this[L]!==a&&(W.setAttribute(L,a),this[L]=a)}fadeOut(a){const L=this;L.animate({opacity:0},{duration:e(a,150),complete:function(){L.hide()}})}fillSetter(a,L,W){typeof a=="string"?W.setAttribute(L,a):a&&this.complexColor(a,L,W)}getBBox(a,L){const{alignValue:W,element:Q,renderer:nt,styles:D,textStr:s}=this,{cache:M,cacheKeys:z}=nt;var j=Q.namespaceURI===this.SVG_NS;L=e(L,this.rotation,0);var K=nt.styledMode?Q&&p.prototype.getStyle.call(Q,"font-size"):D&&D.fontSize;let n,f;if(k(s)&&(f=s.toString(),f.indexOf("<")===-1&&(f=f.replace(/[0-9]/g,"0")),f+=["",nt.rootFontSize,K,L,this.textWidth,W,D&&D.textOverflow,D&&D.fontWeight].join()),f&&!a&&(n=M[f]),!n){if(j||nt.forExport){try{var m=this.fakeTS&&function(rt){const lt=Q.querySelector(".highcharts-text-outline");lt&&y(lt,{display:rt})};o(m)&&m("none"),n=Q.getBBox?O({},Q.getBBox()):{width:Q.offsetWidth,height:Q.offsetHeight,x:0,y:0},o(m)&&m("")}catch{}(!n||0>n.width)&&(n={x:0,y:0,width:0,height:0})}else n=this.htmlGetBBox();if(m=n.width,a=n.height,j&&(n.height=a={"11px,17":14,"13px,20":16}[`${K||""},${Math.round(a)}`]||a),L){j=Number(Q.getAttribute("y")||0)-n.y,K={right:1,center:.5}[W||0]||0;var G=L*C,F=(L-90)*C,H=m*Math.cos(G);L=m*Math.sin(G);var st=Math.cos(F);G=Math.sin(F),m=n.x+K*(m-H)+j*st,F=m+H,st=F-a*st,H=st-H,j=n.y+j-K*L+j*G,K=j+L,a=K-a*G,L=a-L,n.x=Math.min(m,F,st,H),n.y=Math.min(j,K,a,L),n.width=Math.max(m,F,st,H)-n.x,n.height=Math.max(j,K,a,L)-n.y}}if(f&&(s===""||0<n.height)){for(;250<z.length;)delete M[z.shift()];M[f]||z.push(f),M[f]=n}return n}getStyle(a){return v.getComputedStyle(this.element||this,"").getPropertyValue(a)}hasClass(a){return(""+this.attr("class")).split(" ").indexOf(a)!==-1}hide(){return this.attr({visibility:"hidden"})}htmlGetBBox(){return{height:0,width:0,x:0,y:0}}init(a,L){this.element=L==="span"?c(L):R.createElementNS(this.SVG_NS,L),this.renderer=a,b(this,"afterInit")}on(a,L){const{onEvents:W}=this;return W[a]&&W[a](),W[a]=_(this.element,a,L),this}opacitySetter(a,L,W){this.opacity=a=Number(Number(a).toFixed(3)),W.setAttribute(L,a)}removeClass(a){return this.attr("class",(""+this.attr("class")).replace(u(a)?new RegExp(`(^| )${a}( |$)`):a," ").replace(/ +/g," ").trim())}removeTextOutline(){const a=this.element.querySelector("tspan.highcharts-text-outline");a&&this.safeRemoveChild(a)}safeRemoveChild(a){const L=a.parentNode;L&&L.removeChild(a)}setRadialReference(a){const L=this.element.gradient&&this.renderer.gradients[this.element.gradient];return this.element.radialReference=a,L&&L.radAttr&&L.animate(this.renderer.getRadialAttr(a,L.radAttr)),this}setTextPath(a,L){L=h(!0,{enabled:!0,attributes:{dy:-5,startOffset:"50%",textAnchor:"middle"}},L);const W=this.renderer.url,Q=this.text||this,nt=Q.textPath,{attributes:D,enabled:s}=L;return a=a||nt&&nt.path,nt&&nt.undo(),a&&s?(L=_(Q,"afterModifyTree",M=>{if(a&&s){let j=a.attr("id");j||a.attr("id",j=l());var z={x:0,y:0};k(D.dx)&&(z.dx=D.dx,delete D.dx),k(D.dy)&&(z.dy=D.dy,delete D.dy),Q.attr(z),this.attr({transform:""}),this.box&&(this.box=this.box.destroy()),z=M.nodes.slice(0),M.nodes.length=0,M.nodes[0]={tagName:"textPath",attributes:O(D,{"text-anchor":D.textAnchor,href:`${W}#${j}`}),children:z}}}),Q.textPath={path:a,undo:L}):(Q.attr({dx:0,dy:0}),delete Q.textPath),this.added&&(Q.textCache="",this.renderer.buildText(Q)),this}shadow(a){var L;const{renderer:W}=this,Q=h(((L=this.parentGroup)===null||L===void 0?void 0:L.rotation)===90?{offsetX:-1,offsetY:-1}:{},r(a)?a:{});return L=W.shadowDefinition(Q),this.attr({filter:a?`url(${W.url}#${L})`:"none"})}show(a=!0){return this.attr({visibility:a?"inherit":"visible"})}"stroke-widthSetter"(a,L,W){this[L]=a,W.setAttribute(L,a)}strokeWidth(){if(!this.renderer.styledMode)return this["stroke-width"]||0;const a=this.getStyle("stroke-width");let L=0,W;return a.indexOf("px")===a.length-2?L=t(a):a!==""&&(W=R.createElementNS(x,"rect"),A(W,{width:a,"stroke-width":0}),this.element.parentNode.appendChild(W),L=W.getBBox().width,W.parentNode.removeChild(W)),L}symbolAttr(a){const L=this;p.symbolCustomAttribs.forEach(function(W){L[W]=e(a[W],L[W])}),L.attr({d:L.renderer.symbols[L.symbolName](L.x,L.y,L.width,L.height,L)})}textSetter(a){a!==this.textStr&&(delete this.textPxLength,this.textStr=a,this.added&&this.renderer.buildText(this))}titleSetter(a){const L=this.element,W=L.getElementsByTagName("title")[0]||R.createElementNS(this.SVG_NS,"title");L.insertBefore?L.insertBefore(W,L.firstChild):L.appendChild(W),W.textContent=String(e(a,"")).replace(/<[^>]*>/g,"").replace(/&lt;/g,"<").replace(/&gt;/g,">")}toFront(){const a=this.element;return a.parentNode.appendChild(a),this}translate(a,L){return this.attr({translateX:a,translateY:L})}updateTransform(){const{element:a,matrix:L,rotation:W=0,scaleX:Q,scaleY:nt,translateX:D=0,translateY:s=0}=this,M=["translate("+D+","+s+")"];k(L)&&M.push("matrix("+L.join(",")+")"),W&&M.push("rotate("+W+" "+e(this.rotationOriginX,a.getAttribute("x"),0)+" "+e(this.rotationOriginY,a.getAttribute("y")||0)+")"),(k(Q)||k(nt))&&M.push("scale("+e(Q,1)+" "+e(nt,1)+")"),M.length&&!(this.text||this).textPath&&a.setAttribute("transform",M.join(" "))}visibilitySetter(a,L,W){a==="inherit"?W.removeAttribute(L):this[L]!==a&&W.setAttribute(L,a),this[L]=a}xGetter(a){return this.element.nodeName==="circle"&&(a==="x"?a="cx":a==="y"&&(a="cy")),this._defaultGetter(a)}zIndexSetter(a,L){var W=this.renderer,Q=this.parentGroup;const nt=(Q||W).element||W.box,D=this.element;W=nt===W.box;let s=!1,M;var z=this.added;let j;if(k(a)?(D.setAttribute("data-z-index",a),a=+a,this[L]===a&&(z=!1)):k(this[L])&&D.removeAttribute("data-z-index"),this[L]=a,z){for((a=this.zIndex)&&Q&&(Q.handleZ=!0),L=nt.childNodes,j=L.length-1;0<=j&&!s;j--)Q=L[j],z=Q.getAttribute("data-z-index"),M=!k(z),Q!==D&&(0>a&&M&&!W&&!j?(nt.insertBefore(D,L[j]),s=!0):(t(z)<=a||M&&(!k(a)||0<=a))&&(nt.insertBefore(D,L[j+1]),s=!0));s||(nt.insertBefore(D,L[W?3:0]),s=!0)}return s}}return p.symbolCustomAttribs="anchorX anchorY clockwise end height innerR r start width x y".split(" "),p.prototype.strokeSetter=p.prototype.fillSetter,p.prototype.yGetter=p.prototype.xGetter,p.prototype.matrixSetter=p.prototype.rotationOriginXSetter=p.prototype.rotationOriginYSetter=p.prototype.rotationSetter=p.prototype.scaleXSetter=p.prototype.scaleYSetter=p.prototype.translateXSetter=p.prototype.translateYSetter=p.prototype.verticalAlignSetter=function(E,a){this[a]=E,this.doTransform=!0},p}),et(w,"Core/Renderer/RendererRegistry.js",[w["Core/Globals.js"]],function(B){var P;return function($){$.rendererTypes={};let q;$.getRendererType=function(J=q){return $.rendererTypes[J]||$.rendererTypes[q]},$.registerRendererType=function(J,Y,X){$.rendererTypes[J]=Y,(!q||X)&&(q=J,B.Renderer=Y)}}(P||(P={})),P}),et(w,"Core/Renderer/SVG/SVGLabel.js",[w["Core/Renderer/SVG/SVGElement.js"],w["Core/Utilities.js"]],function(B,P){const{defined:$,extend:q,isNumber:J,merge:Y,pick:X,removeEvent:C}=P;class R extends B{constructor(x,v,_,A,c,y,k,g,O,b){super(),this.paddingRightSetter=this.paddingLeftSetter=this.paddingSetter,this.init(x,"g"),this.textStr=v,this.x=_,this.y=A,this.anchorX=y,this.anchorY=k,this.baseline=O,this.className=b,this.addClass(b==="button"?"highcharts-no-tooltip":"highcharts-label"),b&&this.addClass("highcharts-"+b),this.text=x.text(void 0,0,0,g).attr({zIndex:1});let S;typeof c=="string"&&((S=/^url\((.*?)\)$/.test(c))||this.renderer.symbols[c])&&(this.symbolKey=c),this.bBox=R.emptyBBox,this.padding=3,this.baselineOffset=0,this.needsBox=x.styledMode||S,this.deferredAttr={},this.alignFactor=0}alignSetter(x){x={left:0,center:.5,right:1}[x],x!==this.alignFactor&&(this.alignFactor=x,this.bBox&&J(this.xSetting)&&this.attr({x:this.xSetting}))}anchorXSetter(x,v){this.anchorX=x,this.boxAttr(v,Math.round(x)-this.getCrispAdjust()-this.xSetting)}anchorYSetter(x,v){this.anchorY=x,this.boxAttr(v,x-this.ySetting)}boxAttr(x,v){this.box?this.box.attr(x,v):this.deferredAttr[x]=v}css(x){if(x){const v={};x=Y(x),R.textProps.forEach(_=>{typeof x[_]<"u"&&(v[_]=x[_],delete x[_])}),this.text.css(v),"fontSize"in v||"fontWeight"in v?this.updateTextPadding():("width"in v||"textOverflow"in v)&&this.updateBoxSize()}return B.prototype.css.call(this,x)}destroy(){C(this.element,"mouseenter"),C(this.element,"mouseleave"),this.text&&this.text.destroy(),this.box&&(this.box=this.box.destroy()),B.prototype.destroy.call(this)}fillSetter(x,v){x&&(this.needsBox=!0),this.fill=x,this.boxAttr(v,x)}getBBox(){this.textStr&&this.bBox.width===0&&this.bBox.height===0&&this.updateBoxSize();const x=this.padding,v=X(this.paddingLeft,x);return{width:this.width,height:this.height,x:this.bBox.x-v,y:this.bBox.y-x}}getCrispAdjust(){return this.renderer.styledMode&&this.box?this.box.strokeWidth()%2/2:(this["stroke-width"]?parseInt(this["stroke-width"],10):0)%2/2}heightSetter(x){this.heightSetting=x}onAdd(){this.text.add(this),this.attr({text:X(this.textStr,""),x:this.x||0,y:this.y||0}),this.box&&$(this.anchorX)&&this.attr({anchorX:this.anchorX,anchorY:this.anchorY})}paddingSetter(x,v){J(x)?x!==this[v]&&(this[v]=x,this.updateTextPadding()):this[v]=void 0}rSetter(x,v){this.boxAttr(v,x)}strokeSetter(x,v){this.stroke=x,this.boxAttr(v,x)}"stroke-widthSetter"(x,v){x&&(this.needsBox=!0),this["stroke-width"]=x,this.boxAttr(v,x)}"text-alignSetter"(x){this.textAlign=x}textSetter(x){typeof x<"u"&&this.text.attr({text:x}),this.updateTextPadding()}updateBoxSize(){var x=this.text;const v={},_=this.padding,A=this.bBox=J(this.widthSetting)&&J(this.heightSetting)&&!this.textAlign||!$(x.textStr)?R.emptyBBox:x.getBBox();this.width=this.getPaddedWidth(),this.height=(this.heightSetting||A.height||0)+2*_;const c=this.renderer.fontMetrics(x);this.baselineOffset=_+Math.min((this.text.firstLineMetrics||c).b,A.height||1/0),this.heightSetting&&(this.baselineOffset+=(this.heightSetting-c.h)/2),this.needsBox&&!x.textPath&&(this.box||(x=this.box=this.symbolKey?this.renderer.symbol(this.symbolKey):this.renderer.rect(),x.addClass((this.className==="button"?"":"highcharts-label-box")+(this.className?" highcharts-"+this.className+"-box":"")),x.add(this)),x=this.getCrispAdjust(),v.x=x,v.y=(this.baseline?-this.baselineOffset:0)+x,v.width=Math.round(this.width),v.height=Math.round(this.height),this.box.attr(q(v,this.deferredAttr)),this.deferredAttr={})}updateTextPadding(){const x=this.text;if(!x.textPath){this.updateBoxSize();const v=this.baseline?0:this.baselineOffset;let _=X(this.paddingLeft,this.padding);$(this.widthSetting)&&this.bBox&&(this.textAlign==="center"||this.textAlign==="right")&&(_+={center:.5,right:1}[this.textAlign]*(this.widthSetting-this.bBox.width)),(_!==x.x||v!==x.y)&&(x.attr("x",_),x.hasBoxWidthChanged&&(this.bBox=x.getBBox(!0)),typeof v<"u"&&x.attr("y",v)),x.x=_,x.y=v}}widthSetter(x){this.widthSetting=J(x)?x:void 0}getPaddedWidth(){var x=this.padding;const v=X(this.paddingLeft,x);return x=X(this.paddingRight,x),(this.widthSetting||this.bBox.width||0)+v+x}xSetter(x){this.x=x,this.alignFactor&&(x-=this.alignFactor*this.getPaddedWidth(),this["forceAnimate:x"]=!0),this.xSetting=Math.round(x),this.attr("translateX",this.xSetting)}ySetter(x){this.ySetting=this.y=Math.round(x),this.attr("translateY",this.ySetting)}}return R.emptyBBox={width:0,height:0,x:0,y:0},R.textProps="color direction fontFamily fontSize fontStyle fontWeight lineHeight textAlign textDecoration textOutline textOverflow whiteSpace width".split(" "),R}),et(w,"Core/Renderer/SVG/Symbols.js",[w["Core/Utilities.js"]],function(B){function P(C,R,N,x,v){const _=[];if(v){const A=v.start||0,c=X(v.r,N);N=X(v.r,x||N),x=(v.end||0)-.001;const y=v.innerR,k=X(v.open,.001>Math.abs((v.end||0)-A-2*Math.PI)),g=Math.cos(A),O=Math.sin(A),b=Math.cos(x),S=Math.sin(x),o=X(v.longArc,.001>x-A-Math.PI?0:1);let r=["A",c,N,0,o,X(v.clockwise,1),C+c*b,R+N*S];r.params={start:A,end:x,cx:C,cy:R},_.push(["M",C+c*g,R+N*O],r),J(y)&&(r=["A",y,y,0,o,J(v.clockwise)?1-v.clockwise:0,C+y*g,R+y*O],r.params={start:x,end:A,cx:C,cy:R},_.push(k?["M",C+y*b,R+y*S]:["L",C+y*b,R+y*S],r)),k||_.push(["Z"])}return _}function $(C,R,N,x,v){return v&&v.r?q(C,R,N,x,v):[["M",C,R],["L",C+N,R],["L",C+N,R+x],["L",C,R+x],["Z"]]}function q(C,R,N,x,v){return v=(v==null?void 0:v.r)||0,[["M",C+v,R],["L",C+N-v,R],["A",v,v,0,0,1,C+N,R+v],["L",C+N,R+x-v],["A",v,v,0,0,1,C+N-v,R+x],["L",C+v,R+x],["A",v,v,0,0,1,C,R+x-v],["L",C,R+v],["A",v,v,0,0,1,C+v,R],["Z"]]}const{defined:J,isNumber:Y,pick:X}=B;return{arc:P,callout:function(C,R,N,x,v){const _=Math.min(v&&v.r||0,N,x),A=_+6,c=v&&v.anchorX;v=v&&v.anchorY||0;const y=q(C,R,N,x,{r:_});return Y(c)&&(C+c>=N?v>R+A&&v<R+x-A?y.splice(3,1,["L",C+N,v-6],["L",C+N+6,v],["L",C+N,v+6],["L",C+N,R+x-_]):y.splice(3,1,["L",C+N,x/2],["L",c,v],["L",C+N,x/2],["L",C+N,R+x-_]):0>=C+c?v>R+A&&v<R+x-A?y.splice(7,1,["L",C,v+6],["L",C-6,v],["L",C,v-6],["L",C,R+_]):y.splice(7,1,["L",C,x/2],["L",c,v],["L",C,x/2],["L",C,R+_]):v&&v>x&&c>C+A&&c<C+N-A?y.splice(5,1,["L",c+6,R+x],["L",c,R+x+6],["L",c-6,R+x],["L",C+_,R+x]):v&&0>v&&c>C+A&&c<C+N-A&&y.splice(1,1,["L",c-6,R],["L",c,R-6],["L",c+6,R],["L",N-_,R])),y},circle:function(C,R,N,x){return P(C+N/2,R+x/2,N/2,x/2,{start:.5*Math.PI,end:2.5*Math.PI,open:!1})},diamond:function(C,R,N,x){return[["M",C+N/2,R],["L",C+N,R+x/2],["L",C+N/2,R+x],["L",C,R+x/2],["Z"]]},rect:$,roundedRect:q,square:$,triangle:function(C,R,N,x){return[["M",C+N/2,R],["L",C+N,R+x],["L",C,R+x],["Z"]]},"triangle-down":function(C,R,N,x){return[["M",C,R],["L",C+N,R],["L",C+N/2,R+x],["Z"]]}}}),et(w,"Core/Renderer/SVG/TextBuilder.js",[w["Core/Renderer/HTML/AST.js"],w["Core/Globals.js"],w["Core/Utilities.js"]],function(B,P,$){const{doc:q,SVG_NS:J,win:Y}=P,{attr:X,extend:C,fireEvent:R,isString:N,objectEach:x,pick:v}=$;class _{constructor(c){const y=c.styles;this.renderer=c.renderer,this.svgElement=c,this.width=c.textWidth,this.textLineHeight=y&&y.lineHeight,this.textOutline=y&&y.textOutline,this.ellipsis=!(!y||y.textOverflow!=="ellipsis"),this.noWrap=!(!y||y.whiteSpace!=="nowrap")}buildSVG(){const c=this.svgElement,y=c.element;var k=c.renderer,g=v(c.textStr,"").toString();const O=g.indexOf("<")!==-1,b=y.childNodes;k=!c.added&&k.box;const S=/<br.*?>/g;var o=[g,this.ellipsis,this.noWrap,this.textLineHeight,this.textOutline,c.getStyle("font-size"),this.width].join();if(o!==c.textCache){for(c.textCache=o,delete c.actualWidth,o=b.length;o--;)y.removeChild(b[o]);O||this.ellipsis||this.width||c.textPath||g.indexOf(" ")!==-1&&(!this.noWrap||S.test(g))?g!==""&&(k&&k.appendChild(y),g=new B(g),this.modifyTree(g.nodes),g.addToDOM(y),this.modifyDOM(),this.ellipsis&&(y.textContent||"").indexOf("…")!==-1&&c.attr("title",this.unescapeEntities(c.textStr||"",["&lt;","&gt;"])),k&&k.removeChild(y)):y.appendChild(q.createTextNode(this.unescapeEntities(g))),N(this.textOutline)&&c.applyTextOutline&&c.applyTextOutline(this.textOutline)}}modifyDOM(){const c=this.svgElement,y=X(c.element,"x");c.firstLineMetrics=void 0;let k;for(;(k=c.element.firstChild)&&/^[\s\u200B]*$/.test(k.textContent||" ");)c.element.removeChild(k);[].forEach.call(c.element.querySelectorAll("tspan.highcharts-br"),(S,o)=>{S.nextSibling&&S.previousSibling&&(o===0&&S.previousSibling.nodeType===1&&(c.firstLineMetrics=c.renderer.fontMetrics(S.previousSibling)),X(S,{dy:this.getLineHeight(S.nextSibling),x:y}))});const g=this.width||0;if(g){var O=(S,o)=>{var r=S.textContent||"";const u=r.replace(/([^\^])-/g,"$1- ").split(" ");var h=!this.noWrap&&(1<u.length||1<c.element.childNodes.length);const d=this.getLineHeight(o);let e=0,t=c.actualWidth;if(this.ellipsis)r&&this.truncate(S,r,void 0,0,Math.max(0,g-.8*d),(i,l)=>i.substring(0,l)+"…");else if(h){for(r=[],h=[];o.firstChild&&o.firstChild!==S;)h.push(o.firstChild),o.removeChild(o.firstChild);for(;u.length;)u.length&&!this.noWrap&&0<e&&(r.push(S.textContent||""),S.textContent=u.join(" ").replace(/- /g,"-")),this.truncate(S,void 0,u,e===0&&t||0,g,(i,l)=>u.slice(0,l).join(" ").replace(/- /g,"-")),t=c.actualWidth,e++;h.forEach(i=>{o.insertBefore(i,S)}),r.forEach(i=>{o.insertBefore(q.createTextNode(i),S),i=q.createElementNS(J,"tspan"),i.textContent="​",X(i,{dy:d,x:y}),o.insertBefore(i,S)})}},b=S=>{[].slice.call(S.childNodes).forEach(o=>{o.nodeType===Y.Node.TEXT_NODE?O(o,S):(o.className.baseVal.indexOf("highcharts-br")!==-1&&(c.actualWidth=0),b(o))})};b(c.element)}}getLineHeight(c){return c=c.nodeType===Y.Node.TEXT_NODE?c.parentElement:c,this.textLineHeight?parseInt(this.textLineHeight.toString(),10):this.renderer.fontMetrics(c||this.svgElement.element).h}modifyTree(c){const y=(k,g)=>{const{attributes:O={},children:b,style:S={},tagName:o}=k,r=this.renderer.styledMode;o==="b"||o==="strong"?r?O.class="highcharts-strong":S.fontWeight="bold":(o==="i"||o==="em")&&(r?O.class="highcharts-emphasized":S.fontStyle="italic"),S&&S.color&&(S.fill=S.color),o==="br"?(O.class="highcharts-br",k.textContent="​",(g=c[g+1])&&g.textContent&&(g.textContent=g.textContent.replace(/^ +/gm,""))):o==="a"&&b&&b.some(u=>u.tagName==="#text")&&(k.children=[{children:b,tagName:"tspan"}]),o!=="#text"&&o!=="a"&&(k.tagName="tspan"),C(k,{attributes:O,style:S}),b&&b.filter(u=>u.tagName!=="#text").forEach(y)};c.forEach(y),R(this.svgElement,"afterModifyTree",{nodes:c})}truncate(c,y,k,g,O,b){const S=this.svgElement,{rotation:o}=S,r=[];let u=k?1:0,h=(y||k||"").length,d=h,e,t;const i=function(l,p){if(l=p||l,(p=c.parentNode)&&typeof r[l]>"u"&&p.getSubStringLength)try{r[l]=g+p.getSubStringLength(0,k?l+1:l)}catch{}return r[l]};if(S.rotation=0,t=i(c.textContent.length),g+t>O){for(;u<=h;)d=Math.ceil((u+h)/2),k&&(e=b(k,d)),t=i(d,e&&e.length-1),u===h?u=h+1:t>O?h=d-1:u=d;h===0?c.textContent="":y&&h===y.length-1||(c.textContent=e||b(y||k,d))}k&&k.splice(0,d),S.actualWidth=t,S.rotation=o}unescapeEntities(c,y){return x(this.renderer.escapes,function(k,g){y&&y.indexOf(k)!==-1||(c=c.toString().replace(new RegExp(k,"g"),g))}),c}}return _}),et(w,"Core/Renderer/SVG/SVGRenderer.js",[w["Core/Renderer/HTML/AST.js"],w["Core/Color/Color.js"],w["Core/Globals.js"],w["Core/Renderer/RendererRegistry.js"],w["Core/Renderer/SVG/SVGElement.js"],w["Core/Renderer/SVG/SVGLabel.js"],w["Core/Renderer/SVG/Symbols.js"],w["Core/Renderer/SVG/TextBuilder.js"],w["Core/Utilities.js"]],function(B,P,$,q,J,Y,X,C,R){const{charts:N,deg2rad:x,doc:v,isFirefox:_,isMS:A,isWebKit:c,noop:y,SVG_NS:k,symbolSizes:g,win:O}=$,{addEvent:b,attr:S,createElement:o,css:r,defined:u,destroyObjectProperties:h,extend:d,isArray:e,isNumber:t,isObject:i,isString:l,merge:p,pick:E,pInt:a,uniqueKey:L}=R;let W;class Q{constructor(D,s,M,z,j,K,n){this.width=this.url=this.style=this.imgCount=this.height=this.gradients=this.globalAnimation=this.defs=this.chartIndex=this.cacheKeys=this.cache=this.boxWrapper=this.box=this.alignedObjects=void 0,this.init(D,s,M,z,j,K,n)}init(D,s,M,z,j,K,n){const f=this.createElement("svg").attr({version:"1.1",class:"highcharts-root"}),m=f.element;n||f.css(this.getStyle(z)),D.appendChild(m),S(D,"dir","ltr"),D.innerHTML.indexOf("xmlns")===-1&&S(m,"xmlns",this.SVG_NS),this.box=m,this.boxWrapper=f,this.alignedObjects=[],this.url=this.getReferenceURL(),this.createElement("desc").add().element.appendChild(v.createTextNode("Created with Highcharts 11.1.0")),this.defs=this.createElement("defs").add(),this.allowHTML=K,this.forExport=j,this.styledMode=n,this.gradients={},this.cache={},this.cacheKeys=[],this.imgCount=0,this.rootFontSize=f.getStyle("font-size"),this.setSize(s,M,!1);let G;_&&D.getBoundingClientRect&&(s=function(){r(D,{left:0,top:0}),G=D.getBoundingClientRect(),r(D,{left:Math.ceil(G.left)-G.left+"px",top:Math.ceil(G.top)-G.top+"px"})},s(),this.unSubPixelFix=b(O,"resize",s))}definition(D){return new B([D]).addToDOM(this.defs.element)}getReferenceURL(){if((_||c)&&v.getElementsByTagName("base").length){if(!u(W)){var D=L();D=new B([{tagName:"svg",attributes:{width:8,height:8},children:[{tagName:"defs",children:[{tagName:"clipPath",attributes:{id:D},children:[{tagName:"rect",attributes:{width:4,height:4}}]}]},{tagName:"rect",attributes:{id:"hitme",width:8,height:8,"clip-path":`url(#${D})`,fill:"rgba(0,0,0,0.001)"}}]}]).addToDOM(v.body),r(D,{position:"fixed",top:0,left:0,zIndex:9e5});const s=v.elementFromPoint(6,6);W=(s&&s.id)==="hitme",v.body.removeChild(D)}if(W)return O.location.href.split("#")[0].replace(/<[^>]*>/g,"").replace(/([\('\)])/g,"\\$1").replace(/ /g,"%20")}return""}getStyle(D){return this.style=d({fontFamily:"Helvetica, Arial, sans-serif",fontSize:"1rem"},D)}setStyle(D){this.boxWrapper.css(this.getStyle(D))}isHidden(){return!this.boxWrapper.getBBox().width}destroy(){const D=this.defs;return this.box=null,this.boxWrapper=this.boxWrapper.destroy(),h(this.gradients||{}),this.gradients=null,this.defs=D.destroy(),this.unSubPixelFix&&this.unSubPixelFix(),this.alignedObjects=null}createElement(D){const s=new this.Element;return s.init(this,D),s}getRadialAttr(D,s){return{cx:D[0]-D[2]/2+(s.cx||0)*D[2],cy:D[1]-D[2]/2+(s.cy||0)*D[2],r:(s.r||0)*D[2]}}shadowDefinition(D){const s=[`highcharts-drop-shadow-${this.chartIndex}`,...Object.keys(D).map(z=>D[z])].join("-").replace(/[^a-z0-9\-]/g,""),M=p({color:"#000000",offsetX:1,offsetY:1,opacity:.15,width:5},D);return this.defs.element.querySelector(`#${s}`)||this.definition({tagName:"filter",attributes:{id:s},children:[{tagName:"feDropShadow",attributes:{dx:M.offsetX,dy:M.offsetY,"flood-color":M.color,"flood-opacity":Math.min(5*M.opacity,1),stdDeviation:M.width/2}}]}),s}buildText(D){new C(D).buildSVG()}getContrast(D){return D=P.parse(D).rgba.map(s=>(s/=255,.03928>=s?s/12.92:Math.pow((s+.055)/1.055,2.4))),D=.2126*D[0]+.7152*D[1]+.0722*D[2],1.05/(D+.05)>(D+.05)/.05?"#FFFFFF":"#000000"}button(D,s,M,z,j={},K,n,f,m,G){const F=this.label(D,s,M,m,void 0,void 0,G,void 0,"button"),H=this.styledMode;D=j.states||{};let st=0;j=p(j),delete j.states;const rt=p({color:"#333333",cursor:"pointer",fontSize:"0.8em",fontWeight:"normal"},j.style);delete j.style;let lt=B.filterUserAttributes(j);F.attr(p({padding:8,r:2},lt));let ht,pt,I;return H||(lt=p({fill:"#f7f7f7",stroke:"#cccccc","stroke-width":1},lt),K=p(lt,{fill:"#e6e6e6"},B.filterUserAttributes(K||D.hover||{})),ht=K.style,delete K.style,n=p(lt,{fill:"#e6e9ff",style:{color:"#000000",fontWeight:"bold"}},B.filterUserAttributes(n||D.select||{})),pt=n.style,delete n.style,f=p(lt,{style:{color:"#cccccc"}},B.filterUserAttributes(f||D.disabled||{})),I=f.style,delete f.style),b(F.element,A?"mouseover":"mouseenter",function(){st!==3&&F.setState(1)}),b(F.element,A?"mouseout":"mouseleave",function(){st!==3&&F.setState(st)}),F.setState=function(T){T!==1&&(F.state=st=T),F.removeClass(/highcharts-button-(normal|hover|pressed|disabled)/).addClass("highcharts-button-"+["normal","hover","pressed","disabled"][T||0]),H||(F.attr([lt,K,n,f][T||0]),T=[rt,ht,pt,I][T||0],i(T)&&F.css(T))},H||(F.attr(lt).css(d({cursor:"default"},rt)),G&&F.text.css({pointerEvents:"none"})),F.on("touchstart",T=>T.stopPropagation()).on("click",function(T){st!==3&&z.call(F,T)})}crispLine(D,s,M="round"){const z=D[0],j=D[1];return u(z[1])&&z[1]===j[1]&&(z[1]=j[1]=Math[M](z[1])-s%2/2),u(z[2])&&z[2]===j[2]&&(z[2]=j[2]=Math[M](z[2])+s%2/2),D}path(D){const s=this.styledMode?{}:{fill:"none"};return e(D)?s.d=D:i(D)&&d(s,D),this.createElement("path").attr(s)}circle(D,s,M){return D=i(D)?D:typeof D>"u"?{}:{x:D,y:s,r:M},s=this.createElement("circle"),s.xSetter=s.ySetter=function(z,j,K){K.setAttribute("c"+j,z)},s.attr(D)}arc(D,s,M,z,j,K){return i(D)?(z=D,s=z.y,M=z.r,D=z.x):z={innerR:z,start:j,end:K},D=this.symbol("arc",D,s,M,M,z),D.r=M,D}rect(D,s,M,z,j,K){D=i(D)?D:typeof D>"u"?{}:{x:D,y:s,r:j,width:Math.max(M||0,0),height:Math.max(z||0,0)};const n=this.createElement("rect");return this.styledMode||(typeof K<"u"&&(D["stroke-width"]=K,d(D,n.crisp(D))),D.fill="none"),n.rSetter=function(f,m,G){n.r=f,S(G,{rx:f,ry:f})},n.rGetter=function(){return n.r||0},n.attr(D)}roundedRect(D){return this.symbol("roundedRect").attr(D)}setSize(D,s,M){this.width=D,this.height=s,this.boxWrapper.animate({width:D,height:s},{step:function(){this.attr({viewBox:"0 0 "+this.attr("width")+" "+this.attr("height")})},duration:E(M,!0)?void 0:0}),this.alignElements()}g(D){const s=this.createElement("g");return D?s.attr({class:"highcharts-"+D}):s}image(D,s,M,z,j,K){const n={preserveAspectRatio:"none"};t(s)&&(n.x=s),t(M)&&(n.y=M),t(z)&&(n.width=z),t(j)&&(n.height=j);const f=this.createElement("image").attr(n);return s=function(m){f.attr({href:D}),K.call(f,m)},K?(f.attr({href:"data:image/gif;base64,R0lGODlhAQABAAAAACH5BAEKAAEALAAAAAABAAEAAAICTAEAOw=="}),M=new O.Image,b(M,"load",s),M.src=D,M.complete&&s({})):f.attr({href:D}),f}symbol(D,s,M,z,j,K){const n=this,f=/^url\((.*?)\)$/,m=f.test(D),G=!m&&(this.symbols[D]?D:"circle"),F=G&&this.symbols[G];let H,st,rt,lt;if(F)typeof s=="number"&&(st=F.call(this.symbols,Math.round(s||0),Math.round(M||0),z||0,j||0,K)),H=this.path(st),n.styledMode||H.attr("fill","none"),d(H,{symbolName:G||void 0,x:s,y:M,width:z,height:j}),K&&d(H,K);else if(m){rt=D.match(f)[1];const ht=H=this.image(rt);ht.imgwidth=E(K&&K.width,g[rt]&&g[rt].width),ht.imgheight=E(K&&K.height,g[rt]&&g[rt].height),lt=pt=>pt.attr({width:pt.width,height:pt.height}),["width","height"].forEach(function(pt){ht[pt+"Setter"]=function(I,T){this[T]=I;const{alignByTranslate:tt,element:V,width:ot,height:dt,imgwidth:ct,imgheight:yt}=this;if(I=this["img"+T],u(I)){let vt=1;K&&K.backgroundSize==="within"&&ot&&dt?(vt=Math.min(ot/ct,dt/yt),S(V,{width:Math.round(ct*vt),height:Math.round(yt*vt)})):V&&V.setAttribute(T,I),tt||this.translate(((ot||0)-ct*vt)/2,((dt||0)-yt*vt)/2)}}}),u(s)&&ht.attr({x:s,y:M}),ht.isImg=!0,u(ht.imgwidth)&&u(ht.imgheight)?lt(ht):(ht.attr({width:0,height:0}),o("img",{onload:function(){const pt=N[n.chartIndex];this.width===0&&(r(this,{position:"absolute",top:"-999em"}),v.body.appendChild(this)),g[rt]={width:this.width,height:this.height},ht.imgwidth=this.width,ht.imgheight=this.height,ht.element&&lt(ht),this.parentNode&&this.parentNode.removeChild(this),n.imgCount--,!n.imgCount&&pt&&!pt.hasLoaded&&pt.onload()},src:rt}),this.imgCount++)}return H}clipRect(D,s,M,z){const j=L()+"-",K=this.createElement("clipPath").attr({id:j}).add(this.defs);return D=this.rect(D,s,M,z,0).add(K),D.id=j,D.clipPath=K,D.count=0,D}text(D,s,M,z){const j={};return z&&(this.allowHTML||!this.forExport)?this.html(D,s,M):(j.x=Math.round(s||0),M&&(j.y=Math.round(M)),u(D)&&(j.text=D),D=this.createElement("text").attr(j),(!z||this.forExport&&!this.allowHTML)&&(D.xSetter=function(K,n,f){const m=f.getElementsByTagName("tspan"),G=f.getAttribute(n);for(let F=0,H;F<m.length;F++)H=m[F],H.getAttribute(n)===G&&H.setAttribute(n,K);f.setAttribute(n,K)}),D)}fontMetrics(D){D=a(J.prototype.getStyle.call(D,"font-size")||0);const s=24>D?D+3:Math.round(1.2*D);return{h:s,b:Math.round(.8*s),f:D}}rotCorr(D,s,M){let z=D;return s&&M&&(z=Math.max(z*Math.cos(s*x),4)),{x:-D/3*Math.sin(s*x),y:z}}pathToSegments(D){const s=[],M=[],z={A:8,C:7,H:2,L:3,M:3,Q:5,S:5,T:3,V:2};for(let j=0;j<D.length;j++)l(M[0])&&t(D[j])&&M.length===z[M[0].toUpperCase()]&&D.splice(j,0,M[0].replace("M","L").replace("m","l")),typeof D[j]=="string"&&(M.length&&s.push(M.slice(0)),M.length=0),M.push(D[j]);return s.push(M.slice(0)),s}label(D,s,M,z,j,K,n,f,m){return new Y(this,D,s,M,z,j,K,n,f,m)}alignElements(){this.alignedObjects.forEach(D=>D.align())}}return d(Q.prototype,{Element:J,SVG_NS:k,escapes:{"&":"&amp;","<":"&lt;",">":"&gt;","'":"&#39;",'"':"&quot;"},symbols:X,draw:y}),q.registerRendererType("svg",Q,!0),Q}),et(w,"Core/Renderer/HTML/HTMLElement.js",[w["Core/Globals.js"],w["Core/Renderer/SVG/SVGElement.js"],w["Core/Utilities.js"]],function(B,P,$){const{isFirefox:q,isMS:J,isWebKit:Y,win:X}=B,{css:C,defined:R,extend:N,pick:x,pInt:v}=$,_=[];class A extends P{static compose(y){if($.pushUnique(_,y)){const k=A.prototype,g=y.prototype;g.getSpanCorrection=k.getSpanCorrection,g.htmlCss=k.htmlCss,g.htmlGetBBox=k.htmlGetBBox,g.htmlUpdateTransform=k.htmlUpdateTransform,g.setSpanRotation=k.setSpanRotation}return y}getSpanCorrection(y,k,g){this.xCorr=-y*g,this.yCorr=-k}htmlCss(y){const k=this.element.tagName==="SPAN"&&y&&"width"in y,g=x(k&&y.width,void 0);let O;return k&&(delete y.width,this.textWidth=g,O=!0),y&&y.textOverflow==="ellipsis"&&(y.whiteSpace="nowrap",y.overflow="hidden"),this.styles=N(this.styles,y),C(this.element,y),O&&this.htmlUpdateTransform(),this}htmlGetBBox(){const y=this.element;return{x:y.offsetLeft,y:y.offsetTop,width:y.offsetWidth,height:y.offsetHeight}}htmlUpdateTransform(){if(this.added){var y=this.renderer,k=this.element,g=this.x||0,O=this.y||0,b=this.textAlign||"left",S={left:0,center:.5,right:1}[b],o=this.styles,r=o&&o.whiteSpace;if(C(k,{marginLeft:this.translateX||0,marginTop:this.translateY||0}),k.tagName==="SPAN"){o=this.rotation;const h=this.textWidth&&v(this.textWidth),d=[o,b,k.innerHTML,this.textWidth,this.textAlign].join();let e=!1;if(h!==this.oldTextWidth){if(this.textPxLength)var u=this.textPxLength;else C(k,{width:"",whiteSpace:r||"nowrap"}),u=k.offsetWidth;(h>this.oldTextWidth||u>h)&&(/[ \-]/.test(k.textContent||k.innerText)||k.style.textOverflow==="ellipsis")&&(C(k,{width:u>h||o?h+"px":"auto",display:"block",whiteSpace:r||"normal"}),this.oldTextWidth=h,e=!0)}this.hasBoxWidthChanged=e,d!==this.cTT&&(y=y.fontMetrics(k).b,!R(o)||o===(this.oldRotation||0)&&b===this.oldAlign||this.setSpanRotation(o,S,y),this.getSpanCorrection(!R(o)&&this.textPxLength||k.offsetWidth,y,S,o,b)),C(k,{left:g+(this.xCorr||0)+"px",top:O+(this.yCorr||0)+"px"}),this.cTT=d,this.oldRotation=o,this.oldAlign=b}}else this.alignOnAdd=!0}setSpanRotation(y,k,g){const O={},b=J&&!/Edge/.test(X.navigator.userAgent)?"-ms-transform":Y?"-webkit-transform":q?"MozTransform":X.opera?"-o-transform":void 0;b&&(O[b]=O.transform="rotate("+y+"deg)",O[b+(q?"Origin":"-origin")]=O.transformOrigin=100*k+"% "+g+"px",C(this.element,O))}}return A}),et(w,"Core/Renderer/HTML/HTMLRenderer.js",[w["Core/Renderer/HTML/AST.js"],w["Core/Renderer/SVG/SVGElement.js"],w["Core/Renderer/SVG/SVGRenderer.js"],w["Core/Utilities.js"]],function(B,P,$,q){const{attr:J,createElement:Y,extend:X,pick:C}=q,R=[];class N extends ${static compose(v){return q.pushUnique(R,v)&&(v.prototype.html=N.prototype.html),v}html(v,_,A){const c=this.createElement("span"),y=c.element,k=c.renderer,g=function(O,b){["opacity","visibility"].forEach(function(S){O[S+"Setter"]=function(o,r,u){const h=O.div?O.div.style:b;P.prototype[S+"Setter"].call(this,o,r,u),h&&(h[r]=o)}}),O.addedSetters=!0};return c.textSetter=function(O){O!==this.textStr&&(delete this.bBox,delete this.oldTextWidth,B.setElementHTML(this.element,C(O,"")),this.textStr=O,c.doTransform=!0)},g(c,c.element.style),c.xSetter=c.ySetter=c.alignSetter=c.rotationSetter=function(O,b){b==="align"?c.alignValue=c.textAlign=O:c[b]=O,c.doTransform=!0},c.afterSetters=function(){this.doTransform&&(this.htmlUpdateTransform(),this.doTransform=!1)},c.attr({text:v,x:Math.round(_),y:Math.round(A)}).css({position:"absolute"}),k.styledMode||c.css({fontFamily:this.style.fontFamily,fontSize:this.style.fontSize}),y.style.whiteSpace="nowrap",c.css=c.htmlCss,c.add=function(O){const b=k.box.parentNode,S=[];let o;if(this.parentGroup=O){if(o=O.div,!o){for(;O;)S.push(O),O=O.parentGroup;S.reverse().forEach(function(r){function u(t,i){r[i]=t,i==="translateX"?e.left=t+"px":e.top=t+"px",r.doTransform=!0}const h=J(r.element,"class"),d=r.styles||{};o=r.div=r.div||Y("div",h?{className:h}:void 0,{position:"absolute",left:(r.translateX||0)+"px",top:(r.translateY||0)+"px",display:r.display,opacity:r.opacity,visibility:r.visibility},o||b);const e=o.style;X(r,{classSetter:function(t){return function(i){this.element.setAttribute("class",i),t.className=i}}(o),css:function(t){return c.css.call(r,t),["cursor","pointerEvents"].forEach(i=>{t[i]&&(e[i]=t[i])}),r},on:function(){return S[0].div&&c.on.apply({element:S[0].div,onEvents:r.onEvents},arguments),r},translateXSetter:u,translateYSetter:u}),r.addedSetters||g(r),r.css(d)})}}else o=b;return o.appendChild(y),c.added=!0,c.alignOnAdd&&c.htmlUpdateTransform(),c},c}}return N}),et(w,"Core/Axis/AxisDefaults.js",[],function(){var B;return function(P){P.defaultXAxisOptions={alignTicks:!0,allowDecimals:void 0,panningEnabled:!0,zIndex:2,zoomEnabled:!0,dateTimeLabelFormats:{millisecond:{main:"%H:%M:%S.%L",range:!1},second:{main:"%H:%M:%S",range:!1},minute:{main:"%H:%M",range:!1},hour:{main:"%H:%M",range:!1},day:{main:"%e %b"},week:{main:"%e %b"},month:{main:"%b '%y"},year:{main:"%Y"}},endOnTick:!1,gridLineDashStyle:"Solid",gridZIndex:1,labels:{autoRotation:void 0,autoRotationLimit:80,distance:15,enabled:!0,indentation:10,overflow:"justify",padding:5,reserveSpace:void 0,rotation:void 0,staggerLines:0,step:0,useHTML:!1,zIndex:7,style:{color:"#333333",cursor:"default",fontSize:"0.8em"}},maxPadding:.01,minorGridLineDashStyle:"Solid",minorTickLength:2,minorTickPosition:"outside",minorTicksPerMajor:5,minPadding:.01,offset:void 0,opposite:!1,reversed:void 0,reversedStacks:!1,showEmpty:!0,showFirstLabel:!0,showLastLabel:!0,startOfWeek:1,startOnTick:!1,tickLength:10,tickPixelInterval:100,tickmarkPlacement:"between",tickPosition:"outside",title:{align:"middle",rotation:0,useHTML:!1,x:0,y:0,style:{color:"#666666",fontSize:"0.8em"}},type:"linear",uniqueNames:!0,visible:!0,minorGridLineColor:"#f2f2f2",minorGridLineWidth:1,minorTickColor:"#999999",lineColor:"#333333",lineWidth:1,gridLineColor:"#e6e6e6",gridLineWidth:void 0,tickColor:"#333333"},P.defaultYAxisOptions={reversedStacks:!0,endOnTick:!0,maxPadding:.05,minPadding:.05,tickPixelInterval:72,showLastLabel:!0,labels:{x:void 0},startOnTick:!0,title:{rotation:270,text:"Values"},stackLabels:{animation:{},allowOverlap:!1,enabled:!1,crop:!0,overflow:"justify",formatter:function(){const{numberFormatter:$}=this.axis.chart;return $(this.total||0,-1)},style:{color:"#000000",fontSize:"0.7em",fontWeight:"bold",textOutline:"1px contrast"}},gridLineWidth:1,lineWidth:0},P.defaultLeftAxisOptions={title:{rotation:270}},P.defaultRightAxisOptions={title:{rotation:90}},P.defaultBottomAxisOptions={labels:{autoRotation:[-45]},margin:15,title:{rotation:0}},P.defaultTopAxisOptions={labels:{autoRotation:[-45]},margin:15,title:{rotation:0}}}(B||(B={})),B}),et(w,"Core/Foundation.js",[w["Core/Utilities.js"]],function(B){const{addEvent:P,isFunction:$,objectEach:q,removeEvent:J}=B;var Y;return function(X){X.registerEventOptions=function(C,R){C.eventOptions=C.eventOptions||{},q(R.events,function(N,x){C.eventOptions[x]!==N&&(C.eventOptions[x]&&(J(C,x,C.eventOptions[x]),delete C.eventOptions[x]),$(N)&&(C.eventOptions[x]=N,P(C,x,N,{order:0})))})}}(Y||(Y={})),Y}),et(w,"Core/Axis/Tick.js",[w["Core/Templating.js"],w["Core/Globals.js"],w["Core/Utilities.js"]],function(B,P,$){const{deg2rad:q}=P,{clamp:J,correctFloat:Y,defined:X,destroyObjectProperties:C,extend:R,fireEvent:N,isNumber:x,merge:v,objectEach:_,pick:A}=$;class c{constructor(k,g,O,b,S){this.isNewLabel=this.isNew=!0,this.axis=k,this.pos=g,this.type=O||"",this.parameters=S||{},this.tickmarkOffset=this.parameters.tickmarkOffset,this.options=this.parameters.options,N(this,"init"),O||b||this.addLabel()}addLabel(){const k=this,g=k.axis;var O=g.options;const b=g.chart;var S=g.categories;const o=g.logarithmic,r=g.names,u=k.pos,h=A(k.options&&k.options.labels,O.labels);var d=g.tickPositions;const e=u===d[0],t=u===d[d.length-1],i=(!h.step||h.step===1)&&g.tickInterval===1;d=d.info;let l=k.label,p,E,a;S=this.parameters.category||(S?A(S[u],r[u],u):u),o&&x(S)&&(S=Y(o.lin2log(S))),g.dateTime&&(d?(E=b.time.resolveDTLFormat(O.dateTimeLabelFormats[!O.grid&&d.higherRanks[u]||d.unitName]),p=E.main):x(S)&&(p=g.dateTime.getXDateFormat(S,O.dateTimeLabelFormats||{}))),k.isFirst=e,k.isLast=t;const L={axis:g,chart:b,dateTimeLabelFormat:p,isFirst:e,isLast:t,pos:u,tick:k,tickPositionInfo:d,value:S};N(this,"labelFormat",L);const W=nt=>h.formatter?h.formatter.call(nt,nt):h.format?(nt.text=g.defaultLabelFormatter.call(nt,nt),B.format(h.format,nt,b)):g.defaultLabelFormatter.call(nt,nt);O=W.call(L,L);const Q=E&&E.list;k.shortenLabel=Q?function(){for(a=0;a<Q.length;a++)if(R(L,{dateTimeLabelFormat:Q[a]}),l.attr({text:W.call(L,L)}),l.getBBox().width<g.getSlotWidth(k)-2*h.padding)return;l.attr({text:""})}:void 0,i&&g._addedPlotLB&&k.moveLabel(O,h),X(l)||k.movedLabel?l&&l.textStr!==O&&!i&&(!l.textWidth||h.style.width||l.styles.width||l.css({width:null}),l.attr({text:O}),l.textPxLength=l.getBBox().width):(k.label=l=k.createLabel({x:0,y:0},O,h),k.rotation=0)}createLabel(k,g,O){const b=this.axis,S=b.chart;return(k=X(g)&&O.enabled?S.renderer.text(g,k.x,k.y,O.useHTML).add(b.labelGroup):null)&&(S.styledMode||k.css(v(O.style)),k.textPxLength=k.getBBox().width),k}destroy(){C(this,this.axis)}getPosition(k,g,O,b){const S=this.axis,o=S.chart,r=b&&o.oldChartHeight||o.chartHeight;return k={x:k?Y(S.translate(g+O,void 0,void 0,b)+S.transB):S.left+S.offset+(S.opposite?(b&&o.oldChartWidth||o.chartWidth)-S.right-S.left:0),y:k?r-S.bottom+S.offset-(S.opposite?S.height:0):Y(r-S.translate(g+O,void 0,void 0,b)-S.transB)},k.y=J(k.y,-1e5,1e5),N(this,"afterGetPosition",{pos:k}),k}getLabelPosition(k,g,O,b,S,o,r,u){const h=this.axis,d=h.transA,e=h.isLinked&&h.linkedParent?h.linkedParent.reversed:h.reversed,t=h.staggerLines,i=h.tickRotCorr||{x:0,y:0},l=b||h.reserveSpaceDefault?0:-h.labelOffset*(h.labelAlign==="center"?.5:1),p=S.distance,E={};return O=h.side===0?O.rotation?-p:-O.getBBox().height:h.side===2?i.y+p:Math.cos(O.rotation*q)*(i.y-O.getBBox(!1,0).height/2),X(S.y)&&(O=h.side===0&&h.horiz?S.y+O:S.y),k=k+A(S.x,[0,1,0,-1][h.side]*p)+l+i.x-(o&&b?o*d*(e?-1:1):0),g=g+O-(o&&!b?o*d*(e?1:-1):0),t&&(b=r/(u||1)%t,h.opposite&&(b=t-b-1),g+=h.labelOffset/t*b),E.x=k,E.y=Math.round(g),N(this,"afterGetLabelPosition",{pos:E,tickmarkOffset:o,index:r}),E}getLabelSize(){return this.label?this.label.getBBox()[this.axis.horiz?"height":"width"]:0}getMarkPath(k,g,O,b,S,o){return o.crispLine([["M",k,g],["L",k+(S?0:-O),g+(S?O:0)]],b)}handleOverflow(k){const g=this.axis,O=g.options.labels,b=k.x;var S=g.chart.chartWidth,o=g.chart.spacing;const r=A(g.labelLeft,Math.min(g.pos,o[3]));o=A(g.labelRight,Math.max(g.isRadial?0:g.pos+g.len,S-o[1]));const u=this.label,h=this.rotation,d={left:0,center:.5,right:1}[g.labelAlign||u.attr("align")],e=u.getBBox().width,t=g.getSlotWidth(this),i={};let l=t,p=1,E;h||O.overflow!=="justify"?0>h&&b-d*e<r?E=Math.round(b/Math.cos(h*q)-r):0<h&&b+d*e>o&&(E=Math.round((S-b)/Math.cos(h*q))):(S=b+(1-d)*e,b-d*e<r?l=k.x+l*(1-d)-r:S>o&&(l=o-k.x+l*d,p=-1),l=Math.min(t,l),l<t&&g.labelAlign==="center"&&(k.x+=p*(t-l-d*(t-Math.min(e,l)))),(e>l||g.autoRotation&&(u.styles||{}).width)&&(E=l)),E&&(this.shortenLabel?this.shortenLabel():(i.width=Math.floor(E)+"px",(O.style||{}).textOverflow||(i.textOverflow="ellipsis"),u.css(i)))}moveLabel(k,g){const O=this;var b=O.label;const S=O.axis;let o=!1;b&&b.textStr===k?(O.movedLabel=b,o=!0,delete O.label):_(S.ticks,function(r){o||r.isNew||r===O||!r.label||r.label.textStr!==k||(O.movedLabel=r.label,o=!0,r.labelPos=O.movedLabel.xy,delete r.label)}),o||!O.labelPos&&!b||(b=O.labelPos||b.xy,O.movedLabel=O.createLabel(b,k,g),O.movedLabel&&O.movedLabel.attr({opacity:0}))}render(k,g,O){var b=this.axis,S=b.horiz,o=this.pos,r=A(this.tickmarkOffset,b.tickmarkOffset);o=this.getPosition(S,o,r,g),r=o.x;const u=o.y;b=S&&r===b.pos+b.len||!S&&u===b.pos?-1:1,S=A(O,this.label&&this.label.newOpacity,1),O=A(O,1),this.isActive=!0,this.renderGridLine(g,O,b),this.renderMark(o,O,b),this.renderLabel(o,g,S,k),this.isNew=!1,N(this,"afterRender")}renderGridLine(k,g,O){const b=this.axis,S=b.options,o={},r=this.pos,u=this.type,h=A(this.tickmarkOffset,b.tickmarkOffset),d=b.chart.renderer;let e=this.gridLine,t=S.gridLineWidth,i=S.gridLineColor,l=S.gridLineDashStyle;this.type==="minor"&&(t=S.minorGridLineWidth,i=S.minorGridLineColor,l=S.minorGridLineDashStyle),e||(b.chart.styledMode||(o.stroke=i,o["stroke-width"]=t||0,o.dashstyle=l),u||(o.zIndex=1),k&&(g=0),this.gridLine=e=d.path().attr(o).addClass("highcharts-"+(u?u+"-":"")+"grid-line").add(b.gridGroup)),e&&(O=b.getPlotLinePath({value:r+h,lineWidth:e.strokeWidth()*O,force:"pass",old:k,acrossPanes:!1}))&&e[k||this.isNew?"attr":"animate"]({d:O,opacity:g})}renderMark(k,g,O){const b=this.axis;var S=b.options;const o=b.chart.renderer,r=this.type,u=b.tickSize(r?r+"Tick":"tick"),h=k.x;k=k.y;const d=A(S[r!=="minor"?"tickWidth":"minorTickWidth"],!r&&b.isXAxis?1:0);S=S[r!=="minor"?"tickColor":"minorTickColor"];let e=this.mark;const t=!e;u&&(b.opposite&&(u[0]=-u[0]),e||(this.mark=e=o.path().addClass("highcharts-"+(r?r+"-":"")+"tick").add(b.axisGroup),b.chart.styledMode||e.attr({stroke:S,"stroke-width":d})),e[t?"attr":"animate"]({d:this.getMarkPath(h,k,u[0],e.strokeWidth()*O,b.horiz,o),opacity:g}))}renderLabel(k,g,O,b){var S=this.axis;const o=S.horiz,r=S.options,u=this.label,h=r.labels,d=h.step;S=A(this.tickmarkOffset,S.tickmarkOffset);const e=k.x;k=k.y;let t=!0;u&&x(e)&&(u.xy=k=this.getLabelPosition(e,k,u,o,h,S,b,d),this.isFirst&&!this.isLast&&!r.showFirstLabel||this.isLast&&!this.isFirst&&!r.showLastLabel?t=!1:!o||h.step||h.rotation||g||O===0||this.handleOverflow(k),d&&b%d&&(t=!1),t&&x(k.y)?(k.opacity=O,u[this.isNewLabel?"attr":"animate"](k).show(!0),this.isNewLabel=!1):(u.hide(),this.isNewLabel=!0))}replaceMovedLabel(){const k=this.label,g=this.axis;k&&!this.isNew&&(k.animate({opacity:0},void 0,k.destroy),delete this.label),g.isDirty=!0,this.label=this.movedLabel,delete this.movedLabel}}return c}),et(w,"Core/Axis/Axis.js",[w["Core/Animation/AnimationUtilities.js"],w["Core/Axis/AxisDefaults.js"],w["Core/Color/Color.js"],w["Core/Defaults.js"],w["Core/Foundation.js"],w["Core/Globals.js"],w["Core/Axis/Tick.js"],w["Core/Utilities.js"]],function(B,P,$,q,J,Y,X,C){const{animObject:R}=B,{defaultOptions:N}=q,{registerEventOptions:x}=J,{deg2rad:v}=Y,{arrayMax:_,arrayMin:A,clamp:c,correctFloat:y,defined:k,destroyObjectProperties:g,erase:O,error:b,extend:S,fireEvent:o,getClosestDistance:r,insertItem:u,isArray:h,isNumber:d,isString:e,merge:t,normalizeTickInterval:i,objectEach:l,pick:p,relativeLength:E,removeEvent:a,splat:L,syncTimeout:W}=C,Q=(D,s)=>i(s,void 0,void 0,p(D.options.allowDecimals,.5>s||D.tickAmount!==void 0),!!D.tickAmount);class nt{constructor(s,M,z){this.zoomEnabled=this.width=this.visible=this.userOptions=this.translationSlope=this.transB=this.transA=this.top=this.ticks=this.tickRotCorr=this.tickPositions=this.tickmarkOffset=this.tickInterval=this.tickAmount=this.side=this.series=this.right=this.positiveValuesOnly=this.pos=this.pointRangePadding=this.pointRange=this.plotLinesAndBandsGroups=this.plotLinesAndBands=this.paddedTicks=this.overlap=this.options=this.offset=this.names=this.minPixelPadding=this.minorTicks=this.minorTickInterval=this.min=this.maxLabelLength=this.max=this.len=this.left=this.labelFormatter=this.labelEdge=this.isLinked=this.index=this.height=this.hasVisibleSeries=this.hasNames=this.eventOptions=this.coll=this.closestPointRange=this.chart=this.bottom=this.alternateBands=void 0,this.init(s,M,z)}init(s,M,z=this.coll){const j=z==="xAxis";this.chart=s,this.horiz=this.isZAxis||(s.inverted?!j:j),this.isXAxis=j,this.coll=z,o(this,"init",{userOptions:M}),this.opposite=p(M.opposite,this.opposite),this.side=p(M.side,this.side,this.horiz?this.opposite?0:2:this.opposite?1:3),this.setOptions(M),z=this.options;const K=z.labels,n=z.type;this.userOptions=M,this.minPixelPadding=0,this.reversed=p(z.reversed,this.reversed),this.visible=z.visible,this.zoomEnabled=z.zoomEnabled,this.hasNames=n==="category"||z.categories===!0,this.categories=z.categories||(this.hasNames?[]:void 0),this.names||(this.names=[],this.names.keys={}),this.plotLinesAndBandsGroups={},this.positiveValuesOnly=!!this.logarithmic,this.isLinked=k(z.linkedTo),this.ticks={},this.labelEdge=[],this.minorTicks={},this.plotLinesAndBands=[],this.alternateBands={},this.len=0,this.minRange=this.userMinRange=z.minRange||z.maxZoom,this.range=z.range,this.offset=z.offset||0,this.min=this.max=null,M=p(z.crosshair,L(s.options.tooltip.crosshairs)[j?0:1]),this.crosshair=M===!0?{}:M,s.axes.indexOf(this)===-1&&(j?s.axes.splice(s.xAxis.length,0,this):s.axes.push(this),u(this,s[this.coll])),s.orderItems(this.coll),this.series=this.series||[],s.inverted&&!this.isZAxis&&j&&typeof this.reversed>"u"&&(this.reversed=!0),this.labelRotation=d(K.rotation)?K.rotation:void 0,x(this,z),o(this,"afterInit")}setOptions(s){this.options=t(P.defaultXAxisOptions,this.coll==="yAxis"&&P.defaultYAxisOptions,[P.defaultTopAxisOptions,P.defaultRightAxisOptions,P.defaultBottomAxisOptions,P.defaultLeftAxisOptions][this.side],t(N[this.coll],s)),o(this,"afterSetOptions",{userOptions:s})}defaultLabelFormatter(s){var M=this.axis;({numberFormatter:s}=this.chart);const z=d(this.value)?this.value:NaN,j=M.chart.time,K=this.dateTimeLabelFormat;var n=N.lang;const f=n.numericSymbols;n=n.numericSymbolMagnitude||1e3;const m=M.logarithmic?Math.abs(z):M.tickInterval;let G=f&&f.length,F;if(M.categories)F=`${this.value}`;else if(K)F=j.dateFormat(K,z);else if(G&&1e3<=m)for(;G--&&typeof F>"u";)M=Math.pow(n,G+1),m>=M&&10*z%M===0&&f[G]!==null&&z!==0&&(F=s(z/M,-1)+f[G]);return typeof F>"u"&&(F=1e4<=Math.abs(z)?s(z,-1):s(z,-1,void 0,"")),F}getSeriesExtremes(){const s=this,M=s.chart;let z;o(this,"getSeriesExtremes",null,function(){s.hasVisibleSeries=!1,s.dataMin=s.dataMax=s.threshold=null,s.softThreshold=!s.isXAxis,s.series.forEach(function(j){if(j.visible||!M.options.chart.ignoreHiddenSeries){var K=j.options;let n=K.threshold,f,m;s.hasVisibleSeries=!0,s.positiveValuesOnly&&0>=n&&(n=null),s.isXAxis?(K=j.xData)&&K.length&&(K=s.logarithmic?K.filter(G=>0<G):K,z=j.getXExtremes(K),f=z.min,m=z.max,d(f)||f instanceof Date||(K=K.filter(d),z=j.getXExtremes(K),f=z.min,m=z.max),K.length&&(s.dataMin=Math.min(p(s.dataMin,f),f),s.dataMax=Math.max(p(s.dataMax,m),m))):(j=j.applyExtremes(),d(j.dataMin)&&(f=j.dataMin,s.dataMin=Math.min(p(s.dataMin,f),f)),d(j.dataMax)&&(m=j.dataMax,s.dataMax=Math.max(p(s.dataMax,m),m)),k(n)&&(s.threshold=n),(!K.softThreshold||s.positiveValuesOnly)&&(s.softThreshold=!1))}})}),o(this,"afterGetSeriesExtremes")}translate(s,M,z,j,K,n){const f=this.linkedParent||this,m=j&&f.old?f.old.min:f.min;if(!d(m))return NaN;const G=f.minPixelPadding;K=(f.isOrdinal||f.brokenAxis&&f.brokenAxis.hasBreaks||f.logarithmic&&K)&&f.lin2val;let F=1,H=0;return j=j&&f.old?f.old.transA:f.transA,j||(j=f.transA),z&&(F*=-1,H=f.len),f.reversed&&(F*=-1,H-=F*(f.sector||f.len)),M?(n=(s*F+H-G)/j+m,K&&(n=f.lin2val(n))):(K&&(s=f.val2lin(s)),s=F*(s-m)*j,n=(f.isRadial?s:y(s))+H+F*G+(d(n)?j*n:0)),n}toPixels(s,M){return this.translate(s,!1,!this.horiz,void 0,!0)+(M?0:this.pos)}toValue(s,M){return this.translate(s-(M?0:this.pos),!0,!this.horiz,void 0,!0)}getPlotLinePath(s){function M(V,ot,dt){return lt!=="pass"&&(V<ot||V>dt)&&(lt?V=c(V,ot,dt):tt=!0),V}const z=this,j=z.chart,K=z.left,n=z.top,f=s.old,m=s.value,G=s.lineWidth,F=f&&j.oldChartHeight||j.chartHeight,H=f&&j.oldChartWidth||j.chartWidth,st=z.transB;let rt=s.translatedValue,lt=s.force,ht,pt,I,T,tt;return s={value:m,lineWidth:G,old:f,force:lt,acrossPanes:s.acrossPanes,translatedValue:rt},o(this,"getPlotLinePath",s,function(V){rt=p(rt,z.translate(m,void 0,void 0,f)),rt=c(rt,-1e5,1e5),ht=I=Math.round(rt+st),pt=T=Math.round(F-rt-st),d(rt)?z.horiz?(pt=n,T=F-z.bottom,ht=I=M(ht,K,K+z.width)):(ht=K,I=H-z.right,pt=T=M(pt,n,n+z.height)):(tt=!0,lt=!1),V.path=tt&&!lt?null:j.renderer.crispLine([["M",ht,pt],["L",I,T]],G||1)}),s.path}getLinearTickPositions(s,M,z){const j=y(Math.floor(M/s)*s);z=y(Math.ceil(z/s)*s);const K=[];let n,f;if(y(j+s)===j&&(f=20),this.single)return[M];for(M=j;M<=z&&(K.push(M),M=y(M+s,f),M!==n);)n=M;return K}getMinorTickInterval(){const s=this.options;return s.minorTicks===!0?p(s.minorTickInterval,"auto"):s.minorTicks===!1?null:s.minorTickInterval}getMinorTickPositions(){var s=this.options;const M=this.tickPositions,z=this.minorTickInterval;var j=this.pointRangePadding||0;const K=this.min-j;j=this.max+j;const n=j-K;let f=[];if(n&&n/z<this.len/3){const m=this.logarithmic;if(m)this.paddedTicks.forEach(function(G,F,H){F&&f.push.apply(f,m.getLogTickPositions(z,H[F-1],H[F],!0))});else if(this.dateTime&&this.getMinorTickInterval()==="auto")f=f.concat(this.getTimeTicks(this.dateTime.normalizeTimeTickInterval(z),K,j,s.startOfWeek));else for(s=K+(M[0]-K)%z;s<=j&&s!==f[0];s+=z)f.push(s)}return f.length!==0&&this.trimTicks(f),f}adjustForMinRange(){const s=this.options,M=this.logarithmic;let z=this.min;var j=this.max;let K,n;if(this.isXAxis&&typeof this.minRange>"u"&&!M)if(k(s.min)||k(s.max)||k(s.floor)||k(s.ceiling))this.minRange=null;else{var f=r(this.series.map(m=>{var G;return(m.xIncrement?(G=m.xData)===null||G===void 0?void 0:G.slice(0,2):m.xData)||[]}))||0;this.minRange=Math.min(5*f,this.dataMax-this.dataMin)}j-z<this.minRange&&(f=this.dataMax-this.dataMin>=this.minRange,n=this.minRange,j=(n-j+z)/2,K=[z-j,p(s.min,z-j)],f&&(K[2]=M?M.log2lin(this.dataMin):this.dataMin),z=_(K),j=[z+n,p(s.max,z+n)],f&&(j[2]=M?M.log2lin(this.dataMax):this.dataMax),j=A(j),j-z<n&&(K[0]=j-n,K[1]=p(s.min,j-n),z=_(K))),this.min=z,this.max=j}getClosest(){let s,M;if(this.categories)M=1;else{const z=[];this.series.forEach(function(j){var K;const n=j.closestPointRange,f=j.visible||!j.chart.options.chart.ignoreHiddenSeries;((K=j.xData)===null||K===void 0?void 0:K.length)===1?z.push(j.xData[0]):!j.noSharedTooltip&&k(n)&&f&&(M=k(M)?Math.min(M,n):n)}),z.length&&(z.sort((j,K)=>j-K),s=r([z]))}return s&&M?Math.min(s,M):s||M}nameToX(s){const M=h(this.options.categories),z=M?this.categories:this.names;let j=s.options.x,K;return s.series.requireSorting=!1,k(j)||(j=this.options.uniqueNames&&z?M?z.indexOf(s.name):p(z.keys[s.name],-1):s.series.autoIncrement()),j===-1?!M&&z&&(K=z.length):K=j,typeof K<"u"?(this.names[K]=s.name,this.names.keys[s.name]=K):s.x&&(K=s.x),K}updateNames(){const s=this,M=this.names;0<M.length&&(Object.keys(M.keys).forEach(function(z){delete M.keys[z]}),M.length=0,this.minRange=this.userMinRange,(this.series||[]).forEach(function(z){z.xIncrement=null,(!z.points||z.isDirtyData)&&(s.max=Math.max(s.max,z.xData.length-1),z.processData(),z.generatePoints()),z.data.forEach(function(j,K){let n;j&&j.options&&typeof j.name<"u"&&(n=s.nameToX(j),typeof n<"u"&&n!==j.x&&(j.x=n,z.xData[K]=n))})}))}setAxisTranslation(){const s=this,M=s.max-s.min;var z=s.linkedParent;const j=!!s.categories,K=s.isXAxis;let n=s.axisPointRange||0,f,m=0,G=0,F=s.transA;(K||j||n)&&(f=s.getClosest(),z?(m=z.minPointOffset,G=z.pointRangePadding):s.series.forEach(function(H){const st=j?1:K?p(H.options.pointRange,f,0):s.axisPointRange||0,rt=H.options.pointPlacement;n=Math.max(n,st),(!s.single||j)&&(H=H.is("xrange")?!K:K,m=Math.max(m,H&&e(rt)?0:st/2),G=Math.max(G,H&&rt==="on"?0:st))}),z=s.ordinal&&s.ordinal.slope&&f?s.ordinal.slope/f:1,s.minPointOffset=m*=z,s.pointRangePadding=G*=z,s.pointRange=Math.min(n,s.single&&j?1:M),K&&f&&(s.closestPointRange=f)),s.translationSlope=s.transA=F=s.staticScale||s.len/(M+G||1),s.transB=s.horiz?s.left:s.bottom,s.minPixelPadding=F*m,o(this,"afterSetAxisTranslation")}minFromRange(){return this.max-this.range}setTickInterval(s){var M=this.chart;const z=this.logarithmic,j=this.options,K=this.isXAxis,n=this.isLinked,f=j.tickPixelInterval,m=this.categories,G=this.softThreshold;let F=j.maxPadding,H=j.minPadding,st=d(j.tickInterval)&&0<=j.tickInterval?j.tickInterval:void 0,rt=d(this.threshold)?this.threshold:null,lt,ht,pt;if(this.dateTime||m||n||this.getTickAmount(),ht=p(this.userMin,j.min),pt=p(this.userMax,j.max),n){this.linkedParent=M[this.coll][j.linkedTo];var I=this.linkedParent.getExtremes();this.min=p(I.min,I.dataMin),this.max=p(I.max,I.dataMax),j.type!==this.linkedParent.options.type&&b(11,1,M)}else G&&k(rt)&&(this.dataMin>=rt?(I=rt,H=0):this.dataMax<=rt&&(lt=rt,F=0)),this.min=p(ht,I,this.dataMin),this.max=p(pt,lt,this.dataMax);if(z&&(this.positiveValuesOnly&&!s&&0>=Math.min(this.min,p(this.dataMin,this.min))&&b(10,1,M),this.min=y(z.log2lin(this.min),16),this.max=y(z.log2lin(this.max),16)),this.range&&k(this.max)&&(this.userMin=this.min=ht=Math.max(this.dataMin,this.minFromRange()),this.userMax=pt=this.max,this.range=null),o(this,"foundExtremes"),this.beforePadding&&this.beforePadding(),this.adjustForMinRange(),!d(this.userMin)&&d(j.softMin)&&j.softMin<this.min&&(this.min=ht=j.softMin),!d(this.userMax)&&d(j.softMax)&&j.softMax>this.max&&(this.max=pt=j.softMax),!(m||this.axisPointRange||this.stacking&&this.stacking.usePercentage||n)&&k(this.min)&&k(this.max)&&(M=this.max-this.min)&&(!k(ht)&&H&&(this.min-=M*H),!k(pt)&&F&&(this.max+=M*F)),!d(this.userMin)&&d(j.floor)&&(this.min=Math.max(this.min,j.floor)),!d(this.userMax)&&d(j.ceiling)&&(this.max=Math.min(this.max,j.ceiling)),G&&k(this.dataMin)&&(rt=rt||0,!k(ht)&&this.min<rt&&this.dataMin>=rt?this.min=this.options.minRange?Math.min(rt,this.max-this.minRange):rt:!k(pt)&&this.max>rt&&this.dataMax<=rt&&(this.max=this.options.minRange?Math.max(rt,this.min+this.minRange):rt)),d(this.min)&&d(this.max)&&!this.chart.polar&&this.min>this.max&&(k(this.options.min)?this.max=this.min:k(this.options.max)&&(this.min=this.max)),this.tickInterval=this.min===this.max||typeof this.min>"u"||typeof this.max>"u"?1:n&&this.linkedParent&&!st&&f===this.linkedParent.options.tickPixelInterval?st=this.linkedParent.tickInterval:p(st,this.tickAmount?(this.max-this.min)/Math.max(this.tickAmount-1,1):void 0,m?1:(this.max-this.min)*f/Math.max(this.len,f)),K&&!s){const T=this.min!==(this.old&&this.old.min)||this.max!==(this.old&&this.old.max);this.series.forEach(function(tt){tt.forceCrop=tt.forceCropping&&tt.forceCropping(),tt.processData(T)}),o(this,"postProcessData",{hasExtremesChanged:T})}this.setAxisTranslation(),o(this,"initialAxisTranslation"),this.pointRange&&!st&&(this.tickInterval=Math.max(this.pointRange,this.tickInterval)),s=p(j.minTickInterval,this.dateTime&&!this.series.some(T=>T.noSharedTooltip)?this.closestPointRange:0),!st&&this.tickInterval<s&&(this.tickInterval=s),this.dateTime||this.logarithmic||st||(this.tickInterval=Q(this,this.tickInterval)),this.tickAmount||(this.tickInterval=this.unsquish()),this.setTickPositions()}setTickPositions(){var s=this.options;const M=s.tickPositions,z=s.tickPositioner;var j=this.getMinorTickInterval(),K=this.hasVerticalPanning(),n=this.coll==="colorAxis";const f=(n||!K)&&s.startOnTick;K=(n||!K)&&s.endOnTick,n=[];let m;if(this.tickmarkOffset=this.categories&&s.tickmarkPlacement==="between"&&this.tickInterval===1?.5:0,this.minorTickInterval=j==="auto"&&this.tickInterval?this.tickInterval/s.minorTicksPerMajor:j,this.single=this.min===this.max&&k(this.min)&&!this.tickAmount&&(parseInt(this.min,10)===this.min||s.allowDecimals!==!1),M)n=M.slice();else if(d(this.min)&&d(this.max)){if(this.ordinal&&this.ordinal.positions||!((this.max-this.min)/this.tickInterval>Math.max(2*this.len,200)))if(this.dateTime)n=this.getTimeTicks(this.dateTime.normalizeTimeTickInterval(this.tickInterval,s.units),this.min,this.max,s.startOfWeek,this.ordinal&&this.ordinal.positions,this.closestPointRange,!0);else if(this.logarithmic)n=this.logarithmic.getLogTickPositions(this.tickInterval,this.min,this.max);else for(j=s=this.tickInterval;j<=2*s&&(n=this.getLinearTickPositions(this.tickInterval,this.min,this.max),this.tickAmount&&n.length>this.tickAmount);)this.tickInterval=Q(this,j*=1.1);else n=[this.min,this.max],b(19,!1,this.chart);n.length>this.len&&(n=[n[0],n[n.length-1]],n[0]===n[1]&&(n.length=1)),z&&(this.tickPositions=n,(m=z.apply(this,[this.min,this.max]))&&(n=m))}this.tickPositions=n,this.paddedTicks=n.slice(0),this.trimTicks(n,f,K),!this.isLinked&&d(this.min)&&d(this.max)&&(this.single&&2>n.length&&!this.categories&&!this.series.some(G=>G.is("heatmap")&&G.options.pointPlacement==="between")&&(this.min-=.5,this.max+=.5),M||m||this.adjustTickAmount()),o(this,"afterSetTickPositions")}trimTicks(s,M,z){const j=s[0],K=s[s.length-1],n=!this.isOrdinal&&this.minPointOffset||0;if(o(this,"trimTicks"),!this.isLinked){if(M&&j!==-1/0)this.min=j;else for(;this.min-n>s[0];)s.shift();if(z)this.max=K;else for(;this.max+n<s[s.length-1];)s.pop();s.length===0&&k(j)&&!this.options.tickPositions&&s.push((K+j)/2)}}alignToOthers(){const s=this,M=[this],z=s.options,j=this.coll==="yAxis"&&this.chart.options.chart.alignThresholds,K=[];let n;if(s.thresholdAlignment=void 0,(this.chart.options.chart.alignTicks!==!1&&z.alignTicks||j)&&z.startOnTick!==!1&&z.endOnTick!==!1&&!s.logarithmic){const f=G=>{const{horiz:F,options:H}=G;return[F?H.left:H.top,H.width,H.height,H.pane].join()},m=f(this);this.chart[this.coll].forEach(function(G){const{series:F}=G;F.length&&F.some(H=>H.visible)&&G!==s&&f(G)===m&&(n=!0,M.push(G))})}if(n&&j){M.forEach(m=>{m=m.getThresholdAlignment(s),d(m)&&K.push(m)});const f=1<K.length?K.reduce((m,G)=>m+G,0)/K.length:void 0;M.forEach(m=>{m.thresholdAlignment=f})}return n}getThresholdAlignment(s){if((!d(this.dataMin)||this!==s&&this.series.some(M=>M.isDirty||M.isDirtyData))&&this.getSeriesExtremes(),d(this.threshold))return s=c((this.threshold-(this.dataMin||0))/((this.dataMax||0)-(this.dataMin||0)),0,1),this.options.reversed&&(s=1-s),s}getTickAmount(){const s=this.options,M=s.tickPixelInterval;let z=s.tickAmount;!k(s.tickInterval)&&!z&&this.len<M&&!this.isRadial&&!this.logarithmic&&s.startOnTick&&s.endOnTick&&(z=2),!z&&this.alignToOthers()&&(z=Math.ceil(this.len/M)+1),4>z&&(this.finalTickAmt=z,z=5),this.tickAmount=z}adjustTickAmount(){const s=this,{finalTickAmt:M,max:z,min:j,options:K,tickPositions:n,tickAmount:f,thresholdAlignment:m}=s,G=n&&n.length;var F=p(s.threshold,s.softThreshold?0:null),H=s.tickInterval;let st;if(d(m)&&(st=.5>m?Math.ceil(m*(f-1)):Math.floor(m*(f-1)),K.reversed&&(st=f-1-st)),s.hasData()&&d(j)&&d(z)){const rt=()=>{s.transA*=(G-1)/(f-1),s.min=K.startOnTick?n[0]:Math.min(j,n[0]),s.max=K.endOnTick?n[n.length-1]:Math.max(z,n[n.length-1])};if(d(st)&&d(s.threshold)){for(;n[st]!==F||n.length!==f||n[0]>j||n[n.length-1]<z;){for(n.length=0,n.push(s.threshold);n.length<f;)n[st]===void 0||n[st]>s.threshold?n.unshift(y(n[0]-H)):n.push(y(n[n.length-1]+H));if(H>8*s.tickInterval)break;H*=2}rt()}else if(G<f){for(;n.length<f;)n.length%2||j===F?n.push(y(n[n.length-1]+H)):n.unshift(y(n[0]-H));rt()}if(k(M)){for(H=F=n.length;H--;)(M===3&&H%2===1||2>=M&&0<H&&H<F-1)&&n.splice(H,1);s.finalTickAmt=void 0}}}setScale(){let s=!1,M=!1;this.series.forEach(function(j){s=s||j.isDirtyData||j.isDirty,M=M||j.xAxis&&j.xAxis.isDirty||!1}),this.setAxisSize();const z=this.len!==(this.old&&this.old.len);z||s||M||this.isLinked||this.forceRedraw||this.userMin!==(this.old&&this.old.userMin)||this.userMax!==(this.old&&this.old.userMax)||this.alignToOthers()?(this.stacking&&(this.stacking.resetStacks(),this.stacking.buildStacks()),this.forceRedraw=!1,this.userMinRange||(this.minRange=void 0),this.getSeriesExtremes(),this.setTickInterval(),this.isDirty||(this.isDirty=z||this.min!==(this.old&&this.old.min)||this.max!==(this.old&&this.old.max))):this.stacking&&this.stacking.cleanStacks(),s&&this.panningState&&(this.panningState.isDirty=!0),o(this,"afterSetScale")}setExtremes(s,M,z,j,K){const n=this,f=n.chart;z=p(z,!0),n.series.forEach(function(m){delete m.kdTree}),K=S(K,{min:s,max:M}),o(n,"setExtremes",K,function(){n.userMin=s,n.userMax=M,n.eventArgs=K,z&&f.redraw(j)})}zoom(s,M){const z=this,j=this.dataMin,K=this.dataMax,n=this.options,f=Math.min(j,p(n.min,j)),m=Math.max(K,p(n.max,K));return s={newMin:s,newMax:M},o(this,"zoom",s,function(G){let F=G.newMin,H=G.newMax;(F!==z.min||H!==z.max)&&(z.allowZoomOutside||(k(j)&&(F<f&&(F=f),F>m&&(F=m)),k(K)&&(H<f&&(H=f),H>m&&(H=m))),z.displayBtn=typeof F<"u"||typeof H<"u",z.setExtremes(F,H,!1,void 0,{trigger:"zoom"})),G.zoomed=!0}),s.zoomed}setAxisSize(){const s=this.chart;var M=this.options;const z=M.offsets||[0,0,0,0],j=this.horiz,K=this.width=Math.round(E(p(M.width,s.plotWidth-z[3]+z[1]),s.plotWidth)),n=this.height=Math.round(E(p(M.height,s.plotHeight-z[0]+z[2]),s.plotHeight)),f=this.top=Math.round(E(p(M.top,s.plotTop+z[0]),s.plotHeight,s.plotTop));M=this.left=Math.round(E(p(M.left,s.plotLeft+z[3]),s.plotWidth,s.plotLeft)),this.bottom=s.chartHeight-n-f,this.right=s.chartWidth-K-M,this.len=Math.max(j?K:n,0),this.pos=j?M:f}getExtremes(){const s=this.logarithmic;return{min:s?y(s.lin2log(this.min)):this.min,max:s?y(s.lin2log(this.max)):this.max,dataMin:this.dataMin,dataMax:this.dataMax,userMin:this.userMin,userMax:this.userMax}}getThreshold(s){var M=this.logarithmic;const z=M?M.lin2log(this.min):this.min;return M=M?M.lin2log(this.max):this.max,s===null||s===-1/0?s=z:s===1/0?s=M:z>s?s=z:M<s&&(s=M),this.translate(s,0,1,0,1)}autoLabelAlign(s){const M=(p(s,0)-90*this.side+720)%360;return s={align:"center"},o(this,"autoLabelAlign",s,function(z){15<M&&165>M?z.align="right":195<M&&345>M&&(z.align="left")}),s.align}tickSize(s){const M=this.options,z=p(M[s==="tick"?"tickWidth":"minorTickWidth"],s==="tick"&&this.isXAxis&&!this.categories?1:0);let j=M[s==="tick"?"tickLength":"minorTickLength"],K;return z&&j&&(M[s+"Position"]==="inside"&&(j=-j),K=[j,z]),s={tickSize:K},o(this,"afterTickSize",s),s.tickSize}labelMetrics(){const s=this.chart.renderer;var M=this.ticks;return M=M[Object.keys(M)[0]]||{},this.chart.renderer.fontMetrics(M.label||M.movedLabel||s.box)}unsquish(){const s=this.options.labels;var M=this.horiz;const z=this.tickInterval,j=this.len/(((this.categories?1:0)+this.max-this.min)/z),K=s.rotation,n=.75*this.labelMetrics().h,f=Math.max(this.max-this.min,0),m=function(rt){let lt=rt/(j||1);return lt=1<lt?Math.ceil(lt):1,lt*z>f&&rt!==1/0&&j!==1/0&&f&&(lt=Math.ceil(f/z)),y(lt*z)};let G=z,F,H=Number.MAX_VALUE,st;if(M){if(s.staggerLines||(d(K)?st=[K]:j<s.autoRotationLimit&&(st=s.autoRotation)),st){let rt;for(const lt of st)(lt===K||lt&&-90<=lt&&90>=lt)&&(M=m(Math.abs(n/Math.sin(v*lt))),rt=M+Math.abs(lt/360),rt<H&&(H=rt,F=lt,G=M))}}else G=m(n);return this.autoRotation=st,this.labelRotation=p(F,d(K)?K:0),s.step?z:G}getSlotWidth(s){const M=this.chart,z=this.horiz,j=this.options.labels,K=Math.max(this.tickPositions.length-(this.categories?0:1),1),n=M.margin[3];if(s&&d(s.slotWidth))return s.slotWidth;if(z&&2>j.step)return j.rotation?0:(this.staggerLines||1)*this.len/K;if(!z){if(s=j.style.width,s!==void 0)return parseInt(String(s),10);if(n)return n-M.spacing[3]}return .33*M.chartWidth}renderUnsquish(){const s=this.chart,M=s.renderer,z=this.tickPositions,j=this.ticks,K=this.options.labels,n=K.style,f=this.horiz,m=this.getSlotWidth();var G=Math.max(1,Math.round(m-2*K.padding));const F={},H=this.labelMetrics(),st=n.textOverflow;let rt,lt,ht=0;if(e(K.rotation)||(F.rotation=K.rotation||0),z.forEach(function(I){I=j[I],I.movedLabel&&I.replaceMovedLabel(),I&&I.label&&I.label.textPxLength>ht&&(ht=I.label.textPxLength)}),this.maxLabelLength=ht,this.autoRotation)ht>G&&ht>H.h?F.rotation=this.labelRotation:this.labelRotation=0;else if(m&&(rt=G,!st))for(lt="clip",G=z.length;!f&&G--;){var pt=z[G];(pt=j[pt].label)&&(pt.styles&&pt.styles.textOverflow==="ellipsis"?pt.css({textOverflow:"clip"}):pt.textPxLength>m&&pt.css({width:m+"px"}),pt.getBBox().height>this.len/z.length-(H.h-H.f)&&(pt.specificTextOverflow="ellipsis"))}F.rotation&&(rt=ht>.5*s.chartHeight?.33*s.chartHeight:ht,st||(lt="ellipsis")),(this.labelAlign=K.align||this.autoLabelAlign(this.labelRotation))&&(F.align=this.labelAlign),z.forEach(function(I){const T=(I=j[I])&&I.label,tt=n.width,V={};T&&(T.attr(F),I.shortenLabel?I.shortenLabel():rt&&!tt&&n.whiteSpace!=="nowrap"&&(rt<T.textPxLength||T.element.tagName==="SPAN")?(V.width=rt+"px",st||(V.textOverflow=T.specificTextOverflow||lt),T.css(V)):T.styles&&T.styles.width&&!V.width&&!tt&&T.css({width:null}),delete T.specificTextOverflow,I.rotation=F.rotation)},this),this.tickRotCorr=M.rotCorr(H.b,this.labelRotation||0,this.side!==0)}hasData(){return this.series.some(function(s){return s.hasData()})||this.options.showEmpty&&k(this.min)&&k(this.max)}addTitle(s){const M=this.chart.renderer,z=this.horiz,j=this.opposite,K=this.options.title,n=this.chart.styledMode;let f;this.axisTitle||((f=K.textAlign)||(f=(z?{low:"left",middle:"center",high:"right"}:{low:j?"right":"left",middle:"center",high:j?"left":"right"})[K.align]),this.axisTitle=M.text(K.text||"",0,0,K.useHTML).attr({zIndex:7,rotation:K.rotation,align:f}).addClass("highcharts-axis-title"),n||this.axisTitle.css(t(K.style)),this.axisTitle.add(this.axisGroup),this.axisTitle.isNew=!0),n||K.style.width||this.isRadial||this.axisTitle.css({width:this.len+"px"}),this.axisTitle[s?"show":"hide"](s)}generateTick(s){const M=this.ticks;M[s]?M[s].addLabel():M[s]=new X(this,s)}getOffset(){const s=this,{chart:M,horiz:z,options:j,side:K,ticks:n,tickPositions:f,coll:m,axisParent:G}=s,F=M.renderer,H=M.inverted&&!s.isZAxis?[1,0,3,2][K]:K;var st=s.hasData();const rt=j.title;var lt=j.labels;const ht=d(j.crossing);var pt=M.axisOffset;const I=M.clipOffset,T=[-1,1,1,-1][K],tt=j.className;let V,ot=0,dt;var ct=0;let yt=0;if(s.showAxis=V=st||j.showEmpty,s.staggerLines=s.horiz&&lt.staggerLines||void 0,!s.axisGroup){const vt=(gt,xt,Mt)=>F.g(gt).attr({zIndex:Mt}).addClass(`highcharts-${m.toLowerCase()}${xt} `+(this.isRadial?`highcharts-radial-axis${xt} `:"")+(tt||"")).add(G);s.gridGroup=vt("grid","-grid",j.gridZIndex),s.axisGroup=vt("axis","",j.zIndex),s.labelGroup=vt("axis-labels","-labels",lt.zIndex)}st||s.isLinked?(f.forEach(function(vt){s.generateTick(vt)}),s.renderUnsquish(),s.reserveSpaceDefault=K===0||K===2||{1:"left",3:"right"}[K]===s.labelAlign,p(lt.reserveSpace,ht?!1:null,s.labelAlign==="center"?!0:null,s.reserveSpaceDefault)&&f.forEach(function(vt){yt=Math.max(n[vt].getLabelSize(),yt)}),s.staggerLines&&(yt*=s.staggerLines),s.labelOffset=yt*(s.opposite?-1:1)):l(n,function(vt,gt){vt.destroy(),delete n[gt]}),rt&&rt.text&&rt.enabled!==!1&&(s.addTitle(V),V&&!ht&&rt.reserveSpace!==!1&&(s.titleOffset=ot=s.axisTitle.getBBox()[z?"height":"width"],dt=rt.offset,ct=k(dt)?0:p(rt.margin,z?5:10))),s.renderLine(),s.offset=T*p(j.offset,pt[K]?pt[K]+(j.margin||0):0),s.tickRotCorr=s.tickRotCorr||{x:0,y:0},st=K===0?-s.labelMetrics().h:K===2?s.tickRotCorr.y:0,ct=Math.abs(yt)+ct,yt&&(ct=ct-st+T*(z?p(lt.y,s.tickRotCorr.y+T*lt.distance):p(lt.x,T*lt.distance))),s.axisTitleMargin=p(dt,ct),s.getMaxLabelDimensions&&(s.maxLabelDimensions=s.getMaxLabelDimensions(n,f)),m!=="colorAxis"&&(lt=this.tickSize("tick"),pt[K]=Math.max(pt[K],(s.axisTitleMargin||0)+ot+T*s.offset,ct,f&&f.length&&lt?lt[0]+T*s.offset:0),pt=!s.axisLine||j.offset?0:2*Math.floor(s.axisLine.strokeWidth()/2),I[H]=Math.max(I[H],pt)),o(this,"afterGetOffset")}getLinePath(s){const M=this.chart,z=this.opposite;var j=this.offset;const K=this.horiz,n=this.left+(z?this.width:0)+j;return j=M.chartHeight-this.bottom-(z?this.height:0)+j,z&&(s*=-1),M.renderer.crispLine([["M",K?this.left:n,K?j:this.top],["L",K?M.chartWidth-this.right:n,K?j:M.chartHeight-this.bottom]],s)}renderLine(){this.axisLine||(this.axisLine=this.chart.renderer.path().addClass("highcharts-axis-line").add(this.axisGroup),this.chart.styledMode||this.axisLine.attr({stroke:this.options.lineColor,"stroke-width":this.options.lineWidth,zIndex:7}))}getTitlePosition(s){var M=this.horiz,z=this.left;const j=this.top;var K=this.len;const n=this.options.title,f=M?z:j,m=this.opposite,G=this.offset,F=n.x,H=n.y,st=this.chart.renderer.fontMetrics(s);return s=s?Math.max(s.getBBox(!1,0).height-st.h-1,0):0,K={low:f+(M?0:K),middle:f+K/2,high:f+(M?K:0)}[n.align],z=(M?j+this.height:z)+(M?1:-1)*(m?-1:1)*(this.axisTitleMargin||0)+[-s,s,st.f,-s][this.side],M={x:M?K+F:z+(m?this.width:0)+G+F,y:M?z+H-(m?this.height:0)+G:K+H},o(this,"afterGetTitlePosition",{titlePosition:M}),M}renderMinorTick(s,M){const z=this.minorTicks;z[s]||(z[s]=new X(this,s,"minor")),M&&z[s].isNew&&z[s].render(null,!0),z[s].render(null,!1,1)}renderTick(s,M,z){const j=this.ticks;(!this.isLinked||s>=this.min&&s<=this.max||this.grid&&this.grid.isColumn)&&(j[s]||(j[s]=new X(this,s)),z&&j[s].isNew&&j[s].render(M,!0,-1),j[s].render(M))}render(){const s=this,M=s.chart,z=s.logarithmic,j=s.options,K=s.isLinked,n=s.tickPositions,f=s.axisTitle,m=s.ticks,G=s.minorTicks,F=s.alternateBands,H=j.stackLabels,st=j.alternateGridColor;var rt=j.crossing;const lt=s.tickmarkOffset,ht=s.axisLine,pt=s.showAxis,I=R(M.renderer.globalAnimation);let T,tt;if(s.labelEdge.length=0,s.overlap=!1,[m,G,F].forEach(function(V){l(V,function(ot){ot.isActive=!1})}),d(rt)){const V=this.isXAxis?M.yAxis[0]:M.xAxis[0],ot=[1,-1,-1,1][this.side];V&&(rt=V.toPixels(rt,!0),s.horiz&&(rt=V.len-rt),s.offset=ot*rt)}if(s.hasData()||K){const V=s.chart.hasRendered&&s.old&&d(s.old.min);s.minorTickInterval&&!s.categories&&s.getMinorTickPositions().forEach(function(ot){s.renderMinorTick(ot,V)}),n.length&&(n.forEach(function(ot,dt){s.renderTick(ot,dt,V)}),lt&&(s.min===0||s.single)&&(m[-1]||(m[-1]=new X(s,-1,null,!0)),m[-1].render(-1))),st&&n.forEach(function(ot,dt){tt=typeof n[dt+1]<"u"?n[dt+1]+lt:s.max-lt,dt%2===0&&ot<s.max&&tt<=s.max+(M.polar?-lt:lt)&&(F[ot]||(F[ot]=new Y.PlotLineOrBand(s)),T=ot+lt,F[ot].options={from:z?z.lin2log(T):T,to:z?z.lin2log(tt):tt,color:st,className:"highcharts-alternate-grid"},F[ot].render(),F[ot].isActive=!0)}),s._addedPlotLB||(s._addedPlotLB=!0,(j.plotLines||[]).concat(j.plotBands||[]).forEach(function(ot){s.addPlotBandOrLine(ot)}))}[m,G,F].forEach(function(V){const ot=[],dt=I.duration;l(V,function(ct,yt){ct.isActive||(ct.render(yt,!1,0),ct.isActive=!1,ot.push(yt))}),W(function(){let ct=ot.length;for(;ct--;)V[ot[ct]]&&!V[ot[ct]].isActive&&(V[ot[ct]].destroy(),delete V[ot[ct]])},V!==F&&M.hasRendered&&dt?dt:0)}),ht&&(ht[ht.isPlaced?"animate":"attr"]({d:this.getLinePath(ht.strokeWidth())}),ht.isPlaced=!0,ht[pt?"show":"hide"](pt)),f&&pt&&(f[f.isNew?"attr":"animate"](s.getTitlePosition(f)),f.isNew=!1),H&&H.enabled&&s.stacking&&s.stacking.renderStackTotals(),s.old={len:s.len,max:s.max,min:s.min,transA:s.transA,userMax:s.userMax,userMin:s.userMin},s.isDirty=!1,o(this,"afterRender")}redraw(){this.visible&&(this.render(),this.plotLinesAndBands.forEach(function(s){s.render()})),this.series.forEach(function(s){s.isDirty=!0})}getKeepProps(){return this.keepProps||nt.keepProps}destroy(s){const M=this,z=M.plotLinesAndBands,j=this.eventOptions;if(o(this,"destroy",{keepEvents:s}),s||a(M),[M.ticks,M.minorTicks,M.alternateBands].forEach(function(K){g(K)}),z)for(s=z.length;s--;)z[s].destroy();"axisLine axisTitle axisGroup gridGroup labelGroup cross scrollbar".split(" ").forEach(function(K){M[K]&&(M[K]=M[K].destroy())});for(const K in M.plotLinesAndBandsGroups)M.plotLinesAndBandsGroups[K]=M.plotLinesAndBandsGroups[K].destroy();l(M,function(K,n){M.getKeepProps().indexOf(n)===-1&&delete M[n]}),this.eventOptions=j}drawCrosshair(s,M){const z=this.crosshair;var j=p(z&&z.snap,!0);const K=this.chart;let n,f=this.cross;if(o(this,"drawCrosshair",{e:s,point:M}),s||(s=this.cross&&this.cross.e),z&&(k(M)||!j)!==!1){if(j?k(M)&&(n=p(this.coll!=="colorAxis"?M.crosshairPos:null,this.isXAxis?M.plotX:this.len-M.plotY)):n=s&&(this.horiz?s.chartX-this.pos:this.len-s.chartY+this.pos),k(n)){var m={value:M&&(this.isXAxis?M.x:p(M.stackY,M.y)),translatedValue:n};K.polar&&S(m,{isCrosshair:!0,chartX:s&&s.chartX,chartY:s&&s.chartY,point:M}),m=this.getPlotLinePath(m)||null}if(!k(m)){this.hideCrosshair();return}j=this.categories&&!this.isRadial,f||(this.cross=f=K.renderer.path().addClass("highcharts-crosshair highcharts-crosshair-"+(j?"category ":"thin ")+(z.className||"")).attr({zIndex:p(z.zIndex,2)}).add(),K.styledMode||(f.attr({stroke:z.color||(j?$.parse("#ccd3ff").setOpacity(.25).get():"#cccccc"),"stroke-width":p(z.width,1)}).css({"pointer-events":"none"}),z.dashStyle&&f.attr({dashstyle:z.dashStyle}))),f.show().attr({d:m}),j&&!z.width&&f.attr({"stroke-width":this.transA}),this.cross.e=s}else this.hideCrosshair();o(this,"afterDrawCrosshair",{e:s,point:M})}hideCrosshair(){this.cross&&this.cross.hide(),o(this,"afterHideCrosshair")}hasVerticalPanning(){const s=this.chart.options.chart.panning;return!!(s&&s.enabled&&/y/.test(s.type))}update(s,M){const z=this.chart;s=t(this.userOptions,s),this.destroy(!0),this.init(z,s),z.isDirtyBox=!0,p(M,!0)&&z.redraw()}remove(s){const M=this.chart,z=this.coll,j=this.series;let K=j.length;for(;K--;)j[K]&&j[K].remove(!1);O(M.axes,this),O(M[z]||[],this),M.orderItems(z),this.destroy(),M.isDirtyBox=!0,p(s,!0)&&M.redraw()}setTitle(s,M){this.update({title:s},M)}setCategories(s,M){this.update({categories:s},M)}}return nt.defaultOptions=P.defaultXAxisOptions,nt.keepProps="coll extKey hcEvents names series userMax userMin".split(" "),nt}),et(w,"Core/Axis/DateTimeAxis.js",[w["Core/Utilities.js"]],function(B){const{addEvent:P,getMagnitude:$,normalizeTickInterval:q,timeUnits:J}=B;var Y;return function(X){function C(){return this.chart.time.getTimeTicks.apply(this.chart.time,arguments)}function R(v){v.userOptions.type!=="datetime"?this.dateTime=void 0:this.dateTime||(this.dateTime=new x(this))}const N=[];X.compose=function(v){return B.pushUnique(N,v)&&(v.keepProps.push("dateTime"),v.prototype.getTimeTicks=C,P(v,"init",R)),v};class x{constructor(_){this.axis=_}normalizeTimeTickInterval(_,A){const c=A||[["millisecond",[1,2,5,10,20,25,50,100,200,500]],["second",[1,2,5,10,15,30]],["minute",[1,2,5,10,15,30]],["hour",[1,2,3,4,6,8,12]],["day",[1,2]],["week",[1,2]],["month",[1,2,3,4,6]],["year",null]];A=c[c.length-1];let y=J[A[0]],k=A[1],g;for(g=0;g<c.length&&(A=c[g],y=J[A[0]],k=A[1],!(c[g+1]&&_<=(y*k[k.length-1]+J[c[g+1][0]])/2));g++);return y===J.year&&_<5*y&&(k=[1,2,5]),_=q(_/y,k,A[0]==="year"?Math.max($(_/y),1):1),{unitRange:y,count:_,unitName:A[0]}}getXDateFormat(_,A){const{axis:c}=this,y=c.chart.time;return c.closestPointRange?y.getDateFormat(c.closestPointRange,_,c.options.startOfWeek,A)||y.resolveDTLFormat(A.year).main:y.resolveDTLFormat(A.day).main}}X.Additions=x}(Y||(Y={})),Y}),et(w,"Core/Axis/LogarithmicAxis.js",[w["Core/Utilities.js"]],function(B){const{addEvent:P,normalizeTickInterval:$,pick:q}=B;var J;return function(Y){function X(x){let v=this.logarithmic;x.userOptions.type!=="logarithmic"?this.logarithmic=void 0:v||(this.logarithmic=new N(this))}function C(){const x=this.logarithmic;x&&(this.lin2val=function(v){return x.lin2log(v)},this.val2lin=function(v){return x.log2lin(v)})}const R=[];Y.compose=function(x){return B.pushUnique(R,x)&&(x.keepProps.push("logarithmic"),P(x,"init",X),P(x,"afterInit",C)),x};class N{constructor(v){this.axis=v}getLogTickPositions(v,_,A,c){const y=this.axis;var k=y.len,g=y.options;let O=[];if(c||(this.minorAutoInterval=void 0),.5<=v)v=Math.round(v),O=y.getLinearTickPositions(v,_,A);else if(.08<=v){g=Math.floor(_);let b,S,o,r,u;for(k=.3<v?[1,2,4]:.15<v?[1,2,4,6,8]:[1,2,3,4,5,6,7,8,9];g<A+1&&!u;g++)for(S=k.length,b=0;b<S&&!u;b++)o=this.log2lin(this.lin2log(g)*k[b]),o>_&&(!c||r<=A)&&typeof r<"u"&&O.push(r),r>A&&(u=!0),r=o}else _=this.lin2log(_),A=this.lin2log(A),v=c?y.getMinorTickInterval():g.tickInterval,v=q(v==="auto"?null:v,this.minorAutoInterval,g.tickPixelInterval/(c?5:1)*(A-_)/((c?k/y.tickPositions.length:k)||1)),v=$(v),O=y.getLinearTickPositions(v,_,A).map(this.log2lin),c||(this.minorAutoInterval=v/5);return c||(y.tickInterval=v),O}lin2log(v){return Math.pow(10,v)}log2lin(v){return Math.log(v)/Math.LN10}}Y.Additions=N}(J||(J={})),J}),et(w,"Core/Axis/PlotLineOrBand/PlotLineOrBandAxis.js",[w["Core/Utilities.js"]],function(B){const{erase:P,extend:$,isNumber:q}=B;var J;return function(Y){function X(y){return this.addPlotBandOrLine(y,"plotBands")}function C(y,k){const g=this.userOptions;let O=new c(this,y);if(this.visible&&(O=O.render()),O){if(this._addedPlotLB||(this._addedPlotLB=!0,(g.plotLines||[]).concat(g.plotBands||[]).forEach(b=>{this.addPlotBandOrLine(b)})),k){const b=g[k]||[];b.push(y),g[k]=b}this.plotLinesAndBands.push(O)}return O}function R(y){return this.addPlotBandOrLine(y,"plotLines")}function N(y,k,g=this.options){const O=this.getPlotLinePath({value:k,force:!0,acrossPanes:g.acrossPanes}),b=[],S=this.horiz;k=!q(this.min)||!q(this.max)||y<this.min&&k<this.min||y>this.max&&k>this.max,y=this.getPlotLinePath({value:y,force:!0,acrossPanes:g.acrossPanes}),g=1;let o;if(y&&O)for(k&&(o=y.toString()===O.toString(),g=0),k=0;k<y.length;k+=2){const r=y[k],u=y[k+1],h=O[k],d=O[k+1];r[0]!=="M"&&r[0]!=="L"||u[0]!=="M"&&u[0]!=="L"||h[0]!=="M"&&h[0]!=="L"||d[0]!=="M"&&d[0]!=="L"||(S&&h[1]===r[1]?(h[1]+=g,d[1]+=g):S||h[2]!==r[2]||(h[2]+=g,d[2]+=g),b.push(["M",r[1],r[2]],["L",u[1],u[2]],["L",d[1],d[2]],["L",h[1],h[2]],["Z"])),b.isFlat=o}return b}function x(y){this.removePlotBandOrLine(y)}function v(y){const k=this.plotLinesAndBands,g=this.options,O=this.userOptions;if(k){let b=k.length;for(;b--;)k[b].id===y&&k[b].destroy();[g.plotLines||[],O.plotLines||[],g.plotBands||[],O.plotBands||[]].forEach(function(S){for(b=S.length;b--;)(S[b]||{}).id===y&&P(S,S[b])})}}function _(y){this.removePlotBandOrLine(y)}const A=[];let c;Y.compose=function(y,k){return c||(c=y),B.pushUnique(A,k)&&$(k.prototype,{addPlotBand:X,addPlotLine:R,addPlotBandOrLine:C,getPlotBandPath:N,removePlotBand:x,removePlotLine:_,removePlotBandOrLine:v}),k}}(J||(J={})),J}),et(w,"Core/Axis/PlotLineOrBand/PlotLineOrBand.js",[w["Core/Axis/PlotLineOrBand/PlotLineOrBandAxis.js"],w["Core/Utilities.js"]],function(B,P){const{arrayMax:$,arrayMin:q,defined:J,destroyObjectProperties:Y,erase:X,fireEvent:C,merge:R,objectEach:N,pick:x}=P;class v{static compose(A){return B.compose(v,A)}constructor(A,c){this.axis=A,c&&(this.options=c,this.id=c.id)}render(){C(this,"render");const A=this,c=A.axis,y=c.horiz;var k=c.logarithmic;const g=A.options,O=g.color,b=x(g.zIndex,0),S=g.events,o={},r=c.chart.renderer;let u=g.label,h=A.label,d=g.to,e=g.from,t=g.value,i=A.svgElem;var l=[];const p=J(e)&&J(d);l=J(t);const E=!i,a={class:"highcharts-plot-"+(p?"band ":"line ")+(g.className||"")};let L=p?"bands":"lines";if(k&&(e=k.log2lin(e),d=k.log2lin(d),t=k.log2lin(t)),c.chart.styledMode||(l?(a.stroke=O||"#999999",a["stroke-width"]=x(g.width,1),g.dashStyle&&(a.dashstyle=g.dashStyle)):p&&(a.fill=O||"#e6e9ff",g.borderWidth&&(a.stroke=g.borderColor,a["stroke-width"]=g.borderWidth))),o.zIndex=b,L+="-"+b,(k=c.plotLinesAndBandsGroups[L])||(c.plotLinesAndBandsGroups[L]=k=r.g("plot-"+L).attr(o).add()),E&&(A.svgElem=i=r.path().attr(a).add(k)),l)l=c.getPlotLinePath({value:t,lineWidth:i.strokeWidth(),acrossPanes:g.acrossPanes});else if(p)l=c.getPlotBandPath(e,d,g);else return;return!A.eventsAdded&&S&&(N(S,function(W,Q){i.on(Q,function(nt){S[Q].apply(A,[nt])})}),A.eventsAdded=!0),(E||!i.d)&&l&&l.length?i.attr({d:l}):i&&(l?(i.show(),i.animate({d:l})):i.d&&(i.hide(),h&&(A.label=h=h.destroy()))),u&&(J(u.text)||J(u.formatter))&&l&&l.length&&0<c.width&&0<c.height&&!l.isFlat?(u=R({align:y&&p&&"center",x:y?!p&&4:10,verticalAlign:!y&&p&&"middle",y:y?p?16:10:p?6:-4,rotation:y&&!p&&90},u),this.renderLabel(u,l,p,b)):h&&h.hide(),A}renderLabel(A,c,y,k){const g=this.axis;var O=g.chart.renderer;let b=this.label;b||(this.label=b=O.text(this.getLabelText(A),0,0,A.useHTML).attr({align:A.textAlign||A.align,rotation:A.rotation,class:"highcharts-plot-"+(y?"band":"line")+"-label "+(A.className||""),zIndex:k}).add(),g.chart.styledMode||b.css(R({fontSize:"0.8em",textOverflow:"ellipsis"},A.style))),k=c.xBounds||[c[0][1],c[1][1],y?c[2][1]:c[0][1]],c=c.yBounds||[c[0][2],c[1][2],y?c[2][2]:c[0][2]],y=q(k),O=q(c),b.align(A,!1,{x:y,y:O,width:$(k)-y,height:$(c)-O}),b.alignValue&&b.alignValue!=="left"||(A=A.clip?g.width:g.chart.chartWidth,b.css({width:(b.rotation===90?g.height-(b.alignAttr.y-g.top):A-(b.alignAttr.x-g.left))+"px"})),b.show(!0)}getLabelText(A){return J(A.formatter)?A.formatter.call(this):A.text}destroy(){X(this.axis.plotLinesAndBands,this),delete this.axis,Y(this)}}return v}),et(w,"Core/Tooltip.js",[w["Core/Templating.js"],w["Core/Globals.js"],w["Core/Renderer/RendererUtilities.js"],w["Core/Renderer/RendererRegistry.js"],w["Core/Utilities.js"]],function(B,P,$,q,J){const{format:Y}=B,{doc:X,isSafari:C}=P,{distribute:R}=$,{addEvent:N,clamp:x,css:v,discardElement:_,extend:A,fireEvent:c,isArray:y,isNumber:k,isString:g,merge:O,pick:b,splat:S,syncTimeout:o}=J;class r{constructor(h,d){this.allowShared=!0,this.container=void 0,this.crosshairs=[],this.distance=0,this.isHidden=!0,this.isSticky=!1,this.now={},this.options={},this.outside=!1,this.chart=h,this.init(h,d)}bodyFormatter(h){return h.map(function(d){const e=d.series.tooltipOptions;return(e[(d.point.formatPrefix||"point")+"Formatter"]||d.point.tooltipFormatter).call(d.point,e[(d.point.formatPrefix||"point")+"Format"]||"")})}cleanSplit(h){this.chart.series.forEach(function(d){const e=d&&d.tt;e&&(!e.isActive||h?d.tt=e.destroy():e.isActive=!1)})}defaultFormatter(h){const d=this.points||S(this);let e;return e=[h.tooltipFooterHeaderFormatter(d[0])],e=e.concat(h.bodyFormatter(d)),e.push(h.tooltipFooterHeaderFormatter(d[0],!0)),e}destroy(){this.label&&(this.label=this.label.destroy()),this.split&&(this.cleanSplit(!0),this.tt&&(this.tt=this.tt.destroy())),this.renderer&&(this.renderer=this.renderer.destroy(),_(this.container)),J.clearTimeout(this.hideTimer),J.clearTimeout(this.tooltipTimeout)}getAnchor(h,d){var e=this.chart;const t=e.pointer,i=e.inverted,l=e.plotTop;if(e=e.plotLeft,h=S(h),h[0].series&&h[0].series.yAxis&&!h[0].series.yAxis.options.reversedStacks&&(h=h.slice().reverse()),this.followPointer&&d)typeof d.chartX>"u"&&(d=t.normalize(d)),h=[d.chartX-e,d.chartY-l];else if(h[0].tooltipPos)h=h[0].tooltipPos;else{let p=0,E=0;h.forEach(function(a){(a=a.pos(!0))&&(p+=a[0],E+=a[1])}),p/=h.length,E/=h.length,this.shared&&1<h.length&&d&&(i?p=d.chartX:E=d.chartY),h=[p-e,E-l]}return h.map(Math.round)}getClassName(h,d,e){const t=h.series,i=t.options;return[this.options.className,"highcharts-label",e&&"highcharts-tooltip-header",d?"highcharts-tooltip-box":"highcharts-tooltip",!e&&"highcharts-color-"+b(h.colorIndex,t.colorIndex),i&&i.className].filter(g).join(" ")}getLabel(){const h=this,d=this.chart.styledMode,e=this.options,t=this.split&&this.allowShared,i=e.style.pointerEvents||(this.shouldStickOnContact()?"auto":"none");let l,p=this.chart.renderer;if(this.label){var E=!this.label.hasClass("highcharts-label");(!t&&E||t&&!E)&&this.destroy()}if(!this.label){if(this.outside){E=this.chart.options.chart.style;const a=q.getRendererType();this.container=l=P.doc.createElement("div"),l.className="highcharts-tooltip-container",v(l,{position:"absolute",top:"1px",pointerEvents:i,zIndex:Math.max(this.options.style.zIndex||0,(E&&E.zIndex||0)+3)}),P.doc.body.appendChild(l),this.renderer=p=new a(l,0,0,E,void 0,void 0,p.styledMode)}if(t?this.label=p.g("tooltip"):(this.label=p.label("",0,0,e.shape,void 0,void 0,e.useHTML,void 0,"tooltip").attr({padding:e.padding,r:e.borderRadius}),d||this.label.attr({fill:e.backgroundColor,"stroke-width":e.borderWidth||0}).css(e.style).css({pointerEvents:i})),h.outside){const a=this.label,{xSetter:L,ySetter:W}=a;a.xSetter=function(Q){L.call(a,h.distance),l.style.left=Q+"px"},a.ySetter=function(Q){W.call(a,h.distance),l.style.top=Q+"px"}}this.label.attr({zIndex:8}).shadow(e.shadow).add()}return this.label}getPlayingField(){const{body:h,documentElement:d}=X,{chart:e,distance:t,outside:i}=this;return{width:i?Math.max(h.scrollWidth,d.scrollWidth,h.offsetWidth,d.offsetWidth,d.clientWidth)-2*t:e.chartWidth,height:i?Math.max(h.scrollHeight,d.scrollHeight,h.offsetHeight,d.offsetHeight,d.clientHeight):e.chartHeight}}getPosition(h,d,e){const t=this.chart,i=this.distance,l={},p=t.inverted&&e.h||0,E=this.outside;var a=this.getPlayingField();const L=a.width,W=a.height,Q=t.pointer.getChartPosition();a=f=>{const m=f==="x";return[f,m?L:W,m?h:d].concat(E?[m?h*Q.scaleX:d*Q.scaleY,m?Q.left-i+(e.plotX+t.plotLeft)*Q.scaleX:Q.top-i+(e.plotY+t.plotTop)*Q.scaleY,0,m?L:W]:[m?h:d,m?e.plotX+t.plotLeft:e.plotY+t.plotTop,m?t.plotLeft:t.plotTop,m?t.plotLeft+t.plotWidth:t.plotTop+t.plotHeight])};let nt=a("y"),D=a("x"),s;a=!!e.negative,!t.polar&&t.hoverSeries&&t.hoverSeries.yAxis&&t.hoverSeries.yAxis.reversed&&(a=!a);const M=!this.followPointer&&b(e.ttBelow,!t.inverted===a),z=function(f,m,G,F,H,st,rt){const lt=E?f==="y"?i*Q.scaleY:i*Q.scaleX:i,ht=(G-F)/2,pt=F<H-i,I=H+i+F<m,T=H-lt-G+ht;if(H=H+lt-ht,M&&I)l[f]=H;else if(!M&&pt)l[f]=T;else if(pt)l[f]=Math.min(rt-F,0>T-p?T:T-p);else if(I)l[f]=Math.max(st,H+p+G>m?H:H+p);else return!1},j=function(f,m,G,F,H){let st;return H<i||H>m-i?st=!1:l[f]=H<G/2?1:H>m-F/2?m-F-2:H-G/2,st},K=function(f){const m=nt;nt=D,D=m,s=f},n=function(){z.apply(0,nt)!==!1?j.apply(0,D)!==!1||s||(K(!0),n()):s?l.x=l.y=0:(K(!0),n())};return(t.inverted||1<this.len)&&K(),n(),l}hide(h){const d=this;J.clearTimeout(this.hideTimer),h=b(h,this.options.hideDelay),this.isHidden||(this.hideTimer=o(function(){d.getLabel().fadeOut(h&&void 0),d.isHidden=!0},h))}init(h,d){this.chart=h,this.options=d,this.crosshairs=[],this.now={x:0,y:0},this.isHidden=!0,this.split=d.split&&!h.inverted&&!h.polar,this.shared=d.shared||this.split,this.outside=b(d.outside,!(!h.scrollablePixelsX&&!h.scrollablePixelsY))}shouldStickOnContact(h){return!(this.followPointer||!this.options.stickOnContact||h&&!this.chart.pointer.inClass(h.target,"highcharts-tooltip"))}move(h,d,e,t){const i=this,l=i.now,p=i.options.animation!==!1&&!i.isHidden&&(1<Math.abs(h-l.x)||1<Math.abs(d-l.y)),E=i.followPointer||1<i.len;A(l,{x:p?(2*l.x+h)/3:h,y:p?(l.y+d)/2:d,anchorX:E?void 0:p?(2*l.anchorX+e)/3:e,anchorY:E?void 0:p?(l.anchorY+t)/2:t}),i.getLabel().attr(l),i.drawTracker(),p&&(J.clearTimeout(this.tooltipTimeout),this.tooltipTimeout=setTimeout(function(){i&&i.move(h,d,e,t)},32))}refresh(h,d){const e=this.chart,t=this.options,i=e.pointer,l=S(h),p=l[0],E=[];var a=t.format,L=t.formatter||this.defaultFormatter;const W=this.shared,Q=e.styledMode;let nt={};if(t.enabled&&p.series){J.clearTimeout(this.hideTimer),this.allowShared=!(!y(h)&&h.series&&h.series.noSharedTooltip),this.followPointer=!this.split&&p.series.tooltipOptions.followPointer,h=this.getAnchor(h,d);var D=h[0],s=h[1];if(W&&this.allowShared?(i.applyInactiveState(l),l.forEach(function(M){M.setState("hover"),E.push(M.getLabelConfig())}),nt=p.getLabelConfig(),nt.points=E):nt=p.getLabelConfig(),this.len=E.length,a=g(a)?Y(a,nt,e):L.call(nt,this),L=p.series,this.distance=b(L.tooltipOptions.distance,16),a===!1)this.hide();else{if(this.split&&this.allowShared)this.renderSplit(a,l);else{let M=D,z=s;if(d&&i.isDirectTouch&&(M=d.chartX-e.plotLeft,z=d.chartY-e.plotTop),e.polar||L.options.clip===!1||l.some(j=>i.isDirectTouch||j.series.shouldShowTooltip(M,z)))d=this.getLabel(),t.style.width&&!Q||d.css({width:(this.outside?this.getPlayingField():e.spacingBox).width+"px"}),d.attr({text:a&&a.join?a.join(""):a}),d.addClass(this.getClassName(p),!0),Q||d.attr({stroke:t.borderColor||p.color||L.color||"#666666"}),this.updatePosition({plotX:D,plotY:s,negative:p.negative,ttBelow:p.ttBelow,h:h[2]||0});else{this.hide();return}}this.isHidden&&this.label&&this.label.attr({opacity:1}).show(),this.isHidden=!1}c(this,"refresh")}}renderSplit(h,d){function e(V,ot,dt,ct,yt=!0){return dt?(ot=G?0:lt,V=x(V-ct/2,n.left,n.right-ct-(t.outside?F:0))):(ot-=st,V=yt?V-ct-z:V+z,V=x(V,yt?V:n.left,n.right)),{x:V,y:ot}}const t=this,{chart:i,chart:{chartWidth:l,chartHeight:p,plotHeight:E,plotLeft:a,plotTop:L,pointer:W,scrollablePixelsY:Q=0,scrollablePixelsX:nt,scrollingContainer:{scrollLeft:D,scrollTop:s}={scrollLeft:0,scrollTop:0},styledMode:M},distance:z,options:j,options:{positioner:K}}=t,n=t.outside&&typeof nt!="number"?X.documentElement.getBoundingClientRect():{left:D,right:D+l,top:s,bottom:s+p},f=t.getLabel(),m=this.renderer||i.renderer,G=!(!i.xAxis[0]||!i.xAxis[0].opposite),{left:F,top:H}=W.getChartPosition();let st=L+s,rt=0,lt=E-Q;g(h)&&(h=[!1,h]),h=h.slice(0,d.length+1).reduce(function(V,ot,dt){if(ot!==!1&&ot!==""){dt=d[dt-1]||{isHeader:!0,plotX:d[0].plotX,plotY:E,series:{}};const Mt=dt.isHeader;var ct=Mt?t:dt.series,yt;{var vt=dt;ot=ot.toString();var gt=ct.tt;const{isHeader:Tt,series:Dt}=vt;gt||(gt={padding:j.padding,r:j.borderRadius},M||(gt.fill=j.backgroundColor,gt["stroke-width"]=(yt=j.borderWidth)!==null&&yt!==void 0?yt:1),gt=m.label("",0,0,j[Tt?"headerShape":"shape"],void 0,void 0,j.useHTML).addClass(t.getClassName(vt,!0,Tt)).attr(gt).add(f)),gt.isActive=!0,gt.attr({text:ot}),M||gt.css(j.style).attr({stroke:j.borderColor||vt.color||Dt.color||"#333333"}),yt=gt}yt=ct.tt=yt,vt=yt.getBBox(),ct=vt.width+yt.strokeWidth(),Mt&&(rt=vt.height,lt+=rt,G&&(st-=rt));{const{isHeader:Tt,plotX:Dt=0,plotY:Pt=0,series:Rt}=dt;if(Tt){ot=a+Dt;var xt=L+E/2}else{const{xAxis:Ft,yAxis:Et}=Rt;ot=Ft.pos+x(Dt,-z,Ft.len+z),Rt.shouldShowTooltip(0,Et.pos-L+Pt,{ignoreX:!0})&&(xt=Et.pos+Pt)}ot=x(ot,n.left-z,n.right+z),xt={anchorX:ot,anchorY:xt}}const{anchorX:St,anchorY:wt}=xt;typeof wt=="number"?(xt=vt.height+1,vt=K?K.call(t,ct,xt,dt):e(St,wt,Mt,ct),V.push({align:K?0:void 0,anchorX:St,anchorY:wt,boxWidth:ct,point:dt,rank:b(vt.rank,Mt?1:0),size:xt,target:vt.y,tt:yt,x:vt.x})):yt.isActive=!1}return V},[]),!K&&h.some(V=>{var{outside:ot}=t;return ot=(ot?F:0)+V.anchorX,ot<n.left&&ot+V.boxWidth<n.right?!0:ot<F-n.left+V.boxWidth&&n.right-ot>ot})&&(h=h.map(V=>{const{x:ot,y:dt}=e(V.anchorX,V.anchorY,V.point.isHeader,V.boxWidth,!1);return A(V,{target:dt,x:ot})})),t.cleanSplit(),R(h,lt);var ht=F,pt=F;h.forEach(function(V){const{x:ot,boxWidth:dt,isHeader:ct}=V;ct||(t.outside&&F+ot<ht&&(ht=F+ot),!ct&&t.outside&&ht+dt>pt&&(pt=F+ot))}),h.forEach(function(V){const{x:ot,anchorX:dt,anchorY:ct,pos:yt,point:{isHeader:vt}}=V,gt={visibility:typeof yt>"u"?"hidden":"inherit",x:ot,y:(yt||0)+st,anchorX:dt,anchorY:ct};if(t.outside&&ot<dt){const xt=F-ht;0<xt&&(vt||(gt.x=ot+xt,gt.anchorX=dt+xt),vt&&(gt.x=(pt-ht)/2,gt.anchorX=dt+xt))}V.tt.attr(gt)});const{container:I,outside:T,renderer:tt}=t;if(T&&I&&tt){const{width:V,height:ot,x:dt,y:ct}=f.getBBox();tt.setSize(V+dt,ot+ct,!1),I.style.left=ht+"px",I.style.top=H+"px"}C&&f.attr({opacity:f.opacity===1?.999:1})}drawTracker(){if(this.shouldStickOnContact()){var h=this.chart,d=this.label,e=this.shared?h.hoverPoints:h.hoverPoint;if(d&&e){var t={x:0,y:0,width:0,height:0};e=this.getAnchor(e);var i=d.getBBox();e[0]+=h.plotLeft-d.translateX,e[1]+=h.plotTop-d.translateY,t.x=Math.min(0,e[0]),t.y=Math.min(0,e[1]),t.width=0>e[0]?Math.max(Math.abs(e[0]),i.width-e[0]):Math.max(Math.abs(e[0]),i.width),t.height=0>e[1]?Math.max(Math.abs(e[1]),i.height-Math.abs(e[1])):Math.max(Math.abs(e[1]),i.height),this.tracker?this.tracker.attr(t):(this.tracker=d.renderer.rect(t).addClass("highcharts-tracker").add(d),h.styledMode||this.tracker.attr({fill:"rgba(0,0,0,0)"}))}}else this.tracker&&(this.tracker=this.tracker.destroy())}styledModeFormat(h){return h.replace('style="font-size: 0.8em"','class="highcharts-header"').replace(/style="color:{(point|series)\.color}"/g,'class="highcharts-color-{$1.colorIndex} {series.options.className} {point.options.className}"')}tooltipFooterHeaderFormatter(h,d){const e=h.series,t=e.tooltipOptions;var i=e.xAxis;const l=i&&i.dateTime;i={isFooter:d,labelConfig:h};let p=t.xDateFormat,E=t[d?"footerFormat":"headerFormat"];return c(this,"headerFormatter",i,function(a){l&&!p&&k(h.key)&&(p=l.getXDateFormat(h.key,t.dateTimeLabelFormats)),l&&p&&(h.point&&h.point.tooltipDateKeys||["key"]).forEach(function(L){E=E.replace("{point."+L+"}","{point."+L+":"+p+"}")}),e.chart.styledMode&&(E=this.styledModeFormat(E)),a.text=Y(E,{point:h,series:e},this.chart)}),i.text}update(h){this.destroy(),this.init(this.chart,O(!0,this.options,h))}updatePosition(h){const{chart:d,distance:e,options:t}=this;var i=d.pointer;const l=this.getLabel(),{left:p,top:E,scaleX:a,scaleY:L}=i.getChartPosition();i=(t.positioner||this.getPosition).call(this,l.width,l.height,h);let W=(h.plotX||0)+d.plotLeft;h=(h.plotY||0)+d.plotTop;let Q;this.outside&&(t.positioner&&(i.x+=p-e,i.y+=E-e),Q=(t.borderWidth||0)+2*e,this.renderer.setSize(l.width+Q,l.height+Q,!1),(a!==1||L!==1)&&(v(this.container,{transform:`scale(${a}, ${L})`}),W*=a,h*=L),W+=p-i.x,h+=E-i.y),this.move(Math.round(i.x),Math.round(i.y||0),W,h)}}return function(u){const h=[];u.compose=function(d){J.pushUnique(h,d)&&N(d,"afterInit",function(){const e=this.chart;e.options.tooltip&&(e.tooltip=new u(e,e.options.tooltip))})}}(r||(r={})),r}),et(w,"Core/Series/Point.js",[w["Core/Renderer/HTML/AST.js"],w["Core/Animation/AnimationUtilities.js"],w["Core/Defaults.js"],w["Core/Templating.js"],w["Core/Utilities.js"]],function(B,P,$,q,J){const{animObject:Y}=P,{defaultOptions:X}=$,{format:C}=q,{addEvent:R,defined:N,erase:x,extend:v,fireEvent:_,getNestedProperty:A,isArray:c,isFunction:y,isNumber:k,isObject:g,merge:O,objectEach:b,pick:S,syncTimeout:o,removeEvent:r,uniqueKey:u}=J;class h{constructor(){this.category=void 0,this.destroyed=!1,this.formatPrefix="point",this.id=void 0,this.isNull=!1,this.percentage=this.options=this.name=void 0,this.selected=!1,this.total=this.shapeArgs=this.series=void 0,this.visible=!0,this.x=void 0}animateBeforeDestroy(){const e=this,t={x:e.startXPos,opacity:0},i=e.getGraphicalProps();i.singular.forEach(function(l){e[l]=e[l].animate(l==="dataLabel"?{x:e[l].startXPos,y:e[l].startYPos,opacity:0}:t)}),i.plural.forEach(function(l){e[l].forEach(function(p){p.element&&p.animate(v({x:e.startXPos},p.startYPos?{x:p.startXPos,y:p.startYPos}:{}))})})}applyOptions(e,t){const i=this.series,l=i.options.pointValKey||i.pointValKey;return e=h.prototype.optionsToObject.call(this,e),v(this,e),this.options=this.options?v(this.options,e):e,e.group&&delete this.group,e.dataLabels&&delete this.dataLabels,l&&(this.y=h.prototype.getNestedProperty.call(this,l)),this.formatPrefix=(this.isNull=this.isValid&&!this.isValid())?"null":"point",this.selected&&(this.state="select"),"name"in this&&typeof t>"u"&&i.xAxis&&i.xAxis.hasNames&&(this.x=i.xAxis.nameToX(this)),typeof this.x>"u"&&i?this.x=typeof t>"u"?i.autoIncrement():t:k(e.x)&&i.options.relativeXValue&&(this.x=i.autoIncrement(e.x)),this}destroy(){if(!this.destroyed){const t=this;var e=t.series;const i=e.chart;e=e.options.dataSorting;const l=i.hoverPoints,p=Y(t.series.chart.renderer.globalAnimation),E=()=>{(t.graphic||t.graphics||t.dataLabel||t.dataLabels)&&(r(t),t.destroyElements());for(const a in t)delete t[a]};t.legendItem&&i.legend.destroyItem(t),l&&(t.setState(),x(l,t),l.length||(i.hoverPoints=null)),t===i.hoverPoint&&t.onMouseOut(),e&&e.enabled?(this.animateBeforeDestroy(),o(E,p.duration)):E(),i.pointCount--}this.destroyed=!0}destroyElements(e){const t=this;e=t.getGraphicalProps(e),e.singular.forEach(function(i){t[i]=t[i].destroy()}),e.plural.forEach(function(i){t[i].forEach(function(l){l&&l.element&&l.destroy()}),delete t[i]})}firePointEvent(e,t,i){const l=this,p=this.series.options;(p.point.events[e]||l.options&&l.options.events&&l.options.events[e])&&l.importEvents(),e==="click"&&p.allowPointSelect&&(i=function(E){l.select&&l.select(null,E.ctrlKey||E.metaKey||E.shiftKey)}),_(l,e,t,i)}getClassName(){return"highcharts-point"+(this.selected?" highcharts-point-select":"")+(this.negative?" highcharts-negative":"")+(this.isNull?" highcharts-null-point":"")+(typeof this.colorIndex<"u"?" highcharts-color-"+this.colorIndex:"")+(this.options.className?" "+this.options.className:"")+(this.zone&&this.zone.className?" "+this.zone.className.replace("highcharts-negative",""):"")}getGraphicalProps(e){const t=this,i=[],l={singular:[],plural:[]};let p,E;for(e=e||{graphic:1,dataLabel:1},e.graphic&&i.push("graphic"),e.dataLabel&&i.push("dataLabel","dataLabelPath","dataLabelUpper","connector"),E=i.length;E--;)p=i[E],t[p]&&l.singular.push(p);return["graphic","dataLabel","connector"].forEach(function(a){const L=a+"s";e[a]&&t[L]&&l.plural.push(L)}),l}getLabelConfig(){return{x:this.category,y:this.y,color:this.color,colorIndex:this.colorIndex,key:this.name||this.category,series:this.series,point:this,percentage:this.percentage,total:this.total||this.stackTotal}}getNestedProperty(e){if(e)return e.indexOf("custom.")===0?A(e,this.options):this[e]}getZone(){var e=this.series;const t=e.zones;e=e.zoneAxis||"y";let i,l=0;for(i=t[l];this[e]>=i.value;)i=t[++l];return this.nonZonedColor||(this.nonZonedColor=this.color),this.color=i&&i.color&&!this.options.color?i.color:this.nonZonedColor,i}hasNewShapeType(){return(this.graphic&&(this.graphic.symbolName||this.graphic.element.nodeName))!==this.shapeType}init(e,t,i){return this.series=e,this.applyOptions(t,i),this.id=N(this.id)?this.id:u(),this.resolveColor(),e.chart.pointCount++,_(this,"afterInit"),this}isValid(){return this.x!==null&&k(this.y)}optionsToObject(e){var t=this.series;const i=t.options.keys,l=i||t.pointArrayMap||["y"],p=l.length;let E={},a=0,L=0;if(k(e)||e===null)E[l[0]]=e;else if(c(e))for(!i&&e.length>p&&(t=typeof e[0],t==="string"?E.name=e[0]:t==="number"&&(E.x=e[0]),a++);L<p;)i&&typeof e[a]>"u"||(0<l[L].indexOf(".")?h.prototype.setNestedProperty(E,e[a],l[L]):E[l[L]]=e[a]),a++,L++;else typeof e=="object"&&(E=e,e.dataLabels&&(t._hasPointLabels=!0),e.marker&&(t._hasPointMarkers=!0));return E}pos(e,t=this.plotY){if(!this.destroyed){const{plotX:i,series:l}=this,{chart:p,xAxis:E,yAxis:a}=l;let L=0,W=0;if(k(i)&&k(t))return e&&(L=E?E.pos:p.plotLeft,W=a?a.pos:p.plotTop),p.inverted&&E&&a?[a.len-t+W,E.len-i+L]:[i+L,t+W]}}resolveColor(){const e=this.series;var t=e.chart.styledMode;let i;var l=e.chart.options.chart.colorCount;delete this.nonZonedColor,e.options.colorByPoint?(t||(l=e.options.colors||e.chart.options.colors,i=l[e.colorCounter],l=l.length),t=e.colorCounter,e.colorCounter++,e.colorCounter===l&&(e.colorCounter=0)):(t||(i=e.color),t=e.colorIndex),this.colorIndex=S(this.options.colorIndex,t),this.color=S(this.options.color,i)}setNestedProperty(e,t,i){return i.split(".").reduce(function(l,p,E,a){return l[p]=a.length-1===E?t:g(l[p],!0)?l[p]:{},l[p]},e),e}shouldDraw(){return!this.isNull}tooltipFormatter(e){const t=this.series,i=t.tooltipOptions,l=S(i.valueDecimals,""),p=i.valuePrefix||"",E=i.valueSuffix||"";return t.chart.styledMode&&(e=t.chart.tooltip.styledModeFormat(e)),(t.pointArrayMap||["y"]).forEach(function(a){a="{point."+a,(p||E)&&(e=e.replace(RegExp(a+"}","g"),p+a+"}"+E)),e=e.replace(RegExp(a+"}","g"),a+":,."+l+"f}")}),C(e,{point:this,series:this.series},t.chart)}update(e,t,i,l){function p(){E.applyOptions(e);var D=L&&E.hasMockGraphic;D=E.y===null?!D:D,L&&D&&(E.graphic=L.destroy(),delete E.hasMockGraphic),g(e,!0)&&(L&&L.element&&e&&e.marker&&typeof e.marker.symbol<"u"&&(E.graphic=L.destroy()),e&&e.dataLabels&&E.dataLabel&&(E.dataLabel=E.dataLabel.destroy()),E.connector&&(E.connector=E.connector.destroy())),nt=E.index,a.updateParallelArrays(E,nt),Q.data[nt]=g(Q.data[nt],!0)||g(e,!0)?E.options:S(e,Q.data[nt]),a.isDirty=a.isDirtyData=!0,!a.fixedBox&&a.hasCartesianSeries&&(W.isDirtyBox=!0),Q.legendType==="point"&&(W.isDirtyLegend=!0),t&&W.redraw(i)}const E=this,a=E.series,L=E.graphic,W=a.chart,Q=a.options;let nt;t=S(t,!0),l===!1?p():E.firePointEvent("update",{options:e},p)}remove(e,t){this.series.removePoint(this.series.data.indexOf(this),e,t)}select(e,t){const i=this,l=i.series,p=l.chart;this.selectedStaging=e=S(e,!i.selected),i.firePointEvent(e?"select":"unselect",{accumulate:t},function(){i.selected=i.options.selected=e,l.options.data[l.data.indexOf(i)]=i.options,i.setState(e&&"select"),t||p.getSelectedPoints().forEach(function(E){const a=E.series;E.selected&&E!==i&&(E.selected=E.options.selected=!1,a.options.data[a.data.indexOf(E)]=E.options,E.setState(p.hoverPoints&&a.options.inactiveOtherPoints?"inactive":""),E.firePointEvent("unselect"))})}),delete this.selectedStaging}onMouseOver(e){const t=this.series.chart,i=t.pointer;e=e?i.normalize(e):i.getChartCoordinatesFromPoint(this,t.inverted),i.runPointActions(e,this)}onMouseOut(){const e=this.series.chart;this.firePointEvent("mouseOut"),this.series.options.inactiveOtherPoints||(e.hoverPoints||[]).forEach(function(t){t.setState()}),e.hoverPoints=e.hoverPoint=null}importEvents(){if(!this.hasImportedEvents){const e=this,t=O(e.series.options.point,e.options).events;e.events=t,b(t,function(i,l){y(i)&&R(e,l,i)}),this.hasImportedEvents=!0}}setState(e,t){const i=this.series;var l=this.state,p=i.options.states[e||"normal"]||{},E=X.plotOptions[i.type].marker&&i.options.marker;const a=E&&E.enabled===!1,L=E&&E.states&&E.states[e||"normal"]||{},W=L.enabled===!1,Q=this.marker||{},nt=i.chart,D=E&&i.markerAttribs;let s=i.halo;var M;let z;var j=i.stateMarkerGraphic;if(e=e||"",!(e===this.state&&!t||this.selected&&e!=="select"||p.enabled===!1||e&&(W||a&&L.enabled===!1)||e&&Q.states&&Q.states[e]&&Q.states[e].enabled===!1)){if(this.state=e,D&&(M=i.markerAttribs(this,e)),this.graphic&&!this.hasMockGraphic){if(l&&this.graphic.removeClass("highcharts-point-"+l),e&&this.graphic.addClass("highcharts-point-"+e),!nt.styledMode){l=i.pointAttribs(this,e),z=S(nt.options.chart.animation,p.animation);const K=l.opacity;i.options.inactiveOtherPoints&&k(K)&&((this.dataLabels||[]).forEach(function(n){n&&!n.hasClass("highcharts-data-label-hidden")&&n.animate({opacity:K},z)}),this.connector&&this.connector.animate({opacity:K},z)),this.graphic.animate(l,z)}M&&this.graphic.animate(M,S(nt.options.chart.animation,L.animation,E.animation)),j&&j.hide()}else e&&L&&(E=Q.symbol||i.symbol,j&&j.currentSymbol!==E&&(j=j.destroy()),M&&(j?j[t?"animate":"attr"]({x:M.x,y:M.y}):E&&(i.stateMarkerGraphic=j=nt.renderer.symbol(E,M.x,M.y,M.width,M.height).add(i.markerGroup),j.currentSymbol=E)),!nt.styledMode&&j&&this.state!=="inactive"&&j.attr(i.pointAttribs(this,e))),j&&(j[e&&this.isInside?"show":"hide"](),j.element.point=this,j.addClass(this.getClassName(),!0));p=p.halo,M=(j=this.graphic||j)&&j.visibility||"inherit",p&&p.size&&j&&M!=="hidden"&&!this.isCluster?(s||(i.halo=s=nt.renderer.path().add(j.parentGroup)),s.show()[t?"animate":"attr"]({d:this.haloPath(p.size)}),s.attr({class:"highcharts-halo highcharts-color-"+S(this.colorIndex,i.colorIndex)+(this.className?" "+this.className:""),visibility:M,zIndex:-1}),s.point=this,nt.styledMode||s.attr(v({fill:this.color||i.color,"fill-opacity":p.opacity},B.filterUserAttributes(p.attributes||{})))):s&&s.point&&s.point.haloPath&&s.animate({d:s.point.haloPath(0)},null,s.hide),_(this,"afterSetState",{state:e})}}haloPath(e){const t=this.pos();return t?this.series.chart.renderer.symbols.circle(Math.floor(t[0])-e,t[1]-e,2*e,2*e):[]}}return h}),et(w,"Core/Pointer.js",[w["Core/Color/Color.js"],w["Core/Globals.js"],w["Core/Utilities.js"]],function(B,P,$){const{parse:q}=B,{charts:J,noop:Y}=P,{addEvent:X,attr:C,css:R,defined:N,extend:x,find:v,fireEvent:_,isNumber:A,isObject:c,objectEach:y,offset:k,pick:g,splat:O}=$;class b{constructor(o,r){this.lastValidTouch={},this.pinchDown=[],this.runChartClick=!1,this.eventsToUnbind=[],this.chart=o,this.hasDragged=!1,this.options=r,this.init(o,r)}applyInactiveState(o){let r=[],u;(o||[]).forEach(function(h){u=h.series,r.push(u),u.linkedParent&&r.push(u.linkedParent),u.linkedSeries&&(r=r.concat(u.linkedSeries)),u.navigatorSeries&&r.push(u.navigatorSeries)}),this.chart.series.forEach(function(h){r.indexOf(h)===-1?h.setState("inactive",!0):h.options.inactiveOtherPoints&&h.setAllPointsToState("inactive")})}destroy(){const o=this;this.eventsToUnbind.forEach(r=>r()),this.eventsToUnbind=[],P.chartCount||(b.unbindDocumentMouseUp&&(b.unbindDocumentMouseUp=b.unbindDocumentMouseUp()),b.unbindDocumentTouchEnd&&(b.unbindDocumentTouchEnd=b.unbindDocumentTouchEnd())),clearInterval(o.tooltipTimeout),y(o,function(r,u){o[u]=void 0})}getSelectionMarkerAttrs(o,r){const u={args:{chartX:o,chartY:r},attrs:{},shapeType:"rect"};return _(this,"getSelectionMarkerAttrs",u,h=>{const{chart:d,mouseDownX:e=0,mouseDownY:t=0,zoomHor:i,zoomVert:l}=this;h=h.attrs;let p;h.x=d.plotLeft,h.y=d.plotTop,h.width=i?1:d.plotWidth,h.height=l?1:d.plotHeight,i&&(p=o-e,h.width=Math.abs(p),h.x=(0<p?0:p)+e),l&&(p=r-t,h.height=Math.abs(p),h.y=(0<p?0:p)+t)}),u}drag(o){const r=this.chart,u=r.options.chart;var h=r.plotLeft;const d=r.plotTop,e=r.plotWidth,t=r.plotHeight,i=this.mouseDownX||0,l=this.mouseDownY||0,p=c(u.panning)?u.panning&&u.panning.enabled:u.panning,E=u.panKey&&o[u.panKey+"Key"];let a=o.chartX,L=o.chartY,W=this.selectionMarker;if((!W||!W.touch)&&(a<h?a=h:a>h+e&&(a=h+e),L<d?L=d:L>d+t&&(L=d+t),this.hasDragged=Math.sqrt(Math.pow(i-a,2)+Math.pow(l-L,2)),10<this.hasDragged)){h=r.isInsidePlot(i-h,l-d,{visiblePlotOnly:!0});const{shapeType:Q,attrs:nt}=this.getSelectionMarkerAttrs(a,L);!r.hasCartesianSeries&&!r.mapView||!this.zoomX&&!this.zoomY||!h||E||W||(this.selectionMarker=W=r.renderer[Q](),W.attr({class:"highcharts-selection-marker",zIndex:7}).add(),r.styledMode||W.attr({fill:u.selectionMarkerFill||q("#334eff").setOpacity(.25).get()})),W&&W.attr(nt),h&&!W&&p&&r.pan(o,u.panning)}}dragStart(o){const r=this.chart;r.mouseIsDown=o.type,r.cancelClick=!1,r.mouseDownX=this.mouseDownX=o.chartX,r.mouseDownY=this.mouseDownY=o.chartY}getSelectionBox(o){const r={args:{marker:o},result:{}};return _(this,"getSelectionBox",r,u=>{u.result={x:o.attr?+o.attr("x"):o.x,y:o.attr?+o.attr("y"):o.y,width:o.attr?o.attr("width"):o.width,height:o.attr?o.attr("height"):o.height}}),r.result}drop(o){const r=this,u=this.chart,h=this.hasPinched;if(this.selectionMarker){const{x:d,y:e,width:t,height:i}=this.getSelectionBox(this.selectionMarker),l={originalEvent:o,xAxis:[],yAxis:[],x:d,y:e,width:t,height:i};let p=!!u.mapView;(this.hasDragged||h)&&(u.axes.forEach(function(E){if(E.zoomEnabled&&N(E.min)&&(h||r[{xAxis:"zoomX",yAxis:"zoomY"}[E.coll]])&&A(d)&&A(e)&&A(t)&&A(i)){var a=E.horiz;const L=o.type==="touchend"?E.minPixelPadding:0,W=E.toValue((a?d:e)+L);a=E.toValue((a?d+t:e+i)-L),l[E.coll].push({axis:E,min:Math.min(W,a),max:Math.max(W,a)}),p=!0}}),p&&_(u,"selection",l,function(E){u.zoom(x(E,h?{animation:!1}:null))})),A(u.index)&&(this.selectionMarker=this.selectionMarker.destroy()),h&&this.scaleGroups()}u&&A(u.index)&&(R(u.container,{cursor:u._cursor}),u.cancelClick=10<this.hasDragged,u.mouseIsDown=this.hasDragged=this.hasPinched=!1,this.pinchDown=[])}findNearestKDPoint(o,r,u){let h;return o.forEach(function(d){var e=!(d.noSharedTooltip&&r)&&0>d.options.findNearestPointBy.indexOf("y");if(d=d.searchPoint(u,e),(e=c(d,!0)&&d.series)&&!(e=!c(h,!0))){{e=h.distX-d.distX;const t=h.dist-d.dist,i=(d.series.group&&d.series.group.zIndex)-(h.series.group&&h.series.group.zIndex);e=e!==0&&r?e:t!==0?t:i!==0?i:h.series.index>d.series.index?-1:1}e=0<e}e&&(h=d)}),h}getChartCoordinatesFromPoint(o,r){var u=o.series;const h=u.xAxis;u=u.yAxis;const d=o.shapeArgs;if(h&&u){let e=g(o.clientX,o.plotX),t=o.plotY||0;return o.isNode&&d&&A(d.x)&&A(d.y)&&(e=d.x,t=d.y),r?{chartX:u.len+u.pos-t,chartY:h.len+h.pos-e}:{chartX:e+h.pos,chartY:t+u.pos}}if(d&&d.x&&d.y)return{chartX:d.x,chartY:d.y}}getChartPosition(){if(this.chartPosition)return this.chartPosition;var{container:o}=this.chart;const r=k(o);this.chartPosition={left:r.left,top:r.top,scaleX:1,scaleY:1};const u=o.offsetWidth;return o=o.offsetHeight,2<u&&2<o&&(this.chartPosition.scaleX=r.width/u,this.chartPosition.scaleY=r.height/o),this.chartPosition}getCoordinates(o){const r={xAxis:[],yAxis:[]};return this.chart.axes.forEach(function(u){r[u.isXAxis?"xAxis":"yAxis"].push({axis:u,value:u.toValue(o[u.horiz?"chartX":"chartY"])})}),r}getHoverData(o,r,u,h,d,e){const t=[];h=!(!h||!o);const i=function(a){return a.visible&&!(!d&&a.directTouch)&&g(a.options.enableMouseTracking,!0)};let l,p={chartX:e?e.chartX:void 0,chartY:e?e.chartY:void 0,shared:d};_(this,"beforeGetHoverData",p),l=r&&!r.stickyTracking?[r]:u.filter(a=>a.stickyTracking&&(p.filter||i)(a));const E=h||!e?o:this.findNearestKDPoint(l,d,e);return r=E&&E.series,E&&(d&&!r.noSharedTooltip?(l=u.filter(function(a){return p.filter?p.filter(a):i(a)&&!a.noSharedTooltip}),l.forEach(function(a){let L=v(a.points,function(W){return W.x===E.x&&!W.isNull});c(L)&&(a.boosted&&a.boost&&(L=a.boost.getPoint(L)),t.push(L))})):t.push(E)),p={hoverPoint:E},_(this,"afterGetHoverData",p),{hoverPoint:p.hoverPoint,hoverSeries:r,hoverPoints:t}}getPointFromEvent(o){o=o.target;let r;for(;o&&!r;)r=o.point,o=o.parentNode;return r}onTrackerMouseOut(o){o=o.relatedTarget;const r=this.chart.hoverSeries;this.isDirectTouch=!1,!r||!o||r.stickyTracking||this.inClass(o,"highcharts-tooltip")||this.inClass(o,"highcharts-series-"+r.index)&&this.inClass(o,"highcharts-tracker")||r.onMouseOut()}inClass(o,r){let u;for(;o;){if(u=C(o,"class")){if(u.indexOf(r)!==-1)return!0;if(u.indexOf("highcharts-container")!==-1)return!1}o=o.parentElement}}init(o,r){this.options=r,this.chart=o,this.runChartClick=!(!r.chart.events||!r.chart.events.click),this.pinchDown=[],this.lastValidTouch={},this.setDOMEvents(),_(this,"afterInit")}normalize(o,r){var u=o.touches,h=u?u.length?u.item(0):g(u.changedTouches,o.changedTouches)[0]:o;return r||(r=this.getChartPosition()),u=h.pageX-r.left,h=h.pageY-r.top,u/=r.scaleX,h/=r.scaleY,x(o,{chartX:Math.round(u),chartY:Math.round(h)})}onContainerClick(o){const r=this.chart,u=r.hoverPoint;o=this.normalize(o);const h=r.plotLeft,d=r.plotTop;r.cancelClick||(u&&this.inClass(o.target,"highcharts-tracker")?(_(u.series,"click",x(o,{point:u})),r.hoverPoint&&u.firePointEvent("click",o)):(x(o,this.getCoordinates(o)),r.isInsidePlot(o.chartX-h,o.chartY-d,{visiblePlotOnly:!0})&&_(r,"click",o)))}onContainerMouseDown(o){const r=((o.buttons||o.button)&1)===1;o=this.normalize(o),P.isFirefox&&o.button!==0&&this.onContainerMouseMove(o),(typeof o.button>"u"||r)&&(this.zoomOption(o),r&&o.preventDefault&&o.preventDefault(),this.dragStart(o))}onContainerMouseLeave(o){const r=J[g(b.hoverChartIndex,-1)];o=this.normalize(o),r&&o.relatedTarget&&!this.inClass(o.relatedTarget,"highcharts-tooltip")&&(r.pointer.reset(),r.pointer.chartPosition=void 0)}onContainerMouseEnter(o){delete this.chartPosition}onContainerMouseMove(o){const r=this.chart,u=r.tooltip;o=this.normalize(o),this.setHoverChartIndex(),(r.mouseIsDown==="mousedown"||this.touchSelect(o))&&this.drag(o),r.openMenu||!this.inClass(o.target,"highcharts-tracker")&&!r.isInsidePlot(o.chartX-r.plotLeft,o.chartY-r.plotTop,{visiblePlotOnly:!0})||u&&u.shouldStickOnContact(o)||(this.inClass(o.target,"highcharts-no-tooltip")?this.reset(!1,0):this.runPointActions(o))}onDocumentTouchEnd(o){const r=J[g(b.hoverChartIndex,-1)];r&&r.pointer.drop(o)}onContainerTouchMove(o){this.touchSelect(o)?this.onContainerMouseMove(o):this.touch(o)}onContainerTouchStart(o){this.touchSelect(o)?this.onContainerMouseDown(o):(this.zoomOption(o),this.touch(o,!0))}onDocumentMouseMove(o){const r=this.chart,u=r.tooltip,h=this.chartPosition;o=this.normalize(o,h),!h||r.isInsidePlot(o.chartX-r.plotLeft,o.chartY-r.plotTop,{visiblePlotOnly:!0})||u&&u.shouldStickOnContact(o)||this.inClass(o.target,"highcharts-tracker")||this.reset()}onDocumentMouseUp(o){const r=J[g(b.hoverChartIndex,-1)];r&&r.pointer.drop(o)}pinch(o){const r=this,u=r.chart,h=r.pinchDown,d=o.touches||[],e=d.length,t=r.lastValidTouch,i=r.hasZoom,l={},p=e===1&&(r.inClass(o.target,"highcharts-tracker")&&u.runTrackerClick||r.runChartClick),E={};var a=r.chart.tooltip;a=e===1&&g(a&&a.options.followTouchMove,!0);let L=r.selectionMarker;1<e?r.initiated=!0:a&&(r.initiated=!1),i&&r.initiated&&!p&&o.cancelable!==!1&&o.preventDefault(),[].map.call(d,function(W){return r.normalize(W)}),o.type==="touchstart"?([].forEach.call(d,function(W,Q){h[Q]={chartX:W.chartX,chartY:W.chartY}}),t.x=[h[0].chartX,h[1]&&h[1].chartX],t.y=[h[0].chartY,h[1]&&h[1].chartY],u.axes.forEach(function(W){if(W.zoomEnabled){const Q=u.bounds[W.horiz?"h":"v"],nt=W.minPixelPadding,D=W.toPixels(Math.min(g(W.options.min,W.dataMin),W.dataMin)),s=W.toPixels(Math.max(g(W.options.max,W.dataMax),W.dataMax)),M=Math.max(D,s);Q.min=Math.min(W.pos,Math.min(D,s)-nt),Q.max=Math.max(W.pos+W.len,M+nt)}}),r.res=!0):a?this.runPointActions(r.normalize(o)):h.length&&(_(u,"touchpan",{originalEvent:o},()=>{L||(r.selectionMarker=L=x({destroy:Y,touch:!0},u.plotBox)),r.pinchTranslate(h,d,l,L,E,t),r.hasPinched=i,r.scaleGroups(l,E)}),r.res&&(r.res=!1,this.reset(!1,0)))}pinchTranslate(o,r,u,h,d,e){this.zoomHor&&this.pinchTranslateDirection(!0,o,r,u,h,d,e),this.zoomVert&&this.pinchTranslateDirection(!1,o,r,u,h,d,e)}pinchTranslateDirection(o,r,u,h,d,e,t,i){const l=this.chart,p=o?"x":"y",E=o?"X":"Y",a="chart"+E,L=o?"width":"height",W=l["plot"+(o?"Left":"Top")],Q=l.inverted,nt=l.bounds[o?"h":"v"],D=r.length===1,s=r[0][a],M=!D&&r[1][a];r=function(){typeof f=="number"&&20<Math.abs(s-M)&&(K=i||Math.abs(n-f)/Math.abs(s-M)),j=(W-n)/K+s,z=l["plot"+(o?"Width":"Height")]/K};let z,j,K=i||1,n=u[0][a],f=!D&&u[1][a],m;r(),u=j,u<nt.min?(u=nt.min,m=!0):u+z>nt.max&&(u=nt.max-z,m=!0),m?(n-=.8*(n-t[p][0]),typeof f=="number"&&(f-=.8*(f-t[p][1])),r()):t[p]=[n,f],Q||(e[p]=j-W,e[L]=z),e=Q?1/K:K,d[L]=z,d[p]=u,h[Q?o?"scaleY":"scaleX":"scale"+E]=K,h["translate"+E]=e*W+(n-e*s)}reset(o,r){const u=this.chart,h=u.hoverSeries,d=u.hoverPoint,e=u.hoverPoints,t=u.tooltip,i=t&&t.shared?e:d;o&&i&&O(i).forEach(function(l){l.series.isCartesian&&typeof l.plotX>"u"&&(o=!1)}),o?t&&i&&O(i).length&&(t.refresh(i),t.shared&&e?e.forEach(function(l){l.setState(l.state,!0),l.series.isCartesian&&(l.series.xAxis.crosshair&&l.series.xAxis.drawCrosshair(null,l),l.series.yAxis.crosshair&&l.series.yAxis.drawCrosshair(null,l))}):d&&(d.setState(d.state,!0),u.axes.forEach(function(l){l.crosshair&&d.series[l.coll]===l&&l.drawCrosshair(null,d)}))):(d&&d.onMouseOut(),e&&e.forEach(function(l){l.setState()}),h&&h.onMouseOut(),t&&t.hide(r),this.unDocMouseMove&&(this.unDocMouseMove=this.unDocMouseMove()),u.axes.forEach(function(l){l.hideCrosshair()}),this.hoverX=u.hoverPoints=u.hoverPoint=null)}runPointActions(o,r,u){const h=this.chart,d=h.tooltip&&h.tooltip.options.enabled?h.tooltip:void 0,e=d?d.shared:!1;let t=r||h.hoverPoint,i=t&&t.series||h.hoverSeries;r=this.getHoverData(t,i,h.series,(!o||o.type!=="touchmove")&&(!!r||i&&i.directTouch&&this.isDirectTouch),e,o),t=r.hoverPoint,i=r.hoverSeries;const l=r.hoverPoints;r=i&&i.tooltipOptions.followPointer&&!i.tooltipOptions.split;const p=e&&i&&!i.noSharedTooltip;if(t&&(u||t!==h.hoverPoint||d&&d.isHidden)){if((h.hoverPoints||[]).forEach(function(E){l.indexOf(E)===-1&&E.setState()}),h.hoverSeries!==i&&i.onMouseOver(),this.applyInactiveState(l),(l||[]).forEach(function(E){E.setState("hover")}),h.hoverPoint&&h.hoverPoint.firePointEvent("mouseOut"),!t.series)return;h.hoverPoints=l,h.hoverPoint=t,t.firePointEvent("mouseOver",void 0,()=>{d&&t&&d.refresh(p?l:t,o)})}else r&&d&&!d.isHidden&&(u=d.getAnchor([{}],o),h.isInsidePlot(u[0],u[1],{visiblePlotOnly:!0})&&d.updatePosition({plotX:u[0],plotY:u[1]}));this.unDocMouseMove||(this.unDocMouseMove=X(h.container.ownerDocument,"mousemove",function(E){const a=J[b.hoverChartIndex];a&&a.pointer.onDocumentMouseMove(E)}),this.eventsToUnbind.push(this.unDocMouseMove)),h.axes.forEach(function(E){const a=g((E.crosshair||{}).snap,!0);let L;a&&((L=h.hoverPoint)&&L.series[E.coll]===E||(L=v(l,W=>W.series&&W.series[E.coll]===E))),L||!a?E.drawCrosshair(o,L):E.hideCrosshair()})}scaleGroups(o,r){const u=this.chart;u.series.forEach(function(h){const d=o||h.getPlotBox();h.group&&(h.xAxis&&h.xAxis.zoomEnabled||u.mapView)&&(h.group.attr(d),h.markerGroup&&(h.markerGroup.attr(d),h.markerGroup.clip(r?u.clipRect:null)),h.dataLabelsGroup&&h.dataLabelsGroup.attr(d))}),u.clipRect.attr(r||u.clipBox)}setDOMEvents(){const o=this.chart.container,r=o.ownerDocument;o.onmousedown=this.onContainerMouseDown.bind(this),o.onmousemove=this.onContainerMouseMove.bind(this),o.onclick=this.onContainerClick.bind(this),this.eventsToUnbind.push(X(o,"mouseenter",this.onContainerMouseEnter.bind(this))),this.eventsToUnbind.push(X(o,"mouseleave",this.onContainerMouseLeave.bind(this))),b.unbindDocumentMouseUp||(b.unbindDocumentMouseUp=X(r,"mouseup",this.onDocumentMouseUp.bind(this)));let u=this.chart.renderTo.parentElement;for(;u&&u.tagName!=="BODY";)this.eventsToUnbind.push(X(u,"scroll",()=>{delete this.chartPosition})),u=u.parentElement;P.hasTouch&&(this.eventsToUnbind.push(X(o,"touchstart",this.onContainerTouchStart.bind(this),{passive:!1})),this.eventsToUnbind.push(X(o,"touchmove",this.onContainerTouchMove.bind(this),{passive:!1})),b.unbindDocumentTouchEnd||(b.unbindDocumentTouchEnd=X(r,"touchend",this.onDocumentTouchEnd.bind(this),{passive:!1})))}setHoverChartIndex(){const o=this.chart,r=P.charts[g(b.hoverChartIndex,-1)];r&&r!==o&&r.pointer.onContainerMouseLeave({relatedTarget:o.container}),r&&r.mouseIsDown||(b.hoverChartIndex=o.index)}touch(o,r){const u=this.chart;let h;this.setHoverChartIndex(),o.touches.length===1?(o=this.normalize(o),u.isInsidePlot(o.chartX-u.plotLeft,o.chartY-u.plotTop,{visiblePlotOnly:!0})&&!u.openMenu?(r&&this.runPointActions(o),o.type==="touchmove"&&(r=this.pinchDown,h=r[0]?4<=Math.sqrt(Math.pow(r[0].chartX-o.chartX,2)+Math.pow(r[0].chartY-o.chartY,2)):!1),g(h,!0)&&this.pinch(o)):r&&this.reset()):o.touches.length===2&&this.pinch(o)}touchSelect(o){return!(!this.chart.zooming.singleTouch||!o.touches||o.touches.length!==1)}zoomOption(o){const r=this.chart,u=r.inverted;var h=r.zooming.type||"";/touch/.test(o.type)&&(h=g(r.zooming.pinchType,h)),this.zoomX=o=/x/.test(h),this.zoomY=h=/y/.test(h),this.zoomHor=o&&!u||h&&u,this.zoomVert=h&&!u||o&&u,this.hasZoom=o||h}}return function(S){const o=[],r=[];S.compose=function(u){$.pushUnique(r,u)&&X(u,"beforeRender",function(){this.pointer=new S(this,this.options)})},S.dissolve=function(){for(let u=0,h=o.length;u<h;++u)o[u]();o.length=0}}(b||(b={})),b}),et(w,"Core/Legend/Legend.js",[w["Core/Animation/AnimationUtilities.js"],w["Core/Templating.js"],w["Core/Globals.js"],w["Core/Series/Point.js"],w["Core/Renderer/RendererUtilities.js"],w["Core/Utilities.js"]],function(B,P,$,q,J,Y){const{animObject:X,setAnimation:C}=B,{format:R}=P,{marginNames:N}=$,{distribute:x}=J,{addEvent:v,createElement:_,css:A,defined:c,discardElement:y,find:k,fireEvent:g,isNumber:O,merge:b,pick:S,relativeLength:o,stableSort:r,syncTimeout:u}=Y;class h{constructor(e,t){this.allItems=[],this.contentGroup=this.box=void 0,this.display=!1,this.group=void 0,this.offsetWidth=this.maxLegendWidth=this.maxItemWidth=this.legendWidth=this.legendHeight=this.lastLineHeight=this.lastItemY=this.itemY=this.itemX=this.itemMarginTop=this.itemMarginBottom=this.itemHeight=this.initialItemY=0,this.options=void 0,this.padding=0,this.pages=[],this.proximate=!1,this.scrollGroup=void 0,this.widthOption=this.totalItemWidth=this.titleHeight=this.symbolWidth=this.symbolHeight=0,this.chart=e,this.init(e,t)}init(e,t){this.chart=e,this.setOptions(t),t.enabled&&(this.render(),v(this.chart,"endResize",function(){this.legend.positionCheckboxes()}),v(this.chart,"render",()=>{this.proximate&&(this.proximatePositions(),this.positionItems())}))}setOptions(e){const t=S(e.padding,8);this.options=e,this.chart.styledMode||(this.itemStyle=e.itemStyle,this.itemHiddenStyle=b(this.itemStyle,e.itemHiddenStyle)),this.itemMarginTop=e.itemMarginTop,this.itemMarginBottom=e.itemMarginBottom,this.padding=t,this.initialItemY=t-5,this.symbolWidth=S(e.symbolWidth,16),this.pages=[],this.proximate=e.layout==="proximate"&&!this.chart.inverted,this.baseline=void 0}update(e,t){const i=this.chart;this.setOptions(b(!0,this.options,e)),this.destroy(),i.isDirtyLegend=i.isDirtyBox=!0,S(t,!0)&&i.redraw(),g(this,"afterUpdate")}colorizeItem(e,t){const{group:i,label:l,line:p,symbol:E}=e.legendItem||{};if(i&&i[t?"removeClass":"addClass"]("highcharts-legend-item-hidden"),!this.chart.styledMode){const{itemHiddenStyle:a}=this,L=a.color,W=t&&e.color||L,Q=e.options&&e.options.marker;let nt={fill:W};l==null||l.css(b(t?this.itemStyle:a)),p==null||p.attr({stroke:W}),E&&(Q&&E.isMarker&&(nt=e.pointAttribs(),t||(nt.stroke=nt.fill=L)),E.attr(nt))}g(this,"afterColorizeItem",{item:e,visible:t})}positionItems(){this.allItems.forEach(this.positionItem,this),this.chart.isResizing||this.positionCheckboxes()}positionItem(e){const{group:t,x:i=0,y:l=0}=e.legendItem||{};var p=this.options,E=p.symbolPadding;const a=!p.rtl;p=e.checkbox,t&&t.element&&(E={translateX:a?i:this.legendWidth-i-2*E-4,translateY:l},t[c(t.translateY)?"animate":"attr"](E,void 0,()=>{g(this,"afterPositionItem",{item:e})})),p&&(p.x=i,p.y=l)}destroyItem(e){const t=e.checkbox,i=e.legendItem||{};for(const l of["group","label","line","symbol"])i[l]&&(i[l]=i[l].destroy());t&&y(t),e.legendItem=void 0}destroy(){for(const e of this.getAllItems())this.destroyItem(e);for(const e of"clipRect up down pager nav box title group".split(" "))this[e]&&(this[e]=this[e].destroy());this.display=null}positionCheckboxes(){const e=this.group&&this.group.alignAttr,t=this.clipHeight||this.legendHeight,i=this.titleHeight;let l;e&&(l=e.translateY,this.allItems.forEach(function(p){const E=p.checkbox;let a;E&&(a=l+i+E.y+(this.scrollOffset||0)+3,A(E,{left:e.translateX+p.checkboxOffset+E.x-20+"px",top:a+"px",display:this.proximate||a>l-6&&a<l+t-6?"":"none"}))},this))}renderTitle(){var e=this.options;const t=this.padding,i=e.title;let l=0;i.text&&(this.title||(this.title=this.chart.renderer.label(i.text,t-3,t-4,void 0,void 0,void 0,e.useHTML,void 0,"legend-title").attr({zIndex:1}),this.chart.styledMode||this.title.css(i.style),this.title.add(this.group)),i.width||this.title.css({width:this.maxLegendWidth+"px"}),e=this.title.getBBox(),l=e.height,this.offsetWidth=e.width,this.contentGroup.attr({translateY:l})),this.titleHeight=l}setText(e){const t=this.options;e.legendItem.label.attr({text:t.labelFormat?R(t.labelFormat,e,this.chart):t.labelFormatter.call(e)})}renderItem(e){const t=e.legendItem=e.legendItem||{};var i=this.chart,l=i.renderer;const p=this.options,E=this.symbolWidth,a=p.symbolPadding||0,L=this.itemStyle,W=this.itemHiddenStyle,Q=p.layout==="horizontal"?S(p.itemDistance,20):0,nt=!p.rtl,D=!e.series,s=!D&&e.series.drawLegendSymbol?e.series:e;var M=s.options;const z=this.createCheckboxForItem&&M&&M.showCheckbox,j=p.useHTML,K=e.options.className;let n=t.label;M=E+a+Q+(z?20:0),n||(t.group=l.g("legend-item").addClass("highcharts-"+s.type+"-series highcharts-color-"+e.colorIndex+(K?" "+K:"")+(D?" highcharts-series-"+e.index:"")).attr({zIndex:1}).add(this.scrollGroup),t.label=n=l.text("",nt?E+a:-a,this.baseline||0,j),i.styledMode||n.css(b(e.visible?L:W)),n.attr({align:nt?"left":"right",zIndex:2}).add(t.group),this.baseline||(this.fontMetrics=l.fontMetrics(n),this.baseline=this.fontMetrics.f+3+this.itemMarginTop,n.attr("y",this.baseline),this.symbolHeight=S(p.symbolHeight,this.fontMetrics.f),p.squareSymbol&&(this.symbolWidth=S(p.symbolWidth,Math.max(this.symbolHeight,16)),M=this.symbolWidth+a+Q+(z?20:0),nt&&n.attr("x",this.symbolWidth+a))),s.drawLegendSymbol(this,e),this.setItemEvents&&this.setItemEvents(e,n,j)),z&&!e.checkbox&&this.createCheckboxForItem&&this.createCheckboxForItem(e),this.colorizeItem(e,e.visible),!i.styledMode&&L.width||n.css({width:(p.itemWidth||this.widthOption||i.spacingBox.width)-M+"px"}),this.setText(e),i=n.getBBox(),l=this.fontMetrics&&this.fontMetrics.h||0,e.itemWidth=e.checkboxOffset=p.itemWidth||t.labelWidth||i.width+M,this.maxItemWidth=Math.max(this.maxItemWidth,e.itemWidth),this.totalItemWidth+=e.itemWidth,this.itemHeight=e.itemHeight=Math.round(t.labelHeight||(i.height>1.5*l?i.height:l))}layoutItem(e){var t=this.options;const i=this.padding,l=t.layout==="horizontal",p=e.itemHeight,E=this.itemMarginBottom,a=this.itemMarginTop,L=l?S(t.itemDistance,20):0,W=this.maxLegendWidth;t=t.alignColumns&&this.totalItemWidth>W?this.maxItemWidth:e.itemWidth;const Q=e.legendItem||{};l&&this.itemX-i+t>W&&(this.itemX=i,this.lastLineHeight&&(this.itemY+=a+this.lastLineHeight+E),this.lastLineHeight=0),this.lastItemY=a+this.itemY+E,this.lastLineHeight=Math.max(p,this.lastLineHeight),Q.x=this.itemX,Q.y=this.itemY,l?this.itemX+=t:(this.itemY+=a+p+E,this.lastLineHeight=p),this.offsetWidth=this.widthOption||Math.max((l?this.itemX-i-(e.checkbox?0:L):t)+i,this.offsetWidth)}getAllItems(){let e=[];return this.chart.series.forEach(function(t){const i=t&&t.options;t&&S(i.showInLegend,c(i.linkedTo)?!1:void 0,!0)&&(e=e.concat((t.legendItem||{}).labels||(i.legendType==="point"?t.data:t)))}),g(this,"afterGetAllItems",{allItems:e}),e}getAlignment(){const e=this.options;return this.proximate?e.align.charAt(0)+"tv":e.floating?"":e.align.charAt(0)+e.verticalAlign.charAt(0)+e.layout.charAt(0)}adjustMargins(e,t){const i=this.chart,l=this.options,p=this.getAlignment();p&&[/(lth|ct|rth)/,/(rtv|rm|rbv)/,/(rbh|cb|lbh)/,/(lbv|lm|ltv)/].forEach(function(E,a){E.test(p)&&!c(e[a])&&(i[N[a]]=Math.max(i[N[a]],i.legend[(a+1)%2?"legendHeight":"legendWidth"]+[1,-1,-1,1][a]*l[a%2?"x":"y"]+S(l.margin,12)+t[a]+(i.titleOffset[a]||0)))})}proximatePositions(){const e=this.chart,t=[],i=this.options.align==="left";this.allItems.forEach(function(p){var E,a=i;let L;p.yAxis&&(p.xAxis.options.reversed&&(a=!a),p.points&&(E=k(a?p.points:p.points.slice(0).reverse(),function(W){return O(W.plotY)})),a=this.itemMarginTop+p.legendItem.label.getBBox().height+this.itemMarginBottom,L=p.yAxis.top-e.plotTop,p.visible?(E=E?E.plotY:p.yAxis.height,E+=L-.3*a):E=L+p.yAxis.height,t.push({target:E,size:a,item:p}))},this);let l;for(const p of x(t,e.plotHeight))l=p.item.legendItem||{},O(p.pos)&&(l.y=e.plotTop-e.spacing[0]+p.pos)}render(){const e=this.chart,t=e.renderer,i=this.options,l=this.padding;var p=this.getAllItems();let E,a=this.group,L=this.box;this.itemX=l,this.itemY=this.initialItemY,this.lastItemY=this.offsetWidth=0,this.widthOption=o(i.width,e.spacingBox.width-l);var W=e.spacingBox.width-2*l-i.x;-1<["rm","lm"].indexOf(this.getAlignment().substring(0,2))&&(W/=2),this.maxLegendWidth=this.widthOption||W,a||(this.group=a=t.g("legend").addClass(i.className||"").attr({zIndex:7}).add(),this.contentGroup=t.g().attr({zIndex:1}).add(a),this.scrollGroup=t.g().add(this.contentGroup)),this.renderTitle(),r(p,(Q,nt)=>(Q.options&&Q.options.legendIndex||0)-(nt.options&&nt.options.legendIndex||0)),i.reversed&&p.reverse(),this.allItems=p,this.display=W=!!p.length,this.itemHeight=this.totalItemWidth=this.maxItemWidth=this.lastLineHeight=0,p.forEach(this.renderItem,this),p.forEach(this.layoutItem,this),p=(this.widthOption||this.offsetWidth)+l,E=this.lastItemY+this.lastLineHeight+this.titleHeight,E=this.handleOverflow(E),E+=l,L||(this.box=L=t.rect().addClass("highcharts-legend-box").attr({r:i.borderRadius}).add(a)),e.styledMode||L.attr({stroke:i.borderColor,"stroke-width":i.borderWidth||0,fill:i.backgroundColor||"none"}).shadow(i.shadow),0<p&&0<E&&L[L.placed?"animate":"attr"](L.crisp.call({},{x:0,y:0,width:p,height:E},L.strokeWidth())),a[W?"show":"hide"](),e.styledMode&&a.getStyle("display")==="none"&&(p=E=0),this.legendWidth=p,this.legendHeight=E,W&&this.align(),this.proximate||this.positionItems(),g(this,"afterRender")}align(e=this.chart.spacingBox){const t=this.chart,i=this.options;let l=e.y;/(lth|ct|rth)/.test(this.getAlignment())&&0<t.titleOffset[0]?l+=t.titleOffset[0]:/(lbh|cb|rbh)/.test(this.getAlignment())&&0<t.titleOffset[2]&&(l-=t.titleOffset[2]),l!==e.y&&(e=b(e,{y:l})),t.hasRendered||(this.group.placed=!1),this.group.align(b(i,{width:this.legendWidth,height:this.legendHeight,verticalAlign:this.proximate?"top":i.verticalAlign}),!0,e)}handleOverflow(e){const t=this,i=this.chart,l=i.renderer,p=this.options;var E=p.y;const a=p.verticalAlign==="top",L=this.padding,W=p.maxHeight,Q=p.navigation,nt=S(Q.animation,!0),D=Q.arrowSize||12,s=this.pages,M=this.allItems,z=function(F){typeof F=="number"?G.attr({height:F}):G&&(t.clipRect=G.destroy(),t.contentGroup.clip()),t.contentGroup.div&&(t.contentGroup.div.style.clip=F?"rect("+L+"px,9999px,"+(L+F)+"px,0)":"auto")},j=function(F){return t[F]=l.circle(0,0,1.3*D).translate(D/2,D/2).add(m),i.styledMode||t[F].attr("fill","rgba(0,0,0,0.0001)"),t[F]};let K,n,f;E=i.spacingBox.height+(a?-E:E)-L;let m=this.nav,G=this.clipRect;return p.layout!=="horizontal"||p.verticalAlign==="middle"||p.floating||(E/=2),W&&(E=Math.min(E,W)),s.length=0,e&&0<E&&e>E&&Q.enabled!==!1?(this.clipHeight=K=Math.max(E-20-this.titleHeight-L,0),this.currentPage=S(this.currentPage,1),this.fullHeight=e,M.forEach((F,H)=>{f=F.legendItem||{},F=f.y||0;const st=Math.round(f.label.getBBox().height);let rt=s.length;(!rt||F-s[rt-1]>K&&(n||F)!==s[rt-1])&&(s.push(n||F),rt++),f.pageIx=rt-1,n&&((M[H-1].legendItem||{}).pageIx=rt-1),H===M.length-1&&F+st-s[rt-1]>K&&F>s[rt-1]&&(s.push(F),f.pageIx=rt),F!==n&&(n=F)}),G||(G=t.clipRect=l.clipRect(0,L-2,9999,0),t.contentGroup.clip(G)),z(K),m||(this.nav=m=l.g().attr({zIndex:1}).add(this.group),this.up=l.symbol("triangle",0,0,D,D).add(m),j("upTracker").on("click",function(){t.scroll(-1,nt)}),this.pager=l.text("",15,10).addClass("highcharts-legend-navigation"),!i.styledMode&&Q.style&&this.pager.css(Q.style),this.pager.add(m),this.down=l.symbol("triangle-down",0,0,D,D).add(m),j("downTracker").on("click",function(){t.scroll(1,nt)})),t.scroll(0),e=E):m&&(z(),this.nav=m.destroy(),this.scrollGroup.attr({translateY:1}),this.clipHeight=0),e}scroll(e,t){const i=this.chart,l=this.pages,p=l.length,E=this.clipHeight,a=this.options.navigation,L=this.pager,W=this.padding;let Q=this.currentPage+e;Q>p&&(Q=p),0<Q&&(typeof t<"u"&&C(t,i),this.nav.attr({translateX:W,translateY:E+this.padding+7+this.titleHeight,visibility:"inherit"}),[this.up,this.upTracker].forEach(function(nt){nt.attr({class:Q===1?"highcharts-legend-nav-inactive":"highcharts-legend-nav-active"})}),L.attr({text:Q+"/"+p}),[this.down,this.downTracker].forEach(function(nt){nt.attr({x:18+this.pager.getBBox().width,class:Q===p?"highcharts-legend-nav-inactive":"highcharts-legend-nav-active"})},this),i.styledMode||(this.up.attr({fill:Q===1?a.inactiveColor:a.activeColor}),this.upTracker.css({cursor:Q===1?"default":"pointer"}),this.down.attr({fill:Q===p?a.inactiveColor:a.activeColor}),this.downTracker.css({cursor:Q===p?"default":"pointer"})),this.scrollOffset=-l[Q-1]+this.initialItemY,this.scrollGroup.animate({translateY:this.scrollOffset}),this.currentPage=Q,this.positionCheckboxes(),e=X(S(t,i.renderer.globalAnimation,!0)),u(()=>{g(this,"afterScroll",{currentPage:Q})},e.duration))}setItemEvents(e,t,i){const l=this,p=e.legendItem||{},E=l.chart.renderer.boxWrapper,a=e instanceof q,L="highcharts-legend-"+(a?"point":"series")+"-active",W=l.chart.styledMode;i=i?[t,p.symbol]:[p.group];const Q=nt=>{l.allItems.forEach(D=>{e!==D&&[D].concat(D.linkedSeries||[]).forEach(s=>{s.setState(nt,!a)})})};for(const nt of i)nt&&nt.on("mouseover",function(){e.visible&&Q("inactive"),e.setState("hover"),e.visible&&E.addClass(L),W||t.css(l.options.itemHoverStyle)}).on("mouseout",function(){l.chart.styledMode||t.css(b(e.visible?l.itemStyle:l.itemHiddenStyle)),Q(""),E.removeClass(L),e.setState()}).on("click",function(D){const s=function(){e.setVisible&&e.setVisible(),Q(e.visible?"inactive":"")};E.removeClass(L),D={browserEvent:D},e.firePointEvent?e.firePointEvent("legendItemClick",D,s):g(e,"legendItemClick",D,s)})}createCheckboxForItem(e){e.checkbox=_("input",{type:"checkbox",className:"highcharts-legend-checkbox",checked:e.selected,defaultChecked:e.selected},this.options.itemCheckboxStyle,this.chart.container),v(e.checkbox,"click",function(t){g(e.series||e,"checkboxClick",{checked:t.target.checked,item:e},function(){e.select()})})}}return function(d){const e=[];d.compose=function(t){Y.pushUnique(e,t)&&v(t,"beforeMargins",function(){this.legend=new d(this,this.options.legend)})}}(h||(h={})),h}),et(w,"Core/Legend/LegendSymbol.js",[w["Core/Utilities.js"]],function(B){const{extend:P,merge:$,pick:q}=B;var J;return function(Y){Y.lineMarker=function(X,C){C=this.legendItem=this.legendItem||{};var R=this.options;const N=X.symbolWidth,x=X.symbolHeight,v=x/2,_=this.chart.renderer,A=C.group;X=X.baseline-Math.round(.3*X.fontMetrics.b);let c={},y=R.marker,k=0;this.chart.styledMode||(c={"stroke-width":Math.min(R.lineWidth||0,24)},R.dashStyle?c.dashstyle=R.dashStyle:R.linecap!=="square"&&(c["stroke-linecap"]="round")),C.line=_.path().addClass("highcharts-graph").attr(c).add(A),c["stroke-linecap"]&&(k=Math.min(C.line.strokeWidth(),N)/2),N&&C.line.attr({d:[["M",k,X],["L",N-k,X]]}),y&&y.enabled!==!1&&N&&(R=Math.min(q(y.radius,v),v),this.symbol.indexOf("url")===0&&(y=$(y,{width:x,height:x}),R=0),C.symbol=C=_.symbol(this.symbol,N/2-R,X-R,2*R,2*R,P({context:"legend"},y)).addClass("highcharts-point").add(A),C.isMarker=!0)},Y.rectangle=function(X,C){C=C.legendItem||{};const R=X.symbolHeight,N=X.options.squareSymbol;C.symbol=this.chart.renderer.rect(N?(X.symbolWidth-R)/2:0,X.baseline-R+1,N?R:X.symbolWidth,R,q(X.options.symbolRadius,R/2)).addClass("highcharts-point").attr({zIndex:3}).add(C.group)}}(J||(J={})),J}),et(w,"Core/Series/SeriesDefaults.js",[],function(){return{lineWidth:1,allowPointSelect:!1,crisp:!0,showCheckbox:!1,animation:{duration:1e3},enableMouseTracking:!0,events:{},marker:{enabledThreshold:2,lineColor:"#ffffff",lineWidth:0,radius:4,states:{normal:{animation:!0},hover:{animation:{duration:150},enabled:!0,radiusPlus:2,lineWidthPlus:1},select:{fillColor:"#cccccc",lineColor:"#000000",lineWidth:2}}},point:{events:{}},dataLabels:{animation:{},align:"center",borderWidth:0,defer:!0,formatter:function(){const{numberFormatter:B}=this.series.chart;return typeof this.y!="number"?"":B(this.y,-1)},padding:5,style:{fontSize:"0.7em",fontWeight:"bold",color:"contrast",textOutline:"1px contrast"},verticalAlign:"bottom",x:0,y:0},cropThreshold:300,opacity:1,pointRange:0,softThreshold:!0,states:{normal:{animation:!0},hover:{animation:{duration:150},lineWidthPlus:1,marker:{},halo:{size:10,opacity:.25}},select:{animation:{duration:0}},inactive:{animation:{duration:150},opacity:.2}},stickyTracking:!0,turboThreshold:1e3,findNearestPointBy:"x"}}),et(w,"Core/Series/SeriesRegistry.js",[w["Core/Globals.js"],w["Core/Defaults.js"],w["Core/Series/Point.js"],w["Core/Utilities.js"]],function(B,P,$,q){const{defaultOptions:J}=P,{extendClass:Y,merge:X}=q;var C;return function(R){function N(x,v){const _=J.plotOptions||{},A=v.defaultOptions,c=v.prototype;c.type=x,c.pointClass||(c.pointClass=$),A&&(_[x]=A),R.seriesTypes[x]=v}R.seriesTypes=B.seriesTypes,R.registerSeriesType=N,R.seriesType=function(x,v,_,A,c){const y=J.plotOptions||{};return v=v||"",y[x]=X(y[v],_),N(x,Y(R.seriesTypes[v]||function(){},A)),R.seriesTypes[x].prototype.type=x,c&&(R.seriesTypes[x].prototype.pointClass=Y($,c)),R.seriesTypes[x]}}(C||(C={})),C}),et(w,"Core/Series/Series.js",[w["Core/Animation/AnimationUtilities.js"],w["Core/Defaults.js"],w["Core/Foundation.js"],w["Core/Globals.js"],w["Core/Legend/LegendSymbol.js"],w["Core/Series/Point.js"],w["Core/Series/SeriesDefaults.js"],w["Core/Series/SeriesRegistry.js"],w["Core/Renderer/SVG/SVGElement.js"],w["Core/Utilities.js"]],function(B,P,$,q,J,Y,X,C,R,N){const{animObject:x,setAnimation:v}=B,{defaultOptions:_}=P,{registerEventOptions:A}=$,{hasTouch:c,svg:y,win:k}=q,{seriesTypes:g}=C,{arrayMax:O,arrayMin:b,clamp:S,correctFloat:o,defined:r,diffObjects:u,erase:h,error:d,extend:e,find:t,fireEvent:i,getClosestDistance:l,getNestedProperty:p,insertItem:E,isArray:a,isNumber:L,isString:W,merge:Q,objectEach:nt,pick:D,removeEvent:s,splat:M,syncTimeout:z}=N;class j{constructor(){this.zones=this.yAxis=this.xAxis=this.userOptions=this.tooltipOptions=this.processedYData=this.processedXData=this.points=this.options=this.linkedSeries=this.index=this.eventsToUnbind=this.eventOptions=this.data=this.chart=this._i=void 0}init(n,f){i(this,"init",{options:f});const m=this,G=n.series;this.eventsToUnbind=[],m.chart=n,m.options=m.setOptions(f),f=m.options,m.linkedSeries=[],m.bindAxes(),e(m,{name:f.name,state:"",visible:f.visible!==!1,selected:f.selected===!0}),A(this,f);const F=f.events;(F&&F.click||f.point&&f.point.events&&f.point.events.click||f.allowPointSelect)&&(n.runTrackerClick=!0),m.getColor(),m.getSymbol(),m.parallelArrays.forEach(function(st){m[st+"Data"]||(m[st+"Data"]=[])}),m.isCartesian&&(n.hasCartesianSeries=!0);let H;G.length&&(H=G[G.length-1]),m._i=D(H&&H._i,-1)+1,m.opacity=m.options.opacity,n.orderItems("series",E(this,G)),f.dataSorting&&f.dataSorting.enabled?m.setDataSortingOptions():m.points||m.data||m.setData(f.data,!1),i(this,"afterInit")}is(n){return g[n]&&this instanceof g[n]}bindAxes(){const n=this,f=n.options,m=n.chart;let G;i(this,"bindAxes",null,function(){(n.axisTypes||[]).forEach(function(F){m[F].forEach(function(H){G=H.options,(D(f[F],0)===H.index||typeof f[F]<"u"&&f[F]===G.id)&&(E(n,H.series),n[F]=H,H.isDirty=!0)}),n[F]||n.optionalAxis===F||d(18,!0,m)})}),i(this,"afterBindAxes")}updateParallelArrays(n,f,m){const G=n.series,F=L(f)?function(H){const st=H==="y"&&G.toYData?G.toYData(n):n[H];G[H+"Data"][f]=st}:function(H){Array.prototype[f].apply(G[H+"Data"],m)};G.parallelArrays.forEach(F)}hasData(){return this.visible&&typeof this.dataMax<"u"&&typeof this.dataMin<"u"||this.visible&&this.yData&&0<this.yData.length}autoIncrement(n){var f=this.options;const m=f.pointIntervalUnit,G=f.relativeXValue,F=this.chart.time;let H=this.xIncrement,st;return H=D(H,f.pointStart,0),this.pointInterval=st=D(this.pointInterval,f.pointInterval,1),G&&L(n)&&(st*=n),m&&(f=new F.Date(H),m==="day"?F.set("Date",f,F.get("Date",f)+st):m==="month"?F.set("Month",f,F.get("Month",f)+st):m==="year"&&F.set("FullYear",f,F.get("FullYear",f)+st),st=f.getTime()-H),G&&L(n)?H+st:(this.xIncrement=H+st,H)}setDataSortingOptions(){const n=this.options;e(this,{requireSorting:!1,sorted:!1,enabledDataSorting:!0,allowDG:!1}),r(n.pointRange)||(n.pointRange=1)}setOptions(n){var f,m;const G=this.chart;var F=G.options.plotOptions,H=G.userOptions||{};const st=Q(n);n=G.styledMode;const rt={plotOptions:F,userOptions:st};i(this,"setOptions",rt);const lt=rt.plotOptions[this.type];H=H.plotOptions||{};const ht=H.series||{},pt=_.plotOptions[this.type]||{},I=H[this.type]||{};return this.userOptions=rt.userOptions,F=Q(lt,F.series,I,st),this.tooltipOptions=Q(_.tooltip,(f=_.plotOptions.series)===null||f===void 0?void 0:f.tooltip,pt==null?void 0:pt.tooltip,G.userOptions.tooltip,(m=H.series)===null||m===void 0?void 0:m.tooltip,I.tooltip,st.tooltip),this.stickyTracking=D(st.stickyTracking,I.stickyTracking,ht.stickyTracking,this.tooltipOptions.shared&&!this.noSharedTooltip?!0:F.stickyTracking),lt.marker===null&&delete F.marker,this.zoneAxis=F.zoneAxis,m=this.zones=(F.zones||[]).slice(),!F.negativeColor&&!F.negativeFillColor||F.zones||(f={value:F[this.zoneAxis+"Threshold"]||F.threshold||0,className:"highcharts-negative"},n||(f.color=F.negativeColor,f.fillColor=F.negativeFillColor),m.push(f)),m.length&&r(m[m.length-1].value)&&m.push(n?{}:{color:this.color,fillColor:this.fillColor}),i(this,"afterSetOptions",{options:F}),F}getName(){return D(this.options.name,"Series "+(this.index+1))}getCyclic(n,f,m){const G=this.chart,F=`${n}Index`,H=`${n}Counter`,st=(m==null?void 0:m.length)||G.options.chart.colorCount;if(!f){var rt=D(n==="color"?this.options.colorIndex:void 0,this[F]);r(rt)||(G.series.length||(G[H]=0),rt=G[H]%st,G[H]+=1),m&&(f=m[rt])}typeof rt<"u"&&(this[F]=rt),this[n]=f}getColor(){this.chart.styledMode?this.getCyclic("color"):this.options.colorByPoint?this.color="#cccccc":this.getCyclic("color",this.options.color||_.plotOptions[this.type].color,this.chart.options.colors)}getPointsCollection(){return(this.hasGroupedData?this.points:this.data)||[]}getSymbol(){this.getCyclic("symbol",this.options.marker.symbol,this.chart.options.symbols)}findPointIndex(n,f){const m=n.id,G=n.x,F=this.points;var H=this.options.dataSorting,st;let rt,lt;if(m)H=this.chart.get(m),H instanceof Y&&(st=H);else if((this.linkedParent||this.enabledDataSorting||this.options.relativeXValue)&&(st=ht=>!ht.touched&&ht.index===n.index,H&&H.matchByName?st=ht=>!ht.touched&&ht.name===n.name:this.options.relativeXValue&&(st=ht=>!ht.touched&&ht.options.x===n.x),st=t(F,st),!st))return;return st&&(lt=st&&st.index,typeof lt<"u"&&(rt=!0)),typeof lt>"u"&&L(G)&&(lt=this.xData.indexOf(G,f)),lt!==-1&&typeof lt<"u"&&this.cropped&&(lt=lt>=this.cropStart?lt-this.cropStart:lt),!rt&&L(lt)&&F[lt]&&F[lt].touched&&(lt=void 0),lt}updateData(n,f){const m=this.options,G=m.dataSorting,F=this.points,H=[],st=this.requireSorting,rt=n.length===F.length;let lt,ht,pt,I=!0;if(this.xIncrement=null,n.forEach(function(T,tt){var V=r(T)&&this.pointClass.prototype.optionsToObject.call({series:this},T)||{};const ot=V.x;V.id||L(ot)?(V=this.findPointIndex(V,pt),V===-1||typeof V>"u"?H.push(T):F[V]&&T!==m.data[V]?(F[V].update(T,!1,null,!1),F[V].touched=!0,st&&(pt=V+1)):F[V]&&(F[V].touched=!0),(!rt||tt!==V||G&&G.enabled||this.hasDerivedData)&&(lt=!0)):H.push(T)},this),lt)for(n=F.length;n--;)(ht=F[n])&&!ht.touched&&ht.remove&&ht.remove(!1,f);else!rt||G&&G.enabled?I=!1:(n.forEach(function(T,tt){T===F[tt].y||F[tt].destroyed||F[tt].update(T,!1,null,!1)}),H.length=0);return F.forEach(function(T){T&&(T.touched=!1)}),I?(H.forEach(function(T){this.addPoint(T,!1,null,null,!1)},this),this.xIncrement===null&&this.xData&&this.xData.length&&(this.xIncrement=O(this.xData),this.autoIncrement()),!0):!1}setData(n,f=!0,m,G){var F;const H=this,st=H.points,rt=st&&st.length||0,lt=H.options,ht=H.chart,pt=lt.dataSorting,I=H.xAxis,T=lt.turboThreshold,tt=this.xData,V=this.yData;var ot=H.pointArrayMap;ot=ot&&ot.length;const dt=lt.keys;let ct,yt=0,vt=1,gt=null;if(!ht.options.chart.allowMutatingData){lt.data&&delete H.options.data,H.userOptions.data&&delete H.userOptions.data;var xt=Q(!0,n)}if(n=xt||n||[],xt=n.length,pt&&pt.enabled&&(n=this.sortData(n)),ht.options.chart.allowMutatingData&&G!==!1&&xt&&rt&&!H.cropped&&!H.hasGroupedData&&H.visible&&!H.boosted&&(ct=this.updateData(n,m)),!ct){if(H.xIncrement=null,H.colorCounter=0,this.parallelArrays.forEach(function(Mt){H[Mt+"Data"].length=0}),T&&xt>T)if(gt=H.getFirstValidPoint(n),L(gt))for(m=0;m<xt;m++)tt[m]=this.autoIncrement(),V[m]=n[m];else if(a(gt))if(ot)if(gt.length===ot)for(m=0;m<xt;m++)tt[m]=this.autoIncrement(),V[m]=n[m];else for(m=0;m<xt;m++)G=n[m],tt[m]=G[0],V[m]=G.slice(1,ot+1);else if(dt&&(yt=dt.indexOf("x"),vt=dt.indexOf("y"),yt=0<=yt?yt:0,vt=0<=vt?vt:1),gt.length===1&&(vt=0),yt===vt)for(m=0;m<xt;m++)tt[m]=this.autoIncrement(),V[m]=n[m][vt];else for(m=0;m<xt;m++)G=n[m],tt[m]=G[yt],V[m]=G[vt];else d(12,!1,ht);else for(m=0;m<xt;m++)G={series:H},H.pointClass.prototype.applyOptions.apply(G,[n[m]]),H.updateParallelArrays(G,m);for(V&&W(V[0])&&d(14,!0,ht),H.data=[],H.options.data=H.userOptions.data=n,m=rt;m--;)(F=st[m])===null||F===void 0||F.destroy();I&&(I.minRange=I.userMinRange),H.isDirty=ht.isDirtyBox=!0,H.isDirtyData=!!st,m=!1}lt.legendType==="point"&&(this.processData(),this.generatePoints()),f&&ht.redraw(m)}sortData(n){const f=this,m=f.options.dataSorting.sortKey||"y",G=function(F,H){return r(H)&&F.pointClass.prototype.optionsToObject.call({series:F},H)||{}};return n.forEach(function(F,H){n[H]=G(f,F),n[H].index=H},this),n.concat().sort((F,H)=>(F=p(m,F),H=p(m,H),H<F?-1:H>F?1:0)).forEach(function(F,H){F.x=H},this),f.linkedSeries&&f.linkedSeries.forEach(function(F){const H=F.options,st=H.data;H.dataSorting&&H.dataSorting.enabled||!st||(st.forEach(function(rt,lt){st[lt]=G(F,rt),n[lt]&&(st[lt].x=n[lt].x,st[lt].index=lt)}),F.setData(st,!1))}),n}getProcessedData(n){const f=this;var m=f.xAxis,G=f.options;const F=G.cropThreshold,H=n||f.getExtremesFromAll||G.getExtremesFromAll,st=m==null?void 0:m.logarithmic,rt=f.isCartesian;let lt=0,ht;n=f.xData,G=f.yData;let pt=!1;const I=n.length;if(m){var T=m.getExtremes();ht=T.min,T=T.max,pt=!(!m.categories||m.names.length)}if(rt&&f.sorted&&!H&&(!F||I>F||f.forceCrop)){if(n[I-1]<ht||n[0]>T)n=[],G=[];else if(f.yData&&(n[0]<ht||n[I-1]>T)){var tt=this.cropData(f.xData,f.yData,ht,T);n=tt.xData,G=tt.yData,lt=tt.start,tt=!0}}return m=l([st?n.map(st.log2lin):n],()=>f.requireSorting&&!pt&&d(15,!1,f.chart)),{xData:n,yData:G,cropped:tt,cropStart:lt,closestPointRange:m}}processData(n){const f=this.xAxis;if(this.isCartesian&&!this.isDirty&&!f.isDirty&&!this.yAxis.isDirty&&!n)return!1;n=this.getProcessedData(),this.cropped=n.cropped,this.cropStart=n.cropStart,this.processedXData=n.xData,this.processedYData=n.yData,this.closestPointRange=this.basePointRange=n.closestPointRange,i(this,"afterProcessData")}cropData(n,f,m,G,F){const H=n.length;let st,rt=0,lt=H;for(F=D(F,this.cropShoulder),st=0;st<H;st++)if(n[st]>=m){rt=Math.max(0,st-F);break}for(m=st;m<H;m++)if(n[m]>G){lt=m+F;break}return{xData:n.slice(rt,lt),yData:f.slice(rt,lt),start:rt,end:lt}}generatePoints(){var n=this.options;const f=this.processedData||n.data,m=this.processedXData,G=this.processedYData,F=this.pointClass,H=m.length,st=this.cropStart||0,rt=this.hasGroupedData,lt=n.keys,ht=[];n=n.dataGrouping&&n.dataGrouping.groupAll?st:0;let pt,I,T,tt=this.data;if(!tt&&!rt){var V=[];V.length=f.length,tt=this.data=V}for(lt&&rt&&(this.options.keys=!1),T=0;T<H;T++)V=st+T,rt?(I=new F().init(this,[m[T]].concat(M(G[T]))),I.dataGroup=this.groupMap[n+T],I.dataGroup.options&&(I.options=I.dataGroup.options,e(I,I.dataGroup.options),delete I.dataLabels)):(I=tt[V])||typeof f[V]>"u"||(tt[V]=I=new F().init(this,f[V],m[T])),I&&(I.index=rt?n+T:V,ht[T]=I);if(this.options.keys=lt,tt&&(H!==(pt=tt.length)||rt))for(T=0;T<pt;T++)T!==st||rt||(T+=H),tt[T]&&(tt[T].destroyElements(),tt[T].plotX=void 0);this.data=tt,this.points=ht,i(this,"afterGeneratePoints")}getXExtremes(n){return{min:b(n),max:O(n)}}getExtremes(n,f){const m=this.xAxis;var G=this.yAxis;const F=this.processedXData||this.xData,H=[],st=this.requireSorting?this.cropShoulder:0;G=G?G.positiveValuesOnly:!1;let rt,lt=0,ht=0,pt=0;n=n||this.stackedYData||this.processedYData||[];const I=n.length;if(m){var T=m.getExtremes();lt=T.min,ht=T.max}for(rt=0;rt<I;rt++){var tt=F[rt];T=n[rt];var V=(L(T)||a(T))&&(T.length||0<T||!G);if(tt=f||this.getExtremesFromAll||this.options.getExtremesFromAll||this.cropped||!m||(F[rt+st]||tt)>=lt&&(F[rt-st]||tt)<=ht,V&&tt)if(V=T.length)for(;V--;)L(T[V])&&(H[pt++]=T[V]);else H[pt++]=T}return n={activeYData:H,dataMin:b(H),dataMax:O(H)},i(this,"afterGetExtremes",{dataExtremes:n}),n}applyExtremes(){const n=this.getExtremes();return this.dataMin=n.dataMin,this.dataMax=n.dataMax,n}getFirstValidPoint(n){const f=n.length;let m=0,G=null;for(;G===null&&m<f;)G=n[m],m++;return G}translate(){var n;this.processedXData||this.processData(),this.generatePoints();var f=this.options;const m=f.stacking,G=this.xAxis,F=G.categories,H=this.enabledDataSorting,st=this.yAxis,rt=this.points,lt=rt.length,ht=this.pointPlacementToXValue(),pt=!!ht,I=f.threshold;f=f.startFromThreshold?I:0;let T,tt,V,ot,dt=Number.MAX_VALUE;for(T=0;T<lt;T++){const ct=rt[T],yt=ct.x;let vt,gt,xt=ct.y,Mt=ct.low;const St=m&&((n=st.stacking)===null||n===void 0?void 0:n.stacks[(this.negStacks&&xt<(f?0:I)?"-":"")+this.stackKey]);tt=G.translate(yt,!1,!1,!1,!0,ht),ct.plotX=L(tt)?o(S(tt,-1e5,1e5)):void 0,m&&this.visible&&St&&St[yt]&&(ot=this.getStackIndicator(ot,yt,this.index),!ct.isNull&&ot.key&&(vt=St[yt],gt=vt.points[ot.key]),vt&&a(gt)&&(Mt=gt[0],xt=gt[1],Mt===f&&ot.key===St[yt].base&&(Mt=D(L(I)?I:st.min)),st.positiveValuesOnly&&r(Mt)&&0>=Mt&&(Mt=void 0),ct.total=ct.stackTotal=D(vt.total),ct.percentage=r(ct.y)&&vt.total?ct.y/vt.total*100:void 0,ct.stackY=xt,this.irregularWidths||vt.setOffset(this.pointXOffset||0,this.barW||0,void 0,void 0,void 0,this.xAxis))),ct.yBottom=r(Mt)?S(st.translate(Mt,!1,!0,!1,!0),-1e5,1e5):void 0,this.dataModify&&(xt=this.dataModify.modifyValue(xt,T));let wt;L(xt)&&ct.plotX!==void 0&&(wt=st.translate(xt,!1,!0,!1,!0),wt=L(wt)?S(wt,-1e5,1e5):void 0),ct.plotY=wt,ct.isInside=this.isPointInside(ct),ct.clientX=pt?o(G.translate(yt,!1,!1,!1,!0,ht)):tt,ct.negative=(ct.y||0)<(I||0),ct.category=D(F&&F[ct.x],ct.x),ct.isNull||ct.visible===!1||(typeof V<"u"&&(dt=Math.min(dt,Math.abs(tt-V))),V=tt),ct.zone=this.zones.length?ct.getZone():void 0,!ct.graphic&&this.group&&H&&(ct.isNew=!0)}this.closestPointRangePx=dt,i(this,"afterTranslate")}getValidPoints(n,f,m){const G=this.chart;return(n||this.points||[]).filter(function(F){const{plotX:H,plotY:st}=F;return!m&&(F.isNull||!L(st))||f&&!G.isInsidePlot(H,st,{inverted:G.inverted})?!1:F.visible!==!1})}getClipBox(){const{chart:n,xAxis:f,yAxis:m}=this,G=Q(n.clipBox);return f&&f.len!==n.plotSizeX&&(G.width=f.len),m&&m.len!==n.plotSizeY&&(G.height=m.len),G}getSharedClipKey(){return this.sharedClipKey=(this.options.xAxis||0)+","+(this.options.yAxis||0)}setClip(){const{chart:n,group:f,markerGroup:m}=this,G=n.sharedClips,F=n.renderer,H=this.getClipBox(),st=this.getSharedClipKey();let rt=G[st];rt?rt.animate(H):G[st]=rt=F.clipRect(H),f&&f.clip(this.options.clip===!1?void 0:rt),m&&m.clip()}animate(n){const{chart:f,group:m,markerGroup:G}=this,F=f.inverted;var H=x(this.options.animation),st=[this.getSharedClipKey(),H.duration,H.easing,H.defer].join();let rt=f.sharedClips[st],lt=f.sharedClips[st+"m"];if(n&&m)H=this.getClipBox(),rt?rt.attr("height",H.height):(H.width=0,F&&(H.x=f.plotHeight),rt=f.renderer.clipRect(H),f.sharedClips[st]=rt,lt=f.renderer.clipRect({x:-99,y:-99,width:F?f.plotWidth+199:99,height:F?99:f.plotHeight+199}),f.sharedClips[st+"m"]=lt),m.clip(rt),G&&G.clip(lt);else if(rt&&!rt.hasClass("highcharts-animating")){st=this.getClipBox();const ht=H.step;G&&G.element.childNodes.length&&(H.step=function(pt,I){ht&&ht.apply(I,arguments),I.prop==="width"&&lt&&lt.element&&lt.attr(F?"height":"width",pt+99)}),rt.addClass("highcharts-animating").animate(st,H)}}afterAnimate(){this.setClip(),nt(this.chart.sharedClips,(n,f,m)=>{n&&!this.chart.container.querySelector(`[clip-path="url(#${n.id})"]`)&&(n.destroy(),delete m[f])}),this.finishedAnimating=!0,i(this,"afterAnimate")}drawPoints(n=this.points){const f=this.chart,m=f.styledMode,{colorAxis:G,options:F}=this,H=F.marker,st=this[this.specialGroup||"markerGroup"],rt=this.xAxis,lt=D(H.enabled,!rt||rt.isRadial?!0:null,this.closestPointRangePx>=H.enabledThreshold*H.radius);let ht,pt,I,T,tt,V;if(H.enabled!==!1||this._hasPointMarkers)for(ht=0;ht<n.length;ht++){pt=n[ht],T=(I=pt.graphic)?"animate":"attr";var ot=pt.marker||{};if(tt=!!pt.marker,(lt&&typeof ot.enabled>"u"||ot.enabled)&&!pt.isNull&&pt.visible!==!1){const dt=D(ot.symbol,this.symbol,"rect");V=this.markerAttribs(pt,pt.selected&&"select"),this.enabledDataSorting&&(pt.startXPos=rt.reversed?-(V.width||0):rt.width);const ct=pt.isInside!==!1;!I&&ct&&(0<(V.width||0)||pt.hasImage)&&(pt.graphic=I=f.renderer.symbol(dt,V.x,V.y,V.width,V.height,tt?ot:H).add(st),this.enabledDataSorting&&f.hasRendered&&(I.attr({x:pt.startXPos}),T="animate")),I&&T==="animate"&&I[ct?"show":"hide"](ct).animate(V),I&&(ot=this.pointAttribs(pt,m||!pt.selected?void 0:"select"),m?G&&I.css({fill:ot.fill}):I[T](ot)),I&&I.addClass(pt.getClassName(),!0)}else I&&(pt.graphic=I.destroy())}}markerAttribs(n,f){const m=this.options;var G=m.marker;const F=n.marker||{},H=F.symbol||G.symbol,st={};let rt=D(F.radius,G&&G.radius);return f&&(G=G.states[f],f=F.states&&F.states[f],rt=D(f&&f.radius,G&&G.radius,rt&&rt+(G&&G.radiusPlus||0))),n.hasImage=H&&H.indexOf("url")===0,n.hasImage&&(rt=0),n=n.pos(),L(rt)&&n&&(st.x=n[0]-rt,st.y=n[1]-rt,m.crisp&&(st.x=Math.floor(st.x))),rt&&(st.width=st.height=2*rt),st}pointAttribs(n,f){var m=this.options.marker,G=n&&n.options;const F=G&&G.marker||{};var H=G&&G.color,st=n&&n.color;const rt=n&&n.zone&&n.zone.color;let lt=this.color;return n=D(F.lineWidth,m.lineWidth),G=1,lt=H||rt||st||lt,H=F.fillColor||m.fillColor||lt,st=F.lineColor||m.lineColor||lt,f=f||"normal",m=m.states[f]||{},f=F.states&&F.states[f]||{},n=D(f.lineWidth,m.lineWidth,n+D(f.lineWidthPlus,m.lineWidthPlus,0)),H=f.fillColor||m.fillColor||H,st=f.lineColor||m.lineColor||st,G=D(f.opacity,m.opacity,G),{stroke:st,"stroke-width":n,fill:H,opacity:G}}destroy(n){const f=this,m=f.chart,G=/AppleWebKit\/533/.test(k.navigator.userAgent),F=f.data||[];let H,st,rt,lt;for(i(f,"destroy",{keepEventsForUpdate:n}),this.removeEvents(n),(f.axisTypes||[]).forEach(function(ht){(lt=f[ht])&&lt.series&&(h(lt.series,f),lt.isDirty=lt.forceRedraw=!0)}),f.legendItem&&f.chart.legend.destroyItem(f),st=F.length;st--;)(rt=F[st])&&rt.destroy&&rt.destroy();f.clips&&f.clips.forEach(ht=>ht.destroy()),N.clearTimeout(f.animationTimeout),nt(f,function(ht,pt){ht instanceof R&&!ht.survive&&(H=G&&pt==="group"?"hide":"destroy",ht[H]())}),m.hoverSeries===f&&(m.hoverSeries=void 0),h(m.series,f),m.orderItems("series"),nt(f,function(ht,pt){n&&pt==="hcEvents"||delete f[pt]})}applyZones(){const n=this,f=this.chart,m=f.renderer,G=this.zones,F=this.clips||[],H=this.graph,st=this.area,rt=Math.max(f.plotWidth,f.plotHeight),lt=this[(this.zoneAxis||"y")+"Axis"],ht=f.inverted;let pt,I,T,tt,V,ot,dt,ct,yt,vt,gt,xt=!1;G.length&&(H||st)&&lt&&typeof lt.min<"u"?(V=lt.reversed,ot=lt.horiz,H&&!this.showLine&&H.hide(),st&&st.hide(),tt=lt.getExtremes(),G.forEach(function(Mt,St){pt=V?ot?f.plotWidth:0:ot?0:lt.toPixels(tt.min)||0,pt=S(D(I,pt),0,rt),I=S(Math.round(lt.toPixels(D(Mt.value,tt.max),!0)||0),0,rt),xt&&(pt=I=lt.toPixels(tt.max)),dt=Math.abs(pt-I),ct=Math.min(pt,I),yt=Math.max(pt,I),lt.isXAxis?(T={x:ht?yt:ct,y:0,width:dt,height:rt},ot||(T.x=f.plotHeight-T.x)):(T={x:0,y:ht?yt:ct,width:rt,height:dt},ot&&(T.y=f.plotWidth-T.y)),F[St]?F[St].animate(T):F[St]=m.clipRect(T),vt=n["zone-area-"+St],gt=n["zone-graph-"+St],H&&gt&&gt.clip(F[St]),st&&vt&&vt.clip(F[St]),xt=Mt.value>tt.max,n.resetZones&&I===0&&(I=void 0)}),this.clips=F):n.visible&&(H&&H.show(),st&&st.show())}plotGroup(n,f,m,G,F){let H=this[n];const st=!H;return m={visibility:m,zIndex:G||.1},typeof this.opacity>"u"||this.chart.styledMode||this.state==="inactive"||(m.opacity=this.opacity),st&&(this[n]=H=this.chart.renderer.g().add(F)),H.addClass("highcharts-"+f+" highcharts-series-"+this.index+" highcharts-"+this.type+"-series "+(r(this.colorIndex)?"highcharts-color-"+this.colorIndex+" ":"")+(this.options.className||"")+(H.hasClass("highcharts-tracker")?" highcharts-tracker":""),!0),H.attr(m)[st?"attr":"animate"](this.getPlotBox(f)),H}getPlotBox(n){let f=this.xAxis,m=this.yAxis;const G=this.chart;return n=G.inverted&&!G.polar&&f&&this.invertible!==!1&&n==="series",G.inverted&&(f=m,m=this.xAxis),{translateX:f?f.left:G.plotLeft,translateY:m?m.top:G.plotTop,rotation:n?90:0,rotationOriginX:n?(f.len-m.len)/2:0,rotationOriginY:n?(f.len+m.len)/2:0,scaleX:n?-1:1,scaleY:1}}removeEvents(n){n||s(this),this.eventsToUnbind.length&&(this.eventsToUnbind.forEach(function(f){f()}),this.eventsToUnbind.length=0)}render(){const n=this;var f=n.chart;const m=n.options,G=x(m.animation),F=n.visible?"inherit":"hidden",H=m.zIndex,st=n.hasRendered;f=f.seriesGroup;let rt=n.finishedAnimating?0:G.duration;i(this,"render"),n.plotGroup("group","series",F,H,f),n.markerGroup=n.plotGroup("markerGroup","markers",F,H,f),m.clip!==!1&&n.setClip(),n.animate&&rt&&n.animate(!0),n.drawGraph&&(n.drawGraph(),n.applyZones()),n.visible&&n.drawPoints(),n.drawDataLabels&&n.drawDataLabels(),n.redrawPoints&&n.redrawPoints(),n.drawTracker&&m.enableMouseTracking&&n.drawTracker(),n.animate&&rt&&n.animate(),st||(rt&&G.defer&&(rt+=G.defer),n.animationTimeout=z(function(){n.afterAnimate()},rt||0)),n.isDirty=!1,n.hasRendered=!0,i(n,"afterRender")}redraw(){const n=this.isDirty||this.isDirtyData;this.translate(),this.render(),n&&delete this.kdTree}searchPoint(n,f){const m=this.xAxis,G=this.yAxis,F=this.chart.inverted;return this.searchKDTree({clientX:F?m.len-n.chartY+m.pos:n.chartX-m.pos,plotY:F?G.len-n.chartX+G.pos:n.chartY-G.pos},f,n)}buildKDTree(n){function f(F,H,st){var rt=F&&F.length;let lt;if(rt)return lt=m.kdAxisArray[H%st],F.sort(function(ht,pt){return ht[lt]-pt[lt]}),rt=Math.floor(rt/2),{point:F[rt],left:f(F.slice(0,rt),H+1,st),right:f(F.slice(rt+1),H+1,st)}}this.buildingKdTree=!0;const m=this,G=-1<m.options.findNearestPointBy.indexOf("y")?2:1;delete m.kdTree,z(function(){m.kdTree=f(m.getValidPoints(null,!m.directTouch),G,G),m.buildingKdTree=!1},m.options.kdNow||n&&n.type==="touchstart"?0:1)}searchKDTree(n,f,m){function G(lt,ht,pt,I){const T=ht.point;var tt=F.kdAxisArray[pt%I];let V=T;var ot=r(lt[H])&&r(T[H])?Math.pow(lt[H]-T[H],2):null,dt=r(lt[st])&&r(T[st])?Math.pow(lt[st]-T[st],2):null;return dt=(ot||0)+(dt||0),T.dist=r(dt)?Math.sqrt(dt):Number.MAX_VALUE,T.distX=r(ot)?Math.sqrt(ot):Number.MAX_VALUE,tt=lt[tt]-T[tt],dt=0>tt?"left":"right",ot=0>tt?"right":"left",ht[dt]&&(dt=G(lt,ht[dt],pt+1,I),V=dt[rt]<V[rt]?dt:T),ht[ot]&&Math.sqrt(tt*tt)<V[rt]&&(lt=G(lt,ht[ot],pt+1,I),V=lt[rt]<V[rt]?lt:V),V}const F=this,H=this.kdAxisArray[0],st=this.kdAxisArray[1],rt=f?"distX":"dist";if(f=-1<F.options.findNearestPointBy.indexOf("y")?2:1,this.kdTree||this.buildingKdTree||this.buildKDTree(m),this.kdTree)return G(n,this.kdTree,f,f)}pointPlacementToXValue(){const{options:{pointPlacement:n,pointRange:f},xAxis:m}=this;let G=n;return G==="between"&&(G=m.reversed?-.5:.5),L(G)?G*(f||m.pointRange):0}isPointInside(n){const{chart:f,xAxis:m,yAxis:G}=this;return typeof n.plotY<"u"&&typeof n.plotX<"u"&&0<=n.plotY&&n.plotY<=(G?G.len:f.plotHeight)&&0<=n.plotX&&n.plotX<=(m?m.len:f.plotWidth)}drawTracker(){const n=this,f=n.options,m=f.trackByArea,G=[].concat(m?n.areaPath:n.graphPath),F=n.chart,H=F.pointer,st=F.renderer,rt=F.options.tooltip.snap,lt=n.tracker,ht=function(I){f.enableMouseTracking&&F.hoverSeries!==n&&n.onMouseOver()},pt="rgba(192,192,192,"+(y?1e-4:.002)+")";lt?lt.attr({d:G}):n.graph&&(n.tracker=st.path(G).attr({visibility:n.visible?"inherit":"hidden",zIndex:2}).addClass(m?"highcharts-tracker-area":"highcharts-tracker-line").add(n.group),F.styledMode||n.tracker.attr({"stroke-linecap":"round","stroke-linejoin":"round",stroke:pt,fill:m?pt:"none","stroke-width":n.graph.strokeWidth()+(m?0:2*rt)}),[n.tracker,n.markerGroup,n.dataLabelsGroup].forEach(function(I){I&&(I.addClass("highcharts-tracker").on("mouseover",ht).on("mouseout",function(T){H.onTrackerMouseOut(T)}),f.cursor&&!F.styledMode&&I.css({cursor:f.cursor}),c)&&I.on("touchstart",ht)})),i(this,"afterDrawTracker")}addPoint(n,f,m,G,F){const H=this.options,st=this.data,rt=this.chart;var lt=this.xAxis;lt=lt&&lt.hasNames&&lt.names;const ht=H.data,pt=this.xData;let I,T;f=D(f,!0);const tt={series:this};this.pointClass.prototype.applyOptions.apply(tt,[n]);const V=tt.x;if(T=pt.length,this.requireSorting&&V<pt[T-1])for(I=!0;T&&pt[T-1]>V;)T--;this.updateParallelArrays(tt,"splice",[T,0,0]),this.updateParallelArrays(tt,T),lt&&tt.name&&(lt[V]=tt.name),ht.splice(T,0,n),(I||this.processedData)&&(this.data.splice(T,0,null),this.processData()),H.legendType==="point"&&this.generatePoints(),m&&(st[0]&&st[0].remove?st[0].remove(!1):(st.shift(),this.updateParallelArrays(tt,"shift"),ht.shift())),F!==!1&&i(this,"addPoint",{point:tt}),this.isDirtyData=this.isDirty=!0,f&&rt.redraw(G)}removePoint(n,f,m){const G=this,F=G.data,H=F[n],st=G.points,rt=G.chart,lt=function(){st&&st.length===F.length&&st.splice(n,1),F.splice(n,1),G.options.data.splice(n,1),G.updateParallelArrays(H||{series:G},"splice",[n,1]),H&&H.destroy(),G.isDirty=!0,G.isDirtyData=!0,f&&rt.redraw()};v(m,rt),f=D(f,!0),H?H.firePointEvent("remove",null,lt):lt()}remove(n,f,m,G){function F(){H.destroy(G),st.isDirtyLegend=st.isDirtyBox=!0,st.linkSeries(G),D(n,!0)&&st.redraw(f)}const H=this,st=H.chart;m!==!1?i(H,"remove",null,F):F()}update(n,f){n=u(n,this.userOptions),i(this,"update",{options:n});const m=this,G=m.chart;var F=m.userOptions;const H=m.initialType||m.type;var st=G.options.plotOptions;const rt=g[H].prototype;var lt=m.finishedAnimating&&{animation:!1};const ht={};let pt,I=["colorIndex","eventOptions","navigatorSeries","symbolIndex","baseSeries"],T=n.type||F.type||G.options.chart.type;const tt=!(this.hasDerivedData||T&&T!==this.type||typeof n.pointStart<"u"||typeof n.pointInterval<"u"||typeof n.relativeXValue<"u"||n.joinBy||n.mapData||m.hasOptionChanged("dataGrouping")||m.hasOptionChanged("pointStart")||m.hasOptionChanged("pointInterval")||m.hasOptionChanged("pointIntervalUnit")||m.hasOptionChanged("keys"));if(T=T||H,tt&&(I.push("data","isDirtyData","points","processedData","processedXData","processedYData","xIncrement","cropped","_hasPointMarkers","_hasPointLabels","clips","nodes","layout","level","mapMap","mapData","minY","maxY","minX","maxX"),n.visible!==!1&&I.push("area","graph"),m.parallelArrays.forEach(function(V){I.push(V+"Data")}),n.data&&(n.dataSorting&&e(m.options.dataSorting,n.dataSorting),this.setData(n.data,!1))),n=Q(F,lt,{index:typeof F.index>"u"?m.index:F.index,pointStart:D(st&&st.series&&st.series.pointStart,F.pointStart,m.xData[0])},!tt&&{data:m.options.data},n),tt&&n.data&&(n.data=m.options.data),I=["group","markerGroup","dataLabelsGroup","transformGroup"].concat(I),I.forEach(function(V){I[V]=m[V],delete m[V]}),st=!1,g[T]){if(st=T!==m.type,m.remove(!1,!1,!1,!0),st)if(Object.setPrototypeOf)Object.setPrototypeOf(m,g[T].prototype);else{lt=Object.hasOwnProperty.call(m,"hcEvents")&&m.hcEvents;for(pt in rt)m[pt]=void 0;e(m,g[T].prototype),lt?m.hcEvents=lt:delete m.hcEvents}}else d(17,!0,G,{missingModuleFor:T});if(I.forEach(function(V){m[V]=I[V]}),m.init(G,n),tt&&this.points){if(n=m.options,n.visible===!1)ht.graphic=1,ht.dataLabel=1;else if(!m._hasPointLabels){const{marker:V,dataLabels:ot}=n;F=F.marker||{},!V||V.enabled!==!1&&F.symbol===V.symbol&&F.height===V.height&&F.width===V.width||(ht.graphic=1),ot&&ot.enabled===!1&&(ht.dataLabel=1)}for(const V of this.points)V&&V.series&&(V.resolveColor(),Object.keys(ht).length&&V.destroyElements(ht),n.showInLegend===!1&&V.legendItem&&G.legend.destroyItem(V))}m.initialType=H,G.linkSeries(),st&&m.linkedSeries.length&&(m.isDirtyData=!0),i(this,"afterUpdate"),D(f,!0)&&G.redraw(tt?void 0:!1)}setName(n){this.name=this.options.name=this.userOptions.name=n,this.chart.isDirtyLegend=!0}hasOptionChanged(n){const f=this.options[n],m=this.chart.options.plotOptions,G=this.userOptions[n];return G?f!==G:f!==D(m&&m[this.type]&&m[this.type][n],m&&m.series&&m.series[n],f)}onMouseOver(){const n=this.chart,f=n.hoverSeries;n.pointer.setHoverChartIndex(),f&&f!==this&&f.onMouseOut(),this.options.events.mouseOver&&i(this,"mouseOver"),this.setState("hover"),n.hoverSeries=this}onMouseOut(){const n=this.options,f=this.chart,m=f.tooltip,G=f.hoverPoint;f.hoverSeries=null,G&&G.onMouseOut(),this&&n.events.mouseOut&&i(this,"mouseOut"),!m||this.stickyTracking||m.shared&&!this.noSharedTooltip||m.hide(),f.series.forEach(function(F){F.setState("",!0)})}setState(n,f){const m=this;var G=m.options;const F=m.graph,H=G.inactiveOtherPoints,st=G.states,rt=D(st[n||"normal"]&&st[n||"normal"].animation,m.chart.options.chart.animation);let lt=G.lineWidth,ht=0,pt=G.opacity;if(n=n||"",m.state!==n&&([m.group,m.markerGroup,m.dataLabelsGroup].forEach(function(I){I&&(m.state&&I.removeClass("highcharts-series-"+m.state),n&&I.addClass("highcharts-series-"+n))}),m.state=n,!m.chart.styledMode)){if(st[n]&&st[n].enabled===!1)return;if(n&&(lt=st[n].lineWidth||lt+(st[n].lineWidthPlus||0),pt=D(st[n].opacity,pt)),F&&!F.dashstyle&&L(lt))for(G={"stroke-width":lt},F.animate(G,rt);m["zone-graph-"+ht];)m["zone-graph-"+ht].animate(G,rt),ht+=1;H||[m.group,m.markerGroup,m.dataLabelsGroup,m.labelBySeries].forEach(function(I){I&&I.animate({opacity:pt},rt)})}f&&H&&m.points&&m.setAllPointsToState(n||void 0)}setAllPointsToState(n){this.points.forEach(function(f){f.setState&&f.setState(n)})}setVisible(n,f){const m=this,G=m.chart,F=G.options.chart.ignoreHiddenSeries,H=m.visible,st=(m.visible=n=m.options.visible=m.userOptions.visible=typeof n>"u"?!H:n)?"show":"hide";["group","dataLabelsGroup","markerGroup","tracker","tt"].forEach(function(rt){m[rt]&&m[rt][st]()}),(G.hoverSeries===m||(G.hoverPoint&&G.hoverPoint.series)===m)&&m.onMouseOut(),m.legendItem&&G.legend.colorizeItem(m,n),m.isDirty=!0,m.options.stacking&&G.series.forEach(function(rt){rt.options.stacking&&rt.visible&&(rt.isDirty=!0)}),m.linkedSeries.forEach(function(rt){rt.setVisible(n,!1)}),F&&(G.isDirtyBox=!0),i(m,st),f!==!1&&G.redraw()}show(){this.setVisible(!0)}hide(){this.setVisible(!1)}select(n){this.selected=n=this.options.selected=typeof n>"u"?!this.selected:n,this.checkbox&&(this.checkbox.checked=n),i(this,n?"select":"unselect")}shouldShowTooltip(n,f,m={}){return m.series=this,m.visiblePlotOnly=!0,this.chart.isInsidePlot(n,f,m)}drawLegendSymbol(n,f){var m;(m=J[this.options.legendSymbol||"rectangle"])===null||m===void 0||m.call(this,n,f)}}return j.defaultOptions=X,j.types=C.seriesTypes,j.registerType=C.registerSeriesType,e(j.prototype,{axisTypes:["xAxis","yAxis"],coll:"series",colorCounter:0,cropShoulder:1,directTouch:!1,isCartesian:!0,kdAxisArray:["clientX","plotY"],parallelArrays:["x","y"],pointClass:Y,requireSorting:!0,sorted:!0}),C.series=j,j}),et(w,"Core/Chart/Chart.js",[w["Core/Animation/AnimationUtilities.js"],w["Core/Axis/Axis.js"],w["Core/Defaults.js"],w["Core/Templating.js"],w["Core/Foundation.js"],w["Core/Globals.js"],w["Core/Renderer/RendererRegistry.js"],w["Core/Series/Series.js"],w["Core/Series/SeriesRegistry.js"],w["Core/Renderer/SVG/SVGRenderer.js"],w["Core/Time.js"],w["Core/Utilities.js"],w["Core/Renderer/HTML/AST.js"]],function(B,P,$,q,J,Y,X,C,R,N,x,v,_){const{animate:A,animObject:c,setAnimation:y}=B,{defaultOptions:k,defaultTime:g}=$,{numberFormat:O}=q,{registerEventOptions:b}=J,{charts:S,doc:o,marginNames:r,svg:u,win:h}=Y,{seriesTypes:d}=R,{addEvent:e,attr:t,createElement:i,css:l,defined:p,diffObjects:E,discardElement:a,erase:L,error:W,extend:Q,find:nt,fireEvent:D,getStyle:s,isArray:M,isNumber:z,isObject:j,isString:K,merge:n,objectEach:f,pick:m,pInt:G,relativeLength:F,removeEvent:H,splat:st,syncTimeout:rt,uniqueKey:lt}=v;class ht{static chart(I,T,tt){return new ht(I,T,tt)}constructor(I,T,tt){this.series=this.renderTo=this.renderer=this.pointer=this.pointCount=this.plotWidth=this.plotTop=this.plotLeft=this.plotHeight=this.plotBox=this.options=this.numberFormatter=this.margin=this.labelCollectors=this.isResizing=this.index=this.eventOptions=this.container=this.colorCounter=this.clipBox=this.chartWidth=this.chartHeight=this.bounds=this.axisOffset=this.axes=void 0,this.sharedClips={},this.zooming=this.yAxis=this.xAxis=this.userOptions=this.titleOffset=this.time=this.symbolCounter=this.spacingBox=this.spacing=void 0,this.getArgs(I,T,tt)}getArgs(I,T,tt){K(I)||I.nodeName?(this.renderTo=I,this.init(T,tt)):this.init(I,T)}setZoomOptions(){const I=this.options.chart,T=I.zooming;this.zooming=Object.assign(Object.assign({},T),{type:m(I.zoomType,T.type),key:m(I.zoomKey,T.key),pinchType:m(I.pinchType,T.pinchType),singleTouch:m(I.zoomBySingleTouch,T.singleTouch,!1),resetButton:n(T.resetButton,I.resetZoomButton)})}init(I,T){D(this,"init",{args:arguments},function(){const tt=n(k,I),V=tt.chart;this.userOptions=Q({},I),this.margin=[],this.spacing=[],this.bounds={h:{},v:{}},this.labelCollectors=[],this.callback=T,this.isResizing=0,this.options=tt,this.axes=[],this.series=[],this.time=I.time&&Object.keys(I.time).length?new x(I.time):Y.time,this.numberFormatter=V.numberFormatter||O,this.styledMode=V.styledMode,this.hasCartesianSeries=V.showAxes,this.index=S.length,S.push(this),Y.chartCount++,b(this,V),this.xAxis=[],this.yAxis=[],this.pointCount=this.colorCounter=this.symbolCounter=0,this.setZoomOptions(),D(this,"afterInit"),this.firstRender()})}initSeries(I){var T=this.options.chart;T=I.type||T.type;const tt=d[T];return tt||W(17,!0,this,{missingModuleFor:T}),T=new tt,typeof T.init=="function"&&T.init(this,I),T}setSeriesData(){this.getSeriesOrderByLinks().forEach(function(I){I.points||I.data||!I.enabledDataSorting||I.setData(I.options.data,!1)})}getSeriesOrderByLinks(){return this.series.concat().sort(function(I,T){return I.linkedSeries.length||T.linkedSeries.length?T.linkedSeries.length-I.linkedSeries.length:0})}orderItems(I,T=0){const tt=this[I],V=this.options[I]=st(this.options[I]).slice();if(I=this.userOptions[I]=this.userOptions[I]?st(this.userOptions[I]).slice():[],this.hasRendered&&(V.splice(T),I.splice(T)),tt)for(let ot=T,dt=tt.length;ot<dt;++ot)(T=tt[ot])&&(T.index=ot,T instanceof C&&(T.name=T.getName()),T.options.isInternal||(V[ot]=T.options,I[ot]=T.userOptions))}isInsidePlot(I,T,tt={}){const{inverted:V,plotBox:ot,plotLeft:dt,plotTop:ct,scrollablePlotBox:yt}=this;var vt=0;let gt=0;tt.visiblePlotOnly&&this.scrollingContainer&&({scrollLeft:vt,scrollTop:gt}=this.scrollingContainer);const xt=tt.series,Mt=tt.visiblePlotOnly&&yt||ot;var St=tt.inverted?T:I;if(T=tt.inverted?I:T,I={x:St,y:T,isInsidePlot:!0,options:tt},!tt.ignoreX){const wt=xt&&(V&&!this.polar?xt.yAxis:xt.xAxis)||{pos:dt,len:1/0};St=tt.paneCoordinates?wt.pos+St:dt+St,St>=Math.max(vt+dt,wt.pos)&&St<=Math.min(vt+dt+Mt.width,wt.pos+wt.len)||(I.isInsidePlot=!1)}return!tt.ignoreY&&I.isInsidePlot&&(vt=!V&&tt.axis&&!tt.axis.isXAxis&&tt.axis||xt&&(V?xt.xAxis:xt.yAxis)||{pos:ct,len:1/0},tt=tt.paneCoordinates?vt.pos+T:ct+T,tt>=Math.max(gt+ct,vt.pos)&&tt<=Math.min(gt+ct+Mt.height,vt.pos+vt.len)||(I.isInsidePlot=!1)),D(this,"afterIsInsidePlot",I),I.isInsidePlot}redraw(I){D(this,"beforeRedraw");const T=this.hasCartesianSeries?this.axes:this.colorAxis||[],tt=this.series,V=this.pointer,ot=this.legend,dt=this.userOptions.legend,ct=this.renderer,yt=ct.isHidden(),vt=[];let gt,xt,Mt=this.isDirtyBox,St=this.isDirtyLegend,wt;for(ct.rootFontSize=ct.boxWrapper.getStyle("font-size"),this.setResponsive&&this.setResponsive(!1),y(this.hasRendered?I:!1,this),yt&&this.temporaryDisplay(),this.layOutTitles(!1),I=tt.length;I--;)if(wt=tt[I],(wt.options.stacking||wt.options.centerInCategory)&&(xt=!0,wt.isDirty)){gt=!0;break}if(gt)for(I=tt.length;I--;)wt=tt[I],wt.options.stacking&&(wt.isDirty=!0);tt.forEach(function(Tt){Tt.isDirty&&(Tt.options.legendType==="point"?(typeof Tt.updateTotals=="function"&&Tt.updateTotals(),St=!0):dt&&(dt.labelFormatter||dt.labelFormat)&&(St=!0)),Tt.isDirtyData&&D(Tt,"updatedData")}),St&&ot&&ot.options.enabled&&(ot.render(),this.isDirtyLegend=!1),xt&&this.getStacks(),T.forEach(function(Tt){Tt.updateNames(),Tt.setScale()}),this.getMargins(),T.forEach(function(Tt){Tt.isDirty&&(Mt=!0)}),T.forEach(function(Tt){const Dt=Tt.min+","+Tt.max;Tt.extKey!==Dt&&(Tt.extKey=Dt,vt.push(function(){D(Tt,"afterSetExtremes",Q(Tt.eventArgs,Tt.getExtremes())),delete Tt.eventArgs})),(Mt||xt)&&Tt.redraw()}),Mt&&this.drawChartBox(),D(this,"predraw"),tt.forEach(function(Tt){(Mt||Tt.isDirty)&&Tt.visible&&Tt.redraw(),Tt.isDirtyData=!1}),V&&V.reset(!0),ct.draw(),D(this,"redraw"),D(this,"render"),yt&&this.temporaryDisplay(!0),vt.forEach(function(Tt){Tt.call()})}get(I){function T(ot){return ot.id===I||ot.options&&ot.options.id===I}const tt=this.series;let V=nt(this.axes,T)||nt(this.series,T);for(let ot=0;!V&&ot<tt.length;ot++)V=nt(tt[ot].points||[],T);return V}getAxes(){const I=this.options;D(this,"getAxes");for(const T of["xAxis","yAxis"]){const tt=I[T]=st(I[T]||{});for(const V of tt)new P(this,V,T)}D(this,"afterGetAxes")}getSelectedPoints(){return this.series.reduce((I,T)=>(T.getPointsCollection().forEach(tt=>{m(tt.selectedStaging,tt.selected)&&I.push(tt)}),I),[])}getSelectedSeries(){return this.series.filter(function(I){return I.selected})}setTitle(I,T,tt){this.applyDescription("title",I),this.applyDescription("subtitle",T),this.applyDescription("caption",void 0),this.layOutTitles(tt)}applyDescription(I,T){const tt=this,V=this.options[I]=n(this.options[I],T);let ot=this[I];ot&&T&&(this[I]=ot=ot.destroy()),V&&!ot&&(ot=this.renderer.text(V.text,0,0,V.useHTML).attr({align:V.align,class:"highcharts-"+I,zIndex:V.zIndex||4}).add(),ot.update=function(dt,ct){tt.applyDescription(I,dt),tt.layOutTitles(ct)},this.styledMode||ot.css(Q(I==="title"?{fontSize:this.options.isStock?"1em":"1.2em"}:{},V.style)),this[I]=ot)}layOutTitles(I=!0){const T=[0,0,0],tt=this.renderer,V=this.spacingBox;["title","subtitle","caption"].forEach(function(dt){const ct=this[dt],yt=this.options[dt],vt=yt.verticalAlign||"top";if(dt=dt==="title"?vt==="top"?-3:0:vt==="top"?T[0]+2:0,ct){ct.css({width:(yt.width||V.width+(yt.widthAdjust||0))+"px"});const gt=tt.fontMetrics(ct).b,xt=Math.round(ct.getBBox(yt.useHTML).height);ct.align(Q({y:vt==="bottom"?gt:dt+gt,height:xt},yt),!1,"spacingBox"),yt.floating||(vt==="top"?T[0]=Math.ceil(T[0]+xt):vt==="bottom"&&(T[2]=Math.ceil(T[2]+xt)))}},this),T[0]&&(this.options.title.verticalAlign||"top")==="top"&&(T[0]+=this.options.title.margin),T[2]&&this.options.caption.verticalAlign==="bottom"&&(T[2]+=this.options.caption.margin);const ot=!this.titleOffset||this.titleOffset.join(",")!==T.join(",");this.titleOffset=T,D(this,"afterLayOutTitles"),!this.isDirtyBox&&ot&&(this.isDirtyBox=this.isDirtyLegend=ot,this.hasRendered&&I&&this.isDirtyBox&&this.redraw())}getContainerBox(){return{width:s(this.renderTo,"width",!0)||0,height:s(this.renderTo,"height",!0)||0}}getChartSize(){var I=this.options.chart;const T=I.width;I=I.height;const tt=this.getContainerBox();this.chartWidth=Math.max(0,T||tt.width||600),this.chartHeight=Math.max(0,F(I,this.chartWidth)||(1<tt.height?tt.height:400)),this.containerBox=tt}temporaryDisplay(I){let T=this.renderTo;if(I)for(;T&&T.style;)T.hcOrigStyle&&(l(T,T.hcOrigStyle),delete T.hcOrigStyle),T.hcOrigDetached&&(o.body.removeChild(T),T.hcOrigDetached=!1),T=T.parentNode;else for(;T&&T.style&&(o.body.contains(T)||T.parentNode||(T.hcOrigDetached=!0,o.body.appendChild(T)),(s(T,"display",!1)==="none"||T.hcOricDetached)&&(T.hcOrigStyle={display:T.style.display,height:T.style.height,overflow:T.style.overflow},I={display:"block",overflow:"hidden"},T!==this.renderTo&&(I.height=0),l(T,I),T.offsetWidth||T.style.setProperty("display","block","important")),T=T.parentNode,T!==o.body););}setClassName(I){this.container.className="highcharts-container "+(I||"")}getContainer(){const I=this.options,T=I.chart;var tt=lt();let V,ot=this.renderTo;ot||(this.renderTo=ot=T.renderTo),K(ot)&&(this.renderTo=ot=o.getElementById(ot)),ot||W(13,!0,this);var dt=G(t(ot,"data-highcharts-chart"));z(dt)&&S[dt]&&S[dt].hasRendered&&S[dt].destroy(),t(ot,"data-highcharts-chart",this.index),ot.innerHTML=_.emptyHTML,T.skipClone||ot.offsetWidth||this.temporaryDisplay(),this.getChartSize(),dt=this.chartWidth;const ct=this.chartHeight;if(l(ot,{overflow:"hidden"}),this.styledMode||(V=Q({position:"relative",overflow:"hidden",width:dt+"px",height:ct+"px",textAlign:"left",lineHeight:"normal",zIndex:0,"-webkit-tap-highlight-color":"rgba(0,0,0,0)",userSelect:"none","touch-action":"manipulation",outline:"none"},T.style||{})),this.container=tt=i("div",{id:tt},V,ot),this._cursor=tt.style.cursor,this.renderer=new(T.renderer||!u?X.getRendererType(T.renderer):N)(tt,dt,ct,void 0,T.forExport,I.exporting&&I.exporting.allowHTML,this.styledMode),this.containerBox=this.getContainerBox(),y(void 0,this),this.setClassName(T.className),this.styledMode)for(const yt in I.defs)this.renderer.definition(I.defs[yt]);else this.renderer.setStyle(T.style);this.renderer.chartIndex=this.index,D(this,"afterGetContainer")}getMargins(I){const{spacing:T,margin:tt,titleOffset:V}=this;this.resetMargins(),V[0]&&!p(tt[0])&&(this.plotTop=Math.max(this.plotTop,V[0]+T[0])),V[2]&&!p(tt[2])&&(this.marginBottom=Math.max(this.marginBottom,V[2]+T[2])),this.legend&&this.legend.display&&this.legend.adjustMargins(tt,T),D(this,"getMargins"),I||this.getAxisMargins()}getAxisMargins(){const I=this,T=I.axisOffset=[0,0,0,0],tt=I.colorAxis,V=I.margin,ot=function(dt){dt.forEach(function(ct){ct.visible&&ct.getOffset()})};I.hasCartesianSeries?ot(I.axes):tt&&tt.length&&ot(tt),r.forEach(function(dt,ct){p(V[ct])||(I[dt]+=T[ct])}),I.setChartSize()}getOptions(){return E(this.userOptions,k)}reflow(I){const T=this;var tt=T.options.chart;tt=p(tt.width)&&p(tt.height);const V=T.containerBox,ot=T.getContainerBox();delete T.pointer.chartPosition,!tt&&!T.isPrinting&&V&&ot.width&&((ot.width!==V.width||ot.height!==V.height)&&(v.clearTimeout(T.reflowTimeout),T.reflowTimeout=rt(function(){T.container&&T.setSize(void 0,void 0,!1)},I?100:0)),T.containerBox=ot)}setReflow(){const I=this;var T=tt=>{var V;!((V=I.options)===null||V===void 0)&&V.chart.reflow&&I.hasLoaded&&I.reflow(tt)};typeof ResizeObserver=="function"?new ResizeObserver(T).observe(I.renderTo):(T=e(h,"resize",T),e(this,"destroy",T))}setSize(I,T,tt){const V=this,ot=V.renderer;V.isResizing+=1,y(tt,V),tt=ot.globalAnimation,V.oldChartHeight=V.chartHeight,V.oldChartWidth=V.chartWidth,typeof I<"u"&&(V.options.chart.width=I),typeof T<"u"&&(V.options.chart.height=T),V.getChartSize(),V.styledMode||(tt?A:l)(V.container,{width:V.chartWidth+"px",height:V.chartHeight+"px"},tt),V.setChartSize(!0),ot.setSize(V.chartWidth,V.chartHeight,tt),V.axes.forEach(function(dt){dt.isDirty=!0,dt.setScale()}),V.isDirtyLegend=!0,V.isDirtyBox=!0,V.layOutTitles(),V.getMargins(),V.redraw(tt),V.oldChartHeight=null,D(V,"resize"),rt(function(){V&&D(V,"endResize",null,function(){--V.isResizing})},c(tt).duration)}setChartSize(I){var T=this.inverted;const tt=this.renderer;var V=this.chartWidth,ot=this.chartHeight;const dt=this.options.chart,ct=this.spacing,yt=this.clipOffset;let vt,gt,xt,Mt;this.plotLeft=vt=Math.round(this.plotLeft),this.plotTop=gt=Math.round(this.plotTop),this.plotWidth=xt=Math.max(0,Math.round(V-vt-this.marginRight)),this.plotHeight=Mt=Math.max(0,Math.round(ot-gt-this.marginBottom)),this.plotSizeX=T?Mt:xt,this.plotSizeY=T?xt:Mt,this.plotBorderWidth=dt.plotBorderWidth||0,this.spacingBox=tt.spacingBox={x:ct[3],y:ct[0],width:V-ct[3]-ct[1],height:ot-ct[0]-ct[2]},this.plotBox=tt.plotBox={x:vt,y:gt,width:xt,height:Mt},T=2*Math.floor(this.plotBorderWidth/2),V=Math.ceil(Math.max(T,yt[3])/2),ot=Math.ceil(Math.max(T,yt[0])/2),this.clipBox={x:V,y:ot,width:Math.floor(this.plotSizeX-Math.max(T,yt[1])/2-V),height:Math.max(0,Math.floor(this.plotSizeY-Math.max(T,yt[2])/2-ot))},I||(this.axes.forEach(function(St){St.setAxisSize(),St.setAxisTranslation()}),tt.alignElements()),D(this,"afterSetChartSize",{skipAxes:I})}resetMargins(){D(this,"resetMargins");const I=this,T=I.options.chart;["margin","spacing"].forEach(function(tt){const V=T[tt],ot=j(V)?V:[V,V,V,V];["Top","Right","Bottom","Left"].forEach(function(dt,ct){I[tt][ct]=m(T[tt+dt],ot[ct])})}),r.forEach(function(tt,V){I[tt]=m(I.margin[V],I.spacing[V])}),I.axisOffset=[0,0,0,0],I.clipOffset=[0,0,0,0]}drawChartBox(){const I=this.options.chart,T=this.renderer,tt=this.chartWidth,V=this.chartHeight,ot=this.styledMode,dt=this.plotBGImage;var ct=I.backgroundColor;const yt=I.plotBackgroundColor,vt=I.plotBackgroundImage,gt=this.plotLeft,xt=this.plotTop,Mt=this.plotWidth,St=this.plotHeight,wt=this.plotBox,Tt=this.clipRect,Dt=this.clipBox;let Pt=this.chartBackground,Rt=this.plotBackground,Ft=this.plotBorder,Et,Yt,$t="animate";Pt||(this.chartBackground=Pt=T.rect().addClass("highcharts-background").add(),$t="attr"),ot?Et=Yt=Pt.strokeWidth():(Et=I.borderWidth||0,Yt=Et+(I.shadow?8:0),ct={fill:ct||"none"},(Et||Pt["stroke-width"])&&(ct.stroke=I.borderColor,ct["stroke-width"]=Et),Pt.attr(ct).shadow(I.shadow)),Pt[$t]({x:Yt/2,y:Yt/2,width:tt-Yt-Et%2,height:V-Yt-Et%2,r:I.borderRadius}),$t="animate",Rt||($t="attr",this.plotBackground=Rt=T.rect().addClass("highcharts-plot-background").add()),Rt[$t](wt),ot||(Rt.attr({fill:yt||"none"}).shadow(I.plotShadow),vt&&(dt?(vt!==dt.attr("href")&&dt.attr("href",vt),dt.animate(wt)):this.plotBGImage=T.image(vt,gt,xt,Mt,St).add())),Tt?Tt.animate({width:Dt.width,height:Dt.height}):this.clipRect=T.clipRect(Dt),$t="animate",Ft||($t="attr",this.plotBorder=Ft=T.rect().addClass("highcharts-plot-border").attr({zIndex:1}).add()),ot||Ft.attr({stroke:I.plotBorderColor,"stroke-width":I.plotBorderWidth||0,fill:"none"}),Ft[$t](Ft.crisp({x:gt,y:xt,width:Mt,height:St},-Ft.strokeWidth())),this.isDirtyBox=!1,D(this,"afterDrawChartBox")}propFromSeries(){const I=this,T=I.options.chart,tt=I.options.series;let V,ot,dt;["inverted","angular","polar"].forEach(function(ct){for(ot=d[T.type],dt=T[ct]||ot&&ot.prototype[ct],V=tt&&tt.length;!dt&&V--;)(ot=d[tt[V].type])&&ot.prototype[ct]&&(dt=!0);I[ct]=dt})}linkSeries(I){const T=this,tt=T.series;tt.forEach(function(V){V.linkedSeries.length=0}),tt.forEach(function(V){let ot=V.options.linkedTo;K(ot)&&(ot=ot===":previous"?T.series[V.index-1]:T.get(ot))&&ot.linkedParent!==V&&(ot.linkedSeries.push(V),V.linkedParent=ot,ot.enabledDataSorting&&V.setDataSortingOptions(),V.visible=m(V.options.visible,ot.options.visible,V.visible))}),D(this,"afterLinkSeries",{isUpdating:I})}renderSeries(){this.series.forEach(function(I){I.translate(),I.render()})}render(){const I=this.axes,T=this.colorAxis,tt=this.renderer,V=function(gt){gt.forEach(function(xt){xt.visible&&xt.render()})};let ot=0;this.setTitle(),D(this,"beforeMargins"),this.getStacks&&this.getStacks(),this.getMargins(!0),this.setChartSize();const dt=this.plotWidth;I.some(function(gt){if(gt.horiz&&gt.visible&&gt.options.labels.enabled&&gt.series.length)return ot=21,!0});const ct=this.plotHeight=Math.max(this.plotHeight-ot,0);I.forEach(function(gt){gt.setScale()}),this.getAxisMargins();const yt=1.1<dt/this.plotWidth,vt=1.05<ct/this.plotHeight;(yt||vt)&&(I.forEach(function(gt){(gt.horiz&&yt||!gt.horiz&&vt)&&gt.setTickInterval(!0)}),this.getMargins()),this.drawChartBox(),this.hasCartesianSeries?V(I):T&&T.length&&V(T),this.seriesGroup||(this.seriesGroup=tt.g("series-group").attr({zIndex:3}).shadow(this.options.chart.seriesGroupShadow).add()),this.renderSeries(),this.addCredits(),this.setResponsive&&this.setResponsive(),this.hasRendered=!0}addCredits(I){const T=this,tt=n(!0,this.options.credits,I);tt.enabled&&!this.credits&&(this.credits=this.renderer.text(tt.text+(this.mapCredits||""),0,0).addClass("highcharts-credits").on("click",function(){tt.href&&(h.location.href=tt.href)}).attr({align:tt.position.align,zIndex:8}),T.styledMode||this.credits.css(tt.style),this.credits.add().align(tt.position),this.credits.update=function(V){T.credits=T.credits.destroy(),T.addCredits(V)})}destroy(){const I=this,T=I.axes,tt=I.series,V=I.container,ot=V&&V.parentNode;let dt;for(D(I,"destroy"),I.renderer.forExport?L(S,I):S[I.index]=void 0,Y.chartCount--,I.renderTo.removeAttribute("data-highcharts-chart"),H(I),dt=T.length;dt--;)T[dt]=T[dt].destroy();for(this.scroller&&this.scroller.destroy&&this.scroller.destroy(),dt=tt.length;dt--;)tt[dt]=tt[dt].destroy();"title subtitle chartBackground plotBackground plotBGImage plotBorder seriesGroup clipRect credits pointer rangeSelector legend resetZoomButton tooltip renderer".split(" ").forEach(function(ct){const yt=I[ct];yt&&yt.destroy&&(I[ct]=yt.destroy())}),V&&(V.innerHTML=_.emptyHTML,H(V),ot&&a(V)),f(I,function(ct,yt){delete I[yt]})}firstRender(){const I=this,T=I.options;I.getContainer(),I.resetMargins(),I.setChartSize(),I.propFromSeries(),I.getAxes();const tt=M(T.series)?T.series:[];T.series=[],tt.forEach(function(V){I.initSeries(V)}),I.linkSeries(),I.setSeriesData(),D(I,"beforeRender"),I.render(),I.pointer.getChartPosition(),!I.renderer.imgCount&&!I.hasLoaded&&I.onload(),I.temporaryDisplay(!0)}onload(){this.callbacks.concat([this.callback]).forEach(function(I){I&&typeof this.index<"u"&&I.apply(this,[this])},this),D(this,"load"),D(this,"render"),p(this.index)&&this.setReflow(),this.warnIfA11yModuleNotLoaded(),this.hasLoaded=!0}warnIfA11yModuleNotLoaded(){const{options:I,title:T}=this;I&&!this.accessibility&&(this.renderer.boxWrapper.attr({role:"img","aria-label":(T&&T.element.textContent||"").replace(/</g,"&lt;")}),I.accessibility&&I.accessibility.enabled===!1||W('Highcharts warning: Consider including the "accessibility.js" module to make your chart more usable for people with disabilities. Set the "accessibility.enabled" option to false to remove this warning. See https://www.highcharts.com/docs/accessibility/accessibility-module.',!1,this))}addSeries(I,T,tt){const V=this;let ot;return I&&(T=m(T,!0),D(V,"addSeries",{options:I},function(){ot=V.initSeries(I),V.isDirtyLegend=!0,V.linkSeries(),ot.enabledDataSorting&&ot.setData(I.data,!1),D(V,"afterAddSeries",{series:ot}),T&&V.redraw(tt)})),ot}addAxis(I,T,tt,V){return this.createAxis(T?"xAxis":"yAxis",{axis:I,redraw:tt,animation:V})}addColorAxis(I,T,tt){return this.createAxis("colorAxis",{axis:I,redraw:T,animation:tt})}createAxis(I,T){return I=new P(this,T.axis,I),m(T.redraw,!0)&&this.redraw(T.animation),I}showLoading(I){const T=this,tt=T.options,V=tt.loading,ot=function(){dt&&l(dt,{left:T.plotLeft+"px",top:T.plotTop+"px",width:T.plotWidth+"px",height:T.plotHeight+"px"})};let dt=T.loadingDiv,ct=T.loadingSpan;dt||(T.loadingDiv=dt=i("div",{className:"highcharts-loading highcharts-loading-hidden"},null,T.container)),ct||(T.loadingSpan=ct=i("span",{className:"highcharts-loading-inner"},null,dt),e(T,"redraw",ot)),dt.className="highcharts-loading",_.setElementHTML(ct,m(I,tt.lang.loading,"")),T.styledMode||(l(dt,Q(V.style,{zIndex:10})),l(ct,V.labelStyle),T.loadingShown||(l(dt,{opacity:0,display:""}),A(dt,{opacity:V.style.opacity||.5},{duration:V.showDuration||0}))),T.loadingShown=!0,ot()}hideLoading(){const I=this.options,T=this.loadingDiv;T&&(T.className="highcharts-loading highcharts-loading-hidden",this.styledMode||A(T,{opacity:0},{duration:I.loading.hideDuration||100,complete:function(){l(T,{display:"none"})}})),this.loadingShown=!1}update(I,T,tt,V){const ot=this,dt={credits:"addCredits",title:"setTitle",subtitle:"setSubtitle",caption:"setCaption"},ct=I.isResponsiveOptions,yt=[];let vt,gt;D(ot,"update",{options:I}),ct||ot.setResponsive(!1,!0),I=E(I,ot.options),ot.userOptions=n(ot.userOptions,I);var xt=I.chart;if(xt){if(n(!0,ot.options.chart,xt),this.setZoomOptions(),"className"in xt&&ot.setClassName(xt.className),"inverted"in xt||"polar"in xt||"type"in xt){ot.propFromSeries();var Mt=!0}"alignTicks"in xt&&(Mt=!0),"events"in xt&&b(this,xt),f(xt,function(St,wt){ot.propsRequireUpdateSeries.indexOf("chart."+wt)!==-1&&(vt=!0),ot.propsRequireDirtyBox.indexOf(wt)!==-1&&(ot.isDirtyBox=!0),ot.propsRequireReflow.indexOf(wt)!==-1&&(ct?ot.isDirtyBox=!0:gt=!0)}),!ot.styledMode&&xt.style&&ot.renderer.setStyle(ot.options.chart.style||{})}!ot.styledMode&&I.colors&&(this.options.colors=I.colors),I.time&&(this.time===g&&(this.time=new x(I.time)),n(!0,ot.options.time,I.time)),f(I,function(St,wt){ot[wt]&&typeof ot[wt].update=="function"?ot[wt].update(St,!1):typeof ot[dt[wt]]=="function"?ot[dt[wt]](St):wt!=="colors"&&ot.collectionsWithUpdate.indexOf(wt)===-1&&n(!0,ot.options[wt],I[wt]),wt!=="chart"&&ot.propsRequireUpdateSeries.indexOf(wt)!==-1&&(vt=!0)}),this.collectionsWithUpdate.forEach(function(St){I[St]&&(st(I[St]).forEach(function(wt,Tt){const Dt=p(wt.id);let Pt;Dt&&(Pt=ot.get(wt.id)),!Pt&&ot[St]&&(Pt=ot[St][m(wt.index,Tt)])&&(Dt&&p(Pt.options.id)||Pt.options.isInternal)&&(Pt=void 0),Pt&&Pt.coll===St&&(Pt.update(wt,!1),tt&&(Pt.touched=!0)),!Pt&&tt&&ot.collectionsWithInit[St]&&(ot.collectionsWithInit[St][0].apply(ot,[wt].concat(ot.collectionsWithInit[St][1]||[]).concat([!1])).touched=!0)}),tt&&ot[St].forEach(function(wt){wt.touched||wt.options.isInternal?delete wt.touched:yt.push(wt)}))}),yt.forEach(function(St){St.chart&&St.remove&&St.remove(!1)}),Mt&&ot.axes.forEach(function(St){St.update({},!1)}),vt&&ot.getSeriesOrderByLinks().forEach(function(St){St.chart&&St.update({},!1)},this),Mt=xt&&xt.width,xt=xt&&(K(xt.height)?F(xt.height,Mt||ot.chartWidth):xt.height),gt||z(Mt)&&Mt!==ot.chartWidth||z(xt)&&xt!==ot.chartHeight?ot.setSize(Mt,xt,V):m(T,!0)&&ot.redraw(V),D(ot,"afterUpdate",{options:I,redraw:T,animation:V})}setSubtitle(I,T){this.applyDescription("subtitle",I),this.layOutTitles(T)}setCaption(I,T){this.applyDescription("caption",I),this.layOutTitles(T)}showResetZoom(){function I(){T.zoomOut()}const T=this,tt=k.lang,V=T.zooming.resetButton,ot=V.theme,dt=V.relativeTo==="chart"||V.relativeTo==="spacingBox"?null:"scrollablePlotBox";D(this,"beforeShowResetZoom",null,function(){T.resetZoomButton=T.renderer.button(tt.resetZoom,null,null,I,ot).attr({align:V.position.align,title:tt.resetZoomTitle}).addClass("highcharts-reset-zoom").add().align(V.position,!1,dt)}),D(this,"afterShowResetZoom")}zoomOut(){D(this,"selection",{resetSelection:!0},this.zoom)}zoom(I){const T=this,tt=T.pointer;let V=!1,ot;!I||I.resetSelection?(T.axes.forEach(function(ct){ot=ct.zoom()}),tt.initiated=!1):I.xAxis.concat(I.yAxis).forEach(function(ct){const yt=ct.axis;(tt[yt.isXAxis?"zoomX":"zoomY"]&&p(tt.mouseDownX)&&p(tt.mouseDownY)&&T.isInsidePlot(tt.mouseDownX-T.plotLeft,tt.mouseDownY-T.plotTop,{axis:yt})||!p(T.inverted?tt.mouseDownX:tt.mouseDownY))&&(ot=yt.zoom(ct.min,ct.max),yt.displayBtn&&(V=!0))});const dt=T.resetZoomButton;V&&!dt?T.showResetZoom():!V&&j(dt)&&(T.resetZoomButton=dt.destroy()),ot&&T.redraw(m(T.options.chart.animation,I&&I.animation,100>T.pointCount))}pan(I,T){const tt=this,V=tt.hoverPoints;T=typeof T=="object"?T:{enabled:T,type:"x"};const ot=tt.options.chart;ot&&ot.panning&&(ot.panning=T);const dt=T.type;let ct;D(this,"pan",{originalEvent:I},function(){V&&V.forEach(function(gt){gt.setState()});let yt=tt.xAxis;dt==="xy"?yt=yt.concat(tt.yAxis):dt==="y"&&(yt=tt.yAxis);const vt={};yt.forEach(function(gt){if(gt.options.panningEnabled&&!gt.options.isInternal){var xt=gt.horiz,Mt=I[xt?"chartX":"chartY"];xt=xt?"mouseDownX":"mouseDownY";var St=tt[xt],wt=gt.minPointOffset||0,Tt=gt.reversed&&!tt.inverted||!gt.reversed&&tt.inverted?-1:1,Dt=gt.getExtremes(),Pt=gt.toValue(St-Mt,!0)+wt*Tt,Rt=gt.toValue(St+gt.len-Mt,!0)-(wt*Tt||gt.isXAxis&&gt.pointRangePadding||0),Ft=Rt<Pt;Tt=gt.hasVerticalPanning(),St=Ft?Rt:Pt,Pt=Ft?Pt:Rt;var Et=gt.panningState;!Tt||gt.isXAxis||Et&&!Et.isDirty||gt.series.forEach(function(Yt){var $t=Yt.getProcessedData(!0);$t=Yt.getExtremes($t.yData,!0),Et||(Et={startMin:Number.MAX_VALUE,startMax:-Number.MAX_VALUE}),z($t.dataMin)&&z($t.dataMax)&&(Et.startMin=Math.min(m(Yt.options.threshold,1/0),$t.dataMin,Et.startMin),Et.startMax=Math.max(m(Yt.options.threshold,-1/0),$t.dataMax,Et.startMax))}),Tt=Math.min(m(Et&&Et.startMin,Dt.dataMin),wt?Dt.min:gt.toValue(gt.toPixels(Dt.min)-gt.minPixelPadding)),Rt=Math.max(m(Et&&Et.startMax,Dt.dataMax),wt?Dt.max:gt.toValue(gt.toPixels(Dt.max)+gt.minPixelPadding)),gt.panningState=Et,gt.isOrdinal||(wt=Tt-St,0<wt&&(Pt+=wt,St=Tt),wt=Pt-Rt,0<wt&&(Pt=Rt,St-=wt),gt.series.length&&St!==Dt.min&&Pt!==Dt.max&&St>=Tt&&Pt<=Rt&&(gt.setExtremes(St,Pt,!1,!1,{trigger:"pan"}),!tt.resetZoomButton&&St!==Tt&&Pt!==Rt&&dt.match("y")&&(tt.showResetZoom(),gt.displayBtn=!1),ct=!0),vt[xt]=Mt)}}),f(vt,(gt,xt)=>{tt[xt]=gt}),ct&&tt.redraw(!1),l(tt.container,{cursor:"move"})})}}return Q(ht.prototype,{callbacks:[],collectionsWithInit:{xAxis:[ht.prototype.addAxis,[!0]],yAxis:[ht.prototype.addAxis,[!1]],series:[ht.prototype.addSeries]},collectionsWithUpdate:["xAxis","yAxis","series"],propsRequireDirtyBox:"backgroundColor borderColor borderWidth borderRadius plotBackgroundColor plotBackgroundImage plotBorderColor plotBorderWidth plotShadow shadow".split(" "),propsRequireReflow:"margin marginTop marginRight marginBottom marginLeft spacing spacingTop spacingRight spacingBottom spacingLeft".split(" "),propsRequireUpdateSeries:"chart.inverted chart.polar chart.ignoreHiddenSeries chart.type colors plotOptions time tooltip".split(" ")}),ht}),et(w,"Extensions/ScrollablePlotArea.js",[w["Core/Animation/AnimationUtilities.js"],w["Core/Axis/Axis.js"],w["Core/Chart/Chart.js"],w["Core/Series/Series.js"],w["Core/Renderer/RendererRegistry.js"],w["Core/Utilities.js"]],function(B,P,$,q,J,Y){const{stop:X}=B,{addEvent:C,createElement:R,defined:N,merge:x,pick:v}=Y;C($,"afterSetChartSize",function(_){var A=this.options.chart.scrollablePlotArea,c=A&&A.minWidth;A=A&&A.minHeight;let y;this.renderer.forExport||(c?(this.scrollablePixelsX=c=Math.max(0,c-this.chartWidth))&&(this.scrollablePlotBox=this.renderer.scrollablePlotBox=x(this.plotBox),this.plotBox.width=this.plotWidth+=c,this.inverted?this.clipBox.height+=c:this.clipBox.width+=c,y={1:{name:"right",value:c}}):A&&(this.scrollablePixelsY=c=Math.max(0,A-this.chartHeight),N(c)&&(this.scrollablePlotBox=this.renderer.scrollablePlotBox=x(this.plotBox),this.plotBox.height=this.plotHeight+=c,this.inverted?this.clipBox.width+=c:this.clipBox.height+=c,y={2:{name:"bottom",value:c}})),y&&!_.skipAxes&&this.axes.forEach(function(k){y[k.side]?k.getPlotLinePath=function(){let g=y[k.side].name,O=this[g],b;return this[g]=O-y[k.side].value,b=P.prototype.getPlotLinePath.apply(this,arguments),this[g]=O,b}:(k.setAxisSize(),k.setAxisTranslation())}))}),C($,"render",function(){this.scrollablePixelsX||this.scrollablePixelsY?(this.setUpScrolling&&this.setUpScrolling(),this.applyFixed()):this.fixedDiv&&this.applyFixed()}),$.prototype.setUpScrolling=function(){const _={WebkitOverflowScrolling:"touch",overflowX:"hidden",overflowY:"hidden"};this.scrollablePixelsX&&(_.overflowX="auto"),this.scrollablePixelsY&&(_.overflowY="auto"),this.scrollingParent=R("div",{className:"highcharts-scrolling-parent"},{position:"relative"},this.renderTo),this.scrollingContainer=R("div",{className:"highcharts-scrolling"},_,this.scrollingParent);let A;C(this.scrollingContainer,"scroll",()=>{this.pointer&&(delete this.pointer.chartPosition,this.hoverPoint&&(A=this.hoverPoint),this.pointer.runPointActions(void 0,A,!0))}),this.innerContainer=R("div",{className:"highcharts-inner-container"},null,this.scrollingContainer),this.innerContainer.appendChild(this.container),this.setUpScrolling=null},$.prototype.moveFixedElements=function(){let _=this.container,A=this.fixedRenderer,c=".highcharts-breadcrumbs-group .highcharts-contextbutton .highcharts-credits .highcharts-legend .highcharts-legend-checkbox .highcharts-navigator-series .highcharts-navigator-xaxis .highcharts-navigator-yaxis .highcharts-navigator .highcharts-reset-zoom .highcharts-drillup-button .highcharts-scrollbar .highcharts-subtitle .highcharts-title".split(" "),y;this.scrollablePixelsX&&!this.inverted?y=".highcharts-yaxis":this.scrollablePixelsX&&this.inverted||this.scrollablePixelsY&&!this.inverted?y=".highcharts-xaxis":this.scrollablePixelsY&&this.inverted&&(y=".highcharts-yaxis"),y&&c.push(`${y}:not(.highcharts-radial-axis)`,`${y}-labels:not(.highcharts-radial-axis-labels)`),c.forEach(function(k){[].forEach.call(_.querySelectorAll(k),function(g){(g.namespaceURI===A.SVG_NS?A.box:A.box.parentNode).appendChild(g),g.style.pointerEvents="auto"})})},$.prototype.applyFixed=function(){var _=!this.fixedDiv,A=this.options.chart,c=A.scrollablePlotArea,y=J.getRendererType();_?(this.fixedDiv=R("div",{className:"highcharts-fixed"},{position:"absolute",overflow:"hidden",pointerEvents:"none",zIndex:(A.style&&A.style.zIndex||0)+2,top:0},null,!0),this.scrollingContainer&&this.scrollingContainer.parentNode.insertBefore(this.fixedDiv,this.scrollingContainer),this.renderTo.style.overflow="visible",this.fixedRenderer=A=new y(this.fixedDiv,this.chartWidth,this.chartHeight,this.options.chart.style),this.scrollableMask=A.path().attr({fill:this.options.chart.backgroundColor||"#fff","fill-opacity":v(c.opacity,.85),zIndex:-1}).addClass("highcharts-scrollable-mask").add(),C(this,"afterShowResetZoom",this.moveFixedElements),C(this,"afterApplyDrilldown",this.moveFixedElements),C(this,"afterLayOutTitles",this.moveFixedElements)):this.fixedRenderer.setSize(this.chartWidth,this.chartHeight),(this.scrollableDirty||_)&&(this.scrollableDirty=!1,this.moveFixedElements()),A=this.chartWidth+(this.scrollablePixelsX||0),y=this.chartHeight+(this.scrollablePixelsY||0),X(this.container),this.container.style.width=A+"px",this.container.style.height=y+"px",this.renderer.boxWrapper.attr({width:A,height:y,viewBox:[0,0,A,y].join(" ")}),this.chartBackground.attr({width:A,height:y}),this.scrollingContainer.style.height=this.chartHeight+"px",_&&(c.scrollPositionX&&(this.scrollingContainer.scrollLeft=this.scrollablePixelsX*c.scrollPositionX),c.scrollPositionY&&(this.scrollingContainer.scrollTop=this.scrollablePixelsY*c.scrollPositionY)),y=this.axisOffset,_=this.plotTop-y[0]-1,c=this.plotLeft-y[3]-1,A=this.plotTop+this.plotHeight+y[2]+1,y=this.plotLeft+this.plotWidth+y[1]+1;let k=this.plotLeft+this.plotWidth-(this.scrollablePixelsX||0),g=this.plotTop+this.plotHeight-(this.scrollablePixelsY||0);_=this.scrollablePixelsX?[["M",0,_],["L",this.plotLeft-1,_],["L",this.plotLeft-1,A],["L",0,A],["Z"],["M",k,_],["L",this.chartWidth,_],["L",this.chartWidth,A],["L",k,A],["Z"]]:this.scrollablePixelsY?[["M",c,0],["L",c,this.plotTop-1],["L",y,this.plotTop-1],["L",y,0],["Z"],["M",c,g],["L",c,this.chartHeight],["L",y,this.chartHeight],["L",y,g],["Z"]]:[["M",0,0]],this.redrawTrigger!=="adjustHeight"&&this.scrollableMask.attr({d:_})},C(P,"afterInit",function(){this.chart.scrollableDirty=!0}),C(q,"show",function(){this.chart.scrollableDirty=!0})}),et(w,"Core/Axis/Stacking/StackItem.js",[w["Core/Templating.js"],w["Core/Series/SeriesRegistry.js"],w["Core/Utilities.js"]],function(B,P,$){const{format:q}=B,{series:J}=P,{destroyObjectProperties:Y,fireEvent:X,isNumber:C,pick:R}=$;class N{constructor(v,_,A,c,y){const k=v.chart.inverted,g=v.reversed;this.axis=v,v=this.isNegative=!!A!=!!g,this.options=_=_||{},this.x=c,this.cumulative=this.total=null,this.points={},this.hasValidPoints=!1,this.stack=y,this.rightCliff=this.leftCliff=0,this.alignOptions={align:_.align||(k?v?"left":"right":"center"),verticalAlign:_.verticalAlign||(k?"middle":v?"bottom":"top"),y:_.y,x:_.x},this.textAlign=_.textAlign||(k?v?"right":"left":"center")}destroy(){Y(this,this.axis)}render(v){const _=this.axis.chart,A=this.options;var c=A.format;c=c?q(c,this,_):A.formatter.call(this),this.label?this.label.attr({text:c,visibility:"hidden"}):(this.label=_.renderer.label(c,null,void 0,A.shape,void 0,void 0,A.useHTML,!1,"stack-labels"),c={r:A.borderRadius||0,text:c,padding:R(A.padding,5),visibility:"hidden"},_.styledMode||(c.fill=A.backgroundColor,c.stroke=A.borderColor,c["stroke-width"]=A.borderWidth,this.label.css(A.style||{})),this.label.attr(c),this.label.added||this.label.add(v)),this.label.labelrank=_.plotSizeY,X(this,"afterRender")}setOffset(v,_,A,c,y,k){const{alignOptions:g,axis:O,label:b,options:S,textAlign:o}=this,r=O.chart;A=this.getStackBox({xOffset:v,width:_,boxBottom:A,boxTop:c,defaultX:y,xAxis:k});var{verticalAlign:u}=g;if(b&&A){c=b.getBBox(),y=b.padding,k=R(S.overflow,"justify")==="justify",g.x=S.x||0,g.y=S.y||0;const{x:h,y:d}=this.adjustStackPosition({labelBox:c,verticalAlign:u,textAlign:o});A.x-=h,A.y-=d,b.align(g,!1,A),(u=r.isInsidePlot(b.alignAttr.x+g.x+h,b.alignAttr.y+g.y+d))||(k=!1),k&&J.prototype.justifyDataLabel.call(O,b,g,b.alignAttr,c,A),b.attr({x:b.alignAttr.x,y:b.alignAttr.y,rotation:S.rotation,rotationOriginX:c.width/2,rotationOriginY:c.height/2}),R(!k&&S.crop,!0)&&(u=C(b.x)&&C(b.y)&&r.isInsidePlot(b.x-y+b.width,b.y)&&r.isInsidePlot(b.x+y,b.y)),b[u?"show":"hide"]()}X(this,"afterSetOffset",{xOffset:v,width:_})}adjustStackPosition({labelBox:v,verticalAlign:_,textAlign:A}){const c={bottom:0,middle:1,top:2,right:1,center:0,left:-1};return{x:v.width/2+v.width/2*c[A],y:v.height/2*c[_]}}getStackBox(v){var _=this.axis;const A=_.chart,{boxTop:c,defaultX:y,xOffset:k,width:g,boxBottom:O}=v;var b=_.stacking.usePercentage?100:R(c,this.total,0);b=_.toPixels(b),v=v.xAxis||A.xAxis[0];const S=R(y,v.translate(this.x))+k;_=_.toPixels(O||C(_.min)&&_.logarithmic&&_.logarithmic.lin2log(_.min)||0),_=Math.abs(b-_);const o=this.isNegative;return A.inverted?{x:(o?b:b-_)-A.plotLeft,y:v.height-S-g,width:_,height:g}:{x:S+v.transB-A.plotLeft,y:(o?b-_:b)-A.plotTop,width:g,height:_}}}return N}),et(w,"Core/Axis/Stacking/StackingAxis.js",[w["Core/Animation/AnimationUtilities.js"],w["Core/Axis/Axis.js"],w["Core/Series/SeriesRegistry.js"],w["Core/Axis/Stacking/StackItem.js"],w["Core/Utilities.js"]],function(B,P,$,q,J){function Y(){const e=this,t=e.inverted;e.yAxis.forEach(i=>{i.stacking&&i.stacking.stacks&&i.hasVisibleSeries&&(i.stacking.oldStacks=i.stacking.stacks)}),e.series.forEach(i=>{const l=i.xAxis&&i.xAxis.options||{};!i.options.stacking||i.visible!==!0&&e.options.chart.ignoreHiddenSeries!==!1||(i.stackKey=[i.type,u(i.options.stack,""),t?l.top:l.left,t?l.height:l.width].join())})}function X(){const e=this.stacking;if(e){var t=e.stacks;r(t,function(i,l){O(i),t[l]=null}),e&&e.stackTotalGroup&&e.stackTotalGroup.destroy()}}function C(){this.coll!=="yAxis"||this.stacking||(this.stacking=new h(this))}function R(e,t,i,l){return!g(e)||e.x!==t||l&&e.stackKey!==l?e={x:t,index:0,key:l,stackKey:l}:e.index++,e.key=[i,t,e.index].join(),e}function N(){const e=this,t=e.stackKey,i=e.yAxis.stacking.stacks,l=e.processedXData,p=e[e.options.stacking+"Stacker"];let E;p&&[t,"-"+t].forEach(a=>{let L=l.length,W;for(;L--;){var Q=l[L];E=e.getStackIndicator(E,Q,e.index,a),(W=(Q=i[a]&&i[a][Q])&&Q.points[E.key])&&p.call(e,W,Q,L)}})}function x(e,t,i){t=t.total?100/t.total:0,e[0]=k(e[0]*t),e[1]=k(e[1]*t),this.stackedYData[i]=e[1]}function v(){const e=this.yAxis.stacking;this.options.centerInCategory&&(this.is("column")||this.is("columnrange"))&&!this.options.stacking&&1<this.chart.series.length?c.setStackedPoints.call(this,"group"):e&&r(e.stacks,(t,i)=>{i.slice(-5)==="group"&&(r(t,l=>l.destroy()),delete e.stacks[i])})}function _(e){var t=this.chart;const i=e||this.options.stacking;if(i&&(this.visible===!0||t.options.chart.ignoreHiddenSeries===!1)){var l=this.processedXData,p=this.processedYData,E=[],a=p.length,L=this.options,W=L.threshold,Q=u(L.startFromThreshold&&W,0);L=L.stack,e=e?`${this.type},${i}`:this.stackKey;var nt="-"+e,D=this.negStacks;t=i==="group"?t.yAxis[0]:this.yAxis;var s=t.stacking.stacks,M=t.stacking.oldStacks,z,j;for(t.stacking.stacksTouched+=1,j=0;j<a;j++){var K=l[j],n=p[j],f=this.getStackIndicator(f,K,this.index),m=f.key,G=(z=D&&n<(Q?0:W))?nt:e;s[G]||(s[G]={}),s[G][K]||(M[G]&&M[G][K]?(s[G][K]=M[G][K],s[G][K].total=null):s[G][K]=new q(t,t.options.stackLabels,!!z,K,L)),G=s[G][K],n!==null?(G.points[m]=G.points[this.index]=[u(G.cumulative,Q)],g(G.cumulative)||(G.base=m),G.touched=t.stacking.stacksTouched,0<f.index&&this.singleStacks===!1&&(G.points[m][0]=G.points[this.index+","+K+",0"][0])):G.points[m]=G.points[this.index]=null,i==="percent"?(z=z?e:nt,D&&s[z]&&s[z][K]?(z=s[z][K],G.total=z.total=Math.max(z.total,G.total)+Math.abs(n)||0):G.total=k(G.total+(Math.abs(n)||0))):i==="group"?(S(n)&&(n=n[0]),n!==null&&(G.total=(G.total||0)+1)):G.total=k(G.total+(n||0)),G.cumulative=i==="group"?(G.total||1)-1:k(u(G.cumulative,Q)+(n||0)),n!==null&&(G.points[m].push(G.cumulative),E[j]=G.cumulative,G.hasValidPoints=!0)}i==="percent"&&(t.stacking.usePercentage=!0),i!=="group"&&(this.stackedYData=E),t.stacking.oldStacks={}}}const{getDeferredAnimation:A}=B,{series:{prototype:c}}=$,{addEvent:y,correctFloat:k,defined:g,destroyObjectProperties:O,fireEvent:b,isArray:S,isNumber:o,objectEach:r,pick:u}=J;class h{constructor(t){this.oldStacks={},this.stacks={},this.stacksTouched=0,this.axis=t}buildStacks(){const t=this.axis,i=t.series,l=t.options.reversedStacks,p=i.length;let E,a;for(this.usePercentage=!1,a=p;a--;)E=i[l?a:p-a-1],E.setStackedPoints(),E.setGroupedPoints();for(a=0;a<p;a++)i[a].modifyStacks();b(t,"afterBuildStacks")}cleanStacks(){let t;this.oldStacks&&(t=this.stacks=this.oldStacks),r(t,function(i){r(i,function(l){l.cumulative=l.total})})}resetStacks(){r(this.stacks,t=>{r(t,(i,l)=>{o(i.touched)&&i.touched<this.stacksTouched?(i.destroy(),delete t[l]):(i.total=null,i.cumulative=null)})})}renderStackTotals(){var t=this.axis;const i=t.chart,l=i.renderer,p=this.stacks;t=A(i,t.options.stackLabels&&t.options.stackLabels.animation||!1);const E=this.stackTotalGroup=this.stackTotalGroup||l.g("stack-labels").attr({zIndex:6,opacity:0}).add();E.translate(i.plotLeft,i.plotTop),r(p,function(a){r(a,function(L){L.render(E)})}),E.animate({opacity:1},t)}}var d;return function(e){const t=[];e.compose=function(i,l,p){J.pushUnique(t,i)&&(y(i,"init",C),y(i,"destroy",X)),J.pushUnique(t,l)&&(l.prototype.getStacks=Y),J.pushUnique(t,p)&&(i=p.prototype,i.getStackIndicator=R,i.modifyStacks=N,i.percentStacker=x,i.setGroupedPoints=v,i.setStackedPoints=_)}}(d||(d={})),d}),et(w,"Series/Line/LineSeries.js",[w["Core/Series/Series.js"],w["Core/Series/SeriesRegistry.js"],w["Core/Utilities.js"]],function(B,P,$){const{defined:q,merge:J}=$;class Y extends B{constructor(){super(...arguments),this.points=this.options=this.data=void 0}drawGraph(){const C=this,R=this.options,N=(this.gappedPath||this.getGraphPath).call(this),x=this.chart.styledMode;let v=[["graph","highcharts-graph"]];x||v[0].push(R.lineColor||this.color||"#cccccc",R.dashStyle),v=C.getZonesGraphs(v),v.forEach(function(_,A){var c=_[0];let y=C[c];const k=y?"animate":"attr";y?(y.endX=C.preventGraphAnimation?null:N.xMap,y.animate({d:N})):N.length&&(C[c]=y=C.chart.renderer.path(N).addClass(_[1]).attr({zIndex:1}).add(C.group)),y&&!x&&(c={stroke:_[2],"stroke-width":R.lineWidth||0,fill:C.fillGraph&&C.color||"none"},_[3]?c.dashstyle=_[3]:R.linecap!=="square"&&(c["stroke-linecap"]=c["stroke-linejoin"]="round"),y[k](c).shadow(2>A&&R.shadow)),y&&(y.startX=N.xMap,y.isArea=N.isArea)})}getGraphPath(C,R,N){const x=this,v=x.options,_=[],A=[];let c,y=v.step;C=C||x.points;const k=C.reversed;return k&&C.reverse(),(y={right:1,center:2}[y]||y&&3)&&k&&(y=4-y),C=this.getValidPoints(C,!1,!(v.connectNulls&&!R&&!N)),C.forEach(function(g,O){const b=g.plotX,S=g.plotY,o=C[O-1],r=g.isNull||typeof S!="number";(g.leftCliff||o&&o.rightCliff)&&!N&&(c=!0),r&&!q(R)&&0<O?c=!v.connectNulls:r&&!R?c=!0:(O===0||c?O=[["M",g.plotX,g.plotY]]:x.getPointSpline?O=[x.getPointSpline(C,g,O)]:y?(O=y===1?[["L",o.plotX,S]]:y===2?[["L",(o.plotX+b)/2,o.plotY],["L",(o.plotX+b)/2,S]]:[["L",b,o.plotY]],O.push(["L",b,S])):O=[["L",b,S]],A.push(g.x),y&&(A.push(g.x),y===2&&A.push(g.x)),_.push.apply(_,O),c=!1)}),_.xMap=A,x.graphPath=_}getZonesGraphs(C){return this.zones.forEach(function(R,N){N=["zone-graph-"+N,"highcharts-graph highcharts-zone-graph-"+N+" "+(R.className||"")],this.chart.styledMode||N.push(R.color||this.color,R.dashStyle||this.options.dashStyle),C.push(N)},this),C}}return Y.defaultOptions=J(B.defaultOptions,{legendSymbol:"lineMarker"}),P.registerSeriesType("line",Y),Y}),et(w,"Series/Area/AreaSeries.js",[w["Core/Color/Color.js"],w["Core/Series/SeriesRegistry.js"],w["Core/Utilities.js"]],function(B,P,$){const{seriesTypes:{line:q}}=P,{extend:J,merge:Y,objectEach:X,pick:C}=$;class R extends q{constructor(){super(...arguments),this.points=this.options=this.data=void 0}drawGraph(){this.areaPath=[],super.drawGraph.apply(this);const x=this,v=this.areaPath,_=this.options,A=[["area","highcharts-area",this.color,_.fillColor]];this.zones.forEach(function(c,y){A.push(["zone-area-"+y,"highcharts-area highcharts-zone-area-"+y+" "+c.className,c.color||x.color,c.fillColor||_.fillColor])}),A.forEach(function(c){const y=c[0],k={};let g=x[y];const O=g?"animate":"attr";g?(g.endX=x.preventGraphAnimation?null:v.xMap,g.animate({d:v})):(k.zIndex=0,g=x[y]=x.chart.renderer.path(v).addClass(c[1]).add(x.group),g.isArea=!0),x.chart.styledMode||(c[3]?k.fill=c[3]:(k.fill=c[2],k["fill-opacity"]=C(_.fillOpacity,.75))),g[O](k),g.startX=v.xMap,g.shiftUnit=_.step?2:1})}getGraphPath(x){var v=q.prototype.getGraphPath,_=this.options;const A=_.stacking,c=this.yAxis,y=[],k=[],g=this.index,O=c.stacking.stacks[this.stackKey],b=_.threshold,S=Math.round(c.getThreshold(_.threshold));_=C(_.connectNulls,A==="percent");var o=function(d,e,t){var i=x[d];d=A&&O[i.x].points[g];const l=i[t+"Null"]||0;t=i[t+"Cliff"]||0;let p,E;i=!0,t||l?(p=(l?d[0]:d[1])+t,E=d[0]+t,i=!!l):!A&&x[e]&&x[e].isNull&&(p=E=b),typeof p<"u"&&(k.push({plotX:r,plotY:p===null?S:c.getThreshold(p),isNull:i,isCliff:!0}),y.push({plotX:r,plotY:E===null?S:c.getThreshold(E),doCurve:!1}))};let r;x=x||this.points,A&&(x=this.getStackPoints(x));for(let d=0,e=x.length;d<e;++d){A||(x[d].leftCliff=x[d].rightCliff=x[d].leftNull=x[d].rightNull=void 0);var u=x[d].isNull;r=C(x[d].rectPlotX,x[d].plotX);var h=A?C(x[d].yBottom,S):S;(!u||_)&&(_||o(d,d-1,"left"),u&&!A&&_||(k.push(x[d]),y.push({x:d,plotX:r,plotY:h})),_||o(d,d+1,"right"))}return o=v.call(this,k,!0,!0),y.reversed=!0,u=v.call(this,y,!0,!0),(h=u[0])&&h[0]==="M"&&(u[0]=["L",h[1],h[2]]),u=o.concat(u),u.length&&u.push(["Z"]),v=v.call(this,k,!1,_),u.xMap=o.xMap,this.areaPath=u,v}getStackPoints(x){const v=this,_=[],A=[],c=this.xAxis,y=this.yAxis,k=y.stacking.stacks[this.stackKey],g={},O=y.series,b=O.length,S=y.options.reversedStacks?1:-1,o=O.indexOf(v);if(x=x||this.points,this.options.stacking){for(let u=0;u<x.length;u++)x[u].leftNull=x[u].rightNull=void 0,g[x[u].x]=x[u];X(k,function(u,h){u.total!==null&&A.push(h)}),A.sort(function(u,h){return u-h});const r=O.map(u=>u.visible);A.forEach(function(u,h){let d=0,e,t;if(g[u]&&!g[u].isNull)_.push(g[u]),[-1,1].forEach(function(i){const l=i===1?"rightNull":"leftNull",p=k[A[h+i]];let E=0;if(p){let a=o;for(;0<=a&&a<b;){const L=O[a].index;e=p.points[L],e||(L===v.index?g[u][l]=!0:r[a]&&(t=k[u].points[L])&&(E-=t[1]-t[0])),a+=S}}g[u][i===1?"rightCliff":"leftCliff"]=E});else{let i=o;for(;0<=i&&i<b;){if(e=k[u].points[O[i].index]){d=e[1];break}i+=S}d=C(d,0),d=y.translate(d,0,1,0,1),_.push({isNull:!0,plotX:c.translate(u,0,0,0,1),x:u,plotY:d,yBottom:d})}})}return _}}return R.defaultOptions=Y(q.defaultOptions,{threshold:0,legendSymbol:"rectangle"}),J(R.prototype,{singleStacks:!1}),P.registerSeriesType("area",R),R}),et(w,"Series/Spline/SplineSeries.js",[w["Core/Series/SeriesRegistry.js"],w["Core/Utilities.js"]],function(B,P){const{line:$}=B.seriesTypes,{merge:q,pick:J}=P;class Y extends ${constructor(){super(...arguments),this.points=this.options=this.data=void 0}getPointSpline(C,R,N){const x=R.plotX||0,v=R.plotY||0,_=C[N-1];N=C[N+1];let A,c,y;if(_&&!_.isNull&&_.doCurve!==!1&&!R.isCliff&&N&&!N.isNull&&N.doCurve!==!1&&!R.isCliff){C=_.plotY||0;var k=N.plotX||0;N=N.plotY||0;let g=0;A=(1.5*x+(_.plotX||0))/2.5,c=(1.5*v+C)/2.5,k=(1.5*x+k)/2.5,y=(1.5*v+N)/2.5,k!==A&&(g=(y-c)*(k-x)/(k-A)+v-y),c+=g,y+=g,c>C&&c>v?(c=Math.max(C,v),y=2*v-c):c<C&&c<v&&(c=Math.min(C,v),y=2*v-c),y>N&&y>v?(y=Math.max(N,v),c=2*v-y):y<N&&y<v&&(y=Math.min(N,v),c=2*v-y),R.rightContX=k,R.rightContY=y}return R=["C",J(_.rightContX,_.plotX,0),J(_.rightContY,_.plotY,0),J(A,x,0),J(c,v,0),x,v],_.rightContX=_.rightContY=void 0,R}}return Y.defaultOptions=q($.defaultOptions),B.registerSeriesType("spline",Y),Y}),et(w,"Series/AreaSpline/AreaSplineSeries.js",[w["Series/Spline/SplineSeries.js"],w["Core/Series/SeriesRegistry.js"],w["Core/Utilities.js"]],function(B,P,$){const{area:q,area:{prototype:J}}=P.seriesTypes,{extend:Y,merge:X}=$;class C extends B{constructor(){super(...arguments),this.options=this.points=this.data=void 0}}return C.defaultOptions=X(B.defaultOptions,q.defaultOptions),Y(C.prototype,{getGraphPath:J.getGraphPath,getStackPoints:J.getStackPoints,drawGraph:J.drawGraph}),P.registerSeriesType("areaspline",C),C}),et(w,"Series/Column/ColumnSeriesDefaults.js",[],function(){return{borderRadius:3,centerInCategory:!1,groupPadding:.2,marker:null,pointPadding:.1,minPointLength:0,cropThreshold:50,pointRange:null,states:{hover:{halo:!1,brightness:.1},select:{color:"#cccccc",borderColor:"#000000"}},dataLabels:{align:void 0,verticalAlign:void 0,y:void 0},startFromThreshold:!0,stickyTracking:!1,tooltip:{distance:6},threshold:0,borderColor:"#ffffff"}}),et(w,"Series/Column/ColumnSeries.js",[w["Core/Animation/AnimationUtilities.js"],w["Core/Color/Color.js"],w["Series/Column/ColumnSeriesDefaults.js"],w["Core/Globals.js"],w["Core/Series/Series.js"],w["Core/Series/SeriesRegistry.js"],w["Core/Utilities.js"]],function(B,P,$,q,J,Y,X){const{animObject:C}=B,{parse:R}=P,{hasTouch:N,noop:x}=q,{clamp:v,defined:_,extend:A,fireEvent:c,isArray:y,isNumber:k,merge:g,pick:O,objectEach:b}=X;class S extends J{constructor(){super(...arguments),this.points=this.options=this.group=this.data=this.borderWidth=void 0}animate(r){const u=this,h=this.yAxis,d=h.pos,e=u.options,t=this.chart.inverted,i={},l=t?"translateX":"translateY";let p;r?(i.scaleY=.001,r=v(h.toPixels(e.threshold),d,d+h.len),t?i.translateX=r-h.len:i.translateY=r,u.clipBox&&u.setClip(),u.group.attr(i)):(p=Number(u.group.attr(l)),u.group.animate({scaleY:1},A(C(u.options.animation),{step:function(E,a){u.group&&(i[l]=p+a.pos*(d-p),u.group.attr(i))}})))}init(r,u){super.init.apply(this,arguments);const h=this;r=h.chart,r.hasRendered&&r.series.forEach(function(d){d.type===h.type&&(d.isDirty=!0)})}getColumnMetrics(){const r=this;var u=r.options;const h=r.xAxis,d=r.yAxis;var e=h.options.reversedStacks;e=h.reversed&&!e||!h.reversed&&e;const t={};let i,l=0;u.grouping===!1?l=1:r.chart.series.forEach(function(L){const W=L.yAxis,Q=L.options;let nt;L.type!==r.type||!L.visible&&r.chart.options.chart.ignoreHiddenSeries||d.len!==W.len||d.pos!==W.pos||(Q.stacking&&Q.stacking!=="group"?(i=L.stackKey,typeof t[i]>"u"&&(t[i]=l++),nt=t[i]):Q.grouping!==!1&&(nt=l++),L.columnIndex=nt)});const p=Math.min(Math.abs(h.transA)*(h.ordinal&&h.ordinal.slope||u.pointRange||h.closestPointRange||h.tickInterval||1),h.len),E=p*u.groupPadding,a=(p-2*E)/(l||1);return u=Math.min(u.maxPointWidth||h.len,O(u.pointWidth,a*(1-2*u.pointPadding))),r.columnMetrics={width:u,offset:(a-u)/2+(E+((r.columnIndex||0)+(e?1:0))*a-p/2)*(e?-1:1),paddedWidth:a,columnCount:l},r.columnMetrics}crispCol(r,u,h,d){var e=this.borderWidth,t=-(e%2?.5:0);return e=e%2?.5:1,this.options.crisp&&(h=Math.round(r+h)+t,r=Math.round(r)+t,h-=r),d=Math.round(u+d)+e,t=.5>=Math.abs(u)&&.5<d,u=Math.round(u)+e,d-=u,t&&d&&(--u,d+=1),{x:r,y:u,width:h,height:d}}adjustForMissingColumns(r,u,h,d){const e=this.options.stacking;if(!h.isNull&&1<d.columnCount){const t=this.yAxis.options.reversedStacks;let i=0,l=t?0:-d.columnCount;b(this.yAxis.stacking&&this.yAxis.stacking.stacks,p=>{if(typeof h.x=="number"){const E=p[h.x.toString()];E&&(p=E.points[this.index],e?(p&&(i=l),E.hasValidPoints&&(t?l++:l--)):y(p)&&(p=Object.keys(E.points).filter(a=>!a.match(",")&&E.points[a]&&1<E.points[a].length).map(parseFloat).sort((a,L)=>L-a),i=p.indexOf(this.index),l=p.length))}}),r=(h.plotX||0)+((l-1)*d.paddedWidth+u)/2-u-i*d.paddedWidth}return r}translate(){const r=this,u=r.chart,h=r.options;var d=r.dense=2>r.closestPointRange*r.xAxis.transA;d=r.borderWidth=O(h.borderWidth,d?0:1);const e=r.xAxis,t=r.yAxis,i=h.threshold,l=O(h.minPointLength,5),p=r.getColumnMetrics(),E=p.width,a=r.pointXOffset=p.offset,L=r.dataMin,W=r.dataMax;let Q=r.barW=Math.max(E,1+2*d),nt=r.translatedThreshold=t.getThreshold(i);u.inverted&&(nt-=.5),h.pointPadding&&(Q=Math.ceil(Q)),J.prototype.translate.apply(r),r.points.forEach(function(D){const s=O(D.yBottom,nt);var M=999+Math.abs(s),z=D.plotX||0;M=v(D.plotY,-M,t.len+M);let j=Math.min(M,s),K=Math.max(M,s)-j,n=E,f=z+a,m=Q;l&&Math.abs(K)<l&&(K=l,z=!t.reversed&&!D.negative||t.reversed&&D.negative,k(i)&&k(W)&&D.y===i&&W<=i&&(t.min||0)<i&&(L!==W||(t.max||0)<=i)&&(z=!z,D.negative=!D.negative),j=Math.abs(j-nt)>l?s-l:nt-(z?l:0)),_(D.options.pointWidth)&&(n=m=Math.ceil(D.options.pointWidth),f-=Math.round((n-E)/2)),h.centerInCategory&&(f=r.adjustForMissingColumns(f,n,D,p)),D.barX=f,D.pointWidth=n,D.tooltipPos=u.inverted?[v(t.len+t.pos-u.plotLeft-M,t.pos-u.plotLeft,t.len+t.pos-u.plotLeft),e.len+e.pos-u.plotTop-f-m/2,K]:[e.left-u.plotLeft+f+m/2,v(M+t.pos-u.plotTop,t.pos-u.plotTop,t.len+t.pos-u.plotTop),K],D.shapeType=r.pointClass.prototype.shapeType||"roundedRect",D.shapeArgs=r.crispCol(f,D.isNull?nt:j,m,D.isNull?0:K)}),c(this,"afterColumnTranslate")}drawGraph(){this.group[this.dense?"addClass":"removeClass"]("highcharts-dense-data")}pointAttribs(r,u){const h=this.options;var d=this.pointAttrToOptions||{},e=d.stroke||"borderColor";const t=d["stroke-width"]||"borderWidth";let i,l=r&&r.color||this.color,p=r&&r[e]||h[e]||l;d=r&&r.options.dashStyle||h.dashStyle;let E=r&&r[t]||h[t]||this[t]||0,a=O(r&&r.opacity,h.opacity,1);return r&&this.zones.length&&(i=r.getZone(),l=r.options.color||i&&(i.color||r.nonZonedColor)||this.color,i&&(p=i.borderColor||p,d=i.dashStyle||d,E=i.borderWidth||E)),u&&r&&(r=g(h.states[u],r.options.states&&r.options.states[u]||{}),u=r.brightness,l=r.color||typeof u<"u"&&R(l).brighten(r.brightness).get()||l,p=r[e]||p,E=r[t]||E,d=r.dashStyle||d,a=O(r.opacity,a)),e={fill:l,stroke:p,"stroke-width":E,opacity:a},d&&(e.dashstyle=d),e}drawPoints(r=this.points){const u=this,h=this.chart,d=u.options,e=h.renderer,t=d.animationLimit||250;let i;r.forEach(function(l){let p=l.graphic,E=!!p,a=p&&h.pointCount<t?"animate":"attr";k(l.plotY)&&l.y!==null?(i=l.shapeArgs,p&&l.hasNewShapeType()&&(p=p.destroy()),u.enabledDataSorting&&(l.startXPos=u.xAxis.reversed?-(i&&i.width||0):u.xAxis.width),p||(l.graphic=p=e[l.shapeType](i).add(l.group||u.group))&&u.enabledDataSorting&&h.hasRendered&&h.pointCount<t&&(p.attr({x:l.startXPos}),E=!0,a="animate"),p&&E&&p[a](g(i)),h.styledMode||p[a](u.pointAttribs(l,l.selected&&"select")).shadow(l.allowShadow!==!1&&d.shadow),p&&(p.addClass(l.getClassName(),!0),p.attr({visibility:l.visible?"inherit":"hidden"}))):p&&(l.graphic=p.destroy())})}drawTracker(r=this.points){const u=this,h=u.chart,d=h.pointer,e=function(i){const l=d.getPointFromEvent(i);typeof l<"u"&&u.options.enableMouseTracking&&(d.isDirectTouch=!0,l.onMouseOver(i))};let t;r.forEach(function(i){t=y(i.dataLabels)?i.dataLabels:i.dataLabel?[i.dataLabel]:[],i.graphic&&(i.graphic.element.point=i),t.forEach(function(l){l.div?l.div.point=i:l.element.point=i})}),u._hasTracking||(u.trackerGroups.forEach(function(i){u[i]&&(u[i].addClass("highcharts-tracker").on("mouseover",e).on("mouseout",function(l){d.onTrackerMouseOut(l)}),N&&u[i].on("touchstart",e),!h.styledMode&&u.options.cursor&&u[i].css({cursor:u.options.cursor}))}),u._hasTracking=!0),c(this,"afterDrawTracker")}remove(){const r=this,u=r.chart;u.hasRendered&&u.series.forEach(function(h){h.type===r.type&&(h.isDirty=!0)}),J.prototype.remove.apply(r,arguments)}}return S.defaultOptions=g(J.defaultOptions,$),A(S.prototype,{cropShoulder:0,directTouch:!0,getSymbol:x,negStacks:!0,trackerGroups:["group","dataLabelsGroup"]}),Y.registerSeriesType("column",S),S}),et(w,"Core/Series/DataLabel.js",[w["Core/Animation/AnimationUtilities.js"],w["Core/Templating.js"],w["Core/Utilities.js"]],function(B,P,$){const{getDeferredAnimation:q}=B,{format:J}=P,{defined:Y,extend:X,fireEvent:C,isArray:R,isString:N,merge:x,objectEach:v,pick:_,splat:A}=$;var c;return function(y){function k(d,e,t,i,l){const p=this.chart;var E=this.isCartesian&&p.inverted;const a=this.enabledDataSorting;var L=d.plotX,W=d.plotY;const Q=t.rotation;var nt=t.align;W=Y(L)&&Y(W)&&p.isInsidePlot(L,Math.round(W),{inverted:E,paneCoordinates:!0,series:this});let D=_(t.overflow,a?"none":"justify")==="justify";if(E=this.visible&&d.visible!==!1&&Y(L)&&(d.series.forceDL||a&&!D||W||_(t.inside,!!this.options.stacking)&&i&&p.isInsidePlot(L,E?i.x+1:i.y+i.height-1,{inverted:E,paneCoordinates:!0,series:this})),L=d.pos(),E&&L){Q&&e.attr({align:nt}),nt=e.getBBox(!0);var s=[0,0],M=p.renderer.fontMetrics(e).b;if(i=X({x:L[0],y:Math.round(L[1]),width:0,height:0},i),X(t,{width:nt.width,height:nt.height}),Q?(D=!1,s=p.renderer.rotCorr(M,Q),M={x:i.x+(t.x||0)+i.width/2+s.x,y:i.y+(t.y||0)+{top:0,middle:.5,bottom:1}[t.verticalAlign]*i.height},s=[nt.x-Number(e.attr("x")),nt.y-Number(e.attr("y"))],a&&this.xAxis&&!D&&this.setDataLabelStartPos(d,e,l,W,M),e[l?"attr":"animate"](M)):(a&&this.xAxis&&!D&&this.setDataLabelStartPos(d,e,l,W,i),e.align(t,void 0,i),M=e.alignAttr),D&&0<=i.height)this.justifyDataLabel(e,t,M,nt,i,l);else if(_(t.crop,!0)){let{x:z,y:j}=M;z+=s[0],j+=s[1],E=p.isInsidePlot(z,j,{paneCoordinates:!0,series:this})&&p.isInsidePlot(z+nt.width,j+nt.height,{paneCoordinates:!0,series:this})}t.shape&&!Q&&e[l?"attr":"animate"]({anchorX:L[0],anchorY:L[1]})}l&&a&&(e.placed=!1),E||a&&!D?e.show():(e.hide(),e.placed=!1)}function g(d,e){var t=e.filter;return t?(e=t.operator,d=d[t.property],t=t.value,e===">"&&d>t||e==="<"&&d<t||e===">="&&d>=t||e==="<="&&d<=t||e==="=="&&d==t||e==="==="&&d===t):!0}function O(){return this.plotGroup("dataLabelsGroup","data-labels",this.hasRendered?"inherit":"hidden",this.options.dataLabels.zIndex||6)}function b(d){const e=this.hasRendered||0,t=this.initDataLabelsGroup().attr({opacity:+e});return!e&&t&&(this.visible&&t.show(),this.options.animation?t.animate({opacity:1},d):t.attr({opacity:1})),t}function S(d=this.points){var e,t;const i=this,l=i.chart,p=i.options,E=l.renderer,{backgroundColor:a,plotBackgroundColor:L}=l.options.chart,W=l.options.plotOptions,Q=E.getContrast(N(L)&&L||N(a)&&a||"#000000");let nt=p.dataLabels,D,s;var M=A(nt)[0];const z=M.animation;M=M.defer?q(l,z,i):{defer:0,duration:0},nt=r(r((e=W==null?void 0:W.series)===null||e===void 0?void 0:e.dataLabels,(t=W==null?void 0:W[i.type])===null||t===void 0?void 0:t.dataLabels),nt),C(this,"drawDataLabels"),(R(nt)||nt.enabled||i._hasPointLabels)&&(s=this.initDataLabels(M),d.forEach(j=>{var K;const n=j.dataLabels||[];for(D=A(r(nt,j.dlOptions||((K=j.options)===null||K===void 0?void 0:K.dataLabels))),D.forEach((f,m)=>{var G,F=f.enabled&&(!j.isNull||j.dataLabelOnNull)&&g(j,f);const H=j.connectors?j.connectors[m]:j.connector,st=f.style||{};let rt={},lt=n[m],ht=!lt;const pt=_(f.distance,j.labelDistance);if(F){var I=_(f[j.formatPrefix+"Format"],f.format),T=j.getLabelConfig();if(T=Y(I)?J(I,T,l):(f[j.formatPrefix+"Formatter"]||f.formatter).call(T,f),I=f.rotation,l.styledMode||(st.color=_(f.color,st.color,N(i.color)?i.color:void 0,"#000000"),st.color==="contrast"?(j.contrastColor=E.getContrast(j.color||i.color),st.color=!Y(pt)&&f.inside||0>(pt||0)||p.stacking?j.contrastColor:Q):delete j.contrastColor,p.cursor&&(st.cursor=p.cursor)),rt={r:f.borderRadius||0,rotation:I,padding:f.padding,zIndex:1},!l.styledMode){const{backgroundColor:tt,borderColor:V}=f;rt.fill=tt==="auto"?j.color:tt,rt.stroke=V==="auto"?j.color:V,rt["stroke-width"]=f.borderWidth}v(rt,(tt,V)=>{typeof tt>"u"&&delete rt[V]})}!lt||F&&Y(T)&&!!lt.div==!!f.useHTML&&(lt.rotation&&f.rotation||lt.rotation===f.rotation)||(lt=void 0,ht=!0,H&&j.connector&&(j.connector=j.connector.destroy(),j.connectors&&(j.connectors.length===1?delete j.connectors:delete j.connectors[m]))),F&&Y(T)&&(lt?rt.text=T:(lt=I?E.text(T,0,0,f.useHTML).addClass("highcharts-data-label"):E.label(T,0,0,f.shape,void 0,void 0,f.useHTML,void 0,"data-label"))&&lt.addClass(" highcharts-data-label-color-"+j.colorIndex+" "+(f.className||"")+(f.useHTML?" highcharts-tracker":"")),lt&&(lt.options=f,lt.attr(rt),l.styledMode||lt.css(st).shadow(f.shadow),(F=f[j.formatPrefix+"TextPath"]||f.textPath)&&!f.useHTML&&(lt.setTextPath(((G=j.getDataLabelPath)===null||G===void 0?void 0:G.call(j,lt))||j.graphic,F),j.dataLabelPath&&!F.enabled&&(j.dataLabelPath=j.dataLabelPath.destroy())),lt.added||lt.add(s),i.alignDataLabel(j,lt,f,void 0,ht),lt.isActive=!0,n[m]&&n[m]!==lt&&n[m].destroy(),n[m]=lt))}),K=n.length;K--;)n[K].isActive?n[K].isActive=!1:(n[K].destroy(),n.splice(K,1));j.dataLabel=n[0],j.dataLabels=n})),C(this,"afterDrawDataLabels")}function o(d,e,t,i,l,p){const E=this.chart,a=e.align,L=e.verticalAlign,W=d.box?0:d.padding||0;let{x:Q=0,y:nt=0}=e,D,s;return D=(t.x||0)+W,0>D&&(a==="right"&&0<=Q?(e.align="left",e.inside=!0):Q-=D,s=!0),D=(t.x||0)+i.width-W,D>E.plotWidth&&(a==="left"&&0>=Q?(e.align="right",e.inside=!0):Q+=E.plotWidth-D,s=!0),D=t.y+W,0>D&&(L==="bottom"&&0<=nt?(e.verticalAlign="top",e.inside=!0):nt-=D,s=!0),D=(t.y||0)+i.height-W,D>E.plotHeight&&(L==="top"&&0>=nt?(e.verticalAlign="bottom",e.inside=!0):nt+=E.plotHeight-D,s=!0),s&&(e.x=Q,e.y=nt,d.placed=!p,d.align(e,void 0,l)),s}function r(d,e){let t=[],i;if(R(d)&&!R(e))t=d.map(function(l){return x(l,e)});else if(R(e)&&!R(d))t=e.map(function(l){return x(d,l)});else if(!R(d)&&!R(e))t=x(d,e);else if(R(d)&&R(e))for(i=Math.max(d.length,e.length);i--;)t[i]=x(d[i],e[i]);return t}function u(d,e,t,i,l){const p=this.chart,E=p.inverted,a=this.xAxis,L=a.reversed,W=E?e.height/2:e.width/2;d=(d=d.pointWidth)?d/2:0,e.startXPos=E?l.x:L?-W-d:a.width-W+d,e.startYPos=E?L?this.yAxis.height-W+d:-W-d:l.y,i?e.visibility==="hidden"&&(e.show(),e.attr({opacity:0}).animate({opacity:1})):e.attr({opacity:1}).animate({opacity:0},void 0,e.hide),p.hasRendered&&(t&&e.attr({x:e.startXPos,y:e.startYPos}),e.placed=!0)}const h=[];y.compose=function(d){$.pushUnique(h,d)&&(d=d.prototype,d.initDataLabelsGroup=O,d.initDataLabels=b,d.alignDataLabel=k,d.drawDataLabels=S,d.justifyDataLabel=o,d.setDataLabelStartPos=u)}}(c||(c={})),c}),et(w,"Series/Column/ColumnDataLabel.js",[w["Core/Series/DataLabel.js"],w["Core/Series/SeriesRegistry.js"],w["Core/Utilities.js"]],function(B,P,$){const{series:q}=P,{merge:J,pick:Y}=$;var X;return function(C){function R(x,v,_,A,c){let y=this.chart.inverted;var k=x.series;let g=(k.xAxis?k.xAxis.len:this.chart.plotSizeX)||0;k=(k.yAxis?k.yAxis.len:this.chart.plotSizeY)||0;var O=x.dlBox||x.shapeArgs;let b=Y(x.below,x.plotY>Y(this.translatedThreshold,k)),S=Y(_.inside,!!this.options.stacking);O&&(A=J(O),0>A.y&&(A.height+=A.y,A.y=0),O=A.y+A.height-k,0<O&&O<A.height&&(A.height-=O),y&&(A={x:k-A.y-A.height,y:g-A.x-A.width,width:A.height,height:A.width}),S||(y?(A.x+=b?0:A.width,A.width=0):(A.y+=b?A.height:0,A.height=0))),_.align=Y(_.align,!y||S?"center":b?"right":"left"),_.verticalAlign=Y(_.verticalAlign,y||S?"middle":b?"top":"bottom"),q.prototype.alignDataLabel.call(this,x,v,_,A,c),_.inside&&x.contrastColor&&v.css({color:x.contrastColor})}const N=[];C.compose=function(x){B.compose(q),$.pushUnique(N,x)&&(x.prototype.alignDataLabel=R)}}(X||(X={})),X}),et(w,"Series/Bar/BarSeries.js",[w["Series/Column/ColumnSeries.js"],w["Core/Series/SeriesRegistry.js"],w["Core/Utilities.js"]],function(B,P,$){const{extend:q,merge:J}=$;class Y extends B{constructor(){super(...arguments),this.points=this.options=this.data=void 0}}return Y.defaultOptions=J(B.defaultOptions,{}),q(Y.prototype,{inverted:!0}),P.registerSeriesType("bar",Y),Y}),et(w,"Series/Scatter/ScatterSeriesDefaults.js",[],function(){return{lineWidth:0,findNearestPointBy:"xy",jitter:{x:0,y:0},marker:{enabled:!0},tooltip:{headerFormat:'<span style="color:{point.color}">●</span> <span style="font-size: 0.8em"> {series.name}</span><br/>',pointFormat:"x: <b>{point.x}</b><br/>y: <b>{point.y}</b><br/>"}}}),et(w,"Series/Scatter/ScatterSeries.js",[w["Series/Scatter/ScatterSeriesDefaults.js"],w["Core/Series/SeriesRegistry.js"],w["Core/Utilities.js"]],function(B,P,$){const{column:q,line:J}=P.seriesTypes,{addEvent:Y,extend:X,merge:C}=$;class R extends J{constructor(){super(...arguments),this.points=this.options=this.data=void 0}applyJitter(){const x=this,v=this.options.jitter,_=this.points.length;v&&this.points.forEach(function(A,c){["x","y"].forEach(function(y,k){let g="plot"+y.toUpperCase(),O,b;if(v[y]&&!A.isNull){var S=x[y+"Axis"];b=v[y]*S.transA,S&&!S.isLog&&(O=Math.max(0,A[g]-b),S=Math.min(S.len,A[g]+b),k=1e4*Math.sin(c+k*_),k-=Math.floor(k),A[g]=O+(S-O)*k,y==="x"&&(A.clientX=A.plotX))}})})}drawGraph(){this.options.lineWidth?super.drawGraph():this.graph&&(this.graph=this.graph.destroy())}}return R.defaultOptions=C(J.defaultOptions,B),X(R.prototype,{drawTracker:q.prototype.drawTracker,sorted:!1,requireSorting:!1,noSharedTooltip:!0,trackerGroups:["group","markerGroup","dataLabelsGroup"],takeOrdinalPosition:!1}),Y(R,"afterTranslate",function(){this.applyJitter()}),P.registerSeriesType("scatter",R),R}),et(w,"Series/CenteredUtilities.js",[w["Core/Globals.js"],w["Core/Series/Series.js"],w["Core/Utilities.js"]],function(B,P,$){const{deg2rad:q}=B,{fireEvent:J,isNumber:Y,pick:X,relativeLength:C}=$;var R;return function(N){N.getCenter=function(){var x=this.options,v=this.chart;const _=2*(x.slicedOffset||0),A=v.plotWidth-2*_,c=v.plotHeight-2*_;var y=x.center;const k=Math.min(A,c),g=x.thickness;var O=x.size;let b=x.innerSize||0;for(typeof O=="string"&&(O=parseFloat(O)),typeof b=="string"&&(b=parseFloat(b)),x=[X(y[0],"50%"),X(y[1],"50%"),X(O&&0>O?void 0:x.size,"100%"),X(b&&0>b?void 0:x.innerSize||0,"0%")],!v.angular||this instanceof P||(x[3]=0),y=0;4>y;++y)O=x[y],v=2>y||y===2&&/%$/.test(O),x[y]=C(O,[A,c,k,x[2]][y])+(v?_:0);return x[3]>x[2]&&(x[3]=x[2]),Y(g)&&2*g<x[2]&&0<g&&(x[3]=x[2]-2*g),J(this,"afterGetCenter",{positions:x}),x},N.getStartAndEndRadians=function(x,v){return x=Y(x)?x:0,v=Y(v)&&v>x&&360>v-x?v:x+360,{start:q*(x+-90),end:q*(v+-90)}}}(R||(R={})),R}),et(w,"Series/Pie/PiePoint.js",[w["Core/Animation/AnimationUtilities.js"],w["Core/Series/Point.js"],w["Core/Utilities.js"]],function(B,P,$){const{setAnimation:q}=B,{addEvent:J,defined:Y,extend:X,isNumber:C,pick:R,relativeLength:N}=$;class x extends P{constructor(){super(...arguments),this.series=this.options=this.labelDistance=void 0}getConnectorPath(){const _=this.labelPosition,A=this.series.options.dataLabels,c=this.connectorShapes;let y=A.connectorShape;return c[y]&&(y=c[y]),y.call(this,{x:_.computed.x,y:_.computed.y,alignment:_.alignment},_.connectorPosition,A)}getTranslate(){return this.sliced?this.slicedTranslation:{translateX:0,translateY:0}}haloPath(_){const A=this.shapeArgs;return this.sliced||!this.visible?[]:this.series.chart.renderer.symbols.arc(A.x,A.y,A.r+_,A.r+_,{innerR:A.r-1,start:A.start,end:A.end,borderRadius:A.borderRadius})}init(){super.init.apply(this,arguments),this.name=R(this.name,"Slice");const _=A=>{this.slice(A.type==="select")};return J(this,"select",_),J(this,"unselect",_),this}isValid(){return C(this.y)&&0<=this.y}setVisible(_,A){const c=this.series,y=c.chart,k=c.options.ignoreHiddenPoint;A=R(A,k),_!==this.visible&&(this.visible=this.options.visible=_=typeof _>"u"?!this.visible:_,c.options.data[c.data.indexOf(this)]=this.options,["graphic","dataLabel","connector"].forEach(g=>{this[g]&&this[g][_?"show":"hide"](_)}),this.legendItem&&y.legend.colorizeItem(this,_),_||this.state!=="hover"||this.setState(""),k&&(c.isDirty=!0),A&&y.redraw())}slice(_,A,c){const y=this.series;q(c,y.chart),R(A,!0),this.sliced=this.options.sliced=Y(_)?_:!this.sliced,y.options.data[y.data.indexOf(this)]=this.options,this.graphic&&this.graphic.animate(this.getTranslate())}}return X(x.prototype,{connectorShapes:{fixedOffset:function(v,_,A){const c=_.breakAt;return _=_.touchingSliceAt,[["M",v.x,v.y],A.softConnector?["C",v.x+(v.alignment==="left"?-5:5),v.y,2*c.x-_.x,2*c.y-_.y,c.x,c.y]:["L",c.x,c.y],["L",_.x,_.y]]},straight:function(v,_){return _=_.touchingSliceAt,[["M",v.x,v.y],["L",_.x,_.y]]},crookedLine:function(v,_,A){const{breakAt:c,touchingSliceAt:y}=_;({series:_}=this);const[k,g,O]=_.center,b=O/2,S=_.chart.plotWidth,o=_.chart.plotLeft;_=v.alignment==="left";const{x:r,y:u}=v;return A.crookDistance?(v=N(A.crookDistance,1),v=_?k+b+(S+o-k-b)*(1-v):o+(k-b)*v):v=k+(g-u)*Math.tan((this.angle||0)-Math.PI/2),A=[["M",r,u]],(_?v<=r&&v>=c.x:v>=r&&v<=c.x)&&A.push(["L",v,u]),A.push(["L",c.x,c.y],["L",y.x,y.y]),A}}}),x}),et(w,"Series/Pie/PieSeriesDefaults.js",[],function(){return{borderRadius:3,center:[null,null],clip:!1,colorByPoint:!0,dataLabels:{allowOverlap:!0,connectorPadding:5,connectorShape:"crookedLine",crookDistance:void 0,distance:30,enabled:!0,formatter:function(){return this.point.isNull?void 0:this.point.name},softConnector:!0,x:0},fillColor:void 0,ignoreHiddenPoint:!0,inactiveOtherPoints:!0,legendType:"point",marker:null,size:null,showInLegend:!1,slicedOffset:10,stickyTracking:!1,tooltip:{followPointer:!0},borderColor:"#ffffff",borderWidth:1,lineWidth:void 0,states:{hover:{brightness:.1}}}}),et(w,"Series/Pie/PieSeries.js",[w["Series/CenteredUtilities.js"],w["Series/Column/ColumnSeries.js"],w["Core/Globals.js"],w["Series/Pie/PiePoint.js"],w["Series/Pie/PieSeriesDefaults.js"],w["Core/Series/Series.js"],w["Core/Series/SeriesRegistry.js"],w["Core/Renderer/SVG/Symbols.js"],w["Core/Utilities.js"]],function(B,P,$,q,J,Y,X,C,R){const{getStartAndEndRadians:N}=B;({noop:$}=$);const{clamp:x,extend:v,fireEvent:_,merge:A,pick:c,relativeLength:y}=R;class k extends Y{constructor(){super(...arguments),this.points=this.options=this.maxLabelDistance=this.data=this.center=void 0}animate(O){const b=this,S=b.points,o=b.startAngleRad;O||S.forEach(function(r){const u=r.graphic,h=r.shapeArgs;u&&h&&(u.attr({r:c(r.startR,b.center&&b.center[3]/2),start:o,end:o}),u.animate({r:h.r,start:h.start,end:h.end},b.options.animation))})}drawEmpty(){const O=this.startAngleRad,b=this.endAngleRad,S=this.options;let o,r;this.total===0&&this.center?(o=this.center[0],r=this.center[1],this.graph||(this.graph=this.chart.renderer.arc(o,r,this.center[1]/2,0,O,b).addClass("highcharts-empty-series").add(this.group)),this.graph.attr({d:C.arc(o,r,this.center[2]/2,0,{start:O,end:b,innerR:this.center[3]/2})}),this.chart.styledMode||this.graph.attr({"stroke-width":S.borderWidth,fill:S.fillColor||"none",stroke:S.color||"#cccccc"})):this.graph&&(this.graph=this.graph.destroy())}drawPoints(){const O=this.chart.renderer;this.points.forEach(function(b){b.graphic&&b.hasNewShapeType()&&(b.graphic=b.graphic.destroy()),b.graphic||(b.graphic=O[b.shapeType](b.shapeArgs).add(b.series.group),b.delayedRendering=!0)})}generatePoints(){super.generatePoints(),this.updateTotals()}getX(O,b,S){const o=this.center,r=this.radii?this.radii[S.index]||0:o[2]/2;return O=Math.asin(x((O-o[1])/(r+S.labelDistance),-1,1)),o[0]+(b?-1:1)*Math.cos(O)*(r+S.labelDistance)+(0<S.labelDistance?(b?-1:1)*this.options.dataLabels.padding:0)}hasData(){return!!this.processedXData.length}redrawPoints(){const O=this,b=O.chart;let S,o,r,u;this.drawEmpty(),O.group&&!b.styledMode&&O.group.shadow(O.options.shadow),O.points.forEach(function(h){const d={};o=h.graphic,!h.isNull&&o?(u=h.shapeArgs,S=h.getTranslate(),b.styledMode||(r=O.pointAttribs(h,h.selected&&"select")),h.delayedRendering?(o.setRadialReference(O.center).attr(u).attr(S),b.styledMode||o.attr(r).attr({"stroke-linejoin":"round"}),h.delayedRendering=!1):(o.setRadialReference(O.center),b.styledMode||A(!0,d,r),A(!0,d,u,S),o.animate(d)),o.attr({visibility:h.visible?"inherit":"hidden"}),o.addClass(h.getClassName(),!0)):o&&(h.graphic=o.destroy())})}sortByAngle(O,b){O.sort(function(S,o){return typeof S.angle<"u"&&(o.angle-S.angle)*b})}translate(O){_(this,"translate"),this.generatePoints();var b=this.options;const S=b.slicedOffset,o=S+(b.borderWidth||0);var r=N(b.startAngle,b.endAngle);const u=this.startAngleRad=r.start;r=(this.endAngleRad=r.end)-u;const h=this.points,d=b.dataLabels.distance;b=b.ignoreHiddenPoint;const e=h.length;let t,i,l,p=0;for(O||(this.center=O=this.getCenter()),i=0;i<e;i++){l=h[i];var E=u+p*r;!l.isValid()||b&&!l.visible||(p+=l.percentage/100);var a=u+p*r,L={x:O[0],y:O[1],r:O[2]/2,innerR:O[3]/2,start:Math.round(1e3*E)/1e3,end:Math.round(1e3*a)/1e3};l.shapeType="arc",l.shapeArgs=L,l.labelDistance=c(l.options.dataLabels&&l.options.dataLabels.distance,d),l.labelDistance=y(l.labelDistance,L.r),this.maxLabelDistance=Math.max(this.maxLabelDistance||0,l.labelDistance),a=(a+E)/2,a>1.5*Math.PI?a-=2*Math.PI:a<-Math.PI/2&&(a+=2*Math.PI),l.slicedTranslation={translateX:Math.round(Math.cos(a)*S),translateY:Math.round(Math.sin(a)*S)},L=Math.cos(a)*O[2]/2,t=Math.sin(a)*O[2]/2,l.tooltipPos=[O[0]+.7*L,O[1]+.7*t],l.half=a<-Math.PI/2||a>Math.PI/2?1:0,l.angle=a,E=Math.min(o,l.labelDistance/5),l.labelPosition={natural:{x:O[0]+L+Math.cos(a)*l.labelDistance,y:O[1]+t+Math.sin(a)*l.labelDistance},computed:{},alignment:0>l.labelDistance?"center":l.half?"right":"left",connectorPosition:{breakAt:{x:O[0]+L+Math.cos(a)*E,y:O[1]+t+Math.sin(a)*E},touchingSliceAt:{x:O[0]+L,y:O[1]+t}}}}_(this,"afterTranslate")}updateTotals(){const O=this.points,b=O.length,S=this.options.ignoreHiddenPoint;let o,r,u=0;for(o=0;o<b;o++)r=O[o],!r.isValid()||S&&!r.visible||(u+=r.y);for(this.total=u,o=0;o<b;o++)r=O[o],r.percentage=0<u&&(r.visible||!S)?r.y/u*100:0,r.total=u}}return k.defaultOptions=A(Y.defaultOptions,J),v(k.prototype,{axisTypes:[],directTouch:!0,drawGraph:void 0,drawTracker:P.prototype.drawTracker,getCenter:B.getCenter,getSymbol:$,isCartesian:!1,noSharedTooltip:!0,pointAttribs:P.prototype.pointAttribs,pointClass:q,requireSorting:!1,searchPoint:$,trackerGroups:["group","dataLabelsGroup"]}),X.registerSeriesType("pie",k),k}),et(w,"Series/Pie/PieDataLabel.js",[w["Core/Series/DataLabel.js"],w["Core/Globals.js"],w["Core/Renderer/RendererUtilities.js"],w["Core/Series/SeriesRegistry.js"],w["Core/Utilities.js"]],function(B,P,$,q,J){const{noop:Y}=P,{distribute:X}=$,{series:C}=q,{arrayMax:R,clamp:N,defined:x,merge:v,pick:_,relativeLength:A}=J;var c;return function(y){function k(){const o=this,r=o.data,u=o.chart,h=o.options.dataLabels||{},d=h.connectorPadding,e=u.plotWidth,t=u.plotHeight,i=u.plotLeft,l=Math.round(u.chartWidth/3),p=o.center,E=p[2]/2,a=p[1],L=[[],[]],W=[0,0,0,0],Q=o.dataLabelPositioners;let nt,D,s,M,z,j,K,n,f,m,G,F;o.visible&&(h.enabled||o._hasPointLabels)&&(r.forEach(function(H){H.dataLabel&&H.visible&&H.dataLabel.shortened&&(H.dataLabel.attr({width:"auto"}).css({width:"auto",textOverflow:"clip"}),H.dataLabel.shortened=!1)}),C.prototype.drawDataLabels.apply(o),r.forEach(function(H){H.dataLabel&&(H.visible?(L[H.half].push(H),H.dataLabel._pos=null,!x(h.style.width)&&!x(H.options.dataLabels&&H.options.dataLabels.style&&H.options.dataLabels.style.width)&&H.dataLabel.getBBox().width>l&&(H.dataLabel.css({width:Math.round(.7*l)+"px"}),H.dataLabel.shortened=!0)):(H.dataLabel=H.dataLabel.destroy(),H.dataLabels&&H.dataLabels.length===1&&delete H.dataLabels))}),L.forEach((H,st)=>{const rt=H.length,lt=[];let ht,pt=0;if(rt){if(o.sortByAngle(H,st-.5),0<o.maxLabelDistance){var I=Math.max(0,a-E-o.maxLabelDistance);ht=Math.min(a+E+o.maxLabelDistance,u.plotHeight),H.forEach(function(T){0<T.labelDistance&&T.dataLabel&&(T.top=Math.max(0,a-E-T.labelDistance),T.bottom=Math.min(a+E+T.labelDistance,u.plotHeight),pt=T.dataLabel.getBBox().height||21,T.distributeBox={target:T.labelPosition.natural.y-T.top+pt/2,size:pt,rank:T.y},lt.push(T.distributeBox))}),I=ht+pt-I,X(lt,I,I/5)}for(G=0;G<rt;G++){if(nt=H[G],j=nt.labelPosition,M=nt.dataLabel,m=nt.visible===!1?"hidden":"inherit",f=I=j.natural.y,lt&&x(nt.distributeBox)&&(typeof nt.distributeBox.pos>"u"?m="hidden":(K=nt.distributeBox.size,f=Q.radialDistributionY(nt))),delete nt.positionIndex,h.justify)n=Q.justify(nt,E,p);else switch(h.alignTo){case"connectors":n=Q.alignToConnectors(H,st,e,i);break;case"plotEdges":n=Q.alignToPlotEdges(M,st,e,i);break;default:n=Q.radialDistributionX(o,nt,f,I)}M._attr={visibility:m,align:j.alignment},F=nt.options.dataLabels||{},M._pos={x:n+_(F.x,h.x)+({left:d,right:-d}[j.alignment]||0),y:f+_(F.y,h.y)-M.getBBox().height/2},j&&(j.computed.x=n,j.computed.y=f),_(h.crop,!0)&&(z=M.getBBox().width,I=null,n-z<d&&st===1?(I=Math.round(z-n+d),W[3]=Math.max(I,W[3])):n+z>e-d&&st===0&&(I=Math.round(n+z-e+d),W[1]=Math.max(I,W[1])),0>f-K/2?W[0]=Math.max(Math.round(-f+K/2),W[0]):f+K/2>t&&(W[2]=Math.max(Math.round(f+K/2-t),W[2])),M.sideOverflow=I)}}}),R(W)===0||this.verifyDataLabelOverflow(W))&&(this.placeDataLabels(),this.points.forEach(function(H){if(F=v(h,H.options.dataLabels),D=_(F.connectorWidth,1)){let st;s=H.connector,(M=H.dataLabel)&&M._pos&&H.visible&&0<H.labelDistance?(m=M._attr.visibility,(st=!s)&&(H.connector=s=u.renderer.path().addClass("highcharts-data-label-connector highcharts-color-"+H.colorIndex+(H.className?" "+H.className:"")).add(o.dataLabelsGroup),u.styledMode||s.attr({"stroke-width":D,stroke:F.connectorColor||H.color||"#666666"})),s[st?"attr":"animate"]({d:H.getConnectorPath()}),s.attr("visibility",m)):s&&(H.connector=s.destroy())}}))}function g(){this.points.forEach(function(o){let r=o.dataLabel,u;r&&o.visible&&((u=r._pos)?(r.sideOverflow&&(r._attr.width=Math.max(r.getBBox().width-r.sideOverflow,0),r.css({width:r._attr.width+"px",textOverflow:(this.options.dataLabels.style||{}).textOverflow||"ellipsis"}),r.shortened=!0),r.attr(r._attr),r[r.moved?"animate":"attr"](u),r.moved=!0):r&&r.attr({y:-9999})),delete o.distributeBox},this)}function O(o){let r=this.center,u=this.options,h=u.center,d=u.minSize||80,e,t=u.size!==null;return t||(h[0]!==null?e=Math.max(r[2]-Math.max(o[1],o[3]),d):(e=Math.max(r[2]-o[1]-o[3],d),r[0]+=(o[3]-o[1])/2),h[1]!==null?e=N(e,d,r[2]-Math.max(o[0],o[2])):(e=N(e,d,r[2]-o[0]-o[2]),r[1]+=(o[0]-o[2])/2),e<r[2]?(r[2]=e,r[3]=Math.min(u.thickness?Math.max(0,e-2*u.thickness):Math.max(0,A(u.innerSize||0,e)),e),this.translate(r),this.drawDataLabels&&this.drawDataLabels()):t=!0),t}const b=[],S={radialDistributionY:function(o){return o.top+o.distributeBox.pos},radialDistributionX:function(o,r,u,h){return o.getX(u<r.top+2||u>r.bottom-2?h:u,r.half,r)},justify:function(o,r,u){return u[0]+(o.half?-1:1)*(r+o.labelDistance)},alignToPlotEdges:function(o,r,u,h){return o=o.getBBox().width,r?o+h:u-o-h},alignToConnectors:function(o,r,u,h){let d=0,e;return o.forEach(function(t){e=t.dataLabel.getBBox().width,e>d&&(d=e)}),r?d+h:u-d-h}};y.compose=function(o){B.compose(C),J.pushUnique(b,o)&&(o=o.prototype,o.dataLabelPositioners=S,o.alignDataLabel=Y,o.drawDataLabels=k,o.placeDataLabels=g,o.verifyDataLabelOverflow=O)}}(c||(c={})),c}),et(w,"Extensions/OverlappingDataLabels.js",[w["Core/Chart/Chart.js"],w["Core/Utilities.js"]],function(B,P){function $(N,x){let v,_=!1;return N&&(v=N.newOpacity,N.oldOpacity!==v&&(N.alignAttr&&N.placed?(N[v?"removeClass":"addClass"]("highcharts-data-label-hidden"),_=!0,N.alignAttr.opacity=v,N[N.isOld?"animate":"attr"](N.alignAttr,null,function(){x.styledMode||N.css({pointerEvents:v?"auto":"none"})}),J(x,"afterHideOverlappingLabel")):N.attr({opacity:v})),N.isOld=!0),_}const{addEvent:q,fireEvent:J,isArray:Y,isNumber:X,objectEach:C,pick:R}=P;q(B,"render",function(){let N=this,x=[];(this.labelCollectors||[]).forEach(function(v){x=x.concat(v())}),(this.yAxis||[]).forEach(function(v){v.stacking&&v.options.stackLabels&&!v.options.stackLabels.allowOverlap&&C(v.stacking.stacks,function(_){C(_,function(A){A.label&&x.push(A.label)})})}),(this.series||[]).forEach(function(v){var _=v.options.dataLabels;v.visible&&(_.enabled!==!1||v._hasPointLabels)&&(_=A=>A.forEach(c=>{c.visible&&(Y(c.dataLabels)?c.dataLabels:c.dataLabel?[c.dataLabel]:[]).forEach(function(y){const k=y.options;y.labelrank=R(k.labelrank,c.labelrank,c.shapeArgs&&c.shapeArgs.height),k.allowOverlap?(y.oldOpacity=y.opacity,y.newOpacity=1,$(y,N)):x.push(y)})}),_(v.nodes||[]),_(v.points))}),this.hideOverlappingLabels(x)}),B.prototype.hideOverlappingLabels=function(N){let x=this,v=N.length,_=x.renderer;var A;let c,y,k,g,O=!1;var b=function(S){let o,r;var u;let h=S.box?0:S.padding||0,d=u=0,e,t;if(S&&(!S.alignAttr||S.placed))return o=S.alignAttr||{x:S.attr("x"),y:S.attr("y")},r=S.parentGroup,S.width||(u=S.getBBox(),S.width=u.width,S.height=u.height,u=_.fontMetrics(S.element).h),e=S.width-2*h,(t={left:"0",center:"0.5",right:"1"}[S.alignValue])?d=+t*e:X(S.x)&&Math.round(S.x)!==S.translateX&&(d=S.x-S.translateX),{x:o.x+(r.translateX||0)+h-(d||0),y:o.y+(r.translateY||0)+h-u,width:S.width-2*h,height:S.height-2*h}};for(c=0;c<v;c++)(A=N[c])&&(A.oldOpacity=A.opacity,A.newOpacity=1,A.absoluteBox=b(A));for(N.sort(function(S,o){return(o.labelrank||0)-(S.labelrank||0)}),c=0;c<v;c++)for(k=(b=N[c])&&b.absoluteBox,A=c+1;A<v;++A)g=(y=N[A])&&y.absoluteBox,!k||!g||b===y||b.newOpacity===0||y.newOpacity===0||b.visibility==="hidden"||y.visibility==="hidden"||g.x>=k.x+k.width||g.x+g.width<=k.x||g.y>=k.y+k.height||g.y+g.height<=k.y||((b.labelrank<y.labelrank?b:y).newOpacity=0);N.forEach(function(S){$(S,x)&&(O=!0)}),O&&J(x,"afterHideAllOverlappingLabels")}}),et(w,"Extensions/BorderRadius.js",[w["Core/Defaults.js"],w["Core/Series/Series.js"],w["Core/Series/SeriesRegistry.js"],w["Core/Renderer/SVG/SVGElement.js"],w["Core/Renderer/SVG/SVGRenderer.js"],w["Core/Utilities.js"]],function(B,P,$,q,J,Y){const{defaultOptions:X}=B;({seriesTypes:B}=$);const{addEvent:C,extend:R,isObject:N,merge:x,relativeLength:v}=Y,_={radius:0,scope:"stack",where:void 0},A=(c,y)=>(N(c)||(c={radius:c||0}),x(_,y,c));if(q.symbolCustomAttribs.indexOf("borderRadius")===-1){q.symbolCustomAttribs.push("borderRadius","brBoxHeight","brBoxY");const c=J.prototype.symbols.arc;J.prototype.symbols.arc=function(k,g,O,b,S={}){k=c(k,g,O,b,S);const{innerR:o=0,r=O,start:u=0,end:h=0}=S;if(S.open||!S.borderRadius)return k;for(O=h-u,g=Math.sin(O/2),S=Math.max(Math.min(v(S.borderRadius||0,r-o),(r-o)/2,r*g/(1+g)),0),O=Math.min(S,O/Math.PI*2*o),g=k.length-1;g--;){let E,a,L;b=k;var d=g,e=1<g?O:S,t=b[d],i=b[d+1];if(i[0]==="Z"&&(i=b[0]),t[0]!=="M"&&t[0]!=="L"||i[0]!=="A"?t[0]!=="A"||i[0]!=="M"&&i[0]!=="L"||(L=i,a=t):(L=t,a=i,E=!0),L&&a&&a.params){t=a[1];var l=a[5];i=a.params;const{start:W,end:Q,cx:nt,cy:D}=i;var p=l?t-e:t+e;const s=p?Math.asin(e/p):0;l=l?s:-s,p*=Math.cos(s),E?(i.start=W+l,L[1]=nt+p*Math.cos(W),L[2]=D+p*Math.sin(W),b.splice(d+1,0,["A",e,e,0,0,1,nt+t*Math.cos(i.start),D+t*Math.sin(i.start)])):(i.end=Q-l,a[6]=nt+t*Math.cos(i.end),a[7]=D+t*Math.sin(i.end),b.splice(d+1,0,["A",e,e,0,0,1,nt+p*Math.cos(Q),D+p*Math.sin(Q)])),a[4]=Math.abs(i.end-i.start)<Math.PI?0:1}}return k};const y=J.prototype.symbols.roundedRect;J.prototype.symbols.roundedRect=function(k,g,O,b,S={}){const o=y(k,g,O,b,S),{r=0,brBoxHeight:u=b,brBoxY:h=g}=S;var d=g-h,e=h+u-(g+b);S=-.1<d-r?0:r;const t=-.1<e-r?0:r;var i=Math.max(S&&d,0);const l=Math.max(t&&e,0);e=[k+S,g],d=[k+O-S,g];const p=[k+O,g+S],E=[k+O,g+b-t],a=[k+O-t,g+b],L=[k+t,g+b],W=[k,g+b-t],Q=[k,g+S];if(i){const nt=Math.sqrt(Math.pow(S,2)-Math.pow(S-i,2));e[0]-=nt,d[0]+=nt,p[1]=Q[1]=g+S-i}return b<S-i&&(i=Math.sqrt(Math.pow(S,2)-Math.pow(S-i-b,2)),p[0]=E[0]=k+O-S+i,a[0]=Math.min(p[0],a[0]),L[0]=Math.max(E[0],L[0]),W[0]=Q[0]=k+S-i,p[1]=Q[1]=g+b),l&&(i=Math.sqrt(Math.pow(t,2)-Math.pow(t-l,2)),a[0]+=i,L[0]-=i,E[1]=W[1]=g+b-t+l),b<t-l&&(b=Math.sqrt(Math.pow(t,2)-Math.pow(t-l-b,2)),p[0]=E[0]=k+O-t+b,d[0]=Math.min(p[0],d[0]),e[0]=Math.max(E[0],e[0]),W[0]=Q[0]=k+t-b,E[1]=W[1]=g),o.length=0,o.push(["M",...e],["L",...d],["A",S,S,0,0,1,...p],["L",...E],["A",t,t,0,0,1,...a],["L",...L],["A",t,t,0,0,1,...W],["L",...Q],["A",S,S,0,0,1,...e],["Z"]),o},C(B.pie,"afterTranslate",function(){const k=A(this.options.borderRadius);for(const g of this.points){const O=g.shapeArgs;O&&(O.borderRadius=v(k.radius,(O.r||0)-(O.innerR||0)))}}),C(P,"afterColumnTranslate",function(){var k,g;if(this.options.borderRadius&&(!this.chart.is3d||!this.chart.is3d())){const{options:o,yAxis:r}=this,u=o.stacking==="percent";var O=(g=(k=X.plotOptions)===null||k===void 0?void 0:k[this.type])===null||g===void 0?void 0:g.borderRadius;k=A(o.borderRadius,N(O)?O:{}),g=r.options.reversed;for(const h of this.points)if({shapeArgs:O}=h,h.shapeType==="roundedRect"&&O){const{width:d=0,height:e=0,y:t=0}=O;var b=t,S=e;k.scope==="stack"&&h.stackTotal&&(b=r.translate(u?100:h.stackTotal,!1,!0,!1,!0),S=r.translate(o.threshold||0,!1,!0,!1,!0),S=this.crispCol(0,Math.min(b,S),0,Math.abs(b-S)),b=S.y,S=S.height);const i=(h.negative?-1:1)*(g?-1:1)===-1;let l=k.where;!l&&this.is("waterfall")&&Math.abs((h.yBottom||0)-(this.translatedThreshold||0))>this.borderWidth&&(l="all"),l||(l="end");const p=Math.min(v(k.radius,d),d/2,l==="all"?e/2:1/0)||0;l==="end"&&(i&&(b-=p),S+=p),R(O,{brBoxHeight:S,brBoxY:b,r:p})}}},{order:9})}return P={optionsToObject:A},P}),et(w,"Core/Responsive.js",[w["Core/Utilities.js"]],function(B){const{diffObjects:P,extend:$,find:q,merge:J,pick:Y,uniqueKey:X}=B;var C;return function(R){function N(_,A){const c=_.condition;(c.callback||function(){return this.chartWidth<=Y(c.maxWidth,Number.MAX_VALUE)&&this.chartHeight<=Y(c.maxHeight,Number.MAX_VALUE)&&this.chartWidth>=Y(c.minWidth,0)&&this.chartHeight>=Y(c.minHeight,0)}).call(this)&&A.push(_._id)}function x(_,A){const c=this.options.responsive;var y=this.currentResponsive;let k=[];!A&&c&&c.rules&&c.rules.forEach(g=>{typeof g._id>"u"&&(g._id=X()),this.matchResponsiveRule(g,k)},this),A=J(...k.map(g=>q((c||{}).rules||[],O=>O._id===g)).map(g=>g&&g.chartOptions)),A.isResponsiveOptions=!0,k=k.toString()||void 0,k!==(y&&y.ruleIds)&&(y&&this.update(y.undoOptions,_,!0),k?(y=P(A,this.options,!0,this.collectionsWithUpdate),y.isResponsiveOptions=!0,this.currentResponsive={ruleIds:k,mergedOptions:A,undoOptions:y},this.update(A,_,!0)):this.currentResponsive=void 0)}const v=[];R.compose=function(_){return B.pushUnique(v,_)&&$(_.prototype,{matchResponsiveRule:N,setResponsive:x}),_}}(C||(C={})),C}),et(w,"masters/highcharts.src.js",[w["Core/Globals.js"],w["Core/Utilities.js"],w["Core/Defaults.js"],w["Core/Animation/Fx.js"],w["Core/Animation/AnimationUtilities.js"],w["Core/Renderer/HTML/AST.js"],w["Core/Templating.js"],w["Core/Renderer/RendererUtilities.js"],w["Core/Renderer/SVG/SVGElement.js"],w["Core/Renderer/SVG/SVGRenderer.js"],w["Core/Renderer/HTML/HTMLElement.js"],w["Core/Renderer/HTML/HTMLRenderer.js"],w["Core/Axis/Axis.js"],w["Core/Axis/DateTimeAxis.js"],w["Core/Axis/LogarithmicAxis.js"],w["Core/Axis/PlotLineOrBand/PlotLineOrBand.js"],w["Core/Axis/Tick.js"],w["Core/Tooltip.js"],w["Core/Series/Point.js"],w["Core/Pointer.js"],w["Core/Legend/Legend.js"],w["Core/Chart/Chart.js"],w["Core/Axis/Stacking/StackingAxis.js"],w["Core/Axis/Stacking/StackItem.js"],w["Core/Series/Series.js"],w["Core/Series/SeriesRegistry.js"],w["Series/Column/ColumnSeries.js"],w["Series/Column/ColumnDataLabel.js"],w["Series/Pie/PieSeries.js"],w["Series/Pie/PieDataLabel.js"],w["Core/Series/DataLabel.js"],w["Core/Responsive.js"],w["Core/Color/Color.js"],w["Core/Time.js"]],function(B,P,$,q,J,Y,X,C,R,N,x,v,_,A,c,y,k,g,O,b,S,o,r,u,h,d,e,t,i,l,p,E,a,L){return B.animate=J.animate,B.animObject=J.animObject,B.getDeferredAnimation=J.getDeferredAnimation,B.setAnimation=J.setAnimation,B.stop=J.stop,B.timers=q.timers,B.AST=Y,B.Axis=_,B.Chart=o,B.chart=o.chart,B.Fx=q,B.Legend=S,B.PlotLineOrBand=y,B.Point=O,B.Pointer=b,B.Series=h,B.StackItem=u,B.SVGElement=R,B.SVGRenderer=N,B.Templating=X,B.Tick=k,B.Time=L,B.Tooltip=g,B.Color=a,B.color=a.parse,v.compose(N),x.compose(R),b.compose(o),S.compose(o),B.defaultOptions=$.defaultOptions,B.getOptions=$.getOptions,B.time=$.defaultTime,B.setOptions=$.setOptions,B.dateFormat=X.dateFormat,B.format=X.format,B.numberFormat=X.numberFormat,B.addEvent=P.addEvent,B.arrayMax=P.arrayMax,B.arrayMin=P.arrayMin,B.attr=P.attr,B.clearTimeout=P.clearTimeout,B.correctFloat=P.correctFloat,B.createElement=P.createElement,B.css=P.css,B.defined=P.defined,B.destroyObjectProperties=P.destroyObjectProperties,B.discardElement=P.discardElement,B.distribute=C.distribute,B.erase=P.erase,B.error=P.error,B.extend=P.extend,B.extendClass=P.extendClass,B.find=P.find,B.fireEvent=P.fireEvent,B.getMagnitude=P.getMagnitude,B.getStyle=P.getStyle,B.inArray=P.inArray,B.isArray=P.isArray,B.isClass=P.isClass,B.isDOMElement=P.isDOMElement,B.isFunction=P.isFunction,B.isNumber=P.isNumber,B.isObject=P.isObject,B.isString=P.isString,B.keys=P.keys,B.merge=P.merge,B.normalizeTickInterval=P.normalizeTickInterval,B.objectEach=P.objectEach,B.offset=P.offset,B.pad=P.pad,B.pick=P.pick,B.pInt=P.pInt,B.relativeLength=P.relativeLength,B.removeEvent=P.removeEvent,B.seriesType=d.seriesType,B.splat=P.splat,B.stableSort=P.stableSort,B.syncTimeout=P.syncTimeout,B.timeUnits=P.timeUnits,B.uniqueKey=P.uniqueKey,B.useSerialIds=P.useSerialIds,B.wrap=P.wrap,t.compose(e),p.compose(h),A.compose(_),c.compose(_),l.compose(i),y.compose(_),E.compose(o),r.compose(_,o,h),g.compose(b),B}),w["masters/highcharts.src.js"]._modules=w,w["masters/highcharts.src.js"]})}(ue)),ue.exports}(function(at,it){(function(et,w){at.exports=w(xo(),ri)})(window,function(et,w){return P=[function(q,J){q.exports=et},function(q,J){q.exports=w},function(q,X,Y){Y.r(X),Y.d(X,"Chart",function(){return g}),Y.d(X,"default",function(){return O});var X=Y(0),C=Y.n(X);function R(b,S){return function o(r,u,h){function d(e,t){!C.a.isObject(e,!h)||C.a.isClass(e)||C.a.isDOMElement(e)?r[t]=u[t]:r[t]=o(r[t]||C.a.isArray(e)?[]:{},e,h)}return C.a.isArray(u)?u.forEach(d):C.a.objectEach(u,d),r}({},b,S)}var N=Y(1);function x(b){return(x=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(S){return typeof S}:function(S){return S&&typeof Symbol=="function"&&S.constructor===Symbol&&S!==Symbol.prototype?"symbol":typeof S})(b)}function v(b){return function(S){if(Array.isArray(S))return _(S)}(b)||function(S){if(typeof Symbol<"u"&&S[Symbol.iterator]!=null||S["@@iterator"]!=null)return Array.from(S)}(b)||function(S,o){var r;if(S)return typeof S=="string"?_(S,o):(r=(r=Object.prototype.toString.call(S).slice(8,-1))==="Object"&&S.constructor?S.constructor.name:r)==="Map"||r==="Set"?Array.from(S):r==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r)?_(S,o):void 0}(b)||function(){throw new TypeError(`Invalid attempt to spread non-iterable instance.
3
3
  In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}()}function _(b,S){(S==null||S>b.length)&&(S=b.length);for(var o=0,r=new Array(S);o<S;o++)r[o]=b[o];return r}function A(b,S){var o,r=Object.keys(b);return Object.getOwnPropertySymbols&&(o=Object.getOwnPropertySymbols(b),S&&(o=o.filter(function(u){return Object.getOwnPropertyDescriptor(b,u).enumerable})),r.push.apply(r,o)),r}function c(b){for(var S=1;S<arguments.length;S++){var o=arguments[S]!=null?arguments[S]:{};S%2?A(Object(o),!0).forEach(function(r){var u,h;u=b,h=o[r=r],(r=function(d){return d=function(e,t){if(x(e)!=="object"||e===null)return e;var i=e[Symbol.toPrimitive];if(i===void 0)return(t==="string"?String:Number)(e);if(i=i.call(e,t||"default"),x(i)!=="object")return i;throw new TypeError("@@toPrimitive must return a primitive value.")}(d,"string"),x(d)==="symbol"?d:String(d)}(r))in u?Object.defineProperty(u,r,{value:h,enumerable:!0,configurable:!0,writable:!0}):u[r]=h}):Object.getOwnPropertyDescriptors?Object.defineProperties(b,Object.getOwnPropertyDescriptors(o)):A(Object(o)).forEach(function(r){Object.defineProperty(b,r,Object.getOwnPropertyDescriptor(o,r))})}return b}var y={template:'<div ref="chart"></div>',props:{constructorType:{type:String,default:"chart"},options:{type:Object,required:!0},callback:Function,updateArgs:{type:Array,default:function(){return[!0,!0]}},highcharts:{type:Object},deepCopyOnUpdate:{type:Boolean,default:!0}}},k=function(b,S){return S.split(".")[0]<3?c(c({},y),{},{render:function(o){return o("div",{ref:"chart"})},beforeDestroy:function(){this.chart&&this.chart.destroy()},watch:{options:{handler:function(o){var r;(r=this.chart).update.apply(r,[R(o,this.deepCopyOnUpdate)].concat(v(this.updateArgs)))},deep:!0}},mounted:function(){var o=this.highcharts||b;this.options&&o[this.constructorType]?this.chart=o[this.constructorType](this.$refs.chart,R(this.options,!0),this.callback||null):this.options?console.warn("'".concat(this.constructorType,"' constructor-type is incorrect. Sometimes this error is caused by the fact, that the corresponding module wasn't imported.")):console.warn('The "options" parameter was not passed.')}}):c(c({},y),{},{render:function(){return Object(N.h)("div",{ref:"chartContainer"})},setup:function(o){var r=Object(N.ref)(null),u=Object(N.shallowRef)({});return Object(N.onMounted)(function(){var h=o.highcharts||b;o.options&&h[o.constructorType]?u.value=h[o.constructorType](r.value,R(o.options,!0),o.callback||null):o.options?console.warn("'".concat(o.constructorType,"' constructor-type is incorrect. Sometimes this error is caused by the fact, that the corresponding module wasn't imported.")):console.warn('The "options" parameter was not passed.')}),Object(N.watch)(function(){return o.options},function(h,d){var e;(e=u.value).update.apply(e,[R(h,o.deepCopyOnUpdate)].concat(v(o.updateArgs)))},{deep:!0}),Object(N.onBeforeUnmount)(function(){u.value&&u.value.destroy()}),{chart:u,chartContainer:r,props:o}}})},g=k(C.a,N.version||Y.n(N).a.version);function O(b){var S=1<arguments.length&&arguments[1]!==void 0?arguments[1]:{};b.component(S.tagName||"highcharts",k(S.highcharts||C.a,b.version))}}],$={},B.m=P,B.c=$,B.d=function(q,J,Y){B.o(q,J)||Object.defineProperty(q,J,{enumerable:!0,get:Y})},B.r=function(q){typeof Symbol<"u"&&Symbol.toStringTag&&Object.defineProperty(q,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(q,"__esModule",{value:!0})},B.t=function(q,J){if(1&J&&(q=B(q)),8&J||4&J&&typeof q=="object"&&q&&q.__esModule)return q;var Y=Object.create(null);if(B.r(Y),Object.defineProperty(Y,"default",{enumerable:!0,value:q}),2&J&&typeof q!="string")for(var X in q)B.d(Y,X,(function(C){return q[C]}).bind(null,X));return Y},B.n=function(q){var J=q&&q.__esModule?function(){return q.default}:function(){return q};return B.d(J,"a",J),J},B.o=function(q,J){return Object.prototype.hasOwnProperty.call(q,J)},B.p="",B(B.s=2);function B(q){var J;return($[q]||(J=$[q]={i:q,l:!1,exports:{}},P[q].call(J.exports,J,J.exports,B),J.l=!0,J)).exports}var P,$})})(Xe);var he=Xe.exports;const yo={class:"w-full",flex:"","flex-col":""},vo={class:"sm:w-full md:w-[92%]","mx-auto":"","px-4":"","py-4":"","lg:px-6":"","lg:py-6":""},ko={grid:"","grid-cols-3":"","gap-10":"","space-y-0":""},bo={class:"mx-auto w-[16rem]","p-6":"","xl:p-8":"",flex:"","flex-col":"",border:"","border-gray-100":"","dark:border-gray-600":"","text-center":"","test-gray-900":"","bg-white":"","dark:bg-gray-800":"","dark:text-white":"",shadow:"","rounded-md":""},So={"mb-4":"","text-2xl":"","font-semibold":""},wo={class:"my-8 flex items-baseline justify-center"},Co={class:"mr-2 text-5xl font-extrabold"},Mo={"mt-8":"","gap-8":"",flex:"","flex-col":""},To=Lt({__name:"Statistics",props:{rank:null},setup(at){const it=at,{t:et}=Kt(),w=kt(()=>it.rank);function B(){const P=[];return P.push({title:"standings.statistics.head_data.problems",data:w.value.contest.problems.length}),P.push({title:"standings.statistics.head_data.teams",data:w.value.teams.length}),P.push({title:"standings.statistics.head_data.submissions",data:w.value.getSubmissions().length}),P}return(P,$)=>(ut(),ft("div",yo,[Z("section",null,[Z("div",vo,[Z("div",ko,[(ut(!0),ft(Ot,null,It(B(),q=>(ut(),ft("div",{key:q.title},[Z("div",bo,[Z("h3",So,mt(U(et)(q.title)),1),Z("div",wo,[Z("span",Co,mt(q.data),1)])])]))),128))])])]),Z("div",Mo,[Z("div",null,[Ct(U(he.Chart),{options:("getSubmitChart"in P?P.getSubmitChart:U(mo))(U(w))},null,8,["options"])]),Z("div",null,[Ct(U(he.Chart),{options:("getProblemChart"in P?P.getProblemChart:U(po))(U(w))},null,8,["options"])]),Z("div",null,[Ct(U(he.Chart),{options:("getTeamChart"in P?P.getTeamChart:U(fo))(U(w))},null,8,["options"])])])]))}}),_o={class:"flex flex-col items-start justify-between p-4 md:flex-row md:items-center space-y-3 md:space-y-0","aria-label":"Table navigation"},Ao={class:"text-sm font-normal text-gray-500 dark:text-gray-400"},Po={class:"font-semibold text-gray-900 dark:text-white"},Oo={class:"font-semibold text-gray-900 dark:text-white"},Lo={class:"inline-flex items-stretch font-mono -space-x-px"},Eo=Z("span",{class:"sr-only"},"Previous",-1),Do=Z("svg",{class:"h-5 w-5","aria-hidden":"true",fill:"currentColor",viewbox:"0 0 20 20",xmlns:"http://www.w3.org/2000/svg"},[Z("path",{"fill-rule":"evenodd",d:"M12.707 5.293a1 1 0 010 1.414L9.414 10l3.293 3.293a1 1 0 01-1.414 1.414l-4-4a1 1 0 010-1.414l4-4a1 1 0 011.414 0z","clip-rule":"evenodd"})],-1),Io=[Eo,Do],jo={key:0},Bo=["onClick"],zo={"aria-current":"page",class:"z-10 flex items-center justify-center border border-primary-300 bg-primary-50 px-3 py-2 text-sm leading-tight text-primary-600 dark:border-gray-700 dark:bg-gray-700 hover:bg-primary-100 dark:text-white hover:text-primary-700",hover:"cursor-pointer"},Ro=["onClick"],No={key:1},$o=Z("span",{class:"sr-only"},"Next",-1),Ho=Z("svg",{class:"h-5 w-5","aria-hidden":"true",fill:"currentColor",viewbox:"0 0 20 20",xmlns:"http://www.w3.org/2000/svg"},[Z("path",{"fill-rule":"evenodd",d:"M7.293 14.707a1 1 0 010-1.414L10.586 10 7.293 6.707a1 1 0 011.414-1.414l4 4a1 1 0 010 1.414l-4 4a1 1 0 01-1.414 0z","clip-rule":"evenodd"})],-1),Go=[$o,Ho],ae="flex items-center justify-center px-3 py-2 text-sm text-gray-500 bg-white border border-gray-300 hover:bg-gray-100 hover:text-gray-700 dark:bg-gray-800 dark:border-gray-700 dark:text-gray-400 dark:hover:bg-gray-700 dark:hover:text-white leading-tight",Fo=Lt({__name:"TablePagination",props:{pagination:null},emits:["update:pagination"],setup(at,{emit:it}){const et=at,w=kt({get(){return et.pagination},set(B){it("update:pagination",B)}});return(B,P)=>(ut(),ft("nav",_o,[Z("span",Ao,[Ht(" Showing "),Z("span",Po,mt(U(w).currentLeft)+"-"+mt(Math.max(0,U(w).currentRight-1)),1),Ht(" of "),Z("span",Oo,mt(U(w).totalSize),1)]),Z("ul",Lo,[Z("li",null,[Z("a",{class:"ml-0 h-full flex items-center justify-center border border-gray-300 rounded-l-lg bg-white px-3 py-1.5 text-gray-500 dark:border-gray-700 dark:bg-gray-800 hover:bg-gray-100 dark:text-gray-400 hover:text-gray-700 dark:hover:bg-gray-700 dark:hover:text-white",hover:"cursor-pointer",onClick:P[0]||(P[0]=$=>U(w).onPageChange({diff:-1}))},Io)]),U(w).currentPage!==0?(ut(),ft("li",jo,[Z("a",{class:At(ae),hover:"cursor-pointer",onClick:P[1]||(P[1]=$=>U(w).onPageChange({to:0}))}," 1 ")])):bt("",!0),(ut(!0),ft(Ot,null,It(U(w).leftDecrPage,$=>(ut(),ft("li",{key:$},[Z("a",{class:At(ae),hover:"cursor-pointer",onClick:q=>U(w).onPageChange({to:$})},mt($+1),9,Bo)]))),128)),Z("li",null,[Z("a",zo,mt(U(w).currentPage+1),1)]),(ut(!0),ft(Ot,null,It(U(w).rightIncrPage,$=>(ut(),ft("li",{key:$},[Z("a",{hover:"cursor-pointer",class:At(ae),onClick:q=>U(w).onPageChange({to:$})},mt($+1),9,Ro)]))),128)),U(w).currentPage!==U(w).totalPage-1&&U(w).totalPage>1?(ut(),ft("li",No,[Z("a",{hover:"cursor-pointer",class:At(ae),onClick:P[2]||(P[2]=$=>U(w).onPageChange({to:U(w).totalPage-1}))},mt(U(w).totalPage),1)])):bt("",!0),Z("li",null,[Z("a",{class:"h-full flex items-center justify-center border border-gray-300 rounded-r-lg bg-white px-3 py-1.5 leading-tight text-gray-500 dark:border-gray-700 dark:bg-gray-800 hover:bg-gray-100 dark:text-gray-400 hover:text-gray-700 dark:hover:bg-gray-700 dark:hover:text-white",hover:"cursor-pointer",onClick:P[3]||(P[3]=$=>U(w).onPageChange({diff:1}))},Go)])])]))}});class Wo{constructor(){re(this,"totalSize");re(this,"currentPage");re(this,"pageSize");this.totalSize=0,this.currentPage=0,this.pageSize=16}get totalPage(){return Math.floor((this.totalSize+this.pageSize-1)/this.pageSize)}get currentLeft(){return this.currentPage*this.pageSize}get currentRight(){return Math.min(this.totalSize,(this.currentPage+1)*this.pageSize)}get leftDecrPage(){const it=[];let et=1,w=this.currentPage-et;for(;w>0;)it.push(w),et=et<<1,w-=et;return it.reverse()}get rightIncrPage(){const it=[];let et=1,w=this.currentPage+et;for(;w+1<this.totalPage;)it.push(w),et=et<<1,w+=et;return it}onPageChange(it){const et=this.totalPage;let w=this.currentPage;if((it==null?void 0:it.to)!==void 0&&(w=it.to),(it==null?void 0:it.diff)!==void 0){const B=it.diff;w=w+B}w<0||w>=et||(this.currentPage=w)}}const ne=at=>(se("data-v-72257074"),at=at(),oe(),at),Xo={"mx-auto":"","w-full":""},Uo={"space-y-3":"",flex:"","flex-col":"","px-4":"","py-3":"","lg:flex-row":"","lg:items-center":"","lg:justify-between":"","lg:space-x-4":"","lg:space-y-0":""},Yo={flex:"","flex-shrink-0":"","flex-col":"","md:flex-row":"","md:items-center":"","lg:justify-end":"","space-y-3":"","md:space-x-3":"","md:space-y-0":""},Vo={key:0,"w-48":""},qo={key:1,"w-48":""},Ko={key:2,"w-68":""},Zo={key:3,"w-48":""},Jo={key:4},Qo=ne(()=>Z("div",{"i-material-symbols-search":"","mr-1":"","h-5":"","w-5":""},null,-1)),tn={class:"overflow-x-auto"},en={class:"w-full text-left text-sm text-gray-500 dark:text-gray-400","font-medium":"","font-mono":""},sn={class:"bg-gray-50 text-xs uppercase text-gray-700 dark:bg-gray-700 dark:text-gray-400"},on=ne(()=>Z("th",{scope:"col",class:"px-4 py-3"}," Problem ",-1)),nn={key:0,scope:"col",class:"px-4 py-3"},rn=ne(()=>Z("th",{scope:"col",class:"px-4 py-3"}," Team ",-1)),an=ne(()=>Z("th",{scope:"col",class:"px-4 py-3"}," Status ",-1)),ln={key:1,scope:"col",class:"px-4 py-3"},hn={key:2,scope:"col",class:"px-4 py-3"},cn={key:3,scope:"col",class:"px-4 py-3"},dn=ne(()=>Z("th",{scope:"col",class:"px-4 py-3"}," Submit Time ",-1)),un={"px-4":"","py-2":""},pn={key:0,class:"whitespace-nowrap px-4 py-2 text-gray-900 dark:text-white"},fn={class:"whitespace-nowrap px-4 py-2 text-gray-900 dark:text-white"},mn={key:1,class:"whitespace-nowrap px-4 py-2 text-gray-900 dark:text-white"},gn={flex:"","items-center":""},xn={key:2,class:"whitespace-nowrap px-4 py-2 text-gray-900 dark:text-white"},yn={key:3,class:"whitespace-nowrap px-4 py-2 text-gray-900 dark:text-white"},vn={flex:"","items-center":""},kn={class:"whitespace-nowrap px-4 py-2 text-gray-900 dark:text-white"},bn={flex:"","items-center":""},Sn=Lt({__name:"SubmissionsTable",props:{rank:null,submissions:null,pageSize:null,removeBorder:{type:Boolean},enableFilter:null},setup(at){const it=at,et=kt(()=>it.rank),w=kt(()=>it.enableFilter),B=kt(()=>{if(!w.value)return!1;for(const[e,t]of Object.entries(w.value))if(t===!0)return!0;return!1}),P=_t({orgNames:[],teamIds:[],languages:[],statuses:[]}),$=kt(()=>et.value.organizations.map(t=>({value:t,text:t}))),q=_t([]),J=_t({});function Y(e,t){q.value=e,J.value=t}const X=kt(()=>et.value.originTeams.map(t=>({value:t.id,text:t.organization?`${t.name} - ${t.organization}`:t.name}))),C=_t([]),R=_t({});function N(e,t){C.value=e,R.value=t}const x=kt(()=>et.value.languages.map(i=>({value:i,text:i}))),v=_t([]),_=_t({});function A(e,t){v.value=e,_.value=t}const c=kt(()=>et.value.statuses.map(i=>({value:i,text:ke[i]}))),y=_t([]),k=_t({});function g(e,t){y.value=e,k.value=t}function O(e){return e.value.toString()}const b=kt(()=>it.submissions.filter(t=>{const i=P.value;if(i.orgNames.length===0&&i.teamIds.length===0&&i.languages.length===0&&i.statuses.length===0)return!0;if(i.teamIds.length>0){for(const l of i.teamIds)if(l===t.teamId)return!0}if(i.orgNames.length>0){const l=et.value.teamsMap.get(t.teamId);for(const p of i.orgNames)if(p===(l==null?void 0:l.organization))return!0}if(i.languages.length>0){for(const l of i.languages)if(l===t.language)return!0}if(i.statuses.length>0){for(const l of i.statuses)if(l===t.status)return!0}return!1}).sort(Ie.compare).reverse());function S(){const e={orgNames:[],teamIds:[],languages:[],statuses:[]};e.orgNames=q.value.map(t=>t.value),e.teamIds=C.value.map(t=>t.value),e.languages=v.value.map(t=>t.value),e.statuses=y.value.map(t=>t.value),P.value=e}const o=_t(new Wo);o.value.currentPage=0,o.value.pageSize=it.pageSize??16,o.value.totalSize=b.value.length,Jt(b,()=>{o.value.totalSize=b.value.length,o.value.currentPage>=o.value.totalPage&&(o.value.currentPage=o.value.totalPage-1)});const r=kt(()=>b.value.slice(o.value.currentLeft,o.value.currentRight)),u=_t(!1);function h(e){const t="bg-primary-100 text-primary-800 dark:bg-primary-900 dark:text-primary-300",i=e.problemId,l=et.value.contest.problemsMap.get(i);if(l==null||!l.balloonColor)return t}function d(e){const t=e.problemId,i=et.value.contest.problemsMap.get(t);if(!(i==null||!i.balloonColor))return{backgroundColor:i.balloonColor.background_color,color:i.balloonColor.color}}return(e,t)=>{var p,E,a,L;const i=ie,l=Fo;return ut(),ft("section",null,[Z("div",Xo,[Z("div",{relative:"","overflow-hidden":"","bg-white":"","dark:bg-gray-800":"",class:At({"shadow-md":it.removeBorder!==!0,"sm:rounded-sm":it.removeBorder!==!0})},[Z("div",Uo,[Z("div",Yo,[U(et).contest.organization&&((p=U(w))!=null&&p.organization)?(ut(),ft("div",Vo,[Ct(U(Zt),{options:U($),"selected-options":U(q),placeholder:U(et).contest.organization,onSelect:Y},null,8,["options","selected-options","placeholder"])])):bt("",!0),(E=U(w))!=null&&E.team?(ut(),ft("div",qo,[Ct(U(Zt),{options:U(X),"selected-options":U(C),placeholder:"Team",onSelect:N},null,8,["options","selected-options"])])):bt("",!0),(a=U(w))!=null&&a.status?(ut(),ft("div",Ko,[Ct(U(Zt),{options:U(c),"selected-options":U(y),placeholder:"Status","custom-attr":O,onSelect:g},null,8,["options","selected-options"])])):bt("",!0),(L=U(w))!=null&&L.language&&U(x).length>0?(ut(),ft("div",Zo,[Ct(U(Zt),{options:U(x),"selected-options":U(v),placeholder:"Language",onSelect:A},null,8,["options","selected-options"])])):bt("",!0),U(B)?(ut(),ft("div",Jo,[Z("button",{type:"button",class:"flex flex-shrink-0 items-center justify-center border border-gray-200 rounded-lg bg-white px-3 py-2 text-sm font-medium text-gray-900 focus:z-10 dark:border-gray-600 dark:bg-gray-800 hover:bg-gray-100 dark:text-gray-400 hover:text-primary-700 focus:outline-none focus:ring-4 focus:ring-gray-200 dark:hover:bg-gray-700 dark:hover:text-white dark:focus:ring-gray-700",onClick:S},[Qo,Ht(" Filter ")])])):bt("",!0)])]),Z("div",tn,[Z("table",en,[Z("thead",sn,[Z("tr",null,[on,U(et).contest.organization?(ut(),ft("th",nn,mt(U(et).contest.organization),1)):bt("",!0),rn,an,U(et).contest.options.submissionHasTimeField?(ut(),ft("th",ln," Time ")):bt("",!0),U(u)?(ut(),ft("th",hn," Memory ")):bt("",!0),U(et).contest.options.submissionHasLanguageField?(ut(),ft("th",cn," Answer ")):bt("",!0),dn])]),Z("tbody",null,[(ut(!0),ft(Ot,null,It(U(r),W=>{var Q,nt,D;return ut(),ft("tr",{key:W.id,class:"border-b dark:border-gray-600 hover:bg-gray-100 dark:hover:bg-gray-700"},[Z("td",un,[Z("span",{class:At(["rounded px-2 py-0.5 text-sm",[h(W)]]),style:Xt(d(W))},mt((Q=U(et).contest.problemsMap.get(W.problemId))==null?void 0:Q.label),7)]),U(et).contest.organization?(ut(),ft("td",pn,mt((nt=U(et).teamsMap.get(W.teamId))==null?void 0:nt.organization),1)):bt("",!0),Z("td",fn,mt((D=U(et).teamsMap.get(W.teamId))==null?void 0:D.name),1),Z("td",{scope:"row",class:At([W.status.toString()]),"whitespace-nowrap":"","px-4":"","py-2":"",flex:"","items-center":"","font-bold":""},mt(U(ke)[W.status]),3),U(et).contest.options.submissionHasTimeField?(ut(),ft("td",mn,[Z("div",gn,mt(`${W.time??0} ms`),1)])):bt("",!0),U(u)?(ut(),ft("td",xn," 0.47 ")):bt("",!0),U(et).contest.options.submissionHasLanguageField?(ut(),ft("td",yn,[Z("div",vn,mt(W.language),1)])):bt("",!0),Z("td",kn,[Z("div",bn,[Ct(i,null,{popper:jt(()=>[Ht(mt(W.timestampDisplayFormatWithMilliSecond),1)]),default:jt(()=>[Ht(mt(W.timestampDisplayFormatWithSecond)+" ",1)]),_:2},1024)])])])}),128))])])]),Ct(l,{pagination:U(o),"onUpdate:pagination":t[0]||(t[0]=W=>zt(o)?o.value=W:null)},null,8,["pagination"])],2)])])}}});const de=Ut(Sn,[["__scopeId","data-v-72257074"]]),xe=at=>(se("data-v-198c3ef3"),at=at(),oe(),at),wn={class:"statistics-0"},Cn=["colspan"],Mn={class:"stnd"},Tn={class:"statistics-1"},_n=["colspan"],An={class:"stnd"},Pn=xe(()=>Z("br",null,null,-1)),On={class:"statistics-0"},Ln=["colspan"],En={class:"stnd"},Dn=xe(()=>Z("br",null,null,-1)),In={class:"statistics-1"},jn=["colspan"],Bn={class:"stnd"},zn=xe(()=>Z("br",null,null,-1)),Rn={class:"statistics-0"},Nn=["colspan"],$n={class:"stnd"},Hn={class:"statistics-1"},Gn=["colspan"],Fn={class:"stnd"},Wn={class:"statistics-0"},Xn=["colspan"],Un={class:"stnd"},Yn=Lt({__name:"BottomStatistics",props:{rank:null},setup(at){const it=at,{t:et}=Kt(),w=kt(()=>it.rank);function B(){let X=3;return w.value.contest.organization&&X++,w.value.contest.badge&&X++,X}function P(X){return X.submittedNum===0?"NaN":`${Math.floor(X.attemptedNum*100/X.submittedNum)}%`}function $(X){return X.submittedNum===0?"NaN":`${Math.floor(X.acceptedNum*100/X.submittedNum)}%`}function q(X){return X.attemptedNum===0?"NaN":`${X.dirt}%`}function J(X){return X.firstSolveSubmissions.length===0?"Null":`${X.firstSolveSubmissions[0].timestampToMinute}`}function Y(X){return X.lastSolveSubmissions.length===0?"Null":`${X.lastSolveSubmissions[0].timestampToMinute}`}return(X,C)=>(ut(),ft(Ot,null,[Z("tr",wn,[Z("td",{class:"empty",colspan:B()},null,8,Cn),Z("td",Mn,[Z("b",null,mt(U(et)("standings.statistics.submitted")),1)]),(ut(!0),ft(Ot,null,It(U(w).contest.problems,R=>(ut(),ft("td",{key:R.id,class:"stnd"},[Z("b",null,mt(R.statistics.submittedNum),1)]))),128))]),Z("tr",Tn,[Z("td",{class:"empty",colspan:B()},null,8,_n),Z("td",An,[Z("b",null,mt(U(et)("standings.statistics.attempted")),1)]),(ut(!0),ft(Ot,null,It(U(w).contest.problems,R=>(ut(),ft("td",{key:R.id,class:"stnd"},[Z("b",null,mt(R.statistics.attemptedNum),1),Pn,Z("b",null," ("+mt(P(R.statistics))+") ",1)]))),128))]),Z("tr",On,[Z("td",{class:"empty",colspan:B()},null,8,Ln),Z("td",En,[Z("b",null,mt(U(et)("standings.statistics.accepted")),1)]),(ut(!0),ft(Ot,null,It(U(w).contest.problems,R=>(ut(),ft("td",{key:R.id,class:"stnd"},[Z("b",null,mt(R.statistics.acceptedNum),1),Dn,Z("b",null," ("+mt($(R.statistics))+") ",1)]))),128))]),Z("tr",In,[Z("td",{class:"empty",colspan:B()},null,8,jn),Z("td",Bn,[Z("b",null,mt(U(et)("standings.statistics.dirt")),1)]),(ut(!0),ft(Ot,null,It(U(w).contest.problems,R=>(ut(),ft("td",{key:R.id,class:"stnd"},[Z("b",null,mt(R.statistics.attemptedNum-R.statistics.acceptedNum),1),zn,Z("b",null," ("+mt(q(R.statistics))+") ",1)]))),128))]),Z("tr",Rn,[Z("td",{class:"empty",colspan:B()},null,8,Nn),Z("td",$n,[Z("b",null,mt(U(et)("standings.statistics.se")),1)]),(ut(!0),ft(Ot,null,It(U(w).contest.problems,R=>(ut(),ft("td",{key:R.id,class:"stnd"},[Z("b",null,mt(R.statistics.se.toFixed(2)),1)]))),128))]),Z("tr",Hn,[Z("td",{class:"empty",colspan:B()},null,8,Gn),Z("td",Fn,[Z("b",null,mt(U(et)("standings.statistics.first_solved")),1)]),(ut(!0),ft(Ot,null,It(U(w).contest.problems,R=>(ut(),ft("td",{key:R.id,class:"stnd"},[Z("b",null,mt(J(R.statistics)),1)]))),128))]),Z("tr",Wn,[Z("td",{class:"empty",colspan:B()},null,8,Xn),Z("td",Un,[Z("b",null,mt(U(et)("standings.statistics.last_solved")),1)]),(ut(!0),ft(Ot,null,It(U(w).contest.problems,R=>(ut(),ft("td",{key:R.id,class:"stnd"},[Z("b",null,mt(Y(R.statistics)),1)]))),128))])],64))}});const Vn=Ut(Yn,[["__scopeId","data-v-198c3ef3"]]),qn={"w-full":"","font-bold":"","font-mono":"",flex:"","items-center":"","justify-center":"",class:"mt-[-12px]"},Kn=Lt({__name:"SubmissionsTableModal",props:{isHidden:{type:Boolean},rank:null,team:null,p:null},emits:["update:isHidden"],setup(at,{emit:it}){const et=at,w=kt({get(){return et.isHidden},set(J){it("update:isHidden",J)}}),B=kt(()=>et.rank),P=kt(()=>et.team),$=kt(()=>et.p),q=kt(()=>`${P.value.name} - ${$.value.problem.label}`);return(J,Y)=>{const X=de,C=ce;return ut(),Nt(C,{isHidden:U(w),"onUpdate:isHidden":Y[0]||(Y[0]=R=>zt(w)?w.value=R:null),title:U(q)},{default:jt(()=>[Z("div",qn,[Ct(X,{"w-full":"",rank:U(B),submissions:U($).submissions,"page-size":8,"remove-border":!0},null,8,["rank","submissions"])])]),_:1},8,["isHidden","title"])}}}),Zn=Lt({__name:"TeamProblemBlock",props:{rank:null,team:null,p:null},setup(at){const it=at,et=_t(!0);function w(){et.value=!1}const B=kt(()=>it.rank),P=kt(()=>it.team),$=kt(()=>it.p);function q(X){return X.isSolved?"+":X.isWrongAnswer?"-":X.isPending?`? ${X.pendingCount}`:""}function J(X){let C="";return X.isUnSubmitted||(C+=`${X.failedCount+Number(X.isSolved)}`),(X.isSolved&&B.value.contest.statusTimeDisplay.correct||X.isPending&&B.value.contest.statusTimeDisplay.pending||X.isWrongAnswer&&B.value.contest.statusTimeDisplay.incorrect)&&(C+=`/${Math.floor(X.lastSubmitTimestamp/60)}`),C}function Y(X){return X.isFirstSolved?"first-solve":X.isSolved?"correct":X.isWrongAnswer?"incorrect":X.isPending?"pending":"unattempted"}return(X,C)=>{const R=Kn;return ut(),ft("td",{class:At(["stnd",[Y(U($))]])},[Z("div",{"cursor-pointer":"",flex:"","flex-col":"","justify-center":"","items-center":"",onClick:w},[Z("div",null,mt(q(U($))),1),Z("div",null,mt(J(U($))),1)]),Z("div",null,[U(et)?bt("",!0):(ut(),Nt(R,{key:0,isHidden:U(et),"onUpdate:isHidden":C[0]||(C[0]=N=>zt(et)?et.value=N:null),rank:U(B),team:U(P),p:U($)},null,8,["isHidden","rank","team","p"]))])],2)}}});const Jn=Ut(Zn,[["__scopeId","data-v-61916fae"]]),Qn={"text-gray-900":"","dark:text-white":"","text-xl":"","font-mono":"","font-semibold":"",italic:"",flex:"","flex-col":"","gap-2":"","justify-center":"","items-center":""},tr={flex:"","flex-col":"","items-start":"","gap-y-2":""},er={key:0},ir={key:1},sr={key:2,flex:"","flex-col":"","gap-2":""},or={key:3},nr=Lt({__name:"TeamAwards",props:{team:null,rank:null},setup(at){const it=at,et=kt(()=>it.team),w=kt(()=>it.rank),B=kt(()=>it.team.problemStatistics.filter(q=>!!q.isFirstSolved).map(q=>q.problem.label).join(",")),P=kt(()=>{const q=it.team.awards;return q.includes(Wt.GOLD)?{text:"Gold"}:q.includes(Wt.SILVER)?{text:"Silver"}:q.includes(Wt.BRONZE)?{text:"Bronze"}:q.includes(Wt.HONORABLE)?{text:"Honorable"}:null}),$=kt(()=>{let q=et.value.rank;return w.value.contest.organization&&(q=et.value.organizationRank),q===1?"1st Place":q===2?"2nd Place":q===3?"3rd Place":""});return(q,J)=>(ut(),ft("div",Qn,[Z("div",tr,[U(P)?(ut(),ft("div",er,mt(U(P).text)+" Medalist ",1)):bt("",!0),U($).length>0?(ut(),ft("div",ir,mt(U($)),1)):bt("",!0),U(B).length?(ut(),ft("div",sr,[Z("div",null," First Solved Problem "+mt(U(B)),1)])):bt("",!0),U(et).solvedProblemNum>0?(ut(),ft("div",or," Solved "+mt(U(et).solvedProblemNum)+" "+mt(U(et).solvedProblemNum>1?"Problems":"Problem"),1)):bt("",!0)])]))}}),rr={role:"group","inline-flex":"","flex-col":"","w-full":"","md:w-auto":"","md:flex-row":"","rounded-md":"","shadow-sm":""},ar=["onClick"],Ue=Lt({__name:"ModalMenu",props:{currentType:null,types:null},emits:["update:currentType"],setup(at,{emit:it}){const et=at,{t:w}=Kt(),B=kt({get(){return et.currentType},set(q){it("update:currentType",q)}});function P(q){B.value=q}const $=kt(()=>et.types.length);return(q,J)=>(ut(),ft("div",rr,[(ut(!0),ft(Ot,null,It(et.types,(Y,X)=>(ut(),ft("button",{key:Y,type:"button","px-4":"","py-2":"","my-2":"","text-sm":"","font-medium":"","text-gray-900":"","bg-white":"","dark:bg-gray-700":"","dark:text-white":"","border-gray-200":"","dark:border-gray-600":"","hover:bg-gray-100":"","dark:hover:bg-gray-600":"","hover:text-primary-700":"","dark:hover:text-white":"","focus:z-10":"","focus:ring-2":"","focus:ring-primary-700":"","focus:text-primary-700":"","dark:focus:ring-primary-500":"","dark:focus:text-white":"",class:At({"rounded-t-lg md:rounded-tr-none md:rounded-l-lg":X===0,"rounded-b-lg md:rounded-bl-none md:rounded-r-lg mr-2":X+1===U($),border:X===0||X+1===U($),"border-t border-x md:border-x-0 md:border-b":X>0&&X+1<U($),"md:border-r-0":X===0,"md:border-l":X>0,"z-10 ring-2 ring-primary-700 text-primary-700 dark:ring-primary-600 dark:text-white":U(B)===Y}),onClick:C=>P(Y)},mt(U(w)(`type_menu.${Y}`)),11,ar))),128))]))}}),lr=["src"],Ye=Lt({__name:"Badge",props:{image:null,widthClass:null},setup(at){const it=at,et=kt(()=>it.image),w=kt(()=>it.widthClass?it.widthClass:"h-8 w-8");return(B,P)=>U(et).base64?(ut(),ft("img",{key:0,src:U(Re)(U(et)),alt:"badge",class:At([U(w)])},null,10,lr)):bt("",!0)}}),hr={"w-full":"","max-w-screen-xl":"","px-4":"","mx-auto":"","lg:px-12":""},cr={relative:"","overflow-hidden":"","bg-white":"","dark:bg-gray-800":""},dr={flex:"","flex-col":"","items-center":"","justify-between":"","md:flex-row":"","space-y-3":"","md:space-y-0":""},ur={flex:"","flex-row":"","space-x-3":""},pr={"text-gray-900":"","dark:text-white":"","text-2xl":"","font-sans":"","font-semibold":"",italic:""},fr={flex:"","flex-col":"","justify-start":"","items-start":""},mr={"w-full":"","font-bold":"","font-mono":"",flex:"","items-center":"","justify-center":""},gr={key:0,"w-full":"",class:"mt-[-12px]"},xr={key:1,"w-full":""},yr={key:2,"w-full":""},Ce="submissions",Me="statistics",Te="awards",vr=Lt({__name:"TeamInfoModal",props:{isHidden:{type:Boolean},rank:null,team:null},emits:["update:isHidden"],setup(at,{emit:it}){const et=at,w=kt({get(){return et.isHidden},set(Y){it("update:isHidden",Y)}}),B=_t("submissions"),P=kt(()=>et.rank),$=kt(()=>et.team),q=kt(()=>{let Y="";return P.value.contest.organization&&$.value.organization.length>0&&(Y+=`${$.value.organization} - `),Y+=`${$.value.name}`,$.value.members&&(Y+=` - ${$.value.members}`),$.value.coach&&(Y+=` - ${$.value.coach}(coach)`),Y}),J=[Ce,Me,Te];return(Y,X)=>{const C=Ye,R=ie,N=Ue,x=de,v=nr,_=ce;return ut(),Nt(_,{isHidden:U(w),"onUpdate:isHidden":X[1]||(X[1]=A=>zt(w)?w.value=A:null)},{header:jt(()=>[Z("div",hr,[Z("div",cr,[Z("div",dr,[Z("div",ur,[U($).badge?(ut(),Nt(C,{key:0,image:U($).badge,"width-class":"h-8 w-8"},null,8,["image"])):bt("",!0),Ct(R,null,{popper:jt(()=>[Z("div",fr,[Z("div",null," TeamID: "+mt(U($).id),1)])]),default:jt(()=>[Z("h3",pr,mt(U(q)),1)]),_:1})]),Ct(N,{"current-type":U(B),"onUpdate:currentType":X[0]||(X[0]=A=>zt(B)?B.value=A:null),types:J},null,8,["current-type"])])])])]),default:jt(()=>[Z("div",mr,[U(B)===Ce?(ut(),ft("div",gr,[Ct(x,{"w-full":"",rank:U(P),submissions:U($).submissions,"page-size":8,"remove-border":!0},null,8,["rank","submissions"])])):bt("",!0),U(B)===Me?(ut(),ft("div",xr,[Ct(U(he.Chart),{options:("getTeamPlaceChart"in Y?Y.getTeamPlaceChart:U(go))(U(P),U($))},null,8,["options"])])):bt("",!0),U(B)===Te?(ut(),ft("div",yr,[Ct(v,{team:U($),rank:U(P)},null,8,["team","rank"])])):bt("",!0)])]),_:1},8,["isHidden"])}}}),kr={},br={class:"color-gray-700 dark:color-gray-200"},Sr=Z("svg",{t:"1685666543416",class:"icon",viewBox:"0 0 1024 1024",version:"1.1",xmlns:"http://www.w3.org/2000/svg","p-id":"3736",width:"16",height:"16"},[Z("path",{d:"M661.333333 662.613333c0.213333 82.133333 28.8 169.386667 64 169.386667v170.666667H298.666667v-170.666667c35.2 0 63.786667-87.253333 64-169.386667a176.256 176.256 0 0 1 21.333333-1.28h21.333333c0 35.413333 47.786667 64 106.666667 64s106.666667-28.586667 106.666667-64h21.333333a176.256 176.256 0 0 1 21.333333 1.28z",fill:"#F3596B","p-id":"3737"}),Z("path",{d:"M810.666667 832v170.666667h-85.333334v-170.666667c-35.2 0-63.786667-87.253333-64-169.386667A170.666667 170.666667 0 0 1 810.666667 832zM362.666667 662.613333c-0.213333 82.133333-28.8 169.386667-64 169.386667v170.666667h-85.333334v-170.666667a170.666667 170.666667 0 0 1 149.333334-169.386667z",fill:"#FFD0AA","p-id":"3738"}),Z("path",{d:"M704 320v-85.333333c0-94.293333-97.706667-170.666667-192-170.666667a42.794667 42.794667 0 0 1 42.666667-42.666667h128a128 128 0 0 1 128 128v234.666667s0 85.333333 85.333333 85.333333c0 0-93.226667 134.613333-228.48 6.186667a166.229333 166.229333 0 0 0 13.866667-49.066667L682.666667 426.666667h21.333333a42.666667 42.666667 0 0 0 0-85.333334h-21.333333v-21.333333z",fill:"#FFCA6B","p-id":"3739"}),Z("path",{d:"M704 234.666667H320c0-94.293333 97.706667-170.666667 192-170.666667s192 76.373333 192 170.666667z",fill:"#FFCA6B","p-id":"3740"}),Z("path",{d:"M704 234.666667v85.333333H320v-85.333333h384z",fill:"#F3596B","p-id":"3741"}),Z("path",{d:"M746.666667 384a42.794667 42.794667 0 0 1-42.666667 42.666667h-21.333333l-1.28-0.213334A172.8 172.8 0 0 0 682.666667 405.333333v-64h21.333333a42.794667 42.794667 0 0 1 42.666667 42.666667zM341.333333 405.333333a172.8 172.8 0 0 0 1.28 21.12L341.333333 426.666667h-21.333333a42.666667 42.666667 0 0 1 0-85.333334h21.333333zM618.666667 661.333333c0 35.413333-47.786667 64-106.666667 64s-106.666667-28.586667-106.666667-64a42.794667 42.794667 0 0 0 42.666667-42.666666v-55.04a171.712 171.712 0 0 0 128 0V618.666667a42.794667 42.794667 0 0 0 42.666667 42.666666z",fill:"#FFD0AA","p-id":"3742"}),Z("path",{d:"M682.666667 341.333333v64a172.8 172.8 0 0 1-1.28 21.12 166.229333 166.229333 0 0 1-13.866667 49.066667A170.474667 170.474667 0 0 1 576 563.626667 170.538667 170.538667 0 0 1 341.333333 405.333333v-85.333333h341.333334z",fill:"#FFD0AA","p-id":"3743"}),Z("path",{d:"M810.666667 1024H213.333333a21.333333 21.333333 0 0 1-21.333333-21.333333v-170.666667a192.213333 192.213333 0 0 1 192-192h21.333333a21.333333 21.333333 0 0 0 21.333334-21.333333v-64h42.666666v64a64 64 0 0 1-64 64h-21.333333a149.504 149.504 0 0 0-149.333333 149.333333v149.333333h554.666666v-149.333333a149.504 149.504 0 0 0-149.333333-149.333333h-21.333333a64 64 0 0 1-64-64v-64h42.666666v64a21.333333 21.333333 0 0 0 21.333334 21.333333h21.333333a192.213333 192.213333 0 0 1 192 192v170.666667a21.333333 21.333333 0 0 1-21.333333 21.333333z",fill:"#2A3244","p-id":"3744"}),Z("path",{d:"M512 597.333333a192.234667 192.234667 0 0 1-192-192v-85.333333a21.333333 21.333333 0 0 1 21.333333-21.333333h341.333334a21.333333 21.333333 0 0 1 21.333333 21.333333v85.333333a192.234667 192.234667 0 0 1-192 192z m-149.333333-256v64a149.333333 149.333333 0 0 0 298.666666 0v-64z",fill:"#2A3244","p-id":"3745"}),Z("path",{d:"M704 448h-21.333333v-42.666667h21.333333a21.333333 21.333333 0 0 0 0-42.666666h-21.333333v-42.666667h21.333333a64 64 0 0 1 0 128zM341.333333 448h-21.333333a64 64 0 0 1 0-128h21.333333v42.666667h-21.333333a21.333333 21.333333 0 0 0 0 42.666666h21.333333z",fill:"#2A3244","p-id":"3746"}),Z("path",{d:"M704 341.333333H320a21.333333 21.333333 0 0 1-21.333333-21.333333v-85.333333a21.333333 21.333333 0 0 1 21.333333-21.333334h384a21.333333 21.333333 0 0 1 21.333333 21.333334v85.333333a21.333333 21.333333 0 0 1-21.333333 21.333333z m-362.666667-42.666666h341.333334v-42.666667H341.333333z",fill:"#2A3244","p-id":"3747"}),Z("path",{d:"M725.333333 234.666667h-42.666666c0-84.096-91.733333-149.333333-170.666667-149.333334s-170.666667 65.237333-170.666667 149.333334h-42.666666c0-109.888 112.618667-192 213.333333-192s213.333333 82.112 213.333333 192z",fill:"#2A3244","p-id":"3748"}),Z("path",{d:"M783.616 552.32c-46.122667 0-92.266667-22.805333-137.365333-67.904l30.165333-30.165333c39.701333 39.701333 78.613333 58.389333 115.648 55.018666a114.282667 114.282667 0 0 0 60.8-26.026666A105.92 105.92 0 0 1 789.333333 384V149.333333a106.794667 106.794667 0 0 0-106.666666-106.666666h-128a21.333333 21.333333 0 0 0-21.333334 21.333333h-42.666666a64 64 0 0 1 64-64h128a149.504 149.504 0 0 1 149.333333 149.333333v234.666667a60.842667 60.842667 0 0 0 64 64 21.333333 21.333333 0 0 1 17.536 33.472 174.72 174.72 0 0 1-117.333333 70.250667 130.133333 130.133333 0 0 1-12.586667 0.597333zM512 746.666667c-71.765333 0-128-37.482667-128-85.333334h42.666667c0 20.138667 36.48 42.666667 85.333333 42.666667s85.333333-22.528 85.333333-42.666667h42.666667c0 47.850667-56.234667 85.333333-128 85.333334zM746.666667 1002.666667h-42.666667v-154.709334c-43.968-23.274667-64-117.333333-64-186.624h42.666667c0 85.333333 29.866667 148.842667 42.666666 149.333334a22.08 22.08 0 0 1 21.333334 21.333333zM320 1002.666667h-42.666667v-170.666667a21.333333 21.333333 0 0 1 21.333334-21.333333c12.8-0.490667 42.666667-64 42.666666-149.333334h42.666667c0 69.354667-20.032 163.349333-64 186.624z",fill:"#2A3244","p-id":"3749"})],-1),wr=[Sr];function Cr(at,it){return ut(),ft("div",br,wr)}const Mr=Ut(kr,[["render",Cr]]),Tr={},_r={class:"color-gray-700 dark:color-gray-200"},Ar=Z("svg",{t:"1685845881484",class:"icon",viewBox:"0 0 1024 1024",version:"1.1",xmlns:"http://www.w3.org/2000/svg","p-id":"4847",width:"16",height:"16"},[Z("path",{d:"M785.352203 933.397493c-4.074805 0-8.151657-0.970094-11.833513-3.007497l-261.311471-142.488225L250.942821 930.388972c-8.343015 4.559852-18.527982 3.8814-26.28669-1.599428-7.760754-5.5279-11.640108-14.987343-10.088776-24.347524l47.578622-285.365306L72.563154 429.470355c-6.594185-6.547113-8.971325-16.295128-6.110161-25.122167 2.814092-8.850575 10.379395-15.397688 19.546172-16.949021l285.512662-47.577598 118.529557-236.989529c4.172019-8.391111 12.803607-13.701047 22.165836-13.701047 9.359158 0 17.992793 5.309936 22.163789 13.701047l118.529557 236.989529 285.511639 47.577598c9.217942 1.551332 16.73208 8.051373 19.593244 16.949021 2.813069 8.875135 0.48607 18.575054-6.109138 25.122167L762.264369 619.077737l47.577598 285.365306c1.50119 9.360182-2.37714 18.819624-10.087753 24.347524C795.487028 931.797042 790.394033 933.397493 785.352203 933.397493zM512.206196 734.747153c4.073782 0 8.196683 0.968048 11.880585 3.006474l228.379431 124.545574-41.268916-247.634983c-1.308809-7.90504 1.257643-16.005532 6.932899-21.63167l164.55787-164.555823-250.398934-41.709961c-7.855922-1.308809-14.549368-6.304589-18.140149-13.408381l-101.942787-203.915249","p-id":"4848"})],-1),Pr=[Ar];function Or(at,it){return ut(),ft("div",_r,Pr)}const Lr=Ut(Tr,[["render",Or]]),Er=at=>(se("data-v-4eb7108c"),at=at(),oe(),at),Dr={key:1,class:"empty flex items-center justify-center"},Ir={flex:""},jr={"float-left":"","pl-2":"","font-serif":""},Br={key:0},zr={"flex-1":""},Rr=Er(()=>Z("div",{"float-right":""},null,-1)),Nr=Lt({__name:"TeamUI",props:{ix:null,rank:null,team:null,isFilter:{type:Boolean},giantsType:null},setup(at){const it=at,et=_t(null),w=ai(et),B=_t(!0);function P(){B.value=!1}const $=kt(()=>it.rank),q=kt(()=>it.team);function J(X,C=!1){if(C){if(X.awards.includes(Wt.GOLD))return"gold";if(X.awards.includes(Wt.SILVER))return"silver";if(X.awards.includes(Wt.BRONZE))return"bronze";if(X.awards.includes(Wt.HONORABLE))return"honorable"}if(it.giantsType!==void 0)switch(it.giantsType){case qt.BLUE:return"bg-blue-400";case qt.RED:return"bg-red-400"}if(it.isFilter)return"filter-team";const R=($.value.rankStatistics.getTeamSolvedNumIndex(X.solvedProblemNum)-1)%2,N=it.ix%2;return`stand${R}${N}`}function Y(){return w.value||it.ix<32}return(X,C)=>{const R=Ye,N=Lr,x=Mr,v=vr,_=Jn;return ut(),ft("tr",{ref_key:"el",ref:et,class:At(["h-10",[it.isFilter?"filter-team":"",it.giantsType!==void 0?J(it.team):""]])},[Y()?(ut(),ft("td",{key:0,class:At(["stnd",[J(U(q),!0)]])},mt(U(q).rank),3)):bt("",!0),U($).contest.badge&&U(q).badge&&Y()?(ut(),ft("td",Dr,[Ct(R,{image:U(q).badge,"width-class":"h-8 w-8"},null,8,["image"])])):bt("",!0),U($).contest.organization&&Y()?(ut(),ft("td",{key:2,class:At(["stnd",[J(U(q))]])},[Z("div",Ir,[Z("div",jr,[U(q).organizationRank>-1?(ut(),ft("div",Br,mt(U(q).organizationRank),1)):bt("",!0)]),Z("div",zr,mt(U(q).organization),1),Rr])],2)):bt("",!0),Y()?(ut(),ft("td",{key:3,class:At(["stnd",[J(U(q))]])},[Z("div",{"cursor-pointer":"",onClick:P},[Z("span",null,mt(U(q).name),1),U(q).group.includes("unofficial")?(ut(),Nt(N,{key:0,"inline-block":""})):bt("",!0),U(q).group.includes("girl")?(ut(),Nt(x,{key:1,"inline-block":""})):bt("",!0)]),Z("div",null,[U(B)?bt("",!0):(ut(),Nt(v,{key:0,isHidden:U(B),"onUpdate:isHidden":C[0]||(C[0]=A=>zt(B)?B.value=A:null),rank:U($),team:U(q)},null,8,["isHidden","rank","team"]))])],2)):bt("",!0),Y()?(ut(),ft("td",{key:4,class:At(["stnd",[J(U(q))]])},mt(U(q).solvedProblemNum),3)):bt("",!0),Y()?(ut(),ft("td",{key:5,class:At(["stnd",[J(U(q))]])},mt(U(q).penaltyToMinute),3)):bt("",!0),(ut(!0),ft(Ot,null,It(U(q).problemStatistics,A=>(ut(),ft(Ot,{key:A.problem.id},[Y()?(ut(),Nt(_,{key:0,rank:U($),team:U(q),p:A},null,8,["rank","team","p"])):bt("",!0)],64))),128)),Y()?(ut(),ft("td",{key:6,class:At(["stnd",[J(U(q))]])},mt(`${U(q).dirt}%`),3)):bt("",!0),Y()?(ut(),ft("td",{key:7,class:At(["stnd",[J(U(q))]])},mt(`${U(q).se.toFixed(2)}`),3)):bt("",!0)],2)}}});const $r=Ut(Nr,[["__scopeId","data-v-4eb7108c"]]),Hr={"w-full":"","max-w-screen-xl":"","px-4":"","mx-auto":"","lg:px-12":""},Gr={relative:"","overflow-hidden":"","bg-white":"","dark:bg-gray-800":""},Fr={flex:"","flex-col":"","items-center":"","justify-between":"","md:flex-row":"","space-y-3":"","md:space-y-0":""},Wr={flex:"","flex-row":"","space-x-3":""},Xr={"text-gray-900":"","dark:text-white":"","text-2xl":"","font-sans":"","font-semibold":"",italic:""},Ur={"w-full":"","font-bold":"","font-mono":"",flex:"","items-center":"","justify-center":""},Yr={key:0,"w-full":"",class:"mt-[-12px]"},Vr={key:1,"w-full":""},qr={key:2,"w-full":""},_e="submissions",Ae="statistics",Pe="awards",Kr=Lt({__name:"ProblemInfoModal",props:{isHidden:{type:Boolean},rank:null,problem:null},emits:["update:isHidden"],setup(at,{emit:it}){const et=at,w=kt({get(){return et.isHidden},set(X){it("update:isHidden",X)}}),B=_t("submissions"),P=kt(()=>et.rank),$=kt(()=>et.problem),q=kt(()=>`Problem ${$.value.label}`),J=kt(()=>P.value.getSubmissions().filter(X=>X.problemId===$.value.id)),Y=[_e,Ae,Pe];return(X,C)=>{const R=Ue,N=de,x=ce;return ut(),Nt(x,{isHidden:U(w),"onUpdate:isHidden":C[1]||(C[1]=v=>zt(w)?w.value=v:null)},{header:jt(()=>[Z("div",Hr,[Z("div",Gr,[Z("div",Fr,[Z("div",Wr,[Z("h3",Xr,mt(U(q)),1)]),Ct(R,{"current-type":U(B),"onUpdate:currentType":C[0]||(C[0]=v=>zt(B)?B.value=v:null),types:Y},null,8,["current-type"])])])])]),default:jt(()=>[Z("div",Ur,[U(B)===_e?(ut(),ft("div",Yr,[Ct(N,{"w-full":"",rank:U(P),submissions:U(J),"page-size":8,"remove-border":!0,"enable-filter":{organization:!0,team:!0,language:!0,status:!0}},null,8,["rank","submissions"])])):bt("",!0),U(B)===Ae?(ut(),ft("div",Vr)):bt("",!0),U(B)===Pe?(ut(),ft("div",qr)):bt("",!0)])]),_:1},8,["isHidden"])}}}),Zr=Lt({__name:"ProblemBlock",props:{rank:null,problem:null},setup(at){const it=at,et=_t(!0);function w(){et.value=!1}const B=kt(()=>it.rank),P=kt(()=>it.problem),$=kt(()=>P.value.balloonColor);return(q,J)=>{const Y=Kr;return ut(),ft("th",{key:U(P).id,class:"success","text-center":"",style:Xt([{width:"3rem"},{"background-color":U($).background_color,color:U($).color}])},[Z("div",{"cursor-pointer":"",flex:"","flex-col":"","justify-center":"","items-center":"",onClick:w},[Z("div",null,mt(U(P).label),1),Z("div",null,mt(U(P).statistics.acceptedNum),1)]),Z("div",null,[U(et)?bt("",!0):(ut(),Nt(Y,{key:0,"is-hidden":U(et),"onUpdate:isHidden":J[0]||(J[0]=X=>zt(et)?et.value=X:null),rank:U(B),problem:U(P)},null,8,["is-hidden","rank","problem"]))])],4)}}});const Jr=Ut(Zr,[["__scopeId","data-v-6d613751"]]),Qr={"text-8xl":"","font-mono":"",flex:"","justify-center":"","items-center":""},ta={flex:"","justify-end":"","items-center":"","text-blue-400":""},ea={flex:"","flex-col":"","items-center":"","justify-center":"","ml-4":""},ia={"text-6xl":""},sa={"text-4xl":""},oa=Z("div",{flex:"","justify-center":"","items-center":"","ml-4":"","mr-4":""}," : ",-1),na={flex:"","justify-start":"","items-center":"","text-red-400":""},ra={flex:"","flex-col":"","items-center":"","justify-center":"","mr-4":""},aa={"text-6xl":""},la={"text-4xl":""},ha=Lt({__name:"GiantsScoreBoard",props:{battleOfGiants:null},setup(at){const it=at,et=kt(()=>it.battleOfGiants);return(w,B)=>(ut(),ft("div",null,[Z("div",Qr,[Z("div",ta,[Z("div",null,mt(U(et).blueTeam.name),1),Z("div",ea,[Z("div",ia,mt(U(et).blueTeam.totalSolvedProblemNum),1),Z("div",sa,mt(U(et).blueTeam.totalPenaltyToString),1)])]),oa,Z("div",na,[Z("div",ra,[Z("div",aa,mt(U(et).redTeam.totalSolvedProblemNum),1),Z("div",la,mt(U(et).redTeam.totalPenaltyToString),1)]),Z("div",null,mt(U(et).redTeam.name),1)])])]))}}),Ve=at=>(se("data-v-84f25c40"),at=at(),oe(),at),ca={key:0,"mb-4":""},da={class:"standings","font-mono":"","dark:text-gray-700":""},ua={class:"sticky top-0 z-99"},pa={class:"title",style:{width:"3rem"}},fa={key:0,class:"title",style:{width:"2rem"}},ma={class:"title",style:{width:"3rem"}},ga={class:"title",style:{width:"4rem"}},xa={class:"title",style:{width:"2.5rem"}},ya=Ve(()=>Z("div",null,[Ht(" number of submits on the "),Z("br"),Ht(" all solved problems / number "),Z("br"),Ht(" of the solved problems ")],-1)),va={class:"title",style:{width:"2.5rem"}},ka=Ve(()=>Z("div",null,[Ht(' "average hardness". '),Z("br"),Ht(" Problem, solved by N teams out of M, "),Z("br"),Ht(" have hardness (M-N)/M. ")],-1)),ba=Lt({__name:"Standings",props:{rank:{}},setup(at){const it=at,{t:et}=Kt(),w=kt(()=>it.rank),B=kt(()=>it.rank.teams),P=kt(()=>it.rank.options),$=kt(()=>it.rank.teams.filter(C=>!!(it.rank.organizations&&it.rank.options.filterOrganizationMap.has(C.organization)||it.rank.options.filterTeamMap.has(C.id)))),q=kt(()=>{const X=P.value.battleOfGiants,C=X.blueTeam,R=X.redTeam;C.teams=[],R.teams=[];let N=0,x=0;for(const _ of it.rank.teams){const A=(()=>C.filterOrganizationMap.has(_.organization)||C.filterTeamMap.has(_.id)?N>=X.topX?null:(N++,qt.BLUE):R.filterOrganizationMap.has(_.organization)||R.filterTeamMap.has(_.id)?x>=X.topX?null:(x++,qt.RED):null)();if(A!==null&&(A===qt.BLUE?C.teams.push(_):R.teams.push(_),N===X.topX&&x===X.topX))break}if(X.equalTeams){for(;C.teams.length<R.teams.length;)R.teams.pop();for(;R.teams.length<C.teams.length;)C.teams.pop()}const v=[...C.teams.map(_=>({team:_,giantsType:qt.BLUE})),...R.teams.map(_=>({team:_,giantsType:qt.RED}))];return v.sort((_,A)=>li.compare(_.team,A.team)),v}),J=kt(()=>{let X=0;return w.value.teams.forEach(C=>{X=Math.max(X,C.organization.length)}),X}),Y=kt(()=>{let X=0;return w.value.teams.forEach(C=>{X=Math.max(X,C.name.length)}),X});return(X,C)=>{const R=ha,N=Jr,x=ie,v=$r,_=Vn;return ut(),ft("div",null,[U(P).battleOfGiants.enable?(ut(),ft("div",ca,[Ct(R,{"battle-of-giants":U(P).battleOfGiants},null,8,["battle-of-giants"])])):bt("",!0),Z("div",null,[Z("table",da,[Z("thead",ua,[Z("tr",null,[Z("th",pa,mt(U(et)("standings.place")),1),U(w).contest.badge?(ut(),ft("th",fa,mt(U(w).contest.badge),1)):bt("",!0),U(w).contest.organization?(ut(),ft("th",{key:1,class:"title",style:Xt({width:`${Math.min(32,Math.ceil(U(J)*1.1))}rem`})},mt(U(w).contest.organization),5)):bt("",!0),Z("th",{class:"title",style:Xt({width:`${Math.min(32,Math.ceil(U(Y)*1))}rem`})},mt(U(et)("standings.team")),5),Z("th",ma,mt(U(et)("standings.solved")),1),Z("th",ga,mt(U(et)("standings.penalty")),1),(ut(!0),ft(Ot,null,It(U(w).contest.problems,A=>(ut(),Nt(N,{key:`problem-block-${A.id}`,rank:U(w),problem:A},null,8,["rank","problem"]))),128)),Z("th",xa,[Ct(x,{placement:"top"},{popper:jt(()=>[ya]),default:jt(()=>[Z("div",null,mt(U(et)("standings.dirt")),1)]),_:1})]),Z("th",va,[Ct(x,{placement:"top"},{popper:jt(()=>[ka]),default:jt(()=>[Z("div",null,mt(U(et)("standings.se")),1)]),_:1})])])]),Z("tbody",null,[U(P).battleOfGiants.enable?(ut(!0),ft(Ot,{key:0},It(U(q),(A,c)=>(ut(),Nt(v,{key:`giant-team-${A.team.id}`,ix:c,rank:U(w),team:A.team,"giants-type":A.giantsType},null,8,["ix","rank","team","giants-type"]))),128)):bt("",!0),(ut(!0),ft(Ot,null,It(U($),(A,c)=>(ut(),Nt(v,{key:`filter-${A.id}`,ix:c,rank:U(w),team:A,"is-filter":!0},null,8,["ix","rank","team"]))),128)),(ut(!0),ft(Ot,null,It(U(B),(A,c)=>(ut(),Nt(v,{key:A.id,ix:c,rank:U(w),team:A},null,8,["ix","rank","team"]))),128)),Ct(_,{rank:U(w)},null,8,["rank"])])])])])}}});const Sa=Ut(ba,[["__scopeId","data-v-84f25c40"]]),wa={"font-mono":"",flex:""},Ca=["onClick"],Ma=["href"],Ta={key:1},_a=Lt({__name:"SecondLevelMenu",props:{items:null,currentItem:null,queryParamName:null,reverseOrder:{type:Boolean},onChange:{type:Function}},emits:["update:currentItem"],setup(at,{emit:it}){const et=at,w=kt(()=>{var C;for(const R of et.items)if(R.isDefault)return R.keyword;return(C=et.items)==null?void 0:C[0].keyword}),B=me(et.queryParamName,w.value,{transform:String}),P=kt({get(){return et.currentItem},set(C){it("update:currentItem",C)}}),{t:$,locale:q}=Kt();function J(C){return C.title?$(C.title):C.titles?C.titles.get(q.value)??C.titles.get(C.defaultLang):""}function Y(C){return P.value===C.keyword}function X(C){et.onChange&&et.onChange(C.keyword),!(C.link||C.isModal)&&(P.value=C.keyword,B.value=C.keyword)}return Ne(()=>{(()=>{var C;((C=B.value)==null?void 0:C.length)>0&&((()=>{for(const R of et.items)if(R.titles){for(const[N,x]of R.titles)if(B.value===x){B.value=R.keyword;return}}})(),P.value=B.value,et.onChange&&et.onChange(B.value))})()}),(C,R)=>(ut(),ft("div",wa,[Z("div",{class:At(["mr-[-4px]",{"flex-row-reverse":et.reverseOrder}]),flex:""},[(ut(!0),ft(Ot,null,It(et.items,N=>(ut(),ft("div",{key:N.keyword,class:At(["second-level-menu-item",[Y(N)?"second-level-menu-item-current":""]]),onClick:x=>X(N)},[Z("div",null,[N.link?(ut(),ft("a",{key:0,href:N.link,target:"_blank",title:"Resolver"},mt(J(N)),9,Ma)):bt("",!0),N.link?bt("",!0):(ut(),ft("div",Ta,mt(J(N)),1))])],10,Ca))),128))],2)]))}});const Aa=Ut(_a,[["__scopeId","data-v-714a998b"]]);const Pa={},Oa={class:"flex items-center justify-center dark:text-black"},La=hi('<table data-v-54297ce8><tbody data-v-54297ce8><tr data-v-54297ce8><td class="gold" data-v-54297ce8> Gold </td><td class="silver" data-v-54297ce8> Silver </td><td class="bronze" data-v-54297ce8> Bronze </td><td class="honorable" data-v-54297ce8> Honorable </td><td class="first-solve" data-v-54297ce8> First to solve problem </td><td class="correct" data-v-54297ce8> Solved problem </td><td class="incorrect" data-v-54297ce8> Attempted problem </td><td class="pending" data-v-54297ce8> Pending judgement </td></tr></tbody></table>',1),Ea=[La];function Da(at,it){return ut(),ft("div",Oa,Ea)}const Ia=Ut(Pa,[["render",Da],["__scopeId","data-v-54297ce8"]]),ja={flex:""},Ba=Z("div",null,[Z("div",{"i-material-symbols-info-outline":"","text-lg":""})],-1),za={flex:""},Ra=Z("div",{class:"border-l-[1px] border-r-[1px]","mx-2":"","h-6":"","border-color-black":"","dark:border-color-white":""},null,-1),Na={flex:""},$a=Lt({__name:"BoardTab",props:{rank:{}},setup(at){const it=at,et=kt(()=>it.rank),{t:w}=Kt(),B=je.useToast(),{copy:P,isSupported:$}=Be();let q=null;const J=_t(null),Y=_t(null);function X(){return window?$.value?!0:(B.warning("clipboard is not supported"),q==null||q.hide(),!1):!1}function C(){B.success("copy success"),q==null||q.hide()}function R(){X()&&(P(window.location.href),C())}function N(){if(!X())return;const x=`<iframe src="${window.location.href}" border="0" frameborder="no" framespacing="0" allowfullscreen="true" style="width: 100%; height: 720px"></iframe>`;P(x),C()}return Ne(()=>{if(J.value&&Y.value){const x={placement:"right",triggerType:"click",offsetSkidding:32,offsetDistance:5,delay:300};q=new ci(J.value,Y.value,x)}}),(x,v)=>{const _=ie;return ut(),ft("div",ja,[Z("div",null,[Ct(_,{"w-inherit":""},{popper:jt(()=>{var A;return[Z("div",za,[Z("div",null,mt(U(w)("standings.options.calculation_of_penalty"))+": "+mt(U(w)(`standings.options.${(A=U(et).contest.options)==null?void 0:A.calculationOfPenalty}`)),1)])]}),default:jt(()=>[Ba]),_:1})]),Ra,Z("div",Na,[Z("div",{ref_key:"dropdownTriggerEl",ref:Y,"i-material-symbols-share":"","text-lg":"","cursor-pointer":""},null,512),Z("div",{ref_key:"dropdownTargetEl",ref:J,class:"z-9999 hidden divide-y divide-gray-100 rounded shadow w-36","bg-white":"","dark:bg-gray-700":""},[Z("ul",{class:"py-2 text-sm text-gray-700 dark:text-gray-200"},[Z("li",null,[Z("div",{class:"block px-4 py-2 hover:bg-gray-100 dark:hover:bg-gray-600 dark:hover:text-white","cursor-pointer":"",onClick:R}," Copy Page Link ")]),Z("li",null,[Z("div",{class:"block px-4 py-2 hover:bg-gray-100 dark:hover:bg-gray-600 dark:hover:text-white","cursor-pointer":"",onClick:N}," Copy Page Code ")])])],512)])])}}}),Ha=at=>(se("data-v-52fb84f5"),at=at(),oe(),at),Ga={key:0},Fa={key:0},Wa={key:0},Xa={class:"max-w-[92%]"},Ua=["src"],Ya={class:"max-w-[92%]"},Va={class:"w-[92%]"},qa={class:"flex font-bold font-mono"},Ka={class:"float-left"},Za={class:"pl-0.5"},Ja={class:"flex-1"},Qa={class:"float-right"},tl={class:"pl-0.5"},el={class:"mt-2"},il={class:"mt-2 flex font-bold font-mono"},sl={class:"float-left"},ol={class:"flex-1"},nl={class:"float-right"},rl={class:"mt-4 flex"},al={class:"float-left"},ll=Ha(()=>Z("div",{class:"flex-1"},null,-1)),hl={class:"float-right"},cl={class:"w-[92%]",flex:"","justify-center":""},dl={key:0},ul={key:1,class:"sm:w-full xl:w-[92%]"},pl={key:2,class:"sm:w-full xl:w-[92%]"},fl={key:3},ml={key:4},gl={key:2},Oe="sm:w-[1280px] xl:w-screen",le="sm:w-[1260px] xl:w-screen",xl=Lt({__name:"Board",props:{dataSourceUrl:null},setup(at){const it=at,et=te(),w=di(be),{t:B}=Kt(),P=_t(!1),$=_t({}),q=_t([]),J=_t([]),Y=_t({}),X=ui(),C=_t(new pi),R=_t(!1);(()=>{const nt=cs(),D=ds();nt.value.length>0&&C.value.setFilterOrganizations(nt.value),D.value.length>0&&C.value.setFilterTeams(D.value)})(),(()=>{const nt=He();nt.value!==null&&nt.value!==void 0&&C.value.battleOfGiants.FromBase64(nt.value)})();const N=_t("all");function x(nt){nt!==C.value.group&&C.value.setGroup(nt)}(()=>{const nt=me("group","all",{transform:String});N.value=nt.value,C.value.setGroup(nt.value)})();const v=me("replay-start-time",0,{transform:Number}),_=_t(!1);function A(nt={force:!1}){if(R.value&&nt.force===!1||_.value===!0)return;_.value=!0;const D=new wi($.value,q.value,J.value);D.options=fe.cloneDeep(C.value),D.setReplayTime(v.value),D.buildRank(),Y.value=D,_.value=!1}const{data:c,isError:y,error:k,refetch:g}=_i(it.dataSourceUrl??et.path,X);Jt(c,async()=>{var nt,D,s;c.value===null||c.value===void 0||($.value=fi((nt=c.value)==null?void 0:nt.contest),w.value=`${$.value.name} | ${be}`,q.value=mi((D=c.value)==null?void 0:D.teams),J.value=gi((s=c.value)==null?void 0:s.submissions),!C.value.enableFilterSubmissionsByTimestamp&&(A(),P.value=!0))});function O(){P.value!==!1&&A()}Jt(C.value,()=>{if(!Y.value.options.isNeedReBuildRank(C.value)){Y.value.options=fe.cloneDeep(C.value);return}O()});{let nt=function(){v.value===0?D():(O(),s())};const{pause:D,resume:s}=xi(()=>{O()},1e3);nt(),Jt(v,()=>{nt()})}const b=_t([{title:"type_menu.rank",keyword:"rank",isDefault:!0},{title:"type_menu.submissions",keyword:"submissions"},{title:"type_menu.statistics",keyword:"statistics"},{title:"type_menu.export",keyword:"export"},{title:"type_menu.utility",keyword:"utility"},{title:"type_menu.options",keyword:"options",isModal:!0}]),S=kt(()=>Y.value.contest.group),o=kt(()=>{const nt=Array();for(const[D,s]of S.value){const M={titles:s.names,defaultLang:s.defaultLang,keyword:D,isDefault:s.isDefault};nt.push(M)}return nt}),r=_t("rank"),u=_t(!0);function h(nt){nt==="options"&&(u.value=!1)}function d(){const nt=document.documentElement.scrollHeight||document.body.scrollHeight,D=document.documentElement.scrollTop||document.body.scrollTop,s=window.innerHeight||document.documentElement.clientHeight||document.body.clientHeight;return nt-D===s}let e=null;function t(){e!==null&&clearInterval(e)}yi("S",nt=>{if(R.value=!R.value,R.value===!0){let s=0,M="DOWN";e=setInterval(()=>{if(M==="DOWN"){if(d()){M="UP",A({force:!0});return}s+=2}else{if(s===0){M="DOWN",A({force:!0});return}s-=2}window.scrollTo({top:s,behavior:"smooth"})},64)}else t()},{dedupe:!1});const i=kt(()=>{const nt=Y.value.contest.getStartTime().format("YYYY-MM-DD HH:mm:ss");return`${B("standings.start_time")}${B("common.colon")}${nt}`}),l=kt(()=>{const nt=Y.value.contest.getEndTime().format("YYYY-MM-DD HH:mm:ss");return`${B("standings.end_time")}${B("common.colon")}${nt}`}),p=kt(()=>{const nt=Y.value.contest.getContestElapsedTime(X.value);return`${B("standings.elapsed")}${B("common.colon")}${nt}`}),E=kt(()=>{const nt=Y.value.contest.getContestRemainingTime(X.value);return`${B("standings.remaining")}${B("common.colon")}${nt}`}),a=kt(()=>Y.value.options.enableFilterSubmissionsByTimestamp?vi.PAUSED:Y.value.contest.getContestState(X.value)),L=kt(()=>ze(Y.value.options.timestamp)),W=Ci(()=>{g()},30*1e3),Q=ki();return Jt(Q,()=>{Q.value!=="hidden"&&W()}),bi(()=>{t()}),(nt,D)=>{const s=$a,M=Mi,z=Ti,j=Ia,K=Aa,n=Sa,f=de,m=To,G=uo,F=Ks,H=Xs,st=Is;return ut(),ft("div",null,[U(P)?bt("",!0):(ut(),ft("div",Ga,[Z("div",{class:At([Oe]),flex:"","flex-col":"","gap-4":"","justify-center":"","items-center":""},[Z("div",null,mt(U(B)("common.loading"))+"... ",1),U(y)?(ut(),ft("div",Fa,mt(U(k)),1)):bt("",!0)],2)])),U(P)?(ut(),ft("div",{key:1,class:At([Oe]),flex:"","flex-col":"","justify-center":"","items-center":""},[U(Y).contest.banner?(ut(),ft("div",Wa,[Z("div",{class:At([le]),flex:"","justify-center":"","items-center":""},[Z("div",Xa,[Z("img",{src:U(Re)(U(Y).contest.banner,`${"DATA_HOST"in nt?nt.DATA_HOST:U(Si)}${U(et).path.slice(1)}`),alt:"banner"},null,8,Ua)])],2)])):bt("",!0),!U(Y).contest.banner||U(Y).contest.banner&&U(Y).contest.bannerMode==="ALL"?(ut(),ft("div",{key:1,class:At(["title",[le]]),flex:"","justify-center":"","text-center":"","text-3xl":"","font-normal":"","font-serif":"","mb-2":""},[Z("div",Ya,mt(U(Y).contest.name),1)],2)):bt("",!0),Z("div",null,[Ct(s,{rank:U(Y)},null,8,["rank"])]),Z("div",{class:At([le]),"mt-2":"",flex:"","flex-row":"","justify-center":""},[Z("div",Va,[Z("div",qa,[Z("div",Ka,[Ht(mt(U(i)),1),Z("sup",Za,mt(U(Y).contest.getStartTime().format("z")),1)]),Z("div",Ja,[Ct(M,{state:U(a),"pending-time":U(Y).contest.getContestPendingTime(U(X)),"paused-time":U(L)},null,8,["state","pending-time","paused-time"])]),Z("div",Qa,[Ht(mt(U(l)),1),Z("sup",tl,mt(U(Y).contest.endTime.format("z")),1)])]),Z("div",el,[Ct(z,{"rank-options":U(C),"onUpdate:rankOptions":D[0]||(D[0]=rt=>zt(C)?C.value=rt:null),width:U(Y).contest.getContestProgressRatio(U(X)),state:U(Y).contest.getContestState(U(X)),"need-scroll":!0,rank:U(Y),"elapsed-time":U(Y).contest.getContestElapsedTime(U(X))},null,8,["rank-options","width","state","rank","elapsed-time"])]),Z("div",il,[Z("div",sl,mt(U(p)),1),Z("div",ol,[Ct(j)]),Z("div",nl,mt(U(E)),1)]),Z("div",rl,[Z("div",al,[Ct(K,{"current-item":U(N),"onUpdate:currentItem":D[1]||(D[1]=rt=>zt(N)?N.value=rt:null),items:U(o),"query-param-name":"group","on-change":x},null,8,["current-item","items"])]),ll,Z("div",hl,[Ct(K,{"current-item":U(r),"onUpdate:currentItem":D[2]||(D[2]=rt=>zt(r)?r.value=rt:null),items:U(b),"reverse-order":!0,"query-param-name":"type","on-change":h},null,8,["current-item","items"])])])])],2),Z("div",{"mt-4":"",class:At([le]),flex:"","justify-center":""},[Z("div",cl,[U(r)==="rank"?(ut(),ft("div",dl,[Ct(n,{rank:U(Y)},null,8,["rank"])])):bt("",!0),U(r)==="submissions"?(ut(),ft("div",ul,[Ct(f,{"w-full":"",rank:U(Y),submissions:U(Y).getSubmissions(),"enable-filter":{organization:!0,team:!0,language:!0,status:!0}},null,8,["rank","submissions"])])):bt("",!0),U(r)==="statistics"?(ut(),ft("div",pl,[Ct(m,{rank:U(Y)},null,8,["rank"])])):bt("",!0),U(r)==="export"?(ut(),ft("div",fl,[Ct(G,{rank:U(Y)},null,8,["rank"])])):bt("",!0),U(r)==="utility"?(ut(),ft("div",ml,[Ct(F,{rank:U(Y)},null,8,["rank"])])):bt("",!0)])],2),U(C).enableAnimatedSubmissions?(ut(),ft("div",gl,[Ct(H,{rank:U(Y)},null,8,["rank"])])):bt("",!0),U(u)?bt("",!0):(ut(),Nt(st,{key:3,"is-hidden":U(u),"onUpdate:isHidden":D[3]||(D[3]=rt=>zt(u)?u.value=rt:null),"rank-options":U(C),"onUpdate:rankOptions":D[4]||(D[4]=rt=>zt(C)?C.value=rt:null),rank:U(Y)},null,8,["is-hidden","rank-options","rank"]))],2)):bt("",!0)])}}});const Sl=Ut(xl,[["__scopeId","data-v-52fb84f5"]]);export{Sl as _};