blue-chestnut-solar-expert 0.0.2 → 0.0.3

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (61) hide show
  1. package/dist/cjs/loader.cjs.js +1 -1
  2. package/dist/cjs/map-draw.solar-expert.solar-system-form.entry.cjs.js.map +1 -1
  3. package/dist/cjs/map-draw_3.cjs.entry.js +254 -34
  4. package/dist/cjs/map-draw_3.cjs.entry.js.map +1 -1
  5. package/dist/cjs/solar-calculator.cjs.entry.js +2 -2
  6. package/dist/cjs/solar-calculator.cjs.entry.js.map +1 -1
  7. package/dist/cjs/solar-calculator.entry.cjs.js.map +1 -1
  8. package/dist/cjs/stencil-library.cjs.js +1 -1
  9. package/dist/collection/components/map-draw/map-draw.js +9 -7
  10. package/dist/collection/components/map-draw/map-draw.js.map +1 -1
  11. package/dist/collection/components/solar-calculator/solar-calculator.js +1 -1
  12. package/dist/collection/components/solar-expert/solar-expert.js +3 -1
  13. package/dist/collection/components/solar-expert/solar-expert.js.map +1 -1
  14. package/dist/collection/components/solar-system-form/solar-system-form.js +106 -23
  15. package/dist/collection/components/solar-system-form/solar-system-form.js.map +1 -1
  16. package/dist/collection/output.css +12 -0
  17. package/dist/collection/types/lang.js.map +1 -1
  18. package/dist/collection/utils/lang/english.js +40 -0
  19. package/dist/collection/utils/lang/english.js.map +1 -1
  20. package/dist/collection/utils/lang/general.js +23 -3
  21. package/dist/collection/utils/lang/general.js.map +1 -1
  22. package/dist/collection/utils/lang/german.js +74 -0
  23. package/dist/collection/utils/lang/german.js.map +1 -1
  24. package/dist/collection/utils/lang/spanish.js +75 -0
  25. package/dist/collection/utils/lang/spanish.js.map +1 -0
  26. package/dist/components/map-draw.js +1 -1
  27. package/dist/components/{p-DuF8Bxfn.js → p-C6zdkCkY.js} +288 -27
  28. package/dist/components/p-C6zdkCkY.js.map +1 -0
  29. package/dist/components/{p-C2Mo0x2g.js → p-CXGY4i5A.js} +13 -55
  30. package/dist/components/p-CXGY4i5A.js.map +1 -0
  31. package/dist/components/solar-calculator.js +2 -2
  32. package/dist/components/solar-calculator.js.map +1 -1
  33. package/dist/components/solar-expert.js +5 -4
  34. package/dist/components/solar-expert.js.map +1 -1
  35. package/dist/components/solar-system-form.js +1 -1
  36. package/dist/esm/loader.js +1 -1
  37. package/dist/esm/map-draw.solar-expert.solar-system-form.entry.js.map +1 -1
  38. package/dist/esm/map-draw_3.entry.js +254 -34
  39. package/dist/esm/map-draw_3.entry.js.map +1 -1
  40. package/dist/esm/solar-calculator.entry.js +2 -2
  41. package/dist/esm/solar-calculator.entry.js.map +1 -1
  42. package/dist/esm/stencil-library.js +1 -1
  43. package/dist/stencil-library/map-draw.solar-expert.solar-system-form.entry.esm.js.map +1 -1
  44. package/dist/stencil-library/p-dc4824e6.entry.js +44 -0
  45. package/dist/stencil-library/p-dc4824e6.entry.js.map +1 -0
  46. package/dist/stencil-library/p-de9a8d56.entry.js +2 -0
  47. package/dist/stencil-library/p-de9a8d56.entry.js.map +1 -0
  48. package/dist/stencil-library/solar-calculator.entry.esm.js.map +1 -1
  49. package/dist/stencil-library/stencil-library.esm.js +1 -1
  50. package/dist/types/components/solar-system-form/solar-system-form.d.ts +9 -3
  51. package/dist/types/components.d.ts +8 -0
  52. package/dist/types/types/lang.d.ts +40 -0
  53. package/dist/types/utils/lang/german.d.ts +2 -0
  54. package/dist/types/utils/lang/spanish.d.ts +2 -0
  55. package/package.json +1 -1
  56. package/dist/components/p-C2Mo0x2g.js.map +0 -1
  57. package/dist/components/p-DuF8Bxfn.js.map +0 -1
  58. package/dist/stencil-library/p-319691e6.entry.js +0 -2
  59. package/dist/stencil-library/p-319691e6.entry.js.map +0 -1
  60. package/dist/stencil-library/p-642688b2.entry.js +0 -44
  61. package/dist/stencil-library/p-642688b2.entry.js.map +0 -1
@@ -0,0 +1,44 @@
1
+ import{r as t,g as n,h as e,E as i}from"./p-D0YnIAAN.js";import{f as s,d as o,L as r,c as a,S as c}from"./p-DYAbWcg8.js";function l(t,n,e){if(!e){e=document.createElement("canvas")}e.width=t.width;e.height=t.height;const i=t.width/e.width;const s=t.height/e.height;const o=e.getContext("2d");const r=o.getImageData(0,0,e.width,e.height);for(let n=0;n<e.height;n++){for(let o=0;o<e.width;o++){const a=Math.floor(n*s)*t.width+Math.floor(o*i);const c=n*e.width*4+o*4;const l=.65;r.data[c+0]=Math.round(t.rasters[0][a]*l);r.data[c+1]=Math.round(t.rasters[1][a]*l);r.data[c+2]=Math.round(t.rasters[2][a]*l);r.data[c+3]=255}}o.putImageData(r,0,0);return e}function h(t,n,e,i,s,o){const{x:r,y:a}=t.pixelPosition;let c=e;let l=i*Math.cos(o*Math.PI/180);if(t.horizontal){c=i;l=e*Math.cos(o*Math.PI/180)}n.save();n.translate(r,a);n.rotate(s*Math.PI/180);n.fillStyle="rgba(115, 143, 255, 1)";n.fillRect(-c/2,-l/2,c,l);n.strokeStyle="rgba(0, 0, 0, 0.8)";n.lineWidth=1;n.strokeRect(-c/2,-l/2,c,l);n.restore()}function f({rgb:t,zoom:n=1,canvas:e}){const i=l(t,undefined,e);const s=i.getContext("2d");const o=s.getImageData(0,0,i.width,i.height);const r=i.width;const a=i.height;const c=Math.floor(r*n);const h=Math.floor(a*n);const f=Math.floor((r-c)/2);const u=Math.floor((a-h)/2);const d=new ImageData(c,h);for(let t=0;t<a;t++){for(let n=0;n<r;n++){const e=(t*r+n)*4;if(n>=f&&n<f+c&&t>=u&&t<u+h){const i=n-f;const s=t-u;const r=(s*c+i)*4;d.data[r]=o.data[e];d.data[r+1]=o.data[e+1];d.data[r+2]=o.data[e+2];d.data[r+3]=255}}}i.width=c;i.height=h;s.putImageData(d,0,0);return i}const u="rgba(0, 0, 0, 0.5)";const d=1;const p=1;const g=.2;const b=600;function m({x:t,y:n,lastPoint:e,secondLastPoint:i}){const s=e.x-i.x;const o=e.y-i.y;const r=-o;const a=s;const c=Math.sqrt(r*r+a*a);const l=r/c;const h=a/c;const f={x:t-e.x,y:n-e.y};const u=f.x*l+f.y*h;t=e.x+l*u;n=e.y+h*u;return{x:t,y:n}}function y({polygonCtx:t,polygonCanvas:n,polygon:e,shiftKeyPressed:i,mousePoint:s,strokeColor:o,fillColor:r}){if(!t||!n)return;t.beginPath();t.strokeStyle=o;t.lineWidth=2;e.points.forEach(((n,e)=>{if(e===0){t.moveTo(n.x,n.y)}else{t.lineTo(n.x,n.y)}}));if(e.closed){t.lineTo(e.points[0].x,e.points[0].y);if(r){t.fillStyle=r;t.fill()}}if(e.points.length>0){t.stroke()}if(e.points.length>1&&!e.closed&&i){const n=m({x:s.x,y:s.y,lastPoint:e.points[e.points.length-1],secondLastPoint:e.points[e.points.length-2]});x({ctx:t,startPoint:n,endPoint:e.points[e.points.length-1],strokeStyle:u})}if(i&&e.points.length>1&&!e.closed){const n=m({x:s.x,y:s.y,lastPoint:e.points[e.points.length-1],secondLastPoint:e.points[e.points.length-2]});w({ctx:t,x:n.x,y:n.y,radius:5,strokeStyle:u})}e.points.forEach((n=>{t.beginPath();const e=o;const i=Math.sqrt(Math.pow(n.x-s.x,2)+Math.pow(n.y-s.y,2));if(i<10){w({ctx:t,x:n.x,y:n.y,strokeStyle:e,radius:8})}else{w({ctx:t,x:n.x,y:n.y,strokeStyle:e,radius:5})}t.stroke()}))}function w({ctx:t,x:n,y:e,radius:i,strokeStyle:s="black",lineWidth:o=2}){t.beginPath();t.strokeStyle=s;t.lineWidth=o;t.arc(n,e,i,0,2*Math.PI);t.stroke()}function x({ctx:t,startPoint:n,endPoint:e,dashPattern:i=[5,5],strokeStyle:s="black",lineWidth:o=2}){t.beginPath();t.strokeStyle=s;t.lineWidth=o;t.setLineDash(i);t.moveTo(n.x,n.y);t.lineTo(e.x,e.y);t.stroke();t.setLineDash([])}function v(t,n){if(!n.closed||n.points.length<3)return false;const e=n.points.length;const i=t.x;const s=t.y;let o=false;let r=n.points[0];let a;for(let t=1;t<=e;t++){a=n.points[t%e];if(s>Math.min(r.y,a.y)){if(s<=Math.max(r.y,a.y)){if(i<=Math.max(r.x,a.x)){const t=(s-r.y)*(a.x-r.x)/(a.y-r.y)+r.x;if(r.x===a.x||i<=t){o=!o}}}}r=a}return o}const k=[{key:"shift",description:"add one point on perpendicular line"}];const M={name:"move",ariaLabel:"Move",icon:"move",cursor:"move",keyboardShortcut:"m",explanation:"Move points of the active polygon"};const S={name:"roof",ariaLabel:"Roof Area",icon:"house",cursor:"crosshair",keyboardShortcut:"r",keyboardCombinations:k,explanation:"Draw the roof of the building"};const _={name:"obstruction",ariaLabel:"Obstruction",icon:"octagon-minus",cursor:"crosshair",keyboardShortcut:"o",keyboardCombinations:k,explanation:"Draw the obstruction of the building"};const z={name:"delete",ariaLabel:"Delete",icon:"eraser",cursor:"default",keyboardShortcut:"d",explanation:"Delete the active polygon"};const P=[M,S,_,z];const O={openRoofColor:"#d6eeff",closedRoofColor:"#ffffff",openObstructionColor:"#f57242",closedObstructionColor:"rgba(255, 132, 107, 0.8)",roofPolygonFillColor:"rgba(92, 187, 255, 0.5)",obstructionPolygonFillColor:"rgba(255, 132, 107, 0.5)",roofPolygonHoverFillColor:"rgba(92, 187, 255, 0.8)",obstructionPolygonHoverFillColor:"rgba(255, 132, 107, 0.8)",roofPolygonSelectedFillColor:"rgba(92, 187, 255, 0.7)",obstructionPolygonSelectedFillColor:"rgba(255, 132, 107, 0.7)"};const C={widthMeters:1.134,heightMeters:1.762,kWattPeak:.455,efficiency:.224,price:77.68};function D(t,n,e,i,s){const o=n?.type===i.type&&n?._id===e;if(o){return i.type==="roof"?s.roofPolygonHoverFillColor:s.obstructionPolygonHoverFillColor}const r=t?.type===i.type&&t?._id===e;if(r){return i.type==="roof"?s.roofPolygonSelectedFillColor:s.obstructionPolygonSelectedFillColor}if(i.type==="roof"){return i.closed?s.roofPolygonFillColor:undefined}return i.closed?s.obstructionPolygonFillColor:undefined}var A=[];for(var j=0;j<256;++j){A.push((j+256).toString(16).slice(1))}function E(t,n=0){return(A[t[n+0]]+A[t[n+1]]+A[t[n+2]]+A[t[n+3]]+"-"+A[t[n+4]]+A[t[n+5]]+"-"+A[t[n+6]]+A[t[n+7]]+"-"+A[t[n+8]]+A[t[n+9]]+"-"+A[t[n+10]]+A[t[n+11]]+A[t[n+12]]+A[t[n+13]]+A[t[n+14]]+A[t[n+15]]).toLowerCase()}var L;var R=new Uint8Array(16);function N(){if(!L){L=typeof crypto!=="undefined"&&crypto.getRandomValues&&crypto.getRandomValues.bind(crypto);if(!L){throw new Error("crypto.getRandomValues() not supported. See https://github.com/uuidjs/uuid#getrandomvalues-not-supported")}}return L(R)}var T=typeof crypto!=="undefined"&&crypto.randomUUID&&crypto.randomUUID.bind(crypto);var I={randomUUID:T};function F(t,n,e){if(I.randomUUID&&true&&!t){return I.randomUUID()}t=t||{};var i=t.random||(t.rng||N)();i[6]=i[6]&15|64;i[8]=i[8]&63|128;return E(i)}function W(t){let n=0;for(let e=0;e<t.length;e++){const i=(e+1)%t.length;n+=t[e].x*t[i].y;n-=t[i].x*t[e].y}return Math.abs(n/2)}function B(t){if(t>=337.5||t<22.5)return"North";if(t>=22.5&&t<67.5)return"Northeast";if(t>=67.5&&t<112.5)return"East";if(t>=112.5&&t<157.5)return"Southeast";if(t>=157.5&&t<202.5)return"South";if(t>=202.5&&t<247.5)return"Southwest";if(t>=247.5&&t<292.5)return"West";return"Northwest"}function H(t,n,e){const i=n.getContext("2d");if(!i){throw new Error("Canvas context not found")}const s=e=>n.height*(1-(e-t.south)/(t.north-t.south));const o=e=>n.width*(e-t.west)/(t.east-t.west);return{x:o(e.longitude),y:s(e.latitude)}}function $(t){const n=t.bounds.north-t.bounds.south;const e=t.height;const i=n*111320/e;return i}function V(t,n){const e=n*(Math.PI/180);const i=t.x*Math.cos(e)-t.y*Math.sin(e);const s=t.x*Math.sin(e)+t.y*Math.cos(e);return{x:i,y:s}}function Y(t,n){return{points:t.points.map((t=>V(t,n))),type:t.type,closed:t.closed,_id:t._id,details:t.details}}function U(t,n){if(t.points.length===0){return{polygon:t,offset:{x:0,y:0}}}let e=0;let i=0;if(!n){const n=Math.min(...t.points.map((t=>t.x)));const s=Math.min(...t.points.map((t=>t.y)));const o=Math.max(...t.points.map((t=>t.x)));const r=Math.max(...t.points.map((t=>t.y)));e=n+(o-n)/2;i=s+(r-s)/2}else{e=n.x;i=n.y}const s=t.points.map((t=>({x:t.x-e,y:t.y-i})));return{polygon:{...t,points:s},offset:{x:e,y:i}}}function X(t,n){return t.x===n.x&&t.y===n.y}function K(t,n){const e=t.start;const i=t.end;const s=n.start;const o=n.end;if(X(e,s)||X(e,o)||X(i,s)||X(i,o)){return false}const r=(o.x-s.x)*(e.y-s.y)-(o.y-s.y)*(e.x-s.x);const a=(o.x-s.x)*(i.y-s.y)-(o.y-s.y)*(i.x-s.x);const c=(i.x-e.x)*(s.y-e.y)-(i.y-e.y)*(s.x-e.x);const l=(i.x-e.x)*(o.y-e.y)-(i.y-e.y)*(o.x-e.x);return r*a<0&&c*l<0}function q(t,n,e,i){const s={minX:Math.min(...t.points.map((t=>t.x))),maxX:Math.max(...t.points.map((t=>t.x))),minY:Math.min(...t.points.map((t=>t.y))),maxY:Math.max(...t.points.map((t=>t.y)))};let o=null;let r=0;for(const t of n){const n=H(e,i,{latitude:t.boundingBox.sw.latitude,longitude:t.boundingBox.sw.longitude});const a=H(e,i,{latitude:t.boundingBox.ne.latitude,longitude:t.boundingBox.ne.longitude});const c={minX:n.x,maxX:a.x,minY:a.y,maxY:n.y};const l=Math.max(s.minX,c.minX);const h=Math.min(s.maxX,c.maxX);const f=Math.max(s.minY,c.minY);const u=Math.min(s.maxY,c.maxY);const d=h-l;const p=u-f;let g=0;if(d>0&&p>0){g=d*p}const b=(s.maxX-s.minX)*(s.maxY-s.minY);const m=(c.maxX-c.minX)*(c.maxY-c.minY);const y=b+m-g;const w=y>0?g/y:0;if(w>r){r=w;o=t}}return o}function Z(t,n,e,i,s,o){const r=[];const a=e?n.heightMeters:n.widthMeters;const c=Math.ceil((t.maxX-t.minX)/a);const l=e?n.widthMeters:n.heightMeters;const h=Math.ceil((t.maxY-t.minY)/l);const f=a/2;const u=l/2;const d=i.x-Math.ceil((i.x-t.minX)/a)*a;const p=i.y-Math.ceil((i.y-t.minY)/l)*l;for(let t=0;t<h;t++){const i=[];for(let r=0;r<c;r++){const c=d+r*a+r*o+f;const h=p+t*l+t*s+u;const g={panel:n,pixelPosition:{x:c,y:h},horizontal:e};i.push(g)}r.push(i)}return r}function J(t,n){const e=n?t.panel.heightMeters:t.panel.widthMeters;const i=n?t.panel.widthMeters:t.panel.heightMeters;const s={x:t.pixelPosition.x-e/2,y:t.pixelPosition.y-i/2};const o={x:t.pixelPosition.x-e/2,y:t.pixelPosition.y+i/2};const r={x:t.pixelPosition.x+e/2,y:t.pixelPosition.y+i/2};const a={x:t.pixelPosition.x+e/2,y:t.pixelPosition.y-i/2};const c=[{start:s,end:o},{start:o,end:r},{start:r,end:a},{start:a,end:s}];return c}function Q(t,n,e){const i=J(t,e);if(v(t.pixelPosition,n)){return true}for(let t=0;t<n.points.length;t++){const e=n.points[t];const s=n.points[(t+1)%n.points.length];const o={start:e,end:s};for(const t of i){if(K(t,o)){return true}}}return false}function G(t,n,e){const i=J(t,e);for(let t=0;t<n.points.length;t++){const e=n.points[t];const s=n.points[(t+1)%n.points.length];const o={start:e,end:s};for(const t of i){if(K(t,o)){return false}}}return v(t.pixelPosition,n)}function tt(t,n,e){for(const i of n){if(Q(t,i.polygon,e)){return true}}return false}function nt(t,n,e,i){const s=[];for(const o of t){let t=[];for(const s of o){const o=tt(s,i,e);if(G(s,n,e)&&!o){t.push(s)}}s.push(t)}return s}function et(t,n,e,i){const s=Math.min(...t.points.map((t=>t.x)));const o=Math.max(...t.points.map((t=>t.x)));const r=Math.min(...t.points.map((t=>t.y)));const a=Math.max(...t.points.map((t=>t.y)));const c={minX:s,maxX:o,minY:r,maxY:a};console.log("solar",e);const l={...e,widthMeters:e.widthMeters*Math.cos(i*Math.PI/180),heightMeters:e.heightMeters};const h={...e,widthMeters:e.widthMeters,heightMeters:e.heightMeters*Math.cos(i*Math.PI/180)};let f=[];let u=0;for(const e of t.points){for(const i of[false]){const s=Z(c,i?l:h,i,e,d,p);const o=nt(s,t,i,n);const r=o.reduce(((t,n)=>t+n.length),0);if(r>u){u=r;f=o}}break}return f}function it(t,n,e,i){const s=[];for(const o of t){const t=U(o,e);const r=Y(t.polygon,-n);const a=ot(r,-i);const c=Math.min(...a.points.map((t=>t.x)));const l=Math.max(...a.points.map((t=>t.x)));const h=Math.min(...a.points.map((t=>t.y)));const f=Math.max(...a.points.map((t=>t.y)));const u={minX:c,maxX:l,minY:h,maxY:f};s.push({polygon:r,boundingBox:u})}return s}function st(t){let n=0;for(let e=0;e<t.length;e++){const i=t[e];const s=t[(e+1)%t.length];n+=(s.x-i.x)*(s.y+i.y)}return n>0}function ot(t,n){const e=t.points;const i=st(e);n=n*Math.sqrt(2)*(i?-1:1);const s=[];for(let t=0;t<e.length;t++){const i=e[(t-1+e.length)%e.length];const o=e[t];const r=e[(t+1)%e.length];const a={x:o.x-i.x,y:o.y-i.y};const c={x:r.x-o.x,y:r.y-o.y};const l={x:-a.y,y:a.x};const h={x:-c.y,y:c.x};const f=Math.sqrt(l.x*l.x+l.y*l.y);const u=Math.sqrt(h.x*h.x+h.y*h.y);l.x/=f;l.y/=f;h.x/=u;h.y/=u;const d={x:l.x+h.x,y:l.y+h.y};const p=Math.sqrt(d.x*d.x+d.y*d.y);d.x/=p;d.y/=p;const g={x:o.x+d.x*n,y:o.y+d.y*n};s.push(g)}return{points:s,type:t.type,closed:t.closed,_id:t._id,details:t.details}}function rt(t,n,e,i,s,o){const r=ot(t,s);const a=U(r);const c=Y(a.polygon,-i);const l=it(n,i,a.offset,s);const h=et(c,l,e,o);const f=[];for(const t of h.flat()){const n=V(t.pixelPosition,i);const e={x:n.x+a.offset.x,y:n.y+a.offset.y};f.push({panel:t.panel,pixelPosition:e,horizontal:t.horizontal})}return f}const at={solarExpert:{searchPlaceholder:"Search for a location"},solarSystemForm:{title:"Solar System Configuration",systemInformation:"System Information",numberOfPanels:"Number of Solar Panels",panelPeakPower:"Panel Peak Power (kW)",totalSystemPeakPower:"Total System Peak Power (kW)",electricityPrice:"Electricity Price (€/kWh)",compensationRate:"Compensation Rate (€/kWh)",autonomy:"Autonomy (days)",costSavings:"Cost Savings (€/year)",householdConsumptionTitle:"Household Electricity Consumption",consumptionProfileTitle:"Consumption Profile",electricityCostsTitle:"Electricity Costs",compensationRateTitle:"Compensation Rate",resultsTitle:"Results",savingsDisclaimer:"Disclaimer: The savings are based on the average electricity price in Spain.",annualConsumption:"Annual Consumption (kWh)",name:"Name",email:"Email",nameError:"Please enter your name",emailError:"Please enter a valid email address",consumptionProfiles:{mostlyAtHome:"Mostly at home",mostlyAway:"Mostly away"},chart:{consumption:"Consumption",production:"Production",consumptionProfile:"Consumption Profile",relativeConsumption:"Relative Consumption",hourOfDay:"Hour of Day"},validEmailError:"Please enter a valid email address",requestOffer:"Request Offer",requestOfferButton:"Request Offer",year:"year"},mapDraw:{noPolygonSelected:"No polygon selected",noAddressSelected:"Please select an address",information:"Information",calculateSolarPanels:"Calculate Solar Panels",panels:"Panels",area:"Area",azimuth:"Azimuth",pitch:"Pitch",tools:{roof:{name:"Roof",explanation:"Draw the roof of the building",ariaLabel:"Roof"},obstruction:{name:"Obstruction",explanation:"Draw the obstruction of the building",ariaLabel:"Obstruction"},delete:{name:"Delete",explanation:"Delete the selected polygon",ariaLabel:"Delete"},move:{name:"Move",explanation:"Move the selected polygon",ariaLabel:"Move"}}}};const ct={solarExpert:{searchPlaceholder:"Suche nach einer Adresse"},solarSystemForm:{title:"Solarsystem Konfiguration",systemInformation:"System Information",numberOfPanels:"Anzahl der Solarpanel",panelPeakPower:"Panel Peak Power (kW)",totalSystemPeakPower:"Total System Peak Power (kW)",electricityPrice:"Strompreis (€/kWh)",compensationRate:"Einspeisevergütung (€/kWh)",autonomy:"Autonomie (Tage)",costSavings:"Einsparungen (€/Jahr)",householdConsumptionTitle:"Haushaltsverbrauch",consumptionProfileTitle:"Verbrauchprofil",electricityCostsTitle:"Stromkosten",compensationRateTitle:"Einspeisevergütung",resultsTitle:"Ergebnisse",savingsDisclaimer:"Disclaimer: Die Einsparungen basieren auf dem durchschnittlichen Strompreis in Spanien.",annualConsumption:"Jährlicher Verbrauch (kWh)",name:"Name",email:"Email",nameError:"Bitte geben Sie Ihren Namen ein",emailError:"Bitte geben Sie eine gültige E-Mail-Adresse ein",consumptionProfiles:{mostlyAtHome:"Hauptsächlich zu Hause",mostlyAway:"Erwerbstätig"},chart:{consumption:"Verbrauch",production:"Produktion",consumptionProfile:"Verbrauchprofil",relativeConsumption:"Verbrauch",hourOfDay:"Stunde des Tages"},validEmailError:"Bitte geben Sie eine gültige E-Mail-Adresse ein",requestOffer:"Angebot anfordern",requestOfferButton:"Angebot anfordern",year:"Jahr"},mapDraw:{noPolygonSelected:"Kein Polygon ausgewählt",noAddressSelected:"Bitte wählen Sie eine Adresse",information:"Information",calculateSolarPanels:"Berechnen Sie die Solarpanele",panels:"Panele",area:"Fläche",azimuth:"Ausrichtung",pitch:"Neigung",tools:{roof:{name:"Dach",explanation:"Zeichnen Sie das Dach des Gebäudes",ariaLabel:"Dach"},obstruction:{name:"Hindernis",explanation:"Zeichnen Sie das Hindernis des Gebäudes",ariaLabel:"Hindernis"},delete:{name:"Löschen",explanation:"Löschen Sie das ausgewählte Polygon",ariaLabel:"Löschen"},move:{name:"Verschieben",explanation:"Verschieben Sie Punkte des ausgewählten Polygons",ariaLabel:"Verschieben"}}}};const lt={solarExpert:{searchPlaceholder:"Suche nach einer Adresse"},solarSystemForm:{title:"Configuración del sistema solar",systemInformation:"Información del sistema",numberOfPanels:"Número de paneles solares",panelPeakPower:"Potencia pico del panel (kW)",totalSystemPeakPower:"Potencia pico total del sistema (kW)",electricityPrice:"Precio de la electricidad (€/kWh)",compensationRate:"Tasa de compensación (€/kWh)",autonomy:"Autonomía (días)",costSavings:"Ahorro (€/año)",householdConsumptionTitle:"Consumo de la casa",consumptionProfileTitle:"Perfil de consumo",electricityCostsTitle:"Costes de la electricidad",compensationRateTitle:"Tasa de compensación",resultsTitle:"Resultados",savingsDisclaimer:"Nota: Los ahorros se basan en el precio promedio de la electricidad en España.",annualConsumption:"Consumo anual (kWh)",name:"Nombre",email:"Email",nameError:"Por favor, ingrese su nombre",emailError:"Por favor, ingrese una dirección de correo electrónico válida",consumptionProfiles:{mostlyAtHome:"Principalmente en casa",mostlyAway:"Empleo"},chart:{consumption:"Consumo",production:"Producción",consumptionProfile:"Perfil de consumo",relativeConsumption:"Consumo",hourOfDay:"Hora del día"},validEmailError:"Por favor, ingrese una dirección de correo electrónico válida",requestOffer:"Solicitar una oferta",requestOfferButton:"Solicitar oferta",year:"Año"},mapDraw:{noPolygonSelected:"No se ha seleccionado un polígono",noAddressSelected:"Por favor, seleccione una dirección",information:"Información",calculateSolarPanels:"Calcular paneles solares",panels:"Paneles",area:"Área",azimuth:"Azimut",pitch:"Inclinación",tools:{roof:{name:"Tejado",explanation:"Dibuje el tejado del edificio",ariaLabel:"Tejado"},obstruction:{name:"Obstrucción",explanation:"Dibuje la obstrucción del edificio",ariaLabel:"Obstrucción"},delete:{name:"Eliminar",explanation:"Elimine el polígono seleccionado",ariaLabel:"Eliminar"},move:{name:"Mover",explanation:"Mueva los puntos del polígono seleccionado",ariaLabel:"Mover"}}}};const ht={en:at,es:lt,de:ct};function ft(t){const n=ht["en"];if(t==="en"){return n}const e=ht[t];const i=JSON.parse(JSON.stringify(n));function s(t,n){for(const e in n){if(n[e]instanceof Object&&e in t){s(t[e],n[e])}else if(n[e]!==undefined){t[e]=n[e]}}}s(i,e);return i}const ut='/*! tailwindcss v4.1.7 | MIT License | https://tailwindcss.com */\n@layer properties;\n@layer theme, base, components, utilities;\n@layer theme {\n :root, :host {\n --font-sans: ui-sans-serif, system-ui, sans-serif, "Apple Color Emoji",\n "Segoe UI Emoji", "Segoe UI Symbol", "Noto Color Emoji";\n --font-mono: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, "Liberation Mono",\n "Courier New", monospace;\n --color-red-500: oklch(63.7% 0.237 25.331);\n --color-green-600: oklch(62.7% 0.194 149.214);\n --color-blue-500: oklch(62.3% 0.214 259.815);\n --color-gray-50: oklch(98.5% 0.002 247.839);\n --color-gray-200: oklch(92.8% 0.006 264.531);\n --color-gray-300: oklch(87.2% 0.01 258.338);\n --color-gray-400: oklch(70.7% 0.022 261.325);\n --color-gray-500: oklch(55.1% 0.027 264.364);\n --color-gray-600: oklch(44.6% 0.03 256.802);\n --color-gray-700: oklch(37.3% 0.034 259.733);\n --color-gray-800: oklch(27.8% 0.033 256.848);\n --color-white: #fff;\n --spacing: 0.25rem;\n --container-2xl: 42rem;\n --container-3xl: 48rem;\n --text-sm: 0.875rem;\n --text-sm--line-height: calc(1.25 / 0.875);\n --text-lg: 1.125rem;\n --text-lg--line-height: calc(1.75 / 1.125);\n --text-xl: 1.25rem;\n --text-xl--line-height: calc(1.75 / 1.25);\n --text-2xl: 1.5rem;\n --text-2xl--line-height: calc(2 / 1.5);\n --text-3xl: 1.875rem;\n --text-3xl--line-height: calc(2.25 / 1.875);\n --font-weight-medium: 500;\n --font-weight-semibold: 600;\n --font-weight-bold: 700;\n --radius-lg: 0.5rem;\n --radius-xl: 0.75rem;\n --radius-2xl: 1rem;\n --radius-4xl: 2rem;\n --ease-in-out: cubic-bezier(0.4, 0, 0.2, 1);\n --animate-spin: spin 1s linear infinite;\n --default-transition-duration: 150ms;\n --default-transition-timing-function: cubic-bezier(0.4, 0, 0.2, 1);\n --default-font-family: var(--font-sans);\n --default-mono-font-family: var(--font-mono);\n }\n}\n@layer base {\n *, ::after, ::before, ::backdrop, ::file-selector-button {\n box-sizing: border-box;\n margin: 0;\n padding: 0;\n border: 0 solid;\n }\n html, :host {\n line-height: 1.5;\n -webkit-text-size-adjust: 100%;\n tab-size: 4;\n font-family: var(--default-font-family, ui-sans-serif, system-ui, sans-serif, "Apple Color Emoji", "Segoe UI Emoji", "Segoe UI Symbol", "Noto Color Emoji");\n font-feature-settings: var(--default-font-feature-settings, normal);\n font-variation-settings: var(--default-font-variation-settings, normal);\n -webkit-tap-highlight-color: transparent;\n }\n hr {\n height: 0;\n color: inherit;\n border-top-width: 1px;\n }\n abbr:where([title]) {\n -webkit-text-decoration: underline dotted;\n text-decoration: underline dotted;\n }\n h1, h2, h3, h4, h5, h6 {\n font-size: inherit;\n font-weight: inherit;\n }\n a {\n color: inherit;\n -webkit-text-decoration: inherit;\n text-decoration: inherit;\n }\n b, strong {\n font-weight: bolder;\n }\n code, kbd, samp, pre {\n font-family: var(--default-mono-font-family, ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, "Liberation Mono", "Courier New", monospace);\n font-feature-settings: var(--default-mono-font-feature-settings, normal);\n font-variation-settings: var(--default-mono-font-variation-settings, normal);\n font-size: 1em;\n }\n small {\n font-size: 80%;\n }\n sub, sup {\n font-size: 75%;\n line-height: 0;\n position: relative;\n vertical-align: baseline;\n }\n sub {\n bottom: -0.25em;\n }\n sup {\n top: -0.5em;\n }\n table {\n text-indent: 0;\n border-color: inherit;\n border-collapse: collapse;\n }\n :-moz-focusring {\n outline: auto;\n }\n progress {\n vertical-align: baseline;\n }\n summary {\n display: list-item;\n }\n ol, ul, menu {\n list-style: none;\n }\n img, svg, video, canvas, audio, iframe, embed, object {\n display: block;\n vertical-align: middle;\n }\n img, video {\n max-width: 100%;\n height: auto;\n }\n button, input, select, optgroup, textarea, ::file-selector-button {\n font: inherit;\n font-feature-settings: inherit;\n font-variation-settings: inherit;\n letter-spacing: inherit;\n color: inherit;\n border-radius: 0;\n background-color: transparent;\n opacity: 1;\n }\n :where(select:is([multiple], [size])) optgroup {\n font-weight: bolder;\n }\n :where(select:is([multiple], [size])) optgroup option {\n padding-inline-start: 20px;\n }\n ::file-selector-button {\n margin-inline-end: 4px;\n }\n ::placeholder {\n opacity: 1;\n }\n @supports (not (-webkit-appearance: -apple-pay-button)) or (contain-intrinsic-size: 1px) {\n ::placeholder {\n color: currentcolor;\n @supports (color: color-mix(in lab, red, red)) {\n color: color-mix(in oklab, currentcolor 50%, transparent);\n }\n }\n }\n textarea {\n resize: vertical;\n }\n ::-webkit-search-decoration {\n -webkit-appearance: none;\n }\n ::-webkit-date-and-time-value {\n min-height: 1lh;\n text-align: inherit;\n }\n ::-webkit-datetime-edit {\n display: inline-flex;\n }\n ::-webkit-datetime-edit-fields-wrapper {\n padding: 0;\n }\n ::-webkit-datetime-edit, ::-webkit-datetime-edit-year-field, ::-webkit-datetime-edit-month-field, ::-webkit-datetime-edit-day-field, ::-webkit-datetime-edit-hour-field, ::-webkit-datetime-edit-minute-field, ::-webkit-datetime-edit-second-field, ::-webkit-datetime-edit-millisecond-field, ::-webkit-datetime-edit-meridiem-field {\n padding-block: 0;\n }\n :-moz-ui-invalid {\n box-shadow: none;\n }\n button, input:where([type="button"], [type="reset"], [type="submit"]), ::file-selector-button {\n appearance: button;\n }\n ::-webkit-inner-spin-button, ::-webkit-outer-spin-button {\n height: auto;\n }\n [hidden]:where(:not([hidden="until-found"])) {\n display: none !important;\n }\n}\n@layer utilities {\n .pointer-events-none {\n pointer-events: none;\n }\n .sr-only {\n position: absolute;\n width: 1px;\n height: 1px;\n padding: 0;\n margin: -1px;\n overflow: hidden;\n clip: rect(0, 0, 0, 0);\n white-space: nowrap;\n border-width: 0;\n }\n .absolute {\n position: absolute;\n }\n .fixed {\n position: fixed;\n }\n .relative {\n position: relative;\n }\n .inset-0 {\n inset: calc(var(--spacing) * 0);\n }\n .top-0 {\n top: calc(var(--spacing) * 0);\n }\n .top-1 {\n top: calc(var(--spacing) * 1);\n }\n .top-1\\/2 {\n top: calc(1/2 * 100%);\n }\n .bottom-full {\n bottom: 100%;\n }\n .left-0 {\n left: calc(var(--spacing) * 0);\n }\n .left-1 {\n left: calc(var(--spacing) * 1);\n }\n .left-1\\/2 {\n left: calc(1/2 * 100%);\n }\n .left-3 {\n left: calc(var(--spacing) * 3);\n }\n .z-1 {\n z-index: 1;\n }\n .z-10 {\n z-index: 10;\n }\n .z-20 {\n z-index: 20;\n }\n .z-50 {\n z-index: 50;\n }\n .m-auto {\n margin: auto;\n }\n .mt-1 {\n margin-top: calc(var(--spacing) * 1);\n }\n .mt-4 {\n margin-top: calc(var(--spacing) * 4);\n }\n .mb-1 {\n margin-bottom: calc(var(--spacing) * 1);\n }\n .mb-2 {\n margin-bottom: calc(var(--spacing) * 2);\n }\n .mb-4 {\n margin-bottom: calc(var(--spacing) * 4);\n }\n .mb-6 {\n margin-bottom: calc(var(--spacing) * 6);\n }\n .block {\n display: block;\n }\n .flex {\n display: flex;\n }\n .grid {\n display: grid;\n }\n .table {\n display: table;\n }\n .h-2 {\n height: calc(var(--spacing) * 2);\n }\n .h-3 {\n height: calc(var(--spacing) * 3);\n }\n .h-4 {\n height: calc(var(--spacing) * 4);\n }\n .h-5 {\n height: calc(var(--spacing) * 5);\n }\n .h-16 {\n height: calc(var(--spacing) * 16);\n }\n .h-32 {\n height: calc(var(--spacing) * 32);\n }\n .h-48 {\n height: calc(var(--spacing) * 48);\n }\n .h-64 {\n height: calc(var(--spacing) * 64);\n }\n .h-full {\n height: 100%;\n }\n .w-3 {\n width: calc(var(--spacing) * 3);\n }\n .w-4 {\n width: calc(var(--spacing) * 4);\n }\n .w-5 {\n width: calc(var(--spacing) * 5);\n }\n .w-16 {\n width: calc(var(--spacing) * 16);\n }\n .w-52 {\n width: calc(var(--spacing) * 52);\n }\n .w-64 {\n width: calc(var(--spacing) * 64);\n }\n .w-full {\n width: 100%;\n }\n .max-w-2xl {\n max-width: var(--container-2xl);\n }\n .max-w-3xl {\n max-width: var(--container-3xl);\n }\n .flex-1 {\n flex: 1;\n }\n .border-collapse {\n border-collapse: collapse;\n }\n .-translate-x-1 {\n --tw-translate-x: calc(var(--spacing) * -1);\n translate: var(--tw-translate-x) var(--tw-translate-y);\n }\n .-translate-x-1\\/2 {\n --tw-translate-x: calc(calc(1/2 * 100%) * -1);\n translate: var(--tw-translate-x) var(--tw-translate-y);\n }\n .-translate-y-1 {\n --tw-translate-y: calc(var(--spacing) * -1);\n translate: var(--tw-translate-x) var(--tw-translate-y);\n }\n .-translate-y-1\\/2 {\n --tw-translate-y: calc(calc(1/2 * 100%) * -1);\n translate: var(--tw-translate-x) var(--tw-translate-y);\n }\n .transform {\n transform: var(--tw-rotate-x,) var(--tw-rotate-y,) var(--tw-rotate-z,) var(--tw-skew-x,) var(--tw-skew-y,);\n }\n .animate-spin {\n animation: var(--animate-spin);\n }\n .cursor-help {\n cursor: help;\n }\n .cursor-not-allowed {\n cursor: not-allowed;\n }\n .cursor-pointer {\n cursor: pointer;\n }\n .resize {\n resize: both;\n }\n .appearance-none {\n appearance: none;\n }\n .grid-cols-1 {\n grid-template-columns: repeat(1, minmax(0, 1fr));\n }\n .grid-cols-2 {\n grid-template-columns: repeat(2, minmax(0, 1fr));\n }\n .flex-col {\n flex-direction: column;\n }\n .flex-row {\n flex-direction: row;\n }\n .items-center {\n align-items: center;\n }\n .items-start {\n align-items: flex-start;\n }\n .justify-between {\n justify-content: space-between;\n }\n .justify-center {\n justify-content: center;\n }\n .justify-start {\n justify-content: flex-start;\n }\n .gap-1 {\n gap: calc(var(--spacing) * 1);\n }\n .gap-2 {\n gap: calc(var(--spacing) * 2);\n }\n .gap-3 {\n gap: calc(var(--spacing) * 3);\n }\n .gap-4 {\n gap: calc(var(--spacing) * 4);\n }\n .gap-6 {\n gap: calc(var(--spacing) * 6);\n }\n .space-y-4 {\n :where(& > :not(:last-child)) {\n --tw-space-y-reverse: 0;\n margin-block-start: calc(calc(var(--spacing) * 4) * var(--tw-space-y-reverse));\n margin-block-end: calc(calc(var(--spacing) * 4) * calc(1 - var(--tw-space-y-reverse)));\n }\n }\n .space-y-6 {\n :where(& > :not(:last-child)) {\n --tw-space-y-reverse: 0;\n margin-block-start: calc(calc(var(--spacing) * 6) * var(--tw-space-y-reverse));\n margin-block-end: calc(calc(var(--spacing) * 6) * calc(1 - var(--tw-space-y-reverse)));\n }\n }\n .space-y-8 {\n :where(& > :not(:last-child)) {\n --tw-space-y-reverse: 0;\n margin-block-start: calc(calc(var(--spacing) * 8) * var(--tw-space-y-reverse));\n margin-block-end: calc(calc(var(--spacing) * 8) * calc(1 - var(--tw-space-y-reverse)));\n }\n }\n .rounded {\n border-radius: 0.25rem;\n }\n .rounded-2xl {\n border-radius: var(--radius-2xl);\n }\n .rounded-4xl {\n border-radius: var(--radius-4xl);\n }\n .rounded-full {\n border-radius: calc(infinity * 1px);\n }\n .rounded-lg {\n border-radius: var(--radius-lg);\n }\n .rounded-xl {\n border-radius: var(--radius-xl);\n }\n .border {\n border-style: var(--tw-border-style);\n border-width: 1px;\n }\n .border-2 {\n border-style: var(--tw-border-style);\n border-width: 2px;\n }\n .border-t {\n border-top-style: var(--tw-border-style);\n border-top-width: 1px;\n }\n .border-t-2 {\n border-top-style: var(--tw-border-style);\n border-top-width: 2px;\n }\n .border-b {\n border-bottom-style: var(--tw-border-style);\n border-bottom-width: 1px;\n }\n .border-b-2 {\n border-bottom-style: var(--tw-border-style);\n border-bottom-width: 2px;\n }\n .border-\\[\\#271200\\] {\n border-color: #271200;\n }\n .border-\\[\\#964500\\] {\n border-color: #964500;\n }\n .border-gray-200 {\n border-color: var(--color-gray-200);\n }\n .border-gray-300 {\n border-color: var(--color-gray-300);\n }\n .border-red-500 {\n border-color: var(--color-red-500);\n }\n .bg-\\[\\#271200\\] {\n background-color: #271200;\n }\n .bg-\\[\\#964500\\] {\n background-color: #964500;\n }\n .bg-\\[\\#f3ebda\\] {\n background-color: #f3ebda;\n }\n .bg-gray-50 {\n background-color: var(--color-gray-50);\n }\n .bg-gray-200 {\n background-color: var(--color-gray-200);\n }\n .bg-gray-400 {\n background-color: var(--color-gray-400);\n }\n .bg-gray-800 {\n background-color: var(--color-gray-800);\n }\n .bg-white {\n background-color: var(--color-white);\n }\n .p-2 {\n padding: calc(var(--spacing) * 2);\n }\n .p-3 {\n padding: calc(var(--spacing) * 3);\n }\n .p-4 {\n padding: calc(var(--spacing) * 4);\n }\n .p-6 {\n padding: calc(var(--spacing) * 6);\n }\n .p-8 {\n padding: calc(var(--spacing) * 8);\n }\n .p-9 {\n padding: calc(var(--spacing) * 9);\n }\n .p-10 {\n padding: calc(var(--spacing) * 10);\n }\n .px-2 {\n padding-inline: calc(var(--spacing) * 2);\n }\n .px-3 {\n padding-inline: calc(var(--spacing) * 3);\n }\n .px-4 {\n padding-inline: calc(var(--spacing) * 4);\n }\n .px-6 {\n padding-inline: calc(var(--spacing) * 6);\n }\n .py-1 {\n padding-block: calc(var(--spacing) * 1);\n }\n .py-2 {\n padding-block: calc(var(--spacing) * 2);\n }\n .py-3 {\n padding-block: calc(var(--spacing) * 3);\n }\n .pt-4 {\n padding-top: calc(var(--spacing) * 4);\n }\n .pt-6 {\n padding-top: calc(var(--spacing) * 6);\n }\n .pt-7 {\n padding-top: calc(var(--spacing) * 7);\n }\n .pr-4 {\n padding-right: calc(var(--spacing) * 4);\n }\n .pb-2 {\n padding-bottom: calc(var(--spacing) * 2);\n }\n .pb-3 {\n padding-bottom: calc(var(--spacing) * 3);\n }\n .pb-7 {\n padding-bottom: calc(var(--spacing) * 7);\n }\n .pl-10 {\n padding-left: calc(var(--spacing) * 10);\n }\n .text-center {\n text-align: center;\n }\n .text-2xl {\n font-size: var(--text-2xl);\n line-height: var(--tw-leading, var(--text-2xl--line-height));\n }\n .text-3xl {\n font-size: var(--text-3xl);\n line-height: var(--tw-leading, var(--text-3xl--line-height));\n }\n .text-lg {\n font-size: var(--text-lg);\n line-height: var(--tw-leading, var(--text-lg--line-height));\n }\n .text-sm {\n font-size: var(--text-sm);\n line-height: var(--tw-leading, var(--text-sm--line-height));\n }\n .text-xl {\n font-size: var(--text-xl);\n line-height: var(--tw-leading, var(--text-xl--line-height));\n }\n .font-bold {\n --tw-font-weight: var(--font-weight-bold);\n font-weight: var(--font-weight-bold);\n }\n .font-medium {\n --tw-font-weight: var(--font-weight-medium);\n font-weight: var(--font-weight-medium);\n }\n .font-semibold {\n --tw-font-weight: var(--font-weight-semibold);\n font-weight: var(--font-weight-semibold);\n }\n .whitespace-nowrap {\n white-space: nowrap;\n }\n .text-\\[\\#1a365d\\] {\n color: #1a365d;\n }\n .text-\\[\\#271200\\] {\n color: #271200;\n }\n .text-\\[\\#964500\\] {\n color: #964500;\n }\n .text-gray-400 {\n color: var(--color-gray-400);\n }\n .text-gray-500 {\n color: var(--color-gray-500);\n }\n .text-gray-600 {\n color: var(--color-gray-600);\n }\n .text-gray-700 {\n color: var(--color-gray-700);\n }\n .text-green-600 {\n color: var(--color-green-600);\n }\n .text-red-500 {\n color: var(--color-red-500);\n }\n .text-white {\n color: var(--color-white);\n }\n .underline {\n text-decoration-line: underline;\n }\n .accent-\\[\\#964500\\] {\n accent-color: #964500;\n }\n .opacity-0 {\n opacity: 0%;\n }\n .shadow {\n --tw-shadow: 0 1px 3px 0 var(--tw-shadow-color, rgb(0 0 0 / 0.1)), 0 1px 2px -1px var(--tw-shadow-color, rgb(0 0 0 / 0.1));\n box-shadow: var(--tw-inset-shadow), var(--tw-inset-ring-shadow), var(--tw-ring-offset-shadow), var(--tw-ring-shadow), var(--tw-shadow);\n }\n .shadow-inner {\n --tw-shadow: inset 0 2px 4px 0 var(--tw-shadow-color, rgb(0 0 0 / 0.05));\n box-shadow: var(--tw-inset-shadow), var(--tw-inset-ring-shadow), var(--tw-ring-offset-shadow), var(--tw-ring-shadow), var(--tw-shadow);\n }\n .shadow-lg {\n --tw-shadow: 0 10px 15px -3px var(--tw-shadow-color, rgb(0 0 0 / 0.1)), 0 4px 6px -4px var(--tw-shadow-color, rgb(0 0 0 / 0.1));\n box-shadow: var(--tw-inset-shadow), var(--tw-inset-ring-shadow), var(--tw-ring-offset-shadow), var(--tw-ring-shadow), var(--tw-shadow);\n }\n .outline {\n outline-style: var(--tw-outline-style);\n outline-width: 1px;\n }\n .transition-all {\n transition-property: all;\n transition-timing-function: var(--tw-ease, var(--default-transition-timing-function));\n transition-duration: var(--tw-duration, var(--default-transition-duration));\n }\n .transition-colors {\n transition-property: color, background-color, border-color, outline-color, text-decoration-color, fill, stroke, --tw-gradient-from, --tw-gradient-via, --tw-gradient-to;\n transition-timing-function: var(--tw-ease, var(--default-transition-timing-function));\n transition-duration: var(--tw-duration, var(--default-transition-duration));\n }\n .transition-opacity {\n transition-property: opacity;\n transition-timing-function: var(--tw-ease, var(--default-transition-timing-function));\n transition-duration: var(--tw-duration, var(--default-transition-duration));\n }\n .duration-200 {\n --tw-duration: 200ms;\n transition-duration: 200ms;\n }\n .ease-in-out {\n --tw-ease: var(--ease-in-out);\n transition-timing-function: var(--ease-in-out);\n }\n .select-none {\n -webkit-user-select: none;\n user-select: none;\n }\n .group-hover\\:opacity-100 {\n &:is(:where(.group):hover *) {\n @media (hover: hover) {\n opacity: 100%;\n }\n }\n }\n .peer-checked\\:bg-\\[\\#964500\\] {\n &:is(:where(.peer):checked ~ *) {\n background-color: #964500;\n }\n }\n .peer-checked\\:opacity-100 {\n &:is(:where(.peer):checked ~ *) {\n opacity: 100%;\n }\n }\n .hover\\:bg-\\[\\#7a3700\\] {\n &:hover {\n @media (hover: hover) {\n background-color: #7a3700;\n }\n }\n }\n .hover\\:bg-\\[\\#964500\\] {\n &:hover {\n @media (hover: hover) {\n background-color: #964500;\n }\n }\n }\n .focus\\:border-transparent {\n &:focus {\n border-color: transparent;\n }\n }\n .focus\\:ring-2 {\n &:focus {\n --tw-ring-shadow: var(--tw-ring-inset,) 0 0 0 calc(2px + var(--tw-ring-offset-width)) var(--tw-ring-color, currentcolor);\n box-shadow: var(--tw-inset-shadow), var(--tw-inset-ring-shadow), var(--tw-ring-offset-shadow), var(--tw-ring-shadow), var(--tw-shadow);\n }\n }\n .focus\\:ring-\\[\\#1a365d\\] {\n &:focus {\n --tw-ring-color: #1a365d;\n }\n }\n .focus\\:ring-\\[\\#964500\\] {\n &:focus {\n --tw-ring-color: #964500;\n }\n }\n .focus\\:ring-blue-500 {\n &:focus {\n --tw-ring-color: var(--color-blue-500);\n }\n }\n .focus\\:outline-none {\n &:focus {\n --tw-outline-style: none;\n outline-style: none;\n }\n }\n .md\\:grid-cols-2 {\n @media (width >= 48rem) {\n grid-template-columns: repeat(2, minmax(0, 1fr));\n }\n }\n .\\[\\&\\:\\:-moz-range-thumb\\]\\:h-4 {\n &::-moz-range-thumb {\n height: calc(var(--spacing) * 4);\n }\n }\n .\\[\\&\\:\\:-moz-range-thumb\\]\\:w-4 {\n &::-moz-range-thumb {\n width: calc(var(--spacing) * 4);\n }\n }\n .\\[\\&\\:\\:-moz-range-thumb\\]\\:appearance-none {\n &::-moz-range-thumb {\n appearance: none;\n }\n }\n .\\[\\&\\:\\:-moz-range-thumb\\]\\:rounded-full {\n &::-moz-range-thumb {\n border-radius: calc(infinity * 1px);\n }\n }\n .\\[\\&\\:\\:-moz-range-thumb\\]\\:border-0 {\n &::-moz-range-thumb {\n border-style: var(--tw-border-style);\n border-width: 0px;\n }\n }\n .\\[\\&\\:\\:-moz-range-thumb\\]\\:bg-\\[\\#964500\\] {\n &::-moz-range-thumb {\n background-color: #964500;\n }\n }\n .\\[\\&\\:\\:-moz-range-track\\]\\:bg-\\[\\#964500\\] {\n &::-moz-range-track {\n background-color: #964500;\n }\n }\n .\\[\\&\\:\\:-webkit-slider-runnable-track\\]\\:bg-\\[\\#964500\\] {\n &::-webkit-slider-runnable-track {\n background-color: #964500;\n }\n }\n .\\[\\&\\:\\:-webkit-slider-thumb\\]\\:h-4 {\n &::-webkit-slider-thumb {\n height: calc(var(--spacing) * 4);\n }\n }\n .\\[\\&\\:\\:-webkit-slider-thumb\\]\\:w-4 {\n &::-webkit-slider-thumb {\n width: calc(var(--spacing) * 4);\n }\n }\n .\\[\\&\\:\\:-webkit-slider-thumb\\]\\:appearance-none {\n &::-webkit-slider-thumb {\n appearance: none;\n }\n }\n .\\[\\&\\:\\:-webkit-slider-thumb\\]\\:rounded-full {\n &::-webkit-slider-thumb {\n border-radius: calc(infinity * 1px);\n }\n }\n .\\[\\&\\:\\:-webkit-slider-thumb\\]\\:bg-\\[\\#964500\\] {\n &::-webkit-slider-thumb {\n background-color: #964500;\n }\n }\n .\\[\\&\\>option\\:checked\\]\\:bg-\\[\\#964500\\] {\n &>option:checked {\n background-color: #964500;\n }\n }\n .\\[\\&\\>option\\:checked\\]\\:text-white {\n &>option:checked {\n color: var(--color-white);\n }\n }\n}\n@property --tw-translate-x {\n syntax: "*";\n inherits: false;\n initial-value: 0;\n}\n@property --tw-translate-y {\n syntax: "*";\n inherits: false;\n initial-value: 0;\n}\n@property --tw-translate-z {\n syntax: "*";\n inherits: false;\n initial-value: 0;\n}\n@property --tw-rotate-x {\n syntax: "*";\n inherits: false;\n}\n@property --tw-rotate-y {\n syntax: "*";\n inherits: false;\n}\n@property --tw-rotate-z {\n syntax: "*";\n inherits: false;\n}\n@property --tw-skew-x {\n syntax: "*";\n inherits: false;\n}\n@property --tw-skew-y {\n syntax: "*";\n inherits: false;\n}\n@property --tw-space-y-reverse {\n syntax: "*";\n inherits: false;\n initial-value: 0;\n}\n@property --tw-border-style {\n syntax: "*";\n inherits: false;\n initial-value: solid;\n}\n@property --tw-font-weight {\n syntax: "*";\n inherits: false;\n}\n@property --tw-shadow {\n syntax: "*";\n inherits: false;\n initial-value: 0 0 #0000;\n}\n@property --tw-shadow-color {\n syntax: "*";\n inherits: false;\n}\n@property --tw-shadow-alpha {\n syntax: "<percentage>";\n inherits: false;\n initial-value: 100%;\n}\n@property --tw-inset-shadow {\n syntax: "*";\n inherits: false;\n initial-value: 0 0 #0000;\n}\n@property --tw-inset-shadow-color {\n syntax: "*";\n inherits: false;\n}\n@property --tw-inset-shadow-alpha {\n syntax: "<percentage>";\n inherits: false;\n initial-value: 100%;\n}\n@property --tw-ring-color {\n syntax: "*";\n inherits: false;\n}\n@property --tw-ring-shadow {\n syntax: "*";\n inherits: false;\n initial-value: 0 0 #0000;\n}\n@property --tw-inset-ring-color {\n syntax: "*";\n inherits: false;\n}\n@property --tw-inset-ring-shadow {\n syntax: "*";\n inherits: false;\n initial-value: 0 0 #0000;\n}\n@property --tw-ring-inset {\n syntax: "*";\n inherits: false;\n}\n@property --tw-ring-offset-width {\n syntax: "<length>";\n inherits: false;\n initial-value: 0px;\n}\n@property --tw-ring-offset-color {\n syntax: "*";\n inherits: false;\n initial-value: #fff;\n}\n@property --tw-ring-offset-shadow {\n syntax: "*";\n inherits: false;\n initial-value: 0 0 #0000;\n}\n@property --tw-outline-style {\n syntax: "*";\n inherits: false;\n initial-value: solid;\n}\n@property --tw-duration {\n syntax: "*";\n inherits: false;\n}\n@property --tw-ease {\n syntax: "*";\n inherits: false;\n}\n@keyframes spin {\n to {\n transform: rotate(360deg);\n }\n}\n@layer properties {\n @supports ((-webkit-hyphens: none) and (not (margin-trim: inline))) or ((-moz-orient: inline) and (not (color:rgb(from red r g b)))) {\n *, ::before, ::after, ::backdrop {\n --tw-translate-x: 0;\n --tw-translate-y: 0;\n --tw-translate-z: 0;\n --tw-rotate-x: initial;\n --tw-rotate-y: initial;\n --tw-rotate-z: initial;\n --tw-skew-x: initial;\n --tw-skew-y: initial;\n --tw-space-y-reverse: 0;\n --tw-border-style: solid;\n --tw-font-weight: initial;\n --tw-shadow: 0 0 #0000;\n --tw-shadow-color: initial;\n --tw-shadow-alpha: 100%;\n --tw-inset-shadow: 0 0 #0000;\n --tw-inset-shadow-color: initial;\n --tw-inset-shadow-alpha: 100%;\n --tw-ring-color: initial;\n --tw-ring-shadow: 0 0 #0000;\n --tw-inset-ring-color: initial;\n --tw-inset-ring-shadow: 0 0 #0000;\n --tw-ring-inset: initial;\n --tw-ring-offset-width: 0px;\n --tw-ring-offset-color: #fff;\n --tw-ring-offset-shadow: 0 0 #0000;\n --tw-outline-style: solid;\n --tw-duration: initial;\n --tw-ease: initial;\n }\n }\n}\n';const dt=1;const pt=class{constructor(n){t(this,n)}language="en";apiKey="";latitude=null;longitude=null;config=O;solarPanel=C;zoom=1;loadingState="empty";rgbTiff=null;draggedPointIndex=null;hoveredPointIndex=null;hoveredPolygon=null;shiftKeyPressed=false;altKeyPressed=false;mousePoint=null;currentTool=S;roofPolygons={};roofPolygonsSolarPanels={};obstructionPolygons={};selectedPolygon=null;buildingInsights=null;pixelInMeters=.2;showAzimuth=true;get el(){return n(this)}canvasElement;polygonCanvas;polygonCtx;getCurrentPolygon(){if(!this.selectedPolygon){return null}const{_id:t,type:n}=this.selectedPolygon;return n==="roof"?this.roofPolygons[t]:this.obstructionPolygons[t]}componentDidLoad(){if(this.latitude&&this.longitude){this.loadingState="loading"}requestAnimationFrame((()=>{if(this.canvasElement){const t=this.canvasElement.getBoundingClientRect();this.canvasElement.width=t.width;this.canvasElement.height=t.height;this.drawMap()}}))}sizeCanvas(t,n){if(this.polygonCanvas){this.polygonCanvas.width=t;this.polygonCanvas.height=n;this.polygonCtx=this.polygonCanvas.getContext("2d")}}async getBuildingInsights(){if(!this.latitude||!this.longitude){return}this.loadingState="loading";if(this.buildingInsights){const t=this.buildingInsights.center.latitude===this.latitude&&this.buildingInsights.center.longitude===this.longitude;if(t){return}this.obstructionPolygons={};this.roofPolygons={};this.selectedPolygon=null;this.hoveredPolygon=null;this.canvasElement.getContext("2d")?.clearRect(0,0,this.canvasElement.width,this.canvasElement.height);this.polygonCtx?.clearRect(0,0,this.polygonCanvas.width,this.polygonCanvas.height);this.rgbTiff=null}this.buildingInsights=await s(this.latitude,this.longitude,this.apiKey);if(!this.buildingInsights){alert("No building insights found. Please enter them manually.")}}async getBuildingImages(){if(!this.latitude||!this.longitude){return}if(this.buildingInsights){const t=this.buildingInsights.center.latitude===this.latitude&&this.buildingInsights.center.longitude===this.longitude;if(t){return}}this.rgbTiff=await o(this.latitude,this.longitude,this.apiKey);this.pixelInMeters=$(this.rgbTiff);this.loadingState="loaded"}async drawMap(){if(!this.canvasElement||!this.rgbTiff||!this.buildingInsights)return;this.sizeCanvas(this.rgbTiff.width,this.rgbTiff.height);f({rgb:this.rgbTiff,zoom:this.zoom,canvas:this.canvasElement})}handleMouseMove(t){if(!this.polygonCanvas||!this.polygonCtx)return;const n=this.polygonCanvas.getBoundingClientRect();const e=t.clientX-n.left;const i=t.clientY-n.top;this.mousePoint={x:e,y:i};const s=this.getCurrentPolygon();const o=s?.points.findIndex((t=>{const n=Math.sqrt(Math.pow(e-t.x,2)+Math.pow(i-t.y,2));return n<10}));let r=null;for(const t of Object.values(this.obstructionPolygons)){if(v({x:e,y:i},t)){r={_id:t._id,type:"obstruction"};break}}if(!r){for(const t of Object.values(this.roofPolygons)){if(v({x:e,y:i},t)){r={_id:t._id,type:"roof"};break}}}if(o!==this.hoveredPointIndex||JSON.stringify(r)!==JSON.stringify(this.hoveredPolygon)){this.hoveredPointIndex=o;this.hoveredPolygon=r;this.drawPolygons()}if(this.draggedPointIndex!==null&&s&&this.currentTool.name==="move"){s.points[this.draggedPointIndex]={x:e,y:i};this.drawPolygons()}if(this.shiftKeyPressed){this.drawPolygons()}}drawPolygons(){if(!this.polygonCanvas||!this.polygonCtx)return;this.polygonCtx.clearRect(0,0,this.polygonCanvas.width,this.polygonCanvas.height);for(const t of Object.values(this.roofPolygons)){const n=D(this.selectedPolygon,this.hoveredPolygon,t._id,t,this.config);y({polygonCtx:this.polygonCtx,polygonCanvas:this.polygonCanvas,polygon:t,strokeColor:t.closed?this.config.closedRoofColor:this.config.openRoofColor,fillColor:n,shiftKeyPressed:this.shiftKeyPressed,mousePoint:this.mousePoint});const e=this.roofPolygonsSolarPanels[t._id];const i={widthMeters:this.solarPanel.widthMeters/this.pixelInMeters,heightMeters:this.solarPanel.heightMeters/this.pixelInMeters};if(e){for(const n of e.positionedPanels){h(n,this.polygonCtx,i.widthMeters,i.heightMeters,t.details?.azimuth,t.details?.pitch)}}}for(const t of Object.values(this.obstructionPolygons)){const n=D(this.selectedPolygon,this.hoveredPolygon,t._id,t,this.config);y({polygonCtx:this.polygonCtx,polygonCanvas:this.polygonCanvas,polygon:t,shiftKeyPressed:this.shiftKeyPressed,mousePoint:this.mousePoint,strokeColor:t.closed?this.config.closedObstructionColor:this.config.openObstructionColor,fillColor:n})}}deletePolygon(t){if(this.selectedPolygon?._id===t){this.selectedPolygon=null}if(this.roofPolygons[t]){delete this.roofPolygons[t];delete this.roofPolygonsSolarPanels[t]}if(this.obstructionPolygons[t]){delete this.obstructionPolygons[t]}}handleKeyDown(t){if(t.target instanceof HTMLInputElement){return}if(t.shiftKey&&!this.shiftKeyPressed){this.shiftKeyPressed=true;this.drawPolygons();return}if(t.altKey&&!this.altKeyPressed){this.altKeyPressed=true;return}if((t.key==="Delete"||t.key==="Backspace")&&this.selectedPolygon){const t=this.getCurrentPolygon();if(t.closed){this.deletePolygon(t._id);this.drawPolygons();return}t.points.pop();this.drawPolygons();return}const n=t.key.toLowerCase();const e=P.find((t=>t.keyboardShortcut?.toLowerCase()===n));if(e){this.currentTool=e}}handleKeyUp(t){if(!t.shiftKey&&this.shiftKeyPressed){this.shiftKeyPressed=false;this.drawPolygons()}if(!t.altKey&&this.altKeyPressed){this.altKeyPressed=false}}handleMouseDown(t){if(!this.polygonCanvas||!this.polygonCtx)return;if(!this.polygonCanvas.contains(t.target))return;const n=this.polygonCanvas.getBoundingClientRect();let e=t.clientX-n.left;let i=t.clientY-n.top;if(this.currentTool.name==="delete"){if(!this.hoveredPolygon){return}const{_id:t,type:n}=this.hoveredPolygon;if(n==="roof"){delete this.roofPolygons[t];delete this.roofPolygonsSolarPanels[t]}else if(n==="obstruction"){delete this.obstructionPolygons[t]}this.hoveredPolygon=null;if(this.selectedPolygon?._id===t){this.selectedPolygon=null}this.drawPolygons();return}if(this.currentTool.name==="move"){if(this.selectedPolygon){const t=this.getCurrentPolygon();const n=t?.points.findIndex((t=>{const n=Math.sqrt(Math.pow(e-t.x,2)+Math.pow(i-t.y,2));return n<10}));if(n!==undefined&&n!==-1){this.draggedPointIndex=n;return}if(this.hoveredPolygon){this.selectedPolygon=this.hoveredPolygon;return}}this.selectedPolygon=null;this.drawPolygons();return}if(!this.selectedPolygon||this.getCurrentPolygon()?.closed){const t={_id:F(),points:[{x:e,y:i}],type:this.currentTool.name,closed:false};let n;if(this.currentTool.name==="roof"){this.roofPolygons={...this.roofPolygons,[t._id]:t};n=t._id}else if(this.currentTool.name==="obstruction"){this.obstructionPolygons={...this.obstructionPolygons,[t._id]:t};n=t._id}this.selectedPolygon={_id:n,type:this.currentTool.name};return}const{_id:s,type:o}=this.selectedPolygon;const r=o==="roof"?this.roofPolygons[s]:this.obstructionPolygons[s];if(r.closed){return}if(r.points.length>2){const t=r.points[0];const n=Math.sqrt(Math.pow(e-t.x,2)+Math.pow(i-t.y,2));if(n<10){this.closePolygon();return}}if(t.shiftKey&&r?.points.length>=2){const t=m({x:e,y:i,lastPoint:r.points[r.points.length-1],secondLastPoint:r.points[r.points.length-2]});e=t.x;i=t.y}r.points=[...r.points,{x:e,y:i}];this.drawPolygons()}handleMouseUp(){this.draggedPointIndex=null}closePolygon(){const t=this.getCurrentPolygon();if(t.points.length>=3&&(this.currentTool.name==="roof"||this.currentTool.name==="obstruction")){t.closed=true}if(t.type==="roof"){const n=1/this.pixelInMeters;const e=W(t.points)/(n*n);const i=q(t,this.buildingInsights?.solarPotential.roofSegmentStats,this.rgbTiff.bounds,this.canvasElement);if(i){t.details={area:e,azimuth:i.azimuthDegrees,pitch:i.pitchDegrees}}else{t.details={area:e,azimuth:0,pitch:0}}}this.drawPolygons();this.currentTool=M}calculateSolarPanels(){const t=this.getCurrentPolygon();if(!t.details){return}if(this.roofPolygonsSolarPanels[t._id]){delete this.roofPolygonsSolarPanels[t._id]}const n={...this.solarPanel,widthMeters:this.solarPanel.widthMeters/this.pixelInMeters,heightMeters:this.solarPanel.heightMeters/this.pixelInMeters};const e=g/this.pixelInMeters;const i=rt(t,Object.values(this.obstructionPolygons),n,t.details?.azimuth,e,t.details?.pitch);this.roofPolygonsSolarPanels={...this.roofPolygonsSolarPanels,[t._id]:{positionedPanels:i,sunniness:t.details?.assignedRoofStats?.stats.sunshineQuantiles[5]??this.buildingInsights.solarPotential.buildingStats.sunshineQuantiles[5]??b}};this.drawPolygons()}handlePitchChange(t){const n=t.target;const e=parseFloat(n.value);const i=this.getCurrentPolygon();if(i){this.roofPolygons[i._id].details.pitch=e}if(i.type==="roof"&&this.roofPolygonsSolarPanels[i._id]){this.calculateSolarPanels();return}}handleAzimuthChange(t){const n=t.target;const e=parseFloat(n.value);const i=this.getCurrentPolygon();if(i){this.roofPolygons[i._id].details.azimuth=e}if(i.type==="roof"&&this.roofPolygonsSolarPanels[i._id]){this.calculateSolarPanels();return}}handleToolSelect(t){this.currentTool=t}render(){const t=ft(this.language);const n=this.getCurrentPolygon();return e("div",{key:"263b0447ff88dc33ddf73b40983c06106b7d8817",class:"flex flex-col justify-center items-center w-full h-full gap-4"},this.loadingState==="empty"&&e("div",{key:"bb1ac9ee139b6d00d61517f893238d334359d7b5",class:"absolute h-32 w-full"},e("p",{key:"326d9566c617261bb54ed36ace7dc763d6e51fbd",class:"text-gray-500 text-center w-full h-full flex items-center justify-center",style:{backgroundColor:"rgba(255, 255, 255, 0.9)"}},t.mapDraw.noAddressSelected)),this.latitude&&this.longitude&&this.loadingState!=="loaded"&&e("div",{key:"73df4bec7b7f0338f008a119f248ea332813ef96",class:"absolute w-full flex items-center justify-center bg-white bg-opacity-75 z-20 pt-7 rounded-4xl"},e("div",{key:"68554e8e94cc82c8d7ad06048e83cd26fb93b477",class:"animate-spin rounded-full h-16 w-16 border-t-2 border-b-2 border-[#271200]"})),e("div",{key:"27a6d628c3b9152d34c33eabd245410bce496d75",class:"flex gap-4 rounded-4xl bg-[#f3ebda] p-4"},P.map((n=>{const i=t.mapDraw.tools[n.name];return e("button",{class:`px-4 py-2 rounded-4xl transition-colors duration-200 hover:bg-[#964500] ${this.currentTool.name===n.name?"bg-[#271200] text-white hover:bg-[#964500]":"bg-[#f3ebda] hover:bg-[#964500]"}`,"aria-label":i.ariaLabel,title:i.explanation,onClick:()=>this.handleToolSelect(n)},e("div",{class:"flex items-center gap-1 flex-col"},e("i",{"data-lucide":n.icon}),e("span",null,i.name)))}))),e("div",{key:"06bfbf66987b037e91b7ab81a03df4f23628b1ff",class:"flex gap-4 items-start justify-center h-full"},e("div",{key:"049b2ae11416c04c8cfbf708eacebca5f9b00445",class:"relative flex-1 w-full h-full rounded-4xl flex items-center justify-center",style:{width:`${this.rgbTiff?.width*dt||0}px`,height:`${this.rgbTiff?.height*dt||0}px`}},e("canvas",{key:"091c32b48b08cfa04bd07f04134d8f4e477b943d",ref:t=>this.canvasElement=t,class:`absolute top-0 left-0 z-1 rounded-4xl m-auto`,style:{cursor:this.currentTool.cursor}}),e("canvas",{key:"bbf4954109a2017335afa20dea01996be0f5f0af",ref:t=>this.polygonCanvas=t,class:`absolute top-0 left-0 z-10 rounded-4xl m-auto`,style:{cursor:this.currentTool.cursor}}))),e("div",{key:"3c416ec2251fb58a02e934b17c55d6c0b7b2dcde",class:"flex gap-4 flex-row justify-center items-center"},e("div",{key:"bce867903fe6c9eb09aa68f63dd38783d58e31e9",class:"w-52 bg-[#f3ebda] rounded-4xl p-4"},e("h3",{key:"528d290e488484d1fe929c6aad8136fbc91c035a",class:"text-lg font-semibold mb-4 text-center"},t.mapDraw.information),n?.details?e("div",{class:"space-y-4"},e("div",{class:"flex flex-col gap-2"},e("button",{class:"px-4 py-2 bg-[#271200] text-white rounded-4xl hover:bg-[#964500] transition-colors duration-200",onClick:()=>this.calculateSolarPanels()},t.mapDraw.calculateSolarPanels),this.roofPolygonsSolarPanels[n._id]&&e("p",{class:"text-lg text-center"},this.roofPolygonsSolarPanels[n._id].positionedPanels.length," ",t.mapDraw.panels)),e("div",null,e("h4",{class:"text-sm font-medium text-gray-600"},t.mapDraw.area),e("p",{class:"text-lg"},n.details?.area.toFixed(2)," m²")),e("div",null,e("h4",{class:"text-sm font-medium text-gray-600"},"Orientation"),e("div",{class:"flex gap-2 flex-row justify-start"},e("input",{class:"text-lg w-full",onKeyDown:t=>{if(t.key==="Enter"){this.handleAzimuthChange(t);t.target.blur()}},value:n.details?.azimuth}),"(",B(n.details?.azimuth),")")),e("div",null,e("h4",{class:"text-sm font-medium text-gray-600"},t.mapDraw.pitch),e("div",{class:"flex gap-2 flex-row justify-start"},e("input",{class:"text-lg w-full",onKeyDown:t=>{if(t.key==="Enter"){this.handlePitchChange(t);t.target.blur()}},value:n.details?.pitch}),"°"))):e("p",{class:"text-gray-500 text-center"},t.mapDraw.noPolygonSelected))),e("solar-system-form",{key:"49cde119d26eb44b6dcfd51599f08a3b165e3617",systemConfigs:this.roofPolygonsSolarPanels,language:this.language,roofPolygons:this.roofPolygons,obstructionPolygons:this.obstructionPolygons}))}static get watchers(){return{latitude:["getBuildingInsights","getBuildingImages"],longitude:["getBuildingInsights","getBuildingImages"],rgbTiff:["drawMap"],buildingInsights:["drawMap"],canvasElement:["drawMap"]}}};pt.style=ut;
2
+ /**
3
+ * @license lucide v0.509.0 - ISC
4
+ *
5
+ * This source code is licensed under the ISC license.
6
+ * See the LICENSE file in the root directory of this source tree.
7
+ */const gt=[["path",{d:"m7 21-4.3-4.3c-1-1-1-2.5 0-3.4l9.6-9.6c1-1 2.5-1 3.4 0l5.6 5.6c1 1 1 2.5 0 3.4L13 21"}],["path",{d:"M22 21H7"}],["path",{d:"m5 11 9 9"}]];
8
+ /**
9
+ * @license lucide v0.509.0 - ISC
10
+ *
11
+ * This source code is licensed under the ISC license.
12
+ * See the LICENSE file in the root directory of this source tree.
13
+ */const bt=[["path",{d:"M15 21v-8a1 1 0 0 0-1-1h-4a1 1 0 0 0-1 1v8"}],["path",{d:"M3 10a2 2 0 0 1 .709-1.528l7-5.999a2 2 0 0 1 2.582 0l7 5.999A2 2 0 0 1 21 10v9a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2z"}]];
14
+ /**
15
+ * @license lucide v0.509.0 - ISC
16
+ *
17
+ * This source code is licensed under the ISC license.
18
+ * See the LICENSE file in the root directory of this source tree.
19
+ */const mt=[["path",{d:"M12 2v20"}],["path",{d:"m15 19-3 3-3-3"}],["path",{d:"m19 9 3 3-3 3"}],["path",{d:"M2 12h20"}],["path",{d:"m5 9-3 3 3 3"}],["path",{d:"m9 5 3-3 3 3"}]];
20
+ /**
21
+ * @license lucide v0.509.0 - ISC
22
+ *
23
+ * This source code is licensed under the ISC license.
24
+ * See the LICENSE file in the root directory of this source tree.
25
+ */const yt=[["path",{d:"M2.586 16.726A2 2 0 0 1 2 15.312V8.688a2 2 0 0 1 .586-1.414l4.688-4.688A2 2 0 0 1 8.688 2h6.624a2 2 0 0 1 1.414.586l4.688 4.688A2 2 0 0 1 22 8.688v6.624a2 2 0 0 1-.586 1.414l-4.688 4.688a2 2 0 0 1-1.414.586H8.688a2 2 0 0 1-1.414-.586z"}],["path",{d:"M8 12h8"}]];const wt='/*! tailwindcss v4.1.7 | MIT License | https://tailwindcss.com */\n@layer properties;\n@layer theme, base, components, utilities;\n@layer theme {\n :root, :host {\n --font-sans: ui-sans-serif, system-ui, sans-serif, "Apple Color Emoji",\n "Segoe UI Emoji", "Segoe UI Symbol", "Noto Color Emoji";\n --font-mono: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, "Liberation Mono",\n "Courier New", monospace;\n --color-red-500: oklch(63.7% 0.237 25.331);\n --color-green-600: oklch(62.7% 0.194 149.214);\n --color-blue-500: oklch(62.3% 0.214 259.815);\n --color-gray-50: oklch(98.5% 0.002 247.839);\n --color-gray-200: oklch(92.8% 0.006 264.531);\n --color-gray-300: oklch(87.2% 0.01 258.338);\n --color-gray-400: oklch(70.7% 0.022 261.325);\n --color-gray-500: oklch(55.1% 0.027 264.364);\n --color-gray-600: oklch(44.6% 0.03 256.802);\n --color-gray-700: oklch(37.3% 0.034 259.733);\n --color-gray-800: oklch(27.8% 0.033 256.848);\n --color-white: #fff;\n --spacing: 0.25rem;\n --container-2xl: 42rem;\n --container-3xl: 48rem;\n --text-sm: 0.875rem;\n --text-sm--line-height: calc(1.25 / 0.875);\n --text-lg: 1.125rem;\n --text-lg--line-height: calc(1.75 / 1.125);\n --text-xl: 1.25rem;\n --text-xl--line-height: calc(1.75 / 1.25);\n --text-2xl: 1.5rem;\n --text-2xl--line-height: calc(2 / 1.5);\n --text-3xl: 1.875rem;\n --text-3xl--line-height: calc(2.25 / 1.875);\n --font-weight-medium: 500;\n --font-weight-semibold: 600;\n --font-weight-bold: 700;\n --radius-lg: 0.5rem;\n --radius-xl: 0.75rem;\n --radius-2xl: 1rem;\n --radius-4xl: 2rem;\n --ease-in-out: cubic-bezier(0.4, 0, 0.2, 1);\n --animate-spin: spin 1s linear infinite;\n --default-transition-duration: 150ms;\n --default-transition-timing-function: cubic-bezier(0.4, 0, 0.2, 1);\n --default-font-family: var(--font-sans);\n --default-mono-font-family: var(--font-mono);\n }\n}\n@layer base {\n *, ::after, ::before, ::backdrop, ::file-selector-button {\n box-sizing: border-box;\n margin: 0;\n padding: 0;\n border: 0 solid;\n }\n html, :host {\n line-height: 1.5;\n -webkit-text-size-adjust: 100%;\n tab-size: 4;\n font-family: var(--default-font-family, ui-sans-serif, system-ui, sans-serif, "Apple Color Emoji", "Segoe UI Emoji", "Segoe UI Symbol", "Noto Color Emoji");\n font-feature-settings: var(--default-font-feature-settings, normal);\n font-variation-settings: var(--default-font-variation-settings, normal);\n -webkit-tap-highlight-color: transparent;\n }\n hr {\n height: 0;\n color: inherit;\n border-top-width: 1px;\n }\n abbr:where([title]) {\n -webkit-text-decoration: underline dotted;\n text-decoration: underline dotted;\n }\n h1, h2, h3, h4, h5, h6 {\n font-size: inherit;\n font-weight: inherit;\n }\n a {\n color: inherit;\n -webkit-text-decoration: inherit;\n text-decoration: inherit;\n }\n b, strong {\n font-weight: bolder;\n }\n code, kbd, samp, pre {\n font-family: var(--default-mono-font-family, ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, "Liberation Mono", "Courier New", monospace);\n font-feature-settings: var(--default-mono-font-feature-settings, normal);\n font-variation-settings: var(--default-mono-font-variation-settings, normal);\n font-size: 1em;\n }\n small {\n font-size: 80%;\n }\n sub, sup {\n font-size: 75%;\n line-height: 0;\n position: relative;\n vertical-align: baseline;\n }\n sub {\n bottom: -0.25em;\n }\n sup {\n top: -0.5em;\n }\n table {\n text-indent: 0;\n border-color: inherit;\n border-collapse: collapse;\n }\n :-moz-focusring {\n outline: auto;\n }\n progress {\n vertical-align: baseline;\n }\n summary {\n display: list-item;\n }\n ol, ul, menu {\n list-style: none;\n }\n img, svg, video, canvas, audio, iframe, embed, object {\n display: block;\n vertical-align: middle;\n }\n img, video {\n max-width: 100%;\n height: auto;\n }\n button, input, select, optgroup, textarea, ::file-selector-button {\n font: inherit;\n font-feature-settings: inherit;\n font-variation-settings: inherit;\n letter-spacing: inherit;\n color: inherit;\n border-radius: 0;\n background-color: transparent;\n opacity: 1;\n }\n :where(select:is([multiple], [size])) optgroup {\n font-weight: bolder;\n }\n :where(select:is([multiple], [size])) optgroup option {\n padding-inline-start: 20px;\n }\n ::file-selector-button {\n margin-inline-end: 4px;\n }\n ::placeholder {\n opacity: 1;\n }\n @supports (not (-webkit-appearance: -apple-pay-button)) or (contain-intrinsic-size: 1px) {\n ::placeholder {\n color: currentcolor;\n @supports (color: color-mix(in lab, red, red)) {\n color: color-mix(in oklab, currentcolor 50%, transparent);\n }\n }\n }\n textarea {\n resize: vertical;\n }\n ::-webkit-search-decoration {\n -webkit-appearance: none;\n }\n ::-webkit-date-and-time-value {\n min-height: 1lh;\n text-align: inherit;\n }\n ::-webkit-datetime-edit {\n display: inline-flex;\n }\n ::-webkit-datetime-edit-fields-wrapper {\n padding: 0;\n }\n ::-webkit-datetime-edit, ::-webkit-datetime-edit-year-field, ::-webkit-datetime-edit-month-field, ::-webkit-datetime-edit-day-field, ::-webkit-datetime-edit-hour-field, ::-webkit-datetime-edit-minute-field, ::-webkit-datetime-edit-second-field, ::-webkit-datetime-edit-millisecond-field, ::-webkit-datetime-edit-meridiem-field {\n padding-block: 0;\n }\n :-moz-ui-invalid {\n box-shadow: none;\n }\n button, input:where([type="button"], [type="reset"], [type="submit"]), ::file-selector-button {\n appearance: button;\n }\n ::-webkit-inner-spin-button, ::-webkit-outer-spin-button {\n height: auto;\n }\n [hidden]:where(:not([hidden="until-found"])) {\n display: none !important;\n }\n}\n@layer utilities {\n .pointer-events-none {\n pointer-events: none;\n }\n .sr-only {\n position: absolute;\n width: 1px;\n height: 1px;\n padding: 0;\n margin: -1px;\n overflow: hidden;\n clip: rect(0, 0, 0, 0);\n white-space: nowrap;\n border-width: 0;\n }\n .absolute {\n position: absolute;\n }\n .fixed {\n position: fixed;\n }\n .relative {\n position: relative;\n }\n .inset-0 {\n inset: calc(var(--spacing) * 0);\n }\n .top-0 {\n top: calc(var(--spacing) * 0);\n }\n .top-1 {\n top: calc(var(--spacing) * 1);\n }\n .top-1\\/2 {\n top: calc(1/2 * 100%);\n }\n .bottom-full {\n bottom: 100%;\n }\n .left-0 {\n left: calc(var(--spacing) * 0);\n }\n .left-1 {\n left: calc(var(--spacing) * 1);\n }\n .left-1\\/2 {\n left: calc(1/2 * 100%);\n }\n .left-3 {\n left: calc(var(--spacing) * 3);\n }\n .z-1 {\n z-index: 1;\n }\n .z-10 {\n z-index: 10;\n }\n .z-20 {\n z-index: 20;\n }\n .z-50 {\n z-index: 50;\n }\n .m-auto {\n margin: auto;\n }\n .mt-1 {\n margin-top: calc(var(--spacing) * 1);\n }\n .mt-4 {\n margin-top: calc(var(--spacing) * 4);\n }\n .mb-1 {\n margin-bottom: calc(var(--spacing) * 1);\n }\n .mb-2 {\n margin-bottom: calc(var(--spacing) * 2);\n }\n .mb-4 {\n margin-bottom: calc(var(--spacing) * 4);\n }\n .mb-6 {\n margin-bottom: calc(var(--spacing) * 6);\n }\n .block {\n display: block;\n }\n .flex {\n display: flex;\n }\n .grid {\n display: grid;\n }\n .table {\n display: table;\n }\n .h-2 {\n height: calc(var(--spacing) * 2);\n }\n .h-3 {\n height: calc(var(--spacing) * 3);\n }\n .h-4 {\n height: calc(var(--spacing) * 4);\n }\n .h-5 {\n height: calc(var(--spacing) * 5);\n }\n .h-16 {\n height: calc(var(--spacing) * 16);\n }\n .h-32 {\n height: calc(var(--spacing) * 32);\n }\n .h-48 {\n height: calc(var(--spacing) * 48);\n }\n .h-64 {\n height: calc(var(--spacing) * 64);\n }\n .h-full {\n height: 100%;\n }\n .w-3 {\n width: calc(var(--spacing) * 3);\n }\n .w-4 {\n width: calc(var(--spacing) * 4);\n }\n .w-5 {\n width: calc(var(--spacing) * 5);\n }\n .w-16 {\n width: calc(var(--spacing) * 16);\n }\n .w-52 {\n width: calc(var(--spacing) * 52);\n }\n .w-64 {\n width: calc(var(--spacing) * 64);\n }\n .w-full {\n width: 100%;\n }\n .max-w-2xl {\n max-width: var(--container-2xl);\n }\n .max-w-3xl {\n max-width: var(--container-3xl);\n }\n .flex-1 {\n flex: 1;\n }\n .border-collapse {\n border-collapse: collapse;\n }\n .-translate-x-1 {\n --tw-translate-x: calc(var(--spacing) * -1);\n translate: var(--tw-translate-x) var(--tw-translate-y);\n }\n .-translate-x-1\\/2 {\n --tw-translate-x: calc(calc(1/2 * 100%) * -1);\n translate: var(--tw-translate-x) var(--tw-translate-y);\n }\n .-translate-y-1 {\n --tw-translate-y: calc(var(--spacing) * -1);\n translate: var(--tw-translate-x) var(--tw-translate-y);\n }\n .-translate-y-1\\/2 {\n --tw-translate-y: calc(calc(1/2 * 100%) * -1);\n translate: var(--tw-translate-x) var(--tw-translate-y);\n }\n .transform {\n transform: var(--tw-rotate-x,) var(--tw-rotate-y,) var(--tw-rotate-z,) var(--tw-skew-x,) var(--tw-skew-y,);\n }\n .animate-spin {\n animation: var(--animate-spin);\n }\n .cursor-help {\n cursor: help;\n }\n .cursor-not-allowed {\n cursor: not-allowed;\n }\n .cursor-pointer {\n cursor: pointer;\n }\n .resize {\n resize: both;\n }\n .appearance-none {\n appearance: none;\n }\n .grid-cols-1 {\n grid-template-columns: repeat(1, minmax(0, 1fr));\n }\n .grid-cols-2 {\n grid-template-columns: repeat(2, minmax(0, 1fr));\n }\n .flex-col {\n flex-direction: column;\n }\n .flex-row {\n flex-direction: row;\n }\n .items-center {\n align-items: center;\n }\n .items-start {\n align-items: flex-start;\n }\n .justify-between {\n justify-content: space-between;\n }\n .justify-center {\n justify-content: center;\n }\n .justify-start {\n justify-content: flex-start;\n }\n .gap-1 {\n gap: calc(var(--spacing) * 1);\n }\n .gap-2 {\n gap: calc(var(--spacing) * 2);\n }\n .gap-3 {\n gap: calc(var(--spacing) * 3);\n }\n .gap-4 {\n gap: calc(var(--spacing) * 4);\n }\n .gap-6 {\n gap: calc(var(--spacing) * 6);\n }\n .space-y-4 {\n :where(& > :not(:last-child)) {\n --tw-space-y-reverse: 0;\n margin-block-start: calc(calc(var(--spacing) * 4) * var(--tw-space-y-reverse));\n margin-block-end: calc(calc(var(--spacing) * 4) * calc(1 - var(--tw-space-y-reverse)));\n }\n }\n .space-y-6 {\n :where(& > :not(:last-child)) {\n --tw-space-y-reverse: 0;\n margin-block-start: calc(calc(var(--spacing) * 6) * var(--tw-space-y-reverse));\n margin-block-end: calc(calc(var(--spacing) * 6) * calc(1 - var(--tw-space-y-reverse)));\n }\n }\n .space-y-8 {\n :where(& > :not(:last-child)) {\n --tw-space-y-reverse: 0;\n margin-block-start: calc(calc(var(--spacing) * 8) * var(--tw-space-y-reverse));\n margin-block-end: calc(calc(var(--spacing) * 8) * calc(1 - var(--tw-space-y-reverse)));\n }\n }\n .rounded {\n border-radius: 0.25rem;\n }\n .rounded-2xl {\n border-radius: var(--radius-2xl);\n }\n .rounded-4xl {\n border-radius: var(--radius-4xl);\n }\n .rounded-full {\n border-radius: calc(infinity * 1px);\n }\n .rounded-lg {\n border-radius: var(--radius-lg);\n }\n .rounded-xl {\n border-radius: var(--radius-xl);\n }\n .border {\n border-style: var(--tw-border-style);\n border-width: 1px;\n }\n .border-2 {\n border-style: var(--tw-border-style);\n border-width: 2px;\n }\n .border-t {\n border-top-style: var(--tw-border-style);\n border-top-width: 1px;\n }\n .border-t-2 {\n border-top-style: var(--tw-border-style);\n border-top-width: 2px;\n }\n .border-b {\n border-bottom-style: var(--tw-border-style);\n border-bottom-width: 1px;\n }\n .border-b-2 {\n border-bottom-style: var(--tw-border-style);\n border-bottom-width: 2px;\n }\n .border-\\[\\#271200\\] {\n border-color: #271200;\n }\n .border-\\[\\#964500\\] {\n border-color: #964500;\n }\n .border-gray-200 {\n border-color: var(--color-gray-200);\n }\n .border-gray-300 {\n border-color: var(--color-gray-300);\n }\n .border-red-500 {\n border-color: var(--color-red-500);\n }\n .bg-\\[\\#271200\\] {\n background-color: #271200;\n }\n .bg-\\[\\#964500\\] {\n background-color: #964500;\n }\n .bg-\\[\\#f3ebda\\] {\n background-color: #f3ebda;\n }\n .bg-gray-50 {\n background-color: var(--color-gray-50);\n }\n .bg-gray-200 {\n background-color: var(--color-gray-200);\n }\n .bg-gray-400 {\n background-color: var(--color-gray-400);\n }\n .bg-gray-800 {\n background-color: var(--color-gray-800);\n }\n .bg-white {\n background-color: var(--color-white);\n }\n .p-2 {\n padding: calc(var(--spacing) * 2);\n }\n .p-3 {\n padding: calc(var(--spacing) * 3);\n }\n .p-4 {\n padding: calc(var(--spacing) * 4);\n }\n .p-6 {\n padding: calc(var(--spacing) * 6);\n }\n .p-8 {\n padding: calc(var(--spacing) * 8);\n }\n .p-9 {\n padding: calc(var(--spacing) * 9);\n }\n .p-10 {\n padding: calc(var(--spacing) * 10);\n }\n .px-2 {\n padding-inline: calc(var(--spacing) * 2);\n }\n .px-3 {\n padding-inline: calc(var(--spacing) * 3);\n }\n .px-4 {\n padding-inline: calc(var(--spacing) * 4);\n }\n .px-6 {\n padding-inline: calc(var(--spacing) * 6);\n }\n .py-1 {\n padding-block: calc(var(--spacing) * 1);\n }\n .py-2 {\n padding-block: calc(var(--spacing) * 2);\n }\n .py-3 {\n padding-block: calc(var(--spacing) * 3);\n }\n .pt-4 {\n padding-top: calc(var(--spacing) * 4);\n }\n .pt-6 {\n padding-top: calc(var(--spacing) * 6);\n }\n .pt-7 {\n padding-top: calc(var(--spacing) * 7);\n }\n .pr-4 {\n padding-right: calc(var(--spacing) * 4);\n }\n .pb-2 {\n padding-bottom: calc(var(--spacing) * 2);\n }\n .pb-3 {\n padding-bottom: calc(var(--spacing) * 3);\n }\n .pb-7 {\n padding-bottom: calc(var(--spacing) * 7);\n }\n .pl-10 {\n padding-left: calc(var(--spacing) * 10);\n }\n .text-center {\n text-align: center;\n }\n .text-2xl {\n font-size: var(--text-2xl);\n line-height: var(--tw-leading, var(--text-2xl--line-height));\n }\n .text-3xl {\n font-size: var(--text-3xl);\n line-height: var(--tw-leading, var(--text-3xl--line-height));\n }\n .text-lg {\n font-size: var(--text-lg);\n line-height: var(--tw-leading, var(--text-lg--line-height));\n }\n .text-sm {\n font-size: var(--text-sm);\n line-height: var(--tw-leading, var(--text-sm--line-height));\n }\n .text-xl {\n font-size: var(--text-xl);\n line-height: var(--tw-leading, var(--text-xl--line-height));\n }\n .font-bold {\n --tw-font-weight: var(--font-weight-bold);\n font-weight: var(--font-weight-bold);\n }\n .font-medium {\n --tw-font-weight: var(--font-weight-medium);\n font-weight: var(--font-weight-medium);\n }\n .font-semibold {\n --tw-font-weight: var(--font-weight-semibold);\n font-weight: var(--font-weight-semibold);\n }\n .whitespace-nowrap {\n white-space: nowrap;\n }\n .text-\\[\\#1a365d\\] {\n color: #1a365d;\n }\n .text-\\[\\#271200\\] {\n color: #271200;\n }\n .text-\\[\\#964500\\] {\n color: #964500;\n }\n .text-gray-400 {\n color: var(--color-gray-400);\n }\n .text-gray-500 {\n color: var(--color-gray-500);\n }\n .text-gray-600 {\n color: var(--color-gray-600);\n }\n .text-gray-700 {\n color: var(--color-gray-700);\n }\n .text-green-600 {\n color: var(--color-green-600);\n }\n .text-red-500 {\n color: var(--color-red-500);\n }\n .text-white {\n color: var(--color-white);\n }\n .underline {\n text-decoration-line: underline;\n }\n .accent-\\[\\#964500\\] {\n accent-color: #964500;\n }\n .opacity-0 {\n opacity: 0%;\n }\n .shadow {\n --tw-shadow: 0 1px 3px 0 var(--tw-shadow-color, rgb(0 0 0 / 0.1)), 0 1px 2px -1px var(--tw-shadow-color, rgb(0 0 0 / 0.1));\n box-shadow: var(--tw-inset-shadow), var(--tw-inset-ring-shadow), var(--tw-ring-offset-shadow), var(--tw-ring-shadow), var(--tw-shadow);\n }\n .shadow-inner {\n --tw-shadow: inset 0 2px 4px 0 var(--tw-shadow-color, rgb(0 0 0 / 0.05));\n box-shadow: var(--tw-inset-shadow), var(--tw-inset-ring-shadow), var(--tw-ring-offset-shadow), var(--tw-ring-shadow), var(--tw-shadow);\n }\n .shadow-lg {\n --tw-shadow: 0 10px 15px -3px var(--tw-shadow-color, rgb(0 0 0 / 0.1)), 0 4px 6px -4px var(--tw-shadow-color, rgb(0 0 0 / 0.1));\n box-shadow: var(--tw-inset-shadow), var(--tw-inset-ring-shadow), var(--tw-ring-offset-shadow), var(--tw-ring-shadow), var(--tw-shadow);\n }\n .outline {\n outline-style: var(--tw-outline-style);\n outline-width: 1px;\n }\n .transition-all {\n transition-property: all;\n transition-timing-function: var(--tw-ease, var(--default-transition-timing-function));\n transition-duration: var(--tw-duration, var(--default-transition-duration));\n }\n .transition-colors {\n transition-property: color, background-color, border-color, outline-color, text-decoration-color, fill, stroke, --tw-gradient-from, --tw-gradient-via, --tw-gradient-to;\n transition-timing-function: var(--tw-ease, var(--default-transition-timing-function));\n transition-duration: var(--tw-duration, var(--default-transition-duration));\n }\n .transition-opacity {\n transition-property: opacity;\n transition-timing-function: var(--tw-ease, var(--default-transition-timing-function));\n transition-duration: var(--tw-duration, var(--default-transition-duration));\n }\n .duration-200 {\n --tw-duration: 200ms;\n transition-duration: 200ms;\n }\n .ease-in-out {\n --tw-ease: var(--ease-in-out);\n transition-timing-function: var(--ease-in-out);\n }\n .select-none {\n -webkit-user-select: none;\n user-select: none;\n }\n .group-hover\\:opacity-100 {\n &:is(:where(.group):hover *) {\n @media (hover: hover) {\n opacity: 100%;\n }\n }\n }\n .peer-checked\\:bg-\\[\\#964500\\] {\n &:is(:where(.peer):checked ~ *) {\n background-color: #964500;\n }\n }\n .peer-checked\\:opacity-100 {\n &:is(:where(.peer):checked ~ *) {\n opacity: 100%;\n }\n }\n .hover\\:bg-\\[\\#7a3700\\] {\n &:hover {\n @media (hover: hover) {\n background-color: #7a3700;\n }\n }\n }\n .hover\\:bg-\\[\\#964500\\] {\n &:hover {\n @media (hover: hover) {\n background-color: #964500;\n }\n }\n }\n .focus\\:border-transparent {\n &:focus {\n border-color: transparent;\n }\n }\n .focus\\:ring-2 {\n &:focus {\n --tw-ring-shadow: var(--tw-ring-inset,) 0 0 0 calc(2px + var(--tw-ring-offset-width)) var(--tw-ring-color, currentcolor);\n box-shadow: var(--tw-inset-shadow), var(--tw-inset-ring-shadow), var(--tw-ring-offset-shadow), var(--tw-ring-shadow), var(--tw-shadow);\n }\n }\n .focus\\:ring-\\[\\#1a365d\\] {\n &:focus {\n --tw-ring-color: #1a365d;\n }\n }\n .focus\\:ring-\\[\\#964500\\] {\n &:focus {\n --tw-ring-color: #964500;\n }\n }\n .focus\\:ring-blue-500 {\n &:focus {\n --tw-ring-color: var(--color-blue-500);\n }\n }\n .focus\\:outline-none {\n &:focus {\n --tw-outline-style: none;\n outline-style: none;\n }\n }\n .md\\:grid-cols-2 {\n @media (width >= 48rem) {\n grid-template-columns: repeat(2, minmax(0, 1fr));\n }\n }\n .\\[\\&\\:\\:-moz-range-thumb\\]\\:h-4 {\n &::-moz-range-thumb {\n height: calc(var(--spacing) * 4);\n }\n }\n .\\[\\&\\:\\:-moz-range-thumb\\]\\:w-4 {\n &::-moz-range-thumb {\n width: calc(var(--spacing) * 4);\n }\n }\n .\\[\\&\\:\\:-moz-range-thumb\\]\\:appearance-none {\n &::-moz-range-thumb {\n appearance: none;\n }\n }\n .\\[\\&\\:\\:-moz-range-thumb\\]\\:rounded-full {\n &::-moz-range-thumb {\n border-radius: calc(infinity * 1px);\n }\n }\n .\\[\\&\\:\\:-moz-range-thumb\\]\\:border-0 {\n &::-moz-range-thumb {\n border-style: var(--tw-border-style);\n border-width: 0px;\n }\n }\n .\\[\\&\\:\\:-moz-range-thumb\\]\\:bg-\\[\\#964500\\] {\n &::-moz-range-thumb {\n background-color: #964500;\n }\n }\n .\\[\\&\\:\\:-moz-range-track\\]\\:bg-\\[\\#964500\\] {\n &::-moz-range-track {\n background-color: #964500;\n }\n }\n .\\[\\&\\:\\:-webkit-slider-runnable-track\\]\\:bg-\\[\\#964500\\] {\n &::-webkit-slider-runnable-track {\n background-color: #964500;\n }\n }\n .\\[\\&\\:\\:-webkit-slider-thumb\\]\\:h-4 {\n &::-webkit-slider-thumb {\n height: calc(var(--spacing) * 4);\n }\n }\n .\\[\\&\\:\\:-webkit-slider-thumb\\]\\:w-4 {\n &::-webkit-slider-thumb {\n width: calc(var(--spacing) * 4);\n }\n }\n .\\[\\&\\:\\:-webkit-slider-thumb\\]\\:appearance-none {\n &::-webkit-slider-thumb {\n appearance: none;\n }\n }\n .\\[\\&\\:\\:-webkit-slider-thumb\\]\\:rounded-full {\n &::-webkit-slider-thumb {\n border-radius: calc(infinity * 1px);\n }\n }\n .\\[\\&\\:\\:-webkit-slider-thumb\\]\\:bg-\\[\\#964500\\] {\n &::-webkit-slider-thumb {\n background-color: #964500;\n }\n }\n .\\[\\&\\>option\\:checked\\]\\:bg-\\[\\#964500\\] {\n &>option:checked {\n background-color: #964500;\n }\n }\n .\\[\\&\\>option\\:checked\\]\\:text-white {\n &>option:checked {\n color: var(--color-white);\n }\n }\n}\n@property --tw-translate-x {\n syntax: "*";\n inherits: false;\n initial-value: 0;\n}\n@property --tw-translate-y {\n syntax: "*";\n inherits: false;\n initial-value: 0;\n}\n@property --tw-translate-z {\n syntax: "*";\n inherits: false;\n initial-value: 0;\n}\n@property --tw-rotate-x {\n syntax: "*";\n inherits: false;\n}\n@property --tw-rotate-y {\n syntax: "*";\n inherits: false;\n}\n@property --tw-rotate-z {\n syntax: "*";\n inherits: false;\n}\n@property --tw-skew-x {\n syntax: "*";\n inherits: false;\n}\n@property --tw-skew-y {\n syntax: "*";\n inherits: false;\n}\n@property --tw-space-y-reverse {\n syntax: "*";\n inherits: false;\n initial-value: 0;\n}\n@property --tw-border-style {\n syntax: "*";\n inherits: false;\n initial-value: solid;\n}\n@property --tw-font-weight {\n syntax: "*";\n inherits: false;\n}\n@property --tw-shadow {\n syntax: "*";\n inherits: false;\n initial-value: 0 0 #0000;\n}\n@property --tw-shadow-color {\n syntax: "*";\n inherits: false;\n}\n@property --tw-shadow-alpha {\n syntax: "<percentage>";\n inherits: false;\n initial-value: 100%;\n}\n@property --tw-inset-shadow {\n syntax: "*";\n inherits: false;\n initial-value: 0 0 #0000;\n}\n@property --tw-inset-shadow-color {\n syntax: "*";\n inherits: false;\n}\n@property --tw-inset-shadow-alpha {\n syntax: "<percentage>";\n inherits: false;\n initial-value: 100%;\n}\n@property --tw-ring-color {\n syntax: "*";\n inherits: false;\n}\n@property --tw-ring-shadow {\n syntax: "*";\n inherits: false;\n initial-value: 0 0 #0000;\n}\n@property --tw-inset-ring-color {\n syntax: "*";\n inherits: false;\n}\n@property --tw-inset-ring-shadow {\n syntax: "*";\n inherits: false;\n initial-value: 0 0 #0000;\n}\n@property --tw-ring-inset {\n syntax: "*";\n inherits: false;\n}\n@property --tw-ring-offset-width {\n syntax: "<length>";\n inherits: false;\n initial-value: 0px;\n}\n@property --tw-ring-offset-color {\n syntax: "*";\n inherits: false;\n initial-value: #fff;\n}\n@property --tw-ring-offset-shadow {\n syntax: "*";\n inherits: false;\n initial-value: 0 0 #0000;\n}\n@property --tw-outline-style {\n syntax: "*";\n inherits: false;\n initial-value: solid;\n}\n@property --tw-duration {\n syntax: "*";\n inherits: false;\n}\n@property --tw-ease {\n syntax: "*";\n inherits: false;\n}\n@keyframes spin {\n to {\n transform: rotate(360deg);\n }\n}\n@layer properties {\n @supports ((-webkit-hyphens: none) and (not (margin-trim: inline))) or ((-moz-orient: inline) and (not (color:rgb(from red r g b)))) {\n *, ::before, ::after, ::backdrop {\n --tw-translate-x: 0;\n --tw-translate-y: 0;\n --tw-translate-z: 0;\n --tw-rotate-x: initial;\n --tw-rotate-y: initial;\n --tw-rotate-z: initial;\n --tw-skew-x: initial;\n --tw-skew-y: initial;\n --tw-space-y-reverse: 0;\n --tw-border-style: solid;\n --tw-font-weight: initial;\n --tw-shadow: 0 0 #0000;\n --tw-shadow-color: initial;\n --tw-shadow-alpha: 100%;\n --tw-inset-shadow: 0 0 #0000;\n --tw-inset-shadow-color: initial;\n --tw-inset-shadow-alpha: 100%;\n --tw-ring-color: initial;\n --tw-ring-shadow: 0 0 #0000;\n --tw-inset-ring-color: initial;\n --tw-inset-ring-shadow: 0 0 #0000;\n --tw-ring-inset: initial;\n --tw-ring-offset-width: 0px;\n --tw-ring-offset-color: #fff;\n --tw-ring-offset-shadow: 0 0 #0000;\n --tw-outline-style: solid;\n --tw-duration: initial;\n --tw-ease: initial;\n }\n }\n}\n';const xt=class{constructor(n){t(this,n)}get el(){return n(this)}apiKey=i.GOOGLE_MAPS_API_KEY;language="en";latitude=null;longitude=null;isLoaded=false;autocomplete=null;place=null;inputElement;componentWillLoad(){this.loadGoogleMapsScript()}async loadGoogleMapsScript(){try{const t=new r({apiKey:this.apiKey,libraries:["places"]});const n=await t.importLibrary("places");this.isLoaded=true;this.initializeAutocomplete(n)}catch(t){console.error("Error loading Google Maps: ",t)}}initializeAutocomplete(t){if(!this.inputElement||!this.isLoaded)return;this.autocomplete=new t.Autocomplete(this.inputElement);this.autocomplete.addListener("place_changed",(()=>{const t=this.autocomplete?.getPlace();this.latitude=t?.geometry?.location?.lat()??0;this.longitude=t?.geometry?.location?.lng()??0}))}componentDidLoad(){a({icons:{Search:c,OctagonMinus:yt,Eraser:gt,House:bt,Move:mt},nameAttr:"data-lucide"})}render(){const t=ft(this.language);return e("div",{key:"e2de3d567dad880d370e72a6e17e6a06c47bada0",class:"flex flex-col w-full h-full p-3"},e("div",{key:"fa914b7a5ff06d8c698285ecc95b2c93ea73ae91",class:"pb-3"},e("div",{key:"e3741c0e309fb7d8df547a41c22e951742e9939e",class:"relative"},e("i",{key:"274a95550c1b2a0f6f8ca254160523ee8f93a53d","data-lucide":"search",class:"absolute left-3 top-1/2 transform -translate-y-1/2 text-gray-400 "}),e("input",{key:"bb95fded65cf789d7a989458dcd7927cc3bd81cd",ref:t=>this.inputElement=t,type:"text",placeholder:t.solarExpert.searchPlaceholder,class:"w-full pl-10 pr-4 py-2 border border-gray-300 rounded-4xl focus:outline-none focus:ring-2 focus:ring-blue-500 bg-white"}))),e("map-draw",{key:"d3cfe674285a135f17a641665c3d09a1b969e607",latitude:this.latitude,longitude:this.longitude,apiKey:this.apiKey,language:this.language}))}};xt.style=wt;
26
+ /*!
27
+ * @kurkle/color v0.3.4
28
+ * https://github.com/kurkle/color#readme
29
+ * (c) 2024 Jukka Kurkela
30
+ * Released under the MIT License
31
+ */function vt(t){return t+.5|0}const kt=(t,n,e)=>Math.max(Math.min(t,e),n);function Mt(t){return kt(vt(t*2.55),0,255)}function St(t){return kt(vt(t*255),0,255)}function _t(t){return kt(vt(t/2.55)/100,0,1)}function zt(t){return kt(vt(t*100),0,100)}const Pt={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};const Ot=[..."0123456789ABCDEF"];const Ct=t=>Ot[t&15];const Dt=t=>Ot[(t&240)>>4]+Ot[t&15];const At=t=>(t&240)>>4===(t&15);const jt=t=>At(t.r)&&At(t.g)&&At(t.b)&&At(t.a);function Et(t){var n=t.length;var e;if(t[0]==="#"){if(n===4||n===5){e={r:255&Pt[t[1]]*17,g:255&Pt[t[2]]*17,b:255&Pt[t[3]]*17,a:n===5?Pt[t[4]]*17:255}}else if(n===7||n===9){e={r:Pt[t[1]]<<4|Pt[t[2]],g:Pt[t[3]]<<4|Pt[t[4]],b:Pt[t[5]]<<4|Pt[t[6]],a:n===9?Pt[t[7]]<<4|Pt[t[8]]:255}}}return e}const Lt=(t,n)=>t<255?n(t):"";function Rt(t){var n=jt(t)?Ct:Dt;return t?"#"+n(t.r)+n(t.g)+n(t.b)+Lt(t.a,n):undefined}const Nt=/^(hsla?|hwb|hsv)\(\s*([-+.e\d]+)(?:deg)?[\s,]+([-+.e\d]+)%[\s,]+([-+.e\d]+)%(?:[\s,]+([-+.e\d]+)(%)?)?\s*\)$/;function Tt(t,n,e){const i=n*Math.min(e,1-e);const s=(n,s=(n+t/30)%12)=>e-i*Math.max(Math.min(s-3,9-s,1),-1);return[s(0),s(8),s(4)]}function It(t,n,e){const i=(i,s=(i+t/60)%6)=>e-e*n*Math.max(Math.min(s,4-s,1),0);return[i(5),i(3),i(1)]}function Ft(t,n,e){const i=Tt(t,1,.5);let s;if(n+e>1){s=1/(n+e);n*=s;e*=s}for(s=0;s<3;s++){i[s]*=1-n-e;i[s]+=n}return i}function Wt(t,n,e,i,s){if(t===s){return(n-e)/i+(n<e?6:0)}if(n===s){return(e-t)/i+2}return(t-n)/i+4}function Bt(t){const n=255;const e=t.r/n;const i=t.g/n;const s=t.b/n;const o=Math.max(e,i,s);const r=Math.min(e,i,s);const a=(o+r)/2;let c,l,h;if(o!==r){h=o-r;l=a>.5?h/(2-o-r):h/(o+r);c=Wt(e,i,s,h,o);c=c*60+.5}return[c|0,l||0,a]}function Ht(t,n,e,i){return(Array.isArray(n)?t(n[0],n[1],n[2]):t(n,e,i)).map(St)}function $t(t,n,e){return Ht(Tt,t,n,e)}function Vt(t,n,e){return Ht(Ft,t,n,e)}function Yt(t,n,e){return Ht(It,t,n,e)}function Ut(t){return(t%360+360)%360}function Xt(t){const n=Nt.exec(t);let e=255;let i;if(!n){return}if(n[5]!==i){e=n[6]?Mt(+n[5]):St(+n[5])}const s=Ut(+n[2]);const o=+n[3]/100;const r=+n[4]/100;if(n[1]==="hwb"){i=Vt(s,o,r)}else if(n[1]==="hsv"){i=Yt(s,o,r)}else{i=$t(s,o,r)}return{r:i[0],g:i[1],b:i[2],a:e}}function Kt(t,n){var e=Bt(t);e[0]=Ut(e[0]+n);e=$t(e);t.r=e[0];t.g=e[1];t.b=e[2]}function qt(t){if(!t){return}const n=Bt(t);const e=n[0];const i=zt(n[1]);const s=zt(n[2]);return t.a<255?`hsla(${e}, ${i}%, ${s}%, ${_t(t.a)})`:`hsl(${e}, ${i}%, ${s}%)`}const Zt={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"};const Jt={OiceXe:"f0f8ff",antiquewEte:"faebd7",aqua:"ffff",aquamarRe:"7fffd4",azuY:"f0ffff",beige:"f5f5dc",bisque:"ffe4c4",black:"0",blanKedOmond:"ffebcd",Xe:"ff",XeviTet:"8a2be2",bPwn:"a52a2a",burlywood:"deb887",caMtXe:"5f9ea0",KartYuse:"7fff00",KocTate:"d2691e",cSO:"ff7f50",cSnflowerXe:"6495ed",cSnsilk:"fff8dc",crimson:"dc143c",cyan:"ffff",xXe:"8b",xcyan:"8b8b",xgTMnPd:"b8860b",xWay:"a9a9a9",xgYF:"6400",xgYy:"a9a9a9",xkhaki:"bdb76b",xmagFta:"8b008b",xTivegYF:"556b2f",xSange:"ff8c00",xScEd:"9932cc",xYd:"8b0000",xsOmon:"e9967a",xsHgYF:"8fbc8f",xUXe:"483d8b",xUWay:"2f4f4f",xUgYy:"2f4f4f",xQe:"ced1",xviTet:"9400d3",dAppRk:"ff1493",dApskyXe:"bfff",dimWay:"696969",dimgYy:"696969",dodgerXe:"1e90ff",fiYbrick:"b22222",flSOwEte:"fffaf0",foYstWAn:"228b22",fuKsia:"ff00ff",gaRsbSo:"dcdcdc",ghostwEte:"f8f8ff",gTd:"ffd700",gTMnPd:"daa520",Way:"808080",gYF:"8000",gYFLw:"adff2f",gYy:"808080",honeyMw:"f0fff0",hotpRk:"ff69b4",RdianYd:"cd5c5c",Rdigo:"4b0082",ivSy:"fffff0",khaki:"f0e68c",lavFMr:"e6e6fa",lavFMrXsh:"fff0f5",lawngYF:"7cfc00",NmoncEffon:"fffacd",ZXe:"add8e6",ZcSO:"f08080",Zcyan:"e0ffff",ZgTMnPdLw:"fafad2",ZWay:"d3d3d3",ZgYF:"90ee90",ZgYy:"d3d3d3",ZpRk:"ffb6c1",ZsOmon:"ffa07a",ZsHgYF:"20b2aa",ZskyXe:"87cefa",ZUWay:"778899",ZUgYy:"778899",ZstAlXe:"b0c4de",ZLw:"ffffe0",lime:"ff00",limegYF:"32cd32",lRF:"faf0e6",magFta:"ff00ff",maPon:"800000",VaquamarRe:"66cdaa",VXe:"cd",VScEd:"ba55d3",VpurpN:"9370db",VsHgYF:"3cb371",VUXe:"7b68ee",VsprRggYF:"fa9a",VQe:"48d1cc",VviTetYd:"c71585",midnightXe:"191970",mRtcYam:"f5fffa",mistyPse:"ffe4e1",moccasR:"ffe4b5",navajowEte:"ffdead",navy:"80",Tdlace:"fdf5e6",Tive:"808000",TivedBb:"6b8e23",Sange:"ffa500",SangeYd:"ff4500",ScEd:"da70d6",pOegTMnPd:"eee8aa",pOegYF:"98fb98",pOeQe:"afeeee",pOeviTetYd:"db7093",papayawEp:"ffefd5",pHKpuff:"ffdab9",peru:"cd853f",pRk:"ffc0cb",plum:"dda0dd",powMrXe:"b0e0e6",purpN:"800080",YbeccapurpN:"663399",Yd:"ff0000",Psybrown:"bc8f8f",PyOXe:"4169e1",saddNbPwn:"8b4513",sOmon:"fa8072",sandybPwn:"f4a460",sHgYF:"2e8b57",sHshell:"fff5ee",siFna:"a0522d",silver:"c0c0c0",skyXe:"87ceeb",UXe:"6a5acd",UWay:"708090",UgYy:"708090",snow:"fffafa",sprRggYF:"ff7f",stAlXe:"4682b4",tan:"d2b48c",teO:"8080",tEstN:"d8bfd8",tomato:"ff6347",Qe:"40e0d0",viTet:"ee82ee",JHt:"f5deb3",wEte:"ffffff",wEtesmoke:"f5f5f5",Lw:"ffff00",LwgYF:"9acd32"};function Qt(){const t={};const n=Object.keys(Jt);const e=Object.keys(Zt);let i,s,o,r,a;for(i=0;i<n.length;i++){r=a=n[i];for(s=0;s<e.length;s++){o=e[s];a=a.replace(o,Zt[o])}o=parseInt(Jt[r],16);t[a]=[o>>16&255,o>>8&255,o&255]}return t}let Gt;function tn(t){if(!Gt){Gt=Qt();Gt.transparent=[0,0,0,0]}const n=Gt[t.toLowerCase()];return n&&{r:n[0],g:n[1],b:n[2],a:n.length===4?n[3]:255}}const nn=/^rgba?\(\s*([-+.\d]+)(%)?[\s,]+([-+.e\d]+)(%)?[\s,]+([-+.e\d]+)(%)?(?:[\s,/]+([-+.e\d]+)(%)?)?\s*\)$/;function en(t){const n=nn.exec(t);let e=255;let i,s,o;if(!n){return}if(n[7]!==i){const t=+n[7];e=n[8]?Mt(t):kt(t*255,0,255)}i=+n[1];s=+n[3];o=+n[5];i=255&(n[2]?Mt(i):kt(i,0,255));s=255&(n[4]?Mt(s):kt(s,0,255));o=255&(n[6]?Mt(o):kt(o,0,255));return{r:i,g:s,b:o,a:e}}function sn(t){return t&&(t.a<255?`rgba(${t.r}, ${t.g}, ${t.b}, ${_t(t.a)})`:`rgb(${t.r}, ${t.g}, ${t.b})`)}const on=t=>t<=.0031308?t*12.92:Math.pow(t,1/2.4)*1.055-.055;const rn=t=>t<=.04045?t/12.92:Math.pow((t+.055)/1.055,2.4);function an(t,n,e){const i=rn(_t(t.r));const s=rn(_t(t.g));const o=rn(_t(t.b));return{r:St(on(i+e*(rn(_t(n.r))-i))),g:St(on(s+e*(rn(_t(n.g))-s))),b:St(on(o+e*(rn(_t(n.b))-o))),a:t.a+e*(n.a-t.a)}}function cn(t,n,e){if(t){let i=Bt(t);i[n]=Math.max(0,Math.min(i[n]+i[n]*e,n===0?360:1));i=$t(i);t.r=i[0];t.g=i[1];t.b=i[2]}}function ln(t,n){return t?Object.assign(n||{},t):t}function hn(t){var n={r:0,g:0,b:0,a:255};if(Array.isArray(t)){if(t.length>=3){n={r:t[0],g:t[1],b:t[2],a:255};if(t.length>3){n.a=St(t[3])}}}else{n=ln(t,{r:0,g:0,b:0,a:1});n.a=St(n.a)}return n}function fn(t){if(t.charAt(0)==="r"){return en(t)}return Xt(t)}class un{constructor(t){if(t instanceof un){return t}const n=typeof t;let e;if(n==="object"){e=hn(t)}else if(n==="string"){e=Et(t)||tn(t)||fn(t)}this._rgb=e;this._valid=!!e}get valid(){return this._valid}get rgb(){var t=ln(this._rgb);if(t){t.a=_t(t.a)}return t}set rgb(t){this._rgb=hn(t)}rgbString(){return this._valid?sn(this._rgb):undefined}hexString(){return this._valid?Rt(this._rgb):undefined}hslString(){return this._valid?qt(this._rgb):undefined}mix(t,n){if(t){const e=this.rgb;const i=t.rgb;let s;const o=n===s?.5:n;const r=2*o-1;const a=e.a-i.a;const c=((r*a===-1?r:(r+a)/(1+r*a))+1)/2;s=1-c;e.r=255&c*e.r+s*i.r+.5;e.g=255&c*e.g+s*i.g+.5;e.b=255&c*e.b+s*i.b+.5;e.a=o*e.a+(1-o)*i.a;this.rgb=e}return this}interpolate(t,n){if(t){this._rgb=an(this._rgb,t._rgb,n)}return this}clone(){return new un(this.rgb)}alpha(t){this._rgb.a=St(t);return this}clearer(t){const n=this._rgb;n.a*=1-t;return this}greyscale(){const t=this._rgb;const n=vt(t.r*.3+t.g*.59+t.b*.11);t.r=t.g=t.b=n;return this}opaquer(t){const n=this._rgb;n.a*=1+t;return this}negate(){const t=this._rgb;t.r=255-t.r;t.g=255-t.g;t.b=255-t.b;return this}lighten(t){cn(this._rgb,2,t);return this}darken(t){cn(this._rgb,2,-t);return this}saturate(t){cn(this._rgb,1,t);return this}desaturate(t){cn(this._rgb,1,-t);return this}rotate(t){Kt(this._rgb,t);return this}}
32
+ /*!
33
+ * Chart.js v4.4.9
34
+ * https://www.chartjs.org
35
+ * (c) 2025 Chart.js Contributors
36
+ * Released under the MIT License
37
+ */function dn(){}const pn=(()=>{let t=0;return()=>t++})();function gn(t){return t===null||t===undefined}function bn(t){if(Array.isArray&&Array.isArray(t)){return true}const n=Object.prototype.toString.call(t);if(n.slice(0,7)==="[object"&&n.slice(-6)==="Array]"){return true}return false}function mn(t){return t!==null&&Object.prototype.toString.call(t)==="[object Object]"}function yn(t){return(typeof t==="number"||t instanceof Number)&&isFinite(+t)}function wn(t,n){return yn(t)?t:n}function xn(t,n){return typeof t==="undefined"?n:t}const vn=(t,n)=>typeof t==="string"&&t.endsWith("%")?parseFloat(t)/100:+t/n;const kn=(t,n)=>typeof t==="string"&&t.endsWith("%")?parseFloat(t)/100*n:+t;function Mn(t,n,e){if(t&&typeof t.call==="function"){return t.apply(e,n)}}function Sn(t,n,e,i){let s,o,r;if(bn(t)){o=t.length;{for(s=0;s<o;s++){n.call(e,t[s],s)}}}else if(mn(t)){r=Object.keys(t);o=r.length;for(s=0;s<o;s++){n.call(e,t[r[s]],r[s])}}}function _n(t,n){let e,i,s,o;if(!t||!n||t.length!==n.length){return false}for(e=0,i=t.length;e<i;++e){s=t[e];o=n[e];if(s.datasetIndex!==o.datasetIndex||s.index!==o.index){return false}}return true}function zn(t){if(bn(t)){return t.map(zn)}if(mn(t)){const n=Object.create(null);const e=Object.keys(t);const i=e.length;let s=0;for(;s<i;++s){n[e[s]]=zn(t[e[s]])}return n}return t}function Pn(t){return["__proto__","prototype","constructor"].indexOf(t)===-1}function On(t,n,e,i){if(!Pn(t)){return}const s=n[t];const o=e[t];if(mn(s)&&mn(o)){Cn(s,o,i)}else{n[t]=zn(o)}}function Cn(t,n,e){const i=bn(n)?n:[n];const s=i.length;if(!mn(t)){return t}e=e||{};const o=e.merger||On;let r;for(let n=0;n<s;++n){r=i[n];if(!mn(r)){continue}const s=Object.keys(r);for(let n=0,i=s.length;n<i;++n){o(s[n],t,r,e)}}return t}function Dn(t,n){return Cn(t,n,{merger:An})}function An(t,n,e){if(!Pn(t)){return}const i=n[t];const s=e[t];if(mn(i)&&mn(s)){Dn(i,s)}else if(!Object.prototype.hasOwnProperty.call(n,t)){n[t]=zn(s)}}const jn={"":t=>t,x:t=>t.x,y:t=>t.y};function En(t){const n=t.split(".");const e=[];let i="";for(const t of n){i+=t;if(i.endsWith("\\")){i=i.slice(0,-1)+"."}else{e.push(i);i=""}}return e}function Ln(t){const n=En(t);return t=>{for(const e of n){if(e===""){break}t=t&&t[e]}return t}}function Rn(t,n){const e=jn[n]||(jn[n]=Ln(n));return e(t)}function Nn(t){return t.charAt(0).toUpperCase()+t.slice(1)}const Tn=t=>typeof t!=="undefined";const In=t=>typeof t==="function";const Fn=(t,n)=>{if(t.size!==n.size){return false}for(const e of t){if(!n.has(e)){return false}}return true};function Wn(t){return t.type==="mouseup"||t.type==="click"||t.type==="contextmenu"}const Bn=Math.PI;const Hn=2*Bn;const $n=Hn+Bn;const Vn=Number.POSITIVE_INFINITY;const Yn=Bn/180;const Un=Bn/2;const Xn=Bn/4;const Kn=Bn*2/3;const qn=Math.log10;const Zn=Math.sign;function Jn(t,n,e){return Math.abs(t-n)<e}function Qn(t){const n=Math.round(t);t=Jn(t,n,t/1e3)?n:t;const e=Math.pow(10,Math.floor(qn(t)));const i=t/e;const s=i<=1?1:i<=2?2:i<=5?5:10;return s*e}function Gn(t){const n=[];const e=Math.sqrt(t);let i;for(i=1;i<e;i++){if(t%i===0){n.push(i);n.push(t/i)}}if(e===(e|0)){n.push(e)}n.sort(((t,n)=>t-n)).pop();return n}function te(t){return typeof t==="symbol"||typeof t==="object"&&t!==null&&!(Symbol.toPrimitive in t||"toString"in t||"valueOf"in t)}function ne(t){return!te(t)&&!isNaN(parseFloat(t))&&isFinite(t)}function ee(t,n){const e=Math.round(t);return e-n<=t&&e+n>=t}function ie(t,n,e){let i,s,o;for(i=0,s=t.length;i<s;i++){o=t[i][e];if(!isNaN(o)){n.min=Math.min(n.min,o);n.max=Math.max(n.max,o)}}}function se(t){return t*(Bn/180)}function oe(t){return t*(180/Bn)}function re(t){if(!yn(t)){return}let n=1;let e=0;while(Math.round(t*n)/n!==t){n*=10;e++}return e}function ae(t,n){const e=n.x-t.x;const i=n.y-t.y;const s=Math.sqrt(e*e+i*i);let o=Math.atan2(i,e);if(o<-.5*Bn){o+=Hn}return{angle:o,distance:s}}function ce(t,n){return Math.sqrt(Math.pow(n.x-t.x,2)+Math.pow(n.y-t.y,2))}function le(t,n){return(t-n+$n)%Hn-Bn}function he(t){return(t%Hn+Hn)%Hn}function fe(t,n,e,i){const s=he(t);const o=he(n);const r=he(e);const a=he(o-s);const c=he(r-s);const l=he(s-o);const h=he(s-r);return s===o||s===r||i&&o===r||a>c&&l<h}function ue(t,n,e){return Math.max(n,Math.min(e,t))}function de(t){return ue(t,-32768,32767)}function pe(t,n,e,i=1e-6){return t>=Math.min(n,e)-i&&t<=Math.max(n,e)+i}function ge(t,n,e){e=e||(e=>t[e]<n);let i=t.length-1;let s=0;let o;while(i-s>1){o=s+i>>1;if(e(o)){s=o}else{i=o}}return{lo:s,hi:i}}const be=(t,n,e,i)=>ge(t,e,i?i=>{const s=t[i][n];return s<e||s===e&&t[i+1][n]===e}:i=>t[i][n]<e);const me=(t,n,e)=>ge(t,e,(i=>t[i][n]>=e));function ye(t,n,e){let i=0;let s=t.length;while(i<s&&t[i]<n){i++}while(s>i&&t[s-1]>e){s--}return i>0||s<t.length?t.slice(i,s):t}const we=["push","pop","shift","splice","unshift"];function xe(t,n){if(t._chartjs){t._chartjs.listeners.push(n);return}Object.defineProperty(t,"_chartjs",{configurable:true,enumerable:false,value:{listeners:[n]}});we.forEach((n=>{const e="_onData"+Nn(n);const i=t[n];Object.defineProperty(t,n,{configurable:true,enumerable:false,value(...n){const s=i.apply(this,n);t._chartjs.listeners.forEach((t=>{if(typeof t[e]==="function"){t[e](...n)}}));return s}})}))}function ve(t,n){const e=t._chartjs;if(!e){return}const i=e.listeners;const s=i.indexOf(n);if(s!==-1){i.splice(s,1)}if(i.length>0){return}we.forEach((n=>{delete t[n]}));delete t._chartjs}function ke(t){const n=new Set(t);if(n.size===t.length){return t}return Array.from(n)}const Me=function(){if(typeof window==="undefined"){return function(t){return t()}}return window.requestAnimationFrame}();function Se(t,n){let e=[];let i=false;return function(...s){e=s;if(!i){i=true;Me.call(window,(()=>{i=false;t.apply(n,e)}))}}}function _e(t,n){let e;return function(...i){if(n){clearTimeout(e);e=setTimeout(t,n,i)}else{t.apply(this,i)}return n}}const ze=t=>t==="start"?"left":t==="end"?"right":"center";const Pe=(t,n,e)=>t==="start"?n:t==="end"?e:(n+e)/2;const Oe=(t,n,e,i)=>{const s=i?"left":"right";return t===s?e:t==="center"?(n+e)/2:n};function Ce(t,n,e){const i=n.length;let s=0;let o=i;if(t._sorted){const{iScale:r,vScale:a,_parsed:c}=t;const l=t.dataset?t.dataset.options?t.dataset.options.spanGaps:null:null;const h=r.axis;const{min:f,max:u,minDefined:d,maxDefined:p}=r.getUserBounds();if(d){s=Math.min(be(c,h,f).lo,e?i:be(n,h,r.getPixelForValue(f)).lo);if(l){const t=c.slice(0,s+1).reverse().findIndex((t=>!gn(t[a.axis])));s-=Math.max(0,t)}s=ue(s,0,i-1)}if(p){let t=Math.max(be(c,r.axis,u,true).hi+1,e?0:be(n,h,r.getPixelForValue(u),true).hi+1);if(l){const n=c.slice(t-1).findIndex((t=>!gn(t[a.axis])));t+=Math.max(0,n)}o=ue(t,s,i)-s}else{o=i-s}}return{start:s,count:o}}function De(t){const{xScale:n,yScale:e,_scaleRanges:i}=t;const s={xmin:n.min,xmax:n.max,ymin:e.min,ymax:e.max};if(!i){t._scaleRanges=s;return true}const o=i.xmin!==n.min||i.xmax!==n.max||i.ymin!==e.min||i.ymax!==e.max;Object.assign(i,s);return o}const Ae=t=>t===0||t===1;const je=(t,n,e)=>-(Math.pow(2,10*(t-=1))*Math.sin((t-n)*Hn/e));const Ee=(t,n,e)=>Math.pow(2,-10*t)*Math.sin((t-n)*Hn/e)+1;const Le={linear:t=>t,easeInQuad:t=>t*t,easeOutQuad:t=>-t*(t-2),easeInOutQuad:t=>(t/=.5)<1?.5*t*t:-.5*(--t*(t-2)-1),easeInCubic:t=>t*t*t,easeOutCubic:t=>(t-=1)*t*t+1,easeInOutCubic:t=>(t/=.5)<1?.5*t*t*t:.5*((t-=2)*t*t+2),easeInQuart:t=>t*t*t*t,easeOutQuart:t=>-((t-=1)*t*t*t-1),easeInOutQuart:t=>(t/=.5)<1?.5*t*t*t*t:-.5*((t-=2)*t*t*t-2),easeInQuint:t=>t*t*t*t*t,easeOutQuint:t=>(t-=1)*t*t*t*t+1,easeInOutQuint:t=>(t/=.5)<1?.5*t*t*t*t*t:.5*((t-=2)*t*t*t*t+2),easeInSine:t=>-Math.cos(t*Un)+1,easeOutSine:t=>Math.sin(t*Un),easeInOutSine:t=>-.5*(Math.cos(Bn*t)-1),easeInExpo:t=>t===0?0:Math.pow(2,10*(t-1)),easeOutExpo:t=>t===1?1:-Math.pow(2,-10*t)+1,easeInOutExpo:t=>Ae(t)?t:t<.5?.5*Math.pow(2,10*(t*2-1)):.5*(-Math.pow(2,-10*(t*2-1))+2),easeInCirc:t=>t>=1?t:-(Math.sqrt(1-t*t)-1),easeOutCirc:t=>Math.sqrt(1-(t-=1)*t),easeInOutCirc:t=>(t/=.5)<1?-.5*(Math.sqrt(1-t*t)-1):.5*(Math.sqrt(1-(t-=2)*t)+1),easeInElastic:t=>Ae(t)?t:je(t,.075,.3),easeOutElastic:t=>Ae(t)?t:Ee(t,.075,.3),easeInOutElastic(t){const n=.1125;const e=.45;return Ae(t)?t:t<.5?.5*je(t*2,n,e):.5+.5*Ee(t*2-1,n,e)},easeInBack(t){const n=1.70158;return t*t*((n+1)*t-n)},easeOutBack(t){const n=1.70158;return(t-=1)*t*((n+1)*t+n)+1},easeInOutBack(t){let n=1.70158;if((t/=.5)<1){return.5*(t*t*(((n*=1.525)+1)*t-n))}return.5*((t-=2)*t*(((n*=1.525)+1)*t+n)+2)},easeInBounce:t=>1-Le.easeOutBounce(1-t),easeOutBounce(t){const n=7.5625;const e=2.75;if(t<1/e){return n*t*t}if(t<2/e){return n*(t-=1.5/e)*t+.75}if(t<2.5/e){return n*(t-=2.25/e)*t+.9375}return n*(t-=2.625/e)*t+.984375},easeInOutBounce:t=>t<.5?Le.easeInBounce(t*2)*.5:Le.easeOutBounce(t*2-1)*.5+.5};function Re(t){if(t&&typeof t==="object"){const n=t.toString();return n==="[object CanvasPattern]"||n==="[object CanvasGradient]"}return false}function Ne(t){return Re(t)?t:new un(t)}function Te(t){return Re(t)?t:new un(t).saturate(.5).darken(.1).hexString()}const Ie=["x","y","borderWidth","radius","tension"];const Fe=["color","borderColor","backgroundColor"];function We(t){t.set("animation",{delay:undefined,duration:1e3,easing:"easeOutQuart",fn:undefined,from:undefined,loop:undefined,to:undefined,type:undefined});t.describe("animation",{_fallback:false,_indexable:false,_scriptable:t=>t!=="onProgress"&&t!=="onComplete"&&t!=="fn"});t.set("animations",{colors:{type:"color",properties:Fe},numbers:{type:"number",properties:Ie}});t.describe("animations",{_fallback:"animation"});t.set("transitions",{active:{animation:{duration:400}},resize:{animation:{duration:0}},show:{animations:{colors:{from:"transparent"},visible:{type:"boolean",duration:0}}},hide:{animations:{colors:{to:"transparent"},visible:{type:"boolean",easing:"linear",fn:t=>t|0}}}})}function Be(t){t.set("layout",{autoPadding:true,padding:{top:0,right:0,bottom:0,left:0}})}const He=new Map;function $e(t,n){n=n||{};const e=t+JSON.stringify(n);let i=He.get(e);if(!i){i=new Intl.NumberFormat(t,n);He.set(e,i)}return i}function Ve(t,n,e){return $e(n,e).format(t)}const Ye={values(t){return bn(t)?t:""+t},numeric(t,n,e){if(t===0){return"0"}const i=this.chart.options.locale;let s;let o=t;if(e.length>1){const n=Math.max(Math.abs(e[0].value),Math.abs(e[e.length-1].value));if(n<1e-4||n>1e15){s="scientific"}o=Ue(t,e)}const r=qn(Math.abs(o));const a=isNaN(r)?1:Math.max(Math.min(-1*Math.floor(r),20),0);const c={notation:s,minimumFractionDigits:a,maximumFractionDigits:a};Object.assign(c,this.options.ticks.format);return Ve(t,i,c)},logarithmic(t,n,e){if(t===0){return"0"}const i=e[n].significand||t/Math.pow(10,Math.floor(qn(t)));if([1,2,3,5,10,15].includes(i)||n>.8*e.length){return Ye.numeric.call(this,t,n,e)}return""}};function Ue(t,n){let e=n.length>3?n[2].value-n[1].value:n[1].value-n[0].value;if(Math.abs(e)>=1&&t!==Math.floor(t)){e=t-Math.floor(t)}return e}var Xe={formatters:Ye};function Ke(t){t.set("scale",{display:true,offset:false,reverse:false,beginAtZero:false,bounds:"ticks",clip:true,grace:0,grid:{display:true,lineWidth:1,drawOnChartArea:true,drawTicks:true,tickLength:8,tickWidth:(t,n)=>n.lineWidth,tickColor:(t,n)=>n.color,offset:false},border:{display:true,dash:[],dashOffset:0,width:1},title:{display:false,text:"",padding:{top:4,bottom:4}},ticks:{minRotation:0,maxRotation:50,mirror:false,textStrokeWidth:0,textStrokeColor:"",padding:3,display:true,autoSkip:true,autoSkipPadding:3,labelOffset:0,callback:Xe.formatters.values,minor:{},major:{},align:"center",crossAlign:"near",showLabelBackdrop:false,backdropColor:"rgba(255, 255, 255, 0.75)",backdropPadding:2}});t.route("scale.ticks","color","","color");t.route("scale.grid","color","","borderColor");t.route("scale.border","color","","borderColor");t.route("scale.title","color","","color");t.describe("scale",{_fallback:false,_scriptable:t=>!t.startsWith("before")&&!t.startsWith("after")&&t!=="callback"&&t!=="parser",_indexable:t=>t!=="borderDash"&&t!=="tickBorderDash"&&t!=="dash"});t.describe("scales",{_fallback:"scale"});t.describe("scale.ticks",{_scriptable:t=>t!=="backdropPadding"&&t!=="callback",_indexable:t=>t!=="backdropPadding"})}const qe=Object.create(null);const Ze=Object.create(null);function Je(t,n){if(!n){return t}const e=n.split(".");for(let n=0,i=e.length;n<i;++n){const i=e[n];t=t[i]||(t[i]=Object.create(null))}return t}function Qe(t,n,e){if(typeof n==="string"){return Cn(Je(t,n),e)}return Cn(Je(t,""),n)}class Ge{constructor(t,n){this.animation=undefined;this.backgroundColor="rgba(0,0,0,0.1)";this.borderColor="rgba(0,0,0,0.1)";this.color="#666";this.datasets={};this.devicePixelRatio=t=>t.chart.platform.getDevicePixelRatio();this.elements={};this.events=["mousemove","mouseout","click","touchstart","touchmove"];this.font={family:"'Helvetica Neue', 'Helvetica', 'Arial', sans-serif",size:12,style:"normal",lineHeight:1.2,weight:null};this.hover={};this.hoverBackgroundColor=(t,n)=>Te(n.backgroundColor);this.hoverBorderColor=(t,n)=>Te(n.borderColor);this.hoverColor=(t,n)=>Te(n.color);this.indexAxis="x";this.interaction={mode:"nearest",intersect:true,includeInvisible:false};this.maintainAspectRatio=true;this.onHover=null;this.onClick=null;this.parsing=true;this.plugins={};this.responsive=true;this.scale=undefined;this.scales={};this.showLine=true;this.drawActiveElementsOnTop=true;this.describe(t);this.apply(n)}set(t,n){return Qe(this,t,n)}get(t){return Je(this,t)}describe(t,n){return Qe(Ze,t,n)}override(t,n){return Qe(qe,t,n)}route(t,n,e,i){const s=Je(this,t);const o=Je(this,e);const r="_"+n;Object.defineProperties(s,{[r]:{value:s[n],writable:true},[n]:{enumerable:true,get(){const t=this[r];const n=o[i];if(mn(t)){return Object.assign({},n,t)}return xn(t,n)},set(t){this[r]=t}}})}apply(t){t.forEach((t=>t(this)))}}var ti=new Ge({_scriptable:t=>!t.startsWith("on"),_indexable:t=>t!=="events",hover:{_fallback:"interaction"},interaction:{_scriptable:false,_indexable:false}},[We,Be,Ke]);function ni(t){if(!t||gn(t.size)||gn(t.family)){return null}return(t.style?t.style+" ":"")+(t.weight?t.weight+" ":"")+t.size+"px "+t.family}function ei(t,n,e,i,s){let o=n[s];if(!o){o=n[s]=t.measureText(s).width;e.push(s)}if(o>i){i=o}return i}function ii(t,n,e,i){i=i||{};let s=i.data=i.data||{};let o=i.garbageCollect=i.garbageCollect||[];if(i.font!==n){s=i.data={};o=i.garbageCollect=[];i.font=n}t.save();t.font=n;let r=0;const a=e.length;let c,l,h,f,u;for(c=0;c<a;c++){f=e[c];if(f!==undefined&&f!==null&&!bn(f)){r=ei(t,s,o,r,f)}else if(bn(f)){for(l=0,h=f.length;l<h;l++){u=f[l];if(u!==undefined&&u!==null&&!bn(u)){r=ei(t,s,o,r,u)}}}}t.restore();const d=o.length/2;if(d>e.length){for(c=0;c<d;c++){delete s[o[c]]}o.splice(0,d)}return r}function si(t,n,e){const i=t.currentDevicePixelRatio;const s=e!==0?Math.max(e/2,.5):0;return Math.round((n-s)*i)/i+s}function oi(t,n){if(!n&&!t){return}n=n||t.getContext("2d");n.save();n.resetTransform();n.clearRect(0,0,t.width,t.height);n.restore()}function ri(t,n,e,i){ai(t,n,e,i,null)}function ai(t,n,e,i,s){let o,r,a,c,l,h,f,u;const d=n.pointStyle;const p=n.rotation;const g=n.radius;let b=(p||0)*Yn;if(d&&typeof d==="object"){o=d.toString();if(o==="[object HTMLImageElement]"||o==="[object HTMLCanvasElement]"){t.save();t.translate(e,i);t.rotate(b);t.drawImage(d,-d.width/2,-d.height/2,d.width,d.height);t.restore();return}}if(isNaN(g)||g<=0){return}t.beginPath();switch(d){default:if(s){t.ellipse(e,i,s/2,g,0,0,Hn)}else{t.arc(e,i,g,0,Hn)}t.closePath();break;case"triangle":h=s?s/2:g;t.moveTo(e+Math.sin(b)*h,i-Math.cos(b)*g);b+=Kn;t.lineTo(e+Math.sin(b)*h,i-Math.cos(b)*g);b+=Kn;t.lineTo(e+Math.sin(b)*h,i-Math.cos(b)*g);t.closePath();break;case"rectRounded":l=g*.516;c=g-l;r=Math.cos(b+Xn)*c;f=Math.cos(b+Xn)*(s?s/2-l:c);a=Math.sin(b+Xn)*c;u=Math.sin(b+Xn)*(s?s/2-l:c);t.arc(e-f,i-a,l,b-Bn,b-Un);t.arc(e+u,i-r,l,b-Un,b);t.arc(e+f,i+a,l,b,b+Un);t.arc(e-u,i+r,l,b+Un,b+Bn);t.closePath();break;case"rect":if(!p){c=Math.SQRT1_2*g;h=s?s/2:c;t.rect(e-h,i-c,2*h,2*c);break}b+=Xn;case"rectRot":f=Math.cos(b)*(s?s/2:g);r=Math.cos(b)*g;a=Math.sin(b)*g;u=Math.sin(b)*(s?s/2:g);t.moveTo(e-f,i-a);t.lineTo(e+u,i-r);t.lineTo(e+f,i+a);t.lineTo(e-u,i+r);t.closePath();break;case"crossRot":b+=Xn;case"cross":f=Math.cos(b)*(s?s/2:g);r=Math.cos(b)*g;a=Math.sin(b)*g;u=Math.sin(b)*(s?s/2:g);t.moveTo(e-f,i-a);t.lineTo(e+f,i+a);t.moveTo(e+u,i-r);t.lineTo(e-u,i+r);break;case"star":f=Math.cos(b)*(s?s/2:g);r=Math.cos(b)*g;a=Math.sin(b)*g;u=Math.sin(b)*(s?s/2:g);t.moveTo(e-f,i-a);t.lineTo(e+f,i+a);t.moveTo(e+u,i-r);t.lineTo(e-u,i+r);b+=Xn;f=Math.cos(b)*(s?s/2:g);r=Math.cos(b)*g;a=Math.sin(b)*g;u=Math.sin(b)*(s?s/2:g);t.moveTo(e-f,i-a);t.lineTo(e+f,i+a);t.moveTo(e+u,i-r);t.lineTo(e-u,i+r);break;case"line":r=s?s/2:Math.cos(b)*g;a=Math.sin(b)*g;t.moveTo(e-r,i-a);t.lineTo(e+r,i+a);break;case"dash":t.moveTo(e,i);t.lineTo(e+Math.cos(b)*(s?s/2:g),i+Math.sin(b)*g);break;case false:t.closePath();break}t.fill();if(n.borderWidth>0){t.stroke()}}function ci(t,n,e){e=e||.5;return!n||t&&t.x>n.left-e&&t.x<n.right+e&&t.y>n.top-e&&t.y<n.bottom+e}function li(t,n){t.save();t.beginPath();t.rect(n.left,n.top,n.right-n.left,n.bottom-n.top);t.clip()}function hi(t){t.restore()}function fi(t,n,e,i,s){if(!n){return t.lineTo(e.x,e.y)}if(s==="middle"){const i=(n.x+e.x)/2;t.lineTo(i,n.y);t.lineTo(i,e.y)}else if(s==="after"!==!!i){t.lineTo(n.x,e.y)}else{t.lineTo(e.x,n.y)}t.lineTo(e.x,e.y)}function ui(t,n,e,i){if(!n){return t.lineTo(e.x,e.y)}t.bezierCurveTo(i?n.cp1x:n.cp2x,i?n.cp1y:n.cp2y,i?e.cp2x:e.cp1x,i?e.cp2y:e.cp1y,e.x,e.y)}function di(t,n){if(n.translation){t.translate(n.translation[0],n.translation[1])}if(!gn(n.rotation)){t.rotate(n.rotation)}if(n.color){t.fillStyle=n.color}if(n.textAlign){t.textAlign=n.textAlign}if(n.textBaseline){t.textBaseline=n.textBaseline}}function pi(t,n,e,i,s){if(s.strikethrough||s.underline){const o=t.measureText(i);const r=n-o.actualBoundingBoxLeft;const a=n+o.actualBoundingBoxRight;const c=e-o.actualBoundingBoxAscent;const l=e+o.actualBoundingBoxDescent;const h=s.strikethrough?(c+l)/2:l;t.strokeStyle=t.fillStyle;t.beginPath();t.lineWidth=s.decorationWidth||2;t.moveTo(r,h);t.lineTo(a,h);t.stroke()}}function gi(t,n){const e=t.fillStyle;t.fillStyle=n.color;t.fillRect(n.left,n.top,n.width,n.height);t.fillStyle=e}function bi(t,n,e,i,s,o={}){const r=bn(n)?n:[n];const a=o.strokeWidth>0&&o.strokeColor!=="";let c,l;t.save();t.font=s.string;di(t,o);for(c=0;c<r.length;++c){l=r[c];if(o.backdrop){gi(t,o.backdrop)}if(a){if(o.strokeColor){t.strokeStyle=o.strokeColor}if(!gn(o.strokeWidth)){t.lineWidth=o.strokeWidth}t.strokeText(l,e,i,o.maxWidth)}t.fillText(l,e,i,o.maxWidth);pi(t,e,i,l,o);i+=Number(s.lineHeight)}t.restore()}function mi(t,n){const{x:e,y:i,w:s,h:o,radius:r}=n;t.arc(e+r.topLeft,i+r.topLeft,r.topLeft,1.5*Bn,Bn,true);t.lineTo(e,i+o-r.bottomLeft);t.arc(e+r.bottomLeft,i+o-r.bottomLeft,r.bottomLeft,Bn,Un,true);t.lineTo(e+s-r.bottomRight,i+o);t.arc(e+s-r.bottomRight,i+o-r.bottomRight,r.bottomRight,Un,0,true);t.lineTo(e+s,i+r.topRight);t.arc(e+s-r.topRight,i+r.topRight,r.topRight,0,-Un,true);t.lineTo(e+r.topLeft,i)}const yi=/^(normal|(\d+(?:\.\d+)?)(px|em|%)?)$/;const wi=/^(normal|italic|initial|inherit|unset|(oblique( -?[0-9]?[0-9]deg)?))$/;function xi(t,n){const e=(""+t).match(yi);if(!e||e[1]==="normal"){return n*1.2}t=+e[2];switch(e[3]){case"px":return t;case"%":t/=100;break}return n*t}const vi=t=>+t||0;function ki(t,n){const e={};const i=mn(n);const s=i?Object.keys(n):n;const o=mn(t)?i?e=>xn(t[e],t[n[e]]):n=>t[n]:()=>t;for(const t of s){e[t]=vi(o(t))}return e}function Mi(t){return ki(t,{top:"y",right:"x",bottom:"y",left:"x"})}function Si(t){return ki(t,["topLeft","topRight","bottomLeft","bottomRight"])}function _i(t){const n=Mi(t);n.width=n.left+n.right;n.height=n.top+n.bottom;return n}function zi(t,n){t=t||{};n=n||ti.font;let e=xn(t.size,n.size);if(typeof e==="string"){e=parseInt(e,10)}let i=xn(t.style,n.style);if(i&&!(""+i).match(wi)){console.warn('Invalid font style specified: "'+i+'"');i=undefined}const s={family:xn(t.family,n.family),lineHeight:xi(xn(t.lineHeight,n.lineHeight),e),size:e,style:i,weight:xn(t.weight,n.weight),string:""};s.string=ni(s);return s}function Pi(t,n,e,i){let s,o,r;for(s=0,o=t.length;s<o;++s){r=t[s];if(r===undefined){continue}if(r!==undefined){return r}}}function Oi(t,n,e){const{min:i,max:s}=t;const o=kn(n,(s-i)/2);const r=(t,n)=>e&&t===0?0:t+n;return{min:r(i,-Math.abs(o)),max:r(s,o)}}function Ci(t,n){return Object.assign(Object.create(t),n)}function Di(t,n=[""],e,i,s=()=>t[0]){const o=e||t;if(typeof i==="undefined"){i=Ui("_fallback",t)}const r={[Symbol.toStringTag]:"Object",_cacheable:true,_scopes:t,_rootScopes:o,_fallback:i,_getTarget:s,override:e=>Di([e,...t],n,o,i)};return new Proxy(r,{deleteProperty(n,e){delete n[e];delete n._keys;delete t[0][e];return true},get(e,i){return Ri(e,i,(()=>Yi(i,n,t,e)))},getOwnPropertyDescriptor(t,n){return Reflect.getOwnPropertyDescriptor(t._scopes[0],n)},getPrototypeOf(){return Reflect.getPrototypeOf(t[0])},has(t,n){return Xi(t).includes(n)},ownKeys(t){return Xi(t)},set(t,n,e){const i=t._storage||(t._storage=s());t[n]=i[n]=e;delete t._keys;return true}})}function Ai(t,n,e,i){const s={_cacheable:false,_proxy:t,_context:n,_subProxy:e,_stack:new Set,_descriptors:ji(t,i),setContext:n=>Ai(t,n,e,i),override:s=>Ai(t.override(s),n,e,i)};return new Proxy(s,{deleteProperty(n,e){delete n[e];delete t[e];return true},get(t,n,e){return Ri(t,n,(()=>Ni(t,n,e)))},getOwnPropertyDescriptor(n,e){return n._descriptors.allKeys?Reflect.has(t,e)?{enumerable:true,configurable:true}:undefined:Reflect.getOwnPropertyDescriptor(t,e)},getPrototypeOf(){return Reflect.getPrototypeOf(t)},has(n,e){return Reflect.has(t,e)},ownKeys(){return Reflect.ownKeys(t)},set(n,e,i){t[e]=i;delete n[e];return true}})}function ji(t,n={scriptable:true,indexable:true}){const{_scriptable:e=n.scriptable,_indexable:i=n.indexable,_allKeys:s=n.allKeys}=t;return{allKeys:s,scriptable:e,indexable:i,isScriptable:In(e)?e:()=>e,isIndexable:In(i)?i:()=>i}}const Ei=(t,n)=>t?t+Nn(n):n;const Li=(t,n)=>mn(n)&&t!=="adapters"&&(Object.getPrototypeOf(n)===null||n.constructor===Object);function Ri(t,n,e){if(Object.prototype.hasOwnProperty.call(t,n)||n==="constructor"){return t[n]}const i=e();t[n]=i;return i}function Ni(t,n,e){const{_proxy:i,_context:s,_subProxy:o,_descriptors:r}=t;let a=i[n];if(In(a)&&r.isScriptable(n)){a=Ti(n,a,t,e)}if(bn(a)&&a.length){a=Ii(n,a,t,r.isIndexable)}if(Li(n,a)){a=Ai(a,s,o&&o[n],r)}return a}function Ti(t,n,e,i){const{_proxy:s,_context:o,_subProxy:r,_stack:a}=e;if(a.has(t)){throw new Error("Recursion detected: "+Array.from(a).join("->")+"->"+t)}a.add(t);let c=n(o,r||i);a.delete(t);if(Li(t,c)){c=Hi(s._scopes,s,t,c)}return c}function Ii(t,n,e,i){const{_proxy:s,_context:o,_subProxy:r,_descriptors:a}=e;if(typeof o.index!=="undefined"&&i(t)){return n[o.index%n.length]}else if(mn(n[0])){const e=n;const i=s._scopes.filter((t=>t!==e));n=[];for(const c of e){const e=Hi(i,s,t,c);n.push(Ai(e,o,r&&r[t],a))}}return n}function Fi(t,n,e){return In(t)?t(n,e):t}const Wi=(t,n)=>t===true?n:typeof t==="string"?Rn(n,t):undefined;function Bi(t,n,e,i,s){for(const o of n){const n=Wi(e,o);if(n){t.add(n);const o=Fi(n._fallback,e,s);if(typeof o!=="undefined"&&o!==e&&o!==i){return o}}else if(n===false&&typeof i!=="undefined"&&e!==i){return null}}return false}function Hi(t,n,e,i){const s=n._rootScopes;const o=Fi(n._fallback,e,i);const r=[...t,...s];const a=new Set;a.add(i);let c=$i(a,r,e,o||e,i);if(c===null){return false}if(typeof o!=="undefined"&&o!==e){c=$i(a,r,o,c,i);if(c===null){return false}}return Di(Array.from(a),[""],s,o,(()=>Vi(n,e,i)))}function $i(t,n,e,i,s){while(e){e=Bi(t,n,e,i,s)}return e}function Vi(t,n,e){const i=t._getTarget();if(!(n in i)){i[n]={}}const s=i[n];if(bn(s)&&mn(e)){return e}return s||{}}function Yi(t,n,e,i){let s;for(const o of n){s=Ui(Ei(o,t),e);if(typeof s!=="undefined"){return Li(t,s)?Hi(e,i,t,s):s}}}function Ui(t,n){for(const e of n){if(!e){continue}const n=e[t];if(typeof n!=="undefined"){return n}}}function Xi(t){let n=t._keys;if(!n){n=t._keys=Ki(t._scopes)}return n}function Ki(t){const n=new Set;for(const e of t){for(const t of Object.keys(e).filter((t=>!t.startsWith("_")))){n.add(t)}}return Array.from(n)}function qi(t,n,e,i){const{iScale:s}=t;const{key:o="r"}=this._parsing;const r=new Array(i);let a,c,l,h;for(a=0,c=i;a<c;++a){l=a+e;h=n[l];r[a]={r:s.parse(Rn(h,o),l)}}return r}const Zi=Number.EPSILON||1e-14;const Ji=(t,n)=>n<t.length&&!t[n].skip&&t[n];const Qi=t=>t==="x"?"y":"x";function Gi(t,n,e,i){const s=t.skip?n:t;const o=n;const r=e.skip?n:e;const a=ce(o,s);const c=ce(r,o);let l=a/(a+c);let h=c/(a+c);l=isNaN(l)?0:l;h=isNaN(h)?0:h;const f=i*l;const u=i*h;return{previous:{x:o.x-f*(r.x-s.x),y:o.y-f*(r.y-s.y)},next:{x:o.x+u*(r.x-s.x),y:o.y+u*(r.y-s.y)}}}function ts(t,n,e){const i=t.length;let s,o,r,a,c;let l=Ji(t,0);for(let h=0;h<i-1;++h){c=l;l=Ji(t,h+1);if(!c||!l){continue}if(Jn(n[h],0,Zi)){e[h]=e[h+1]=0;continue}s=e[h]/n[h];o=e[h+1]/n[h];a=Math.pow(s,2)+Math.pow(o,2);if(a<=9){continue}r=3/Math.sqrt(a);e[h]=s*r*n[h];e[h+1]=o*r*n[h]}}function ns(t,n,e="x"){const i=Qi(e);const s=t.length;let o,r,a;let c=Ji(t,0);for(let l=0;l<s;++l){r=a;a=c;c=Ji(t,l+1);if(!a){continue}const s=a[e];const h=a[i];if(r){o=(s-r[e])/3;a[`cp1${e}`]=s-o;a[`cp1${i}`]=h-o*n[l]}if(c){o=(c[e]-s)/3;a[`cp2${e}`]=s+o;a[`cp2${i}`]=h+o*n[l]}}}function es(t,n="x"){const e=Qi(n);const i=t.length;const s=Array(i).fill(0);const o=Array(i);let r,a,c;let l=Ji(t,0);for(r=0;r<i;++r){a=c;c=l;l=Ji(t,r+1);if(!c){continue}if(l){const t=l[n]-c[n];s[r]=t!==0?(l[e]-c[e])/t:0}o[r]=!a?s[r]:!l?s[r-1]:Zn(s[r-1])!==Zn(s[r])?0:(s[r-1]+s[r])/2}ts(t,s,o);ns(t,o,n)}function is(t,n,e){return Math.max(Math.min(t,e),n)}function ss(t,n){let e,i,s,o,r;let a=ci(t[0],n);for(e=0,i=t.length;e<i;++e){r=o;o=a;a=e<i-1&&ci(t[e+1],n);if(!o){continue}s=t[e];if(r){s.cp1x=is(s.cp1x,n.left,n.right);s.cp1y=is(s.cp1y,n.top,n.bottom)}if(a){s.cp2x=is(s.cp2x,n.left,n.right);s.cp2y=is(s.cp2y,n.top,n.bottom)}}}function os(t,n,e,i,s){let o,r,a,c;if(n.spanGaps){t=t.filter((t=>!t.skip))}if(n.cubicInterpolationMode==="monotone"){es(t,s)}else{let e=i?t[t.length-1]:t[0];for(o=0,r=t.length;o<r;++o){a=t[o];c=Gi(e,a,t[Math.min(o+1,r-(i?0:1))%r],n.tension);a.cp1x=c.previous.x;a.cp1y=c.previous.y;a.cp2x=c.next.x;a.cp2y=c.next.y;e=a}}if(n.capBezierPoints){ss(t,e)}}function rs(){return typeof window!=="undefined"&&typeof document!=="undefined"}function as(t){let n=t.parentNode;if(n&&n.toString()==="[object ShadowRoot]"){n=n.host}return n}function cs(t,n,e){let i;if(typeof t==="string"){i=parseInt(t,10);if(t.indexOf("%")!==-1){i=i/100*n.parentNode[e]}}else{i=t}return i}const ls=t=>t.ownerDocument.defaultView.getComputedStyle(t,null);function hs(t,n){return ls(t).getPropertyValue(n)}const fs=["top","right","bottom","left"];function us(t,n,e){const i={};e=e?"-"+e:"";for(let s=0;s<4;s++){const o=fs[s];i[o]=parseFloat(t[n+"-"+o+e])||0}i.width=i.left+i.right;i.height=i.top+i.bottom;return i}const ds=(t,n,e)=>(t>0||n>0)&&(!e||!e.shadowRoot);function ps(t,n){const e=t.touches;const i=e&&e.length?e[0]:t;const{offsetX:s,offsetY:o}=i;let r=false;let a,c;if(ds(s,o,t.target)){a=s;c=o}else{const t=n.getBoundingClientRect();a=i.clientX-t.left;c=i.clientY-t.top;r=true}return{x:a,y:c,box:r}}function gs(t,n){if("native"in t){return t}const{canvas:e,currentDevicePixelRatio:i}=n;const s=ls(e);const o=s.boxSizing==="border-box";const r=us(s,"padding");const a=us(s,"border","width");const{x:c,y:l,box:h}=ps(t,e);const f=r.left+(h&&a.left);const u=r.top+(h&&a.top);let{width:d,height:p}=n;if(o){d-=r.width+a.width;p-=r.height+a.height}return{x:Math.round((c-f)/d*e.width/i),y:Math.round((l-u)/p*e.height/i)}}function bs(t,n,e){let i,s;if(n===undefined||e===undefined){const o=t&&as(t);if(!o){n=t.clientWidth;e=t.clientHeight}else{const t=o.getBoundingClientRect();const r=ls(o);const a=us(r,"border","width");const c=us(r,"padding");n=t.width-c.width-a.width;e=t.height-c.height-a.height;i=cs(r.maxWidth,o,"clientWidth");s=cs(r.maxHeight,o,"clientHeight")}}return{width:n,height:e,maxWidth:i||Vn,maxHeight:s||Vn}}const ms=t=>Math.round(t*10)/10;function ys(t,n,e,i){const s=ls(t);const o=us(s,"margin");const r=cs(s.maxWidth,t,"clientWidth")||Vn;const a=cs(s.maxHeight,t,"clientHeight")||Vn;const c=bs(t,n,e);let{width:l,height:h}=c;if(s.boxSizing==="content-box"){const t=us(s,"border","width");const n=us(s,"padding");l-=n.width+t.width;h-=n.height+t.height}l=Math.max(0,l-o.width);h=Math.max(0,i?l/i:h-o.height);l=ms(Math.min(l,r,c.maxWidth));h=ms(Math.min(h,a,c.maxHeight));if(l&&!h){h=ms(l/2)}const f=n!==undefined||e!==undefined;if(f&&i&&c.height&&h>c.height){h=c.height;l=ms(Math.floor(h*i))}return{width:l,height:h}}function ws(t,n,e){const i=n||1;const s=Math.floor(t.height*i);const o=Math.floor(t.width*i);t.height=Math.floor(t.height);t.width=Math.floor(t.width);const r=t.canvas;if(r.style&&(e||!r.style.height&&!r.style.width)){r.style.height=`${t.height}px`;r.style.width=`${t.width}px`}if(t.currentDevicePixelRatio!==i||r.height!==s||r.width!==o){t.currentDevicePixelRatio=i;r.height=s;r.width=o;t.ctx.setTransform(i,0,0,i,0,0);return true}return false}const xs=function(){let t=false;try{const n={get passive(){t=true;return false}};if(rs()){window.addEventListener("test",null,n);window.removeEventListener("test",null,n)}}catch(t){}return t}();function vs(t,n){const e=hs(t,n);const i=e&&e.match(/^(\d+)(\.\d+)?px$/);return i?+i[1]:undefined}function ks(t,n,e,i){return{x:t.x+e*(n.x-t.x),y:t.y+e*(n.y-t.y)}}function Ms(t,n,e,i){return{x:t.x+e*(n.x-t.x),y:i==="middle"?e<.5?t.y:n.y:i==="after"?e<1?t.y:n.y:e>0?n.y:t.y}}function Ss(t,n,e,i){const s={x:t.cp2x,y:t.cp2y};const o={x:n.cp1x,y:n.cp1y};const r=ks(t,s,e);const a=ks(s,o,e);const c=ks(o,n,e);const l=ks(r,a,e);const h=ks(a,c,e);return ks(l,h,e)}const _s=function(t,n){return{x(e){return t+t+n-e},setWidth(t){n=t},textAlign(t){if(t==="center"){return t}return t==="right"?"left":"right"},xPlus(t,n){return t-n},leftForLtr(t,n){return t-n}}};const zs=function(){return{x(t){return t},setWidth(t){},textAlign(t){return t},xPlus(t,n){return t+n},leftForLtr(t,n){return t}}};function Ps(t,n,e){return t?_s(n,e):zs()}function Os(t,n){let e,i;if(n==="ltr"||n==="rtl"){e=t.canvas.style;i=[e.getPropertyValue("direction"),e.getPropertyPriority("direction")];e.setProperty("direction",n,"important");t.prevTextDirection=i}}function Cs(t,n){if(n!==undefined){delete t.prevTextDirection;t.canvas.style.setProperty("direction",n[0],n[1])}}function Ds(t){if(t==="angle"){return{between:fe,compare:le,normalize:he}}return{between:pe,compare:(t,n)=>t-n,normalize:t=>t}}function As({start:t,end:n,count:e,loop:i,style:s}){return{start:t%e,end:n%e,loop:i&&(n-t+1)%e===0,style:s}}function js(t,n,e){const{property:i,start:s,end:o}=e;const{between:r,normalize:a}=Ds(i);const c=n.length;let{start:l,end:h,loop:f}=t;let u,d;if(f){l+=c;h+=c;for(u=0,d=c;u<d;++u){if(!r(a(n[l%c][i]),s,o)){break}l--;h--}l%=c;h%=c}if(h<l){h+=c}return{start:l,end:h,loop:f,style:t.style}}function Es(t,n,e){if(!e){return[t]}const{property:i,start:s,end:o}=e;const r=n.length;const{compare:a,between:c,normalize:l}=Ds(i);const{start:h,end:f,loop:u,style:d}=js(t,n,e);const p=[];let g=false;let b=null;let m,y,w;const x=()=>c(s,w,m)&&a(s,w)!==0;const v=()=>a(o,m)===0||c(o,w,m);const k=()=>g||x();const M=()=>!g||v();for(let t=h,e=h;t<=f;++t){y=n[t%r];if(y.skip){continue}m=l(y[i]);if(m===w){continue}g=c(m,s,o);if(b===null&&k()){b=a(m,s)===0?t:e}if(b!==null&&M()){p.push(As({start:b,end:t,loop:u,count:r,style:d}));b=null}e=t;w=m}if(b!==null){p.push(As({start:b,end:f,loop:u,count:r,style:d}))}return p}function Ls(t,n){const e=[];const i=t.segments;for(let s=0;s<i.length;s++){const o=Es(i[s],t.points,n);if(o.length){e.push(...o)}}return e}function Rs(t,n,e,i){let s=0;let o=n-1;if(e&&!i){while(s<n&&!t[s].skip){s++}}while(s<n&&t[s].skip){s++}s%=n;if(e){o+=s}while(o>s&&t[o%n].skip){o--}o%=n;return{start:s,end:o}}function Ns(t,n,e,i){const s=t.length;const o=[];let r=n;let a=t[n];let c;for(c=n+1;c<=e;++c){const e=t[c%s];if(e.skip||e.stop){if(!a.skip){i=false;o.push({start:n%s,end:(c-1)%s,loop:i});n=r=e.stop?c:null}}else{r=c;if(a.skip){n=c}}a=e}if(r!==null){o.push({start:n%s,end:r%s,loop:i})}return o}function Ts(t,n){const e=t.points;const i=t.options.spanGaps;const s=e.length;if(!s){return[]}const o=!!t._loop;const{start:r,end:a}=Rs(e,s,o,i);if(i===true){return Is(t,[{start:r,end:a,loop:o}],e,n)}const c=a<r?a+s:a;const l=!!t._fullLoop&&r===0&&a===s-1;return Is(t,Ns(e,r,c,l),e,n)}function Is(t,n,e,i){if(!i||!i.setContext||!e){return n}return Fs(t,n,e,i)}function Fs(t,n,e,i){const s=t._chart.getContext();const o=Ws(t.options);const{_datasetIndex:r,options:{spanGaps:a}}=t;const c=e.length;const l=[];let h=o;let f=n[0].start;let u=f;function d(t,n,i,s){const o=a?-1:1;if(t===n){return}t+=c;while(e[t%c].skip){t-=o}while(e[n%c].skip){n+=o}if(t%c!==n%c){l.push({start:t%c,end:n%c,loop:i,style:s});h=s;f=n%c}}for(const t of n){f=a?f:t.start;let n=e[f%c];let o;for(u=f+1;u<=t.end;u++){const a=e[u%c];o=Ws(i.setContext(Ci(s,{type:"segment",p0:n,p1:a,p0DataIndex:(u-1)%c,p1DataIndex:u%c,datasetIndex:r})));if(Bs(o,h)){d(f,u-1,t.loop,h)}n=a;h=o}if(f<u-1){d(f,u-1,t.loop,h)}}return l}function Ws(t){return{backgroundColor:t.backgroundColor,borderCapStyle:t.borderCapStyle,borderDash:t.borderDash,borderDashOffset:t.borderDashOffset,borderJoinStyle:t.borderJoinStyle,borderWidth:t.borderWidth,borderColor:t.borderColor}}function Bs(t,n){if(!n){return false}const e=[];const i=function(t,n){if(!Re(n)){return n}if(!e.includes(n)){e.push(n)}return e.indexOf(n)};return JSON.stringify(t,i)!==JSON.stringify(n,i)}function Hs(t,n,e){return t.options.clip?t[e]:n[e]}function $s(t,n){const{xScale:e,yScale:i}=t;if(e&&i){return{left:Hs(e,n,"left"),right:Hs(e,n,"right"),top:Hs(i,n,"top"),bottom:Hs(i,n,"bottom")}}return n}function Vs(t,n){const e=n._clip;if(e.disabled){return false}const i=$s(n,t.chartArea);return{left:e.left===false?0:i.left-(e.left===true?0:e.left),right:e.right===false?t.width:i.right+(e.right===true?0:e.right),top:e.top===false?0:i.top-(e.top===true?0:e.top),bottom:e.bottom===false?t.height:i.bottom+(e.bottom===true?0:e.bottom)}}
38
+ /*!
39
+ * Chart.js v4.4.9
40
+ * https://www.chartjs.org
41
+ * (c) 2025 Chart.js Contributors
42
+ * Released under the MIT License
43
+ */class Ys{constructor(){this._request=null;this._charts=new Map;this._running=false;this._lastDate=undefined}_notify(t,n,e,i){const s=n.listeners[i];const o=n.duration;s.forEach((i=>i({chart:t,initial:n.initial,numSteps:o,currentStep:Math.min(e-n.start,o)})))}_refresh(){if(this._request){return}this._running=true;this._request=Me.call(window,(()=>{this._update();this._request=null;if(this._running){this._refresh()}}))}_update(t=Date.now()){let n=0;this._charts.forEach(((e,i)=>{if(!e.running||!e.items.length){return}const s=e.items;let o=s.length-1;let r=false;let a;for(;o>=0;--o){a=s[o];if(a._active){if(a._total>e.duration){e.duration=a._total}a.tick(t);r=true}else{s[o]=s[s.length-1];s.pop()}}if(r){i.draw();this._notify(i,e,t,"progress")}if(!s.length){e.running=false;this._notify(i,e,t,"complete");e.initial=false}n+=s.length}));this._lastDate=t;if(n===0){this._running=false}}_getAnims(t){const n=this._charts;let e=n.get(t);if(!e){e={running:false,initial:true,items:[],listeners:{complete:[],progress:[]}};n.set(t,e)}return e}listen(t,n,e){this._getAnims(t).listeners[n].push(e)}add(t,n){if(!n||!n.length){return}this._getAnims(t).items.push(...n)}has(t){return this._getAnims(t).items.length>0}start(t){const n=this._charts.get(t);if(!n){return}n.running=true;n.start=Date.now();n.duration=n.items.reduce(((t,n)=>Math.max(t,n._duration)),0);this._refresh()}running(t){if(!this._running){return false}const n=this._charts.get(t);if(!n||!n.running||!n.items.length){return false}return true}stop(t){const n=this._charts.get(t);if(!n||!n.items.length){return}const e=n.items;let i=e.length-1;for(;i>=0;--i){e[i].cancel()}n.items=[];this._notify(t,n,Date.now(),"complete")}remove(t){return this._charts.delete(t)}}var Us=new Ys;const Xs="transparent";const Ks={boolean(t,n,e){return e>.5?n:t},color(t,n,e){const i=Ne(t||Xs);const s=i.valid&&Ne(n||Xs);return s&&s.valid?s.mix(i,e).hexString():n},number(t,n,e){return t+(n-t)*e}};class qs{constructor(t,n,e,i){const s=n[e];i=Pi([t.to,i,s,t.from]);const o=Pi([t.from,s,i]);this._active=true;this._fn=t.fn||Ks[t.type||typeof o];this._easing=Le[t.easing]||Le.linear;this._start=Math.floor(Date.now()+(t.delay||0));this._duration=this._total=Math.floor(t.duration);this._loop=!!t.loop;this._target=n;this._prop=e;this._from=o;this._to=i;this._promises=undefined}active(){return this._active}update(t,n,e){if(this._active){this._notify(false);const i=this._target[this._prop];const s=e-this._start;const o=this._duration-s;this._start=e;this._duration=Math.floor(Math.max(o,t.duration));this._total+=s;this._loop=!!t.loop;this._to=Pi([t.to,n,i,t.from]);this._from=Pi([t.from,i,n])}}cancel(){if(this._active){this.tick(Date.now());this._active=false;this._notify(false)}}tick(t){const n=t-this._start;const e=this._duration;const i=this._prop;const s=this._from;const o=this._loop;const r=this._to;let a;this._active=s!==r&&(o||n<e);if(!this._active){this._target[i]=r;this._notify(true);return}if(n<0){this._target[i]=s;return}a=n/e%2;a=o&&a>1?2-a:a;a=this._easing(Math.min(1,Math.max(0,a)));this._target[i]=this._fn(s,r,a)}wait(){const t=this._promises||(this._promises=[]);return new Promise(((n,e)=>{t.push({res:n,rej:e})}))}_notify(t){const n=t?"res":"rej";const e=this._promises||[];for(let t=0;t<e.length;t++){e[t][n]()}}}class Zs{constructor(t,n){this._chart=t;this._properties=new Map;this.configure(n)}configure(t){if(!mn(t)){return}const n=Object.keys(ti.animation);const e=this._properties;Object.getOwnPropertyNames(t).forEach((i=>{const s=t[i];if(!mn(s)){return}const o={};for(const t of n){o[t]=s[t]}(bn(s.properties)&&s.properties||[i]).forEach((t=>{if(t===i||!e.has(t)){e.set(t,o)}}))}))}_animateOptions(t,n){const e=n.options;const i=Qs(t,e);if(!i){return[]}const s=this._createAnimations(i,e);if(e.$shared){Js(t.options.$animations,e).then((()=>{t.options=e}),(()=>{}))}return s}_createAnimations(t,n){const e=this._properties;const i=[];const s=t.$animations||(t.$animations={});const o=Object.keys(n);const r=Date.now();let a;for(a=o.length-1;a>=0;--a){const c=o[a];if(c.charAt(0)==="$"){continue}if(c==="options"){i.push(...this._animateOptions(t,n));continue}const l=n[c];let h=s[c];const f=e.get(c);if(h){if(f&&h.active()){h.update(f,l,r);continue}else{h.cancel()}}if(!f||!f.duration){t[c]=l;continue}s[c]=h=new qs(f,t,c,l);i.push(h)}return i}update(t,n){if(this._properties.size===0){Object.assign(t,n);return}const e=this._createAnimations(t,n);if(e.length){Us.add(this._chart,e);return true}}}function Js(t,n){const e=[];const i=Object.keys(n);for(let n=0;n<i.length;n++){const s=t[i[n]];if(s&&s.active()){e.push(s.wait())}}return Promise.all(e)}function Qs(t,n){if(!n){return}let e=t.options;if(!e){t.options=n;return}if(e.$shared){t.options=e=Object.assign({},e,{$shared:false,$animations:{}})}return e}function Gs(t,n){const e=t&&t.options||{};const i=e.reverse;const s=e.min===undefined?n:0;const o=e.max===undefined?n:0;return{start:i?o:s,end:i?s:o}}function to(t,n,e){if(e===false){return false}const i=Gs(t,e);const s=Gs(n,e);return{top:s.end,right:i.end,bottom:s.start,left:i.start}}function no(t){let n,e,i,s;if(mn(t)){n=t.top;e=t.right;i=t.bottom;s=t.left}else{n=e=i=s=t}return{top:n,right:e,bottom:i,left:s,disabled:t===false}}function eo(t,n){const e=[];const i=t._getSortedDatasetMetas(n);let s,o;for(s=0,o=i.length;s<o;++s){e.push(i[s].index)}return e}function io(t,n,e,i={}){const s=t.keys;const o=i.mode==="single";let r,a,c,l;if(n===null){return}let h=false;for(r=0,a=s.length;r<a;++r){c=+s[r];if(c===e){h=true;if(i.all){continue}break}l=t.values[c];if(yn(l)&&(o||n===0||Zn(n)===Zn(l))){n+=l}}if(!h&&!i.all){return 0}return n}function so(t,n){const{iScale:e,vScale:i}=n;const s=e.axis==="x"?"x":"y";const o=i.axis==="x"?"x":"y";const r=Object.keys(t);const a=new Array(r.length);let c,l,h;for(c=0,l=r.length;c<l;++c){h=r[c];a[c]={[s]:h,[o]:t[h]}}return a}function oo(t,n){const e=t&&t.options.stacked;return e||e===undefined&&n.stack!==undefined}function ro(t,n,e){return`${t.id}.${n.id}.${e.stack||e.type}`}function ao(t){const{min:n,max:e,minDefined:i,maxDefined:s}=t.getUserBounds();return{min:i?n:Number.NEGATIVE_INFINITY,max:s?e:Number.POSITIVE_INFINITY}}function co(t,n,e){const i=t[n]||(t[n]={});return i[e]||(i[e]={})}function lo(t,n,e,i){for(const s of n.getMatchingVisibleMetas(i).reverse()){const n=t[s.index];if(e&&n>0||!e&&n<0){return s.index}}return null}function ho(t,n){const{chart:e,_cachedMeta:i}=t;const s=e._stacks||(e._stacks={});const{iScale:o,vScale:r,index:a}=i;const c=o.axis;const l=r.axis;const h=ro(o,r,i);const f=n.length;let u;for(let t=0;t<f;++t){const e=n[t];const{[c]:o,[l]:f}=e;const d=e._stacks||(e._stacks={});u=d[l]=co(s,h,o);u[a]=f;u._top=lo(u,r,true,i.type);u._bottom=lo(u,r,false,i.type);const p=u._visualValues||(u._visualValues={});p[a]=f}}function fo(t,n){const e=t.scales;return Object.keys(e).filter((t=>e[t].axis===n)).shift()}function uo(t,n){return Ci(t,{active:false,dataset:undefined,datasetIndex:n,index:n,mode:"default",type:"dataset"})}function po(t,n,e){return Ci(t,{active:false,dataIndex:n,parsed:undefined,raw:undefined,element:e,index:n,mode:"default",type:"data"})}function go(t,n){const e=t.controller.index;const i=t.vScale&&t.vScale.axis;if(!i){return}n=n||t._parsed;for(const t of n){const n=t._stacks;if(!n||n[i]===undefined||n[i][e]===undefined){return}delete n[i][e];if(n[i]._visualValues!==undefined&&n[i]._visualValues[e]!==undefined){delete n[i]._visualValues[e]}}}const bo=t=>t==="reset"||t==="none";const mo=(t,n)=>n?t:Object.assign({},t);const yo=(t,n,e)=>t&&!n.hidden&&n._stacked&&{keys:eo(e,true),values:null};class wo{static defaults={};static datasetElementType=null;static dataElementType=null;constructor(t,n){this.chart=t;this._ctx=t.ctx;this.index=n;this._cachedDataOpts={};this._cachedMeta=this.getMeta();this._type=this._cachedMeta.type;this.options=undefined;this._parsing=false;this._data=undefined;this._objectData=undefined;this._sharedOptions=undefined;this._drawStart=undefined;this._drawCount=undefined;this.enableOptionSharing=false;this.supportsDecimation=false;this.$context=undefined;this._syncList=[];this.datasetElementType=new.target.datasetElementType;this.dataElementType=new.target.dataElementType;this.initialize()}initialize(){const t=this._cachedMeta;this.configure();this.linkScales();t._stacked=oo(t.vScale,t);this.addElements();if(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){if(this.index!==t){go(this._cachedMeta)}this.index=t}linkScales(){const t=this.chart;const n=this._cachedMeta;const e=this.getDataset();const i=(t,n,e,i)=>t==="x"?n:t==="r"?i:e;const s=n.xAxisID=xn(e.xAxisID,fo(t,"x"));const o=n.yAxisID=xn(e.yAxisID,fo(t,"y"));const r=n.rAxisID=xn(e.rAxisID,fo(t,"r"));const a=n.indexAxis;const c=n.iAxisID=i(a,s,o,r);const l=n.vAxisID=i(a,o,s,r);n.xScale=this.getScaleForId(s);n.yScale=this.getScaleForId(o);n.rScale=this.getScaleForId(r);n.iScale=this.getScaleForId(c);n.vScale=this.getScaleForId(l)}getDataset(){return this.chart.data.datasets[this.index]}getMeta(){return this.chart.getDatasetMeta(this.index)}getScaleForId(t){return this.chart.scales[t]}_getOtherScale(t){const n=this._cachedMeta;return t===n.iScale?n.vScale:n.iScale}reset(){this._update("reset")}_destroy(){const t=this._cachedMeta;if(this._data){ve(this._data,this)}if(t._stacked){go(t)}}_dataCheck(){const t=this.getDataset();const n=t.data||(t.data=[]);const e=this._data;if(mn(n)){const t=this._cachedMeta;this._data=so(n,t)}else if(e!==n){if(e){ve(e,this);const t=this._cachedMeta;go(t);t._parsed=[]}if(n&&Object.isExtensible(n)){xe(n,this)}this._syncList=[];this._data=n}}addElements(){const t=this._cachedMeta;this._dataCheck();if(this.datasetElementType){t.dataset=new this.datasetElementType}}buildOrUpdateElements(t){const n=this._cachedMeta;const e=this.getDataset();let i=false;this._dataCheck();const s=n._stacked;n._stacked=oo(n.vScale,n);if(n.stack!==e.stack){i=true;go(n);n.stack=e.stack}this._resyncElements(t);if(i||s!==n._stacked){ho(this,n._parsed);n._stacked=oo(n.vScale,n)}}configure(){const t=this.chart.config;const n=t.datasetScopeKeys(this._type);const e=t.getOptionScopes(this.getDataset(),n,true);this.options=t.createResolver(e,this.getContext());this._parsing=this.options.parsing;this._cachedDataOpts={}}parse(t,n){const{_cachedMeta:e,_data:i}=this;const{iScale:s,_stacked:o}=e;const r=s.axis;let a=t===0&&n===i.length?true:e._sorted;let c=t>0&&e._parsed[t-1];let l,h,f;if(this._parsing===false){e._parsed=i;e._sorted=true;f=i}else{if(bn(i[t])){f=this.parseArrayData(e,i,t,n)}else if(mn(i[t])){f=this.parseObjectData(e,i,t,n)}else{f=this.parsePrimitiveData(e,i,t,n)}const s=()=>h[r]===null||c&&h[r]<c[r];for(l=0;l<n;++l){e._parsed[l+t]=h=f[l];if(a){if(s()){a=false}c=h}}e._sorted=a}if(o){ho(this,f)}}parsePrimitiveData(t,n,e,i){const{iScale:s,vScale:o}=t;const r=s.axis;const a=o.axis;const c=s.getLabels();const l=s===o;const h=new Array(i);let f,u,d;for(f=0,u=i;f<u;++f){d=f+e;h[f]={[r]:l||s.parse(c[d],d),[a]:o.parse(n[d],d)}}return h}parseArrayData(t,n,e,i){const{xScale:s,yScale:o}=t;const r=new Array(i);let a,c,l,h;for(a=0,c=i;a<c;++a){l=a+e;h=n[l];r[a]={x:s.parse(h[0],l),y:o.parse(h[1],l)}}return r}parseObjectData(t,n,e,i){const{xScale:s,yScale:o}=t;const{xAxisKey:r="x",yAxisKey:a="y"}=this._parsing;const c=new Array(i);let l,h,f,u;for(l=0,h=i;l<h;++l){f=l+e;u=n[f];c[l]={x:s.parse(Rn(u,r),f),y:o.parse(Rn(u,a),f)}}return c}getParsed(t){return this._cachedMeta._parsed[t]}getDataElement(t){return this._cachedMeta.data[t]}applyStack(t,n,e){const i=this.chart;const s=this._cachedMeta;const o=n[t.axis];const r={keys:eo(i,true),values:n._stacks[t.axis]._visualValues};return io(r,o,s.index,{mode:e})}updateRangeFromParsed(t,n,e,i){const s=e[n.axis];let o=s===null?NaN:s;const r=i&&e._stacks[n.axis];if(i&&r){i.values=r;o=io(i,s,this._cachedMeta.index)}t.min=Math.min(t.min,o);t.max=Math.max(t.max,o)}getMinMax(t,n){const e=this._cachedMeta;const i=e._parsed;const s=e._sorted&&t===e.iScale;const o=i.length;const r=this._getOtherScale(t);const a=yo(n,e,this.chart);const c={min:Number.POSITIVE_INFINITY,max:Number.NEGATIVE_INFINITY};const{min:l,max:h}=ao(r);let f,u;function d(){u=i[f];const n=u[r.axis];return!yn(u[t.axis])||l>n||h<n}for(f=0;f<o;++f){if(d()){continue}this.updateRangeFromParsed(c,t,u,a);if(s){break}}if(s){for(f=o-1;f>=0;--f){if(d()){continue}this.updateRangeFromParsed(c,t,u,a);break}}return c}getAllParsedValues(t){const n=this._cachedMeta._parsed;const e=[];let i,s,o;for(i=0,s=n.length;i<s;++i){o=n[i][t.axis];if(yn(o)){e.push(o)}}return e}getMaxOverflow(){return false}getLabelAndValue(t){const n=this._cachedMeta;const e=n.iScale;const i=n.vScale;const s=this.getParsed(t);return{label:e?""+e.getLabelForValue(s[e.axis]):"",value:i?""+i.getLabelForValue(s[i.axis]):""}}_update(t){const n=this._cachedMeta;this.update(t||"default");n._clip=no(xn(this.options.clip,to(n.xScale,n.yScale,this.getMaxOverflow())))}update(t){}draw(){const t=this._ctx;const n=this.chart;const e=this._cachedMeta;const i=e.data||[];const s=n.chartArea;const o=[];const r=this._drawStart||0;const a=this._drawCount||i.length-r;const c=this.options.drawActiveElementsOnTop;let l;if(e.dataset){e.dataset.draw(t,s,r,a)}for(l=r;l<r+a;++l){const n=i[l];if(n.hidden){continue}if(n.active&&c){o.push(n)}else{n.draw(t,s)}}for(l=0;l<o.length;++l){o[l].draw(t,s)}}getStyle(t,n){const e=n?"active":"default";return t===undefined&&this._cachedMeta.dataset?this.resolveDatasetElementOptions(e):this.resolveDataElementOptions(t||0,e)}getContext(t,n,e){const i=this.getDataset();let s;if(t>=0&&t<this._cachedMeta.data.length){const n=this._cachedMeta.data[t];s=n.$context||(n.$context=po(this.getContext(),t,n));s.parsed=this.getParsed(t);s.raw=i.data[t];s.index=s.dataIndex=t}else{s=this.$context||(this.$context=uo(this.chart.getContext(),this.index));s.dataset=i;s.index=s.datasetIndex=this.index}s.active=!!n;s.mode=e;return s}resolveDatasetElementOptions(t){return this._resolveElementOptions(this.datasetElementType.id,t)}resolveDataElementOptions(t,n){return this._resolveElementOptions(this.dataElementType.id,n,t)}_resolveElementOptions(t,n="default",e){const i=n==="active";const s=this._cachedDataOpts;const o=t+"-"+n;const r=s[o];const a=this.enableOptionSharing&&Tn(e);if(r){return mo(r,a)}const c=this.chart.config;const l=c.datasetElementScopeKeys(this._type,t);const h=i?[`${t}Hover`,"hover",t,""]:[t,""];const f=c.getOptionScopes(this.getDataset(),l);const u=Object.keys(ti.elements[t]);const d=()=>this.getContext(e,i,n);const p=c.resolveNamedOptions(f,u,d,h);if(p.$shared){p.$shared=a;s[o]=Object.freeze(mo(p,a))}return p}_resolveAnimations(t,n,e){const i=this.chart;const s=this._cachedDataOpts;const o=`animation-${n}`;const r=s[o];if(r){return r}let a;if(i.options.animation!==false){const i=this.chart.config;const s=i.datasetAnimationScopeKeys(this._type,n);const o=i.getOptionScopes(this.getDataset(),s);a=i.createResolver(o,this.getContext(t,e,n))}const c=new Zs(i,a&&a.animations);if(a&&a._cacheable){s[o]=Object.freeze(c)}return c}getSharedOptions(t){if(!t.$shared){return}return this._sharedOptions||(this._sharedOptions=Object.assign({},t))}includeOptions(t,n){return!n||bo(t)||this.chart._animationsDisabled}_getSharedOptions(t,n){const e=this.resolveDataElementOptions(t,n);const i=this._sharedOptions;const s=this.getSharedOptions(e);const o=this.includeOptions(n,s)||s!==i;this.updateSharedOptions(s,n,e);return{sharedOptions:s,includeOptions:o}}updateElement(t,n,e,i){if(bo(i)){Object.assign(t,e)}else{this._resolveAnimations(n,i).update(t,e)}}updateSharedOptions(t,n,e){if(t&&!bo(n)){this._resolveAnimations(undefined,n).update(t,e)}}_setStyle(t,n,e,i){t.active=i;const s=this.getStyle(n,i);this._resolveAnimations(n,e,i).update(t,{options:!i&&this.getSharedOptions(s)||s})}removeHoverStyle(t,n,e){this._setStyle(t,e,"active",false)}setHoverStyle(t,n,e){this._setStyle(t,e,"active",true)}_removeDatasetHoverStyle(){const t=this._cachedMeta.dataset;if(t){this._setStyle(t,undefined,"active",false)}}_setDatasetHoverStyle(){const t=this._cachedMeta.dataset;if(t){this._setStyle(t,undefined,"active",true)}}_resyncElements(t){const n=this._data;const e=this._cachedMeta.data;for(const[t,n,e]of this._syncList){this[t](n,e)}this._syncList=[];const i=e.length;const s=n.length;const o=Math.min(s,i);if(o){this.parse(0,o)}if(s>i){this._insertElements(i,s-i,t)}else if(s<i){this._removeElements(s,i-s)}}_insertElements(t,n,e=true){const i=this._cachedMeta;const s=i.data;const o=t+n;let r;const a=t=>{t.length+=n;for(r=t.length-1;r>=o;r--){t[r]=t[r-n]}};a(s);for(r=t;r<o;++r){s[r]=new this.dataElementType}if(this._parsing){a(i._parsed)}this.parse(t,n);if(e){this.updateElements(s,t,n,"reset")}}updateElements(t,n,e,i){}_removeElements(t,n){const e=this._cachedMeta;if(this._parsing){const i=e._parsed.splice(t,n);if(e._stacked){go(e,i)}}e.data.splice(t,n)}_sync(t){if(this._parsing){this._syncList.push(t)}else{const[n,e,i]=t;this[n](e,i)}this.chart._dataChanges.push([this.index,...t])}_onDataPush(){const t=arguments.length;this._sync(["_insertElements",this.getDataset().data.length-t,t])}_onDataPop(){this._sync(["_removeElements",this._cachedMeta.data.length-1,1])}_onDataShift(){this._sync(["_removeElements",0,1])}_onDataSplice(t,n){if(n){this._sync(["_removeElements",t,n])}const e=arguments.length-2;if(e){this._sync(["_insertElements",t,e])}}_onDataUnshift(){this._sync(["_insertElements",0,arguments.length])}}function xo(t,n){if(!t._cache.$bar){const e=t.getMatchingVisibleMetas(n);let i=[];for(let n=0,s=e.length;n<s;n++){i=i.concat(e[n].controller.getAllParsedValues(t))}t._cache.$bar=ke(i.sort(((t,n)=>t-n)))}return t._cache.$bar}function vo(t){const n=t.iScale;const e=xo(n,t.type);let i=n._length;let s,o,r,a;const c=()=>{if(r===32767||r===-32768){return}if(Tn(a)){i=Math.min(i,Math.abs(r-a)||i)}a=r};for(s=0,o=e.length;s<o;++s){r=n.getPixelForValue(e[s]);c()}a=undefined;for(s=0,o=n.ticks.length;s<o;++s){r=n.getPixelForTick(s);c()}return i}function ko(t,n,e,i){const s=e.barThickness;let o,r;if(gn(s)){o=n.min*e.categoryPercentage;r=e.barPercentage}else{o=s*i;r=1}return{chunk:o/i,ratio:r,start:n.pixels[t]-o/2}}function Mo(t,n,e,i){const s=n.pixels;const o=s[t];let r=t>0?s[t-1]:null;let a=t<s.length-1?s[t+1]:null;const c=e.categoryPercentage;if(r===null){r=o-(a===null?n.end-n.start:a-o)}if(a===null){a=o+o-r}const l=o-(o-Math.min(r,a))/2*c;const h=Math.abs(a-r)/2*c;return{chunk:h/i,ratio:e.barPercentage,start:l}}function So(t,n,e,i){const s=e.parse(t[0],i);const o=e.parse(t[1],i);const r=Math.min(s,o);const a=Math.max(s,o);let c=r;let l=a;if(Math.abs(r)>Math.abs(a)){c=a;l=r}n[e.axis]=l;n._custom={barStart:c,barEnd:l,start:s,end:o,min:r,max:a}}function _o(t,n,e,i){if(bn(t)){So(t,n,e,i)}else{n[e.axis]=e.parse(t,i)}return n}function zo(t,n,e,i){const s=t.iScale;const o=t.vScale;const r=s.getLabels();const a=s===o;const c=[];let l,h,f,u;for(l=e,h=e+i;l<h;++l){u=n[l];f={};f[s.axis]=a||s.parse(r[l],l);c.push(_o(u,f,o,l))}return c}function Po(t){return t&&t.barStart!==undefined&&t.barEnd!==undefined}function Oo(t,n,e){if(t!==0){return Zn(t)}return(n.isHorizontal()?1:-1)*(n.min>=e?1:-1)}function Co(t){let n,e,i,s,o;if(t.horizontal){n=t.base>t.x;e="left";i="right"}else{n=t.base<t.y;e="bottom";i="top"}if(n){s="end";o="start"}else{s="start";o="end"}return{start:e,end:i,reverse:n,top:s,bottom:o}}function Do(t,n,e,i){let s=n.borderSkipped;const o={};if(!s){t.borderSkipped=o;return}if(s===true){t.borderSkipped={top:true,right:true,bottom:true,left:true};return}const{start:r,end:a,reverse:c,top:l,bottom:h}=Co(t);if(s==="middle"&&e){t.enableBorderRadius=true;if((e._top||0)===i){s=l}else if((e._bottom||0)===i){s=h}else{o[Ao(h,r,a,c)]=true;s=l}}o[Ao(s,r,a,c)]=true;t.borderSkipped=o}function Ao(t,n,e,i){if(i){t=jo(t,n,e);t=Eo(t,e,n)}else{t=Eo(t,n,e)}return t}function jo(t,n,e){return t===n?e:t===e?n:t}function Eo(t,n,e){return t==="start"?n:t==="end"?e:t}function Lo(t,{inflateAmount:n},e){t.inflateAmount=n==="auto"?e===1?.33:0:n}class Ro extends wo{static id="bar";static defaults={datasetElementType:false,dataElementType:"bar",categoryPercentage:.8,barPercentage:.9,grouped:true,animations:{numbers:{type:"number",properties:["x","y","base","width","height"]}}};static overrides={scales:{_index_:{type:"category",offset:true,grid:{offset:true}},_value_:{type:"linear",beginAtZero:true}}};parsePrimitiveData(t,n,e,i){return zo(t,n,e,i)}parseArrayData(t,n,e,i){return zo(t,n,e,i)}parseObjectData(t,n,e,i){const{iScale:s,vScale:o}=t;const{xAxisKey:r="x",yAxisKey:a="y"}=this._parsing;const c=s.axis==="x"?r:a;const l=o.axis==="x"?r:a;const h=[];let f,u,d,p;for(f=e,u=e+i;f<u;++f){p=n[f];d={};d[s.axis]=s.parse(Rn(p,c),f);h.push(_o(Rn(p,l),d,o,f))}return h}updateRangeFromParsed(t,n,e,i){super.updateRangeFromParsed(t,n,e,i);const s=e._custom;if(s&&n===this._cachedMeta.vScale){t.min=Math.min(t.min,s.min);t.max=Math.max(t.max,s.max)}}getMaxOverflow(){return 0}getLabelAndValue(t){const n=this._cachedMeta;const{iScale:e,vScale:i}=n;const s=this.getParsed(t);const o=s._custom;const r=Po(o)?"["+o.start+", "+o.end+"]":""+i.getLabelForValue(s[i.axis]);return{label:""+e.getLabelForValue(s[e.axis]),value:r}}initialize(){this.enableOptionSharing=true;super.initialize();const t=this._cachedMeta;t.stack=this.getDataset().stack}update(t){const n=this._cachedMeta;this.updateElements(n.data,0,n.data.length,t)}updateElements(t,n,e,i){const s=i==="reset";const{index:o,_cachedMeta:{vScale:r}}=this;const a=r.getBasePixel();const c=r.isHorizontal();const l=this._getRuler();const{sharedOptions:h,includeOptions:f}=this._getSharedOptions(n,i);for(let u=n;u<n+e;u++){const n=this.getParsed(u);const e=s||gn(n[r.axis])?{base:a,head:a}:this._calculateBarValuePixels(u);const d=this._calculateBarIndexPixels(u,l);const p=(n._stacks||{})[r.axis];const g={horizontal:c,base:e.base,enableBorderRadius:!p||Po(n._custom)||o===p._top||o===p._bottom,x:c?e.head:d.center,y:c?d.center:e.head,height:c?d.size:Math.abs(e.size),width:c?Math.abs(e.size):d.size};if(f){g.options=h||this.resolveDataElementOptions(u,t[u].active?"active":i)}const b=g.options||t[u].options;Do(g,b,p,o);Lo(g,b,l.ratio);this.updateElement(t[u],u,g,i)}}_getStacks(t,n){const{iScale:e}=this._cachedMeta;const i=e.getMatchingVisibleMetas(this._type).filter((t=>t.controller.options.grouped));const s=e.options.stacked;const o=[];const r=this._cachedMeta.controller.getParsed(n);const a=r&&r[e.axis];const c=t=>{const n=t._parsed.find((t=>t[e.axis]===a));const i=n&&n[t.vScale.axis];if(gn(i)||isNaN(i)){return true}};for(const e of i){if(n!==undefined&&c(e)){continue}if(s===false||o.indexOf(e.stack)===-1||s===undefined&&e.stack===undefined){o.push(e.stack)}if(e.index===t){break}}if(!o.length){o.push(undefined)}return o}_getStackCount(t){return this._getStacks(undefined,t).length}_getStackIndex(t,n,e){const i=this._getStacks(t,e);const s=n!==undefined?i.indexOf(n):-1;return s===-1?i.length-1:s}_getRuler(){const t=this.options;const n=this._cachedMeta;const e=n.iScale;const i=[];let s,o;for(s=0,o=n.data.length;s<o;++s){i.push(e.getPixelForValue(this.getParsed(s)[e.axis],s))}const r=t.barThickness;const a=r||vo(n);return{min:a,pixels:i,start:e._startPixel,end:e._endPixel,stackCount:this._getStackCount(),scale:e,grouped:t.grouped,ratio:r?1:t.categoryPercentage*t.barPercentage}}_calculateBarValuePixels(t){const{_cachedMeta:{vScale:n,_stacked:e,index:i},options:{base:s,minBarLength:o}}=this;const r=s||0;const a=this.getParsed(t);const c=a._custom;const l=Po(c);let h=a[n.axis];let f=0;let u=e?this.applyStack(n,a,e):h;let d,p;if(u!==h){f=u-h;u=h}if(l){h=c.barStart;u=c.barEnd-c.barStart;if(h!==0&&Zn(h)!==Zn(c.barEnd)){f=0}f+=h}const g=!gn(s)&&!l?s:f;let b=n.getPixelForValue(g);if(this.chart.getDataVisibility(t)){d=n.getPixelForValue(f+u)}else{d=b}p=d-b;if(Math.abs(p)<o){p=Oo(p,n,r)*o;if(h===r){b-=p/2}const t=n.getPixelForDecimal(0);const s=n.getPixelForDecimal(1);const c=Math.min(t,s);const f=Math.max(t,s);b=Math.max(Math.min(b,f),c);d=b+p;if(e&&!l){a._stacks[n.axis]._visualValues[i]=n.getValueForPixel(d)-n.getValueForPixel(b)}}if(b===n.getPixelForValue(r)){const t=Zn(p)*n.getLineWidthForValue(r)/2;b+=t;p-=t}return{size:p,base:b,head:d,center:d+p/2}}_calculateBarIndexPixels(t,n){const e=n.scale;const i=this.options;const s=i.skipNull;const o=xn(i.maxBarThickness,Infinity);let r,a;if(n.grouped){const e=s?this._getStackCount(t):n.stackCount;const c=i.barThickness==="flex"?Mo(t,n,i,e):ko(t,n,i,e);const l=this._getStackIndex(this.index,this._cachedMeta.stack,s?t:undefined);r=c.start+c.chunk*l+c.chunk/2;a=Math.min(o,c.chunk*c.ratio)}else{r=e.getPixelForValue(this.getParsed(t)[e.axis],t);a=Math.min(o,n.min*n.ratio)}return{base:r-a/2,head:r+a/2,center:r,size:a}}draw(){const t=this._cachedMeta;const n=t.vScale;const e=t.data;const i=e.length;let s=0;for(;s<i;++s){if(this.getParsed(s)[n.axis]!==null&&!e[s].hidden){e[s].draw(this._ctx)}}}}class No extends wo{static id="bubble";static defaults={datasetElementType:false,dataElementType:"point",animations:{numbers:{type:"number",properties:["x","y","borderWidth","radius"]}}};static overrides={scales:{x:{type:"linear"},y:{type:"linear"}}};initialize(){this.enableOptionSharing=true;super.initialize()}parsePrimitiveData(t,n,e,i){const s=super.parsePrimitiveData(t,n,e,i);for(let t=0;t<s.length;t++){s[t]._custom=this.resolveDataElementOptions(t+e).radius}return s}parseArrayData(t,n,e,i){const s=super.parseArrayData(t,n,e,i);for(let t=0;t<s.length;t++){const i=n[e+t];s[t]._custom=xn(i[2],this.resolveDataElementOptions(t+e).radius)}return s}parseObjectData(t,n,e,i){const s=super.parseObjectData(t,n,e,i);for(let t=0;t<s.length;t++){const i=n[e+t];s[t]._custom=xn(i&&i.r&&+i.r,this.resolveDataElementOptions(t+e).radius)}return s}getMaxOverflow(){const t=this._cachedMeta.data;let n=0;for(let e=t.length-1;e>=0;--e){n=Math.max(n,t[e].size(this.resolveDataElementOptions(e))/2)}return n>0&&n}getLabelAndValue(t){const n=this._cachedMeta;const e=this.chart.data.labels||[];const{xScale:i,yScale:s}=n;const o=this.getParsed(t);const r=i.getLabelForValue(o.x);const a=s.getLabelForValue(o.y);const c=o._custom;return{label:e[t]||"",value:"("+r+", "+a+(c?", "+c:"")+")"}}update(t){const n=this._cachedMeta.data;this.updateElements(n,0,n.length,t)}updateElements(t,n,e,i){const s=i==="reset";const{iScale:o,vScale:r}=this._cachedMeta;const{sharedOptions:a,includeOptions:c}=this._getSharedOptions(n,i);const l=o.axis;const h=r.axis;for(let f=n;f<n+e;f++){const n=t[f];const e=!s&&this.getParsed(f);const u={};const d=u[l]=s?o.getPixelForDecimal(.5):o.getPixelForValue(e[l]);const p=u[h]=s?r.getBasePixel():r.getPixelForValue(e[h]);u.skip=isNaN(d)||isNaN(p);if(c){u.options=a||this.resolveDataElementOptions(f,n.active?"active":i);if(s){u.options.radius=0}}this.updateElement(n,f,u,i)}}resolveDataElementOptions(t,n){const e=this.getParsed(t);let i=super.resolveDataElementOptions(t,n);if(i.$shared){i=Object.assign({},i,{$shared:false})}const s=i.radius;if(n!=="active"){i.radius=0}i.radius+=xn(e&&e._custom,s);return i}}function To(t,n,e){let i=1;let s=1;let o=0;let r=0;if(n<Hn){const a=t;const c=a+n;const l=Math.cos(a);const h=Math.sin(a);const f=Math.cos(c);const u=Math.sin(c);const d=(t,n,i)=>fe(t,a,c,true)?1:Math.max(n,n*e,i,i*e);const p=(t,n,i)=>fe(t,a,c,true)?-1:Math.min(n,n*e,i,i*e);const g=d(0,l,f);const b=d(Un,h,u);const m=p(Bn,l,f);const y=p(Bn+Un,h,u);i=(g-m)/2;s=(b-y)/2;o=-(g+m)/2;r=-(b+y)/2}return{ratioX:i,ratioY:s,offsetX:o,offsetY:r}}class Io extends wo{static id="doughnut";static defaults={datasetElementType:false,dataElementType:"arc",animation:{animateRotate:true,animateScale:false},animations:{numbers:{type:"number",properties:["circumference","endAngle","innerRadius","outerRadius","startAngle","x","y","offset","borderWidth","spacing"]}},cutout:"50%",rotation:0,circumference:360,radius:"100%",spacing:0,indexAxis:"r"};static descriptors={_scriptable:t=>t!=="spacing",_indexable:t=>t!=="spacing"&&!t.startsWith("borderDash")&&!t.startsWith("hoverBorderDash")};static overrides={aspectRatio:1,plugins:{legend:{labels:{generateLabels(t){const n=t.data;if(n.labels.length&&n.datasets.length){const{labels:{pointStyle:e,color:i}}=t.legend.options;return n.labels.map(((n,s)=>{const o=t.getDatasetMeta(0);const r=o.controller.getStyle(s);return{text:n,fillStyle:r.backgroundColor,strokeStyle:r.borderColor,fontColor:i,lineWidth:r.borderWidth,pointStyle:e,hidden:!t.getDataVisibility(s),index:s}}))}return[]}},onClick(t,n,e){e.chart.toggleDataVisibility(n.index);e.chart.update()}}}};constructor(t,n){super(t,n);this.enableOptionSharing=true;this.innerRadius=undefined;this.outerRadius=undefined;this.offsetX=undefined;this.offsetY=undefined}linkScales(){}parse(t,n){const e=this.getDataset().data;const i=this._cachedMeta;if(this._parsing===false){i._parsed=e}else{let s=t=>+e[t];if(mn(e[t])){const{key:t="value"}=this._parsing;s=n=>+Rn(e[n],t)}let o,r;for(o=t,r=t+n;o<r;++o){i._parsed[o]=s(o)}}}_getRotation(){return se(this.options.rotation-90)}_getCircumference(){return se(this.options.circumference)}_getRotationExtents(){let t=Hn;let n=-Hn;for(let e=0;e<this.chart.data.datasets.length;++e){if(this.chart.isDatasetVisible(e)&&this.chart.getDatasetMeta(e).type===this._type){const i=this.chart.getDatasetMeta(e).controller;const s=i._getRotation();const o=i._getCircumference();t=Math.min(t,s);n=Math.max(n,s+o)}}return{rotation:t,circumference:n-t}}update(t){const n=this.chart;const{chartArea:e}=n;const i=this._cachedMeta;const s=i.data;const o=this.getMaxBorderWidth()+this.getMaxOffset(s)+this.options.spacing;const r=Math.max((Math.min(e.width,e.height)-o)/2,0);const a=Math.min(vn(this.options.cutout,r),1);const c=this._getRingWeight(this.index);const{circumference:l,rotation:h}=this._getRotationExtents();const{ratioX:f,ratioY:u,offsetX:d,offsetY:p}=To(h,l,a);const g=(e.width-o)/f;const b=(e.height-o)/u;const m=Math.max(Math.min(g,b)/2,0);const y=kn(this.options.radius,m);const w=Math.max(y*a,0);const x=(y-w)/this._getVisibleDatasetWeightTotal();this.offsetX=d*y;this.offsetY=p*y;i.total=this.calculateTotal();this.outerRadius=y-x*this._getRingWeightOffset(this.index);this.innerRadius=Math.max(this.outerRadius-x*c,0);this.updateElements(s,0,s.length,t)}_circumference(t,n){const e=this.options;const i=this._cachedMeta;const s=this._getCircumference();if(n&&e.animation.animateRotate||!this.chart.getDataVisibility(t)||i._parsed[t]===null||i.data[t].hidden){return 0}return this.calculateCircumference(i._parsed[t]*s/Hn)}updateElements(t,n,e,i){const s=i==="reset";const o=this.chart;const r=o.chartArea;const a=o.options;const c=a.animation;const l=(r.left+r.right)/2;const h=(r.top+r.bottom)/2;const f=s&&c.animateScale;const u=f?0:this.innerRadius;const d=f?0:this.outerRadius;const{sharedOptions:p,includeOptions:g}=this._getSharedOptions(n,i);let b=this._getRotation();let m;for(m=0;m<n;++m){b+=this._circumference(m,s)}for(m=n;m<n+e;++m){const n=this._circumference(m,s);const e=t[m];const o={x:l+this.offsetX,y:h+this.offsetY,startAngle:b,endAngle:b+n,circumference:n,outerRadius:d,innerRadius:u};if(g){o.options=p||this.resolveDataElementOptions(m,e.active?"active":i)}b+=n;this.updateElement(e,m,o,i)}}calculateTotal(){const t=this._cachedMeta;const n=t.data;let e=0;let i;for(i=0;i<n.length;i++){const s=t._parsed[i];if(s!==null&&!isNaN(s)&&this.chart.getDataVisibility(i)&&!n[i].hidden){e+=Math.abs(s)}}return e}calculateCircumference(t){const n=this._cachedMeta.total;if(n>0&&!isNaN(t)){return Hn*(Math.abs(t)/n)}return 0}getLabelAndValue(t){const n=this._cachedMeta;const e=this.chart;const i=e.data.labels||[];const s=Ve(n._parsed[t],e.options.locale);return{label:i[t]||"",value:s}}getMaxBorderWidth(t){let n=0;const e=this.chart;let i,s,o,r,a;if(!t){for(i=0,s=e.data.datasets.length;i<s;++i){if(e.isDatasetVisible(i)){o=e.getDatasetMeta(i);t=o.data;r=o.controller;break}}}if(!t){return 0}for(i=0,s=t.length;i<s;++i){a=r.resolveDataElementOptions(i);if(a.borderAlign!=="inner"){n=Math.max(n,a.borderWidth||0,a.hoverBorderWidth||0)}}return n}getMaxOffset(t){let n=0;for(let e=0,i=t.length;e<i;++e){const t=this.resolveDataElementOptions(e);n=Math.max(n,t.offset||0,t.hoverOffset||0)}return n}_getRingWeightOffset(t){let n=0;for(let e=0;e<t;++e){if(this.chart.isDatasetVisible(e)){n+=this._getRingWeight(e)}}return n}_getRingWeight(t){return Math.max(xn(this.chart.data.datasets[t].weight,1),0)}_getVisibleDatasetWeightTotal(){return this._getRingWeightOffset(this.chart.data.datasets.length)||1}}class Fo extends wo{static id="line";static defaults={datasetElementType:"line",dataElementType:"point",showLine:true,spanGaps:false};static overrides={scales:{_index_:{type:"category"},_value_:{type:"linear"}}};initialize(){this.enableOptionSharing=true;this.supportsDecimation=true;super.initialize()}update(t){const n=this._cachedMeta;const{dataset:e,data:i=[],_dataset:s}=n;const o=this.chart._animationsDisabled;let{start:r,count:a}=Ce(n,i,o);this._drawStart=r;this._drawCount=a;if(De(n)){r=0;a=i.length}e._chart=this.chart;e._datasetIndex=this.index;e._decimated=!!s._decimated;e.points=i;const c=this.resolveDatasetElementOptions(t);if(!this.options.showLine){c.borderWidth=0}c.segment=this.options.segment;this.updateElement(e,undefined,{animated:!o,options:c},t);this.updateElements(i,r,a,t)}updateElements(t,n,e,i){const s=i==="reset";const{iScale:o,vScale:r,_stacked:a,_dataset:c}=this._cachedMeta;const{sharedOptions:l,includeOptions:h}=this._getSharedOptions(n,i);const f=o.axis;const u=r.axis;const{spanGaps:d,segment:p}=this.options;const g=ne(d)?d:Number.POSITIVE_INFINITY;const b=this.chart._animationsDisabled||s||i==="none";const m=n+e;const y=t.length;let w=n>0&&this.getParsed(n-1);for(let e=0;e<y;++e){const d=t[e];const y=b?d:{};if(e<n||e>=m){y.skip=true;continue}const x=this.getParsed(e);const v=gn(x[u]);const k=y[f]=o.getPixelForValue(x[f],e);const M=y[u]=s||v?r.getBasePixel():r.getPixelForValue(a?this.applyStack(r,x,a):x[u],e);y.skip=isNaN(k)||isNaN(M)||v;y.stop=e>0&&Math.abs(x[f]-w[f])>g;if(p){y.parsed=x;y.raw=c.data[e]}if(h){y.options=l||this.resolveDataElementOptions(e,d.active?"active":i)}if(!b){this.updateElement(d,e,y,i)}w=x}}getMaxOverflow(){const t=this._cachedMeta;const n=t.dataset;const e=n.options&&n.options.borderWidth||0;const i=t.data||[];if(!i.length){return e}const s=i[0].size(this.resolveDataElementOptions(0));const o=i[i.length-1].size(this.resolveDataElementOptions(i.length-1));return Math.max(e,s,o)/2}draw(){const t=this._cachedMeta;t.dataset.updateControlPoints(this.chart.chartArea,t.iScale.axis);super.draw()}}class Wo extends wo{static id="polarArea";static defaults={dataElementType:"arc",animation:{animateRotate:true,animateScale:true},animations:{numbers:{type:"number",properties:["x","y","startAngle","endAngle","innerRadius","outerRadius"]}},indexAxis:"r",startAngle:0};static overrides={aspectRatio:1,plugins:{legend:{labels:{generateLabels(t){const n=t.data;if(n.labels.length&&n.datasets.length){const{labels:{pointStyle:e,color:i}}=t.legend.options;return n.labels.map(((n,s)=>{const o=t.getDatasetMeta(0);const r=o.controller.getStyle(s);return{text:n,fillStyle:r.backgroundColor,strokeStyle:r.borderColor,fontColor:i,lineWidth:r.borderWidth,pointStyle:e,hidden:!t.getDataVisibility(s),index:s}}))}return[]}},onClick(t,n,e){e.chart.toggleDataVisibility(n.index);e.chart.update()}}},scales:{r:{type:"radialLinear",angleLines:{display:false},beginAtZero:true,grid:{circular:true},pointLabels:{display:false},startAngle:0}}};constructor(t,n){super(t,n);this.innerRadius=undefined;this.outerRadius=undefined}getLabelAndValue(t){const n=this._cachedMeta;const e=this.chart;const i=e.data.labels||[];const s=Ve(n._parsed[t].r,e.options.locale);return{label:i[t]||"",value:s}}parseObjectData(t,n,e,i){return qi.bind(this)(t,n,e,i)}update(t){const n=this._cachedMeta.data;this._updateRadius();this.updateElements(n,0,n.length,t)}getMinMax(){const t=this._cachedMeta;const n={min:Number.POSITIVE_INFINITY,max:Number.NEGATIVE_INFINITY};t.data.forEach(((t,e)=>{const i=this.getParsed(e).r;if(!isNaN(i)&&this.chart.getDataVisibility(e)){if(i<n.min){n.min=i}if(i>n.max){n.max=i}}}));return n}_updateRadius(){const t=this.chart;const n=t.chartArea;const e=t.options;const i=Math.min(n.right-n.left,n.bottom-n.top);const s=Math.max(i/2,0);const o=Math.max(e.cutoutPercentage?s/100*e.cutoutPercentage:1,0);const r=(s-o)/t.getVisibleDatasetCount();this.outerRadius=s-r*this.index;this.innerRadius=this.outerRadius-r}updateElements(t,n,e,i){const s=i==="reset";const o=this.chart;const r=o.options;const a=r.animation;const c=this._cachedMeta.rScale;const l=c.xCenter;const h=c.yCenter;const f=c.getIndexAngle(0)-.5*Bn;let u=f;let d;const p=360/this.countVisibleElements();for(d=0;d<n;++d){u+=this._computeAngle(d,i,p)}for(d=n;d<n+e;d++){const n=t[d];let e=u;let r=u+this._computeAngle(d,i,p);let g=o.getDataVisibility(d)?c.getDistanceFromCenterForValue(this.getParsed(d).r):0;u=r;if(s){if(a.animateScale){g=0}if(a.animateRotate){e=r=f}}const b={x:l,y:h,innerRadius:0,outerRadius:g,startAngle:e,endAngle:r,options:this.resolveDataElementOptions(d,n.active?"active":i)};this.updateElement(n,d,b,i)}}countVisibleElements(){const t=this._cachedMeta;let n=0;t.data.forEach(((t,e)=>{if(!isNaN(this.getParsed(e).r)&&this.chart.getDataVisibility(e)){n++}}));return n}_computeAngle(t,n,e){return this.chart.getDataVisibility(t)?se(this.resolveDataElementOptions(t,n).angle||e):0}}class Bo extends Io{static id="pie";static defaults={cutout:0,rotation:0,circumference:360,radius:"100%"}}class Ho extends wo{static id="radar";static defaults={datasetElementType:"line",dataElementType:"point",indexAxis:"r",showLine:true,elements:{line:{fill:"start"}}};static overrides={aspectRatio:1,scales:{r:{type:"radialLinear"}}};getLabelAndValue(t){const n=this._cachedMeta.vScale;const e=this.getParsed(t);return{label:n.getLabels()[t],value:""+n.getLabelForValue(e[n.axis])}}parseObjectData(t,n,e,i){return qi.bind(this)(t,n,e,i)}update(t){const n=this._cachedMeta;const e=n.dataset;const i=n.data||[];const s=n.iScale.getLabels();e.points=i;if(t!=="resize"){const n=this.resolveDatasetElementOptions(t);if(!this.options.showLine){n.borderWidth=0}const o={_loop:true,_fullLoop:s.length===i.length,options:n};this.updateElement(e,undefined,o,t)}this.updateElements(i,0,i.length,t)}updateElements(t,n,e,i){const s=this._cachedMeta.rScale;const o=i==="reset";for(let r=n;r<n+e;r++){const n=t[r];const e=this.resolveDataElementOptions(r,n.active?"active":i);const a=s.getPointPositionForValue(r,this.getParsed(r).r);const c=o?s.xCenter:a.x;const l=o?s.yCenter:a.y;const h={x:c,y:l,angle:a.angle,skip:isNaN(c)||isNaN(l),options:e};this.updateElement(n,r,h,i)}}}class $o extends wo{static id="scatter";static defaults={datasetElementType:false,dataElementType:"point",showLine:false,fill:false};static overrides={interaction:{mode:"point"},scales:{x:{type:"linear"},y:{type:"linear"}}};getLabelAndValue(t){const n=this._cachedMeta;const e=this.chart.data.labels||[];const{xScale:i,yScale:s}=n;const o=this.getParsed(t);const r=i.getLabelForValue(o.x);const a=s.getLabelForValue(o.y);return{label:e[t]||"",value:"("+r+", "+a+")"}}update(t){const n=this._cachedMeta;const{data:e=[]}=n;const i=this.chart._animationsDisabled;let{start:s,count:o}=Ce(n,e,i);this._drawStart=s;this._drawCount=o;if(De(n)){s=0;o=e.length}if(this.options.showLine){if(!this.datasetElementType){this.addElements()}const{dataset:s,_dataset:o}=n;s._chart=this.chart;s._datasetIndex=this.index;s._decimated=!!o._decimated;s.points=e;const r=this.resolveDatasetElementOptions(t);r.segment=this.options.segment;this.updateElement(s,undefined,{animated:!i,options:r},t)}else if(this.datasetElementType){delete n.dataset;this.datasetElementType=false}this.updateElements(e,s,o,t)}addElements(){const{showLine:t}=this.options;if(!this.datasetElementType&&t){this.datasetElementType=this.chart.registry.getElement("line")}super.addElements()}updateElements(t,n,e,i){const s=i==="reset";const{iScale:o,vScale:r,_stacked:a,_dataset:c}=this._cachedMeta;const l=this.resolveDataElementOptions(n,i);const h=this.getSharedOptions(l);const f=this.includeOptions(i,h);const u=o.axis;const d=r.axis;const{spanGaps:p,segment:g}=this.options;const b=ne(p)?p:Number.POSITIVE_INFINITY;const m=this.chart._animationsDisabled||s||i==="none";let y=n>0&&this.getParsed(n-1);for(let l=n;l<n+e;++l){const n=t[l];const e=this.getParsed(l);const p=m?n:{};const w=gn(e[d]);const x=p[u]=o.getPixelForValue(e[u],l);const v=p[d]=s||w?r.getBasePixel():r.getPixelForValue(a?this.applyStack(r,e,a):e[d],l);p.skip=isNaN(x)||isNaN(v)||w;p.stop=l>0&&Math.abs(e[u]-y[u])>b;if(g){p.parsed=e;p.raw=c.data[l]}if(f){p.options=h||this.resolveDataElementOptions(l,n.active?"active":i)}if(!m){this.updateElement(n,l,p,i)}y=e}this.updateSharedOptions(h,i,l)}getMaxOverflow(){const t=this._cachedMeta;const n=t.data||[];if(!this.options.showLine){let t=0;for(let e=n.length-1;e>=0;--e){t=Math.max(t,n[e].size(this.resolveDataElementOptions(e))/2)}return t>0&&t}const e=t.dataset;const i=e.options&&e.options.borderWidth||0;if(!n.length){return i}const s=n[0].size(this.resolveDataElementOptions(0));const o=n[n.length-1].size(this.resolveDataElementOptions(n.length-1));return Math.max(i,s,o)/2}}var Vo=Object.freeze({__proto__:null,BarController:Ro,BubbleController:No,DoughnutController:Io,LineController:Fo,PieController:Bo,PolarAreaController:Wo,RadarController:Ho,ScatterController:$o});function Yo(){throw new Error("This method is not implemented: Check that a complete date adapter is provided.")}class Uo{static override(t){Object.assign(Uo.prototype,t)}options;constructor(t){this.options=t||{}}init(){}formats(){return Yo()}parse(){return Yo()}format(){return Yo()}add(){return Yo()}diff(){return Yo()}startOf(){return Yo()}endOf(){return Yo()}}var Xo={_date:Uo};function Ko(t,n,e,i){const{controller:s,data:o,_sorted:r}=t;const a=s._cachedMeta.iScale;const c=t.dataset?t.dataset.options?t.dataset.options.spanGaps:null:null;if(a&&n===a.axis&&n!=="r"&&r&&o.length){const r=a._reversePixels?me:be;if(!i){const i=r(o,n,e);if(c){const{vScale:n}=s._cachedMeta;const{_parsed:e}=t;const o=e.slice(0,i.lo+1).reverse().findIndex((t=>!gn(t[n.axis])));i.lo-=Math.max(0,o);const r=e.slice(i.hi).findIndex((t=>!gn(t[n.axis])));i.hi+=Math.max(0,r)}return i}else if(s._sharedOptions){const t=o[0];const i=typeof t.getRange==="function"&&t.getRange(n);if(i){const t=r(o,n,e-i);const s=r(o,n,e+i);return{lo:t.lo,hi:s.hi}}}}return{lo:0,hi:o.length-1}}function qo(t,n,e,i,s){const o=t.getSortedVisibleDatasetMetas();const r=e[n];for(let t=0,e=o.length;t<e;++t){const{index:e,data:a}=o[t];const{lo:c,hi:l}=Ko(o[t],n,r,s);for(let t=c;t<=l;++t){const n=a[t];if(!n.skip){i(n,e,t)}}}}function Zo(t){const n=t.indexOf("x")!==-1;const e=t.indexOf("y")!==-1;return function(t,i){const s=n?Math.abs(t.x-i.x):0;const o=e?Math.abs(t.y-i.y):0;return Math.sqrt(Math.pow(s,2)+Math.pow(o,2))}}function Jo(t,n,e,i,s){const o=[];if(!s&&!t.isPointInArea(n)){return o}const r=function(e,r,a){if(!s&&!ci(e,t.chartArea,0)){return}if(e.inRange(n.x,n.y,i)){o.push({element:e,datasetIndex:r,index:a})}};qo(t,e,n,r,true);return o}function Qo(t,n,e,i){let s=[];function o(t,e,o){const{startAngle:r,endAngle:a}=t.getProps(["startAngle","endAngle"],i);const{angle:c}=ae(t,{x:n.x,y:n.y});if(fe(c,r,a)){s.push({element:t,datasetIndex:e,index:o})}}qo(t,e,n,o);return s}function Go(t,n,e,i,s,o){let r=[];const a=Zo(e);let c=Number.POSITIVE_INFINITY;function l(e,l,h){const f=e.inRange(n.x,n.y,s);if(i&&!f){return}const u=e.getCenterPoint(s);const d=!!o||t.isPointInArea(u);if(!d&&!f){return}const p=a(n,u);if(p<c){r=[{element:e,datasetIndex:l,index:h}];c=p}else if(p===c){r.push({element:e,datasetIndex:l,index:h})}}qo(t,e,n,l);return r}function tr(t,n,e,i,s,o){if(!o&&!t.isPointInArea(n)){return[]}return e==="r"&&!i?Qo(t,n,e,s):Go(t,n,e,i,s,o)}function nr(t,n,e,i,s){const o=[];const r=e==="x"?"inXRange":"inYRange";let a=false;qo(t,e,n,((t,i,c)=>{if(t[r]&&t[r](n[e],s)){o.push({element:t,datasetIndex:i,index:c});a=a||t.inRange(n.x,n.y,s)}}));if(i&&!a){return[]}return o}var er={modes:{index(t,n,e,i){const s=gs(n,t);const o=e.axis||"x";const r=e.includeInvisible||false;const a=e.intersect?Jo(t,s,o,i,r):tr(t,s,o,false,i,r);const c=[];if(!a.length){return[]}t.getSortedVisibleDatasetMetas().forEach((t=>{const n=a[0].index;const e=t.data[n];if(e&&!e.skip){c.push({element:e,datasetIndex:t.index,index:n})}}));return c},dataset(t,n,e,i){const s=gs(n,t);const o=e.axis||"xy";const r=e.includeInvisible||false;let a=e.intersect?Jo(t,s,o,i,r):tr(t,s,o,false,i,r);if(a.length>0){const n=a[0].datasetIndex;const e=t.getDatasetMeta(n).data;a=[];for(let t=0;t<e.length;++t){a.push({element:e[t],datasetIndex:n,index:t})}}return a},point(t,n,e,i){const s=gs(n,t);const o=e.axis||"xy";const r=e.includeInvisible||false;return Jo(t,s,o,i,r)},nearest(t,n,e,i){const s=gs(n,t);const o=e.axis||"xy";const r=e.includeInvisible||false;return tr(t,s,o,e.intersect,i,r)},x(t,n,e,i){const s=gs(n,t);return nr(t,s,"x",e.intersect,i)},y(t,n,e,i){const s=gs(n,t);return nr(t,s,"y",e.intersect,i)}}};const ir=["left","top","right","bottom"];function sr(t,n){return t.filter((t=>t.pos===n))}function or(t,n){return t.filter((t=>ir.indexOf(t.pos)===-1&&t.box.axis===n))}function rr(t,n){return t.sort(((t,e)=>{const i=n?e:t;const s=n?t:e;return i.weight===s.weight?i.index-s.index:i.weight-s.weight}))}function ar(t){const n=[];let e,i,s,o,r,a;for(e=0,i=(t||[]).length;e<i;++e){s=t[e];({position:o,options:{stack:r,stackWeight:a=1}}=s);n.push({index:e,box:s,pos:o,horizontal:s.isHorizontal(),weight:s.weight,stack:r&&o+r,stackWeight:a})}return n}function cr(t){const n={};for(const e of t){const{stack:t,pos:i,stackWeight:s}=e;if(!t||!ir.includes(i)){continue}const o=n[t]||(n[t]={count:0,placed:0,weight:0,size:0});o.count++;o.weight+=s}return n}function lr(t,n){const e=cr(t);const{vBoxMaxWidth:i,hBoxMaxHeight:s}=n;let o,r,a;for(o=0,r=t.length;o<r;++o){a=t[o];const{fullSize:r}=a.box;const c=e[a.stack];const l=c&&a.stackWeight/c.weight;if(a.horizontal){a.width=l?l*i:r&&n.availableWidth;a.height=s}else{a.width=i;a.height=l?l*s:r&&n.availableHeight}}return e}function hr(t){const n=ar(t);const e=rr(n.filter((t=>t.box.fullSize)),true);const i=rr(sr(n,"left"),true);const s=rr(sr(n,"right"));const o=rr(sr(n,"top"),true);const r=rr(sr(n,"bottom"));const a=or(n,"x");const c=or(n,"y");return{fullSize:e,leftAndTop:i.concat(o),rightAndBottom:s.concat(c).concat(r).concat(a),chartArea:sr(n,"chartArea"),vertical:i.concat(s).concat(c),horizontal:o.concat(r).concat(a)}}function fr(t,n,e,i){return Math.max(t[e],n[e])+Math.max(t[i],n[i])}function ur(t,n){t.top=Math.max(t.top,n.top);t.left=Math.max(t.left,n.left);t.bottom=Math.max(t.bottom,n.bottom);t.right=Math.max(t.right,n.right)}function dr(t,n,e,i){const{pos:s,box:o}=e;const r=t.maxPadding;if(!mn(s)){if(e.size){t[s]-=e.size}const n=i[e.stack]||{size:0,count:1};n.size=Math.max(n.size,e.horizontal?o.height:o.width);e.size=n.size/n.count;t[s]+=e.size}if(o.getPadding){ur(r,o.getPadding())}const a=Math.max(0,n.outerWidth-fr(r,t,"left","right"));const c=Math.max(0,n.outerHeight-fr(r,t,"top","bottom"));const l=a!==t.w;const h=c!==t.h;t.w=a;t.h=c;return e.horizontal?{same:l,other:h}:{same:h,other:l}}function pr(t){const n=t.maxPadding;function e(e){const i=Math.max(n[e]-t[e],0);t[e]+=i;return i}t.y+=e("top");t.x+=e("left");e("right");e("bottom")}function gr(t,n){const e=n.maxPadding;function i(t){const i={left:0,top:0,right:0,bottom:0};t.forEach((t=>{i[t]=Math.max(n[t],e[t])}));return i}return t?i(["left","right"]):i(["top","bottom"])}function br(t,n,e,i){const s=[];let o,r,a,c,l,h;for(o=0,r=t.length,l=0;o<r;++o){a=t[o];c=a.box;c.update(a.width||n.w,a.height||n.h,gr(a.horizontal,n));const{same:r,other:f}=dr(n,e,a,i);l|=r&&s.length;h=h||f;if(!c.fullSize){s.push(a)}}return l&&br(s,n,e,i)||h}function mr(t,n,e,i,s){t.top=e;t.left=n;t.right=n+i;t.bottom=e+s;t.width=i;t.height=s}function yr(t,n,e,i){const s=e.padding;let{x:o,y:r}=n;for(const a of t){const t=a.box;const c=i[a.stack]||{placed:0,weight:1};const l=a.stackWeight/c.weight||1;if(a.horizontal){const i=n.w*l;const o=c.size||t.height;if(Tn(c.start)){r=c.start}if(t.fullSize){mr(t,s.left,r,e.outerWidth-s.right-s.left,o)}else{mr(t,n.left+c.placed,r,i,o)}c.start=r;c.placed+=i;r=t.bottom}else{const i=n.h*l;const r=c.size||t.width;if(Tn(c.start)){o=c.start}if(t.fullSize){mr(t,o,s.top,r,e.outerHeight-s.bottom-s.top)}else{mr(t,o,n.top+c.placed,r,i)}c.start=o;c.placed+=i;o=t.right}}n.x=o;n.y=r}var wr={addBox(t,n){if(!t.boxes){t.boxes=[]}n.fullSize=n.fullSize||false;n.position=n.position||"top";n.weight=n.weight||0;n._layers=n._layers||function(){return[{z:0,draw(t){n.draw(t)}}]};t.boxes.push(n)},removeBox(t,n){const e=t.boxes?t.boxes.indexOf(n):-1;if(e!==-1){t.boxes.splice(e,1)}},configure(t,n,e){n.fullSize=e.fullSize;n.position=e.position;n.weight=e.weight},update(t,n,e,i){if(!t){return}const s=_i(t.options.layout.padding);const o=Math.max(n-s.width,0);const r=Math.max(e-s.height,0);const a=hr(t.boxes);const c=a.vertical;const l=a.horizontal;Sn(t.boxes,(t=>{if(typeof t.beforeLayout==="function"){t.beforeLayout()}}));const h=c.reduce(((t,n)=>n.box.options&&n.box.options.display===false?t:t+1),0)||1;const f=Object.freeze({outerWidth:n,outerHeight:e,padding:s,availableWidth:o,availableHeight:r,vBoxMaxWidth:o/2/h,hBoxMaxHeight:r/2});const u=Object.assign({},s);ur(u,_i(i));const d=Object.assign({maxPadding:u,w:o,h:r,x:s.left,y:s.top},s);const p=lr(c.concat(l),f);br(a.fullSize,d,f,p);br(c,d,f,p);if(br(l,d,f,p)){br(c,d,f,p)}pr(d);yr(a.leftAndTop,d,f,p);d.x+=d.w;d.y+=d.h;yr(a.rightAndBottom,d,f,p);t.chartArea={left:d.left,top:d.top,right:d.left+d.w,bottom:d.top+d.h,height:d.h,width:d.w};Sn(a.chartArea,(n=>{const e=n.box;Object.assign(e,t.chartArea);e.update(d.w,d.h,{left:0,top:0,right:0,bottom:0})}))}};class xr{acquireContext(t,n){}releaseContext(t){return false}addEventListener(t,n,e){}removeEventListener(t,n,e){}getDevicePixelRatio(){return 1}getMaximumSize(t,n,e,i){n=Math.max(0,n||t.width);e=e||t.height;return{width:n,height:Math.max(0,i?Math.floor(n/i):e)}}isAttached(t){return true}updateConfig(t){}}class vr extends xr{acquireContext(t){return t&&t.getContext&&t.getContext("2d")||null}updateConfig(t){t.options.animation=false}}const kr="$chartjs";const Mr={touchstart:"mousedown",touchmove:"mousemove",touchend:"mouseup",pointerenter:"mouseenter",pointerdown:"mousedown",pointermove:"mousemove",pointerup:"mouseup",pointerleave:"mouseout",pointerout:"mouseout"};const Sr=t=>t===null||t==="";function _r(t,n){const e=t.style;const i=t.getAttribute("height");const s=t.getAttribute("width");t[kr]={initial:{height:i,width:s,style:{display:e.display,height:e.height,width:e.width}}};e.display=e.display||"block";e.boxSizing=e.boxSizing||"border-box";if(Sr(s)){const n=vs(t,"width");if(n!==undefined){t.width=n}}if(Sr(i)){if(t.style.height===""){t.height=t.width/(n||2)}else{const n=vs(t,"height");if(n!==undefined){t.height=n}}}return t}const zr=xs?{passive:true}:false;function Pr(t,n,e){if(t){t.addEventListener(n,e,zr)}}function Or(t,n,e){if(t&&t.canvas){t.canvas.removeEventListener(n,e,zr)}}function Cr(t,n){const e=Mr[t.type]||t.type;const{x:i,y:s}=gs(t,n);return{type:e,chart:n,native:t,x:i!==undefined?i:null,y:s!==undefined?s:null}}function Dr(t,n){for(const e of t){if(e===n||e.contains(n)){return true}}}function Ar(t,n,e){const i=t.canvas;const s=new MutationObserver((t=>{let n=false;for(const e of t){n=n||Dr(e.addedNodes,i);n=n&&!Dr(e.removedNodes,i)}if(n){e()}}));s.observe(document,{childList:true,subtree:true});return s}function jr(t,n,e){const i=t.canvas;const s=new MutationObserver((t=>{let n=false;for(const e of t){n=n||Dr(e.removedNodes,i);n=n&&!Dr(e.addedNodes,i)}if(n){e()}}));s.observe(document,{childList:true,subtree:true});return s}const Er=new Map;let Lr=0;function Rr(){const t=window.devicePixelRatio;if(t===Lr){return}Lr=t;Er.forEach(((n,e)=>{if(e.currentDevicePixelRatio!==t){n()}}))}function Nr(t,n){if(!Er.size){window.addEventListener("resize",Rr)}Er.set(t,n)}function Tr(t){Er.delete(t);if(!Er.size){window.removeEventListener("resize",Rr)}}function Ir(t,n,e){const i=t.canvas;const s=i&&as(i);if(!s){return}const o=Se(((t,n)=>{const i=s.clientWidth;e(t,n);if(i<s.clientWidth){e()}}),window);const r=new ResizeObserver((t=>{const n=t[0];const e=n.contentRect.width;const i=n.contentRect.height;if(e===0&&i===0){return}o(e,i)}));r.observe(s);Nr(t,o);return r}function Fr(t,n,e){if(e){e.disconnect()}if(n==="resize"){Tr(t)}}function Wr(t,n,e){const i=t.canvas;const s=Se((n=>{if(t.ctx!==null){e(Cr(n,t))}}),t);Pr(i,n,s);return s}class Br extends xr{acquireContext(t,n){const e=t&&t.getContext&&t.getContext("2d");if(e&&e.canvas===t){_r(t,n);return e}return null}releaseContext(t){const n=t.canvas;if(!n[kr]){return false}const e=n[kr].initial;["height","width"].forEach((t=>{const i=e[t];if(gn(i)){n.removeAttribute(t)}else{n.setAttribute(t,i)}}));const i=e.style||{};Object.keys(i).forEach((t=>{n.style[t]=i[t]}));n.width=n.width;delete n[kr];return true}addEventListener(t,n,e){this.removeEventListener(t,n);const i=t.$proxies||(t.$proxies={});const s={attach:Ar,detach:jr,resize:Ir};const o=s[n]||Wr;i[n]=o(t,n,e)}removeEventListener(t,n){const e=t.$proxies||(t.$proxies={});const i=e[n];if(!i){return}const s={attach:Fr,detach:Fr,resize:Fr};const o=s[n]||Or;o(t,n,i);e[n]=undefined}getDevicePixelRatio(){return window.devicePixelRatio}getMaximumSize(t,n,e,i){return ys(t,n,e,i)}isAttached(t){const n=t&&as(t);return!!(n&&n.isConnected)}}function Hr(t){if(!rs()||typeof OffscreenCanvas!=="undefined"&&t instanceof OffscreenCanvas){return vr}return Br}class $r{static defaults={};static defaultRoutes=undefined;x;y;active=false;options;$animations;tooltipPosition(t){const{x:n,y:e}=this.getProps(["x","y"],t);return{x:n,y:e}}hasValue(){return ne(this.x)&&ne(this.y)}getProps(t,n){const e=this.$animations;if(!n||!e){return this}const i={};t.forEach((t=>{i[t]=e[t]&&e[t].active()?e[t]._to:this[t]}));return i}}function Vr(t,n){const e=t.options.ticks;const i=Yr(t);const s=Math.min(e.maxTicksLimit||i,i);const o=e.major.enabled?Xr(n):[];const r=o.length;const a=o[0];const c=o[r-1];const l=[];if(r>s){Kr(n,l,o,r/s);return l}const h=Ur(o,n,s);if(r>0){let t,e;const i=r>1?Math.round((c-a)/(r-1)):null;qr(n,l,h,gn(i)?0:a-i,a);for(t=0,e=r-1;t<e;t++){qr(n,l,h,o[t],o[t+1])}qr(n,l,h,c,gn(i)?n.length:c+i);return l}qr(n,l,h);return l}function Yr(t){const n=t.options.offset;const e=t._tickSize();const i=t._length/e+(n?0:1);const s=t._maxLength/e;return Math.floor(Math.min(i,s))}function Ur(t,n,e){const i=Zr(t);const s=n.length/e;if(!i){return Math.max(s,1)}const o=Gn(i);for(let t=0,n=o.length-1;t<n;t++){const n=o[t];if(n>s){return n}}return Math.max(s,1)}function Xr(t){const n=[];let e,i;for(e=0,i=t.length;e<i;e++){if(t[e].major){n.push(e)}}return n}function Kr(t,n,e,i){let s=0;let o=e[0];let r;i=Math.ceil(i);for(r=0;r<t.length;r++){if(r===o){n.push(t[r]);s++;o=e[s*i]}}}function qr(t,n,e,i,s){const o=xn(i,0);const r=Math.min(xn(s,t.length),t.length);let a=0;let c,l,h;e=Math.ceil(e);if(s){c=s-i;e=c/Math.floor(c/e)}h=o;while(h<0){a++;h=Math.round(o+a*e)}for(l=Math.max(o,0);l<r;l++){if(l===h){n.push(t[l]);a++;h=Math.round(o+a*e)}}}function Zr(t){const n=t.length;let e,i;if(n<2){return false}for(i=t[0],e=1;e<n;++e){if(t[e]-t[e-1]!==i){return false}}return i}const Jr=t=>t==="left"?"right":t==="right"?"left":t;const Qr=(t,n,e)=>n==="top"||n==="left"?t[n]+e:t[n]-e;const Gr=(t,n)=>Math.min(n||t,t);function ta(t,n){const e=[];const i=t.length/n;const s=t.length;let o=0;for(;o<s;o+=i){e.push(t[Math.floor(o)])}return e}function na(t,n,e){const i=t.ticks.length;const s=Math.min(n,i-1);const o=t._startPixel;const r=t._endPixel;const a=1e-6;let c=t.getPixelForTick(s);let l;if(e){if(i===1){l=Math.max(c-o,r-c)}else if(n===0){l=(t.getPixelForTick(1)-c)/2}else{l=(c-t.getPixelForTick(s-1))/2}c+=s<n?l:-l;if(c<o-a||c>r+a){return}}return c}function ea(t,n){Sn(t,(t=>{const e=t.gc;const i=e.length/2;let s;if(i>n){for(s=0;s<i;++s){delete t.data[e[s]]}e.splice(0,i)}}))}function ia(t){return t.drawTicks?t.tickLength:0}function sa(t,n){if(!t.display){return 0}const e=zi(t.font,n);const i=_i(t.padding);const s=bn(t.text)?t.text.length:1;return s*e.lineHeight+i.height}function oa(t,n){return Ci(t,{scale:n,type:"scale"})}function ra(t,n,e){return Ci(t,{tick:e,index:n,type:"tick"})}function aa(t,n,e){let i=ze(t);if(e&&n!=="right"||!e&&n==="right"){i=Jr(i)}return i}function ca(t,n,e,i){const{top:s,left:o,bottom:r,right:a,chart:c}=t;const{chartArea:l,scales:h}=c;let f=0;let u,d,p;const g=r-s;const b=a-o;if(t.isHorizontal()){d=Pe(i,o,a);if(mn(e)){const t=Object.keys(e)[0];const i=e[t];p=h[t].getPixelForValue(i)+g-n}else if(e==="center"){p=(l.bottom+l.top)/2+g-n}else{p=Qr(t,e,n)}u=a-o}else{if(mn(e)){const t=Object.keys(e)[0];const i=e[t];d=h[t].getPixelForValue(i)-b+n}else if(e==="center"){d=(l.left+l.right)/2-b+n}else{d=Qr(t,e,n)}p=Pe(i,r,s);f=e==="left"?-Un:Un}return{titleX:d,titleY:p,maxWidth:u,rotation:f}}class la extends $r{constructor(t){super();this.id=t.id;this.type=t.type;this.options=undefined;this.ctx=t.ctx;this.chart=t.chart;this.top=undefined;this.bottom=undefined;this.left=undefined;this.right=undefined;this.width=undefined;this.height=undefined;this._margins={left:0,right:0,top:0,bottom:0};this.maxWidth=undefined;this.maxHeight=undefined;this.paddingTop=undefined;this.paddingBottom=undefined;this.paddingLeft=undefined;this.paddingRight=undefined;this.axis=undefined;this.labelRotation=undefined;this.min=undefined;this.max=undefined;this._range=undefined;this.ticks=[];this._gridLineItems=null;this._labelItems=null;this._labelSizes=null;this._length=0;this._maxLength=0;this._longestTextCache={};this._startPixel=undefined;this._endPixel=undefined;this._reversePixels=false;this._userMax=undefined;this._userMin=undefined;this._suggestedMax=undefined;this._suggestedMin=undefined;this._ticksLength=0;this._borderValue=0;this._cache={};this._dataLimitsCached=false;this.$context=undefined}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,n){return t}getUserBounds(){let{_userMin:t,_userMax:n,_suggestedMin:e,_suggestedMax:i}=this;t=wn(t,Number.POSITIVE_INFINITY);n=wn(n,Number.NEGATIVE_INFINITY);e=wn(e,Number.POSITIVE_INFINITY);i=wn(i,Number.NEGATIVE_INFINITY);return{min:wn(t,e),max:wn(n,i),minDefined:yn(t),maxDefined:yn(n)}}getMinMax(t){let{min:n,max:e,minDefined:i,maxDefined:s}=this.getUserBounds();let o;if(i&&s){return{min:n,max:e}}const r=this.getMatchingVisibleMetas();for(let a=0,c=r.length;a<c;++a){o=r[a].controller.getMinMax(this,t);if(!i){n=Math.min(n,o.min)}if(!s){e=Math.max(e,o.max)}}n=s&&n>e?e:n;e=i&&n>e?n:e;return{min:wn(n,wn(e,n)),max:wn(e,wn(n,e))}}getPadding(){return{left:this.paddingLeft||0,top:this.paddingTop||0,right:this.paddingRight||0,bottom:this.paddingBottom||0}}getTicks(){return this.ticks}getLabels(){const t=this.chart.data;return this.options.labels||(this.isHorizontal()?t.xLabels:t.yLabels)||t.labels||[]}getLabelItems(t=this.chart.chartArea){const n=this._labelItems||(this._labelItems=this._computeLabelItems(t));return n}beforeLayout(){this._cache={};this._dataLimitsCached=false}beforeUpdate(){Mn(this.options.beforeUpdate,[this])}update(t,n,e){const{beginAtZero:i,grace:s,ticks:o}=this.options;const r=o.sampleSize;this.beforeUpdate();this.maxWidth=t;this.maxHeight=n;this._margins=e=Object.assign({left:0,right:0,top:0,bottom:0},e);this.ticks=null;this._labelSizes=null;this._gridLineItems=null;this._labelItems=null;this.beforeSetDimensions();this.setDimensions();this.afterSetDimensions();this._maxLength=this.isHorizontal()?this.width+e.left+e.right:this.height+e.top+e.bottom;if(!this._dataLimitsCached){this.beforeDataLimits();this.determineDataLimits();this.afterDataLimits();this._range=Oi(this,s,i);this._dataLimitsCached=true}this.beforeBuildTicks();this.ticks=this.buildTicks()||[];this.afterBuildTicks();const a=r<this.ticks.length;this._convertTicksToLabels(a?ta(this.ticks,r):this.ticks);this.configure();this.beforeCalculateLabelRotation();this.calculateLabelRotation();this.afterCalculateLabelRotation();if(o.display&&(o.autoSkip||o.source==="auto")){this.ticks=Vr(this,this.ticks);this._labelSizes=null;this.afterAutoSkip()}if(a){this._convertTicksToLabels(this.ticks)}this.beforeFit();this.fit();this.afterFit();this.afterUpdate()}configure(){let t=this.options.reverse;let n,e;if(this.isHorizontal()){n=this.left;e=this.right}else{n=this.top;e=this.bottom;t=!t}this._startPixel=n;this._endPixel=e;this._reversePixels=t;this._length=e-n;this._alignToPixels=this.options.alignToPixels}afterUpdate(){Mn(this.options.afterUpdate,[this])}beforeSetDimensions(){Mn(this.options.beforeSetDimensions,[this])}setDimensions(){if(this.isHorizontal()){this.width=this.maxWidth;this.left=0;this.right=this.width}else{this.height=this.maxHeight;this.top=0;this.bottom=this.height}this.paddingLeft=0;this.paddingTop=0;this.paddingRight=0;this.paddingBottom=0}afterSetDimensions(){Mn(this.options.afterSetDimensions,[this])}_callHooks(t){this.chart.notifyPlugins(t,this.getContext());Mn(this.options[t],[this])}beforeDataLimits(){this._callHooks("beforeDataLimits")}determineDataLimits(){}afterDataLimits(){this._callHooks("afterDataLimits")}beforeBuildTicks(){this._callHooks("beforeBuildTicks")}buildTicks(){return[]}afterBuildTicks(){this._callHooks("afterBuildTicks")}beforeTickToLabelConversion(){Mn(this.options.beforeTickToLabelConversion,[this])}generateTickLabels(t){const n=this.options.ticks;let e,i,s;for(e=0,i=t.length;e<i;e++){s=t[e];s.label=Mn(n.callback,[s.value,e,t],this)}}afterTickToLabelConversion(){Mn(this.options.afterTickToLabelConversion,[this])}beforeCalculateLabelRotation(){Mn(this.options.beforeCalculateLabelRotation,[this])}calculateLabelRotation(){const t=this.options;const n=t.ticks;const e=Gr(this.ticks.length,t.ticks.maxTicksLimit);const i=n.minRotation||0;const s=n.maxRotation;let o=i;let r,a,c;if(!this._isVisible()||!n.display||i>=s||e<=1||!this.isHorizontal()){this.labelRotation=i;return}const l=this._getLabelSizes();const h=l.widest.width;const f=l.highest.height;const u=ue(this.chart.width-h,0,this.maxWidth);r=t.offset?this.maxWidth/e:u/(e-1);if(h+6>r){r=u/(e-(t.offset?.5:1));a=this.maxHeight-ia(t.grid)-n.padding-sa(t.title,this.chart.options.font);c=Math.sqrt(h*h+f*f);o=oe(Math.min(Math.asin(ue((l.highest.height+6)/r,-1,1)),Math.asin(ue(a/c,-1,1))-Math.asin(ue(f/c,-1,1))));o=Math.max(i,Math.min(s,o))}this.labelRotation=o}afterCalculateLabelRotation(){Mn(this.options.afterCalculateLabelRotation,[this])}afterAutoSkip(){}beforeFit(){Mn(this.options.beforeFit,[this])}fit(){const t={width:0,height:0};const{chart:n,options:{ticks:e,title:i,grid:s}}=this;const o=this._isVisible();const r=this.isHorizontal();if(o){const o=sa(i,n.options.font);if(r){t.width=this.maxWidth;t.height=ia(s)+o}else{t.height=this.maxHeight;t.width=ia(s)+o}if(e.display&&this.ticks.length){const{first:n,last:i,widest:s,highest:o}=this._getLabelSizes();const a=e.padding*2;const c=se(this.labelRotation);const l=Math.cos(c);const h=Math.sin(c);if(r){const n=e.mirror?0:h*s.width+l*o.height;t.height=Math.min(this.maxHeight,t.height+n+a)}else{const n=e.mirror?0:l*s.width+h*o.height;t.width=Math.min(this.maxWidth,t.width+n+a)}this._calculatePadding(n,i,h,l)}}this._handleMargins();if(r){this.width=this._length=n.width-this._margins.left-this._margins.right;this.height=t.height}else{this.width=t.width;this.height=this._length=n.height-this._margins.top-this._margins.bottom}}_calculatePadding(t,n,e,i){const{ticks:{align:s,padding:o},position:r}=this.options;const a=this.labelRotation!==0;const c=r!=="top"&&this.axis==="x";if(this.isHorizontal()){const r=this.getPixelForTick(0)-this.left;const l=this.right-this.getPixelForTick(this.ticks.length-1);let h=0;let f=0;if(a){if(c){h=i*t.width;f=e*n.height}else{h=e*t.height;f=i*n.width}}else if(s==="start"){f=n.width}else if(s==="end"){h=t.width}else if(s!=="inner"){h=t.width/2;f=n.width/2}this.paddingLeft=Math.max((h-r+o)*this.width/(this.width-r),0);this.paddingRight=Math.max((f-l+o)*this.width/(this.width-l),0)}else{let e=n.height/2;let i=t.height/2;if(s==="start"){e=0;i=t.height}else if(s==="end"){e=n.height;i=0}this.paddingTop=e+o;this.paddingBottom=i+o}}_handleMargins(){if(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(){Mn(this.options.afterFit,[this])}isHorizontal(){const{axis:t,position:n}=this.options;return n==="top"||n==="bottom"||t==="x"}isFullSize(){return this.options.fullSize}_convertTicksToLabels(t){this.beforeTickToLabelConversion();this.generateTickLabels(t);let n,e;for(n=0,e=t.length;n<e;n++){if(gn(t[n].label)){t.splice(n,1);e--;n--}}this.afterTickToLabelConversion()}_getLabelSizes(){let t=this._labelSizes;if(!t){const n=this.options.ticks.sampleSize;let e=this.ticks;if(n<e.length){e=ta(e,n)}this._labelSizes=t=this._computeLabelSizes(e,e.length,this.options.ticks.maxTicksLimit)}return t}_computeLabelSizes(t,n,e){const{ctx:i,_longestTextCache:s}=this;const o=[];const r=[];const a=Math.floor(n/Gr(n,e));let c=0;let l=0;let h,f,u,d,p,g,b,m,y,w,x;for(h=0;h<n;h+=a){d=t[h].label;p=this._resolveTickFontOptions(h);i.font=g=p.string;b=s[g]=s[g]||{data:{},gc:[]};m=p.lineHeight;y=w=0;if(!gn(d)&&!bn(d)){y=ei(i,b.data,b.gc,y,d);w=m}else if(bn(d)){for(f=0,u=d.length;f<u;++f){x=d[f];if(!gn(x)&&!bn(x)){y=ei(i,b.data,b.gc,y,x);w+=m}}}o.push(y);r.push(w);c=Math.max(y,c);l=Math.max(w,l)}ea(s,n);const v=o.indexOf(c);const k=r.indexOf(l);const M=t=>({width:o[t]||0,height:r[t]||0});return{first:M(0),last:M(n-1),widest:M(v),highest:M(k),widths:o,heights:r}}getLabelForValue(t){return t}getPixelForValue(t,n){return NaN}getValueForPixel(t){}getPixelForTick(t){const n=this.ticks;if(t<0||t>n.length-1){return null}return this.getPixelForValue(n[t].value)}getPixelForDecimal(t){if(this._reversePixels){t=1-t}const n=this._startPixel+t*this._length;return de(this._alignToPixels?si(this.chart,n,0):n)}getDecimalForPixel(t){const n=(t-this._startPixel)/this._length;return this._reversePixels?1-n:n}getBasePixel(){return this.getPixelForValue(this.getBaseValue())}getBaseValue(){const{min:t,max:n}=this;return t<0&&n<0?n:t>0&&n>0?t:0}getContext(t){const n=this.ticks||[];if(t>=0&&t<n.length){const e=n[t];return e.$context||(e.$context=ra(this.getContext(),t,e))}return this.$context||(this.$context=oa(this.chart.getContext(),this))}_tickSize(){const t=this.options.ticks;const n=se(this.labelRotation);const e=Math.abs(Math.cos(n));const i=Math.abs(Math.sin(n));const s=this._getLabelSizes();const o=t.autoSkipPadding||0;const r=s?s.widest.width+o:0;const a=s?s.highest.height+o:0;return this.isHorizontal()?a*e>r*i?r/e:a/i:a*i<r*e?a/e:r/i}_isVisible(){const t=this.options.display;if(t!=="auto"){return!!t}return this.getMatchingVisibleMetas().length>0}_computeGridLineItems(t){const n=this.axis;const e=this.chart;const i=this.options;const{grid:s,position:o,border:r}=i;const a=s.offset;const c=this.isHorizontal();const l=this.ticks;const h=l.length+(a?1:0);const f=ia(s);const u=[];const d=r.setContext(this.getContext());const p=d.display?d.width:0;const g=p/2;const b=function(t){return si(e,t,p)};let m,y,w,x;let v,k,M,S,_,z,P,O;if(o==="top"){m=b(this.bottom);k=this.bottom-f;S=m-g;z=b(t.top)+g;O=t.bottom}else if(o==="bottom"){m=b(this.top);z=t.top;O=b(t.bottom)-g;k=m+g;S=this.top+f}else if(o==="left"){m=b(this.right);v=this.right-f;M=m-g;_=b(t.left)+g;P=t.right}else if(o==="right"){m=b(this.left);_=t.left;P=b(t.right)-g;v=m+g;M=this.left+f}else if(n==="x"){if(o==="center"){m=b((t.top+t.bottom)/2+.5)}else if(mn(o)){const t=Object.keys(o)[0];const n=o[t];m=b(this.chart.scales[t].getPixelForValue(n))}z=t.top;O=t.bottom;k=m+g;S=k+f}else if(n==="y"){if(o==="center"){m=b((t.left+t.right)/2)}else if(mn(o)){const t=Object.keys(o)[0];const n=o[t];m=b(this.chart.scales[t].getPixelForValue(n))}v=m-g;M=v-f;_=t.left;P=t.right}const C=xn(i.ticks.maxTicksLimit,h);const D=Math.max(1,Math.ceil(h/C));for(y=0;y<h;y+=D){const t=this.getContext(y);const n=s.setContext(t);const i=r.setContext(t);const o=n.lineWidth;const l=n.color;const h=i.dash||[];const f=i.dashOffset;const d=n.tickWidth;const p=n.tickColor;const g=n.tickBorderDash||[];const b=n.tickBorderDashOffset;w=na(this,y,a);if(w===undefined){continue}x=si(e,w,o);if(c){v=M=_=P=x}else{k=S=z=O=x}u.push({tx1:v,ty1:k,tx2:M,ty2:S,x1:_,y1:z,x2:P,y2:O,width:o,color:l,borderDash:h,borderDashOffset:f,tickWidth:d,tickColor:p,tickBorderDash:g,tickBorderDashOffset:b})}this._ticksLength=h;this._borderValue=m;return u}_computeLabelItems(t){const n=this.axis;const e=this.options;const{position:i,ticks:s}=e;const o=this.isHorizontal();const r=this.ticks;const{align:a,crossAlign:c,padding:l,mirror:h}=s;const f=ia(e.grid);const u=f+l;const d=h?-l:u;const p=-se(this.labelRotation);const g=[];let b,m,y,w,x,v,k,M,S,_,z,P;let O="middle";if(i==="top"){v=this.bottom-d;k=this._getXAxisLabelAlignment()}else if(i==="bottom"){v=this.top+d;k=this._getXAxisLabelAlignment()}else if(i==="left"){const t=this._getYAxisLabelAlignment(f);k=t.textAlign;x=t.x}else if(i==="right"){const t=this._getYAxisLabelAlignment(f);k=t.textAlign;x=t.x}else if(n==="x"){if(i==="center"){v=(t.top+t.bottom)/2+u}else if(mn(i)){const t=Object.keys(i)[0];const n=i[t];v=this.chart.scales[t].getPixelForValue(n)+u}k=this._getXAxisLabelAlignment()}else if(n==="y"){if(i==="center"){x=(t.left+t.right)/2-u}else if(mn(i)){const t=Object.keys(i)[0];const n=i[t];x=this.chart.scales[t].getPixelForValue(n)}k=this._getYAxisLabelAlignment(f).textAlign}if(n==="y"){if(a==="start"){O="top"}else if(a==="end"){O="bottom"}}const C=this._getLabelSizes();for(b=0,m=r.length;b<m;++b){y=r[b];w=y.label;const t=s.setContext(this.getContext(b));M=this.getPixelForTick(b)+s.labelOffset;S=this._resolveTickFontOptions(b);_=S.lineHeight;z=bn(w)?w.length:1;const n=z/2;const e=t.color;const a=t.textStrokeColor;const l=t.textStrokeWidth;let f=k;if(o){x=M;if(k==="inner"){if(b===m-1){f=!this.options.reverse?"right":"left"}else if(b===0){f=!this.options.reverse?"left":"right"}else{f="center"}}if(i==="top"){if(c==="near"||p!==0){P=-z*_+_/2}else if(c==="center"){P=-C.highest.height/2-n*_+_}else{P=-C.highest.height+_/2}}else{if(c==="near"||p!==0){P=_/2}else if(c==="center"){P=C.highest.height/2-n*_}else{P=C.highest.height-z*_}}if(h){P*=-1}if(p!==0&&!t.showLabelBackdrop){x+=_/2*Math.sin(p)}}else{v=M;P=(1-z)*_/2}let u;if(t.showLabelBackdrop){const n=_i(t.backdropPadding);const e=C.heights[b];const i=C.widths[b];let s=P-n.top;let o=0-n.left;switch(O){case"middle":s-=e/2;break;case"bottom":s-=e;break}switch(k){case"center":o-=i/2;break;case"right":o-=i;break;case"inner":if(b===m-1){o-=i}else if(b>0){o-=i/2}break}u={left:o,top:s,width:i+n.width,height:e+n.height,color:t.backdropColor}}g.push({label:w,font:S,textOffset:P,options:{rotation:p,color:e,strokeColor:a,strokeWidth:l,textAlign:f,textBaseline:O,translation:[x,v],backdrop:u}})}return g}_getXAxisLabelAlignment(){const{position:t,ticks:n}=this.options;const e=-se(this.labelRotation);if(e){return t==="top"?"left":"right"}let i="center";if(n.align==="start"){i="left"}else if(n.align==="end"){i="right"}else if(n.align==="inner"){i="inner"}return i}_getYAxisLabelAlignment(t){const{position:n,ticks:{crossAlign:e,mirror:i,padding:s}}=this.options;const o=this._getLabelSizes();const r=t+s;const a=o.widest.width;let c;let l;if(n==="left"){if(i){l=this.right+s;if(e==="near"){c="left"}else if(e==="center"){c="center";l+=a/2}else{c="right";l+=a}}else{l=this.right-r;if(e==="near"){c="right"}else if(e==="center"){c="center";l-=a/2}else{c="left";l=this.left}}}else if(n==="right"){if(i){l=this.left+s;if(e==="near"){c="right"}else if(e==="center"){c="center";l-=a/2}else{c="left";l-=a}}else{l=this.left+r;if(e==="near"){c="left"}else if(e==="center"){c="center";l+=a/2}else{c="right";l=this.right}}}else{c="right"}return{textAlign:c,x:l}}_computeLabelArea(){if(this.options.ticks.mirror){return}const t=this.chart;const n=this.options.position;if(n==="left"||n==="right"){return{top:0,left:this.left,bottom:t.height,right:this.right}}if(n==="top"||n==="bottom"){return{top:this.top,left:0,bottom:this.bottom,right:t.width}}}drawBackground(){const{ctx:t,options:{backgroundColor:n},left:e,top:i,width:s,height:o}=this;if(n){t.save();t.fillStyle=n;t.fillRect(e,i,s,o);t.restore()}}getLineWidthForValue(t){const n=this.options.grid;if(!this._isVisible()||!n.display){return 0}const e=this.ticks;const i=e.findIndex((n=>n.value===t));if(i>=0){const t=n.setContext(this.getContext(i));return t.lineWidth}return 0}drawGrid(t){const n=this.options.grid;const e=this.ctx;const i=this._gridLineItems||(this._gridLineItems=this._computeGridLineItems(t));let s,o;const r=(t,n,i)=>{if(!i.width||!i.color){return}e.save();e.lineWidth=i.width;e.strokeStyle=i.color;e.setLineDash(i.borderDash||[]);e.lineDashOffset=i.borderDashOffset;e.beginPath();e.moveTo(t.x,t.y);e.lineTo(n.x,n.y);e.stroke();e.restore()};if(n.display){for(s=0,o=i.length;s<o;++s){const t=i[s];if(n.drawOnChartArea){r({x:t.x1,y:t.y1},{x:t.x2,y:t.y2},t)}if(n.drawTicks){r({x:t.tx1,y:t.ty1},{x:t.tx2,y:t.ty2},{color:t.tickColor,width:t.tickWidth,borderDash:t.tickBorderDash,borderDashOffset:t.tickBorderDashOffset})}}}}drawBorder(){const{chart:t,ctx:n,options:{border:e,grid:i}}=this;const s=e.setContext(this.getContext());const o=e.display?s.width:0;if(!o){return}const r=i.setContext(this.getContext(0)).lineWidth;const a=this._borderValue;let c,l,h,f;if(this.isHorizontal()){c=si(t,this.left,o)-o/2;l=si(t,this.right,r)+r/2;h=f=a}else{h=si(t,this.top,o)-o/2;f=si(t,this.bottom,r)+r/2;c=l=a}n.save();n.lineWidth=s.width;n.strokeStyle=s.color;n.beginPath();n.moveTo(c,h);n.lineTo(l,f);n.stroke();n.restore()}drawLabels(t){const n=this.options.ticks;if(!n.display){return}const e=this.ctx;const i=this._computeLabelArea();if(i){li(e,i)}const s=this.getLabelItems(t);for(const t of s){const n=t.options;const i=t.font;const s=t.label;const o=t.textOffset;bi(e,s,0,o,i,n)}if(i){hi(e)}}drawTitle(){const{ctx:t,options:{position:n,title:e,reverse:i}}=this;if(!e.display){return}const s=zi(e.font);const o=_i(e.padding);const r=e.align;let a=s.lineHeight/2;if(n==="bottom"||n==="center"||mn(n)){a+=o.bottom;if(bn(e.text)){a+=s.lineHeight*(e.text.length-1)}}else{a+=o.top}const{titleX:c,titleY:l,maxWidth:h,rotation:f}=ca(this,a,n,r);bi(t,e.text,0,0,s,{color:e.color,maxWidth:h,rotation:f,textAlign:aa(r,n,i),textBaseline:"middle",translation:[c,l]})}draw(t){if(!this._isVisible()){return}this.drawBackground();this.drawGrid(t);this.drawBorder();this.drawTitle();this.drawLabels(t)}_layers(){const t=this.options;const n=t.ticks&&t.ticks.z||0;const e=xn(t.grid&&t.grid.z,-1);const i=xn(t.border&&t.border.z,0);if(!this._isVisible()||this.draw!==la.prototype.draw){return[{z:n,draw:t=>{this.draw(t)}}]}return[{z:e,draw:t=>{this.drawBackground();this.drawGrid(t);this.drawTitle()}},{z:i,draw:()=>{this.drawBorder()}},{z:n,draw:t=>{this.drawLabels(t)}}]}getMatchingVisibleMetas(t){const n=this.chart.getSortedVisibleDatasetMetas();const e=this.axis+"AxisID";const i=[];let s,o;for(s=0,o=n.length;s<o;++s){const o=n[s];if(o[e]===this.id&&(!t||o.type===t)){i.push(o)}}return i}_resolveTickFontOptions(t){const n=this.options.ticks.setContext(this.getContext(t));return zi(n.font)}_maxDigits(){const t=this._resolveTickFontOptions(0).lineHeight;return(this.isHorizontal()?this.width:this.height)/t}}class ha{constructor(t,n,e){this.type=t;this.scope=n;this.override=e;this.items=Object.create(null)}isForType(t){return Object.prototype.isPrototypeOf.call(this.type.prototype,t.prototype)}register(t){const n=Object.getPrototypeOf(t);let e;if(da(n)){e=this.register(n)}const i=this.items;const s=t.id;const o=this.scope+"."+s;if(!s){throw new Error("class does not have id: "+t)}if(s in i){return o}i[s]=t;fa(t,o,e);if(this.override){ti.override(t.id,t.overrides)}return o}get(t){return this.items[t]}unregister(t){const n=this.items;const e=t.id;const i=this.scope;if(e in n){delete n[e]}if(i&&e in ti[i]){delete ti[i][e];if(this.override){delete qe[e]}}}}function fa(t,n,e){const i=Cn(Object.create(null),[e?ti.get(e):{},ti.get(n),t.defaults]);ti.set(n,i);if(t.defaultRoutes){ua(n,t.defaultRoutes)}if(t.descriptors){ti.describe(n,t.descriptors)}}function ua(t,n){Object.keys(n).forEach((e=>{const i=e.split(".");const s=i.pop();const o=[t].concat(i).join(".");const r=n[e].split(".");const a=r.pop();const c=r.join(".");ti.route(o,s,c,a)}))}function da(t){return"id"in t&&"defaults"in t}class pa{constructor(){this.controllers=new ha(wo,"datasets",true);this.elements=new ha($r,"elements");this.plugins=new ha(Object,"plugins");this.scales=new ha(la,"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,n,e){[...n].forEach((n=>{const i=e||this._getRegistryForType(n);if(e||i.isForType(n)||i===this.plugins&&n.id){this._exec(t,i,n)}else{Sn(n,(n=>{const i=e||this._getRegistryForType(n);this._exec(t,i,n)}))}}))}_exec(t,n,e){const i=Nn(t);Mn(e["before"+i],[],e);n[t](e);Mn(e["after"+i],[],e)}_getRegistryForType(t){for(let n=0;n<this._typedRegistries.length;n++){const e=this._typedRegistries[n];if(e.isForType(t)){return e}}return this.plugins}_get(t,n,e){const i=n.get(t);if(i===undefined){throw new Error('"'+t+'" is not a registered '+e+".")}return i}}var ga=new pa;class ba{constructor(){this._init=[]}notify(t,n,e,i){if(n==="beforeInit"){this._init=this._createDescriptors(t,true);this._notify(this._init,t,"install")}const s=i?this._descriptors(t).filter(i):this._descriptors(t);const o=this._notify(s,t,n,e);if(n==="afterDestroy"){this._notify(s,t,"stop");this._notify(this._init,t,"uninstall")}return o}_notify(t,n,e,i){i=i||{};for(const s of t){const t=s.plugin;const o=t[e];const r=[n,i,s.options];if(Mn(o,r,t)===false&&i.cancelable){return false}}return true}invalidate(){if(!gn(this._cache)){this._oldCache=this._cache;this._cache=undefined}}_descriptors(t){if(this._cache){return this._cache}const n=this._cache=this._createDescriptors(t);this._notifyStateChanges(t);return n}_createDescriptors(t,n){const e=t&&t.config;const i=xn(e.options&&e.options.plugins,{});const s=ma(e);return i===false&&!n?[]:wa(t,s,i,n)}_notifyStateChanges(t){const n=this._oldCache||[];const e=this._cache;const i=(t,n)=>t.filter((t=>!n.some((n=>t.plugin.id===n.plugin.id))));this._notify(i(n,e),t,"stop");this._notify(i(e,n),t,"start")}}function ma(t){const n={};const e=[];const i=Object.keys(ga.plugins.items);for(let t=0;t<i.length;t++){e.push(ga.getPlugin(i[t]))}const s=t.plugins||[];for(let t=0;t<s.length;t++){const i=s[t];if(e.indexOf(i)===-1){e.push(i);n[i.id]=true}}return{plugins:e,localIds:n}}function ya(t,n){if(!n&&t===false){return null}if(t===true){return{}}return t}function wa(t,{plugins:n,localIds:e},i,s){const o=[];const r=t.getContext();for(const a of n){const n=a.id;const c=ya(i[n],s);if(c===null){continue}o.push({plugin:a,options:xa(t.config,{plugin:a,local:e[n]},c,r)})}return o}function xa(t,{plugin:n,local:e},i,s){const o=t.pluginScopeKeys(n);const r=t.getOptionScopes(i,o);if(e&&n.defaults){r.push(n.defaults)}return t.createResolver(r,s,[""],{scriptable:false,indexable:false,allKeys:true})}function va(t,n){const e=ti.datasets[t]||{};const i=(n.datasets||{})[t]||{};return i.indexAxis||n.indexAxis||e.indexAxis||"x"}function ka(t,n){let e=t;if(t==="_index_"){e=n}else if(t==="_value_"){e=n==="x"?"y":"x"}return e}function Ma(t,n){return t===n?"_index_":"_value_"}function Sa(t){if(t==="x"||t==="y"||t==="r"){return t}}function _a(t){if(t==="top"||t==="bottom"){return"x"}if(t==="left"||t==="right"){return"y"}}function za(t,...n){if(Sa(t)){return t}for(const e of n){const n=e.axis||_a(e.position)||t.length>1&&Sa(t[0].toLowerCase());if(n){return n}}throw new Error(`Cannot determine type of '${t}' axis. Please provide 'axis' or 'position' option.`)}function Pa(t,n,e){if(e[n+"AxisID"]===t){return{axis:n}}}function Oa(t,n){if(n.data&&n.data.datasets){const e=n.data.datasets.filter((n=>n.xAxisID===t||n.yAxisID===t));if(e.length){return Pa(t,"x",e[0])||Pa(t,"y",e[0])}}return{}}function Ca(t,n){const e=qe[t.type]||{scales:{}};const i=n.scales||{};const s=va(t.type,n);const o=Object.create(null);Object.keys(i).forEach((n=>{const r=i[n];if(!mn(r)){return console.error(`Invalid scale configuration for scale: ${n}`)}if(r._proxy){return console.warn(`Ignoring resolver passed as options for scale: ${n}`)}const a=za(n,r,Oa(n,t),ti.scales[r.type]);const c=Ma(a,s);const l=e.scales||{};o[n]=Dn(Object.create(null),[{axis:a},r,l[a],l[c]])}));t.data.datasets.forEach((e=>{const s=e.type||t.type;const r=e.indexAxis||va(s,n);const a=qe[s]||{};const c=a.scales||{};Object.keys(c).forEach((t=>{const n=ka(t,r);const s=e[n+"AxisID"]||n;o[s]=o[s]||Object.create(null);Dn(o[s],[{axis:n},i[s],c[t]])}))}));Object.keys(o).forEach((t=>{const n=o[t];Dn(n,[ti.scales[n.type],ti.scale])}));return o}function Da(t){const n=t.options||(t.options={});n.plugins=xn(n.plugins,{});n.scales=Ca(t,n)}function Aa(t){t=t||{};t.datasets=t.datasets||[];t.labels=t.labels||[];return t}function ja(t){t=t||{};t.data=Aa(t.data);Da(t);return t}const Ea=new Map;const La=new Set;function Ra(t,n){let e=Ea.get(t);if(!e){e=n();Ea.set(t,e);La.add(e)}return e}const Na=(t,n,e)=>{const i=Rn(n,e);if(i!==undefined){t.add(i)}};class Ta{constructor(t){this._config=ja(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=Aa(t)}get options(){return this._config.options}set options(t){this._config.options=t}get plugins(){return this._config.plugins}update(){const t=this._config;this.clearCache();Da(t)}clearCache(){this._scopeCache.clear();this._resolverCache.clear()}datasetScopeKeys(t){return Ra(t,(()=>[[`datasets.${t}`,""]]))}datasetAnimationScopeKeys(t,n){return Ra(`${t}.transition.${n}`,(()=>[[`datasets.${t}.transitions.${n}`,`transitions.${n}`],[`datasets.${t}`,""]]))}datasetElementScopeKeys(t,n){return Ra(`${t}-${n}`,(()=>[[`datasets.${t}.elements.${n}`,`datasets.${t}`,`elements.${n}`,""]]))}pluginScopeKeys(t){const n=t.id;const e=this.type;return Ra(`${e}-plugin-${n}`,(()=>[[`plugins.${n}`,...t.additionalOptionScopes||[]]]))}_cachedScopes(t,n){const e=this._scopeCache;let i=e.get(t);if(!i||n){i=new Map;e.set(t,i)}return i}getOptionScopes(t,n,e){const{options:i,type:s}=this;const o=this._cachedScopes(t,e);const r=o.get(n);if(r){return r}const a=new Set;n.forEach((n=>{if(t){a.add(t);n.forEach((n=>Na(a,t,n)))}n.forEach((t=>Na(a,i,t)));n.forEach((t=>Na(a,qe[s]||{},t)));n.forEach((t=>Na(a,ti,t)));n.forEach((t=>Na(a,Ze,t)))}));const c=Array.from(a);if(c.length===0){c.push(Object.create(null))}if(La.has(n)){o.set(n,c)}return c}chartOptionScopes(){const{options:t,type:n}=this;return[t,qe[n]||{},ti.datasets[n]||{},{type:n},ti,Ze]}resolveNamedOptions(t,n,e,i=[""]){const s={$shared:true};const{resolver:o,subPrefixes:r}=Ia(this._resolverCache,t,i);let a=o;if(Wa(o,n)){s.$shared=false;e=In(e)?e():e;const n=this.createResolver(t,e,r);a=Ai(o,e,n)}for(const t of n){s[t]=a[t]}return s}createResolver(t,n,e=[""],i){const{resolver:s}=Ia(this._resolverCache,t,e);return mn(n)?Ai(s,n,undefined,i):s}}function Ia(t,n,e){let i=t.get(n);if(!i){i=new Map;t.set(n,i)}const s=e.join();let o=i.get(s);if(!o){const t=Di(n,e);o={resolver:t,subPrefixes:e.filter((t=>!t.toLowerCase().includes("hover")))};i.set(s,o)}return o}const Fa=t=>mn(t)&&Object.getOwnPropertyNames(t).some((n=>In(t[n])));function Wa(t,n){const{isScriptable:e,isIndexable:i}=ji(t);for(const s of n){const n=e(s);const o=i(s);const r=(o||n)&&t[s];if(n&&(In(r)||Fa(r))||o&&bn(r)){return true}}return false}var Ba="4.4.9";const Ha=["top","bottom","left","right","chartArea"];function $a(t,n){return t==="top"||t==="bottom"||Ha.indexOf(t)===-1&&n==="x"}function Va(t,n){return function(e,i){return e[t]===i[t]?e[n]-i[n]:e[t]-i[t]}}function Ya(t){const n=t.chart;const e=n.options.animation;n.notifyPlugins("afterRender");Mn(e&&e.onComplete,[t],n)}function Ua(t){const n=t.chart;const e=n.options.animation;Mn(e&&e.onProgress,[t],n)}function Xa(t){if(rs()&&typeof t==="string"){t=document.getElementById(t)}else if(t&&t.length){t=t[0]}if(t&&t.canvas){t=t.canvas}return t}const Ka={};const qa=t=>{const n=Xa(t);return Object.values(Ka).filter((t=>t.canvas===n)).pop()};function Za(t,n,e){const i=Object.keys(t);for(const s of i){const i=+s;if(i>=n){const o=t[s];delete t[s];if(e>0||i>n){t[i+e]=o}}}}function Ja(t,n,e,i){if(!e||t.type==="mouseout"){return null}if(i){return n}return t}class Qa{static defaults=ti;static instances=Ka;static overrides=qe;static registry=ga;static version=Ba;static getChart=qa;static register(...t){ga.add(...t);Ga()}static unregister(...t){ga.remove(...t);Ga()}constructor(t,n){const e=this.config=new Ta(n);const i=Xa(t);const s=qa(i);if(s){throw new Error("Canvas is already in use. Chart with ID '"+s.id+"'"+" must be destroyed before the canvas with ID '"+s.canvas.id+"' can be reused.")}const o=e.createResolver(e.chartOptionScopes(),this.getContext());this.platform=new(e.platform||Hr(i));this.platform.updateConfig(e);const r=this.platform.acquireContext(i,o.aspectRatio);const a=r&&r.canvas;const c=a&&a.height;const l=a&&a.width;this.id=pn();this.ctx=r;this.canvas=a;this.width=l;this.height=c;this._options=o;this._aspectRatio=this.aspectRatio;this._layers=[];this._metasets=[];this._stacks=undefined;this.boxes=[];this.currentDevicePixelRatio=undefined;this.chartArea=undefined;this._active=[];this._lastEvent=undefined;this._listeners={};this._responsiveListeners=undefined;this._sortedMetasets=[];this.scales={};this._plugins=new ba;this.$proxies={};this._hiddenIndices={};this.attached=false;this._animationsDisabled=undefined;this.$context=undefined;this._doResize=_e((t=>this.update(t)),o.resizeDelay||0);this._dataChanges=[];Ka[this.id]=this;if(!r||!a){console.error("Failed to create chart: can't acquire context from the given item");return}Us.listen(this,"complete",Ya);Us.listen(this,"progress",Ua);this._initialize();if(this.attached){this.update()}}get aspectRatio(){const{options:{aspectRatio:t,maintainAspectRatio:n},width:e,height:i,_aspectRatio:s}=this;if(!gn(t)){return t}if(n&&s){return s}return i?e/i:null}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 ga}_initialize(){this.notifyPlugins("beforeInit");if(this.options.responsive){this.resize()}else{ws(this,this.options.devicePixelRatio)}this.bindEvents();this.notifyPlugins("afterInit");return this}clear(){oi(this.canvas,this.ctx);return this}stop(){Us.stop(this);return this}resize(t,n){if(!Us.running(this)){this._resize(t,n)}else{this._resizeBeforeDraw={width:t,height:n}}}_resize(t,n){const e=this.options;const i=this.canvas;const s=e.maintainAspectRatio&&this.aspectRatio;const o=this.platform.getMaximumSize(i,t,n,s);const r=e.devicePixelRatio||this.platform.getDevicePixelRatio();const a=this.width?"resize":"attach";this.width=o.width;this.height=o.height;this._aspectRatio=this.aspectRatio;if(!ws(this,r,true)){return}this.notifyPlugins("resize",{size:o});Mn(e.onResize,[this,o],this);if(this.attached){if(this._doResize(a)){this.render()}}}ensureScalesHaveIDs(){const t=this.options;const n=t.scales||{};Sn(n,((t,n)=>{t.id=n}))}buildOrUpdateScales(){const t=this.options;const n=t.scales;const e=this.scales;const i=Object.keys(e).reduce(((t,n)=>{t[n]=false;return t}),{});let s=[];if(n){s=s.concat(Object.keys(n).map((t=>{const e=n[t];const i=za(t,e);const s=i==="r";const o=i==="x";return{options:e,dposition:s?"chartArea":o?"bottom":"left",dtype:s?"radialLinear":o?"category":"linear"}})))}Sn(s,(n=>{const s=n.options;const o=s.id;const r=za(o,s);const a=xn(s.type,n.dtype);if(s.position===undefined||$a(s.position,r)!==$a(n.dposition)){s.position=n.dposition}i[o]=true;let c=null;if(o in e&&e[o].type===a){c=e[o]}else{const t=ga.getScale(a);c=new t({id:o,type:a,ctx:this.ctx,chart:this});e[c.id]=c}c.init(s,t)}));Sn(i,((t,n)=>{if(!t){delete e[n]}}));Sn(e,(t=>{wr.configure(this,t,t.options);wr.addBox(this,t)}))}_updateMetasets(){const t=this._metasets;const n=this.data.datasets.length;const e=t.length;t.sort(((t,n)=>t.index-n.index));if(e>n){for(let t=n;t<e;++t){this._destroyDatasetMeta(t)}t.splice(n,e-n)}this._sortedMetasets=t.slice(0).sort(Va("order","index"))}_removeUnreferencedMetasets(){const{_metasets:t,data:{datasets:n}}=this;if(t.length>n.length){delete this._stacks}t.forEach(((t,e)=>{if(n.filter((n=>n===t._dataset)).length===0){this._destroyDatasetMeta(e)}}))}buildOrUpdateControllers(){const t=[];const n=this.data.datasets;let e,i;this._removeUnreferencedMetasets();for(e=0,i=n.length;e<i;e++){const i=n[e];let s=this.getDatasetMeta(e);const o=i.type||this.config.type;if(s.type&&s.type!==o){this._destroyDatasetMeta(e);s=this.getDatasetMeta(e)}s.type=o;s.indexAxis=i.indexAxis||va(o,this.options);s.order=i.order||0;s.index=e;s.label=""+i.label;s.visible=this.isDatasetVisible(e);if(s.controller){s.controller.updateIndex(e);s.controller.linkScales()}else{const n=ga.getController(o);const{datasetElementType:i,dataElementType:r}=ti.datasets[o];Object.assign(n,{dataElementType:ga.getElement(r),datasetElementType:i&&ga.getElement(i)});s.controller=new n(this,e);t.push(s.controller)}}this._updateMetasets();return t}_resetElements(){Sn(this.data.datasets,((t,n)=>{this.getDatasetMeta(n).controller.reset()}),this)}reset(){this._resetElements();this.notifyPlugins("reset")}update(t){const n=this.config;n.update();const e=this._options=n.createResolver(n.chartOptionScopes(),this.getContext());const i=this._animationsDisabled=!e.animation;this._updateScales();this._checkEventBindings();this._updateHiddenIndices();this._plugins.invalidate();if(this.notifyPlugins("beforeUpdate",{mode:t,cancelable:true})===false){return}const s=this.buildOrUpdateControllers();this.notifyPlugins("beforeElementsUpdate");let o=0;for(let t=0,n=this.data.datasets.length;t<n;t++){const{controller:n}=this.getDatasetMeta(t);const e=!i&&s.indexOf(n)===-1;n.buildOrUpdateElements(e);o=Math.max(+n.getMaxOverflow(),o)}o=this._minPadding=e.layout.autoPadding?o:0;this._updateLayout(o);if(!i){Sn(s,(t=>{t.reset()}))}this._updateDatasets(t);this.notifyPlugins("afterUpdate",{mode:t});this._layers.sort(Va("z","_idx"));const{_active:r,_lastEvent:a}=this;if(a){this._eventHandler(a,true)}else if(r.length){this._updateHoverStyles(r,r,true)}this.render()}_updateScales(){Sn(this.scales,(t=>{wr.removeBox(this,t)}));this.ensureScalesHaveIDs();this.buildOrUpdateScales()}_checkEventBindings(){const t=this.options;const n=new Set(Object.keys(this._listeners));const e=new Set(t.events);if(!Fn(n,e)||!!this._responsiveListeners!==t.responsive){this.unbindEvents();this.bindEvents()}}_updateHiddenIndices(){const{_hiddenIndices:t}=this;const n=this._getUniformDataChanges()||[];for(const{method:e,start:i,count:s}of n){const n=e==="_removeElements"?-s:s;Za(t,i,n)}}_getUniformDataChanges(){const t=this._dataChanges;if(!t||!t.length){return}this._dataChanges=[];const n=this.data.datasets.length;const e=n=>new Set(t.filter((t=>t[0]===n)).map(((t,n)=>n+","+t.splice(1).join(","))));const i=e(0);for(let t=1;t<n;t++){if(!Fn(i,e(t))){return}}return Array.from(i).map((t=>t.split(","))).map((t=>({method:t[1],start:+t[2],count:+t[3]})))}_updateLayout(t){if(this.notifyPlugins("beforeLayout",{cancelable:true})===false){return}wr.update(this,this.width,this.height,t);const n=this.chartArea;const e=n.width<=0||n.height<=0;this._layers=[];Sn(this.boxes,(t=>{if(e&&t.position==="chartArea"){return}if(t.configure){t.configure()}this._layers.push(...t._layers())}),this);this._layers.forEach(((t,n)=>{t._idx=n}));this.notifyPlugins("afterLayout")}_updateDatasets(t){if(this.notifyPlugins("beforeDatasetsUpdate",{mode:t,cancelable:true})===false){return}for(let t=0,n=this.data.datasets.length;t<n;++t){this.getDatasetMeta(t).controller.configure()}for(let n=0,e=this.data.datasets.length;n<e;++n){this._updateDataset(n,In(t)?t({datasetIndex:n}):t)}this.notifyPlugins("afterDatasetsUpdate",{mode:t})}_updateDataset(t,n){const e=this.getDatasetMeta(t);const i={meta:e,index:t,mode:n,cancelable:true};if(this.notifyPlugins("beforeDatasetUpdate",i)===false){return}e.controller._update(n);i.cancelable=false;this.notifyPlugins("afterDatasetUpdate",i)}render(){if(this.notifyPlugins("beforeRender",{cancelable:true})===false){return}if(Us.has(this)){if(this.attached&&!Us.running(this)){Us.start(this)}}else{this.draw();Ya({chart:this})}}draw(){let t;if(this._resizeBeforeDraw){const{width:t,height:n}=this._resizeBeforeDraw;this._resizeBeforeDraw=null;this._resize(t,n)}this.clear();if(this.width<=0||this.height<=0){return}if(this.notifyPlugins("beforeDraw",{cancelable:true})===false){return}const n=this._layers;for(t=0;t<n.length&&n[t].z<=0;++t){n[t].draw(this.chartArea)}this._drawDatasets();for(;t<n.length;++t){n[t].draw(this.chartArea)}this.notifyPlugins("afterDraw")}_getSortedDatasetMetas(t){const n=this._sortedMetasets;const e=[];let i,s;for(i=0,s=n.length;i<s;++i){const s=n[i];if(!t||s.visible){e.push(s)}}return e}getSortedVisibleDatasetMetas(){return this._getSortedDatasetMetas(true)}_drawDatasets(){if(this.notifyPlugins("beforeDatasetsDraw",{cancelable:true})===false){return}const t=this.getSortedVisibleDatasetMetas();for(let n=t.length-1;n>=0;--n){this._drawDataset(t[n])}this.notifyPlugins("afterDatasetsDraw")}_drawDataset(t){const n=this.ctx;const e={meta:t,index:t.index,cancelable:true};const i=Vs(this,t);if(this.notifyPlugins("beforeDatasetDraw",e)===false){return}if(i){li(n,i)}t.controller.draw();if(i){hi(n)}e.cancelable=false;this.notifyPlugins("afterDatasetDraw",e)}isPointInArea(t){return ci(t,this.chartArea,this._minPadding)}getElementsAtEventForMode(t,n,e,i){const s=er.modes[n];if(typeof s==="function"){return s(this,t,e,i)}return[]}getDatasetMeta(t){const n=this.data.datasets[t];const e=this._metasets;let i=e.filter((t=>t&&t._dataset===n)).pop();if(!i){i={type:null,data:[],dataset:null,controller:null,hidden:null,xAxisID:null,yAxisID:null,order:n&&n.order||0,index:t,_dataset:n,_parsed:[],_sorted:false};e.push(i)}return i}getContext(){return this.$context||(this.$context=Ci(null,{chart:this,type:"chart"}))}getVisibleDatasetCount(){return this.getSortedVisibleDatasetMetas().length}isDatasetVisible(t){const n=this.data.datasets[t];if(!n){return false}const e=this.getDatasetMeta(t);return typeof e.hidden==="boolean"?!e.hidden:!n.hidden}setDatasetVisibility(t,n){const e=this.getDatasetMeta(t);e.hidden=!n}toggleDataVisibility(t){this._hiddenIndices[t]=!this._hiddenIndices[t]}getDataVisibility(t){return!this._hiddenIndices[t]}_updateVisibility(t,n,e){const i=e?"show":"hide";const s=this.getDatasetMeta(t);const o=s.controller._resolveAnimations(undefined,i);if(Tn(n)){s.data[n].hidden=!e;this.update()}else{this.setDatasetVisibility(t,e);o.update(s,{visible:e});this.update((n=>n.datasetIndex===t?i:undefined))}}hide(t,n){this._updateVisibility(t,n,false)}show(t,n){this._updateVisibility(t,n,true)}_destroyDatasetMeta(t){const n=this._metasets[t];if(n&&n.controller){n.controller._destroy()}delete this._metasets[t]}_stop(){let t,n;this.stop();Us.remove(this);for(t=0,n=this.data.datasets.length;t<n;++t){this._destroyDatasetMeta(t)}}destroy(){this.notifyPlugins("beforeDestroy");const{canvas:t,ctx:n}=this;this._stop();this.config.clearCache();if(t){this.unbindEvents();oi(t,n);this.platform.releaseContext(n);this.canvas=null;this.ctx=null}delete Ka[this.id];this.notifyPlugins("afterDestroy")}toBase64Image(...t){return this.canvas.toDataURL(...t)}bindEvents(){this.bindUserEvents();if(this.options.responsive){this.bindResponsiveEvents()}else{this.attached=true}}bindUserEvents(){const t=this._listeners;const n=this.platform;const e=(e,i)=>{n.addEventListener(this,e,i);t[e]=i};const i=(t,n,e)=>{t.offsetX=n;t.offsetY=e;this._eventHandler(t)};Sn(this.options.events,(t=>e(t,i)))}bindResponsiveEvents(){if(!this._responsiveListeners){this._responsiveListeners={}}const t=this._responsiveListeners;const n=this.platform;const e=(e,i)=>{n.addEventListener(this,e,i);t[e]=i};const i=(e,i)=>{if(t[e]){n.removeEventListener(this,e,i);delete t[e]}};const s=(t,n)=>{if(this.canvas){this.resize(t,n)}};let o;const r=()=>{i("attach",r);this.attached=true;this.resize();e("resize",s);e("detach",o)};o=()=>{this.attached=false;i("resize",s);this._stop();this._resize(0,0);e("attach",r)};if(n.isAttached(this.canvas)){r()}else{o()}}unbindEvents(){Sn(this._listeners,((t,n)=>{this.platform.removeEventListener(this,n,t)}));this._listeners={};Sn(this._responsiveListeners,((t,n)=>{this.platform.removeEventListener(this,n,t)}));this._responsiveListeners=undefined}updateHoverStyle(t,n,e){const i=e?"set":"remove";let s,o,r,a;if(n==="dataset"){s=this.getDatasetMeta(t[0].datasetIndex);s.controller["_"+i+"DatasetHoverStyle"]()}for(r=0,a=t.length;r<a;++r){o=t[r];const n=o&&this.getDatasetMeta(o.datasetIndex).controller;if(n){n[i+"HoverStyle"](o.element,o.datasetIndex,o.index)}}}getActiveElements(){return this._active||[]}setActiveElements(t){const n=this._active||[];const e=t.map((({datasetIndex:t,index:n})=>{const e=this.getDatasetMeta(t);if(!e){throw new Error("No dataset found at index "+t)}return{datasetIndex:t,element:e.data[n],index:n}}));const i=!_n(e,n);if(i){this._active=e;this._lastEvent=null;this._updateHoverStyles(e,n)}}notifyPlugins(t,n,e){return this._plugins.notify(this,t,n,e)}isPluginEnabled(t){return this._plugins._cache.filter((n=>n.plugin.id===t)).length===1}_updateHoverStyles(t,n,e){const i=this.options.hover;const s=(t,n)=>t.filter((t=>!n.some((n=>t.datasetIndex===n.datasetIndex&&t.index===n.index))));const o=s(n,t);const r=e?t:s(t,n);if(o.length){this.updateHoverStyle(o,i.mode,false)}if(r.length&&i.mode){this.updateHoverStyle(r,i.mode,true)}}_eventHandler(t,n){const e={event:t,replay:n,cancelable:true,inChartArea:this.isPointInArea(t)};const i=n=>(n.options.events||this.options.events).includes(t.native.type);if(this.notifyPlugins("beforeEvent",e,i)===false){return}const s=this._handleEvent(t,n,e.inChartArea);e.cancelable=false;this.notifyPlugins("afterEvent",e,i);if(s||e.changed){this.render()}return this}_handleEvent(t,n,e){const{_active:i=[],options:s}=this;const o=n;const r=this._getActiveElements(t,i,e,o);const a=Wn(t);const c=Ja(t,this._lastEvent,e,a);if(e){this._lastEvent=null;Mn(s.onHover,[t,r,this],this);if(a){Mn(s.onClick,[t,r,this],this)}}const l=!_n(r,i);if(l||n){this._active=r;this._updateHoverStyles(r,i,n)}this._lastEvent=c;return l}_getActiveElements(t,n,e,i){if(t.type==="mouseout"){return[]}if(!e){return n}const s=this.options.hover;return this.getElementsAtEventForMode(t,s.mode,s,i)}}function Ga(){return Sn(Qa.instances,(t=>t._plugins.invalidate()))}function tc(t,n,e){const{startAngle:i,pixelMargin:s,x:o,y:r,outerRadius:a,innerRadius:c}=n;let l=s/a;t.beginPath();t.arc(o,r,a,i-l,e+l);if(c>s){l=s/c;t.arc(o,r,c,e+l,i-l,true)}else{t.arc(o,r,s,e+Un,i-Un)}t.closePath();t.clip()}function nc(t){return ki(t,["outerStart","outerEnd","innerStart","innerEnd"])}function ec(t,n,e,i){const s=nc(t.options.borderRadius);const o=(e-n)/2;const r=Math.min(o,i*n/2);const a=t=>{const n=(e-Math.min(o,t))*i/2;return ue(t,0,Math.min(o,n))};return{outerStart:a(s.outerStart),outerEnd:a(s.outerEnd),innerStart:ue(s.innerStart,0,r),innerEnd:ue(s.innerEnd,0,r)}}function ic(t,n,e,i){return{x:e+t*Math.cos(n),y:i+t*Math.sin(n)}}function sc(t,n,e,i,s,o){const{x:r,y:a,startAngle:c,pixelMargin:l,innerRadius:h}=n;const f=Math.max(n.outerRadius+i+e-l,0);const u=h>0?h+i+e+l:0;let d=0;const p=s-c;if(i){const t=h>0?h-i:0;const n=f>0?f-i:0;const e=(t+n)/2;const s=e!==0?p*e/(e+i):p;d=(p-s)/2}const g=Math.max(.001,p*f-e/Bn)/f;const b=(p-g)/2;const m=c+b+d;const y=s-b-d;const{outerStart:w,outerEnd:x,innerStart:v,innerEnd:k}=ec(n,u,f,y-m);const M=f-w;const S=f-x;const _=m+w/M;const z=y-x/S;const P=u+v;const O=u+k;const C=m+v/P;const D=y-k/O;t.beginPath();if(o){const n=(_+z)/2;t.arc(r,a,f,_,n);t.arc(r,a,f,n,z);if(x>0){const n=ic(S,z,r,a);t.arc(n.x,n.y,x,z,y+Un)}const e=ic(O,y,r,a);t.lineTo(e.x,e.y);if(k>0){const n=ic(O,D,r,a);t.arc(n.x,n.y,k,y+Un,D+Math.PI)}const i=(y-k/u+(m+v/u))/2;t.arc(r,a,u,y-k/u,i,true);t.arc(r,a,u,i,m+v/u,true);if(v>0){const n=ic(P,C,r,a);t.arc(n.x,n.y,v,C+Math.PI,m-Un)}const s=ic(M,m,r,a);t.lineTo(s.x,s.y);if(w>0){const n=ic(M,_,r,a);t.arc(n.x,n.y,w,m-Un,_)}}else{t.moveTo(r,a);const n=Math.cos(_)*f+r;const e=Math.sin(_)*f+a;t.lineTo(n,e);const i=Math.cos(z)*f+r;const s=Math.sin(z)*f+a;t.lineTo(i,s)}t.closePath()}function oc(t,n,e,i,s){const{fullCircles:o,startAngle:r,circumference:a}=n;let c=n.endAngle;if(o){sc(t,n,e,i,c,s);for(let n=0;n<o;++n){t.fill()}if(!isNaN(a)){c=r+(a%Hn||Hn)}}sc(t,n,e,i,c,s);t.fill();return c}function rc(t,n,e,i,s){const{fullCircles:o,startAngle:r,circumference:a,options:c}=n;const{borderWidth:l,borderJoinStyle:h,borderDash:f,borderDashOffset:u}=c;const d=c.borderAlign==="inner";if(!l){return}t.setLineDash(f||[]);t.lineDashOffset=u;if(d){t.lineWidth=l*2;t.lineJoin=h||"round"}else{t.lineWidth=l;t.lineJoin=h||"bevel"}let p=n.endAngle;if(o){sc(t,n,e,i,p,s);for(let n=0;n<o;++n){t.stroke()}if(!isNaN(a)){p=r+(a%Hn||Hn)}}if(d){tc(t,n,p)}if(!o){sc(t,n,e,i,p,s);t.stroke()}}class ac extends $r{static id="arc";static defaults={borderAlign:"center",borderColor:"#fff",borderDash:[],borderDashOffset:0,borderJoinStyle:undefined,borderRadius:0,borderWidth:2,offset:0,spacing:0,angle:undefined,circular:true};static defaultRoutes={backgroundColor:"backgroundColor"};static descriptors={_scriptable:true,_indexable:t=>t!=="borderDash"};circumference;endAngle;fullCircles;innerRadius;outerRadius;pixelMargin;startAngle;constructor(t){super();this.options=undefined;this.circumference=undefined;this.startAngle=undefined;this.endAngle=undefined;this.innerRadius=undefined;this.outerRadius=undefined;this.pixelMargin=0;this.fullCircles=0;if(t){Object.assign(this,t)}}inRange(t,n,e){const i=this.getProps(["x","y"],e);const{angle:s,distance:o}=ae(i,{x:t,y:n});const{startAngle:r,endAngle:a,innerRadius:c,outerRadius:l,circumference:h}=this.getProps(["startAngle","endAngle","innerRadius","outerRadius","circumference"],e);const f=(this.options.spacing+this.options.borderWidth)/2;const u=xn(h,a-r);const d=fe(s,r,a)&&r!==a;const p=u>=Hn||d;const g=pe(o,c+f,l+f);return p&&g}getCenterPoint(t){const{x:n,y:e,startAngle:i,endAngle:s,innerRadius:o,outerRadius:r}=this.getProps(["x","y","startAngle","endAngle","innerRadius","outerRadius"],t);const{offset:a,spacing:c}=this.options;const l=(i+s)/2;const h=(o+r+c+a)/2;return{x:n+Math.cos(l)*h,y:e+Math.sin(l)*h}}tooltipPosition(t){return this.getCenterPoint(t)}draw(t){const{options:n,circumference:e}=this;const i=(n.offset||0)/4;const s=(n.spacing||0)/2;const o=n.circular;this.pixelMargin=n.borderAlign==="inner"?.33:0;this.fullCircles=e>Hn?Math.floor(e/Hn):0;if(e===0||this.innerRadius<0||this.outerRadius<0){return}t.save();const r=(this.startAngle+this.endAngle)/2;t.translate(Math.cos(r)*i,Math.sin(r)*i);const a=1-Math.sin(Math.min(Bn,e||0));const c=i*a;t.fillStyle=n.backgroundColor;t.strokeStyle=n.borderColor;oc(t,this,c,s,o);rc(t,this,c,s,o);t.restore()}}function cc(t,n,e=n){t.lineCap=xn(e.borderCapStyle,n.borderCapStyle);t.setLineDash(xn(e.borderDash,n.borderDash));t.lineDashOffset=xn(e.borderDashOffset,n.borderDashOffset);t.lineJoin=xn(e.borderJoinStyle,n.borderJoinStyle);t.lineWidth=xn(e.borderWidth,n.borderWidth);t.strokeStyle=xn(e.borderColor,n.borderColor)}function lc(t,n,e){t.lineTo(e.x,e.y)}function hc(t){if(t.stepped){return fi}if(t.tension||t.cubicInterpolationMode==="monotone"){return ui}return lc}function fc(t,n,e={}){const i=t.length;const{start:s=0,end:o=i-1}=e;const{start:r,end:a}=n;const c=Math.max(s,r);const l=Math.min(o,a);const h=s<r&&o<r||s>a&&o>a;return{count:i,start:c,loop:n.loop,ilen:l<c&&!h?i+l-c:l-c}}function uc(t,n,e,i){const{points:s,options:o}=n;const{count:r,start:a,loop:c,ilen:l}=fc(s,e,i);const h=hc(o);let{move:f=true,reverse:u}=i||{};let d,p,g;for(d=0;d<=l;++d){p=s[(a+(u?l-d:d))%r];if(p.skip){continue}else if(f){t.moveTo(p.x,p.y);f=false}else{h(t,g,p,u,o.stepped)}g=p}if(c){p=s[(a+(u?l:0))%r];h(t,g,p,u,o.stepped)}return!!c}function dc(t,n,e,i){const s=n.points;const{count:o,start:r,ilen:a}=fc(s,e,i);const{move:c=true,reverse:l}=i||{};let h=0;let f=0;let u,d,p,g,b,m;const y=t=>(r+(l?a-t:t))%o;const w=()=>{if(g!==b){t.lineTo(h,b);t.lineTo(h,g);t.lineTo(h,m)}};if(c){d=s[y(0)];t.moveTo(d.x,d.y)}for(u=0;u<=a;++u){d=s[y(u)];if(d.skip){continue}const n=d.x;const e=d.y;const i=n|0;if(i===p){if(e<g){g=e}else if(e>b){b=e}h=(f*h+n)/++f}else{w();t.lineTo(n,e);p=i;f=0;g=b=e}m=e}w()}function pc(t){const n=t.options;const e=n.borderDash&&n.borderDash.length;const i=!t._decimated&&!t._loop&&!n.tension&&n.cubicInterpolationMode!=="monotone"&&!n.stepped&&!e;return i?dc:uc}function gc(t){if(t.stepped){return Ms}if(t.tension||t.cubicInterpolationMode==="monotone"){return Ss}return ks}function bc(t,n,e,i){let s=n._path;if(!s){s=n._path=new Path2D;if(n.path(s,e,i)){s.closePath()}}cc(t,n.options);t.stroke(s)}function mc(t,n,e,i){const{segments:s,options:o}=n;const r=pc(n);for(const a of s){cc(t,o,a.style);t.beginPath();if(r(t,n,a,{start:e,end:e+i-1})){t.closePath()}t.stroke()}}const yc=typeof Path2D==="function";function wc(t,n,e,i){if(yc&&!n.options.segment){bc(t,n,e,i)}else{mc(t,n,e,i)}}class xc extends $r{static id="line";static defaults={borderCapStyle:"butt",borderDash:[],borderDashOffset:0,borderJoinStyle:"miter",borderWidth:3,capBezierPoints:true,cubicInterpolationMode:"default",fill:false,spanGaps:false,stepped:false,tension:0};static defaultRoutes={backgroundColor:"backgroundColor",borderColor:"borderColor"};static descriptors={_scriptable:true,_indexable:t=>t!=="borderDash"&&t!=="fill"};constructor(t){super();this.animated=true;this.options=undefined;this._chart=undefined;this._loop=undefined;this._fullLoop=undefined;this._path=undefined;this._points=undefined;this._segments=undefined;this._decimated=false;this._pointsUpdated=false;this._datasetIndex=undefined;if(t){Object.assign(this,t)}}updateControlPoints(t,n){const e=this.options;if((e.tension||e.cubicInterpolationMode==="monotone")&&!e.stepped&&!this._pointsUpdated){const i=e.spanGaps?this._loop:this._fullLoop;os(this._points,e,t,i,n);this._pointsUpdated=true}}set points(t){this._points=t;delete this._segments;delete this._path;this._pointsUpdated=false}get points(){return this._points}get segments(){return this._segments||(this._segments=Ts(this,this.options.segment))}first(){const t=this.segments;const n=this.points;return t.length&&n[t[0].start]}last(){const t=this.segments;const n=this.points;const e=t.length;return e&&n[t[e-1].end]}interpolate(t,n){const e=this.options;const i=t[n];const s=this.points;const o=Ls(this,{property:n,start:i,end:i});if(!o.length){return}const r=[];const a=gc(e);let c,l;for(c=0,l=o.length;c<l;++c){const{start:l,end:h}=o[c];const f=s[l];const u=s[h];if(f===u){r.push(f);continue}const d=Math.abs((i-f[n])/(u[n]-f[n]));const p=a(f,u,d,e.stepped);p[n]=t[n];r.push(p)}return r.length===1?r[0]:r}pathSegment(t,n,e){const i=pc(this);return i(t,this,n,e)}path(t,n,e){const i=this.segments;const s=pc(this);let o=this._loop;n=n||0;e=e||this.points.length-n;for(const r of i){o&=s(t,this,r,{start:n,end:n+e-1})}return!!o}draw(t,n,e,i){const s=this.options||{};const o=this.points||[];if(o.length&&s.borderWidth){t.save();wc(t,this,e,i);t.restore()}if(this.animated){this._pointsUpdated=false;this._path=undefined}}}function vc(t,n,e,i){const s=t.options;const{[e]:o}=t.getProps([e],i);return Math.abs(n-o)<s.radius+s.hitRadius}class kc extends $r{static id="point";parsed;skip;stop;static defaults={borderWidth:1,hitRadius:1,hoverBorderWidth:1,hoverRadius:4,pointStyle:"circle",radius:3,rotation:0};static defaultRoutes={backgroundColor:"backgroundColor",borderColor:"borderColor"};constructor(t){super();this.options=undefined;this.parsed=undefined;this.skip=undefined;this.stop=undefined;if(t){Object.assign(this,t)}}inRange(t,n,e){const i=this.options;const{x:s,y:o}=this.getProps(["x","y"],e);return Math.pow(t-s,2)+Math.pow(n-o,2)<Math.pow(i.hitRadius+i.radius,2)}inXRange(t,n){return vc(this,t,"x",n)}inYRange(t,n){return vc(this,t,"y",n)}getCenterPoint(t){const{x:n,y:e}=this.getProps(["x","y"],t);return{x:n,y:e}}size(t){t=t||this.options||{};let n=t.radius||0;n=Math.max(n,n&&t.hoverRadius||0);const e=n&&t.borderWidth||0;return(n+e)*2}draw(t,n){const e=this.options;if(this.skip||e.radius<.1||!ci(this,n,this.size(e)/2)){return}t.strokeStyle=e.borderColor;t.lineWidth=e.borderWidth;t.fillStyle=e.backgroundColor;ri(t,e,this.x,this.y)}getRange(){const t=this.options||{};return t.radius+t.hitRadius}}function Mc(t,n){const{x:e,y:i,base:s,width:o,height:r}=t.getProps(["x","y","base","width","height"],n);let a,c,l,h,f;if(t.horizontal){f=r/2;a=Math.min(e,s);c=Math.max(e,s);l=i-f;h=i+f}else{f=o/2;a=e-f;c=e+f;l=Math.min(i,s);h=Math.max(i,s)}return{left:a,top:l,right:c,bottom:h}}function Sc(t,n,e,i){return t?0:ue(n,e,i)}function _c(t,n,e){const i=t.options.borderWidth;const s=t.borderSkipped;const o=Mi(i);return{t:Sc(s.top,o.top,0,e),r:Sc(s.right,o.right,0,n),b:Sc(s.bottom,o.bottom,0,e),l:Sc(s.left,o.left,0,n)}}function zc(t,n,e){const{enableBorderRadius:i}=t.getProps(["enableBorderRadius"]);const s=t.options.borderRadius;const o=Si(s);const r=Math.min(n,e);const a=t.borderSkipped;const c=i||mn(s);return{topLeft:Sc(!c||a.top||a.left,o.topLeft,0,r),topRight:Sc(!c||a.top||a.right,o.topRight,0,r),bottomLeft:Sc(!c||a.bottom||a.left,o.bottomLeft,0,r),bottomRight:Sc(!c||a.bottom||a.right,o.bottomRight,0,r)}}function Pc(t){const n=Mc(t);const e=n.right-n.left;const i=n.bottom-n.top;const s=_c(t,e/2,i/2);const o=zc(t,e/2,i/2);return{outer:{x:n.left,y:n.top,w:e,h:i,radius:o},inner:{x:n.left+s.l,y:n.top+s.t,w:e-s.l-s.r,h:i-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 Oc(t,n,e,i){const s=n===null;const o=e===null;const r=s&&o;const a=t&&!r&&Mc(t,i);return a&&(s||pe(n,a.left,a.right))&&(o||pe(e,a.top,a.bottom))}function Cc(t){return t.topLeft||t.topRight||t.bottomLeft||t.bottomRight}function Dc(t,n){t.rect(n.x,n.y,n.w,n.h)}function Ac(t,n,e={}){const i=t.x!==e.x?-n:0;const s=t.y!==e.y?-n:0;const o=(t.x+t.w!==e.x+e.w?n:0)-i;const r=(t.y+t.h!==e.y+e.h?n:0)-s;return{x:t.x+i,y:t.y+s,w:t.w+o,h:t.h+r,radius:t.radius}}class jc extends $r{static id="bar";static defaults={borderSkipped:"start",borderWidth:0,borderRadius:0,inflateAmount:"auto",pointStyle:undefined};static defaultRoutes={backgroundColor:"backgroundColor",borderColor:"borderColor"};constructor(t){super();this.options=undefined;this.horizontal=undefined;this.base=undefined;this.width=undefined;this.height=undefined;this.inflateAmount=undefined;if(t){Object.assign(this,t)}}draw(t){const{inflateAmount:n,options:{borderColor:e,backgroundColor:i}}=this;const{inner:s,outer:o}=Pc(this);const r=Cc(o.radius)?mi:Dc;t.save();if(o.w!==s.w||o.h!==s.h){t.beginPath();r(t,Ac(o,n,s));t.clip();r(t,Ac(s,-n,o));t.fillStyle=e;t.fill("evenodd")}t.beginPath();r(t,Ac(s,n));t.fillStyle=i;t.fill();t.restore()}inRange(t,n,e){return Oc(this,t,n,e)}inXRange(t,n){return Oc(this,t,null,n)}inYRange(t,n){return Oc(this,null,t,n)}getCenterPoint(t){const{x:n,y:e,base:i,horizontal:s}=this.getProps(["x","y","base","horizontal"],t);return{x:s?(n+i)/2:n,y:s?e:(e+i)/2}}getRange(t){return t==="x"?this.width/2:this.height/2}}var Ec=Object.freeze({__proto__:null,ArcElement:ac,BarElement:jc,LineElement:xc,PointElement:kc});const Lc=["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)"];const Rc=Lc.map((t=>t.replace("rgb(","rgba(").replace(")",", 0.5)")));function Nc(t){return Lc[t%Lc.length]}function Tc(t){return Rc[t%Rc.length]}function Ic(t,n){t.borderColor=Nc(n);t.backgroundColor=Tc(n);return++n}function Fc(t,n){t.backgroundColor=t.data.map((()=>Nc(n++)));return n}function Wc(t,n){t.backgroundColor=t.data.map((()=>Tc(n++)));return n}function Bc(t){let n=0;return(e,i)=>{const s=t.getDatasetMeta(i).controller;if(s instanceof Io){n=Fc(e,n)}else if(s instanceof Wo){n=Wc(e,n)}else if(s){n=Ic(e,n)}}}function Hc(t){let n;for(n in t){if(t[n].borderColor||t[n].backgroundColor){return true}}return false}function $c(t){return t&&(t.borderColor||t.backgroundColor)}function Vc(){return ti.borderColor!=="rgba(0,0,0,0.1)"||ti.backgroundColor!=="rgba(0,0,0,0.1)"}var Yc={id:"colors",defaults:{enabled:true,forceOverride:false},beforeLayout(t,n,e){if(!e.enabled){return}const{data:{datasets:i},options:s}=t.config;const{elements:o}=s;const r=Hc(i)||$c(s)||o&&Hc(o)||Vc();if(!e.forceOverride&&r){return}const a=Bc(t);i.forEach(a)}};function Uc(t,n,e,i,s){const o=s.samples||i;if(o>=e){return t.slice(n,n+e)}const r=[];const a=(e-2)/(o-2);let c=0;const l=n+e-1;let h=n;let f,u,d,p,g;r[c++]=t[h];for(f=0;f<o-2;f++){let i=0;let s=0;let o;const l=Math.floor((f+1)*a)+1+n;const b=Math.min(Math.floor((f+2)*a)+1,e)+n;const m=b-l;for(o=l;o<b;o++){i+=t[o].x;s+=t[o].y}i/=m;s/=m;const y=Math.floor(f*a)+1+n;const w=Math.min(Math.floor((f+1)*a)+1,e)+n;const{x,y:v}=t[h];d=p=-1;for(o=y;o<w;o++){p=.5*Math.abs((x-i)*(t[o].y-v)-(x-t[o].x)*(s-v));if(p>d){d=p;u=t[o];g=o}}r[c++]=u;h=g}r[c++]=t[l];return r}function Xc(t,n,e,i){let s=0;let o=0;let r,a,c,l,h,f,u,d,p,g;const b=[];const m=n+e-1;const y=t[n].x;const w=t[m].x;const x=w-y;for(r=n;r<n+e;++r){a=t[r];c=(a.x-y)/x*i;l=a.y;const n=c|0;if(n===h){if(l<p){p=l;f=r}else if(l>g){g=l;u=r}s=(o*s+a.x)/++o}else{const e=r-1;if(!gn(f)&&!gn(u)){const n=Math.min(f,u);const i=Math.max(f,u);if(n!==d&&n!==e){b.push({...t[n],x:s})}if(i!==d&&i!==e){b.push({...t[i],x:s})}}if(r>0&&e!==d){b.push(t[e])}b.push(a);h=n;o=0;p=g=l;f=u=d=r}}return b}function Kc(t){if(t._decimated){const n=t._data;delete t._decimated;delete t._data;Object.defineProperty(t,"data",{configurable:true,enumerable:true,writable:true,value:n})}}function qc(t){t.data.datasets.forEach((t=>{Kc(t)}))}function Zc(t,n){const e=n.length;let i=0;let s;const{iScale:o}=t;const{min:r,max:a,minDefined:c,maxDefined:l}=o.getUserBounds();if(c){i=ue(be(n,o.axis,r).lo,0,e-1)}if(l){s=ue(be(n,o.axis,a).hi+1,i,e)-i}else{s=e-i}return{start:i,count:s}}var Jc={id:"decimation",defaults:{algorithm:"min-max",enabled:false},beforeElementsUpdate:(t,n,e)=>{if(!e.enabled){qc(t);return}const i=t.width;t.data.datasets.forEach(((n,s)=>{const{_data:o,indexAxis:r}=n;const a=t.getDatasetMeta(s);const c=o||n.data;if(Pi([r,t.options.indexAxis])==="y"){return}if(!a.controller.supportsDecimation){return}const l=t.scales[a.xAxisID];if(l.type!=="linear"&&l.type!=="time"){return}if(t.options.parsing){return}let{start:h,count:f}=Zc(a,c);const u=e.threshold||4*i;if(f<=u){Kc(n);return}if(gn(o)){n._data=c;delete n.data;Object.defineProperty(n,"data",{configurable:true,enumerable:true,get:function(){return this._decimated},set:function(t){this._data=t}})}let d;switch(e.algorithm){case"lttb":d=Uc(c,h,f,i,e);break;case"min-max":d=Xc(c,h,f,i);break;default:throw new Error(`Unsupported decimation algorithm '${e.algorithm}'`)}n._decimated=d}))},destroy(t){qc(t)}};function Qc(t,n,e){const i=t.segments;const s=t.points;const o=n.points;const r=[];for(const t of i){let{start:i,end:a}=t;a=nl(i,a,s);const c=Gc(e,s[i],s[a],t.loop);if(!n.segments){r.push({source:t,target:c,start:s[i],end:s[a]});continue}const l=Ls(n,c);for(const n of l){const i=Gc(e,o[n.start],o[n.end],n.loop);const a=Es(t,s,i);for(const t of a){r.push({source:t,target:n,start:{[e]:el(c,i,"start",Math.max)},end:{[e]:el(c,i,"end",Math.min)}})}}}return r}function Gc(t,n,e,i){if(i){return}let s=n[t];let o=e[t];if(t==="angle"){s=he(s);o=he(o)}return{property:t,start:s,end:o}}function tl(t,n){const{x:e=null,y:i=null}=t||{};const s=n.points;const o=[];n.segments.forEach((({start:t,end:n})=>{n=nl(t,n,s);const r=s[t];const a=s[n];if(i!==null){o.push({x:r.x,y:i});o.push({x:a.x,y:i})}else if(e!==null){o.push({x:e,y:r.y});o.push({x:e,y:a.y})}}));return o}function nl(t,n,e){for(;n>t;n--){const t=e[n];if(!isNaN(t.x)&&!isNaN(t.y)){break}}return n}function el(t,n,e,i){if(t&&n){return i(t[e],n[e])}return t?t[e]:n?n[e]:0}function il(t,n){let e=[];let i=false;if(bn(t)){i=true;e=t}else{e=tl(t,n)}return e.length?new xc({points:e,options:{tension:0},_loop:i,_fullLoop:i}):null}function sl(t){return t&&t.fill!==false}function ol(t,n,e){const i=t[n];let s=i.fill;const o=[n];let r;if(!e){return s}while(s!==false&&o.indexOf(s)===-1){if(!yn(s)){return s}r=t[s];if(!r){return false}if(r.visible){return s}o.push(s);s=r.fill}return false}function rl(t,n,e){const i=hl(t);if(mn(i)){return isNaN(i.value)?false:i}let s=parseFloat(i);if(yn(s)&&Math.floor(s)===s){return al(i[0],n,s,e)}return["origin","start","end","stack","shape"].indexOf(i)>=0&&i}function al(t,n,e,i){if(t==="-"||t==="+"){e=n+e}if(e===n||e<0||e>=i){return false}return e}function cl(t,n){let e=null;if(t==="start"){e=n.bottom}else if(t==="end"){e=n.top}else if(mn(t)){e=n.getPixelForValue(t.value)}else if(n.getBasePixel){e=n.getBasePixel()}return e}function ll(t,n,e){let i;if(t==="start"){i=e}else if(t==="end"){i=n.options.reverse?n.min:n.max}else if(mn(t)){i=t.value}else{i=n.getBaseValue()}return i}function hl(t){const n=t.options;const e=n.fill;let i=xn(e&&e.target,e);if(i===undefined){i=!!n.backgroundColor}if(i===false||i===null){return false}if(i===true){return"origin"}return i}function fl(t){const{scale:n,index:e,line:i}=t;const s=[];const o=i.segments;const r=i.points;const a=ul(n,e);a.push(il({x:null,y:n.bottom},i));for(let t=0;t<o.length;t++){const n=o[t];for(let t=n.start;t<=n.end;t++){dl(s,r[t],a)}}return new xc({points:s,options:{}})}function ul(t,n){const e=[];const i=t.getMatchingVisibleMetas("line");for(let t=0;t<i.length;t++){const s=i[t];if(s.index===n){break}if(!s.hidden){e.unshift(s.dataset)}}return e}function dl(t,n,e){const i=[];for(let s=0;s<e.length;s++){const o=e[s];const{first:r,last:a,point:c}=pl(o,n,"x");if(!c||r&&a){continue}if(r){i.unshift(c)}else{t.push(c);if(!a){break}}}t.push(...i)}function pl(t,n,e){const i=t.interpolate(n,e);if(!i){return{}}const s=i[e];const o=t.segments;const r=t.points;let a=false;let c=false;for(let t=0;t<o.length;t++){const n=o[t];const i=r[n.start][e];const l=r[n.end][e];if(pe(s,i,l)){a=s===i;c=s===l;break}}return{first:a,last:c,point:i}}class gl{constructor(t){this.x=t.x;this.y=t.y;this.radius=t.radius}pathSegment(t,n,e){const{x:i,y:s,radius:o}=this;n=n||{start:0,end:Hn};t.arc(i,s,o,n.end,n.start,true);return!e.bounds}interpolate(t){const{x:n,y:e,radius:i}=this;const s=t.angle;return{x:n+Math.cos(s)*i,y:e+Math.sin(s)*i,angle:s}}}function bl(t){const{chart:n,fill:e,line:i}=t;if(yn(e)){return ml(n,e)}if(e==="stack"){return fl(t)}if(e==="shape"){return true}const s=yl(t);if(s instanceof gl){return s}return il(s,i)}function ml(t,n){const e=t.getDatasetMeta(n);const i=e&&t.isDatasetVisible(n);return i?e.dataset:null}function yl(t){const n=t.scale||{};if(n.getPointPositionForValue){return xl(t)}return wl(t)}function wl(t){const{scale:n={},fill:e}=t;const i=cl(e,n);if(yn(i)){const t=n.isHorizontal();return{x:t?i:null,y:t?null:i}}return null}function xl(t){const{scale:n,fill:e}=t;const i=n.options;const s=n.getLabels().length;const o=i.reverse?n.max:n.min;const r=ll(e,n,o);const a=[];if(i.grid.circular){const t=n.getPointPositionForValue(0,o);return new gl({x:t.x,y:t.y,radius:n.getDistanceFromCenterForValue(r)})}for(let t=0;t<s;++t){a.push(n.getPointPositionForValue(t,r))}return a}function vl(t,n,e){const i=bl(n);const{chart:s,index:o,line:r,scale:a,axis:c}=n;const l=r.options;const h=l.fill;const f=l.backgroundColor;const{above:u=f,below:d=f}=h||{};const p=s.getDatasetMeta(o);const g=Vs(s,p);if(i&&r.points.length){li(t,e);kl(t,{line:r,target:i,above:u,below:d,area:e,scale:a,axis:c,clip:g});hi(t)}}function kl(t,n){const{line:e,target:i,above:s,below:o,area:r,scale:a,clip:c}=n;const l=e._loop?"angle":n.axis;t.save();if(l==="x"&&o!==s){Ml(t,i,r.top);Sl(t,{line:e,target:i,color:s,scale:a,property:l,clip:c});t.restore();t.save();Ml(t,i,r.bottom)}Sl(t,{line:e,target:i,color:o,scale:a,property:l,clip:c});t.restore()}function Ml(t,n,e){const{segments:i,points:s}=n;let o=true;let r=false;t.beginPath();for(const a of i){const{start:i,end:c}=a;const l=s[i];const h=s[nl(i,c,s)];if(o){t.moveTo(l.x,l.y);o=false}else{t.lineTo(l.x,e);t.lineTo(l.x,l.y)}r=!!n.pathSegment(t,a,{move:r});if(r){t.closePath()}else{t.lineTo(h.x,e)}}t.lineTo(n.first().x,e);t.closePath();t.clip()}function Sl(t,n){const{line:e,target:i,property:s,color:o,scale:r,clip:a}=n;const c=Qc(e,i,s);for(const{source:n,target:l,start:h,end:f}of c){const{style:{backgroundColor:c=o}={}}=n;const u=i!==true;t.save();t.fillStyle=c;_l(t,r,a,u&&Gc(s,h,f));t.beginPath();const d=!!e.pathSegment(t,n);let p;if(u){if(d){t.closePath()}else{zl(t,i,f,s)}const n=!!i.pathSegment(t,l,{move:d,reverse:true});p=d&&n;if(!p){zl(t,i,h,s)}}t.closePath();t.fill(p?"evenodd":"nonzero");t.restore()}}function _l(t,n,e,i){const s=n.chart.chartArea;const{property:o,start:r,end:a}=i||{};if(o==="x"||o==="y"){let n,i,c,l;if(o==="x"){n=r;i=s.top;c=a;l=s.bottom}else{n=s.left;i=r;c=s.right;l=a}t.beginPath();if(e){n=Math.max(n,e.left);c=Math.min(c,e.right);i=Math.max(i,e.top);l=Math.min(l,e.bottom)}t.rect(n,i,c-n,l-i);t.clip()}}function zl(t,n,e,i){const s=n.interpolate(e,i);if(s){t.lineTo(s.x,s.y)}}var Pl={id:"filler",afterDatasetsUpdate(t,n,e){const i=(t.data.datasets||[]).length;const s=[];let o,r,a,c;for(r=0;r<i;++r){o=t.getDatasetMeta(r);a=o.dataset;c=null;if(a&&a.options&&a instanceof xc){c={visible:t.isDatasetVisible(r),index:r,fill:rl(a,r,i),chart:t,axis:o.controller.options.indexAxis,scale:o.vScale,line:a}}o.$filler=c;s.push(c)}for(r=0;r<i;++r){c=s[r];if(!c||c.fill===false){continue}c.fill=ol(s,r,e.propagate)}},beforeDraw(t,n,e){const i=e.drawTime==="beforeDraw";const s=t.getSortedVisibleDatasetMetas();const o=t.chartArea;for(let n=s.length-1;n>=0;--n){const e=s[n].$filler;if(!e){continue}e.line.updateControlPoints(o,e.axis);if(i&&e.fill){vl(t.ctx,e,o)}}},beforeDatasetsDraw(t,n,e){if(e.drawTime!=="beforeDatasetsDraw"){return}const i=t.getSortedVisibleDatasetMetas();for(let n=i.length-1;n>=0;--n){const e=i[n].$filler;if(sl(e)){vl(t.ctx,e,t.chartArea)}}},beforeDatasetDraw(t,n,e){const i=n.meta.$filler;if(!sl(i)||e.drawTime!=="beforeDatasetDraw"){return}vl(t.ctx,i,t.chartArea)},defaults:{propagate:true,drawTime:"beforeDatasetDraw"}};const Ol=(t,n)=>{let{boxHeight:e=n,boxWidth:i=n}=t;if(t.usePointStyle){e=Math.min(e,n);i=t.pointStyleWidth||Math.min(i,n)}return{boxWidth:i,boxHeight:e,itemHeight:Math.max(n,e)}};const Cl=(t,n)=>t!==null&&n!==null&&t.datasetIndex===n.datasetIndex&&t.index===n.index;class Dl extends $r{constructor(t){super();this._added=false;this.legendHitBoxes=[];this._hoveredItem=null;this.doughnutMode=false;this.chart=t.chart;this.options=t.options;this.ctx=t.ctx;this.legendItems=undefined;this.columnSizes=undefined;this.lineWidths=undefined;this.maxHeight=undefined;this.maxWidth=undefined;this.top=undefined;this.bottom=undefined;this.left=undefined;this.right=undefined;this.height=undefined;this.width=undefined;this._margins=undefined;this.position=undefined;this.weight=undefined;this.fullSize=undefined}update(t,n,e){this.maxWidth=t;this.maxHeight=n;this._margins=e;this.setDimensions();this.buildLabels();this.fit()}setDimensions(){if(this.isHorizontal()){this.width=this.maxWidth;this.left=this._margins.left;this.right=this.width}else{this.height=this.maxHeight;this.top=this._margins.top;this.bottom=this.height}}buildLabels(){const t=this.options.labels||{};let n=Mn(t.generateLabels,[this.chart],this)||[];if(t.filter){n=n.filter((n=>t.filter(n,this.chart.data)))}if(t.sort){n=n.sort(((n,e)=>t.sort(n,e,this.chart.data)))}if(this.options.reverse){n.reverse()}this.legendItems=n}fit(){const{options:t,ctx:n}=this;if(!t.display){this.width=this.height=0;return}const e=t.labels;const i=zi(e.font);const s=i.size;const o=this._computeTitleHeight();const{boxWidth:r,itemHeight:a}=Ol(e,s);let c,l;n.font=i.string;if(this.isHorizontal()){c=this.maxWidth;l=this._fitRows(o,s,r,a)+10}else{l=this.maxHeight;c=this._fitCols(o,i,r,a)+10}this.width=Math.min(c,t.maxWidth||this.maxWidth);this.height=Math.min(l,t.maxHeight||this.maxHeight)}_fitRows(t,n,e,i){const{ctx:s,maxWidth:o,options:{labels:{padding:r}}}=this;const a=this.legendHitBoxes=[];const c=this.lineWidths=[0];const l=i+r;let h=t;s.textAlign="left";s.textBaseline="middle";let f=-1;let u=-l;this.legendItems.forEach(((t,d)=>{const p=e+n/2+s.measureText(t.text).width;if(d===0||c[c.length-1]+p+2*r>o){h+=l;c[c.length-(d>0?0:1)]=0;u+=l;f++}a[d]={left:0,top:u,row:f,width:p,height:i};c[c.length-1]+=p+r}));return h}_fitCols(t,n,e,i){const{ctx:s,maxHeight:o,options:{labels:{padding:r}}}=this;const a=this.legendHitBoxes=[];const c=this.columnSizes=[];const l=o-t;let h=r;let f=0;let u=0;let d=0;let p=0;this.legendItems.forEach(((t,o)=>{const{itemWidth:g,itemHeight:b}=Al(e,n,s,t,i);if(o>0&&u+b+2*r>l){h+=f+r;c.push({width:f,height:u});d+=f+r;p++;f=u=0}a[o]={left:d,top:u,col:p,width:g,height:b};f=Math.max(f,g);u+=b+r}));h+=f;c.push({width:f,height:u});return h}adjustHitBoxes(){if(!this.options.display){return}const t=this._computeTitleHeight();const{legendHitBoxes:n,options:{align:e,labels:{padding:i},rtl:s}}=this;const o=Ps(s,this.left,this.width);if(this.isHorizontal()){let s=0;let r=Pe(e,this.left+i,this.right-this.lineWidths[s]);for(const a of n){if(s!==a.row){s=a.row;r=Pe(e,this.left+i,this.right-this.lineWidths[s])}a.top+=this.top+t+i;a.left=o.leftForLtr(o.x(r),a.width);r+=a.width+i}}else{let s=0;let r=Pe(e,this.top+t+i,this.bottom-this.columnSizes[s].height);for(const a of n){if(a.col!==s){s=a.col;r=Pe(e,this.top+t+i,this.bottom-this.columnSizes[s].height)}a.top=r;a.left+=this.left+i;a.left=o.leftForLtr(o.x(a.left),a.width);r+=a.height+i}}}isHorizontal(){return this.options.position==="top"||this.options.position==="bottom"}draw(){if(this.options.display){const t=this.ctx;li(t,this);this._draw();hi(t)}}_draw(){const{options:t,columnSizes:n,lineWidths:e,ctx:i}=this;const{align:s,labels:o}=t;const r=ti.color;const a=Ps(t.rtl,this.left,this.width);const c=zi(o.font);const{padding:l}=o;const h=c.size;const f=h/2;let u;this.drawTitle();i.textAlign=a.textAlign("left");i.textBaseline="middle";i.lineWidth=.5;i.font=c.string;const{boxWidth:d,boxHeight:p,itemHeight:g}=Ol(o,h);const b=function(t,n,e){if(isNaN(d)||d<=0||isNaN(p)||p<0){return}i.save();const s=xn(e.lineWidth,1);i.fillStyle=xn(e.fillStyle,r);i.lineCap=xn(e.lineCap,"butt");i.lineDashOffset=xn(e.lineDashOffset,0);i.lineJoin=xn(e.lineJoin,"miter");i.lineWidth=s;i.strokeStyle=xn(e.strokeStyle,r);i.setLineDash(xn(e.lineDash,[]));if(o.usePointStyle){const r={radius:p*Math.SQRT2/2,pointStyle:e.pointStyle,rotation:e.rotation,borderWidth:s};const c=a.xPlus(t,d/2);const l=n+f;ai(i,r,c,l,o.pointStyleWidth&&d)}else{const o=n+Math.max((h-p)/2,0);const r=a.leftForLtr(t,d);const c=Si(e.borderRadius);i.beginPath();if(Object.values(c).some((t=>t!==0))){mi(i,{x:r,y:o,w:d,h:p,radius:c})}else{i.rect(r,o,d,p)}i.fill();if(s!==0){i.stroke()}}i.restore()};const m=function(t,n,e){bi(i,e.text,t,n+g/2,c,{strikethrough:e.hidden,textAlign:a.textAlign(e.textAlign)})};const y=this.isHorizontal();const w=this._computeTitleHeight();if(y){u={x:Pe(s,this.left+l,this.right-e[0]),y:this.top+l+w,line:0}}else{u={x:this.left+l,y:Pe(s,this.top+w+l,this.bottom-n[0].height),line:0}}Os(this.ctx,t.textDirection);const x=g+l;this.legendItems.forEach(((r,h)=>{i.strokeStyle=r.fontColor;i.fillStyle=r.fontColor;const p=i.measureText(r.text).width;const g=a.textAlign(r.textAlign||(r.textAlign=o.textAlign));const v=d+f+p;let k=u.x;let M=u.y;a.setWidth(this.width);if(y){if(h>0&&k+v+l>this.right){M=u.y+=x;u.line++;k=u.x=Pe(s,this.left+l,this.right-e[u.line])}}else if(h>0&&M+x>this.bottom){k=u.x=k+n[u.line].width+l;u.line++;M=u.y=Pe(s,this.top+w+l,this.bottom-n[u.line].height)}const S=a.x(k);b(S,M,r);k=Oe(g,k+d+f,y?k+v:this.right,t.rtl);m(a.x(k),M,r);if(y){u.x+=v+l}else if(typeof r.text!=="string"){const t=c.lineHeight;u.y+=Ll(r,t)+l}else{u.y+=x}}));Cs(this.ctx,t.textDirection)}drawTitle(){const t=this.options;const n=t.title;const e=zi(n.font);const i=_i(n.padding);if(!n.display){return}const s=Ps(t.rtl,this.left,this.width);const o=this.ctx;const r=n.position;const a=e.size/2;const c=i.top+a;let l;let h=this.left;let f=this.width;if(this.isHorizontal()){f=Math.max(...this.lineWidths);l=this.top+c;h=Pe(t.align,h,this.right-f)}else{const n=this.columnSizes.reduce(((t,n)=>Math.max(t,n.height)),0);l=c+Pe(t.align,this.top,this.bottom-n-t.labels.padding-this._computeTitleHeight())}const u=Pe(r,h,h+f);o.textAlign=s.textAlign(ze(r));o.textBaseline="middle";o.strokeStyle=n.color;o.fillStyle=n.color;o.font=e.string;bi(o,n.text,u,l,e)}_computeTitleHeight(){const t=this.options.title;const n=zi(t.font);const e=_i(t.padding);return t.display?n.lineHeight+e.height:0}_getLegendItemAt(t,n){let e,i,s;if(pe(t,this.left,this.right)&&pe(n,this.top,this.bottom)){s=this.legendHitBoxes;for(e=0;e<s.length;++e){i=s[e];if(pe(t,i.left,i.left+i.width)&&pe(n,i.top,i.top+i.height)){return this.legendItems[e]}}}return null}handleEvent(t){const n=this.options;if(!Rl(t.type,n)){return}const e=this._getLegendItemAt(t.x,t.y);if(t.type==="mousemove"||t.type==="mouseout"){const i=this._hoveredItem;const s=Cl(i,e);if(i&&!s){Mn(n.onLeave,[t,i,this],this)}this._hoveredItem=e;if(e&&!s){Mn(n.onHover,[t,e,this],this)}}else if(e){Mn(n.onClick,[t,e,this],this)}}}function Al(t,n,e,i,s){const o=jl(i,t,n,e);const r=El(s,i,n.lineHeight);return{itemWidth:o,itemHeight:r}}function jl(t,n,e,i){let s=t.text;if(s&&typeof s!=="string"){s=s.reduce(((t,n)=>t.length>n.length?t:n))}return n+e.size/2+i.measureText(s).width}function El(t,n,e){let i=t;if(typeof n.text!=="string"){i=Ll(n,e)}return i}function Ll(t,n){const e=t.text?t.text.length:0;return n*e}function Rl(t,n){if((t==="mousemove"||t==="mouseout")&&(n.onHover||n.onLeave)){return true}if(n.onClick&&(t==="click"||t==="mouseup")){return true}return false}var Nl={id:"legend",_element:Dl,start(t,n,e){const i=t.legend=new Dl({ctx:t.ctx,options:e,chart:t});wr.configure(t,i,e);wr.addBox(t,i)},stop(t){wr.removeBox(t,t.legend);delete t.legend},beforeUpdate(t,n,e){const i=t.legend;wr.configure(t,i,e);i.options=e},afterUpdate(t){const n=t.legend;n.buildLabels();n.adjustHitBoxes()},afterEvent(t,n){if(!n.replay){t.legend.handleEvent(n.event)}},defaults:{display:true,position:"top",align:"center",fullSize:true,reverse:false,weight:1e3,onClick(t,n,e){const i=n.datasetIndex;const s=e.chart;if(s.isDatasetVisible(i)){s.hide(i);n.hidden=true}else{s.show(i);n.hidden=false}},onHover:null,onLeave:null,labels:{color:t=>t.chart.options.color,boxWidth:40,padding:10,generateLabels(t){const n=t.data.datasets;const{labels:{usePointStyle:e,pointStyle:i,textAlign:s,color:o,useBorderRadius:r,borderRadius:a}}=t.legend.options;return t._getSortedDatasetMetas().map((t=>{const c=t.controller.getStyle(e?0:undefined);const l=_i(c.borderWidth);return{text:n[t.index].label,fillStyle:c.backgroundColor,fontColor:o,hidden:!t.visible,lineCap:c.borderCapStyle,lineDash:c.borderDash,lineDashOffset:c.borderDashOffset,lineJoin:c.borderJoinStyle,lineWidth:(l.width+l.height)/4,strokeStyle:c.borderColor,pointStyle:i||c.pointStyle,rotation:c.rotation,textAlign:s||c.textAlign,borderRadius:r&&(a||c.borderRadius),datasetIndex:t.index}}),this)}},title:{color:t=>t.chart.options.color,display:false,position:"center",text:""}},descriptors:{_scriptable:t=>!t.startsWith("on"),labels:{_scriptable:t=>!["generateLabels","filter","sort"].includes(t)}}};class Tl extends $r{constructor(t){super();this.chart=t.chart;this.options=t.options;this.ctx=t.ctx;this._padding=undefined;this.top=undefined;this.bottom=undefined;this.left=undefined;this.right=undefined;this.width=undefined;this.height=undefined;this.position=undefined;this.weight=undefined;this.fullSize=undefined}update(t,n){const e=this.options;this.left=0;this.top=0;if(!e.display){this.width=this.height=this.right=this.bottom=0;return}this.width=this.right=t;this.height=this.bottom=n;const i=bn(e.text)?e.text.length:1;this._padding=_i(e.padding);const s=i*zi(e.font).lineHeight+this._padding.height;if(this.isHorizontal()){this.height=s}else{this.width=s}}isHorizontal(){const t=this.options.position;return t==="top"||t==="bottom"}_drawArgs(t){const{top:n,left:e,bottom:i,right:s,options:o}=this;const r=o.align;let a=0;let c,l,h;if(this.isHorizontal()){l=Pe(r,e,s);h=n+t;c=s-e}else{if(o.position==="left"){l=e+t;h=Pe(r,i,n);a=Bn*-.5}else{l=s-t;h=Pe(r,n,i);a=Bn*.5}c=i-n}return{titleX:l,titleY:h,maxWidth:c,rotation:a}}draw(){const t=this.ctx;const n=this.options;if(!n.display){return}const e=zi(n.font);const i=e.lineHeight;const s=i/2+this._padding.top;const{titleX:o,titleY:r,maxWidth:a,rotation:c}=this._drawArgs(s);bi(t,n.text,0,0,e,{color:n.color,maxWidth:a,rotation:c,textAlign:ze(n.align),textBaseline:"middle",translation:[o,r]})}}function Il(t,n){const e=new Tl({ctx:t.ctx,options:n,chart:t});wr.configure(t,e,n);wr.addBox(t,e);t.titleBlock=e}var Fl={id:"title",_element:Tl,start(t,n,e){Il(t,e)},stop(t){const n=t.titleBlock;wr.removeBox(t,n);delete t.titleBlock},beforeUpdate(t,n,e){const i=t.titleBlock;wr.configure(t,i,e);i.options=e},defaults:{align:"center",display:false,font:{weight:"bold"},fullSize:true,padding:10,position:"top",text:"",weight:2e3},defaultRoutes:{color:"color"},descriptors:{_scriptable:true,_indexable:false}};const Wl=new WeakMap;var Bl={id:"subtitle",start(t,n,e){const i=new Tl({ctx:t.ctx,options:e,chart:t});wr.configure(t,i,e);wr.addBox(t,i);Wl.set(t,i)},stop(t){wr.removeBox(t,Wl.get(t));Wl.delete(t)},beforeUpdate(t,n,e){const i=Wl.get(t);wr.configure(t,i,e);i.options=e},defaults:{align:"center",display:false,font:{weight:"normal"},fullSize:true,padding:0,position:"top",text:"",weight:1500},defaultRoutes:{color:"color"},descriptors:{_scriptable:true,_indexable:false}};const Hl={average(t){if(!t.length){return false}let n,e;let i=new Set;let s=0;let o=0;for(n=0,e=t.length;n<e;++n){const e=t[n].element;if(e&&e.hasValue()){const t=e.tooltipPosition();i.add(t.x);s+=t.y;++o}}if(o===0||i.size===0){return false}const r=[...i].reduce(((t,n)=>t+n))/i.size;return{x:r,y:s/o}},nearest(t,n){if(!t.length){return false}let e=n.x;let i=n.y;let s=Number.POSITIVE_INFINITY;let o,r,a;for(o=0,r=t.length;o<r;++o){const e=t[o].element;if(e&&e.hasValue()){const t=e.getCenterPoint();const i=ce(n,t);if(i<s){s=i;a=e}}}if(a){const t=a.tooltipPosition();e=t.x;i=t.y}return{x:e,y:i}}};function $l(t,n){if(n){if(bn(n)){Array.prototype.push.apply(t,n)}else{t.push(n)}}return t}function Vl(t){if((typeof t==="string"||t instanceof String)&&t.indexOf("\n")>-1){return t.split("\n")}return t}function Yl(t,n){const{element:e,datasetIndex:i,index:s}=n;const o=t.getDatasetMeta(i).controller;const{label:r,value:a}=o.getLabelAndValue(s);return{chart:t,label:r,parsed:o.getParsed(s),raw:t.data.datasets[i].data[s],formattedValue:a,dataset:o.getDataset(),dataIndex:s,datasetIndex:i,element:e}}function Ul(t,n){const e=t.chart.ctx;const{body:i,footer:s,title:o}=t;const{boxWidth:r,boxHeight:a}=n;const c=zi(n.bodyFont);const l=zi(n.titleFont);const h=zi(n.footerFont);const f=o.length;const u=s.length;const d=i.length;const p=_i(n.padding);let g=p.height;let b=0;let m=i.reduce(((t,n)=>t+n.before.length+n.lines.length+n.after.length),0);m+=t.beforeBody.length+t.afterBody.length;if(f){g+=f*l.lineHeight+(f-1)*n.titleSpacing+n.titleMarginBottom}if(m){const t=n.displayColors?Math.max(a,c.lineHeight):c.lineHeight;g+=d*t+(m-d)*c.lineHeight+(m-1)*n.bodySpacing}if(u){g+=n.footerMarginTop+u*h.lineHeight+(u-1)*n.footerSpacing}let y=0;const w=function(t){b=Math.max(b,e.measureText(t).width+y)};e.save();e.font=l.string;Sn(t.title,w);e.font=c.string;Sn(t.beforeBody.concat(t.afterBody),w);y=n.displayColors?r+2+n.boxPadding:0;Sn(i,(t=>{Sn(t.before,w);Sn(t.lines,w);Sn(t.after,w)}));y=0;e.font=h.string;Sn(t.footer,w);e.restore();b+=p.width;return{width:b,height:g}}function Xl(t,n){const{y:e,height:i}=n;if(e<i/2){return"top"}else if(e>t.height-i/2){return"bottom"}return"center"}function Kl(t,n,e,i){const{x:s,width:o}=i;const r=e.caretSize+e.caretPadding;if(t==="left"&&s+o+r>n.width){return true}if(t==="right"&&s-o-r<0){return true}}function ql(t,n,e,i){const{x:s,width:o}=e;const{width:r,chartArea:{left:a,right:c}}=t;let l="center";if(i==="center"){l=s<=(a+c)/2?"left":"right"}else if(s<=o/2){l="left"}else if(s>=r-o/2){l="right"}if(Kl(l,t,n,e)){l="center"}return l}function Zl(t,n,e){const i=e.yAlign||n.yAlign||Xl(t,e);return{xAlign:e.xAlign||n.xAlign||ql(t,n,e,i),yAlign:i}}function Jl(t,n){let{x:e,width:i}=t;if(n==="right"){e-=i}else if(n==="center"){e-=i/2}return e}function Ql(t,n,e){let{y:i,height:s}=t;if(n==="top"){i+=e}else if(n==="bottom"){i-=s+e}else{i-=s/2}return i}function Gl(t,n,e,i){const{caretSize:s,caretPadding:o,cornerRadius:r}=t;const{xAlign:a,yAlign:c}=e;const l=s+o;const{topLeft:h,topRight:f,bottomLeft:u,bottomRight:d}=Si(r);let p=Jl(n,a);const g=Ql(n,c,l);if(c==="center"){if(a==="left"){p+=l}else if(a==="right"){p-=l}}else if(a==="left"){p-=Math.max(h,u)+s}else if(a==="right"){p+=Math.max(f,d)+s}return{x:ue(p,0,i.width-n.width),y:ue(g,0,i.height-n.height)}}function th(t,n,e){const i=_i(e.padding);return n==="center"?t.x+t.width/2:n==="right"?t.x+t.width-i.right:t.x+i.left}function nh(t){return $l([],Vl(t))}function eh(t,n,e){return Ci(t,{tooltip:n,tooltipItems:e,type:"tooltip"})}function ih(t,n){const e=n&&n.dataset&&n.dataset.tooltip&&n.dataset.tooltip.callbacks;return e?t.override(e):t}const sh={beforeTitle:dn,title(t){if(t.length>0){const n=t[0];const e=n.chart.data.labels;const i=e?e.length:0;if(this&&this.options&&this.options.mode==="dataset"){return n.dataset.label||""}else if(n.label){return n.label}else if(i>0&&n.dataIndex<i){return e[n.dataIndex]}}return""},afterTitle:dn,beforeBody:dn,beforeLabel:dn,label(t){if(this&&this.options&&this.options.mode==="dataset"){return t.label+": "+t.formattedValue||t.formattedValue}let n=t.dataset.label||"";if(n){n+=": "}const e=t.formattedValue;if(!gn(e)){n+=e}return n},labelColor(t){const n=t.chart.getDatasetMeta(t.datasetIndex);const e=n.controller.getStyle(t.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(t){const n=t.chart.getDatasetMeta(t.datasetIndex);const e=n.controller.getStyle(t.dataIndex);return{pointStyle:e.pointStyle,rotation:e.rotation}},afterLabel:dn,afterBody:dn,beforeFooter:dn,footer:dn,afterFooter:dn};function oh(t,n,e,i){const s=t[n].call(e,i);if(typeof s==="undefined"){return sh[n].call(e,i)}return s}class rh extends $r{static positioners=Hl;constructor(t){super();this.opacity=0;this._active=[];this._eventPosition=undefined;this._size=undefined;this._cachedAnimations=undefined;this._tooltipItems=[];this.$animations=undefined;this.$context=undefined;this.chart=t.chart;this.options=t.options;this.dataPoints=undefined;this.title=undefined;this.beforeBody=undefined;this.body=undefined;this.afterBody=undefined;this.footer=undefined;this.xAlign=undefined;this.yAlign=undefined;this.x=undefined;this.y=undefined;this.height=undefined;this.width=undefined;this.caretX=undefined;this.caretY=undefined;this.labelColors=undefined;this.labelPointStyles=undefined;this.labelTextColors=undefined}initialize(t){this.options=t;this._cachedAnimations=undefined;this.$context=undefined}_resolveAnimations(){const t=this._cachedAnimations;if(t){return t}const n=this.chart;const e=this.options.setContext(this.getContext());const i=e.enabled&&n.options.animation&&e.animations;const s=new Zs(this.chart,i);if(i._cacheable){this._cachedAnimations=Object.freeze(s)}return s}getContext(){return this.$context||(this.$context=eh(this.chart.getContext(),this,this._tooltipItems))}getTitle(t,n){const{callbacks:e}=n;const i=oh(e,"beforeTitle",this,t);const s=oh(e,"title",this,t);const o=oh(e,"afterTitle",this,t);let r=[];r=$l(r,Vl(i));r=$l(r,Vl(s));r=$l(r,Vl(o));return r}getBeforeBody(t,n){return nh(oh(n.callbacks,"beforeBody",this,t))}getBody(t,n){const{callbacks:e}=n;const i=[];Sn(t,(t=>{const n={before:[],lines:[],after:[]};const s=ih(e,t);$l(n.before,Vl(oh(s,"beforeLabel",this,t)));$l(n.lines,oh(s,"label",this,t));$l(n.after,Vl(oh(s,"afterLabel",this,t)));i.push(n)}));return i}getAfterBody(t,n){return nh(oh(n.callbacks,"afterBody",this,t))}getFooter(t,n){const{callbacks:e}=n;const i=oh(e,"beforeFooter",this,t);const s=oh(e,"footer",this,t);const o=oh(e,"afterFooter",this,t);let r=[];r=$l(r,Vl(i));r=$l(r,Vl(s));r=$l(r,Vl(o));return r}_createItems(t){const n=this._active;const e=this.chart.data;const i=[];const s=[];const o=[];let r=[];let a,c;for(a=0,c=n.length;a<c;++a){r.push(Yl(this.chart,n[a]))}if(t.filter){r=r.filter(((n,i,s)=>t.filter(n,i,s,e)))}if(t.itemSort){r=r.sort(((n,i)=>t.itemSort(n,i,e)))}Sn(r,(n=>{const e=ih(t.callbacks,n);i.push(oh(e,"labelColor",this,n));s.push(oh(e,"labelPointStyle",this,n));o.push(oh(e,"labelTextColor",this,n))}));this.labelColors=i;this.labelPointStyles=s;this.labelTextColors=o;this.dataPoints=r;return r}update(t,n){const e=this.options.setContext(this.getContext());const i=this._active;let s;let o=[];if(!i.length){if(this.opacity!==0){s={opacity:0}}}else{const t=Hl[e.position].call(this,i,this._eventPosition);o=this._createItems(e);this.title=this.getTitle(o,e);this.beforeBody=this.getBeforeBody(o,e);this.body=this.getBody(o,e);this.afterBody=this.getAfterBody(o,e);this.footer=this.getFooter(o,e);const n=this._size=Ul(this,e);const r=Object.assign({},t,n);const a=Zl(this.chart,e,r);const c=Gl(e,r,a,this.chart);this.xAlign=a.xAlign;this.yAlign=a.yAlign;s={opacity:1,x:c.x,y:c.y,width:n.width,height:n.height,caretX:t.x,caretY:t.y}}this._tooltipItems=o;this.$context=undefined;if(s){this._resolveAnimations().update(this,s)}if(t&&e.external){e.external.call(this,{chart:this.chart,tooltip:this,replay:n})}}drawCaret(t,n,e,i){const s=this.getCaretPosition(t,e,i);n.lineTo(s.x1,s.y1);n.lineTo(s.x2,s.y2);n.lineTo(s.x3,s.y3)}getCaretPosition(t,n,e){const{xAlign:i,yAlign:s}=this;const{caretSize:o,cornerRadius:r}=e;const{topLeft:a,topRight:c,bottomLeft:l,bottomRight:h}=Si(r);const{x:f,y:u}=t;const{width:d,height:p}=n;let g,b,m,y,w,x;if(s==="center"){w=u+p/2;if(i==="left"){g=f;b=g-o;y=w+o;x=w-o}else{g=f+d;b=g+o;y=w-o;x=w+o}m=g}else{if(i==="left"){b=f+Math.max(a,l)+o}else if(i==="right"){b=f+d-Math.max(c,h)-o}else{b=this.caretX}if(s==="top"){y=u;w=y-o;g=b-o;m=b+o}else{y=u+p;w=y+o;g=b+o;m=b-o}x=y}return{x1:g,x2:b,x3:m,y1:y,y2:w,y3:x}}drawTitle(t,n,e){const i=this.title;const s=i.length;let o,r,a;if(s){const c=Ps(e.rtl,this.x,this.width);t.x=th(this,e.titleAlign,e);n.textAlign=c.textAlign(e.titleAlign);n.textBaseline="middle";o=zi(e.titleFont);r=e.titleSpacing;n.fillStyle=e.titleColor;n.font=o.string;for(a=0;a<s;++a){n.fillText(i[a],c.x(t.x),t.y+o.lineHeight/2);t.y+=o.lineHeight+r;if(a+1===s){t.y+=e.titleMarginBottom-r}}}}_drawColorBox(t,n,e,i,s){const o=this.labelColors[e];const r=this.labelPointStyles[e];const{boxHeight:a,boxWidth:c}=s;const l=zi(s.bodyFont);const h=th(this,"left",s);const f=i.x(h);const u=a<l.lineHeight?(l.lineHeight-a)/2:0;const d=n.y+u;if(s.usePointStyle){const n={radius:Math.min(c,a)/2,pointStyle:r.pointStyle,rotation:r.rotation,borderWidth:1};const e=i.leftForLtr(f,c)+c/2;const l=d+a/2;t.strokeStyle=s.multiKeyBackground;t.fillStyle=s.multiKeyBackground;ri(t,n,e,l);t.strokeStyle=o.borderColor;t.fillStyle=o.backgroundColor;ri(t,n,e,l)}else{t.lineWidth=mn(o.borderWidth)?Math.max(...Object.values(o.borderWidth)):o.borderWidth||1;t.strokeStyle=o.borderColor;t.setLineDash(o.borderDash||[]);t.lineDashOffset=o.borderDashOffset||0;const n=i.leftForLtr(f,c);const e=i.leftForLtr(i.xPlus(f,1),c-2);const r=Si(o.borderRadius);if(Object.values(r).some((t=>t!==0))){t.beginPath();t.fillStyle=s.multiKeyBackground;mi(t,{x:n,y:d,w:c,h:a,radius:r});t.fill();t.stroke();t.fillStyle=o.backgroundColor;t.beginPath();mi(t,{x:e,y:d+1,w:c-2,h:a-2,radius:r});t.fill()}else{t.fillStyle=s.multiKeyBackground;t.fillRect(n,d,c,a);t.strokeRect(n,d,c,a);t.fillStyle=o.backgroundColor;t.fillRect(e,d+1,c-2,a-2)}}t.fillStyle=this.labelTextColors[e]}drawBody(t,n,e){const{body:i}=this;const{bodySpacing:s,bodyAlign:o,displayColors:r,boxHeight:a,boxWidth:c,boxPadding:l}=e;const h=zi(e.bodyFont);let f=h.lineHeight;let u=0;const d=Ps(e.rtl,this.x,this.width);const p=function(e){n.fillText(e,d.x(t.x+u),t.y+f/2);t.y+=f+s};const g=d.textAlign(o);let b,m,y,w,x,v,k;n.textAlign=o;n.textBaseline="middle";n.font=h.string;t.x=th(this,g,e);n.fillStyle=e.bodyColor;Sn(this.beforeBody,p);u=r&&g!=="right"?o==="center"?c/2+l:c+2+l:0;for(w=0,v=i.length;w<v;++w){b=i[w];m=this.labelTextColors[w];n.fillStyle=m;Sn(b.before,p);y=b.lines;if(r&&y.length){this._drawColorBox(n,t,w,d,e);f=Math.max(h.lineHeight,a)}for(x=0,k=y.length;x<k;++x){p(y[x]);f=h.lineHeight}Sn(b.after,p)}u=0;f=h.lineHeight;Sn(this.afterBody,p);t.y-=s}drawFooter(t,n,e){const i=this.footer;const s=i.length;let o,r;if(s){const a=Ps(e.rtl,this.x,this.width);t.x=th(this,e.footerAlign,e);t.y+=e.footerMarginTop;n.textAlign=a.textAlign(e.footerAlign);n.textBaseline="middle";o=zi(e.footerFont);n.fillStyle=e.footerColor;n.font=o.string;for(r=0;r<s;++r){n.fillText(i[r],a.x(t.x),t.y+o.lineHeight/2);t.y+=o.lineHeight+e.footerSpacing}}}drawBackground(t,n,e,i){const{xAlign:s,yAlign:o}=this;const{x:r,y:a}=t;const{width:c,height:l}=e;const{topLeft:h,topRight:f,bottomLeft:u,bottomRight:d}=Si(i.cornerRadius);n.fillStyle=i.backgroundColor;n.strokeStyle=i.borderColor;n.lineWidth=i.borderWidth;n.beginPath();n.moveTo(r+h,a);if(o==="top"){this.drawCaret(t,n,e,i)}n.lineTo(r+c-f,a);n.quadraticCurveTo(r+c,a,r+c,a+f);if(o==="center"&&s==="right"){this.drawCaret(t,n,e,i)}n.lineTo(r+c,a+l-d);n.quadraticCurveTo(r+c,a+l,r+c-d,a+l);if(o==="bottom"){this.drawCaret(t,n,e,i)}n.lineTo(r+u,a+l);n.quadraticCurveTo(r,a+l,r,a+l-u);if(o==="center"&&s==="left"){this.drawCaret(t,n,e,i)}n.lineTo(r,a+h);n.quadraticCurveTo(r,a,r+h,a);n.closePath();n.fill();if(i.borderWidth>0){n.stroke()}}_updateAnimationTarget(t){const n=this.chart;const e=this.$animations;const i=e&&e.x;const s=e&&e.y;if(i||s){const e=Hl[t.position].call(this,this._active,this._eventPosition);if(!e){return}const o=this._size=Ul(this,t);const r=Object.assign({},e,this._size);const a=Zl(n,t,r);const c=Gl(t,r,a,n);if(i._to!==c.x||s._to!==c.y){this.xAlign=a.xAlign;this.yAlign=a.yAlign;this.width=o.width;this.height=o.height;this.caretX=e.x;this.caretY=e.y;this._resolveAnimations().update(this,c)}}}_willRender(){return!!this.opacity}draw(t){const n=this.options.setContext(this.getContext());let e=this.opacity;if(!e){return}this._updateAnimationTarget(n);const i={width:this.width,height:this.height};const s={x:this.x,y:this.y};e=Math.abs(e)<.001?0:e;const o=_i(n.padding);const r=this.title.length||this.beforeBody.length||this.body.length||this.afterBody.length||this.footer.length;if(n.enabled&&r){t.save();t.globalAlpha=e;this.drawBackground(s,t,i,n);Os(t,n.textDirection);s.y+=o.top;this.drawTitle(s,t,n);this.drawBody(s,t,n);this.drawFooter(s,t,n);Cs(t,n.textDirection);t.restore()}}getActiveElements(){return this._active||[]}setActiveElements(t,n){const e=this._active;const i=t.map((({datasetIndex:t,index:n})=>{const e=this.chart.getDatasetMeta(t);if(!e){throw new Error("Cannot find a dataset at index "+t)}return{datasetIndex:t,element:e.data[n],index:n}}));const s=!_n(e,i);const o=this._positionChanged(i,n);if(s||o){this._active=i;this._eventPosition=n;this._ignoreReplayEvents=true;this.update(true)}}handleEvent(t,n,e=true){if(n&&this._ignoreReplayEvents){return false}this._ignoreReplayEvents=false;const i=this.options;const s=this._active||[];const o=this._getActiveElements(t,s,n,e);const r=this._positionChanged(o,t);const a=n||!_n(o,s)||r;if(a){this._active=o;if(i.enabled||i.external){this._eventPosition={x:t.x,y:t.y};this.update(true,n)}}return a}_getActiveElements(t,n,e,i){const s=this.options;if(t.type==="mouseout"){return[]}if(!i){return n.filter((t=>this.chart.data.datasets[t.datasetIndex]&&this.chart.getDatasetMeta(t.datasetIndex).controller.getParsed(t.index)!==undefined))}const o=this.chart.getElementsAtEventForMode(t,s.mode,s,e);if(s.reverse){o.reverse()}return o}_positionChanged(t,n){const{caretX:e,caretY:i,options:s}=this;const o=Hl[s.position].call(this,t,n);return o!==false&&(e!==o.x||i!==o.y)}}var ah={id:"tooltip",_element:rh,positioners:Hl,afterInit(t,n,e){if(e){t.tooltip=new rh({chart:t,options:e})}},beforeUpdate(t,n,e){if(t.tooltip){t.tooltip.initialize(e)}},reset(t,n,e){if(t.tooltip){t.tooltip.initialize(e)}},afterDraw(t){const n=t.tooltip;if(n&&n._willRender()){const e={tooltip:n};if(t.notifyPlugins("beforeTooltipDraw",{...e,cancelable:true})===false){return}n.draw(t.ctx);t.notifyPlugins("afterTooltipDraw",e)}},afterEvent(t,n){if(t.tooltip){const e=n.replay;if(t.tooltip.handleEvent(n.event,e,n.inChartArea)){n.changed=true}}},defaults:{enabled:true,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:(t,n)=>n.bodyFont.size,boxWidth:(t,n)=>n.bodyFont.size,multiKeyBackground:"#fff",displayColors:true,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:sh},defaultRoutes:{bodyFont:"font",footerFont:"font",titleFont:"font"},descriptors:{_scriptable:t=>t!=="filter"&&t!=="itemSort"&&t!=="external",_indexable:false,callbacks:{_scriptable:false,_indexable:false},animation:{_fallback:false},animations:{_fallback:"animation"}},additionalOptionScopes:["interaction"]};var ch=Object.freeze({__proto__:null,Colors:Yc,Decimation:Jc,Filler:Pl,Legend:Nl,SubTitle:Bl,Title:Fl,Tooltip:ah});const lh=(t,n,e,i)=>{if(typeof n==="string"){e=t.push(n)-1;i.unshift({index:e,label:n})}else if(isNaN(n)){e=null}return e};function hh(t,n,e,i){const s=t.indexOf(n);if(s===-1){return lh(t,n,e,i)}const o=t.lastIndexOf(n);return s!==o?e:s}const fh=(t,n)=>t===null?null:ue(Math.round(t),0,n);function uh(t){const n=this.getLabels();if(t>=0&&t<n.length){return n[t]}return t}class dh extends la{static id="category";static defaults={ticks:{callback:uh}};constructor(t){super(t);this._startValue=undefined;this._valueRange=0;this._addedLabels=[]}init(t){const n=this._addedLabels;if(n.length){const t=this.getLabels();for(const{index:e,label:i}of n){if(t[e]===i){t.splice(e,1)}}this._addedLabels=[]}super.init(t)}parse(t,n){if(gn(t)){return null}const e=this.getLabels();n=isFinite(n)&&e[n]===t?n:hh(e,t,xn(n,t),this._addedLabels);return fh(n,e.length-1)}determineDataLimits(){const{minDefined:t,maxDefined:n}=this.getUserBounds();let{min:e,max:i}=this.getMinMax(true);if(this.options.bounds==="ticks"){if(!t){e=0}if(!n){i=this.getLabels().length-1}}this.min=e;this.max=i}buildTicks(){const t=this.min;const n=this.max;const e=this.options.offset;const i=[];let s=this.getLabels();s=t===0&&n===s.length-1?s:s.slice(t,n+1);this._valueRange=Math.max(s.length-(e?0:1),1);this._startValue=this.min-(e?.5:0);for(let e=t;e<=n;e++){i.push({value:e})}return i}getLabelForValue(t){return uh.call(this,t)}configure(){super.configure();if(!this.isHorizontal()){this._reversePixels=!this._reversePixels}}getPixelForValue(t){if(typeof t!=="number"){t=this.parse(t)}return t===null?NaN:this.getPixelForDecimal((t-this._startValue)/this._valueRange)}getPixelForTick(t){const n=this.ticks;if(t<0||t>n.length-1){return null}return this.getPixelForValue(n[t].value)}getValueForPixel(t){return Math.round(this._startValue+this.getDecimalForPixel(t)*this._valueRange)}getBasePixel(){return this.bottom}}function ph(t,n){const e=[];const i=1e-14;const{bounds:s,step:o,min:r,max:a,precision:c,count:l,maxTicks:h,maxDigits:f,includeBounds:u}=t;const d=o||1;const p=h-1;const{min:g,max:b}=n;const m=!gn(r);const y=!gn(a);const w=!gn(l);const x=(b-g)/(f+1);let v=Qn((b-g)/p/d)*d;let k,M,S,_;if(v<i&&!m&&!y){return[{value:g},{value:b}]}_=Math.ceil(b/v)-Math.floor(g/v);if(_>p){v=Qn(_*v/p/d)*d}if(!gn(c)){k=Math.pow(10,c);v=Math.ceil(v*k)/k}if(s==="ticks"){M=Math.floor(g/v)*v;S=Math.ceil(b/v)*v}else{M=g;S=b}if(m&&y&&o&&ee((a-r)/o,v/1e3)){_=Math.round(Math.min((a-r)/v,h));v=(a-r)/_;M=r;S=a}else if(w){M=m?r:M;S=y?a:S;_=l-1;v=(S-M)/_}else{_=(S-M)/v;if(Jn(_,Math.round(_),v/1e3)){_=Math.round(_)}else{_=Math.ceil(_)}}const z=Math.max(re(v),re(M));k=Math.pow(10,gn(c)?z:c);M=Math.round(M*k)/k;S=Math.round(S*k)/k;let P=0;if(m){if(u&&M!==r){e.push({value:r});if(M<r){P++}if(Jn(Math.round((M+P*v)*k)/k,r,gh(r,x,t))){P++}}else if(M<r){P++}}for(;P<_;++P){const t=Math.round((M+P*v)*k)/k;if(y&&t>a){break}e.push({value:t})}if(y&&u&&S!==a){if(e.length&&Jn(e[e.length-1].value,a,gh(a,x,t))){e[e.length-1].value=a}else{e.push({value:a})}}else if(!y||S===a){e.push({value:S})}return e}function gh(t,n,{horizontal:e,minRotation:i}){const s=se(i);const o=(e?Math.sin(s):Math.cos(s))||.001;const r=.75*n*(""+t).length;return Math.min(n/o,r)}class bh extends la{constructor(t){super(t);this.start=undefined;this.end=undefined;this._startValue=undefined;this._endValue=undefined;this._valueRange=0}parse(t,n){if(gn(t)){return null}if((typeof t==="number"||t instanceof Number)&&!isFinite(+t)){return null}return+t}handleTickRangeOptions(){const{beginAtZero:t}=this.options;const{minDefined:n,maxDefined:e}=this.getUserBounds();let{min:i,max:s}=this;const o=t=>i=n?i:t;const r=t=>s=e?s:t;if(t){const t=Zn(i);const n=Zn(s);if(t<0&&n<0){r(0)}else if(t>0&&n>0){o(0)}}if(i===s){let n=s===0?1:Math.abs(s*.05);r(s+n);if(!t){o(i-n)}}this.min=i;this.max=s}getTickLimit(){const t=this.options.ticks;let{maxTicksLimit:n,stepSize:e}=t;let i;if(e){i=Math.ceil(this.max/e)-Math.floor(this.min/e)+1;if(i>1e3){console.warn(`scales.${this.id}.ticks.stepSize: ${e} would result generating up to ${i} ticks. Limiting to 1000.`);i=1e3}}else{i=this.computeTickLimit();n=n||11}if(n){i=Math.min(n,i)}return i}computeTickLimit(){return Number.POSITIVE_INFINITY}buildTicks(){const t=this.options;const n=t.ticks;let e=this.getTickLimit();e=Math.max(2,e);const i={maxTicks:e,bounds:t.bounds,min:t.min,max:t.max,precision:n.precision,step:n.stepSize,count:n.count,maxDigits:this._maxDigits(),horizontal:this.isHorizontal(),minRotation:n.minRotation||0,includeBounds:n.includeBounds!==false};const s=this._range||this;const o=ph(i,s);if(t.bounds==="ticks"){ie(o,this,"value")}if(t.reverse){o.reverse();this.start=this.max;this.end=this.min}else{this.start=this.min;this.end=this.max}return o}configure(){const t=this.ticks;let n=this.min;let e=this.max;super.configure();if(this.options.offset&&t.length){const i=(e-n)/Math.max(t.length-1,1)/2;n-=i;e+=i}this._startValue=n;this._endValue=e;this._valueRange=e-n}getLabelForValue(t){return Ve(t,this.chart.options.locale,this.options.ticks.format)}}class mh extends bh{static id="linear";static defaults={ticks:{callback:Xe.formatters.numeric}};determineDataLimits(){const{min:t,max:n}=this.getMinMax(true);this.min=yn(t)?t:0;this.max=yn(n)?n:1;this.handleTickRangeOptions()}computeTickLimit(){const t=this.isHorizontal();const n=t?this.width:this.height;const e=se(this.options.ticks.minRotation);const i=(t?Math.sin(e):Math.cos(e))||.001;const s=this._resolveTickFontOptions(0);return Math.ceil(n/Math.min(40,s.lineHeight/i))}getPixelForValue(t){return t===null?NaN:this.getPixelForDecimal((t-this._startValue)/this._valueRange)}getValueForPixel(t){return this._startValue+this.getDecimalForPixel(t)*this._valueRange}}const yh=t=>Math.floor(qn(t));const wh=(t,n)=>Math.pow(10,yh(t)+n);function xh(t){const n=t/Math.pow(10,yh(t));return n===1}function vh(t,n,e){const i=Math.pow(10,e);const s=Math.floor(t/i);const o=Math.ceil(n/i);return o-s}function kh(t,n){const e=n-t;let i=yh(e);while(vh(t,n,i)>10){i++}while(vh(t,n,i)<10){i--}return Math.min(i,yh(t))}function Mh(t,{min:n,max:e}){n=wn(t.min,n);const i=[];const s=yh(n);let o=kh(n,e);let r=o<0?Math.pow(10,Math.abs(o)):1;const a=Math.pow(10,o);const c=s>o?Math.pow(10,s):0;const l=Math.round((n-c)*r)/r;const h=Math.floor((n-c)/a/10)*a*10;let f=Math.floor((l-h)/Math.pow(10,o));let u=wn(t.min,Math.round((c+h+f*Math.pow(10,o))*r)/r);while(u<e){i.push({value:u,major:xh(u),significand:f});if(f>=10){f=f<15?15:20}else{f++}if(f>=20){o++;f=2;r=o>=0?1:r}u=Math.round((c+h+f*Math.pow(10,o))*r)/r}const d=wn(t.max,u);i.push({value:d,major:xh(d),significand:f});return i}class Sh extends la{static id="logarithmic";static defaults={ticks:{callback:Xe.formatters.logarithmic,major:{enabled:true}}};constructor(t){super(t);this.start=undefined;this.end=undefined;this._startValue=undefined;this._valueRange=0}parse(t,n){const e=bh.prototype.parse.apply(this,[t,n]);if(e===0){this._zero=true;return undefined}return yn(e)&&e>0?e:null}determineDataLimits(){const{min:t,max:n}=this.getMinMax(true);this.min=yn(t)?Math.max(0,t):null;this.max=yn(n)?Math.max(0,n):null;if(this.options.beginAtZero){this._zero=true}if(this._zero&&this.min!==this._suggestedMin&&!yn(this._userMin)){this.min=t===wh(this.min,0)?wh(this.min,-1):wh(this.min,0)}this.handleTickRangeOptions()}handleTickRangeOptions(){const{minDefined:t,maxDefined:n}=this.getUserBounds();let e=this.min;let i=this.max;const s=n=>e=t?e:n;const o=t=>i=n?i:t;if(e===i){if(e<=0){s(1);o(10)}else{s(wh(e,-1));o(wh(i,1))}}if(e<=0){s(wh(i,-1))}if(i<=0){o(wh(e,1))}this.min=e;this.max=i}buildTicks(){const t=this.options;const n={min:this._userMin,max:this._userMax};const e=Mh(n,this);if(t.bounds==="ticks"){ie(e,this,"value")}if(t.reverse){e.reverse();this.start=this.max;this.end=this.min}else{this.start=this.min;this.end=this.max}return e}getLabelForValue(t){return t===undefined?"0":Ve(t,this.chart.options.locale,this.options.ticks.format)}configure(){const t=this.min;super.configure();this._startValue=qn(t);this._valueRange=qn(this.max)-qn(t)}getPixelForValue(t){if(t===undefined||t===0){t=this.min}if(t===null||isNaN(t)){return NaN}return this.getPixelForDecimal(t===this.min?0:(qn(t)-this._startValue)/this._valueRange)}getValueForPixel(t){const n=this.getDecimalForPixel(t);return Math.pow(10,this._startValue+n*this._valueRange)}}function _h(t){const n=t.ticks;if(n.display&&t.display){const t=_i(n.backdropPadding);return xn(n.font&&n.font.size,ti.font.size)+t.height}return 0}function zh(t,n,e){e=bn(e)?e:[e];return{w:ii(t,n.string,e),h:e.length*n.lineHeight}}function Ph(t,n,e,i,s){if(t===i||t===s){return{start:n-e/2,end:n+e/2}}else if(t<i||t>s){return{start:n-e,end:n}}return{start:n,end:n+e}}function Oh(t){const n={l:t.left+t._padding.left,r:t.right-t._padding.right,t:t.top+t._padding.top,b:t.bottom-t._padding.bottom};const e=Object.assign({},n);const i=[];const s=[];const o=t._pointLabels.length;const r=t.options.pointLabels;const a=r.centerPointLabels?Bn/o:0;for(let c=0;c<o;c++){const o=r.setContext(t.getPointLabelContext(c));s[c]=o.padding;const l=t.getPointPosition(c,t.drawingArea+s[c],a);const h=zi(o.font);const f=zh(t.ctx,h,t._pointLabels[c]);i[c]=f;const u=he(t.getIndexAngle(c)+a);const d=Math.round(oe(u));const p=Ph(d,l.x,f.w,0,180);const g=Ph(d,l.y,f.h,90,270);Ch(e,n,u,p,g)}t.setCenterPoint(n.l-e.l,e.r-n.r,n.t-e.t,e.b-n.b);t._pointLabelItems=jh(t,i,s)}function Ch(t,n,e,i,s){const o=Math.abs(Math.sin(e));const r=Math.abs(Math.cos(e));let a=0;let c=0;if(i.start<n.l){a=(n.l-i.start)/o;t.l=Math.min(t.l,n.l-a)}else if(i.end>n.r){a=(i.end-n.r)/o;t.r=Math.max(t.r,n.r+a)}if(s.start<n.t){c=(n.t-s.start)/r;t.t=Math.min(t.t,n.t-c)}else if(s.end>n.b){c=(s.end-n.b)/r;t.b=Math.max(t.b,n.b+c)}}function Dh(t,n,e){const i=t.drawingArea;const{extra:s,additionalAngle:o,padding:r,size:a}=e;const c=t.getPointPosition(n,i+s+r,o);const l=Math.round(oe(he(c.angle+Un)));const h=Rh(c.y,a.h,l);const f=Eh(l);const u=Lh(c.x,a.w,f);return{visible:true,x:c.x,y:h,textAlign:f,left:u,top:h,right:u+a.w,bottom:h+a.h}}function Ah(t,n){if(!n){return true}const{left:e,top:i,right:s,bottom:o}=t;const r=ci({x:e,y:i},n)||ci({x:e,y:o},n)||ci({x:s,y:i},n)||ci({x:s,y:o},n);return!r}function jh(t,n,e){const i=[];const s=t._pointLabels.length;const o=t.options;const{centerPointLabels:r,display:a}=o.pointLabels;const c={extra:_h(o)/2,additionalAngle:r?Bn/s:0};let l;for(let o=0;o<s;o++){c.padding=e[o];c.size=n[o];const s=Dh(t,o,c);i.push(s);if(a==="auto"){s.visible=Ah(s,l);if(s.visible){l=s}}}return i}function Eh(t){if(t===0||t===180){return"center"}else if(t<180){return"left"}return"right"}function Lh(t,n,e){if(e==="right"){t-=n}else if(e==="center"){t-=n/2}return t}function Rh(t,n,e){if(e===90||e===270){t-=n/2}else if(e>270||e<90){t-=n}return t}function Nh(t,n,e){const{left:i,top:s,right:o,bottom:r}=e;const{backdropColor:a}=n;if(!gn(a)){const e=Si(n.borderRadius);const c=_i(n.backdropPadding);t.fillStyle=a;const l=i-c.left;const h=s-c.top;const f=o-i+c.width;const u=r-s+c.height;if(Object.values(e).some((t=>t!==0))){t.beginPath();mi(t,{x:l,y:h,w:f,h:u,radius:e});t.fill()}else{t.fillRect(l,h,f,u)}}}function Th(t,n){const{ctx:e,options:{pointLabels:i}}=t;for(let s=n-1;s>=0;s--){const n=t._pointLabelItems[s];if(!n.visible){continue}const o=i.setContext(t.getPointLabelContext(s));Nh(e,o,n);const r=zi(o.font);const{x:a,y:c,textAlign:l}=n;bi(e,t._pointLabels[s],a,c+r.lineHeight/2,r,{color:o.color,textAlign:l,textBaseline:"middle"})}}function Ih(t,n,e,i){const{ctx:s}=t;if(e){s.arc(t.xCenter,t.yCenter,n,0,Hn)}else{let e=t.getPointPosition(0,n);s.moveTo(e.x,e.y);for(let o=1;o<i;o++){e=t.getPointPosition(o,n);s.lineTo(e.x,e.y)}}}function Fh(t,n,e,i,s){const o=t.ctx;const r=n.circular;const{color:a,lineWidth:c}=n;if(!r&&!i||!a||!c||e<0){return}o.save();o.strokeStyle=a;o.lineWidth=c;o.setLineDash(s.dash||[]);o.lineDashOffset=s.dashOffset;o.beginPath();Ih(t,e,r,i);o.closePath();o.stroke();o.restore()}function Wh(t,n,e){return Ci(t,{label:e,index:n,type:"pointLabel"})}class Bh extends bh{static id="radialLinear";static defaults={display:true,animate:true,position:"chartArea",angleLines:{display:true,lineWidth:1,borderDash:[],borderDashOffset:0},grid:{circular:false},startAngle:0,ticks:{showLabelBackdrop:true,callback:Xe.formatters.numeric},pointLabels:{backdropColor:undefined,backdropPadding:2,display:true,font:{size:10},callback(t){return t},padding:5,centerPointLabels:false}};static defaultRoutes={"angleLines.color":"borderColor","pointLabels.color":"color","ticks.color":"color"};static descriptors={angleLines:{_fallback:"grid"}};constructor(t){super(t);this.xCenter=undefined;this.yCenter=undefined;this.drawingArea=undefined;this._pointLabels=[];this._pointLabelItems=[]}setDimensions(){const t=this._padding=_i(_h(this.options)/2);const n=this.width=this.maxWidth-t.width;const e=this.height=this.maxHeight-t.height;this.xCenter=Math.floor(this.left+n/2+t.left);this.yCenter=Math.floor(this.top+e/2+t.top);this.drawingArea=Math.floor(Math.min(n,e)/2)}determineDataLimits(){const{min:t,max:n}=this.getMinMax(false);this.min=yn(t)&&!isNaN(t)?t:0;this.max=yn(n)&&!isNaN(n)?n:0;this.handleTickRangeOptions()}computeTickLimit(){return Math.ceil(this.drawingArea/_h(this.options))}generateTickLabels(t){bh.prototype.generateTickLabels.call(this,t);this._pointLabels=this.getLabels().map(((t,n)=>{const e=Mn(this.options.pointLabels.callback,[t,n],this);return e||e===0?e:""})).filter(((t,n)=>this.chart.getDataVisibility(n)))}fit(){const t=this.options;if(t.display&&t.pointLabels.display){Oh(this)}else{this.setCenterPoint(0,0,0,0)}}setCenterPoint(t,n,e,i){this.xCenter+=Math.floor((t-n)/2);this.yCenter+=Math.floor((e-i)/2);this.drawingArea-=Math.min(this.drawingArea/2,Math.max(t,n,e,i))}getIndexAngle(t){const n=Hn/(this._pointLabels.length||1);const e=this.options.startAngle||0;return he(t*n+se(e))}getDistanceFromCenterForValue(t){if(gn(t)){return NaN}const n=this.drawingArea/(this.max-this.min);if(this.options.reverse){return(this.max-t)*n}return(t-this.min)*n}getValueForDistanceFromCenter(t){if(gn(t)){return NaN}const n=t/(this.drawingArea/(this.max-this.min));return this.options.reverse?this.max-n:this.min+n}getPointLabelContext(t){const n=this._pointLabels||[];if(t>=0&&t<n.length){const e=n[t];return Wh(this.getContext(),t,e)}}getPointPosition(t,n,e=0){const i=this.getIndexAngle(t)-Un+e;return{x:Math.cos(i)*n+this.xCenter,y:Math.sin(i)*n+this.yCenter,angle:i}}getPointPositionForValue(t,n){return this.getPointPosition(t,this.getDistanceFromCenterForValue(n))}getBasePosition(t){return this.getPointPositionForValue(t||0,this.getBaseValue())}getPointLabelPosition(t){const{left:n,top:e,right:i,bottom:s}=this._pointLabelItems[t];return{left:n,top:e,right:i,bottom:s}}drawBackground(){const{backgroundColor:t,grid:{circular:n}}=this.options;if(t){const e=this.ctx;e.save();e.beginPath();Ih(this,this.getDistanceFromCenterForValue(this._endValue),n,this._pointLabels.length);e.closePath();e.fillStyle=t;e.fill();e.restore()}}drawGrid(){const t=this.ctx;const n=this.options;const{angleLines:e,grid:i,border:s}=n;const o=this._pointLabels.length;let r,a,c;if(n.pointLabels.display){Th(this,o)}if(i.display){this.ticks.forEach(((t,n)=>{if(n!==0||n===0&&this.min<0){a=this.getDistanceFromCenterForValue(t.value);const e=this.getContext(n);const r=i.setContext(e);const c=s.setContext(e);Fh(this,r,a,o,c)}}))}if(e.display){t.save();for(r=o-1;r>=0;r--){const i=e.setContext(this.getPointLabelContext(r));const{color:s,lineWidth:o}=i;if(!o||!s){continue}t.lineWidth=o;t.strokeStyle=s;t.setLineDash(i.borderDash);t.lineDashOffset=i.borderDashOffset;a=this.getDistanceFromCenterForValue(n.reverse?this.min:this.max);c=this.getPointPosition(r,a);t.beginPath();t.moveTo(this.xCenter,this.yCenter);t.lineTo(c.x,c.y);t.stroke()}t.restore()}}drawBorder(){}drawLabels(){const t=this.ctx;const n=this.options;const e=n.ticks;if(!e.display){return}const i=this.getIndexAngle(0);let s,o;t.save();t.translate(this.xCenter,this.yCenter);t.rotate(i);t.textAlign="center";t.textBaseline="middle";this.ticks.forEach(((i,r)=>{if(r===0&&this.min>=0&&!n.reverse){return}const a=e.setContext(this.getContext(r));const c=zi(a.font);s=this.getDistanceFromCenterForValue(this.ticks[r].value);if(a.showLabelBackdrop){t.font=c.string;o=t.measureText(i.label).width;t.fillStyle=a.backdropColor;const n=_i(a.backdropPadding);t.fillRect(-o/2-n.left,-s-c.size/2-n.top,o+n.width,c.size+n.height)}bi(t,i.label,0,-s,c,{color:a.color,strokeColor:a.textStrokeColor,strokeWidth:a.textStrokeWidth})}));t.restore()}drawTitle(){}}const Hh={millisecond:{common:true,size:1,steps:1e3},second:{common:true,size:1e3,steps:60},minute:{common:true,size:6e4,steps:60},hour:{common:true,size:36e5,steps:24},day:{common:true,size:864e5,steps:30},week:{common:false,size:6048e5,steps:4},month:{common:true,size:2628e6,steps:12},quarter:{common:false,size:7884e6,steps:4},year:{common:true,size:3154e7}};const $h=Object.keys(Hh);function Vh(t,n){return t-n}function Yh(t,n){if(gn(n)){return null}const e=t._adapter;const{parser:i,round:s,isoWeekday:o}=t._parseOpts;let r=n;if(typeof i==="function"){r=i(r)}if(!yn(r)){r=typeof i==="string"?e.parse(r,i):e.parse(r)}if(r===null){return null}if(s){r=s==="week"&&(ne(o)||o===true)?e.startOf(r,"isoWeek",o):e.startOf(r,s)}return+r}function Uh(t,n,e,i){const s=$h.length;for(let o=$h.indexOf(t);o<s-1;++o){const t=Hh[$h[o]];const s=t.steps?t.steps:Number.MAX_SAFE_INTEGER;if(t.common&&Math.ceil((e-n)/(s*t.size))<=i){return $h[o]}}return $h[s-1]}function Xh(t,n,e,i,s){for(let o=$h.length-1;o>=$h.indexOf(e);o--){const e=$h[o];if(Hh[e].common&&t._adapter.diff(s,i,e)>=n-1){return e}}return $h[e?$h.indexOf(e):0]}function Kh(t){for(let n=$h.indexOf(t)+1,e=$h.length;n<e;++n){if(Hh[$h[n]].common){return $h[n]}}}function qh(t,n,e){if(!e){t[n]=true}else if(e.length){const{lo:i,hi:s}=ge(e,n);const o=e[i]>=n?e[i]:e[s];t[o]=true}}function Zh(t,n,e,i){const s=t._adapter;const o=+s.startOf(n[0].value,i);const r=n[n.length-1].value;let a,c;for(a=o;a<=r;a=+s.add(a,1,i)){c=e[a];if(c>=0){n[c].major=true}}return n}function Jh(t,n,e){const i=[];const s={};const o=n.length;let r,a;for(r=0;r<o;++r){a=n[r];s[a]=r;i.push({value:a,major:false})}return o===0||!e?i:Zh(t,i,s,e)}class Qh extends la{static id="time";static defaults={bounds:"data",adapters:{},time:{parser:false,unit:false,round:false,isoWeekday:false,minUnit:"millisecond",displayFormats:{}},ticks:{source:"auto",callback:false,major:{enabled:false}}};constructor(t){super(t);this._cache={data:[],labels:[],all:[]};this._unit="day";this._majorUnit=undefined;this._offsets={};this._normalized=false;this._parseOpts=undefined}init(t,n={}){const e=t.time||(t.time={});const i=this._adapter=new Xo._date(t.adapters.date);i.init(n);Dn(e.displayFormats,i.formats());this._parseOpts={parser:e.parser,round:e.round,isoWeekday:e.isoWeekday};super.init(t);this._normalized=n.normalized}parse(t,n){if(t===undefined){return null}return Yh(this,t)}beforeLayout(){super.beforeLayout();this._cache={data:[],labels:[],all:[]}}determineDataLimits(){const t=this.options;const n=this._adapter;const e=t.time.unit||"day";let{min:i,max:s,minDefined:o,maxDefined:r}=this.getUserBounds();function a(t){if(!o&&!isNaN(t.min)){i=Math.min(i,t.min)}if(!r&&!isNaN(t.max)){s=Math.max(s,t.max)}}if(!o||!r){a(this._getLabelBounds());if(t.bounds!=="ticks"||t.ticks.source!=="labels"){a(this.getMinMax(false))}}i=yn(i)&&!isNaN(i)?i:+n.startOf(Date.now(),e);s=yn(s)&&!isNaN(s)?s:+n.endOf(Date.now(),e)+1;this.min=Math.min(i,s-1);this.max=Math.max(i+1,s)}_getLabelBounds(){const t=this.getLabelTimestamps();let n=Number.POSITIVE_INFINITY;let e=Number.NEGATIVE_INFINITY;if(t.length){n=t[0];e=t[t.length-1]}return{min:n,max:e}}buildTicks(){const t=this.options;const n=t.time;const e=t.ticks;const i=e.source==="labels"?this.getLabelTimestamps():this._generate();if(t.bounds==="ticks"&&i.length){this.min=this._userMin||i[0];this.max=this._userMax||i[i.length-1]}const s=this.min;const o=this.max;const r=ye(i,s,o);this._unit=n.unit||(e.autoSkip?Uh(n.minUnit,this.min,this.max,this._getLabelCapacity(s)):Xh(this,r.length,n.minUnit,this.min,this.max));this._majorUnit=!e.major.enabled||this._unit==="year"?undefined:Kh(this._unit);this.initOffsets(i);if(t.reverse){r.reverse()}return Jh(this,r,this._majorUnit)}afterAutoSkip(){if(this.options.offsetAfterAutoskip){this.initOffsets(this.ticks.map((t=>+t.value)))}}initOffsets(t=[]){let n=0;let e=0;let i,s;if(this.options.offset&&t.length){i=this.getDecimalForValue(t[0]);if(t.length===1){n=1-i}else{n=(this.getDecimalForValue(t[1])-i)/2}s=this.getDecimalForValue(t[t.length-1]);if(t.length===1){e=s}else{e=(s-this.getDecimalForValue(t[t.length-2]))/2}}const o=t.length<3?.5:.25;n=ue(n,0,o);e=ue(e,0,o);this._offsets={start:n,end:e,factor:1/(n+1+e)}}_generate(){const t=this._adapter;const n=this.min;const e=this.max;const i=this.options;const s=i.time;const o=s.unit||Uh(s.minUnit,n,e,this._getLabelCapacity(n));const r=xn(i.ticks.stepSize,1);const a=o==="week"?s.isoWeekday:false;const c=ne(a)||a===true;const l={};let h=n;let f,u;if(c){h=+t.startOf(h,"isoWeek",a)}h=+t.startOf(h,c?"day":o);if(t.diff(e,n,o)>1e5*r){throw new Error(n+" and "+e+" are too far apart with stepSize of "+r+" "+o)}const d=i.ticks.source==="data"&&this.getDataTimestamps();for(f=h,u=0;f<e;f=+t.add(f,r,o),u++){qh(l,f,d)}if(f===e||i.bounds==="ticks"||u===1){qh(l,f,d)}return Object.keys(l).sort(Vh).map((t=>+t))}getLabelForValue(t){const n=this._adapter;const e=this.options.time;if(e.tooltipFormat){return n.format(t,e.tooltipFormat)}return n.format(t,e.displayFormats.datetime)}format(t,n){const e=this.options;const i=e.time.displayFormats;const s=this._unit;const o=n||i[s];return this._adapter.format(t,o)}_tickFormatFunction(t,n,e,i){const s=this.options;const o=s.ticks.callback;if(o){return Mn(o,[t,n,e],this)}const r=s.time.displayFormats;const a=this._unit;const c=this._majorUnit;const l=a&&r[a];const h=c&&r[c];const f=e[n];const u=c&&h&&f&&f.major;return this._adapter.format(t,i||(u?h:l))}generateTickLabels(t){let n,e,i;for(n=0,e=t.length;n<e;++n){i=t[n];i.label=this._tickFormatFunction(i.value,n,t)}}getDecimalForValue(t){return t===null?NaN:(t-this.min)/(this.max-this.min)}getPixelForValue(t){const n=this._offsets;const e=this.getDecimalForValue(t);return this.getPixelForDecimal((n.start+e)*n.factor)}getValueForPixel(t){const n=this._offsets;const e=this.getDecimalForPixel(t)/n.factor-n.end;return this.min+e*(this.max-this.min)}_getLabelSize(t){const n=this.options.ticks;const e=this.ctx.measureText(t).width;const i=se(this.isHorizontal()?n.maxRotation:n.minRotation);const s=Math.cos(i);const o=Math.sin(i);const r=this._resolveTickFontOptions(0).size;return{w:e*s+r*o,h:e*o+r*s}}_getLabelCapacity(t){const n=this.options.time;const e=n.displayFormats;const i=e[n.unit]||e.millisecond;const s=this._tickFormatFunction(t,0,Jh(this,[t],this._majorUnit),i);const o=this._getLabelSize(s);const r=Math.floor(this.isHorizontal()?this.width/o.w:this.height/o.h)-1;return r>0?r:1}getDataTimestamps(){let t=this._cache.data||[];let n,e;if(t.length){return t}const i=this.getMatchingVisibleMetas();if(this._normalized&&i.length){return this._cache.data=i[0].controller.getAllParsedValues(this)}for(n=0,e=i.length;n<e;++n){t=t.concat(i[n].controller.getAllParsedValues(this))}return this._cache.data=this.normalize(t)}getLabelTimestamps(){const t=this._cache.labels||[];let n,e;if(t.length){return t}const i=this.getLabels();for(n=0,e=i.length;n<e;++n){t.push(Yh(this,i[n]))}return this._cache.labels=this._normalized?t:this.normalize(t)}normalize(t){return ke(t.sort(Vh))}}function Gh(t,n,e){let i=0;let s=t.length-1;let o,r,a,c;if(e){if(n>=t[i].pos&&n<=t[s].pos){({lo:i,hi:s}=be(t,"pos",n))}({pos:o,time:a}=t[i]);({pos:r,time:c}=t[s])}else{if(n>=t[i].time&&n<=t[s].time){({lo:i,hi:s}=be(t,"time",n))}({time:o,pos:a}=t[i]);({time:r,pos:c}=t[s])}const l=r-o;return l?a+(c-a)*(n-o)/l:a}class tf extends Qh{static id="timeseries";static defaults=Qh.defaults;constructor(t){super(t);this._table=[];this._minPos=undefined;this._tableRange=undefined}initOffsets(){const t=this._getTimestampsForTable();const n=this._table=this.buildLookupTable(t);this._minPos=Gh(n,this.min);this._tableRange=Gh(n,this.max)-this._minPos;super.initOffsets(t)}buildLookupTable(t){const{min:n,max:e}=this;const i=[];const s=[];let o,r,a,c,l;for(o=0,r=t.length;o<r;++o){c=t[o];if(c>=n&&c<=e){i.push(c)}}if(i.length<2){return[{time:n,pos:0},{time:e,pos:1}]}for(o=0,r=i.length;o<r;++o){l=i[o+1];a=i[o-1];c=i[o];if(Math.round((l+a)/2)!==c){s.push({time:c,pos:o/(r-1)})}}return s}_generate(){const t=this.min;const n=this.max;let e=super.getDataTimestamps();if(!e.includes(t)||!e.length){e.splice(0,0,t)}if(!e.includes(n)||e.length===1){e.push(n)}return e.sort(((t,n)=>t-n))}_getTimestampsForTable(){let t=this._cache.all||[];if(t.length){return t}const n=this.getDataTimestamps();const e=this.getLabelTimestamps();if(n.length&&e.length){t=this.normalize(n.concat(e))}else{t=n.length?n:e}t=this._cache.all=t;return t}getDecimalForValue(t){return(Gh(this._table,t)-this._minPos)/this._tableRange}getValueForPixel(t){const n=this._offsets;const e=this.getDecimalForPixel(t)/n.factor-n.end;return Gh(this._table,e*this._tableRange+this._minPos,true)}}var nf=Object.freeze({__proto__:null,CategoryScale:dh,LinearScale:mh,LogarithmicScale:Sh,RadialLinearScale:Bh,TimeScale:Qh,TimeSeriesScale:tf});const ef=[Vo,Ec,ch,nf];Qa.register(...ef);const sf='/*! tailwindcss v4.1.7 | MIT License | https://tailwindcss.com */\n@layer properties;\n@layer theme, base, components, utilities;\n@layer theme {\n :root, :host {\n --font-sans: ui-sans-serif, system-ui, sans-serif, "Apple Color Emoji",\n "Segoe UI Emoji", "Segoe UI Symbol", "Noto Color Emoji";\n --font-mono: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, "Liberation Mono",\n "Courier New", monospace;\n --color-red-500: oklch(63.7% 0.237 25.331);\n --color-green-600: oklch(62.7% 0.194 149.214);\n --color-blue-500: oklch(62.3% 0.214 259.815);\n --color-gray-50: oklch(98.5% 0.002 247.839);\n --color-gray-200: oklch(92.8% 0.006 264.531);\n --color-gray-300: oklch(87.2% 0.01 258.338);\n --color-gray-400: oklch(70.7% 0.022 261.325);\n --color-gray-500: oklch(55.1% 0.027 264.364);\n --color-gray-600: oklch(44.6% 0.03 256.802);\n --color-gray-700: oklch(37.3% 0.034 259.733);\n --color-gray-800: oklch(27.8% 0.033 256.848);\n --color-white: #fff;\n --spacing: 0.25rem;\n --container-2xl: 42rem;\n --container-3xl: 48rem;\n --text-sm: 0.875rem;\n --text-sm--line-height: calc(1.25 / 0.875);\n --text-lg: 1.125rem;\n --text-lg--line-height: calc(1.75 / 1.125);\n --text-xl: 1.25rem;\n --text-xl--line-height: calc(1.75 / 1.25);\n --text-2xl: 1.5rem;\n --text-2xl--line-height: calc(2 / 1.5);\n --text-3xl: 1.875rem;\n --text-3xl--line-height: calc(2.25 / 1.875);\n --font-weight-medium: 500;\n --font-weight-semibold: 600;\n --font-weight-bold: 700;\n --radius-lg: 0.5rem;\n --radius-xl: 0.75rem;\n --radius-2xl: 1rem;\n --radius-4xl: 2rem;\n --ease-in-out: cubic-bezier(0.4, 0, 0.2, 1);\n --animate-spin: spin 1s linear infinite;\n --default-transition-duration: 150ms;\n --default-transition-timing-function: cubic-bezier(0.4, 0, 0.2, 1);\n --default-font-family: var(--font-sans);\n --default-mono-font-family: var(--font-mono);\n }\n}\n@layer base {\n *, ::after, ::before, ::backdrop, ::file-selector-button {\n box-sizing: border-box;\n margin: 0;\n padding: 0;\n border: 0 solid;\n }\n html, :host {\n line-height: 1.5;\n -webkit-text-size-adjust: 100%;\n tab-size: 4;\n font-family: var(--default-font-family, ui-sans-serif, system-ui, sans-serif, "Apple Color Emoji", "Segoe UI Emoji", "Segoe UI Symbol", "Noto Color Emoji");\n font-feature-settings: var(--default-font-feature-settings, normal);\n font-variation-settings: var(--default-font-variation-settings, normal);\n -webkit-tap-highlight-color: transparent;\n }\n hr {\n height: 0;\n color: inherit;\n border-top-width: 1px;\n }\n abbr:where([title]) {\n -webkit-text-decoration: underline dotted;\n text-decoration: underline dotted;\n }\n h1, h2, h3, h4, h5, h6 {\n font-size: inherit;\n font-weight: inherit;\n }\n a {\n color: inherit;\n -webkit-text-decoration: inherit;\n text-decoration: inherit;\n }\n b, strong {\n font-weight: bolder;\n }\n code, kbd, samp, pre {\n font-family: var(--default-mono-font-family, ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, "Liberation Mono", "Courier New", monospace);\n font-feature-settings: var(--default-mono-font-feature-settings, normal);\n font-variation-settings: var(--default-mono-font-variation-settings, normal);\n font-size: 1em;\n }\n small {\n font-size: 80%;\n }\n sub, sup {\n font-size: 75%;\n line-height: 0;\n position: relative;\n vertical-align: baseline;\n }\n sub {\n bottom: -0.25em;\n }\n sup {\n top: -0.5em;\n }\n table {\n text-indent: 0;\n border-color: inherit;\n border-collapse: collapse;\n }\n :-moz-focusring {\n outline: auto;\n }\n progress {\n vertical-align: baseline;\n }\n summary {\n display: list-item;\n }\n ol, ul, menu {\n list-style: none;\n }\n img, svg, video, canvas, audio, iframe, embed, object {\n display: block;\n vertical-align: middle;\n }\n img, video {\n max-width: 100%;\n height: auto;\n }\n button, input, select, optgroup, textarea, ::file-selector-button {\n font: inherit;\n font-feature-settings: inherit;\n font-variation-settings: inherit;\n letter-spacing: inherit;\n color: inherit;\n border-radius: 0;\n background-color: transparent;\n opacity: 1;\n }\n :where(select:is([multiple], [size])) optgroup {\n font-weight: bolder;\n }\n :where(select:is([multiple], [size])) optgroup option {\n padding-inline-start: 20px;\n }\n ::file-selector-button {\n margin-inline-end: 4px;\n }\n ::placeholder {\n opacity: 1;\n }\n @supports (not (-webkit-appearance: -apple-pay-button)) or (contain-intrinsic-size: 1px) {\n ::placeholder {\n color: currentcolor;\n @supports (color: color-mix(in lab, red, red)) {\n color: color-mix(in oklab, currentcolor 50%, transparent);\n }\n }\n }\n textarea {\n resize: vertical;\n }\n ::-webkit-search-decoration {\n -webkit-appearance: none;\n }\n ::-webkit-date-and-time-value {\n min-height: 1lh;\n text-align: inherit;\n }\n ::-webkit-datetime-edit {\n display: inline-flex;\n }\n ::-webkit-datetime-edit-fields-wrapper {\n padding: 0;\n }\n ::-webkit-datetime-edit, ::-webkit-datetime-edit-year-field, ::-webkit-datetime-edit-month-field, ::-webkit-datetime-edit-day-field, ::-webkit-datetime-edit-hour-field, ::-webkit-datetime-edit-minute-field, ::-webkit-datetime-edit-second-field, ::-webkit-datetime-edit-millisecond-field, ::-webkit-datetime-edit-meridiem-field {\n padding-block: 0;\n }\n :-moz-ui-invalid {\n box-shadow: none;\n }\n button, input:where([type="button"], [type="reset"], [type="submit"]), ::file-selector-button {\n appearance: button;\n }\n ::-webkit-inner-spin-button, ::-webkit-outer-spin-button {\n height: auto;\n }\n [hidden]:where(:not([hidden="until-found"])) {\n display: none !important;\n }\n}\n@layer utilities {\n .pointer-events-none {\n pointer-events: none;\n }\n .sr-only {\n position: absolute;\n width: 1px;\n height: 1px;\n padding: 0;\n margin: -1px;\n overflow: hidden;\n clip: rect(0, 0, 0, 0);\n white-space: nowrap;\n border-width: 0;\n }\n .absolute {\n position: absolute;\n }\n .fixed {\n position: fixed;\n }\n .relative {\n position: relative;\n }\n .inset-0 {\n inset: calc(var(--spacing) * 0);\n }\n .top-0 {\n top: calc(var(--spacing) * 0);\n }\n .top-1 {\n top: calc(var(--spacing) * 1);\n }\n .top-1\\/2 {\n top: calc(1/2 * 100%);\n }\n .bottom-full {\n bottom: 100%;\n }\n .left-0 {\n left: calc(var(--spacing) * 0);\n }\n .left-1 {\n left: calc(var(--spacing) * 1);\n }\n .left-1\\/2 {\n left: calc(1/2 * 100%);\n }\n .left-3 {\n left: calc(var(--spacing) * 3);\n }\n .z-1 {\n z-index: 1;\n }\n .z-10 {\n z-index: 10;\n }\n .z-20 {\n z-index: 20;\n }\n .z-50 {\n z-index: 50;\n }\n .m-auto {\n margin: auto;\n }\n .mt-1 {\n margin-top: calc(var(--spacing) * 1);\n }\n .mt-4 {\n margin-top: calc(var(--spacing) * 4);\n }\n .mb-1 {\n margin-bottom: calc(var(--spacing) * 1);\n }\n .mb-2 {\n margin-bottom: calc(var(--spacing) * 2);\n }\n .mb-4 {\n margin-bottom: calc(var(--spacing) * 4);\n }\n .mb-6 {\n margin-bottom: calc(var(--spacing) * 6);\n }\n .block {\n display: block;\n }\n .flex {\n display: flex;\n }\n .grid {\n display: grid;\n }\n .table {\n display: table;\n }\n .h-2 {\n height: calc(var(--spacing) * 2);\n }\n .h-3 {\n height: calc(var(--spacing) * 3);\n }\n .h-4 {\n height: calc(var(--spacing) * 4);\n }\n .h-5 {\n height: calc(var(--spacing) * 5);\n }\n .h-16 {\n height: calc(var(--spacing) * 16);\n }\n .h-32 {\n height: calc(var(--spacing) * 32);\n }\n .h-48 {\n height: calc(var(--spacing) * 48);\n }\n .h-64 {\n height: calc(var(--spacing) * 64);\n }\n .h-full {\n height: 100%;\n }\n .w-3 {\n width: calc(var(--spacing) * 3);\n }\n .w-4 {\n width: calc(var(--spacing) * 4);\n }\n .w-5 {\n width: calc(var(--spacing) * 5);\n }\n .w-16 {\n width: calc(var(--spacing) * 16);\n }\n .w-52 {\n width: calc(var(--spacing) * 52);\n }\n .w-64 {\n width: calc(var(--spacing) * 64);\n }\n .w-full {\n width: 100%;\n }\n .max-w-2xl {\n max-width: var(--container-2xl);\n }\n .max-w-3xl {\n max-width: var(--container-3xl);\n }\n .flex-1 {\n flex: 1;\n }\n .border-collapse {\n border-collapse: collapse;\n }\n .-translate-x-1 {\n --tw-translate-x: calc(var(--spacing) * -1);\n translate: var(--tw-translate-x) var(--tw-translate-y);\n }\n .-translate-x-1\\/2 {\n --tw-translate-x: calc(calc(1/2 * 100%) * -1);\n translate: var(--tw-translate-x) var(--tw-translate-y);\n }\n .-translate-y-1 {\n --tw-translate-y: calc(var(--spacing) * -1);\n translate: var(--tw-translate-x) var(--tw-translate-y);\n }\n .-translate-y-1\\/2 {\n --tw-translate-y: calc(calc(1/2 * 100%) * -1);\n translate: var(--tw-translate-x) var(--tw-translate-y);\n }\n .transform {\n transform: var(--tw-rotate-x,) var(--tw-rotate-y,) var(--tw-rotate-z,) var(--tw-skew-x,) var(--tw-skew-y,);\n }\n .animate-spin {\n animation: var(--animate-spin);\n }\n .cursor-help {\n cursor: help;\n }\n .cursor-not-allowed {\n cursor: not-allowed;\n }\n .cursor-pointer {\n cursor: pointer;\n }\n .resize {\n resize: both;\n }\n .appearance-none {\n appearance: none;\n }\n .grid-cols-1 {\n grid-template-columns: repeat(1, minmax(0, 1fr));\n }\n .grid-cols-2 {\n grid-template-columns: repeat(2, minmax(0, 1fr));\n }\n .flex-col {\n flex-direction: column;\n }\n .flex-row {\n flex-direction: row;\n }\n .items-center {\n align-items: center;\n }\n .items-start {\n align-items: flex-start;\n }\n .justify-between {\n justify-content: space-between;\n }\n .justify-center {\n justify-content: center;\n }\n .justify-start {\n justify-content: flex-start;\n }\n .gap-1 {\n gap: calc(var(--spacing) * 1);\n }\n .gap-2 {\n gap: calc(var(--spacing) * 2);\n }\n .gap-3 {\n gap: calc(var(--spacing) * 3);\n }\n .gap-4 {\n gap: calc(var(--spacing) * 4);\n }\n .gap-6 {\n gap: calc(var(--spacing) * 6);\n }\n .space-y-4 {\n :where(& > :not(:last-child)) {\n --tw-space-y-reverse: 0;\n margin-block-start: calc(calc(var(--spacing) * 4) * var(--tw-space-y-reverse));\n margin-block-end: calc(calc(var(--spacing) * 4) * calc(1 - var(--tw-space-y-reverse)));\n }\n }\n .space-y-6 {\n :where(& > :not(:last-child)) {\n --tw-space-y-reverse: 0;\n margin-block-start: calc(calc(var(--spacing) * 6) * var(--tw-space-y-reverse));\n margin-block-end: calc(calc(var(--spacing) * 6) * calc(1 - var(--tw-space-y-reverse)));\n }\n }\n .space-y-8 {\n :where(& > :not(:last-child)) {\n --tw-space-y-reverse: 0;\n margin-block-start: calc(calc(var(--spacing) * 8) * var(--tw-space-y-reverse));\n margin-block-end: calc(calc(var(--spacing) * 8) * calc(1 - var(--tw-space-y-reverse)));\n }\n }\n .rounded {\n border-radius: 0.25rem;\n }\n .rounded-2xl {\n border-radius: var(--radius-2xl);\n }\n .rounded-4xl {\n border-radius: var(--radius-4xl);\n }\n .rounded-full {\n border-radius: calc(infinity * 1px);\n }\n .rounded-lg {\n border-radius: var(--radius-lg);\n }\n .rounded-xl {\n border-radius: var(--radius-xl);\n }\n .border {\n border-style: var(--tw-border-style);\n border-width: 1px;\n }\n .border-2 {\n border-style: var(--tw-border-style);\n border-width: 2px;\n }\n .border-t {\n border-top-style: var(--tw-border-style);\n border-top-width: 1px;\n }\n .border-t-2 {\n border-top-style: var(--tw-border-style);\n border-top-width: 2px;\n }\n .border-b {\n border-bottom-style: var(--tw-border-style);\n border-bottom-width: 1px;\n }\n .border-b-2 {\n border-bottom-style: var(--tw-border-style);\n border-bottom-width: 2px;\n }\n .border-\\[\\#271200\\] {\n border-color: #271200;\n }\n .border-\\[\\#964500\\] {\n border-color: #964500;\n }\n .border-gray-200 {\n border-color: var(--color-gray-200);\n }\n .border-gray-300 {\n border-color: var(--color-gray-300);\n }\n .border-red-500 {\n border-color: var(--color-red-500);\n }\n .bg-\\[\\#271200\\] {\n background-color: #271200;\n }\n .bg-\\[\\#964500\\] {\n background-color: #964500;\n }\n .bg-\\[\\#f3ebda\\] {\n background-color: #f3ebda;\n }\n .bg-gray-50 {\n background-color: var(--color-gray-50);\n }\n .bg-gray-200 {\n background-color: var(--color-gray-200);\n }\n .bg-gray-400 {\n background-color: var(--color-gray-400);\n }\n .bg-gray-800 {\n background-color: var(--color-gray-800);\n }\n .bg-white {\n background-color: var(--color-white);\n }\n .p-2 {\n padding: calc(var(--spacing) * 2);\n }\n .p-3 {\n padding: calc(var(--spacing) * 3);\n }\n .p-4 {\n padding: calc(var(--spacing) * 4);\n }\n .p-6 {\n padding: calc(var(--spacing) * 6);\n }\n .p-8 {\n padding: calc(var(--spacing) * 8);\n }\n .p-9 {\n padding: calc(var(--spacing) * 9);\n }\n .p-10 {\n padding: calc(var(--spacing) * 10);\n }\n .px-2 {\n padding-inline: calc(var(--spacing) * 2);\n }\n .px-3 {\n padding-inline: calc(var(--spacing) * 3);\n }\n .px-4 {\n padding-inline: calc(var(--spacing) * 4);\n }\n .px-6 {\n padding-inline: calc(var(--spacing) * 6);\n }\n .py-1 {\n padding-block: calc(var(--spacing) * 1);\n }\n .py-2 {\n padding-block: calc(var(--spacing) * 2);\n }\n .py-3 {\n padding-block: calc(var(--spacing) * 3);\n }\n .pt-4 {\n padding-top: calc(var(--spacing) * 4);\n }\n .pt-6 {\n padding-top: calc(var(--spacing) * 6);\n }\n .pt-7 {\n padding-top: calc(var(--spacing) * 7);\n }\n .pr-4 {\n padding-right: calc(var(--spacing) * 4);\n }\n .pb-2 {\n padding-bottom: calc(var(--spacing) * 2);\n }\n .pb-3 {\n padding-bottom: calc(var(--spacing) * 3);\n }\n .pb-7 {\n padding-bottom: calc(var(--spacing) * 7);\n }\n .pl-10 {\n padding-left: calc(var(--spacing) * 10);\n }\n .text-center {\n text-align: center;\n }\n .text-2xl {\n font-size: var(--text-2xl);\n line-height: var(--tw-leading, var(--text-2xl--line-height));\n }\n .text-3xl {\n font-size: var(--text-3xl);\n line-height: var(--tw-leading, var(--text-3xl--line-height));\n }\n .text-lg {\n font-size: var(--text-lg);\n line-height: var(--tw-leading, var(--text-lg--line-height));\n }\n .text-sm {\n font-size: var(--text-sm);\n line-height: var(--tw-leading, var(--text-sm--line-height));\n }\n .text-xl {\n font-size: var(--text-xl);\n line-height: var(--tw-leading, var(--text-xl--line-height));\n }\n .font-bold {\n --tw-font-weight: var(--font-weight-bold);\n font-weight: var(--font-weight-bold);\n }\n .font-medium {\n --tw-font-weight: var(--font-weight-medium);\n font-weight: var(--font-weight-medium);\n }\n .font-semibold {\n --tw-font-weight: var(--font-weight-semibold);\n font-weight: var(--font-weight-semibold);\n }\n .whitespace-nowrap {\n white-space: nowrap;\n }\n .text-\\[\\#1a365d\\] {\n color: #1a365d;\n }\n .text-\\[\\#271200\\] {\n color: #271200;\n }\n .text-\\[\\#964500\\] {\n color: #964500;\n }\n .text-gray-400 {\n color: var(--color-gray-400);\n }\n .text-gray-500 {\n color: var(--color-gray-500);\n }\n .text-gray-600 {\n color: var(--color-gray-600);\n }\n .text-gray-700 {\n color: var(--color-gray-700);\n }\n .text-green-600 {\n color: var(--color-green-600);\n }\n .text-red-500 {\n color: var(--color-red-500);\n }\n .text-white {\n color: var(--color-white);\n }\n .underline {\n text-decoration-line: underline;\n }\n .accent-\\[\\#964500\\] {\n accent-color: #964500;\n }\n .opacity-0 {\n opacity: 0%;\n }\n .shadow {\n --tw-shadow: 0 1px 3px 0 var(--tw-shadow-color, rgb(0 0 0 / 0.1)), 0 1px 2px -1px var(--tw-shadow-color, rgb(0 0 0 / 0.1));\n box-shadow: var(--tw-inset-shadow), var(--tw-inset-ring-shadow), var(--tw-ring-offset-shadow), var(--tw-ring-shadow), var(--tw-shadow);\n }\n .shadow-inner {\n --tw-shadow: inset 0 2px 4px 0 var(--tw-shadow-color, rgb(0 0 0 / 0.05));\n box-shadow: var(--tw-inset-shadow), var(--tw-inset-ring-shadow), var(--tw-ring-offset-shadow), var(--tw-ring-shadow), var(--tw-shadow);\n }\n .shadow-lg {\n --tw-shadow: 0 10px 15px -3px var(--tw-shadow-color, rgb(0 0 0 / 0.1)), 0 4px 6px -4px var(--tw-shadow-color, rgb(0 0 0 / 0.1));\n box-shadow: var(--tw-inset-shadow), var(--tw-inset-ring-shadow), var(--tw-ring-offset-shadow), var(--tw-ring-shadow), var(--tw-shadow);\n }\n .outline {\n outline-style: var(--tw-outline-style);\n outline-width: 1px;\n }\n .transition-all {\n transition-property: all;\n transition-timing-function: var(--tw-ease, var(--default-transition-timing-function));\n transition-duration: var(--tw-duration, var(--default-transition-duration));\n }\n .transition-colors {\n transition-property: color, background-color, border-color, outline-color, text-decoration-color, fill, stroke, --tw-gradient-from, --tw-gradient-via, --tw-gradient-to;\n transition-timing-function: var(--tw-ease, var(--default-transition-timing-function));\n transition-duration: var(--tw-duration, var(--default-transition-duration));\n }\n .transition-opacity {\n transition-property: opacity;\n transition-timing-function: var(--tw-ease, var(--default-transition-timing-function));\n transition-duration: var(--tw-duration, var(--default-transition-duration));\n }\n .duration-200 {\n --tw-duration: 200ms;\n transition-duration: 200ms;\n }\n .ease-in-out {\n --tw-ease: var(--ease-in-out);\n transition-timing-function: var(--ease-in-out);\n }\n .select-none {\n -webkit-user-select: none;\n user-select: none;\n }\n .group-hover\\:opacity-100 {\n &:is(:where(.group):hover *) {\n @media (hover: hover) {\n opacity: 100%;\n }\n }\n }\n .peer-checked\\:bg-\\[\\#964500\\] {\n &:is(:where(.peer):checked ~ *) {\n background-color: #964500;\n }\n }\n .peer-checked\\:opacity-100 {\n &:is(:where(.peer):checked ~ *) {\n opacity: 100%;\n }\n }\n .hover\\:bg-\\[\\#7a3700\\] {\n &:hover {\n @media (hover: hover) {\n background-color: #7a3700;\n }\n }\n }\n .hover\\:bg-\\[\\#964500\\] {\n &:hover {\n @media (hover: hover) {\n background-color: #964500;\n }\n }\n }\n .focus\\:border-transparent {\n &:focus {\n border-color: transparent;\n }\n }\n .focus\\:ring-2 {\n &:focus {\n --tw-ring-shadow: var(--tw-ring-inset,) 0 0 0 calc(2px + var(--tw-ring-offset-width)) var(--tw-ring-color, currentcolor);\n box-shadow: var(--tw-inset-shadow), var(--tw-inset-ring-shadow), var(--tw-ring-offset-shadow), var(--tw-ring-shadow), var(--tw-shadow);\n }\n }\n .focus\\:ring-\\[\\#1a365d\\] {\n &:focus {\n --tw-ring-color: #1a365d;\n }\n }\n .focus\\:ring-\\[\\#964500\\] {\n &:focus {\n --tw-ring-color: #964500;\n }\n }\n .focus\\:ring-blue-500 {\n &:focus {\n --tw-ring-color: var(--color-blue-500);\n }\n }\n .focus\\:outline-none {\n &:focus {\n --tw-outline-style: none;\n outline-style: none;\n }\n }\n .md\\:grid-cols-2 {\n @media (width >= 48rem) {\n grid-template-columns: repeat(2, minmax(0, 1fr));\n }\n }\n .\\[\\&\\:\\:-moz-range-thumb\\]\\:h-4 {\n &::-moz-range-thumb {\n height: calc(var(--spacing) * 4);\n }\n }\n .\\[\\&\\:\\:-moz-range-thumb\\]\\:w-4 {\n &::-moz-range-thumb {\n width: calc(var(--spacing) * 4);\n }\n }\n .\\[\\&\\:\\:-moz-range-thumb\\]\\:appearance-none {\n &::-moz-range-thumb {\n appearance: none;\n }\n }\n .\\[\\&\\:\\:-moz-range-thumb\\]\\:rounded-full {\n &::-moz-range-thumb {\n border-radius: calc(infinity * 1px);\n }\n }\n .\\[\\&\\:\\:-moz-range-thumb\\]\\:border-0 {\n &::-moz-range-thumb {\n border-style: var(--tw-border-style);\n border-width: 0px;\n }\n }\n .\\[\\&\\:\\:-moz-range-thumb\\]\\:bg-\\[\\#964500\\] {\n &::-moz-range-thumb {\n background-color: #964500;\n }\n }\n .\\[\\&\\:\\:-moz-range-track\\]\\:bg-\\[\\#964500\\] {\n &::-moz-range-track {\n background-color: #964500;\n }\n }\n .\\[\\&\\:\\:-webkit-slider-runnable-track\\]\\:bg-\\[\\#964500\\] {\n &::-webkit-slider-runnable-track {\n background-color: #964500;\n }\n }\n .\\[\\&\\:\\:-webkit-slider-thumb\\]\\:h-4 {\n &::-webkit-slider-thumb {\n height: calc(var(--spacing) * 4);\n }\n }\n .\\[\\&\\:\\:-webkit-slider-thumb\\]\\:w-4 {\n &::-webkit-slider-thumb {\n width: calc(var(--spacing) * 4);\n }\n }\n .\\[\\&\\:\\:-webkit-slider-thumb\\]\\:appearance-none {\n &::-webkit-slider-thumb {\n appearance: none;\n }\n }\n .\\[\\&\\:\\:-webkit-slider-thumb\\]\\:rounded-full {\n &::-webkit-slider-thumb {\n border-radius: calc(infinity * 1px);\n }\n }\n .\\[\\&\\:\\:-webkit-slider-thumb\\]\\:bg-\\[\\#964500\\] {\n &::-webkit-slider-thumb {\n background-color: #964500;\n }\n }\n .\\[\\&\\>option\\:checked\\]\\:bg-\\[\\#964500\\] {\n &>option:checked {\n background-color: #964500;\n }\n }\n .\\[\\&\\>option\\:checked\\]\\:text-white {\n &>option:checked {\n color: var(--color-white);\n }\n }\n}\n@property --tw-translate-x {\n syntax: "*";\n inherits: false;\n initial-value: 0;\n}\n@property --tw-translate-y {\n syntax: "*";\n inherits: false;\n initial-value: 0;\n}\n@property --tw-translate-z {\n syntax: "*";\n inherits: false;\n initial-value: 0;\n}\n@property --tw-rotate-x {\n syntax: "*";\n inherits: false;\n}\n@property --tw-rotate-y {\n syntax: "*";\n inherits: false;\n}\n@property --tw-rotate-z {\n syntax: "*";\n inherits: false;\n}\n@property --tw-skew-x {\n syntax: "*";\n inherits: false;\n}\n@property --tw-skew-y {\n syntax: "*";\n inherits: false;\n}\n@property --tw-space-y-reverse {\n syntax: "*";\n inherits: false;\n initial-value: 0;\n}\n@property --tw-border-style {\n syntax: "*";\n inherits: false;\n initial-value: solid;\n}\n@property --tw-font-weight {\n syntax: "*";\n inherits: false;\n}\n@property --tw-shadow {\n syntax: "*";\n inherits: false;\n initial-value: 0 0 #0000;\n}\n@property --tw-shadow-color {\n syntax: "*";\n inherits: false;\n}\n@property --tw-shadow-alpha {\n syntax: "<percentage>";\n inherits: false;\n initial-value: 100%;\n}\n@property --tw-inset-shadow {\n syntax: "*";\n inherits: false;\n initial-value: 0 0 #0000;\n}\n@property --tw-inset-shadow-color {\n syntax: "*";\n inherits: false;\n}\n@property --tw-inset-shadow-alpha {\n syntax: "<percentage>";\n inherits: false;\n initial-value: 100%;\n}\n@property --tw-ring-color {\n syntax: "*";\n inherits: false;\n}\n@property --tw-ring-shadow {\n syntax: "*";\n inherits: false;\n initial-value: 0 0 #0000;\n}\n@property --tw-inset-ring-color {\n syntax: "*";\n inherits: false;\n}\n@property --tw-inset-ring-shadow {\n syntax: "*";\n inherits: false;\n initial-value: 0 0 #0000;\n}\n@property --tw-ring-inset {\n syntax: "*";\n inherits: false;\n}\n@property --tw-ring-offset-width {\n syntax: "<length>";\n inherits: false;\n initial-value: 0px;\n}\n@property --tw-ring-offset-color {\n syntax: "*";\n inherits: false;\n initial-value: #fff;\n}\n@property --tw-ring-offset-shadow {\n syntax: "*";\n inherits: false;\n initial-value: 0 0 #0000;\n}\n@property --tw-outline-style {\n syntax: "*";\n inherits: false;\n initial-value: solid;\n}\n@property --tw-duration {\n syntax: "*";\n inherits: false;\n}\n@property --tw-ease {\n syntax: "*";\n inherits: false;\n}\n@keyframes spin {\n to {\n transform: rotate(360deg);\n }\n}\n@layer properties {\n @supports ((-webkit-hyphens: none) and (not (margin-trim: inline))) or ((-moz-orient: inline) and (not (color:rgb(from red r g b)))) {\n *, ::before, ::after, ::backdrop {\n --tw-translate-x: 0;\n --tw-translate-y: 0;\n --tw-translate-z: 0;\n --tw-rotate-x: initial;\n --tw-rotate-y: initial;\n --tw-rotate-z: initial;\n --tw-skew-x: initial;\n --tw-skew-y: initial;\n --tw-space-y-reverse: 0;\n --tw-border-style: solid;\n --tw-font-weight: initial;\n --tw-shadow: 0 0 #0000;\n --tw-shadow-color: initial;\n --tw-shadow-alpha: 100%;\n --tw-inset-shadow: 0 0 #0000;\n --tw-inset-shadow-color: initial;\n --tw-inset-shadow-alpha: 100%;\n --tw-ring-color: initial;\n --tw-ring-shadow: 0 0 #0000;\n --tw-inset-ring-color: initial;\n --tw-inset-ring-shadow: 0 0 #0000;\n --tw-ring-inset: initial;\n --tw-ring-offset-width: 0px;\n --tw-ring-offset-color: #fff;\n --tw-ring-offset-shadow: 0 0 #0000;\n --tw-outline-style: solid;\n --tw-duration: initial;\n --tw-ease: initial;\n }\n }\n}\n';const of=[0,0,0,0,0,0,0,.1,.2,.4,.8,1,1,1,1,.7,.5,.3,.16,.02,0,0,0,0];const rf={mostly_at_home:[.1,.1,.1,.1,.1,.15,.23,.26,.16,.16,.15,.19,.23,.24,.35,.28,.275,.8,.78,.74,.75,.73,.26,.1],mostly_away:[.1,.1,.1,.1,.1,.15,.29,.32,.25,.15,.12,.14,.15,.12,.16,.21,.285,1,.81,.77,.79,.73,.26,.1]};const af=class{constructor(n){t(this,n)}systemConfigs={};language="en";roofPolygons={};obstructionPolygons={};householdConsumption=3500;consumptionProfile="mostly_at_home";electricityPrice=.3;compensationRate=.07;autonomy=0;costSavings=0;numberOfPanels=5;panelPeakPower=.4;name="";email="";nameError="";emailError="";chart=null;chartRef=null;updateSystemConfigs(){if(Object.keys(this.systemConfigs).length===0){this.numberOfPanels=0;return}this.numberOfPanels=Object.keys(this.systemConfigs).reduce(((t,n)=>t+this.systemConfigs[n].positionedPanels.length),0);this.panelPeakPower=Object.entries(this.systemConfigs)[0][1].positionedPanels[0].panel.kWattPeak;this.recalculate();this.updateChart()}recalculate(){const t=rf[this.consumptionProfile];const n=t.reduce(((t,n)=>t+n),0);const e=this.numberOfPanels*this.panelPeakPower;const i=of.map((t=>t*e));let s=0;for(let e=0;e<t.length;e++){t[e]=t[e]*this.householdConsumption/n/365;if(t[e]<=i[e]){s+=t[e]}else if(t[e]>i[e]){s+=i[e]}}const o=i.map(((n,e)=>t[e]-n));const r=-o.filter((t=>t<0)).reduce(((t,n)=>t+n),0);this.costSavings=r*this.compensationRate*365+s*365*this.electricityPrice;this.autonomy=s/(this.householdConsumption/365)*100}updateChart(){if(!this.chartRef)return;const t=this.chartRef.getContext("2d");if(!t)return;if(this.chart){this.chart.destroy()}const n=Array.from({length:24},((t,n)=>`${n}:00`));const e=rf[this.consumptionProfile];const i=e.reduce(((t,n)=>t+n),0);const s=this.numberOfPanels*this.panelPeakPower;const o=of.map((t=>t*s));for(let t=0;t<e.length;t++){e[t]=e[t]*this.householdConsumption/i/365}let r=[{label:"Energy Consumption",data:e,borderColor:"#964500",backgroundColor:"rgba(150, 69, 0, 0.1)",fill:true,tension:.4},{label:"Energy Production",data:o,borderColor:"#000000",backgroundColor:"rgba(0, 0, 0, 0.1)",fill:true}];this.chart=new Qa(t,{type:"line",data:{labels:n,datasets:r},options:{responsive:true,plugins:{title:{display:true,text:"Daily Consumption Profile"}},scales:{y:{beginAtZero:true,title:{display:true,text:"Relative Consumption"}},x:{title:{display:true,text:"Hour of Day"}}}}})}componentWillLoad(){this.updateSystemConfigs()}validateForm(){let t=true;const n=ft(this.language);if(!this.name.trim()){this.nameError=n.solarSystemForm.nameError;t=false}else{this.nameError=""}const e=/^[^\s@]+@[^\s@]+\.[^\s@]+$/;if(!this.email.trim()){this.emailError=n.solarSystemForm.emailError;t=false}else if(!e.test(this.email)){this.emailError=n.solarSystemForm.validEmailError;t=false}else{this.emailError=""}return t}handleRequestOffer(){if(!this.validateForm()){return}console.log("Requesting offer for:",{name:this.name,email:this.email,systemConfig:this.systemConfigs,consumption:this.householdConsumption,autonomy:this.autonomy,costSavings:this.costSavings,roofPolygons:this.roofPolygons,obstructionPolygons:this.obstructionPolygons})}render(){const t=ft(this.language);return e("div",{key:"21698e582f74c74a60f9edfcedb306b05f0222e7",class:"flex flex-col justify-center items-center w-full h-full gap-4 p-4",style:{display:Object.keys(this.systemConfigs).length===0?"none":"flex"}},e("h1",{key:"ccdf1309b25a060c3490429c7c5e5c930d2f0e9e",class:"text-2xl font-bold text-[#271200] mb-4"},t.solarSystemForm.title),e("div",{key:"36ca7d7fbfe09abd5c15bbdfa1d28e4ba121c338",class:"w-full max-w-2xl bg-[#f3ebda] rounded-4xl p-6 space-y-6"},e("div",{key:"48b767da374ac53d3560a06966f707e9e6c78c3c",class:"space-y-4"},e("h2",{key:"9b3195b8e9da8865f4b2943be5d409bb704c55a5",class:"text-lg font-semibold text-[#271200]"},t.solarSystemForm.systemInformation),e("div",{key:"b05ed4419f53cc7a2920018588156c199610c133",class:"grid grid-cols-2 gap-4"},e("div",{key:"e537be319834e51e0e67d77b04330c74a7383b0c"},e("label",{key:"7cc9be6b154ba347fd480d842c9377bd474ac261",class:"block text-sm font-medium text-gray-600 mb-1"},t.solarSystemForm.numberOfPanels),e("input",{key:"ef905fa5d0e78556a04b30af18ce40f67c2afae3",type:"number",class:"w-full px-4 py-2 rounded-4xl border border-gray-300 focus:ring-2 focus:ring-[#964500] focus:border-transparent",value:this.numberOfPanels,readOnly:true})),e("div",{key:"269b65bf3584504f66e0b5121ce34f7fd0bb2cef"},e("label",{key:"0a8b4a4ab90dd9feb27dbfe0003d4e0546df605f",class:"block text-sm font-medium text-gray-600 mb-1"},t.solarSystemForm.panelPeakPower),e("input",{key:"f02985694ab0178aa4d5e0b2f38e721d31576e47",type:"number",class:"w-full px-4 py-2 rounded-4xl border border-gray-300 focus:ring-2 focus:ring-[#964500] focus:border-transparent",value:this.panelPeakPower,readonly:true}))),e("div",{key:"2e56d50d9a4cb464328c6e737af3d6676fe52310",class:"bg-white rounded-4xl p-4"},e("div",{key:"1f1b7d601a4e9fe7e39e981a52b5c9e5e62dcb14",class:"flex items-center justify-between"},e("span",{key:"9a167077be59452754abbfeaba5c540fae5d9494",class:"text-gray-600"},t.solarSystemForm.totalSystemPeakPower),e("span",{key:"83a0c5966f55806a035622112b553c3a607119b7",class:"text-xl font-bold text-[#271200]"},(C.kWattPeak*this.numberOfPanels).toFixed(1)," kW")))),e("div",{key:"f5cd032e9a2c5bb00f2f358c88da981c9362d5a5",class:"space-y-4"},e("h2",{key:"8d1745e6aa800cc90626c76c56946f5767f41e27",class:"text-lg font-semibold text-[#271200]"},t.solarSystemForm.householdConsumptionTitle),e("div",{key:"9ca7290838c235c81ffef96ffd447d1308afa7bc",class:"grid grid-cols-2 gap-4"},e("div",{key:"41324b57994209ac6cc51d8d3a243daf6f533650"},e("label",{key:"970eb8e5ca0e5dc5b1e7f04bb50f99852e949e52",class:"block text-sm font-medium text-gray-600 mb-1"},t.solarSystemForm.annualConsumption),e("input",{key:"03c37fd6aa3f87d6b29a23b86a7addd6dbab0d44",type:"number",class:"w-full px-4 py-2 rounded-4xl border border-gray-300 focus:ring-2 focus:ring-[#964500] focus:border-transparent",value:this.householdConsumption,onInput:t=>{this.householdConsumption=parseInt(t.target.value);this.recalculate();this.updateChart()}})),e("div",{key:"001a1c49fab99814282803dcf9b46ca6828f26a3"},e("label",{key:"010a9c24984eea9f42e676f8be8568243d8c0160",class:"block text-sm font-medium text-gray-600 mb-1"},t.solarSystemForm.consumptionProfileTitle),e("select",{key:"af984af3147b140f7a7e314ef5bb987babbff8ac",class:"w-full px-4 py-2 rounded-4xl border border-gray-300 focus:ring-2 focus:ring-[#964500] focus:border-transparent",onChange:t=>{this.consumptionProfile=t.target.value;this.recalculate();this.updateChart()}},e("option",{key:"95c55aa19f025f657ee658295e0868239846b9a5",value:"mostly_at_home",selected:this.consumptionProfile==="mostly_at_home"},t.solarSystemForm.consumptionProfiles.mostlyAtHome),e("option",{key:"b9f81266edee4503ae85f01b0c54a33ebadcb9c0",value:"mostly_away",selected:this.consumptionProfile==="mostly_away"},t.solarSystemForm.consumptionProfiles.mostlyAway)))),e("div",{key:"9c1d45bc979bf539cad031602762bd498f421ec0",class:"mt-4 h-48"},e("canvas",{key:"ce3dd39bb23c92a1dc13b8d001229fb062afced8",ref:t=>this.chartRef=t}))),e("div",{key:"fea64a12ca9057fdc0c82a158f036f89cddf741e",class:"space-y-4"},e("h2",{key:"48a7bbaf7955b89764f58082481a6f1ef0c60405",class:"text-lg font-semibold text-[#271200]"},t.solarSystemForm.electricityCostsTitle),e("div",{key:"70c75587b835d494e10710c913bdd40470cea41f",class:"grid grid-cols-2 gap-4"},e("div",{key:"3fdbec26fb2172ebdd19253339bf008708ce0e90"},e("label",{key:"fad9ed8e86d81e5b9cb9feee37e43c03691cf5c9",class:"block text-sm font-medium text-gray-600 mb-1"},t.solarSystemForm.electricityPrice),e("input",{key:"d178167fa3c5523cb0f94f40d239f29027e29f1c",type:"number",step:"0.01",class:"w-full px-4 py-2 rounded-4xl border border-gray-300 focus:ring-2 focus:ring-[#964500] focus:border-transparent",value:this.electricityPrice,onInput:t=>{this.electricityPrice=parseFloat(t.target.value);this.recalculate();this.updateChart()}})),e("div",{key:"1ac29180a93b9482b484ff41a99ec98f0757d7ed"},e("label",{key:"83fd31d99465b3bd1e8aea6d692a8338d87f9b7f",class:"block text-sm font-medium text-gray-600 mb-1"},t.solarSystemForm.compensationRate),e("input",{key:"ff05f9d22ebcba02577908f9a93ef4998c12c72a",type:"number",step:"0.01",class:"w-full px-4 py-2 rounded-4xl border border-gray-300 focus:ring-2 focus:ring-[#964500] focus:border-transparent",value:this.compensationRate,onInput:t=>{this.compensationRate=parseFloat(t.target.value);this.recalculate();this.updateChart()}})))),e("div",{key:"5ab652449205d9fb0c16e515db23b7dd585c5679",class:"space-y-4 pt-4 border-t border-gray-200"},e("h2",{key:"871dc06b9618427f40a5c866b1d1ca32393ec79b",class:"text-lg font-semibold text-[#271200]"},t.solarSystemForm.resultsTitle),e("div",{key:"acbd1ba8328b4eed7a56318f1739d62d167e52d5",class:"bg-white rounded-4xl p-4"},e("div",{key:"4848ebd3412765176693c39d02fbdc71f8a0be87",class:"flex items-center justify-between"},e("span",{key:"c1315ac70c2e06da992b96eea02b7f8c9dde407d",class:"text-gray-600"},t.solarSystemForm.autonomy),e("span",{key:"cd5d010aa10c6cca144d5c9285caac323cbea0f2",class:"text-xl font-bold text-[#271200]"},this.autonomy.toFixed(1),"%")),e("div",{key:"dcc273e531ae2f4783ff5683cbc49727ffd1f191",class:"flex items-center justify-between mt-4"},e("div",{key:"8858087a40d0f449ae437b743bb0b9eb135ae051",class:"flex items-center gap-2"},e("span",{key:"3480321e3d508f5c18826cb8586717abe153a832",class:"text-gray-600"},t.solarSystemForm.costSavings),e("div",{key:"6a2c193fe5c7e97d9849db449601cbcd357c94fd",class:"relative group"},e("svg",{key:"49e444dd8d17f589b4779e53ad9c22f7fd58b01b",xmlns:"http://www.w3.org/2000/svg",class:"h-5 w-5 text-gray-400 cursor-help",viewBox:"0 0 20 20",fill:"currentColor"},e("path",{key:"42fe60afec56014b869b278a15e4023b53964b1a","fill-rule":"evenodd",d:"M18 10a8 8 0 11-16 0 8 8 0 0116 0zm-8-3a1 1 0 00-.867.5 1 1 0 11-1.731-1A3 3 0 0113 8a3.001 3.001 0 01-2 2.83V11a1 1 0 11-2 0v-1a1 1 0 011-1 1 1 0 100-2zm0 8a1 1 0 100-2 1 1 0 000 2z","clip-rule":"evenodd"})),e("div",{key:"17b7552a1d9bfa0e2ab6f5c40d7b5a424853f637",class:"absolute bottom-full left-1/2 transform -translate-x-1/2 mb-2 w-64 p-2 bg-gray-800 text-white text-sm rounded-lg opacity-0 group-hover:opacity-100 transition-opacity duration-200 pointer-events-none"},t.solarSystemForm.savingsDisclaimer))),e("span",{key:"94bee7ebb6901d9bc1a1030735947ad667c9a220",class:"text-xl font-bold text-green-600"},this.costSavings.toFixed(2),"€/",t.solarSystemForm.year)))),e("div",{key:"e661d7502b61d49581c67b00868e5aa579338ef0",class:"space-y-4 pt-4 border-t border-gray-200"},e("h2",{key:"8f2963a6511f04b8b222584ed846997163f7f59e",class:"text-lg font-semibold text-[#271200]"},t.solarSystemForm.requestOffer),e("div",{key:"8f190545b0e957b588e0034f60a8925e67ad2835",class:"grid grid-cols-2 gap-4"},e("div",{key:"439c96826a1addbb3dcbdd088bdb5b3a6ed544e8"},e("label",{key:"c5b0475135b8601032dc1e0bda014f7f9fbe7266",class:"block text-sm font-medium text-gray-600 mb-1"},t.solarSystemForm.name),e("input",{key:"00839762b8291f610892b2340890284a426b25cc",type:"text",class:`w-full px-4 py-2 rounded-4xl border ${this.nameError?"border-red-500":"border-gray-300"} focus:ring-2 focus:ring-[#964500] focus:border-transparent`,value:this.name,onInput:t=>{this.name=t.target.value;this.validateForm()},placeholder:"Your name"}),this.nameError&&e("p",{key:"5c6cc2d03812388526dc0cac792496ebde5019f5",class:"text-red-500 text-sm mt-1"},this.nameError)),e("div",{key:"b000645ab8d4c4a3f2135530f8e784419eb59603"},e("label",{key:"a18835b969e58fb2e6dccd5326c2a36c5123a6af",class:"block text-sm font-medium text-gray-600 mb-1"},t.solarSystemForm.email),e("input",{key:"d433805683a648853999ccef0548e1739666ffc8",type:"email",class:`w-full px-4 py-2 rounded-4xl border ${this.emailError?"border-red-500":"border-gray-300"} focus:ring-2 focus:ring-[#964500] focus:border-transparent`,value:this.email,onInput:t=>{this.email=t.target.value;this.validateForm()},placeholder:"your.email@example.com"}),this.emailError&&e("p",{key:"4ee435fe7a8d6d2f7423a46bde1e212e5c9285f6",class:"text-red-500 text-sm mt-1"},this.emailError))),e("div",{key:"a3bc14b28ebd58370acc012d839c40b546d22929",class:"flex justify-center"},e("button",{key:"21edd03ed559beaa02891d8bce22f3f73f6357ca",onClick:()=>this.handleRequestOffer(),disabled:!this.name.trim()||!this.email.trim()||!!this.nameError||!!this.emailError,class:"px-4 py-2 bg-[#271200] text-white rounded-4xl hover:bg-[#964500] transition-colors duration-200"},t.solarSystemForm.requestOfferButton)))))}static get watchers(){return{systemConfigs:["updateSystemConfigs"]}}};af.style=sf;export{pt as map_draw,xt as solar_expert,af as solar_system_form};
44
+ //# sourceMappingURL=p-dc4824e6.entry.js.map