@silvestv/migration-planificator 5.0.0 → 5.0.2

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.
@@ -1,18 +1,4 @@
1
- "use strict";(()=>{var xc=Object.defineProperty;var _c=(i,t,e)=>t in i?xc(i,t,{enumerable:!0,configurable:!0,writable:!0,value:e}):i[t]=e;var E=(i,t)=>()=>(i&&(t=i(i=0)),t);var vc=(i,t)=>()=>(t||i((t={exports:{}}).exports,t),t.exports);var M=(i,t,e)=>_c(i,typeof t!="symbol"?t+"":t,e);function A(i,t){try{let e=JSON.stringify(t);localStorage.setItem(Js+i,e)}catch(e){console.warn(`Failed to save to localStorage: ${i}`,e)}}function R(i,t){try{let e=localStorage.getItem(Js+i);return e===null?t:JSON.parse(e)}catch(e){return console.warn(`Failed to load from localStorage: ${i}`,e),t}}var Js,He=E(()=>{"use strict";Js="migration-planner-"});var Zs,Qs,ue,to=E(()=>{"use strict";He();Zs="custom-times",Qs="custom-special-times",ue=class{constructor(t){M(this,"state");M(this,"listeners",new Set);this.state={...t}}getState(){return{...this.state}}setState(t){this.state={...this.state,...t},this.notify()}setCustomTime(t,e){this.state.customTimes={...this.state.customTimes,[t]:e},this.saveCustomTimesToStorage(),this.notify()}setCustomSpecialTime(t,e){this.state.customSpecialTimes={...this.state.customSpecialTimes,[t]:e},this.saveCustomTimesToStorage(),this.notify()}resetCustomTime(t){let{[t]:e,...n}=this.state.customTimes;this.state.customTimes=n;let{[t]:s,...o}=this.state.customSpecialTimes;this.state.customSpecialTimes=o,this.saveCustomTimesToStorage(),this.notify()}subscribe(t){return this.listeners.add(t),()=>this.listeners.delete(t)}notify(){let t=this.getState();this.listeners.forEach(e=>e(t))}static loadCustomTimesFromStorage(){return{customTimes:R(Zs,{}),customSpecialTimes:R(Qs,{})}}saveCustomTimesToStorage(){A(Zs,this.state.customTimes),A(Qs,this.state.customSpecialTimes)}resetAllCustomTimes(){this.state.customTimes={},this.state.customSpecialTimes={},this.saveCustomTimesToStorage(),this.notify()}}});function $(i,t=7){let e=Math.round(i/60*100)/100,n=Math.round(e/t*100)/100;return{minutes:i,hours:e,days:n}}function U(i,t=!1){return i.minutes<60?`${i.minutes}min`:i.minutes<420?t?`${i.hours}h (${i.minutes}min)`:`${i.hours}h`:t?`${i.days}j (${i.hours}h)`:`${i.days}j`}var eo=E(()=>{"use strict"});function _i(i,t){let e=new Date(i);return e.setDate(e.getDate()+Math.ceil(t)),e}function Mn(i,t){if(t===0)return new Date(i);let e=new Date(i),n=Math.ceil(t)-1,s=0;for(;s<n;){e.setDate(e.getDate()+1);let o=e.getDay();o!==0&&o!==6&&s++}return e}function Sn(i,t="short"){let e=typeof i=="string"?new Date(i):i;if(t==="iso")return e.toISOString().split("T")[0];if(t==="short"){let n=String(e.getDate()).padStart(2,"0"),s=String(e.getMonth()+1).padStart(2,"0");return`${n}/${s}`}return t==="french"?e.toLocaleDateString("fr-FR",{year:"numeric",month:"2-digit",day:"2-digit",hour:"2-digit",minute:"2-digit"}):e.toLocaleDateString("fr-FR",{year:"numeric",month:"long",day:"numeric"})}var io=E(()=>{"use strict"});function ft(i){let t={"&":"&amp;","<":"&lt;",">":"&gt;",'"':"&quot;","'":"&#039;"};return i.replace(/[&<>"']/g,e=>t[e])}function ze(i,t="blue"){return`<span class="inline-block px-2 py-1 text-xs font-semibold rounded bg-${t}-100 text-${t}-800">${ft(i)}</span>`}var no=E(()=>{"use strict"});function so(i){return!!i.onFile}var oo=E(()=>{"use strict"});function ro(i,t){let e=new Map;for(let n of i){let s=t(n);s!=null&&(e.has(s)||e.set(s,[]),e.get(s).push(n))}return e}var ao=E(()=>{"use strict"});var Kt=E(()=>{"use strict";eo();io();no();oo();ao()});function lo(i,t,e){if(t<=1)return i;let n=Math.ceil(i.minutes/t);return $(n,e)}function kn(i){return Sn(i,"short")}function co(i){return Sn(i,"long")}var he=E(()=>{"use strict";Kt();Kt()});async function uo(i){try{if(navigator.clipboard&&navigator.clipboard.writeText)return await navigator.clipboard.writeText(i),!0;let t=document.createElement("textarea");t.value=i,t.style.position="fixed",t.style.left="-999999px",document.body.appendChild(t),t.select();let e=document.execCommand("copy");return document.body.removeChild(t),e}catch(t){return console.error("Failed to copy to clipboard:",t),!1}}function ho(i,t=2e3){let e=i.textContent||"";i.textContent="\u2713 Copi\xE9 !",i.classList.add("bg-green-500","text-white"),setTimeout(()=>{i.textContent=e,i.classList.remove("bg-green-500","text-white")},t)}var fo=E(()=>{"use strict"});function Mc(i,t,e,n,s){let o=t[i.ruleKey],r=o!==void 0?o:i.minutesPerOccurrence;if(i.type==="combined"||i.type==="special"){let c=r*(i.baseOccurrences||0),u=n.get(i.ruleKey)?.special_workload?.timePerOccurrence||0,h=e[i.ruleKey],f=h!==void 0?h:u,g=(i.specialWorkloadFiles||0)*f,p=c+g,m=$(p,s);return{...i,minutesPerOccurrence:r,specialTimePerFile:f,totalTime:m}}let a=r*i.occurrences,l=$(a,s);return{...i,minutesPerOccurrence:r,totalTime:l}}function Sc(i,t,e,n,s){return i.map(o=>{let r=o.rules.map(l=>Mc(l,t,e,n,s)),a=r.reduce((l,c)=>l+c.totalTime.minutes,0);return{priority:o.priority,totalTime:$(a,s),rules:r}})}function kc(i,t,e,n,s){return i.map(o=>{let r=Sc(o.priorities,t,e,n,s),a=r.reduce((l,c)=>l+c.totalTime.minutes,0);return{migration:o.migration,totalTime:$(a,s),priorities:r}})}function Tc(i,t,e,n,s){return i.map(o=>{let r=kc(o.migrations,t,e,n,s),a=r.reduce((l,c)=>l+c.totalTime.minutes,0);return{targetName:o.targetName,targetType:o.targetType,totalTime:$(a,s),migrations:r}})}function go(i,t,e=7,n=[],s={}){let o=new Map(n.map(l=>[l.key,l])),r=Tc(i.targets,t,s,o,e),a=r.reduce((l,c)=>l+c.totalTime.minutes,0);return{totalTime:$(a,e),projectInfo:i.projectInfo,targets:r,stats:i.stats}}function po(i,t,e){return{original:i.totalTime,adjusted:lo(i.totalTime,t,e)}}var mo=E(()=>{"use strict";he()});function xo(i){wc(i),Ec(i),Hc(i),Rc(i),Oc(i)}function wc(i){let t=i.targets.find(s=>s.targetType==="monorepo"),e=i.targets.filter(s=>s.targetType==="app"),n=i.targets.filter(s=>s.targetType==="lib");!t&&e.length===0&&n.length===0||(Cc(i.targets),bo("applications",e),bo("librairies",n))}function Cc(i){let t=i.reduce((n,s)=>n+s.totalTime.minutes,0),e=document.querySelectorAll("[data-monorepo-total-time]");if(e.length>0){let n=$(t,7),s=U(n);e.forEach(o=>{o.textContent=s})}}function bo(i,t){if(t.length===0)return;let e=t.reduce((s,o)=>s+o.totalTime.minutes,0),n=document.querySelectorAll(`[data-group-time$="-${i}"]`);if(n.length>0){let s=$(e,7),o=U(s);n.forEach(r=>{r.textContent=o})}}function Ec(i){for(let t of i.targets){Lc(t);for(let e of t.migrations){Dc(t.targetName,e);for(let n of e.priorities){Ac(t.targetName,e.migration,n);for(let s of n.rules)Pc(s)}}}}function Lc(i){let t=document.querySelectorAll(`[data-target-time="${i.targetName}"]`);if(t.length>0){let e=U(i.totalTime);t.forEach(n=>{n.textContent=e})}}function Dc(i,t){let e=`${i}-${t.migration}`,n=document.querySelectorAll(`[data-migration-time="${e}"]`);if(n.length>0){let s=U(t.totalTime);n.forEach(o=>{o.textContent=s})}}function Ac(i,t,e){let n=`${i}-${t}-${e.priority}`,s=document.querySelectorAll(`[data-priority-time="${n}"]`);if(s.length>0){let o=U(e.totalTime);s.forEach(r=>{r.textContent=o})}}function Pc(i){document.querySelectorAll(`[data-calc-display="${i.ruleKey}"]`).forEach(e=>{let n=e,s=Ic(n),o=$c(i,s);n.innerHTML=o})}function Rc(i){let t=new Map;i.targets.forEach(o=>t.set(o.targetName,o));let e=i.targets.filter(o=>o.targetType==="app"||o.targetType==="lib");document.querySelectorAll("[data-flat-priority-time]").forEach(o=>{let r=o.getAttribute("data-flat-priority-time");if(!r)return;let a=r.match(/^(.+)-flat-(.+)$/);if(!a)return;let[,l,c]=a,d=0;if(l==="merged-apps-libs")e.forEach(u=>{u.migrations.forEach(h=>{h.priorities.forEach(f=>{f.priority===c&&(d+=f.totalTime.minutes)})})});else{let u=t.get(l);u&&u.migrations.forEach(h=>{h.priorities.forEach(f=>{f.priority===c&&(d+=f.totalTime.minutes)})})}if(d>0){let u=$(d,7);o.textContent=U(u)}}),document.querySelectorAll("[data-flat-migration-time]").forEach(o=>{let r=o.getAttribute("data-flat-migration-time");if(!r)return;let a=r.match(/^(.+)-flat-(to\d+)$/);if(!a)return;let[,l,c]=a,d=0;if(l==="merged-apps-libs")e.forEach(u=>{let h=u.migrations.find(f=>f.migration===c);h&&(d+=h.totalTime.minutes)});else{let u=t.get(l);if(u){let h=u.migrations.find(f=>f.migration===c);h&&(d=h.totalTime.minutes)}}if(d>0){let u=$(d,7);o.textContent=U(u)}})}function Oc(i){let t=i.targets.filter(r=>r.targetType==="app"||r.targetType==="lib");if(t.length===0)return;let e=t.reduce((r,a)=>r+a.totalTime.minutes,0),n=document.querySelectorAll("[data-merged-apps-libs-time]");if(n.length>0){let r=$(e,7),a=U(r);n.forEach(l=>{l.textContent=a})}let s=new Map,o=new Map;t.forEach(r=>{r.migrations.forEach(a=>{let l=a.migration,c=s.get(l)||0;s.set(l,c+a.totalTime.minutes),a.priorities.forEach(d=>{let u=`${a.migration}-${d.priority}`,h=o.get(u)||0;o.set(u,h+d.totalTime.minutes)})})}),s.forEach((r,a)=>{let l=`merged-apps-libs-${a}`,c=document.querySelectorAll(`[data-migration-time="${l}"]`);if(c.length>0){let d=$(r,7),u=U(d);c.forEach(h=>{h.textContent=u})}}),o.forEach((r,a)=>{let[l,c]=a.split("-"),d=`merged-apps-libs-${l}-${c}`,u=document.querySelectorAll(`[data-priority-time="${d}"]`);if(u.length>0){let h=$(r,7),f=U(h);u.forEach(g=>{g.textContent=f})}})}function Ic(i){let e=(i.textContent||"").match(/(\d+)\s*(occ|fichiers|×)/);return e?parseInt(e[1],10):1}function Fc(i,t){return`<input
2
- type="number"
3
- data-time-input="${i}"
4
- data-original-time="${t}"
5
- value="${t}"
6
- min="1"
7
- class="w-14 px-2 py-1 mx-1 border border-gray-300 rounded text-center"
8
- />`}function yo(i,t){return`<input
9
- type="number"
10
- data-special-time-input="${i}"
11
- data-original-special-time="${t}"
12
- value="${t}"
13
- min="1"
14
- class="w-14 px-2 py-1 mx-1 border border-gray-300 rounded text-center"
15
- />`}function Tn(i,t){let e=$(t,7);return`<span class="font-semibold text-gray-900" data-rule-time="${i}">${U(e)}</span>`}function $c(i,t){let e=Fc(i.ruleKey,i.minutesPerOccurrence);if(i.type==="combined"){let o=i.minutesPerOccurrence*t,r=(i.specialWorkloadFiles||0)*(i.specialTimePerFile||0),a=o+r,l=yo(i.ruleKey,i.specialTimePerFile||0);return`${t} occ \xD7 ${e}min + ${i.specialWorkloadFiles||0} fichiers \xD7 ${l}min = ${Tn(i.ruleKey,a)}`}if(i.type==="special"){let o=t*(i.specialTimePerFile||0),r=yo(i.ruleKey,i.specialTimePerFile||0);return`${t} fichiers \xD7 ${r}min = ${Tn(i.ruleKey,o)}`}let n=i.minutesPerOccurrence*t,s=i.type==="routine"?"\xD7":"occ \xD7";return`${t} ${s} ${e}min = ${Tn(i.ruleKey,n)}`}function Hc(i){for(let t of i.targets){let e=new Map;for(let n of t.migrations)for(let s of n.priorities){let o=s.priority,r=e.get(o)||0;e.set(o,r+s.totalTime.minutes)}e.forEach((n,s)=>{let o=t.migrations.map(a=>`${t.targetName}-${a.migration}-${s}`);document.querySelectorAll("span[data-priority-time]").forEach(a=>{let l=o.every(d=>a.getAttribute("data-priority-time")?.includes(d)||Array.from(a.attributes).some(u=>u.name==="data-priority-time"&&u.value===d)),c=Array.from(a.attributes).filter(d=>d.name==="data-priority-time");if(c.length>1){let d=c[0]?.value;if(d&&d.includes(t.targetName)&&d.includes(s)){let u=$(n,7);a.textContent=U(u)}}})})}}var _o=E(()=>{"use strict";he()});function vo(i,t,e,n){let s=new Map;i.targets.forEach(l=>{l.migrations.forEach(c=>{s.has(c.migration)||s.set(c.migration,[]),s.get(c.migration).push(c)})});let o=[],r=[],a=new Date(n);return zc.forEach(l=>{let c=s.get(l);if(!c||c.length===0)return;let{sequentialMinutes:d,parallelizableMinutes:u}=Wc(c),h=d+u,f=d+Math.ceil(u/t),g=Nc(f,e),p=Mn(a,g),m={id:l,label:l.toUpperCase(),duration:g,color:Bc[l]||"#888",startDate:new Date(a),endDate:new Date(p)};o.push(m),r.push({migration:l.toUpperCase(),routineMinutes:d,parallelizableMinutes:u,totalMinutesBeforeDevs:h,totalDaysAfterDevs:g,devCount:t,hoursPerDay:e}),a=p}),{tasks:o,details:r}}function Wc(i){let t=0,e=0;return i.forEach(n=>{n.priorities.forEach(s=>{let o=s.priority==="obligatoire";s.rules.forEach(r=>{if(!r||!r.totalTime){console.warn("[calculateMigrationMinutes] Invalid rule:",r);return}let a=r.totalTime.minutes;o?t+=a:e+=a})})}),{sequentialMinutes:t,parallelizableMinutes:e}}function Nc(i,t){let e=i/60;return Math.round(e/t*100)/100}var zc,Bc,Mo=E(()=>{"use strict";Kt();zc=["to18","to19","to20"],Bc={to18:"#2563eb",to19:"#4f46e5",to20:"#9333ea"}});function So(i,t){let e=null;return function(...s){e!==null&&clearTimeout(e),e=setTimeout(()=>{i(...s),e=null},t)}}function vi(i,t){let{offset:e=20,behavior:n="smooth",highlight:s=!0}=t||{},o=document.querySelector("[data-filter-toggle]")?.parentElement,a=(o?o.offsetHeight:80)+e,c=i.getBoundingClientRect().top+window.scrollY-a;window.scrollTo({top:c,behavior:n}),s&&Vc(i)}function Vc(i){document.querySelectorAll(".filter-highlight").forEach(t=>{t.classList.remove("filter-highlight")}),i.classList.add("filter-highlight")}var ko=E(()=>{"use strict"});function To(i,t){if(["to18","to19","to20"].every(l=>t.includes(l))||t.length===0)return i;let s=jc(i.targets,t),o=qc(s),r=s.reduce((l,c)=>l+c.totalTime.minutes,0),a=$(r,7);return{...i,targets:s,stats:o,totalTime:a}}function jc(i,t){return i.map(e=>{let n=e.migrations.filter(o=>t.includes(o.migration)),s=n.reduce((o,r)=>o+r.totalTime.minutes,0);return{...e,migrations:n,totalTime:$(s,7)}}).filter(e=>e.migrations.length>0)}function qc(i){let t=new Set,e=0,n=0;for(let s of i)for(let o of s.migrations)for(let r of o.priorities)for(let a of r.rules)t.add(a.ruleKey),e+=a.occurrences,a.specialWorkloadFiles!==void 0&&(n+=a.specialWorkloadFiles);return{uniqueRules:t.size,totalOccurrences:e,totalSpecialWorkloadFiles:n}}var wn=E(()=>{"use strict";he()});var st=E(()=>{"use strict";he();He();fo();mo();_o();Mo();ko();wn()});function Cn(){R(Gt,[]).forEach(t=>{let e=document.getElementById(t);if(e){let n=e.querySelector("[data-collapse-content]"),s=e.querySelector("[data-collapse-icon]");n&&n.classList.add("hidden"),s&&(s.textContent="\u25B6")}}),document.addEventListener("click",t=>{let e=t.target.closest("[data-collapse-trigger]");if(!e)return;let n=e.getAttribute("data-collapse-trigger");n&&Yc(n)})}function Yc(i){let t=document.getElementById(i);if(!t)return;let e=t.querySelector("[data-collapse-content]"),n=t.querySelector("[data-collapse-icon]");if(!e)return;let s=e.classList.contains("hidden"),o=R(Gt,[]);if(s){e.classList.remove("hidden"),n&&(n.textContent="\u25BC");let r=o.indexOf(i);r>-1&&o.splice(r,1)}else e.classList.add("hidden"),n&&(n.textContent="\u25B6"),o.includes(i)||o.push(i);A(Gt,o)}function wo(){document.querySelectorAll("[data-collapse-content]").forEach(i=>{i.classList.remove("hidden")}),document.querySelectorAll("[data-collapse-icon]").forEach(i=>{i.textContent="\u25BC"}),A(Gt,[])}function Co(){let i=[];document.querySelectorAll("[data-collapse-content]").forEach(t=>{t.classList.add("hidden");let e=t.closest("[id]");e?.id&&i.push(e.id)}),document.querySelectorAll("[data-collapse-icon]").forEach(t=>{t.textContent="\u25B6"}),A(Gt,i)}function Mi(i){let t=R(Gt,[]),e=i;for(;e;){let n=e.closest("[data-collapse-content]");if(n){let s=n.closest("[id]");if(s?.id){let o=s.querySelector("[data-collapse-content]"),r=s.querySelector("[data-collapse-icon]");if(o?.classList.contains("hidden")){o.classList.remove("hidden"),r&&(r.textContent="\u25BC");let a=t.indexOf(s.id);a>-1&&t.splice(a,1)}}e=n.parentElement}else break}A(Gt,t)}var Gt,Si=E(()=>{"use strict";st();Gt="collapsed-sections"});function Do(){let i=R(Lo,"overview");Eo(i),document.addEventListener("click",t=>{let e=t.target.closest("[data-tab-trigger]");if(!e)return;let n=e.getAttribute("data-tab-trigger");n&&Eo(n)})}function Eo(i){document.querySelectorAll("[data-tab-trigger]").forEach(n=>{n.classList.remove("border-blue-600","text-blue-600","bg-blue-50"),n.classList.add("border-transparent","text-gray-600")}),document.querySelectorAll("[data-tab-content]").forEach(n=>{n.classList.add("hidden")});let t=document.querySelector(`[data-tab-trigger="${i}"]`);t&&(t.classList.remove("border-transparent","text-gray-600"),t.classList.add("border-blue-600","text-blue-600","bg-blue-50"));let e=document.querySelector(`[data-tab-content="${i}"]`);e&&e.classList.remove("hidden"),A(Lo,i)}var Lo,Ao=E(()=>{"use strict";st();Lo="active-tab"});function Po(){document.addEventListener("click",i=>{let t=i.target.closest("[data-modal-trigger]");if(!t)return;let e=t.getAttribute("data-modal-trigger");e&&Uc(e)}),document.addEventListener("click",i=>{i.target.closest("[data-modal-close]")&&En()}),document.addEventListener("click",i=>{i.target.hasAttribute("data-modal-overlay")&&En()}),document.addEventListener("keydown",i=>{i.key==="Escape"&&Be&&En()})}function Uc(i){let t=document.getElementById(i);t&&(t.classList.remove("hidden"),Be=t,document.body.style.overflow="hidden")}function En(){Be&&(Be.classList.add("hidden"),Be=null,document.body.style.overflow="")}function Ro(){document.addEventListener("click",i=>{let t=i.target.closest("[data-vscode-open]");if(!t)return;i.preventDefault();let e=t.getAttribute("data-relative-path"),n=t.getAttribute("data-line-number");if(!e)return;let o=window.__REPORT_DATA__?.workloadReport?.projectInfo?.path;if(!o){console.error("Project root not found in __REPORT_DATA__");return}let r=`${o}/${e}`.replace(/\\/g,"/"),l=`vscode://file/${Kc(r)}${n?":"+n:""}`;window.location.href=l})}function Kc(i){let t=i.replace(/\\/g,"/"),e=t.match(/^([A-Z]):/);return e&&(t=e[1].toLowerCase()+t.substring(1)),t}var Be,Oo=E(()=>{"use strict";Be=null});function Io(){let i=R(Ln,{isExpanded:!1});Gc(i),Xc()}function Gc(i){i.isExpanded?Fo():$o()}function Xc(){let i=document.querySelector("[data-filter-toggle]");i&&i.addEventListener("click",Jc)}function Jc(){let i=document.querySelector("[data-filter-content]");if(!i)return;i.style.maxHeight&&i.style.maxHeight!=="0px"?($o(),A(Ln,{isExpanded:!1})):(Fo(),A(Ln,{isExpanded:!0}))}function Fo(){let i=document.querySelector("[data-filter-content]"),t=document.querySelector("[data-filter-chevron]");i&&(i.style.maxHeight=i.scrollHeight+"px",t&&(t.style.transform="rotate(180deg)"))}function $o(){let i=document.querySelector("[data-filter-content]"),t=document.querySelector("[data-filter-chevron]");i&&(i.style.maxHeight="0",t&&(t.style.transform="rotate(0deg)"))}var Ln,Ho=E(()=>{"use strict";st();Ln="filters-accordion-state"});var ki,Ti,zo,We,Dn=E(()=>{"use strict";ki={critical:{emoji:"\u{1F534}",color:"red",label:"Critical"},high:{emoji:"\u{1F7E0}",color:"orange",label:"High"},medium:{emoji:"\u{1F7E1}",color:"yellow",label:"Medium"},low:{emoji:"\u{1F7E2}",color:"green",label:"Low"}},Ti={environment:{emoji:"\u{1F30D}",color:"blue",label:"Environment"},imports:{emoji:"\u{1F4E6}",color:"indigo",label:"Imports"},api:{emoji:"\u{1F50C}",color:"purple",label:"API"},routing:{emoji:"\u{1F6E3}\uFE0F",color:"pink",label:"Routing"},template:{emoji:"\u{1F4C4}",color:"teal",label:"Template"},test:{emoji:"\u{1F9EA}",color:"cyan",label:"Test"},ssr:{emoji:"\u26A1",color:"amber",label:"SSR"}},zo={standard:{emoji:"\u{1F4CB}",color:"blue",label:"Standard"},routine:{emoji:"\u{1F527}",color:"teal",label:"Routine"},special:{emoji:"\u2B50",color:"pink",label:"Special"},combined:{emoji:"\u{1F500}",color:"purple",label:"Combined"}},We={emoji:"\u{1F3F7}\uFE0F",color:"gray",label:"Unknown"}});function Ne(i){let t=document.querySelector("[data-active-chips-container]"),e=document.querySelector("[data-filter-active-count]");if(!t)return;let n=R(Zc,{riskLevels:[],categories:[],autoFixable:null,ruleTypes:[],searchText:""});t.innerHTML="";let s=[];n.searchText&&s.push(Qc(n.searchText)),n.riskLevels.forEach(r=>{s.push(An("risk",r,ki))}),n.categories.forEach(r=>{s.push(An("category",r,Ti))}),n.ruleTypes.forEach(r=>{s.push(An("type",r,zo))});let o=s.length;if(o<9)s.forEach(r=>t.appendChild(r)),e&&e.classList.add("hidden");else{e&&e.classList.remove("hidden");let r=s.slice(0,Bo),a=o-Bo;r.forEach(l=>t.appendChild(l)),a>0&&t.appendChild(td(a))}ed(i)}function An(i,t,e){let n=e[t]||We,s=document.createElement("div");return s.className=`inline-flex items-center gap-1 px-2 py-1 text-xs font-medium rounded-full bg-${n.color}-100 text-${n.color}-700 hover:bg-${n.color}-200 transition-colors`,s.dataset.filterChip=i,s.dataset.filterValue=t,s.innerHTML=`
1
+ "use strict";(()=>{var kc=Object.defineProperty;var Tc=(i,t,e)=>t in i?kc(i,t,{enumerable:!0,configurable:!0,writable:!0,value:e}):i[t]=e;var C=(i,t)=>()=>(i&&(t=i(i=0)),t);var wc=(i,t)=>()=>(t||i((t={exports:{}}).exports,t),t.exports);var M=(i,t,e)=>Tc(i,typeof t!="symbol"?t+"":t,e);function D(i,t){try{let e=JSON.stringify(t);localStorage.setItem(eo+i,e)}catch(e){console.warn(`Failed to save to localStorage: ${i}`,e)}}function P(i,t){try{let e=localStorage.getItem(eo+i);return e===null?t:JSON.parse(e)}catch(e){return console.warn(`Failed to load from localStorage: ${i}`,e),t}}var eo,We=C(()=>{"use strict";eo="migration-planner-"});var io,no,he,so=C(()=>{"use strict";We();io="custom-times",no="custom-special-times",he=class{constructor(t){M(this,"state");M(this,"listeners",new Set);this.state={...t}}getState(){return{...this.state}}setState(t){this.state={...this.state,...t},this.notify()}setCustomTime(t,e){this.state.customTimes={...this.state.customTimes,[t]:e},this.saveCustomTimesToStorage(),this.notify()}setCustomSpecialTime(t,e){this.state.customSpecialTimes={...this.state.customSpecialTimes,[t]:e},this.saveCustomTimesToStorage(),this.notify()}resetCustomTime(t){let{[t]:e,...n}=this.state.customTimes;this.state.customTimes=n;let{[t]:s,...o}=this.state.customSpecialTimes;this.state.customSpecialTimes=o,this.saveCustomTimesToStorage(),this.notify()}subscribe(t){return this.listeners.add(t),()=>this.listeners.delete(t)}notify(){let t=this.getState();this.listeners.forEach(e=>e(t))}static loadCustomTimesFromStorage(){return{customTimes:P(io,{}),customSpecialTimes:P(no,{})}}saveCustomTimesToStorage(){D(io,this.state.customTimes),D(no,this.state.customSpecialTimes)}resetAllCustomTimes(){this.state.customTimes={},this.state.customSpecialTimes={},this.saveCustomTimesToStorage(),this.notify()}}});function $(i,t=7){let e=Math.round(i/60*100)/100,n=Math.round(e/t*100)/100;return{minutes:i,hours:e,days:n}}function U(i,t=!1){return i.minutes<60?`${i.minutes}min`:i.minutes<420?t?`${i.hours}h (${i.minutes}min)`:`${i.hours}h`:t?`${i.days}j (${i.hours}h)`:`${i.days}j`}var oo=C(()=>{"use strict"});function Mi(i,t){let e=new Date(i);return e.setDate(e.getDate()+Math.ceil(t)),e}function Sn(i,t){if(t===0)return new Date(i);let e=new Date(i),n=Math.ceil(t)-1,s=0;for(;s<n;){e.setDate(e.getDate()+1);let o=e.getDay();o!==0&&o!==6&&s++}return e}function kn(i,t="short"){let e=typeof i=="string"?new Date(i):i;if(t==="iso")return e.toISOString().split("T")[0];if(t==="short"){let n=String(e.getDate()).padStart(2,"0"),s=String(e.getMonth()+1).padStart(2,"0");return`${n}/${s}`}return t==="french"?e.toLocaleDateString("fr-FR",{year:"numeric",month:"2-digit",day:"2-digit",hour:"2-digit",minute:"2-digit"}):e.toLocaleDateString("fr-FR",{year:"numeric",month:"long",day:"numeric"})}var ro=C(()=>{"use strict"});function ft(i){let t={"&":"&amp;","<":"&lt;",">":"&gt;",'"':"&quot;","'":"&#039;"};return i.replace(/[&<>"']/g,e=>t[e])}function Be(i,t="blue"){return`<span class="inline-block px-2 py-1 text-xs font-semibold rounded bg-${t}-100 text-${t}-800">${ft(i)}</span>`}var ao=C(()=>{"use strict"});function lo(i){return!!i.onFile}var co=C(()=>{"use strict"});function uo(i,t){let e=new Map;for(let n of i){let s=t(n);s!=null&&(e.has(s)||e.set(s,[]),e.get(s).push(n))}return e}var ho=C(()=>{"use strict"});var Kt=C(()=>{"use strict";oo();ro();ao();co();ho()});function fo(i,t,e){if(t<=1)return i;let n=Math.ceil(i.minutes/t);return $(n,e)}function Tn(i){return kn(i,"short")}function go(i){return kn(i,"long")}var fe=C(()=>{"use strict";Kt();Kt()});async function po(i){try{if(navigator.clipboard&&navigator.clipboard.writeText)return await navigator.clipboard.writeText(i),!0;let t=document.createElement("textarea");t.value=i,t.style.position="fixed",t.style.left="-999999px",document.body.appendChild(t),t.select();let e=document.execCommand("copy");return document.body.removeChild(t),e}catch(t){return console.error("Failed to copy to clipboard:",t),!1}}function mo(i,t=2e3){let e=i.textContent||"";i.textContent="\u2713 Copi\xE9 !",i.classList.add("bg-green-500","text-white"),setTimeout(()=>{i.textContent=e,i.classList.remove("bg-green-500","text-white")},t)}var bo=C(()=>{"use strict"});function Cc(i,t,e,n,s){let o=t[i.ruleKey],r=o!==void 0?o:i.minutesPerOccurrence;if(i.type==="combined"||i.type==="special"){let c=r*(i.baseOccurrences||0),u=n.get(i.ruleKey)?.special_workload?.timePerOccurrence||0,h=e[i.ruleKey],f=h!==void 0?h:u,g=(i.specialWorkloadFiles||0)*f,p=c+g,m=$(p,s);return{...i,minutesPerOccurrence:r,specialTimePerFile:f,totalTime:m}}let a=r*i.occurrences,l=$(a,s);return{...i,minutesPerOccurrence:r,totalTime:l}}function Ec(i,t,e,n,s){return i.map(o=>{let r=o.rules.map(l=>Cc(l,t,e,n,s)),a=r.reduce((l,c)=>l+c.totalTime.minutes,0);return{priority:o.priority,totalTime:$(a,s),rules:r}})}function Lc(i,t,e,n,s){return i.map(o=>{let r=Ec(o.priorities,t,e,n,s),a=r.reduce((l,c)=>l+c.totalTime.minutes,0);return{migration:o.migration,totalTime:$(a,s),priorities:r}})}function Ac(i,t,e,n,s){return i.map(o=>{let r=Lc(o.migrations,t,e,n,s),a=r.reduce((l,c)=>l+c.totalTime.minutes,0);return{targetName:o.targetName,targetType:o.targetType,totalTime:$(a,s),migrations:r}})}function yo(i,t,e=7,n=[],s={}){let o=new Map(n.map(l=>[l.key,l])),r=Ac(i.targets,t,s,o,e),a=r.reduce((l,c)=>l+c.totalTime.minutes,0);return{totalTime:$(a,e),projectInfo:i.projectInfo,targets:r,stats:i.stats}}function xo(i,t,e){return{original:i.totalTime,adjusted:fo(i.totalTime,t,e)}}var _o=C(()=>{"use strict";fe()});function Mo(i){Dc(i),Rc(i),Bc(i),Hc(i),zc(i)}function Dc(i){let t=i.targets.find(s=>s.targetType==="monorepo"),e=i.targets.filter(s=>s.targetType==="app"),n=i.targets.filter(s=>s.targetType==="lib");!t&&e.length===0&&n.length===0||(Pc(i.targets),vo("applications",e),vo("librairies",n))}function Pc(i){let t=i.reduce((n,s)=>n+s.totalTime.minutes,0),e=document.querySelectorAll("[data-monorepo-total-time]");if(e.length>0){let n=$(t,7),s=U(n);e.forEach(o=>{o.textContent=s})}}function vo(i,t){if(t.length===0)return;let e=t.reduce((s,o)=>s+o.totalTime.minutes,0),n=document.querySelectorAll(`[data-group-time$="-${i}"]`);if(n.length>0){let s=$(e,7),o=U(s);n.forEach(r=>{r.textContent=o})}}function Rc(i){for(let t of i.targets){Oc(t);for(let e of t.migrations){Ic(t.targetName,e);for(let n of e.priorities){Fc(t.targetName,e.migration,n);for(let s of n.rules)$c(s)}}}}function Oc(i){let t=document.querySelectorAll(`[data-target-time="${i.targetName}"]`);if(t.length>0){let e=U(i.totalTime);t.forEach(n=>{n.textContent=e})}}function Ic(i,t){let e=`${i}-${t.migration}`,n=document.querySelectorAll(`[data-migration-time="${e}"]`);if(n.length>0){let s=U(t.totalTime);n.forEach(o=>{o.textContent=s})}}function Fc(i,t,e){let n=`${i}-${t}-${e.priority}`,s=document.querySelectorAll(`[data-priority-time="${n}"]`);if(s.length>0){let o=U(e.totalTime);s.forEach(r=>{r.textContent=o})}}function $c(i){document.querySelectorAll(`[data-calc-display="${i.ruleKey}"]`).forEach(e=>{let n=e,s=Wc(n),o=0;if(i.type==="combined"){let l=i.minutesPerOccurrence*s,c=(i.specialWorkloadFiles||0)*(i.specialTimePerFile||0);o=l+c}else i.type==="special"?o=s*(i.specialTimePerFile||0):o=i.minutesPerOccurrence*s;let r=n.querySelector(`[data-rule-time="${i.ruleKey}"]`);if(r){let l=$(o,7);r.textContent=U(l)}n.querySelectorAll(`[data-time-input="${i.ruleKey}"]`).forEach(l=>{let c=l,d=String(i.minutesPerOccurrence);c.value!==d&&(c.value=d,c.setAttribute("data-original-time",d))}),i.specialTimePerFile!==void 0&&n.querySelectorAll(`[data-special-time-input="${i.ruleKey}"]`).forEach(c=>{let d=c,u=String(i.specialTimePerFile||0);d.value!==u&&(d.value=u,d.setAttribute("data-original-special-time",u))})})}function Hc(i){let t=new Map;i.targets.forEach(o=>t.set(o.targetName,o));let e=i.targets.filter(o=>o.targetType==="app"||o.targetType==="lib");document.querySelectorAll("[data-flat-priority-time]").forEach(o=>{let r=o.getAttribute("data-flat-priority-time");if(!r)return;let a=r.match(/^(.+)-flat-(.+)$/);if(!a)return;let[,l,c]=a,d=0;if(l==="merged-apps-libs")e.forEach(u=>{u.migrations.forEach(h=>{h.priorities.forEach(f=>{f.priority===c&&(d+=f.totalTime.minutes)})})});else{let u=t.get(l);u&&u.migrations.forEach(h=>{h.priorities.forEach(f=>{f.priority===c&&(d+=f.totalTime.minutes)})})}if(d>0){let u=$(d,7);o.textContent=U(u)}}),document.querySelectorAll("[data-flat-migration-time]").forEach(o=>{let r=o.getAttribute("data-flat-migration-time");if(!r)return;let a=r.match(/^(.+)-flat-(to\d+)$/);if(!a)return;let[,l,c]=a,d=0;if(l==="merged-apps-libs")e.forEach(u=>{let h=u.migrations.find(f=>f.migration===c);h&&(d+=h.totalTime.minutes)});else{let u=t.get(l);if(u){let h=u.migrations.find(f=>f.migration===c);h&&(d=h.totalTime.minutes)}}if(d>0){let u=$(d,7);o.textContent=U(u)}})}function zc(i){let t=i.targets.filter(r=>r.targetType==="app"||r.targetType==="lib");if(t.length===0)return;let e=t.reduce((r,a)=>r+a.totalTime.minutes,0),n=document.querySelectorAll("[data-merged-apps-libs-time]");if(n.length>0){let r=$(e,7),a=U(r);n.forEach(l=>{l.textContent=a})}let s=new Map,o=new Map;t.forEach(r=>{r.migrations.forEach(a=>{let l=a.migration,c=s.get(l)||0;s.set(l,c+a.totalTime.minutes),a.priorities.forEach(d=>{let u=`${a.migration}-${d.priority}`,h=o.get(u)||0;o.set(u,h+d.totalTime.minutes)})})}),s.forEach((r,a)=>{let l=`merged-apps-libs-${a}`,c=document.querySelectorAll(`[data-migration-time="${l}"]`);if(c.length>0){let d=$(r,7),u=U(d);c.forEach(h=>{h.textContent=u})}}),o.forEach((r,a)=>{let[l,c]=a.split("-"),d=`merged-apps-libs-${l}-${c}`,u=document.querySelectorAll(`[data-priority-time="${d}"]`);if(u.length>0){let h=$(r,7),f=U(h);u.forEach(g=>{g.textContent=f})}})}function Wc(i){let e=(i.textContent||"").match(/(\d+)\s*(occ|fichiers|×)/);return e?parseInt(e[1],10):1}function Bc(i){for(let t of i.targets){let e=new Map;for(let n of t.migrations)for(let s of n.priorities){let o=s.priority,r=e.get(o)||0;e.set(o,r+s.totalTime.minutes)}e.forEach((n,s)=>{let o=t.migrations.map(a=>`${t.targetName}-${a.migration}-${s}`);document.querySelectorAll("span[data-priority-time]").forEach(a=>{let l=o.every(d=>a.getAttribute("data-priority-time")?.includes(d)||Array.from(a.attributes).some(u=>u.name==="data-priority-time"&&u.value===d)),c=Array.from(a.attributes).filter(d=>d.name==="data-priority-time");if(c.length>1){let d=c[0]?.value;if(d&&d.includes(t.targetName)&&d.includes(s)){let u=$(n,7);a.textContent=U(u)}}})})}}var So=C(()=>{"use strict";fe()});function ko(i,t,e,n){let s=new Map;i.targets.forEach(l=>{l.migrations.forEach(c=>{s.has(c.migration)||s.set(c.migration,[]),s.get(c.migration).push(c)})});let o=[],r=[],a=new Date(n);return Nc.forEach(l=>{let c=s.get(l);if(!c||c.length===0)return;let{sequentialMinutes:d,parallelizableMinutes:u}=jc(c),h=d+u,f=d+Math.ceil(u/t),g=qc(f,e),p=Sn(a,g),m={id:l,label:l.toUpperCase(),duration:g,color:Vc[l]||"#888",startDate:new Date(a),endDate:new Date(p)};o.push(m),r.push({migration:l.toUpperCase(),routineMinutes:d,parallelizableMinutes:u,totalMinutesBeforeDevs:h,totalDaysAfterDevs:g,devCount:t,hoursPerDay:e}),a=p}),{tasks:o,details:r}}function jc(i){let t=0,e=0;return i.forEach(n=>{n.priorities.forEach(s=>{let o=s.priority==="obligatoire";s.rules.forEach(r=>{if(!r||!r.totalTime){console.warn("[calculateMigrationMinutes] Invalid rule:",r);return}let a=r.totalTime.minutes;o?t+=a:e+=a})})}),{sequentialMinutes:t,parallelizableMinutes:e}}function qc(i,t){let e=i/60;return Math.round(e/t*100)/100}var Nc,Vc,To=C(()=>{"use strict";Kt();Nc=["to18","to19","to20"],Vc={to18:"#2563eb",to19:"#4f46e5",to20:"#9333ea"}});function Gt(i,t){let e=null;return function(...s){e!==null&&clearTimeout(e),e=setTimeout(()=>{i(...s),e=null},t)}}function Si(i,t){let{offset:e=20,behavior:n="smooth",highlight:s=!0}=t||{},o=document.querySelector("[data-filter-toggle]")?.parentElement,a=(o?o.offsetHeight:80)+e,c=i.getBoundingClientRect().top+window.scrollY-a;window.scrollTo({top:c,behavior:n}),s&&Yc(i)}function Yc(i){document.querySelectorAll(".filter-highlight").forEach(t=>{t.classList.remove("filter-highlight")}),i.classList.add("filter-highlight")}var wn=C(()=>{"use strict"});function wo(i,t){if(["to18","to19","to20"].every(l=>t.includes(l))||t.length===0)return i;let s=Uc(i.targets,t),o=Kc(s),r=s.reduce((l,c)=>l+c.totalTime.minutes,0),a=$(r,7);return{...i,targets:s,stats:o,totalTime:a}}function Uc(i,t){return i.map(e=>{let n=e.migrations.filter(o=>t.includes(o.migration)),s=n.reduce((o,r)=>o+r.totalTime.minutes,0);return{...e,migrations:n,totalTime:$(s,7)}}).filter(e=>e.migrations.length>0)}function Kc(i){let t=new Set,e=0,n=0;for(let s of i)for(let o of s.migrations)for(let r of o.priorities)for(let a of r.rules)t.add(a.ruleKey),e+=a.occurrences,a.specialWorkloadFiles!==void 0&&(n+=a.specialWorkloadFiles);return{uniqueRules:t.size,totalOccurrences:e,totalSpecialWorkloadFiles:n}}var Cn=C(()=>{"use strict";fe()});function En(){let i=Co();return i?Array.from(i.querySelectorAll("[data-rule-card]")):Array.from(document.querySelectorAll("[data-rule-card]"))}function ki(){let i=Co();return i?Array.from(i.querySelectorAll("[data-rule-card].filter-match")):Array.from(document.querySelectorAll("[data-rule-card].filter-match"))}function Co(){let i=document.querySelectorAll("[data-view-mode]");for(let t of i)if(!(t.style.display==="none"))return t;return null}var Eo=C(()=>{"use strict"});var tt=C(()=>{"use strict";fe();We();bo();_o();So();To();wn();Cn();Eo()});function Ln(){P(Xt,[]).forEach(t=>{let e=document.getElementById(t);if(e){let n=e.querySelector("[data-collapse-content]"),s=e.querySelector("[data-collapse-icon]");n&&n.classList.add("hidden"),s&&(s.textContent="\u25B6")}}),document.addEventListener("click",t=>{let e=t.target.closest("[data-collapse-trigger]");if(!e)return;let n=e.getAttribute("data-collapse-trigger");n&&Gc(n)})}function Gc(i){let t=document.getElementById(i);if(!t)return;let e=t.querySelector("[data-collapse-content]"),n=t.querySelector("[data-collapse-icon]");if(!e)return;let s=e.classList.contains("hidden"),o=P(Xt,[]);if(s){e.classList.remove("hidden"),n&&(n.textContent="\u25BC");let r=o.indexOf(i);r>-1&&o.splice(r,1)}else e.classList.add("hidden"),n&&(n.textContent="\u25B6"),o.includes(i)||o.push(i);D(Xt,o)}function Lo(){document.querySelectorAll("[data-collapse-content]").forEach(i=>{i.classList.remove("hidden")}),document.querySelectorAll("[data-collapse-icon]").forEach(i=>{i.textContent="\u25BC"}),D(Xt,[])}function Ao(){let i=[];document.querySelectorAll("[data-collapse-content]").forEach(t=>{t.classList.add("hidden");let e=t.closest("[id]");e?.id&&i.push(e.id)}),document.querySelectorAll("[data-collapse-icon]").forEach(t=>{t.textContent="\u25B6"}),D(Xt,i)}function Ti(i){let t=P(Xt,[]),e=i;for(;e;){let n=e.closest("[data-collapse-content]");if(n){let s=n.closest("[id]");if(s?.id){let o=s.querySelector("[data-collapse-content]"),r=s.querySelector("[data-collapse-icon]");if(o?.classList.contains("hidden")){o.classList.remove("hidden"),r&&(r.textContent="\u25BC");let a=t.indexOf(s.id);a>-1&&t.splice(a,1)}}e=n.parentElement}else break}D(Xt,t)}var Xt,wi=C(()=>{"use strict";tt();Xt="collapsed-sections"});function Ro(){let i=P(Po,"overview");Do(i),document.addEventListener("click",t=>{let e=t.target.closest("[data-tab-trigger]");if(!e)return;let n=e.getAttribute("data-tab-trigger");n&&Do(n)})}function Do(i){document.querySelectorAll("[data-tab-trigger]").forEach(n=>{n.classList.remove("border-blue-600","text-blue-600","bg-blue-50"),n.classList.add("border-transparent","text-gray-600")}),document.querySelectorAll("[data-tab-content]").forEach(n=>{n.classList.add("hidden")});let t=document.querySelector(`[data-tab-trigger="${i}"]`);t&&(t.classList.remove("border-transparent","text-gray-600"),t.classList.add("border-blue-600","text-blue-600","bg-blue-50"));let e=document.querySelector(`[data-tab-content="${i}"]`);e&&e.classList.remove("hidden"),D(Po,i)}var Po,Oo=C(()=>{"use strict";tt();Po="active-tab"});function Io(){document.addEventListener("click",i=>{let t=i.target.closest("[data-modal-trigger]");if(!t)return;let e=t.getAttribute("data-modal-trigger");e&&Xc(e)}),document.addEventListener("click",i=>{i.target.closest("[data-modal-close]")&&An()}),document.addEventListener("click",i=>{i.target.hasAttribute("data-modal-overlay")&&An()}),document.addEventListener("keydown",i=>{i.key==="Escape"&&Ne&&An()})}function Xc(i){let t=document.getElementById(i);t&&(t.classList.remove("hidden"),Ne=t,document.body.style.overflow="hidden")}function An(){Ne&&(Ne.classList.add("hidden"),Ne=null,document.body.style.overflow="")}function Fo(){document.addEventListener("click",i=>{let t=i.target.closest("[data-vscode-open]");if(!t)return;i.preventDefault();let e=t.getAttribute("data-relative-path"),n=t.getAttribute("data-line-number");if(!e)return;let o=window.__REPORT_DATA__?.workloadReport?.projectInfo?.path;if(!o){console.error("Project root not found in __REPORT_DATA__");return}let r=`${o}/${e}`.replace(/\\/g,"/"),l=`vscode://file/${Jc(r)}${n?":"+n:""}`;window.location.href=l})}function Jc(i){let t=i.replace(/\\/g,"/"),e=t.match(/^([A-Z]):/);return e&&(t=e[1].toLowerCase()+t.substring(1)),t}var Ne,$o=C(()=>{"use strict";Ne=null});function Ho(){let i=P(Dn,{isExpanded:!1});Zc(i),Qc()}function Zc(i){i.isExpanded?zo():Wo()}function Qc(){let i=document.querySelector("[data-filter-toggle]");i&&i.addEventListener("click",td)}function td(){let i=document.querySelector("[data-filter-content]");if(!i)return;i.style.maxHeight&&i.style.maxHeight!=="0px"?(Wo(),D(Dn,{isExpanded:!1})):(zo(),D(Dn,{isExpanded:!0}))}function zo(){let i=document.querySelector("[data-filter-content]"),t=document.querySelector("[data-filter-chevron]");i&&(i.style.maxHeight=i.scrollHeight+"px",t&&(t.style.transform="rotate(180deg)"))}function Wo(){let i=document.querySelector("[data-filter-content]"),t=document.querySelector("[data-filter-chevron]");i&&(i.style.maxHeight="0",t&&(t.style.transform="rotate(0deg)"))}var Dn,Bo=C(()=>{"use strict";tt();Dn="filters-accordion-state"});var Ci,Ei,No,Ve,Pn=C(()=>{"use strict";Ci={critical:{emoji:"\u{1F534}",color:"red",label:"Critical"},high:{emoji:"\u{1F7E0}",color:"orange",label:"High"},medium:{emoji:"\u{1F7E1}",color:"yellow",label:"Medium"},low:{emoji:"\u{1F7E2}",color:"green",label:"Low"}},Ei={environment:{emoji:"\u{1F30D}",color:"blue",label:"Environment"},imports:{emoji:"\u{1F4E6}",color:"indigo",label:"Imports"},api:{emoji:"\u{1F50C}",color:"purple",label:"API"},routing:{emoji:"\u{1F6E3}\uFE0F",color:"pink",label:"Routing"},template:{emoji:"\u{1F4C4}",color:"teal",label:"Template"},test:{emoji:"\u{1F9EA}",color:"cyan",label:"Test"},ssr:{emoji:"\u26A1",color:"amber",label:"SSR"}},No={standard:{emoji:"\u{1F4CB}",color:"blue",label:"Standard"},routine:{emoji:"\u{1F527}",color:"teal",label:"Routine"},special:{emoji:"\u2B50",color:"pink",label:"Special"},combined:{emoji:"\u{1F500}",color:"purple",label:"Combined"}},Ve={emoji:"\u{1F3F7}\uFE0F",color:"gray",label:"Unknown"}});function je(i){let t=document.querySelector("[data-active-chips-container]"),e=document.querySelector("[data-filter-active-count]");if(!t)return;let n=P(ed,{riskLevels:[],categories:[],autoFixable:null,ruleTypes:[],searchText:""});t.innerHTML="";let s=[];n.searchText&&s.push(id(n.searchText)),n.riskLevels.forEach(r=>{s.push(Rn("risk",r,Ci))}),n.categories.forEach(r=>{s.push(Rn("category",r,Ei))}),n.ruleTypes.forEach(r=>{s.push(Rn("type",r,No))});let o=s.length;if(o<9)s.forEach(r=>t.appendChild(r)),e&&e.classList.add("hidden");else{e&&e.classList.remove("hidden");let r=s.slice(0,Vo),a=o-Vo;r.forEach(l=>t.appendChild(l)),a>0&&t.appendChild(nd(a))}sd(i)}function Rn(i,t,e){let n=e[t]||Ve,s=document.createElement("div");return s.className=`inline-flex items-center gap-1 px-2 py-1 text-xs font-medium rounded-full bg-${n.color}-100 text-${n.color}-700 hover:bg-${n.color}-200 transition-colors`,s.dataset.filterChip=i,s.dataset.filterValue=t,s.innerHTML=`
16
2
  <span>${n.emoji}</span>
17
3
  <span>${n.label}</span>
18
4
  <button
@@ -24,7 +10,7 @@
24
10
  <path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M6 18L18 6M6 6l12 12"/>
25
11
  </svg>
26
12
  </button>
27
- `,s}function Qc(i){let t=document.createElement("div");return t.className="inline-flex items-center gap-1 px-2 py-1 text-xs font-medium rounded-full bg-gray-100 text-gray-700 hover:bg-gray-200 transition-colors",t.dataset.filterChip="search",t.innerHTML=`
13
+ `,s}function id(i){let t=document.createElement("div");return t.className="inline-flex items-center gap-1 px-2 py-1 text-xs font-medium rounded-full bg-gray-100 text-gray-700 hover:bg-gray-200 transition-colors",t.dataset.filterChip="search",t.innerHTML=`
28
14
  <span>\u{1F50E}</span>
29
15
  <span class="max-w-32 truncate">"${i}"</span>
30
16
  <button
@@ -36,9 +22,9 @@
36
22
  <path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M6 18L18 6M6 6l12 12"/>
37
23
  </svg>
38
24
  </button>
39
- `,t}function td(i){let t=document.createElement("div");return t.className="inline-flex items-center px-2 py-1 text-xs font-semibold rounded-full bg-gray-200 text-gray-700",t.textContent=`+${i}`,t}function ed(i){document.querySelectorAll("[data-remove-filter]").forEach(t=>{t.addEventListener("click",e=>{e.stopPropagation();let n=t.dataset.removeFilter;n&&i(n)})})}var Zc,Bo,Wo=E(()=>{"use strict";st();Dn();Zc="active-filters",Bo=8});function No(){id(),wi()}function id(){let i=document.querySelector("[data-filter-prev]"),t=document.querySelector("[data-filter-next]");i&&i.addEventListener("click",()=>nd()),t&&t.addEventListener("click",()=>sd())}function nd(){let i=Pn();i.length!==0&&(_t=(_t-1+i.length)%i.length,Vo(i[_t]),wi())}function sd(){let i=Pn();i.length!==0&&(_t=(_t+1)%i.length,Vo(i[_t]),wi())}function Pn(){return Array.from(document.querySelectorAll("[data-rule-card].filter-match"))}function Vo(i){Mi(i),setTimeout(()=>{vi(i,{offset:20,behavior:"smooth",highlight:!0})},50)}function wi(){let t=Pn().length;_t>=t&&(_t=0);let e=document.querySelector("[data-filter-position]");e&&(t>0?e.textContent=`${_t+1} / ${t}`:e.textContent="0 / 0");let n=document.querySelector("[data-filter-prev]"),s=document.querySelector("[data-filter-next]");n&&(n.disabled=t===0),s&&(s.disabled=t===0)}function jo(){_t=0,wi()}var _t,qo=E(()=>{"use strict";st();Si();_t=0});function Yo(){let i=R(fe,Ve);Io(),No(),rd(i),Ei(i),Li(),Ne(Di),ad()}function rd(i){i.riskLevels.forEach(e=>{let n=document.querySelector(`[data-filter-risk="${e}"]`);n&&(n.checked=!0)}),i.categories.forEach(e=>{let n=document.querySelector(`[data-filter-category="${e}"]`);n&&(n.checked=!0)}),i.ruleTypes.forEach(e=>{let n=document.querySelector(`[data-filter-type="${e}"]`);n&&(n.checked=!0)});let t=document.querySelector("[data-filter-search]");t&&(t.value=i.searchText)}function ad(){document.querySelectorAll("[data-filter-risk]").forEach(e=>{e.addEventListener("change",Ci)}),document.querySelectorAll("[data-filter-category]").forEach(e=>{e.addEventListener("change",Ci)}),document.querySelectorAll("[data-filter-type]").forEach(e=>{e.addEventListener("change",Ci)});let i=document.querySelector("[data-filter-search]");i&&i.addEventListener("input",Ci);let t=document.querySelector("[data-filter-clear]");t&&t.addEventListener("click",cd)}function Ci(){let i={riskLevels:Rn("[data-filter-risk]"),categories:Rn("[data-filter-category]"),autoFixable:null,ruleTypes:Rn("[data-filter-type]"),searchText:document.querySelector("[data-filter-search]")?.value||""};A(fe,i),Ei(i),Li(),Ne(Di)}function Rn(i){let t=[];return document.querySelectorAll(i).forEach(e=>{let n=e;if(n.checked){let s=n.getAttribute(i.slice(1,-1));s&&t.push(s)}}),t}function Ei(i){let t=document.querySelectorAll("[data-rule-card]"),e=null;t.forEach(n=>{let s=n,o=s.dataset.riskLevel,r=s.dataset.category,a=s.dataset.ruleType,l=s.dataset.title?.toLowerCase()||"",c=!0;i.riskLevels.length>0&&o&&(c=c&&i.riskLevels.includes(o)),i.categories.length>0&&r&&(c=c&&i.categories.includes(r)),i.ruleTypes.length>0&&a&&(c=c&&i.ruleTypes.includes(a)),i.searchText&&(c=c&&l.includes(i.searchText.toLowerCase())),c?(s.classList.remove("hidden","opacity-30","pointer-events-none"),s.classList.add("filter-match"),e||(e=s)):(s.classList.remove("hidden","filter-match"),s.classList.add("opacity-30","pointer-events-none"))}),ld(),jo(),e&&ud(i)&&hd(e)}function ld(){let i=document.querySelectorAll("[data-rule-card]").length,t=document.querySelectorAll("[data-rule-card].filter-match").length,e=document.querySelector("[data-filter-count]");e&&(e.textContent=`${t} / ${i} r\xE8gles`)}function cd(){document.querySelectorAll("[data-filter-risk], [data-filter-category], [data-filter-type]").forEach(t=>{t.checked=!1});let i=document.querySelector("[data-filter-search]");i&&(i.value=""),A(fe,Ve),Ei(Ve),Li(),Ne(Di)}function dd(){let i=R(fe,Ve);return i.riskLevels.length+i.categories.length+i.ruleTypes.length+(i.searchText?1:0)}function Li(){let i=dd(),t=document.querySelector("[data-filter-active-count]");if(t){let e=i===0?"0 actif":i===1?"1 actif":`${i} actifs`;t.textContent=e,i===0?t.className="px-3 py-1 bg-gray-100 text-gray-600 text-sm font-semibold rounded-full transition-all":t.className="px-3 py-1 bg-blue-100 text-blue-700 text-sm font-semibold rounded-full transition-all"}}function ud(i){return i.riskLevels.length>0||i.categories.length>0||i.ruleTypes.length>0||i.searchText.length>0}function Di(i){let t=R(fe,Ve);if(i==="search"){t.searchText="";let e=document.querySelector("[data-filter-search]");e&&(e.value="")}else{let[e,n]=i.split(":");({risk:()=>{t.riskLevels=t.riskLevels.filter(o=>o!==n),On(`[data-filter-risk="${n}"]`)},category:()=>{t.categories=t.categories.filter(o=>o!==n),On(`[data-filter-category="${n}"]`)},type:()=>{t.ruleTypes=t.ruleTypes.filter(o=>o!==n),On(`[data-filter-type="${n}"]`)}})[e]?.()}A(fe,t),Ei(t),Li(),Ne(Di)}function On(i){let t=document.querySelector(i);t&&(t.checked=!1)}var fe,od,Ve,hd,Uo=E(()=>{"use strict";st();st();Ho();Wo();qo();Si();fe="active-filters",od=300,Ve={riskLevels:[],categories:[],autoFixable:null,ruleTypes:[],searchText:""};hd=So(i=>{Mi(i),setTimeout(()=>{vi(i,{offset:20,behavior:"smooth",highlight:!0})},50)},od)});function fd(i,t,e){document.querySelectorAll(`[${i}="${t}"]`).forEach(s=>{let o=s;o.value!==String(e)&&(o.value=String(e))})}function Ko(i,t,e){document.addEventListener("input",n=>{let s=n.target.closest(`[${i}]`);if(!s)return;let o=s.getAttribute(i),r=parseInt(s.value,10);!o||isNaN(r)||r<1||(fd(i,o,r),t(e,o,r))})}function Go(i){Ko("data-time-input",(t,e,n)=>t.setCustomTime(e,n),i),Ko("data-special-time-input",(t,e,n)=>t.setCustomSpecialTime(e,n),i),document.addEventListener("click",t=>{let e=t.target.closest("[data-time-reset]");if(!e)return;let n=e.getAttribute("data-time-reset");if(!n)return;i.resetCustomTime(n),document.querySelectorAll(`[data-time-input="${n}"]`).forEach(r=>{let a=r,l=a.getAttribute("data-original-time");l&&(a.value=l)}),document.querySelectorAll(`[data-special-time-input="${n}"]`).forEach(r=>{let a=r,l=a.getAttribute("data-original-special-time");l&&(a.value=l)})})}var Xo=E(()=>{"use strict"});function Zo(){R(In,[]).forEach(t=>{let e=document.querySelector(`[data-checklist-item="${t}"]`);e&&(e.checked=!0,Jo(e,!0))}),document.addEventListener("change",t=>{let e=t.target.closest("[data-checklist-item]");if(!e)return;let n=e.getAttribute("data-checklist-item");if(!n)return;let s=e.checked;gd(n,s),Jo(e,s)}),Qo()}function gd(i,t){let e=R(In,[]);if(t)e.includes(i)||e.push(i);else{let n=e.indexOf(i);n>-1&&e.splice(n,1)}A(In,e),Qo()}function Jo(i,t){let e=i.closest("[data-rule-card]");e&&(t?(e.classList.add("opacity-60","bg-green-50"),e.classList.remove("bg-white")):(e.classList.remove("opacity-60","bg-green-50"),e.classList.add("bg-white")))}function Qo(){let i=document.querySelectorAll("[data-checklist-item]"),t=document.querySelectorAll("[data-checklist-item]:checked"),e=i.length,n=t.length,s=e>0?Math.round(n/e*100):0,o=document.querySelector("[data-progress-bar]");o&&(o.style.width=`${s}%`);let r=document.querySelector("[data-progress-text]");r&&(r.textContent=`${n} / ${e} (${s}%)`)}var In,tr=E(()=>{"use strict";st();In="checklist-items"});function pd(i){let t=ki[i]||We,e=document.createElement("span");return e.className=`inline-flex items-center px-2 py-1 text-xs font-semibold rounded-full bg-${t.color}-100 text-${t.color}-800`,e.innerHTML=`<span class="mr-1">${t.emoji}</span>${t.label}`,e}function md(i){let t=Ti[i]||{...We,label:i},e=document.createElement("span");return e.className=`inline-flex items-center px-2 py-1 text-xs font-medium rounded-full bg-${t.color}-100 text-${t.color}-700`,e.innerHTML=`<span class="mr-1">${t.emoji}</span>${t.label}`,e}function er(){document.querySelectorAll("[data-rule-card]").forEach(t=>{let e=t,n=e.dataset.ruleKey,s=e.dataset.riskLevel,o=e.dataset.category;if(!n)return;let r=e.querySelector(`[data-chips-container="${n}"]`);if(r){if(r.innerHTML="",s){let a=pd(s);r.appendChild(a)}if(o){let a=md(o);r.appendChild(a)}}})}var ir=E(()=>{"use strict";Dn()});function Ye(i){return i+.5|0}function je(i){return Ft(Ye(i*2.55),0,255)}function $t(i){return Ft(Ye(i*255),0,255)}function Et(i){return Ft(Ye(i/2.55)/100,0,1)}function nr(i){return Ft(Ye(i*100),0,100)}function _d(i){var t=i.length,e;return i[0]==="#"&&(t===4||t===5?e={r:255&mt[i[1]]*17,g:255&mt[i[2]]*17,b:255&mt[i[3]]*17,a:t===5?mt[i[4]]*17:255}:(t===7||t===9)&&(e={r:mt[i[1]]<<4|mt[i[2]],g:mt[i[3]]<<4|mt[i[4]],b:mt[i[5]]<<4|mt[i[6]],a:t===9?mt[i[7]]<<4|mt[i[8]]:255})),e}function Md(i){var t=xd(i)?bd:yd;return i?"#"+t(i.r)+t(i.g)+t(i.b)+vd(i.a,t):void 0}function ar(i,t,e){let n=t*Math.min(e,1-e),s=(o,r=(o+i/30)%12)=>e-n*Math.max(Math.min(r-3,9-r,1),-1);return[s(0),s(8),s(4)]}function kd(i,t,e){let n=(s,o=(s+i/60)%6)=>e-e*t*Math.max(Math.min(o,4-o,1),0);return[n(5),n(3),n(1)]}function Td(i,t,e){let n=ar(i,1,.5),s;for(t+e>1&&(s=1/(t+e),t*=s,e*=s),s=0;s<3;s++)n[s]*=1-t-e,n[s]+=t;return n}function wd(i,t,e,n,s){return i===s?(t-e)/n+(t<e?6:0):t===s?(e-i)/n+2:(i-t)/n+4}function Hn(i){let e=i.r/255,n=i.g/255,s=i.b/255,o=Math.max(e,n,s),r=Math.min(e,n,s),a=(o+r)/2,l,c,d;return o!==r&&(d=o-r,c=a>.5?d/(2-o-r):d/(o+r),l=wd(e,n,s,d,o),l=l*60+.5),[l|0,c||0,a]}function zn(i,t,e,n){return(Array.isArray(t)?i(t[0],t[1],t[2]):i(t,e,n)).map($t)}function Bn(i,t,e){return zn(ar,i,t,e)}function Cd(i,t,e){return zn(Td,i,t,e)}function Ed(i,t,e){return zn(kd,i,t,e)}function lr(i){return(i%360+360)%360}function Ld(i){let t=Sd.exec(i),e=255,n;if(!t)return;t[5]!==n&&(e=t[6]?je(+t[5]):$t(+t[5]));let s=lr(+t[2]),o=+t[3]/100,r=+t[4]/100;return t[1]==="hwb"?n=Cd(s,o,r):t[1]==="hsv"?n=Ed(s,o,r):n=Bn(s,o,r),{r:n[0],g:n[1],b:n[2],a:e}}function Dd(i,t){var e=Hn(i);e[0]=lr(e[0]+t),e=Bn(e),i.r=e[0],i.g=e[1],i.b=e[2]}function Ad(i){if(!i)return;let t=Hn(i),e=t[0],n=nr(t[1]),s=nr(t[2]);return i.a<255?`hsla(${e}, ${n}%, ${s}%, ${Et(i.a)})`:`hsl(${e}, ${n}%, ${s}%)`}function Pd(){let i={},t=Object.keys(or),e=Object.keys(sr),n,s,o,r,a;for(n=0;n<t.length;n++){for(r=a=t[n],s=0;s<e.length;s++)o=e[s],a=a.replace(o,sr[o]);o=parseInt(or[r],16),i[a]=[o>>16&255,o>>8&255,o&255]}return i}function Rd(i){Pi||(Pi=Pd(),Pi.transparent=[0,0,0,0]);let t=Pi[i.toLowerCase()];return t&&{r:t[0],g:t[1],b:t[2],a:t.length===4?t[3]:255}}function Id(i){let t=Od.exec(i),e=255,n,s,o;if(t){if(t[7]!==n){let r=+t[7];e=t[8]?je(r):Ft(r*255,0,255)}return n=+t[1],s=+t[3],o=+t[5],n=255&(t[2]?je(n):Ft(n,0,255)),s=255&(t[4]?je(s):Ft(s,0,255)),o=255&(t[6]?je(o):Ft(o,0,255)),{r:n,g:s,b:o,a:e}}}function Fd(i){return i&&(i.a<255?`rgba(${i.r}, ${i.g}, ${i.b}, ${Et(i.a)})`:`rgb(${i.r}, ${i.g}, ${i.b})`)}function $d(i,t,e){let n=ge(Et(i.r)),s=ge(Et(i.g)),o=ge(Et(i.b));return{r:$t(Fn(n+e*(ge(Et(t.r))-n))),g:$t(Fn(s+e*(ge(Et(t.g))-s))),b:$t(Fn(o+e*(ge(Et(t.b))-o))),a:i.a+e*(t.a-i.a)}}function Ri(i,t,e){if(i){let n=Hn(i);n[t]=Math.max(0,Math.min(n[t]+n[t]*e,t===0?360:1)),n=Bn(n),i.r=n[0],i.g=n[1],i.b=n[2]}}function cr(i,t){return i&&Object.assign(t||{},i)}function rr(i){var t={r:0,g:0,b:0,a:255};return Array.isArray(i)?i.length>=3&&(t={r:i[0],g:i[1],b:i[2],a:255},i.length>3&&(t.a=$t(i[3]))):(t=cr(i,{r:0,g:0,b:0,a:1}),t.a=$t(t.a)),t}function Hd(i){return i.charAt(0)==="r"?Id(i):Ld(i)}var Ft,mt,$n,bd,yd,Ai,xd,vd,Sd,sr,or,Pi,Od,Fn,ge,qe,dr=E(()=>{Ft=(i,t,e)=>Math.max(Math.min(i,e),t);mt={0:0,1:1,2:2,3:3,4:4,5:5,6:6,7:7,8:8,9:9,A:10,B:11,C:12,D:13,E:14,F:15,a:10,b:11,c:12,d:13,e:14,f:15},$n=[..."0123456789ABCDEF"],bd=i=>$n[i&15],yd=i=>$n[(i&240)>>4]+$n[i&15],Ai=i=>(i&240)>>4===(i&15),xd=i=>Ai(i.r)&&Ai(i.g)&&Ai(i.b)&&Ai(i.a);vd=(i,t)=>i<255?t(i):"";Sd=/^(hsla?|hwb|hsv)\(\s*([-+.e\d]+)(?:deg)?[\s,]+([-+.e\d]+)%[\s,]+([-+.e\d]+)%(?:[\s,]+([-+.e\d]+)(%)?)?\s*\)$/;sr={x:"dark",Z:"light",Y:"re",X:"blu",W:"gr",V:"medium",U:"slate",A:"ee",T:"ol",S:"or",B:"ra",C:"lateg",D:"ights",R:"in",Q:"turquois",E:"hi",P:"ro",O:"al",N:"le",M:"de",L:"yello",F:"en",K:"ch",G:"arks",H:"ea",I:"ightg",J:"wh"},or={OiceXe:"f0f8ff",antiquewEte:"faebd7",aqua:"ffff",aquamarRe:"7fffd4",azuY:"f0ffff",beige:"f5f5dc",bisque:"ffe4c4",black:"0",blanKedOmond:"ffebcd",Xe:"ff",XeviTet:"8a2be2",bPwn:"a52a2a",burlywood:"deb887",caMtXe:"5f9ea0",KartYuse:"7fff00",KocTate:"d2691e",cSO:"ff7f50",cSnflowerXe:"6495ed",cSnsilk:"fff8dc",crimson:"dc143c",cyan:"ffff",xXe:"8b",xcyan:"8b8b",xgTMnPd:"b8860b",xWay:"a9a9a9",xgYF:"6400",xgYy:"a9a9a9",xkhaki:"bdb76b",xmagFta:"8b008b",xTivegYF:"556b2f",xSange:"ff8c00",xScEd:"9932cc",xYd:"8b0000",xsOmon:"e9967a",xsHgYF:"8fbc8f",xUXe:"483d8b",xUWay:"2f4f4f",xUgYy:"2f4f4f",xQe:"ced1",xviTet:"9400d3",dAppRk:"ff1493",dApskyXe:"bfff",dimWay:"696969",dimgYy:"696969",dodgerXe:"1e90ff",fiYbrick:"b22222",flSOwEte:"fffaf0",foYstWAn:"228b22",fuKsia:"ff00ff",gaRsbSo:"dcdcdc",ghostwEte:"f8f8ff",gTd:"ffd700",gTMnPd:"daa520",Way:"808080",gYF:"8000",gYFLw:"adff2f",gYy:"808080",honeyMw:"f0fff0",hotpRk:"ff69b4",RdianYd:"cd5c5c",Rdigo:"4b0082",ivSy:"fffff0",khaki:"f0e68c",lavFMr:"e6e6fa",lavFMrXsh:"fff0f5",lawngYF:"7cfc00",NmoncEffon:"fffacd",ZXe:"add8e6",ZcSO:"f08080",Zcyan:"e0ffff",ZgTMnPdLw:"fafad2",ZWay:"d3d3d3",ZgYF:"90ee90",ZgYy:"d3d3d3",ZpRk:"ffb6c1",ZsOmon:"ffa07a",ZsHgYF:"20b2aa",ZskyXe:"87cefa",ZUWay:"778899",ZUgYy:"778899",ZstAlXe:"b0c4de",ZLw:"ffffe0",lime:"ff00",limegYF:"32cd32",lRF:"faf0e6",magFta:"ff00ff",maPon:"800000",VaquamarRe:"66cdaa",VXe:"cd",VScEd:"ba55d3",VpurpN:"9370db",VsHgYF:"3cb371",VUXe:"7b68ee",VsprRggYF:"fa9a",VQe:"48d1cc",VviTetYd:"c71585",midnightXe:"191970",mRtcYam:"f5fffa",mistyPse:"ffe4e1",moccasR:"ffe4b5",navajowEte:"ffdead",navy:"80",Tdlace:"fdf5e6",Tive:"808000",TivedBb:"6b8e23",Sange:"ffa500",SangeYd:"ff4500",ScEd:"da70d6",pOegTMnPd:"eee8aa",pOegYF:"98fb98",pOeQe:"afeeee",pOeviTetYd:"db7093",papayawEp:"ffefd5",pHKpuff:"ffdab9",peru:"cd853f",pRk:"ffc0cb",plum:"dda0dd",powMrXe:"b0e0e6",purpN:"800080",YbeccapurpN:"663399",Yd:"ff0000",Psybrown:"bc8f8f",PyOXe:"4169e1",saddNbPwn:"8b4513",sOmon:"fa8072",sandybPwn:"f4a460",sHgYF:"2e8b57",sHshell:"fff5ee",siFna:"a0522d",silver:"c0c0c0",skyXe:"87ceeb",UXe:"6a5acd",UWay:"708090",UgYy:"708090",snow:"fffafa",sprRggYF:"ff7f",stAlXe:"4682b4",tan:"d2b48c",teO:"8080",tEstN:"d8bfd8",tomato:"ff6347",Qe:"40e0d0",viTet:"ee82ee",JHt:"f5deb3",wEte:"ffffff",wEtesmoke:"f5f5f5",Lw:"ffff00",LwgYF:"9acd32"};Od=/^rgba?\(\s*([-+.\d]+)(%)?[\s,]+([-+.e\d]+)(%)?[\s,]+([-+.e\d]+)(%)?(?:[\s,/]+([-+.e\d]+)(%)?)?\s*\)$/;Fn=i=>i<=.0031308?i*12.92:Math.pow(i,1/2.4)*1.055-.055,ge=i=>i<=.04045?i/12.92:Math.pow((i+.055)/1.055,2.4);qe=class i{constructor(t){if(t instanceof i)return t;let e=typeof t,n;e==="object"?n=rr(t):e==="string"&&(n=_d(t)||Rd(t)||Hd(t)),this._rgb=n,this._valid=!!n}get valid(){return this._valid}get rgb(){var t=cr(this._rgb);return t&&(t.a=Et(t.a)),t}set rgb(t){this._rgb=rr(t)}rgbString(){return this._valid?Fd(this._rgb):void 0}hexString(){return this._valid?Md(this._rgb):void 0}hslString(){return this._valid?Ad(this._rgb):void 0}mix(t,e){if(t){let n=this.rgb,s=t.rgb,o,r=e===o?.5:e,a=2*r-1,l=n.a-s.a,c=((a*l===-1?a:(a+l)/(1+a*l))+1)/2;o=1-c,n.r=255&c*n.r+o*s.r+.5,n.g=255&c*n.g+o*s.g+.5,n.b=255&c*n.b+o*s.b+.5,n.a=r*n.a+(1-r)*s.a,this.rgb=n}return this}interpolate(t,e){return t&&(this._rgb=$d(this._rgb,t._rgb,e)),this}clone(){return new i(this.rgb)}alpha(t){return this._rgb.a=$t(t),this}clearer(t){let e=this._rgb;return e.a*=1-t,this}greyscale(){let t=this._rgb,e=Ye(t.r*.3+t.g*.59+t.b*.11);return t.r=t.g=t.b=e,this}opaquer(t){let e=this._rgb;return e.a*=1+t,this}negate(){let t=this._rgb;return t.r=255-t.r,t.g=255-t.g,t.b=255-t.b,this}lighten(t){return Ri(this._rgb,2,t),this}darken(t){return Ri(this._rgb,2,-t),this}saturate(t){return Ri(this._rgb,1,t),this}desaturate(t){return Ri(this._rgb,1,-t),this}rotate(t){return Dd(this._rgb,t),this}}});function St(){}function P(i){return i==null}function N(i){if(Array.isArray&&Array.isArray(i))return!0;let t=Object.prototype.toString.call(i);return t.slice(0,7)==="[object"&&t.slice(-6)==="Array]"}function O(i){return i!==null&&Object.prototype.toString.call(i)==="[object Object]"}function Y(i){return(typeof i=="number"||i instanceof Number)&&isFinite(+i)}function ct(i,t){return Y(i)?i:t}function C(i,t){return typeof i>"u"?t:i}function W(i,t,e){if(i&&typeof i.call=="function")return i.apply(e,t)}function H(i,t,e,n){let s,o,r;if(N(i))if(o=i.length,n)for(s=o-1;s>=0;s--)t.call(e,i[s],s);else for(s=0;s<o;s++)t.call(e,i[s],s);else if(O(i))for(r=Object.keys(i),o=r.length,s=0;s<o;s++)t.call(e,i[r[s]],r[s])}function Ge(i,t){let e,n,s,o;if(!i||!t||i.length!==t.length)return!1;for(e=0,n=i.length;e<n;++e)if(s=i[e],o=t[e],s.datasetIndex!==o.datasetIndex||s.index!==o.index)return!1;return!0}function $i(i){if(N(i))return i.map($i);if(O(i)){let t=Object.create(null),e=Object.keys(i),n=e.length,s=0;for(;s<n;++s)t[e[s]]=$i(i[e[s]]);return t}return i}function Sr(i){return["__proto__","prototype","constructor"].indexOf(i)===-1}function zd(i,t,e,n){if(!Sr(i))return;let s=t[i],o=e[i];O(s)&&O(o)?me(s,o,n):t[i]=$i(o)}function me(i,t,e){let n=N(t)?t:[t],s=n.length;if(!O(i))return i;e=e||{};let o=e.merger||zd,r;for(let a=0;a<s;++a){if(r=n[a],!O(r))continue;let l=Object.keys(r);for(let c=0,d=l.length;c<d;++c)o(l[c],i,r,e)}return i}function ye(i,t){return me(i,t,{merger:Bd})}function Bd(i,t,e){if(!Sr(i))return;let n=t[i],s=e[i];O(n)&&O(s)?ye(n,s):Object.prototype.hasOwnProperty.call(t,i)||(t[i]=$i(s))}function Wd(i){let t=i.split("."),e=[],n="";for(let s of t)n+=s,n.endsWith("\\")?n=n.slice(0,-1)+".":(e.push(n),n="");return e}function Nd(i){let t=Wd(i);return e=>{for(let n of t){if(n==="")break;e=e&&e[n]}return e}}function At(i,t){return(ur[t]||(ur[t]=Nd(t)))(i)}function Wi(i){return i.charAt(0).toUpperCase()+i.slice(1)}function kr(i){return i.type==="mouseup"||i.type==="click"||i.type==="contextmenu"}function _e(i,t,e){return Math.abs(i-t)<e}function Yn(i){let t=Math.round(i);i=_e(i,t,i/1e3)?t:i;let e=Math.pow(10,Math.floor(Dt(i))),n=i/e;return(n<=1?1:n<=2?2:n<=5?5:10)*e}function Tr(i){let t=[],e=Math.sqrt(i),n;for(n=1;n<e;n++)i%n===0&&(t.push(n),t.push(i/n));return e===(e|0)&&t.push(e),t.sort((s,o)=>s-o).pop(),t}function qd(i){return typeof i=="symbol"||typeof i=="object"&&i!==null&&!(Symbol.toPrimitive in i||"toString"in i||"valueOf"in i)}function Qt(i){return!qd(i)&&!isNaN(parseFloat(i))&&isFinite(i)}function wr(i,t){let e=Math.round(i);return e-t<=i&&e+t>=i}function Un(i,t,e){let n,s,o;for(n=0,s=i.length;n<s;n++)o=i[n][e],isNaN(o)||(t.min=Math.min(t.min,o),t.max=Math.max(t.max,o))}function bt(i){return i*(F/180)}function Ni(i){return i*(180/F)}function Kn(i){if(!Y(i))return;let t=1,e=0;for(;Math.round(i*t)/t!==i;)t*=10,e++;return e}function Gn(i,t){let e=t.x-i.x,n=t.y-i.y,s=Math.sqrt(e*e+n*n),o=Math.atan2(n,e);return o<-.5*F&&(o+=V),{angle:o,distance:s}}function zi(i,t){return Math.sqrt(Math.pow(t.x-i.x,2)+Math.pow(t.y-i.y,2))}function Yd(i,t){return(i-t+Vd)%V-F}function tt(i){return(i%V+V)%V}function ve(i,t,e,n){let s=tt(i),o=tt(t),r=tt(e),a=tt(o-s),l=tt(r-s),c=tt(s-o),d=tt(s-r);return s===o||s===r||n&&o===r||a>l&&c<d}function Z(i,t,e){return Math.max(t,Math.min(e,i))}function Cr(i){return Z(i,-32768,32767)}function kt(i,t,e,n=1e-6){return i>=Math.min(t,e)-n&&i<=Math.max(t,e)+n}function Vi(i,t,e){e=e||(r=>i[r]<t);let n=i.length-1,s=0,o;for(;n-s>1;)o=s+n>>1,e(o)?s=o:n=o;return{lo:s,hi:n}}function Lr(i,t,e){let n=0,s=i.length;for(;n<s&&i[n]<t;)n++;for(;s>n&&i[s-1]>e;)s--;return n>0||s<i.length?i.slice(n,s):i}function Ar(i,t){if(i._chartjs){i._chartjs.listeners.push(t);return}Object.defineProperty(i,"_chartjs",{configurable:!0,enumerable:!1,value:{listeners:[t]}}),Dr.forEach(e=>{let n="_onData"+Wi(e),s=i[e];Object.defineProperty(i,e,{configurable:!0,enumerable:!1,value(...o){let r=s.apply(this,o);return i._chartjs.listeners.forEach(a=>{typeof a[n]=="function"&&a[n](...o)}),r}})})}function Xn(i,t){let e=i._chartjs;if(!e)return;let n=e.listeners,s=n.indexOf(t);s!==-1&&n.splice(s,1),!(n.length>0)&&(Dr.forEach(o=>{delete i[o]}),delete i._chartjs)}function Jn(i){let t=new Set(i);return t.size===i.length?i:Array.from(t)}function Qn(i,t){let e=[],n=!1;return function(...s){e=s,n||(n=!0,Zn.call(window,()=>{n=!1,i.apply(t,e)}))}}function Pr(i,t){let e;return function(...n){return t?(clearTimeout(e),e=setTimeout(i,t,n)):i.apply(this,n),t}}function ts(i,t,e){let n=t.length,s=0,o=n;if(i._sorted){let{iScale:r,vScale:a,_parsed:l}=i,c=i.dataset&&i.dataset.options?i.dataset.options.spanGaps:null,d=r.axis,{min:u,max:h,minDefined:f,maxDefined:g}=r.getUserBounds();if(f){if(s=Math.min(vt(l,d,u).lo,e?n:vt(t,d,r.getPixelForValue(u)).lo),c){let p=l.slice(0,s+1).reverse().findIndex(m=>!P(m[a.axis]));s-=Math.max(0,p)}s=Z(s,0,n-1)}if(g){let p=Math.max(vt(l,r.axis,h,!0).hi+1,e?0:vt(t,d,r.getPixelForValue(h),!0).hi+1);if(c){let m=l.slice(p-1).findIndex(b=>!P(b[a.axis]));p+=Math.max(0,m)}o=Z(p,s,n)-s}else o=n-s}return{start:s,count:o}}function es(i){let{xScale:t,yScale:e,_scaleRanges:n}=i,s={xmin:t.min,xmax:t.max,ymin:e.min,ymax:e.max};if(!n)return i._scaleRanges=s,!0;let o=n.xmin!==t.min||n.xmax!==t.max||n.ymin!==e.min||n.ymax!==e.max;return Object.assign(n,s),o}function is(i){if(i&&typeof i=="object"){let t=i.toString();return t==="[object CanvasPattern]"||t==="[object CanvasGradient]"}return!1}function ns(i){return is(i)?i:new qe(i)}function Wn(i){return is(i)?i:new qe(i).saturate(.5).darken(.1).hexString()}function Gd(i){i.set("animation",{delay:void 0,duration:1e3,easing:"easeOutQuart",fn:void 0,from:void 0,loop:void 0,to:void 0,type:void 0}),i.describe("animation",{_fallback:!1,_indexable:!1,_scriptable:t=>t!=="onProgress"&&t!=="onComplete"&&t!=="fn"}),i.set("animations",{colors:{type:"color",properties:Kd},numbers:{type:"number",properties:Ud}}),i.describe("animations",{_fallback:"animation"}),i.set("transitions",{active:{animation:{duration:400}},resize:{animation:{duration:0}},show:{animations:{colors:{from:"transparent"},visible:{type:"boolean",duration:0}}},hide:{animations:{colors:{to:"transparent"},visible:{type:"boolean",easing:"linear",fn:t=>t|0}}}})}function Xd(i){i.set("layout",{autoPadding:!0,padding:{top:0,right:0,bottom:0,left:0}})}function Jd(i,t){t=t||{};let e=i+JSON.stringify(t),n=pr.get(e);return n||(n=new Intl.NumberFormat(i,t),pr.set(e,n)),n}function Me(i,t,e){return Jd(t,e).format(i)}function Zd(i,t){let e=t.length>3?t[2].value-t[1].value:t[1].value-t[0].value;return Math.abs(e)>=1&&i!==Math.floor(i)&&(e=i-Math.floor(i)),e}function Qd(i){i.set("scale",{display:!0,offset:!1,reverse:!1,beginAtZero:!1,bounds:"ticks",clip:!0,grace:0,grid:{display:!0,lineWidth:1,drawOnChartArea:!0,drawTicks:!0,tickLength:8,tickWidth:(t,e)=>e.lineWidth,tickColor:(t,e)=>e.color,offset:!1},border:{display:!0,dash:[],dashOffset:0,width:1},title:{display:!1,text:"",padding:{top:4,bottom:4}},ticks:{minRotation:0,maxRotation:50,mirror:!1,textStrokeWidth:0,textStrokeColor:"",padding:3,display:!0,autoSkip:!0,autoSkipPadding:3,labelOffset:0,callback:Xe.formatters.values,minor:{},major:{},align:"center",crossAlign:"near",showLabelBackdrop:!1,backdropColor:"rgba(255, 255, 255, 0.75)",backdropPadding:2}}),i.route("scale.ticks","color","","color"),i.route("scale.grid","color","","borderColor"),i.route("scale.border","color","","borderColor"),i.route("scale.title","color","","color"),i.describe("scale",{_fallback:!1,_scriptable:t=>!t.startsWith("before")&&!t.startsWith("after")&&t!=="callback"&&t!=="parser",_indexable:t=>t!=="borderDash"&&t!=="tickBorderDash"&&t!=="dash"}),i.describe("scales",{_fallback:"scale"}),i.describe("scale.ticks",{_scriptable:t=>t!=="backdropPadding"&&t!=="callback",_indexable:t=>t!=="backdropPadding"})}function Ue(i,t){if(!t)return i;let e=t.split(".");for(let n=0,s=e.length;n<s;++n){let o=e[n];i=i[o]||(i[o]=Object.create(null))}return i}function Nn(i,t,e){return typeof t=="string"?me(Ue(i,t),e):me(Ue(i,""),t)}function tu(i){return!i||P(i.size)||P(i.family)?null:(i.style?i.style+" ":"")+(i.weight?i.weight+" ":"")+i.size+"px "+i.family}function Ke(i,t,e,n,s){let o=t[s];return o||(o=t[s]=i.measureText(s).width,e.push(s)),o>n&&(n=o),n}function Ir(i,t,e,n){n=n||{};let s=n.data=n.data||{},o=n.garbageCollect=n.garbageCollect||[];n.font!==t&&(s=n.data={},o=n.garbageCollect=[],n.font=t),i.save(),i.font=t;let r=0,a=e.length,l,c,d,u,h;for(l=0;l<a;l++)if(u=e[l],u!=null&&!N(u))r=Ke(i,s,o,r,u);else if(N(u))for(c=0,d=u.length;c<d;c++)h=u[c],h!=null&&!N(h)&&(r=Ke(i,s,o,r,h));i.restore();let f=o.length/2;if(f>e.length){for(l=0;l<f;l++)delete s[o[l]];o.splice(0,f)}return r}function Wt(i,t,e){let n=i.currentDevicePixelRatio,s=e!==0?Math.max(e/2,.5):0;return Math.round((t-s)*n)/n+s}function ss(i,t){!t&&!i||(t=t||i.getContext("2d"),t.save(),t.resetTransform(),t.clearRect(0,0,i.width,i.height),t.restore())}function Yi(i,t,e,n){os(i,t,e,n,null)}function os(i,t,e,n,s){let o,r,a,l,c,d,u,h,f=t.pointStyle,g=t.rotation,p=t.radius,m=(g||0)*jd;if(f&&typeof f=="object"&&(o=f.toString(),o==="[object HTMLImageElement]"||o==="[object HTMLCanvasElement]")){i.save(),i.translate(e,n),i.rotate(m),i.drawImage(f,-f.width/2,-f.height/2,f.width,f.height),i.restore();return}if(!(isNaN(p)||p<=0)){switch(i.beginPath(),f){default:s?i.ellipse(e,n,s/2,p,0,0,V):i.arc(e,n,p,0,V),i.closePath();break;case"triangle":d=s?s/2:p,i.moveTo(e+Math.sin(m)*d,n-Math.cos(m)*p),m+=hr,i.lineTo(e+Math.sin(m)*d,n-Math.cos(m)*p),m+=hr,i.lineTo(e+Math.sin(m)*d,n-Math.cos(m)*p),i.closePath();break;case"rectRounded":c=p*.516,l=p-c,r=Math.cos(m+Xt)*l,u=Math.cos(m+Xt)*(s?s/2-c:l),a=Math.sin(m+Xt)*l,h=Math.sin(m+Xt)*(s?s/2-c:l),i.arc(e-u,n-a,c,m-F,m-K),i.arc(e+h,n-r,c,m-K,m),i.arc(e+u,n+a,c,m,m+K),i.arc(e-h,n+r,c,m+K,m+F),i.closePath();break;case"rect":if(!g){l=Math.SQRT1_2*p,d=s?s/2:l,i.rect(e-d,n-l,2*d,2*l);break}m+=Xt;case"rectRot":u=Math.cos(m)*(s?s/2:p),r=Math.cos(m)*p,a=Math.sin(m)*p,h=Math.sin(m)*(s?s/2:p),i.moveTo(e-u,n-a),i.lineTo(e+h,n-r),i.lineTo(e+u,n+a),i.lineTo(e-h,n+r),i.closePath();break;case"crossRot":m+=Xt;case"cross":u=Math.cos(m)*(s?s/2:p),r=Math.cos(m)*p,a=Math.sin(m)*p,h=Math.sin(m)*(s?s/2:p),i.moveTo(e-u,n-a),i.lineTo(e+u,n+a),i.moveTo(e+h,n-r),i.lineTo(e-h,n+r);break;case"star":u=Math.cos(m)*(s?s/2:p),r=Math.cos(m)*p,a=Math.sin(m)*p,h=Math.sin(m)*(s?s/2:p),i.moveTo(e-u,n-a),i.lineTo(e+u,n+a),i.moveTo(e+h,n-r),i.lineTo(e-h,n+r),m+=Xt,u=Math.cos(m)*(s?s/2:p),r=Math.cos(m)*p,a=Math.sin(m)*p,h=Math.sin(m)*(s?s/2:p),i.moveTo(e-u,n-a),i.lineTo(e+u,n+a),i.moveTo(e+h,n-r),i.lineTo(e-h,n+r);break;case"line":r=s?s/2:Math.cos(m)*p,a=Math.sin(m)*p,i.moveTo(e-r,n-a),i.lineTo(e+r,n+a);break;case"dash":i.moveTo(e,n),i.lineTo(e+Math.cos(m)*(s?s/2:p),n+Math.sin(m)*p);break;case!1:i.closePath();break}i.fill(),t.borderWidth>0&&i.stroke()}}function Mt(i,t,e){return e=e||.5,!t||i&&i.x>t.left-e&&i.x<t.right+e&&i.y>t.top-e&&i.y<t.bottom+e}function Je(i,t){i.save(),i.beginPath(),i.rect(t.left,t.top,t.right-t.left,t.bottom-t.top),i.clip()}function Ze(i){i.restore()}function Fr(i,t,e,n,s){if(!t)return i.lineTo(e.x,e.y);if(s==="middle"){let o=(t.x+e.x)/2;i.lineTo(o,t.y),i.lineTo(o,e.y)}else s==="after"!=!!n?i.lineTo(t.x,e.y):i.lineTo(e.x,t.y);i.lineTo(e.x,e.y)}function $r(i,t,e,n){if(!t)return i.lineTo(e.x,e.y);i.bezierCurveTo(n?t.cp1x:t.cp2x,n?t.cp1y:t.cp2y,n?e.cp2x:e.cp1x,n?e.cp2y:e.cp1y,e.x,e.y)}function eu(i,t){t.translation&&i.translate(t.translation[0],t.translation[1]),P(t.rotation)||i.rotate(t.rotation),t.color&&(i.fillStyle=t.color),t.textAlign&&(i.textAlign=t.textAlign),t.textBaseline&&(i.textBaseline=t.textBaseline)}function iu(i,t,e,n,s){if(s.strikethrough||s.underline){let o=i.measureText(n),r=t-o.actualBoundingBoxLeft,a=t+o.actualBoundingBoxRight,l=e-o.actualBoundingBoxAscent,c=e+o.actualBoundingBoxDescent,d=s.strikethrough?(l+c)/2:c;i.strokeStyle=i.fillStyle,i.beginPath(),i.lineWidth=s.decorationWidth||2,i.moveTo(r,d),i.lineTo(a,d),i.stroke()}}function nu(i,t){let e=i.fillStyle;i.fillStyle=t.color,i.fillRect(t.left,t.top,t.width,t.height),i.fillStyle=e}function Nt(i,t,e,n,s,o={}){let r=N(t)?t:[t],a=o.strokeWidth>0&&o.strokeColor!=="",l,c;for(i.save(),i.font=s.string,eu(i,o),l=0;l<r.length;++l)c=r[l],o.backdrop&&nu(i,o.backdrop),a&&(o.strokeColor&&(i.strokeStyle=o.strokeColor),P(o.strokeWidth)||(i.lineWidth=o.strokeWidth),i.strokeText(c,e,n,o.maxWidth)),i.fillText(c,e,n,o.maxWidth),iu(i,e,n,c,o),n+=Number(s.lineHeight);i.restore()}function Se(i,t){let{x:e,y:n,w:s,h:o,radius:r}=t;i.arc(e+r.topLeft,n+r.topLeft,r.topLeft,1.5*F,F,!0),i.lineTo(e,n+o-r.bottomLeft),i.arc(e+r.bottomLeft,n+o-r.bottomLeft,r.bottomLeft,F,K,!0),i.lineTo(e+s-r.bottomRight,n+o),i.arc(e+s-r.bottomRight,n+o-r.bottomRight,r.bottomRight,K,0,!0),i.lineTo(e+s,n+r.topRight),i.arc(e+s-r.topRight,n+r.topRight,r.topRight,0,-K,!0),i.lineTo(e+r.topLeft,n)}function ru(i,t){let e=(""+i).match(su);if(!e||e[1]==="normal")return t*1.2;switch(i=+e[2],e[3]){case"px":return i;case"%":i/=100;break}return t*i}function Ui(i,t){let e={},n=O(t),s=n?Object.keys(t):t,o=O(i)?n?r=>C(i[r],i[t[r]]):r=>i[r]:()=>i;for(let r of s)e[r]=au(o(r));return e}function rs(i){return Ui(i,{top:"y",right:"x",bottom:"y",left:"x"})}function Vt(i){return Ui(i,["topLeft","topRight","bottomLeft","bottomRight"])}function it(i){let t=rs(i);return t.width=t.left+t.right,t.height=t.top+t.bottom,t}function J(i,t){i=i||{},t=t||j.font;let e=C(i.size,t.size);typeof e=="string"&&(e=parseInt(e,10));let n=C(i.style,t.style);n&&!(""+n).match(ou)&&(console.warn('Invalid font style specified: "'+n+'"'),n=void 0);let s={family:C(i.family,t.family),lineHeight:ru(C(i.lineHeight,t.lineHeight),e),size:e,style:n,weight:C(i.weight,t.weight),string:""};return s.string=tu(s),s}function ke(i,t,e,n){let s=!0,o,r,a;for(o=0,r=i.length;o<r;++o)if(a=i[o],a!==void 0&&(t!==void 0&&typeof a=="function"&&(a=a(t),s=!1),e!==void 0&&N(a)&&(a=a[e%a.length],s=!1),a!==void 0))return n&&!s&&(n.cacheable=!1),a}function Hr(i,t,e){let{min:n,max:s}=i,o=jn(t,(s-n)/2),r=(a,l)=>e&&a===0?0:a+l;return{min:r(n,-Math.abs(o)),max:r(s,o)}}function Pt(i,t){return Object.assign(Object.create(i),t)}function Ki(i,t=[""],e,n,s=()=>i[0]){let o=e||i;typeof n>"u"&&(n=Wr("_fallback",i));let r={[Symbol.toStringTag]:"Object",_cacheable:!0,_scopes:i,_rootScopes:o,_fallback:n,_getTarget:s,override:a=>Ki([a,...i],t,o,n)};return new Proxy(r,{deleteProperty(a,l){return delete a[l],delete a._keys,delete i[0][l],!0},get(a,l){return zr(a,l,()=>pu(l,t,i,a))},getOwnPropertyDescriptor(a,l){return Reflect.getOwnPropertyDescriptor(a._scopes[0],l)},getPrototypeOf(){return Reflect.getPrototypeOf(i[0])},has(a,l){return br(a).includes(l)},ownKeys(a){return br(a)},set(a,l,c){let d=a._storage||(a._storage=s());return a[l]=d[l]=c,delete a._keys,!0}})}function Zt(i,t,e,n){let s={_cacheable:!1,_proxy:i,_context:t,_subProxy:e,_stack:new Set,_descriptors:as(i,n),setContext:o=>Zt(i,o,e,n),override:o=>Zt(i.override(o),t,e,n)};return new Proxy(s,{deleteProperty(o,r){return delete o[r],delete i[r],!0},get(o,r,a){return zr(o,r,()=>cu(o,r,a))},getOwnPropertyDescriptor(o,r){return o._descriptors.allKeys?Reflect.has(i,r)?{enumerable:!0,configurable:!0}:void 0:Reflect.getOwnPropertyDescriptor(i,r)},getPrototypeOf(){return Reflect.getPrototypeOf(i)},has(o,r){return Reflect.has(i,r)},ownKeys(){return Reflect.ownKeys(i)},set(o,r,a){return i[r]=a,delete o[r],!0}})}function as(i,t={scriptable:!0,indexable:!0}){let{_scriptable:e=t.scriptable,_indexable:n=t.indexable,_allKeys:s=t.allKeys}=i;return{allKeys:s,scriptable:e,indexable:n,isScriptable:Lt(e)?e:()=>e,isIndexable:Lt(n)?n:()=>n}}function zr(i,t,e){if(Object.prototype.hasOwnProperty.call(i,t)||t==="constructor")return i[t];let n=e();return i[t]=n,n}function cu(i,t,e){let{_proxy:n,_context:s,_subProxy:o,_descriptors:r}=i,a=n[t];return Lt(a)&&r.isScriptable(t)&&(a=du(t,a,i,e)),N(a)&&a.length&&(a=uu(t,a,i,r.isIndexable)),ls(t,a)&&(a=Zt(a,s,o&&o[t],r)),a}function du(i,t,e,n){let{_proxy:s,_context:o,_subProxy:r,_stack:a}=e;if(a.has(i))throw new Error("Recursion detected: "+Array.from(a).join("->")+"->"+i);a.add(i);let l=t(o,r||n);return a.delete(i),ls(i,l)&&(l=cs(s._scopes,s,i,l)),l}function uu(i,t,e,n){let{_proxy:s,_context:o,_subProxy:r,_descriptors:a}=e;if(typeof o.index<"u"&&n(i))return t[o.index%t.length];if(O(t[0])){let l=t,c=s._scopes.filter(d=>d!==l);t=[];for(let d of l){let u=cs(c,s,i,d);t.push(Zt(u,o,r&&r[i],a))}}return t}function Br(i,t,e){return Lt(i)?i(t,e):i}function fu(i,t,e,n,s){for(let o of t){let r=hu(e,o);if(r){i.add(r);let a=Br(r._fallback,e,s);if(typeof a<"u"&&a!==e&&a!==n)return a}else if(r===!1&&typeof n<"u"&&e!==n)return null}return!1}function cs(i,t,e,n){let s=t._rootScopes,o=Br(t._fallback,e,n),r=[...i,...s],a=new Set;a.add(n);let l=mr(a,r,e,o||e,n);return l===null||typeof o<"u"&&o!==e&&(l=mr(a,r,o,l,n),l===null)?!1:Ki(Array.from(a),[""],s,o,()=>gu(t,e,n))}function mr(i,t,e,n,s){for(;e;)e=fu(i,t,e,n,s);return e}function gu(i,t,e){let n=i._getTarget();t in n||(n[t]={});let s=n[t];return N(s)&&O(e)?e:s||{}}function pu(i,t,e,n){let s;for(let o of t)if(s=Wr(lu(o,i),e),typeof s<"u")return ls(i,s)?cs(e,n,i,s):s}function Wr(i,t){for(let e of t){if(!e)continue;let n=e[i];if(typeof n<"u")return n}}function br(i){let t=i._keys;return t||(t=i._keys=mu(i._scopes)),t}function mu(i){let t=new Set;for(let e of i)for(let n of Object.keys(e).filter(s=>!s.startsWith("_")))t.add(n);return Array.from(t)}function ds(i,t,e,n){let{iScale:s}=i,{key:o="r"}=this._parsing,r=new Array(n),a,l,c,d;for(a=0,l=n;a<l;++a)c=a+e,d=t[c],r[a]={r:s.parse(At(d,o),c)};return r}function yu(i,t,e,n){let s=i.skip?t:i,o=t,r=e.skip?t:e,a=zi(o,s),l=zi(r,o),c=a/(a+l),d=l/(a+l);c=isNaN(c)?0:c,d=isNaN(d)?0:d;let u=n*c,h=n*d;return{previous:{x:o.x-u*(r.x-s.x),y:o.y-u*(r.y-s.y)},next:{x:o.x+h*(r.x-s.x),y:o.y+h*(r.y-s.y)}}}function xu(i,t,e){let n=i.length,s,o,r,a,l,c=be(i,0);for(let d=0;d<n-1;++d)if(l=c,c=be(i,d+1),!(!l||!c)){if(_e(t[d],0,bu)){e[d]=e[d+1]=0;continue}s=e[d]/t[d],o=e[d+1]/t[d],a=Math.pow(s,2)+Math.pow(o,2),!(a<=9)&&(r=3/Math.sqrt(a),e[d]=s*r*t[d],e[d+1]=o*r*t[d])}}function _u(i,t,e="x"){let n=Nr(e),s=i.length,o,r,a,l=be(i,0);for(let c=0;c<s;++c){if(r=a,a=l,l=be(i,c+1),!a)continue;let d=a[e],u=a[n];r&&(o=(d-r[e])/3,a[`cp1${e}`]=d-o,a[`cp1${n}`]=u-o*t[c]),l&&(o=(l[e]-d)/3,a[`cp2${e}`]=d+o,a[`cp2${n}`]=u+o*t[c])}}function vu(i,t="x"){let e=Nr(t),n=i.length,s=Array(n).fill(0),o=Array(n),r,a,l,c=be(i,0);for(r=0;r<n;++r)if(a=l,l=c,c=be(i,r+1),!!l){if(c){let d=c[t]-l[t];s[r]=d!==0?(c[e]-l[e])/d:0}o[r]=a?c?xt(s[r-1])!==xt(s[r])?0:(s[r-1]+s[r])/2:s[r-1]:s[r]}xu(i,s,o),_u(i,o,t)}function Ii(i,t,e){return Math.max(Math.min(i,e),t)}function Mu(i,t){let e,n,s,o,r,a=Mt(i[0],t);for(e=0,n=i.length;e<n;++e)r=o,o=a,a=e<n-1&&Mt(i[e+1],t),o&&(s=i[e],r&&(s.cp1x=Ii(s.cp1x,t.left,t.right),s.cp1y=Ii(s.cp1y,t.top,t.bottom)),a&&(s.cp2x=Ii(s.cp2x,t.left,t.right),s.cp2y=Ii(s.cp2y,t.top,t.bottom)))}function Vr(i,t,e,n,s){let o,r,a,l;if(t.spanGaps&&(i=i.filter(c=>!c.skip)),t.cubicInterpolationMode==="monotone")vu(i,s);else{let c=n?i[i.length-1]:i[0];for(o=0,r=i.length;o<r;++o)a=i[o],l=yu(c,a,i[Math.min(o+1,r-(n?0:1))%r],t.tension),a.cp1x=l.previous.x,a.cp1y=l.previous.y,a.cp2x=l.next.x,a.cp2y=l.next.y,c=a}t.capBezierPoints&&Mu(i,e)}function Gi(){return typeof window<"u"&&typeof document<"u"}function Xi(i){let t=i.parentNode;return t&&t.toString()==="[object ShadowRoot]"&&(t=t.host),t}function Bi(i,t,e){let n;return typeof i=="string"?(n=parseInt(i,10),i.indexOf("%")!==-1&&(n=n/100*t.parentNode[e])):n=i,n}function Su(i,t){return Ji(i).getPropertyValue(t)}function Jt(i,t,e){let n={};e=e?"-"+e:"";for(let s=0;s<4;s++){let o=ku[s];n[o]=parseFloat(i[t+"-"+o+e])||0}return n.width=n.left+n.right,n.height=n.top+n.bottom,n}function wu(i,t){let e=i.touches,n=e&&e.length?e[0]:i,{offsetX:s,offsetY:o}=n,r=!1,a,l;if(Tu(s,o,i.target))a=s,l=o;else{let c=t.getBoundingClientRect();a=n.clientX-c.left,l=n.clientY-c.top,r=!0}return{x:a,y:l,box:r}}function jt(i,t){if("native"in i)return i;let{canvas:e,currentDevicePixelRatio:n}=t,s=Ji(e),o=s.boxSizing==="border-box",r=Jt(s,"padding"),a=Jt(s,"border","width"),{x:l,y:c,box:d}=wu(i,e),u=r.left+(d&&a.left),h=r.top+(d&&a.top),{width:f,height:g}=t;return o&&(f-=r.width+a.width,g-=r.height+a.height),{x:Math.round((l-u)/f*e.width/n),y:Math.round((c-h)/g*e.height/n)}}function Cu(i,t,e){let n,s;if(t===void 0||e===void 0){let o=i&&Xi(i);if(!o)t=i.clientWidth,e=i.clientHeight;else{let r=o.getBoundingClientRect(),a=Ji(o),l=Jt(a,"border","width"),c=Jt(a,"padding");t=r.width-c.width-l.width,e=r.height-c.height-l.height,n=Bi(a.maxWidth,o,"clientWidth"),s=Bi(a.maxHeight,o,"clientHeight")}}return{width:t,height:e,maxWidth:n||Hi,maxHeight:s||Hi}}function jr(i,t,e,n){let s=Ji(i),o=Jt(s,"margin"),r=Bi(s.maxWidth,i,"clientWidth")||Hi,a=Bi(s.maxHeight,i,"clientHeight")||Hi,l=Cu(i,t,e),{width:c,height:d}=l;if(s.boxSizing==="content-box"){let h=Jt(s,"border","width"),f=Jt(s,"padding");c-=f.width+h.width,d-=f.height+h.height}return c=Math.max(0,c-o.width),d=Math.max(0,n?c/n:d-o.height),c=zt(Math.min(c,r,l.maxWidth)),d=zt(Math.min(d,a,l.maxHeight)),c&&!d&&(d=zt(c/2)),(t!==void 0||e!==void 0)&&n&&l.height&&d>l.height&&(d=l.height,c=zt(Math.floor(d*n))),{width:c,height:d}}function us(i,t,e){let n=t||1,s=zt(i.height*n),o=zt(i.width*n);i.height=zt(i.height),i.width=zt(i.width);let r=i.canvas;return r.style&&(e||!r.style.height&&!r.style.width)&&(r.style.height=`${i.height}px`,r.style.width=`${i.width}px`),i.currentDevicePixelRatio!==n||r.height!==s||r.width!==o?(i.currentDevicePixelRatio=n,r.height=s,r.width=o,i.ctx.setTransform(n,0,0,n,0,0),!0):!1}function hs(i,t){let e=Su(i,t),n=e&&e.match(/^(\d+)(\.\d+)?px$/);return n?+n[1]:void 0}function Ht(i,t,e,n){return{x:i.x+e*(t.x-i.x),y:i.y+e*(t.y-i.y)}}function Yr(i,t,e,n){return{x:i.x+e*(t.x-i.x),y:n==="middle"?e<.5?i.y:t.y:n==="after"?e<1?i.y:t.y:e>0?t.y:i.y}}function Ur(i,t,e,n){let s={x:i.cp2x,y:i.cp2y},o={x:t.cp1x,y:t.cp1y},r=Ht(i,s,e),a=Ht(s,o,e),l=Ht(o,t,e),c=Ht(r,a,e),d=Ht(a,l,e);return Ht(c,d,e)}function te(i,t,e){return i?Eu(t,e):Lu()}function fs(i,t){let e,n;(t==="ltr"||t==="rtl")&&(e=i.canvas.style,n=[e.getPropertyValue("direction"),e.getPropertyPriority("direction")],e.setProperty("direction",t,"important"),i.prevTextDirection=n)}function gs(i,t){t!==void 0&&(delete i.prevTextDirection,i.canvas.style.setProperty("direction",t[0],t[1]))}function Kr(i){return i==="angle"?{between:ve,compare:Yd,normalize:tt}:{between:kt,compare:(t,e)=>t-e,normalize:t=>t}}function yr({start:i,end:t,count:e,loop:n,style:s}){return{start:i%e,end:t%e,loop:n&&(t-i+1)%e===0,style:s}}function Du(i,t,e){let{property:n,start:s,end:o}=e,{between:r,normalize:a}=Kr(n),l=t.length,{start:c,end:d,loop:u}=i,h,f;if(u){for(c+=l,d+=l,h=0,f=l;h<f&&r(a(t[c%l][n]),s,o);++h)c--,d--;c%=l,d%=l}return d<c&&(d+=l),{start:c,end:d,loop:u,style:i.style}}function ps(i,t,e){if(!e)return[i];let{property:n,start:s,end:o}=e,r=t.length,{compare:a,between:l,normalize:c}=Kr(n),{start:d,end:u,loop:h,style:f}=Du(i,t,e),g=[],p=!1,m=null,b,y,_,v=()=>l(s,_,b)&&a(s,_)!==0,x=()=>a(o,b)===0||l(o,_,b),S=()=>p||v(),k=()=>!p||x();for(let T=d,w=d;T<=u;++T)y=t[T%r],!y.skip&&(b=c(y[n]),b!==_&&(p=l(b,s,o),m===null&&S()&&(m=a(b,s)===0?T:w),m!==null&&k()&&(g.push(yr({start:m,end:T,loop:h,count:r,style:f})),m=null),w=T,_=b));return m!==null&&g.push(yr({start:m,end:u,loop:h,count:r,style:f})),g}function ms(i,t){let e=[],n=i.segments;for(let s=0;s<n.length;s++){let o=ps(n[s],i.points,t);o.length&&e.push(...o)}return e}function Au(i,t,e,n){let s=0,o=t-1;if(e&&!n)for(;s<t&&!i[s].skip;)s++;for(;s<t&&i[s].skip;)s++;for(s%=t,e&&(o+=s);o>s&&i[o%t].skip;)o--;return o%=t,{start:s,end:o}}function Pu(i,t,e,n){let s=i.length,o=[],r=t,a=i[t],l;for(l=t+1;l<=e;++l){let c=i[l%s];c.skip||c.stop?a.skip||(n=!1,o.push({start:t%s,end:(l-1)%s,loop:n}),t=r=c.stop?l:null):(r=l,a.skip&&(t=l)),a=c}return r!==null&&o.push({start:t%s,end:r%s,loop:n}),o}function Gr(i,t){let e=i.points,n=i.options.spanGaps,s=e.length;if(!s)return[];let o=!!i._loop,{start:r,end:a}=Au(e,s,o,n);if(n===!0)return xr(i,[{start:r,end:a,loop:o}],e,t);let l=a<r?a+s:a,c=!!i._fullLoop&&r===0&&a===s-1;return xr(i,Pu(e,r,l,c),e,t)}function xr(i,t,e,n){return!n||!n.setContext||!e?t:Ru(i,t,e,n)}function Ru(i,t,e,n){let s=i._chart.getContext(),o=_r(i.options),{_datasetIndex:r,options:{spanGaps:a}}=i,l=e.length,c=[],d=o,u=t[0].start,h=u;function f(g,p,m,b){let y=a?-1:1;if(g!==p){for(g+=l;e[g%l].skip;)g-=y;for(;e[p%l].skip;)p+=y;g%l!==p%l&&(c.push({start:g%l,end:p%l,loop:m,style:b}),d=b,u=p%l)}}for(let g of t){u=a?u:g.start;let p=e[u%l],m;for(h=u+1;h<=g.end;h++){let b=e[h%l];m=_r(n.setContext(Pt(s,{type:"segment",p0:p,p1:b,p0DataIndex:(h-1)%l,p1DataIndex:h%l,datasetIndex:r}))),Ou(m,d)&&f(u,h-1,g.loop,d),p=b,d=m}u<h-1&&f(u,h-1,g.loop,d)}return c}function _r(i){return{backgroundColor:i.backgroundColor,borderCapStyle:i.borderCapStyle,borderDash:i.borderDash,borderDashOffset:i.borderDashOffset,borderJoinStyle:i.borderJoinStyle,borderWidth:i.borderWidth,borderColor:i.borderColor}}function Ou(i,t){if(!t)return!1;let e=[],n=function(s,o){return is(o)?(e.includes(o)||e.push(o),e.indexOf(o)):o};return JSON.stringify(i,n)!==JSON.stringify(t,n)}function Fi(i,t,e){return i.options.clip?i[e]:t[e]}function Iu(i,t){let{xScale:e,yScale:n}=i;return e&&n?{left:Fi(e,t,"left"),right:Fi(e,t,"right"),top:Fi(n,t,"top"),bottom:Fi(n,t,"bottom")}:t}function bs(i,t){let e=t._clip;if(e.disabled)return!1;let n=Iu(t,i.chartArea);return{left:e.left===!1?0:n.left-(e.left===!0?0:e.left),right:e.right===!1?i.width:n.right+(e.right===!0?0:e.right),top:e.top===!1?0:n.top-(e.top===!0?0:e.top),bottom:e.bottom===!1?i.height:n.bottom+(e.bottom===!0?0:e.bottom)}}var vr,Mr,jn,ur,xe,Lt,qn,F,V,Vd,Hi,jd,K,Xt,hr,Dt,xt,vt,Er,Dr,Zn,ji,et,Rr,Oi,fr,gr,pe,Ud,Kd,pr,Or,Xe,Bt,qi,Vn,j,su,ou,au,lu,ls,hu,bu,be,Nr,Ji,ku,Tu,zt,qr,Eu,Lu,Xr=E(()=>{dr();vr=(()=>{let i=0;return()=>i++})();Mr=(i,t)=>typeof i=="string"&&i.endsWith("%")?parseFloat(i)/100:+i/t,jn=(i,t)=>typeof i=="string"&&i.endsWith("%")?parseFloat(i)/100*t:+i;ur={"":i=>i,x:i=>i.x,y:i=>i.y};xe=i=>typeof i<"u",Lt=i=>typeof i=="function",qn=(i,t)=>{if(i.size!==t.size)return!1;for(let e of i)if(!t.has(e))return!1;return!0};F=Math.PI,V=2*F,Vd=V+F,Hi=Number.POSITIVE_INFINITY,jd=F/180,K=F/2,Xt=F/4,hr=F*2/3,Dt=Math.log10,xt=Math.sign;vt=(i,t,e,n)=>Vi(i,e,n?s=>{let o=i[s][t];return o<e||o===e&&i[s+1][t]===e}:s=>i[s][t]<e),Er=(i,t,e)=>Vi(i,e,n=>i[n][t]>=e);Dr=["push","pop","shift","splice","unshift"];Zn=(function(){return typeof window>"u"?function(i){return i()}:window.requestAnimationFrame})();ji=i=>i==="start"?"left":i==="end"?"right":"center",et=(i,t,e)=>i==="start"?t:i==="end"?e:(t+e)/2,Rr=(i,t,e,n)=>i===(n?"left":"right")?e:i==="center"?(t+e)/2:t;Oi=i=>i===0||i===1,fr=(i,t,e)=>-(Math.pow(2,10*(i-=1))*Math.sin((i-t)*V/e)),gr=(i,t,e)=>Math.pow(2,-10*i)*Math.sin((i-t)*V/e)+1,pe={linear:i=>i,easeInQuad:i=>i*i,easeOutQuad:i=>-i*(i-2),easeInOutQuad:i=>(i/=.5)<1?.5*i*i:-.5*(--i*(i-2)-1),easeInCubic:i=>i*i*i,easeOutCubic:i=>(i-=1)*i*i+1,easeInOutCubic:i=>(i/=.5)<1?.5*i*i*i:.5*((i-=2)*i*i+2),easeInQuart:i=>i*i*i*i,easeOutQuart:i=>-((i-=1)*i*i*i-1),easeInOutQuart:i=>(i/=.5)<1?.5*i*i*i*i:-.5*((i-=2)*i*i*i-2),easeInQuint:i=>i*i*i*i*i,easeOutQuint:i=>(i-=1)*i*i*i*i+1,easeInOutQuint:i=>(i/=.5)<1?.5*i*i*i*i*i:.5*((i-=2)*i*i*i*i+2),easeInSine:i=>-Math.cos(i*K)+1,easeOutSine:i=>Math.sin(i*K),easeInOutSine:i=>-.5*(Math.cos(F*i)-1),easeInExpo:i=>i===0?0:Math.pow(2,10*(i-1)),easeOutExpo:i=>i===1?1:-Math.pow(2,-10*i)+1,easeInOutExpo:i=>Oi(i)?i:i<.5?.5*Math.pow(2,10*(i*2-1)):.5*(-Math.pow(2,-10*(i*2-1))+2),easeInCirc:i=>i>=1?i:-(Math.sqrt(1-i*i)-1),easeOutCirc:i=>Math.sqrt(1-(i-=1)*i),easeInOutCirc:i=>(i/=.5)<1?-.5*(Math.sqrt(1-i*i)-1):.5*(Math.sqrt(1-(i-=2)*i)+1),easeInElastic:i=>Oi(i)?i:fr(i,.075,.3),easeOutElastic:i=>Oi(i)?i:gr(i,.075,.3),easeInOutElastic(i){return Oi(i)?i:i<.5?.5*fr(i*2,.1125,.45):.5+.5*gr(i*2-1,.1125,.45)},easeInBack(i){return i*i*((1.70158+1)*i-1.70158)},easeOutBack(i){return(i-=1)*i*((1.70158+1)*i+1.70158)+1},easeInOutBack(i){let t=1.70158;return(i/=.5)<1?.5*(i*i*(((t*=1.525)+1)*i-t)):.5*((i-=2)*i*(((t*=1.525)+1)*i+t)+2)},easeInBounce:i=>1-pe.easeOutBounce(1-i),easeOutBounce(i){return i<1/2.75?7.5625*i*i:i<2/2.75?7.5625*(i-=1.5/2.75)*i+.75:i<2.5/2.75?7.5625*(i-=2.25/2.75)*i+.9375:7.5625*(i-=2.625/2.75)*i+.984375},easeInOutBounce:i=>i<.5?pe.easeInBounce(i*2)*.5:pe.easeOutBounce(i*2-1)*.5+.5};Ud=["x","y","borderWidth","radius","tension"],Kd=["color","borderColor","backgroundColor"];pr=new Map;Or={values(i){return N(i)?i:""+i},numeric(i,t,e){if(i===0)return"0";let n=this.chart.options.locale,s,o=i;if(e.length>1){let c=Math.max(Math.abs(e[0].value),Math.abs(e[e.length-1].value));(c<1e-4||c>1e15)&&(s="scientific"),o=Zd(i,e)}let r=Dt(Math.abs(o)),a=isNaN(r)?1:Math.max(Math.min(-1*Math.floor(r),20),0),l={notation:s,minimumFractionDigits:a,maximumFractionDigits:a};return Object.assign(l,this.options.ticks.format),Me(i,n,l)},logarithmic(i,t,e){if(i===0)return"0";let n=e[t].significand||i/Math.pow(10,Math.floor(Dt(i)));return[1,2,3,5,10,15].includes(n)||t>.8*e.length?Or.numeric.call(this,i,t,e):""}};Xe={formatters:Or};Bt=Object.create(null),qi=Object.create(null);Vn=class{constructor(t,e){this.animation=void 0,this.backgroundColor="rgba(0,0,0,0.1)",this.borderColor="rgba(0,0,0,0.1)",this.color="#666",this.datasets={},this.devicePixelRatio=n=>n.chart.platform.getDevicePixelRatio(),this.elements={},this.events=["mousemove","mouseout","click","touchstart","touchmove"],this.font={family:"'Helvetica Neue', 'Helvetica', 'Arial', sans-serif",size:12,style:"normal",lineHeight:1.2,weight:null},this.hover={},this.hoverBackgroundColor=(n,s)=>Wn(s.backgroundColor),this.hoverBorderColor=(n,s)=>Wn(s.borderColor),this.hoverColor=(n,s)=>Wn(s.color),this.indexAxis="x",this.interaction={mode:"nearest",intersect:!0,includeInvisible:!1},this.maintainAspectRatio=!0,this.onHover=null,this.onClick=null,this.parsing=!0,this.plugins={},this.responsive=!0,this.scale=void 0,this.scales={},this.showLine=!0,this.drawActiveElementsOnTop=!0,this.describe(t),this.apply(e)}set(t,e){return Nn(this,t,e)}get(t){return Ue(this,t)}describe(t,e){return Nn(qi,t,e)}override(t,e){return Nn(Bt,t,e)}route(t,e,n,s){let o=Ue(this,t),r=Ue(this,n),a="_"+e;Object.defineProperties(o,{[a]:{value:o[e],writable:!0},[e]:{enumerable:!0,get(){let l=this[a],c=r[s];return O(l)?Object.assign({},c,l):C(l,c)},set(l){this[a]=l}}})}apply(t){t.forEach(e=>e(this))}},j=new Vn({_scriptable:i=>!i.startsWith("on"),_indexable:i=>i!=="events",hover:{_fallback:"interaction"},interaction:{_scriptable:!1,_indexable:!1}},[Gd,Xd,Qd]);su=/^(normal|(\d+(?:\.\d+)?)(px|em|%)?)$/,ou=/^(normal|italic|initial|inherit|unset|(oblique( -?[0-9]?[0-9]deg)?))$/;au=i=>+i||0;lu=(i,t)=>i?i+Wi(t):t,ls=(i,t)=>O(t)&&i!=="adapters"&&(Object.getPrototypeOf(t)===null||t.constructor===Object);hu=(i,t)=>i===!0?t:typeof i=="string"?At(t,i):void 0;bu=Number.EPSILON||1e-14,be=(i,t)=>t<i.length&&!i[t].skip&&i[t],Nr=i=>i==="x"?"y":"x";Ji=i=>i.ownerDocument.defaultView.getComputedStyle(i,null);ku=["top","right","bottom","left"];Tu=(i,t,e)=>(i>0||t>0)&&(!e||!e.shadowRoot);zt=i=>Math.round(i*10)/10;qr=(function(){let i=!1;try{let t={get passive(){return i=!0,!1}};Gi()&&(window.addEventListener("test",null,t),window.removeEventListener("test",null,t))}catch{}return i})();Eu=function(i,t){return{x(e){return i+i+t-e},setWidth(e){t=e},textAlign(e){return e==="center"?e:e==="right"?"left":"right"},xPlus(e,n){return e-n},leftForLtr(e,n){return e-n}}},Lu=function(){return{x(i){return i},setWidth(i){},textAlign(i){return i},xPlus(i,t){return i+t},leftForLtr(i,t){return i}}}});function $u(i,t){let e=[],n=Object.keys(t);for(let s=0;s<n.length;s++){let o=i[n[s]];o&&o.active()&&e.push(o.wait())}return Promise.all(e)}function Hu(i,t){if(!t)return;let e=i.options;if(!e){i.options=t;return}return e.$shared&&(i.options=e=Object.assign({},e,{$shared:!1,$animations:{}})),e}function Zr(i,t){let e=i&&i.options||{},n=e.reverse,s=e.min===void 0?t:0,o=e.max===void 0?t:0;return{start:n?o:s,end:n?s:o}}function zu(i,t,e){if(e===!1)return!1;let n=Zr(i,e),s=Zr(t,e);return{top:s.end,right:n.end,bottom:s.start,left:n.start}}function Bu(i){let t,e,n,s;return O(i)?(t=i.top,e=i.right,n=i.bottom,s=i.left):t=e=n=s=i,{top:t,right:e,bottom:n,left:s,disabled:i===!1}}function Xa(i,t){let e=[],n=i._getSortedDatasetMetas(t),s,o;for(s=0,o=n.length;s<o;++s)e.push(n[s].index);return e}function Qr(i,t,e,n={}){let s=i.keys,o=n.mode==="single",r,a,l,c;if(t===null)return;let d=!1;for(r=0,a=s.length;r<a;++r){if(l=+s[r],l===e){if(d=!0,n.all)continue;break}c=i.values[l],Y(c)&&(o||t===0||xt(t)===xt(c))&&(t+=c)}return!d&&!n.all?0:t}function Wu(i,t){let{iScale:e,vScale:n}=t,s=e.axis==="x"?"x":"y",o=n.axis==="x"?"x":"y",r=Object.keys(i),a=new Array(r.length),l,c,d;for(l=0,c=r.length;l<c;++l)d=r[l],a[l]={[s]:d,[o]:i[d]};return a}function ys(i,t){let e=i&&i.options.stacked;return e||e===void 0&&t.stack!==void 0}function Nu(i,t,e){return`${i.id}.${t.id}.${e.stack||e.type}`}function Vu(i){let{min:t,max:e,minDefined:n,maxDefined:s}=i.getUserBounds();return{min:n?t:Number.NEGATIVE_INFINITY,max:s?e:Number.POSITIVE_INFINITY}}function ju(i,t,e){let n=i[t]||(i[t]={});return n[e]||(n[e]={})}function ta(i,t,e,n){for(let s of t.getMatchingVisibleMetas(n).reverse()){let o=i[s.index];if(e&&o>0||!e&&o<0)return s.index}return null}function ea(i,t){let{chart:e,_cachedMeta:n}=i,s=e._stacks||(e._stacks={}),{iScale:o,vScale:r,index:a}=n,l=o.axis,c=r.axis,d=Nu(o,r,n),u=t.length,h;for(let f=0;f<u;++f){let g=t[f],{[l]:p,[c]:m}=g,b=g._stacks||(g._stacks={});h=b[c]=ju(s,d,p),h[a]=m,h._top=ta(h,r,!0,n.type),h._bottom=ta(h,r,!1,n.type);let y=h._visualValues||(h._visualValues={});y[a]=m}}function xs(i,t){let e=i.scales;return Object.keys(e).filter(n=>e[n].axis===t).shift()}function qu(i,t){return Pt(i,{active:!1,dataset:void 0,datasetIndex:t,index:t,mode:"default",type:"dataset"})}function Yu(i,t,e){return Pt(i,{active:!1,dataIndex:t,parsed:void 0,raw:void 0,element:e,index:t,mode:"default",type:"data"})}function Qe(i,t){let e=i.controller.index,n=i.vScale&&i.vScale.axis;if(n){t=t||i._parsed;for(let s of t){let o=s._stacks;if(!o||o[n]===void 0||o[n][e]===void 0)return;delete o[n][e],o[n]._visualValues!==void 0&&o[n]._visualValues[e]!==void 0&&delete o[n]._visualValues[e]}}}function Ku(i,t){if(!i._cache.$bar){let e=i.getMatchingVisibleMetas(t),n=[];for(let s=0,o=e.length;s<o;s++)n=n.concat(e[s].controller.getAllParsedValues(i));i._cache.$bar=Jn(n.sort((s,o)=>s-o))}return i._cache.$bar}function Gu(i){let t=i.iScale,e=Ku(t,i.type),n=t._length,s,o,r,a,l=()=>{r===32767||r===-32768||(xe(a)&&(n=Math.min(n,Math.abs(r-a)||n)),a=r)};for(s=0,o=e.length;s<o;++s)r=t.getPixelForValue(e[s]),l();for(a=void 0,s=0,o=t.ticks.length;s<o;++s)r=t.getPixelForTick(s),l();return n}function Xu(i,t,e,n){let s=e.barThickness,o,r;return P(s)?(o=t.min*e.categoryPercentage,r=e.barPercentage):(o=s*n,r=1),{chunk:o/n,ratio:r,start:t.pixels[i]-o/2}}function Ju(i,t,e,n){let s=t.pixels,o=s[i],r=i>0?s[i-1]:null,a=i<s.length-1?s[i+1]:null,l=e.categoryPercentage;r===null&&(r=o-(a===null?t.end-t.start:a-o)),a===null&&(a=o+o-r);let c=o-(o-Math.min(r,a))/2*l;return{chunk:Math.abs(a-r)/2*l/n,ratio:e.barPercentage,start:c}}function Zu(i,t,e,n){let s=e.parse(i[0],n),o=e.parse(i[1],n),r=Math.min(s,o),a=Math.max(s,o),l=r,c=a;Math.abs(r)>Math.abs(a)&&(l=a,c=r),t[e.axis]=c,t._custom={barStart:l,barEnd:c,start:s,end:o,min:r,max:a}}function Ja(i,t,e,n){return N(i)?Zu(i,t,e,n):t[e.axis]=e.parse(i,n),t}function na(i,t,e,n){let s=i.iScale,o=i.vScale,r=s.getLabels(),a=s===o,l=[],c,d,u,h;for(c=e,d=e+n;c<d;++c)h=t[c],u={},u[s.axis]=a||s.parse(r[c],c),l.push(Ja(h,u,o,c));return l}function vs(i){return i&&i.barStart!==void 0&&i.barEnd!==void 0}function Qu(i,t,e){return i!==0?xt(i):(t.isHorizontal()?1:-1)*(t.min>=e?1:-1)}function th(i){let t,e,n,s,o;return i.horizontal?(t=i.base>i.x,e="left",n="right"):(t=i.base<i.y,e="bottom",n="top"),t?(s="end",o="start"):(s="start",o="end"),{start:e,end:n,reverse:t,top:s,bottom:o}}function eh(i,t,e,n){let s=t.borderSkipped,o={};if(!s){i.borderSkipped=o;return}if(s===!0){i.borderSkipped={top:!0,right:!0,bottom:!0,left:!0};return}let{start:r,end:a,reverse:l,top:c,bottom:d}=th(i);s==="middle"&&e&&(i.enableBorderRadius=!0,(e._top||0)===n?s=c:(e._bottom||0)===n?s=d:(o[sa(d,r,a,l)]=!0,s=c)),o[sa(s,r,a,l)]=!0,i.borderSkipped=o}function sa(i,t,e,n){return n?(i=ih(i,t,e),i=oa(i,e,t)):i=oa(i,t,e),i}function ih(i,t,e){return i===t?e:i===e?t:i}function oa(i,t,e){return i==="start"?t:i==="end"?e:i}function nh(i,{inflateAmount:t},e){i.inflateAmount=t==="auto"?e===1?.33:0:t}function sh(i,t,e){let n=1,s=1,o=0,r=0;if(t<V){let a=i,l=a+t,c=Math.cos(a),d=Math.sin(a),u=Math.cos(l),h=Math.sin(l),f=(_,v,x)=>ve(_,a,l,!0)?1:Math.max(v,v*e,x,x*e),g=(_,v,x)=>ve(_,a,l,!0)?-1:Math.min(v,v*e,x,x*e),p=f(0,c,u),m=f(K,d,h),b=g(F,c,u),y=g(F+K,d,h);n=(p-b)/2,s=(m-y)/2,o=-(p+b)/2,r=-(m+y)/2}return{ratioX:n,ratioY:s,offsetX:o,offsetY:r}}function ee(){throw new Error("This method is not implemented: Check that a complete date adapter is provided.")}function ah(i,t,e,n){let{controller:s,data:o,_sorted:r}=i,a=s._cachedMeta.iScale,l=i.dataset&&i.dataset.options?i.dataset.options.spanGaps:null;if(a&&t===a.axis&&t!=="r"&&r&&o.length){let c=a._reversePixels?Er:vt;if(n){if(s._sharedOptions){let d=o[0],u=typeof d.getRange=="function"&&d.getRange(t);if(u){let h=c(o,t,e-u),f=c(o,t,e+u);return{lo:h.lo,hi:f.hi}}}}else{let d=c(o,t,e);if(l){let{vScale:u}=s._cachedMeta,{_parsed:h}=i,f=h.slice(0,d.lo+1).reverse().findIndex(p=>!P(p[u.axis]));d.lo-=Math.max(0,f);let g=h.slice(d.hi).findIndex(p=>!P(p[u.axis]));d.hi+=Math.max(0,g)}return d}}return{lo:0,hi:o.length-1}}function pi(i,t,e,n,s){let o=i.getSortedVisibleDatasetMetas(),r=e[t];for(let a=0,l=o.length;a<l;++a){let{index:c,data:d}=o[a],{lo:u,hi:h}=ah(o[a],t,r,s);for(let f=u;f<=h;++f){let g=d[f];g.skip||n(g,c,f)}}}function lh(i){let t=i.indexOf("x")!==-1,e=i.indexOf("y")!==-1;return function(n,s){let o=t?Math.abs(n.x-s.x):0,r=e?Math.abs(n.y-s.y):0;return Math.sqrt(Math.pow(o,2)+Math.pow(r,2))}}function Ms(i,t,e,n,s){let o=[];return!s&&!i.isPointInArea(t)||pi(i,e,t,function(a,l,c){!s&&!Mt(a,i.chartArea,0)||a.inRange(t.x,t.y,n)&&o.push({element:a,datasetIndex:l,index:c})},!0),o}function ch(i,t,e,n){let s=[];function o(r,a,l){let{startAngle:c,endAngle:d}=r.getProps(["startAngle","endAngle"],n),{angle:u}=Gn(r,{x:t.x,y:t.y});ve(u,c,d)&&s.push({element:r,datasetIndex:a,index:l})}return pi(i,e,t,o),s}function dh(i,t,e,n,s,o){let r=[],a=lh(e),l=Number.POSITIVE_INFINITY;function c(d,u,h){let f=d.inRange(t.x,t.y,s);if(n&&!f)return;let g=d.getCenterPoint(s);if(!(!!o||i.isPointInArea(g))&&!f)return;let m=a(t,g);m<l?(r=[{element:d,datasetIndex:u,index:h}],l=m):m===l&&r.push({element:d,datasetIndex:u,index:h})}return pi(i,e,t,c),r}function Ss(i,t,e,n,s,o){return!o&&!i.isPointInArea(t)?[]:e==="r"&&!n?ch(i,t,e,s):dh(i,t,e,n,s,o)}function ra(i,t,e,n,s){let o=[],r=e==="x"?"inXRange":"inYRange",a=!1;return pi(i,e,t,(l,c,d)=>{l[r]&&l[r](t[e],s)&&(o.push({element:l,datasetIndex:c,index:d}),a=a||l.inRange(t.x,t.y,s))}),n&&!a?[]:o}function ti(i,t){return i.filter(e=>e.pos===t)}function aa(i,t){return i.filter(e=>Za.indexOf(e.pos)===-1&&e.box.axis===t)}function ei(i,t){return i.sort((e,n)=>{let s=t?n:e,o=t?e:n;return s.weight===o.weight?s.index-o.index:s.weight-o.weight})}function hh(i){let t=[],e,n,s,o,r,a;for(e=0,n=(i||[]).length;e<n;++e)s=i[e],{position:o,options:{stack:r,stackWeight:a=1}}=s,t.push({index:e,box:s,pos:o,horizontal:s.isHorizontal(),weight:s.weight,stack:r&&o+r,stackWeight:a});return t}function fh(i){let t={};for(let e of i){let{stack:n,pos:s,stackWeight:o}=e;if(!n||!Za.includes(s))continue;let r=t[n]||(t[n]={count:0,placed:0,weight:0,size:0});r.count++,r.weight+=o}return t}function gh(i,t){let e=fh(i),{vBoxMaxWidth:n,hBoxMaxHeight:s}=t,o,r,a;for(o=0,r=i.length;o<r;++o){a=i[o];let{fullSize:l}=a.box,c=e[a.stack],d=c&&a.stackWeight/c.weight;a.horizontal?(a.width=d?d*n:l&&t.availableWidth,a.height=s):(a.width=n,a.height=d?d*s:l&&t.availableHeight)}return e}function ph(i){let t=hh(i),e=ei(t.filter(c=>c.box.fullSize),!0),n=ei(ti(t,"left"),!0),s=ei(ti(t,"right")),o=ei(ti(t,"top"),!0),r=ei(ti(t,"bottom")),a=aa(t,"x"),l=aa(t,"y");return{fullSize:e,leftAndTop:n.concat(o),rightAndBottom:s.concat(l).concat(r).concat(a),chartArea:ti(t,"chartArea"),vertical:n.concat(s).concat(l),horizontal:o.concat(r).concat(a)}}function la(i,t,e,n){return Math.max(i[e],t[e])+Math.max(i[n],t[n])}function Qa(i,t){i.top=Math.max(i.top,t.top),i.left=Math.max(i.left,t.left),i.bottom=Math.max(i.bottom,t.bottom),i.right=Math.max(i.right,t.right)}function mh(i,t,e,n){let{pos:s,box:o}=e,r=i.maxPadding;if(!O(s)){e.size&&(i[s]-=e.size);let u=n[e.stack]||{size:0,count:1};u.size=Math.max(u.size,e.horizontal?o.height:o.width),e.size=u.size/u.count,i[s]+=e.size}o.getPadding&&Qa(r,o.getPadding());let a=Math.max(0,t.outerWidth-la(r,i,"left","right")),l=Math.max(0,t.outerHeight-la(r,i,"top","bottom")),c=a!==i.w,d=l!==i.h;return i.w=a,i.h=l,e.horizontal?{same:c,other:d}:{same:d,other:c}}function bh(i){let t=i.maxPadding;function e(n){let s=Math.max(t[n]-i[n],0);return i[n]+=s,s}i.y+=e("top"),i.x+=e("left"),e("right"),e("bottom")}function yh(i,t){let e=t.maxPadding;function n(s){let o={left:0,top:0,right:0,bottom:0};return s.forEach(r=>{o[r]=Math.max(t[r],e[r])}),o}return n(i?["left","right"]:["top","bottom"])}function oi(i,t,e,n){let s=[],o,r,a,l,c,d;for(o=0,r=i.length,c=0;o<r;++o){a=i[o],l=a.box,l.update(a.width||t.w,a.height||t.h,yh(a.horizontal,t));let{same:u,other:h}=mh(t,e,a,n);c|=u&&s.length,d=d||h,l.fullSize||s.push(a)}return c&&oi(s,t,e,n)||d}function Zi(i,t,e,n,s){i.top=e,i.left=t,i.right=t+n,i.bottom=e+s,i.width=n,i.height=s}function ca(i,t,e,n){let s=e.padding,{x:o,y:r}=t;for(let a of i){let l=a.box,c=n[a.stack]||{count:1,placed:0,weight:1},d=a.stackWeight/c.weight||1;if(a.horizontal){let u=t.w*d,h=c.size||l.height;xe(c.start)&&(r=c.start),l.fullSize?Zi(l,s.left,r,e.outerWidth-s.right-s.left,h):Zi(l,t.left+c.placed,r,u,h),c.start=r,c.placed+=u,r=l.bottom}else{let u=t.h*d,h=c.size||l.width;xe(c.start)&&(o=c.start),l.fullSize?Zi(l,o,s.top,h,e.outerHeight-s.bottom-s.top):Zi(l,o,t.top+c.placed,h,u),c.start=o,c.placed+=u,o=l.right}}t.x=o,t.y=r}function _h(i,t){let e=i.style,n=i.getAttribute("height"),s=i.getAttribute("width");if(i[on]={initial:{height:n,width:s,style:{display:e.display,height:e.height,width:e.width}}},e.display=e.display||"block",e.boxSizing=e.boxSizing||"border-box",da(s)){let o=hs(i,"width");o!==void 0&&(i.width=o)}if(da(n))if(i.style.height==="")i.height=i.width/(t||2);else{let o=hs(i,"height");o!==void 0&&(i.height=o)}return i}function vh(i,t,e){i&&i.addEventListener(t,e,tl)}function Mh(i,t,e){i&&i.canvas&&i.canvas.removeEventListener(t,e,tl)}function Sh(i,t){let e=xh[i.type]||i.type,{x:n,y:s}=jt(i,t);return{type:e,chart:t,native:i,x:n!==void 0?n:null,y:s!==void 0?s:null}}function cn(i,t){for(let e of i)if(e===t||e.contains(t))return!0}function kh(i,t,e){let n=i.canvas,s=new MutationObserver(o=>{let r=!1;for(let a of o)r=r||cn(a.addedNodes,n),r=r&&!cn(a.removedNodes,n);r&&e()});return s.observe(document,{childList:!0,subtree:!0}),s}function Th(i,t,e){let n=i.canvas,s=new MutationObserver(o=>{let r=!1;for(let a of o)r=r||cn(a.removedNodes,n),r=r&&!cn(a.addedNodes,n);r&&e()});return s.observe(document,{childList:!0,subtree:!0}),s}function el(){let i=window.devicePixelRatio;i!==ua&&(ua=i,hi.forEach((t,e)=>{e.currentDevicePixelRatio!==i&&t()}))}function wh(i,t){hi.size||window.addEventListener("resize",el),hi.set(i,t)}function Ch(i){hi.delete(i),hi.size||window.removeEventListener("resize",el)}function Eh(i,t,e){let n=i.canvas,s=n&&Xi(n);if(!s)return;let o=Qn((a,l)=>{let c=s.clientWidth;e(a,l),c<s.clientWidth&&e()},window),r=new ResizeObserver(a=>{let l=a[0],c=l.contentRect.width,d=l.contentRect.height;c===0&&d===0||o(c,d)});return r.observe(s),wh(i,o),r}function ks(i,t,e){e&&e.disconnect(),t==="resize"&&Ch(i)}function Lh(i,t,e){let n=i.canvas,s=Qn(o=>{i.ctx!==null&&e(Sh(o,i))},i);return vh(n,t,s),s}function Dh(i){return!Gi()||typeof OffscreenCanvas<"u"&&i instanceof OffscreenCanvas?Ps:Rs}function Ah(i,t){let e=i.options.ticks,n=Ph(i),s=Math.min(e.maxTicksLimit||n,n),o=e.major.enabled?Oh(t):[],r=o.length,a=o[0],l=o[r-1],c=[];if(r>s)return Ih(t,c,o,r/s),c;let d=Rh(o,t,s);if(r>0){let u,h,f=r>1?Math.round((l-a)/(r-1)):null;for(Qi(t,c,d,P(f)?0:a-f,a),u=0,h=r-1;u<h;u++)Qi(t,c,d,o[u],o[u+1]);return Qi(t,c,d,l,P(f)?t.length:l+f),c}return Qi(t,c,d),c}function Ph(i){let t=i.options.offset,e=i._tickSize(),n=i._length/e+(t?0:1),s=i._maxLength/e;return Math.floor(Math.min(n,s))}function Rh(i,t,e){let n=Fh(i),s=t.length/e;if(!n)return Math.max(s,1);let o=Tr(n);for(let r=0,a=o.length-1;r<a;r++){let l=o[r];if(l>s)return l}return Math.max(s,1)}function Oh(i){let t=[],e,n;for(e=0,n=i.length;e<n;e++)i[e].major&&t.push(e);return t}function Ih(i,t,e,n){let s=0,o=e[0],r;for(n=Math.ceil(n),r=0;r<i.length;r++)r===o&&(t.push(i[r]),s++,o=e[s*n])}function Qi(i,t,e,n,s){let o=C(n,0),r=Math.min(C(s,i.length),i.length),a=0,l,c,d;for(e=Math.ceil(e),s&&(l=s-n,e=l/Math.floor(l/e)),d=o;d<0;)a++,d=Math.round(o+a*e);for(c=Math.max(o,0);c<r;c++)c===d&&(t.push(i[c]),a++,d=Math.round(o+a*e))}function Fh(i){let t=i.length,e,n;if(t<2)return!1;for(n=i[0],e=1;e<t;++e)if(i[e]-i[e-1]!==n)return!1;return n}function ga(i,t){let e=[],n=i.length/t,s=i.length,o=0;for(;o<s;o+=n)e.push(i[Math.floor(o)]);return e}function Hh(i,t,e){let n=i.ticks.length,s=Math.min(t,n-1),o=i._startPixel,r=i._endPixel,a=1e-6,l=i.getPixelForTick(s),c;if(!(e&&(n===1?c=Math.max(l-o,r-l):t===0?c=(i.getPixelForTick(1)-l)/2:c=(l-i.getPixelForTick(s-1))/2,l+=s<t?c:-c,l<o-a||l>r+a)))return l}function zh(i,t){H(i,e=>{let n=e.gc,s=n.length/2,o;if(s>t){for(o=0;o<s;++o)delete e.data[n[o]];n.splice(0,s)}})}function ii(i){return i.drawTicks?i.tickLength:0}function pa(i,t){if(!i.display)return 0;let e=J(i.font,t),n=it(i.padding);return(N(i.text)?i.text.length:1)*e.lineHeight+n.height}function Bh(i,t){return Pt(i,{scale:t,type:"scale"})}function Wh(i,t,e){return Pt(i,{tick:e,index:t,type:"tick"})}function Nh(i,t,e){let n=ji(i);return(e&&t!=="right"||!e&&t==="right")&&(n=$h(n)),n}function Vh(i,t,e,n){let{top:s,left:o,bottom:r,right:a,chart:l}=i,{chartArea:c,scales:d}=l,u=0,h,f,g,p=r-s,m=a-o;if(i.isHorizontal()){if(f=et(n,o,a),O(e)){let b=Object.keys(e)[0],y=e[b];g=d[b].getPixelForValue(y)+p-t}else e==="center"?g=(c.bottom+c.top)/2+p-t:g=ha(i,e,t);h=a-o}else{if(O(e)){let b=Object.keys(e)[0],y=e[b];f=d[b].getPixelForValue(y)-m+t}else e==="center"?f=(c.left+c.right)/2-m+t:f=ha(i,e,t);g=et(n,r,s),u=e==="left"?-K:K}return{titleX:f,titleY:g,maxWidth:h,rotation:u}}function jh(i,t,e){let n=me(Object.create(null),[e?j.get(e):{},j.get(t),i.defaults]);j.set(t,n),i.defaultRoutes&&qh(t,i.defaultRoutes),i.descriptors&&j.describe(t,i.descriptors)}function qh(i,t){Object.keys(t).forEach(e=>{let n=e.split("."),s=n.pop(),o=[i].concat(n).join("."),r=t[e].split("."),a=r.pop(),l=r.join(".");j.route(o,s,l,a)})}function Yh(i){return"id"in i&&"defaults"in i}function Uh(i){let t={},e=[],n=Object.keys(wt.plugins.items);for(let o=0;o<n.length;o++)e.push(wt.getPlugin(n[o]));let s=i.plugins||[];for(let o=0;o<s.length;o++){let r=s[o];e.indexOf(r)===-1&&(e.push(r),t[r.id]=!0)}return{plugins:e,localIds:t}}function Kh(i,t){return!t&&i===!1?null:i===!0?{}:i}function Gh(i,{plugins:t,localIds:e},n,s){let o=[],r=i.getContext();for(let a of t){let l=a.id,c=Kh(n[l],s);c!==null&&o.push({plugin:a,options:Xh(i.config,{plugin:a,local:e[l]},c,r)})}return o}function Xh(i,{plugin:t,local:e},n,s){let o=i.pluginScopeKeys(t),r=i.getOptionScopes(n,o);return e&&t.defaults&&r.push(t.defaults),i.createResolver(r,s,[""],{scriptable:!1,indexable:!1,allKeys:!0})}function Fs(i,t){let e=j.datasets[i]||{};return((t.datasets||{})[i]||{}).indexAxis||t.indexAxis||e.indexAxis||"x"}function Jh(i,t){let e=i;return i==="_index_"?e=t:i==="_value_"&&(e=t==="x"?"y":"x"),e}function Zh(i,t){return i===t?"_index_":"_value_"}function ma(i){if(i==="x"||i==="y"||i==="r")return i}function Qh(i){if(i==="top"||i==="bottom")return"x";if(i==="left"||i==="right")return"y"}function $s(i,...t){if(ma(i))return i;for(let e of t){let n=e.axis||Qh(e.position)||i.length>1&&ma(i[0].toLowerCase());if(n)return n}throw new Error(`Cannot determine type of '${i}' axis. Please provide 'axis' or 'position' option.`)}function ba(i,t,e){if(e[t+"AxisID"]===i)return{axis:t}}function tf(i,t){if(t.data&&t.data.datasets){let e=t.data.datasets.filter(n=>n.xAxisID===i||n.yAxisID===i);if(e.length)return ba(i,"x",e[0])||ba(i,"y",e[0])}return{}}function ef(i,t){let e=Bt[i.type]||{scales:{}},n=t.scales||{},s=Fs(i.type,t),o=Object.create(null);return Object.keys(n).forEach(r=>{let a=n[r];if(!O(a))return console.error(`Invalid scale configuration for scale: ${r}`);if(a._proxy)return console.warn(`Ignoring resolver passed as options for scale: ${r}`);let l=$s(r,a,tf(r,i),j.scales[a.type]),c=Zh(l,s),d=e.scales||{};o[r]=ye(Object.create(null),[{axis:l},a,d[l],d[c]])}),i.data.datasets.forEach(r=>{let a=r.type||i.type,l=r.indexAxis||Fs(a,t),d=(Bt[a]||{}).scales||{};Object.keys(d).forEach(u=>{let h=Jh(u,l),f=r[h+"AxisID"]||h;o[f]=o[f]||Object.create(null),ye(o[f],[{axis:h},n[f],d[u]])})}),Object.keys(o).forEach(r=>{let a=o[r];ye(a,[j.scales[a.type],j.scale])}),o}function il(i){let t=i.options||(i.options={});t.plugins=C(t.plugins,{}),t.scales=ef(i,t)}function nl(i){return i=i||{},i.datasets=i.datasets||[],i.labels=i.labels||[],i}function nf(i){return i=i||{},i.data=nl(i.data),il(i),i}function tn(i,t){let e=ya.get(i);return e||(e=t(),ya.set(i,e),sl.add(e)),e}function xa(i,t,e){let n=i.get(t);n||(n=new Map,i.set(t,n));let s=e.join(),o=n.get(s);return o||(o={resolver:Ki(t,e),subPrefixes:e.filter(a=>!a.toLowerCase().includes("hover"))},n.set(s,o)),o}function of(i,t){let{isScriptable:e,isIndexable:n}=as(i);for(let s of t){let o=e(s),r=n(s),a=(r||o)&&i[s];if(o&&(Lt(a)||sf(a))||r&&N(a))return!0}return!1}function _a(i,t){return i==="top"||i==="bottom"||af.indexOf(i)===-1&&t==="x"}function va(i,t){return function(e,n){return e[i]===n[i]?e[t]-n[t]:e[i]-n[i]}}function Ma(i){let t=i.chart,e=t.options.animation;t.notifyPlugins("afterRender"),W(e&&e.onComplete,[i],t)}function lf(i){let t=i.chart,e=t.options.animation;W(e&&e.onProgress,[i],t)}function ol(i){return Gi()&&typeof i=="string"?i=document.getElementById(i):i&&i.length&&(i=i[0]),i&&i.canvas&&(i=i.canvas),i}function cf(i,t,e){let n=Object.keys(i);for(let s of n){let o=+s;if(o>=t){let r=i[s];delete i[s],(e>0||o>t)&&(i[o+e]=r)}}}function df(i,t,e,n){return!e||i.type==="mouseout"?null:n?t:i}function ka(){return H(lt.instances,i=>i._plugins.invalidate())}function uf(i,t,e){let{startAngle:n,x:s,y:o,outerRadius:r,innerRadius:a,options:l}=t,{borderWidth:c,borderJoinStyle:d}=l,u=Math.min(c/r,tt(n-e));if(i.beginPath(),i.arc(s,o,r-c/2,n+u/2,e-u/2),a>0){let h=Math.min(c/a,tt(n-e));i.arc(s,o,a+c/2,e-h/2,n+h/2,!0)}else{let h=Math.min(c/2,r*tt(n-e));if(d==="round")i.arc(s,o,h,e-F/2,n+F/2,!0);else if(d==="bevel"){let f=2*h*h,g=-f*Math.cos(e+F/2)+s,p=-f*Math.sin(e+F/2)+o,m=f*Math.cos(n+F/2)+s,b=f*Math.sin(n+F/2)+o;i.lineTo(g,p),i.lineTo(m,b)}}i.closePath(),i.moveTo(0,0),i.rect(0,0,i.canvas.width,i.canvas.height),i.clip("evenodd")}function hf(i,t,e){let{startAngle:n,pixelMargin:s,x:o,y:r,outerRadius:a,innerRadius:l}=t,c=s/a;i.beginPath(),i.arc(o,r,a,n-c,e+c),l>s?(c=s/l,i.arc(o,r,l,e+c,n-c,!0)):i.arc(o,r,s,e+K,n-K),i.closePath(),i.clip()}function ff(i){return Ui(i,["outerStart","outerEnd","innerStart","innerEnd"])}function gf(i,t,e,n){let s=ff(i.options.borderRadius),o=(e-t)/2,r=Math.min(o,n*t/2),a=l=>{let c=(e-Math.min(o,l))*n/2;return Z(l,0,Math.min(o,c))};return{outerStart:a(s.outerStart),outerEnd:a(s.outerEnd),innerStart:Z(s.innerStart,0,r),innerEnd:Z(s.innerEnd,0,r)}}function Te(i,t,e,n){return{x:e+i*Math.cos(t),y:n+i*Math.sin(t)}}function dn(i,t,e,n,s,o){let{x:r,y:a,startAngle:l,pixelMargin:c,innerRadius:d}=t,u=Math.max(t.outerRadius+n+e-c,0),h=d>0?d+n+e+c:0,f=0,g=s-l;if(n){let B=d>0?d-n:0,q=u>0?u-n:0,X=(B+q)/2,yt=X!==0?g*X/(X+n):g;f=(g-yt)/2}let p=Math.max(.001,g*u-e/F)/u,m=(g-p)/2,b=l+m+f,y=s-m-f,{outerStart:_,outerEnd:v,innerStart:x,innerEnd:S}=gf(t,h,u,y-b),k=u-_,T=u-v,w=b+_/k,L=y-v/T,D=h+x,I=h+S,Q=b+x/D,ht=y-S/I;if(i.beginPath(),o){let B=(w+L)/2;if(i.arc(r,a,u,w,B),i.arc(r,a,u,B,L),v>0){let nt=Te(T,L,r,a);i.arc(nt.x,nt.y,v,L,y+K)}let q=Te(I,y,r,a);if(i.lineTo(q.x,q.y),S>0){let nt=Te(I,ht,r,a);i.arc(nt.x,nt.y,S,y+K,ht+Math.PI)}let X=(y-S/h+(b+x/h))/2;if(i.arc(r,a,h,y-S/h,X,!0),i.arc(r,a,h,X,b+x/h,!0),x>0){let nt=Te(D,Q,r,a);i.arc(nt.x,nt.y,x,Q+Math.PI,b-K)}let yt=Te(k,b,r,a);if(i.lineTo(yt.x,yt.y),_>0){let nt=Te(k,w,r,a);i.arc(nt.x,nt.y,_,b-K,w)}}else{i.moveTo(r,a);let B=Math.cos(w)*u+r,q=Math.sin(w)*u+a;i.lineTo(B,q);let X=Math.cos(L)*u+r,yt=Math.sin(L)*u+a;i.lineTo(X,yt)}i.closePath()}function pf(i,t,e,n,s){let{fullCircles:o,startAngle:r,circumference:a}=t,l=t.endAngle;if(o){dn(i,t,e,n,l,s);for(let c=0;c<o;++c)i.fill();isNaN(a)||(l=r+(a%V||V))}return dn(i,t,e,n,l,s),i.fill(),l}function mf(i,t,e,n,s){let{fullCircles:o,startAngle:r,circumference:a,options:l}=t,{borderWidth:c,borderJoinStyle:d,borderDash:u,borderDashOffset:h,borderRadius:f}=l,g=l.borderAlign==="inner";if(!c)return;i.setLineDash(u||[]),i.lineDashOffset=h,g?(i.lineWidth=c*2,i.lineJoin=d||"round"):(i.lineWidth=c,i.lineJoin=d||"bevel");let p=t.endAngle;if(o){dn(i,t,e,n,p,s);for(let m=0;m<o;++m)i.stroke();isNaN(a)||(p=r+(a%V||V))}g&&hf(i,t,p),l.selfJoin&&p-r>=F&&f===0&&d!=="miter"&&uf(i,t,p),o||(dn(i,t,e,n,p,s),i.stroke())}function rl(i,t,e=t){i.lineCap=C(e.borderCapStyle,t.borderCapStyle),i.setLineDash(C(e.borderDash,t.borderDash)),i.lineDashOffset=C(e.borderDashOffset,t.borderDashOffset),i.lineJoin=C(e.borderJoinStyle,t.borderJoinStyle),i.lineWidth=C(e.borderWidth,t.borderWidth),i.strokeStyle=C(e.borderColor,t.borderColor)}function bf(i,t,e){i.lineTo(e.x,e.y)}function yf(i){return i.stepped?Fr:i.tension||i.cubicInterpolationMode==="monotone"?$r:bf}function al(i,t,e={}){let n=i.length,{start:s=0,end:o=n-1}=e,{start:r,end:a}=t,l=Math.max(s,r),c=Math.min(o,a),d=s<r&&o<r||s>a&&o>a;return{count:n,start:l,loop:t.loop,ilen:c<l&&!d?n+c-l:c-l}}function xf(i,t,e,n){let{points:s,options:o}=t,{count:r,start:a,loop:l,ilen:c}=al(s,e,n),d=yf(o),{move:u=!0,reverse:h}=n||{},f,g,p;for(f=0;f<=c;++f)g=s[(a+(h?c-f:f))%r],!g.skip&&(u?(i.moveTo(g.x,g.y),u=!1):d(i,p,g,h,o.stepped),p=g);return l&&(g=s[(a+(h?c:0))%r],d(i,p,g,h,o.stepped)),!!l}function _f(i,t,e,n){let s=t.points,{count:o,start:r,ilen:a}=al(s,e,n),{move:l=!0,reverse:c}=n||{},d=0,u=0,h,f,g,p,m,b,y=v=>(r+(c?a-v:v))%o,_=()=>{p!==m&&(i.lineTo(d,m),i.lineTo(d,p),i.lineTo(d,b))};for(l&&(f=s[y(0)],i.moveTo(f.x,f.y)),h=0;h<=a;++h){if(f=s[y(h)],f.skip)continue;let v=f.x,x=f.y,S=v|0;S===g?(x<p?p=x:x>m&&(m=x),d=(u*d+v)/++u):(_(),i.lineTo(v,x),g=S,u=0,p=m=x),b=x}_()}function zs(i){let t=i.options,e=t.borderDash&&t.borderDash.length;return!i._decimated&&!i._loop&&!t.tension&&t.cubicInterpolationMode!=="monotone"&&!t.stepped&&!e?_f:xf}function vf(i){return i.stepped?Yr:i.tension||i.cubicInterpolationMode==="monotone"?Ur:Ht}function Mf(i,t,e,n){let s=t._path;s||(s=t._path=new Path2D,t.path(s,e,n)&&s.closePath()),rl(i,t.options),i.stroke(s)}function Sf(i,t,e,n){let{segments:s,options:o}=t,r=zs(t);for(let a of s)rl(i,o,a.style),i.beginPath(),r(i,t,a,{start:e,end:e+n-1})&&i.closePath(),i.stroke()}function Tf(i,t,e,n){kf&&!t.options.segment?Mf(i,t,e,n):Sf(i,t,e,n)}function Ta(i,t,e,n){let s=i.options,{[e]:o}=i.getProps([e],n);return Math.abs(t-o)<s.radius+s.hitRadius}function ll(i,t){let{x:e,y:n,base:s,width:o,height:r}=i.getProps(["x","y","base","width","height"],t),a,l,c,d,u;return i.horizontal?(u=r/2,a=Math.min(e,s),l=Math.max(e,s),c=n-u,d=n+u):(u=o/2,a=e-u,l=e+u,c=Math.min(n,s),d=Math.max(n,s)),{left:a,top:c,right:l,bottom:d}}function qt(i,t,e,n){return i?0:Z(t,e,n)}function wf(i,t,e){let n=i.options.borderWidth,s=i.borderSkipped,o=rs(n);return{t:qt(s.top,o.top,0,e),r:qt(s.right,o.right,0,t),b:qt(s.bottom,o.bottom,0,e),l:qt(s.left,o.left,0,t)}}function Cf(i,t,e){let{enableBorderRadius:n}=i.getProps(["enableBorderRadius"]),s=i.options.borderRadius,o=Vt(s),r=Math.min(t,e),a=i.borderSkipped,l=n||O(s);return{topLeft:qt(!l||a.top||a.left,o.topLeft,0,r),topRight:qt(!l||a.top||a.right,o.topRight,0,r),bottomLeft:qt(!l||a.bottom||a.left,o.bottomLeft,0,r),bottomRight:qt(!l||a.bottom||a.right,o.bottomRight,0,r)}}function Ef(i){let t=ll(i),e=t.right-t.left,n=t.bottom-t.top,s=wf(i,e/2,n/2),o=Cf(i,e/2,n/2);return{outer:{x:t.left,y:t.top,w:e,h:n,radius:o},inner:{x:t.left+s.l,y:t.top+s.t,w:e-s.l-s.r,h:n-s.t-s.b,radius:{topLeft:Math.max(0,o.topLeft-Math.max(s.t,s.l)),topRight:Math.max(0,o.topRight-Math.max(s.t,s.r)),bottomLeft:Math.max(0,o.bottomLeft-Math.max(s.b,s.l)),bottomRight:Math.max(0,o.bottomRight-Math.max(s.b,s.r))}}}}function Ts(i,t,e,n){let s=t===null,o=e===null,a=i&&!(s&&o)&&ll(i,n);return a&&(s||kt(t,a.left,a.right))&&(o||kt(e,a.top,a.bottom))}function Lf(i){return i.topLeft||i.topRight||i.bottomLeft||i.bottomRight}function Df(i,t){i.rect(t.x,t.y,t.w,t.h)}function ws(i,t,e={}){let n=i.x!==e.x?-t:0,s=i.y!==e.y?-t:0,o=(i.x+i.w!==e.x+e.w?t:0)-n,r=(i.y+i.h!==e.y+e.h?t:0)-s;return{x:i.x+n,y:i.y+s,w:i.w+o,h:i.h+r,radius:i.radius}}function cl(i){return Bs[i%Bs.length]}function dl(i){return wa[i%wa.length]}function Pf(i,t){return i.borderColor=cl(t),i.backgroundColor=dl(t),++t}function Rf(i,t){return i.backgroundColor=i.data.map(()=>cl(t++)),t}function Of(i,t){return i.backgroundColor=i.data.map(()=>dl(t++)),t}function If(i){let t=0;return(e,n)=>{let s=i.getDatasetMeta(n).controller;s instanceof It?t=Rf(e,t):s instanceof oe?t=Of(e,t):s&&(t=Pf(e,t))}}function Ca(i){let t;for(t in i)if(i[t].borderColor||i[t].backgroundColor)return!0;return!1}function Ff(i){return i&&(i.borderColor||i.backgroundColor)}function $f(){return j.borderColor!=="rgba(0,0,0,0.1)"||j.backgroundColor!=="rgba(0,0,0,0.1)"}function zf(i,t,e,n,s){let o=s.samples||n;if(o>=e)return i.slice(t,t+e);let r=[],a=(e-2)/(o-2),l=0,c=t+e-1,d=t,u,h,f,g,p;for(r[l++]=i[d],u=0;u<o-2;u++){let m=0,b=0,y,_=Math.floor((u+1)*a)+1+t,v=Math.min(Math.floor((u+2)*a)+1,e)+t,x=v-_;for(y=_;y<v;y++)m+=i[y].x,b+=i[y].y;m/=x,b/=x;let S=Math.floor(u*a)+1+t,k=Math.min(Math.floor((u+1)*a)+1,e)+t,{x:T,y:w}=i[d];for(f=g=-1,y=S;y<k;y++)g=.5*Math.abs((T-m)*(i[y].y-w)-(T-i[y].x)*(b-w)),g>f&&(f=g,h=i[y],p=y);r[l++]=h,d=p}return r[l++]=i[c],r}function Bf(i,t,e,n){let s=0,o=0,r,a,l,c,d,u,h,f,g,p,m=[],b=t+e-1,y=i[t].x,v=i[b].x-y;for(r=t;r<t+e;++r){a=i[r],l=(a.x-y)/v*n,c=a.y;let x=l|0;if(x===d)c<g?(g=c,u=r):c>p&&(p=c,h=r),s=(o*s+a.x)/++o;else{let S=r-1;if(!P(u)&&!P(h)){let k=Math.min(u,h),T=Math.max(u,h);k!==f&&k!==S&&m.push({...i[k],x:s}),T!==f&&T!==S&&m.push({...i[T],x:s})}r>0&&S!==f&&m.push(i[S]),m.push(a),d=x,o=0,g=p=c,u=h=f=r}}return m}function ul(i){if(i._decimated){let t=i._data;delete i._decimated,delete i._data,Object.defineProperty(i,"data",{configurable:!0,enumerable:!0,writable:!0,value:t})}}function Ea(i){i.data.datasets.forEach(t=>{ul(t)})}function Wf(i,t){let e=t.length,n=0,s,{iScale:o}=i,{min:r,max:a,minDefined:l,maxDefined:c}=o.getUserBounds();return l&&(n=Z(vt(t,o.axis,r).lo,0,e-1)),c?s=Z(vt(t,o.axis,a).hi+1,n,e)-n:s=e-n,{start:n,count:s}}function Vf(i,t,e){let n=i.segments,s=i.points,o=t.points,r=[];for(let a of n){let{start:l,end:c}=a;c=fn(l,c,s);let d=Ws(e,s[l],s[c],a.loop);if(!t.segments){r.push({source:a,target:d,start:s[l],end:s[c]});continue}let u=ms(t,d);for(let h of u){let f=Ws(e,o[h.start],o[h.end],h.loop),g=ps(a,s,f);for(let p of g)r.push({source:p,target:h,start:{[e]:La(d,f,"start",Math.max)},end:{[e]:La(d,f,"end",Math.min)}})}}return r}function Ws(i,t,e,n){if(n)return;let s=t[i],o=e[i];return i==="angle"&&(s=tt(s),o=tt(o)),{property:i,start:s,end:o}}function jf(i,t){let{x:e=null,y:n=null}=i||{},s=t.points,o=[];return t.segments.forEach(({start:r,end:a})=>{a=fn(r,a,s);let l=s[r],c=s[a];n!==null?(o.push({x:l.x,y:n}),o.push({x:c.x,y:n})):e!==null&&(o.push({x:e,y:l.y}),o.push({x:e,y:c.y}))}),o}function fn(i,t,e){for(;t>i;t--){let n=e[t];if(!isNaN(n.x)&&!isNaN(n.y))break}return t}function La(i,t,e,n){return i&&t?n(i[e],t[e]):i?i[e]:t?t[e]:0}function hl(i,t){let e=[],n=!1;return N(i)?(n=!0,e=i):e=jf(i,t),e.length?new Ct({points:e,options:{tension:0},_loop:n,_fullLoop:n}):null}function Da(i){return i&&i.fill!==!1}function qf(i,t,e){let s=i[t].fill,o=[t],r;if(!e)return s;for(;s!==!1&&o.indexOf(s)===-1;){if(!Y(s))return s;if(r=i[s],!r)return!1;if(r.visible)return s;o.push(s),s=r.fill}return!1}function Yf(i,t,e){let n=Xf(i);if(O(n))return isNaN(n.value)?!1:n;let s=parseFloat(n);return Y(s)&&Math.floor(s)===s?Uf(n[0],t,s,e):["origin","start","end","stack","shape"].indexOf(n)>=0&&n}function Uf(i,t,e,n){return(i==="-"||i==="+")&&(e=t+e),e===t||e<0||e>=n?!1:e}function Kf(i,t){let e=null;return i==="start"?e=t.bottom:i==="end"?e=t.top:O(i)?e=t.getPixelForValue(i.value):t.getBasePixel&&(e=t.getBasePixel()),e}function Gf(i,t,e){let n;return i==="start"?n=e:i==="end"?n=t.options.reverse?t.min:t.max:O(i)?n=i.value:n=t.getBaseValue(),n}function Xf(i){let t=i.options,e=t.fill,n=C(e&&e.target,e);return n===void 0&&(n=!!t.backgroundColor),n===!1||n===null?!1:n===!0?"origin":n}function Jf(i){let{scale:t,index:e,line:n}=i,s=[],o=n.segments,r=n.points,a=Zf(t,e);a.push(hl({x:null,y:t.bottom},n));for(let l=0;l<o.length;l++){let c=o[l];for(let d=c.start;d<=c.end;d++)Qf(s,r[d],a)}return new Ct({points:s,options:{}})}function Zf(i,t){let e=[],n=i.getMatchingVisibleMetas("line");for(let s=0;s<n.length;s++){let o=n[s];if(o.index===t)break;o.hidden||e.unshift(o.dataset)}return e}function Qf(i,t,e){let n=[];for(let s=0;s<e.length;s++){let o=e[s],{first:r,last:a,point:l}=tg(o,t,"x");if(!(!l||r&&a)){if(r)n.unshift(l);else if(i.push(l),!a)break}}i.push(...n)}function tg(i,t,e){let n=i.interpolate(t,e);if(!n)return{};let s=n[e],o=i.segments,r=i.points,a=!1,l=!1;for(let c=0;c<o.length;c++){let d=o[c],u=r[d.start][e],h=r[d.end][e];if(kt(s,u,h)){a=s===u,l=s===h;break}}return{first:a,last:l,point:n}}function eg(i){let{chart:t,fill:e,line:n}=i;if(Y(e))return ig(t,e);if(e==="stack")return Jf(i);if(e==="shape")return!0;let s=ng(i);return s instanceof un?s:hl(s,n)}function ig(i,t){let e=i.getDatasetMeta(t);return e&&i.isDatasetVisible(t)?e.dataset:null}function ng(i){return(i.scale||{}).getPointPositionForValue?og(i):sg(i)}function sg(i){let{scale:t={},fill:e}=i,n=Kf(e,t);if(Y(n)){let s=t.isHorizontal();return{x:s?n:null,y:s?null:n}}return null}function og(i){let{scale:t,fill:e}=i,n=t.options,s=t.getLabels().length,o=n.reverse?t.max:t.min,r=Gf(e,t,o),a=[];if(n.grid.circular){let l=t.getPointPositionForValue(0,o);return new un({x:l.x,y:l.y,radius:t.getDistanceFromCenterForValue(r)})}for(let l=0;l<s;++l)a.push(t.getPointPositionForValue(l,r));return a}function Cs(i,t,e){let n=eg(t),{chart:s,index:o,line:r,scale:a,axis:l}=t,c=r.options,d=c.fill,u=c.backgroundColor,{above:h=u,below:f=u}=d||{},g=s.getDatasetMeta(o),p=bs(s,g);n&&r.points.length&&(Je(i,e),rg(i,{line:r,target:n,above:h,below:f,area:e,scale:a,axis:l,clip:p}),Ze(i))}function rg(i,t){let{line:e,target:n,above:s,below:o,area:r,scale:a,clip:l}=t,c=e._loop?"angle":t.axis;i.save();let d=o;o!==s&&(c==="x"?(Aa(i,n,r.top),Es(i,{line:e,target:n,color:s,scale:a,property:c,clip:l}),i.restore(),i.save(),Aa(i,n,r.bottom)):c==="y"&&(Pa(i,n,r.left),Es(i,{line:e,target:n,color:o,scale:a,property:c,clip:l}),i.restore(),i.save(),Pa(i,n,r.right),d=s)),Es(i,{line:e,target:n,color:d,scale:a,property:c,clip:l}),i.restore()}function Aa(i,t,e){let{segments:n,points:s}=t,o=!0,r=!1;i.beginPath();for(let a of n){let{start:l,end:c}=a,d=s[l],u=s[fn(l,c,s)];o?(i.moveTo(d.x,d.y),o=!1):(i.lineTo(d.x,e),i.lineTo(d.x,d.y)),r=!!t.pathSegment(i,a,{move:r}),r?i.closePath():i.lineTo(u.x,e)}i.lineTo(t.first().x,e),i.closePath(),i.clip()}function Pa(i,t,e){let{segments:n,points:s}=t,o=!0,r=!1;i.beginPath();for(let a of n){let{start:l,end:c}=a,d=s[l],u=s[fn(l,c,s)];o?(i.moveTo(d.x,d.y),o=!1):(i.lineTo(e,d.y),i.lineTo(d.x,d.y)),r=!!t.pathSegment(i,a,{move:r}),r?i.closePath():i.lineTo(e,u.y)}i.lineTo(e,t.first().y),i.closePath(),i.clip()}function Es(i,t){let{line:e,target:n,property:s,color:o,scale:r,clip:a}=t,l=Vf(e,n,s);for(let{source:c,target:d,start:u,end:h}of l){let{style:{backgroundColor:f=o}={}}=c,g=n!==!0;i.save(),i.fillStyle=f,ag(i,r,a,g&&Ws(s,u,h)),i.beginPath();let p=!!e.pathSegment(i,c),m;if(g){p?i.closePath():Ra(i,n,h,s);let b=!!n.pathSegment(i,d,{move:p,reverse:!0});m=p&&b,m||Ra(i,n,u,s)}i.closePath(),i.fill(m?"evenodd":"nonzero"),i.restore()}}function ag(i,t,e,n){let s=t.chart.chartArea,{property:o,start:r,end:a}=n||{};if(o==="x"||o==="y"){let l,c,d,u;o==="x"?(l=r,c=s.top,d=a,u=s.bottom):(l=s.left,c=r,d=s.right,u=a),i.beginPath(),e&&(l=Math.max(l,e.left),d=Math.min(d,e.right),c=Math.max(c,e.top),u=Math.min(u,e.bottom)),i.rect(l,c,d-l,u-c),i.clip()}}function Ra(i,t,e,n){let s=t.interpolate(e,n);s&&i.lineTo(s.x,s.y)}function dg(i,t,e,n,s){let o=ug(n,i,t,e),r=hg(s,n,t.lineHeight);return{itemWidth:o,itemHeight:r}}function ug(i,t,e,n){let s=i.text;return s&&typeof s!="string"&&(s=s.reduce((o,r)=>o.length>r.length?o:r)),t+e.size/2+n.measureText(s).width}function hg(i,t,e){let n=i;return typeof t.text!="string"&&(n=fl(t,e)),n}function fl(i,t){let e=i.text?i.text.length:0;return t*e}function fg(i,t){return!!((i==="mousemove"||i==="mouseout")&&(t.onHover||t.onLeave)||t.onClick&&(i==="click"||i==="mouseup"))}function pg(i,t){let e=new fi({ctx:i.ctx,options:t,chart:i});ot.configure(i,e,t),ot.addBox(i,e),i.titleBlock=e}function Tt(i,t){return t&&(N(t)?Array.prototype.push.apply(i,t):i.push(t)),i}function Ot(i){return(typeof i=="string"||i instanceof String)&&i.indexOf(`
25
+ `,t}function nd(i){let t=document.createElement("div");return t.className="inline-flex items-center px-2 py-1 text-xs font-semibold rounded-full bg-gray-200 text-gray-700",t.textContent=`+${i}`,t}function sd(i){document.querySelectorAll("[data-remove-filter]").forEach(t=>{t.addEventListener("click",e=>{e.stopPropagation();let n=t.dataset.removeFilter;n&&i(n)})})}var ed,Vo,jo=C(()=>{"use strict";tt();Pn();ed="active-filters",Vo=8});function qo(){od(),Li()}function od(){let i=document.querySelector("[data-filter-prev]"),t=document.querySelector("[data-filter-next]");i&&i.addEventListener("click",()=>rd()),t&&t.addEventListener("click",()=>ad())}function rd(){let i=On();i.length!==0&&(_t=(_t-1+i.length)%i.length,Yo(i[_t]),Li())}function ad(){let i=On();i.length!==0&&(_t=(_t+1)%i.length,Yo(i[_t]),Li())}function On(){return ki()}function Yo(i){Ti(i),setTimeout(()=>{Si(i,{offset:20,behavior:"smooth",highlight:!0})},50)}function Li(){let t=On().length;_t>=t&&(_t=0);let e=document.querySelector("[data-filter-position]");e&&(t>0?e.textContent=`${_t+1} / ${t}`:e.textContent="0 / 0");let n=document.querySelector("[data-filter-prev]"),s=document.querySelector("[data-filter-next]");n&&(n.disabled=t===0),s&&(s.disabled=t===0)}function Uo(){_t=0,Li()}var _t,Ko=C(()=>{"use strict";tt();wi();_t=0});function Go(){let i=P(Jt,ge);Ho(),qo(),cd(i),qe(i),Di(),je(Pi),dd()}function cd(i){i.riskLevels.forEach(e=>{let n=document.querySelector(`[data-filter-risk="${e}"]`);n&&(n.checked=!0)}),i.categories.forEach(e=>{let n=document.querySelector(`[data-filter-category="${e}"]`);n&&(n.checked=!0)}),i.ruleTypes.forEach(e=>{let n=document.querySelector(`[data-filter-type="${e}"]`);n&&(n.checked=!0)});let t=document.querySelector("[data-filter-search]");t&&(t.value=i.searchText)}function dd(){document.querySelectorAll("[data-filter-risk]").forEach(e=>{e.addEventListener("change",Ai)}),document.querySelectorAll("[data-filter-category]").forEach(e=>{e.addEventListener("change",Ai)}),document.querySelectorAll("[data-filter-type]").forEach(e=>{e.addEventListener("change",Ai)});let i=document.querySelector("[data-filter-search]");i&&i.addEventListener("input",Ai);let t=document.querySelector("[data-filter-clear]");t&&t.addEventListener("click",hd)}function Ai(){let i={riskLevels:In("[data-filter-risk]"),categories:In("[data-filter-category]"),autoFixable:null,ruleTypes:In("[data-filter-type]"),searchText:document.querySelector("[data-filter-search]")?.value||""};D(Jt,i),qe(i),Di(),je(Pi)}function In(i){let t=[];return document.querySelectorAll(i).forEach(e=>{let n=e;if(n.checked){let s=n.getAttribute(i.slice(1,-1));s&&t.push(s)}}),t}function qe(i){let t=En(),e=null;t.forEach(n=>{let s=n,o=s.dataset.riskLevel,r=s.dataset.category,a=s.dataset.ruleType,l=s.dataset.title?.toLowerCase()||"",c=!0;i.riskLevels.length>0&&o&&(c=c&&i.riskLevels.includes(o)),i.categories.length>0&&r&&(c=c&&i.categories.includes(r)),i.ruleTypes.length>0&&a&&(c=c&&i.ruleTypes.includes(a)),i.searchText&&(c=c&&l.includes(i.searchText.toLowerCase())),c?(s.classList.remove("hidden","opacity-30","pointer-events-none"),s.classList.add("filter-match"),e||(e=s)):(s.classList.remove("hidden","filter-match"),s.classList.add("opacity-30","pointer-events-none"))}),ud(),Uo(),e&&gd(i)&&pd(e)}function ud(){let i=En().length,t=ki().length,e=document.querySelector("[data-filter-count]");e&&(e.textContent=`${t} / ${i} r\xE8gles`)}function hd(){document.querySelectorAll("[data-filter-risk], [data-filter-category], [data-filter-type]").forEach(t=>{t.checked=!1});let i=document.querySelector("[data-filter-search]");i&&(i.value=""),D(Jt,ge),qe(ge),Di(),je(Pi)}function fd(){let i=P(Jt,ge);return i.riskLevels.length+i.categories.length+i.ruleTypes.length+(i.searchText?1:0)}function Di(){let i=fd(),t=document.querySelector("[data-filter-active-count]");if(t){let e=i===0?"0 actif":i===1?"1 actif":`${i} actifs`;t.textContent=e,i===0?t.className="px-3 py-1 bg-gray-100 text-gray-600 text-sm font-semibold rounded-full transition-all":t.className="px-3 py-1 bg-blue-100 text-blue-700 text-sm font-semibold rounded-full transition-all"}}function gd(i){return i.riskLevels.length>0||i.categories.length>0||i.ruleTypes.length>0||i.searchText.length>0}function Pi(i){let t=P(Jt,ge);if(i==="search"){t.searchText="";let e=document.querySelector("[data-filter-search]");e&&(e.value="")}else{let[e,n]=i.split(":");({risk:()=>{t.riskLevels=t.riskLevels.filter(o=>o!==n),Fn(`[data-filter-risk="${n}"]`)},category:()=>{t.categories=t.categories.filter(o=>o!==n),Fn(`[data-filter-category="${n}"]`)},type:()=>{t.ruleTypes=t.ruleTypes.filter(o=>o!==n),Fn(`[data-filter-type="${n}"]`)}})[e]?.()}D(Jt,t),qe(t),Di(),je(Pi)}function Fn(i){let t=document.querySelector(i);t&&(t.checked=!1)}function Xo(){let i=P(Jt,ge);qe(i)}var Jt,ld,ge,pd,$n=C(()=>{"use strict";tt();tt();tt();Bo();jo();Ko();wi();Jt="active-filters",ld=300,ge={riskLevels:[],categories:[],autoFixable:null,ruleTypes:[],searchText:""};pd=Gt(i=>{Ti(i),setTimeout(()=>{Si(i,{offset:20,behavior:"smooth",highlight:!0})},50)},ld)});function md(i,t,e){document.querySelectorAll(`[${i}="${t}"]`).forEach(s=>{let o=s;o.value!==String(e)&&(o.value=String(e))})}function Jo(i,t,e){let n=Gt((s,o)=>{t(e,s,o)},300);document.addEventListener("input",s=>{let o=s.target.closest(`[${i}]`);if(!o)return;let r=o.getAttribute(i),a=parseInt(o.value,10);!r||isNaN(a)||a<1||(md(i,r,a),n(r,a))})}function Zo(i){Jo("data-time-input",(t,e,n)=>t.setCustomTime(e,n),i),Jo("data-special-time-input",(t,e,n)=>t.setCustomSpecialTime(e,n),i),document.addEventListener("click",t=>{let e=t.target.closest("[data-time-reset]");if(!e)return;let n=e.getAttribute("data-time-reset");if(!n)return;i.resetCustomTime(n),document.querySelectorAll(`[data-time-input="${n}"]`).forEach(r=>{let a=r,l=a.getAttribute("data-original-time");l&&(a.value=l)}),document.querySelectorAll(`[data-special-time-input="${n}"]`).forEach(r=>{let a=r,l=a.getAttribute("data-original-special-time");l&&(a.value=l)})})}var Qo=C(()=>{"use strict";wn()});function er(){P(Hn,[]).forEach(t=>{let e=document.querySelector(`[data-checklist-item="${t}"]`);e&&(e.checked=!0,tr(e,!0))}),document.addEventListener("change",t=>{let e=t.target.closest("[data-checklist-item]");if(!e)return;let n=e.getAttribute("data-checklist-item");if(!n)return;let s=e.checked;bd(n,s),tr(e,s)}),ir()}function bd(i,t){let e=P(Hn,[]);if(t)e.includes(i)||e.push(i);else{let n=e.indexOf(i);n>-1&&e.splice(n,1)}D(Hn,e),ir()}function tr(i,t){let e=i.closest("[data-rule-card]");e&&(t?(e.classList.add("opacity-60","bg-green-50"),e.classList.remove("bg-white")):(e.classList.remove("opacity-60","bg-green-50"),e.classList.add("bg-white")))}function ir(){let i=document.querySelectorAll("[data-checklist-item]"),t=document.querySelectorAll("[data-checklist-item]:checked"),e=i.length,n=t.length,s=e>0?Math.round(n/e*100):0,o=document.querySelector("[data-progress-bar]");o&&(o.style.width=`${s}%`);let r=document.querySelector("[data-progress-text]");r&&(r.textContent=`${n} / ${e} (${s}%)`)}var Hn,nr=C(()=>{"use strict";tt();Hn="checklist-items"});function yd(i){let t=Ci[i]||Ve,e=document.createElement("span");return e.className=`inline-flex items-center px-2 py-1 text-xs font-semibold rounded-full bg-${t.color}-100 text-${t.color}-800`,e.innerHTML=`<span class="mr-1">${t.emoji}</span>${t.label}`,e}function xd(i){let t=Ei[i]||{...Ve,label:i},e=document.createElement("span");return e.className=`inline-flex items-center px-2 py-1 text-xs font-medium rounded-full bg-${t.color}-100 text-${t.color}-700`,e.innerHTML=`<span class="mr-1">${t.emoji}</span>${t.label}`,e}function sr(){document.querySelectorAll("[data-rule-card]").forEach(t=>{let e=t,n=e.dataset.ruleKey,s=e.dataset.riskLevel,o=e.dataset.category;if(!n)return;let r=e.querySelector(`[data-chips-container="${n}"]`);if(r){if(r.innerHTML="",s){let a=yd(s);r.appendChild(a)}if(o){let a=xd(o);r.appendChild(a)}}})}var or=C(()=>{"use strict";Pn()});function Ke(i){return i+.5|0}function Ye(i){return Ft(Ke(i*2.55),0,255)}function $t(i){return Ft(Ke(i*255),0,255)}function Et(i){return Ft(Ke(i/2.55)/100,0,1)}function rr(i){return Ft(Ke(i*100),0,100)}function Sd(i){var t=i.length,e;return i[0]==="#"&&(t===4||t===5?e={r:255&mt[i[1]]*17,g:255&mt[i[2]]*17,b:255&mt[i[3]]*17,a:t===5?mt[i[4]]*17:255}:(t===7||t===9)&&(e={r:mt[i[1]]<<4|mt[i[2]],g:mt[i[3]]<<4|mt[i[4]],b:mt[i[5]]<<4|mt[i[6]],a:t===9?mt[i[7]]<<4|mt[i[8]]:255})),e}function Td(i){var t=Md(i)?_d:vd;return i?"#"+t(i.r)+t(i.g)+t(i.b)+kd(i.a,t):void 0}function dr(i,t,e){let n=t*Math.min(e,1-e),s=(o,r=(o+i/30)%12)=>e-n*Math.max(Math.min(r-3,9-r,1),-1);return[s(0),s(8),s(4)]}function Cd(i,t,e){let n=(s,o=(s+i/60)%6)=>e-e*t*Math.max(Math.min(o,4-o,1),0);return[n(5),n(3),n(1)]}function Ed(i,t,e){let n=dr(i,1,.5),s;for(t+e>1&&(s=1/(t+e),t*=s,e*=s),s=0;s<3;s++)n[s]*=1-t-e,n[s]+=t;return n}function Ld(i,t,e,n,s){return i===s?(t-e)/n+(t<e?6:0):t===s?(e-i)/n+2:(i-t)/n+4}function Bn(i){let e=i.r/255,n=i.g/255,s=i.b/255,o=Math.max(e,n,s),r=Math.min(e,n,s),a=(o+r)/2,l,c,d;return o!==r&&(d=o-r,c=a>.5?d/(2-o-r):d/(o+r),l=Ld(e,n,s,d,o),l=l*60+.5),[l|0,c||0,a]}function Nn(i,t,e,n){return(Array.isArray(t)?i(t[0],t[1],t[2]):i(t,e,n)).map($t)}function Vn(i,t,e){return Nn(dr,i,t,e)}function Ad(i,t,e){return Nn(Ed,i,t,e)}function Dd(i,t,e){return Nn(Cd,i,t,e)}function ur(i){return(i%360+360)%360}function Pd(i){let t=wd.exec(i),e=255,n;if(!t)return;t[5]!==n&&(e=t[6]?Ye(+t[5]):$t(+t[5]));let s=ur(+t[2]),o=+t[3]/100,r=+t[4]/100;return t[1]==="hwb"?n=Ad(s,o,r):t[1]==="hsv"?n=Dd(s,o,r):n=Vn(s,o,r),{r:n[0],g:n[1],b:n[2],a:e}}function Rd(i,t){var e=Bn(i);e[0]=ur(e[0]+t),e=Vn(e),i.r=e[0],i.g=e[1],i.b=e[2]}function Od(i){if(!i)return;let t=Bn(i),e=t[0],n=rr(t[1]),s=rr(t[2]);return i.a<255?`hsla(${e}, ${n}%, ${s}%, ${Et(i.a)})`:`hsl(${e}, ${n}%, ${s}%)`}function Id(){let i={},t=Object.keys(lr),e=Object.keys(ar),n,s,o,r,a;for(n=0;n<t.length;n++){for(r=a=t[n],s=0;s<e.length;s++)o=e[s],a=a.replace(o,ar[o]);o=parseInt(lr[r],16),i[a]=[o>>16&255,o>>8&255,o&255]}return i}function Fd(i){Oi||(Oi=Id(),Oi.transparent=[0,0,0,0]);let t=Oi[i.toLowerCase()];return t&&{r:t[0],g:t[1],b:t[2],a:t.length===4?t[3]:255}}function Hd(i){let t=$d.exec(i),e=255,n,s,o;if(t){if(t[7]!==n){let r=+t[7];e=t[8]?Ye(r):Ft(r*255,0,255)}return n=+t[1],s=+t[3],o=+t[5],n=255&(t[2]?Ye(n):Ft(n,0,255)),s=255&(t[4]?Ye(s):Ft(s,0,255)),o=255&(t[6]?Ye(o):Ft(o,0,255)),{r:n,g:s,b:o,a:e}}}function zd(i){return i&&(i.a<255?`rgba(${i.r}, ${i.g}, ${i.b}, ${Et(i.a)})`:`rgb(${i.r}, ${i.g}, ${i.b})`)}function Wd(i,t,e){let n=pe(Et(i.r)),s=pe(Et(i.g)),o=pe(Et(i.b));return{r:$t(zn(n+e*(pe(Et(t.r))-n))),g:$t(zn(s+e*(pe(Et(t.g))-s))),b:$t(zn(o+e*(pe(Et(t.b))-o))),a:i.a+e*(t.a-i.a)}}function Ii(i,t,e){if(i){let n=Bn(i);n[t]=Math.max(0,Math.min(n[t]+n[t]*e,t===0?360:1)),n=Vn(n),i.r=n[0],i.g=n[1],i.b=n[2]}}function hr(i,t){return i&&Object.assign(t||{},i)}function cr(i){var t={r:0,g:0,b:0,a:255};return Array.isArray(i)?i.length>=3&&(t={r:i[0],g:i[1],b:i[2],a:255},i.length>3&&(t.a=$t(i[3]))):(t=hr(i,{r:0,g:0,b:0,a:1}),t.a=$t(t.a)),t}function Bd(i){return i.charAt(0)==="r"?Hd(i):Pd(i)}var Ft,mt,Wn,_d,vd,Ri,Md,kd,wd,ar,lr,Oi,$d,zn,pe,Ue,fr=C(()=>{Ft=(i,t,e)=>Math.max(Math.min(i,e),t);mt={0:0,1:1,2:2,3:3,4:4,5:5,6:6,7:7,8:8,9:9,A:10,B:11,C:12,D:13,E:14,F:15,a:10,b:11,c:12,d:13,e:14,f:15},Wn=[..."0123456789ABCDEF"],_d=i=>Wn[i&15],vd=i=>Wn[(i&240)>>4]+Wn[i&15],Ri=i=>(i&240)>>4===(i&15),Md=i=>Ri(i.r)&&Ri(i.g)&&Ri(i.b)&&Ri(i.a);kd=(i,t)=>i<255?t(i):"";wd=/^(hsla?|hwb|hsv)\(\s*([-+.e\d]+)(?:deg)?[\s,]+([-+.e\d]+)%[\s,]+([-+.e\d]+)%(?:[\s,]+([-+.e\d]+)(%)?)?\s*\)$/;ar={x:"dark",Z:"light",Y:"re",X:"blu",W:"gr",V:"medium",U:"slate",A:"ee",T:"ol",S:"or",B:"ra",C:"lateg",D:"ights",R:"in",Q:"turquois",E:"hi",P:"ro",O:"al",N:"le",M:"de",L:"yello",F:"en",K:"ch",G:"arks",H:"ea",I:"ightg",J:"wh"},lr={OiceXe:"f0f8ff",antiquewEte:"faebd7",aqua:"ffff",aquamarRe:"7fffd4",azuY:"f0ffff",beige:"f5f5dc",bisque:"ffe4c4",black:"0",blanKedOmond:"ffebcd",Xe:"ff",XeviTet:"8a2be2",bPwn:"a52a2a",burlywood:"deb887",caMtXe:"5f9ea0",KartYuse:"7fff00",KocTate:"d2691e",cSO:"ff7f50",cSnflowerXe:"6495ed",cSnsilk:"fff8dc",crimson:"dc143c",cyan:"ffff",xXe:"8b",xcyan:"8b8b",xgTMnPd:"b8860b",xWay:"a9a9a9",xgYF:"6400",xgYy:"a9a9a9",xkhaki:"bdb76b",xmagFta:"8b008b",xTivegYF:"556b2f",xSange:"ff8c00",xScEd:"9932cc",xYd:"8b0000",xsOmon:"e9967a",xsHgYF:"8fbc8f",xUXe:"483d8b",xUWay:"2f4f4f",xUgYy:"2f4f4f",xQe:"ced1",xviTet:"9400d3",dAppRk:"ff1493",dApskyXe:"bfff",dimWay:"696969",dimgYy:"696969",dodgerXe:"1e90ff",fiYbrick:"b22222",flSOwEte:"fffaf0",foYstWAn:"228b22",fuKsia:"ff00ff",gaRsbSo:"dcdcdc",ghostwEte:"f8f8ff",gTd:"ffd700",gTMnPd:"daa520",Way:"808080",gYF:"8000",gYFLw:"adff2f",gYy:"808080",honeyMw:"f0fff0",hotpRk:"ff69b4",RdianYd:"cd5c5c",Rdigo:"4b0082",ivSy:"fffff0",khaki:"f0e68c",lavFMr:"e6e6fa",lavFMrXsh:"fff0f5",lawngYF:"7cfc00",NmoncEffon:"fffacd",ZXe:"add8e6",ZcSO:"f08080",Zcyan:"e0ffff",ZgTMnPdLw:"fafad2",ZWay:"d3d3d3",ZgYF:"90ee90",ZgYy:"d3d3d3",ZpRk:"ffb6c1",ZsOmon:"ffa07a",ZsHgYF:"20b2aa",ZskyXe:"87cefa",ZUWay:"778899",ZUgYy:"778899",ZstAlXe:"b0c4de",ZLw:"ffffe0",lime:"ff00",limegYF:"32cd32",lRF:"faf0e6",magFta:"ff00ff",maPon:"800000",VaquamarRe:"66cdaa",VXe:"cd",VScEd:"ba55d3",VpurpN:"9370db",VsHgYF:"3cb371",VUXe:"7b68ee",VsprRggYF:"fa9a",VQe:"48d1cc",VviTetYd:"c71585",midnightXe:"191970",mRtcYam:"f5fffa",mistyPse:"ffe4e1",moccasR:"ffe4b5",navajowEte:"ffdead",navy:"80",Tdlace:"fdf5e6",Tive:"808000",TivedBb:"6b8e23",Sange:"ffa500",SangeYd:"ff4500",ScEd:"da70d6",pOegTMnPd:"eee8aa",pOegYF:"98fb98",pOeQe:"afeeee",pOeviTetYd:"db7093",papayawEp:"ffefd5",pHKpuff:"ffdab9",peru:"cd853f",pRk:"ffc0cb",plum:"dda0dd",powMrXe:"b0e0e6",purpN:"800080",YbeccapurpN:"663399",Yd:"ff0000",Psybrown:"bc8f8f",PyOXe:"4169e1",saddNbPwn:"8b4513",sOmon:"fa8072",sandybPwn:"f4a460",sHgYF:"2e8b57",sHshell:"fff5ee",siFna:"a0522d",silver:"c0c0c0",skyXe:"87ceeb",UXe:"6a5acd",UWay:"708090",UgYy:"708090",snow:"fffafa",sprRggYF:"ff7f",stAlXe:"4682b4",tan:"d2b48c",teO:"8080",tEstN:"d8bfd8",tomato:"ff6347",Qe:"40e0d0",viTet:"ee82ee",JHt:"f5deb3",wEte:"ffffff",wEtesmoke:"f5f5f5",Lw:"ffff00",LwgYF:"9acd32"};$d=/^rgba?\(\s*([-+.\d]+)(%)?[\s,]+([-+.e\d]+)(%)?[\s,]+([-+.e\d]+)(%)?(?:[\s,/]+([-+.e\d]+)(%)?)?\s*\)$/;zn=i=>i<=.0031308?i*12.92:Math.pow(i,1/2.4)*1.055-.055,pe=i=>i<=.04045?i/12.92:Math.pow((i+.055)/1.055,2.4);Ue=class i{constructor(t){if(t instanceof i)return t;let e=typeof t,n;e==="object"?n=cr(t):e==="string"&&(n=Sd(t)||Fd(t)||Bd(t)),this._rgb=n,this._valid=!!n}get valid(){return this._valid}get rgb(){var t=hr(this._rgb);return t&&(t.a=Et(t.a)),t}set rgb(t){this._rgb=cr(t)}rgbString(){return this._valid?zd(this._rgb):void 0}hexString(){return this._valid?Td(this._rgb):void 0}hslString(){return this._valid?Od(this._rgb):void 0}mix(t,e){if(t){let n=this.rgb,s=t.rgb,o,r=e===o?.5:e,a=2*r-1,l=n.a-s.a,c=((a*l===-1?a:(a+l)/(1+a*l))+1)/2;o=1-c,n.r=255&c*n.r+o*s.r+.5,n.g=255&c*n.g+o*s.g+.5,n.b=255&c*n.b+o*s.b+.5,n.a=r*n.a+(1-r)*s.a,this.rgb=n}return this}interpolate(t,e){return t&&(this._rgb=Wd(this._rgb,t._rgb,e)),this}clone(){return new i(this.rgb)}alpha(t){return this._rgb.a=$t(t),this}clearer(t){let e=this._rgb;return e.a*=1-t,this}greyscale(){let t=this._rgb,e=Ke(t.r*.3+t.g*.59+t.b*.11);return t.r=t.g=t.b=e,this}opaquer(t){let e=this._rgb;return e.a*=1+t,this}negate(){let t=this._rgb;return t.r=255-t.r,t.g=255-t.g,t.b=255-t.b,this}lighten(t){return Ii(this._rgb,2,t),this}darken(t){return Ii(this._rgb,2,-t),this}saturate(t){return Ii(this._rgb,1,t),this}desaturate(t){return Ii(this._rgb,1,-t),this}rotate(t){return Rd(this._rgb,t),this}}});function St(){}function R(i){return i==null}function N(i){if(Array.isArray&&Array.isArray(i))return!0;let t=Object.prototype.toString.call(i);return t.slice(0,7)==="[object"&&t.slice(-6)==="Array]"}function O(i){return i!==null&&Object.prototype.toString.call(i)==="[object Object]"}function Y(i){return(typeof i=="number"||i instanceof Number)&&isFinite(+i)}function ct(i,t){return Y(i)?i:t}function E(i,t){return typeof i>"u"?t:i}function B(i,t,e){if(i&&typeof i.call=="function")return i.apply(e,t)}function H(i,t,e,n){let s,o,r;if(N(i))if(o=i.length,n)for(s=o-1;s>=0;s--)t.call(e,i[s],s);else for(s=0;s<o;s++)t.call(e,i[s],s);else if(O(i))for(r=Object.keys(i),o=r.length,s=0;s<o;s++)t.call(e,i[r[s]],r[s])}function Je(i,t){let e,n,s,o;if(!i||!t||i.length!==t.length)return!1;for(e=0,n=i.length;e<n;++e)if(s=i[e],o=t[e],s.datasetIndex!==o.datasetIndex||s.index!==o.index)return!1;return!0}function zi(i){if(N(i))return i.map(zi);if(O(i)){let t=Object.create(null),e=Object.keys(i),n=e.length,s=0;for(;s<n;++s)t[e[s]]=zi(i[e[s]]);return t}return i}function wr(i){return["__proto__","prototype","constructor"].indexOf(i)===-1}function Nd(i,t,e,n){if(!wr(i))return;let s=t[i],o=e[i];O(s)&&O(o)?be(s,o,n):t[i]=zi(o)}function be(i,t,e){let n=N(t)?t:[t],s=n.length;if(!O(i))return i;e=e||{};let o=e.merger||Nd,r;for(let a=0;a<s;++a){if(r=n[a],!O(r))continue;let l=Object.keys(r);for(let c=0,d=l.length;c<d;++c)o(l[c],i,r,e)}return i}function xe(i,t){return be(i,t,{merger:Vd})}function Vd(i,t,e){if(!wr(i))return;let n=t[i],s=e[i];O(n)&&O(s)?xe(n,s):Object.prototype.hasOwnProperty.call(t,i)||(t[i]=zi(s))}function jd(i){let t=i.split("."),e=[],n="";for(let s of t)n+=s,n.endsWith("\\")?n=n.slice(0,-1)+".":(e.push(n),n="");return e}function qd(i){let t=jd(i);return e=>{for(let n of t){if(n==="")break;e=e&&e[n]}return e}}function Dt(i,t){return(gr[t]||(gr[t]=qd(t)))(i)}function Vi(i){return i.charAt(0).toUpperCase()+i.slice(1)}function Cr(i){return i.type==="mouseup"||i.type==="click"||i.type==="contextmenu"}function ve(i,t,e){return Math.abs(i-t)<e}function Gn(i){let t=Math.round(i);i=ve(i,t,i/1e3)?t:i;let e=Math.pow(10,Math.floor(At(i))),n=i/e;return(n<=1?1:n<=2?2:n<=5?5:10)*e}function Er(i){let t=[],e=Math.sqrt(i),n;for(n=1;n<e;n++)i%n===0&&(t.push(n),t.push(i/n));return e===(e|0)&&t.push(e),t.sort((s,o)=>s-o).pop(),t}function Kd(i){return typeof i=="symbol"||typeof i=="object"&&i!==null&&!(Symbol.toPrimitive in i||"toString"in i||"valueOf"in i)}function ee(i){return!Kd(i)&&!isNaN(parseFloat(i))&&isFinite(i)}function Lr(i,t){let e=Math.round(i);return e-t<=i&&e+t>=i}function Xn(i,t,e){let n,s,o;for(n=0,s=i.length;n<s;n++)o=i[n][e],isNaN(o)||(t.min=Math.min(t.min,o),t.max=Math.max(t.max,o))}function bt(i){return i*(F/180)}function ji(i){return i*(180/F)}function Jn(i){if(!Y(i))return;let t=1,e=0;for(;Math.round(i*t)/t!==i;)t*=10,e++;return e}function Zn(i,t){let e=t.x-i.x,n=t.y-i.y,s=Math.sqrt(e*e+n*n),o=Math.atan2(n,e);return o<-.5*F&&(o+=V),{angle:o,distance:s}}function Bi(i,t){return Math.sqrt(Math.pow(t.x-i.x,2)+Math.pow(t.y-i.y,2))}function Gd(i,t){return(i-t+Yd)%V-F}function et(i){return(i%V+V)%V}function Me(i,t,e,n){let s=et(i),o=et(t),r=et(e),a=et(o-s),l=et(r-s),c=et(s-o),d=et(s-r);return s===o||s===r||n&&o===r||a>l&&c<d}function Z(i,t,e){return Math.max(t,Math.min(e,i))}function Ar(i){return Z(i,-32768,32767)}function kt(i,t,e,n=1e-6){return i>=Math.min(t,e)-n&&i<=Math.max(t,e)+n}function qi(i,t,e){e=e||(r=>i[r]<t);let n=i.length-1,s=0,o;for(;n-s>1;)o=s+n>>1,e(o)?s=o:n=o;return{lo:s,hi:n}}function Pr(i,t,e){let n=0,s=i.length;for(;n<s&&i[n]<t;)n++;for(;s>n&&i[s-1]>e;)s--;return n>0||s<i.length?i.slice(n,s):i}function Or(i,t){if(i._chartjs){i._chartjs.listeners.push(t);return}Object.defineProperty(i,"_chartjs",{configurable:!0,enumerable:!1,value:{listeners:[t]}}),Rr.forEach(e=>{let n="_onData"+Vi(e),s=i[e];Object.defineProperty(i,e,{configurable:!0,enumerable:!1,value(...o){let r=s.apply(this,o);return i._chartjs.listeners.forEach(a=>{typeof a[n]=="function"&&a[n](...o)}),r}})})}function Qn(i,t){let e=i._chartjs;if(!e)return;let n=e.listeners,s=n.indexOf(t);s!==-1&&n.splice(s,1),!(n.length>0)&&(Rr.forEach(o=>{delete i[o]}),delete i._chartjs)}function ts(i){let t=new Set(i);return t.size===i.length?i:Array.from(t)}function is(i,t){let e=[],n=!1;return function(...s){e=s,n||(n=!0,es.call(window,()=>{n=!1,i.apply(t,e)}))}}function Ir(i,t){let e;return function(...n){return t?(clearTimeout(e),e=setTimeout(i,t,n)):i.apply(this,n),t}}function ns(i,t,e){let n=t.length,s=0,o=n;if(i._sorted){let{iScale:r,vScale:a,_parsed:l}=i,c=i.dataset&&i.dataset.options?i.dataset.options.spanGaps:null,d=r.axis,{min:u,max:h,minDefined:f,maxDefined:g}=r.getUserBounds();if(f){if(s=Math.min(vt(l,d,u).lo,e?n:vt(t,d,r.getPixelForValue(u)).lo),c){let p=l.slice(0,s+1).reverse().findIndex(m=>!R(m[a.axis]));s-=Math.max(0,p)}s=Z(s,0,n-1)}if(g){let p=Math.max(vt(l,r.axis,h,!0).hi+1,e?0:vt(t,d,r.getPixelForValue(h),!0).hi+1);if(c){let m=l.slice(p-1).findIndex(b=>!R(b[a.axis]));p+=Math.max(0,m)}o=Z(p,s,n)-s}else o=n-s}return{start:s,count:o}}function ss(i){let{xScale:t,yScale:e,_scaleRanges:n}=i,s={xmin:t.min,xmax:t.max,ymin:e.min,ymax:e.max};if(!n)return i._scaleRanges=s,!0;let o=n.xmin!==t.min||n.xmax!==t.max||n.ymin!==e.min||n.ymax!==e.max;return Object.assign(n,s),o}function os(i){if(i&&typeof i=="object"){let t=i.toString();return t==="[object CanvasPattern]"||t==="[object CanvasGradient]"}return!1}function rs(i){return os(i)?i:new Ue(i)}function jn(i){return os(i)?i:new Ue(i).saturate(.5).darken(.1).hexString()}function Zd(i){i.set("animation",{delay:void 0,duration:1e3,easing:"easeOutQuart",fn:void 0,from:void 0,loop:void 0,to:void 0,type:void 0}),i.describe("animation",{_fallback:!1,_indexable:!1,_scriptable:t=>t!=="onProgress"&&t!=="onComplete"&&t!=="fn"}),i.set("animations",{colors:{type:"color",properties:Jd},numbers:{type:"number",properties:Xd}}),i.describe("animations",{_fallback:"animation"}),i.set("transitions",{active:{animation:{duration:400}},resize:{animation:{duration:0}},show:{animations:{colors:{from:"transparent"},visible:{type:"boolean",duration:0}}},hide:{animations:{colors:{to:"transparent"},visible:{type:"boolean",easing:"linear",fn:t=>t|0}}}})}function Qd(i){i.set("layout",{autoPadding:!0,padding:{top:0,right:0,bottom:0,left:0}})}function tu(i,t){t=t||{};let e=i+JSON.stringify(t),n=yr.get(e);return n||(n=new Intl.NumberFormat(i,t),yr.set(e,n)),n}function Se(i,t,e){return tu(t,e).format(i)}function eu(i,t){let e=t.length>3?t[2].value-t[1].value:t[1].value-t[0].value;return Math.abs(e)>=1&&i!==Math.floor(i)&&(e=i-Math.floor(i)),e}function iu(i){i.set("scale",{display:!0,offset:!1,reverse:!1,beginAtZero:!1,bounds:"ticks",clip:!0,grace:0,grid:{display:!0,lineWidth:1,drawOnChartArea:!0,drawTicks:!0,tickLength:8,tickWidth:(t,e)=>e.lineWidth,tickColor:(t,e)=>e.color,offset:!1},border:{display:!0,dash:[],dashOffset:0,width:1},title:{display:!1,text:"",padding:{top:4,bottom:4}},ticks:{minRotation:0,maxRotation:50,mirror:!1,textStrokeWidth:0,textStrokeColor:"",padding:3,display:!0,autoSkip:!0,autoSkipPadding:3,labelOffset:0,callback:Ze.formatters.values,minor:{},major:{},align:"center",crossAlign:"near",showLabelBackdrop:!1,backdropColor:"rgba(255, 255, 255, 0.75)",backdropPadding:2}}),i.route("scale.ticks","color","","color"),i.route("scale.grid","color","","borderColor"),i.route("scale.border","color","","borderColor"),i.route("scale.title","color","","color"),i.describe("scale",{_fallback:!1,_scriptable:t=>!t.startsWith("before")&&!t.startsWith("after")&&t!=="callback"&&t!=="parser",_indexable:t=>t!=="borderDash"&&t!=="tickBorderDash"&&t!=="dash"}),i.describe("scales",{_fallback:"scale"}),i.describe("scale.ticks",{_scriptable:t=>t!=="backdropPadding"&&t!=="callback",_indexable:t=>t!=="backdropPadding"})}function Ge(i,t){if(!t)return i;let e=t.split(".");for(let n=0,s=e.length;n<s;++n){let o=e[n];i=i[o]||(i[o]=Object.create(null))}return i}function qn(i,t,e){return typeof t=="string"?be(Ge(i,t),e):be(Ge(i,""),t)}function nu(i){return!i||R(i.size)||R(i.family)?null:(i.style?i.style+" ":"")+(i.weight?i.weight+" ":"")+i.size+"px "+i.family}function Xe(i,t,e,n,s){let o=t[s];return o||(o=t[s]=i.measureText(s).width,e.push(s)),o>n&&(n=o),n}function Hr(i,t,e,n){n=n||{};let s=n.data=n.data||{},o=n.garbageCollect=n.garbageCollect||[];n.font!==t&&(s=n.data={},o=n.garbageCollect=[],n.font=t),i.save(),i.font=t;let r=0,a=e.length,l,c,d,u,h;for(l=0;l<a;l++)if(u=e[l],u!=null&&!N(u))r=Xe(i,s,o,r,u);else if(N(u))for(c=0,d=u.length;c<d;c++)h=u[c],h!=null&&!N(h)&&(r=Xe(i,s,o,r,h));i.restore();let f=o.length/2;if(f>e.length){for(l=0;l<f;l++)delete s[o[l]];o.splice(0,f)}return r}function Bt(i,t,e){let n=i.currentDevicePixelRatio,s=e!==0?Math.max(e/2,.5):0;return Math.round((t-s)*n)/n+s}function as(i,t){!t&&!i||(t=t||i.getContext("2d"),t.save(),t.resetTransform(),t.clearRect(0,0,i.width,i.height),t.restore())}function Ki(i,t,e,n){ls(i,t,e,n,null)}function ls(i,t,e,n,s){let o,r,a,l,c,d,u,h,f=t.pointStyle,g=t.rotation,p=t.radius,m=(g||0)*Ud;if(f&&typeof f=="object"&&(o=f.toString(),o==="[object HTMLImageElement]"||o==="[object HTMLCanvasElement]")){i.save(),i.translate(e,n),i.rotate(m),i.drawImage(f,-f.width/2,-f.height/2,f.width,f.height),i.restore();return}if(!(isNaN(p)||p<=0)){switch(i.beginPath(),f){default:s?i.ellipse(e,n,s/2,p,0,0,V):i.arc(e,n,p,0,V),i.closePath();break;case"triangle":d=s?s/2:p,i.moveTo(e+Math.sin(m)*d,n-Math.cos(m)*p),m+=pr,i.lineTo(e+Math.sin(m)*d,n-Math.cos(m)*p),m+=pr,i.lineTo(e+Math.sin(m)*d,n-Math.cos(m)*p),i.closePath();break;case"rectRounded":c=p*.516,l=p-c,r=Math.cos(m+Zt)*l,u=Math.cos(m+Zt)*(s?s/2-c:l),a=Math.sin(m+Zt)*l,h=Math.sin(m+Zt)*(s?s/2-c:l),i.arc(e-u,n-a,c,m-F,m-K),i.arc(e+h,n-r,c,m-K,m),i.arc(e+u,n+a,c,m,m+K),i.arc(e-h,n+r,c,m+K,m+F),i.closePath();break;case"rect":if(!g){l=Math.SQRT1_2*p,d=s?s/2:l,i.rect(e-d,n-l,2*d,2*l);break}m+=Zt;case"rectRot":u=Math.cos(m)*(s?s/2:p),r=Math.cos(m)*p,a=Math.sin(m)*p,h=Math.sin(m)*(s?s/2:p),i.moveTo(e-u,n-a),i.lineTo(e+h,n-r),i.lineTo(e+u,n+a),i.lineTo(e-h,n+r),i.closePath();break;case"crossRot":m+=Zt;case"cross":u=Math.cos(m)*(s?s/2:p),r=Math.cos(m)*p,a=Math.sin(m)*p,h=Math.sin(m)*(s?s/2:p),i.moveTo(e-u,n-a),i.lineTo(e+u,n+a),i.moveTo(e+h,n-r),i.lineTo(e-h,n+r);break;case"star":u=Math.cos(m)*(s?s/2:p),r=Math.cos(m)*p,a=Math.sin(m)*p,h=Math.sin(m)*(s?s/2:p),i.moveTo(e-u,n-a),i.lineTo(e+u,n+a),i.moveTo(e+h,n-r),i.lineTo(e-h,n+r),m+=Zt,u=Math.cos(m)*(s?s/2:p),r=Math.cos(m)*p,a=Math.sin(m)*p,h=Math.sin(m)*(s?s/2:p),i.moveTo(e-u,n-a),i.lineTo(e+u,n+a),i.moveTo(e+h,n-r),i.lineTo(e-h,n+r);break;case"line":r=s?s/2:Math.cos(m)*p,a=Math.sin(m)*p,i.moveTo(e-r,n-a),i.lineTo(e+r,n+a);break;case"dash":i.moveTo(e,n),i.lineTo(e+Math.cos(m)*(s?s/2:p),n+Math.sin(m)*p);break;case!1:i.closePath();break}i.fill(),t.borderWidth>0&&i.stroke()}}function Mt(i,t,e){return e=e||.5,!t||i&&i.x>t.left-e&&i.x<t.right+e&&i.y>t.top-e&&i.y<t.bottom+e}function Qe(i,t){i.save(),i.beginPath(),i.rect(t.left,t.top,t.right-t.left,t.bottom-t.top),i.clip()}function ti(i){i.restore()}function zr(i,t,e,n,s){if(!t)return i.lineTo(e.x,e.y);if(s==="middle"){let o=(t.x+e.x)/2;i.lineTo(o,t.y),i.lineTo(o,e.y)}else s==="after"!=!!n?i.lineTo(t.x,e.y):i.lineTo(e.x,t.y);i.lineTo(e.x,e.y)}function Wr(i,t,e,n){if(!t)return i.lineTo(e.x,e.y);i.bezierCurveTo(n?t.cp1x:t.cp2x,n?t.cp1y:t.cp2y,n?e.cp2x:e.cp1x,n?e.cp2y:e.cp1y,e.x,e.y)}function su(i,t){t.translation&&i.translate(t.translation[0],t.translation[1]),R(t.rotation)||i.rotate(t.rotation),t.color&&(i.fillStyle=t.color),t.textAlign&&(i.textAlign=t.textAlign),t.textBaseline&&(i.textBaseline=t.textBaseline)}function ou(i,t,e,n,s){if(s.strikethrough||s.underline){let o=i.measureText(n),r=t-o.actualBoundingBoxLeft,a=t+o.actualBoundingBoxRight,l=e-o.actualBoundingBoxAscent,c=e+o.actualBoundingBoxDescent,d=s.strikethrough?(l+c)/2:c;i.strokeStyle=i.fillStyle,i.beginPath(),i.lineWidth=s.decorationWidth||2,i.moveTo(r,d),i.lineTo(a,d),i.stroke()}}function ru(i,t){let e=i.fillStyle;i.fillStyle=t.color,i.fillRect(t.left,t.top,t.width,t.height),i.fillStyle=e}function Nt(i,t,e,n,s,o={}){let r=N(t)?t:[t],a=o.strokeWidth>0&&o.strokeColor!=="",l,c;for(i.save(),i.font=s.string,su(i,o),l=0;l<r.length;++l)c=r[l],o.backdrop&&ru(i,o.backdrop),a&&(o.strokeColor&&(i.strokeStyle=o.strokeColor),R(o.strokeWidth)||(i.lineWidth=o.strokeWidth),i.strokeText(c,e,n,o.maxWidth)),i.fillText(c,e,n,o.maxWidth),ou(i,e,n,c,o),n+=Number(s.lineHeight);i.restore()}function ke(i,t){let{x:e,y:n,w:s,h:o,radius:r}=t;i.arc(e+r.topLeft,n+r.topLeft,r.topLeft,1.5*F,F,!0),i.lineTo(e,n+o-r.bottomLeft),i.arc(e+r.bottomLeft,n+o-r.bottomLeft,r.bottomLeft,F,K,!0),i.lineTo(e+s-r.bottomRight,n+o),i.arc(e+s-r.bottomRight,n+o-r.bottomRight,r.bottomRight,K,0,!0),i.lineTo(e+s,n+r.topRight),i.arc(e+s-r.topRight,n+r.topRight,r.topRight,0,-K,!0),i.lineTo(e+r.topLeft,n)}function cu(i,t){let e=(""+i).match(au);if(!e||e[1]==="normal")return t*1.2;switch(i=+e[2],e[3]){case"px":return i;case"%":i/=100;break}return t*i}function Gi(i,t){let e={},n=O(t),s=n?Object.keys(t):t,o=O(i)?n?r=>E(i[r],i[t[r]]):r=>i[r]:()=>i;for(let r of s)e[r]=du(o(r));return e}function cs(i){return Gi(i,{top:"y",right:"x",bottom:"y",left:"x"})}function Vt(i){return Gi(i,["topLeft","topRight","bottomLeft","bottomRight"])}function nt(i){let t=cs(i);return t.width=t.left+t.right,t.height=t.top+t.bottom,t}function J(i,t){i=i||{},t=t||j.font;let e=E(i.size,t.size);typeof e=="string"&&(e=parseInt(e,10));let n=E(i.style,t.style);n&&!(""+n).match(lu)&&(console.warn('Invalid font style specified: "'+n+'"'),n=void 0);let s={family:E(i.family,t.family),lineHeight:cu(E(i.lineHeight,t.lineHeight),e),size:e,style:n,weight:E(i.weight,t.weight),string:""};return s.string=nu(s),s}function Te(i,t,e,n){let s=!0,o,r,a;for(o=0,r=i.length;o<r;++o)if(a=i[o],a!==void 0&&(t!==void 0&&typeof a=="function"&&(a=a(t),s=!1),e!==void 0&&N(a)&&(a=a[e%a.length],s=!1),a!==void 0))return n&&!s&&(n.cacheable=!1),a}function Br(i,t,e){let{min:n,max:s}=i,o=Un(t,(s-n)/2),r=(a,l)=>e&&a===0?0:a+l;return{min:r(n,-Math.abs(o)),max:r(s,o)}}function Pt(i,t){return Object.assign(Object.create(i),t)}function Xi(i,t=[""],e,n,s=()=>i[0]){let o=e||i;typeof n>"u"&&(n=jr("_fallback",i));let r={[Symbol.toStringTag]:"Object",_cacheable:!0,_scopes:i,_rootScopes:o,_fallback:n,_getTarget:s,override:a=>Xi([a,...i],t,o,n)};return new Proxy(r,{deleteProperty(a,l){return delete a[l],delete a._keys,delete i[0][l],!0},get(a,l){return Nr(a,l,()=>yu(l,t,i,a))},getOwnPropertyDescriptor(a,l){return Reflect.getOwnPropertyDescriptor(a._scopes[0],l)},getPrototypeOf(){return Reflect.getPrototypeOf(i[0])},has(a,l){return _r(a).includes(l)},ownKeys(a){return _r(a)},set(a,l,c){let d=a._storage||(a._storage=s());return a[l]=d[l]=c,delete a._keys,!0}})}function te(i,t,e,n){let s={_cacheable:!1,_proxy:i,_context:t,_subProxy:e,_stack:new Set,_descriptors:ds(i,n),setContext:o=>te(i,o,e,n),override:o=>te(i.override(o),t,e,n)};return new Proxy(s,{deleteProperty(o,r){return delete o[r],delete i[r],!0},get(o,r,a){return Nr(o,r,()=>hu(o,r,a))},getOwnPropertyDescriptor(o,r){return o._descriptors.allKeys?Reflect.has(i,r)?{enumerable:!0,configurable:!0}:void 0:Reflect.getOwnPropertyDescriptor(i,r)},getPrototypeOf(){return Reflect.getPrototypeOf(i)},has(o,r){return Reflect.has(i,r)},ownKeys(){return Reflect.ownKeys(i)},set(o,r,a){return i[r]=a,delete o[r],!0}})}function ds(i,t={scriptable:!0,indexable:!0}){let{_scriptable:e=t.scriptable,_indexable:n=t.indexable,_allKeys:s=t.allKeys}=i;return{allKeys:s,scriptable:e,indexable:n,isScriptable:Lt(e)?e:()=>e,isIndexable:Lt(n)?n:()=>n}}function Nr(i,t,e){if(Object.prototype.hasOwnProperty.call(i,t)||t==="constructor")return i[t];let n=e();return i[t]=n,n}function hu(i,t,e){let{_proxy:n,_context:s,_subProxy:o,_descriptors:r}=i,a=n[t];return Lt(a)&&r.isScriptable(t)&&(a=fu(t,a,i,e)),N(a)&&a.length&&(a=gu(t,a,i,r.isIndexable)),us(t,a)&&(a=te(a,s,o&&o[t],r)),a}function fu(i,t,e,n){let{_proxy:s,_context:o,_subProxy:r,_stack:a}=e;if(a.has(i))throw new Error("Recursion detected: "+Array.from(a).join("->")+"->"+i);a.add(i);let l=t(o,r||n);return a.delete(i),us(i,l)&&(l=hs(s._scopes,s,i,l)),l}function gu(i,t,e,n){let{_proxy:s,_context:o,_subProxy:r,_descriptors:a}=e;if(typeof o.index<"u"&&n(i))return t[o.index%t.length];if(O(t[0])){let l=t,c=s._scopes.filter(d=>d!==l);t=[];for(let d of l){let u=hs(c,s,i,d);t.push(te(u,o,r&&r[i],a))}}return t}function Vr(i,t,e){return Lt(i)?i(t,e):i}function mu(i,t,e,n,s){for(let o of t){let r=pu(e,o);if(r){i.add(r);let a=Vr(r._fallback,e,s);if(typeof a<"u"&&a!==e&&a!==n)return a}else if(r===!1&&typeof n<"u"&&e!==n)return null}return!1}function hs(i,t,e,n){let s=t._rootScopes,o=Vr(t._fallback,e,n),r=[...i,...s],a=new Set;a.add(n);let l=xr(a,r,e,o||e,n);return l===null||typeof o<"u"&&o!==e&&(l=xr(a,r,o,l,n),l===null)?!1:Xi(Array.from(a),[""],s,o,()=>bu(t,e,n))}function xr(i,t,e,n,s){for(;e;)e=mu(i,t,e,n,s);return e}function bu(i,t,e){let n=i._getTarget();t in n||(n[t]={});let s=n[t];return N(s)&&O(e)?e:s||{}}function yu(i,t,e,n){let s;for(let o of t)if(s=jr(uu(o,i),e),typeof s<"u")return us(i,s)?hs(e,n,i,s):s}function jr(i,t){for(let e of t){if(!e)continue;let n=e[i];if(typeof n<"u")return n}}function _r(i){let t=i._keys;return t||(t=i._keys=xu(i._scopes)),t}function xu(i){let t=new Set;for(let e of i)for(let n of Object.keys(e).filter(s=>!s.startsWith("_")))t.add(n);return Array.from(t)}function fs(i,t,e,n){let{iScale:s}=i,{key:o="r"}=this._parsing,r=new Array(n),a,l,c,d;for(a=0,l=n;a<l;++a)c=a+e,d=t[c],r[a]={r:s.parse(Dt(d,o),c)};return r}function vu(i,t,e,n){let s=i.skip?t:i,o=t,r=e.skip?t:e,a=Bi(o,s),l=Bi(r,o),c=a/(a+l),d=l/(a+l);c=isNaN(c)?0:c,d=isNaN(d)?0:d;let u=n*c,h=n*d;return{previous:{x:o.x-u*(r.x-s.x),y:o.y-u*(r.y-s.y)},next:{x:o.x+h*(r.x-s.x),y:o.y+h*(r.y-s.y)}}}function Mu(i,t,e){let n=i.length,s,o,r,a,l,c=ye(i,0);for(let d=0;d<n-1;++d)if(l=c,c=ye(i,d+1),!(!l||!c)){if(ve(t[d],0,_u)){e[d]=e[d+1]=0;continue}s=e[d]/t[d],o=e[d+1]/t[d],a=Math.pow(s,2)+Math.pow(o,2),!(a<=9)&&(r=3/Math.sqrt(a),e[d]=s*r*t[d],e[d+1]=o*r*t[d])}}function Su(i,t,e="x"){let n=qr(e),s=i.length,o,r,a,l=ye(i,0);for(let c=0;c<s;++c){if(r=a,a=l,l=ye(i,c+1),!a)continue;let d=a[e],u=a[n];r&&(o=(d-r[e])/3,a[`cp1${e}`]=d-o,a[`cp1${n}`]=u-o*t[c]),l&&(o=(l[e]-d)/3,a[`cp2${e}`]=d+o,a[`cp2${n}`]=u+o*t[c])}}function ku(i,t="x"){let e=qr(t),n=i.length,s=Array(n).fill(0),o=Array(n),r,a,l,c=ye(i,0);for(r=0;r<n;++r)if(a=l,l=c,c=ye(i,r+1),!!l){if(c){let d=c[t]-l[t];s[r]=d!==0?(c[e]-l[e])/d:0}o[r]=a?c?xt(s[r-1])!==xt(s[r])?0:(s[r-1]+s[r])/2:s[r-1]:s[r]}Mu(i,s,o),Su(i,o,t)}function $i(i,t,e){return Math.max(Math.min(i,e),t)}function Tu(i,t){let e,n,s,o,r,a=Mt(i[0],t);for(e=0,n=i.length;e<n;++e)r=o,o=a,a=e<n-1&&Mt(i[e+1],t),o&&(s=i[e],r&&(s.cp1x=$i(s.cp1x,t.left,t.right),s.cp1y=$i(s.cp1y,t.top,t.bottom)),a&&(s.cp2x=$i(s.cp2x,t.left,t.right),s.cp2y=$i(s.cp2y,t.top,t.bottom)))}function Yr(i,t,e,n,s){let o,r,a,l;if(t.spanGaps&&(i=i.filter(c=>!c.skip)),t.cubicInterpolationMode==="monotone")ku(i,s);else{let c=n?i[i.length-1]:i[0];for(o=0,r=i.length;o<r;++o)a=i[o],l=vu(c,a,i[Math.min(o+1,r-(n?0:1))%r],t.tension),a.cp1x=l.previous.x,a.cp1y=l.previous.y,a.cp2x=l.next.x,a.cp2y=l.next.y,c=a}t.capBezierPoints&&Tu(i,e)}function Ji(){return typeof window<"u"&&typeof document<"u"}function Zi(i){let t=i.parentNode;return t&&t.toString()==="[object ShadowRoot]"&&(t=t.host),t}function Ni(i,t,e){let n;return typeof i=="string"?(n=parseInt(i,10),i.indexOf("%")!==-1&&(n=n/100*t.parentNode[e])):n=i,n}function wu(i,t){return Qi(i).getPropertyValue(t)}function Qt(i,t,e){let n={};e=e?"-"+e:"";for(let s=0;s<4;s++){let o=Cu[s];n[o]=parseFloat(i[t+"-"+o+e])||0}return n.width=n.left+n.right,n.height=n.top+n.bottom,n}function Lu(i,t){let e=i.touches,n=e&&e.length?e[0]:i,{offsetX:s,offsetY:o}=n,r=!1,a,l;if(Eu(s,o,i.target))a=s,l=o;else{let c=t.getBoundingClientRect();a=n.clientX-c.left,l=n.clientY-c.top,r=!0}return{x:a,y:l,box:r}}function jt(i,t){if("native"in i)return i;let{canvas:e,currentDevicePixelRatio:n}=t,s=Qi(e),o=s.boxSizing==="border-box",r=Qt(s,"padding"),a=Qt(s,"border","width"),{x:l,y:c,box:d}=Lu(i,e),u=r.left+(d&&a.left),h=r.top+(d&&a.top),{width:f,height:g}=t;return o&&(f-=r.width+a.width,g-=r.height+a.height),{x:Math.round((l-u)/f*e.width/n),y:Math.round((c-h)/g*e.height/n)}}function Au(i,t,e){let n,s;if(t===void 0||e===void 0){let o=i&&Zi(i);if(!o)t=i.clientWidth,e=i.clientHeight;else{let r=o.getBoundingClientRect(),a=Qi(o),l=Qt(a,"border","width"),c=Qt(a,"padding");t=r.width-c.width-l.width,e=r.height-c.height-l.height,n=Ni(a.maxWidth,o,"clientWidth"),s=Ni(a.maxHeight,o,"clientHeight")}}return{width:t,height:e,maxWidth:n||Wi,maxHeight:s||Wi}}function Ur(i,t,e,n){let s=Qi(i),o=Qt(s,"margin"),r=Ni(s.maxWidth,i,"clientWidth")||Wi,a=Ni(s.maxHeight,i,"clientHeight")||Wi,l=Au(i,t,e),{width:c,height:d}=l;if(s.boxSizing==="content-box"){let h=Qt(s,"border","width"),f=Qt(s,"padding");c-=f.width+h.width,d-=f.height+h.height}return c=Math.max(0,c-o.width),d=Math.max(0,n?c/n:d-o.height),c=zt(Math.min(c,r,l.maxWidth)),d=zt(Math.min(d,a,l.maxHeight)),c&&!d&&(d=zt(c/2)),(t!==void 0||e!==void 0)&&n&&l.height&&d>l.height&&(d=l.height,c=zt(Math.floor(d*n))),{width:c,height:d}}function gs(i,t,e){let n=t||1,s=zt(i.height*n),o=zt(i.width*n);i.height=zt(i.height),i.width=zt(i.width);let r=i.canvas;return r.style&&(e||!r.style.height&&!r.style.width)&&(r.style.height=`${i.height}px`,r.style.width=`${i.width}px`),i.currentDevicePixelRatio!==n||r.height!==s||r.width!==o?(i.currentDevicePixelRatio=n,r.height=s,r.width=o,i.ctx.setTransform(n,0,0,n,0,0),!0):!1}function ps(i,t){let e=wu(i,t),n=e&&e.match(/^(\d+)(\.\d+)?px$/);return n?+n[1]:void 0}function Ht(i,t,e,n){return{x:i.x+e*(t.x-i.x),y:i.y+e*(t.y-i.y)}}function Gr(i,t,e,n){return{x:i.x+e*(t.x-i.x),y:n==="middle"?e<.5?i.y:t.y:n==="after"?e<1?i.y:t.y:e>0?t.y:i.y}}function Xr(i,t,e,n){let s={x:i.cp2x,y:i.cp2y},o={x:t.cp1x,y:t.cp1y},r=Ht(i,s,e),a=Ht(s,o,e),l=Ht(o,t,e),c=Ht(r,a,e),d=Ht(a,l,e);return Ht(c,d,e)}function ie(i,t,e){return i?Du(t,e):Pu()}function ms(i,t){let e,n;(t==="ltr"||t==="rtl")&&(e=i.canvas.style,n=[e.getPropertyValue("direction"),e.getPropertyPriority("direction")],e.setProperty("direction",t,"important"),i.prevTextDirection=n)}function bs(i,t){t!==void 0&&(delete i.prevTextDirection,i.canvas.style.setProperty("direction",t[0],t[1]))}function Jr(i){return i==="angle"?{between:Me,compare:Gd,normalize:et}:{between:kt,compare:(t,e)=>t-e,normalize:t=>t}}function vr({start:i,end:t,count:e,loop:n,style:s}){return{start:i%e,end:t%e,loop:n&&(t-i+1)%e===0,style:s}}function Ru(i,t,e){let{property:n,start:s,end:o}=e,{between:r,normalize:a}=Jr(n),l=t.length,{start:c,end:d,loop:u}=i,h,f;if(u){for(c+=l,d+=l,h=0,f=l;h<f&&r(a(t[c%l][n]),s,o);++h)c--,d--;c%=l,d%=l}return d<c&&(d+=l),{start:c,end:d,loop:u,style:i.style}}function ys(i,t,e){if(!e)return[i];let{property:n,start:s,end:o}=e,r=t.length,{compare:a,between:l,normalize:c}=Jr(n),{start:d,end:u,loop:h,style:f}=Ru(i,t,e),g=[],p=!1,m=null,b,y,_,v=()=>l(s,_,b)&&a(s,_)!==0,x=()=>a(o,b)===0||l(o,_,b),S=()=>p||v(),k=()=>!p||x();for(let T=d,w=d;T<=u;++T)y=t[T%r],!y.skip&&(b=c(y[n]),b!==_&&(p=l(b,s,o),m===null&&S()&&(m=a(b,s)===0?T:w),m!==null&&k()&&(g.push(vr({start:m,end:T,loop:h,count:r,style:f})),m=null),w=T,_=b));return m!==null&&g.push(vr({start:m,end:u,loop:h,count:r,style:f})),g}function xs(i,t){let e=[],n=i.segments;for(let s=0;s<n.length;s++){let o=ys(n[s],i.points,t);o.length&&e.push(...o)}return e}function Ou(i,t,e,n){let s=0,o=t-1;if(e&&!n)for(;s<t&&!i[s].skip;)s++;for(;s<t&&i[s].skip;)s++;for(s%=t,e&&(o+=s);o>s&&i[o%t].skip;)o--;return o%=t,{start:s,end:o}}function Iu(i,t,e,n){let s=i.length,o=[],r=t,a=i[t],l;for(l=t+1;l<=e;++l){let c=i[l%s];c.skip||c.stop?a.skip||(n=!1,o.push({start:t%s,end:(l-1)%s,loop:n}),t=r=c.stop?l:null):(r=l,a.skip&&(t=l)),a=c}return r!==null&&o.push({start:t%s,end:r%s,loop:n}),o}function Zr(i,t){let e=i.points,n=i.options.spanGaps,s=e.length;if(!s)return[];let o=!!i._loop,{start:r,end:a}=Ou(e,s,o,n);if(n===!0)return Mr(i,[{start:r,end:a,loop:o}],e,t);let l=a<r?a+s:a,c=!!i._fullLoop&&r===0&&a===s-1;return Mr(i,Iu(e,r,l,c),e,t)}function Mr(i,t,e,n){return!n||!n.setContext||!e?t:Fu(i,t,e,n)}function Fu(i,t,e,n){let s=i._chart.getContext(),o=Sr(i.options),{_datasetIndex:r,options:{spanGaps:a}}=i,l=e.length,c=[],d=o,u=t[0].start,h=u;function f(g,p,m,b){let y=a?-1:1;if(g!==p){for(g+=l;e[g%l].skip;)g-=y;for(;e[p%l].skip;)p+=y;g%l!==p%l&&(c.push({start:g%l,end:p%l,loop:m,style:b}),d=b,u=p%l)}}for(let g of t){u=a?u:g.start;let p=e[u%l],m;for(h=u+1;h<=g.end;h++){let b=e[h%l];m=Sr(n.setContext(Pt(s,{type:"segment",p0:p,p1:b,p0DataIndex:(h-1)%l,p1DataIndex:h%l,datasetIndex:r}))),$u(m,d)&&f(u,h-1,g.loop,d),p=b,d=m}u<h-1&&f(u,h-1,g.loop,d)}return c}function Sr(i){return{backgroundColor:i.backgroundColor,borderCapStyle:i.borderCapStyle,borderDash:i.borderDash,borderDashOffset:i.borderDashOffset,borderJoinStyle:i.borderJoinStyle,borderWidth:i.borderWidth,borderColor:i.borderColor}}function $u(i,t){if(!t)return!1;let e=[],n=function(s,o){return os(o)?(e.includes(o)||e.push(o),e.indexOf(o)):o};return JSON.stringify(i,n)!==JSON.stringify(t,n)}function Hi(i,t,e){return i.options.clip?i[e]:t[e]}function Hu(i,t){let{xScale:e,yScale:n}=i;return e&&n?{left:Hi(e,t,"left"),right:Hi(e,t,"right"),top:Hi(n,t,"top"),bottom:Hi(n,t,"bottom")}:t}function _s(i,t){let e=t._clip;if(e.disabled)return!1;let n=Hu(t,i.chartArea);return{left:e.left===!1?0:n.left-(e.left===!0?0:e.left),right:e.right===!1?i.width:n.right+(e.right===!0?0:e.right),top:e.top===!1?0:n.top-(e.top===!0?0:e.top),bottom:e.bottom===!1?i.height:n.bottom+(e.bottom===!0?0:e.bottom)}}var kr,Tr,Un,gr,_e,Lt,Kn,F,V,Yd,Wi,Ud,K,Zt,pr,At,xt,vt,Dr,Rr,es,Yi,it,Fr,Fi,mr,br,me,Xd,Jd,yr,$r,Ze,Wt,Ui,Yn,j,au,lu,du,uu,us,pu,_u,ye,qr,Qi,Cu,Eu,zt,Kr,Du,Pu,Qr=C(()=>{fr();kr=(()=>{let i=0;return()=>i++})();Tr=(i,t)=>typeof i=="string"&&i.endsWith("%")?parseFloat(i)/100:+i/t,Un=(i,t)=>typeof i=="string"&&i.endsWith("%")?parseFloat(i)/100*t:+i;gr={"":i=>i,x:i=>i.x,y:i=>i.y};_e=i=>typeof i<"u",Lt=i=>typeof i=="function",Kn=(i,t)=>{if(i.size!==t.size)return!1;for(let e of i)if(!t.has(e))return!1;return!0};F=Math.PI,V=2*F,Yd=V+F,Wi=Number.POSITIVE_INFINITY,Ud=F/180,K=F/2,Zt=F/4,pr=F*2/3,At=Math.log10,xt=Math.sign;vt=(i,t,e,n)=>qi(i,e,n?s=>{let o=i[s][t];return o<e||o===e&&i[s+1][t]===e}:s=>i[s][t]<e),Dr=(i,t,e)=>qi(i,e,n=>i[n][t]>=e);Rr=["push","pop","shift","splice","unshift"];es=(function(){return typeof window>"u"?function(i){return i()}:window.requestAnimationFrame})();Yi=i=>i==="start"?"left":i==="end"?"right":"center",it=(i,t,e)=>i==="start"?t:i==="end"?e:(t+e)/2,Fr=(i,t,e,n)=>i===(n?"left":"right")?e:i==="center"?(t+e)/2:t;Fi=i=>i===0||i===1,mr=(i,t,e)=>-(Math.pow(2,10*(i-=1))*Math.sin((i-t)*V/e)),br=(i,t,e)=>Math.pow(2,-10*i)*Math.sin((i-t)*V/e)+1,me={linear:i=>i,easeInQuad:i=>i*i,easeOutQuad:i=>-i*(i-2),easeInOutQuad:i=>(i/=.5)<1?.5*i*i:-.5*(--i*(i-2)-1),easeInCubic:i=>i*i*i,easeOutCubic:i=>(i-=1)*i*i+1,easeInOutCubic:i=>(i/=.5)<1?.5*i*i*i:.5*((i-=2)*i*i+2),easeInQuart:i=>i*i*i*i,easeOutQuart:i=>-((i-=1)*i*i*i-1),easeInOutQuart:i=>(i/=.5)<1?.5*i*i*i*i:-.5*((i-=2)*i*i*i-2),easeInQuint:i=>i*i*i*i*i,easeOutQuint:i=>(i-=1)*i*i*i*i+1,easeInOutQuint:i=>(i/=.5)<1?.5*i*i*i*i*i:.5*((i-=2)*i*i*i*i+2),easeInSine:i=>-Math.cos(i*K)+1,easeOutSine:i=>Math.sin(i*K),easeInOutSine:i=>-.5*(Math.cos(F*i)-1),easeInExpo:i=>i===0?0:Math.pow(2,10*(i-1)),easeOutExpo:i=>i===1?1:-Math.pow(2,-10*i)+1,easeInOutExpo:i=>Fi(i)?i:i<.5?.5*Math.pow(2,10*(i*2-1)):.5*(-Math.pow(2,-10*(i*2-1))+2),easeInCirc:i=>i>=1?i:-(Math.sqrt(1-i*i)-1),easeOutCirc:i=>Math.sqrt(1-(i-=1)*i),easeInOutCirc:i=>(i/=.5)<1?-.5*(Math.sqrt(1-i*i)-1):.5*(Math.sqrt(1-(i-=2)*i)+1),easeInElastic:i=>Fi(i)?i:mr(i,.075,.3),easeOutElastic:i=>Fi(i)?i:br(i,.075,.3),easeInOutElastic(i){return Fi(i)?i:i<.5?.5*mr(i*2,.1125,.45):.5+.5*br(i*2-1,.1125,.45)},easeInBack(i){return i*i*((1.70158+1)*i-1.70158)},easeOutBack(i){return(i-=1)*i*((1.70158+1)*i+1.70158)+1},easeInOutBack(i){let t=1.70158;return(i/=.5)<1?.5*(i*i*(((t*=1.525)+1)*i-t)):.5*((i-=2)*i*(((t*=1.525)+1)*i+t)+2)},easeInBounce:i=>1-me.easeOutBounce(1-i),easeOutBounce(i){return i<1/2.75?7.5625*i*i:i<2/2.75?7.5625*(i-=1.5/2.75)*i+.75:i<2.5/2.75?7.5625*(i-=2.25/2.75)*i+.9375:7.5625*(i-=2.625/2.75)*i+.984375},easeInOutBounce:i=>i<.5?me.easeInBounce(i*2)*.5:me.easeOutBounce(i*2-1)*.5+.5};Xd=["x","y","borderWidth","radius","tension"],Jd=["color","borderColor","backgroundColor"];yr=new Map;$r={values(i){return N(i)?i:""+i},numeric(i,t,e){if(i===0)return"0";let n=this.chart.options.locale,s,o=i;if(e.length>1){let c=Math.max(Math.abs(e[0].value),Math.abs(e[e.length-1].value));(c<1e-4||c>1e15)&&(s="scientific"),o=eu(i,e)}let r=At(Math.abs(o)),a=isNaN(r)?1:Math.max(Math.min(-1*Math.floor(r),20),0),l={notation:s,minimumFractionDigits:a,maximumFractionDigits:a};return Object.assign(l,this.options.ticks.format),Se(i,n,l)},logarithmic(i,t,e){if(i===0)return"0";let n=e[t].significand||i/Math.pow(10,Math.floor(At(i)));return[1,2,3,5,10,15].includes(n)||t>.8*e.length?$r.numeric.call(this,i,t,e):""}};Ze={formatters:$r};Wt=Object.create(null),Ui=Object.create(null);Yn=class{constructor(t,e){this.animation=void 0,this.backgroundColor="rgba(0,0,0,0.1)",this.borderColor="rgba(0,0,0,0.1)",this.color="#666",this.datasets={},this.devicePixelRatio=n=>n.chart.platform.getDevicePixelRatio(),this.elements={},this.events=["mousemove","mouseout","click","touchstart","touchmove"],this.font={family:"'Helvetica Neue', 'Helvetica', 'Arial', sans-serif",size:12,style:"normal",lineHeight:1.2,weight:null},this.hover={},this.hoverBackgroundColor=(n,s)=>jn(s.backgroundColor),this.hoverBorderColor=(n,s)=>jn(s.borderColor),this.hoverColor=(n,s)=>jn(s.color),this.indexAxis="x",this.interaction={mode:"nearest",intersect:!0,includeInvisible:!1},this.maintainAspectRatio=!0,this.onHover=null,this.onClick=null,this.parsing=!0,this.plugins={},this.responsive=!0,this.scale=void 0,this.scales={},this.showLine=!0,this.drawActiveElementsOnTop=!0,this.describe(t),this.apply(e)}set(t,e){return qn(this,t,e)}get(t){return Ge(this,t)}describe(t,e){return qn(Ui,t,e)}override(t,e){return qn(Wt,t,e)}route(t,e,n,s){let o=Ge(this,t),r=Ge(this,n),a="_"+e;Object.defineProperties(o,{[a]:{value:o[e],writable:!0},[e]:{enumerable:!0,get(){let l=this[a],c=r[s];return O(l)?Object.assign({},c,l):E(l,c)},set(l){this[a]=l}}})}apply(t){t.forEach(e=>e(this))}},j=new Yn({_scriptable:i=>!i.startsWith("on"),_indexable:i=>i!=="events",hover:{_fallback:"interaction"},interaction:{_scriptable:!1,_indexable:!1}},[Zd,Qd,iu]);au=/^(normal|(\d+(?:\.\d+)?)(px|em|%)?)$/,lu=/^(normal|italic|initial|inherit|unset|(oblique( -?[0-9]?[0-9]deg)?))$/;du=i=>+i||0;uu=(i,t)=>i?i+Vi(t):t,us=(i,t)=>O(t)&&i!=="adapters"&&(Object.getPrototypeOf(t)===null||t.constructor===Object);pu=(i,t)=>i===!0?t:typeof i=="string"?Dt(t,i):void 0;_u=Number.EPSILON||1e-14,ye=(i,t)=>t<i.length&&!i[t].skip&&i[t],qr=i=>i==="x"?"y":"x";Qi=i=>i.ownerDocument.defaultView.getComputedStyle(i,null);Cu=["top","right","bottom","left"];Eu=(i,t,e)=>(i>0||t>0)&&(!e||!e.shadowRoot);zt=i=>Math.round(i*10)/10;Kr=(function(){let i=!1;try{let t={get passive(){return i=!0,!1}};Ji()&&(window.addEventListener("test",null,t),window.removeEventListener("test",null,t))}catch{}return i})();Du=function(i,t){return{x(e){return i+i+t-e},setWidth(e){t=e},textAlign(e){return e==="center"?e:e==="right"?"left":"right"},xPlus(e,n){return e-n},leftForLtr(e,n){return e-n}}},Pu=function(){return{x(i){return i},setWidth(i){},textAlign(i){return i},xPlus(i,t){return i+t},leftForLtr(i,t){return i}}}});function Wu(i,t){let e=[],n=Object.keys(t);for(let s=0;s<n.length;s++){let o=i[n[s]];o&&o.active()&&e.push(o.wait())}return Promise.all(e)}function Bu(i,t){if(!t)return;let e=i.options;if(!e){i.options=t;return}return e.$shared&&(i.options=e=Object.assign({},e,{$shared:!1,$animations:{}})),e}function ea(i,t){let e=i&&i.options||{},n=e.reverse,s=e.min===void 0?t:0,o=e.max===void 0?t:0;return{start:n?o:s,end:n?s:o}}function Nu(i,t,e){if(e===!1)return!1;let n=ea(i,e),s=ea(t,e);return{top:s.end,right:n.end,bottom:s.start,left:n.start}}function Vu(i){let t,e,n,s;return O(i)?(t=i.top,e=i.right,n=i.bottom,s=i.left):t=e=n=s=i,{top:t,right:e,bottom:n,left:s,disabled:i===!1}}function Qa(i,t){let e=[],n=i._getSortedDatasetMetas(t),s,o;for(s=0,o=n.length;s<o;++s)e.push(n[s].index);return e}function ia(i,t,e,n={}){let s=i.keys,o=n.mode==="single",r,a,l,c;if(t===null)return;let d=!1;for(r=0,a=s.length;r<a;++r){if(l=+s[r],l===e){if(d=!0,n.all)continue;break}c=i.values[l],Y(c)&&(o||t===0||xt(t)===xt(c))&&(t+=c)}return!d&&!n.all?0:t}function ju(i,t){let{iScale:e,vScale:n}=t,s=e.axis==="x"?"x":"y",o=n.axis==="x"?"x":"y",r=Object.keys(i),a=new Array(r.length),l,c,d;for(l=0,c=r.length;l<c;++l)d=r[l],a[l]={[s]:d,[o]:i[d]};return a}function vs(i,t){let e=i&&i.options.stacked;return e||e===void 0&&t.stack!==void 0}function qu(i,t,e){return`${i.id}.${t.id}.${e.stack||e.type}`}function Yu(i){let{min:t,max:e,minDefined:n,maxDefined:s}=i.getUserBounds();return{min:n?t:Number.NEGATIVE_INFINITY,max:s?e:Number.POSITIVE_INFINITY}}function Uu(i,t,e){let n=i[t]||(i[t]={});return n[e]||(n[e]={})}function na(i,t,e,n){for(let s of t.getMatchingVisibleMetas(n).reverse()){let o=i[s.index];if(e&&o>0||!e&&o<0)return s.index}return null}function sa(i,t){let{chart:e,_cachedMeta:n}=i,s=e._stacks||(e._stacks={}),{iScale:o,vScale:r,index:a}=n,l=o.axis,c=r.axis,d=qu(o,r,n),u=t.length,h;for(let f=0;f<u;++f){let g=t[f],{[l]:p,[c]:m}=g,b=g._stacks||(g._stacks={});h=b[c]=Uu(s,d,p),h[a]=m,h._top=na(h,r,!0,n.type),h._bottom=na(h,r,!1,n.type);let y=h._visualValues||(h._visualValues={});y[a]=m}}function Ms(i,t){let e=i.scales;return Object.keys(e).filter(n=>e[n].axis===t).shift()}function Ku(i,t){return Pt(i,{active:!1,dataset:void 0,datasetIndex:t,index:t,mode:"default",type:"dataset"})}function Gu(i,t,e){return Pt(i,{active:!1,dataIndex:t,parsed:void 0,raw:void 0,element:e,index:t,mode:"default",type:"data"})}function ei(i,t){let e=i.controller.index,n=i.vScale&&i.vScale.axis;if(n){t=t||i._parsed;for(let s of t){let o=s._stacks;if(!o||o[n]===void 0||o[n][e]===void 0)return;delete o[n][e],o[n]._visualValues!==void 0&&o[n]._visualValues[e]!==void 0&&delete o[n]._visualValues[e]}}}function Ju(i,t){if(!i._cache.$bar){let e=i.getMatchingVisibleMetas(t),n=[];for(let s=0,o=e.length;s<o;s++)n=n.concat(e[s].controller.getAllParsedValues(i));i._cache.$bar=ts(n.sort((s,o)=>s-o))}return i._cache.$bar}function Zu(i){let t=i.iScale,e=Ju(t,i.type),n=t._length,s,o,r,a,l=()=>{r===32767||r===-32768||(_e(a)&&(n=Math.min(n,Math.abs(r-a)||n)),a=r)};for(s=0,o=e.length;s<o;++s)r=t.getPixelForValue(e[s]),l();for(a=void 0,s=0,o=t.ticks.length;s<o;++s)r=t.getPixelForTick(s),l();return n}function Qu(i,t,e,n){let s=e.barThickness,o,r;return R(s)?(o=t.min*e.categoryPercentage,r=e.barPercentage):(o=s*n,r=1),{chunk:o/n,ratio:r,start:t.pixels[i]-o/2}}function th(i,t,e,n){let s=t.pixels,o=s[i],r=i>0?s[i-1]:null,a=i<s.length-1?s[i+1]:null,l=e.categoryPercentage;r===null&&(r=o-(a===null?t.end-t.start:a-o)),a===null&&(a=o+o-r);let c=o-(o-Math.min(r,a))/2*l;return{chunk:Math.abs(a-r)/2*l/n,ratio:e.barPercentage,start:c}}function eh(i,t,e,n){let s=e.parse(i[0],n),o=e.parse(i[1],n),r=Math.min(s,o),a=Math.max(s,o),l=r,c=a;Math.abs(r)>Math.abs(a)&&(l=a,c=r),t[e.axis]=c,t._custom={barStart:l,barEnd:c,start:s,end:o,min:r,max:a}}function tl(i,t,e,n){return N(i)?eh(i,t,e,n):t[e.axis]=e.parse(i,n),t}function ra(i,t,e,n){let s=i.iScale,o=i.vScale,r=s.getLabels(),a=s===o,l=[],c,d,u,h;for(c=e,d=e+n;c<d;++c)h=t[c],u={},u[s.axis]=a||s.parse(r[c],c),l.push(tl(h,u,o,c));return l}function ks(i){return i&&i.barStart!==void 0&&i.barEnd!==void 0}function ih(i,t,e){return i!==0?xt(i):(t.isHorizontal()?1:-1)*(t.min>=e?1:-1)}function nh(i){let t,e,n,s,o;return i.horizontal?(t=i.base>i.x,e="left",n="right"):(t=i.base<i.y,e="bottom",n="top"),t?(s="end",o="start"):(s="start",o="end"),{start:e,end:n,reverse:t,top:s,bottom:o}}function sh(i,t,e,n){let s=t.borderSkipped,o={};if(!s){i.borderSkipped=o;return}if(s===!0){i.borderSkipped={top:!0,right:!0,bottom:!0,left:!0};return}let{start:r,end:a,reverse:l,top:c,bottom:d}=nh(i);s==="middle"&&e&&(i.enableBorderRadius=!0,(e._top||0)===n?s=c:(e._bottom||0)===n?s=d:(o[aa(d,r,a,l)]=!0,s=c)),o[aa(s,r,a,l)]=!0,i.borderSkipped=o}function aa(i,t,e,n){return n?(i=oh(i,t,e),i=la(i,e,t)):i=la(i,t,e),i}function oh(i,t,e){return i===t?e:i===e?t:i}function la(i,t,e){return i==="start"?t:i==="end"?e:i}function rh(i,{inflateAmount:t},e){i.inflateAmount=t==="auto"?e===1?.33:0:t}function ah(i,t,e){let n=1,s=1,o=0,r=0;if(t<V){let a=i,l=a+t,c=Math.cos(a),d=Math.sin(a),u=Math.cos(l),h=Math.sin(l),f=(_,v,x)=>Me(_,a,l,!0)?1:Math.max(v,v*e,x,x*e),g=(_,v,x)=>Me(_,a,l,!0)?-1:Math.min(v,v*e,x,x*e),p=f(0,c,u),m=f(K,d,h),b=g(F,c,u),y=g(F+K,d,h);n=(p-b)/2,s=(m-y)/2,o=-(p+b)/2,r=-(m+y)/2}return{ratioX:n,ratioY:s,offsetX:o,offsetY:r}}function ne(){throw new Error("This method is not implemented: Check that a complete date adapter is provided.")}function dh(i,t,e,n){let{controller:s,data:o,_sorted:r}=i,a=s._cachedMeta.iScale,l=i.dataset&&i.dataset.options?i.dataset.options.spanGaps:null;if(a&&t===a.axis&&t!=="r"&&r&&o.length){let c=a._reversePixels?Dr:vt;if(n){if(s._sharedOptions){let d=o[0],u=typeof d.getRange=="function"&&d.getRange(t);if(u){let h=c(o,t,e-u),f=c(o,t,e+u);return{lo:h.lo,hi:f.hi}}}}else{let d=c(o,t,e);if(l){let{vScale:u}=s._cachedMeta,{_parsed:h}=i,f=h.slice(0,d.lo+1).reverse().findIndex(p=>!R(p[u.axis]));d.lo-=Math.max(0,f);let g=h.slice(d.hi).findIndex(p=>!R(p[u.axis]));d.hi+=Math.max(0,g)}return d}}return{lo:0,hi:o.length-1}}function bi(i,t,e,n,s){let o=i.getSortedVisibleDatasetMetas(),r=e[t];for(let a=0,l=o.length;a<l;++a){let{index:c,data:d}=o[a],{lo:u,hi:h}=dh(o[a],t,r,s);for(let f=u;f<=h;++f){let g=d[f];g.skip||n(g,c,f)}}}function uh(i){let t=i.indexOf("x")!==-1,e=i.indexOf("y")!==-1;return function(n,s){let o=t?Math.abs(n.x-s.x):0,r=e?Math.abs(n.y-s.y):0;return Math.sqrt(Math.pow(o,2)+Math.pow(r,2))}}function Ts(i,t,e,n,s){let o=[];return!s&&!i.isPointInArea(t)||bi(i,e,t,function(a,l,c){!s&&!Mt(a,i.chartArea,0)||a.inRange(t.x,t.y,n)&&o.push({element:a,datasetIndex:l,index:c})},!0),o}function hh(i,t,e,n){let s=[];function o(r,a,l){let{startAngle:c,endAngle:d}=r.getProps(["startAngle","endAngle"],n),{angle:u}=Zn(r,{x:t.x,y:t.y});Me(u,c,d)&&s.push({element:r,datasetIndex:a,index:l})}return bi(i,e,t,o),s}function fh(i,t,e,n,s,o){let r=[],a=uh(e),l=Number.POSITIVE_INFINITY;function c(d,u,h){let f=d.inRange(t.x,t.y,s);if(n&&!f)return;let g=d.getCenterPoint(s);if(!(!!o||i.isPointInArea(g))&&!f)return;let m=a(t,g);m<l?(r=[{element:d,datasetIndex:u,index:h}],l=m):m===l&&r.push({element:d,datasetIndex:u,index:h})}return bi(i,e,t,c),r}function ws(i,t,e,n,s,o){return!o&&!i.isPointInArea(t)?[]:e==="r"&&!n?hh(i,t,e,s):fh(i,t,e,n,s,o)}function ca(i,t,e,n,s){let o=[],r=e==="x"?"inXRange":"inYRange",a=!1;return bi(i,e,t,(l,c,d)=>{l[r]&&l[r](t[e],s)&&(o.push({element:l,datasetIndex:c,index:d}),a=a||l.inRange(t.x,t.y,s))}),n&&!a?[]:o}function ii(i,t){return i.filter(e=>e.pos===t)}function da(i,t){return i.filter(e=>el.indexOf(e.pos)===-1&&e.box.axis===t)}function ni(i,t){return i.sort((e,n)=>{let s=t?n:e,o=t?e:n;return s.weight===o.weight?s.index-o.index:s.weight-o.weight})}function ph(i){let t=[],e,n,s,o,r,a;for(e=0,n=(i||[]).length;e<n;++e)s=i[e],{position:o,options:{stack:r,stackWeight:a=1}}=s,t.push({index:e,box:s,pos:o,horizontal:s.isHorizontal(),weight:s.weight,stack:r&&o+r,stackWeight:a});return t}function mh(i){let t={};for(let e of i){let{stack:n,pos:s,stackWeight:o}=e;if(!n||!el.includes(s))continue;let r=t[n]||(t[n]={count:0,placed:0,weight:0,size:0});r.count++,r.weight+=o}return t}function bh(i,t){let e=mh(i),{vBoxMaxWidth:n,hBoxMaxHeight:s}=t,o,r,a;for(o=0,r=i.length;o<r;++o){a=i[o];let{fullSize:l}=a.box,c=e[a.stack],d=c&&a.stackWeight/c.weight;a.horizontal?(a.width=d?d*n:l&&t.availableWidth,a.height=s):(a.width=n,a.height=d?d*s:l&&t.availableHeight)}return e}function yh(i){let t=ph(i),e=ni(t.filter(c=>c.box.fullSize),!0),n=ni(ii(t,"left"),!0),s=ni(ii(t,"right")),o=ni(ii(t,"top"),!0),r=ni(ii(t,"bottom")),a=da(t,"x"),l=da(t,"y");return{fullSize:e,leftAndTop:n.concat(o),rightAndBottom:s.concat(l).concat(r).concat(a),chartArea:ii(t,"chartArea"),vertical:n.concat(s).concat(l),horizontal:o.concat(r).concat(a)}}function ua(i,t,e,n){return Math.max(i[e],t[e])+Math.max(i[n],t[n])}function il(i,t){i.top=Math.max(i.top,t.top),i.left=Math.max(i.left,t.left),i.bottom=Math.max(i.bottom,t.bottom),i.right=Math.max(i.right,t.right)}function xh(i,t,e,n){let{pos:s,box:o}=e,r=i.maxPadding;if(!O(s)){e.size&&(i[s]-=e.size);let u=n[e.stack]||{size:0,count:1};u.size=Math.max(u.size,e.horizontal?o.height:o.width),e.size=u.size/u.count,i[s]+=e.size}o.getPadding&&il(r,o.getPadding());let a=Math.max(0,t.outerWidth-ua(r,i,"left","right")),l=Math.max(0,t.outerHeight-ua(r,i,"top","bottom")),c=a!==i.w,d=l!==i.h;return i.w=a,i.h=l,e.horizontal?{same:c,other:d}:{same:d,other:c}}function _h(i){let t=i.maxPadding;function e(n){let s=Math.max(t[n]-i[n],0);return i[n]+=s,s}i.y+=e("top"),i.x+=e("left"),e("right"),e("bottom")}function vh(i,t){let e=t.maxPadding;function n(s){let o={left:0,top:0,right:0,bottom:0};return s.forEach(r=>{o[r]=Math.max(t[r],e[r])}),o}return n(i?["left","right"]:["top","bottom"])}function ai(i,t,e,n){let s=[],o,r,a,l,c,d;for(o=0,r=i.length,c=0;o<r;++o){a=i[o],l=a.box,l.update(a.width||t.w,a.height||t.h,vh(a.horizontal,t));let{same:u,other:h}=xh(t,e,a,n);c|=u&&s.length,d=d||h,l.fullSize||s.push(a)}return c&&ai(s,t,e,n)||d}function tn(i,t,e,n,s){i.top=e,i.left=t,i.right=t+n,i.bottom=e+s,i.width=n,i.height=s}function ha(i,t,e,n){let s=e.padding,{x:o,y:r}=t;for(let a of i){let l=a.box,c=n[a.stack]||{count:1,placed:0,weight:1},d=a.stackWeight/c.weight||1;if(a.horizontal){let u=t.w*d,h=c.size||l.height;_e(c.start)&&(r=c.start),l.fullSize?tn(l,s.left,r,e.outerWidth-s.right-s.left,h):tn(l,t.left+c.placed,r,u,h),c.start=r,c.placed+=u,r=l.bottom}else{let u=t.h*d,h=c.size||l.width;_e(c.start)&&(o=c.start),l.fullSize?tn(l,o,s.top,h,e.outerHeight-s.bottom-s.top):tn(l,o,t.top+c.placed,h,u),c.start=o,c.placed+=u,o=l.right}}t.x=o,t.y=r}function Sh(i,t){let e=i.style,n=i.getAttribute("height"),s=i.getAttribute("width");if(i[an]={initial:{height:n,width:s,style:{display:e.display,height:e.height,width:e.width}}},e.display=e.display||"block",e.boxSizing=e.boxSizing||"border-box",fa(s)){let o=ps(i,"width");o!==void 0&&(i.width=o)}if(fa(n))if(i.style.height==="")i.height=i.width/(t||2);else{let o=ps(i,"height");o!==void 0&&(i.height=o)}return i}function kh(i,t,e){i&&i.addEventListener(t,e,nl)}function Th(i,t,e){i&&i.canvas&&i.canvas.removeEventListener(t,e,nl)}function wh(i,t){let e=Mh[i.type]||i.type,{x:n,y:s}=jt(i,t);return{type:e,chart:t,native:i,x:n!==void 0?n:null,y:s!==void 0?s:null}}function un(i,t){for(let e of i)if(e===t||e.contains(t))return!0}function Ch(i,t,e){let n=i.canvas,s=new MutationObserver(o=>{let r=!1;for(let a of o)r=r||un(a.addedNodes,n),r=r&&!un(a.removedNodes,n);r&&e()});return s.observe(document,{childList:!0,subtree:!0}),s}function Eh(i,t,e){let n=i.canvas,s=new MutationObserver(o=>{let r=!1;for(let a of o)r=r||un(a.removedNodes,n),r=r&&!un(a.addedNodes,n);r&&e()});return s.observe(document,{childList:!0,subtree:!0}),s}function sl(){let i=window.devicePixelRatio;i!==ga&&(ga=i,gi.forEach((t,e)=>{e.currentDevicePixelRatio!==i&&t()}))}function Lh(i,t){gi.size||window.addEventListener("resize",sl),gi.set(i,t)}function Ah(i){gi.delete(i),gi.size||window.removeEventListener("resize",sl)}function Dh(i,t,e){let n=i.canvas,s=n&&Zi(n);if(!s)return;let o=is((a,l)=>{let c=s.clientWidth;e(a,l),c<s.clientWidth&&e()},window),r=new ResizeObserver(a=>{let l=a[0],c=l.contentRect.width,d=l.contentRect.height;c===0&&d===0||o(c,d)});return r.observe(s),Lh(i,o),r}function Cs(i,t,e){e&&e.disconnect(),t==="resize"&&Ah(i)}function Ph(i,t,e){let n=i.canvas,s=is(o=>{i.ctx!==null&&e(wh(o,i))},i);return kh(n,t,s),s}function Rh(i){return!Ji()||typeof OffscreenCanvas<"u"&&i instanceof OffscreenCanvas?Is:Fs}function Oh(i,t){let e=i.options.ticks,n=Ih(i),s=Math.min(e.maxTicksLimit||n,n),o=e.major.enabled?$h(t):[],r=o.length,a=o[0],l=o[r-1],c=[];if(r>s)return Hh(t,c,o,r/s),c;let d=Fh(o,t,s);if(r>0){let u,h,f=r>1?Math.round((l-a)/(r-1)):null;for(en(t,c,d,R(f)?0:a-f,a),u=0,h=r-1;u<h;u++)en(t,c,d,o[u],o[u+1]);return en(t,c,d,l,R(f)?t.length:l+f),c}return en(t,c,d),c}function Ih(i){let t=i.options.offset,e=i._tickSize(),n=i._length/e+(t?0:1),s=i._maxLength/e;return Math.floor(Math.min(n,s))}function Fh(i,t,e){let n=zh(i),s=t.length/e;if(!n)return Math.max(s,1);let o=Er(n);for(let r=0,a=o.length-1;r<a;r++){let l=o[r];if(l>s)return l}return Math.max(s,1)}function $h(i){let t=[],e,n;for(e=0,n=i.length;e<n;e++)i[e].major&&t.push(e);return t}function Hh(i,t,e,n){let s=0,o=e[0],r;for(n=Math.ceil(n),r=0;r<i.length;r++)r===o&&(t.push(i[r]),s++,o=e[s*n])}function en(i,t,e,n,s){let o=E(n,0),r=Math.min(E(s,i.length),i.length),a=0,l,c,d;for(e=Math.ceil(e),s&&(l=s-n,e=l/Math.floor(l/e)),d=o;d<0;)a++,d=Math.round(o+a*e);for(c=Math.max(o,0);c<r;c++)c===d&&(t.push(i[c]),a++,d=Math.round(o+a*e))}function zh(i){let t=i.length,e,n;if(t<2)return!1;for(n=i[0],e=1;e<t;++e)if(i[e]-i[e-1]!==n)return!1;return n}function ba(i,t){let e=[],n=i.length/t,s=i.length,o=0;for(;o<s;o+=n)e.push(i[Math.floor(o)]);return e}function Bh(i,t,e){let n=i.ticks.length,s=Math.min(t,n-1),o=i._startPixel,r=i._endPixel,a=1e-6,l=i.getPixelForTick(s),c;if(!(e&&(n===1?c=Math.max(l-o,r-l):t===0?c=(i.getPixelForTick(1)-l)/2:c=(l-i.getPixelForTick(s-1))/2,l+=s<t?c:-c,l<o-a||l>r+a)))return l}function Nh(i,t){H(i,e=>{let n=e.gc,s=n.length/2,o;if(s>t){for(o=0;o<s;++o)delete e.data[n[o]];n.splice(0,s)}})}function si(i){return i.drawTicks?i.tickLength:0}function ya(i,t){if(!i.display)return 0;let e=J(i.font,t),n=nt(i.padding);return(N(i.text)?i.text.length:1)*e.lineHeight+n.height}function Vh(i,t){return Pt(i,{scale:t,type:"scale"})}function jh(i,t,e){return Pt(i,{tick:e,index:t,type:"tick"})}function qh(i,t,e){let n=Yi(i);return(e&&t!=="right"||!e&&t==="right")&&(n=Wh(n)),n}function Yh(i,t,e,n){let{top:s,left:o,bottom:r,right:a,chart:l}=i,{chartArea:c,scales:d}=l,u=0,h,f,g,p=r-s,m=a-o;if(i.isHorizontal()){if(f=it(n,o,a),O(e)){let b=Object.keys(e)[0],y=e[b];g=d[b].getPixelForValue(y)+p-t}else e==="center"?g=(c.bottom+c.top)/2+p-t:g=pa(i,e,t);h=a-o}else{if(O(e)){let b=Object.keys(e)[0],y=e[b];f=d[b].getPixelForValue(y)-m+t}else e==="center"?f=(c.left+c.right)/2-m+t:f=pa(i,e,t);g=it(n,r,s),u=e==="left"?-K:K}return{titleX:f,titleY:g,maxWidth:h,rotation:u}}function Uh(i,t,e){let n=be(Object.create(null),[e?j.get(e):{},j.get(t),i.defaults]);j.set(t,n),i.defaultRoutes&&Kh(t,i.defaultRoutes),i.descriptors&&j.describe(t,i.descriptors)}function Kh(i,t){Object.keys(t).forEach(e=>{let n=e.split("."),s=n.pop(),o=[i].concat(n).join("."),r=t[e].split("."),a=r.pop(),l=r.join(".");j.route(o,s,l,a)})}function Gh(i){return"id"in i&&"defaults"in i}function Xh(i){let t={},e=[],n=Object.keys(wt.plugins.items);for(let o=0;o<n.length;o++)e.push(wt.getPlugin(n[o]));let s=i.plugins||[];for(let o=0;o<s.length;o++){let r=s[o];e.indexOf(r)===-1&&(e.push(r),t[r.id]=!0)}return{plugins:e,localIds:t}}function Jh(i,t){return!t&&i===!1?null:i===!0?{}:i}function Zh(i,{plugins:t,localIds:e},n,s){let o=[],r=i.getContext();for(let a of t){let l=a.id,c=Jh(n[l],s);c!==null&&o.push({plugin:a,options:Qh(i.config,{plugin:a,local:e[l]},c,r)})}return o}function Qh(i,{plugin:t,local:e},n,s){let o=i.pluginScopeKeys(t),r=i.getOptionScopes(n,o);return e&&t.defaults&&r.push(t.defaults),i.createResolver(r,s,[""],{scriptable:!1,indexable:!1,allKeys:!0})}function zs(i,t){let e=j.datasets[i]||{};return((t.datasets||{})[i]||{}).indexAxis||t.indexAxis||e.indexAxis||"x"}function tf(i,t){let e=i;return i==="_index_"?e=t:i==="_value_"&&(e=t==="x"?"y":"x"),e}function ef(i,t){return i===t?"_index_":"_value_"}function xa(i){if(i==="x"||i==="y"||i==="r")return i}function nf(i){if(i==="top"||i==="bottom")return"x";if(i==="left"||i==="right")return"y"}function Ws(i,...t){if(xa(i))return i;for(let e of t){let n=e.axis||nf(e.position)||i.length>1&&xa(i[0].toLowerCase());if(n)return n}throw new Error(`Cannot determine type of '${i}' axis. Please provide 'axis' or 'position' option.`)}function _a(i,t,e){if(e[t+"AxisID"]===i)return{axis:t}}function sf(i,t){if(t.data&&t.data.datasets){let e=t.data.datasets.filter(n=>n.xAxisID===i||n.yAxisID===i);if(e.length)return _a(i,"x",e[0])||_a(i,"y",e[0])}return{}}function of(i,t){let e=Wt[i.type]||{scales:{}},n=t.scales||{},s=zs(i.type,t),o=Object.create(null);return Object.keys(n).forEach(r=>{let a=n[r];if(!O(a))return console.error(`Invalid scale configuration for scale: ${r}`);if(a._proxy)return console.warn(`Ignoring resolver passed as options for scale: ${r}`);let l=Ws(r,a,sf(r,i),j.scales[a.type]),c=ef(l,s),d=e.scales||{};o[r]=xe(Object.create(null),[{axis:l},a,d[l],d[c]])}),i.data.datasets.forEach(r=>{let a=r.type||i.type,l=r.indexAxis||zs(a,t),d=(Wt[a]||{}).scales||{};Object.keys(d).forEach(u=>{let h=tf(u,l),f=r[h+"AxisID"]||h;o[f]=o[f]||Object.create(null),xe(o[f],[{axis:h},n[f],d[u]])})}),Object.keys(o).forEach(r=>{let a=o[r];xe(a,[j.scales[a.type],j.scale])}),o}function ol(i){let t=i.options||(i.options={});t.plugins=E(t.plugins,{}),t.scales=of(i,t)}function rl(i){return i=i||{},i.datasets=i.datasets||[],i.labels=i.labels||[],i}function rf(i){return i=i||{},i.data=rl(i.data),ol(i),i}function nn(i,t){let e=va.get(i);return e||(e=t(),va.set(i,e),al.add(e)),e}function Ma(i,t,e){let n=i.get(t);n||(n=new Map,i.set(t,n));let s=e.join(),o=n.get(s);return o||(o={resolver:Xi(t,e),subPrefixes:e.filter(a=>!a.toLowerCase().includes("hover"))},n.set(s,o)),o}function lf(i,t){let{isScriptable:e,isIndexable:n}=ds(i);for(let s of t){let o=e(s),r=n(s),a=(r||o)&&i[s];if(o&&(Lt(a)||af(a))||r&&N(a))return!0}return!1}function Sa(i,t){return i==="top"||i==="bottom"||df.indexOf(i)===-1&&t==="x"}function ka(i,t){return function(e,n){return e[i]===n[i]?e[t]-n[t]:e[i]-n[i]}}function Ta(i){let t=i.chart,e=t.options.animation;t.notifyPlugins("afterRender"),B(e&&e.onComplete,[i],t)}function uf(i){let t=i.chart,e=t.options.animation;B(e&&e.onProgress,[i],t)}function ll(i){return Ji()&&typeof i=="string"?i=document.getElementById(i):i&&i.length&&(i=i[0]),i&&i.canvas&&(i=i.canvas),i}function hf(i,t,e){let n=Object.keys(i);for(let s of n){let o=+s;if(o>=t){let r=i[s];delete i[s],(e>0||o>t)&&(i[o+e]=r)}}}function ff(i,t,e,n){return!e||i.type==="mouseout"?null:n?t:i}function Ca(){return H(lt.instances,i=>i._plugins.invalidate())}function gf(i,t,e){let{startAngle:n,x:s,y:o,outerRadius:r,innerRadius:a,options:l}=t,{borderWidth:c,borderJoinStyle:d}=l,u=Math.min(c/r,et(n-e));if(i.beginPath(),i.arc(s,o,r-c/2,n+u/2,e-u/2),a>0){let h=Math.min(c/a,et(n-e));i.arc(s,o,a+c/2,e-h/2,n+h/2,!0)}else{let h=Math.min(c/2,r*et(n-e));if(d==="round")i.arc(s,o,h,e-F/2,n+F/2,!0);else if(d==="bevel"){let f=2*h*h,g=-f*Math.cos(e+F/2)+s,p=-f*Math.sin(e+F/2)+o,m=f*Math.cos(n+F/2)+s,b=f*Math.sin(n+F/2)+o;i.lineTo(g,p),i.lineTo(m,b)}}i.closePath(),i.moveTo(0,0),i.rect(0,0,i.canvas.width,i.canvas.height),i.clip("evenodd")}function pf(i,t,e){let{startAngle:n,pixelMargin:s,x:o,y:r,outerRadius:a,innerRadius:l}=t,c=s/a;i.beginPath(),i.arc(o,r,a,n-c,e+c),l>s?(c=s/l,i.arc(o,r,l,e+c,n-c,!0)):i.arc(o,r,s,e+K,n-K),i.closePath(),i.clip()}function mf(i){return Gi(i,["outerStart","outerEnd","innerStart","innerEnd"])}function bf(i,t,e,n){let s=mf(i.options.borderRadius),o=(e-t)/2,r=Math.min(o,n*t/2),a=l=>{let c=(e-Math.min(o,l))*n/2;return Z(l,0,Math.min(o,c))};return{outerStart:a(s.outerStart),outerEnd:a(s.outerEnd),innerStart:Z(s.innerStart,0,r),innerEnd:Z(s.innerEnd,0,r)}}function we(i,t,e,n){return{x:e+i*Math.cos(t),y:n+i*Math.sin(t)}}function hn(i,t,e,n,s,o){let{x:r,y:a,startAngle:l,pixelMargin:c,innerRadius:d}=t,u=Math.max(t.outerRadius+n+e-c,0),h=d>0?d+n+e+c:0,f=0,g=s-l;if(n){let W=d>0?d-n:0,q=u>0?u-n:0,X=(W+q)/2,yt=X!==0?g*X/(X+n):g;f=(g-yt)/2}let p=Math.max(.001,g*u-e/F)/u,m=(g-p)/2,b=l+m+f,y=s-m-f,{outerStart:_,outerEnd:v,innerStart:x,innerEnd:S}=bf(t,h,u,y-b),k=u-_,T=u-v,w=b+_/k,L=y-v/T,A=h+x,I=h+S,Q=b+x/A,ht=y-S/I;if(i.beginPath(),o){let W=(w+L)/2;if(i.arc(r,a,u,w,W),i.arc(r,a,u,W,L),v>0){let st=we(T,L,r,a);i.arc(st.x,st.y,v,L,y+K)}let q=we(I,y,r,a);if(i.lineTo(q.x,q.y),S>0){let st=we(I,ht,r,a);i.arc(st.x,st.y,S,y+K,ht+Math.PI)}let X=(y-S/h+(b+x/h))/2;if(i.arc(r,a,h,y-S/h,X,!0),i.arc(r,a,h,X,b+x/h,!0),x>0){let st=we(A,Q,r,a);i.arc(st.x,st.y,x,Q+Math.PI,b-K)}let yt=we(k,b,r,a);if(i.lineTo(yt.x,yt.y),_>0){let st=we(k,w,r,a);i.arc(st.x,st.y,_,b-K,w)}}else{i.moveTo(r,a);let W=Math.cos(w)*u+r,q=Math.sin(w)*u+a;i.lineTo(W,q);let X=Math.cos(L)*u+r,yt=Math.sin(L)*u+a;i.lineTo(X,yt)}i.closePath()}function yf(i,t,e,n,s){let{fullCircles:o,startAngle:r,circumference:a}=t,l=t.endAngle;if(o){hn(i,t,e,n,l,s);for(let c=0;c<o;++c)i.fill();isNaN(a)||(l=r+(a%V||V))}return hn(i,t,e,n,l,s),i.fill(),l}function xf(i,t,e,n,s){let{fullCircles:o,startAngle:r,circumference:a,options:l}=t,{borderWidth:c,borderJoinStyle:d,borderDash:u,borderDashOffset:h,borderRadius:f}=l,g=l.borderAlign==="inner";if(!c)return;i.setLineDash(u||[]),i.lineDashOffset=h,g?(i.lineWidth=c*2,i.lineJoin=d||"round"):(i.lineWidth=c,i.lineJoin=d||"bevel");let p=t.endAngle;if(o){hn(i,t,e,n,p,s);for(let m=0;m<o;++m)i.stroke();isNaN(a)||(p=r+(a%V||V))}g&&pf(i,t,p),l.selfJoin&&p-r>=F&&f===0&&d!=="miter"&&gf(i,t,p),o||(hn(i,t,e,n,p,s),i.stroke())}function cl(i,t,e=t){i.lineCap=E(e.borderCapStyle,t.borderCapStyle),i.setLineDash(E(e.borderDash,t.borderDash)),i.lineDashOffset=E(e.borderDashOffset,t.borderDashOffset),i.lineJoin=E(e.borderJoinStyle,t.borderJoinStyle),i.lineWidth=E(e.borderWidth,t.borderWidth),i.strokeStyle=E(e.borderColor,t.borderColor)}function _f(i,t,e){i.lineTo(e.x,e.y)}function vf(i){return i.stepped?zr:i.tension||i.cubicInterpolationMode==="monotone"?Wr:_f}function dl(i,t,e={}){let n=i.length,{start:s=0,end:o=n-1}=e,{start:r,end:a}=t,l=Math.max(s,r),c=Math.min(o,a),d=s<r&&o<r||s>a&&o>a;return{count:n,start:l,loop:t.loop,ilen:c<l&&!d?n+c-l:c-l}}function Mf(i,t,e,n){let{points:s,options:o}=t,{count:r,start:a,loop:l,ilen:c}=dl(s,e,n),d=vf(o),{move:u=!0,reverse:h}=n||{},f,g,p;for(f=0;f<=c;++f)g=s[(a+(h?c-f:f))%r],!g.skip&&(u?(i.moveTo(g.x,g.y),u=!1):d(i,p,g,h,o.stepped),p=g);return l&&(g=s[(a+(h?c:0))%r],d(i,p,g,h,o.stepped)),!!l}function Sf(i,t,e,n){let s=t.points,{count:o,start:r,ilen:a}=dl(s,e,n),{move:l=!0,reverse:c}=n||{},d=0,u=0,h,f,g,p,m,b,y=v=>(r+(c?a-v:v))%o,_=()=>{p!==m&&(i.lineTo(d,m),i.lineTo(d,p),i.lineTo(d,b))};for(l&&(f=s[y(0)],i.moveTo(f.x,f.y)),h=0;h<=a;++h){if(f=s[y(h)],f.skip)continue;let v=f.x,x=f.y,S=v|0;S===g?(x<p?p=x:x>m&&(m=x),d=(u*d+v)/++u):(_(),i.lineTo(v,x),g=S,u=0,p=m=x),b=x}_()}function Ns(i){let t=i.options,e=t.borderDash&&t.borderDash.length;return!i._decimated&&!i._loop&&!t.tension&&t.cubicInterpolationMode!=="monotone"&&!t.stepped&&!e?Sf:Mf}function kf(i){return i.stepped?Gr:i.tension||i.cubicInterpolationMode==="monotone"?Xr:Ht}function Tf(i,t,e,n){let s=t._path;s||(s=t._path=new Path2D,t.path(s,e,n)&&s.closePath()),cl(i,t.options),i.stroke(s)}function wf(i,t,e,n){let{segments:s,options:o}=t,r=Ns(t);for(let a of s)cl(i,o,a.style),i.beginPath(),r(i,t,a,{start:e,end:e+n-1})&&i.closePath(),i.stroke()}function Ef(i,t,e,n){Cf&&!t.options.segment?Tf(i,t,e,n):wf(i,t,e,n)}function Ea(i,t,e,n){let s=i.options,{[e]:o}=i.getProps([e],n);return Math.abs(t-o)<s.radius+s.hitRadius}function ul(i,t){let{x:e,y:n,base:s,width:o,height:r}=i.getProps(["x","y","base","width","height"],t),a,l,c,d,u;return i.horizontal?(u=r/2,a=Math.min(e,s),l=Math.max(e,s),c=n-u,d=n+u):(u=o/2,a=e-u,l=e+u,c=Math.min(n,s),d=Math.max(n,s)),{left:a,top:c,right:l,bottom:d}}function qt(i,t,e,n){return i?0:Z(t,e,n)}function Lf(i,t,e){let n=i.options.borderWidth,s=i.borderSkipped,o=cs(n);return{t:qt(s.top,o.top,0,e),r:qt(s.right,o.right,0,t),b:qt(s.bottom,o.bottom,0,e),l:qt(s.left,o.left,0,t)}}function Af(i,t,e){let{enableBorderRadius:n}=i.getProps(["enableBorderRadius"]),s=i.options.borderRadius,o=Vt(s),r=Math.min(t,e),a=i.borderSkipped,l=n||O(s);return{topLeft:qt(!l||a.top||a.left,o.topLeft,0,r),topRight:qt(!l||a.top||a.right,o.topRight,0,r),bottomLeft:qt(!l||a.bottom||a.left,o.bottomLeft,0,r),bottomRight:qt(!l||a.bottom||a.right,o.bottomRight,0,r)}}function Df(i){let t=ul(i),e=t.right-t.left,n=t.bottom-t.top,s=Lf(i,e/2,n/2),o=Af(i,e/2,n/2);return{outer:{x:t.left,y:t.top,w:e,h:n,radius:o},inner:{x:t.left+s.l,y:t.top+s.t,w:e-s.l-s.r,h:n-s.t-s.b,radius:{topLeft:Math.max(0,o.topLeft-Math.max(s.t,s.l)),topRight:Math.max(0,o.topRight-Math.max(s.t,s.r)),bottomLeft:Math.max(0,o.bottomLeft-Math.max(s.b,s.l)),bottomRight:Math.max(0,o.bottomRight-Math.max(s.b,s.r))}}}}function Es(i,t,e,n){let s=t===null,o=e===null,a=i&&!(s&&o)&&ul(i,n);return a&&(s||kt(t,a.left,a.right))&&(o||kt(e,a.top,a.bottom))}function Pf(i){return i.topLeft||i.topRight||i.bottomLeft||i.bottomRight}function Rf(i,t){i.rect(t.x,t.y,t.w,t.h)}function Ls(i,t,e={}){let n=i.x!==e.x?-t:0,s=i.y!==e.y?-t:0,o=(i.x+i.w!==e.x+e.w?t:0)-n,r=(i.y+i.h!==e.y+e.h?t:0)-s;return{x:i.x+n,y:i.y+s,w:i.w+o,h:i.h+r,radius:i.radius}}function hl(i){return Vs[i%Vs.length]}function fl(i){return La[i%La.length]}function If(i,t){return i.borderColor=hl(t),i.backgroundColor=fl(t),++t}function Ff(i,t){return i.backgroundColor=i.data.map(()=>hl(t++)),t}function $f(i,t){return i.backgroundColor=i.data.map(()=>fl(t++)),t}function Hf(i){let t=0;return(e,n)=>{let s=i.getDatasetMeta(n).controller;s instanceof It?t=Ff(e,t):s instanceof ae?t=$f(e,t):s&&(t=If(e,t))}}function Aa(i){let t;for(t in i)if(i[t].borderColor||i[t].backgroundColor)return!0;return!1}function zf(i){return i&&(i.borderColor||i.backgroundColor)}function Wf(){return j.borderColor!=="rgba(0,0,0,0.1)"||j.backgroundColor!=="rgba(0,0,0,0.1)"}function Nf(i,t,e,n,s){let o=s.samples||n;if(o>=e)return i.slice(t,t+e);let r=[],a=(e-2)/(o-2),l=0,c=t+e-1,d=t,u,h,f,g,p;for(r[l++]=i[d],u=0;u<o-2;u++){let m=0,b=0,y,_=Math.floor((u+1)*a)+1+t,v=Math.min(Math.floor((u+2)*a)+1,e)+t,x=v-_;for(y=_;y<v;y++)m+=i[y].x,b+=i[y].y;m/=x,b/=x;let S=Math.floor(u*a)+1+t,k=Math.min(Math.floor((u+1)*a)+1,e)+t,{x:T,y:w}=i[d];for(f=g=-1,y=S;y<k;y++)g=.5*Math.abs((T-m)*(i[y].y-w)-(T-i[y].x)*(b-w)),g>f&&(f=g,h=i[y],p=y);r[l++]=h,d=p}return r[l++]=i[c],r}function Vf(i,t,e,n){let s=0,o=0,r,a,l,c,d,u,h,f,g,p,m=[],b=t+e-1,y=i[t].x,v=i[b].x-y;for(r=t;r<t+e;++r){a=i[r],l=(a.x-y)/v*n,c=a.y;let x=l|0;if(x===d)c<g?(g=c,u=r):c>p&&(p=c,h=r),s=(o*s+a.x)/++o;else{let S=r-1;if(!R(u)&&!R(h)){let k=Math.min(u,h),T=Math.max(u,h);k!==f&&k!==S&&m.push({...i[k],x:s}),T!==f&&T!==S&&m.push({...i[T],x:s})}r>0&&S!==f&&m.push(i[S]),m.push(a),d=x,o=0,g=p=c,u=h=f=r}}return m}function gl(i){if(i._decimated){let t=i._data;delete i._decimated,delete i._data,Object.defineProperty(i,"data",{configurable:!0,enumerable:!0,writable:!0,value:t})}}function Da(i){i.data.datasets.forEach(t=>{gl(t)})}function jf(i,t){let e=t.length,n=0,s,{iScale:o}=i,{min:r,max:a,minDefined:l,maxDefined:c}=o.getUserBounds();return l&&(n=Z(vt(t,o.axis,r).lo,0,e-1)),c?s=Z(vt(t,o.axis,a).hi+1,n,e)-n:s=e-n,{start:n,count:s}}function Yf(i,t,e){let n=i.segments,s=i.points,o=t.points,r=[];for(let a of n){let{start:l,end:c}=a;c=pn(l,c,s);let d=js(e,s[l],s[c],a.loop);if(!t.segments){r.push({source:a,target:d,start:s[l],end:s[c]});continue}let u=xs(t,d);for(let h of u){let f=js(e,o[h.start],o[h.end],h.loop),g=ys(a,s,f);for(let p of g)r.push({source:p,target:h,start:{[e]:Pa(d,f,"start",Math.max)},end:{[e]:Pa(d,f,"end",Math.min)}})}}return r}function js(i,t,e,n){if(n)return;let s=t[i],o=e[i];return i==="angle"&&(s=et(s),o=et(o)),{property:i,start:s,end:o}}function Uf(i,t){let{x:e=null,y:n=null}=i||{},s=t.points,o=[];return t.segments.forEach(({start:r,end:a})=>{a=pn(r,a,s);let l=s[r],c=s[a];n!==null?(o.push({x:l.x,y:n}),o.push({x:c.x,y:n})):e!==null&&(o.push({x:e,y:l.y}),o.push({x:e,y:c.y}))}),o}function pn(i,t,e){for(;t>i;t--){let n=e[t];if(!isNaN(n.x)&&!isNaN(n.y))break}return t}function Pa(i,t,e,n){return i&&t?n(i[e],t[e]):i?i[e]:t?t[e]:0}function pl(i,t){let e=[],n=!1;return N(i)?(n=!0,e=i):e=Uf(i,t),e.length?new Ct({points:e,options:{tension:0},_loop:n,_fullLoop:n}):null}function Ra(i){return i&&i.fill!==!1}function Kf(i,t,e){let s=i[t].fill,o=[t],r;if(!e)return s;for(;s!==!1&&o.indexOf(s)===-1;){if(!Y(s))return s;if(r=i[s],!r)return!1;if(r.visible)return s;o.push(s),s=r.fill}return!1}function Gf(i,t,e){let n=Qf(i);if(O(n))return isNaN(n.value)?!1:n;let s=parseFloat(n);return Y(s)&&Math.floor(s)===s?Xf(n[0],t,s,e):["origin","start","end","stack","shape"].indexOf(n)>=0&&n}function Xf(i,t,e,n){return(i==="-"||i==="+")&&(e=t+e),e===t||e<0||e>=n?!1:e}function Jf(i,t){let e=null;return i==="start"?e=t.bottom:i==="end"?e=t.top:O(i)?e=t.getPixelForValue(i.value):t.getBasePixel&&(e=t.getBasePixel()),e}function Zf(i,t,e){let n;return i==="start"?n=e:i==="end"?n=t.options.reverse?t.min:t.max:O(i)?n=i.value:n=t.getBaseValue(),n}function Qf(i){let t=i.options,e=t.fill,n=E(e&&e.target,e);return n===void 0&&(n=!!t.backgroundColor),n===!1||n===null?!1:n===!0?"origin":n}function tg(i){let{scale:t,index:e,line:n}=i,s=[],o=n.segments,r=n.points,a=eg(t,e);a.push(pl({x:null,y:t.bottom},n));for(let l=0;l<o.length;l++){let c=o[l];for(let d=c.start;d<=c.end;d++)ig(s,r[d],a)}return new Ct({points:s,options:{}})}function eg(i,t){let e=[],n=i.getMatchingVisibleMetas("line");for(let s=0;s<n.length;s++){let o=n[s];if(o.index===t)break;o.hidden||e.unshift(o.dataset)}return e}function ig(i,t,e){let n=[];for(let s=0;s<e.length;s++){let o=e[s],{first:r,last:a,point:l}=ng(o,t,"x");if(!(!l||r&&a)){if(r)n.unshift(l);else if(i.push(l),!a)break}}i.push(...n)}function ng(i,t,e){let n=i.interpolate(t,e);if(!n)return{};let s=n[e],o=i.segments,r=i.points,a=!1,l=!1;for(let c=0;c<o.length;c++){let d=o[c],u=r[d.start][e],h=r[d.end][e];if(kt(s,u,h)){a=s===u,l=s===h;break}}return{first:a,last:l,point:n}}function sg(i){let{chart:t,fill:e,line:n}=i;if(Y(e))return og(t,e);if(e==="stack")return tg(i);if(e==="shape")return!0;let s=rg(i);return s instanceof fn?s:pl(s,n)}function og(i,t){let e=i.getDatasetMeta(t);return e&&i.isDatasetVisible(t)?e.dataset:null}function rg(i){return(i.scale||{}).getPointPositionForValue?lg(i):ag(i)}function ag(i){let{scale:t={},fill:e}=i,n=Jf(e,t);if(Y(n)){let s=t.isHorizontal();return{x:s?n:null,y:s?null:n}}return null}function lg(i){let{scale:t,fill:e}=i,n=t.options,s=t.getLabels().length,o=n.reverse?t.max:t.min,r=Zf(e,t,o),a=[];if(n.grid.circular){let l=t.getPointPositionForValue(0,o);return new fn({x:l.x,y:l.y,radius:t.getDistanceFromCenterForValue(r)})}for(let l=0;l<s;++l)a.push(t.getPointPositionForValue(l,r));return a}function As(i,t,e){let n=sg(t),{chart:s,index:o,line:r,scale:a,axis:l}=t,c=r.options,d=c.fill,u=c.backgroundColor,{above:h=u,below:f=u}=d||{},g=s.getDatasetMeta(o),p=_s(s,g);n&&r.points.length&&(Qe(i,e),cg(i,{line:r,target:n,above:h,below:f,area:e,scale:a,axis:l,clip:p}),ti(i))}function cg(i,t){let{line:e,target:n,above:s,below:o,area:r,scale:a,clip:l}=t,c=e._loop?"angle":t.axis;i.save();let d=o;o!==s&&(c==="x"?(Oa(i,n,r.top),Ds(i,{line:e,target:n,color:s,scale:a,property:c,clip:l}),i.restore(),i.save(),Oa(i,n,r.bottom)):c==="y"&&(Ia(i,n,r.left),Ds(i,{line:e,target:n,color:o,scale:a,property:c,clip:l}),i.restore(),i.save(),Ia(i,n,r.right),d=s)),Ds(i,{line:e,target:n,color:d,scale:a,property:c,clip:l}),i.restore()}function Oa(i,t,e){let{segments:n,points:s}=t,o=!0,r=!1;i.beginPath();for(let a of n){let{start:l,end:c}=a,d=s[l],u=s[pn(l,c,s)];o?(i.moveTo(d.x,d.y),o=!1):(i.lineTo(d.x,e),i.lineTo(d.x,d.y)),r=!!t.pathSegment(i,a,{move:r}),r?i.closePath():i.lineTo(u.x,e)}i.lineTo(t.first().x,e),i.closePath(),i.clip()}function Ia(i,t,e){let{segments:n,points:s}=t,o=!0,r=!1;i.beginPath();for(let a of n){let{start:l,end:c}=a,d=s[l],u=s[pn(l,c,s)];o?(i.moveTo(d.x,d.y),o=!1):(i.lineTo(e,d.y),i.lineTo(d.x,d.y)),r=!!t.pathSegment(i,a,{move:r}),r?i.closePath():i.lineTo(e,u.y)}i.lineTo(e,t.first().y),i.closePath(),i.clip()}function Ds(i,t){let{line:e,target:n,property:s,color:o,scale:r,clip:a}=t,l=Yf(e,n,s);for(let{source:c,target:d,start:u,end:h}of l){let{style:{backgroundColor:f=o}={}}=c,g=n!==!0;i.save(),i.fillStyle=f,dg(i,r,a,g&&js(s,u,h)),i.beginPath();let p=!!e.pathSegment(i,c),m;if(g){p?i.closePath():Fa(i,n,h,s);let b=!!n.pathSegment(i,d,{move:p,reverse:!0});m=p&&b,m||Fa(i,n,u,s)}i.closePath(),i.fill(m?"evenodd":"nonzero"),i.restore()}}function dg(i,t,e,n){let s=t.chart.chartArea,{property:o,start:r,end:a}=n||{};if(o==="x"||o==="y"){let l,c,d,u;o==="x"?(l=r,c=s.top,d=a,u=s.bottom):(l=s.left,c=r,d=s.right,u=a),i.beginPath(),e&&(l=Math.max(l,e.left),d=Math.min(d,e.right),c=Math.max(c,e.top),u=Math.min(u,e.bottom)),i.rect(l,c,d-l,u-c),i.clip()}}function Fa(i,t,e,n){let s=t.interpolate(e,n);s&&i.lineTo(s.x,s.y)}function fg(i,t,e,n,s){let o=gg(n,i,t,e),r=pg(s,n,t.lineHeight);return{itemWidth:o,itemHeight:r}}function gg(i,t,e,n){let s=i.text;return s&&typeof s!="string"&&(s=s.reduce((o,r)=>o.length>r.length?o:r)),t+e.size/2+n.measureText(s).width}function pg(i,t,e){let n=i;return typeof t.text!="string"&&(n=ml(t,e)),n}function ml(i,t){let e=i.text?i.text.length:0;return t*e}function mg(i,t){return!!((i==="mousemove"||i==="mouseout")&&(t.onHover||t.onLeave)||t.onClick&&(i==="click"||i==="mouseup"))}function yg(i,t){let e=new pi({ctx:i.ctx,options:t,chart:i});ot.configure(i,e,t),ot.addBox(i,e),i.titleBlock=e}function Tt(i,t){return t&&(N(t)?Array.prototype.push.apply(i,t):i.push(t)),i}function Ot(i){return(typeof i=="string"||i instanceof String)&&i.indexOf(`
40
26
  `)>-1?i.split(`
41
- `):i}function yg(i,t){let{element:e,datasetIndex:n,index:s}=t,o=i.getDatasetMeta(n).controller,{label:r,value:a}=o.getLabelAndValue(s);return{chart:i,label:r,parsed:o.getParsed(s),raw:i.data.datasets[n].data[s],formattedValue:a,dataset:o.getDataset(),dataIndex:s,datasetIndex:n,element:e}}function Ia(i,t){let e=i.chart.ctx,{body:n,footer:s,title:o}=i,{boxWidth:r,boxHeight:a}=t,l=J(t.bodyFont),c=J(t.titleFont),d=J(t.footerFont),u=o.length,h=s.length,f=n.length,g=it(t.padding),p=g.height,m=0,b=n.reduce((v,x)=>v+x.before.length+x.lines.length+x.after.length,0);if(b+=i.beforeBody.length+i.afterBody.length,u&&(p+=u*c.lineHeight+(u-1)*t.titleSpacing+t.titleMarginBottom),b){let v=t.displayColors?Math.max(a,l.lineHeight):l.lineHeight;p+=f*v+(b-f)*l.lineHeight+(b-1)*t.bodySpacing}h&&(p+=t.footerMarginTop+h*d.lineHeight+(h-1)*t.footerSpacing);let y=0,_=function(v){m=Math.max(m,e.measureText(v).width+y)};return e.save(),e.font=c.string,H(i.title,_),e.font=l.string,H(i.beforeBody.concat(i.afterBody),_),y=t.displayColors?r+2+t.boxPadding:0,H(n,v=>{H(v.before,_),H(v.lines,_),H(v.after,_)}),y=0,e.font=d.string,H(i.footer,_),e.restore(),m+=g.width,{width:m,height:p}}function xg(i,t){let{y:e,height:n}=t;return e<n/2?"top":e>i.height-n/2?"bottom":"center"}function _g(i,t,e,n){let{x:s,width:o}=n,r=e.caretSize+e.caretPadding;if(i==="left"&&s+o+r>t.width||i==="right"&&s-o-r<0)return!0}function vg(i,t,e,n){let{x:s,width:o}=e,{width:r,chartArea:{left:a,right:l}}=i,c="center";return n==="center"?c=s<=(a+l)/2?"left":"right":s<=o/2?c="left":s>=r-o/2&&(c="right"),_g(c,i,t,e)&&(c="center"),c}function Fa(i,t,e){let n=e.yAlign||t.yAlign||xg(i,e);return{xAlign:e.xAlign||t.xAlign||vg(i,t,e,n),yAlign:n}}function Mg(i,t){let{x:e,width:n}=i;return t==="right"?e-=n:t==="center"&&(e-=n/2),e}function Sg(i,t,e){let{y:n,height:s}=i;return t==="top"?n+=e:t==="bottom"?n-=s+e:n-=s/2,n}function $a(i,t,e,n){let{caretSize:s,caretPadding:o,cornerRadius:r}=i,{xAlign:a,yAlign:l}=e,c=s+o,{topLeft:d,topRight:u,bottomLeft:h,bottomRight:f}=Vt(r),g=Mg(t,a),p=Sg(t,l,c);return l==="center"?a==="left"?g+=c:a==="right"&&(g-=c):a==="left"?g-=Math.max(d,h)+s:a==="right"&&(g+=Math.max(u,f)+s),{x:Z(g,0,n.width-t.width),y:Z(p,0,n.height-t.height)}}function nn(i,t,e){let n=it(e.padding);return t==="center"?i.x+i.width/2:t==="right"?i.x+i.width-n.right:i.x+n.left}function Ha(i){return Tt([],Ot(i))}function kg(i,t,e){return Pt(i,{tooltip:t,tooltipItems:e,type:"tooltip"})}function za(i,t){let e=t&&t.dataset&&t.dataset.tooltip&&t.dataset.tooltip.callbacks;return e?i.override(e):i}function dt(i,t,e,n){let s=i[t].call(e,n);return typeof s>"u"?gl[t].call(e,n):s}function Eg(i,t,e,n){let s=i.indexOf(t);if(s===-1)return Cg(i,t,e,n);let o=i.lastIndexOf(t);return s!==o?e:s}function Ba(i){let t=this.getLabels();return i>=0&&i<t.length?t[i]:i}function Dg(i,t){let e=[],{bounds:s,step:o,min:r,max:a,precision:l,count:c,maxTicks:d,maxDigits:u,includeBounds:h}=i,f=o||1,g=d-1,{min:p,max:m}=t,b=!P(r),y=!P(a),_=!P(c),v=(m-p)/(u+1),x=Yn((m-p)/g/f)*f,S,k,T,w;if(x<1e-14&&!b&&!y)return[{value:p},{value:m}];w=Math.ceil(m/x)-Math.floor(p/x),w>g&&(x=Yn(w*x/g/f)*f),P(l)||(S=Math.pow(10,l),x=Math.ceil(x*S)/S),s==="ticks"?(k=Math.floor(p/x)*x,T=Math.ceil(m/x)*x):(k=p,T=m),b&&y&&o&&wr((a-r)/o,x/1e3)?(w=Math.round(Math.min((a-r)/x,d)),x=(a-r)/w,k=r,T=a):_?(k=b?r:k,T=y?a:T,w=c-1,x=(T-k)/w):(w=(T-k)/x,_e(w,Math.round(w),x/1e3)?w=Math.round(w):w=Math.ceil(w));let L=Math.max(Kn(x),Kn(k));S=Math.pow(10,P(l)?L:l),k=Math.round(k*S)/S,T=Math.round(T*S)/S;let D=0;for(b&&(h&&k!==r?(e.push({value:r}),k<r&&D++,_e(Math.round((k+D*x)*S)/S,r,Wa(r,v,i))&&D++):k<r&&D++);D<w;++D){let I=Math.round((k+D*x)*S)/S;if(y&&I>a)break;e.push({value:I})}return y&&h&&T!==a?e.length&&_e(e[e.length-1].value,a,Wa(a,v,i))?e[e.length-1].value=a:e.push({value:a}):(!y||T===a)&&e.push({value:T}),e}function Wa(i,t,{horizontal:e,minRotation:n}){let s=bt(n),o=(e?Math.sin(s):Math.cos(s))||.001,r=.75*t*(""+i).length;return Math.min(t/o,r)}function Na(i){return i/Math.pow(10,gi(i))===1}function Va(i,t,e){let n=Math.pow(10,e),s=Math.floor(i/n);return Math.ceil(t/n)-s}function Ag(i,t){let e=t-i,n=gi(e);for(;Va(i,t,n)>10;)n++;for(;Va(i,t,n)<10;)n--;return Math.min(n,gi(i))}function Pg(i,{min:t,max:e}){t=ct(i.min,t);let n=[],s=gi(t),o=Ag(t,e),r=o<0?Math.pow(10,Math.abs(o)):1,a=Math.pow(10,o),l=s>o?Math.pow(10,s):0,c=Math.round((t-l)*r)/r,d=Math.floor((t-l)/a/10)*a*10,u=Math.floor((c-d)/Math.pow(10,o)),h=ct(i.min,Math.round((l+d+u*Math.pow(10,o))*r)/r);for(;h<e;)n.push({value:h,major:Na(h),significand:u}),u>=10?u=u<15?15:20:u++,u>=20&&(o++,u=2,r=o>=0?1:r),h=Math.round((l+d+u*Math.pow(10,o))*r)/r;let f=ct(i.max,h);return n.push({value:f,major:Na(f),significand:u}),n}function Ns(i){let t=i.ticks;if(t.display&&i.display){let e=it(t.backdropPadding);return C(t.font&&t.font.size,j.font.size)+e.height}return 0}function Rg(i,t,e){return e=N(e)?e:[e],{w:Ir(i,t.string,e),h:e.length*t.lineHeight}}function ja(i,t,e,n,s){return i===n||i===s?{start:t-e/2,end:t+e/2}:i<n||i>s?{start:t-e,end:t}:{start:t,end:t+e}}function Og(i){let t={l:i.left+i._padding.left,r:i.right-i._padding.right,t:i.top+i._padding.top,b:i.bottom-i._padding.bottom},e=Object.assign({},t),n=[],s=[],o=i._pointLabels.length,r=i.options.pointLabels,a=r.centerPointLabels?F/o:0;for(let l=0;l<o;l++){let c=r.setContext(i.getPointLabelContext(l));s[l]=c.padding;let d=i.getPointPosition(l,i.drawingArea+s[l],a),u=J(c.font),h=Rg(i.ctx,u,i._pointLabels[l]);n[l]=h;let f=tt(i.getIndexAngle(l)+a),g=Math.round(Ni(f)),p=ja(g,d.x,h.w,0,180),m=ja(g,d.y,h.h,90,270);Ig(e,t,f,p,m)}i.setCenterPoint(t.l-e.l,e.r-t.r,t.t-e.t,e.b-t.b),i._pointLabelItems=Hg(i,n,s)}function Ig(i,t,e,n,s){let o=Math.abs(Math.sin(e)),r=Math.abs(Math.cos(e)),a=0,l=0;n.start<t.l?(a=(t.l-n.start)/o,i.l=Math.min(i.l,t.l-a)):n.end>t.r&&(a=(n.end-t.r)/o,i.r=Math.max(i.r,t.r+a)),s.start<t.t?(l=(t.t-s.start)/r,i.t=Math.min(i.t,t.t-l)):s.end>t.b&&(l=(s.end-t.b)/r,i.b=Math.max(i.b,t.b+l))}function Fg(i,t,e){let n=i.drawingArea,{extra:s,additionalAngle:o,padding:r,size:a}=e,l=i.getPointPosition(t,n+s+r,o),c=Math.round(Ni(tt(l.angle+K))),d=Wg(l.y,a.h,c),u=zg(c),h=Bg(l.x,a.w,u);return{visible:!0,x:l.x,y:d,textAlign:u,left:h,top:d,right:h+a.w,bottom:d+a.h}}function $g(i,t){if(!t)return!0;let{left:e,top:n,right:s,bottom:o}=i;return!(Mt({x:e,y:n},t)||Mt({x:e,y:o},t)||Mt({x:s,y:n},t)||Mt({x:s,y:o},t))}function Hg(i,t,e){let n=[],s=i._pointLabels.length,o=i.options,{centerPointLabels:r,display:a}=o.pointLabels,l={extra:Ns(o)/2,additionalAngle:r?F/s:0},c;for(let d=0;d<s;d++){l.padding=e[d],l.size=t[d];let u=Fg(i,d,l);n.push(u),a==="auto"&&(u.visible=$g(u,c),u.visible&&(c=u))}return n}function zg(i){return i===0||i===180?"center":i<180?"left":"right"}function Bg(i,t,e){return e==="right"?i-=t:e==="center"&&(i-=t/2),i}function Wg(i,t,e){return e===90||e===270?i-=t/2:(e>270||e<90)&&(i-=t),i}function Ng(i,t,e){let{left:n,top:s,right:o,bottom:r}=e,{backdropColor:a}=t;if(!P(a)){let l=Vt(t.borderRadius),c=it(t.backdropPadding);i.fillStyle=a;let d=n-c.left,u=s-c.top,h=o-n+c.width,f=r-s+c.height;Object.values(l).some(g=>g!==0)?(i.beginPath(),Se(i,{x:d,y:u,w:h,h:f,radius:l}),i.fill()):i.fillRect(d,u,h,f)}}function Vg(i,t){let{ctx:e,options:{pointLabels:n}}=i;for(let s=t-1;s>=0;s--){let o=i._pointLabelItems[s];if(!o.visible)continue;let r=n.setContext(i.getPointLabelContext(s));Ng(e,r,o);let a=J(r.font),{x:l,y:c,textAlign:d}=o;Nt(e,i._pointLabels[s],l,c+a.lineHeight/2,a,{color:r.color,textAlign:d,textBaseline:"middle"})}}function pl(i,t,e,n){let{ctx:s}=i;if(e)s.arc(i.xCenter,i.yCenter,t,0,V);else{let o=i.getPointPosition(0,t);s.moveTo(o.x,o.y);for(let r=1;r<n;r++)o=i.getPointPosition(r,t),s.lineTo(o.x,o.y)}}function jg(i,t,e,n,s){let o=i.ctx,r=t.circular,{color:a,lineWidth:l}=t;!r&&!n||!a||!l||e<0||(o.save(),o.strokeStyle=a,o.lineWidth=l,o.setLineDash(s.dash||[]),o.lineDashOffset=s.dashOffset,o.beginPath(),pl(i,e,r,n),o.closePath(),o.stroke(),o.restore())}function qg(i,t,e){return Pt(i,{label:e,index:t,type:"pointLabel"})}function qa(i,t){return i-t}function Ya(i,t){if(P(t))return null;let e=i._adapter,{parser:n,round:s,isoWeekday:o}=i._parseOpts,r=t;return typeof n=="function"&&(r=n(r)),Y(r)||(r=typeof n=="string"?e.parse(r,n):e.parse(r)),r===null?null:(s&&(r=s==="week"&&(Qt(o)||o===!0)?e.startOf(r,"isoWeek",o):e.startOf(r,s)),+r)}function Ua(i,t,e,n){let s=ut.length;for(let o=ut.indexOf(i);o<s-1;++o){let r=gn[ut[o]],a=r.steps?r.steps:Number.MAX_SAFE_INTEGER;if(r.common&&Math.ceil((e-t)/(a*r.size))<=n)return ut[o]}return ut[s-1]}function Yg(i,t,e,n,s){for(let o=ut.length-1;o>=ut.indexOf(e);o--){let r=ut[o];if(gn[r].common&&i._adapter.diff(s,n,r)>=t-1)return r}return ut[e?ut.indexOf(e):0]}function Ug(i){for(let t=ut.indexOf(i)+1,e=ut.length;t<e;++t)if(gn[ut[t]].common)return ut[t]}function Ka(i,t,e){if(!e)i[t]=!0;else if(e.length){let{lo:n,hi:s}=Vi(e,t),o=e[n]>=t?e[n]:e[s];i[o]=!0}}function Kg(i,t,e,n){let s=i._adapter,o=+s.startOf(t[0].value,n),r=t[t.length-1].value,a,l;for(a=o;a<=r;a=+s.add(a,1,n))l=e[a],l>=0&&(t[l].major=!0);return t}function Ga(i,t,e){let n=[],s={},o=t.length,r,a;for(r=0;r<o;++r)a=t[r],s[a]=r,n.push({value:a,major:!1});return o===0||!e?n:Kg(i,n,s,e)}function sn(i,t,e){let n=0,s=i.length-1,o,r,a,l;e?(t>=i[n].pos&&t<=i[s].pos&&({lo:n,hi:s}=vt(i,"pos",t)),{pos:o,time:a}=i[n],{pos:r,time:l}=i[s]):(t>=i[n].time&&t<=i[s].time&&({lo:n,hi:s}=vt(i,"time",t)),{time:o,pos:a}=i[n],{time:r,pos:l}=i[s]);let c=r-o;return c?a+(l-a)*(t-o)/c:a}var Ls,Rt,Jr,Fu,Ds,an,_s,ia,Uu,gt,we,Ce,It,Ee,oe,si,Le,De,oh,As,rh,uh,Za,ot,ln,Ps,on,xh,da,tl,hi,ua,Rs,pt,$h,ha,fa,ae,Re,Os,wt,Is,ya,sl,ni,Hs,sf,rf,af,rn,Sa,lt,ne,kf,Ct,Ae,Pe,Af,Bs,wa,Hf,Nf,un,lg,Oa,cg,hn,gg,fi,mg,en,bg,ri,gl,ui,Tg,wg,Cg,Lg,ai,Oe,li,gi,ie,ci,se,gn,ut,re,di,Gg,ml,bl=E(()=>{Xr();Ls=class{constructor(){this._request=null,this._charts=new Map,this._running=!1,this._lastDate=void 0}_notify(t,e,n,s){let o=e.listeners[s],r=e.duration;o.forEach(a=>a({chart:t,initial:e.initial,numSteps:r,currentStep:Math.min(n-e.start,r)}))}_refresh(){this._request||(this._running=!0,this._request=Zn.call(window,()=>{this._update(),this._request=null,this._running&&this._refresh()}))}_update(t=Date.now()){let e=0;this._charts.forEach((n,s)=>{if(!n.running||!n.items.length)return;let o=n.items,r=o.length-1,a=!1,l;for(;r>=0;--r)l=o[r],l._active?(l._total>n.duration&&(n.duration=l._total),l.tick(t),a=!0):(o[r]=o[o.length-1],o.pop());a&&(s.draw(),this._notify(s,n,t,"progress")),o.length||(n.running=!1,this._notify(s,n,t,"complete"),n.initial=!1),e+=o.length}),this._lastDate=t,e===0&&(this._running=!1)}_getAnims(t){let e=this._charts,n=e.get(t);return n||(n={running:!1,initial:!0,items:[],listeners:{complete:[],progress:[]}},e.set(t,n)),n}listen(t,e,n){this._getAnims(t).listeners[e].push(n)}add(t,e){!e||!e.length||this._getAnims(t).items.push(...e)}has(t){return this._getAnims(t).items.length>0}start(t){let e=this._charts.get(t);e&&(e.running=!0,e.start=Date.now(),e.duration=e.items.reduce((n,s)=>Math.max(n,s._duration),0),this._refresh())}running(t){if(!this._running)return!1;let e=this._charts.get(t);return!(!e||!e.running||!e.items.length)}stop(t){let e=this._charts.get(t);if(!e||!e.items.length)return;let n=e.items,s=n.length-1;for(;s>=0;--s)n[s].cancel();e.items=[],this._notify(t,e,Date.now(),"complete")}remove(t){return this._charts.delete(t)}},Rt=new Ls,Jr="transparent",Fu={boolean(i,t,e){return e>.5?t:i},color(i,t,e){let n=ns(i||Jr),s=n.valid&&ns(t||Jr);return s&&s.valid?s.mix(n,e).hexString():t},number(i,t,e){return i+(t-i)*e}},Ds=class{constructor(t,e,n,s){let o=e[n];s=ke([t.to,s,o,t.from]);let r=ke([t.from,o,s]);this._active=!0,this._fn=t.fn||Fu[t.type||typeof r],this._easing=pe[t.easing]||pe.linear,this._start=Math.floor(Date.now()+(t.delay||0)),this._duration=this._total=Math.floor(t.duration),this._loop=!!t.loop,this._target=e,this._prop=n,this._from=r,this._to=s,this._promises=void 0}active(){return this._active}update(t,e,n){if(this._active){this._notify(!1);let s=this._target[this._prop],o=n-this._start,r=this._duration-o;this._start=n,this._duration=Math.floor(Math.max(r,t.duration)),this._total+=o,this._loop=!!t.loop,this._to=ke([t.to,e,s,t.from]),this._from=ke([t.from,s,e])}}cancel(){this._active&&(this.tick(Date.now()),this._active=!1,this._notify(!1))}tick(t){let e=t-this._start,n=this._duration,s=this._prop,o=this._from,r=this._loop,a=this._to,l;if(this._active=o!==a&&(r||e<n),!this._active){this._target[s]=a,this._notify(!0);return}if(e<0){this._target[s]=o;return}l=e/n%2,l=r&&l>1?2-l:l,l=this._easing(Math.min(1,Math.max(0,l))),this._target[s]=this._fn(o,a,l)}wait(){let t=this._promises||(this._promises=[]);return new Promise((e,n)=>{t.push({res:e,rej:n})})}_notify(t){let e=t?"res":"rej",n=this._promises||[];for(let s=0;s<n.length;s++)n[s][e]()}},an=class{constructor(t,e){this._chart=t,this._properties=new Map,this.configure(e)}configure(t){if(!O(t))return;let e=Object.keys(j.animation),n=this._properties;Object.getOwnPropertyNames(t).forEach(s=>{let o=t[s];if(!O(o))return;let r={};for(let a of e)r[a]=o[a];(N(o.properties)&&o.properties||[s]).forEach(a=>{(a===s||!n.has(a))&&n.set(a,r)})})}_animateOptions(t,e){let n=e.options,s=Hu(t,n);if(!s)return[];let o=this._createAnimations(s,n);return n.$shared&&$u(t.options.$animations,n).then(()=>{t.options=n},()=>{}),o}_createAnimations(t,e){let n=this._properties,s=[],o=t.$animations||(t.$animations={}),r=Object.keys(e),a=Date.now(),l;for(l=r.length-1;l>=0;--l){let c=r[l];if(c.charAt(0)==="$")continue;if(c==="options"){s.push(...this._animateOptions(t,e));continue}let d=e[c],u=o[c],h=n.get(c);if(u)if(h&&u.active()){u.update(h,d,a);continue}else u.cancel();if(!h||!h.duration){t[c]=d;continue}o[c]=u=new Ds(h,t,c,d),s.push(u)}return s}update(t,e){if(this._properties.size===0){Object.assign(t,e);return}let n=this._createAnimations(t,e);if(n.length)return Rt.add(this._chart,n),!0}};_s=i=>i==="reset"||i==="none",ia=(i,t)=>t?i:Object.assign({},i),Uu=(i,t,e)=>i&&!t.hidden&&t._stacked&&{keys:Xa(e,!0),values:null},gt=class{constructor(t,e){this.chart=t,this._ctx=t.ctx,this.index=e,this._cachedDataOpts={},this._cachedMeta=this.getMeta(),this._type=this._cachedMeta.type,this.options=void 0,this._parsing=!1,this._data=void 0,this._objectData=void 0,this._sharedOptions=void 0,this._drawStart=void 0,this._drawCount=void 0,this.enableOptionSharing=!1,this.supportsDecimation=!1,this.$context=void 0,this._syncList=[],this.datasetElementType=new.target.datasetElementType,this.dataElementType=new.target.dataElementType,this.initialize()}initialize(){let t=this._cachedMeta;this.configure(),this.linkScales(),t._stacked=ys(t.vScale,t),this.addElements(),this.options.fill&&!this.chart.isPluginEnabled("filler")&&console.warn("Tried to use the 'fill' option without the 'Filler' plugin enabled. Please import and register the 'Filler' plugin and make sure it is not disabled in the options")}updateIndex(t){this.index!==t&&Qe(this._cachedMeta),this.index=t}linkScales(){let t=this.chart,e=this._cachedMeta,n=this.getDataset(),s=(u,h,f,g)=>u==="x"?h:u==="r"?g:f,o=e.xAxisID=C(n.xAxisID,xs(t,"x")),r=e.yAxisID=C(n.yAxisID,xs(t,"y")),a=e.rAxisID=C(n.rAxisID,xs(t,"r")),l=e.indexAxis,c=e.iAxisID=s(l,o,r,a),d=e.vAxisID=s(l,r,o,a);e.xScale=this.getScaleForId(o),e.yScale=this.getScaleForId(r),e.rScale=this.getScaleForId(a),e.iScale=this.getScaleForId(c),e.vScale=this.getScaleForId(d)}getDataset(){return this.chart.data.datasets[this.index]}getMeta(){return this.chart.getDatasetMeta(this.index)}getScaleForId(t){return this.chart.scales[t]}_getOtherScale(t){let e=this._cachedMeta;return t===e.iScale?e.vScale:e.iScale}reset(){this._update("reset")}_destroy(){let t=this._cachedMeta;this._data&&Xn(this._data,this),t._stacked&&Qe(t)}_dataCheck(){let t=this.getDataset(),e=t.data||(t.data=[]),n=this._data;if(O(e)){let s=this._cachedMeta;this._data=Wu(e,s)}else if(n!==e){if(n){Xn(n,this);let s=this._cachedMeta;Qe(s),s._parsed=[]}e&&Object.isExtensible(e)&&Ar(e,this),this._syncList=[],this._data=e}}addElements(){let t=this._cachedMeta;this._dataCheck(),this.datasetElementType&&(t.dataset=new this.datasetElementType)}buildOrUpdateElements(t){let e=this._cachedMeta,n=this.getDataset(),s=!1;this._dataCheck();let o=e._stacked;e._stacked=ys(e.vScale,e),e.stack!==n.stack&&(s=!0,Qe(e),e.stack=n.stack),this._resyncElements(t),(s||o!==e._stacked)&&(ea(this,e._parsed),e._stacked=ys(e.vScale,e))}configure(){let t=this.chart.config,e=t.datasetScopeKeys(this._type),n=t.getOptionScopes(this.getDataset(),e,!0);this.options=t.createResolver(n,this.getContext()),this._parsing=this.options.parsing,this._cachedDataOpts={}}parse(t,e){let{_cachedMeta:n,_data:s}=this,{iScale:o,_stacked:r}=n,a=o.axis,l=t===0&&e===s.length?!0:n._sorted,c=t>0&&n._parsed[t-1],d,u,h;if(this._parsing===!1)n._parsed=s,n._sorted=!0,h=s;else{N(s[t])?h=this.parseArrayData(n,s,t,e):O(s[t])?h=this.parseObjectData(n,s,t,e):h=this.parsePrimitiveData(n,s,t,e);let f=()=>u[a]===null||c&&u[a]<c[a];for(d=0;d<e;++d)n._parsed[d+t]=u=h[d],l&&(f()&&(l=!1),c=u);n._sorted=l}r&&ea(this,h)}parsePrimitiveData(t,e,n,s){let{iScale:o,vScale:r}=t,a=o.axis,l=r.axis,c=o.getLabels(),d=o===r,u=new Array(s),h,f,g;for(h=0,f=s;h<f;++h)g=h+n,u[h]={[a]:d||o.parse(c[g],g),[l]:r.parse(e[g],g)};return u}parseArrayData(t,e,n,s){let{xScale:o,yScale:r}=t,a=new Array(s),l,c,d,u;for(l=0,c=s;l<c;++l)d=l+n,u=e[d],a[l]={x:o.parse(u[0],d),y:r.parse(u[1],d)};return a}parseObjectData(t,e,n,s){let{xScale:o,yScale:r}=t,{xAxisKey:a="x",yAxisKey:l="y"}=this._parsing,c=new Array(s),d,u,h,f;for(d=0,u=s;d<u;++d)h=d+n,f=e[h],c[d]={x:o.parse(At(f,a),h),y:r.parse(At(f,l),h)};return c}getParsed(t){return this._cachedMeta._parsed[t]}getDataElement(t){return this._cachedMeta.data[t]}applyStack(t,e,n){let s=this.chart,o=this._cachedMeta,r=e[t.axis],a={keys:Xa(s,!0),values:e._stacks[t.axis]._visualValues};return Qr(a,r,o.index,{mode:n})}updateRangeFromParsed(t,e,n,s){let o=n[e.axis],r=o===null?NaN:o,a=s&&n._stacks[e.axis];s&&a&&(s.values=a,r=Qr(s,o,this._cachedMeta.index)),t.min=Math.min(t.min,r),t.max=Math.max(t.max,r)}getMinMax(t,e){let n=this._cachedMeta,s=n._parsed,o=n._sorted&&t===n.iScale,r=s.length,a=this._getOtherScale(t),l=Uu(e,n,this.chart),c={min:Number.POSITIVE_INFINITY,max:Number.NEGATIVE_INFINITY},{min:d,max:u}=Vu(a),h,f;function g(){f=s[h];let p=f[a.axis];return!Y(f[t.axis])||d>p||u<p}for(h=0;h<r&&!(!g()&&(this.updateRangeFromParsed(c,t,f,l),o));++h);if(o){for(h=r-1;h>=0;--h)if(!g()){this.updateRangeFromParsed(c,t,f,l);break}}return c}getAllParsedValues(t){let e=this._cachedMeta._parsed,n=[],s,o,r;for(s=0,o=e.length;s<o;++s)r=e[s][t.axis],Y(r)&&n.push(r);return n}getMaxOverflow(){return!1}getLabelAndValue(t){let e=this._cachedMeta,n=e.iScale,s=e.vScale,o=this.getParsed(t);return{label:n?""+n.getLabelForValue(o[n.axis]):"",value:s?""+s.getLabelForValue(o[s.axis]):""}}_update(t){let e=this._cachedMeta;this.update(t||"default"),e._clip=Bu(C(this.options.clip,zu(e.xScale,e.yScale,this.getMaxOverflow())))}update(t){}draw(){let t=this._ctx,e=this.chart,n=this._cachedMeta,s=n.data||[],o=e.chartArea,r=[],a=this._drawStart||0,l=this._drawCount||s.length-a,c=this.options.drawActiveElementsOnTop,d;for(n.dataset&&n.dataset.draw(t,o,a,l),d=a;d<a+l;++d){let u=s[d];u.hidden||(u.active&&c?r.push(u):u.draw(t,o))}for(d=0;d<r.length;++d)r[d].draw(t,o)}getStyle(t,e){let n=e?"active":"default";return t===void 0&&this._cachedMeta.dataset?this.resolveDatasetElementOptions(n):this.resolveDataElementOptions(t||0,n)}getContext(t,e,n){let s=this.getDataset(),o;if(t>=0&&t<this._cachedMeta.data.length){let r=this._cachedMeta.data[t];o=r.$context||(r.$context=Yu(this.getContext(),t,r)),o.parsed=this.getParsed(t),o.raw=s.data[t],o.index=o.dataIndex=t}else o=this.$context||(this.$context=qu(this.chart.getContext(),this.index)),o.dataset=s,o.index=o.datasetIndex=this.index;return o.active=!!e,o.mode=n,o}resolveDatasetElementOptions(t){return this._resolveElementOptions(this.datasetElementType.id,t)}resolveDataElementOptions(t,e){return this._resolveElementOptions(this.dataElementType.id,e,t)}_resolveElementOptions(t,e="default",n){let s=e==="active",o=this._cachedDataOpts,r=t+"-"+e,a=o[r],l=this.enableOptionSharing&&xe(n);if(a)return ia(a,l);let c=this.chart.config,d=c.datasetElementScopeKeys(this._type,t),u=s?[`${t}Hover`,"hover",t,""]:[t,""],h=c.getOptionScopes(this.getDataset(),d),f=Object.keys(j.elements[t]),g=()=>this.getContext(n,s,e),p=c.resolveNamedOptions(h,f,g,u);return p.$shared&&(p.$shared=l,o[r]=Object.freeze(ia(p,l))),p}_resolveAnimations(t,e,n){let s=this.chart,o=this._cachedDataOpts,r=`animation-${e}`,a=o[r];if(a)return a;let l;if(s.options.animation!==!1){let d=this.chart.config,u=d.datasetAnimationScopeKeys(this._type,e),h=d.getOptionScopes(this.getDataset(),u);l=d.createResolver(h,this.getContext(t,n,e))}let c=new an(s,l&&l.animations);return l&&l._cacheable&&(o[r]=Object.freeze(c)),c}getSharedOptions(t){if(t.$shared)return this._sharedOptions||(this._sharedOptions=Object.assign({},t))}includeOptions(t,e){return!e||_s(t)||this.chart._animationsDisabled}_getSharedOptions(t,e){let n=this.resolveDataElementOptions(t,e),s=this._sharedOptions,o=this.getSharedOptions(n),r=this.includeOptions(e,o)||o!==s;return this.updateSharedOptions(o,e,n),{sharedOptions:o,includeOptions:r}}updateElement(t,e,n,s){_s(s)?Object.assign(t,n):this._resolveAnimations(e,s).update(t,n)}updateSharedOptions(t,e,n){t&&!_s(e)&&this._resolveAnimations(void 0,e).update(t,n)}_setStyle(t,e,n,s){t.active=s;let o=this.getStyle(e,s);this._resolveAnimations(e,n,s).update(t,{options:!s&&this.getSharedOptions(o)||o})}removeHoverStyle(t,e,n){this._setStyle(t,n,"active",!1)}setHoverStyle(t,e,n){this._setStyle(t,n,"active",!0)}_removeDatasetHoverStyle(){let t=this._cachedMeta.dataset;t&&this._setStyle(t,void 0,"active",!1)}_setDatasetHoverStyle(){let t=this._cachedMeta.dataset;t&&this._setStyle(t,void 0,"active",!0)}_resyncElements(t){let e=this._data,n=this._cachedMeta.data;for(let[a,l,c]of this._syncList)this[a](l,c);this._syncList=[];let s=n.length,o=e.length,r=Math.min(o,s);r&&this.parse(0,r),o>s?this._insertElements(s,o-s,t):o<s&&this._removeElements(o,s-o)}_insertElements(t,e,n=!0){let s=this._cachedMeta,o=s.data,r=t+e,a,l=c=>{for(c.length+=e,a=c.length-1;a>=r;a--)c[a]=c[a-e]};for(l(o),a=t;a<r;++a)o[a]=new this.dataElementType;this._parsing&&l(s._parsed),this.parse(t,e),n&&this.updateElements(o,t,e,"reset")}updateElements(t,e,n,s){}_removeElements(t,e){let n=this._cachedMeta;if(this._parsing){let s=n._parsed.splice(t,e);n._stacked&&Qe(n,s)}n.data.splice(t,e)}_sync(t){if(this._parsing)this._syncList.push(t);else{let[e,n,s]=t;this[e](n,s)}this.chart._dataChanges.push([this.index,...t])}_onDataPush(){let t=arguments.length;this._sync(["_insertElements",this.getDataset().data.length-t,t])}_onDataPop(){this._sync(["_removeElements",this._cachedMeta.data.length-1,1])}_onDataShift(){this._sync(["_removeElements",0,1])}_onDataSplice(t,e){e&&this._sync(["_removeElements",t,e]);let n=arguments.length-2;n&&this._sync(["_insertElements",t,n])}_onDataUnshift(){this._sync(["_insertElements",0,arguments.length])}};M(gt,"defaults",{}),M(gt,"datasetElementType",null),M(gt,"dataElementType",null);we=class extends gt{parsePrimitiveData(t,e,n,s){return na(t,e,n,s)}parseArrayData(t,e,n,s){return na(t,e,n,s)}parseObjectData(t,e,n,s){let{iScale:o,vScale:r}=t,{xAxisKey:a="x",yAxisKey:l="y"}=this._parsing,c=o.axis==="x"?a:l,d=r.axis==="x"?a:l,u=[],h,f,g,p;for(h=n,f=n+s;h<f;++h)p=e[h],g={},g[o.axis]=o.parse(At(p,c),h),u.push(Ja(At(p,d),g,r,h));return u}updateRangeFromParsed(t,e,n,s){super.updateRangeFromParsed(t,e,n,s);let o=n._custom;o&&e===this._cachedMeta.vScale&&(t.min=Math.min(t.min,o.min),t.max=Math.max(t.max,o.max))}getMaxOverflow(){return 0}getLabelAndValue(t){let e=this._cachedMeta,{iScale:n,vScale:s}=e,o=this.getParsed(t),r=o._custom,a=vs(r)?"["+r.start+", "+r.end+"]":""+s.getLabelForValue(o[s.axis]);return{label:""+n.getLabelForValue(o[n.axis]),value:a}}initialize(){this.enableOptionSharing=!0,super.initialize();let t=this._cachedMeta;t.stack=this.getDataset().stack}update(t){let e=this._cachedMeta;this.updateElements(e.data,0,e.data.length,t)}updateElements(t,e,n,s){let o=s==="reset",{index:r,_cachedMeta:{vScale:a}}=this,l=a.getBasePixel(),c=a.isHorizontal(),d=this._getRuler(),{sharedOptions:u,includeOptions:h}=this._getSharedOptions(e,s);for(let f=e;f<e+n;f++){let g=this.getParsed(f),p=o||P(g[a.axis])?{base:l,head:l}:this._calculateBarValuePixels(f),m=this._calculateBarIndexPixels(f,d),b=(g._stacks||{})[a.axis],y={horizontal:c,base:p.base,enableBorderRadius:!b||vs(g._custom)||r===b._top||r===b._bottom,x:c?p.head:m.center,y:c?m.center:p.head,height:c?m.size:Math.abs(p.size),width:c?Math.abs(p.size):m.size};h&&(y.options=u||this.resolveDataElementOptions(f,t[f].active?"active":s));let _=y.options||t[f].options;eh(y,_,b,r),nh(y,_,d.ratio),this.updateElement(t[f],f,y,s)}}_getStacks(t,e){let{iScale:n}=this._cachedMeta,s=n.getMatchingVisibleMetas(this._type).filter(d=>d.controller.options.grouped),o=n.options.stacked,r=[],a=this._cachedMeta.controller.getParsed(e),l=a&&a[n.axis],c=d=>{let u=d._parsed.find(f=>f[n.axis]===l),h=u&&u[d.vScale.axis];if(P(h)||isNaN(h))return!0};for(let d of s)if(!(e!==void 0&&c(d))&&((o===!1||r.indexOf(d.stack)===-1||o===void 0&&d.stack===void 0)&&r.push(d.stack),d.index===t))break;return r.length||r.push(void 0),r}_getStackCount(t){return this._getStacks(void 0,t).length}_getAxisCount(){return this._getAxis().length}getFirstScaleIdForIndexAxis(){let t=this.chart.scales,e=this.chart.options.indexAxis;return Object.keys(t).filter(n=>t[n].axis===e).shift()}_getAxis(){let t={},e=this.getFirstScaleIdForIndexAxis();for(let n of this.chart.data.datasets)t[C(this.chart.options.indexAxis==="x"?n.xAxisID:n.yAxisID,e)]=!0;return Object.keys(t)}_getStackIndex(t,e,n){let s=this._getStacks(t,n),o=e!==void 0?s.indexOf(e):-1;return o===-1?s.length-1:o}_getRuler(){let t=this.options,e=this._cachedMeta,n=e.iScale,s=[],o,r;for(o=0,r=e.data.length;o<r;++o)s.push(n.getPixelForValue(this.getParsed(o)[n.axis],o));let a=t.barThickness;return{min:a||Gu(e),pixels:s,start:n._startPixel,end:n._endPixel,stackCount:this._getStackCount(),scale:n,grouped:t.grouped,ratio:a?1:t.categoryPercentage*t.barPercentage}}_calculateBarValuePixels(t){let{_cachedMeta:{vScale:e,_stacked:n,index:s},options:{base:o,minBarLength:r}}=this,a=o||0,l=this.getParsed(t),c=l._custom,d=vs(c),u=l[e.axis],h=0,f=n?this.applyStack(e,l,n):u,g,p;f!==u&&(h=f-u,f=u),d&&(u=c.barStart,f=c.barEnd-c.barStart,u!==0&&xt(u)!==xt(c.barEnd)&&(h=0),h+=u);let m=!P(o)&&!d?o:h,b=e.getPixelForValue(m);if(this.chart.getDataVisibility(t)?g=e.getPixelForValue(h+f):g=b,p=g-b,Math.abs(p)<r){p=Qu(p,e,a)*r,u===a&&(b-=p/2);let y=e.getPixelForDecimal(0),_=e.getPixelForDecimal(1),v=Math.min(y,_),x=Math.max(y,_);b=Math.max(Math.min(b,x),v),g=b+p,n&&!d&&(l._stacks[e.axis]._visualValues[s]=e.getValueForPixel(g)-e.getValueForPixel(b))}if(b===e.getPixelForValue(a)){let y=xt(p)*e.getLineWidthForValue(a)/2;b+=y,p-=y}return{size:p,base:b,head:g,center:g+p/2}}_calculateBarIndexPixels(t,e){let n=e.scale,s=this.options,o=s.skipNull,r=C(s.maxBarThickness,1/0),a,l,c=this._getAxisCount();if(e.grouped){let d=o?this._getStackCount(t):e.stackCount,u=s.barThickness==="flex"?Ju(t,e,s,d*c):Xu(t,e,s,d*c),h=this.chart.options.indexAxis==="x"?this.getDataset().xAxisID:this.getDataset().yAxisID,f=this._getAxis().indexOf(C(h,this.getFirstScaleIdForIndexAxis())),g=this._getStackIndex(this.index,this._cachedMeta.stack,o?t:void 0)+f;a=u.start+u.chunk*g+u.chunk/2,l=Math.min(r,u.chunk*u.ratio)}else a=n.getPixelForValue(this.getParsed(t)[n.axis],t),l=Math.min(r,e.min*e.ratio);return{base:a-l/2,head:a+l/2,center:a,size:l}}draw(){let t=this._cachedMeta,e=t.vScale,n=t.data,s=n.length,o=0;for(;o<s;++o)this.getParsed(o)[e.axis]!==null&&!n[o].hidden&&n[o].draw(this._ctx)}};M(we,"id","bar"),M(we,"defaults",{datasetElementType:!1,dataElementType:"bar",categoryPercentage:.8,barPercentage:.9,grouped:!0,animations:{numbers:{type:"number",properties:["x","y","base","width","height"]}}}),M(we,"overrides",{scales:{_index_:{type:"category",offset:!0,grid:{offset:!0}},_value_:{type:"linear",beginAtZero:!0}}});Ce=class extends gt{initialize(){this.enableOptionSharing=!0,super.initialize()}parsePrimitiveData(t,e,n,s){let o=super.parsePrimitiveData(t,e,n,s);for(let r=0;r<o.length;r++)o[r]._custom=this.resolveDataElementOptions(r+n).radius;return o}parseArrayData(t,e,n,s){let o=super.parseArrayData(t,e,n,s);for(let r=0;r<o.length;r++){let a=e[n+r];o[r]._custom=C(a[2],this.resolveDataElementOptions(r+n).radius)}return o}parseObjectData(t,e,n,s){let o=super.parseObjectData(t,e,n,s);for(let r=0;r<o.length;r++){let a=e[n+r];o[r]._custom=C(a&&a.r&&+a.r,this.resolveDataElementOptions(r+n).radius)}return o}getMaxOverflow(){let t=this._cachedMeta.data,e=0;for(let n=t.length-1;n>=0;--n)e=Math.max(e,t[n].size(this.resolveDataElementOptions(n))/2);return e>0&&e}getLabelAndValue(t){let e=this._cachedMeta,n=this.chart.data.labels||[],{xScale:s,yScale:o}=e,r=this.getParsed(t),a=s.getLabelForValue(r.x),l=o.getLabelForValue(r.y),c=r._custom;return{label:n[t]||"",value:"("+a+", "+l+(c?", "+c:"")+")"}}update(t){let e=this._cachedMeta.data;this.updateElements(e,0,e.length,t)}updateElements(t,e,n,s){let o=s==="reset",{iScale:r,vScale:a}=this._cachedMeta,{sharedOptions:l,includeOptions:c}=this._getSharedOptions(e,s),d=r.axis,u=a.axis;for(let h=e;h<e+n;h++){let f=t[h],g=!o&&this.getParsed(h),p={},m=p[d]=o?r.getPixelForDecimal(.5):r.getPixelForValue(g[d]),b=p[u]=o?a.getBasePixel():a.getPixelForValue(g[u]);p.skip=isNaN(m)||isNaN(b),c&&(p.options=l||this.resolveDataElementOptions(h,f.active?"active":s),o&&(p.options.radius=0)),this.updateElement(f,h,p,s)}}resolveDataElementOptions(t,e){let n=this.getParsed(t),s=super.resolveDataElementOptions(t,e);s.$shared&&(s=Object.assign({},s,{$shared:!1}));let o=s.radius;return e!=="active"&&(s.radius=0),s.radius+=C(n&&n._custom,o),s}};M(Ce,"id","bubble"),M(Ce,"defaults",{datasetElementType:!1,dataElementType:"point",animations:{numbers:{type:"number",properties:["x","y","borderWidth","radius"]}}}),M(Ce,"overrides",{scales:{x:{type:"linear"},y:{type:"linear"}}});It=class extends gt{constructor(t,e){super(t,e),this.enableOptionSharing=!0,this.innerRadius=void 0,this.outerRadius=void 0,this.offsetX=void 0,this.offsetY=void 0}linkScales(){}parse(t,e){let n=this.getDataset().data,s=this._cachedMeta;if(this._parsing===!1)s._parsed=n;else{let o=l=>+n[l];if(O(n[t])){let{key:l="value"}=this._parsing;o=c=>+At(n[c],l)}let r,a;for(r=t,a=t+e;r<a;++r)s._parsed[r]=o(r)}}_getRotation(){return bt(this.options.rotation-90)}_getCircumference(){return bt(this.options.circumference)}_getRotationExtents(){let t=V,e=-V;for(let n=0;n<this.chart.data.datasets.length;++n)if(this.chart.isDatasetVisible(n)&&this.chart.getDatasetMeta(n).type===this._type){let s=this.chart.getDatasetMeta(n).controller,o=s._getRotation(),r=s._getCircumference();t=Math.min(t,o),e=Math.max(e,o+r)}return{rotation:t,circumference:e-t}}update(t){let e=this.chart,{chartArea:n}=e,s=this._cachedMeta,o=s.data,r=this.getMaxBorderWidth()+this.getMaxOffset(o)+this.options.spacing,a=Math.max((Math.min(n.width,n.height)-r)/2,0),l=Math.min(Mr(this.options.cutout,a),1),c=this._getRingWeight(this.index),{circumference:d,rotation:u}=this._getRotationExtents(),{ratioX:h,ratioY:f,offsetX:g,offsetY:p}=sh(u,d,l),m=(n.width-r)/h,b=(n.height-r)/f,y=Math.max(Math.min(m,b)/2,0),_=jn(this.options.radius,y),v=Math.max(_*l,0),x=(_-v)/this._getVisibleDatasetWeightTotal();this.offsetX=g*_,this.offsetY=p*_,s.total=this.calculateTotal(),this.outerRadius=_-x*this._getRingWeightOffset(this.index),this.innerRadius=Math.max(this.outerRadius-x*c,0),this.updateElements(o,0,o.length,t)}_circumference(t,e){let n=this.options,s=this._cachedMeta,o=this._getCircumference();return e&&n.animation.animateRotate||!this.chart.getDataVisibility(t)||s._parsed[t]===null||s.data[t].hidden?0:this.calculateCircumference(s._parsed[t]*o/V)}updateElements(t,e,n,s){let o=s==="reset",r=this.chart,a=r.chartArea,c=r.options.animation,d=(a.left+a.right)/2,u=(a.top+a.bottom)/2,h=o&&c.animateScale,f=h?0:this.innerRadius,g=h?0:this.outerRadius,{sharedOptions:p,includeOptions:m}=this._getSharedOptions(e,s),b=this._getRotation(),y;for(y=0;y<e;++y)b+=this._circumference(y,o);for(y=e;y<e+n;++y){let _=this._circumference(y,o),v=t[y],x={x:d+this.offsetX,y:u+this.offsetY,startAngle:b,endAngle:b+_,circumference:_,outerRadius:g,innerRadius:f};m&&(x.options=p||this.resolveDataElementOptions(y,v.active?"active":s)),b+=_,this.updateElement(v,y,x,s)}}calculateTotal(){let t=this._cachedMeta,e=t.data,n=0,s;for(s=0;s<e.length;s++){let o=t._parsed[s];o!==null&&!isNaN(o)&&this.chart.getDataVisibility(s)&&!e[s].hidden&&(n+=Math.abs(o))}return n}calculateCircumference(t){let e=this._cachedMeta.total;return e>0&&!isNaN(t)?V*(Math.abs(t)/e):0}getLabelAndValue(t){let e=this._cachedMeta,n=this.chart,s=n.data.labels||[],o=Me(e._parsed[t],n.options.locale);return{label:s[t]||"",value:o}}getMaxBorderWidth(t){let e=0,n=this.chart,s,o,r,a,l;if(!t){for(s=0,o=n.data.datasets.length;s<o;++s)if(n.isDatasetVisible(s)){r=n.getDatasetMeta(s),t=r.data,a=r.controller;break}}if(!t)return 0;for(s=0,o=t.length;s<o;++s)l=a.resolveDataElementOptions(s),l.borderAlign!=="inner"&&(e=Math.max(e,l.borderWidth||0,l.hoverBorderWidth||0));return e}getMaxOffset(t){let e=0;for(let n=0,s=t.length;n<s;++n){let o=this.resolveDataElementOptions(n);e=Math.max(e,o.offset||0,o.hoverOffset||0)}return e}_getRingWeightOffset(t){let e=0;for(let n=0;n<t;++n)this.chart.isDatasetVisible(n)&&(e+=this._getRingWeight(n));return e}_getRingWeight(t){return Math.max(C(this.chart.data.datasets[t].weight,1),0)}_getVisibleDatasetWeightTotal(){return this._getRingWeightOffset(this.chart.data.datasets.length)||1}};M(It,"id","doughnut"),M(It,"defaults",{datasetElementType:!1,dataElementType:"arc",animation:{animateRotate:!0,animateScale:!1},animations:{numbers:{type:"number",properties:["circumference","endAngle","innerRadius","outerRadius","startAngle","x","y","offset","borderWidth","spacing"]}},cutout:"50%",rotation:0,circumference:360,radius:"100%",spacing:0,indexAxis:"r"}),M(It,"descriptors",{_scriptable:t=>t!=="spacing",_indexable:t=>t!=="spacing"&&!t.startsWith("borderDash")&&!t.startsWith("hoverBorderDash")}),M(It,"overrides",{aspectRatio:1,plugins:{legend:{labels:{generateLabels(t){let e=t.data,{labels:{pointStyle:n,textAlign:s,color:o,useBorderRadius:r,borderRadius:a}}=t.legend.options;return e.labels.length&&e.datasets.length?e.labels.map((l,c)=>{let u=t.getDatasetMeta(0).controller.getStyle(c);return{text:l,fillStyle:u.backgroundColor,fontColor:o,hidden:!t.getDataVisibility(c),lineDash:u.borderDash,lineDashOffset:u.borderDashOffset,lineJoin:u.borderJoinStyle,lineWidth:u.borderWidth,strokeStyle:u.borderColor,textAlign:s,pointStyle:n,borderRadius:r&&(a||u.borderRadius),index:c}}):[]}},onClick(t,e,n){n.chart.toggleDataVisibility(e.index),n.chart.update()}}}});Ee=class extends gt{initialize(){this.enableOptionSharing=!0,this.supportsDecimation=!0,super.initialize()}update(t){let e=this._cachedMeta,{dataset:n,data:s=[],_dataset:o}=e,r=this.chart._animationsDisabled,{start:a,count:l}=ts(e,s,r);this._drawStart=a,this._drawCount=l,es(e)&&(a=0,l=s.length),n._chart=this.chart,n._datasetIndex=this.index,n._decimated=!!o._decimated,n.points=s;let c=this.resolveDatasetElementOptions(t);this.options.showLine||(c.borderWidth=0),c.segment=this.options.segment,this.updateElement(n,void 0,{animated:!r,options:c},t),this.updateElements(s,a,l,t)}updateElements(t,e,n,s){let o=s==="reset",{iScale:r,vScale:a,_stacked:l,_dataset:c}=this._cachedMeta,{sharedOptions:d,includeOptions:u}=this._getSharedOptions(e,s),h=r.axis,f=a.axis,{spanGaps:g,segment:p}=this.options,m=Qt(g)?g:Number.POSITIVE_INFINITY,b=this.chart._animationsDisabled||o||s==="none",y=e+n,_=t.length,v=e>0&&this.getParsed(e-1);for(let x=0;x<_;++x){let S=t[x],k=b?S:{};if(x<e||x>=y){k.skip=!0;continue}let T=this.getParsed(x),w=P(T[f]),L=k[h]=r.getPixelForValue(T[h],x),D=k[f]=o||w?a.getBasePixel():a.getPixelForValue(l?this.applyStack(a,T,l):T[f],x);k.skip=isNaN(L)||isNaN(D)||w,k.stop=x>0&&Math.abs(T[h]-v[h])>m,p&&(k.parsed=T,k.raw=c.data[x]),u&&(k.options=d||this.resolveDataElementOptions(x,S.active?"active":s)),b||this.updateElement(S,x,k,s),v=T}}getMaxOverflow(){let t=this._cachedMeta,e=t.dataset,n=e.options&&e.options.borderWidth||0,s=t.data||[];if(!s.length)return n;let o=s[0].size(this.resolveDataElementOptions(0)),r=s[s.length-1].size(this.resolveDataElementOptions(s.length-1));return Math.max(n,o,r)/2}draw(){let t=this._cachedMeta;t.dataset.updateControlPoints(this.chart.chartArea,t.iScale.axis),super.draw()}};M(Ee,"id","line"),M(Ee,"defaults",{datasetElementType:"line",dataElementType:"point",showLine:!0,spanGaps:!1}),M(Ee,"overrides",{scales:{_index_:{type:"category"},_value_:{type:"linear"}}});oe=class extends gt{constructor(t,e){super(t,e),this.innerRadius=void 0,this.outerRadius=void 0}getLabelAndValue(t){let e=this._cachedMeta,n=this.chart,s=n.data.labels||[],o=Me(e._parsed[t].r,n.options.locale);return{label:s[t]||"",value:o}}parseObjectData(t,e,n,s){return ds.bind(this)(t,e,n,s)}update(t){let e=this._cachedMeta.data;this._updateRadius(),this.updateElements(e,0,e.length,t)}getMinMax(){let t=this._cachedMeta,e={min:Number.POSITIVE_INFINITY,max:Number.NEGATIVE_INFINITY};return t.data.forEach((n,s)=>{let o=this.getParsed(s).r;!isNaN(o)&&this.chart.getDataVisibility(s)&&(o<e.min&&(e.min=o),o>e.max&&(e.max=o))}),e}_updateRadius(){let t=this.chart,e=t.chartArea,n=t.options,s=Math.min(e.right-e.left,e.bottom-e.top),o=Math.max(s/2,0),r=Math.max(n.cutoutPercentage?o/100*n.cutoutPercentage:1,0),a=(o-r)/t.getVisibleDatasetCount();this.outerRadius=o-a*this.index,this.innerRadius=this.outerRadius-a}updateElements(t,e,n,s){let o=s==="reset",r=this.chart,l=r.options.animation,c=this._cachedMeta.rScale,d=c.xCenter,u=c.yCenter,h=c.getIndexAngle(0)-.5*F,f=h,g,p=360/this.countVisibleElements();for(g=0;g<e;++g)f+=this._computeAngle(g,s,p);for(g=e;g<e+n;g++){let m=t[g],b=f,y=f+this._computeAngle(g,s,p),_=r.getDataVisibility(g)?c.getDistanceFromCenterForValue(this.getParsed(g).r):0;f=y,o&&(l.animateScale&&(_=0),l.animateRotate&&(b=y=h));let v={x:d,y:u,innerRadius:0,outerRadius:_,startAngle:b,endAngle:y,options:this.resolveDataElementOptions(g,m.active?"active":s)};this.updateElement(m,g,v,s)}}countVisibleElements(){let t=this._cachedMeta,e=0;return t.data.forEach((n,s)=>{!isNaN(this.getParsed(s).r)&&this.chart.getDataVisibility(s)&&e++}),e}_computeAngle(t,e,n){return this.chart.getDataVisibility(t)?bt(this.resolveDataElementOptions(t,e).angle||n):0}};M(oe,"id","polarArea"),M(oe,"defaults",{dataElementType:"arc",animation:{animateRotate:!0,animateScale:!0},animations:{numbers:{type:"number",properties:["x","y","startAngle","endAngle","innerRadius","outerRadius"]}},indexAxis:"r",startAngle:0}),M(oe,"overrides",{aspectRatio:1,plugins:{legend:{labels:{generateLabels(t){let e=t.data;if(e.labels.length&&e.datasets.length){let{labels:{pointStyle:n,color:s}}=t.legend.options;return e.labels.map((o,r)=>{let l=t.getDatasetMeta(0).controller.getStyle(r);return{text:o,fillStyle:l.backgroundColor,strokeStyle:l.borderColor,fontColor:s,lineWidth:l.borderWidth,pointStyle:n,hidden:!t.getDataVisibility(r),index:r}})}return[]}},onClick(t,e,n){n.chart.toggleDataVisibility(e.index),n.chart.update()}}},scales:{r:{type:"radialLinear",angleLines:{display:!1},beginAtZero:!0,grid:{circular:!0},pointLabels:{display:!1},startAngle:0}}});si=class extends It{};M(si,"id","pie"),M(si,"defaults",{cutout:0,rotation:0,circumference:360,radius:"100%"});Le=class extends gt{getLabelAndValue(t){let e=this._cachedMeta.vScale,n=this.getParsed(t);return{label:e.getLabels()[t],value:""+e.getLabelForValue(n[e.axis])}}parseObjectData(t,e,n,s){return ds.bind(this)(t,e,n,s)}update(t){let e=this._cachedMeta,n=e.dataset,s=e.data||[],o=e.iScale.getLabels();if(n.points=s,t!=="resize"){let r=this.resolveDatasetElementOptions(t);this.options.showLine||(r.borderWidth=0);let a={_loop:!0,_fullLoop:o.length===s.length,options:r};this.updateElement(n,void 0,a,t)}this.updateElements(s,0,s.length,t)}updateElements(t,e,n,s){let o=this._cachedMeta.rScale,r=s==="reset";for(let a=e;a<e+n;a++){let l=t[a],c=this.resolveDataElementOptions(a,l.active?"active":s),d=o.getPointPositionForValue(a,this.getParsed(a).r),u=r?o.xCenter:d.x,h=r?o.yCenter:d.y,f={x:u,y:h,angle:d.angle,skip:isNaN(u)||isNaN(h),options:c};this.updateElement(l,a,f,s)}}};M(Le,"id","radar"),M(Le,"defaults",{datasetElementType:"line",dataElementType:"point",indexAxis:"r",showLine:!0,elements:{line:{fill:"start"}}}),M(Le,"overrides",{aspectRatio:1,scales:{r:{type:"radialLinear"}}});De=class extends gt{getLabelAndValue(t){let e=this._cachedMeta,n=this.chart.data.labels||[],{xScale:s,yScale:o}=e,r=this.getParsed(t),a=s.getLabelForValue(r.x),l=o.getLabelForValue(r.y);return{label:n[t]||"",value:"("+a+", "+l+")"}}update(t){let e=this._cachedMeta,{data:n=[]}=e,s=this.chart._animationsDisabled,{start:o,count:r}=ts(e,n,s);if(this._drawStart=o,this._drawCount=r,es(e)&&(o=0,r=n.length),this.options.showLine){this.datasetElementType||this.addElements();let{dataset:a,_dataset:l}=e;a._chart=this.chart,a._datasetIndex=this.index,a._decimated=!!l._decimated,a.points=n;let c=this.resolveDatasetElementOptions(t);c.segment=this.options.segment,this.updateElement(a,void 0,{animated:!s,options:c},t)}else this.datasetElementType&&(delete e.dataset,this.datasetElementType=!1);this.updateElements(n,o,r,t)}addElements(){let{showLine:t}=this.options;!this.datasetElementType&&t&&(this.datasetElementType=this.chart.registry.getElement("line")),super.addElements()}updateElements(t,e,n,s){let o=s==="reset",{iScale:r,vScale:a,_stacked:l,_dataset:c}=this._cachedMeta,d=this.resolveDataElementOptions(e,s),u=this.getSharedOptions(d),h=this.includeOptions(s,u),f=r.axis,g=a.axis,{spanGaps:p,segment:m}=this.options,b=Qt(p)?p:Number.POSITIVE_INFINITY,y=this.chart._animationsDisabled||o||s==="none",_=e>0&&this.getParsed(e-1);for(let v=e;v<e+n;++v){let x=t[v],S=this.getParsed(v),k=y?x:{},T=P(S[g]),w=k[f]=r.getPixelForValue(S[f],v),L=k[g]=o||T?a.getBasePixel():a.getPixelForValue(l?this.applyStack(a,S,l):S[g],v);k.skip=isNaN(w)||isNaN(L)||T,k.stop=v>0&&Math.abs(S[f]-_[f])>b,m&&(k.parsed=S,k.raw=c.data[v]),h&&(k.options=u||this.resolveDataElementOptions(v,x.active?"active":s)),y||this.updateElement(x,v,k,s),_=S}this.updateSharedOptions(u,s,d)}getMaxOverflow(){let t=this._cachedMeta,e=t.data||[];if(!this.options.showLine){let a=0;for(let l=e.length-1;l>=0;--l)a=Math.max(a,e[l].size(this.resolveDataElementOptions(l))/2);return a>0&&a}let n=t.dataset,s=n.options&&n.options.borderWidth||0;if(!e.length)return s;let o=e[0].size(this.resolveDataElementOptions(0)),r=e[e.length-1].size(this.resolveDataElementOptions(e.length-1));return Math.max(s,o,r)/2}};M(De,"id","scatter"),M(De,"defaults",{datasetElementType:!1,dataElementType:"point",showLine:!1,fill:!1}),M(De,"overrides",{interaction:{mode:"point"},scales:{x:{type:"linear"},y:{type:"linear"}}});oh=Object.freeze({__proto__:null,BarController:we,BubbleController:Ce,DoughnutController:It,LineController:Ee,PieController:si,PolarAreaController:oe,RadarController:Le,ScatterController:De});As=class i{constructor(t){M(this,"options");this.options=t||{}}static override(t){Object.assign(i.prototype,t)}init(){}formats(){return ee()}parse(){return ee()}format(){return ee()}add(){return ee()}diff(){return ee()}startOf(){return ee()}endOf(){return ee()}},rh={_date:As};uh={evaluateInteractionItems:pi,modes:{index(i,t,e,n){let s=jt(t,i),o=e.axis||"x",r=e.includeInvisible||!1,a=e.intersect?Ms(i,s,o,n,r):Ss(i,s,o,!1,n,r),l=[];return a.length?(i.getSortedVisibleDatasetMetas().forEach(c=>{let d=a[0].index,u=c.data[d];u&&!u.skip&&l.push({element:u,datasetIndex:c.index,index:d})}),l):[]},dataset(i,t,e,n){let s=jt(t,i),o=e.axis||"xy",r=e.includeInvisible||!1,a=e.intersect?Ms(i,s,o,n,r):Ss(i,s,o,!1,n,r);if(a.length>0){let l=a[0].datasetIndex,c=i.getDatasetMeta(l).data;a=[];for(let d=0;d<c.length;++d)a.push({element:c[d],datasetIndex:l,index:d})}return a},point(i,t,e,n){let s=jt(t,i),o=e.axis||"xy",r=e.includeInvisible||!1;return Ms(i,s,o,n,r)},nearest(i,t,e,n){let s=jt(t,i),o=e.axis||"xy",r=e.includeInvisible||!1;return Ss(i,s,o,e.intersect,n,r)},x(i,t,e,n){let s=jt(t,i);return ra(i,s,"x",e.intersect,n)},y(i,t,e,n){let s=jt(t,i);return ra(i,s,"y",e.intersect,n)}}},Za=["left","top","right","bottom"];ot={addBox(i,t){i.boxes||(i.boxes=[]),t.fullSize=t.fullSize||!1,t.position=t.position||"top",t.weight=t.weight||0,t._layers=t._layers||function(){return[{z:0,draw(e){t.draw(e)}}]},i.boxes.push(t)},removeBox(i,t){let e=i.boxes?i.boxes.indexOf(t):-1;e!==-1&&i.boxes.splice(e,1)},configure(i,t,e){t.fullSize=e.fullSize,t.position=e.position,t.weight=e.weight},update(i,t,e,n){if(!i)return;let s=it(i.options.layout.padding),o=Math.max(t-s.width,0),r=Math.max(e-s.height,0),a=ph(i.boxes),l=a.vertical,c=a.horizontal;H(i.boxes,p=>{typeof p.beforeLayout=="function"&&p.beforeLayout()});let d=l.reduce((p,m)=>m.box.options&&m.box.options.display===!1?p:p+1,0)||1,u=Object.freeze({outerWidth:t,outerHeight:e,padding:s,availableWidth:o,availableHeight:r,vBoxMaxWidth:o/2/d,hBoxMaxHeight:r/2}),h=Object.assign({},s);Qa(h,it(n));let f=Object.assign({maxPadding:h,w:o,h:r,x:s.left,y:s.top},s),g=gh(l.concat(c),u);oi(a.fullSize,f,u,g),oi(l,f,u,g),oi(c,f,u,g)&&oi(l,f,u,g),bh(f),ca(a.leftAndTop,f,u,g),f.x+=f.w,f.y+=f.h,ca(a.rightAndBottom,f,u,g),i.chartArea={left:f.left,top:f.top,right:f.left+f.w,bottom:f.top+f.h,height:f.h,width:f.w},H(a.chartArea,p=>{let m=p.box;Object.assign(m,i.chartArea),m.update(f.w,f.h,{left:0,top:0,right:0,bottom:0})})}},ln=class{acquireContext(t,e){}releaseContext(t){return!1}addEventListener(t,e,n){}removeEventListener(t,e,n){}getDevicePixelRatio(){return 1}getMaximumSize(t,e,n,s){return e=Math.max(0,e||t.width),n=n||t.height,{width:e,height:Math.max(0,s?Math.floor(e/s):n)}}isAttached(t){return!0}updateConfig(t){}},Ps=class extends ln{acquireContext(t){return t&&t.getContext&&t.getContext("2d")||null}updateConfig(t){t.options.animation=!1}},on="$chartjs",xh={touchstart:"mousedown",touchmove:"mousemove",touchend:"mouseup",pointerenter:"mouseenter",pointerdown:"mousedown",pointermove:"mousemove",pointerup:"mouseup",pointerleave:"mouseout",pointerout:"mouseout"},da=i=>i===null||i==="";tl=qr?{passive:!0}:!1;hi=new Map,ua=0;Rs=class extends ln{acquireContext(t,e){let n=t&&t.getContext&&t.getContext("2d");return n&&n.canvas===t?(_h(t,e),n):null}releaseContext(t){let e=t.canvas;if(!e[on])return!1;let n=e[on].initial;["height","width"].forEach(o=>{let r=n[o];P(r)?e.removeAttribute(o):e.setAttribute(o,r)});let s=n.style||{};return Object.keys(s).forEach(o=>{e.style[o]=s[o]}),e.width=e.width,delete e[on],!0}addEventListener(t,e,n){this.removeEventListener(t,e);let s=t.$proxies||(t.$proxies={}),r={attach:kh,detach:Th,resize:Eh}[e]||Lh;s[e]=r(t,e,n)}removeEventListener(t,e){let n=t.$proxies||(t.$proxies={}),s=n[e];if(!s)return;({attach:ks,detach:ks,resize:ks}[e]||Mh)(t,e,s),n[e]=void 0}getDevicePixelRatio(){return window.devicePixelRatio}getMaximumSize(t,e,n,s){return jr(t,e,n,s)}isAttached(t){let e=t&&Xi(t);return!!(e&&e.isConnected)}};pt=class{constructor(){M(this,"x");M(this,"y");M(this,"active",!1);M(this,"options");M(this,"$animations")}tooltipPosition(t){let{x:e,y:n}=this.getProps(["x","y"],t);return{x:e,y:n}}hasValue(){return Qt(this.x)&&Qt(this.y)}getProps(t,e){let n=this.$animations;if(!e||!n)return this;let s={};return t.forEach(o=>{s[o]=n[o]&&n[o].active()?n[o]._to:this[o]}),s}};M(pt,"defaults",{}),M(pt,"defaultRoutes");$h=i=>i==="left"?"right":i==="right"?"left":i,ha=(i,t,e)=>t==="top"||t==="left"?i[t]+e:i[t]-e,fa=(i,t)=>Math.min(t||i,i);ae=class i extends pt{constructor(t){super(),this.id=t.id,this.type=t.type,this.options=void 0,this.ctx=t.ctx,this.chart=t.chart,this.top=void 0,this.bottom=void 0,this.left=void 0,this.right=void 0,this.width=void 0,this.height=void 0,this._margins={left:0,right:0,top:0,bottom:0},this.maxWidth=void 0,this.maxHeight=void 0,this.paddingTop=void 0,this.paddingBottom=void 0,this.paddingLeft=void 0,this.paddingRight=void 0,this.axis=void 0,this.labelRotation=void 0,this.min=void 0,this.max=void 0,this._range=void 0,this.ticks=[],this._gridLineItems=null,this._labelItems=null,this._labelSizes=null,this._length=0,this._maxLength=0,this._longestTextCache={},this._startPixel=void 0,this._endPixel=void 0,this._reversePixels=!1,this._userMax=void 0,this._userMin=void 0,this._suggestedMax=void 0,this._suggestedMin=void 0,this._ticksLength=0,this._borderValue=0,this._cache={},this._dataLimitsCached=!1,this.$context=void 0}init(t){this.options=t.setContext(this.getContext()),this.axis=t.axis,this._userMin=this.parse(t.min),this._userMax=this.parse(t.max),this._suggestedMin=this.parse(t.suggestedMin),this._suggestedMax=this.parse(t.suggestedMax)}parse(t,e){return t}getUserBounds(){let{_userMin:t,_userMax:e,_suggestedMin:n,_suggestedMax:s}=this;return t=ct(t,Number.POSITIVE_INFINITY),e=ct(e,Number.NEGATIVE_INFINITY),n=ct(n,Number.POSITIVE_INFINITY),s=ct(s,Number.NEGATIVE_INFINITY),{min:ct(t,n),max:ct(e,s),minDefined:Y(t),maxDefined:Y(e)}}getMinMax(t){let{min:e,max:n,minDefined:s,maxDefined:o}=this.getUserBounds(),r;if(s&&o)return{min:e,max:n};let a=this.getMatchingVisibleMetas();for(let l=0,c=a.length;l<c;++l)r=a[l].controller.getMinMax(this,t),s||(e=Math.min(e,r.min)),o||(n=Math.max(n,r.max));return e=o&&e>n?n:e,n=s&&e>n?e:n,{min:ct(e,ct(n,e)),max:ct(n,ct(e,n))}}getPadding(){return{left:this.paddingLeft||0,top:this.paddingTop||0,right:this.paddingRight||0,bottom:this.paddingBottom||0}}getTicks(){return this.ticks}getLabels(){let t=this.chart.data;return this.options.labels||(this.isHorizontal()?t.xLabels:t.yLabels)||t.labels||[]}getLabelItems(t=this.chart.chartArea){return this._labelItems||(this._labelItems=this._computeLabelItems(t))}beforeLayout(){this._cache={},this._dataLimitsCached=!1}beforeUpdate(){W(this.options.beforeUpdate,[this])}update(t,e,n){let{beginAtZero:s,grace:o,ticks:r}=this.options,a=r.sampleSize;this.beforeUpdate(),this.maxWidth=t,this.maxHeight=e,this._margins=n=Object.assign({left:0,right:0,top:0,bottom:0},n),this.ticks=null,this._labelSizes=null,this._gridLineItems=null,this._labelItems=null,this.beforeSetDimensions(),this.setDimensions(),this.afterSetDimensions(),this._maxLength=this.isHorizontal()?this.width+n.left+n.right:this.height+n.top+n.bottom,this._dataLimitsCached||(this.beforeDataLimits(),this.determineDataLimits(),this.afterDataLimits(),this._range=Hr(this,o,s),this._dataLimitsCached=!0),this.beforeBuildTicks(),this.ticks=this.buildTicks()||[],this.afterBuildTicks();let l=a<this.ticks.length;this._convertTicksToLabels(l?ga(this.ticks,a):this.ticks),this.configure(),this.beforeCalculateLabelRotation(),this.calculateLabelRotation(),this.afterCalculateLabelRotation(),r.display&&(r.autoSkip||r.source==="auto")&&(this.ticks=Ah(this,this.ticks),this._labelSizes=null,this.afterAutoSkip()),l&&this._convertTicksToLabels(this.ticks),this.beforeFit(),this.fit(),this.afterFit(),this.afterUpdate()}configure(){let t=this.options.reverse,e,n;this.isHorizontal()?(e=this.left,n=this.right):(e=this.top,n=this.bottom,t=!t),this._startPixel=e,this._endPixel=n,this._reversePixels=t,this._length=n-e,this._alignToPixels=this.options.alignToPixels}afterUpdate(){W(this.options.afterUpdate,[this])}beforeSetDimensions(){W(this.options.beforeSetDimensions,[this])}setDimensions(){this.isHorizontal()?(this.width=this.maxWidth,this.left=0,this.right=this.width):(this.height=this.maxHeight,this.top=0,this.bottom=this.height),this.paddingLeft=0,this.paddingTop=0,this.paddingRight=0,this.paddingBottom=0}afterSetDimensions(){W(this.options.afterSetDimensions,[this])}_callHooks(t){this.chart.notifyPlugins(t,this.getContext()),W(this.options[t],[this])}beforeDataLimits(){this._callHooks("beforeDataLimits")}determineDataLimits(){}afterDataLimits(){this._callHooks("afterDataLimits")}beforeBuildTicks(){this._callHooks("beforeBuildTicks")}buildTicks(){return[]}afterBuildTicks(){this._callHooks("afterBuildTicks")}beforeTickToLabelConversion(){W(this.options.beforeTickToLabelConversion,[this])}generateTickLabels(t){let e=this.options.ticks,n,s,o;for(n=0,s=t.length;n<s;n++)o=t[n],o.label=W(e.callback,[o.value,n,t],this)}afterTickToLabelConversion(){W(this.options.afterTickToLabelConversion,[this])}beforeCalculateLabelRotation(){W(this.options.beforeCalculateLabelRotation,[this])}calculateLabelRotation(){let t=this.options,e=t.ticks,n=fa(this.ticks.length,t.ticks.maxTicksLimit),s=e.minRotation||0,o=e.maxRotation,r=s,a,l,c;if(!this._isVisible()||!e.display||s>=o||n<=1||!this.isHorizontal()){this.labelRotation=s;return}let d=this._getLabelSizes(),u=d.widest.width,h=d.highest.height,f=Z(this.chart.width-u,0,this.maxWidth);a=t.offset?this.maxWidth/n:f/(n-1),u+6>a&&(a=f/(n-(t.offset?.5:1)),l=this.maxHeight-ii(t.grid)-e.padding-pa(t.title,this.chart.options.font),c=Math.sqrt(u*u+h*h),r=Ni(Math.min(Math.asin(Z((d.highest.height+6)/a,-1,1)),Math.asin(Z(l/c,-1,1))-Math.asin(Z(h/c,-1,1)))),r=Math.max(s,Math.min(o,r))),this.labelRotation=r}afterCalculateLabelRotation(){W(this.options.afterCalculateLabelRotation,[this])}afterAutoSkip(){}beforeFit(){W(this.options.beforeFit,[this])}fit(){let t={width:0,height:0},{chart:e,options:{ticks:n,title:s,grid:o}}=this,r=this._isVisible(),a=this.isHorizontal();if(r){let l=pa(s,e.options.font);if(a?(t.width=this.maxWidth,t.height=ii(o)+l):(t.height=this.maxHeight,t.width=ii(o)+l),n.display&&this.ticks.length){let{first:c,last:d,widest:u,highest:h}=this._getLabelSizes(),f=n.padding*2,g=bt(this.labelRotation),p=Math.cos(g),m=Math.sin(g);if(a){let b=n.mirror?0:m*u.width+p*h.height;t.height=Math.min(this.maxHeight,t.height+b+f)}else{let b=n.mirror?0:p*u.width+m*h.height;t.width=Math.min(this.maxWidth,t.width+b+f)}this._calculatePadding(c,d,m,p)}}this._handleMargins(),a?(this.width=this._length=e.width-this._margins.left-this._margins.right,this.height=t.height):(this.width=t.width,this.height=this._length=e.height-this._margins.top-this._margins.bottom)}_calculatePadding(t,e,n,s){let{ticks:{align:o,padding:r},position:a}=this.options,l=this.labelRotation!==0,c=a!=="top"&&this.axis==="x";if(this.isHorizontal()){let d=this.getPixelForTick(0)-this.left,u=this.right-this.getPixelForTick(this.ticks.length-1),h=0,f=0;l?c?(h=s*t.width,f=n*e.height):(h=n*t.height,f=s*e.width):o==="start"?f=e.width:o==="end"?h=t.width:o!=="inner"&&(h=t.width/2,f=e.width/2),this.paddingLeft=Math.max((h-d+r)*this.width/(this.width-d),0),this.paddingRight=Math.max((f-u+r)*this.width/(this.width-u),0)}else{let d=e.height/2,u=t.height/2;o==="start"?(d=0,u=t.height):o==="end"&&(d=e.height,u=0),this.paddingTop=d+r,this.paddingBottom=u+r}}_handleMargins(){this._margins&&(this._margins.left=Math.max(this.paddingLeft,this._margins.left),this._margins.top=Math.max(this.paddingTop,this._margins.top),this._margins.right=Math.max(this.paddingRight,this._margins.right),this._margins.bottom=Math.max(this.paddingBottom,this._margins.bottom))}afterFit(){W(this.options.afterFit,[this])}isHorizontal(){let{axis:t,position:e}=this.options;return e==="top"||e==="bottom"||t==="x"}isFullSize(){return this.options.fullSize}_convertTicksToLabels(t){this.beforeTickToLabelConversion(),this.generateTickLabels(t);let e,n;for(e=0,n=t.length;e<n;e++)P(t[e].label)&&(t.splice(e,1),n--,e--);this.afterTickToLabelConversion()}_getLabelSizes(){let t=this._labelSizes;if(!t){let e=this.options.ticks.sampleSize,n=this.ticks;e<n.length&&(n=ga(n,e)),this._labelSizes=t=this._computeLabelSizes(n,n.length,this.options.ticks.maxTicksLimit)}return t}_computeLabelSizes(t,e,n){let{ctx:s,_longestTextCache:o}=this,r=[],a=[],l=Math.floor(e/fa(e,n)),c=0,d=0,u,h,f,g,p,m,b,y,_,v,x;for(u=0;u<e;u+=l){if(g=t[u].label,p=this._resolveTickFontOptions(u),s.font=m=p.string,b=o[m]=o[m]||{data:{},gc:[]},y=p.lineHeight,_=v=0,!P(g)&&!N(g))_=Ke(s,b.data,b.gc,_,g),v=y;else if(N(g))for(h=0,f=g.length;h<f;++h)x=g[h],!P(x)&&!N(x)&&(_=Ke(s,b.data,b.gc,_,x),v+=y);r.push(_),a.push(v),c=Math.max(_,c),d=Math.max(v,d)}zh(o,e);let S=r.indexOf(c),k=a.indexOf(d),T=w=>({width:r[w]||0,height:a[w]||0});return{first:T(0),last:T(e-1),widest:T(S),highest:T(k),widths:r,heights:a}}getLabelForValue(t){return t}getPixelForValue(t,e){return NaN}getValueForPixel(t){}getPixelForTick(t){let e=this.ticks;return t<0||t>e.length-1?null:this.getPixelForValue(e[t].value)}getPixelForDecimal(t){this._reversePixels&&(t=1-t);let e=this._startPixel+t*this._length;return Cr(this._alignToPixels?Wt(this.chart,e,0):e)}getDecimalForPixel(t){let e=(t-this._startPixel)/this._length;return this._reversePixels?1-e:e}getBasePixel(){return this.getPixelForValue(this.getBaseValue())}getBaseValue(){let{min:t,max:e}=this;return t<0&&e<0?e:t>0&&e>0?t:0}getContext(t){let e=this.ticks||[];if(t>=0&&t<e.length){let n=e[t];return n.$context||(n.$context=Wh(this.getContext(),t,n))}return this.$context||(this.$context=Bh(this.chart.getContext(),this))}_tickSize(){let t=this.options.ticks,e=bt(this.labelRotation),n=Math.abs(Math.cos(e)),s=Math.abs(Math.sin(e)),o=this._getLabelSizes(),r=t.autoSkipPadding||0,a=o?o.widest.width+r:0,l=o?o.highest.height+r:0;return this.isHorizontal()?l*n>a*s?a/n:l/s:l*s<a*n?l/n:a/s}_isVisible(){let t=this.options.display;return t!=="auto"?!!t:this.getMatchingVisibleMetas().length>0}_computeGridLineItems(t){let e=this.axis,n=this.chart,s=this.options,{grid:o,position:r,border:a}=s,l=o.offset,c=this.isHorizontal(),u=this.ticks.length+(l?1:0),h=ii(o),f=[],g=a.setContext(this.getContext()),p=g.display?g.width:0,m=p/2,b=function(q){return Wt(n,q,p)},y,_,v,x,S,k,T,w,L,D,I,Q;if(r==="top")y=b(this.bottom),k=this.bottom-h,w=y-m,D=b(t.top)+m,Q=t.bottom;else if(r==="bottom")y=b(this.top),D=t.top,Q=b(t.bottom)-m,k=y+m,w=this.top+h;else if(r==="left")y=b(this.right),S=this.right-h,T=y-m,L=b(t.left)+m,I=t.right;else if(r==="right")y=b(this.left),L=t.left,I=b(t.right)-m,S=y+m,T=this.left+h;else if(e==="x"){if(r==="center")y=b((t.top+t.bottom)/2+.5);else if(O(r)){let q=Object.keys(r)[0],X=r[q];y=b(this.chart.scales[q].getPixelForValue(X))}D=t.top,Q=t.bottom,k=y+m,w=k+h}else if(e==="y"){if(r==="center")y=b((t.left+t.right)/2);else if(O(r)){let q=Object.keys(r)[0],X=r[q];y=b(this.chart.scales[q].getPixelForValue(X))}S=y-m,T=S-h,L=t.left,I=t.right}let ht=C(s.ticks.maxTicksLimit,u),B=Math.max(1,Math.ceil(u/ht));for(_=0;_<u;_+=B){let q=this.getContext(_),X=o.setContext(q),yt=a.setContext(q),nt=X.lineWidth,ce=X.color,xi=yt.dash||[],de=yt.dashOffset,Fe=X.tickWidth,Yt=X.tickColor,$e=X.tickBorderDash||[],Ut=X.tickBorderDashOffset;v=Hh(this,_,l),v!==void 0&&(x=Wt(n,v,nt),c?S=T=L=I=x:k=w=D=Q=x,f.push({tx1:S,ty1:k,tx2:T,ty2:w,x1:L,y1:D,x2:I,y2:Q,width:nt,color:ce,borderDash:xi,borderDashOffset:de,tickWidth:Fe,tickColor:Yt,tickBorderDash:$e,tickBorderDashOffset:Ut}))}return this._ticksLength=u,this._borderValue=y,f}_computeLabelItems(t){let e=this.axis,n=this.options,{position:s,ticks:o}=n,r=this.isHorizontal(),a=this.ticks,{align:l,crossAlign:c,padding:d,mirror:u}=o,h=ii(n.grid),f=h+d,g=u?-d:f,p=-bt(this.labelRotation),m=[],b,y,_,v,x,S,k,T,w,L,D,I,Q="middle";if(s==="top")S=this.bottom-g,k=this._getXAxisLabelAlignment();else if(s==="bottom")S=this.top+g,k=this._getXAxisLabelAlignment();else if(s==="left"){let B=this._getYAxisLabelAlignment(h);k=B.textAlign,x=B.x}else if(s==="right"){let B=this._getYAxisLabelAlignment(h);k=B.textAlign,x=B.x}else if(e==="x"){if(s==="center")S=(t.top+t.bottom)/2+f;else if(O(s)){let B=Object.keys(s)[0],q=s[B];S=this.chart.scales[B].getPixelForValue(q)+f}k=this._getXAxisLabelAlignment()}else if(e==="y"){if(s==="center")x=(t.left+t.right)/2-f;else if(O(s)){let B=Object.keys(s)[0],q=s[B];x=this.chart.scales[B].getPixelForValue(q)}k=this._getYAxisLabelAlignment(h).textAlign}e==="y"&&(l==="start"?Q="top":l==="end"&&(Q="bottom"));let ht=this._getLabelSizes();for(b=0,y=a.length;b<y;++b){_=a[b],v=_.label;let B=o.setContext(this.getContext(b));T=this.getPixelForTick(b)+o.labelOffset,w=this._resolveTickFontOptions(b),L=w.lineHeight,D=N(v)?v.length:1;let q=D/2,X=B.color,yt=B.textStrokeColor,nt=B.textStrokeWidth,ce=k;r?(x=T,k==="inner"&&(b===y-1?ce=this.options.reverse?"left":"right":b===0?ce=this.options.reverse?"right":"left":ce="center"),s==="top"?c==="near"||p!==0?I=-D*L+L/2:c==="center"?I=-ht.highest.height/2-q*L+L:I=-ht.highest.height+L/2:c==="near"||p!==0?I=L/2:c==="center"?I=ht.highest.height/2-q*L:I=ht.highest.height-D*L,u&&(I*=-1),p!==0&&!B.showLabelBackdrop&&(x+=L/2*Math.sin(p))):(S=T,I=(1-D)*L/2);let xi;if(B.showLabelBackdrop){let de=it(B.backdropPadding),Fe=ht.heights[b],Yt=ht.widths[b],$e=I-de.top,Ut=0-de.left;switch(Q){case"middle":$e-=Fe/2;break;case"bottom":$e-=Fe;break}switch(k){case"center":Ut-=Yt/2;break;case"right":Ut-=Yt;break;case"inner":b===y-1?Ut-=Yt:b>0&&(Ut-=Yt/2);break}xi={left:Ut,top:$e,width:Yt+de.width,height:Fe+de.height,color:B.backdropColor}}m.push({label:v,font:w,textOffset:I,options:{rotation:p,color:X,strokeColor:yt,strokeWidth:nt,textAlign:ce,textBaseline:Q,translation:[x,S],backdrop:xi}})}return m}_getXAxisLabelAlignment(){let{position:t,ticks:e}=this.options;if(-bt(this.labelRotation))return t==="top"?"left":"right";let s="center";return e.align==="start"?s="left":e.align==="end"?s="right":e.align==="inner"&&(s="inner"),s}_getYAxisLabelAlignment(t){let{position:e,ticks:{crossAlign:n,mirror:s,padding:o}}=this.options,r=this._getLabelSizes(),a=t+o,l=r.widest.width,c,d;return e==="left"?s?(d=this.right+o,n==="near"?c="left":n==="center"?(c="center",d+=l/2):(c="right",d+=l)):(d=this.right-a,n==="near"?c="right":n==="center"?(c="center",d-=l/2):(c="left",d=this.left)):e==="right"?s?(d=this.left+o,n==="near"?c="right":n==="center"?(c="center",d-=l/2):(c="left",d-=l)):(d=this.left+a,n==="near"?c="left":n==="center"?(c="center",d+=l/2):(c="right",d=this.right)):c="right",{textAlign:c,x:d}}_computeLabelArea(){if(this.options.ticks.mirror)return;let t=this.chart,e=this.options.position;if(e==="left"||e==="right")return{top:0,left:this.left,bottom:t.height,right:this.right};if(e==="top"||e==="bottom")return{top:this.top,left:0,bottom:this.bottom,right:t.width}}drawBackground(){let{ctx:t,options:{backgroundColor:e},left:n,top:s,width:o,height:r}=this;e&&(t.save(),t.fillStyle=e,t.fillRect(n,s,o,r),t.restore())}getLineWidthForValue(t){let e=this.options.grid;if(!this._isVisible()||!e.display)return 0;let s=this.ticks.findIndex(o=>o.value===t);return s>=0?e.setContext(this.getContext(s)).lineWidth:0}drawGrid(t){let e=this.options.grid,n=this.ctx,s=this._gridLineItems||(this._gridLineItems=this._computeGridLineItems(t)),o,r,a=(l,c,d)=>{!d.width||!d.color||(n.save(),n.lineWidth=d.width,n.strokeStyle=d.color,n.setLineDash(d.borderDash||[]),n.lineDashOffset=d.borderDashOffset,n.beginPath(),n.moveTo(l.x,l.y),n.lineTo(c.x,c.y),n.stroke(),n.restore())};if(e.display)for(o=0,r=s.length;o<r;++o){let l=s[o];e.drawOnChartArea&&a({x:l.x1,y:l.y1},{x:l.x2,y:l.y2},l),e.drawTicks&&a({x:l.tx1,y:l.ty1},{x:l.tx2,y:l.ty2},{color:l.tickColor,width:l.tickWidth,borderDash:l.tickBorderDash,borderDashOffset:l.tickBorderDashOffset})}}drawBorder(){let{chart:t,ctx:e,options:{border:n,grid:s}}=this,o=n.setContext(this.getContext()),r=n.display?o.width:0;if(!r)return;let a=s.setContext(this.getContext(0)).lineWidth,l=this._borderValue,c,d,u,h;this.isHorizontal()?(c=Wt(t,this.left,r)-r/2,d=Wt(t,this.right,a)+a/2,u=h=l):(u=Wt(t,this.top,r)-r/2,h=Wt(t,this.bottom,a)+a/2,c=d=l),e.save(),e.lineWidth=o.width,e.strokeStyle=o.color,e.beginPath(),e.moveTo(c,u),e.lineTo(d,h),e.stroke(),e.restore()}drawLabels(t){if(!this.options.ticks.display)return;let n=this.ctx,s=this._computeLabelArea();s&&Je(n,s);let o=this.getLabelItems(t);for(let r of o){let a=r.options,l=r.font,c=r.label,d=r.textOffset;Nt(n,c,0,d,l,a)}s&&Ze(n)}drawTitle(){let{ctx:t,options:{position:e,title:n,reverse:s}}=this;if(!n.display)return;let o=J(n.font),r=it(n.padding),a=n.align,l=o.lineHeight/2;e==="bottom"||e==="center"||O(e)?(l+=r.bottom,N(n.text)&&(l+=o.lineHeight*(n.text.length-1))):l+=r.top;let{titleX:c,titleY:d,maxWidth:u,rotation:h}=Vh(this,l,e,a);Nt(t,n.text,0,0,o,{color:n.color,maxWidth:u,rotation:h,textAlign:Nh(a,e,s),textBaseline:"middle",translation:[c,d]})}draw(t){this._isVisible()&&(this.drawBackground(),this.drawGrid(t),this.drawBorder(),this.drawTitle(),this.drawLabels(t))}_layers(){let t=this.options,e=t.ticks&&t.ticks.z||0,n=C(t.grid&&t.grid.z,-1),s=C(t.border&&t.border.z,0);return!this._isVisible()||this.draw!==i.prototype.draw?[{z:e,draw:o=>{this.draw(o)}}]:[{z:n,draw:o=>{this.drawBackground(),this.drawGrid(o),this.drawTitle()}},{z:s,draw:()=>{this.drawBorder()}},{z:e,draw:o=>{this.drawLabels(o)}}]}getMatchingVisibleMetas(t){let e=this.chart.getSortedVisibleDatasetMetas(),n=this.axis+"AxisID",s=[],o,r;for(o=0,r=e.length;o<r;++o){let a=e[o];a[n]===this.id&&(!t||a.type===t)&&s.push(a)}return s}_resolveTickFontOptions(t){let e=this.options.ticks.setContext(this.getContext(t));return J(e.font)}_maxDigits(){let t=this._resolveTickFontOptions(0).lineHeight;return(this.isHorizontal()?this.width:this.height)/t}},Re=class{constructor(t,e,n){this.type=t,this.scope=e,this.override=n,this.items=Object.create(null)}isForType(t){return Object.prototype.isPrototypeOf.call(this.type.prototype,t.prototype)}register(t){let e=Object.getPrototypeOf(t),n;Yh(e)&&(n=this.register(e));let s=this.items,o=t.id,r=this.scope+"."+o;if(!o)throw new Error("class does not have id: "+t);return o in s||(s[o]=t,jh(t,r,n),this.override&&j.override(t.id,t.overrides)),r}get(t){return this.items[t]}unregister(t){let e=this.items,n=t.id,s=this.scope;n in e&&delete e[n],s&&n in j[s]&&(delete j[s][n],this.override&&delete Bt[n])}};Os=class{constructor(){this.controllers=new Re(gt,"datasets",!0),this.elements=new Re(pt,"elements"),this.plugins=new Re(Object,"plugins"),this.scales=new Re(ae,"scales"),this._typedRegistries=[this.controllers,this.scales,this.elements]}add(...t){this._each("register",t)}remove(...t){this._each("unregister",t)}addControllers(...t){this._each("register",t,this.controllers)}addElements(...t){this._each("register",t,this.elements)}addPlugins(...t){this._each("register",t,this.plugins)}addScales(...t){this._each("register",t,this.scales)}getController(t){return this._get(t,this.controllers,"controller")}getElement(t){return this._get(t,this.elements,"element")}getPlugin(t){return this._get(t,this.plugins,"plugin")}getScale(t){return this._get(t,this.scales,"scale")}removeControllers(...t){this._each("unregister",t,this.controllers)}removeElements(...t){this._each("unregister",t,this.elements)}removePlugins(...t){this._each("unregister",t,this.plugins)}removeScales(...t){this._each("unregister",t,this.scales)}_each(t,e,n){[...e].forEach(s=>{let o=n||this._getRegistryForType(s);n||o.isForType(s)||o===this.plugins&&s.id?this._exec(t,o,s):H(s,r=>{let a=n||this._getRegistryForType(r);this._exec(t,a,r)})})}_exec(t,e,n){let s=Wi(t);W(n["before"+s],[],n),e[t](n),W(n["after"+s],[],n)}_getRegistryForType(t){for(let e=0;e<this._typedRegistries.length;e++){let n=this._typedRegistries[e];if(n.isForType(t))return n}return this.plugins}_get(t,e,n){let s=e.get(t);if(s===void 0)throw new Error('"'+t+'" is not a registered '+n+".");return s}},wt=new Os,Is=class{constructor(){this._init=void 0}notify(t,e,n,s){if(e==="beforeInit"&&(this._init=this._createDescriptors(t,!0),this._notify(this._init,t,"install")),this._init===void 0)return;let o=s?this._descriptors(t).filter(s):this._descriptors(t),r=this._notify(o,t,e,n);return e==="afterDestroy"&&(this._notify(o,t,"stop"),this._notify(this._init,t,"uninstall"),this._init=void 0),r}_notify(t,e,n,s){s=s||{};for(let o of t){let r=o.plugin,a=r[n],l=[e,s,o.options];if(W(a,l,r)===!1&&s.cancelable)return!1}return!0}invalidate(){P(this._cache)||(this._oldCache=this._cache,this._cache=void 0)}_descriptors(t){if(this._cache)return this._cache;let e=this._cache=this._createDescriptors(t);return this._notifyStateChanges(t),e}_createDescriptors(t,e){let n=t&&t.config,s=C(n.options&&n.options.plugins,{}),o=Uh(n);return s===!1&&!e?[]:Gh(t,o,s,e)}_notifyStateChanges(t){let e=this._oldCache||[],n=this._cache,s=(o,r)=>o.filter(a=>!r.some(l=>a.plugin.id===l.plugin.id));this._notify(s(e,n),t,"stop"),this._notify(s(n,e),t,"start")}};ya=new Map,sl=new Set;ni=(i,t,e)=>{let n=At(t,e);n!==void 0&&i.add(n)},Hs=class{constructor(t){this._config=nf(t),this._scopeCache=new Map,this._resolverCache=new Map}get platform(){return this._config.platform}get type(){return this._config.type}set type(t){this._config.type=t}get data(){return this._config.data}set data(t){this._config.data=nl(t)}get options(){return this._config.options}set options(t){this._config.options=t}get plugins(){return this._config.plugins}update(){let t=this._config;this.clearCache(),il(t)}clearCache(){this._scopeCache.clear(),this._resolverCache.clear()}datasetScopeKeys(t){return tn(t,()=>[[`datasets.${t}`,""]])}datasetAnimationScopeKeys(t,e){return tn(`${t}.transition.${e}`,()=>[[`datasets.${t}.transitions.${e}`,`transitions.${e}`],[`datasets.${t}`,""]])}datasetElementScopeKeys(t,e){return tn(`${t}-${e}`,()=>[[`datasets.${t}.elements.${e}`,`datasets.${t}`,`elements.${e}`,""]])}pluginScopeKeys(t){let e=t.id,n=this.type;return tn(`${n}-plugin-${e}`,()=>[[`plugins.${e}`,...t.additionalOptionScopes||[]]])}_cachedScopes(t,e){let n=this._scopeCache,s=n.get(t);return(!s||e)&&(s=new Map,n.set(t,s)),s}getOptionScopes(t,e,n){let{options:s,type:o}=this,r=this._cachedScopes(t,n),a=r.get(e);if(a)return a;let l=new Set;e.forEach(d=>{t&&(l.add(t),d.forEach(u=>ni(l,t,u))),d.forEach(u=>ni(l,s,u)),d.forEach(u=>ni(l,Bt[o]||{},u)),d.forEach(u=>ni(l,j,u)),d.forEach(u=>ni(l,qi,u))});let c=Array.from(l);return c.length===0&&c.push(Object.create(null)),sl.has(e)&&r.set(e,c),c}chartOptionScopes(){let{options:t,type:e}=this;return[t,Bt[e]||{},j.datasets[e]||{},{type:e},j,qi]}resolveNamedOptions(t,e,n,s=[""]){let o={$shared:!0},{resolver:r,subPrefixes:a}=xa(this._resolverCache,t,s),l=r;if(of(r,e)){o.$shared=!1,n=Lt(n)?n():n;let c=this.createResolver(t,n,a);l=Zt(r,n,c)}for(let c of e)o[c]=l[c];return o}createResolver(t,e,n=[""],s){let{resolver:o}=xa(this._resolverCache,t,n);return O(e)?Zt(o,e,void 0,s):o}};sf=i=>O(i)&&Object.getOwnPropertyNames(i).some(t=>Lt(i[t]));rf="4.5.1",af=["top","bottom","left","right","chartArea"];rn={},Sa=i=>{let t=ol(i);return Object.values(rn).filter(e=>e.canvas===t).pop()};lt=class{static register(...t){wt.add(...t),ka()}static unregister(...t){wt.remove(...t),ka()}constructor(t,e){let n=this.config=new Hs(e),s=ol(t),o=Sa(s);if(o)throw new Error("Canvas is already in use. Chart with ID '"+o.id+"' must be destroyed before the canvas with ID '"+o.canvas.id+"' can be reused.");let r=n.createResolver(n.chartOptionScopes(),this.getContext());this.platform=new(n.platform||Dh(s)),this.platform.updateConfig(n);let a=this.platform.acquireContext(s,r.aspectRatio),l=a&&a.canvas,c=l&&l.height,d=l&&l.width;if(this.id=vr(),this.ctx=a,this.canvas=l,this.width=d,this.height=c,this._options=r,this._aspectRatio=this.aspectRatio,this._layers=[],this._metasets=[],this._stacks=void 0,this.boxes=[],this.currentDevicePixelRatio=void 0,this.chartArea=void 0,this._active=[],this._lastEvent=void 0,this._listeners={},this._responsiveListeners=void 0,this._sortedMetasets=[],this.scales={},this._plugins=new Is,this.$proxies={},this._hiddenIndices={},this.attached=!1,this._animationsDisabled=void 0,this.$context=void 0,this._doResize=Pr(u=>this.update(u),r.resizeDelay||0),this._dataChanges=[],rn[this.id]=this,!a||!l){console.error("Failed to create chart: can't acquire context from the given item");return}Rt.listen(this,"complete",Ma),Rt.listen(this,"progress",lf),this._initialize(),this.attached&&this.update()}get aspectRatio(){let{options:{aspectRatio:t,maintainAspectRatio:e},width:n,height:s,_aspectRatio:o}=this;return P(t)?e&&o?o:s?n/s:null:t}get data(){return this.config.data}set data(t){this.config.data=t}get options(){return this._options}set options(t){this.config.options=t}get registry(){return wt}_initialize(){return this.notifyPlugins("beforeInit"),this.options.responsive?this.resize():us(this,this.options.devicePixelRatio),this.bindEvents(),this.notifyPlugins("afterInit"),this}clear(){return ss(this.canvas,this.ctx),this}stop(){return Rt.stop(this),this}resize(t,e){Rt.running(this)?this._resizeBeforeDraw={width:t,height:e}:this._resize(t,e)}_resize(t,e){let n=this.options,s=this.canvas,o=n.maintainAspectRatio&&this.aspectRatio,r=this.platform.getMaximumSize(s,t,e,o),a=n.devicePixelRatio||this.platform.getDevicePixelRatio(),l=this.width?"resize":"attach";this.width=r.width,this.height=r.height,this._aspectRatio=this.aspectRatio,us(this,a,!0)&&(this.notifyPlugins("resize",{size:r}),W(n.onResize,[this,r],this),this.attached&&this._doResize(l)&&this.render())}ensureScalesHaveIDs(){let e=this.options.scales||{};H(e,(n,s)=>{n.id=s})}buildOrUpdateScales(){let t=this.options,e=t.scales,n=this.scales,s=Object.keys(n).reduce((r,a)=>(r[a]=!1,r),{}),o=[];e&&(o=o.concat(Object.keys(e).map(r=>{let a=e[r],l=$s(r,a),c=l==="r",d=l==="x";return{options:a,dposition:c?"chartArea":d?"bottom":"left",dtype:c?"radialLinear":d?"category":"linear"}}))),H(o,r=>{let a=r.options,l=a.id,c=$s(l,a),d=C(a.type,r.dtype);(a.position===void 0||_a(a.position,c)!==_a(r.dposition))&&(a.position=r.dposition),s[l]=!0;let u=null;if(l in n&&n[l].type===d)u=n[l];else{let h=wt.getScale(d);u=new h({id:l,type:d,ctx:this.ctx,chart:this}),n[u.id]=u}u.init(a,t)}),H(s,(r,a)=>{r||delete n[a]}),H(n,r=>{ot.configure(this,r,r.options),ot.addBox(this,r)})}_updateMetasets(){let t=this._metasets,e=this.data.datasets.length,n=t.length;if(t.sort((s,o)=>s.index-o.index),n>e){for(let s=e;s<n;++s)this._destroyDatasetMeta(s);t.splice(e,n-e)}this._sortedMetasets=t.slice(0).sort(va("order","index"))}_removeUnreferencedMetasets(){let{_metasets:t,data:{datasets:e}}=this;t.length>e.length&&delete this._stacks,t.forEach((n,s)=>{e.filter(o=>o===n._dataset).length===0&&this._destroyDatasetMeta(s)})}buildOrUpdateControllers(){let t=[],e=this.data.datasets,n,s;for(this._removeUnreferencedMetasets(),n=0,s=e.length;n<s;n++){let o=e[n],r=this.getDatasetMeta(n),a=o.type||this.config.type;if(r.type&&r.type!==a&&(this._destroyDatasetMeta(n),r=this.getDatasetMeta(n)),r.type=a,r.indexAxis=o.indexAxis||Fs(a,this.options),r.order=o.order||0,r.index=n,r.label=""+o.label,r.visible=this.isDatasetVisible(n),r.controller)r.controller.updateIndex(n),r.controller.linkScales();else{let l=wt.getController(a),{datasetElementType:c,dataElementType:d}=j.datasets[a];Object.assign(l,{dataElementType:wt.getElement(d),datasetElementType:c&&wt.getElement(c)}),r.controller=new l(this,n),t.push(r.controller)}}return this._updateMetasets(),t}_resetElements(){H(this.data.datasets,(t,e)=>{this.getDatasetMeta(e).controller.reset()},this)}reset(){this._resetElements(),this.notifyPlugins("reset")}update(t){let e=this.config;e.update();let n=this._options=e.createResolver(e.chartOptionScopes(),this.getContext()),s=this._animationsDisabled=!n.animation;if(this._updateScales(),this._checkEventBindings(),this._updateHiddenIndices(),this._plugins.invalidate(),this.notifyPlugins("beforeUpdate",{mode:t,cancelable:!0})===!1)return;let o=this.buildOrUpdateControllers();this.notifyPlugins("beforeElementsUpdate");let r=0;for(let c=0,d=this.data.datasets.length;c<d;c++){let{controller:u}=this.getDatasetMeta(c),h=!s&&o.indexOf(u)===-1;u.buildOrUpdateElements(h),r=Math.max(+u.getMaxOverflow(),r)}r=this._minPadding=n.layout.autoPadding?r:0,this._updateLayout(r),s||H(o,c=>{c.reset()}),this._updateDatasets(t),this.notifyPlugins("afterUpdate",{mode:t}),this._layers.sort(va("z","_idx"));let{_active:a,_lastEvent:l}=this;l?this._eventHandler(l,!0):a.length&&this._updateHoverStyles(a,a,!0),this.render()}_updateScales(){H(this.scales,t=>{ot.removeBox(this,t)}),this.ensureScalesHaveIDs(),this.buildOrUpdateScales()}_checkEventBindings(){let t=this.options,e=new Set(Object.keys(this._listeners)),n=new Set(t.events);(!qn(e,n)||!!this._responsiveListeners!==t.responsive)&&(this.unbindEvents(),this.bindEvents())}_updateHiddenIndices(){let{_hiddenIndices:t}=this,e=this._getUniformDataChanges()||[];for(let{method:n,start:s,count:o}of e){let r=n==="_removeElements"?-o:o;cf(t,s,r)}}_getUniformDataChanges(){let t=this._dataChanges;if(!t||!t.length)return;this._dataChanges=[];let e=this.data.datasets.length,n=o=>new Set(t.filter(r=>r[0]===o).map((r,a)=>a+","+r.splice(1).join(","))),s=n(0);for(let o=1;o<e;o++)if(!qn(s,n(o)))return;return Array.from(s).map(o=>o.split(",")).map(o=>({method:o[1],start:+o[2],count:+o[3]}))}_updateLayout(t){if(this.notifyPlugins("beforeLayout",{cancelable:!0})===!1)return;ot.update(this,this.width,this.height,t);let e=this.chartArea,n=e.width<=0||e.height<=0;this._layers=[],H(this.boxes,s=>{n&&s.position==="chartArea"||(s.configure&&s.configure(),this._layers.push(...s._layers()))},this),this._layers.forEach((s,o)=>{s._idx=o}),this.notifyPlugins("afterLayout")}_updateDatasets(t){if(this.notifyPlugins("beforeDatasetsUpdate",{mode:t,cancelable:!0})!==!1){for(let e=0,n=this.data.datasets.length;e<n;++e)this.getDatasetMeta(e).controller.configure();for(let e=0,n=this.data.datasets.length;e<n;++e)this._updateDataset(e,Lt(t)?t({datasetIndex:e}):t);this.notifyPlugins("afterDatasetsUpdate",{mode:t})}}_updateDataset(t,e){let n=this.getDatasetMeta(t),s={meta:n,index:t,mode:e,cancelable:!0};this.notifyPlugins("beforeDatasetUpdate",s)!==!1&&(n.controller._update(e),s.cancelable=!1,this.notifyPlugins("afterDatasetUpdate",s))}render(){this.notifyPlugins("beforeRender",{cancelable:!0})!==!1&&(Rt.has(this)?this.attached&&!Rt.running(this)&&Rt.start(this):(this.draw(),Ma({chart:this})))}draw(){let t;if(this._resizeBeforeDraw){let{width:n,height:s}=this._resizeBeforeDraw;this._resizeBeforeDraw=null,this._resize(n,s)}if(this.clear(),this.width<=0||this.height<=0||this.notifyPlugins("beforeDraw",{cancelable:!0})===!1)return;let e=this._layers;for(t=0;t<e.length&&e[t].z<=0;++t)e[t].draw(this.chartArea);for(this._drawDatasets();t<e.length;++t)e[t].draw(this.chartArea);this.notifyPlugins("afterDraw")}_getSortedDatasetMetas(t){let e=this._sortedMetasets,n=[],s,o;for(s=0,o=e.length;s<o;++s){let r=e[s];(!t||r.visible)&&n.push(r)}return n}getSortedVisibleDatasetMetas(){return this._getSortedDatasetMetas(!0)}_drawDatasets(){if(this.notifyPlugins("beforeDatasetsDraw",{cancelable:!0})===!1)return;let t=this.getSortedVisibleDatasetMetas();for(let e=t.length-1;e>=0;--e)this._drawDataset(t[e]);this.notifyPlugins("afterDatasetsDraw")}_drawDataset(t){let e=this.ctx,n={meta:t,index:t.index,cancelable:!0},s=bs(this,t);this.notifyPlugins("beforeDatasetDraw",n)!==!1&&(s&&Je(e,s),t.controller.draw(),s&&Ze(e),n.cancelable=!1,this.notifyPlugins("afterDatasetDraw",n))}isPointInArea(t){return Mt(t,this.chartArea,this._minPadding)}getElementsAtEventForMode(t,e,n,s){let o=uh.modes[e];return typeof o=="function"?o(this,t,n,s):[]}getDatasetMeta(t){let e=this.data.datasets[t],n=this._metasets,s=n.filter(o=>o&&o._dataset===e).pop();return s||(s={type:null,data:[],dataset:null,controller:null,hidden:null,xAxisID:null,yAxisID:null,order:e&&e.order||0,index:t,_dataset:e,_parsed:[],_sorted:!1},n.push(s)),s}getContext(){return this.$context||(this.$context=Pt(null,{chart:this,type:"chart"}))}getVisibleDatasetCount(){return this.getSortedVisibleDatasetMetas().length}isDatasetVisible(t){let e=this.data.datasets[t];if(!e)return!1;let n=this.getDatasetMeta(t);return typeof n.hidden=="boolean"?!n.hidden:!e.hidden}setDatasetVisibility(t,e){let n=this.getDatasetMeta(t);n.hidden=!e}toggleDataVisibility(t){this._hiddenIndices[t]=!this._hiddenIndices[t]}getDataVisibility(t){return!this._hiddenIndices[t]}_updateVisibility(t,e,n){let s=n?"show":"hide",o=this.getDatasetMeta(t),r=o.controller._resolveAnimations(void 0,s);xe(e)?(o.data[e].hidden=!n,this.update()):(this.setDatasetVisibility(t,n),r.update(o,{visible:n}),this.update(a=>a.datasetIndex===t?s:void 0))}hide(t,e){this._updateVisibility(t,e,!1)}show(t,e){this._updateVisibility(t,e,!0)}_destroyDatasetMeta(t){let e=this._metasets[t];e&&e.controller&&e.controller._destroy(),delete this._metasets[t]}_stop(){let t,e;for(this.stop(),Rt.remove(this),t=0,e=this.data.datasets.length;t<e;++t)this._destroyDatasetMeta(t)}destroy(){this.notifyPlugins("beforeDestroy");let{canvas:t,ctx:e}=this;this._stop(),this.config.clearCache(),t&&(this.unbindEvents(),ss(t,e),this.platform.releaseContext(e),this.canvas=null,this.ctx=null),delete rn[this.id],this.notifyPlugins("afterDestroy")}toBase64Image(...t){return this.canvas.toDataURL(...t)}bindEvents(){this.bindUserEvents(),this.options.responsive?this.bindResponsiveEvents():this.attached=!0}bindUserEvents(){let t=this._listeners,e=this.platform,n=(o,r)=>{e.addEventListener(this,o,r),t[o]=r},s=(o,r,a)=>{o.offsetX=r,o.offsetY=a,this._eventHandler(o)};H(this.options.events,o=>n(o,s))}bindResponsiveEvents(){this._responsiveListeners||(this._responsiveListeners={});let t=this._responsiveListeners,e=this.platform,n=(l,c)=>{e.addEventListener(this,l,c),t[l]=c},s=(l,c)=>{t[l]&&(e.removeEventListener(this,l,c),delete t[l])},o=(l,c)=>{this.canvas&&this.resize(l,c)},r,a=()=>{s("attach",a),this.attached=!0,this.resize(),n("resize",o),n("detach",r)};r=()=>{this.attached=!1,s("resize",o),this._stop(),this._resize(0,0),n("attach",a)},e.isAttached(this.canvas)?a():r()}unbindEvents(){H(this._listeners,(t,e)=>{this.platform.removeEventListener(this,e,t)}),this._listeners={},H(this._responsiveListeners,(t,e)=>{this.platform.removeEventListener(this,e,t)}),this._responsiveListeners=void 0}updateHoverStyle(t,e,n){let s=n?"set":"remove",o,r,a,l;for(e==="dataset"&&(o=this.getDatasetMeta(t[0].datasetIndex),o.controller["_"+s+"DatasetHoverStyle"]()),a=0,l=t.length;a<l;++a){r=t[a];let c=r&&this.getDatasetMeta(r.datasetIndex).controller;c&&c[s+"HoverStyle"](r.element,r.datasetIndex,r.index)}}getActiveElements(){return this._active||[]}setActiveElements(t){let e=this._active||[],n=t.map(({datasetIndex:o,index:r})=>{let a=this.getDatasetMeta(o);if(!a)throw new Error("No dataset found at index "+o);return{datasetIndex:o,element:a.data[r],index:r}});!Ge(n,e)&&(this._active=n,this._lastEvent=null,this._updateHoverStyles(n,e))}notifyPlugins(t,e,n){return this._plugins.notify(this,t,e,n)}isPluginEnabled(t){return this._plugins._cache.filter(e=>e.plugin.id===t).length===1}_updateHoverStyles(t,e,n){let s=this.options.hover,o=(l,c)=>l.filter(d=>!c.some(u=>d.datasetIndex===u.datasetIndex&&d.index===u.index)),r=o(e,t),a=n?t:o(t,e);r.length&&this.updateHoverStyle(r,s.mode,!1),a.length&&s.mode&&this.updateHoverStyle(a,s.mode,!0)}_eventHandler(t,e){let n={event:t,replay:e,cancelable:!0,inChartArea:this.isPointInArea(t)},s=r=>(r.options.events||this.options.events).includes(t.native.type);if(this.notifyPlugins("beforeEvent",n,s)===!1)return;let o=this._handleEvent(t,e,n.inChartArea);return n.cancelable=!1,this.notifyPlugins("afterEvent",n,s),(o||n.changed)&&this.render(),this}_handleEvent(t,e,n){let{_active:s=[],options:o}=this,r=e,a=this._getActiveElements(t,s,n,r),l=kr(t),c=df(t,this._lastEvent,n,l);n&&(this._lastEvent=null,W(o.onHover,[t,a,this],this),l&&W(o.onClick,[t,a,this],this));let d=!Ge(a,s);return(d||e)&&(this._active=a,this._updateHoverStyles(a,s,e)),this._lastEvent=c,d}_getActiveElements(t,e,n,s){if(t.type==="mouseout")return[];if(!n)return e;let o=this.options.hover;return this.getElementsAtEventForMode(t,o.mode,o,s)}};M(lt,"defaults",j),M(lt,"instances",rn),M(lt,"overrides",Bt),M(lt,"registry",wt),M(lt,"version",rf),M(lt,"getChart",Sa);ne=class extends pt{constructor(e){super();M(this,"circumference");M(this,"endAngle");M(this,"fullCircles");M(this,"innerRadius");M(this,"outerRadius");M(this,"pixelMargin");M(this,"startAngle");this.options=void 0,this.circumference=void 0,this.startAngle=void 0,this.endAngle=void 0,this.innerRadius=void 0,this.outerRadius=void 0,this.pixelMargin=0,this.fullCircles=0,e&&Object.assign(this,e)}inRange(e,n,s){let o=this.getProps(["x","y"],s),{angle:r,distance:a}=Gn(o,{x:e,y:n}),{startAngle:l,endAngle:c,innerRadius:d,outerRadius:u,circumference:h}=this.getProps(["startAngle","endAngle","innerRadius","outerRadius","circumference"],s),f=(this.options.spacing+this.options.borderWidth)/2,g=C(h,c-l),p=ve(r,l,c)&&l!==c,m=g>=V||p,b=kt(a,d+f,u+f);return m&&b}getCenterPoint(e){let{x:n,y:s,startAngle:o,endAngle:r,innerRadius:a,outerRadius:l}=this.getProps(["x","y","startAngle","endAngle","innerRadius","outerRadius"],e),{offset:c,spacing:d}=this.options,u=(o+r)/2,h=(a+l+d+c)/2;return{x:n+Math.cos(u)*h,y:s+Math.sin(u)*h}}tooltipPosition(e){return this.getCenterPoint(e)}draw(e){let{options:n,circumference:s}=this,o=(n.offset||0)/4,r=(n.spacing||0)/2,a=n.circular;if(this.pixelMargin=n.borderAlign==="inner"?.33:0,this.fullCircles=s>V?Math.floor(s/V):0,s===0||this.innerRadius<0||this.outerRadius<0)return;e.save();let l=(this.startAngle+this.endAngle)/2;e.translate(Math.cos(l)*o,Math.sin(l)*o);let c=1-Math.sin(Math.min(F,s||0)),d=o*c;e.fillStyle=n.backgroundColor,e.strokeStyle=n.borderColor,pf(e,this,d,r,a),mf(e,this,d,r,a),e.restore()}};M(ne,"id","arc"),M(ne,"defaults",{borderAlign:"center",borderColor:"#fff",borderDash:[],borderDashOffset:0,borderJoinStyle:void 0,borderRadius:0,borderWidth:2,offset:0,spacing:0,angle:void 0,circular:!0,selfJoin:!1}),M(ne,"defaultRoutes",{backgroundColor:"backgroundColor"}),M(ne,"descriptors",{_scriptable:!0,_indexable:e=>e!=="borderDash"});kf=typeof Path2D=="function";Ct=class extends pt{constructor(t){super(),this.animated=!0,this.options=void 0,this._chart=void 0,this._loop=void 0,this._fullLoop=void 0,this._path=void 0,this._points=void 0,this._segments=void 0,this._decimated=!1,this._pointsUpdated=!1,this._datasetIndex=void 0,t&&Object.assign(this,t)}updateControlPoints(t,e){let n=this.options;if((n.tension||n.cubicInterpolationMode==="monotone")&&!n.stepped&&!this._pointsUpdated){let s=n.spanGaps?this._loop:this._fullLoop;Vr(this._points,n,t,s,e),this._pointsUpdated=!0}}set points(t){this._points=t,delete this._segments,delete this._path,this._pointsUpdated=!1}get points(){return this._points}get segments(){return this._segments||(this._segments=Gr(this,this.options.segment))}first(){let t=this.segments,e=this.points;return t.length&&e[t[0].start]}last(){let t=this.segments,e=this.points,n=t.length;return n&&e[t[n-1].end]}interpolate(t,e){let n=this.options,s=t[e],o=this.points,r=ms(this,{property:e,start:s,end:s});if(!r.length)return;let a=[],l=vf(n),c,d;for(c=0,d=r.length;c<d;++c){let{start:u,end:h}=r[c],f=o[u],g=o[h];if(f===g){a.push(f);continue}let p=Math.abs((s-f[e])/(g[e]-f[e])),m=l(f,g,p,n.stepped);m[e]=t[e],a.push(m)}return a.length===1?a[0]:a}pathSegment(t,e,n){return zs(this)(t,this,e,n)}path(t,e,n){let s=this.segments,o=zs(this),r=this._loop;e=e||0,n=n||this.points.length-e;for(let a of s)r&=o(t,this,a,{start:e,end:e+n-1});return!!r}draw(t,e,n,s){let o=this.options||{};(this.points||[]).length&&o.borderWidth&&(t.save(),Tf(t,this,n,s),t.restore()),this.animated&&(this._pointsUpdated=!1,this._path=void 0)}};M(Ct,"id","line"),M(Ct,"defaults",{borderCapStyle:"butt",borderDash:[],borderDashOffset:0,borderJoinStyle:"miter",borderWidth:3,capBezierPoints:!0,cubicInterpolationMode:"default",fill:!1,spanGaps:!1,stepped:!1,tension:0}),M(Ct,"defaultRoutes",{backgroundColor:"backgroundColor",borderColor:"borderColor"}),M(Ct,"descriptors",{_scriptable:!0,_indexable:t=>t!=="borderDash"&&t!=="fill"});Ae=class extends pt{constructor(e){super();M(this,"parsed");M(this,"skip");M(this,"stop");this.options=void 0,this.parsed=void 0,this.skip=void 0,this.stop=void 0,e&&Object.assign(this,e)}inRange(e,n,s){let o=this.options,{x:r,y:a}=this.getProps(["x","y"],s);return Math.pow(e-r,2)+Math.pow(n-a,2)<Math.pow(o.hitRadius+o.radius,2)}inXRange(e,n){return Ta(this,e,"x",n)}inYRange(e,n){return Ta(this,e,"y",n)}getCenterPoint(e){let{x:n,y:s}=this.getProps(["x","y"],e);return{x:n,y:s}}size(e){e=e||this.options||{};let n=e.radius||0;n=Math.max(n,n&&e.hoverRadius||0);let s=n&&e.borderWidth||0;return(n+s)*2}draw(e,n){let s=this.options;this.skip||s.radius<.1||!Mt(this,n,this.size(s)/2)||(e.strokeStyle=s.borderColor,e.lineWidth=s.borderWidth,e.fillStyle=s.backgroundColor,Yi(e,s,this.x,this.y))}getRange(){let e=this.options||{};return e.radius+e.hitRadius}};M(Ae,"id","point"),M(Ae,"defaults",{borderWidth:1,hitRadius:1,hoverBorderWidth:1,hoverRadius:4,pointStyle:"circle",radius:3,rotation:0}),M(Ae,"defaultRoutes",{backgroundColor:"backgroundColor",borderColor:"borderColor"});Pe=class extends pt{constructor(t){super(),this.options=void 0,this.horizontal=void 0,this.base=void 0,this.width=void 0,this.height=void 0,this.inflateAmount=void 0,t&&Object.assign(this,t)}draw(t){let{inflateAmount:e,options:{borderColor:n,backgroundColor:s}}=this,{inner:o,outer:r}=Ef(this),a=Lf(r.radius)?Se:Df;t.save(),(r.w!==o.w||r.h!==o.h)&&(t.beginPath(),a(t,ws(r,e,o)),t.clip(),a(t,ws(o,-e,r)),t.fillStyle=n,t.fill("evenodd")),t.beginPath(),a(t,ws(o,e)),t.fillStyle=s,t.fill(),t.restore()}inRange(t,e,n){return Ts(this,t,e,n)}inXRange(t,e){return Ts(this,t,null,e)}inYRange(t,e){return Ts(this,null,t,e)}getCenterPoint(t){let{x:e,y:n,base:s,horizontal:o}=this.getProps(["x","y","base","horizontal"],t);return{x:o?(e+s)/2:e,y:o?n:(n+s)/2}}getRange(t){return t==="x"?this.width/2:this.height/2}};M(Pe,"id","bar"),M(Pe,"defaults",{borderSkipped:"start",borderWidth:0,borderRadius:0,inflateAmount:"auto",pointStyle:void 0}),M(Pe,"defaultRoutes",{backgroundColor:"backgroundColor",borderColor:"borderColor"});Af=Object.freeze({__proto__:null,ArcElement:ne,BarElement:Pe,LineElement:Ct,PointElement:Ae}),Bs=["rgb(54, 162, 235)","rgb(255, 99, 132)","rgb(255, 159, 64)","rgb(255, 205, 86)","rgb(75, 192, 192)","rgb(153, 102, 255)","rgb(201, 203, 207)"],wa=Bs.map(i=>i.replace("rgb(","rgba(").replace(")",", 0.5)"));Hf={id:"colors",defaults:{enabled:!0,forceOverride:!1},beforeLayout(i,t,e){if(!e.enabled)return;let{data:{datasets:n},options:s}=i.config,{elements:o}=s,r=Ca(n)||Ff(s)||o&&Ca(o)||$f();if(!e.forceOverride&&r)return;let a=If(i);n.forEach(a)}};Nf={id:"decimation",defaults:{algorithm:"min-max",enabled:!1},beforeElementsUpdate:(i,t,e)=>{if(!e.enabled){Ea(i);return}let n=i.width;i.data.datasets.forEach((s,o)=>{let{_data:r,indexAxis:a}=s,l=i.getDatasetMeta(o),c=r||s.data;if(ke([a,i.options.indexAxis])==="y"||!l.controller.supportsDecimation)return;let d=i.scales[l.xAxisID];if(d.type!=="linear"&&d.type!=="time"||i.options.parsing)return;let{start:u,count:h}=Wf(l,c),f=e.threshold||4*n;if(h<=f){ul(s);return}P(r)&&(s._data=c,delete s.data,Object.defineProperty(s,"data",{configurable:!0,enumerable:!0,get:function(){return this._decimated},set:function(p){this._data=p}}));let g;switch(e.algorithm){case"lttb":g=zf(c,u,h,n,e);break;case"min-max":g=Bf(c,u,h,n);break;default:throw new Error(`Unsupported decimation algorithm '${e.algorithm}'`)}s._decimated=g})},destroy(i){Ea(i)}};un=class{constructor(t){this.x=t.x,this.y=t.y,this.radius=t.radius}pathSegment(t,e,n){let{x:s,y:o,radius:r}=this;return e=e||{start:0,end:V},t.arc(s,o,r,e.end,e.start,!0),!n.bounds}interpolate(t){let{x:e,y:n,radius:s}=this,o=t.angle;return{x:e+Math.cos(o)*s,y:n+Math.sin(o)*s,angle:o}}};lg={id:"filler",afterDatasetsUpdate(i,t,e){let n=(i.data.datasets||[]).length,s=[],o,r,a,l;for(r=0;r<n;++r)o=i.getDatasetMeta(r),a=o.dataset,l=null,a&&a.options&&a instanceof Ct&&(l={visible:i.isDatasetVisible(r),index:r,fill:Yf(a,r,n),chart:i,axis:o.controller.options.indexAxis,scale:o.vScale,line:a}),o.$filler=l,s.push(l);for(r=0;r<n;++r)l=s[r],!(!l||l.fill===!1)&&(l.fill=qf(s,r,e.propagate))},beforeDraw(i,t,e){let n=e.drawTime==="beforeDraw",s=i.getSortedVisibleDatasetMetas(),o=i.chartArea;for(let r=s.length-1;r>=0;--r){let a=s[r].$filler;a&&(a.line.updateControlPoints(o,a.axis),n&&a.fill&&Cs(i.ctx,a,o))}},beforeDatasetsDraw(i,t,e){if(e.drawTime!=="beforeDatasetsDraw")return;let n=i.getSortedVisibleDatasetMetas();for(let s=n.length-1;s>=0;--s){let o=n[s].$filler;Da(o)&&Cs(i.ctx,o,i.chartArea)}},beforeDatasetDraw(i,t,e){let n=t.meta.$filler;!Da(n)||e.drawTime!=="beforeDatasetDraw"||Cs(i.ctx,n,i.chartArea)},defaults:{propagate:!0,drawTime:"beforeDatasetDraw"}},Oa=(i,t)=>{let{boxHeight:e=t,boxWidth:n=t}=i;return i.usePointStyle&&(e=Math.min(e,t),n=i.pointStyleWidth||Math.min(n,t)),{boxWidth:n,boxHeight:e,itemHeight:Math.max(t,e)}},cg=(i,t)=>i!==null&&t!==null&&i.datasetIndex===t.datasetIndex&&i.index===t.index,hn=class extends pt{constructor(t){super(),this._added=!1,this.legendHitBoxes=[],this._hoveredItem=null,this.doughnutMode=!1,this.chart=t.chart,this.options=t.options,this.ctx=t.ctx,this.legendItems=void 0,this.columnSizes=void 0,this.lineWidths=void 0,this.maxHeight=void 0,this.maxWidth=void 0,this.top=void 0,this.bottom=void 0,this.left=void 0,this.right=void 0,this.height=void 0,this.width=void 0,this._margins=void 0,this.position=void 0,this.weight=void 0,this.fullSize=void 0}update(t,e,n){this.maxWidth=t,this.maxHeight=e,this._margins=n,this.setDimensions(),this.buildLabels(),this.fit()}setDimensions(){this.isHorizontal()?(this.width=this.maxWidth,this.left=this._margins.left,this.right=this.width):(this.height=this.maxHeight,this.top=this._margins.top,this.bottom=this.height)}buildLabels(){let t=this.options.labels||{},e=W(t.generateLabels,[this.chart],this)||[];t.filter&&(e=e.filter(n=>t.filter(n,this.chart.data))),t.sort&&(e=e.sort((n,s)=>t.sort(n,s,this.chart.data))),this.options.reverse&&e.reverse(),this.legendItems=e}fit(){let{options:t,ctx:e}=this;if(!t.display){this.width=this.height=0;return}let n=t.labels,s=J(n.font),o=s.size,r=this._computeTitleHeight(),{boxWidth:a,itemHeight:l}=Oa(n,o),c,d;e.font=s.string,this.isHorizontal()?(c=this.maxWidth,d=this._fitRows(r,o,a,l)+10):(d=this.maxHeight,c=this._fitCols(r,s,a,l)+10),this.width=Math.min(c,t.maxWidth||this.maxWidth),this.height=Math.min(d,t.maxHeight||this.maxHeight)}_fitRows(t,e,n,s){let{ctx:o,maxWidth:r,options:{labels:{padding:a}}}=this,l=this.legendHitBoxes=[],c=this.lineWidths=[0],d=s+a,u=t;o.textAlign="left",o.textBaseline="middle";let h=-1,f=-d;return this.legendItems.forEach((g,p)=>{let m=n+e/2+o.measureText(g.text).width;(p===0||c[c.length-1]+m+2*a>r)&&(u+=d,c[c.length-(p>0?0:1)]=0,f+=d,h++),l[p]={left:0,top:f,row:h,width:m,height:s},c[c.length-1]+=m+a}),u}_fitCols(t,e,n,s){let{ctx:o,maxHeight:r,options:{labels:{padding:a}}}=this,l=this.legendHitBoxes=[],c=this.columnSizes=[],d=r-t,u=a,h=0,f=0,g=0,p=0;return this.legendItems.forEach((m,b)=>{let{itemWidth:y,itemHeight:_}=dg(n,e,o,m,s);b>0&&f+_+2*a>d&&(u+=h+a,c.push({width:h,height:f}),g+=h+a,p++,h=f=0),l[b]={left:g,top:f,col:p,width:y,height:_},h=Math.max(h,y),f+=_+a}),u+=h,c.push({width:h,height:f}),u}adjustHitBoxes(){if(!this.options.display)return;let t=this._computeTitleHeight(),{legendHitBoxes:e,options:{align:n,labels:{padding:s},rtl:o}}=this,r=te(o,this.left,this.width);if(this.isHorizontal()){let a=0,l=et(n,this.left+s,this.right-this.lineWidths[a]);for(let c of e)a!==c.row&&(a=c.row,l=et(n,this.left+s,this.right-this.lineWidths[a])),c.top+=this.top+t+s,c.left=r.leftForLtr(r.x(l),c.width),l+=c.width+s}else{let a=0,l=et(n,this.top+t+s,this.bottom-this.columnSizes[a].height);for(let c of e)c.col!==a&&(a=c.col,l=et(n,this.top+t+s,this.bottom-this.columnSizes[a].height)),c.top=l,c.left+=this.left+s,c.left=r.leftForLtr(r.x(c.left),c.width),l+=c.height+s}}isHorizontal(){return this.options.position==="top"||this.options.position==="bottom"}draw(){if(this.options.display){let t=this.ctx;Je(t,this),this._draw(),Ze(t)}}_draw(){let{options:t,columnSizes:e,lineWidths:n,ctx:s}=this,{align:o,labels:r}=t,a=j.color,l=te(t.rtl,this.left,this.width),c=J(r.font),{padding:d}=r,u=c.size,h=u/2,f;this.drawTitle(),s.textAlign=l.textAlign("left"),s.textBaseline="middle",s.lineWidth=.5,s.font=c.string;let{boxWidth:g,boxHeight:p,itemHeight:m}=Oa(r,u),b=function(S,k,T){if(isNaN(g)||g<=0||isNaN(p)||p<0)return;s.save();let w=C(T.lineWidth,1);if(s.fillStyle=C(T.fillStyle,a),s.lineCap=C(T.lineCap,"butt"),s.lineDashOffset=C(T.lineDashOffset,0),s.lineJoin=C(T.lineJoin,"miter"),s.lineWidth=w,s.strokeStyle=C(T.strokeStyle,a),s.setLineDash(C(T.lineDash,[])),r.usePointStyle){let L={radius:p*Math.SQRT2/2,pointStyle:T.pointStyle,rotation:T.rotation,borderWidth:w},D=l.xPlus(S,g/2),I=k+h;os(s,L,D,I,r.pointStyleWidth&&g)}else{let L=k+Math.max((u-p)/2,0),D=l.leftForLtr(S,g),I=Vt(T.borderRadius);s.beginPath(),Object.values(I).some(Q=>Q!==0)?Se(s,{x:D,y:L,w:g,h:p,radius:I}):s.rect(D,L,g,p),s.fill(),w!==0&&s.stroke()}s.restore()},y=function(S,k,T){Nt(s,T.text,S,k+m/2,c,{strikethrough:T.hidden,textAlign:l.textAlign(T.textAlign)})},_=this.isHorizontal(),v=this._computeTitleHeight();_?f={x:et(o,this.left+d,this.right-n[0]),y:this.top+d+v,line:0}:f={x:this.left+d,y:et(o,this.top+v+d,this.bottom-e[0].height),line:0},fs(this.ctx,t.textDirection);let x=m+d;this.legendItems.forEach((S,k)=>{s.strokeStyle=S.fontColor,s.fillStyle=S.fontColor;let T=s.measureText(S.text).width,w=l.textAlign(S.textAlign||(S.textAlign=r.textAlign)),L=g+h+T,D=f.x,I=f.y;l.setWidth(this.width),_?k>0&&D+L+d>this.right&&(I=f.y+=x,f.line++,D=f.x=et(o,this.left+d,this.right-n[f.line])):k>0&&I+x>this.bottom&&(D=f.x=D+e[f.line].width+d,f.line++,I=f.y=et(o,this.top+v+d,this.bottom-e[f.line].height));let Q=l.x(D);if(b(Q,I,S),D=Rr(w,D+g+h,_?D+L:this.right,t.rtl),y(l.x(D),I,S),_)f.x+=L+d;else if(typeof S.text!="string"){let ht=c.lineHeight;f.y+=fl(S,ht)+d}else f.y+=x}),gs(this.ctx,t.textDirection)}drawTitle(){let t=this.options,e=t.title,n=J(e.font),s=it(e.padding);if(!e.display)return;let o=te(t.rtl,this.left,this.width),r=this.ctx,a=e.position,l=n.size/2,c=s.top+l,d,u=this.left,h=this.width;if(this.isHorizontal())h=Math.max(...this.lineWidths),d=this.top+c,u=et(t.align,u,this.right-h);else{let g=this.columnSizes.reduce((p,m)=>Math.max(p,m.height),0);d=c+et(t.align,this.top,this.bottom-g-t.labels.padding-this._computeTitleHeight())}let f=et(a,u,u+h);r.textAlign=o.textAlign(ji(a)),r.textBaseline="middle",r.strokeStyle=e.color,r.fillStyle=e.color,r.font=n.string,Nt(r,e.text,f,d,n)}_computeTitleHeight(){let t=this.options.title,e=J(t.font),n=it(t.padding);return t.display?e.lineHeight+n.height:0}_getLegendItemAt(t,e){let n,s,o;if(kt(t,this.left,this.right)&&kt(e,this.top,this.bottom)){for(o=this.legendHitBoxes,n=0;n<o.length;++n)if(s=o[n],kt(t,s.left,s.left+s.width)&&kt(e,s.top,s.top+s.height))return this.legendItems[n]}return null}handleEvent(t){let e=this.options;if(!fg(t.type,e))return;let n=this._getLegendItemAt(t.x,t.y);if(t.type==="mousemove"||t.type==="mouseout"){let s=this._hoveredItem,o=cg(s,n);s&&!o&&W(e.onLeave,[t,s,this],this),this._hoveredItem=n,n&&!o&&W(e.onHover,[t,n,this],this)}else n&&W(e.onClick,[t,n,this],this)}};gg={id:"legend",_element:hn,start(i,t,e){let n=i.legend=new hn({ctx:i.ctx,options:e,chart:i});ot.configure(i,n,e),ot.addBox(i,n)},stop(i){ot.removeBox(i,i.legend),delete i.legend},beforeUpdate(i,t,e){let n=i.legend;ot.configure(i,n,e),n.options=e},afterUpdate(i){let t=i.legend;t.buildLabels(),t.adjustHitBoxes()},afterEvent(i,t){t.replay||i.legend.handleEvent(t.event)},defaults:{display:!0,position:"top",align:"center",fullSize:!0,reverse:!1,weight:1e3,onClick(i,t,e){let n=t.datasetIndex,s=e.chart;s.isDatasetVisible(n)?(s.hide(n),t.hidden=!0):(s.show(n),t.hidden=!1)},onHover:null,onLeave:null,labels:{color:i=>i.chart.options.color,boxWidth:40,padding:10,generateLabels(i){let t=i.data.datasets,{labels:{usePointStyle:e,pointStyle:n,textAlign:s,color:o,useBorderRadius:r,borderRadius:a}}=i.legend.options;return i._getSortedDatasetMetas().map(l=>{let c=l.controller.getStyle(e?0:void 0),d=it(c.borderWidth);return{text:t[l.index].label,fillStyle:c.backgroundColor,fontColor:o,hidden:!l.visible,lineCap:c.borderCapStyle,lineDash:c.borderDash,lineDashOffset:c.borderDashOffset,lineJoin:c.borderJoinStyle,lineWidth:(d.width+d.height)/4,strokeStyle:c.borderColor,pointStyle:n||c.pointStyle,rotation:c.rotation,textAlign:s||c.textAlign,borderRadius:r&&(a||c.borderRadius),datasetIndex:l.index}},this)}},title:{color:i=>i.chart.options.color,display:!1,position:"center",text:""}},descriptors:{_scriptable:i=>!i.startsWith("on"),labels:{_scriptable:i=>!["generateLabels","filter","sort"].includes(i)}}},fi=class extends pt{constructor(t){super(),this.chart=t.chart,this.options=t.options,this.ctx=t.ctx,this._padding=void 0,this.top=void 0,this.bottom=void 0,this.left=void 0,this.right=void 0,this.width=void 0,this.height=void 0,this.position=void 0,this.weight=void 0,this.fullSize=void 0}update(t,e){let n=this.options;if(this.left=0,this.top=0,!n.display){this.width=this.height=this.right=this.bottom=0;return}this.width=this.right=t,this.height=this.bottom=e;let s=N(n.text)?n.text.length:1;this._padding=it(n.padding);let o=s*J(n.font).lineHeight+this._padding.height;this.isHorizontal()?this.height=o:this.width=o}isHorizontal(){let t=this.options.position;return t==="top"||t==="bottom"}_drawArgs(t){let{top:e,left:n,bottom:s,right:o,options:r}=this,a=r.align,l=0,c,d,u;return this.isHorizontal()?(d=et(a,n,o),u=e+t,c=o-n):(r.position==="left"?(d=n+t,u=et(a,s,e),l=F*-.5):(d=o-t,u=et(a,e,s),l=F*.5),c=s-e),{titleX:d,titleY:u,maxWidth:c,rotation:l}}draw(){let t=this.ctx,e=this.options;if(!e.display)return;let n=J(e.font),o=n.lineHeight/2+this._padding.top,{titleX:r,titleY:a,maxWidth:l,rotation:c}=this._drawArgs(o);Nt(t,e.text,0,0,n,{color:e.color,maxWidth:l,rotation:c,textAlign:ji(e.align),textBaseline:"middle",translation:[r,a]})}};mg={id:"title",_element:fi,start(i,t,e){pg(i,e)},stop(i){let t=i.titleBlock;ot.removeBox(i,t),delete i.titleBlock},beforeUpdate(i,t,e){let n=i.titleBlock;ot.configure(i,n,e),n.options=e},defaults:{align:"center",display:!1,font:{weight:"bold"},fullSize:!0,padding:10,position:"top",text:"",weight:2e3},defaultRoutes:{color:"color"},descriptors:{_scriptable:!0,_indexable:!1}},en=new WeakMap,bg={id:"subtitle",start(i,t,e){let n=new fi({ctx:i.ctx,options:e,chart:i});ot.configure(i,n,e),ot.addBox(i,n),en.set(i,n)},stop(i){ot.removeBox(i,en.get(i)),en.delete(i)},beforeUpdate(i,t,e){let n=en.get(i);ot.configure(i,n,e),n.options=e},defaults:{align:"center",display:!1,font:{weight:"normal"},fullSize:!0,padding:0,position:"top",text:"",weight:1500},defaultRoutes:{color:"color"},descriptors:{_scriptable:!0,_indexable:!1}},ri={average(i){if(!i.length)return!1;let t,e,n=new Set,s=0,o=0;for(t=0,e=i.length;t<e;++t){let a=i[t].element;if(a&&a.hasValue()){let l=a.tooltipPosition();n.add(l.x),s+=l.y,++o}}return o===0||n.size===0?!1:{x:[...n].reduce((a,l)=>a+l)/n.size,y:s/o}},nearest(i,t){if(!i.length)return!1;let e=t.x,n=t.y,s=Number.POSITIVE_INFINITY,o,r,a;for(o=0,r=i.length;o<r;++o){let l=i[o].element;if(l&&l.hasValue()){let c=l.getCenterPoint(),d=zi(t,c);d<s&&(s=d,a=l)}}if(a){let l=a.tooltipPosition();e=l.x,n=l.y}return{x:e,y:n}}};gl={beforeTitle:St,title(i){if(i.length>0){let t=i[0],e=t.chart.data.labels,n=e?e.length:0;if(this&&this.options&&this.options.mode==="dataset")return t.dataset.label||"";if(t.label)return t.label;if(n>0&&t.dataIndex<n)return e[t.dataIndex]}return""},afterTitle:St,beforeBody:St,beforeLabel:St,label(i){if(this&&this.options&&this.options.mode==="dataset")return i.label+": "+i.formattedValue||i.formattedValue;let t=i.dataset.label||"";t&&(t+=": ");let e=i.formattedValue;return P(e)||(t+=e),t},labelColor(i){let e=i.chart.getDatasetMeta(i.datasetIndex).controller.getStyle(i.dataIndex);return{borderColor:e.borderColor,backgroundColor:e.backgroundColor,borderWidth:e.borderWidth,borderDash:e.borderDash,borderDashOffset:e.borderDashOffset,borderRadius:0}},labelTextColor(){return this.options.bodyColor},labelPointStyle(i){let e=i.chart.getDatasetMeta(i.datasetIndex).controller.getStyle(i.dataIndex);return{pointStyle:e.pointStyle,rotation:e.rotation}},afterLabel:St,afterBody:St,beforeFooter:St,footer:St,afterFooter:St};ui=class extends pt{constructor(t){super(),this.opacity=0,this._active=[],this._eventPosition=void 0,this._size=void 0,this._cachedAnimations=void 0,this._tooltipItems=[],this.$animations=void 0,this.$context=void 0,this.chart=t.chart,this.options=t.options,this.dataPoints=void 0,this.title=void 0,this.beforeBody=void 0,this.body=void 0,this.afterBody=void 0,this.footer=void 0,this.xAlign=void 0,this.yAlign=void 0,this.x=void 0,this.y=void 0,this.height=void 0,this.width=void 0,this.caretX=void 0,this.caretY=void 0,this.labelColors=void 0,this.labelPointStyles=void 0,this.labelTextColors=void 0}initialize(t){this.options=t,this._cachedAnimations=void 0,this.$context=void 0}_resolveAnimations(){let t=this._cachedAnimations;if(t)return t;let e=this.chart,n=this.options.setContext(this.getContext()),s=n.enabled&&e.options.animation&&n.animations,o=new an(this.chart,s);return s._cacheable&&(this._cachedAnimations=Object.freeze(o)),o}getContext(){return this.$context||(this.$context=kg(this.chart.getContext(),this,this._tooltipItems))}getTitle(t,e){let{callbacks:n}=e,s=dt(n,"beforeTitle",this,t),o=dt(n,"title",this,t),r=dt(n,"afterTitle",this,t),a=[];return a=Tt(a,Ot(s)),a=Tt(a,Ot(o)),a=Tt(a,Ot(r)),a}getBeforeBody(t,e){return Ha(dt(e.callbacks,"beforeBody",this,t))}getBody(t,e){let{callbacks:n}=e,s=[];return H(t,o=>{let r={before:[],lines:[],after:[]},a=za(n,o);Tt(r.before,Ot(dt(a,"beforeLabel",this,o))),Tt(r.lines,dt(a,"label",this,o)),Tt(r.after,Ot(dt(a,"afterLabel",this,o))),s.push(r)}),s}getAfterBody(t,e){return Ha(dt(e.callbacks,"afterBody",this,t))}getFooter(t,e){let{callbacks:n}=e,s=dt(n,"beforeFooter",this,t),o=dt(n,"footer",this,t),r=dt(n,"afterFooter",this,t),a=[];return a=Tt(a,Ot(s)),a=Tt(a,Ot(o)),a=Tt(a,Ot(r)),a}_createItems(t){let e=this._active,n=this.chart.data,s=[],o=[],r=[],a=[],l,c;for(l=0,c=e.length;l<c;++l)a.push(yg(this.chart,e[l]));return t.filter&&(a=a.filter((d,u,h)=>t.filter(d,u,h,n))),t.itemSort&&(a=a.sort((d,u)=>t.itemSort(d,u,n))),H(a,d=>{let u=za(t.callbacks,d);s.push(dt(u,"labelColor",this,d)),o.push(dt(u,"labelPointStyle",this,d)),r.push(dt(u,"labelTextColor",this,d))}),this.labelColors=s,this.labelPointStyles=o,this.labelTextColors=r,this.dataPoints=a,a}update(t,e){let n=this.options.setContext(this.getContext()),s=this._active,o,r=[];if(!s.length)this.opacity!==0&&(o={opacity:0});else{let a=ri[n.position].call(this,s,this._eventPosition);r=this._createItems(n),this.title=this.getTitle(r,n),this.beforeBody=this.getBeforeBody(r,n),this.body=this.getBody(r,n),this.afterBody=this.getAfterBody(r,n),this.footer=this.getFooter(r,n);let l=this._size=Ia(this,n),c=Object.assign({},a,l),d=Fa(this.chart,n,c),u=$a(n,c,d,this.chart);this.xAlign=d.xAlign,this.yAlign=d.yAlign,o={opacity:1,x:u.x,y:u.y,width:l.width,height:l.height,caretX:a.x,caretY:a.y}}this._tooltipItems=r,this.$context=void 0,o&&this._resolveAnimations().update(this,o),t&&n.external&&n.external.call(this,{chart:this.chart,tooltip:this,replay:e})}drawCaret(t,e,n,s){let o=this.getCaretPosition(t,n,s);e.lineTo(o.x1,o.y1),e.lineTo(o.x2,o.y2),e.lineTo(o.x3,o.y3)}getCaretPosition(t,e,n){let{xAlign:s,yAlign:o}=this,{caretSize:r,cornerRadius:a}=n,{topLeft:l,topRight:c,bottomLeft:d,bottomRight:u}=Vt(a),{x:h,y:f}=t,{width:g,height:p}=e,m,b,y,_,v,x;return o==="center"?(v=f+p/2,s==="left"?(m=h,b=m-r,_=v+r,x=v-r):(m=h+g,b=m+r,_=v-r,x=v+r),y=m):(s==="left"?b=h+Math.max(l,d)+r:s==="right"?b=h+g-Math.max(c,u)-r:b=this.caretX,o==="top"?(_=f,v=_-r,m=b-r,y=b+r):(_=f+p,v=_+r,m=b+r,y=b-r),x=_),{x1:m,x2:b,x3:y,y1:_,y2:v,y3:x}}drawTitle(t,e,n){let s=this.title,o=s.length,r,a,l;if(o){let c=te(n.rtl,this.x,this.width);for(t.x=nn(this,n.titleAlign,n),e.textAlign=c.textAlign(n.titleAlign),e.textBaseline="middle",r=J(n.titleFont),a=n.titleSpacing,e.fillStyle=n.titleColor,e.font=r.string,l=0;l<o;++l)e.fillText(s[l],c.x(t.x),t.y+r.lineHeight/2),t.y+=r.lineHeight+a,l+1===o&&(t.y+=n.titleMarginBottom-a)}}_drawColorBox(t,e,n,s,o){let r=this.labelColors[n],a=this.labelPointStyles[n],{boxHeight:l,boxWidth:c}=o,d=J(o.bodyFont),u=nn(this,"left",o),h=s.x(u),f=l<d.lineHeight?(d.lineHeight-l)/2:0,g=e.y+f;if(o.usePointStyle){let p={radius:Math.min(c,l)/2,pointStyle:a.pointStyle,rotation:a.rotation,borderWidth:1},m=s.leftForLtr(h,c)+c/2,b=g+l/2;t.strokeStyle=o.multiKeyBackground,t.fillStyle=o.multiKeyBackground,Yi(t,p,m,b),t.strokeStyle=r.borderColor,t.fillStyle=r.backgroundColor,Yi(t,p,m,b)}else{t.lineWidth=O(r.borderWidth)?Math.max(...Object.values(r.borderWidth)):r.borderWidth||1,t.strokeStyle=r.borderColor,t.setLineDash(r.borderDash||[]),t.lineDashOffset=r.borderDashOffset||0;let p=s.leftForLtr(h,c),m=s.leftForLtr(s.xPlus(h,1),c-2),b=Vt(r.borderRadius);Object.values(b).some(y=>y!==0)?(t.beginPath(),t.fillStyle=o.multiKeyBackground,Se(t,{x:p,y:g,w:c,h:l,radius:b}),t.fill(),t.stroke(),t.fillStyle=r.backgroundColor,t.beginPath(),Se(t,{x:m,y:g+1,w:c-2,h:l-2,radius:b}),t.fill()):(t.fillStyle=o.multiKeyBackground,t.fillRect(p,g,c,l),t.strokeRect(p,g,c,l),t.fillStyle=r.backgroundColor,t.fillRect(m,g+1,c-2,l-2))}t.fillStyle=this.labelTextColors[n]}drawBody(t,e,n){let{body:s}=this,{bodySpacing:o,bodyAlign:r,displayColors:a,boxHeight:l,boxWidth:c,boxPadding:d}=n,u=J(n.bodyFont),h=u.lineHeight,f=0,g=te(n.rtl,this.x,this.width),p=function(T){e.fillText(T,g.x(t.x+f),t.y+h/2),t.y+=h+o},m=g.textAlign(r),b,y,_,v,x,S,k;for(e.textAlign=r,e.textBaseline="middle",e.font=u.string,t.x=nn(this,m,n),e.fillStyle=n.bodyColor,H(this.beforeBody,p),f=a&&m!=="right"?r==="center"?c/2+d:c+2+d:0,v=0,S=s.length;v<S;++v){for(b=s[v],y=this.labelTextColors[v],e.fillStyle=y,H(b.before,p),_=b.lines,a&&_.length&&(this._drawColorBox(e,t,v,g,n),h=Math.max(u.lineHeight,l)),x=0,k=_.length;x<k;++x)p(_[x]),h=u.lineHeight;H(b.after,p)}f=0,h=u.lineHeight,H(this.afterBody,p),t.y-=o}drawFooter(t,e,n){let s=this.footer,o=s.length,r,a;if(o){let l=te(n.rtl,this.x,this.width);for(t.x=nn(this,n.footerAlign,n),t.y+=n.footerMarginTop,e.textAlign=l.textAlign(n.footerAlign),e.textBaseline="middle",r=J(n.footerFont),e.fillStyle=n.footerColor,e.font=r.string,a=0;a<o;++a)e.fillText(s[a],l.x(t.x),t.y+r.lineHeight/2),t.y+=r.lineHeight+n.footerSpacing}}drawBackground(t,e,n,s){let{xAlign:o,yAlign:r}=this,{x:a,y:l}=t,{width:c,height:d}=n,{topLeft:u,topRight:h,bottomLeft:f,bottomRight:g}=Vt(s.cornerRadius);e.fillStyle=s.backgroundColor,e.strokeStyle=s.borderColor,e.lineWidth=s.borderWidth,e.beginPath(),e.moveTo(a+u,l),r==="top"&&this.drawCaret(t,e,n,s),e.lineTo(a+c-h,l),e.quadraticCurveTo(a+c,l,a+c,l+h),r==="center"&&o==="right"&&this.drawCaret(t,e,n,s),e.lineTo(a+c,l+d-g),e.quadraticCurveTo(a+c,l+d,a+c-g,l+d),r==="bottom"&&this.drawCaret(t,e,n,s),e.lineTo(a+f,l+d),e.quadraticCurveTo(a,l+d,a,l+d-f),r==="center"&&o==="left"&&this.drawCaret(t,e,n,s),e.lineTo(a,l+u),e.quadraticCurveTo(a,l,a+u,l),e.closePath(),e.fill(),s.borderWidth>0&&e.stroke()}_updateAnimationTarget(t){let e=this.chart,n=this.$animations,s=n&&n.x,o=n&&n.y;if(s||o){let r=ri[t.position].call(this,this._active,this._eventPosition);if(!r)return;let a=this._size=Ia(this,t),l=Object.assign({},r,this._size),c=Fa(e,t,l),d=$a(t,l,c,e);(s._to!==d.x||o._to!==d.y)&&(this.xAlign=c.xAlign,this.yAlign=c.yAlign,this.width=a.width,this.height=a.height,this.caretX=r.x,this.caretY=r.y,this._resolveAnimations().update(this,d))}}_willRender(){return!!this.opacity}draw(t){let e=this.options.setContext(this.getContext()),n=this.opacity;if(!n)return;this._updateAnimationTarget(e);let s={width:this.width,height:this.height},o={x:this.x,y:this.y};n=Math.abs(n)<.001?0:n;let r=it(e.padding),a=this.title.length||this.beforeBody.length||this.body.length||this.afterBody.length||this.footer.length;e.enabled&&a&&(t.save(),t.globalAlpha=n,this.drawBackground(o,t,s,e),fs(t,e.textDirection),o.y+=r.top,this.drawTitle(o,t,e),this.drawBody(o,t,e),this.drawFooter(o,t,e),gs(t,e.textDirection),t.restore())}getActiveElements(){return this._active||[]}setActiveElements(t,e){let n=this._active,s=t.map(({datasetIndex:a,index:l})=>{let c=this.chart.getDatasetMeta(a);if(!c)throw new Error("Cannot find a dataset at index "+a);return{datasetIndex:a,element:c.data[l],index:l}}),o=!Ge(n,s),r=this._positionChanged(s,e);(o||r)&&(this._active=s,this._eventPosition=e,this._ignoreReplayEvents=!0,this.update(!0))}handleEvent(t,e,n=!0){if(e&&this._ignoreReplayEvents)return!1;this._ignoreReplayEvents=!1;let s=this.options,o=this._active||[],r=this._getActiveElements(t,o,e,n),a=this._positionChanged(r,t),l=e||!Ge(r,o)||a;return l&&(this._active=r,(s.enabled||s.external)&&(this._eventPosition={x:t.x,y:t.y},this.update(!0,e))),l}_getActiveElements(t,e,n,s){let o=this.options;if(t.type==="mouseout")return[];if(!s)return e.filter(a=>this.chart.data.datasets[a.datasetIndex]&&this.chart.getDatasetMeta(a.datasetIndex).controller.getParsed(a.index)!==void 0);let r=this.chart.getElementsAtEventForMode(t,o.mode,o,n);return o.reverse&&r.reverse(),r}_positionChanged(t,e){let{caretX:n,caretY:s,options:o}=this,r=ri[o.position].call(this,t,e);return r!==!1&&(n!==r.x||s!==r.y)}};M(ui,"positioners",ri);Tg={id:"tooltip",_element:ui,positioners:ri,afterInit(i,t,e){e&&(i.tooltip=new ui({chart:i,options:e}))},beforeUpdate(i,t,e){i.tooltip&&i.tooltip.initialize(e)},reset(i,t,e){i.tooltip&&i.tooltip.initialize(e)},afterDraw(i){let t=i.tooltip;if(t&&t._willRender()){let e={tooltip:t};if(i.notifyPlugins("beforeTooltipDraw",{...e,cancelable:!0})===!1)return;t.draw(i.ctx),i.notifyPlugins("afterTooltipDraw",e)}},afterEvent(i,t){if(i.tooltip){let e=t.replay;i.tooltip.handleEvent(t.event,e,t.inChartArea)&&(t.changed=!0)}},defaults:{enabled:!0,external:null,position:"average",backgroundColor:"rgba(0,0,0,0.8)",titleColor:"#fff",titleFont:{weight:"bold"},titleSpacing:2,titleMarginBottom:6,titleAlign:"left",bodyColor:"#fff",bodySpacing:2,bodyFont:{},bodyAlign:"left",footerColor:"#fff",footerSpacing:2,footerMarginTop:6,footerFont:{weight:"bold"},footerAlign:"left",padding:6,caretPadding:2,caretSize:5,cornerRadius:6,boxHeight:(i,t)=>t.bodyFont.size,boxWidth:(i,t)=>t.bodyFont.size,multiKeyBackground:"#fff",displayColors:!0,boxPadding:0,borderColor:"rgba(0,0,0,0)",borderWidth:0,animation:{duration:400,easing:"easeOutQuart"},animations:{numbers:{type:"number",properties:["x","y","width","height","caretX","caretY"]},opacity:{easing:"linear",duration:200}},callbacks:gl},defaultRoutes:{bodyFont:"font",footerFont:"font",titleFont:"font"},descriptors:{_scriptable:i=>i!=="filter"&&i!=="itemSort"&&i!=="external",_indexable:!1,callbacks:{_scriptable:!1,_indexable:!1},animation:{_fallback:!1},animations:{_fallback:"animation"}},additionalOptionScopes:["interaction"]},wg=Object.freeze({__proto__:null,Colors:Hf,Decimation:Nf,Filler:lg,Legend:gg,SubTitle:bg,Title:mg,Tooltip:Tg}),Cg=(i,t,e,n)=>(typeof t=="string"?(e=i.push(t)-1,n.unshift({index:e,label:t})):isNaN(t)&&(e=null),e);Lg=(i,t)=>i===null?null:Z(Math.round(i),0,t);ai=class extends ae{constructor(t){super(t),this._startValue=void 0,this._valueRange=0,this._addedLabels=[]}init(t){let e=this._addedLabels;if(e.length){let n=this.getLabels();for(let{index:s,label:o}of e)n[s]===o&&n.splice(s,1);this._addedLabels=[]}super.init(t)}parse(t,e){if(P(t))return null;let n=this.getLabels();return e=isFinite(e)&&n[e]===t?e:Eg(n,t,C(e,t),this._addedLabels),Lg(e,n.length-1)}determineDataLimits(){let{minDefined:t,maxDefined:e}=this.getUserBounds(),{min:n,max:s}=this.getMinMax(!0);this.options.bounds==="ticks"&&(t||(n=0),e||(s=this.getLabels().length-1)),this.min=n,this.max=s}buildTicks(){let t=this.min,e=this.max,n=this.options.offset,s=[],o=this.getLabels();o=t===0&&e===o.length-1?o:o.slice(t,e+1),this._valueRange=Math.max(o.length-(n?0:1),1),this._startValue=this.min-(n?.5:0);for(let r=t;r<=e;r++)s.push({value:r});return s}getLabelForValue(t){return Ba.call(this,t)}configure(){super.configure(),this.isHorizontal()||(this._reversePixels=!this._reversePixels)}getPixelForValue(t){return typeof t!="number"&&(t=this.parse(t)),t===null?NaN:this.getPixelForDecimal((t-this._startValue)/this._valueRange)}getPixelForTick(t){let e=this.ticks;return t<0||t>e.length-1?null:this.getPixelForValue(e[t].value)}getValueForPixel(t){return Math.round(this._startValue+this.getDecimalForPixel(t)*this._valueRange)}getBasePixel(){return this.bottom}};M(ai,"id","category"),M(ai,"defaults",{ticks:{callback:Ba}});Oe=class extends ae{constructor(t){super(t),this.start=void 0,this.end=void 0,this._startValue=void 0,this._endValue=void 0,this._valueRange=0}parse(t,e){return P(t)||(typeof t=="number"||t instanceof Number)&&!isFinite(+t)?null:+t}handleTickRangeOptions(){let{beginAtZero:t}=this.options,{minDefined:e,maxDefined:n}=this.getUserBounds(),{min:s,max:o}=this,r=l=>s=e?s:l,a=l=>o=n?o:l;if(t){let l=xt(s),c=xt(o);l<0&&c<0?a(0):l>0&&c>0&&r(0)}if(s===o){let l=o===0?1:Math.abs(o*.05);a(o+l),t||r(s-l)}this.min=s,this.max=o}getTickLimit(){let t=this.options.ticks,{maxTicksLimit:e,stepSize:n}=t,s;return n?(s=Math.ceil(this.max/n)-Math.floor(this.min/n)+1,s>1e3&&(console.warn(`scales.${this.id}.ticks.stepSize: ${n} would result generating up to ${s} ticks. Limiting to 1000.`),s=1e3)):(s=this.computeTickLimit(),e=e||11),e&&(s=Math.min(e,s)),s}computeTickLimit(){return Number.POSITIVE_INFINITY}buildTicks(){let t=this.options,e=t.ticks,n=this.getTickLimit();n=Math.max(2,n);let s={maxTicks:n,bounds:t.bounds,min:t.min,max:t.max,precision:e.precision,step:e.stepSize,count:e.count,maxDigits:this._maxDigits(),horizontal:this.isHorizontal(),minRotation:e.minRotation||0,includeBounds:e.includeBounds!==!1},o=this._range||this,r=Dg(s,o);return t.bounds==="ticks"&&Un(r,this,"value"),t.reverse?(r.reverse(),this.start=this.max,this.end=this.min):(this.start=this.min,this.end=this.max),r}configure(){let t=this.ticks,e=this.min,n=this.max;if(super.configure(),this.options.offset&&t.length){let s=(n-e)/Math.max(t.length-1,1)/2;e-=s,n+=s}this._startValue=e,this._endValue=n,this._valueRange=n-e}getLabelForValue(t){return Me(t,this.chart.options.locale,this.options.ticks.format)}},li=class extends Oe{determineDataLimits(){let{min:t,max:e}=this.getMinMax(!0);this.min=Y(t)?t:0,this.max=Y(e)?e:1,this.handleTickRangeOptions()}computeTickLimit(){let t=this.isHorizontal(),e=t?this.width:this.height,n=bt(this.options.ticks.minRotation),s=(t?Math.sin(n):Math.cos(n))||.001,o=this._resolveTickFontOptions(0);return Math.ceil(e/Math.min(40,o.lineHeight/s))}getPixelForValue(t){return t===null?NaN:this.getPixelForDecimal((t-this._startValue)/this._valueRange)}getValueForPixel(t){return this._startValue+this.getDecimalForPixel(t)*this._valueRange}};M(li,"id","linear"),M(li,"defaults",{ticks:{callback:Xe.formatters.numeric}});gi=i=>Math.floor(Dt(i)),ie=(i,t)=>Math.pow(10,gi(i)+t);ci=class extends ae{constructor(t){super(t),this.start=void 0,this.end=void 0,this._startValue=void 0,this._valueRange=0}parse(t,e){let n=Oe.prototype.parse.apply(this,[t,e]);if(n===0){this._zero=!0;return}return Y(n)&&n>0?n:null}determineDataLimits(){let{min:t,max:e}=this.getMinMax(!0);this.min=Y(t)?Math.max(0,t):null,this.max=Y(e)?Math.max(0,e):null,this.options.beginAtZero&&(this._zero=!0),this._zero&&this.min!==this._suggestedMin&&!Y(this._userMin)&&(this.min=t===ie(this.min,0)?ie(this.min,-1):ie(this.min,0)),this.handleTickRangeOptions()}handleTickRangeOptions(){let{minDefined:t,maxDefined:e}=this.getUserBounds(),n=this.min,s=this.max,o=a=>n=t?n:a,r=a=>s=e?s:a;n===s&&(n<=0?(o(1),r(10)):(o(ie(n,-1)),r(ie(s,1)))),n<=0&&o(ie(s,-1)),s<=0&&r(ie(n,1)),this.min=n,this.max=s}buildTicks(){let t=this.options,e={min:this._userMin,max:this._userMax},n=Pg(e,this);return t.bounds==="ticks"&&Un(n,this,"value"),t.reverse?(n.reverse(),this.start=this.max,this.end=this.min):(this.start=this.min,this.end=this.max),n}getLabelForValue(t){return t===void 0?"0":Me(t,this.chart.options.locale,this.options.ticks.format)}configure(){let t=this.min;super.configure(),this._startValue=Dt(t),this._valueRange=Dt(this.max)-Dt(t)}getPixelForValue(t){return(t===void 0||t===0)&&(t=this.min),t===null||isNaN(t)?NaN:this.getPixelForDecimal(t===this.min?0:(Dt(t)-this._startValue)/this._valueRange)}getValueForPixel(t){let e=this.getDecimalForPixel(t);return Math.pow(10,this._startValue+e*this._valueRange)}};M(ci,"id","logarithmic"),M(ci,"defaults",{ticks:{callback:Xe.formatters.logarithmic,major:{enabled:!0}}});se=class extends Oe{constructor(t){super(t),this.xCenter=void 0,this.yCenter=void 0,this.drawingArea=void 0,this._pointLabels=[],this._pointLabelItems=[]}setDimensions(){let t=this._padding=it(Ns(this.options)/2),e=this.width=this.maxWidth-t.width,n=this.height=this.maxHeight-t.height;this.xCenter=Math.floor(this.left+e/2+t.left),this.yCenter=Math.floor(this.top+n/2+t.top),this.drawingArea=Math.floor(Math.min(e,n)/2)}determineDataLimits(){let{min:t,max:e}=this.getMinMax(!1);this.min=Y(t)&&!isNaN(t)?t:0,this.max=Y(e)&&!isNaN(e)?e:0,this.handleTickRangeOptions()}computeTickLimit(){return Math.ceil(this.drawingArea/Ns(this.options))}generateTickLabels(t){Oe.prototype.generateTickLabels.call(this,t),this._pointLabels=this.getLabels().map((e,n)=>{let s=W(this.options.pointLabels.callback,[e,n],this);return s||s===0?s:""}).filter((e,n)=>this.chart.getDataVisibility(n))}fit(){let t=this.options;t.display&&t.pointLabels.display?Og(this):this.setCenterPoint(0,0,0,0)}setCenterPoint(t,e,n,s){this.xCenter+=Math.floor((t-e)/2),this.yCenter+=Math.floor((n-s)/2),this.drawingArea-=Math.min(this.drawingArea/2,Math.max(t,e,n,s))}getIndexAngle(t){let e=V/(this._pointLabels.length||1),n=this.options.startAngle||0;return tt(t*e+bt(n))}getDistanceFromCenterForValue(t){if(P(t))return NaN;let e=this.drawingArea/(this.max-this.min);return this.options.reverse?(this.max-t)*e:(t-this.min)*e}getValueForDistanceFromCenter(t){if(P(t))return NaN;let e=t/(this.drawingArea/(this.max-this.min));return this.options.reverse?this.max-e:this.min+e}getPointLabelContext(t){let e=this._pointLabels||[];if(t>=0&&t<e.length){let n=e[t];return qg(this.getContext(),t,n)}}getPointPosition(t,e,n=0){let s=this.getIndexAngle(t)-K+n;return{x:Math.cos(s)*e+this.xCenter,y:Math.sin(s)*e+this.yCenter,angle:s}}getPointPositionForValue(t,e){return this.getPointPosition(t,this.getDistanceFromCenterForValue(e))}getBasePosition(t){return this.getPointPositionForValue(t||0,this.getBaseValue())}getPointLabelPosition(t){let{left:e,top:n,right:s,bottom:o}=this._pointLabelItems[t];return{left:e,top:n,right:s,bottom:o}}drawBackground(){let{backgroundColor:t,grid:{circular:e}}=this.options;if(t){let n=this.ctx;n.save(),n.beginPath(),pl(this,this.getDistanceFromCenterForValue(this._endValue),e,this._pointLabels.length),n.closePath(),n.fillStyle=t,n.fill(),n.restore()}}drawGrid(){let t=this.ctx,e=this.options,{angleLines:n,grid:s,border:o}=e,r=this._pointLabels.length,a,l,c;if(e.pointLabels.display&&Vg(this,r),s.display&&this.ticks.forEach((d,u)=>{if(u!==0||u===0&&this.min<0){l=this.getDistanceFromCenterForValue(d.value);let h=this.getContext(u),f=s.setContext(h),g=o.setContext(h);jg(this,f,l,r,g)}}),n.display){for(t.save(),a=r-1;a>=0;a--){let d=n.setContext(this.getPointLabelContext(a)),{color:u,lineWidth:h}=d;!h||!u||(t.lineWidth=h,t.strokeStyle=u,t.setLineDash(d.borderDash),t.lineDashOffset=d.borderDashOffset,l=this.getDistanceFromCenterForValue(e.reverse?this.min:this.max),c=this.getPointPosition(a,l),t.beginPath(),t.moveTo(this.xCenter,this.yCenter),t.lineTo(c.x,c.y),t.stroke())}t.restore()}}drawBorder(){}drawLabels(){let t=this.ctx,e=this.options,n=e.ticks;if(!n.display)return;let s=this.getIndexAngle(0),o,r;t.save(),t.translate(this.xCenter,this.yCenter),t.rotate(s),t.textAlign="center",t.textBaseline="middle",this.ticks.forEach((a,l)=>{if(l===0&&this.min>=0&&!e.reverse)return;let c=n.setContext(this.getContext(l)),d=J(c.font);if(o=this.getDistanceFromCenterForValue(this.ticks[l].value),c.showLabelBackdrop){t.font=d.string,r=t.measureText(a.label).width,t.fillStyle=c.backdropColor;let u=it(c.backdropPadding);t.fillRect(-r/2-u.left,-o-d.size/2-u.top,r+u.width,d.size+u.height)}Nt(t,a.label,0,-o,d,{color:c.color,strokeColor:c.textStrokeColor,strokeWidth:c.textStrokeWidth})}),t.restore()}drawTitle(){}};M(se,"id","radialLinear"),M(se,"defaults",{display:!0,animate:!0,position:"chartArea",angleLines:{display:!0,lineWidth:1,borderDash:[],borderDashOffset:0},grid:{circular:!1},startAngle:0,ticks:{showLabelBackdrop:!0,callback:Xe.formatters.numeric},pointLabels:{backdropColor:void 0,backdropPadding:2,display:!0,font:{size:10},callback(t){return t},padding:5,centerPointLabels:!1}}),M(se,"defaultRoutes",{"angleLines.color":"borderColor","pointLabels.color":"color","ticks.color":"color"}),M(se,"descriptors",{angleLines:{_fallback:"grid"}});gn={millisecond:{common:!0,size:1,steps:1e3},second:{common:!0,size:1e3,steps:60},minute:{common:!0,size:6e4,steps:60},hour:{common:!0,size:36e5,steps:24},day:{common:!0,size:864e5,steps:30},week:{common:!1,size:6048e5,steps:4},month:{common:!0,size:2628e6,steps:12},quarter:{common:!1,size:7884e6,steps:4},year:{common:!0,size:3154e7}},ut=Object.keys(gn);re=class extends ae{constructor(t){super(t),this._cache={data:[],labels:[],all:[]},this._unit="day",this._majorUnit=void 0,this._offsets={},this._normalized=!1,this._parseOpts=void 0}init(t,e={}){let n=t.time||(t.time={}),s=this._adapter=new rh._date(t.adapters.date);s.init(e),ye(n.displayFormats,s.formats()),this._parseOpts={parser:n.parser,round:n.round,isoWeekday:n.isoWeekday},super.init(t),this._normalized=e.normalized}parse(t,e){return t===void 0?null:Ya(this,t)}beforeLayout(){super.beforeLayout(),this._cache={data:[],labels:[],all:[]}}determineDataLimits(){let t=this.options,e=this._adapter,n=t.time.unit||"day",{min:s,max:o,minDefined:r,maxDefined:a}=this.getUserBounds();function l(c){!r&&!isNaN(c.min)&&(s=Math.min(s,c.min)),!a&&!isNaN(c.max)&&(o=Math.max(o,c.max))}(!r||!a)&&(l(this._getLabelBounds()),(t.bounds!=="ticks"||t.ticks.source!=="labels")&&l(this.getMinMax(!1))),s=Y(s)&&!isNaN(s)?s:+e.startOf(Date.now(),n),o=Y(o)&&!isNaN(o)?o:+e.endOf(Date.now(),n)+1,this.min=Math.min(s,o-1),this.max=Math.max(s+1,o)}_getLabelBounds(){let t=this.getLabelTimestamps(),e=Number.POSITIVE_INFINITY,n=Number.NEGATIVE_INFINITY;return t.length&&(e=t[0],n=t[t.length-1]),{min:e,max:n}}buildTicks(){let t=this.options,e=t.time,n=t.ticks,s=n.source==="labels"?this.getLabelTimestamps():this._generate();t.bounds==="ticks"&&s.length&&(this.min=this._userMin||s[0],this.max=this._userMax||s[s.length-1]);let o=this.min,r=this.max,a=Lr(s,o,r);return this._unit=e.unit||(n.autoSkip?Ua(e.minUnit,this.min,this.max,this._getLabelCapacity(o)):Yg(this,a.length,e.minUnit,this.min,this.max)),this._majorUnit=!n.major.enabled||this._unit==="year"?void 0:Ug(this._unit),this.initOffsets(s),t.reverse&&a.reverse(),Ga(this,a,this._majorUnit)}afterAutoSkip(){this.options.offsetAfterAutoskip&&this.initOffsets(this.ticks.map(t=>+t.value))}initOffsets(t=[]){let e=0,n=0,s,o;this.options.offset&&t.length&&(s=this.getDecimalForValue(t[0]),t.length===1?e=1-s:e=(this.getDecimalForValue(t[1])-s)/2,o=this.getDecimalForValue(t[t.length-1]),t.length===1?n=o:n=(o-this.getDecimalForValue(t[t.length-2]))/2);let r=t.length<3?.5:.25;e=Z(e,0,r),n=Z(n,0,r),this._offsets={start:e,end:n,factor:1/(e+1+n)}}_generate(){let t=this._adapter,e=this.min,n=this.max,s=this.options,o=s.time,r=o.unit||Ua(o.minUnit,e,n,this._getLabelCapacity(e)),a=C(s.ticks.stepSize,1),l=r==="week"?o.isoWeekday:!1,c=Qt(l)||l===!0,d={},u=e,h,f;if(c&&(u=+t.startOf(u,"isoWeek",l)),u=+t.startOf(u,c?"day":r),t.diff(n,e,r)>1e5*a)throw new Error(e+" and "+n+" are too far apart with stepSize of "+a+" "+r);let g=s.ticks.source==="data"&&this.getDataTimestamps();for(h=u,f=0;h<n;h=+t.add(h,a,r),f++)Ka(d,h,g);return(h===n||s.bounds==="ticks"||f===1)&&Ka(d,h,g),Object.keys(d).sort(qa).map(p=>+p)}getLabelForValue(t){let e=this._adapter,n=this.options.time;return n.tooltipFormat?e.format(t,n.tooltipFormat):e.format(t,n.displayFormats.datetime)}format(t,e){let s=this.options.time.displayFormats,o=this._unit,r=e||s[o];return this._adapter.format(t,r)}_tickFormatFunction(t,e,n,s){let o=this.options,r=o.ticks.callback;if(r)return W(r,[t,e,n],this);let a=o.time.displayFormats,l=this._unit,c=this._majorUnit,d=l&&a[l],u=c&&a[c],h=n[e],f=c&&u&&h&&h.major;return this._adapter.format(t,s||(f?u:d))}generateTickLabels(t){let e,n,s;for(e=0,n=t.length;e<n;++e)s=t[e],s.label=this._tickFormatFunction(s.value,e,t)}getDecimalForValue(t){return t===null?NaN:(t-this.min)/(this.max-this.min)}getPixelForValue(t){let e=this._offsets,n=this.getDecimalForValue(t);return this.getPixelForDecimal((e.start+n)*e.factor)}getValueForPixel(t){let e=this._offsets,n=this.getDecimalForPixel(t)/e.factor-e.end;return this.min+n*(this.max-this.min)}_getLabelSize(t){let e=this.options.ticks,n=this.ctx.measureText(t).width,s=bt(this.isHorizontal()?e.maxRotation:e.minRotation),o=Math.cos(s),r=Math.sin(s),a=this._resolveTickFontOptions(0).size;return{w:n*o+a*r,h:n*r+a*o}}_getLabelCapacity(t){let e=this.options.time,n=e.displayFormats,s=n[e.unit]||n.millisecond,o=this._tickFormatFunction(t,0,Ga(this,[t],this._majorUnit),s),r=this._getLabelSize(o),a=Math.floor(this.isHorizontal()?this.width/r.w:this.height/r.h)-1;return a>0?a:1}getDataTimestamps(){let t=this._cache.data||[],e,n;if(t.length)return t;let s=this.getMatchingVisibleMetas();if(this._normalized&&s.length)return this._cache.data=s[0].controller.getAllParsedValues(this);for(e=0,n=s.length;e<n;++e)t=t.concat(s[e].controller.getAllParsedValues(this));return this._cache.data=this.normalize(t)}getLabelTimestamps(){let t=this._cache.labels||[],e,n;if(t.length)return t;let s=this.getLabels();for(e=0,n=s.length;e<n;++e)t.push(Ya(this,s[e]));return this._cache.labels=this._normalized?t:this.normalize(t)}normalize(t){return Jn(t.sort(qa))}};M(re,"id","time"),M(re,"defaults",{bounds:"data",adapters:{},time:{parser:!1,unit:!1,round:!1,isoWeekday:!1,minUnit:"millisecond",displayFormats:{}},ticks:{source:"auto",callback:!1,major:{enabled:!1}}});di=class extends re{constructor(t){super(t),this._table=[],this._minPos=void 0,this._tableRange=void 0}initOffsets(){let t=this._getTimestampsForTable(),e=this._table=this.buildLookupTable(t);this._minPos=sn(e,this.min),this._tableRange=sn(e,this.max)-this._minPos,super.initOffsets(t)}buildLookupTable(t){let{min:e,max:n}=this,s=[],o=[],r,a,l,c,d;for(r=0,a=t.length;r<a;++r)c=t[r],c>=e&&c<=n&&s.push(c);if(s.length<2)return[{time:e,pos:0},{time:n,pos:1}];for(r=0,a=s.length;r<a;++r)d=s[r+1],l=s[r-1],c=s[r],Math.round((d+l)/2)!==c&&o.push({time:c,pos:r/(a-1)});return o}_generate(){let t=this.min,e=this.max,n=super.getDataTimestamps();return(!n.includes(t)||!n.length)&&n.splice(0,0,t),(!n.includes(e)||n.length===1)&&n.push(e),n.sort((s,o)=>s-o)}_getTimestampsForTable(){let t=this._cache.all||[];if(t.length)return t;let e=this.getDataTimestamps(),n=this.getLabelTimestamps();return e.length&&n.length?t=this.normalize(e.concat(n)):t=e.length?e:n,t=this._cache.all=t,t}getDecimalForValue(t){return(sn(this._table,t)-this._minPos)/this._tableRange}getValueForPixel(t){let e=this._offsets,n=this.getDecimalForPixel(t)/e.factor-e.end;return sn(this._table,n*this._tableRange+this._minPos,!0)}};M(di,"id","timeseries"),M(di,"defaults",re.defaults);Gg=Object.freeze({__proto__:null,CategoryScale:ai,LinearScale:li,LogarithmicScale:ci,RadialLinearScale:se,TimeScale:re,TimeSeriesScale:di}),ml=[oh,Af,wg,Gg]});function yl(i,t){let e=document.getElementById(i);if(!e)return null;let n={to18:"rgb(37, 99, 235)",to19:"rgb(79, 70, 229)",to20:"rgb(147, 51, 234)"},s={type:"pie",data:{labels:t.map(o=>o.migration.toUpperCase()),datasets:[{data:t.map(o=>o.minutes),backgroundColor:t.map(o=>n[o.migration]||"#888"),borderWidth:2,borderColor:"#fff"}]},options:{responsive:!0,maintainAspectRatio:!0,plugins:{legend:{position:"bottom",labels:{font:{size:12}}},tooltip:{callbacks:{label:o=>{let r=o.parsed,l=o.dataset.data.reduce((d,u)=>d+u,0),c=l>0?Math.round(r/l*100):0;return`${o.label}: ${mn(r)} (${c}%)`}}}}}};return new lt(e,s)}function pn(i,t,e=10,n=!1){let s=document.getElementById(i);if(!s)return null;let o=t.slice(0,e),r=o.map(d=>n?d.summary:d.summary.length>50?d.summary.substring(0,50)+"...":d.summary),a=Math.max(...o.map(d=>d.minutes)),l=Xg(a),c={type:"bar",data:{labels:r,datasets:[{label:`Temps (${l})`,data:o.map(d=>Jg(d.minutes,l)),backgroundColor:"rgba(37, 99, 235, 0.8)",borderColor:"rgb(37, 99, 235)",borderWidth:1}]},options:{responsive:!0,maintainAspectRatio:!1,indexAxis:"y",plugins:{legend:{display:!1},tooltip:{callbacks:{label:d=>{let u=o[d.dataIndex],h=mn(u.minutes),f=u.occurrences>1?"occurrences":"occurrence";return`${h} \u2022 ${u.occurrences} ${f}`}}}},scales:{x:{beginAtZero:!0,title:{display:!0,text:`Temps (${l})`}}}}};return new lt(s,c)}function Xg(i){return i<60?"min":i<420?"h":"j"}function Jg(i,t){if(t==="min")return i;if(t==="h")return Math.round(i/60*100)/100;let e=i/60;return Math.round(e/7*100)/100}function mn(i){if(i<60)return`${i}min`;let t=Math.round(i/60*100)/100;return i<420?`${t}h`:`${Math.round(t/7*100)/100}j`}function xl(i,t){let e=document.getElementById(i);if(!e)return null;let n={obligatoire:"rgb(220, 38, 38)",recommande:"rgb(217, 119, 6)",optionnelle:"rgb(22, 163, 74)"},s={type:"doughnut",data:{labels:t.map(o=>o.priority.charAt(0).toUpperCase()+o.priority.slice(1)),datasets:[{data:t.map(o=>o.minutes),backgroundColor:t.map(o=>n[o.priority]||"#888"),borderWidth:2,borderColor:"#fff"}]},options:{responsive:!0,maintainAspectRatio:!0,plugins:{legend:{position:"bottom",labels:{font:{size:12}}},tooltip:{callbacks:{label:o=>{let r=o.parsed,l=o.dataset.data.reduce((d,u)=>d+u,0),c=l>0?Math.round(r/l*100):0;return`${o.label}: ${mn(r)} (${c}%)`}}}}}};return new lt(e,s)}function _l(i,t){let e=document.getElementById(i);if(!e)return null;let n=t.filter(r=>r.minutes>0),s=Zg(n),o={type:"pie",data:{labels:n.map(r=>r.targetName),datasets:[{data:n.map(r=>r.minutes),backgroundColor:s,borderWidth:2,borderColor:"#fff"}]},options:{responsive:!0,maintainAspectRatio:!0,plugins:{legend:{position:"bottom",labels:{font:{size:11},padding:8,boxWidth:12}},tooltip:{callbacks:{label:r=>{let a=r.dataIndex,l=n[a],c=r.parsed,u=r.dataset.data.reduce((g,p)=>g+p,0),h=u>0?Math.round(c/u*100):0;return`${l.targetType==="app"?"\u{1F4E6} App":"\u{1F4DA} Lib"} - ${l.targetName}: ${mn(c)} (${h}%)`}}}}}};return new lt(e,o)}function Zg(i){let t=["rgb(249, 115, 22)","rgb(34, 197, 94)","rgb(220, 38, 38)","rgb(14, 165, 233)","rgb(234, 88, 12)","rgb(168, 85, 247)","rgb(251, 146, 60)","rgb(16, 185, 129)","rgb(236, 72, 153)","rgb(234, 179, 8)","rgb(59, 130, 246)","rgb(239, 68, 68)","rgb(20, 184, 166)","rgb(217, 70, 239)","rgb(132, 204, 22)"];return i.map((e,n)=>t[n%t.length])}var vl=E(()=>{"use strict";bl();lt.register(...ml)});function Ml(i){if(!i)return;let t=kl(i);if(G.migrations=yl("chart-migrations",t.migrationData)||void 0,G.topRules=pn("chart-top-rules",t.ruleData,10,!1)||void 0,G.priorities=xl("chart-priorities",t.priorityData)||void 0,i.projectInfo.type==="nx-monorepo"){let e=Tl(i);if(e.length>0){let n=document.getElementById("chart-targets-container");n&&(n.style.display="block",G.targets=_l("chart-targets",e)||void 0)}}rp(i,t.ruleData)}function Sl(i){let t=kl(i);Qg(t.migrationData),tp(t.ruleData),ep(t.priorityData),op(i)}function Qg(i){G.migrations&&(G.migrations.data.labels=i.map(t=>t.migration.toUpperCase()),G.migrations.data.datasets[0].data=i.map(t=>t.minutes),G.migrations.update())}function tp(i){if(!G.topRules)return;G.topRules.destroy();let t=le?20:10;G.topRules=pn("chart-top-rules",i,t,le)||void 0}function ep(i){G.priorities&&(G.priorities.data.labels=i.map(t=>t.priority.charAt(0).toUpperCase()+t.priority.slice(1)),G.priorities.data.datasets[0].data=i.map(t=>t.minutes),G.priorities.update())}function kl(i){return{migrationData:ip(i),ruleData:np(i),priorityData:sp(i)}}function ip(i){let t={};return i.targets.forEach(n=>{n.migrations.forEach(s=>{t[s.migration]=(t[s.migration]||0)+s.totalTime.minutes})}),["to18","to19","to20"].filter(n=>t[n]!==void 0).map(n=>({migration:n,minutes:t[n]}))}function np(i){let t=new Map;return i.targets.forEach(n=>{n.migrations.forEach(s=>{s.priorities.forEach(o=>{o.rules.forEach(r=>{let a=t.get(r.ruleKey);a?(a.minutes+=r.totalTime.minutes,a.occurrences+=r.occurrences):t.set(r.ruleKey,{summary:r.ruleSummary,minutes:r.totalTime.minutes,occurrences:r.occurrences})})})})}),Array.from(t.entries()).map(([n,s])=>({ruleKey:n,summary:s.summary,minutes:s.minutes,occurrences:s.occurrences})).sort((n,s)=>s.minutes-n.minutes)}function sp(i){let t={};return i.targets.forEach(n=>{n.migrations.forEach(s=>{s.priorities.forEach(o=>{t[o.priority]=(t[o.priority]||0)+o.totalTime.minutes})})}),["obligatoire","recommande","optionnelle"].filter(n=>t[n]!==void 0).map(n=>({priority:n,minutes:t[n]}))}function Tl(i){return i.targets.filter(t=>t.targetType!=="monorepo").map(t=>({targetName:t.targetName,targetType:t.targetType,minutes:t.totalTime.minutes}))}function op(i){if(!G.targets||i.projectInfo.type!=="nx-monorepo")return;let t=Tl(i).filter(e=>e.minutes>0);G.targets.data.labels=t.map(e=>`${e.targetType==="app"?"\u{1F4E6}":"\u{1F4DA}"} ${e.targetName}`),G.targets.data.datasets[0].data=t.map(e=>e.minutes),G.targets.update()}function rp(i,t){let e=document.getElementById("toggle-rules-details");e&&e.addEventListener("click",()=>{le=!le,e.textContent=le?"Voir r\xE9sum\xE9 (10 r\xE8gles)":"Voir d\xE9tails (20 r\xE8gles)",G.topRules&&G.topRules.destroy();let n=le?20:10;G.topRules=pn("chart-top-rules",t,n,le)||void 0})}var G,le,wl=E(()=>{"use strict";vl();G={},le=!1});function ap(i,t){let e=new Date(i);for(;e<=t;){let n=e.getDay();if(n===0||n===6)return!0;e=_i(e,1)}return!1}function Cl(i,t,e){let n=document.getElementById(i);if(!n)return;if(t.length===0){n.innerHTML='<p class="text-gray-500">Aucune migration \xE0 afficher</p>';return}let s=800,o=40,r=50,a=20,l=120,c=s-l-40,d=o+t.length*(r+a)+20,u=t.reduce((y,_)=>y+_.duration,0),h=t[0]?.startDate||new Date,f=t[t.length-1]?.endDate||new Date,g=lp(h,f,u,l,c,o,d),p=cp(t,u,l,c,o,r,a,e),m=Date.now(),b=`
27
+ `):i}function vg(i,t){let{element:e,datasetIndex:n,index:s}=t,o=i.getDatasetMeta(n).controller,{label:r,value:a}=o.getLabelAndValue(s);return{chart:i,label:r,parsed:o.getParsed(s),raw:i.data.datasets[n].data[s],formattedValue:a,dataset:o.getDataset(),dataIndex:s,datasetIndex:n,element:e}}function Ha(i,t){let e=i.chart.ctx,{body:n,footer:s,title:o}=i,{boxWidth:r,boxHeight:a}=t,l=J(t.bodyFont),c=J(t.titleFont),d=J(t.footerFont),u=o.length,h=s.length,f=n.length,g=nt(t.padding),p=g.height,m=0,b=n.reduce((v,x)=>v+x.before.length+x.lines.length+x.after.length,0);if(b+=i.beforeBody.length+i.afterBody.length,u&&(p+=u*c.lineHeight+(u-1)*t.titleSpacing+t.titleMarginBottom),b){let v=t.displayColors?Math.max(a,l.lineHeight):l.lineHeight;p+=f*v+(b-f)*l.lineHeight+(b-1)*t.bodySpacing}h&&(p+=t.footerMarginTop+h*d.lineHeight+(h-1)*t.footerSpacing);let y=0,_=function(v){m=Math.max(m,e.measureText(v).width+y)};return e.save(),e.font=c.string,H(i.title,_),e.font=l.string,H(i.beforeBody.concat(i.afterBody),_),y=t.displayColors?r+2+t.boxPadding:0,H(n,v=>{H(v.before,_),H(v.lines,_),H(v.after,_)}),y=0,e.font=d.string,H(i.footer,_),e.restore(),m+=g.width,{width:m,height:p}}function Mg(i,t){let{y:e,height:n}=t;return e<n/2?"top":e>i.height-n/2?"bottom":"center"}function Sg(i,t,e,n){let{x:s,width:o}=n,r=e.caretSize+e.caretPadding;if(i==="left"&&s+o+r>t.width||i==="right"&&s-o-r<0)return!0}function kg(i,t,e,n){let{x:s,width:o}=e,{width:r,chartArea:{left:a,right:l}}=i,c="center";return n==="center"?c=s<=(a+l)/2?"left":"right":s<=o/2?c="left":s>=r-o/2&&(c="right"),Sg(c,i,t,e)&&(c="center"),c}function za(i,t,e){let n=e.yAlign||t.yAlign||Mg(i,e);return{xAlign:e.xAlign||t.xAlign||kg(i,t,e,n),yAlign:n}}function Tg(i,t){let{x:e,width:n}=i;return t==="right"?e-=n:t==="center"&&(e-=n/2),e}function wg(i,t,e){let{y:n,height:s}=i;return t==="top"?n+=e:t==="bottom"?n-=s+e:n-=s/2,n}function Wa(i,t,e,n){let{caretSize:s,caretPadding:o,cornerRadius:r}=i,{xAlign:a,yAlign:l}=e,c=s+o,{topLeft:d,topRight:u,bottomLeft:h,bottomRight:f}=Vt(r),g=Tg(t,a),p=wg(t,l,c);return l==="center"?a==="left"?g+=c:a==="right"&&(g-=c):a==="left"?g-=Math.max(d,h)+s:a==="right"&&(g+=Math.max(u,f)+s),{x:Z(g,0,n.width-t.width),y:Z(p,0,n.height-t.height)}}function on(i,t,e){let n=nt(e.padding);return t==="center"?i.x+i.width/2:t==="right"?i.x+i.width-n.right:i.x+n.left}function Ba(i){return Tt([],Ot(i))}function Cg(i,t,e){return Pt(i,{tooltip:t,tooltipItems:e,type:"tooltip"})}function Na(i,t){let e=t&&t.dataset&&t.dataset.tooltip&&t.dataset.tooltip.callbacks;return e?i.override(e):i}function dt(i,t,e,n){let s=i[t].call(e,n);return typeof s>"u"?bl[t].call(e,n):s}function Dg(i,t,e,n){let s=i.indexOf(t);if(s===-1)return Ag(i,t,e,n);let o=i.lastIndexOf(t);return s!==o?e:s}function Va(i){let t=this.getLabels();return i>=0&&i<t.length?t[i]:i}function Rg(i,t){let e=[],{bounds:s,step:o,min:r,max:a,precision:l,count:c,maxTicks:d,maxDigits:u,includeBounds:h}=i,f=o||1,g=d-1,{min:p,max:m}=t,b=!R(r),y=!R(a),_=!R(c),v=(m-p)/(u+1),x=Gn((m-p)/g/f)*f,S,k,T,w;if(x<1e-14&&!b&&!y)return[{value:p},{value:m}];w=Math.ceil(m/x)-Math.floor(p/x),w>g&&(x=Gn(w*x/g/f)*f),R(l)||(S=Math.pow(10,l),x=Math.ceil(x*S)/S),s==="ticks"?(k=Math.floor(p/x)*x,T=Math.ceil(m/x)*x):(k=p,T=m),b&&y&&o&&Lr((a-r)/o,x/1e3)?(w=Math.round(Math.min((a-r)/x,d)),x=(a-r)/w,k=r,T=a):_?(k=b?r:k,T=y?a:T,w=c-1,x=(T-k)/w):(w=(T-k)/x,ve(w,Math.round(w),x/1e3)?w=Math.round(w):w=Math.ceil(w));let L=Math.max(Jn(x),Jn(k));S=Math.pow(10,R(l)?L:l),k=Math.round(k*S)/S,T=Math.round(T*S)/S;let A=0;for(b&&(h&&k!==r?(e.push({value:r}),k<r&&A++,ve(Math.round((k+A*x)*S)/S,r,ja(r,v,i))&&A++):k<r&&A++);A<w;++A){let I=Math.round((k+A*x)*S)/S;if(y&&I>a)break;e.push({value:I})}return y&&h&&T!==a?e.length&&ve(e[e.length-1].value,a,ja(a,v,i))?e[e.length-1].value=a:e.push({value:a}):(!y||T===a)&&e.push({value:T}),e}function ja(i,t,{horizontal:e,minRotation:n}){let s=bt(n),o=(e?Math.sin(s):Math.cos(s))||.001,r=.75*t*(""+i).length;return Math.min(t/o,r)}function qa(i){return i/Math.pow(10,mi(i))===1}function Ya(i,t,e){let n=Math.pow(10,e),s=Math.floor(i/n);return Math.ceil(t/n)-s}function Og(i,t){let e=t-i,n=mi(e);for(;Ya(i,t,n)>10;)n++;for(;Ya(i,t,n)<10;)n--;return Math.min(n,mi(i))}function Ig(i,{min:t,max:e}){t=ct(i.min,t);let n=[],s=mi(t),o=Og(t,e),r=o<0?Math.pow(10,Math.abs(o)):1,a=Math.pow(10,o),l=s>o?Math.pow(10,s):0,c=Math.round((t-l)*r)/r,d=Math.floor((t-l)/a/10)*a*10,u=Math.floor((c-d)/Math.pow(10,o)),h=ct(i.min,Math.round((l+d+u*Math.pow(10,o))*r)/r);for(;h<e;)n.push({value:h,major:qa(h),significand:u}),u>=10?u=u<15?15:20:u++,u>=20&&(o++,u=2,r=o>=0?1:r),h=Math.round((l+d+u*Math.pow(10,o))*r)/r;let f=ct(i.max,h);return n.push({value:f,major:qa(f),significand:u}),n}function qs(i){let t=i.ticks;if(t.display&&i.display){let e=nt(t.backdropPadding);return E(t.font&&t.font.size,j.font.size)+e.height}return 0}function Fg(i,t,e){return e=N(e)?e:[e],{w:Hr(i,t.string,e),h:e.length*t.lineHeight}}function Ua(i,t,e,n,s){return i===n||i===s?{start:t-e/2,end:t+e/2}:i<n||i>s?{start:t-e,end:t}:{start:t,end:t+e}}function $g(i){let t={l:i.left+i._padding.left,r:i.right-i._padding.right,t:i.top+i._padding.top,b:i.bottom-i._padding.bottom},e=Object.assign({},t),n=[],s=[],o=i._pointLabels.length,r=i.options.pointLabels,a=r.centerPointLabels?F/o:0;for(let l=0;l<o;l++){let c=r.setContext(i.getPointLabelContext(l));s[l]=c.padding;let d=i.getPointPosition(l,i.drawingArea+s[l],a),u=J(c.font),h=Fg(i.ctx,u,i._pointLabels[l]);n[l]=h;let f=et(i.getIndexAngle(l)+a),g=Math.round(ji(f)),p=Ua(g,d.x,h.w,0,180),m=Ua(g,d.y,h.h,90,270);Hg(e,t,f,p,m)}i.setCenterPoint(t.l-e.l,e.r-t.r,t.t-e.t,e.b-t.b),i._pointLabelItems=Bg(i,n,s)}function Hg(i,t,e,n,s){let o=Math.abs(Math.sin(e)),r=Math.abs(Math.cos(e)),a=0,l=0;n.start<t.l?(a=(t.l-n.start)/o,i.l=Math.min(i.l,t.l-a)):n.end>t.r&&(a=(n.end-t.r)/o,i.r=Math.max(i.r,t.r+a)),s.start<t.t?(l=(t.t-s.start)/r,i.t=Math.min(i.t,t.t-l)):s.end>t.b&&(l=(s.end-t.b)/r,i.b=Math.max(i.b,t.b+l))}function zg(i,t,e){let n=i.drawingArea,{extra:s,additionalAngle:o,padding:r,size:a}=e,l=i.getPointPosition(t,n+s+r,o),c=Math.round(ji(et(l.angle+K))),d=jg(l.y,a.h,c),u=Ng(c),h=Vg(l.x,a.w,u);return{visible:!0,x:l.x,y:d,textAlign:u,left:h,top:d,right:h+a.w,bottom:d+a.h}}function Wg(i,t){if(!t)return!0;let{left:e,top:n,right:s,bottom:o}=i;return!(Mt({x:e,y:n},t)||Mt({x:e,y:o},t)||Mt({x:s,y:n},t)||Mt({x:s,y:o},t))}function Bg(i,t,e){let n=[],s=i._pointLabels.length,o=i.options,{centerPointLabels:r,display:a}=o.pointLabels,l={extra:qs(o)/2,additionalAngle:r?F/s:0},c;for(let d=0;d<s;d++){l.padding=e[d],l.size=t[d];let u=zg(i,d,l);n.push(u),a==="auto"&&(u.visible=Wg(u,c),u.visible&&(c=u))}return n}function Ng(i){return i===0||i===180?"center":i<180?"left":"right"}function Vg(i,t,e){return e==="right"?i-=t:e==="center"&&(i-=t/2),i}function jg(i,t,e){return e===90||e===270?i-=t/2:(e>270||e<90)&&(i-=t),i}function qg(i,t,e){let{left:n,top:s,right:o,bottom:r}=e,{backdropColor:a}=t;if(!R(a)){let l=Vt(t.borderRadius),c=nt(t.backdropPadding);i.fillStyle=a;let d=n-c.left,u=s-c.top,h=o-n+c.width,f=r-s+c.height;Object.values(l).some(g=>g!==0)?(i.beginPath(),ke(i,{x:d,y:u,w:h,h:f,radius:l}),i.fill()):i.fillRect(d,u,h,f)}}function Yg(i,t){let{ctx:e,options:{pointLabels:n}}=i;for(let s=t-1;s>=0;s--){let o=i._pointLabelItems[s];if(!o.visible)continue;let r=n.setContext(i.getPointLabelContext(s));qg(e,r,o);let a=J(r.font),{x:l,y:c,textAlign:d}=o;Nt(e,i._pointLabels[s],l,c+a.lineHeight/2,a,{color:r.color,textAlign:d,textBaseline:"middle"})}}function yl(i,t,e,n){let{ctx:s}=i;if(e)s.arc(i.xCenter,i.yCenter,t,0,V);else{let o=i.getPointPosition(0,t);s.moveTo(o.x,o.y);for(let r=1;r<n;r++)o=i.getPointPosition(r,t),s.lineTo(o.x,o.y)}}function Ug(i,t,e,n,s){let o=i.ctx,r=t.circular,{color:a,lineWidth:l}=t;!r&&!n||!a||!l||e<0||(o.save(),o.strokeStyle=a,o.lineWidth=l,o.setLineDash(s.dash||[]),o.lineDashOffset=s.dashOffset,o.beginPath(),yl(i,e,r,n),o.closePath(),o.stroke(),o.restore())}function Kg(i,t,e){return Pt(i,{label:e,index:t,type:"pointLabel"})}function Ka(i,t){return i-t}function Ga(i,t){if(R(t))return null;let e=i._adapter,{parser:n,round:s,isoWeekday:o}=i._parseOpts,r=t;return typeof n=="function"&&(r=n(r)),Y(r)||(r=typeof n=="string"?e.parse(r,n):e.parse(r)),r===null?null:(s&&(r=s==="week"&&(ee(o)||o===!0)?e.startOf(r,"isoWeek",o):e.startOf(r,s)),+r)}function Xa(i,t,e,n){let s=ut.length;for(let o=ut.indexOf(i);o<s-1;++o){let r=mn[ut[o]],a=r.steps?r.steps:Number.MAX_SAFE_INTEGER;if(r.common&&Math.ceil((e-t)/(a*r.size))<=n)return ut[o]}return ut[s-1]}function Gg(i,t,e,n,s){for(let o=ut.length-1;o>=ut.indexOf(e);o--){let r=ut[o];if(mn[r].common&&i._adapter.diff(s,n,r)>=t-1)return r}return ut[e?ut.indexOf(e):0]}function Xg(i){for(let t=ut.indexOf(i)+1,e=ut.length;t<e;++t)if(mn[ut[t]].common)return ut[t]}function Ja(i,t,e){if(!e)i[t]=!0;else if(e.length){let{lo:n,hi:s}=qi(e,t),o=e[n]>=t?e[n]:e[s];i[o]=!0}}function Jg(i,t,e,n){let s=i._adapter,o=+s.startOf(t[0].value,n),r=t[t.length-1].value,a,l;for(a=o;a<=r;a=+s.add(a,1,n))l=e[a],l>=0&&(t[l].major=!0);return t}function Za(i,t,e){let n=[],s={},o=t.length,r,a;for(r=0;r<o;++r)a=t[r],s[a]=r,n.push({value:a,major:!1});return o===0||!e?n:Jg(i,n,s,e)}function rn(i,t,e){let n=0,s=i.length-1,o,r,a,l;e?(t>=i[n].pos&&t<=i[s].pos&&({lo:n,hi:s}=vt(i,"pos",t)),{pos:o,time:a}=i[n],{pos:r,time:l}=i[s]):(t>=i[n].time&&t<=i[s].time&&({lo:n,hi:s}=vt(i,"time",t)),{time:o,pos:a}=i[n],{time:r,pos:l}=i[s]);let c=r-o;return c?a+(l-a)*(t-o)/c:a}var Ps,Rt,ta,zu,Rs,cn,Ss,oa,Xu,gt,Ce,Ee,It,Le,ae,ri,Ae,De,lh,Os,ch,gh,el,ot,dn,Is,an,Mh,fa,nl,gi,ga,Fs,pt,Wh,pa,ma,ce,Oe,$s,wt,Hs,va,al,oi,Bs,af,cf,df,ln,wa,lt,oe,Cf,Ct,Pe,Re,Of,Vs,La,Bf,qf,fn,ug,$a,hg,gn,bg,pi,xg,sn,_g,li,bl,fi,Eg,Lg,Ag,Pg,ci,Ie,di,mi,se,ui,re,mn,ut,le,hi,Zg,xl,_l=C(()=>{Qr();Ps=class{constructor(){this._request=null,this._charts=new Map,this._running=!1,this._lastDate=void 0}_notify(t,e,n,s){let o=e.listeners[s],r=e.duration;o.forEach(a=>a({chart:t,initial:e.initial,numSteps:r,currentStep:Math.min(n-e.start,r)}))}_refresh(){this._request||(this._running=!0,this._request=es.call(window,()=>{this._update(),this._request=null,this._running&&this._refresh()}))}_update(t=Date.now()){let e=0;this._charts.forEach((n,s)=>{if(!n.running||!n.items.length)return;let o=n.items,r=o.length-1,a=!1,l;for(;r>=0;--r)l=o[r],l._active?(l._total>n.duration&&(n.duration=l._total),l.tick(t),a=!0):(o[r]=o[o.length-1],o.pop());a&&(s.draw(),this._notify(s,n,t,"progress")),o.length||(n.running=!1,this._notify(s,n,t,"complete"),n.initial=!1),e+=o.length}),this._lastDate=t,e===0&&(this._running=!1)}_getAnims(t){let e=this._charts,n=e.get(t);return n||(n={running:!1,initial:!0,items:[],listeners:{complete:[],progress:[]}},e.set(t,n)),n}listen(t,e,n){this._getAnims(t).listeners[e].push(n)}add(t,e){!e||!e.length||this._getAnims(t).items.push(...e)}has(t){return this._getAnims(t).items.length>0}start(t){let e=this._charts.get(t);e&&(e.running=!0,e.start=Date.now(),e.duration=e.items.reduce((n,s)=>Math.max(n,s._duration),0),this._refresh())}running(t){if(!this._running)return!1;let e=this._charts.get(t);return!(!e||!e.running||!e.items.length)}stop(t){let e=this._charts.get(t);if(!e||!e.items.length)return;let n=e.items,s=n.length-1;for(;s>=0;--s)n[s].cancel();e.items=[],this._notify(t,e,Date.now(),"complete")}remove(t){return this._charts.delete(t)}},Rt=new Ps,ta="transparent",zu={boolean(i,t,e){return e>.5?t:i},color(i,t,e){let n=rs(i||ta),s=n.valid&&rs(t||ta);return s&&s.valid?s.mix(n,e).hexString():t},number(i,t,e){return i+(t-i)*e}},Rs=class{constructor(t,e,n,s){let o=e[n];s=Te([t.to,s,o,t.from]);let r=Te([t.from,o,s]);this._active=!0,this._fn=t.fn||zu[t.type||typeof r],this._easing=me[t.easing]||me.linear,this._start=Math.floor(Date.now()+(t.delay||0)),this._duration=this._total=Math.floor(t.duration),this._loop=!!t.loop,this._target=e,this._prop=n,this._from=r,this._to=s,this._promises=void 0}active(){return this._active}update(t,e,n){if(this._active){this._notify(!1);let s=this._target[this._prop],o=n-this._start,r=this._duration-o;this._start=n,this._duration=Math.floor(Math.max(r,t.duration)),this._total+=o,this._loop=!!t.loop,this._to=Te([t.to,e,s,t.from]),this._from=Te([t.from,s,e])}}cancel(){this._active&&(this.tick(Date.now()),this._active=!1,this._notify(!1))}tick(t){let e=t-this._start,n=this._duration,s=this._prop,o=this._from,r=this._loop,a=this._to,l;if(this._active=o!==a&&(r||e<n),!this._active){this._target[s]=a,this._notify(!0);return}if(e<0){this._target[s]=o;return}l=e/n%2,l=r&&l>1?2-l:l,l=this._easing(Math.min(1,Math.max(0,l))),this._target[s]=this._fn(o,a,l)}wait(){let t=this._promises||(this._promises=[]);return new Promise((e,n)=>{t.push({res:e,rej:n})})}_notify(t){let e=t?"res":"rej",n=this._promises||[];for(let s=0;s<n.length;s++)n[s][e]()}},cn=class{constructor(t,e){this._chart=t,this._properties=new Map,this.configure(e)}configure(t){if(!O(t))return;let e=Object.keys(j.animation),n=this._properties;Object.getOwnPropertyNames(t).forEach(s=>{let o=t[s];if(!O(o))return;let r={};for(let a of e)r[a]=o[a];(N(o.properties)&&o.properties||[s]).forEach(a=>{(a===s||!n.has(a))&&n.set(a,r)})})}_animateOptions(t,e){let n=e.options,s=Bu(t,n);if(!s)return[];let o=this._createAnimations(s,n);return n.$shared&&Wu(t.options.$animations,n).then(()=>{t.options=n},()=>{}),o}_createAnimations(t,e){let n=this._properties,s=[],o=t.$animations||(t.$animations={}),r=Object.keys(e),a=Date.now(),l;for(l=r.length-1;l>=0;--l){let c=r[l];if(c.charAt(0)==="$")continue;if(c==="options"){s.push(...this._animateOptions(t,e));continue}let d=e[c],u=o[c],h=n.get(c);if(u)if(h&&u.active()){u.update(h,d,a);continue}else u.cancel();if(!h||!h.duration){t[c]=d;continue}o[c]=u=new Rs(h,t,c,d),s.push(u)}return s}update(t,e){if(this._properties.size===0){Object.assign(t,e);return}let n=this._createAnimations(t,e);if(n.length)return Rt.add(this._chart,n),!0}};Ss=i=>i==="reset"||i==="none",oa=(i,t)=>t?i:Object.assign({},i),Xu=(i,t,e)=>i&&!t.hidden&&t._stacked&&{keys:Qa(e,!0),values:null},gt=class{constructor(t,e){this.chart=t,this._ctx=t.ctx,this.index=e,this._cachedDataOpts={},this._cachedMeta=this.getMeta(),this._type=this._cachedMeta.type,this.options=void 0,this._parsing=!1,this._data=void 0,this._objectData=void 0,this._sharedOptions=void 0,this._drawStart=void 0,this._drawCount=void 0,this.enableOptionSharing=!1,this.supportsDecimation=!1,this.$context=void 0,this._syncList=[],this.datasetElementType=new.target.datasetElementType,this.dataElementType=new.target.dataElementType,this.initialize()}initialize(){let t=this._cachedMeta;this.configure(),this.linkScales(),t._stacked=vs(t.vScale,t),this.addElements(),this.options.fill&&!this.chart.isPluginEnabled("filler")&&console.warn("Tried to use the 'fill' option without the 'Filler' plugin enabled. Please import and register the 'Filler' plugin and make sure it is not disabled in the options")}updateIndex(t){this.index!==t&&ei(this._cachedMeta),this.index=t}linkScales(){let t=this.chart,e=this._cachedMeta,n=this.getDataset(),s=(u,h,f,g)=>u==="x"?h:u==="r"?g:f,o=e.xAxisID=E(n.xAxisID,Ms(t,"x")),r=e.yAxisID=E(n.yAxisID,Ms(t,"y")),a=e.rAxisID=E(n.rAxisID,Ms(t,"r")),l=e.indexAxis,c=e.iAxisID=s(l,o,r,a),d=e.vAxisID=s(l,r,o,a);e.xScale=this.getScaleForId(o),e.yScale=this.getScaleForId(r),e.rScale=this.getScaleForId(a),e.iScale=this.getScaleForId(c),e.vScale=this.getScaleForId(d)}getDataset(){return this.chart.data.datasets[this.index]}getMeta(){return this.chart.getDatasetMeta(this.index)}getScaleForId(t){return this.chart.scales[t]}_getOtherScale(t){let e=this._cachedMeta;return t===e.iScale?e.vScale:e.iScale}reset(){this._update("reset")}_destroy(){let t=this._cachedMeta;this._data&&Qn(this._data,this),t._stacked&&ei(t)}_dataCheck(){let t=this.getDataset(),e=t.data||(t.data=[]),n=this._data;if(O(e)){let s=this._cachedMeta;this._data=ju(e,s)}else if(n!==e){if(n){Qn(n,this);let s=this._cachedMeta;ei(s),s._parsed=[]}e&&Object.isExtensible(e)&&Or(e,this),this._syncList=[],this._data=e}}addElements(){let t=this._cachedMeta;this._dataCheck(),this.datasetElementType&&(t.dataset=new this.datasetElementType)}buildOrUpdateElements(t){let e=this._cachedMeta,n=this.getDataset(),s=!1;this._dataCheck();let o=e._stacked;e._stacked=vs(e.vScale,e),e.stack!==n.stack&&(s=!0,ei(e),e.stack=n.stack),this._resyncElements(t),(s||o!==e._stacked)&&(sa(this,e._parsed),e._stacked=vs(e.vScale,e))}configure(){let t=this.chart.config,e=t.datasetScopeKeys(this._type),n=t.getOptionScopes(this.getDataset(),e,!0);this.options=t.createResolver(n,this.getContext()),this._parsing=this.options.parsing,this._cachedDataOpts={}}parse(t,e){let{_cachedMeta:n,_data:s}=this,{iScale:o,_stacked:r}=n,a=o.axis,l=t===0&&e===s.length?!0:n._sorted,c=t>0&&n._parsed[t-1],d,u,h;if(this._parsing===!1)n._parsed=s,n._sorted=!0,h=s;else{N(s[t])?h=this.parseArrayData(n,s,t,e):O(s[t])?h=this.parseObjectData(n,s,t,e):h=this.parsePrimitiveData(n,s,t,e);let f=()=>u[a]===null||c&&u[a]<c[a];for(d=0;d<e;++d)n._parsed[d+t]=u=h[d],l&&(f()&&(l=!1),c=u);n._sorted=l}r&&sa(this,h)}parsePrimitiveData(t,e,n,s){let{iScale:o,vScale:r}=t,a=o.axis,l=r.axis,c=o.getLabels(),d=o===r,u=new Array(s),h,f,g;for(h=0,f=s;h<f;++h)g=h+n,u[h]={[a]:d||o.parse(c[g],g),[l]:r.parse(e[g],g)};return u}parseArrayData(t,e,n,s){let{xScale:o,yScale:r}=t,a=new Array(s),l,c,d,u;for(l=0,c=s;l<c;++l)d=l+n,u=e[d],a[l]={x:o.parse(u[0],d),y:r.parse(u[1],d)};return a}parseObjectData(t,e,n,s){let{xScale:o,yScale:r}=t,{xAxisKey:a="x",yAxisKey:l="y"}=this._parsing,c=new Array(s),d,u,h,f;for(d=0,u=s;d<u;++d)h=d+n,f=e[h],c[d]={x:o.parse(Dt(f,a),h),y:r.parse(Dt(f,l),h)};return c}getParsed(t){return this._cachedMeta._parsed[t]}getDataElement(t){return this._cachedMeta.data[t]}applyStack(t,e,n){let s=this.chart,o=this._cachedMeta,r=e[t.axis],a={keys:Qa(s,!0),values:e._stacks[t.axis]._visualValues};return ia(a,r,o.index,{mode:n})}updateRangeFromParsed(t,e,n,s){let o=n[e.axis],r=o===null?NaN:o,a=s&&n._stacks[e.axis];s&&a&&(s.values=a,r=ia(s,o,this._cachedMeta.index)),t.min=Math.min(t.min,r),t.max=Math.max(t.max,r)}getMinMax(t,e){let n=this._cachedMeta,s=n._parsed,o=n._sorted&&t===n.iScale,r=s.length,a=this._getOtherScale(t),l=Xu(e,n,this.chart),c={min:Number.POSITIVE_INFINITY,max:Number.NEGATIVE_INFINITY},{min:d,max:u}=Yu(a),h,f;function g(){f=s[h];let p=f[a.axis];return!Y(f[t.axis])||d>p||u<p}for(h=0;h<r&&!(!g()&&(this.updateRangeFromParsed(c,t,f,l),o));++h);if(o){for(h=r-1;h>=0;--h)if(!g()){this.updateRangeFromParsed(c,t,f,l);break}}return c}getAllParsedValues(t){let e=this._cachedMeta._parsed,n=[],s,o,r;for(s=0,o=e.length;s<o;++s)r=e[s][t.axis],Y(r)&&n.push(r);return n}getMaxOverflow(){return!1}getLabelAndValue(t){let e=this._cachedMeta,n=e.iScale,s=e.vScale,o=this.getParsed(t);return{label:n?""+n.getLabelForValue(o[n.axis]):"",value:s?""+s.getLabelForValue(o[s.axis]):""}}_update(t){let e=this._cachedMeta;this.update(t||"default"),e._clip=Vu(E(this.options.clip,Nu(e.xScale,e.yScale,this.getMaxOverflow())))}update(t){}draw(){let t=this._ctx,e=this.chart,n=this._cachedMeta,s=n.data||[],o=e.chartArea,r=[],a=this._drawStart||0,l=this._drawCount||s.length-a,c=this.options.drawActiveElementsOnTop,d;for(n.dataset&&n.dataset.draw(t,o,a,l),d=a;d<a+l;++d){let u=s[d];u.hidden||(u.active&&c?r.push(u):u.draw(t,o))}for(d=0;d<r.length;++d)r[d].draw(t,o)}getStyle(t,e){let n=e?"active":"default";return t===void 0&&this._cachedMeta.dataset?this.resolveDatasetElementOptions(n):this.resolveDataElementOptions(t||0,n)}getContext(t,e,n){let s=this.getDataset(),o;if(t>=0&&t<this._cachedMeta.data.length){let r=this._cachedMeta.data[t];o=r.$context||(r.$context=Gu(this.getContext(),t,r)),o.parsed=this.getParsed(t),o.raw=s.data[t],o.index=o.dataIndex=t}else o=this.$context||(this.$context=Ku(this.chart.getContext(),this.index)),o.dataset=s,o.index=o.datasetIndex=this.index;return o.active=!!e,o.mode=n,o}resolveDatasetElementOptions(t){return this._resolveElementOptions(this.datasetElementType.id,t)}resolveDataElementOptions(t,e){return this._resolveElementOptions(this.dataElementType.id,e,t)}_resolveElementOptions(t,e="default",n){let s=e==="active",o=this._cachedDataOpts,r=t+"-"+e,a=o[r],l=this.enableOptionSharing&&_e(n);if(a)return oa(a,l);let c=this.chart.config,d=c.datasetElementScopeKeys(this._type,t),u=s?[`${t}Hover`,"hover",t,""]:[t,""],h=c.getOptionScopes(this.getDataset(),d),f=Object.keys(j.elements[t]),g=()=>this.getContext(n,s,e),p=c.resolveNamedOptions(h,f,g,u);return p.$shared&&(p.$shared=l,o[r]=Object.freeze(oa(p,l))),p}_resolveAnimations(t,e,n){let s=this.chart,o=this._cachedDataOpts,r=`animation-${e}`,a=o[r];if(a)return a;let l;if(s.options.animation!==!1){let d=this.chart.config,u=d.datasetAnimationScopeKeys(this._type,e),h=d.getOptionScopes(this.getDataset(),u);l=d.createResolver(h,this.getContext(t,n,e))}let c=new cn(s,l&&l.animations);return l&&l._cacheable&&(o[r]=Object.freeze(c)),c}getSharedOptions(t){if(t.$shared)return this._sharedOptions||(this._sharedOptions=Object.assign({},t))}includeOptions(t,e){return!e||Ss(t)||this.chart._animationsDisabled}_getSharedOptions(t,e){let n=this.resolveDataElementOptions(t,e),s=this._sharedOptions,o=this.getSharedOptions(n),r=this.includeOptions(e,o)||o!==s;return this.updateSharedOptions(o,e,n),{sharedOptions:o,includeOptions:r}}updateElement(t,e,n,s){Ss(s)?Object.assign(t,n):this._resolveAnimations(e,s).update(t,n)}updateSharedOptions(t,e,n){t&&!Ss(e)&&this._resolveAnimations(void 0,e).update(t,n)}_setStyle(t,e,n,s){t.active=s;let o=this.getStyle(e,s);this._resolveAnimations(e,n,s).update(t,{options:!s&&this.getSharedOptions(o)||o})}removeHoverStyle(t,e,n){this._setStyle(t,n,"active",!1)}setHoverStyle(t,e,n){this._setStyle(t,n,"active",!0)}_removeDatasetHoverStyle(){let t=this._cachedMeta.dataset;t&&this._setStyle(t,void 0,"active",!1)}_setDatasetHoverStyle(){let t=this._cachedMeta.dataset;t&&this._setStyle(t,void 0,"active",!0)}_resyncElements(t){let e=this._data,n=this._cachedMeta.data;for(let[a,l,c]of this._syncList)this[a](l,c);this._syncList=[];let s=n.length,o=e.length,r=Math.min(o,s);r&&this.parse(0,r),o>s?this._insertElements(s,o-s,t):o<s&&this._removeElements(o,s-o)}_insertElements(t,e,n=!0){let s=this._cachedMeta,o=s.data,r=t+e,a,l=c=>{for(c.length+=e,a=c.length-1;a>=r;a--)c[a]=c[a-e]};for(l(o),a=t;a<r;++a)o[a]=new this.dataElementType;this._parsing&&l(s._parsed),this.parse(t,e),n&&this.updateElements(o,t,e,"reset")}updateElements(t,e,n,s){}_removeElements(t,e){let n=this._cachedMeta;if(this._parsing){let s=n._parsed.splice(t,e);n._stacked&&ei(n,s)}n.data.splice(t,e)}_sync(t){if(this._parsing)this._syncList.push(t);else{let[e,n,s]=t;this[e](n,s)}this.chart._dataChanges.push([this.index,...t])}_onDataPush(){let t=arguments.length;this._sync(["_insertElements",this.getDataset().data.length-t,t])}_onDataPop(){this._sync(["_removeElements",this._cachedMeta.data.length-1,1])}_onDataShift(){this._sync(["_removeElements",0,1])}_onDataSplice(t,e){e&&this._sync(["_removeElements",t,e]);let n=arguments.length-2;n&&this._sync(["_insertElements",t,n])}_onDataUnshift(){this._sync(["_insertElements",0,arguments.length])}};M(gt,"defaults",{}),M(gt,"datasetElementType",null),M(gt,"dataElementType",null);Ce=class extends gt{parsePrimitiveData(t,e,n,s){return ra(t,e,n,s)}parseArrayData(t,e,n,s){return ra(t,e,n,s)}parseObjectData(t,e,n,s){let{iScale:o,vScale:r}=t,{xAxisKey:a="x",yAxisKey:l="y"}=this._parsing,c=o.axis==="x"?a:l,d=r.axis==="x"?a:l,u=[],h,f,g,p;for(h=n,f=n+s;h<f;++h)p=e[h],g={},g[o.axis]=o.parse(Dt(p,c),h),u.push(tl(Dt(p,d),g,r,h));return u}updateRangeFromParsed(t,e,n,s){super.updateRangeFromParsed(t,e,n,s);let o=n._custom;o&&e===this._cachedMeta.vScale&&(t.min=Math.min(t.min,o.min),t.max=Math.max(t.max,o.max))}getMaxOverflow(){return 0}getLabelAndValue(t){let e=this._cachedMeta,{iScale:n,vScale:s}=e,o=this.getParsed(t),r=o._custom,a=ks(r)?"["+r.start+", "+r.end+"]":""+s.getLabelForValue(o[s.axis]);return{label:""+n.getLabelForValue(o[n.axis]),value:a}}initialize(){this.enableOptionSharing=!0,super.initialize();let t=this._cachedMeta;t.stack=this.getDataset().stack}update(t){let e=this._cachedMeta;this.updateElements(e.data,0,e.data.length,t)}updateElements(t,e,n,s){let o=s==="reset",{index:r,_cachedMeta:{vScale:a}}=this,l=a.getBasePixel(),c=a.isHorizontal(),d=this._getRuler(),{sharedOptions:u,includeOptions:h}=this._getSharedOptions(e,s);for(let f=e;f<e+n;f++){let g=this.getParsed(f),p=o||R(g[a.axis])?{base:l,head:l}:this._calculateBarValuePixels(f),m=this._calculateBarIndexPixels(f,d),b=(g._stacks||{})[a.axis],y={horizontal:c,base:p.base,enableBorderRadius:!b||ks(g._custom)||r===b._top||r===b._bottom,x:c?p.head:m.center,y:c?m.center:p.head,height:c?m.size:Math.abs(p.size),width:c?Math.abs(p.size):m.size};h&&(y.options=u||this.resolveDataElementOptions(f,t[f].active?"active":s));let _=y.options||t[f].options;sh(y,_,b,r),rh(y,_,d.ratio),this.updateElement(t[f],f,y,s)}}_getStacks(t,e){let{iScale:n}=this._cachedMeta,s=n.getMatchingVisibleMetas(this._type).filter(d=>d.controller.options.grouped),o=n.options.stacked,r=[],a=this._cachedMeta.controller.getParsed(e),l=a&&a[n.axis],c=d=>{let u=d._parsed.find(f=>f[n.axis]===l),h=u&&u[d.vScale.axis];if(R(h)||isNaN(h))return!0};for(let d of s)if(!(e!==void 0&&c(d))&&((o===!1||r.indexOf(d.stack)===-1||o===void 0&&d.stack===void 0)&&r.push(d.stack),d.index===t))break;return r.length||r.push(void 0),r}_getStackCount(t){return this._getStacks(void 0,t).length}_getAxisCount(){return this._getAxis().length}getFirstScaleIdForIndexAxis(){let t=this.chart.scales,e=this.chart.options.indexAxis;return Object.keys(t).filter(n=>t[n].axis===e).shift()}_getAxis(){let t={},e=this.getFirstScaleIdForIndexAxis();for(let n of this.chart.data.datasets)t[E(this.chart.options.indexAxis==="x"?n.xAxisID:n.yAxisID,e)]=!0;return Object.keys(t)}_getStackIndex(t,e,n){let s=this._getStacks(t,n),o=e!==void 0?s.indexOf(e):-1;return o===-1?s.length-1:o}_getRuler(){let t=this.options,e=this._cachedMeta,n=e.iScale,s=[],o,r;for(o=0,r=e.data.length;o<r;++o)s.push(n.getPixelForValue(this.getParsed(o)[n.axis],o));let a=t.barThickness;return{min:a||Zu(e),pixels:s,start:n._startPixel,end:n._endPixel,stackCount:this._getStackCount(),scale:n,grouped:t.grouped,ratio:a?1:t.categoryPercentage*t.barPercentage}}_calculateBarValuePixels(t){let{_cachedMeta:{vScale:e,_stacked:n,index:s},options:{base:o,minBarLength:r}}=this,a=o||0,l=this.getParsed(t),c=l._custom,d=ks(c),u=l[e.axis],h=0,f=n?this.applyStack(e,l,n):u,g,p;f!==u&&(h=f-u,f=u),d&&(u=c.barStart,f=c.barEnd-c.barStart,u!==0&&xt(u)!==xt(c.barEnd)&&(h=0),h+=u);let m=!R(o)&&!d?o:h,b=e.getPixelForValue(m);if(this.chart.getDataVisibility(t)?g=e.getPixelForValue(h+f):g=b,p=g-b,Math.abs(p)<r){p=ih(p,e,a)*r,u===a&&(b-=p/2);let y=e.getPixelForDecimal(0),_=e.getPixelForDecimal(1),v=Math.min(y,_),x=Math.max(y,_);b=Math.max(Math.min(b,x),v),g=b+p,n&&!d&&(l._stacks[e.axis]._visualValues[s]=e.getValueForPixel(g)-e.getValueForPixel(b))}if(b===e.getPixelForValue(a)){let y=xt(p)*e.getLineWidthForValue(a)/2;b+=y,p-=y}return{size:p,base:b,head:g,center:g+p/2}}_calculateBarIndexPixels(t,e){let n=e.scale,s=this.options,o=s.skipNull,r=E(s.maxBarThickness,1/0),a,l,c=this._getAxisCount();if(e.grouped){let d=o?this._getStackCount(t):e.stackCount,u=s.barThickness==="flex"?th(t,e,s,d*c):Qu(t,e,s,d*c),h=this.chart.options.indexAxis==="x"?this.getDataset().xAxisID:this.getDataset().yAxisID,f=this._getAxis().indexOf(E(h,this.getFirstScaleIdForIndexAxis())),g=this._getStackIndex(this.index,this._cachedMeta.stack,o?t:void 0)+f;a=u.start+u.chunk*g+u.chunk/2,l=Math.min(r,u.chunk*u.ratio)}else a=n.getPixelForValue(this.getParsed(t)[n.axis],t),l=Math.min(r,e.min*e.ratio);return{base:a-l/2,head:a+l/2,center:a,size:l}}draw(){let t=this._cachedMeta,e=t.vScale,n=t.data,s=n.length,o=0;for(;o<s;++o)this.getParsed(o)[e.axis]!==null&&!n[o].hidden&&n[o].draw(this._ctx)}};M(Ce,"id","bar"),M(Ce,"defaults",{datasetElementType:!1,dataElementType:"bar",categoryPercentage:.8,barPercentage:.9,grouped:!0,animations:{numbers:{type:"number",properties:["x","y","base","width","height"]}}}),M(Ce,"overrides",{scales:{_index_:{type:"category",offset:!0,grid:{offset:!0}},_value_:{type:"linear",beginAtZero:!0}}});Ee=class extends gt{initialize(){this.enableOptionSharing=!0,super.initialize()}parsePrimitiveData(t,e,n,s){let o=super.parsePrimitiveData(t,e,n,s);for(let r=0;r<o.length;r++)o[r]._custom=this.resolveDataElementOptions(r+n).radius;return o}parseArrayData(t,e,n,s){let o=super.parseArrayData(t,e,n,s);for(let r=0;r<o.length;r++){let a=e[n+r];o[r]._custom=E(a[2],this.resolveDataElementOptions(r+n).radius)}return o}parseObjectData(t,e,n,s){let o=super.parseObjectData(t,e,n,s);for(let r=0;r<o.length;r++){let a=e[n+r];o[r]._custom=E(a&&a.r&&+a.r,this.resolveDataElementOptions(r+n).radius)}return o}getMaxOverflow(){let t=this._cachedMeta.data,e=0;for(let n=t.length-1;n>=0;--n)e=Math.max(e,t[n].size(this.resolveDataElementOptions(n))/2);return e>0&&e}getLabelAndValue(t){let e=this._cachedMeta,n=this.chart.data.labels||[],{xScale:s,yScale:o}=e,r=this.getParsed(t),a=s.getLabelForValue(r.x),l=o.getLabelForValue(r.y),c=r._custom;return{label:n[t]||"",value:"("+a+", "+l+(c?", "+c:"")+")"}}update(t){let e=this._cachedMeta.data;this.updateElements(e,0,e.length,t)}updateElements(t,e,n,s){let o=s==="reset",{iScale:r,vScale:a}=this._cachedMeta,{sharedOptions:l,includeOptions:c}=this._getSharedOptions(e,s),d=r.axis,u=a.axis;for(let h=e;h<e+n;h++){let f=t[h],g=!o&&this.getParsed(h),p={},m=p[d]=o?r.getPixelForDecimal(.5):r.getPixelForValue(g[d]),b=p[u]=o?a.getBasePixel():a.getPixelForValue(g[u]);p.skip=isNaN(m)||isNaN(b),c&&(p.options=l||this.resolveDataElementOptions(h,f.active?"active":s),o&&(p.options.radius=0)),this.updateElement(f,h,p,s)}}resolveDataElementOptions(t,e){let n=this.getParsed(t),s=super.resolveDataElementOptions(t,e);s.$shared&&(s=Object.assign({},s,{$shared:!1}));let o=s.radius;return e!=="active"&&(s.radius=0),s.radius+=E(n&&n._custom,o),s}};M(Ee,"id","bubble"),M(Ee,"defaults",{datasetElementType:!1,dataElementType:"point",animations:{numbers:{type:"number",properties:["x","y","borderWidth","radius"]}}}),M(Ee,"overrides",{scales:{x:{type:"linear"},y:{type:"linear"}}});It=class extends gt{constructor(t,e){super(t,e),this.enableOptionSharing=!0,this.innerRadius=void 0,this.outerRadius=void 0,this.offsetX=void 0,this.offsetY=void 0}linkScales(){}parse(t,e){let n=this.getDataset().data,s=this._cachedMeta;if(this._parsing===!1)s._parsed=n;else{let o=l=>+n[l];if(O(n[t])){let{key:l="value"}=this._parsing;o=c=>+Dt(n[c],l)}let r,a;for(r=t,a=t+e;r<a;++r)s._parsed[r]=o(r)}}_getRotation(){return bt(this.options.rotation-90)}_getCircumference(){return bt(this.options.circumference)}_getRotationExtents(){let t=V,e=-V;for(let n=0;n<this.chart.data.datasets.length;++n)if(this.chart.isDatasetVisible(n)&&this.chart.getDatasetMeta(n).type===this._type){let s=this.chart.getDatasetMeta(n).controller,o=s._getRotation(),r=s._getCircumference();t=Math.min(t,o),e=Math.max(e,o+r)}return{rotation:t,circumference:e-t}}update(t){let e=this.chart,{chartArea:n}=e,s=this._cachedMeta,o=s.data,r=this.getMaxBorderWidth()+this.getMaxOffset(o)+this.options.spacing,a=Math.max((Math.min(n.width,n.height)-r)/2,0),l=Math.min(Tr(this.options.cutout,a),1),c=this._getRingWeight(this.index),{circumference:d,rotation:u}=this._getRotationExtents(),{ratioX:h,ratioY:f,offsetX:g,offsetY:p}=ah(u,d,l),m=(n.width-r)/h,b=(n.height-r)/f,y=Math.max(Math.min(m,b)/2,0),_=Un(this.options.radius,y),v=Math.max(_*l,0),x=(_-v)/this._getVisibleDatasetWeightTotal();this.offsetX=g*_,this.offsetY=p*_,s.total=this.calculateTotal(),this.outerRadius=_-x*this._getRingWeightOffset(this.index),this.innerRadius=Math.max(this.outerRadius-x*c,0),this.updateElements(o,0,o.length,t)}_circumference(t,e){let n=this.options,s=this._cachedMeta,o=this._getCircumference();return e&&n.animation.animateRotate||!this.chart.getDataVisibility(t)||s._parsed[t]===null||s.data[t].hidden?0:this.calculateCircumference(s._parsed[t]*o/V)}updateElements(t,e,n,s){let o=s==="reset",r=this.chart,a=r.chartArea,c=r.options.animation,d=(a.left+a.right)/2,u=(a.top+a.bottom)/2,h=o&&c.animateScale,f=h?0:this.innerRadius,g=h?0:this.outerRadius,{sharedOptions:p,includeOptions:m}=this._getSharedOptions(e,s),b=this._getRotation(),y;for(y=0;y<e;++y)b+=this._circumference(y,o);for(y=e;y<e+n;++y){let _=this._circumference(y,o),v=t[y],x={x:d+this.offsetX,y:u+this.offsetY,startAngle:b,endAngle:b+_,circumference:_,outerRadius:g,innerRadius:f};m&&(x.options=p||this.resolveDataElementOptions(y,v.active?"active":s)),b+=_,this.updateElement(v,y,x,s)}}calculateTotal(){let t=this._cachedMeta,e=t.data,n=0,s;for(s=0;s<e.length;s++){let o=t._parsed[s];o!==null&&!isNaN(o)&&this.chart.getDataVisibility(s)&&!e[s].hidden&&(n+=Math.abs(o))}return n}calculateCircumference(t){let e=this._cachedMeta.total;return e>0&&!isNaN(t)?V*(Math.abs(t)/e):0}getLabelAndValue(t){let e=this._cachedMeta,n=this.chart,s=n.data.labels||[],o=Se(e._parsed[t],n.options.locale);return{label:s[t]||"",value:o}}getMaxBorderWidth(t){let e=0,n=this.chart,s,o,r,a,l;if(!t){for(s=0,o=n.data.datasets.length;s<o;++s)if(n.isDatasetVisible(s)){r=n.getDatasetMeta(s),t=r.data,a=r.controller;break}}if(!t)return 0;for(s=0,o=t.length;s<o;++s)l=a.resolveDataElementOptions(s),l.borderAlign!=="inner"&&(e=Math.max(e,l.borderWidth||0,l.hoverBorderWidth||0));return e}getMaxOffset(t){let e=0;for(let n=0,s=t.length;n<s;++n){let o=this.resolveDataElementOptions(n);e=Math.max(e,o.offset||0,o.hoverOffset||0)}return e}_getRingWeightOffset(t){let e=0;for(let n=0;n<t;++n)this.chart.isDatasetVisible(n)&&(e+=this._getRingWeight(n));return e}_getRingWeight(t){return Math.max(E(this.chart.data.datasets[t].weight,1),0)}_getVisibleDatasetWeightTotal(){return this._getRingWeightOffset(this.chart.data.datasets.length)||1}};M(It,"id","doughnut"),M(It,"defaults",{datasetElementType:!1,dataElementType:"arc",animation:{animateRotate:!0,animateScale:!1},animations:{numbers:{type:"number",properties:["circumference","endAngle","innerRadius","outerRadius","startAngle","x","y","offset","borderWidth","spacing"]}},cutout:"50%",rotation:0,circumference:360,radius:"100%",spacing:0,indexAxis:"r"}),M(It,"descriptors",{_scriptable:t=>t!=="spacing",_indexable:t=>t!=="spacing"&&!t.startsWith("borderDash")&&!t.startsWith("hoverBorderDash")}),M(It,"overrides",{aspectRatio:1,plugins:{legend:{labels:{generateLabels(t){let e=t.data,{labels:{pointStyle:n,textAlign:s,color:o,useBorderRadius:r,borderRadius:a}}=t.legend.options;return e.labels.length&&e.datasets.length?e.labels.map((l,c)=>{let u=t.getDatasetMeta(0).controller.getStyle(c);return{text:l,fillStyle:u.backgroundColor,fontColor:o,hidden:!t.getDataVisibility(c),lineDash:u.borderDash,lineDashOffset:u.borderDashOffset,lineJoin:u.borderJoinStyle,lineWidth:u.borderWidth,strokeStyle:u.borderColor,textAlign:s,pointStyle:n,borderRadius:r&&(a||u.borderRadius),index:c}}):[]}},onClick(t,e,n){n.chart.toggleDataVisibility(e.index),n.chart.update()}}}});Le=class extends gt{initialize(){this.enableOptionSharing=!0,this.supportsDecimation=!0,super.initialize()}update(t){let e=this._cachedMeta,{dataset:n,data:s=[],_dataset:o}=e,r=this.chart._animationsDisabled,{start:a,count:l}=ns(e,s,r);this._drawStart=a,this._drawCount=l,ss(e)&&(a=0,l=s.length),n._chart=this.chart,n._datasetIndex=this.index,n._decimated=!!o._decimated,n.points=s;let c=this.resolveDatasetElementOptions(t);this.options.showLine||(c.borderWidth=0),c.segment=this.options.segment,this.updateElement(n,void 0,{animated:!r,options:c},t),this.updateElements(s,a,l,t)}updateElements(t,e,n,s){let o=s==="reset",{iScale:r,vScale:a,_stacked:l,_dataset:c}=this._cachedMeta,{sharedOptions:d,includeOptions:u}=this._getSharedOptions(e,s),h=r.axis,f=a.axis,{spanGaps:g,segment:p}=this.options,m=ee(g)?g:Number.POSITIVE_INFINITY,b=this.chart._animationsDisabled||o||s==="none",y=e+n,_=t.length,v=e>0&&this.getParsed(e-1);for(let x=0;x<_;++x){let S=t[x],k=b?S:{};if(x<e||x>=y){k.skip=!0;continue}let T=this.getParsed(x),w=R(T[f]),L=k[h]=r.getPixelForValue(T[h],x),A=k[f]=o||w?a.getBasePixel():a.getPixelForValue(l?this.applyStack(a,T,l):T[f],x);k.skip=isNaN(L)||isNaN(A)||w,k.stop=x>0&&Math.abs(T[h]-v[h])>m,p&&(k.parsed=T,k.raw=c.data[x]),u&&(k.options=d||this.resolveDataElementOptions(x,S.active?"active":s)),b||this.updateElement(S,x,k,s),v=T}}getMaxOverflow(){let t=this._cachedMeta,e=t.dataset,n=e.options&&e.options.borderWidth||0,s=t.data||[];if(!s.length)return n;let o=s[0].size(this.resolveDataElementOptions(0)),r=s[s.length-1].size(this.resolveDataElementOptions(s.length-1));return Math.max(n,o,r)/2}draw(){let t=this._cachedMeta;t.dataset.updateControlPoints(this.chart.chartArea,t.iScale.axis),super.draw()}};M(Le,"id","line"),M(Le,"defaults",{datasetElementType:"line",dataElementType:"point",showLine:!0,spanGaps:!1}),M(Le,"overrides",{scales:{_index_:{type:"category"},_value_:{type:"linear"}}});ae=class extends gt{constructor(t,e){super(t,e),this.innerRadius=void 0,this.outerRadius=void 0}getLabelAndValue(t){let e=this._cachedMeta,n=this.chart,s=n.data.labels||[],o=Se(e._parsed[t].r,n.options.locale);return{label:s[t]||"",value:o}}parseObjectData(t,e,n,s){return fs.bind(this)(t,e,n,s)}update(t){let e=this._cachedMeta.data;this._updateRadius(),this.updateElements(e,0,e.length,t)}getMinMax(){let t=this._cachedMeta,e={min:Number.POSITIVE_INFINITY,max:Number.NEGATIVE_INFINITY};return t.data.forEach((n,s)=>{let o=this.getParsed(s).r;!isNaN(o)&&this.chart.getDataVisibility(s)&&(o<e.min&&(e.min=o),o>e.max&&(e.max=o))}),e}_updateRadius(){let t=this.chart,e=t.chartArea,n=t.options,s=Math.min(e.right-e.left,e.bottom-e.top),o=Math.max(s/2,0),r=Math.max(n.cutoutPercentage?o/100*n.cutoutPercentage:1,0),a=(o-r)/t.getVisibleDatasetCount();this.outerRadius=o-a*this.index,this.innerRadius=this.outerRadius-a}updateElements(t,e,n,s){let o=s==="reset",r=this.chart,l=r.options.animation,c=this._cachedMeta.rScale,d=c.xCenter,u=c.yCenter,h=c.getIndexAngle(0)-.5*F,f=h,g,p=360/this.countVisibleElements();for(g=0;g<e;++g)f+=this._computeAngle(g,s,p);for(g=e;g<e+n;g++){let m=t[g],b=f,y=f+this._computeAngle(g,s,p),_=r.getDataVisibility(g)?c.getDistanceFromCenterForValue(this.getParsed(g).r):0;f=y,o&&(l.animateScale&&(_=0),l.animateRotate&&(b=y=h));let v={x:d,y:u,innerRadius:0,outerRadius:_,startAngle:b,endAngle:y,options:this.resolveDataElementOptions(g,m.active?"active":s)};this.updateElement(m,g,v,s)}}countVisibleElements(){let t=this._cachedMeta,e=0;return t.data.forEach((n,s)=>{!isNaN(this.getParsed(s).r)&&this.chart.getDataVisibility(s)&&e++}),e}_computeAngle(t,e,n){return this.chart.getDataVisibility(t)?bt(this.resolveDataElementOptions(t,e).angle||n):0}};M(ae,"id","polarArea"),M(ae,"defaults",{dataElementType:"arc",animation:{animateRotate:!0,animateScale:!0},animations:{numbers:{type:"number",properties:["x","y","startAngle","endAngle","innerRadius","outerRadius"]}},indexAxis:"r",startAngle:0}),M(ae,"overrides",{aspectRatio:1,plugins:{legend:{labels:{generateLabels(t){let e=t.data;if(e.labels.length&&e.datasets.length){let{labels:{pointStyle:n,color:s}}=t.legend.options;return e.labels.map((o,r)=>{let l=t.getDatasetMeta(0).controller.getStyle(r);return{text:o,fillStyle:l.backgroundColor,strokeStyle:l.borderColor,fontColor:s,lineWidth:l.borderWidth,pointStyle:n,hidden:!t.getDataVisibility(r),index:r}})}return[]}},onClick(t,e,n){n.chart.toggleDataVisibility(e.index),n.chart.update()}}},scales:{r:{type:"radialLinear",angleLines:{display:!1},beginAtZero:!0,grid:{circular:!0},pointLabels:{display:!1},startAngle:0}}});ri=class extends It{};M(ri,"id","pie"),M(ri,"defaults",{cutout:0,rotation:0,circumference:360,radius:"100%"});Ae=class extends gt{getLabelAndValue(t){let e=this._cachedMeta.vScale,n=this.getParsed(t);return{label:e.getLabels()[t],value:""+e.getLabelForValue(n[e.axis])}}parseObjectData(t,e,n,s){return fs.bind(this)(t,e,n,s)}update(t){let e=this._cachedMeta,n=e.dataset,s=e.data||[],o=e.iScale.getLabels();if(n.points=s,t!=="resize"){let r=this.resolveDatasetElementOptions(t);this.options.showLine||(r.borderWidth=0);let a={_loop:!0,_fullLoop:o.length===s.length,options:r};this.updateElement(n,void 0,a,t)}this.updateElements(s,0,s.length,t)}updateElements(t,e,n,s){let o=this._cachedMeta.rScale,r=s==="reset";for(let a=e;a<e+n;a++){let l=t[a],c=this.resolveDataElementOptions(a,l.active?"active":s),d=o.getPointPositionForValue(a,this.getParsed(a).r),u=r?o.xCenter:d.x,h=r?o.yCenter:d.y,f={x:u,y:h,angle:d.angle,skip:isNaN(u)||isNaN(h),options:c};this.updateElement(l,a,f,s)}}};M(Ae,"id","radar"),M(Ae,"defaults",{datasetElementType:"line",dataElementType:"point",indexAxis:"r",showLine:!0,elements:{line:{fill:"start"}}}),M(Ae,"overrides",{aspectRatio:1,scales:{r:{type:"radialLinear"}}});De=class extends gt{getLabelAndValue(t){let e=this._cachedMeta,n=this.chart.data.labels||[],{xScale:s,yScale:o}=e,r=this.getParsed(t),a=s.getLabelForValue(r.x),l=o.getLabelForValue(r.y);return{label:n[t]||"",value:"("+a+", "+l+")"}}update(t){let e=this._cachedMeta,{data:n=[]}=e,s=this.chart._animationsDisabled,{start:o,count:r}=ns(e,n,s);if(this._drawStart=o,this._drawCount=r,ss(e)&&(o=0,r=n.length),this.options.showLine){this.datasetElementType||this.addElements();let{dataset:a,_dataset:l}=e;a._chart=this.chart,a._datasetIndex=this.index,a._decimated=!!l._decimated,a.points=n;let c=this.resolveDatasetElementOptions(t);c.segment=this.options.segment,this.updateElement(a,void 0,{animated:!s,options:c},t)}else this.datasetElementType&&(delete e.dataset,this.datasetElementType=!1);this.updateElements(n,o,r,t)}addElements(){let{showLine:t}=this.options;!this.datasetElementType&&t&&(this.datasetElementType=this.chart.registry.getElement("line")),super.addElements()}updateElements(t,e,n,s){let o=s==="reset",{iScale:r,vScale:a,_stacked:l,_dataset:c}=this._cachedMeta,d=this.resolveDataElementOptions(e,s),u=this.getSharedOptions(d),h=this.includeOptions(s,u),f=r.axis,g=a.axis,{spanGaps:p,segment:m}=this.options,b=ee(p)?p:Number.POSITIVE_INFINITY,y=this.chart._animationsDisabled||o||s==="none",_=e>0&&this.getParsed(e-1);for(let v=e;v<e+n;++v){let x=t[v],S=this.getParsed(v),k=y?x:{},T=R(S[g]),w=k[f]=r.getPixelForValue(S[f],v),L=k[g]=o||T?a.getBasePixel():a.getPixelForValue(l?this.applyStack(a,S,l):S[g],v);k.skip=isNaN(w)||isNaN(L)||T,k.stop=v>0&&Math.abs(S[f]-_[f])>b,m&&(k.parsed=S,k.raw=c.data[v]),h&&(k.options=u||this.resolveDataElementOptions(v,x.active?"active":s)),y||this.updateElement(x,v,k,s),_=S}this.updateSharedOptions(u,s,d)}getMaxOverflow(){let t=this._cachedMeta,e=t.data||[];if(!this.options.showLine){let a=0;for(let l=e.length-1;l>=0;--l)a=Math.max(a,e[l].size(this.resolveDataElementOptions(l))/2);return a>0&&a}let n=t.dataset,s=n.options&&n.options.borderWidth||0;if(!e.length)return s;let o=e[0].size(this.resolveDataElementOptions(0)),r=e[e.length-1].size(this.resolveDataElementOptions(e.length-1));return Math.max(s,o,r)/2}};M(De,"id","scatter"),M(De,"defaults",{datasetElementType:!1,dataElementType:"point",showLine:!1,fill:!1}),M(De,"overrides",{interaction:{mode:"point"},scales:{x:{type:"linear"},y:{type:"linear"}}});lh=Object.freeze({__proto__:null,BarController:Ce,BubbleController:Ee,DoughnutController:It,LineController:Le,PieController:ri,PolarAreaController:ae,RadarController:Ae,ScatterController:De});Os=class i{constructor(t){M(this,"options");this.options=t||{}}static override(t){Object.assign(i.prototype,t)}init(){}formats(){return ne()}parse(){return ne()}format(){return ne()}add(){return ne()}diff(){return ne()}startOf(){return ne()}endOf(){return ne()}},ch={_date:Os};gh={evaluateInteractionItems:bi,modes:{index(i,t,e,n){let s=jt(t,i),o=e.axis||"x",r=e.includeInvisible||!1,a=e.intersect?Ts(i,s,o,n,r):ws(i,s,o,!1,n,r),l=[];return a.length?(i.getSortedVisibleDatasetMetas().forEach(c=>{let d=a[0].index,u=c.data[d];u&&!u.skip&&l.push({element:u,datasetIndex:c.index,index:d})}),l):[]},dataset(i,t,e,n){let s=jt(t,i),o=e.axis||"xy",r=e.includeInvisible||!1,a=e.intersect?Ts(i,s,o,n,r):ws(i,s,o,!1,n,r);if(a.length>0){let l=a[0].datasetIndex,c=i.getDatasetMeta(l).data;a=[];for(let d=0;d<c.length;++d)a.push({element:c[d],datasetIndex:l,index:d})}return a},point(i,t,e,n){let s=jt(t,i),o=e.axis||"xy",r=e.includeInvisible||!1;return Ts(i,s,o,n,r)},nearest(i,t,e,n){let s=jt(t,i),o=e.axis||"xy",r=e.includeInvisible||!1;return ws(i,s,o,e.intersect,n,r)},x(i,t,e,n){let s=jt(t,i);return ca(i,s,"x",e.intersect,n)},y(i,t,e,n){let s=jt(t,i);return ca(i,s,"y",e.intersect,n)}}},el=["left","top","right","bottom"];ot={addBox(i,t){i.boxes||(i.boxes=[]),t.fullSize=t.fullSize||!1,t.position=t.position||"top",t.weight=t.weight||0,t._layers=t._layers||function(){return[{z:0,draw(e){t.draw(e)}}]},i.boxes.push(t)},removeBox(i,t){let e=i.boxes?i.boxes.indexOf(t):-1;e!==-1&&i.boxes.splice(e,1)},configure(i,t,e){t.fullSize=e.fullSize,t.position=e.position,t.weight=e.weight},update(i,t,e,n){if(!i)return;let s=nt(i.options.layout.padding),o=Math.max(t-s.width,0),r=Math.max(e-s.height,0),a=yh(i.boxes),l=a.vertical,c=a.horizontal;H(i.boxes,p=>{typeof p.beforeLayout=="function"&&p.beforeLayout()});let d=l.reduce((p,m)=>m.box.options&&m.box.options.display===!1?p:p+1,0)||1,u=Object.freeze({outerWidth:t,outerHeight:e,padding:s,availableWidth:o,availableHeight:r,vBoxMaxWidth:o/2/d,hBoxMaxHeight:r/2}),h=Object.assign({},s);il(h,nt(n));let f=Object.assign({maxPadding:h,w:o,h:r,x:s.left,y:s.top},s),g=bh(l.concat(c),u);ai(a.fullSize,f,u,g),ai(l,f,u,g),ai(c,f,u,g)&&ai(l,f,u,g),_h(f),ha(a.leftAndTop,f,u,g),f.x+=f.w,f.y+=f.h,ha(a.rightAndBottom,f,u,g),i.chartArea={left:f.left,top:f.top,right:f.left+f.w,bottom:f.top+f.h,height:f.h,width:f.w},H(a.chartArea,p=>{let m=p.box;Object.assign(m,i.chartArea),m.update(f.w,f.h,{left:0,top:0,right:0,bottom:0})})}},dn=class{acquireContext(t,e){}releaseContext(t){return!1}addEventListener(t,e,n){}removeEventListener(t,e,n){}getDevicePixelRatio(){return 1}getMaximumSize(t,e,n,s){return e=Math.max(0,e||t.width),n=n||t.height,{width:e,height:Math.max(0,s?Math.floor(e/s):n)}}isAttached(t){return!0}updateConfig(t){}},Is=class extends dn{acquireContext(t){return t&&t.getContext&&t.getContext("2d")||null}updateConfig(t){t.options.animation=!1}},an="$chartjs",Mh={touchstart:"mousedown",touchmove:"mousemove",touchend:"mouseup",pointerenter:"mouseenter",pointerdown:"mousedown",pointermove:"mousemove",pointerup:"mouseup",pointerleave:"mouseout",pointerout:"mouseout"},fa=i=>i===null||i==="";nl=Kr?{passive:!0}:!1;gi=new Map,ga=0;Fs=class extends dn{acquireContext(t,e){let n=t&&t.getContext&&t.getContext("2d");return n&&n.canvas===t?(Sh(t,e),n):null}releaseContext(t){let e=t.canvas;if(!e[an])return!1;let n=e[an].initial;["height","width"].forEach(o=>{let r=n[o];R(r)?e.removeAttribute(o):e.setAttribute(o,r)});let s=n.style||{};return Object.keys(s).forEach(o=>{e.style[o]=s[o]}),e.width=e.width,delete e[an],!0}addEventListener(t,e,n){this.removeEventListener(t,e);let s=t.$proxies||(t.$proxies={}),r={attach:Ch,detach:Eh,resize:Dh}[e]||Ph;s[e]=r(t,e,n)}removeEventListener(t,e){let n=t.$proxies||(t.$proxies={}),s=n[e];if(!s)return;({attach:Cs,detach:Cs,resize:Cs}[e]||Th)(t,e,s),n[e]=void 0}getDevicePixelRatio(){return window.devicePixelRatio}getMaximumSize(t,e,n,s){return Ur(t,e,n,s)}isAttached(t){let e=t&&Zi(t);return!!(e&&e.isConnected)}};pt=class{constructor(){M(this,"x");M(this,"y");M(this,"active",!1);M(this,"options");M(this,"$animations")}tooltipPosition(t){let{x:e,y:n}=this.getProps(["x","y"],t);return{x:e,y:n}}hasValue(){return ee(this.x)&&ee(this.y)}getProps(t,e){let n=this.$animations;if(!e||!n)return this;let s={};return t.forEach(o=>{s[o]=n[o]&&n[o].active()?n[o]._to:this[o]}),s}};M(pt,"defaults",{}),M(pt,"defaultRoutes");Wh=i=>i==="left"?"right":i==="right"?"left":i,pa=(i,t,e)=>t==="top"||t==="left"?i[t]+e:i[t]-e,ma=(i,t)=>Math.min(t||i,i);ce=class i extends pt{constructor(t){super(),this.id=t.id,this.type=t.type,this.options=void 0,this.ctx=t.ctx,this.chart=t.chart,this.top=void 0,this.bottom=void 0,this.left=void 0,this.right=void 0,this.width=void 0,this.height=void 0,this._margins={left:0,right:0,top:0,bottom:0},this.maxWidth=void 0,this.maxHeight=void 0,this.paddingTop=void 0,this.paddingBottom=void 0,this.paddingLeft=void 0,this.paddingRight=void 0,this.axis=void 0,this.labelRotation=void 0,this.min=void 0,this.max=void 0,this._range=void 0,this.ticks=[],this._gridLineItems=null,this._labelItems=null,this._labelSizes=null,this._length=0,this._maxLength=0,this._longestTextCache={},this._startPixel=void 0,this._endPixel=void 0,this._reversePixels=!1,this._userMax=void 0,this._userMin=void 0,this._suggestedMax=void 0,this._suggestedMin=void 0,this._ticksLength=0,this._borderValue=0,this._cache={},this._dataLimitsCached=!1,this.$context=void 0}init(t){this.options=t.setContext(this.getContext()),this.axis=t.axis,this._userMin=this.parse(t.min),this._userMax=this.parse(t.max),this._suggestedMin=this.parse(t.suggestedMin),this._suggestedMax=this.parse(t.suggestedMax)}parse(t,e){return t}getUserBounds(){let{_userMin:t,_userMax:e,_suggestedMin:n,_suggestedMax:s}=this;return t=ct(t,Number.POSITIVE_INFINITY),e=ct(e,Number.NEGATIVE_INFINITY),n=ct(n,Number.POSITIVE_INFINITY),s=ct(s,Number.NEGATIVE_INFINITY),{min:ct(t,n),max:ct(e,s),minDefined:Y(t),maxDefined:Y(e)}}getMinMax(t){let{min:e,max:n,minDefined:s,maxDefined:o}=this.getUserBounds(),r;if(s&&o)return{min:e,max:n};let a=this.getMatchingVisibleMetas();for(let l=0,c=a.length;l<c;++l)r=a[l].controller.getMinMax(this,t),s||(e=Math.min(e,r.min)),o||(n=Math.max(n,r.max));return e=o&&e>n?n:e,n=s&&e>n?e:n,{min:ct(e,ct(n,e)),max:ct(n,ct(e,n))}}getPadding(){return{left:this.paddingLeft||0,top:this.paddingTop||0,right:this.paddingRight||0,bottom:this.paddingBottom||0}}getTicks(){return this.ticks}getLabels(){let t=this.chart.data;return this.options.labels||(this.isHorizontal()?t.xLabels:t.yLabels)||t.labels||[]}getLabelItems(t=this.chart.chartArea){return this._labelItems||(this._labelItems=this._computeLabelItems(t))}beforeLayout(){this._cache={},this._dataLimitsCached=!1}beforeUpdate(){B(this.options.beforeUpdate,[this])}update(t,e,n){let{beginAtZero:s,grace:o,ticks:r}=this.options,a=r.sampleSize;this.beforeUpdate(),this.maxWidth=t,this.maxHeight=e,this._margins=n=Object.assign({left:0,right:0,top:0,bottom:0},n),this.ticks=null,this._labelSizes=null,this._gridLineItems=null,this._labelItems=null,this.beforeSetDimensions(),this.setDimensions(),this.afterSetDimensions(),this._maxLength=this.isHorizontal()?this.width+n.left+n.right:this.height+n.top+n.bottom,this._dataLimitsCached||(this.beforeDataLimits(),this.determineDataLimits(),this.afterDataLimits(),this._range=Br(this,o,s),this._dataLimitsCached=!0),this.beforeBuildTicks(),this.ticks=this.buildTicks()||[],this.afterBuildTicks();let l=a<this.ticks.length;this._convertTicksToLabels(l?ba(this.ticks,a):this.ticks),this.configure(),this.beforeCalculateLabelRotation(),this.calculateLabelRotation(),this.afterCalculateLabelRotation(),r.display&&(r.autoSkip||r.source==="auto")&&(this.ticks=Oh(this,this.ticks),this._labelSizes=null,this.afterAutoSkip()),l&&this._convertTicksToLabels(this.ticks),this.beforeFit(),this.fit(),this.afterFit(),this.afterUpdate()}configure(){let t=this.options.reverse,e,n;this.isHorizontal()?(e=this.left,n=this.right):(e=this.top,n=this.bottom,t=!t),this._startPixel=e,this._endPixel=n,this._reversePixels=t,this._length=n-e,this._alignToPixels=this.options.alignToPixels}afterUpdate(){B(this.options.afterUpdate,[this])}beforeSetDimensions(){B(this.options.beforeSetDimensions,[this])}setDimensions(){this.isHorizontal()?(this.width=this.maxWidth,this.left=0,this.right=this.width):(this.height=this.maxHeight,this.top=0,this.bottom=this.height),this.paddingLeft=0,this.paddingTop=0,this.paddingRight=0,this.paddingBottom=0}afterSetDimensions(){B(this.options.afterSetDimensions,[this])}_callHooks(t){this.chart.notifyPlugins(t,this.getContext()),B(this.options[t],[this])}beforeDataLimits(){this._callHooks("beforeDataLimits")}determineDataLimits(){}afterDataLimits(){this._callHooks("afterDataLimits")}beforeBuildTicks(){this._callHooks("beforeBuildTicks")}buildTicks(){return[]}afterBuildTicks(){this._callHooks("afterBuildTicks")}beforeTickToLabelConversion(){B(this.options.beforeTickToLabelConversion,[this])}generateTickLabels(t){let e=this.options.ticks,n,s,o;for(n=0,s=t.length;n<s;n++)o=t[n],o.label=B(e.callback,[o.value,n,t],this)}afterTickToLabelConversion(){B(this.options.afterTickToLabelConversion,[this])}beforeCalculateLabelRotation(){B(this.options.beforeCalculateLabelRotation,[this])}calculateLabelRotation(){let t=this.options,e=t.ticks,n=ma(this.ticks.length,t.ticks.maxTicksLimit),s=e.minRotation||0,o=e.maxRotation,r=s,a,l,c;if(!this._isVisible()||!e.display||s>=o||n<=1||!this.isHorizontal()){this.labelRotation=s;return}let d=this._getLabelSizes(),u=d.widest.width,h=d.highest.height,f=Z(this.chart.width-u,0,this.maxWidth);a=t.offset?this.maxWidth/n:f/(n-1),u+6>a&&(a=f/(n-(t.offset?.5:1)),l=this.maxHeight-si(t.grid)-e.padding-ya(t.title,this.chart.options.font),c=Math.sqrt(u*u+h*h),r=ji(Math.min(Math.asin(Z((d.highest.height+6)/a,-1,1)),Math.asin(Z(l/c,-1,1))-Math.asin(Z(h/c,-1,1)))),r=Math.max(s,Math.min(o,r))),this.labelRotation=r}afterCalculateLabelRotation(){B(this.options.afterCalculateLabelRotation,[this])}afterAutoSkip(){}beforeFit(){B(this.options.beforeFit,[this])}fit(){let t={width:0,height:0},{chart:e,options:{ticks:n,title:s,grid:o}}=this,r=this._isVisible(),a=this.isHorizontal();if(r){let l=ya(s,e.options.font);if(a?(t.width=this.maxWidth,t.height=si(o)+l):(t.height=this.maxHeight,t.width=si(o)+l),n.display&&this.ticks.length){let{first:c,last:d,widest:u,highest:h}=this._getLabelSizes(),f=n.padding*2,g=bt(this.labelRotation),p=Math.cos(g),m=Math.sin(g);if(a){let b=n.mirror?0:m*u.width+p*h.height;t.height=Math.min(this.maxHeight,t.height+b+f)}else{let b=n.mirror?0:p*u.width+m*h.height;t.width=Math.min(this.maxWidth,t.width+b+f)}this._calculatePadding(c,d,m,p)}}this._handleMargins(),a?(this.width=this._length=e.width-this._margins.left-this._margins.right,this.height=t.height):(this.width=t.width,this.height=this._length=e.height-this._margins.top-this._margins.bottom)}_calculatePadding(t,e,n,s){let{ticks:{align:o,padding:r},position:a}=this.options,l=this.labelRotation!==0,c=a!=="top"&&this.axis==="x";if(this.isHorizontal()){let d=this.getPixelForTick(0)-this.left,u=this.right-this.getPixelForTick(this.ticks.length-1),h=0,f=0;l?c?(h=s*t.width,f=n*e.height):(h=n*t.height,f=s*e.width):o==="start"?f=e.width:o==="end"?h=t.width:o!=="inner"&&(h=t.width/2,f=e.width/2),this.paddingLeft=Math.max((h-d+r)*this.width/(this.width-d),0),this.paddingRight=Math.max((f-u+r)*this.width/(this.width-u),0)}else{let d=e.height/2,u=t.height/2;o==="start"?(d=0,u=t.height):o==="end"&&(d=e.height,u=0),this.paddingTop=d+r,this.paddingBottom=u+r}}_handleMargins(){this._margins&&(this._margins.left=Math.max(this.paddingLeft,this._margins.left),this._margins.top=Math.max(this.paddingTop,this._margins.top),this._margins.right=Math.max(this.paddingRight,this._margins.right),this._margins.bottom=Math.max(this.paddingBottom,this._margins.bottom))}afterFit(){B(this.options.afterFit,[this])}isHorizontal(){let{axis:t,position:e}=this.options;return e==="top"||e==="bottom"||t==="x"}isFullSize(){return this.options.fullSize}_convertTicksToLabels(t){this.beforeTickToLabelConversion(),this.generateTickLabels(t);let e,n;for(e=0,n=t.length;e<n;e++)R(t[e].label)&&(t.splice(e,1),n--,e--);this.afterTickToLabelConversion()}_getLabelSizes(){let t=this._labelSizes;if(!t){let e=this.options.ticks.sampleSize,n=this.ticks;e<n.length&&(n=ba(n,e)),this._labelSizes=t=this._computeLabelSizes(n,n.length,this.options.ticks.maxTicksLimit)}return t}_computeLabelSizes(t,e,n){let{ctx:s,_longestTextCache:o}=this,r=[],a=[],l=Math.floor(e/ma(e,n)),c=0,d=0,u,h,f,g,p,m,b,y,_,v,x;for(u=0;u<e;u+=l){if(g=t[u].label,p=this._resolveTickFontOptions(u),s.font=m=p.string,b=o[m]=o[m]||{data:{},gc:[]},y=p.lineHeight,_=v=0,!R(g)&&!N(g))_=Xe(s,b.data,b.gc,_,g),v=y;else if(N(g))for(h=0,f=g.length;h<f;++h)x=g[h],!R(x)&&!N(x)&&(_=Xe(s,b.data,b.gc,_,x),v+=y);r.push(_),a.push(v),c=Math.max(_,c),d=Math.max(v,d)}Nh(o,e);let S=r.indexOf(c),k=a.indexOf(d),T=w=>({width:r[w]||0,height:a[w]||0});return{first:T(0),last:T(e-1),widest:T(S),highest:T(k),widths:r,heights:a}}getLabelForValue(t){return t}getPixelForValue(t,e){return NaN}getValueForPixel(t){}getPixelForTick(t){let e=this.ticks;return t<0||t>e.length-1?null:this.getPixelForValue(e[t].value)}getPixelForDecimal(t){this._reversePixels&&(t=1-t);let e=this._startPixel+t*this._length;return Ar(this._alignToPixels?Bt(this.chart,e,0):e)}getDecimalForPixel(t){let e=(t-this._startPixel)/this._length;return this._reversePixels?1-e:e}getBasePixel(){return this.getPixelForValue(this.getBaseValue())}getBaseValue(){let{min:t,max:e}=this;return t<0&&e<0?e:t>0&&e>0?t:0}getContext(t){let e=this.ticks||[];if(t>=0&&t<e.length){let n=e[t];return n.$context||(n.$context=jh(this.getContext(),t,n))}return this.$context||(this.$context=Vh(this.chart.getContext(),this))}_tickSize(){let t=this.options.ticks,e=bt(this.labelRotation),n=Math.abs(Math.cos(e)),s=Math.abs(Math.sin(e)),o=this._getLabelSizes(),r=t.autoSkipPadding||0,a=o?o.widest.width+r:0,l=o?o.highest.height+r:0;return this.isHorizontal()?l*n>a*s?a/n:l/s:l*s<a*n?l/n:a/s}_isVisible(){let t=this.options.display;return t!=="auto"?!!t:this.getMatchingVisibleMetas().length>0}_computeGridLineItems(t){let e=this.axis,n=this.chart,s=this.options,{grid:o,position:r,border:a}=s,l=o.offset,c=this.isHorizontal(),u=this.ticks.length+(l?1:0),h=si(o),f=[],g=a.setContext(this.getContext()),p=g.display?g.width:0,m=p/2,b=function(q){return Bt(n,q,p)},y,_,v,x,S,k,T,w,L,A,I,Q;if(r==="top")y=b(this.bottom),k=this.bottom-h,w=y-m,A=b(t.top)+m,Q=t.bottom;else if(r==="bottom")y=b(this.top),A=t.top,Q=b(t.bottom)-m,k=y+m,w=this.top+h;else if(r==="left")y=b(this.right),S=this.right-h,T=y-m,L=b(t.left)+m,I=t.right;else if(r==="right")y=b(this.left),L=t.left,I=b(t.right)-m,S=y+m,T=this.left+h;else if(e==="x"){if(r==="center")y=b((t.top+t.bottom)/2+.5);else if(O(r)){let q=Object.keys(r)[0],X=r[q];y=b(this.chart.scales[q].getPixelForValue(X))}A=t.top,Q=t.bottom,k=y+m,w=k+h}else if(e==="y"){if(r==="center")y=b((t.left+t.right)/2);else if(O(r)){let q=Object.keys(r)[0],X=r[q];y=b(this.chart.scales[q].getPixelForValue(X))}S=y-m,T=S-h,L=t.left,I=t.right}let ht=E(s.ticks.maxTicksLimit,u),W=Math.max(1,Math.ceil(u/ht));for(_=0;_<u;_+=W){let q=this.getContext(_),X=o.setContext(q),yt=a.setContext(q),st=X.lineWidth,de=X.color,vi=yt.dash||[],ue=yt.dashOffset,He=X.tickWidth,Yt=X.tickColor,ze=X.tickBorderDash||[],Ut=X.tickBorderDashOffset;v=Bh(this,_,l),v!==void 0&&(x=Bt(n,v,st),c?S=T=L=I=x:k=w=A=Q=x,f.push({tx1:S,ty1:k,tx2:T,ty2:w,x1:L,y1:A,x2:I,y2:Q,width:st,color:de,borderDash:vi,borderDashOffset:ue,tickWidth:He,tickColor:Yt,tickBorderDash:ze,tickBorderDashOffset:Ut}))}return this._ticksLength=u,this._borderValue=y,f}_computeLabelItems(t){let e=this.axis,n=this.options,{position:s,ticks:o}=n,r=this.isHorizontal(),a=this.ticks,{align:l,crossAlign:c,padding:d,mirror:u}=o,h=si(n.grid),f=h+d,g=u?-d:f,p=-bt(this.labelRotation),m=[],b,y,_,v,x,S,k,T,w,L,A,I,Q="middle";if(s==="top")S=this.bottom-g,k=this._getXAxisLabelAlignment();else if(s==="bottom")S=this.top+g,k=this._getXAxisLabelAlignment();else if(s==="left"){let W=this._getYAxisLabelAlignment(h);k=W.textAlign,x=W.x}else if(s==="right"){let W=this._getYAxisLabelAlignment(h);k=W.textAlign,x=W.x}else if(e==="x"){if(s==="center")S=(t.top+t.bottom)/2+f;else if(O(s)){let W=Object.keys(s)[0],q=s[W];S=this.chart.scales[W].getPixelForValue(q)+f}k=this._getXAxisLabelAlignment()}else if(e==="y"){if(s==="center")x=(t.left+t.right)/2-f;else if(O(s)){let W=Object.keys(s)[0],q=s[W];x=this.chart.scales[W].getPixelForValue(q)}k=this._getYAxisLabelAlignment(h).textAlign}e==="y"&&(l==="start"?Q="top":l==="end"&&(Q="bottom"));let ht=this._getLabelSizes();for(b=0,y=a.length;b<y;++b){_=a[b],v=_.label;let W=o.setContext(this.getContext(b));T=this.getPixelForTick(b)+o.labelOffset,w=this._resolveTickFontOptions(b),L=w.lineHeight,A=N(v)?v.length:1;let q=A/2,X=W.color,yt=W.textStrokeColor,st=W.textStrokeWidth,de=k;r?(x=T,k==="inner"&&(b===y-1?de=this.options.reverse?"left":"right":b===0?de=this.options.reverse?"right":"left":de="center"),s==="top"?c==="near"||p!==0?I=-A*L+L/2:c==="center"?I=-ht.highest.height/2-q*L+L:I=-ht.highest.height+L/2:c==="near"||p!==0?I=L/2:c==="center"?I=ht.highest.height/2-q*L:I=ht.highest.height-A*L,u&&(I*=-1),p!==0&&!W.showLabelBackdrop&&(x+=L/2*Math.sin(p))):(S=T,I=(1-A)*L/2);let vi;if(W.showLabelBackdrop){let ue=nt(W.backdropPadding),He=ht.heights[b],Yt=ht.widths[b],ze=I-ue.top,Ut=0-ue.left;switch(Q){case"middle":ze-=He/2;break;case"bottom":ze-=He;break}switch(k){case"center":Ut-=Yt/2;break;case"right":Ut-=Yt;break;case"inner":b===y-1?Ut-=Yt:b>0&&(Ut-=Yt/2);break}vi={left:Ut,top:ze,width:Yt+ue.width,height:He+ue.height,color:W.backdropColor}}m.push({label:v,font:w,textOffset:I,options:{rotation:p,color:X,strokeColor:yt,strokeWidth:st,textAlign:de,textBaseline:Q,translation:[x,S],backdrop:vi}})}return m}_getXAxisLabelAlignment(){let{position:t,ticks:e}=this.options;if(-bt(this.labelRotation))return t==="top"?"left":"right";let s="center";return e.align==="start"?s="left":e.align==="end"?s="right":e.align==="inner"&&(s="inner"),s}_getYAxisLabelAlignment(t){let{position:e,ticks:{crossAlign:n,mirror:s,padding:o}}=this.options,r=this._getLabelSizes(),a=t+o,l=r.widest.width,c,d;return e==="left"?s?(d=this.right+o,n==="near"?c="left":n==="center"?(c="center",d+=l/2):(c="right",d+=l)):(d=this.right-a,n==="near"?c="right":n==="center"?(c="center",d-=l/2):(c="left",d=this.left)):e==="right"?s?(d=this.left+o,n==="near"?c="right":n==="center"?(c="center",d-=l/2):(c="left",d-=l)):(d=this.left+a,n==="near"?c="left":n==="center"?(c="center",d+=l/2):(c="right",d=this.right)):c="right",{textAlign:c,x:d}}_computeLabelArea(){if(this.options.ticks.mirror)return;let t=this.chart,e=this.options.position;if(e==="left"||e==="right")return{top:0,left:this.left,bottom:t.height,right:this.right};if(e==="top"||e==="bottom")return{top:this.top,left:0,bottom:this.bottom,right:t.width}}drawBackground(){let{ctx:t,options:{backgroundColor:e},left:n,top:s,width:o,height:r}=this;e&&(t.save(),t.fillStyle=e,t.fillRect(n,s,o,r),t.restore())}getLineWidthForValue(t){let e=this.options.grid;if(!this._isVisible()||!e.display)return 0;let s=this.ticks.findIndex(o=>o.value===t);return s>=0?e.setContext(this.getContext(s)).lineWidth:0}drawGrid(t){let e=this.options.grid,n=this.ctx,s=this._gridLineItems||(this._gridLineItems=this._computeGridLineItems(t)),o,r,a=(l,c,d)=>{!d.width||!d.color||(n.save(),n.lineWidth=d.width,n.strokeStyle=d.color,n.setLineDash(d.borderDash||[]),n.lineDashOffset=d.borderDashOffset,n.beginPath(),n.moveTo(l.x,l.y),n.lineTo(c.x,c.y),n.stroke(),n.restore())};if(e.display)for(o=0,r=s.length;o<r;++o){let l=s[o];e.drawOnChartArea&&a({x:l.x1,y:l.y1},{x:l.x2,y:l.y2},l),e.drawTicks&&a({x:l.tx1,y:l.ty1},{x:l.tx2,y:l.ty2},{color:l.tickColor,width:l.tickWidth,borderDash:l.tickBorderDash,borderDashOffset:l.tickBorderDashOffset})}}drawBorder(){let{chart:t,ctx:e,options:{border:n,grid:s}}=this,o=n.setContext(this.getContext()),r=n.display?o.width:0;if(!r)return;let a=s.setContext(this.getContext(0)).lineWidth,l=this._borderValue,c,d,u,h;this.isHorizontal()?(c=Bt(t,this.left,r)-r/2,d=Bt(t,this.right,a)+a/2,u=h=l):(u=Bt(t,this.top,r)-r/2,h=Bt(t,this.bottom,a)+a/2,c=d=l),e.save(),e.lineWidth=o.width,e.strokeStyle=o.color,e.beginPath(),e.moveTo(c,u),e.lineTo(d,h),e.stroke(),e.restore()}drawLabels(t){if(!this.options.ticks.display)return;let n=this.ctx,s=this._computeLabelArea();s&&Qe(n,s);let o=this.getLabelItems(t);for(let r of o){let a=r.options,l=r.font,c=r.label,d=r.textOffset;Nt(n,c,0,d,l,a)}s&&ti(n)}drawTitle(){let{ctx:t,options:{position:e,title:n,reverse:s}}=this;if(!n.display)return;let o=J(n.font),r=nt(n.padding),a=n.align,l=o.lineHeight/2;e==="bottom"||e==="center"||O(e)?(l+=r.bottom,N(n.text)&&(l+=o.lineHeight*(n.text.length-1))):l+=r.top;let{titleX:c,titleY:d,maxWidth:u,rotation:h}=Yh(this,l,e,a);Nt(t,n.text,0,0,o,{color:n.color,maxWidth:u,rotation:h,textAlign:qh(a,e,s),textBaseline:"middle",translation:[c,d]})}draw(t){this._isVisible()&&(this.drawBackground(),this.drawGrid(t),this.drawBorder(),this.drawTitle(),this.drawLabels(t))}_layers(){let t=this.options,e=t.ticks&&t.ticks.z||0,n=E(t.grid&&t.grid.z,-1),s=E(t.border&&t.border.z,0);return!this._isVisible()||this.draw!==i.prototype.draw?[{z:e,draw:o=>{this.draw(o)}}]:[{z:n,draw:o=>{this.drawBackground(),this.drawGrid(o),this.drawTitle()}},{z:s,draw:()=>{this.drawBorder()}},{z:e,draw:o=>{this.drawLabels(o)}}]}getMatchingVisibleMetas(t){let e=this.chart.getSortedVisibleDatasetMetas(),n=this.axis+"AxisID",s=[],o,r;for(o=0,r=e.length;o<r;++o){let a=e[o];a[n]===this.id&&(!t||a.type===t)&&s.push(a)}return s}_resolveTickFontOptions(t){let e=this.options.ticks.setContext(this.getContext(t));return J(e.font)}_maxDigits(){let t=this._resolveTickFontOptions(0).lineHeight;return(this.isHorizontal()?this.width:this.height)/t}},Oe=class{constructor(t,e,n){this.type=t,this.scope=e,this.override=n,this.items=Object.create(null)}isForType(t){return Object.prototype.isPrototypeOf.call(this.type.prototype,t.prototype)}register(t){let e=Object.getPrototypeOf(t),n;Gh(e)&&(n=this.register(e));let s=this.items,o=t.id,r=this.scope+"."+o;if(!o)throw new Error("class does not have id: "+t);return o in s||(s[o]=t,Uh(t,r,n),this.override&&j.override(t.id,t.overrides)),r}get(t){return this.items[t]}unregister(t){let e=this.items,n=t.id,s=this.scope;n in e&&delete e[n],s&&n in j[s]&&(delete j[s][n],this.override&&delete Wt[n])}};$s=class{constructor(){this.controllers=new Oe(gt,"datasets",!0),this.elements=new Oe(pt,"elements"),this.plugins=new Oe(Object,"plugins"),this.scales=new Oe(ce,"scales"),this._typedRegistries=[this.controllers,this.scales,this.elements]}add(...t){this._each("register",t)}remove(...t){this._each("unregister",t)}addControllers(...t){this._each("register",t,this.controllers)}addElements(...t){this._each("register",t,this.elements)}addPlugins(...t){this._each("register",t,this.plugins)}addScales(...t){this._each("register",t,this.scales)}getController(t){return this._get(t,this.controllers,"controller")}getElement(t){return this._get(t,this.elements,"element")}getPlugin(t){return this._get(t,this.plugins,"plugin")}getScale(t){return this._get(t,this.scales,"scale")}removeControllers(...t){this._each("unregister",t,this.controllers)}removeElements(...t){this._each("unregister",t,this.elements)}removePlugins(...t){this._each("unregister",t,this.plugins)}removeScales(...t){this._each("unregister",t,this.scales)}_each(t,e,n){[...e].forEach(s=>{let o=n||this._getRegistryForType(s);n||o.isForType(s)||o===this.plugins&&s.id?this._exec(t,o,s):H(s,r=>{let a=n||this._getRegistryForType(r);this._exec(t,a,r)})})}_exec(t,e,n){let s=Vi(t);B(n["before"+s],[],n),e[t](n),B(n["after"+s],[],n)}_getRegistryForType(t){for(let e=0;e<this._typedRegistries.length;e++){let n=this._typedRegistries[e];if(n.isForType(t))return n}return this.plugins}_get(t,e,n){let s=e.get(t);if(s===void 0)throw new Error('"'+t+'" is not a registered '+n+".");return s}},wt=new $s,Hs=class{constructor(){this._init=void 0}notify(t,e,n,s){if(e==="beforeInit"&&(this._init=this._createDescriptors(t,!0),this._notify(this._init,t,"install")),this._init===void 0)return;let o=s?this._descriptors(t).filter(s):this._descriptors(t),r=this._notify(o,t,e,n);return e==="afterDestroy"&&(this._notify(o,t,"stop"),this._notify(this._init,t,"uninstall"),this._init=void 0),r}_notify(t,e,n,s){s=s||{};for(let o of t){let r=o.plugin,a=r[n],l=[e,s,o.options];if(B(a,l,r)===!1&&s.cancelable)return!1}return!0}invalidate(){R(this._cache)||(this._oldCache=this._cache,this._cache=void 0)}_descriptors(t){if(this._cache)return this._cache;let e=this._cache=this._createDescriptors(t);return this._notifyStateChanges(t),e}_createDescriptors(t,e){let n=t&&t.config,s=E(n.options&&n.options.plugins,{}),o=Xh(n);return s===!1&&!e?[]:Zh(t,o,s,e)}_notifyStateChanges(t){let e=this._oldCache||[],n=this._cache,s=(o,r)=>o.filter(a=>!r.some(l=>a.plugin.id===l.plugin.id));this._notify(s(e,n),t,"stop"),this._notify(s(n,e),t,"start")}};va=new Map,al=new Set;oi=(i,t,e)=>{let n=Dt(t,e);n!==void 0&&i.add(n)},Bs=class{constructor(t){this._config=rf(t),this._scopeCache=new Map,this._resolverCache=new Map}get platform(){return this._config.platform}get type(){return this._config.type}set type(t){this._config.type=t}get data(){return this._config.data}set data(t){this._config.data=rl(t)}get options(){return this._config.options}set options(t){this._config.options=t}get plugins(){return this._config.plugins}update(){let t=this._config;this.clearCache(),ol(t)}clearCache(){this._scopeCache.clear(),this._resolverCache.clear()}datasetScopeKeys(t){return nn(t,()=>[[`datasets.${t}`,""]])}datasetAnimationScopeKeys(t,e){return nn(`${t}.transition.${e}`,()=>[[`datasets.${t}.transitions.${e}`,`transitions.${e}`],[`datasets.${t}`,""]])}datasetElementScopeKeys(t,e){return nn(`${t}-${e}`,()=>[[`datasets.${t}.elements.${e}`,`datasets.${t}`,`elements.${e}`,""]])}pluginScopeKeys(t){let e=t.id,n=this.type;return nn(`${n}-plugin-${e}`,()=>[[`plugins.${e}`,...t.additionalOptionScopes||[]]])}_cachedScopes(t,e){let n=this._scopeCache,s=n.get(t);return(!s||e)&&(s=new Map,n.set(t,s)),s}getOptionScopes(t,e,n){let{options:s,type:o}=this,r=this._cachedScopes(t,n),a=r.get(e);if(a)return a;let l=new Set;e.forEach(d=>{t&&(l.add(t),d.forEach(u=>oi(l,t,u))),d.forEach(u=>oi(l,s,u)),d.forEach(u=>oi(l,Wt[o]||{},u)),d.forEach(u=>oi(l,j,u)),d.forEach(u=>oi(l,Ui,u))});let c=Array.from(l);return c.length===0&&c.push(Object.create(null)),al.has(e)&&r.set(e,c),c}chartOptionScopes(){let{options:t,type:e}=this;return[t,Wt[e]||{},j.datasets[e]||{},{type:e},j,Ui]}resolveNamedOptions(t,e,n,s=[""]){let o={$shared:!0},{resolver:r,subPrefixes:a}=Ma(this._resolverCache,t,s),l=r;if(lf(r,e)){o.$shared=!1,n=Lt(n)?n():n;let c=this.createResolver(t,n,a);l=te(r,n,c)}for(let c of e)o[c]=l[c];return o}createResolver(t,e,n=[""],s){let{resolver:o}=Ma(this._resolverCache,t,n);return O(e)?te(o,e,void 0,s):o}};af=i=>O(i)&&Object.getOwnPropertyNames(i).some(t=>Lt(i[t]));cf="4.5.1",df=["top","bottom","left","right","chartArea"];ln={},wa=i=>{let t=ll(i);return Object.values(ln).filter(e=>e.canvas===t).pop()};lt=class{static register(...t){wt.add(...t),Ca()}static unregister(...t){wt.remove(...t),Ca()}constructor(t,e){let n=this.config=new Bs(e),s=ll(t),o=wa(s);if(o)throw new Error("Canvas is already in use. Chart with ID '"+o.id+"' must be destroyed before the canvas with ID '"+o.canvas.id+"' can be reused.");let r=n.createResolver(n.chartOptionScopes(),this.getContext());this.platform=new(n.platform||Rh(s)),this.platform.updateConfig(n);let a=this.platform.acquireContext(s,r.aspectRatio),l=a&&a.canvas,c=l&&l.height,d=l&&l.width;if(this.id=kr(),this.ctx=a,this.canvas=l,this.width=d,this.height=c,this._options=r,this._aspectRatio=this.aspectRatio,this._layers=[],this._metasets=[],this._stacks=void 0,this.boxes=[],this.currentDevicePixelRatio=void 0,this.chartArea=void 0,this._active=[],this._lastEvent=void 0,this._listeners={},this._responsiveListeners=void 0,this._sortedMetasets=[],this.scales={},this._plugins=new Hs,this.$proxies={},this._hiddenIndices={},this.attached=!1,this._animationsDisabled=void 0,this.$context=void 0,this._doResize=Ir(u=>this.update(u),r.resizeDelay||0),this._dataChanges=[],ln[this.id]=this,!a||!l){console.error("Failed to create chart: can't acquire context from the given item");return}Rt.listen(this,"complete",Ta),Rt.listen(this,"progress",uf),this._initialize(),this.attached&&this.update()}get aspectRatio(){let{options:{aspectRatio:t,maintainAspectRatio:e},width:n,height:s,_aspectRatio:o}=this;return R(t)?e&&o?o:s?n/s:null:t}get data(){return this.config.data}set data(t){this.config.data=t}get options(){return this._options}set options(t){this.config.options=t}get registry(){return wt}_initialize(){return this.notifyPlugins("beforeInit"),this.options.responsive?this.resize():gs(this,this.options.devicePixelRatio),this.bindEvents(),this.notifyPlugins("afterInit"),this}clear(){return as(this.canvas,this.ctx),this}stop(){return Rt.stop(this),this}resize(t,e){Rt.running(this)?this._resizeBeforeDraw={width:t,height:e}:this._resize(t,e)}_resize(t,e){let n=this.options,s=this.canvas,o=n.maintainAspectRatio&&this.aspectRatio,r=this.platform.getMaximumSize(s,t,e,o),a=n.devicePixelRatio||this.platform.getDevicePixelRatio(),l=this.width?"resize":"attach";this.width=r.width,this.height=r.height,this._aspectRatio=this.aspectRatio,gs(this,a,!0)&&(this.notifyPlugins("resize",{size:r}),B(n.onResize,[this,r],this),this.attached&&this._doResize(l)&&this.render())}ensureScalesHaveIDs(){let e=this.options.scales||{};H(e,(n,s)=>{n.id=s})}buildOrUpdateScales(){let t=this.options,e=t.scales,n=this.scales,s=Object.keys(n).reduce((r,a)=>(r[a]=!1,r),{}),o=[];e&&(o=o.concat(Object.keys(e).map(r=>{let a=e[r],l=Ws(r,a),c=l==="r",d=l==="x";return{options:a,dposition:c?"chartArea":d?"bottom":"left",dtype:c?"radialLinear":d?"category":"linear"}}))),H(o,r=>{let a=r.options,l=a.id,c=Ws(l,a),d=E(a.type,r.dtype);(a.position===void 0||Sa(a.position,c)!==Sa(r.dposition))&&(a.position=r.dposition),s[l]=!0;let u=null;if(l in n&&n[l].type===d)u=n[l];else{let h=wt.getScale(d);u=new h({id:l,type:d,ctx:this.ctx,chart:this}),n[u.id]=u}u.init(a,t)}),H(s,(r,a)=>{r||delete n[a]}),H(n,r=>{ot.configure(this,r,r.options),ot.addBox(this,r)})}_updateMetasets(){let t=this._metasets,e=this.data.datasets.length,n=t.length;if(t.sort((s,o)=>s.index-o.index),n>e){for(let s=e;s<n;++s)this._destroyDatasetMeta(s);t.splice(e,n-e)}this._sortedMetasets=t.slice(0).sort(ka("order","index"))}_removeUnreferencedMetasets(){let{_metasets:t,data:{datasets:e}}=this;t.length>e.length&&delete this._stacks,t.forEach((n,s)=>{e.filter(o=>o===n._dataset).length===0&&this._destroyDatasetMeta(s)})}buildOrUpdateControllers(){let t=[],e=this.data.datasets,n,s;for(this._removeUnreferencedMetasets(),n=0,s=e.length;n<s;n++){let o=e[n],r=this.getDatasetMeta(n),a=o.type||this.config.type;if(r.type&&r.type!==a&&(this._destroyDatasetMeta(n),r=this.getDatasetMeta(n)),r.type=a,r.indexAxis=o.indexAxis||zs(a,this.options),r.order=o.order||0,r.index=n,r.label=""+o.label,r.visible=this.isDatasetVisible(n),r.controller)r.controller.updateIndex(n),r.controller.linkScales();else{let l=wt.getController(a),{datasetElementType:c,dataElementType:d}=j.datasets[a];Object.assign(l,{dataElementType:wt.getElement(d),datasetElementType:c&&wt.getElement(c)}),r.controller=new l(this,n),t.push(r.controller)}}return this._updateMetasets(),t}_resetElements(){H(this.data.datasets,(t,e)=>{this.getDatasetMeta(e).controller.reset()},this)}reset(){this._resetElements(),this.notifyPlugins("reset")}update(t){let e=this.config;e.update();let n=this._options=e.createResolver(e.chartOptionScopes(),this.getContext()),s=this._animationsDisabled=!n.animation;if(this._updateScales(),this._checkEventBindings(),this._updateHiddenIndices(),this._plugins.invalidate(),this.notifyPlugins("beforeUpdate",{mode:t,cancelable:!0})===!1)return;let o=this.buildOrUpdateControllers();this.notifyPlugins("beforeElementsUpdate");let r=0;for(let c=0,d=this.data.datasets.length;c<d;c++){let{controller:u}=this.getDatasetMeta(c),h=!s&&o.indexOf(u)===-1;u.buildOrUpdateElements(h),r=Math.max(+u.getMaxOverflow(),r)}r=this._minPadding=n.layout.autoPadding?r:0,this._updateLayout(r),s||H(o,c=>{c.reset()}),this._updateDatasets(t),this.notifyPlugins("afterUpdate",{mode:t}),this._layers.sort(ka("z","_idx"));let{_active:a,_lastEvent:l}=this;l?this._eventHandler(l,!0):a.length&&this._updateHoverStyles(a,a,!0),this.render()}_updateScales(){H(this.scales,t=>{ot.removeBox(this,t)}),this.ensureScalesHaveIDs(),this.buildOrUpdateScales()}_checkEventBindings(){let t=this.options,e=new Set(Object.keys(this._listeners)),n=new Set(t.events);(!Kn(e,n)||!!this._responsiveListeners!==t.responsive)&&(this.unbindEvents(),this.bindEvents())}_updateHiddenIndices(){let{_hiddenIndices:t}=this,e=this._getUniformDataChanges()||[];for(let{method:n,start:s,count:o}of e){let r=n==="_removeElements"?-o:o;hf(t,s,r)}}_getUniformDataChanges(){let t=this._dataChanges;if(!t||!t.length)return;this._dataChanges=[];let e=this.data.datasets.length,n=o=>new Set(t.filter(r=>r[0]===o).map((r,a)=>a+","+r.splice(1).join(","))),s=n(0);for(let o=1;o<e;o++)if(!Kn(s,n(o)))return;return Array.from(s).map(o=>o.split(",")).map(o=>({method:o[1],start:+o[2],count:+o[3]}))}_updateLayout(t){if(this.notifyPlugins("beforeLayout",{cancelable:!0})===!1)return;ot.update(this,this.width,this.height,t);let e=this.chartArea,n=e.width<=0||e.height<=0;this._layers=[],H(this.boxes,s=>{n&&s.position==="chartArea"||(s.configure&&s.configure(),this._layers.push(...s._layers()))},this),this._layers.forEach((s,o)=>{s._idx=o}),this.notifyPlugins("afterLayout")}_updateDatasets(t){if(this.notifyPlugins("beforeDatasetsUpdate",{mode:t,cancelable:!0})!==!1){for(let e=0,n=this.data.datasets.length;e<n;++e)this.getDatasetMeta(e).controller.configure();for(let e=0,n=this.data.datasets.length;e<n;++e)this._updateDataset(e,Lt(t)?t({datasetIndex:e}):t);this.notifyPlugins("afterDatasetsUpdate",{mode:t})}}_updateDataset(t,e){let n=this.getDatasetMeta(t),s={meta:n,index:t,mode:e,cancelable:!0};this.notifyPlugins("beforeDatasetUpdate",s)!==!1&&(n.controller._update(e),s.cancelable=!1,this.notifyPlugins("afterDatasetUpdate",s))}render(){this.notifyPlugins("beforeRender",{cancelable:!0})!==!1&&(Rt.has(this)?this.attached&&!Rt.running(this)&&Rt.start(this):(this.draw(),Ta({chart:this})))}draw(){let t;if(this._resizeBeforeDraw){let{width:n,height:s}=this._resizeBeforeDraw;this._resizeBeforeDraw=null,this._resize(n,s)}if(this.clear(),this.width<=0||this.height<=0||this.notifyPlugins("beforeDraw",{cancelable:!0})===!1)return;let e=this._layers;for(t=0;t<e.length&&e[t].z<=0;++t)e[t].draw(this.chartArea);for(this._drawDatasets();t<e.length;++t)e[t].draw(this.chartArea);this.notifyPlugins("afterDraw")}_getSortedDatasetMetas(t){let e=this._sortedMetasets,n=[],s,o;for(s=0,o=e.length;s<o;++s){let r=e[s];(!t||r.visible)&&n.push(r)}return n}getSortedVisibleDatasetMetas(){return this._getSortedDatasetMetas(!0)}_drawDatasets(){if(this.notifyPlugins("beforeDatasetsDraw",{cancelable:!0})===!1)return;let t=this.getSortedVisibleDatasetMetas();for(let e=t.length-1;e>=0;--e)this._drawDataset(t[e]);this.notifyPlugins("afterDatasetsDraw")}_drawDataset(t){let e=this.ctx,n={meta:t,index:t.index,cancelable:!0},s=_s(this,t);this.notifyPlugins("beforeDatasetDraw",n)!==!1&&(s&&Qe(e,s),t.controller.draw(),s&&ti(e),n.cancelable=!1,this.notifyPlugins("afterDatasetDraw",n))}isPointInArea(t){return Mt(t,this.chartArea,this._minPadding)}getElementsAtEventForMode(t,e,n,s){let o=gh.modes[e];return typeof o=="function"?o(this,t,n,s):[]}getDatasetMeta(t){let e=this.data.datasets[t],n=this._metasets,s=n.filter(o=>o&&o._dataset===e).pop();return s||(s={type:null,data:[],dataset:null,controller:null,hidden:null,xAxisID:null,yAxisID:null,order:e&&e.order||0,index:t,_dataset:e,_parsed:[],_sorted:!1},n.push(s)),s}getContext(){return this.$context||(this.$context=Pt(null,{chart:this,type:"chart"}))}getVisibleDatasetCount(){return this.getSortedVisibleDatasetMetas().length}isDatasetVisible(t){let e=this.data.datasets[t];if(!e)return!1;let n=this.getDatasetMeta(t);return typeof n.hidden=="boolean"?!n.hidden:!e.hidden}setDatasetVisibility(t,e){let n=this.getDatasetMeta(t);n.hidden=!e}toggleDataVisibility(t){this._hiddenIndices[t]=!this._hiddenIndices[t]}getDataVisibility(t){return!this._hiddenIndices[t]}_updateVisibility(t,e,n){let s=n?"show":"hide",o=this.getDatasetMeta(t),r=o.controller._resolveAnimations(void 0,s);_e(e)?(o.data[e].hidden=!n,this.update()):(this.setDatasetVisibility(t,n),r.update(o,{visible:n}),this.update(a=>a.datasetIndex===t?s:void 0))}hide(t,e){this._updateVisibility(t,e,!1)}show(t,e){this._updateVisibility(t,e,!0)}_destroyDatasetMeta(t){let e=this._metasets[t];e&&e.controller&&e.controller._destroy(),delete this._metasets[t]}_stop(){let t,e;for(this.stop(),Rt.remove(this),t=0,e=this.data.datasets.length;t<e;++t)this._destroyDatasetMeta(t)}destroy(){this.notifyPlugins("beforeDestroy");let{canvas:t,ctx:e}=this;this._stop(),this.config.clearCache(),t&&(this.unbindEvents(),as(t,e),this.platform.releaseContext(e),this.canvas=null,this.ctx=null),delete ln[this.id],this.notifyPlugins("afterDestroy")}toBase64Image(...t){return this.canvas.toDataURL(...t)}bindEvents(){this.bindUserEvents(),this.options.responsive?this.bindResponsiveEvents():this.attached=!0}bindUserEvents(){let t=this._listeners,e=this.platform,n=(o,r)=>{e.addEventListener(this,o,r),t[o]=r},s=(o,r,a)=>{o.offsetX=r,o.offsetY=a,this._eventHandler(o)};H(this.options.events,o=>n(o,s))}bindResponsiveEvents(){this._responsiveListeners||(this._responsiveListeners={});let t=this._responsiveListeners,e=this.platform,n=(l,c)=>{e.addEventListener(this,l,c),t[l]=c},s=(l,c)=>{t[l]&&(e.removeEventListener(this,l,c),delete t[l])},o=(l,c)=>{this.canvas&&this.resize(l,c)},r,a=()=>{s("attach",a),this.attached=!0,this.resize(),n("resize",o),n("detach",r)};r=()=>{this.attached=!1,s("resize",o),this._stop(),this._resize(0,0),n("attach",a)},e.isAttached(this.canvas)?a():r()}unbindEvents(){H(this._listeners,(t,e)=>{this.platform.removeEventListener(this,e,t)}),this._listeners={},H(this._responsiveListeners,(t,e)=>{this.platform.removeEventListener(this,e,t)}),this._responsiveListeners=void 0}updateHoverStyle(t,e,n){let s=n?"set":"remove",o,r,a,l;for(e==="dataset"&&(o=this.getDatasetMeta(t[0].datasetIndex),o.controller["_"+s+"DatasetHoverStyle"]()),a=0,l=t.length;a<l;++a){r=t[a];let c=r&&this.getDatasetMeta(r.datasetIndex).controller;c&&c[s+"HoverStyle"](r.element,r.datasetIndex,r.index)}}getActiveElements(){return this._active||[]}setActiveElements(t){let e=this._active||[],n=t.map(({datasetIndex:o,index:r})=>{let a=this.getDatasetMeta(o);if(!a)throw new Error("No dataset found at index "+o);return{datasetIndex:o,element:a.data[r],index:r}});!Je(n,e)&&(this._active=n,this._lastEvent=null,this._updateHoverStyles(n,e))}notifyPlugins(t,e,n){return this._plugins.notify(this,t,e,n)}isPluginEnabled(t){return this._plugins._cache.filter(e=>e.plugin.id===t).length===1}_updateHoverStyles(t,e,n){let s=this.options.hover,o=(l,c)=>l.filter(d=>!c.some(u=>d.datasetIndex===u.datasetIndex&&d.index===u.index)),r=o(e,t),a=n?t:o(t,e);r.length&&this.updateHoverStyle(r,s.mode,!1),a.length&&s.mode&&this.updateHoverStyle(a,s.mode,!0)}_eventHandler(t,e){let n={event:t,replay:e,cancelable:!0,inChartArea:this.isPointInArea(t)},s=r=>(r.options.events||this.options.events).includes(t.native.type);if(this.notifyPlugins("beforeEvent",n,s)===!1)return;let o=this._handleEvent(t,e,n.inChartArea);return n.cancelable=!1,this.notifyPlugins("afterEvent",n,s),(o||n.changed)&&this.render(),this}_handleEvent(t,e,n){let{_active:s=[],options:o}=this,r=e,a=this._getActiveElements(t,s,n,r),l=Cr(t),c=ff(t,this._lastEvent,n,l);n&&(this._lastEvent=null,B(o.onHover,[t,a,this],this),l&&B(o.onClick,[t,a,this],this));let d=!Je(a,s);return(d||e)&&(this._active=a,this._updateHoverStyles(a,s,e)),this._lastEvent=c,d}_getActiveElements(t,e,n,s){if(t.type==="mouseout")return[];if(!n)return e;let o=this.options.hover;return this.getElementsAtEventForMode(t,o.mode,o,s)}};M(lt,"defaults",j),M(lt,"instances",ln),M(lt,"overrides",Wt),M(lt,"registry",wt),M(lt,"version",cf),M(lt,"getChart",wa);oe=class extends pt{constructor(e){super();M(this,"circumference");M(this,"endAngle");M(this,"fullCircles");M(this,"innerRadius");M(this,"outerRadius");M(this,"pixelMargin");M(this,"startAngle");this.options=void 0,this.circumference=void 0,this.startAngle=void 0,this.endAngle=void 0,this.innerRadius=void 0,this.outerRadius=void 0,this.pixelMargin=0,this.fullCircles=0,e&&Object.assign(this,e)}inRange(e,n,s){let o=this.getProps(["x","y"],s),{angle:r,distance:a}=Zn(o,{x:e,y:n}),{startAngle:l,endAngle:c,innerRadius:d,outerRadius:u,circumference:h}=this.getProps(["startAngle","endAngle","innerRadius","outerRadius","circumference"],s),f=(this.options.spacing+this.options.borderWidth)/2,g=E(h,c-l),p=Me(r,l,c)&&l!==c,m=g>=V||p,b=kt(a,d+f,u+f);return m&&b}getCenterPoint(e){let{x:n,y:s,startAngle:o,endAngle:r,innerRadius:a,outerRadius:l}=this.getProps(["x","y","startAngle","endAngle","innerRadius","outerRadius"],e),{offset:c,spacing:d}=this.options,u=(o+r)/2,h=(a+l+d+c)/2;return{x:n+Math.cos(u)*h,y:s+Math.sin(u)*h}}tooltipPosition(e){return this.getCenterPoint(e)}draw(e){let{options:n,circumference:s}=this,o=(n.offset||0)/4,r=(n.spacing||0)/2,a=n.circular;if(this.pixelMargin=n.borderAlign==="inner"?.33:0,this.fullCircles=s>V?Math.floor(s/V):0,s===0||this.innerRadius<0||this.outerRadius<0)return;e.save();let l=(this.startAngle+this.endAngle)/2;e.translate(Math.cos(l)*o,Math.sin(l)*o);let c=1-Math.sin(Math.min(F,s||0)),d=o*c;e.fillStyle=n.backgroundColor,e.strokeStyle=n.borderColor,yf(e,this,d,r,a),xf(e,this,d,r,a),e.restore()}};M(oe,"id","arc"),M(oe,"defaults",{borderAlign:"center",borderColor:"#fff",borderDash:[],borderDashOffset:0,borderJoinStyle:void 0,borderRadius:0,borderWidth:2,offset:0,spacing:0,angle:void 0,circular:!0,selfJoin:!1}),M(oe,"defaultRoutes",{backgroundColor:"backgroundColor"}),M(oe,"descriptors",{_scriptable:!0,_indexable:e=>e!=="borderDash"});Cf=typeof Path2D=="function";Ct=class extends pt{constructor(t){super(),this.animated=!0,this.options=void 0,this._chart=void 0,this._loop=void 0,this._fullLoop=void 0,this._path=void 0,this._points=void 0,this._segments=void 0,this._decimated=!1,this._pointsUpdated=!1,this._datasetIndex=void 0,t&&Object.assign(this,t)}updateControlPoints(t,e){let n=this.options;if((n.tension||n.cubicInterpolationMode==="monotone")&&!n.stepped&&!this._pointsUpdated){let s=n.spanGaps?this._loop:this._fullLoop;Yr(this._points,n,t,s,e),this._pointsUpdated=!0}}set points(t){this._points=t,delete this._segments,delete this._path,this._pointsUpdated=!1}get points(){return this._points}get segments(){return this._segments||(this._segments=Zr(this,this.options.segment))}first(){let t=this.segments,e=this.points;return t.length&&e[t[0].start]}last(){let t=this.segments,e=this.points,n=t.length;return n&&e[t[n-1].end]}interpolate(t,e){let n=this.options,s=t[e],o=this.points,r=xs(this,{property:e,start:s,end:s});if(!r.length)return;let a=[],l=kf(n),c,d;for(c=0,d=r.length;c<d;++c){let{start:u,end:h}=r[c],f=o[u],g=o[h];if(f===g){a.push(f);continue}let p=Math.abs((s-f[e])/(g[e]-f[e])),m=l(f,g,p,n.stepped);m[e]=t[e],a.push(m)}return a.length===1?a[0]:a}pathSegment(t,e,n){return Ns(this)(t,this,e,n)}path(t,e,n){let s=this.segments,o=Ns(this),r=this._loop;e=e||0,n=n||this.points.length-e;for(let a of s)r&=o(t,this,a,{start:e,end:e+n-1});return!!r}draw(t,e,n,s){let o=this.options||{};(this.points||[]).length&&o.borderWidth&&(t.save(),Ef(t,this,n,s),t.restore()),this.animated&&(this._pointsUpdated=!1,this._path=void 0)}};M(Ct,"id","line"),M(Ct,"defaults",{borderCapStyle:"butt",borderDash:[],borderDashOffset:0,borderJoinStyle:"miter",borderWidth:3,capBezierPoints:!0,cubicInterpolationMode:"default",fill:!1,spanGaps:!1,stepped:!1,tension:0}),M(Ct,"defaultRoutes",{backgroundColor:"backgroundColor",borderColor:"borderColor"}),M(Ct,"descriptors",{_scriptable:!0,_indexable:t=>t!=="borderDash"&&t!=="fill"});Pe=class extends pt{constructor(e){super();M(this,"parsed");M(this,"skip");M(this,"stop");this.options=void 0,this.parsed=void 0,this.skip=void 0,this.stop=void 0,e&&Object.assign(this,e)}inRange(e,n,s){let o=this.options,{x:r,y:a}=this.getProps(["x","y"],s);return Math.pow(e-r,2)+Math.pow(n-a,2)<Math.pow(o.hitRadius+o.radius,2)}inXRange(e,n){return Ea(this,e,"x",n)}inYRange(e,n){return Ea(this,e,"y",n)}getCenterPoint(e){let{x:n,y:s}=this.getProps(["x","y"],e);return{x:n,y:s}}size(e){e=e||this.options||{};let n=e.radius||0;n=Math.max(n,n&&e.hoverRadius||0);let s=n&&e.borderWidth||0;return(n+s)*2}draw(e,n){let s=this.options;this.skip||s.radius<.1||!Mt(this,n,this.size(s)/2)||(e.strokeStyle=s.borderColor,e.lineWidth=s.borderWidth,e.fillStyle=s.backgroundColor,Ki(e,s,this.x,this.y))}getRange(){let e=this.options||{};return e.radius+e.hitRadius}};M(Pe,"id","point"),M(Pe,"defaults",{borderWidth:1,hitRadius:1,hoverBorderWidth:1,hoverRadius:4,pointStyle:"circle",radius:3,rotation:0}),M(Pe,"defaultRoutes",{backgroundColor:"backgroundColor",borderColor:"borderColor"});Re=class extends pt{constructor(t){super(),this.options=void 0,this.horizontal=void 0,this.base=void 0,this.width=void 0,this.height=void 0,this.inflateAmount=void 0,t&&Object.assign(this,t)}draw(t){let{inflateAmount:e,options:{borderColor:n,backgroundColor:s}}=this,{inner:o,outer:r}=Df(this),a=Pf(r.radius)?ke:Rf;t.save(),(r.w!==o.w||r.h!==o.h)&&(t.beginPath(),a(t,Ls(r,e,o)),t.clip(),a(t,Ls(o,-e,r)),t.fillStyle=n,t.fill("evenodd")),t.beginPath(),a(t,Ls(o,e)),t.fillStyle=s,t.fill(),t.restore()}inRange(t,e,n){return Es(this,t,e,n)}inXRange(t,e){return Es(this,t,null,e)}inYRange(t,e){return Es(this,null,t,e)}getCenterPoint(t){let{x:e,y:n,base:s,horizontal:o}=this.getProps(["x","y","base","horizontal"],t);return{x:o?(e+s)/2:e,y:o?n:(n+s)/2}}getRange(t){return t==="x"?this.width/2:this.height/2}};M(Re,"id","bar"),M(Re,"defaults",{borderSkipped:"start",borderWidth:0,borderRadius:0,inflateAmount:"auto",pointStyle:void 0}),M(Re,"defaultRoutes",{backgroundColor:"backgroundColor",borderColor:"borderColor"});Of=Object.freeze({__proto__:null,ArcElement:oe,BarElement:Re,LineElement:Ct,PointElement:Pe}),Vs=["rgb(54, 162, 235)","rgb(255, 99, 132)","rgb(255, 159, 64)","rgb(255, 205, 86)","rgb(75, 192, 192)","rgb(153, 102, 255)","rgb(201, 203, 207)"],La=Vs.map(i=>i.replace("rgb(","rgba(").replace(")",", 0.5)"));Bf={id:"colors",defaults:{enabled:!0,forceOverride:!1},beforeLayout(i,t,e){if(!e.enabled)return;let{data:{datasets:n},options:s}=i.config,{elements:o}=s,r=Aa(n)||zf(s)||o&&Aa(o)||Wf();if(!e.forceOverride&&r)return;let a=Hf(i);n.forEach(a)}};qf={id:"decimation",defaults:{algorithm:"min-max",enabled:!1},beforeElementsUpdate:(i,t,e)=>{if(!e.enabled){Da(i);return}let n=i.width;i.data.datasets.forEach((s,o)=>{let{_data:r,indexAxis:a}=s,l=i.getDatasetMeta(o),c=r||s.data;if(Te([a,i.options.indexAxis])==="y"||!l.controller.supportsDecimation)return;let d=i.scales[l.xAxisID];if(d.type!=="linear"&&d.type!=="time"||i.options.parsing)return;let{start:u,count:h}=jf(l,c),f=e.threshold||4*n;if(h<=f){gl(s);return}R(r)&&(s._data=c,delete s.data,Object.defineProperty(s,"data",{configurable:!0,enumerable:!0,get:function(){return this._decimated},set:function(p){this._data=p}}));let g;switch(e.algorithm){case"lttb":g=Nf(c,u,h,n,e);break;case"min-max":g=Vf(c,u,h,n);break;default:throw new Error(`Unsupported decimation algorithm '${e.algorithm}'`)}s._decimated=g})},destroy(i){Da(i)}};fn=class{constructor(t){this.x=t.x,this.y=t.y,this.radius=t.radius}pathSegment(t,e,n){let{x:s,y:o,radius:r}=this;return e=e||{start:0,end:V},t.arc(s,o,r,e.end,e.start,!0),!n.bounds}interpolate(t){let{x:e,y:n,radius:s}=this,o=t.angle;return{x:e+Math.cos(o)*s,y:n+Math.sin(o)*s,angle:o}}};ug={id:"filler",afterDatasetsUpdate(i,t,e){let n=(i.data.datasets||[]).length,s=[],o,r,a,l;for(r=0;r<n;++r)o=i.getDatasetMeta(r),a=o.dataset,l=null,a&&a.options&&a instanceof Ct&&(l={visible:i.isDatasetVisible(r),index:r,fill:Gf(a,r,n),chart:i,axis:o.controller.options.indexAxis,scale:o.vScale,line:a}),o.$filler=l,s.push(l);for(r=0;r<n;++r)l=s[r],!(!l||l.fill===!1)&&(l.fill=Kf(s,r,e.propagate))},beforeDraw(i,t,e){let n=e.drawTime==="beforeDraw",s=i.getSortedVisibleDatasetMetas(),o=i.chartArea;for(let r=s.length-1;r>=0;--r){let a=s[r].$filler;a&&(a.line.updateControlPoints(o,a.axis),n&&a.fill&&As(i.ctx,a,o))}},beforeDatasetsDraw(i,t,e){if(e.drawTime!=="beforeDatasetsDraw")return;let n=i.getSortedVisibleDatasetMetas();for(let s=n.length-1;s>=0;--s){let o=n[s].$filler;Ra(o)&&As(i.ctx,o,i.chartArea)}},beforeDatasetDraw(i,t,e){let n=t.meta.$filler;!Ra(n)||e.drawTime!=="beforeDatasetDraw"||As(i.ctx,n,i.chartArea)},defaults:{propagate:!0,drawTime:"beforeDatasetDraw"}},$a=(i,t)=>{let{boxHeight:e=t,boxWidth:n=t}=i;return i.usePointStyle&&(e=Math.min(e,t),n=i.pointStyleWidth||Math.min(n,t)),{boxWidth:n,boxHeight:e,itemHeight:Math.max(t,e)}},hg=(i,t)=>i!==null&&t!==null&&i.datasetIndex===t.datasetIndex&&i.index===t.index,gn=class extends pt{constructor(t){super(),this._added=!1,this.legendHitBoxes=[],this._hoveredItem=null,this.doughnutMode=!1,this.chart=t.chart,this.options=t.options,this.ctx=t.ctx,this.legendItems=void 0,this.columnSizes=void 0,this.lineWidths=void 0,this.maxHeight=void 0,this.maxWidth=void 0,this.top=void 0,this.bottom=void 0,this.left=void 0,this.right=void 0,this.height=void 0,this.width=void 0,this._margins=void 0,this.position=void 0,this.weight=void 0,this.fullSize=void 0}update(t,e,n){this.maxWidth=t,this.maxHeight=e,this._margins=n,this.setDimensions(),this.buildLabels(),this.fit()}setDimensions(){this.isHorizontal()?(this.width=this.maxWidth,this.left=this._margins.left,this.right=this.width):(this.height=this.maxHeight,this.top=this._margins.top,this.bottom=this.height)}buildLabels(){let t=this.options.labels||{},e=B(t.generateLabels,[this.chart],this)||[];t.filter&&(e=e.filter(n=>t.filter(n,this.chart.data))),t.sort&&(e=e.sort((n,s)=>t.sort(n,s,this.chart.data))),this.options.reverse&&e.reverse(),this.legendItems=e}fit(){let{options:t,ctx:e}=this;if(!t.display){this.width=this.height=0;return}let n=t.labels,s=J(n.font),o=s.size,r=this._computeTitleHeight(),{boxWidth:a,itemHeight:l}=$a(n,o),c,d;e.font=s.string,this.isHorizontal()?(c=this.maxWidth,d=this._fitRows(r,o,a,l)+10):(d=this.maxHeight,c=this._fitCols(r,s,a,l)+10),this.width=Math.min(c,t.maxWidth||this.maxWidth),this.height=Math.min(d,t.maxHeight||this.maxHeight)}_fitRows(t,e,n,s){let{ctx:o,maxWidth:r,options:{labels:{padding:a}}}=this,l=this.legendHitBoxes=[],c=this.lineWidths=[0],d=s+a,u=t;o.textAlign="left",o.textBaseline="middle";let h=-1,f=-d;return this.legendItems.forEach((g,p)=>{let m=n+e/2+o.measureText(g.text).width;(p===0||c[c.length-1]+m+2*a>r)&&(u+=d,c[c.length-(p>0?0:1)]=0,f+=d,h++),l[p]={left:0,top:f,row:h,width:m,height:s},c[c.length-1]+=m+a}),u}_fitCols(t,e,n,s){let{ctx:o,maxHeight:r,options:{labels:{padding:a}}}=this,l=this.legendHitBoxes=[],c=this.columnSizes=[],d=r-t,u=a,h=0,f=0,g=0,p=0;return this.legendItems.forEach((m,b)=>{let{itemWidth:y,itemHeight:_}=fg(n,e,o,m,s);b>0&&f+_+2*a>d&&(u+=h+a,c.push({width:h,height:f}),g+=h+a,p++,h=f=0),l[b]={left:g,top:f,col:p,width:y,height:_},h=Math.max(h,y),f+=_+a}),u+=h,c.push({width:h,height:f}),u}adjustHitBoxes(){if(!this.options.display)return;let t=this._computeTitleHeight(),{legendHitBoxes:e,options:{align:n,labels:{padding:s},rtl:o}}=this,r=ie(o,this.left,this.width);if(this.isHorizontal()){let a=0,l=it(n,this.left+s,this.right-this.lineWidths[a]);for(let c of e)a!==c.row&&(a=c.row,l=it(n,this.left+s,this.right-this.lineWidths[a])),c.top+=this.top+t+s,c.left=r.leftForLtr(r.x(l),c.width),l+=c.width+s}else{let a=0,l=it(n,this.top+t+s,this.bottom-this.columnSizes[a].height);for(let c of e)c.col!==a&&(a=c.col,l=it(n,this.top+t+s,this.bottom-this.columnSizes[a].height)),c.top=l,c.left+=this.left+s,c.left=r.leftForLtr(r.x(c.left),c.width),l+=c.height+s}}isHorizontal(){return this.options.position==="top"||this.options.position==="bottom"}draw(){if(this.options.display){let t=this.ctx;Qe(t,this),this._draw(),ti(t)}}_draw(){let{options:t,columnSizes:e,lineWidths:n,ctx:s}=this,{align:o,labels:r}=t,a=j.color,l=ie(t.rtl,this.left,this.width),c=J(r.font),{padding:d}=r,u=c.size,h=u/2,f;this.drawTitle(),s.textAlign=l.textAlign("left"),s.textBaseline="middle",s.lineWidth=.5,s.font=c.string;let{boxWidth:g,boxHeight:p,itemHeight:m}=$a(r,u),b=function(S,k,T){if(isNaN(g)||g<=0||isNaN(p)||p<0)return;s.save();let w=E(T.lineWidth,1);if(s.fillStyle=E(T.fillStyle,a),s.lineCap=E(T.lineCap,"butt"),s.lineDashOffset=E(T.lineDashOffset,0),s.lineJoin=E(T.lineJoin,"miter"),s.lineWidth=w,s.strokeStyle=E(T.strokeStyle,a),s.setLineDash(E(T.lineDash,[])),r.usePointStyle){let L={radius:p*Math.SQRT2/2,pointStyle:T.pointStyle,rotation:T.rotation,borderWidth:w},A=l.xPlus(S,g/2),I=k+h;ls(s,L,A,I,r.pointStyleWidth&&g)}else{let L=k+Math.max((u-p)/2,0),A=l.leftForLtr(S,g),I=Vt(T.borderRadius);s.beginPath(),Object.values(I).some(Q=>Q!==0)?ke(s,{x:A,y:L,w:g,h:p,radius:I}):s.rect(A,L,g,p),s.fill(),w!==0&&s.stroke()}s.restore()},y=function(S,k,T){Nt(s,T.text,S,k+m/2,c,{strikethrough:T.hidden,textAlign:l.textAlign(T.textAlign)})},_=this.isHorizontal(),v=this._computeTitleHeight();_?f={x:it(o,this.left+d,this.right-n[0]),y:this.top+d+v,line:0}:f={x:this.left+d,y:it(o,this.top+v+d,this.bottom-e[0].height),line:0},ms(this.ctx,t.textDirection);let x=m+d;this.legendItems.forEach((S,k)=>{s.strokeStyle=S.fontColor,s.fillStyle=S.fontColor;let T=s.measureText(S.text).width,w=l.textAlign(S.textAlign||(S.textAlign=r.textAlign)),L=g+h+T,A=f.x,I=f.y;l.setWidth(this.width),_?k>0&&A+L+d>this.right&&(I=f.y+=x,f.line++,A=f.x=it(o,this.left+d,this.right-n[f.line])):k>0&&I+x>this.bottom&&(A=f.x=A+e[f.line].width+d,f.line++,I=f.y=it(o,this.top+v+d,this.bottom-e[f.line].height));let Q=l.x(A);if(b(Q,I,S),A=Fr(w,A+g+h,_?A+L:this.right,t.rtl),y(l.x(A),I,S),_)f.x+=L+d;else if(typeof S.text!="string"){let ht=c.lineHeight;f.y+=ml(S,ht)+d}else f.y+=x}),bs(this.ctx,t.textDirection)}drawTitle(){let t=this.options,e=t.title,n=J(e.font),s=nt(e.padding);if(!e.display)return;let o=ie(t.rtl,this.left,this.width),r=this.ctx,a=e.position,l=n.size/2,c=s.top+l,d,u=this.left,h=this.width;if(this.isHorizontal())h=Math.max(...this.lineWidths),d=this.top+c,u=it(t.align,u,this.right-h);else{let g=this.columnSizes.reduce((p,m)=>Math.max(p,m.height),0);d=c+it(t.align,this.top,this.bottom-g-t.labels.padding-this._computeTitleHeight())}let f=it(a,u,u+h);r.textAlign=o.textAlign(Yi(a)),r.textBaseline="middle",r.strokeStyle=e.color,r.fillStyle=e.color,r.font=n.string,Nt(r,e.text,f,d,n)}_computeTitleHeight(){let t=this.options.title,e=J(t.font),n=nt(t.padding);return t.display?e.lineHeight+n.height:0}_getLegendItemAt(t,e){let n,s,o;if(kt(t,this.left,this.right)&&kt(e,this.top,this.bottom)){for(o=this.legendHitBoxes,n=0;n<o.length;++n)if(s=o[n],kt(t,s.left,s.left+s.width)&&kt(e,s.top,s.top+s.height))return this.legendItems[n]}return null}handleEvent(t){let e=this.options;if(!mg(t.type,e))return;let n=this._getLegendItemAt(t.x,t.y);if(t.type==="mousemove"||t.type==="mouseout"){let s=this._hoveredItem,o=hg(s,n);s&&!o&&B(e.onLeave,[t,s,this],this),this._hoveredItem=n,n&&!o&&B(e.onHover,[t,n,this],this)}else n&&B(e.onClick,[t,n,this],this)}};bg={id:"legend",_element:gn,start(i,t,e){let n=i.legend=new gn({ctx:i.ctx,options:e,chart:i});ot.configure(i,n,e),ot.addBox(i,n)},stop(i){ot.removeBox(i,i.legend),delete i.legend},beforeUpdate(i,t,e){let n=i.legend;ot.configure(i,n,e),n.options=e},afterUpdate(i){let t=i.legend;t.buildLabels(),t.adjustHitBoxes()},afterEvent(i,t){t.replay||i.legend.handleEvent(t.event)},defaults:{display:!0,position:"top",align:"center",fullSize:!0,reverse:!1,weight:1e3,onClick(i,t,e){let n=t.datasetIndex,s=e.chart;s.isDatasetVisible(n)?(s.hide(n),t.hidden=!0):(s.show(n),t.hidden=!1)},onHover:null,onLeave:null,labels:{color:i=>i.chart.options.color,boxWidth:40,padding:10,generateLabels(i){let t=i.data.datasets,{labels:{usePointStyle:e,pointStyle:n,textAlign:s,color:o,useBorderRadius:r,borderRadius:a}}=i.legend.options;return i._getSortedDatasetMetas().map(l=>{let c=l.controller.getStyle(e?0:void 0),d=nt(c.borderWidth);return{text:t[l.index].label,fillStyle:c.backgroundColor,fontColor:o,hidden:!l.visible,lineCap:c.borderCapStyle,lineDash:c.borderDash,lineDashOffset:c.borderDashOffset,lineJoin:c.borderJoinStyle,lineWidth:(d.width+d.height)/4,strokeStyle:c.borderColor,pointStyle:n||c.pointStyle,rotation:c.rotation,textAlign:s||c.textAlign,borderRadius:r&&(a||c.borderRadius),datasetIndex:l.index}},this)}},title:{color:i=>i.chart.options.color,display:!1,position:"center",text:""}},descriptors:{_scriptable:i=>!i.startsWith("on"),labels:{_scriptable:i=>!["generateLabels","filter","sort"].includes(i)}}},pi=class extends pt{constructor(t){super(),this.chart=t.chart,this.options=t.options,this.ctx=t.ctx,this._padding=void 0,this.top=void 0,this.bottom=void 0,this.left=void 0,this.right=void 0,this.width=void 0,this.height=void 0,this.position=void 0,this.weight=void 0,this.fullSize=void 0}update(t,e){let n=this.options;if(this.left=0,this.top=0,!n.display){this.width=this.height=this.right=this.bottom=0;return}this.width=this.right=t,this.height=this.bottom=e;let s=N(n.text)?n.text.length:1;this._padding=nt(n.padding);let o=s*J(n.font).lineHeight+this._padding.height;this.isHorizontal()?this.height=o:this.width=o}isHorizontal(){let t=this.options.position;return t==="top"||t==="bottom"}_drawArgs(t){let{top:e,left:n,bottom:s,right:o,options:r}=this,a=r.align,l=0,c,d,u;return this.isHorizontal()?(d=it(a,n,o),u=e+t,c=o-n):(r.position==="left"?(d=n+t,u=it(a,s,e),l=F*-.5):(d=o-t,u=it(a,e,s),l=F*.5),c=s-e),{titleX:d,titleY:u,maxWidth:c,rotation:l}}draw(){let t=this.ctx,e=this.options;if(!e.display)return;let n=J(e.font),o=n.lineHeight/2+this._padding.top,{titleX:r,titleY:a,maxWidth:l,rotation:c}=this._drawArgs(o);Nt(t,e.text,0,0,n,{color:e.color,maxWidth:l,rotation:c,textAlign:Yi(e.align),textBaseline:"middle",translation:[r,a]})}};xg={id:"title",_element:pi,start(i,t,e){yg(i,e)},stop(i){let t=i.titleBlock;ot.removeBox(i,t),delete i.titleBlock},beforeUpdate(i,t,e){let n=i.titleBlock;ot.configure(i,n,e),n.options=e},defaults:{align:"center",display:!1,font:{weight:"bold"},fullSize:!0,padding:10,position:"top",text:"",weight:2e3},defaultRoutes:{color:"color"},descriptors:{_scriptable:!0,_indexable:!1}},sn=new WeakMap,_g={id:"subtitle",start(i,t,e){let n=new pi({ctx:i.ctx,options:e,chart:i});ot.configure(i,n,e),ot.addBox(i,n),sn.set(i,n)},stop(i){ot.removeBox(i,sn.get(i)),sn.delete(i)},beforeUpdate(i,t,e){let n=sn.get(i);ot.configure(i,n,e),n.options=e},defaults:{align:"center",display:!1,font:{weight:"normal"},fullSize:!0,padding:0,position:"top",text:"",weight:1500},defaultRoutes:{color:"color"},descriptors:{_scriptable:!0,_indexable:!1}},li={average(i){if(!i.length)return!1;let t,e,n=new Set,s=0,o=0;for(t=0,e=i.length;t<e;++t){let a=i[t].element;if(a&&a.hasValue()){let l=a.tooltipPosition();n.add(l.x),s+=l.y,++o}}return o===0||n.size===0?!1:{x:[...n].reduce((a,l)=>a+l)/n.size,y:s/o}},nearest(i,t){if(!i.length)return!1;let e=t.x,n=t.y,s=Number.POSITIVE_INFINITY,o,r,a;for(o=0,r=i.length;o<r;++o){let l=i[o].element;if(l&&l.hasValue()){let c=l.getCenterPoint(),d=Bi(t,c);d<s&&(s=d,a=l)}}if(a){let l=a.tooltipPosition();e=l.x,n=l.y}return{x:e,y:n}}};bl={beforeTitle:St,title(i){if(i.length>0){let t=i[0],e=t.chart.data.labels,n=e?e.length:0;if(this&&this.options&&this.options.mode==="dataset")return t.dataset.label||"";if(t.label)return t.label;if(n>0&&t.dataIndex<n)return e[t.dataIndex]}return""},afterTitle:St,beforeBody:St,beforeLabel:St,label(i){if(this&&this.options&&this.options.mode==="dataset")return i.label+": "+i.formattedValue||i.formattedValue;let t=i.dataset.label||"";t&&(t+=": ");let e=i.formattedValue;return R(e)||(t+=e),t},labelColor(i){let e=i.chart.getDatasetMeta(i.datasetIndex).controller.getStyle(i.dataIndex);return{borderColor:e.borderColor,backgroundColor:e.backgroundColor,borderWidth:e.borderWidth,borderDash:e.borderDash,borderDashOffset:e.borderDashOffset,borderRadius:0}},labelTextColor(){return this.options.bodyColor},labelPointStyle(i){let e=i.chart.getDatasetMeta(i.datasetIndex).controller.getStyle(i.dataIndex);return{pointStyle:e.pointStyle,rotation:e.rotation}},afterLabel:St,afterBody:St,beforeFooter:St,footer:St,afterFooter:St};fi=class extends pt{constructor(t){super(),this.opacity=0,this._active=[],this._eventPosition=void 0,this._size=void 0,this._cachedAnimations=void 0,this._tooltipItems=[],this.$animations=void 0,this.$context=void 0,this.chart=t.chart,this.options=t.options,this.dataPoints=void 0,this.title=void 0,this.beforeBody=void 0,this.body=void 0,this.afterBody=void 0,this.footer=void 0,this.xAlign=void 0,this.yAlign=void 0,this.x=void 0,this.y=void 0,this.height=void 0,this.width=void 0,this.caretX=void 0,this.caretY=void 0,this.labelColors=void 0,this.labelPointStyles=void 0,this.labelTextColors=void 0}initialize(t){this.options=t,this._cachedAnimations=void 0,this.$context=void 0}_resolveAnimations(){let t=this._cachedAnimations;if(t)return t;let e=this.chart,n=this.options.setContext(this.getContext()),s=n.enabled&&e.options.animation&&n.animations,o=new cn(this.chart,s);return s._cacheable&&(this._cachedAnimations=Object.freeze(o)),o}getContext(){return this.$context||(this.$context=Cg(this.chart.getContext(),this,this._tooltipItems))}getTitle(t,e){let{callbacks:n}=e,s=dt(n,"beforeTitle",this,t),o=dt(n,"title",this,t),r=dt(n,"afterTitle",this,t),a=[];return a=Tt(a,Ot(s)),a=Tt(a,Ot(o)),a=Tt(a,Ot(r)),a}getBeforeBody(t,e){return Ba(dt(e.callbacks,"beforeBody",this,t))}getBody(t,e){let{callbacks:n}=e,s=[];return H(t,o=>{let r={before:[],lines:[],after:[]},a=Na(n,o);Tt(r.before,Ot(dt(a,"beforeLabel",this,o))),Tt(r.lines,dt(a,"label",this,o)),Tt(r.after,Ot(dt(a,"afterLabel",this,o))),s.push(r)}),s}getAfterBody(t,e){return Ba(dt(e.callbacks,"afterBody",this,t))}getFooter(t,e){let{callbacks:n}=e,s=dt(n,"beforeFooter",this,t),o=dt(n,"footer",this,t),r=dt(n,"afterFooter",this,t),a=[];return a=Tt(a,Ot(s)),a=Tt(a,Ot(o)),a=Tt(a,Ot(r)),a}_createItems(t){let e=this._active,n=this.chart.data,s=[],o=[],r=[],a=[],l,c;for(l=0,c=e.length;l<c;++l)a.push(vg(this.chart,e[l]));return t.filter&&(a=a.filter((d,u,h)=>t.filter(d,u,h,n))),t.itemSort&&(a=a.sort((d,u)=>t.itemSort(d,u,n))),H(a,d=>{let u=Na(t.callbacks,d);s.push(dt(u,"labelColor",this,d)),o.push(dt(u,"labelPointStyle",this,d)),r.push(dt(u,"labelTextColor",this,d))}),this.labelColors=s,this.labelPointStyles=o,this.labelTextColors=r,this.dataPoints=a,a}update(t,e){let n=this.options.setContext(this.getContext()),s=this._active,o,r=[];if(!s.length)this.opacity!==0&&(o={opacity:0});else{let a=li[n.position].call(this,s,this._eventPosition);r=this._createItems(n),this.title=this.getTitle(r,n),this.beforeBody=this.getBeforeBody(r,n),this.body=this.getBody(r,n),this.afterBody=this.getAfterBody(r,n),this.footer=this.getFooter(r,n);let l=this._size=Ha(this,n),c=Object.assign({},a,l),d=za(this.chart,n,c),u=Wa(n,c,d,this.chart);this.xAlign=d.xAlign,this.yAlign=d.yAlign,o={opacity:1,x:u.x,y:u.y,width:l.width,height:l.height,caretX:a.x,caretY:a.y}}this._tooltipItems=r,this.$context=void 0,o&&this._resolveAnimations().update(this,o),t&&n.external&&n.external.call(this,{chart:this.chart,tooltip:this,replay:e})}drawCaret(t,e,n,s){let o=this.getCaretPosition(t,n,s);e.lineTo(o.x1,o.y1),e.lineTo(o.x2,o.y2),e.lineTo(o.x3,o.y3)}getCaretPosition(t,e,n){let{xAlign:s,yAlign:o}=this,{caretSize:r,cornerRadius:a}=n,{topLeft:l,topRight:c,bottomLeft:d,bottomRight:u}=Vt(a),{x:h,y:f}=t,{width:g,height:p}=e,m,b,y,_,v,x;return o==="center"?(v=f+p/2,s==="left"?(m=h,b=m-r,_=v+r,x=v-r):(m=h+g,b=m+r,_=v-r,x=v+r),y=m):(s==="left"?b=h+Math.max(l,d)+r:s==="right"?b=h+g-Math.max(c,u)-r:b=this.caretX,o==="top"?(_=f,v=_-r,m=b-r,y=b+r):(_=f+p,v=_+r,m=b+r,y=b-r),x=_),{x1:m,x2:b,x3:y,y1:_,y2:v,y3:x}}drawTitle(t,e,n){let s=this.title,o=s.length,r,a,l;if(o){let c=ie(n.rtl,this.x,this.width);for(t.x=on(this,n.titleAlign,n),e.textAlign=c.textAlign(n.titleAlign),e.textBaseline="middle",r=J(n.titleFont),a=n.titleSpacing,e.fillStyle=n.titleColor,e.font=r.string,l=0;l<o;++l)e.fillText(s[l],c.x(t.x),t.y+r.lineHeight/2),t.y+=r.lineHeight+a,l+1===o&&(t.y+=n.titleMarginBottom-a)}}_drawColorBox(t,e,n,s,o){let r=this.labelColors[n],a=this.labelPointStyles[n],{boxHeight:l,boxWidth:c}=o,d=J(o.bodyFont),u=on(this,"left",o),h=s.x(u),f=l<d.lineHeight?(d.lineHeight-l)/2:0,g=e.y+f;if(o.usePointStyle){let p={radius:Math.min(c,l)/2,pointStyle:a.pointStyle,rotation:a.rotation,borderWidth:1},m=s.leftForLtr(h,c)+c/2,b=g+l/2;t.strokeStyle=o.multiKeyBackground,t.fillStyle=o.multiKeyBackground,Ki(t,p,m,b),t.strokeStyle=r.borderColor,t.fillStyle=r.backgroundColor,Ki(t,p,m,b)}else{t.lineWidth=O(r.borderWidth)?Math.max(...Object.values(r.borderWidth)):r.borderWidth||1,t.strokeStyle=r.borderColor,t.setLineDash(r.borderDash||[]),t.lineDashOffset=r.borderDashOffset||0;let p=s.leftForLtr(h,c),m=s.leftForLtr(s.xPlus(h,1),c-2),b=Vt(r.borderRadius);Object.values(b).some(y=>y!==0)?(t.beginPath(),t.fillStyle=o.multiKeyBackground,ke(t,{x:p,y:g,w:c,h:l,radius:b}),t.fill(),t.stroke(),t.fillStyle=r.backgroundColor,t.beginPath(),ke(t,{x:m,y:g+1,w:c-2,h:l-2,radius:b}),t.fill()):(t.fillStyle=o.multiKeyBackground,t.fillRect(p,g,c,l),t.strokeRect(p,g,c,l),t.fillStyle=r.backgroundColor,t.fillRect(m,g+1,c-2,l-2))}t.fillStyle=this.labelTextColors[n]}drawBody(t,e,n){let{body:s}=this,{bodySpacing:o,bodyAlign:r,displayColors:a,boxHeight:l,boxWidth:c,boxPadding:d}=n,u=J(n.bodyFont),h=u.lineHeight,f=0,g=ie(n.rtl,this.x,this.width),p=function(T){e.fillText(T,g.x(t.x+f),t.y+h/2),t.y+=h+o},m=g.textAlign(r),b,y,_,v,x,S,k;for(e.textAlign=r,e.textBaseline="middle",e.font=u.string,t.x=on(this,m,n),e.fillStyle=n.bodyColor,H(this.beforeBody,p),f=a&&m!=="right"?r==="center"?c/2+d:c+2+d:0,v=0,S=s.length;v<S;++v){for(b=s[v],y=this.labelTextColors[v],e.fillStyle=y,H(b.before,p),_=b.lines,a&&_.length&&(this._drawColorBox(e,t,v,g,n),h=Math.max(u.lineHeight,l)),x=0,k=_.length;x<k;++x)p(_[x]),h=u.lineHeight;H(b.after,p)}f=0,h=u.lineHeight,H(this.afterBody,p),t.y-=o}drawFooter(t,e,n){let s=this.footer,o=s.length,r,a;if(o){let l=ie(n.rtl,this.x,this.width);for(t.x=on(this,n.footerAlign,n),t.y+=n.footerMarginTop,e.textAlign=l.textAlign(n.footerAlign),e.textBaseline="middle",r=J(n.footerFont),e.fillStyle=n.footerColor,e.font=r.string,a=0;a<o;++a)e.fillText(s[a],l.x(t.x),t.y+r.lineHeight/2),t.y+=r.lineHeight+n.footerSpacing}}drawBackground(t,e,n,s){let{xAlign:o,yAlign:r}=this,{x:a,y:l}=t,{width:c,height:d}=n,{topLeft:u,topRight:h,bottomLeft:f,bottomRight:g}=Vt(s.cornerRadius);e.fillStyle=s.backgroundColor,e.strokeStyle=s.borderColor,e.lineWidth=s.borderWidth,e.beginPath(),e.moveTo(a+u,l),r==="top"&&this.drawCaret(t,e,n,s),e.lineTo(a+c-h,l),e.quadraticCurveTo(a+c,l,a+c,l+h),r==="center"&&o==="right"&&this.drawCaret(t,e,n,s),e.lineTo(a+c,l+d-g),e.quadraticCurveTo(a+c,l+d,a+c-g,l+d),r==="bottom"&&this.drawCaret(t,e,n,s),e.lineTo(a+f,l+d),e.quadraticCurveTo(a,l+d,a,l+d-f),r==="center"&&o==="left"&&this.drawCaret(t,e,n,s),e.lineTo(a,l+u),e.quadraticCurveTo(a,l,a+u,l),e.closePath(),e.fill(),s.borderWidth>0&&e.stroke()}_updateAnimationTarget(t){let e=this.chart,n=this.$animations,s=n&&n.x,o=n&&n.y;if(s||o){let r=li[t.position].call(this,this._active,this._eventPosition);if(!r)return;let a=this._size=Ha(this,t),l=Object.assign({},r,this._size),c=za(e,t,l),d=Wa(t,l,c,e);(s._to!==d.x||o._to!==d.y)&&(this.xAlign=c.xAlign,this.yAlign=c.yAlign,this.width=a.width,this.height=a.height,this.caretX=r.x,this.caretY=r.y,this._resolveAnimations().update(this,d))}}_willRender(){return!!this.opacity}draw(t){let e=this.options.setContext(this.getContext()),n=this.opacity;if(!n)return;this._updateAnimationTarget(e);let s={width:this.width,height:this.height},o={x:this.x,y:this.y};n=Math.abs(n)<.001?0:n;let r=nt(e.padding),a=this.title.length||this.beforeBody.length||this.body.length||this.afterBody.length||this.footer.length;e.enabled&&a&&(t.save(),t.globalAlpha=n,this.drawBackground(o,t,s,e),ms(t,e.textDirection),o.y+=r.top,this.drawTitle(o,t,e),this.drawBody(o,t,e),this.drawFooter(o,t,e),bs(t,e.textDirection),t.restore())}getActiveElements(){return this._active||[]}setActiveElements(t,e){let n=this._active,s=t.map(({datasetIndex:a,index:l})=>{let c=this.chart.getDatasetMeta(a);if(!c)throw new Error("Cannot find a dataset at index "+a);return{datasetIndex:a,element:c.data[l],index:l}}),o=!Je(n,s),r=this._positionChanged(s,e);(o||r)&&(this._active=s,this._eventPosition=e,this._ignoreReplayEvents=!0,this.update(!0))}handleEvent(t,e,n=!0){if(e&&this._ignoreReplayEvents)return!1;this._ignoreReplayEvents=!1;let s=this.options,o=this._active||[],r=this._getActiveElements(t,o,e,n),a=this._positionChanged(r,t),l=e||!Je(r,o)||a;return l&&(this._active=r,(s.enabled||s.external)&&(this._eventPosition={x:t.x,y:t.y},this.update(!0,e))),l}_getActiveElements(t,e,n,s){let o=this.options;if(t.type==="mouseout")return[];if(!s)return e.filter(a=>this.chart.data.datasets[a.datasetIndex]&&this.chart.getDatasetMeta(a.datasetIndex).controller.getParsed(a.index)!==void 0);let r=this.chart.getElementsAtEventForMode(t,o.mode,o,n);return o.reverse&&r.reverse(),r}_positionChanged(t,e){let{caretX:n,caretY:s,options:o}=this,r=li[o.position].call(this,t,e);return r!==!1&&(n!==r.x||s!==r.y)}};M(fi,"positioners",li);Eg={id:"tooltip",_element:fi,positioners:li,afterInit(i,t,e){e&&(i.tooltip=new fi({chart:i,options:e}))},beforeUpdate(i,t,e){i.tooltip&&i.tooltip.initialize(e)},reset(i,t,e){i.tooltip&&i.tooltip.initialize(e)},afterDraw(i){let t=i.tooltip;if(t&&t._willRender()){let e={tooltip:t};if(i.notifyPlugins("beforeTooltipDraw",{...e,cancelable:!0})===!1)return;t.draw(i.ctx),i.notifyPlugins("afterTooltipDraw",e)}},afterEvent(i,t){if(i.tooltip){let e=t.replay;i.tooltip.handleEvent(t.event,e,t.inChartArea)&&(t.changed=!0)}},defaults:{enabled:!0,external:null,position:"average",backgroundColor:"rgba(0,0,0,0.8)",titleColor:"#fff",titleFont:{weight:"bold"},titleSpacing:2,titleMarginBottom:6,titleAlign:"left",bodyColor:"#fff",bodySpacing:2,bodyFont:{},bodyAlign:"left",footerColor:"#fff",footerSpacing:2,footerMarginTop:6,footerFont:{weight:"bold"},footerAlign:"left",padding:6,caretPadding:2,caretSize:5,cornerRadius:6,boxHeight:(i,t)=>t.bodyFont.size,boxWidth:(i,t)=>t.bodyFont.size,multiKeyBackground:"#fff",displayColors:!0,boxPadding:0,borderColor:"rgba(0,0,0,0)",borderWidth:0,animation:{duration:400,easing:"easeOutQuart"},animations:{numbers:{type:"number",properties:["x","y","width","height","caretX","caretY"]},opacity:{easing:"linear",duration:200}},callbacks:bl},defaultRoutes:{bodyFont:"font",footerFont:"font",titleFont:"font"},descriptors:{_scriptable:i=>i!=="filter"&&i!=="itemSort"&&i!=="external",_indexable:!1,callbacks:{_scriptable:!1,_indexable:!1},animation:{_fallback:!1},animations:{_fallback:"animation"}},additionalOptionScopes:["interaction"]},Lg=Object.freeze({__proto__:null,Colors:Bf,Decimation:qf,Filler:ug,Legend:bg,SubTitle:_g,Title:xg,Tooltip:Eg}),Ag=(i,t,e,n)=>(typeof t=="string"?(e=i.push(t)-1,n.unshift({index:e,label:t})):isNaN(t)&&(e=null),e);Pg=(i,t)=>i===null?null:Z(Math.round(i),0,t);ci=class extends ce{constructor(t){super(t),this._startValue=void 0,this._valueRange=0,this._addedLabels=[]}init(t){let e=this._addedLabels;if(e.length){let n=this.getLabels();for(let{index:s,label:o}of e)n[s]===o&&n.splice(s,1);this._addedLabels=[]}super.init(t)}parse(t,e){if(R(t))return null;let n=this.getLabels();return e=isFinite(e)&&n[e]===t?e:Dg(n,t,E(e,t),this._addedLabels),Pg(e,n.length-1)}determineDataLimits(){let{minDefined:t,maxDefined:e}=this.getUserBounds(),{min:n,max:s}=this.getMinMax(!0);this.options.bounds==="ticks"&&(t||(n=0),e||(s=this.getLabels().length-1)),this.min=n,this.max=s}buildTicks(){let t=this.min,e=this.max,n=this.options.offset,s=[],o=this.getLabels();o=t===0&&e===o.length-1?o:o.slice(t,e+1),this._valueRange=Math.max(o.length-(n?0:1),1),this._startValue=this.min-(n?.5:0);for(let r=t;r<=e;r++)s.push({value:r});return s}getLabelForValue(t){return Va.call(this,t)}configure(){super.configure(),this.isHorizontal()||(this._reversePixels=!this._reversePixels)}getPixelForValue(t){return typeof t!="number"&&(t=this.parse(t)),t===null?NaN:this.getPixelForDecimal((t-this._startValue)/this._valueRange)}getPixelForTick(t){let e=this.ticks;return t<0||t>e.length-1?null:this.getPixelForValue(e[t].value)}getValueForPixel(t){return Math.round(this._startValue+this.getDecimalForPixel(t)*this._valueRange)}getBasePixel(){return this.bottom}};M(ci,"id","category"),M(ci,"defaults",{ticks:{callback:Va}});Ie=class extends ce{constructor(t){super(t),this.start=void 0,this.end=void 0,this._startValue=void 0,this._endValue=void 0,this._valueRange=0}parse(t,e){return R(t)||(typeof t=="number"||t instanceof Number)&&!isFinite(+t)?null:+t}handleTickRangeOptions(){let{beginAtZero:t}=this.options,{minDefined:e,maxDefined:n}=this.getUserBounds(),{min:s,max:o}=this,r=l=>s=e?s:l,a=l=>o=n?o:l;if(t){let l=xt(s),c=xt(o);l<0&&c<0?a(0):l>0&&c>0&&r(0)}if(s===o){let l=o===0?1:Math.abs(o*.05);a(o+l),t||r(s-l)}this.min=s,this.max=o}getTickLimit(){let t=this.options.ticks,{maxTicksLimit:e,stepSize:n}=t,s;return n?(s=Math.ceil(this.max/n)-Math.floor(this.min/n)+1,s>1e3&&(console.warn(`scales.${this.id}.ticks.stepSize: ${n} would result generating up to ${s} ticks. Limiting to 1000.`),s=1e3)):(s=this.computeTickLimit(),e=e||11),e&&(s=Math.min(e,s)),s}computeTickLimit(){return Number.POSITIVE_INFINITY}buildTicks(){let t=this.options,e=t.ticks,n=this.getTickLimit();n=Math.max(2,n);let s={maxTicks:n,bounds:t.bounds,min:t.min,max:t.max,precision:e.precision,step:e.stepSize,count:e.count,maxDigits:this._maxDigits(),horizontal:this.isHorizontal(),minRotation:e.minRotation||0,includeBounds:e.includeBounds!==!1},o=this._range||this,r=Rg(s,o);return t.bounds==="ticks"&&Xn(r,this,"value"),t.reverse?(r.reverse(),this.start=this.max,this.end=this.min):(this.start=this.min,this.end=this.max),r}configure(){let t=this.ticks,e=this.min,n=this.max;if(super.configure(),this.options.offset&&t.length){let s=(n-e)/Math.max(t.length-1,1)/2;e-=s,n+=s}this._startValue=e,this._endValue=n,this._valueRange=n-e}getLabelForValue(t){return Se(t,this.chart.options.locale,this.options.ticks.format)}},di=class extends Ie{determineDataLimits(){let{min:t,max:e}=this.getMinMax(!0);this.min=Y(t)?t:0,this.max=Y(e)?e:1,this.handleTickRangeOptions()}computeTickLimit(){let t=this.isHorizontal(),e=t?this.width:this.height,n=bt(this.options.ticks.minRotation),s=(t?Math.sin(n):Math.cos(n))||.001,o=this._resolveTickFontOptions(0);return Math.ceil(e/Math.min(40,o.lineHeight/s))}getPixelForValue(t){return t===null?NaN:this.getPixelForDecimal((t-this._startValue)/this._valueRange)}getValueForPixel(t){return this._startValue+this.getDecimalForPixel(t)*this._valueRange}};M(di,"id","linear"),M(di,"defaults",{ticks:{callback:Ze.formatters.numeric}});mi=i=>Math.floor(At(i)),se=(i,t)=>Math.pow(10,mi(i)+t);ui=class extends ce{constructor(t){super(t),this.start=void 0,this.end=void 0,this._startValue=void 0,this._valueRange=0}parse(t,e){let n=Ie.prototype.parse.apply(this,[t,e]);if(n===0){this._zero=!0;return}return Y(n)&&n>0?n:null}determineDataLimits(){let{min:t,max:e}=this.getMinMax(!0);this.min=Y(t)?Math.max(0,t):null,this.max=Y(e)?Math.max(0,e):null,this.options.beginAtZero&&(this._zero=!0),this._zero&&this.min!==this._suggestedMin&&!Y(this._userMin)&&(this.min=t===se(this.min,0)?se(this.min,-1):se(this.min,0)),this.handleTickRangeOptions()}handleTickRangeOptions(){let{minDefined:t,maxDefined:e}=this.getUserBounds(),n=this.min,s=this.max,o=a=>n=t?n:a,r=a=>s=e?s:a;n===s&&(n<=0?(o(1),r(10)):(o(se(n,-1)),r(se(s,1)))),n<=0&&o(se(s,-1)),s<=0&&r(se(n,1)),this.min=n,this.max=s}buildTicks(){let t=this.options,e={min:this._userMin,max:this._userMax},n=Ig(e,this);return t.bounds==="ticks"&&Xn(n,this,"value"),t.reverse?(n.reverse(),this.start=this.max,this.end=this.min):(this.start=this.min,this.end=this.max),n}getLabelForValue(t){return t===void 0?"0":Se(t,this.chart.options.locale,this.options.ticks.format)}configure(){let t=this.min;super.configure(),this._startValue=At(t),this._valueRange=At(this.max)-At(t)}getPixelForValue(t){return(t===void 0||t===0)&&(t=this.min),t===null||isNaN(t)?NaN:this.getPixelForDecimal(t===this.min?0:(At(t)-this._startValue)/this._valueRange)}getValueForPixel(t){let e=this.getDecimalForPixel(t);return Math.pow(10,this._startValue+e*this._valueRange)}};M(ui,"id","logarithmic"),M(ui,"defaults",{ticks:{callback:Ze.formatters.logarithmic,major:{enabled:!0}}});re=class extends Ie{constructor(t){super(t),this.xCenter=void 0,this.yCenter=void 0,this.drawingArea=void 0,this._pointLabels=[],this._pointLabelItems=[]}setDimensions(){let t=this._padding=nt(qs(this.options)/2),e=this.width=this.maxWidth-t.width,n=this.height=this.maxHeight-t.height;this.xCenter=Math.floor(this.left+e/2+t.left),this.yCenter=Math.floor(this.top+n/2+t.top),this.drawingArea=Math.floor(Math.min(e,n)/2)}determineDataLimits(){let{min:t,max:e}=this.getMinMax(!1);this.min=Y(t)&&!isNaN(t)?t:0,this.max=Y(e)&&!isNaN(e)?e:0,this.handleTickRangeOptions()}computeTickLimit(){return Math.ceil(this.drawingArea/qs(this.options))}generateTickLabels(t){Ie.prototype.generateTickLabels.call(this,t),this._pointLabels=this.getLabels().map((e,n)=>{let s=B(this.options.pointLabels.callback,[e,n],this);return s||s===0?s:""}).filter((e,n)=>this.chart.getDataVisibility(n))}fit(){let t=this.options;t.display&&t.pointLabels.display?$g(this):this.setCenterPoint(0,0,0,0)}setCenterPoint(t,e,n,s){this.xCenter+=Math.floor((t-e)/2),this.yCenter+=Math.floor((n-s)/2),this.drawingArea-=Math.min(this.drawingArea/2,Math.max(t,e,n,s))}getIndexAngle(t){let e=V/(this._pointLabels.length||1),n=this.options.startAngle||0;return et(t*e+bt(n))}getDistanceFromCenterForValue(t){if(R(t))return NaN;let e=this.drawingArea/(this.max-this.min);return this.options.reverse?(this.max-t)*e:(t-this.min)*e}getValueForDistanceFromCenter(t){if(R(t))return NaN;let e=t/(this.drawingArea/(this.max-this.min));return this.options.reverse?this.max-e:this.min+e}getPointLabelContext(t){let e=this._pointLabels||[];if(t>=0&&t<e.length){let n=e[t];return Kg(this.getContext(),t,n)}}getPointPosition(t,e,n=0){let s=this.getIndexAngle(t)-K+n;return{x:Math.cos(s)*e+this.xCenter,y:Math.sin(s)*e+this.yCenter,angle:s}}getPointPositionForValue(t,e){return this.getPointPosition(t,this.getDistanceFromCenterForValue(e))}getBasePosition(t){return this.getPointPositionForValue(t||0,this.getBaseValue())}getPointLabelPosition(t){let{left:e,top:n,right:s,bottom:o}=this._pointLabelItems[t];return{left:e,top:n,right:s,bottom:o}}drawBackground(){let{backgroundColor:t,grid:{circular:e}}=this.options;if(t){let n=this.ctx;n.save(),n.beginPath(),yl(this,this.getDistanceFromCenterForValue(this._endValue),e,this._pointLabels.length),n.closePath(),n.fillStyle=t,n.fill(),n.restore()}}drawGrid(){let t=this.ctx,e=this.options,{angleLines:n,grid:s,border:o}=e,r=this._pointLabels.length,a,l,c;if(e.pointLabels.display&&Yg(this,r),s.display&&this.ticks.forEach((d,u)=>{if(u!==0||u===0&&this.min<0){l=this.getDistanceFromCenterForValue(d.value);let h=this.getContext(u),f=s.setContext(h),g=o.setContext(h);Ug(this,f,l,r,g)}}),n.display){for(t.save(),a=r-1;a>=0;a--){let d=n.setContext(this.getPointLabelContext(a)),{color:u,lineWidth:h}=d;!h||!u||(t.lineWidth=h,t.strokeStyle=u,t.setLineDash(d.borderDash),t.lineDashOffset=d.borderDashOffset,l=this.getDistanceFromCenterForValue(e.reverse?this.min:this.max),c=this.getPointPosition(a,l),t.beginPath(),t.moveTo(this.xCenter,this.yCenter),t.lineTo(c.x,c.y),t.stroke())}t.restore()}}drawBorder(){}drawLabels(){let t=this.ctx,e=this.options,n=e.ticks;if(!n.display)return;let s=this.getIndexAngle(0),o,r;t.save(),t.translate(this.xCenter,this.yCenter),t.rotate(s),t.textAlign="center",t.textBaseline="middle",this.ticks.forEach((a,l)=>{if(l===0&&this.min>=0&&!e.reverse)return;let c=n.setContext(this.getContext(l)),d=J(c.font);if(o=this.getDistanceFromCenterForValue(this.ticks[l].value),c.showLabelBackdrop){t.font=d.string,r=t.measureText(a.label).width,t.fillStyle=c.backdropColor;let u=nt(c.backdropPadding);t.fillRect(-r/2-u.left,-o-d.size/2-u.top,r+u.width,d.size+u.height)}Nt(t,a.label,0,-o,d,{color:c.color,strokeColor:c.textStrokeColor,strokeWidth:c.textStrokeWidth})}),t.restore()}drawTitle(){}};M(re,"id","radialLinear"),M(re,"defaults",{display:!0,animate:!0,position:"chartArea",angleLines:{display:!0,lineWidth:1,borderDash:[],borderDashOffset:0},grid:{circular:!1},startAngle:0,ticks:{showLabelBackdrop:!0,callback:Ze.formatters.numeric},pointLabels:{backdropColor:void 0,backdropPadding:2,display:!0,font:{size:10},callback(t){return t},padding:5,centerPointLabels:!1}}),M(re,"defaultRoutes",{"angleLines.color":"borderColor","pointLabels.color":"color","ticks.color":"color"}),M(re,"descriptors",{angleLines:{_fallback:"grid"}});mn={millisecond:{common:!0,size:1,steps:1e3},second:{common:!0,size:1e3,steps:60},minute:{common:!0,size:6e4,steps:60},hour:{common:!0,size:36e5,steps:24},day:{common:!0,size:864e5,steps:30},week:{common:!1,size:6048e5,steps:4},month:{common:!0,size:2628e6,steps:12},quarter:{common:!1,size:7884e6,steps:4},year:{common:!0,size:3154e7}},ut=Object.keys(mn);le=class extends ce{constructor(t){super(t),this._cache={data:[],labels:[],all:[]},this._unit="day",this._majorUnit=void 0,this._offsets={},this._normalized=!1,this._parseOpts=void 0}init(t,e={}){let n=t.time||(t.time={}),s=this._adapter=new ch._date(t.adapters.date);s.init(e),xe(n.displayFormats,s.formats()),this._parseOpts={parser:n.parser,round:n.round,isoWeekday:n.isoWeekday},super.init(t),this._normalized=e.normalized}parse(t,e){return t===void 0?null:Ga(this,t)}beforeLayout(){super.beforeLayout(),this._cache={data:[],labels:[],all:[]}}determineDataLimits(){let t=this.options,e=this._adapter,n=t.time.unit||"day",{min:s,max:o,minDefined:r,maxDefined:a}=this.getUserBounds();function l(c){!r&&!isNaN(c.min)&&(s=Math.min(s,c.min)),!a&&!isNaN(c.max)&&(o=Math.max(o,c.max))}(!r||!a)&&(l(this._getLabelBounds()),(t.bounds!=="ticks"||t.ticks.source!=="labels")&&l(this.getMinMax(!1))),s=Y(s)&&!isNaN(s)?s:+e.startOf(Date.now(),n),o=Y(o)&&!isNaN(o)?o:+e.endOf(Date.now(),n)+1,this.min=Math.min(s,o-1),this.max=Math.max(s+1,o)}_getLabelBounds(){let t=this.getLabelTimestamps(),e=Number.POSITIVE_INFINITY,n=Number.NEGATIVE_INFINITY;return t.length&&(e=t[0],n=t[t.length-1]),{min:e,max:n}}buildTicks(){let t=this.options,e=t.time,n=t.ticks,s=n.source==="labels"?this.getLabelTimestamps():this._generate();t.bounds==="ticks"&&s.length&&(this.min=this._userMin||s[0],this.max=this._userMax||s[s.length-1]);let o=this.min,r=this.max,a=Pr(s,o,r);return this._unit=e.unit||(n.autoSkip?Xa(e.minUnit,this.min,this.max,this._getLabelCapacity(o)):Gg(this,a.length,e.minUnit,this.min,this.max)),this._majorUnit=!n.major.enabled||this._unit==="year"?void 0:Xg(this._unit),this.initOffsets(s),t.reverse&&a.reverse(),Za(this,a,this._majorUnit)}afterAutoSkip(){this.options.offsetAfterAutoskip&&this.initOffsets(this.ticks.map(t=>+t.value))}initOffsets(t=[]){let e=0,n=0,s,o;this.options.offset&&t.length&&(s=this.getDecimalForValue(t[0]),t.length===1?e=1-s:e=(this.getDecimalForValue(t[1])-s)/2,o=this.getDecimalForValue(t[t.length-1]),t.length===1?n=o:n=(o-this.getDecimalForValue(t[t.length-2]))/2);let r=t.length<3?.5:.25;e=Z(e,0,r),n=Z(n,0,r),this._offsets={start:e,end:n,factor:1/(e+1+n)}}_generate(){let t=this._adapter,e=this.min,n=this.max,s=this.options,o=s.time,r=o.unit||Xa(o.minUnit,e,n,this._getLabelCapacity(e)),a=E(s.ticks.stepSize,1),l=r==="week"?o.isoWeekday:!1,c=ee(l)||l===!0,d={},u=e,h,f;if(c&&(u=+t.startOf(u,"isoWeek",l)),u=+t.startOf(u,c?"day":r),t.diff(n,e,r)>1e5*a)throw new Error(e+" and "+n+" are too far apart with stepSize of "+a+" "+r);let g=s.ticks.source==="data"&&this.getDataTimestamps();for(h=u,f=0;h<n;h=+t.add(h,a,r),f++)Ja(d,h,g);return(h===n||s.bounds==="ticks"||f===1)&&Ja(d,h,g),Object.keys(d).sort(Ka).map(p=>+p)}getLabelForValue(t){let e=this._adapter,n=this.options.time;return n.tooltipFormat?e.format(t,n.tooltipFormat):e.format(t,n.displayFormats.datetime)}format(t,e){let s=this.options.time.displayFormats,o=this._unit,r=e||s[o];return this._adapter.format(t,r)}_tickFormatFunction(t,e,n,s){let o=this.options,r=o.ticks.callback;if(r)return B(r,[t,e,n],this);let a=o.time.displayFormats,l=this._unit,c=this._majorUnit,d=l&&a[l],u=c&&a[c],h=n[e],f=c&&u&&h&&h.major;return this._adapter.format(t,s||(f?u:d))}generateTickLabels(t){let e,n,s;for(e=0,n=t.length;e<n;++e)s=t[e],s.label=this._tickFormatFunction(s.value,e,t)}getDecimalForValue(t){return t===null?NaN:(t-this.min)/(this.max-this.min)}getPixelForValue(t){let e=this._offsets,n=this.getDecimalForValue(t);return this.getPixelForDecimal((e.start+n)*e.factor)}getValueForPixel(t){let e=this._offsets,n=this.getDecimalForPixel(t)/e.factor-e.end;return this.min+n*(this.max-this.min)}_getLabelSize(t){let e=this.options.ticks,n=this.ctx.measureText(t).width,s=bt(this.isHorizontal()?e.maxRotation:e.minRotation),o=Math.cos(s),r=Math.sin(s),a=this._resolveTickFontOptions(0).size;return{w:n*o+a*r,h:n*r+a*o}}_getLabelCapacity(t){let e=this.options.time,n=e.displayFormats,s=n[e.unit]||n.millisecond,o=this._tickFormatFunction(t,0,Za(this,[t],this._majorUnit),s),r=this._getLabelSize(o),a=Math.floor(this.isHorizontal()?this.width/r.w:this.height/r.h)-1;return a>0?a:1}getDataTimestamps(){let t=this._cache.data||[],e,n;if(t.length)return t;let s=this.getMatchingVisibleMetas();if(this._normalized&&s.length)return this._cache.data=s[0].controller.getAllParsedValues(this);for(e=0,n=s.length;e<n;++e)t=t.concat(s[e].controller.getAllParsedValues(this));return this._cache.data=this.normalize(t)}getLabelTimestamps(){let t=this._cache.labels||[],e,n;if(t.length)return t;let s=this.getLabels();for(e=0,n=s.length;e<n;++e)t.push(Ga(this,s[e]));return this._cache.labels=this._normalized?t:this.normalize(t)}normalize(t){return ts(t.sort(Ka))}};M(le,"id","time"),M(le,"defaults",{bounds:"data",adapters:{},time:{parser:!1,unit:!1,round:!1,isoWeekday:!1,minUnit:"millisecond",displayFormats:{}},ticks:{source:"auto",callback:!1,major:{enabled:!1}}});hi=class extends le{constructor(t){super(t),this._table=[],this._minPos=void 0,this._tableRange=void 0}initOffsets(){let t=this._getTimestampsForTable(),e=this._table=this.buildLookupTable(t);this._minPos=rn(e,this.min),this._tableRange=rn(e,this.max)-this._minPos,super.initOffsets(t)}buildLookupTable(t){let{min:e,max:n}=this,s=[],o=[],r,a,l,c,d;for(r=0,a=t.length;r<a;++r)c=t[r],c>=e&&c<=n&&s.push(c);if(s.length<2)return[{time:e,pos:0},{time:n,pos:1}];for(r=0,a=s.length;r<a;++r)d=s[r+1],l=s[r-1],c=s[r],Math.round((d+l)/2)!==c&&o.push({time:c,pos:r/(a-1)});return o}_generate(){let t=this.min,e=this.max,n=super.getDataTimestamps();return(!n.includes(t)||!n.length)&&n.splice(0,0,t),(!n.includes(e)||n.length===1)&&n.push(e),n.sort((s,o)=>s-o)}_getTimestampsForTable(){let t=this._cache.all||[];if(t.length)return t;let e=this.getDataTimestamps(),n=this.getLabelTimestamps();return e.length&&n.length?t=this.normalize(e.concat(n)):t=e.length?e:n,t=this._cache.all=t,t}getDecimalForValue(t){return(rn(this._table,t)-this._minPos)/this._tableRange}getValueForPixel(t){let e=this._offsets,n=this.getDecimalForPixel(t)/e.factor-e.end;return rn(this._table,n*this._tableRange+this._minPos,!0)}};M(hi,"id","timeseries"),M(hi,"defaults",le.defaults);Zg=Object.freeze({__proto__:null,CategoryScale:ci,LinearScale:di,LogarithmicScale:ui,RadialLinearScale:re,TimeScale:le,TimeSeriesScale:hi}),xl=[lh,Of,Lg,Zg]});function vl(i,t){let e=document.getElementById(i);if(!e)return null;let n={to18:"rgb(37, 99, 235)",to19:"rgb(79, 70, 229)",to20:"rgb(147, 51, 234)"},s={type:"pie",data:{labels:t.map(o=>o.migration.toUpperCase()),datasets:[{data:t.map(o=>o.minutes),backgroundColor:t.map(o=>n[o.migration]||"#888"),borderWidth:2,borderColor:"#fff"}]},options:{responsive:!0,maintainAspectRatio:!0,plugins:{legend:{position:"bottom",labels:{font:{size:12}}},tooltip:{callbacks:{label:o=>{let r=o.parsed,l=o.dataset.data.reduce((d,u)=>d+u,0),c=l>0?Math.round(r/l*100):0;return`${o.label}: ${bn(r)} (${c}%)`}}}}}};return new lt(e,s)}function Ys(i,t,e=10,n=!1){let s=document.getElementById(i);if(!s)return null;let o=t.slice(0,e),r=o.map(d=>n?d.summary:d.summary.length>50?d.summary.substring(0,50)+"...":d.summary),a=Math.max(...o.map(d=>d.minutes)),l=Qg(a),c={type:"bar",data:{labels:r,datasets:[{label:`Temps (${l})`,data:o.map(d=>tp(d.minutes,l)),backgroundColor:"rgba(37, 99, 235, 0.8)",borderColor:"rgb(37, 99, 235)",borderWidth:1}]},options:{responsive:!0,maintainAspectRatio:!1,indexAxis:"y",plugins:{legend:{display:!1},tooltip:{callbacks:{label:d=>{let u=o[d.dataIndex],h=bn(u.minutes),f=u.occurrences>1?"occurrences":"occurrence";return`${h} \u2022 ${u.occurrences} ${f}`}}}},scales:{x:{beginAtZero:!0,title:{display:!0,text:`Temps (${l})`}}}}};return new lt(s,c)}function Qg(i){return i<60?"min":i<420?"h":"j"}function tp(i,t){if(t==="min")return i;if(t==="h")return Math.round(i/60*100)/100;let e=i/60;return Math.round(e/7*100)/100}function bn(i){if(i<60)return`${i}min`;let t=Math.round(i/60*100)/100;return i<420?`${t}h`:`${Math.round(t/7*100)/100}j`}function Ml(i,t){let e=document.getElementById(i);if(!e)return null;let n={obligatoire:"rgb(220, 38, 38)",recommande:"rgb(217, 119, 6)",optionnelle:"rgb(22, 163, 74)"},s={type:"doughnut",data:{labels:t.map(o=>o.priority.charAt(0).toUpperCase()+o.priority.slice(1)),datasets:[{data:t.map(o=>o.minutes),backgroundColor:t.map(o=>n[o.priority]||"#888"),borderWidth:2,borderColor:"#fff"}]},options:{responsive:!0,maintainAspectRatio:!0,plugins:{legend:{position:"bottom",labels:{font:{size:12}}},tooltip:{callbacks:{label:o=>{let r=o.parsed,l=o.dataset.data.reduce((d,u)=>d+u,0),c=l>0?Math.round(r/l*100):0;return`${o.label}: ${bn(r)} (${c}%)`}}}}}};return new lt(e,s)}function Sl(i,t){let e=document.getElementById(i);if(!e)return null;let n=t.filter(r=>r.minutes>0),s=ep(n),o={type:"pie",data:{labels:n.map(r=>r.targetName),datasets:[{data:n.map(r=>r.minutes),backgroundColor:s,borderWidth:2,borderColor:"#fff"}]},options:{responsive:!0,maintainAspectRatio:!0,plugins:{legend:{position:"bottom",labels:{font:{size:11},padding:8,boxWidth:12}},tooltip:{callbacks:{label:r=>{let a=r.dataIndex,l=n[a],c=r.parsed,u=r.dataset.data.reduce((g,p)=>g+p,0),h=u>0?Math.round(c/u*100):0;return`${l.targetType==="app"?"\u{1F4E6} App":"\u{1F4DA} Lib"} - ${l.targetName}: ${bn(c)} (${h}%)`}}}}}};return new lt(e,o)}function ep(i){let t=["rgb(249, 115, 22)","rgb(34, 197, 94)","rgb(220, 38, 38)","rgb(14, 165, 233)","rgb(234, 88, 12)","rgb(168, 85, 247)","rgb(251, 146, 60)","rgb(16, 185, 129)","rgb(236, 72, 153)","rgb(234, 179, 8)","rgb(59, 130, 246)","rgb(239, 68, 68)","rgb(20, 184, 166)","rgb(217, 70, 239)","rgb(132, 204, 22)"];return i.map((e,n)=>t[n%t.length])}var kl=C(()=>{"use strict";_l();lt.register(...xl)});function wl(i){if(!i)return;let t=Ll(i);if(G.migrations=vl("chart-migrations",t.migrationData)||void 0,G.topRules=Ys("chart-top-rules",t.ruleData,10,!1)||void 0,G.priorities=Ml("chart-priorities",t.priorityData)||void 0,i.projectInfo.type==="nx-monorepo"){let e=Al(i);if(e.length>0){let n=document.getElementById("chart-targets-container");n&&(n.style.display="block",G.targets=Sl("chart-targets",e)||void 0)}}up(i,t.ruleData)}function Cl(i){let t=Ll(i);ip(t.migrationData),El(t.ruleData),rp(t.priorityData),dp(i)}function ip(i){G.migrations&&(G.migrations.data.labels=i.map(t=>t.migration.toUpperCase()),G.migrations.data.datasets[0].data=i.map(t=>t.minutes),G.migrations.update())}function El(i){if(!G.topRules)return;let t=Fe?20:10;if(t!==Tl){G.topRules.destroy(),G.topRules=Ys("chart-top-rules",i,t,Fe)||void 0,Tl=t;return}let e=i.slice(0,t),n=Math.max(...e.map(o=>o.minutes),1),s=sp(n);G.topRules.data.labels=e.map(o=>Fe?o.summary:np(o.summary,50)),G.topRules.data.datasets[0].data=e.map(o=>op(o.minutes,s)),G.topRules.update()}function np(i,t){return i.length<=t?i:i.substring(0,t-3)+"..."}function sp(i){return i<60?"min":i<420?"h":"j"}function op(i,t){return t==="min"?i:t==="h"?Math.round(i/60*100)/100:Math.round(i/420*100)/100}function rp(i){G.priorities&&(G.priorities.data.labels=i.map(t=>t.priority.charAt(0).toUpperCase()+t.priority.slice(1)),G.priorities.data.datasets[0].data=i.map(t=>t.minutes),G.priorities.update())}function Ll(i){return{migrationData:ap(i),ruleData:lp(i),priorityData:cp(i)}}function ap(i){let t={};return i.targets.forEach(n=>{n.migrations.forEach(s=>{t[s.migration]=(t[s.migration]||0)+s.totalTime.minutes})}),["to18","to19","to20"].filter(n=>t[n]!==void 0).map(n=>({migration:n,minutes:t[n]}))}function lp(i){let t=new Map;return i.targets.forEach(n=>{n.migrations.forEach(s=>{s.priorities.forEach(o=>{o.rules.forEach(r=>{let a=t.get(r.ruleKey);a?(a.minutes+=r.totalTime.minutes,a.occurrences+=r.occurrences):t.set(r.ruleKey,{summary:r.ruleSummary,minutes:r.totalTime.minutes,occurrences:r.occurrences})})})})}),Array.from(t.entries()).map(([n,s])=>({ruleKey:n,summary:s.summary,minutes:s.minutes,occurrences:s.occurrences})).sort((n,s)=>s.minutes-n.minutes)}function cp(i){let t={};return i.targets.forEach(n=>{n.migrations.forEach(s=>{s.priorities.forEach(o=>{t[o.priority]=(t[o.priority]||0)+o.totalTime.minutes})})}),["obligatoire","recommande","optionnelle"].filter(n=>t[n]!==void 0).map(n=>({priority:n,minutes:t[n]}))}function Al(i){return i.targets.filter(t=>t.targetType!=="monorepo").map(t=>({targetName:t.targetName,targetType:t.targetType,minutes:t.totalTime.minutes}))}function dp(i){if(!G.targets||i.projectInfo.type!=="nx-monorepo")return;let t=Al(i).filter(e=>e.minutes>0);G.targets.data.labels=t.map(e=>`${e.targetType==="app"?"\u{1F4E6}":"\u{1F4DA}"} ${e.targetName}`),G.targets.data.datasets[0].data=t.map(e=>e.minutes),G.targets.update()}function up(i,t){let e=document.getElementById("toggle-rules-details");e&&e.addEventListener("click",()=>{Fe=!Fe,e.textContent=Fe?"Voir r\xE9sum\xE9 (10 r\xE8gles)":"Voir d\xE9tails (20 r\xE8gles)",El(t)})}var G,Fe,Tl,Dl=C(()=>{"use strict";kl();G={},Fe=!1,Tl=10});function hp(i,t){let e=new Date(i);for(;e<=t;){let n=e.getDay();if(n===0||n===6)return!0;e=Mi(e,1)}return!1}function Pl(i,t,e){let n=document.getElementById(i);if(!n)return;if(t.length===0){n.innerHTML='<p class="text-gray-500">Aucune migration \xE0 afficher</p>';return}let s=800,o=40,r=50,a=20,l=120,c=s-l-40,d=o+t.length*(r+a)+20,u=t.reduce((y,_)=>y+_.duration,0),h=t[0]?.startDate||new Date,f=t[t.length-1]?.endDate||new Date,g=fp(h,f,u,l,c,o,d),p=gp(t,u,l,c,o,r,a,e),m=Date.now(),b=`
42
28
  <svg width="${s}" height="${d}" xmlns="http://www.w3.org/2000/svg" class="gantt-chart" data-render="${m}">
43
29
  <style>
44
30
  .gantt-chart { font-family: system-ui, -apple-system, sans-serif; }
@@ -48,7 +34,7 @@
48
34
  ${g}
49
35
  ${p}
50
36
  </svg>
51
- `;n.innerHTML=b}function lp(i,t,e,n,s,o,r){let a="";a+=`
37
+ `;n.innerHTML=b}function fp(i,t,e,n,s,o,r){let a="";a+=`
52
38
  <rect
53
39
  x="${n}"
54
40
  y="${o}"
@@ -66,7 +52,7 @@
66
52
  stroke-width="1"
67
53
  stroke-dasharray="4,4"
68
54
  />
69
- `;let u=_i(i,c);a+=`
55
+ `;let u=Mi(i,c);a+=`
70
56
  <text
71
57
  x="${d}"
72
58
  y="${o-10}"
@@ -74,9 +60,9 @@
74
60
  font-size="12"
75
61
  text-anchor="middle"
76
62
  >
77
- ${co(u)}
63
+ ${go(u)}
78
64
  </text>
79
- `}return a}function cp(i,t,e,n,s,o,r,a){let l="",c=0;return i.forEach((d,u)=>{let h=s+u*(o+r)+r,f=e+c/t*n,g=d.duration/t*n;l+=dp(d,f,h,g,o,a?.[u]),l+=hp(d,f,h,g,o),l+=fp(d,h,o),c+=d.duration}),l}function dp(i,t,e,n,s,o){let r=o?gp(o):"",a=i.startDate&&i.endDate?ap(i.startDate,i.endDate):!1;return`
65
+ `}return a}function gp(i,t,e,n,s,o,r,a){let l="",c=0;return i.forEach((d,u)=>{let h=s+u*(o+r)+r,f=e+c/t*n,g=d.duration/t*n;l+=pp(d,f,h,g,o,a?.[u]),l+=bp(d,f,h,g,o),l+=yp(d,h,o),c+=d.duration}),l}function pp(i,t,e,n,s,o){let r=o?xp(o):"",a=i.startDate&&i.endDate?hp(i.startDate,i.endDate):!1;return`
80
66
  <g class="task-bar" ${r}>
81
67
  <rect
82
68
  x="${t}"
@@ -87,7 +73,7 @@
87
73
  rx="6"
88
74
  opacity="0.85"
89
75
  />
90
- ${a?up(t,e,n,i.color):""}
76
+ ${a?mp(t,e,n,i.color):""}
91
77
  <text
92
78
  x="${t+n/2}"
93
79
  y="${e+s/2+5}"
@@ -99,7 +85,7 @@
99
85
  ${i.duration.toFixed(1)}j
100
86
  </text>
101
87
  </g>
102
- `}function up(i,t,e,n){return`
88
+ `}function mp(i,t,e,n){return`
103
89
  <rect
104
90
  x="${i+e-20}"
105
91
  y="${t+5}"
@@ -119,7 +105,7 @@
119
105
  >
120
106
  \u23F8
121
107
  </text>
122
- `}function hp(i,t,e,n,s){if(!i.startDate||!i.endDate)return"";let o=kn(i.startDate),r=kn(i.endDate);return`
108
+ `}function bp(i,t,e,n,s){if(!i.startDate||!i.endDate)return"";let o=Tn(i.startDate),r=Tn(i.endDate);return`
123
109
  <text
124
110
  x="${t}"
125
111
  y="${e+s+15}"
@@ -139,7 +125,7 @@
139
125
  >
140
126
  ${r}
141
127
  </text>
142
- `}function fp(i,t,e){return`
128
+ `}function yp(i,t,e){return`
143
129
  <text
144
130
  x="10"
145
131
  y="${t+e/2+5}"
@@ -149,7 +135,7 @@
149
135
  >
150
136
  ${i.label}
151
137
  </text>
152
- `}function gp(i){return`
138
+ `}function xp(i){return`
153
139
  data-migration="${i.migration}"
154
140
  data-routine-minutes="${i.routineMinutes}"
155
141
  data-parallelizable-minutes="${i.parallelizableMinutes}"
@@ -157,7 +143,7 @@
157
143
  data-total-days-after="${i.totalDaysAfterDevs}"
158
144
  data-dev-count="${i.devCount}"
159
145
  data-hours-per-day="${i.hoursPerDay}"
160
- `.trim()}var El=E(()=>{"use strict";st()});function Ll(){let i=document.getElementById("gantt-tooltip");i||(i=document.createElement("div"),i.id="gantt-tooltip",i.className="gantt-tooltip",i.style.cssText=`
146
+ `.trim()}var Rl=C(()=>{"use strict";tt()});function Ol(){let i=document.getElementById("gantt-tooltip");i||(i=document.createElement("div"),i.id="gantt-tooltip",i.className="gantt-tooltip",i.style.cssText=`
161
147
  position: fixed;
162
148
  display: none;
163
149
  background: white;
@@ -170,7 +156,7 @@
170
156
  max-width: 350px;
171
157
  font-size: 13px;
172
158
  line-height: 1.5;
173
- `,document.body.appendChild(i)),pp()}function pp(){document.querySelectorAll(".task-bar").forEach(t=>{t.addEventListener("mouseenter",e=>mp(e,t)),t.addEventListener("mousemove",bp),t.addEventListener("mouseleave",yp)})}function mp(i,t){let e=document.getElementById("gantt-tooltip");if(!e)return;let n=t.dataset.migration||"N/A",s=parseFloat(t.dataset.routineMinutes||"0"),o=parseFloat(t.dataset.parallelizableMinutes||"0"),r=parseFloat(t.dataset.totalMinutesBefore||"0"),a=parseFloat(t.dataset.totalDaysAfter||"0"),l=parseInt(t.dataset.devCount||"1",10),c=parseFloat(t.dataset.hoursPerDay||"7"),d=$(s,c),u=$(o,c),h=$(r,c);e.innerHTML=`
159
+ `,document.body.appendChild(i)),_p()}function _p(){document.querySelectorAll(".task-bar").forEach(t=>{t.addEventListener("mouseenter",e=>vp(e,t)),t.addEventListener("mousemove",Mp),t.addEventListener("mouseleave",Sp)})}function vp(i,t){let e=document.getElementById("gantt-tooltip");if(!e)return;let n=t.dataset.migration||"N/A",s=parseFloat(t.dataset.routineMinutes||"0"),o=parseFloat(t.dataset.parallelizableMinutes||"0"),r=parseFloat(t.dataset.totalMinutesBefore||"0"),a=parseFloat(t.dataset.totalDaysAfter||"0"),l=parseInt(t.dataset.devCount||"1",10),c=parseFloat(t.dataset.hoursPerDay||"7"),d=$(s,c),u=$(o,c),h=$(r,c);e.innerHTML=`
174
160
  <div style="margin-bottom: 8px;">
175
161
  <strong style="color: #1f2937; font-size: 14px;">${n}</strong>
176
162
  </div>
@@ -192,19 +178,19 @@
192
178
  \u{1F4C5} <strong>Dur\xE9e finale :</strong> ${a.toFixed(1)}j
193
179
  ${l>1?`<span style="color: #6b7280; font-weight: normal; font-size: 12px;">(${l} dev${l>1?"s":""})</span>`:""}
194
180
  </div>
195
- `,e.style.display="block",Dl(e,i)}function bp(i){let t=document.getElementById("gantt-tooltip");if(!t||t.style.display==="none")return;Dl(t,i)}function yp(){let i=document.getElementById("gantt-tooltip");i&&(i.style.display="none")}function Dl(i,t){let s=t.clientX+15,o=t.clientY+15,r=i.getBoundingClientRect(),a=window.innerWidth,l=window.innerHeight;s+r.width>a&&(s=t.clientX-r.width-15),o+r.height>l&&(o=t.clientY-r.height-15),i.style.left=`${s}px`,i.style.top=`${o}px`}var Al=E(()=>{"use strict";st()});function Pl(i){return`
181
+ `,e.style.display="block",Il(e,i)}function Mp(i){let t=document.getElementById("gantt-tooltip");if(!t||t.style.display==="none")return;Il(t,i)}function Sp(){let i=document.getElementById("gantt-tooltip");i&&(i.style.display="none")}function Il(i,t){let s=t.clientX+15,o=t.clientY+15,r=i.getBoundingClientRect(),a=window.innerWidth,l=window.innerHeight;s+r.width>a&&(s=t.clientX-r.width-15),o+r.height>l&&(o=t.clientY-r.height-15),i.style.left=`${s}px`,i.style.top=`${o}px`}var Fl=C(()=>{"use strict";tt()});function $l(i){return`
196
182
  <section>
197
183
  <h3 class="text-lg font-bold text-gray-800 mb-2">\u{1F4CB} Description</h3>
198
184
  <p class="text-gray-700 whitespace-pre-line">${ft(i.description)}</p>
199
185
  </section>
200
- `}function Rl(i){return i.code_description?`
186
+ `}function Hl(i){return i.code_description?`
201
187
  <section>
202
188
  <h3 class="text-lg font-bold text-gray-800 mb-2">\u{1F4BB} Exemples de Code</h3>
203
189
  <div class="bg-gray-50 p-4 rounded-lg">
204
190
  <pre class="text-sm text-gray-800 overflow-x-auto whitespace-pre-wrap">${ft(i.code_description)}</pre>
205
191
  </div>
206
192
  </section>
207
- `:""}function Ol(i){if(!i.migration_command)return"";let t=i.migration_command.replace(/'/g,"\\'");return`
193
+ `:""}function zl(i){if(!i.migration_command)return"";let t=i.migration_command.replace(/'/g,"\\'");return`
208
194
  <section>
209
195
  <h3 class="text-lg font-bold text-gray-800 mb-2">\u26A1 Commande de Migration</h3>
210
196
  <div class="flex items-center space-x-2">
@@ -218,7 +204,7 @@
218
204
  </button>
219
205
  </div>
220
206
  </section>
221
- `}function Il(i){return i.doc_url?`
207
+ `}function Wl(i){return i.doc_url?`
222
208
  <section>
223
209
  <h3 class="text-lg font-bold text-gray-800 mb-2">\u{1F4DA} Documentation</h3>
224
210
  <a
@@ -233,7 +219,7 @@
233
219
  </svg>
234
220
  </a>
235
221
  </section>
236
- `:""}function Fl(i){return i.length===0?`
222
+ `:""}function Bl(i){return i.length===0?`
237
223
  <section>
238
224
  <h3 class="text-lg font-bold text-gray-800 mb-2">\u{1F4C2} Fichiers Impact\xE9s</h3>
239
225
  <p class="text-gray-500 italic">Aucune occurrence d\xE9tect\xE9e dans le projet.</p>
@@ -243,11 +229,11 @@
243
229
  <h3 class="text-lg font-bold text-gray-800 mb-2">\u{1F4C2} Fichiers Impact\xE9s (${i.length})</h3>
244
230
  <div class="bg-gray-50 rounded-lg p-4 max-h-64 overflow-y-auto">
245
231
  <ul class="space-y-2">
246
- ${i.map(t=>xp(t)).join("")}
232
+ ${i.map(t=>kp(t)).join("")}
247
233
  </ul>
248
234
  </div>
249
235
  </section>
250
- `}function xp(i){let t=i.matchedText.substring(0,100),e=i.matchedText.length>100?`${t}...`:t;return`
236
+ `}function kp(i){let t=i.matchedText.substring(0,100),e=i.matchedText.length>100?`${t}...`:t;return`
251
237
  <li class="text-sm">
252
238
  <div class="flex items-start justify-between">
253
239
  <div class="flex-1">
@@ -266,7 +252,7 @@
266
252
  </a>
267
253
  </div>
268
254
  </li>
269
- `}function $l(i){return`
255
+ `}function Nl(i){return`
270
256
  <section class="border-t border-gray-200 pt-4">
271
257
  <h3 class="text-lg font-bold text-gray-800 mb-2">\u{1F50D} M\xE9tadonn\xE9es</h3>
272
258
  <div class="grid grid-cols-2 gap-3 text-sm">
@@ -288,12 +274,12 @@
288
274
  </div>
289
275
  </div>
290
276
  </section>
291
- `}var Hl=E(()=>{"use strict";Kt()});function _p(i){return{critical:"red",high:"orange",medium:"yellow",low:"green"}[i]||"gray"}function vp(i,t){let e=`guide-card-${i.key}`,n=_p(i.risk_level);return`
277
+ `}var Vl=C(()=>{"use strict";Kt()});function Tp(i){return{critical:"red",high:"orange",medium:"yellow",low:"green"}[i]||"gray"}function wp(i,t){let e=`guide-card-${i.key}`,n=Tp(i.risk_level);return`
292
278
  <div id="${e}"
293
279
  class="bg-white border-2 border-gray-200 rounded-xl shadow-lg mb-6 overflow-hidden"
294
280
  data-rule-card
295
281
  data-rule-key="${i.key}"
296
- data-migration="${Mp(i.key)}">
282
+ data-migration="${Cp(i.key)}">
297
283
 
298
284
  <!-- Header avec checkbox et badges -->
299
285
  <div class="bg-gradient-to-r from-${n}-50 to-${n}-100 p-4 border-b border-gray-200">
@@ -310,9 +296,9 @@
310
296
  <div class="flex-1">
311
297
  <h3 class="text-xl font-bold text-gray-800 mb-2">${ft(i.summary)}</h3>
312
298
  <div class="flex items-center flex-wrap gap-2">
313
- ${ze(i.risk_level.toUpperCase(),n)}
314
- ${ze(i.category,"blue")}
315
- ${i.isAutoFixable?ze("Auto-fixable","green"):""}
299
+ ${Be(i.risk_level.toUpperCase(),n)}
300
+ ${Be(i.category,"blue")}
301
+ ${i.isAutoFixable?Be("Auto-fixable","green"):""}
316
302
  </div>
317
303
  </div>
318
304
  </div>
@@ -330,15 +316,15 @@
330
316
 
331
317
  <!-- Contenu de la card (collapsible) - REPLI\xC9 PAR D\xC9FAUT -->
332
318
  <div data-collapse-content class="hidden p-6 space-y-6">
333
- ${Pl(i)}
334
- ${Rl(i)}
335
- ${Ol(i)}
336
- ${Il(i)}
337
- ${Fl(t)}
338
319
  ${$l(i)}
320
+ ${Hl(i)}
321
+ ${zl(i)}
322
+ ${Wl(i)}
323
+ ${Bl(t)}
324
+ ${Nl(i)}
339
325
  </div>
340
326
  </div>
341
- `}function Mp(i){return i.includes("_18_")?"to18":i.includes("_19_")?"to19":i.includes("_20_")?"to20":"unknown"}function zl(i,t){let e=new Map;return t.forEach(n=>{e.has(n.ruleKey)||e.set(n.ruleKey,[]),e.get(n.ruleKey).push(n)}),i.map(n=>vp(n,e.get(n.key)||[])).join("")}var Bl=E(()=>{"use strict";Kt();Hl()});function Sp(i,t){return t[i]||"unknown"}function kp(i,t){return t[i.key]||"obligatoire"}function Tp(i,t,e,n){let s=new Map;return s.set("routine-obligatoire",[]),s.set("obligatoire",[]),s.set("recommande",[]),s.set("optionnelle",[]),i.filter(o=>Sp(o.key,n)===t).forEach(o=>{if(so(o))s.get("routine-obligatoire").push(o);else{let r=kp(o,e);r==="obligatoire"?s.get("obligatoire").push(o):r==="recommande"?s.get("recommande").push(o):r==="optionnelle"&&s.get("optionnelle").push(o)}}),s}function Wl(i,t){let{rules:e,matches:n,rulePriorityMap:s,ruleMigrationMap:o}=t,r=ro(n,c=>c.ruleKey),a=Tp(e,i,s,o);["routine-obligatoire","obligatoire","recommande","optionnelle"].forEach(c=>{let d=document.getElementById(`cards-${c}`),u=document.getElementById(`count-${c}`),h=a.get(c)||[];d&&(h.length===0?d.innerHTML='<p class="text-gray-500 italic">Aucune r\xE8gle dans cette cat\xE9gorie pour cette migration.</p>':d.innerHTML=zl(h,n)),u&&(u.textContent=h.length.toString())}),wp()}function wp(){let i=R(mi,{});Object.keys(i).forEach(t=>{let e=document.querySelector(`[data-rule-checkbox="${t}"]`);e&&(e.checked=i[t])}),bn()}function Cp(i,t){let e=R(mi,{});e[i]=t,A(mi,e),bn()}function bn(){let i=R(mi,{}),e=document.querySelectorAll("[data-rule-checkbox]").length,n=Object.values(i).filter(Boolean).length,s=document.getElementById("progress-bar"),o=document.getElementById("progress-text");if(s&&o){let r=e>0?n/e*100:0;s.style.width=`${r}%`,o.textContent=`${n} / ${e} r\xE8gles compl\xE9t\xE9es`}}function Ep(){confirm("\xCAtes-vous s\xFBr de vouloir r\xE9initialiser toutes les r\xE8gles compl\xE9t\xE9es ?")&&(A(mi,{}),document.querySelectorAll("[data-rule-checkbox]").forEach(i=>{i.checked=!1}),bn())}function Nl(){let i=window.__MIGRATION_GUIDE_DATA__;if(!i){console.error("Migration Guide data not found");return}let t=document.getElementById("migration-selector"),e=t?.value||"to18";Wl(e,i),t?.addEventListener("change",s=>{let o=s.target;Wl(o.value,i)}),document.addEventListener("change",s=>{let o=s.target;if(o.matches("[data-rule-checkbox]")){let r=o.getAttribute("data-rule-checkbox");r&&Cp(r,o.checked)}}),document.getElementById("reset-checklist-btn")?.addEventListener("click",Ep),bn()}var mi,Vl=E(()=>{"use strict";st();Kt();Bl();mi="migration-guide-checklist"});function Vs(i){let t=R(yn,rt),e=Lp(t);i.setState({selectedMigrations:e}),js(e),Dp(i),xn(e)}function Lp(i){if(!Array.isArray(i)||i.length===0)return rt;let t=i.filter(e=>rt.includes(e));return t.length>0?t:rt}function js(i){rt.forEach(t=>{let e=document.querySelector(`[data-migration-select="${t}"]`);e&&(e.checked=i.includes(t))}),ql(i)}function Dp(i){rt.forEach(e=>{let n=document.querySelector(`[data-migration-select="${e}"]`);n&&n.addEventListener("change",()=>{Ap(i)})});let t=document.querySelector("[data-migration-select-all]");t&&t.addEventListener("click",()=>{Pp(i)})}function Ap(i){let t=jl();if(t.length===0){js(rt),A(yn,rt),i.setState({selectedMigrations:rt}),xn(rt);return}A(yn,t),i.setState({selectedMigrations:t}),ql(t),xn(t)}function Pp(i){let n=jl().length===rt.length?[rt[0]]:rt;js(n),A(yn,n),i.setState({selectedMigrations:n}),xn(n)}function jl(){let i=[];return rt.forEach(t=>{document.querySelector(`[data-migration-select="${t}"]`)?.checked&&i.push(t)}),i}function ql(i){let t=document.querySelector("[data-migration-select-all]");if(!t)return;i.length===rt.length?(t.classList.remove("bg-gray-100","text-gray-600"),t.classList.add("bg-blue-100","text-blue-700","font-semibold")):(t.classList.remove("bg-blue-100","text-blue-700","font-semibold"),t.classList.add("bg-gray-100","text-gray-600"))}function xn(i){let t=document.querySelector("[data-migration-count]");if(!t)return;let e=i.length,n=rt.length;e===n?t.textContent="Toutes":t.textContent=`${e}/${n}`,e===n?t.className="ml-2 px-2 py-1 bg-green-100 text-green-700 text-xs font-semibold rounded-full":t.className="ml-2 px-2 py-1 bg-blue-100 text-blue-700 text-xs font-semibold rounded-full"}var yn,rt,Yl=E(()=>{"use strict";st();yn="selected-migrations",rt=["to18","to19","to20"]});function qs(i){let t=R(_n,at),e=Rp(t);i.setState({selectedPriorities:e}),Ys(e),Op(i),vn(e)}function Rp(i){if(!Array.isArray(i)||i.length===0)return at;let t=i.filter(e=>at.includes(e));return t.length>0?t:at}function Ys(i){at.forEach(t=>{let e=document.querySelector(`[data-priority-select="${t}"]`);e&&(e.checked=i.includes(t))}),Kl(i)}function Op(i){at.forEach(e=>{let n=document.querySelector(`[data-priority-select="${e}"]`);n&&n.addEventListener("change",()=>{Ip(i)})});let t=document.querySelector("[data-priority-select-all]");t&&t.addEventListener("click",()=>{Fp(i)})}function Ip(i){let t=Ul();if(t.length===0){Ys(at),A(_n,at),i.setState({selectedPriorities:at}),vn(at);return}A(_n,t),i.setState({selectedPriorities:t}),Kl(t),vn(t)}function Fp(i){let n=Ul().length===at.length?[at[0]]:at;Ys(n),A(_n,n),i.setState({selectedPriorities:n}),vn(n)}function Ul(){let i=[];return at.forEach(t=>{document.querySelector(`[data-priority-select="${t}"]`)?.checked&&i.push(t)}),i}function Kl(i){let t=document.querySelector("[data-priority-select-all]");if(!t)return;i.length===at.length?(t.classList.remove("bg-gray-100","text-gray-600"),t.classList.add("bg-purple-100","text-purple-700","font-semibold")):(t.classList.remove("bg-purple-100","text-purple-700","font-semibold"),t.classList.add("bg-gray-100","text-gray-600"))}function vn(i){let t=document.querySelector("[data-priority-count]");if(!t)return;let e=i.length,n=at.length;e===n?t.textContent="Toutes":t.textContent=`${e}/${n}`,e===n?t.className="ml-2 px-2 py-1 bg-green-100 text-green-700 text-xs font-semibold rounded-full":t.className="ml-2 px-2 py-1 bg-purple-100 text-purple-700 text-xs font-semibold rounded-full"}var _n,at,Gl=E(()=>{"use strict";st();_n="selected-priorities",at=["obligatoire","recommande","optionnelle"]});function Jl(i){Xl(i.getState()),i.subscribe(t=>{Xl(t)})}function Xl(i){let t=document.querySelector("[data-total-filters-count]");if(!t)return;let e=(i.selectedMigrations||[]).length,n=(i.selectedPriorities||[]).length,s=e+n,o=6;t.textContent=`${s}/${o} actifs`,s===o?t.className="ml-3 px-3 py-1.5 bg-green-100 text-green-700 text-sm font-semibold rounded-full":t.className="ml-3 px-3 py-1.5 bg-orange-100 text-orange-700 text-sm font-semibold rounded-full"}var Zl=E(()=>{"use strict"});function nc(i,t,e,n,s,o){z={organizationMode:R(tc,"priority"),activeTab:R(ec,""),selectedMigrations:s,selectedPriorities:o,rules:i,matches:t,rulePriorityMap:e,ruleMigrationMap:n,sortState:R(ic,{column:"occurrences",direction:"desc"})},$p(),bi()}function sc(i,t){z.selectedMigrations=i,z.selectedPriorities=t,bi()}function $p(){document.querySelectorAll("[data-org-mode]").forEach(t=>{t.addEventListener("change",()=>{t.checked&&(z.organizationMode=t.value,A(tc,z.organizationMode),Ql(),bi())})}),Ql()}function Ql(){document.querySelectorAll("[data-org-mode]").forEach(t=>{let e=t.closest("label");e&&(t.value===z.organizationMode?(t.checked=!0,e.classList.remove("bg-gray-50","border-gray-300"),e.classList.add("bg-purple-50","border-purple-500"),e.querySelector("span")?.classList.remove("text-gray-700","font-medium"),e.querySelector("span")?.classList.add("text-purple-700","font-semibold")):(e.classList.remove("bg-purple-50","border-purple-500"),e.classList.add("bg-gray-50","border-gray-300"),e.querySelector("span")?.classList.remove("text-purple-700","font-semibold"),e.querySelector("span")?.classList.add("text-gray-700","font-medium")))})}function bi(){Hp(),Np()}function Hp(){let i=document.getElementById("table-tabs");if(!i)return;let t=z.organizationMode==="priority"?[{key:"obligatoire",label:"Obligatoire",color:"red"},{key:"recommande",label:"Recommand\xE9",color:"yellow"},{key:"optionnelle",label:"Optionnel",color:"green"}]:[{key:"to18",label:"Angular 17 \u2192 18",color:"blue"},{key:"to19",label:"Angular 18 \u2192 19",color:"indigo"},{key:"to20",label:"Angular 19 \u2192 20",color:"purple"}];(!z.activeTab||!t.some(e=>e.key===z.activeTab))&&(z.activeTab=t[0].key),i.innerHTML=t.map(e=>{let n=e.key===z.activeTab,s=Bp(e.key);return`
327
+ `}function Cp(i){return i.includes("_18_")?"to18":i.includes("_19_")?"to19":i.includes("_20_")?"to20":"unknown"}function jl(i,t){let e=new Map;return t.forEach(n=>{e.has(n.ruleKey)||e.set(n.ruleKey,[]),e.get(n.ruleKey).push(n)}),i.map(n=>wp(n,e.get(n.key)||[])).join("")}var ql=C(()=>{"use strict";Kt();Vl()});function Ep(i,t){return t[i]||"unknown"}function Lp(i,t){return t[i.key]||"obligatoire"}function Ap(i,t,e,n){let s=new Map;return s.set("routine-obligatoire",[]),s.set("obligatoire",[]),s.set("recommande",[]),s.set("optionnelle",[]),i.filter(o=>Ep(o.key,n)===t).forEach(o=>{if(lo(o))s.get("routine-obligatoire").push(o);else{let r=Lp(o,e);r==="obligatoire"?s.get("obligatoire").push(o):r==="recommande"?s.get("recommande").push(o):r==="optionnelle"&&s.get("optionnelle").push(o)}}),s}function Yl(i,t){let{rules:e,matches:n,rulePriorityMap:s,ruleMigrationMap:o}=t,r=uo(n,c=>c.ruleKey),a=Ap(e,i,s,o);["routine-obligatoire","obligatoire","recommande","optionnelle"].forEach(c=>{let d=document.getElementById(`cards-${c}`),u=document.getElementById(`count-${c}`),h=a.get(c)||[];d&&(h.length===0?d.innerHTML='<p class="text-gray-500 italic">Aucune r\xE8gle dans cette cat\xE9gorie pour cette migration.</p>':d.innerHTML=jl(h,n)),u&&(u.textContent=h.length.toString())}),Dp()}function Dp(){let i=P(yi,{});Object.keys(i).forEach(t=>{let e=document.querySelector(`[data-rule-checkbox="${t}"]`);e&&(e.checked=i[t])}),yn()}function Pp(i,t){let e=P(yi,{});e[i]=t,D(yi,e),yn()}function yn(){let i=P(yi,{}),e=document.querySelectorAll("[data-rule-checkbox]").length,n=Object.values(i).filter(Boolean).length,s=document.getElementById("progress-bar"),o=document.getElementById("progress-text");if(s&&o){let r=e>0?n/e*100:0;s.style.width=`${r}%`,o.textContent=`${n} / ${e} r\xE8gles compl\xE9t\xE9es`}}function Rp(){confirm("\xCAtes-vous s\xFBr de vouloir r\xE9initialiser toutes les r\xE8gles compl\xE9t\xE9es ?")&&(D(yi,{}),document.querySelectorAll("[data-rule-checkbox]").forEach(i=>{i.checked=!1}),yn())}function Ul(){let i=window.__MIGRATION_GUIDE_DATA__;if(!i){console.error("Migration Guide data not found");return}let t=document.getElementById("migration-selector"),e=t?.value||"to18";Yl(e,i),t?.addEventListener("change",s=>{let o=s.target;Yl(o.value,i)}),document.addEventListener("change",s=>{let o=s.target;if(o.matches("[data-rule-checkbox]")){let r=o.getAttribute("data-rule-checkbox");r&&Pp(r,o.checked)}}),document.getElementById("reset-checklist-btn")?.addEventListener("click",Rp),yn()}var yi,Kl=C(()=>{"use strict";tt();Kt();ql();yi="migration-guide-checklist"});function Us(i){let t=P(xn,rt),e=Op(t);i.setState({selectedMigrations:e}),Ks(e),Ip(i),_n(e)}function Op(i){if(!Array.isArray(i)||i.length===0)return rt;let t=i.filter(e=>rt.includes(e));return t.length>0?t:rt}function Ks(i){rt.forEach(t=>{let e=document.querySelector(`[data-migration-select="${t}"]`);e&&(e.checked=i.includes(t))}),Xl(i)}function Ip(i){rt.forEach(e=>{let n=document.querySelector(`[data-migration-select="${e}"]`);n&&n.addEventListener("change",()=>{Fp(i)})});let t=document.querySelector("[data-migration-select-all]");t&&t.addEventListener("click",()=>{$p(i)})}function Fp(i){let t=Gl();if(t.length===0){Ks(rt),D(xn,rt),i.setState({selectedMigrations:rt}),_n(rt);return}D(xn,t),i.setState({selectedMigrations:t}),Xl(t),_n(t)}function $p(i){let n=Gl().length===rt.length?[rt[0]]:rt;Ks(n),D(xn,n),i.setState({selectedMigrations:n}),_n(n)}function Gl(){let i=[];return rt.forEach(t=>{document.querySelector(`[data-migration-select="${t}"]`)?.checked&&i.push(t)}),i}function Xl(i){let t=document.querySelector("[data-migration-select-all]");if(!t)return;i.length===rt.length?(t.classList.remove("bg-gray-100","text-gray-600"),t.classList.add("bg-blue-100","text-blue-700","font-semibold")):(t.classList.remove("bg-blue-100","text-blue-700","font-semibold"),t.classList.add("bg-gray-100","text-gray-600"))}function _n(i){let t=document.querySelector("[data-migration-count]");if(!t)return;let e=i.length,n=rt.length;e===n?t.textContent="Toutes":t.textContent=`${e}/${n}`,e===n?t.className="ml-2 px-2 py-1 bg-green-100 text-green-700 text-xs font-semibold rounded-full":t.className="ml-2 px-2 py-1 bg-blue-100 text-blue-700 text-xs font-semibold rounded-full"}var xn,rt,Jl=C(()=>{"use strict";tt();xn="selected-migrations",rt=["to18","to19","to20"]});function Gs(i){let t=P(vn,at),e=Hp(t);i.setState({selectedPriorities:e}),Xs(e),zp(i),Mn(e)}function Hp(i){if(!Array.isArray(i)||i.length===0)return at;let t=i.filter(e=>at.includes(e));return t.length>0?t:at}function Xs(i){at.forEach(t=>{let e=document.querySelector(`[data-priority-select="${t}"]`);e&&(e.checked=i.includes(t))}),Ql(i)}function zp(i){at.forEach(e=>{let n=document.querySelector(`[data-priority-select="${e}"]`);n&&n.addEventListener("change",()=>{Wp(i)})});let t=document.querySelector("[data-priority-select-all]");t&&t.addEventListener("click",()=>{Bp(i)})}function Wp(i){let t=Zl();if(t.length===0){Xs(at),D(vn,at),i.setState({selectedPriorities:at}),Mn(at);return}D(vn,t),i.setState({selectedPriorities:t}),Ql(t),Mn(t)}function Bp(i){let n=Zl().length===at.length?[at[0]]:at;Xs(n),D(vn,n),i.setState({selectedPriorities:n}),Mn(n)}function Zl(){let i=[];return at.forEach(t=>{document.querySelector(`[data-priority-select="${t}"]`)?.checked&&i.push(t)}),i}function Ql(i){let t=document.querySelector("[data-priority-select-all]");if(!t)return;i.length===at.length?(t.classList.remove("bg-gray-100","text-gray-600"),t.classList.add("bg-purple-100","text-purple-700","font-semibold")):(t.classList.remove("bg-purple-100","text-purple-700","font-semibold"),t.classList.add("bg-gray-100","text-gray-600"))}function Mn(i){let t=document.querySelector("[data-priority-count]");if(!t)return;let e=i.length,n=at.length;e===n?t.textContent="Toutes":t.textContent=`${e}/${n}`,e===n?t.className="ml-2 px-2 py-1 bg-green-100 text-green-700 text-xs font-semibold rounded-full":t.className="ml-2 px-2 py-1 bg-purple-100 text-purple-700 text-xs font-semibold rounded-full"}var vn,at,tc=C(()=>{"use strict";tt();vn="selected-priorities",at=["obligatoire","recommande","optionnelle"]});function ic(i){ec(i.getState()),i.subscribe(t=>{ec(t)})}function ec(i){let t=document.querySelector("[data-total-filters-count]");if(!t)return;let e=(i.selectedMigrations||[]).length,n=(i.selectedPriorities||[]).length,s=e+n,o=6;t.textContent=`${s}/${o} actifs`,s===o?t.className="ml-3 px-3 py-1.5 bg-green-100 text-green-700 text-sm font-semibold rounded-full":t.className="ml-3 px-3 py-1.5 bg-orange-100 text-orange-700 text-sm font-semibold rounded-full"}var nc=C(()=>{"use strict"});function lc(i,t,e,n,s,o){z={organizationMode:P(oc,"priority"),activeTab:P(rc,""),selectedMigrations:s,selectedPriorities:o,rules:i,matches:t,rulePriorityMap:e,ruleMigrationMap:n,sortState:P(ac,{column:"occurrences",direction:"desc"})},Np(),xi()}function cc(i,t){z.selectedMigrations=i,z.selectedPriorities=t,xi()}function Np(){document.querySelectorAll("[data-org-mode]").forEach(t=>{t.addEventListener("change",()=>{t.checked&&(z.organizationMode=t.value,D(oc,z.organizationMode),sc(),xi())})}),sc()}function sc(){document.querySelectorAll("[data-org-mode]").forEach(t=>{let e=t.closest("label");e&&(t.value===z.organizationMode?(t.checked=!0,e.classList.remove("bg-gray-50","border-gray-300"),e.classList.add("bg-purple-50","border-purple-500"),e.querySelector("span")?.classList.remove("text-gray-700","font-medium"),e.querySelector("span")?.classList.add("text-purple-700","font-semibold")):(e.classList.remove("bg-purple-50","border-purple-500"),e.classList.add("bg-gray-50","border-gray-300"),e.querySelector("span")?.classList.remove("text-purple-700","font-semibold"),e.querySelector("span")?.classList.add("text-gray-700","font-medium")))})}function xi(){Vp(),Up()}function Vp(){let i=document.getElementById("table-tabs");if(!i)return;let t=z.organizationMode==="priority"?[{key:"obligatoire",label:"Obligatoire",color:"red"},{key:"recommande",label:"Recommand\xE9",color:"yellow"},{key:"optionnelle",label:"Optionnel",color:"green"}]:[{key:"to18",label:"Angular 17 \u2192 18",color:"blue"},{key:"to19",label:"Angular 18 \u2192 19",color:"indigo"},{key:"to20",label:"Angular 19 \u2192 20",color:"purple"}];(!z.activeTab||!t.some(e=>e.key===z.activeTab))&&(z.activeTab=t[0].key),i.innerHTML=t.map(e=>{let n=e.key===z.activeTab,s=qp(e.key);return`
342
328
  <button
343
329
  data-tab="${e.key}"
344
330
  class="flex-1 px-6 py-4 text-center font-semibold transition-all ${n?`bg-white text-${e.color}-700 border-b-2 border-${e.color}-500`:"bg-gray-50 text-gray-600 hover:bg-gray-100"}"
@@ -348,7 +334,7 @@
348
334
  ${s}
349
335
  </span>
350
336
  </button>
351
- `}).join(""),zp()}function zp(){document.querySelectorAll("[data-tab]").forEach(t=>{t.addEventListener("click",()=>{let e=t.dataset.tab;e&&(z.activeTab=e,A(ec,z.activeTab),bi())})})}function Bp(i){return oc(i).length}function oc(i){let t=z.rules.filter(e=>{let n=z.ruleMigrationMap[e.key],s=z.rulePriorityMap[e.key];if(z.organizationMode==="priority"){if(s!==i)return!1}else if(n!==i)return!1;return!(!z.selectedMigrations.includes(n)||!z.selectedPriorities.includes(s))});return Wp(t)}function Wp(i){let{column:t,direction:e}=z.sortState,n=e==="asc"?1:-1;return[...i].sort((s,o)=>{let r=0;switch(t){case"risk_level":{let a={critical:4,high:3,medium:2,low:1};r=(a[s.risk_level]||0)-(a[o.risk_level]||0);break}case"key":r=s.key.localeCompare(o.key);break;case"summary":r=s.summary.localeCompare(o.summary);break;case"occurrences":{let a=Us(s.key),l=Us(o.key);r=a-l;break}case"time":r=s.estimated_time_per_occurrence-o.estimated_time_per_occurrence;break;case"schematics":{let a=s.migration_command?1:0,l=o.migration_command?1:0;r=a-l;break}}return r*n})}function Np(){let i=document.getElementById("table-content");if(!i)return;let t=oc(z.activeTab);if(t.length===0){i.innerHTML=`
337
+ `}).join(""),jp()}function jp(){document.querySelectorAll("[data-tab]").forEach(t=>{t.addEventListener("click",()=>{let e=t.dataset.tab;e&&(z.activeTab=e,D(rc,z.activeTab),xi())})})}function qp(i){return dc(i).length}function dc(i){let t=z.rules.filter(e=>{let n=z.ruleMigrationMap[e.key],s=z.rulePriorityMap[e.key];if(z.organizationMode==="priority"){if(s!==i)return!1}else if(n!==i)return!1;return!(!z.selectedMigrations.includes(n)||!z.selectedPriorities.includes(s))});return Yp(t)}function Yp(i){let{column:t,direction:e}=z.sortState,n=e==="asc"?1:-1;return[...i].sort((s,o)=>{let r=0;switch(t){case"risk_level":{let a={critical:4,high:3,medium:2,low:1};r=(a[s.risk_level]||0)-(a[o.risk_level]||0);break}case"key":r=s.key.localeCompare(o.key);break;case"summary":r=s.summary.localeCompare(o.summary);break;case"occurrences":{let a=Js(s.key),l=Js(o.key);r=a-l;break}case"time":r=s.estimated_time_per_occurrence-o.estimated_time_per_occurrence;break;case"schematics":{let a=s.migration_command?1:0,l=o.migration_command?1:0;r=a-l;break}}return r*n})}function Up(){let i=document.getElementById("table-content");if(!i)return;let t=dc(z.activeTab);if(t.length===0){i.innerHTML=`
352
338
  <div class="text-center py-12 text-gray-500">
353
339
  <svg class="w-16 h-16 mx-auto mb-4 text-gray-400" fill="none" stroke="currentColor" viewBox="0 0 24 24">
354
340
  <path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M20 13V6a2 2 0 00-2-2H6a2 2 0 00-2 2v7m16 0v5a2 2 0 01-2 2H6a2 2 0 01-2-2v-5m16 0h-2.586a1 1 0 00-.707.293l-2.414 2.414a1 1 0 01-.707.293h-3.172a1 1 0 01-.707-.293l-2.414-2.414A1 1 0 006.586 13H4"/>
@@ -369,20 +355,20 @@
369
355
  </colgroup>
370
356
  <thead>
371
357
  <tr class="border-b-2 border-gray-200">
372
- ${Ie("risk_level","Risk Level","text-left")}
373
- ${Ie("key","Cl\xE9","text-left")}
374
- ${Ie("summary","Description","text-left")}
375
- ${Ie("occurrences","Fichiers impact\xE9s","text-center")}
376
- ${Ie("time","Temps estim\xE9","text-center")}
377
- ${Ie("schematics","Schematics","text-center")}
358
+ ${$e("risk_level","Risk Level","text-left")}
359
+ ${$e("key","Cl\xE9","text-left")}
360
+ ${$e("summary","Description","text-left")}
361
+ ${$e("occurrences","Fichiers impact\xE9s","text-center")}
362
+ ${$e("time","Temps estim\xE9","text-center")}
363
+ ${$e("schematics","Schematics","text-center")}
378
364
  </tr>
379
365
  </thead>
380
366
  <tbody class="divide-y divide-gray-200">
381
- ${t.map(e=>qp(e)).join("")}
367
+ ${t.map(e=>Xp(e)).join("")}
382
368
  </tbody>
383
369
  </table>
384
370
  </div>
385
- `,Vp()}function Ie(i,t,e){let n=z.sortState.column===i,s=z.sortState.direction;return`
371
+ `,Kp()}function $e(i,t,e){let n=z.sortState.column===i,s=z.sortState.direction;return`
386
372
  <th
387
373
  class="px-4 py-3 ${e} text-xs font-semibold text-gray-600 uppercase tracking-wider cursor-pointer hover:bg-gray-100 transition-colors select-none"
388
374
  data-sort-column="${i}"
@@ -393,7 +379,7 @@
393
379
  <span class="${n?"text-blue-600":"text-gray-400"}">${n?s==="asc"?"\u25B2":"\u25BC":"\u21C5"}</span>
394
380
  </div>
395
381
  </th>
396
- `}function Vp(){document.querySelectorAll("[data-sort-column]").forEach(t=>{t.addEventListener("click",()=>{let e=t.dataset.sortColumn;e&&jp(e)})})}function jp(i){z.sortState.column===i?z.sortState.direction=z.sortState.direction==="asc"?"desc":"asc":(z.sortState.column=i,z.sortState.direction="desc"),A(ic,z.sortState),bi()}function qp(i){let t=Us(i.key),e=t>0,n={critical:{bg:"bg-red-100",text:"text-red-700"},high:{bg:"bg-orange-100",text:"text-orange-700"},medium:{bg:"bg-yellow-100",text:"text-yellow-700"},low:{bg:"bg-green-100",text:"text-green-700"}},s=n[i.risk_level]||n.low;return`
382
+ `}function Kp(){document.querySelectorAll("[data-sort-column]").forEach(t=>{t.addEventListener("click",()=>{let e=t.dataset.sortColumn;e&&Gp(e)})})}function Gp(i){z.sortState.column===i?z.sortState.direction=z.sortState.direction==="asc"?"desc":"asc":(z.sortState.column=i,z.sortState.direction="desc"),D(ac,z.sortState),xi()}function Xp(i){let t=Js(i.key),e=t>0,n={critical:{bg:"bg-red-100",text:"text-red-700"},high:{bg:"bg-orange-100",text:"text-orange-700"},medium:{bg:"bg-yellow-100",text:"text-yellow-700"},low:{bg:"bg-green-100",text:"text-green-700"}},s=n[i.risk_level]||n.low;return`
397
383
  <tr class="${e?"bg-white":"bg-gray-50"} hover:bg-blue-50 transition-colors">
398
384
  <td class="px-4 py-4 whitespace-nowrap">
399
385
  <span class="px-3 py-1 ${s.bg} ${s.text} text-xs font-semibold rounded-full">
@@ -418,7 +404,7 @@
418
404
  ${i.migration_command?'<span class="px-3 py-1 bg-green-100 text-green-700 text-xs font-semibold rounded-full">\u2713 Oui</span>':'<span class="px-3 py-1 bg-gray-200 text-gray-500 text-xs rounded-full">Manuel</span>'}
419
405
  </td>
420
406
  </tr>
421
- `}function Us(i){return z.matches.filter(t=>t.ruleKey===i).length}var tc,ec,ic,z,rc=E(()=>{"use strict";st();tc="rules-table-organization",ec="rules-table-active-tab",ic="rules-table-sort"});function ac(i,t){if(["obligatoire","recommande","optionnelle"].every(l=>t.includes(l))||t.length===0)return i;let s=Yp(i.targets,t),o=Kp(s),r=s.reduce((l,c)=>l+c.totalTime.minutes,0),a=$(r,7);return{...i,targets:s,stats:o,totalTime:a}}function Yp(i,t){return i.map(e=>{let n=Up(e.migrations,t),s=n.reduce((o,r)=>o+r.totalTime.minutes,0);return{...e,migrations:n,totalTime:$(s,7)}}).filter(e=>e.migrations.length>0)}function Up(i,t){return i.map(e=>{let n=e.priorities.filter(o=>t.includes(o.priority)),s=n.reduce((o,r)=>o+r.totalTime.minutes,0);return{...e,priorities:n,totalTime:$(s,7)}}).filter(e=>e.priorities.length>0)}function Kp(i){let t=new Set,e=0,n=0;for(let s of i)for(let o of s.migrations)for(let r of o.priorities)for(let a of r.rules)t.add(a.ruleKey),e+=a.occurrences,a.specialWorkloadFiles!==void 0&&(n+=a.specialWorkloadFiles);return{uniqueRules:t.size,totalOccurrences:e,totalSpecialWorkloadFiles:n}}var lc=E(()=>{"use strict";he()});function dc(i){let t=document.querySelector("[data-layer-selector]");if(!t)return;let e=R(Ks,[]);i.setState({hiddenLayers:e});let n=t.querySelectorAll('input[type="checkbox"]');n.forEach(s=>{let o=s.value;s.checked=!e.includes(o)}),uc(t),Gs(e),Gp(t),n.forEach(s=>{s.addEventListener("change",()=>{let o=Xp(t);Jp(o,i,t)})})}function Gp(i){let t=i.querySelector("[data-layer-dropdown-trigger]"),e=i.querySelector("[data-layer-dropdown-content]");!t||!e||(t.addEventListener("click",n=>{n.stopPropagation(),e.classList.toggle("hidden")}),document.addEventListener("click",n=>{i.contains(n.target)||e.classList.add("hidden")}))}function uc(i){let t=i.querySelector("[data-layer-badge]");if(!t)return;let e=i.querySelectorAll('input[type="checkbox"]'),n=e.length,s=Array.from(e).filter(o=>o.checked).length;t.textContent=`${s}/${n}`}function Xp(i){let t=i.querySelectorAll('input[type="checkbox"]'),e=[];return t.forEach(n=>{n.checked||e.push(n.value)}),e}function Jp(i,t,e){t.setState({hiddenLayers:i}),A(Ks,i),uc(e),Gs(i)}function Gs(i){let t=Zp(i);if(document.querySelectorAll("[data-view-mode]").forEach(s=>{s.style.display="none"}),document.querySelectorAll(`[data-view-mode="${t}"]`).forEach(s=>{s.style.display=""}),!t.startsWith("merged-")){let s=i.includes("apps-libs");document.querySelectorAll('[data-layer="apps-libs"]').forEach(a=>{cc(a,s)}),document.querySelectorAll('[data-layer="sub-target"]').forEach(a=>{cc(a,s)})}}function Zp(i){let t=i.includes("apps-libs"),e=i.includes("migration"),n=i.includes("priority"),o=document.querySelector("[data-hierarchy-view-select]")?.value==="by-priority",r=t?"merged-":"";return e&&n?`${r}flat-rules`:e?`${r}flat-priority`:n?`${r}flat-migration`:o?`${r}by-priority`:`${r}by-migration`}function cc(i,t){if(t){let e=i.querySelector("[data-collapse-trigger]");e&&(e.style.display="none");let n=i.querySelector("[data-collapse-content]");n&&(n.classList.remove("hidden"),n.style.marginTop="0"),i.classList.remove("ml-8","ml-6"),i.classList.add("ml-0"),i.style.borderLeft="none",i.style.paddingLeft="0"}else{let e=i.querySelector("[data-collapse-trigger]");e&&(e.style.display="");let n=i.querySelector("[data-collapse-content]");n&&(n.style.marginTop=""),i.classList.remove("ml-0"),i.getAttribute("data-layer")==="apps-libs"?i.classList.add("ml-6"):i.classList.add("ml-8"),i.style.borderLeft="",i.style.paddingLeft=""}}function Qp(){return R(Ks,[])}function hc(){let i=Qp();Gs(i)}var Ks,Xs=E(()=>{"use strict";He();Ks="hidden-layers"});function gc(i){let t=document.querySelector("[data-hierarchy-view-select]");if(!t)return;let e=R(fc,"by-migration");i.setState({hierarchyViewMode:e}),t.value=e,pc(e),t.addEventListener("change",()=>{let n=t.value;(n==="by-migration"||n==="by-priority")&&tm(n,i)})}function tm(i,t){t.setState({hierarchyViewMode:i}),A(fc,i),pc(i)}function pc(i){hc()}var fc,mc=E(()=>{"use strict";He();Xs();fc="hierarchy-view-mode"});var am=vc(()=>{to();Si();Ao();Oo();Uo();Xo();tr();ir();wl();El();Al();st();Vl();Yl();Gl();Zl();rc();wn();lc();mc();Xs();document.addEventListener("DOMContentLoaded",()=>{let i=window;if(i.__MIGRATION_GUIDE_DATA__){Cn(),Nl();return}let e=i.__RULES_OVERVIEW_DATA__;if(e){let a=new ue({devCount:1,hoursPerDay:7,customTimes:{},customSpecialTimes:{},startDate:new Date().toISOString().split("T")[0],selectedMigrations:["to18","to19","to20"],selectedPriorities:["obligatoire","recommande","optionnelle"],hierarchyViewMode:"by-migration",hiddenLayers:[]});Vs(a),qs(a),nc(e.rules,e.matches,e.rulePriorityMap,e.ruleMigrationMap,a.getState().selectedMigrations,a.getState().selectedPriorities),a.subscribe(l=>{sc(l.selectedMigrations,l.selectedPriorities)});return}let n=i.__REPORT_DATA__;if(!n){console.warn("No report data found");return}let s=new Date().toISOString().split("T")[0],o=ue.loadCustomTimesFromStorage(),r=new ue({devCount:1,hoursPerDay:7,customTimes:o.customTimes,customSpecialTimes:o.customSpecialTimes,startDate:s,selectedMigrations:["to18","to19","to20"],selectedPriorities:["obligatoire","recommande","optionnelle"],hierarchyViewMode:"by-migration",hiddenLayers:[]});yi=r,Cn(),Do(),Po(),Ro(),rm(n.rules),er(),Yo(),Go(r),Zo(),Vs(r),qs(r),Jl(r),gc(r),dc(r),Ml(n.workloadReport),em(n,r),r.subscribe(a=>{bc(a,n)}),bc(r.getState(),n),om(r)});function em(i,t){document.getElementById("gantt-timeline")&&yc(i,t.getState())}function yc(i,t){let e=i.workloadReport;if(!e)return;let n=new Date(t.startDate),{tasks:s,details:o}=vo(e,t.devCount,t.hoursPerDay,n);Cl("gantt-timeline",s,o),setTimeout(()=>Ll(),100)}function bc(i,t){let e=To(t.workloadReport,i.selectedMigrations||["to18","to19","to20"]),n=ac(e,i.selectedPriorities||["obligatoire","recommande","optionnelle"]),s=go(n,i.customTimes,i.hoursPerDay,t.rules||[],i.customSpecialTimes),o=po(s,i.devCount,i.hoursPerDay),r=document.querySelector("[data-global-time]");r&&(r.textContent=U(o.original));let a=document.querySelector("[data-adjusted-time]");a&&(a.textContent=U(o.adjusted));let l=document.querySelector("[data-dev-info]");l&&(l.textContent=`(${i.devCount} d\xE9veloppeur${i.devCount>1?"s":""})`),sm(s.stats),im(i.selectedMigrations||["to18","to19","to20"]),nm(i.selectedPriorities||["obligatoire","recommande","optionnelle"]),xo(s),Sl(s),yc({workloadReport:s},i)}function im(i){document.querySelectorAll("[data-migration]").forEach(e=>{let n=e,s=n.dataset.migration;s&&!i.includes(s)?n.style.display="none":n.style.display=""})}function nm(i){document.querySelectorAll("[data-priority]").forEach(e=>{let n=e,s=n.dataset.priority;s&&!i.includes(s)?n.style.display="none":n.style.display=""})}function sm(i){let t=document.querySelectorAll(".bg-gradient-to-br");if(t.length>=4){let e=t[1].querySelector(".text-indigo-600");e&&(e.textContent=String(i.uniqueRules));let n=t[2].querySelector(".text-purple-600");n&&(n.textContent=String(i.totalOccurrences));let s=t[3].querySelector(".text-pink-600");s&&(s.textContent=String(i.totalSpecialWorkloadFiles))}}function om(i){let t=document.querySelector("[data-start-date]"),e=document.querySelector("[data-dev-count]"),n=document.querySelector("[data-hours-per-day]");t&&t.addEventListener("change",()=>{let s=t.value;s&&i.setState({startDate:s})}),e&&e.addEventListener("input",()=>{let s=parseInt(e.value,10);!isNaN(s)&&s>=1&&s<=20&&i.setState({devCount:s})}),n&&n.addEventListener("input",()=>{let s=parseFloat(n.value);!isNaN(s)&&s>=1&&s<=10&&i.setState({hoursPerDay:s})})}function rm(i){if(!i||i.length===0)return;let t=new Map(i.map(n=>[n.key,n]));document.querySelectorAll("[data-rule-card]").forEach(n=>{let s=n,o=s.dataset.ruleKey;if(!o)return;let r=t.get(o);r&&(s.dataset.riskLevel=r.risk_level,s.dataset.category=r.category)})}window.expandAll=wo;window.collapseAll=Co;var yi=null;window.resetAllCustomTimes=()=>{if(!yi){console.warn("State not initialized");return}confirm("\xCAtes-vous s\xFBr de vouloir r\xE9initialiser tous les temps personnalis\xE9s ?")&&yi.resetAllCustomTimes()};window.resetTeamConfig=()=>{if(!yi){console.warn("State not initialized");return}if(confirm("\xCAtes-vous s\xFBr de vouloir r\xE9initialiser la configuration d'\xE9quipe ?")){let i=new Date().toISOString().split("T")[0];yi.setState({devCount:1,hoursPerDay:7,startDate:i});let t=document.querySelector("[data-start-date]"),e=document.querySelector("[data-dev-count]"),n=document.querySelector("[data-hours-per-day]");t&&(t.value=i),e&&(e.value="1"),n&&(n.value="7")}};window.copyRuleCommand=async(i,t)=>{if(await uo(t))ho(i);else{let n=i.textContent||"";i.textContent="\u274C Erreur",setTimeout(()=>{i.textContent=n},2e3)}}});am();})();
407
+ `}function Js(i){return z.matches.filter(t=>t.ruleKey===i).length}var oc,rc,ac,z,uc=C(()=>{"use strict";tt();oc="rules-table-organization",rc="rules-table-active-tab",ac="rules-table-sort"});function hc(i,t){if(["obligatoire","recommande","optionnelle"].every(l=>t.includes(l))||t.length===0)return i;let s=Jp(i.targets,t),o=Qp(s),r=s.reduce((l,c)=>l+c.totalTime.minutes,0),a=$(r,7);return{...i,targets:s,stats:o,totalTime:a}}function Jp(i,t){return i.map(e=>{let n=Zp(e.migrations,t),s=n.reduce((o,r)=>o+r.totalTime.minutes,0);return{...e,migrations:n,totalTime:$(s,7)}}).filter(e=>e.migrations.length>0)}function Zp(i,t){return i.map(e=>{let n=e.priorities.filter(o=>t.includes(o.priority)),s=n.reduce((o,r)=>o+r.totalTime.minutes,0);return{...e,priorities:n,totalTime:$(s,7)}}).filter(e=>e.priorities.length>0)}function Qp(i){let t=new Set,e=0,n=0;for(let s of i)for(let o of s.migrations)for(let r of o.priorities)for(let a of r.rules)t.add(a.ruleKey),e+=a.occurrences,a.specialWorkloadFiles!==void 0&&(n+=a.specialWorkloadFiles);return{uniqueRules:t.size,totalOccurrences:e,totalSpecialWorkloadFiles:n}}var fc=C(()=>{"use strict";fe()});function pc(i){let t=document.querySelector("[data-layer-selector]");if(!t)return;let e=P(Zs,[]);i.setState({hiddenLayers:e});let n=t.querySelectorAll('input[type="checkbox"]');n.forEach(s=>{let o=s.value;s.checked=!e.includes(o)}),mc(t),Qs(e),tm(t),n.forEach(s=>{s.addEventListener("change",()=>{let o=em(t);im(o,i,t)})})}function tm(i){let t=i.querySelector("[data-layer-dropdown-trigger]"),e=i.querySelector("[data-layer-dropdown-content]");!t||!e||(t.addEventListener("click",n=>{n.stopPropagation(),e.classList.toggle("hidden")}),document.addEventListener("click",n=>{i.contains(n.target)||e.classList.add("hidden")}))}function mc(i){let t=i.querySelector("[data-layer-badge]");if(!t)return;let e=i.querySelectorAll('input[type="checkbox"]'),n=e.length,s=Array.from(e).filter(o=>o.checked).length;t.textContent=`${s}/${n}`}function em(i){let t=i.querySelectorAll('input[type="checkbox"]'),e=[];return t.forEach(n=>{n.checked||e.push(n.value)}),e}function im(i,t,e){t.setState({hiddenLayers:i}),D(Zs,i),mc(e),Qs(i)}function Qs(i){let t=nm(i);if(document.querySelectorAll("[data-view-mode]").forEach(s=>{s.style.display="none"}),document.querySelectorAll(`[data-view-mode="${t}"]`).forEach(s=>{s.style.display=""}),!t.startsWith("merged-")){let s=i.includes("apps-libs");document.querySelectorAll('[data-layer="apps-libs"]').forEach(a=>{gc(a,s)}),document.querySelectorAll('[data-layer="sub-target"]').forEach(a=>{gc(a,s)})}Xo()}function nm(i){let t=i.includes("apps-libs"),e=i.includes("migration"),n=i.includes("priority"),o=document.querySelector("[data-hierarchy-view-select]")?.value==="by-priority",r=t?"merged-":"";return e&&n?`${r}flat-rules`:e?`${r}flat-priority`:n?`${r}flat-migration`:o?`${r}by-priority`:`${r}by-migration`}function gc(i,t){if(t){let e=i.querySelector("[data-collapse-trigger]");e&&(e.style.display="none");let n=i.querySelector("[data-collapse-content]");n&&(n.classList.remove("hidden"),n.style.marginTop="0"),i.classList.remove("ml-8","ml-6"),i.classList.add("ml-0"),i.style.borderLeft="none",i.style.paddingLeft="0"}else{let e=i.querySelector("[data-collapse-trigger]");e&&(e.style.display="");let n=i.querySelector("[data-collapse-content]");n&&(n.style.marginTop=""),i.classList.remove("ml-0"),i.getAttribute("data-layer")==="apps-libs"?i.classList.add("ml-6"):i.classList.add("ml-8"),i.style.borderLeft="",i.style.paddingLeft=""}}function sm(){return P(Zs,[])}function bc(){let i=sm();Qs(i)}var Zs,to=C(()=>{"use strict";We();$n();Zs="hidden-layers"});function xc(i){let t=document.querySelector("[data-hierarchy-view-select]");if(!t)return;let e=P(yc,"by-migration");i.setState({hierarchyViewMode:e}),t.value=e,_c(e),t.addEventListener("change",()=>{let n=t.value;(n==="by-migration"||n==="by-priority")&&om(n,i)})}function om(i,t){t.setState({hierarchyViewMode:i}),D(yc,i),_c(i)}function _c(i){bc()}var yc,vc=C(()=>{"use strict";We();to();yc="hierarchy-view-mode"});var hm=wc(()=>{so();wi();Oo();$o();$n();Qo();nr();or();Dl();Rl();Fl();tt();Kl();Jl();tc();nc();uc();Cn();fc();vc();to();document.addEventListener("DOMContentLoaded",()=>{let i=window;if(i.__MIGRATION_GUIDE_DATA__){Ln(),Ul();return}let e=i.__RULES_OVERVIEW_DATA__;if(e){let a=new he({devCount:1,hoursPerDay:7,customTimes:{},customSpecialTimes:{},startDate:new Date().toISOString().split("T")[0],selectedMigrations:["to18","to19","to20"],selectedPriorities:["obligatoire","recommande","optionnelle"],hierarchyViewMode:"by-migration",hiddenLayers:[]});Us(a),Gs(a),lc(e.rules,e.matches,e.rulePriorityMap,e.ruleMigrationMap,a.getState().selectedMigrations,a.getState().selectedPriorities),a.subscribe(l=>{cc(l.selectedMigrations,l.selectedPriorities)});return}let n=i.__REPORT_DATA__;if(!n){console.warn("No report data found");return}let s=new Date().toISOString().split("T")[0],o=he.loadCustomTimesFromStorage(),r=new he({devCount:1,hoursPerDay:7,customTimes:o.customTimes,customSpecialTimes:o.customSpecialTimes,startDate:s,selectedMigrations:["to18","to19","to20"],selectedPriorities:["obligatoire","recommande","optionnelle"],hierarchyViewMode:"by-migration",hiddenLayers:[]});_i=r,Ln(),Ro(),Io(),Fo(),um(n.rules),sr(),Go(),Zo(r),er(),Us(r),Gs(r),ic(r),xc(r),pc(r),wl(n.workloadReport),rm(n,r),r.subscribe(a=>{Mc(a,n)}),Mc(r.getState(),n),dm(r)});function rm(i,t){document.getElementById("gantt-timeline")&&Sc(i,t.getState())}function Sc(i,t){let e=i.workloadReport;if(!e)return;let n=new Date(t.startDate),{tasks:s,details:o}=ko(e,t.devCount,t.hoursPerDay,n);Pl("gantt-timeline",s,o),setTimeout(()=>Ol(),100)}function Mc(i,t){let e=wo(t.workloadReport,i.selectedMigrations||["to18","to19","to20"]),n=hc(e,i.selectedPriorities||["obligatoire","recommande","optionnelle"]),s=yo(n,i.customTimes,i.hoursPerDay,t.rules||[],i.customSpecialTimes),o=xo(s,i.devCount,i.hoursPerDay),r=document.querySelector("[data-global-time]");r&&(r.textContent=U(o.original));let a=document.querySelector("[data-adjusted-time]");a&&(a.textContent=U(o.adjusted));let l=document.querySelector("[data-dev-info]");l&&(l.textContent=`(${i.devCount} d\xE9veloppeur${i.devCount>1?"s":""})`),cm(s.stats),am(i.selectedMigrations||["to18","to19","to20"]),lm(i.selectedPriorities||["obligatoire","recommande","optionnelle"]),Mo(s),Cl(s),Sc({workloadReport:s},i)}function am(i){document.querySelectorAll("[data-migration]").forEach(e=>{let n=e,s=n.dataset.migration;s&&!i.includes(s)?n.style.display="none":n.style.display=""})}function lm(i){document.querySelectorAll("[data-priority]").forEach(e=>{let n=e,s=n.dataset.priority;s&&!i.includes(s)?n.style.display="none":n.style.display=""})}function cm(i){let t=document.querySelectorAll(".bg-gradient-to-br");if(t.length>=4){let e=t[1].querySelector(".text-indigo-600");e&&(e.textContent=String(i.uniqueRules));let n=t[2].querySelector(".text-purple-600");n&&(n.textContent=String(i.totalOccurrences));let s=t[3].querySelector(".text-pink-600");s&&(s.textContent=String(i.totalSpecialWorkloadFiles))}}function dm(i){let t=document.querySelector("[data-start-date]"),e=document.querySelector("[data-dev-count]"),n=document.querySelector("[data-hours-per-day]");if(t&&t.addEventListener("change",()=>{let s=t.value;s&&i.setState({startDate:s})}),e){let s=Gt(o=>{i.setState({devCount:o})},300);e.addEventListener("input",()=>{let o=parseInt(e.value,10);!isNaN(o)&&o>=1&&o<=20&&s(o)})}if(n){let s=Gt(o=>{i.setState({hoursPerDay:o})},300);n.addEventListener("input",()=>{let o=parseFloat(n.value);!isNaN(o)&&o>=1&&o<=10&&s(o)})}}function um(i){if(!i||i.length===0)return;let t=new Map(i.map(n=>[n.key,n]));document.querySelectorAll("[data-rule-card]").forEach(n=>{let s=n,o=s.dataset.ruleKey;if(!o)return;let r=t.get(o);r&&(s.dataset.riskLevel=r.risk_level,s.dataset.category=r.category)})}window.expandAll=Lo;window.collapseAll=Ao;var _i=null;window.resetAllCustomTimes=()=>{if(!_i){console.warn("State not initialized");return}confirm("\xCAtes-vous s\xFBr de vouloir r\xE9initialiser tous les temps personnalis\xE9s ?")&&_i.resetAllCustomTimes()};window.resetTeamConfig=()=>{if(!_i){console.warn("State not initialized");return}if(confirm("\xCAtes-vous s\xFBr de vouloir r\xE9initialiser la configuration d'\xE9quipe ?")){let i=new Date().toISOString().split("T")[0];_i.setState({devCount:1,hoursPerDay:7,startDate:i});let t=document.querySelector("[data-start-date]"),e=document.querySelector("[data-dev-count]"),n=document.querySelector("[data-hours-per-day]");t&&(t.value=i),e&&(e.value="1"),n&&(n.value="7")}};window.copyRuleCommand=async(i,t)=>{if(await po(t))mo(i);else{let n=i.textContent||"";i.textContent="\u274C Erreur",setTimeout(()=>{i.textContent=n},2e3)}}});hm();})();
422
408
  /*! Bundled license information:
423
409
 
424
410
  @kurkle/color/dist/color.esm.js: