@kong-ui-public/analytics-chart 0.24.1 → 0.24.2
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/dist/vitals-chart.es.js
CHANGED
|
@@ -17669,7 +17669,7 @@ const Ca = "24px", Fh = (n, t) => {
|
|
|
17669
17669
|
for (const [i, r] of t)
|
|
17670
17670
|
e[i] = r;
|
|
17671
17671
|
return e;
|
|
17672
|
-
}, PD = (n) => (Fd("data-v-
|
|
17672
|
+
}, PD = (n) => (Fd("data-v-bcbde7a2"), n = n(), Ud(), n), ED = ["aria-hidden"], AD = {
|
|
17673
17673
|
key: 0,
|
|
17674
17674
|
"data-testid": "kui-icon-svg-title"
|
|
17675
17675
|
}, RD = /* @__PURE__ */ PD(() => /* @__PURE__ */ gt("path", {
|
|
@@ -17768,7 +17768,7 @@ const Ca = "24px", Fh = (n, t) => {
|
|
|
17768
17768
|
_: 1
|
|
17769
17769
|
}, 8, ["aria-hidden", "style"]));
|
|
17770
17770
|
}
|
|
17771
|
-
}), ID = /* @__PURE__ */ Fh(LD, [["__scopeId", "data-v-
|
|
17771
|
+
}), ID = /* @__PURE__ */ Fh(LD, [["__scopeId", "data-v-bcbde7a2"]]), ND = (n) => (Fd("data-v-755ff393"), n = n(), Ud(), n), FD = ["aria-hidden"], UD = {
|
|
17772
17772
|
key: 0,
|
|
17773
17773
|
"data-testid": "kui-icon-svg-title"
|
|
17774
17774
|
}, WD = /* @__PURE__ */ ND(() => /* @__PURE__ */ gt("path", {
|
|
@@ -17867,7 +17867,7 @@ const Ca = "24px", Fh = (n, t) => {
|
|
|
17867
17867
|
_: 1
|
|
17868
17868
|
}, 8, ["aria-hidden", "style"]));
|
|
17869
17869
|
}
|
|
17870
|
-
}), zD = /* @__PURE__ */ Fh(YD, [["__scopeId", "data-v-
|
|
17870
|
+
}), zD = /* @__PURE__ */ Fh(YD, [["__scopeId", "data-v-755ff393"]]), HD = "#6c7489", $D = "#995c00", BD = "20px", jD = "40px", qD = { class: "tooltip-title" }, VD = { class: "title font-bold" }, XD = {
|
|
17871
17871
|
key: 1,
|
|
17872
17872
|
class: "subtitle"
|
|
17873
17873
|
}, GD = { class: "tooltip" }, KD = { key: 0 }, ZD = { class: "display-label" }, QD = { class: "display-value" }, JD = /* @__PURE__ */ pe({
|
package/dist/vitals-chart.umd.js
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
(function(ut,h){typeof exports=="object"&&typeof module<"u"?h(exports,require("vue"),require("@kong-ui-public/i18n")):typeof define=="function"&&define.amd?define(["exports","vue","@kong-ui-public/i18n"],h):(ut=typeof globalThis<"u"?globalThis:ut||self,h(ut["kong-ui-publicvitals-chart"]={},ut.Vue,ut["kong-ui-public-i18n"]))})(this,function(ut,h,rn){"use strict";var
|
|
1
|
+
(function(ut,h){typeof exports=="object"&&typeof module<"u"?h(exports,require("vue"),require("@kong-ui-public/i18n")):typeof define=="function"&&define.amd?define(["exports","vue","@kong-ui-public/i18n"],h):(ut=typeof globalThis<"u"?globalThis:ut||self,h(ut["kong-ui-publicvitals-chart"]={},ut.Vue,ut["kong-ui-public-i18n"]))})(this,function(ut,h,rn){"use strict";var XM=Object.defineProperty;var GM=(ut,h,rn)=>h in ut?XM(ut,h,{enumerable:!0,configurable:!0,writable:!0,value:rn}):ut[h]=rn;var Y=(ut,h,rn)=>(GM(ut,typeof h!="symbol"?h+"":h,rn),rn);var Tn,uh;const Dh={noDataAvailableTitle:"No data in the current time frame",noDataAvailableDescription:"Once there is traffic, it will display here",limitedResultsShown:"Not all data is shown in the below report. Reports are currently limited to a maximum of {maxReturned} entities.",entityNoName:"no-name",debug:"debug",total:"Total",chartUnits:{ms:"ms",bytes:"Byte{plural}",count:"request{plural}","count/minute":"rpm",requests:"request{plural}"},csvExport:{noDataRange:"No data in selected range",noDataRetry:"Please adjust the time period and try again",timeRangeSelected:"selected",defaultFilename:"Chart Export",exportPreview:"Export Preview",exportButton:"Export",exportTimeRange:"Time range",exportDescription:"Exports a CSV of the data represented in the chart.",previewRows:"Previewing {rowsMax} of {rowsTotal} row{plural}",downloadButton:"Export",cancelButton:"Cancel"},legend:{datapointValueDisplay:"{value} {unit}"},chartLabels:{Service:"Service",ServiceVersion:"Service Version",Route:"Route",Application:"Application",RuntimeGroup:"Runtime Group",GatewayService:"Gateway Service",StatusCode:"Status Code",CodeClass:"Status Code (grouped)",Time:"Time",API_PRODUCT:"API Product",API_PRODUCT_VERSION:"API Product Version",RUNTIME_GROUP:"Runtime Group",GATEWAY_SERVICE:"Gateway Service",ROUTE:"Route",APPLICATION:"Application",STATUS_CODE:"Status Code",STATUS_CODE_GROUPED:"Status Code (grouped)",TIME:"Time",ORGANIZATION:"Organization",TotalRequests:"Request Count",RequestsPerMinute:"Requests per Minute",LatencyP99:"Response Latency (p99)",LatencyP95:"Response Latency (p95)",LatencyP50:"Response Latency (p50)",LatencyAverage:"Response Latency (avg)",UpstreamLatencyP99:"Upstream Latency (p99)",UpstreamLatencyP95:"Upstream Latency (p95)",UpstreamLatencyP50:"Upstream Latency (p50)",UpstreamLatencyAverage:"Upstream Latency (avg)",KongLatencyP99:"Kong Latency (p99)",KongLatencyP95:"Kong Latency (p95)",KongLatencyP50:"Kong Latency (p50)",KongLatencyAverage:"Kong Latency (avg)",ResponseSizeP99:"Response Size (p99)",ResponseSizeP95:"Response Size (p95)",ResponseSizeP50:"Response Size (p50)",RequestSizeP99:"Request Size (p99)",RequestSizeP95:"Request Size (p95)",RequestSizeP50:"Request Size (p50)",SuccessfulRequests:"Successful requests",SUCCESS:"Successful requests",FailedRequests:"Failed requests",FAILURE:"Failed requests","5XX":"5xx","4XX":"4xx",REQUEST_COUNT:"Request Count",REQUEST_PER_MINUTE:"Requests per Minute",RESPONSE_LATENCY_P99:"Response Latency",RESPONSE_LATENCY_P95:"Response Latency",RESPONSE_LATENCY_P50:"Response Latency",RESPONSE_SIZE_P99:"Response Size (p99)",RESPONSE_SIZE_P95:"Response Size (p95)",RESPONSE_SIZE_P50:"Response Size (p50)",REQUEST_SIZE_P99:"Request Size (p99)",REQUEST_SIZE_P95:"Request Size (p95)",REQUEST_SIZE_P50:"Request Size (p50)",CONTROL_PLANE:"Control Plane"},metricAxisTitles:{REQUEST_COUNT:"Request Count",REQUEST_PER_MINUTE:"Requests per Minute",RESPONSE_LATENCY_P99:"Response Latency (p99) in {unit}",RESPONSE_LATENCY_P95:"Response Latency (p95) in {unit}",RESPONSE_LATENCY_P50:"Response Latency (p50) in {unit}",RESPONSE_SIZE_P99:"Response Size (p99) in {unit}",RESPONSE_SIZE_P95:"Response Size (p95) in {unit}",RESPONSE_SIZE_P50:"Response Size (p50) in {unit}",REQUEST_SIZE_P99:"Request Size (p99) in {unit}",REQUEST_SIZE_P95:"Request Size (p95) in {unit}",REQUEST_SIZE_P50:"Request Size (p50) in {unit}",TotalRequests:"Request Count",RequestsPerMinute:"Requests per Minute",LatencyP99:"Response Latency (p99) in {unit}",LatencyP95:"Response Latency (p95) in {unit}",LatencyP50:"Response Latency (p50) in {unit}",LatencyAverage:"Response Latency (avg) in {unit}",UpstreamLatencyP99:"Upstream Latency (p99) in {unit}",UpstreamLatencyP95:"Upstream Latency (p95) in {unit}",UpstreamLatencyP50:"Upstream Latency (p50) in {unit}",UpstreamLatencyAverage:"Upstream Latency (avg) in {unit}",KongLatencyP99:"Kong Latency (p99) in {unit}",KongLatencyP95:"Kong Latency (p95) in {unit}",KongLatencyP50:"Kong Latency (p50) in {unit}",KongLatencyAverage:"Kong Latency (avg) in {unit}",ResponseSizeP99:"Response Size (p99) in {unit}",ResponseSizeP95:"Response Size (p95) in {unit}",ResponseSizeP50:"Response Size (p50) in {unit}",RequestSizeP99:"Request Size (p99) in {unit}",RequestSizeP95:"Request Size (p95) in {unit}",RequestSizeP50:"Request Size (p50) in {unit}"},granularityAxisTitles:{Minutely:"@timestamp per minute",Hourly:"@timestamp per hour",Daily:"@timestamp per day",Weekly:"@timestamp per week"},topNTable:{nameLabel:"Name",defaultEmptyStateTitle:"No data to display",defaultErrorStateTitle:"Something went wrong",errors:{meta:"Error: response must contain 'meta'",display:"Error: 'display' response incorrectly formatted (must have at least one key)",metricNames:"Error: 'metricNames' response incorrectly formatted (must have at least one entry)"}}};function Sh(){const n=rn.createI18n("en-us",Dh);return{i18n:n,i18nT:rn.i18nTComponent(n)}}/*!
|
|
2
2
|
* @kurkle/color v0.3.2
|
|
3
3
|
* https://github.com/kurkle/color#readme
|
|
4
4
|
* (c) 2023 Jukka Kurkela
|
|
@@ -21,12 +21,12 @@ In order to be iterable, non-array objects must have a [Symbol.iterator]() metho
|
|
|
21
21
|
* https://www.chartjs.org/chartjs-plugin-annotation/index
|
|
22
22
|
* (c) 2023 chartjs-plugin-annotation Contributors
|
|
23
23
|
* Released under the MIT License
|
|
24
|
-
*/const af={modes:{point(n,t){return sa(n,t,{intersect:!0})},nearest(n,t,e){return a1(n,t,e)},x(n,t,e){return sa(n,t,{intersect:e.intersect,axis:"x"})},y(n,t,e){return sa(n,t,{intersect:e.intersect,axis:"y"})}}};function Yo(n,t,e){return(af.modes[e.mode]||af.modes.nearest)(n,t,e)}function i1(n,t,e){return e!=="x"&&e!=="y"?n.inRange(t.x,t.y,"x",!0)||n.inRange(t.x,t.y,"y",!0):n.inRange(t.x,t.y,e,!0)}function r1(n,t,e){return e==="x"?{x:n.x,y:t.y}:e==="y"?{x:t.x,y:n.y}:t}function sa(n,t,e){return n.visibleElements.filter(i=>e.intersect?i.inRange(t.x,t.y):i1(i,t,e.axis))}function a1(n,t,e){let i=Number.POSITIVE_INFINITY;return sa(n,t,e).reduce((r,a)=>{const s=a.getCenterPoint(),o=r1(t,s,e.axis),l=Gn(t,o);return l<i?(r=[a],i=l):l===i&&r.push(a),r},[]).sort((r,a)=>r._index-a._index).slice(0,1)}const s1=(n,t)=>t>n||n.length>t.length&&n.slice(0,t.length)===t,Wn=.001,oa=(n,t,e)=>Math.min(e,Math.max(t,n));function o1(n,t,e){for(const i of Object.keys(n))n[i]=oa(n[i],t,e);return n}function l1(n,t,e,i){if(!n||!t||e<=0)return!1;const r=i/2;return Math.pow(n.x-t.x,2)+Math.pow(n.y-t.y,2)<=Math.pow(e+r,2)}function sf(n,{x:t,y:e,x2:i,y2:r},a,s){const o=s/2,l=n.x>=t-o-Wn&&n.x<=i+o+Wn,c=n.y>=e-o-Wn&&n.y<=r+o+Wn;return a==="x"?l:(a==="y"||l)&&c}function ci(n,t){const{centerX:e,centerY:i}=n.getProps(["centerX","centerY"],t);return{x:e,y:i}}function c1(n,t,e,i=!0){const r=e.split(".");let a=0;for(const s of t.split(".")){const o=r[a++];if(parseInt(s,10)<parseInt(o,10))break;if(s1(o,s)){if(i)throw new Error(`${n} v${e} is not supported. v${t} or newer is required.`);return!1}}return!0}const of=n=>typeof n=="string"&&n.endsWith("%"),lf=n=>parseFloat(n)/100,cf=n=>oa(lf(n),0,1),la=(n,t)=>({x:n,y:t,x2:n,y2:t,width:0,height:0}),u1={box:n=>la(n.centerX,n.centerY),ellipse:n=>({centerX:n.centerX,centerY:n.centerX,radius:0,width:0,height:0}),label:n=>la(n.centerX,n.centerY),line:n=>la(n.x,n.y),point:n=>({centerX:n.centerX,centerY:n.centerY,radius:0,width:0,height:0}),polygon:n=>la(n.centerX,n.centerY)};function zo(n,t){return t==="start"?0:t==="end"?n:of(t)?cf(t)*n:n/2}function bn(n,t,e=!0){return typeof t=="number"?t:of(t)?(e?cf(t):lf(t))*n:n}function d1(n,t){const{x:e,width:i}=n,r=t.textAlign;return r==="center"?e+i/2:r==="end"||r==="right"?e+i:e}function Ho(n,t="center"){return ct(n)?{x:nt(n.x,t),y:nt(n.y,t)}:(n=nt(n,t),{x:n,y:n})}function uf(n){return n&&(ue(n.xValue)||ue(n.yValue))}function nr(n,t,e){const i=e.init;if(i){if(i===!0)return ff(t,e)}else return;return f1(n,t,e)}function df(n,t,e){let i=!1;return t.forEach(r=>{de(n[r])?(i=!0,e[r]=n[r]):ue(e[r])&&delete e[r]}),i}function ff(n,t){const e=t.type||"line";return u1[e](n)}function f1(n,t,e){const i=xt(e.init,[{chart:n,properties:t,options:e}]);if(i===!0)return ff(t,e);if(ct(i))return i}const $o=new Map,h1=n=>isNaN(n)||n<=0,g1=n=>n.reduce(function(t,e){return t+=e.string,t},"");function ca(n){if(n&&typeof n=="object"){const t=n.toString();return t==="[object HTMLImageElement]"||t==="[object HTMLCanvasElement]"}}function jo(n,{x:t,y:e},i){i&&(n.translate(t,e),n.rotate(qt(i)),n.translate(-t,-e))}function vn(n,t){if(t&&t.borderWidth)return n.lineCap=t.borderCapStyle,n.setLineDash(t.borderDash),n.lineDashOffset=t.borderDashOffset,n.lineJoin=t.borderJoinStyle,n.lineWidth=t.borderWidth,n.strokeStyle=t.borderColor,!0}function ui(n,t){n.shadowColor=t.backgroundShadowColor,n.shadowBlur=t.shadowBlur,n.shadowOffsetX=t.shadowOffsetX,n.shadowOffsetY=t.shadowOffsetY}function Vo(n,t){const e=t.content;if(ca(e))return{width:bn(e.width,t.width),height:bn(e.height,t.height)};const i=t.font,r=yt(i)?i.map(l=>Et(l)):[Et(i)],a=t.textStrokeWidth,s=yt(e)?e:[e],o=s.join()+g1(r)+a+(n._measureText?"-spriting":"");return $o.has(o)||$o.set(o,v1(n,s,r,a)),$o.get(o)}function hf(n,t,e){const{x:i,y:r,width:a,height:s}=t;n.save(),ui(n,e);const o=vn(n,e);n.fillStyle=e.backgroundColor,n.beginPath(),Kn(n,{x:i,y:r,w:a,h:s,radius:o1(un(e.borderRadius),0,Math.min(a,s)/2)}),n.closePath(),n.fill(),o&&(n.shadowColor=e.borderShadowColor,n.stroke()),n.restore()}function p1(n,t,e){const i=e.content;if(ca(i)){n.save(),n.globalAlpha=_1(e.opacity,i.style.opacity),n.drawImage(i,t.x,t.y,t.width,t.height),n.restore();return}const r=yt(i)?i:[i],a=e.font,s=yt(a)?a.map(d=>Et(d)):[Et(a)],o=e.color,l=yt(o)?o:[o],c=d1(t,e),u=t.y+e.textStrokeWidth/2;n.save(),n.textBaseline="middle",n.textAlign=e.textAlign,m1(n,e)&&x1(n,{x:c,y:u},r,s),w1(n,{x:c,y:u},r,{fonts:s,colors:l}),n.restore()}function m1(n,t){if(t.textStrokeWidth>0)return n.lineJoin="round",n.miterLimit=2,n.lineWidth=t.textStrokeWidth,n.strokeStyle=t.textStrokeColor,!0}function y1(n,t,e,i){const{radius:r,options:a}=t,s=a.pointStyle,o=a.rotation;let l=(o||0)*Ia;if(ca(s)){n.save(),n.translate(e,i),n.rotate(l),n.drawImage(s,-s.width/2,-s.height/2,s.width,s.height),n.restore();return}h1(r)||b1(n,{x:e,y:i,radius:r,rotation:o,style:s,rad:l})}function b1(n,{x:t,y:e,radius:i,rotation:r,style:a,rad:s}){let o,l,c,u;switch(n.beginPath(),a){default:n.arc(t,e,i,0,kt),n.closePath();break;case"triangle":n.moveTo(t+Math.sin(s)*i,e-Math.cos(s)*i),s+=mr,n.lineTo(t+Math.sin(s)*i,e-Math.cos(s)*i),s+=mr,n.lineTo(t+Math.sin(s)*i,e-Math.cos(s)*i),n.closePath();break;case"rectRounded":u=i*.516,c=i-u,o=Math.cos(s+_e)*c,l=Math.sin(s+_e)*c,n.arc(t-o,e-l,u,s-dt,s-Pt),n.arc(t+l,e-o,u,s-Pt,s),n.arc(t+o,e+l,u,s,s+Pt),n.arc(t-l,e+o,u,s+Pt,s+dt),n.closePath();break;case"rect":if(!r){c=Math.SQRT1_2*i,n.rect(t-c,e-c,2*c,2*c);break}s+=_e;case"rectRot":o=Math.cos(s)*i,l=Math.sin(s)*i,n.moveTo(t-o,e-l),n.lineTo(t+l,e-o),n.lineTo(t+o,e+l),n.lineTo(t-l,e+o),n.closePath();break;case"crossRot":s+=_e;case"cross":o=Math.cos(s)*i,l=Math.sin(s)*i,n.moveTo(t-o,e-l),n.lineTo(t+o,e+l),n.moveTo(t+l,e-o),n.lineTo(t-l,e+o);break;case"star":o=Math.cos(s)*i,l=Math.sin(s)*i,n.moveTo(t-o,e-l),n.lineTo(t+o,e+l),n.moveTo(t+l,e-o),n.lineTo(t-l,e+o),s+=_e,o=Math.cos(s)*i,l=Math.sin(s)*i,n.moveTo(t-o,e-l),n.lineTo(t+o,e+l),n.moveTo(t+l,e-o),n.lineTo(t-l,e+o);break;case"line":o=Math.cos(s)*i,l=Math.sin(s)*i,n.moveTo(t-o,e-l),n.lineTo(t+o,e+l);break;case"dash":n.moveTo(t,e),n.lineTo(t+Math.cos(s)*i,e+Math.sin(s)*i);break}n.fill()}function v1(n,t,e,i){n.save();const r=t.length;let a=0,s=i;for(let o=0;o<r;o++){const l=e[Math.min(o,e.length-1)];n.font=l.string;const c=t[o];a=Math.max(a,n.measureText(c).width+i),s+=l.lineHeight}return n.restore(),{width:a,height:s}}function x1(n,{x:t,y:e},i,r){n.beginPath();let a=0;i.forEach(function(s,o){const l=r[Math.min(o,r.length-1)],c=l.lineHeight;n.font=l.string,n.strokeText(s,t,e+c/2+a),a+=c}),n.stroke()}function w1(n,{x:t,y:e},i,{fonts:r,colors:a}){let s=0;i.forEach(function(o,l){const c=a[Math.min(l,a.length-1)],u=r[Math.min(l,r.length-1)],d=u.lineHeight;n.beginPath(),n.font=u.string,n.fillStyle=c,n.fillText(o,t,e+d/2+s),s+=d,n.fill()})}function _1(n,t){const e=cn(n)?n:t;return cn(e)?oa(e,0,1):1}const gf={xScaleID:{min:"xMin",max:"xMax",start:"left",end:"right",startProp:"x",endProp:"x2"},yScaleID:{min:"yMin",max:"yMax",start:"bottom",end:"top",startProp:"y",endProp:"y2"}};function di(n,t,e){return t=typeof t=="number"?t:n.parse(t),Lt(t)?n.getPixelForValue(t):e}function Yn(n,t,e){const i=t[e];if(i||e==="scaleID")return i;const r=e.charAt(0),a=Object.values(n).filter(s=>s.axis&&s.axis===r);return a.length?a[0].id:r}function pf(n,t){if(n){const e=n.options.reverse,i=di(n,t.min,e?t.end:t.start),r=di(n,t.max,e?t.start:t.end);return{start:i,end:r}}}function mf(n,t){const{chartArea:e,scales:i}=n,r=i[Yn(i,t,"xScaleID")],a=i[Yn(i,t,"yScaleID")];let s=e.width/2,o=e.height/2;return r&&(s=di(r,t.xValue,r.left+r.width/2)),a&&(o=di(a,t.yValue,a.top+a.height/2)),{x:s,y:o}}function qo(n,t){const e=n.scales,i=e[Yn(e,t,"xScaleID")],r=e[Yn(e,t,"yScaleID")];if(!i&&!r)return{};let{left:a,right:s}=i||n.chartArea,{top:o,bottom:l}=r||n.chartArea;const c=vf(i,{min:t.xMin,max:t.xMax,start:a,end:s});a=c.start,s=c.end;const u=vf(r,{min:t.yMin,max:t.yMax,start:l,end:o});return o=u.start,l=u.end,{x:a,y:o,x2:s,y2:l,width:s-a,height:l-o,centerX:a+(s-a)/2,centerY:o+(l-o)/2}}function yf(n,t){if(!uf(t)){const e=qo(n,t);let i=t.radius;(!i||isNaN(i))&&(i=Math.min(e.width,e.height)/2,t.radius=i);const r=i*2,a=e.centerX+t.xAdjust,s=e.centerY+t.yAdjust;return{x:a-i,y:s-i,x2:a+i,y2:s+i,centerX:a,centerY:s,width:r,height:r,radius:i}}return D1(n,t)}function T1(n,t){const{scales:e,chartArea:i}=n,r=e[t.scaleID],a={x:i.left,y:i.top,x2:i.right,y2:i.bottom};return r?S1(r,a,t):M1(e,a,t),a}function bf(n,t){const e=qo(n,t);return e.initProperties=nr(n,e,t),e.elements=[{type:"label",optionScope:"label",properties:O1(n,e,t),initProperties:e.initProperties}],e}function D1(n,t){const e=mf(n,t),i=t.radius*2;return{x:e.x-t.radius+t.xAdjust,y:e.y-t.radius+t.yAdjust,x2:e.x+t.radius+t.xAdjust,y2:e.y+t.radius+t.yAdjust,centerX:e.x+t.xAdjust,centerY:e.y+t.yAdjust,radius:t.radius,width:i,height:i}}function vf(n,t){const e=pf(n,t)||t;return{start:Math.min(e.start,e.end),end:Math.max(e.start,e.end)}}function S1(n,t,e){const i=di(n,e.value,NaN),r=di(n,e.endValue,i);n.isHorizontal()?(t.x=i,t.x2=r):(t.y=i,t.y2=r)}function M1(n,t,e){for(const i of Object.keys(gf)){const r=n[Yn(n,e,i)];if(r){const{min:a,max:s,start:o,end:l,startProp:c,endProp:u}=gf[i],d=pf(r,{min:e[a],max:e[s],start:r[o],end:r[l]});t[c]=d.start,t[u]=d.end}}}function C1({properties:n,options:t},e,i,r){const{x:a,x2:s,width:o}=n;return xf({start:a,end:s,size:o,borderWidth:t.borderWidth},{position:i.x,padding:{start:r.left,end:r.right},adjust:t.label.xAdjust,size:e.width})}function k1({properties:n,options:t},e,i,r){const{y:a,y2:s,height:o}=n;return xf({start:a,end:s,size:o,borderWidth:t.borderWidth},{position:i.y,padding:{start:r.top,end:r.bottom},adjust:t.label.yAdjust,size:e.height})}function xf(n,t){const{start:e,end:i,borderWidth:r}=n,{position:a,padding:{start:s,end:o},adjust:l}=t,c=i-r-e-s-o-t.size;return e+r/2+l+zo(c,a)}function O1(n,t,e){const i=e.label;i.backgroundColor="transparent",i.callout.display=!1;const r=Ho(i.position),a=Xt(i.padding),s=Vo(n.ctx,i),o=C1({properties:t,options:e},s,r,a),l=k1({properties:t,options:e},s,r,a),c=s.width+a.width,u=s.height+a.height;return{x:o,y:l,x2:o+c,y2:l+u,width:c,height:u,centerX:o+c/2,centerY:l+u/2,rotation:i.rotation}}function zn(n,t,e){const i=Math.cos(e),r=Math.sin(e),a=t.x,s=t.y;return{x:a+i*(n.x-a)-r*(n.y-s),y:s+r*(n.x-a)+i*(n.y-s)}}const Xo=["enter","leave"],Go=Xo.concat("click");function P1(n,t,e){t.listened=df(e,Go,t.listeners),t.moveListened=!1,t._getElements=Yo,Xo.forEach(i=>{de(e[i])&&(t.moveListened=!0)}),(!t.listened||!t.moveListened)&&t.annotations.forEach(i=>{!t.listened&&de(i.click)&&(t.listened=!0),t.moveListened||Xo.forEach(r=>{de(i[r])&&(t.listened=!0,t.moveListened=!0)})})}function E1(n,t,e){if(n.listened)switch(t.type){case"mousemove":case"mouseout":return A1(n,t,e);case"click":return R1(n,t,e)}}function A1(n,t,e){if(!n.moveListened)return;let i;t.type==="mousemove"?i=Yo(n,t,e.interaction):i=[];const r=n.hovered;n.hovered=i;const a={state:n,event:t};let s=wf(a,"leave",r,i);return wf(a,"enter",i,r)||s}function wf({state:n,event:t},e,i,r){let a;for(const s of i)r.indexOf(s)<0&&(a=_f(s.options[e]||n.listeners[e],s,t)||a);return a}function R1(n,t,e){const i=n.listeners,r=Yo(n,t,e.interaction);let a;for(const s of r)a=_f(s.options.click||i.click,s,t)||a;return a}function _f(n,t,e){return xt(n,[t.$context,e])===!0}const ua=["afterDraw","beforeDraw"];function L1(n,t,e){const i=t.visibleElements;t.hooked=df(e,ua,t.hooks),t.hooked||i.forEach(r=>{t.hooked||ua.forEach(a=>{de(r.options[a])&&(t.hooked=!0)})})}function Tf(n,t,e){if(n.hooked){const i=t.options[e]||n.hooks[e];return xt(i,[t.$context])}}function I1(n,t,e){const i=W1(n.scales,t,e);let r=Df(t,i,"min","suggestedMin");r=Df(t,i,"max","suggestedMax")||r,r&&de(t.handleTickRangeOptions)&&t.handleTickRangeOptions()}function N1(n,t){for(const e of n)U1(e,t)}function Df(n,t,e,i){if(Lt(t[e])&&!F1(n.options,e,i)){const r=n[e]!==t[e];return n[e]=t[e],r}}function F1(n,t,e){return ue(n[t])||ue(n[e])}function U1(n,t){for(const e of["scaleID","xScaleID","yScaleID"]){const i=Yn(t,n,e);i&&!t[i]&&B1(n,e)&&console.warn(`No scale found with id '${i}' for annotation '${n.id}'`)}}function B1(n,t){if(t==="scaleID")return!0;const e=t.charAt(0);for(const i of["Min","Max","Value"])if(ue(n[e+i]))return!0;return!1}function W1(n,t,e){const i=t.axis,r=t.id,a=i+"ScaleID",s={min:nt(t.min,Number.NEGATIVE_INFINITY),max:nt(t.max,Number.POSITIVE_INFINITY)};for(const o of e)o.scaleID===r?Sf(o,t,["value","endValue"],s):Yn(n,o,a)===r&&Sf(o,t,[i+"Min",i+"Max",i+"Value"],s);return s}function Sf(n,t,e,i){for(const r of e){const a=n[r];if(ue(a)){const s=t.parse(a);i.min=Math.min(i.min,s),i.max=Math.max(i.max,s)}}}class fi extends te{inRange(t,e,i,r){const{x:a,y:s}=zn({x:t,y:e},this.getCenterPoint(r),qt(-this.options.rotation));return sf({x:a,y:s},this.getProps(["x","y","x2","y2"],r),i,this.options.borderWidth)}getCenterPoint(t){return ci(this,t)}draw(t){t.save(),jo(t,this.getCenterPoint(),this.options.rotation),hf(t,this,this.options),t.restore()}get label(){return this.elements&&this.elements[0]}resolveElementProperties(t,e){return bf(t,e)}}fi.id="boxAnnotation",fi.defaults={adjustScaleRange:!0,backgroundShadowColor:"transparent",borderCapStyle:"butt",borderDash:[],borderDashOffset:0,borderJoinStyle:"miter",borderRadius:0,borderShadowColor:"transparent",borderWidth:1,display:!0,init:void 0,label:{backgroundColor:"transparent",borderWidth:0,callout:{display:!1},color:"black",content:null,display:!1,drawTime:void 0,font:{family:void 0,lineHeight:void 0,size:void 0,style:void 0,weight:"bold"},height:void 0,opacity:void 0,padding:6,position:"center",rotation:void 0,textAlign:"start",textStrokeColor:void 0,textStrokeWidth:0,width:void 0,xAdjust:0,yAdjust:0,z:void 0},rotation:0,shadowBlur:0,shadowOffsetX:0,shadowOffsetY:0,xMax:void 0,xMin:void 0,xScaleID:void 0,yMax:void 0,yMin:void 0,yScaleID:void 0,z:0},fi.defaultRoutes={borderColor:"color",backgroundColor:"color"},fi.descriptors={label:{_fallback:!0}};const Mf=["left","bottom","top","right"];class ir extends te{inRange(t,e,i,r){const{x:a,y:s}=zn({x:t,y:e},this.getCenterPoint(r),qt(-this.rotation));return sf({x:a,y:s},this.getProps(["x","y","x2","y2"],r),i,this.options.borderWidth)}getCenterPoint(t){return ci(this,t)}draw(t){const e=this.options,i=!ue(this._visible)||this._visible;!e.display||!e.content||!i||(t.save(),jo(t,this.getCenterPoint(),this.rotation),z1(t,this),hf(t,this,e),p1(t,G1(this),e),t.restore())}resolveElementProperties(t,e){let i;if(uf(e))i=mf(t,e);else{const{centerX:o,centerY:l}=qo(t,e);i={x:o,y:l}}const r=Xt(e.padding),a=Vo(t.ctx,e),s=Y1(i,a,e,r);return{initProperties:nr(t,s,e),pointX:i.x,pointY:i.y,...s,rotation:e.rotation}}}ir.id="labelAnnotation",ir.defaults={adjustScaleRange:!0,backgroundColor:"transparent",backgroundShadowColor:"transparent",borderCapStyle:"butt",borderDash:[],borderDashOffset:0,borderJoinStyle:"miter",borderRadius:0,borderShadowColor:"transparent",borderWidth:0,callout:{borderCapStyle:"butt",borderColor:void 0,borderDash:[],borderDashOffset:0,borderJoinStyle:"miter",borderWidth:1,display:!1,margin:5,position:"auto",side:5,start:"50%"},color:"black",content:null,display:!0,font:{family:void 0,lineHeight:void 0,size:void 0,style:void 0,weight:void 0},height:void 0,init:void 0,opacity:void 0,padding:6,position:"center",rotation:0,shadowBlur:0,shadowOffsetX:0,shadowOffsetY:0,textAlign:"center",textStrokeColor:void 0,textStrokeWidth:0,width:void 0,xAdjust:0,xMax:void 0,xMin:void 0,xScaleID:void 0,xValue:void 0,yAdjust:0,yMax:void 0,yMin:void 0,yScaleID:void 0,yValue:void 0,z:0},ir.defaultRoutes={borderColor:"color"};function Y1(n,t,e,i){const r=t.width+i.width+e.borderWidth,a=t.height+i.height+e.borderWidth,s=Ho(e.position,"center"),o=Cf(n.x,r,e.xAdjust,s.x),l=Cf(n.y,a,e.yAdjust,s.y);return{x:o,y:l,x2:o+r,y2:l+a,width:r,height:a,centerX:o+r/2,centerY:l+a/2}}function Cf(n,t,e=0,i){return n-zo(t,i)+e}function z1(n,t){const{pointX:e,pointY:i,options:r}=t,a=r.callout,s=a&&a.display&&q1(t,a);if(!s||K1(t,a,s))return;if(n.save(),n.beginPath(),!vn(n,a))return n.restore();const{separatorStart:l,separatorEnd:c}=H1(t,s),{sideStart:u,sideEnd:d}=j1(t,s,l);(a.margin>0||r.borderWidth===0)&&(n.moveTo(l.x,l.y),n.lineTo(c.x,c.y)),n.moveTo(u.x,u.y),n.lineTo(d.x,d.y);const f=zn({x:e,y:i},t.getCenterPoint(),qt(-t.rotation));n.lineTo(f.x,f.y),n.stroke(),n.restore()}function H1(n,t){const{x:e,y:i,x2:r,y2:a}=n,s=$1(n,t);let o,l;return t==="left"||t==="right"?(o={x:e+s,y:i},l={x:o.x,y:a}):(o={x:e,y:i+s},l={x:r,y:o.y}),{separatorStart:o,separatorEnd:l}}function $1(n,t){const{width:e,height:i,options:r}=n,a=r.callout.margin+r.borderWidth/2;return t==="right"?e+a:t==="bottom"?i+a:-a}function j1(n,t,e){const{y:i,width:r,height:a,options:s}=n,o=s.callout.start,l=V1(t,s.callout);let c,u;return t==="left"||t==="right"?(c={x:e.x,y:i+bn(a,o)},u={x:c.x+l,y:c.y}):(c={x:e.x+bn(r,o),y:e.y},u={x:c.x,y:c.y+l}),{sideStart:c,sideEnd:u}}function V1(n,t){const e=t.side;return n==="left"||n==="top"?-e:e}function q1(n,t){const e=t.position;return Mf.includes(e)?e:X1(n,t)}function X1(n,t){const{x:e,y:i,x2:r,y2:a,width:s,height:o,pointX:l,pointY:c,centerX:u,centerY:d,rotation:f}=n,g={x:u,y:d},p=t.start,m=bn(s,p),y=bn(o,p),v=[e,e+m,e+m,r],x=[i+y,a,i,a],w=[];for(let _=0;_<4;_++){const S=zn({x:v[_],y:x[_]},g,qt(f));w.push({position:Mf[_],distance:Gn(S,{x:l,y:c})})}return w.sort((_,S)=>_.distance-S.distance)[0].position}function G1({x:n,y:t,width:e,height:i,options:r}){const a=r.borderWidth/2,s=Xt(r.padding);return{x:n+s.left+a,y:t+s.top+a,width:e-s.left-s.right-r.borderWidth,height:i-s.top-s.bottom-r.borderWidth}}function K1(n,t,e){const{pointX:i,pointY:r}=n,a=t.margin;let s=i,o=r;return e==="left"?s+=a:e==="right"?s-=a:e==="top"?o+=a:e==="bottom"&&(o-=a),n.inRange(s,o)}const Ko=(n,t,e)=>({x:n.x+e*(t.x-n.x),y:n.y+e*(t.y-n.y)}),Zo=(n,t,e)=>Ko(t,e,Math.abs((n-t.y)/(e.y-t.y))).x,kf=(n,t,e)=>Ko(t,e,Math.abs((n-t.x)/(e.x-t.x))).y,rr=n=>n*n,Z1=(n,t,{x:e,y:i,x2:r,y2:a},s)=>s==="y"?{start:Math.min(i,a),end:Math.max(i,a),value:t}:{start:Math.min(e,r),end:Math.max(e,r),value:n},Of=(n,t,e,i)=>(1-i)*(1-i)*n+2*(1-i)*i*t+i*i*e,Qo=(n,t,e,i)=>({x:Of(n.x,t.x,e.x,i),y:Of(n.y,t.y,e.y,i)}),Pf=(n,t,e,i)=>2*(1-i)*(t-n)+2*i*(e-t),Ef=(n,t,e,i)=>-Math.atan2(Pf(n.x,t.x,e.x,i),Pf(n.y,t.y,e.y,i))+.5*dt;class ar extends te{inRange(t,e,i,r){const a=this.options.borderWidth/2;if(i!=="x"&&i!=="y"){const s={mouseX:t,mouseY:e},{path:o,ctx:l}=this;if(o){vn(l,this.options);const{chart:u}=this.$context,d=t*u.currentDevicePixelRatio,f=e*u.currentDevicePixelRatio,g=l.isPointInStroke(o,d,f)||Jo(this,s,r);return l.restore(),g}const c=rr(a);return eT(this,s,c,r)||Jo(this,s,r)}return Q1(this,{mouseX:t,mouseY:e},i,{hBorderWidth:a,useFinalPosition:r})}getCenterPoint(t){return ci(this,t)}draw(t){const{x:e,y:i,x2:r,y2:a,cp:s,options:o}=this;if(t.save(),!vn(t,o))return t.restore();ui(t,o);const l=Math.sqrt(Math.pow(r-e,2)+Math.pow(a-i,2));if(o.curve&&s)return cT(t,this,s,l),t.restore();const{startOpts:c,endOpts:u,startAdjust:d,endAdjust:f}=Nf(this),g=Math.atan2(a-i,r-e);t.translate(e,i),t.rotate(g),t.beginPath(),t.moveTo(0+d,0),t.lineTo(l-f,0),t.shadowColor=o.borderShadowColor,t.stroke(),tl(t,0,d,c),tl(t,l,-f,u),t.restore()}get label(){return this.elements&&this.elements[0]}resolveElementProperties(t,e){const i=T1(t,e),{x:r,y:a,x2:s,y2:o}=i,l=J1(i,t.chartArea),c=l?tT({x:r,y:a},{x:s,y:o},t.chartArea):{x:r,y:a,x2:s,y2:o,width:Math.abs(s-r),height:Math.abs(o-a)};if(c.centerX=(s+r)/2,c.centerY=(o+a)/2,c.initProperties=nr(t,c,e),e.curve){const d={x:c.x,y:c.y},f={x:c.x2,y:c.y2};c.cp=lT(c,e,Gn(d,f))}const u=nT(t,c,e.label);return u._visible=l,c.elements=[{type:"label",optionScope:"label",properties:u,initProperties:c.initProperties}],c}}ar.id="lineAnnotation";const Af={backgroundColor:void 0,backgroundShadowColor:void 0,borderColor:void 0,borderDash:void 0,borderDashOffset:void 0,borderShadowColor:void 0,borderWidth:void 0,display:void 0,fill:void 0,length:void 0,shadowBlur:void 0,shadowOffsetX:void 0,shadowOffsetY:void 0,width:void 0};ar.defaults={adjustScaleRange:!0,arrowHeads:{display:!1,end:Object.assign({},Af),fill:!1,length:12,start:Object.assign({},Af),width:6},borderDash:[],borderDashOffset:0,borderShadowColor:"transparent",borderWidth:2,curve:!1,controlPoint:{y:"-50%"},display:!0,endValue:void 0,init:void 0,label:{backgroundColor:"rgba(0,0,0,0.8)",backgroundShadowColor:"transparent",borderCapStyle:"butt",borderColor:"black",borderDash:[],borderDashOffset:0,borderJoinStyle:"miter",borderRadius:6,borderShadowColor:"transparent",borderWidth:0,callout:Object.assign({},ir.defaults.callout),color:"#fff",content:null,display:!1,drawTime:void 0,font:{family:void 0,lineHeight:void 0,size:void 0,style:void 0,weight:"bold"},height:void 0,opacity:void 0,padding:6,position:"center",rotation:0,shadowBlur:0,shadowOffsetX:0,shadowOffsetY:0,textAlign:"center",textStrokeColor:void 0,textStrokeWidth:0,width:void 0,xAdjust:0,yAdjust:0,z:void 0},scaleID:void 0,shadowBlur:0,shadowOffsetX:0,shadowOffsetY:0,value:void 0,xMax:void 0,xMin:void 0,xScaleID:void 0,yMax:void 0,yMin:void 0,yScaleID:void 0,z:0},ar.descriptors={arrowHeads:{start:{_fallback:!0},end:{_fallback:!0},_fallback:!0}},ar.defaultRoutes={borderColor:"color"};function Q1(n,{mouseX:t,mouseY:e},i,{hBorderWidth:r,useFinalPosition:a}){const s=Z1(t,e,n.getProps(["x","y","x2","y2"],a),i);return s.value>=s.start-r&&s.value<=s.end+r||Jo(n,{mouseX:t,mouseY:e},a,i)}function J1({x:n,y:t,x2:e,y2:i},{top:r,right:a,bottom:s,left:o}){return!(n<o&&e<o||n>a&&e>a||t<r&&i<r||t>s&&i>s)}function Rf({x:n,y:t},e,{top:i,right:r,bottom:a,left:s}){return n<s&&(t=kf(s,{x:n,y:t},e),n=s),n>r&&(t=kf(r,{x:n,y:t},e),n=r),t<i&&(n=Zo(i,{x:n,y:t},e),t=i),t>a&&(n=Zo(a,{x:n,y:t},e),t=a),{x:n,y:t}}function tT(n,t,e){const{x:i,y:r}=Rf(n,t,e),{x:a,y:s}=Rf(t,n,e);return{x:i,y:r,x2:a,y2:s,width:Math.abs(a-i),height:Math.abs(s-r)}}function eT(n,{mouseX:t,mouseY:e},i=Wn,r){const{x:a,y:s,x2:o,y2:l}=n.getProps(["x","y","x2","y2"],r),c=o-a,u=l-s,d=rr(c)+rr(u),f=d===0?-1:((t-a)*c+(e-s)*u)/d;let g,p;return f<0?(g=a,p=s):f>1?(g=o,p=l):(g=a+f*c,p=s+f*u),rr(t-g)+rr(e-p)<=i}function Jo(n,{mouseX:t,mouseY:e},i,r){const a=n.label;return a.options.display&&a.inRange(t,e,r,i)}function nT(n,t,e){const i=e.borderWidth,r=Xt(e.padding),a=Vo(n.ctx,e),s=a.width+r.width+i,o=a.height+r.height+i;return rT(t,e,{width:s,height:o,padding:r},n.chartArea)}function iT(n){const{x:t,y:e,x2:i,y2:r}=n,a=Math.atan2(r-e,i-t);return a>dt/2?a-dt:a<dt/-2?a+dt:a}function rT(n,t,e,i){const{width:r,height:a,padding:s}=e,{xAdjust:o,yAdjust:l}=t,c={x:n.x,y:n.y},u={x:n.x2,y:n.y2},d=t.rotation==="auto"?iT(n):qt(t.rotation),f=aT(r,a,d),g=sT(n,t,{labelSize:f,padding:s},i),p=n.cp?Qo(c,n.cp,u,g):Ko(c,u,g),m={size:f.w,min:i.left,max:i.right,padding:s.left},y={size:f.h,min:i.top,max:i.bottom,padding:s.top},v=If(p.x,m)+o,x=If(p.y,y)+l;return{x:v-r/2,y:x-a/2,x2:v+r/2,y2:x+a/2,centerX:v,centerY:x,pointX:p.x,pointY:p.y,width:r,height:a,rotation:yr(d)}}function aT(n,t,e){const i=Math.cos(e),r=Math.sin(e);return{w:Math.abs(n*i)+Math.abs(t*r),h:Math.abs(n*r)+Math.abs(t*i)}}function sT(n,t,e,i){let r;const a=oT(n,i);return t.position==="start"?r=Lf({w:n.x2-n.x,h:n.y2-n.y},e,t,a):t.position==="end"?r=1-Lf({w:n.x-n.x2,h:n.y-n.y2},e,t,a):r=zo(1,t.position),r}function Lf(n,t,e,i){const{labelSize:r,padding:a}=t,s=n.w*i.dx,o=n.h*i.dy,l=s>0&&(r.w/2+a.left-i.x)/s,c=o>0&&(r.h/2+a.top-i.y)/o;return oa(Math.max(l,c),0,.25)}function oT(n,t){const{x:e,x2:i,y:r,y2:a}=n,s=Math.min(r,a)-t.top,o=Math.min(e,i)-t.left,l=t.bottom-Math.max(r,a),c=t.right-Math.max(e,i);return{x:Math.min(o,c),y:Math.min(s,l),dx:o<=c?1:-1,dy:s<=l?1:-1}}function If(n,t){const{size:e,min:i,max:r,padding:a}=t,s=e/2;return e>r-i?(r+i)/2:(i>=n-a-s&&(n=i+a+s),r<=n+a+s&&(n=r-a-s),n)}function Nf(n){const t=n.options,e=t.arrowHeads&&t.arrowHeads.start,i=t.arrowHeads&&t.arrowHeads.end;return{startOpts:e,endOpts:i,startAdjust:Ff(n,e),endAdjust:Ff(n,i)}}function Ff(n,t){if(!t||!t.display)return 0;const{length:e,width:i}=t,r=n.options.borderWidth/2,a={x:e,y:i+r};return Math.abs(Zo(0,a,{x:0,y:r}))}function tl(n,t,e,i){if(!i||!i.display)return;const{length:r,width:a,fill:s,backgroundColor:o,borderColor:l}=i,c=Math.abs(t-r)+e;n.beginPath(),ui(n,i),vn(n,i),n.moveTo(c,-a),n.lineTo(t+e,0),n.lineTo(c,a),s===!0?(n.fillStyle=o||l,n.closePath(),n.fill(),n.shadowColor="transparent"):n.shadowColor=i.borderShadowColor,n.stroke()}function lT(n,t,e){const{x:i,y:r,x2:a,y2:s,centerX:o,centerY:l}=n,c=Math.atan2(s-r,a-i),u=Ho(t.controlPoint,0),d={x:o+bn(e,u.x,!1),y:l+bn(e,u.y,!1)};return zn(d,{x:o,y:l},c)}function Uf(n,{x:t,y:e},{angle:i,adjust:r},a){!a||!a.display||(n.save(),n.translate(t,e),n.rotate(i),tl(n,0,-r,a),n.restore())}function cT(n,t,e,i){const{x:r,y:a,x2:s,y2:o,options:l}=t,{startOpts:c,endOpts:u,startAdjust:d,endAdjust:f}=Nf(t),g={x:r,y:a},p={x:s,y:o},m=Ef(g,e,p,0),y=Ef(g,e,p,1)-dt,v=Qo(g,e,p,d/i),x=Qo(g,e,p,1-f/i),w=new Path2D;n.beginPath(),w.moveTo(v.x,v.y),w.quadraticCurveTo(e.x,e.y,x.x,x.y),n.shadowColor=l.borderShadowColor,n.stroke(w),t.path=w,t.ctx=n,Uf(n,v,{angle:m,adjust:d},c),Uf(n,x,{angle:y,adjust:f},u)}class sr extends te{inRange(t,e,i,r){const a=this.options.rotation,s=this.options.borderWidth;if(i!=="x"&&i!=="y")return uT({x:t,y:e},this.getProps(["width","height","centerX","centerY"],r),a,s);const{x:o,y:l,x2:c,y2:u}=this.getProps(["x","y","x2","y2"],r),d=s/2,f=i==="y"?{start:l,end:u}:{start:o,end:c},g=zn({x:t,y:e},this.getCenterPoint(r),qt(-a));return g[i]>=f.start-d-Wn&&g[i]<=f.end+d+Wn}getCenterPoint(t){return ci(this,t)}draw(t){const{width:e,height:i,centerX:r,centerY:a,options:s}=this;t.save(),jo(t,this.getCenterPoint(),s.rotation),ui(t,this.options),t.beginPath(),t.fillStyle=s.backgroundColor;const o=vn(t,s);t.ellipse(r,a,i/2,e/2,dt/2,0,2*dt),t.fill(),o&&(t.shadowColor=s.borderShadowColor,t.stroke()),t.restore()}get label(){return this.elements&&this.elements[0]}resolveElementProperties(t,e){return bf(t,e)}}sr.id="ellipseAnnotation",sr.defaults={adjustScaleRange:!0,backgroundShadowColor:"transparent",borderDash:[],borderDashOffset:0,borderShadowColor:"transparent",borderWidth:1,display:!0,init:void 0,label:Object.assign({},fi.defaults.label),rotation:0,shadowBlur:0,shadowOffsetX:0,shadowOffsetY:0,xMax:void 0,xMin:void 0,xScaleID:void 0,yMax:void 0,yMin:void 0,yScaleID:void 0,z:0},sr.defaultRoutes={borderColor:"color",backgroundColor:"color"},sr.descriptors={label:{_fallback:!0}};function uT(n,t,e,i){const{width:r,height:a,centerX:s,centerY:o}=t,l=r/2,c=a/2;if(l<=0||c<=0)return!1;const u=qt(e||0),d=i/2||0,f=Math.cos(u),g=Math.sin(u),p=Math.pow(f*(n.x-s)+g*(n.y-o),2),m=Math.pow(g*(n.x-s)-f*(n.y-o),2);return p/Math.pow(l+d,2)+m/Math.pow(c+d,2)<=1.0001}class da extends te{inRange(t,e,i,r){const{x:a,y:s,x2:o,y2:l,width:c}=this.getProps(["x","y","x2","y2","width"],r),u=this.options.borderWidth;if(i!=="x"&&i!=="y")return l1({x:t,y:e},this.getCenterPoint(r),c/2,u);const d=u/2,f=i==="y"?{start:s,end:l,value:e}:{start:a,end:o,value:t};return f.value>=f.start-d&&f.value<=f.end+d}getCenterPoint(t){return ci(this,t)}draw(t){const e=this.options,i=e.borderWidth;if(e.radius<.1)return;t.save(),t.fillStyle=e.backgroundColor,ui(t,e);const r=vn(t,e);y1(t,this,this.centerX,this.centerY),r&&!ca(e.pointStyle)&&(t.shadowColor=e.borderShadowColor,t.stroke()),t.restore(),e.borderWidth=i}resolveElementProperties(t,e){const i=yf(t,e);return i.initProperties=nr(t,i,e),i}}da.id="pointAnnotation",da.defaults={adjustScaleRange:!0,backgroundShadowColor:"transparent",borderDash:[],borderDashOffset:0,borderShadowColor:"transparent",borderWidth:1,display:!0,init:void 0,pointStyle:"circle",radius:10,rotation:0,shadowBlur:0,shadowOffsetX:0,shadowOffsetY:0,xAdjust:0,xMax:void 0,xMin:void 0,xScaleID:void 0,xValue:void 0,yAdjust:0,yMax:void 0,yMin:void 0,yScaleID:void 0,yValue:void 0,z:0},da.defaultRoutes={borderColor:"color",backgroundColor:"color"};class fa extends te{inRange(t,e,i,r){if(i!=="x"&&i!=="y")return this.options.radius>=.1&&this.elements.length>1&&fT(this.elements,t,e,r);const a=zn({x:t,y:e},this.getCenterPoint(r),qt(-this.options.rotation)),s=this.elements.map(c=>i==="y"?c.bY:c.bX),o=Math.min(...s),l=Math.max(...s);return a[i]>=o&&a[i]<=l}getCenterPoint(t){return ci(this,t)}draw(t){const{elements:e,options:i}=this;t.save(),t.beginPath(),t.fillStyle=i.backgroundColor,ui(t,i);const r=vn(t,i);let a=!0;for(const s of e)a?(t.moveTo(s.x,s.y),a=!1):t.lineTo(s.x,s.y);t.closePath(),t.fill(),r&&(t.shadowColor=i.borderShadowColor,t.stroke()),t.restore()}resolveElementProperties(t,e){const i=yf(t,e),{sides:r,rotation:a}=e,s=[],o=2*dt/r;let l=a*Ia;for(let c=0;c<r;c++,l+=o){const u=dT(i,e,l);u.initProperties=nr(t,i,e),s.push(u)}return i.elements=s,i}}fa.id="polygonAnnotation",fa.defaults={adjustScaleRange:!0,backgroundShadowColor:"transparent",borderCapStyle:"butt",borderDash:[],borderDashOffset:0,borderJoinStyle:"miter",borderShadowColor:"transparent",borderWidth:1,display:!0,init:void 0,point:{radius:0},radius:10,rotation:0,shadowBlur:0,shadowOffsetX:0,shadowOffsetY:0,sides:3,xAdjust:0,xMax:void 0,xMin:void 0,xScaleID:void 0,xValue:void 0,yAdjust:0,yMax:void 0,yMin:void 0,yScaleID:void 0,yValue:void 0,z:0},fa.defaultRoutes={borderColor:"color",backgroundColor:"color"};function dT({centerX:n,centerY:t},{radius:e,borderWidth:i},r){const a=i/2,s=Math.sin(r),o=Math.cos(r),l={x:n+s*e,y:t-o*e};return{type:"point",optionScope:"point",properties:{x:l.x,y:l.y,centerX:l.x,centerY:l.y,bX:n+s*(e+a),bY:t-o*(e+a)}}}function fT(n,t,e,i){let r=!1,a=n[n.length-1].getProps(["bX","bY"],i);for(const s of n){const o=s.getProps(["bX","bY"],i);o.bY>e!=a.bY>e&&t<(a.bX-o.bX)*(e-o.bY)/(a.bY-o.bY)+o.bX&&(r=!r),a=o}return r}const xn={box:fi,ellipse:sr,label:ir,line:ar,point:da,polygon:fa};Object.keys(xn).forEach(n=>{Ft.describe(`elements.${xn[n].id}`,{_fallback:"plugins.annotation.common"})});const hT={update:Object.assign},gT=Go.concat(ua),Bf=(n,t)=>ct(t)?il(n,t):n,el=n=>n==="color"||n==="font";function nl(n="line"){return xn[n]?n:(console.warn(`Unknown annotation type: '${n}', defaulting to 'line'`),"line")}function pT(n,t,e,i){const r=yT(n,e.animations,i),a=t.annotations,s=xT(t.elements,a);for(let o=0;o<a.length;o++){const l=a[o],c=Wf(s,o,l.type),u=l.setContext(vT(n,c,l)),d=c.resolveElementProperties(n,u);d.skip=mT(d),"elements"in d&&(bT(c,d.elements,u,r),delete d.elements),ue(c.x)||Object.assign(c,d),Object.assign(c,d.initProperties),d.options=Yf(u),r.update(c,d)}}function mT(n){return isNaN(n.x)||isNaN(n.y)}function yT(n,t,e){return e==="reset"||e==="none"||e==="resize"?hT:new Ga(n,t)}function bT(n,t,e,i){const r=n.elements||(n.elements=[]);r.length=t.length;for(let a=0;a<t.length;a++){const s=t[a],o=s.properties,l=Wf(r,a,s.type,s.initProperties),c=e[s.optionScope].override(s);o.options=Yf(c),i.update(l,o)}}function Wf(n,t,e,i){const r=xn[nl(e)];let a=n[t];return(!a||!(a instanceof r))&&(a=n[t]=new r,Object.assign(a,i)),a}function Yf(n){const t=xn[nl(n.type)],e={};e.id=n.id,e.type=n.type,e.drawTime=n.drawTime,Object.assign(e,il(n,t.defaults),il(n,t.defaultRoutes));for(const i of gT)e[i]=n[i];return e}function il(n,t){const e={};for(const i of Object.keys(t)){const r=t[i],a=n[i];el(i)&&yt(a)?e[i]=a.map(s=>Bf(s,r)):e[i]=Bf(a,r)}return e}function vT(n,t,e){return t.$context||(t.$context=Object.assign(Object.create(n.getContext()),{element:t,id:e.id,type:"annotation"}))}function xT(n,t){const e=t.length,i=n.length;if(i<e){const r=e-i;n.splice(i,0,...new Array(r))}else i>e&&n.splice(e,i-e);return n}var wT="3.0.1";const wn=new Map,_T=Go.concat(ua);var zf={id:"annotation",version:wT,beforeRegister(){c1("chart.js","4.0",Te.version)},afterRegister(){Te.register(xn)},afterUnregister(){Te.unregister(xn)},beforeInit(n){wn.set(n,{annotations:[],elements:[],visibleElements:[],listeners:{},listened:!1,moveListened:!1,hooks:{},hooked:!1,hovered:[]})},beforeUpdate(n,t,e){const i=wn.get(n),r=i.annotations=[];let a=e.annotations;ct(a)?Object.keys(a).forEach(s=>{const o=a[s];ct(o)&&(o.id=s,r.push(o))}):yt(a)&&r.push(...a),N1(r,n.scales)},afterDataLimits(n,t){const e=wn.get(n);I1(n,t.scale,e.annotations.filter(i=>i.display&&i.adjustScaleRange))},afterUpdate(n,t,e){const i=wn.get(n);P1(n,i,e),pT(n,i,e,t.mode),i.visibleElements=i.elements.filter(r=>!r.skip&&r.options.display),L1(n,i,e)},beforeDatasetsDraw(n,t,e){ha(n,"beforeDatasetsDraw",e.clip)},afterDatasetsDraw(n,t,e){ha(n,"afterDatasetsDraw",e.clip)},beforeDraw(n,t,e){ha(n,"beforeDraw",e.clip)},afterDraw(n,t,e){ha(n,"afterDraw",e.clip)},beforeEvent(n,t,e){const i=wn.get(n);E1(i,t.event,e)&&(t.changed=!0)},afterDestroy(n){wn.delete(n)},_getState(n){return wn.get(n)},defaults:{animations:{numbers:{properties:["x","y","x2","y2","width","height","centerX","centerY","pointX","pointY","radius"],type:"number"}},clip:!0,interaction:{mode:void 0,axis:void 0,intersect:void 0},common:{drawTime:"afterDatasetsDraw",init:!1,label:{}}},descriptors:{_indexable:!1,_scriptable:n=>!_T.includes(n)&&n!=="init",annotations:{_allKeys:!1,_fallback:(n,t)=>`elements.${xn[nl(t.type)].id}`},interaction:{_fallback:!0},common:{label:{_indexable:el,_fallback:!0},_indexable:el}},additionalOptionScopes:[""]};function ha(n,t,e){const{ctx:i,chartArea:r}=n,a=wn.get(n);e&&Mi(i,r);const s=TT(a.visibleElements,t).sort((o,l)=>o.element.options.z-l.element.options.z);for(const o of s)DT(i,r,a,o);e&&Ci(i)}function TT(n,t){const e=[];for(const i of n)if(i.options.drawTime===t&&e.push({element:i,main:!0}),i.elements&&i.elements.length)for(const r of i.elements)r.options.display&&r.options.drawTime===t&&e.push({element:r});return e}function DT(n,t,e,i){const r=i.element;i.main?(Tf(e,r,"beforeDraw"),r.draw(n,t),Tf(e,r,"afterDraw")):r.draw(n,t)}const ga="24px",Hf=(n,t)=>{const e=n.__vccOpts||n;for(const[i,r]of t)e[i]=r;return e},ST=n=>(h.pushScopeId("data-v-271b5a2e"),n=n(),h.popScopeId(),n),MT=["aria-hidden"],CT={key:0,"data-testid":"kui-icon-svg-title"},kT=ST(()=>h.createElementVNode("path",{d:"M9 20C8.45 20 7.97917 19.8042 7.5875 19.4125C7.19583 19.0208 7 18.55 7 18C7 17.45 7.19583 16.9792 7.5875 16.5875C7.97917 16.1958 8.45 16 9 16C9.55 16 10.0208 16.1958 10.4125 16.5875C10.8042 16.9792 11 17.45 11 18C11 18.55 10.8042 19.0208 10.4125 19.4125C10.0208 19.8042 9.55 20 9 20ZM15 20C14.45 20 13.9792 19.8042 13.5875 19.4125C13.1958 19.0208 13 18.55 13 18C13 17.45 13.1958 16.9792 13.5875 16.5875C13.9792 16.1958 14.45 16 15 16C15.55 16 16.0208 16.1958 16.4125 16.5875C16.8042 16.9792 17 17.45 17 18C17 18.55 16.8042 19.0208 16.4125 19.4125C16.0208 19.8042 15.55 20 15 20ZM9 14C8.45 14 7.97917 13.8042 7.5875 13.4125C7.19583 13.0208 7 12.55 7 12C7 11.45 7.19583 10.9792 7.5875 10.5875C7.97917 10.1958 8.45 10 9 10C9.55 10 10.0208 10.1958 10.4125 10.5875C10.8042 10.9792 11 11.45 11 12C11 12.55 10.8042 13.0208 10.4125 13.4125C10.0208 13.8042 9.55 14 9 14ZM15 14C14.45 14 13.9792 13.8042 13.5875 13.4125C13.1958 13.0208 13 12.55 13 12C13 11.45 13.1958 10.9792 13.5875 10.5875C13.9792 10.1958 14.45 10 15 10C15.55 10 16.0208 10.1958 16.4125 10.5875C16.8042 10.9792 17 11.45 17 12C17 12.55 16.8042 13.0208 16.4125 13.4125C16.0208 13.8042 15.55 14 15 14ZM9 8C8.45 8 7.97917 7.80417 7.5875 7.4125C7.19583 7.02083 7 6.55 7 6C7 5.45 7.19583 4.97917 7.5875 4.5875C7.97917 4.19583 8.45 4 9 4C9.55 4 10.0208 4.19583 10.4125 4.5875C10.8042 4.97917 11 5.45 11 6C11 6.55 10.8042 7.02083 10.4125 7.4125C10.0208 7.80417 9.55 8 9 8ZM15 8C14.45 8 13.9792 7.80417 13.5875 7.4125C13.1958 7.02083 13 6.55 13 6C13 5.45 13.1958 4.97917 13.5875 4.5875C13.9792 4.19583 14.45 4 15 4C15.55 4 16.0208 4.19583 16.4125 4.5875C16.8042 4.97917 17 5.45 17 6C17 6.55 16.8042 7.02083 16.4125 7.4125C16.0208 7.80417 15.55 8 15 8Z",fill:"currentColor"},null,-1)),OT=Hf(h.defineComponent({__name:"DragIcon",props:{title:{type:String,required:!1,default:""},color:{type:String,required:!1,default:"currentColor"},display:{type:String,required:!1,default:"block"},decorative:{type:Boolean,required:!1,default:!1},size:{type:[Number,String],required:!1,default:ga,validator:n=>{if(typeof n=="number"&&n>0)return!0;if(typeof n=="string"){const t=String(n).replace(/px/gi,""),e=Number(t);if(e&&!isNaN(e)&&Number.isInteger(e)&&e>0)return!0}return!1}},as:{type:String,required:!1,default:"span"}},setup(n){const t=n,e=h.computed(()=>{if(typeof t.size=="number"&&t.size>0)return`${t.size}px`;if(typeof t.size=="string"){const r=String(t.size).replace(/px/gi,""),a=Number(r);if(a&&!isNaN(a)&&Number.isInteger(a)&&a>0)return`${a}px`}return ga}),i=h.computed(()=>({boxSizing:"border-box",color:t.color,display:t.display,height:e.value,lineHeight:"0",width:e.value}));return(r,a)=>(h.openBlock(),h.createBlock(h.resolveDynamicComponent(n.as),{"aria-hidden":n.decorative?"true":void 0,class:"kui-icon drag-icon","data-testid":"kui-icon-wrapper-drag-icon",style:h.normalizeStyle(i.value)},{default:h.withCtx(()=>[(h.openBlock(),h.createElementBlock("svg",{"aria-hidden":n.decorative?"true":void 0,"data-testid":"kui-icon-svg-drag-icon",fill:"none",height:"100%",role:"img",viewBox:"0 0 24 24",width:"100%",xmlns:"http://www.w3.org/2000/svg"},[n.title?(h.openBlock(),h.createElementBlock("title",CT,h.toDisplayString(n.title),1)):h.createCommentVNode("",!0),kT],8,MT))]),_:1},8,["aria-hidden","style"]))}}),[["__scopeId","data-v-271b5a2e"]]),PT=n=>(h.pushScopeId("data-v-53632c70"),n=n(),h.popScopeId(),n),ET=["aria-hidden"],AT={key:0,"data-testid":"kui-icon-svg-title"},RT=PT(()=>h.createElementVNode("path",{d:"M12.025 22.05C11.7583 22.05 11.5042 22 11.2625 21.9C11.0208 21.8 10.8 21.6583 10.6 21.475L2.575 13.45C2.39167 13.25 2.25 13.0292 2.15 12.7875C2.05 12.5458 2 12.2917 2 12.025C2 11.7583 2.05 11.5 2.15 11.25C2.25 11 2.39167 10.7833 2.575 10.6L10.6 2.575C10.8 2.375 11.0208 2.22917 11.2625 2.1375C11.5042 2.04583 11.7583 2 12.025 2C12.2917 2 12.55 2.04583 12.8 2.1375C13.05 2.22917 13.2667 2.375 13.45 2.575L21.475 10.6C21.675 10.7833 21.8208 11 21.9125 11.25C22.0042 11.5 22.05 11.7583 22.05 12.025C22.05 12.2917 22.0042 12.5458 21.9125 12.7875C21.8208 13.0292 21.675 13.25 21.475 13.45L13.45 21.475C13.2667 21.6583 13.05 21.8 12.8 21.9C12.55 22 12.2917 22.05 12.025 22.05ZM11.025 13.025H13.025V7.025H11.025V13.025ZM12.025 16.025C12.3083 16.025 12.5458 15.9292 12.7375 15.7375C12.9292 15.5458 13.025 15.3083 13.025 15.025C13.025 14.7417 12.9292 14.5042 12.7375 14.3125C12.5458 14.1208 12.3083 14.025 12.025 14.025C11.7417 14.025 11.5042 14.1208 11.3125 14.3125C11.1208 14.5042 11.025 14.7417 11.025 15.025C11.025 15.3083 11.1208 15.5458 11.3125 15.7375C11.5042 15.9292 11.7417 16.025 12.025 16.025Z",fill:"currentColor"},null,-1)),LT=Hf(h.defineComponent({__name:"WarningIcon",props:{title:{type:String,required:!1,default:""},color:{type:String,required:!1,default:"currentColor"},display:{type:String,required:!1,default:"block"},decorative:{type:Boolean,required:!1,default:!1},size:{type:[Number,String],required:!1,default:ga,validator:n=>{if(typeof n=="number"&&n>0)return!0;if(typeof n=="string"){const t=String(n).replace(/px/gi,""),e=Number(t);if(e&&!isNaN(e)&&Number.isInteger(e)&&e>0)return!0}return!1}},as:{type:String,required:!1,default:"span"}},setup(n){const t=n,e=h.computed(()=>{if(typeof t.size=="number"&&t.size>0)return`${t.size}px`;if(typeof t.size=="string"){const r=String(t.size).replace(/px/gi,""),a=Number(r);if(a&&!isNaN(a)&&Number.isInteger(a)&&a>0)return`${a}px`}return ga}),i=h.computed(()=>({boxSizing:"border-box",color:t.color,display:t.display,height:e.value,lineHeight:"0",width:e.value}));return(r,a)=>(h.openBlock(),h.createBlock(h.resolveDynamicComponent(n.as),{"aria-hidden":n.decorative?"true":void 0,class:"kui-icon warning-icon","data-testid":"kui-icon-wrapper-warning-icon",style:h.normalizeStyle(i.value)},{default:h.withCtx(()=>[(h.openBlock(),h.createElementBlock("svg",{"aria-hidden":n.decorative?"true":void 0,"data-testid":"kui-icon-svg-warning-icon",fill:"none",height:"100%",role:"img",viewBox:"0 0 24 24",width:"100%",xmlns:"http://www.w3.org/2000/svg"},[n.title?(h.openBlock(),h.createElementBlock("title",AT,h.toDisplayString(n.title),1)):h.createCommentVNode("",!0),RT],8,ET))]),_:1},8,["aria-hidden","style"]))}}),[["__scopeId","data-v-53632c70"]]),IT="#6c7489",NT="#995c00",FT="20px",UT="40px",BT={class:"tooltip-title"},WT={class:"title font-bold"},YT={key:1,class:"subtitle"},zT={class:"tooltip"},HT={key:0},$T={class:"display-label"},jT={class:"display-value"},VT=h.defineComponent({__name:"ChartTooltip",props:{showTooltip:{type:Boolean,required:!0,default:!1},left:{type:String,required:!1,default:null},top:{type:String,required:!1,default:null},tooltipTitle:{type:String,required:!1,default:""},context:{type:[String,Number],required:!1,default:""},series:{type:Array,required:!0,default:()=>[]},locked:{type:Boolean,required:!1,default:!1}},emits:["dimensions","top","left"],setup(n,{emit:t}){const e=t,i=n,r=h.ref(null),a=h.ref(!1),s=h.ref({x:0,y:0}),o=h.ref({x:0,y:0}),l=h.ref({left:i.left,top:i.top});h.watch(r,g=>{if(g){const{width:p,height:m}=g.getBoundingClientRect();e("dimensions",{width:p,height:m})}}),h.watch(()=>i.locked,g=>{g?(l.value.left=i.left,l.value.top=i.top):g===!1&&(e("top",l.value.top),e("left",l.value.left))});function c(g){if(r.value){a.value=!0;const p=window.getComputedStyle(r.value),m=p.transform||p.webkitTransform||p.mozTransform,y=new DOMMatrix(m),v=y.m41,x=y.m42;s.value={x:v,y:x},o.value={x:g.clientX,y:g.clientY},window.addEventListener("mousemove",d),window.addEventListener("mouseup",f)}}let u=null;function d(g){g.preventDefault(),g.stopPropagation(),a.value&&(u!==null&&window.cancelAnimationFrame(u),u=window.requestAnimationFrame(()=>{const p=g.clientX-o.value.x,m=g.clientY-o.value.y;l.value.left=`${s.value.x+p}px`,l.value.top=`${s.value.y+m}px`}))}function f(){a.value=!1,u!==null&&window.cancelAnimationFrame(u),window.removeEventListener("mousemove",d),window.removeEventListener("mouseup",f)}return(g,p)=>n.showTooltip?(h.openBlock(),h.createElementBlock("div",{key:0,ref_key:"tooltipEl",ref:r,class:h.normalizeClass(["tooltip-container",{locked:n.locked}]),style:h.normalizeStyle({transform:n.locked?`translate(${l.value.left}, ${l.value.top})`:`translate(${n.left}, ${n.top})`,left:"0",top:"0",pointerEvents:n.locked?"all":"none"}),onMousedown:c},[h.createElementVNode("div",BT,[h.createElementVNode("span",WT,h.toDisplayString(n.tooltipTitle),1),n.locked?(h.openBlock(),h.createBlock(h.unref(OT),{key:0,class:"drag-icon",color:h.unref(IT)},null,8,["color"])):h.createCommentVNode("",!0),n.context?(h.openBlock(),h.createElementBlock("span",YT,h.toDisplayString(n.context),1)):h.createCommentVNode("",!0)]),h.createElementVNode("ul",zT,[(h.openBlock(!0),h.createElementBlock(h.Fragment,null,h.renderList(n.series,({backgroundColor:m,borderColor:y,label:v,value:x})=>(h.openBlock(),h.createElementBlock(h.Fragment,{key:v},[n.series.length?(h.openBlock(),h.createElementBlock("li",HT,[h.createElementVNode("div",{class:"tooltip-legend",style:h.normalizeStyle({background:m,"border-color":y})},null,4),h.createElementVNode("span",$T,h.toDisplayString(v),1),h.createElementVNode("span",jT,h.toDisplayString(x),1)])):h.createCommentVNode("",!0)],64))),128))])],38)):h.createCommentVNode("",!0)}}),Ke=(n,t)=>{const e=n.__vccOpts||n;for(const[i,r]of t)e[i]=r;return e},rl=Ke(VT,[["__scopeId","data-v-fe2a03e1"]]),qT=["onClick"],XT=["title"],GT={key:0,class:"sub-label"},al=Ke(h.defineComponent({__name:"ChartLegend",props:{id:{type:String,required:!0},items:{type:Object,required:!0},chartInstance:{type:Object,required:!1,default:()=>null}},setup(n){const t=n,e=h.ref(),i=h.ref([]),r=h.ref(!1),a=h.inject("showLegendValues",!0),s=h.inject("legendPosition",h.ref(Bt.Right)),o=h.ref([]),l=()=>{const m=e.value;if(!m||!i.value||m.children.length===0)return 0;let y=1,v=m.children[0].getBoundingClientRect().top;for(const x of i.value){const w=x.getBoundingClientRect().top;w!==v&&(y++,v=w)}return y},c=()=>{e.value&&s.value===Bt.Bottom&&(l()>1?r.value=!0:r.value=!1)},u=()=>{if(e.value&&s.value===Bt.Bottom){let m=0;i.value.forEach(v=>{const x=Array.from(v.children).reduce((w,_)=>w+_.offsetWidth,0);x>m&&(m=x)});const y=parseInt(UT,10);e.value.style.gridTemplateColumns=`repeat(auto-fit, ${m+y}px)`}},d=()=>{if(t.items.length!==o.value.length)return o.value=t.items,!0;for(let m=0;m<t.items.length;m++)if(t.items[m].text!==o.value[m].text)return o.value=t.items,!0;return!1};h.watch(()=>t.items,()=>{c(),d()&&u()},{immediate:!0,flush:"post"}),h.watch(()=>s.value,()=>{u()}),h.onMounted(()=>{o.value=t.items,window.addEventListener("resize",c)}),h.onBeforeUnmount(()=>{window.removeEventListener("resize",c)});const f=(m=0,y)=>{if(t.chartInstance===null)return;const v=t.chartInstance instanceof Te?t.chartInstance:t.chartInstance.chart;g(m,y)?v.hide(m,y):v.show(m,y),v.update()},g=(m=0,y)=>{if(t.chartInstance===null||t.chartInstance.chart===null)return!0;const v=t.chartInstance instanceof Te?t.chartInstance:t.chartInstance.chart,x=v.getDatasetMeta(m);return x.dataset||y===void 0?v.isDatasetVisible(m):!(x.data.length&&x.data[y].hidden)},p=m=>({[Bt.Right]:"vertical",[Bt.Bottom]:"horizontal",[Bt.Hidden]:"hidden"})[m];return(m,y)=>h.unref(s)!==h.unref(Bt).Hidden?(h.openBlock(),h.createElementBlock("ul",{key:0,ref_key:"legendContainerRef",ref:e,class:h.normalizeClass(["legend-container",p(h.unref(s))]),"data-testid":"legend"},[(h.openBlock(!0),h.createElementBlock(h.Fragment,null,h.renderList(n.items,({fillStyle:v,strokeStyle:x,text:w,datasetIndex:_,index:S,value:C})=>(h.openBlock(),h.createElementBlock("li",{key:w,ref_for:!0,ref_key:"legendItemsRef",ref:i,onClick:k=>f(_,S)},[h.createElementVNode("div",{class:"legend",style:h.normalizeStyle({background:v,"border-color":x})},null,4),h.createElementVNode("div",{class:h.normalizeClass(["label-container",{"strike-through":!g(_,S)}])},[h.createElementVNode("div",{class:h.normalizeClass(["label",{"truncate-label":r.value}]),title:h.unref(s)===h.unref(Bt).Bottom&&w},h.toDisplayString(w),11,XT),C&&h.unref(a)?(h.openBlock(),h.createElementBlock("div",GT,h.toDisplayString(C.formatted),1)):h.createCommentVNode("",!0)],2)],8,qT))),128))],2)):h.createCommentVNode("",!0)}}),[["__scopeId","data-v-fe1c4994"]]);let pa;const KT=new Uint8Array(16);function ZT(){if(!pa&&(pa=typeof crypto<"u"&&crypto.getRandomValues&&crypto.getRandomValues.bind(crypto),!pa))throw new Error("crypto.getRandomValues() not supported. See https://github.com/uuidjs/uuid#getrandomvalues-not-supported");return pa(KT)}const ne=[];for(let n=0;n<256;++n)ne.push((n+256).toString(16).slice(1));function QT(n,t=0){return ne[n[t+0]]+ne[n[t+1]]+ne[n[t+2]]+ne[n[t+3]]+"-"+ne[n[t+4]]+ne[n[t+5]]+"-"+ne[n[t+6]]+ne[n[t+7]]+"-"+ne[n[t+8]]+ne[n[t+9]]+"-"+ne[n[t+10]]+ne[n[t+11]]+ne[n[t+12]]+ne[n[t+13]]+ne[n[t+14]]+ne[n[t+15]]}const $f={randomUUID:typeof crypto<"u"&&crypto.randomUUID&&crypto.randomUUID.bind(crypto)};function _n(n,t,e){if($f.randomUUID&&!t&&!n)return $f.randomUUID();n=n||{};const i=n.random||(n.rng||ZT)();if(i[6]=i[6]&15|64,i[8]=i[8]&63|128,t){e=e||0;for(let r=0;r<16;++r)t[e+r]=i[r];return t}return QT(i)}const jf=(n,t)=>{const e=n.ctx,i=n.scales.y,r=n.scales.x,a=t[t.length-1].element;e.save(),e.strokeStyle="rgba(100, 100, 100, 1)",e.lineWidth=3,n.options.indexAxis==="x"?e.strokeRect(a.x-a.width/2,a.y,a.width,i.bottom-a.y):e.strokeRect(r.left,a.y-a.height/2,a.x-r.left,a.height),e.restore()},Vf={id:"highlightPlugin",clicked:!1,afterDatasetsDraw:function(n){this.clickedElements&&this.clickedElements.length&&jf(n,this.clickedElements)},afterEvent:function(n,{event:t}){var r;if(t.type!=="click"||!t.native)return;this.clicked=!this.clicked;const e=((r=n.options.interaction)==null?void 0:r.mode)||"index",i=n.getElementsAtEventForMode(t.native,e,{intersect:!1},!0);i.length&&this.clicked?(this.clickedElements=i,jf(n,this.clickedElements),this.previousHoverOption=n.options.hover,n.options.hover={mode:null}):(delete this.clickedElements,n.options.hover=this.previousHoverOption||n.options.hover,this.clicked=!1)},beforeDestroy(n){delete this.clickedElements,n.options.hover=this.previousHoverOption||n.options.hover,this.clicked=!1}},qf=6,JT=20,tD="100%",sl=30,eD=40,nD=0,iD=10,rD=10,aD=1,sD=6,oD=Ke(h.defineComponent({__name:"StackedBarChart",props:{chartData:{type:Object,required:!1,default:()=>({labels:[],datasets:[]})},tooltipTitle:{type:String,required:!1,default:""},legendValues:{type:Object,required:!1,default:null},metricUnit:{type:String,required:!1,default:""},orientation:{type:String,required:!1,default:"horizontal",validator:n=>["horizontal","vertical"].includes(n)},annotations:{type:Boolean,required:!1,default:!0},metricAxesTitle:{type:String,required:!1,default:null},dimensionAxesTitle:{type:String,required:!1,default:null},stacked:{type:Boolean,required:!1,default:!0},syntheticsDataKey:{type:String,required:!1,default:""},height:{type:String,required:!1,default:"500px",validator:n=>/(\d *)(px|%)/.test(n)},chartLegendSortFn:{type:Function,required:!1,default:(n,t)=>n.value&&t.value&&t.value.raw-n.value.raw},chartTooltipSortFn:{type:Function,required:!1,default:(n,t)=>t.rawValue-n.rawValue}},emits:["heightUpdate"],setup(n,{emit:t}){const e=n,i=t,{i18n:r}=St.useI18n(),{translateUnit:a}=St.useTranslatedUnits(),s=({chart:F},E)=>{var X;const $=F.data,K=(X=$.labels)==null?void 0:X.indexOf(E);return $.datasets.reduce((Q,at,B)=>{if(F.isDatasetVisible(B)){const N=at.data[K];return isNaN(N)?Q:Q+N}else return Q},0)},o=(F,E,$,K)=>{const X=K==="horizontal";E===null&&(E=r.t("entityNoName"));const Q={type:"label",yValue:N=>X?E:s(N,E),xValue:N=>X?s(N,E):E},at={...Q,position:X?{x:"start",y:"center"}:{x:"center",y:"end"},yAdjust:()=>X?0:-Math.abs(Gw()),content:N=>Co(s(N,E),$)},B={...Q,content:N=>zd(s(N,E),Yd(N.chart,F)),position:X?{x:"start",y:"center"}:{x:"center",y:"end"},xAdjust:N=>X?Wd(Co(s(N,E),$)):0,color:Bd};return{[`${E}-value`]:at,[`${E}-percent`]:B}},l=h.ref(),c=h.ref(),u=h.ref(_n()),d=_n(),f=_n(),g=h.ref([]),p=h.ref(h.inject("legendPosition",Bt.Right)),m=h.ref({show:!1,top:"0px",left:"0px",text:"",offset:0}),y=h.toRef(e,"metricUnit"),v=h.computed(()=>h.toRef(e,"orientation").value==="horizontal"),x=h.reactive({showTooltip:!1,tooltipContext:"",tooltipSeries:[],left:"",top:"",units:y,translateUnit:a,offset:0,width:0,height:0,locked:!1,chartType:v.value?ee.HORIZONTAL_BAR:ee.VERTICAL_BAR,chartTooltipSortFn:e.chartTooltipSortFn}),w=h.ref(0),_=()=>{var F;return e.annotations&&((F=e.chartData.labels)==null?void 0:F.reduce((E,$)=>Object.assign(E,o(e.chartData,$,y.value,e.orientation)),{}))},S={id:u.value,afterUpdate(F){w.value+=1,g.value=F.options.plugins.legend.labels.generateLabels(F).map(E=>({...E,value:e.legendValues&&e.legendValues[E.text]})).sort(e.chartLegendSortFn)}},C={id:d,afterUpdate(F){F.options.plugins.annotation.annotations=e.annotations?_():{}}},D=[S,{id:"axisHover",afterEvent(F,E){if(m.value.show=!1,E.event.type==="mousemove"){const $=E.event,K=F.options.indexAxis,X=F.scales,Q=F.scales[K].getLabelForValue(Number(F.scales[K].getValueForPixel($[K])));if((B=>B==="x"?$.y>X.x.top:$.x<X.y.right)(K))if(x.locked||(x.showTooltip=!1),Q.length>na){const N=F.canvas.getContext("2d").measureText(Q).width,tt=Math.abs(Math.round($.x-N*.5)),rt=Math.round($.x+N*.5);m.value.left=K==="x"?`${(tt>0?tt:rt)-m.value.offset}px`:`${$.x-N*.5-m.value.offset}px`,m.value.top=`${$.y-50}px`,m.value.show=!0,m.value.text=Q}else m.value.show=!1;else m.value.show=!1}}},{id:f,afterUpdate(F){F.options.layout.padding.right=v.value?L.value:0}},Vf,...e.annotations?[C]:[]],O=h.computed(()=>e.chartData.labels&&e.chartData.labels.length||0),A=h.computed(()=>{var E,$;let F=tD;if(l.value&&(F=l.value.width,l.value&&((E=e.chartData)!=null&&E.labels)&&(($=e.chartData)==null?void 0:$.labels.length)>sl&&!v.value)){const K=e.chartData.labels.length;F=`${l.value.offsetWidth+(K-sl)*eD}px`}return F}),R=h.computed(()=>{let F=parseInt(e.height,10);if(O.value&&v.value){const E=O.value*(JT+sD);F=Math.max(E,F)}return F});h.watch(()=>R.value,F=>{i("heightUpdate",F)}),St.useReportChartDataForSynthetics(h.toRef(e,"chartData"),h.toRef(e,"syntheticsDataKey")),h.onMounted(()=>{e.annotations&&Te.register(zf),window.requestAnimationFrame(()=>{i("heightUpdate",R.value)})});const W=h.computed(()=>{const F=St.useBarChartOptions({tooltipState:x,legendID:u.value,stacked:h.toRef(e,"stacked"),metricAxesTitle:h.toRef(e,"metricAxesTitle"),dimensionAxesTitle:h.toRef(e,"dimensionAxesTitle"),indexAxis:v.value?"y":"x",numLabels:O});return{...F.value,plugins:{...F.value.plugins,annotation:{annotations:_(),clip:!1}},layout:{autoPadding:!1,padding:{right:0,top:6*qf}}}}),V=St.useChartJSCommon("bar",l,h.toRef(e,"chartData"),D,W),L=h.computed(()=>{w.value;const F=e.chartData.labels,E=e.chartData.datasets,$=F.map((Q,at)=>E.reduce((B,N)=>isNaN(Number(N.data[at]))?B:B+Number(N.data[at]),0)),K=V.value?Yd(V.value,e.chartData):Kw(e.chartData);return $.map(Q=>Wd(Co(Q,y.value)+zd(Q,K))).reduce((Q,at)=>Math.max(Q,at),0)+qf});h.onBeforeUnmount(()=>{Te.unregister(zf)});const H={[Bt.Right]:"legend-row",[Bt.Bottom]:"column"},I=h.computed(()=>{if(c.value&&V.value){const F=window.devicePixelRatio,E=V.value,$=E.scales.y.width*F+aD,K=(E.scales.y.height+E.scales.y.top+E.scales.x.height)*F,X=c.value.getContext("2d");return X.scale(F,F),X.canvas.width=$,X.canvas.height=K,X.canvas.style.width=`${$/F}px`,X.canvas.style.height=`${K/F}px`,{scale:F,width:$*F,height:K*F,targetCtx:X}}return null}),et=F=>{if(I.value&&V.value){const E=I.value.scale,$=I.value.targetCtx,K=I.value.width,X=I.value.height,Q=V.value,at=Q.canvas,B=F.target;$.fillStyle="white",B.scrollLeft>=nD&&B.scrollLeft<=iD?($.globalCompositeOperation="source-over",$.clearRect(0,0,K,X),$.drawImage(at,0,0,K,X,0,0,K,X),$.globalCompositeOperation="destination-over",$.fillRect(0,0,K,X)):($.globalCompositeOperation="source-over",$.fillRect(0,(Q.scales.y.height+Q.scales.y.top+rD)*E,K,Q.scales.x.height*E)),x.offset=B.scrollLeft,m.value.offset=B.scrollLeft}},z=({width:F,height:E})=>{x.width=F,x.height=E};h.watch(()=>e.orientation,()=>{var F;if(c.value&&I.value){const E=I.value.width,$=I.value.height;((F=c.value)==null?void 0:F.getContext("2d")).clearRect(0,0,E,$)}x.showTooltip=!1,x.locked=!1}),h.watch(()=>e.annotations,F=>{V.value&&(F?V.value.options.plugins.annotation.annotations=_(e.chartData):delete V.value.options.plugins.annotation.annotations)});const Mt=()=>{x.showTooltip&&(x.locked=!x.locked)};return(F,E)=>(h.openBlock(),h.createElementBlock("div",{class:h.normalizeClass(["chart-parent",H[p.value]])},[h.createElementVNode("canvas",{ref_key:"axis",ref:c,class:"axis"},null,512),h.createElementVNode("div",{class:"chart-container",style:h.normalizeStyle({"overflow-x":O.value>sl?"auto":"hidden"}),"on:scroll":et,onClick:E[0]||(E[0]=$=>Mt())},[h.createElementVNode("div",{class:"chart-body",style:h.normalizeStyle({width:A.value})},[h.createElementVNode("canvas",{ref_key:"canvas",ref:l},null,512)],4)],36),m.value.show?(h.openBlock(),h.createElementBlock("div",{key:0,class:"axis-tooltip",style:h.normalizeStyle({top:m.value.top,left:m.value.left})},h.toDisplayString(m.value.text),5)):h.createCommentVNode("",!0),h.createVNode(rl,{context:x.tooltipContext,left:x.left,locked:x.locked,series:x.tooltipSeries,"show-tooltip":x.showTooltip,"tooltip-title":n.tooltipTitle,top:x.top,onDimensions:z},null,8,["context","left","locked","series","show-tooltip","tooltip-title","top"]),h.createVNode(al,{id:u.value,"chart-instance":h.unref(V),items:g.value},null,8,["id","chart-instance","items"])],2))}}),[["__scopeId","data-v-502e266a"]]);/*!
|
|
24
|
+
*/const af={modes:{point(n,t){return sa(n,t,{intersect:!0})},nearest(n,t,e){return a1(n,t,e)},x(n,t,e){return sa(n,t,{intersect:e.intersect,axis:"x"})},y(n,t,e){return sa(n,t,{intersect:e.intersect,axis:"y"})}}};function Yo(n,t,e){return(af.modes[e.mode]||af.modes.nearest)(n,t,e)}function i1(n,t,e){return e!=="x"&&e!=="y"?n.inRange(t.x,t.y,"x",!0)||n.inRange(t.x,t.y,"y",!0):n.inRange(t.x,t.y,e,!0)}function r1(n,t,e){return e==="x"?{x:n.x,y:t.y}:e==="y"?{x:t.x,y:n.y}:t}function sa(n,t,e){return n.visibleElements.filter(i=>e.intersect?i.inRange(t.x,t.y):i1(i,t,e.axis))}function a1(n,t,e){let i=Number.POSITIVE_INFINITY;return sa(n,t,e).reduce((r,a)=>{const s=a.getCenterPoint(),o=r1(t,s,e.axis),l=Gn(t,o);return l<i?(r=[a],i=l):l===i&&r.push(a),r},[]).sort((r,a)=>r._index-a._index).slice(0,1)}const s1=(n,t)=>t>n||n.length>t.length&&n.slice(0,t.length)===t,Wn=.001,oa=(n,t,e)=>Math.min(e,Math.max(t,n));function o1(n,t,e){for(const i of Object.keys(n))n[i]=oa(n[i],t,e);return n}function l1(n,t,e,i){if(!n||!t||e<=0)return!1;const r=i/2;return Math.pow(n.x-t.x,2)+Math.pow(n.y-t.y,2)<=Math.pow(e+r,2)}function sf(n,{x:t,y:e,x2:i,y2:r},a,s){const o=s/2,l=n.x>=t-o-Wn&&n.x<=i+o+Wn,c=n.y>=e-o-Wn&&n.y<=r+o+Wn;return a==="x"?l:(a==="y"||l)&&c}function ci(n,t){const{centerX:e,centerY:i}=n.getProps(["centerX","centerY"],t);return{x:e,y:i}}function c1(n,t,e,i=!0){const r=e.split(".");let a=0;for(const s of t.split(".")){const o=r[a++];if(parseInt(s,10)<parseInt(o,10))break;if(s1(o,s)){if(i)throw new Error(`${n} v${e} is not supported. v${t} or newer is required.`);return!1}}return!0}const of=n=>typeof n=="string"&&n.endsWith("%"),lf=n=>parseFloat(n)/100,cf=n=>oa(lf(n),0,1),la=(n,t)=>({x:n,y:t,x2:n,y2:t,width:0,height:0}),u1={box:n=>la(n.centerX,n.centerY),ellipse:n=>({centerX:n.centerX,centerY:n.centerX,radius:0,width:0,height:0}),label:n=>la(n.centerX,n.centerY),line:n=>la(n.x,n.y),point:n=>({centerX:n.centerX,centerY:n.centerY,radius:0,width:0,height:0}),polygon:n=>la(n.centerX,n.centerY)};function zo(n,t){return t==="start"?0:t==="end"?n:of(t)?cf(t)*n:n/2}function bn(n,t,e=!0){return typeof t=="number"?t:of(t)?(e?cf(t):lf(t))*n:n}function d1(n,t){const{x:e,width:i}=n,r=t.textAlign;return r==="center"?e+i/2:r==="end"||r==="right"?e+i:e}function Ho(n,t="center"){return ct(n)?{x:nt(n.x,t),y:nt(n.y,t)}:(n=nt(n,t),{x:n,y:n})}function uf(n){return n&&(ue(n.xValue)||ue(n.yValue))}function nr(n,t,e){const i=e.init;if(i){if(i===!0)return ff(t,e)}else return;return f1(n,t,e)}function df(n,t,e){let i=!1;return t.forEach(r=>{de(n[r])?(i=!0,e[r]=n[r]):ue(e[r])&&delete e[r]}),i}function ff(n,t){const e=t.type||"line";return u1[e](n)}function f1(n,t,e){const i=xt(e.init,[{chart:n,properties:t,options:e}]);if(i===!0)return ff(t,e);if(ct(i))return i}const $o=new Map,h1=n=>isNaN(n)||n<=0,g1=n=>n.reduce(function(t,e){return t+=e.string,t},"");function ca(n){if(n&&typeof n=="object"){const t=n.toString();return t==="[object HTMLImageElement]"||t==="[object HTMLCanvasElement]"}}function jo(n,{x:t,y:e},i){i&&(n.translate(t,e),n.rotate(qt(i)),n.translate(-t,-e))}function vn(n,t){if(t&&t.borderWidth)return n.lineCap=t.borderCapStyle,n.setLineDash(t.borderDash),n.lineDashOffset=t.borderDashOffset,n.lineJoin=t.borderJoinStyle,n.lineWidth=t.borderWidth,n.strokeStyle=t.borderColor,!0}function ui(n,t){n.shadowColor=t.backgroundShadowColor,n.shadowBlur=t.shadowBlur,n.shadowOffsetX=t.shadowOffsetX,n.shadowOffsetY=t.shadowOffsetY}function Vo(n,t){const e=t.content;if(ca(e))return{width:bn(e.width,t.width),height:bn(e.height,t.height)};const i=t.font,r=yt(i)?i.map(l=>Et(l)):[Et(i)],a=t.textStrokeWidth,s=yt(e)?e:[e],o=s.join()+g1(r)+a+(n._measureText?"-spriting":"");return $o.has(o)||$o.set(o,v1(n,s,r,a)),$o.get(o)}function hf(n,t,e){const{x:i,y:r,width:a,height:s}=t;n.save(),ui(n,e);const o=vn(n,e);n.fillStyle=e.backgroundColor,n.beginPath(),Kn(n,{x:i,y:r,w:a,h:s,radius:o1(un(e.borderRadius),0,Math.min(a,s)/2)}),n.closePath(),n.fill(),o&&(n.shadowColor=e.borderShadowColor,n.stroke()),n.restore()}function p1(n,t,e){const i=e.content;if(ca(i)){n.save(),n.globalAlpha=_1(e.opacity,i.style.opacity),n.drawImage(i,t.x,t.y,t.width,t.height),n.restore();return}const r=yt(i)?i:[i],a=e.font,s=yt(a)?a.map(d=>Et(d)):[Et(a)],o=e.color,l=yt(o)?o:[o],c=d1(t,e),u=t.y+e.textStrokeWidth/2;n.save(),n.textBaseline="middle",n.textAlign=e.textAlign,m1(n,e)&&x1(n,{x:c,y:u},r,s),w1(n,{x:c,y:u},r,{fonts:s,colors:l}),n.restore()}function m1(n,t){if(t.textStrokeWidth>0)return n.lineJoin="round",n.miterLimit=2,n.lineWidth=t.textStrokeWidth,n.strokeStyle=t.textStrokeColor,!0}function y1(n,t,e,i){const{radius:r,options:a}=t,s=a.pointStyle,o=a.rotation;let l=(o||0)*Ia;if(ca(s)){n.save(),n.translate(e,i),n.rotate(l),n.drawImage(s,-s.width/2,-s.height/2,s.width,s.height),n.restore();return}h1(r)||b1(n,{x:e,y:i,radius:r,rotation:o,style:s,rad:l})}function b1(n,{x:t,y:e,radius:i,rotation:r,style:a,rad:s}){let o,l,c,u;switch(n.beginPath(),a){default:n.arc(t,e,i,0,kt),n.closePath();break;case"triangle":n.moveTo(t+Math.sin(s)*i,e-Math.cos(s)*i),s+=mr,n.lineTo(t+Math.sin(s)*i,e-Math.cos(s)*i),s+=mr,n.lineTo(t+Math.sin(s)*i,e-Math.cos(s)*i),n.closePath();break;case"rectRounded":u=i*.516,c=i-u,o=Math.cos(s+_e)*c,l=Math.sin(s+_e)*c,n.arc(t-o,e-l,u,s-dt,s-Pt),n.arc(t+l,e-o,u,s-Pt,s),n.arc(t+o,e+l,u,s,s+Pt),n.arc(t-l,e+o,u,s+Pt,s+dt),n.closePath();break;case"rect":if(!r){c=Math.SQRT1_2*i,n.rect(t-c,e-c,2*c,2*c);break}s+=_e;case"rectRot":o=Math.cos(s)*i,l=Math.sin(s)*i,n.moveTo(t-o,e-l),n.lineTo(t+l,e-o),n.lineTo(t+o,e+l),n.lineTo(t-l,e+o),n.closePath();break;case"crossRot":s+=_e;case"cross":o=Math.cos(s)*i,l=Math.sin(s)*i,n.moveTo(t-o,e-l),n.lineTo(t+o,e+l),n.moveTo(t+l,e-o),n.lineTo(t-l,e+o);break;case"star":o=Math.cos(s)*i,l=Math.sin(s)*i,n.moveTo(t-o,e-l),n.lineTo(t+o,e+l),n.moveTo(t+l,e-o),n.lineTo(t-l,e+o),s+=_e,o=Math.cos(s)*i,l=Math.sin(s)*i,n.moveTo(t-o,e-l),n.lineTo(t+o,e+l),n.moveTo(t+l,e-o),n.lineTo(t-l,e+o);break;case"line":o=Math.cos(s)*i,l=Math.sin(s)*i,n.moveTo(t-o,e-l),n.lineTo(t+o,e+l);break;case"dash":n.moveTo(t,e),n.lineTo(t+Math.cos(s)*i,e+Math.sin(s)*i);break}n.fill()}function v1(n,t,e,i){n.save();const r=t.length;let a=0,s=i;for(let o=0;o<r;o++){const l=e[Math.min(o,e.length-1)];n.font=l.string;const c=t[o];a=Math.max(a,n.measureText(c).width+i),s+=l.lineHeight}return n.restore(),{width:a,height:s}}function x1(n,{x:t,y:e},i,r){n.beginPath();let a=0;i.forEach(function(s,o){const l=r[Math.min(o,r.length-1)],c=l.lineHeight;n.font=l.string,n.strokeText(s,t,e+c/2+a),a+=c}),n.stroke()}function w1(n,{x:t,y:e},i,{fonts:r,colors:a}){let s=0;i.forEach(function(o,l){const c=a[Math.min(l,a.length-1)],u=r[Math.min(l,r.length-1)],d=u.lineHeight;n.beginPath(),n.font=u.string,n.fillStyle=c,n.fillText(o,t,e+d/2+s),s+=d,n.fill()})}function _1(n,t){const e=cn(n)?n:t;return cn(e)?oa(e,0,1):1}const gf={xScaleID:{min:"xMin",max:"xMax",start:"left",end:"right",startProp:"x",endProp:"x2"},yScaleID:{min:"yMin",max:"yMax",start:"bottom",end:"top",startProp:"y",endProp:"y2"}};function di(n,t,e){return t=typeof t=="number"?t:n.parse(t),Lt(t)?n.getPixelForValue(t):e}function Yn(n,t,e){const i=t[e];if(i||e==="scaleID")return i;const r=e.charAt(0),a=Object.values(n).filter(s=>s.axis&&s.axis===r);return a.length?a[0].id:r}function pf(n,t){if(n){const e=n.options.reverse,i=di(n,t.min,e?t.end:t.start),r=di(n,t.max,e?t.start:t.end);return{start:i,end:r}}}function mf(n,t){const{chartArea:e,scales:i}=n,r=i[Yn(i,t,"xScaleID")],a=i[Yn(i,t,"yScaleID")];let s=e.width/2,o=e.height/2;return r&&(s=di(r,t.xValue,r.left+r.width/2)),a&&(o=di(a,t.yValue,a.top+a.height/2)),{x:s,y:o}}function qo(n,t){const e=n.scales,i=e[Yn(e,t,"xScaleID")],r=e[Yn(e,t,"yScaleID")];if(!i&&!r)return{};let{left:a,right:s}=i||n.chartArea,{top:o,bottom:l}=r||n.chartArea;const c=vf(i,{min:t.xMin,max:t.xMax,start:a,end:s});a=c.start,s=c.end;const u=vf(r,{min:t.yMin,max:t.yMax,start:l,end:o});return o=u.start,l=u.end,{x:a,y:o,x2:s,y2:l,width:s-a,height:l-o,centerX:a+(s-a)/2,centerY:o+(l-o)/2}}function yf(n,t){if(!uf(t)){const e=qo(n,t);let i=t.radius;(!i||isNaN(i))&&(i=Math.min(e.width,e.height)/2,t.radius=i);const r=i*2,a=e.centerX+t.xAdjust,s=e.centerY+t.yAdjust;return{x:a-i,y:s-i,x2:a+i,y2:s+i,centerX:a,centerY:s,width:r,height:r,radius:i}}return D1(n,t)}function T1(n,t){const{scales:e,chartArea:i}=n,r=e[t.scaleID],a={x:i.left,y:i.top,x2:i.right,y2:i.bottom};return r?S1(r,a,t):M1(e,a,t),a}function bf(n,t){const e=qo(n,t);return e.initProperties=nr(n,e,t),e.elements=[{type:"label",optionScope:"label",properties:O1(n,e,t),initProperties:e.initProperties}],e}function D1(n,t){const e=mf(n,t),i=t.radius*2;return{x:e.x-t.radius+t.xAdjust,y:e.y-t.radius+t.yAdjust,x2:e.x+t.radius+t.xAdjust,y2:e.y+t.radius+t.yAdjust,centerX:e.x+t.xAdjust,centerY:e.y+t.yAdjust,radius:t.radius,width:i,height:i}}function vf(n,t){const e=pf(n,t)||t;return{start:Math.min(e.start,e.end),end:Math.max(e.start,e.end)}}function S1(n,t,e){const i=di(n,e.value,NaN),r=di(n,e.endValue,i);n.isHorizontal()?(t.x=i,t.x2=r):(t.y=i,t.y2=r)}function M1(n,t,e){for(const i of Object.keys(gf)){const r=n[Yn(n,e,i)];if(r){const{min:a,max:s,start:o,end:l,startProp:c,endProp:u}=gf[i],d=pf(r,{min:e[a],max:e[s],start:r[o],end:r[l]});t[c]=d.start,t[u]=d.end}}}function C1({properties:n,options:t},e,i,r){const{x:a,x2:s,width:o}=n;return xf({start:a,end:s,size:o,borderWidth:t.borderWidth},{position:i.x,padding:{start:r.left,end:r.right},adjust:t.label.xAdjust,size:e.width})}function k1({properties:n,options:t},e,i,r){const{y:a,y2:s,height:o}=n;return xf({start:a,end:s,size:o,borderWidth:t.borderWidth},{position:i.y,padding:{start:r.top,end:r.bottom},adjust:t.label.yAdjust,size:e.height})}function xf(n,t){const{start:e,end:i,borderWidth:r}=n,{position:a,padding:{start:s,end:o},adjust:l}=t,c=i-r-e-s-o-t.size;return e+r/2+l+zo(c,a)}function O1(n,t,e){const i=e.label;i.backgroundColor="transparent",i.callout.display=!1;const r=Ho(i.position),a=Xt(i.padding),s=Vo(n.ctx,i),o=C1({properties:t,options:e},s,r,a),l=k1({properties:t,options:e},s,r,a),c=s.width+a.width,u=s.height+a.height;return{x:o,y:l,x2:o+c,y2:l+u,width:c,height:u,centerX:o+c/2,centerY:l+u/2,rotation:i.rotation}}function zn(n,t,e){const i=Math.cos(e),r=Math.sin(e),a=t.x,s=t.y;return{x:a+i*(n.x-a)-r*(n.y-s),y:s+r*(n.x-a)+i*(n.y-s)}}const Xo=["enter","leave"],Go=Xo.concat("click");function P1(n,t,e){t.listened=df(e,Go,t.listeners),t.moveListened=!1,t._getElements=Yo,Xo.forEach(i=>{de(e[i])&&(t.moveListened=!0)}),(!t.listened||!t.moveListened)&&t.annotations.forEach(i=>{!t.listened&&de(i.click)&&(t.listened=!0),t.moveListened||Xo.forEach(r=>{de(i[r])&&(t.listened=!0,t.moveListened=!0)})})}function E1(n,t,e){if(n.listened)switch(t.type){case"mousemove":case"mouseout":return A1(n,t,e);case"click":return R1(n,t,e)}}function A1(n,t,e){if(!n.moveListened)return;let i;t.type==="mousemove"?i=Yo(n,t,e.interaction):i=[];const r=n.hovered;n.hovered=i;const a={state:n,event:t};let s=wf(a,"leave",r,i);return wf(a,"enter",i,r)||s}function wf({state:n,event:t},e,i,r){let a;for(const s of i)r.indexOf(s)<0&&(a=_f(s.options[e]||n.listeners[e],s,t)||a);return a}function R1(n,t,e){const i=n.listeners,r=Yo(n,t,e.interaction);let a;for(const s of r)a=_f(s.options.click||i.click,s,t)||a;return a}function _f(n,t,e){return xt(n,[t.$context,e])===!0}const ua=["afterDraw","beforeDraw"];function L1(n,t,e){const i=t.visibleElements;t.hooked=df(e,ua,t.hooks),t.hooked||i.forEach(r=>{t.hooked||ua.forEach(a=>{de(r.options[a])&&(t.hooked=!0)})})}function Tf(n,t,e){if(n.hooked){const i=t.options[e]||n.hooks[e];return xt(i,[t.$context])}}function I1(n,t,e){const i=W1(n.scales,t,e);let r=Df(t,i,"min","suggestedMin");r=Df(t,i,"max","suggestedMax")||r,r&&de(t.handleTickRangeOptions)&&t.handleTickRangeOptions()}function N1(n,t){for(const e of n)U1(e,t)}function Df(n,t,e,i){if(Lt(t[e])&&!F1(n.options,e,i)){const r=n[e]!==t[e];return n[e]=t[e],r}}function F1(n,t,e){return ue(n[t])||ue(n[e])}function U1(n,t){for(const e of["scaleID","xScaleID","yScaleID"]){const i=Yn(t,n,e);i&&!t[i]&&B1(n,e)&&console.warn(`No scale found with id '${i}' for annotation '${n.id}'`)}}function B1(n,t){if(t==="scaleID")return!0;const e=t.charAt(0);for(const i of["Min","Max","Value"])if(ue(n[e+i]))return!0;return!1}function W1(n,t,e){const i=t.axis,r=t.id,a=i+"ScaleID",s={min:nt(t.min,Number.NEGATIVE_INFINITY),max:nt(t.max,Number.POSITIVE_INFINITY)};for(const o of e)o.scaleID===r?Sf(o,t,["value","endValue"],s):Yn(n,o,a)===r&&Sf(o,t,[i+"Min",i+"Max",i+"Value"],s);return s}function Sf(n,t,e,i){for(const r of e){const a=n[r];if(ue(a)){const s=t.parse(a);i.min=Math.min(i.min,s),i.max=Math.max(i.max,s)}}}class fi extends te{inRange(t,e,i,r){const{x:a,y:s}=zn({x:t,y:e},this.getCenterPoint(r),qt(-this.options.rotation));return sf({x:a,y:s},this.getProps(["x","y","x2","y2"],r),i,this.options.borderWidth)}getCenterPoint(t){return ci(this,t)}draw(t){t.save(),jo(t,this.getCenterPoint(),this.options.rotation),hf(t,this,this.options),t.restore()}get label(){return this.elements&&this.elements[0]}resolveElementProperties(t,e){return bf(t,e)}}fi.id="boxAnnotation",fi.defaults={adjustScaleRange:!0,backgroundShadowColor:"transparent",borderCapStyle:"butt",borderDash:[],borderDashOffset:0,borderJoinStyle:"miter",borderRadius:0,borderShadowColor:"transparent",borderWidth:1,display:!0,init:void 0,label:{backgroundColor:"transparent",borderWidth:0,callout:{display:!1},color:"black",content:null,display:!1,drawTime:void 0,font:{family:void 0,lineHeight:void 0,size:void 0,style:void 0,weight:"bold"},height:void 0,opacity:void 0,padding:6,position:"center",rotation:void 0,textAlign:"start",textStrokeColor:void 0,textStrokeWidth:0,width:void 0,xAdjust:0,yAdjust:0,z:void 0},rotation:0,shadowBlur:0,shadowOffsetX:0,shadowOffsetY:0,xMax:void 0,xMin:void 0,xScaleID:void 0,yMax:void 0,yMin:void 0,yScaleID:void 0,z:0},fi.defaultRoutes={borderColor:"color",backgroundColor:"color"},fi.descriptors={label:{_fallback:!0}};const Mf=["left","bottom","top","right"];class ir extends te{inRange(t,e,i,r){const{x:a,y:s}=zn({x:t,y:e},this.getCenterPoint(r),qt(-this.rotation));return sf({x:a,y:s},this.getProps(["x","y","x2","y2"],r),i,this.options.borderWidth)}getCenterPoint(t){return ci(this,t)}draw(t){const e=this.options,i=!ue(this._visible)||this._visible;!e.display||!e.content||!i||(t.save(),jo(t,this.getCenterPoint(),this.rotation),z1(t,this),hf(t,this,e),p1(t,G1(this),e),t.restore())}resolveElementProperties(t,e){let i;if(uf(e))i=mf(t,e);else{const{centerX:o,centerY:l}=qo(t,e);i={x:o,y:l}}const r=Xt(e.padding),a=Vo(t.ctx,e),s=Y1(i,a,e,r);return{initProperties:nr(t,s,e),pointX:i.x,pointY:i.y,...s,rotation:e.rotation}}}ir.id="labelAnnotation",ir.defaults={adjustScaleRange:!0,backgroundColor:"transparent",backgroundShadowColor:"transparent",borderCapStyle:"butt",borderDash:[],borderDashOffset:0,borderJoinStyle:"miter",borderRadius:0,borderShadowColor:"transparent",borderWidth:0,callout:{borderCapStyle:"butt",borderColor:void 0,borderDash:[],borderDashOffset:0,borderJoinStyle:"miter",borderWidth:1,display:!1,margin:5,position:"auto",side:5,start:"50%"},color:"black",content:null,display:!0,font:{family:void 0,lineHeight:void 0,size:void 0,style:void 0,weight:void 0},height:void 0,init:void 0,opacity:void 0,padding:6,position:"center",rotation:0,shadowBlur:0,shadowOffsetX:0,shadowOffsetY:0,textAlign:"center",textStrokeColor:void 0,textStrokeWidth:0,width:void 0,xAdjust:0,xMax:void 0,xMin:void 0,xScaleID:void 0,xValue:void 0,yAdjust:0,yMax:void 0,yMin:void 0,yScaleID:void 0,yValue:void 0,z:0},ir.defaultRoutes={borderColor:"color"};function Y1(n,t,e,i){const r=t.width+i.width+e.borderWidth,a=t.height+i.height+e.borderWidth,s=Ho(e.position,"center"),o=Cf(n.x,r,e.xAdjust,s.x),l=Cf(n.y,a,e.yAdjust,s.y);return{x:o,y:l,x2:o+r,y2:l+a,width:r,height:a,centerX:o+r/2,centerY:l+a/2}}function Cf(n,t,e=0,i){return n-zo(t,i)+e}function z1(n,t){const{pointX:e,pointY:i,options:r}=t,a=r.callout,s=a&&a.display&&q1(t,a);if(!s||K1(t,a,s))return;if(n.save(),n.beginPath(),!vn(n,a))return n.restore();const{separatorStart:l,separatorEnd:c}=H1(t,s),{sideStart:u,sideEnd:d}=j1(t,s,l);(a.margin>0||r.borderWidth===0)&&(n.moveTo(l.x,l.y),n.lineTo(c.x,c.y)),n.moveTo(u.x,u.y),n.lineTo(d.x,d.y);const f=zn({x:e,y:i},t.getCenterPoint(),qt(-t.rotation));n.lineTo(f.x,f.y),n.stroke(),n.restore()}function H1(n,t){const{x:e,y:i,x2:r,y2:a}=n,s=$1(n,t);let o,l;return t==="left"||t==="right"?(o={x:e+s,y:i},l={x:o.x,y:a}):(o={x:e,y:i+s},l={x:r,y:o.y}),{separatorStart:o,separatorEnd:l}}function $1(n,t){const{width:e,height:i,options:r}=n,a=r.callout.margin+r.borderWidth/2;return t==="right"?e+a:t==="bottom"?i+a:-a}function j1(n,t,e){const{y:i,width:r,height:a,options:s}=n,o=s.callout.start,l=V1(t,s.callout);let c,u;return t==="left"||t==="right"?(c={x:e.x,y:i+bn(a,o)},u={x:c.x+l,y:c.y}):(c={x:e.x+bn(r,o),y:e.y},u={x:c.x,y:c.y+l}),{sideStart:c,sideEnd:u}}function V1(n,t){const e=t.side;return n==="left"||n==="top"?-e:e}function q1(n,t){const e=t.position;return Mf.includes(e)?e:X1(n,t)}function X1(n,t){const{x:e,y:i,x2:r,y2:a,width:s,height:o,pointX:l,pointY:c,centerX:u,centerY:d,rotation:f}=n,g={x:u,y:d},p=t.start,m=bn(s,p),y=bn(o,p),v=[e,e+m,e+m,r],x=[i+y,a,i,a],w=[];for(let _=0;_<4;_++){const S=zn({x:v[_],y:x[_]},g,qt(f));w.push({position:Mf[_],distance:Gn(S,{x:l,y:c})})}return w.sort((_,S)=>_.distance-S.distance)[0].position}function G1({x:n,y:t,width:e,height:i,options:r}){const a=r.borderWidth/2,s=Xt(r.padding);return{x:n+s.left+a,y:t+s.top+a,width:e-s.left-s.right-r.borderWidth,height:i-s.top-s.bottom-r.borderWidth}}function K1(n,t,e){const{pointX:i,pointY:r}=n,a=t.margin;let s=i,o=r;return e==="left"?s+=a:e==="right"?s-=a:e==="top"?o+=a:e==="bottom"&&(o-=a),n.inRange(s,o)}const Ko=(n,t,e)=>({x:n.x+e*(t.x-n.x),y:n.y+e*(t.y-n.y)}),Zo=(n,t,e)=>Ko(t,e,Math.abs((n-t.y)/(e.y-t.y))).x,kf=(n,t,e)=>Ko(t,e,Math.abs((n-t.x)/(e.x-t.x))).y,rr=n=>n*n,Z1=(n,t,{x:e,y:i,x2:r,y2:a},s)=>s==="y"?{start:Math.min(i,a),end:Math.max(i,a),value:t}:{start:Math.min(e,r),end:Math.max(e,r),value:n},Of=(n,t,e,i)=>(1-i)*(1-i)*n+2*(1-i)*i*t+i*i*e,Qo=(n,t,e,i)=>({x:Of(n.x,t.x,e.x,i),y:Of(n.y,t.y,e.y,i)}),Pf=(n,t,e,i)=>2*(1-i)*(t-n)+2*i*(e-t),Ef=(n,t,e,i)=>-Math.atan2(Pf(n.x,t.x,e.x,i),Pf(n.y,t.y,e.y,i))+.5*dt;class ar extends te{inRange(t,e,i,r){const a=this.options.borderWidth/2;if(i!=="x"&&i!=="y"){const s={mouseX:t,mouseY:e},{path:o,ctx:l}=this;if(o){vn(l,this.options);const{chart:u}=this.$context,d=t*u.currentDevicePixelRatio,f=e*u.currentDevicePixelRatio,g=l.isPointInStroke(o,d,f)||Jo(this,s,r);return l.restore(),g}const c=rr(a);return eT(this,s,c,r)||Jo(this,s,r)}return Q1(this,{mouseX:t,mouseY:e},i,{hBorderWidth:a,useFinalPosition:r})}getCenterPoint(t){return ci(this,t)}draw(t){const{x:e,y:i,x2:r,y2:a,cp:s,options:o}=this;if(t.save(),!vn(t,o))return t.restore();ui(t,o);const l=Math.sqrt(Math.pow(r-e,2)+Math.pow(a-i,2));if(o.curve&&s)return cT(t,this,s,l),t.restore();const{startOpts:c,endOpts:u,startAdjust:d,endAdjust:f}=Nf(this),g=Math.atan2(a-i,r-e);t.translate(e,i),t.rotate(g),t.beginPath(),t.moveTo(0+d,0),t.lineTo(l-f,0),t.shadowColor=o.borderShadowColor,t.stroke(),tl(t,0,d,c),tl(t,l,-f,u),t.restore()}get label(){return this.elements&&this.elements[0]}resolveElementProperties(t,e){const i=T1(t,e),{x:r,y:a,x2:s,y2:o}=i,l=J1(i,t.chartArea),c=l?tT({x:r,y:a},{x:s,y:o},t.chartArea):{x:r,y:a,x2:s,y2:o,width:Math.abs(s-r),height:Math.abs(o-a)};if(c.centerX=(s+r)/2,c.centerY=(o+a)/2,c.initProperties=nr(t,c,e),e.curve){const d={x:c.x,y:c.y},f={x:c.x2,y:c.y2};c.cp=lT(c,e,Gn(d,f))}const u=nT(t,c,e.label);return u._visible=l,c.elements=[{type:"label",optionScope:"label",properties:u,initProperties:c.initProperties}],c}}ar.id="lineAnnotation";const Af={backgroundColor:void 0,backgroundShadowColor:void 0,borderColor:void 0,borderDash:void 0,borderDashOffset:void 0,borderShadowColor:void 0,borderWidth:void 0,display:void 0,fill:void 0,length:void 0,shadowBlur:void 0,shadowOffsetX:void 0,shadowOffsetY:void 0,width:void 0};ar.defaults={adjustScaleRange:!0,arrowHeads:{display:!1,end:Object.assign({},Af),fill:!1,length:12,start:Object.assign({},Af),width:6},borderDash:[],borderDashOffset:0,borderShadowColor:"transparent",borderWidth:2,curve:!1,controlPoint:{y:"-50%"},display:!0,endValue:void 0,init:void 0,label:{backgroundColor:"rgba(0,0,0,0.8)",backgroundShadowColor:"transparent",borderCapStyle:"butt",borderColor:"black",borderDash:[],borderDashOffset:0,borderJoinStyle:"miter",borderRadius:6,borderShadowColor:"transparent",borderWidth:0,callout:Object.assign({},ir.defaults.callout),color:"#fff",content:null,display:!1,drawTime:void 0,font:{family:void 0,lineHeight:void 0,size:void 0,style:void 0,weight:"bold"},height:void 0,opacity:void 0,padding:6,position:"center",rotation:0,shadowBlur:0,shadowOffsetX:0,shadowOffsetY:0,textAlign:"center",textStrokeColor:void 0,textStrokeWidth:0,width:void 0,xAdjust:0,yAdjust:0,z:void 0},scaleID:void 0,shadowBlur:0,shadowOffsetX:0,shadowOffsetY:0,value:void 0,xMax:void 0,xMin:void 0,xScaleID:void 0,yMax:void 0,yMin:void 0,yScaleID:void 0,z:0},ar.descriptors={arrowHeads:{start:{_fallback:!0},end:{_fallback:!0},_fallback:!0}},ar.defaultRoutes={borderColor:"color"};function Q1(n,{mouseX:t,mouseY:e},i,{hBorderWidth:r,useFinalPosition:a}){const s=Z1(t,e,n.getProps(["x","y","x2","y2"],a),i);return s.value>=s.start-r&&s.value<=s.end+r||Jo(n,{mouseX:t,mouseY:e},a,i)}function J1({x:n,y:t,x2:e,y2:i},{top:r,right:a,bottom:s,left:o}){return!(n<o&&e<o||n>a&&e>a||t<r&&i<r||t>s&&i>s)}function Rf({x:n,y:t},e,{top:i,right:r,bottom:a,left:s}){return n<s&&(t=kf(s,{x:n,y:t},e),n=s),n>r&&(t=kf(r,{x:n,y:t},e),n=r),t<i&&(n=Zo(i,{x:n,y:t},e),t=i),t>a&&(n=Zo(a,{x:n,y:t},e),t=a),{x:n,y:t}}function tT(n,t,e){const{x:i,y:r}=Rf(n,t,e),{x:a,y:s}=Rf(t,n,e);return{x:i,y:r,x2:a,y2:s,width:Math.abs(a-i),height:Math.abs(s-r)}}function eT(n,{mouseX:t,mouseY:e},i=Wn,r){const{x:a,y:s,x2:o,y2:l}=n.getProps(["x","y","x2","y2"],r),c=o-a,u=l-s,d=rr(c)+rr(u),f=d===0?-1:((t-a)*c+(e-s)*u)/d;let g,p;return f<0?(g=a,p=s):f>1?(g=o,p=l):(g=a+f*c,p=s+f*u),rr(t-g)+rr(e-p)<=i}function Jo(n,{mouseX:t,mouseY:e},i,r){const a=n.label;return a.options.display&&a.inRange(t,e,r,i)}function nT(n,t,e){const i=e.borderWidth,r=Xt(e.padding),a=Vo(n.ctx,e),s=a.width+r.width+i,o=a.height+r.height+i;return rT(t,e,{width:s,height:o,padding:r},n.chartArea)}function iT(n){const{x:t,y:e,x2:i,y2:r}=n,a=Math.atan2(r-e,i-t);return a>dt/2?a-dt:a<dt/-2?a+dt:a}function rT(n,t,e,i){const{width:r,height:a,padding:s}=e,{xAdjust:o,yAdjust:l}=t,c={x:n.x,y:n.y},u={x:n.x2,y:n.y2},d=t.rotation==="auto"?iT(n):qt(t.rotation),f=aT(r,a,d),g=sT(n,t,{labelSize:f,padding:s},i),p=n.cp?Qo(c,n.cp,u,g):Ko(c,u,g),m={size:f.w,min:i.left,max:i.right,padding:s.left},y={size:f.h,min:i.top,max:i.bottom,padding:s.top},v=If(p.x,m)+o,x=If(p.y,y)+l;return{x:v-r/2,y:x-a/2,x2:v+r/2,y2:x+a/2,centerX:v,centerY:x,pointX:p.x,pointY:p.y,width:r,height:a,rotation:yr(d)}}function aT(n,t,e){const i=Math.cos(e),r=Math.sin(e);return{w:Math.abs(n*i)+Math.abs(t*r),h:Math.abs(n*r)+Math.abs(t*i)}}function sT(n,t,e,i){let r;const a=oT(n,i);return t.position==="start"?r=Lf({w:n.x2-n.x,h:n.y2-n.y},e,t,a):t.position==="end"?r=1-Lf({w:n.x-n.x2,h:n.y-n.y2},e,t,a):r=zo(1,t.position),r}function Lf(n,t,e,i){const{labelSize:r,padding:a}=t,s=n.w*i.dx,o=n.h*i.dy,l=s>0&&(r.w/2+a.left-i.x)/s,c=o>0&&(r.h/2+a.top-i.y)/o;return oa(Math.max(l,c),0,.25)}function oT(n,t){const{x:e,x2:i,y:r,y2:a}=n,s=Math.min(r,a)-t.top,o=Math.min(e,i)-t.left,l=t.bottom-Math.max(r,a),c=t.right-Math.max(e,i);return{x:Math.min(o,c),y:Math.min(s,l),dx:o<=c?1:-1,dy:s<=l?1:-1}}function If(n,t){const{size:e,min:i,max:r,padding:a}=t,s=e/2;return e>r-i?(r+i)/2:(i>=n-a-s&&(n=i+a+s),r<=n+a+s&&(n=r-a-s),n)}function Nf(n){const t=n.options,e=t.arrowHeads&&t.arrowHeads.start,i=t.arrowHeads&&t.arrowHeads.end;return{startOpts:e,endOpts:i,startAdjust:Ff(n,e),endAdjust:Ff(n,i)}}function Ff(n,t){if(!t||!t.display)return 0;const{length:e,width:i}=t,r=n.options.borderWidth/2,a={x:e,y:i+r};return Math.abs(Zo(0,a,{x:0,y:r}))}function tl(n,t,e,i){if(!i||!i.display)return;const{length:r,width:a,fill:s,backgroundColor:o,borderColor:l}=i,c=Math.abs(t-r)+e;n.beginPath(),ui(n,i),vn(n,i),n.moveTo(c,-a),n.lineTo(t+e,0),n.lineTo(c,a),s===!0?(n.fillStyle=o||l,n.closePath(),n.fill(),n.shadowColor="transparent"):n.shadowColor=i.borderShadowColor,n.stroke()}function lT(n,t,e){const{x:i,y:r,x2:a,y2:s,centerX:o,centerY:l}=n,c=Math.atan2(s-r,a-i),u=Ho(t.controlPoint,0),d={x:o+bn(e,u.x,!1),y:l+bn(e,u.y,!1)};return zn(d,{x:o,y:l},c)}function Uf(n,{x:t,y:e},{angle:i,adjust:r},a){!a||!a.display||(n.save(),n.translate(t,e),n.rotate(i),tl(n,0,-r,a),n.restore())}function cT(n,t,e,i){const{x:r,y:a,x2:s,y2:o,options:l}=t,{startOpts:c,endOpts:u,startAdjust:d,endAdjust:f}=Nf(t),g={x:r,y:a},p={x:s,y:o},m=Ef(g,e,p,0),y=Ef(g,e,p,1)-dt,v=Qo(g,e,p,d/i),x=Qo(g,e,p,1-f/i),w=new Path2D;n.beginPath(),w.moveTo(v.x,v.y),w.quadraticCurveTo(e.x,e.y,x.x,x.y),n.shadowColor=l.borderShadowColor,n.stroke(w),t.path=w,t.ctx=n,Uf(n,v,{angle:m,adjust:d},c),Uf(n,x,{angle:y,adjust:f},u)}class sr extends te{inRange(t,e,i,r){const a=this.options.rotation,s=this.options.borderWidth;if(i!=="x"&&i!=="y")return uT({x:t,y:e},this.getProps(["width","height","centerX","centerY"],r),a,s);const{x:o,y:l,x2:c,y2:u}=this.getProps(["x","y","x2","y2"],r),d=s/2,f=i==="y"?{start:l,end:u}:{start:o,end:c},g=zn({x:t,y:e},this.getCenterPoint(r),qt(-a));return g[i]>=f.start-d-Wn&&g[i]<=f.end+d+Wn}getCenterPoint(t){return ci(this,t)}draw(t){const{width:e,height:i,centerX:r,centerY:a,options:s}=this;t.save(),jo(t,this.getCenterPoint(),s.rotation),ui(t,this.options),t.beginPath(),t.fillStyle=s.backgroundColor;const o=vn(t,s);t.ellipse(r,a,i/2,e/2,dt/2,0,2*dt),t.fill(),o&&(t.shadowColor=s.borderShadowColor,t.stroke()),t.restore()}get label(){return this.elements&&this.elements[0]}resolveElementProperties(t,e){return bf(t,e)}}sr.id="ellipseAnnotation",sr.defaults={adjustScaleRange:!0,backgroundShadowColor:"transparent",borderDash:[],borderDashOffset:0,borderShadowColor:"transparent",borderWidth:1,display:!0,init:void 0,label:Object.assign({},fi.defaults.label),rotation:0,shadowBlur:0,shadowOffsetX:0,shadowOffsetY:0,xMax:void 0,xMin:void 0,xScaleID:void 0,yMax:void 0,yMin:void 0,yScaleID:void 0,z:0},sr.defaultRoutes={borderColor:"color",backgroundColor:"color"},sr.descriptors={label:{_fallback:!0}};function uT(n,t,e,i){const{width:r,height:a,centerX:s,centerY:o}=t,l=r/2,c=a/2;if(l<=0||c<=0)return!1;const u=qt(e||0),d=i/2||0,f=Math.cos(u),g=Math.sin(u),p=Math.pow(f*(n.x-s)+g*(n.y-o),2),m=Math.pow(g*(n.x-s)-f*(n.y-o),2);return p/Math.pow(l+d,2)+m/Math.pow(c+d,2)<=1.0001}class da extends te{inRange(t,e,i,r){const{x:a,y:s,x2:o,y2:l,width:c}=this.getProps(["x","y","x2","y2","width"],r),u=this.options.borderWidth;if(i!=="x"&&i!=="y")return l1({x:t,y:e},this.getCenterPoint(r),c/2,u);const d=u/2,f=i==="y"?{start:s,end:l,value:e}:{start:a,end:o,value:t};return f.value>=f.start-d&&f.value<=f.end+d}getCenterPoint(t){return ci(this,t)}draw(t){const e=this.options,i=e.borderWidth;if(e.radius<.1)return;t.save(),t.fillStyle=e.backgroundColor,ui(t,e);const r=vn(t,e);y1(t,this,this.centerX,this.centerY),r&&!ca(e.pointStyle)&&(t.shadowColor=e.borderShadowColor,t.stroke()),t.restore(),e.borderWidth=i}resolveElementProperties(t,e){const i=yf(t,e);return i.initProperties=nr(t,i,e),i}}da.id="pointAnnotation",da.defaults={adjustScaleRange:!0,backgroundShadowColor:"transparent",borderDash:[],borderDashOffset:0,borderShadowColor:"transparent",borderWidth:1,display:!0,init:void 0,pointStyle:"circle",radius:10,rotation:0,shadowBlur:0,shadowOffsetX:0,shadowOffsetY:0,xAdjust:0,xMax:void 0,xMin:void 0,xScaleID:void 0,xValue:void 0,yAdjust:0,yMax:void 0,yMin:void 0,yScaleID:void 0,yValue:void 0,z:0},da.defaultRoutes={borderColor:"color",backgroundColor:"color"};class fa extends te{inRange(t,e,i,r){if(i!=="x"&&i!=="y")return this.options.radius>=.1&&this.elements.length>1&&fT(this.elements,t,e,r);const a=zn({x:t,y:e},this.getCenterPoint(r),qt(-this.options.rotation)),s=this.elements.map(c=>i==="y"?c.bY:c.bX),o=Math.min(...s),l=Math.max(...s);return a[i]>=o&&a[i]<=l}getCenterPoint(t){return ci(this,t)}draw(t){const{elements:e,options:i}=this;t.save(),t.beginPath(),t.fillStyle=i.backgroundColor,ui(t,i);const r=vn(t,i);let a=!0;for(const s of e)a?(t.moveTo(s.x,s.y),a=!1):t.lineTo(s.x,s.y);t.closePath(),t.fill(),r&&(t.shadowColor=i.borderShadowColor,t.stroke()),t.restore()}resolveElementProperties(t,e){const i=yf(t,e),{sides:r,rotation:a}=e,s=[],o=2*dt/r;let l=a*Ia;for(let c=0;c<r;c++,l+=o){const u=dT(i,e,l);u.initProperties=nr(t,i,e),s.push(u)}return i.elements=s,i}}fa.id="polygonAnnotation",fa.defaults={adjustScaleRange:!0,backgroundShadowColor:"transparent",borderCapStyle:"butt",borderDash:[],borderDashOffset:0,borderJoinStyle:"miter",borderShadowColor:"transparent",borderWidth:1,display:!0,init:void 0,point:{radius:0},radius:10,rotation:0,shadowBlur:0,shadowOffsetX:0,shadowOffsetY:0,sides:3,xAdjust:0,xMax:void 0,xMin:void 0,xScaleID:void 0,xValue:void 0,yAdjust:0,yMax:void 0,yMin:void 0,yScaleID:void 0,yValue:void 0,z:0},fa.defaultRoutes={borderColor:"color",backgroundColor:"color"};function dT({centerX:n,centerY:t},{radius:e,borderWidth:i},r){const a=i/2,s=Math.sin(r),o=Math.cos(r),l={x:n+s*e,y:t-o*e};return{type:"point",optionScope:"point",properties:{x:l.x,y:l.y,centerX:l.x,centerY:l.y,bX:n+s*(e+a),bY:t-o*(e+a)}}}function fT(n,t,e,i){let r=!1,a=n[n.length-1].getProps(["bX","bY"],i);for(const s of n){const o=s.getProps(["bX","bY"],i);o.bY>e!=a.bY>e&&t<(a.bX-o.bX)*(e-o.bY)/(a.bY-o.bY)+o.bX&&(r=!r),a=o}return r}const xn={box:fi,ellipse:sr,label:ir,line:ar,point:da,polygon:fa};Object.keys(xn).forEach(n=>{Ft.describe(`elements.${xn[n].id}`,{_fallback:"plugins.annotation.common"})});const hT={update:Object.assign},gT=Go.concat(ua),Bf=(n,t)=>ct(t)?il(n,t):n,el=n=>n==="color"||n==="font";function nl(n="line"){return xn[n]?n:(console.warn(`Unknown annotation type: '${n}', defaulting to 'line'`),"line")}function pT(n,t,e,i){const r=yT(n,e.animations,i),a=t.annotations,s=xT(t.elements,a);for(let o=0;o<a.length;o++){const l=a[o],c=Wf(s,o,l.type),u=l.setContext(vT(n,c,l)),d=c.resolveElementProperties(n,u);d.skip=mT(d),"elements"in d&&(bT(c,d.elements,u,r),delete d.elements),ue(c.x)||Object.assign(c,d),Object.assign(c,d.initProperties),d.options=Yf(u),r.update(c,d)}}function mT(n){return isNaN(n.x)||isNaN(n.y)}function yT(n,t,e){return e==="reset"||e==="none"||e==="resize"?hT:new Ga(n,t)}function bT(n,t,e,i){const r=n.elements||(n.elements=[]);r.length=t.length;for(let a=0;a<t.length;a++){const s=t[a],o=s.properties,l=Wf(r,a,s.type,s.initProperties),c=e[s.optionScope].override(s);o.options=Yf(c),i.update(l,o)}}function Wf(n,t,e,i){const r=xn[nl(e)];let a=n[t];return(!a||!(a instanceof r))&&(a=n[t]=new r,Object.assign(a,i)),a}function Yf(n){const t=xn[nl(n.type)],e={};e.id=n.id,e.type=n.type,e.drawTime=n.drawTime,Object.assign(e,il(n,t.defaults),il(n,t.defaultRoutes));for(const i of gT)e[i]=n[i];return e}function il(n,t){const e={};for(const i of Object.keys(t)){const r=t[i],a=n[i];el(i)&&yt(a)?e[i]=a.map(s=>Bf(s,r)):e[i]=Bf(a,r)}return e}function vT(n,t,e){return t.$context||(t.$context=Object.assign(Object.create(n.getContext()),{element:t,id:e.id,type:"annotation"}))}function xT(n,t){const e=t.length,i=n.length;if(i<e){const r=e-i;n.splice(i,0,...new Array(r))}else i>e&&n.splice(e,i-e);return n}var wT="3.0.1";const wn=new Map,_T=Go.concat(ua);var zf={id:"annotation",version:wT,beforeRegister(){c1("chart.js","4.0",Te.version)},afterRegister(){Te.register(xn)},afterUnregister(){Te.unregister(xn)},beforeInit(n){wn.set(n,{annotations:[],elements:[],visibleElements:[],listeners:{},listened:!1,moveListened:!1,hooks:{},hooked:!1,hovered:[]})},beforeUpdate(n,t,e){const i=wn.get(n),r=i.annotations=[];let a=e.annotations;ct(a)?Object.keys(a).forEach(s=>{const o=a[s];ct(o)&&(o.id=s,r.push(o))}):yt(a)&&r.push(...a),N1(r,n.scales)},afterDataLimits(n,t){const e=wn.get(n);I1(n,t.scale,e.annotations.filter(i=>i.display&&i.adjustScaleRange))},afterUpdate(n,t,e){const i=wn.get(n);P1(n,i,e),pT(n,i,e,t.mode),i.visibleElements=i.elements.filter(r=>!r.skip&&r.options.display),L1(n,i,e)},beforeDatasetsDraw(n,t,e){ha(n,"beforeDatasetsDraw",e.clip)},afterDatasetsDraw(n,t,e){ha(n,"afterDatasetsDraw",e.clip)},beforeDraw(n,t,e){ha(n,"beforeDraw",e.clip)},afterDraw(n,t,e){ha(n,"afterDraw",e.clip)},beforeEvent(n,t,e){const i=wn.get(n);E1(i,t.event,e)&&(t.changed=!0)},afterDestroy(n){wn.delete(n)},_getState(n){return wn.get(n)},defaults:{animations:{numbers:{properties:["x","y","x2","y2","width","height","centerX","centerY","pointX","pointY","radius"],type:"number"}},clip:!0,interaction:{mode:void 0,axis:void 0,intersect:void 0},common:{drawTime:"afterDatasetsDraw",init:!1,label:{}}},descriptors:{_indexable:!1,_scriptable:n=>!_T.includes(n)&&n!=="init",annotations:{_allKeys:!1,_fallback:(n,t)=>`elements.${xn[nl(t.type)].id}`},interaction:{_fallback:!0},common:{label:{_indexable:el,_fallback:!0},_indexable:el}},additionalOptionScopes:[""]};function ha(n,t,e){const{ctx:i,chartArea:r}=n,a=wn.get(n);e&&Mi(i,r);const s=TT(a.visibleElements,t).sort((o,l)=>o.element.options.z-l.element.options.z);for(const o of s)DT(i,r,a,o);e&&Ci(i)}function TT(n,t){const e=[];for(const i of n)if(i.options.drawTime===t&&e.push({element:i,main:!0}),i.elements&&i.elements.length)for(const r of i.elements)r.options.display&&r.options.drawTime===t&&e.push({element:r});return e}function DT(n,t,e,i){const r=i.element;i.main?(Tf(e,r,"beforeDraw"),r.draw(n,t),Tf(e,r,"afterDraw")):r.draw(n,t)}const ga="24px",Hf=(n,t)=>{const e=n.__vccOpts||n;for(const[i,r]of t)e[i]=r;return e},ST=n=>(h.pushScopeId("data-v-bcbde7a2"),n=n(),h.popScopeId(),n),MT=["aria-hidden"],CT={key:0,"data-testid":"kui-icon-svg-title"},kT=ST(()=>h.createElementVNode("path",{d:"M9 20C8.45 20 7.97917 19.8042 7.5875 19.4125C7.19583 19.0208 7 18.55 7 18C7 17.45 7.19583 16.9792 7.5875 16.5875C7.97917 16.1958 8.45 16 9 16C9.55 16 10.0208 16.1958 10.4125 16.5875C10.8042 16.9792 11 17.45 11 18C11 18.55 10.8042 19.0208 10.4125 19.4125C10.0208 19.8042 9.55 20 9 20ZM15 20C14.45 20 13.9792 19.8042 13.5875 19.4125C13.1958 19.0208 13 18.55 13 18C13 17.45 13.1958 16.9792 13.5875 16.5875C13.9792 16.1958 14.45 16 15 16C15.55 16 16.0208 16.1958 16.4125 16.5875C16.8042 16.9792 17 17.45 17 18C17 18.55 16.8042 19.0208 16.4125 19.4125C16.0208 19.8042 15.55 20 15 20ZM9 14C8.45 14 7.97917 13.8042 7.5875 13.4125C7.19583 13.0208 7 12.55 7 12C7 11.45 7.19583 10.9792 7.5875 10.5875C7.97917 10.1958 8.45 10 9 10C9.55 10 10.0208 10.1958 10.4125 10.5875C10.8042 10.9792 11 11.45 11 12C11 12.55 10.8042 13.0208 10.4125 13.4125C10.0208 13.8042 9.55 14 9 14ZM15 14C14.45 14 13.9792 13.8042 13.5875 13.4125C13.1958 13.0208 13 12.55 13 12C13 11.45 13.1958 10.9792 13.5875 10.5875C13.9792 10.1958 14.45 10 15 10C15.55 10 16.0208 10.1958 16.4125 10.5875C16.8042 10.9792 17 11.45 17 12C17 12.55 16.8042 13.0208 16.4125 13.4125C16.0208 13.8042 15.55 14 15 14ZM9 8C8.45 8 7.97917 7.80417 7.5875 7.4125C7.19583 7.02083 7 6.55 7 6C7 5.45 7.19583 4.97917 7.5875 4.5875C7.97917 4.19583 8.45 4 9 4C9.55 4 10.0208 4.19583 10.4125 4.5875C10.8042 4.97917 11 5.45 11 6C11 6.55 10.8042 7.02083 10.4125 7.4125C10.0208 7.80417 9.55 8 9 8ZM15 8C14.45 8 13.9792 7.80417 13.5875 7.4125C13.1958 7.02083 13 6.55 13 6C13 5.45 13.1958 4.97917 13.5875 4.5875C13.9792 4.19583 14.45 4 15 4C15.55 4 16.0208 4.19583 16.4125 4.5875C16.8042 4.97917 17 5.45 17 6C17 6.55 16.8042 7.02083 16.4125 7.4125C16.0208 7.80417 15.55 8 15 8Z",fill:"currentColor"},null,-1)),OT=h.defineComponent({__name:"DragIcon",props:{title:{type:String,required:!1,default:""},color:{type:String,required:!1,default:"currentColor"},display:{type:String,required:!1,default:"block"},decorative:{type:Boolean,required:!1,default:!1},size:{type:[Number,String],required:!1,default:ga,validator:n=>{if(typeof n=="number"&&n>0)return!0;if(typeof n=="string"){const t=String(n).replace(/px/gi,""),e=Number(t);if(e&&!isNaN(e)&&Number.isInteger(e)&&e>0)return!0}return!1}},as:{type:String,required:!1,default:"span"}},setup(n){const t=n,e=h.computed(()=>{if(typeof t.size=="number"&&t.size>0)return`${t.size}px`;if(typeof t.size=="string"){const r=String(t.size).replace(/px/gi,""),a=Number(r);if(a&&!isNaN(a)&&Number.isInteger(a)&&a>0)return`${a}px`}return ga}),i=h.computed(()=>({boxSizing:"border-box",color:t.color,display:t.display,height:e.value,lineHeight:"0",width:e.value}));return(r,a)=>(h.openBlock(),h.createBlock(h.resolveDynamicComponent(n.as),{"aria-hidden":n.decorative?"true":void 0,class:"kui-icon drag-icon","data-testid":"kui-icon-wrapper-drag-icon",style:h.normalizeStyle(i.value)},{default:h.withCtx(()=>[(h.openBlock(),h.createElementBlock("svg",{"aria-hidden":n.decorative?"true":void 0,"data-testid":"kui-icon-svg-drag-icon",fill:"none",height:"100%",role:"img",viewBox:"0 0 24 24",width:"100%",xmlns:"http://www.w3.org/2000/svg"},[n.title?(h.openBlock(),h.createElementBlock("title",CT,h.toDisplayString(n.title),1)):h.createCommentVNode("",!0),kT],8,MT))]),_:1},8,["aria-hidden","style"]))}}),PT=Hf(OT,[["__scopeId","data-v-bcbde7a2"]]),ET=n=>(h.pushScopeId("data-v-755ff393"),n=n(),h.popScopeId(),n),AT=["aria-hidden"],RT={key:0,"data-testid":"kui-icon-svg-title"},LT=ET(()=>h.createElementVNode("path",{d:"M12.025 22.05C11.7583 22.05 11.5042 22 11.2625 21.9C11.0208 21.8 10.8 21.6583 10.6 21.475L2.575 13.45C2.39167 13.25 2.25 13.0292 2.15 12.7875C2.05 12.5458 2 12.2917 2 12.025C2 11.7583 2.05 11.5 2.15 11.25C2.25 11 2.39167 10.7833 2.575 10.6L10.6 2.575C10.8 2.375 11.0208 2.22917 11.2625 2.1375C11.5042 2.04583 11.7583 2 12.025 2C12.2917 2 12.55 2.04583 12.8 2.1375C13.05 2.22917 13.2667 2.375 13.45 2.575L21.475 10.6C21.675 10.7833 21.8208 11 21.9125 11.25C22.0042 11.5 22.05 11.7583 22.05 12.025C22.05 12.2917 22.0042 12.5458 21.9125 12.7875C21.8208 13.0292 21.675 13.25 21.475 13.45L13.45 21.475C13.2667 21.6583 13.05 21.8 12.8 21.9C12.55 22 12.2917 22.05 12.025 22.05ZM11.025 13.025H13.025V7.025H11.025V13.025ZM12.025 16.025C12.3083 16.025 12.5458 15.9292 12.7375 15.7375C12.9292 15.5458 13.025 15.3083 13.025 15.025C13.025 14.7417 12.9292 14.5042 12.7375 14.3125C12.5458 14.1208 12.3083 14.025 12.025 14.025C11.7417 14.025 11.5042 14.1208 11.3125 14.3125C11.1208 14.5042 11.025 14.7417 11.025 15.025C11.025 15.3083 11.1208 15.5458 11.3125 15.7375C11.5042 15.9292 11.7417 16.025 12.025 16.025Z",fill:"currentColor"},null,-1)),IT=h.defineComponent({__name:"WarningIcon",props:{title:{type:String,required:!1,default:""},color:{type:String,required:!1,default:"currentColor"},display:{type:String,required:!1,default:"block"},decorative:{type:Boolean,required:!1,default:!1},size:{type:[Number,String],required:!1,default:ga,validator:n=>{if(typeof n=="number"&&n>0)return!0;if(typeof n=="string"){const t=String(n).replace(/px/gi,""),e=Number(t);if(e&&!isNaN(e)&&Number.isInteger(e)&&e>0)return!0}return!1}},as:{type:String,required:!1,default:"span"}},setup(n){const t=n,e=h.computed(()=>{if(typeof t.size=="number"&&t.size>0)return`${t.size}px`;if(typeof t.size=="string"){const r=String(t.size).replace(/px/gi,""),a=Number(r);if(a&&!isNaN(a)&&Number.isInteger(a)&&a>0)return`${a}px`}return ga}),i=h.computed(()=>({boxSizing:"border-box",color:t.color,display:t.display,height:e.value,lineHeight:"0",width:e.value}));return(r,a)=>(h.openBlock(),h.createBlock(h.resolveDynamicComponent(n.as),{"aria-hidden":n.decorative?"true":void 0,class:"kui-icon warning-icon","data-testid":"kui-icon-wrapper-warning-icon",style:h.normalizeStyle(i.value)},{default:h.withCtx(()=>[(h.openBlock(),h.createElementBlock("svg",{"aria-hidden":n.decorative?"true":void 0,"data-testid":"kui-icon-svg-warning-icon",fill:"none",height:"100%",role:"img",viewBox:"0 0 24 24",width:"100%",xmlns:"http://www.w3.org/2000/svg"},[n.title?(h.openBlock(),h.createElementBlock("title",RT,h.toDisplayString(n.title),1)):h.createCommentVNode("",!0),LT],8,AT))]),_:1},8,["aria-hidden","style"]))}}),NT=Hf(IT,[["__scopeId","data-v-755ff393"]]),FT="#6c7489",UT="#995c00",BT="20px",WT="40px",YT={class:"tooltip-title"},zT={class:"title font-bold"},HT={key:1,class:"subtitle"},$T={class:"tooltip"},jT={key:0},VT={class:"display-label"},qT={class:"display-value"},XT=h.defineComponent({__name:"ChartTooltip",props:{showTooltip:{type:Boolean,required:!0,default:!1},left:{type:String,required:!1,default:null},top:{type:String,required:!1,default:null},tooltipTitle:{type:String,required:!1,default:""},context:{type:[String,Number],required:!1,default:""},series:{type:Array,required:!0,default:()=>[]},locked:{type:Boolean,required:!1,default:!1}},emits:["dimensions","top","left"],setup(n,{emit:t}){const e=t,i=n,r=h.ref(null),a=h.ref(!1),s=h.ref({x:0,y:0}),o=h.ref({x:0,y:0}),l=h.ref({left:i.left,top:i.top});h.watch(r,g=>{if(g){const{width:p,height:m}=g.getBoundingClientRect();e("dimensions",{width:p,height:m})}}),h.watch(()=>i.locked,g=>{g?(l.value.left=i.left,l.value.top=i.top):g===!1&&(e("top",l.value.top),e("left",l.value.left))});function c(g){if(r.value){a.value=!0;const p=window.getComputedStyle(r.value),m=p.transform||p.webkitTransform||p.mozTransform,y=new DOMMatrix(m),v=y.m41,x=y.m42;s.value={x:v,y:x},o.value={x:g.clientX,y:g.clientY},window.addEventListener("mousemove",d),window.addEventListener("mouseup",f)}}let u=null;function d(g){g.preventDefault(),g.stopPropagation(),a.value&&(u!==null&&window.cancelAnimationFrame(u),u=window.requestAnimationFrame(()=>{const p=g.clientX-o.value.x,m=g.clientY-o.value.y;l.value.left=`${s.value.x+p}px`,l.value.top=`${s.value.y+m}px`}))}function f(){a.value=!1,u!==null&&window.cancelAnimationFrame(u),window.removeEventListener("mousemove",d),window.removeEventListener("mouseup",f)}return(g,p)=>n.showTooltip?(h.openBlock(),h.createElementBlock("div",{key:0,ref_key:"tooltipEl",ref:r,class:h.normalizeClass(["tooltip-container",{locked:n.locked}]),style:h.normalizeStyle({transform:n.locked?`translate(${l.value.left}, ${l.value.top})`:`translate(${n.left}, ${n.top})`,left:"0",top:"0",pointerEvents:n.locked?"all":"none"}),onMousedown:c},[h.createElementVNode("div",YT,[h.createElementVNode("span",zT,h.toDisplayString(n.tooltipTitle),1),n.locked?(h.openBlock(),h.createBlock(h.unref(PT),{key:0,class:"drag-icon",color:h.unref(FT)},null,8,["color"])):h.createCommentVNode("",!0),n.context?(h.openBlock(),h.createElementBlock("span",HT,h.toDisplayString(n.context),1)):h.createCommentVNode("",!0)]),h.createElementVNode("ul",$T,[(h.openBlock(!0),h.createElementBlock(h.Fragment,null,h.renderList(n.series,({backgroundColor:m,borderColor:y,label:v,value:x})=>(h.openBlock(),h.createElementBlock(h.Fragment,{key:v},[n.series.length?(h.openBlock(),h.createElementBlock("li",jT,[h.createElementVNode("div",{class:"tooltip-legend",style:h.normalizeStyle({background:m,"border-color":y})},null,4),h.createElementVNode("span",VT,h.toDisplayString(v),1),h.createElementVNode("span",qT,h.toDisplayString(x),1)])):h.createCommentVNode("",!0)],64))),128))])],38)):h.createCommentVNode("",!0)}}),Ke=(n,t)=>{const e=n.__vccOpts||n;for(const[i,r]of t)e[i]=r;return e},rl=Ke(XT,[["__scopeId","data-v-fe2a03e1"]]),GT=["onClick"],KT=["title"],ZT={key:0,class:"sub-label"},al=Ke(h.defineComponent({__name:"ChartLegend",props:{id:{type:String,required:!0},items:{type:Object,required:!0},chartInstance:{type:Object,required:!1,default:()=>null}},setup(n){const t=n,e=h.ref(),i=h.ref([]),r=h.ref(!1),a=h.inject("showLegendValues",!0),s=h.inject("legendPosition",h.ref(Bt.Right)),o=h.ref([]),l=()=>{const m=e.value;if(!m||!i.value||m.children.length===0)return 0;let y=1,v=m.children[0].getBoundingClientRect().top;for(const x of i.value){const w=x.getBoundingClientRect().top;w!==v&&(y++,v=w)}return y},c=()=>{e.value&&s.value===Bt.Bottom&&(l()>1?r.value=!0:r.value=!1)},u=()=>{if(e.value&&s.value===Bt.Bottom){let m=0;i.value.forEach(v=>{const x=Array.from(v.children).reduce((w,_)=>w+_.offsetWidth,0);x>m&&(m=x)});const y=parseInt(WT,10);e.value.style.gridTemplateColumns=`repeat(auto-fit, ${m+y}px)`}},d=()=>{if(t.items.length!==o.value.length)return o.value=t.items,!0;for(let m=0;m<t.items.length;m++)if(t.items[m].text!==o.value[m].text)return o.value=t.items,!0;return!1};h.watch(()=>t.items,()=>{c(),d()&&u()},{immediate:!0,flush:"post"}),h.watch(()=>s.value,()=>{u()}),h.onMounted(()=>{o.value=t.items,window.addEventListener("resize",c)}),h.onBeforeUnmount(()=>{window.removeEventListener("resize",c)});const f=(m=0,y)=>{if(t.chartInstance===null)return;const v=t.chartInstance instanceof Te?t.chartInstance:t.chartInstance.chart;g(m,y)?v.hide(m,y):v.show(m,y),v.update()},g=(m=0,y)=>{if(t.chartInstance===null||t.chartInstance.chart===null)return!0;const v=t.chartInstance instanceof Te?t.chartInstance:t.chartInstance.chart,x=v.getDatasetMeta(m);return x.dataset||y===void 0?v.isDatasetVisible(m):!(x.data.length&&x.data[y].hidden)},p=m=>({[Bt.Right]:"vertical",[Bt.Bottom]:"horizontal",[Bt.Hidden]:"hidden"})[m];return(m,y)=>h.unref(s)!==h.unref(Bt).Hidden?(h.openBlock(),h.createElementBlock("ul",{key:0,ref_key:"legendContainerRef",ref:e,class:h.normalizeClass(["legend-container",p(h.unref(s))]),"data-testid":"legend"},[(h.openBlock(!0),h.createElementBlock(h.Fragment,null,h.renderList(n.items,({fillStyle:v,strokeStyle:x,text:w,datasetIndex:_,index:S,value:C})=>(h.openBlock(),h.createElementBlock("li",{key:w,ref_for:!0,ref_key:"legendItemsRef",ref:i,onClick:k=>f(_,S)},[h.createElementVNode("div",{class:"legend",style:h.normalizeStyle({background:v,"border-color":x})},null,4),h.createElementVNode("div",{class:h.normalizeClass(["label-container",{"strike-through":!g(_,S)}])},[h.createElementVNode("div",{class:h.normalizeClass(["label",{"truncate-label":r.value}]),title:h.unref(s)===h.unref(Bt).Bottom&&w},h.toDisplayString(w),11,KT),C&&h.unref(a)?(h.openBlock(),h.createElementBlock("div",ZT,h.toDisplayString(C.formatted),1)):h.createCommentVNode("",!0)],2)],8,GT))),128))],2)):h.createCommentVNode("",!0)}}),[["__scopeId","data-v-fe1c4994"]]);let pa;const QT=new Uint8Array(16);function JT(){if(!pa&&(pa=typeof crypto<"u"&&crypto.getRandomValues&&crypto.getRandomValues.bind(crypto),!pa))throw new Error("crypto.getRandomValues() not supported. See https://github.com/uuidjs/uuid#getrandomvalues-not-supported");return pa(QT)}const ne=[];for(let n=0;n<256;++n)ne.push((n+256).toString(16).slice(1));function tD(n,t=0){return ne[n[t+0]]+ne[n[t+1]]+ne[n[t+2]]+ne[n[t+3]]+"-"+ne[n[t+4]]+ne[n[t+5]]+"-"+ne[n[t+6]]+ne[n[t+7]]+"-"+ne[n[t+8]]+ne[n[t+9]]+"-"+ne[n[t+10]]+ne[n[t+11]]+ne[n[t+12]]+ne[n[t+13]]+ne[n[t+14]]+ne[n[t+15]]}const $f={randomUUID:typeof crypto<"u"&&crypto.randomUUID&&crypto.randomUUID.bind(crypto)};function _n(n,t,e){if($f.randomUUID&&!t&&!n)return $f.randomUUID();n=n||{};const i=n.random||(n.rng||JT)();if(i[6]=i[6]&15|64,i[8]=i[8]&63|128,t){e=e||0;for(let r=0;r<16;++r)t[e+r]=i[r];return t}return tD(i)}const jf=(n,t)=>{const e=n.ctx,i=n.scales.y,r=n.scales.x,a=t[t.length-1].element;e.save(),e.strokeStyle="rgba(100, 100, 100, 1)",e.lineWidth=3,n.options.indexAxis==="x"?e.strokeRect(a.x-a.width/2,a.y,a.width,i.bottom-a.y):e.strokeRect(r.left,a.y-a.height/2,a.x-r.left,a.height),e.restore()},Vf={id:"highlightPlugin",clicked:!1,afterDatasetsDraw:function(n){this.clickedElements&&this.clickedElements.length&&jf(n,this.clickedElements)},afterEvent:function(n,{event:t}){var r;if(t.type!=="click"||!t.native)return;this.clicked=!this.clicked;const e=((r=n.options.interaction)==null?void 0:r.mode)||"index",i=n.getElementsAtEventForMode(t.native,e,{intersect:!1},!0);i.length&&this.clicked?(this.clickedElements=i,jf(n,this.clickedElements),this.previousHoverOption=n.options.hover,n.options.hover={mode:null}):(delete this.clickedElements,n.options.hover=this.previousHoverOption||n.options.hover,this.clicked=!1)},beforeDestroy(n){delete this.clickedElements,n.options.hover=this.previousHoverOption||n.options.hover,this.clicked=!1}},qf=6,eD=20,nD="100%",sl=30,iD=40,rD=0,aD=10,sD=10,oD=1,lD=6,cD=Ke(h.defineComponent({__name:"StackedBarChart",props:{chartData:{type:Object,required:!1,default:()=>({labels:[],datasets:[]})},tooltipTitle:{type:String,required:!1,default:""},legendValues:{type:Object,required:!1,default:null},metricUnit:{type:String,required:!1,default:""},orientation:{type:String,required:!1,default:"horizontal",validator:n=>["horizontal","vertical"].includes(n)},annotations:{type:Boolean,required:!1,default:!0},metricAxesTitle:{type:String,required:!1,default:null},dimensionAxesTitle:{type:String,required:!1,default:null},stacked:{type:Boolean,required:!1,default:!0},syntheticsDataKey:{type:String,required:!1,default:""},height:{type:String,required:!1,default:"500px",validator:n=>/(\d *)(px|%)/.test(n)},chartLegendSortFn:{type:Function,required:!1,default:(n,t)=>n.value&&t.value&&t.value.raw-n.value.raw},chartTooltipSortFn:{type:Function,required:!1,default:(n,t)=>t.rawValue-n.rawValue}},emits:["heightUpdate"],setup(n,{emit:t}){const e=n,i=t,{i18n:r}=St.useI18n(),{translateUnit:a}=St.useTranslatedUnits(),s=({chart:F},E)=>{var X;const $=F.data,K=(X=$.labels)==null?void 0:X.indexOf(E);return $.datasets.reduce((Q,at,B)=>{if(F.isDatasetVisible(B)){const N=at.data[K];return isNaN(N)?Q:Q+N}else return Q},0)},o=(F,E,$,K)=>{const X=K==="horizontal";E===null&&(E=r.t("entityNoName"));const Q={type:"label",yValue:N=>X?E:s(N,E),xValue:N=>X?s(N,E):E},at={...Q,position:X?{x:"start",y:"center"}:{x:"center",y:"end"},yAdjust:()=>X?0:-Math.abs(Gw()),content:N=>Co(s(N,E),$)},B={...Q,content:N=>zd(s(N,E),Yd(N.chart,F)),position:X?{x:"start",y:"center"}:{x:"center",y:"end"},xAdjust:N=>X?Wd(Co(s(N,E),$)):0,color:Bd};return{[`${E}-value`]:at,[`${E}-percent`]:B}},l=h.ref(),c=h.ref(),u=h.ref(_n()),d=_n(),f=_n(),g=h.ref([]),p=h.ref(h.inject("legendPosition",Bt.Right)),m=h.ref({show:!1,top:"0px",left:"0px",text:"",offset:0}),y=h.toRef(e,"metricUnit"),v=h.computed(()=>h.toRef(e,"orientation").value==="horizontal"),x=h.reactive({showTooltip:!1,tooltipContext:"",tooltipSeries:[],left:"",top:"",units:y,translateUnit:a,offset:0,width:0,height:0,locked:!1,chartType:v.value?ee.HORIZONTAL_BAR:ee.VERTICAL_BAR,chartTooltipSortFn:e.chartTooltipSortFn}),w=h.ref(0),_=()=>{var F;return e.annotations&&((F=e.chartData.labels)==null?void 0:F.reduce((E,$)=>Object.assign(E,o(e.chartData,$,y.value,e.orientation)),{}))},S={id:u.value,afterUpdate(F){w.value+=1,g.value=F.options.plugins.legend.labels.generateLabels(F).map(E=>({...E,value:e.legendValues&&e.legendValues[E.text]})).sort(e.chartLegendSortFn)}},C={id:d,afterUpdate(F){F.options.plugins.annotation.annotations=e.annotations?_():{}}},D=[S,{id:"axisHover",afterEvent(F,E){if(m.value.show=!1,E.event.type==="mousemove"){const $=E.event,K=F.options.indexAxis,X=F.scales,Q=F.scales[K].getLabelForValue(Number(F.scales[K].getValueForPixel($[K])));if((B=>B==="x"?$.y>X.x.top:$.x<X.y.right)(K))if(x.locked||(x.showTooltip=!1),Q.length>na){const N=F.canvas.getContext("2d").measureText(Q).width,tt=Math.abs(Math.round($.x-N*.5)),rt=Math.round($.x+N*.5);m.value.left=K==="x"?`${(tt>0?tt:rt)-m.value.offset}px`:`${$.x-N*.5-m.value.offset}px`,m.value.top=`${$.y-50}px`,m.value.show=!0,m.value.text=Q}else m.value.show=!1;else m.value.show=!1}}},{id:f,afterUpdate(F){F.options.layout.padding.right=v.value?L.value:0}},Vf,...e.annotations?[C]:[]],O=h.computed(()=>e.chartData.labels&&e.chartData.labels.length||0),A=h.computed(()=>{var E,$;let F=nD;if(l.value&&(F=l.value.width,l.value&&((E=e.chartData)!=null&&E.labels)&&(($=e.chartData)==null?void 0:$.labels.length)>sl&&!v.value)){const K=e.chartData.labels.length;F=`${l.value.offsetWidth+(K-sl)*iD}px`}return F}),R=h.computed(()=>{let F=parseInt(e.height,10);if(O.value&&v.value){const E=O.value*(eD+lD);F=Math.max(E,F)}return F});h.watch(()=>R.value,F=>{i("heightUpdate",F)}),St.useReportChartDataForSynthetics(h.toRef(e,"chartData"),h.toRef(e,"syntheticsDataKey")),h.onMounted(()=>{e.annotations&&Te.register(zf),window.requestAnimationFrame(()=>{i("heightUpdate",R.value)})});const W=h.computed(()=>{const F=St.useBarChartOptions({tooltipState:x,legendID:u.value,stacked:h.toRef(e,"stacked"),metricAxesTitle:h.toRef(e,"metricAxesTitle"),dimensionAxesTitle:h.toRef(e,"dimensionAxesTitle"),indexAxis:v.value?"y":"x",numLabels:O});return{...F.value,plugins:{...F.value.plugins,annotation:{annotations:_(),clip:!1}},layout:{autoPadding:!1,padding:{right:0,top:6*qf}}}}),V=St.useChartJSCommon("bar",l,h.toRef(e,"chartData"),D,W),L=h.computed(()=>{w.value;const F=e.chartData.labels,E=e.chartData.datasets,$=F.map((Q,at)=>E.reduce((B,N)=>isNaN(Number(N.data[at]))?B:B+Number(N.data[at]),0)),K=V.value?Yd(V.value,e.chartData):Kw(e.chartData);return $.map(Q=>Wd(Co(Q,y.value)+zd(Q,K))).reduce((Q,at)=>Math.max(Q,at),0)+qf});h.onBeforeUnmount(()=>{Te.unregister(zf)});const H={[Bt.Right]:"legend-row",[Bt.Bottom]:"column"},I=h.computed(()=>{if(c.value&&V.value){const F=window.devicePixelRatio,E=V.value,$=E.scales.y.width*F+oD,K=(E.scales.y.height+E.scales.y.top+E.scales.x.height)*F,X=c.value.getContext("2d");return X.scale(F,F),X.canvas.width=$,X.canvas.height=K,X.canvas.style.width=`${$/F}px`,X.canvas.style.height=`${K/F}px`,{scale:F,width:$*F,height:K*F,targetCtx:X}}return null}),et=F=>{if(I.value&&V.value){const E=I.value.scale,$=I.value.targetCtx,K=I.value.width,X=I.value.height,Q=V.value,at=Q.canvas,B=F.target;$.fillStyle="white",B.scrollLeft>=rD&&B.scrollLeft<=aD?($.globalCompositeOperation="source-over",$.clearRect(0,0,K,X),$.drawImage(at,0,0,K,X,0,0,K,X),$.globalCompositeOperation="destination-over",$.fillRect(0,0,K,X)):($.globalCompositeOperation="source-over",$.fillRect(0,(Q.scales.y.height+Q.scales.y.top+sD)*E,K,Q.scales.x.height*E)),x.offset=B.scrollLeft,m.value.offset=B.scrollLeft}},z=({width:F,height:E})=>{x.width=F,x.height=E};h.watch(()=>e.orientation,()=>{var F;if(c.value&&I.value){const E=I.value.width,$=I.value.height;((F=c.value)==null?void 0:F.getContext("2d")).clearRect(0,0,E,$)}x.showTooltip=!1,x.locked=!1}),h.watch(()=>e.annotations,F=>{V.value&&(F?V.value.options.plugins.annotation.annotations=_(e.chartData):delete V.value.options.plugins.annotation.annotations)});const Mt=()=>{x.showTooltip&&(x.locked=!x.locked)};return(F,E)=>(h.openBlock(),h.createElementBlock("div",{class:h.normalizeClass(["chart-parent",H[p.value]])},[h.createElementVNode("canvas",{ref_key:"axis",ref:c,class:"axis"},null,512),h.createElementVNode("div",{class:"chart-container",style:h.normalizeStyle({"overflow-x":O.value>sl?"auto":"hidden"}),"on:scroll":et,onClick:E[0]||(E[0]=$=>Mt())},[h.createElementVNode("div",{class:"chart-body",style:h.normalizeStyle({width:A.value})},[h.createElementVNode("canvas",{ref_key:"canvas",ref:l},null,512)],4)],36),m.value.show?(h.openBlock(),h.createElementBlock("div",{key:0,class:"axis-tooltip",style:h.normalizeStyle({top:m.value.top,left:m.value.left})},h.toDisplayString(m.value.text),5)):h.createCommentVNode("",!0),h.createVNode(rl,{context:x.tooltipContext,left:x.left,locked:x.locked,series:x.tooltipSeries,"show-tooltip":x.showTooltip,"tooltip-title":n.tooltipTitle,top:x.top,onDimensions:z},null,8,["context","left","locked","series","show-tooltip","tooltip-title","top"]),h.createVNode(al,{id:u.value,"chart-instance":h.unref(V),items:g.value},null,8,["id","chart-instance","items"])],2))}}),[["__scopeId","data-v-502e266a"]]);/*!
|
|
25
25
|
* chartjs-adapter-date-fns v3.0.0
|
|
26
26
|
* https://www.chartjs.org
|
|
27
27
|
* (c) 2022 chartjs-adapter-date-fns Contributors
|
|
28
28
|
* Released under the MIT license
|
|
29
|
-
*/const lD={datetime:"MMM d, yyyy, h:mm:ss aaaa",millisecond:"h:mm:ss.SSS aaaa",second:"h:mm:ss aaaa",minute:"h:mm aaaa",hour:"ha",day:"MMM d",week:"PP",month:"MMM yyyy",quarter:"qqq - yyyy",year:"yyyy"};Cc._date.override({_id:"date-fns",formats:function(){return lD},parse:function(n,t){if(n===null||typeof n>"u")return null;const e=typeof n;return e==="number"||n instanceof Date?n=J(n):e==="string"&&(typeof t=="string"?n=dx(n,t,new Date,this.options):n=hd(n,this.options)),Ds(n)?n.getTime():null},format:function(n,t){return fv(n,t,this.options)},add:function(n,t,e){switch(e){case"millisecond":return ji(n,t);case"second":return By(n,t);case"minute":return Fy(n,t);case"hour":return Ay(n,t);case"day":return Wu(n,t);case"week":return Wy(n,t);case"month":return _s(n,t);case"quarter":return Uy(n,t);case"year":return Yy(n,t);default:return n}},diff:function(n,t,e){switch(e){case"millisecond":return qr(n,t);case"second":return Qy(n,t);case"minute":return Gy(n,t);case"hour":return Xy(n,t);case"day":return Hu(n,t);case"week":return Jy(n,t);case"month":return qu(n,t);case"quarter":return Zy(n,t);case"year":return tb(n,t);default:return 0}},startOf:function(n,t,e){switch(t){case"second":return gx(n);case"minute":return eb(n);case"hour":return hx(n);case"day":return Ts(n);case"week":return Yu(n);case"isoWeek":return Yu(n,{weekStartsOn:+e});case"month":return ib(n);case"quarter":return nb(n);case"year":return ab(n);default:return n}},endOf:function(n,t){switch(t){case"second":return ub(n);case"minute":return lb(n);case"hour":return sb(n);case"day":return ju(n);case"week":return ob(n);case"month":return Vu(n);case"quarter":return cb(n);case"year":return rb(n);default:return n}}});const Xf={data:{type:Object,required:!0},options:{type:Object,default:()=>({})},plugins:{type:Array,default:()=>[]},datasetIdKey:{type:String,default:"label"},updateMode:{type:String,default:void 0}},cD={type:{type:String,required:!0},...Xf,...{ariaLabel:{type:String},ariaDescribedby:{type:String}}},uD=h.version[0]==="2"?(n,t)=>Object.assign(n,{attrs:t}):(n,t)=>Object.assign(n,t);function hi(n){return h.isProxy(n)?h.toRaw(n):n}function dD(n){let t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:n;return h.isProxy(t)?new Proxy(n,{}):n}function fD(n,t){const e=n.options;e&&t&&Object.assign(e,t)}function Gf(n,t){n.labels=t}function Kf(n,t,e){const i=[];n.datasets=t.map(r=>{const a=n.datasets.find(s=>s[e]===r[e]);return!a||!r.data||i.includes(a)?{...r}:(i.push(a),Object.assign(a,r),a)})}function hD(n,t){const e={labels:[],datasets:[]};return Gf(e,n.labels),Kf(e,n.datasets,t),e}const gD=h.defineComponent({props:cD,setup(n,t){let{expose:e,slots:i}=t;const r=h.ref(null),a=h.shallowRef(null);e({chart:a});const s=()=>{if(!r.value)return;const{type:c,data:u,options:d,plugins:f,datasetIdKey:g}=n,p=hD(u,g),m=dD(p,u);a.value=new Te(r.value,{type:c,data:m,options:{...d},plugins:f})},o=()=>{const c=h.toRaw(a.value);c&&(c.destroy(),a.value=null)},l=c=>{c.update(n.updateMode)};return h.onMounted(s),h.onBeforeUnmount(o),h.watch([()=>n.options,()=>n.data],(c,u)=>{let[d,f]=c,[g,p]=u;const m=h.toRaw(a.value);if(!m)return;let y=!1;if(d){const v=hi(d),x=hi(g);v&&v!==x&&(fD(m,v),y=!0)}if(f){const v=hi(f.labels),x=hi(p.labels),w=hi(f.datasets),_=hi(p.datasets);v!==x&&(Gf(m.config.data,v),y=!0),w&&w!==_&&(Kf(m.config.data,w,n.datasetIdKey),y=!0)}y&&h.nextTick(()=>{l(m)})},{deep:!0}),()=>h.h("canvas",{role:"img",ariaLabel:n.ariaLabel,ariaDescribedby:n.ariaDescribedby,ref:r},[h.h("p",{},[i.default?i.default():""])])}});function ol(n,t){return Te.register(t),h.defineComponent({props:Xf,setup(e,i){let{expose:r}=i;const a=h.shallowRef(null),s=o=>{a.value=o==null?void 0:o.chart};return r({chart:a}),()=>h.h(gD,uD({ref:s},{type:n,...e}))}})}const pD=ol("bar",Pi),Zf=ol("doughnut",hn),mD=ol("line",Ei),yD={class:"chart-container"},bD=h.defineComponent({__name:"DoughnutChart",props:{chartData:{type:Object,required:!1,default:null},fill:{type:Boolean,required:!1,default:!1},tooltipTitle:{type:String,required:!0},metricUnit:{type:String,required:!1,default:""},legendPosition:{type:String,required:!1,default:Bt.Right},legendValues:{type:Object,required:!1,default:null},syntheticsDataKey:{type:String,required:!1,default:""},datasetColors:{type:Object,required:!1,default:De}},setup(n){const t=n,{translateUnit:e}=St.useTranslatedUnits(),i=h.ref(_n()),r=h.ref(_n()),a=h.ref([]),s=h.reactive({showTooltip:!1,tooltipContext:"",tooltipSeries:[],left:"",top:"",units:t.metricUnit,translateUnit:e,offset:0,width:0,height:0,chartType:ee.DOUGHNUT}),o={id:i.value,afterUpdate(m){a.value=m.options.plugins.legend.labels.generateLabels(m).map(y=>({...y,value:t.legendValues&&t.legendValues[y.text],hidden:!1}))}},l=h.computed(()=>[o]),c=h.computed(()=>[t.chartData.datasets.reduce((y,v)=>(y.labels.push(v.label),y.backgroundColor.push(v.backgroundColor),y.borderColor.push(Ji(v.backgroundColor,50)),y.data.push(v.data.reduce((x,w)=>x+w,0)),y),{labels:[],backgroundColor:[],borderColor:[],data:[]})]),u=h.computed(()=>({...t.chartData,datasets:c.value}));St.useReportChartDataForSynthetics(h.toRef(t,"chartData"),h.toRef(t,"syntheticsDataKey"));const{options:d}=St.useDoughnutChartOptions({tooltipState:s,legendID:i.value}),f=h.ref(),g=m=>({[Bt.Right]:"legend-row",[Bt.Bottom]:"column",[Bt.Hidden]:"hidden"})[m],p=({width:m,height:y})=>{s.width=m,s.height=y};return(m,y)=>(h.openBlock(),h.createElementBlock("div",{class:h.normalizeClass(["chart-parent",g(n.legendPosition)]),"data-testid":"doughnut-chart-parent"},[h.createElementVNode("div",yD,[h.createVNode(h.unref(Zf),{ref_key:"chartInstance",ref:f,"chart-id":r.value,data:u.value,options:h.unref(d),plugins:l.value},null,8,["chart-id","data","options","plugins"]),h.createVNode(rl,{left:s.left,series:s.tooltipSeries,"show-tooltip":s.showTooltip,"tooltip-title":n.tooltipTitle,top:s.top,unit:n.metricUnit,onDimensions:p},null,8,["left","series","show-tooltip","tooltip-title","top","unit"])]),h.createVNode(al,{id:i.value,"chart-instance":f.value,items:a.value,position:n.legendPosition},null,8,["id","chart-instance","items","position"])],2))}}),vD=Ke(bD,[["__scopeId","data-v-c005e7f5"]]);var Hn=(n=>(n.String="string",n.Number="number",n.Boolean="boolean",n.Object="object",n.Undefined="undefined",n))(Hn||{}),ma={exports:{}};ma.exports,function(n,t){var e=200,i="Expected a function",r="__lodash_hash_undefined__",a=1,s=2,o=1/0,l=9007199254740991,c="[object Arguments]",u="[object Array]",d="[object Boolean]",f="[object Date]",g="[object Error]",p="[object Function]",m="[object GeneratorFunction]",y="[object Map]",v="[object Number]",x="[object Object]",w="[object Promise]",_="[object RegExp]",S="[object Set]",C="[object String]",k="[object Symbol]",T="[object WeakMap]",D="[object ArrayBuffer]",O="[object DataView]",A="[object Float32Array]",R="[object Float64Array]",W="[object Int8Array]",V="[object Int16Array]",L="[object Int32Array]",H="[object Uint8Array]",I="[object Uint8ClampedArray]",et="[object Uint16Array]",z="[object Uint32Array]",Mt=/\.|\[(?:[^[\]]*|(["'])(?:(?!\1)[^\\]|\\.)*?\1)\]/,F=/^\w*$/,E=/^\./,$=/[^.[\]]+|\[(?:(-?\d+(?:\.\d+)?)|(["'])((?:(?!\2)[^\\]|\\.)*?)\2)\]|(?=(?:\.|\[\])(?:\.|\[\]|$))/g,K=/[\\^$.*+?()[\]{}|]/g,X=/\\(\\)?/g,Q=/^\[object .+?Constructor\]$/,at=/^(?:0|[1-9]\d*)$/,B={};B[A]=B[R]=B[W]=B[V]=B[L]=B[H]=B[I]=B[et]=B[z]=!0,B[c]=B[u]=B[D]=B[d]=B[O]=B[f]=B[g]=B[p]=B[y]=B[v]=B[x]=B[_]=B[S]=B[C]=B[T]=!1;var N=typeof ge=="object"&&ge&&ge.Object===Object&&ge,tt=typeof self=="object"&&self&&self.Object===Object&&self,rt=N||tt||Function("return this")(),Ct=t&&!t.nodeType&&t,gt=Ct&&!0&&n&&!n.nodeType&&n,It=gt&>.exports===Ct,Tt=It&&N.process,lt=function(){try{return Tt&&Tt.binding("util")}catch{}}(),zt=lt&<.isTypedArray;function Gt(b,M){for(var P=-1,U=b?b.length:0;++P<U;)if(M(b[P],P,b))return!0;return!1}function Se(b){return function(M){return M==null?void 0:M[b]}}function Ee(b,M){for(var P=-1,U=Array(b);++P<b;)U[P]=M(P);return U}function pe(b){return function(M){return b(M)}}function Rt(b,M){return b==null?void 0:b[M]}function Nt(b){var M=!1;if(b!=null&&typeof b.toString!="function")try{M=!!(b+"")}catch{}return M}function Ze(b){var M=-1,P=Array(b.size);return b.forEach(function(U,st){P[++M]=[st,U]}),P}function Dt(b,M){return function(P){return b(M(P))}}function Dn(b){var M=-1,P=Array(b.size);return b.forEach(function(U){P[++M]=U}),P}var Ae=Array.prototype,Qe=Function.prototype,xe=Object.prototype,Me=rt["__core-js_shared__"],Re=function(){var b=/[^.]+$/.exec(Me&&Me.keys&&Me.keys.IE_PROTO||"");return b?"Symbol(src)_1."+b:""}(),le=Qe.toString,me=xe.hasOwnProperty,Kt=xe.toString,ya=RegExp("^"+le.call(me).replace(K,"\\$&").replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g,"$1.*?")+"$"),gi=rt.Symbol,dh=rt.Uint8Array,US=xe.propertyIsEnumerable,BS=Ae.splice,WS=Dt(Object.keys,Object),fl=pi(rt,"DataView"),lr=pi(rt,"Map"),hl=pi(rt,"Promise"),gl=pi(rt,"Set"),pl=pi(rt,"WeakMap"),cr=pi(Object,"create"),YS=jn(fl),zS=jn(lr),HS=jn(hl),$S=jn(gl),jS=jn(pl),ba=gi?gi.prototype:void 0,ml=ba?ba.valueOf:void 0,fh=ba?ba.toString:void 0;function $n(b){var M=-1,P=b?b.length:0;for(this.clear();++M<P;){var U=b[M];this.set(U[0],U[1])}}function VS(){this.__data__=cr?cr(null):{}}function qS(b){return this.has(b)&&delete this.__data__[b]}function XS(b){var M=this.__data__;if(cr){var P=M[b];return P===r?void 0:P}return me.call(M,b)?M[b]:void 0}function GS(b){var M=this.__data__;return cr?M[b]!==void 0:me.call(M,b)}function KS(b,M){var P=this.__data__;return P[b]=cr&&M===void 0?r:M,this}$n.prototype.clear=VS,$n.prototype.delete=qS,$n.prototype.get=XS,$n.prototype.has=GS,$n.prototype.set=KS;function Je(b){var M=-1,P=b?b.length:0;for(this.clear();++M<P;){var U=b[M];this.set(U[0],U[1])}}function ZS(){this.__data__=[]}function QS(b){var M=this.__data__,P=xa(M,b);if(P<0)return!1;var U=M.length-1;return P==U?M.pop():BS.call(M,P,1),!0}function JS(b){var M=this.__data__,P=xa(M,b);return P<0?void 0:M[P][1]}function tM(b){return xa(this.__data__,b)>-1}function eM(b,M){var P=this.__data__,U=xa(P,b);return U<0?P.push([b,M]):P[U][1]=M,this}Je.prototype.clear=ZS,Je.prototype.delete=QS,Je.prototype.get=JS,Je.prototype.has=tM,Je.prototype.set=eM;function tn(b){var M=-1,P=b?b.length:0;for(this.clear();++M<P;){var U=b[M];this.set(U[0],U[1])}}function nM(){this.__data__={hash:new $n,map:new(lr||Je),string:new $n}}function iM(b){return wa(this,b).delete(b)}function rM(b){return wa(this,b).get(b)}function aM(b){return wa(this,b).has(b)}function sM(b,M){return wa(this,b).set(b,M),this}tn.prototype.clear=nM,tn.prototype.delete=iM,tn.prototype.get=rM,tn.prototype.has=aM,tn.prototype.set=sM;function va(b){var M=-1,P=b?b.length:0;for(this.__data__=new tn;++M<P;)this.add(b[M])}function oM(b){return this.__data__.set(b,r),this}function lM(b){return this.__data__.has(b)}va.prototype.add=va.prototype.push=oM,va.prototype.has=lM;function en(b){this.__data__=new Je(b)}function cM(){this.__data__=new Je}function uM(b){return this.__data__.delete(b)}function dM(b){return this.__data__.get(b)}function fM(b){return this.__data__.has(b)}function hM(b,M){var P=this.__data__;if(P instanceof Je){var U=P.__data__;if(!lr||U.length<e-1)return U.push([b,M]),this;P=this.__data__=new tn(U)}return P.set(b,M),this}en.prototype.clear=cM,en.prototype.delete=uM,en.prototype.get=dM,en.prototype.has=fM,en.prototype.set=hM;function gM(b,M){var P=Vn(b)||xh(b)?Ee(b.length,String):[],U=P.length,st=!!U;for(var Z in b)(M||me.call(b,Z))&&!(st&&(Z=="length"||mh(Z,U)))&&P.push(Z);return P}function xa(b,M){for(var P=b.length;P--;)if(vh(b[P][0],M))return P;return-1}var pM=OM();function mM(b,M){return b&&pM(b,M,Ma)}function hh(b,M){M=_a(M,b)?[M]:gh(M);for(var P=0,U=M.length;b!=null&&P<U;)b=b[Ta(M[P++])];return P&&P==U?b:void 0}function yM(b){return Kt.call(b)}function bM(b,M){return b!=null&&M in Object(b)}function yl(b,M,P,U,st){return b===M?!0:b==null||M==null||!Da(b)&&!Sa(M)?b!==b&&M!==M:vM(b,M,yl,P,U,st)}function vM(b,M,P,U,st,Z){var vt=Vn(b),Ot=Vn(M),Ht=u,Qt=u;vt||(Ht=Sn(b),Ht=Ht==c?x:Ht),Ot||(Qt=Sn(M),Qt=Qt==c?x:Qt);var ce=Ht==x&&!Nt(b),ye=Qt==x&&!Nt(M),Jt=Ht==Qt;if(Jt&&!ce)return Z||(Z=new en),vt||BM(b)?ph(b,M,P,U,st,Z):PM(b,M,Ht,P,U,st,Z);if(!(st&s)){var Ce=ce&&me.call(b,"__wrapped__"),ke=ye&&me.call(M,"__wrapped__");if(Ce||ke){var Mn=Ce?b.value():b,nn=ke?M.value():M;return Z||(Z=new en),P(Mn,nn,U,st,Z)}}return Jt?(Z||(Z=new en),EM(b,M,P,U,st,Z)):!1}function xM(b,M,P,U){var st=P.length,Z=st,vt=!U;if(b==null)return!Z;for(b=Object(b);st--;){var Ot=P[st];if(vt&&Ot[2]?Ot[1]!==b[Ot[0]]:!(Ot[0]in b))return!1}for(;++st<Z;){Ot=P[st];var Ht=Ot[0],Qt=b[Ht],ce=Ot[1];if(vt&&Ot[2]){if(Qt===void 0&&!(Ht in b))return!1}else{var ye=new en;if(U)var Jt=U(Qt,ce,Ht,b,M,ye);if(!(Jt===void 0?yl(ce,Qt,U,a|s,ye):Jt))return!1}}return!0}function wM(b){if(!Da(b)||IM(b))return!1;var M=_h(b)||Nt(b)?ya:Q;return M.test(jn(b))}function _M(b){return Sa(b)&&vl(b.length)&&!!B[Kt.call(b)]}function TM(b){return typeof b=="function"?b:b==null?$M:typeof b=="object"?Vn(b)?MM(b[0],b[1]):SM(b):jM(b)}function DM(b){if(!NM(b))return WS(b);var M=[];for(var P in Object(b))me.call(b,P)&&P!="constructor"&&M.push(P);return M}function SM(b){var M=AM(b);return M.length==1&&M[0][2]?bh(M[0][0],M[0][1]):function(P){return P===b||xM(P,b,M)}}function MM(b,M){return _a(b)&&yh(M)?bh(Ta(b),M):function(P){var U=YM(P,b);return U===void 0&&U===M?zM(P,b):yl(M,U,void 0,a|s)}}function CM(b){return function(M){return hh(M,b)}}function kM(b){if(typeof b=="string")return b;if(xl(b))return fh?fh.call(b):"";var M=b+"";return M=="0"&&1/b==-o?"-0":M}function gh(b){return Vn(b)?b:FM(b)}function OM(b){return function(M,P,U){for(var st=-1,Z=Object(M),vt=U(M),Ot=vt.length;Ot--;){var Ht=vt[b?Ot:++st];if(P(Z[Ht],Ht,Z)===!1)break}return M}}function ph(b,M,P,U,st,Z){var vt=st&s,Ot=b.length,Ht=M.length;if(Ot!=Ht&&!(vt&&Ht>Ot))return!1;var Qt=Z.get(b);if(Qt&&Z.get(M))return Qt==M;var ce=-1,ye=!0,Jt=st&a?new va:void 0;for(Z.set(b,M),Z.set(M,b);++ce<Ot;){var Ce=b[ce],ke=M[ce];if(U)var Mn=vt?U(ke,Ce,ce,M,b,Z):U(Ce,ke,ce,b,M,Z);if(Mn!==void 0){if(Mn)continue;ye=!1;break}if(Jt){if(!Gt(M,function(nn,qn){if(!Jt.has(qn)&&(Ce===nn||P(Ce,nn,U,st,Z)))return Jt.add(qn)})){ye=!1;break}}else if(!(Ce===ke||P(Ce,ke,U,st,Z))){ye=!1;break}}return Z.delete(b),Z.delete(M),ye}function PM(b,M,P,U,st,Z,vt){switch(P){case O:if(b.byteLength!=M.byteLength||b.byteOffset!=M.byteOffset)return!1;b=b.buffer,M=M.buffer;case D:return!(b.byteLength!=M.byteLength||!U(new dh(b),new dh(M)));case d:case f:case v:return vh(+b,+M);case g:return b.name==M.name&&b.message==M.message;case _:case C:return b==M+"";case y:var Ot=Ze;case S:var Ht=Z&s;if(Ot||(Ot=Dn),b.size!=M.size&&!Ht)return!1;var Qt=vt.get(b);if(Qt)return Qt==M;Z|=a,vt.set(b,M);var ce=ph(Ot(b),Ot(M),U,st,Z,vt);return vt.delete(b),ce;case k:if(ml)return ml.call(b)==ml.call(M)}return!1}function EM(b,M,P,U,st,Z){var vt=st&s,Ot=Ma(b),Ht=Ot.length,Qt=Ma(M),ce=Qt.length;if(Ht!=ce&&!vt)return!1;for(var ye=Ht;ye--;){var Jt=Ot[ye];if(!(vt?Jt in M:me.call(M,Jt)))return!1}var Ce=Z.get(b);if(Ce&&Z.get(M))return Ce==M;var ke=!0;Z.set(b,M),Z.set(M,b);for(var Mn=vt;++ye<Ht;){Jt=Ot[ye];var nn=b[Jt],qn=M[Jt];if(U)var Th=vt?U(qn,nn,Jt,M,b,Z):U(nn,qn,Jt,b,M,Z);if(!(Th===void 0?nn===qn||P(nn,qn,U,st,Z):Th)){ke=!1;break}Mn||(Mn=Jt=="constructor")}if(ke&&!Mn){var Ca=b.constructor,ka=M.constructor;Ca!=ka&&"constructor"in b&&"constructor"in M&&!(typeof Ca=="function"&&Ca instanceof Ca&&typeof ka=="function"&&ka instanceof ka)&&(ke=!1)}return Z.delete(b),Z.delete(M),ke}function wa(b,M){var P=b.__data__;return LM(M)?P[typeof M=="string"?"string":"hash"]:P.map}function AM(b){for(var M=Ma(b),P=M.length;P--;){var U=M[P],st=b[U];M[P]=[U,st,yh(st)]}return M}function pi(b,M){var P=Rt(b,M);return wM(P)?P:void 0}var Sn=yM;(fl&&Sn(new fl(new ArrayBuffer(1)))!=O||lr&&Sn(new lr)!=y||hl&&Sn(hl.resolve())!=w||gl&&Sn(new gl)!=S||pl&&Sn(new pl)!=T)&&(Sn=function(b){var M=Kt.call(b),P=M==x?b.constructor:void 0,U=P?jn(P):void 0;if(U)switch(U){case YS:return O;case zS:return y;case HS:return w;case $S:return S;case jS:return T}return M});function RM(b,M,P){M=_a(M,b)?[M]:gh(M);for(var U,st=-1,vt=M.length;++st<vt;){var Z=Ta(M[st]);if(!(U=b!=null&&P(b,Z)))break;b=b[Z]}if(U)return U;var vt=b?b.length:0;return!!vt&&vl(vt)&&mh(Z,vt)&&(Vn(b)||xh(b))}function mh(b,M){return M=M??l,!!M&&(typeof b=="number"||at.test(b))&&b>-1&&b%1==0&&b<M}function _a(b,M){if(Vn(b))return!1;var P=typeof b;return P=="number"||P=="symbol"||P=="boolean"||b==null||xl(b)?!0:F.test(b)||!Mt.test(b)||M!=null&&b in Object(M)}function LM(b){var M=typeof b;return M=="string"||M=="number"||M=="symbol"||M=="boolean"?b!=="__proto__":b===null}function IM(b){return!!Re&&Re in b}function NM(b){var M=b&&b.constructor,P=typeof M=="function"&&M.prototype||xe;return b===P}function yh(b){return b===b&&!Da(b)}function bh(b,M){return function(P){return P==null?!1:P[b]===M&&(M!==void 0||b in Object(P))}}var FM=bl(function(b){b=WM(b);var M=[];return E.test(b)&&M.push(""),b.replace($,function(P,U,st,Z){M.push(st?Z.replace(X,"$1"):U||P)}),M});function Ta(b){if(typeof b=="string"||xl(b))return b;var M=b+"";return M=="0"&&1/b==-o?"-0":M}function jn(b){if(b!=null){try{return le.call(b)}catch{}try{return b+""}catch{}}return""}function bl(b,M){if(typeof b!="function"||M&&typeof M!="function")throw new TypeError(i);var P=function(){var U=arguments,st=M?M.apply(this,U):U[0],Z=P.cache;if(Z.has(st))return Z.get(st);var vt=b.apply(this,U);return P.cache=Z.set(st,vt),vt};return P.cache=new(bl.Cache||tn),P}bl.Cache=tn;function vh(b,M){return b===M||b!==b&&M!==M}function xh(b){return UM(b)&&me.call(b,"callee")&&(!US.call(b,"callee")||Kt.call(b)==c)}var Vn=Array.isArray;function wh(b){return b!=null&&vl(b.length)&&!_h(b)}function UM(b){return Sa(b)&&wh(b)}function _h(b){var M=Da(b)?Kt.call(b):"";return M==p||M==m}function vl(b){return typeof b=="number"&&b>-1&&b%1==0&&b<=l}function Da(b){var M=typeof b;return!!b&&(M=="object"||M=="function")}function Sa(b){return!!b&&typeof b=="object"}function xl(b){return typeof b=="symbol"||Sa(b)&&Kt.call(b)==k}var BM=zt?pe(zt):_M;function WM(b){return b==null?"":kM(b)}function YM(b,M,P){var U=b==null?void 0:hh(b,M);return U===void 0?P:U}function zM(b,M){return b!=null&&RM(b,M,bM)}function Ma(b){return wh(b)?gM(b):DM(b)}function HM(b,M){var P={};return M=TM(M),mM(b,function(U,st,Z){P[M(U,st,Z)]=U}),P}function $M(b){return b}function jM(b){return _a(b)?Se(Ta(b)):CM(b)}n.exports=HM}(ma,ma.exports);var xD=ma.exports;const wD=Fn(xD);var _D=1/0,TD=9007199254740991,DD="[object Arguments]",SD="[object Function]",MD="[object GeneratorFunction]",CD="[object Symbol]",kD=typeof ge=="object"&&ge&&ge.Object===Object&&ge,OD=typeof self=="object"&&self&&self.Object===Object&&self,PD=kD||OD||Function("return this")();function ED(n,t,e){switch(e.length){case 0:return n.call(t);case 1:return n.call(t,e[0]);case 2:return n.call(t,e[0],e[1]);case 3:return n.call(t,e[0],e[1],e[2])}return n.apply(t,e)}function AD(n,t){for(var e=-1,i=n?n.length:0,r=Array(i);++e<i;)r[e]=t(n[e],e,n);return r}function RD(n,t){for(var e=-1,i=t.length,r=n.length;++e<i;)n[r+e]=t[e];return n}var ll=Object.prototype,LD=ll.hasOwnProperty,cl=ll.toString,Qf=PD.Symbol,ID=ll.propertyIsEnumerable,Jf=Qf?Qf.isConcatSpreadable:void 0,th=Math.max;function eh(n,t,e,i,r){var a=-1,s=n.length;for(e||(e=BD),r||(r=[]);++a<s;){var o=n[a];t>0&&e(o)?t>1?eh(o,t-1,e,i,r):RD(r,o):i||(r[r.length]=o)}return r}function ND(n,t){return n=Object(n),FD(n,t,function(e,i){return i in n})}function FD(n,t,e){for(var i=-1,r=t.length,a={};++i<r;){var s=t[i],o=n[s];e(o,s)&&(a[s]=o)}return a}function UD(n,t){return t=th(t===void 0?n.length-1:t,0),function(){for(var e=arguments,i=-1,r=th(e.length-t,0),a=Array(r);++i<r;)a[i]=e[t+i];i=-1;for(var s=Array(t+1);++i<t;)s[i]=e[i];return s[t]=a,ED(n,this,s)}}function BD(n){return zD(n)||YD(n)||!!(Jf&&n&&n[Jf])}function WD(n){if(typeof n=="string"||XD(n))return n;var t=n+"";return t=="0"&&1/n==-_D?"-0":t}function YD(n){return $D(n)&&LD.call(n,"callee")&&(!ID.call(n,"callee")||cl.call(n)==DD)}var zD=Array.isArray;function HD(n){return n!=null&&VD(n.length)&&!jD(n)}function $D(n){return nh(n)&&HD(n)}function jD(n){var t=qD(n)?cl.call(n):"";return t==SD||t==MD}function VD(n){return typeof n=="number"&&n>-1&&n%1==0&&n<=TD}function qD(n){var t=typeof n;return!!n&&(t=="object"||t=="function")}function nh(n){return!!n&&typeof n=="object"}function XD(n){return typeof n=="symbol"||nh(n)&&cl.call(n)==CD}var GD=UD(function(n,t){return n==null?{}:ND(n,AD(eh(t,1),WD))}),KD=GD;const ZD=Fn(KD);var ih={exports:{}};(function(n,t){(function(e,i){i()})(ge,function(){function e(c,u){return typeof u>"u"?u={autoBom:!1}:typeof u!="object"&&(console.warn("Deprecated: Expected third argument to be a object"),u={autoBom:!u}),u.autoBom&&/^\s*(?:text\/\S*|application\/xml|\S*\/\S*\+xml)\s*;.*charset\s*=\s*utf-8/i.test(c.type)?new Blob(["\uFEFF",c],{type:c.type}):c}function i(c,u,d){var f=new XMLHttpRequest;f.open("GET",c),f.responseType="blob",f.onload=function(){l(f.response,u,d)},f.onerror=function(){console.error("could not download file")},f.send()}function r(c){var u=new XMLHttpRequest;u.open("HEAD",c,!1);try{u.send()}catch{}return 200<=u.status&&299>=u.status}function a(c){try{c.dispatchEvent(new MouseEvent("click"))}catch{var u=document.createEvent("MouseEvents");u.initMouseEvent("click",!0,!0,window,0,0,0,80,20,!1,!1,!1,!1,0,null),c.dispatchEvent(u)}}var s=typeof window=="object"&&window.window===window?window:typeof self=="object"&&self.self===self?self:typeof ge=="object"&&ge.global===ge?ge:void 0,o=s.navigator&&/Macintosh/.test(navigator.userAgent)&&/AppleWebKit/.test(navigator.userAgent)&&!/Safari/.test(navigator.userAgent),l=s.saveAs||(typeof window!="object"||window!==s?function(){}:"download"in HTMLAnchorElement.prototype&&!o?function(c,u,d){var f=s.URL||s.webkitURL,g=document.createElement("a");u=u||c.name||"download",g.download=u,g.rel="noopener",typeof c=="string"?(g.href=c,g.origin===location.origin?a(g):r(g.href)?i(c,u,d):a(g,g.target="_blank")):(g.href=f.createObjectURL(c),setTimeout(function(){f.revokeObjectURL(g.href)},4e4),setTimeout(function(){a(g)},0))}:"msSaveOrOpenBlob"in navigator?function(c,u,d){if(u=u||c.name||"download",typeof c!="string")navigator.msSaveOrOpenBlob(e(c,d),u);else if(r(c))i(c,u,d);else{var f=document.createElement("a");f.href=c,f.target="_blank",setTimeout(function(){a(f)})}}:function(c,u,d,f){if(f=f||open("","_blank"),f&&(f.document.title=f.document.body.innerText="downloading..."),typeof c=="string")return i(c,u,d);var g=c.type==="application/octet-stream",p=/constructor/i.test(s.HTMLElement)||s.safari,m=/CriOS\/[\d]+/.test(navigator.userAgent);if((m||g&&p||o)&&typeof FileReader<"u"){var y=new FileReader;y.onloadend=function(){var w=y.result;w=m?w:w.replace(/^data:[^;]*;/,"data:attachment/file;"),f?f.location.href=w:location=w,f=null},y.readAsDataURL(c)}else{var v=s.URL||s.webkitURL,x=v.createObjectURL(c);f?f.location=x:location.href=x,f=null,setTimeout(function(){v.revokeObjectURL(x)},4e4)}});s.saveAs=l.saveAs=l,n.exports=l})})(ih);var QD=ih.exports,rh={exports:{}};/* @license
|
|
29
|
+
*/const uD={datetime:"MMM d, yyyy, h:mm:ss aaaa",millisecond:"h:mm:ss.SSS aaaa",second:"h:mm:ss aaaa",minute:"h:mm aaaa",hour:"ha",day:"MMM d",week:"PP",month:"MMM yyyy",quarter:"qqq - yyyy",year:"yyyy"};Cc._date.override({_id:"date-fns",formats:function(){return uD},parse:function(n,t){if(n===null||typeof n>"u")return null;const e=typeof n;return e==="number"||n instanceof Date?n=J(n):e==="string"&&(typeof t=="string"?n=dx(n,t,new Date,this.options):n=hd(n,this.options)),Ds(n)?n.getTime():null},format:function(n,t){return fv(n,t,this.options)},add:function(n,t,e){switch(e){case"millisecond":return ji(n,t);case"second":return By(n,t);case"minute":return Fy(n,t);case"hour":return Ay(n,t);case"day":return Wu(n,t);case"week":return Wy(n,t);case"month":return _s(n,t);case"quarter":return Uy(n,t);case"year":return Yy(n,t);default:return n}},diff:function(n,t,e){switch(e){case"millisecond":return qr(n,t);case"second":return Qy(n,t);case"minute":return Gy(n,t);case"hour":return Xy(n,t);case"day":return Hu(n,t);case"week":return Jy(n,t);case"month":return qu(n,t);case"quarter":return Zy(n,t);case"year":return tb(n,t);default:return 0}},startOf:function(n,t,e){switch(t){case"second":return gx(n);case"minute":return eb(n);case"hour":return hx(n);case"day":return Ts(n);case"week":return Yu(n);case"isoWeek":return Yu(n,{weekStartsOn:+e});case"month":return ib(n);case"quarter":return nb(n);case"year":return ab(n);default:return n}},endOf:function(n,t){switch(t){case"second":return ub(n);case"minute":return lb(n);case"hour":return sb(n);case"day":return ju(n);case"week":return ob(n);case"month":return Vu(n);case"quarter":return cb(n);case"year":return rb(n);default:return n}}});const Xf={data:{type:Object,required:!0},options:{type:Object,default:()=>({})},plugins:{type:Array,default:()=>[]},datasetIdKey:{type:String,default:"label"},updateMode:{type:String,default:void 0}},dD={type:{type:String,required:!0},...Xf,...{ariaLabel:{type:String},ariaDescribedby:{type:String}}},fD=h.version[0]==="2"?(n,t)=>Object.assign(n,{attrs:t}):(n,t)=>Object.assign(n,t);function hi(n){return h.isProxy(n)?h.toRaw(n):n}function hD(n){let t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:n;return h.isProxy(t)?new Proxy(n,{}):n}function gD(n,t){const e=n.options;e&&t&&Object.assign(e,t)}function Gf(n,t){n.labels=t}function Kf(n,t,e){const i=[];n.datasets=t.map(r=>{const a=n.datasets.find(s=>s[e]===r[e]);return!a||!r.data||i.includes(a)?{...r}:(i.push(a),Object.assign(a,r),a)})}function pD(n,t){const e={labels:[],datasets:[]};return Gf(e,n.labels),Kf(e,n.datasets,t),e}const mD=h.defineComponent({props:dD,setup(n,t){let{expose:e,slots:i}=t;const r=h.ref(null),a=h.shallowRef(null);e({chart:a});const s=()=>{if(!r.value)return;const{type:c,data:u,options:d,plugins:f,datasetIdKey:g}=n,p=pD(u,g),m=hD(p,u);a.value=new Te(r.value,{type:c,data:m,options:{...d},plugins:f})},o=()=>{const c=h.toRaw(a.value);c&&(c.destroy(),a.value=null)},l=c=>{c.update(n.updateMode)};return h.onMounted(s),h.onBeforeUnmount(o),h.watch([()=>n.options,()=>n.data],(c,u)=>{let[d,f]=c,[g,p]=u;const m=h.toRaw(a.value);if(!m)return;let y=!1;if(d){const v=hi(d),x=hi(g);v&&v!==x&&(gD(m,v),y=!0)}if(f){const v=hi(f.labels),x=hi(p.labels),w=hi(f.datasets),_=hi(p.datasets);v!==x&&(Gf(m.config.data,v),y=!0),w&&w!==_&&(Kf(m.config.data,w,n.datasetIdKey),y=!0)}y&&h.nextTick(()=>{l(m)})},{deep:!0}),()=>h.h("canvas",{role:"img",ariaLabel:n.ariaLabel,ariaDescribedby:n.ariaDescribedby,ref:r},[h.h("p",{},[i.default?i.default():""])])}});function ol(n,t){return Te.register(t),h.defineComponent({props:Xf,setup(e,i){let{expose:r}=i;const a=h.shallowRef(null),s=o=>{a.value=o==null?void 0:o.chart};return r({chart:a}),()=>h.h(mD,fD({ref:s},{type:n,...e}))}})}const yD=ol("bar",Pi),Zf=ol("doughnut",hn),bD=ol("line",Ei),vD={class:"chart-container"},xD=h.defineComponent({__name:"DoughnutChart",props:{chartData:{type:Object,required:!1,default:null},fill:{type:Boolean,required:!1,default:!1},tooltipTitle:{type:String,required:!0},metricUnit:{type:String,required:!1,default:""},legendPosition:{type:String,required:!1,default:Bt.Right},legendValues:{type:Object,required:!1,default:null},syntheticsDataKey:{type:String,required:!1,default:""},datasetColors:{type:Object,required:!1,default:De}},setup(n){const t=n,{translateUnit:e}=St.useTranslatedUnits(),i=h.ref(_n()),r=h.ref(_n()),a=h.ref([]),s=h.reactive({showTooltip:!1,tooltipContext:"",tooltipSeries:[],left:"",top:"",units:t.metricUnit,translateUnit:e,offset:0,width:0,height:0,chartType:ee.DOUGHNUT}),o={id:i.value,afterUpdate(m){a.value=m.options.plugins.legend.labels.generateLabels(m).map(y=>({...y,value:t.legendValues&&t.legendValues[y.text],hidden:!1}))}},l=h.computed(()=>[o]),c=h.computed(()=>[t.chartData.datasets.reduce((y,v)=>(y.labels.push(v.label),y.backgroundColor.push(v.backgroundColor),y.borderColor.push(Ji(v.backgroundColor,50)),y.data.push(v.data.reduce((x,w)=>x+w,0)),y),{labels:[],backgroundColor:[],borderColor:[],data:[]})]),u=h.computed(()=>({...t.chartData,datasets:c.value}));St.useReportChartDataForSynthetics(h.toRef(t,"chartData"),h.toRef(t,"syntheticsDataKey"));const{options:d}=St.useDoughnutChartOptions({tooltipState:s,legendID:i.value}),f=h.ref(),g=m=>({[Bt.Right]:"legend-row",[Bt.Bottom]:"column",[Bt.Hidden]:"hidden"})[m],p=({width:m,height:y})=>{s.width=m,s.height=y};return(m,y)=>(h.openBlock(),h.createElementBlock("div",{class:h.normalizeClass(["chart-parent",g(n.legendPosition)]),"data-testid":"doughnut-chart-parent"},[h.createElementVNode("div",vD,[h.createVNode(h.unref(Zf),{ref_key:"chartInstance",ref:f,"chart-id":r.value,data:u.value,options:h.unref(d),plugins:l.value},null,8,["chart-id","data","options","plugins"]),h.createVNode(rl,{left:s.left,series:s.tooltipSeries,"show-tooltip":s.showTooltip,"tooltip-title":n.tooltipTitle,top:s.top,unit:n.metricUnit,onDimensions:p},null,8,["left","series","show-tooltip","tooltip-title","top","unit"])]),h.createVNode(al,{id:i.value,"chart-instance":f.value,items:a.value,position:n.legendPosition},null,8,["id","chart-instance","items","position"])],2))}}),wD=Ke(xD,[["__scopeId","data-v-c005e7f5"]]);var Hn=(n=>(n.String="string",n.Number="number",n.Boolean="boolean",n.Object="object",n.Undefined="undefined",n))(Hn||{}),ma={exports:{}};ma.exports,function(n,t){var e=200,i="Expected a function",r="__lodash_hash_undefined__",a=1,s=2,o=1/0,l=9007199254740991,c="[object Arguments]",u="[object Array]",d="[object Boolean]",f="[object Date]",g="[object Error]",p="[object Function]",m="[object GeneratorFunction]",y="[object Map]",v="[object Number]",x="[object Object]",w="[object Promise]",_="[object RegExp]",S="[object Set]",C="[object String]",k="[object Symbol]",T="[object WeakMap]",D="[object ArrayBuffer]",O="[object DataView]",A="[object Float32Array]",R="[object Float64Array]",W="[object Int8Array]",V="[object Int16Array]",L="[object Int32Array]",H="[object Uint8Array]",I="[object Uint8ClampedArray]",et="[object Uint16Array]",z="[object Uint32Array]",Mt=/\.|\[(?:[^[\]]*|(["'])(?:(?!\1)[^\\]|\\.)*?\1)\]/,F=/^\w*$/,E=/^\./,$=/[^.[\]]+|\[(?:(-?\d+(?:\.\d+)?)|(["'])((?:(?!\2)[^\\]|\\.)*?)\2)\]|(?=(?:\.|\[\])(?:\.|\[\]|$))/g,K=/[\\^$.*+?()[\]{}|]/g,X=/\\(\\)?/g,Q=/^\[object .+?Constructor\]$/,at=/^(?:0|[1-9]\d*)$/,B={};B[A]=B[R]=B[W]=B[V]=B[L]=B[H]=B[I]=B[et]=B[z]=!0,B[c]=B[u]=B[D]=B[d]=B[O]=B[f]=B[g]=B[p]=B[y]=B[v]=B[x]=B[_]=B[S]=B[C]=B[T]=!1;var N=typeof ge=="object"&&ge&&ge.Object===Object&&ge,tt=typeof self=="object"&&self&&self.Object===Object&&self,rt=N||tt||Function("return this")(),Ct=t&&!t.nodeType&&t,gt=Ct&&!0&&n&&!n.nodeType&&n,It=gt&>.exports===Ct,Tt=It&&N.process,lt=function(){try{return Tt&&Tt.binding("util")}catch{}}(),zt=lt&<.isTypedArray;function Gt(b,M){for(var P=-1,U=b?b.length:0;++P<U;)if(M(b[P],P,b))return!0;return!1}function Se(b){return function(M){return M==null?void 0:M[b]}}function Ee(b,M){for(var P=-1,U=Array(b);++P<b;)U[P]=M(P);return U}function pe(b){return function(M){return b(M)}}function Rt(b,M){return b==null?void 0:b[M]}function Nt(b){var M=!1;if(b!=null&&typeof b.toString!="function")try{M=!!(b+"")}catch{}return M}function Ze(b){var M=-1,P=Array(b.size);return b.forEach(function(U,st){P[++M]=[st,U]}),P}function Dt(b,M){return function(P){return b(M(P))}}function Dn(b){var M=-1,P=Array(b.size);return b.forEach(function(U){P[++M]=U}),P}var Ae=Array.prototype,Qe=Function.prototype,xe=Object.prototype,Me=rt["__core-js_shared__"],Re=function(){var b=/[^.]+$/.exec(Me&&Me.keys&&Me.keys.IE_PROTO||"");return b?"Symbol(src)_1."+b:""}(),le=Qe.toString,me=xe.hasOwnProperty,Kt=xe.toString,ya=RegExp("^"+le.call(me).replace(K,"\\$&").replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g,"$1.*?")+"$"),gi=rt.Symbol,dh=rt.Uint8Array,WS=xe.propertyIsEnumerable,YS=Ae.splice,zS=Dt(Object.keys,Object),fl=pi(rt,"DataView"),lr=pi(rt,"Map"),hl=pi(rt,"Promise"),gl=pi(rt,"Set"),pl=pi(rt,"WeakMap"),cr=pi(Object,"create"),HS=jn(fl),$S=jn(lr),jS=jn(hl),VS=jn(gl),qS=jn(pl),ba=gi?gi.prototype:void 0,ml=ba?ba.valueOf:void 0,fh=ba?ba.toString:void 0;function $n(b){var M=-1,P=b?b.length:0;for(this.clear();++M<P;){var U=b[M];this.set(U[0],U[1])}}function XS(){this.__data__=cr?cr(null):{}}function GS(b){return this.has(b)&&delete this.__data__[b]}function KS(b){var M=this.__data__;if(cr){var P=M[b];return P===r?void 0:P}return me.call(M,b)?M[b]:void 0}function ZS(b){var M=this.__data__;return cr?M[b]!==void 0:me.call(M,b)}function QS(b,M){var P=this.__data__;return P[b]=cr&&M===void 0?r:M,this}$n.prototype.clear=XS,$n.prototype.delete=GS,$n.prototype.get=KS,$n.prototype.has=ZS,$n.prototype.set=QS;function Je(b){var M=-1,P=b?b.length:0;for(this.clear();++M<P;){var U=b[M];this.set(U[0],U[1])}}function JS(){this.__data__=[]}function tM(b){var M=this.__data__,P=xa(M,b);if(P<0)return!1;var U=M.length-1;return P==U?M.pop():YS.call(M,P,1),!0}function eM(b){var M=this.__data__,P=xa(M,b);return P<0?void 0:M[P][1]}function nM(b){return xa(this.__data__,b)>-1}function iM(b,M){var P=this.__data__,U=xa(P,b);return U<0?P.push([b,M]):P[U][1]=M,this}Je.prototype.clear=JS,Je.prototype.delete=tM,Je.prototype.get=eM,Je.prototype.has=nM,Je.prototype.set=iM;function tn(b){var M=-1,P=b?b.length:0;for(this.clear();++M<P;){var U=b[M];this.set(U[0],U[1])}}function rM(){this.__data__={hash:new $n,map:new(lr||Je),string:new $n}}function aM(b){return wa(this,b).delete(b)}function sM(b){return wa(this,b).get(b)}function oM(b){return wa(this,b).has(b)}function lM(b,M){return wa(this,b).set(b,M),this}tn.prototype.clear=rM,tn.prototype.delete=aM,tn.prototype.get=sM,tn.prototype.has=oM,tn.prototype.set=lM;function va(b){var M=-1,P=b?b.length:0;for(this.__data__=new tn;++M<P;)this.add(b[M])}function cM(b){return this.__data__.set(b,r),this}function uM(b){return this.__data__.has(b)}va.prototype.add=va.prototype.push=cM,va.prototype.has=uM;function en(b){this.__data__=new Je(b)}function dM(){this.__data__=new Je}function fM(b){return this.__data__.delete(b)}function hM(b){return this.__data__.get(b)}function gM(b){return this.__data__.has(b)}function pM(b,M){var P=this.__data__;if(P instanceof Je){var U=P.__data__;if(!lr||U.length<e-1)return U.push([b,M]),this;P=this.__data__=new tn(U)}return P.set(b,M),this}en.prototype.clear=dM,en.prototype.delete=fM,en.prototype.get=hM,en.prototype.has=gM,en.prototype.set=pM;function mM(b,M){var P=Vn(b)||xh(b)?Ee(b.length,String):[],U=P.length,st=!!U;for(var Z in b)(M||me.call(b,Z))&&!(st&&(Z=="length"||mh(Z,U)))&&P.push(Z);return P}function xa(b,M){for(var P=b.length;P--;)if(vh(b[P][0],M))return P;return-1}var yM=EM();function bM(b,M){return b&&yM(b,M,Ma)}function hh(b,M){M=_a(M,b)?[M]:gh(M);for(var P=0,U=M.length;b!=null&&P<U;)b=b[Ta(M[P++])];return P&&P==U?b:void 0}function vM(b){return Kt.call(b)}function xM(b,M){return b!=null&&M in Object(b)}function yl(b,M,P,U,st){return b===M?!0:b==null||M==null||!Da(b)&&!Sa(M)?b!==b&&M!==M:wM(b,M,yl,P,U,st)}function wM(b,M,P,U,st,Z){var vt=Vn(b),Ot=Vn(M),Ht=u,Qt=u;vt||(Ht=Sn(b),Ht=Ht==c?x:Ht),Ot||(Qt=Sn(M),Qt=Qt==c?x:Qt);var ce=Ht==x&&!Nt(b),ye=Qt==x&&!Nt(M),Jt=Ht==Qt;if(Jt&&!ce)return Z||(Z=new en),vt||YM(b)?ph(b,M,P,U,st,Z):AM(b,M,Ht,P,U,st,Z);if(!(st&s)){var Ce=ce&&me.call(b,"__wrapped__"),ke=ye&&me.call(M,"__wrapped__");if(Ce||ke){var Mn=Ce?b.value():b,nn=ke?M.value():M;return Z||(Z=new en),P(Mn,nn,U,st,Z)}}return Jt?(Z||(Z=new en),RM(b,M,P,U,st,Z)):!1}function _M(b,M,P,U){var st=P.length,Z=st,vt=!U;if(b==null)return!Z;for(b=Object(b);st--;){var Ot=P[st];if(vt&&Ot[2]?Ot[1]!==b[Ot[0]]:!(Ot[0]in b))return!1}for(;++st<Z;){Ot=P[st];var Ht=Ot[0],Qt=b[Ht],ce=Ot[1];if(vt&&Ot[2]){if(Qt===void 0&&!(Ht in b))return!1}else{var ye=new en;if(U)var Jt=U(Qt,ce,Ht,b,M,ye);if(!(Jt===void 0?yl(ce,Qt,U,a|s,ye):Jt))return!1}}return!0}function TM(b){if(!Da(b)||FM(b))return!1;var M=_h(b)||Nt(b)?ya:Q;return M.test(jn(b))}function DM(b){return Sa(b)&&vl(b.length)&&!!B[Kt.call(b)]}function SM(b){return typeof b=="function"?b:b==null?VM:typeof b=="object"?Vn(b)?kM(b[0],b[1]):CM(b):qM(b)}function MM(b){if(!UM(b))return zS(b);var M=[];for(var P in Object(b))me.call(b,P)&&P!="constructor"&&M.push(P);return M}function CM(b){var M=LM(b);return M.length==1&&M[0][2]?bh(M[0][0],M[0][1]):function(P){return P===b||_M(P,b,M)}}function kM(b,M){return _a(b)&&yh(M)?bh(Ta(b),M):function(P){var U=HM(P,b);return U===void 0&&U===M?$M(P,b):yl(M,U,void 0,a|s)}}function OM(b){return function(M){return hh(M,b)}}function PM(b){if(typeof b=="string")return b;if(xl(b))return fh?fh.call(b):"";var M=b+"";return M=="0"&&1/b==-o?"-0":M}function gh(b){return Vn(b)?b:BM(b)}function EM(b){return function(M,P,U){for(var st=-1,Z=Object(M),vt=U(M),Ot=vt.length;Ot--;){var Ht=vt[b?Ot:++st];if(P(Z[Ht],Ht,Z)===!1)break}return M}}function ph(b,M,P,U,st,Z){var vt=st&s,Ot=b.length,Ht=M.length;if(Ot!=Ht&&!(vt&&Ht>Ot))return!1;var Qt=Z.get(b);if(Qt&&Z.get(M))return Qt==M;var ce=-1,ye=!0,Jt=st&a?new va:void 0;for(Z.set(b,M),Z.set(M,b);++ce<Ot;){var Ce=b[ce],ke=M[ce];if(U)var Mn=vt?U(ke,Ce,ce,M,b,Z):U(Ce,ke,ce,b,M,Z);if(Mn!==void 0){if(Mn)continue;ye=!1;break}if(Jt){if(!Gt(M,function(nn,qn){if(!Jt.has(qn)&&(Ce===nn||P(Ce,nn,U,st,Z)))return Jt.add(qn)})){ye=!1;break}}else if(!(Ce===ke||P(Ce,ke,U,st,Z))){ye=!1;break}}return Z.delete(b),Z.delete(M),ye}function AM(b,M,P,U,st,Z,vt){switch(P){case O:if(b.byteLength!=M.byteLength||b.byteOffset!=M.byteOffset)return!1;b=b.buffer,M=M.buffer;case D:return!(b.byteLength!=M.byteLength||!U(new dh(b),new dh(M)));case d:case f:case v:return vh(+b,+M);case g:return b.name==M.name&&b.message==M.message;case _:case C:return b==M+"";case y:var Ot=Ze;case S:var Ht=Z&s;if(Ot||(Ot=Dn),b.size!=M.size&&!Ht)return!1;var Qt=vt.get(b);if(Qt)return Qt==M;Z|=a,vt.set(b,M);var ce=ph(Ot(b),Ot(M),U,st,Z,vt);return vt.delete(b),ce;case k:if(ml)return ml.call(b)==ml.call(M)}return!1}function RM(b,M,P,U,st,Z){var vt=st&s,Ot=Ma(b),Ht=Ot.length,Qt=Ma(M),ce=Qt.length;if(Ht!=ce&&!vt)return!1;for(var ye=Ht;ye--;){var Jt=Ot[ye];if(!(vt?Jt in M:me.call(M,Jt)))return!1}var Ce=Z.get(b);if(Ce&&Z.get(M))return Ce==M;var ke=!0;Z.set(b,M),Z.set(M,b);for(var Mn=vt;++ye<Ht;){Jt=Ot[ye];var nn=b[Jt],qn=M[Jt];if(U)var Th=vt?U(qn,nn,Jt,M,b,Z):U(nn,qn,Jt,b,M,Z);if(!(Th===void 0?nn===qn||P(nn,qn,U,st,Z):Th)){ke=!1;break}Mn||(Mn=Jt=="constructor")}if(ke&&!Mn){var Ca=b.constructor,ka=M.constructor;Ca!=ka&&"constructor"in b&&"constructor"in M&&!(typeof Ca=="function"&&Ca instanceof Ca&&typeof ka=="function"&&ka instanceof ka)&&(ke=!1)}return Z.delete(b),Z.delete(M),ke}function wa(b,M){var P=b.__data__;return NM(M)?P[typeof M=="string"?"string":"hash"]:P.map}function LM(b){for(var M=Ma(b),P=M.length;P--;){var U=M[P],st=b[U];M[P]=[U,st,yh(st)]}return M}function pi(b,M){var P=Rt(b,M);return TM(P)?P:void 0}var Sn=vM;(fl&&Sn(new fl(new ArrayBuffer(1)))!=O||lr&&Sn(new lr)!=y||hl&&Sn(hl.resolve())!=w||gl&&Sn(new gl)!=S||pl&&Sn(new pl)!=T)&&(Sn=function(b){var M=Kt.call(b),P=M==x?b.constructor:void 0,U=P?jn(P):void 0;if(U)switch(U){case HS:return O;case $S:return y;case jS:return w;case VS:return S;case qS:return T}return M});function IM(b,M,P){M=_a(M,b)?[M]:gh(M);for(var U,st=-1,vt=M.length;++st<vt;){var Z=Ta(M[st]);if(!(U=b!=null&&P(b,Z)))break;b=b[Z]}if(U)return U;var vt=b?b.length:0;return!!vt&&vl(vt)&&mh(Z,vt)&&(Vn(b)||xh(b))}function mh(b,M){return M=M??l,!!M&&(typeof b=="number"||at.test(b))&&b>-1&&b%1==0&&b<M}function _a(b,M){if(Vn(b))return!1;var P=typeof b;return P=="number"||P=="symbol"||P=="boolean"||b==null||xl(b)?!0:F.test(b)||!Mt.test(b)||M!=null&&b in Object(M)}function NM(b){var M=typeof b;return M=="string"||M=="number"||M=="symbol"||M=="boolean"?b!=="__proto__":b===null}function FM(b){return!!Re&&Re in b}function UM(b){var M=b&&b.constructor,P=typeof M=="function"&&M.prototype||xe;return b===P}function yh(b){return b===b&&!Da(b)}function bh(b,M){return function(P){return P==null?!1:P[b]===M&&(M!==void 0||b in Object(P))}}var BM=bl(function(b){b=zM(b);var M=[];return E.test(b)&&M.push(""),b.replace($,function(P,U,st,Z){M.push(st?Z.replace(X,"$1"):U||P)}),M});function Ta(b){if(typeof b=="string"||xl(b))return b;var M=b+"";return M=="0"&&1/b==-o?"-0":M}function jn(b){if(b!=null){try{return le.call(b)}catch{}try{return b+""}catch{}}return""}function bl(b,M){if(typeof b!="function"||M&&typeof M!="function")throw new TypeError(i);var P=function(){var U=arguments,st=M?M.apply(this,U):U[0],Z=P.cache;if(Z.has(st))return Z.get(st);var vt=b.apply(this,U);return P.cache=Z.set(st,vt),vt};return P.cache=new(bl.Cache||tn),P}bl.Cache=tn;function vh(b,M){return b===M||b!==b&&M!==M}function xh(b){return WM(b)&&me.call(b,"callee")&&(!WS.call(b,"callee")||Kt.call(b)==c)}var Vn=Array.isArray;function wh(b){return b!=null&&vl(b.length)&&!_h(b)}function WM(b){return Sa(b)&&wh(b)}function _h(b){var M=Da(b)?Kt.call(b):"";return M==p||M==m}function vl(b){return typeof b=="number"&&b>-1&&b%1==0&&b<=l}function Da(b){var M=typeof b;return!!b&&(M=="object"||M=="function")}function Sa(b){return!!b&&typeof b=="object"}function xl(b){return typeof b=="symbol"||Sa(b)&&Kt.call(b)==k}var YM=zt?pe(zt):DM;function zM(b){return b==null?"":PM(b)}function HM(b,M,P){var U=b==null?void 0:hh(b,M);return U===void 0?P:U}function $M(b,M){return b!=null&&IM(b,M,xM)}function Ma(b){return wh(b)?mM(b):MM(b)}function jM(b,M){var P={};return M=SM(M),bM(b,function(U,st,Z){P[M(U,st,Z)]=U}),P}function VM(b){return b}function qM(b){return _a(b)?Se(Ta(b)):OM(b)}n.exports=jM}(ma,ma.exports);var _D=ma.exports;const TD=Fn(_D);var DD=1/0,SD=9007199254740991,MD="[object Arguments]",CD="[object Function]",kD="[object GeneratorFunction]",OD="[object Symbol]",PD=typeof ge=="object"&&ge&&ge.Object===Object&&ge,ED=typeof self=="object"&&self&&self.Object===Object&&self,AD=PD||ED||Function("return this")();function RD(n,t,e){switch(e.length){case 0:return n.call(t);case 1:return n.call(t,e[0]);case 2:return n.call(t,e[0],e[1]);case 3:return n.call(t,e[0],e[1],e[2])}return n.apply(t,e)}function LD(n,t){for(var e=-1,i=n?n.length:0,r=Array(i);++e<i;)r[e]=t(n[e],e,n);return r}function ID(n,t){for(var e=-1,i=t.length,r=n.length;++e<i;)n[r+e]=t[e];return n}var ll=Object.prototype,ND=ll.hasOwnProperty,cl=ll.toString,Qf=AD.Symbol,FD=ll.propertyIsEnumerable,Jf=Qf?Qf.isConcatSpreadable:void 0,th=Math.max;function eh(n,t,e,i,r){var a=-1,s=n.length;for(e||(e=YD),r||(r=[]);++a<s;){var o=n[a];t>0&&e(o)?t>1?eh(o,t-1,e,i,r):ID(r,o):i||(r[r.length]=o)}return r}function UD(n,t){return n=Object(n),BD(n,t,function(e,i){return i in n})}function BD(n,t,e){for(var i=-1,r=t.length,a={};++i<r;){var s=t[i],o=n[s];e(o,s)&&(a[s]=o)}return a}function WD(n,t){return t=th(t===void 0?n.length-1:t,0),function(){for(var e=arguments,i=-1,r=th(e.length-t,0),a=Array(r);++i<r;)a[i]=e[t+i];i=-1;for(var s=Array(t+1);++i<t;)s[i]=e[i];return s[t]=a,RD(n,this,s)}}function YD(n){return $D(n)||HD(n)||!!(Jf&&n&&n[Jf])}function zD(n){if(typeof n=="string"||KD(n))return n;var t=n+"";return t=="0"&&1/n==-DD?"-0":t}function HD(n){return VD(n)&&ND.call(n,"callee")&&(!FD.call(n,"callee")||cl.call(n)==MD)}var $D=Array.isArray;function jD(n){return n!=null&&XD(n.length)&&!qD(n)}function VD(n){return nh(n)&&jD(n)}function qD(n){var t=GD(n)?cl.call(n):"";return t==CD||t==kD}function XD(n){return typeof n=="number"&&n>-1&&n%1==0&&n<=SD}function GD(n){var t=typeof n;return!!n&&(t=="object"||t=="function")}function nh(n){return!!n&&typeof n=="object"}function KD(n){return typeof n=="symbol"||nh(n)&&cl.call(n)==OD}var ZD=WD(function(n,t){return n==null?{}:UD(n,LD(eh(t,1),zD))}),QD=ZD;const JD=Fn(QD);var ih={exports:{}};(function(n,t){(function(e,i){i()})(ge,function(){function e(c,u){return typeof u>"u"?u={autoBom:!1}:typeof u!="object"&&(console.warn("Deprecated: Expected third argument to be a object"),u={autoBom:!u}),u.autoBom&&/^\s*(?:text\/\S*|application\/xml|\S*\/\S*\+xml)\s*;.*charset\s*=\s*utf-8/i.test(c.type)?new Blob(["\uFEFF",c],{type:c.type}):c}function i(c,u,d){var f=new XMLHttpRequest;f.open("GET",c),f.responseType="blob",f.onload=function(){l(f.response,u,d)},f.onerror=function(){console.error("could not download file")},f.send()}function r(c){var u=new XMLHttpRequest;u.open("HEAD",c,!1);try{u.send()}catch{}return 200<=u.status&&299>=u.status}function a(c){try{c.dispatchEvent(new MouseEvent("click"))}catch{var u=document.createEvent("MouseEvents");u.initMouseEvent("click",!0,!0,window,0,0,0,80,20,!1,!1,!1,!1,0,null),c.dispatchEvent(u)}}var s=typeof window=="object"&&window.window===window?window:typeof self=="object"&&self.self===self?self:typeof ge=="object"&&ge.global===ge?ge:void 0,o=s.navigator&&/Macintosh/.test(navigator.userAgent)&&/AppleWebKit/.test(navigator.userAgent)&&!/Safari/.test(navigator.userAgent),l=s.saveAs||(typeof window!="object"||window!==s?function(){}:"download"in HTMLAnchorElement.prototype&&!o?function(c,u,d){var f=s.URL||s.webkitURL,g=document.createElement("a");u=u||c.name||"download",g.download=u,g.rel="noopener",typeof c=="string"?(g.href=c,g.origin===location.origin?a(g):r(g.href)?i(c,u,d):a(g,g.target="_blank")):(g.href=f.createObjectURL(c),setTimeout(function(){f.revokeObjectURL(g.href)},4e4),setTimeout(function(){a(g)},0))}:"msSaveOrOpenBlob"in navigator?function(c,u,d){if(u=u||c.name||"download",typeof c!="string")navigator.msSaveOrOpenBlob(e(c,d),u);else if(r(c))i(c,u,d);else{var f=document.createElement("a");f.href=c,f.target="_blank",setTimeout(function(){a(f)})}}:function(c,u,d,f){if(f=f||open("","_blank"),f&&(f.document.title=f.document.body.innerText="downloading..."),typeof c=="string")return i(c,u,d);var g=c.type==="application/octet-stream",p=/constructor/i.test(s.HTMLElement)||s.safari,m=/CriOS\/[\d]+/.test(navigator.userAgent);if((m||g&&p||o)&&typeof FileReader<"u"){var y=new FileReader;y.onloadend=function(){var w=y.result;w=m?w:w.replace(/^data:[^;]*;/,"data:attachment/file;"),f?f.location.href=w:location=w,f=null},y.readAsDataURL(c)}else{var v=s.URL||s.webkitURL,x=v.createObjectURL(c);f?f.location=x:location.href=x,f=null,setTimeout(function(){v.revokeObjectURL(x)},4e4)}});s.saveAs=l.saveAs=l,n.exports=l})})(ih);var tS=ih.exports,rh={exports:{}};/* @license
|
|
30
30
|
Papa Parse
|
|
31
31
|
v5.4.1
|
|
32
32
|
https://github.com/mholt/PapaParse
|
|
@@ -40,5 +40,5 @@ License: MIT
|
|
|
40
40
|
`:"\r"}(N,Ct)),A=!1,T.delimiter)k(T.delimiter)&&(T.delimiter=T.delimiter(N),E.meta.delimiter=T.delimiter);else{var gt=function(Tt,lt,zt,Gt,Se){var Ee,pe,Rt,Nt;Se=Se||[","," ","|",";",l.RECORD_SEP,l.UNIT_SEP];for(var Ze=0;Ze<Se.length;Ze++){var Dt=Se[Ze],Dn=0,Ae=0,Qe=0;Rt=void 0;for(var xe=new v({comments:Gt,delimiter:Dt,newline:lt,preview:10}).parse(Tt),Me=0;Me<xe.data.length;Me++)if(zt&&K(xe.data[Me]))Qe++;else{var Re=xe.data[Me].length;Ae+=Re,Rt!==void 0?0<Re&&(Dn+=Math.abs(Re-Rt),Rt=Re):Rt=Re}0<xe.data.length&&(Ae/=xe.data.length-Qe),(pe===void 0||Dn<=pe)&&(Nt===void 0||Nt<Ae)&&1.99<Ae&&(pe=Dn,Ee=Dt,Nt=Ae)}return{successful:!!(T.delimiter=Ee),bestDelimiter:Ee}}(N,T.newline,T.skipEmptyLines,T.comments,T.delimitersToGuess);gt.successful?T.delimiter=gt.bestDelimiter:(A=!0,T.delimiter=l.DefaultDelimiter),E.meta.delimiter=T.delimiter}var It=S(T);return T.preview&&T.header&&It.preview++,D=N,O=new v(It),E=O.parse(D,tt,rt),X(),z?{meta:{paused:!0}}:E||{meta:{paused:!1}}},this.paused=function(){return z},this.pause=function(){z=!0,O.abort(),D=k(T.chunk)?"":D.substring(O.getCharIndex())},this.resume=function(){H.streamer._halted?(z=!1,H.streamer.parseChunk(D,!0)):setTimeout(H.resume,3)},this.aborted=function(){return Mt},this.abort=function(){Mt=!0,O.abort(),E.meta.aborted=!0,k(T.complete)&&T.complete(E),D=""}}function y(T){return T.replace(/[.*+?^${}()|[\]\\]/g,"\\$&")}function v(T){var D,O=(T=T||{}).delimiter,A=T.newline,R=T.comments,W=T.step,V=T.preview,L=T.fastMode,H=D=T.quoteChar===void 0||T.quoteChar===null?'"':T.quoteChar;if(T.escapeChar!==void 0&&(H=T.escapeChar),(typeof O!="string"||-1<l.BAD_DELIMITERS.indexOf(O))&&(O=","),R===O)throw new Error("Comment character same as delimiter");R===!0?R="#":(typeof R!="string"||-1<l.BAD_DELIMITERS.indexOf(R))&&(R=!1),A!==`
|
|
41
41
|
`&&A!=="\r"&&A!==`\r
|
|
42
42
|
`&&(A=`
|
|
43
|
-
`);var I=0,et=!1;this.parse=function(z,Mt,F){if(typeof z!="string")throw new Error("Input must be a string");var E=z.length,$=O.length,K=A.length,X=R.length,Q=k(W),at=[],B=[],N=[],tt=I=0;if(!z)return le();if(T.header&&!Mt){var rt=z.split(A)[0].split(O),Ct=[],gt={},It=!1;for(var Tt in rt){var lt=rt[Tt];k(T.transformHeader)&&(lt=T.transformHeader(lt,Tt));var zt=lt,Gt=gt[lt]||0;for(0<Gt&&(It=!0,zt=lt+"_"+Gt),gt[lt]=Gt+1;Ct.includes(zt);)zt=zt+"_"+Gt;Ct.push(zt)}if(It){var Se=z.split(A);Se[0]=Ct.join(O),z=Se.join(A)}}if(L||L!==!1&&z.indexOf(D)===-1){for(var Ee=z.split(A),pe=0;pe<Ee.length;pe++){if(N=Ee[pe],I+=N.length,pe!==Ee.length-1)I+=A.length;else if(F)return le();if(!R||N.substring(0,X)!==R){if(Q){if(at=[],Qe(N.split(O)),me(),et)return le()}else Qe(N.split(O));if(V&&V<=pe)return at=at.slice(0,V),le(!0)}}return le()}for(var Rt=z.indexOf(O,I),Nt=z.indexOf(A,I),Ze=new RegExp(y(H)+y(D),"g"),Dt=z.indexOf(D,I);;)if(z[I]!==D)if(R&&N.length===0&&z.substring(I,I+X)===R){if(Nt===-1)return le();I=Nt+K,Nt=z.indexOf(A,I),Rt=z.indexOf(O,I)}else if(Rt!==-1&&(Rt<Nt||Nt===-1))N.push(z.substring(I,Rt)),I=Rt+$,Rt=z.indexOf(O,I);else{if(Nt===-1)break;if(N.push(z.substring(I,Nt)),Re(Nt+K),Q&&(me(),et))return le();if(V&&at.length>=V)return le(!0)}else for(Dt=I,I++;;){if((Dt=z.indexOf(D,Dt+1))===-1)return F||B.push({type:"Quotes",code:"MissingQuotes",message:"Quoted field unterminated",row:at.length,index:I}),Me();if(Dt===E-1)return Me(z.substring(I,Dt).replace(Ze,D));if(D!==H||z[Dt+1]!==H){if(D===H||Dt===0||z[Dt-1]!==H){Rt!==-1&&Rt<Dt+1&&(Rt=z.indexOf(O,Dt+1)),Nt!==-1&&Nt<Dt+1&&(Nt=z.indexOf(A,Dt+1));var Dn=xe(Nt===-1?Rt:Math.min(Rt,Nt));if(z.substr(Dt+1+Dn,$)===O){N.push(z.substring(I,Dt).replace(Ze,D)),z[I=Dt+1+Dn+$]!==D&&(Dt=z.indexOf(D,I)),Rt=z.indexOf(O,I),Nt=z.indexOf(A,I);break}var Ae=xe(Nt);if(z.substring(Dt+1+Ae,Dt+1+Ae+K)===A){if(N.push(z.substring(I,Dt).replace(Ze,D)),Re(Dt+1+Ae+K),Rt=z.indexOf(O,I),Dt=z.indexOf(D,I),Q&&(me(),et))return le();if(V&&at.length>=V)return le(!0);break}B.push({type:"Quotes",code:"InvalidQuotes",message:"Trailing quote on quoted field is malformed",row:at.length,index:I}),Dt++}}else Dt++}return Me();function Qe(Kt){at.push(Kt),tt=I}function xe(Kt){var ya=0;if(Kt!==-1){var gi=z.substring(Dt+1,Kt);gi&&gi.trim()===""&&(ya=gi.length)}return ya}function Me(Kt){return F||(Kt===void 0&&(Kt=z.substring(I)),N.push(Kt),I=E,Qe(N),Q&&me()),le()}function Re(Kt){I=Kt,Qe(N),N=[],Nt=z.indexOf(A,I)}function le(Kt){return{data:at,errors:B,meta:{delimiter:O,linebreak:A,aborted:et,truncated:!!Kt,cursor:tt+(Mt||0)}}}function me(){W(le()),at=[],B=[]}},this.abort=function(){et=!0},this.getCharIndex=function(){return I}}function x(T){var D=T.data,O=s[D.workerId],A=!1;if(D.error)O.userError(D.error,D.file);else if(D.results&&D.results.data){var R={abort:function(){A=!0,w(D.workerId,{data:[],errors:[],meta:{aborted:!0}})},pause:_,resume:_};if(k(O.userStep)){for(var W=0;W<D.results.data.length&&(O.userStep({data:D.results.data[W],errors:D.results.errors,meta:D.results.meta},R),!A);W++);delete D.results}else k(O.userChunk)&&(O.userChunk(D.results,R,D.file),delete D.results)}D.finished&&!A&&w(D.workerId,D.results)}function w(T,D){var O=s[T];k(O.userComplete)&&O.userComplete(D),O.terminate(),delete s[T]}function _(){throw new Error("Not implemented.")}function S(T){if(typeof T!="object"||T===null)return T;var D=Array.isArray(T)?[]:{};for(var O in T)D[O]=S(T[O]);return D}function C(T,D){return function(){T.apply(D,arguments)}}function k(T){return typeof T=="function"}return a&&(i.onmessage=function(T){var D=T.data;if(l.WORKER_ID===void 0&&D&&(l.WORKER_ID=D.workerId),typeof D.input=="string")i.postMessage({workerId:l.WORKER_ID,results:l.parse(D.input,D.config),finished:!0});else if(i.File&&D.input instanceof File||D.input instanceof Object){var O=l.parse(D.input,D.config);O&&i.postMessage({workerId:l.WORKER_ID,results:O,finished:!0})}}),(d.prototype=Object.create(u.prototype)).constructor=d,(f.prototype=Object.create(u.prototype)).constructor=f,(g.prototype=Object.create(g.prototype)).constructor=g,(p.prototype=Object.create(u.prototype)).constructor=p,l})})(rh);var
|
|
44
|
-
`+u),i.encoding==="utf-8"&&(u="\uFEFF"+u),e("export-finished",i.filename),!i.testing){const d=new Blob([u],{type:"text/csv;charset="+i.encoding});QD.saveAs(d,i.filename)}};return(u,d)=>(h.openBlock(),h.createElementBlock("div",{id:r.value,"data-testid":"export-csv",onClick:c},[h.renderSlot(u.$slots,"default",{},()=>[h.createTextVNode("Download "+h.toDisplayString(n.filename),1)])],8,tS))}}),nS=h.defineComponent({__name:"DownloadCsv",props:{rows:{},headers:{},filename:{}},setup(n){const t=n,e=h.computed(()=>Object.keys(t.headers));return(i,r)=>(h.openBlock(),h.createElementBlock("div",null,[h.createVNode(eS,{data:i.rows,fields:e.value,filename:i.filename,labels:i.headers},{default:h.withCtx(()=>[h.renderSlot(i.$slots,"default")]),_:3},8,["data","fields","filename","labels"])]))}}),iS={class:"kong-ui-public-csv-export-modal"},rS={key:0,class:"selected-range"},aS={key:1,class:"text-muted",tag:"span"},ah=3,sh=h.defineComponent({__name:"CsvExportModal",props:{filename:{},modalDescription:{default:void 0},selectedRange:{},chartData:{}},emits:["toggleModal"],setup(n,{emit:t}){const{i18n:e}=St.useI18n(),i=n,r=t,a=`${i.filename.replace(/\s+/g,"-").toLowerCase()}-${new Date().toISOString().slice(0,10)}.csv`,s=h.ref(!0),o=h.computed(()=>{var p,m;return!!((m=(p=i.chartData)==null?void 0:p.records)!=null&&m.length)}),l=h.ref(1),c=h.computed(()=>f.value.rows.length),u=h.computed(()=>e.t("csvExport.previewRows",{rowsMax:Math.min(ah,c.value),rowsTotal:c.value,plural:c.value===1?"":"s"})),d=()=>{r("toggleModal",!1)},f=h.computed(()=>{var _,S,C;if(!o.value||!((_=i.chartData)!=null&&_.meta.metricNames))return{headers:[],rows:[],csvHeaders:{}};const p=i.chartData.records.some(k=>k.timestamp!==i.chartData.records[0].timestamp),m=i.chartData.records.map(k=>{const T=new Date(k.timestamp);return{...k.event,...p?{timestamp:To(T,"yyyy-MM-dd HH:mm:ss"),tzOffset:To(T,"XXX")}:{}}});let y=[];p&&(y=[{label:"Timestamp",key:"timestamp"},{label:"UtcOffset",key:"tzOffset"}]);const v="dimensions"in i.chartData.meta&&((S=i.chartData.meta)!=null&&S.dimensions)?(C=i.chartData.meta)==null?void 0:C.dimensions:{},x=[...y,...Object.keys(v).map(k=>({label:k,key:k})),...i.chartData.meta.metricNames.map(k=>({label:k,key:k}))],w=x.reduce((k,T)=>(k[T.key]=T.label,k),{});return{headers:x,csvHeaders:w,rows:m}}),g=()=>{const{rows:p}=f.value;return s.value=!1,{total:Number(p.length)||0,data:p.slice(0,ah)}};return h.watch(f,()=>{l.value++}),(p,m)=>{const y=h.resolveComponent("KEmptyState"),v=h.resolveComponent("KTable"),x=h.resolveComponent("KButton"),w=h.resolveComponent("KPrompt");return h.openBlock(),h.createElementBlock("div",iS,[h.createVNode(w,{class:"vitals-report","data-testid":"csv-export-modal","is-visible":"","show-dismiss-icon":"","text-align":"left",title:h.unref(e).t("csvExport.exportPreview"),onCanceled:d,onKeyup:h.withKeys(d,["esc"])},{"body-content":h.withCtx(()=>{var _;return[h.createElementVNode("div",null,[o.value?(h.openBlock(),h.createElementBlock("div",rS,[h.createElementVNode("p",null,h.toDisplayString(p.modalDescription?p.modalDescription:h.unref(e).t("csvExport.exportDescription")),1),h.createElementVNode("p",null,h.toDisplayString(h.unref(e).t("csvExport.exportTimeRange"))+": "+h.toDisplayString(p.selectedRange),1)])):h.createCommentVNode("",!0),h.createVNode(v,{class:"vitals-table","disable-pagination":"","disable-sorting":"",fetcher:g,"fetcher-cache-key":String(l.value),"has-hover":!1,headers:((_=f.value)==null?void 0:_.headers)||[]},{"empty-state":h.withCtx(()=>[h.createVNode(y,{"cta-is-hidden":"",icon:"stateNoData","icon-size":"96"},{title:h.withCtx(()=>[h.createElementVNode("h5",null,h.toDisplayString(h.unref(e).t("csvExport.noDataRange")),1)]),message:h.withCtx(()=>[h.createElementVNode("p",null,h.toDisplayString(h.unref(e).t("csvExport.noDataRetry")),1)]),_:1})]),_:1},8,["fetcher-cache-key","headers"]),!s.value&&o.value?(h.openBlock(),h.createElementBlock("div",aS,h.toDisplayString(u.value),1)):h.createCommentVNode("",!0)])]}),"action-buttons":h.withCtx(()=>[h.createVNode(x,{appearance:"secondary",class:"cancel-btn",onClick:d},{default:h.withCtx(()=>[h.createTextVNode(h.toDisplayString(h.unref(e).t("csvExport.cancelButton")),1)]),_:1}),h.createVNode(nS,{class:"vitals-report-export-button",filename:a,headers:f.value.csvHeaders,rows:f.value.rows},{default:h.withCtx(()=>[h.createVNode(x,{appearance:"primary","data-testid":"csv-download-button",disabled:s.value||!o.value},{default:h.withCtx(()=>[h.createTextVNode(h.toDisplayString(h.unref(e).t("csvExport.downloadButton")),1)]),_:1},8,["disabled"])]),_:1},8,["headers","rows"])]),_:1},8,["title"])])}}}),oh=(n,t,e,i)=>{n.save(),n.beginPath(),n.moveTo(t,e),n.lineTo(t,i),n.lineWidth=1,n.strokeStyle="#0275d8",n.stroke(),n.restore()},ul={id:"linePlugin",afterDatasetsDraw:function(n){if(n.tooltip&&n.tooltip.getActiveElements()&&n.tooltip.getActiveElements().length&&!this.clickedSegment){const{x:t}=n.tooltip.dataPoints[0].element,e=n.ctx;oh(e,t,n.scales.y.top,n.scales.y.bottom)}if(this.clickedSegment){const{x:t}=this.clickedSegment.element,e=n.ctx;oh(e,t,n.scales.y.top,n.scales.y.bottom)}},beforeDestroy(){delete this.clickedSegment}},sS=h.defineComponent({__name:"TimeSeriesChart",props:{chartData:{type:Object,required:!1,default:null},type:{type:String,required:!1,default:ee.TIMESERIES_LINE},fill:{type:Boolean,required:!1,default:!1},tooltipTitle:{type:String,required:!0},metricUnit:{type:String,required:!1,default:""},timeRangeMs:{type:Number,required:!1,default:void 0},timeRangeSec:{type:Number,required:!1,default:void 0},granularity:{type:String,required:!0},stacked:{type:Boolean,required:!1,default:!0},legendValues:{type:Object,required:!1,default:null},metricAxesTitle:{type:String,required:!1,default:null},dimensionAxesTitle:{type:String,required:!1,default:null},syntheticsDataKey:{type:String,required:!1,default:""},datasetColors:{type:Object,required:!1,default:De},chartLegendSortFn:{type:Function,required:!1,default:(n,t)=>n.value&&t.value&&t.value.raw-n.value.raw},chartTooltipSortFn:{type:Function,required:!1,default:(n,t)=>t.rawValue-n.rawValue}},setup(n){const t=n,{translateUnit:e}=St.useTranslatedUnits(),i=h.ref(),r=h.ref(_n()),a=h.ref(_n()),s=h.ref([]),o=h.ref(),l=h.ref(h.inject("legendPosition",Bt.Right)),c=h.reactive({showTooltip:!1,tooltipContext:"",tooltipSeries:[],left:"",top:"",units:t.metricUnit,translateUnit:e,offset:0,width:0,height:0,chartType:t.type,locked:!1,chartTooltipSortFn:t.chartTooltipSortFn}),u={id:r.value,afterUpdate(x){s.value=x.options.plugins.legend.labels.generateLabels(x).map(w=>({...w,value:t.legendValues&&t.legendValues[w.text]})).sort(t.chartLegendSortFn)}},d=h.computed(()=>[u,Vf,...t.type===ee.TIMESERIES_LINE?[ul]:[]]),{options:f}=St.useLinechartOptions({tooltipState:c,timeRangeMs:h.toRef(t,"timeRangeMs"),timeRangeSec:h.toRef(t,"timeRangeSec"),granularity:h.toRef(t,"granularity"),legendID:r.value,stacked:h.toRef(t,"stacked"),metricAxesTitle:h.toRef(t,"metricAxesTitle"),dimensionAxesTitle:h.toRef(t,"dimensionAxesTitle")}),g=h.computed(()=>({...t.chartData,datasets:t.chartData.datasets.map((x,w)=>(Array.isArray(t.datasetColors)?(x.backgroundColor=t.datasetColors[w%t.datasetColors.length],x.borderColor=Ji(x.backgroundColor,50)):x.rawDimension in t.datasetColors&&(x.backgroundColor=t.datasetColors[x.rawDimension],x.borderColor=Ji(x.backgroundColor,50)),x.fill=t.fill,x))}));St.useReportChartDataForSynthetics(h.toRef(t,"chartData"),h.toRef(t,"syntheticsDataKey"));const p=x=>ea(x,{short:[ot.DAILY,ot.WEEKLY].includes(t.granularity)}),m=x=>({[Bt.Right]:"legend-row",[Bt.Bottom]:"column",[Bt.Hidden]:"hidden"})[x],y=({width:x,height:w})=>{c.width=x,c.height=w},v=()=>{var x,w,_;c.locked=!c.locked,i.value&&((w=(x=i.value.chart.tooltip)==null?void 0:x.dataPoints)!=null&&w.length)&&(ul.clickedSegment=c.locked?(_=i.value.chart.tooltip)==null?void 0:_.dataPoints[0]:void 0)};return h.watch(()=>t.type,()=>{c.locked=!1,c.showTooltip=!1,delete ul.clickedSegment}),(x,w)=>(h.openBlock(),h.createElementBlock("div",{class:h.normalizeClass(["chart-parent",m(l.value)]),"data-testid":"line-chart-parent"},[h.createElementVNode("div",{class:"chart-container",onClick:w[0]||(w[0]=_=>v())},[n.type===h.unref(ee).TIMESERIES_LINE?(h.openBlock(),h.createBlock(h.unref(mD),{key:0,ref_key:"chartInstance",ref:i,"chart-id":a.value,data:g.value,"data-testid":"time-series-line-chart",options:h.unref(f),plugins:d.value},null,8,["chart-id","data","options","plugins"])):n.type===h.unref(ee).TIMESERIES_BAR?(h.openBlock(),h.createBlock(h.unref(pD),{key:1,ref_key:"chartInstance",ref:i,"chart-id":a.value,data:g.value,"data-testid":"time-series-bar-chart",options:h.unref(f),plugins:d.value},null,8,["chart-id","data","options","plugins"])):h.createCommentVNode("",!0)]),h.createVNode(rl,{ref_key:"tooltipElement",ref:o,context:p(c.tooltipContext),"data-testid":"tooltip",left:c.left,locked:c.locked,series:c.tooltipSeries,"show-tooltip":c.showTooltip,"tooltip-title":n.tooltipTitle,top:c.top,unit:n.metricUnit,onDimensions:y,onLeft:w[1]||(w[1]=_=>c.left=_),onTop:w[2]||(w[2]=_=>c.top=_)},null,8,["context","left","locked","series","show-tooltip","tooltip-title","top","unit"]),h.createVNode(al,{id:r.value,"chart-instance":i.value,"data-testid":"legend",items:s.value},null,8,["id","chart-instance","items"])],2))}}),oS=Ke(sS,[["__scopeId","data-v-1aa05a3a"]]),lS={class:"analytics-chart-shell"},cS={class:"chart-header"},uS={key:0,class:"chart-title"},dS={class:"chart-header-icons-wrapper"},fS={key:1,class:"chart-export-button"},hS={key:1,class:"analytics-chart-parent"},gS=h.defineComponent({__name:"AnalyticsChart",props:{allowCsvExport:{type:Boolean,required:!1,default:!1},chartData:{type:Object,required:!0},chartOptions:{type:Object,required:!0},tooltipTitle:{type:String,required:!0},emptyStateTitle:{type:String,required:!1,default:""},emptyStateDescription:{type:String,required:!1,default:""},chartTitle:{type:String,required:!1,default:void 0},filenamePrefix:{type:String,required:!1,default:void 0},legendPosition:{type:String,required:!1,default:Bt.Right},syntheticsDataKey:{type:String,required:!1,default:""},height:{type:String,required:!1,default:"500px",validator:n=>/(\d *)(px)/.test(n)},width:{type:String,required:!1,default:"100%",validator:n=>/(\d *)(px|%)/.test(n)},showLegendValues:{type:Boolean,required:!1,default:!0},showAnnotations:{type:Boolean,required:!1,default:!0}},setup(n){h.useCssVars(L=>({"55ce9380":i.value,"1cb391c8":t.width}));const t=n,{i18n:e}=St.useI18n(),i=h.ref(t.height),r=h.computed(()=>t.filenamePrefix??(t.chartTitle||e.t("csvExport.defaultFilename"))),a=L=>{i.value=`${L}px`};h.watch(()=>t.height,L=>{i.value=L});const s=h.toRef(t,"chartData"),o=h.computed(()=>v.value?St.useExploreResultToTimeDataset({fill:t.chartOptions.fill,colorPalette:t.chartOptions.chartDatasetColors||De},h.toRef(t,"chartData")).value:St.useExploreResultToDatasets({fill:t.chartOptions.fill,colorPalette:t.chartOptions.chartDatasetColors||De},h.toRef(t,"chartData")).value),l=h.computed(()=>{var L;return(L=t.chartData)!=null&&L.meta?"start"in t.chartData.meta?t.chartData.meta.end-t.chartData.meta.start:void 0:0}),c=h.computed(()=>{var L;return(L=t.chartData)!=null&&L.meta?"startMs"in t.chartData.meta?t.chartData.meta.endMs-t.chartData.meta.startMs:void 0:0}),u=h.computed(()=>{var L;return(L=t.chartData.meta)!=null&&L.metricUnits?Object.values(t.chartData.meta.metricUnits)[0]:""}),d=h.computed(()=>t.showLegendValues&&t.legendPosition!==Bt.Bottom),{legendValues:f}=St.useChartLegendValues(o,t.chartOptions.type,u),g=h.computed(()=>{var L,H,I;return((I=(H=(L=t.chartData)==null?void 0:L.meta)==null?void 0:H.limit)==null?void 0:I.toString())||null}),p=h.computed(()=>{var L,H;return((H=(L=t.chartData)==null?void 0:L.meta)==null?void 0:H.truncated)||!1}),m=e.t("limitedResultsShown",{maxReturned:g.value}),y=h.computed(()=>[ee.VERTICAL_BAR.toString(),ee.HORIZONTAL_BAR.toString()].includes(t.chartOptions.type)),v=h.computed(()=>[ee.TIMESERIES_BAR,ee.TIMESERIES_LINE].some(L=>L===t.chartOptions.type)),x=h.computed(()=>t.chartOptions.type===ee.DOUGHNUT),w=h.computed(()=>t.chartOptions.type.includes("Vertical")?"vertical":"horizontal"),_=h.computed(()=>{var I,et,z;if(!((I=t.chartData)!=null&&I.meta.metricNames)||!((et=t.chartData)!=null&&et.meta.metricUnits))return;const L=t.chartData.meta.metricNames[0],H=t.chartData.meta.metricUnits[L];return((z=t.chartOptions)==null?void 0:z.metricAxesTitle)||e.te(`metricAxisTitles.${L}`)&&e.te(`chartUnits.${H}`)&&e.t(`metricAxisTitles.${L}`,{unit:e.t(`chartUnits.${H}`,{plural:"s"})})||void 0}),S=h.computed(()=>{const L=v.value?"Time":Object.keys(t.chartData.meta.dimensions||t.chartData.meta.metricNames)[0];return t.chartOptions.dimensionAxesTitle||e.te(`chartLabels.${L}`)&&e.t(`chartLabels.${L}`)||void 0}),C=h.computed(()=>{if(t.chartData.meta.granularity&&typeof t.chartData.meta.granularity!="number"&&"duration"in t.chartData.meta.granularity){const L=er(t.chartData.meta.granularity.duration);return e.t(`granularityAxisTitles.${L}`)}else if(t.chartData.meta.granularity&&!isNaN(Number(t.chartData.meta.granularity))){const L=er(Number(t.chartData.meta.granularity));return e.t(`granularityAxisTitles.${L}`)}return e.t("chartlabels.Time")}),k=h.computed(()=>t.emptyStateTitle||e.t("noDataAvailableTitle")),T=h.computed(()=>t.emptyStateDescription||e.t("noDataAvailableDescription")),D=h.computed(()=>v.value?Nx(o.value):t.chartData&&t.chartData.meta&&t.chartData.records.length),O=h.computed(()=>t.chartData.meta.granularity?typeof t.chartData.meta.granularity=="number"?er(t.chartData.meta.granularity)||ot.HOURLY:er(t.chartData.meta.granularity.duration)||ot.HOURLY:er(new Date(t.chartData.records[1].timestamp).getTime()-new Date(t.chartData.records[0].timestamp).getTime())||ot.HOURLY),A=h.ref(!1),R=St.useChartSelectedRange(s),W=L=>{A.value=L},V=()=>{W(!0)};return h.provide("showLegendValues",d),h.provide("legendPosition",h.toRef(t,"legendPosition")),(L,H)=>{const I=h.resolveComponent("KTooltip"),et=h.resolveComponent("KButton"),z=h.resolveComponent("KEmptyState");return h.openBlock(),h.createElementBlock("div",lS,[h.createElementVNode("div",cS,[n.chartTitle?(h.openBlock(),h.createElementBlock("div",uS,h.toDisplayString(n.chartTitle),1)):h.createCommentVNode("",!0),h.createElementVNode("div",dS,[D.value&&p.value&&g.value?(h.openBlock(),h.createBlock(I,{key:0,class:"tooltip","max-width":"500",placement:"right"},{content:h.withCtx(()=>[h.createTextVNode(h.toDisplayString(h.unref(m)),1)]),default:h.withCtx(()=>[h.createVNode(h.unref(LT),{color:h.unref(NT),decorative:"",size:h.unref(FT)},null,8,["color","size"])]),_:1})):h.createCommentVNode("",!0)]),n.allowCsvExport&&D.value?(h.openBlock(),h.createElementBlock("div",fS,[h.createVNode(et,{appearance:"tertiary",class:"chart-export-button-display","data-testid":"csv-export-button",onClick:h.withModifiers(V,["prevent"])},{default:h.withCtx(()=>[h.createTextVNode(h.toDisplayString(h.unref(e).t("csvExport.exportButton")),1)]),_:1})])):h.createCommentVNode("",!0),n.allowCsvExport&&D.value&&A.value?(h.openBlock(),h.createBlock(sh,{key:2,"chart-data":s.value,filename:r.value,"selected-range":h.unref(R),onToggleModal:W},null,8,["chart-data","filename","selected-range"])):h.createCommentVNode("",!0)]),D.value?(h.openBlock(),h.createElementBlock("div",hS,[v.value?(h.openBlock(),h.createBlock(oS,{key:0,"chart-data":o.value,"chart-legend-sort-fn":n.chartOptions.chartLegendSortFn,"chart-tooltip-sort-fn":n.chartOptions.chartTooltipSortFn,"dataset-colors":n.chartOptions.chartDatasetColors,"dimension-axes-title":C.value,fill:n.chartOptions.fill,granularity:O.value,"legend-values":h.unref(f),"metric-axes-title":_.value,"metric-unit":u.value,stacked:n.chartOptions.stacked,"synthetics-data-key":n.syntheticsDataKey,"time-range-ms":c.value,"time-range-sec":l.value,"tooltip-title":n.tooltipTitle,type:n.chartOptions.type},null,8,["chart-data","chart-legend-sort-fn","chart-tooltip-sort-fn","dataset-colors","dimension-axes-title","fill","granularity","legend-values","metric-axes-title","metric-unit","stacked","synthetics-data-key","time-range-ms","time-range-sec","tooltip-title","type"])):y.value?(h.openBlock(),h.createBlock(oD,{key:1,annotations:n.showAnnotations,"chart-data":o.value,"chart-legend-sort-fn":n.chartOptions.chartLegendSortFn,"chart-tooltip-sort-fn":n.chartOptions.chartTooltipSortFn,"data-testid":"bar-chart-container","dimension-axes-title":S.value,"legend-values":h.unref(f),"metric-axes-title":_.value,"metric-unit":u.value,orientation:w.value,stacked:n.chartOptions.stacked,"synthetics-data-key":n.syntheticsDataKey,"tooltip-title":n.tooltipTitle,onHeightUpdate:a},null,8,["annotations","chart-data","chart-legend-sort-fn","chart-tooltip-sort-fn","dimension-axes-title","legend-values","metric-axes-title","metric-unit","orientation","stacked","synthetics-data-key","tooltip-title"])):x.value?(h.openBlock(),h.createBlock(vD,{key:2,"chart-data":o.value,"dataset-colors":n.chartOptions.chartDatasetColors,fill:n.chartOptions.fill,"legend-position":n.legendPosition,"legend-values":h.unref(f),"metric-unit":u.value,"synthetics-data-key":n.syntheticsDataKey,"tooltip-title":n.tooltipTitle},null,8,["chart-data","dataset-colors","fill","legend-position","legend-values","metric-unit","synthetics-data-key","tooltip-title"])):h.createCommentVNode("",!0)])):(h.openBlock(),h.createBlock(z,{key:0,class:"chart-empty-state","cta-is-hidden":!0,"data-testid":"no-data-in-report",icon:"stateNoData","icon-size":"170"},{title:h.withCtx(()=>[h.createTextVNode(h.toDisplayString(k.value),1)]),message:h.withCtx(()=>[h.createTextVNode(h.toDisplayString(T.value),1)]),_:1}))])}}}),pS=Ke(gS,[["__scopeId","data-v-3432f859"]]),mS={class:"chart-parent","data-testid":"doughnut-chart-parent"},yS={class:"chart-totals-flex"},bS={key:1,class:"metric-small","data-testid":"doughnut-chart-total"},vS=h.defineComponent({__name:"GaugeChart",props:{chartData:{type:Object,required:!1,default:null},metricDisplay:{type:String,required:!1,default:ii.Hidden},numerator:{type:Number,required:!1,default:0},syntheticsDataKey:{type:String,required:!1,default:""},datasetColors:{type:Object,required:!1,default:De},height:{type:String,required:!1,default:"400px",validator:n=>/(\d *)(px|%)/.test(n)},width:{type:String,required:!1,default:"100%",validator:n=>/(\d *)(px|%)/.test(n)}},setup(n){const t=n,{i18n:e}=St.useI18n(),i=h.ref(_n()),r=h.computed(()=>[t.chartData.datasets.reduce((p,m)=>(p.labels.push(m.label),p.borderColor.push(m.backgroundColor),p.backgroundColor.push(m.backgroundColor),p.data.push(m.data.reduce((y,v)=>y+v,0)),p),{labels:[],backgroundColor:[],borderColor:[],data:[]})]),a=h.computed(()=>({...t.chartData,datasets:r.value}));St.useReportChartDataForSynthetics(h.toRef(t,"chartData"),h.toRef(t,"syntheticsDataKey"));const s={responsive:!0,maintainAspectRatio:!0,cutout:"78%",circumference:"200",rotation:"260",plugins:{legend:{display:!1}}},o=h.ref(),l=h.computed(()=>{var g;return tr((g=r==null?void 0:r.value[0])==null?void 0:g.data[t.numerator],{capital:!0})}),c=h.computed(()=>{var g,p;return tr(((g=r==null?void 0:r.value[0])==null?void 0:g.data[0])+((p=r==null?void 0:r.value[0])==null?void 0:p.data[1]),{capital:!0})}),u=h.computed(()=>{var g;return`color: ${(g=r==null?void 0:r.value[0])==null?void 0:g.backgroundColor[t.numerator]}`}),d=h.computed(()=>[ii.Full,ii.SingleMetric].includes(t.metricDisplay)),f=h.computed(()=>t.metricDisplay===ii.Full);return(g,p)=>(h.openBlock(),h.createElementBlock("div",mS,[h.createElementVNode("div",yS,[d.value?(h.openBlock(),h.createElementBlock("div",{key:0,class:"metric-large","data-testid":"doughnut-chart-metric",style:h.normalizeStyle(u.value)},h.toDisplayString(l.value),5)):h.createCommentVNode("",!0),f.value?(h.openBlock(),h.createElementBlock("div",bS,h.toDisplayString(h.unref(e).t("total"))+": "+h.toDisplayString(c.value),1)):h.createCommentVNode("",!0)]),h.createElementVNode("div",{class:"chart-container",style:h.normalizeStyle({height:n.height,width:n.width})},[h.createVNode(h.unref(Zf),{ref_key:"chartInstance",ref:o,"chart-id":i.value,data:a.value,options:s},null,8,["chart-id","data","options"])],4)]))}}),xS=Ke(vS,[["__scopeId","data-v-5871cb7a"]]),wS={class:"simple-chart-shell"},_S={key:1,class:"analytics-chart-parent"},TS=Ke(h.defineComponent({__name:"SimpleChart",props:{chartData:{type:Object,required:!0},chartOptions:{type:Object,required:!0},emptyStateTitle:{type:String,required:!1,default:""},syntheticsDataKey:{type:String,required:!1,default:""},height:{type:String,required:!1,default:"400px",validator:n=>/(\d *)(px|%)/.test(n)},width:{type:String,required:!1,default:"100%",validator:n=>/(\d *)(px|%)/.test(n)}},setup(n){const t=n,{i18n:e}=St.useI18n(),i=h.computed(()=>{var c;const l=St.useExploreResultToDatasets({colorPalette:t.chartOptions.chartDatasetColors||De},h.toRef(t,"chartData")).value;return(c=t.chartOptions)!=null&&c.reverseDataset&&(l==null||l.datasets.reverse()),l}),r=h.computed(()=>{var l;return(l=t.chartData.meta)!=null&&l.metricUnits?Object.values(t.chartData.meta.metricUnits)[0]:""}),a=h.computed(()=>t.chartOptions.type===Qr.GAUGE),s=h.computed(()=>t.emptyStateTitle||e.t("noDataAvailableTitle")),o=h.computed(()=>t.chartData&&t.chartData.meta&&t.chartData.records.length);return(l,c)=>{const u=h.resolveComponent("KEmptyState");return h.openBlock(),h.createElementBlock("div",wS,[o.value?(h.openBlock(),h.createElementBlock("div",_S,[a.value?(h.openBlock(),h.createBlock(xS,{key:0,"chart-data":i.value,"dataset-colors":n.chartOptions.chartDatasetColors,"is-simple":"","metric-display":n.chartOptions.metricDisplay,"metric-unit":r.value,numerator:n.chartOptions.numerator,"synthetics-data-key":n.syntheticsDataKey,width:n.width},null,8,["chart-data","dataset-colors","metric-display","metric-unit","numerator","synthetics-data-key","width"])):h.createCommentVNode("",!0)])):(h.openBlock(),h.createBlock(u,{key:0,class:"chart-empty-state","cta-is-hidden":!0,"data-testid":"no-data-in-report",icon:"stateNoData","icon-size":"80"},{title:h.withCtx(()=>[h.createTextVNode(h.toDisplayString(s.value),1)]),_:1}))])}}}),[["__scopeId","data-v-f014a616"]]),DS={class:"top-n-card-title","data-testid":"top-n-card-title"},SS={class:"top-n-card-description","data-testid":"top-n-card-description"},MS={key:3,class:"top-n-table","data-testid":"top-n-table"},CS={class:"table-headings"},kS={class:"table-row"},OS={class:"column-1"},PS={class:"column-2"},ES={class:"table-body","data-testid":"top-n-data"},AS=["data-testid"],RS={class:"column-1"},LS={class:"column-2"},IS=Ke(h.defineComponent({__name:"TopNTable",props:{title:{type:String,required:!0},description:{type:String,default:""},data:{type:Object,required:!0},emptyStateTitle:{type:String,default:""},isLoading:{type:Boolean,default:!1}},setup(n){const t=n,{i18n:e}=St.useI18n(),i=h.computed(()=>t.data.records),r=h.computed(()=>{var p;return!!((p=i.value)!=null&&p.length)}),a=h.computed(()=>{var p,m;return(p=t.data.meta)!=null&&p.display&&((m=Object.keys(t.data.meta.display))==null?void 0:m[0])||""}),s=h.computed(()=>a.value?t.data.meta.display[a.value]:{}),o=h.computed(()=>{var p,m;return(m=(p=t.data.meta)==null?void 0:p.metricNames)!=null&&m.length?t.data.meta.metricNames[0]:""}),l=h.computed(()=>o.value?e.t(`chartLabels.${o.value}`)||o.value:""),c=h.computed(()=>{if(!r.value)return"";if(t.data.meta)if(Object.keys(s.value).length){if(!o.value)return e.t("topNTable.errors.metricNames")}else return e.t("topNTable.errors.display");else return e.t("topNTable.errors.meta");return""}),u=p=>{const m=p.event;return String(m[a.value])},d=p=>{const m=u(p),y=s.value[m];return y?y.name:"-"},f=p=>{const m=u(p),y=s.value[m];return y?y.deleted:!1},g=p=>{if(!o.value)return"–";const y=p.event[o.value];return y?tr(y,{capital:!0,round:!0}):"–"};return(p,m)=>{const y=h.resolveComponent("KEmptyState"),v=h.resolveComponent("KSkeleton"),x=h.resolveComponent("KCard");return h.openBlock(),h.createBlock(x,{class:"kong-ui-public-top-n-table"},h.createSlots({default:h.withCtx(()=>[c.value?(h.openBlock(),h.createBlock(y,{key:0,"cta-is-hidden":"","data-testid":"top-n-error-state","is-error":""},{title:h.withCtx(()=>[h.createTextVNode(h.toDisplayString(h.unref(e).t("topNTable.defaultErrorStateTitle")),1)]),message:h.withCtx(()=>[h.createTextVNode(h.toDisplayString(c.value),1)]),_:1})):n.isLoading?(h.openBlock(),h.createBlock(v,{key:1,"table-columns":2,type:"table"})):r.value?(h.openBlock(),h.createElementBlock("div",MS,[h.createElementVNode("div",CS,[h.createElementVNode("div",kS,[h.createElementVNode("div",OS,h.toDisplayString(h.unref(e).t("topNTable.nameLabel")),1),h.createElementVNode("div",PS,h.toDisplayString(l.value),1)])]),h.createElementVNode("div",ES,[(h.openBlock(!0),h.createElementBlock(h.Fragment,null,h.renderList(i.value,(w,_)=>(h.openBlock(),h.createElementBlock("div",{key:`entry-${_}`,class:"table-row","data-testid":`row-${u(w)}`},[h.createElementVNode("div",RS,[h.renderSlot(p.$slots,"name",{record:{id:u(w),name:d(w),deleted:f(w),dimension:a.value}},()=>[h.createTextVNode(h.toDisplayString(d(w)),1)],!0)]),h.createElementVNode("div",LS," "+h.toDisplayString(g(w)),1)],8,AS))),128))])])):(h.openBlock(),h.createBlock(y,{key:2,"cta-is-hidden":"","data-testid":"top-n-empty-state",icon:"stateNoData","icon-size":"80"},{title:h.withCtx(()=>[h.createTextVNode(h.toDisplayString(n.emptyStateTitle||h.unref(e).t("topNTable.defaultEmptyStateTitle")),1)]),_:1}))]),_:2},[n.title?{name:"title",fn:h.withCtx(()=>[h.createElementVNode("div",DS,h.toDisplayString(n.title),1)]),key:"0"}:void 0,n.description?{name:"actions",fn:h.withCtx(()=>[h.createElementVNode("div",SS,h.toDisplayString(n.description),1)]),key:"1"}:void 0]),1024)}}}),[["__scopeId","data-v-bd78642f"]]),dl="#e0e4ea",NS={100:["#c8e2fd","#80bfff","#4da6ff","#1a8cff","#0072e5","#0059b2"],200:["#ceedd2","#9edca6","#89d595","#6fcc83","#44c26b","#0bb652","#0ca84a","#169643","#196e33","#1b572a"],300:["#fff4db","#ffe9b8","#ffe2a1","#ffd982","#ffd062","#fdc53b","#f4bb1e","#e8b00b","#d9a30f","#c89407"],400:["#ffead8","#ffd5b1","#ffc899","#ffba81","#ffae6b","#fe9439","#f6871d","#eb7c0c","#da700c","#cc6100"],500:["#ffd5d5","#ffb6b6","#ff9d9d","#ff8484","#ff6a6a","#ff4545","#fb1f1f","#e90b0b","#d40202","#be0202"]},or=(n,t)=>{let e=1;const i=NS[n],r=new Map;for(const a of t)r.set(a,i[e]),e=e%(i.length-1)+1;return r.set(-1,i[0]),r},lh=new Map([[100,or("100",[100,101,102,103])],[200,or("200",[200,201,202,203,204,205,206,207,208,226])],[300,or("300",[300,301,302,303,304,305,307,308])],[400,or("400",[400,401,402,403,404,405,406,407,408,409,410,411,412,413,414,415,416,417,418,421,422,423,424,425,426,428,429,431,451])],[500,or("500",[500,501,502,503,504,505,506,507,508,510,511])]]),ch=n=>{const t=parseInt(n,10),e=Math.floor(t/100)*100,i=lh.get(e);return i===void 0?dl:i.get(t)??i.get(-1)??dl},FS=n=>{const t=ch(n);return{solid:t,light:t}};ut.AnalyticsChart=pS,ut.ChartLegendPosition=Bt,ut.ChartMetricDisplay=ii,ut.ChartTypes=ee,ut.ChartTypesSimple=Qr,ut.CsvExportModal=sh,ut.DECIMAL_DISPLAY=Nd,ut.FONT_SIZE_REGULAR=Ud,ut.FONT_SIZE_SMALL=Fd,ut.MAX_LABEL_LENGTH=na,ut.SimpleChart=TS,ut.TopNTable=IS,ut.ValidType=Hn,ut.accessibleGrey=Bd,ut.codesInSpec=lh,ut.darkenColor=Ji,ut.datavisPalette=De,ut.formatTime=ea,ut.lightGrey=dl,ut.lookupDatavisColor=ai,ut.lookupStatusCodeCategoryColor=FS,ut.lookupStatusCodeColor=ch,ut.numberFormatter=ta,Object.defineProperty(ut,Symbol.toStringTag,{value:"Module"})});
|
|
43
|
+
`);var I=0,et=!1;this.parse=function(z,Mt,F){if(typeof z!="string")throw new Error("Input must be a string");var E=z.length,$=O.length,K=A.length,X=R.length,Q=k(W),at=[],B=[],N=[],tt=I=0;if(!z)return le();if(T.header&&!Mt){var rt=z.split(A)[0].split(O),Ct=[],gt={},It=!1;for(var Tt in rt){var lt=rt[Tt];k(T.transformHeader)&&(lt=T.transformHeader(lt,Tt));var zt=lt,Gt=gt[lt]||0;for(0<Gt&&(It=!0,zt=lt+"_"+Gt),gt[lt]=Gt+1;Ct.includes(zt);)zt=zt+"_"+Gt;Ct.push(zt)}if(It){var Se=z.split(A);Se[0]=Ct.join(O),z=Se.join(A)}}if(L||L!==!1&&z.indexOf(D)===-1){for(var Ee=z.split(A),pe=0;pe<Ee.length;pe++){if(N=Ee[pe],I+=N.length,pe!==Ee.length-1)I+=A.length;else if(F)return le();if(!R||N.substring(0,X)!==R){if(Q){if(at=[],Qe(N.split(O)),me(),et)return le()}else Qe(N.split(O));if(V&&V<=pe)return at=at.slice(0,V),le(!0)}}return le()}for(var Rt=z.indexOf(O,I),Nt=z.indexOf(A,I),Ze=new RegExp(y(H)+y(D),"g"),Dt=z.indexOf(D,I);;)if(z[I]!==D)if(R&&N.length===0&&z.substring(I,I+X)===R){if(Nt===-1)return le();I=Nt+K,Nt=z.indexOf(A,I),Rt=z.indexOf(O,I)}else if(Rt!==-1&&(Rt<Nt||Nt===-1))N.push(z.substring(I,Rt)),I=Rt+$,Rt=z.indexOf(O,I);else{if(Nt===-1)break;if(N.push(z.substring(I,Nt)),Re(Nt+K),Q&&(me(),et))return le();if(V&&at.length>=V)return le(!0)}else for(Dt=I,I++;;){if((Dt=z.indexOf(D,Dt+1))===-1)return F||B.push({type:"Quotes",code:"MissingQuotes",message:"Quoted field unterminated",row:at.length,index:I}),Me();if(Dt===E-1)return Me(z.substring(I,Dt).replace(Ze,D));if(D!==H||z[Dt+1]!==H){if(D===H||Dt===0||z[Dt-1]!==H){Rt!==-1&&Rt<Dt+1&&(Rt=z.indexOf(O,Dt+1)),Nt!==-1&&Nt<Dt+1&&(Nt=z.indexOf(A,Dt+1));var Dn=xe(Nt===-1?Rt:Math.min(Rt,Nt));if(z.substr(Dt+1+Dn,$)===O){N.push(z.substring(I,Dt).replace(Ze,D)),z[I=Dt+1+Dn+$]!==D&&(Dt=z.indexOf(D,I)),Rt=z.indexOf(O,I),Nt=z.indexOf(A,I);break}var Ae=xe(Nt);if(z.substring(Dt+1+Ae,Dt+1+Ae+K)===A){if(N.push(z.substring(I,Dt).replace(Ze,D)),Re(Dt+1+Ae+K),Rt=z.indexOf(O,I),Dt=z.indexOf(D,I),Q&&(me(),et))return le();if(V&&at.length>=V)return le(!0);break}B.push({type:"Quotes",code:"InvalidQuotes",message:"Trailing quote on quoted field is malformed",row:at.length,index:I}),Dt++}}else Dt++}return Me();function Qe(Kt){at.push(Kt),tt=I}function xe(Kt){var ya=0;if(Kt!==-1){var gi=z.substring(Dt+1,Kt);gi&&gi.trim()===""&&(ya=gi.length)}return ya}function Me(Kt){return F||(Kt===void 0&&(Kt=z.substring(I)),N.push(Kt),I=E,Qe(N),Q&&me()),le()}function Re(Kt){I=Kt,Qe(N),N=[],Nt=z.indexOf(A,I)}function le(Kt){return{data:at,errors:B,meta:{delimiter:O,linebreak:A,aborted:et,truncated:!!Kt,cursor:tt+(Mt||0)}}}function me(){W(le()),at=[],B=[]}},this.abort=function(){et=!0},this.getCharIndex=function(){return I}}function x(T){var D=T.data,O=s[D.workerId],A=!1;if(D.error)O.userError(D.error,D.file);else if(D.results&&D.results.data){var R={abort:function(){A=!0,w(D.workerId,{data:[],errors:[],meta:{aborted:!0}})},pause:_,resume:_};if(k(O.userStep)){for(var W=0;W<D.results.data.length&&(O.userStep({data:D.results.data[W],errors:D.results.errors,meta:D.results.meta},R),!A);W++);delete D.results}else k(O.userChunk)&&(O.userChunk(D.results,R,D.file),delete D.results)}D.finished&&!A&&w(D.workerId,D.results)}function w(T,D){var O=s[T];k(O.userComplete)&&O.userComplete(D),O.terminate(),delete s[T]}function _(){throw new Error("Not implemented.")}function S(T){if(typeof T!="object"||T===null)return T;var D=Array.isArray(T)?[]:{};for(var O in T)D[O]=S(T[O]);return D}function C(T,D){return function(){T.apply(D,arguments)}}function k(T){return typeof T=="function"}return a&&(i.onmessage=function(T){var D=T.data;if(l.WORKER_ID===void 0&&D&&(l.WORKER_ID=D.workerId),typeof D.input=="string")i.postMessage({workerId:l.WORKER_ID,results:l.parse(D.input,D.config),finished:!0});else if(i.File&&D.input instanceof File||D.input instanceof Object){var O=l.parse(D.input,D.config);O&&i.postMessage({workerId:l.WORKER_ID,results:O,finished:!0})}}),(d.prototype=Object.create(u.prototype)).constructor=d,(f.prototype=Object.create(u.prototype)).constructor=f,(g.prototype=Object.create(g.prototype)).constructor=g,(p.prototype=Object.create(u.prototype)).constructor=p,l})})(rh);var eS=rh.exports;const nS=["id"],iS=h.defineComponent({__name:"VueJsonCsv",props:{data:{type:Array,required:!0},fields:{type:Array,required:!1,default:null},labels:{type:Object,required:!1,default:null},filename:{type:String,default:"report-data.csv"},delimiter:{type:String,default:",",required:!1},separatorExcel:{type:Boolean,default:!1},encoding:{type:String,default:"utf-8"},testing:{type:Boolean,required:!1,default:!1}},emits:["export-started","export-finished"],setup(n,{emit:t}){const e=t,i=n,r=h.computed(()=>`export_${new Date().getTime()}`),a=h.computed(()=>{const u=l();return u.length?u:null}),s=()=>{const u=i.labels;if(typeof i.fields!==Hn.Object)throw new Error("Labels needs to be a object containing key / value pairs.");return typeof u===Hn.Object?d=>TD(d,(f,g)=>u[g]||g):d=>d},o=()=>{const u=i.fields;if(typeof i.fields!==Hn.Object&&!Array.isArray(u))throw new Error("Fields needs to be an array of strings.");return Array.isArray(u)?d=>JD(d,u):d=>d},l=()=>{if(typeof i.fields===Hn.Undefined&&typeof i.labels===Hn.Undefined)return i.data;const u=s(),d=o();return i.data.map(f=>u(d(f)))},c=()=>{if(!(a!=null&&a.value)){console.warn("No data to export");return}e("export-started",a.value);let u=eS.unparse(a.value,Object.assign({delimiter:i.delimiter,encoding:i.encoding}));if(i.separatorExcel&&(u="SEP="+i.delimiter+`\r
|
|
44
|
+
`+u),i.encoding==="utf-8"&&(u="\uFEFF"+u),e("export-finished",i.filename),!i.testing){const d=new Blob([u],{type:"text/csv;charset="+i.encoding});tS.saveAs(d,i.filename)}};return(u,d)=>(h.openBlock(),h.createElementBlock("div",{id:r.value,"data-testid":"export-csv",onClick:c},[h.renderSlot(u.$slots,"default",{},()=>[h.createTextVNode("Download "+h.toDisplayString(n.filename),1)])],8,nS))}}),rS=h.defineComponent({__name:"DownloadCsv",props:{rows:{},headers:{},filename:{}},setup(n){const t=n,e=h.computed(()=>Object.keys(t.headers));return(i,r)=>(h.openBlock(),h.createElementBlock("div",null,[h.createVNode(iS,{data:i.rows,fields:e.value,filename:i.filename,labels:i.headers},{default:h.withCtx(()=>[h.renderSlot(i.$slots,"default")]),_:3},8,["data","fields","filename","labels"])]))}}),aS={class:"kong-ui-public-csv-export-modal"},sS={key:0,class:"selected-range"},oS={key:1,class:"text-muted",tag:"span"},ah=3,sh=h.defineComponent({__name:"CsvExportModal",props:{filename:{},modalDescription:{default:void 0},selectedRange:{},chartData:{}},emits:["toggleModal"],setup(n,{emit:t}){const{i18n:e}=St.useI18n(),i=n,r=t,a=`${i.filename.replace(/\s+/g,"-").toLowerCase()}-${new Date().toISOString().slice(0,10)}.csv`,s=h.ref(!0),o=h.computed(()=>{var p,m;return!!((m=(p=i.chartData)==null?void 0:p.records)!=null&&m.length)}),l=h.ref(1),c=h.computed(()=>f.value.rows.length),u=h.computed(()=>e.t("csvExport.previewRows",{rowsMax:Math.min(ah,c.value),rowsTotal:c.value,plural:c.value===1?"":"s"})),d=()=>{r("toggleModal",!1)},f=h.computed(()=>{var _,S,C;if(!o.value||!((_=i.chartData)!=null&&_.meta.metricNames))return{headers:[],rows:[],csvHeaders:{}};const p=i.chartData.records.some(k=>k.timestamp!==i.chartData.records[0].timestamp),m=i.chartData.records.map(k=>{const T=new Date(k.timestamp);return{...k.event,...p?{timestamp:To(T,"yyyy-MM-dd HH:mm:ss"),tzOffset:To(T,"XXX")}:{}}});let y=[];p&&(y=[{label:"Timestamp",key:"timestamp"},{label:"UtcOffset",key:"tzOffset"}]);const v="dimensions"in i.chartData.meta&&((S=i.chartData.meta)!=null&&S.dimensions)?(C=i.chartData.meta)==null?void 0:C.dimensions:{},x=[...y,...Object.keys(v).map(k=>({label:k,key:k})),...i.chartData.meta.metricNames.map(k=>({label:k,key:k}))],w=x.reduce((k,T)=>(k[T.key]=T.label,k),{});return{headers:x,csvHeaders:w,rows:m}}),g=()=>{const{rows:p}=f.value;return s.value=!1,{total:Number(p.length)||0,data:p.slice(0,ah)}};return h.watch(f,()=>{l.value++}),(p,m)=>{const y=h.resolveComponent("KEmptyState"),v=h.resolveComponent("KTable"),x=h.resolveComponent("KButton"),w=h.resolveComponent("KPrompt");return h.openBlock(),h.createElementBlock("div",aS,[h.createVNode(w,{class:"vitals-report","data-testid":"csv-export-modal","is-visible":"","show-dismiss-icon":"","text-align":"left",title:h.unref(e).t("csvExport.exportPreview"),onCanceled:d,onKeyup:h.withKeys(d,["esc"])},{"body-content":h.withCtx(()=>{var _;return[h.createElementVNode("div",null,[o.value?(h.openBlock(),h.createElementBlock("div",sS,[h.createElementVNode("p",null,h.toDisplayString(p.modalDescription?p.modalDescription:h.unref(e).t("csvExport.exportDescription")),1),h.createElementVNode("p",null,h.toDisplayString(h.unref(e).t("csvExport.exportTimeRange"))+": "+h.toDisplayString(p.selectedRange),1)])):h.createCommentVNode("",!0),h.createVNode(v,{class:"vitals-table","disable-pagination":"","disable-sorting":"",fetcher:g,"fetcher-cache-key":String(l.value),"has-hover":!1,headers:((_=f.value)==null?void 0:_.headers)||[]},{"empty-state":h.withCtx(()=>[h.createVNode(y,{"cta-is-hidden":"",icon:"stateNoData","icon-size":"96"},{title:h.withCtx(()=>[h.createElementVNode("h5",null,h.toDisplayString(h.unref(e).t("csvExport.noDataRange")),1)]),message:h.withCtx(()=>[h.createElementVNode("p",null,h.toDisplayString(h.unref(e).t("csvExport.noDataRetry")),1)]),_:1})]),_:1},8,["fetcher-cache-key","headers"]),!s.value&&o.value?(h.openBlock(),h.createElementBlock("div",oS,h.toDisplayString(u.value),1)):h.createCommentVNode("",!0)])]}),"action-buttons":h.withCtx(()=>[h.createVNode(x,{appearance:"secondary",class:"cancel-btn",onClick:d},{default:h.withCtx(()=>[h.createTextVNode(h.toDisplayString(h.unref(e).t("csvExport.cancelButton")),1)]),_:1}),h.createVNode(rS,{class:"vitals-report-export-button",filename:a,headers:f.value.csvHeaders,rows:f.value.rows},{default:h.withCtx(()=>[h.createVNode(x,{appearance:"primary","data-testid":"csv-download-button",disabled:s.value||!o.value},{default:h.withCtx(()=>[h.createTextVNode(h.toDisplayString(h.unref(e).t("csvExport.downloadButton")),1)]),_:1},8,["disabled"])]),_:1},8,["headers","rows"])]),_:1},8,["title"])])}}}),oh=(n,t,e,i)=>{n.save(),n.beginPath(),n.moveTo(t,e),n.lineTo(t,i),n.lineWidth=1,n.strokeStyle="#0275d8",n.stroke(),n.restore()},ul={id:"linePlugin",afterDatasetsDraw:function(n){if(n.tooltip&&n.tooltip.getActiveElements()&&n.tooltip.getActiveElements().length&&!this.clickedSegment){const{x:t}=n.tooltip.dataPoints[0].element,e=n.ctx;oh(e,t,n.scales.y.top,n.scales.y.bottom)}if(this.clickedSegment){const{x:t}=this.clickedSegment.element,e=n.ctx;oh(e,t,n.scales.y.top,n.scales.y.bottom)}},beforeDestroy(){delete this.clickedSegment}},lS=h.defineComponent({__name:"TimeSeriesChart",props:{chartData:{type:Object,required:!1,default:null},type:{type:String,required:!1,default:ee.TIMESERIES_LINE},fill:{type:Boolean,required:!1,default:!1},tooltipTitle:{type:String,required:!0},metricUnit:{type:String,required:!1,default:""},timeRangeMs:{type:Number,required:!1,default:void 0},timeRangeSec:{type:Number,required:!1,default:void 0},granularity:{type:String,required:!0},stacked:{type:Boolean,required:!1,default:!0},legendValues:{type:Object,required:!1,default:null},metricAxesTitle:{type:String,required:!1,default:null},dimensionAxesTitle:{type:String,required:!1,default:null},syntheticsDataKey:{type:String,required:!1,default:""},datasetColors:{type:Object,required:!1,default:De},chartLegendSortFn:{type:Function,required:!1,default:(n,t)=>n.value&&t.value&&t.value.raw-n.value.raw},chartTooltipSortFn:{type:Function,required:!1,default:(n,t)=>t.rawValue-n.rawValue}},setup(n){const t=n,{translateUnit:e}=St.useTranslatedUnits(),i=h.ref(),r=h.ref(_n()),a=h.ref(_n()),s=h.ref([]),o=h.ref(),l=h.ref(h.inject("legendPosition",Bt.Right)),c=h.reactive({showTooltip:!1,tooltipContext:"",tooltipSeries:[],left:"",top:"",units:t.metricUnit,translateUnit:e,offset:0,width:0,height:0,chartType:t.type,locked:!1,chartTooltipSortFn:t.chartTooltipSortFn}),u={id:r.value,afterUpdate(x){s.value=x.options.plugins.legend.labels.generateLabels(x).map(w=>({...w,value:t.legendValues&&t.legendValues[w.text]})).sort(t.chartLegendSortFn)}},d=h.computed(()=>[u,Vf,...t.type===ee.TIMESERIES_LINE?[ul]:[]]),{options:f}=St.useLinechartOptions({tooltipState:c,timeRangeMs:h.toRef(t,"timeRangeMs"),timeRangeSec:h.toRef(t,"timeRangeSec"),granularity:h.toRef(t,"granularity"),legendID:r.value,stacked:h.toRef(t,"stacked"),metricAxesTitle:h.toRef(t,"metricAxesTitle"),dimensionAxesTitle:h.toRef(t,"dimensionAxesTitle")}),g=h.computed(()=>({...t.chartData,datasets:t.chartData.datasets.map((x,w)=>(Array.isArray(t.datasetColors)?(x.backgroundColor=t.datasetColors[w%t.datasetColors.length],x.borderColor=Ji(x.backgroundColor,50)):x.rawDimension in t.datasetColors&&(x.backgroundColor=t.datasetColors[x.rawDimension],x.borderColor=Ji(x.backgroundColor,50)),x.fill=t.fill,x))}));St.useReportChartDataForSynthetics(h.toRef(t,"chartData"),h.toRef(t,"syntheticsDataKey"));const p=x=>ea(x,{short:[ot.DAILY,ot.WEEKLY].includes(t.granularity)}),m=x=>({[Bt.Right]:"legend-row",[Bt.Bottom]:"column",[Bt.Hidden]:"hidden"})[x],y=({width:x,height:w})=>{c.width=x,c.height=w},v=()=>{var x,w,_;c.locked=!c.locked,i.value&&((w=(x=i.value.chart.tooltip)==null?void 0:x.dataPoints)!=null&&w.length)&&(ul.clickedSegment=c.locked?(_=i.value.chart.tooltip)==null?void 0:_.dataPoints[0]:void 0)};return h.watch(()=>t.type,()=>{c.locked=!1,c.showTooltip=!1,delete ul.clickedSegment}),(x,w)=>(h.openBlock(),h.createElementBlock("div",{class:h.normalizeClass(["chart-parent",m(l.value)]),"data-testid":"line-chart-parent"},[h.createElementVNode("div",{class:"chart-container",onClick:w[0]||(w[0]=_=>v())},[n.type===h.unref(ee).TIMESERIES_LINE?(h.openBlock(),h.createBlock(h.unref(bD),{key:0,ref_key:"chartInstance",ref:i,"chart-id":a.value,data:g.value,"data-testid":"time-series-line-chart",options:h.unref(f),plugins:d.value},null,8,["chart-id","data","options","plugins"])):n.type===h.unref(ee).TIMESERIES_BAR?(h.openBlock(),h.createBlock(h.unref(yD),{key:1,ref_key:"chartInstance",ref:i,"chart-id":a.value,data:g.value,"data-testid":"time-series-bar-chart",options:h.unref(f),plugins:d.value},null,8,["chart-id","data","options","plugins"])):h.createCommentVNode("",!0)]),h.createVNode(rl,{ref_key:"tooltipElement",ref:o,context:p(c.tooltipContext),"data-testid":"tooltip",left:c.left,locked:c.locked,series:c.tooltipSeries,"show-tooltip":c.showTooltip,"tooltip-title":n.tooltipTitle,top:c.top,unit:n.metricUnit,onDimensions:y,onLeft:w[1]||(w[1]=_=>c.left=_),onTop:w[2]||(w[2]=_=>c.top=_)},null,8,["context","left","locked","series","show-tooltip","tooltip-title","top","unit"]),h.createVNode(al,{id:r.value,"chart-instance":i.value,"data-testid":"legend",items:s.value},null,8,["id","chart-instance","items"])],2))}}),cS=Ke(lS,[["__scopeId","data-v-1aa05a3a"]]),uS={class:"analytics-chart-shell"},dS={class:"chart-header"},fS={key:0,class:"chart-title"},hS={class:"chart-header-icons-wrapper"},gS={key:1,class:"chart-export-button"},pS={key:1,class:"analytics-chart-parent"},mS=h.defineComponent({__name:"AnalyticsChart",props:{allowCsvExport:{type:Boolean,required:!1,default:!1},chartData:{type:Object,required:!0},chartOptions:{type:Object,required:!0},tooltipTitle:{type:String,required:!0},emptyStateTitle:{type:String,required:!1,default:""},emptyStateDescription:{type:String,required:!1,default:""},chartTitle:{type:String,required:!1,default:void 0},filenamePrefix:{type:String,required:!1,default:void 0},legendPosition:{type:String,required:!1,default:Bt.Right},syntheticsDataKey:{type:String,required:!1,default:""},height:{type:String,required:!1,default:"500px",validator:n=>/(\d *)(px)/.test(n)},width:{type:String,required:!1,default:"100%",validator:n=>/(\d *)(px|%)/.test(n)},showLegendValues:{type:Boolean,required:!1,default:!0},showAnnotations:{type:Boolean,required:!1,default:!0}},setup(n){h.useCssVars(L=>({"55ce9380":i.value,"1cb391c8":t.width}));const t=n,{i18n:e}=St.useI18n(),i=h.ref(t.height),r=h.computed(()=>t.filenamePrefix??(t.chartTitle||e.t("csvExport.defaultFilename"))),a=L=>{i.value=`${L}px`};h.watch(()=>t.height,L=>{i.value=L});const s=h.toRef(t,"chartData"),o=h.computed(()=>v.value?St.useExploreResultToTimeDataset({fill:t.chartOptions.fill,colorPalette:t.chartOptions.chartDatasetColors||De},h.toRef(t,"chartData")).value:St.useExploreResultToDatasets({fill:t.chartOptions.fill,colorPalette:t.chartOptions.chartDatasetColors||De},h.toRef(t,"chartData")).value),l=h.computed(()=>{var L;return(L=t.chartData)!=null&&L.meta?"start"in t.chartData.meta?t.chartData.meta.end-t.chartData.meta.start:void 0:0}),c=h.computed(()=>{var L;return(L=t.chartData)!=null&&L.meta?"startMs"in t.chartData.meta?t.chartData.meta.endMs-t.chartData.meta.startMs:void 0:0}),u=h.computed(()=>{var L;return(L=t.chartData.meta)!=null&&L.metricUnits?Object.values(t.chartData.meta.metricUnits)[0]:""}),d=h.computed(()=>t.showLegendValues&&t.legendPosition!==Bt.Bottom),{legendValues:f}=St.useChartLegendValues(o,t.chartOptions.type,u),g=h.computed(()=>{var L,H,I;return((I=(H=(L=t.chartData)==null?void 0:L.meta)==null?void 0:H.limit)==null?void 0:I.toString())||null}),p=h.computed(()=>{var L,H;return((H=(L=t.chartData)==null?void 0:L.meta)==null?void 0:H.truncated)||!1}),m=e.t("limitedResultsShown",{maxReturned:g.value}),y=h.computed(()=>[ee.VERTICAL_BAR.toString(),ee.HORIZONTAL_BAR.toString()].includes(t.chartOptions.type)),v=h.computed(()=>[ee.TIMESERIES_BAR,ee.TIMESERIES_LINE].some(L=>L===t.chartOptions.type)),x=h.computed(()=>t.chartOptions.type===ee.DOUGHNUT),w=h.computed(()=>t.chartOptions.type.includes("Vertical")?"vertical":"horizontal"),_=h.computed(()=>{var I,et,z;if(!((I=t.chartData)!=null&&I.meta.metricNames)||!((et=t.chartData)!=null&&et.meta.metricUnits))return;const L=t.chartData.meta.metricNames[0],H=t.chartData.meta.metricUnits[L];return((z=t.chartOptions)==null?void 0:z.metricAxesTitle)||e.te(`metricAxisTitles.${L}`)&&e.te(`chartUnits.${H}`)&&e.t(`metricAxisTitles.${L}`,{unit:e.t(`chartUnits.${H}`,{plural:"s"})})||void 0}),S=h.computed(()=>{const L=v.value?"Time":Object.keys(t.chartData.meta.dimensions||t.chartData.meta.metricNames)[0];return t.chartOptions.dimensionAxesTitle||e.te(`chartLabels.${L}`)&&e.t(`chartLabels.${L}`)||void 0}),C=h.computed(()=>{if(t.chartData.meta.granularity&&typeof t.chartData.meta.granularity!="number"&&"duration"in t.chartData.meta.granularity){const L=er(t.chartData.meta.granularity.duration);return e.t(`granularityAxisTitles.${L}`)}else if(t.chartData.meta.granularity&&!isNaN(Number(t.chartData.meta.granularity))){const L=er(Number(t.chartData.meta.granularity));return e.t(`granularityAxisTitles.${L}`)}return e.t("chartlabels.Time")}),k=h.computed(()=>t.emptyStateTitle||e.t("noDataAvailableTitle")),T=h.computed(()=>t.emptyStateDescription||e.t("noDataAvailableDescription")),D=h.computed(()=>v.value?Nx(o.value):t.chartData&&t.chartData.meta&&t.chartData.records.length),O=h.computed(()=>t.chartData.meta.granularity?typeof t.chartData.meta.granularity=="number"?er(t.chartData.meta.granularity)||ot.HOURLY:er(t.chartData.meta.granularity.duration)||ot.HOURLY:er(new Date(t.chartData.records[1].timestamp).getTime()-new Date(t.chartData.records[0].timestamp).getTime())||ot.HOURLY),A=h.ref(!1),R=St.useChartSelectedRange(s),W=L=>{A.value=L},V=()=>{W(!0)};return h.provide("showLegendValues",d),h.provide("legendPosition",h.toRef(t,"legendPosition")),(L,H)=>{const I=h.resolveComponent("KTooltip"),et=h.resolveComponent("KButton"),z=h.resolveComponent("KEmptyState");return h.openBlock(),h.createElementBlock("div",uS,[h.createElementVNode("div",dS,[n.chartTitle?(h.openBlock(),h.createElementBlock("div",fS,h.toDisplayString(n.chartTitle),1)):h.createCommentVNode("",!0),h.createElementVNode("div",hS,[D.value&&p.value&&g.value?(h.openBlock(),h.createBlock(I,{key:0,class:"tooltip","max-width":"500",placement:"right"},{content:h.withCtx(()=>[h.createTextVNode(h.toDisplayString(h.unref(m)),1)]),default:h.withCtx(()=>[h.createVNode(h.unref(NT),{color:h.unref(UT),decorative:"",size:h.unref(BT)},null,8,["color","size"])]),_:1})):h.createCommentVNode("",!0)]),n.allowCsvExport&&D.value?(h.openBlock(),h.createElementBlock("div",gS,[h.createVNode(et,{appearance:"tertiary",class:"chart-export-button-display","data-testid":"csv-export-button",onClick:h.withModifiers(V,["prevent"])},{default:h.withCtx(()=>[h.createTextVNode(h.toDisplayString(h.unref(e).t("csvExport.exportButton")),1)]),_:1})])):h.createCommentVNode("",!0),n.allowCsvExport&&D.value&&A.value?(h.openBlock(),h.createBlock(sh,{key:2,"chart-data":s.value,filename:r.value,"selected-range":h.unref(R),onToggleModal:W},null,8,["chart-data","filename","selected-range"])):h.createCommentVNode("",!0)]),D.value?(h.openBlock(),h.createElementBlock("div",pS,[v.value?(h.openBlock(),h.createBlock(cS,{key:0,"chart-data":o.value,"chart-legend-sort-fn":n.chartOptions.chartLegendSortFn,"chart-tooltip-sort-fn":n.chartOptions.chartTooltipSortFn,"dataset-colors":n.chartOptions.chartDatasetColors,"dimension-axes-title":C.value,fill:n.chartOptions.fill,granularity:O.value,"legend-values":h.unref(f),"metric-axes-title":_.value,"metric-unit":u.value,stacked:n.chartOptions.stacked,"synthetics-data-key":n.syntheticsDataKey,"time-range-ms":c.value,"time-range-sec":l.value,"tooltip-title":n.tooltipTitle,type:n.chartOptions.type},null,8,["chart-data","chart-legend-sort-fn","chart-tooltip-sort-fn","dataset-colors","dimension-axes-title","fill","granularity","legend-values","metric-axes-title","metric-unit","stacked","synthetics-data-key","time-range-ms","time-range-sec","tooltip-title","type"])):y.value?(h.openBlock(),h.createBlock(cD,{key:1,annotations:n.showAnnotations,"chart-data":o.value,"chart-legend-sort-fn":n.chartOptions.chartLegendSortFn,"chart-tooltip-sort-fn":n.chartOptions.chartTooltipSortFn,"data-testid":"bar-chart-container","dimension-axes-title":S.value,"legend-values":h.unref(f),"metric-axes-title":_.value,"metric-unit":u.value,orientation:w.value,stacked:n.chartOptions.stacked,"synthetics-data-key":n.syntheticsDataKey,"tooltip-title":n.tooltipTitle,onHeightUpdate:a},null,8,["annotations","chart-data","chart-legend-sort-fn","chart-tooltip-sort-fn","dimension-axes-title","legend-values","metric-axes-title","metric-unit","orientation","stacked","synthetics-data-key","tooltip-title"])):x.value?(h.openBlock(),h.createBlock(wD,{key:2,"chart-data":o.value,"dataset-colors":n.chartOptions.chartDatasetColors,fill:n.chartOptions.fill,"legend-position":n.legendPosition,"legend-values":h.unref(f),"metric-unit":u.value,"synthetics-data-key":n.syntheticsDataKey,"tooltip-title":n.tooltipTitle},null,8,["chart-data","dataset-colors","fill","legend-position","legend-values","metric-unit","synthetics-data-key","tooltip-title"])):h.createCommentVNode("",!0)])):(h.openBlock(),h.createBlock(z,{key:0,class:"chart-empty-state","cta-is-hidden":!0,"data-testid":"no-data-in-report",icon:"stateNoData","icon-size":"170"},{title:h.withCtx(()=>[h.createTextVNode(h.toDisplayString(k.value),1)]),message:h.withCtx(()=>[h.createTextVNode(h.toDisplayString(T.value),1)]),_:1}))])}}}),yS=Ke(mS,[["__scopeId","data-v-3432f859"]]),bS={class:"chart-parent","data-testid":"doughnut-chart-parent"},vS={class:"chart-totals-flex"},xS={key:1,class:"metric-small","data-testid":"doughnut-chart-total"},wS=h.defineComponent({__name:"GaugeChart",props:{chartData:{type:Object,required:!1,default:null},metricDisplay:{type:String,required:!1,default:ii.Hidden},numerator:{type:Number,required:!1,default:0},syntheticsDataKey:{type:String,required:!1,default:""},datasetColors:{type:Object,required:!1,default:De},height:{type:String,required:!1,default:"400px",validator:n=>/(\d *)(px|%)/.test(n)},width:{type:String,required:!1,default:"100%",validator:n=>/(\d *)(px|%)/.test(n)}},setup(n){const t=n,{i18n:e}=St.useI18n(),i=h.ref(_n()),r=h.computed(()=>[t.chartData.datasets.reduce((p,m)=>(p.labels.push(m.label),p.borderColor.push(m.backgroundColor),p.backgroundColor.push(m.backgroundColor),p.data.push(m.data.reduce((y,v)=>y+v,0)),p),{labels:[],backgroundColor:[],borderColor:[],data:[]})]),a=h.computed(()=>({...t.chartData,datasets:r.value}));St.useReportChartDataForSynthetics(h.toRef(t,"chartData"),h.toRef(t,"syntheticsDataKey"));const s={responsive:!0,maintainAspectRatio:!0,cutout:"78%",circumference:"200",rotation:"260",plugins:{legend:{display:!1}}},o=h.ref(),l=h.computed(()=>{var g;return tr((g=r==null?void 0:r.value[0])==null?void 0:g.data[t.numerator],{capital:!0})}),c=h.computed(()=>{var g,p;return tr(((g=r==null?void 0:r.value[0])==null?void 0:g.data[0])+((p=r==null?void 0:r.value[0])==null?void 0:p.data[1]),{capital:!0})}),u=h.computed(()=>{var g;return`color: ${(g=r==null?void 0:r.value[0])==null?void 0:g.backgroundColor[t.numerator]}`}),d=h.computed(()=>[ii.Full,ii.SingleMetric].includes(t.metricDisplay)),f=h.computed(()=>t.metricDisplay===ii.Full);return(g,p)=>(h.openBlock(),h.createElementBlock("div",bS,[h.createElementVNode("div",vS,[d.value?(h.openBlock(),h.createElementBlock("div",{key:0,class:"metric-large","data-testid":"doughnut-chart-metric",style:h.normalizeStyle(u.value)},h.toDisplayString(l.value),5)):h.createCommentVNode("",!0),f.value?(h.openBlock(),h.createElementBlock("div",xS,h.toDisplayString(h.unref(e).t("total"))+": "+h.toDisplayString(c.value),1)):h.createCommentVNode("",!0)]),h.createElementVNode("div",{class:"chart-container",style:h.normalizeStyle({height:n.height,width:n.width})},[h.createVNode(h.unref(Zf),{ref_key:"chartInstance",ref:o,"chart-id":i.value,data:a.value,options:s},null,8,["chart-id","data","options"])],4)]))}}),_S=Ke(wS,[["__scopeId","data-v-5871cb7a"]]),TS={class:"simple-chart-shell"},DS={key:1,class:"analytics-chart-parent"},SS=Ke(h.defineComponent({__name:"SimpleChart",props:{chartData:{type:Object,required:!0},chartOptions:{type:Object,required:!0},emptyStateTitle:{type:String,required:!1,default:""},syntheticsDataKey:{type:String,required:!1,default:""},height:{type:String,required:!1,default:"400px",validator:n=>/(\d *)(px|%)/.test(n)},width:{type:String,required:!1,default:"100%",validator:n=>/(\d *)(px|%)/.test(n)}},setup(n){const t=n,{i18n:e}=St.useI18n(),i=h.computed(()=>{var c;const l=St.useExploreResultToDatasets({colorPalette:t.chartOptions.chartDatasetColors||De},h.toRef(t,"chartData")).value;return(c=t.chartOptions)!=null&&c.reverseDataset&&(l==null||l.datasets.reverse()),l}),r=h.computed(()=>{var l;return(l=t.chartData.meta)!=null&&l.metricUnits?Object.values(t.chartData.meta.metricUnits)[0]:""}),a=h.computed(()=>t.chartOptions.type===Qr.GAUGE),s=h.computed(()=>t.emptyStateTitle||e.t("noDataAvailableTitle")),o=h.computed(()=>t.chartData&&t.chartData.meta&&t.chartData.records.length);return(l,c)=>{const u=h.resolveComponent("KEmptyState");return h.openBlock(),h.createElementBlock("div",TS,[o.value?(h.openBlock(),h.createElementBlock("div",DS,[a.value?(h.openBlock(),h.createBlock(_S,{key:0,"chart-data":i.value,"dataset-colors":n.chartOptions.chartDatasetColors,"is-simple":"","metric-display":n.chartOptions.metricDisplay,"metric-unit":r.value,numerator:n.chartOptions.numerator,"synthetics-data-key":n.syntheticsDataKey,width:n.width},null,8,["chart-data","dataset-colors","metric-display","metric-unit","numerator","synthetics-data-key","width"])):h.createCommentVNode("",!0)])):(h.openBlock(),h.createBlock(u,{key:0,class:"chart-empty-state","cta-is-hidden":!0,"data-testid":"no-data-in-report",icon:"stateNoData","icon-size":"80"},{title:h.withCtx(()=>[h.createTextVNode(h.toDisplayString(s.value),1)]),_:1}))])}}}),[["__scopeId","data-v-f014a616"]]),MS={class:"top-n-card-title","data-testid":"top-n-card-title"},CS={class:"top-n-card-description","data-testid":"top-n-card-description"},kS={key:3,class:"top-n-table","data-testid":"top-n-table"},OS={class:"table-headings"},PS={class:"table-row"},ES={class:"column-1"},AS={class:"column-2"},RS={class:"table-body","data-testid":"top-n-data"},LS=["data-testid"],IS={class:"column-1"},NS={class:"column-2"},FS=Ke(h.defineComponent({__name:"TopNTable",props:{title:{type:String,required:!0},description:{type:String,default:""},data:{type:Object,required:!0},emptyStateTitle:{type:String,default:""},isLoading:{type:Boolean,default:!1}},setup(n){const t=n,{i18n:e}=St.useI18n(),i=h.computed(()=>t.data.records),r=h.computed(()=>{var p;return!!((p=i.value)!=null&&p.length)}),a=h.computed(()=>{var p,m;return(p=t.data.meta)!=null&&p.display&&((m=Object.keys(t.data.meta.display))==null?void 0:m[0])||""}),s=h.computed(()=>a.value?t.data.meta.display[a.value]:{}),o=h.computed(()=>{var p,m;return(m=(p=t.data.meta)==null?void 0:p.metricNames)!=null&&m.length?t.data.meta.metricNames[0]:""}),l=h.computed(()=>o.value?e.t(`chartLabels.${o.value}`)||o.value:""),c=h.computed(()=>{if(!r.value)return"";if(t.data.meta)if(Object.keys(s.value).length){if(!o.value)return e.t("topNTable.errors.metricNames")}else return e.t("topNTable.errors.display");else return e.t("topNTable.errors.meta");return""}),u=p=>{const m=p.event;return String(m[a.value])},d=p=>{const m=u(p),y=s.value[m];return y?y.name:"-"},f=p=>{const m=u(p),y=s.value[m];return y?y.deleted:!1},g=p=>{if(!o.value)return"–";const y=p.event[o.value];return y?tr(y,{capital:!0,round:!0}):"–"};return(p,m)=>{const y=h.resolveComponent("KEmptyState"),v=h.resolveComponent("KSkeleton"),x=h.resolveComponent("KCard");return h.openBlock(),h.createBlock(x,{class:"kong-ui-public-top-n-table"},h.createSlots({default:h.withCtx(()=>[c.value?(h.openBlock(),h.createBlock(y,{key:0,"cta-is-hidden":"","data-testid":"top-n-error-state","is-error":""},{title:h.withCtx(()=>[h.createTextVNode(h.toDisplayString(h.unref(e).t("topNTable.defaultErrorStateTitle")),1)]),message:h.withCtx(()=>[h.createTextVNode(h.toDisplayString(c.value),1)]),_:1})):n.isLoading?(h.openBlock(),h.createBlock(v,{key:1,"table-columns":2,type:"table"})):r.value?(h.openBlock(),h.createElementBlock("div",kS,[h.createElementVNode("div",OS,[h.createElementVNode("div",PS,[h.createElementVNode("div",ES,h.toDisplayString(h.unref(e).t("topNTable.nameLabel")),1),h.createElementVNode("div",AS,h.toDisplayString(l.value),1)])]),h.createElementVNode("div",RS,[(h.openBlock(!0),h.createElementBlock(h.Fragment,null,h.renderList(i.value,(w,_)=>(h.openBlock(),h.createElementBlock("div",{key:`entry-${_}`,class:"table-row","data-testid":`row-${u(w)}`},[h.createElementVNode("div",IS,[h.renderSlot(p.$slots,"name",{record:{id:u(w),name:d(w),deleted:f(w),dimension:a.value}},()=>[h.createTextVNode(h.toDisplayString(d(w)),1)],!0)]),h.createElementVNode("div",NS," "+h.toDisplayString(g(w)),1)],8,LS))),128))])])):(h.openBlock(),h.createBlock(y,{key:2,"cta-is-hidden":"","data-testid":"top-n-empty-state",icon:"stateNoData","icon-size":"80"},{title:h.withCtx(()=>[h.createTextVNode(h.toDisplayString(n.emptyStateTitle||h.unref(e).t("topNTable.defaultEmptyStateTitle")),1)]),_:1}))]),_:2},[n.title?{name:"title",fn:h.withCtx(()=>[h.createElementVNode("div",MS,h.toDisplayString(n.title),1)]),key:"0"}:void 0,n.description?{name:"actions",fn:h.withCtx(()=>[h.createElementVNode("div",CS,h.toDisplayString(n.description),1)]),key:"1"}:void 0]),1024)}}}),[["__scopeId","data-v-bd78642f"]]),dl="#e0e4ea",US={100:["#c8e2fd","#80bfff","#4da6ff","#1a8cff","#0072e5","#0059b2"],200:["#ceedd2","#9edca6","#89d595","#6fcc83","#44c26b","#0bb652","#0ca84a","#169643","#196e33","#1b572a"],300:["#fff4db","#ffe9b8","#ffe2a1","#ffd982","#ffd062","#fdc53b","#f4bb1e","#e8b00b","#d9a30f","#c89407"],400:["#ffead8","#ffd5b1","#ffc899","#ffba81","#ffae6b","#fe9439","#f6871d","#eb7c0c","#da700c","#cc6100"],500:["#ffd5d5","#ffb6b6","#ff9d9d","#ff8484","#ff6a6a","#ff4545","#fb1f1f","#e90b0b","#d40202","#be0202"]},or=(n,t)=>{let e=1;const i=US[n],r=new Map;for(const a of t)r.set(a,i[e]),e=e%(i.length-1)+1;return r.set(-1,i[0]),r},lh=new Map([[100,or("100",[100,101,102,103])],[200,or("200",[200,201,202,203,204,205,206,207,208,226])],[300,or("300",[300,301,302,303,304,305,307,308])],[400,or("400",[400,401,402,403,404,405,406,407,408,409,410,411,412,413,414,415,416,417,418,421,422,423,424,425,426,428,429,431,451])],[500,or("500",[500,501,502,503,504,505,506,507,508,510,511])]]),ch=n=>{const t=parseInt(n,10),e=Math.floor(t/100)*100,i=lh.get(e);return i===void 0?dl:i.get(t)??i.get(-1)??dl},BS=n=>{const t=ch(n);return{solid:t,light:t}};ut.AnalyticsChart=yS,ut.ChartLegendPosition=Bt,ut.ChartMetricDisplay=ii,ut.ChartTypes=ee,ut.ChartTypesSimple=Qr,ut.CsvExportModal=sh,ut.DECIMAL_DISPLAY=Nd,ut.FONT_SIZE_REGULAR=Ud,ut.FONT_SIZE_SMALL=Fd,ut.MAX_LABEL_LENGTH=na,ut.SimpleChart=SS,ut.TopNTable=FS,ut.ValidType=Hn,ut.accessibleGrey=Bd,ut.codesInSpec=lh,ut.darkenColor=Ji,ut.datavisPalette=De,ut.formatTime=ea,ut.lightGrey=dl,ut.lookupDatavisColor=ai,ut.lookupStatusCodeCategoryColor=BS,ut.lookupStatusCodeColor=ch,ut.numberFormatter=ta,Object.defineProperty(ut,Symbol.toStringTag,{value:"Module"})});
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@kong-ui-public/analytics-chart",
|
|
3
|
-
"version": "0.24.
|
|
3
|
+
"version": "0.24.2",
|
|
4
4
|
"type": "module",
|
|
5
5
|
"main": "./dist/vitals-chart.umd.js",
|
|
6
6
|
"module": "./dist/vitals-chart.es.js",
|
|
@@ -35,8 +35,8 @@
|
|
|
35
35
|
"lodash.pickby": "^4.6.0",
|
|
36
36
|
"papaparse": "^5.4.1",
|
|
37
37
|
"vue": "^3.3.11",
|
|
38
|
-
"@kong-ui-public/
|
|
39
|
-
"@kong-ui-public/
|
|
38
|
+
"@kong-ui-public/i18n": "^2.0.3",
|
|
39
|
+
"@kong-ui-public/sandbox-layout": "^2.0.16"
|
|
40
40
|
},
|
|
41
41
|
"repository": {
|
|
42
42
|
"type": "git",
|
|
@@ -51,7 +51,7 @@
|
|
|
51
51
|
},
|
|
52
52
|
"dependencies": {
|
|
53
53
|
"@kong-ui-public/analytics-utilities": "^0.11.2",
|
|
54
|
-
"@kong/icons": "^1.8.
|
|
54
|
+
"@kong/icons": "^1.8.8",
|
|
55
55
|
"@types/file-saver": "^2.0.7",
|
|
56
56
|
"@types/lodash.mapkeys": "^4.6.9",
|
|
57
57
|
"@types/lodash.pick": "^4.4.9",
|