@kong-ui-public/analytics-chart 8.1.9 → 8.1.10
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/style.css +1 -1
- package/dist/types/components/chart-types/StackedBarChart.vue.d.ts.map +1 -1
- package/dist/types/components/chart-types/TimeSeriesChart.vue.d.ts.map +1 -1
- package/dist/types/composables/useBarChartOptions.d.ts.map +1 -1
- package/dist/types/composables/useDonutChartOptions.d.ts.map +1 -1
- package/dist/types/composables/useLineChartOptions.d.ts.map +1 -1
- package/dist/types/types/chart-data.d.ts.map +1 -1
- package/dist/types/types/chart-export.d.ts.map +1 -1
- package/dist/types/types/chartjs-options.d.ts.map +1 -1
- package/dist/types/utils/colors.d.ts.map +1 -1
- package/dist/vitals-chart.es.js +3 -3
- package/dist/vitals-chart.umd.js +3 -3
- package/package.json +2 -2
package/dist/style.css
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
.locked[data-v-6d10428e]{cursor:move}.tooltip-container[data-v-6d10428e]{background-color:#fff;border-radius:4px;border-radius:var(--kui-border-radius-20, 4px);box-shadow:0 5px 15px #0000001f,0 5px 10px #0000003d;max-width:425px;min-width:250px;position:absolute;transition:all .2s cubic-bezier(.25,.8,.25,1);z-index:999}.tooltip-container .tooltip-title[data-v-6d10428e]{border-bottom:1px solid #e0e4ea;border-bottom:var(--kui-border-width-10, 1px) solid var(--kui-color-border, #e0e4ea);display:flex;flex-direction:column;margin:6px;margin:var(--kui-space-30, 6px);min-height:24px;padding-bottom:6px;padding-bottom:var(--kui-space-30, 6px)}.tooltip-container .tooltip-title .title[data-v-6d10428e]{font-size:14px;font-size:var(--kui-font-size-30, 14px);font-weight:600;font-weight:var(--kui-font-weight-semibold, 600)}.tooltip-container .tooltip-title .subtitle[data-v-6d10428e]{font-size:12px;font-size:var(--kui-font-size-20, 12px);margin-top:6px;margin-top:var(--kui-space-30, 6px)}.tooltip-container .tooltip-title .drag-icon[data-v-6d10428e]{margin-top:6px;margin-top:var(--kui-space-30, 6px);position:absolute;right:0;top:0}.tooltip-container .tooltip[data-v-6d10428e]{list-style:none;margin:6px;margin:var(--kui-space-30, 6px);max-height:300px;min-width:250px;overflow-y:auto;overflow-y:var(--kui-space-auto, auto);padding-left:0;padding-left:var(--kui-space-0, 0px)}.tooltip-container .tooltip[data-v-6d10428e]{-ms-overflow-style:thin;scrollbar-color:#e0e4ea transparent;scrollbar-color:var(--kui-color-background-disabled, #e0e4ea) var(--kui-color-background-transparent, transparent);scrollbar-width:auto}.tooltip-container .tooltip[data-v-6d10428e] ::-webkit-scrollbar{width:40,8px;width:var(--kui-space, 40, 8px)}.tooltip-container .tooltip[data-v-6d10428e] ::-webkit-scrollbar-track{background:transparent}.tooltip-container .tooltip[data-v-6d10428e] ::-webkit-scrollbar-thumb{background-color:#e0e4ea;background-color:var(--kui-color-background-disabled, #e0e4ea);border-radius:10px;border-radius:var(--kui-border-radius-50, 10px)}.tooltip-container .tooltip li[data-v-6d10428e]{align-items:center;display:flex;font-size:12px;font-size:var(--kui-font-size-20, 12px);line-height:20px;line-height:var(--kui-line-height-30, 20px)}.tooltip-container .tooltip .display-label[data-v-6d10428e]{flex:1;max-width:75%;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.tooltip-container .tooltip .display-label.empty[data-v-6d10428e]{font-style:italic}.tooltip-container .tooltip .display-value[data-v-6d10428e]{margin-left:auto;margin-left:var(--kui-space-auto, auto);padding-left:8px;padding-left:var(--kui-space-40, 8px);white-space:nowrap}.tooltip-container .tooltip .square-marker[data-v-6d10428e]{display:inline-flex;flex-direction:row;height:12px;margin-right:6px;margin-right:var(--kui-space-30, 6px);width:12px}.legend-container[data-v-14909126]{display:flex;margin:6px 0 0;max-height:inherit;-ms-overflow-style:thin;overflow-x:hidden;overflow-y:auto;padding-left:0}.legend-container[data-v-14909126]{-ms-overflow-style:thin;scrollbar-color:#e0e4ea transparent;scrollbar-color:var(--kui-color-background-disabled, #e0e4ea) var(--kui-color-background-transparent, transparent);scrollbar-width:auto}.legend-container[data-v-14909126] ::-webkit-scrollbar{width:40,8px;width:var(--kui-space, 40, 8px)}.legend-container[data-v-14909126] ::-webkit-scrollbar-track{background:transparent}.legend-container[data-v-14909126] ::-webkit-scrollbar-thumb{background-color:#e0e4ea;background-color:var(--kui-color-background-disabled, #e0e4ea);border-radius:10px;border-radius:var(--kui-border-radius-50, 10px)}.legend-container.vertical[data-v-14909126]{flex-direction:column;justify-content:flex-start;max-height:90%;max-width:15%;min-width:10%;padding-left:12px;row-gap:16px}.legend-container.vertical .truncate-label[data-v-14909126]{max-width:12ch;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.legend-container.vertical li .legend[data-v-14909126]{margin-top:4px}@media (max-width: 767px){.legend-container.vertical[data-v-14909126]{column-gap:12px;display:grid;grid-template-columns:repeat(auto-fit,12ch);height:40px;justify-content:center;max-width:99%!important}.legend-container.vertical .sub-label[data-v-14909126]{display:none}}.legend-container.horizontal[data-v-14909126]{column-gap:12px;display:grid;height:var(--024ed260);justify-content:center;width:99%}.legend-container.horizontal .truncate-label[data-v-14909126]{max-width:20ch;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.legend-container.horizontal li[data-v-14909126]{align-items:center;margin-top:0}.legend-container.horizontal li .label[data-v-14909126]{line-height:24px;padding-right:2px;white-space:nowrap}.legend-container li[data-v-14909126]{align-items:start;cursor:pointer;display:flex;line-height:1}.legend-container li .square-marker[data-v-14909126]{height:8px;margin:0 6px 0 0;width:8px}.legend-container li .label[data-v-14909126]{font-size:12px}.legend-container li .sub-label[data-v-14909126]{font-size:12px;line-height:16px;word-break:none}.legend-container li .strike-through[data-v-14909126]{text-decoration:line-through}.legend-container li .empty[data-v-14909126]{font-style:italic}.legend-container li .tooltip-content[data-v-14909126]{max-width:40ch}.chart-parent[data-v-c9b0dac4]{align-items:center;display:flex;height:inherit;justify-content:space-evenly;position:relative;width:inherit}.chart-parent.column[data-v-c9b0dac4]{flex-direction:column}.chart-parent.column .chart-container[data-v-c9b0dac4]{max-height:calc(100% - 48px);width:100%}.chart-parent.legend-row[data-v-c9b0dac4]{flex-direction:row}.chart-parent.legend-row .chart-container[data-v-c9b0dac4]{height:100%;width:90%}@media (max-width: 767px){.chart-parent.legend-row .chart-container[data-v-c9b0dac4]{max-height:calc(100% - 48px)!important;width:100%!important}}@media (max-width: 767px){.chart-parent.legend-row[data-v-c9b0dac4]{display:flex;flex-wrap:wrap}}.chart-parent .chart-container[data-v-c9b0dac4]{flex:1 1 auto;position:relative}.chart-container[data-v-c9b0dac4]{overflow:auto}.chart-container[data-v-c9b0dac4]{-ms-overflow-style:thin;scrollbar-color:#e0e4ea transparent;scrollbar-color:var(--kui-color-background-disabled, #e0e4ea) var(--kui-color-background-transparent, transparent);scrollbar-width:auto}.chart-container[data-v-c9b0dac4] ::-webkit-scrollbar{width:40,8px;width:var(--kui-space, 40, 8px)}.chart-container[data-v-c9b0dac4] ::-webkit-scrollbar-track{background:transparent}.chart-container[data-v-c9b0dac4] ::-webkit-scrollbar-thumb{background-color:#e0e4ea;background-color:var(--kui-color-background-disabled, #e0e4ea);border-radius:10px;border-radius:var(--kui-border-radius-50, 10px)}.chart-container .chart-body[data-v-c9b0dac4]{height:100%}.chart-container[data-v-c9b0dac4]::-webkit-scrollbar-track{background-color:#fff;background-color:var(--kui-color-background, #ffffff);border-radius:10px;border-radius:var(--kui-border-radius-50, 10px)}.chart-container[data-v-c9b0dac4]::-webkit-scrollbar{width:10px}.chart-container[data-v-c9b0dac4]::-webkit-scrollbar-thumb{background-color:#e0e4ea;background-color:var(--kui-color-background-disabled, #e0e4ea);border-radius:10px;border-radius:var(--kui-border-radius-50, 10px)}.axis[data-v-c9b0dac4]{left:0;pointer-events:none;position:absolute;top:0;z-index:99}.axis-tooltip[data-v-c9b0dac4]{background-color:#000933;background-color:var(--kui-color-background-inverse, #000933);border:none;border-radius:4px;border-radius:var(--kui-border-radius-20, 4px);color:#fff;color:var(--kui-color-text-inverse, #ffffff);max-width:40ch;padding:4px 8px;padding:var(--kui-space-20, 4px) var(--kui-space-40, 8px);position:absolute;width:max-content;z-index:100}.axis-tooltip .axis-tooltip-content[data-v-c9b0dac4]{color:#fff;color:var(--kui-color-text-inverse, #ffffff);font-family:Inter,Roboto,Helvetica,sans-serif;font-family:var(--kui-font-family-text, "Inter", Roboto, Helvetica, sans-serif);font-size:12px;font-size:var(--kui-font-size-20, 12px);font-weight:500;font-weight:var(--kui-font-weight-medium, 500);line-height:16px;line-height:var(--kui-line-height-20, 16px)}.tooltip-boundary[data-v-c9b0dac4]{height:100%;left:0;position:relative;top:0;width:100%}.chart-parent[data-v-6f244c54]{align-items:center;display:flex;height:inherit;justify-content:space-evenly;position:relative;width:inherit}.chart-parent.column[data-v-6f244c54]{flex-direction:column}.chart-parent.column .chart-container[data-v-6f244c54]{max-height:calc(100% - 48px);width:100%}.chart-parent.legend-row[data-v-6f244c54]{flex-direction:row}.chart-parent.legend-row .chart-container[data-v-6f244c54]{height:100%;width:90%}@media (max-width: 767px){.chart-parent.legend-row .chart-container[data-v-6f244c54]{max-height:calc(100% - 48px)!important;width:100%!important}}@media (max-width: 767px){.chart-parent.legend-row[data-v-6f244c54]{display:flex;flex-wrap:wrap}}.chart-parent .chart-container[data-v-6f244c54]{flex:1 1 auto;position:relative}.chart-parent[data-v-c10833c9]{align-items:center;display:flex;height:inherit;justify-content:space-evenly;position:relative;width:inherit}.chart-parent.column[data-v-c10833c9]{flex-direction:column}.chart-parent.column .chart-container[data-v-c10833c9]{max-height:calc(100% - 48px);width:100%}.chart-parent.legend-row[data-v-c10833c9]{flex-direction:row}.chart-parent.legend-row .chart-container[data-v-c10833c9]{height:100%;width:90%}@media (max-width: 767px){.chart-parent.legend-row .chart-container[data-v-c10833c9]{max-height:calc(100% - 48px)!important;width:100%!important}}@media (max-width: 767px){.chart-parent.legend-row[data-v-c10833c9]{display:flex;flex-wrap:wrap}}.chart-parent .chart-container[data-v-c10833c9]{flex:1 1 auto;position:relative}.kong-ui-public-csv-export-modal .modal-container{min-width:580px}.kong-ui-public-csv-export-modal .modal-container .selected-range{font-size:14px}.kong-ui-public-csv-export-modal .modal-container .text-muted{color:#00000073!important;font-size:14px}.kong-ui-public-csv-export-modal .modal-container .vitals-table{font-size:14px;margin-bottom:20px;margin-top:6px;width:100%}.kong-ui-public-csv-export-modal .modal-container .k-table thead{border-top:1px solid #e0e4ea;height:auto}.kong-ui-public-csv-export-modal .modal-container .modal-footer .vitals-report-export-button{display:inline-flex}.analytics-chart-shell[data-v-0361f315],.simple-chart-shell[data-v-0361f315]{border-radius:4px;border-radius:var(--kui-border-radius-20, 4px);display:flex;flex-direction:column}.analytics-chart-shell .chart-empty-state[data-v-0361f315],.simple-chart-shell .chart-empty-state[data-v-0361f315]{display:flex;flex-direction:column;height:100%;justify-content:center}.analytics-chart-shell[data-v-0361f315]{height:100%;position:relative;width:100%}.analytics-chart-shell .analytics-chart-parent[data-v-0361f315]{height:inherit;width:inherit}.analytics-chart-shell .chart-empty-state[data-v-0361f315]{padding:20px 0 16px;padding:var(--kui-space-70, 20px) var(--kui-space-0, 0px) var(--kui-space-60, 16px) var(--kui-space-0, 0px)}.analytics-chart-shell .chart-header[data-v-0361f315]{align-items:center;display:flex;justify-content:flex-start;right:0;width:100%;z-index:999}.analytics-chart-shell .chart-header .chart-header-icons-wrapper[data-v-0361f315]{display:flex;justify-content:end}.analytics-chart-shell .chart-header .chart-export-button[data-v-0361f315]{display:flex;margin-left:auto;margin-left:var(--kui-space-auto, auto);margin-right:0;margin-right:var(--kui-space-0, 0px)}.analytics-chart-shell .chart-title[data-v-0361f315]{cursor:default;font-size:16px;font-size:var(--kui-font-size-40, 16px);font-weight:600;font-weight:var(--kui-font-weight-semibold, 600);max-width:32ch;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.analytics-chart-shell .tooltip[data-v-0361f315]{display:flex;margin-left:12px;margin-left:var(--kui-space-50, 12px);margin-top:2px;margin-top:var(--kui-space-10, 2px)}.analytics-chart-shell .tooltip .tooltip-content[data-v-0361f315]{max-width:40vw}.chart-parent[data-v-4f4e5b76]{align-items:center;display:flex;height:inherit;justify-content:space-evenly;position:relative;width:inherit}.chart-parent.column[data-v-4f4e5b76]{flex-direction:column}.chart-parent.column .chart-container[data-v-4f4e5b76]{max-height:calc(100% - 48px);width:100%}.chart-parent.legend-row[data-v-4f4e5b76]{flex-direction:row}.chart-parent.legend-row .chart-container[data-v-4f4e5b76]{height:100%;width:90%}@media (max-width: 767px){.chart-parent.legend-row .chart-container[data-v-4f4e5b76]{max-height:calc(100% - 48px)!important;width:100%!important}}@media (max-width: 767px){.chart-parent.legend-row[data-v-4f4e5b76]{display:flex;flex-wrap:wrap}}.chart-parent .chart-container[data-v-4f4e5b76]{flex:1 1 auto;position:relative}.chart-parent[data-v-4f4e5b76]{height:auto;margin:0;margin:var(--kui-space-0, 0px);padding:0;padding:var(--kui-space-0, 0px);width:auto}.chart-parent .chart-container[data-v-4f4e5b76]{margin:0;margin:var(--kui-space-0, 0px);max-height:100px;max-width:100px;padding:0;padding:var(--kui-space-0, 0px)}.chart-parent .chart-totals-flex[data-v-4f4e5b76]{align-items:center;display:flex;flex-direction:column;height:100px;justify-content:center;padding:24px 0 0;padding:var(--kui-space-80, 24px) var(--kui-space-0, 0px) var(--kui-space-0, 0px);position:absolute;width:100px;z-index:2}.chart-parent .chart-totals-flex .metric-large[data-v-4f4e5b76]{font-size:20px;font-size:var(--kui-font-size-60, 20px);font-weight:500;font-weight:var(--kui-font-weight-medium, 500);line-height:28px;line-height:var(--kui-line-height-50, 28px)}.chart-parent .chart-totals-flex .metric-small[data-v-4f4e5b76]{color:#6c7489;color:var(--kui-color-text-neutral, #6c7489);font-size:10px;font-size:var(--kui-font-size-10, 10px);font-weight:400;font-weight:var(--kui-font-weight-regular, 400);line-height:12px;line-height:var(--kui-line-height-10, 12px)}.chart-parent[data-v-89691310]{align-items:center;display:flex;height:inherit;justify-content:space-evenly;position:relative;width:inherit}.chart-parent.column[data-v-89691310]{flex-direction:column}.chart-parent.column .chart-container[data-v-89691310]{max-height:calc(100% - 48px);width:100%}.chart-parent.legend-row[data-v-89691310]{flex-direction:row}.chart-parent.legend-row .chart-container[data-v-89691310]{height:100%;width:90%}@media (max-width: 767px){.chart-parent.legend-row .chart-container[data-v-89691310]{max-height:calc(100% - 48px)!important;width:100%!important}}@media (max-width: 767px){.chart-parent.legend-row[data-v-89691310]{display:flex;flex-wrap:wrap}}.chart-parent .chart-container[data-v-89691310]{flex:1 1 auto;position:relative}.chart-parent[data-v-89691310]{container-type:inline-size}.chart-parent .single-value-error[data-v-89691310] .empty-state-title{font-size:12px;font-size:var(--kui-font-size-20, 12px);line-height:16px;line-height:var(--kui-line-height-20, 16px);margin:0;margin:var(--kui-space-0, 0px)}.chart-parent .single-value-wrapper[data-v-89691310]{align-items:baseline;display:inline-flex}.chart-parent .single-value-wrapper .single-value[data-v-89691310]{color:#000933;font-size:24px;font-weight:700;line-height:36px}.chart-parent .single-value-wrapper .single-value-unit[data-v-89691310]{color:#000933;font-size:20px;font-weight:700;line-height:32px}@container (min-width: 300px){.chart-parent .single-value-wrapper .single-value[data-v-89691310]{font-size:48px;line-height:56px}.chart-parent .single-value-wrapper .single-value-unit[data-v-89691310]{font-size:40px;line-height:48px}}@container (min-width: 500px){.chart-parent .single-value-wrapper .single-value[data-v-89691310]{font-size:56px;line-height:64px}.chart-parent .single-value-wrapper .single-value-unit[data-v-89691310]{font-size:48px;line-height:56px}}@container (min-width: 700px){.chart-parent .single-value-wrapper .single-value[data-v-89691310]{font-size:64px;line-height:72px}.chart-parent .single-value-wrapper .single-value-unit[data-v-89691310]{font-size:56px;line-height:64px}}@container (min-width: 1000px){.chart-parent .single-value-wrapper .single-value[data-v-89691310]{font-size:80px;line-height:88px}.chart-parent .single-value-wrapper .single-value-unit[data-v-89691310]{font-size:64px;line-height:72px}}@container (min-width: 1200px){.chart-parent .single-value-wrapper .single-value[data-v-89691310]{font-size:96px;line-height:104px}.chart-parent .single-value-wrapper .single-value-unit[data-v-89691310]{font-size:80px;line-height:88px}}.analytics-chart-shell[data-v-471652c8],.simple-chart-shell[data-v-471652c8]{border-radius:4px;border-radius:var(--kui-border-radius-20, 4px);display:flex;flex-direction:column}.analytics-chart-shell .chart-empty-state[data-v-471652c8],.simple-chart-shell .chart-empty-state[data-v-471652c8]{display:flex;flex-direction:column;height:100%;justify-content:center}.simple-chart-shell[data-v-471652c8]{margin:0;margin:var(--kui-space-0, 0px);padding:0;padding:var(--kui-space-0, 0px);width:100%}.simple-chart-shell .chart-empty-state[data-v-471652c8]{display:flex;flex-direction:column;justify-content:center}.simple-chart-shell .chart-empty-state[data-v-471652c8] .empty-state-title{font-size:12px;font-size:var(--kui-font-size-20, 12px);line-height:16px;line-height:var(--kui-line-height-20, 16px);margin:0;margin:var(--kui-space-0, 0px)}.kong-ui-public-top-n-table[data-v-5db48d63]{border:none!important;max-height:100%;padding:0!important}.kong-ui-public-top-n-table .top-n-card-description[data-v-5db48d63]{color:#6c7489;font-size:12px;text-align:right}.kong-ui-public-top-n-table[data-v-5db48d63] .k-card-actions{align-self:baseline;display:flex;line-height:22px}.kong-ui-public-top-n-table[data-v-5db48d63] .card-content{overflow-y:auto}.kong-ui-public-top-n-table[data-v-5db48d63] .card-content{-ms-overflow-style:thin;scrollbar-color:#e0e4ea transparent;scrollbar-color:var(--kui-color-background-disabled, #e0e4ea) var(--kui-color-background-transparent, transparent);scrollbar-width:auto}.kong-ui-public-top-n-table[data-v-5db48d63] .card-content ::-webkit-scrollbar{width:40,8px;width:var(--kui-space, 40, 8px)}.kong-ui-public-top-n-table[data-v-5db48d63] .card-content ::-webkit-scrollbar-track{background:transparent}.kong-ui-public-top-n-table[data-v-5db48d63] .card-content ::-webkit-scrollbar-thumb{background-color:#e0e4ea;background-color:var(--kui-color-background-disabled, #e0e4ea);border-radius:10px;border-radius:var(--kui-border-radius-50, 10px)}.kong-ui-public-top-n-table .top-n-table[data-v-5db48d63]{display:flex;flex-direction:column;max-height:100%;width:100%}.kong-ui-public-top-n-table .top-n-table .table-headings[data-v-5db48d63]{flex-shrink:0;font-size:14px;font-weight:600;line-height:24px}.kong-ui-public-top-n-table .top-n-table .table-row[data-v-5db48d63]{align-self:stretch;border-bottom:1px solid #e0e4ea;display:flex;justify-content:space-between}.kong-ui-public-top-n-table .top-n-table .table-row[data-v-5db48d63]:last-of-type{border-bottom:none}.kong-ui-public-top-n-table .top-n-table .column-1[data-v-5db48d63]{flex:1;padding:0 24px 12px 0}.kong-ui-public-top-n-table .top-n-table .column-2[data-v-5db48d63]{flex:1;max-width:110px;padding:0 0 12px}.kong-ui-public-top-n-table .top-n-table .table-body[data-v-5db48d63]{overflow-y:auto}.kong-ui-public-top-n-table .top-n-table .table-body .table-row[data-v-5db48d63]:first-of-type{border-top:1px solid #e0e4ea}.kong-ui-public-top-n-table .top-n-table .table-body .column-1[data-v-5db48d63],.kong-ui-public-top-n-table .top-n-table .table-body .column-2[data-v-5db48d63]{padding-top:12px}.kong-ui-public-top-n-table .top-n-table .table-body .column-1[data-v-5db48d63]{color:#3a3f51;font-size:14px}.kong-ui-public-top-n-table .top-n-table .table-body .column-1[data-v-5db48d63] a{color:#0044f4;font-weight:700;text-decoration:none}.kong-ui-public-top-n-table.kong-card.border{border-radius:4px;padding:20px}.kong-ui-public-top-n-table.kong-card.border .k-card-header{align-items:baseline;margin-bottom:0!important}.kong-ui-public-top-n-table.kong-card.border .k-card-header .k-card-title{margin-bottom:16px}.kong-ui-public-top-n-table.kong-card.border .k-card-header .k-card-title h4{font-size:16px;font-weight:600}
|
|
1
|
+
.locked[data-v-6d10428e]{cursor:move}.tooltip-container[data-v-6d10428e]{background-color:#fff;border-radius:4px;border-radius:var(--kui-border-radius-20, 4px);box-shadow:0 5px 15px #0000001f,0 5px 10px #0000003d;max-width:425px;min-width:250px;position:absolute;transition:all .2s cubic-bezier(.25,.8,.25,1);z-index:999}.tooltip-container .tooltip-title[data-v-6d10428e]{border-bottom:1px solid #e0e4ea;border-bottom:var(--kui-border-width-10, 1px) solid var(--kui-color-border, #e0e4ea);display:flex;flex-direction:column;margin:6px;margin:var(--kui-space-30, 6px);min-height:24px;padding-bottom:6px;padding-bottom:var(--kui-space-30, 6px)}.tooltip-container .tooltip-title .title[data-v-6d10428e]{font-size:14px;font-size:var(--kui-font-size-30, 14px);font-weight:600;font-weight:var(--kui-font-weight-semibold, 600)}.tooltip-container .tooltip-title .subtitle[data-v-6d10428e]{font-size:12px;font-size:var(--kui-font-size-20, 12px);margin-top:6px;margin-top:var(--kui-space-30, 6px)}.tooltip-container .tooltip-title .drag-icon[data-v-6d10428e]{margin-top:6px;margin-top:var(--kui-space-30, 6px);position:absolute;right:0;top:0}.tooltip-container .tooltip[data-v-6d10428e]{list-style:none;margin:6px;margin:var(--kui-space-30, 6px);max-height:300px;min-width:250px;overflow-y:auto;overflow-y:var(--kui-space-auto, auto);padding-left:0;padding-left:var(--kui-space-0, 0px)}.tooltip-container .tooltip[data-v-6d10428e]{-ms-overflow-style:thin;scrollbar-color:#e0e4ea transparent;scrollbar-color:var(--kui-color-background-disabled, #e0e4ea) var(--kui-color-background-transparent, transparent);scrollbar-width:auto}.tooltip-container .tooltip[data-v-6d10428e] ::-webkit-scrollbar{width:40,8px;width:var(--kui-space, 40, 8px)}.tooltip-container .tooltip[data-v-6d10428e] ::-webkit-scrollbar-track{background:transparent}.tooltip-container .tooltip[data-v-6d10428e] ::-webkit-scrollbar-thumb{background-color:#e0e4ea;background-color:var(--kui-color-background-disabled, #e0e4ea);border-radius:10px;border-radius:var(--kui-border-radius-50, 10px)}.tooltip-container .tooltip li[data-v-6d10428e]{align-items:center;display:flex;font-size:12px;font-size:var(--kui-font-size-20, 12px);line-height:20px;line-height:var(--kui-line-height-30, 20px)}.tooltip-container .tooltip .display-label[data-v-6d10428e]{flex:1;max-width:75%;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.tooltip-container .tooltip .display-label.empty[data-v-6d10428e]{font-style:italic}.tooltip-container .tooltip .display-value[data-v-6d10428e]{margin-left:auto;margin-left:var(--kui-space-auto, auto);padding-left:8px;padding-left:var(--kui-space-40, 8px);white-space:nowrap}.tooltip-container .tooltip .square-marker[data-v-6d10428e]{display:inline-flex;flex-direction:row;height:12px;margin-right:6px;margin-right:var(--kui-space-30, 6px);width:12px}.legend-container[data-v-14909126]{display:flex;margin:6px 0 0;max-height:inherit;-ms-overflow-style:thin;overflow-x:hidden;overflow-y:auto;padding-left:0}.legend-container[data-v-14909126]{-ms-overflow-style:thin;scrollbar-color:#e0e4ea transparent;scrollbar-color:var(--kui-color-background-disabled, #e0e4ea) var(--kui-color-background-transparent, transparent);scrollbar-width:auto}.legend-container[data-v-14909126] ::-webkit-scrollbar{width:40,8px;width:var(--kui-space, 40, 8px)}.legend-container[data-v-14909126] ::-webkit-scrollbar-track{background:transparent}.legend-container[data-v-14909126] ::-webkit-scrollbar-thumb{background-color:#e0e4ea;background-color:var(--kui-color-background-disabled, #e0e4ea);border-radius:10px;border-radius:var(--kui-border-radius-50, 10px)}.legend-container.vertical[data-v-14909126]{flex-direction:column;justify-content:flex-start;max-height:90%;max-width:15%;min-width:10%;padding-left:12px;row-gap:16px}.legend-container.vertical .truncate-label[data-v-14909126]{max-width:12ch;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.legend-container.vertical li .legend[data-v-14909126]{margin-top:4px}@media (max-width: 767px){.legend-container.vertical[data-v-14909126]{column-gap:12px;display:grid;grid-template-columns:repeat(auto-fit,12ch);height:40px;justify-content:center;max-width:99%!important}.legend-container.vertical .sub-label[data-v-14909126]{display:none}}.legend-container.horizontal[data-v-14909126]{column-gap:12px;display:grid;height:var(--024ed260);justify-content:center;width:99%}.legend-container.horizontal .truncate-label[data-v-14909126]{max-width:20ch;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.legend-container.horizontal li[data-v-14909126]{align-items:center;margin-top:0}.legend-container.horizontal li .label[data-v-14909126]{line-height:24px;padding-right:2px;white-space:nowrap}.legend-container li[data-v-14909126]{align-items:start;cursor:pointer;display:flex;line-height:1}.legend-container li .square-marker[data-v-14909126]{height:8px;margin:0 6px 0 0;width:8px}.legend-container li .label[data-v-14909126]{font-size:12px}.legend-container li .sub-label[data-v-14909126]{font-size:12px;line-height:16px;word-break:none}.legend-container li .strike-through[data-v-14909126]{text-decoration:line-through}.legend-container li .empty[data-v-14909126]{font-style:italic}.legend-container li .tooltip-content[data-v-14909126]{max-width:40ch}.chart-parent[data-v-1129f066]{align-items:center;display:flex;height:inherit;justify-content:space-evenly;position:relative;width:inherit}.chart-parent.column[data-v-1129f066]{flex-direction:column}.chart-parent.column .chart-container[data-v-1129f066]{max-height:calc(100% - 48px);width:100%}.chart-parent.legend-row[data-v-1129f066]{flex-direction:row}.chart-parent.legend-row .chart-container[data-v-1129f066]{height:100%;width:90%}@media (max-width: 767px){.chart-parent.legend-row .chart-container[data-v-1129f066]{max-height:calc(100% - 48px)!important;width:100%!important}}@media (max-width: 767px){.chart-parent.legend-row[data-v-1129f066]{display:flex;flex-wrap:wrap}}.chart-parent .chart-container[data-v-1129f066]{flex:1 1 auto;position:relative}.chart-container[data-v-1129f066]{overflow:auto}.chart-container[data-v-1129f066]{-ms-overflow-style:thin;scrollbar-color:#e0e4ea transparent;scrollbar-color:var(--kui-color-background-disabled, #e0e4ea) var(--kui-color-background-transparent, transparent);scrollbar-width:auto}.chart-container[data-v-1129f066] ::-webkit-scrollbar{width:40,8px;width:var(--kui-space, 40, 8px)}.chart-container[data-v-1129f066] ::-webkit-scrollbar-track{background:transparent}.chart-container[data-v-1129f066] ::-webkit-scrollbar-thumb{background-color:#e0e4ea;background-color:var(--kui-color-background-disabled, #e0e4ea);border-radius:10px;border-radius:var(--kui-border-radius-50, 10px)}.chart-container .chart-body[data-v-1129f066]{height:100%}.chart-container[data-v-1129f066]::-webkit-scrollbar-track{background-color:#fff;background-color:var(--kui-color-background, #ffffff);border-radius:10px;border-radius:var(--kui-border-radius-50, 10px)}.chart-container[data-v-1129f066]::-webkit-scrollbar{width:10px}.chart-container[data-v-1129f066]::-webkit-scrollbar-thumb{background-color:#e0e4ea;background-color:var(--kui-color-background-disabled, #e0e4ea);border-radius:10px;border-radius:var(--kui-border-radius-50, 10px)}.axis[data-v-1129f066]{left:0;pointer-events:none;position:absolute;top:0;z-index:99}.axis-tooltip[data-v-1129f066]{background-color:#000933;background-color:var(--kui-color-background-inverse, #000933);border:none;border-radius:4px;border-radius:var(--kui-border-radius-20, 4px);color:#fff;color:var(--kui-color-text-inverse, #ffffff);max-width:40ch;padding:4px 8px;padding:var(--kui-space-20, 4px) var(--kui-space-40, 8px);position:absolute;width:max-content;z-index:100}.axis-tooltip .axis-tooltip-content[data-v-1129f066]{color:#fff;color:var(--kui-color-text-inverse, #ffffff);font-family:Inter,Roboto,Helvetica,sans-serif;font-family:var(--kui-font-family-text, "Inter", Roboto, Helvetica, sans-serif);font-size:12px;font-size:var(--kui-font-size-20, 12px);font-weight:500;font-weight:var(--kui-font-weight-medium, 500);line-height:16px;line-height:var(--kui-line-height-20, 16px)}.tooltip-boundary[data-v-1129f066]{height:100%;left:0;position:relative;top:0;width:100%}.chart-parent[data-v-6f244c54]{align-items:center;display:flex;height:inherit;justify-content:space-evenly;position:relative;width:inherit}.chart-parent.column[data-v-6f244c54]{flex-direction:column}.chart-parent.column .chart-container[data-v-6f244c54]{max-height:calc(100% - 48px);width:100%}.chart-parent.legend-row[data-v-6f244c54]{flex-direction:row}.chart-parent.legend-row .chart-container[data-v-6f244c54]{height:100%;width:90%}@media (max-width: 767px){.chart-parent.legend-row .chart-container[data-v-6f244c54]{max-height:calc(100% - 48px)!important;width:100%!important}}@media (max-width: 767px){.chart-parent.legend-row[data-v-6f244c54]{display:flex;flex-wrap:wrap}}.chart-parent .chart-container[data-v-6f244c54]{flex:1 1 auto;position:relative}.chart-parent[data-v-9ec09087]{align-items:center;display:flex;height:inherit;justify-content:space-evenly;position:relative;width:inherit}.chart-parent.column[data-v-9ec09087]{flex-direction:column}.chart-parent.column .chart-container[data-v-9ec09087]{max-height:calc(100% - 48px);width:100%}.chart-parent.legend-row[data-v-9ec09087]{flex-direction:row}.chart-parent.legend-row .chart-container[data-v-9ec09087]{height:100%;width:90%}@media (max-width: 767px){.chart-parent.legend-row .chart-container[data-v-9ec09087]{max-height:calc(100% - 48px)!important;width:100%!important}}@media (max-width: 767px){.chart-parent.legend-row[data-v-9ec09087]{display:flex;flex-wrap:wrap}}.chart-parent .chart-container[data-v-9ec09087]{flex:1 1 auto;position:relative}.kong-ui-public-csv-export-modal .modal-container{min-width:580px}.kong-ui-public-csv-export-modal .modal-container .selected-range{font-size:14px}.kong-ui-public-csv-export-modal .modal-container .text-muted{color:#00000073!important;font-size:14px}.kong-ui-public-csv-export-modal .modal-container .vitals-table{font-size:14px;margin-bottom:20px;margin-top:6px;width:100%}.kong-ui-public-csv-export-modal .modal-container .k-table thead{border-top:1px solid #e0e4ea;height:auto}.kong-ui-public-csv-export-modal .modal-container .modal-footer .vitals-report-export-button{display:inline-flex}.analytics-chart-shell[data-v-9741fa86],.simple-chart-shell[data-v-9741fa86]{border-radius:4px;border-radius:var(--kui-border-radius-20, 4px);display:flex;flex-direction:column}.analytics-chart-shell .chart-empty-state[data-v-9741fa86],.simple-chart-shell .chart-empty-state[data-v-9741fa86]{display:flex;flex-direction:column;height:100%;justify-content:center}.analytics-chart-shell[data-v-9741fa86]{height:100%;position:relative;width:100%}.analytics-chart-shell .analytics-chart-parent[data-v-9741fa86]{height:inherit;width:inherit}.analytics-chart-shell .chart-empty-state[data-v-9741fa86]{padding:20px 0 16px;padding:var(--kui-space-70, 20px) var(--kui-space-0, 0px) var(--kui-space-60, 16px) var(--kui-space-0, 0px)}.analytics-chart-shell .chart-header[data-v-9741fa86]{align-items:center;display:flex;justify-content:flex-start;right:0;width:100%;z-index:999}.analytics-chart-shell .chart-header .chart-header-icons-wrapper[data-v-9741fa86]{display:flex;justify-content:end}.analytics-chart-shell .chart-header .chart-export-button[data-v-9741fa86]{display:flex;margin-left:auto;margin-left:var(--kui-space-auto, auto);margin-right:0;margin-right:var(--kui-space-0, 0px)}.analytics-chart-shell .chart-title[data-v-9741fa86]{cursor:default;font-size:16px;font-size:var(--kui-font-size-40, 16px);font-weight:600;font-weight:var(--kui-font-weight-semibold, 600);max-width:32ch;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.analytics-chart-shell .tooltip[data-v-9741fa86]{display:flex;margin-left:12px;margin-left:var(--kui-space-50, 12px);margin-top:2px;margin-top:var(--kui-space-10, 2px)}.analytics-chart-shell .tooltip .tooltip-content[data-v-9741fa86]{max-width:40vw}.chart-parent[data-v-4f4e5b76]{align-items:center;display:flex;height:inherit;justify-content:space-evenly;position:relative;width:inherit}.chart-parent.column[data-v-4f4e5b76]{flex-direction:column}.chart-parent.column .chart-container[data-v-4f4e5b76]{max-height:calc(100% - 48px);width:100%}.chart-parent.legend-row[data-v-4f4e5b76]{flex-direction:row}.chart-parent.legend-row .chart-container[data-v-4f4e5b76]{height:100%;width:90%}@media (max-width: 767px){.chart-parent.legend-row .chart-container[data-v-4f4e5b76]{max-height:calc(100% - 48px)!important;width:100%!important}}@media (max-width: 767px){.chart-parent.legend-row[data-v-4f4e5b76]{display:flex;flex-wrap:wrap}}.chart-parent .chart-container[data-v-4f4e5b76]{flex:1 1 auto;position:relative}.chart-parent[data-v-4f4e5b76]{height:auto;margin:0;margin:var(--kui-space-0, 0px);padding:0;padding:var(--kui-space-0, 0px);width:auto}.chart-parent .chart-container[data-v-4f4e5b76]{margin:0;margin:var(--kui-space-0, 0px);max-height:100px;max-width:100px;padding:0;padding:var(--kui-space-0, 0px)}.chart-parent .chart-totals-flex[data-v-4f4e5b76]{align-items:center;display:flex;flex-direction:column;height:100px;justify-content:center;padding:24px 0 0;padding:var(--kui-space-80, 24px) var(--kui-space-0, 0px) var(--kui-space-0, 0px);position:absolute;width:100px;z-index:2}.chart-parent .chart-totals-flex .metric-large[data-v-4f4e5b76]{font-size:20px;font-size:var(--kui-font-size-60, 20px);font-weight:500;font-weight:var(--kui-font-weight-medium, 500);line-height:28px;line-height:var(--kui-line-height-50, 28px)}.chart-parent .chart-totals-flex .metric-small[data-v-4f4e5b76]{color:#6c7489;color:var(--kui-color-text-neutral, #6c7489);font-size:10px;font-size:var(--kui-font-size-10, 10px);font-weight:400;font-weight:var(--kui-font-weight-regular, 400);line-height:12px;line-height:var(--kui-line-height-10, 12px)}.chart-parent[data-v-89691310]{align-items:center;display:flex;height:inherit;justify-content:space-evenly;position:relative;width:inherit}.chart-parent.column[data-v-89691310]{flex-direction:column}.chart-parent.column .chart-container[data-v-89691310]{max-height:calc(100% - 48px);width:100%}.chart-parent.legend-row[data-v-89691310]{flex-direction:row}.chart-parent.legend-row .chart-container[data-v-89691310]{height:100%;width:90%}@media (max-width: 767px){.chart-parent.legend-row .chart-container[data-v-89691310]{max-height:calc(100% - 48px)!important;width:100%!important}}@media (max-width: 767px){.chart-parent.legend-row[data-v-89691310]{display:flex;flex-wrap:wrap}}.chart-parent .chart-container[data-v-89691310]{flex:1 1 auto;position:relative}.chart-parent[data-v-89691310]{container-type:inline-size}.chart-parent .single-value-error[data-v-89691310] .empty-state-title{font-size:12px;font-size:var(--kui-font-size-20, 12px);line-height:16px;line-height:var(--kui-line-height-20, 16px);margin:0;margin:var(--kui-space-0, 0px)}.chart-parent .single-value-wrapper[data-v-89691310]{align-items:baseline;display:inline-flex}.chart-parent .single-value-wrapper .single-value[data-v-89691310]{color:#000933;font-size:24px;font-weight:700;line-height:36px}.chart-parent .single-value-wrapper .single-value-unit[data-v-89691310]{color:#000933;font-size:20px;font-weight:700;line-height:32px}@container (min-width: 300px){.chart-parent .single-value-wrapper .single-value[data-v-89691310]{font-size:48px;line-height:56px}.chart-parent .single-value-wrapper .single-value-unit[data-v-89691310]{font-size:40px;line-height:48px}}@container (min-width: 500px){.chart-parent .single-value-wrapper .single-value[data-v-89691310]{font-size:56px;line-height:64px}.chart-parent .single-value-wrapper .single-value-unit[data-v-89691310]{font-size:48px;line-height:56px}}@container (min-width: 700px){.chart-parent .single-value-wrapper .single-value[data-v-89691310]{font-size:64px;line-height:72px}.chart-parent .single-value-wrapper .single-value-unit[data-v-89691310]{font-size:56px;line-height:64px}}@container (min-width: 1000px){.chart-parent .single-value-wrapper .single-value[data-v-89691310]{font-size:80px;line-height:88px}.chart-parent .single-value-wrapper .single-value-unit[data-v-89691310]{font-size:64px;line-height:72px}}@container (min-width: 1200px){.chart-parent .single-value-wrapper .single-value[data-v-89691310]{font-size:96px;line-height:104px}.chart-parent .single-value-wrapper .single-value-unit[data-v-89691310]{font-size:80px;line-height:88px}}.analytics-chart-shell[data-v-471652c8],.simple-chart-shell[data-v-471652c8]{border-radius:4px;border-radius:var(--kui-border-radius-20, 4px);display:flex;flex-direction:column}.analytics-chart-shell .chart-empty-state[data-v-471652c8],.simple-chart-shell .chart-empty-state[data-v-471652c8]{display:flex;flex-direction:column;height:100%;justify-content:center}.simple-chart-shell[data-v-471652c8]{margin:0;margin:var(--kui-space-0, 0px);padding:0;padding:var(--kui-space-0, 0px);width:100%}.simple-chart-shell .chart-empty-state[data-v-471652c8]{display:flex;flex-direction:column;justify-content:center}.simple-chart-shell .chart-empty-state[data-v-471652c8] .empty-state-title{font-size:12px;font-size:var(--kui-font-size-20, 12px);line-height:16px;line-height:var(--kui-line-height-20, 16px);margin:0;margin:var(--kui-space-0, 0px)}.kong-ui-public-top-n-table[data-v-5db48d63]{border:none!important;max-height:100%;padding:0!important}.kong-ui-public-top-n-table .top-n-card-description[data-v-5db48d63]{color:#6c7489;font-size:12px;text-align:right}.kong-ui-public-top-n-table[data-v-5db48d63] .k-card-actions{align-self:baseline;display:flex;line-height:22px}.kong-ui-public-top-n-table[data-v-5db48d63] .card-content{overflow-y:auto}.kong-ui-public-top-n-table[data-v-5db48d63] .card-content{-ms-overflow-style:thin;scrollbar-color:#e0e4ea transparent;scrollbar-color:var(--kui-color-background-disabled, #e0e4ea) var(--kui-color-background-transparent, transparent);scrollbar-width:auto}.kong-ui-public-top-n-table[data-v-5db48d63] .card-content ::-webkit-scrollbar{width:40,8px;width:var(--kui-space, 40, 8px)}.kong-ui-public-top-n-table[data-v-5db48d63] .card-content ::-webkit-scrollbar-track{background:transparent}.kong-ui-public-top-n-table[data-v-5db48d63] .card-content ::-webkit-scrollbar-thumb{background-color:#e0e4ea;background-color:var(--kui-color-background-disabled, #e0e4ea);border-radius:10px;border-radius:var(--kui-border-radius-50, 10px)}.kong-ui-public-top-n-table .top-n-table[data-v-5db48d63]{display:flex;flex-direction:column;max-height:100%;width:100%}.kong-ui-public-top-n-table .top-n-table .table-headings[data-v-5db48d63]{flex-shrink:0;font-size:14px;font-weight:600;line-height:24px}.kong-ui-public-top-n-table .top-n-table .table-row[data-v-5db48d63]{align-self:stretch;border-bottom:1px solid #e0e4ea;display:flex;justify-content:space-between}.kong-ui-public-top-n-table .top-n-table .table-row[data-v-5db48d63]:last-of-type{border-bottom:none}.kong-ui-public-top-n-table .top-n-table .column-1[data-v-5db48d63]{flex:1;padding:0 24px 12px 0}.kong-ui-public-top-n-table .top-n-table .column-2[data-v-5db48d63]{flex:1;max-width:110px;padding:0 0 12px}.kong-ui-public-top-n-table .top-n-table .table-body[data-v-5db48d63]{overflow-y:auto}.kong-ui-public-top-n-table .top-n-table .table-body .table-row[data-v-5db48d63]:first-of-type{border-top:1px solid #e0e4ea}.kong-ui-public-top-n-table .top-n-table .table-body .column-1[data-v-5db48d63],.kong-ui-public-top-n-table .top-n-table .table-body .column-2[data-v-5db48d63]{padding-top:12px}.kong-ui-public-top-n-table .top-n-table .table-body .column-1[data-v-5db48d63]{color:#3a3f51;font-size:14px}.kong-ui-public-top-n-table .top-n-table .table-body .column-1[data-v-5db48d63] a{color:#0044f4;font-weight:700;text-decoration:none}.kong-ui-public-top-n-table.kong-card.border{border-radius:4px;padding:20px}.kong-ui-public-top-n-table.kong-card.border .k-card-header{align-items:baseline;margin-bottom:0!important}.kong-ui-public-top-n-table.kong-card.border .k-card-header .k-card-title{margin-bottom:16px}.kong-ui-public-top-n-table.kong-card.border .k-card-header .k-card-title h4{font-size:16px;font-weight:600}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"StackedBarChart.vue.d.ts","sourceRoot":"","sources":["../../../../src/components/chart-types/StackedBarChart.vue"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"StackedBarChart.vue.d.ts","sourceRoot":"","sources":["../../../../src/components/chart-types/StackedBarChart.vue"],"names":[],"mappings":"AA2oBA,OAAO,KAAK,EAAE,QAAQ,EAAO,MAAM,KAAK,CAAA;AAQxC,OAAO,KAAK,EAAoB,iBAAiB,EAAE,kBAAkB,EAAE,kBAAkB,EAAE,UAAU,EAAE,YAAY,EAAE,YAAY,EAAgB,MAAM,aAAa,CAAA;;;cAgwBhJ,QAAQ,CAAC,UAAU,CAAC;;;;;;;;;;;;;cAUpB,QAAQ,CAAC,YAAY,CAAC;;;;;;;;;;;;;yBAarB,MAAM;;;;;;;;;;;;;;;;;;;;;;;;;;;;cA4BL,QAAQ,CAAC,iBAAiB,CAAC;;qBAEhC,kBAAkB,KAAK,kBAAkB;;;cAGpC,QAAQ,CAAC,kBAAkB,CAAC;;qBAEjC,YAAY,KAAK,YAAY;;;;cA1D1B,QAAQ,CAAC,UAAU,CAAC;;;;;;;;;;;;;cAUpB,QAAQ,CAAC,YAAY,CAAC;;;;;;;;;;;;;yBAarB,MAAM;;;;;;;;;;;;;;;;;;;;;;;;;;;;cA4BL,QAAQ,CAAC,iBAAiB,CAAC;;qBAEhC,kBAAkB,KAAK,kBAAkB;;;cAGpC,QAAQ,CAAC,kBAAkB,CAAC;;qBAEjC,YAAY,KAAK,YAAY;;;;;;;;;;;;;;;;AAjE9C,wBAoEG"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"TimeSeriesChart.vue.d.ts","sourceRoot":"","sources":["../../../../src/components/chart-types/TimeSeriesChart.vue"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"TimeSeriesChart.vue.d.ts","sourceRoot":"","sources":["../../../../src/components/chart-types/TimeSeriesChart.vue"],"names":[],"mappings":"AAiTA,OAAO,KAAK,EAAE,QAAQ,EAAE,MAAM,KAAK,CAAA;AAEnC,OAAO,0BAA0B,CAAA;AACjC,OAAO,eAAe,CAAA;AAStB,OAAO,KAAK,EAAE,iBAAiB,EAAE,kBAAkB,EAAE,kBAAkB,EAAE,UAAU,EAAE,YAAY,EAAE,YAAY,EAAE,MAAM,aAAa,CAAA;AACpI,OAAO,KAAK,EAAE,iBAAiB,EAAE,mBAAmB,EAAE,MAAM,qCAAqC,CAAA;;;cAmiB7E,QAAQ,CAAC,UAAU,CAAC;;;;;cAKpB,QAAQ,CAAC,gBAAgB,GAAG,iBAAiB,CAAC;;;;;;;;;;;;;;;;;;;;;;;;cAwB9C,QAAQ,CAAC,iBAAiB,CAAC;;;;;;;;;cAS3B,QAAQ,CAAC,YAAY,CAAC;;;;;;;;;;;;;;;;;;;;cAoBpB,QAAQ,CAAC,iBAAiB,CAAC;;qBAEhC,kBAAkB,KAAK,kBAAkB;;;cAGpC,QAAQ,CAAC,kBAAkB,CAAC;;qBAEjC,YAAY,KAAK,YAAY;;;;;;;;;;;cAjE1B,QAAQ,CAAC,UAAU,CAAC;;;;;cAKpB,QAAQ,CAAC,gBAAgB,GAAG,iBAAiB,CAAC;;;;;;;;;;;;;;;;;;;;;;;;cAwB9C,QAAQ,CAAC,iBAAiB,CAAC;;;;;;;;;cAS3B,QAAQ,CAAC,YAAY,CAAC;;;;;;;;;;;;;;;;;;;;cAoBpB,QAAQ,CAAC,iBAAiB,CAAC;;qBAEhC,kBAAkB,KAAK,kBAAkB;;;cAGpC,QAAQ,CAAC,kBAAkB,CAAC;;qBAEjC,YAAY,KAAK,YAAY;;;;;;;;;;;;;;;;;;;;;;;;AA3E9C,wBAmFG"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"useBarChartOptions.d.ts","sourceRoot":"","sources":["../../../src/composables/useBarChartOptions.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,eAAe,EAAE,sBAAsB,EAAc,MAAM,UAAU,CAAA;AAEnF,OAAO,KAAK,EACV,yBAAyB,EACzB,SAAS,EACT,WAAW,EAEX,uBAAuB,EAGvB,KAAK,EACN,MAAM,UAAU,CAAA;AAKjB,MAAM,CAAC,OAAO,UAAU,kBAAkB,CAAC,YAAY,EAAE,eAAe;;;;;;;;;;;;;;;;yCAkE/B;oBAAE,KAAK,EAAE,KAAK,CAAC;oBAAC,KAAK,EAAE,MAAM,CAAA;iBAAE;;;;kCAwClC,MAAM,SAAS,MAAM,KAAG,MAAM;;;;;;;;;;;;;;;;;;;;;;;;yCAxC3B;oBAAE,KAAK,EAAE,KAAK,CAAC;oBAAC,KAAK,EAAE,MAAM,CAAA;iBAAE;;;;kCAsElC,MAAM,SAAS,MAAM,KAAG,MAAM;;;;;;;;;;;;;;;;;;;;;;gCA4BtC,sBAAsB;;;;iCA3J7B,WAAW,CAAC,KAAK,CAAC;;;;;;;;;;;;;GAgLxC;AAED,OAAO,QAAQ,UAAU,CAAC;IACxB,UAAU,oBAAoB;QAC5B,CAAC,GAAG,EAAE,MAAM,GAAG,yBAAyB,CAAC,SAAS,CAAC,
|
|
1
|
+
{"version":3,"file":"useBarChartOptions.d.ts","sourceRoot":"","sources":["../../../src/composables/useBarChartOptions.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,eAAe,EAAE,sBAAsB,EAAc,MAAM,UAAU,CAAA;AAEnF,OAAO,KAAK,EACV,yBAAyB,EACzB,SAAS,EACT,WAAW,EAEX,uBAAuB,EAGvB,KAAK,EACN,MAAM,UAAU,CAAA;AAKjB,MAAM,CAAC,OAAO,UAAU,kBAAkB,CAAC,YAAY,EAAE,eAAe;;;;;;;;;;;;;;;;yCAkE/B;oBAAE,KAAK,EAAE,KAAK,CAAC;oBAAC,KAAK,EAAE,MAAM,CAAA;iBAAE;;;;kCAwClC,MAAM,SAAS,MAAM,KAAG,MAAM;;;;;;;;;;;;;;;;;;;;;;;;yCAxC3B;oBAAE,KAAK,EAAE,KAAK,CAAC;oBAAC,KAAK,EAAE,MAAM,CAAA;iBAAE;;;;kCAsElC,MAAM,SAAS,MAAM,KAAG,MAAM;;;;;;;;;;;;;;;;;;;;;;gCA4BtC,sBAAsB;;;;iCA3J7B,WAAW,CAAC,KAAK,CAAC;;;;;;;;;;;;;GAgLxC;AAED,OAAO,QAAQ,UAAU,CAAC;IACxB,UAAU,oBAAoB;QAC5B,CAAC,GAAG,EAAE,MAAM,GAAG,yBAAyB,CAAC,SAAS,CAAC,CAAA;KACpD;IACD,UAAU,kBAAkB;QAC1B,qBAAqB,EAAE,uBAAuB,CAAA;KAC/C;CACF"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"useDonutChartOptions.d.ts","sourceRoot":"","sources":["../../../src/composables/useDonutChartOptions.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,iBAAiB,EAAE,sBAAsB,EAAE,MAAM,UAAU,CAAA;AACzE,OAAO,KAAK,EACV,WAAW,EAEX,yBAAyB,EACzB,SAAS,EACV,MAAM,UAAU,CAAA;AAMjB,MAAM,CAAC,OAAO,UAAU,oBAAoB,CAAC,YAAY,EAAE,iBAAiB;;;;;;;;;;;;oCAuD9C,sBAAsB;;;;qCA9C7B,WAAW,CAAC,UAAU,CAAC;;;;;;;;EA+D7C;AAED,OAAO,QAAQ,UAAU,CAAC;IACxB,UAAU,oBAAoB;QAC5B,CAAC,GAAG,EAAE,MAAM,GAAG,yBAAyB,CAAC,SAAS,CAAC,
|
|
1
|
+
{"version":3,"file":"useDonutChartOptions.d.ts","sourceRoot":"","sources":["../../../src/composables/useDonutChartOptions.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,iBAAiB,EAAE,sBAAsB,EAAE,MAAM,UAAU,CAAA;AACzE,OAAO,KAAK,EACV,WAAW,EAEX,yBAAyB,EACzB,SAAS,EACV,MAAM,UAAU,CAAA;AAMjB,MAAM,CAAC,OAAO,UAAU,oBAAoB,CAAC,YAAY,EAAE,iBAAiB;;;;;;;;;;;;oCAuD9C,sBAAsB;;;;qCA9C7B,WAAW,CAAC,UAAU,CAAC;;;;;;;;EA+D7C;AAED,OAAO,QAAQ,UAAU,CAAC;IACxB,UAAU,oBAAoB;QAC5B,CAAC,GAAG,EAAE,MAAM,GAAG,yBAAyB,CAAC,SAAS,CAAC,CAAA;KACpD;CACF"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"useLineChartOptions.d.ts","sourceRoot":"","sources":["../../../src/composables/useLineChartOptions.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,EACV,yBAAyB,EACzB,SAAS,EAGV,MAAM,UAAU,CAAA;AAMjB,OAAO,KAAK,EAAE,sBAAsB,EAAE,gBAAgB,EAAE,MAAM,UAAU,CAAA;AAGxE,MAAM,CAAC,OAAO,UAAU,mBAAmB,CAAC,YAAY,EAAE,gBAAgB;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;sCAgBlD,MAAM;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;oCA0HA,sBAAsB;;;;;;;;;;EAqBnD;AAED,OAAO,QAAQ,UAAU,CAAC;IACxB,UAAU,oBAAoB;QAC5B,CAAC,GAAG,EAAE,MAAM,GAAG,yBAAyB,CAAC,SAAS,CAAC,
|
|
1
|
+
{"version":3,"file":"useLineChartOptions.d.ts","sourceRoot":"","sources":["../../../src/composables/useLineChartOptions.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,EACV,yBAAyB,EACzB,SAAS,EAGV,MAAM,UAAU,CAAA;AAMjB,OAAO,KAAK,EAAE,sBAAsB,EAAE,gBAAgB,EAAE,MAAM,UAAU,CAAA;AAGxE,MAAM,CAAC,OAAO,UAAU,mBAAmB,CAAC,YAAY,EAAE,gBAAgB;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;sCAgBlD,MAAM;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;oCA0HA,sBAAsB;;;;;;;;;;EAqBnD;AAED,OAAO,QAAQ,UAAU,CAAC;IACxB,UAAU,oBAAoB;QAC5B,CAAC,GAAG,EAAE,MAAM,GAAG,yBAAyB,CAAC,SAAS,CAAC,CAAA;KACpD;CACF"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"chart-data.d.ts","sourceRoot":"","sources":["../../../src/types/chart-data.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,SAAS,EAAE,YAAY,EAAE,UAAU,EAAE,MAAM,UAAU,CAAA;AACnE,OAAO,KAAK,EAAE,kBAAkB,EAAE,MAAM,mBAAmB,CAAA;AAC3D,OAAO,KAAK,EAAE,SAAS,EAAE,eAAe,EAAE,MAAM,eAAe,CAAA;AAC/D,OAAO,KAAK,EAAE,mBAAmB,EAAE,MAAM,qCAAqC,CAAA;AAG9E,MAAM,MAAM,OAAO,GAAG,YAAY,GAAG;IACnC,YAAY,EAAE,MAAM,
|
|
1
|
+
{"version":3,"file":"chart-data.d.ts","sourceRoot":"","sources":["../../../src/types/chart-data.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,SAAS,EAAE,YAAY,EAAE,UAAU,EAAE,MAAM,UAAU,CAAA;AACnE,OAAO,KAAK,EAAE,kBAAkB,EAAE,MAAM,mBAAmB,CAAA;AAC3D,OAAO,KAAK,EAAE,SAAS,EAAE,eAAe,EAAE,MAAM,eAAe,CAAA;AAC/D,OAAO,KAAK,EAAE,mBAAmB,EAAE,MAAM,qCAAqC,CAAA;AAG9E,MAAM,MAAM,OAAO,GAAG,YAAY,GAAG;IACnC,YAAY,EAAE,MAAM,CAAA;IACpB,SAAS,CAAC,EAAE,MAAM,CAAA;IAClB,KAAK,CAAC,EAAE,MAAM,CAAA;IACd,WAAW,CAAC,EAAE,MAAM,CAAA;IACpB,IAAI,CAAC,EAAE,OAAO,CAAA;IACd,WAAW,CAAC,EAAE,OAAO,CAAA;IACrB,cAAc,CAAC,EAAE,OAAO,CAAA;CACzB,CAAA;AAED,MAAM,WAAW,UAAW,SAAQ,SAAS;IAC3C,QAAQ,EAAE,OAAO,EAAE,CAAA;IACnB,MAAM,CAAC,EAAE,MAAM,EAAE,CAAA;IACjB,YAAY,CAAC,EAAE,OAAO,EAAE,CAAA;CACzB;AAED,MAAM,WAAW,kBAAkB;IACjC,CAAC,EAAE,MAAM,CAAA;IACT,CAAC,EAAE,MAAM,CAAA;CACV;AAED;;;;;;;GAOG;AACH,MAAM,WAAW,oBAAoB;IACnC,CAAC,cAAc,EAAE,MAAM,GAAG,MAAM,CAAA;CACjC;AAED,MAAM,WAAW,gBAAgB;IAC/B,GAAG,EAAE,MAAM,CAAA;IACX,SAAS,EAAE,MAAM,CAAA;IACjB,WAAW,CAAC,EAAE,OAAO,CAAA;CACtB;AAED;;GAEG;AACH,MAAM,WAAW,kBAAmB,SAAQ,UAAU;IACpD,KAAK,EAAE,gBAAgB,CAAA;IACvB,IAAI,EAAE,MAAM,CAAA;IACZ,cAAc,CAAC,EAAE,OAAO,CAAA;CACzB;AAED;;GAEG;AACH,MAAM,MAAM,iBAAiB,GAAG,CAAC,CAAC,EAAE,kBAAkB,EAAE,CAAC,EAAE,kBAAkB,KAAK,MAAM,CAAA;AAExF;;GAEG;AACH,MAAM,WAAW,qBAAqB;IACpC;;OAEG;IACH,IAAI,EAAE,SAAS,CAAA;IACf;;;;OAIG;IACH,OAAO,CAAC,EAAE,OAAO,CAAA;IACjB;;;OAGG;IACH,eAAe,CAAC,EAAE,MAAM,CAAA;IACxB;;;OAGG;IACH,kBAAkB,CAAC,EAAE,MAAM,CAAA;IAC3B;;OAEG;IACH,kBAAkB,CAAC,EAAE,oBAAoB,GAAG,MAAM,EAAE,CAAA;IACpD;;OAEG;IACH,iBAAiB,CAAC,EAAE,iBAAiB,CAAA;IACrC;;OAEG;IACH,kBAAkB,CAAC,EAAE,kBAAkB,CAAA;IACvC;;OAEG;IACH,SAAS,CAAC,EAAE,MAAM,CAAC,mBAAmB,EAAE,MAAM,CAAC,CAAA;CAChD;AAED;;GAEG;AACH,eAAO,MAAM,wBAAwB,uCAAwC,CAAA;AAE7E,MAAM,MAAM,wBAAwB,GAAG,OAAO,wBAAwB,CAAC,MAAM,CAAC,CAAA;AAE9E;;GAEG;AACH,MAAM,WAAW,kBAAkB;IACjC;;OAEG;IACH,IAAI,EAAE,eAAe,CAAA;IACrB;;OAEG;IACH,kBAAkB,CAAC,EAAE,oBAAoB,GAAG,MAAM,EAAE,CAAA;IACpD;;OAEG;IACH,aAAa,CAAC,EAAE,wBAAwB,CAAA;IACxC;;OAEG;IACH,cAAc,CAAC,EAAE,OAAO,CAAA;IACxB;;OAEG;IACH,SAAS,CAAC,EAAE,MAAM,CAAA;IAClB;;OAEG;IACH,aAAa,CAAC,EAAE,MAAM,CAAA;CACvB;AAED,MAAM,WAAW,YAAY;IAC3B,CAAC,KAAK,EAAE,MAAM,GAAG,gBAAgB,CAAA;CAClC;AAED,MAAM,WAAW,cAAc;IAC7B,MAAM,EAAE,MAAM,EAAE,CAAA;IAChB,eAAe,EAAE,MAAM,EAAE,CAAA;IACzB,WAAW,EAAE,MAAM,EAAE,CAAA;IACrB,IAAI,EAAE,MAAM,EAAE,CAAA;CACf;AAED,MAAM,WAAW,YAAY;IAC3B,IAAI,EAAE,MAAM,CAAA;IACZ,EAAE,EAAE,MAAM,CAAA;CACX;AAED,MAAM,WAAW,eAAe;IAC9B,EAAE,EAAE,MAAM,CAAA;IACV,IAAI,EAAE,MAAM,CAAA;IACZ,OAAO,EAAE,OAAO,CAAA;IAChB,SAAS,EAAE,MAAM,CAAA;CAClB"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"chart-export.d.ts","sourceRoot":"","sources":["../../../src/types/chart-export.ts"],"names":[],"mappings":"AAAA,MAAM,WAAW,eAAe;IAC9B,CAAC,GAAG,EAAE,MAAM,GAAG,MAAM,CAAA;CACtB;AAED,oBAAY,SAAS;IACnB,MAAM,WAAW;IACjB,MAAM,WAAW;IACjB,OAAO,YAAY;IACnB,MAAM,WAAW;IACjB,SAAS,cAAc;CACxB;AAED,MAAM,WAAW,MAAM;IACrB,KAAK,EAAE,MAAM,CAAA;IACb,GAAG,EAAE,MAAM,CAAA;CACZ;AAED,MAAM,WAAW,gBAAgB;IAC/B,KAAK,EAAE,MAAM,
|
|
1
|
+
{"version":3,"file":"chart-export.d.ts","sourceRoot":"","sources":["../../../src/types/chart-export.ts"],"names":[],"mappings":"AAAA,MAAM,WAAW,eAAe;IAC9B,CAAC,GAAG,EAAE,MAAM,GAAG,MAAM,CAAA;CACtB;AAED,oBAAY,SAAS;IACnB,MAAM,WAAW;IACjB,MAAM,WAAW;IACjB,OAAO,YAAY;IACnB,MAAM,WAAW;IACjB,SAAS,cAAc;CACxB;AAED,MAAM,WAAW,MAAM;IACrB,KAAK,EAAE,MAAM,CAAA;IACb,GAAG,EAAE,MAAM,CAAA;CACZ;AAED,MAAM,WAAW,gBAAgB;IAC/B,KAAK,EAAE,MAAM,CAAA;IACb,GAAG,EAAE,MAAM,CAAA;CACZ;AAED,MAAM,MAAM,OAAO,GAAG,eAAe,EAAE,CAAA"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"chartjs-options.d.ts","sourceRoot":"","sources":["../../../src/types/chartjs-options.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,GAAG,EAAE,WAAW,EAAE,MAAM,KAAK,CAAA;AAC3C,OAAO,KAAK,EAAE,KAAK,EAAE,SAAS,IAAI,gBAAgB,EAAE,YAAY,EAAE,KAAK,EAAE,MAAM,UAAU,CAAA;AACzF,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,eAAe,CAAA;AAC9C,OAAO,KAAK,EAAE,iBAAiB,EAAE,MAAM,qCAAqC,CAAA;AAE5E,MAAM,WAAW,YAAY;IAC3B,eAAe,EAAE,KAAK,CAAA;IACtB,WAAW,EAAE,KAAK,CAAA;IAClB,KAAK,EAAE,MAAM,CAAA;IACb,KAAK,EAAE,MAAM,GAAG,MAAM,CAAA;IACtB,QAAQ,EAAE,MAAM,CAAA;IAChB,cAAc,CAAC,EAAE,OAAO,CAAA;CACzB;AAED,MAAM,MAAM,kBAAkB,GAAG,CAAC,CAAC,EAAE,YAAY,EAAE,CAAC,EAAE,YAAY,KAAK,MAAM,CAAA;AAE7E,MAAM,WAAW,YAAY;IAC3B,WAAW,EAAE,OAAO,
|
|
1
|
+
{"version":3,"file":"chartjs-options.d.ts","sourceRoot":"","sources":["../../../src/types/chartjs-options.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,GAAG,EAAE,WAAW,EAAE,MAAM,KAAK,CAAA;AAC3C,OAAO,KAAK,EAAE,KAAK,EAAE,SAAS,IAAI,gBAAgB,EAAE,YAAY,EAAE,KAAK,EAAE,MAAM,UAAU,CAAA;AACzF,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,eAAe,CAAA;AAC9C,OAAO,KAAK,EAAE,iBAAiB,EAAE,MAAM,qCAAqC,CAAA;AAE5E,MAAM,WAAW,YAAY;IAC3B,eAAe,EAAE,KAAK,CAAA;IACtB,WAAW,EAAE,KAAK,CAAA;IAClB,KAAK,EAAE,MAAM,CAAA;IACb,KAAK,EAAE,MAAM,GAAG,MAAM,CAAA;IACtB,QAAQ,EAAE,MAAM,CAAA;IAChB,cAAc,CAAC,EAAE,OAAO,CAAA;CACzB;AAED,MAAM,MAAM,kBAAkB,GAAG,CAAC,CAAC,EAAE,YAAY,EAAE,CAAC,EAAE,YAAY,KAAK,MAAM,CAAA;AAE7E,MAAM,WAAW,YAAY;IAC3B,WAAW,EAAE,OAAO,CAAA;IACpB,cAAc,EAAE,MAAM,GAAG,MAAM,CAAA;IAC/B,aAAa,EAAE,KAAK,CAAC,YAAY,CAAC,CAAA;IAClC,IAAI,EAAE,MAAM,CAAA;IACZ,GAAG,EAAE,MAAM,CAAA;IACX,KAAK,EAAE,MAAM,CAAA;IACb,aAAa,EAAE,CAAC,IAAI,EAAE,MAAM,EAAE,KAAK,EAAE,MAAM,KAAK,MAAM,CAAA;IACtD,OAAO,EAAE,MAAM,CAAA;IACf,OAAO,EAAE,MAAM,CAAA;IACf,KAAK,EAAE,MAAM,CAAA;IACb,MAAM,EAAE,MAAM,CAAA;IACd,SAAS,EAAE,SAAS,CAAA;IACpB,OAAO,EAAE,MAAM,CAAA;IACf,MAAM,CAAC,EAAE,OAAO,CAAA;IAChB,kBAAkB,CAAC,EAAE,kBAAkB,CAAA;CACxC;AAED,UAAU,gBAAgB;IACxB,YAAY,EAAE,YAAY,CAAA;IAC1B,QAAQ,EAAE,MAAM,CAAA;IAChB,OAAO,EAAE,GAAG,CAAC,OAAO,CAAC,CAAA;IACrB,eAAe,CAAC,EAAE,GAAG,CAAC,MAAM,CAAC,CAAA;IAC7B,kBAAkB,CAAC,EAAE,GAAG,CAAC,MAAM,CAAC,CAAA;CACjC;AAED,MAAM,WAAW,eAAgB,SAAQ,gBAAgB;IACvD,SAAS,EAAE,GAAG,GAAG,GAAG,CAAA;IACpB,SAAS,EAAE,GAAG,CAAC,MAAM,CAAC,CAAA;CACvB;AAED,MAAM,WAAW,gBAAiB,SAAQ,gBAAgB;IACxD,WAAW,EAAE,GAAG,CAAC,MAAM,GAAG,SAAS,CAAC,CAAA;IACpC,WAAW,EAAE,GAAG,CAAC,iBAAiB,CAAC,CAAA;IACnC,kBAAkB,CAAC,EAAE,WAAW,CAAC,OAAO,GAAG,SAAS,CAAC,CAAA;CACtD;AAED,MAAM,WAAW,iBAAiB;IAChC,YAAY,EAAE,YAAY,CAAA;IAC1B,QAAQ,EAAE,MAAM,CAAA;CACjB;AAED,MAAM,WAAW,gBAAgB;IAC/B,IAAI,EAAE,OAAO,CAAA;IACb,IAAI,EAAE,MAAM,CAAA;IACZ,GAAG,EAAE,MAAM,CAAA;IACX,IAAI,EAAE,MAAM,CAAA;IACZ,MAAM,EAAE,MAAM,CAAA;CACf;AAED,MAAM,WAAW,sBAAsB;IACrC,KAAK,EAAE,KAAK,CAAA;IACZ,OAAO,EAAE,YAAY,CAAC,gBAAgB,CAAC,CAAA;CACxC"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"colors.d.ts","sourceRoot":"","sources":["../../../src/utils/colors.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,oBAAoB,EAAE,MAAM,iBAAiB,CAAA;AAE3D,UAAU,eAAe;IACvB,UAAU,EAAE,MAAM,
|
|
1
|
+
{"version":3,"file":"colors.d.ts","sourceRoot":"","sources":["../../../src/utils/colors.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,oBAAoB,EAAE,MAAM,iBAAiB,CAAA;AAE3D,UAAU,eAAe;IACvB,UAAU,EAAE,MAAM,CAAA;IAClB,IAAI,EAAE,MAAM,CAAA;CACb;AACD,UAAU,gBAAgB;IACxB,CAAC,UAAU,EAAE,MAAM,GAAG,eAAe,CAAA;CACtC;AAoBD,eAAO,MAAM,cAAc,UAM1B,CAAA;AAGD,eAAO,MAAM,kBAAkB,QAAS,MAAM,kBAAkB,MAAM,EAAE,WAGvE,CAAA;AAED,eAAO,MAAM,WAAW,QAAS,MAAM,OAAO,MAAM,KAAG,MAoCtD,CAAA;AAED,eAAO,MAAM,cAAc,YAAY,CAAA;AAEvC,eAAO,MAAM,0BAA0B,EAAE,gBAMxC,CAAA;AAED,eAAO,MAAM,8BAA8B,eAAgB,MAAM,WAIhE,CAAA;AAED,eAAO,MAAM,aAAa,EAAE,oBAG3B,CAAA;AAED,eAAO,MAAM,eAAe,EAAE,oBAG7B,CAAA;AAED,eAAO,MAAM,aAAa,EAAE,oBAI3B,CAAA;AAED,eAAO,MAAM,YAAY,YAAY,CAAA;AACrC,eAAO,MAAM,WAAW,YAAY,CAAA;AAEpC;;GAEG;AACH,eAAO,MAAM,WAAW,UAAW,MAAM;;;CAIxC,CAAA;AAED,eAAO,MAAM,kBAAkB,MAAO,MAAM,iBAAiB,MAAM,WAAW,OAAO,gBAAgB,MAAM,EAAE,GAAG,oBAAoB,KAAG,MAYtI,CAAA"}
|
package/dist/vitals-chart.es.js
CHANGED
|
@@ -18443,7 +18443,7 @@ const nk = ["id"], ik = ["id"], sk = { class: "axis-tooltip-content" }, eh = 6,
|
|
|
18443
18443
|
}, null, 8, ["id", "chart-instance", "items"])
|
|
18444
18444
|
], 2));
|
|
18445
18445
|
}
|
|
18446
|
-
}), gk = /* @__PURE__ */ fn(fk, [["__scopeId", "data-v-
|
|
18446
|
+
}), gk = /* @__PURE__ */ fn(fk, [["__scopeId", "data-v-1129f066"]]);
|
|
18447
18447
|
/*!
|
|
18448
18448
|
* chartjs-adapter-date-fns v3.0.0
|
|
18449
18449
|
* https://www.chartjs.org
|
|
@@ -19119,7 +19119,7 @@ const Ek = /* @__PURE__ */ _e({
|
|
|
19119
19119
|
}, null, 8, ["id", "chart-instance", "items"])
|
|
19120
19120
|
], 2));
|
|
19121
19121
|
}
|
|
19122
|
-
}), Ak = /* @__PURE__ */ fn(Ek, [["__scopeId", "data-v-
|
|
19122
|
+
}), Ak = /* @__PURE__ */ fn(Ek, [["__scopeId", "data-v-9ec09087"]]), gC = ["hidden", "single", "full"];
|
|
19123
19123
|
var Wi = /* @__PURE__ */ ((n) => (n.String = "string", n.Number = "number", n.Boolean = "boolean", n.Object = "object", n.Undefined = "undefined", n))(Wi || {});
|
|
19124
19124
|
const pC = [
|
|
19125
19125
|
"donut",
|
|
@@ -20954,7 +20954,7 @@ const gT = ["id"], pT = /* @__PURE__ */ _e({
|
|
|
20954
20954
|
]);
|
|
20955
20955
|
};
|
|
20956
20956
|
}
|
|
20957
|
-
}), yC = /* @__PURE__ */ fn(OT, [["__scopeId", "data-v-
|
|
20957
|
+
}), yC = /* @__PURE__ */ fn(OT, [["__scopeId", "data-v-9741fa86"]]), PT = {
|
|
20958
20958
|
class: "chart-parent",
|
|
20959
20959
|
"data-testid": "gauge-chart-parent"
|
|
20960
20960
|
}, ET = { class: "chart-totals-flex" }, AT = {
|
package/dist/vitals-chart.umd.js
CHANGED
|
@@ -20,12 +20,12 @@
|
|
|
20
20
|
* https://www.chartjs.org/chartjs-plugin-annotation/index
|
|
21
21
|
* (c) 2024 chartjs-plugin-annotation Contributors
|
|
22
22
|
* Released under the MIT License
|
|
23
|
-
*/const Xh={modes:{point(n,t){return Wr(n,t,{intersect:!0})},nearest(n,t,e){return yk(n,t,e)},x(n,t,e){return Wr(n,t,{intersect:e.intersect,axis:"x"})},y(n,t,e){return Wr(n,t,{intersect:e.intersect,axis:"y"})}}};function Ka(n,t,e){return(Xh.modes[e.mode]||Xh.modes.nearest)(n,t,e)}function pk(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 mk(n,t,e){return e==="x"?{x:n.x,y:t.y}:e==="y"?{x:t.x,y:n.y}:t}function Wr(n,t,e){return n.filter(i=>e.intersect?i.inRange(t.x,t.y):pk(i,t,e.axis))}function yk(n,t,e){let i=Number.POSITIVE_INFINITY;return Wr(n,t,e).reduce((s,r)=>{const o=r.getCenterPoint(),a=mk(t,o,e.axis),l=ci(t,a);return l<i?(s=[r],i=l):l===i&&s.push(r),s},[]).sort((s,r)=>s._index-r._index).slice(0,1)}function Jn(n,t,e){const i=Math.cos(e),s=Math.sin(e),r=t.x,o=t.y;return{x:r+i*(n.x-r)-s*(n.y-o),y:o+s*(n.x-r)+i*(n.y-o)}}const bk=(n,t)=>t>n||n.length>t.length&&n.slice(0,t.length)===t,ti=.001,Yr=(n,t,e)=>Math.min(e,Math.max(t,n)),Gh=(n,t)=>n.value>=n.start-t&&n.value<=n.end+t;function _k(n,t,e){for(const i of Object.keys(n))n[i]=Yr(n[i],t,e);return n}function xk(n,t,e,i){return!n||!t||e<=0?!1:Math.pow(n.x-t.x,2)+Math.pow(n.y-t.y,2)<=Math.pow(e+i,2)}function Kh(n,{x:t,y:e,x2:i,y2:s},r,{borderWidth:o,hitTolerance:a}){const l=(o+a)/2,c=n.x>=t-l-ti&&n.x<=i+l+ti,u=n.y>=e-l-ti&&n.y<=s+l+ti;return r==="x"?c:(r==="y"||c)&&u}function Zh(n,{rect:t,center:e},i,{rotation:s,borderWidth:r,hitTolerance:o}){const a=Jn(n,e,Yt(-s));return Kh(a,t,i,{borderWidth:r,hitTolerance:o})}function ei(n,t){const{centerX:e,centerY:i}=n.getProps(["centerX","centerY"],t);return{x:e,y:i}}function wk(n,t,e,i=!0){const s=e.split(".");let r=0;for(const o of t.split(".")){const a=s[r++];if(parseInt(o,10)<parseInt(a,10))break;if(bk(a,o)){if(i)throw new Error(`${n} v${e} is not supported. v${t} or newer is required.`);return!1}}return!0}const Qh=n=>typeof n=="string"&&n.endsWith("%"),Jh=n=>parseFloat(n)/100,tf=n=>Yr(Jh(n),0,1),Ts=(n,t)=>({x:n,y:t,x2:n,y2:t,width:0,height:0}),vk={box:n=>Ts(n.centerX,n.centerY),doughnutLabel:n=>Ts(n.centerX,n.centerY),ellipse:n=>({centerX:n.centerX,centerY:n.centerX,radius:0,width:0,height:0}),label:n=>Ts(n.centerX,n.centerY),line:n=>Ts(n.x,n.y),point:n=>({centerX:n.centerX,centerY:n.centerY,radius:0,width:0,height:0}),polygon:n=>Ts(n.centerX,n.centerY)};function Za(n,t){return t==="start"?0:t==="end"?n:Qh(t)?tf(t)*n:n/2}function Tn(n,t,e=!0){return typeof t=="number"?t:Qh(t)?(e?tf(t):Jh(t))*n:n}function kk(n,t){const{x:e,width:i}=n,s=t.textAlign;return s==="center"?e+i/2:s==="end"||s==="right"?e+i:e}function ef(n,t,{borderWidth:e,position:i,xAdjust:s,yAdjust:r},o){const a=at(o),l=t.width+(a?o.width:0)+e,c=t.height+(a?o.height:0)+e,u=Qa(i),d=of(n.x,l,s,u.x),f=of(n.y,c,r,u.y);return{x:d,y:f,x2:d+l,y2:f+c,width:l,height:c,centerX:d+l/2,centerY:f+c/2}}function Qa(n,t="center"){return at(n)?{x:et(n.x,t),y:et(n.y,t)}:(n=et(n,t),{x:n,y:n})}const nf=(n,t)=>n&&n.autoFit&&t<1;function sf(n,t){const e=n.font,i=xt(e)?e:[e];return nf(n,t)?i.map(function(s){const r=Rt(s);return r.size=Math.floor(s.size*t),r.lineHeight=s.lineHeight,Rt(r)}):i.map(s=>Rt(s))}function rf(n){return n&&(fe(n.xValue)||fe(n.yValue))}function of(n,t,e=0,i){return n-Za(t,i)+e}function ki(n,t,e){const i=e.init;if(i){if(i===!0)return lf(t,e)}else return;return Mk(n,t,e)}function af(n,t,e){let i=!1;return t.forEach(s=>{ge(n[s])?(i=!0,e[s]=n[s]):fe(e[s])&&delete e[s]}),i}function lf(n,t){const e=t.type||"line";return vk[e](n)}function Mk(n,t,e){const i=wt(e.init,[{chart:n,properties:t,options:e}]);if(i===!0)return lf(t,e);if(at(i))return i}const Ja=new Map,Sk=n=>isNaN(n)||n<=0,Dk=n=>n.reduce(function(t,e){return t+=e.string,t},"");function jr(n){if(n&&typeof n=="object"){const t=n.toString();return t==="[object HTMLImageElement]"||t==="[object HTMLCanvasElement]"}}function Vr(n,{x:t,y:e},i){i&&(n.translate(t,e),n.rotate(Yt(i)),n.translate(-t,-e))}function un(n,t){if(t&&t.borderWidth)return n.lineCap=t.borderCapStyle||"butt",n.setLineDash(t.borderDash),n.lineDashOffset=t.borderDashOffset,n.lineJoin=t.borderJoinStyle||"miter",n.lineWidth=t.borderWidth,n.strokeStyle=t.borderColor,!0}function Mi(n,t){n.shadowColor=t.backgroundShadowColor,n.shadowBlur=t.shadowBlur,n.shadowOffsetX=t.shadowOffsetX,n.shadowOffsetY=t.shadowOffsetY}function $r(n,t){const e=t.content;if(jr(e))return{width:Tn(e.width,t.width),height:Tn(e.height,t.height)};const i=sf(t),s=t.textStrokeWidth,r=xt(e)?e:[e],o=r.join()+Dk(i)+s+(n._measureText?"-spriting":"");return Ja.has(o)||Ja.set(o,Pk(n,r,i,s)),Ja.get(o)}function cf(n,t,e){const{x:i,y:s,width:r,height:o}=t;n.save(),Mi(n,e);const a=un(n,e);n.fillStyle=e.backgroundColor,n.beginPath(),ui(n,{x:i,y:s,w:r,h:o,radius:_k(xn(e.borderRadius),0,Math.min(r,o)/2)}),n.closePath(),n.fill(),a&&(n.shadowColor=e.borderShadowColor,n.stroke()),n.restore()}function uf(n,t,e,i){const s=e.content;if(jr(s)){n.save(),n.globalAlpha=Rk(e.opacity,s.style.opacity),n.drawImage(s,t.x,t.y,t.width,t.height),n.restore();return}const r=xt(s)?s:[s],o=sf(e,i),a=e.color,l=xt(a)?a:[a],c=kk(t,e),u=t.y+e.textStrokeWidth/2;n.save(),n.textBaseline="middle",n.textAlign=e.textAlign,Tk(n,e)&&Ek(n,{x:c,y:u},r,o),Ak(n,{x:c,y:u},r,{fonts:o,colors:l}),n.restore()}function Tk(n,t){if(t.textStrokeWidth>0)return n.lineJoin="round",n.miterLimit=2,n.lineWidth=t.textStrokeWidth,n.strokeStyle=t.textStrokeColor,!0}function Ck(n,t,e,i){const{radius:s,options:r}=t,o=r.pointStyle,a=r.rotation;let l=(a||0)*Do;if(jr(o)){n.save(),n.translate(e,i),n.rotate(l),n.drawImage(o,-o.width/2,-o.height/2,o.width,o.height),n.restore();return}Sk(s)||Ok(n,{x:e,y:i,radius:s,rotation:a,style:o,rad:l})}function Ok(n,{x:t,y:e,radius:i,rotation:s,style:r,rad:o}){let a,l,c,u;switch(n.beginPath(),r){default:n.arc(t,e,i,0,Tt),n.closePath();break;case"triangle":n.moveTo(t+Math.sin(o)*i,e-Math.cos(o)*i),o+=Ks,n.lineTo(t+Math.sin(o)*i,e-Math.cos(o)*i),o+=Ks,n.lineTo(t+Math.sin(o)*i,e-Math.cos(o)*i),n.closePath();break;case"rectRounded":u=i*.516,c=i-u,a=Math.cos(o+Oe)*c,l=Math.sin(o+Oe)*c,n.arc(t-a,e-l,u,o-ht,o-Pt),n.arc(t+l,e-a,u,o-Pt,o),n.arc(t+a,e+l,u,o,o+Pt),n.arc(t-l,e+a,u,o+Pt,o+ht),n.closePath();break;case"rect":if(!s){c=Math.SQRT1_2*i,n.rect(t-c,e-c,2*c,2*c);break}o+=Oe;case"rectRot":a=Math.cos(o)*i,l=Math.sin(o)*i,n.moveTo(t-a,e-l),n.lineTo(t+l,e-a),n.lineTo(t+a,e+l),n.lineTo(t-l,e+a),n.closePath();break;case"crossRot":o+=Oe;case"cross":a=Math.cos(o)*i,l=Math.sin(o)*i,n.moveTo(t-a,e-l),n.lineTo(t+a,e+l),n.moveTo(t+l,e-a),n.lineTo(t-l,e+a);break;case"star":a=Math.cos(o)*i,l=Math.sin(o)*i,n.moveTo(t-a,e-l),n.lineTo(t+a,e+l),n.moveTo(t+l,e-a),n.lineTo(t-l,e+a),o+=Oe,a=Math.cos(o)*i,l=Math.sin(o)*i,n.moveTo(t-a,e-l),n.lineTo(t+a,e+l),n.moveTo(t+l,e-a),n.lineTo(t-l,e+a);break;case"line":a=Math.cos(o)*i,l=Math.sin(o)*i,n.moveTo(t-a,e-l),n.lineTo(t+a,e+l);break;case"dash":n.moveTo(t,e),n.lineTo(t+Math.cos(o)*i,e+Math.sin(o)*i);break}n.fill()}function Pk(n,t,e,i){n.save();const s=t.length;let r=0,o=i;for(let a=0;a<s;a++){const l=e[Math.min(a,e.length-1)];n.font=l.string;const c=t[a];r=Math.max(r,n.measureText(c).width+i),o+=l.lineHeight}return n.restore(),{width:r,height:o}}function Ek(n,{x:t,y:e},i,s){n.beginPath();let r=0;i.forEach(function(o,a){const l=s[Math.min(a,s.length-1)],c=l.lineHeight;n.font=l.string,n.strokeText(o,t,e+c/2+r),r+=c}),n.stroke()}function Ak(n,{x:t,y:e},i,{fonts:s,colors:r}){let o=0;i.forEach(function(a,l){const c=r[Math.min(l,r.length-1)],u=s[Math.min(l,s.length-1)],d=u.lineHeight;n.beginPath(),n.font=u.string,n.fillStyle=c,n.fillText(a,t,e+d/2+o),o+=d,n.fill()})}function Rk(n,t){const e=_n(n)?n:t;return _n(e)?Yr(e,0,1):1}const df=["left","bottom","top","right"];function Lk(n,t){const{pointX:e,pointY:i,options:s}=t,r=s.callout,o=r&&r.display&&Bk(t,r);if(!o||Wk(t,r,o))return;if(n.save(),n.beginPath(),!un(n,r))return n.restore();const{separatorStart:l,separatorEnd:c}=Ik(t,o),{sideStart:u,sideEnd:d}=Fk(t,o,l);(r.margin>0||s.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=Jn({x:e,y:i},t.getCenterPoint(),Yt(-t.rotation));n.lineTo(f.x,f.y),n.stroke(),n.restore()}function Ik(n,t){const{x:e,y:i,x2:s,y2:r}=n,o=Nk(n,t);let a,l;return t==="left"||t==="right"?(a={x:e+o,y:i},l={x:a.x,y:r}):(a={x:e,y:i+o},l={x:s,y:a.y}),{separatorStart:a,separatorEnd:l}}function Nk(n,t){const{width:e,height:i,options:s}=n,r=s.callout.margin+s.borderWidth/2;return t==="right"?e+r:t==="bottom"?i+r:-r}function Fk(n,t,e){const{y:i,width:s,height:r,options:o}=n,a=o.callout.start,l=zk(t,o.callout);let c,u;return t==="left"||t==="right"?(c={x:e.x,y:i+Tn(r,a)},u={x:c.x+l,y:c.y}):(c={x:e.x+Tn(s,a),y:e.y},u={x:c.x,y:c.y+l}),{sideStart:c,sideEnd:u}}function zk(n,t){const e=t.side;return n==="left"||n==="top"?-e:e}function Bk(n,t){const e=t.position;return df.includes(e)?e:Hk(n,t)}function Hk(n,t){const{x:e,y:i,x2:s,y2:r,width:o,height:a,pointX:l,pointY:c,centerX:u,centerY:d,rotation:f}=n,g={x:u,y:d},p=t.start,b=Tn(o,p),w=Tn(a,p),v=[e,e+b,e+b,s],M=[i+w,r,i,r],D=[];for(let S=0;S<4;S++){const T=Jn({x:v[S],y:M[S]},g,Yt(f));D.push({position:df[S],distance:ci(T,{x:l,y:c})})}return D.sort((S,T)=>S.distance-T.distance)[0].position}function Wk(n,t,e){const{pointX:i,pointY:s}=n,r=t.margin;let o=i,a=s;return e==="left"?o+=r:e==="right"?o-=r:e==="top"?a+=r:e==="bottom"&&(a-=r),n.inRange(o,a)}const hf={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 Si(n,t,e){return t=typeof t=="number"?t:n.parse(t),At(t)?n.getPixelForValue(t):e}function ni(n,t,e){const i=t[e];if(i||e==="scaleID")return i;const s=e.charAt(0),r=Object.values(n).filter(o=>o.axis&&o.axis===s);return r.length?r[0].id:s}function ff(n,t){if(n){const e=n.options.reverse,i=Si(n,t.min,e?t.end:t.start),s=Si(n,t.max,e?t.start:t.end);return{start:i,end:s}}}function gf(n,t){const{chartArea:e,scales:i}=n,s=i[ni(i,t,"xScaleID")],r=i[ni(i,t,"yScaleID")];let o=e.width/2,a=e.height/2;return s&&(o=Si(s,t.xValue,s.left+s.width/2)),r&&(a=Si(r,t.yValue,r.top+r.height/2)),{x:o,y:a}}function tl(n,t){const e=n.scales,i=e[ni(e,t,"xScaleID")],s=e[ni(e,t,"yScaleID")];if(!i&&!s)return{};let{left:r,right:o}=i||n.chartArea,{top:a,bottom:l}=s||n.chartArea;const c=yf(i,{min:t.xMin,max:t.xMax,start:r,end:o});r=c.start,o=c.end;const u=yf(s,{min:t.yMin,max:t.yMax,start:l,end:a});return a=u.start,l=u.end,{x:r,y:a,x2:o,y2:l,width:o-r,height:l-a,centerX:r+(o-r)/2,centerY:a+(l-a)/2}}function pf(n,t){if(!rf(t)){const e=tl(n,t);let i=t.radius;(!i||isNaN(i))&&(i=Math.min(e.width,e.height)/2,t.radius=i);const s=i*2,r=e.centerX+t.xAdjust,o=e.centerY+t.yAdjust;return{x:r-i,y:o-i,x2:r+i,y2:o+i,centerX:r,centerY:o,width:s,height:s,radius:i}}return jk(n,t)}function Yk(n,t){const{scales:e,chartArea:i}=n,s=e[t.scaleID],r={x:i.left,y:i.top,x2:i.right,y2:i.bottom};return s?Vk(s,r,t):$k(e,r,t),r}function mf(n,t){const e=tl(n,t);return e.initProperties=ki(n,e,t),e.elements=[{type:"label",optionScope:"label",properties:Xk(n,e,t),initProperties:e.initProperties}],e}function jk(n,t){const e=gf(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 yf(n,t){const e=ff(n,t)||t;return{start:Math.min(e.start,e.end),end:Math.max(e.start,e.end)}}function Vk(n,t,e){const i=Si(n,e.value,NaN),s=Si(n,e.endValue,i);n.isHorizontal()?(t.x=i,t.x2=s):(t.y=i,t.y2=s)}function $k(n,t,e){for(const i of Object.keys(hf)){const s=n[ni(n,e,i)];if(s){const{min:r,max:o,start:a,end:l,startProp:c,endProp:u}=hf[i],d=ff(s,{min:e[r],max:e[o],start:s[a],end:s[l]});t[c]=d.start,t[u]=d.end}}}function Uk({properties:n,options:t},e,i,s){const{x:r,x2:o,width:a}=n;return bf({start:r,end:o,size:a,borderWidth:t.borderWidth},{position:i.x,padding:{start:s.left,end:s.right},adjust:t.label.xAdjust,size:e.width})}function qk({properties:n,options:t},e,i,s){const{y:r,y2:o,height:a}=n;return bf({start:r,end:o,size:a,borderWidth:t.borderWidth},{position:i.y,padding:{start:s.top,end:s.bottom},adjust:t.label.yAdjust,size:e.height})}function bf(n,t){const{start:e,end:i,borderWidth:s}=n,{position:r,padding:{start:o,end:a},adjust:l}=t,c=i-s-e-o-a-t.size;return e+s/2+l+Za(c,r)}function Xk(n,t,e){const i=e.label;i.backgroundColor="transparent",i.callout.display=!1;const s=Qa(i.position),r=jt(i.padding),o=$r(n.ctx,i),a=Uk({properties:t,options:e},o,s,r),l=qk({properties:t,options:e},o,s,r),c=o.width+r.width,u=o.height+r.height;return{x:a,y:l,x2:a+c,y2:l+u,width:c,height:u,centerX:a+c/2,centerY:l+u/2,rotation:i.rotation}}const el=["enter","leave"],nl=el.concat("click");function Gk(n,t,e){t.listened=af(e,nl,t.listeners),t.moveListened=!1,el.forEach(i=>{ge(e[i])&&(t.moveListened=!0)}),(!t.listened||!t.moveListened)&&t.annotations.forEach(i=>{!t.listened&&ge(i.click)&&(t.listened=!0),t.moveListened||el.forEach(s=>{ge(i[s])&&(t.listened=!0,t.moveListened=!0)})})}function Kk(n,t,e){if(n.listened)switch(t.type){case"mousemove":case"mouseout":return Zk(n,t,e);case"click":return Qk(n,t,e)}}function Zk(n,t,e){if(!n.moveListened)return;let i;t.type==="mousemove"?i=Ka(n.visibleElements,t,e.interaction):i=[];const s=n.hovered;n.hovered=i;const r={state:n,event:t};let o=_f(r,"leave",s,i);return _f(r,"enter",i,s)||o}function _f({state:n,event:t},e,i,s){let r;for(const o of i)s.indexOf(o)<0&&(r=xf(o.options[e]||n.listeners[e],o,t)||r);return r}function Qk(n,t,e){const i=n.listeners,s=Ka(n.visibleElements,t,e.interaction);let r;for(const o of s)r=xf(o.options.click||i.click,o,t)||r;return r}function xf(n,t,e){return wt(n,[t.$context,e])===!0}const Ur=["afterDraw","beforeDraw"];function Jk(n,t,e){const i=t.visibleElements;t.hooked=af(e,Ur,t.hooks),t.hooked||i.forEach(s=>{t.hooked||Ur.forEach(r=>{ge(s.options[r])&&(t.hooked=!0)})})}function wf(n,t,e){if(n.hooked){const i=t.options[e]||n.hooks[e];return wt(i,[t.$context])}}function tM(n,t,e){const i=rM(n.scales,t,e);let s=vf(t,i,"min","suggestedMin");s=vf(t,i,"max","suggestedMax")||s,s&&ge(t.handleTickRangeOptions)&&t.handleTickRangeOptions()}function eM(n,t){for(const e of n)iM(e,t)}function vf(n,t,e,i){if(At(t[e])&&!nM(n.options,e,i)){const s=n[e]!==t[e];return n[e]=t[e],s}}function nM(n,t,e){return fe(n[t])||fe(n[e])}function iM(n,t){for(const e of["scaleID","xScaleID","yScaleID"]){const i=ni(t,n,e);i&&!t[i]&&sM(n,e)&&console.warn(`No scale found with id '${i}' for annotation '${n.id}'`)}}function sM(n,t){if(t==="scaleID")return!0;const e=t.charAt(0);for(const i of["Min","Max","Value"])if(fe(n[e+i]))return!0;return!1}function rM(n,t,e){const i=t.axis,s=t.id,r=i+"ScaleID",o={min:et(t.min,Number.NEGATIVE_INFINITY),max:et(t.max,Number.POSITIVE_INFINITY)};for(const a of e)a.scaleID===s?kf(a,t,["value","endValue"],o):ni(n,a,r)===s&&kf(a,t,[i+"Min",i+"Max",i+"Value"],o);return o}function kf(n,t,e,i){for(const s of e){const r=n[s];if(fe(r)){const o=t.parse(r);i.min=Math.min(i.min,o),i.max=Math.max(i.max,o)}}}class Di extends Kt{inRange(t,e,i,s){const{x:r,y:o}=Jn({x:t,y:e},this.getCenterPoint(s),Yt(-this.options.rotation));return Kh({x:r,y:o},this.getProps(["x","y","x2","y2"],s),i,this.options)}getCenterPoint(t){return ei(this,t)}draw(t){t.save(),Vr(t,this.getCenterPoint(),this.options.rotation),cf(t,this,this.options),t.restore()}get label(){return this.elements&&this.elements[0]}resolveElementProperties(t,e){return mf(t,e)}}Di.id="boxAnnotation",Di.defaults={adjustScaleRange:!0,backgroundShadowColor:"transparent",borderCapStyle:"butt",borderDash:[],borderDashOffset:0,borderJoinStyle:"miter",borderRadius:0,borderShadowColor:"transparent",borderWidth:1,display:!0,init:void 0,hitTolerance: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,hitTolerance: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},Di.defaultRoutes={borderColor:"color",backgroundColor:"color"},Di.descriptors={label:{_fallback:!0}};class qr extends Kt{inRange(t,e,i,s){return Zh({x:t,y:e},{rect:this.getProps(["x","y","x2","y2"],s),center:this.getCenterPoint(s)},i,{rotation:this.rotation,borderWidth:0,hitTolerance:this.options.hitTolerance})}getCenterPoint(t){return ei(this,t)}draw(t){const e=this.options;!e.display||!e.content||(dM(t,this),t.save(),Vr(t,this.getCenterPoint(),this.rotation),uf(t,this,e,this._fitRatio),t.restore())}resolveElementProperties(t,e){const i=oM(t,e);if(!i)return{};const{controllerMeta:s,point:r,radius:o}=lM(t,e,i);let a=$r(t.ctx,e);const l=cM(a,o);nf(e,l)&&(a={width:a.width*l,height:a.height*l});const{position:c,xAdjust:u,yAdjust:d}=e,f=ef(r,a,{borderWidth:0,position:c,xAdjust:u,yAdjust:d});return{initProperties:ki(t,f,e),...f,...s,rotation:e.rotation,_fitRatio:l}}}qr.id="doughnutLabelAnnotation",qr.defaults={autoFit:!0,autoHide:!0,backgroundColor:"transparent",backgroundShadowColor:"transparent",borderColor:"transparent",borderDash:[],borderDashOffset:0,borderJoinStyle:"miter",borderShadowColor:"transparent",borderWidth:0,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,hitTolerance:0,init:void 0,opacity:void 0,position:"center",rotation:0,shadowBlur:0,shadowOffsetX:0,shadowOffsetY:0,spacing:1,textAlign:"center",textStrokeColor:void 0,textStrokeWidth:0,width:void 0,xAdjust:0,yAdjust:0},qr.defaultRoutes={};function oM(n,t){return n.getSortedVisibleDatasetMetas().reduce(function(e,i){const s=i.controller;return s instanceof on&&aM(n,t,i.data)&&(!e||s.innerRadius<e.controller.innerRadius)&&s.options.circumference>=90?i:e},void 0)}function aM(n,t,e){if(!t.autoHide)return!0;for(let i=0;i<e.length;i++)if(!e[i].hidden&&n.getDataVisibility(i))return!0}function lM({chartArea:n},t,e){const{left:i,top:s,right:r,bottom:o}=n,{innerRadius:a,offsetX:l,offsetY:c}=e.controller,u=(i+r)/2+l,d=(s+o)/2+c,f={left:Math.max(u-a,i),right:Math.min(u+a,r),top:Math.max(d-a,s),bottom:Math.min(d+a,o)},g={x:(f.left+f.right)/2,y:(f.top+f.bottom)/2},p=t.spacing+t.borderWidth/2,b=a-p,w=g.y>d,v=w?s+p:o-p,M=uM(v,u,d,b);return{controllerMeta:{_centerX:u,_centerY:d,_radius:b,_counterclockwise:w,...M},point:g,radius:Math.min(a,Math.min(f.right-f.left,f.bottom-f.top)/2)}}function cM({width:n,height:t},e){const i=Math.sqrt(Math.pow(n,2)+Math.pow(t,2));return e*2/i}function uM(n,t,e,i){const s=Math.pow(e-n,2),r=Math.pow(i,2),o=t*-2,a=Math.pow(t,2)+s-r,l=Math.pow(o,2)-4*a;if(l<=0)return{_startAngle:0,_endAngle:Tt};const c=(-o-Math.sqrt(l))/2,u=(-o+Math.sqrt(l))/2;return{_startAngle:Qs({x:t,y:e},{x:c,y:n}).angle,_endAngle:Qs({x:t,y:e},{x:u,y:n}).angle}}function dM(n,t){const{_centerX:e,_centerY:i,_radius:s,_startAngle:r,_endAngle:o,_counterclockwise:a,options:l}=t;n.save();const c=un(n,l);n.fillStyle=l.backgroundColor,n.beginPath(),n.arc(e,i,s,r,o,a),n.closePath(),n.fill(),c&&n.stroke(),n.restore()}class Cs extends Kt{inRange(t,e,i,s){return Zh({x:t,y:e},{rect:this.getProps(["x","y","x2","y2"],s),center:this.getCenterPoint(s)},i,{rotation:this.rotation,borderWidth:this.options.borderWidth,hitTolerance:this.options.hitTolerance})}getCenterPoint(t){return ei(this,t)}draw(t){const e=this.options,i=!fe(this._visible)||this._visible;!e.display||!e.content||!i||(t.save(),Vr(t,this.getCenterPoint(),this.rotation),Lk(t,this),cf(t,this,e),uf(t,hM(this),e),t.restore())}resolveElementProperties(t,e){let i;if(rf(e))i=gf(t,e);else{const{centerX:a,centerY:l}=tl(t,e);i={x:a,y:l}}const s=jt(e.padding),r=$r(t.ctx,e),o=ef(i,r,e,s);return{initProperties:ki(t,o,e),pointX:i.x,pointY:i.y,...o,rotation:e.rotation}}}Cs.id="labelAnnotation",Cs.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,hitTolerance: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},Cs.defaultRoutes={borderColor:"color"};function hM({x:n,y:t,width:e,height:i,options:s}){const r=s.borderWidth/2,o=jt(s.padding);return{x:n+o.left+r,y:t+o.top+r,width:e-o.left-o.right-s.borderWidth,height:i-o.top-o.bottom-s.borderWidth}}const il=(n,t,e)=>({x:n.x+e*(t.x-n.x),y:n.y+e*(t.y-n.y)}),sl=(n,t,e)=>il(t,e,Math.abs((n-t.y)/(e.y-t.y))).x,Mf=(n,t,e)=>il(t,e,Math.abs((n-t.x)/(e.x-t.x))).y,Os=n=>n*n,fM=(n,t,{x:e,y:i,x2:s,y2:r},o)=>o==="y"?{start:Math.min(i,r),end:Math.max(i,r),value:t}:{start:Math.min(e,s),end:Math.max(e,s),value:n},Sf=(n,t,e,i)=>(1-i)*(1-i)*n+2*(1-i)*i*t+i*i*e,rl=(n,t,e,i)=>({x:Sf(n.x,t.x,e.x,i),y:Sf(n.y,t.y,e.y,i)}),Df=(n,t,e,i)=>2*(1-i)*(t-n)+2*i*(e-t),Tf=(n,t,e,i)=>-Math.atan2(Df(n.x,t.x,e.x,i),Df(n.y,t.y,e.y,i))+.5*ht;class Ps extends Kt{inRange(t,e,i,s){const r=(this.options.borderWidth+this.options.hitTolerance)/2;if(i!=="x"&&i!=="y"){const o={mouseX:t,mouseY:e},{path:a,ctx:l}=this;if(a){un(l,this.options),l.lineWidth+=this.options.hitTolerance;const{chart:u}=this.$context,d=t*u.currentDevicePixelRatio,f=e*u.currentDevicePixelRatio,g=l.isPointInStroke(a,d,f)||ol(this,o,s);return l.restore(),g}const c=Os(r);return yM(this,o,c,s)||ol(this,o,s)}return gM(this,{mouseX:t,mouseY:e},i,{hitSize:r,useFinalPosition:s})}getCenterPoint(t){return ei(this,t)}draw(t){const{x:e,y:i,x2:s,y2:r,cp:o,options:a}=this;if(t.save(),!un(t,a))return t.restore();Mi(t,a);const l=Math.sqrt(Math.pow(s-e,2)+Math.pow(r-i,2));if(a.curve&&o)return SM(t,this,o,l),t.restore();const{startOpts:c,endOpts:u,startAdjust:d,endAdjust:f}=Af(this),g=Math.atan2(r-i,s-e);t.translate(e,i),t.rotate(g),t.beginPath(),t.moveTo(0+d,0),t.lineTo(l-f,0),t.shadowColor=a.borderShadowColor,t.stroke(),al(t,0,d,c),al(t,l,-f,u),t.restore()}get label(){return this.elements&&this.elements[0]}resolveElementProperties(t,e){const i=Yk(t,e),{x:s,y:r,x2:o,y2:a}=i,l=pM(i,t.chartArea),c=l?mM({x:s,y:r},{x:o,y:a},t.chartArea):{x:s,y:r,x2:o,y2:a,width:Math.abs(o-s),height:Math.abs(a-r)};if(c.centerX=(o+s)/2,c.centerY=(a+r)/2,c.initProperties=ki(t,c,e),e.curve){const d={x:c.x,y:c.y},f={x:c.x2,y:c.y2};c.cp=MM(c,e,ci(d,f))}const u=bM(t,c,e.label);return u._visible=l,c.elements=[{type:"label",optionScope:"label",properties:u,initProperties:c.initProperties}],c}}Ps.id="lineAnnotation";const Cf={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};Ps.defaults={adjustScaleRange:!0,arrowHeads:{display:!1,end:Object.assign({},Cf),fill:!1,length:12,start:Object.assign({},Cf),width:6},borderDash:[],borderDashOffset:0,borderShadowColor:"transparent",borderWidth:2,curve:!1,controlPoint:{y:"-50%"},display:!0,endValue:void 0,init:void 0,hitTolerance: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({},Cs.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,hitTolerance: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},Ps.descriptors={arrowHeads:{start:{_fallback:!0},end:{_fallback:!0},_fallback:!0}},Ps.defaultRoutes={borderColor:"color"};function gM(n,{mouseX:t,mouseY:e},i,{hitSize:s,useFinalPosition:r}){const o=fM(t,e,n.getProps(["x","y","x2","y2"],r),i);return Gh(o,s)||ol(n,{mouseX:t,mouseY:e},r,i)}function pM({x:n,y:t,x2:e,y2:i},{top:s,right:r,bottom:o,left:a}){return!(n<a&&e<a||n>r&&e>r||t<s&&i<s||t>o&&i>o)}function Of({x:n,y:t},e,{top:i,right:s,bottom:r,left:o}){return n<o&&(t=Mf(o,{x:n,y:t},e),n=o),n>s&&(t=Mf(s,{x:n,y:t},e),n=s),t<i&&(n=sl(i,{x:n,y:t},e),t=i),t>r&&(n=sl(r,{x:n,y:t},e),t=r),{x:n,y:t}}function mM(n,t,e){const{x:i,y:s}=Of(n,t,e),{x:r,y:o}=Of(t,n,e);return{x:i,y:s,x2:r,y2:o,width:Math.abs(r-i),height:Math.abs(o-s)}}function yM(n,{mouseX:t,mouseY:e},i=ti,s){const{x:r,y:o,x2:a,y2:l}=n.getProps(["x","y","x2","y2"],s),c=a-r,u=l-o,d=Os(c)+Os(u),f=d===0?-1:((t-r)*c+(e-o)*u)/d;let g,p;return f<0?(g=r,p=o):f>1?(g=a,p=l):(g=r+f*c,p=o+f*u),Os(t-g)+Os(e-p)<=i}function ol(n,{mouseX:t,mouseY:e},i,s){const r=n.label;return r.options.display&&r.inRange(t,e,s,i)}function bM(n,t,e){const i=e.borderWidth,s=jt(e.padding),r=$r(n.ctx,e),o=r.width+s.width+i,a=r.height+s.height+i;return xM(t,e,{width:o,height:a,padding:s},n.chartArea)}function _M(n){const{x:t,y:e,x2:i,y2:s}=n,r=Math.atan2(s-e,i-t);return r>ht/2?r-ht:r<ht/-2?r+ht:r}function xM(n,t,e,i){const{width:s,height:r,padding:o}=e,{xAdjust:a,yAdjust:l}=t,c={x:n.x,y:n.y},u={x:n.x2,y:n.y2},d=t.rotation==="auto"?_M(n):Yt(t.rotation),f=wM(s,r,d),g=vM(n,t,{labelSize:f,padding:o},i),p=n.cp?rl(c,n.cp,u,g):il(c,u,g),b={size:f.w,min:i.left,max:i.right,padding:o.left},w={size:f.h,min:i.top,max:i.bottom,padding:o.top},v=Ef(p.x,b)+a,M=Ef(p.y,w)+l;return{x:v-s/2,y:M-r/2,x2:v+s/2,y2:M+r/2,centerX:v,centerY:M,pointX:p.x,pointY:p.y,width:s,height:r,rotation:Zs(d)}}function wM(n,t,e){const i=Math.cos(e),s=Math.sin(e);return{w:Math.abs(n*i)+Math.abs(t*s),h:Math.abs(n*s)+Math.abs(t*i)}}function vM(n,t,e,i){let s;const r=kM(n,i);return t.position==="start"?s=Pf({w:n.x2-n.x,h:n.y2-n.y},e,t,r):t.position==="end"?s=1-Pf({w:n.x-n.x2,h:n.y-n.y2},e,t,r):s=Za(1,t.position),s}function Pf(n,t,e,i){const{labelSize:s,padding:r}=t,o=n.w*i.dx,a=n.h*i.dy,l=o>0&&(s.w/2+r.left-i.x)/o,c=a>0&&(s.h/2+r.top-i.y)/a;return Yr(Math.max(l,c),0,.25)}function kM(n,t){const{x:e,x2:i,y:s,y2:r}=n,o=Math.min(s,r)-t.top,a=Math.min(e,i)-t.left,l=t.bottom-Math.max(s,r),c=t.right-Math.max(e,i);return{x:Math.min(a,c),y:Math.min(o,l),dx:a<=c?1:-1,dy:o<=l?1:-1}}function Ef(n,t){const{size:e,min:i,max:s,padding:r}=t,o=e/2;return e>s-i?(s+i)/2:(i>=n-r-o&&(n=i+r+o),s<=n+r+o&&(n=s-r-o),n)}function Af(n){const t=n.options,e=t.arrowHeads&&t.arrowHeads.start,i=t.arrowHeads&&t.arrowHeads.end;return{startOpts:e,endOpts:i,startAdjust:Rf(n,e),endAdjust:Rf(n,i)}}function Rf(n,t){if(!t||!t.display)return 0;const{length:e,width:i}=t,s=n.options.borderWidth/2,r={x:e,y:i+s};return Math.abs(sl(0,r,{x:0,y:s}))}function al(n,t,e,i){if(!i||!i.display)return;const{length:s,width:r,fill:o,backgroundColor:a,borderColor:l}=i,c=Math.abs(t-s)+e;n.beginPath(),Mi(n,i),un(n,i),n.moveTo(c,-r),n.lineTo(t+e,0),n.lineTo(c,r),o===!0?(n.fillStyle=a||l,n.closePath(),n.fill(),n.shadowColor="transparent"):n.shadowColor=i.borderShadowColor,n.stroke()}function MM(n,t,e){const{x:i,y:s,x2:r,y2:o,centerX:a,centerY:l}=n,c=Math.atan2(o-s,r-i),u=Qa(t.controlPoint,0),d={x:a+Tn(e,u.x,!1),y:l+Tn(e,u.y,!1)};return Jn(d,{x:a,y:l},c)}function Lf(n,{x:t,y:e},{angle:i,adjust:s},r){!r||!r.display||(n.save(),n.translate(t,e),n.rotate(i),al(n,0,-s,r),n.restore())}function SM(n,t,e,i){const{x:s,y:r,x2:o,y2:a,options:l}=t,{startOpts:c,endOpts:u,startAdjust:d,endAdjust:f}=Af(t),g={x:s,y:r},p={x:o,y:a},b=Tf(g,e,p,0),w=Tf(g,e,p,1)-ht,v=rl(g,e,p,d/i),M=rl(g,e,p,1-f/i),D=new Path2D;n.beginPath(),D.moveTo(v.x,v.y),D.quadraticCurveTo(e.x,e.y,M.x,M.y),n.shadowColor=l.borderShadowColor,n.stroke(D),t.path=D,t.ctx=n,Lf(n,v,{angle:b,adjust:d},c),Lf(n,M,{angle:w,adjust:f},u)}class Es extends Kt{inRange(t,e,i,s){const r=this.options.rotation,o=(this.options.borderWidth+this.options.hitTolerance)/2;if(i!=="x"&&i!=="y")return DM({x:t,y:e},this.getProps(["width","height","centerX","centerY"],s),r,o);const{x:a,y:l,x2:c,y2:u}=this.getProps(["x","y","x2","y2"],s),d=i==="y"?{start:l,end:u}:{start:a,end:c},f=Jn({x:t,y:e},this.getCenterPoint(s),Yt(-r));return f[i]>=d.start-o-ti&&f[i]<=d.end+o+ti}getCenterPoint(t){return ei(this,t)}draw(t){const{width:e,height:i,centerX:s,centerY:r,options:o}=this;t.save(),Vr(t,this.getCenterPoint(),o.rotation),Mi(t,this.options),t.beginPath(),t.fillStyle=o.backgroundColor;const a=un(t,o);t.ellipse(s,r,i/2,e/2,ht/2,0,2*ht),t.fill(),a&&(t.shadowColor=o.borderShadowColor,t.stroke()),t.restore()}get label(){return this.elements&&this.elements[0]}resolveElementProperties(t,e){return mf(t,e)}}Es.id="ellipseAnnotation",Es.defaults={adjustScaleRange:!0,backgroundShadowColor:"transparent",borderDash:[],borderDashOffset:0,borderShadowColor:"transparent",borderWidth:1,display:!0,hitTolerance:0,init:void 0,label:Object.assign({},Di.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},Es.defaultRoutes={borderColor:"color",backgroundColor:"color"},Es.descriptors={label:{_fallback:!0}};function DM(n,t,e,i){const{width:s,height:r,centerX:o,centerY:a}=t,l=s/2,c=r/2;if(l<=0||c<=0)return!1;const u=Yt(e||0),d=Math.cos(u),f=Math.sin(u),g=Math.pow(d*(n.x-o)+f*(n.y-a),2),p=Math.pow(f*(n.x-o)-d*(n.y-a),2);return g/Math.pow(l+i,2)+p/Math.pow(c+i,2)<=1.0001}class Xr extends Kt{inRange(t,e,i,s){const{x:r,y:o,x2:a,y2:l,width:c}=this.getProps(["x","y","x2","y2","width"],s),u=(this.options.borderWidth+this.options.hitTolerance)/2;return i!=="x"&&i!=="y"?xk({x:t,y:e},this.getCenterPoint(s),c/2,u):Gh(i==="y"?{start:o,end:l,value:e}:{start:r,end:a,value:t},u)}getCenterPoint(t){return ei(this,t)}draw(t){const e=this.options,i=e.borderWidth;if(e.radius<.1)return;t.save(),t.fillStyle=e.backgroundColor,Mi(t,e);const s=un(t,e);Ck(t,this,this.centerX,this.centerY),s&&!jr(e.pointStyle)&&(t.shadowColor=e.borderShadowColor,t.stroke()),t.restore(),e.borderWidth=i}resolveElementProperties(t,e){const i=pf(t,e);return i.initProperties=ki(t,i,e),i}}Xr.id="pointAnnotation",Xr.defaults={adjustScaleRange:!0,backgroundShadowColor:"transparent",borderDash:[],borderDashOffset:0,borderShadowColor:"transparent",borderWidth:1,display:!0,hitTolerance: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},Xr.defaultRoutes={borderColor:"color",backgroundColor:"color"};class Gr extends Kt{inRange(t,e,i,s){if(i!=="x"&&i!=="y")return this.options.radius>=.1&&this.elements.length>1&&CM(this.elements,t,e,s);const r=Jn({x:t,y:e},this.getCenterPoint(s),Yt(-this.options.rotation)),o=this.elements.map(c=>i==="y"?c.bY:c.bX),a=Math.min(...o),l=Math.max(...o);return r[i]>=a&&r[i]<=l}getCenterPoint(t){return ei(this,t)}draw(t){const{elements:e,options:i}=this;t.save(),t.beginPath(),t.fillStyle=i.backgroundColor,Mi(t,i);const s=un(t,i);let r=!0;for(const o of e)r?(t.moveTo(o.x,o.y),r=!1):t.lineTo(o.x,o.y);t.closePath(),t.fill(),s&&(t.shadowColor=i.borderShadowColor,t.stroke()),t.restore()}resolveElementProperties(t,e){const i=pf(t,e),{sides:s,rotation:r}=e,o=[],a=2*ht/s;let l=r*Do;for(let c=0;c<s;c++,l+=a){const u=TM(i,e,l);u.initProperties=ki(t,i,e),o.push(u)}return i.elements=o,i}}Gr.id="polygonAnnotation",Gr.defaults={adjustScaleRange:!0,backgroundShadowColor:"transparent",borderCapStyle:"butt",borderDash:[],borderDashOffset:0,borderJoinStyle:"miter",borderShadowColor:"transparent",borderWidth:1,display:!0,hitTolerance: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},Gr.defaultRoutes={borderColor:"color",backgroundColor:"color"};function TM({centerX:n,centerY:t},{radius:e,borderWidth:i,hitTolerance:s},r){const o=(i+s)/2,a=Math.sin(r),l=Math.cos(r),c={x:n+a*e,y:t-l*e};return{type:"point",optionScope:"point",properties:{x:c.x,y:c.y,centerX:c.x,centerY:c.y,bX:n+a*(e+o),bY:t-l*(e+o)}}}function CM(n,t,e,i){let s=!1,r=n[n.length-1].getProps(["bX","bY"],i);for(const o of n){const a=o.getProps(["bX","bY"],i);a.bY>e!=r.bY>e&&t<(r.bX-a.bX)*(e-a.bY)/(r.bY-a.bY)+a.bX&&(s=!s),r=a}return s}const Cn={box:Di,doughnutLabel:qr,ellipse:Es,label:Cs,line:Ps,point:Xr,polygon:Gr};Object.keys(Cn).forEach(n=>{Et.describe(`elements.${Cn[n].id}`,{_fallback:"plugins.annotation.common"})});const OM={update:Object.assign},PM=nl.concat(Ur),If=(n,t)=>at(t)?ul(n,t):n,ll=n=>n==="color"||n==="font";function cl(n="line"){return Cn[n]?n:(console.warn(`Unknown annotation type: '${n}', defaulting to 'line'`),"line")}function EM(n,t,e,i){const s=RM(n,e.animations,i),r=t.annotations,o=NM(t.elements,r);for(let a=0;a<r.length;a++){const l=r[a],c=Nf(o,a,l.type),u=l.setContext(IM(n,c,o,l)),d=c.resolveElementProperties(n,u);d.skip=AM(d),"elements"in d&&(LM(c,d.elements,u,s),delete d.elements),fe(c.x)||Object.assign(c,d),Object.assign(c,d.initProperties),d.options=Ff(u),s.update(c,d)}}function AM(n){return isNaN(n.x)||isNaN(n.y)}function RM(n,t,e){return e==="reset"||e==="none"||e==="resize"?OM:new Ho(n,t)}function LM(n,t,e,i){const s=n.elements||(n.elements=[]);s.length=t.length;for(let r=0;r<t.length;r++){const o=t[r],a=o.properties,l=Nf(s,r,o.type,o.initProperties),c=e[o.optionScope].override(o);a.options=Ff(c),i.update(l,a)}}function Nf(n,t,e,i){const s=Cn[cl(e)];let r=n[t];return(!r||!(r instanceof s))&&(r=n[t]=new s,Object.assign(r,i)),r}function Ff(n){const t=Cn[cl(n.type)],e={};e.id=n.id,e.type=n.type,e.drawTime=n.drawTime,Object.assign(e,ul(n,t.defaults),ul(n,t.defaultRoutes));for(const i of PM)e[i]=n[i];return e}function ul(n,t){const e={};for(const i of Object.keys(t)){const s=t[i],r=n[i];ll(i)&&xt(r)?e[i]=r.map(o=>If(o,s)):e[i]=If(r,s)}return e}function IM(n,t,e,i){return t.$context||(t.$context=Object.assign(Object.create(n.getContext()),{element:t,get elements(){return e.filter(s=>s&&s.options)},id:i.id,type:"annotation"}))}function NM(n,t){const e=t.length,i=n.length;if(i<e){const s=e-i;n.splice(i,0,...new Array(s))}else i>e&&n.splice(e,i-e);return n}var FM="3.1.0";const On=new Map,zf=n=>n.type!=="doughnutLabel",zM=nl.concat(Ur);var Bf={id:"annotation",version:FM,beforeRegister(){wk("chart.js","4.0",Pe.version)},afterRegister(){Pe.register(Cn)},afterUnregister(){Pe.unregister(Cn)},beforeInit(n){On.set(n,{annotations:[],elements:[],visibleElements:[],listeners:{},listened:!1,moveListened:!1,hooks:{},hooked:!1,hovered:[]})},beforeUpdate(n,t,e){const i=On.get(n),s=i.annotations=[];let r=e.annotations;at(r)?Object.keys(r).forEach(o=>{const a=r[o];at(a)&&(a.id=o,s.push(a))}):xt(r)&&s.push(...r),eM(s.filter(zf),n.scales)},afterDataLimits(n,t){const e=On.get(n);tM(n,t.scale,e.annotations.filter(zf).filter(i=>i.display&&i.adjustScaleRange))},afterUpdate(n,t,e){const i=On.get(n);Gk(n,i,e),EM(n,i,e,t.mode),i.visibleElements=i.elements.filter(s=>!s.skip&&s.options.display),Jk(n,i,e)},beforeDatasetsDraw(n,t,e){As(n,"beforeDatasetsDraw",e.clip)},afterDatasetsDraw(n,t,e){As(n,"afterDatasetsDraw",e.clip)},beforeDatasetDraw(n,t,e){As(n,t.index,e.clip)},beforeDraw(n,t,e){As(n,"beforeDraw",e.clip)},afterDraw(n,t,e){As(n,"afterDraw",e.clip)},beforeEvent(n,t,e){const i=On.get(n);Kk(i,t.event,e)&&(t.changed=!0)},afterDestroy(n){On.delete(n)},getAnnotations(n){const t=On.get(n);return t?t.elements:[]},_getAnnotationElementsAtEventForMode(n,t,e){return Ka(n,t,e)},defaults:{animations:{numbers:{properties:["x","y","x2","y2","width","height","centerX","centerY","pointX","pointY","radius"],type:"number"},colors:{properties:["backgroundColor","borderColor"],type:"color"}},clip:!0,interaction:{mode:void 0,axis:void 0,intersect:void 0},common:{drawTime:"afterDatasetsDraw",init:!1,label:{}}},descriptors:{_indexable:!1,_scriptable:n=>!zM.includes(n)&&n!=="init",annotations:{_allKeys:!1,_fallback:(n,t)=>`elements.${Cn[cl(t.type)].id}`},interaction:{_fallback:!0},common:{label:{_indexable:ll,_fallback:!0},_indexable:ll}},additionalOptionScopes:[""]};function As(n,t,e){const{ctx:i,chartArea:s}=n,r=On.get(n);e&&Gi(i,s);const o=BM(r.visibleElements,t).sort((a,l)=>a.element.options.z-l.element.options.z);for(const a of o)HM(i,s,r,a);e&&Ki(i)}function BM(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 s of i.elements)s.options.display&&s.options.drawTime===t&&e.push({element:s});return e}function HM(n,t,e,i){const s=i.element;i.main?(wf(e,s,"beforeDraw"),s.draw(n,t),wf(e,s,"afterDraw")):s.draw(n,t)}const WM={class:"tooltip-title"},YM={class:"title font-bold"},jM={key:1,class:"subtitle"},VM={class:"tooltip"},$M={key:0},UM={class:"display-value"},qM=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,s=h.ref(null),r=h.ref(!1),o=h.ref({x:0,y:0}),a=h.ref({x:0,y:0}),l=h.ref({left:i.left,top:i.top});h.watch(s,g=>{if(g){const{width:p,height:b}=g.getBoundingClientRect();e("dimensions",{width:p,height:b})}}),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(s.value){r.value=!0;const p=window.getComputedStyle(s.value),b=p.transform||p.webkitTransform||p.mozTransform,w=new DOMMatrix(b),v=w.m41,M=w.m42;o.value={x:v,y:M},a.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(),r.value&&(u!==null&&window.cancelAnimationFrame(u),u=window.requestAnimationFrame(()=>{const p=g.clientX-a.value.x,b=g.clientY-a.value.y;l.value.left=`${o.value.x+p}px`,l.value.top=`${o.value.y+b}px`}))}function f(){r.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:s,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",WM,[h.createElementVNode("span",YM,h.toDisplayString(n.tooltipTitle),1),n.locked?(h.openBlock(),h.createBlock(h.unref(Kl.DragIcon),{key:0,class:"drag-icon",color:h.unref(nk)},null,8,["color"])):h.createCommentVNode("",!0),n.context?(h.openBlock(),h.createElementBlock("span",jM,h.toDisplayString(n.context),1)):h.createCommentVNode("",!0)]),h.createElementVNode("ul",VM,[(h.openBlock(!0),h.createElementBlock(h.Fragment,null,h.renderList(n.series,({backgroundColor:b,borderColor:w,label:v,value:M,isSegmentEmpty:D})=>(h.openBlock(),h.createElementBlock(h.Fragment,{key:v},[n.series.length?(h.openBlock(),h.createElementBlock("li",$M,[h.createElementVNode("div",{class:"square-marker",style:h.normalizeStyle({background:b,"border-color":w})},null,4),h.createElementVNode("span",{class:h.normalizeClass(["display-label",{empty:D}])},h.toDisplayString(v),3),h.createElementVNode("span",UM,h.toDisplayString(M),1)])):h.createCommentVNode("",!0)],64))),128))])],38)):h.createCommentVNode("",!0)}}),Ke=(n,t)=>{const e=n.__vccOpts||n;for(const[i,s]of t)e[i]=s;return e},dl=Ke(qM,[["__scopeId","data-v-6d10428e"]]),XM=["onClick"],GM={key:0,class:"sub-label"},KM={class:"tooltip-content"},hl=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){h.useCssVars(S=>({"024ed260":l.value}));const t=n,{i18n:e}=yt.useI18n(),i=h.ref(),s=h.ref([]),r=h.inject("showLegendValues",!0),o=h.inject("legendPosition",h.ref(It.Right)),a=h.ref([]),l=h.ref(Uh),c=()=>{const S=i.value;if(!S||!s.value||S.children.length===0)return 0;const T=S.children[0].getBoundingClientRect().top;for(const A of s.value)if(A.getBoundingClientRect().top>T)return!0;return!1},u=h.computed(()=>t.items.length>2||o.value===It.Right),d=()=>{i.value&&o.value===It.Bottom&&(c()?l.value=ok:l.value=Uh)},f=()=>{if(i.value&&o.value===It.Bottom){let S=0;s.value.forEach(A=>{const R=Array.from(A.children).reduce((y,_)=>y+_.offsetWidth,0);R>S&&(S=R)});const T=parseInt(rk,10);i.value.style.gridTemplateColumns=`repeat(auto-fit, ${S+T}px)`}d()},g=()=>{if(t.items.length!==a.value.length)return a.value=t.items,!0;for(let S=0;S<t.items.length;S++)if(t.items[S].text!==a.value[S].text)return a.value=t.items,!0;return!1};h.watch(()=>t.items,()=>{g()&&f()},{immediate:!0,flush:"post"});const p=h.ref(0),b=h.ref(0),w=new ResizeObserver(Yd(S=>{const T=S[0],A=T.contentRect.width,R=T.contentRect.height;A!==p.value&&R===b.value&&f(),p.value=A,b.value=R},100));h.watch(()=>o.value,()=>{f()}),h.onMounted(()=>{a.value=t.items,i.value&&w.observe(i.value),window.requestAnimationFrame(()=>{f()})}),h.onBeforeUnmount(()=>{i.value&&w.unobserve(i.value)});const v=(S=0,T)=>{if(t.chartInstance===null)return;const A=t.chartInstance instanceof Pe?t.chartInstance:t.chartInstance.chart;M(S,T)?A.hide(S,T):A.show(S,T),A.update()},M=(S=0,T)=>{if(t.chartInstance===null||t.chartInstance.chart===null)return!0;const A=t.chartInstance instanceof Pe?t.chartInstance:t.chartInstance.chart,R=A.getDatasetMeta(S);return R.dataset||T===void 0?A.isDatasetVisible(S):!(R.data.length&&R.data[T].hidden)},D=S=>({[It.Right]:"vertical",[It.Bottom]:"horizontal",[It.Hidden]:"hidden"})[S];return(S,T)=>{const A=h.resolveComponent("KTooltip");return h.unref(o)!==h.unref(It).Hidden?(h.openBlock(),h.createElementBlock("ul",{key:0,ref_key:"legendContainerRef",ref:i,class:h.normalizeClass(["legend-container",D(h.unref(o))]),"data-testid":"legend"},[(h.openBlock(!0),h.createElementBlock(h.Fragment,null,h.renderList(n.items,({fillStyle:R,strokeStyle:y,text:_,datasetIndex:C,index:I,value:E,isSegmentEmpty:L})=>(h.openBlock(),h.createElementBlock("li",{key:_,ref_for:!0,ref_key:"legendItemsRef",ref:s,onClick:z=>v(C,I)},[h.createElementVNode("div",{class:"square-marker",style:h.normalizeStyle({background:R,"border-color":y})},null,4),h.createVNode(A,null,h.createSlots({default:h.withCtx(()=>[h.createElementVNode("div",{class:h.normalizeClass(["label-container",{"strike-through":!M(C,I)}])},[h.createElementVNode("div",{class:h.normalizeClass(["label",{"truncate-label":u.value,empty:L}])},h.toDisplayString(_),3),E&&h.unref(r)?(h.openBlock(),h.createElementBlock("div",GM,h.toDisplayString(E.formatted),1)):h.createCommentVNode("",!0)],2)]),_:2},[L?{name:"content",fn:h.withCtx(()=>[h.createElementVNode("div",KM,h.toDisplayString(h.unref(e).t("emptyEntityInfo")),1)]),key:"0"}:void 0]),1024)],8,XM))),128))],2)):h.createCommentVNode("",!0)}}}),[["__scopeId","data-v-14909126"]]);for(var ee=[],fl=0;fl<256;++fl)ee.push((fl+256).toString(16).slice(1));function ZM(n,t=0){return(ee[n[t+0]]+ee[n[t+1]]+ee[n[t+2]]+ee[n[t+3]]+"-"+ee[n[t+4]]+ee[n[t+5]]+"-"+ee[n[t+6]]+ee[n[t+7]]+"-"+ee[n[t+8]]+ee[n[t+9]]+"-"+ee[n[t+10]]+ee[n[t+11]]+ee[n[t+12]]+ee[n[t+13]]+ee[n[t+14]]+ee[n[t+15]]).toLowerCase()}var Kr,QM=new Uint8Array(16);function JM(){if(!Kr&&(Kr=typeof crypto<"u"&&crypto.getRandomValues&&crypto.getRandomValues.bind(crypto),!Kr))throw new Error("crypto.getRandomValues() not supported. See https://github.com/uuidjs/uuid#getrandomvalues-not-supported");return Kr(QM)}var tS=typeof crypto<"u"&&crypto.randomUUID&&crypto.randomUUID.bind(crypto);const Hf={randomUUID:tS};function Zr(n,t,e){if(Hf.randomUUID&&!t&&!n)return Hf.randomUUID();n=n||{};var i=n.random||(n.rng||JM)();return i[6]=i[6]&15|64,i[8]=i[8]&63|128,ZM(i)}const Wf=(n,t)=>{const e=n.ctx,i=n.scales.y,s=n.scales.x,r=t[t.length-1].element;e.save(),e.strokeStyle="rgba(100, 100, 100, 1)",e.lineWidth=3,n.options.indexAxis==="x"?e.strokeRect(r.x-r.width/2,r.y,r.width,i.bottom-r.y):e.strokeRect(s.left,r.y-r.height/2,r.x-s.left,r.height),e.restore()};class Yf{constructor(){O(this,"id","highlightPlugin");O(this,"_clickedElements");O(this,"_previousHoverOption");O(this,"_clicked",!1)}afterDatasetsDraw(t){this._clickedElements&&this._clickedElements.length&&Wf(t,this._clickedElements)}afterEvent(t,{event:e}){var r;if(e.type!=="click"||!e.native)return;this._clicked=!this._clicked;const i=((r=t.options.interaction)==null?void 0:r.mode)||"index",s=t.getElementsAtEventForMode(e.native,i,{intersect:!1},!0);s.length&&this._clicked?(this._clickedElements=s,Wf(t,this._clickedElements),this._previousHoverOption=t.options.hover,t.options.hover={mode:null}):(delete this._clickedElements,t.options.hover=this._previousHoverOption||t.options.hover,this._clicked=!1)}beforeDestroy(t){delete this._clickedElements,t.options.hover=this._previousHoverOption||t.options.hover,this._clicked=!1}}const eS=["id"],nS=["id"],iS={class:"axis-tooltip-content"},jf=6,sS="100%",rS="100%",oS=20,aS=20,Vf=6,lS=0,cS=10,uS=10,dS=1,hS=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:""},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,{i18n:e}=yt.useI18n(),{translateUnit:i}=yt.useTranslatedUnits(),s=crypto.randomUUID(),r=crypto.randomUUID(),o=new Yf,a=h.ref(null),l=({chart:W},U)=>{var q;const $=W.data,H=(q=$.labels)==null?void 0:q.indexOf(U);return $.datasets.reduce((Q,rt,lt)=>{if(W.isDatasetVisible(lt)){const ut=rt.data[H];return isNaN(ut)?Q:Q+ut}else return Q},0)},c=(W,U,$,H)=>{const q=H==="horizontal";U===null&&(U=e.t("entityNoName"));const Q={type:"label",yValue:ut=>q?U:l(ut,U),xValue:ut=>q?l(ut,U):U},rt={...Q,position:q?{x:"start",y:"center"}:{x:"center",y:"end"},yAdjust:()=>q?0:-Math.abs(uw()),content:ut=>Oa(l(ut,U),$)},lt={...Q,content:ut=>th(l(ut,U),Jd(ut.chart,W)),position:q?{x:"start",y:"center"}:{x:"center",y:"end"},xAdjust:ut=>q?Qd(Oa(l(ut,U),$)):0,color:Gd};return{[`${U}-value`]:rt,[`${U}-percent`]:lt}},u=h.ref(null),d=h.ref(),f=h.ref(Zr()),g=Zr(),p=Zr(),b=h.ref([]),w=h.ref(h.inject("legendPosition",It.Right)),v=h.ref({show:!1,top:"0px",left:"0px",text:"",offset:-50}),M=h.toRef(t,"metricUnit"),D=h.computed(()=>h.toRef(t,"orientation").value==="horizontal"),S=h.reactive({showTooltip:!1,tooltipContext:"",tooltipSeries:[],left:"",top:"",units:M,translateUnit:i,offsetX:0,offsetY:0,width:0,height:0,locked:!1,chartType:D.value?"horizontal_bar":"vertical_bar",chartID:r,chartTooltipSortFn:t.chartTooltipSortFn}),T=h.ref(0),A=()=>{var W;return t.annotations&&((W=t.chartData.labels)==null?void 0:W.reduce((U,$)=>Object.assign(U,c(t.chartData,$,M.value,t.orientation)),{}))},R={id:f.value,afterUpdate(W){T.value+=1,b.value=jd(W,t.legendValues,t.chartLegendSortFn)}},y={id:g,afterUpdate(W){W.options.plugins.annotation.annotations=t.annotations?A():{}}},I=[R,{id:"axisHover",afterEvent(W,U){var $;if(v.value.show=!1,U.event.type==="mousemove"){const H=U.event,q=W.options.indexAxis,Q=W.scales,rt=W.scales[q].getLabelForValue(Number(W.scales[q].getValueForPixel(H[q]))),ut=W.scales[q].getLabels().indexOf(rt),St=($=t.chartData.isLabelEmpty)==null?void 0:$[ut];if((Vt=>Vt==="x"?H.y>Q.x.top:H.x<Q.y.right)(q)){S.locked||(S.showTooltip=!1);const $t=W.canvas.getContext("2d").measureText(rt).width,ne=Math.abs(Math.round(H.x-$t*.5)),Zt=Math.round(H.x+$t*.5);v.value.left=q==="x"?`${(ne>0?ne:Zt)-v.value.offset}px`:`${H.x-$t*.5-v.value.offset}px`,v.value.top=`${H.y-50}px`,rt.length>Er?(v.value.show=!0,v.value.text=rt):St?(v.value.text=e.t("emptyEntityInfo"),v.value.show=!0):v.value.show=!1}else v.value.show=!1}}},{id:p,afterUpdate(W){W.options.layout.padding.right=D.value?J.value:0}},o,...t.annotations?[y]:[]],E=h.computed(()=>t.chartData.labels&&t.chartData.labels.length||0),L=h.ref(0),z=h.ref(0),X=new ResizeObserver(Yd(W=>{L.value=W[0].contentRect.width,z.value=W[0].contentRect.height},100)),K=h.computed(()=>{var U,$;const W=($=(U=t.chartData)==null?void 0:U.labels)==null?void 0:$.length;return u.value&&W&&!D.value?`${Math.max(W*(oS+Vf),L.value)}px`:sS}),B=h.computed(()=>{var U,$;const W=($=(U=t.chartData)==null?void 0:U.labels)==null?void 0:$.length;return u.value&&W&&D.value?`${Math.max(W*(aS+Vf),z.value)}px`:rS});yt.useReportChartDataForSynthetics(h.toRef(t,"chartData"),h.toRef(t,"syntheticsDataKey")),h.onMounted(()=>{t.annotations&&Pe.register(Bf),a.value&&(L.value=a.value.offsetWidth,z.value=a.value.offsetHeight,X.observe(a.value))}),h.onUnmounted(()=>{a.value&&X.unobserve(a.value)});const dt=h.computed(()=>{const W=yt.useBarChartOptions({tooltipState:S,legendID:f.value,stacked:h.toRef(t,"stacked"),metricAxesTitle:h.toRef(t,"metricAxesTitle"),dimensionAxesTitle:h.toRef(t,"dimensionAxesTitle"),indexAxis:D.value?"y":"x",numLabels:E});return{...W.value,plugins:{...W.value.plugins,annotation:{annotations:A(),clip:!1}},layout:{autoPadding:!1,padding:{right:0,top:6*jf}}}}),j=yt.useChartJSCommon("bar",u,h.toRef(t,"chartData"),I,dt),J=h.computed(()=>{T.value;const W=t.chartData.labels,U=t.chartData.datasets,$=W.map((Q,rt)=>U.reduce((lt,ut)=>isNaN(Number(ut.data[rt]))?lt:lt+Number(ut.data[rt]),0)),H=j.value?Jd(j.value,t.chartData):dw(t.chartData);return $.map(Q=>Qd(Oa(Q,M.value)+th(Q,H))).reduce((Q,rt)=>Math.max(Q,rt),0)+jf});h.onBeforeUnmount(()=>{Pe.unregister(Bf)});const Ct={[It.Right]:"legend-row",[It.Bottom]:"column"},V=h.computed(()=>{if(d.value&&j.value){const W=window.devicePixelRatio,U=j.value,$=U.scales.y.width*W+dS,H=(U.scales.y.height+U.scales.y.top+U.scales.x.height)*W,q=d.value.getContext("2d");return q.scale(W,W),q.canvas.width=$,q.canvas.height=H,q.canvas.style.width=`${$/W}px`,q.canvas.style.height=`${H/W}px`,{scale:W,width:$*W,height:H*W,targetCtx:q}}return null}),st=W=>{const U=W.target;if(V.value&&j.value&&!D.value){const $=V.value.scale,H=V.value.targetCtx,q=V.value.width,Q=V.value.height,rt=j.value,lt=rt.canvas;H.fillStyle="white",U.scrollLeft>=lS&&U.scrollLeft<=cS?(H.globalCompositeOperation="source-over",H.clearRect(0,0,q,Q),H.drawImage(lt,0,0,q,Q,0,0,q,Q),H.globalCompositeOperation="destination-over",H.fillRect(0,0,q,Q)):(H.globalCompositeOperation="source-over",H.fillRect(0,(rt.scales.y.height+rt.scales.y.top+uS)*$,q,rt.scales.x.height*$))}S.offsetY=U.scrollTop,S.offsetX=U.scrollLeft,v.value.offset=U.scrollLeft},_t=({width:W,height:U})=>{S.width=W,S.height=U};h.watch(()=>t.orientation,()=>{var W;if(d.value&&V.value){const U=V.value.width,$=V.value.height;((W=d.value)==null?void 0:W.getContext("2d")).clearRect(0,0,U,$)}S.showTooltip=!1,S.locked=!1}),h.watch(()=>t.annotations,W=>{j.value&&(W?j.value.options.plugins.annotation.annotations=A(t.chartData):delete j.value.options.plugins.annotation.annotations)});const gt=()=>{S.showTooltip&&(S.locked=!S.locked)};return(W,U)=>(h.openBlock(),h.createElementBlock("div",{class:h.normalizeClass(["chart-parent",Ct[w.value]])},[h.createElementVNode("canvas",{id:h.unref(s),ref_key:"axis",ref:d,class:"axis"},null,8,eS),h.createElementVNode("div",{ref_key:"chartContainerRef",ref:a,class:"chart-container","on:scroll":st,onClick:U[0]||(U[0]=$=>gt())},[h.createElementVNode("div",{class:"chart-body",style:h.normalizeStyle({width:K.value,height:B.value})},[h.createElementVNode("canvas",{id:h.unref(r),ref_key:"canvas",ref:u,class:"chart-canvas"},null,8,nS)],4)],544),v.value.show?(h.openBlock(),h.createElementBlock("div",{key:0,class:"axis-tooltip",style:h.normalizeStyle({top:v.value.top,left:v.value.left}),width:"auto"},[h.createElementVNode("div",iS,h.toDisplayString(v.value.text),1)],4)):h.createCommentVNode("",!0),h.createVNode(dl,{context:S.tooltipContext,left:S.left,locked:S.locked,series:S.tooltipSeries,"show-tooltip":S.showTooltip,"tooltip-title":n.tooltipTitle,top:S.top,onDimensions:_t},null,8,["context","left","locked","series","show-tooltip","tooltip-title","top"]),h.createVNode(hl,{id:f.value,"chart-instance":h.unref(j),items:b.value},null,8,["id","chart-instance","items"])],2))}}),[["__scopeId","data-v-c9b0dac4"]]);/*!
|
|
23
|
+
*/const Xh={modes:{point(n,t){return Wr(n,t,{intersect:!0})},nearest(n,t,e){return yk(n,t,e)},x(n,t,e){return Wr(n,t,{intersect:e.intersect,axis:"x"})},y(n,t,e){return Wr(n,t,{intersect:e.intersect,axis:"y"})}}};function Ka(n,t,e){return(Xh.modes[e.mode]||Xh.modes.nearest)(n,t,e)}function pk(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 mk(n,t,e){return e==="x"?{x:n.x,y:t.y}:e==="y"?{x:t.x,y:n.y}:t}function Wr(n,t,e){return n.filter(i=>e.intersect?i.inRange(t.x,t.y):pk(i,t,e.axis))}function yk(n,t,e){let i=Number.POSITIVE_INFINITY;return Wr(n,t,e).reduce((s,r)=>{const o=r.getCenterPoint(),a=mk(t,o,e.axis),l=ci(t,a);return l<i?(s=[r],i=l):l===i&&s.push(r),s},[]).sort((s,r)=>s._index-r._index).slice(0,1)}function Jn(n,t,e){const i=Math.cos(e),s=Math.sin(e),r=t.x,o=t.y;return{x:r+i*(n.x-r)-s*(n.y-o),y:o+s*(n.x-r)+i*(n.y-o)}}const bk=(n,t)=>t>n||n.length>t.length&&n.slice(0,t.length)===t,ti=.001,Yr=(n,t,e)=>Math.min(e,Math.max(t,n)),Gh=(n,t)=>n.value>=n.start-t&&n.value<=n.end+t;function _k(n,t,e){for(const i of Object.keys(n))n[i]=Yr(n[i],t,e);return n}function xk(n,t,e,i){return!n||!t||e<=0?!1:Math.pow(n.x-t.x,2)+Math.pow(n.y-t.y,2)<=Math.pow(e+i,2)}function Kh(n,{x:t,y:e,x2:i,y2:s},r,{borderWidth:o,hitTolerance:a}){const l=(o+a)/2,c=n.x>=t-l-ti&&n.x<=i+l+ti,u=n.y>=e-l-ti&&n.y<=s+l+ti;return r==="x"?c:(r==="y"||c)&&u}function Zh(n,{rect:t,center:e},i,{rotation:s,borderWidth:r,hitTolerance:o}){const a=Jn(n,e,Yt(-s));return Kh(a,t,i,{borderWidth:r,hitTolerance:o})}function ei(n,t){const{centerX:e,centerY:i}=n.getProps(["centerX","centerY"],t);return{x:e,y:i}}function wk(n,t,e,i=!0){const s=e.split(".");let r=0;for(const o of t.split(".")){const a=s[r++];if(parseInt(o,10)<parseInt(a,10))break;if(bk(a,o)){if(i)throw new Error(`${n} v${e} is not supported. v${t} or newer is required.`);return!1}}return!0}const Qh=n=>typeof n=="string"&&n.endsWith("%"),Jh=n=>parseFloat(n)/100,tf=n=>Yr(Jh(n),0,1),Ts=(n,t)=>({x:n,y:t,x2:n,y2:t,width:0,height:0}),vk={box:n=>Ts(n.centerX,n.centerY),doughnutLabel:n=>Ts(n.centerX,n.centerY),ellipse:n=>({centerX:n.centerX,centerY:n.centerX,radius:0,width:0,height:0}),label:n=>Ts(n.centerX,n.centerY),line:n=>Ts(n.x,n.y),point:n=>({centerX:n.centerX,centerY:n.centerY,radius:0,width:0,height:0}),polygon:n=>Ts(n.centerX,n.centerY)};function Za(n,t){return t==="start"?0:t==="end"?n:Qh(t)?tf(t)*n:n/2}function Tn(n,t,e=!0){return typeof t=="number"?t:Qh(t)?(e?tf(t):Jh(t))*n:n}function kk(n,t){const{x:e,width:i}=n,s=t.textAlign;return s==="center"?e+i/2:s==="end"||s==="right"?e+i:e}function ef(n,t,{borderWidth:e,position:i,xAdjust:s,yAdjust:r},o){const a=at(o),l=t.width+(a?o.width:0)+e,c=t.height+(a?o.height:0)+e,u=Qa(i),d=of(n.x,l,s,u.x),f=of(n.y,c,r,u.y);return{x:d,y:f,x2:d+l,y2:f+c,width:l,height:c,centerX:d+l/2,centerY:f+c/2}}function Qa(n,t="center"){return at(n)?{x:et(n.x,t),y:et(n.y,t)}:(n=et(n,t),{x:n,y:n})}const nf=(n,t)=>n&&n.autoFit&&t<1;function sf(n,t){const e=n.font,i=xt(e)?e:[e];return nf(n,t)?i.map(function(s){const r=Rt(s);return r.size=Math.floor(s.size*t),r.lineHeight=s.lineHeight,Rt(r)}):i.map(s=>Rt(s))}function rf(n){return n&&(fe(n.xValue)||fe(n.yValue))}function of(n,t,e=0,i){return n-Za(t,i)+e}function ki(n,t,e){const i=e.init;if(i){if(i===!0)return lf(t,e)}else return;return Mk(n,t,e)}function af(n,t,e){let i=!1;return t.forEach(s=>{ge(n[s])?(i=!0,e[s]=n[s]):fe(e[s])&&delete e[s]}),i}function lf(n,t){const e=t.type||"line";return vk[e](n)}function Mk(n,t,e){const i=wt(e.init,[{chart:n,properties:t,options:e}]);if(i===!0)return lf(t,e);if(at(i))return i}const Ja=new Map,Sk=n=>isNaN(n)||n<=0,Dk=n=>n.reduce(function(t,e){return t+=e.string,t},"");function jr(n){if(n&&typeof n=="object"){const t=n.toString();return t==="[object HTMLImageElement]"||t==="[object HTMLCanvasElement]"}}function Vr(n,{x:t,y:e},i){i&&(n.translate(t,e),n.rotate(Yt(i)),n.translate(-t,-e))}function un(n,t){if(t&&t.borderWidth)return n.lineCap=t.borderCapStyle||"butt",n.setLineDash(t.borderDash),n.lineDashOffset=t.borderDashOffset,n.lineJoin=t.borderJoinStyle||"miter",n.lineWidth=t.borderWidth,n.strokeStyle=t.borderColor,!0}function Mi(n,t){n.shadowColor=t.backgroundShadowColor,n.shadowBlur=t.shadowBlur,n.shadowOffsetX=t.shadowOffsetX,n.shadowOffsetY=t.shadowOffsetY}function $r(n,t){const e=t.content;if(jr(e))return{width:Tn(e.width,t.width),height:Tn(e.height,t.height)};const i=sf(t),s=t.textStrokeWidth,r=xt(e)?e:[e],o=r.join()+Dk(i)+s+(n._measureText?"-spriting":"");return Ja.has(o)||Ja.set(o,Pk(n,r,i,s)),Ja.get(o)}function cf(n,t,e){const{x:i,y:s,width:r,height:o}=t;n.save(),Mi(n,e);const a=un(n,e);n.fillStyle=e.backgroundColor,n.beginPath(),ui(n,{x:i,y:s,w:r,h:o,radius:_k(xn(e.borderRadius),0,Math.min(r,o)/2)}),n.closePath(),n.fill(),a&&(n.shadowColor=e.borderShadowColor,n.stroke()),n.restore()}function uf(n,t,e,i){const s=e.content;if(jr(s)){n.save(),n.globalAlpha=Rk(e.opacity,s.style.opacity),n.drawImage(s,t.x,t.y,t.width,t.height),n.restore();return}const r=xt(s)?s:[s],o=sf(e,i),a=e.color,l=xt(a)?a:[a],c=kk(t,e),u=t.y+e.textStrokeWidth/2;n.save(),n.textBaseline="middle",n.textAlign=e.textAlign,Tk(n,e)&&Ek(n,{x:c,y:u},r,o),Ak(n,{x:c,y:u},r,{fonts:o,colors:l}),n.restore()}function Tk(n,t){if(t.textStrokeWidth>0)return n.lineJoin="round",n.miterLimit=2,n.lineWidth=t.textStrokeWidth,n.strokeStyle=t.textStrokeColor,!0}function Ck(n,t,e,i){const{radius:s,options:r}=t,o=r.pointStyle,a=r.rotation;let l=(a||0)*Do;if(jr(o)){n.save(),n.translate(e,i),n.rotate(l),n.drawImage(o,-o.width/2,-o.height/2,o.width,o.height),n.restore();return}Sk(s)||Ok(n,{x:e,y:i,radius:s,rotation:a,style:o,rad:l})}function Ok(n,{x:t,y:e,radius:i,rotation:s,style:r,rad:o}){let a,l,c,u;switch(n.beginPath(),r){default:n.arc(t,e,i,0,Tt),n.closePath();break;case"triangle":n.moveTo(t+Math.sin(o)*i,e-Math.cos(o)*i),o+=Ks,n.lineTo(t+Math.sin(o)*i,e-Math.cos(o)*i),o+=Ks,n.lineTo(t+Math.sin(o)*i,e-Math.cos(o)*i),n.closePath();break;case"rectRounded":u=i*.516,c=i-u,a=Math.cos(o+Oe)*c,l=Math.sin(o+Oe)*c,n.arc(t-a,e-l,u,o-ht,o-Pt),n.arc(t+l,e-a,u,o-Pt,o),n.arc(t+a,e+l,u,o,o+Pt),n.arc(t-l,e+a,u,o+Pt,o+ht),n.closePath();break;case"rect":if(!s){c=Math.SQRT1_2*i,n.rect(t-c,e-c,2*c,2*c);break}o+=Oe;case"rectRot":a=Math.cos(o)*i,l=Math.sin(o)*i,n.moveTo(t-a,e-l),n.lineTo(t+l,e-a),n.lineTo(t+a,e+l),n.lineTo(t-l,e+a),n.closePath();break;case"crossRot":o+=Oe;case"cross":a=Math.cos(o)*i,l=Math.sin(o)*i,n.moveTo(t-a,e-l),n.lineTo(t+a,e+l),n.moveTo(t+l,e-a),n.lineTo(t-l,e+a);break;case"star":a=Math.cos(o)*i,l=Math.sin(o)*i,n.moveTo(t-a,e-l),n.lineTo(t+a,e+l),n.moveTo(t+l,e-a),n.lineTo(t-l,e+a),o+=Oe,a=Math.cos(o)*i,l=Math.sin(o)*i,n.moveTo(t-a,e-l),n.lineTo(t+a,e+l),n.moveTo(t+l,e-a),n.lineTo(t-l,e+a);break;case"line":a=Math.cos(o)*i,l=Math.sin(o)*i,n.moveTo(t-a,e-l),n.lineTo(t+a,e+l);break;case"dash":n.moveTo(t,e),n.lineTo(t+Math.cos(o)*i,e+Math.sin(o)*i);break}n.fill()}function Pk(n,t,e,i){n.save();const s=t.length;let r=0,o=i;for(let a=0;a<s;a++){const l=e[Math.min(a,e.length-1)];n.font=l.string;const c=t[a];r=Math.max(r,n.measureText(c).width+i),o+=l.lineHeight}return n.restore(),{width:r,height:o}}function Ek(n,{x:t,y:e},i,s){n.beginPath();let r=0;i.forEach(function(o,a){const l=s[Math.min(a,s.length-1)],c=l.lineHeight;n.font=l.string,n.strokeText(o,t,e+c/2+r),r+=c}),n.stroke()}function Ak(n,{x:t,y:e},i,{fonts:s,colors:r}){let o=0;i.forEach(function(a,l){const c=r[Math.min(l,r.length-1)],u=s[Math.min(l,s.length-1)],d=u.lineHeight;n.beginPath(),n.font=u.string,n.fillStyle=c,n.fillText(a,t,e+d/2+o),o+=d,n.fill()})}function Rk(n,t){const e=_n(n)?n:t;return _n(e)?Yr(e,0,1):1}const df=["left","bottom","top","right"];function Lk(n,t){const{pointX:e,pointY:i,options:s}=t,r=s.callout,o=r&&r.display&&Bk(t,r);if(!o||Wk(t,r,o))return;if(n.save(),n.beginPath(),!un(n,r))return n.restore();const{separatorStart:l,separatorEnd:c}=Ik(t,o),{sideStart:u,sideEnd:d}=Fk(t,o,l);(r.margin>0||s.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=Jn({x:e,y:i},t.getCenterPoint(),Yt(-t.rotation));n.lineTo(f.x,f.y),n.stroke(),n.restore()}function Ik(n,t){const{x:e,y:i,x2:s,y2:r}=n,o=Nk(n,t);let a,l;return t==="left"||t==="right"?(a={x:e+o,y:i},l={x:a.x,y:r}):(a={x:e,y:i+o},l={x:s,y:a.y}),{separatorStart:a,separatorEnd:l}}function Nk(n,t){const{width:e,height:i,options:s}=n,r=s.callout.margin+s.borderWidth/2;return t==="right"?e+r:t==="bottom"?i+r:-r}function Fk(n,t,e){const{y:i,width:s,height:r,options:o}=n,a=o.callout.start,l=zk(t,o.callout);let c,u;return t==="left"||t==="right"?(c={x:e.x,y:i+Tn(r,a)},u={x:c.x+l,y:c.y}):(c={x:e.x+Tn(s,a),y:e.y},u={x:c.x,y:c.y+l}),{sideStart:c,sideEnd:u}}function zk(n,t){const e=t.side;return n==="left"||n==="top"?-e:e}function Bk(n,t){const e=t.position;return df.includes(e)?e:Hk(n,t)}function Hk(n,t){const{x:e,y:i,x2:s,y2:r,width:o,height:a,pointX:l,pointY:c,centerX:u,centerY:d,rotation:f}=n,g={x:u,y:d},p=t.start,b=Tn(o,p),w=Tn(a,p),v=[e,e+b,e+b,s],M=[i+w,r,i,r],D=[];for(let S=0;S<4;S++){const T=Jn({x:v[S],y:M[S]},g,Yt(f));D.push({position:df[S],distance:ci(T,{x:l,y:c})})}return D.sort((S,T)=>S.distance-T.distance)[0].position}function Wk(n,t,e){const{pointX:i,pointY:s}=n,r=t.margin;let o=i,a=s;return e==="left"?o+=r:e==="right"?o-=r:e==="top"?a+=r:e==="bottom"&&(a-=r),n.inRange(o,a)}const hf={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 Si(n,t,e){return t=typeof t=="number"?t:n.parse(t),At(t)?n.getPixelForValue(t):e}function ni(n,t,e){const i=t[e];if(i||e==="scaleID")return i;const s=e.charAt(0),r=Object.values(n).filter(o=>o.axis&&o.axis===s);return r.length?r[0].id:s}function ff(n,t){if(n){const e=n.options.reverse,i=Si(n,t.min,e?t.end:t.start),s=Si(n,t.max,e?t.start:t.end);return{start:i,end:s}}}function gf(n,t){const{chartArea:e,scales:i}=n,s=i[ni(i,t,"xScaleID")],r=i[ni(i,t,"yScaleID")];let o=e.width/2,a=e.height/2;return s&&(o=Si(s,t.xValue,s.left+s.width/2)),r&&(a=Si(r,t.yValue,r.top+r.height/2)),{x:o,y:a}}function tl(n,t){const e=n.scales,i=e[ni(e,t,"xScaleID")],s=e[ni(e,t,"yScaleID")];if(!i&&!s)return{};let{left:r,right:o}=i||n.chartArea,{top:a,bottom:l}=s||n.chartArea;const c=yf(i,{min:t.xMin,max:t.xMax,start:r,end:o});r=c.start,o=c.end;const u=yf(s,{min:t.yMin,max:t.yMax,start:l,end:a});return a=u.start,l=u.end,{x:r,y:a,x2:o,y2:l,width:o-r,height:l-a,centerX:r+(o-r)/2,centerY:a+(l-a)/2}}function pf(n,t){if(!rf(t)){const e=tl(n,t);let i=t.radius;(!i||isNaN(i))&&(i=Math.min(e.width,e.height)/2,t.radius=i);const s=i*2,r=e.centerX+t.xAdjust,o=e.centerY+t.yAdjust;return{x:r-i,y:o-i,x2:r+i,y2:o+i,centerX:r,centerY:o,width:s,height:s,radius:i}}return jk(n,t)}function Yk(n,t){const{scales:e,chartArea:i}=n,s=e[t.scaleID],r={x:i.left,y:i.top,x2:i.right,y2:i.bottom};return s?Vk(s,r,t):$k(e,r,t),r}function mf(n,t){const e=tl(n,t);return e.initProperties=ki(n,e,t),e.elements=[{type:"label",optionScope:"label",properties:Xk(n,e,t),initProperties:e.initProperties}],e}function jk(n,t){const e=gf(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 yf(n,t){const e=ff(n,t)||t;return{start:Math.min(e.start,e.end),end:Math.max(e.start,e.end)}}function Vk(n,t,e){const i=Si(n,e.value,NaN),s=Si(n,e.endValue,i);n.isHorizontal()?(t.x=i,t.x2=s):(t.y=i,t.y2=s)}function $k(n,t,e){for(const i of Object.keys(hf)){const s=n[ni(n,e,i)];if(s){const{min:r,max:o,start:a,end:l,startProp:c,endProp:u}=hf[i],d=ff(s,{min:e[r],max:e[o],start:s[a],end:s[l]});t[c]=d.start,t[u]=d.end}}}function Uk({properties:n,options:t},e,i,s){const{x:r,x2:o,width:a}=n;return bf({start:r,end:o,size:a,borderWidth:t.borderWidth},{position:i.x,padding:{start:s.left,end:s.right},adjust:t.label.xAdjust,size:e.width})}function qk({properties:n,options:t},e,i,s){const{y:r,y2:o,height:a}=n;return bf({start:r,end:o,size:a,borderWidth:t.borderWidth},{position:i.y,padding:{start:s.top,end:s.bottom},adjust:t.label.yAdjust,size:e.height})}function bf(n,t){const{start:e,end:i,borderWidth:s}=n,{position:r,padding:{start:o,end:a},adjust:l}=t,c=i-s-e-o-a-t.size;return e+s/2+l+Za(c,r)}function Xk(n,t,e){const i=e.label;i.backgroundColor="transparent",i.callout.display=!1;const s=Qa(i.position),r=jt(i.padding),o=$r(n.ctx,i),a=Uk({properties:t,options:e},o,s,r),l=qk({properties:t,options:e},o,s,r),c=o.width+r.width,u=o.height+r.height;return{x:a,y:l,x2:a+c,y2:l+u,width:c,height:u,centerX:a+c/2,centerY:l+u/2,rotation:i.rotation}}const el=["enter","leave"],nl=el.concat("click");function Gk(n,t,e){t.listened=af(e,nl,t.listeners),t.moveListened=!1,el.forEach(i=>{ge(e[i])&&(t.moveListened=!0)}),(!t.listened||!t.moveListened)&&t.annotations.forEach(i=>{!t.listened&&ge(i.click)&&(t.listened=!0),t.moveListened||el.forEach(s=>{ge(i[s])&&(t.listened=!0,t.moveListened=!0)})})}function Kk(n,t,e){if(n.listened)switch(t.type){case"mousemove":case"mouseout":return Zk(n,t,e);case"click":return Qk(n,t,e)}}function Zk(n,t,e){if(!n.moveListened)return;let i;t.type==="mousemove"?i=Ka(n.visibleElements,t,e.interaction):i=[];const s=n.hovered;n.hovered=i;const r={state:n,event:t};let o=_f(r,"leave",s,i);return _f(r,"enter",i,s)||o}function _f({state:n,event:t},e,i,s){let r;for(const o of i)s.indexOf(o)<0&&(r=xf(o.options[e]||n.listeners[e],o,t)||r);return r}function Qk(n,t,e){const i=n.listeners,s=Ka(n.visibleElements,t,e.interaction);let r;for(const o of s)r=xf(o.options.click||i.click,o,t)||r;return r}function xf(n,t,e){return wt(n,[t.$context,e])===!0}const Ur=["afterDraw","beforeDraw"];function Jk(n,t,e){const i=t.visibleElements;t.hooked=af(e,Ur,t.hooks),t.hooked||i.forEach(s=>{t.hooked||Ur.forEach(r=>{ge(s.options[r])&&(t.hooked=!0)})})}function wf(n,t,e){if(n.hooked){const i=t.options[e]||n.hooks[e];return wt(i,[t.$context])}}function tM(n,t,e){const i=rM(n.scales,t,e);let s=vf(t,i,"min","suggestedMin");s=vf(t,i,"max","suggestedMax")||s,s&&ge(t.handleTickRangeOptions)&&t.handleTickRangeOptions()}function eM(n,t){for(const e of n)iM(e,t)}function vf(n,t,e,i){if(At(t[e])&&!nM(n.options,e,i)){const s=n[e]!==t[e];return n[e]=t[e],s}}function nM(n,t,e){return fe(n[t])||fe(n[e])}function iM(n,t){for(const e of["scaleID","xScaleID","yScaleID"]){const i=ni(t,n,e);i&&!t[i]&&sM(n,e)&&console.warn(`No scale found with id '${i}' for annotation '${n.id}'`)}}function sM(n,t){if(t==="scaleID")return!0;const e=t.charAt(0);for(const i of["Min","Max","Value"])if(fe(n[e+i]))return!0;return!1}function rM(n,t,e){const i=t.axis,s=t.id,r=i+"ScaleID",o={min:et(t.min,Number.NEGATIVE_INFINITY),max:et(t.max,Number.POSITIVE_INFINITY)};for(const a of e)a.scaleID===s?kf(a,t,["value","endValue"],o):ni(n,a,r)===s&&kf(a,t,[i+"Min",i+"Max",i+"Value"],o);return o}function kf(n,t,e,i){for(const s of e){const r=n[s];if(fe(r)){const o=t.parse(r);i.min=Math.min(i.min,o),i.max=Math.max(i.max,o)}}}class Di extends Kt{inRange(t,e,i,s){const{x:r,y:o}=Jn({x:t,y:e},this.getCenterPoint(s),Yt(-this.options.rotation));return Kh({x:r,y:o},this.getProps(["x","y","x2","y2"],s),i,this.options)}getCenterPoint(t){return ei(this,t)}draw(t){t.save(),Vr(t,this.getCenterPoint(),this.options.rotation),cf(t,this,this.options),t.restore()}get label(){return this.elements&&this.elements[0]}resolveElementProperties(t,e){return mf(t,e)}}Di.id="boxAnnotation",Di.defaults={adjustScaleRange:!0,backgroundShadowColor:"transparent",borderCapStyle:"butt",borderDash:[],borderDashOffset:0,borderJoinStyle:"miter",borderRadius:0,borderShadowColor:"transparent",borderWidth:1,display:!0,init:void 0,hitTolerance: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,hitTolerance: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},Di.defaultRoutes={borderColor:"color",backgroundColor:"color"},Di.descriptors={label:{_fallback:!0}};class qr extends Kt{inRange(t,e,i,s){return Zh({x:t,y:e},{rect:this.getProps(["x","y","x2","y2"],s),center:this.getCenterPoint(s)},i,{rotation:this.rotation,borderWidth:0,hitTolerance:this.options.hitTolerance})}getCenterPoint(t){return ei(this,t)}draw(t){const e=this.options;!e.display||!e.content||(dM(t,this),t.save(),Vr(t,this.getCenterPoint(),this.rotation),uf(t,this,e,this._fitRatio),t.restore())}resolveElementProperties(t,e){const i=oM(t,e);if(!i)return{};const{controllerMeta:s,point:r,radius:o}=lM(t,e,i);let a=$r(t.ctx,e);const l=cM(a,o);nf(e,l)&&(a={width:a.width*l,height:a.height*l});const{position:c,xAdjust:u,yAdjust:d}=e,f=ef(r,a,{borderWidth:0,position:c,xAdjust:u,yAdjust:d});return{initProperties:ki(t,f,e),...f,...s,rotation:e.rotation,_fitRatio:l}}}qr.id="doughnutLabelAnnotation",qr.defaults={autoFit:!0,autoHide:!0,backgroundColor:"transparent",backgroundShadowColor:"transparent",borderColor:"transparent",borderDash:[],borderDashOffset:0,borderJoinStyle:"miter",borderShadowColor:"transparent",borderWidth:0,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,hitTolerance:0,init:void 0,opacity:void 0,position:"center",rotation:0,shadowBlur:0,shadowOffsetX:0,shadowOffsetY:0,spacing:1,textAlign:"center",textStrokeColor:void 0,textStrokeWidth:0,width:void 0,xAdjust:0,yAdjust:0},qr.defaultRoutes={};function oM(n,t){return n.getSortedVisibleDatasetMetas().reduce(function(e,i){const s=i.controller;return s instanceof on&&aM(n,t,i.data)&&(!e||s.innerRadius<e.controller.innerRadius)&&s.options.circumference>=90?i:e},void 0)}function aM(n,t,e){if(!t.autoHide)return!0;for(let i=0;i<e.length;i++)if(!e[i].hidden&&n.getDataVisibility(i))return!0}function lM({chartArea:n},t,e){const{left:i,top:s,right:r,bottom:o}=n,{innerRadius:a,offsetX:l,offsetY:c}=e.controller,u=(i+r)/2+l,d=(s+o)/2+c,f={left:Math.max(u-a,i),right:Math.min(u+a,r),top:Math.max(d-a,s),bottom:Math.min(d+a,o)},g={x:(f.left+f.right)/2,y:(f.top+f.bottom)/2},p=t.spacing+t.borderWidth/2,b=a-p,w=g.y>d,v=w?s+p:o-p,M=uM(v,u,d,b);return{controllerMeta:{_centerX:u,_centerY:d,_radius:b,_counterclockwise:w,...M},point:g,radius:Math.min(a,Math.min(f.right-f.left,f.bottom-f.top)/2)}}function cM({width:n,height:t},e){const i=Math.sqrt(Math.pow(n,2)+Math.pow(t,2));return e*2/i}function uM(n,t,e,i){const s=Math.pow(e-n,2),r=Math.pow(i,2),o=t*-2,a=Math.pow(t,2)+s-r,l=Math.pow(o,2)-4*a;if(l<=0)return{_startAngle:0,_endAngle:Tt};const c=(-o-Math.sqrt(l))/2,u=(-o+Math.sqrt(l))/2;return{_startAngle:Qs({x:t,y:e},{x:c,y:n}).angle,_endAngle:Qs({x:t,y:e},{x:u,y:n}).angle}}function dM(n,t){const{_centerX:e,_centerY:i,_radius:s,_startAngle:r,_endAngle:o,_counterclockwise:a,options:l}=t;n.save();const c=un(n,l);n.fillStyle=l.backgroundColor,n.beginPath(),n.arc(e,i,s,r,o,a),n.closePath(),n.fill(),c&&n.stroke(),n.restore()}class Cs extends Kt{inRange(t,e,i,s){return Zh({x:t,y:e},{rect:this.getProps(["x","y","x2","y2"],s),center:this.getCenterPoint(s)},i,{rotation:this.rotation,borderWidth:this.options.borderWidth,hitTolerance:this.options.hitTolerance})}getCenterPoint(t){return ei(this,t)}draw(t){const e=this.options,i=!fe(this._visible)||this._visible;!e.display||!e.content||!i||(t.save(),Vr(t,this.getCenterPoint(),this.rotation),Lk(t,this),cf(t,this,e),uf(t,hM(this),e),t.restore())}resolveElementProperties(t,e){let i;if(rf(e))i=gf(t,e);else{const{centerX:a,centerY:l}=tl(t,e);i={x:a,y:l}}const s=jt(e.padding),r=$r(t.ctx,e),o=ef(i,r,e,s);return{initProperties:ki(t,o,e),pointX:i.x,pointY:i.y,...o,rotation:e.rotation}}}Cs.id="labelAnnotation",Cs.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,hitTolerance: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},Cs.defaultRoutes={borderColor:"color"};function hM({x:n,y:t,width:e,height:i,options:s}){const r=s.borderWidth/2,o=jt(s.padding);return{x:n+o.left+r,y:t+o.top+r,width:e-o.left-o.right-s.borderWidth,height:i-o.top-o.bottom-s.borderWidth}}const il=(n,t,e)=>({x:n.x+e*(t.x-n.x),y:n.y+e*(t.y-n.y)}),sl=(n,t,e)=>il(t,e,Math.abs((n-t.y)/(e.y-t.y))).x,Mf=(n,t,e)=>il(t,e,Math.abs((n-t.x)/(e.x-t.x))).y,Os=n=>n*n,fM=(n,t,{x:e,y:i,x2:s,y2:r},o)=>o==="y"?{start:Math.min(i,r),end:Math.max(i,r),value:t}:{start:Math.min(e,s),end:Math.max(e,s),value:n},Sf=(n,t,e,i)=>(1-i)*(1-i)*n+2*(1-i)*i*t+i*i*e,rl=(n,t,e,i)=>({x:Sf(n.x,t.x,e.x,i),y:Sf(n.y,t.y,e.y,i)}),Df=(n,t,e,i)=>2*(1-i)*(t-n)+2*i*(e-t),Tf=(n,t,e,i)=>-Math.atan2(Df(n.x,t.x,e.x,i),Df(n.y,t.y,e.y,i))+.5*ht;class Ps extends Kt{inRange(t,e,i,s){const r=(this.options.borderWidth+this.options.hitTolerance)/2;if(i!=="x"&&i!=="y"){const o={mouseX:t,mouseY:e},{path:a,ctx:l}=this;if(a){un(l,this.options),l.lineWidth+=this.options.hitTolerance;const{chart:u}=this.$context,d=t*u.currentDevicePixelRatio,f=e*u.currentDevicePixelRatio,g=l.isPointInStroke(a,d,f)||ol(this,o,s);return l.restore(),g}const c=Os(r);return yM(this,o,c,s)||ol(this,o,s)}return gM(this,{mouseX:t,mouseY:e},i,{hitSize:r,useFinalPosition:s})}getCenterPoint(t){return ei(this,t)}draw(t){const{x:e,y:i,x2:s,y2:r,cp:o,options:a}=this;if(t.save(),!un(t,a))return t.restore();Mi(t,a);const l=Math.sqrt(Math.pow(s-e,2)+Math.pow(r-i,2));if(a.curve&&o)return SM(t,this,o,l),t.restore();const{startOpts:c,endOpts:u,startAdjust:d,endAdjust:f}=Af(this),g=Math.atan2(r-i,s-e);t.translate(e,i),t.rotate(g),t.beginPath(),t.moveTo(0+d,0),t.lineTo(l-f,0),t.shadowColor=a.borderShadowColor,t.stroke(),al(t,0,d,c),al(t,l,-f,u),t.restore()}get label(){return this.elements&&this.elements[0]}resolveElementProperties(t,e){const i=Yk(t,e),{x:s,y:r,x2:o,y2:a}=i,l=pM(i,t.chartArea),c=l?mM({x:s,y:r},{x:o,y:a},t.chartArea):{x:s,y:r,x2:o,y2:a,width:Math.abs(o-s),height:Math.abs(a-r)};if(c.centerX=(o+s)/2,c.centerY=(a+r)/2,c.initProperties=ki(t,c,e),e.curve){const d={x:c.x,y:c.y},f={x:c.x2,y:c.y2};c.cp=MM(c,e,ci(d,f))}const u=bM(t,c,e.label);return u._visible=l,c.elements=[{type:"label",optionScope:"label",properties:u,initProperties:c.initProperties}],c}}Ps.id="lineAnnotation";const Cf={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};Ps.defaults={adjustScaleRange:!0,arrowHeads:{display:!1,end:Object.assign({},Cf),fill:!1,length:12,start:Object.assign({},Cf),width:6},borderDash:[],borderDashOffset:0,borderShadowColor:"transparent",borderWidth:2,curve:!1,controlPoint:{y:"-50%"},display:!0,endValue:void 0,init:void 0,hitTolerance: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({},Cs.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,hitTolerance: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},Ps.descriptors={arrowHeads:{start:{_fallback:!0},end:{_fallback:!0},_fallback:!0}},Ps.defaultRoutes={borderColor:"color"};function gM(n,{mouseX:t,mouseY:e},i,{hitSize:s,useFinalPosition:r}){const o=fM(t,e,n.getProps(["x","y","x2","y2"],r),i);return Gh(o,s)||ol(n,{mouseX:t,mouseY:e},r,i)}function pM({x:n,y:t,x2:e,y2:i},{top:s,right:r,bottom:o,left:a}){return!(n<a&&e<a||n>r&&e>r||t<s&&i<s||t>o&&i>o)}function Of({x:n,y:t},e,{top:i,right:s,bottom:r,left:o}){return n<o&&(t=Mf(o,{x:n,y:t},e),n=o),n>s&&(t=Mf(s,{x:n,y:t},e),n=s),t<i&&(n=sl(i,{x:n,y:t},e),t=i),t>r&&(n=sl(r,{x:n,y:t},e),t=r),{x:n,y:t}}function mM(n,t,e){const{x:i,y:s}=Of(n,t,e),{x:r,y:o}=Of(t,n,e);return{x:i,y:s,x2:r,y2:o,width:Math.abs(r-i),height:Math.abs(o-s)}}function yM(n,{mouseX:t,mouseY:e},i=ti,s){const{x:r,y:o,x2:a,y2:l}=n.getProps(["x","y","x2","y2"],s),c=a-r,u=l-o,d=Os(c)+Os(u),f=d===0?-1:((t-r)*c+(e-o)*u)/d;let g,p;return f<0?(g=r,p=o):f>1?(g=a,p=l):(g=r+f*c,p=o+f*u),Os(t-g)+Os(e-p)<=i}function ol(n,{mouseX:t,mouseY:e},i,s){const r=n.label;return r.options.display&&r.inRange(t,e,s,i)}function bM(n,t,e){const i=e.borderWidth,s=jt(e.padding),r=$r(n.ctx,e),o=r.width+s.width+i,a=r.height+s.height+i;return xM(t,e,{width:o,height:a,padding:s},n.chartArea)}function _M(n){const{x:t,y:e,x2:i,y2:s}=n,r=Math.atan2(s-e,i-t);return r>ht/2?r-ht:r<ht/-2?r+ht:r}function xM(n,t,e,i){const{width:s,height:r,padding:o}=e,{xAdjust:a,yAdjust:l}=t,c={x:n.x,y:n.y},u={x:n.x2,y:n.y2},d=t.rotation==="auto"?_M(n):Yt(t.rotation),f=wM(s,r,d),g=vM(n,t,{labelSize:f,padding:o},i),p=n.cp?rl(c,n.cp,u,g):il(c,u,g),b={size:f.w,min:i.left,max:i.right,padding:o.left},w={size:f.h,min:i.top,max:i.bottom,padding:o.top},v=Ef(p.x,b)+a,M=Ef(p.y,w)+l;return{x:v-s/2,y:M-r/2,x2:v+s/2,y2:M+r/2,centerX:v,centerY:M,pointX:p.x,pointY:p.y,width:s,height:r,rotation:Zs(d)}}function wM(n,t,e){const i=Math.cos(e),s=Math.sin(e);return{w:Math.abs(n*i)+Math.abs(t*s),h:Math.abs(n*s)+Math.abs(t*i)}}function vM(n,t,e,i){let s;const r=kM(n,i);return t.position==="start"?s=Pf({w:n.x2-n.x,h:n.y2-n.y},e,t,r):t.position==="end"?s=1-Pf({w:n.x-n.x2,h:n.y-n.y2},e,t,r):s=Za(1,t.position),s}function Pf(n,t,e,i){const{labelSize:s,padding:r}=t,o=n.w*i.dx,a=n.h*i.dy,l=o>0&&(s.w/2+r.left-i.x)/o,c=a>0&&(s.h/2+r.top-i.y)/a;return Yr(Math.max(l,c),0,.25)}function kM(n,t){const{x:e,x2:i,y:s,y2:r}=n,o=Math.min(s,r)-t.top,a=Math.min(e,i)-t.left,l=t.bottom-Math.max(s,r),c=t.right-Math.max(e,i);return{x:Math.min(a,c),y:Math.min(o,l),dx:a<=c?1:-1,dy:o<=l?1:-1}}function Ef(n,t){const{size:e,min:i,max:s,padding:r}=t,o=e/2;return e>s-i?(s+i)/2:(i>=n-r-o&&(n=i+r+o),s<=n+r+o&&(n=s-r-o),n)}function Af(n){const t=n.options,e=t.arrowHeads&&t.arrowHeads.start,i=t.arrowHeads&&t.arrowHeads.end;return{startOpts:e,endOpts:i,startAdjust:Rf(n,e),endAdjust:Rf(n,i)}}function Rf(n,t){if(!t||!t.display)return 0;const{length:e,width:i}=t,s=n.options.borderWidth/2,r={x:e,y:i+s};return Math.abs(sl(0,r,{x:0,y:s}))}function al(n,t,e,i){if(!i||!i.display)return;const{length:s,width:r,fill:o,backgroundColor:a,borderColor:l}=i,c=Math.abs(t-s)+e;n.beginPath(),Mi(n,i),un(n,i),n.moveTo(c,-r),n.lineTo(t+e,0),n.lineTo(c,r),o===!0?(n.fillStyle=a||l,n.closePath(),n.fill(),n.shadowColor="transparent"):n.shadowColor=i.borderShadowColor,n.stroke()}function MM(n,t,e){const{x:i,y:s,x2:r,y2:o,centerX:a,centerY:l}=n,c=Math.atan2(o-s,r-i),u=Qa(t.controlPoint,0),d={x:a+Tn(e,u.x,!1),y:l+Tn(e,u.y,!1)};return Jn(d,{x:a,y:l},c)}function Lf(n,{x:t,y:e},{angle:i,adjust:s},r){!r||!r.display||(n.save(),n.translate(t,e),n.rotate(i),al(n,0,-s,r),n.restore())}function SM(n,t,e,i){const{x:s,y:r,x2:o,y2:a,options:l}=t,{startOpts:c,endOpts:u,startAdjust:d,endAdjust:f}=Af(t),g={x:s,y:r},p={x:o,y:a},b=Tf(g,e,p,0),w=Tf(g,e,p,1)-ht,v=rl(g,e,p,d/i),M=rl(g,e,p,1-f/i),D=new Path2D;n.beginPath(),D.moveTo(v.x,v.y),D.quadraticCurveTo(e.x,e.y,M.x,M.y),n.shadowColor=l.borderShadowColor,n.stroke(D),t.path=D,t.ctx=n,Lf(n,v,{angle:b,adjust:d},c),Lf(n,M,{angle:w,adjust:f},u)}class Es extends Kt{inRange(t,e,i,s){const r=this.options.rotation,o=(this.options.borderWidth+this.options.hitTolerance)/2;if(i!=="x"&&i!=="y")return DM({x:t,y:e},this.getProps(["width","height","centerX","centerY"],s),r,o);const{x:a,y:l,x2:c,y2:u}=this.getProps(["x","y","x2","y2"],s),d=i==="y"?{start:l,end:u}:{start:a,end:c},f=Jn({x:t,y:e},this.getCenterPoint(s),Yt(-r));return f[i]>=d.start-o-ti&&f[i]<=d.end+o+ti}getCenterPoint(t){return ei(this,t)}draw(t){const{width:e,height:i,centerX:s,centerY:r,options:o}=this;t.save(),Vr(t,this.getCenterPoint(),o.rotation),Mi(t,this.options),t.beginPath(),t.fillStyle=o.backgroundColor;const a=un(t,o);t.ellipse(s,r,i/2,e/2,ht/2,0,2*ht),t.fill(),a&&(t.shadowColor=o.borderShadowColor,t.stroke()),t.restore()}get label(){return this.elements&&this.elements[0]}resolveElementProperties(t,e){return mf(t,e)}}Es.id="ellipseAnnotation",Es.defaults={adjustScaleRange:!0,backgroundShadowColor:"transparent",borderDash:[],borderDashOffset:0,borderShadowColor:"transparent",borderWidth:1,display:!0,hitTolerance:0,init:void 0,label:Object.assign({},Di.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},Es.defaultRoutes={borderColor:"color",backgroundColor:"color"},Es.descriptors={label:{_fallback:!0}};function DM(n,t,e,i){const{width:s,height:r,centerX:o,centerY:a}=t,l=s/2,c=r/2;if(l<=0||c<=0)return!1;const u=Yt(e||0),d=Math.cos(u),f=Math.sin(u),g=Math.pow(d*(n.x-o)+f*(n.y-a),2),p=Math.pow(f*(n.x-o)-d*(n.y-a),2);return g/Math.pow(l+i,2)+p/Math.pow(c+i,2)<=1.0001}class Xr extends Kt{inRange(t,e,i,s){const{x:r,y:o,x2:a,y2:l,width:c}=this.getProps(["x","y","x2","y2","width"],s),u=(this.options.borderWidth+this.options.hitTolerance)/2;return i!=="x"&&i!=="y"?xk({x:t,y:e},this.getCenterPoint(s),c/2,u):Gh(i==="y"?{start:o,end:l,value:e}:{start:r,end:a,value:t},u)}getCenterPoint(t){return ei(this,t)}draw(t){const e=this.options,i=e.borderWidth;if(e.radius<.1)return;t.save(),t.fillStyle=e.backgroundColor,Mi(t,e);const s=un(t,e);Ck(t,this,this.centerX,this.centerY),s&&!jr(e.pointStyle)&&(t.shadowColor=e.borderShadowColor,t.stroke()),t.restore(),e.borderWidth=i}resolveElementProperties(t,e){const i=pf(t,e);return i.initProperties=ki(t,i,e),i}}Xr.id="pointAnnotation",Xr.defaults={adjustScaleRange:!0,backgroundShadowColor:"transparent",borderDash:[],borderDashOffset:0,borderShadowColor:"transparent",borderWidth:1,display:!0,hitTolerance: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},Xr.defaultRoutes={borderColor:"color",backgroundColor:"color"};class Gr extends Kt{inRange(t,e,i,s){if(i!=="x"&&i!=="y")return this.options.radius>=.1&&this.elements.length>1&&CM(this.elements,t,e,s);const r=Jn({x:t,y:e},this.getCenterPoint(s),Yt(-this.options.rotation)),o=this.elements.map(c=>i==="y"?c.bY:c.bX),a=Math.min(...o),l=Math.max(...o);return r[i]>=a&&r[i]<=l}getCenterPoint(t){return ei(this,t)}draw(t){const{elements:e,options:i}=this;t.save(),t.beginPath(),t.fillStyle=i.backgroundColor,Mi(t,i);const s=un(t,i);let r=!0;for(const o of e)r?(t.moveTo(o.x,o.y),r=!1):t.lineTo(o.x,o.y);t.closePath(),t.fill(),s&&(t.shadowColor=i.borderShadowColor,t.stroke()),t.restore()}resolveElementProperties(t,e){const i=pf(t,e),{sides:s,rotation:r}=e,o=[],a=2*ht/s;let l=r*Do;for(let c=0;c<s;c++,l+=a){const u=TM(i,e,l);u.initProperties=ki(t,i,e),o.push(u)}return i.elements=o,i}}Gr.id="polygonAnnotation",Gr.defaults={adjustScaleRange:!0,backgroundShadowColor:"transparent",borderCapStyle:"butt",borderDash:[],borderDashOffset:0,borderJoinStyle:"miter",borderShadowColor:"transparent",borderWidth:1,display:!0,hitTolerance: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},Gr.defaultRoutes={borderColor:"color",backgroundColor:"color"};function TM({centerX:n,centerY:t},{radius:e,borderWidth:i,hitTolerance:s},r){const o=(i+s)/2,a=Math.sin(r),l=Math.cos(r),c={x:n+a*e,y:t-l*e};return{type:"point",optionScope:"point",properties:{x:c.x,y:c.y,centerX:c.x,centerY:c.y,bX:n+a*(e+o),bY:t-l*(e+o)}}}function CM(n,t,e,i){let s=!1,r=n[n.length-1].getProps(["bX","bY"],i);for(const o of n){const a=o.getProps(["bX","bY"],i);a.bY>e!=r.bY>e&&t<(r.bX-a.bX)*(e-a.bY)/(r.bY-a.bY)+a.bX&&(s=!s),r=a}return s}const Cn={box:Di,doughnutLabel:qr,ellipse:Es,label:Cs,line:Ps,point:Xr,polygon:Gr};Object.keys(Cn).forEach(n=>{Et.describe(`elements.${Cn[n].id}`,{_fallback:"plugins.annotation.common"})});const OM={update:Object.assign},PM=nl.concat(Ur),If=(n,t)=>at(t)?ul(n,t):n,ll=n=>n==="color"||n==="font";function cl(n="line"){return Cn[n]?n:(console.warn(`Unknown annotation type: '${n}', defaulting to 'line'`),"line")}function EM(n,t,e,i){const s=RM(n,e.animations,i),r=t.annotations,o=NM(t.elements,r);for(let a=0;a<r.length;a++){const l=r[a],c=Nf(o,a,l.type),u=l.setContext(IM(n,c,o,l)),d=c.resolveElementProperties(n,u);d.skip=AM(d),"elements"in d&&(LM(c,d.elements,u,s),delete d.elements),fe(c.x)||Object.assign(c,d),Object.assign(c,d.initProperties),d.options=Ff(u),s.update(c,d)}}function AM(n){return isNaN(n.x)||isNaN(n.y)}function RM(n,t,e){return e==="reset"||e==="none"||e==="resize"?OM:new Ho(n,t)}function LM(n,t,e,i){const s=n.elements||(n.elements=[]);s.length=t.length;for(let r=0;r<t.length;r++){const o=t[r],a=o.properties,l=Nf(s,r,o.type,o.initProperties),c=e[o.optionScope].override(o);a.options=Ff(c),i.update(l,a)}}function Nf(n,t,e,i){const s=Cn[cl(e)];let r=n[t];return(!r||!(r instanceof s))&&(r=n[t]=new s,Object.assign(r,i)),r}function Ff(n){const t=Cn[cl(n.type)],e={};e.id=n.id,e.type=n.type,e.drawTime=n.drawTime,Object.assign(e,ul(n,t.defaults),ul(n,t.defaultRoutes));for(const i of PM)e[i]=n[i];return e}function ul(n,t){const e={};for(const i of Object.keys(t)){const s=t[i],r=n[i];ll(i)&&xt(r)?e[i]=r.map(o=>If(o,s)):e[i]=If(r,s)}return e}function IM(n,t,e,i){return t.$context||(t.$context=Object.assign(Object.create(n.getContext()),{element:t,get elements(){return e.filter(s=>s&&s.options)},id:i.id,type:"annotation"}))}function NM(n,t){const e=t.length,i=n.length;if(i<e){const s=e-i;n.splice(i,0,...new Array(s))}else i>e&&n.splice(e,i-e);return n}var FM="3.1.0";const On=new Map,zf=n=>n.type!=="doughnutLabel",zM=nl.concat(Ur);var Bf={id:"annotation",version:FM,beforeRegister(){wk("chart.js","4.0",Pe.version)},afterRegister(){Pe.register(Cn)},afterUnregister(){Pe.unregister(Cn)},beforeInit(n){On.set(n,{annotations:[],elements:[],visibleElements:[],listeners:{},listened:!1,moveListened:!1,hooks:{},hooked:!1,hovered:[]})},beforeUpdate(n,t,e){const i=On.get(n),s=i.annotations=[];let r=e.annotations;at(r)?Object.keys(r).forEach(o=>{const a=r[o];at(a)&&(a.id=o,s.push(a))}):xt(r)&&s.push(...r),eM(s.filter(zf),n.scales)},afterDataLimits(n,t){const e=On.get(n);tM(n,t.scale,e.annotations.filter(zf).filter(i=>i.display&&i.adjustScaleRange))},afterUpdate(n,t,e){const i=On.get(n);Gk(n,i,e),EM(n,i,e,t.mode),i.visibleElements=i.elements.filter(s=>!s.skip&&s.options.display),Jk(n,i,e)},beforeDatasetsDraw(n,t,e){As(n,"beforeDatasetsDraw",e.clip)},afterDatasetsDraw(n,t,e){As(n,"afterDatasetsDraw",e.clip)},beforeDatasetDraw(n,t,e){As(n,t.index,e.clip)},beforeDraw(n,t,e){As(n,"beforeDraw",e.clip)},afterDraw(n,t,e){As(n,"afterDraw",e.clip)},beforeEvent(n,t,e){const i=On.get(n);Kk(i,t.event,e)&&(t.changed=!0)},afterDestroy(n){On.delete(n)},getAnnotations(n){const t=On.get(n);return t?t.elements:[]},_getAnnotationElementsAtEventForMode(n,t,e){return Ka(n,t,e)},defaults:{animations:{numbers:{properties:["x","y","x2","y2","width","height","centerX","centerY","pointX","pointY","radius"],type:"number"},colors:{properties:["backgroundColor","borderColor"],type:"color"}},clip:!0,interaction:{mode:void 0,axis:void 0,intersect:void 0},common:{drawTime:"afterDatasetsDraw",init:!1,label:{}}},descriptors:{_indexable:!1,_scriptable:n=>!zM.includes(n)&&n!=="init",annotations:{_allKeys:!1,_fallback:(n,t)=>`elements.${Cn[cl(t.type)].id}`},interaction:{_fallback:!0},common:{label:{_indexable:ll,_fallback:!0},_indexable:ll}},additionalOptionScopes:[""]};function As(n,t,e){const{ctx:i,chartArea:s}=n,r=On.get(n);e&&Gi(i,s);const o=BM(r.visibleElements,t).sort((a,l)=>a.element.options.z-l.element.options.z);for(const a of o)HM(i,s,r,a);e&&Ki(i)}function BM(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 s of i.elements)s.options.display&&s.options.drawTime===t&&e.push({element:s});return e}function HM(n,t,e,i){const s=i.element;i.main?(wf(e,s,"beforeDraw"),s.draw(n,t),wf(e,s,"afterDraw")):s.draw(n,t)}const WM={class:"tooltip-title"},YM={class:"title font-bold"},jM={key:1,class:"subtitle"},VM={class:"tooltip"},$M={key:0},UM={class:"display-value"},qM=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,s=h.ref(null),r=h.ref(!1),o=h.ref({x:0,y:0}),a=h.ref({x:0,y:0}),l=h.ref({left:i.left,top:i.top});h.watch(s,g=>{if(g){const{width:p,height:b}=g.getBoundingClientRect();e("dimensions",{width:p,height:b})}}),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(s.value){r.value=!0;const p=window.getComputedStyle(s.value),b=p.transform||p.webkitTransform||p.mozTransform,w=new DOMMatrix(b),v=w.m41,M=w.m42;o.value={x:v,y:M},a.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(),r.value&&(u!==null&&window.cancelAnimationFrame(u),u=window.requestAnimationFrame(()=>{const p=g.clientX-a.value.x,b=g.clientY-a.value.y;l.value.left=`${o.value.x+p}px`,l.value.top=`${o.value.y+b}px`}))}function f(){r.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:s,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",WM,[h.createElementVNode("span",YM,h.toDisplayString(n.tooltipTitle),1),n.locked?(h.openBlock(),h.createBlock(h.unref(Kl.DragIcon),{key:0,class:"drag-icon",color:h.unref(nk)},null,8,["color"])):h.createCommentVNode("",!0),n.context?(h.openBlock(),h.createElementBlock("span",jM,h.toDisplayString(n.context),1)):h.createCommentVNode("",!0)]),h.createElementVNode("ul",VM,[(h.openBlock(!0),h.createElementBlock(h.Fragment,null,h.renderList(n.series,({backgroundColor:b,borderColor:w,label:v,value:M,isSegmentEmpty:D})=>(h.openBlock(),h.createElementBlock(h.Fragment,{key:v},[n.series.length?(h.openBlock(),h.createElementBlock("li",$M,[h.createElementVNode("div",{class:"square-marker",style:h.normalizeStyle({background:b,"border-color":w})},null,4),h.createElementVNode("span",{class:h.normalizeClass(["display-label",{empty:D}])},h.toDisplayString(v),3),h.createElementVNode("span",UM,h.toDisplayString(M),1)])):h.createCommentVNode("",!0)],64))),128))])],38)):h.createCommentVNode("",!0)}}),Ke=(n,t)=>{const e=n.__vccOpts||n;for(const[i,s]of t)e[i]=s;return e},dl=Ke(qM,[["__scopeId","data-v-6d10428e"]]),XM=["onClick"],GM={key:0,class:"sub-label"},KM={class:"tooltip-content"},hl=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){h.useCssVars(S=>({"024ed260":l.value}));const t=n,{i18n:e}=yt.useI18n(),i=h.ref(),s=h.ref([]),r=h.inject("showLegendValues",!0),o=h.inject("legendPosition",h.ref(It.Right)),a=h.ref([]),l=h.ref(Uh),c=()=>{const S=i.value;if(!S||!s.value||S.children.length===0)return 0;const T=S.children[0].getBoundingClientRect().top;for(const A of s.value)if(A.getBoundingClientRect().top>T)return!0;return!1},u=h.computed(()=>t.items.length>2||o.value===It.Right),d=()=>{i.value&&o.value===It.Bottom&&(c()?l.value=ok:l.value=Uh)},f=()=>{if(i.value&&o.value===It.Bottom){let S=0;s.value.forEach(A=>{const R=Array.from(A.children).reduce((y,_)=>y+_.offsetWidth,0);R>S&&(S=R)});const T=parseInt(rk,10);i.value.style.gridTemplateColumns=`repeat(auto-fit, ${S+T}px)`}d()},g=()=>{if(t.items.length!==a.value.length)return a.value=t.items,!0;for(let S=0;S<t.items.length;S++)if(t.items[S].text!==a.value[S].text)return a.value=t.items,!0;return!1};h.watch(()=>t.items,()=>{g()&&f()},{immediate:!0,flush:"post"});const p=h.ref(0),b=h.ref(0),w=new ResizeObserver(Yd(S=>{const T=S[0],A=T.contentRect.width,R=T.contentRect.height;A!==p.value&&R===b.value&&f(),p.value=A,b.value=R},100));h.watch(()=>o.value,()=>{f()}),h.onMounted(()=>{a.value=t.items,i.value&&w.observe(i.value),window.requestAnimationFrame(()=>{f()})}),h.onBeforeUnmount(()=>{i.value&&w.unobserve(i.value)});const v=(S=0,T)=>{if(t.chartInstance===null)return;const A=t.chartInstance instanceof Pe?t.chartInstance:t.chartInstance.chart;M(S,T)?A.hide(S,T):A.show(S,T),A.update()},M=(S=0,T)=>{if(t.chartInstance===null||t.chartInstance.chart===null)return!0;const A=t.chartInstance instanceof Pe?t.chartInstance:t.chartInstance.chart,R=A.getDatasetMeta(S);return R.dataset||T===void 0?A.isDatasetVisible(S):!(R.data.length&&R.data[T].hidden)},D=S=>({[It.Right]:"vertical",[It.Bottom]:"horizontal",[It.Hidden]:"hidden"})[S];return(S,T)=>{const A=h.resolveComponent("KTooltip");return h.unref(o)!==h.unref(It).Hidden?(h.openBlock(),h.createElementBlock("ul",{key:0,ref_key:"legendContainerRef",ref:i,class:h.normalizeClass(["legend-container",D(h.unref(o))]),"data-testid":"legend"},[(h.openBlock(!0),h.createElementBlock(h.Fragment,null,h.renderList(n.items,({fillStyle:R,strokeStyle:y,text:_,datasetIndex:C,index:I,value:E,isSegmentEmpty:L})=>(h.openBlock(),h.createElementBlock("li",{key:_,ref_for:!0,ref_key:"legendItemsRef",ref:s,onClick:z=>v(C,I)},[h.createElementVNode("div",{class:"square-marker",style:h.normalizeStyle({background:R,"border-color":y})},null,4),h.createVNode(A,null,h.createSlots({default:h.withCtx(()=>[h.createElementVNode("div",{class:h.normalizeClass(["label-container",{"strike-through":!M(C,I)}])},[h.createElementVNode("div",{class:h.normalizeClass(["label",{"truncate-label":u.value,empty:L}])},h.toDisplayString(_),3),E&&h.unref(r)?(h.openBlock(),h.createElementBlock("div",GM,h.toDisplayString(E.formatted),1)):h.createCommentVNode("",!0)],2)]),_:2},[L?{name:"content",fn:h.withCtx(()=>[h.createElementVNode("div",KM,h.toDisplayString(h.unref(e).t("emptyEntityInfo")),1)]),key:"0"}:void 0]),1024)],8,XM))),128))],2)):h.createCommentVNode("",!0)}}}),[["__scopeId","data-v-14909126"]]);for(var ee=[],fl=0;fl<256;++fl)ee.push((fl+256).toString(16).slice(1));function ZM(n,t=0){return(ee[n[t+0]]+ee[n[t+1]]+ee[n[t+2]]+ee[n[t+3]]+"-"+ee[n[t+4]]+ee[n[t+5]]+"-"+ee[n[t+6]]+ee[n[t+7]]+"-"+ee[n[t+8]]+ee[n[t+9]]+"-"+ee[n[t+10]]+ee[n[t+11]]+ee[n[t+12]]+ee[n[t+13]]+ee[n[t+14]]+ee[n[t+15]]).toLowerCase()}var Kr,QM=new Uint8Array(16);function JM(){if(!Kr&&(Kr=typeof crypto<"u"&&crypto.getRandomValues&&crypto.getRandomValues.bind(crypto),!Kr))throw new Error("crypto.getRandomValues() not supported. See https://github.com/uuidjs/uuid#getrandomvalues-not-supported");return Kr(QM)}var tS=typeof crypto<"u"&&crypto.randomUUID&&crypto.randomUUID.bind(crypto);const Hf={randomUUID:tS};function Zr(n,t,e){if(Hf.randomUUID&&!t&&!n)return Hf.randomUUID();n=n||{};var i=n.random||(n.rng||JM)();return i[6]=i[6]&15|64,i[8]=i[8]&63|128,ZM(i)}const Wf=(n,t)=>{const e=n.ctx,i=n.scales.y,s=n.scales.x,r=t[t.length-1].element;e.save(),e.strokeStyle="rgba(100, 100, 100, 1)",e.lineWidth=3,n.options.indexAxis==="x"?e.strokeRect(r.x-r.width/2,r.y,r.width,i.bottom-r.y):e.strokeRect(s.left,r.y-r.height/2,r.x-s.left,r.height),e.restore()};class Yf{constructor(){O(this,"id","highlightPlugin");O(this,"_clickedElements");O(this,"_previousHoverOption");O(this,"_clicked",!1)}afterDatasetsDraw(t){this._clickedElements&&this._clickedElements.length&&Wf(t,this._clickedElements)}afterEvent(t,{event:e}){var r;if(e.type!=="click"||!e.native)return;this._clicked=!this._clicked;const i=((r=t.options.interaction)==null?void 0:r.mode)||"index",s=t.getElementsAtEventForMode(e.native,i,{intersect:!1},!0);s.length&&this._clicked?(this._clickedElements=s,Wf(t,this._clickedElements),this._previousHoverOption=t.options.hover,t.options.hover={mode:null}):(delete this._clickedElements,t.options.hover=this._previousHoverOption||t.options.hover,this._clicked=!1)}beforeDestroy(t){delete this._clickedElements,t.options.hover=this._previousHoverOption||t.options.hover,this._clicked=!1}}const eS=["id"],nS=["id"],iS={class:"axis-tooltip-content"},jf=6,sS="100%",rS="100%",oS=20,aS=20,Vf=6,lS=0,cS=10,uS=10,dS=1,hS=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:""},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,{i18n:e}=yt.useI18n(),{translateUnit:i}=yt.useTranslatedUnits(),s=crypto.randomUUID(),r=crypto.randomUUID(),o=new Yf,a=h.ref(null),l=({chart:W},U)=>{var q;const $=W.data,H=(q=$.labels)==null?void 0:q.indexOf(U);return $.datasets.reduce((Q,rt,lt)=>{if(W.isDatasetVisible(lt)){const ut=rt.data[H];return isNaN(ut)?Q:Q+ut}else return Q},0)},c=(W,U,$,H)=>{const q=H==="horizontal";U===null&&(U=e.t("entityNoName"));const Q={type:"label",yValue:ut=>q?U:l(ut,U),xValue:ut=>q?l(ut,U):U},rt={...Q,position:q?{x:"start",y:"center"}:{x:"center",y:"end"},yAdjust:()=>q?0:-Math.abs(uw()),content:ut=>Oa(l(ut,U),$)},lt={...Q,content:ut=>th(l(ut,U),Jd(ut.chart,W)),position:q?{x:"start",y:"center"}:{x:"center",y:"end"},xAdjust:ut=>q?Qd(Oa(l(ut,U),$)):0,color:Gd};return{[`${U}-value`]:rt,[`${U}-percent`]:lt}},u=h.ref(null),d=h.ref(),f=h.ref(Zr()),g=Zr(),p=Zr(),b=h.ref([]),w=h.ref(h.inject("legendPosition",It.Right)),v=h.ref({show:!1,top:"0px",left:"0px",text:"",offset:-50}),M=h.toRef(t,"metricUnit"),D=h.computed(()=>h.toRef(t,"orientation").value==="horizontal"),S=h.reactive({showTooltip:!1,tooltipContext:"",tooltipSeries:[],left:"",top:"",units:M,translateUnit:i,offsetX:0,offsetY:0,width:0,height:0,locked:!1,chartType:D.value?"horizontal_bar":"vertical_bar",chartID:r,chartTooltipSortFn:t.chartTooltipSortFn}),T=h.ref(0),A=()=>{var W;return t.annotations&&((W=t.chartData.labels)==null?void 0:W.reduce((U,$)=>Object.assign(U,c(t.chartData,$,M.value,t.orientation)),{}))},R={id:f.value,afterUpdate(W){T.value+=1,b.value=jd(W,t.legendValues,t.chartLegendSortFn)}},y={id:g,afterUpdate(W){W.options.plugins.annotation.annotations=t.annotations?A():{}}},I=[R,{id:"axisHover",afterEvent(W,U){var $;if(v.value.show=!1,U.event.type==="mousemove"){const H=U.event,q=W.options.indexAxis,Q=W.scales,rt=W.scales[q].getLabelForValue(Number(W.scales[q].getValueForPixel(H[q]))),ut=W.scales[q].getLabels().indexOf(rt),St=($=t.chartData.isLabelEmpty)==null?void 0:$[ut];if((Vt=>Vt==="x"?H.y>Q.x.top:H.x<Q.y.right)(q)){S.locked||(S.showTooltip=!1);const $t=W.canvas.getContext("2d").measureText(rt).width,ne=Math.abs(Math.round(H.x-$t*.5)),Zt=Math.round(H.x+$t*.5);v.value.left=q==="x"?`${(ne>0?ne:Zt)-v.value.offset}px`:`${H.x-$t*.5-v.value.offset}px`,v.value.top=`${H.y-50}px`,rt.length>Er?(v.value.show=!0,v.value.text=rt):St?(v.value.text=e.t("emptyEntityInfo"),v.value.show=!0):v.value.show=!1}else v.value.show=!1}}},{id:p,afterUpdate(W){W.options.layout.padding.right=D.value?J.value:0}},o,...t.annotations?[y]:[]],E=h.computed(()=>t.chartData.labels&&t.chartData.labels.length||0),L=h.ref(0),z=h.ref(0),X=new ResizeObserver(Yd(W=>{L.value=W[0].contentRect.width,z.value=W[0].contentRect.height},100)),K=h.computed(()=>{var U,$;const W=($=(U=t.chartData)==null?void 0:U.labels)==null?void 0:$.length;return u.value&&W&&!D.value?`${Math.max(W*(oS+Vf),L.value)}px`:sS}),B=h.computed(()=>{var U,$;const W=($=(U=t.chartData)==null?void 0:U.labels)==null?void 0:$.length;return u.value&&W&&D.value?`${Math.max(W*(aS+Vf),z.value)}px`:rS});yt.useReportChartDataForSynthetics(h.toRef(t,"chartData"),h.toRef(t,"syntheticsDataKey")),h.onMounted(()=>{t.annotations&&Pe.register(Bf),a.value&&(L.value=a.value.offsetWidth,z.value=a.value.offsetHeight,X.observe(a.value))}),h.onUnmounted(()=>{a.value&&X.unobserve(a.value)});const dt=h.computed(()=>{const W=yt.useBarChartOptions({tooltipState:S,legendID:f.value,stacked:h.toRef(t,"stacked"),metricAxesTitle:h.toRef(t,"metricAxesTitle"),dimensionAxesTitle:h.toRef(t,"dimensionAxesTitle"),indexAxis:D.value?"y":"x",numLabels:E});return{...W.value,plugins:{...W.value.plugins,annotation:{annotations:A(),clip:!1}},layout:{autoPadding:!1,padding:{right:0,top:6*jf}}}}),j=yt.useChartJSCommon("bar",u,h.toRef(t,"chartData"),I,dt),J=h.computed(()=>{T.value;const W=t.chartData.labels,U=t.chartData.datasets,$=W.map((Q,rt)=>U.reduce((lt,ut)=>isNaN(Number(ut.data[rt]))?lt:lt+Number(ut.data[rt]),0)),H=j.value?Jd(j.value,t.chartData):dw(t.chartData);return $.map(Q=>Qd(Oa(Q,M.value)+th(Q,H))).reduce((Q,rt)=>Math.max(Q,rt),0)+jf});h.onBeforeUnmount(()=>{Pe.unregister(Bf)});const Ct={[It.Right]:"legend-row",[It.Bottom]:"column"},V=h.computed(()=>{if(d.value&&j.value){const W=window.devicePixelRatio,U=j.value,$=U.scales.y.width*W+dS,H=(U.scales.y.height+U.scales.y.top+U.scales.x.height)*W,q=d.value.getContext("2d");return q.scale(W,W),q.canvas.width=$,q.canvas.height=H,q.canvas.style.width=`${$/W}px`,q.canvas.style.height=`${H/W}px`,{scale:W,width:$*W,height:H*W,targetCtx:q}}return null}),st=W=>{const U=W.target;if(V.value&&j.value&&!D.value){const $=V.value.scale,H=V.value.targetCtx,q=V.value.width,Q=V.value.height,rt=j.value,lt=rt.canvas;H.fillStyle="white",U.scrollLeft>=lS&&U.scrollLeft<=cS?(H.globalCompositeOperation="source-over",H.clearRect(0,0,q,Q),H.drawImage(lt,0,0,q,Q,0,0,q,Q),H.globalCompositeOperation="destination-over",H.fillRect(0,0,q,Q)):(H.globalCompositeOperation="source-over",H.fillRect(0,(rt.scales.y.height+rt.scales.y.top+uS)*$,q,rt.scales.x.height*$))}S.offsetY=U.scrollTop,S.offsetX=U.scrollLeft,v.value.offset=U.scrollLeft},_t=({width:W,height:U})=>{S.width=W,S.height=U};h.watch(()=>t.orientation,()=>{var W;if(d.value&&V.value){const U=V.value.width,$=V.value.height;((W=d.value)==null?void 0:W.getContext("2d")).clearRect(0,0,U,$)}S.showTooltip=!1,S.locked=!1}),h.watch(()=>t.annotations,W=>{j.value&&(W?j.value.options.plugins.annotation.annotations=A(t.chartData):delete j.value.options.plugins.annotation.annotations)});const gt=()=>{S.showTooltip&&(S.locked=!S.locked)};return(W,U)=>(h.openBlock(),h.createElementBlock("div",{class:h.normalizeClass(["chart-parent",Ct[w.value]])},[h.createElementVNode("canvas",{id:h.unref(s),ref_key:"axis",ref:d,class:"axis"},null,8,eS),h.createElementVNode("div",{ref_key:"chartContainerRef",ref:a,class:"chart-container","on:scroll":st,onClick:U[0]||(U[0]=$=>gt())},[h.createElementVNode("div",{class:"chart-body",style:h.normalizeStyle({width:K.value,height:B.value})},[h.createElementVNode("canvas",{id:h.unref(r),ref_key:"canvas",ref:u,class:"chart-canvas"},null,8,nS)],4)],544),v.value.show?(h.openBlock(),h.createElementBlock("div",{key:0,class:"axis-tooltip",style:h.normalizeStyle({top:v.value.top,left:v.value.left}),width:"auto"},[h.createElementVNode("div",iS,h.toDisplayString(v.value.text),1)],4)):h.createCommentVNode("",!0),h.createVNode(dl,{context:S.tooltipContext,left:S.left,locked:S.locked,series:S.tooltipSeries,"show-tooltip":S.showTooltip,"tooltip-title":n.tooltipTitle,top:S.top,onDimensions:_t},null,8,["context","left","locked","series","show-tooltip","tooltip-title","top"]),h.createVNode(hl,{id:f.value,"chart-instance":h.unref(j),items:b.value},null,8,["id","chart-instance","items"])],2))}}),[["__scopeId","data-v-1129f066"]]);/*!
|
|
24
24
|
* chartjs-adapter-date-fns v3.0.0
|
|
25
25
|
* https://www.chartjs.org
|
|
26
26
|
* (c) 2022 chartjs-adapter-date-fns Contributors
|
|
27
27
|
* Released under the MIT license
|
|
28
|
-
*/const fS={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"};eu._date.override({_id:"date-fns",formats:function(){return fS},parse:function(n,t){if(n===null||typeof n>"u")return null;const e=typeof n;return e==="number"||n instanceof Date?n=it(n):e==="string"&&(typeof t=="string"?n=Cx(n,t,new Date,this.options):n=Hd(n,this.options)),ma(n)?n.getTime():null},format:function(n,t){return Ld(n,t,this.options)},add:function(n,t,e){switch(e){case"millisecond":return ga(n,t);case"second":return k0(n,t);case"minute":return w0(n,t);case"hour":return b0(n,t);case"day":return Dr(n,t);case"week":return M0(n,t);case"month":return fa(n,t);case"quarter":return v0(n,t);case"year":return S0(n,t);default:return n}},diff:function(n,t,e){switch(e){case"millisecond":return ya(n,t);case"second":return R0(n,t);case"minute":return P0(n,t);case"hour":return O0(n,t);case"day":return bd(n,t);case"week":return L0(n,t);case"month":return vd(n,t);case"quarter":return A0(n,t);case"year":return I0(n,t);default:return 0}},startOf:function(n,t,e){switch(t){case"second":return Ax(n);case"minute":return Ex(n);case"hour":return Px(n);case"day":return pa(n);case"week":return qe(n);case"isoWeek":return qe(n,{weekStartsOn:+e});case"month":return F0(n);case"quarter":return N0(n);case"year":return kd(n);default:return n}},endOf:function(n,t){switch(t){case"second":return j0(n);case"minute":return W0(n);case"hour":return B0(n);case"day":return xd(n);case"week":return H0(n);case"month":return wd(n);case"quarter":return Y0(n);case"year":return z0(n);default:return n}}});const $f={data:{type:Object,required:!0},options:{type:Object,default:()=>({})},plugins:{type:Array,default:()=>[]},datasetIdKey:{type:String,default:"label"},updateMode:{type:String,default:void 0}},gS={type:{type:String,required:!0},destroyDelay:{type:Number,default:0},...$f,...{ariaLabel:{type:String},ariaDescribedby:{type:String}}},pS=h.version[0]==="2"?(n,t)=>Object.assign(n,{attrs:t}):(n,t)=>Object.assign(n,t);function Ti(n){return h.isProxy(n)?h.toRaw(n):n}function mS(n){let t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:n;return h.isProxy(t)?new Proxy(n,{}):n}function yS(n,t){const e=n.options;e&&t&&Object.assign(e,t)}function Uf(n,t){n.labels=t}function qf(n,t,e){const i=[];n.datasets=t.map(s=>{const r=n.datasets.find(o=>o[e]===s[e]);return!r||!s.data||i.includes(r)?{...s}:(i.push(r),Object.assign(r,s),r)})}function bS(n,t){const e={labels:[],datasets:[]};return Uf(e,n.labels),qf(e,n.datasets,t),e}const _S=h.defineComponent({props:gS,setup(n,t){let{expose:e,slots:i}=t;const s=h.ref(null),r=h.shallowRef(null);e({chart:r});const o=()=>{if(!s.value)return;const{type:c,data:u,options:d,plugins:f,datasetIdKey:g}=n,p=bS(u,g),b=mS(p,u);r.value=new Pe(s.value,{type:c,data:b,options:{...d},plugins:f})},a=()=>{const c=h.toRaw(r.value);c&&(n.destroyDelay>0?setTimeout(()=>{c.destroy(),r.value=null},n.destroyDelay):(c.destroy(),r.value=null))},l=c=>{c.update(n.updateMode)};return h.onMounted(o),h.onUnmounted(a),h.watch([()=>n.options,()=>n.data],(c,u)=>{let[d,f]=c,[g,p]=u;const b=h.toRaw(r.value);if(!b)return;let w=!1;if(d){const v=Ti(d),M=Ti(g);v&&v!==M&&(yS(b,v),w=!0)}if(f){const v=Ti(f.labels),M=Ti(p.labels),D=Ti(f.datasets),S=Ti(p.datasets);v!==M&&(Uf(b.config.data,v),w=!0),D&&D!==S&&(qf(b.config.data,D,n.datasetIdKey),w=!0)}w&&h.nextTick(()=>{l(b)})},{deep:!0}),()=>h.h("canvas",{role:"img",ariaLabel:n.ariaLabel,ariaDescribedby:n.ariaDescribedby,ref:s},[h.h("p",{},[i.default?i.default():""])])}});function gl(n,t){return Pe.register(t),h.defineComponent({props:$f,setup(e,i){let{expose:s}=i;const r=h.shallowRef(null),o=a=>{r.value=a==null?void 0:a.chart};return s({chart:r}),()=>h.h(_S,pS({ref:o},{type:n,...e}))}})}const xS=gl("bar",Ji),Xf=gl("doughnut",on),wS=gl("line",ts),vS={class:"chart-container"},kS=h.defineComponent({__name:"DonutChart",props:{chartData:{type:Object,required:!1,default:null},tooltipTitle:{type:String,required:!0},metricUnit:{type:String,required:!1,default:""},legendPosition:{type:String,required:!1,default:It.Right},legendValues:{type:Object,required:!1,default:null},syntheticsDataKey:{type:String,required:!1,default:""},datasetColors:{type:Object,required:!1,default:ln}},setup(n){const t=n,{translateUnit:e}=yt.useTranslatedUnits(),i=crypto.randomUUID(),s=crypto.randomUUID(),r=h.ref([]),o=h.reactive({showTooltip:!1,tooltipContext:"",tooltipSeries:[],left:"",top:"",units:h.toRef(t,"metricUnit"),translateUnit:e,offsetX:0,offsetY:0,width:0,height:0,chartID:s,chartType:"donut"}),a={id:i,afterUpdate(b){r.value=b.options.plugins.legend.labels.generateLabels(b).map(w=>({...w,value:t.legendValues&&t.legendValues[w.text],hidden:!1}))}},l=h.computed(()=>[a]),c=h.computed(()=>[t.chartData.datasets.reduce((w,v)=>(w.labels.push(v.label),w.backgroundColor.push(v.backgroundColor),w.borderColor.push(Xd(v.backgroundColor,50)),w.data.push(v.data.reduce((M,D)=>M+D,0)),w),{labels:[],backgroundColor:[],borderColor:[],data:[]})]),u=h.computed(()=>({...t.chartData,datasets:c.value}));yt.useReportChartDataForSynthetics(h.toRef(t,"chartData"),h.toRef(t,"syntheticsDataKey"));const{options:d}=yt.useDonutChartOptions({tooltipState:o,legendID:i}),f=h.ref(),g=b=>({[It.Right]:"legend-row",[It.Bottom]:"column",[It.Hidden]:"hidden"})[b],p=({width:b,height:w})=>{o.width=b,o.height=w};return(b,w)=>(h.openBlock(),h.createElementBlock("div",{class:h.normalizeClass(["chart-parent",g(n.legendPosition)]),"data-testid":"donut-chart-parent"},[h.createElementVNode("div",vS,[h.createVNode(h.unref(Xf),{ref_key:"chartInstance",ref:f,"chart-id":h.unref(s),data:u.value,options:h.unref(d),plugins:l.value},null,8,["chart-id","data","options","plugins"]),h.createVNode(dl,{left:o.left,series:o.tooltipSeries,"show-tooltip":o.showTooltip,"tooltip-title":n.tooltipTitle,top:o.top,unit:n.metricUnit,onDimensions:p},null,8,["left","series","show-tooltip","tooltip-title","top","unit"])]),h.createVNode(hl,{id:h.unref(i),"chart-instance":f.value,items:r.value,position:n.legendPosition},null,8,["id","chart-instance","items","position"])],2))}}),MS=Ke(kS,[["__scopeId","data-v-6f244c54"]]),Gf=(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()};class SS{constructor(){O(this,"id","verticalLinePlugin");O(this,"_clickedSegment");O(this,"_pause",!1)}afterDatasetsDraw(t){if(!this._pause&&t.tooltip&&t.tooltip.getActiveElements()&&t.tooltip.getActiveElements().length&&!this.clickedSegment){const{x:e}=t.tooltip.dataPoints[0].element,i=t.ctx;Gf(i,e,t.scales.y.top,t.scales.y.bottom)}if(!this._pause&&this._clickedSegment){const{x:e}=this._clickedSegment.element,i=t.ctx;Gf(i,e,t.scales.y.top,t.scales.y.bottom)}}pause(){this._pause=!0}resume(){this._pause=!1}set clickedSegment(t){this._clickedSegment=t}get clickedSegment(){return this._clickedSegment}destroyClickedSegment(){delete this._clickedSegment}beforeDestroy(){this._clickedSegment&&this.destroyClickedSegment()}}const DS=(n,t,e)=>{const i=n.ctx;i.save(),i.fillStyle="rgba(200, 200, 200, 0.5)",i.fillRect(t,n.chartArea.top,e-t,n.chartArea.bottom-n.chartArea.top),i.restore()},Kf=(n,t,e)=>{const i=t.scales.x.getValueForPixel(e.startX),s=t.scales.x.getValueForPixel(e.endX);t.canvas.dispatchEvent(new CustomEvent(n,{detail:{xStart:i,xEnd:s}}))};class TS{constructor(){O(this,"id","dragSelectPlugin");O(this,"_isDragging",!1);O(this,"_startX",0);O(this,"_endX",0);O(this,"_dragTimeout");O(this,"_dragSelectHandlers")}get startX(){return this._startX}get endX(){return this._endX}beforeInit(t){const e=t.canvas,i=e.getBoundingClientRect();let s=!1;const r=l=>{this._dragTimeout=window.setTimeout(()=>{this._isDragging=!0,s=!0,this._startX=l.clientX-i.left},150)},o=l=>{s&&this._isDragging&&(this._endX=l.clientX-i.left,Kf("dragSelectMove",t,this),t.update())},a=l=>{clearTimeout(this._dragTimeout),s&&this._isDragging&&(this._endX=l.clientX-i.left,Kf("dragSelect",t,this),t.update(),this._isDragging=!1,s=!1)};e.addEventListener("mousedown",r),e.addEventListener("mousemove",o),e.addEventListener("mouseup",a),this._dragSelectHandlers={onMouseDown:r,onMouseMove:o,onMouseUp:a}}beforeDestroy(t){const e=t.canvas;if(this._dragSelectHandlers){const{onMouseDown:i,onMouseMove:s,onMouseUp:r}=this._dragSelectHandlers;e.removeEventListener("mousedown",i),e.removeEventListener("mousemove",s),e.removeEventListener("mouseup",r)}this._isDragging=!1,this._dragTimeout&&clearTimeout(this._dragTimeout)}afterDatasetsDraw(t){this._isDragging&&DS(t,this._startX,this._endX)}}const CS=Ke(h.defineComponent({__name:"TimeSeriesChart",props:{chartData:{type:Object,required:!1,default:null},type:{type:String,required:!1,default:"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},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:""},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},zoom:{type:Boolean,required:!1,default:!1}},emits:["zoom-time-range"],setup(n,{emit:t}){const e=n,i=t,s=new SS,r=new Yf,o=new TS,{translateUnit:a}=yt.useTranslatedUnits(),l=h.ref(),c=crypto.randomUUID(),u=crypto.randomUUID(),d=h.ref([]),f=h.ref(),g=h.ref(h.inject("legendPosition",It.Right)),p=h.ref(!1),b=h.reactive({showTooltip:!1,tooltipContext:0,tooltipSeries:[],left:"",top:"",units:h.toRef(e,"metricUnit"),translateUnit:a,offsetX:0,offsetY:0,width:0,height:0,chartType:e.type,locked:!1,chartID:u,chartTooltipSortFn:e.chartTooltipSortFn}),w={id:c,afterUpdate(E){d.value=jd(E,e.legendValues,e.chartLegendSortFn)}},v=h.computed(()=>[w,r,...e.zoom?[o]:[],...e.type==="timeseries_line"?[s]:[]]),M=h.computed(()=>`line-${v.value.map(E=>E.id).join("-")}`),D=h.computed(()=>`bar-${v.value.map(E=>E.id).join("-")}`),S=h.computed(()=>Qx(e.chartData)),{options:T}=yt.useLinechartOptions({tooltipState:b,timeRangeMs:h.toRef(e,"timeRangeMs"),granularity:h.toRef(e,"granularity"),legendID:c,stacked:h.toRef(e,"stacked"),metricAxesTitle:h.toRef(e,"metricAxesTitle"),dimensionAxesTitle:h.toRef(e,"dimensionAxesTitle"),pointsWithoutHover:S});yt.useReportChartDataForSynthetics(h.toRef(e,"chartData"),h.toRef(e,"syntheticsDataKey"));const A=E=>mh(new Date(E),e.granularity,!0),R=E=>({[It.Right]:"legend-row",[It.Bottom]:"column",[It.Hidden]:"hidden"})[E],y=({width:E,height:L})=>{b.width=E,b.height=L},_=()=>{var E,L;b.locked=!b.locked,l.value&&((L=(E=l.value.chart.tooltip)==null?void 0:E.dataPoints)!=null&&L.length)&&(b.locked?s.clickedSegment=l.value.chart.tooltip.dataPoints[0]:s.destroyClickedSegment())};h.watch(()=>e.type,()=>{b.locked=!1,b.showTooltip=!1,s.destroyClickedSegment()});const C=E=>{const{xStart:L,xEnd:z}=E.detail;L&&z&&i("zoom-time-range",{start:new Date(L),end:new Date(z),type:"absolute"}),p.value=!1,_(),s.resume()},I=()=>{p.value=!0,s.pause()};return h.watch(()=>{var E;return(E=l.value)==null?void 0:E.chart},()=>{var E;(E=l.value)!=null&&E.chart&&(l.value.chart.canvas.removeEventListener("dragSelect",C),l.value.chart.canvas.removeEventListener("dragSelectMove",I),l.value.chart.canvas.addEventListener("dragSelect",C),l.value.chart.canvas.addEventListener("dragSelectMove",I))}),h.onUnmounted(()=>{var E;(E=l.value)!=null&&E.chart&&(l.value.chart.canvas.removeEventListener("dragSelect",C),l.value.chart.canvas.removeEventListener("dragSelectMove",I))}),(E,L)=>(h.openBlock(),h.createElementBlock("div",{class:h.normalizeClass(["chart-parent",R(g.value)]),"data-testid":"line-chart-parent"},[h.createElementVNode("div",{class:"chart-container",onClick:L[0]||(L[0]=z=>_())},[n.type==="timeseries_line"?(h.openBlock(),h.createBlock(h.unref(wS),{key:M.value,ref_key:"chartInstance",ref:l,"chart-id":h.unref(u),class:"chart-canvas",data:n.chartData,"data-testid":"time-series-line-chart",options:h.unref(T),plugins:v.value},null,8,["chart-id","data","options","plugins"])):n.type==="timeseries_bar"?(h.openBlock(),h.createBlock(h.unref(xS),{key:D.value,ref_key:"chartInstance",ref:l,"chart-id":h.unref(u),class:"chart-canvas",data:n.chartData,"data-testid":"time-series-bar-chart",options:h.unref(T),plugins:v.value},null,8,["chart-id","data","options","plugins"])):h.createCommentVNode("",!0)]),p.value?h.createCommentVNode("",!0):(h.openBlock(),h.createBlock(dl,{key:0,ref_key:"tooltipElement",ref:f,context:A(b.tooltipContext),"data-testid":"tooltip",left:b.left,locked:b.locked,series:b.tooltipSeries,"show-tooltip":b.showTooltip,"tooltip-title":n.tooltipTitle,top:b.top,unit:n.metricUnit,onDimensions:y,onLeft:L[1]||(L[1]=z=>b.left=z),onTop:L[2]||(L[2]=z=>b.top=z)},null,8,["context","left","locked","series","show-tooltip","tooltip-title","top","unit"])),h.createVNode(hl,{id:h.unref(c),"chart-instance":l.value,"data-testid":"legend",items:d.value},null,8,["id","chart-instance","items"])],2))}}),[["__scopeId","data-v-c10833c9"]]),OS=["hidden","single","full"];var ii=(n=>(n.String="string",n.Number="number",n.Boolean="boolean",n.Object="object",n.Undefined="undefined",n))(ii||{});const PS=["donut","horizontal_bar","vertical_bar","timeseries_line","timeseries_bar"],ES=["gauge","top_n","single_value"];var Qr={exports:{}};Qr.exports,function(n,t){var e=200,i="Expected a function",s="__lodash_hash_undefined__",r=1,o=2,a=1/0,l=9007199254740991,c="[object Arguments]",u="[object Array]",d="[object Boolean]",f="[object Date]",g="[object Error]",p="[object Function]",b="[object GeneratorFunction]",w="[object Map]",v="[object Number]",M="[object Object]",D="[object Promise]",S="[object RegExp]",T="[object Set]",A="[object String]",R="[object Symbol]",y="[object WeakMap]",_="[object ArrayBuffer]",C="[object DataView]",I="[object Float32Array]",E="[object Float64Array]",L="[object Int8Array]",z="[object Int16Array]",X="[object Int32Array]",K="[object Uint8Array]",B="[object Uint8ClampedArray]",dt="[object Uint16Array]",j="[object Uint32Array]",J=/\.|\[(?:[^[\]]*|(["'])(?:(?!\1)[^\\]|\\.)*?\1)\]/,Ct=/^\w*$/,V=/^\./,st=/[^.[\]]+|\[(?:(-?\d+(?:\.\d+)?)|(["'])((?:(?!\2)[^\\]|\\.)*?)\2)\]|(?=(?:\.|\[\])(?:\.|\[\]|$))/g,_t=/[\\^$.*+?()[\]{}|]/g,gt=/\\(\\)?/g,W=/^\[object .+?Constructor\]$/,U=/^(?:0|[1-9]\d*)$/,$={};$[I]=$[E]=$[L]=$[z]=$[X]=$[K]=$[B]=$[dt]=$[j]=!0,$[c]=$[u]=$[_]=$[d]=$[C]=$[f]=$[g]=$[p]=$[w]=$[v]=$[M]=$[S]=$[T]=$[A]=$[y]=!1;var H=typeof ye=="object"&&ye&&ye.Object===Object&&ye,q=typeof self=="object"&&self&&self.Object===Object&&self,Q=H||q||Function("return this")(),rt=t&&!t.nodeType&&t,lt=rt&&!0&&n&&!n.nodeType&&n,ut=lt&<.exports===rt,St=ut&&H.process,mt=function(){try{return St&&St.binding("util")}catch{}}(),Vt=mt&&mt.isTypedArray;function $t(m,k){for(var N=-1,Y=m?m.length:0;++N<Y;)if(k(m[N],N,m))return!0;return!1}function ne(m){return function(k){return k==null?void 0:k[m]}}function Zt(m,k){for(var N=-1,Y=Array(m);++N<m;)Y[N]=k(N);return Y}function Qt(m){return function(k){return m(k)}}function Dt(m,k){return m==null?void 0:m[k]}function Ot(m){var k=!1;if(m!=null&&typeof m.toString!="function")try{k=!!(m+"")}catch{}return k}function Jt(m){var k=-1,N=Array(m.size);return m.forEach(function(Y,ot){N[++k]=[ot,Y]}),N}function pt(m,k){return function(N){return m(k(N))}}function Ze(m){var k=-1,N=Array(m.size);return m.forEach(function(Y){N[++k]=Y}),N}var be=Array.prototype,Re=Function.prototype,oe=Object.prototype,_e=Q["__core-js_shared__"],Te=function(){var m=/[^.]+$/.exec(_e&&_e.keys&&_e.keys.IE_PROTO||"");return m?"Symbol(src)_1."+m:""}(),ie=Re.toString,ae=oe.hasOwnProperty,zt=oe.toString,Ci=RegExp("^"+ie.call(ae).replace(_t,"\\$&").replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g,"$1.*?")+"$"),En=Q.Symbol,Oi=Q.Uint8Array,si=oe.propertyIsEnumerable,Rs=be.splice,Ls=pt(Object.keys,Object),ri=we(Q,"DataView"),ze=we(Q,"Map"),Is=we(Q,"Promise"),Ns=we(Q,"Set"),Fs=we(Q,"WeakMap"),oi=we(Object,"create"),yl=Ye(ri),Jr=Ye(ze),to=Ye(Is),dn=Ye(Ns),bl=Ye(Fs),Pi=En?En.prototype:void 0,zs=Pi?Pi.valueOf:void 0,eo=Pi?Pi.toString:void 0;function hn(m){var k=-1,N=m?m.length:0;for(this.clear();++k<N;){var Y=m[k];this.set(Y[0],Y[1])}}function Be(){this.__data__=oi?oi(null):{}}function _l(m){return this.has(m)&&delete this.__data__[m]}function xl(m){var k=this.__data__;if(oi){var N=k[m];return N===s?void 0:N}return ae.call(k,m)?k[m]:void 0}function wl(m){var k=this.__data__;return oi?k[m]!==void 0:ae.call(k,m)}function vl(m,k){var N=this.__data__;return N[m]=oi&&k===void 0?s:k,this}hn.prototype.clear=Be,hn.prototype.delete=_l,hn.prototype.get=xl,hn.prototype.has=wl,hn.prototype.set=vl;function He(m){var k=-1,N=m?m.length:0;for(this.clear();++k<N;){var Y=m[k];this.set(Y[0],Y[1])}}function An(){this.__data__=[]}function kl(m){var k=this.__data__,N=Ai(k,m);if(N<0)return!1;var Y=k.length-1;return N==Y?k.pop():Rs.call(k,N,1),!0}function Ml(m){var k=this.__data__,N=Ai(k,m);return N<0?void 0:k[N][1]}function Sl(m){return Ai(this.__data__,m)>-1}function Dl(m,k){var N=this.__data__,Y=Ai(N,m);return Y<0?N.push([m,k]):N[Y][1]=k,this}He.prototype.clear=An,He.prototype.delete=kl,He.prototype.get=Ml,He.prototype.has=Sl,He.prototype.set=Dl;function We(m){var k=-1,N=m?m.length:0;for(this.clear();++k<N;){var Y=m[k];this.set(Y[0],Y[1])}}function Rn(){this.__data__={hash:new hn,map:new(ze||He),string:new hn}}function Tl(m){return Li(this,m).delete(m)}function Cl(m){return Li(this,m).get(m)}function Ol(m){return Li(this,m).has(m)}function Pl(m,k){return Li(this,m).set(m,k),this}We.prototype.clear=Rn,We.prototype.delete=Tl,We.prototype.get=Cl,We.prototype.has=Ol,We.prototype.set=Pl;function Ei(m){var k=-1,N=m?m.length:0;for(this.__data__=new We;++k<N;)this.add(m[k])}function El(m){return this.__data__.set(m,s),this}function no(m){return this.__data__.has(m)}Ei.prototype.add=Ei.prototype.push=El,Ei.prototype.has=no;function xe(m){this.__data__=new He(m)}function Al(){this.__data__=new He}function Bs(m){return this.__data__.delete(m)}function Rl(m){return this.__data__.get(m)}function Ll(m){return this.__data__.has(m)}function Il(m,k){var N=this.__data__;if(N instanceof He){var Y=N.__data__;if(!ze||Y.length<e-1)return Y.push([m,k]),this;N=this.__data__=new We(Y)}return N.set(m,k),this}xe.prototype.clear=Al,xe.prototype.delete=Bs,xe.prototype.get=Rl,xe.prototype.has=Ll,xe.prototype.set=Il;function Nl(m,k){var N=P(m)||x(m)?Zt(m.length,String):[],Y=N.length,ot=!!Y;for(var Z in m)ae.call(m,Z)&&!(ot&&(Z=="length"||uo(Z,Y)))&&N.push(Z);return N}function Ai(m,k){for(var N=m.length;N--;)if(go(m[N][0],k))return N;return-1}var Fl=$l();function Hs(m,k){return m&&Fl(m,k,Fn)}function io(m,k){k=In(k,m)?[k]:oo(k);for(var N=0,Y=k.length;m!=null&&N<Y;)m=m[Ni(k[N++])];return N&&N==Y?m:void 0}function zl(m){return zt.call(m)}function Bl(m,k){return m!=null&&k in Object(m)}function Ws(m,k,N,Y,ot){return m===k?!0:m==null||k==null||!ve(m)&&!qt(k)?m!==m&&k!==k:Hl(m,k,Ws,N,Y,ot)}function Hl(m,k,N,Y,ot,Z){var ft=P(m),Xt=P(k),Bt=u,le=u;ft||(Bt=Qe(m),Bt=Bt==c?M:Bt),Xt||(le=Qe(k),le=le==c?M:le);var ke=Bt==M&&!Ot(m),Me=le==M&&!Ot(k),he=Bt==le;if(he&&!ke)return Z||(Z=new xe),ft||Nn(m)?ao(m,k,N,Y,ot,Z):Ul(m,k,Bt,N,Y,ot,Z);if(!(ot&o)){var Le=ke&&ae.call(m,"__wrapped__"),Ie=Me&&ae.call(k,"__wrapped__");if(Le||Ie){var zn=Le?m.value():m,gn=Ie?k.value():k;return Z||(Z=new xe),N(zn,gn,Y,ot,Z)}}return he?(Z||(Z=new xe),ql(m,k,N,Y,ot,Z)):!1}function Wl(m,k,N,Y){var ot=N.length,Z=ot;if(m==null)return!Z;for(m=Object(m);ot--;){var ft=N[ot];if(ft[2]?ft[1]!==m[ft[0]]:!(ft[0]in m))return!1}for(;++ot<Z;){ft=N[ot];var Xt=ft[0],Bt=m[Xt],le=ft[1];if(ft[2]){if(Bt===void 0&&!(Xt in m))return!1}else{var ke=new xe,Me;if(!(Me===void 0?Ws(le,Bt,Y,r|o,ke):Me))return!1}}return!0}function Yl(m){if(!ve(m)||Xl(m))return!1;var k=Ut(m)||Ot(m)?Ci:W;return k.test(Ye(m))}function so(m){return qt(m)&&te(m.length)&&!!$[zt.call(m)]}function jl(m){return typeof m=="function"?m:m==null?QD:typeof m=="object"?P(m)?Ln(m[0],m[1]):Ri(m):JD(m)}function Vl(m){if(!Gl(m))return Ls(m);var k=[];for(var N in Object(m))ae.call(m,N)&&N!="constructor"&&k.push(N);return k}function Ri(m){var k=lo(m);return k.length==1&&k[0][2]?fo(k[0][0],k[0][1]):function(N){return N===m||Wl(N,m,k)}}function Ln(m,k){return In(m)&&Ys(k)?fo(Ni(m),k):function(N){var Y=mo(N,m);return Y===void 0&&Y===k?yo(N,m):Ws(k,Y,void 0,r|o)}}function ro(m){return function(k){return io(k,m)}}function fn(m){if(typeof m=="string")return m;if(Fi(m))return eo?eo.call(m):"";var k=m+"";return k=="0"&&1/m==-a?"-0":k}function oo(m){return P(m)?m:Ii(m)}function $l(m){return function(k,N,Y){for(var ot=-1,Z=Object(k),ft=Y(k),Xt=ft.length;Xt--;){var Bt=ft[++ot];if(N(Z[Bt],Bt,Z)===!1)break}return k}}function ao(m,k,N,Y,ot,Z){var ft=ot&o,Xt=m.length,Bt=k.length;if(Xt!=Bt&&!(ft&&Bt>Xt))return!1;var le=Z.get(m);if(le&&Z.get(k))return le==k;var ke=-1,Me=!0,he=ot&r?new Ei:void 0;for(Z.set(m,k),Z.set(k,m);++ke<Xt;){var Le=m[ke],Ie=k[ke];if(Y)var zn=ft?Y(Ie,Le,ke,k,m,Z):Y(Le,Ie,ke,m,k,Z);if(zn!==void 0){if(zn)continue;Me=!1;break}if(he){if(!$t(k,function(gn,ai){if(!he.has(ai)&&(Le===gn||N(Le,gn,Y,ot,Z)))return he.add(ai)})){Me=!1;break}}else if(!(Le===Ie||N(Le,Ie,Y,ot,Z))){Me=!1;break}}return Z.delete(m),Z.delete(k),Me}function Ul(m,k,N,Y,ot,Z,ft){switch(N){case C:if(m.byteLength!=k.byteLength||m.byteOffset!=k.byteOffset)return!1;m=m.buffer,k=k.buffer;case _:return!(m.byteLength!=k.byteLength||!Y(new Oi(m),new Oi(k)));case d:case f:case v:return go(+m,+k);case g:return m.name==k.name&&m.message==k.message;case S:case A:return m==k+"";case w:var Xt=Jt;case T:var Bt=Z&o;if(Xt||(Xt=Ze),m.size!=k.size&&!Bt)return!1;var le=ft.get(m);if(le)return le==k;Z|=r,ft.set(m,k);var ke=ao(Xt(m),Xt(k),Y,ot,Z,ft);return ft.delete(m),ke;case R:if(zs)return zs.call(m)==zs.call(k)}return!1}function ql(m,k,N,Y,ot,Z){var ft=ot&o,Xt=Fn(m),Bt=Xt.length,le=Fn(k),ke=le.length;if(Bt!=ke&&!ft)return!1;for(var Me=Bt;Me--;){var he=Xt[Me];if(!(ft?he in k:ae.call(k,he)))return!1}var Le=Z.get(m);if(Le&&Z.get(k))return Le==k;var Ie=!0;Z.set(m,k),Z.set(k,m);for(var zn=ft;++Me<Bt;){he=Xt[Me];var gn=m[he],ai=k[he];if(Y)var ag=ft?Y(ai,gn,he,k,m,Z):Y(gn,ai,he,m,k,Z);if(!(ag===void 0?gn===ai||N(gn,ai,Y,ot,Z):ag)){Ie=!1;break}zn||(zn=he=="constructor")}if(Ie&&!zn){var bo=m.constructor,_o=k.constructor;bo!=_o&&"constructor"in m&&"constructor"in k&&!(typeof bo=="function"&&bo instanceof bo&&typeof _o=="function"&&_o instanceof _o)&&(Ie=!1)}return Z.delete(m),Z.delete(k),Ie}function Li(m,k){var N=m.__data__;return ho(k)?N[typeof k=="string"?"string":"hash"]:N.map}function lo(m){for(var k=Fn(m),N=k.length;N--;){var Y=k[N],ot=m[Y];k[N]=[Y,ot,Ys(ot)]}return k}function we(m,k){var N=Dt(m,k);return Yl(N)?N:void 0}var Qe=zl;(ri&&Qe(new ri(new ArrayBuffer(1)))!=C||ze&&Qe(new ze)!=w||Is&&Qe(Is.resolve())!=D||Ns&&Qe(new Ns)!=T||Fs&&Qe(new Fs)!=y)&&(Qe=function(m){var k=zt.call(m),N=k==M?m.constructor:void 0,Y=N?Ye(N):void 0;if(Y)switch(Y){case yl:return C;case Jr:return w;case to:return D;case dn:return T;case bl:return y}return k});function co(m,k,N){k=In(k,m)?[k]:oo(k);for(var Y,ot=-1,ft=k.length;++ot<ft;){var Z=Ni(k[ot]);if(!(Y=m!=null&&N(m,Z)))break;m=m[Z]}if(Y)return Y;var ft=m?m.length:0;return!!ft&&te(ft)&&uo(Z,ft)&&(P(m)||x(m))}function uo(m,k){return k=k??l,!!k&&(typeof m=="number"||U.test(m))&&m>-1&&m%1==0&&m<k}function In(m,k){if(P(m))return!1;var N=typeof m;return N=="number"||N=="symbol"||N=="boolean"||m==null||Fi(m)?!0:Ct.test(m)||!J.test(m)||k!=null&&m in Object(k)}function ho(m){var k=typeof m;return k=="string"||k=="number"||k=="symbol"||k=="boolean"?m!=="__proto__":m===null}function Xl(m){return!!Te&&Te in m}function Gl(m){var k=m&&m.constructor,N=typeof k=="function"&&k.prototype||oe;return m===N}function Ys(m){return m===m&&!ve(m)}function fo(m,k){return function(N){return N==null?!1:N[m]===k&&(k!==void 0||m in Object(N))}}var Ii=js(function(m){m=po(m);var k=[];return V.test(m)&&k.push(""),m.replace(st,function(N,Y,ot,Z){k.push(ot?Z.replace(gt,"$1"):Y||N)}),k});function Ni(m){if(typeof m=="string"||Fi(m))return m;var k=m+"";return k=="0"&&1/m==-a?"-0":k}function Ye(m){if(m!=null){try{return ie.call(m)}catch{}try{return m+""}catch{}}return""}function js(m,k){if(typeof m!="function"||k&&typeof k!="function")throw new TypeError(i);var N=function(){var Y=arguments,ot=k?k.apply(this,Y):Y[0],Z=N.cache;if(Z.has(ot))return Z.get(ot);var ft=m.apply(this,Y);return N.cache=Z.set(ot,ft),ft};return N.cache=new(js.Cache||We),N}js.Cache=We;function go(m,k){return m===k||m!==m&&k!==k}function x(m){return G(m)&&ae.call(m,"callee")&&(!si.call(m,"callee")||zt.call(m)==c)}var P=Array.isArray;function F(m){return m!=null&&te(m.length)&&!Ut(m)}function G(m){return qt(m)&&F(m)}function Ut(m){var k=ve(m)?zt.call(m):"";return k==p||k==b}function te(m){return typeof m=="number"&&m>-1&&m%1==0&&m<=l}function ve(m){var k=typeof m;return!!m&&(k=="object"||k=="function")}function qt(m){return!!m&&typeof m=="object"}function Fi(m){return typeof m=="symbol"||qt(m)&&zt.call(m)==R}var Nn=Vt?Qt(Vt):so;function po(m){return m==null?"":fn(m)}function mo(m,k,N){var Y=m==null?void 0:io(m,k);return Y===void 0?N:Y}function yo(m,k){return m!=null&&co(m,k,Bl)}function Fn(m){return F(m)?Nl(m):Vl(m)}function zi(m,k){var N={};return k=jl(k),Hs(m,function(Y,ot,Z){N[k(Y,ot,Z)]=Y}),N}function QD(m){return m}function JD(m){return In(m)?ne(Ni(m)):ro(m)}n.exports=zi}(Qr,Qr.exports);var AS=Qr.exports;const RS=Ha(AS);var LS=1/0,IS=9007199254740991,NS="[object Arguments]",FS="[object Function]",zS="[object GeneratorFunction]",BS="[object Symbol]",HS=typeof ye=="object"&&ye&&ye.Object===Object&&ye,WS=typeof self=="object"&&self&&self.Object===Object&&self,YS=HS||WS||Function("return this")();function jS(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 VS(n,t){for(var e=-1,i=n?n.length:0,s=Array(i);++e<i;)s[e]=t(n[e],e,n);return s}function $S(n,t){for(var e=-1,i=t.length,s=n.length;++e<i;)n[s+e]=t[e];return n}var pl=Object.prototype,US=pl.hasOwnProperty,ml=pl.toString,Zf=YS.Symbol,qS=pl.propertyIsEnumerable,Qf=Zf?Zf.isConcatSpreadable:void 0,Jf=Math.max;function XS(n,t,e,i,s){var r=-1,o=n.length;for(e||(e=QS),s||(s=[]);++r<o;){var a=n[r];e(a)?$S(s,a):s[s.length]=a}return s}function GS(n,t){return n=Object(n),KS(n,t,function(e,i){return i in n})}function KS(n,t,e){for(var i=-1,s=t.length,r={};++i<s;){var o=t[i],a=n[o];e(a,o)&&(r[o]=a)}return r}function ZS(n,t){return t=Jf(t===void 0?n.length-1:t,0),function(){for(var e=arguments,i=-1,s=Jf(e.length-t,0),r=Array(s);++i<s;)r[i]=e[t+i];i=-1;for(var o=Array(t+1);++i<t;)o[i]=e[i];return o[t]=r,jS(n,this,o)}}function QS(n){return eD(n)||tD(n)||!!(Qf&&n&&n[Qf])}function JS(n){if(typeof n=="string"||aD(n))return n;var t=n+"";return t=="0"&&1/n==-LS?"-0":t}function tD(n){return iD(n)&&US.call(n,"callee")&&(!qS.call(n,"callee")||ml.call(n)==NS)}var eD=Array.isArray;function nD(n){return n!=null&&rD(n.length)&&!sD(n)}function iD(n){return tg(n)&&nD(n)}function sD(n){var t=oD(n)?ml.call(n):"";return t==FS||t==zS}function rD(n){return typeof n=="number"&&n>-1&&n%1==0&&n<=IS}function oD(n){var t=typeof n;return!!n&&(t=="object"||t=="function")}function tg(n){return!!n&&typeof n=="object"}function aD(n){return typeof n=="symbol"||tg(n)&&ml.call(n)==BS}var lD=ZS(function(n,t){return n==null?{}:GS(n,VS(XS(t),JS))}),cD=lD;const uD=Ha(cD);var eg={exports:{}};(function(n,t){(function(e,i){i()})(ye,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 s(c){var u=new XMLHttpRequest;u.open("HEAD",c,!1);try{u.send()}catch{}return 200<=u.status&&299>=u.status}function r(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 o=typeof window=="object"&&window.window===window?window:typeof self=="object"&&self.self===self?self:typeof ye=="object"&&ye.global===ye?ye:void 0,a=o.navigator&&/Macintosh/.test(navigator.userAgent)&&/AppleWebKit/.test(navigator.userAgent)&&!/Safari/.test(navigator.userAgent),l=o.saveAs||(typeof window!="object"||window!==o?function(){}:"download"in HTMLAnchorElement.prototype&&!a?function(c,u,d){var f=o.URL||o.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?r(g):s(g.href)?i(c,u,d):r(g,g.target="_blank")):(g.href=f.createObjectURL(c),setTimeout(function(){f.revokeObjectURL(g.href)},4e4),setTimeout(function(){r(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(s(c))i(c,u,d);else{var f=document.createElement("a");f.href=c,f.target="_blank",setTimeout(function(){r(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(o.HTMLElement)||o.safari,b=/CriOS\/[\d]+/.test(navigator.userAgent);if((b||g&&p||a)&&typeof FileReader<"u"){var w=new FileReader;w.onloadend=function(){var D=w.result;D=b?D:D.replace(/^data:[^;]*;/,"data:attachment/file;"),f?f.location.href=D:location=D,f=null},w.readAsDataURL(c)}else{var v=o.URL||o.webkitURL,M=v.createObjectURL(c);f?f.location=M:location.href=M,f=null,setTimeout(function(){v.revokeObjectURL(M)},4e4)}});o.saveAs=l.saveAs=l,n.exports=l})})(eg);var dD=eg.exports,ng={exports:{}};/* @license
|
|
28
|
+
*/const fS={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"};eu._date.override({_id:"date-fns",formats:function(){return fS},parse:function(n,t){if(n===null||typeof n>"u")return null;const e=typeof n;return e==="number"||n instanceof Date?n=it(n):e==="string"&&(typeof t=="string"?n=Cx(n,t,new Date,this.options):n=Hd(n,this.options)),ma(n)?n.getTime():null},format:function(n,t){return Ld(n,t,this.options)},add:function(n,t,e){switch(e){case"millisecond":return ga(n,t);case"second":return k0(n,t);case"minute":return w0(n,t);case"hour":return b0(n,t);case"day":return Dr(n,t);case"week":return M0(n,t);case"month":return fa(n,t);case"quarter":return v0(n,t);case"year":return S0(n,t);default:return n}},diff:function(n,t,e){switch(e){case"millisecond":return ya(n,t);case"second":return R0(n,t);case"minute":return P0(n,t);case"hour":return O0(n,t);case"day":return bd(n,t);case"week":return L0(n,t);case"month":return vd(n,t);case"quarter":return A0(n,t);case"year":return I0(n,t);default:return 0}},startOf:function(n,t,e){switch(t){case"second":return Ax(n);case"minute":return Ex(n);case"hour":return Px(n);case"day":return pa(n);case"week":return qe(n);case"isoWeek":return qe(n,{weekStartsOn:+e});case"month":return F0(n);case"quarter":return N0(n);case"year":return kd(n);default:return n}},endOf:function(n,t){switch(t){case"second":return j0(n);case"minute":return W0(n);case"hour":return B0(n);case"day":return xd(n);case"week":return H0(n);case"month":return wd(n);case"quarter":return Y0(n);case"year":return z0(n);default:return n}}});const $f={data:{type:Object,required:!0},options:{type:Object,default:()=>({})},plugins:{type:Array,default:()=>[]},datasetIdKey:{type:String,default:"label"},updateMode:{type:String,default:void 0}},gS={type:{type:String,required:!0},destroyDelay:{type:Number,default:0},...$f,...{ariaLabel:{type:String},ariaDescribedby:{type:String}}},pS=h.version[0]==="2"?(n,t)=>Object.assign(n,{attrs:t}):(n,t)=>Object.assign(n,t);function Ti(n){return h.isProxy(n)?h.toRaw(n):n}function mS(n){let t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:n;return h.isProxy(t)?new Proxy(n,{}):n}function yS(n,t){const e=n.options;e&&t&&Object.assign(e,t)}function Uf(n,t){n.labels=t}function qf(n,t,e){const i=[];n.datasets=t.map(s=>{const r=n.datasets.find(o=>o[e]===s[e]);return!r||!s.data||i.includes(r)?{...s}:(i.push(r),Object.assign(r,s),r)})}function bS(n,t){const e={labels:[],datasets:[]};return Uf(e,n.labels),qf(e,n.datasets,t),e}const _S=h.defineComponent({props:gS,setup(n,t){let{expose:e,slots:i}=t;const s=h.ref(null),r=h.shallowRef(null);e({chart:r});const o=()=>{if(!s.value)return;const{type:c,data:u,options:d,plugins:f,datasetIdKey:g}=n,p=bS(u,g),b=mS(p,u);r.value=new Pe(s.value,{type:c,data:b,options:{...d},plugins:f})},a=()=>{const c=h.toRaw(r.value);c&&(n.destroyDelay>0?setTimeout(()=>{c.destroy(),r.value=null},n.destroyDelay):(c.destroy(),r.value=null))},l=c=>{c.update(n.updateMode)};return h.onMounted(o),h.onUnmounted(a),h.watch([()=>n.options,()=>n.data],(c,u)=>{let[d,f]=c,[g,p]=u;const b=h.toRaw(r.value);if(!b)return;let w=!1;if(d){const v=Ti(d),M=Ti(g);v&&v!==M&&(yS(b,v),w=!0)}if(f){const v=Ti(f.labels),M=Ti(p.labels),D=Ti(f.datasets),S=Ti(p.datasets);v!==M&&(Uf(b.config.data,v),w=!0),D&&D!==S&&(qf(b.config.data,D,n.datasetIdKey),w=!0)}w&&h.nextTick(()=>{l(b)})},{deep:!0}),()=>h.h("canvas",{role:"img",ariaLabel:n.ariaLabel,ariaDescribedby:n.ariaDescribedby,ref:s},[h.h("p",{},[i.default?i.default():""])])}});function gl(n,t){return Pe.register(t),h.defineComponent({props:$f,setup(e,i){let{expose:s}=i;const r=h.shallowRef(null),o=a=>{r.value=a==null?void 0:a.chart};return s({chart:r}),()=>h.h(_S,pS({ref:o},{type:n,...e}))}})}const xS=gl("bar",Ji),Xf=gl("doughnut",on),wS=gl("line",ts),vS={class:"chart-container"},kS=h.defineComponent({__name:"DonutChart",props:{chartData:{type:Object,required:!1,default:null},tooltipTitle:{type:String,required:!0},metricUnit:{type:String,required:!1,default:""},legendPosition:{type:String,required:!1,default:It.Right},legendValues:{type:Object,required:!1,default:null},syntheticsDataKey:{type:String,required:!1,default:""},datasetColors:{type:Object,required:!1,default:ln}},setup(n){const t=n,{translateUnit:e}=yt.useTranslatedUnits(),i=crypto.randomUUID(),s=crypto.randomUUID(),r=h.ref([]),o=h.reactive({showTooltip:!1,tooltipContext:"",tooltipSeries:[],left:"",top:"",units:h.toRef(t,"metricUnit"),translateUnit:e,offsetX:0,offsetY:0,width:0,height:0,chartID:s,chartType:"donut"}),a={id:i,afterUpdate(b){r.value=b.options.plugins.legend.labels.generateLabels(b).map(w=>({...w,value:t.legendValues&&t.legendValues[w.text],hidden:!1}))}},l=h.computed(()=>[a]),c=h.computed(()=>[t.chartData.datasets.reduce((w,v)=>(w.labels.push(v.label),w.backgroundColor.push(v.backgroundColor),w.borderColor.push(Xd(v.backgroundColor,50)),w.data.push(v.data.reduce((M,D)=>M+D,0)),w),{labels:[],backgroundColor:[],borderColor:[],data:[]})]),u=h.computed(()=>({...t.chartData,datasets:c.value}));yt.useReportChartDataForSynthetics(h.toRef(t,"chartData"),h.toRef(t,"syntheticsDataKey"));const{options:d}=yt.useDonutChartOptions({tooltipState:o,legendID:i}),f=h.ref(),g=b=>({[It.Right]:"legend-row",[It.Bottom]:"column",[It.Hidden]:"hidden"})[b],p=({width:b,height:w})=>{o.width=b,o.height=w};return(b,w)=>(h.openBlock(),h.createElementBlock("div",{class:h.normalizeClass(["chart-parent",g(n.legendPosition)]),"data-testid":"donut-chart-parent"},[h.createElementVNode("div",vS,[h.createVNode(h.unref(Xf),{ref_key:"chartInstance",ref:f,"chart-id":h.unref(s),data:u.value,options:h.unref(d),plugins:l.value},null,8,["chart-id","data","options","plugins"]),h.createVNode(dl,{left:o.left,series:o.tooltipSeries,"show-tooltip":o.showTooltip,"tooltip-title":n.tooltipTitle,top:o.top,unit:n.metricUnit,onDimensions:p},null,8,["left","series","show-tooltip","tooltip-title","top","unit"])]),h.createVNode(hl,{id:h.unref(i),"chart-instance":f.value,items:r.value,position:n.legendPosition},null,8,["id","chart-instance","items","position"])],2))}}),MS=Ke(kS,[["__scopeId","data-v-6f244c54"]]),Gf=(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()};class SS{constructor(){O(this,"id","verticalLinePlugin");O(this,"_clickedSegment");O(this,"_pause",!1)}afterDatasetsDraw(t){if(!this._pause&&t.tooltip&&t.tooltip.getActiveElements()&&t.tooltip.getActiveElements().length&&!this.clickedSegment){const{x:e}=t.tooltip.dataPoints[0].element,i=t.ctx;Gf(i,e,t.scales.y.top,t.scales.y.bottom)}if(!this._pause&&this._clickedSegment){const{x:e}=this._clickedSegment.element,i=t.ctx;Gf(i,e,t.scales.y.top,t.scales.y.bottom)}}pause(){this._pause=!0}resume(){this._pause=!1}set clickedSegment(t){this._clickedSegment=t}get clickedSegment(){return this._clickedSegment}destroyClickedSegment(){delete this._clickedSegment}beforeDestroy(){this._clickedSegment&&this.destroyClickedSegment()}}const DS=(n,t,e)=>{const i=n.ctx;i.save(),i.fillStyle="rgba(200, 200, 200, 0.5)",i.fillRect(t,n.chartArea.top,e-t,n.chartArea.bottom-n.chartArea.top),i.restore()},Kf=(n,t,e)=>{const i=t.scales.x.getValueForPixel(e.startX),s=t.scales.x.getValueForPixel(e.endX);t.canvas.dispatchEvent(new CustomEvent(n,{detail:{xStart:i,xEnd:s}}))};class TS{constructor(){O(this,"id","dragSelectPlugin");O(this,"_isDragging",!1);O(this,"_startX",0);O(this,"_endX",0);O(this,"_dragTimeout");O(this,"_dragSelectHandlers")}get startX(){return this._startX}get endX(){return this._endX}beforeInit(t){const e=t.canvas,i=e.getBoundingClientRect();let s=!1;const r=l=>{this._dragTimeout=window.setTimeout(()=>{this._isDragging=!0,s=!0,this._startX=l.clientX-i.left},150)},o=l=>{s&&this._isDragging&&(this._endX=l.clientX-i.left,Kf("dragSelectMove",t,this),t.update())},a=l=>{clearTimeout(this._dragTimeout),s&&this._isDragging&&(this._endX=l.clientX-i.left,Kf("dragSelect",t,this),t.update(),this._isDragging=!1,s=!1)};e.addEventListener("mousedown",r),e.addEventListener("mousemove",o),e.addEventListener("mouseup",a),this._dragSelectHandlers={onMouseDown:r,onMouseMove:o,onMouseUp:a}}beforeDestroy(t){const e=t.canvas;if(this._dragSelectHandlers){const{onMouseDown:i,onMouseMove:s,onMouseUp:r}=this._dragSelectHandlers;e.removeEventListener("mousedown",i),e.removeEventListener("mousemove",s),e.removeEventListener("mouseup",r)}this._isDragging=!1,this._dragTimeout&&clearTimeout(this._dragTimeout)}afterDatasetsDraw(t){this._isDragging&&DS(t,this._startX,this._endX)}}const CS=Ke(h.defineComponent({__name:"TimeSeriesChart",props:{chartData:{type:Object,required:!1,default:null},type:{type:String,required:!1,default:"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},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:""},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},zoom:{type:Boolean,required:!1,default:!1}},emits:["zoom-time-range"],setup(n,{emit:t}){const e=n,i=t,s=new SS,r=new Yf,o=new TS,{translateUnit:a}=yt.useTranslatedUnits(),l=h.ref(),c=crypto.randomUUID(),u=crypto.randomUUID(),d=h.ref([]),f=h.ref(),g=h.ref(h.inject("legendPosition",It.Right)),p=h.ref(!1),b=h.reactive({showTooltip:!1,tooltipContext:0,tooltipSeries:[],left:"",top:"",units:h.toRef(e,"metricUnit"),translateUnit:a,offsetX:0,offsetY:0,width:0,height:0,chartType:e.type,locked:!1,chartID:u,chartTooltipSortFn:e.chartTooltipSortFn}),w={id:c,afterUpdate(E){d.value=jd(E,e.legendValues,e.chartLegendSortFn)}},v=h.computed(()=>[w,r,...e.zoom?[o]:[],...e.type==="timeseries_line"?[s]:[]]),M=h.computed(()=>`line-${v.value.map(E=>E.id).join("-")}`),D=h.computed(()=>`bar-${v.value.map(E=>E.id).join("-")}`),S=h.computed(()=>Qx(e.chartData)),{options:T}=yt.useLinechartOptions({tooltipState:b,timeRangeMs:h.toRef(e,"timeRangeMs"),granularity:h.toRef(e,"granularity"),legendID:c,stacked:h.toRef(e,"stacked"),metricAxesTitle:h.toRef(e,"metricAxesTitle"),dimensionAxesTitle:h.toRef(e,"dimensionAxesTitle"),pointsWithoutHover:S});yt.useReportChartDataForSynthetics(h.toRef(e,"chartData"),h.toRef(e,"syntheticsDataKey"));const A=E=>mh(new Date(E),e.granularity,!0),R=E=>({[It.Right]:"legend-row",[It.Bottom]:"column",[It.Hidden]:"hidden"})[E],y=({width:E,height:L})=>{b.width=E,b.height=L},_=()=>{var E,L;b.locked=!b.locked,l.value&&((L=(E=l.value.chart.tooltip)==null?void 0:E.dataPoints)!=null&&L.length)&&(b.locked?s.clickedSegment=l.value.chart.tooltip.dataPoints[0]:s.destroyClickedSegment())};h.watch(()=>e.type,()=>{b.locked=!1,b.showTooltip=!1,s.destroyClickedSegment()});const C=E=>{const{xStart:L,xEnd:z}=E.detail;L&&z&&i("zoom-time-range",{start:new Date(L),end:new Date(z),type:"absolute"}),p.value=!1,_(),s.resume()},I=()=>{p.value=!0,s.pause()};return h.watch(()=>{var E;return(E=l.value)==null?void 0:E.chart},()=>{var E;(E=l.value)!=null&&E.chart&&(l.value.chart.canvas.removeEventListener("dragSelect",C),l.value.chart.canvas.removeEventListener("dragSelectMove",I),l.value.chart.canvas.addEventListener("dragSelect",C),l.value.chart.canvas.addEventListener("dragSelectMove",I))}),h.onUnmounted(()=>{var E;(E=l.value)!=null&&E.chart&&(l.value.chart.canvas.removeEventListener("dragSelect",C),l.value.chart.canvas.removeEventListener("dragSelectMove",I))}),(E,L)=>(h.openBlock(),h.createElementBlock("div",{class:h.normalizeClass(["chart-parent",R(g.value)]),"data-testid":"line-chart-parent"},[h.createElementVNode("div",{class:"chart-container",onClick:L[0]||(L[0]=z=>_())},[n.type==="timeseries_line"?(h.openBlock(),h.createBlock(h.unref(wS),{key:M.value,ref_key:"chartInstance",ref:l,"chart-id":h.unref(u),class:"chart-canvas",data:n.chartData,"data-testid":"time-series-line-chart",options:h.unref(T),plugins:v.value},null,8,["chart-id","data","options","plugins"])):n.type==="timeseries_bar"?(h.openBlock(),h.createBlock(h.unref(xS),{key:D.value,ref_key:"chartInstance",ref:l,"chart-id":h.unref(u),class:"chart-canvas",data:n.chartData,"data-testid":"time-series-bar-chart",options:h.unref(T),plugins:v.value},null,8,["chart-id","data","options","plugins"])):h.createCommentVNode("",!0)]),p.value?h.createCommentVNode("",!0):(h.openBlock(),h.createBlock(dl,{key:0,ref_key:"tooltipElement",ref:f,context:A(b.tooltipContext),"data-testid":"tooltip",left:b.left,locked:b.locked,series:b.tooltipSeries,"show-tooltip":b.showTooltip,"tooltip-title":n.tooltipTitle,top:b.top,unit:n.metricUnit,onDimensions:y,onLeft:L[1]||(L[1]=z=>b.left=z),onTop:L[2]||(L[2]=z=>b.top=z)},null,8,["context","left","locked","series","show-tooltip","tooltip-title","top","unit"])),h.createVNode(hl,{id:h.unref(c),"chart-instance":l.value,"data-testid":"legend",items:d.value},null,8,["id","chart-instance","items"])],2))}}),[["__scopeId","data-v-9ec09087"]]),OS=["hidden","single","full"];var ii=(n=>(n.String="string",n.Number="number",n.Boolean="boolean",n.Object="object",n.Undefined="undefined",n))(ii||{});const PS=["donut","horizontal_bar","vertical_bar","timeseries_line","timeseries_bar"],ES=["gauge","top_n","single_value"];var Qr={exports:{}};Qr.exports,function(n,t){var e=200,i="Expected a function",s="__lodash_hash_undefined__",r=1,o=2,a=1/0,l=9007199254740991,c="[object Arguments]",u="[object Array]",d="[object Boolean]",f="[object Date]",g="[object Error]",p="[object Function]",b="[object GeneratorFunction]",w="[object Map]",v="[object Number]",M="[object Object]",D="[object Promise]",S="[object RegExp]",T="[object Set]",A="[object String]",R="[object Symbol]",y="[object WeakMap]",_="[object ArrayBuffer]",C="[object DataView]",I="[object Float32Array]",E="[object Float64Array]",L="[object Int8Array]",z="[object Int16Array]",X="[object Int32Array]",K="[object Uint8Array]",B="[object Uint8ClampedArray]",dt="[object Uint16Array]",j="[object Uint32Array]",J=/\.|\[(?:[^[\]]*|(["'])(?:(?!\1)[^\\]|\\.)*?\1)\]/,Ct=/^\w*$/,V=/^\./,st=/[^.[\]]+|\[(?:(-?\d+(?:\.\d+)?)|(["'])((?:(?!\2)[^\\]|\\.)*?)\2)\]|(?=(?:\.|\[\])(?:\.|\[\]|$))/g,_t=/[\\^$.*+?()[\]{}|]/g,gt=/\\(\\)?/g,W=/^\[object .+?Constructor\]$/,U=/^(?:0|[1-9]\d*)$/,$={};$[I]=$[E]=$[L]=$[z]=$[X]=$[K]=$[B]=$[dt]=$[j]=!0,$[c]=$[u]=$[_]=$[d]=$[C]=$[f]=$[g]=$[p]=$[w]=$[v]=$[M]=$[S]=$[T]=$[A]=$[y]=!1;var H=typeof ye=="object"&&ye&&ye.Object===Object&&ye,q=typeof self=="object"&&self&&self.Object===Object&&self,Q=H||q||Function("return this")(),rt=t&&!t.nodeType&&t,lt=rt&&!0&&n&&!n.nodeType&&n,ut=lt&<.exports===rt,St=ut&&H.process,mt=function(){try{return St&&St.binding("util")}catch{}}(),Vt=mt&&mt.isTypedArray;function $t(m,k){for(var N=-1,Y=m?m.length:0;++N<Y;)if(k(m[N],N,m))return!0;return!1}function ne(m){return function(k){return k==null?void 0:k[m]}}function Zt(m,k){for(var N=-1,Y=Array(m);++N<m;)Y[N]=k(N);return Y}function Qt(m){return function(k){return m(k)}}function Dt(m,k){return m==null?void 0:m[k]}function Ot(m){var k=!1;if(m!=null&&typeof m.toString!="function")try{k=!!(m+"")}catch{}return k}function Jt(m){var k=-1,N=Array(m.size);return m.forEach(function(Y,ot){N[++k]=[ot,Y]}),N}function pt(m,k){return function(N){return m(k(N))}}function Ze(m){var k=-1,N=Array(m.size);return m.forEach(function(Y){N[++k]=Y}),N}var be=Array.prototype,Re=Function.prototype,oe=Object.prototype,_e=Q["__core-js_shared__"],Te=function(){var m=/[^.]+$/.exec(_e&&_e.keys&&_e.keys.IE_PROTO||"");return m?"Symbol(src)_1."+m:""}(),ie=Re.toString,ae=oe.hasOwnProperty,zt=oe.toString,Ci=RegExp("^"+ie.call(ae).replace(_t,"\\$&").replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g,"$1.*?")+"$"),En=Q.Symbol,Oi=Q.Uint8Array,si=oe.propertyIsEnumerable,Rs=be.splice,Ls=pt(Object.keys,Object),ri=we(Q,"DataView"),ze=we(Q,"Map"),Is=we(Q,"Promise"),Ns=we(Q,"Set"),Fs=we(Q,"WeakMap"),oi=we(Object,"create"),yl=Ye(ri),Jr=Ye(ze),to=Ye(Is),dn=Ye(Ns),bl=Ye(Fs),Pi=En?En.prototype:void 0,zs=Pi?Pi.valueOf:void 0,eo=Pi?Pi.toString:void 0;function hn(m){var k=-1,N=m?m.length:0;for(this.clear();++k<N;){var Y=m[k];this.set(Y[0],Y[1])}}function Be(){this.__data__=oi?oi(null):{}}function _l(m){return this.has(m)&&delete this.__data__[m]}function xl(m){var k=this.__data__;if(oi){var N=k[m];return N===s?void 0:N}return ae.call(k,m)?k[m]:void 0}function wl(m){var k=this.__data__;return oi?k[m]!==void 0:ae.call(k,m)}function vl(m,k){var N=this.__data__;return N[m]=oi&&k===void 0?s:k,this}hn.prototype.clear=Be,hn.prototype.delete=_l,hn.prototype.get=xl,hn.prototype.has=wl,hn.prototype.set=vl;function He(m){var k=-1,N=m?m.length:0;for(this.clear();++k<N;){var Y=m[k];this.set(Y[0],Y[1])}}function An(){this.__data__=[]}function kl(m){var k=this.__data__,N=Ai(k,m);if(N<0)return!1;var Y=k.length-1;return N==Y?k.pop():Rs.call(k,N,1),!0}function Ml(m){var k=this.__data__,N=Ai(k,m);return N<0?void 0:k[N][1]}function Sl(m){return Ai(this.__data__,m)>-1}function Dl(m,k){var N=this.__data__,Y=Ai(N,m);return Y<0?N.push([m,k]):N[Y][1]=k,this}He.prototype.clear=An,He.prototype.delete=kl,He.prototype.get=Ml,He.prototype.has=Sl,He.prototype.set=Dl;function We(m){var k=-1,N=m?m.length:0;for(this.clear();++k<N;){var Y=m[k];this.set(Y[0],Y[1])}}function Rn(){this.__data__={hash:new hn,map:new(ze||He),string:new hn}}function Tl(m){return Li(this,m).delete(m)}function Cl(m){return Li(this,m).get(m)}function Ol(m){return Li(this,m).has(m)}function Pl(m,k){return Li(this,m).set(m,k),this}We.prototype.clear=Rn,We.prototype.delete=Tl,We.prototype.get=Cl,We.prototype.has=Ol,We.prototype.set=Pl;function Ei(m){var k=-1,N=m?m.length:0;for(this.__data__=new We;++k<N;)this.add(m[k])}function El(m){return this.__data__.set(m,s),this}function no(m){return this.__data__.has(m)}Ei.prototype.add=Ei.prototype.push=El,Ei.prototype.has=no;function xe(m){this.__data__=new He(m)}function Al(){this.__data__=new He}function Bs(m){return this.__data__.delete(m)}function Rl(m){return this.__data__.get(m)}function Ll(m){return this.__data__.has(m)}function Il(m,k){var N=this.__data__;if(N instanceof He){var Y=N.__data__;if(!ze||Y.length<e-1)return Y.push([m,k]),this;N=this.__data__=new We(Y)}return N.set(m,k),this}xe.prototype.clear=Al,xe.prototype.delete=Bs,xe.prototype.get=Rl,xe.prototype.has=Ll,xe.prototype.set=Il;function Nl(m,k){var N=P(m)||x(m)?Zt(m.length,String):[],Y=N.length,ot=!!Y;for(var Z in m)ae.call(m,Z)&&!(ot&&(Z=="length"||uo(Z,Y)))&&N.push(Z);return N}function Ai(m,k){for(var N=m.length;N--;)if(go(m[N][0],k))return N;return-1}var Fl=$l();function Hs(m,k){return m&&Fl(m,k,Fn)}function io(m,k){k=In(k,m)?[k]:oo(k);for(var N=0,Y=k.length;m!=null&&N<Y;)m=m[Ni(k[N++])];return N&&N==Y?m:void 0}function zl(m){return zt.call(m)}function Bl(m,k){return m!=null&&k in Object(m)}function Ws(m,k,N,Y,ot){return m===k?!0:m==null||k==null||!ve(m)&&!qt(k)?m!==m&&k!==k:Hl(m,k,Ws,N,Y,ot)}function Hl(m,k,N,Y,ot,Z){var ft=P(m),Xt=P(k),Bt=u,le=u;ft||(Bt=Qe(m),Bt=Bt==c?M:Bt),Xt||(le=Qe(k),le=le==c?M:le);var ke=Bt==M&&!Ot(m),Me=le==M&&!Ot(k),he=Bt==le;if(he&&!ke)return Z||(Z=new xe),ft||Nn(m)?ao(m,k,N,Y,ot,Z):Ul(m,k,Bt,N,Y,ot,Z);if(!(ot&o)){var Le=ke&&ae.call(m,"__wrapped__"),Ie=Me&&ae.call(k,"__wrapped__");if(Le||Ie){var zn=Le?m.value():m,gn=Ie?k.value():k;return Z||(Z=new xe),N(zn,gn,Y,ot,Z)}}return he?(Z||(Z=new xe),ql(m,k,N,Y,ot,Z)):!1}function Wl(m,k,N,Y){var ot=N.length,Z=ot;if(m==null)return!Z;for(m=Object(m);ot--;){var ft=N[ot];if(ft[2]?ft[1]!==m[ft[0]]:!(ft[0]in m))return!1}for(;++ot<Z;){ft=N[ot];var Xt=ft[0],Bt=m[Xt],le=ft[1];if(ft[2]){if(Bt===void 0&&!(Xt in m))return!1}else{var ke=new xe,Me;if(!(Me===void 0?Ws(le,Bt,Y,r|o,ke):Me))return!1}}return!0}function Yl(m){if(!ve(m)||Xl(m))return!1;var k=Ut(m)||Ot(m)?Ci:W;return k.test(Ye(m))}function so(m){return qt(m)&&te(m.length)&&!!$[zt.call(m)]}function jl(m){return typeof m=="function"?m:m==null?QD:typeof m=="object"?P(m)?Ln(m[0],m[1]):Ri(m):JD(m)}function Vl(m){if(!Gl(m))return Ls(m);var k=[];for(var N in Object(m))ae.call(m,N)&&N!="constructor"&&k.push(N);return k}function Ri(m){var k=lo(m);return k.length==1&&k[0][2]?fo(k[0][0],k[0][1]):function(N){return N===m||Wl(N,m,k)}}function Ln(m,k){return In(m)&&Ys(k)?fo(Ni(m),k):function(N){var Y=mo(N,m);return Y===void 0&&Y===k?yo(N,m):Ws(k,Y,void 0,r|o)}}function ro(m){return function(k){return io(k,m)}}function fn(m){if(typeof m=="string")return m;if(Fi(m))return eo?eo.call(m):"";var k=m+"";return k=="0"&&1/m==-a?"-0":k}function oo(m){return P(m)?m:Ii(m)}function $l(m){return function(k,N,Y){for(var ot=-1,Z=Object(k),ft=Y(k),Xt=ft.length;Xt--;){var Bt=ft[++ot];if(N(Z[Bt],Bt,Z)===!1)break}return k}}function ao(m,k,N,Y,ot,Z){var ft=ot&o,Xt=m.length,Bt=k.length;if(Xt!=Bt&&!(ft&&Bt>Xt))return!1;var le=Z.get(m);if(le&&Z.get(k))return le==k;var ke=-1,Me=!0,he=ot&r?new Ei:void 0;for(Z.set(m,k),Z.set(k,m);++ke<Xt;){var Le=m[ke],Ie=k[ke];if(Y)var zn=ft?Y(Ie,Le,ke,k,m,Z):Y(Le,Ie,ke,m,k,Z);if(zn!==void 0){if(zn)continue;Me=!1;break}if(he){if(!$t(k,function(gn,ai){if(!he.has(ai)&&(Le===gn||N(Le,gn,Y,ot,Z)))return he.add(ai)})){Me=!1;break}}else if(!(Le===Ie||N(Le,Ie,Y,ot,Z))){Me=!1;break}}return Z.delete(m),Z.delete(k),Me}function Ul(m,k,N,Y,ot,Z,ft){switch(N){case C:if(m.byteLength!=k.byteLength||m.byteOffset!=k.byteOffset)return!1;m=m.buffer,k=k.buffer;case _:return!(m.byteLength!=k.byteLength||!Y(new Oi(m),new Oi(k)));case d:case f:case v:return go(+m,+k);case g:return m.name==k.name&&m.message==k.message;case S:case A:return m==k+"";case w:var Xt=Jt;case T:var Bt=Z&o;if(Xt||(Xt=Ze),m.size!=k.size&&!Bt)return!1;var le=ft.get(m);if(le)return le==k;Z|=r,ft.set(m,k);var ke=ao(Xt(m),Xt(k),Y,ot,Z,ft);return ft.delete(m),ke;case R:if(zs)return zs.call(m)==zs.call(k)}return!1}function ql(m,k,N,Y,ot,Z){var ft=ot&o,Xt=Fn(m),Bt=Xt.length,le=Fn(k),ke=le.length;if(Bt!=ke&&!ft)return!1;for(var Me=Bt;Me--;){var he=Xt[Me];if(!(ft?he in k:ae.call(k,he)))return!1}var Le=Z.get(m);if(Le&&Z.get(k))return Le==k;var Ie=!0;Z.set(m,k),Z.set(k,m);for(var zn=ft;++Me<Bt;){he=Xt[Me];var gn=m[he],ai=k[he];if(Y)var ag=ft?Y(ai,gn,he,k,m,Z):Y(gn,ai,he,m,k,Z);if(!(ag===void 0?gn===ai||N(gn,ai,Y,ot,Z):ag)){Ie=!1;break}zn||(zn=he=="constructor")}if(Ie&&!zn){var bo=m.constructor,_o=k.constructor;bo!=_o&&"constructor"in m&&"constructor"in k&&!(typeof bo=="function"&&bo instanceof bo&&typeof _o=="function"&&_o instanceof _o)&&(Ie=!1)}return Z.delete(m),Z.delete(k),Ie}function Li(m,k){var N=m.__data__;return ho(k)?N[typeof k=="string"?"string":"hash"]:N.map}function lo(m){for(var k=Fn(m),N=k.length;N--;){var Y=k[N],ot=m[Y];k[N]=[Y,ot,Ys(ot)]}return k}function we(m,k){var N=Dt(m,k);return Yl(N)?N:void 0}var Qe=zl;(ri&&Qe(new ri(new ArrayBuffer(1)))!=C||ze&&Qe(new ze)!=w||Is&&Qe(Is.resolve())!=D||Ns&&Qe(new Ns)!=T||Fs&&Qe(new Fs)!=y)&&(Qe=function(m){var k=zt.call(m),N=k==M?m.constructor:void 0,Y=N?Ye(N):void 0;if(Y)switch(Y){case yl:return C;case Jr:return w;case to:return D;case dn:return T;case bl:return y}return k});function co(m,k,N){k=In(k,m)?[k]:oo(k);for(var Y,ot=-1,ft=k.length;++ot<ft;){var Z=Ni(k[ot]);if(!(Y=m!=null&&N(m,Z)))break;m=m[Z]}if(Y)return Y;var ft=m?m.length:0;return!!ft&&te(ft)&&uo(Z,ft)&&(P(m)||x(m))}function uo(m,k){return k=k??l,!!k&&(typeof m=="number"||U.test(m))&&m>-1&&m%1==0&&m<k}function In(m,k){if(P(m))return!1;var N=typeof m;return N=="number"||N=="symbol"||N=="boolean"||m==null||Fi(m)?!0:Ct.test(m)||!J.test(m)||k!=null&&m in Object(k)}function ho(m){var k=typeof m;return k=="string"||k=="number"||k=="symbol"||k=="boolean"?m!=="__proto__":m===null}function Xl(m){return!!Te&&Te in m}function Gl(m){var k=m&&m.constructor,N=typeof k=="function"&&k.prototype||oe;return m===N}function Ys(m){return m===m&&!ve(m)}function fo(m,k){return function(N){return N==null?!1:N[m]===k&&(k!==void 0||m in Object(N))}}var Ii=js(function(m){m=po(m);var k=[];return V.test(m)&&k.push(""),m.replace(st,function(N,Y,ot,Z){k.push(ot?Z.replace(gt,"$1"):Y||N)}),k});function Ni(m){if(typeof m=="string"||Fi(m))return m;var k=m+"";return k=="0"&&1/m==-a?"-0":k}function Ye(m){if(m!=null){try{return ie.call(m)}catch{}try{return m+""}catch{}}return""}function js(m,k){if(typeof m!="function"||k&&typeof k!="function")throw new TypeError(i);var N=function(){var Y=arguments,ot=k?k.apply(this,Y):Y[0],Z=N.cache;if(Z.has(ot))return Z.get(ot);var ft=m.apply(this,Y);return N.cache=Z.set(ot,ft),ft};return N.cache=new(js.Cache||We),N}js.Cache=We;function go(m,k){return m===k||m!==m&&k!==k}function x(m){return G(m)&&ae.call(m,"callee")&&(!si.call(m,"callee")||zt.call(m)==c)}var P=Array.isArray;function F(m){return m!=null&&te(m.length)&&!Ut(m)}function G(m){return qt(m)&&F(m)}function Ut(m){var k=ve(m)?zt.call(m):"";return k==p||k==b}function te(m){return typeof m=="number"&&m>-1&&m%1==0&&m<=l}function ve(m){var k=typeof m;return!!m&&(k=="object"||k=="function")}function qt(m){return!!m&&typeof m=="object"}function Fi(m){return typeof m=="symbol"||qt(m)&&zt.call(m)==R}var Nn=Vt?Qt(Vt):so;function po(m){return m==null?"":fn(m)}function mo(m,k,N){var Y=m==null?void 0:io(m,k);return Y===void 0?N:Y}function yo(m,k){return m!=null&&co(m,k,Bl)}function Fn(m){return F(m)?Nl(m):Vl(m)}function zi(m,k){var N={};return k=jl(k),Hs(m,function(Y,ot,Z){N[k(Y,ot,Z)]=Y}),N}function QD(m){return m}function JD(m){return In(m)?ne(Ni(m)):ro(m)}n.exports=zi}(Qr,Qr.exports);var AS=Qr.exports;const RS=Ha(AS);var LS=1/0,IS=9007199254740991,NS="[object Arguments]",FS="[object Function]",zS="[object GeneratorFunction]",BS="[object Symbol]",HS=typeof ye=="object"&&ye&&ye.Object===Object&&ye,WS=typeof self=="object"&&self&&self.Object===Object&&self,YS=HS||WS||Function("return this")();function jS(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 VS(n,t){for(var e=-1,i=n?n.length:0,s=Array(i);++e<i;)s[e]=t(n[e],e,n);return s}function $S(n,t){for(var e=-1,i=t.length,s=n.length;++e<i;)n[s+e]=t[e];return n}var pl=Object.prototype,US=pl.hasOwnProperty,ml=pl.toString,Zf=YS.Symbol,qS=pl.propertyIsEnumerable,Qf=Zf?Zf.isConcatSpreadable:void 0,Jf=Math.max;function XS(n,t,e,i,s){var r=-1,o=n.length;for(e||(e=QS),s||(s=[]);++r<o;){var a=n[r];e(a)?$S(s,a):s[s.length]=a}return s}function GS(n,t){return n=Object(n),KS(n,t,function(e,i){return i in n})}function KS(n,t,e){for(var i=-1,s=t.length,r={};++i<s;){var o=t[i],a=n[o];e(a,o)&&(r[o]=a)}return r}function ZS(n,t){return t=Jf(t===void 0?n.length-1:t,0),function(){for(var e=arguments,i=-1,s=Jf(e.length-t,0),r=Array(s);++i<s;)r[i]=e[t+i];i=-1;for(var o=Array(t+1);++i<t;)o[i]=e[i];return o[t]=r,jS(n,this,o)}}function QS(n){return eD(n)||tD(n)||!!(Qf&&n&&n[Qf])}function JS(n){if(typeof n=="string"||aD(n))return n;var t=n+"";return t=="0"&&1/n==-LS?"-0":t}function tD(n){return iD(n)&&US.call(n,"callee")&&(!qS.call(n,"callee")||ml.call(n)==NS)}var eD=Array.isArray;function nD(n){return n!=null&&rD(n.length)&&!sD(n)}function iD(n){return tg(n)&&nD(n)}function sD(n){var t=oD(n)?ml.call(n):"";return t==FS||t==zS}function rD(n){return typeof n=="number"&&n>-1&&n%1==0&&n<=IS}function oD(n){var t=typeof n;return!!n&&(t=="object"||t=="function")}function tg(n){return!!n&&typeof n=="object"}function aD(n){return typeof n=="symbol"||tg(n)&&ml.call(n)==BS}var lD=ZS(function(n,t){return n==null?{}:GS(n,VS(XS(t),JS))}),cD=lD;const uD=Ha(cD);var eg={exports:{}};(function(n,t){(function(e,i){i()})(ye,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 s(c){var u=new XMLHttpRequest;u.open("HEAD",c,!1);try{u.send()}catch{}return 200<=u.status&&299>=u.status}function r(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 o=typeof window=="object"&&window.window===window?window:typeof self=="object"&&self.self===self?self:typeof ye=="object"&&ye.global===ye?ye:void 0,a=o.navigator&&/Macintosh/.test(navigator.userAgent)&&/AppleWebKit/.test(navigator.userAgent)&&!/Safari/.test(navigator.userAgent),l=o.saveAs||(typeof window!="object"||window!==o?function(){}:"download"in HTMLAnchorElement.prototype&&!a?function(c,u,d){var f=o.URL||o.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?r(g):s(g.href)?i(c,u,d):r(g,g.target="_blank")):(g.href=f.createObjectURL(c),setTimeout(function(){f.revokeObjectURL(g.href)},4e4),setTimeout(function(){r(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(s(c))i(c,u,d);else{var f=document.createElement("a");f.href=c,f.target="_blank",setTimeout(function(){r(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(o.HTMLElement)||o.safari,b=/CriOS\/[\d]+/.test(navigator.userAgent);if((b||g&&p||a)&&typeof FileReader<"u"){var w=new FileReader;w.onloadend=function(){var D=w.result;D=b?D:D.replace(/^data:[^;]*;/,"data:attachment/file;"),f?f.location.href=D:location=D,f=null},w.readAsDataURL(c)}else{var v=o.URL||o.webkitURL,M=v.createObjectURL(c);f?f.location=M:location.href=M,f=null,setTimeout(function(){v.revokeObjectURL(M)},4e4)}});o.saveAs=l.saveAs=l,n.exports=l})})(eg);var dD=eg.exports,ng={exports:{}};/* @license
|
|
29
29
|
Papa Parse
|
|
30
30
|
v5.4.1
|
|
31
31
|
https://github.com/mholt/PapaParse
|
|
@@ -40,4 +40,4 @@ License: MIT
|
|
|
40
40
|
`&&I!=="\r"&&I!==`\r
|
|
41
41
|
`&&(I=`
|
|
42
42
|
`);var B=0,dt=!1;this.parse=function(j,J,Ct){if(typeof j!="string")throw new Error("Input must be a string");var V=j.length,st=C.length,_t=I.length,gt=E.length,W=R(L),U=[],$=[],H=[],q=B=0;if(!j)return ie();if(y.header&&!J){var Q=j.split(I)[0].split(C),rt=[],lt={},ut=!1;for(var St in Q){var mt=Q[St];R(y.transformHeader)&&(mt=y.transformHeader(mt,St));var Vt=mt,$t=lt[mt]||0;for(0<$t&&(ut=!0,Vt=mt+"_"+$t),lt[mt]=$t+1;rt.includes(Vt);)Vt=Vt+"_"+$t;rt.push(Vt)}if(ut){var ne=j.split(I);ne[0]=rt.join(C),j=ne.join(I)}}if(X||X!==!1&&j.indexOf(_)===-1){for(var Zt=j.split(I),Qt=0;Qt<Zt.length;Qt++){if(H=Zt[Qt],B+=H.length,Qt!==Zt.length-1)B+=I.length;else if(Ct)return ie();if(!E||H.substring(0,gt)!==E){if(W){if(U=[],Re(H.split(C)),ae(),dt)return ie()}else Re(H.split(C));if(z&&z<=Qt)return U=U.slice(0,z),ie(!0)}}return ie()}for(var Dt=j.indexOf(C,B),Ot=j.indexOf(I,B),Jt=new RegExp(w(K)+w(_),"g"),pt=j.indexOf(_,B);;)if(j[B]!==_)if(E&&H.length===0&&j.substring(B,B+gt)===E){if(Ot===-1)return ie();B=Ot+_t,Ot=j.indexOf(I,B),Dt=j.indexOf(C,B)}else if(Dt!==-1&&(Dt<Ot||Ot===-1))H.push(j.substring(B,Dt)),B=Dt+st,Dt=j.indexOf(C,B);else{if(Ot===-1)break;if(H.push(j.substring(B,Ot)),Te(Ot+_t),W&&(ae(),dt))return ie();if(z&&U.length>=z)return ie(!0)}else for(pt=B,B++;;){if((pt=j.indexOf(_,pt+1))===-1)return Ct||$.push({type:"Quotes",code:"MissingQuotes",message:"Quoted field unterminated",row:U.length,index:B}),_e();if(pt===V-1)return _e(j.substring(B,pt).replace(Jt,_));if(_!==K||j[pt+1]!==K){if(_===K||pt===0||j[pt-1]!==K){Dt!==-1&&Dt<pt+1&&(Dt=j.indexOf(C,pt+1)),Ot!==-1&&Ot<pt+1&&(Ot=j.indexOf(I,pt+1));var Ze=oe(Ot===-1?Dt:Math.min(Dt,Ot));if(j.substr(pt+1+Ze,st)===C){H.push(j.substring(B,pt).replace(Jt,_)),j[B=pt+1+Ze+st]!==_&&(pt=j.indexOf(_,B)),Dt=j.indexOf(C,B),Ot=j.indexOf(I,B);break}var be=oe(Ot);if(j.substring(pt+1+be,pt+1+be+_t)===I){if(H.push(j.substring(B,pt).replace(Jt,_)),Te(pt+1+be+_t),Dt=j.indexOf(C,B),pt=j.indexOf(_,B),W&&(ae(),dt))return ie();if(z&&U.length>=z)return ie(!0);break}$.push({type:"Quotes",code:"InvalidQuotes",message:"Trailing quote on quoted field is malformed",row:U.length,index:B}),pt++}}else pt++}return _e();function Re(zt){U.push(zt),q=B}function oe(zt){var Ci=0;if(zt!==-1){var En=j.substring(pt+1,zt);En&&En.trim()===""&&(Ci=En.length)}return Ci}function _e(zt){return Ct||(zt===void 0&&(zt=j.substring(B)),H.push(zt),B=V,Re(H),W&&ae()),ie()}function Te(zt){B=zt,Re(H),H=[],Ot=j.indexOf(I,B)}function ie(zt){return{data:U,errors:$,meta:{delimiter:C,linebreak:I,aborted:dt,truncated:!!zt,cursor:q+(J||0)}}}function ae(){L(ie()),U=[],$=[]}},this.abort=function(){dt=!0},this.getCharIndex=function(){return B}}function M(y){var _=y.data,C=o[_.workerId],I=!1;if(_.error)C.userError(_.error,_.file);else if(_.results&&_.results.data){var E={abort:function(){I=!0,D(_.workerId,{data:[],errors:[],meta:{aborted:!0}})},pause:S,resume:S};if(R(C.userStep)){for(var L=0;L<_.results.data.length&&(C.userStep({data:_.results.data[L],errors:_.results.errors,meta:_.results.meta},E),!I);L++);delete _.results}else R(C.userChunk)&&(C.userChunk(_.results,E,_.file),delete _.results)}_.finished&&!I&&D(_.workerId,_.results)}function D(y,_){var C=o[y];R(C.userComplete)&&C.userComplete(_),C.terminate(),delete o[y]}function S(){throw new Error("Not implemented.")}function T(y){if(typeof y!="object"||y===null)return y;var _=Array.isArray(y)?[]:{};for(var C in y)_[C]=T(y[C]);return _}function A(y,_){return function(){y.apply(_,arguments)}}function R(y){return typeof y=="function"}return r&&(i.onmessage=function(y){var _=y.data;if(l.WORKER_ID===void 0&&_&&(l.WORKER_ID=_.workerId),typeof _.input=="string")i.postMessage({workerId:l.WORKER_ID,results:l.parse(_.input,_.config),finished:!0});else if(i.File&&_.input instanceof File||_.input instanceof Object){var C=l.parse(_.input,_.config);C&&i.postMessage({workerId:l.WORKER_ID,results:C,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})})(ng);var hD=ng.exports;const fD=["id"],gD=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,s=h.computed(()=>`export_${new Date().getTime()}`),r=h.computed(()=>{const u=l();return u.length?u:null}),o=()=>{const u=i.labels;if(typeof i.fields!==ii.Object)throw new Error("Labels needs to be a object containing key / value pairs.");return typeof u===ii.Object?d=>RS(d,(f,g)=>u[g]||g):d=>d},a=()=>{const u=i.fields;if(typeof i.fields!==ii.Object&&!Array.isArray(u))throw new Error("Fields needs to be an array of strings.");return Array.isArray(u)?d=>uD(d,u):d=>d},l=()=>{if(typeof i.fields===ii.Undefined&&typeof i.labels===ii.Undefined)return i.data;const u=o(),d=a();return i.data.map(f=>u(d(f)))},c=()=>{if(!(r!=null&&r.value)){console.warn("No data to export");return}e("export-started",r.value);let u=hD.unparse(r.value,Object.assign({delimiter:i.delimiter,encoding:i.encoding}));if(i.separatorExcel&&(u="SEP="+i.delimiter+`\r
|
|
43
|
-
`+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});dD.saveAs(d,i.filename)}};return(u,d)=>(h.openBlock(),h.createElementBlock("div",{id:s.value,"data-testid":"export-csv",onClick:c},[h.renderSlot(u.$slots,"default",{},()=>[h.createTextVNode("Download "+h.toDisplayString(n.filename),1)])],8,fD))}}),pD=h.defineComponent({__name:"DownloadCsv",props:{rows:{},headers:{},filename:{}},setup(n){const t=n,e=h.computed(()=>Object.keys(t.headers));return(i,s)=>(h.openBlock(),h.createElementBlock("div",null,[h.createVNode(gD,{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"])]))}}),mD={class:"kong-ui-public-csv-export-modal"},yD={key:0,class:"selected-range"},bD={key:1,class:"text-muted",tag:"span"},ig=3,sg=h.defineComponent({__name:"CsvExportModal",props:{filename:{},modalDescription:{default:void 0},chartData:{}},emits:["toggleModal"],setup(n,{emit:t}){const{i18n:e}=yt.useI18n(),i=n,s=t,r=`${i.filename.replace(/\s+/g,"-").toLowerCase()}-${new Date().toISOString().slice(0,10)}.csv`,o=h.ref(!0),a=h.computed(()=>{var b,w;return!!((w=(b=i.chartData)==null?void 0:b.data)!=null&&w.length)}),l=h.ref(1),c=h.computed(()=>g.value.rows.length),u=yt.useChartSelectedRange(h.toRef(i,"chartData")),d=h.computed(()=>e.t("csvExport.previewRows",{rowsMax:Math.min(ig,c.value),rowsTotal:c.value,plural:c.value===1?"":"s"})),f=()=>{s("toggleModal",!1)},g=h.computed(()=>{var T,A,R;if(!a.value||!((T=i.chartData)!=null&&T.meta.metric_names))return{headers:[],rows:[],csvHeaders:{}};const b=i.chartData.data.some(y=>y.timestamp!==i.chartData.data[0].timestamp),w=i.chartData.data.map(y=>{const _=new Date(y.timestamp);return{...Object.keys(y.event).reduce((I,E)=>{if(E in i.chartData.meta.display){const L=y.event[E],z=i.chartData.meta.display[E];I[E]=L&&z&&z[L].name||y.event[E]}else I[E]=y.event[E];return I},{}),...b?{timestamp:Ba(_,"yyyy-MM-dd HH:mm:ss"),tzOffset:Ba(_,"XXX")}:{}}});let v=[];b&&(v=[{label:e.t("csvExport.Timestamp"),key:"timestamp"},{label:e.t("csvExport.UtcOffset"),key:"tzOffset"}]);const M="display"in i.chartData.meta&&((A=i.chartData.meta)!=null&&A.display)?(R=i.chartData.meta)==null?void 0:R.display:{},D=[...v,...Object.keys(M).map(y=>({label:e.t(`chartLabels.${y}`),key:y})),...i.chartData.meta.metric_names.map(y=>({label:e.t(`chartLabels.${y}`),key:y}))],S=D.reduce((y,_)=>(y[_.key]=_.label,y),{});return{headers:D,csvHeaders:S,rows:w}}),p=async()=>{const{rows:b}=g.value;return o.value=!1,{total:Number(b.length)||0,data:b.slice(0,ig)}};return h.watch(g,()=>{l.value++}),(b,w)=>{const v=h.resolveComponent("KEmptyState"),M=h.resolveComponent("KTableData"),D=h.resolveComponent("KButton"),S=h.resolveComponent("KModal");return h.openBlock(),h.createElementBlock("div",mD,[h.createVNode(S,{class:"vitals-report","data-testid":"csv-export-modal","show-dismiss-icon":"",title:h.unref(e).t("csvExport.exportPreview"),visible:"",onCancel:f,onKeyup:h.withKeys(f,["esc"])},{default:h.withCtx(()=>{var T;return[h.createElementVNode("div",null,[a.value?(h.openBlock(),h.createElementBlock("div",yD,[h.createElementVNode("p",null,h.toDisplayString(b.modalDescription?b.modalDescription:h.unref(e).t("csvExport.exportDescription")),1),h.createElementVNode("p",null,h.toDisplayString(h.unref(e).t("csvExport.exportTimeRange"))+": "+h.toDisplayString(h.unref(u)),1)])):h.createCommentVNode("",!0),h.createVNode(M,{class:"vitals-table",fetcher:p,"fetcher-cache-key":String(l.value),headers:((T=g.value)==null?void 0:T.headers)||[],"hide-pagination":"","row-hover":!1,sortable:!1},{"empty-state":h.withCtx(()=>[h.createVNode(v,{"action-button-visible":!1},{title:h.withCtx(()=>[h.createElementVNode("h5",null,h.toDisplayString(h.unref(e).t("csvExport.noDataRange")),1)]),default:h.withCtx(()=>[h.createElementVNode("p",null,h.toDisplayString(h.unref(e).t("csvExport.noDataRetry")),1)]),_:1})]),_:1},8,["fetcher-cache-key","headers"]),!o.value&&a.value?(h.openBlock(),h.createElementBlock("div",bD,h.toDisplayString(d.value),1)):h.createCommentVNode("",!0)])]}),"footer-actions":h.withCtx(()=>[h.createVNode(D,{appearance:"tertiary",class:"cancel-btn",onClick:f},{default:h.withCtx(()=>[h.createTextVNode(h.toDisplayString(h.unref(e).t("csvExport.cancelButton")),1)]),_:1}),h.createVNode(pD,{class:"vitals-report-export-button",filename:r,headers:g.value.csvHeaders,rows:g.value.rows},{default:h.withCtx(()=>[h.createVNode(D,{appearance:"primary","data-testid":"csv-download-button",disabled:o.value||!a.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"])])}}}),rg=h.defineComponent({__name:"CsvExportButton",props:{data:{type:Object,required:!0},text:{type:String,required:!1,default:void 0},buttonAppearance:{type:String,required:!1,default:()=>"tertiary"},filenamePrefix:{type:String,required:!1,default:void 0}},setup(n){const t=n,{i18n:e}=yt.useI18n(),i=h.computed(()=>t.filenamePrefix||e.t("csvExport.defaultFilename")),s=h.ref(!1),r=a=>{s.value=a},o=()=>{r(!0)};return(a,l)=>{const c=h.resolveComponent("KButton");return h.openBlock(),h.createElementBlock(h.Fragment,null,[h.createVNode(c,{appearance:n.buttonAppearance,class:"chart-export-button-display","data-testid":"csv-export-button",onClick:h.withModifiers(o,["prevent"])},{default:h.withCtx(()=>[h.createTextVNode(h.toDisplayString(n.text||h.unref(e).t("csvExport.exportButton")),1)]),_:1},8,["appearance"]),s.value?(h.openBlock(),h.createBlock(sg,{key:0,"chart-data":n.data,filename:i.value,onToggleModal:r},null,8,["chart-data","filename"])):h.createCommentVNode("",!0)],64)}}}),_D={class:"analytics-chart-shell"},xD={key:0,class:"chart-header"},wD=["title"],vD={key:1,class:"chart-header-icons-wrapper"},kD={class:"tooltip-content"},MD={key:2,class:"chart-export-button"},SD={key:2,class:"analytics-chart-parent"},DD=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:!1,default:""},emptyStateTitle:{type:String,required:!1,default:""},emptyStateDescription:{type:String,required:!1,default:""},chartTitle:{type:String,required:!1,default:""},filenamePrefix:{type:String,required:!1,default:""},legendPosition:{type:String,required:!1,default:It.Right},syntheticsDataKey:{type:String,required:!1,default:""},showLegendValues:{type:Boolean,required:!1,default:!0},showAnnotations:{type:Boolean,required:!1,default:!0},threshold:{type:Object,required:!1,default:void 0},timeseriesZoom:{type:Boolean,required:!1,default:!1}},emits:["zoom-time-range"],setup(n,{emit:t}){const e=n,i=t,{i18n:s}=yt.useI18n(),{evaluateFeatureFlag:r}=yt.useEvaluateFeatureFlag(),o=r("ma-3043-analytics-chart-kebab-menu",!1),a=h.toRef(e,"chartData"),l=h.computed(()=>v.value?yt.useExploreResultToTimeDataset({fill:e.chartOptions.stacked,colorPalette:e.chartOptions.chartDatasetColors||Rr,threshold:e.chartOptions.threshold||void 0},h.toRef(e,"chartData")).value:yt.useExploreResultToDatasets({fill:e.chartOptions.stacked,colorPalette:e.chartOptions.chartDatasetColors||Rr},h.toRef(e,"chartData")).value),c=h.computed(()=>{var L;return(L=e.chartData)!=null&&L.meta?"start_ms"in e.chartData.meta?e.chartData.meta.end_ms-e.chartData.meta.start_ms:void 0:0}),u=h.computed(()=>{var L;return(L=e.chartData.meta)!=null&&L.metric_units?Object.values(e.chartData.meta.metric_units)[0]:""}),d=h.computed(()=>e.showLegendValues&&e.legendPosition!==It.Bottom),{legendValues:f}=yt.useChartLegendValues(l,e.chartOptions.type,u),g=h.computed(()=>{var L,z,X;return((X=(z=(L=e.chartData)==null?void 0:L.meta)==null?void 0:z.limit)==null?void 0:X.toString())||null}),p=h.computed(()=>{var L,z;return((z=(L=e.chartData)==null?void 0:L.meta)==null?void 0:z.truncated)||!1}),b=s.t("limitedResultsShown",{maxReturned:g.value}),w=h.computed(()=>["vertical_bar","horizontal_bar"].includes(e.chartOptions.type)),v=h.computed(()=>["timeseries_bar","timeseries_line"].some(L=>L===e.chartOptions.type)),M=h.computed(()=>e.chartOptions.type==="donut"),D=h.computed(()=>e.chartOptions.type.includes("vertical")?"vertical":"horizontal"),S=h.computed(()=>{var X,K,B;if(!((X=e.chartData)!=null&&X.meta.metric_names)||!((K=e.chartData)!=null&&K.meta.metric_units))return;const L=e.chartData.meta.metric_names[0],z=e.chartData.meta.metric_units[L];if(e.chartData.meta.metric_names.length>1){if(L.includes("latency"))return s.t("metricAxisTitles.latency_in",{unit:s.t(`chartUnits.${z}`,{plural:"s"})});if(L.includes("size"))return s.t("metricAxisTitles.size_in",{unit:s.t(`chartUnits.${z}`,{plural:"s"})})}return((B=e.chartOptions)==null?void 0:B.metricAxesTitle)||s.te(`metricAxisTitles.${L}`)&&s.te(`chartUnits.${z}`)&&s.t(`metricAxisTitles.${L}`,{unit:s.t(`chartUnits.${z}`,{plural:"s"})})||void 0}),T=h.computed(()=>{const L=v.value?"Time":Object.keys(e.chartData.meta.display||e.chartData.meta.metric_names)[0];return e.chartOptions.dimensionAxesTitle||s.te(`chartLabels.${L}`)&&s.t(`chartLabels.${L}`)||void 0}),A=h.computed(()=>{const L=Ga(Number(e.chartData.meta.granularity_ms));return s.t(`granularityAxisTitles.${L}`)}),R=h.computed(()=>e.emptyStateTitle||s.t("noDataAvailableTitle")),y=h.computed(()=>e.emptyStateDescription||s.t("noDataAvailableDescription")),_=h.computed(()=>v.value?Jx(l.value):e.chartData&&e.chartData.meta&&e.chartData.data.length),C=h.computed(()=>e.chartData.meta.granularity_ms?Ga(e.chartData.meta.granularity_ms)||"hourly":Ga(new Date(e.chartData.data[1].timestamp).getTime()-new Date(e.chartData.data[0].timestamp).getTime())||"hourly"),I=h.computed(()=>e.chartOptions.chartLegendSortFn?e.chartOptions.chartLegendSortFn:(L,z)=>L.text===s.t("chartLabels.____OTHER____")?1:z.text===s.t("chartLabels.____OTHER____")?-1:!isNaN(parseInt(L.text,10))&&!isNaN(parseInt(z.text,10))?L.text<z.text?-1:1:L.value&&z.value?z.value.raw-L.value.raw:0),E=h.computed(()=>e.chartOptions.chartTooltipSortFn?e.chartOptions.chartTooltipSortFn:(L,z)=>L.label===s.t("chartLabels.____OTHER____")?1:z.label===s.t("chartLabels.____OTHER____")?-1:!isNaN(parseInt(L.label,10))&&!isNaN(parseInt(z.label,10))?L.label<z.label?-1:1:L.value&&z.value?z.rawValue-L.rawValue:0);return h.provide("showLegendValues",d),h.provide("legendPosition",h.toRef(e,"legendPosition")),(L,z)=>{const X=h.resolveComponent("KTooltip"),K=h.resolveComponent("KEmptyState");return h.openBlock(),h.createElementBlock("div",_D,[_.value&&p.value&&g.value||!h.unref(o)&&(n.allowCsvExport||e.chartTitle)?(h.openBlock(),h.createElementBlock("div",xD,[n.chartTitle?(h.openBlock(),h.createElementBlock("div",{key:0,class:"chart-title",title:n.chartTitle},h.toDisplayString(n.chartTitle),9,wD)):h.createCommentVNode("",!0),_.value&&p.value&&g.value?(h.openBlock(),h.createElementBlock("div",vD,[h.createVNode(X,{class:"tooltip","max-width":"500",placement:"right"},{content:h.withCtx(()=>[h.createElementVNode("div",kD,h.toDisplayString(h.unref(b)),1)]),default:h.withCtx(()=>[h.createVNode(h.unref(Kl.WarningIcon),{color:`var(--kui-color-text-warning, ${h.unref(ik)})`,size:h.unref(sk)},null,8,["color","size"])]),_:1})])):h.createCommentVNode("",!0),!h.unref(o)&&n.allowCsvExport&&_.value?(h.openBlock(),h.createElementBlock("div",MD,[h.createVNode(rg,{data:a.value,"filename-prefix":n.filenamePrefix},null,8,["data","filename-prefix"])])):h.createCommentVNode("",!0)])):h.createCommentVNode("",!0),_.value?(h.openBlock(),h.createElementBlock("div",SD,[v.value?(h.openBlock(),h.createBlock(CS,{key:0,"chart-data":l.value,"chart-legend-sort-fn":I.value,"chart-tooltip-sort-fn":E.value,"dimension-axes-title":A.value,fill:n.chartOptions.stacked,granularity:C.value,"legend-values":h.unref(f),"metric-axes-title":S.value,"metric-unit":u.value,stacked:n.chartOptions.stacked,"synthetics-data-key":n.syntheticsDataKey,threshold:n.threshold,"time-range-ms":c.value,"tooltip-title":n.tooltipTitle,type:n.chartOptions.type,zoom:n.timeseriesZoom,onZoomTimeRange:z[0]||(z[0]=B=>i("zoom-time-range",B))},null,8,["chart-data","chart-legend-sort-fn","chart-tooltip-sort-fn","dimension-axes-title","fill","granularity","legend-values","metric-axes-title","metric-unit","stacked","synthetics-data-key","threshold","time-range-ms","tooltip-title","type","zoom"])):w.value?(h.openBlock(),h.createBlock(hS,{key:1,annotations:n.showAnnotations,"chart-data":l.value,"chart-legend-sort-fn":I.value,"chart-tooltip-sort-fn":E.value,"data-testid":"bar-chart-container","dimension-axes-title":T.value,"legend-values":h.unref(f),"metric-axes-title":S.value,"metric-unit":u.value,orientation:D.value,stacked:n.chartOptions.stacked,"synthetics-data-key":n.syntheticsDataKey,"tooltip-title":n.tooltipTitle},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"])):M.value?(h.openBlock(),h.createBlock(MS,{key:2,"chart-data":l.value,"dataset-colors":n.chartOptions.chartDatasetColors||h.unref(Rr),"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","legend-position","legend-values","metric-unit","synthetics-data-key","tooltip-title"])):h.createCommentVNode("",!0)])):(h.openBlock(),h.createBlock(K,{key:1,"action-button-visible":!1,class:"chart-empty-state","data-testid":"no-data-in-report"},{title:h.withCtx(()=>[h.createTextVNode(h.toDisplayString(R.value),1)]),default:h.withCtx(()=>[h.createTextVNode(h.toDisplayString(y.value),1)]),_:1}))])}}}),TD=Ke(DD,[["__scopeId","data-v-0361f315"]]),CD={class:"chart-parent","data-testid":"gauge-chart-parent"},OD={class:"chart-totals-flex"},PD={key:1,class:"metric-small","data-testid":"gauge-chart-total"},ED=Ke(h.defineComponent({__name:"GaugeChart",props:{chartData:{type:Object,required:!1,default:null},metricDisplay:{type:String,required:!1,default:"hidden"},numerator:{type:Number,required:!1,default:0},syntheticsDataKey:{type:String,required:!1,default:""},datasetColors:{type:Object,required:!1,default:ln},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}=yt.useI18n(),i=h.ref(Zr()),s=h.computed(()=>[t.chartData.datasets.reduce((p,b)=>(p.labels.push(b.label),p.borderColor.push(b.backgroundColor),p.backgroundColor.push(b.backgroundColor),p.data.push(b.data.reduce((w,v)=>w+v,0)),p),{labels:[],backgroundColor:[],borderColor:[],data:[]})]),r=h.computed(()=>({...t.chartData,datasets:s.value}));yt.useReportChartDataForSynthetics(h.toRef(t,"chartData"),h.toRef(t,"syntheticsDataKey"));const o={responsive:!0,maintainAspectRatio:!0,cutout:"78%",circumference:"200",rotation:"260",plugins:{legend:{display:!1}}},a=h.ref(),l=h.computed(()=>{var g;return ws((g=s==null?void 0:s.value[0])==null?void 0:g.data[t.numerator],{capital:!0})}),c=h.computed(()=>{var g,p;return ws(((g=s==null?void 0:s.value[0])==null?void 0:g.data[0])+((p=s==null?void 0:s.value[0])==null?void 0:p.data[1]),{capital:!0})}),u=h.computed(()=>{var g;return`color: ${(g=s==null?void 0:s.value[0])==null?void 0:g.backgroundColor[t.numerator]}`}),d=h.computed(()=>["full","single"].includes(t.metricDisplay)),f=h.computed(()=>t.metricDisplay==="full");return(g,p)=>(h.openBlock(),h.createElementBlock("div",CD,[h.createElementVNode("div",OD,[d.value?(h.openBlock(),h.createElementBlock("div",{key:0,class:"metric-large","data-testid":"gauge-chart-metric",style:h.normalizeStyle(u.value)},h.toDisplayString(l.value),5)):h.createCommentVNode("",!0),f.value?(h.openBlock(),h.createElementBlock("div",PD,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(Xf),{ref_key:"chartInstance",ref:a,"chart-id":i.value,data:r.value,options:o},null,8,["chart-id","data","options"])],4)]))}}),[["__scopeId","data-v-4f4e5b76"]]),AD={class:"chart-parent","data-testid":"single-value-parent"},RD={key:1,class:"single-value-wrapper"},LD={class:"single-value","data-testid":"single-value-chart"},ID={key:0,class:"single-value-unit"},ND=Ke(h.defineComponent({__name:"SingleValue",props:{data:{type:Object,required:!0},decimalPoints:{type:Number,default:qh}},setup(n){const{i18n:{t}}=yt.useI18n(),e=n,i=h.computed(()=>e.data.data[0]),s=h.computed(()=>{var c,u;return(u=(c=e.data.meta)==null?void 0:c.metric_names)==null?void 0:u[0]}),r=h.computed(()=>{var u,d;const c=s.value?(d=(u=e.data.meta)==null?void 0:u.metric_units)==null?void 0:d[s.value]:void 0;if(c)return t(`chartUnits.${c}`,{plural:""})}),o=h.computed(()=>{var c;return s.value==="request_per_minute"||!!((c=s.value)!=null&&c.includes("_latency_"))}),a=h.computed(()=>!i.value||!s.value||typeof i.value.event[s.value]!="number"?null:i.value.event[s.value]),l=h.computed(()=>{var d;const c=a.value;if(c===null)return"";if((d=s.value)!=null&&d.includes("_size_"))return Sr(c);if(c>=1e9){const f=(c/1e9).toFixed(1);return f.endsWith(".0")?`${Math.floor(c/1e9)}B`:`${f}B`}if(c>=1e7){const f=(c/1e6).toFixed(1);return f.endsWith(".0")?`${Math.floor(c/1e6)}M`:`${f}M`}const u=e.decimalPoints&&typeof e.decimalPoints=="number"?e.decimalPoints:qh;return c.toLocaleString("en-US",{maximumFractionDigits:u})});return h.onMounted(()=>{var c,u;((u=(c=e.data)==null?void 0:c.data)==null?void 0:u.length)>1&&console.warn("SingleValue chart should only be used with a single data point. Data length:",e.data.data.length)}),(c,u)=>{const d=h.resolveComponent("KEmptyState");return h.openBlock(),h.createElementBlock("div",AD,[a.value===null?(h.openBlock(),h.createBlock(d,{key:0,class:"single-value-error","data-testid":"single-value-error","icon-variant":"error",title:h.unref(t)("singleValue.valueError")},null,8,["title"])):(h.openBlock(),h.createElementBlock("div",RD,[h.createElementVNode("span",LD,h.toDisplayString(l.value),1),o.value?(h.openBlock(),h.createElementBlock("span",ID," "+h.toDisplayString(r.value),1)):h.createCommentVNode("",!0)]))])}}}),[["__scopeId","data-v-89691310"]]),FD={class:"simple-chart-shell"},zD={key:1,class:"analytics-chart-parent"},BD=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}=yt.useI18n(),i=h.computed(()=>{var u;const c=yt.useExploreResultToDatasets({colorPalette:t.chartOptions.chartDatasetColors||ln},h.toRef(t,"chartData")).value;return(u=t.chartOptions)!=null&&u.reverseDataset&&(c==null||c.datasets.reverse()),c}),s=h.computed(()=>{var c;return(c=t.chartData.meta)!=null&&c.metric_units?Object.values(t.chartData.meta.metric_units)[0]:""}),r=h.computed(()=>t.chartOptions.type==="gauge"),o=h.computed(()=>t.chartOptions.type==="single_value"),a=h.computed(()=>t.emptyStateTitle||e.t("noDataAvailableTitle")),l=h.computed(()=>{var u,d;const c=t.chartData&&t.chartData.meta&&t.chartData.data.length;if(o.value){const f=(d=(u=t.chartData.meta)==null?void 0:u.metric_names)==null?void 0:d[0];return c&&t.chartData.data[0].event[f]!==null}return c});return(c,u)=>{const d=h.resolveComponent("KEmptyState");return h.openBlock(),h.createElementBlock("div",FD,[l.value?(h.openBlock(),h.createElementBlock("div",zD,[r.value?(h.openBlock(),h.createBlock(ED,{key:0,"chart-data":i.value,"dataset-colors":n.chartOptions.chartDatasetColors,"is-simple":"","metric-display":n.chartOptions.metricDisplay,"metric-unit":s.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),o.value?(h.openBlock(),h.createBlock(ND,{key:1,data:n.chartData,"decimal-points":n.chartOptions.decimalPoints},null,8,["data","decimal-points"])):h.createCommentVNode("",!0)])):(h.openBlock(),h.createBlock(d,{key:0,"action-button-visible":!0,class:"chart-empty-state","data-testid":"no-data-in-report"},{title:h.withCtx(()=>[h.createTextVNode(h.toDisplayString(a.value),1)]),_:1}))])}}}),[["__scopeId","data-v-471652c8"]]),HD={class:"top-n-card-title","data-testid":"top-n-card-title"},WD={class:"top-n-card-description","data-testid":"top-n-card-description"},YD={key:3,class:"top-n-table","data-testid":"top-n-table"},jD={class:"table-headings"},VD={class:"table-row"},$D={class:"column-1"},UD={class:"column-2"},qD={class:"table-body","data-testid":"top-n-data"},XD=["data-testid"],GD={class:"column-1"},KD={class:"column-2"},ZD=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},titleTag:{type:String,default:"h2"}},setup(n){const t=n,{i18n:e}=yt.useI18n(),i=h.computed(()=>t.data.data),s=h.computed(()=>{var p;return!!((p=i.value)!=null&&p.length)}),r=h.computed(()=>{var p,b;return(p=t.data.meta)!=null&&p.display&&((b=Object.keys(t.data.meta.display))==null?void 0:b[0])||""}),o=h.computed(()=>r.value?t.data.meta.display[r.value]:{}),a=h.computed(()=>{var p,b;return(b=(p=t.data.meta)==null?void 0:p.metric_names)!=null&&b.length?t.data.meta.metric_names[0]:""}),l=h.computed(()=>a.value?e.t(`chartLabels.${a.value}`)||a.value:""),c=h.computed(()=>{if(!s.value)return"";if(t.data.meta){if(o.value&&!Object.keys(o.value).length)return e.t("topNTable.errors.display");if(!a.value)return e.t("topNTable.errors.metricNames")}else return e.t("topNTable.errors.meta");return""}),u=p=>{const b=p.event;return String(b[r.value])},d=p=>{const b=u(p),w=o.value&&o.value[b];return w?w.name:"-"},f=p=>{const b=u(p),w=o.value&&o.value[b];return w?!!w.deleted:!1},g=p=>{if(!a.value)return"–";const w=p.event[a.value];return w?ws(w,{capital:!0,round:!0}):"–"};return(p,b)=>{const w=h.resolveComponent("KEmptyState"),v=h.resolveComponent("KSkeleton"),M=h.resolveComponent("KCard");return h.openBlock(),h.createBlock(M,{class:"kong-ui-public-top-n-table","title-tag":n.titleTag},h.createSlots({default:h.withCtx(()=>[c.value?(h.openBlock(),h.createBlock(w,{key:0,"action-button-visible":!1,"data-testid":"top-n-error-state","icon-variant":"error"},{title:h.withCtx(()=>[h.createTextVNode(h.toDisplayString(h.unref(e).t("topNTable.defaultErrorStateTitle")),1)]),default:h.withCtx(()=>[h.createTextVNode(h.toDisplayString(c.value),1)]),_:1})):n.isLoading?(h.openBlock(),h.createBlock(v,{key:1,"table-columns":2,type:"table"})):s.value?(h.openBlock(),h.createElementBlock("div",YD,[h.createElementVNode("div",jD,[h.createElementVNode("div",VD,[h.createElementVNode("div",$D,h.toDisplayString(h.unref(e).t("topNTable.nameLabel")),1),h.createElementVNode("div",UD,h.toDisplayString(l.value),1)])]),h.createElementVNode("div",qD,[(h.openBlock(!0),h.createElementBlock(h.Fragment,null,h.renderList(i.value,(D,S)=>(h.openBlock(),h.createElementBlock("div",{key:`entry-${S}`,class:"table-row","data-testid":`row-${u(D)}`},[h.createElementVNode("div",GD,[h.renderSlot(p.$slots,"name",{record:{id:u(D),name:d(D),deleted:f(D),dimension:r.value}},()=>[h.createTextVNode(h.toDisplayString(d(D)),1)],!0)]),h.createElementVNode("div",KD," "+h.toDisplayString(g(D)),1)],8,XD))),128))])])):(h.openBlock(),h.createBlock(w,{key:2,"action-button-visible":!1,"data-testid":"top-n-empty-state"},{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("span",HD,h.toDisplayString(n.title),1)]),key:"0"}:void 0,n.description?{name:"actions",fn:h.withCtx(()=>[h.createElementVNode("div",WD,h.toDisplayString(n.description),1)]),key:"1"}:void 0]),1032,["title-tag"])}}}),[["__scopeId","data-v-5db48d63"]]);tt.AnalyticsChart=TD,tt.ChartLegendPosition=It,tt.CsvExportButton=rg,tt.CsvExportModal=sg,tt.DECIMAL_DISPLAY=Vd,tt.EMPTY_COLOR=Zd,tt.FONT_SIZE_REGULAR=Ud,tt.FONT_SIZE_SMALL=$d,tt.MAX_LABEL_LENGTH=Er,tt.OTHERS_COLOR=rw,tt.SimpleChart=BD,tt.TopNTable=ZD,tt.ValidType=ii,tt.accessibleGrey=Gd,tt.apiRequestStatusCodeColors=Kd,tt.chartTypes=PS,tt.codesInSpec=eh,tt.darkenColor=Xd,tt.datavisPalette=ln,tt.defaultStatusCodeColors=Rr,tt.determineBaseColor=Ta,tt.errorRateColors=iw,tt.latencyColors=sw,tt.lightGrey=Pa,tt.lookupColor=ow,tt.lookupDatavisColor=Ar,tt.lookupStatusCodeCategoryColor=fw,tt.lookupStatusCodeColor=Ea,tt.numberFormatter=Pr,tt.simpleChartMetricDisplay=OS,tt.simpleChartTypes=ES,tt.statusCodeBadgeBackgroundColor=ew,tt.trafficColors=nw,Object.defineProperty(tt,Symbol.toStringTag,{value:"Module"})});
|
|
43
|
+
`+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});dD.saveAs(d,i.filename)}};return(u,d)=>(h.openBlock(),h.createElementBlock("div",{id:s.value,"data-testid":"export-csv",onClick:c},[h.renderSlot(u.$slots,"default",{},()=>[h.createTextVNode("Download "+h.toDisplayString(n.filename),1)])],8,fD))}}),pD=h.defineComponent({__name:"DownloadCsv",props:{rows:{},headers:{},filename:{}},setup(n){const t=n,e=h.computed(()=>Object.keys(t.headers));return(i,s)=>(h.openBlock(),h.createElementBlock("div",null,[h.createVNode(gD,{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"])]))}}),mD={class:"kong-ui-public-csv-export-modal"},yD={key:0,class:"selected-range"},bD={key:1,class:"text-muted",tag:"span"},ig=3,sg=h.defineComponent({__name:"CsvExportModal",props:{filename:{},modalDescription:{default:void 0},chartData:{}},emits:["toggleModal"],setup(n,{emit:t}){const{i18n:e}=yt.useI18n(),i=n,s=t,r=`${i.filename.replace(/\s+/g,"-").toLowerCase()}-${new Date().toISOString().slice(0,10)}.csv`,o=h.ref(!0),a=h.computed(()=>{var b,w;return!!((w=(b=i.chartData)==null?void 0:b.data)!=null&&w.length)}),l=h.ref(1),c=h.computed(()=>g.value.rows.length),u=yt.useChartSelectedRange(h.toRef(i,"chartData")),d=h.computed(()=>e.t("csvExport.previewRows",{rowsMax:Math.min(ig,c.value),rowsTotal:c.value,plural:c.value===1?"":"s"})),f=()=>{s("toggleModal",!1)},g=h.computed(()=>{var T,A,R;if(!a.value||!((T=i.chartData)!=null&&T.meta.metric_names))return{headers:[],rows:[],csvHeaders:{}};const b=i.chartData.data.some(y=>y.timestamp!==i.chartData.data[0].timestamp),w=i.chartData.data.map(y=>{const _=new Date(y.timestamp);return{...Object.keys(y.event).reduce((I,E)=>{if(E in i.chartData.meta.display){const L=y.event[E],z=i.chartData.meta.display[E];I[E]=L&&z&&z[L].name||y.event[E]}else I[E]=y.event[E];return I},{}),...b?{timestamp:Ba(_,"yyyy-MM-dd HH:mm:ss"),tzOffset:Ba(_,"XXX")}:{}}});let v=[];b&&(v=[{label:e.t("csvExport.Timestamp"),key:"timestamp"},{label:e.t("csvExport.UtcOffset"),key:"tzOffset"}]);const M="display"in i.chartData.meta&&((A=i.chartData.meta)!=null&&A.display)?(R=i.chartData.meta)==null?void 0:R.display:{},D=[...v,...Object.keys(M).map(y=>({label:e.t(`chartLabels.${y}`),key:y})),...i.chartData.meta.metric_names.map(y=>({label:e.t(`chartLabels.${y}`),key:y}))],S=D.reduce((y,_)=>(y[_.key]=_.label,y),{});return{headers:D,csvHeaders:S,rows:w}}),p=async()=>{const{rows:b}=g.value;return o.value=!1,{total:Number(b.length)||0,data:b.slice(0,ig)}};return h.watch(g,()=>{l.value++}),(b,w)=>{const v=h.resolveComponent("KEmptyState"),M=h.resolveComponent("KTableData"),D=h.resolveComponent("KButton"),S=h.resolveComponent("KModal");return h.openBlock(),h.createElementBlock("div",mD,[h.createVNode(S,{class:"vitals-report","data-testid":"csv-export-modal","show-dismiss-icon":"",title:h.unref(e).t("csvExport.exportPreview"),visible:"",onCancel:f,onKeyup:h.withKeys(f,["esc"])},{default:h.withCtx(()=>{var T;return[h.createElementVNode("div",null,[a.value?(h.openBlock(),h.createElementBlock("div",yD,[h.createElementVNode("p",null,h.toDisplayString(b.modalDescription?b.modalDescription:h.unref(e).t("csvExport.exportDescription")),1),h.createElementVNode("p",null,h.toDisplayString(h.unref(e).t("csvExport.exportTimeRange"))+": "+h.toDisplayString(h.unref(u)),1)])):h.createCommentVNode("",!0),h.createVNode(M,{class:"vitals-table",fetcher:p,"fetcher-cache-key":String(l.value),headers:((T=g.value)==null?void 0:T.headers)||[],"hide-pagination":"","row-hover":!1,sortable:!1},{"empty-state":h.withCtx(()=>[h.createVNode(v,{"action-button-visible":!1},{title:h.withCtx(()=>[h.createElementVNode("h5",null,h.toDisplayString(h.unref(e).t("csvExport.noDataRange")),1)]),default:h.withCtx(()=>[h.createElementVNode("p",null,h.toDisplayString(h.unref(e).t("csvExport.noDataRetry")),1)]),_:1})]),_:1},8,["fetcher-cache-key","headers"]),!o.value&&a.value?(h.openBlock(),h.createElementBlock("div",bD,h.toDisplayString(d.value),1)):h.createCommentVNode("",!0)])]}),"footer-actions":h.withCtx(()=>[h.createVNode(D,{appearance:"tertiary",class:"cancel-btn",onClick:f},{default:h.withCtx(()=>[h.createTextVNode(h.toDisplayString(h.unref(e).t("csvExport.cancelButton")),1)]),_:1}),h.createVNode(pD,{class:"vitals-report-export-button",filename:r,headers:g.value.csvHeaders,rows:g.value.rows},{default:h.withCtx(()=>[h.createVNode(D,{appearance:"primary","data-testid":"csv-download-button",disabled:o.value||!a.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"])])}}}),rg=h.defineComponent({__name:"CsvExportButton",props:{data:{type:Object,required:!0},text:{type:String,required:!1,default:void 0},buttonAppearance:{type:String,required:!1,default:()=>"tertiary"},filenamePrefix:{type:String,required:!1,default:void 0}},setup(n){const t=n,{i18n:e}=yt.useI18n(),i=h.computed(()=>t.filenamePrefix||e.t("csvExport.defaultFilename")),s=h.ref(!1),r=a=>{s.value=a},o=()=>{r(!0)};return(a,l)=>{const c=h.resolveComponent("KButton");return h.openBlock(),h.createElementBlock(h.Fragment,null,[h.createVNode(c,{appearance:n.buttonAppearance,class:"chart-export-button-display","data-testid":"csv-export-button",onClick:h.withModifiers(o,["prevent"])},{default:h.withCtx(()=>[h.createTextVNode(h.toDisplayString(n.text||h.unref(e).t("csvExport.exportButton")),1)]),_:1},8,["appearance"]),s.value?(h.openBlock(),h.createBlock(sg,{key:0,"chart-data":n.data,filename:i.value,onToggleModal:r},null,8,["chart-data","filename"])):h.createCommentVNode("",!0)],64)}}}),_D={class:"analytics-chart-shell"},xD={key:0,class:"chart-header"},wD=["title"],vD={key:1,class:"chart-header-icons-wrapper"},kD={class:"tooltip-content"},MD={key:2,class:"chart-export-button"},SD={key:2,class:"analytics-chart-parent"},DD=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:!1,default:""},emptyStateTitle:{type:String,required:!1,default:""},emptyStateDescription:{type:String,required:!1,default:""},chartTitle:{type:String,required:!1,default:""},filenamePrefix:{type:String,required:!1,default:""},legendPosition:{type:String,required:!1,default:It.Right},syntheticsDataKey:{type:String,required:!1,default:""},showLegendValues:{type:Boolean,required:!1,default:!0},showAnnotations:{type:Boolean,required:!1,default:!0},threshold:{type:Object,required:!1,default:void 0},timeseriesZoom:{type:Boolean,required:!1,default:!1}},emits:["zoom-time-range"],setup(n,{emit:t}){const e=n,i=t,{i18n:s}=yt.useI18n(),{evaluateFeatureFlag:r}=yt.useEvaluateFeatureFlag(),o=r("ma-3043-analytics-chart-kebab-menu",!1),a=h.toRef(e,"chartData"),l=h.computed(()=>v.value?yt.useExploreResultToTimeDataset({fill:e.chartOptions.stacked,colorPalette:e.chartOptions.chartDatasetColors||Rr,threshold:e.chartOptions.threshold||void 0},h.toRef(e,"chartData")).value:yt.useExploreResultToDatasets({fill:e.chartOptions.stacked,colorPalette:e.chartOptions.chartDatasetColors||Rr},h.toRef(e,"chartData")).value),c=h.computed(()=>{var L;return(L=e.chartData)!=null&&L.meta?"start_ms"in e.chartData.meta?e.chartData.meta.end_ms-e.chartData.meta.start_ms:void 0:0}),u=h.computed(()=>{var L;return(L=e.chartData.meta)!=null&&L.metric_units?Object.values(e.chartData.meta.metric_units)[0]:""}),d=h.computed(()=>e.showLegendValues&&e.legendPosition!==It.Bottom),{legendValues:f}=yt.useChartLegendValues(l,e.chartOptions.type,u),g=h.computed(()=>{var L,z,X;return((X=(z=(L=e.chartData)==null?void 0:L.meta)==null?void 0:z.limit)==null?void 0:X.toString())||null}),p=h.computed(()=>{var L,z;return((z=(L=e.chartData)==null?void 0:L.meta)==null?void 0:z.truncated)||!1}),b=s.t("limitedResultsShown",{maxReturned:g.value}),w=h.computed(()=>["vertical_bar","horizontal_bar"].includes(e.chartOptions.type)),v=h.computed(()=>["timeseries_bar","timeseries_line"].some(L=>L===e.chartOptions.type)),M=h.computed(()=>e.chartOptions.type==="donut"),D=h.computed(()=>e.chartOptions.type.includes("vertical")?"vertical":"horizontal"),S=h.computed(()=>{var X,K,B;if(!((X=e.chartData)!=null&&X.meta.metric_names)||!((K=e.chartData)!=null&&K.meta.metric_units))return;const L=e.chartData.meta.metric_names[0],z=e.chartData.meta.metric_units[L];if(e.chartData.meta.metric_names.length>1){if(L.includes("latency"))return s.t("metricAxisTitles.latency_in",{unit:s.t(`chartUnits.${z}`,{plural:"s"})});if(L.includes("size"))return s.t("metricAxisTitles.size_in",{unit:s.t(`chartUnits.${z}`,{plural:"s"})})}return((B=e.chartOptions)==null?void 0:B.metricAxesTitle)||s.te(`metricAxisTitles.${L}`)&&s.te(`chartUnits.${z}`)&&s.t(`metricAxisTitles.${L}`,{unit:s.t(`chartUnits.${z}`,{plural:"s"})})||void 0}),T=h.computed(()=>{const L=v.value?"Time":Object.keys(e.chartData.meta.display||e.chartData.meta.metric_names)[0];return e.chartOptions.dimensionAxesTitle||s.te(`chartLabels.${L}`)&&s.t(`chartLabels.${L}`)||void 0}),A=h.computed(()=>{const L=Ga(Number(e.chartData.meta.granularity_ms));return s.t(`granularityAxisTitles.${L}`)}),R=h.computed(()=>e.emptyStateTitle||s.t("noDataAvailableTitle")),y=h.computed(()=>e.emptyStateDescription||s.t("noDataAvailableDescription")),_=h.computed(()=>v.value?Jx(l.value):e.chartData&&e.chartData.meta&&e.chartData.data.length),C=h.computed(()=>e.chartData.meta.granularity_ms?Ga(e.chartData.meta.granularity_ms)||"hourly":Ga(new Date(e.chartData.data[1].timestamp).getTime()-new Date(e.chartData.data[0].timestamp).getTime())||"hourly"),I=h.computed(()=>e.chartOptions.chartLegendSortFn?e.chartOptions.chartLegendSortFn:(L,z)=>L.text===s.t("chartLabels.____OTHER____")?1:z.text===s.t("chartLabels.____OTHER____")?-1:!isNaN(parseInt(L.text,10))&&!isNaN(parseInt(z.text,10))?L.text<z.text?-1:1:L.value&&z.value?z.value.raw-L.value.raw:0),E=h.computed(()=>e.chartOptions.chartTooltipSortFn?e.chartOptions.chartTooltipSortFn:(L,z)=>L.label===s.t("chartLabels.____OTHER____")?1:z.label===s.t("chartLabels.____OTHER____")?-1:!isNaN(parseInt(L.label,10))&&!isNaN(parseInt(z.label,10))?L.label<z.label?-1:1:L.value&&z.value?z.rawValue-L.rawValue:0);return h.provide("showLegendValues",d),h.provide("legendPosition",h.toRef(e,"legendPosition")),(L,z)=>{const X=h.resolveComponent("KTooltip"),K=h.resolveComponent("KEmptyState");return h.openBlock(),h.createElementBlock("div",_D,[_.value&&p.value&&g.value||!h.unref(o)&&(n.allowCsvExport||e.chartTitle)?(h.openBlock(),h.createElementBlock("div",xD,[n.chartTitle?(h.openBlock(),h.createElementBlock("div",{key:0,class:"chart-title",title:n.chartTitle},h.toDisplayString(n.chartTitle),9,wD)):h.createCommentVNode("",!0),_.value&&p.value&&g.value?(h.openBlock(),h.createElementBlock("div",vD,[h.createVNode(X,{class:"tooltip","max-width":"500",placement:"right"},{content:h.withCtx(()=>[h.createElementVNode("div",kD,h.toDisplayString(h.unref(b)),1)]),default:h.withCtx(()=>[h.createVNode(h.unref(Kl.WarningIcon),{color:`var(--kui-color-text-warning, ${h.unref(ik)})`,size:h.unref(sk)},null,8,["color","size"])]),_:1})])):h.createCommentVNode("",!0),!h.unref(o)&&n.allowCsvExport&&_.value?(h.openBlock(),h.createElementBlock("div",MD,[h.createVNode(rg,{data:a.value,"filename-prefix":n.filenamePrefix},null,8,["data","filename-prefix"])])):h.createCommentVNode("",!0)])):h.createCommentVNode("",!0),_.value?(h.openBlock(),h.createElementBlock("div",SD,[v.value?(h.openBlock(),h.createBlock(CS,{key:0,"chart-data":l.value,"chart-legend-sort-fn":I.value,"chart-tooltip-sort-fn":E.value,"dimension-axes-title":A.value,fill:n.chartOptions.stacked,granularity:C.value,"legend-values":h.unref(f),"metric-axes-title":S.value,"metric-unit":u.value,stacked:n.chartOptions.stacked,"synthetics-data-key":n.syntheticsDataKey,threshold:n.threshold,"time-range-ms":c.value,"tooltip-title":n.tooltipTitle,type:n.chartOptions.type,zoom:n.timeseriesZoom,onZoomTimeRange:z[0]||(z[0]=B=>i("zoom-time-range",B))},null,8,["chart-data","chart-legend-sort-fn","chart-tooltip-sort-fn","dimension-axes-title","fill","granularity","legend-values","metric-axes-title","metric-unit","stacked","synthetics-data-key","threshold","time-range-ms","tooltip-title","type","zoom"])):w.value?(h.openBlock(),h.createBlock(hS,{key:1,annotations:n.showAnnotations,"chart-data":l.value,"chart-legend-sort-fn":I.value,"chart-tooltip-sort-fn":E.value,"data-testid":"bar-chart-container","dimension-axes-title":T.value,"legend-values":h.unref(f),"metric-axes-title":S.value,"metric-unit":u.value,orientation:D.value,stacked:n.chartOptions.stacked,"synthetics-data-key":n.syntheticsDataKey,"tooltip-title":n.tooltipTitle},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"])):M.value?(h.openBlock(),h.createBlock(MS,{key:2,"chart-data":l.value,"dataset-colors":n.chartOptions.chartDatasetColors||h.unref(Rr),"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","legend-position","legend-values","metric-unit","synthetics-data-key","tooltip-title"])):h.createCommentVNode("",!0)])):(h.openBlock(),h.createBlock(K,{key:1,"action-button-visible":!1,class:"chart-empty-state","data-testid":"no-data-in-report"},{title:h.withCtx(()=>[h.createTextVNode(h.toDisplayString(R.value),1)]),default:h.withCtx(()=>[h.createTextVNode(h.toDisplayString(y.value),1)]),_:1}))])}}}),TD=Ke(DD,[["__scopeId","data-v-9741fa86"]]),CD={class:"chart-parent","data-testid":"gauge-chart-parent"},OD={class:"chart-totals-flex"},PD={key:1,class:"metric-small","data-testid":"gauge-chart-total"},ED=Ke(h.defineComponent({__name:"GaugeChart",props:{chartData:{type:Object,required:!1,default:null},metricDisplay:{type:String,required:!1,default:"hidden"},numerator:{type:Number,required:!1,default:0},syntheticsDataKey:{type:String,required:!1,default:""},datasetColors:{type:Object,required:!1,default:ln},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}=yt.useI18n(),i=h.ref(Zr()),s=h.computed(()=>[t.chartData.datasets.reduce((p,b)=>(p.labels.push(b.label),p.borderColor.push(b.backgroundColor),p.backgroundColor.push(b.backgroundColor),p.data.push(b.data.reduce((w,v)=>w+v,0)),p),{labels:[],backgroundColor:[],borderColor:[],data:[]})]),r=h.computed(()=>({...t.chartData,datasets:s.value}));yt.useReportChartDataForSynthetics(h.toRef(t,"chartData"),h.toRef(t,"syntheticsDataKey"));const o={responsive:!0,maintainAspectRatio:!0,cutout:"78%",circumference:"200",rotation:"260",plugins:{legend:{display:!1}}},a=h.ref(),l=h.computed(()=>{var g;return ws((g=s==null?void 0:s.value[0])==null?void 0:g.data[t.numerator],{capital:!0})}),c=h.computed(()=>{var g,p;return ws(((g=s==null?void 0:s.value[0])==null?void 0:g.data[0])+((p=s==null?void 0:s.value[0])==null?void 0:p.data[1]),{capital:!0})}),u=h.computed(()=>{var g;return`color: ${(g=s==null?void 0:s.value[0])==null?void 0:g.backgroundColor[t.numerator]}`}),d=h.computed(()=>["full","single"].includes(t.metricDisplay)),f=h.computed(()=>t.metricDisplay==="full");return(g,p)=>(h.openBlock(),h.createElementBlock("div",CD,[h.createElementVNode("div",OD,[d.value?(h.openBlock(),h.createElementBlock("div",{key:0,class:"metric-large","data-testid":"gauge-chart-metric",style:h.normalizeStyle(u.value)},h.toDisplayString(l.value),5)):h.createCommentVNode("",!0),f.value?(h.openBlock(),h.createElementBlock("div",PD,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(Xf),{ref_key:"chartInstance",ref:a,"chart-id":i.value,data:r.value,options:o},null,8,["chart-id","data","options"])],4)]))}}),[["__scopeId","data-v-4f4e5b76"]]),AD={class:"chart-parent","data-testid":"single-value-parent"},RD={key:1,class:"single-value-wrapper"},LD={class:"single-value","data-testid":"single-value-chart"},ID={key:0,class:"single-value-unit"},ND=Ke(h.defineComponent({__name:"SingleValue",props:{data:{type:Object,required:!0},decimalPoints:{type:Number,default:qh}},setup(n){const{i18n:{t}}=yt.useI18n(),e=n,i=h.computed(()=>e.data.data[0]),s=h.computed(()=>{var c,u;return(u=(c=e.data.meta)==null?void 0:c.metric_names)==null?void 0:u[0]}),r=h.computed(()=>{var u,d;const c=s.value?(d=(u=e.data.meta)==null?void 0:u.metric_units)==null?void 0:d[s.value]:void 0;if(c)return t(`chartUnits.${c}`,{plural:""})}),o=h.computed(()=>{var c;return s.value==="request_per_minute"||!!((c=s.value)!=null&&c.includes("_latency_"))}),a=h.computed(()=>!i.value||!s.value||typeof i.value.event[s.value]!="number"?null:i.value.event[s.value]),l=h.computed(()=>{var d;const c=a.value;if(c===null)return"";if((d=s.value)!=null&&d.includes("_size_"))return Sr(c);if(c>=1e9){const f=(c/1e9).toFixed(1);return f.endsWith(".0")?`${Math.floor(c/1e9)}B`:`${f}B`}if(c>=1e7){const f=(c/1e6).toFixed(1);return f.endsWith(".0")?`${Math.floor(c/1e6)}M`:`${f}M`}const u=e.decimalPoints&&typeof e.decimalPoints=="number"?e.decimalPoints:qh;return c.toLocaleString("en-US",{maximumFractionDigits:u})});return h.onMounted(()=>{var c,u;((u=(c=e.data)==null?void 0:c.data)==null?void 0:u.length)>1&&console.warn("SingleValue chart should only be used with a single data point. Data length:",e.data.data.length)}),(c,u)=>{const d=h.resolveComponent("KEmptyState");return h.openBlock(),h.createElementBlock("div",AD,[a.value===null?(h.openBlock(),h.createBlock(d,{key:0,class:"single-value-error","data-testid":"single-value-error","icon-variant":"error",title:h.unref(t)("singleValue.valueError")},null,8,["title"])):(h.openBlock(),h.createElementBlock("div",RD,[h.createElementVNode("span",LD,h.toDisplayString(l.value),1),o.value?(h.openBlock(),h.createElementBlock("span",ID," "+h.toDisplayString(r.value),1)):h.createCommentVNode("",!0)]))])}}}),[["__scopeId","data-v-89691310"]]),FD={class:"simple-chart-shell"},zD={key:1,class:"analytics-chart-parent"},BD=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}=yt.useI18n(),i=h.computed(()=>{var u;const c=yt.useExploreResultToDatasets({colorPalette:t.chartOptions.chartDatasetColors||ln},h.toRef(t,"chartData")).value;return(u=t.chartOptions)!=null&&u.reverseDataset&&(c==null||c.datasets.reverse()),c}),s=h.computed(()=>{var c;return(c=t.chartData.meta)!=null&&c.metric_units?Object.values(t.chartData.meta.metric_units)[0]:""}),r=h.computed(()=>t.chartOptions.type==="gauge"),o=h.computed(()=>t.chartOptions.type==="single_value"),a=h.computed(()=>t.emptyStateTitle||e.t("noDataAvailableTitle")),l=h.computed(()=>{var u,d;const c=t.chartData&&t.chartData.meta&&t.chartData.data.length;if(o.value){const f=(d=(u=t.chartData.meta)==null?void 0:u.metric_names)==null?void 0:d[0];return c&&t.chartData.data[0].event[f]!==null}return c});return(c,u)=>{const d=h.resolveComponent("KEmptyState");return h.openBlock(),h.createElementBlock("div",FD,[l.value?(h.openBlock(),h.createElementBlock("div",zD,[r.value?(h.openBlock(),h.createBlock(ED,{key:0,"chart-data":i.value,"dataset-colors":n.chartOptions.chartDatasetColors,"is-simple":"","metric-display":n.chartOptions.metricDisplay,"metric-unit":s.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),o.value?(h.openBlock(),h.createBlock(ND,{key:1,data:n.chartData,"decimal-points":n.chartOptions.decimalPoints},null,8,["data","decimal-points"])):h.createCommentVNode("",!0)])):(h.openBlock(),h.createBlock(d,{key:0,"action-button-visible":!0,class:"chart-empty-state","data-testid":"no-data-in-report"},{title:h.withCtx(()=>[h.createTextVNode(h.toDisplayString(a.value),1)]),_:1}))])}}}),[["__scopeId","data-v-471652c8"]]),HD={class:"top-n-card-title","data-testid":"top-n-card-title"},WD={class:"top-n-card-description","data-testid":"top-n-card-description"},YD={key:3,class:"top-n-table","data-testid":"top-n-table"},jD={class:"table-headings"},VD={class:"table-row"},$D={class:"column-1"},UD={class:"column-2"},qD={class:"table-body","data-testid":"top-n-data"},XD=["data-testid"],GD={class:"column-1"},KD={class:"column-2"},ZD=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},titleTag:{type:String,default:"h2"}},setup(n){const t=n,{i18n:e}=yt.useI18n(),i=h.computed(()=>t.data.data),s=h.computed(()=>{var p;return!!((p=i.value)!=null&&p.length)}),r=h.computed(()=>{var p,b;return(p=t.data.meta)!=null&&p.display&&((b=Object.keys(t.data.meta.display))==null?void 0:b[0])||""}),o=h.computed(()=>r.value?t.data.meta.display[r.value]:{}),a=h.computed(()=>{var p,b;return(b=(p=t.data.meta)==null?void 0:p.metric_names)!=null&&b.length?t.data.meta.metric_names[0]:""}),l=h.computed(()=>a.value?e.t(`chartLabels.${a.value}`)||a.value:""),c=h.computed(()=>{if(!s.value)return"";if(t.data.meta){if(o.value&&!Object.keys(o.value).length)return e.t("topNTable.errors.display");if(!a.value)return e.t("topNTable.errors.metricNames")}else return e.t("topNTable.errors.meta");return""}),u=p=>{const b=p.event;return String(b[r.value])},d=p=>{const b=u(p),w=o.value&&o.value[b];return w?w.name:"-"},f=p=>{const b=u(p),w=o.value&&o.value[b];return w?!!w.deleted:!1},g=p=>{if(!a.value)return"–";const w=p.event[a.value];return w?ws(w,{capital:!0,round:!0}):"–"};return(p,b)=>{const w=h.resolveComponent("KEmptyState"),v=h.resolveComponent("KSkeleton"),M=h.resolveComponent("KCard");return h.openBlock(),h.createBlock(M,{class:"kong-ui-public-top-n-table","title-tag":n.titleTag},h.createSlots({default:h.withCtx(()=>[c.value?(h.openBlock(),h.createBlock(w,{key:0,"action-button-visible":!1,"data-testid":"top-n-error-state","icon-variant":"error"},{title:h.withCtx(()=>[h.createTextVNode(h.toDisplayString(h.unref(e).t("topNTable.defaultErrorStateTitle")),1)]),default:h.withCtx(()=>[h.createTextVNode(h.toDisplayString(c.value),1)]),_:1})):n.isLoading?(h.openBlock(),h.createBlock(v,{key:1,"table-columns":2,type:"table"})):s.value?(h.openBlock(),h.createElementBlock("div",YD,[h.createElementVNode("div",jD,[h.createElementVNode("div",VD,[h.createElementVNode("div",$D,h.toDisplayString(h.unref(e).t("topNTable.nameLabel")),1),h.createElementVNode("div",UD,h.toDisplayString(l.value),1)])]),h.createElementVNode("div",qD,[(h.openBlock(!0),h.createElementBlock(h.Fragment,null,h.renderList(i.value,(D,S)=>(h.openBlock(),h.createElementBlock("div",{key:`entry-${S}`,class:"table-row","data-testid":`row-${u(D)}`},[h.createElementVNode("div",GD,[h.renderSlot(p.$slots,"name",{record:{id:u(D),name:d(D),deleted:f(D),dimension:r.value}},()=>[h.createTextVNode(h.toDisplayString(d(D)),1)],!0)]),h.createElementVNode("div",KD," "+h.toDisplayString(g(D)),1)],8,XD))),128))])])):(h.openBlock(),h.createBlock(w,{key:2,"action-button-visible":!1,"data-testid":"top-n-empty-state"},{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("span",HD,h.toDisplayString(n.title),1)]),key:"0"}:void 0,n.description?{name:"actions",fn:h.withCtx(()=>[h.createElementVNode("div",WD,h.toDisplayString(n.description),1)]),key:"1"}:void 0]),1032,["title-tag"])}}}),[["__scopeId","data-v-5db48d63"]]);tt.AnalyticsChart=TD,tt.ChartLegendPosition=It,tt.CsvExportButton=rg,tt.CsvExportModal=sg,tt.DECIMAL_DISPLAY=Vd,tt.EMPTY_COLOR=Zd,tt.FONT_SIZE_REGULAR=Ud,tt.FONT_SIZE_SMALL=$d,tt.MAX_LABEL_LENGTH=Er,tt.OTHERS_COLOR=rw,tt.SimpleChart=BD,tt.TopNTable=ZD,tt.ValidType=ii,tt.accessibleGrey=Gd,tt.apiRequestStatusCodeColors=Kd,tt.chartTypes=PS,tt.codesInSpec=eh,tt.darkenColor=Xd,tt.datavisPalette=ln,tt.defaultStatusCodeColors=Rr,tt.determineBaseColor=Ta,tt.errorRateColors=iw,tt.latencyColors=sw,tt.lightGrey=Pa,tt.lookupColor=ow,tt.lookupDatavisColor=Ar,tt.lookupStatusCodeCategoryColor=fw,tt.lookupStatusCodeColor=Ea,tt.numberFormatter=Pr,tt.simpleChartMetricDisplay=OS,tt.simpleChartTypes=ES,tt.statusCodeBadgeBackgroundColor=ew,tt.trafficColors=nw,Object.defineProperty(tt,Symbol.toStringTag,{value:"Module"})});
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@kong-ui-public/analytics-chart",
|
|
3
|
-
"version": "8.1.
|
|
3
|
+
"version": "8.1.10",
|
|
4
4
|
"type": "module",
|
|
5
5
|
"main": "./dist/vitals-chart.umd.js",
|
|
6
6
|
"module": "./dist/vitals-chart.es.js",
|
|
@@ -65,7 +65,7 @@
|
|
|
65
65
|
"pretty-bytes": "^6.1.1",
|
|
66
66
|
"uuid": "^10.0.0",
|
|
67
67
|
"vue-chartjs": "^5.3.1",
|
|
68
|
-
"@kong-ui-public/analytics-utilities": "^9.3.
|
|
68
|
+
"@kong-ui-public/analytics-utilities": "^9.3.3"
|
|
69
69
|
},
|
|
70
70
|
"distSizeChecker": {
|
|
71
71
|
"warningLimit": "1.35MB",
|