From c8e23eefba2d4a3a21812ee020e1d02f7204e229 Mon Sep 17 00:00:00 2001 From: Aliaksandr Valialkin Date: Fri, 27 Sep 2024 13:25:50 +0200 Subject: [PATCH 01/31] app/{vmselect,vlselect}: run `make vmui-update vmui-logs-update` after 25a9802ca4d3f9bc5b65343544e34b9987a46208 and 8657d03433154f2805be41048dba4caf13c64f8f Updates https://github.com/VictoriaMetrics/VictoriaMetrics/pull/7088 Updates https://github.com/VictoriaMetrics/VictoriaMetrics/issues/5924 Updates https://github.com/VictoriaMetrics/VictoriaMetrics/pull/7025 Updates https://github.com/VictoriaMetrics/VictoriaMetrics/issues/6545#issuecomment-2336805237 --- app/vlselect/vmui/asset-manifest.json | 8 ++++---- app/vlselect/vmui/index.html | 2 +- app/vlselect/vmui/static/css/main.c9cc37dd.css | 1 - app/vlselect/vmui/static/css/main.cbbca000.css | 1 + app/vlselect/vmui/static/js/main.3d2eb957.js | 2 ++ ...7f457f.js.LICENSE.txt => main.3d2eb957.js.LICENSE.txt} | 0 app/vlselect/vmui/static/js/main.867f457f.js | 2 -- app/vmselect/vmui/asset-manifest.json | 8 ++++---- app/vmselect/vmui/index.html | 2 +- .../static/css/{main.81c6ec3a.css => main.d871147a.css} | 2 +- app/vmselect/vmui/static/js/main.0e69b7a9.js | 2 -- app/vmselect/vmui/static/js/main.621c4b4d.js | 2 ++ ...69b7a9.js.LICENSE.txt => main.621c4b4d.js.LICENSE.txt} | 0 13 files changed, 16 insertions(+), 16 deletions(-) delete mode 100644 app/vlselect/vmui/static/css/main.c9cc37dd.css create mode 100644 app/vlselect/vmui/static/css/main.cbbca000.css create mode 100644 app/vlselect/vmui/static/js/main.3d2eb957.js rename app/vlselect/vmui/static/js/{main.867f457f.js.LICENSE.txt => main.3d2eb957.js.LICENSE.txt} (100%) delete mode 100644 app/vlselect/vmui/static/js/main.867f457f.js rename app/vmselect/vmui/static/css/{main.81c6ec3a.css => main.d871147a.css} (52%) delete mode 100644 app/vmselect/vmui/static/js/main.0e69b7a9.js create mode 100644 app/vmselect/vmui/static/js/main.621c4b4d.js rename app/vmselect/vmui/static/js/{main.0e69b7a9.js.LICENSE.txt => main.621c4b4d.js.LICENSE.txt} (100%) diff --git a/app/vlselect/vmui/asset-manifest.json b/app/vlselect/vmui/asset-manifest.json index 089f1f01e..70b897d17 100644 --- a/app/vlselect/vmui/asset-manifest.json +++ b/app/vlselect/vmui/asset-manifest.json @@ -1,13 +1,13 @@ { "files": { - "main.css": "./static/css/main.c9cc37dd.css", - "main.js": "./static/js/main.867f457f.js", + "main.css": "./static/css/main.cbbca000.css", + "main.js": "./static/js/main.3d2eb957.js", "static/js/685.f772060c.chunk.js": "./static/js/685.f772060c.chunk.js", "static/media/MetricsQL.md": "./static/media/MetricsQL.a00044c91d9781cf8557.md", "index.html": "./index.html" }, "entrypoints": [ - "static/css/main.c9cc37dd.css", - "static/js/main.867f457f.js" + "static/css/main.cbbca000.css", + "static/js/main.3d2eb957.js" ] } \ No newline at end of file diff --git a/app/vlselect/vmui/index.html b/app/vlselect/vmui/index.html index d8e2f0e50..6e0a3aa75 100644 --- a/app/vlselect/vmui/index.html +++ b/app/vlselect/vmui/index.html @@ -1 +1 @@ -UI for VictoriaLogs
\ No newline at end of file +UI for VictoriaLogs
\ No newline at end of file diff --git a/app/vlselect/vmui/static/css/main.c9cc37dd.css b/app/vlselect/vmui/static/css/main.c9cc37dd.css deleted file mode 100644 index 5d7d39ac3..000000000 --- a/app/vlselect/vmui/static/css/main.c9cc37dd.css +++ /dev/null @@ -1 +0,0 @@ -.vm-tabs{gap:12px;height:100%;position:relative;-webkit-user-select:none;user-select:none}.vm-tabs,.vm-tabs-item{align-items:center;display:flex;justify-content:center}.vm-tabs-item{color:inherit;cursor:pointer;font-size:inherit;font-weight:inherit;opacity:.6;padding:12px 8px;text-decoration:none;text-transform:capitalize;transition:opacity .2s}.vm-tabs-item_active{opacity:1}.vm-tabs-item:hover{opacity:.8}.vm-tabs-item__icon{display:grid;margin-right:8px;width:16px}.vm-tabs-item__icon_single{margin-right:0}.vm-tabs__indicator{border-bottom:2px solid;position:absolute;transition:width .2s ease,left .3s cubic-bezier(.28,.84,.42,1)}.vm-alert{grid-gap:8px;align-items:center;background-color:var(--color-background-block);border-radius:8px;box-shadow:var(--box-shadow);color:var(--color-text);display:grid;font-size:14px;font-weight:400;gap:8px;grid-template-columns:20px 1fr;line-height:1.5;padding:12px;position:relative}.vm-alert_mobile{align-items:flex-start;border-radius:0}.vm-alert:after{border-radius:8px;content:"";height:100%;left:0;opacity:.1;position:absolute;top:0;width:100%;z-index:1}.vm-alert_mobile:after{border-radius:0}.vm-alert__content,.vm-alert__icon{position:relative;z-index:2}.vm-alert__icon{align-items:center;display:flex;justify-content:center}.vm-alert__content{filter:brightness(.6);white-space:pre-line}.vm-alert_success{color:var(--color-success)}.vm-alert_success:after{background-color:var(--color-success)}.vm-alert_error{color:var(--color-error)}.vm-alert_error:after{background-color:var(--color-error)}.vm-alert_info{color:var(--color-info)}.vm-alert_info:after{background-color:var(--color-info)}.vm-alert_warning{color:var(--color-warning)}.vm-alert_warning:after{background-color:var(--color-warning)}.vm-alert_dark:after{opacity:.1}.vm-alert_dark .vm-alert__content{filter:none}.vm-json-view__copy{display:flex;justify-content:flex-end;position:-webkit-sticky;position:sticky;top:0;z-index:2}.vm-json-view__code{font-size:14px;line-height:1.4;transform:translateY(-32px);white-space:pre-wrap}.vm-explore-logs-body-header,.vm-explore-logs-body-header_mobile{margin:-12px -12px 0}.vm-explore-logs-body-header__settings{align-items:center;display:flex;gap:8px}.vm-explore-logs-body-header__log-info{color:var(--color-text-secondary);flex-grow:1;padding-right:12px;text-align:right}.vm-explore-logs-body__empty{align-items:center;color:var(--color-text-disabled);display:flex;justify-content:center;min-height:120px;text-align:center}.vm-explore-logs-body__table{overflow:auto;padding-top:12px;width:calc(100vw - 48px - var(--scrollbar-width))}@media(max-width:768px){.vm-explore-logs-body__table{width:calc(100vw - 24px - var(--scrollbar-width))}}.vm-explore-logs-body__table_mobile{width:calc(100vw - 24px - var(--scrollbar-width))}.vm-explore-logs-body__table .vm-table{min-width:700px}.vm-popper{background-color:var(--color-background-block);border-radius:4px;box-shadow:var(--box-shadow-popper);opacity:0;pointer-events:none;position:fixed;transition:opacity .1s ease-in-out;z-index:-99}.vm-popper_open{animation:vm-slider .15s cubic-bezier(.28,.84,.42,1.1);opacity:1;pointer-events:auto;transform-origin:top center;z-index:101}.vm-popper_mobile{animation:none;border-radius:0;bottom:0;left:0;overflow:auto;position:fixed;right:0;top:0;width:100%}.vm-popper-header{grid-gap:12px;align-items:center;background-color:var(--color-background-block);border-bottom:var(--border-divider);border-radius:4px 4px 0 0;color:var(--color-text);display:grid;gap:12px;grid-template-columns:1fr 25px;justify-content:space-between;margin-bottom:12px;padding:8px 12px}.vm-popper-header__title{font-size:12px;font-weight:700;-webkit-user-select:none;user-select:none}.vm-popper_dark{background-color:var(--color-background-tooltip);color:#fff}.vm-popper_dark .vm-popper-header{background-color:#0000;color:#fff}@keyframes vm-slider{0%{transform:scaleY(0)}to{transform:scaleY(1)}}.vm-table-settings-popper{display:grid;min-width:250px}.vm-table-settings-popper_mobile .vm-table-settings-popper-list{gap:12px}.vm-table-settings-popper_mobile .vm-table-settings-popper-list:first-child{padding-top:0}.vm-table-settings-popper-list{grid-gap:12px;border-bottom:var(--border-divider);display:grid;gap:12px;max-width:250px;padding:12px}.vm-table-settings-popper-list_first{padding-top:0}.vm-table-settings-popper-list-header{grid-gap:8px;align-items:center;display:grid;gap:8px;grid-template-columns:1fr auto;justify-content:space-between;min-height:25px}.vm-table-settings-popper-list-header__title{font-weight:700}.vm-table-settings-popper-list-columns{max-height:350px;overflow:auto}.vm-table-settings-popper-list__item{font-size:14px;padding:6px 12px}.vm-table-settings-popper-list__item:hover,.vm-table-settings-popper-list__item_focus{background-color:var(--color-hover-black)}.vm-table-settings-popper-list__item_check_all{margin:0 -12px;padding:6px 12px}.vm-table-settings-popper-list__no-found{color:var(--color-text-secondary);font-style:italic;margin-bottom:8px;text-align:center}.vm-checkbox{align-items:center;cursor:pointer;display:flex;justify-content:flex-start;-webkit-user-select:none;user-select:none}.vm-checkbox_disabled{cursor:default;opacity:.6}.vm-checkbox_secondary_active .vm-checkbox-track{background-color:var(--color-secondary)}.vm-checkbox_secondary .vm-checkbox-track{border:1px solid var(--color-secondary)}.vm-checkbox_primary_active .vm-checkbox-track{background-color:var(--color-primary)}.vm-checkbox_primary .vm-checkbox-track{border:1px solid var(--color-primary)}.vm-checkbox_active .vm-checkbox-track__thumb{transform:scale(1)}.vm-checkbox:hover .vm-checkbox-track{opacity:.8}.vm-checkbox-track{align-items:center;background-color:#0000;border-radius:4px;display:flex;height:16px;justify-content:center;padding:2px;position:relative;transition:background-color .2s ease,opacity .3s ease-out;width:16px}.vm-checkbox-track__thumb{align-items:center;color:#fff;display:grid;height:12px;justify-content:center;transform:scale(0);transition:transform .1s ease-in-out;width:12px}.vm-checkbox__label{color:inherit;font-size:inherit;margin-left:8px;transition:color .2s ease;white-space:nowrap}.vm-tooltip{animation:vm-scale .15s cubic-bezier(.28,.84,.42,1);background-color:var(--color-background-tooltip);border-radius:4px;box-shadow:var(--box-shadow-popper);color:#fff;font-size:12px;line-height:150%;opacity:1;padding:3px 8px;pointer-events:auto;position:fixed;transition:opacity .1s ease-in-out;white-space:nowrap;z-index:101}@keyframes vm-scale{0%{transform:scale(0)}to{transform:scale(1)}}.vm-switch{align-items:center;cursor:pointer;display:flex;font-size:12px;justify-content:flex-start;-webkit-user-select:none;user-select:none}.vm-switch_full-width{flex-direction:row-reverse;justify-content:space-between}.vm-switch_full-width .vm-switch__label{margin-left:0}.vm-switch_disabled{cursor:default;opacity:.6}.vm-switch_secondary_active .vm-switch-track{background-color:var(--color-secondary)}.vm-switch_primary_active .vm-switch-track{background-color:var(--color-primary)}.vm-switch_active .vm-switch-track__thumb{left:20px}.vm-switch:hover .vm-switch-track{opacity:.8}.vm-switch-track{align-items:center;background-color:#110f0f66;border-radius:17px;display:flex;height:17px;justify-content:flex-start;padding:3px;position:relative;transition:background-color .2s ease,opacity .3s ease-out;width:34px}.vm-switch-track__thumb{background-color:var(--color-background-block);border-radius:50%;left:3px;min-height:11px;min-width:11px;position:absolute;top:auto;transform-style:preserve-3d;transition:right .2s ease-out,left .2s ease-out}.vm-switch__label{color:var(--color-text-secondary);font-size:inherit;margin-left:8px;transition:color .2s ease;white-space:nowrap}.vm-switch_active .vm-switch__label{color:var(--color-text)}.vm-text-field{display:grid;margin:6px 0;position:relative;width:100%}.vm-text-field_textarea:after{content:attr(data-replicated-value) " ";overflow-wrap:break-word;visibility:hidden;white-space:pre-wrap}.vm-text-field:after,.vm-text-field__input{background-color:#0000;border:var(--border-divider);box-sizing:border-box;font-family:monospace;font-size:14px;grid-area:1/1/2/2;line-height:18px;overflow:hidden;padding:8px 12px;width:100%}.vm-text-field__error,.vm-text-field__helper-text,.vm-text-field__label,.vm-text-field__warning{-webkit-line-clamp:1;line-clamp:1;-webkit-box-orient:vertical;background-color:var(--color-background-block);display:-webkit-box;font-size:12px;left:6px;line-height:14px;max-width:calc(100% - 12px);overflow:hidden;padding:0 3px;pointer-events:none;position:absolute;text-overflow:ellipsis;-webkit-user-select:none;user-select:none;z-index:2}.vm-text-field__label{color:var(--color-text-secondary);top:-8px}.vm-text-field__error,.vm-text-field__helper-text,.vm-text-field__warning{overflow-wrap:anywhere;pointer-events:auto;position:relative;top:-6px;-webkit-user-select:text;user-select:text;width:-webkit-fit-content;width:-moz-fit-content;width:fit-content}.vm-text-field__error_full,.vm-text-field__helper-text_full,.vm-text-field__warning_full{display:block;overflow:visible}.vm-text-field__error_overflowed,.vm-text-field__helper-text_overflowed,.vm-text-field__warning_overflowed{cursor:pointer}.vm-text-field__error{color:var(--color-error)}.vm-text-field__warning{color:var(--color-warning)}.vm-text-field__helper-text{color:var(--color-text-secondary)}.vm-text-field__input{background-color:#0000;border-radius:4px;color:var(--color-text);display:block;overflow:hidden;resize:none;transition:border .2s ease}.vm-text-field__input:focus,.vm-text-field__input:hover{border:1px solid var(--color-primary)}.vm-text-field__input_error,.vm-text-field__input_error:focus,.vm-text-field__input_error:hover{border-color:var(--color-error)}.vm-text-field__input_warning,.vm-text-field__input_warning:focus,.vm-text-field__input_warning:hover{border-color:var(--color-warning)}.vm-text-field__input_icon-start{padding-left:31px}.vm-text-field__input:disabled{background-color:inherit;color:inherit}.vm-text-field__input:disabled:hover{border-color:var(--color-text-disabled)}.vm-text-field__icon-end,.vm-text-field__icon-start{align-items:center;color:var(--color-text-secondary);display:flex;height:40px;justify-content:center;left:8px;max-width:15px;position:absolute;top:0}.vm-text-field__icon-end{left:auto;right:8px}.vm-text-field__controls-info{bottom:8px;color:var(--color-text-secondary);font-size:12px;opacity:.8;position:absolute;right:12px}.vm-group-logs{margin-top:-12px}.vm-group-logs-header{align-items:center;display:flex;gap:12px;justify-content:flex-end}.vm-group-logs-header-keys{max-height:300px;overflow:auto}.vm-group-logs-header-keys__search{padding:8px}.vm-group-logs-section-keys{align-items:center;border-bottom:var(--border-divider);display:flex;flex-wrap:wrap;gap:8px;padding:8px 0}.vm-group-logs-section-keys__title{font-weight:700}.vm-group-logs-section-keys__title code{font-family:monospace}.vm-group-logs-section-keys__title code:after,.vm-group-logs-section-keys__title code:before{content:'"'}.vm-group-logs-section-keys__count{color:var(--color-text-secondary);flex-grow:1;font-size:12px;padding-right:48px;text-align:right}.vm-group-logs-section-keys__pair{background-color:#e3f1fa;border-radius:8px;color:#005cb3;padding:6px 12px;transition:background-color .3s ease-in,transform .1s ease-in,opacity .3s ease-in}.vm-group-logs-section-keys__pair:hover{background-color:#c9e3f6}.vm-group-logs-section-keys__pair:active{transform:translateY(3px)}.vm-group-logs-section-keys__pair_dark{background-color:var(--color-background-body);color:#80c1ff;opacity:.8}.vm-group-logs-section-keys__pair_dark:hover{background-color:var(--color-background-body);opacity:1}.vm-group-logs-section-rows{display:grid}.vm-group-logs-row{border-bottom:var(--border-divider);position:relative}.vm-group-logs-row-content{cursor:pointer;display:grid;grid-template-columns:auto minmax(180px,-webkit-max-content) 1fr;grid-template-columns:auto minmax(180px,max-content) 1fr;padding:12px 0;position:relative;transition:background-color .2s ease-in}.vm-group-logs-row-content:hover{background-color:var(--color-hover-black)}.vm-group-logs-row-content__arrow{align-items:center;display:flex;height:14px;justify-content:center;transform:rotate(-90deg);transition:transform .2s ease-out;width:16px}.vm-group-logs-row-content__arrow_open{transform:rotate(0deg)}.vm-group-logs-row-content__time{align-items:flex-start;display:flex;justify-content:flex-end;line-height:1;margin-right:8px;white-space:nowrap}.vm-group-logs-row-content__time_missing{color:var(--color-text-disabled);font-style:italic;justify-content:center}.vm-group-logs-row-content__msg{font-family:monospace;line-height:1.1;overflow-wrap:anywhere}.vm-group-logs-row-content__msg_empty-msg{overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.vm-group-logs-row-content__msg_missing{color:var(--color-text-disabled);font-style:italic;text-align:center}.vm-group-logs-row-content__msg code,.vm-group-logs-row-content__msg p,.vm-group-logs-row-content__msg pre{word-wrap:break-word;white-space:pre-wrap;word-break:normal}.vm-group-logs-row-content__msg code:not(pre code),.vm-group-logs-row-content__msg pre{font-feature-settings:none;background:var(--color-hover-black);border:1px solid var(--color-hover-black);border-radius:4px;display:inline-block;font-variant-ligatures:none;margin:2px 0;tab-size:4}.vm-group-logs-row-content__msg p{font-family:system-ui;line-height:1.4}.vm-group-logs-row-content__msg pre{padding:8px}.vm-group-logs-row-content__msg code{font-size:12px;padding:2px 4px}.vm-group-logs-row-content__msg a{color:var(--color-primary);cursor:pointer}.vm-group-logs-row-content__msg a:hover{text-decoration:underline}.vm-group-logs-row-content__msg strong{font-weight:700}.vm-group-logs-row-content__msg em{font-style:italic}.vm-group-logs-row-content__msg blockquote{border-left:4px solid var(--color-hover-black);margin:4px 8px;padding:4px 8px}.vm-group-logs-row-content__msg ol,.vm-group-logs-row-content__msg ul{list-style-position:inside}.vm-group-logs-row-fields{border:var(--border-divider);border-radius:4px;grid-row:2;margin-bottom:8px;max-height:300px;overflow:auto;padding:8px 0}.vm-group-logs-row-fields-item{border-radius:4px;transition:background-color .2s ease-in}.vm-group-logs-row-fields-item:hover{background-color:var(--color-hover-black)}.vm-group-logs-row-fields-item-controls{padding:0}.vm-group-logs-row-fields-item-controls__wrapper{align-items:center;display:flex;justify-content:center}.vm-group-logs-row-fields-item__key,.vm-group-logs-row-fields-item__value{padding:4px 12px;vertical-align:top}.vm-group-logs-row-fields-item__key{overflow-wrap:break-word;width:-webkit-max-content;width:max-content}.vm-group-logs-row-fields-item__value{white-space:pre-wrap;width:100%;word-break:break-all}.vm-accordion-header{align-items:center;cursor:pointer;display:grid;font-size:inherit;position:relative}.vm-accordion-header__arrow{align-items:center;display:flex;justify-content:center;position:absolute;right:14px;top:auto;transform:rotate(0);transition:transform .2s ease-in-out}.vm-accordion-header__arrow_open{transform:rotate(180deg)}.vm-accordion-header__arrow svg{height:auto;width:14px}.accordion-section{overflow:hidden}.vm-spinner{align-items:center;animation:vm-fade 2s cubic-bezier(.28,.84,.42,1.1);background-color:#ffffff80;bottom:0;display:flex;flex-direction:column;justify-content:center;left:0;pointer-events:none;position:fixed;right:0;top:0;z-index:99}.vm-spinner_dark{background-color:#110f0f33}.vm-spinner__message{color:rgba(var(--color-text),.9);font-size:16px;line-height:1.3;margin-top:12px;text-align:center;white-space:pre-line}.half-circle-spinner,.half-circle-spinner *{box-sizing:border-box}.half-circle-spinner{border-radius:100%;height:60px;position:relative;width:60px}.half-circle-spinner .circle{border:6px solid #0000;border-radius:100%;content:"";height:100%;position:absolute;width:100%}.half-circle-spinner .circle.circle-1{animation:half-circle-spinner-animation 1s infinite;border-top-color:var(--color-primary)}.half-circle-spinner .circle.circle-2{animation:half-circle-spinner-animation 1s infinite alternate;border-bottom-color:var(--color-primary)}@keyframes half-circle-spinner-animation{0%{transform:rotate(0deg)}to{transform:rotate(1turn)}}@keyframes vm-fade{0%{opacity:0}to{opacity:1}}.vm-explore-logs-header{grid-gap:12px;align-items:center;display:grid;gap:12px}.vm-explore-logs-header-top{grid-gap:12px;align-items:flex-start;display:grid;gap:12px;grid-template-columns:8fr 2fr;justify-content:center}.vm-explore-logs-header-bottom{align-items:center;display:flex;flex-wrap:wrap;gap:12px;justify-content:flex-end}@media(max-width:500px){.vm-explore-logs-header-bottom{display:grid;justify-content:normal}}.vm-explore-logs-header-bottom-contols{flex-grow:1}.vm-explore-logs-header-bottom__execute{display:grid}.vm-explore-logs-header-bottom-helpful{align-items:center;display:flex;flex-wrap:wrap;gap:8px 12px;justify-content:center}.vm-explore-logs-header-bottom-helpful a{color:var(--color-text-secondary)}.vm-autocomplete{max-height:300px;overflow:auto;overscroll-behavior:none;position:relative}.vm-autocomplete_mobile{max-height:calc(var(--vh)*100 - 70px)}.vm-autocomplete__no-options{color:var(--color-text-disabled);padding:12px;text-align:center}.vm-autocomplete__loader{grid-gap:8px;align-items:center;color:var(--color-text-secondary);display:grid;gap:8px;grid-template-columns:14px auto;justify-content:center;padding:12px;pointer-events:none;z-index:2}.vm-autocomplete__loader svg{animation:half-circle-spinner-animation 1s linear infinite,vm-fade .5s ease-in}.vm-autocomplete-info,.vm-autocomplete-message{background-color:var(--color-background-block);border-top:var(--border-divider);padding:12px}.vm-autocomplete-message{color:var(--color-warning);font-size:12px;position:relative}.vm-autocomplete-message:after{background:var(--color-warning);content:"";height:100%;left:0;opacity:.1;position:absolute;top:0;width:100%}.vm-autocomplete-info{max-width:500px;min-width:450px;overflow-wrap:anywhere}.vm-autocomplete-info__type{color:var(--color-text-secondary);margin-bottom:8px}.vm-autocomplete-info__description{line-height:130%}.vm-autocomplete-info__description p{margin:12px 0}.vm-autocomplete-info__description p:last-child{margin:0}.vm-query-editor{position:relative}.vm-query-editor .marker-detection{left:0;pointer-events:none;position:absolute;top:0;visibility:hidden;z-index:-9999}.vm-explore-logs{grid-gap:12px;align-items:flex-start;display:grid;gap:12px;grid-template-rows:auto 1fr}.vm-explore-logs-chart{align-items:center;display:flex;justify-content:center;padding:0 0 0 8px!important;position:relative;width:calc(100vw - 24px)}@media(max-width:768px){.vm-explore-logs-chart{width:100vw}}.vm-explore-logs-chart__empty{position:absolute;transform:translateY(-25px);z-index:2}.vm-bar-hits-chart{height:200px;position:relative;width:100%}.vm-bar-hits-chart__wrapper{display:flex;flex-direction:column;height:100%;width:100%}.vm-bar-hits-chart_panning{pointer-events:none}.uplot,.uplot *,.uplot :after,.uplot :before{box-sizing:border-box}.uplot{font-family:system-ui,-apple-system,Segoe UI,Roboto,Helvetica Neue,Arial,Noto Sans,sans-serif,Apple Color Emoji,Segoe UI Emoji,Segoe UI Symbol,Noto Color Emoji;line-height:1.5;width:-webkit-min-content;width:min-content}.u-title{font-size:18px;font-weight:700;text-align:center}.u-wrap{position:relative;-webkit-user-select:none;user-select:none}.u-over,.u-under{position:absolute}.u-under{overflow:hidden}.uplot canvas{display:block;height:100%;position:relative;width:100%}.u-axis{position:absolute}.u-legend{font-size:14px;margin:auto;text-align:center}.u-inline{display:block}.u-inline *{display:inline-block}.u-inline tr{margin-right:16px}.u-legend th{font-weight:600}.u-legend th>*{display:inline-block;vertical-align:middle}.u-legend .u-marker{background-clip:padding-box!important;height:1em;margin-right:4px;width:1em}.u-inline.u-live th:after{content:":";vertical-align:middle}.u-inline:not(.u-live) .u-value{display:none}.u-series>*{padding:4px}.u-series th{cursor:pointer}.u-legend .u-off>*{opacity:.3}.u-select{background:#00000012}.u-cursor-x,.u-cursor-y,.u-select{pointer-events:none;position:absolute}.u-cursor-x,.u-cursor-y{left:0;top:0;will-change:transform}.u-hz .u-cursor-x,.u-vt .u-cursor-y{border-right:1px dashed #607d8b;height:100%}.u-hz .u-cursor-y,.u-vt .u-cursor-x{border-bottom:1px dashed #607d8b;width:100%}.u-cursor-pt{background-clip:padding-box!important;border:0 solid;border-radius:50%;left:0;pointer-events:none;position:absolute;top:0;will-change:transform}.u-axis.u-off,.u-cursor-pt.u-off,.u-cursor-x.u-off,.u-cursor-y.u-off,.u-select.u-off{display:none}.vm-bar-hits-tooltip{gap:8px;opacity:0;pointer-events:none}.vm-bar-hits-tooltip_visible{opacity:1;pointer-events:auto}.vm-chart-tooltip{grid-gap:12px;word-wrap:break-word;background:var(--color-background-tooltip);border-radius:8px;color:#fff;display:grid;font-family:monospace;font-size:12px;font-weight:400;gap:12px;line-height:150%;padding:12px;pointer-events:none;position:absolute;-webkit-user-select:text;user-select:text;width:370px;z-index:98}.vm-chart-tooltip_hits{white-space:pre-wrap;width:auto;word-break:break-all}.vm-chart-tooltip_sticky{pointer-events:auto;z-index:99}.vm-chart-tooltip_moved{margin-left:-316.5px;margin-top:-24.5px;position:fixed}.vm-chart-tooltip-header{grid-gap:8px;align-items:center;display:grid;gap:8px;grid-template-columns:1fr 25px 25px;justify-content:center;min-height:25px}.vm-chart-tooltip-header__title{grid-row:1}.vm-chart-tooltip-header__close{color:#fff;grid-column:3;grid-row:1}.vm-chart-tooltip-header__drag{color:#fff;cursor:move;grid-column:2;grid-row:1}.vm-chart-tooltip-header__date{grid-gap:2px;display:grid;gap:2px;grid-column:1}.vm-chart-tooltip-data{align-items:center;display:flex;gap:8px;justify-content:flex-start}.vm-chart-tooltip-data_margin-bottom{margin-bottom:12px}.vm-chart-tooltip-data_margin-top{margin-top:12px}.vm-chart-tooltip-data__marker{border:1px solid #ffffff80;height:14px;width:14px}.vm-chart-tooltip-data__marker_tranparent{opacity:0}.vm-chart-tooltip-data__value{font-size:14px;line-height:1}.vm-chart-tooltip-stats{align-items:center;display:flex;flex-wrap:wrap;gap:8px 12px;justify-content:flex-start}.vm-chart-tooltip-stats-row{align-items:center;display:grid;justify-content:flex-start}.vm-chart-tooltip-stats-row:not(:last-child){padding-right:8px}.vm-chart-tooltip-stats-row__key{line-height:1;margin-right:4px}.vm-chart-tooltip-stats-row__value{font-weight:700}.vm-chart-tooltip__info{white-space:pre-wrap;word-break:break-all}.vm-bar-hits-options{position:absolute;right:8px;top:8px;z-index:2}.vm-bar-hits-options-settings{grid-gap:12px;align-items:flex-start;display:grid;gap:12px;min-width:200px}.vm-bar-hits-options-settings-item{border-bottom:var(--border-divider);padding:0 12px 12px}.vm-bar-hits-options-settings-item_list{padding:0}.vm-bar-hits-options-settings-item__title{color:var(--color-text-secondary);font-size:12px;padding:0 8px 8px}.vm-bar-hits-options-settings-item:last-child{border-bottom:none}.vm-bar-hits-legend{display:flex;flex-wrap:wrap;gap:0;padding:0 8px 8px}.vm-bar-hits-legend-item{grid-gap:4px;align-items:center;border-radius:4px;cursor:pointer;display:grid;font-size:12px;gap:4px;grid-template-columns:auto 1fr;padding:8px;transition:.2s}.vm-bar-hits-legend-item:hover{background-color:#0000000d}.vm-bar-hits-legend-item_hide{opacity:.5;text-decoration:line-through}.vm-bar-hits-legend-item__marker{border:var(--color-background-block);height:14px;width:14px}.vm-legend{cursor:default;display:flex;flex-wrap:wrap;position:relative}.vm-legend-group{margin:0 12px 12px 0;min-width:23%;width:100%}.vm-legend-group-title{align-items:center;border-bottom:var(--border-divider);display:flex;margin-bottom:1px;padding:8px}.vm-legend-group-title__count{font-weight:700;margin-right:8px}.vm-header{align-items:center;display:flex;flex-wrap:wrap;gap:0 16px;justify-content:flex-start;min-height:51px;padding:8px 12px;z-index:99}.vm-header_app{padding:8px 0}@media(max-width:1000px){.vm-header{gap:8px;padding:8px;position:-webkit-sticky;position:sticky;top:0}}.vm-header_sidebar{display:grid;grid-template-columns:40px auto 1fr}.vm-header_mobile{display:grid;grid-template-columns:33px 1fr 33px;justify-content:space-between}.vm-header_dark .vm-header-button,.vm-header_dark button,.vm-header_dark button:before{background-color:var(--color-background-block)}.vm-header-logo{align-items:center;cursor:pointer;display:flex;justify-content:flex-start;margin-bottom:2px;overflow:hidden;position:relative;width:100%}.vm-header-logo,.vm-header-logo svg,.vm-header-logo_mobile{max-width:65px;min-width:65px}.vm-header-logo_mobile{margin:0 auto}.vm-header-logo_logs,.vm-header-logo_logs svg{max-width:75px;min-width:75px}.vm-header-nav{align-items:center;display:flex;gap:12px;justify-content:flex-start}.vm-header-nav_column{align-items:stretch;flex-direction:column;gap:8px}.vm-header-nav_column .vm-header-nav-item{padding:12px 0}.vm-header-nav_column .vm-header-nav-item_sub{justify-content:stretch}.vm-header-nav-item{cursor:pointer;font-size:14px;font-weight:400;opacity:1;padding:12px 8px;position:relative;text-transform:capitalize;transition:opacity .2s ease-in}.vm-header-nav-item_sub{grid-gap:4px;align-items:center;cursor:default;display:grid;gap:4px;grid-template-columns:auto 14px;justify-content:center}.vm-header-nav-item:hover{opacity:.7}.vm-header-nav-item_active{border-bottom:2px solid #110f0f33}.vm-header-nav-item svg{transform:rotate(0deg);transition:transform .2s ease-in}.vm-header-nav-item_open svg{transform:rotate(180deg)}.vm-header-nav-item-submenu{border-radius:4px;color:#fff;display:grid;opacity:1;padding:8px;transform-origin:top center;white-space:nowrap}.vm-header-nav-item-submenu-item{cursor:pointer}.vm-modal{align-items:center;background:#110f0f8c;bottom:0;display:flex;justify-content:center;left:0;position:fixed;right:0;top:0;z-index:100}.vm-modal_mobile{align-items:flex-start;max-height:calc(var(--vh)*100);min-height:calc(var(--vh)*100);overflow:auto}.vm-modal_mobile .vm-modal-content{border-radius:0;grid-template-rows:70px -webkit-max-content;grid-template-rows:70px max-content;max-height:-webkit-max-content;max-height:max-content;min-height:100%;overflow:visible;width:100vw}.vm-modal_mobile .vm-modal-content-header{margin-bottom:12px;padding:8px 8px 8px 12px}.vm-modal_mobile .vm-modal-content-header__title{max-width:80vw}.vm-modal_mobile .vm-modal-content-body{align-items:flex-start;display:grid;min-height:100%;padding:0 12px 12px}.vm-modal-content{background:var(--color-background-block);border-radius:4px;box-shadow:0 0 24px #110f0f12;max-height:calc(var(--vh)*90);overflow:auto}.vm-modal-content-header{grid-gap:8px;align-items:center;background-color:var(--color-background-block);border-bottom:var(--border-divider);border-radius:4px 4px 0 0;color:var(--color-text);display:grid;gap:8px;grid-template-columns:1fr auto;justify-content:space-between;margin-bottom:12px;min-height:51px;padding:12px;position:-webkit-sticky;position:sticky;top:0;z-index:3}.vm-modal-content-header__title{font-weight:700;max-width:50vw;overflow:hidden;text-overflow:ellipsis;-webkit-user-select:none;user-select:none;white-space:nowrap}.vm-modal-content-header__close{align-items:center;box-sizing:initial;color:#fff;cursor:pointer;display:flex;justify-content:center;padding:10px;width:24px}.vm-modal-content-body{padding:0 12px 12px}.vm-shortcuts{min-width:400px}@media(max-width:500px){.vm-shortcuts{min-width:100%}}.vm-shortcuts-section{border-bottom:var(--border-divider);margin-bottom:12px;padding-bottom:12px;position:relative}.vm-shortcuts-section__title{font-weight:700;margin-bottom:12px}.vm-shortcuts-section__read-more{position:absolute;right:0;top:-8px}.vm-shortcuts-section-list{grid-gap:12px;display:grid;gap:12px}@media(max-width:500px){.vm-shortcuts-section-list{gap:12px}}.vm-shortcuts-section-list-item{grid-gap:8px;align-items:center;display:grid;gap:8px;grid-template-columns:210px 1fr}@media(max-width:500px){.vm-shortcuts-section-list-item{grid-template-columns:1fr}}.vm-shortcuts-section-list-item__key{align-items:center;display:flex;gap:4px}.vm-shortcuts-section-list-item__key code,.vm-shortcuts-section-list-item__key svg{background-color:var(--color-background-body);background-repeat:repeat-x;border:var(--border-divider);border-radius:4px;color:var(--color-text);display:inline-block;font-size:12px;line-height:2;padding:2px 8px 0;text-align:center}.vm-shortcuts-section-list-item__key svg{color:var(--color-primary);padding:4px;width:24px}.vm-shortcuts-section-list-item__description{font-size:14px}.fc-graph-tips{grid-gap:12px;display:grid;gap:12px;max-width:520px}.fc-graph-tips-item{grid-gap:8px;border-bottom:var(--border-divider);display:grid;gap:8px;line-height:1.3;padding-bottom:12px}.fc-graph-tips-item__action{color:var(--color-text-secondary);font-weight:700}.fc-graph-tips-item__description{display:inline-block;line-height:1.5}.fc-graph-tips-item__description code,.fc-graph-tips-item__description svg{align-items:center;background-color:var(--color-background-body);border:var(--border-divider);border-radius:4px;color:var(--color-text);display:inline-flex;font-size:12px;justify-content:center;margin:0 2px 2px;min-height:20px;min-width:20px;padding:0 4px}.fc-graph-tips-item svg{color:var(--color-primary);margin-top:-8px;padding:2px;transform:translateY(8px);width:18px}.vm-menu-burger{background:none;border:none;cursor:pointer;height:18px;outline:none;padding:0;position:relative;transform-style:preserve-3d;width:18px}.vm-menu-burger:after{background-color:#110f0f1a;border-radius:50%;content:"";height:calc(100% + 12px);left:-6px;position:absolute;top:-6px;transform:scale(0) translateZ(-2px);transition:transform .14s ease-in-out;width:calc(100% + 12px)}.vm-menu-burger:hover:after{transform:scale(1) translateZ(-2px)}.vm-menu-burger span{border-top:2px solid #fff;display:block;top:50%;transform:translateY(-50%);transition:transform .3s ease,border-color .3s ease}.vm-menu-burger span,.vm-menu-burger span:after,.vm-menu-burger span:before{border-radius:6px;height:2px;left:0;position:absolute;width:100%}.vm-menu-burger span:after,.vm-menu-burger span:before{animation-duration:.6s;animation-fill-mode:forwards;animation-timing-function:cubic-bezier(.645,.045,.355,1);background:#fff;content:"";top:0}.vm-menu-burger span:before{animation-name:topLineBurger}.vm-menu-burger span:after{animation-name:bottomLineBurger}.vm-menu-burger_opened span{border-color:#0000}.vm-menu-burger_opened span:before{animation-name:topLineCross}.vm-menu-burger_opened span:after{animation-name:bottomLineCross}@keyframes topLineCross{0%{transform:translateY(-7px)}50%{transform:translateY(0)}to{transform:translateY(-2px) translateX(30%) rotate(45deg);width:60%}}@keyframes bottomLineCross{0%{transform:translateY(3px)}50%{transform:translateY(0)}to{transform:translateY(-2px) translateX(30%) rotate(-45deg);width:60%}}@keyframes topLineBurger{0%{transform:translateY(0) rotate(45deg)}50%{transform:rotate(0deg)}to{transform:translateY(-7px) rotate(0deg)}}@keyframes bottomLineBurger{0%{transform:translateY(0) rotate(-45deg)}50%{transform:rotate(0deg)}to{transform:translateY(3px) rotate(0deg)}}.vm-header-sidebar{background-color:inherit;color:inherit;height:24px;width:24px}.vm-header-sidebar-button{align-items:center;display:flex;height:51px;justify-content:center;left:0;position:absolute;top:0;transition:left .35s cubic-bezier(.28,.84,.42,1);width:51px}.vm-header-sidebar-button_open{left:149px;position:fixed;z-index:102}.vm-header-sidebar-menu{grid-gap:12px;background-color:inherit;box-shadow:var(--box-shadow-popper);display:grid;gap:12px;grid-template-rows:1fr auto;height:100%;left:0;padding:12px;position:fixed;top:0;transform:translateX(-100%);transform-origin:left;transition:transform .3s cubic-bezier(.28,.84,.42,1);width:200px;z-index:101}.vm-header-sidebar-menu_open{transform:translateX(0)}.vm-header-sidebar-menu__logo{align-items:center;cursor:pointer;display:flex;justify-content:flex-start;position:relative;width:65px}.vm-header-sidebar-menu-settings{grid-gap:8px;align-items:center;display:grid;gap:8px}.vm-header-controls{align-items:center;display:flex;flex-grow:1;gap:8px;justify-content:flex-end}.vm-header-controls_mobile{display:grid;grid-template-columns:1fr;padding:0}.vm-header-controls_mobile .vm-header-button{border:none}.vm-header-controls-modal{transform:scale(0)}.vm-header-controls-modal_open{transform:scale(1)}.vm-container{display:flex;flex-direction:column;min-height:calc(var(--vh)*100 - var(--scrollbar-height))}.vm-container-body{background-color:var(--color-background-body);flex-grow:1;min-height:100%;padding:12px}.vm-container-body_mobile{padding:8px 0 0}@media(max-width:768px){.vm-container-body{padding:8px 0 0}}.vm-container-body_app{background-color:#0000;padding:8px 0}.vm-footer{align-items:center;background:var(--color-background-body);border-top:var(--border-divider);color:var(--color-text-secondary);display:flex;flex-wrap:wrap;gap:12px;justify-content:center;padding:12px}@media(max-width:768px){.vm-footer{gap:12px;padding:12px}}.vm-footer__link,.vm-footer__website{grid-gap:6px;align-items:center;display:grid;gap:6px;grid-template-columns:12px auto;justify-content:center}.vm-footer__website{margin-right:12px}@media(max-width:768px){.vm-footer__website{margin-right:0}}.vm-footer__link{grid-template-columns:14px auto}.vm-footer__copyright{flex-grow:1;text-align:right}@media(max-width:768px){.vm-footer__copyright{font-size:12px;text-align:center;width:100%}}.vm-server-configurator{align-items:center;display:flex;flex-direction:column;gap:16px;padding-bottom:12px;width:600px}.vm-server-configurator_mobile{align-items:flex-start;grid-auto-rows:-webkit-min-content;grid-auto-rows:min-content;height:100%;width:100%}@media(max-width:768px){.vm-server-configurator{width:100%}}.vm-server-configurator__input{width:100%}.vm-server-configurator__input_flex{align-items:flex-start;display:flex;gap:12px}.vm-server-configurator__title{align-items:center;display:flex;font-size:14px;font-weight:700;grid-column:auto/span 2;justify-content:flex-start;margin-bottom:12px}.vm-server-configurator__info{color:var(--color-text-secondary);font-size:12px;line-height:130%;padding-top:8px}.vm-server-configurator-url{align-items:flex-start;display:flex;gap:8px}.vm-server-configurator-url__button{margin-top:8px}.vm-server-configurator-footer{align-items:center;display:flex;gap:8px;justify-content:flex-end;width:100%}.vm-server-configurator_mobile .vm-server-configurator-footer{display:grid;grid-template-columns:1fr 1fr}.vm-limits-configurator-title__reset{align-items:center;display:flex;flex-grow:1;justify-content:flex-end}.vm-limits-configurator__inputs{grid-gap:12px;align-items:center;display:grid;flex-wrap:wrap;gap:12px;grid-template-columns:repeat(auto-fit,minmax(150px,1fr));justify-content:space-between}.vm-limits-configurator__inputs_mobile{gap:8px}.vm-timezones-item{align-items:center;cursor:pointer;display:flex;gap:8px;justify-content:space-between}.vm-timezones-item_selected{border:var(--border-divider);border-radius:4px;padding:8px 12px}.vm-timezones-item__title{align-items:center;display:flex;gap:8px;text-transform:capitalize}.vm-timezones-item__title svg{color:var(--color-warning);width:14px}.vm-timezones-item__utc{align-items:center;background-color:var(--color-hover-black);border-radius:4px;display:inline-flex;justify-content:center;padding:4px}.vm-timezones-item__icon{align-items:center;display:inline-flex;justify-content:flex-end;margin:0 0 0 auto;transition:transform .2s ease-in}.vm-timezones-item__icon svg{width:14px}.vm-timezones-item__icon_open{transform:rotate(180deg)}.vm-timezones-list{background-color:var(--color-background-block);border-radius:8px;max-height:300px;overflow:auto}.vm-timezones-list_mobile{max-height:calc(var(--vh)*100 - 70px)}.vm-timezones-list_mobile .vm-timezones-list-header__search{padding:0 12px}.vm-timezones-list-header{background-color:var(--color-background-block);border-bottom:var(--border-divider);position:-webkit-sticky;position:sticky;top:0;z-index:2}.vm-timezones-list-header__search{padding:8px}.vm-timezones-list-group{border-bottom:var(--border-divider);padding:8px 0}.vm-timezones-list-group:last-child{border-bottom:none}.vm-timezones-list-group__title{color:var(--color-text-secondary);font-weight:700;padding:8px 12px}.vm-timezones-list-group-options{align-items:flex-start;display:grid}.vm-timezones-list-group-options__item{padding:8px 12px;transition:background-color .2s ease}.vm-timezones-list-group-options__item:hover{background-color:#110f0f1a}.vm-theme-control__toggle{display:inline-flex;min-width:300px;text-transform:capitalize}.vm-theme-control_mobile .vm-theme-control__toggle{display:flex;min-width:100%}.vm-toggles{grid-gap:3px;display:grid;gap:3px;position:relative;width:100%}.vm-toggles__label{color:var(--color-text-secondary);font-size:12px;line-height:1;padding:0 12px}.vm-toggles-group{overflow:hidden;width:100%}.vm-toggles-group,.vm-toggles-group-item{align-items:center;display:grid;justify-content:center;position:relative}.vm-toggles-group-item{border-bottom:var(--border-divider);border-right:var(--border-divider);border-top:var(--border-divider);color:var(--color-text-secondary);cursor:pointer;font-size:12px;font-weight:700;padding:8px;text-align:center;transition:color .15s ease-in;-webkit-user-select:none;user-select:none;z-index:2}.vm-toggles-group-item_first{border-left:var(--border-divider);border-radius:16px 0 0 16px}.vm-toggles-group-item:last-child{border-left:none;border-radius:0 16px 16px 0}.vm-toggles-group-item_icon{gap:4px;grid-template-columns:14px auto}.vm-toggles-group-item:hover{color:var(--color-primary)}.vm-toggles-group-item_active{border-color:#0000;color:var(--color-primary)}.vm-toggles-group-item_active:hover{background-color:#0000}.vm-toggles-group__highlight{background-color:rgba(var(--color-primary),.08);border:1px solid var(--color-primary);height:100%;position:absolute;top:0;transition:left .2s cubic-bezier(.28,.84,.42,1),border-radius .2s linear;z-index:1}.vm-time-duration{font-size:14px;max-height:227px;overflow:auto}.vm-time-duration_mobile{max-height:100%}.vm-time-selector{display:grid;grid-template-columns:repeat(2,230px);padding:12px 0}.vm-time-selector_mobile{grid-template-columns:1fr;max-height:calc(var(--vh)*100 - 70px);min-width:250px;overflow:auto;width:100%}.vm-time-selector_mobile .vm-time-selector-left{border-bottom:var(--border-divider);border-right:none;padding-bottom:12px}.vm-time-selector-left{border-right:var(--border-divider);display:flex;flex-direction:column;gap:8px;padding:0 12px}.vm-time-selector-left-inputs{align-items:flex-start;display:grid;flex-grow:1;justify-content:stretch}.vm-time-selector-left-timezone{align-items:center;display:flex;font-size:12px;gap:8px;justify-content:space-between;margin-bottom:8px}.vm-time-selector-left-timezone__utc{align-items:center;background-color:var(--color-hover-black);border-radius:4px;display:inline-flex;justify-content:center;padding:4px}.vm-time-selector-left__controls{grid-gap:8px;display:grid;gap:8px;grid-template-columns:repeat(2,1fr)}.vm-calendar{background-color:var(--color-background-block);border-radius:8px;display:grid;font-size:14px;grid-template-rows:auto 1fr auto;padding:12px;-webkit-user-select:none;user-select:none}.vm-calendar_mobile{padding:0 12px}.vm-calendar-header{grid-gap:12px;align-items:center;display:grid;gap:12px;grid-template-columns:1fr auto;justify-content:center;min-height:36px;padding-bottom:12px}.vm-calendar-header-left{grid-gap:8px;align-items:center;cursor:pointer;display:grid;gap:8px;grid-template-columns:auto auto;justify-content:flex-start;transition:opacity .2s ease-in-out}.vm-calendar-header-left:hover{opacity:.8}.vm-calendar-header-left__date{color:var(--color-text);font-size:14px;font-weight:700}.vm-calendar-header-left__select-year{align-items:center;display:grid;height:14px;justify-content:center;width:14px}.vm-calendar-header-right{grid-gap:8px;align-items:center;display:grid;gap:8px;grid-template-columns:18px 18px;justify-content:center}.vm-calendar-header-right__next,.vm-calendar-header-right__prev{cursor:pointer;margin:-8px;padding:8px;transition:opacity .2s ease-in-out}.vm-calendar-header-right__next:hover,.vm-calendar-header-right__prev:hover{opacity:.8}.vm-calendar-header-right__prev{transform:rotate(90deg)}.vm-calendar-header-right__next{transform:rotate(-90deg)}.vm-calendar-body{grid-gap:2px;align-items:center;display:grid;gap:2px;grid-template-columns:repeat(7,32px);grid-template-rows:repeat(7,32px);justify-content:center}@media(max-width:500px){.vm-calendar-body{grid-template-columns:repeat(7,calc(14.28571vw - 5.14286px));grid-template-rows:repeat(7,calc(14.28571vw - 5.14286px))}}.vm-calendar-body-cell{align-items:center;border-radius:50%;display:flex;height:100%;justify-content:center;text-align:center}.vm-calendar-body-cell_weekday{color:var(--color-text-secondary)}.vm-calendar-body-cell_day{cursor:pointer;transition:color .2s ease,background-color .3s ease-in-out}.vm-calendar-body-cell_day:hover{background-color:var(--color-hover-black)}.vm-calendar-body-cell_day_empty{pointer-events:none}.vm-calendar-body-cell_day_active{color:#fff}.vm-calendar-body-cell_day_active,.vm-calendar-body-cell_day_active:hover{background-color:var(--color-primary)}.vm-calendar-body-cell_day_today{border:1px solid var(--color-primary)}.vm-calendar-years{grid-gap:8px;display:grid;gap:8px;grid-template-columns:repeat(3,1fr);max-height:400px;overflow:auto}.vm-calendar-years__year{align-items:center;border-radius:8px;cursor:pointer;display:flex;justify-content:center;padding:8px 16px;transition:color .2s ease,background-color .3s ease-in-out}.vm-calendar-years__year:hover{background-color:var(--color-hover-black)}.vm-calendar-years__year_selected{color:#fff}.vm-calendar-years__year_selected,.vm-calendar-years__year_selected:hover{background-color:var(--color-primary)}.vm-calendar-years__year_today{border:1px solid var(--color-primary)}.vm-calendar-footer{align-items:center;display:flex;justify-content:flex-end}.vm-date-time-input{grid-gap:8px 0;align-items:center;cursor:pointer;display:grid;gap:8px 0;grid-template-columns:1fr;justify-content:center;margin-bottom:12px;position:relative;transition:color .2s ease-in-out,border-bottom-color .3s ease}.vm-date-time-input:hover input{border-bottom-color:var(--color-primary)}.vm-date-time-input label{color:var(--color-text-secondary);font-size:12px;grid-column:1/3;-webkit-user-select:none;user-select:none;width:100%}.vm-date-time-input__icon{bottom:2px;position:absolute;right:0}.vm-date-time-input input{background:#0000;border:none;border-bottom:var(--border-divider);color:var(--color-text);padding:0 0 8px}.vm-date-time-input input:focus{border-bottom-color:var(--color-primary)}.vm-date-time-input_error input{border-color:var(--color-error)}.vm-date-time-input_error input:focus{border-bottom-color:var(--color-error)}.vm-date-time-input__error-text{bottom:-12px;color:var(--color-error);font-size:12px;left:0;position:absolute}.vm-tenant-input{position:relative}.vm-tenant-input-list{border-radius:8px;max-height:300px;overflow:auto;overscroll-behavior:none}.vm-tenant-input-list_mobile{max-height:calc(var(--vh)*100 - 70px)}.vm-tenant-input-list_mobile .vm-tenant-input-list__search{padding:0 12px 8px}.vm-tenant-input-list_inline{grid-gap:4px;display:grid;gap:4px;padding:12px}.vm-tenant-input-list__search{background-color:var(--color-background-block);padding:8px 12px;position:-webkit-sticky;position:sticky;top:0}.vm-tenant-input-list__buttons{display:flex;gap:8px;justify-content:space-between}.vm-button{align-items:center;border-radius:6px;color:#fff;cursor:pointer;display:flex;font-size:12px;font-weight:400;justify-content:center;line-height:15px;min-height:31px;padding:6px 14px;position:relative;text-transform:uppercase;transform-style:preserve-3d;-webkit-user-select:none;user-select:none;white-space:nowrap}.vm-button:hover:after{background-color:var(--color-hover-black)}.vm-button:after,.vm-button:before{border-radius:6px;content:"";height:100%;left:0;position:absolute;top:0;transition:background-color .2s ease;width:100%}.vm-button:before{transform:translateZ(-2px)}.vm-button:after{background-color:#0000;transform:translateZ(-1px)}.vm-button:active:after{transform:scale(.9)}.vm-button span{align-items:center;display:grid;justify-content:center;transform:translateZ(1px)}.vm-button span svg{width:15px}.vm-button__start-icon{margin-right:6px}.vm-button__end-icon{margin-left:6px}.vm-button_disabled{cursor:not-allowed;opacity:.3}.vm-button_icon{padding:6px 8px}.vm-button_icon .vm-button__end-icon,.vm-button_icon .vm-button__start-icon{margin:0}.vm-button_small{min-height:25px;padding:4px 8px}.vm-button_small span svg{width:13px}.vm-button_contained_primary{color:var(--color-primary-text)}.vm-button_contained_primary,.vm-button_contained_primary:before{background-color:var(--color-primary)}.vm-button_contained_primary:hover:after{background-color:#110f0f33}.vm-button_contained_secondary{color:var(--color-secondary-text)}.vm-button_contained_secondary:before{background-color:var(--color-secondary)}.vm-button_contained_secondary:hover:after{background-color:#110f0f33}.vm-button_contained_success{color:var(--color-success-text)}.vm-button_contained_success:before{background-color:var(--color-success)}.vm-button_contained_success:hover:after{background-color:#110f0f33}.vm-button_contained_error{color:var(--color-error-text)}.vm-button_contained_error:before{background-color:var(--color-error)}.vm-button_contained_gray{color:var(--color-text-secondary)}.vm-button_contained_gray:before{background-color:var(--color-text-secondary)}.vm-button_contained_warning{color:var(--color-warning)}.vm-button_contained_warning:before{background-color:var(--color-warning);opacity:.2}.vm-button_text_primary{color:var(--color-primary)}.vm-button_text_secondary{color:var(--color-secondary)}.vm-button_text_success{color:var(--color-success)}.vm-button_text_error{color:var(--color-error)}.vm-button_text_gray{color:var(--color-text-secondary)}.vm-button_text_white{color:#fff}.vm-button_text_warning{color:var(--color-warning)}.vm-button_outlined_primary{border:1px solid var(--color-primary);color:var(--color-primary)}.vm-button_outlined_error{border:1px solid var(--color-error);color:var(--color-error)}.vm-button_outlined_secondary{border:1px solid var(--color-secondary);color:var(--color-secondary)}.vm-button_outlined_success{border:1px solid var(--color-success);color:var(--color-success)}.vm-button_outlined_gray{border:1px solid var(--color-text-secondary);color:var(--color-text-secondary)}.vm-button_outlined_white{border:1px solid #fff;color:#fff}.vm-button_outlined_warning{border:1px solid var(--color-warning);color:var(--color-warning)}.vm-execution-controls-buttons{border-radius:7px;display:flex;justify-content:space-between;min-width:107px}.vm-execution-controls-buttons_mobile{flex-direction:column;gap:12px}.vm-execution-controls-buttons__arrow{align-items:center;display:flex;justify-content:center;transform:rotate(0);transition:transform .2s ease-in-out}.vm-execution-controls-buttons__arrow_open{transform:rotate(180deg)}.vm-execution-controls-list{font-size:14px;max-height:208px;overflow:auto;padding:8px 0;width:124px}.vm-execution-controls-list_mobile{max-height:calc(var(--vh)*100 - 70px);padding:0;width:100%}#root,body,html{background-attachment:fixed;background-color:#fefeff;background-color:var(--color-background-body);background-repeat:no-repeat;color:#110f0f;color:var(--color-text);cursor:default;font-family:system-ui;font-size:14px;margin:0;min-height:100%}body{overflow:auto}*{-webkit-tap-highlight-color:rgba(0,0,0,0);cursor:inherit;font:inherit;touch-action:pan-x pan-y}code{font-family:monospace}b{font-weight:700}input,textarea{cursor:text}input::placeholder,textarea::placeholder{-webkit-user-select:none;user-select:none}input[type=number]::-webkit-inner-spin-button,input[type=number]::-webkit-outer-spin-button{-webkit-appearance:none;margin:0}.vm-snackbar{animation:vm-slide-snackbar .15s cubic-bezier(.28,.84,.42,1.1);bottom:12px;left:12px;position:fixed;z-index:999}.vm-snackbar-content{align-items:center;display:grid;grid-template-columns:1fr auto}.vm-snackbar-content__close{color:inherit;height:24px;opacity:.8;padding:4px;width:24px}.vm-snackbar_mobile{bottom:0;left:0;right:0}@keyframes vm-slide-snackbar{0%{transform:translateY(100%)}to{transform:translateY(0)}}svg{width:100%}*{scrollbar-color:#a09f9f #fff;scrollbar-color:var(--color-text-disabled) var(--color-background-block);scrollbar-width:thin}::-webkit-scrollbar{width:12px}::-webkit-scrollbar-track{background:#fff;background:var(--color-background-block)}::-webkit-scrollbar-thumb{background-color:#a09f9f;background-color:var(--color-text-disabled);border:3px solid #fff;border:3px solid var(--color-background-block);border-radius:20px}a,abbr,acronym,address,applet,article,aside,audio,big,body,canvas,caption,center,cite,code,del,details,dfn,div,em,embed,fieldset,figcaption,figure,footer,form,h1,h2,h3,h4,h5,h6,header,hgroup,html,iframe,img,ins,kbd,label,legend,li,mark,menu,nav,object,ol,output,p,pre,q,ruby,s,samp,section,small,span,strike,strong,sub,summary,sup,table,tbody,td,tfoot,th,thead,time,tr,tt,u,ul,var,video{border:0;margin:0;padding:0;vertical-align:initial}h1,h2,h3,h4,h5,h6{font-weight:400}article,aside,details,figcaption,figure,footer,header,hgroup,menu,nav,section{display:block}body{line-height:1}q:after,q:before{content:""}table{border-collapse:collapse;border-spacing:0}input::placeholder{opacity:1;transition:opacity .3s ease}input:focus::placeholder{opacity:0;transition:opacity .3s ease}*{box-sizing:border-box;outline:none}button{background:none;border:none;border-radius:0;padding:0}strong{letter-spacing:1px}input[type=file]{cursor:pointer;font-size:0;height:100%;left:0;opacity:0;position:absolute;top:0;width:100%}input[type=file]:disabled{cursor:not-allowed}a{color:inherit;text-decoration:inherit}input,textarea{-webkit-text-fill-color:inherit;appearance:none;-webkit-appearance:none}input:disabled,textarea:disabled{opacity:1!important}input:placeholder-shown,textarea:placeholder-shown{width:100%}input:-webkit-autofill,input:-webkit-autofill:active,input:-webkit-autofill:focus,input:-webkit-autofill:hover{-webkit-box-shadow:inset 0 0 0 0 #fff!important;width:100%;z-index:2}.vm-header-button{border:1px solid #110f0f33}.vm-list-item{background-color:#0000;cursor:pointer;padding:12px;transition:background-color .2s ease}.vm-list-item_mobile{padding:12px}.vm-list-item:hover,.vm-list-item_active{background-color:#0000000f;background-color:var(--color-hover-black)}.vm-list-item_multiselect{grid-gap:8px;align-items:center;display:grid;gap:8px;grid-template-columns:10px 1fr;justify-content:flex-start}.vm-list-item_multiselect svg{animation:vm-scale .15s cubic-bezier(.28,.84,.42,1)}.vm-list-item_multiselect span{grid-column:2}.vm-list-item_multiselect_selected{color:#3f51b5;color:var(--color-primary)}.vm-list-item_with-icon{grid-gap:4px;display:grid;gap:4px;grid-template-columns:14px 1fr}.vm-list-item_with-icon,.vm-mobile-option{align-items:center;justify-content:flex-start}.vm-mobile-option{display:flex;gap:8px;padding:6px 0;-webkit-user-select:none;user-select:none;width:100%}.vm-mobile-option__arrow,.vm-mobile-option__icon{align-items:center;display:flex;justify-content:center}.vm-mobile-option__icon{color:#3f51b5;color:var(--color-primary);height:22px;width:22px}.vm-mobile-option__arrow{color:#3f51b5;color:var(--color-primary);height:14px;transform:rotate(-90deg);width:14px}.vm-mobile-option-text{grid-gap:2px;align-items:center;display:grid;flex-grow:1;gap:2px}.vm-mobile-option-text__label{font-weight:700}.vm-mobile-option-text__value{color:#706f6f;color:var(--color-text-secondary);font-size:12px}.vm-block{background-color:#fff;background-color:var(--color-background-block);border-radius:8px;box-shadow:1px 2px 6px #00000014;box-shadow:var(--box-shadow);padding:12px}.vm-block_mobile{border-radius:0;padding:12px}.vm-block_empty-padding{padding:0}.vm-section-header{align-items:center;border-bottom:1px solid #00000026;border-bottom:var(--border-divider);border-radius:8px 8px 0 0;display:grid;grid-template-columns:1fr auto;justify-content:center;padding:0 12px}.vm-section-header__title{font-size:14px;font-weight:700}.vm-section-header__title_mobile{-webkit-line-clamp:2;line-clamp:2;-webkit-box-orient:vertical;display:-webkit-box;overflow:hidden;text-overflow:ellipsis}.vm-section-header__tabs{align-items:center;display:flex;font-size:12px;justify-content:flex-start}.vm-table{border-collapse:initial;border-spacing:0;margin-top:-12px;width:100%}.vm-table,.vm-table__row{background-color:#fff;background-color:var(--color-background-block)}.vm-table__row{transition:background-color .2s ease}.vm-table__row:hover:not(.vm-table__row_header){background-color:#0000000f;background-color:var(--color-hover-black)}.vm-table__row_header{position:relative;z-index:2}.vm-table__row_selected{background-color:#1a90ff0d}.vm-table-cell{border-bottom:1px solid #00000026;border-bottom:var(--border-divider);line-height:1.5;overflow-wrap:anywhere;padding:4px;vertical-align:top}.vm-table-cell__content{align-items:center;display:flex;justify-content:flex-start}.vm-table-cell_sort{cursor:pointer}.vm-table-cell_sort:hover{background-color:#0000000f;background-color:var(--color-hover-black)}.vm-table-cell_header{font-weight:700;overflow-wrap:normal;text-align:left}.vm-table-cell_gray{color:#110f0f;color:var(--color-text);opacity:.4}.vm-table-cell_right{text-align:right}.vm-table-cell_right .vm-table-cell__content{justify-content:flex-end}.vm-table-cell_no-wrap{white-space:nowrap}.vm-table-cell_no-padding{padding:0}.vm-table-cell_pre{white-space:pre-wrap}.vm-table-cell_logs-time{overflow-wrap:normal;white-space:nowrap}.vm-table-cell_logs{font-family:monospace;line-height:1.2;overflow-wrap:normal;width:100%}.vm-table__sort-icon{align-items:center;display:flex;justify-content:center;margin:0 8px;opacity:.4;transition:opacity .2s ease,transform .2s ease-in-out;width:15px}.vm-table__sort-icon_active{opacity:1}.vm-table__sort-icon_desc{transform:rotate(180deg)}.vm-link{cursor:pointer;transition:color .2s ease}.vm-link_colored{color:#3f51b5;color:var(--color-primary)}.vm-link_underlined{text-decoration:underline}.vm-link_with-icon{grid-gap:6px;align-items:center;display:grid;gap:6px;grid-template-columns:14px auto;justify-content:center}.vm-link:hover{color:#3f51b5;color:var(--color-primary);text-decoration:underline}.vm-dynamic-number{color:#a09f9f;color:var(--color-text-disabled);font-size:12px}.vm-dynamic-number_positive{color:#4caf50;color:var(--color-success)}.vm-dynamic-number_negative{color:#fd080e;color:var(--color-error)}.vm-dynamic-number_down:before{content:"↓"}.vm-dynamic-number_up:before{content:"↑"}:root{--color-primary:#3f51b5;--color-secondary:#e91e63;--color-error:#fd080e;--color-warning:#ff8308;--color-info:#03a9f4;--color-success:#4caf50;--color-primary-text:#fff;--color-secondary-text:#fff;--color-error-text:#fff;--color-warning-text:#fff;--color-info-text:#fff;--color-success-text:#fff;--color-background-body:#fefeff;--color-background-block:#fff;--color-background-tooltip:#505050e6;--color-text:#110f0f;--color-text-secondary:#706f6f;--color-text-disabled:#a09f9f;--box-shadow:#00000014 1px 2px 6px;--box-shadow-popper:#0000001a 0px 2px 8px 0px;--border-divider:1px solid #00000026;--color-hover-black:#0000000f} \ No newline at end of file diff --git a/app/vlselect/vmui/static/css/main.cbbca000.css b/app/vlselect/vmui/static/css/main.cbbca000.css new file mode 100644 index 000000000..1622770c8 --- /dev/null +++ b/app/vlselect/vmui/static/css/main.cbbca000.css @@ -0,0 +1 @@ +.vm-tabs{gap:12px;height:100%;position:relative;-webkit-user-select:none;user-select:none}.vm-tabs,.vm-tabs-item{align-items:center;display:flex;justify-content:center}.vm-tabs-item{color:inherit;cursor:pointer;font-size:inherit;font-weight:inherit;opacity:.6;padding:12px 8px;text-decoration:none;text-transform:capitalize;transition:opacity .2s}.vm-tabs-item_active{opacity:1}.vm-tabs-item:hover{opacity:.8}.vm-tabs-item__icon{display:grid;margin-right:8px;width:16px}.vm-tabs-item__icon_single{margin-right:0}.vm-tabs__indicator{border-bottom:2px solid;position:absolute;transition:width .2s ease,left .3s cubic-bezier(.28,.84,.42,1)}.vm-alert{grid-gap:8px;align-items:center;background-color:var(--color-background-block);border-radius:8px;box-shadow:var(--box-shadow);color:var(--color-text);display:grid;font-size:14px;font-weight:400;gap:8px;grid-template-columns:20px 1fr;line-height:1.5;padding:12px;position:relative}.vm-alert_mobile{align-items:flex-start;border-radius:0}.vm-alert:after{border-radius:8px;content:"";height:100%;left:0;opacity:.1;position:absolute;top:0;width:100%;z-index:1}.vm-alert_mobile:after{border-radius:0}.vm-alert__content,.vm-alert__icon{position:relative;z-index:2}.vm-alert__icon{align-items:center;display:flex;justify-content:center}.vm-alert__content{filter:brightness(.6);white-space:pre-line}.vm-alert_success{color:var(--color-success)}.vm-alert_success:after{background-color:var(--color-success)}.vm-alert_error{color:var(--color-error)}.vm-alert_error:after{background-color:var(--color-error)}.vm-alert_info{color:var(--color-info)}.vm-alert_info:after{background-color:var(--color-info)}.vm-alert_warning{color:var(--color-warning)}.vm-alert_warning:after{background-color:var(--color-warning)}.vm-alert_dark:after{opacity:.1}.vm-alert_dark .vm-alert__content{filter:none}.vm-json-view__copy{display:flex;justify-content:flex-end;position:-webkit-sticky;position:sticky;top:0;z-index:2}.vm-json-view__code{font-size:14px;line-height:1.4;transform:translateY(-32px);white-space:pre-wrap}.vm-explore-logs-body-header,.vm-explore-logs-body-header_mobile{margin:-12px -12px 0}.vm-explore-logs-body-header__settings{align-items:center;display:flex;gap:8px}.vm-explore-logs-body-header__log-info{color:var(--color-text-secondary);flex-grow:1;padding-right:12px;text-align:right}.vm-explore-logs-body__empty{align-items:center;color:var(--color-text-disabled);display:flex;justify-content:center;min-height:120px;text-align:center}.vm-explore-logs-body__table{overflow:auto;padding-top:12px;width:calc(100vw - 48px - var(--scrollbar-width))}@media(max-width:768px){.vm-explore-logs-body__table{width:calc(100vw - 24px - var(--scrollbar-width))}}.vm-explore-logs-body__table_mobile{width:calc(100vw - 24px - var(--scrollbar-width))}.vm-explore-logs-body__table .vm-table{min-width:700px}.vm-table-settings-modal .vm-modal-content-body{padding:0}.vm-table-settings-modal-section{border-top:var(--border-divider);padding-block:12px}.vm-table-settings-modal-section:first-child{border-top:none;padding-top:0}.vm-table-settings-modal-section__title{font-size:14px;font-weight:700;margin-bottom:12px;padding-inline:12px}.vm-table-settings-modal-columns__search{padding-inline:12px}.vm-table-settings-modal-columns-list{display:flex;flex-direction:column;margin-bottom:12px;max-height:250px;min-height:250px;overflow:auto}.vm-table-settings-modal-columns-list__item{border-radius:4px;font-size:14px;width:100%}.vm-table-settings-modal-columns-list__item>div{padding:8px 12px}.vm-table-settings-modal-columns-list__item_all{font-weight:700}.vm-table-settings-modal-columns-list__item:hover,.vm-table-settings-modal-columns-list__item_focus{background-color:var(--color-hover-black)}.vm-table-settings-modal-columns-list__item_custom .vm-checkbox__label:after{color:var(--color-text-secondary);content:"(custom column, will be removed if unchecked)";font-style:italic;padding:0 8px;text-align:right;width:100%}.vm-table-settings-modal-columns-no-found{align-items:center;display:flex;flex-direction:column;gap:12px;justify-content:center;min-height:250px;min-width:100%}.vm-table-settings-modal-columns-no-found__info{color:var(--color-text-secondary);font-style:italic;text-align:center}.vm-table-settings-modal-preserve{padding:12px}.vm-table-settings-modal-preserve__info{color:var(--color-text-secondary);font-size:12px;line-height:130%;padding-top:8px}.vm-checkbox{align-items:center;cursor:pointer;display:flex;justify-content:flex-start;-webkit-user-select:none;user-select:none}.vm-checkbox_disabled{cursor:default;opacity:.6}.vm-checkbox_secondary_active .vm-checkbox-track{background-color:var(--color-secondary)}.vm-checkbox_secondary .vm-checkbox-track{border:1px solid var(--color-secondary)}.vm-checkbox_primary_active .vm-checkbox-track{background-color:var(--color-primary)}.vm-checkbox_primary .vm-checkbox-track{border:1px solid var(--color-primary)}.vm-checkbox_active .vm-checkbox-track__thumb{transform:scale(1)}.vm-checkbox:hover .vm-checkbox-track{opacity:.8}.vm-checkbox-track{align-items:center;background-color:#0000;border-radius:4px;display:flex;height:16px;justify-content:center;padding:2px;position:relative;transition:background-color .2s ease,opacity .3s ease-out;width:16px}.vm-checkbox-track__thumb{align-items:center;color:#fff;display:grid;height:12px;justify-content:center;transform:scale(0);transition:transform .1s ease-in-out;width:12px}.vm-checkbox__label{color:inherit;font-size:inherit;margin-left:8px;transition:color .2s ease;white-space:nowrap}.vm-tooltip{animation:vm-scale .15s cubic-bezier(.28,.84,.42,1);background-color:var(--color-background-tooltip);border-radius:4px;box-shadow:var(--box-shadow-popper);color:#fff;font-size:12px;line-height:150%;opacity:1;padding:3px 8px;pointer-events:auto;position:fixed;transition:opacity .1s ease-in-out;white-space:nowrap;z-index:101}@keyframes vm-scale{0%{transform:scale(0)}to{transform:scale(1)}}.vm-switch{align-items:center;cursor:pointer;display:flex;font-size:12px;justify-content:flex-start;-webkit-user-select:none;user-select:none}.vm-switch_full-width{flex-direction:row-reverse;justify-content:space-between}.vm-switch_full-width .vm-switch__label{margin-left:0}.vm-switch_disabled{cursor:default;opacity:.6}.vm-switch_secondary_active .vm-switch-track{background-color:var(--color-secondary)}.vm-switch_primary_active .vm-switch-track{background-color:var(--color-primary)}.vm-switch_active .vm-switch-track__thumb{left:20px}.vm-switch:hover .vm-switch-track{opacity:.8}.vm-switch-track{align-items:center;background-color:#110f0f66;border-radius:17px;display:flex;height:17px;justify-content:flex-start;padding:3px;position:relative;transition:background-color .2s ease,opacity .3s ease-out;width:34px}.vm-switch-track__thumb{background-color:var(--color-background-block);border-radius:50%;left:3px;min-height:11px;min-width:11px;position:absolute;top:auto;transform-style:preserve-3d;transition:right .2s ease-out,left .2s ease-out}.vm-switch__label{color:var(--color-text-secondary);font-size:inherit;margin-left:8px;transition:color .2s ease;white-space:nowrap}.vm-switch_active .vm-switch__label{color:var(--color-text)}.vm-text-field{display:grid;margin:6px 0;position:relative;width:100%}.vm-text-field_textarea:after{content:attr(data-replicated-value) " ";overflow-wrap:break-word;visibility:hidden;white-space:pre-wrap}.vm-text-field:after,.vm-text-field__input{background-color:#0000;border:var(--border-divider);box-sizing:border-box;font-family:monospace;font-size:14px;grid-area:1/1/2/2;line-height:18px;overflow:hidden;padding:8px 12px;width:100%}.vm-text-field__error,.vm-text-field__helper-text,.vm-text-field__label,.vm-text-field__warning{-webkit-line-clamp:1;line-clamp:1;-webkit-box-orient:vertical;background-color:var(--color-background-block);display:-webkit-box;font-size:12px;left:6px;line-height:14px;max-width:calc(100% - 12px);overflow:hidden;padding:0 3px;pointer-events:none;position:absolute;text-overflow:ellipsis;-webkit-user-select:none;user-select:none;z-index:2}.vm-text-field__label{color:var(--color-text-secondary);top:-8px}.vm-text-field__error,.vm-text-field__helper-text,.vm-text-field__warning{overflow-wrap:anywhere;pointer-events:auto;position:relative;top:-6px;-webkit-user-select:text;user-select:text;width:-webkit-fit-content;width:-moz-fit-content;width:fit-content}.vm-text-field__error_full,.vm-text-field__helper-text_full,.vm-text-field__warning_full{display:block;overflow:visible}.vm-text-field__error_overflowed,.vm-text-field__helper-text_overflowed,.vm-text-field__warning_overflowed{cursor:pointer}.vm-text-field__error{color:var(--color-error)}.vm-text-field__warning{color:var(--color-warning)}.vm-text-field__helper-text{color:var(--color-text-secondary)}.vm-text-field__input{background-color:#0000;border-radius:4px;color:var(--color-text);display:block;overflow:hidden;resize:none;transition:border .2s ease}.vm-text-field__input:focus,.vm-text-field__input:hover{border:1px solid var(--color-primary)}.vm-text-field__input_error,.vm-text-field__input_error:focus,.vm-text-field__input_error:hover{border-color:var(--color-error)}.vm-text-field__input_warning,.vm-text-field__input_warning:focus,.vm-text-field__input_warning:hover{border-color:var(--color-warning)}.vm-text-field__input_icon-start{padding-left:31px}.vm-text-field__input:disabled{background-color:inherit;color:inherit}.vm-text-field__input:disabled:hover{border-color:var(--color-text-disabled)}.vm-text-field__icon-end,.vm-text-field__icon-start{align-items:center;color:var(--color-text-secondary);display:flex;height:36px;justify-content:center;left:8px;max-width:15px;position:absolute;top:0}.vm-text-field__icon-end{left:auto;right:8px}.vm-text-field__controls-info{bottom:8px;color:var(--color-text-secondary);font-size:12px;opacity:.8;position:absolute;right:12px}.vm-modal{align-items:center;background:#110f0f8c;bottom:0;display:flex;justify-content:center;left:0;position:fixed;right:0;top:0;z-index:100}.vm-modal_mobile{align-items:flex-start;max-height:calc(var(--vh)*100);min-height:calc(var(--vh)*100);overflow:auto}.vm-modal_mobile .vm-modal-content{border-radius:0;grid-template-rows:70px -webkit-max-content;grid-template-rows:70px max-content;max-height:-webkit-max-content;max-height:max-content;min-height:100%;overflow:visible;width:100vw}.vm-modal_mobile .vm-modal-content-header{margin-bottom:12px;padding:8px 8px 8px 12px}.vm-modal_mobile .vm-modal-content-header__title{max-width:80vw}.vm-modal_mobile .vm-modal-content-body{align-items:flex-start;display:grid;min-height:100%;padding:0 12px 12px}.vm-modal-content{background:var(--color-background-block);border-radius:4px;box-shadow:0 0 24px #110f0f12;max-height:calc(var(--vh)*90);overflow:auto}.vm-modal-content-header{grid-gap:8px;align-items:center;background-color:var(--color-background-block);border-bottom:var(--border-divider);border-radius:4px 4px 0 0;color:var(--color-text);display:grid;gap:8px;grid-template-columns:1fr auto;justify-content:space-between;margin-bottom:12px;min-height:51px;padding:12px;position:-webkit-sticky;position:sticky;top:0;z-index:3}.vm-modal-content-header__title{font-weight:700;max-width:50vw;overflow:hidden;text-overflow:ellipsis;-webkit-user-select:none;user-select:none;white-space:nowrap}.vm-modal-content-header__close{align-items:center;box-sizing:initial;color:#fff;cursor:pointer;display:flex;justify-content:center;padding:10px;width:24px}.vm-modal-content-body{padding:0 12px 12px}.vm-group-logs{margin-top:-12px}.vm-group-logs-header{align-items:center;display:flex;gap:12px;justify-content:flex-end}.vm-group-logs-header-keys{max-height:300px;overflow:auto}.vm-group-logs-header-keys__search{padding:8px}.vm-group-logs-section-keys{align-items:center;border-bottom:var(--border-divider);display:flex;flex-wrap:wrap;gap:8px;padding:8px 0}.vm-group-logs-section-keys__title{font-weight:700}.vm-group-logs-section-keys__title code{font-family:monospace}.vm-group-logs-section-keys__title code:after,.vm-group-logs-section-keys__title code:before{content:'"'}.vm-group-logs-section-keys__count{color:var(--color-text-secondary);flex-grow:1;font-size:12px;padding-right:48px;text-align:right}.vm-group-logs-section-keys__pair{background-color:#e3f1fa;border-radius:8px;color:#005cb3;padding:6px 12px;transition:background-color .3s ease-in,transform .1s ease-in,opacity .3s ease-in}.vm-group-logs-section-keys__pair:hover{background-color:#c9e3f6}.vm-group-logs-section-keys__pair:active{transform:translateY(3px)}.vm-group-logs-section-keys__pair_dark{background-color:var(--color-background-body);color:#80c1ff;opacity:.8}.vm-group-logs-section-keys__pair_dark:hover{background-color:var(--color-background-body);opacity:1}.vm-group-logs-section-rows{display:grid}.vm-group-logs-row{border-bottom:var(--border-divider);position:relative}.vm-group-logs-row-content{cursor:pointer;display:grid;grid-template-columns:auto minmax(180px,-webkit-max-content) 1fr;grid-template-columns:auto minmax(180px,max-content) 1fr;padding:12px 0;position:relative;transition:background-color .2s ease-in}.vm-group-logs-row-content:hover{background-color:var(--color-hover-black)}.vm-group-logs-row-content__arrow{align-items:center;display:flex;height:14px;justify-content:center;transform:rotate(-90deg);transition:transform .2s ease-out;width:16px}.vm-group-logs-row-content__arrow_open{transform:rotate(0deg)}.vm-group-logs-row-content__time{align-items:flex-start;display:flex;justify-content:flex-end;line-height:1;margin-right:8px;white-space:nowrap}.vm-group-logs-row-content__time_missing{color:var(--color-text-disabled);font-style:italic;justify-content:center}.vm-group-logs-row-content__msg{font-family:monospace;line-height:1.1;overflow-wrap:anywhere}.vm-group-logs-row-content__msg_empty-msg{overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.vm-group-logs-row-content__msg_missing{color:var(--color-text-disabled);font-style:italic;text-align:center}.vm-group-logs-row-content__msg code,.vm-group-logs-row-content__msg p,.vm-group-logs-row-content__msg pre{word-wrap:break-word;white-space:pre-wrap;word-break:normal}.vm-group-logs-row-content__msg code:not(pre code),.vm-group-logs-row-content__msg pre{font-feature-settings:none;background:var(--color-hover-black);border:1px solid var(--color-hover-black);border-radius:4px;display:inline-block;font-variant-ligatures:none;margin:2px 0;tab-size:4}.vm-group-logs-row-content__msg p{font-family:system-ui;line-height:1.4}.vm-group-logs-row-content__msg pre{padding:8px}.vm-group-logs-row-content__msg code{font-size:12px;padding:2px 4px}.vm-group-logs-row-content__msg a{color:var(--color-primary);cursor:pointer}.vm-group-logs-row-content__msg a:hover{text-decoration:underline}.vm-group-logs-row-content__msg strong{font-weight:700}.vm-group-logs-row-content__msg em{font-style:italic}.vm-group-logs-row-content__msg blockquote{border-left:4px solid var(--color-hover-black);margin:4px 8px;padding:4px 8px}.vm-group-logs-row-content__msg ol,.vm-group-logs-row-content__msg ul{list-style-position:inside}.vm-group-logs-row-fields{border:var(--border-divider);border-radius:4px;grid-row:2;margin-bottom:8px;max-height:300px;overflow:auto;padding:8px 0}.vm-group-logs-row-fields-item{border-radius:4px;transition:background-color .2s ease-in}.vm-group-logs-row-fields-item:hover{background-color:var(--color-hover-black)}.vm-group-logs-row-fields-item-controls{padding:0}.vm-group-logs-row-fields-item-controls__wrapper{align-items:center;display:flex;justify-content:center}.vm-group-logs-row-fields-item__key,.vm-group-logs-row-fields-item__value{padding:4px 12px;vertical-align:top}.vm-group-logs-row-fields-item__key{overflow-wrap:break-word;width:-webkit-max-content;width:max-content}.vm-group-logs-row-fields-item__value{white-space:pre-wrap;width:100%;word-break:break-all}.vm-accordion-header{align-items:center;cursor:pointer;display:grid;font-size:inherit;position:relative}.vm-accordion-header__arrow{align-items:center;display:flex;justify-content:center;position:absolute;right:14px;top:auto;transform:rotate(0);transition:transform .2s ease-in-out}.vm-accordion-header__arrow_open{transform:rotate(180deg)}.vm-accordion-header__arrow svg{height:auto;width:14px}.accordion-section{overflow:hidden}.vm-popper{background-color:var(--color-background-block);border-radius:4px;box-shadow:var(--box-shadow-popper);opacity:0;pointer-events:none;position:fixed;transition:opacity .1s ease-in-out;z-index:-99}.vm-popper_open{animation:vm-slider .15s cubic-bezier(.28,.84,.42,1.1);opacity:1;pointer-events:auto;transform-origin:top center;z-index:101}.vm-popper_mobile{animation:none;border-radius:0;bottom:0;left:0;overflow:auto;position:fixed;right:0;top:0;width:100%}.vm-popper-header{grid-gap:12px;align-items:center;background-color:var(--color-background-block);border-bottom:var(--border-divider);border-radius:4px 4px 0 0;color:var(--color-text);display:grid;gap:12px;grid-template-columns:1fr 25px;justify-content:space-between;margin-bottom:12px;padding:8px 12px}.vm-popper-header__title{font-size:12px;font-weight:700;-webkit-user-select:none;user-select:none}.vm-popper_dark{background-color:var(--color-background-tooltip);color:#fff}.vm-popper_dark .vm-popper-header{background-color:#0000;color:#fff}@keyframes vm-slider{0%{transform:scaleY(0)}to{transform:scaleY(1)}}.vm-spinner{align-items:center;animation:vm-fade 2s cubic-bezier(.28,.84,.42,1.1);background-color:#ffffff80;bottom:0;display:flex;flex-direction:column;justify-content:center;left:0;pointer-events:none;position:fixed;right:0;top:0;z-index:99}.vm-spinner_dark{background-color:#110f0f33}.vm-spinner__message{color:rgba(var(--color-text),.9);font-size:16px;line-height:1.3;margin-top:12px;text-align:center;white-space:pre-line}.half-circle-spinner,.half-circle-spinner *{box-sizing:border-box}.half-circle-spinner{border-radius:100%;height:60px;position:relative;width:60px}.half-circle-spinner .circle{border:6px solid #0000;border-radius:100%;content:"";height:100%;position:absolute;width:100%}.half-circle-spinner .circle.circle-1{animation:half-circle-spinner-animation 1s infinite;border-top-color:var(--color-primary)}.half-circle-spinner .circle.circle-2{animation:half-circle-spinner-animation 1s infinite alternate;border-bottom-color:var(--color-primary)}@keyframes half-circle-spinner-animation{0%{transform:rotate(0deg)}to{transform:rotate(1turn)}}@keyframes vm-fade{0%{opacity:0}to{opacity:1}}.vm-explore-logs-header{grid-gap:12px;align-items:center;display:grid;gap:12px}.vm-explore-logs-header-top{grid-gap:12px;align-items:flex-start;display:grid;gap:12px;grid-template-columns:8fr 2fr;justify-content:center}.vm-explore-logs-header-bottom{align-items:center;display:flex;flex-wrap:wrap;gap:12px;justify-content:flex-end}@media(max-width:500px){.vm-explore-logs-header-bottom{display:grid;justify-content:normal}}.vm-explore-logs-header-bottom-contols{flex-grow:1}.vm-explore-logs-header-bottom__execute{display:grid}.vm-explore-logs-header-bottom-helpful{align-items:center;display:flex;flex-wrap:wrap;gap:8px 12px;justify-content:center}.vm-explore-logs-header-bottom-helpful a{color:var(--color-text-secondary)}.vm-autocomplete{max-height:300px;overflow:auto;overscroll-behavior:none;position:relative}.vm-autocomplete_mobile{max-height:calc(var(--vh)*100 - 70px)}.vm-autocomplete__no-options{color:var(--color-text-disabled);padding:12px;text-align:center}.vm-autocomplete__loader{grid-gap:8px;align-items:center;color:var(--color-text-secondary);display:grid;gap:8px;grid-template-columns:14px auto;justify-content:center;padding:12px;pointer-events:none;z-index:2}.vm-autocomplete__loader svg{animation:half-circle-spinner-animation 1s linear infinite,vm-fade .5s ease-in}.vm-autocomplete-info,.vm-autocomplete-message{background-color:var(--color-background-block);border-top:var(--border-divider);padding:12px}.vm-autocomplete-message{color:var(--color-warning);font-size:12px;position:relative}.vm-autocomplete-message:after{background:var(--color-warning);content:"";height:100%;left:0;opacity:.1;position:absolute;top:0;width:100%}.vm-autocomplete-info{max-width:500px;min-width:450px;overflow-wrap:anywhere}.vm-autocomplete-info__type{color:var(--color-text-secondary);margin-bottom:8px}.vm-autocomplete-info__description{line-height:130%}.vm-autocomplete-info__description p{margin:12px 0}.vm-autocomplete-info__description p:last-child{margin:0}.vm-query-editor{position:relative}.vm-query-editor .marker-detection{left:0;pointer-events:none;position:absolute;top:0;visibility:hidden;z-index:-9999}.vm-explore-logs{grid-gap:12px;align-items:flex-start;display:grid;gap:12px;grid-template-rows:auto 1fr}.vm-explore-logs-chart{align-items:center;display:flex;justify-content:center;padding:0 0 0 8px!important;position:relative;width:calc(100vw - 24px)}@media(max-width:768px){.vm-explore-logs-chart{width:100vw}}.vm-explore-logs-chart__empty{position:absolute;transform:translateY(-25px);z-index:2}.vm-bar-hits-chart{height:200px;position:relative;width:100%}.vm-bar-hits-chart__wrapper{display:flex;flex-direction:column;height:100%;width:100%}.vm-bar-hits-chart_panning{pointer-events:none}.uplot,.uplot *,.uplot :after,.uplot :before{box-sizing:border-box}.uplot{font-family:system-ui,-apple-system,Segoe UI,Roboto,Helvetica Neue,Arial,Noto Sans,sans-serif,Apple Color Emoji,Segoe UI Emoji,Segoe UI Symbol,Noto Color Emoji;line-height:1.5;width:-webkit-min-content;width:min-content}.u-title{font-size:18px;font-weight:700;text-align:center}.u-wrap{position:relative;-webkit-user-select:none;user-select:none}.u-over,.u-under{position:absolute}.u-under{overflow:hidden}.uplot canvas{display:block;height:100%;position:relative;width:100%}.u-axis{position:absolute}.u-legend{font-size:14px;margin:auto;text-align:center}.u-inline{display:block}.u-inline *{display:inline-block}.u-inline tr{margin-right:16px}.u-legend th{font-weight:600}.u-legend th>*{display:inline-block;vertical-align:middle}.u-legend .u-marker{background-clip:padding-box!important;height:1em;margin-right:4px;width:1em}.u-inline.u-live th:after{content:":";vertical-align:middle}.u-inline:not(.u-live) .u-value{display:none}.u-series>*{padding:4px}.u-series th{cursor:pointer}.u-legend .u-off>*{opacity:.3}.u-select{background:#00000012}.u-cursor-x,.u-cursor-y,.u-select{pointer-events:none;position:absolute}.u-cursor-x,.u-cursor-y{left:0;top:0;will-change:transform}.u-hz .u-cursor-x,.u-vt .u-cursor-y{border-right:1px dashed #607d8b;height:100%}.u-hz .u-cursor-y,.u-vt .u-cursor-x{border-bottom:1px dashed #607d8b;width:100%}.u-cursor-pt{background-clip:padding-box!important;border:0 solid;border-radius:50%;left:0;pointer-events:none;position:absolute;top:0;will-change:transform}.u-axis.u-off,.u-cursor-pt.u-off,.u-cursor-x.u-off,.u-cursor-y.u-off,.u-select.u-off{display:none}.vm-bar-hits-tooltip{gap:8px;opacity:0;pointer-events:none}.vm-bar-hits-tooltip_visible{opacity:1;pointer-events:auto}.vm-chart-tooltip{grid-gap:12px;word-wrap:break-word;background:var(--color-background-tooltip);border-radius:8px;color:#fff;display:grid;font-family:monospace;font-size:12px;font-weight:400;gap:12px;line-height:150%;padding:12px;pointer-events:none;position:absolute;-webkit-user-select:text;user-select:text;width:370px;z-index:98}.vm-chart-tooltip_hits{max-width:33.3333333333vw;white-space:pre-wrap;width:auto;word-break:break-all}.vm-chart-tooltip_sticky{pointer-events:auto;z-index:99}.vm-chart-tooltip_moved{margin-left:-316.5px;margin-top:-24.5px;position:fixed}.vm-chart-tooltip-header{grid-gap:8px;align-items:center;display:grid;gap:8px;grid-template-columns:1fr 25px 25px;justify-content:center;min-height:25px}.vm-chart-tooltip-header__title{grid-row:1}.vm-chart-tooltip-header__close{color:#fff;grid-column:3;grid-row:1}.vm-chart-tooltip-header__drag{color:#fff;cursor:move;grid-column:2;grid-row:1}.vm-chart-tooltip-header__date{grid-gap:2px;display:grid;gap:2px;grid-column:1}.vm-chart-tooltip-data{align-items:center;display:flex;gap:8px;justify-content:flex-start}.vm-chart-tooltip-data_margin-bottom{margin-bottom:12px}.vm-chart-tooltip-data_margin-top{margin-top:12px}.vm-chart-tooltip-data__marker{border:1px solid #ffffff80;height:14px;width:14px}.vm-chart-tooltip-data__marker_tranparent{opacity:0}.vm-chart-tooltip-data__value{font-size:14px;line-height:1}.vm-chart-tooltip-stats{align-items:center;display:flex;flex-wrap:wrap;gap:8px 12px;justify-content:flex-start}.vm-chart-tooltip-stats-row{align-items:center;display:grid;justify-content:flex-start}.vm-chart-tooltip-stats-row:not(:last-child){padding-right:8px}.vm-chart-tooltip-stats-row__key{line-height:1;margin-right:4px}.vm-chart-tooltip-stats-row__value{font-weight:700}.vm-chart-tooltip__info{white-space:pre-wrap;word-break:break-all}.vm-bar-hits-options{position:absolute;right:8px;top:8px;z-index:2}.vm-bar-hits-options-settings{grid-gap:12px;align-items:flex-start;display:grid;gap:12px;min-width:200px}.vm-bar-hits-options-settings-item{border-bottom:var(--border-divider);padding:0 12px 12px}.vm-bar-hits-options-settings-item_list{padding:0}.vm-bar-hits-options-settings-item__title{color:var(--color-text-secondary);font-size:12px;padding:0 8px 8px}.vm-bar-hits-options-settings-item:last-child{border-bottom:none}.vm-bar-hits-legend{display:flex;flex-wrap:wrap;gap:8px;padding:0 8px 8px}.vm-bar-hits-legend-item{grid-gap:8px;align-items:center;border-radius:4px;cursor:pointer;display:grid;font-size:12px;gap:8px;grid-template-columns:auto 1fr;padding:0 8px;transition:.2s}.vm-bar-hits-legend-item:hover{background-color:#0000000d}.vm-bar-hits-legend-item_hide{opacity:.5;text-decoration:line-through}.vm-bar-hits-legend-item__marker{border:var(--color-background-block);height:14px;width:14px}.vm-bar-hits-legend-item-pairs{display:flex;gap:8px}.vm-bar-hits-legend-item-pairs__value{padding:8px 0}.vm-bar-hits-legend-item-pairs__value:hover{text-decoration:underline}.vm-bar-hits-legend-item-pairs__value:after{content:","}.vm-bar-hits-legend-item-pairs__value:last-child:after{content:""}.vm-bar-hits-legend-info{list-style-position:inside}.vm-legend{cursor:default;display:flex;flex-wrap:wrap;position:relative}.vm-legend-group{margin:0 12px 12px 0;min-width:23%;width:100%}.vm-legend-group-title{align-items:center;border-bottom:var(--border-divider);display:flex;margin-bottom:1px;padding:8px}.vm-legend-group-title__count{font-weight:700;margin-right:8px}.vm-header{align-items:center;display:flex;flex-wrap:wrap;gap:0 16px;justify-content:flex-start;min-height:51px;padding:8px 12px;z-index:99}.vm-header_app{padding:8px 0}@media(max-width:1000px){.vm-header{gap:8px;padding:8px;position:-webkit-sticky;position:sticky;top:0}}.vm-header_sidebar{display:grid;grid-template-columns:40px auto 1fr}.vm-header_mobile{display:grid;grid-template-columns:33px 1fr 33px;justify-content:space-between}.vm-header_dark .vm-header-button,.vm-header_dark button,.vm-header_dark button:before{background-color:var(--color-background-block)}.vm-header-logo{align-items:center;cursor:pointer;display:flex;justify-content:flex-start;margin-bottom:2px;overflow:hidden;position:relative;width:100%}.vm-header-logo,.vm-header-logo svg,.vm-header-logo_mobile{max-width:65px;min-width:65px}.vm-header-logo_mobile{margin:0 auto}.vm-header-logo_logs,.vm-header-logo_logs svg{max-width:75px;min-width:75px}.vm-header-nav{align-items:center;display:flex;gap:12px;justify-content:flex-start}.vm-header-nav_column{align-items:stretch;flex-direction:column;gap:8px}.vm-header-nav_column .vm-header-nav-item{padding:12px 0}.vm-header-nav_column .vm-header-nav-item_sub{justify-content:stretch}.vm-header-nav-item{cursor:pointer;font-size:14px;font-weight:400;opacity:1;padding:12px 8px;position:relative;text-transform:capitalize;transition:opacity .2s ease-in}.vm-header-nav-item_sub{grid-gap:4px;align-items:center;cursor:default;display:grid;gap:4px;grid-template-columns:auto 14px;justify-content:center}.vm-header-nav-item:hover{opacity:.7}.vm-header-nav-item_active{border-bottom:2px solid #110f0f33}.vm-header-nav-item svg{transform:rotate(0deg);transition:transform .2s ease-in}.vm-header-nav-item_open svg{transform:rotate(180deg)}.vm-header-nav-item-submenu{border-radius:4px;color:#fff;display:grid;opacity:1;padding:8px;transform-origin:top center;white-space:nowrap}.vm-header-nav-item-submenu-item{cursor:pointer}.vm-shortcuts{min-width:400px}@media(max-width:500px){.vm-shortcuts{min-width:100%}}.vm-shortcuts-section{border-bottom:var(--border-divider);margin-bottom:12px;padding-bottom:12px;position:relative}.vm-shortcuts-section__title{font-weight:700;margin-bottom:12px}.vm-shortcuts-section__read-more{position:absolute;right:0;top:-8px}.vm-shortcuts-section-list{grid-gap:12px;display:grid;gap:12px}@media(max-width:500px){.vm-shortcuts-section-list{gap:12px}}.vm-shortcuts-section-list-item{grid-gap:8px;align-items:center;display:grid;gap:8px;grid-template-columns:210px 1fr}@media(max-width:500px){.vm-shortcuts-section-list-item{grid-template-columns:1fr}}.vm-shortcuts-section-list-item__key{align-items:center;display:flex;gap:4px}.vm-shortcuts-section-list-item__key code,.vm-shortcuts-section-list-item__key svg{background-color:var(--color-background-body);background-repeat:repeat-x;border:var(--border-divider);border-radius:4px;color:var(--color-text);display:inline-block;font-size:12px;line-height:2;padding:2px 8px 0;text-align:center}.vm-shortcuts-section-list-item__key svg{color:var(--color-primary);padding:4px;width:24px}.vm-shortcuts-section-list-item__description{font-size:14px}.fc-graph-tips{grid-gap:12px;display:grid;gap:12px;max-width:520px}.fc-graph-tips-item{grid-gap:8px;border-bottom:var(--border-divider);display:grid;gap:8px;line-height:1.3;padding-bottom:12px}.fc-graph-tips-item__action{color:var(--color-text-secondary);font-weight:700}.fc-graph-tips-item__description{display:inline-block;line-height:1.5}.fc-graph-tips-item__description code,.fc-graph-tips-item__description svg{align-items:center;background-color:var(--color-background-body);border:var(--border-divider);border-radius:4px;color:var(--color-text);display:inline-flex;font-size:12px;justify-content:center;margin:0 2px 2px;min-height:20px;min-width:20px;padding:0 4px}.fc-graph-tips-item svg{color:var(--color-primary);margin-top:-8px;padding:2px;transform:translateY(8px);width:18px}.vm-menu-burger{background:none;border:none;cursor:pointer;height:18px;outline:none;padding:0;position:relative;transform-style:preserve-3d;width:18px}.vm-menu-burger:after{background-color:#110f0f1a;border-radius:50%;content:"";height:calc(100% + 12px);left:-6px;position:absolute;top:-6px;transform:scale(0) translateZ(-2px);transition:transform .14s ease-in-out;width:calc(100% + 12px)}.vm-menu-burger:hover:after{transform:scale(1) translateZ(-2px)}.vm-menu-burger span{border-top:2px solid #fff;display:block;top:50%;transform:translateY(-50%);transition:transform .3s ease,border-color .3s ease}.vm-menu-burger span,.vm-menu-burger span:after,.vm-menu-burger span:before{border-radius:6px;height:2px;left:0;position:absolute;width:100%}.vm-menu-burger span:after,.vm-menu-burger span:before{animation-duration:.6s;animation-fill-mode:forwards;animation-timing-function:cubic-bezier(.645,.045,.355,1);background:#fff;content:"";top:0}.vm-menu-burger span:before{animation-name:topLineBurger}.vm-menu-burger span:after{animation-name:bottomLineBurger}.vm-menu-burger_opened span{border-color:#0000}.vm-menu-burger_opened span:before{animation-name:topLineCross}.vm-menu-burger_opened span:after{animation-name:bottomLineCross}@keyframes topLineCross{0%{transform:translateY(-7px)}50%{transform:translateY(0)}to{transform:translateY(-2px) translateX(30%) rotate(45deg);width:60%}}@keyframes bottomLineCross{0%{transform:translateY(3px)}50%{transform:translateY(0)}to{transform:translateY(-2px) translateX(30%) rotate(-45deg);width:60%}}@keyframes topLineBurger{0%{transform:translateY(0) rotate(45deg)}50%{transform:rotate(0deg)}to{transform:translateY(-7px) rotate(0deg)}}@keyframes bottomLineBurger{0%{transform:translateY(0) rotate(-45deg)}50%{transform:rotate(0deg)}to{transform:translateY(3px) rotate(0deg)}}.vm-header-sidebar{background-color:inherit;color:inherit;height:24px;width:24px}.vm-header-sidebar-button{align-items:center;display:flex;height:51px;justify-content:center;left:0;position:absolute;top:0;transition:left .35s cubic-bezier(.28,.84,.42,1);width:51px}.vm-header-sidebar-button_open{left:149px;position:fixed;z-index:102}.vm-header-sidebar-menu{grid-gap:12px;background-color:inherit;box-shadow:var(--box-shadow-popper);display:grid;gap:12px;grid-template-rows:1fr auto;height:100%;left:0;padding:12px;position:fixed;top:0;transform:translateX(-100%);transform-origin:left;transition:transform .3s cubic-bezier(.28,.84,.42,1);width:200px;z-index:101}.vm-header-sidebar-menu_open{transform:translateX(0)}.vm-header-sidebar-menu__logo{align-items:center;cursor:pointer;display:flex;justify-content:flex-start;position:relative;width:65px}.vm-header-sidebar-menu-settings{grid-gap:8px;align-items:center;display:grid;gap:8px}.vm-header-controls{align-items:center;display:flex;flex-grow:1;gap:8px;justify-content:flex-end}.vm-header-controls_mobile{display:grid;grid-template-columns:1fr;padding:0}.vm-header-controls_mobile .vm-header-button{border:none}.vm-header-controls-modal{transform:scale(0)}.vm-header-controls-modal_open{transform:scale(1)}.vm-container{display:flex;flex-direction:column;min-height:calc(var(--vh)*100 - var(--scrollbar-height))}.vm-container-body{background-color:var(--color-background-body);flex-grow:1;min-height:100%;padding:12px}.vm-container-body_mobile{padding:8px 0 0}@media(max-width:768px){.vm-container-body{padding:8px 0 0}}.vm-container-body_app{background-color:#0000;padding:8px 0}.vm-footer{align-items:center;background:var(--color-background-body);border-top:var(--border-divider);color:var(--color-text-secondary);display:flex;flex-wrap:wrap;gap:12px;justify-content:center;padding:12px}@media(max-width:768px){.vm-footer{gap:12px;padding:12px}}.vm-footer__link,.vm-footer__website{grid-gap:6px;align-items:center;display:grid;gap:6px;grid-template-columns:12px auto;justify-content:center}.vm-footer__website{margin-right:12px}@media(max-width:768px){.vm-footer__website{margin-right:0}}.vm-footer__link{grid-template-columns:14px auto}.vm-footer__copyright{flex-grow:1;text-align:right}@media(max-width:768px){.vm-footer__copyright{font-size:12px;text-align:center;width:100%}}.vm-server-configurator{align-items:center;display:flex;flex-direction:column;gap:16px;padding-bottom:12px;width:600px}.vm-server-configurator_mobile{align-items:flex-start;grid-auto-rows:-webkit-min-content;grid-auto-rows:min-content;height:100%;width:100%}@media(max-width:768px){.vm-server-configurator{width:100%}}.vm-server-configurator__input{width:100%}.vm-server-configurator__input_flex{align-items:flex-start;display:flex;gap:12px}.vm-server-configurator__title{align-items:center;display:flex;font-size:14px;font-weight:700;grid-column:auto/span 2;justify-content:flex-start;margin-bottom:12px}.vm-server-configurator__info{color:var(--color-text-secondary);font-size:12px;line-height:130%;padding-top:8px}.vm-server-configurator-url{align-items:flex-start;display:flex;gap:8px}.vm-server-configurator-url__button{margin-top:8px}.vm-server-configurator-footer{align-items:center;display:flex;gap:8px;justify-content:flex-end;width:100%}.vm-server-configurator_mobile .vm-server-configurator-footer{display:grid;grid-template-columns:1fr 1fr}.vm-limits-configurator-title__reset{align-items:center;display:flex;flex-grow:1;justify-content:flex-end}.vm-limits-configurator__inputs{grid-gap:12px;align-items:center;display:grid;flex-wrap:wrap;gap:12px;grid-template-columns:repeat(auto-fit,minmax(150px,1fr));justify-content:space-between}.vm-limits-configurator__inputs_mobile{gap:8px}.vm-timezones-item{align-items:center;cursor:pointer;display:flex;gap:8px;justify-content:space-between}.vm-timezones-item_selected{border:var(--border-divider);border-radius:4px;padding:8px 12px}.vm-timezones-item__title{align-items:center;display:flex;gap:8px;text-transform:capitalize}.vm-timezones-item__title svg{color:var(--color-warning);width:14px}.vm-timezones-item__utc{align-items:center;background-color:var(--color-hover-black);border-radius:4px;display:inline-flex;justify-content:center;padding:4px}.vm-timezones-item__icon{align-items:center;display:inline-flex;justify-content:flex-end;margin:0 0 0 auto;transition:transform .2s ease-in}.vm-timezones-item__icon svg{width:14px}.vm-timezones-item__icon_open{transform:rotate(180deg)}.vm-timezones-list{background-color:var(--color-background-block);border-radius:8px;max-height:300px;overflow:auto}.vm-timezones-list_mobile{max-height:calc(var(--vh)*100 - 70px)}.vm-timezones-list_mobile .vm-timezones-list-header__search{padding:0 12px}.vm-timezones-list-header{background-color:var(--color-background-block);border-bottom:var(--border-divider);position:-webkit-sticky;position:sticky;top:0;z-index:2}.vm-timezones-list-header__search{padding:8px}.vm-timezones-list-group{border-bottom:var(--border-divider);padding:8px 0}.vm-timezones-list-group:last-child{border-bottom:none}.vm-timezones-list-group__title{color:var(--color-text-secondary);font-weight:700;padding:8px 12px}.vm-timezones-list-group-options{align-items:flex-start;display:grid}.vm-timezones-list-group-options__item{padding:8px 12px;transition:background-color .2s ease}.vm-timezones-list-group-options__item:hover{background-color:#110f0f1a}.vm-theme-control__toggle{display:inline-flex;min-width:300px;text-transform:capitalize}.vm-theme-control_mobile .vm-theme-control__toggle{display:flex;min-width:100%}.vm-toggles{grid-gap:3px;display:grid;gap:3px;position:relative;width:100%}.vm-toggles__label{color:var(--color-text-secondary);font-size:12px;line-height:1;padding:0 12px}.vm-toggles-group{overflow:hidden;width:100%}.vm-toggles-group,.vm-toggles-group-item{align-items:center;display:grid;justify-content:center;position:relative}.vm-toggles-group-item{border-bottom:var(--border-divider);border-right:var(--border-divider);border-top:var(--border-divider);color:var(--color-text-secondary);cursor:pointer;font-size:12px;font-weight:700;padding:8px;text-align:center;transition:color .15s ease-in;-webkit-user-select:none;user-select:none;z-index:2}.vm-toggles-group-item_first{border-left:var(--border-divider);border-radius:16px 0 0 16px}.vm-toggles-group-item:last-child{border-left:none;border-radius:0 16px 16px 0}.vm-toggles-group-item_icon{gap:4px;grid-template-columns:14px auto}.vm-toggles-group-item:hover{color:var(--color-primary)}.vm-toggles-group-item_active{border-color:#0000;color:var(--color-primary)}.vm-toggles-group-item_active:hover{background-color:#0000}.vm-toggles-group__highlight{background-color:rgba(var(--color-primary),.08);border:1px solid var(--color-primary);height:100%;position:absolute;top:0;transition:left .2s cubic-bezier(.28,.84,.42,1),border-radius .2s linear;z-index:1}.vm-time-duration{font-size:14px;max-height:227px;overflow:auto}.vm-time-duration_mobile{max-height:100%}.vm-time-selector{display:grid;grid-template-columns:repeat(2,230px);padding:12px 0}.vm-time-selector_mobile{grid-template-columns:1fr;max-height:calc(var(--vh)*100 - 70px);min-width:250px;overflow:auto;width:100%}.vm-time-selector_mobile .vm-time-selector-left{border-bottom:var(--border-divider);border-right:none;padding-bottom:12px}.vm-time-selector-left{border-right:var(--border-divider);display:flex;flex-direction:column;gap:8px;padding:0 12px}.vm-time-selector-left-inputs{align-items:flex-start;display:grid;flex-grow:1;justify-content:stretch}.vm-time-selector-left-timezone{align-items:center;display:flex;font-size:12px;gap:8px;justify-content:space-between;margin-bottom:8px}.vm-time-selector-left-timezone__utc{align-items:center;background-color:var(--color-hover-black);border-radius:4px;display:inline-flex;justify-content:center;padding:4px}.vm-time-selector-left__controls{grid-gap:8px;display:grid;gap:8px;grid-template-columns:repeat(2,1fr)}.vm-calendar{background-color:var(--color-background-block);border-radius:8px;display:grid;font-size:14px;grid-template-rows:auto 1fr auto;padding:12px;-webkit-user-select:none;user-select:none}.vm-calendar_mobile{padding:0 12px}.vm-calendar-header{grid-gap:12px;align-items:center;display:grid;gap:12px;grid-template-columns:1fr auto;justify-content:center;min-height:36px;padding-bottom:12px}.vm-calendar-header-left{grid-gap:8px;align-items:center;cursor:pointer;display:grid;gap:8px;grid-template-columns:auto auto;justify-content:flex-start;transition:opacity .2s ease-in-out}.vm-calendar-header-left:hover{opacity:.8}.vm-calendar-header-left__date{color:var(--color-text);font-size:14px;font-weight:700}.vm-calendar-header-left__select-year{align-items:center;display:grid;height:14px;justify-content:center;width:14px}.vm-calendar-header-right{grid-gap:8px;align-items:center;display:grid;gap:8px;grid-template-columns:18px 18px;justify-content:center}.vm-calendar-header-right__next,.vm-calendar-header-right__prev{cursor:pointer;margin:-8px;padding:8px;transition:opacity .2s ease-in-out}.vm-calendar-header-right__next:hover,.vm-calendar-header-right__prev:hover{opacity:.8}.vm-calendar-header-right__prev{transform:rotate(90deg)}.vm-calendar-header-right__next{transform:rotate(-90deg)}.vm-calendar-body{grid-gap:2px;align-items:center;display:grid;gap:2px;grid-template-columns:repeat(7,32px);grid-template-rows:repeat(7,32px);justify-content:center}@media(max-width:500px){.vm-calendar-body{grid-template-columns:repeat(7,calc(14.28571vw - 5.14286px));grid-template-rows:repeat(7,calc(14.28571vw - 5.14286px))}}.vm-calendar-body-cell{align-items:center;border-radius:50%;display:flex;height:100%;justify-content:center;text-align:center}.vm-calendar-body-cell_weekday{color:var(--color-text-secondary)}.vm-calendar-body-cell_day{cursor:pointer;transition:color .2s ease,background-color .3s ease-in-out}.vm-calendar-body-cell_day:hover{background-color:var(--color-hover-black)}.vm-calendar-body-cell_day_empty{pointer-events:none}.vm-calendar-body-cell_day_active{color:#fff}.vm-calendar-body-cell_day_active,.vm-calendar-body-cell_day_active:hover{background-color:var(--color-primary)}.vm-calendar-body-cell_day_today{border:1px solid var(--color-primary)}.vm-calendar-years{grid-gap:8px;display:grid;gap:8px;grid-template-columns:repeat(3,1fr);max-height:400px;overflow:auto}.vm-calendar-years__year{align-items:center;border-radius:8px;cursor:pointer;display:flex;justify-content:center;padding:8px 16px;transition:color .2s ease,background-color .3s ease-in-out}.vm-calendar-years__year:hover{background-color:var(--color-hover-black)}.vm-calendar-years__year_selected{color:#fff}.vm-calendar-years__year_selected,.vm-calendar-years__year_selected:hover{background-color:var(--color-primary)}.vm-calendar-years__year_today{border:1px solid var(--color-primary)}.vm-calendar-footer{align-items:center;display:flex;justify-content:flex-end}.vm-date-time-input{grid-gap:8px 0;align-items:center;cursor:pointer;display:grid;gap:8px 0;grid-template-columns:1fr;justify-content:center;margin-bottom:12px;position:relative;transition:color .2s ease-in-out,border-bottom-color .3s ease}.vm-date-time-input:hover input{border-bottom-color:var(--color-primary)}.vm-date-time-input label{color:var(--color-text-secondary);font-size:12px;grid-column:1/3;-webkit-user-select:none;user-select:none;width:100%}.vm-date-time-input__icon{bottom:2px;position:absolute;right:0}.vm-date-time-input input{background:#0000;border:none;border-bottom:var(--border-divider);color:var(--color-text);padding:0 0 8px}.vm-date-time-input input:focus{border-bottom-color:var(--color-primary)}.vm-date-time-input_error input{border-color:var(--color-error)}.vm-date-time-input_error input:focus{border-bottom-color:var(--color-error)}.vm-date-time-input__error-text{bottom:-12px;color:var(--color-error);font-size:12px;left:0;position:absolute}.vm-tenant-input{position:relative}.vm-tenant-input-list{border-radius:8px;max-height:300px;overflow:auto;overscroll-behavior:none}.vm-tenant-input-list_mobile{max-height:calc(var(--vh)*100 - 70px)}.vm-tenant-input-list_mobile .vm-tenant-input-list__search{padding:0 12px 8px}.vm-tenant-input-list_inline{grid-gap:4px;display:grid;gap:4px;padding:12px}.vm-tenant-input-list__search{background-color:var(--color-background-block);padding:8px 12px;position:-webkit-sticky;position:sticky;top:0}.vm-tenant-input-list__buttons{display:flex;gap:8px;justify-content:space-between}.vm-button{align-items:center;border-radius:6px;color:#fff;cursor:pointer;display:flex;font-size:12px;font-weight:400;justify-content:center;line-height:15px;min-height:31px;padding:6px 14px;position:relative;text-transform:uppercase;transform-style:preserve-3d;-webkit-user-select:none;user-select:none;white-space:nowrap}.vm-button:hover:after{background-color:var(--color-hover-black)}.vm-button:after,.vm-button:before{border-radius:6px;content:"";height:100%;left:0;position:absolute;top:0;transition:background-color .2s ease;width:100%}.vm-button:before{transform:translateZ(-2px)}.vm-button:after{background-color:#0000;transform:translateZ(-1px)}.vm-button:active:after{transform:scale(.9)}.vm-button span{align-items:center;display:grid;justify-content:center;transform:translateZ(1px)}.vm-button span svg{width:15px}.vm-button__start-icon{margin-right:6px}.vm-button__end-icon{margin-left:6px}.vm-button_disabled{cursor:not-allowed;opacity:.3}.vm-button_icon{padding:6px 8px}.vm-button_icon .vm-button__end-icon,.vm-button_icon .vm-button__start-icon{margin:0}.vm-button_small{min-height:25px;padding:4px 8px}.vm-button_small span svg{width:13px}.vm-button_contained_primary{color:var(--color-primary-text)}.vm-button_contained_primary,.vm-button_contained_primary:before{background-color:var(--color-primary)}.vm-button_contained_primary:hover:after{background-color:#110f0f33}.vm-button_contained_secondary{color:var(--color-secondary-text)}.vm-button_contained_secondary:before{background-color:var(--color-secondary)}.vm-button_contained_secondary:hover:after{background-color:#110f0f33}.vm-button_contained_success{color:var(--color-success-text)}.vm-button_contained_success:before{background-color:var(--color-success)}.vm-button_contained_success:hover:after{background-color:#110f0f33}.vm-button_contained_error{color:var(--color-error-text)}.vm-button_contained_error:before{background-color:var(--color-error)}.vm-button_contained_gray{color:var(--color-text-secondary)}.vm-button_contained_gray:before{background-color:var(--color-text-secondary)}.vm-button_contained_warning{color:var(--color-warning)}.vm-button_contained_warning:before{background-color:var(--color-warning);opacity:.2}.vm-button_text_primary{color:var(--color-primary)}.vm-button_text_secondary{color:var(--color-secondary)}.vm-button_text_success{color:var(--color-success)}.vm-button_text_error{color:var(--color-error)}.vm-button_text_gray{color:var(--color-text-secondary)}.vm-button_text_white{color:#fff}.vm-button_text_warning{color:var(--color-warning)}.vm-button_outlined_primary{border:1px solid var(--color-primary);color:var(--color-primary)}.vm-button_outlined_error{border:1px solid var(--color-error);color:var(--color-error)}.vm-button_outlined_secondary{border:1px solid var(--color-secondary);color:var(--color-secondary)}.vm-button_outlined_success{border:1px solid var(--color-success);color:var(--color-success)}.vm-button_outlined_gray{border:1px solid var(--color-text-secondary);color:var(--color-text-secondary)}.vm-button_outlined_white{border:1px solid #fff;color:#fff}.vm-button_outlined_warning{border:1px solid var(--color-warning);color:var(--color-warning)}.vm-execution-controls-buttons{border-radius:7px;display:flex;justify-content:space-between;min-width:107px}.vm-execution-controls-buttons_mobile{flex-direction:column;gap:12px}.vm-execution-controls-buttons__arrow{align-items:center;display:flex;justify-content:center;transform:rotate(0);transition:transform .2s ease-in-out}.vm-execution-controls-buttons__arrow_open{transform:rotate(180deg)}.vm-execution-controls-list{font-size:14px;max-height:208px;overflow:auto;padding:8px 0;width:124px}.vm-execution-controls-list_mobile{max-height:calc(var(--vh)*100 - 70px);padding:0;width:100%}#root,body,html{background-attachment:fixed;background-color:#fefeff;background-color:var(--color-background-body);background-repeat:no-repeat;color:#110f0f;color:var(--color-text);cursor:default;font-family:system-ui;font-size:14px;margin:0;min-height:100%}body{overflow:auto}*{-webkit-tap-highlight-color:rgba(0,0,0,0);cursor:inherit;font:inherit;touch-action:pan-x pan-y}code{font-family:monospace}b{font-weight:700}input,textarea{cursor:text}input::placeholder,textarea::placeholder{-webkit-user-select:none;user-select:none}input[type=number]::-webkit-inner-spin-button,input[type=number]::-webkit-outer-spin-button{-webkit-appearance:none;margin:0}.vm-snackbar{animation:vm-slide-snackbar .15s cubic-bezier(.28,.84,.42,1.1);bottom:12px;left:12px;position:fixed;z-index:999}.vm-snackbar-content{align-items:center;display:grid;grid-template-columns:1fr auto}.vm-snackbar-content__close{color:inherit;height:24px;opacity:.8;padding:4px;width:24px}.vm-snackbar_mobile{bottom:0;left:0;right:0}@keyframes vm-slide-snackbar{0%{transform:translateY(100%)}to{transform:translateY(0)}}svg{width:100%}*{scrollbar-color:#a09f9f #fff;scrollbar-color:var(--color-text-disabled) var(--color-background-block);scrollbar-width:thin}::-webkit-scrollbar{width:12px}::-webkit-scrollbar-track{background:#fff;background:var(--color-background-block)}::-webkit-scrollbar-thumb{background-color:#a09f9f;background-color:var(--color-text-disabled);border:3px solid #fff;border:3px solid var(--color-background-block);border-radius:20px}a,abbr,acronym,address,applet,article,aside,audio,big,body,canvas,caption,center,cite,code,del,details,dfn,div,em,embed,fieldset,figcaption,figure,footer,form,h1,h2,h3,h4,h5,h6,header,hgroup,html,iframe,img,ins,kbd,label,legend,li,mark,menu,nav,object,ol,output,p,pre,q,ruby,s,samp,section,small,span,strike,strong,sub,summary,sup,table,tbody,td,tfoot,th,thead,time,tr,tt,u,ul,var,video{border:0;margin:0;padding:0;vertical-align:initial}h1,h2,h3,h4,h5,h6{font-weight:400}article,aside,details,figcaption,figure,footer,header,hgroup,menu,nav,section{display:block}body{line-height:1}q:after,q:before{content:""}table{border-collapse:collapse;border-spacing:0}input::placeholder{opacity:1;transition:opacity .3s ease}input:focus::placeholder{opacity:0;transition:opacity .3s ease}*{box-sizing:border-box;outline:none}button{background:none;border:none;border-radius:0;padding:0}strong{letter-spacing:1px}input[type=file]{cursor:pointer;font-size:0;height:100%;left:0;opacity:0;position:absolute;top:0;width:100%}input[type=file]:disabled{cursor:not-allowed}a{color:inherit;text-decoration:inherit}input,textarea{-webkit-text-fill-color:inherit;appearance:none;-webkit-appearance:none}input:disabled,textarea:disabled{opacity:1!important}input:placeholder-shown,textarea:placeholder-shown{width:100%}input:-webkit-autofill,input:-webkit-autofill:active,input:-webkit-autofill:focus,input:-webkit-autofill:hover{-webkit-box-shadow:inset 0 0 0 0 #fff!important;width:100%;z-index:2}.vm-header-button{border:1px solid #110f0f33}.vm-list-item{background-color:#0000;cursor:pointer;padding:12px;transition:background-color .2s ease}.vm-list-item_mobile{padding:12px}.vm-list-item:hover,.vm-list-item_active{background-color:#0000000f;background-color:var(--color-hover-black)}.vm-list-item_multiselect{grid-gap:8px;align-items:center;display:grid;gap:8px;grid-template-columns:10px 1fr;justify-content:flex-start}.vm-list-item_multiselect svg{animation:vm-scale .15s cubic-bezier(.28,.84,.42,1)}.vm-list-item_multiselect span{grid-column:2}.vm-list-item_multiselect_selected{color:#3f51b5;color:var(--color-primary)}.vm-list-item_with-icon{grid-gap:4px;display:grid;gap:4px;grid-template-columns:14px 1fr}.vm-list-item_with-icon,.vm-mobile-option{align-items:center;justify-content:flex-start}.vm-mobile-option{display:flex;gap:8px;padding:6px 0;-webkit-user-select:none;user-select:none;width:100%}.vm-mobile-option__arrow,.vm-mobile-option__icon{align-items:center;display:flex;justify-content:center}.vm-mobile-option__icon{color:#3f51b5;color:var(--color-primary);height:22px;width:22px}.vm-mobile-option__arrow{color:#3f51b5;color:var(--color-primary);height:14px;transform:rotate(-90deg);width:14px}.vm-mobile-option-text{grid-gap:2px;align-items:center;display:grid;flex-grow:1;gap:2px}.vm-mobile-option-text__label{font-weight:700}.vm-mobile-option-text__value{color:#706f6f;color:var(--color-text-secondary);font-size:12px}.vm-block{background-color:#fff;background-color:var(--color-background-block);border-radius:8px;box-shadow:1px 2px 6px #00000014;box-shadow:var(--box-shadow);padding:12px}.vm-block_mobile{border-radius:0;padding:12px}.vm-block_empty-padding{padding:0}.vm-section-header{align-items:center;border-bottom:1px solid #00000026;border-bottom:var(--border-divider);border-radius:8px 8px 0 0;display:grid;grid-template-columns:1fr auto;justify-content:center;padding:0 12px}.vm-section-header__title{font-size:14px;font-weight:700}.vm-section-header__title_mobile{-webkit-line-clamp:2;line-clamp:2;-webkit-box-orient:vertical;display:-webkit-box;overflow:hidden;text-overflow:ellipsis}.vm-section-header__tabs{align-items:center;display:flex;font-size:12px;justify-content:flex-start}.vm-table{border-collapse:initial;border-spacing:0;margin-top:-12px;width:100%}.vm-table,.vm-table__row{background-color:#fff;background-color:var(--color-background-block)}.vm-table__row{transition:background-color .2s ease}.vm-table__row:hover:not(.vm-table__row_header){background-color:#0000000f;background-color:var(--color-hover-black)}.vm-table__row_header{position:relative;z-index:2}.vm-table__row_selected{background-color:#1a90ff0d}.vm-table-cell{border-bottom:1px solid #00000026;border-bottom:var(--border-divider);line-height:1.5;overflow-wrap:anywhere;padding:4px;vertical-align:top}.vm-table-cell__content{align-items:center;display:flex;justify-content:flex-start}.vm-table-cell_sort{cursor:pointer}.vm-table-cell_sort:hover{background-color:#0000000f;background-color:var(--color-hover-black)}.vm-table-cell_header{font-weight:700;overflow-wrap:normal;text-align:left}.vm-table-cell_gray{color:#110f0f;color:var(--color-text);opacity:.4}.vm-table-cell_right{text-align:right}.vm-table-cell_right .vm-table-cell__content{justify-content:flex-end}.vm-table-cell_no-wrap{white-space:nowrap}.vm-table-cell_no-padding{padding:0}.vm-table-cell_pre{white-space:pre-wrap}.vm-table-cell_logs-time{overflow-wrap:normal;white-space:nowrap}.vm-table-cell_logs{font-family:monospace;line-height:1.2;overflow-wrap:normal;width:100%}.vm-table__sort-icon{align-items:center;display:flex;justify-content:center;margin:0 8px;opacity:.4;transition:opacity .2s ease,transform .2s ease-in-out;width:15px}.vm-table__sort-icon_active{opacity:1}.vm-table__sort-icon_desc{transform:rotate(180deg)}.vm-link{cursor:pointer;transition:color .2s ease}.vm-link_colored{color:#3f51b5;color:var(--color-primary)}.vm-link_underlined{text-decoration:underline}.vm-link_with-icon{grid-gap:6px;align-items:center;display:grid;gap:6px;grid-template-columns:14px auto;justify-content:center}.vm-link:hover{color:#3f51b5;color:var(--color-primary);text-decoration:underline}.vm-dynamic-number{color:#a09f9f;color:var(--color-text-disabled);font-size:12px}.vm-dynamic-number_positive{color:#4caf50;color:var(--color-success)}.vm-dynamic-number_negative{color:#fd080e;color:var(--color-error)}.vm-dynamic-number_down:before{content:"↓"}.vm-dynamic-number_up:before{content:"↑"}:root{--color-primary:#3f51b5;--color-secondary:#e91e63;--color-error:#fd080e;--color-warning:#ff8308;--color-info:#03a9f4;--color-success:#4caf50;--color-primary-text:#fff;--color-secondary-text:#fff;--color-error-text:#fff;--color-warning-text:#fff;--color-info-text:#fff;--color-success-text:#fff;--color-background-body:#fefeff;--color-background-block:#fff;--color-background-tooltip:#505050e6;--color-text:#110f0f;--color-text-secondary:#706f6f;--color-text-disabled:#a09f9f;--box-shadow:#00000014 1px 2px 6px;--box-shadow-popper:#0000001a 0px 2px 8px 0px;--border-divider:1px solid #00000026;--color-hover-black:#0000000f} \ No newline at end of file diff --git a/app/vlselect/vmui/static/js/main.3d2eb957.js b/app/vlselect/vmui/static/js/main.3d2eb957.js new file mode 100644 index 000000000..bc406deab --- /dev/null +++ b/app/vlselect/vmui/static/js/main.3d2eb957.js @@ -0,0 +1,2 @@ +/*! For license information please see main.3d2eb957.js.LICENSE.txt */ +(()=>{var e={61:(e,t,n)=>{"use strict";var r=n(375),o=n(629),a=o(r("String.prototype.indexOf"));e.exports=function(e,t){var n=r(e,!!t);return"function"===typeof n&&a(e,".prototype.")>-1?o(n):n}},629:(e,t,n)=>{"use strict";var r=n(989),o=n(375),a=n(259),i=n(277),l=o("%Function.prototype.apply%"),s=o("%Function.prototype.call%"),c=o("%Reflect.apply%",!0)||r.call(s,l),u=n(709),d=o("%Math.max%");e.exports=function(e){if("function"!==typeof e)throw new i("a function is required");var t=c(r,s,arguments);return a(t,1+d(0,e.length-(arguments.length-1)),!0)};var h=function(){return c(r,l,arguments)};u?u(e.exports,"apply",{value:h}):e.exports.apply=h},159:function(e){e.exports=function(){"use strict";var e=1e3,t=6e4,n=36e5,r="millisecond",o="second",a="minute",i="hour",l="day",s="week",c="month",u="quarter",d="year",h="date",p="Invalid Date",f=/^(\d{4})[-/]?(\d{1,2})?[-/]?(\d{0,2})[Tt\s]*(\d{1,2})?:?(\d{1,2})?:?(\d{1,2})?[.:]?(\d+)?$/,m=/\[([^\]]+)]|Y{1,4}|M{1,4}|D{1,2}|d{1,4}|H{1,2}|h{1,2}|a|A|m{1,2}|s{1,2}|Z{1,2}|SSS/g,_={name:"en",weekdays:"Sunday_Monday_Tuesday_Wednesday_Thursday_Friday_Saturday".split("_"),months:"January_February_March_April_May_June_July_August_September_October_November_December".split("_"),ordinal:function(e){var t=["th","st","nd","rd"],n=e%100;return"["+e+(t[(n-20)%10]||t[n]||t[0])+"]"}},g=function(e,t,n){var r=String(e);return!r||r.length>=t?e:""+Array(t+1-r.length).join(n)+e},v={s:g,z:function(e){var t=-e.utcOffset(),n=Math.abs(t),r=Math.floor(n/60),o=n%60;return(t<=0?"+":"-")+g(r,2,"0")+":"+g(o,2,"0")},m:function e(t,n){if(t.date()1)return e(i[0])}else{var l=t.name;b[l]=t,o=l}return!r&&o&&(y=o),o||!r&&y},S=function(e,t){if(k(e))return e.clone();var n="object"==typeof t?t:{};return n.date=e,n.args=arguments,new E(n)},A=v;A.l=x,A.i=k,A.w=function(e,t){return S(e,{locale:t.$L,utc:t.$u,x:t.$x,$offset:t.$offset})};var E=function(){function _(e){this.$L=x(e.locale,null,!0),this.parse(e),this.$x=this.$x||e.x||{},this[w]=!0}var g=_.prototype;return g.parse=function(e){this.$d=function(e){var t=e.date,n=e.utc;if(null===t)return new Date(NaN);if(A.u(t))return new Date;if(t instanceof Date)return new Date(t);if("string"==typeof t&&!/Z$/i.test(t)){var r=t.match(f);if(r){var o=r[2]-1||0,a=(r[7]||"0").substring(0,3);return n?new Date(Date.UTC(r[1],o,r[3]||1,r[4]||0,r[5]||0,r[6]||0,a)):new Date(r[1],o,r[3]||1,r[4]||0,r[5]||0,r[6]||0,a)}}return new Date(t)}(e),this.init()},g.init=function(){var e=this.$d;this.$y=e.getFullYear(),this.$M=e.getMonth(),this.$D=e.getDate(),this.$W=e.getDay(),this.$H=e.getHours(),this.$m=e.getMinutes(),this.$s=e.getSeconds(),this.$ms=e.getMilliseconds()},g.$utils=function(){return A},g.isValid=function(){return!(this.$d.toString()===p)},g.isSame=function(e,t){var n=S(e);return this.startOf(t)<=n&&n<=this.endOf(t)},g.isAfter=function(e,t){return S(e)=0&&(a[d]=parseInt(u,10))}var h=a[3],p=24===h?0:h,f=a[0]+"-"+a[1]+"-"+a[2]+" "+p+":"+a[4]+":"+a[5]+":000",m=+t;return(o.utc(f).valueOf()-(m-=m%1e3))/6e4},s=r.prototype;s.tz=function(e,t){void 0===e&&(e=a);var n,r=this.utcOffset(),i=this.toDate(),l=i.toLocaleString("en-US",{timeZone:e}),s=Math.round((i-new Date(l))/1e3/60),c=15*-Math.round(i.getTimezoneOffset()/15)-s;if(Number(c)){if(n=o(l,{locale:this.$L}).$set("millisecond",this.$ms).utcOffset(c,!0),t){var u=n.utcOffset();n=n.add(r-u,"minute")}}else n=this.utcOffset(0,t);return n.$x.$timezone=e,n},s.offsetName=function(e){var t=this.$x.$timezone||o.tz.guess(),n=i(this.valueOf(),t,{timeZoneName:e}).find((function(e){return"timezonename"===e.type.toLowerCase()}));return n&&n.value};var c=s.startOf;s.startOf=function(e,t){if(!this.$x||!this.$x.$timezone)return c.call(this,e,t);var n=o(this.format("YYYY-MM-DD HH:mm:ss:SSS"),{locale:this.$L});return c.call(n,e,t).tz(this.$x.$timezone,!0)},o.tz=function(e,t,n){var r=n&&t,i=n||t||a,s=l(+o(),i);if("string"!=typeof e)return o(e).tz(i);var c=function(e,t,n){var r=e-60*t*1e3,o=l(r,n);if(t===o)return[r,t];var a=l(r-=60*(o-t)*1e3,n);return o===a?[r,o]:[e-60*Math.min(o,a)*1e3,Math.max(o,a)]}(o.utc(e,r).valueOf(),s,i),u=c[0],d=c[1],h=o(u).utcOffset(d);return h.$x.$timezone=i,h},o.tz.guess=function(){return Intl.DateTimeFormat().resolvedOptions().timeZone},o.tz.setDefault=function(e){a=e}}}()},220:function(e){e.exports=function(){"use strict";var e="minute",t=/[+-]\d\d(?::?\d\d)?/g,n=/([+-]|\d\d)/g;return function(r,o,a){var i=o.prototype;a.utc=function(e){return new o({date:e,utc:!0,args:arguments})},i.utc=function(t){var n=a(this.toDate(),{locale:this.$L,utc:!0});return t?n.add(this.utcOffset(),e):n},i.local=function(){return a(this.toDate(),{locale:this.$L,utc:!1})};var l=i.parse;i.parse=function(e){e.utc&&(this.$u=!0),this.$utils().u(e.$offset)||(this.$offset=e.$offset),l.call(this,e)};var s=i.init;i.init=function(){if(this.$u){var e=this.$d;this.$y=e.getUTCFullYear(),this.$M=e.getUTCMonth(),this.$D=e.getUTCDate(),this.$W=e.getUTCDay(),this.$H=e.getUTCHours(),this.$m=e.getUTCMinutes(),this.$s=e.getUTCSeconds(),this.$ms=e.getUTCMilliseconds()}else s.call(this)};var c=i.utcOffset;i.utcOffset=function(r,o){var a=this.$utils().u;if(a(r))return this.$u?0:a(this.$offset)?c.call(this):this.$offset;if("string"==typeof r&&(r=function(e){void 0===e&&(e="");var r=e.match(t);if(!r)return null;var o=(""+r[0]).match(n)||["-",0,0],a=o[0],i=60*+o[1]+ +o[2];return 0===i?0:"+"===a?i:-i}(r),null===r))return this;var i=Math.abs(r)<=16?60*r:r,l=this;if(o)return l.$offset=i,l.$u=0===r,l;if(0!==r){var s=this.$u?this.toDate().getTimezoneOffset():-1*this.utcOffset();(l=this.local().add(i+s,e)).$offset=i,l.$x.$localOffset=s}else l=this.utc();return l};var u=i.format;i.format=function(e){var t=e||(this.$u?"YYYY-MM-DDTHH:mm:ss[Z]":"");return u.call(this,t)},i.valueOf=function(){var e=this.$utils().u(this.$offset)?0:this.$offset+(this.$x.$localOffset||this.$d.getTimezoneOffset());return this.$d.valueOf()-6e4*e},i.isUTC=function(){return!!this.$u},i.toISOString=function(){return this.toDate().toISOString()},i.toString=function(){return this.toDate().toUTCString()};var d=i.toDate;i.toDate=function(e){return"s"===e&&this.$offset?a(this.format("YYYY-MM-DD HH:mm:ss:SSS")).toDate():d.call(this)};var h=i.diff;i.diff=function(e,t,n){if(e&&this.$u===e.$u)return h.call(this,e,t,n);var r=this.local(),o=a(e).local();return h.call(r,o,t,n)}}}()},411:(e,t,n)=>{"use strict";var r=n(709),o=n(430),a=n(277),i=n(553);e.exports=function(e,t,n){if(!e||"object"!==typeof e&&"function"!==typeof e)throw new a("`obj` must be an object or a function`");if("string"!==typeof t&&"symbol"!==typeof t)throw new a("`property` must be a string or a symbol`");if(arguments.length>3&&"boolean"!==typeof arguments[3]&&null!==arguments[3])throw new a("`nonEnumerable`, if provided, must be a boolean or null");if(arguments.length>4&&"boolean"!==typeof arguments[4]&&null!==arguments[4])throw new a("`nonWritable`, if provided, must be a boolean or null");if(arguments.length>5&&"boolean"!==typeof arguments[5]&&null!==arguments[5])throw new a("`nonConfigurable`, if provided, must be a boolean or null");if(arguments.length>6&&"boolean"!==typeof arguments[6])throw new a("`loose`, if provided, must be a boolean");var l=arguments.length>3?arguments[3]:null,s=arguments.length>4?arguments[4]:null,c=arguments.length>5?arguments[5]:null,u=arguments.length>6&&arguments[6],d=!!i&&i(e,t);if(r)r(e,t,{configurable:null===c&&d?d.configurable:!c,enumerable:null===l&&d?d.enumerable:!l,value:n,writable:null===s&&d?d.writable:!s});else{if(!u&&(l||s||c))throw new o("This environment does not support defining a property as non-configurable, non-writable, or non-enumerable.");e[t]=n}}},709:(e,t,n)=>{"use strict";var r=n(375)("%Object.defineProperty%",!0)||!1;if(r)try{r({},"a",{value:1})}catch(o){r=!1}e.exports=r},123:e=>{"use strict";e.exports=EvalError},953:e=>{"use strict";e.exports=Error},780:e=>{"use strict";e.exports=RangeError},768:e=>{"use strict";e.exports=ReferenceError},430:e=>{"use strict";e.exports=SyntaxError},277:e=>{"use strict";e.exports=TypeError},619:e=>{"use strict";e.exports=URIError},307:e=>{"use strict";var t=Object.prototype.toString,n=Math.max,r=function(e,t){for(var n=[],r=0;r{"use strict";var r=n(307);e.exports=Function.prototype.bind||r},375:(e,t,n)=>{"use strict";var r,o=n(953),a=n(123),i=n(780),l=n(768),s=n(430),c=n(277),u=n(619),d=Function,h=function(e){try{return d('"use strict"; return ('+e+").constructor;")()}catch(t){}},p=Object.getOwnPropertyDescriptor;if(p)try{p({},"")}catch(R){p=null}var f=function(){throw new c},m=p?function(){try{return f}catch(e){try{return p(arguments,"callee").get}catch(t){return f}}}():f,_=n(757)(),g=n(442)(),v=Object.getPrototypeOf||(g?function(e){return e.__proto__}:null),y={},b="undefined"!==typeof Uint8Array&&v?v(Uint8Array):r,w={__proto__:null,"%AggregateError%":"undefined"===typeof AggregateError?r:AggregateError,"%Array%":Array,"%ArrayBuffer%":"undefined"===typeof ArrayBuffer?r:ArrayBuffer,"%ArrayIteratorPrototype%":_&&v?v([][Symbol.iterator]()):r,"%AsyncFromSyncIteratorPrototype%":r,"%AsyncFunction%":y,"%AsyncGenerator%":y,"%AsyncGeneratorFunction%":y,"%AsyncIteratorPrototype%":y,"%Atomics%":"undefined"===typeof Atomics?r:Atomics,"%BigInt%":"undefined"===typeof BigInt?r:BigInt,"%BigInt64Array%":"undefined"===typeof BigInt64Array?r:BigInt64Array,"%BigUint64Array%":"undefined"===typeof BigUint64Array?r:BigUint64Array,"%Boolean%":Boolean,"%DataView%":"undefined"===typeof DataView?r:DataView,"%Date%":Date,"%decodeURI%":decodeURI,"%decodeURIComponent%":decodeURIComponent,"%encodeURI%":encodeURI,"%encodeURIComponent%":encodeURIComponent,"%Error%":o,"%eval%":eval,"%EvalError%":a,"%Float32Array%":"undefined"===typeof Float32Array?r:Float32Array,"%Float64Array%":"undefined"===typeof Float64Array?r:Float64Array,"%FinalizationRegistry%":"undefined"===typeof FinalizationRegistry?r:FinalizationRegistry,"%Function%":d,"%GeneratorFunction%":y,"%Int8Array%":"undefined"===typeof Int8Array?r:Int8Array,"%Int16Array%":"undefined"===typeof Int16Array?r:Int16Array,"%Int32Array%":"undefined"===typeof Int32Array?r:Int32Array,"%isFinite%":isFinite,"%isNaN%":isNaN,"%IteratorPrototype%":_&&v?v(v([][Symbol.iterator]())):r,"%JSON%":"object"===typeof JSON?JSON:r,"%Map%":"undefined"===typeof Map?r:Map,"%MapIteratorPrototype%":"undefined"!==typeof Map&&_&&v?v((new Map)[Symbol.iterator]()):r,"%Math%":Math,"%Number%":Number,"%Object%":Object,"%parseFloat%":parseFloat,"%parseInt%":parseInt,"%Promise%":"undefined"===typeof Promise?r:Promise,"%Proxy%":"undefined"===typeof Proxy?r:Proxy,"%RangeError%":i,"%ReferenceError%":l,"%Reflect%":"undefined"===typeof Reflect?r:Reflect,"%RegExp%":RegExp,"%Set%":"undefined"===typeof Set?r:Set,"%SetIteratorPrototype%":"undefined"!==typeof Set&&_&&v?v((new Set)[Symbol.iterator]()):r,"%SharedArrayBuffer%":"undefined"===typeof SharedArrayBuffer?r:SharedArrayBuffer,"%String%":String,"%StringIteratorPrototype%":_&&v?v(""[Symbol.iterator]()):r,"%Symbol%":_?Symbol:r,"%SyntaxError%":s,"%ThrowTypeError%":m,"%TypedArray%":b,"%TypeError%":c,"%Uint8Array%":"undefined"===typeof Uint8Array?r:Uint8Array,"%Uint8ClampedArray%":"undefined"===typeof Uint8ClampedArray?r:Uint8ClampedArray,"%Uint16Array%":"undefined"===typeof Uint16Array?r:Uint16Array,"%Uint32Array%":"undefined"===typeof Uint32Array?r:Uint32Array,"%URIError%":u,"%WeakMap%":"undefined"===typeof WeakMap?r:WeakMap,"%WeakRef%":"undefined"===typeof WeakRef?r:WeakRef,"%WeakSet%":"undefined"===typeof WeakSet?r:WeakSet};if(v)try{null.error}catch(R){var k=v(v(R));w["%Error.prototype%"]=k}var x=function e(t){var n;if("%AsyncFunction%"===t)n=h("async function () {}");else if("%GeneratorFunction%"===t)n=h("function* () {}");else if("%AsyncGeneratorFunction%"===t)n=h("async function* () {}");else if("%AsyncGenerator%"===t){var r=e("%AsyncGeneratorFunction%");r&&(n=r.prototype)}else if("%AsyncIteratorPrototype%"===t){var o=e("%AsyncGenerator%");o&&v&&(n=v(o.prototype))}return w[t]=n,n},S={__proto__:null,"%ArrayBufferPrototype%":["ArrayBuffer","prototype"],"%ArrayPrototype%":["Array","prototype"],"%ArrayProto_entries%":["Array","prototype","entries"],"%ArrayProto_forEach%":["Array","prototype","forEach"],"%ArrayProto_keys%":["Array","prototype","keys"],"%ArrayProto_values%":["Array","prototype","values"],"%AsyncFunctionPrototype%":["AsyncFunction","prototype"],"%AsyncGenerator%":["AsyncGeneratorFunction","prototype"],"%AsyncGeneratorPrototype%":["AsyncGeneratorFunction","prototype","prototype"],"%BooleanPrototype%":["Boolean","prototype"],"%DataViewPrototype%":["DataView","prototype"],"%DatePrototype%":["Date","prototype"],"%ErrorPrototype%":["Error","prototype"],"%EvalErrorPrototype%":["EvalError","prototype"],"%Float32ArrayPrototype%":["Float32Array","prototype"],"%Float64ArrayPrototype%":["Float64Array","prototype"],"%FunctionPrototype%":["Function","prototype"],"%Generator%":["GeneratorFunction","prototype"],"%GeneratorPrototype%":["GeneratorFunction","prototype","prototype"],"%Int8ArrayPrototype%":["Int8Array","prototype"],"%Int16ArrayPrototype%":["Int16Array","prototype"],"%Int32ArrayPrototype%":["Int32Array","prototype"],"%JSONParse%":["JSON","parse"],"%JSONStringify%":["JSON","stringify"],"%MapPrototype%":["Map","prototype"],"%NumberPrototype%":["Number","prototype"],"%ObjectPrototype%":["Object","prototype"],"%ObjProto_toString%":["Object","prototype","toString"],"%ObjProto_valueOf%":["Object","prototype","valueOf"],"%PromisePrototype%":["Promise","prototype"],"%PromiseProto_then%":["Promise","prototype","then"],"%Promise_all%":["Promise","all"],"%Promise_reject%":["Promise","reject"],"%Promise_resolve%":["Promise","resolve"],"%RangeErrorPrototype%":["RangeError","prototype"],"%ReferenceErrorPrototype%":["ReferenceError","prototype"],"%RegExpPrototype%":["RegExp","prototype"],"%SetPrototype%":["Set","prototype"],"%SharedArrayBufferPrototype%":["SharedArrayBuffer","prototype"],"%StringPrototype%":["String","prototype"],"%SymbolPrototype%":["Symbol","prototype"],"%SyntaxErrorPrototype%":["SyntaxError","prototype"],"%TypedArrayPrototype%":["TypedArray","prototype"],"%TypeErrorPrototype%":["TypeError","prototype"],"%Uint8ArrayPrototype%":["Uint8Array","prototype"],"%Uint8ClampedArrayPrototype%":["Uint8ClampedArray","prototype"],"%Uint16ArrayPrototype%":["Uint16Array","prototype"],"%Uint32ArrayPrototype%":["Uint32Array","prototype"],"%URIErrorPrototype%":["URIError","prototype"],"%WeakMapPrototype%":["WeakMap","prototype"],"%WeakSetPrototype%":["WeakSet","prototype"]},A=n(989),E=n(155),C=A.call(Function.call,Array.prototype.concat),M=A.call(Function.apply,Array.prototype.splice),N=A.call(Function.call,String.prototype.replace),T=A.call(Function.call,String.prototype.slice),P=A.call(Function.call,RegExp.prototype.exec),D=/[^%.[\]]+|\[(?:(-?\d+(?:\.\d+)?)|(["'])((?:(?!\2)[^\\]|\\.)*?)\2)\]|(?=(?:\.|\[\])(?:\.|\[\]|%$))/g,O=/\\(\\)?/g,L=function(e,t){var n,r=e;if(E(S,r)&&(r="%"+(n=S[r])[0]+"%"),E(w,r)){var o=w[r];if(o===y&&(o=x(r)),"undefined"===typeof o&&!t)throw new c("intrinsic "+e+" exists, but is not available. Please file an issue!");return{alias:n,name:r,value:o}}throw new s("intrinsic "+e+" does not exist!")};e.exports=function(e,t){if("string"!==typeof e||0===e.length)throw new c("intrinsic name must be a non-empty string");if(arguments.length>1&&"boolean"!==typeof t)throw new c('"allowMissing" argument must be a boolean');if(null===P(/^%?[^%]*%?$/,e))throw new s("`%` may not be present anywhere but at the beginning and end of the intrinsic name");var n=function(e){var t=T(e,0,1),n=T(e,-1);if("%"===t&&"%"!==n)throw new s("invalid intrinsic syntax, expected closing `%`");if("%"===n&&"%"!==t)throw new s("invalid intrinsic syntax, expected opening `%`");var r=[];return N(e,D,(function(e,t,n,o){r[r.length]=n?N(o,O,"$1"):t||e})),r}(e),r=n.length>0?n[0]:"",o=L("%"+r+"%",t),a=o.name,i=o.value,l=!1,u=o.alias;u&&(r=u[0],M(n,C([0,1],u)));for(var d=1,h=!0;d=n.length){var g=p(i,f);i=(h=!!g)&&"get"in g&&!("originalValue"in g.get)?g.get:i[f]}else h=E(i,f),i=i[f];h&&!l&&(w[a]=i)}}return i}},553:(e,t,n)=>{"use strict";var r=n(375)("%Object.getOwnPropertyDescriptor%",!0);if(r)try{r([],"length")}catch(o){r=null}e.exports=r},734:(e,t,n)=>{"use strict";var r=n(709),o=function(){return!!r};o.hasArrayLengthDefineBug=function(){if(!r)return null;try{return 1!==r([],"length",{value:1}).length}catch(e){return!0}},e.exports=o},442:e=>{"use strict";var t={__proto__:null,foo:{}},n=Object;e.exports=function(){return{__proto__:t}.foo===t.foo&&!(t instanceof n)}},757:(e,t,n)=>{"use strict";var r="undefined"!==typeof Symbol&&Symbol,o=n(175);e.exports=function(){return"function"===typeof r&&("function"===typeof Symbol&&("symbol"===typeof r("foo")&&("symbol"===typeof Symbol("bar")&&o())))}},175:e=>{"use strict";e.exports=function(){if("function"!==typeof Symbol||"function"!==typeof Object.getOwnPropertySymbols)return!1;if("symbol"===typeof Symbol.iterator)return!0;var e={},t=Symbol("test"),n=Object(t);if("string"===typeof t)return!1;if("[object Symbol]"!==Object.prototype.toString.call(t))return!1;if("[object Symbol]"!==Object.prototype.toString.call(n))return!1;for(t in e[t]=42,e)return!1;if("function"===typeof Object.keys&&0!==Object.keys(e).length)return!1;if("function"===typeof Object.getOwnPropertyNames&&0!==Object.getOwnPropertyNames(e).length)return!1;var r=Object.getOwnPropertySymbols(e);if(1!==r.length||r[0]!==t)return!1;if(!Object.prototype.propertyIsEnumerable.call(e,t))return!1;if("function"===typeof Object.getOwnPropertyDescriptor){var o=Object.getOwnPropertyDescriptor(e,t);if(42!==o.value||!0!==o.enumerable)return!1}return!0}},155:(e,t,n)=>{"use strict";var r=Function.prototype.call,o=Object.prototype.hasOwnProperty,a=n(989);e.exports=a.call(r,o)},267:(e,t,n)=>{var r=NaN,o="[object Symbol]",a=/^\s+|\s+$/g,i=/^[-+]0x[0-9a-f]+$/i,l=/^0b[01]+$/i,s=/^0o[0-7]+$/i,c=parseInt,u="object"==typeof n.g&&n.g&&n.g.Object===Object&&n.g,d="object"==typeof self&&self&&self.Object===Object&&self,h=u||d||Function("return this")(),p=Object.prototype.toString,f=Math.max,m=Math.min,_=function(){return h.Date.now()};function g(e){var t=typeof e;return!!e&&("object"==t||"function"==t)}function v(e){if("number"==typeof e)return e;if(function(e){return"symbol"==typeof e||function(e){return!!e&&"object"==typeof e}(e)&&p.call(e)==o}(e))return r;if(g(e)){var t="function"==typeof e.valueOf?e.valueOf():e;e=g(t)?t+"":t}if("string"!=typeof e)return 0===e?e:+e;e=e.replace(a,"");var n=l.test(e);return n||s.test(e)?c(e.slice(2),n?2:8):i.test(e)?r:+e}e.exports=function(e,t,n){var r,o,a,i,l,s,c=0,u=!1,d=!1,h=!0;if("function"!=typeof e)throw new TypeError("Expected a function");function p(t){var n=r,a=o;return r=o=void 0,c=t,i=e.apply(a,n)}function y(e){var n=e-s;return void 0===s||n>=t||n<0||d&&e-c>=a}function b(){var e=_();if(y(e))return w(e);l=setTimeout(b,function(e){var n=t-(e-s);return d?m(n,a-(e-c)):n}(e))}function w(e){return l=void 0,h&&r?p(e):(r=o=void 0,i)}function k(){var e=_(),n=y(e);if(r=arguments,o=this,s=e,n){if(void 0===l)return function(e){return c=e,l=setTimeout(b,t),u?p(e):i}(s);if(d)return l=setTimeout(b,t),p(s)}return void 0===l&&(l=setTimeout(b,t)),i}return t=v(t)||0,g(n)&&(u=!!n.leading,a=(d="maxWait"in n)?f(v(n.maxWait)||0,t):a,h="trailing"in n?!!n.trailing:h),k.cancel=function(){void 0!==l&&clearTimeout(l),c=0,r=s=o=l=void 0},k.flush=function(){return void 0===l?i:w(_())},k}},424:(e,t,n)=>{var r="__lodash_hash_undefined__",o=1/0,a="[object Function]",i="[object GeneratorFunction]",l="[object Symbol]",s=/\.|\[(?:[^[\]]*|(["'])(?:(?!\1)[^\\]|\\.)*?\1)\]/,c=/^\w*$/,u=/^\./,d=/[^.[\]]+|\[(?:(-?\d+(?:\.\d+)?)|(["'])((?:(?!\2)[^\\]|\\.)*?)\2)\]|(?=(?:\.|\[\])(?:\.|\[\]|$))/g,h=/\\(\\)?/g,p=/^\[object .+?Constructor\]$/,f="object"==typeof n.g&&n.g&&n.g.Object===Object&&n.g,m="object"==typeof self&&self&&self.Object===Object&&self,_=f||m||Function("return this")();var g=Array.prototype,v=Function.prototype,y=Object.prototype,b=_["__core-js_shared__"],w=function(){var e=/[^.]+$/.exec(b&&b.keys&&b.keys.IE_PROTO||"");return e?"Symbol(src)_1."+e:""}(),k=v.toString,x=y.hasOwnProperty,S=y.toString,A=RegExp("^"+k.call(x).replace(/[\\^$.*+?()[\]{}|]/g,"\\$&").replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g,"$1.*?")+"$"),E=_.Symbol,C=g.splice,M=$(_,"Map"),N=$(Object,"create"),T=E?E.prototype:void 0,P=T?T.toString:void 0;function D(e){var t=-1,n=e?e.length:0;for(this.clear();++t-1},O.prototype.set=function(e,t){var n=this.__data__,r=R(n,e);return r<0?n.push([e,t]):n[r][1]=t,this},L.prototype.clear=function(){this.__data__={hash:new D,map:new(M||O),string:new D}},L.prototype.delete=function(e){return j(this,e).delete(e)},L.prototype.get=function(e){return j(this,e).get(e)},L.prototype.has=function(e){return j(this,e).has(e)},L.prototype.set=function(e,t){return j(this,e).set(e,t),this};var F=V((function(e){var t;e=null==(t=e)?"":function(e){if("string"==typeof e)return e;if(Y(e))return P?P.call(e):"";var t=e+"";return"0"==t&&1/e==-o?"-0":t}(t);var n=[];return u.test(e)&&n.push(""),e.replace(d,(function(e,t,r,o){n.push(r?o.replace(h,"$1"):t||e)})),n}));function H(e){if("string"==typeof e||Y(e))return e;var t=e+"";return"0"==t&&1/e==-o?"-0":t}function V(e,t){if("function"!=typeof e||t&&"function"!=typeof t)throw new TypeError("Expected a function");var n=function(){var r=arguments,o=t?t.apply(this,r):r[0],a=n.cache;if(a.has(o))return a.get(o);var i=e.apply(this,r);return n.cache=a.set(o,i),i};return n.cache=new(V.Cache||L),n}V.Cache=L;var B=Array.isArray;function U(e){var t=typeof e;return!!e&&("object"==t||"function"==t)}function Y(e){return"symbol"==typeof e||function(e){return!!e&&"object"==typeof e}(e)&&S.call(e)==l}e.exports=function(e,t,n){var r=null==e?void 0:I(e,t);return void 0===r?n:r}},141:(e,t,n)=>{var r="function"===typeof Map&&Map.prototype,o=Object.getOwnPropertyDescriptor&&r?Object.getOwnPropertyDescriptor(Map.prototype,"size"):null,a=r&&o&&"function"===typeof o.get?o.get:null,i=r&&Map.prototype.forEach,l="function"===typeof Set&&Set.prototype,s=Object.getOwnPropertyDescriptor&&l?Object.getOwnPropertyDescriptor(Set.prototype,"size"):null,c=l&&s&&"function"===typeof s.get?s.get:null,u=l&&Set.prototype.forEach,d="function"===typeof WeakMap&&WeakMap.prototype?WeakMap.prototype.has:null,h="function"===typeof WeakSet&&WeakSet.prototype?WeakSet.prototype.has:null,p="function"===typeof WeakRef&&WeakRef.prototype?WeakRef.prototype.deref:null,f=Boolean.prototype.valueOf,m=Object.prototype.toString,_=Function.prototype.toString,g=String.prototype.match,v=String.prototype.slice,y=String.prototype.replace,b=String.prototype.toUpperCase,w=String.prototype.toLowerCase,k=RegExp.prototype.test,x=Array.prototype.concat,S=Array.prototype.join,A=Array.prototype.slice,E=Math.floor,C="function"===typeof BigInt?BigInt.prototype.valueOf:null,M=Object.getOwnPropertySymbols,N="function"===typeof Symbol&&"symbol"===typeof Symbol.iterator?Symbol.prototype.toString:null,T="function"===typeof Symbol&&"object"===typeof Symbol.iterator,P="function"===typeof Symbol&&Symbol.toStringTag&&(typeof Symbol.toStringTag===T||"symbol")?Symbol.toStringTag:null,D=Object.prototype.propertyIsEnumerable,O=("function"===typeof Reflect?Reflect.getPrototypeOf:Object.getPrototypeOf)||([].__proto__===Array.prototype?function(e){return e.__proto__}:null);function L(e,t){if(e===1/0||e===-1/0||e!==e||e&&e>-1e3&&e<1e3||k.call(/e/,t))return t;var n=/[0-9](?=(?:[0-9]{3})+(?![0-9]))/g;if("number"===typeof e){var r=e<0?-E(-e):E(e);if(r!==e){var o=String(r),a=v.call(t,o.length+1);return y.call(o,n,"$&_")+"."+y.call(y.call(a,/([0-9]{3})/g,"$&_"),/_$/,"")}}return y.call(t,n,"$&_")}var R=n(634),I=R.custom,z=V(I)?I:null;function j(e,t,n){var r="double"===(n.quoteStyle||t)?'"':"'";return r+e+r}function $(e){return y.call(String(e),/"/g,""")}function F(e){return"[object Array]"===Y(e)&&(!P||!("object"===typeof e&&P in e))}function H(e){return"[object RegExp]"===Y(e)&&(!P||!("object"===typeof e&&P in e))}function V(e){if(T)return e&&"object"===typeof e&&e instanceof Symbol;if("symbol"===typeof e)return!0;if(!e||"object"!==typeof e||!N)return!1;try{return N.call(e),!0}catch(t){}return!1}e.exports=function e(t,r,o,l){var s=r||{};if(U(s,"quoteStyle")&&"single"!==s.quoteStyle&&"double"!==s.quoteStyle)throw new TypeError('option "quoteStyle" must be "single" or "double"');if(U(s,"maxStringLength")&&("number"===typeof s.maxStringLength?s.maxStringLength<0&&s.maxStringLength!==1/0:null!==s.maxStringLength))throw new TypeError('option "maxStringLength", if provided, must be a positive integer, Infinity, or `null`');var m=!U(s,"customInspect")||s.customInspect;if("boolean"!==typeof m&&"symbol"!==m)throw new TypeError("option \"customInspect\", if provided, must be `true`, `false`, or `'symbol'`");if(U(s,"indent")&&null!==s.indent&&"\t"!==s.indent&&!(parseInt(s.indent,10)===s.indent&&s.indent>0))throw new TypeError('option "indent" must be "\\t", an integer > 0, or `null`');if(U(s,"numericSeparator")&&"boolean"!==typeof s.numericSeparator)throw new TypeError('option "numericSeparator", if provided, must be `true` or `false`');var b=s.numericSeparator;if("undefined"===typeof t)return"undefined";if(null===t)return"null";if("boolean"===typeof t)return t?"true":"false";if("string"===typeof t)return q(t,s);if("number"===typeof t){if(0===t)return 1/0/t>0?"0":"-0";var k=String(t);return b?L(t,k):k}if("bigint"===typeof t){var E=String(t)+"n";return b?L(t,E):E}var M="undefined"===typeof s.depth?5:s.depth;if("undefined"===typeof o&&(o=0),o>=M&&M>0&&"object"===typeof t)return F(t)?"[Array]":"[Object]";var I=function(e,t){var n;if("\t"===e.indent)n="\t";else{if(!("number"===typeof e.indent&&e.indent>0))return null;n=S.call(Array(e.indent+1)," ")}return{base:n,prev:S.call(Array(t+1),n)}}(s,o);if("undefined"===typeof l)l=[];else if(W(l,t)>=0)return"[Circular]";function B(t,n,r){if(n&&(l=A.call(l)).push(n),r){var a={depth:s.depth};return U(s,"quoteStyle")&&(a.quoteStyle=s.quoteStyle),e(t,a,o+1,l)}return e(t,s,o+1,l)}if("function"===typeof t&&!H(t)){var K=function(e){if(e.name)return e.name;var t=g.call(_.call(e),/^function\s*([\w$]+)/);if(t)return t[1];return null}(t),ee=X(t,B);return"[Function"+(K?": "+K:" (anonymous)")+"]"+(ee.length>0?" { "+S.call(ee,", ")+" }":"")}if(V(t)){var te=T?y.call(String(t),/^(Symbol\(.*\))_[^)]*$/,"$1"):N.call(t);return"object"!==typeof t||T?te:Z(te)}if(function(e){if(!e||"object"!==typeof e)return!1;if("undefined"!==typeof HTMLElement&&e instanceof HTMLElement)return!0;return"string"===typeof e.nodeName&&"function"===typeof e.getAttribute}(t)){for(var ne="<"+w.call(String(t.nodeName)),re=t.attributes||[],oe=0;oe"}if(F(t)){if(0===t.length)return"[]";var ae=X(t,B);return I&&!function(e){for(var t=0;t=0)return!1;return!0}(ae)?"["+J(ae,I)+"]":"[ "+S.call(ae,", ")+" ]"}if(function(e){return"[object Error]"===Y(e)&&(!P||!("object"===typeof e&&P in e))}(t)){var ie=X(t,B);return"cause"in Error.prototype||!("cause"in t)||D.call(t,"cause")?0===ie.length?"["+String(t)+"]":"{ ["+String(t)+"] "+S.call(ie,", ")+" }":"{ ["+String(t)+"] "+S.call(x.call("[cause]: "+B(t.cause),ie),", ")+" }"}if("object"===typeof t&&m){if(z&&"function"===typeof t[z]&&R)return R(t,{depth:M-o});if("symbol"!==m&&"function"===typeof t.inspect)return t.inspect()}if(function(e){if(!a||!e||"object"!==typeof e)return!1;try{a.call(e);try{c.call(e)}catch(ne){return!0}return e instanceof Map}catch(t){}return!1}(t)){var le=[];return i&&i.call(t,(function(e,n){le.push(B(n,t,!0)+" => "+B(e,t))})),Q("Map",a.call(t),le,I)}if(function(e){if(!c||!e||"object"!==typeof e)return!1;try{c.call(e);try{a.call(e)}catch(t){return!0}return e instanceof Set}catch(n){}return!1}(t)){var se=[];return u&&u.call(t,(function(e){se.push(B(e,t))})),Q("Set",c.call(t),se,I)}if(function(e){if(!d||!e||"object"!==typeof e)return!1;try{d.call(e,d);try{h.call(e,h)}catch(ne){return!0}return e instanceof WeakMap}catch(t){}return!1}(t))return G("WeakMap");if(function(e){if(!h||!e||"object"!==typeof e)return!1;try{h.call(e,h);try{d.call(e,d)}catch(ne){return!0}return e instanceof WeakSet}catch(t){}return!1}(t))return G("WeakSet");if(function(e){if(!p||!e||"object"!==typeof e)return!1;try{return p.call(e),!0}catch(t){}return!1}(t))return G("WeakRef");if(function(e){return"[object Number]"===Y(e)&&(!P||!("object"===typeof e&&P in e))}(t))return Z(B(Number(t)));if(function(e){if(!e||"object"!==typeof e||!C)return!1;try{return C.call(e),!0}catch(t){}return!1}(t))return Z(B(C.call(t)));if(function(e){return"[object Boolean]"===Y(e)&&(!P||!("object"===typeof e&&P in e))}(t))return Z(f.call(t));if(function(e){return"[object String]"===Y(e)&&(!P||!("object"===typeof e&&P in e))}(t))return Z(B(String(t)));if("undefined"!==typeof window&&t===window)return"{ [object Window] }";if("undefined"!==typeof globalThis&&t===globalThis||"undefined"!==typeof n.g&&t===n.g)return"{ [object globalThis] }";if(!function(e){return"[object Date]"===Y(e)&&(!P||!("object"===typeof e&&P in e))}(t)&&!H(t)){var ce=X(t,B),ue=O?O(t)===Object.prototype:t instanceof Object||t.constructor===Object,de=t instanceof Object?"":"null prototype",he=!ue&&P&&Object(t)===t&&P in t?v.call(Y(t),8,-1):de?"Object":"",pe=(ue||"function"!==typeof t.constructor?"":t.constructor.name?t.constructor.name+" ":"")+(he||de?"["+S.call(x.call([],he||[],de||[]),": ")+"] ":"");return 0===ce.length?pe+"{}":I?pe+"{"+J(ce,I)+"}":pe+"{ "+S.call(ce,", ")+" }"}return String(t)};var B=Object.prototype.hasOwnProperty||function(e){return e in this};function U(e,t){return B.call(e,t)}function Y(e){return m.call(e)}function W(e,t){if(e.indexOf)return e.indexOf(t);for(var n=0,r=e.length;nt.maxStringLength){var n=e.length-t.maxStringLength,r="... "+n+" more character"+(n>1?"s":"");return q(v.call(e,0,t.maxStringLength),t)+r}return j(y.call(y.call(e,/(['\\])/g,"\\$1"),/[\x00-\x1f]/g,K),"single",t)}function K(e){var t=e.charCodeAt(0),n={8:"b",9:"t",10:"n",12:"f",13:"r"}[t];return n?"\\"+n:"\\x"+(t<16?"0":"")+b.call(t.toString(16))}function Z(e){return"Object("+e+")"}function G(e){return e+" { ? }"}function Q(e,t,n,r){return e+" ("+t+") {"+(r?J(n,r):S.call(n,", "))+"}"}function J(e,t){if(0===e.length)return"";var n="\n"+t.prev+t.base;return n+S.call(e,","+n)+"\n"+t.prev}function X(e,t){var n=F(e),r=[];if(n){r.length=e.length;for(var o=0;o{"use strict";n.r(t),n.d(t,{Children:()=>Y,Component:()=>l.uA,Fragment:()=>l.FK,PureComponent:()=>$,StrictMode:()=>De,Suspense:()=>G,SuspenseList:()=>X,__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED:()=>we,cloneElement:()=>Ce,createContext:()=>l.q6,createElement:()=>l.n,createFactory:()=>xe,createPortal:()=>re,createRef:()=>l._3,default:()=>Fe,findDOMNode:()=>Ne,flushSync:()=>Pe,forwardRef:()=>B,hydrate:()=>de,isElement:()=>ze,isFragment:()=>Ae,isMemo:()=>Ee,isValidElement:()=>Se,lazy:()=>J,memo:()=>F,render:()=>ue,startTransition:()=>Oe,unmountComponentAtNode:()=>Me,unstable_batchedUpdates:()=>Te,useCallback:()=>A,useContext:()=>E,useDebugValue:()=>C,useDeferredValue:()=>Le,useEffect:()=>b,useErrorBoundary:()=>M,useId:()=>N,useImperativeHandle:()=>x,useInsertionEffect:()=>Ie,useLayoutEffect:()=>w,useMemo:()=>S,useReducer:()=>y,useRef:()=>k,useState:()=>v,useSyncExternalStore:()=>je,useTransition:()=>Re,version:()=>ke});var r,o,a,i,l=n(746),s=0,c=[],u=l.fF,d=u.__b,h=u.__r,p=u.diffed,f=u.__c,m=u.unmount,_=u.__;function g(e,t){u.__h&&u.__h(o,e,s||t),s=0;var n=o.__H||(o.__H={__:[],__h:[]});return e>=n.__.length&&n.__.push({}),n.__[e]}function v(e){return s=1,y(I,e)}function y(e,t,n){var a=g(r++,2);if(a.t=e,!a.__c&&(a.__=[n?n(t):I(void 0,t),function(e){var t=a.__N?a.__N[0]:a.__[0],n=a.t(t,e);t!==n&&(a.__N=[n,a.__[1]],a.__c.setState({}))}],a.__c=o,!o.u)){var i=function(e,t,n){if(!a.__c.__H)return!0;var r=a.__c.__H.__.filter((function(e){return!!e.__c}));if(r.every((function(e){return!e.__N})))return!l||l.call(this,e,t,n);var o=!1;return r.forEach((function(e){if(e.__N){var t=e.__[0];e.__=e.__N,e.__N=void 0,t!==e.__[0]&&(o=!0)}})),!(!o&&a.__c.props===e)&&(!l||l.call(this,e,t,n))};o.u=!0;var l=o.shouldComponentUpdate,s=o.componentWillUpdate;o.componentWillUpdate=function(e,t,n){if(this.__e){var r=l;l=void 0,i(e,t,n),l=r}s&&s.call(this,e,t,n)},o.shouldComponentUpdate=i}return a.__N||a.__}function b(e,t){var n=g(r++,3);!u.__s&&R(n.__H,t)&&(n.__=e,n.i=t,o.__H.__h.push(n))}function w(e,t){var n=g(r++,4);!u.__s&&R(n.__H,t)&&(n.__=e,n.i=t,o.__h.push(n))}function k(e){return s=5,S((function(){return{current:e}}),[])}function x(e,t,n){s=6,w((function(){return"function"==typeof e?(e(t()),function(){return e(null)}):e?(e.current=t(),function(){return e.current=null}):void 0}),null==n?n:n.concat(e))}function S(e,t){var n=g(r++,7);return R(n.__H,t)&&(n.__=e(),n.__H=t,n.__h=e),n.__}function A(e,t){return s=8,S((function(){return e}),t)}function E(e){var t=o.context[e.__c],n=g(r++,9);return n.c=e,t?(null==n.__&&(n.__=!0,t.sub(o)),t.props.value):e.__}function C(e,t){u.useDebugValue&&u.useDebugValue(t?t(e):e)}function M(e){var t=g(r++,10),n=v();return t.__=e,o.componentDidCatch||(o.componentDidCatch=function(e,r){t.__&&t.__(e,r),n[1](e)}),[n[0],function(){n[1](void 0)}]}function N(){var e=g(r++,11);if(!e.__){for(var t=o.__v;null!==t&&!t.__m&&null!==t.__;)t=t.__;var n=t.__m||(t.__m=[0,0]);e.__="P"+n[0]+"-"+n[1]++}return e.__}function T(){for(var e;e=c.shift();)if(e.__P&&e.__H)try{e.__H.__h.forEach(O),e.__H.__h.forEach(L),e.__H.__h=[]}catch(r){e.__H.__h=[],u.__e(r,e.__v)}}u.__b=function(e){o=null,d&&d(e)},u.__=function(e,t){e&&t.__k&&t.__k.__m&&(e.__m=t.__k.__m),_&&_(e,t)},u.__r=function(e){h&&h(e),r=0;var t=(o=e.__c).__H;t&&(a===o?(t.__h=[],o.__h=[],t.__.forEach((function(e){e.__N&&(e.__=e.__N),e.i=e.__N=void 0}))):(t.__h.forEach(O),t.__h.forEach(L),t.__h=[],r=0)),a=o},u.diffed=function(e){p&&p(e);var t=e.__c;t&&t.__H&&(t.__H.__h.length&&(1!==c.push(t)&&i===u.requestAnimationFrame||((i=u.requestAnimationFrame)||D)(T)),t.__H.__.forEach((function(e){e.i&&(e.__H=e.i),e.i=void 0}))),a=o=null},u.__c=function(e,t){t.some((function(e){try{e.__h.forEach(O),e.__h=e.__h.filter((function(e){return!e.__||L(e)}))}catch(o){t.some((function(e){e.__h&&(e.__h=[])})),t=[],u.__e(o,e.__v)}})),f&&f(e,t)},u.unmount=function(e){m&&m(e);var t,n=e.__c;n&&n.__H&&(n.__H.__.forEach((function(e){try{O(e)}catch(e){t=e}})),n.__H=void 0,t&&u.__e(t,n.__v))};var P="function"==typeof requestAnimationFrame;function D(e){var t,n=function(){clearTimeout(r),P&&cancelAnimationFrame(t),setTimeout(e)},r=setTimeout(n,100);P&&(t=requestAnimationFrame(n))}function O(e){var t=o,n=e.__c;"function"==typeof n&&(e.__c=void 0,n()),o=t}function L(e){var t=o;e.__c=e.__(),o=t}function R(e,t){return!e||e.length!==t.length||t.some((function(t,n){return t!==e[n]}))}function I(e,t){return"function"==typeof t?t(e):t}function z(e,t){for(var n in t)e[n]=t[n];return e}function j(e,t){for(var n in e)if("__source"!==n&&!(n in t))return!0;for(var r in t)if("__source"!==r&&e[r]!==t[r])return!0;return!1}function $(e,t){this.props=e,this.context=t}function F(e,t){function n(e){var n=this.props.ref,r=n==e.ref;return!r&&n&&(n.call?n(null):n.current=null),t?!t(this.props,e)||!r:j(this.props,e)}function r(t){return this.shouldComponentUpdate=n,(0,l.n)(e,t)}return r.displayName="Memo("+(e.displayName||e.name)+")",r.prototype.isReactComponent=!0,r.__f=!0,r}($.prototype=new l.uA).isPureReactComponent=!0,$.prototype.shouldComponentUpdate=function(e,t){return j(this.props,e)||j(this.state,t)};var H=l.fF.__b;l.fF.__b=function(e){e.type&&e.type.__f&&e.ref&&(e.props.ref=e.ref,e.ref=null),H&&H(e)};var V="undefined"!=typeof Symbol&&Symbol.for&&Symbol.for("react.forward_ref")||3911;function B(e){function t(t){var n=z({},t);return delete n.ref,e(n,t.ref||null)}return t.$$typeof=V,t.render=t,t.prototype.isReactComponent=t.__f=!0,t.displayName="ForwardRef("+(e.displayName||e.name)+")",t}var U=function(e,t){return null==e?null:(0,l.v2)((0,l.v2)(e).map(t))},Y={map:U,forEach:U,count:function(e){return e?(0,l.v2)(e).length:0},only:function(e){var t=(0,l.v2)(e);if(1!==t.length)throw"Children.only";return t[0]},toArray:l.v2},W=l.fF.__e;l.fF.__e=function(e,t,n,r){if(e.then)for(var o,a=t;a=a.__;)if((o=a.__c)&&o.__c)return null==t.__e&&(t.__e=n.__e,t.__k=n.__k),o.__c(e,t);W(e,t,n,r)};var q=l.fF.unmount;function K(e,t,n){return e&&(e.__c&&e.__c.__H&&(e.__c.__H.__.forEach((function(e){"function"==typeof e.__c&&e.__c()})),e.__c.__H=null),null!=(e=z({},e)).__c&&(e.__c.__P===n&&(e.__c.__P=t),e.__c=null),e.__k=e.__k&&e.__k.map((function(e){return K(e,t,n)}))),e}function Z(e,t,n){return e&&n&&(e.__v=null,e.__k=e.__k&&e.__k.map((function(e){return Z(e,t,n)})),e.__c&&e.__c.__P===t&&(e.__e&&n.appendChild(e.__e),e.__c.__e=!0,e.__c.__P=n)),e}function G(){this.__u=0,this.t=null,this.__b=null}function Q(e){var t=e.__.__c;return t&&t.__a&&t.__a(e)}function J(e){var t,n,r;function o(o){if(t||(t=e()).then((function(e){n=e.default||e}),(function(e){r=e})),r)throw r;if(!n)throw t;return(0,l.n)(n,o)}return o.displayName="Lazy",o.__f=!0,o}function X(){this.u=null,this.o=null}l.fF.unmount=function(e){var t=e.__c;t&&t.__R&&t.__R(),t&&32&e.__u&&(e.type=null),q&&q(e)},(G.prototype=new l.uA).__c=function(e,t){var n=t.__c,r=this;null==r.t&&(r.t=[]),r.t.push(n);var o=Q(r.__v),a=!1,i=function(){a||(a=!0,n.__R=null,o?o(l):l())};n.__R=i;var l=function(){if(! --r.__u){if(r.state.__a){var e=r.state.__a;r.__v.__k[0]=Z(e,e.__c.__P,e.__c.__O)}var t;for(r.setState({__a:r.__b=null});t=r.t.pop();)t.forceUpdate()}};r.__u++||32&t.__u||r.setState({__a:r.__b=r.__v.__k[0]}),e.then(i,i)},G.prototype.componentWillUnmount=function(){this.t=[]},G.prototype.render=function(e,t){if(this.__b){if(this.__v.__k){var n=document.createElement("div"),r=this.__v.__k[0].__c;this.__v.__k[0]=K(this.__b,n,r.__O=r.__P)}this.__b=null}var o=t.__a&&(0,l.n)(l.FK,null,e.fallback);return o&&(o.__u&=-33),[(0,l.n)(l.FK,null,t.__a?null:e.children),o]};var ee=function(e,t,n){if(++n[1]===n[0]&&e.o.delete(t),e.props.revealOrder&&("t"!==e.props.revealOrder[0]||!e.o.size))for(n=e.u;n;){for(;n.length>3;)n.pop()();if(n[1]>>1,1),t.i.removeChild(e)}}),(0,l.XX)((0,l.n)(te,{context:t.context},e.__v),t.l)}function re(e,t){var n=(0,l.n)(ne,{__v:e,i:t});return n.containerInfo=t,n}(X.prototype=new l.uA).__a=function(e){var t=this,n=Q(t.__v),r=t.o.get(e);return r[0]++,function(o){var a=function(){t.props.revealOrder?(r.push(o),ee(t,e,r)):o()};n?n(a):a()}},X.prototype.render=function(e){this.u=null,this.o=new Map;var t=(0,l.v2)(e.children);e.revealOrder&&"b"===e.revealOrder[0]&&t.reverse();for(var n=t.length;n--;)this.o.set(t[n],this.u=[1,0,this.u]);return e.children},X.prototype.componentDidUpdate=X.prototype.componentDidMount=function(){var e=this;this.o.forEach((function(t,n){ee(e,n,t)}))};var oe="undefined"!=typeof Symbol&&Symbol.for&&Symbol.for("react.element")||60103,ae=/^(?:accent|alignment|arabic|baseline|cap|clip(?!PathU)|color|dominant|fill|flood|font|glyph(?!R)|horiz|image(!S)|letter|lighting|marker(?!H|W|U)|overline|paint|pointer|shape|stop|strikethrough|stroke|text(?!L)|transform|underline|unicode|units|v|vector|vert|word|writing|x(?!C))[A-Z]/,ie=/^on(Ani|Tra|Tou|BeforeInp|Compo)/,le=/[A-Z0-9]/g,se="undefined"!=typeof document,ce=function(e){return("undefined"!=typeof Symbol&&"symbol"==typeof Symbol()?/fil|che|rad/:/fil|che|ra/).test(e)};function ue(e,t,n){return null==t.__k&&(t.textContent=""),(0,l.XX)(e,t),"function"==typeof n&&n(),e?e.__c:null}function de(e,t,n){return(0,l.Qv)(e,t),"function"==typeof n&&n(),e?e.__c:null}l.uA.prototype.isReactComponent={},["componentWillMount","componentWillReceiveProps","componentWillUpdate"].forEach((function(e){Object.defineProperty(l.uA.prototype,e,{configurable:!0,get:function(){return this["UNSAFE_"+e]},set:function(t){Object.defineProperty(this,e,{configurable:!0,writable:!0,value:t})}})}));var he=l.fF.event;function pe(){}function fe(){return this.cancelBubble}function me(){return this.defaultPrevented}l.fF.event=function(e){return he&&(e=he(e)),e.persist=pe,e.isPropagationStopped=fe,e.isDefaultPrevented=me,e.nativeEvent=e};var _e,ge={enumerable:!1,configurable:!0,get:function(){return this.class}},ve=l.fF.vnode;l.fF.vnode=function(e){"string"==typeof e.type&&function(e){var t=e.props,n=e.type,r={},o=-1===n.indexOf("-");for(var a in t){var i=t[a];if(!("value"===a&&"defaultValue"in t&&null==i||se&&"children"===a&&"noscript"===n||"class"===a||"className"===a)){var s=a.toLowerCase();"defaultValue"===a&&"value"in t&&null==t.value?a="value":"download"===a&&!0===i?i="":"translate"===s&&"no"===i?i=!1:"o"===s[0]&&"n"===s[1]?"ondoubleclick"===s?a="ondblclick":"onchange"!==s||"input"!==n&&"textarea"!==n||ce(t.type)?"onfocus"===s?a="onfocusin":"onblur"===s?a="onfocusout":ie.test(a)&&(a=s):s=a="oninput":o&&ae.test(a)?a=a.replace(le,"-$&").toLowerCase():null===i&&(i=void 0),"oninput"===s&&r[a=s]&&(a="oninputCapture"),r[a]=i}}"select"==n&&r.multiple&&Array.isArray(r.value)&&(r.value=(0,l.v2)(t.children).forEach((function(e){e.props.selected=-1!=r.value.indexOf(e.props.value)}))),"select"==n&&null!=r.defaultValue&&(r.value=(0,l.v2)(t.children).forEach((function(e){e.props.selected=r.multiple?-1!=r.defaultValue.indexOf(e.props.value):r.defaultValue==e.props.value}))),t.class&&!t.className?(r.class=t.class,Object.defineProperty(r,"className",ge)):(t.className&&!t.class||t.class&&t.className)&&(r.class=r.className=t.className),e.props=r}(e),e.$$typeof=oe,ve&&ve(e)};var ye=l.fF.__r;l.fF.__r=function(e){ye&&ye(e),_e=e.__c};var be=l.fF.diffed;l.fF.diffed=function(e){be&&be(e);var t=e.props,n=e.__e;null!=n&&"textarea"===e.type&&"value"in t&&t.value!==n.value&&(n.value=null==t.value?"":t.value),_e=null};var we={ReactCurrentDispatcher:{current:{readContext:function(e){return _e.__n[e.__c].props.value},useCallback:A,useContext:E,useDebugValue:C,useDeferredValue:Le,useEffect:b,useId:N,useImperativeHandle:x,useInsertionEffect:Ie,useLayoutEffect:w,useMemo:S,useReducer:y,useRef:k,useState:v,useSyncExternalStore:je,useTransition:Re}}},ke="17.0.2";function xe(e){return l.n.bind(null,e)}function Se(e){return!!e&&e.$$typeof===oe}function Ae(e){return Se(e)&&e.type===l.FK}function Ee(e){return!!e&&!!e.displayName&&("string"==typeof e.displayName||e.displayName instanceof String)&&e.displayName.startsWith("Memo(")}function Ce(e){return Se(e)?l.Ob.apply(null,arguments):e}function Me(e){return!!e.__k&&((0,l.XX)(null,e),!0)}function Ne(e){return e&&(e.base||1===e.nodeType&&e)||null}var Te=function(e,t){return e(t)},Pe=function(e,t){return e(t)},De=l.FK;function Oe(e){e()}function Le(e){return e}function Re(){return[!1,Oe]}var Ie=w,ze=Se;function je(e,t){var n=t(),r=v({h:{__:n,v:t}}),o=r[0].h,a=r[1];return w((function(){o.__=n,o.v=t,$e(o)&&a({h:o})}),[e,n,t]),b((function(){return $e(o)&&a({h:o}),e((function(){$e(o)&&a({h:o})}))}),[e]),n}function $e(e){var t,n,r=e.v,o=e.__;try{var a=r();return!((t=o)===(n=a)&&(0!==t||1/t==1/n)||t!=t&&n!=n)}catch(e){return!0}}var Fe={useState:v,useId:N,useReducer:y,useEffect:b,useLayoutEffect:w,useInsertionEffect:Ie,useTransition:Re,useDeferredValue:Le,useSyncExternalStore:je,startTransition:Oe,useRef:k,useImperativeHandle:x,useMemo:S,useCallback:A,useContext:E,useDebugValue:C,version:"17.0.2",Children:Y,render:ue,hydrate:de,unmountComponentAtNode:Me,createPortal:re,createElement:l.n,createContext:l.q6,createFactory:xe,cloneElement:Ce,createRef:l._3,Fragment:l.FK,isValidElement:Se,isElement:ze,isFragment:Ae,isMemo:Ee,findDOMNode:Ne,Component:l.uA,PureComponent:$,memo:F,forwardRef:B,flushSync:Pe,unstable_batchedUpdates:Te,StrictMode:De,Suspense:G,SuspenseList:X,lazy:J,__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED:we}},746:(e,t,n)=>{"use strict";n.d(t,{FK:()=>x,Ob:()=>Y,Qv:()=>U,XX:()=>B,_3:()=>k,fF:()=>o,n:()=>b,q6:()=>W,uA:()=>S,v2:()=>D});var r,o,a,i,l,s,c,u,d,h,p,f={},m=[],_=/acit|ex(?:s|g|n|p|$)|rph|grid|ows|mnc|ntw|ine[ch]|zoo|^ord|itera/i,g=Array.isArray;function v(e,t){for(var n in t)e[n]=t[n];return e}function y(e){var t=e.parentNode;t&&t.removeChild(e)}function b(e,t,n){var o,a,i,l={};for(i in t)"key"==i?o=t[i]:"ref"==i?a=t[i]:l[i]=t[i];if(arguments.length>2&&(l.children=arguments.length>3?r.call(arguments,2):n),"function"==typeof e&&null!=e.defaultProps)for(i in e.defaultProps)void 0===l[i]&&(l[i]=e.defaultProps[i]);return w(e,l,o,a,null)}function w(e,t,n,r,i){var l={type:e,props:t,key:n,ref:r,__k:null,__:null,__b:0,__e:null,__d:void 0,__c:null,constructor:void 0,__v:null==i?++a:i,__i:-1,__u:0};return null==i&&null!=o.vnode&&o.vnode(l),l}function k(){return{current:null}}function x(e){return e.children}function S(e,t){this.props=e,this.context=t}function A(e,t){if(null==t)return e.__?A(e.__,e.__i+1):null;for(var n;tt&&i.sort(c));M.__r=0}function N(e,t,n,r,o,a,i,l,s,c,u){var d,h,p,_,g,v=r&&r.__k||m,y=t.length;for(n.__d=s,T(n,t,v),s=n.__d,d=0;d0?w(o.type,o.props,o.key,o.ref?o.ref:null,o.__v):o)?(o.__=e,o.__b=e.__b+1,l=O(o,n,i,u),o.__i=l,a=null,-1!==l&&(u--,(a=n[l])&&(a.__u|=131072)),null==a||null===a.__v?(-1==l&&d--,"function"!=typeof o.type&&(o.__u|=65536)):l!==i&&(l==i-1?d--:l==i+1?d++:l>i?u>s-i?d+=l-i:d--:l(null!=s&&0==(131072&s.__u)?1:0))for(;i>=0||l=0){if((s=t[i])&&0==(131072&s.__u)&&o==s.key&&a===s.type)return i;i--}if(l2&&(s.children=arguments.length>3?r.call(arguments,2):n),w(e.type,s,o||e.key,a||e.ref,null)}function W(e,t){var n={__c:t="__cC"+p++,__:e,Consumer:function(e,t){return e.children(t)},Provider:function(e){var n,r;return this.getChildContext||(n=[],(r={})[t]=this,this.getChildContext=function(){return r},this.componentWillUnmount=function(){n=null},this.shouldComponentUpdate=function(e){this.props.value!==e.value&&n.some((function(e){e.__e=!0,C(e)}))},this.sub=function(e){n.push(e);var t=e.componentWillUnmount;e.componentWillUnmount=function(){n&&n.splice(n.indexOf(e),1),t&&t.call(e)}}),e.children}};return n.Provider.__=n.Consumer.contextType=n}r=m.slice,o={__e:function(e,t,n,r){for(var o,a,i;t=t.__;)if((o=t.__c)&&!o.__)try{if((a=o.constructor)&&null!=a.getDerivedStateFromError&&(o.setState(a.getDerivedStateFromError(e)),i=o.__d),null!=o.componentDidCatch&&(o.componentDidCatch(e,r||{}),i=o.__d),i)return o.__E=o}catch(t){e=t}throw e}},a=0,S.prototype.setState=function(e,t){var n;n=null!=this.__s&&this.__s!==this.state?this.__s:this.__s=v({},this.state),"function"==typeof e&&(e=e(v({},n),this.props)),e&&v(n,e),null!=e&&this.__v&&(t&&this._sb.push(t),C(this))},S.prototype.forceUpdate=function(e){this.__v&&(this.__e=!0,e&&this.__h.push(e),C(this))},S.prototype.render=x,i=[],s="function"==typeof Promise?Promise.prototype.then.bind(Promise.resolve()):setTimeout,c=function(e,t){return e.__v.__b-t.__v.__b},M.__r=0,u=0,d=I(!1),h=I(!0),p=0},640:e=>{"use strict";var t=String.prototype.replace,n=/%20/g,r="RFC1738",o="RFC3986";e.exports={default:o,formatters:{RFC1738:function(e){return t.call(e,n,"+")},RFC3986:function(e){return String(e)}},RFC1738:r,RFC3986:o}},215:(e,t,n)=>{"use strict";var r=n(518),o=n(968),a=n(640);e.exports={formats:a,parse:o,stringify:r}},968:(e,t,n)=>{"use strict";var r=n(570),o=Object.prototype.hasOwnProperty,a=Array.isArray,i={allowDots:!1,allowEmptyArrays:!1,allowPrototypes:!1,allowSparse:!1,arrayLimit:20,charset:"utf-8",charsetSentinel:!1,comma:!1,decodeDotInKeys:!1,decoder:r.decode,delimiter:"&",depth:5,duplicates:"combine",ignoreQueryPrefix:!1,interpretNumericEntities:!1,parameterLimit:1e3,parseArrays:!0,plainObjects:!1,strictDepth:!1,strictNullHandling:!1},l=function(e){return e.replace(/&#(\d+);/g,(function(e,t){return String.fromCharCode(parseInt(t,10))}))},s=function(e,t){return e&&"string"===typeof e&&t.comma&&e.indexOf(",")>-1?e.split(","):e},c=function(e,t,n,r){if(e){var a=n.allowDots?e.replace(/\.([^.[]+)/g,"[$1]"):e,i=/(\[[^[\]]*])/g,l=n.depth>0&&/(\[[^[\]]*])/.exec(a),c=l?a.slice(0,l.index):a,u=[];if(c){if(!n.plainObjects&&o.call(Object.prototype,c)&&!n.allowPrototypes)return;u.push(c)}for(var d=0;n.depth>0&&null!==(l=i.exec(a))&&d=0;--a){var i,l=e[a];if("[]"===l&&n.parseArrays)i=n.allowEmptyArrays&&(""===o||n.strictNullHandling&&null===o)?[]:[].concat(o);else{i=n.plainObjects?Object.create(null):{};var c="["===l.charAt(0)&&"]"===l.charAt(l.length-1)?l.slice(1,-1):l,u=n.decodeDotInKeys?c.replace(/%2E/g,"."):c,d=parseInt(u,10);n.parseArrays||""!==u?!isNaN(d)&&l!==u&&String(d)===u&&d>=0&&n.parseArrays&&d<=n.arrayLimit?(i=[])[d]=o:"__proto__"!==u&&(i[u]=o):i={0:o}}o=i}return o}(u,t,n,r)}};e.exports=function(e,t){var n=function(e){if(!e)return i;if("undefined"!==typeof e.allowEmptyArrays&&"boolean"!==typeof e.allowEmptyArrays)throw new TypeError("`allowEmptyArrays` option can only be `true` or `false`, when provided");if("undefined"!==typeof e.decodeDotInKeys&&"boolean"!==typeof e.decodeDotInKeys)throw new TypeError("`decodeDotInKeys` option can only be `true` or `false`, when provided");if(null!==e.decoder&&"undefined"!==typeof e.decoder&&"function"!==typeof e.decoder)throw new TypeError("Decoder has to be a function.");if("undefined"!==typeof e.charset&&"utf-8"!==e.charset&&"iso-8859-1"!==e.charset)throw new TypeError("The charset option must be either utf-8, iso-8859-1, or undefined");var t="undefined"===typeof e.charset?i.charset:e.charset,n="undefined"===typeof e.duplicates?i.duplicates:e.duplicates;if("combine"!==n&&"first"!==n&&"last"!==n)throw new TypeError("The duplicates option must be either combine, first, or last");return{allowDots:"undefined"===typeof e.allowDots?!0===e.decodeDotInKeys||i.allowDots:!!e.allowDots,allowEmptyArrays:"boolean"===typeof e.allowEmptyArrays?!!e.allowEmptyArrays:i.allowEmptyArrays,allowPrototypes:"boolean"===typeof e.allowPrototypes?e.allowPrototypes:i.allowPrototypes,allowSparse:"boolean"===typeof e.allowSparse?e.allowSparse:i.allowSparse,arrayLimit:"number"===typeof e.arrayLimit?e.arrayLimit:i.arrayLimit,charset:t,charsetSentinel:"boolean"===typeof e.charsetSentinel?e.charsetSentinel:i.charsetSentinel,comma:"boolean"===typeof e.comma?e.comma:i.comma,decodeDotInKeys:"boolean"===typeof e.decodeDotInKeys?e.decodeDotInKeys:i.decodeDotInKeys,decoder:"function"===typeof e.decoder?e.decoder:i.decoder,delimiter:"string"===typeof e.delimiter||r.isRegExp(e.delimiter)?e.delimiter:i.delimiter,depth:"number"===typeof e.depth||!1===e.depth?+e.depth:i.depth,duplicates:n,ignoreQueryPrefix:!0===e.ignoreQueryPrefix,interpretNumericEntities:"boolean"===typeof e.interpretNumericEntities?e.interpretNumericEntities:i.interpretNumericEntities,parameterLimit:"number"===typeof e.parameterLimit?e.parameterLimit:i.parameterLimit,parseArrays:!1!==e.parseArrays,plainObjects:"boolean"===typeof e.plainObjects?e.plainObjects:i.plainObjects,strictDepth:"boolean"===typeof e.strictDepth?!!e.strictDepth:i.strictDepth,strictNullHandling:"boolean"===typeof e.strictNullHandling?e.strictNullHandling:i.strictNullHandling}}(t);if(""===e||null===e||"undefined"===typeof e)return n.plainObjects?Object.create(null):{};for(var u="string"===typeof e?function(e,t){var n={__proto__:null},c=t.ignoreQueryPrefix?e.replace(/^\?/,""):e;c=c.replace(/%5B/gi,"[").replace(/%5D/gi,"]");var u,d=t.parameterLimit===1/0?void 0:t.parameterLimit,h=c.split(t.delimiter,d),p=-1,f=t.charset;if(t.charsetSentinel)for(u=0;u-1&&(_=a(_)?[_]:_);var b=o.call(n,m);b&&"combine"===t.duplicates?n[m]=r.combine(n[m],_):b&&"last"!==t.duplicates||(n[m]=_)}return n}(e,n):e,d=n.plainObjects?Object.create(null):{},h=Object.keys(u),p=0;p{"use strict";var r=n(670),o=n(570),a=n(640),i=Object.prototype.hasOwnProperty,l={brackets:function(e){return e+"[]"},comma:"comma",indices:function(e,t){return e+"["+t+"]"},repeat:function(e){return e}},s=Array.isArray,c=Array.prototype.push,u=function(e,t){c.apply(e,s(t)?t:[t])},d=Date.prototype.toISOString,h=a.default,p={addQueryPrefix:!1,allowDots:!1,allowEmptyArrays:!1,arrayFormat:"indices",charset:"utf-8",charsetSentinel:!1,delimiter:"&",encode:!0,encodeDotInKeys:!1,encoder:o.encode,encodeValuesOnly:!1,format:h,formatter:a.formatters[h],indices:!1,serializeDate:function(e){return d.call(e)},skipNulls:!1,strictNullHandling:!1},f={},m=function e(t,n,a,i,l,c,d,h,m,_,g,v,y,b,w,k,x,S){for(var A,E=t,C=S,M=0,N=!1;void 0!==(C=C.get(f))&&!N;){var T=C.get(t);if(M+=1,"undefined"!==typeof T){if(T===M)throw new RangeError("Cyclic object value");N=!0}"undefined"===typeof C.get(f)&&(M=0)}if("function"===typeof _?E=_(n,E):E instanceof Date?E=y(E):"comma"===a&&s(E)&&(E=o.maybeMap(E,(function(e){return e instanceof Date?y(e):e}))),null===E){if(c)return m&&!k?m(n,p.encoder,x,"key",b):n;E=""}if("string"===typeof(A=E)||"number"===typeof A||"boolean"===typeof A||"symbol"===typeof A||"bigint"===typeof A||o.isBuffer(E))return m?[w(k?n:m(n,p.encoder,x,"key",b))+"="+w(m(E,p.encoder,x,"value",b))]:[w(n)+"="+w(String(E))];var P,D=[];if("undefined"===typeof E)return D;if("comma"===a&&s(E))k&&m&&(E=o.maybeMap(E,m)),P=[{value:E.length>0?E.join(",")||null:void 0}];else if(s(_))P=_;else{var O=Object.keys(E);P=g?O.sort(g):O}var L=h?n.replace(/\./g,"%2E"):n,R=i&&s(E)&&1===E.length?L+"[]":L;if(l&&s(E)&&0===E.length)return R+"[]";for(var I=0;I0?b+y:""}},570:(e,t,n)=>{"use strict";var r=n(640),o=Object.prototype.hasOwnProperty,a=Array.isArray,i=function(){for(var e=[],t=0;t<256;++t)e.push("%"+((t<16?"0":"")+t.toString(16)).toUpperCase());return e}(),l=function(e,t){for(var n=t&&t.plainObjects?Object.create(null):{},r=0;r1;){var t=e.pop(),n=t.obj[t.prop];if(a(n)){for(var r=[],o=0;o=s?l.slice(u,u+s):l,h=[],p=0;p=48&&f<=57||f>=65&&f<=90||f>=97&&f<=122||a===r.RFC1738&&(40===f||41===f)?h[h.length]=d.charAt(p):f<128?h[h.length]=i[f]:f<2048?h[h.length]=i[192|f>>6]+i[128|63&f]:f<55296||f>=57344?h[h.length]=i[224|f>>12]+i[128|f>>6&63]+i[128|63&f]:(p+=1,f=65536+((1023&f)<<10|1023&d.charCodeAt(p)),h[h.length]=i[240|f>>18]+i[128|f>>12&63]+i[128|f>>6&63]+i[128|63&f])}c+=h.join("")}return c},isBuffer:function(e){return!(!e||"object"!==typeof e)&&!!(e.constructor&&e.constructor.isBuffer&&e.constructor.isBuffer(e))},isRegExp:function(e){return"[object RegExp]"===Object.prototype.toString.call(e)},maybeMap:function(e,t){if(a(e)){for(var n=[],r=0;r{e.exports=n(204)},204:(e,t,n)=>{"use strict";var r=function(e){return e&&"object"==typeof e&&"default"in e?e.default:e}(n(609)),o=n(609);function a(){return(a=Object.assign||function(e){for(var t=1;tr.length&&h(e,t.length-1);)t=t.slice(0,t.length-1);return t.length}for(var o=r.length,a=t.length;a>=r.length;a--){var i=t[a];if(!h(e,a)&&p(e,a,i)){o=a+1;break}}return o}function _(e,t){return m(e,t)===e.mask.length}function g(e,t){var n=e.maskChar,r=e.mask,o=e.prefix;if(!n){for((t=v(e,"",t,0)).lengtht.length&&(t+=o.slice(t.length,r)),l.every((function(n){for(;u=n,h(e,c=r)&&u!==o[c];){if(r>=t.length&&(t+=o[r]),l=n,a&&h(e,r)&&l===a)return!0;if(++r>=o.length)return!1}var l,c,u;return!p(e,r,n)&&n!==a||(ro.start?d=(u=function(e,t,n,r){var o=e.mask,a=e.maskChar,i=n.split(""),l=r;return i.every((function(t){for(;i=t,h(e,n=r)&&i!==o[n];)if(++r>=o.length)return!1;var n,i;return(p(e,r,t)||t===a)&&r++,r=a.length?f=a.length:f=i.length&&f{"use strict";var r=n(375),o=n(411),a=n(734)(),i=n(553),l=n(277),s=r("%Math.floor%");e.exports=function(e,t){if("function"!==typeof e)throw new l("`fn` is not a function");if("number"!==typeof t||t<0||t>4294967295||s(t)!==t)throw new l("`length` must be a positive 32-bit integer");var n=arguments.length>2&&!!arguments[2],r=!0,c=!0;if("length"in e&&i){var u=i(e,"length");u&&!u.configurable&&(r=!1),u&&!u.writable&&(c=!1)}return(r||c||!n)&&(a?o(e,"length",t,!0,!0):o(e,"length",t)),e}},670:(e,t,n)=>{"use strict";var r=n(375),o=n(61),a=n(141),i=n(277),l=r("%WeakMap%",!0),s=r("%Map%",!0),c=o("WeakMap.prototype.get",!0),u=o("WeakMap.prototype.set",!0),d=o("WeakMap.prototype.has",!0),h=o("Map.prototype.get",!0),p=o("Map.prototype.set",!0),f=o("Map.prototype.has",!0),m=function(e,t){for(var n,r=e;null!==(n=r.next);r=n)if(n.key===t)return r.next=n.next,n.next=e.next,e.next=n,n};e.exports=function(){var e,t,n,r={assert:function(e){if(!r.has(e))throw new i("Side channel does not contain "+a(e))},get:function(r){if(l&&r&&("object"===typeof r||"function"===typeof r)){if(e)return c(e,r)}else if(s){if(t)return h(t,r)}else if(n)return function(e,t){var n=m(e,t);return n&&n.value}(n,r)},has:function(r){if(l&&r&&("object"===typeof r||"function"===typeof r)){if(e)return d(e,r)}else if(s){if(t)return f(t,r)}else if(n)return function(e,t){return!!m(e,t)}(n,r);return!1},set:function(r,o){l&&r&&("object"===typeof r||"function"===typeof r)?(e||(e=new l),u(e,r,o)):s?(t||(t=new s),p(t,r,o)):(n||(n={key:{},next:null}),function(e,t,n){var r=m(e,t);r?r.value=n:e.next={key:t,next:e.next,value:n}}(n,r,o))}};return r}},634:()=>{},738:(e,t)=>{var n;!function(){"use strict";var r={}.hasOwnProperty;function o(){for(var e="",t=0;t{var t=e&&e.__esModule?()=>e.default:()=>e;return n.d(t,{a:t}),t},n.d=(e,t)=>{for(var r in t)n.o(t,r)&&!n.o(e,r)&&Object.defineProperty(e,r,{enumerable:!0,get:t[r]})},n.f={},n.e=e=>Promise.all(Object.keys(n.f).reduce(((t,r)=>(n.f[r](e,t),t)),[])),n.u=e=>"static/js/"+e+".f772060c.chunk.js",n.miniCssF=e=>{},n.g=function(){if("object"===typeof globalThis)return globalThis;try{return this||new Function("return this")()}catch(e){if("object"===typeof window)return window}}(),n.o=(e,t)=>Object.prototype.hasOwnProperty.call(e,t),(()=>{var e={},t="vmui:";n.l=(r,o,a,i)=>{if(e[r])e[r].push(o);else{var l,s;if(void 0!==a)for(var c=document.getElementsByTagName("script"),u=0;u{l.onerror=l.onload=null,clearTimeout(p);var o=e[r];if(delete e[r],l.parentNode&&l.parentNode.removeChild(l),o&&o.forEach((e=>e(n))),t)return t(n)},p=setTimeout(h.bind(null,void 0,{type:"timeout",target:l}),12e4);l.onerror=h.bind(null,l.onerror),l.onload=h.bind(null,l.onload),s&&document.head.appendChild(l)}}})(),n.r=e=>{"undefined"!==typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})},n.p="./",(()=>{var e={792:0};n.f.j=(t,r)=>{var o=n.o(e,t)?e[t]:void 0;if(0!==o)if(o)r.push(o[2]);else{var a=new Promise(((n,r)=>o=e[t]=[n,r]));r.push(o[2]=a);var i=n.p+n.u(t),l=new Error;n.l(i,(r=>{if(n.o(e,t)&&(0!==(o=e[t])&&(e[t]=void 0),o)){var a=r&&("load"===r.type?"missing":r.type),i=r&&r.target&&r.target.src;l.message="Loading chunk "+t+" failed.\n("+a+": "+i+")",l.name="ChunkLoadError",l.type=a,l.request=i,o[1](l)}}),"chunk-"+t,t)}};var t=(t,r)=>{var o,a,i=r[0],l=r[1],s=r[2],c=0;if(i.some((t=>0!==e[t]))){for(o in l)n.o(l,o)&&(n.m[o]=l[o]);if(s)s(n)}for(t&&t(r);c{"use strict";var e,t=n(609),r=n(159),o=n.n(r),a=n(7),i=n.n(a),l=n(648),s=n.n(l),c=n(220),u=n.n(c);function d(){return d=Object.assign?Object.assign.bind():function(e){for(var t=1;t=0&&(t.hash=e.substr(n),e=e.substr(0,n));let r=e.indexOf("?");r>=0&&(t.search=e.substr(r),e=e.substr(0,r)),e&&(t.pathname=e)}return t}function y(t,n,r,o){void 0===o&&(o={});let{window:a=document.defaultView,v5Compat:i=!1}=o,l=a.history,s=e.Pop,c=null,u=f();function f(){return(l.state||{idx:null}).idx}function v(){s=e.Pop;let t=f(),n=null==t?null:t-u;u=t,c&&c({action:s,location:b.location,delta:n})}function y(e){let t="null"!==a.location.origin?a.location.origin:a.location.href,n="string"===typeof e?e:g(e);return n=n.replace(/ $/,"%20"),p(t,"No window.location.(origin|href) available to create URL for href: "+n),new URL(n,t)}null==u&&(u=0,l.replaceState(d({},l.state,{idx:u}),""));let b={get action(){return s},get location(){return t(a,l)},listen(e){if(c)throw new Error("A history only accepts one active listener");return a.addEventListener(h,v),c=e,()=>{a.removeEventListener(h,v),c=null}},createHref:e=>n(a,e),createURL:y,encodeLocation(e){let t=y(e);return{pathname:t.pathname,search:t.search,hash:t.hash}},push:function(t,n){s=e.Push;let o=_(b.location,t,n);r&&r(o,t),u=f()+1;let d=m(o,u),h=b.createHref(o);try{l.pushState(d,"",h)}catch(p){if(p instanceof DOMException&&"DataCloneError"===p.name)throw p;a.location.assign(h)}i&&c&&c({action:s,location:b.location,delta:1})},replace:function(t,n){s=e.Replace;let o=_(b.location,t,n);r&&r(o,t),u=f();let a=m(o,u),d=b.createHref(o);l.replaceState(a,"",d),i&&c&&c({action:s,location:b.location,delta:0})},go:e=>l.go(e)};return b}var b;!function(e){e.data="data",e.deferred="deferred",e.redirect="redirect",e.error="error"}(b||(b={}));new Set(["lazy","caseSensitive","path","id","index","children"]);function w(e,t,n){return void 0===n&&(n="/"),k(e,t,n,!1)}function k(e,t,n,r){let o=I(("string"===typeof t?v(t):t).pathname||"/",n);if(null==o)return null;let a=x(e);!function(e){e.sort(((e,t)=>e.score!==t.score?t.score-e.score:function(e,t){let n=e.length===t.length&&e.slice(0,-1).every(((e,n)=>e===t[n]));return n?e[e.length-1]-t[t.length-1]:0}(e.routesMeta.map((e=>e.childrenIndex)),t.routesMeta.map((e=>e.childrenIndex)))))}(a);let i=null;for(let l=0;null==i&&l{let i={relativePath:void 0===a?e.path||"":a,caseSensitive:!0===e.caseSensitive,childrenIndex:o,route:e};i.relativePath.startsWith("/")&&(p(i.relativePath.startsWith(r),'Absolute route path "'+i.relativePath+'" nested under path "'+r+'" is not valid. An absolute child route path must start with the combined path of all its parent routes.'),i.relativePath=i.relativePath.slice(r.length));let l=H([r,i.relativePath]),s=n.concat(i);e.children&&e.children.length>0&&(p(!0!==e.index,'Index routes must not have child routes. Please remove all child routes from route path "'+l+'".'),x(e.children,t,s,l)),(null!=e.path||e.index)&&t.push({path:l,score:D(l,e.index),routesMeta:s})};return e.forEach(((e,t)=>{var n;if(""!==e.path&&null!=(n=e.path)&&n.includes("?"))for(let r of S(e.path))o(e,t,r);else o(e,t)})),t}function S(e){let t=e.split("/");if(0===t.length)return[];let[n,...r]=t,o=n.endsWith("?"),a=n.replace(/\?$/,"");if(0===r.length)return o?[a,""]:[a];let i=S(r.join("/")),l=[];return l.push(...i.map((e=>""===e?a:[a,e].join("/")))),o&&l.push(...i),l.map((t=>e.startsWith("/")&&""===t?"/":t))}const A=/^:[\w-]+$/,E=3,C=2,M=1,N=10,T=-2,P=e=>"*"===e;function D(e,t){let n=e.split("/"),r=n.length;return n.some(P)&&(r+=T),t&&(r+=C),n.filter((e=>!P(e))).reduce(((e,t)=>e+(A.test(t)?E:""===t?M:N)),r)}function O(e,t,n){void 0===n&&(n=!1);let{routesMeta:r}=e,o={},a="/",i=[];for(let l=0;l(r.push({paramName:t,isOptional:null!=n}),n?"/?([^\\/]+)?":"/([^\\/]+)")));e.endsWith("*")?(r.push({paramName:"*"}),o+="*"===e||"/*"===e?"(.*)$":"(?:\\/(.+)|\\/*)$"):n?o+="\\/*$":""!==e&&"/"!==e&&(o+="(?:(?=\\/|$))");let a=new RegExp(o,t?void 0:"i");return[a,r]}(e.path,e.caseSensitive,e.end),o=t.match(n);if(!o)return null;let a=o[0],i=a.replace(/(.)\/+$/,"$1"),l=o.slice(1);return{params:r.reduce(((e,t,n)=>{let{paramName:r,isOptional:o}=t;if("*"===r){let e=l[n]||"";i=a.slice(0,a.length-e.length).replace(/(.)\/+$/,"$1")}const s=l[n];return e[r]=o&&!s?void 0:(s||"").replace(/%2F/g,"/"),e}),{}),pathname:a,pathnameBase:i,pattern:e}}function R(e){try{return e.split("/").map((e=>decodeURIComponent(e).replace(/\//g,"%2F"))).join("/")}catch(t){return f(!1,'The URL path "'+e+'" could not be decoded because it is is a malformed URL segment. This is probably due to a bad percent encoding ('+t+")."),e}}function I(e,t){if("/"===t)return e;if(!e.toLowerCase().startsWith(t.toLowerCase()))return null;let n=t.endsWith("/")?t.length-1:t.length,r=e.charAt(n);return r&&"/"!==r?null:e.slice(n)||"/"}function z(e,t,n,r){return"Cannot include a '"+e+"' character in a manually specified `to."+t+"` field ["+JSON.stringify(r)+"]. Please separate it out to the `to."+n+'` field. Alternatively you may provide the full path as a string in and the router will parse it for you.'}function j(e){return e.filter(((e,t)=>0===t||e.route.path&&e.route.path.length>0))}function $(e,t){let n=j(e);return t?n.map(((e,t)=>t===n.length-1?e.pathname:e.pathnameBase)):n.map((e=>e.pathnameBase))}function F(e,t,n,r){let o;void 0===r&&(r=!1),"string"===typeof e?o=v(e):(o=d({},e),p(!o.pathname||!o.pathname.includes("?"),z("?","pathname","search",o)),p(!o.pathname||!o.pathname.includes("#"),z("#","pathname","hash",o)),p(!o.search||!o.search.includes("#"),z("#","search","hash",o)));let a,i=""===e||""===o.pathname,l=i?"/":o.pathname;if(null==l)a=n;else{let e=t.length-1;if(!r&&l.startsWith("..")){let t=l.split("/");for(;".."===t[0];)t.shift(),e-=1;o.pathname=t.join("/")}a=e>=0?t[e]:"/"}let s=function(e,t){void 0===t&&(t="/");let{pathname:n,search:r="",hash:o=""}="string"===typeof e?v(e):e,a=n?n.startsWith("/")?n:function(e,t){let n=t.replace(/\/+$/,"").split("/");return e.split("/").forEach((e=>{".."===e?n.length>1&&n.pop():"."!==e&&n.push(e)})),n.length>1?n.join("/"):"/"}(n,t):t;return{pathname:a,search:B(r),hash:U(o)}}(o,a),c=l&&"/"!==l&&l.endsWith("/"),u=(i||"."===l)&&n.endsWith("/");return s.pathname.endsWith("/")||!c&&!u||(s.pathname+="/"),s}const H=e=>e.join("/").replace(/\/\/+/g,"/"),V=e=>e.replace(/\/+$/,"").replace(/^\/*/,"/"),B=e=>e&&"?"!==e?e.startsWith("?")?e:"?"+e:"",U=e=>e&&"#"!==e?e.startsWith("#")?e:"#"+e:"";Error;function Y(e){return null!=e&&"number"===typeof e.status&&"string"===typeof e.statusText&&"boolean"===typeof e.internal&&"data"in e}const W=["post","put","patch","delete"],q=(new Set(W),["get",...W]);new Set(q),new Set([301,302,303,307,308]),new Set([307,308]);Symbol("deferred");function K(){return K=Object.assign?Object.assign.bind():function(e){for(var t=1;t{r.current=!0}));let o=t.useCallback((function(t,o){void 0===o&&(o={}),r.current&&("number"===typeof t?e.navigate(t):e.navigate(t,K({fromRouteId:n},o)))}),[e,n]);return o}():function(){te()||p(!1);let e=t.useContext(Z),{basename:n,future:r,navigator:o}=t.useContext(Q),{matches:a}=t.useContext(X),{pathname:i}=ne(),l=JSON.stringify($(a,r.v7_relativeSplatPath)),s=t.useRef(!1);re((()=>{s.current=!0}));let c=t.useCallback((function(t,r){if(void 0===r&&(r={}),!s.current)return;if("number"===typeof t)return void o.go(t);let a=F(t,JSON.parse(l),i,"path"===r.relative);null==e&&"/"!==n&&(a.pathname="/"===a.pathname?n:H([n,a.pathname])),(r.replace?o.replace:o.push)(a,r.state,r)}),[n,o,l,i,e]);return c}()}const ae=t.createContext(null);function ie(e,n){let{relative:r}=void 0===n?{}:n,{future:o}=t.useContext(Q),{matches:a}=t.useContext(X),{pathname:i}=ne(),l=JSON.stringify($(a,o.v7_relativeSplatPath));return t.useMemo((()=>F(e,JSON.parse(l),i,"path"===r)),[e,l,i,r])}function le(n,r,o,a){te()||p(!1);let{navigator:i}=t.useContext(Q),{matches:l}=t.useContext(X),s=l[l.length-1],c=s?s.params:{},u=(s&&s.pathname,s?s.pathnameBase:"/");s&&s.route;let d,h=ne();if(r){var f;let e="string"===typeof r?v(r):r;"/"===u||(null==(f=e.pathname)?void 0:f.startsWith(u))||p(!1),d=e}else d=h;let m=d.pathname||"/",_=m;if("/"!==u){let e=u.replace(/^\//,"").split("/");_="/"+m.replace(/^\//,"").split("/").slice(e.length).join("/")}let g=w(n,{pathname:_});let y=he(g&&g.map((e=>Object.assign({},e,{params:Object.assign({},c,e.params),pathname:H([u,i.encodeLocation?i.encodeLocation(e.pathname).pathname:e.pathname]),pathnameBase:"/"===e.pathnameBase?u:H([u,i.encodeLocation?i.encodeLocation(e.pathnameBase).pathname:e.pathnameBase])}))),l,o,a);return r&&y?t.createElement(J.Provider,{value:{location:K({pathname:"/",search:"",hash:"",state:null,key:"default"},d),navigationType:e.Pop}},y):y}function se(){let e=function(){var e;let n=t.useContext(ee),r=_e(fe.UseRouteError),o=ge(fe.UseRouteError);if(void 0!==n)return n;return null==(e=r.errors)?void 0:e[o]}(),n=Y(e)?e.status+" "+e.statusText:e instanceof Error?e.message:JSON.stringify(e),r=e instanceof Error?e.stack:null,o="rgba(200,200,200, 0.5)",a={padding:"0.5rem",backgroundColor:o};return t.createElement(t.Fragment,null,t.createElement("h2",null,"Unexpected Application Error!"),t.createElement("h3",{style:{fontStyle:"italic"}},n),r?t.createElement("pre",{style:a},r):null,null)}const ce=t.createElement(se,null);class ue extends t.Component{constructor(e){super(e),this.state={location:e.location,revalidation:e.revalidation,error:e.error}}static getDerivedStateFromError(e){return{error:e}}static getDerivedStateFromProps(e,t){return t.location!==e.location||"idle"!==t.revalidation&&"idle"===e.revalidation?{error:e.error,location:e.location,revalidation:e.revalidation}:{error:void 0!==e.error?e.error:t.error,location:t.location,revalidation:e.revalidation||t.revalidation}}componentDidCatch(e,t){console.error("React Router caught the following error during render",e,t)}render(){return void 0!==this.state.error?t.createElement(X.Provider,{value:this.props.routeContext},t.createElement(ee.Provider,{value:this.state.error,children:this.props.component})):this.props.children}}function de(e){let{routeContext:n,match:r,children:o}=e,a=t.useContext(Z);return a&&a.static&&a.staticContext&&(r.route.errorElement||r.route.ErrorBoundary)&&(a.staticContext._deepestRenderedBoundaryId=r.route.id),t.createElement(X.Provider,{value:n},o)}function he(e,n,r,o){var a;if(void 0===n&&(n=[]),void 0===r&&(r=null),void 0===o&&(o=null),null==e){var i;if(!r)return null;if(r.errors)e=r.matches;else{if(!(null!=(i=o)&&i.v7_partialHydration&&0===n.length&&!r.initialized&&r.matches.length>0))return null;e=r.matches}}let l=e,s=null==(a=r)?void 0:a.errors;if(null!=s){let e=l.findIndex((e=>e.route.id&&void 0!==(null==s?void 0:s[e.route.id])));e>=0||p(!1),l=l.slice(0,Math.min(l.length,e+1))}let c=!1,u=-1;if(r&&o&&o.v7_partialHydration)for(let t=0;t=0?l.slice(0,u+1):[l[0]];break}}}return l.reduceRight(((e,o,a)=>{let i,d=!1,h=null,p=null;var f;r&&(i=s&&o.route.id?s[o.route.id]:void 0,h=o.route.errorElement||ce,c&&(u<0&&0===a?(f="route-fallback",!1||ve[f]||(ve[f]=!0),d=!0,p=null):u===a&&(d=!0,p=o.route.hydrateFallbackElement||null)));let m=n.concat(l.slice(0,a+1)),_=()=>{let n;return n=i?h:d?p:o.route.Component?t.createElement(o.route.Component,null):o.route.element?o.route.element:e,t.createElement(de,{match:o,routeContext:{outlet:e,matches:m,isDataRoute:null!=r},children:n})};return r&&(o.route.ErrorBoundary||o.route.errorElement||0===a)?t.createElement(ue,{location:r.location,revalidation:r.revalidation,component:h,error:i,children:_(),routeContext:{outlet:null,matches:m,isDataRoute:!0}}):_()}),null)}var pe=function(e){return e.UseBlocker="useBlocker",e.UseRevalidator="useRevalidator",e.UseNavigateStable="useNavigate",e}(pe||{}),fe=function(e){return e.UseBlocker="useBlocker",e.UseLoaderData="useLoaderData",e.UseActionData="useActionData",e.UseRouteError="useRouteError",e.UseNavigation="useNavigation",e.UseRouteLoaderData="useRouteLoaderData",e.UseMatches="useMatches",e.UseRevalidator="useRevalidator",e.UseNavigateStable="useNavigate",e.UseRouteId="useRouteId",e}(fe||{});function me(e){let n=t.useContext(Z);return n||p(!1),n}function _e(e){let n=t.useContext(G);return n||p(!1),n}function ge(e){let n=function(e){let n=t.useContext(X);return n||p(!1),n}(),r=n.matches[n.matches.length-1];return r.route.id||p(!1),r.route.id}const ve={};t.startTransition;function ye(e){return function(e){let n=t.useContext(X).outlet;return n?t.createElement(ae.Provider,{value:e},n):n}(e.context)}function be(e){p(!1)}function we(n){let{basename:r="/",children:o=null,location:a,navigationType:i=e.Pop,navigator:l,static:s=!1,future:c}=n;te()&&p(!1);let u=r.replace(/^\/*/,"/"),d=t.useMemo((()=>({basename:u,navigator:l,static:s,future:K({v7_relativeSplatPath:!1},c)})),[u,c,l,s]);"string"===typeof a&&(a=v(a));let{pathname:h="/",search:f="",hash:m="",state:_=null,key:g="default"}=a,y=t.useMemo((()=>{let e=I(h,u);return null==e?null:{location:{pathname:e,search:f,hash:m,state:_,key:g},navigationType:i}}),[u,h,f,m,_,g,i]);return null==y?null:t.createElement(Q.Provider,{value:d},t.createElement(J.Provider,{children:o,value:y}))}function ke(e){let{children:t,location:n}=e;return le(xe(t),n)}new Promise((()=>{}));t.Component;function xe(e,n){void 0===n&&(n=[]);let r=[];return t.Children.forEach(e,((e,o)=>{if(!t.isValidElement(e))return;let a=[...n,o];if(e.type===t.Fragment)return void r.push.apply(r,xe(e.props.children,a));e.type!==be&&p(!1),e.props.index&&e.props.children&&p(!1);let i={id:e.props.id||a.join("-"),caseSensitive:e.props.caseSensitive,element:e.props.element,Component:e.props.Component,index:e.props.index,path:e.props.path,loader:e.props.loader,action:e.props.action,errorElement:e.props.errorElement,ErrorBoundary:e.props.ErrorBoundary,hasErrorBoundary:null!=e.props.ErrorBoundary||null!=e.props.errorElement,shouldRevalidate:e.props.shouldRevalidate,handle:e.props.handle,lazy:e.props.lazy};e.props.children&&(i.children=xe(e.props.children,a)),r.push(i)})),r}function Se(){return Se=Object.assign?Object.assign.bind():function(e){for(var t=1;t=0||(o[n]=e[n]);return o}function Ee(e){return void 0===e&&(e=""),new URLSearchParams("string"===typeof e||Array.isArray(e)||e instanceof URLSearchParams?e:Object.keys(e).reduce(((t,n)=>{let r=e[n];return t.concat(Array.isArray(r)?r.map((e=>[n,e])):[[n,r]])}),[]))}new Set(["application/x-www-form-urlencoded","multipart/form-data","text/plain"]);const Ce=["onClick","relative","reloadDocument","replace","state","target","to","preventScrollReset","unstable_viewTransition"],Me=["aria-current","caseSensitive","className","end","style","to","unstable_viewTransition","children"];try{window.__reactRouterVersion="6"}catch(Fd){}const Ne=t.createContext({isTransitioning:!1});new Map;const Te=t.startTransition;t.flushSync,t.useId;function Pe(e){let{basename:n,children:r,future:o,window:a}=e,i=t.useRef();null==i.current&&(i.current=function(e){return void 0===e&&(e={}),y((function(e,t){let{pathname:n="/",search:r="",hash:o=""}=v(e.location.hash.substr(1));return n.startsWith("/")||n.startsWith(".")||(n="/"+n),_("",{pathname:n,search:r,hash:o},t.state&&t.state.usr||null,t.state&&t.state.key||"default")}),(function(e,t){let n=e.document.querySelector("base"),r="";if(n&&n.getAttribute("href")){let t=e.location.href,n=t.indexOf("#");r=-1===n?t:t.slice(0,n)}return r+"#"+("string"===typeof t?t:g(t))}),(function(e,t){f("/"===e.pathname.charAt(0),"relative pathnames are not supported in hash history.push("+JSON.stringify(t)+")")}),e)}({window:a,v5Compat:!0}));let l=i.current,[s,c]=t.useState({action:l.action,location:l.location}),{v7_startTransition:u}=o||{},d=t.useCallback((e=>{u&&Te?Te((()=>c(e))):c(e)}),[c,u]);return t.useLayoutEffect((()=>l.listen(d)),[l,d]),t.createElement(we,{basename:n,children:r,location:s.location,navigationType:s.action,navigator:l,future:o})}const De="undefined"!==typeof window&&"undefined"!==typeof window.document&&"undefined"!==typeof window.document.createElement,Oe=/^(?:[a-z][a-z0-9+.-]*:|\/\/)/i,Le=t.forwardRef((function(e,n){let r,{onClick:o,relative:a,reloadDocument:i,replace:l,state:s,target:c,to:u,preventScrollReset:d,unstable_viewTransition:h}=e,f=Ae(e,Ce),{basename:m}=t.useContext(Q),_=!1;if("string"===typeof u&&Oe.test(u)&&(r=u,De))try{let e=new URL(window.location.href),t=u.startsWith("//")?new URL(e.protocol+u):new URL(u),n=I(t.pathname,m);t.origin===e.origin&&null!=n?u=n+t.search+t.hash:_=!0}catch(Fd){}let v=function(e,n){let{relative:r}=void 0===n?{}:n;te()||p(!1);let{basename:o,navigator:a}=t.useContext(Q),{hash:i,pathname:l,search:s}=ie(e,{relative:r}),c=l;return"/"!==o&&(c="/"===l?o:H([o,l])),a.createHref({pathname:c,search:s,hash:i})}(u,{relative:a}),y=function(e,n){let{target:r,replace:o,state:a,preventScrollReset:i,relative:l,unstable_viewTransition:s}=void 0===n?{}:n,c=oe(),u=ne(),d=ie(e,{relative:l});return t.useCallback((t=>{if(function(e,t){return 0===e.button&&(!t||"_self"===t)&&!function(e){return!!(e.metaKey||e.altKey||e.ctrlKey||e.shiftKey)}(e)}(t,r)){t.preventDefault();let n=void 0!==o?o:g(u)===g(d);c(e,{replace:n,state:a,preventScrollReset:i,relative:l,unstable_viewTransition:s})}}),[u,c,d,o,a,r,e,i,l,s])}(u,{replace:l,state:s,target:c,preventScrollReset:d,relative:a,unstable_viewTransition:h});return t.createElement("a",Se({},f,{href:r||v,onClick:_||i?o:function(e){o&&o(e),e.defaultPrevented||y(e)},ref:n,target:c}))}));const Re=t.forwardRef((function(e,n){let{"aria-current":r="page",caseSensitive:o=!1,className:a="",end:i=!1,style:l,to:s,unstable_viewTransition:c,children:u}=e,d=Ae(e,Me),h=ie(s,{relative:d.relative}),f=ne(),m=t.useContext(G),{navigator:_,basename:g}=t.useContext(Q),v=null!=m&&function(e,n){void 0===n&&(n={});let r=t.useContext(Ne);null==r&&p(!1);let{basename:o}=je(Ie.useViewTransitionState),a=ie(e,{relative:n.relative});if(!r.isTransitioning)return!1;let i=I(r.currentLocation.pathname,o)||r.currentLocation.pathname,l=I(r.nextLocation.pathname,o)||r.nextLocation.pathname;return null!=L(a.pathname,l)||null!=L(a.pathname,i)}(h)&&!0===c,y=_.encodeLocation?_.encodeLocation(h).pathname:h.pathname,b=f.pathname,w=m&&m.navigation&&m.navigation.location?m.navigation.location.pathname:null;o||(b=b.toLowerCase(),w=w?w.toLowerCase():null,y=y.toLowerCase()),w&&g&&(w=I(w,g)||w);const k="/"!==y&&y.endsWith("/")?y.length-1:y.length;let x,S=b===y||!i&&b.startsWith(y)&&"/"===b.charAt(k),A=null!=w&&(w===y||!i&&w.startsWith(y)&&"/"===w.charAt(y.length)),E={isActive:S,isPending:A,isTransitioning:v},C=S?r:void 0;x="function"===typeof a?a(E):[a,S?"active":null,A?"pending":null,v?"transitioning":null].filter(Boolean).join(" ");let M="function"===typeof l?l(E):l;return t.createElement(Le,Se({},d,{"aria-current":C,className:x,ref:n,style:M,to:s,unstable_viewTransition:c}),"function"===typeof u?u(E):u)}));var Ie,ze;function je(e){let n=t.useContext(Z);return n||p(!1),n}function $e(e){let n=t.useRef(Ee(e)),r=t.useRef(!1),o=ne(),a=t.useMemo((()=>function(e,t){let n=Ee(e);return t&&t.forEach(((e,r)=>{n.has(r)||t.getAll(r).forEach((e=>{n.append(r,e)}))})),n}(o.search,r.current?null:n.current)),[o.search]),i=oe(),l=t.useCallback(((e,t)=>{const n=Ee("function"===typeof e?e(a):e);r.current=!0,i("?"+n,t)}),[i,a]);return[a,l]}(function(e){e.UseScrollRestoration="useScrollRestoration",e.UseSubmit="useSubmit",e.UseSubmitFetcher="useSubmitFetcher",e.UseFetcher="useFetcher",e.useViewTransitionState="useViewTransitionState"})(Ie||(Ie={})),function(e){e.UseFetcher="useFetcher",e.UseFetchers="useFetchers",e.UseScrollRestoration="useScrollRestoration"}(ze||(ze={}));const Fe=()=>{var e;const t=(null===(e=document.getElementById("root"))||void 0===e?void 0:e.dataset.params)||"{}";try{return JSON.parse(t)}catch(Fd){return console.error(Fd),{}}},He=()=>!!Object.keys(Fe()).length,Ve=/(\/select\/)(\d+|\d.+)(\/)(.+)/,Be=e=>{var t;return(null===(t=e.match(Ve))||void 0===t?void 0:t[2])||""};let Ue=function(e){return e.logs="logs",e.anomaly="anomaly",e}({});const Ye=(e,t)=>{t?window.localStorage.setItem(e,JSON.stringify({value:t})):qe([e]),window.dispatchEvent(new Event("storage"))},We=e=>{const t=window.localStorage.getItem(e);if(null!==t)try{var n;return null===(n=JSON.parse(t))||void 0===n?void 0:n.value}catch(Fd){return t}},qe=e=>e.forEach((e=>window.localStorage.removeItem(e))),{REACT_APP_TYPE:Ke}={REACT_APP_TYPE:"logs"};var Ze=n(215),Ge=n.n(Ze),Qe=n(424),Je=n.n(Qe);const Xe={table:100,chart:20,code:1e3},et=(e,t)=>{const n=window.location.hash.split("?")[1],r=Ge().parse(n,{ignoreQueryPrefix:!0});return Je()(r,e,t||"")};let tt=function(e){return e.yhat="yhat",e.yhatUpper="yhat_upper",e.yhatLower="yhat_lower",e.anomaly="vmui_anomalies_points",e.training="vmui_training_data",e.actual="actual",e.anomalyScore="anomaly_score",e}({}),nt=function(e){return e.table="table",e.chart="chart",e.code="code",e}({}),rt=function(e){return e.emptyServer="Please enter Server URL",e.validServer="Please provide a valid Server URL",e.validQuery="Please enter a valid Query and execute it",e.traceNotFound="Not found the tracing information",e.emptyTitle="Please enter title",e.positiveNumber="Please enter positive number",e.validStep="Please enter a valid step",e.unknownType="Unknown server response format: must have 'errorType'",e}({}),ot=function(e){return e.system="system",e.light="light",e.dark="dark",e}({}),at=function(e){return e.empty="empty",e.metricsql="metricsql",e.label="label",e.labelValue="labelValue",e}({});const it=e=>getComputedStyle(document.documentElement).getPropertyValue("--".concat(e)),lt=(e,t)=>{document.documentElement.style.setProperty("--".concat(e),t)},st=()=>window.matchMedia("(prefers-color-scheme: dark)").matches,ct=e=>e.replace(/\/$/,""),ut=et("g0.tenantID",""),dt={serverUrl:ct((e=>{const{serverURL:t}=Fe(),n=We("SERVER_URL"),r=window.location.href.replace(/\/(select\/)?(vmui)\/.*/,""),o="".concat(window.location.origin).concat(window.location.pathname.replace(/^\/vmui/,"")),a=window.location.href.replace(/\/(?:prometheus\/)?(?:graph|vmui)\/.*/,"/prometheus"),i=t||n||a;switch(Ke){case Ue.logs:return r;case Ue.anomaly:return n||o;default:return e?((e,t)=>e.replace(Ve,"$1".concat(t,"/$4")))(i,e):i}})(ut)),tenantId:ut,theme:We("THEME")||ot.system,isDarkTheme:null,flags:{}};function ht(e,t){switch(t.type){case"SET_SERVER":return{...e,serverUrl:ct(t.payload)};case"SET_TENANT_ID":return{...e,tenantId:t.payload};case"SET_THEME":return Ye("THEME",t.payload),{...e,theme:t.payload};case"SET_DARK_THEME":return{...e,isDarkTheme:(n=e.theme,n===ot.system&&st()||n===ot.dark)};case"SET_FLAGS":return{...e,flags:t.payload};default:throw new Error}var n}var pt=n(746);var ft=0;Array.isArray;function mt(e,t,n,r,o,a){t||(t={});var i,l,s=t;if("ref"in s)for(l in s={},t)"ref"==l?i=t[l]:s[l]=t[l];var c={type:e,props:s,key:n,ref:i,__k:null,__:null,__b:0,__e:null,__d:void 0,__c:null,constructor:void 0,__v:--ft,__i:-1,__u:0,__source:o,__self:a};if("function"==typeof e&&(i=e.defaultProps))for(l in i)void 0===s[l]&&(s[l]=i[l]);return pt.fF.vnode&&pt.fF.vnode(c),c}const _t=(0,t.createContext)({}),gt=()=>(0,t.useContext)(_t).state,vt=()=>(0,t.useContext)(_t).dispatch,yt=Object.entries(dt).reduce(((e,t)=>{let[n,r]=t;return{...e,[n]:et(n)||r}}),{}),bt="YYYY-MM-DD",wt="YYYY-MM-DD HH:mm:ss",kt="YYYY-MM-DD[T]HH:mm:ss",xt=window.innerWidth/4,St=window.innerWidth/40,At=1,Et=1578e8,Ct=Intl.supportedValuesOf,Mt=Ct?Ct("timeZone"):["Africa/Abidjan","Africa/Accra","Africa/Addis_Ababa","Africa/Algiers","Africa/Asmera","Africa/Bamako","Africa/Bangui","Africa/Banjul","Africa/Bissau","Africa/Blantyre","Africa/Brazzaville","Africa/Bujumbura","Africa/Cairo","Africa/Casablanca","Africa/Ceuta","Africa/Conakry","Africa/Dakar","Africa/Dar_es_Salaam","Africa/Djibouti","Africa/Douala","Africa/El_Aaiun","Africa/Freetown","Africa/Gaborone","Africa/Harare","Africa/Johannesburg","Africa/Juba","Africa/Kampala","Africa/Khartoum","Africa/Kigali","Africa/Kinshasa","Africa/Lagos","Africa/Libreville","Africa/Lome","Africa/Luanda","Africa/Lubumbashi","Africa/Lusaka","Africa/Malabo","Africa/Maputo","Africa/Maseru","Africa/Mbabane","Africa/Mogadishu","Africa/Monrovia","Africa/Nairobi","Africa/Ndjamena","Africa/Niamey","Africa/Nouakchott","Africa/Ouagadougou","Africa/Porto-Novo","Africa/Sao_Tome","Africa/Tripoli","Africa/Tunis","Africa/Windhoek","America/Adak","America/Anchorage","America/Anguilla","America/Antigua","America/Araguaina","America/Argentina/La_Rioja","America/Argentina/Rio_Gallegos","America/Argentina/Salta","America/Argentina/San_Juan","America/Argentina/San_Luis","America/Argentina/Tucuman","America/Argentina/Ushuaia","America/Aruba","America/Asuncion","America/Bahia","America/Bahia_Banderas","America/Barbados","America/Belem","America/Belize","America/Blanc-Sablon","America/Boa_Vista","America/Bogota","America/Boise","America/Buenos_Aires","America/Cambridge_Bay","America/Campo_Grande","America/Cancun","America/Caracas","America/Catamarca","America/Cayenne","America/Cayman","America/Chicago","America/Chihuahua","America/Coral_Harbour","America/Cordoba","America/Costa_Rica","America/Creston","America/Cuiaba","America/Curacao","America/Danmarkshavn","America/Dawson","America/Dawson_Creek","America/Denver","America/Detroit","America/Dominica","America/Edmonton","America/Eirunepe","America/El_Salvador","America/Fort_Nelson","America/Fortaleza","America/Glace_Bay","America/Godthab","America/Goose_Bay","America/Grand_Turk","America/Grenada","America/Guadeloupe","America/Guatemala","America/Guayaquil","America/Guyana","America/Halifax","America/Havana","America/Hermosillo","America/Indiana/Knox","America/Indiana/Marengo","America/Indiana/Petersburg","America/Indiana/Tell_City","America/Indiana/Vevay","America/Indiana/Vincennes","America/Indiana/Winamac","America/Indianapolis","America/Inuvik","America/Iqaluit","America/Jamaica","America/Jujuy","America/Juneau","America/Kentucky/Monticello","America/Kralendijk","America/La_Paz","America/Lima","America/Los_Angeles","America/Louisville","America/Lower_Princes","America/Maceio","America/Managua","America/Manaus","America/Marigot","America/Martinique","America/Matamoros","America/Mazatlan","America/Mendoza","America/Menominee","America/Merida","America/Metlakatla","America/Mexico_City","America/Miquelon","America/Moncton","America/Monterrey","America/Montevideo","America/Montreal","America/Montserrat","America/Nassau","America/New_York","America/Nipigon","America/Nome","America/Noronha","America/North_Dakota/Beulah","America/North_Dakota/Center","America/North_Dakota/New_Salem","America/Ojinaga","America/Panama","America/Pangnirtung","America/Paramaribo","America/Phoenix","America/Port-au-Prince","America/Port_of_Spain","America/Porto_Velho","America/Puerto_Rico","America/Punta_Arenas","America/Rainy_River","America/Rankin_Inlet","America/Recife","America/Regina","America/Resolute","America/Rio_Branco","America/Santa_Isabel","America/Santarem","America/Santiago","America/Santo_Domingo","America/Sao_Paulo","America/Scoresbysund","America/Sitka","America/St_Barthelemy","America/St_Johns","America/St_Kitts","America/St_Lucia","America/St_Thomas","America/St_Vincent","America/Swift_Current","America/Tegucigalpa","America/Thule","America/Thunder_Bay","America/Tijuana","America/Toronto","America/Tortola","America/Vancouver","America/Whitehorse","America/Winnipeg","America/Yakutat","America/Yellowknife","Antarctica/Casey","Antarctica/Davis","Antarctica/DumontDUrville","Antarctica/Macquarie","Antarctica/Mawson","Antarctica/McMurdo","Antarctica/Palmer","Antarctica/Rothera","Antarctica/Syowa","Antarctica/Troll","Antarctica/Vostok","Arctic/Longyearbyen","Asia/Aden","Asia/Almaty","Asia/Amman","Asia/Anadyr","Asia/Aqtau","Asia/Aqtobe","Asia/Ashgabat","Asia/Atyrau","Asia/Baghdad","Asia/Bahrain","Asia/Baku","Asia/Bangkok","Asia/Barnaul","Asia/Beirut","Asia/Bishkek","Asia/Brunei","Asia/Calcutta","Asia/Chita","Asia/Choibalsan","Asia/Colombo","Asia/Damascus","Asia/Dhaka","Asia/Dili","Asia/Dubai","Asia/Dushanbe","Asia/Famagusta","Asia/Gaza","Asia/Hebron","Asia/Hong_Kong","Asia/Hovd","Asia/Irkutsk","Asia/Jakarta","Asia/Jayapura","Asia/Jerusalem","Asia/Kabul","Asia/Kamchatka","Asia/Karachi","Asia/Katmandu","Asia/Khandyga","Asia/Krasnoyarsk","Asia/Kuala_Lumpur","Asia/Kuching","Asia/Kuwait","Asia/Macau","Asia/Magadan","Asia/Makassar","Asia/Manila","Asia/Muscat","Asia/Nicosia","Asia/Novokuznetsk","Asia/Novosibirsk","Asia/Omsk","Asia/Oral","Asia/Phnom_Penh","Asia/Pontianak","Asia/Pyongyang","Asia/Qatar","Asia/Qostanay","Asia/Qyzylorda","Asia/Rangoon","Asia/Riyadh","Asia/Saigon","Asia/Sakhalin","Asia/Samarkand","Asia/Seoul","Asia/Shanghai","Asia/Singapore","Asia/Srednekolymsk","Asia/Taipei","Asia/Tashkent","Asia/Tbilisi","Asia/Tehran","Asia/Thimphu","Asia/Tokyo","Asia/Tomsk","Asia/Ulaanbaatar","Asia/Urumqi","Asia/Ust-Nera","Asia/Vientiane","Asia/Vladivostok","Asia/Yakutsk","Asia/Yekaterinburg","Asia/Yerevan","Atlantic/Azores","Atlantic/Bermuda","Atlantic/Canary","Atlantic/Cape_Verde","Atlantic/Faeroe","Atlantic/Madeira","Atlantic/Reykjavik","Atlantic/South_Georgia","Atlantic/St_Helena","Atlantic/Stanley","Australia/Adelaide","Australia/Brisbane","Australia/Broken_Hill","Australia/Currie","Australia/Darwin","Australia/Eucla","Australia/Hobart","Australia/Lindeman","Australia/Lord_Howe","Australia/Melbourne","Australia/Perth","Australia/Sydney","Europe/Amsterdam","Europe/Andorra","Europe/Astrakhan","Europe/Athens","Europe/Belgrade","Europe/Berlin","Europe/Bratislava","Europe/Brussels","Europe/Bucharest","Europe/Budapest","Europe/Busingen","Europe/Chisinau","Europe/Copenhagen","Europe/Dublin","Europe/Gibraltar","Europe/Guernsey","Europe/Helsinki","Europe/Isle_of_Man","Europe/Istanbul","Europe/Jersey","Europe/Kaliningrad","Europe/Kiev","Europe/Kirov","Europe/Lisbon","Europe/Ljubljana","Europe/London","Europe/Luxembourg","Europe/Madrid","Europe/Malta","Europe/Mariehamn","Europe/Minsk","Europe/Monaco","Europe/Moscow","Europe/Oslo","Europe/Paris","Europe/Podgorica","Europe/Prague","Europe/Riga","Europe/Rome","Europe/Samara","Europe/San_Marino","Europe/Sarajevo","Europe/Saratov","Europe/Simferopol","Europe/Skopje","Europe/Sofia","Europe/Stockholm","Europe/Tallinn","Europe/Tirane","Europe/Ulyanovsk","Europe/Uzhgorod","Europe/Vaduz","Europe/Vatican","Europe/Vienna","Europe/Vilnius","Europe/Volgograd","Europe/Warsaw","Europe/Zagreb","Europe/Zaporozhye","Europe/Zurich","Indian/Antananarivo","Indian/Chagos","Indian/Christmas","Indian/Cocos","Indian/Comoro","Indian/Kerguelen","Indian/Mahe","Indian/Maldives","Indian/Mauritius","Indian/Mayotte","Indian/Reunion","Pacific/Apia","Pacific/Auckland","Pacific/Bougainville","Pacific/Chatham","Pacific/Easter","Pacific/Efate","Pacific/Enderbury","Pacific/Fakaofo","Pacific/Fiji","Pacific/Funafuti","Pacific/Galapagos","Pacific/Gambier","Pacific/Guadalcanal","Pacific/Guam","Pacific/Honolulu","Pacific/Johnston","Pacific/Kiritimati","Pacific/Kosrae","Pacific/Kwajalein","Pacific/Majuro","Pacific/Marquesas","Pacific/Midway","Pacific/Nauru","Pacific/Niue","Pacific/Norfolk","Pacific/Noumea","Pacific/Pago_Pago","Pacific/Palau","Pacific/Pitcairn","Pacific/Ponape","Pacific/Port_Moresby","Pacific/Rarotonga","Pacific/Saipan","Pacific/Tahiti","Pacific/Tarawa","Pacific/Tongatapu","Pacific/Truk","Pacific/Wake","Pacific/Wallis"],Nt=[{long:"years",short:"y",possible:"year"},{long:"weeks",short:"w",possible:"week"},{long:"days",short:"d",possible:"day"},{long:"hours",short:"h",possible:"hour"},{long:"minutes",short:"m",possible:"min"},{long:"seconds",short:"s",possible:"sec"},{long:"milliseconds",short:"ms",possible:"millisecond"}],Tt=Nt.map((e=>e.short)),Pt=e=>{let t=(n=e,Math.round(1e3*n)/1e3);var n;const r=Math.round(e);e>=100&&(t=r-r%10),e<100&&e>=10&&(t=r-r%5),e<10&&e>=1&&(t=r),e<1&&e>.01&&(t=Math.round(40*e)/40);const a=(e=>zt(o().duration(e,"seconds").asMilliseconds()))(t||.001);return a.replace(/\s/g,"")},Dt=e=>{const t=e.match(/\d+/g),n=e.match(/[a-zA-Z]+/g);if(n&&t&&Tt.includes(n[0]))return{[n[0]]:t[0]}},Ot=(e,t)=>Pt(e/(t?St:xt)),Lt=(e,t)=>{const n=(t||o()().toDate()).valueOf()/1e3,r=(e=>{const t=Nt.map((e=>e.short)).join("|"),n=new RegExp("\\d+(\\.\\d+)?[".concat(t,"]+"),"g"),r=(e.match(n)||[]).reduce(((e,t)=>{const n=Dt(t);return n?{...e,...n}:{...e}}),{});return o().duration(r).asSeconds()})(e);return{start:n-r,end:n,step:Ot(r),date:Rt(t||o()().toDate())}},Rt=e=>o().tz(e).utc().format(kt),It=e=>o().tz(e).format(kt),zt=e=>{const t=Math.floor(e%1e3),n=Math.floor(e/1e3%60),r=Math.floor(e/1e3/60%60),o=Math.floor(e/1e3/3600%24),a=Math.floor(e/864e5),i=["d","h","m","s","ms"],l=[a,o,r,n,t].map(((e,t)=>e?"".concat(e).concat(i[t]):""));return l.filter((e=>e)).join("")},jt=e=>{const t=o()(1e3*e);return t.isValid()?t.toDate():new Date},$t="logs"===Ue.logs,Ft=[{title:"Last 5 minutes",duration:"5m",isDefault:$t},{title:"Last 15 minutes",duration:"15m"},{title:"Last 30 minutes",duration:"30m",isDefault:!$t},{title:"Last 1 hour",duration:"1h"},{title:"Last 3 hours",duration:"3h"},{title:"Last 6 hours",duration:"6h"},{title:"Last 12 hours",duration:"12h"},{title:"Last 24 hours",duration:"24h"},{title:"Last 2 days",duration:"2d"},{title:"Last 7 days",duration:"7d"},{title:"Last 30 days",duration:"30d"},{title:"Last 90 days",duration:"90d"},{title:"Last 180 days",duration:"180d"},{title:"Last 1 year",duration:"1y"},{title:"Yesterday",duration:"1d",until:()=>o()().tz().subtract(1,"day").endOf("day").toDate()},{title:"Today",duration:"1d",until:()=>o()().tz().endOf("day").toDate()}].map((e=>({id:e.title.replace(/\s/g,"_").toLocaleLowerCase(),until:e.until?e.until:()=>o()().tz().toDate(),...e}))),Ht=e=>{var t;let{relativeTimeId:n,defaultDuration:r,defaultEndInput:o}=e;const a=null===(t=Ft.find((e=>e.isDefault)))||void 0===t?void 0:t.id,i=n||et("g0.relative_time",a),l=Ft.find((e=>e.id===i));return{relativeTimeId:l?i:"none",duration:l?l.duration:r,endInput:l?l.until():o}},Vt=e=>{const t=o()().tz(e);return"UTC".concat(t.format("Z"))},Bt=function(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:"";const t=new RegExp(e,"i");return Mt.reduce(((n,r)=>{const o=(r.match(/^(.*?)\//)||[])[1]||"unknown",a=Vt(r),i=a.replace(/UTC|0/,""),l=r.replace(/[/_]/g," "),s={region:r,utc:a,search:"".concat(r," ").concat(a," ").concat(l," ").concat(i)},c=!e||e&&t.test(s.search);return c&&n[o]?n[o].push(s):c&&(n[o]=[s]),n}),{})},Ut=e=>{o().tz.setDefault(e)},Yt=()=>{const e=o().tz.guess(),t=(e=>{try{return o()().tz(e),!0}catch(Fd){return!1}})(e);return{isValid:t,title:t?"Browser Time (".concat(e,")"):"Browser timezone (UTC)",region:t?e:"UTC"}},Wt=We("TIMEZONE")||Yt().region;Ut(Wt);const qt={...(()=>{const e=et("g0.range_input"),{duration:t,endInput:n,relativeTimeId:r}=Ht({defaultDuration:e||"1h",defaultEndInput:(a=et("g0.end_input",o()().utc().format(kt)),o()(a).utcOffset(0,!0).toDate()),relativeTimeId:e?et("g0.relative_time","none"):void 0});var a;return{duration:t,period:Lt(t,n),relativeTime:r}})(),timezone:Wt};function Kt(e,t){switch(t.type){case"SET_TIME_STATE":return{...e,...t.payload};case"SET_DURATION":return{...e,duration:t.payload,period:Lt(t.payload,jt(e.period.end)),relativeTime:"none"};case"SET_RELATIVE_TIME":return{...e,duration:t.payload.duration,period:Lt(t.payload.duration,t.payload.until),relativeTime:t.payload.id};case"SET_PERIOD":const n=(e=>{const t=e.to.valueOf()-e.from.valueOf();return zt(t)})(t.payload);return{...e,duration:n,period:Lt(n,t.payload.to),relativeTime:"none"};case"RUN_QUERY":const{duration:r,endInput:o}=Ht({relativeTimeId:e.relativeTime,defaultDuration:e.duration,defaultEndInput:jt(e.period.end)});return{...e,period:Lt(r,o)};case"RUN_QUERY_TO_NOW":return{...e,period:Lt(e.duration)};case"SET_TIMEZONE":return Ut(t.payload),Ye("TIMEZONE",t.payload),e.defaultTimezone&&Ye("DISABLED_DEFAULT_TIMEZONE",t.payload!==e.defaultTimezone),{...e,timezone:t.payload};case"SET_DEFAULT_TIMEZONE":return{...e,defaultTimezone:t.payload};default:throw new Error}}const Zt=(0,t.createContext)({}),Gt=()=>(0,t.useContext)(Zt).state,Qt=()=>(0,t.useContext)(Zt).dispatch,Jt=e=>{const t=e.map((e=>e.values[e.index])),n=(e=>{const t=We(e);return t?JSON.parse(t):[]})("QUERY_HISTORY");n[0]||(n[0]=[]);const r=n[0];t.forEach((e=>{!r.includes(e)&&e&&r.unshift(e),r.length>250&&r.shift()})),Ye("QUERY_HISTORY",JSON.stringify(n))},Xt=50,en=1e3,tn=1e3;const nn=(()=>{var e;const t=(null===(e=(window.location.hash.split("?")[1]||"").match(/g\d+\.expr/g))||void 0===e?void 0:e.length)||1;return new Array(t>10?10:t).fill(1).map(((e,t)=>et("g".concat(t,".expr"),"")))})(),rn={query:nn,queryHistory:nn.map((e=>({index:0,values:[e]}))),autocomplete:We("AUTOCOMPLETE")||!1,autocompleteQuick:!1,autocompleteCache:new class{constructor(){this.maxSize=void 0,this.map=void 0,this.maxSize=tn,this.map=new Map}get(e){for(const[t,n]of this.map){const r=JSON.parse(t),o=r.start===e.start&&r.end===e.end,a=r.type===e.type,i=e.value&&r.value&&e.value.includes(r.value),l=r.match===e.match||i,s=n.length=this.maxSize){const e=this.map.keys().next().value;this.map.delete(e)}this.map.set(JSON.stringify(e),t)}},metricsQLFunctions:[]};function on(e,t){switch(t.type){case"SET_QUERY":return{...e,query:t.payload.map((e=>e))};case"SET_QUERY_HISTORY":return Jt(t.payload),{...e,queryHistory:t.payload};case"SET_QUERY_HISTORY_BY_INDEX":return e.queryHistory.splice(t.payload.queryNumber,1,t.payload.value),{...e,queryHistory:e.queryHistory};case"TOGGLE_AUTOCOMPLETE":return Ye("AUTOCOMPLETE",!e.autocomplete),{...e,autocomplete:!e.autocomplete};case"SET_AUTOCOMPLETE_QUICK":return{...e,autocompleteQuick:t.payload};case"SET_AUTOCOMPLETE_CACHE":return e.autocompleteCache.put(t.payload.key,t.payload.value),{...e};case"SET_METRICSQL_FUNCTIONS":return{...e,metricsQLFunctions:t.payload};default:throw new Error}}const an=(0,t.createContext)({}),ln=()=>(0,t.useContext)(an).state,sn=()=>(0,t.useContext)(an).dispatch,cn=()=>mt("svg",{viewBox:"0 0 74 24",fill:"currentColor",children:mt("path",{d:"M6.12 10.48c.36.28.8.43 1.26.43h.05c.48 0 .96-.19 1.25-.44 1.5-1.28 5.88-5.29 5.88-5.29C15.73 4.1 12.46 3.01 7.43 3h-.06C2.33 3-.93 4.1.24 5.18c0 0 4.37 4 5.88 5.3Zm2.56 2.16c-.36.28-.8.44-1.26.45h-.04c-.46 0-.9-.17-1.26-.45-1.04-.88-4.74-4.22-6.12-5.5v1.94c0 .21.08.5.22.63l.07.06c1.05.96 4.55 4.16 5.83 5.25.36.28.8.43 1.26.44h.04c.49-.02.96-.2 1.26-.44 1.3-1.11 4.94-4.45 5.88-5.31.15-.14.23-.42.23-.63V7.15a454.94 454.94 0 0 1-6.11 5.5Zm-1.26 4.99c.46 0 .9-.16 1.26-.44a454.4 454.4 0 0 0 6.1-5.5v1.94c0 .2-.07.48-.22.62-.94.87-4.57 4.2-5.88 5.3-.3.26-.77.44-1.26.45h-.04c-.46 0-.9-.16-1.26-.44-1.2-1.02-4.38-3.92-5.62-5.06l-.28-.25c-.14-.14-.22-.42-.22-.62v-1.94c1.38 1.26 5.08 4.6 6.12 5.5.36.28.8.43 1.26.44h.04ZM35 5l-5.84 14.46h-2.43L20.89 5h2.16a.9.9 0 0 1 .9.61l3.41 8.82a18.8 18.8 0 0 1 .62 2.02 19.44 19.44 0 0 1 .57-2.02l3.39-8.82c.05-.15.16-.3.31-.42a.9.9 0 0 1 .58-.19H35Zm17.18 0v14.46H49.8v-9.34c0-.37.02-.78.06-1.21l-4.37 8.21c-.21.4-.53.59-.95.59h-.38c-.43 0-.75-.2-.95-.59L38.8 8.88a22.96 22.96 0 0 1 .07 1.24v9.34H36.5V5h2.03l.3.01c.1 0 .17.02.24.05.07.03.13.07.19.13a1 1 0 0 1 .17.24l4.33 8.03a16.97 16.97 0 0 1 .6 1.36 14.34 14.34 0 0 1 .6-1.38l4.28-8.01c.05-.1.1-.18.17-.24.06-.06.12-.1.19-.13a.9.9 0 0 1 .24-.05l.3-.01h2.04Zm8.88 13.73a4.5 4.5 0 0 0 1.82-.35 3.96 3.96 0 0 0 2.22-2.47c.2-.57.3-1.19.3-1.85V5.31h1.02v8.75c0 .78-.12 1.51-.37 2.19a4.88 4.88 0 0 1-2.76 2.95c-.66.29-1.4.43-2.23.43-.82 0-1.57-.14-2.24-.43a5.01 5.01 0 0 1-2.75-2.95 6.37 6.37 0 0 1-.37-2.19V5.31h1.03v8.74c0 .66.1 1.28.3 1.85a3.98 3.98 0 0 0 2.21 2.47c.53.24 1.14.36 1.82.36Zm10.38.73h-1.03V5.31h1.03v14.15Z"})}),un=()=>mt("svg",{viewBox:"0 0 85 38",fill:"currentColor",children:[mt("path",{d:"M11.12 10.48c.36.28.8.43 1.26.43h.05c.48 0 .96-.19 1.25-.44 1.5-1.28 5.88-5.29 5.88-5.29 1.17-1.09-2.1-2.17-7.13-2.18h-.06c-5.04 0-8.3 1.1-7.13 2.18 0 0 4.37 4 5.88 5.3Zm2.56 2.16c-.36.28-.8.44-1.26.45h-.04c-.46 0-.9-.17-1.26-.45-1.04-.88-4.74-4.22-6.12-5.5v1.94c0 .21.08.5.22.63l.07.06c1.05.96 4.55 4.16 5.83 5.25.36.28.8.43 1.26.44h.04c.49-.02.96-.2 1.26-.44 1.3-1.11 4.94-4.45 5.88-5.31.15-.14.23-.42.23-.63V7.15a455.13 455.13 0 0 1-6.11 5.5Zm-1.26 4.99c.46 0 .9-.16 1.26-.44 2.05-1.82 4.09-3.65 6.1-5.5v1.94c0 .2-.07.48-.22.62-.94.87-4.57 4.2-5.88 5.3-.3.26-.77.44-1.26.45h-.04c-.46 0-.9-.16-1.26-.44-1.2-1.02-4.38-3.92-5.62-5.06l-.28-.25c-.14-.14-.22-.42-.22-.62v-1.94c1.38 1.26 5.08 4.6 6.12 5.5.36.28.8.43 1.26.44h.04ZM40 5l-5.84 14.46h-2.43L25.89 5h2.16a.9.9 0 0 1 .9.61l3.41 8.82a18.8 18.8 0 0 1 .62 2.02 19.44 19.44 0 0 1 .57-2.02l3.39-8.82c.05-.15.16-.3.31-.42a.9.9 0 0 1 .58-.19H40Zm17.18 0v14.46H54.8v-9.34c0-.37.02-.78.06-1.21l-4.37 8.21c-.21.4-.53.59-.95.59h-.38c-.43 0-.75-.2-.95-.59L43.8 8.88a22.96 22.96 0 0 1 .07 1.24v9.34H41.5V5h2.03l.3.01c.1 0 .17.02.24.05.07.03.13.07.19.13a1 1 0 0 1 .17.24l4.33 8.03a16.97 16.97 0 0 1 .6 1.36 14.34 14.34 0 0 1 .6-1.38l4.28-8.01c.05-.1.1-.18.17-.24.06-.06.12-.1.19-.13a.9.9 0 0 1 .24-.05l.3-.01h2.04Zm8.88 13.73a4.5 4.5 0 0 0 1.82-.35 3.96 3.96 0 0 0 2.22-2.47c.2-.57.3-1.19.3-1.85V5.31h1.02v8.75c0 .78-.12 1.51-.37 2.19a4.88 4.88 0 0 1-2.76 2.95c-.66.29-1.4.43-2.23.43-.82 0-1.57-.14-2.24-.43a5.01 5.01 0 0 1-2.75-2.95 6.37 6.37 0 0 1-.37-2.19V5.31h1.03v8.74c0 .66.1 1.28.3 1.85a3.98 3.98 0 0 0 2.21 2.47c.53.24 1.14.36 1.82.36Zm10.38.73h-1.03V5.31h1.03v14.15ZM1.73 36v-5.17l-.67-.07a.6.6 0 0 1-.21-.1.23.23 0 0 1-.08-.18v-.44h.96v-.59c0-.34.05-.65.14-.92a1.79 1.79 0 0 1 1.08-1.11 2.45 2.45 0 0 1 1.62-.02l-.03.53c0 .1-.06.15-.16.16H4c-.18 0-.35.03-.5.08a.95.95 0 0 0-.39.23c-.1.11-.19.25-.25.43-.05.18-.08.4-.08.65v.56h1.75v.78H2.8V36H1.73Zm6.17-6.17c.45 0 .85.07 1.2.22a2.57 2.57 0 0 1 1.5 1.62c.13.38.2.81.2 1.29s-.07.91-.2 1.3a2.57 2.57 0 0 1-1.49 1.61c-.36.14-.76.21-1.2.21-.45 0-.86-.07-1.22-.21a2.57 2.57 0 0 1-1.5-1.62c-.12-.38-.19-.81-.19-1.3 0-.47.07-.9.2-1.28a2.57 2.57 0 0 1 1.5-1.62c.35-.15.76-.22 1.2-.22Zm0 5.42c.6 0 1.05-.2 1.35-.6.3-.4.44-.97.44-1.69s-.15-1.28-.44-1.69c-.3-.4-.75-.6-1.35-.6-.3 0-.57.05-.8.15-.22.1-.4.26-.56.45-.15.2-.26.44-.33.73-.08.28-.11.6-.11.96 0 .72.15 1.29.44 1.69.3.4.76.6 1.36.6Zm5.26-4.11c.2-.42.43-.74.71-.97.28-.24.62-.36 1.03-.36.13 0 .25.02.36.05.12.02.23.07.32.13l-.08.8c-.02.1-.08.15-.18.15l-.24-.04a1.7 1.7 0 0 0-.88.05c-.15.05-.29.14-.4.25-.12.1-.23.24-.32.4-.1.17-.18.35-.26.56V36h-1.07v-6.08h.61c.12 0 .2.02.24.07.05.04.08.12.1.23l.06.92Zm13.73-3.82L23.39 36h-1.46l-3.5-8.68h1.29a.54.54 0 0 1 .54.37l2.04 5.3a11.31 11.31 0 0 1 .37 1.21 11.65 11.65 0 0 1 .35-1.22l2.03-5.29c.03-.1.1-.18.19-.25.1-.08.21-.12.35-.12h1.3Zm2.2 2.52V36H27.6v-6.16h1.49Zm.2-1.79c0 .13-.02.25-.08.36a1 1 0 0 1-.51.5.96.96 0 0 1-.73 0 1.02 1.02 0 0 1-.5-.5.96.96 0 0 1 0-.73.93.93 0 0 1 .86-.58.9.9 0 0 1 .37.08c.12.05.22.11.3.2a.94.94 0 0 1 .3.67Zm5.72 3.1a.68.68 0 0 1-.13.13c-.04.03-.1.05-.18.05a.42.42 0 0 1-.22-.07 3.95 3.95 0 0 0-.62-.31c-.14-.05-.3-.07-.51-.07-.26 0-.5.04-.69.14-.2.1-.36.23-.49.4-.13.18-.22.4-.29.64-.06.25-.1.53-.1.85 0 .33.04.62.1.88.08.25.18.47.32.64.13.18.29.3.48.4.18.09.4.13.63.13a1.6 1.6 0 0 0 .94-.27l.26-.2a.4.4 0 0 1 .25-.09.3.3 0 0 1 .27.14l.43.54a2.76 2.76 0 0 1-1.77.96c-.22.03-.43.05-.65.05a2.57 2.57 0 0 1-1.96-.83c-.25-.28-.45-.6-.6-1-.14-.4-.21-.85-.21-1.35 0-.45.06-.87.2-1.25a2.61 2.61 0 0 1 1.51-1.67c.37-.16.8-.24 1.28-.24.46 0 .86.07 1.2.22.35.15.66.36.94.64l-.4.54Zm3.43 4.95c-.54 0-.95-.15-1.24-.45-.28-.3-.42-.73-.42-1.26v-3.44h-.63a.29.29 0 0 1-.2-.07c-.06-.06-.09-.13-.09-.24v-.59l.99-.16.31-1.68a.33.33 0 0 1 .12-.18.34.34 0 0 1 .21-.07h.77v1.94h1.64v1.05h-1.64v3.34c0 .2.05.34.14.45.1.1.22.16.39.16a.73.73 0 0 0 .39-.1l.12-.07a.2.2 0 0 1 .11-.03c.05 0 .08.01.11.03l.09.1.44.72c-.21.18-.46.32-.74.4-.28.1-.57.15-.87.15Zm5.09-6.35c.46 0 .87.07 1.24.22a2.7 2.7 0 0 1 1.58 1.63c.14.39.22.83.22 1.31 0 .49-.08.93-.22 1.32-.14.4-.35.73-.62 1-.26.28-.58.49-.96.64-.37.15-.78.22-1.24.22a3.4 3.4 0 0 1-1.25-.22 2.71 2.71 0 0 1-1.59-1.64 3.8 3.8 0 0 1-.21-1.32c0-.48.07-.92.21-1.31a2.75 2.75 0 0 1 1.58-1.63c.38-.15.8-.22 1.26-.22Zm0 5.2c.51 0 .89-.17 1.13-.52.25-.34.38-.84.38-1.5a2.6 2.6 0 0 0-.38-1.53c-.24-.34-.62-.52-1.13-.52-.52 0-.9.18-1.16.53-.25.35-.37.85-.37 1.51s.12 1.17.37 1.51c.25.35.64.52 1.16.52Zm5.56-4.04c.2-.37.42-.65.69-.86.26-.21.57-.32.94-.32.28 0 .5.06.68.19l-.1 1.1a.3.3 0 0 1-.09.16.24.24 0 0 1-.15.04 1.8 1.8 0 0 1-.27-.03 2.01 2.01 0 0 0-.34-.03c-.16 0-.3.03-.44.08a1.1 1.1 0 0 0-.34.2c-.1.1-.2.2-.27.33-.08.13-.15.27-.22.44V36H47.7v-6.16h.87c.15 0 .26.03.31.09.06.05.1.15.13.29l.09.7Zm4.62-1.07V36h-1.49v-6.16h1.49Zm.2-1.79c0 .13-.02.25-.07.36a1 1 0 0 1-.51.5.96.96 0 0 1-.74 0 1.02 1.02 0 0 1-.5-.5.96.96 0 0 1 0-.73.93.93 0 0 1 .86-.58.9.9 0 0 1 .38.08c.11.05.21.11.3.2a.94.94 0 0 1 .28.67Zm4.56 5.32a7.8 7.8 0 0 0-1.08.12c-.29.05-.52.12-.7.2a.92.92 0 0 0-.38.3.64.64 0 0 0-.11.36c0 .26.07.45.23.56.15.11.35.17.6.17.3 0 .57-.06.79-.17.22-.1.44-.28.65-.5v-1.04Zm-3.4-2.67c.71-.65 1.57-.97 2.56-.97.36 0 .68.06.97.18a1.99 1.99 0 0 1 1.16 1.24c.1.3.16.61.16.96V36h-.67a.7.7 0 0 1-.33-.06c-.07-.04-.13-.13-.18-.26l-.13-.44c-.16.14-.3.26-.46.37a2.8 2.8 0 0 1-.97.43 2.77 2.77 0 0 1-1.32-.05 1.62 1.62 0 0 1-.57-.31 1.41 1.41 0 0 1-.38-.53 1.85 1.85 0 0 1-.05-1.18c.05-.16.14-.3.25-.45.12-.14.28-.27.46-.4a3 3 0 0 1 .7-.32 9.19 9.19 0 0 1 2.2-.33v-.36c0-.41-.09-.71-.26-.91-.18-.2-.43-.3-.76-.3a1.84 1.84 0 0 0-1.02.28l-.33.18c-.1.06-.2.09-.32.09-.1 0-.2-.03-.27-.08a.72.72 0 0 1-.17-.2l-.26-.47Zm11.49 4.32V36h-4.88v-8.6h1.16v7.62h3.72Zm3.16-5.2c.44 0 .84.08 1.2.23a2.57 2.57 0 0 1 1.49 1.62c.13.38.2.81.2 1.29s-.07.91-.2 1.3a2.57 2.57 0 0 1-1.49 1.61c-.36.14-.76.21-1.2.21-.45 0-.85-.07-1.21-.21a2.57 2.57 0 0 1-1.5-1.62c-.13-.38-.2-.81-.2-1.3 0-.47.07-.9.2-1.28.14-.39.33-.72.59-1 .25-.26.55-.47.9-.62.37-.15.77-.22 1.22-.22Zm0 5.43c.6 0 1.05-.2 1.34-.6.3-.4.45-.97.45-1.69s-.15-1.28-.45-1.69c-.3-.4-.74-.6-1.34-.6-.3 0-.57.05-.8.15-.22.1-.4.26-.56.45-.15.2-.26.44-.34.73-.07.28-.1.6-.1.96 0 .72.14 1.29.44 1.69.3.4.75.6 1.36.6Zm6.33-2.22c.22 0 .4-.03.57-.09.16-.06.3-.14.41-.25.12-.11.2-.24.26-.39.05-.15.08-.31.08-.5 0-.37-.11-.66-.34-.88-.23-.22-.55-.33-.98-.33-.43 0-.76.1-.99.33-.22.22-.34.51-.34.89 0 .18.03.34.09.5a1.1 1.1 0 0 0 .67.63c.16.06.35.09.57.09Zm1.93 3.3a.51.51 0 0 0-.13-.36.84.84 0 0 0-.34-.22 8.57 8.57 0 0 0-1.73-.2 7.5 7.5 0 0 1-.62-.05c-.23.1-.41.23-.56.4a.8.8 0 0 0-.1.92c.07.12.18.22.32.3.14.1.32.16.54.21a3.5 3.5 0 0 0 1.55 0c.23-.05.42-.12.57-.22.16-.1.29-.21.37-.34a.8.8 0 0 0 .13-.44Zm1.08-6.17v.4c0 .13-.08.21-.25.25l-.69.09c.14.26.2.56.2.88a1.86 1.86 0 0 1-1.36 1.82 3.07 3.07 0 0 1-1.72.04c-.12.08-.22.16-.29.25a.44.44 0 0 0-.1.27c0 .15.06.26.17.33.12.08.28.13.47.16a5 5 0 0 0 .66.06 16.56 16.56 0 0 1 1.5.13c.26.05.48.12.67.22.19.1.34.24.46.41.12.18.18.4.18.69 0 .26-.07.5-.2.75s-.31.46-.56.65c-.24.2-.54.34-.9.46a4.57 4.57 0 0 1-2.36.04c-.33-.09-.6-.2-.82-.36a1.56 1.56 0 0 1-.5-.51c-.1-.2-.16-.4-.16-.6 0-.3.1-.56.28-.77.19-.2.45-.37.77-.5a1.15 1.15 0 0 1-.43-.32.88.88 0 0 1-.15-.54c0-.09.01-.18.04-.27.04-.1.08-.2.15-.28a1.55 1.55 0 0 1 .58-.5c-.3-.16-.53-.39-.7-.66-.17-.28-.25-.6-.25-.97 0-.3.05-.57.16-.8.12-.25.28-.46.48-.63.2-.17.45-.3.73-.4a3 3 0 0 1 2.3.21h1.64Zm4.65.76a.24.24 0 0 1-.23.14.42.42 0 0 1-.2-.07 3.59 3.59 0 0 0-.67-.3 1.8 1.8 0 0 0-1.03 0c-.14.05-.27.11-.37.2a.87.87 0 0 0-.23.27.75.75 0 0 0-.08.35c0 .15.04.28.13.39.1.1.21.19.36.27.15.07.32.14.5.2a13.63 13.63 0 0 1 1.16.4c.2.08.36.18.5.3a1.33 1.33 0 0 1 .5 1.07 2 2 0 0 1-.15.78c-.1.24-.25.44-.45.62-.2.17-.43.3-.72.4a3.1 3.1 0 0 1-2.14-.05 2.97 2.97 0 0 1-.87-.53l.25-.41c.04-.05.07-.1.12-.12a.3.3 0 0 1 .17-.04.4.4 0 0 1 .22.08l.3.19a1.91 1.91 0 0 0 1.03.27c.2 0 .38-.03.54-.08.16-.06.29-.13.4-.22a.96.96 0 0 0 .3-.7c0-.17-.05-.31-.14-.42-.09-.11-.2-.2-.36-.28a2.6 2.6 0 0 0-.5-.2l-.59-.19c-.2-.06-.39-.14-.58-.22a2.14 2.14 0 0 1-.5-.3 1.45 1.45 0 0 1-.36-.46c-.1-.19-.14-.41-.14-.67a1.6 1.6 0 0 1 .57-1.23c.18-.16.4-.3.68-.39.26-.1.57-.14.91-.14a2.84 2.84 0 0 1 1.9.7l-.23.4Z"}),mt("defs",{children:mt("path",{d:"M0 0h85v38H0z"})})]}),dn=()=>mt("svg",{viewBox:"0 0 85 38",fill:"currentColor",children:mt("path",{d:"M11.118 10.476c.36.28.801.433 1.257.436h.052c.48-.007.961-.192 1.25-.444 1.509-1.279 5.88-5.287 5.88-5.287 1.168-1.087-2.093-2.174-7.13-2.181h-.06c-5.036.007-8.298 1.094-7.13 2.181 0 0 4.372 4.008 5.88 5.295zm2.559 2.166c-.359.283-.801.439-1.258.444h-.044a2.071 2.071 0 0 1-1.257-.444C10.082 11.755 6.384 8.42 5 7.148v1.93c0 .215.081.496.222.629l.07.064c1.045.955 4.546 4.154 5.825 5.245.358.283.8.438 1.257.444h.044c.489-.015.962-.2 1.258-.444 1.309-1.11 4.948-4.444 5.887-5.31.148-.132.222-.413.222-.628v-1.93a455.127 455.127 0 0 1-6.11 5.494zm-1.258 4.984a2.071 2.071 0 0 0 1.258-.436c2.053-1.815 4.09-3.65 6.11-5.502v1.938c0 .207-.075.488-.223.621-.94.873-4.578 4.2-5.887 5.31-.296.25-.77.436-1.258.443h-.044a2.071 2.071 0 0 1-1.257-.436c-1.204-1.027-4.376-3.928-5.616-5.062l-.28-.255c-.14-.133-.221-.414-.221-.621v-1.938c1.383 1.265 5.081 4.607 6.117 5.495.358.282.8.438 1.257.443h.044zM40 5l-5.84 14.46h-2.43L25.89 5h2.16c.233 0 .423.057.57.17.146.113.256.26.33.44l3.41 8.82c.113.287.22.603.32.95.106.34.206.697.3 1.07.08-.373.166-.73.26-1.07a8.84 8.84 0 0 1 .31-.95l3.39-8.82a.959.959 0 0 1 .31-.42.906.906 0 0 1 .58-.19H40zm17.176 0v14.46h-2.37v-9.34c0-.373.02-.777.06-1.21l-4.37 8.21c-.206.393-.523.59-.95.59h-.38c-.426 0-.743-.197-.95-.59l-4.42-8.24c.02.22.037.437.05.65.014.213.02.41.02.59v9.34h-2.37V5h2.03c.12 0 .224.003.31.01a.778.778 0 0 1 .23.05c.074.027.137.07.19.13.06.06.117.14.17.24l4.33 8.03c.114.213.217.433.31.66.1.227.197.46.29.7.094-.247.19-.483.29-.71.1-.233.207-.457.32-.67l4.27-8.01c.054-.1.11-.18.17-.24a.57.57 0 0 1 .19-.13.903.903 0 0 1 .24-.05c.087-.007.19-.01.31-.01h2.03zm8.887 13.73c.68 0 1.286-.117 1.82-.35.54-.24.996-.57 1.37-.99a4.28 4.28 0 0 0 .85-1.48c.2-.573.3-1.19.3-1.85V5.31h1.02v8.75c0 .78-.124 1.51-.37 2.19a5.248 5.248 0 0 1-1.07 1.77c-.46.5-1.024.893-1.69 1.18-.66.287-1.404.43-2.23.43-.827 0-1.574-.143-2.24-.43a5.012 5.012 0 0 1-1.69-1.18 5.33 5.33 0 0 1-1.06-1.77 6.373 6.373 0 0 1-.37-2.19V5.31h1.03v8.74c0 .66.096 1.277.29 1.85.2.567.483 1.06.85 1.48.373.42.826.75 1.36.99.54.24 1.15.36 1.83.36zm10.38.73h-1.03V5.31h1.03v14.15zM4.242 35v-5.166l-.672-.078a.595.595 0 0 1-.21-.09.23.23 0 0 1-.078-.186v-.438h.96v-.588c0-.348.048-.656.144-.924.1-.272.24-.5.42-.684a1.79 1.79 0 0 1 .66-.426c.256-.096.544-.144.864-.144.272 0 .522.04.75.12l-.024.534c-.008.096-.062.148-.162.156a4.947 4.947 0 0 1-.39.012c-.184 0-.352.024-.504.072a.949.949 0 0 0-.384.234c-.108.108-.192.25-.252.426a2.184 2.184 0 0 0-.084.654v.558h1.752v.774H5.316V35H4.242zM10.416 28.826a3.1 3.1 0 0 1 1.2.222c.356.148.66.358.912.63s.444.602.576.99c.136.384.204.814.204 1.29 0 .48-.068.912-.204 1.296a2.735 2.735 0 0 1-.576.984 2.572 2.572 0 0 1-.912.63 3.175 3.175 0 0 1-1.2.216c-.448 0-.852-.072-1.212-.216a2.572 2.572 0 0 1-.912-.63 2.805 2.805 0 0 1-.582-.984 3.972 3.972 0 0 1-.198-1.296c0-.476.066-.906.198-1.29.136-.388.33-.718.582-.99.252-.272.556-.482.912-.63.36-.148.764-.222 1.212-.222zm0 5.424c.6 0 1.048-.2 1.344-.6.296-.404.444-.966.444-1.686 0-.724-.148-1.288-.444-1.692-.296-.404-.744-.606-1.344-.606-.304 0-.57.052-.798.156a1.507 1.507 0 0 0-.564.45c-.148.196-.26.438-.336.726a3.941 3.941 0 0 0-.108.966c0 .72.148 1.282.444 1.686.3.4.754.6 1.362.6zM15.677 30.14c.192-.416.428-.74.708-.972.28-.236.622-.354 1.026-.354.128 0 .25.014.366.042.12.028.226.072.318.132l-.078.798c-.024.1-.084.15-.18.15-.056 0-.138-.012-.246-.036a1.694 1.694 0 0 0-.366-.036c-.192 0-.364.028-.516.084-.148.056-.282.14-.402.252a1.782 1.782 0 0 0-.318.408c-.092.16-.176.344-.252.552V35h-1.074v-6.078h.612c.116 0 .196.022.24.066.044.044.074.12.09.228l.072.924zM26.761 28.922 24.283 35h-.96l-2.478-6.078h.87a.33.33 0 0 1 .33.222l1.542 3.912c.048.148.09.292.126.432.036.14.07.28.102.42.032-.14.066-.28.102-.42.036-.14.08-.284.132-.432l1.56-3.912a.33.33 0 0 1 .12-.156.311.311 0 0 1 .198-.066h.834zM27.74 35v-6.078h.643c.152 0 .246.074.282.222l.078.624c.224-.276.476-.502.756-.678.28-.176.604-.264.972-.264.408 0 .738.114.99.342.256.228.44.536.552.924.088-.22.2-.41.336-.57a1.987 1.987 0 0 1 1.014-.624c.196-.048.394-.072.594-.072.32 0 .604.052.852.156.252.1.464.248.636.444.176.196.31.438.402.726.092.284.138.61.138.978V35H34.91v-3.87c0-.476-.104-.836-.312-1.08-.208-.248-.508-.372-.9-.372-.176 0-.344.032-.504.096-.156.06-.294.15-.414.27-.12.12-.216.272-.288.456-.068.18-.102.39-.102.63V35h-1.074v-3.87c0-.488-.098-.852-.294-1.092-.196-.24-.482-.36-.858-.36-.264 0-.508.072-.732.216a2.38 2.38 0 0 0-.618.576V35H27.74zM40.746 32.372c-.428.02-.788.058-1.08.114-.292.052-.526.12-.702.204a.923.923 0 0 0-.378.294.639.639 0 0 0-.114.366c0 .26.076.446.228.558.156.112.358.168.606.168.304 0 .566-.054.786-.162.224-.112.442-.28.654-.504v-1.038zm-3.396-2.67c.708-.648 1.56-.972 2.556-.972.36 0 .682.06.966.18.284.116.524.28.72.492.196.208.344.458.444.75.104.292.156.612.156.96V35h-.672a.708.708 0 0 1-.324-.06c-.076-.044-.136-.13-.18-.258l-.132-.444c-.156.14-.308.264-.456.372a2.804 2.804 0 0 1-.462.264c-.16.072-.332.126-.516.162-.18.04-.38.06-.6.06-.26 0-.5-.034-.72-.102a1.618 1.618 0 0 1-.57-.318 1.414 1.414 0 0 1-.372-.522 1.852 1.852 0 0 1-.132-.726 1.419 1.419 0 0 1 .33-.906c.12-.14.274-.272.462-.396s.418-.232.69-.324c.276-.092.596-.166.96-.222.364-.06.78-.096 1.248-.108v-.36c0-.412-.088-.716-.264-.912-.176-.2-.43-.3-.762-.3-.24 0-.44.028-.6.084-.156.056-.294.12-.414.192l-.33.186a.631.631 0 0 1-.324.084.439.439 0 0 1-.264-.078.716.716 0 0 1-.174-.192l-.264-.474zM44.974 29.6c.124-.124.254-.238.39-.342a2.395 2.395 0 0 1 .936-.444c.176-.044.368-.066.576-.066.336 0 .634.058.894.174.26.112.476.272.648.48.176.204.308.45.396.738.092.284.138.598.138.942V35H47.47v-3.918c0-.376-.086-.666-.258-.87-.172-.208-.434-.312-.786-.312-.256 0-.496.058-.72.174a2.58 2.58 0 0 0-.636.474V35h-1.482v-6.156h.906c.192 0 .318.09.378.27l.102.486zM53.085 28.748c.456 0 .87.074 1.242.222a2.692 2.692 0 0 1 1.578 1.626c.144.392.216.83.216 1.314 0 .488-.072.928-.216 1.32-.144.392-.35.726-.618 1.002a2.653 2.653 0 0 1-.96.636 3.333 3.333 0 0 1-1.242.222c-.46 0-.878-.074-1.254-.222a2.712 2.712 0 0 1-.966-.636 2.922 2.922 0 0 1-.618-1.002 3.807 3.807 0 0 1-.216-1.32c0-.484.072-.922.216-1.314.148-.392.354-.724.618-.996.268-.272.59-.482.966-.63a3.397 3.397 0 0 1 1.254-.222zm0 5.202c.512 0 .89-.172 1.134-.516.248-.344.372-.848.372-1.512s-.124-1.17-.372-1.518c-.244-.348-.622-.522-1.134-.522-.52 0-.906.176-1.158.528-.248.348-.372.852-.372 1.512s.124 1.164.372 1.512c.252.344.638.516 1.158.516zM57.252 35v-6.156h.906c.192 0 .318.09.378.27l.096.456c.108-.12.22-.23.336-.33a2.017 2.017 0 0 1 1.32-.492c.388 0 .706.106.954.318.252.208.44.486.564.834a1.93 1.93 0 0 1 .834-.882c.172-.092.354-.16.546-.204.196-.044.392-.066.588-.066.34 0 .642.052.906.156.264.104.486.256.666.456.18.2.316.444.408.732.096.288.144.618.144.99V35h-1.482v-3.918c0-.392-.086-.686-.258-.882-.172-.2-.424-.3-.756-.3-.152 0-.294.026-.426.078a1.026 1.026 0 0 0-.342.228 1.019 1.019 0 0 0-.228.366 1.435 1.435 0 0 0-.084.51V35h-1.488v-3.918c0-.412-.084-.712-.252-.9-.164-.188-.406-.282-.726-.282-.216 0-.418.054-.606.162a1.979 1.979 0 0 0-.516.432V35h-1.482zM70.558 32.372c-.428.02-.788.058-1.08.114-.292.052-.526.12-.702.204a.923.923 0 0 0-.378.294.639.639 0 0 0-.114.366c0 .26.076.446.228.558.156.112.358.168.606.168.304 0 .566-.054.786-.162.224-.112.442-.28.654-.504v-1.038zm-3.396-2.67c.708-.648 1.56-.972 2.556-.972.36 0 .682.06.966.18.284.116.524.28.72.492.196.208.344.458.444.75.104.292.156.612.156.96V35h-.672a.708.708 0 0 1-.324-.06c-.076-.044-.136-.13-.18-.258l-.132-.444c-.156.14-.308.264-.456.372a2.804 2.804 0 0 1-.462.264c-.16.072-.332.126-.516.162-.18.04-.38.06-.6.06-.26 0-.5-.034-.72-.102a1.618 1.618 0 0 1-.57-.318 1.414 1.414 0 0 1-.372-.522 1.852 1.852 0 0 1-.132-.726 1.419 1.419 0 0 1 .33-.906c.12-.14.274-.272.462-.396s.418-.232.69-.324c.276-.092.596-.166.96-.222.364-.06.78-.096 1.248-.108v-.36c0-.412-.088-.716-.264-.912-.176-.2-.43-.3-.762-.3-.24 0-.44.028-.6.084-.156.056-.294.12-.414.192l-.33.186a.631.631 0 0 1-.324.084.439.439 0 0 1-.264-.078.716.716 0 0 1-.174-.192l-.264-.474zM74.9 26.084V35h-1.482v-8.916H74.9zM81.969 28.844l-3.354 7.848a.538.538 0 0 1-.174.234c-.068.056-.174.084-.318.084h-1.104l1.152-2.472-2.49-5.694h1.302c.116 0 .206.028.27.084.068.056.118.12.15.192l1.308 3.192c.044.108.08.216.108.324.032.108.062.218.09.33a32.3 32.3 0 0 1 .108-.33c.036-.112.076-.222.12-.33l1.236-3.186a.437.437 0 0 1 .408-.276h1.188z"})}),hn=()=>mt("svg",{viewBox:"0 0 15 17",fill:"currentColor",children:mt("path",{d:"M6.11767 7.47586C6.47736 7.75563 6.91931 7.90898 7.37503 7.91213H7.42681C7.90756 7.90474 8.38832 7.71987 8.67677 7.46846C10.1856 6.18921 14.5568 2.18138 14.5568 2.18138C15.7254 1.09438 12.4637 0.00739 7.42681 0H7.36764C2.3308 0.00739 -0.930935 1.09438 0.237669 2.18138C0.237669 2.18138 4.60884 6.18921 6.11767 7.47586ZM8.67677 9.64243C8.31803 9.92483 7.87599 10.0808 7.41941 10.0861H7.37503C6.91845 10.0808 6.47641 9.92483 6.11767 9.64243C5.0822 8.75513 1.38409 5.42018 0.000989555 4.14832V6.07829C0.000989555 6.29273 0.0823481 6.57372 0.222877 6.70682L0.293316 6.7712L0.293344 6.77122C1.33784 7.72579 4.83903 10.9255 6.11767 12.0161C6.47641 12.2985 6.91845 12.4545 7.37503 12.4597H7.41941C7.90756 12.4449 8.38092 12.2601 8.67677 12.0161C9.9859 10.9069 13.6249 7.57198 14.5642 6.70682C14.7121 6.57372 14.7861 6.29273 14.7861 6.07829V4.14832C12.7662 5.99804 10.7297 7.82949 8.67677 9.64243ZM7.41941 14.6263C7.87513 14.6232 8.31708 14.4698 8.67677 14.19C10.7298 12.3746 12.7663 10.5407 14.7861 8.68853V10.6259C14.7861 10.8329 14.7121 11.1139 14.5642 11.247C13.6249 12.1196 9.9859 15.4471 8.67677 16.5563C8.38092 16.8077 7.90756 16.9926 7.41941 17H7.37503C6.91931 16.9968 6.47736 16.8435 6.11767 16.5637C4.91427 15.5373 1.74219 12.6364 0.502294 11.5025C0.393358 11.4029 0.299337 11.3169 0.222877 11.247C0.0823481 11.1139 0.000989555 10.8329 0.000989555 10.6259V8.68853C1.38409 9.95303 5.0822 13.2953 6.11767 14.1827C6.47641 14.4651 6.91845 14.6211 7.37503 14.6263H7.41941Z"})}),pn=()=>mt("svg",{viewBox:"0 0 24 24",fill:"currentColor",children:mt("path",{d:"M19.14 12.94c.04-.3.06-.61.06-.94 0-.32-.02-.64-.07-.94l2.03-1.58c.18-.14.23-.41.12-.61l-1.92-3.32c-.12-.22-.37-.29-.59-.22l-2.39.96c-.5-.38-1.03-.7-1.62-.94l-.36-2.54c-.04-.24-.24-.41-.48-.41h-3.84c-.24 0-.43.17-.47.41l-.36 2.54c-.59.24-1.13.57-1.62.94l-2.39-.96c-.22-.08-.47 0-.59.22L2.74 8.87c-.12.21-.08.47.12.61l2.03 1.58c-.05.3-.09.63-.09.94s.02.64.07.94l-2.03 1.58c-.18.14-.23.41-.12.61l1.92 3.32c.12.22.37.29.59.22l2.39-.96c.5.38 1.03.7 1.62.94l.36 2.54c.05.24.24.41.48.41h3.84c.24 0 .44-.17.47-.41l.36-2.54c.59-.24 1.13-.56 1.62-.94l2.39.96c.22.08.47 0 .59-.22l1.92-3.32c.12-.22.07-.47-.12-.61l-2.01-1.58zM12 15.6c-1.98 0-3.6-1.62-3.6-3.6s1.62-3.6 3.6-3.6 3.6 1.62 3.6 3.6-1.62 3.6-3.6 3.6z"})}),fn=()=>mt("svg",{viewBox:"0 0 24 24",fill:"currentColor",children:mt("path",{d:"M19 6.41 17.59 5 12 10.59 6.41 5 5 6.41 10.59 12 5 17.59 6.41 19 12 13.41 17.59 19 19 17.59 13.41 12z"})}),mn=()=>mt("svg",{viewBox:"0 0 24 24",fill:"currentColor",children:mt("path",{d:"M12 5V2L8 6l4 4V7c3.31 0 6 2.69 6 6 0 2.97-2.17 5.43-5 5.91v2.02c3.95-.49 7-3.85 7-7.93 0-4.42-3.58-8-8-8zm-6 8c0-1.65.67-3.15 1.76-4.24L6.34 7.34C4.9 8.79 4 10.79 4 13c0 4.08 3.05 7.44 7 7.93v-2.02c-2.83-.48-5-2.94-5-5.91z"})}),_n=()=>mt("svg",{viewBox:"0 0 24 24",fill:"currentColor",children:mt("path",{d:"M12 2C6.48 2 2 6.48 2 12s4.48 10 10 10 10-4.48 10-10S17.52 2 12 2zm1 15h-2v-6h2v6zm0-8h-2V7h2v2z"})}),gn=()=>mt("svg",{viewBox:"0 0 24 24",fill:"currentColor",children:mt("path",{d:"M1 21h22L12 2 1 21zm12-3h-2v-2h2v2zm0-4h-2v-4h2v4z"})}),vn=()=>mt("svg",{viewBox:"0 0 24 24",fill:"currentColor",children:mt("path",{d:"M12 2C6.48 2 2 6.48 2 12s4.48 10 10 10 10-4.48 10-10S17.52 2 12 2zm1 15h-2v-2h2v2zm0-4h-2V7h2v6z"})}),yn=()=>mt("svg",{viewBox:"0 0 24 24",fill:"currentColor",children:mt("path",{d:"M12 2C6.48 2 2 6.48 2 12s4.48 10 10 10 10-4.48 10-10S17.52 2 12 2zm-2 15-5-5 1.41-1.41L10 14.17l7.59-7.59L19 8l-9 9z"})}),bn=()=>mt("svg",{viewBox:"0 0 24 24",fill:"currentColor",children:mt("path",{d:"M12 6v3l4-4-4-4v3c-4.42 0-8 3.58-8 8 0 1.57.46 3.03 1.24 4.26L6.7 14.8c-.45-.83-.7-1.79-.7-2.8 0-3.31 2.69-6 6-6zm6.76 1.74L17.3 9.2c.44.84.7 1.79.7 2.8 0 3.31-2.69 6-6 6v-3l-4 4 4 4v-3c4.42 0 8-3.58 8-8 0-1.57-.46-3.03-1.24-4.26z"})}),wn=()=>mt("svg",{viewBox:"0 0 24 24",fill:"currentColor",children:mt("path",{d:"M7.41 8.59 12 13.17l4.59-4.58L18 10l-6 6-6-6 1.41-1.41z"})}),kn=()=>mt("svg",{viewBox:"0 0 24 24",fill:"currentColor",children:mt("path",{d:"m7 10 5 5 5-5z"})}),xn=()=>mt("svg",{viewBox:"0 0 24 24",fill:"currentColor",children:[mt("path",{d:"M11.99 2C6.47 2 2 6.48 2 12s4.47 10 9.99 10C17.52 22 22 17.52 22 12S17.52 2 11.99 2zM12 20c-4.42 0-8-3.58-8-8s3.58-8 8-8 8 3.58 8 8-3.58 8-8 8z"}),mt("path",{d:"M12.5 7H11v6l5.25 3.15.75-1.23-4.5-2.67z"})]}),Sn=()=>mt("svg",{viewBox:"0 0 24 24",fill:"currentColor",children:mt("path",{d:"M20 3h-1V1h-2v2H7V1H5v2H4c-1.1 0-2 .9-2 2v16c0 1.1.9 2 2 2h16c1.1 0 2-.9 2-2V5c0-1.1-.9-2-2-2zm0 18H4V8h16v13z"})}),An=()=>mt("svg",{viewBox:"0 0 24 24",fill:"currentColor",children:mt("path",{d:"m22 5.72-4.6-3.86-1.29 1.53 4.6 3.86L22 5.72zM7.88 3.39 6.6 1.86 2 5.71l1.29 1.53 4.59-3.85zM12.5 8H11v6l4.75 2.85.75-1.23-4-2.37V8zM12 4c-4.97 0-9 4.03-9 9s4.02 9 9 9c4.97 0 9-4.03 9-9s-4.03-9-9-9zm0 16c-3.87 0-7-3.13-7-7s3.13-7 7-7 7 3.13 7 7-3.13 7-7 7z"})}),En=()=>mt("svg",{viewBox:"0 0 24 24",fill:"currentColor",children:mt("path",{d:"M20 5H4c-1.1 0-1.99.9-1.99 2L2 17c0 1.1.9 2 2 2h16c1.1 0 2-.9 2-2V7c0-1.1-.9-2-2-2zm-9 3h2v2h-2V8zm0 3h2v2h-2v-2zM8 8h2v2H8V8zm0 3h2v2H8v-2zm-1 2H5v-2h2v2zm0-3H5V8h2v2zm9 7H8v-2h8v2zm0-4h-2v-2h2v2zm0-3h-2V8h2v2zm3 3h-2v-2h2v2zm0-3h-2V8h2v2z"})}),Cn=()=>mt("svg",{viewBox:"0 0 24 24",fill:"currentColor",children:mt("path",{d:"M8 5v14l11-7z"})}),Mn=()=>mt("svg",{viewBox:"0 0 24 24",fill:"currentColor",children:mt("path",{d:"m3.5 18.49 6-6.01 4 4L22 6.92l-1.41-1.41-7.09 7.97-4-4L2 16.99z"})}),Nn=()=>mt("svg",{viewBox:"0 0 24 24",fill:"currentColor",children:mt("path",{d:"M10 10.02h5V21h-5zM17 21h3c1.1 0 2-.9 2-2v-9h-5v11zm3-18H5c-1.1 0-2 .9-2 2v3h19V5c0-1.1-.9-2-2-2zM3 19c0 1.1.9 2 2 2h3V10H3v9z"})}),Tn=()=>mt("svg",{viewBox:"0 0 24 24",fill:"currentColor",children:mt("path",{d:"M9.4 16.6 4.8 12l4.6-4.6L8 6l-6 6 6 6 1.4-1.4zm5.2 0 4.6-4.6-4.6-4.6L16 6l6 6-6 6-1.4-1.4z"})}),Pn=()=>mt("svg",{viewBox:"0 0 24 24",fill:"currentColor",children:mt("path",{d:"M8.9999 14.7854L18.8928 4.8925C19.0803 4.70497 19.3347 4.59961 19.5999 4.59961C19.8651 4.59961 20.1195 4.70497 20.307 4.8925L21.707 6.2925C22.0975 6.68303 22.0975 7.31619 21.707 7.70672L9.70701 19.7067C9.31648 20.0972 8.68332 20.0972 8.2928 19.7067L2.6928 14.1067C2.50526 13.9192 2.3999 13.6648 2.3999 13.3996C2.3999 13.1344 2.50526 12.88 2.6928 12.6925L4.0928 11.2925C4.48332 10.902 5.11648 10.902 5.50701 11.2925L8.9999 14.7854Z"})}),Dn=()=>mt("svg",{viewBox:"0 0 24 24",fill:"currentColor",children:mt("path",{d:"M12 4.5C7 4.5 2.73 7.61 1 12c1.73 4.39 6 7.5 11 7.5s9.27-3.11 11-7.5c-1.73-4.39-6-7.5-11-7.5zM12 17c-2.76 0-5-2.24-5-5s2.24-5 5-5 5 2.24 5 5-2.24 5-5 5zm0-8c-1.66 0-3 1.34-3 3s1.34 3 3 3 3-1.34 3-3-1.34-3-3-3z"})}),On=()=>mt("svg",{viewBox:"0 0 24 24",fill:"currentColor",children:mt("path",{d:"M16 1H4c-1.1 0-2 .9-2 2v14h2V3h12V1zm3 4H8c-1.1 0-2 .9-2 2v14c0 1.1.9 2 2 2h11c1.1 0 2-.9 2-2V7c0-1.1-.9-2-2-2zm0 16H8V7h11v14z"})}),Ln=()=>mt("svg",{viewBox:"0 0 24 24",fill:"currentColor",children:mt("path",{d:"M20 9H4v2h16V9zM4 15h16v-2H4v2z"})}),Rn=()=>mt("svg",{viewBox:"0 0 24 24",fill:"currentColor",children:[mt("path",{fillRule:"evenodd",clipRule:"evenodd",d:"M21 5C19.89 4.65 18.67 4.5 17.5 4.5C15.55 4.5 13.45 4.9 12 6C10.55 4.9 8.45 4.5 6.5 4.5C5.33 4.5 4.11 4.65 3 5C2.25 5.25 1.6 5.55 1 6V20.6C1 20.85 1.25 21.1 1.5 21.1C1.6 21.1 1.65 21.1 1.75 21.05C3.15 20.3 4.85 20 6.5 20C8.2 20 10.65 20.65 12 21.5C13.35 20.65 15.8 20 17.5 20C19.15 20 20.85 20.3 22.25 21.05C22.35 21.1 22.4 21.1 22.5 21.1C22.75 21.1 23 20.85 23 20.6V6C22.4 5.55 21.75 5.25 21 5ZM21 18.5C19.9 18.15 18.7 18 17.5 18C15.8 18 13.35 18.65 12 19.5C10.65 18.65 8.2 18 6.5 18C5.3 18 4.1 18.15 3 18.5V7C4.1 6.65 5.3 6.5 6.5 6.5C8.2 6.5 10.65 7.15 12 8C13.35 7.15 15.8 6.5 17.5 6.5C18.7 6.5 19.9 6.65 21 7V18.5Z"}),mt("path",{d:"M17.5 10.5C18.38 10.5 19.23 10.59 20 10.76V9.24C19.21 9.09 18.36 9 17.5 9C15.8 9 14.26 9.29 13 9.83V11.49C14.13 10.85 15.7 10.5 17.5 10.5ZM13 12.49V14.15C14.13 13.51 15.7 13.16 17.5 13.16C18.38 13.16 19.23 13.25 20 13.42V11.9C19.21 11.75 18.36 11.66 17.5 11.66C15.8 11.66 14.26 11.96 13 12.49ZM17.5 14.33C15.8 14.33 14.26 14.62 13 15.16V16.82C14.13 16.18 15.7 15.83 17.5 15.83C18.38 15.83 19.23 15.92 20 16.09V14.57C19.21 14.41 18.36 14.33 17.5 14.33Z"}),mt("path",{d:"M6.5 10.5C5.62 10.5 4.77 10.59 4 10.76V9.24C4.79 9.09 5.64 9 6.5 9C8.2 9 9.74 9.29 11 9.83V11.49C9.87 10.85 8.3 10.5 6.5 10.5ZM11 12.49V14.15C9.87 13.51 8.3 13.16 6.5 13.16C5.62 13.16 4.77 13.25 4 13.42V11.9C4.79 11.75 5.64 11.66 6.5 11.66C8.2 11.66 9.74 11.96 11 12.49ZM6.5 14.33C8.2 14.33 9.74 14.62 11 15.16V16.82C9.87 16.18 8.3 15.83 6.5 15.83C5.62 15.83 4.77 15.92 4 16.09V14.57C4.79 14.41 5.64 14.33 6.5 14.33Z"})]}),In=()=>mt("svg",{viewBox:"0 0 24 24",fill:"currentColor",children:mt("path",{fillRule:"evenodd",clipRule:"evenodd",d:"M12 2C6.48 2 2 6.48 2 12C2 17.52 6.48 22 12 22C17.52 22 22 17.52 22 12C22 6.48 17.52 2 12 2ZM12 6C9.79 6 8 7.79 8 10H10C10 8.9 10.9 8 12 8C13.1 8 14 8.9 14 10C14 10.8792 13.4202 11.3236 12.7704 11.8217C11.9421 12.4566 11 13.1787 11 15H13C13 13.9046 13.711 13.2833 14.4408 12.6455C15.21 11.9733 16 11.2829 16 10C16 7.79 14.21 6 12 6ZM13 16V18H11V16H13Z"})}),zn=()=>mt("svg",{viewBox:"0 0 24 24",fill:"currentColor",children:mt("path",{d:"M4 20h16c1.1 0 2-.9 2-2s-.9-2-2-2H4c-1.1 0-2 .9-2 2s.9 2 2 2zm0-3h2v2H4v-2zM2 6c0 1.1.9 2 2 2h16c1.1 0 2-.9 2-2s-.9-2-2-2H4c-1.1 0-2 .9-2 2zm4 1H4V5h2v2zm-2 7h16c1.1 0 2-.9 2-2s-.9-2-2-2H4c-1.1 0-2 .9-2 2s.9 2 2 2zm0-3h2v2H4v-2z"})}),jn=()=>mt("svg",{viewBox:"0 0 24 24",fill:"currentColor",children:mt("path",{d:"M12 8c1.1 0 2-.9 2-2s-.9-2-2-2-2 .9-2 2 .9 2 2 2zm0 2c-1.1 0-2 .9-2 2s.9 2 2 2 2-.9 2-2-.9-2-2-2zm0 6c-1.1 0-2 .9-2 2s.9 2 2 2 2-.9 2-2-.9-2-2-2z"})}),$n=()=>mt("svg",{viewBox:"0 0 24 24",fill:"currentColor",children:mt("path",{d:"M7 20h4c0 1.1-.9 2-2 2s-2-.9-2-2zm-2-1h8v-2H5v2zm11.5-9.5c0 3.82-2.66 5.86-3.77 6.5H5.27c-1.11-.64-3.77-2.68-3.77-6.5C1.5 5.36 4.86 2 9 2s7.5 3.36 7.5 7.5zm4.87-2.13L20 8l1.37.63L22 10l.63-1.37L24 8l-1.37-.63L22 6l-.63 1.37zM19 6l.94-2.06L22 3l-2.06-.94L19 0l-.94 2.06L16 3l2.06.94L19 6z"})}),Fn=()=>mt("svg",{viewBox:"0 0 24 24",fill:"currentColor",children:mt("path",{d:"M3 14h4v-4H3v4zm0 5h4v-4H3v4zM3 9h4V5H3v4zm5 5h13v-4H8v4zm0 5h13v-4H8v4zM8 5v4h13V5H8z"})}),Hn=()=>mt("svg",{viewBox:"0 0 16 16",fill:it("color-error"),children:mt("path",{d:"M13.5095 4L8.50952 1H7.50952L2.50952 4L2.01953 4.85999V10.86L2.50952 11.71L7.50952 14.71H8.50952L13.5095 11.71L13.9995 10.86V4.85999L13.5095 4ZM7.50952 13.5601L3.00952 10.86V5.69995L7.50952 8.15002V13.5601ZM3.26953 4.69995L8.00952 1.85999L12.7495 4.69995L8.00952 7.29004L3.26953 4.69995ZM13.0095 10.86L8.50952 13.5601V8.15002L13.0095 5.69995V10.86Z"})}),Vn=()=>mt("svg",{viewBox:"0 0 16 16",fill:it("color-primary"),children:mt("path",{fillRule:"evenodd",clipRule:"evenodd",d:"M2 5H4V4H1.5L1 4.5V12.5L1.5 13H4V12H2V5ZM14.5 4H12V5H14V12H12V13H14.5L15 12.5V4.5L14.5 4ZM11.76 6.56995L12 7V9.51001L11.7 9.95996L7.19995 11.96H6.73999L4.23999 10.46L4 10.03V7.53003L4.30005 7.06995L8.80005 5.06995H9.26001L11.76 6.56995ZM5 9.70996L6.5 10.61V9.28003L5 8.38V9.70996ZM5.57996 7.56006L7.03003 8.43005L10.42 6.93005L8.96997 6.06006L5.57996 7.56006ZM7.53003 10.73L11.03 9.17004V7.77002L7.53003 9.31995V10.73Z"})}),Bn=()=>mt("svg",{viewBox:"0 0 16 16",fill:it("color-warning"),children:mt("path",{fillRule:"evenodd",clipRule:"evenodd",d:"M14 2H8L7 3V6H8V3H14V8H10V9H14L15 8V3L14 2ZM9 6H13V7H9.41L9 6.59V6ZM7 7H2L1 8V13L2 14H8L9 13V8L8 7H7ZM8 13H2V8H8V9V13ZM3 9H7V10H3V9ZM3 11H7V12H3V11ZM9 4H13V5H9V4Z"})}),Un=()=>mt("svg",{viewBox:"0 0 16 16",fill:it("color-primary"),children:mt("path",{fillRule:"evenodd",clipRule:"evenodd",d:"M7 3L8 2H14L15 3V8L14 9H10V8H14V3H8V6H7V3ZM9 9V8L8 7H7H2L1 8V13L2 14H8L9 13V9ZM8 8V9V13H2V8H7H8ZM9.41421 7L9 6.58579V6H13V7H9.41421ZM9 4H13V5H9V4ZM7 10H3V11H7V10Z"})}),Yn=()=>mt("svg",{viewBox:"0 0 24 24",fill:"currentColor",children:mt("path",{d:"M12 5.83 15.17 9l1.41-1.41L12 3 7.41 7.59 8.83 9zm0 12.34L8.83 15l-1.41 1.41L12 21l4.59-4.59L15.17 15z"})}),Wn=()=>mt("svg",{viewBox:"0 0 24 24",fill:"currentColor",children:mt("path",{d:"M7.41 18.59 8.83 20 12 16.83 15.17 20l1.41-1.41L12 14zm9.18-13.18L15.17 4 12 7.17 8.83 4 7.41 5.41 12 10z"})}),qn=()=>mt("svg",{viewBox:"0 0 24 24",fill:"currentColor",children:mt("path",{d:"M15.5 14h-.79l-.28-.27C15.41 12.59 16 11.11 16 9.5 16 5.91 13.09 3 9.5 3S3 5.91 3 9.5 5.91 16 9.5 16c1.61 0 3.09-.59 4.23-1.57l.27.28v.79l5 4.99L20.49 19zm-6 0C7.01 14 5 11.99 5 9.5S7.01 5 9.5 5 14 7.01 14 9.5 11.99 14 9.5 14"})});var Kn=n(738),Zn=n.n(Kn);const Gn=e=>{let{to:t,isNavLink:n,children:r,...o}=e;return n?mt(Re,{to:t,...o,children:r}):mt("div",{...o,children:r})},Qn=e=>{let{activeItem:t,item:n,color:r=it("color-primary"),activeNavRef:o,onChange:a,isNavLink:i}=e;return mt(Gn,{className:Zn()({"vm-tabs-item":!0,"vm-tabs-item_active":t===n.value,[n.className||""]:n.className}),isNavLink:i,to:n.value,style:{color:r},onClick:(l=n.value,()=>{a&&a(l)}),ref:t===n.value?o:void 0,children:[n.icon&&mt("div",{className:Zn()({"vm-tabs-item__icon":!0,"vm-tabs-item__icon_single":!n.label}),children:n.icon}),n.label]});var l};const Jn=function(e,n,r,o){const a=(0,t.useRef)(n);(0,t.useEffect)((()=>{a.current=n}),[n]),(0,t.useEffect)((()=>{var t;const n=null!==(t=null===r||void 0===r?void 0:r.current)&&void 0!==t?t:window;if(!n||!n.addEventListener)return;const i=e=>a.current(e);return n.addEventListener(e,i,o),()=>{n.removeEventListener(e,i,o)}}),[e,r,o])},Xn=()=>{const[e,n]=(0,t.useState)({width:0,height:0}),r=()=>{n({width:window.innerWidth,height:window.innerHeight})};return Jn("resize",r),(0,t.useEffect)(r,[]),e},er=e=>{let{activeItem:n,items:r,color:o=it("color-primary"),onChange:a,indicatorPlacement:i="bottom",isNavLink:l}=e;const s=Xn(),c=(0,t.useRef)(null),[u,d]=(0,t.useState)({left:0,width:0,bottom:0});return(0,t.useEffect)((()=>{var e;if((null===(e=c.current)||void 0===e?void 0:e.base)instanceof HTMLElement){const{offsetLeft:e,offsetWidth:t,offsetHeight:n}=c.current.base;d({left:e,width:t,bottom:"top"===i?n-2:0})}}),[s,n,c,r]),mt("div",{className:"vm-tabs",children:[r.map((e=>mt(Qn,{activeItem:n,item:e,onChange:a,color:o,activeNavRef:c,isNavLink:l},e.value))),mt("div",{className:"vm-tabs__indicator",style:{...u,borderColor:o}})]})},tr=[{value:nt.chart,icon:mt(Mn,{}),label:"Graph",prometheusCode:0},{value:nt.code,icon:mt(Tn,{}),label:"JSON",prometheusCode:3},{value:nt.table,icon:mt(Nn,{}),label:"Table",prometheusCode:1}],nr=We("SERIES_LIMITS"),rr={displayType:(()=>{const e=et("g0.tab",0),t=tr.find((t=>t.prometheusCode===+e||t.value===e));return(null===t||void 0===t?void 0:t.value)||nt.chart})(),nocache:!1,isTracingEnabled:!1,seriesLimits:nr?JSON.parse(nr):Xe,tableCompact:We("TABLE_COMPACT")||!1};function or(e,t){switch(t.type){case"SET_DISPLAY_TYPE":return{...e,displayType:t.payload};case"SET_SERIES_LIMITS":return Ye("SERIES_LIMITS",JSON.stringify(t.payload)),{...e,seriesLimits:t.payload};case"TOGGLE_QUERY_TRACING":return{...e,isTracingEnabled:!e.isTracingEnabled};case"TOGGLE_NO_CACHE":return{...e,nocache:!e.nocache};case"TOGGLE_TABLE_COMPACT":return Ye("TABLE_COMPACT",!e.tableCompact),{...e,tableCompact:!e.tableCompact};default:throw new Error}}const ar=(0,t.createContext)({}),ir={customStep:et("g0.step_input",""),yaxis:{limits:{enable:!1,range:{1:[0,0]}}},isHistogram:!1,spanGaps:!1};function lr(e,t){switch(t.type){case"TOGGLE_ENABLE_YAXIS_LIMITS":return{...e,yaxis:{...e.yaxis,limits:{...e.yaxis.limits,enable:!e.yaxis.limits.enable}}};case"SET_CUSTOM_STEP":return{...e,customStep:t.payload};case"SET_YAXIS_LIMITS":return{...e,yaxis:{...e.yaxis,limits:{...e.yaxis.limits,range:t.payload}}};case"SET_IS_HISTOGRAM":return{...e,isHistogram:t.payload};case"SET_SPAN_GAPS":return{...e,spanGaps:t.payload};default:throw new Error}}const sr=(0,t.createContext)({}),cr={dashboardsSettings:[],dashboardsLoading:!1,dashboardsError:""};function ur(e,t){switch(t.type){case"SET_DASHBOARDS_SETTINGS":return{...e,dashboardsSettings:t.payload};case"SET_DASHBOARDS_LOADING":return{...e,dashboardsLoading:t.payload};case"SET_DASHBOARDS_ERROR":return{...e,dashboardsError:t.payload};default:throw new Error}}const dr=(0,t.createContext)({}),hr={markdownParsing:"true"===We("LOGS_MARKDOWN")};function pr(e,t){if("SET_MARKDOWN_PARSING"===t.type)return Ye("LOGS_MARKDOWN","".concat(t.payload)),{...e,markdownParsing:t.payload};throw new Error}const fr=(0,t.createContext)({}),mr=()=>(0,t.useContext)(fr).state,_r={windows:"Windows",mac:"Mac OS",linux:"Linux"},gr=()=>(Object.values(_r).find((e=>navigator.userAgent.indexOf(e)>=0))||"unknown")===_r.mac;function vr(){const e=Xn(),n=()=>{const e=["Android","webOS","iPhone","iPad","iPod","BlackBerry","Windows Phone"].map((e=>navigator.userAgent.match(new RegExp(e,"i")))).some((e=>e)),t=window.innerWidth<500;return e||t},[r,o]=(0,t.useState)(n());return(0,t.useEffect)((()=>{o(n())}),[e]),{isMobile:r}}const yr={success:mt(yn,{}),error:mt(vn,{}),warning:mt(gn,{}),info:mt(_n,{})},br=e=>{let{variant:t,children:n}=e;const{isDarkTheme:r}=gt(),{isMobile:o}=vr();return mt("div",{className:Zn()({"vm-alert":!0,["vm-alert_".concat(t)]:t,"vm-alert_dark":r,"vm-alert_mobile":o}),children:[mt("div",{className:"vm-alert__icon",children:yr[t||"info"]}),mt("div",{className:"vm-alert__content",children:n})]})},wr=(0,t.createContext)({showInfoMessage:()=>{}}),kr=function(){for(var e=arguments.length,t=new Array(e),n=0;nn=>{let{children:r}=n;return mt(e,{children:mt(t,{children:r})})}),(e=>{let{children:t}=e;return mt(pt.FK,{children:t})}))}(...[e=>{let{children:n}=e;const[r,o]=(0,t.useReducer)(ht,yt),a=(0,t.useMemo)((()=>({state:r,dispatch:o})),[r,o]);return mt(_t.Provider,{value:a,children:n})},e=>{let{children:n}=e;const[r,o]=(0,t.useReducer)(Kt,qt),a=(0,t.useMemo)((()=>({state:r,dispatch:o})),[r,o]);return mt(Zt.Provider,{value:a,children:n})},e=>{let{children:n}=e;const[r,o]=(0,t.useReducer)(on,rn),a=(0,t.useMemo)((()=>({state:r,dispatch:o})),[r,o]);return mt(an.Provider,{value:a,children:n})},e=>{let{children:n}=e;const[r,o]=(0,t.useReducer)(or,rr),a=(0,t.useMemo)((()=>({state:r,dispatch:o})),[r,o]);return mt(ar.Provider,{value:a,children:n})},e=>{let{children:n}=e;const[r,o]=(0,t.useReducer)(lr,ir),a=(0,t.useMemo)((()=>({state:r,dispatch:o})),[r,o]);return mt(sr.Provider,{value:a,children:n})},e=>{let{children:n}=e;const{isMobile:r}=vr(),[o,a]=(0,t.useState)({}),[i,l]=(0,t.useState)(!1),[s,c]=(0,t.useState)(void 0);(0,t.useEffect)((()=>{if(!s)return;a({message:s.text,variant:s.type,key:Date.now()}),l(!0);const e=setTimeout(u,4e3);return()=>clearTimeout(e)}),[s]);const u=()=>{c(void 0),l(!1)};return mt(wr.Provider,{value:{showInfoMessage:c},children:[i&&mt("div",{className:Zn()({"vm-snackbar":!0,"vm-snackbar_mobile":r}),children:mt(br,{variant:o.variant,children:mt("div",{className:"vm-snackbar-content",children:[mt("span",{children:o.message}),mt("div",{className:"vm-snackbar-content__close",onClick:u,children:mt(fn,{})})]})})}),n]})},e=>{let{children:n}=e;const[r,o]=(0,t.useReducer)(ur,cr),a=(0,t.useMemo)((()=>({state:r,dispatch:o})),[r,o]);return mt(dr.Provider,{value:a,children:n})},e=>{let{children:n}=e;const[r,o]=(0,t.useReducer)(pr,hr),a=(0,t.useMemo)((()=>({state:r,dispatch:o})),[r,o]);return mt(fr.Provider,{value:a,children:n})}]),xr=e=>{if(7!=e.length)return"0, 0, 0";const t=parseInt(e.slice(1,3),16),n=parseInt(e.slice(3,5),16),r=parseInt(e.slice(5,7),16);return"".concat(t,", ").concat(n,", ").concat(r)},Sr={[tt.yhatUpper]:"#7126a1",[tt.yhatLower]:"#7126a1",[tt.yhat]:"#da42a6",[tt.anomaly]:"#da4242",[tt.anomalyScore]:"#7126a1",[tt.actual]:"#203ea9",[tt.training]:"rgba(".concat(xr("#203ea9"),", 0.2)")},Ar={"color-primary":"#589DF6","color-secondary":"#316eca","color-error":"#e5534b","color-warning":"#c69026","color-info":"#539bf5","color-success":"#57ab5a","color-background-body":"#22272e","color-background-block":"#2d333b","color-background-tooltip":"rgba(22, 22, 22, 0.8)","color-text":"#cdd9e5","color-text-secondary":"#768390","color-text-disabled":"#636e7b","box-shadow":"rgba(0, 0, 0, 0.16) 1px 2px 6px","box-shadow-popper":"rgba(0, 0, 0, 0.2) 0px 2px 8px 0px","border-divider":"1px solid rgba(99, 110, 123, 0.5)","color-hover-black":"rgba(0, 0, 0, 0.12)","color-log-hits-bar-0":"rgba(255, 255, 255, 0.18)","color-log-hits-bar-1":"#FFB74D","color-log-hits-bar-2":"#81C784","color-log-hits-bar-3":"#64B5F6","color-log-hits-bar-4":"#E57373","color-log-hits-bar-5":"#8a62f0"},Er={"color-primary":"#3F51B5","color-secondary":"#E91E63","color-error":"#FD080E","color-warning":"#FF8308","color-info":"#03A9F4","color-success":"#4CAF50","color-background-body":"#FEFEFF","color-background-block":"#FFFFFF","color-background-tooltip":"rgba(80,80,80,0.9)","color-text":"#110f0f","color-text-secondary":"#706F6F","color-text-disabled":"#A09F9F","box-shadow":"rgba(0, 0, 0, 0.08) 1px 2px 6px","box-shadow-popper":"rgba(0, 0, 0, 0.1) 0px 2px 8px 0px","border-divider":"1px solid rgba(0, 0, 0, 0.15)","color-hover-black":"rgba(0, 0, 0, 0.06)","color-log-hits-bar-0":"rgba(0, 0, 0, 0.18)","color-log-hits-bar-1":"#FFB74D","color-log-hits-bar-2":"#81C784","color-log-hits-bar-3":"#64B5F6","color-log-hits-bar-4":"#E57373","color-log-hits-bar-5":"#8a62f0"},Cr=()=>{const[e,n]=(0,t.useState)(st()),r=e=>{n(e.matches)};return(0,t.useEffect)((()=>{const e=window.matchMedia("(prefers-color-scheme: dark)");return e.addEventListener("change",r),()=>e.removeEventListener("change",r)}),[]),e},Mr=["primary","secondary","error","warning","info","success"],Nr=e=>{let{onLoaded:n}=e;const r=He(),{palette:o={}}=Fe(),{theme:a}=gt(),i=Cr(),l=vt(),s=Xn(),[c,u]=(0,t.useState)({[ot.dark]:Ar,[ot.light]:Er,[ot.system]:st()?Ar:Er}),d=()=>{const{innerWidth:e,innerHeight:t}=window,{clientWidth:n,clientHeight:r}=document.documentElement;lt("scrollbar-width","".concat(e-n,"px")),lt("scrollbar-height","".concat(t-r,"px")),lt("vh","".concat(.01*t,"px"))},h=()=>{Mr.forEach(((e,t)=>{const r=(e=>{let t=e.replace("#","").trim();if(3===t.length&&(t=t[0]+t[0]+t[1]+t[1]+t[2]+t[2]),6!==t.length)throw new Error("Invalid HEX color.");return(299*parseInt(t.slice(0,2),16)+587*parseInt(t.slice(2,4),16)+114*parseInt(t.slice(4,6),16))/1e3>=128?"#000000":"#FFFFFF"})(it("color-".concat(e)));lt("".concat(e,"-text"),r),t===Mr.length-1&&(l({type:"SET_DARK_THEME"}),n(!0))}))},p=()=>{const e=We("THEME")||ot.system,t=c[e];Object.entries(t).forEach((e=>{let[t,n]=e;lt(t,n)})),h(),r&&(Mr.forEach((e=>{const t=o[e];t&<("color-".concat(e),t)})),h())};return(0,t.useEffect)((()=>{d(),p()}),[c]),(0,t.useEffect)(d,[s]),(0,t.useEffect)((()=>{const e=st()?Ar:Er;c[ot.system]!==e?u((t=>({...t,[ot.system]:e}))):p()}),[a,i]),(0,t.useEffect)((()=>{r&&l({type:"SET_THEME",payload:ot.light})}),[]),null},Tr=()=>{const{showInfoMessage:e}=(0,t.useContext)(wr);return async(t,n)=>{var r;if(null===(r=navigator)||void 0===r||!r.clipboard)return e({text:"Clipboard not supported",type:"error"}),console.warn("Clipboard not supported"),!1;try{return await navigator.clipboard.writeText(t),n&&e({text:n,type:"success"}),!0}catch(o){return o instanceof Error&&e({text:"".concat(o.name,": ").concat(o.message),type:"error"}),console.warn("Copy failed",o),!1}}},Pr=e=>{let{variant:t="contained",color:n="primary",size:r="medium",ariaLabel:o,children:a,endIcon:i,startIcon:l,fullWidth:s=!1,className:c,disabled:u,onClick:d,onMouseDown:h}=e;return mt("button",{className:Zn()({"vm-button":!0,["vm-button_".concat(t,"_").concat(n)]:!0,["vm-button_".concat(r)]:r,"vm-button_icon":(l||i)&&!a,"vm-button_full-width":s,"vm-button_with-icon":l||i,"vm-button_disabled":u,[c||""]:c}),disabled:u,"aria-label":o,onClick:d,onMouseDown:h,children:mt(pt.FK,{children:[l&&mt("span",{className:"vm-button__start-icon",children:l}),a&&mt("span",{children:a}),i&&mt("span",{className:"vm-button__end-icon",children:i})]})})},Dr=e=>{let{data:n}=e;const r=Tr(),o=(0,t.useMemo)((()=>{const e=n.map((e=>1===Object.keys(e).length?JSON.stringify(e):JSON.stringify(e,null,2))).join(",\n").replace(/^/gm,"".concat(" "));return"[\n".concat(e,"\n]")}),[n]);return mt("div",{className:"vm-json-view",children:[mt("div",{className:"vm-json-view__copy",children:mt(Pr,{variant:"outlined",onClick:async()=>{await r(o,"Formatted JSON has been copied")},children:"Copy JSON"})}),mt("pre",{className:"vm-json-view__code",children:mt("code",{children:o})})]})},Or=(e,n)=>{const[r]=$e(),o=r.get(n)?r.get(n):e,[a,i]=(0,t.useState)(o);return(0,t.useEffect)((()=>{o!==a&&i(o)}),[o]),[a,i]},Lr=()=>{const e=oe(),[n,r]=$e();return{setSearchParamsFromKeys:(0,t.useCallback)((t=>{const o=!!Array.from(n.values()).length;let a=!1;Object.entries(t).forEach((e=>{let[t,r]=e;n.get(t)!=="".concat(r)&&(n.set(t,"".concat(r)),a=!0)})),a&&(o?r(n):e("?".concat(n.toString()),{replace:!0}))}),[n,e])}},Rr=e=>{let{checked:t=!1,disabled:n=!1,label:r,color:o="secondary",onChange:a}=e;return mt("div",{className:Zn()({"vm-checkbox":!0,"vm-checkbox_disabled":n,"vm-checkbox_active":t,["vm-checkbox_".concat(o,"_active")]:t,["vm-checkbox_".concat(o)]:o}),onClick:()=>{n||a(!t)},children:[mt("div",{className:"vm-checkbox-track",children:mt("div",{className:"vm-checkbox-track__thumb",children:mt(Pn,{})})}),r&&mt("span",{className:"vm-checkbox__label",children:r})]})},Ir=e=>{let{children:n,title:r,open:o,placement:a="bottom-center",offset:i={top:6,left:0}}=e;const{isMobile:l}=vr(),[s,c]=(0,t.useState)(!1),[u,d]=(0,t.useState)({width:0,height:0}),h=(0,t.useRef)(null),p=(0,t.useRef)(null),f=()=>c(!1);(0,t.useEffect)((()=>{if(p.current&&s)return d({width:p.current.clientWidth,height:p.current.clientHeight}),window.addEventListener("scroll",f),()=>{window.removeEventListener("scroll",f)}}),[s,r]);const m=(0,t.useMemo)((()=>{var e;const t=null===h||void 0===h||null===(e=h.current)||void 0===e?void 0:e.base;if(!t||!s)return{};const n=t.getBoundingClientRect(),r={top:0,left:0},o="bottom-right"===a||"top-right"===a,l="bottom-left"===a||"top-left"===a,c=null===a||void 0===a?void 0:a.includes("top"),d=(null===i||void 0===i?void 0:i.top)||0,p=(null===i||void 0===i?void 0:i.left)||0;r.left=n.left-(u.width-n.width)/2+p,r.top=n.height+n.top+d,o&&(r.left=n.right-u.width),l&&(r.left=n.left+p),c&&(r.top=n.top-u.height-d);const{innerWidth:f,innerHeight:m}=window,_=r.top+u.height+20>m,g=r.top-20<0,v=r.left+u.width+20>f,y=r.left-20<0;return _&&(r.top=n.top-u.height-d),g&&(r.top=n.height+n.top+d),v&&(r.left=n.right-u.width-p),y&&(r.left=n.left+p),r.top<0&&(r.top=20),r.left<0&&(r.left=20),r}),[h,a,s,u]),_=()=>{"boolean"!==typeof o&&c(!0)},g=()=>{c(!1)};return(0,t.useEffect)((()=>{"boolean"===typeof o&&c(o)}),[o]),(0,t.useEffect)((()=>{var e;const t=null===h||void 0===h||null===(e=h.current)||void 0===e?void 0:e.base;if(t)return t.addEventListener("mouseenter",_),t.addEventListener("mouseleave",g),()=>{t.removeEventListener("mouseenter",_),t.removeEventListener("mouseleave",g)}}),[h]),mt(pt.FK,{children:[mt(t.Fragment,{ref:h,children:n}),!l&&s&&t.default.createPortal(mt("div",{className:"vm-tooltip",ref:p,style:m,children:r}),document.body)]})},zr=e=>{let{value:t=!1,disabled:n=!1,label:r,color:o="secondary",fullWidth:a,onChange:i}=e;return mt("div",{className:Zn()({"vm-switch":!0,"vm-switch_full-width":a,"vm-switch_disabled":n,"vm-switch_active":t,["vm-switch_".concat(o,"_active")]:t,["vm-switch_".concat(o)]:o}),onClick:()=>{n||i(!t)},children:[mt("div",{className:"vm-switch-track",children:mt("div",{className:"vm-switch-track__thumb"})}),r&&mt("span",{className:"vm-switch__label",children:r})]})};const jr=e=>{const[n,r]=(0,t.useState)(!!e),o=(0,t.useCallback)((()=>r(!0)),[]),a=(0,t.useCallback)((()=>r(!1)),[]),i=(0,t.useCallback)((()=>r((e=>!e))),[]);return{value:n,setValue:r,setTrue:o,setFalse:a,toggle:i}},$r=e=>{let{error:n,warning:r,info:o}=e;const a=(0,t.useRef)(null),[i,l]=(0,t.useState)(!1),[s,c]=(0,t.useState)(!1),u=(0,t.useMemo)((()=>n?"ERROR: ":r?"WARNING: ":""),[n,r]),d="".concat(u).concat(n||r||o),h=()=>{const e=a.current;if(e){const{offsetWidth:t,scrollWidth:n,offsetHeight:r,scrollHeight:o}=e;l(t+1{c(!1),h()}),[a,d]),Jn("resize",h),n||r||o?mt("span",{className:Zn()({"vm-text-field__error":!0,"vm-text-field__warning":r&&!n,"vm-text-field__helper-text":!r&&!n,"vm-text-field__error_overflowed":i,"vm-text-field__error_full":s}),"data-show":!!d,ref:a,onClick:()=>{i&&(c(!0),l(!1))},children:d}):null},Fr=e=>{let{label:n,value:r,type:o="text",error:a="",warning:i="",helperText:l="",placeholder:s,endIcon:c,startIcon:u,disabled:d=!1,autofocus:h=!1,inputmode:p="text",caretPosition:f,onChange:m,onEnter:_,onKeyDown:g,onFocus:v,onBlur:y,onChangeCaret:b}=e;const{isDarkTheme:w}=gt(),{isMobile:k}=vr(),x=(0,t.useRef)(null),S=(0,t.useRef)(null),A=(0,t.useMemo)((()=>"textarea"===o?S:x),[o]),[E,C]=(0,t.useState)([0,0]),M=Zn()({"vm-text-field__input":!0,"vm-text-field__input_error":a,"vm-text-field__input_warning":!a&&i,"vm-text-field__input_icon-start":u,"vm-text-field__input_disabled":d,"vm-text-field__input_textarea":"textarea"===o}),N=e=>{const{selectionStart:t,selectionEnd:n}=e;C([t||0,n||0])},T=e=>{N(e.currentTarget)},P=e=>{g&&g(e);const{key:t,ctrlKey:n,metaKey:r}=e,a="Enter"===t;("textarea"!==o?a:a&&(r||n))&&_&&(e.preventDefault(),_())},D=e=>{N(e.currentTarget)},O=e=>{d||(m&&m(e.currentTarget.value),N(e.currentTarget))},L=()=>{v&&v()},R=()=>{y&&y()},I=e=>{try{A.current&&A.current.setSelectionRange(e[0],e[1])}catch(Fd){return Fd}};return(0,t.useEffect)((()=>{var e;h&&!k&&(null===A||void 0===A||null===(e=A.current)||void 0===e?void 0:e.focus)&&A.current.focus()}),[A,h]),(0,t.useEffect)((()=>{b&&b(E)}),[E]),(0,t.useEffect)((()=>{I(E)}),[r]),(0,t.useEffect)((()=>{f&&I(f)}),[f]),mt("label",{className:Zn()({"vm-text-field":!0,"vm-text-field_textarea":"textarea"===o,"vm-text-field_dark":w}),"data-replicated-value":r,children:[u&&mt("div",{className:"vm-text-field__icon-start",children:u}),c&&mt("div",{className:"vm-text-field__icon-end",children:c}),"textarea"===o?mt("textarea",{className:M,disabled:d,ref:S,value:r,rows:1,inputMode:p,placeholder:s,autoCapitalize:"none",onInput:O,onKeyDown:P,onKeyUp:D,onFocus:L,onBlur:R,onMouseUp:T}):mt("input",{className:M,disabled:d,ref:x,value:r,type:o,placeholder:s,inputMode:p,autoCapitalize:"none",onInput:O,onKeyDown:P,onKeyUp:D,onFocus:L,onBlur:R,onMouseUp:T}),n&&mt("span",{className:"vm-text-field__label",children:n}),mt($r,{error:a,warning:i,info:l})]})},Hr=e=>{let{title:n,children:r,onClose:o,className:a,isOpen:i=!0}=e;const{isMobile:l}=vr(),s=oe(),c=ne(),u=(0,t.useCallback)((e=>{i&&"Escape"===e.key&&o()}),[i]),d=e=>{e.stopPropagation()},h=(0,t.useCallback)((()=>{i&&(s(c,{replace:!0}),o())}),[i,c,o]);return(0,t.useEffect)((()=>{if(i)return document.body.style.overflow="hidden",()=>{document.body.style.overflow="auto"}}),[i]),Jn("popstate",h),Jn("keyup",u),t.default.createPortal(mt("div",{className:Zn()({"vm-modal":!0,"vm-modal_mobile":l,["".concat(a)]:a}),onMouseDown:o,children:mt("div",{className:"vm-modal-content",children:[mt("div",{className:"vm-modal-content-header",onMouseDown:d,children:[n&&mt("div",{className:"vm-modal-content-header__title",children:n}),mt("div",{className:"vm-modal-header__close",children:mt(Pr,{variant:"text",size:"small",onClick:o,ariaLabel:"close",children:mt(fn,{})})})]}),mt("div",{className:"vm-modal-content-body",onMouseDown:d,tabIndex:0,children:r})]})}),document.body)},Vr="Table settings",Br=e=>{let{columns:n,selectedColumns:r=[],tableCompact:o,onChangeColumns:a,toggleTableCompact:i}=e;const l=(0,t.useRef)(null),{value:s,toggle:c,setFalse:u}=jr(!1),{value:d,toggle:h}=jr(Boolean(We("TABLE_COLUMNS"))),[p,f]=(0,t.useState)(""),[m,_]=(0,t.useState)(-1),g=(0,t.useMemo)((()=>r.filter((e=>!n.includes(e)))),[n,r]),v=(0,t.useMemo)((()=>{const e=g.concat(n);return p?e.filter((e=>e.includes(p))):e}),[n,g,p]),y=(0,t.useMemo)((()=>v.every((e=>r.includes(e)))),[r,v]),b=e=>{a(r.includes(e)?r.filter((t=>t!==e)):[...r,e])};return(0,t.useEffect)((()=>{((e,t)=>e.length===t.length&&e.every(((e,n)=>e===t[n])))(n,r)||d||a(n)}),[n]),(0,t.useEffect)((()=>{d?r.length&&Ye("TABLE_COLUMNS",r.join(",")):qe(["TABLE_COLUMNS"])}),[d,r]),(0,t.useEffect)((()=>{const e=We("TABLE_COLUMNS");e&&a(e.split(","))}),[]),mt("div",{className:"vm-table-settings",children:[mt(Ir,{title:Vr,children:mt("div",{ref:l,children:mt(Pr,{variant:"text",startIcon:mt(pn,{}),onClick:c,ariaLabel:Vr})})}),s&&mt(Hr,{title:Vr,className:"vm-table-settings-modal",onClose:u,children:[mt("div",{className:"vm-table-settings-modal-section",children:[mt("div",{className:"vm-table-settings-modal-section__title",children:"Customize columns"}),mt("div",{className:"vm-table-settings-modal-columns",children:[mt("div",{className:"vm-table-settings-modal-columns__search",children:mt(Fr,{placeholder:"Search columns",startIcon:mt(qn,{}),value:p,onChange:f,onBlur:()=>{_(-1)},onKeyDown:e=>{const t="ArrowUp"===e.key,n="ArrowDown"===e.key,r="Enter"===e.key;(n||t||r)&&e.preventDefault(),n?_((e=>e+1>v.length-1?e:e+1)):t?_((e=>e-1<0?e:e-1)):r&&b(v[m])},type:"search"})}),mt("div",{className:"vm-table-settings-modal-columns-list",children:[!!v.length&&mt("div",{className:"vm-table-settings-modal-columns-list__item vm-table-settings-modal-columns-list__item_all",children:mt(Rr,{checked:y,onChange:()=>{a(y?r.filter((e=>!v.includes(e))):v)},label:y?"Uncheck all":"Check all",disabled:o})}),!v.length&&mt("div",{className:"vm-table-settings-modal-columns-no-found",children:mt("p",{className:"vm-table-settings-modal-columns-no-found__info",children:"No columns found."})}),v.map(((e,t)=>{return mt("div",{className:Zn()({"vm-table-settings-modal-columns-list__item":!0,"vm-table-settings-modal-columns-list__item_focus":t===m,"vm-table-settings-modal-columns-list__item_custom":g.includes(e)}),children:mt(Rr,{checked:r.includes(e),onChange:(n=e,()=>{b(n)}),label:e,disabled:o})},e);var n}))]}),mt("div",{className:"vm-table-settings-modal-preserve",children:[mt(Rr,{checked:d,onChange:h,label:"Preserve column settings",disabled:o,color:"primary"}),mt("p",{className:"vm-table-settings-modal-preserve__info",children:"This label indicates that when the checkbox is activated, the current column configurations will not be reset."})]})]})]}),mt("div",{className:"vm-table-settings-modal-section",children:[mt("div",{className:"vm-table-settings-modal-section__title",children:"Table view"}),mt("div",{className:"vm-table-settings-modal-columns-list__item",children:mt(zr,{label:"Compact view",value:o,onChange:i})})]})]})]})},Ur=["date","timestamp","time"];function Yr(e,t,n){const r=e[n],a=t[n],i=Ur.includes("".concat(n))?o()("".concat(r)).unix():r,l=Ur.includes("".concat(n))?o()("".concat(a)).unix():a;return li?1:0}const Wr=e=>{let{rows:n,columns:r,defaultOrderBy:o,defaultOrderDir:a,copyToClipboard:i,paginationOffset:l}=e;const[s,c]=(0,t.useState)(o),[u,d]=(0,t.useState)(a||"desc"),[h,p]=(0,t.useState)(null),f=(0,t.useMemo)((()=>{const{startIndex:e,endIndex:t}=l;return function(e,t){const n=e.map(((e,t)=>[e,t]));return n.sort(((e,n)=>{const r=t(e[0],n[0]);return 0!==r?r:e[1]-n[1]})),n.map((e=>e[0]))}(n,function(e,t){return"desc"===e?(e,n)=>Yr(e,n,t):(e,n)=>-Yr(e,n,t)}(u,s)).slice(e,t)}),[n,s,u,l]),m=(e,t)=>async()=>{if(h!==t)try{await navigator.clipboard.writeText(String(e)),p(t)}catch(Fd){console.error(Fd)}};return(0,t.useEffect)((()=>{if(null===h)return;const e=setTimeout((()=>p(null)),2e3);return()=>clearTimeout(e)}),[h]),mt("table",{className:"vm-table",children:[mt("thead",{className:"vm-table-header",children:mt("tr",{className:"vm-table__row vm-table__row_header",children:[r.map((e=>{return mt("th",{className:"vm-table-cell vm-table-cell_header vm-table-cell_sort",onClick:(t=e.key,()=>{d((e=>"asc"===e&&s===t?"desc":"asc")),c(t)}),children:mt("div",{className:"vm-table-cell__content",children:[mt("div",{children:String(e.title||e.key)}),mt("div",{className:Zn()({"vm-table__sort-icon":!0,"vm-table__sort-icon_active":s===e.key,"vm-table__sort-icon_desc":"desc"===u&&s===e.key}),children:mt(kn,{})})]})},String(e.key));var t})),i&&mt("th",{className:"vm-table-cell vm-table-cell_header"})]})}),mt("tbody",{className:"vm-table-body",children:f.map(((e,t)=>mt("tr",{className:"vm-table__row",children:[r.map((t=>mt("td",{className:Zn()({"vm-table-cell":!0,["".concat(t.className)]:t.className}),children:e[t.key]||"-"},String(t.key)))),i&&mt("td",{className:"vm-table-cell vm-table-cell_right",children:e[i]&&mt("div",{className:"vm-table-cell__content",children:mt(Ir,{title:h===t?"Copied":"Copy row",children:mt(Pr,{variant:"text",color:h===t?"success":"gray",size:"small",startIcon:mt(h===t?Pn:On,{}),onClick:m(e[i],t),ariaLabel:"copy row"})})})})]},t)))})]})},qr=e=>{let{logs:n,displayColumns:r,tableCompact:o,columns:a}=e;const i=e=>{switch(e){case"_time":return"vm-table-cell_logs-time";case"_vmui_data":return"vm-table-cell_logs vm-table-cell_pre";default:return"vm-table-cell_logs"}},l=(0,t.useMemo)((()=>o?[{key:"_vmui_data",title:"Data",className:i("_vmui_data")}]:a.map((e=>({key:e,title:e,className:i(e)})))),[o,a]),s=(0,t.useMemo)((()=>o?l:null!==r&&void 0!==r&&r.length?l.filter((e=>r.includes(e.key))):[]),[l,r,o]);return mt(pt.FK,{children:mt(Wr,{rows:n,columns:s,defaultOrderBy:"_time",defaultOrderDir:"desc",copyToClipboard:"_vmui_data",paginationOffset:{startIndex:0,endIndex:1/0}})})},Kr=e=>{let{defaultExpanded:n=!1,onChange:r,title:o,children:a}=e;const[i,l]=(0,t.useState)(n);return(0,t.useEffect)((()=>{r&&r(i)}),[i]),mt(pt.FK,{children:[mt("header",{className:"vm-accordion-header ".concat(i&&"vm-accordion-header_open"),onClick:()=>{l((e=>!e))},children:[o,mt("div",{className:"vm-accordion-header__arrow ".concat(i&&"vm-accordion-header__arrow_open"),children:mt(wn,{})})]}),i&&mt("section",{className:"vm-accordion-section",children:a},"content")]})},Zr=e=>{let{log:n}=e;const{value:r,toggle:o}=jr(!1),{markdownParsing:a}=mr(),i=["_msg","_vmui_time","_vmui_data","_vmui_markdown"],l=Object.entries(n).filter((e=>{let[t]=e;return!i.includes(t)})),s=l.length>0,c=(0,t.useMemo)((()=>{if(n._msg)return n._msg;if(!s)return;const e=l.reduce(((e,t)=>{let[n,r]=t;return e[n]=r,e}),{});return JSON.stringify(e)}),[n,l,s]),u=Tr(),[d,h]=(0,t.useState)(null);return(0,t.useEffect)((()=>{if(null===d)return;const e=setTimeout((()=>h(null)),2e3);return()=>clearTimeout(e)}),[d]),mt("div",{className:"vm-group-logs-row",children:[mt("div",{className:"vm-group-logs-row-content",onClick:o,children:[s&&mt("div",{className:Zn()({"vm-group-logs-row-content__arrow":!0,"vm-group-logs-row-content__arrow_open":r}),children:mt(wn,{})}),mt("div",{className:Zn()({"vm-group-logs-row-content__time":!0,"vm-group-logs-row-content__time_missing":!n._vmui_time}),children:n._vmui_time||"timestamp missing"}),mt("div",{className:Zn()({"vm-group-logs-row-content__msg":!0,"vm-group-logs-row-content__msg_empty-msg":!n._msg,"vm-group-logs-row-content__msg_missing":!c}),dangerouslySetInnerHTML:a&&n._vmui_markdown?{__html:n._vmui_markdown}:void 0,children:c||"-"})]},"".concat(n._msg).concat(n._time)),s&&r&&mt("div",{className:"vm-group-logs-row-fields",children:mt("table",{children:mt("tbody",{children:l.map(((e,t)=>{let[n,r]=e;return mt("tr",{className:"vm-group-logs-row-fields-item",children:[mt("td",{className:"vm-group-logs-row-fields-item-controls",children:mt("div",{className:"vm-group-logs-row-fields-item-controls__wrapper",children:mt(Ir,{title:d===t?"Copied":"Copy to clipboard",children:mt(Pr,{variant:"text",color:"gray",size:"small",startIcon:mt(On,{}),onClick:(o="".concat(n,': "').concat(r,'"'),a=t,async()=>{if(d!==a)try{await u(o),h(a)}catch(Fd){console.error(Fd)}}),ariaLabel:"copy to clipboard"})})})}),mt("td",{className:"vm-group-logs-row-fields-item__key",children:n}),mt("td",{className:"vm-group-logs-row-fields-item__value",children:r})]},n);var o,a}))})})})]})},Gr=(e,n,r)=>{const o=(0,t.useCallback)((t=>{const o=null===e||void 0===e?void 0:e.current,a=t.target,i=(null===r||void 0===r?void 0:r.current)&&r.current.contains(a);!o||o.contains((null===t||void 0===t?void 0:t.target)||null)||i||n(t)}),[e,n]);Jn("mousedown",o),Jn("touchstart",o)},Qr=e=>{let{children:n,buttonRef:r,placement:o="bottom-left",open:a=!1,onClose:i,offset:l={top:6,left:0},clickOutside:s=!0,fullWidth:c,title:u,disabledFullScreen:d,variant:h}=e;const{isMobile:p}=vr(),f=oe(),m=ne(),[_,g]=(0,t.useState)({width:0,height:0}),[v,y]=(0,t.useState)(!1),b=(0,t.useRef)(null);(0,t.useEffect)((()=>(y(a),!a&&i&&i(),a&&p&&!d&&(document.body.style.overflow="hidden"),()=>{document.body.style.overflow="auto"})),[a]),(0,t.useEffect)((()=>{var e,t;g({width:(null===b||void 0===b||null===(e=b.current)||void 0===e?void 0:e.clientWidth)||0,height:(null===b||void 0===b||null===(t=b.current)||void 0===t?void 0:t.clientHeight)||0}),y(!1)}),[b]);const w=(0,t.useMemo)((()=>{const e=r.current;if(!e||!v)return{};const t=e.getBoundingClientRect(),n={top:0,left:0,width:"auto"},a="bottom-right"===o||"top-right"===o,i=null===o||void 0===o?void 0:o.includes("top"),s=(null===l||void 0===l?void 0:l.top)||0,u=(null===l||void 0===l?void 0:l.left)||0;n.left=n.left=t.left+u,n.top=t.height+t.top+s,a&&(n.left=t.right-_.width),i&&(n.top=t.top-_.height-s);const{innerWidth:d,innerHeight:h}=window,p=n.top+_.height+20>h,f=n.top-20<0,m=n.left+_.width+20>d,g=n.left-20<0;return p&&(n.top=t.top-_.height-s),f&&(n.top=t.height+t.top+s),m&&(n.left=t.right-_.width-u),g&&(n.left=t.left+u),c&&(n.width="".concat(t.width,"px")),n.top<0&&(n.top=20),n.left<0&&(n.left=20),n}),[r,o,v,n,c]),k=()=>{y(!1),i()};(0,t.useEffect)((()=>{if(!b.current||!v||p&&!d)return;const{right:e,width:t}=b.current.getBoundingClientRect();if(e>window.innerWidth){const e=window.innerWidth-20-t;b.current.style.left=e{v&&p&&!d&&(f(m,{replace:!0}),i())}),[v,p,d,m,i]);return Jn("scroll",k),Jn("popstate",x),Gr(b,(()=>{s&&k()}),r),mt(pt.FK,{children:(v||!_.width)&&t.default.createPortal(mt("div",{className:Zn()({"vm-popper":!0,["vm-popper_".concat(h)]:h,"vm-popper_mobile":p&&!d,"vm-popper_open":(p||Object.keys(w).length)&&v}),ref:b,style:p&&!d?{}:w,children:[(u||p&&!d)&&mt("div",{className:"vm-popper-header",children:[mt("p",{className:"vm-popper-header__title",children:u}),mt(Pr,{variant:"text",color:"dark"===h?"white":"primary",size:"small",onClick:e=>{e.stopPropagation(),i()},ariaLabel:"close",children:mt(fn,{})})]}),n]}),document.body)})},Jr=e=>(/^{.+}$/.test(e)?e.slice(1,-1).split(","):[e]).filter(Boolean),Xr="No Grouping",eo=e=>{let{logs:n,settingsRef:r}=e;const{isDarkTheme:o}=gt(),a=Tr(),[i,l]=$e(),[s,c]=(0,t.useState)([]),[u,d]=Or("_stream","groupBy"),[h,p]=(0,t.useState)(null),[f,m]=(0,t.useState)(""),_=(0,t.useRef)(null),{value:g,toggle:v,setFalse:y}=jr(!1),b=(0,t.useMemo)((()=>s.every(Boolean)),[s]),w=(0,t.useMemo)((()=>{const e=["_msg","_time","_vmui_time","_vmui_data","_vmui_markdown"],t=Array.from(new Set(n.map((e=>Object.keys(e))).flat())),r=[Xr,...t.filter((t=>!e.includes(t)))];if(!f)return r;try{const e=new RegExp(f,"i");return r.filter((t=>e.test(t))).sort(((t,n)=>{var r,o;return((null===(r=t.match(e))||void 0===r?void 0:r.index)||0)-((null===(o=n.match(e))||void 0===o?void 0:o.index)||0)}))}catch(Fd){return[]}}),[n,f]),k=(0,t.useMemo)((()=>function(e,t){const n=e.reduce(((e,n)=>{const r=t.map((e=>"".concat(e,": ").concat(n[e]||"-"))).join("|");return(e[r]=e[r]||[]).push(n),e}),{});return Object.entries(n).map((e=>{let[t,n]=e;return{keys:t.split("|"),values:n}}))}(n,[u]).map((e=>{var t;const n=(null===(t=e.values[0])||void 0===t?void 0:t[u])||"",r=Jr(n);return{...e,pairs:r}}))),[n,u]),x=(0,t.useCallback)((()=>{c(new Array(k.length).fill(!b))}),[b]),S=e=>t=>{c((n=>{const r=[...n];return r[e]=t,r}))};return(0,t.useEffect)((()=>{if(null===h)return;const e=setTimeout((()=>p(null)),2e3);return()=>clearTimeout(e)}),[h]),(0,t.useEffect)((()=>{c(new Array(k.length).fill(!0))}),[k]),mt(pt.FK,{children:[mt("div",{className:"vm-group-logs",children:k.map(((e,t)=>mt("div",{className:"vm-group-logs-section",children:mt(Kr,{defaultExpanded:s[t],onChange:S(t),title:u!==Xr&&mt("div",{className:"vm-group-logs-section-keys",children:[mt("span",{className:"vm-group-logs-section-keys__title",children:["Group by ",mt("code",{children:u}),":"]}),e.pairs.map((t=>{return mt(Ir,{title:h===t?"Copied":"Copy to clipboard",placement:"top-center",children:mt("div",{className:Zn()({"vm-group-logs-section-keys__pair":!0,"vm-group-logs-section-keys__pair_dark":o}),onClick:(n=t,async e=>{e.stopPropagation();const t=/(.+)?=(".+")/.test(n)?"".concat(n.replace(/=/,": ")):"".concat(u,': "').concat(n,'"');await a(t)&&p(n)}),children:t})},"".concat(e.keys.join(""),"_").concat(t));var n})),mt("span",{className:"vm-group-logs-section-keys__count",children:[e.values.length," entries"]})]}),children:mt("div",{className:"vm-group-logs-section-rows",children:e.values.map((e=>mt(Zr,{log:e},"".concat(e._msg).concat(e._time))))})},String(s[t]))},e.keys.join(""))))}),r.current&&t.default.createPortal(mt("div",{className:"vm-group-logs-header",children:[mt(Ir,{title:b?"Collapse All":"Expand All",children:mt(Pr,{variant:"text",startIcon:mt(b?Wn:Yn,{}),onClick:x,ariaLabel:b?"Collapse All":"Expand All"})}),mt(Ir,{title:"Group by",children:mt("div",{ref:_,children:mt(Pr,{variant:"text",startIcon:mt(zn,{}),onClick:v,ariaLabel:"Group by"})})}),mt(Qr,{open:g,placement:"bottom-right",onClose:y,buttonRef:_,children:mt("div",{className:"vm-list vm-group-logs-header-keys",children:[mt("div",{className:"vm-group-logs-header-keys__search",children:mt(Fr,{label:"Search key",value:f,onChange:m,type:"search"})}),w.map((e=>{return mt("div",{className:Zn()({"vm-list-item":!0,"vm-list-item_active":e===u}),onClick:(t=e,()=>{d(t),i.set("groupBy",t),l(i),y()}),children:e},e);var t}))]})})]}),r.current)]})};function to(e){return to="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},to(e)}function no(e){var t=function(e,t){if("object"!=to(e)||!e)return e;var n=e[Symbol.toPrimitive];if(void 0!==n){var r=n.call(e,t||"default");if("object"!=to(r))return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===t?String:Number)(e)}(e,"string");return"symbol"==to(t)?t:t+""}function ro(e,t,n){return(t=no(t))in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function oo(){return{async:!1,breaks:!1,extensions:null,gfm:!0,hooks:null,pedantic:!1,renderer:null,silent:!1,tokenizer:null,walkTokens:null}}let ao={async:!1,breaks:!1,extensions:null,gfm:!0,hooks:null,pedantic:!1,renderer:null,silent:!1,tokenizer:null,walkTokens:null};function io(e){ao=e}const lo=/[&<>"']/,so=new RegExp(lo.source,"g"),co=/[<>"']|&(?!(#\d{1,7}|#[Xx][a-fA-F0-9]{1,6}|\w+);)/,uo=new RegExp(co.source,"g"),ho={"&":"&","<":"<",">":">",'"':""","'":"'"},po=e=>ho[e];function fo(e,t){if(t){if(lo.test(e))return e.replace(so,po)}else if(co.test(e))return e.replace(uo,po);return e}const mo=/(^|[^\[])\^/g;function _o(e,t){let n="string"===typeof e?e:e.source;t=t||"";const r={replace:(e,t)=>{let o="string"===typeof t?t:t.source;return o=o.replace(mo,"$1"),n=n.replace(e,o),r},getRegex:()=>new RegExp(n,t)};return r}function go(e){try{e=encodeURI(e).replace(/%25/g,"%")}catch{return null}return e}const vo={exec:()=>null};function yo(e,t){const n=e.replace(/\|/g,((e,t,n)=>{let r=!1,o=t;for(;--o>=0&&"\\"===n[o];)r=!r;return r?"|":" |"})).split(/ \|/);let r=0;if(n[0].trim()||n.shift(),n.length>0&&!n[n.length-1].trim()&&n.pop(),t)if(n.length>t)n.splice(t);else for(;n.length0)return{type:"space",raw:t[0]}}code(e){const t=this.rules.block.code.exec(e);if(t){const e=t[0].replace(/^(?: {1,4}| {0,3}\t)/gm,"");return{type:"code",raw:t[0],codeBlockStyle:"indented",text:this.options.pedantic?e:bo(e,"\n")}}}fences(e){const t=this.rules.block.fences.exec(e);if(t){const e=t[0],n=function(e,t){const n=e.match(/^(\s+)(?:```)/);if(null===n)return t;const r=n[1];return t.split("\n").map((e=>{const t=e.match(/^\s+/);if(null===t)return e;const[n]=t;return n.length>=r.length?e.slice(r.length):e})).join("\n")}(e,t[3]||"");return{type:"code",raw:e,lang:t[2]?t[2].trim().replace(this.rules.inline.anyPunctuation,"$1"):t[2],text:n}}}heading(e){const t=this.rules.block.heading.exec(e);if(t){let e=t[2].trim();if(/#$/.test(e)){const t=bo(e,"#");this.options.pedantic?e=t.trim():t&&!/ $/.test(t)||(e=t.trim())}return{type:"heading",raw:t[0],depth:t[1].length,text:e,tokens:this.lexer.inline(e)}}}hr(e){const t=this.rules.block.hr.exec(e);if(t)return{type:"hr",raw:bo(t[0],"\n")}}blockquote(e){const t=this.rules.block.blockquote.exec(e);if(t){let e=bo(t[0],"\n").split("\n"),n="",r="";const o=[];for(;e.length>0;){let t=!1;const a=[];let i;for(i=0;i/.test(e[i]))a.push(e[i]),t=!0;else{if(t)break;a.push(e[i])}e=e.slice(i);const l=a.join("\n"),s=l.replace(/\n {0,3}((?:=+|-+) *)(?=\n|$)/g,"\n $1").replace(/^ {0,3}>[ \t]?/gm,"");n=n?"".concat(n,"\n").concat(l):l,r=r?"".concat(r,"\n").concat(s):s;const c=this.lexer.state.top;if(this.lexer.state.top=!0,this.lexer.blockTokens(s,o,!0),this.lexer.state.top=c,0===e.length)break;const u=o[o.length-1];if("code"===(null===u||void 0===u?void 0:u.type))break;if("blockquote"===(null===u||void 0===u?void 0:u.type)){const t=u,a=t.raw+"\n"+e.join("\n"),i=this.blockquote(a);o[o.length-1]=i,n=n.substring(0,n.length-t.raw.length)+i.raw,r=r.substring(0,r.length-t.text.length)+i.text;break}if("list"!==(null===u||void 0===u?void 0:u.type));else{const t=u,a=t.raw+"\n"+e.join("\n"),i=this.list(a);o[o.length-1]=i,n=n.substring(0,n.length-u.raw.length)+i.raw,r=r.substring(0,r.length-t.raw.length)+i.raw,e=a.substring(o[o.length-1].raw.length).split("\n")}}return{type:"blockquote",raw:n,tokens:o,text:r}}}list(e){let t=this.rules.block.list.exec(e);if(t){let n=t[1].trim();const r=n.length>1,o={type:"list",raw:"",ordered:r,start:r?+n.slice(0,-1):"",loose:!1,items:[]};n=r?"\\d{1,9}\\".concat(n.slice(-1)):"\\".concat(n),this.options.pedantic&&(n=r?n:"[*+-]");const a=new RegExp("^( {0,3}".concat(n,")((?:[\t ][^\\n]*)?(?:\\n|$))"));let i=!1;for(;e;){let n=!1,r="",l="";if(!(t=a.exec(e)))break;if(this.rules.block.hr.test(e))break;r=t[0],e=e.substring(r.length);let s=t[2].split("\n",1)[0].replace(/^\t+/,(e=>" ".repeat(3*e.length))),c=e.split("\n",1)[0],u=!s.trim(),d=0;if(this.options.pedantic?(d=2,l=s.trimStart()):u?d=t[1].length+1:(d=t[2].search(/[^ ]/),d=d>4?1:d,l=s.slice(d),d+=t[1].length),u&&/^[ \t]*$/.test(c)&&(r+=c+"\n",e=e.substring(c.length+1),n=!0),!n){const t=new RegExp("^ {0,".concat(Math.min(3,d-1),"}(?:[*+-]|\\d{1,9}[.)])((?:[ \t][^\\n]*)?(?:\\n|$))")),n=new RegExp("^ {0,".concat(Math.min(3,d-1),"}((?:- *){3,}|(?:_ *){3,}|(?:\\* *){3,})(?:\\n+|$)")),o=new RegExp("^ {0,".concat(Math.min(3,d-1),"}(?:```|~~~)")),a=new RegExp("^ {0,".concat(Math.min(3,d-1),"}#")),i=new RegExp("^ {0,".concat(Math.min(3,d-1),"}<[a-z].*>"),"i");for(;e;){const h=e.split("\n",1)[0];let p;if(c=h,this.options.pedantic?(c=c.replace(/^ {1,4}(?=( {4})*[^ ])/g," "),p=c):p=c.replace(/\t/g," "),o.test(c))break;if(a.test(c))break;if(i.test(c))break;if(t.test(c))break;if(n.test(c))break;if(p.search(/[^ ]/)>=d||!c.trim())l+="\n"+p.slice(d);else{if(u)break;if(s.replace(/\t/g," ").search(/[^ ]/)>=4)break;if(o.test(s))break;if(a.test(s))break;if(n.test(s))break;l+="\n"+c}u||c.trim()||(u=!0),r+=h+"\n",e=e.substring(h.length+1),s=p.slice(d)}}o.loose||(i?o.loose=!0:/\n[ \t]*\n[ \t]*$/.test(r)&&(i=!0));let h,p=null;this.options.gfm&&(p=/^\[[ xX]\] /.exec(l),p&&(h="[ ] "!==p[0],l=l.replace(/^\[[ xX]\] +/,""))),o.items.push({type:"list_item",raw:r,task:!!p,checked:h,loose:!1,text:l,tokens:[]}),o.raw+=r}o.items[o.items.length-1].raw=o.items[o.items.length-1].raw.trimEnd(),o.items[o.items.length-1].text=o.items[o.items.length-1].text.trimEnd(),o.raw=o.raw.trimEnd();for(let e=0;e"space"===e.type)),n=t.length>0&&t.some((e=>/\n.*\n/.test(e.raw)));o.loose=n}if(o.loose)for(let e=0;e$/,"$1").replace(this.rules.inline.anyPunctuation,"$1"):"",r=t[3]?t[3].substring(1,t[3].length-1).replace(this.rules.inline.anyPunctuation,"$1"):t[3];return{type:"def",tag:e,raw:t[0],href:n,title:r}}}table(e){const t=this.rules.block.table.exec(e);if(!t)return;if(!/[:|]/.test(t[2]))return;const n=yo(t[1]),r=t[2].replace(/^\||\| *$/g,"").split("|"),o=t[3]&&t[3].trim()?t[3].replace(/\n[ \t]*$/,"").split("\n"):[],a={type:"table",raw:t[0],header:[],align:[],rows:[]};if(n.length===r.length){for(const e of r)/^ *-+: *$/.test(e)?a.align.push("right"):/^ *:-+: *$/.test(e)?a.align.push("center"):/^ *:-+ *$/.test(e)?a.align.push("left"):a.align.push(null);for(let e=0;e({text:e,tokens:this.lexer.inline(e),header:!1,align:a.align[t]}))));return a}}lheading(e){const t=this.rules.block.lheading.exec(e);if(t)return{type:"heading",raw:t[0],depth:"="===t[2].charAt(0)?1:2,text:t[1],tokens:this.lexer.inline(t[1])}}paragraph(e){const t=this.rules.block.paragraph.exec(e);if(t){const e="\n"===t[1].charAt(t[1].length-1)?t[1].slice(0,-1):t[1];return{type:"paragraph",raw:t[0],text:e,tokens:this.lexer.inline(e)}}}text(e){const t=this.rules.block.text.exec(e);if(t)return{type:"text",raw:t[0],text:t[0],tokens:this.lexer.inline(t[0])}}escape(e){const t=this.rules.inline.escape.exec(e);if(t)return{type:"escape",raw:t[0],text:fo(t[1])}}tag(e){const t=this.rules.inline.tag.exec(e);if(t)return!this.lexer.state.inLink&&/^/i.test(t[0])&&(this.lexer.state.inLink=!1),!this.lexer.state.inRawBlock&&/^<(pre|code|kbd|script)(\s|>)/i.test(t[0])?this.lexer.state.inRawBlock=!0:this.lexer.state.inRawBlock&&/^<\/(pre|code|kbd|script)(\s|>)/i.test(t[0])&&(this.lexer.state.inRawBlock=!1),{type:"html",raw:t[0],inLink:this.lexer.state.inLink,inRawBlock:this.lexer.state.inRawBlock,block:!1,text:t[0]}}link(e){const t=this.rules.inline.link.exec(e);if(t){const e=t[2].trim();if(!this.options.pedantic&&/^$/.test(e))return;const t=bo(e.slice(0,-1),"\\");if((e.length-t.length)%2===0)return}else{const e=function(e,t){if(-1===e.indexOf(t[1]))return-1;let n=0;for(let r=0;r-1){const n=(0===t[0].indexOf("!")?5:4)+t[1].length+e;t[2]=t[2].substring(0,e),t[0]=t[0].substring(0,n).trim(),t[3]=""}}let n=t[2],r="";if(this.options.pedantic){const e=/^([^'"]*[^\s])\s+(['"])(.*)\2/.exec(n);e&&(n=e[1],r=e[3])}else r=t[3]?t[3].slice(1,-1):"";return n=n.trim(),/^$/.test(e)?n.slice(1):n.slice(1,-1)),wo(t,{href:n?n.replace(this.rules.inline.anyPunctuation,"$1"):n,title:r?r.replace(this.rules.inline.anyPunctuation,"$1"):r},t[0],this.lexer)}}reflink(e,t){let n;if((n=this.rules.inline.reflink.exec(e))||(n=this.rules.inline.nolink.exec(e))){const e=t[(n[2]||n[1]).replace(/\s+/g," ").toLowerCase()];if(!e){const e=n[0].charAt(0);return{type:"text",raw:e,text:e}}return wo(n,e,n[0],this.lexer)}}emStrong(e,t){let n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:"",r=this.rules.inline.emStrongLDelim.exec(e);if(!r)return;if(r[3]&&n.match(/[\p{L}\p{N}]/u))return;if(!(r[1]||r[2]||"")||!n||this.rules.inline.punctuation.exec(n)){const n=[...r[0]].length-1;let o,a,i=n,l=0;const s="*"===r[0][0]?this.rules.inline.emStrongRDelimAst:this.rules.inline.emStrongRDelimUnd;for(s.lastIndex=0,t=t.slice(-1*e.length+n);null!=(r=s.exec(t));){if(o=r[1]||r[2]||r[3]||r[4]||r[5]||r[6],!o)continue;if(a=[...o].length,r[3]||r[4]){i+=a;continue}if((r[5]||r[6])&&n%3&&!((n+a)%3)){l+=a;continue}if(i-=a,i>0)continue;a=Math.min(a,a+i+l);const t=[...r[0]][0].length,s=e.slice(0,n+r.index+t+a);if(Math.min(n,a)%2){const e=s.slice(1,-1);return{type:"em",raw:s,text:e,tokens:this.lexer.inlineTokens(e)}}const c=s.slice(2,-2);return{type:"strong",raw:s,text:c,tokens:this.lexer.inlineTokens(c)}}}}codespan(e){const t=this.rules.inline.code.exec(e);if(t){let e=t[2].replace(/\n/g," ");const n=/[^ ]/.test(e),r=/^ /.test(e)&&/ $/.test(e);return n&&r&&(e=e.substring(1,e.length-1)),e=fo(e,!0),{type:"codespan",raw:t[0],text:e}}}br(e){const t=this.rules.inline.br.exec(e);if(t)return{type:"br",raw:t[0]}}del(e){const t=this.rules.inline.del.exec(e);if(t)return{type:"del",raw:t[0],text:t[2],tokens:this.lexer.inlineTokens(t[2])}}autolink(e){const t=this.rules.inline.autolink.exec(e);if(t){let e,n;return"@"===t[2]?(e=fo(t[1]),n="mailto:"+e):(e=fo(t[1]),n=e),{type:"link",raw:t[0],text:e,href:n,tokens:[{type:"text",raw:e,text:e}]}}}url(e){let t;if(t=this.rules.inline.url.exec(e)){let e,o;if("@"===t[2])e=fo(t[0]),o="mailto:"+e;else{let a;do{var n,r;a=t[0],t[0]=null!==(n=null===(r=this.rules.inline._backpedal.exec(t[0]))||void 0===r?void 0:r[0])&&void 0!==n?n:""}while(a!==t[0]);e=fo(t[0]),o="www."===t[1]?"http://"+t[0]:t[0]}return{type:"link",raw:t[0],text:e,href:o,tokens:[{type:"text",raw:e,text:e}]}}}inlineText(e){const t=this.rules.inline.text.exec(e);if(t){let e;return e=this.lexer.state.inRawBlock?t[0]:fo(t[0]),{type:"text",raw:t[0],text:e}}}}const xo=/^ {0,3}((?:-[\t ]*){3,}|(?:_[ \t]*){3,}|(?:\*[ \t]*){3,})(?:\n+|$)/,So=/(?:[*+-]|\d{1,9}[.)])/,Ao=_o(/^(?!bull |blockCode|fences|blockquote|heading|html)((?:.|\n(?!\s*?\n|bull |blockCode|fences|blockquote|heading|html))+?)\n {0,3}(=+|-+) *(?:\n+|$)/).replace(/bull/g,So).replace(/blockCode/g,/(?: {4}| {0,3}\t)/).replace(/fences/g,/ {0,3}(?:`{3,}|~{3,})/).replace(/blockquote/g,/ {0,3}>/).replace(/heading/g,/ {0,3}#{1,6}/).replace(/html/g,/ {0,3}<[^\n>]+>\n/).getRegex(),Eo=/^([^\n]+(?:\n(?!hr|heading|lheading|blockquote|fences|list|html|table| +\n)[^\n]+)*)/,Co=/(?!\s*\])(?:\\.|[^\[\]\\])+/,Mo=_o(/^ {0,3}\[(label)\]: *(?:\n[ \t]*)?([^<\s][^\s]*|<.*?>)(?:(?: +(?:\n[ \t]*)?| *\n[ \t]*)(title))? *(?:\n+|$)/).replace("label",Co).replace("title",/(?:"(?:\\"?|[^"\\])*"|'[^'\n]*(?:\n[^'\n]+)*\n?'|\([^()]*\))/).getRegex(),No=_o(/^( {0,3}bull)([ \t][^\n]+?)?(?:\n|$)/).replace(/bull/g,So).getRegex(),To="address|article|aside|base|basefont|blockquote|body|caption|center|col|colgroup|dd|details|dialog|dir|div|dl|dt|fieldset|figcaption|figure|footer|form|frame|frameset|h[1-6]|head|header|hr|html|iframe|legend|li|link|main|menu|menuitem|meta|nav|noframes|ol|optgroup|option|p|param|search|section|summary|table|tbody|td|tfoot|th|thead|title|tr|track|ul",Po=/|$))/,Do=_o("^ {0,3}(?:<(script|pre|style|textarea)[\\s>][\\s\\S]*?(?:[^\\n]*\\n+|$)|comment[^\\n]*(\\n+|$)|<\\?[\\s\\S]*?(?:\\?>\\n*|$)|\\n*|$)|\\n*|$)|)[\\s\\S]*?(?:(?:\\n[ \t]*)+\\n|$)|<(?!script|pre|style|textarea)([a-z][\\w-]*)(?:attribute)*? */?>(?=[ \\t]*(?:\\n|$))[\\s\\S]*?(?:(?:\\n[ \t]*)+\\n|$)|(?=[ \\t]*(?:\\n|$))[\\s\\S]*?(?:(?:\\n[ \t]*)+\\n|$))","i").replace("comment",Po).replace("tag",To).replace("attribute",/ +[a-zA-Z:_][\w.:-]*(?: *= *"[^"\n]*"| *= *'[^'\n]*'| *= *[^\s"'=<>`]+)?/).getRegex(),Oo=_o(Eo).replace("hr",xo).replace("heading"," {0,3}#{1,6}(?:\\s|$)").replace("|lheading","").replace("|table","").replace("blockquote"," {0,3}>").replace("fences"," {0,3}(?:`{3,}(?=[^`\\n]*\\n)|~{3,})[^\\n]*\\n").replace("list"," {0,3}(?:[*+-]|1[.)]) ").replace("html",")|<(?:script|pre|style|textarea|!--)").replace("tag",To).getRegex(),Lo={blockquote:_o(/^( {0,3}> ?(paragraph|[^\n]*)(?:\n|$))+/).replace("paragraph",Oo).getRegex(),code:/^((?: {4}| {0,3}\t)[^\n]+(?:\n(?:[ \t]*(?:\n|$))*)?)+/,def:Mo,fences:/^ {0,3}(`{3,}(?=[^`\n]*(?:\n|$))|~{3,})([^\n]*)(?:\n|$)(?:|([\s\S]*?)(?:\n|$))(?: {0,3}\1[~`]* *(?=\n|$)|$)/,heading:/^ {0,3}(#{1,6})(?=\s|$)(.*)(?:\n+|$)/,hr:xo,html:Do,lheading:Ao,list:No,newline:/^(?:[ \t]*(?:\n|$))+/,paragraph:Oo,table:vo,text:/^[^\n]+/},Ro=_o("^ *([^\\n ].*)\\n {0,3}((?:\\| *)?:?-+:? *(?:\\| *:?-+:? *)*(?:\\| *)?)(?:\\n((?:(?! *\\n|hr|heading|blockquote|code|fences|list|html).*(?:\\n|$))*)\\n*|$)").replace("hr",xo).replace("heading"," {0,3}#{1,6}(?:\\s|$)").replace("blockquote"," {0,3}>").replace("code","(?: {4}| {0,3}\t)[^\\n]").replace("fences"," {0,3}(?:`{3,}(?=[^`\\n]*\\n)|~{3,})[^\\n]*\\n").replace("list"," {0,3}(?:[*+-]|1[.)]) ").replace("html",")|<(?:script|pre|style|textarea|!--)").replace("tag",To).getRegex(),Io={...Lo,table:Ro,paragraph:_o(Eo).replace("hr",xo).replace("heading"," {0,3}#{1,6}(?:\\s|$)").replace("|lheading","").replace("table",Ro).replace("blockquote"," {0,3}>").replace("fences"," {0,3}(?:`{3,}(?=[^`\\n]*\\n)|~{3,})[^\\n]*\\n").replace("list"," {0,3}(?:[*+-]|1[.)]) ").replace("html",")|<(?:script|pre|style|textarea|!--)").replace("tag",To).getRegex()},zo={...Lo,html:_o("^ *(?:comment *(?:\\n|\\s*$)|<(tag)[\\s\\S]+? *(?:\\n{2,}|\\s*$)|\\s]*)*?/?> *(?:\\n{2,}|\\s*$))").replace("comment",Po).replace(/tag/g,"(?!(?:a|em|strong|small|s|cite|q|dfn|abbr|data|time|code|var|samp|kbd|sub|sup|i|b|u|mark|ruby|rt|rp|bdi|bdo|span|br|wbr|ins|del|img)\\b)\\w+(?!:|[^\\w\\s@]*@)\\b").getRegex(),def:/^ *\[([^\]]+)\]: *]+)>?(?: +(["(][^\n]+[")]))? *(?:\n+|$)/,heading:/^(#{1,6})(.*)(?:\n+|$)/,fences:vo,lheading:/^(.+?)\n {0,3}(=+|-+) *(?:\n+|$)/,paragraph:_o(Eo).replace("hr",xo).replace("heading"," *#{1,6} *[^\n]").replace("lheading",Ao).replace("|table","").replace("blockquote"," {0,3}>").replace("|fences","").replace("|list","").replace("|html","").replace("|tag","").getRegex()},jo=/^\\([!"#$%&'()*+,\-./:;<=>?@\[\]\\^_`{|}~])/,$o=/^( {2,}|\\)\n(?!\s*$)/,Fo="\\p{P}\\p{S}",Ho=_o(/^((?![*_])[\spunctuation])/,"u").replace(/punctuation/g,Fo).getRegex(),Vo=_o(/^(?:\*+(?:((?!\*)[punct])|[^\s*]))|^_+(?:((?!_)[punct])|([^\s_]))/,"u").replace(/punct/g,Fo).getRegex(),Bo=_o("^[^_*]*?__[^_*]*?\\*[^_*]*?(?=__)|[^*]+(?=[^*])|(?!\\*)[punct](\\*+)(?=[\\s]|$)|[^punct\\s](\\*+)(?!\\*)(?=[punct\\s]|$)|(?!\\*)[punct\\s](\\*+)(?=[^punct\\s])|[\\s](\\*+)(?!\\*)(?=[punct])|(?!\\*)[punct](\\*+)(?!\\*)(?=[punct])|[^punct\\s](\\*+)(?=[^punct\\s])","gu").replace(/punct/g,Fo).getRegex(),Uo=_o("^[^_*]*?\\*\\*[^_*]*?_[^_*]*?(?=\\*\\*)|[^_]+(?=[^_])|(?!_)[punct](_+)(?=[\\s]|$)|[^punct\\s](_+)(?!_)(?=[punct\\s]|$)|(?!_)[punct\\s](_+)(?=[^punct\\s])|[\\s](_+)(?!_)(?=[punct])|(?!_)[punct](_+)(?!_)(?=[punct])","gu").replace(/punct/g,Fo).getRegex(),Yo=_o(/\\([punct])/,"gu").replace(/punct/g,Fo).getRegex(),Wo=_o(/^<(scheme:[^\s\x00-\x1f<>]*|email)>/).replace("scheme",/[a-zA-Z][a-zA-Z0-9+.-]{1,31}/).replace("email",/[a-zA-Z0-9.!#$%&'*+/=?^_`{|}~-]+(@)[a-zA-Z0-9](?:[a-zA-Z0-9-]{0,61}[a-zA-Z0-9])?(?:\.[a-zA-Z0-9](?:[a-zA-Z0-9-]{0,61}[a-zA-Z0-9])?)+(?![-_])/).getRegex(),qo=_o(Po).replace("(?:--\x3e|$)","--\x3e").getRegex(),Ko=_o("^comment|^|^<[a-zA-Z][\\w-]*(?:attribute)*?\\s*/?>|^<\\?[\\s\\S]*?\\?>|^|^").replace("comment",qo).replace("attribute",/\s+[a-zA-Z:_][\w.:-]*(?:\s*=\s*"[^"]*"|\s*=\s*'[^']*'|\s*=\s*[^\s"'=<>`]+)?/).getRegex(),Zo=/(?:\[(?:\\.|[^\[\]\\])*\]|\\.|`[^`]*`|[^\[\]\\`])*?/,Go=_o(/^!?\[(label)\]\(\s*(href)(?:\s+(title))?\s*\)/).replace("label",Zo).replace("href",/<(?:\\.|[^\n<>\\])+>|[^\s\x00-\x1f]*/).replace("title",/"(?:\\"?|[^"\\])*"|'(?:\\'?|[^'\\])*'|\((?:\\\)?|[^)\\])*\)/).getRegex(),Qo=_o(/^!?\[(label)\]\[(ref)\]/).replace("label",Zo).replace("ref",Co).getRegex(),Jo=_o(/^!?\[(ref)\](?:\[\])?/).replace("ref",Co).getRegex(),Xo={_backpedal:vo,anyPunctuation:Yo,autolink:Wo,blockSkip:/\[[^[\]]*?\]\([^\(\)]*?\)|`[^`]*?`|<[^<>]*?>/g,br:$o,code:/^(`+)([^`]|[^`][\s\S]*?[^`])\1(?!`)/,del:vo,emStrongLDelim:Vo,emStrongRDelimAst:Bo,emStrongRDelimUnd:Uo,escape:jo,link:Go,nolink:Jo,punctuation:Ho,reflink:Qo,reflinkSearch:_o("reflink|nolink(?!\\()","g").replace("reflink",Qo).replace("nolink",Jo).getRegex(),tag:Ko,text:/^(`+|[^`])(?:(?= {2,}\n)|[\s\S]*?(?:(?=[\\1&&void 0!==arguments[1]?arguments[1]:[],a=arguments.length>2&&void 0!==arguments[2]&&arguments[2];for(this.options.pedantic&&(e=e.replace(/\t/g," ").replace(/^ +$/gm,""));e;)if(!(this.options.extensions&&this.options.extensions.block&&this.options.extensions.block.some((n=>!!(t=n.call({lexer:this},e,o))&&(e=e.substring(t.raw.length),o.push(t),!0)))))if(t=this.tokenizer.space(e))e=e.substring(t.raw.length),1===t.raw.length&&o.length>0?o[o.length-1].raw+="\n":o.push(t);else if(t=this.tokenizer.code(e))e=e.substring(t.raw.length),n=o[o.length-1],!n||"paragraph"!==n.type&&"text"!==n.type?o.push(t):(n.raw+="\n"+t.raw,n.text+="\n"+t.text,this.inlineQueue[this.inlineQueue.length-1].src=n.text);else if(t=this.tokenizer.fences(e))e=e.substring(t.raw.length),o.push(t);else if(t=this.tokenizer.heading(e))e=e.substring(t.raw.length),o.push(t);else if(t=this.tokenizer.hr(e))e=e.substring(t.raw.length),o.push(t);else if(t=this.tokenizer.blockquote(e))e=e.substring(t.raw.length),o.push(t);else if(t=this.tokenizer.list(e))e=e.substring(t.raw.length),o.push(t);else if(t=this.tokenizer.html(e))e=e.substring(t.raw.length),o.push(t);else if(t=this.tokenizer.def(e))e=e.substring(t.raw.length),n=o[o.length-1],!n||"paragraph"!==n.type&&"text"!==n.type?this.tokens.links[t.tag]||(this.tokens.links[t.tag]={href:t.href,title:t.title}):(n.raw+="\n"+t.raw,n.text+="\n"+t.raw,this.inlineQueue[this.inlineQueue.length-1].src=n.text);else if(t=this.tokenizer.table(e))e=e.substring(t.raw.length),o.push(t);else if(t=this.tokenizer.lheading(e))e=e.substring(t.raw.length),o.push(t);else{if(r=e,this.options.extensions&&this.options.extensions.startBlock){let t=1/0;const n=e.slice(1);let o;this.options.extensions.startBlock.forEach((e=>{o=e.call({lexer:this},n),"number"===typeof o&&o>=0&&(t=Math.min(t,o))})),t<1/0&&t>=0&&(r=e.substring(0,t+1))}var i;if(this.state.top&&(t=this.tokenizer.paragraph(r)))n=o[o.length-1],a&&"paragraph"===(null===(i=n)||void 0===i?void 0:i.type)?(n.raw+="\n"+t.raw,n.text+="\n"+t.text,this.inlineQueue.pop(),this.inlineQueue[this.inlineQueue.length-1].src=n.text):o.push(t),a=r.length!==e.length,e=e.substring(t.raw.length);else if(t=this.tokenizer.text(e))e=e.substring(t.raw.length),n=o[o.length-1],n&&"text"===n.type?(n.raw+="\n"+t.raw,n.text+="\n"+t.text,this.inlineQueue.pop(),this.inlineQueue[this.inlineQueue.length-1].src=n.text):o.push(t);else if(e){const t="Infinite loop on byte: "+e.charCodeAt(0);if(this.options.silent){console.error(t);break}throw new Error(t)}}return this.state.top=!0,o}inline(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:[];return this.inlineQueue.push({src:e,tokens:t}),t}inlineTokens(e){let t,n,r,o,a,i,l=arguments.length>1&&void 0!==arguments[1]?arguments[1]:[],s=e;if(this.tokens.links){const e=Object.keys(this.tokens.links);if(e.length>0)for(;null!=(o=this.tokenizer.rules.inline.reflinkSearch.exec(s));)e.includes(o[0].slice(o[0].lastIndexOf("[")+1,-1))&&(s=s.slice(0,o.index)+"["+"a".repeat(o[0].length-2)+"]"+s.slice(this.tokenizer.rules.inline.reflinkSearch.lastIndex))}for(;null!=(o=this.tokenizer.rules.inline.blockSkip.exec(s));)s=s.slice(0,o.index)+"["+"a".repeat(o[0].length-2)+"]"+s.slice(this.tokenizer.rules.inline.blockSkip.lastIndex);for(;null!=(o=this.tokenizer.rules.inline.anyPunctuation.exec(s));)s=s.slice(0,o.index)+"++"+s.slice(this.tokenizer.rules.inline.anyPunctuation.lastIndex);for(;e;)if(a||(i=""),a=!1,!(this.options.extensions&&this.options.extensions.inline&&this.options.extensions.inline.some((n=>!!(t=n.call({lexer:this},e,l))&&(e=e.substring(t.raw.length),l.push(t),!0)))))if(t=this.tokenizer.escape(e))e=e.substring(t.raw.length),l.push(t);else if(t=this.tokenizer.tag(e))e=e.substring(t.raw.length),n=l[l.length-1],n&&"text"===t.type&&"text"===n.type?(n.raw+=t.raw,n.text+=t.text):l.push(t);else if(t=this.tokenizer.link(e))e=e.substring(t.raw.length),l.push(t);else if(t=this.tokenizer.reflink(e,this.tokens.links))e=e.substring(t.raw.length),n=l[l.length-1],n&&"text"===t.type&&"text"===n.type?(n.raw+=t.raw,n.text+=t.text):l.push(t);else if(t=this.tokenizer.emStrong(e,s,i))e=e.substring(t.raw.length),l.push(t);else if(t=this.tokenizer.codespan(e))e=e.substring(t.raw.length),l.push(t);else if(t=this.tokenizer.br(e))e=e.substring(t.raw.length),l.push(t);else if(t=this.tokenizer.del(e))e=e.substring(t.raw.length),l.push(t);else if(t=this.tokenizer.autolink(e))e=e.substring(t.raw.length),l.push(t);else if(this.state.inLink||!(t=this.tokenizer.url(e))){if(r=e,this.options.extensions&&this.options.extensions.startInline){let t=1/0;const n=e.slice(1);let o;this.options.extensions.startInline.forEach((e=>{o=e.call({lexer:this},n),"number"===typeof o&&o>=0&&(t=Math.min(t,o))})),t<1/0&&t>=0&&(r=e.substring(0,t+1))}if(t=this.tokenizer.inlineText(r))e=e.substring(t.raw.length),"_"!==t.raw.slice(-1)&&(i=t.raw.slice(-1)),a=!0,n=l[l.length-1],n&&"text"===n.type?(n.raw+=t.raw,n.text+=t.text):l.push(t);else if(e){const t="Infinite loop on byte: "+e.charCodeAt(0);if(this.options.silent){console.error(t);break}throw new Error(t)}}else e=e.substring(t.raw.length),l.push(t);return l}}class ia{constructor(e){ro(this,"options",void 0),ro(this,"parser",void 0),this.options=e||ao}space(e){return""}code(e){var t;let{text:n,lang:r,escaped:o}=e;const a=null===(t=(r||"").match(/^\S*/))||void 0===t?void 0:t[0],i=n.replace(/\n$/,"")+"\n";return a?'
'+(o?i:fo(i,!0))+"
\n":"
"+(o?i:fo(i,!0))+"
\n"}blockquote(e){let{tokens:t}=e;const n=this.parser.parse(t);return"
\n".concat(n,"
\n")}html(e){let{text:t}=e;return t}heading(e){let{tokens:t,depth:n}=e;return"").concat(this.parser.parseInline(t),"\n")}hr(e){return"
\n"}list(e){const t=e.ordered,n=e.start;let r="";for(let a=0;a\n"+r+"\n"}listitem(e){let t="";if(e.task){const n=this.checkbox({checked:!!e.checked});e.loose?e.tokens.length>0&&"paragraph"===e.tokens[0].type?(e.tokens[0].text=n+" "+e.tokens[0].text,e.tokens[0].tokens&&e.tokens[0].tokens.length>0&&"text"===e.tokens[0].tokens[0].type&&(e.tokens[0].tokens[0].text=n+" "+e.tokens[0].tokens[0].text)):e.tokens.unshift({type:"text",raw:n+" ",text:n+" "}):t+=n+" "}return t+=this.parser.parse(e.tokens,!!e.loose),"
  • ".concat(t,"
  • \n")}checkbox(e){let{checked:t}=e;return"'}paragraph(e){let{tokens:t}=e;return"

    ".concat(this.parser.parseInline(t),"

    \n")}table(e){let t="",n="";for(let o=0;o")),"\n\n"+t+"\n"+r+"
    \n"}tablerow(e){let{text:t}=e;return"\n".concat(t,"\n")}tablecell(e){const t=this.parser.parseInline(e.tokens),n=e.header?"th":"td";return(e.align?"<".concat(n,' align="').concat(e.align,'">'):"<".concat(n,">"))+t+"\n")}strong(e){let{tokens:t}=e;return"".concat(this.parser.parseInline(t),"")}em(e){let{tokens:t}=e;return"".concat(this.parser.parseInline(t),"")}codespan(e){let{text:t}=e;return"".concat(t,"")}br(e){return"
    "}del(e){let{tokens:t}=e;return"".concat(this.parser.parseInline(t),"")}link(e){let{href:t,title:n,tokens:r}=e;const o=this.parser.parseInline(r),a=go(t);if(null===a)return o;t=a;let i='
    ",i}image(e){let{href:t,title:n,text:r}=e;const o=go(t);if(null===o)return r;t=o;let a='').concat(r,'1&&void 0!==arguments[1])||arguments[1],n="";for(let r=0;r{const o=e[r].flat(1/0);n=n.concat(this.walkTokens(o,t))})):e.tokens&&(n=n.concat(this.walkTokens(e.tokens,t)))}}return n}use(){const e=this.defaults.extensions||{renderers:{},childTokens:{}};for(var t=arguments.length,n=new Array(t),r=0;r{const n={...t};if(n.async=this.defaults.async||n.async||!1,t.extensions&&(t.extensions.forEach((t=>{if(!t.name)throw new Error("extension name required");if("renderer"in t){const n=e.renderers[t.name];e.renderers[t.name]=n?function(){for(var e=arguments.length,r=new Array(e),o=0;o{if(this.defaults.async)return Promise.resolve(o.call(e,t)).then((t=>a.call(e,t)));const n=o.call(e,t);return a.call(e,n)}:e[r]=function(){for(var t=arguments.length,n=new Array(t),r=0;r{const r={...n},o={...this.defaults,...r},a=this.onError(!!o.silent,!!o.async);if(!0===this.defaults.async&&!1===r.async)return a(new Error("marked(): The async option was set to true by an extension. Remove async: false from the parse options object to return a Promise."));if("undefined"===typeof t||null===t)return a(new Error("marked(): input parameter is undefined or null"));if("string"!==typeof t)return a(new Error("marked(): input parameter is of type "+Object.prototype.toString.call(t)+", string expected"));o.hooks&&(o.hooks.options=o,o.hooks.block=e);const i=o.hooks?o.hooks.provideLexer():e?aa.lex:aa.lexInline,l=o.hooks?o.hooks.provideParser():e?sa.parse:sa.parseInline;if(o.async)return Promise.resolve(o.hooks?o.hooks.preprocess(t):t).then((e=>i(e,o))).then((e=>o.hooks?o.hooks.processAllTokens(e):e)).then((e=>o.walkTokens?Promise.all(this.walkTokens(e,o.walkTokens)).then((()=>e)):e)).then((e=>l(e,o))).then((e=>o.hooks?o.hooks.postprocess(e):e)).catch(a);try{o.hooks&&(t=o.hooks.preprocess(t));let e=i(t,o);o.hooks&&(e=o.hooks.processAllTokens(e)),o.walkTokens&&this.walkTokens(e,o.walkTokens);let n=l(e,o);return o.hooks&&(n=o.hooks.postprocess(n)),n}catch(Fd){return a(Fd)}}}onError(e,t){return n=>{if(n.message+="\nPlease report this to https://github.com/markedjs/marked.",e){const e="

    An error occurred:

    "+fo(n.message+"",!0)+"
    ";return t?Promise.resolve(e):e}if(t)return Promise.reject(n);throw n}}};function da(e,t){return ua.parse(e,t)}da.options=da.setOptions=function(e){return ua.setOptions(e),da.defaults=ua.defaults,io(da.defaults),da},da.getDefaults=oo,da.defaults=ao,da.use=function(){return ua.use(...arguments),da.defaults=ua.defaults,io(da.defaults),da},da.walkTokens=function(e,t){return ua.walkTokens(e,t)},da.parseInline=ua.parseInline,da.Parser=sa,da.parser=sa.parse,da.Renderer=ia,da.TextRenderer=la,da.Lexer=aa,da.lexer=aa.lex,da.Tokenizer=ko,da.Hooks=ca,da.parse=da;da.options,da.setOptions,da.use,da.walkTokens,da.parseInline,sa.parse,aa.lex;var ha=function(e){return e.group="group",e.table="table",e.json="json",e}(ha||{});const pa=[{label:"Group",value:ha.group,icon:mt(Fn,{})},{label:"Table",value:ha.table,icon:mt(Nn,{})},{label:"JSON",value:ha.json,icon:mt(Tn,{})}],fa=e=>{let{data:n}=e;const{isMobile:r}=vr(),{timezone:a}=Gt(),{setSearchParamsFromKeys:i}=Lr(),l=(0,t.useRef)(null),[s,c]=Or(ha.group,"view"),[u,d]=(0,t.useState)([]),{value:h,toggle:p}=jr(!1),f=(0,t.useMemo)((()=>n.map((e=>({...e,_vmui_time:e._time?o()(e._time).tz().format("".concat(wt,".SSS")):"",_vmui_data:JSON.stringify(e,null,2),_vmui_markdown:e._msg?da(e._msg.replace(/```/g,"\n```\n")):""})))),[n,a]),m=(0,t.useMemo)((()=>{if(null===f||void 0===f||!f.length)return[];const e=["_vmui_data","_vmui_time","_vmui_markdown"],t=new Set;for(const n of f)for(const e in n)t.add(e);return Array.from(t).filter((t=>!e.includes(t)))}),[f]);return mt("div",{className:Zn()({"vm-explore-logs-body":!0,"vm-block":!0,"vm-block_mobile":r}),children:[mt("div",{className:Zn()({"vm-explore-logs-body-header":!0,"vm-section-header":!0,"vm-explore-logs-body-header_mobile":r}),children:[mt("div",{className:"vm-section-header__tabs",children:[mt(er,{activeItem:String(s),items:pa,onChange:e=>{c(e),i({view:e})}}),mt("div",{className:"vm-explore-logs-body-header__log-info",children:["Total logs returned: ",mt("b",{children:n.length})]})]}),s===ha.table&&mt("div",{className:"vm-explore-logs-body-header__settings",children:mt(Br,{columns:m,selectedColumns:u,onChangeColumns:d,tableCompact:h,toggleTableCompact:p})}),s===ha.group&&mt("div",{className:"vm-explore-logs-body-header__settings",ref:l})]}),mt("div",{className:Zn()({"vm-explore-logs-body__table":!0,"vm-explore-logs-body__table_mobile":r}),children:[!n.length&&mt("div",{className:"vm-explore-logs-body__empty",children:"No logs found"}),!!n.length&&mt(pt.FK,{children:[s===ha.table&&mt(qr,{logs:f,displayColumns:u,tableCompact:h,columns:m}),s===ha.group&&mt(eo,{logs:f,columns:m,settingsRef:l}),s===ha.json&&mt(Dr,{data:n})]})]})]})},ma=(e,n,r)=>{const[a]=$e(),[i,l]=(0,t.useState)([]),[s,c]=(0,t.useState)([]),[u,d]=(0,t.useState)(),h=(0,t.useRef)(new AbortController),p=(0,t.useMemo)((()=>(e=>"".concat(e,"/select/logsql/query"))(e)),[e]),f=e=>{try{return JSON.parse(e)}catch(Fd){return null}},m=(0,t.useCallback)((async e=>{h.current.abort(),h.current=new AbortController;const{signal:t}=h.current,i=Date.now();c((e=>({...e,[i]:!0}))),d(void 0);try{const s=((e,t,n,r)=>({signal:r,method:"POST",headers:{Accept:"application/stream+json",AccountID:a.get("accountID")||"0",ProjectID:a.get("projectID")||"0"},body:new URLSearchParams({query:e.trim(),limit:"".concat(n),start:o()(1e3*t.start).tz().toISOString(),end:o()(1e3*t.end).tz().toISOString()})}))(n,e,r,t),u=await fetch(p,s),h=await u.text();if(!u.ok||!u.body)return d(h),l([]),c((e=>({...e,[i]:!1}))),!1;const m=h.split("\n").filter((e=>e)).slice(0,r).map(f).filter((e=>e));return l(m),c((e=>({...e,[i]:!1}))),!0}catch(Fd){return c((e=>({...e,[i]:!1}))),Fd instanceof Error&&"AbortError"!==Fd.name&&(d(String(Fd)),console.error(Fd),l([])),!1}}),[p,n,r,a]);return{logs:i,isLoading:Object.values(s).some((e=>e)),error:u,fetchLogs:m}},_a=e=>{let{containerStyles:t,message:n}=e;const{isDarkTheme:r}=gt();return mt("div",{className:Zn()({"vm-spinner":!0,"vm-spinner_dark":r}),style:t,children:[mt("div",{className:"half-circle-spinner",children:[mt("div",{className:"circle circle-1"}),mt("div",{className:"circle circle-2"})]}),n&&mt("div",{className:"vm-spinner__message",children:n})]})};var ga=function(e){return e[e.mouse=0]="mouse",e[e.keyboard=1]="keyboard",e}(ga||{});const va=e=>{var n;let{value:r,options:o,anchor:a,disabled:i,minLength:l=2,fullWidth:s,selected:c,noOptionsText:u,label:d,disabledFullScreen:h,offset:p,maxDisplayResults:f,loading:m,onSelect:_,onOpenAutocomplete:g,onFoundOptions:v,onChangeWrapperRef:y}=e;const{isMobile:b}=vr(),w=(0,t.useRef)(null),[k,x]=(0,t.useState)({index:-1}),[S,A]=(0,t.useState)(""),[E,C]=(0,t.useState)(0),{value:M,setValue:N,setFalse:T}=jr(!1),P=(0,t.useMemo)((()=>{if(!M)return[];try{const e=new RegExp(String(r.trim()),"i"),t=o.filter((t=>e.test(t.value))).sort(((t,n)=>{var o,a;return t.value.toLowerCase()===r.trim().toLowerCase()?-1:n.value.toLowerCase()===r.trim().toLowerCase()?1:((null===(o=t.value.match(e))||void 0===o?void 0:o.index)||0)-((null===(a=n.value.match(e))||void 0===a?void 0:a.index)||0)}));return C(t.length),A(t.length>Number(null===f||void 0===f?void 0:f.limit)&&(null===f||void 0===f?void 0:f.message)||""),null!==f&&void 0!==f&&f.limit?t.slice(0,f.limit):t}catch(Fd){return[]}}),[M,o,r]),D=(0,t.useMemo)((()=>{var e;return 1===P.length&&(null===(e=P[0])||void 0===e?void 0:e.value)===r}),[P]),O=(0,t.useMemo)((()=>u&&!P.length),[u,P]),L=()=>{x({index:-1})},R=(0,t.useCallback)((e=>{const{key:t,ctrlKey:n,metaKey:r,shiftKey:o}=e,a=n||r||o,i=P.length&&!D;if("ArrowUp"===t&&!a&&i&&(e.preventDefault(),x((e=>{let{index:t}=e;return{index:t<=0?0:t-1,type:ga.keyboard}}))),"ArrowDown"===t&&!a&&i){e.preventDefault();const t=P.length-1;x((e=>{let{index:n}=e;return{index:n>=t?t:n+1,type:ga.keyboard}}))}if("Enter"===t){const e=P[k.index];e&&_(e.value),c||T()}"Escape"===t&&T()}),[k,P,D,T,_,c]);return(0,t.useEffect)((()=>{N(r.length>=l)}),[r,o]),Jn("keydown",R),(0,t.useEffect)((()=>{if(!w.current||k.type===ga.mouse)return;const e=w.current.childNodes[k.index];null!==e&&void 0!==e&&e.scrollIntoView&&e.scrollIntoView({block:"center"})}),[k,P]),(0,t.useEffect)((()=>{x({index:-1})}),[P]),(0,t.useEffect)((()=>{g&&g(M)}),[M]),(0,t.useEffect)((()=>{v&&v(D?[]:P)}),[P,D]),(0,t.useEffect)((()=>{y&&y(w)}),[w]),mt(Qr,{open:M,buttonRef:a,placement:"bottom-left",onClose:T,fullWidth:s,title:b?d:void 0,disabledFullScreen:h,offset:p,children:[mt("div",{className:Zn()({"vm-autocomplete":!0,"vm-autocomplete_mobile":b&&!h}),ref:w,children:[m&&mt("div",{className:"vm-autocomplete__loader",children:[mt(bn,{}),mt("span",{children:"Loading..."})]}),O&&mt("div",{className:"vm-autocomplete__no-options",children:u}),!D&&P.map(((e,t)=>{return mt("div",{className:Zn()({"vm-list-item":!0,"vm-list-item_mobile":b,"vm-list-item_active":t===k.index,"vm-list-item_multiselect":c,"vm-list-item_multiselect_selected":null===c||void 0===c?void 0:c.includes(e.value),"vm-list-item_with-icon":e.icon}),id:"$autocomplete$".concat(e.value),onClick:(r=e.value,()=>{i||(_(r),c||T())}),onMouseEnter:(n=t,()=>{x({index:n,type:ga.mouse})}),onMouseLeave:L,children:[(null===c||void 0===c?void 0:c.includes(e.value))&&mt(Pn,{}),mt(pt.FK,{children:e.icon}),mt("span",{children:e.value})]},"".concat(t).concat(e.value));var n,r}))]}),S&&mt("div",{className:"vm-autocomplete-message",children:["Shown ",null===f||void 0===f?void 0:f.limit," results out of ",E,". ",S]}),(null===(n=P[k.index])||void 0===n?void 0:n.description)&&mt("div",{className:"vm-autocomplete-info",children:[mt("div",{className:"vm-autocomplete-info__type",children:P[k.index].type}),mt("div",{className:"vm-autocomplete-info__description",dangerouslySetInnerHTML:{__html:P[k.index].description||""}})]})]})};var ya=n(267),ba=n.n(ya);const wa=e=>e.replace(/[/\-\\^$*+?.()|[\]{}]/g,"\\$&"),ka=e=>JSON.stringify(e).slice(1,-1),xa=e=>{const t=e.match(/["`']/g);return!!t&&t.length%2!==0};var Sa=function(e){return e.metric="metric",e.label="label",e.labelValue="labelValue",e}(Sa||{});const Aa={[Sa.metric]:mt(Hn,{}),[Sa.label]:mt(Bn,{}),[Sa.labelValue]:mt(Un,{})},Ea=n.p+"static/media/MetricsQL.a00044c91d9781cf8557.md",Ca=e=>{const t='$1 target="_blank" class="'.concat("vm-link vm-link_colored",'" $2').concat("https://docs.victoriametrics.com/MetricsQL.html","#");return e.replace(/({var n;const r="h3"===e.tagName.toLowerCase();return t=r?null!==(n=e.textContent)&&void 0!==n?n:"":t,r?null:((e,t)=>{var n;const r=null!==(n=t.textContent)&&void 0!==n?n:"",o=(e=>{const t=[];let n=e.nextElementSibling;for(;n&&"p"===n.tagName.toLowerCase();)n&&t.push(n),n=n.nextElementSibling;return t})(t).map((e=>{var t;return null!==(t=e.outerHTML)&&void 0!==t?t:""})).join("\n");return{type:e,value:r,description:Ca(o),icon:mt(Vn,{})}})(t,e)})).filter(Boolean)},Na=()=>{const{metricsQLFunctions:e}=ln(),n=sn();return(0,t.useEffect)((()=>{e.length||(async()=>{try{const e=await fetch(Ea),t=(e=>{const t=document.createElement("div");t.innerHTML=da(e);const n=t.querySelectorAll("".concat("h3",", ").concat("h4"));return Ma(n)})(await e.text());n({type:"SET_METRICSQL_FUNCTIONS",payload:t})}catch(Fd){console.error("Error fetching or processing the MetricsQL.md file:",Fd)}})()}),[]),e},Ta=e=>{let{value:n,anchorEl:r,caretPosition:a,hasHelperText:i,onSelect:l,onFoundOptions:s}=e;const[c,u]=(0,t.useState)({top:0,left:0}),d=Na(),h=(0,t.useMemo)((()=>{if(a[0]!==a[1])return{beforeCursor:n,afterCursor:""};return{beforeCursor:n.substring(0,a[0]),afterCursor:n.substring(a[1])}}),[n,a]),p=(0,t.useMemo)((()=>{const e=h.beforeCursor.split(/\s(or|and|unless|default|ifnot|if|group_left|group_right)\s|}|\+|\|-|\*|\/|\^/i);return e[e.length-1]}),[h]),f=(0,t.useMemo)((()=>{const e=[...p.matchAll(/\w+\((?[^)]+)\)\s+(by|without|on|ignoring)\s*\(\w*/gi)];if(e.length>0&&e[0].groups&&e[0].groups.metricName)return e[0].groups.metricName;const t=[...p.matchAll(/^\s*\b(?[^{}(),\s]+)(?={|$)/g)];return t.length>0&&t[0].groups&&t[0].groups.metricName?t[0].groups.metricName:""}),[p]),m=(0,t.useMemo)((()=>{const e=p.match(/[a-z_:-][\w\-.:/]*\b(?=\s*(=|!=|=~|!~))/g);return e?e[e.length-1]:""}),[p]),_=(0,t.useMemo)((()=>{const e=h.beforeCursor.trim(),t=["}",")"].some((t=>e.endsWith(t))),n=!xa(e)&&["`","'",'"'].some((t=>e.endsWith(t)));if(!h.beforeCursor||t||n||(e=>{const t=e.split(/\s+/),n=t.length,r=t[n-1],o=t[n-2],a=!r&&xa(e),i=(!r||t.length>1)&&!/([{(),+\-*/^]|\b(?:or|and|unless|default|ifnot|if|group_left|group_right|by|without|on|ignoring)\b)/i.test(o);return a||i})(h.beforeCursor))return at.empty;const r=/(?:by|without|on|ignoring)\s*\(\s*[^)]*$|\{[^}]*$/i,o="(".concat(wa(f),")?{?.+").concat(wa(m),'(=|!=|=~|!~)"?([^"]*)$');switch(!0){case new RegExp(o,"g").test(h.beforeCursor):return at.labelValue;case r.test(h.beforeCursor):return at.label;default:return at.metricsql}}),[h,f,m]),g=(0,t.useMemo)((()=>{const e=h.beforeCursor.match(/([\w_.:]+(?![},]))$/);return e?e[0]:""}),[h.beforeCursor]),{metrics:v,labels:y,labelValues:b,loading:w}=(e=>{let{valueByContext:n,metric:r,label:a,context:i}=e;const{serverUrl:l}=gt(),{period:{start:s,end:c}}=Gt(),{autocompleteCache:u}=ln(),d=sn(),[h,p]=(0,t.useState)(!1),[f,m]=(0,t.useState)(n),_=ba()(m,500);(0,t.useEffect)((()=>(_(n),_.cancel)),[n,_]);const[g,v]=(0,t.useState)([]),[y,b]=(0,t.useState)([]),[w,k]=(0,t.useState)([]),x=(0,t.useRef)(new AbortController),S=(0,t.useCallback)((e=>{const t=o()(1e3*s).startOf("day").valueOf()/1e3,n=o()(1e3*c).endOf("day").valueOf()/1e3;return new URLSearchParams({...e||{},limit:"".concat(en),start:"".concat(t),end:"".concat(n)})}),[s,c]),A=(e,t)=>e.map((e=>({value:e,type:"".concat(t),icon:Aa[t]}))),E=async e=>{let{value:t,urlSuffix:n,setter:r,type:o,params:a}=e;if(!t&&o===Sa.metric)return;x.current.abort(),x.current=new AbortController;const{signal:i}=x.current,s={type:o,value:t,start:(null===a||void 0===a?void 0:a.get("start"))||"",end:(null===a||void 0===a?void 0:a.get("end"))||"",match:(null===a||void 0===a?void 0:a.get("match[]"))||""};p(!0);try{const e=u.get(s);if(e)return r(A(e,o)),void p(!1);const t=await fetch("".concat(l,"/api/v1/").concat(n,"?").concat(a),{signal:i});if(t.ok){const{data:e}=await t.json();r(A(e,o)),d({type:"SET_AUTOCOMPLETE_CACHE",payload:{key:s,value:e}})}p(!1)}catch(Fd){Fd instanceof Error&&"AbortError"!==Fd.name&&(d({type:"SET_AUTOCOMPLETE_CACHE",payload:{key:s,value:[]}}),p(!1),console.error(Fd))}};return(0,t.useEffect)((()=>{const e=i!==at.metricsql&&i!==at.empty;if(!l||!r||e)return;v([]);const t=ka(wa(r));return E({value:f,urlSuffix:"label/__name__/values",setter:v,type:Sa.metric,params:S({"match[]":'{__name__=~".*'.concat(t,'.*"}')})}),()=>{var e;return null===(e=x.current)||void 0===e?void 0:e.abort()}}),[l,f,i,r]),(0,t.useEffect)((()=>{if(!l||i!==at.label)return;b([]);const e=ka(r);return E({value:f,urlSuffix:"labels",setter:b,type:Sa.label,params:S(r?{"match[]":'{__name__="'.concat(e,'"}')}:void 0)}),()=>{var e;return null===(e=x.current)||void 0===e?void 0:e.abort()}}),[l,f,i,r]),(0,t.useEffect)((()=>{if(!l||!a||i!==at.labelValue)return;k([]);const e=ka(r),t=ka(wa(f)),n=[r?'__name__="'.concat(e,'"'):"","".concat(a,'=~".*').concat(t,'.*"')].filter(Boolean).join(",");return E({value:f,urlSuffix:"label/".concat(a,"/values"),setter:k,type:Sa.labelValue,params:S({"match[]":"{".concat(n,"}")})}),()=>{var e;return null===(e=x.current)||void 0===e?void 0:e.abort()}}),[l,f,i,r,a]),{metrics:g,labels:y,labelValues:w,loading:h}})({valueByContext:g,metric:f,label:m,context:_}),k=(0,t.useMemo)((()=>{switch(_){case at.metricsql:return[...v,...d];case at.label:return y;case at.labelValue:return b;default:return[]}}),[_,v,y,b]),x=(0,t.useCallback)((e=>{const t=h.beforeCursor;let n=h.afterCursor;const r=t.lastIndexOf(g,a[0]),o=r+g.length,i=t.substring(0,r),s=t.substring(o);if(_===at.labelValue){const t='"';n=n.replace(/^[^\s"|},]*/,"");const r=/(?:=|!=|=~|!~)$/.test(i),o='"'!==n.trim()[0];e="".concat(r?t:"").concat(e).concat(o?t:"")}_===at.label&&(n=n.replace(/^[^\s=!,{}()"|+\-/*^]*/,"")),_===at.metricsql&&(n=n.replace(/^[^\s[\]{}()"|+\-/*^]*/,""));const c="".concat(i).concat(e).concat(s).concat(n);l(c,i.length+e.length)}),[h]);return(0,t.useEffect)((()=>{if(!r.current)return void u({top:0,left:0});const e=r.current.querySelector("textarea")||r.current,t=window.getComputedStyle(e),n="".concat(t.getPropertyValue("font-size")),o="".concat(t.getPropertyValue("font-family")),a=parseInt("".concat(t.getPropertyValue("line-height"))),l=document.createElement("div");l.style.font="".concat(n," ").concat(o),l.style.padding=t.getPropertyValue("padding"),l.style.lineHeight="".concat(a,"px"),l.style.width="".concat(e.offsetWidth,"px"),l.style.maxWidth="".concat(e.offsetWidth,"px"),l.style.whiteSpace=t.getPropertyValue("white-space"),l.style.overflowWrap=t.getPropertyValue("overflow-wrap");const s=document.createElement("span");l.appendChild(document.createTextNode(h.beforeCursor)),l.appendChild(s),l.appendChild(document.createTextNode(h.afterCursor)),document.body.appendChild(l);const c=l.getBoundingClientRect(),d=s.getBoundingClientRect(),p=d.left-c.left,f=d.bottom-c.bottom-(i?a:0);u({top:f,left:p}),l.remove(),s.remove()}),[r,a,i]),mt(pt.FK,{children:mt(va,{loading:w,disabledFullScreen:!0,value:g,options:k,anchor:r,minLength:0,offset:c,onSelect:x,onFoundOptions:s,maxDisplayResults:{limit:Xt,message:"Please, specify the query more precisely."}})})},Pa="No match! \nThis query hasn't selected any time series from database.\nEither the requested metrics are missing in the database,\nor there is a typo in series selector.",Da="The shown results are marked as PARTIAL.\nThe result is marked as partial if one or more vmstorage nodes failed to respond to the query.",Oa=e=>{let{value:n,onChange:r,onEnter:o,onArrowUp:a,onArrowDown:i,autocomplete:l,error:s,stats:c,label:u,disabled:d=!1}=e;const{autocompleteQuick:h}=ln(),{isMobile:p}=vr(),[f,m]=(0,t.useState)(!1),[_,g]=(0,t.useState)([0,0]),v=(0,t.useRef)(null),[y,b]=(0,t.useState)(l),w=(0,t.useRef)(ba()(b,500)).current,k=[{show:"0"===(null===c||void 0===c?void 0:c.seriesFetched)&&!c.resultLength,text:Pa},{show:null===c||void 0===c?void 0:c.isPartial,text:Da}].filter((e=>e.show)).map((e=>e.text)).join("");c&&(u="".concat(u," (").concat(c.executionTimeMsec||0,"ms)"));return(0,t.useEffect)((()=>{m(l)}),[h]),(0,t.useEffect)((()=>{b(!1),w(!0)}),[_]),mt("div",{className:"vm-query-editor",ref:v,children:[mt(Fr,{value:n,label:u,type:"textarea",autofocus:!p,error:s,warning:k,onKeyDown:e=>{const{key:t,ctrlKey:n,metaKey:r,shiftKey:l}=e,s=(e.target.value||"").split("\n").length>1,c=n||r,u="ArrowDown"===t,d="Enter"===t;"ArrowUp"===t&&c&&(e.preventDefault(),a()),u&&c&&(e.preventDefault(),i()),d&&f&&e.preventDefault(),!d||l||s&&!c||f||(e.preventDefault(),o())},onChange:r,onChangeCaret:e=>{g((t=>t[0]===e[0]&&t[1]===e[1]?t:e))},disabled:d,inputmode:"search",caretPosition:_}),y&&l&&mt(Ta,{value:n,anchorEl:v,caretPosition:_,hasHelperText:Boolean(k||s),onSelect:(e,t)=>{r(e),g([t,t])},onFoundOptions:e=>{m(!!e.length)}})]})},La=e=>{let{query:n,limit:r,error:o,onChange:a,onChangeLimit:i,onRun:l}=e;const{isMobile:s}=vr(),[c,u]=(0,t.useState)(""),[d,h]=(0,t.useState)(r);return(0,t.useEffect)((()=>{h(r)}),[r]),mt("div",{className:Zn()({"vm-explore-logs-header":!0,"vm-block":!0,"vm-block_mobile":s}),children:[mt("div",{className:"vm-explore-logs-header-top",children:[mt(Oa,{value:n,autocomplete:!1,onArrowUp:()=>null,onArrowDown:()=>null,onEnter:l,onChange:a,label:"Log query",error:o}),mt(Fr,{label:"Limit entries",type:"number",value:d,error:c,onChange:e=>{const t=+e;h(t),isNaN(t)||t<0?u("Number must be bigger than zero"):(u(""),i(t))},onEnter:l})]}),mt("div",{className:"vm-explore-logs-header-bottom",children:[mt("div",{className:"vm-explore-logs-header-bottom-contols"}),mt("div",{className:"vm-explore-logs-header-bottom-helpful",children:[mt("a",{className:"vm-link vm-link_with-icon",target:"_blank",href:"https://docs.victoriametrics.com/victorialogs/logsql/",rel:"help noreferrer",children:[mt(_n,{}),"Query language docs"]}),mt("a",{className:"vm-link vm-link_with-icon",target:"_blank",href:"https://docs.victoriametrics.com/victorialogs/",rel:"help noreferrer",children:[mt(Rn,{}),"Documentation"]})]}),mt("div",{className:"vm-explore-logs-header-bottom__execute",children:mt(Pr,{startIcon:mt(Cn,{}),onClick:l,fullWidth:!0,children:"Execute Query"})})]})]})},Ra=()=>{const[e,n]=(0,t.useState)(null),[r,o]=(0,t.useState)({width:0,height:0}),a=(0,t.useCallback)((()=>{o({width:(null===e||void 0===e?void 0:e.offsetWidth)||0,height:(null===e||void 0===e?void 0:e.offsetHeight)||0})}),[null===e||void 0===e?void 0:e.offsetHeight,null===e||void 0===e?void 0:e.offsetWidth]);return Jn("resize",a),(0,t.useEffect)(a,[null===e||void 0===e?void 0:e.offsetHeight,null===e||void 0===e?void 0:e.offsetWidth]),[n,r]},Ia="u-off",za="u-label",ja="width",$a="height",Fa="top",Ha="bottom",Va="left",Ba="right",Ua="#000",Ya=Ua+"0",Wa="mousemove",qa="mousedown",Ka="mouseup",Za="mouseenter",Ga="mouseleave",Qa="dblclick",Ja="change",Xa="dppxchange",ei="--",ti="undefined"!=typeof window,ni=ti?document:null,ri=ti?window:null,oi=ti?navigator:null;let ai,ii;function li(e,t){if(null!=t){let n=e.classList;!n.contains(t)&&n.add(t)}}function si(e,t){let n=e.classList;n.contains(t)&&n.remove(t)}function ci(e,t,n){e.style[t]=n+"px"}function ui(e,t,n,r){let o=ni.createElement(e);return null!=t&&li(o,t),null!=n&&n.insertBefore(o,r),o}function di(e,t){return ui("div",e,t)}const hi=new WeakMap;function pi(e,t,n,r,o){let a="translate("+t+"px,"+n+"px)";a!=hi.get(e)&&(e.style.transform=a,hi.set(e,a),t<0||n<0||t>r||n>o?li(e,Ia):si(e,Ia))}const fi=new WeakMap;function mi(e,t,n){let r=t+n;r!=fi.get(e)&&(fi.set(e,r),e.style.background=t,e.style.borderColor=n)}const _i=new WeakMap;function gi(e,t,n,r){let o=t+""+n;o!=_i.get(e)&&(_i.set(e,o),e.style.height=n+"px",e.style.width=t+"px",e.style.marginLeft=r?-t/2+"px":0,e.style.marginTop=r?-n/2+"px":0)}const vi={passive:!0},yi={...vi,capture:!0};function bi(e,t,n,r){t.addEventListener(e,n,r?yi:vi)}function wi(e,t,n,r){t.removeEventListener(e,n,r?yi:vi)}function ki(e,t,n,r){let o;n=n||0;let a=(r=r||t.length-1)<=2147483647;for(;r-n>1;)o=a?n+r>>1:ji((n+r)/2),t[o]=t&&o<=n;o+=r)if(null!=e[o])return o;return-1}function Si(e,t,n,r){let o=Ui(e),a=Ui(t);e==t&&(-1==o?(e*=n,t/=n):(e/=n,t*=n));let i=10==n?Yi:Wi,l=1==a?Fi:ji,s=(1==o?ji:Fi)(i(zi(e))),c=l(i(zi(t))),u=Bi(n,s),d=Bi(n,c);return 10==n&&(s<0&&(u=ll(u,-s)),c<0&&(d=ll(d,-c))),r||2==n?(e=u*o,t=d*a):(e=il(e,u),t=al(t,d)),[e,t]}function Ai(e,t,n,r){let o=Si(e,t,n,r);return 0==e&&(o[0]=0),0==t&&(o[1]=0),o}ti&&function e(){let t=devicePixelRatio;ai!=t&&(ai=t,ii&&wi(Ja,ii,e),ii=matchMedia("(min-resolution: ".concat(ai-.001,"dppx) and (max-resolution: ").concat(ai+.001,"dppx)")),bi(Ja,ii,e),ri.dispatchEvent(new CustomEvent(Xa)))}();const Ei=.1,Ci={mode:3,pad:Ei},Mi={pad:0,soft:null,mode:0},Ni={min:Mi,max:Mi};function Ti(e,t,n,r){return gl(n)?Di(e,t,n):(Mi.pad=n,Mi.soft=r?0:null,Mi.mode=r?3:0,Di(e,t,Ni))}function Pi(e,t){return null==e?t:e}function Di(e,t,n){let r=n.min,o=n.max,a=Pi(r.pad,0),i=Pi(o.pad,0),l=Pi(r.hard,-Ki),s=Pi(o.hard,Ki),c=Pi(r.soft,Ki),u=Pi(o.soft,-Ki),d=Pi(r.mode,0),h=Pi(o.mode,0),p=t-e,f=Yi(p),m=Vi(zi(e),zi(t)),_=Yi(m),g=zi(_-f);(p<1e-9||g>10)&&(p=0,0!=e&&0!=t||(p=1e-9,2==d&&c!=Ki&&(a=0),2==h&&u!=-Ki&&(i=0)));let v=p||m||1e3,y=Yi(v),b=Bi(10,ji(y)),w=ll(il(e-v*(0==p?0==e?.1:1:a),b/10),9),k=e>=c&&(1==d||3==d&&w<=c||2==d&&w>=c)?c:Ki,x=Vi(l,w=k?k:Hi(k,w)),S=ll(al(t+v*(0==p?0==t?.1:1:i),b/10),9),A=t<=u&&(1==h||3==h&&S>=u||2==h&&S<=u)?u:-Ki,E=Hi(s,S>A&&t<=A?A:Vi(A,S));return x==E&&0==x&&(E=100),[x,E]}const Oi=new Intl.NumberFormat(ti?oi.language:"en-US"),Li=e=>Oi.format(e),Ri=Math,Ii=Ri.PI,zi=Ri.abs,ji=Ri.floor,$i=Ri.round,Fi=Ri.ceil,Hi=Ri.min,Vi=Ri.max,Bi=Ri.pow,Ui=Ri.sign,Yi=Ri.log10,Wi=Ri.log2,qi=function(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:1;return Ri.asinh(e/t)},Ki=1/0;function Zi(e){return 1+(0|Yi((e^e>>31)-(e>>31)))}function Gi(e,t,n){return Hi(Vi(e,t),n)}function Qi(e){return"function"==typeof e?e:()=>e}const Ji=e=>e,Xi=(e,t)=>t,el=e=>null,tl=e=>!0,nl=(e,t)=>e==t,rl=e=>ll(e,14);function ol(e,t){return rl(ll(rl(e/t))*t)}function al(e,t){return rl(Fi(rl(e/t))*t)}function il(e,t){return rl(ji(rl(e/t))*t)}function ll(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:0;if(ml(e))return e;let n=10**t,r=e*n*(1+Number.EPSILON);return $i(r)/n}const sl=new Map;function cl(e){return((""+e).split(".")[1]||"").length}function ul(e,t,n,r){let o=[],a=r.map(cl);for(let i=t;i=0&&i>=0?0:t)+(i>=a[e]?0:a[e]),c=ll(l,s);o.push(c),sl.set(c,s)}}return o}const dl={},hl=[],pl=[null,null],fl=Array.isArray,ml=Number.isInteger;function _l(e){return"string"==typeof e}function gl(e){let t=!1;if(null!=e){let n=e.constructor;t=null==n||n==Object}return t}function vl(e){return null!=e&&"object"==typeof e}const yl=Object.getPrototypeOf(Uint8Array);function bl(e){let t,n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:gl;if(fl(e)){let r=e.find((e=>null!=e));if(fl(r)||n(r)){t=Array(e.length);for(let r=0;ra){for(r=i-1;r>=0&&null==e[r];)e[r--]=null;for(r=i+1;rPromise.resolve().then(e):queueMicrotask;const Sl=["January","February","March","April","May","June","July","August","September","October","November","December"],Al=["Sunday","Monday","Tuesday","Wednesday","Thursday","Friday","Saturday"];function El(e){return e.slice(0,3)}const Cl=Al.map(El),Ml=Sl.map(El),Nl={MMMM:Sl,MMM:Ml,WWWW:Al,WWW:Cl};function Tl(e){return(e<10?"0":"")+e}const Pl={YYYY:e=>e.getFullYear(),YY:e=>(e.getFullYear()+"").slice(2),MMMM:(e,t)=>t.MMMM[e.getMonth()],MMM:(e,t)=>t.MMM[e.getMonth()],MM:e=>Tl(e.getMonth()+1),M:e=>e.getMonth()+1,DD:e=>Tl(e.getDate()),D:e=>e.getDate(),WWWW:(e,t)=>t.WWWW[e.getDay()],WWW:(e,t)=>t.WWW[e.getDay()],HH:e=>Tl(e.getHours()),H:e=>e.getHours(),h:e=>{let t=e.getHours();return 0==t?12:t>12?t-12:t},AA:e=>e.getHours()>=12?"PM":"AM",aa:e=>e.getHours()>=12?"pm":"am",a:e=>e.getHours()>=12?"p":"a",mm:e=>Tl(e.getMinutes()),m:e=>e.getMinutes(),ss:e=>Tl(e.getSeconds()),s:e=>e.getSeconds(),fff:e=>{return((t=e.getMilliseconds())<10?"00":t<100?"0":"")+t;var t}};function Dl(e,t){t=t||Nl;let n,r=[],o=/\{([a-z]+)\}|[^{]+/gi;for(;n=o.exec(e);)r.push("{"==n[0][0]?Pl[n[1]]:n[0]);return e=>{let n="";for(let o=0;oe%1==0,Rl=[1,2,2.5,5],Il=ul(10,-16,0,Rl),zl=ul(10,0,16,Rl),jl=zl.filter(Ll),$l=Il.concat(zl),Fl="{YYYY}",Hl="\n"+Fl,Vl="{M}/{D}",Bl="\n"+Vl,Ul=Bl+"/{YY}",Yl="{aa}",Wl="{h}:{mm}"+Yl,ql="\n"+Wl,Kl=":{ss}",Zl=null;function Gl(e){let t=1e3*e,n=60*t,r=60*n,o=24*r,a=30*o,i=365*o;return[(1==e?ul(10,0,3,Rl).filter(Ll):ul(10,-3,0,Rl)).concat([t,5*t,10*t,15*t,30*t,n,5*n,10*n,15*n,30*n,r,2*r,3*r,4*r,6*r,8*r,12*r,o,2*o,3*o,4*o,5*o,6*o,7*o,8*o,9*o,10*o,15*o,a,2*a,3*a,4*a,6*a,i,2*i,5*i,10*i,25*i,50*i,100*i]),[[i,Fl,Zl,Zl,Zl,Zl,Zl,Zl,1],[28*o,"{MMM}",Hl,Zl,Zl,Zl,Zl,Zl,1],[o,Vl,Hl,Zl,Zl,Zl,Zl,Zl,1],[r,"{h}"+Yl,Ul,Zl,Bl,Zl,Zl,Zl,1],[n,Wl,Ul,Zl,Bl,Zl,Zl,Zl,1],[t,Kl,Ul+" "+Wl,Zl,Bl+" "+Wl,Zl,ql,Zl,1],[e,Kl+".{fff}",Ul+" "+Wl,Zl,Bl+" "+Wl,Zl,ql,Zl,1]],function(t){return(l,s,c,u,d,h)=>{let p=[],f=d>=i,m=d>=a&&d=o?o:d,i=y+(ji(c)-ji(g))+al(g-y,a);p.push(i);let f=t(i),m=f.getHours()+f.getMinutes()/n+f.getSeconds()/r,_=d/r,v=h/l.axes[s]._space;for(;i=ll(i+d,1==e?0:3),!(i>u);)if(_>1){let e=ji(ll(m+_,6))%24,n=t(i).getHours()-e;n>1&&(n=-1),i-=n*r,m=(m+_)%24,ll((i-p[p.length-1])/d,3)*v>=.7&&p.push(i)}else p.push(i)}return p}}]}const[Ql,Jl,Xl]=Gl(1),[es,ts,ns]=Gl(.001);function rs(e,t){return e.map((e=>e.map(((n,r)=>0==r||8==r||null==n?n:t(1==r||0==e[8]?n:e[1]+n)))))}function os(e,t){return(n,r,o,a,i)=>{let l,s,c,u,d,h,p=t.find((e=>i>=e[0]))||t[t.length-1];return r.map((t=>{let n=e(t),r=n.getFullYear(),o=n.getMonth(),a=n.getDate(),i=n.getHours(),f=n.getMinutes(),m=n.getSeconds(),_=r!=l&&p[2]||o!=s&&p[3]||a!=c&&p[4]||i!=u&&p[5]||f!=d&&p[6]||m!=h&&p[7]||p[1];return l=r,s=o,c=a,u=i,d=f,h=m,_(n)}))}}function as(e,t,n){return new Date(e,t,n)}function is(e,t){return t(e)}ul(2,-53,53,[1]);function ls(e,t){return(n,r,o,a)=>null==a?ei:t(e(r))}const ss={show:!0,live:!0,isolate:!1,mount:()=>{},markers:{show:!0,width:2,stroke:function(e,t){let n=e.series[t];return n.width?n.stroke(e,t):n.points.width?n.points.stroke(e,t):null},fill:function(e,t){return e.series[t].fill(e,t)},dash:"solid"},idx:null,idxs:null,values:[]};const cs=[0,0];function us(e,t,n){let r=!(arguments.length>3&&void 0!==arguments[3])||arguments[3];return e=>{0==e.button&&(!r||e.target==t)&&n(e)}}function ds(e,t,n){let r=!(arguments.length>3&&void 0!==arguments[3])||arguments[3];return e=>{(!r||e.target==t)&&n(e)}}const hs={show:!0,x:!0,y:!0,lock:!1,move:function(e,t,n){return cs[0]=t,cs[1]=n,cs},points:{show:function(e,t){let n=e.cursor.points,r=di(),o=n.size(e,t);ci(r,ja,o),ci(r,$a,o);let a=o/-2;ci(r,"marginLeft",a),ci(r,"marginTop",a);let i=n.width(e,t,o);return i&&ci(r,"borderWidth",i),r},size:function(e,t){return e.series[t].points.size},width:0,stroke:function(e,t){let n=e.series[t].points;return n._stroke||n._fill},fill:function(e,t){let n=e.series[t].points;return n._fill||n._stroke}},bind:{mousedown:us,mouseup:us,click:us,dblclick:us,mousemove:ds,mouseleave:ds,mouseenter:ds},drag:{setScale:!0,x:!0,y:!1,dist:0,uni:null,click:(e,t)=>{t.stopPropagation(),t.stopImmediatePropagation()},_x:!1,_y:!1},focus:{dist:(e,t,n,r,o)=>r-o,prox:-1,bias:0},hover:{skip:[void 0],prox:null,bias:0},left:-10,top:-10,idx:null,dataIdx:null,idxs:null,event:null},ps={show:!0,stroke:"rgba(0,0,0,0.07)",width:2},fs=wl({},ps,{filter:Xi}),ms=wl({},fs,{size:10}),_s=wl({},ps,{show:!1}),gs='12px system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, "Noto Sans", sans-serif, "Apple Color Emoji", "Segoe UI Emoji", "Segoe UI Symbol", "Noto Color Emoji"',vs="bold "+gs,ys={show:!0,scale:"x",stroke:Ua,space:50,gap:5,size:50,labelGap:0,labelSize:30,labelFont:vs,side:2,grid:fs,ticks:ms,border:_s,font:gs,lineGap:1.5,rotate:0},bs={show:!0,scale:"x",auto:!1,sorted:1,min:Ki,max:-Ki,idxs:[]};function ws(e,t,n,r,o){return t.map((e=>null==e?"":Li(e)))}function ks(e,t,n,r,o,a,i){let l=[],s=sl.get(o)||0;for(let c=n=i?n:ll(al(n,o),s);c<=r;c=ll(c+o,s))l.push(Object.is(c,-0)?0:c);return l}function xs(e,t,n,r,o,a,i){const l=[],s=e.scales[e.axes[t].scale].log,c=ji((10==s?Yi:Wi)(n));o=Bi(s,c),10==s&&c<0&&(o=ll(o,-c));let u=n;do{l.push(u),u+=o,10==s&&(u=ll(u,sl.get(o))),u>=o*s&&(o=u)}while(u<=r);return l}function Ss(e,t,n,r,o,a,i){let l=e.scales[e.axes[t].scale].asinh,s=r>l?xs(e,t,Vi(l,n),r,o):[l],c=r>=0&&n<=0?[0]:[];return(n<-l?xs(e,t,Vi(l,-r),-n,o):[l]).reverse().map((e=>-e)).concat(c,s)}const As=/./,Es=/[12357]/,Cs=/[125]/,Ms=/1/,Ns=(e,t,n,r)=>e.map(((e,o)=>4==t&&0==e||o%r==0&&n.test(e.toExponential()[e<0?1:0])?e:null));function Ts(e,t,n,r,o){let a=e.axes[n],i=a.scale,l=e.scales[i],s=e.valToPos,c=a._space,u=s(10,i),d=s(9,i)-u>=c?As:s(7,i)-u>=c?Es:s(5,i)-u>=c?Cs:Ms;if(d==Ms){let e=zi(s(1,i)-u);if(eo,Is={show:!0,auto:!0,sorted:0,gaps:Rs,alpha:1,facets:[wl({},Ls,{scale:"x"}),wl({},Ls,{scale:"y"})]},zs={scale:"y",auto:!0,sorted:0,show:!0,spanGaps:!1,gaps:Rs,alpha:1,points:{show:function(e,t){let{scale:n,idxs:r}=e.series[0],o=e._data[0],a=e.valToPos(o[r[0]],n,!0),i=e.valToPos(o[r[1]],n,!0),l=zi(i-a)/(e.series[t].points.space*ai);return r[1]-r[0]<=l},filter:null},values:null,min:Ki,max:-Ki,idxs:[],path:null,clip:null};function js(e,t,n,r,o){return n/10}const $s={time:!0,auto:!0,distr:1,log:10,asinh:1,min:null,max:null,dir:1,ori:0},Fs=wl({},$s,{time:!1,ori:1}),Hs={};function Vs(e,t){let n=Hs[e];return n||(n={key:e,plots:[],sub(e){n.plots.push(e)},unsub(e){n.plots=n.plots.filter((t=>t!=e))},pub(e,t,r,o,a,i,l){for(let s=0;s{let m=e.pxRound;const _=l.dir*(0==l.ori?1:-1),g=0==l.ori?ec:tc;let v,y;1==_?(v=n,y=r):(v=r,y=n);let b=m(c(t[v],l,p,d)),w=m(u(i[v],s,f,h)),k=m(c(t[y],l,p,d)),x=m(u(1==a?s.max:s.min,s,f,h)),S=new Path2D(o);return g(S,k,x),g(S,b,x),g(S,b,w),S}))}function Ks(e,t,n,r,o,a){let i=null;if(e.length>0){i=new Path2D;const l=0==t?nc:rc;let s=n;for(let t=0;tn[0]){let e=n[0]-s;e>0&&l(i,s,r,e,r+a),s=n[1]}}let c=n+o-s,u=10;c>0&&l(i,s,r-u/2,c,r+a+u)}return i}function Zs(e,t,n,r,o,a,i){let l=[],s=e.length;for(let c=1==o?n:r;c>=n&&c<=r;c+=o){if(null===t[c]){let u=c,d=c;if(1==o)for(;++c<=r&&null===t[c];)d=c;else for(;--c>=n&&null===t[c];)d=c;let h=a(e[u]),p=d==u?h:a(e[d]),f=u-o;h=i<=0&&f>=0&&f=0&&m>=0&&m=h&&l.push([h,p])}}return l}function Gs(e){return 0==e?Ji:1==e?$i:t=>ol(t,e)}function Qs(e){let t=0==e?Js:Xs,n=0==e?(e,t,n,r,o,a)=>{e.arcTo(t,n,r,o,a)}:(e,t,n,r,o,a)=>{e.arcTo(n,t,o,r,a)},r=0==e?(e,t,n,r,o)=>{e.rect(t,n,r,o)}:(e,t,n,r,o)=>{e.rect(n,t,o,r)};return function(e,o,a,i,l){let s=arguments.length>5&&void 0!==arguments[5]?arguments[5]:0,c=arguments.length>6&&void 0!==arguments[6]?arguments[6]:0;0==s&&0==c?r(e,o,a,i,l):(s=Hi(s,i/2,l/2),c=Hi(c,i/2,l/2),t(e,o+s,a),n(e,o+i,a,o+i,a+l,s),n(e,o+i,a+l,o,a+l,c),n(e,o,a+l,o,a,c),n(e,o,a,o+i,a,s),e.closePath())}}const Js=(e,t,n)=>{e.moveTo(t,n)},Xs=(e,t,n)=>{e.moveTo(n,t)},ec=(e,t,n)=>{e.lineTo(t,n)},tc=(e,t,n)=>{e.lineTo(n,t)},nc=Qs(0),rc=Qs(1),oc=(e,t,n,r,o,a)=>{e.arc(t,n,r,o,a)},ac=(e,t,n,r,o,a)=>{e.arc(n,t,r,o,a)},ic=(e,t,n,r,o,a,i)=>{e.bezierCurveTo(t,n,r,o,a,i)},lc=(e,t,n,r,o,a,i)=>{e.bezierCurveTo(n,t,o,r,i,a)};function sc(e){return(e,t,n,r,o)=>Us(e,t,((t,a,i,l,s,c,u,d,h,p,f)=>{let m,_,{pxRound:g,points:v}=t;0==l.ori?(m=Js,_=oc):(m=Xs,_=ac);const y=ll(v.width*ai,3);let b=(v.size-v.width)/2*ai,w=ll(2*b,3),k=new Path2D,x=new Path2D,{left:S,top:A,width:E,height:C}=e.bbox;nc(x,S-w,A-w,E+2*w,C+2*w);const M=e=>{if(null!=i[e]){let t=g(c(a[e],l,p,d)),n=g(u(i[e],s,f,h));m(k,t+b,n),_(k,t,n,b,0,2*Ii)}};if(o)o.forEach(M);else for(let e=n;e<=r;e++)M(e);return{stroke:y>0?k:null,fill:k,clip:x,flags:2|Bs}}))}function cc(e){return(t,n,r,o,a,i)=>{r!=o&&(a!=r&&i!=r&&e(t,n,r),a!=o&&i!=o&&e(t,n,o),e(t,n,i))}}const uc=cc(ec),dc=cc(tc);function hc(e){const t=Pi(null===e||void 0===e?void 0:e.alignGaps,0);return(e,n,r,o)=>Us(e,n,((a,i,l,s,c,u,d,h,p,f,m)=>{let _,g,v=a.pxRound,y=e=>v(u(e,s,f,h)),b=e=>v(d(e,c,m,p));0==s.ori?(_=ec,g=uc):(_=tc,g=dc);const w=s.dir*(0==s.ori?1:-1),k={stroke:new Path2D,fill:null,clip:null,band:null,gaps:null,flags:Bs},x=k.stroke;let S,A,E,C=Ki,M=-Ki,N=y(i[1==w?r:o]),T=xi(l,r,o,1*w),P=xi(l,r,o,-1*w),D=y(i[T]),O=y(i[P]),L=!1;for(let e=1==w?r:o;e>=r&&e<=o;e+=w){let t=y(i[e]),n=l[e];t==N?null!=n?(A=b(n),C==Ki&&(_(x,t,A),S=A),C=Hi(A,C),M=Vi(A,M)):null===n&&(L=!0):(C!=Ki&&(g(x,N,C,M,S,A),E=N),null!=n?(A=b(n),_(x,t,A),C=M=S=A):(C=Ki,M=-Ki,null===n&&(L=!0)),N=t)}C!=Ki&&C!=M&&E!=N&&g(x,N,C,M,S,A);let[R,I]=Ys(e,n);if(null!=a.fill||0!=R){let t=k.fill=new Path2D(x),r=b(a.fillTo(e,n,a.min,a.max,R));_(t,O,r),_(t,D,r)}if(!a.spanGaps){let c=[];L&&c.push(...Zs(i,l,r,o,w,y,t)),k.gaps=c=a.gaps(e,n,r,o,c),k.clip=Ks(c,s.ori,h,p,f,m)}return 0!=I&&(k.band=2==I?[qs(e,n,r,o,x,-1),qs(e,n,r,o,x,1)]:qs(e,n,r,o,x,I)),k}))}function pc(e,t,n,r,o,a){let i=arguments.length>6&&void 0!==arguments[6]?arguments[6]:Ki;if(e.length>1){let l=null;for(let s=0,c=1/0;s0!==r[e]>0?n[e]=0:(n[e]=3*(s[e-1]+s[e])/((2*s[e]+s[e-1])/r[e-1]+(s[e]+2*s[e-1])/r[e]),isFinite(n[e])||(n[e]=0));n[i-1]=r[i-2];for(let c=0;c{Pc.pxRatio=ai})));const gc=hc(),vc=sc();function yc(e,t,n,r){return(r?[e[0],e[1]].concat(e.slice(2)):[e[0]].concat(e.slice(1))).map(((e,r)=>bc(e,r,t,n)))}function bc(e,t,n,r){return wl({},0==t?n:r,e)}function wc(e,t,n){return null==t?pl:[t,n]}const kc=wc;function xc(e,t,n){return null==t?pl:Ti(t,n,Ei,!0)}function Sc(e,t,n,r){return null==t?pl:Si(t,n,e.scales[r].log,!1)}const Ac=Sc;function Ec(e,t,n,r){return null==t?pl:Ai(t,n,e.scales[r].log,!1)}const Cc=Ec;function Mc(e,t,n,r,o){let a=Vi(Zi(e),Zi(t)),i=t-e,l=ki(o/r*i,n);do{let e=n[l],t=r*e/i;if(t>=o&&a+(e<5?sl.get(e):0)<=17)return[e,t]}while(++l(t=$i((n=+r)*ai))+"px")),t,n]}function Tc(e){e.show&&[e.font,e.labelFont].forEach((e=>{let t=ll(e[2]*ai,1);e[0]=e[0].replace(/[0-9.]+px/,t+"px"),e[1]=t}))}function Pc(e,t,n){const r={mode:Pi(e.mode,1)},o=r.mode;function a(e,t){return((3==t.distr?Yi(e>0?e:t.clamp(r,e,t.min,t.max,t.key)):4==t.distr?qi(e,t.asinh):e)-t._min)/(t._max-t._min)}function i(e,t,n,r){let o=a(e,t);return r+n*(-1==t.dir?1-o:o)}function l(e,t,n,r){let o=a(e,t);return r+n*(-1==t.dir?o:1-o)}function s(e,t,n,r){return 0==t.ori?i(e,t,n,r):l(e,t,n,r)}r.valToPosH=i,r.valToPosV=l;let c=!1;r.status=0;const u=r.root=di("uplot");if(null!=e.id&&(u.id=e.id),li(u,e.class),e.title){di("u-title",u).textContent=e.title}const d=ui("canvas"),h=r.ctx=d.getContext("2d"),p=di("u-wrap",u);bi("click",p,(e=>{if(e.target===m){(Nt!=At||Tt!=Et)&&$t.click(r,e)}}),!0);const f=r.under=di("u-under",p);p.appendChild(d);const m=r.over=di("u-over",p),_=+Pi((e=bl(e)).pxAlign,1),g=Gs(_);(e.plugins||[]).forEach((t=>{t.opts&&(e=t.opts(r,e)||e)}));const v=e.ms||.001,y=r.series=1==o?yc(e.series||[],bs,zs,!1):(b=e.series||[null],w=Is,b.map(((e,t)=>0==t?null:wl({},w,e))));var b,w;const k=r.axes=yc(e.axes||[],ys,Os,!0),x=r.scales={},S=r.bands=e.bands||[];S.forEach((e=>{e.fill=Qi(e.fill||null),e.dir=Pi(e.dir,-1)}));const A=2==o?y[1].facets[0].scale:y[0].scale,E={axes:function(){for(let e=0;ett[e])):v,b=2==p.distr?tt[v[1]]-tt[v[0]]:u,w=t.ticks,S=t.border,A=w.show?$i(w.size*ai):0,E=t._rotate*-Ii/180,C=g(t._pos*ai),M=C+(A+_)*c;o=0==i?M:0,n=1==i?M:0,it(t.font[0],l,1==t.align?Va:2==t.align?Ba:E>0?Va:E<0?Ba:0==i?"center":3==a?Ba:Va,E||1==i?"middle":2==a?Fa:Ha);let N=t.font[1]*t.lineGap,T=v.map((e=>g(s(e,p,f,m)))),P=t._values;for(let e=0;e0&&(y.forEach(((e,n)=>{if(n>0&&e.show&&(ct(n,!1),ct(n,!0),null==e._paths)){et!=e.alpha&&(h.globalAlpha=et=e.alpha);let a=2==o?[0,t[n][0].length-1]:function(e){let t=Gi(Ve-1,0,He-1),n=Gi(Be+1,0,He-1);for(;null==e[t]&&t>0;)t--;for(;null==e[n]&&n{if(t>0&&e.show){et!=e.alpha&&(h.globalAlpha=et=e.alpha),null!=e._paths&&ut(t,!1);{let n=null!=e._paths?e._paths.gaps:null,o=e.points.show(r,t,Ve,Be,n),a=e.points.filter(r,t,o,n);(o||a)&&(e.points._paths=e.points.paths(r,t,Ve,Be,a),ut(t,!0))}1!=et&&(h.globalAlpha=et=1),kn("drawSeries",t)}})))}},C=(e.drawOrder||["axes","series"]).map((e=>E[e]));function M(t){let n=x[t];if(null==n){let r=(e.scales||dl)[t]||dl;if(null!=r.from)M(r.from),x[t]=wl({},x[r.from],r,{key:t});else{n=x[t]=wl({},t==A?$s:Fs,r),n.key=t;let e=n.time,a=n.range,i=fl(a);if((t!=A||2==o&&!e)&&(!i||null!=a[0]&&null!=a[1]||(a={min:null==a[0]?Ci:{mode:1,hard:a[0],soft:a[0]},max:null==a[1]?Ci:{mode:1,hard:a[1],soft:a[1]}},i=!1),!i&&gl(a))){let e=a;a=(t,n,r)=>null==n?pl:Ti(n,r,e)}n.range=Qi(a||(e?kc:t==A?3==n.distr?Ac:4==n.distr?Cc:wc:3==n.distr?Sc:4==n.distr?Ec:xc)),n.auto=Qi(!i&&n.auto),n.clamp=Qi(n.clamp||js),n._min=n._max=null}}}M("x"),M("y"),1==o&&y.forEach((e=>{M(e.scale)})),k.forEach((e=>{M(e.scale)}));for(let Nn in e.scales)M(Nn);const N=x[A],T=N.distr;let P,D;0==N.ori?(li(u,"u-hz"),P=i,D=l):(li(u,"u-vt"),P=l,D=i);const O={};for(let Nn in x){let e=x[Nn];null==e.min&&null==e.max||(O[Nn]={min:e.min,max:e.max},e.min=e.max=null)}const L=e.tzDate||(e=>new Date($i(e/v))),R=e.fmtDate||Dl,I=1==v?Xl(L):ns(L),z=os(L,rs(1==v?Jl:ts,R)),j=ls(L,is("{YYYY}-{MM}-{DD} {h}:{mm}{aa}",R)),$=[],F=r.legend=wl({},ss,e.legend),H=F.show,V=F.markers;let B,U,Y;F.idxs=$,V.width=Qi(V.width),V.dash=Qi(V.dash),V.stroke=Qi(V.stroke),V.fill=Qi(V.fill);let W,q=[],K=[],Z=!1,G={};if(F.live){const e=y[1]?y[1].values:null;Z=null!=e,W=Z?e(r,1,0):{_:0};for(let t in W)G[t]=ei}if(H)if(B=ui("table","u-legend",u),Y=ui("tbody",null,B),F.mount(r,B),Z){U=ui("thead",null,B,Y);let e=ui("tr",null,U);for(var Q in ui("th",null,e),W)ui("th",za,e).textContent=Q}else li(B,"u-inline"),F.live&&li(B,"u-live");const J={show:!0},X={show:!1};const ee=new Map;function te(e,t,n){let o=!(arguments.length>3&&void 0!==arguments[3])||arguments[3];const a=ee.get(t)||{},i=Ee.bind[e](r,t,n,o);i&&(bi(e,t,a[e]=i),ee.set(t,a))}function ne(e,t,n){const r=ee.get(t)||{};for(let o in r)null!=e&&o!=e||(wi(o,t,r[o]),delete r[o]);null==e&&ee.delete(t)}let re=0,oe=0,ae=0,ie=0,le=0,se=0,ce=le,ue=se,de=ae,he=ie,pe=0,fe=0,me=0,_e=0;r.bbox={};let ge=!1,ve=!1,ye=!1,be=!1,we=!1,ke=!1;function xe(e,t,n){(n||e!=r.width||t!=r.height)&&Se(e,t),vt(!1),ye=!0,ve=!0,Rt()}function Se(e,t){r.width=re=ae=e,r.height=oe=ie=t,le=se=0,function(){let e=!1,t=!1,n=!1,r=!1;k.forEach(((o,a)=>{if(o.show&&o._show){let{side:a,_size:i}=o,l=a%2,s=i+(null!=o.label?o.labelSize:0);s>0&&(l?(ae-=s,3==a?(le+=s,r=!0):n=!0):(ie-=s,0==a?(se+=s,e=!0):t=!0))}})),ze[0]=e,ze[1]=n,ze[2]=t,ze[3]=r,ae-=Fe[1]+Fe[3],le+=Fe[3],ie-=Fe[2]+Fe[0],se+=Fe[0]}(),function(){let e=le+ae,t=se+ie,n=le,r=se;function o(o,a){switch(o){case 1:return e+=a,e-a;case 2:return t+=a,t-a;case 3:return n-=a,n+a;case 0:return r-=a,r+a}}k.forEach(((e,t)=>{if(e.show&&e._show){let t=e.side;e._pos=o(t,e._size),null!=e.label&&(e._lpos=o(t,e.labelSize))}}))}();let n=r.bbox;pe=n.left=ol(le*ai,.5),fe=n.top=ol(se*ai,.5),me=n.width=ol(ae*ai,.5),_e=n.height=ol(ie*ai,.5)}const Ae=3;r.setSize=function(e){let{width:t,height:n}=e;xe(t,n)};const Ee=r.cursor=wl({},hs,{drag:{y:2==o}},e.cursor);if(null==Ee.dataIdx){var Ce,Me;let e=Ee.hover,n=e.skip=new Set(null!==(Ce=e.skip)&&void 0!==Ce?Ce:[]);n.add(void 0);let r=e.prox=Qi(e.prox),o=null!==(Me=e.bias)&&void 0!==Me?Me:e.bias=0;Ee.dataIdx=(e,a,i,l)=>{var s;if(0==a)return i;let c=i,u=null!==(s=r(e,a,i,l))&&void 0!==s?s:Ki,d=u>=0&&u0;)n.has(m[e])||(t=e);if(0==o||1==o)for(e=i;null==r&&e++u&&(c=null)}return c}}const Ne=e=>{Ee.event=e};Ee.idxs=$,Ee._lock=!1;let Te=Ee.points;Te.show=Qi(Te.show),Te.size=Qi(Te.size),Te.stroke=Qi(Te.stroke),Te.width=Qi(Te.width),Te.fill=Qi(Te.fill);const Pe=r.focus=wl({},e.focus||{alpha:.3},Ee.focus),De=Pe.prox>=0;let Oe=[null],Le=[null],Re=[null];function Ie(e,t){if(1==o||t>0){let t=1==o&&x[e.scale].time,n=e.value;e.value=t?_l(n)?ls(L,is(n,R)):n||j:n||Ds,e.label=e.label||(t?"Time":"Value")}if(t>0){e.width=null==e.width?1:e.width,e.paths=e.paths||gc||el,e.fillTo=Qi(e.fillTo||Ws),e.pxAlign=+Pi(e.pxAlign,_),e.pxRound=Gs(e.pxAlign),e.stroke=Qi(e.stroke||null),e.fill=Qi(e.fill||null),e._stroke=e._fill=e._paths=e._focus=null;let t=ll((3+2*(Vi(1,e.width)||1))*1,3),n=e.points=wl({},{size:t,width:Vi(1,.2*t),stroke:e.stroke,space:2*t,paths:vc,_stroke:null,_fill:null},e.points);n.show=Qi(n.show),n.filter=Qi(n.filter),n.fill=Qi(n.fill),n.stroke=Qi(n.stroke),n.paths=Qi(n.paths),n.pxAlign=e.pxAlign}if(H){let n=function(e,t){if(0==t&&(Z||!F.live||2==o))return pl;let n=[],a=ui("tr","u-series",Y,Y.childNodes[t]);li(a,e.class),e.show||li(a,Ia);let i=ui("th",null,a);if(V.show){let e=di("u-marker",i);if(t>0){let n=V.width(r,t);n&&(e.style.border=n+"px "+V.dash(r,t)+" "+V.stroke(r,t)),e.style.background=V.fill(r,t)}}let l=di(za,i);for(var s in l.textContent=e.label,t>0&&(V.show||(l.style.color=e.width>0?V.stroke(r,t):V.fill(r,t)),te("click",i,(t=>{if(Ee._lock)return;Ne(t);let n=y.indexOf(e);if((t.ctrlKey||t.metaKey)!=F.isolate){let e=y.some(((e,t)=>t>0&&t!=n&&e.show));y.forEach(((t,r)=>{r>0&&Wt(r,e?r==n?J:X:J,!0,Sn.setSeries)}))}else Wt(n,{show:!e.show},!0,Sn.setSeries)}),!1),De&&te(Za,i,(t=>{Ee._lock||(Ne(t),Wt(y.indexOf(e),Gt,!0,Sn.setSeries))}),!1)),W){let e=ui("td","u-value",a);e.textContent="--",n.push(e)}return[a,n]}(e,t);q.splice(t,0,n[0]),K.splice(t,0,n[1]),F.values.push(null)}if(Ee.show){$.splice(t,0,null);let n=function(e,t){if(t>0){let n=Ee.points.show(r,t);if(n)return li(n,"u-cursor-pt"),li(n,e.class),pi(n,-10,-10,ae,ie),m.insertBefore(n,Oe[t]),n}}(e,t);null!=n&&(Oe.splice(t,0,n),Le.splice(t,0,0),Re.splice(t,0,0))}kn("addSeries",t)}r.addSeries=function(e,t){t=null==t?y.length:t,e=1==o?bc(e,t,bs,zs):bc(e,t,null,Is),y.splice(t,0,e),Ie(y[t],t)},r.delSeries=function(e){if(y.splice(e,1),H){F.values.splice(e,1),K.splice(e,1);let t=q.splice(e,1)[0];ne(null,t.firstChild),t.remove()}Ee.show&&($.splice(e,1),Oe.length>1&&(Oe.splice(e,1)[0].remove(),Le.splice(e,1),Re.splice(e,1))),kn("delSeries",e)};const ze=[!1,!1,!1,!1];function je(e,t,n,r){let[o,a,i,l]=n,s=t%2,c=0;return 0==s&&(l||a)&&(c=0==t&&!o||2==t&&!i?$i(ys.size/3):0),1==s&&(o||i)&&(c=1==t&&!a||3==t&&!l?$i(Os.size/2):0),c}const $e=r.padding=(e.padding||[je,je,je,je]).map((e=>Qi(Pi(e,je)))),Fe=r._padding=$e.map(((e,t)=>e(r,t,ze,0)));let He,Ve=null,Be=null;const Ue=1==o?y[0].idxs:null;let Ye,We,qe,Ke,Ze,Ge,Qe,Je,Xe,et,tt=null,nt=!1;function rt(e,n){if(t=null==e?[]:e,r.data=r._data=t,2==o){He=0;for(let e=1;e=0,ke=!0,Rt()}}function ot(){let e,n;nt=!0,1==o&&(He>0?(Ve=Ue[0]=0,Be=Ue[1]=He-1,e=t[0][Ve],n=t[0][Be],2==T?(e=Ve,n=Be):e==n&&(3==T?[e,n]=Si(e,e,N.log,!1):4==T?[e,n]=Ai(e,e,N.log,!1):N.time?n=e+$i(86400/v):[e,n]=Ti(e,n,Ei,!0))):(Ve=Ue[0]=e=null,Be=Ue[1]=n=null)),Yt(A,e,n)}function at(e,t,n,r,o,a){var i,l,s,c,u;null!==(i=e)&&void 0!==i||(e=Ya),null!==(l=n)&&void 0!==l||(n=hl),null!==(s=r)&&void 0!==s||(r="butt"),null!==(c=o)&&void 0!==c||(o=Ya),null!==(u=a)&&void 0!==u||(a="round"),e!=Ye&&(h.strokeStyle=Ye=e),o!=We&&(h.fillStyle=We=o),t!=qe&&(h.lineWidth=qe=t),a!=Ze&&(h.lineJoin=Ze=a),r!=Ge&&(h.lineCap=Ge=r),n!=Ke&&h.setLineDash(Ke=n)}function it(e,t,n,r){t!=We&&(h.fillStyle=We=t),e!=Qe&&(h.font=Qe=e),n!=Je&&(h.textAlign=Je=n),r!=Xe&&(h.textBaseline=Xe=r)}function lt(e,t,n,o){let a=arguments.length>4&&void 0!==arguments[4]?arguments[4]:0;if(o.length>0&&e.auto(r,nt)&&(null==t||null==t.min)){let t=Pi(Ve,0),r=Pi(Be,o.length-1),i=null==n.min?3==e.distr?function(e,t,n){let r=Ki,o=-Ki;for(let a=t;a<=n;a++){let t=e[a];null!=t&&t>0&&(to&&(o=t))}return[r,o]}(o,t,r):function(e,t,n,r){let o=Ki,a=-Ki;if(1==r)o=e[t],a=e[n];else if(-1==r)o=e[n],a=e[t];else for(let i=t;i<=n;i++){let t=e[i];null!=t&&(ta&&(a=t))}return[o,a]}(o,t,r,a):[n.min,n.max];e.min=Hi(e.min,n.min=i[0]),e.max=Vi(e.max,n.max=i[1])}}r.setData=rt;const st={min:null,max:null};function ct(e,t){let n=t?y[e].points:y[e];n._stroke=n.stroke(r,e),n._fill=n.fill(r,e)}function ut(e,n){let o=n?y[e].points:y[e],{stroke:a,fill:i,clip:l,flags:s,_stroke:c=o._stroke,_fill:u=o._fill,_width:d=o.width}=o._paths;d=ll(d*ai,3);let p=null,f=d%2/2;n&&null==u&&(u=d>0?"#fff":c);let m=1==o.pxAlign&&f>0;if(m&&h.translate(f,f),!n){let e=pe-d/2,t=fe-d/2,n=me+d,r=_e+d;p=new Path2D,p.rect(e,t,n,r)}n?ht(c,d,o.dash,o.cap,u,a,i,s,l):function(e,n,o,a,i,l,s,c,u,d,h){let p=!1;0!=u&&S.forEach(((f,m)=>{if(f.series[0]==e){let e,_=y[f.series[1]],g=t[f.series[1]],v=(_._paths||dl).band;fl(v)&&(v=1==f.dir?v[0]:v[1]);let b=null;_.show&&v&&function(e,t,n){for(t=Pi(t,0),n=Pi(n,e.length-1);t<=n;){if(null!=e[t])return!0;t++}return!1}(g,Ve,Be)?(b=f.fill(r,m)||l,e=_._paths.clip):v=null,ht(n,o,a,i,b,s,c,u,d,h,e,v),p=!0}})),p||ht(n,o,a,i,l,s,c,u,d,h)}(e,c,d,o.dash,o.cap,u,a,i,s,p,l),m&&h.translate(-f,-f)}const dt=2|Bs;function ht(e,t,n,r,o,a,i,l,s,c,u,d){at(e,t,n,r,o),(s||c||d)&&(h.save(),s&&h.clip(s),c&&h.clip(c)),d?(l&dt)==dt?(h.clip(d),u&&h.clip(u),ft(o,i),pt(e,a,t)):2&l?(ft(o,i),h.clip(d),pt(e,a,t)):l&Bs&&(h.save(),h.clip(d),u&&h.clip(u),ft(o,i),h.restore(),pt(e,a,t)):(ft(o,i),pt(e,a,t)),(s||c||d)&&h.restore()}function pt(e,t,n){n>0&&(t instanceof Map?t.forEach(((e,t)=>{h.strokeStyle=Ye=t,h.stroke(e)})):null!=t&&e&&h.stroke(t))}function ft(e,t){t instanceof Map?t.forEach(((e,t)=>{h.fillStyle=We=t,h.fill(e)})):null!=t&&e&&h.fill(t)}function mt(e,t,n,r,o,a,i,l,s,c){let u=i%2/2;1==_&&h.translate(u,u),at(l,i,s,c,l),h.beginPath();let d,p,f,m,g=o+(0==r||3==r?-a:a);0==n?(p=o,m=g):(d=o,f=g);for(let _=0;_{if(!n.show)return;let a=x[n.scale];if(null==a.min)return void(n._show&&(t=!1,n._show=!1,vt(!1)));n._show||(t=!1,n._show=!0,vt(!1));let i=n.side,l=i%2,{min:s,max:c}=a,[u,d]=function(e,t,n,o){let a,i=k[e];if(o<=0)a=[0,0];else{let l=i._space=i.space(r,e,t,n,o);a=Mc(t,n,i._incrs=i.incrs(r,e,t,n,o,l),o,l)}return i._found=a}(o,s,c,0==l?ae:ie);if(0==d)return;let h=2==a.distr,p=n._splits=n.splits(r,o,s,c,u,d,h),f=2==a.distr?p.map((e=>tt[e])):p,m=2==a.distr?tt[p[1]]-tt[p[0]]:u,_=n._values=n.values(r,n.filter(r,f,o,d,m),o,d,m);n._rotate=2==i?n.rotate(r,_,o,d):0;let g=n._size;n._size=Fi(n.size(r,_,o,e)),null!=g&&n._size!=g&&(t=!1)})),t}function gt(e){let t=!0;return $e.forEach(((n,o)=>{let a=n(r,o,ze,e);a!=Fe[o]&&(t=!1),Fe[o]=a})),t}function vt(e){y.forEach(((t,n)=>{n>0&&(t._paths=null,e&&(1==o?(t.min=null,t.max=null):t.facets.forEach((e=>{e.min=null,e.max=null}))))}))}let yt,bt,wt,kt,xt,St,At,Et,Ct,Mt,Nt,Tt,Pt=!1,Dt=!1,Ot=[];function Lt(){Dt=!1;for(let e=0;e0){y.forEach(((n,a)=>{if(1==o){let o=n.scale,i=O[o];if(null==i)return;let l=e[o];if(0==a){let e=l.range(r,l.min,l.max,o);l.min=e[0],l.max=e[1],Ve=ki(l.min,t[0]),Be=ki(l.max,t[0]),Be-Ve>1&&(t[0][Ve]l.max&&Be--),n.min=tt[Ve],n.max=tt[Be]}else n.show&&n.auto&<(l,i,n,t[a],n.sorted);n.idxs[0]=Ve,n.idxs[1]=Be}else if(a>0&&n.show&&n.auto){let[r,o]=n.facets,i=r.scale,l=o.scale,[s,c]=t[a],u=e[i],d=e[l];null!=u&<(u,O[i],r,s,r.sorted),null!=d&<(d,O[l],o,c,o.sorted),n.min=o.min,n.max=o.max}}));for(let t in e){let n=e[t],o=O[t];if(null==n.from&&(null==o||null==o.min)){let e=n.range(r,n.min==Ki?null:n.min,n.max==-Ki?null:n.max,t);n.min=e[0],n.max=e[1]}}}for(let t in e){let n=e[t];if(null!=n.from){let o=e[n.from];if(null==o.min)n.min=n.max=null;else{let e=n.range(r,o.min,o.max,t);n.min=e[0],n.max=e[1]}}}let n={},a=!1;for(let t in e){let r=e[t],o=x[t];if(o.min!=r.min||o.max!=r.max){o.min=r.min,o.max=r.max;let e=o.distr;o._min=3==e?Yi(o.min):4==e?qi(o.min,o.asinh):o.min,o._max=3==e?Yi(o.max):4==e?qi(o.max,o.asinh):o.max,n[t]=a=!0}}if(a){y.forEach(((e,t)=>{2==o?t>0&&n.y&&(e._paths=null):n[e.scale]&&(e._paths=null)}));for(let e in n)ye=!0,kn("setScale",e);Ee.show&&Ee.left>=0&&(be=ke=!0)}for(let t in O)O[t]=null}(),ge=!1),ye&&(!function(){let e=!1,t=0;for(;!e;){t++;let n=_t(t),o=gt(t);e=t==Ae||n&&o,e||(Se(r.width,r.height),ve=!0)}}(),ye=!1),ve){if(ci(f,Va,le),ci(f,Fa,se),ci(f,ja,ae),ci(f,$a,ie),ci(m,Va,le),ci(m,Fa,se),ci(m,ja,ae),ci(m,$a,ie),ci(p,ja,re),ci(p,$a,oe),d.width=$i(re*ai),d.height=$i(oe*ai),k.forEach((e=>{let{_el:t,_show:n,_size:r,_pos:o,side:a}=e;if(null!=t)if(n){let e=a%2==1;ci(t,e?"left":"top",o-(3===a||0===a?r:0)),ci(t,e?"width":"height",r),ci(t,e?"top":"left",e?se:le),ci(t,e?"height":"width",e?ie:ae),si(t,Ia)}else li(t,Ia)})),Ye=We=qe=Ze=Ge=Qe=Je=Xe=Ke=null,et=1,ln(!0),le!=ce||se!=ue||ae!=de||ie!=he){vt(!1);let e=ae/de,t=ie/he;if(Ee.show&&!be&&Ee.left>=0){Ee.left*=e,Ee.top*=t,wt&&pi(wt,$i(Ee.left),0,ae,ie),kt&&pi(kt,0,$i(Ee.top),ae,ie);for(let n=1;n=0&&Vt.width>0){Vt.left*=e,Vt.width*=e,Vt.top*=t,Vt.height*=t;for(let e in un)ci(Bt,e,Vt[e])}ce=le,ue=se,de=ae,he=ie}kn("setSize"),ve=!1}re>0&&oe>0&&(h.clearRect(0,0,d.width,d.height),kn("drawClear"),C.forEach((e=>e())),kn("draw")),Vt.show&&we&&(Ut(Vt),we=!1),Ee.show&&be&&(on(null,!0,!1),be=!1),F.show&&F.live&&ke&&(nn(),ke=!1),c||(c=!0,r.status=1,kn("ready")),nt=!1,Pt=!1}function zt(e,n){let o=x[e];if(null==o.from){if(0==He){let t=o.range(r,n.min,n.max,e);n.min=t[0],n.max=t[1]}if(n.min>n.max){let e=n.min;n.min=n.max,n.max=e}if(He>1&&null!=n.min&&null!=n.max&&n.max-n.min<1e-16)return;e==A&&2==o.distr&&He>0&&(n.min=ki(n.min,t[0]),n.max=ki(n.max,t[0]),n.min==n.max&&n.max++),O[e]=n,ge=!0,Rt()}}r.batch=function(e){let t=arguments.length>1&&void 0!==arguments[1]&&arguments[1];Pt=!0,Dt=t,e(r),It(),t&&Ot.length>0&&queueMicrotask(Lt)},r.redraw=(e,t)=>{ye=t||!1,!1!==e?Yt(A,N.min,N.max):Rt()},r.setScale=zt;let jt=!1;const $t=Ee.drag;let Ft=$t.x,Ht=$t.y;Ee.show&&(Ee.x&&(yt=di("u-cursor-x",m)),Ee.y&&(bt=di("u-cursor-y",m)),0==N.ori?(wt=yt,kt=bt):(wt=bt,kt=yt),Nt=Ee.left,Tt=Ee.top);const Vt=r.select=wl({show:!0,over:!0,left:0,width:0,top:0,height:0},e.select),Bt=Vt.show?di("u-select",Vt.over?m:f):null;function Ut(e,t){if(Vt.show){for(let t in e)Vt[t]=e[t],t in un&&ci(Bt,t,e[t]);!1!==t&&kn("setSelect")}}function Yt(e,t,n){zt(e,{min:t,max:n})}function Wt(e,t,n,a){null!=t.focus&&function(e){if(e!=Zt){let t=null==e,n=1!=Pe.alpha;y.forEach(((r,a)=>{if(1==o||a>0){let o=t||0==a||a==e;r._focus=t?null:o,n&&function(e,t){y[e].alpha=t,Ee.show&&Oe[e]&&(Oe[e].style.opacity=t);H&&q[e]&&(q[e].style.opacity=t)}(a,o?1:Pe.alpha)}})),Zt=e,n&&Rt()}}(e),null!=t.show&&y.forEach(((n,r)=>{r>0&&(e==r||null==e)&&(n.show=t.show,function(e,t){let n=y[e],r=H?q[e]:null;n.show?r&&si(r,Ia):(r&&li(r,Ia),Oe.length>1&&pi(Oe[e],-10,-10,ae,ie))}(r,t.show),2==o?(Yt(n.facets[0].scale,null,null),Yt(n.facets[1].scale,null,null)):Yt(n.scale,null,null),Rt())})),!1!==n&&kn("setSeries",e,t),a&&Cn("setSeries",r,e,t)}let qt,Kt,Zt;r.setSelect=Ut,r.setSeries=Wt,r.addBand=function(e,t){e.fill=Qi(e.fill||null),e.dir=Pi(e.dir,-1),t=null==t?S.length:t,S.splice(t,0,e)},r.setBand=function(e,t){wl(S[e],t)},r.delBand=function(e){null==e?S.length=0:S.splice(e,1)};const Gt={focus:!0};function Qt(e,t,n){let r=x[t];n&&(e=e/ai-(1==r.ori?se:le));let o=ae;1==r.ori&&(o=ie,e=o-e),-1==r.dir&&(e=o-e);let a=r._min,i=a+(r._max-a)*(e/o),l=r.distr;return 3==l?Bi(10,i):4==l?function(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:1;return Ri.sinh(e)*t}(i,r.asinh):i}function Jt(e,t){ci(Bt,Va,Vt.left=e),ci(Bt,ja,Vt.width=t)}function Xt(e,t){ci(Bt,Fa,Vt.top=e),ci(Bt,$a,Vt.height=t)}H&&De&&te(Ga,B,(e=>{Ee._lock||(Ne(e),null!=Zt&&Wt(null,Gt,!0,Sn.setSeries))})),r.valToIdx=e=>ki(e,t[0]),r.posToIdx=function(e,n){return ki(Qt(e,A,n),t[0],Ve,Be)},r.posToVal=Qt,r.valToPos=(e,t,n)=>0==x[t].ori?i(e,x[t],n?me:ae,n?pe:0):l(e,x[t],n?_e:ie,n?fe:0),r.setCursor=(e,t,n)=>{Nt=e.left,Tt=e.top,on(null,t,n)};let en=0==N.ori?Jt:Xt,tn=1==N.ori?Jt:Xt;function nn(e,t){null!=e&&(e.idxs?e.idxs.forEach(((e,t)=>{$[t]=e})):void 0!==e.idx&&$.fill(e.idx),F.idx=$[0]);for(let n=0;n0||1==o&&!Z)&&rn(n,$[n]);H&&F.live&&function(){if(H&&F.live)for(let e=2==o?1:0;eBe;qt=Ki;let s=0==N.ori?ae:ie,c=1==N.ori?ae:ie;if(Nt<0||0==He||l){i=Ee.idx=null;for(let e=0;e0&&Oe.length>1&&pi(Oe[e],-10,-10,ae,ie);De&&Wt(null,Gt,!0,null==e&&Sn.setSeries),F.live&&($.fill(i),ke=!0)}else{let e,n,a;1==o&&(e=0==N.ori?Nt:Tt,n=Qt(e,A),i=Ee.idx=ki(n,t[0],Ve,Be),a=P(t[0][i],N,s,0));for(let l=2==o?1:0;l0&&e.show){let t,n,a=null==p?-10:D(p,1==o?x[e.scale]:x[e.facets[1].scale],c,0);if(De&&null!=p){let t=1==N.ori?Nt:Tt,n=zi(Pe.dist(r,l,h,a,t));if(n=0?1:-1;a==(p>=0?1:-1)&&(1==a?1==r?p>=o:p<=o:1==r?p<=o:p>=o)&&(qt=n,Kt=l)}else qt=n,Kt=l}}if(0==N.ori?(t=f,n=a):(t=a,n=f),ke&&Oe.length>1){mi(Oe[l],Ee.points.fill(r,l),Ee.points.stroke(r,l));let e,o,a,i,s=!0,c=Ee.points.bbox;if(null!=c){s=!1;let t=c(r,l);a=t.left,i=t.top,e=t.width,o=t.height}else a=t,i=n,e=o=Ee.points.size(r,l);gi(Oe[l],e,o,s),Le[l]=a,Re[l]=i,pi(Oe[l],al(a,1),al(i,1),ae,ie)}}}}if(Vt.show&&jt)if(null!=e){let[t,n]=Sn.scales,[r,o]=Sn.match,[a,i]=e.cursor.sync.scales,l=e.cursor.drag;if(Ft=l._x,Ht=l._y,Ft||Ht){let l,u,d,h,p,{left:f,top:m,width:_,height:g}=e.select,v=e.scales[t].ori,y=e.posToVal,b=null!=t&&r(t,a),w=null!=n&&o(n,i);b&&Ft?(0==v?(l=f,u=_):(l=m,u=g),d=x[t],h=P(y(l,a),d,s,0),p=P(y(l+u,a),d,s,0),en(Hi(h,p),zi(p-h))):en(0,s),w&&Ht?(1==v?(l=f,u=_):(l=m,u=g),d=x[n],h=D(y(l,i),d,c,0),p=D(y(l+u,i),d,c,0),tn(Hi(h,p),zi(p-h))):tn(0,c)}else dn()}else{let e=zi(Ct-xt),t=zi(Mt-St);if(1==N.ori){let n=e;e=t,t=n}Ft=$t.x&&e>=$t.dist,Ht=$t.y&&t>=$t.dist;let n,r,o=$t.uni;null!=o?Ft&&Ht&&(Ft=e>=o,Ht=t>=o,Ft||Ht||(t>e?Ht=!0:Ft=!0)):$t.x&&$t.y&&(Ft||Ht)&&(Ft=Ht=!0),Ft&&(0==N.ori?(n=At,r=Nt):(n=Et,r=Tt),en(Hi(n,r),zi(r-n)),Ht||tn(0,c)),Ht&&(1==N.ori?(n=At,r=Nt):(n=Et,r=Tt),tn(Hi(n,r),zi(r-n)),Ft||en(0,s)),Ft||Ht||(en(0,0),tn(0,0))}if($t._x=Ft,$t._y=Ht,null==e){if(a){if(null!=An){let[e,t]=Sn.scales;Sn.values[0]=null!=e?Qt(0==N.ori?Nt:Tt,e):null,Sn.values[1]=null!=t?Qt(1==N.ori?Nt:Tt,t):null}Cn(Wa,r,Nt,Tt,ae,ie,i)}if(De){let e=a&&Sn.setSeries,t=Pe.prox;null==Zt?qt<=t&&Wt(Kt,Gt,!0,e):qt>t?Wt(null,Gt,!0,e):Kt!=Zt&&Wt(Kt,Gt,!0,e)}}ke&&(F.idx=i,nn()),!1!==n&&kn("setCursor")}r.setLegend=nn;let an=null;function ln(){arguments.length>0&&void 0!==arguments[0]&&arguments[0]?an=null:(an=m.getBoundingClientRect(),kn("syncRect",an))}function sn(e,t,n,r,o,a,i){Ee._lock||jt&&null!=e&&0==e.movementX&&0==e.movementY||(cn(e,t,n,r,o,a,i,!1,null!=e),null!=e?on(null,!0,!0):on(t,!0,!1))}function cn(e,t,n,o,a,i,l,c,u){if(null==an&&ln(!1),Ne(e),null!=e)n=e.clientX-an.left,o=e.clientY-an.top;else{if(n<0||o<0)return Nt=-10,void(Tt=-10);let[e,r]=Sn.scales,l=t.cursor.sync,[c,u]=l.values,[d,h]=l.scales,[p,f]=Sn.match,m=t.axes[0].side%2==1,_=0==N.ori?ae:ie,g=1==N.ori?ae:ie,v=m?i:a,y=m?a:i,b=m?o:n,w=m?n:o;if(n=null!=d?p(e,d)?s(c,x[e],_,0):-10:_*(b/v),o=null!=h?f(r,h)?s(u,x[r],g,0):-10:g*(w/y),1==N.ori){let e=n;n=o,o=e}}u&&((n<=1||n>=ae-1)&&(n=ol(n,ae)),(o<=1||o>=ie-1)&&(o=ol(o,ie))),c?(xt=n,St=o,[At,Et]=Ee.move(r,n,o)):(Nt=n,Tt=o)}Object.defineProperty(r,"rect",{get:()=>(null==an&&ln(!1),an)});const un={width:0,height:0,left:0,top:0};function dn(){Ut(un,!1)}let hn,pn,fn,mn;function _n(e,t,n,o,a,i,l){jt=!0,Ft=Ht=$t._x=$t._y=!1,cn(e,t,n,o,a,i,0,!0,!1),null!=e&&(te(Ka,ni,gn,!1),Cn(qa,r,At,Et,ae,ie,null));let{left:s,top:c,width:u,height:d}=Vt;hn=s,pn=c,fn=u,mn=d,dn()}function gn(e,t,n,o,a,i,l){jt=$t._x=$t._y=!1,cn(e,t,n,o,a,i,0,!1,!0);let{left:s,top:c,width:u,height:d}=Vt,h=u>0||d>0,p=hn!=s||pn!=c||fn!=u||mn!=d;if(h&&p&&Ut(Vt),$t.setScale&&h&&p){let e=s,t=u,n=c,r=d;if(1==N.ori&&(e=c,t=d,n=s,r=u),Ft&&Yt(A,Qt(e,A),Qt(e+t,A)),Ht)for(let o in x){let e=x[o];o!=A&&null==e.from&&e.min!=Ki&&Yt(o,Qt(n+r,o),Qt(n,o))}dn()}else Ee.lock&&(Ee._lock=!Ee._lock,Ee._lock||on(null,!0,!1));null!=e&&(ne(Ka,ni),Cn(Ka,r,Nt,Tt,ae,ie,null))}function vn(e,t,n,o,a,i,l){Ee._lock||(Ne(e),ot(),dn(),null!=e&&Cn(Qa,r,Nt,Tt,ae,ie,null))}function yn(){k.forEach(Tc),xe(r.width,r.height,!0)}bi(Xa,ri,yn);const bn={};bn.mousedown=_n,bn.mousemove=sn,bn.mouseup=gn,bn.dblclick=vn,bn.setSeries=(e,t,n,o)=>{-1!=(n=(0,Sn.match[2])(r,t,n))&&Wt(n,o,!0,!1)},Ee.show&&(te(qa,m,_n),te(Wa,m,sn),te(Za,m,(e=>{Ne(e),ln(!1)})),te(Ga,m,(function(e,t,n,r,o,a,i){if(Ee._lock)return;Ne(e);let l=jt;if(jt){let e,t,n=!0,r=!0,o=10;0==N.ori?(e=Ft,t=Ht):(e=Ht,t=Ft),e&&t&&(n=Nt<=o||Nt>=ae-o,r=Tt<=o||Tt>=ie-o),e&&n&&(Nt=Nt{e.call(null,r,t,n)}))}(e.plugins||[]).forEach((e=>{for(let t in e.hooks)wn[t]=(wn[t]||[]).concat(e.hooks[t])}));const xn=(e,t,n)=>n,Sn=wl({key:null,setSeries:!1,filters:{pub:tl,sub:tl},scales:[A,y[1]?y[1].scale:null],match:[nl,nl,xn],values:[null,null]},Ee.sync);2==Sn.match.length&&Sn.match.push(xn),Ee.sync=Sn;const An=Sn.key,En=Vs(An);function Cn(e,t,n,r,o,a,i){Sn.filters.pub(e,t,n,r,o,a,i)&&En.pub(e,t,n,r,o,a,i)}function Mn(){kn("init",e,t),rt(t||e.data,!1),O[A]?zt(A,O[A]):ot(),we=Vt.show&&(Vt.width>0||Vt.height>0),be=ke=!0,xe(e.width,e.height)}return En.sub(r),r.pub=function(e,t,n,r,o,a,i){Sn.filters.sub(e,t,n,r,o,a,i)&&bn[e](null,t,n,r,o,a,i)},r.destroy=function(){var e;En.unsub(r),mc.delete(r),ee.clear(),wi(Xa,ri,yn),u.remove(),null===(e=B)||void 0===e||e.remove(),kn("destroy")},y.forEach(Ie),k.forEach((function(e,t){if(e._show=e.show,e.show){let n=e.side%2,o=x[e.scale];null==o&&(e.scale=n?y[1].scale:A,o=x[e.scale]);let a=o.time;e.size=Qi(e.size),e.space=Qi(e.space),e.rotate=Qi(e.rotate),fl(e.incrs)&&e.incrs.forEach((e=>{!sl.has(e)&&sl.set(e,cl(e))})),e.incrs=Qi(e.incrs||(2==o.distr?jl:a?1==v?Ql:es:$l)),e.splits=Qi(e.splits||(a&&1==o.distr?I:3==o.distr?xs:4==o.distr?Ss:ks)),e.stroke=Qi(e.stroke),e.grid.stroke=Qi(e.grid.stroke),e.ticks.stroke=Qi(e.ticks.stroke),e.border.stroke=Qi(e.border.stroke);let i=e.values;e.values=fl(i)&&!fl(i[0])?Qi(i):a?fl(i)?os(L,rs(i,R)):_l(i)?function(e,t){let n=Dl(t);return(t,r,o,a,i)=>r.map((t=>n(e(t))))}(L,i):i||z:i||ws,e.filter=Qi(e.filter||(o.distr>=3&&10==o.log?Ts:3==o.distr&&2==o.log?Ps:Xi)),e.font=Nc(e.font),e.labelFont=Nc(e.labelFont),e._size=e.size(r,null,t,0),e._space=e._rotate=e._incrs=e._found=e._splits=e._values=null,e._size>0&&(ze[t]=!0,e._el=di("u-axis",p))}})),n?n instanceof HTMLElement?(n.appendChild(u),Mn()):n(r,Mn):Mn(),r}Pc.assign=wl,Pc.fmtNum=Li,Pc.rangeNum=Ti,Pc.rangeLog=Si,Pc.rangeAsinh=Ai,Pc.orient=Us,Pc.pxRatio=ai,Pc.join=function(e,t){if(function(e){let t=e[0][0],n=t.length;for(let r=1;r1&&void 0!==arguments[1]?arguments[1]:100;const n=e.length;if(n<=1)return!0;let r=0,o=n-1;for(;r<=o&&null==e[r];)r++;for(;o>=r&&null==e[o];)o--;if(o<=r)return!0;const a=Vi(1,ji((o-r+1)/t));for(let i=e[r],l=r+a;l<=o;l+=a){const t=e[l];if(null!=t){if(t<=i)return!1;i=t}}return!0}(t[0])||(t=function(e){let t=e[0],n=t.length,r=Array(n);for(let a=0;at[e]-t[n]));let o=[];for(let a=0;ae-t))],o=r[0].length,a=new Map;for(let i=0;iUs(e,a,((s,c,u,d,h,p,f,m,_,g,v)=>{let y=s.pxRound,{left:b,width:w}=e.bbox,k=e=>y(p(e,d,g,m)),x=e=>y(f(e,h,v,_)),S=0==d.ori?ec:tc;const A={stroke:new Path2D,fill:null,clip:null,band:null,gaps:null,flags:Bs},E=A.stroke,C=d.dir*(0==d.ori?1:-1);i=xi(u,i,l,1),l=xi(u,i,l,-1);let M=x(u[1==C?i:l]),N=k(c[1==C?i:l]),T=N,P=N;o&&-1==t&&(P=b,S(E,P,M)),S(E,N,M);for(let e=1==C?i:l;e>=i&&e<=l;e+=C){let n=u[e];if(null==n)continue;let r=k(c[e]),o=x(n);1==t?S(E,r,M):S(E,T,o),S(E,r,o),M=o,T=r}let D=T;o&&1==t&&(D=b+w,S(E,D,M));let[O,L]=Ys(e,a);if(null!=s.fill||0!=O){let t=A.fill=new Path2D(E),n=x(s.fillTo(e,a,s.min,s.max,O));S(t,D,n),S(t,P,n)}if(!s.spanGaps){let o=[];o.push(...Zs(c,u,i,l,C,k,r));let h=s.width*ai/2,p=n||1==t?h:-h,f=n||-1==t?-h:h;o.forEach((e=>{e[0]+=p,e[1]+=f})),A.gaps=o=s.gaps(e,a,i,l,o),A.clip=Ks(o,d.ori,m,_,g,v)}return 0!=L&&(A.band=2==L?[qs(e,a,i,l,E,-1),qs(e,a,i,l,E,1)]:qs(e,a,i,l,E,L)),A}))},e.bars=function(e){const t=Pi((e=e||dl).size,[.6,Ki,1]),n=e.align||0,r=e.gap||0;let o=e.radius;o=null==o?[0,0]:"number"==typeof o?[o,0]:o;const a=Qi(o),i=1-t[0],l=Pi(t[1],Ki),s=Pi(t[2],1),c=Pi(e.disp,dl),u=Pi(e.each,(e=>{})),{fill:d,stroke:h}=c;return(e,t,o,p)=>Us(e,t,((f,m,_,g,v,y,b,w,k,x,S)=>{let A,E,C=f.pxRound,M=n,N=r*ai,T=l*ai,P=s*ai;0==g.ori?[A,E]=a(e,t):[E,A]=a(e,t);const D=g.dir*(0==g.ori?1:-1);let O,L,R,I=0==g.ori?nc:rc,z=0==g.ori?u:(e,t,n,r,o,a,i)=>{u(e,t,n,o,r,i,a)},j=Pi(e.bands,hl).find((e=>e.series[0]==t)),$=null!=j?j.dir:0,F=f.fillTo(e,t,f.min,f.max,$),H=C(b(F,v,S,k)),V=x,B=C(f.width*ai),U=!1,Y=null,W=null,q=null,K=null;null==d||0!=B&&null==h||(U=!0,Y=d.values(e,t,o,p),W=new Map,new Set(Y).forEach((e=>{null!=e&&W.set(e,new Path2D)})),B>0&&(q=h.values(e,t,o,p),K=new Map,new Set(q).forEach((e=>{null!=e&&K.set(e,new Path2D)}))));let{x0:Z,size:G}=c;if(null!=Z&&null!=G){M=1,m=Z.values(e,t,o,p),2==Z.unit&&(m=m.map((t=>e.posToVal(w+t*x,g.key,!0))));let n=G.values(e,t,o,p);L=2==G.unit?n[0]*x:y(n[0],g,x,w)-y(0,g,x,w),V=pc(m,_,y,g,x,w,V),R=V-L+N}else V=pc(m,_,y,g,x,w,V),R=V*i+N,L=V-R;R<1&&(R=0),B>=L/2&&(B=0),R<5&&(C=Ji);let Q=R>0;L=C(Gi(V-R-(Q?B:0),P,T)),O=(0==M?L/2:M==D?0:L)-M*D*((0==M?N/2:0)+(Q?B/2:0));const J={stroke:null,fill:null,clip:null,band:null,gaps:null,flags:0},X=U?null:new Path2D;let ee=null;if(null!=j)ee=e.data[j.series[1]];else{let{y0:n,y1:r}=c;null!=n&&null!=r&&(_=r.values(e,t,o,p),ee=n.values(e,t,o,p))}let te=A*L,ne=E*L;for(let n=1==D?o:p;n>=o&&n<=p;n+=D){let r=_[n];if(null==r)continue;if(null!=ee){var re;let e=null!==(re=ee[n])&&void 0!==re?re:0;if(r-e==0)continue;H=b(e,v,S,k)}let o=y(2!=g.distr||null!=c?m[n]:n,g,x,w),a=b(Pi(r,F),v,S,k),i=C(o-O),l=C(Vi(a,H)),s=C(Hi(a,H)),u=l-s;if(null!=r){let o=r<0?ne:te,a=r<0?te:ne;U?(B>0&&null!=q[n]&&I(K.get(q[n]),i,s+ji(B/2),L,Vi(0,u-B),o,a),null!=Y[n]&&I(W.get(Y[n]),i,s+ji(B/2),L,Vi(0,u-B),o,a)):I(X,i,s+ji(B/2),L,Vi(0,u-B),o,a),z(e,t,n,i-B/2,s,L+B,u)}}if(B>0)J.stroke=U?K:X;else if(!U){var oe;J._fill=0==f.width?f._fill:null!==(oe=f._stroke)&&void 0!==oe?oe:f._fill,J.width=0}return J.fill=U?W:X,J}))},e.spline=function(e){return function(e,t){const n=Pi(null===t||void 0===t?void 0:t.alignGaps,0);return(t,r,o,a)=>Us(t,r,((i,l,s,c,u,d,h,p,f,m,_)=>{let g,v,y,b=i.pxRound,w=e=>b(d(e,c,m,p)),k=e=>b(h(e,u,_,f));0==c.ori?(g=Js,y=ec,v=ic):(g=Xs,y=tc,v=lc);const x=c.dir*(0==c.ori?1:-1);o=xi(s,o,a,1),a=xi(s,o,a,-1);let S=w(l[1==x?o:a]),A=S,E=[],C=[];for(let e=1==x?o:a;e>=o&&e<=a;e+=x)if(null!=s[e]){let t=w(l[e]);E.push(A=t),C.push(k(s[e]))}const M={stroke:e(E,C,g,y,v,b),fill:null,clip:null,band:null,gaps:null,flags:Bs},N=M.stroke;let[T,P]=Ys(t,r);if(null!=i.fill||0!=T){let e=M.fill=new Path2D(N),n=k(i.fillTo(t,r,i.min,i.max,T));y(e,A,n),y(e,S,n)}if(!i.spanGaps){let e=[];e.push(...Zs(l,s,o,a,x,w,n)),M.gaps=e=i.gaps(t,r,o,a,e),M.clip=Ks(e,c.ori,p,f,m,_)}return 0!=P&&(M.band=2==P?[qs(t,r,o,a,N,-1),qs(t,r,o,a,N,1)]:qs(t,r,o,a,N,P)),M}))}(fc,e)}}const Dc=(e,t,n)=>{if(void 0===e||null===e)return"";n=n||0,t=t||0;const r=Math.abs(n-t);if(isNaN(r)||0==r)return Math.abs(e)>=1e3?e.toLocaleString("en-US"):e.toString();let o=3+Math.floor(1+Math.log10(Math.max(Math.abs(t),Math.abs(n)))-Math.log10(r));return(isNaN(o)||o>20)&&(o=20),e.toLocaleString("en-US",{minimumSignificantDigits:1,maximumSignificantDigits:o})},Oc=[[31536e3,"{YYYY}",null,null,null,null,null,null,1],[2419200,"{MMM}","\n{YYYY}",null,null,null,null,null,1],[86400,"{MM}-{DD}","\n{YYYY}",null,null,null,null,null,1],[3600,"{HH}:{mm}","\n{YYYY}-{MM}-{DD}",null,"\n{MM}-{DD}",null,null,null,1],[60,"{HH}:{mm}","\n{YYYY}-{MM}-{DD}",null,"\n{MM}-{DD}",null,null,null,1],[1,"{HH}:{mm}:{ss}","\n{YYYY}-{MM}-{DD}",null,"\n{MM}-{DD} {HH}:{mm}",null,null,null,1],[.001,":{ss}.{fff}","\n{YYYY}-{MM}-{DD} {HH}:{mm}",null,"\n{MM}-{DD} {HH}:{mm}",null,"\n{HH}:{mm}",null,1]],Lc=(e,t)=>Array.from(new Set(e.map((e=>e.scale)))).map((e=>{const n="10px Arial",r=it("color-text"),o={scale:e,show:!0,size:Rc,stroke:r,font:n,values:(e,n)=>function(e,t){let n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:"";const r=t[0],o=t[t.length-1];return n?t.map((e=>"".concat(Dc(e,r,o)," ").concat(n))):t.map((e=>Dc(e,r,o)))}(e,n,t)};return e?Number(e)%2||"y"===e?o:{...o,side:1}:{space:80,values:Oc,stroke:r,font:n}})),Rc=(e,t,n,r)=>{var o;const a=e.axes[n];if(r>1)return a._size||60;let i=6+((null===a||void 0===a||null===(o=a.ticks)||void 0===o?void 0:o.size)||0)+(a.gap||0);const l=(null!==t&&void 0!==t?t:[]).reduce(((e,t)=>(null===t||void 0===t?void 0:t.length)>e.length?t:e),"");return""!=l&&(i+=((e,t)=>{const n=document.createElement("span");n.innerText=e,n.style.cssText="position: absolute; z-index: -1; pointer-events: none; opacity: 0; font: ".concat(t),document.body.appendChild(n);const r=n.offsetWidth;return n.remove(),r})(l,"10px Arial")),Math.ceil(i)},Ic=(((e,t,n)=>{const r=[];for(let o=0;oMath.round(e))).join(", "))}r.map((e=>"rgb(".concat(e,")")))})([246,226,219],[127,39,4],16),e=>{for(let t=e.series.length-1;t>=0;t--)e.delSeries(t)}),zc=e=>{Ic(e),(e=>{Object.keys(e.hooks).forEach((t=>{e.hooks[t]=[]}))})(e),e.setData([])},jc=e=>t=>{const n=t.posToVal(t.select.left,"x"),r=t.posToVal(t.select.left+t.select.width,"x");e({min:n,max:r})};function $c(e){const t=xr(Sr[e]);return"rgba(".concat(t,", 0.05)")}let Fc=function(e){return e.BAR="Bars",e.LINE="Lines",e.LINE_STEPPED="Stepped lines",e.POINTS="Points",e}({});const Hc=(e,t,n,r)=>{var o,a;const i=e.under.clientWidth/100-1,l=null===Pc||void 0===Pc||null===(o=Pc.paths)||void 0===o||null===(a=o.bars)||void 0===a?void 0:a.call(o,{size:[.96,i]});return l?l(e,t,n,r):null},Vc=(e,t,n,r)=>{var o,a;const i=null===Pc||void 0===Pc||null===(o=Pc.paths)||void 0===o||null===(a=o.stepped)||void 0===a?void 0:a.call(o,{align:1});return i?i(e,t,n,r):null},Bc=e=>{switch(e){case Fc.BAR:return Hc;case Fc.LINE_STEPPED:return Vc;default:return}},Uc=["color-log-hits-bar-1","color-log-hits-bar-2","color-log-hits-bar-3","color-log-hits-bar-4","color-log-hits-bar-5"],Yc={[Fc.BAR]:1,[Fc.LINE_STEPPED]:2,[Fc.LINE]:1.2,[Fc.POINTS]:0},Wc=e=>{let{data:n,logHits:r,xRange:a,bands:i,containerSize:l,onReadyChart:s,setPlotScale:c,graphOptions:u}=e;const{isDarkTheme:d}=gt(),[h,p]=(0,t.useState)(-1),f=e=>{var t;const n=null!==(t=e.cursor.idx)&&void 0!==t?t:-1;p(n)},m=(0,t.useMemo)((()=>{let e=0;return n.map(((t,n)=>{var o;if(0===n)return{};const a=Object.values((null===r||void 0===r||null===(o=r[n-1])||void 0===o?void 0:o.fields)||{}).map((e=>e||'""')).join(", "),i=it(a?Uc[e]:"color-log-hits-bar-0");return a&&e++,{label:a||"other",width:Yc[u.graphStyle],spanGaps:!0,stroke:i,fill:u.fill?i+"80":"",paths:Bc(u.graphStyle)}}))}),[d,n,u]),_=(0,t.useMemo)((()=>({series:m,bands:i,width:l.width||window.innerWidth/2,height:l.height||200,cursor:{points:{width:(e,t,n)=>n/4,size:(e,t)=>{var n,r,o;return 1.5*((null===(n=e.series)||void 0===n||null===(r=n[t])||void 0===r||null===(o=r.points)||void 0===o?void 0:o.size)||1)},stroke:(e,t)=>{var n;return"".concat((null===m||void 0===m||null===(n=m[t])||void 0===n?void 0:n.stroke)||"#ffffff")},fill:()=>"#ffffff"}},scales:{x:{time:!0,range:()=>[a.min,a.max]}},hooks:{drawSeries:[],ready:[s],setCursor:[f],setSelect:[jc(c)],destroy:[zc]},legend:{show:!1},axes:Lc([{},{scale:"y"}]),tzDate:e=>o()(It(jt(e))).local().toDate()})),[d,m,i]);return{options:_,series:m,focusDataIdx:h}},qc=e=>o()(1e3*e).tz().format(wt),Kc=e=>{let{data:n,focusDataIdx:r,uPlotInst:o}=e;const a=(0,t.useRef)(null),i=(0,t.useMemo)((()=>{var e,t;const a=(null===o||void 0===o?void 0:o.series)||[],[i,...l]=n.map((e=>e[r]||0)),s=i+(n[0][1]-n[0][0]),c=l.map(((e,t)=>{var n;const r=a[t+1],o=null===r||void 0===r||null===(n=r.stroke)||void 0===n?void 0:n.call(r);return{label:(null===r||void 0===r?void 0:r.label)||"other",stroke:o,value:e,show:null===r||void 0===r?void 0:r.show}})).filter((e=>e.value>0&&e.show)).sort(((e,t)=>t.value-e.value));return{point:{top:c[0]&&(null===o||void 0===o||null===(e=o.valToPos)||void 0===e?void 0:e.call(o,c[0].value,"y"))||0,left:(null===o||void 0===o||null===(t=o.valToPos)||void 0===t?void 0:t.call(o,i,"x"))||0},values:c,total:c.reduce(((e,t)=>e+t.value),0),timestamp:"".concat(qc(i)," - ").concat(qc(s))}}),[r,o,n]),l=(0,t.useMemo)((()=>{if(!o||!i.total||!a.current)return;const{top:e,left:t}=i.point,n=parseFloat(o.over.style.left),r=parseFloat(o.over.style.top),{width:l,height:s}=o.over.getBoundingClientRect(),{width:c,height:u}=a.current.getBoundingClientRect(),d={top:e+r+50-(e+u>=s?u+100:0),left:t+n+50-(t+c>=l?c+100:0)};return d.left<0&&(d.left=20),d.top<0&&(d.top=20),d}),[i,o,a.current]);return mt("div",{className:Zn()({"vm-chart-tooltip":!0,"vm-chart-tooltip_hits":!0,"vm-bar-hits-tooltip":!0,"vm-bar-hits-tooltip_visible":-1!==r&&i.values.length}),ref:a,style:l,children:[mt("div",{children:i.values.map(((e,t)=>mt("div",{className:"vm-chart-tooltip-data",children:[mt("span",{className:"vm-chart-tooltip-data__marker",style:{background:e.stroke}}),mt("p",{children:[e.label,": ",mt("b",{children:e.value})]})]},t)))}),i.values.length>1&&mt("div",{className:"vm-chart-tooltip-data",children:mt("p",{children:["Total records: ",mt("b",{children:i.total})]})}),mt("div",{className:"vm-chart-tooltip-header",children:mt("div",{className:"vm-chart-tooltip-header__title",children:i.timestamp})})]})},Zc=e=>{let{period:n,setPeriod:r}=e;const[a,i]=(0,t.useState)({min:n.start,max:n.end});return(0,t.useEffect)((()=>{i({min:n.start,max:n.end})}),[n]),{xRange:a,setPlotScale:e=>{let{min:t,max:n}=e;const a=1e3*(n-t);aEt||r({from:o()(1e3*t).toDate(),to:o()(1e3*n).toDate()})}}},Gc=e=>(e=>e instanceof MouseEvent)(e)?e.clientX:e.touches[0].clientX,Qc=e=>{let{dragSpeed:n=.85,setPanning:r,setPlotScale:o}=e;const a=(0,t.useRef)({leftStart:0,xUnitsPerPx:0,scXMin:0,scXMax:0}),i=e=>{e.preventDefault();const t=Gc(e),{leftStart:r,xUnitsPerPx:i,scXMin:l,scXMax:s}=a.current,c=i*((t-r)*n);o({min:l-c,max:s-c})},l=()=>{r(!1),document.removeEventListener("mousemove",i),document.removeEventListener("mouseup",l),document.removeEventListener("touchmove",i),document.removeEventListener("touchend",l)};return e=>{let{e:t,u:n}=e;t.preventDefault(),r(!0),a.current={leftStart:Gc(t),xUnitsPerPx:n.posToVal(1,"x")-n.posToVal(0,"x"),scXMin:n.scales.x.min||0,scXMax:n.scales.x.max||0},document.addEventListener("mousemove",i),document.addEventListener("mouseup",l),document.addEventListener("touchmove",i),document.addEventListener("touchend",l)}},Jc=e=>{const[n,r]=(0,t.useState)(!1),o=Qc({dragSpeed:.9,setPanning:r,setPlotScale:e});return{onReadyChart:t=>{const n=e=>{const n=e instanceof MouseEvent&&(e=>{const{ctrlKey:t,metaKey:n,button:r}=e;return 0===r&&(t||n)})(e),r=window.TouchEvent&&e instanceof TouchEvent&&e.touches.length>1;(n||r)&&o({u:t,e:e})};t.over.addEventListener("mousedown",n),t.over.addEventListener("touchstart",n),t.over.addEventListener("wheel",(n=>{if(!n.ctrlKey&&!n.metaKey)return;n.preventDefault();const{width:r}=t.over.getBoundingClientRect(),o=t.cursor.left&&t.cursor.left>0?t.cursor.left:0,a=t.posToVal(o,"x"),i=(t.scales.x.max||0)-(t.scales.x.min||0),l=n.deltaY<0?.9*i:i/.9,s=a-o/r*l,c=s+l;t.batch((()=>e({min:s,max:c})))}))},isPanning:n}},Xc=e=>{const t=e[0].clientX-e[1].clientX,n=e[0].clientY-e[1].clientY;return Math.sqrt(t*t+n*n)},eu=e=>{let{uPlotInst:n,xRange:r,setPlotScale:o}=e;const[a,i]=(0,t.useState)(0),l=(0,t.useCallback)((e=>{const{target:t,ctrlKey:a,metaKey:i,key:l}=e,s=t instanceof HTMLInputElement||t instanceof HTMLTextAreaElement;if(!n||s)return;const c="+"===l||"="===l;if(("-"===l||c)&&!(a||i)){e.preventDefault();const t=(r.max-r.min)/10*(c?1:-1);o({min:r.min+t,max:r.max-t})}}),[n,r]),s=(0,t.useCallback)((e=>{if(!n||2!==e.touches.length)return;e.preventDefault();const t=Xc(e.touches),i=a-t,l=n.scales.x.max||r.max,s=n.scales.x.min||r.min,c=(l-s)/50*(i>0?-1:1);n.batch((()=>o({min:s+c,max:l-c})))}),[n,a,r]);return Jn("keydown",l),Jn("touchmove",s),Jn("touchstart",(e=>{2===e.touches.length&&(e.preventDefault(),i(Xc(e.touches)))})),null},tu=e=>{let{onChange:n}=e;const[r,o]=$e(),a=(0,t.useRef)(null),{value:i,toggle:l,setFalse:s}=jr(!1),[c,u]=Or(Fc.LINE_STEPPED,"graph"),[d,h]=Or(!1,"stacked"),[p,f]=Or(!1,"fill"),m=(0,t.useMemo)((()=>({graphStyle:c,stacked:d,fill:p})),[c,d,p]);return(0,t.useEffect)((()=>{n(m)}),[m]),mt("div",{className:"vm-bar-hits-options",ref:a,children:[mt(Ir,{title:"Graph settings",children:mt(Pr,{variant:"text",color:"primary",startIcon:mt(pn,{}),onClick:l,ariaLabel:"settings"})}),mt(Qr,{open:i,placement:"bottom-right",onClose:s,buttonRef:a,title:"Graph settings",children:mt("div",{className:"vm-bar-hits-options-settings",children:[mt("div",{className:"vm-bar-hits-options-settings-item vm-bar-hits-options-settings-item_list",children:[mt("p",{className:"vm-bar-hits-options-settings-item__title",children:"Graph style:"}),Object.values(Fc).map((e=>{return mt("div",{className:Zn()({"vm-list-item":!0,"vm-list-item_active":c===e}),onClick:(t=e,()=>{u(t),r.set("graph",t),o(r)}),children:e},e);var t}))]}),mt("div",{className:"vm-bar-hits-options-settings-item",children:mt(zr,{label:"Stacked",value:d,onChange:e=>{h(e),e?r.set("stacked","true"):r.delete("stacked"),o(r)}})}),mt("div",{className:"vm-bar-hits-options-settings-item",children:mt(zr,{label:"Fill",value:p,onChange:e=>{f(e),e?r.set("fill","true"):r.delete("fill"),o(r)}})})]})})]})};const nu=function(e,t){const n=[];let r=[];const o=e[0].length,a=Array(o);for(let i=0;ia[t]+=+(null!==e&&void 0!==e?e:0))));for(let i=1;in>i&&!t(n))),i]});return r=r.filter((e=>e.series[1]>-1)),{data:[e[0]].concat(n),bands:r}},ru=e=>{let{uPlotInst:n,onApplyFilter:r}=e;const[o,a]=(0,t.useState)([]),[i,l]=(0,t.useState)([]),s=(0,t.useCallback)((()=>{const e=n.series.filter((e=>"x"!==e.scale));a(e),l(e.map((e=>Jr(e.label||""))))}),[n]),c=e=>t=>{(t.metaKey||t.ctrlKey)&&(r("{".concat(e,"}")||0),s(),n.redraw())};return(0,t.useEffect)(s,[n]),mt("div",{className:"vm-bar-hits-legend",children:o.map(((e,t)=>{var r,o;return mt(Ir,{title:mt("ul",{className:"vm-bar-hits-legend-info",children:[mt("li",{children:["Click to ",e.show?"hide":"show"," the _stream."]}),mt("li",{children:[gr()?"Cmd":"Ctrl"," + Click to filter by the _stream."]})]}),children:mt("div",{className:Zn()({"vm-bar-hits-legend-item":!0,"vm-bar-hits-legend-item_hide":!e.show}),onClick:(o=e,e=>{e.metaKey||e.ctrlKey||(o.show=!o.show,s(),n.redraw())}),children:[mt("div",{className:"vm-bar-hits-legend-item__marker",style:{backgroundColor:"".concat(null===e||void 0===e||null===(r=e.stroke)||void 0===r?void 0:r.call(e))}}),mt("div",{className:"vm-bar-hits-legend-item-pairs",children:i[t].map((e=>mt("span",{className:"vm-bar-hits-legend-item-pairs__value",onClick:c(e),children:e},e)))})]})},e.label)}))})},ou=e=>{let{logHits:n,data:r,period:o,setPeriod:a,onApplyFilter:i}=e;const[l,s]=Ra(),c=(0,t.useRef)(null),[u,d]=(0,t.useState)(),[h,p]=(0,t.useState)({graphStyle:Fc.LINE_STEPPED,stacked:!1,fill:!1}),{xRange:f,setPlotScale:m}=Zc({period:o,setPeriod:a}),{onReadyChart:_,isPanning:g}=Jc(m);eu({uPlotInst:u,xRange:f,setPlotScale:m});const{data:v,bands:y}=(0,t.useMemo)((()=>h.stacked?nu(r,(()=>!1)):{data:r,bands:[]}),[h,r]),{options:b,series:w,focusDataIdx:k}=Wc({data:v,logHits:n,bands:y,xRange:f,containerSize:s,onReadyChart:_,setPlotScale:m,graphOptions:h});return(0,t.useEffect)((()=>{u&&(Ic(u),function(e,t){let n=arguments.length>2&&void 0!==arguments[2]&&arguments[2];t.forEach((t=>{t.label&&(t.spanGaps=n),e.addSeries(t)}))}(u,w,!0),((e,t)=>{if(e.delBand(),t.length<2)return;const n=t.map(((e,t)=>({...e,index:t}))),r=n.filter((e=>e.forecast===tt.yhatUpper)),o=n.filter((e=>e.forecast===tt.yhatLower)),a=r.map((e=>{const t=o.find((t=>t.forecastGroup===e.forecastGroup));return t?{series:[e.index,t.index],fill:$c(tt.yhatUpper)}:null})).filter((e=>null!==e));a.length&&a.forEach((t=>{e.addBand(t)}))})(u,w),u.redraw())}),[w]),(0,t.useEffect)((()=>{if(!c.current)return;const e=new Pc(b,v,c.current);return d(e),()=>e.destroy()}),[c.current,b]),(0,t.useEffect)((()=>{u&&(u.scales.x.range=()=>[f.min,f.max],u.redraw())}),[f]),(0,t.useEffect)((()=>{u&&(u.setSize(s),u.redraw())}),[s]),(0,t.useEffect)((()=>{u&&(u.setData(v),u.redraw())}),[v]),mt("div",{className:"vm-bar-hits-chart__wrapper",children:[mt("div",{className:Zn()({"vm-bar-hits-chart":!0,"vm-bar-hits-chart_panning":g}),ref:l,children:[mt("div",{className:"vm-line-chart__u-plot",ref:c}),mt(Kc,{uPlotInst:u,data:r,focusDataIdx:k})]}),mt(tu,{onChange:p}),u&&mt(ru,{uPlotInst:u,onApplyFilter:i})]})},au=e=>{let{logHits:n,period:r,error:a,isLoading:i,onApplyFilter:l}=e;const{isMobile:s}=vr(),c=Qt(),u=(0,t.useMemo)((()=>{if(!n.length)return[[],[]];const e=Array.from(new Set(n.map((e=>e.timestamps)).flat())),t=(e=>e.map((e=>e?o()(e).unix():null)).filter(Boolean).sort(((e,t)=>e-t)))(e),r=((e,t)=>e.map((e=>t.map((t=>{const n=e.timestamps.findIndex((e=>e===t));return-1===n?null:e.values[n]||null})))))(n,e);return[t,...r]}),[n]),d=(0,t.useMemo)((()=>{const e=u.every((e=>0===e.length)),t=0===u[0].length,n=0===u[1].length;return e?"No logs volume available\nNo volume information available for the current queries and time range.":t?"No timestamp information available for the current queries and time range.":n?"No value information available for the current queries and time range.":""}),[u]);return mt("section",{className:Zn()({"vm-explore-logs-chart":!0,"vm-block":!0,"vm-block_mobile":s}),children:[i&&mt(_a,{message:"Loading hits stats...",containerStyles:{position:"absolute"}}),!a&&d&&mt("div",{className:"vm-explore-logs-chart__empty",children:mt(br,{variant:"info",children:d})}),a&&d&&mt("div",{className:"vm-explore-logs-chart__empty",children:mt(br,{variant:"error",children:a})}),u&&mt(ou,{logHits:n,data:u,period:r,setPeriod:e=>{let{from:t,to:n}=e;c({type:"SET_PERIOD",payload:{from:t,to:n}})},onApplyFilter:l})]})},iu=(e,n)=>{const[r]=$e(),[a,i]=(0,t.useState)([]),[l,s]=(0,t.useState)([]),[c,u]=(0,t.useState)(),d=(0,t.useRef)(new AbortController),h=(0,t.useMemo)((()=>(e=>"".concat(e,"/select/logsql/hits"))(e)),[e]),p=(e,t)=>(e.total=(e.total||0)+(t.total||0),t.timestamps.forEach(((n,r)=>{const o=e.timestamps.findIndex((e=>e===n));-1===o?(e.timestamps.push(n),e.values.push(t.values[r])):e.values[o]+=t.values[r]})),e),f=(0,t.useCallback)((async e=>{d.current.abort(),d.current=new AbortController;const{signal:t}=d.current,a=Date.now();s((e=>({...e,[a]:!0}))),u(void 0);try{const l=((e,t,n)=>{const a=o()(1e3*t.start),i=o()(1e3*t.end),l=i.diff(a,"milliseconds"),s=Math.ceil(l/100)||1;return{signal:n,method:"POST",headers:{AccountID:r.get("accountID")||"0",ProjectID:r.get("projectID")||"0"},body:new URLSearchParams({query:e.trim(),step:"".concat(s,"ms"),start:a.toISOString(),end:i.toISOString(),field:"_stream"})}})(n,e,t),c=await fetch(h,l);if(!c.ok||!c.body){const e=await c.text();return u(e),i([]),void s((e=>({...e,[a]:!1})))}const d=await c.json(),f=null===d||void 0===d?void 0:d.hits;if(!f){u("Error: No 'hits' field in response")}i(f?(e=>{const t=e.sort(((e,t)=>(t.total||0)-(e.total||0))),n=[],r=t.slice(5).reduce(p,{fields:{},timestamps:[],values:[],total:0});r.total&&n.push(r);const o=t.slice(0,5);return o.length&&n.push(...o),n})(f):[])}catch(Fd){Fd instanceof Error&&"AbortError"!==Fd.name&&(u(String(Fd)),console.error(Fd),i([]))}s((e=>({...e,[a]:!1})))}),[h,n,r]);return{logHits:a,isLoading:Object.values(l).some((e=>e)),error:c,fetchLogHits:f}},lu=Number(We("LOGS_LIMIT")),su=isNaN(lu)?50:lu,cu=()=>{const{serverUrl:e}=gt(),{duration:n,relativeTime:r,period:o}=Gt(),{setSearchParamsFromKeys:a}=Lr(),[i,l]=Or(su,"limit"),[s,c]=Or("*","query"),[u,d]=(0,t.useState)(""),[h,p]=(0,t.useState)(o),[f,m]=(0,t.useState)(""),{logs:_,isLoading:g,error:v,fetchLogs:y}=ma(e,s,i),{fetchLogHits:b,...w}=iu(e,s),k=(0,t.useCallback)((()=>{const e=Ft.find((e=>e.id===r));if(!e)return o;const{duration:t,until:n}=e;return Lt(t,n())}),[o,r]),x=()=>{if(!s)return void m(rt.validQuery);m("");const e=k();p(e),y(e).then((t=>{t&&b(e)})).catch((e=>e)),a({query:s,"g0.range_input":n,"g0.end_input":e.date,"g0.relative_time":r||"none"})};return(0,t.useEffect)((()=>{s&&x()}),[o]),(0,t.useEffect)((()=>{x(),d(s)}),[s]),mt("div",{className:"vm-explore-logs",children:[mt(La,{query:u,error:f,limit:i,onChange:d,onChangeLimit:e=>{l(e),a({limit:e}),Ye("LOGS_LIMIT","".concat(e))},onRun:()=>{c(u),x()}}),g&&mt(_a,{message:"Loading logs..."}),v&&mt(br,{variant:"error",children:v}),!v&&mt(au,{...w,query:s,period:h,onApplyFilter:e=>{c((t=>"_stream: ".concat("other"===e?"{}":e," AND (").concat(t,")")))},isLoading:!g&&w.isLoading}),mt(fa,{data:_})]})},uu={home:"/",metrics:"/metrics",dashboards:"/dashboards",cardinality:"/cardinality",topQueries:"/top-queries",trace:"/trace",withTemplate:"/expand-with-exprs",relabel:"/relabeling",logs:"/logs",activeQueries:"/active-queries",queryAnalyzer:"/query-analyzer",icons:"/icons",anomaly:"/anomaly",query:"/query"},{REACT_APP_TYPE:du}={REACT_APP_TYPE:"logs"},hu=du===Ue.logs,pu={header:{tenant:!0,stepControl:!hu,timeSelector:!hu,executionControls:!hu}},fu={[uu.home]:{title:"Query",...pu},[uu.metrics]:{title:"Explore Prometheus metrics",header:{tenant:!0,stepControl:!0,timeSelector:!0}},[uu.cardinality]:{title:"Explore cardinality",header:{tenant:!0,cardinalityDatePicker:!0}},[uu.topQueries]:{title:"Top queries",header:{tenant:!0}},[uu.trace]:{title:"Trace analyzer",header:{}},[uu.queryAnalyzer]:{title:"Query analyzer",header:{}},[uu.dashboards]:{title:"Dashboards",...pu},[uu.withTemplate]:{title:"WITH templates",header:{}},[uu.relabel]:{title:"Metric relabel debug",header:{}},[uu.logs]:{title:"Logs Explorer",header:{}},[uu.activeQueries]:{title:"Active Queries",header:{}},[uu.icons]:{title:"Icons",header:{}},[uu.anomaly]:{title:"Anomaly exploration",...pu},[uu.query]:{title:"Query",...pu}},mu=uu;let _u=function(e){return e[e.internalLink=0]="internalLink",e[e.externalLink=1]="externalLink",e}({});const gu={label:"Explore",submenu:[{label:fu[mu.metrics].title,value:mu.metrics},{label:fu[mu.cardinality].title,value:mu.cardinality},{label:fu[mu.topQueries].title,value:mu.topQueries},{label:fu[mu.activeQueries].title,value:mu.activeQueries}]},vu={label:"Tools",submenu:[{label:fu[mu.trace].title,value:mu.trace},{label:fu[mu.queryAnalyzer].title,value:mu.queryAnalyzer},{label:fu[mu.withTemplate].title,value:mu.withTemplate},{label:fu[mu.relabel].title,value:mu.relabel}]},yu=[{label:fu[mu.logs].title,value:mu.home}],bu=[{label:fu[mu.anomaly].title,value:mu.home}],wu=[{label:fu[mu.home].title,value:mu.home},gu,vu],ku=e=>{let{activeMenu:t,label:n,value:r,type:o,color:a}=e;return o===_u.externalLink?mt("a",{className:Zn()({"vm-header-nav-item":!0,"vm-header-nav-item_active":t===r}),style:{color:a},href:r,target:"_blank",rel:"noreferrer",children:n}):mt(Re,{className:Zn()({"vm-header-nav-item":!0,"vm-header-nav-item_active":t===r}),style:{color:a},to:r,children:n})},xu=e=>{let{activeMenu:n,label:r,color:o,background:a,submenu:i,direction:l}=e;const{pathname:s}=ne(),[c,u]=(0,t.useState)(null),d=(0,t.useRef)(null),{value:h,setFalse:p,setTrue:f}=jr(!1),m=()=>{c&&clearTimeout(c);const e=setTimeout(p,300);u(e)};return(0,t.useEffect)((()=>{p()}),[s]),"column"===l?mt(pt.FK,{children:i.map((e=>mt(ku,{activeMenu:n,value:e.value||"",label:e.label||"",type:e.type||_u.internalLink},e.value)))}):mt("div",{className:Zn()({"vm-header-nav-item":!0,"vm-header-nav-item_sub":!0,"vm-header-nav-item_open":h,"vm-header-nav-item_active":i.find((e=>e.value===n))}),style:{color:o},onMouseEnter:()=>{f(),c&&clearTimeout(c)},onMouseLeave:m,ref:d,children:[r,mt(kn,{}),mt(Qr,{open:h,placement:"bottom-left",offset:{top:12,left:0},onClose:p,buttonRef:d,children:mt("div",{className:"vm-header-nav-item-submenu",style:{background:a},onMouseLeave:m,onMouseEnter:()=>{c&&clearTimeout(c)},children:i.map((e=>mt(ku,{activeMenu:n,value:e.value||"",label:e.label||"",color:o,type:e.type||_u.internalLink},e.value)))})})]})},Su=e=>{let{color:n,background:r,direction:o}=e;const a=He(),{dashboardsSettings:i}=(0,t.useContext)(dr).state,{pathname:l}=ne(),{serverUrl:s,flags:c}=gt(),[u,d]=(0,t.useState)(l),h=(0,t.useMemo)((()=>{switch("logs"){case Ue.logs:return yu;case Ue.anomaly:return bu;default:return[...wu,{label:fu[mu.dashboards].title,value:mu.dashboards,hide:a||!i.length},{label:"Alerts",value:"".concat(s,"/vmalert"),type:_u.externalLink,hide:!Object.keys(c).includes("vmalert.proxyURL")}].filter((e=>!e.hide))}}),[a,i]);return(0,t.useEffect)((()=>{d(l)}),[l]),mt("nav",{className:Zn()({"vm-header-nav":!0,["vm-header-nav_".concat(o)]:o}),children:h.map((e=>e.submenu?mt(xu,{activeMenu:u,label:e.label||"",submenu:e.submenu,color:n,background:r,direction:o},e.label):mt(ku,{activeMenu:u,value:e.value||"",label:e.label||"",color:n,type:e.type||_u.internalLink},e.value)))})},Au=mt("code",{children:gr()?"Cmd":"Ctrl"}),Eu=[{title:"Zoom in",description:mt(pt.FK,{children:["To zoom in, hold down the ",Au," + ",mt("code",{children:"scroll up"}),", or press the ",mt("code",{children:"+"}),". Also, you can zoom in on a range on the graph by holding down your mouse button and selecting the range."]})},{title:"Zoom out",description:mt(pt.FK,{children:["To zoom out, hold down the ",Au," + ",mt("code",{children:"scroll down"}),", or press the ",mt("code",{children:"-"}),"."]})},{title:"Move horizontal axis",description:mt(pt.FK,{children:["To move the graph, hold down the ",Au," + ",mt("code",{children:"drag"})," the graph to the right or left."]})},{title:"Fixing a tooltip",description:mt(pt.FK,{children:["To fix the tooltip, ",mt("code",{children:"click"})," mouse when it's open. Then, you can drag the fixed tooltip by ",mt("code",{children:"clicking"})," and ",mt("code",{children:"dragging"})," on the ",mt(Ln,{})," icon."]})},{title:"Set a custom range for the vertical axis",description:mt(pt.FK,{children:["To set a custom range for the vertical axis, click on the ",mt(pn,{})," icon located in the upper right corner of the graph, activate the toggle, and set the values."]})}],Cu=[{title:"Show/hide a legend item",description:mt(pt.FK,{children:[mt("code",{children:"click"})," on a legend item to isolate it on the graph.",Au," + ",mt("code",{children:"click"})," on a legend item to remove it from the graph. To revert to the previous state, click again."]})},{title:"Copy label key-value pairs",description:mt(pt.FK,{children:[mt("code",{children:"click"})," on a label key-value pair to save it to the clipboard."]})},{title:"Collapse/Expand the legend group",description:mt(pt.FK,{children:[mt("code",{children:"click"})," on the group name (e.g. ",mt("b",{children:'Query 1: {__name__!=""}'}),") to collapse or expand the legend."]})}],Mu=Eu.concat(Cu),Nu=()=>{const{value:e,setFalse:t,setTrue:n}=jr(!1);return mt(pt.FK,{children:[mt(Ir,{title:"Show tips on working with the graph",children:mt(Pr,{variant:"text",color:"gray",startIcon:mt($n,{}),onClick:n,ariaLabel:"open the tips"})}),e&&mt(Hr,{title:"Tips on working with the graph and the legend",onClose:t,children:mt("div",{className:"fc-graph-tips",children:Mu.map((e=>{let{title:t,description:n}=e;return mt("div",{className:"fc-graph-tips-item",children:[mt("h4",{className:"fc-graph-tips-item__action",children:t}),mt("p",{className:"fc-graph-tips-item__description",children:n})]},t)}))})})]})},Tu=mt("code",{children:gr()?"Cmd":"Ctrl"}),Pu=mt(pt.FK,{children:[mt("code",{children:gr()?"Option":"Ctrl"})," + ",mt("code",{children:"Space"})]}),Du=[{title:"Query",list:[{keys:mt("code",{children:"Enter"}),description:"Run"},{keys:mt(pt.FK,{children:[mt("code",{children:"Shift"})," + ",mt("code",{children:"Enter"})]}),description:"Multi-line queries"},{keys:mt(pt.FK,{children:[Tu," + ",mt("code",{children:"Arrow Up"})]}),description:"Previous command from the Query history"},{keys:mt(pt.FK,{children:[Tu," + ",mt("code",{children:"Arrow Down"})]}),description:"Next command from the Query history"},{keys:mt(pt.FK,{children:[Tu," + ",mt("code",{children:"click"})," by ",mt(Dn,{})]}),description:"Toggle multiple queries"},{keys:Pu,description:"Show quick autocomplete tips"}]},{title:"Graph",readMore:mt(Nu,{}),list:[{keys:mt(pt.FK,{children:[Tu," + ",mt("code",{children:"scroll Up"})," or ",mt("code",{children:"+"})]}),description:"Zoom in"},{keys:mt(pt.FK,{children:[Tu," + ",mt("code",{children:"scroll Down"})," or ",mt("code",{children:"-"})]}),description:"Zoom out"},{keys:mt(pt.FK,{children:[Tu," + ",mt("code",{children:"drag"})]}),description:"Move the graph left/right"},{keys:mt(pt.FK,{children:mt("code",{children:"click"})}),description:"Select the series in the legend"},{keys:mt(pt.FK,{children:[Tu," + ",mt("code",{children:"click"})]}),description:"Toggle multiple series in the legend"}]}],Ou="Shortcut keys",Lu=gr(),Ru=Lu?"Cmd + /":"F1",Iu=e=>{let{showTitle:n}=e;const r=He(),{value:o,setTrue:a,setFalse:i}=jr(!1),l=(0,t.useCallback)((e=>{const t=Lu&&"/"===e.key&&e.metaKey,n=!Lu&&"F1"===e.key&&!e.metaKey;(t||n)&&a()}),[a]);return Jn("keydown",l),mt(pt.FK,{children:[mt(Ir,{open:!0!==n&&void 0,title:"".concat(Ou," (").concat(Ru,")"),placement:"bottom-center",children:mt(Pr,{className:r?"":"vm-header-button",variant:"contained",color:"primary",startIcon:mt(En,{}),onClick:a,ariaLabel:Ou,children:n&&Ou})}),o&&mt(Hr,{title:"Shortcut keys",onClose:i,children:mt("div",{className:"vm-shortcuts",children:Du.map((e=>mt("div",{className:"vm-shortcuts-section",children:[e.readMore&&mt("div",{className:"vm-shortcuts-section__read-more",children:e.readMore}),mt("h3",{className:"vm-shortcuts-section__title",children:e.title}),mt("div",{className:"vm-shortcuts-section-list",children:e.list.map(((t,n)=>mt("div",{className:"vm-shortcuts-section-list-item",children:[mt("div",{className:"vm-shortcuts-section-list-item__key",children:t.keys}),mt("p",{className:"vm-shortcuts-section-list-item__description",children:t.description})]},"".concat(e.title,"_").concat(n))))})]},e.title)))})})]})},zu=e=>{let{open:t}=e;return mt("button",{className:Zn()({"vm-menu-burger":!0,"vm-menu-burger_opened":t}),"aria-label":"menu",children:mt("span",{})})},{REACT_APP_TYPE:ju}={REACT_APP_TYPE:"logs"},$u=ju===Ue.logs,Fu=e=>{let{background:n,color:r}=e;const{pathname:o}=ne(),{isMobile:a}=vr(),i=(0,t.useRef)(null),{value:l,toggle:s,setFalse:c}=jr(!1);return(0,t.useEffect)(c,[o]),Gr(i,c),mt("div",{className:"vm-header-sidebar",ref:i,children:[mt("div",{className:Zn()({"vm-header-sidebar-button":!0,"vm-header-sidebar-button_open":l}),onClick:s,children:mt(zu,{open:l})}),mt("div",{className:Zn()({"vm-header-sidebar-menu":!0,"vm-header-sidebar-menu_open":l}),children:[mt("div",{children:mt(Su,{color:r,background:n,direction:"column"})}),mt("div",{className:"vm-header-sidebar-menu-settings",children:!a&&!$u&&mt(Iu,{showTitle:!0})})]})]})},Hu=e=>{let{controlsComponent:n,isMobile:r,...o}=e;const a=He(),{pathname:i}=ne(),{accountIds:l}=(()=>{const{useTenantID:e}=Fe(),n=He(),{serverUrl:r}=gt(),[o,a]=(0,t.useState)(!1),[i,l]=(0,t.useState)(),[s,c]=(0,t.useState)([]),u=(0,t.useMemo)((()=>"".concat(r.replace(/^(.+)(\/select.+)/,"$1"),"/admin/tenants")),[r]),d=(0,t.useMemo)((()=>!!Be(r)),[r]),h=n?!e:!d;return(0,t.useEffect)((()=>{h||(async()=>{a(!0);try{const e=await fetch(u),t=await e.json(),n=t.data||[];c(n.sort(((e,t)=>e.localeCompare(t)))),e.ok?l(void 0):l("".concat(t.errorType,"\r\n").concat(null===t||void 0===t?void 0:t.error))}catch(Fd){Fd instanceof Error&&l("".concat(Fd.name,": ").concat(Fd.message))}a(!1)})().catch(console.error)}),[u]),{accountIds:s,isLoading:o,error:i}})(),{value:s,toggle:c,setFalse:u}=jr(!1),d=mt(n,{...o,isMobile:r,accountIds:l,headerSetup:(0,t.useMemo)((()=>(fu[i]||{}).header||{}),[i])});return r?mt(pt.FK,{children:[mt("div",{children:mt(Pr,{className:Zn()({"vm-header-button":!a}),startIcon:mt(jn,{}),onClick:c,ariaLabel:"controls"})}),mt(Hr,{title:"Controls",onClose:u,isOpen:s,className:Zn()({"vm-header-controls-modal":!0,"vm-header-controls-modal_open":s}),children:d})]}):d},{REACT_APP_TYPE:Vu}={REACT_APP_TYPE:"logs"},Bu=Vu===Ue.logs||Vu===Ue.anomaly,Uu=()=>{switch(Vu){case Ue.logs:return mt(un,{});case Ue.anomaly:return mt(dn,{});default:return mt(cn,{})}},Yu=e=>{let{controlsComponent:n}=e;const{isMobile:r}=vr(),o=Xn(),a=(0,t.useMemo)((()=>window.innerWidth<1e3),[o]),{isDarkTheme:i}=gt(),l=He(),s=(0,t.useMemo)((()=>it(i?"color-background-block":"color-primary")),[i]),{background:c,color:u}=(0,t.useMemo)((()=>{const{headerStyles:{background:e=(l?"#FFF":s),color:t=(l?s:"#FFF")}={}}=Fe();return{background:e,color:t}}),[s]),d=oe(),h=()=>{d({pathname:mu.home}),window.location.reload()};return mt("header",{className:Zn()({"vm-header":!0,"vm-header_app":l,"vm-header_dark":i,"vm-header_sidebar":a,"vm-header_mobile":r}),style:{background:c,color:u},children:[a?mt(Fu,{background:c,color:u}):mt(pt.FK,{children:[!l&&mt("div",{className:Zn()({"vm-header-logo":!0,"vm-header-logo_logs":Bu}),onClick:h,style:{color:u},children:mt(Uu,{})}),mt(Su,{color:u,background:c})]}),a&&mt("div",{className:Zn()({"vm-header-logo":!0,"vm-header-logo_mobile":!0,"vm-header-logo_logs":Bu}),onClick:h,style:{color:u},children:mt(Uu,{})}),mt(Hu,{controlsComponent:n,displaySidebar:a,isMobile:r})]})},Wu={href:"https://github.com/VictoriaMetrics/VictoriaMetrics/issues/new/choose",Icon:()=>mt("svg",{viewBox:"0 0 24 24",fill:"currentColor",children:mt("path",{d:"M12 2C6.49 2 2 6.49 2 12s4.49 10 10 10 10-4.49 10-10S17.51 2 12 2zm0 18c-4.41 0-8-3.59-8-8s3.59-8 8-8 8 3.59 8 8-3.59 8-8 8zm3-8c0 1.66-1.34 3-3 3s-3-1.34-3-3 1.34-3 3-3 3 1.34 3 3z"})}),title:"Create an issue"},qu=[{href:"https://docs.victoriametrics.com/MetricsQL.html",Icon:Tn,title:"MetricsQL"},{href:"https://docs.victoriametrics.com/#vmui",Icon:Rn,title:"Documentation"},Wu],Ku=[{href:"https://docs.victoriametrics.com/victorialogs/logsql/",Icon:Tn,title:"LogsQL"},{href:"https://docs.victoriametrics.com/victorialogs/",Icon:Rn,title:"Documentation"},Wu],Zu=(0,t.memo)((e=>{let{links:t=qu}=e;const n="2019-".concat((new Date).getFullYear());return mt("footer",{className:"vm-footer",children:[mt("a",{className:"vm-link vm-footer__website",target:"_blank",href:"https://victoriametrics.com/",rel:"me noreferrer",children:[mt(hn,{}),"victoriametrics.com"]}),t.map((e=>{let{href:t,Icon:n,title:r}=e;return mt("a",{className:"vm-link vm-footer__link",target:"_blank",href:t,rel:"help noreferrer",children:[mt(n,{}),r]},"".concat(t,"-").concat(r))})),mt("div",{className:"vm-footer__copyright",children:["\xa9 ",n," VictoriaMetrics"]})]})})),Gu=Zu,Qu="Enable to save the modified server URL to local storage, preventing reset upon page refresh.",Ju="Disable to stop saving the server URL to local storage, reverting to the default URL on page refresh.",Xu=(0,t.forwardRef)(((e,n)=>{let{onClose:r}=e;const{serverUrl:o}=gt(),a=vt(),{value:i,toggle:l}=jr(!!We("SERVER_URL")),[s,c]=(0,t.useState)(o),[u,d]=(0,t.useState)(""),h=(0,t.useCallback)((()=>{const e=Be(s);""!==e&&a({type:"SET_TENANT_ID",payload:e}),a({type:"SET_SERVER",payload:s}),r()}),[s]);return(0,t.useEffect)((()=>{o||d(rt.emptyServer),(e=>{let t;try{t=new URL(e)}catch(n){return!1}return"http:"===t.protocol||"https:"===t.protocol})(o)||d(rt.validServer)}),[o]),(0,t.useEffect)((()=>{i?Ye("SERVER_URL",s):qe(["SERVER_URL"])}),[i]),(0,t.useEffect)((()=>{i&&Ye("SERVER_URL",s)}),[s]),(0,t.useEffect)((()=>{o!==s&&c(o)}),[o]),(0,t.useImperativeHandle)(n,(()=>({handleApply:h})),[h]),mt("div",{children:[mt("div",{className:"vm-server-configurator__title",children:"Server URL"}),mt("div",{className:"vm-server-configurator-url",children:[mt(Fr,{autofocus:!0,value:s,error:u,onChange:e=>{c(e||""),d("")},onEnter:h,inputmode:"url"}),mt(Ir,{title:i?Ju:Qu,children:mt(Pr,{className:"vm-server-configurator-url__button",variant:"text",color:i?"primary":"gray",onClick:l,startIcon:mt(zn,{})})})]})]})})),ed=[{label:"Graph",type:nt.chart},{label:"JSON",type:nt.code},{label:"Table",type:nt.table}],td=(0,t.forwardRef)(((e,n)=>{let{onClose:r}=e;const{isMobile:o}=vr(),{seriesLimits:a}=(0,t.useContext)(ar).state,i=(0,t.useContext)(ar).dispatch,[l,s]=(0,t.useState)(a),[c,u]=(0,t.useState)({table:"",chart:"",code:""}),d=(0,t.useCallback)((()=>{i({type:"SET_SERIES_LIMITS",payload:l}),r()}),[l]);return(0,t.useImperativeHandle)(n,(()=>({handleApply:d})),[d]),mt("div",{className:"vm-limits-configurator",children:[mt("div",{className:"vm-server-configurator__title",children:["Series limits by tabs",mt(Ir,{title:"Set to 0 to disable the limit",children:mt(Pr,{variant:"text",color:"primary",size:"small",startIcon:mt(_n,{})})}),mt("div",{className:"vm-limits-configurator-title__reset",children:mt(Pr,{variant:"text",color:"primary",size:"small",startIcon:mt(mn,{}),onClick:()=>{s(Xe)},children:"Reset limits"})})]}),mt("div",{className:Zn()({"vm-limits-configurator__inputs":!0,"vm-limits-configurator__inputs_mobile":o}),children:ed.map((e=>{return mt("div",{children:mt(Fr,{label:e.label,value:l[e.type],error:c[e.type],onChange:(t=e.type,e=>{const n=e||"";u((e=>({...e,[t]:+n<0?rt.positiveNumber:""}))),s({...l,[t]:n||1/0})}),onEnter:d,type:"number"})},e.type);var t}))})]})})),nd=td,rd=()=>mt(Ir,{title:"Browser timezone is not recognized, supported, or could not be determined.",children:mt(gn,{})}),od=Yt(),ad=(0,t.forwardRef)(((e,n)=>{const{isMobile:r}=vr(),o=Bt(),{timezone:a,defaultTimezone:i}=Gt(),l=Qt(),[s,c]=(0,t.useState)(a),[u,d]=(0,t.useState)(""),h=(0,t.useRef)(null),{value:p,toggle:f,setFalse:m}=jr(!1),_=(0,t.useMemo)((()=>[{title:"Default time (".concat(i,")"),region:i,utc:i?Vt(i):"UTC"},{title:od.title,region:od.region,utc:Vt(od.region),isInvalid:!od.isValid},{title:"UTC (Coordinated Universal Time)",region:"UTC",utc:"UTC"}].filter((e=>e.region))),[i]),g=(0,t.useMemo)((()=>{if(!u)return o;try{return Bt(u)}catch(Fd){return{}}}),[u,o]),v=(0,t.useMemo)((()=>Object.keys(g)),[g]),y=(0,t.useMemo)((()=>({region:s,utc:Vt(s)})),[s]),b=e=>()=>{(e=>{c(e.region),d(""),m()})(e)};return(0,t.useEffect)((()=>{c(a)}),[a]),(0,t.useImperativeHandle)(n,(()=>({handleApply:()=>{l({type:"SET_TIMEZONE",payload:s})}})),[s]),mt("div",{className:"vm-timezones",children:[mt("div",{className:"vm-server-configurator__title",children:"Time zone"}),mt("div",{className:"vm-timezones-item vm-timezones-item_selected",onClick:f,ref:h,children:[mt("div",{className:"vm-timezones-item__title",children:y.region}),mt("div",{className:"vm-timezones-item__utc",children:y.utc}),mt("div",{className:Zn()({"vm-timezones-item__icon":!0,"vm-timezones-item__icon_open":p}),children:mt(kn,{})})]}),mt(Qr,{open:p,buttonRef:h,placement:"bottom-left",onClose:m,fullWidth:!0,title:r?"Time zone":void 0,children:mt("div",{className:Zn()({"vm-timezones-list":!0,"vm-timezones-list_mobile":r}),children:[mt("div",{className:"vm-timezones-list-header",children:[mt("div",{className:"vm-timezones-list-header__search",children:mt(Fr,{autofocus:!0,label:"Search",value:u,onChange:e=>{d(e)}})}),_.map(((e,t)=>e&&mt("div",{className:"vm-timezones-item vm-timezones-list-group-options__item",onClick:b(e),children:[mt("div",{className:"vm-timezones-item__title",children:[e.title,e.isInvalid&&mt(rd,{})]}),mt("div",{className:"vm-timezones-item__utc",children:e.utc})]},"".concat(t,"_").concat(e.region))))]}),v.map((e=>mt("div",{className:"vm-timezones-list-group",children:mt(Kr,{defaultExpanded:!0,title:mt("div",{className:"vm-timezones-list-group__title",children:e}),children:mt("div",{className:"vm-timezones-list-group-options",children:g[e]&&g[e].map((e=>mt("div",{className:"vm-timezones-item vm-timezones-list-group-options__item",onClick:b(e),children:[mt("div",{className:"vm-timezones-item__title",children:e.region}),mt("div",{className:"vm-timezones-item__utc",children:e.utc})]},e.search)))})})},e)))]})})]})})),id=ad,ld=e=>{let{options:n,value:r,label:o,onChange:a}=e;const i=(0,t.useRef)(null),[l,s]=(0,t.useState)({width:"0px",left:"0px",borderRadius:"0px"}),c=e=>()=>{a(e)};return(0,t.useEffect)((()=>{if(!i.current)return void s({width:"0px",left:"0px",borderRadius:"0px"});const e=n.findIndex((e=>e.value===r)),{width:t}=i.current.getBoundingClientRect();let o=t,a=e*o,l="0";0===e&&(l="16px 0 0 16px"),e===n.length-1&&(l="10px",a-=1,l="0 16px 16px 0"),0!==e&&e!==n.length-1&&(o+=1,a-=1),s({width:"".concat(o,"px"),left:"".concat(a,"px"),borderRadius:l})}),[i,r,n]),mt("div",{className:"vm-toggles",children:[o&&mt("label",{className:"vm-toggles__label",children:o}),mt("div",{className:"vm-toggles-group",style:{gridTemplateColumns:"repeat(".concat(n.length,", 1fr)")},children:[l.borderRadius&&mt("div",{className:"vm-toggles-group__highlight",style:l}),n.map(((e,t)=>mt("div",{className:Zn()({"vm-toggles-group-item":!0,"vm-toggles-group-item_first":0===t,"vm-toggles-group-item_active":e.value===r,"vm-toggles-group-item_icon":e.icon&&e.title}),onClick:c(e.value),ref:e.value===r?i:null,children:[e.icon,e.title]},e.value)))]})]})},sd=Object.values(ot).map((e=>({title:e,value:e}))),cd=()=>{const{isMobile:e}=vr(),t=vt(),{theme:n}=gt();return mt("div",{className:Zn()({"vm-theme-control":!0,"vm-theme-control_mobile":e}),children:[mt("div",{className:"vm-server-configurator__title",children:"Theme preferences"}),mt("div",{className:"vm-theme-control__toggle",children:mt(ld,{options:sd,value:n,onChange:e=>{t({type:"SET_THEME",payload:e})}})},"".concat(e))]})},ud=()=>{const{isMobile:e}=vr(),{markdownParsing:n}=mr(),r=(0,t.useContext)(fr).dispatch;return mt("div",{children:[mt("div",{className:"vm-server-configurator__title",children:"Markdown Parsing for Logs"}),mt(zr,{label:n?"Disable markdown parsing":"Enable markdown parsing",value:n,onChange:e=>{r({type:"SET_MARKDOWN_PARSING",payload:e})},fullWidth:e}),mt("div",{className:"vm-server-configurator__info",children:"Toggle this switch to enable or disable the Markdown formatting for log entries. Enabling this will parse log texts to Markdown."})]})},dd="Settings",{REACT_APP_TYPE:hd}={REACT_APP_TYPE:"logs"},pd=hd===Ue.logs,fd=()=>{const{isMobile:e}=vr(),n=He(),r=(0,t.useRef)(null),o=(0,t.useRef)(null),a=(0,t.useRef)(null),{value:i,setTrue:l,setFalse:s}=jr(!1),c=[{show:!n&&!pd,component:mt(Xu,{ref:r,onClose:s})},{show:!pd,component:mt(nd,{ref:o,onClose:s})},{show:pd,component:mt(ud,{})},{show:!0,component:mt(id,{ref:a})},{show:!n,component:mt(cd,{})}].filter((e=>e.show));return mt(pt.FK,{children:[e?mt("div",{className:"vm-mobile-option",onClick:l,children:[mt("span",{className:"vm-mobile-option__icon",children:mt(pn,{})}),mt("div",{className:"vm-mobile-option-text",children:mt("span",{className:"vm-mobile-option-text__label",children:dd})}),mt("span",{className:"vm-mobile-option__arrow",children:mt(wn,{})})]}):mt(Ir,{title:dd,children:mt(Pr,{className:Zn()({"vm-header-button":!n}),variant:"contained",color:"primary",startIcon:mt(pn,{}),onClick:l,ariaLabel:"settings"})}),i&&mt(Hr,{title:dd,onClose:s,children:mt("div",{className:Zn()({"vm-server-configurator":!0,"vm-server-configurator_mobile":e}),children:[c.map(((e,t)=>mt("div",{className:"vm-server-configurator__input",children:e.component},t))),mt("div",{className:"vm-server-configurator-footer",children:[mt(Pr,{color:"error",variant:"outlined",onClick:s,children:"Cancel"}),mt(Pr,{color:"primary",variant:"contained",onClick:()=>{r.current&&r.current.handleApply(),o.current&&o.current.handleApply(),a.current&&a.current.handleApply(),s()},children:"Apply"})]})]})})]})},md=e=>{let{relativeTime:t,setDuration:n}=e;const{isMobile:r}=vr();return mt("div",{className:Zn()({"vm-time-duration":!0,"vm-time-duration_mobile":r}),children:Ft.map((e=>{let{id:o,duration:a,until:i,title:l}=e;return mt("div",{className:Zn()({"vm-list-item":!0,"vm-list-item_mobile":r,"vm-list-item_active":o===t}),onClick:(s={duration:a,until:i(),id:o},()=>{n(s)}),children:l||a},o);var s}))})},_d=e=>{let{viewDate:t,showArrowNav:n,onChangeViewDate:r,toggleDisplayYears:o}=e;return mt("div",{className:"vm-calendar-header",children:[mt("div",{className:"vm-calendar-header-left",onClick:o,children:[mt("span",{className:"vm-calendar-header-left__date",children:t.format("MMMM YYYY")}),mt("div",{className:"vm-calendar-header-left__select-year",children:mt(kn,{})})]}),n&&mt("div",{className:"vm-calendar-header-right",children:[mt("div",{className:"vm-calendar-header-right__prev",onClick:()=>{r(t.subtract(1,"month"))},children:mt(wn,{})}),mt("div",{className:"vm-calendar-header-right__next",onClick:()=>{r(t.add(1,"month"))},children:mt(wn,{})})]})]})},gd=["Sunday","Monday","Tuesday","Wednesday","Thursday","Friday","Saturday"],vd=e=>{let{viewDate:n,selectDate:r,onChangeSelectDate:a}=e;const i="YYYY-MM-DD",l=o().tz(),s=o()(n.format(i)),c=(0,t.useMemo)((()=>{const e=new Array(42).fill(null),t=s.startOf("month"),n=s.endOf("month").diff(t,"day")+1,r=new Array(n).fill(t).map(((e,t)=>e.add(t,"day"))),o=t.day();return e.splice(o,n,...r),e}),[s]),u=e=>()=>{e&&a(e)};return mt("div",{className:"vm-calendar-body",children:[gd.map((e=>mt(Ir,{title:e,children:mt("div",{className:"vm-calendar-body-cell vm-calendar-body-cell_weekday",children:e[0]})},e))),c.map(((e,t)=>mt("div",{className:Zn()({"vm-calendar-body-cell":!0,"vm-calendar-body-cell_day":!0,"vm-calendar-body-cell_day_empty":!e,"vm-calendar-body-cell_day_active":(e&&e.format(i))===r.format(i),"vm-calendar-body-cell_day_today":(e&&e.format(i))===l.format(i)}),onClick:u(e),children:e&&e.format("D")},e?e.format(i):t)))]})},yd=e=>{let{viewDate:n,onChangeViewDate:r}=e;const a=o()().format("YYYY"),i=(0,t.useMemo)((()=>n.format("YYYY")),[n]),l=(0,t.useMemo)((()=>{const e=o()().subtract(9,"year");return new Array(18).fill(e).map(((e,t)=>e.add(t,"year")))}),[n]);(0,t.useEffect)((()=>{const e=document.getElementById("vm-calendar-year-".concat(i));e&&e.scrollIntoView({block:"center"})}),[]);return mt("div",{className:"vm-calendar-years",children:l.map((e=>{return mt("div",{className:Zn()({"vm-calendar-years__year":!0,"vm-calendar-years__year_selected":e.format("YYYY")===i,"vm-calendar-years__year_today":e.format("YYYY")===a}),id:"vm-calendar-year-".concat(e.format("YYYY")),onClick:(t=e,()=>{r(t)}),children:e.format("YYYY")},e.format("YYYY"));var t}))})},bd=e=>{let{viewDate:n,selectDate:r,onChangeViewDate:a}=e;const i=o()().format("MM"),l=(0,t.useMemo)((()=>r.format("MM")),[r]),s=(0,t.useMemo)((()=>new Array(12).fill("").map(((e,t)=>o()(n).month(t)))),[n]);(0,t.useEffect)((()=>{const e=document.getElementById("vm-calendar-year-".concat(l));e&&e.scrollIntoView({block:"center"})}),[]);return mt("div",{className:"vm-calendar-years",children:s.map((e=>{return mt("div",{className:Zn()({"vm-calendar-years__year":!0,"vm-calendar-years__year_selected":e.format("MM")===l,"vm-calendar-years__year_today":e.format("MM")===i}),id:"vm-calendar-year-".concat(e.format("MM")),onClick:(t=e,()=>{a(t)}),children:e.format("MMMM")},e.format("MM"));var t}))})};var wd=function(e){return e[e.days=0]="days",e[e.months=1]="months",e[e.years=2]="years",e}(wd||{});const kd=e=>{let{date:n,format:r=wt,onChange:a}=e;const[i,l]=(0,t.useState)(wd.days),[s,c]=(0,t.useState)(o().tz(n)),[u,d]=(0,t.useState)(o().tz(n)),h=o().tz(),p=h.format(bt)===s.format(bt),{isMobile:f}=vr(),m=e=>{c(e),l((e=>e===wd.years?wd.months:wd.days))};return(0,t.useEffect)((()=>{u.format()!==o().tz(n).format()&&a(u.format(r))}),[u]),(0,t.useEffect)((()=>{const e=o().tz(n);c(e),d(e)}),[n]),mt("div",{className:Zn()({"vm-calendar":!0,"vm-calendar_mobile":f}),children:[mt(_d,{viewDate:s,onChangeViewDate:m,toggleDisplayYears:()=>{l((e=>e===wd.years?wd.days:wd.years))},showArrowNav:i===wd.days}),i===wd.days&&mt(vd,{viewDate:s,selectDate:u,onChangeSelectDate:e=>{d(e)}}),i===wd.years&&mt(yd,{viewDate:s,onChangeViewDate:m}),i===wd.months&&mt(bd,{selectDate:u,viewDate:s,onChangeViewDate:m}),!p&&i===wd.days&&mt("div",{className:"vm-calendar-footer",children:mt(Pr,{variant:"text",size:"small",onClick:()=>{c(h)},children:"show today"})})]})},xd=(0,t.forwardRef)(((e,n)=>{let{date:r,targetRef:a,format:i=wt,onChange:l,label:s}=e;const c=(0,t.useMemo)((()=>o()(r).isValid()?o().tz(r):o()().tz()),[r]),{isMobile:u}=vr(),{value:d,toggle:h,setFalse:p}=jr(!1);return Jn("click",h,a),Jn("keyup",(e=>{"Escape"!==e.key&&"Enter"!==e.key||p()})),mt(pt.FK,{children:mt(Qr,{open:d,buttonRef:a,placement:"bottom-right",onClose:p,title:u?s:void 0,children:mt("div",{ref:n,children:mt(kd,{date:c,format:i,onChange:e=>{l(e),p()}})})})})}));var Sd=n(494),Ad=n.n(Sd);const Ed=e=>o()(e).isValid()?o().tz(e).format(wt):e,Cd=e=>{let{value:n="",label:r,pickerLabel:a,pickerRef:i,onChange:l,onEnter:s}=e;const c=(0,t.useRef)(null),[u,d]=(0,t.useState)(null),[h,p]=(0,t.useState)(Ed(n)),[f,m]=(0,t.useState)(!1),[_,g]=(0,t.useState)(!1),v=o()(h).isValid()?"":"Invalid date format";return(0,t.useEffect)((()=>{const e=Ed(n);e!==h&&p(e),_&&(s(),g(!1))}),[n]),(0,t.useEffect)((()=>{f&&u&&(u.focus(),u.setSelectionRange(11,11),m(!1))}),[f]),mt("div",{className:Zn()({"vm-date-time-input":!0,"vm-date-time-input_error":v}),children:[mt("label",{children:r}),mt(Ad(),{tabIndex:1,inputRef:d,mask:"9999-99-99 99:99:99",placeholder:"YYYY-MM-DD HH:mm:ss",value:h,autoCapitalize:"none",inputMode:"numeric",maskChar:null,onChange:e=>{p(e.currentTarget.value)},onBlur:()=>{l(h)},onKeyUp:e=>{"Enter"===e.key&&(l(h),g(!0))}}),v&&mt("span",{className:"vm-date-time-input__error-text",children:v}),mt("div",{className:"vm-date-time-input__icon",ref:c,children:mt(Pr,{variant:"text",color:"gray",size:"small",startIcon:mt(Sn,{}),ariaLabel:"calendar"})}),mt(xd,{label:a,ref:i,date:h,onChange:e=>{p(e),m(!0)},targetRef:c})]})};const Md=function(e){const n=(0,t.useRef)();return(0,t.useEffect)((()=>{n.current=e}),[e]),n.current},Nd=()=>{const{isMobile:e}=vr(),{isDarkTheme:n}=gt(),r=(0,t.useRef)(null),a=Xn(),i=(0,t.useMemo)((()=>a.width>1120),[a]),[l,s]=(0,t.useState)(),[c,u]=(0,t.useState)(),{period:{end:d,start:h},relativeTime:p,timezone:f,duration:m}=Gt(),_=Qt(),g=He(),v=Md(f),{value:y,toggle:b,setFalse:w}=jr(!1),k=(0,t.useMemo)((()=>({region:f,utc:Vt(f)})),[f]);(0,t.useEffect)((()=>{s(It(jt(d)))}),[f,d]),(0,t.useEffect)((()=>{u(It(jt(h)))}),[f,h]);const x=e=>{let{duration:t,until:n,id:r}=e;_({type:"SET_RELATIVE_TIME",payload:{duration:t,until:n,id:r}}),w()},S=(0,t.useMemo)((()=>({start:o().tz(jt(h)).format(wt),end:o().tz(jt(d)).format(wt)})),[h,d,f]),A=(0,t.useMemo)((()=>p&&"none"!==p?p.replace(/_/g," "):"".concat(S.start," - ").concat(S.end)),[p,S]),E=(0,t.useRef)(null),C=(0,t.useRef)(null),M=(0,t.useRef)(null),N=()=>{c&&l&&_({type:"SET_PERIOD",payload:{from:o().tz(c).toDate(),to:o().tz(l).toDate()}}),w()};return(0,t.useEffect)((()=>{const e=Ht({relativeTimeId:p,defaultDuration:m,defaultEndInput:jt(d)});v&&f!==v&&x({id:e.relativeTimeId,duration:e.duration,until:e.endInput})}),[f,v]),Gr(r,(t=>{var n,r;if(e)return;const o=t.target,a=(null===E||void 0===E?void 0:E.current)&&(null===E||void 0===E||null===(n=E.current)||void 0===n?void 0:n.contains(o)),i=(null===C||void 0===C?void 0:C.current)&&(null===C||void 0===C||null===(r=C.current)||void 0===r?void 0:r.contains(o));a||i||w()})),mt(pt.FK,{children:[mt("div",{ref:M,children:e?mt("div",{className:"vm-mobile-option",onClick:b,children:[mt("span",{className:"vm-mobile-option__icon",children:mt(xn,{})}),mt("div",{className:"vm-mobile-option-text",children:[mt("span",{className:"vm-mobile-option-text__label",children:"Time range"}),mt("span",{className:"vm-mobile-option-text__value",children:A})]}),mt("span",{className:"vm-mobile-option__arrow",children:mt(wn,{})})]}):mt(Ir,{title:i?"Time range controls":A,children:mt(Pr,{className:g?"":"vm-header-button",variant:"contained",color:"primary",startIcon:mt(xn,{}),onClick:b,ariaLabel:"time range controls",children:i&&mt("span",{children:A})})})}),mt(Qr,{open:y,buttonRef:M,placement:"bottom-right",onClose:w,clickOutside:!1,title:e?"Time range controls":"",children:mt("div",{className:Zn()({"vm-time-selector":!0,"vm-time-selector_mobile":e}),ref:r,children:[mt("div",{className:"vm-time-selector-left",children:[mt("div",{className:Zn()({"vm-time-selector-left-inputs":!0,"vm-time-selector-left-inputs_dark":n}),children:[mt(Cd,{value:c,label:"From:",pickerLabel:"Date From",pickerRef:E,onChange:u,onEnter:N}),mt(Cd,{value:l,label:"To:",pickerLabel:"Date To",pickerRef:C,onChange:s,onEnter:N})]}),mt("div",{className:"vm-time-selector-left-timezone",children:[mt("div",{className:"vm-time-selector-left-timezone__title",children:k.region}),mt("div",{className:"vm-time-selector-left-timezone__utc",children:k.utc})]}),mt(Pr,{variant:"text",startIcon:mt(An,{}),onClick:()=>_({type:"RUN_QUERY_TO_NOW"}),children:"switch to now"}),mt("div",{className:"vm-time-selector-left__controls",children:[mt(Pr,{color:"error",variant:"outlined",onClick:()=>{s(It(jt(d))),u(It(jt(h))),w()},children:"Cancel"}),mt(Pr,{color:"primary",onClick:N,children:"Apply"})]})]}),mt(md,{relativeTime:p||"",setDuration:x})]})})]})},Td=()=>{const e=He(),{isMobile:n}=vr(),r=Qt(),[o,a]=$e(),[i,l]=Or("0","accountID"),[s,c]=Or("0","projectID"),u="".concat(i,":").concat(s),d=(0,t.useRef)(null),{value:h,toggle:p,setFalse:f}=jr(!1);return(0,t.useEffect)((()=>{h||(l(o.get("accountID")||"0"),c(o.get("projectID")||"0"))}),[h]),mt("div",{className:"vm-tenant-input",children:[mt(Ir,{title:"Define Tenant ID if you need request to another storage",children:mt("div",{ref:d,children:n?mt("div",{className:"vm-mobile-option",onClick:p,children:[mt("span",{className:"vm-mobile-option__icon",children:mt(zn,{})}),mt("div",{className:"vm-mobile-option-text",children:[mt("span",{className:"vm-mobile-option-text__label",children:"Tenant ID"}),mt("span",{className:"vm-mobile-option-text__value",children:u})]}),mt("span",{className:"vm-mobile-option__arrow",children:mt(wn,{})})]}):mt(Pr,{className:e?"":"vm-header-button",variant:"contained",color:"primary",fullWidth:!0,startIcon:mt(zn,{}),endIcon:mt("div",{className:Zn()({"vm-execution-controls-buttons__arrow":!0,"vm-execution-controls-buttons__arrow_open":h}),children:mt(wn,{})}),onClick:p,children:u})})}),mt(Qr,{open:h,placement:"bottom-right",onClose:f,buttonRef:d,title:n?"Define Tenant ID":void 0,children:mt("div",{className:Zn()({"vm-list vm-tenant-input-list":!0,"vm-list vm-tenant-input-list_mobile":n,"vm-tenant-input-list_inline":!0}),children:[mt(Fr,{autofocus:!0,label:"accountID",value:i,onChange:l,type:"number"}),mt(Fr,{autofocus:!0,label:"projectID",value:s,onChange:c,type:"number"}),mt("div",{className:"vm-tenant-input-list__buttons",children:[mt(Ir,{title:"Multitenancy in VictoriaLogs documentation",children:mt("a",{href:"https://docs.victoriametrics.com/victorialogs/#multitenancy",target:"_blank",rel:"help noreferrer",children:mt(Pr,{variant:"text",color:"gray",startIcon:mt(In,{})})})}),mt(Pr,{variant:"contained",color:"primary",onClick:()=>{o.set("accountID",i),o.set("projectID",s),a(o),f(),r({type:"RUN_QUERY"})},children:"Apply"})]})]})})]})},Pd=[{seconds:0,title:"Off"},{seconds:1,title:"1s"},{seconds:2,title:"2s"},{seconds:5,title:"5s"},{seconds:10,title:"10s"},{seconds:30,title:"30s"},{seconds:60,title:"1m"},{seconds:300,title:"5m"},{seconds:900,title:"15m"},{seconds:1800,title:"30m"},{seconds:3600,title:"1h"},{seconds:7200,title:"2h"}],Dd=()=>{const{isMobile:e}=vr(),n=Qt(),r=He(),[o,a]=(0,t.useState)(!1),[i,l]=(0,t.useState)(Pd[0]),{value:s,toggle:c,setFalse:u}=jr(!1),d=(0,t.useRef)(null);(0,t.useEffect)((()=>{const e=i.seconds;let t;return o?t=setInterval((()=>{n({type:"RUN_QUERY"})}),1e3*e):l(Pd[0]),()=>{t&&clearInterval(t)}}),[i,o]);const h=e=>()=>{(e=>{(o&&!e.seconds||!o&&e.seconds)&&a((e=>!e)),l(e),u()})(e)};return mt(pt.FK,{children:[mt("div",{className:"vm-execution-controls",children:mt("div",{className:Zn()({"vm-execution-controls-buttons":!0,"vm-execution-controls-buttons_mobile":e,"vm-header-button":!r}),children:[!e&&mt(Ir,{title:"Refresh dashboard",children:mt(Pr,{variant:"contained",color:"primary",onClick:()=>{n({type:"RUN_QUERY"})},startIcon:mt(bn,{}),ariaLabel:"refresh dashboard"})}),e?mt("div",{className:"vm-mobile-option",onClick:c,children:[mt("span",{className:"vm-mobile-option__icon",children:mt(mn,{})}),mt("div",{className:"vm-mobile-option-text",children:[mt("span",{className:"vm-mobile-option-text__label",children:"Auto-refresh"}),mt("span",{className:"vm-mobile-option-text__value",children:i.title})]}),mt("span",{className:"vm-mobile-option__arrow",children:mt(wn,{})})]}):mt(Ir,{title:"Auto-refresh control",children:mt("div",{ref:d,children:mt(Pr,{variant:"contained",color:"primary",fullWidth:!0,endIcon:mt("div",{className:Zn()({"vm-execution-controls-buttons__arrow":!0,"vm-execution-controls-buttons__arrow_open":s}),children:mt(wn,{})}),onClick:c,children:i.title})})})]})}),mt(Qr,{open:s,placement:"bottom-right",onClose:u,buttonRef:d,title:e?"Auto-refresh duration":void 0,children:mt("div",{className:Zn()({"vm-execution-controls-list":!0,"vm-execution-controls-list_mobile":e}),children:Pd.map((t=>mt("div",{className:Zn()({"vm-list-item":!0,"vm-list-item_mobile":e,"vm-list-item_active":t.seconds===i.seconds}),onClick:h(t),children:t.title},t.seconds)))})})]})},Od=e=>{let{isMobile:t}=e;return mt("div",{className:Zn()({"vm-header-controls":!0,"vm-header-controls_mobile":t}),children:[mt(Td,{}),mt(Nd,{}),mt(Dd,{}),mt(fd,{})]})},Ld=(Boolean(We("DISABLED_DEFAULT_TIMEZONE")),()=>{const{serverUrl:e}=gt(),[n,r]=(Qt(),(0,t.useState)(!1)),[o,a]=(0,t.useState)(""),i=async()=>{};return(0,t.useEffect)((()=>{i()}),[e]),{isLoading:n,error:o}}),Rd=()=>{const e=He(),{isMobile:n}=vr(),{pathname:r}=ne();Ld();return(0,t.useEffect)((()=>{var e;const t="vmui for VictoriaLogs",n=null===(e=fu[mu.logs])||void 0===e?void 0:e.title;document.title=n?"".concat(n," - ").concat(t):t}),[r]),mt("section",{className:"vm-container",children:[mt(Yu,{controlsComponent:Od}),mt("div",{className:Zn()({"vm-container-body":!0,"vm-container-body_mobile":n,"vm-container-body_app":e}),children:mt(ye,{})}),!e&&mt(Gu,{links:Ku})]})},Id={unicode:!1,renderer:void 0};da.use(function(e){if(!(e={...Id,...e}).emojis)throw new Error("Must provide emojis to markedEmoji");const t=Object.keys(e.emojis).map((e=>e.replace(/[.*+?^${}()|[\]\\]/g,"\\$&"))).join("|"),n=new RegExp(":(".concat(t,"):")),r=new RegExp("^".concat(n.source));return{extensions:[{name:"emoji",level:"inline",start(e){var t;return null===(t=e.match(n))||void 0===t?void 0:t.index},tokenizer(t,n){const o=r.exec(t);if(!o)return;const a=o[1];let i=e.emojis[a],l=e.renderer?void 0:e.unicode;if("string"!==typeof i&&!e.renderer)if("string"===typeof i.char)i=i.char,l=!0;else{if("string"!==typeof i.url)return;i=i.url,l=!1}return{type:"emoji",raw:o[0],name:a,emoji:i,unicode:l}},renderer:t=>e.renderer?e.renderer(t):t.unicode?t.emoji:''.concat(t.name,'')}]}}({emojis:{100:"\ud83d\udcaf",1234:"\ud83d\udd22",grinning:"\ud83d\ude00",smiley:"\ud83d\ude03",smile:"\ud83d\ude04",grin:"\ud83d\ude01",laughing:"\ud83d\ude06",satisfied:"\ud83d\ude06",sweat_smile:"\ud83d\ude05",rofl:"\ud83e\udd23",joy:"\ud83d\ude02",slightly_smiling_face:"\ud83d\ude42",upside_down_face:"\ud83d\ude43",melting_face:"\ud83e\udee0",wink:"\ud83d\ude09",blush:"\ud83d\ude0a",innocent:"\ud83d\ude07",smiling_face_with_three_hearts:"\ud83e\udd70",heart_eyes:"\ud83d\ude0d",star_struck:"\ud83e\udd29",kissing_heart:"\ud83d\ude18",kissing:"\ud83d\ude17",relaxed:"\u263a\ufe0f",kissing_closed_eyes:"\ud83d\ude1a",kissing_smiling_eyes:"\ud83d\ude19",smiling_face_with_tear:"\ud83e\udd72",yum:"\ud83d\ude0b",stuck_out_tongue:"\ud83d\ude1b",stuck_out_tongue_winking_eye:"\ud83d\ude1c",zany_face:"\ud83e\udd2a",stuck_out_tongue_closed_eyes:"\ud83d\ude1d",money_mouth_face:"\ud83e\udd11",hugs:"\ud83e\udd17",hand_over_mouth:"\ud83e\udd2d",face_with_open_eyes_and_hand_over_mouth:"\ud83e\udee2",face_with_peeking_eye:"\ud83e\udee3",shushing_face:"\ud83e\udd2b",thinking:"\ud83e\udd14",saluting_face:"\ud83e\udee1",zipper_mouth_face:"\ud83e\udd10",raised_eyebrow:"\ud83e\udd28",neutral_face:"\ud83d\ude10",expressionless:"\ud83d\ude11",no_mouth:"\ud83d\ude36",dotted_line_face:"\ud83e\udee5",face_in_clouds:"\ud83d\ude36\u200d\ud83c\udf2b\ufe0f",smirk:"\ud83d\ude0f",unamused:"\ud83d\ude12",roll_eyes:"\ud83d\ude44",grimacing:"\ud83d\ude2c",face_exhaling:"\ud83d\ude2e\u200d\ud83d\udca8",lying_face:"\ud83e\udd25",shaking_face:"\ud83e\udee8",relieved:"\ud83d\ude0c",pensive:"\ud83d\ude14",sleepy:"\ud83d\ude2a",drooling_face:"\ud83e\udd24",sleeping:"\ud83d\ude34",mask:"\ud83d\ude37",face_with_thermometer:"\ud83e\udd12",face_with_head_bandage:"\ud83e\udd15",nauseated_face:"\ud83e\udd22",vomiting_face:"\ud83e\udd2e",sneezing_face:"\ud83e\udd27",hot_face:"\ud83e\udd75",cold_face:"\ud83e\udd76",woozy_face:"\ud83e\udd74",dizzy_face:"\ud83d\ude35",face_with_spiral_eyes:"\ud83d\ude35\u200d\ud83d\udcab",exploding_head:"\ud83e\udd2f",cowboy_hat_face:"\ud83e\udd20",partying_face:"\ud83e\udd73",disguised_face:"\ud83e\udd78",sunglasses:"\ud83d\ude0e",nerd_face:"\ud83e\udd13",monocle_face:"\ud83e\uddd0",confused:"\ud83d\ude15",face_with_diagonal_mouth:"\ud83e\udee4",worried:"\ud83d\ude1f",slightly_frowning_face:"\ud83d\ude41",frowning_face:"\u2639\ufe0f",open_mouth:"\ud83d\ude2e",hushed:"\ud83d\ude2f",astonished:"\ud83d\ude32",flushed:"\ud83d\ude33",pleading_face:"\ud83e\udd7a",face_holding_back_tears:"\ud83e\udd79",frowning:"\ud83d\ude26",anguished:"\ud83d\ude27",fearful:"\ud83d\ude28",cold_sweat:"\ud83d\ude30",disappointed_relieved:"\ud83d\ude25",cry:"\ud83d\ude22",sob:"\ud83d\ude2d",scream:"\ud83d\ude31",confounded:"\ud83d\ude16",persevere:"\ud83d\ude23",disappointed:"\ud83d\ude1e",sweat:"\ud83d\ude13",weary:"\ud83d\ude29",tired_face:"\ud83d\ude2b",yawning_face:"\ud83e\udd71",triumph:"\ud83d\ude24",rage:"\ud83d\ude21",pout:"\ud83d\ude21",angry:"\ud83d\ude20",cursing_face:"\ud83e\udd2c",smiling_imp:"\ud83d\ude08",imp:"\ud83d\udc7f",skull:"\ud83d\udc80",skull_and_crossbones:"\u2620\ufe0f",hankey:"\ud83d\udca9",poop:"\ud83d\udca9",shit:"\ud83d\udca9",clown_face:"\ud83e\udd21",japanese_ogre:"\ud83d\udc79",japanese_goblin:"\ud83d\udc7a",ghost:"\ud83d\udc7b",alien:"\ud83d\udc7d",space_invader:"\ud83d\udc7e",robot:"\ud83e\udd16",smiley_cat:"\ud83d\ude3a",smile_cat:"\ud83d\ude38",joy_cat:"\ud83d\ude39",heart_eyes_cat:"\ud83d\ude3b",smirk_cat:"\ud83d\ude3c",kissing_cat:"\ud83d\ude3d",scream_cat:"\ud83d\ude40",crying_cat_face:"\ud83d\ude3f",pouting_cat:"\ud83d\ude3e",see_no_evil:"\ud83d\ude48",hear_no_evil:"\ud83d\ude49",speak_no_evil:"\ud83d\ude4a",love_letter:"\ud83d\udc8c",cupid:"\ud83d\udc98",gift_heart:"\ud83d\udc9d",sparkling_heart:"\ud83d\udc96",heartpulse:"\ud83d\udc97",heartbeat:"\ud83d\udc93",revolving_hearts:"\ud83d\udc9e",two_hearts:"\ud83d\udc95",heart_decoration:"\ud83d\udc9f",heavy_heart_exclamation:"\u2763\ufe0f",broken_heart:"\ud83d\udc94",heart_on_fire:"\u2764\ufe0f\u200d\ud83d\udd25",mending_heart:"\u2764\ufe0f\u200d\ud83e\ude79",heart:"\u2764\ufe0f",pink_heart:"\ud83e\ude77",orange_heart:"\ud83e\udde1",yellow_heart:"\ud83d\udc9b",green_heart:"\ud83d\udc9a",blue_heart:"\ud83d\udc99",light_blue_heart:"\ud83e\ude75",purple_heart:"\ud83d\udc9c",brown_heart:"\ud83e\udd0e",black_heart:"\ud83d\udda4",grey_heart:"\ud83e\ude76",white_heart:"\ud83e\udd0d",kiss:"\ud83d\udc8b",anger:"\ud83d\udca2",boom:"\ud83d\udca5",collision:"\ud83d\udca5",dizzy:"\ud83d\udcab",sweat_drops:"\ud83d\udca6",dash:"\ud83d\udca8",hole:"\ud83d\udd73\ufe0f",speech_balloon:"\ud83d\udcac",eye_speech_bubble:"\ud83d\udc41\ufe0f\u200d\ud83d\udde8\ufe0f",left_speech_bubble:"\ud83d\udde8\ufe0f",right_anger_bubble:"\ud83d\uddef\ufe0f",thought_balloon:"\ud83d\udcad",zzz:"\ud83d\udca4",wave:"\ud83d\udc4b",raised_back_of_hand:"\ud83e\udd1a",raised_hand_with_fingers_splayed:"\ud83d\udd90\ufe0f",hand:"\u270b",raised_hand:"\u270b",vulcan_salute:"\ud83d\udd96",rightwards_hand:"\ud83e\udef1",leftwards_hand:"\ud83e\udef2",palm_down_hand:"\ud83e\udef3",palm_up_hand:"\ud83e\udef4",leftwards_pushing_hand:"\ud83e\udef7",rightwards_pushing_hand:"\ud83e\udef8",ok_hand:"\ud83d\udc4c",pinched_fingers:"\ud83e\udd0c",pinching_hand:"\ud83e\udd0f",v:"\u270c\ufe0f",crossed_fingers:"\ud83e\udd1e",hand_with_index_finger_and_thumb_crossed:"\ud83e\udef0",love_you_gesture:"\ud83e\udd1f",metal:"\ud83e\udd18",call_me_hand:"\ud83e\udd19",point_left:"\ud83d\udc48",point_right:"\ud83d\udc49",point_up_2:"\ud83d\udc46",middle_finger:"\ud83d\udd95",fu:"\ud83d\udd95",point_down:"\ud83d\udc47",point_up:"\u261d\ufe0f",index_pointing_at_the_viewer:"\ud83e\udef5","+1":"\ud83d\udc4d",thumbsup:"\ud83d\udc4d","-1":"\ud83d\udc4e",thumbsdown:"\ud83d\udc4e",fist_raised:"\u270a",fist:"\u270a",fist_oncoming:"\ud83d\udc4a",facepunch:"\ud83d\udc4a",punch:"\ud83d\udc4a",fist_left:"\ud83e\udd1b",fist_right:"\ud83e\udd1c",clap:"\ud83d\udc4f",raised_hands:"\ud83d\ude4c",heart_hands:"\ud83e\udef6",open_hands:"\ud83d\udc50",palms_up_together:"\ud83e\udd32",handshake:"\ud83e\udd1d",pray:"\ud83d\ude4f",writing_hand:"\u270d\ufe0f",nail_care:"\ud83d\udc85",selfie:"\ud83e\udd33",muscle:"\ud83d\udcaa",mechanical_arm:"\ud83e\uddbe",mechanical_leg:"\ud83e\uddbf",leg:"\ud83e\uddb5",foot:"\ud83e\uddb6",ear:"\ud83d\udc42",ear_with_hearing_aid:"\ud83e\uddbb",nose:"\ud83d\udc43",brain:"\ud83e\udde0",anatomical_heart:"\ud83e\udec0",lungs:"\ud83e\udec1",tooth:"\ud83e\uddb7",bone:"\ud83e\uddb4",eyes:"\ud83d\udc40",eye:"\ud83d\udc41\ufe0f",tongue:"\ud83d\udc45",lips:"\ud83d\udc44",biting_lip:"\ud83e\udee6",baby:"\ud83d\udc76",child:"\ud83e\uddd2",boy:"\ud83d\udc66",girl:"\ud83d\udc67",adult:"\ud83e\uddd1",blond_haired_person:"\ud83d\udc71",man:"\ud83d\udc68",bearded_person:"\ud83e\uddd4",man_beard:"\ud83e\uddd4\u200d\u2642\ufe0f",woman_beard:"\ud83e\uddd4\u200d\u2640\ufe0f",red_haired_man:"\ud83d\udc68\u200d\ud83e\uddb0",curly_haired_man:"\ud83d\udc68\u200d\ud83e\uddb1",white_haired_man:"\ud83d\udc68\u200d\ud83e\uddb3",bald_man:"\ud83d\udc68\u200d\ud83e\uddb2",woman:"\ud83d\udc69",red_haired_woman:"\ud83d\udc69\u200d\ud83e\uddb0",person_red_hair:"\ud83e\uddd1\u200d\ud83e\uddb0",curly_haired_woman:"\ud83d\udc69\u200d\ud83e\uddb1",person_curly_hair:"\ud83e\uddd1\u200d\ud83e\uddb1",white_haired_woman:"\ud83d\udc69\u200d\ud83e\uddb3",person_white_hair:"\ud83e\uddd1\u200d\ud83e\uddb3",bald_woman:"\ud83d\udc69\u200d\ud83e\uddb2",person_bald:"\ud83e\uddd1\u200d\ud83e\uddb2",blond_haired_woman:"\ud83d\udc71\u200d\u2640\ufe0f",blonde_woman:"\ud83d\udc71\u200d\u2640\ufe0f",blond_haired_man:"\ud83d\udc71\u200d\u2642\ufe0f",older_adult:"\ud83e\uddd3",older_man:"\ud83d\udc74",older_woman:"\ud83d\udc75",frowning_person:"\ud83d\ude4d",frowning_man:"\ud83d\ude4d\u200d\u2642\ufe0f",frowning_woman:"\ud83d\ude4d\u200d\u2640\ufe0f",pouting_face:"\ud83d\ude4e",pouting_man:"\ud83d\ude4e\u200d\u2642\ufe0f",pouting_woman:"\ud83d\ude4e\u200d\u2640\ufe0f",no_good:"\ud83d\ude45",no_good_man:"\ud83d\ude45\u200d\u2642\ufe0f",ng_man:"\ud83d\ude45\u200d\u2642\ufe0f",no_good_woman:"\ud83d\ude45\u200d\u2640\ufe0f",ng_woman:"\ud83d\ude45\u200d\u2640\ufe0f",ok_person:"\ud83d\ude46",ok_man:"\ud83d\ude46\u200d\u2642\ufe0f",ok_woman:"\ud83d\ude46\u200d\u2640\ufe0f",tipping_hand_person:"\ud83d\udc81",information_desk_person:"\ud83d\udc81",tipping_hand_man:"\ud83d\udc81\u200d\u2642\ufe0f",sassy_man:"\ud83d\udc81\u200d\u2642\ufe0f",tipping_hand_woman:"\ud83d\udc81\u200d\u2640\ufe0f",sassy_woman:"\ud83d\udc81\u200d\u2640\ufe0f",raising_hand:"\ud83d\ude4b",raising_hand_man:"\ud83d\ude4b\u200d\u2642\ufe0f",raising_hand_woman:"\ud83d\ude4b\u200d\u2640\ufe0f",deaf_person:"\ud83e\uddcf",deaf_man:"\ud83e\uddcf\u200d\u2642\ufe0f",deaf_woman:"\ud83e\uddcf\u200d\u2640\ufe0f",bow:"\ud83d\ude47",bowing_man:"\ud83d\ude47\u200d\u2642\ufe0f",bowing_woman:"\ud83d\ude47\u200d\u2640\ufe0f",facepalm:"\ud83e\udd26",man_facepalming:"\ud83e\udd26\u200d\u2642\ufe0f",woman_facepalming:"\ud83e\udd26\u200d\u2640\ufe0f",shrug:"\ud83e\udd37",man_shrugging:"\ud83e\udd37\u200d\u2642\ufe0f",woman_shrugging:"\ud83e\udd37\u200d\u2640\ufe0f",health_worker:"\ud83e\uddd1\u200d\u2695\ufe0f",man_health_worker:"\ud83d\udc68\u200d\u2695\ufe0f",woman_health_worker:"\ud83d\udc69\u200d\u2695\ufe0f",student:"\ud83e\uddd1\u200d\ud83c\udf93",man_student:"\ud83d\udc68\u200d\ud83c\udf93",woman_student:"\ud83d\udc69\u200d\ud83c\udf93",teacher:"\ud83e\uddd1\u200d\ud83c\udfeb",man_teacher:"\ud83d\udc68\u200d\ud83c\udfeb",woman_teacher:"\ud83d\udc69\u200d\ud83c\udfeb",judge:"\ud83e\uddd1\u200d\u2696\ufe0f",man_judge:"\ud83d\udc68\u200d\u2696\ufe0f",woman_judge:"\ud83d\udc69\u200d\u2696\ufe0f",farmer:"\ud83e\uddd1\u200d\ud83c\udf3e",man_farmer:"\ud83d\udc68\u200d\ud83c\udf3e",woman_farmer:"\ud83d\udc69\u200d\ud83c\udf3e",cook:"\ud83e\uddd1\u200d\ud83c\udf73",man_cook:"\ud83d\udc68\u200d\ud83c\udf73",woman_cook:"\ud83d\udc69\u200d\ud83c\udf73",mechanic:"\ud83e\uddd1\u200d\ud83d\udd27",man_mechanic:"\ud83d\udc68\u200d\ud83d\udd27",woman_mechanic:"\ud83d\udc69\u200d\ud83d\udd27",factory_worker:"\ud83e\uddd1\u200d\ud83c\udfed",man_factory_worker:"\ud83d\udc68\u200d\ud83c\udfed",woman_factory_worker:"\ud83d\udc69\u200d\ud83c\udfed",office_worker:"\ud83e\uddd1\u200d\ud83d\udcbc",man_office_worker:"\ud83d\udc68\u200d\ud83d\udcbc",woman_office_worker:"\ud83d\udc69\u200d\ud83d\udcbc",scientist:"\ud83e\uddd1\u200d\ud83d\udd2c",man_scientist:"\ud83d\udc68\u200d\ud83d\udd2c",woman_scientist:"\ud83d\udc69\u200d\ud83d\udd2c",technologist:"\ud83e\uddd1\u200d\ud83d\udcbb",man_technologist:"\ud83d\udc68\u200d\ud83d\udcbb",woman_technologist:"\ud83d\udc69\u200d\ud83d\udcbb",singer:"\ud83e\uddd1\u200d\ud83c\udfa4",man_singer:"\ud83d\udc68\u200d\ud83c\udfa4",woman_singer:"\ud83d\udc69\u200d\ud83c\udfa4",artist:"\ud83e\uddd1\u200d\ud83c\udfa8",man_artist:"\ud83d\udc68\u200d\ud83c\udfa8",woman_artist:"\ud83d\udc69\u200d\ud83c\udfa8",pilot:"\ud83e\uddd1\u200d\u2708\ufe0f",man_pilot:"\ud83d\udc68\u200d\u2708\ufe0f",woman_pilot:"\ud83d\udc69\u200d\u2708\ufe0f",astronaut:"\ud83e\uddd1\u200d\ud83d\ude80",man_astronaut:"\ud83d\udc68\u200d\ud83d\ude80",woman_astronaut:"\ud83d\udc69\u200d\ud83d\ude80",firefighter:"\ud83e\uddd1\u200d\ud83d\ude92",man_firefighter:"\ud83d\udc68\u200d\ud83d\ude92",woman_firefighter:"\ud83d\udc69\u200d\ud83d\ude92",police_officer:"\ud83d\udc6e",cop:"\ud83d\udc6e",policeman:"\ud83d\udc6e\u200d\u2642\ufe0f",policewoman:"\ud83d\udc6e\u200d\u2640\ufe0f",detective:"\ud83d\udd75\ufe0f",male_detective:"\ud83d\udd75\ufe0f\u200d\u2642\ufe0f",female_detective:"\ud83d\udd75\ufe0f\u200d\u2640\ufe0f",guard:"\ud83d\udc82",guardsman:"\ud83d\udc82\u200d\u2642\ufe0f",guardswoman:"\ud83d\udc82\u200d\u2640\ufe0f",ninja:"\ud83e\udd77",construction_worker:"\ud83d\udc77",construction_worker_man:"\ud83d\udc77\u200d\u2642\ufe0f",construction_worker_woman:"\ud83d\udc77\u200d\u2640\ufe0f",person_with_crown:"\ud83e\udec5",prince:"\ud83e\udd34",princess:"\ud83d\udc78",person_with_turban:"\ud83d\udc73",man_with_turban:"\ud83d\udc73\u200d\u2642\ufe0f",woman_with_turban:"\ud83d\udc73\u200d\u2640\ufe0f",man_with_gua_pi_mao:"\ud83d\udc72",woman_with_headscarf:"\ud83e\uddd5",person_in_tuxedo:"\ud83e\udd35",man_in_tuxedo:"\ud83e\udd35\u200d\u2642\ufe0f",woman_in_tuxedo:"\ud83e\udd35\u200d\u2640\ufe0f",person_with_veil:"\ud83d\udc70",man_with_veil:"\ud83d\udc70\u200d\u2642\ufe0f",woman_with_veil:"\ud83d\udc70\u200d\u2640\ufe0f",bride_with_veil:"\ud83d\udc70\u200d\u2640\ufe0f",pregnant_woman:"\ud83e\udd30",pregnant_man:"\ud83e\udec3",pregnant_person:"\ud83e\udec4",breast_feeding:"\ud83e\udd31",woman_feeding_baby:"\ud83d\udc69\u200d\ud83c\udf7c",man_feeding_baby:"\ud83d\udc68\u200d\ud83c\udf7c",person_feeding_baby:"\ud83e\uddd1\u200d\ud83c\udf7c",angel:"\ud83d\udc7c",santa:"\ud83c\udf85",mrs_claus:"\ud83e\udd36",mx_claus:"\ud83e\uddd1\u200d\ud83c\udf84",superhero:"\ud83e\uddb8",superhero_man:"\ud83e\uddb8\u200d\u2642\ufe0f",superhero_woman:"\ud83e\uddb8\u200d\u2640\ufe0f",supervillain:"\ud83e\uddb9",supervillain_man:"\ud83e\uddb9\u200d\u2642\ufe0f",supervillain_woman:"\ud83e\uddb9\u200d\u2640\ufe0f",mage:"\ud83e\uddd9",mage_man:"\ud83e\uddd9\u200d\u2642\ufe0f",mage_woman:"\ud83e\uddd9\u200d\u2640\ufe0f",fairy:"\ud83e\uddda",fairy_man:"\ud83e\uddda\u200d\u2642\ufe0f",fairy_woman:"\ud83e\uddda\u200d\u2640\ufe0f",vampire:"\ud83e\udddb",vampire_man:"\ud83e\udddb\u200d\u2642\ufe0f",vampire_woman:"\ud83e\udddb\u200d\u2640\ufe0f",merperson:"\ud83e\udddc",merman:"\ud83e\udddc\u200d\u2642\ufe0f",mermaid:"\ud83e\udddc\u200d\u2640\ufe0f",elf:"\ud83e\udddd",elf_man:"\ud83e\udddd\u200d\u2642\ufe0f",elf_woman:"\ud83e\udddd\u200d\u2640\ufe0f",genie:"\ud83e\uddde",genie_man:"\ud83e\uddde\u200d\u2642\ufe0f",genie_woman:"\ud83e\uddde\u200d\u2640\ufe0f",zombie:"\ud83e\udddf",zombie_man:"\ud83e\udddf\u200d\u2642\ufe0f",zombie_woman:"\ud83e\udddf\u200d\u2640\ufe0f",troll:"\ud83e\uddcc",massage:"\ud83d\udc86",massage_man:"\ud83d\udc86\u200d\u2642\ufe0f",massage_woman:"\ud83d\udc86\u200d\u2640\ufe0f",haircut:"\ud83d\udc87",haircut_man:"\ud83d\udc87\u200d\u2642\ufe0f",haircut_woman:"\ud83d\udc87\u200d\u2640\ufe0f",walking:"\ud83d\udeb6",walking_man:"\ud83d\udeb6\u200d\u2642\ufe0f",walking_woman:"\ud83d\udeb6\u200d\u2640\ufe0f",standing_person:"\ud83e\uddcd",standing_man:"\ud83e\uddcd\u200d\u2642\ufe0f",standing_woman:"\ud83e\uddcd\u200d\u2640\ufe0f",kneeling_person:"\ud83e\uddce",kneeling_man:"\ud83e\uddce\u200d\u2642\ufe0f",kneeling_woman:"\ud83e\uddce\u200d\u2640\ufe0f",person_with_probing_cane:"\ud83e\uddd1\u200d\ud83e\uddaf",man_with_probing_cane:"\ud83d\udc68\u200d\ud83e\uddaf",woman_with_probing_cane:"\ud83d\udc69\u200d\ud83e\uddaf",person_in_motorized_wheelchair:"\ud83e\uddd1\u200d\ud83e\uddbc",man_in_motorized_wheelchair:"\ud83d\udc68\u200d\ud83e\uddbc",woman_in_motorized_wheelchair:"\ud83d\udc69\u200d\ud83e\uddbc",person_in_manual_wheelchair:"\ud83e\uddd1\u200d\ud83e\uddbd",man_in_manual_wheelchair:"\ud83d\udc68\u200d\ud83e\uddbd",woman_in_manual_wheelchair:"\ud83d\udc69\u200d\ud83e\uddbd",runner:"\ud83c\udfc3",running:"\ud83c\udfc3",running_man:"\ud83c\udfc3\u200d\u2642\ufe0f",running_woman:"\ud83c\udfc3\u200d\u2640\ufe0f",woman_dancing:"\ud83d\udc83",dancer:"\ud83d\udc83",man_dancing:"\ud83d\udd7a",business_suit_levitating:"\ud83d\udd74\ufe0f",dancers:"\ud83d\udc6f",dancing_men:"\ud83d\udc6f\u200d\u2642\ufe0f",dancing_women:"\ud83d\udc6f\u200d\u2640\ufe0f",sauna_person:"\ud83e\uddd6",sauna_man:"\ud83e\uddd6\u200d\u2642\ufe0f",sauna_woman:"\ud83e\uddd6\u200d\u2640\ufe0f",climbing:"\ud83e\uddd7",climbing_man:"\ud83e\uddd7\u200d\u2642\ufe0f",climbing_woman:"\ud83e\uddd7\u200d\u2640\ufe0f",person_fencing:"\ud83e\udd3a",horse_racing:"\ud83c\udfc7",skier:"\u26f7\ufe0f",snowboarder:"\ud83c\udfc2",golfing:"\ud83c\udfcc\ufe0f",golfing_man:"\ud83c\udfcc\ufe0f\u200d\u2642\ufe0f",golfing_woman:"\ud83c\udfcc\ufe0f\u200d\u2640\ufe0f",surfer:"\ud83c\udfc4",surfing_man:"\ud83c\udfc4\u200d\u2642\ufe0f",surfing_woman:"\ud83c\udfc4\u200d\u2640\ufe0f",rowboat:"\ud83d\udea3",rowing_man:"\ud83d\udea3\u200d\u2642\ufe0f",rowing_woman:"\ud83d\udea3\u200d\u2640\ufe0f",swimmer:"\ud83c\udfca",swimming_man:"\ud83c\udfca\u200d\u2642\ufe0f",swimming_woman:"\ud83c\udfca\u200d\u2640\ufe0f",bouncing_ball_person:"\u26f9\ufe0f",bouncing_ball_man:"\u26f9\ufe0f\u200d\u2642\ufe0f",basketball_man:"\u26f9\ufe0f\u200d\u2642\ufe0f",bouncing_ball_woman:"\u26f9\ufe0f\u200d\u2640\ufe0f",basketball_woman:"\u26f9\ufe0f\u200d\u2640\ufe0f",weight_lifting:"\ud83c\udfcb\ufe0f",weight_lifting_man:"\ud83c\udfcb\ufe0f\u200d\u2642\ufe0f",weight_lifting_woman:"\ud83c\udfcb\ufe0f\u200d\u2640\ufe0f",bicyclist:"\ud83d\udeb4",biking_man:"\ud83d\udeb4\u200d\u2642\ufe0f",biking_woman:"\ud83d\udeb4\u200d\u2640\ufe0f",mountain_bicyclist:"\ud83d\udeb5",mountain_biking_man:"\ud83d\udeb5\u200d\u2642\ufe0f",mountain_biking_woman:"\ud83d\udeb5\u200d\u2640\ufe0f",cartwheeling:"\ud83e\udd38",man_cartwheeling:"\ud83e\udd38\u200d\u2642\ufe0f",woman_cartwheeling:"\ud83e\udd38\u200d\u2640\ufe0f",wrestling:"\ud83e\udd3c",men_wrestling:"\ud83e\udd3c\u200d\u2642\ufe0f",women_wrestling:"\ud83e\udd3c\u200d\u2640\ufe0f",water_polo:"\ud83e\udd3d",man_playing_water_polo:"\ud83e\udd3d\u200d\u2642\ufe0f",woman_playing_water_polo:"\ud83e\udd3d\u200d\u2640\ufe0f",handball_person:"\ud83e\udd3e",man_playing_handball:"\ud83e\udd3e\u200d\u2642\ufe0f",woman_playing_handball:"\ud83e\udd3e\u200d\u2640\ufe0f",juggling_person:"\ud83e\udd39",man_juggling:"\ud83e\udd39\u200d\u2642\ufe0f",woman_juggling:"\ud83e\udd39\u200d\u2640\ufe0f",lotus_position:"\ud83e\uddd8",lotus_position_man:"\ud83e\uddd8\u200d\u2642\ufe0f",lotus_position_woman:"\ud83e\uddd8\u200d\u2640\ufe0f",bath:"\ud83d\udec0",sleeping_bed:"\ud83d\udecc",people_holding_hands:"\ud83e\uddd1\u200d\ud83e\udd1d\u200d\ud83e\uddd1",two_women_holding_hands:"\ud83d\udc6d",couple:"\ud83d\udc6b",two_men_holding_hands:"\ud83d\udc6c",couplekiss:"\ud83d\udc8f",couplekiss_man_woman:"\ud83d\udc69\u200d\u2764\ufe0f\u200d\ud83d\udc8b\u200d\ud83d\udc68",couplekiss_man_man:"\ud83d\udc68\u200d\u2764\ufe0f\u200d\ud83d\udc8b\u200d\ud83d\udc68",couplekiss_woman_woman:"\ud83d\udc69\u200d\u2764\ufe0f\u200d\ud83d\udc8b\u200d\ud83d\udc69",couple_with_heart:"\ud83d\udc91",couple_with_heart_woman_man:"\ud83d\udc69\u200d\u2764\ufe0f\u200d\ud83d\udc68",couple_with_heart_man_man:"\ud83d\udc68\u200d\u2764\ufe0f\u200d\ud83d\udc68",couple_with_heart_woman_woman:"\ud83d\udc69\u200d\u2764\ufe0f\u200d\ud83d\udc69",family:"\ud83d\udc6a",family_man_woman_boy:"\ud83d\udc68\u200d\ud83d\udc69\u200d\ud83d\udc66",family_man_woman_girl:"\ud83d\udc68\u200d\ud83d\udc69\u200d\ud83d\udc67",family_man_woman_girl_boy:"\ud83d\udc68\u200d\ud83d\udc69\u200d\ud83d\udc67\u200d\ud83d\udc66",family_man_woman_boy_boy:"\ud83d\udc68\u200d\ud83d\udc69\u200d\ud83d\udc66\u200d\ud83d\udc66",family_man_woman_girl_girl:"\ud83d\udc68\u200d\ud83d\udc69\u200d\ud83d\udc67\u200d\ud83d\udc67",family_man_man_boy:"\ud83d\udc68\u200d\ud83d\udc68\u200d\ud83d\udc66",family_man_man_girl:"\ud83d\udc68\u200d\ud83d\udc68\u200d\ud83d\udc67",family_man_man_girl_boy:"\ud83d\udc68\u200d\ud83d\udc68\u200d\ud83d\udc67\u200d\ud83d\udc66",family_man_man_boy_boy:"\ud83d\udc68\u200d\ud83d\udc68\u200d\ud83d\udc66\u200d\ud83d\udc66",family_man_man_girl_girl:"\ud83d\udc68\u200d\ud83d\udc68\u200d\ud83d\udc67\u200d\ud83d\udc67",family_woman_woman_boy:"\ud83d\udc69\u200d\ud83d\udc69\u200d\ud83d\udc66",family_woman_woman_girl:"\ud83d\udc69\u200d\ud83d\udc69\u200d\ud83d\udc67",family_woman_woman_girl_boy:"\ud83d\udc69\u200d\ud83d\udc69\u200d\ud83d\udc67\u200d\ud83d\udc66",family_woman_woman_boy_boy:"\ud83d\udc69\u200d\ud83d\udc69\u200d\ud83d\udc66\u200d\ud83d\udc66",family_woman_woman_girl_girl:"\ud83d\udc69\u200d\ud83d\udc69\u200d\ud83d\udc67\u200d\ud83d\udc67",family_man_boy:"\ud83d\udc68\u200d\ud83d\udc66",family_man_boy_boy:"\ud83d\udc68\u200d\ud83d\udc66\u200d\ud83d\udc66",family_man_girl:"\ud83d\udc68\u200d\ud83d\udc67",family_man_girl_boy:"\ud83d\udc68\u200d\ud83d\udc67\u200d\ud83d\udc66",family_man_girl_girl:"\ud83d\udc68\u200d\ud83d\udc67\u200d\ud83d\udc67",family_woman_boy:"\ud83d\udc69\u200d\ud83d\udc66",family_woman_boy_boy:"\ud83d\udc69\u200d\ud83d\udc66\u200d\ud83d\udc66",family_woman_girl:"\ud83d\udc69\u200d\ud83d\udc67",family_woman_girl_boy:"\ud83d\udc69\u200d\ud83d\udc67\u200d\ud83d\udc66",family_woman_girl_girl:"\ud83d\udc69\u200d\ud83d\udc67\u200d\ud83d\udc67",speaking_head:"\ud83d\udde3\ufe0f",bust_in_silhouette:"\ud83d\udc64",busts_in_silhouette:"\ud83d\udc65",people_hugging:"\ud83e\udec2",footprints:"\ud83d\udc63",monkey_face:"\ud83d\udc35",monkey:"\ud83d\udc12",gorilla:"\ud83e\udd8d",orangutan:"\ud83e\udda7",dog:"\ud83d\udc36",dog2:"\ud83d\udc15",guide_dog:"\ud83e\uddae",service_dog:"\ud83d\udc15\u200d\ud83e\uddba",poodle:"\ud83d\udc29",wolf:"\ud83d\udc3a",fox_face:"\ud83e\udd8a",raccoon:"\ud83e\udd9d",cat:"\ud83d\udc31",cat2:"\ud83d\udc08",black_cat:"\ud83d\udc08\u200d\u2b1b",lion:"\ud83e\udd81",tiger:"\ud83d\udc2f",tiger2:"\ud83d\udc05",leopard:"\ud83d\udc06",horse:"\ud83d\udc34",moose:"\ud83e\udece",donkey:"\ud83e\udecf",racehorse:"\ud83d\udc0e",unicorn:"\ud83e\udd84",zebra:"\ud83e\udd93",deer:"\ud83e\udd8c",bison:"\ud83e\uddac",cow:"\ud83d\udc2e",ox:"\ud83d\udc02",water_buffalo:"\ud83d\udc03",cow2:"\ud83d\udc04",pig:"\ud83d\udc37",pig2:"\ud83d\udc16",boar:"\ud83d\udc17",pig_nose:"\ud83d\udc3d",ram:"\ud83d\udc0f",sheep:"\ud83d\udc11",goat:"\ud83d\udc10",dromedary_camel:"\ud83d\udc2a",camel:"\ud83d\udc2b",llama:"\ud83e\udd99",giraffe:"\ud83e\udd92",elephant:"\ud83d\udc18",mammoth:"\ud83e\udda3",rhinoceros:"\ud83e\udd8f",hippopotamus:"\ud83e\udd9b",mouse:"\ud83d\udc2d",mouse2:"\ud83d\udc01",rat:"\ud83d\udc00",hamster:"\ud83d\udc39",rabbit:"\ud83d\udc30",rabbit2:"\ud83d\udc07",chipmunk:"\ud83d\udc3f\ufe0f",beaver:"\ud83e\uddab",hedgehog:"\ud83e\udd94",bat:"\ud83e\udd87",bear:"\ud83d\udc3b",polar_bear:"\ud83d\udc3b\u200d\u2744\ufe0f",koala:"\ud83d\udc28",panda_face:"\ud83d\udc3c",sloth:"\ud83e\udda5",otter:"\ud83e\udda6",skunk:"\ud83e\udda8",kangaroo:"\ud83e\udd98",badger:"\ud83e\udda1",feet:"\ud83d\udc3e",paw_prints:"\ud83d\udc3e",turkey:"\ud83e\udd83",chicken:"\ud83d\udc14",rooster:"\ud83d\udc13",hatching_chick:"\ud83d\udc23",baby_chick:"\ud83d\udc24",hatched_chick:"\ud83d\udc25",bird:"\ud83d\udc26",penguin:"\ud83d\udc27",dove:"\ud83d\udd4a\ufe0f",eagle:"\ud83e\udd85",duck:"\ud83e\udd86",swan:"\ud83e\udda2",owl:"\ud83e\udd89",dodo:"\ud83e\udda4",feather:"\ud83e\udeb6",flamingo:"\ud83e\udda9",peacock:"\ud83e\udd9a",parrot:"\ud83e\udd9c",wing:"\ud83e\udebd",black_bird:"\ud83d\udc26\u200d\u2b1b",goose:"\ud83e\udebf",frog:"\ud83d\udc38",crocodile:"\ud83d\udc0a",turtle:"\ud83d\udc22",lizard:"\ud83e\udd8e",snake:"\ud83d\udc0d",dragon_face:"\ud83d\udc32",dragon:"\ud83d\udc09",sauropod:"\ud83e\udd95","t-rex":"\ud83e\udd96",whale:"\ud83d\udc33",whale2:"\ud83d\udc0b",dolphin:"\ud83d\udc2c",flipper:"\ud83d\udc2c",seal:"\ud83e\uddad",fish:"\ud83d\udc1f",tropical_fish:"\ud83d\udc20",blowfish:"\ud83d\udc21",shark:"\ud83e\udd88",octopus:"\ud83d\udc19",shell:"\ud83d\udc1a",coral:"\ud83e\udeb8",jellyfish:"\ud83e\udebc",snail:"\ud83d\udc0c",butterfly:"\ud83e\udd8b",bug:"\ud83d\udc1b",ant:"\ud83d\udc1c",bee:"\ud83d\udc1d",honeybee:"\ud83d\udc1d",beetle:"\ud83e\udeb2",lady_beetle:"\ud83d\udc1e",cricket:"\ud83e\udd97",cockroach:"\ud83e\udeb3",spider:"\ud83d\udd77\ufe0f",spider_web:"\ud83d\udd78\ufe0f",scorpion:"\ud83e\udd82",mosquito:"\ud83e\udd9f",fly:"\ud83e\udeb0",worm:"\ud83e\udeb1",microbe:"\ud83e\udda0",bouquet:"\ud83d\udc90",cherry_blossom:"\ud83c\udf38",white_flower:"\ud83d\udcae",lotus:"\ud83e\udeb7",rosette:"\ud83c\udff5\ufe0f",rose:"\ud83c\udf39",wilted_flower:"\ud83e\udd40",hibiscus:"\ud83c\udf3a",sunflower:"\ud83c\udf3b",blossom:"\ud83c\udf3c",tulip:"\ud83c\udf37",hyacinth:"\ud83e\udebb",seedling:"\ud83c\udf31",potted_plant:"\ud83e\udeb4",evergreen_tree:"\ud83c\udf32",deciduous_tree:"\ud83c\udf33",palm_tree:"\ud83c\udf34",cactus:"\ud83c\udf35",ear_of_rice:"\ud83c\udf3e",herb:"\ud83c\udf3f",shamrock:"\u2618\ufe0f",four_leaf_clover:"\ud83c\udf40",maple_leaf:"\ud83c\udf41",fallen_leaf:"\ud83c\udf42",leaves:"\ud83c\udf43",empty_nest:"\ud83e\udeb9",nest_with_eggs:"\ud83e\udeba",mushroom:"\ud83c\udf44",grapes:"\ud83c\udf47",melon:"\ud83c\udf48",watermelon:"\ud83c\udf49",tangerine:"\ud83c\udf4a",orange:"\ud83c\udf4a",mandarin:"\ud83c\udf4a",lemon:"\ud83c\udf4b",banana:"\ud83c\udf4c",pineapple:"\ud83c\udf4d",mango:"\ud83e\udd6d",apple:"\ud83c\udf4e",green_apple:"\ud83c\udf4f",pear:"\ud83c\udf50",peach:"\ud83c\udf51",cherries:"\ud83c\udf52",strawberry:"\ud83c\udf53",blueberries:"\ud83e\uded0",kiwi_fruit:"\ud83e\udd5d",tomato:"\ud83c\udf45",olive:"\ud83e\uded2",coconut:"\ud83e\udd65",avocado:"\ud83e\udd51",eggplant:"\ud83c\udf46",potato:"\ud83e\udd54",carrot:"\ud83e\udd55",corn:"\ud83c\udf3d",hot_pepper:"\ud83c\udf36\ufe0f",bell_pepper:"\ud83e\uded1",cucumber:"\ud83e\udd52",leafy_green:"\ud83e\udd6c",broccoli:"\ud83e\udd66",garlic:"\ud83e\uddc4",onion:"\ud83e\uddc5",peanuts:"\ud83e\udd5c",beans:"\ud83e\uded8",chestnut:"\ud83c\udf30",ginger_root:"\ud83e\udeda",pea_pod:"\ud83e\udedb",bread:"\ud83c\udf5e",croissant:"\ud83e\udd50",baguette_bread:"\ud83e\udd56",flatbread:"\ud83e\uded3",pretzel:"\ud83e\udd68",bagel:"\ud83e\udd6f",pancakes:"\ud83e\udd5e",waffle:"\ud83e\uddc7",cheese:"\ud83e\uddc0",meat_on_bone:"\ud83c\udf56",poultry_leg:"\ud83c\udf57",cut_of_meat:"\ud83e\udd69",bacon:"\ud83e\udd53",hamburger:"\ud83c\udf54",fries:"\ud83c\udf5f",pizza:"\ud83c\udf55",hotdog:"\ud83c\udf2d",sandwich:"\ud83e\udd6a",taco:"\ud83c\udf2e",burrito:"\ud83c\udf2f",tamale:"\ud83e\uded4",stuffed_flatbread:"\ud83e\udd59",falafel:"\ud83e\uddc6",egg:"\ud83e\udd5a",fried_egg:"\ud83c\udf73",shallow_pan_of_food:"\ud83e\udd58",stew:"\ud83c\udf72",fondue:"\ud83e\uded5",bowl_with_spoon:"\ud83e\udd63",green_salad:"\ud83e\udd57",popcorn:"\ud83c\udf7f",butter:"\ud83e\uddc8",salt:"\ud83e\uddc2",canned_food:"\ud83e\udd6b",bento:"\ud83c\udf71",rice_cracker:"\ud83c\udf58",rice_ball:"\ud83c\udf59",rice:"\ud83c\udf5a",curry:"\ud83c\udf5b",ramen:"\ud83c\udf5c",spaghetti:"\ud83c\udf5d",sweet_potato:"\ud83c\udf60",oden:"\ud83c\udf62",sushi:"\ud83c\udf63",fried_shrimp:"\ud83c\udf64",fish_cake:"\ud83c\udf65",moon_cake:"\ud83e\udd6e",dango:"\ud83c\udf61",dumpling:"\ud83e\udd5f",fortune_cookie:"\ud83e\udd60",takeout_box:"\ud83e\udd61",crab:"\ud83e\udd80",lobster:"\ud83e\udd9e",shrimp:"\ud83e\udd90",squid:"\ud83e\udd91",oyster:"\ud83e\uddaa",icecream:"\ud83c\udf66",shaved_ice:"\ud83c\udf67",ice_cream:"\ud83c\udf68",doughnut:"\ud83c\udf69",cookie:"\ud83c\udf6a",birthday:"\ud83c\udf82",cake:"\ud83c\udf70",cupcake:"\ud83e\uddc1",pie:"\ud83e\udd67",chocolate_bar:"\ud83c\udf6b",candy:"\ud83c\udf6c",lollipop:"\ud83c\udf6d",custard:"\ud83c\udf6e",honey_pot:"\ud83c\udf6f",baby_bottle:"\ud83c\udf7c",milk_glass:"\ud83e\udd5b",coffee:"\u2615",teapot:"\ud83e\uded6",tea:"\ud83c\udf75",sake:"\ud83c\udf76",champagne:"\ud83c\udf7e",wine_glass:"\ud83c\udf77",cocktail:"\ud83c\udf78",tropical_drink:"\ud83c\udf79",beer:"\ud83c\udf7a",beers:"\ud83c\udf7b",clinking_glasses:"\ud83e\udd42",tumbler_glass:"\ud83e\udd43",pouring_liquid:"\ud83e\uded7",cup_with_straw:"\ud83e\udd64",bubble_tea:"\ud83e\uddcb",beverage_box:"\ud83e\uddc3",mate:"\ud83e\uddc9",ice_cube:"\ud83e\uddca",chopsticks:"\ud83e\udd62",plate_with_cutlery:"\ud83c\udf7d\ufe0f",fork_and_knife:"\ud83c\udf74",spoon:"\ud83e\udd44",hocho:"\ud83d\udd2a",knife:"\ud83d\udd2a",jar:"\ud83e\uded9",amphora:"\ud83c\udffa",earth_africa:"\ud83c\udf0d",earth_americas:"\ud83c\udf0e",earth_asia:"\ud83c\udf0f",globe_with_meridians:"\ud83c\udf10",world_map:"\ud83d\uddfa\ufe0f",japan:"\ud83d\uddfe",compass:"\ud83e\udded",mountain_snow:"\ud83c\udfd4\ufe0f",mountain:"\u26f0\ufe0f",volcano:"\ud83c\udf0b",mount_fuji:"\ud83d\uddfb",camping:"\ud83c\udfd5\ufe0f",beach_umbrella:"\ud83c\udfd6\ufe0f",desert:"\ud83c\udfdc\ufe0f",desert_island:"\ud83c\udfdd\ufe0f",national_park:"\ud83c\udfde\ufe0f",stadium:"\ud83c\udfdf\ufe0f",classical_building:"\ud83c\udfdb\ufe0f",building_construction:"\ud83c\udfd7\ufe0f",bricks:"\ud83e\uddf1",rock:"\ud83e\udea8",wood:"\ud83e\udeb5",hut:"\ud83d\uded6",houses:"\ud83c\udfd8\ufe0f",derelict_house:"\ud83c\udfda\ufe0f",house:"\ud83c\udfe0",house_with_garden:"\ud83c\udfe1",office:"\ud83c\udfe2",post_office:"\ud83c\udfe3",european_post_office:"\ud83c\udfe4",hospital:"\ud83c\udfe5",bank:"\ud83c\udfe6",hotel:"\ud83c\udfe8",love_hotel:"\ud83c\udfe9",convenience_store:"\ud83c\udfea",school:"\ud83c\udfeb",department_store:"\ud83c\udfec",factory:"\ud83c\udfed",japanese_castle:"\ud83c\udfef",european_castle:"\ud83c\udff0",wedding:"\ud83d\udc92",tokyo_tower:"\ud83d\uddfc",statue_of_liberty:"\ud83d\uddfd",church:"\u26ea",mosque:"\ud83d\udd4c",hindu_temple:"\ud83d\uded5",synagogue:"\ud83d\udd4d",shinto_shrine:"\u26e9\ufe0f",kaaba:"\ud83d\udd4b",fountain:"\u26f2",tent:"\u26fa",foggy:"\ud83c\udf01",night_with_stars:"\ud83c\udf03",cityscape:"\ud83c\udfd9\ufe0f",sunrise_over_mountains:"\ud83c\udf04",sunrise:"\ud83c\udf05",city_sunset:"\ud83c\udf06",city_sunrise:"\ud83c\udf07",bridge_at_night:"\ud83c\udf09",hotsprings:"\u2668\ufe0f",carousel_horse:"\ud83c\udfa0",playground_slide:"\ud83d\udedd",ferris_wheel:"\ud83c\udfa1",roller_coaster:"\ud83c\udfa2",barber:"\ud83d\udc88",circus_tent:"\ud83c\udfaa",steam_locomotive:"\ud83d\ude82",railway_car:"\ud83d\ude83",bullettrain_side:"\ud83d\ude84",bullettrain_front:"\ud83d\ude85",train2:"\ud83d\ude86",metro:"\ud83d\ude87",light_rail:"\ud83d\ude88",station:"\ud83d\ude89",tram:"\ud83d\ude8a",monorail:"\ud83d\ude9d",mountain_railway:"\ud83d\ude9e",train:"\ud83d\ude8b",bus:"\ud83d\ude8c",oncoming_bus:"\ud83d\ude8d",trolleybus:"\ud83d\ude8e",minibus:"\ud83d\ude90",ambulance:"\ud83d\ude91",fire_engine:"\ud83d\ude92",police_car:"\ud83d\ude93",oncoming_police_car:"\ud83d\ude94",taxi:"\ud83d\ude95",oncoming_taxi:"\ud83d\ude96",car:"\ud83d\ude97",red_car:"\ud83d\ude97",oncoming_automobile:"\ud83d\ude98",blue_car:"\ud83d\ude99",pickup_truck:"\ud83d\udefb",truck:"\ud83d\ude9a",articulated_lorry:"\ud83d\ude9b",tractor:"\ud83d\ude9c",racing_car:"\ud83c\udfce\ufe0f",motorcycle:"\ud83c\udfcd\ufe0f",motor_scooter:"\ud83d\udef5",manual_wheelchair:"\ud83e\uddbd",motorized_wheelchair:"\ud83e\uddbc",auto_rickshaw:"\ud83d\udefa",bike:"\ud83d\udeb2",kick_scooter:"\ud83d\udef4",skateboard:"\ud83d\udef9",roller_skate:"\ud83d\udefc",busstop:"\ud83d\ude8f",motorway:"\ud83d\udee3\ufe0f",railway_track:"\ud83d\udee4\ufe0f",oil_drum:"\ud83d\udee2\ufe0f",fuelpump:"\u26fd",wheel:"\ud83d\udede",rotating_light:"\ud83d\udea8",traffic_light:"\ud83d\udea5",vertical_traffic_light:"\ud83d\udea6",stop_sign:"\ud83d\uded1",construction:"\ud83d\udea7",anchor:"\u2693",ring_buoy:"\ud83d\udedf",boat:"\u26f5",sailboat:"\u26f5",canoe:"\ud83d\udef6",speedboat:"\ud83d\udea4",passenger_ship:"\ud83d\udef3\ufe0f",ferry:"\u26f4\ufe0f",motor_boat:"\ud83d\udee5\ufe0f",ship:"\ud83d\udea2",airplane:"\u2708\ufe0f",small_airplane:"\ud83d\udee9\ufe0f",flight_departure:"\ud83d\udeeb",flight_arrival:"\ud83d\udeec",parachute:"\ud83e\ude82",seat:"\ud83d\udcba",helicopter:"\ud83d\ude81",suspension_railway:"\ud83d\ude9f",mountain_cableway:"\ud83d\udea0",aerial_tramway:"\ud83d\udea1",artificial_satellite:"\ud83d\udef0\ufe0f",rocket:"\ud83d\ude80",flying_saucer:"\ud83d\udef8",bellhop_bell:"\ud83d\udece\ufe0f",luggage:"\ud83e\uddf3",hourglass:"\u231b",hourglass_flowing_sand:"\u23f3",watch:"\u231a",alarm_clock:"\u23f0",stopwatch:"\u23f1\ufe0f",timer_clock:"\u23f2\ufe0f",mantelpiece_clock:"\ud83d\udd70\ufe0f",clock12:"\ud83d\udd5b",clock1230:"\ud83d\udd67",clock1:"\ud83d\udd50",clock130:"\ud83d\udd5c",clock2:"\ud83d\udd51",clock230:"\ud83d\udd5d",clock3:"\ud83d\udd52",clock330:"\ud83d\udd5e",clock4:"\ud83d\udd53",clock430:"\ud83d\udd5f",clock5:"\ud83d\udd54",clock530:"\ud83d\udd60",clock6:"\ud83d\udd55",clock630:"\ud83d\udd61",clock7:"\ud83d\udd56",clock730:"\ud83d\udd62",clock8:"\ud83d\udd57",clock830:"\ud83d\udd63",clock9:"\ud83d\udd58",clock930:"\ud83d\udd64",clock10:"\ud83d\udd59",clock1030:"\ud83d\udd65",clock11:"\ud83d\udd5a",clock1130:"\ud83d\udd66",new_moon:"\ud83c\udf11",waxing_crescent_moon:"\ud83c\udf12",first_quarter_moon:"\ud83c\udf13",moon:"\ud83c\udf14",waxing_gibbous_moon:"\ud83c\udf14",full_moon:"\ud83c\udf15",waning_gibbous_moon:"\ud83c\udf16",last_quarter_moon:"\ud83c\udf17",waning_crescent_moon:"\ud83c\udf18",crescent_moon:"\ud83c\udf19",new_moon_with_face:"\ud83c\udf1a",first_quarter_moon_with_face:"\ud83c\udf1b",last_quarter_moon_with_face:"\ud83c\udf1c",thermometer:"\ud83c\udf21\ufe0f",sunny:"\u2600\ufe0f",full_moon_with_face:"\ud83c\udf1d",sun_with_face:"\ud83c\udf1e",ringed_planet:"\ud83e\ude90",star:"\u2b50",star2:"\ud83c\udf1f",stars:"\ud83c\udf20",milky_way:"\ud83c\udf0c",cloud:"\u2601\ufe0f",partly_sunny:"\u26c5",cloud_with_lightning_and_rain:"\u26c8\ufe0f",sun_behind_small_cloud:"\ud83c\udf24\ufe0f",sun_behind_large_cloud:"\ud83c\udf25\ufe0f",sun_behind_rain_cloud:"\ud83c\udf26\ufe0f",cloud_with_rain:"\ud83c\udf27\ufe0f",cloud_with_snow:"\ud83c\udf28\ufe0f",cloud_with_lightning:"\ud83c\udf29\ufe0f",tornado:"\ud83c\udf2a\ufe0f",fog:"\ud83c\udf2b\ufe0f",wind_face:"\ud83c\udf2c\ufe0f",cyclone:"\ud83c\udf00",rainbow:"\ud83c\udf08",closed_umbrella:"\ud83c\udf02",open_umbrella:"\u2602\ufe0f",umbrella:"\u2614",parasol_on_ground:"\u26f1\ufe0f",zap:"\u26a1",snowflake:"\u2744\ufe0f",snowman_with_snow:"\u2603\ufe0f",snowman:"\u26c4",comet:"\u2604\ufe0f",fire:"\ud83d\udd25",droplet:"\ud83d\udca7",ocean:"\ud83c\udf0a",jack_o_lantern:"\ud83c\udf83",christmas_tree:"\ud83c\udf84",fireworks:"\ud83c\udf86",sparkler:"\ud83c\udf87",firecracker:"\ud83e\udde8",sparkles:"\u2728",balloon:"\ud83c\udf88",tada:"\ud83c\udf89",confetti_ball:"\ud83c\udf8a",tanabata_tree:"\ud83c\udf8b",bamboo:"\ud83c\udf8d",dolls:"\ud83c\udf8e",flags:"\ud83c\udf8f",wind_chime:"\ud83c\udf90",rice_scene:"\ud83c\udf91",red_envelope:"\ud83e\udde7",ribbon:"\ud83c\udf80",gift:"\ud83c\udf81",reminder_ribbon:"\ud83c\udf97\ufe0f",tickets:"\ud83c\udf9f\ufe0f",ticket:"\ud83c\udfab",medal_military:"\ud83c\udf96\ufe0f",trophy:"\ud83c\udfc6",medal_sports:"\ud83c\udfc5","1st_place_medal":"\ud83e\udd47","2nd_place_medal":"\ud83e\udd48","3rd_place_medal":"\ud83e\udd49",soccer:"\u26bd",baseball:"\u26be",softball:"\ud83e\udd4e",basketball:"\ud83c\udfc0",volleyball:"\ud83c\udfd0",football:"\ud83c\udfc8",rugby_football:"\ud83c\udfc9",tennis:"\ud83c\udfbe",flying_disc:"\ud83e\udd4f",bowling:"\ud83c\udfb3",cricket_game:"\ud83c\udfcf",field_hockey:"\ud83c\udfd1",ice_hockey:"\ud83c\udfd2",lacrosse:"\ud83e\udd4d",ping_pong:"\ud83c\udfd3",badminton:"\ud83c\udff8",boxing_glove:"\ud83e\udd4a",martial_arts_uniform:"\ud83e\udd4b",goal_net:"\ud83e\udd45",golf:"\u26f3",ice_skate:"\u26f8\ufe0f",fishing_pole_and_fish:"\ud83c\udfa3",diving_mask:"\ud83e\udd3f",running_shirt_with_sash:"\ud83c\udfbd",ski:"\ud83c\udfbf",sled:"\ud83d\udef7",curling_stone:"\ud83e\udd4c",dart:"\ud83c\udfaf",yo_yo:"\ud83e\ude80",kite:"\ud83e\ude81",gun:"\ud83d\udd2b","8ball":"\ud83c\udfb1",crystal_ball:"\ud83d\udd2e",magic_wand:"\ud83e\ude84",video_game:"\ud83c\udfae",joystick:"\ud83d\udd79\ufe0f",slot_machine:"\ud83c\udfb0",game_die:"\ud83c\udfb2",jigsaw:"\ud83e\udde9",teddy_bear:"\ud83e\uddf8",pinata:"\ud83e\ude85",mirror_ball:"\ud83e\udea9",nesting_dolls:"\ud83e\ude86",spades:"\u2660\ufe0f",hearts:"\u2665\ufe0f",diamonds:"\u2666\ufe0f",clubs:"\u2663\ufe0f",chess_pawn:"\u265f\ufe0f",black_joker:"\ud83c\udccf",mahjong:"\ud83c\udc04",flower_playing_cards:"\ud83c\udfb4",performing_arts:"\ud83c\udfad",framed_picture:"\ud83d\uddbc\ufe0f",art:"\ud83c\udfa8",thread:"\ud83e\uddf5",sewing_needle:"\ud83e\udea1",yarn:"\ud83e\uddf6",knot:"\ud83e\udea2",eyeglasses:"\ud83d\udc53",dark_sunglasses:"\ud83d\udd76\ufe0f",goggles:"\ud83e\udd7d",lab_coat:"\ud83e\udd7c",safety_vest:"\ud83e\uddba",necktie:"\ud83d\udc54",shirt:"\ud83d\udc55",tshirt:"\ud83d\udc55",jeans:"\ud83d\udc56",scarf:"\ud83e\udde3",gloves:"\ud83e\udde4",coat:"\ud83e\udde5",socks:"\ud83e\udde6",dress:"\ud83d\udc57",kimono:"\ud83d\udc58",sari:"\ud83e\udd7b",one_piece_swimsuit:"\ud83e\ude71",swim_brief:"\ud83e\ude72",shorts:"\ud83e\ude73",bikini:"\ud83d\udc59",womans_clothes:"\ud83d\udc5a",folding_hand_fan:"\ud83e\udead",purse:"\ud83d\udc5b",handbag:"\ud83d\udc5c",pouch:"\ud83d\udc5d",shopping:"\ud83d\udecd\ufe0f",school_satchel:"\ud83c\udf92",thong_sandal:"\ud83e\ude74",mans_shoe:"\ud83d\udc5e",shoe:"\ud83d\udc5e",athletic_shoe:"\ud83d\udc5f",hiking_boot:"\ud83e\udd7e",flat_shoe:"\ud83e\udd7f",high_heel:"\ud83d\udc60",sandal:"\ud83d\udc61",ballet_shoes:"\ud83e\ude70",boot:"\ud83d\udc62",hair_pick:"\ud83e\udeae",crown:"\ud83d\udc51",womans_hat:"\ud83d\udc52",tophat:"\ud83c\udfa9",mortar_board:"\ud83c\udf93",billed_cap:"\ud83e\udde2",military_helmet:"\ud83e\ude96",rescue_worker_helmet:"\u26d1\ufe0f",prayer_beads:"\ud83d\udcff",lipstick:"\ud83d\udc84",ring:"\ud83d\udc8d",gem:"\ud83d\udc8e",mute:"\ud83d\udd07",speaker:"\ud83d\udd08",sound:"\ud83d\udd09",loud_sound:"\ud83d\udd0a",loudspeaker:"\ud83d\udce2",mega:"\ud83d\udce3",postal_horn:"\ud83d\udcef",bell:"\ud83d\udd14",no_bell:"\ud83d\udd15",musical_score:"\ud83c\udfbc",musical_note:"\ud83c\udfb5",notes:"\ud83c\udfb6",studio_microphone:"\ud83c\udf99\ufe0f",level_slider:"\ud83c\udf9a\ufe0f",control_knobs:"\ud83c\udf9b\ufe0f",microphone:"\ud83c\udfa4",headphones:"\ud83c\udfa7",radio:"\ud83d\udcfb",saxophone:"\ud83c\udfb7",accordion:"\ud83e\ude97",guitar:"\ud83c\udfb8",musical_keyboard:"\ud83c\udfb9",trumpet:"\ud83c\udfba",violin:"\ud83c\udfbb",banjo:"\ud83e\ude95",drum:"\ud83e\udd41",long_drum:"\ud83e\ude98",maracas:"\ud83e\ude87",flute:"\ud83e\ude88",iphone:"\ud83d\udcf1",calling:"\ud83d\udcf2",phone:"\u260e\ufe0f",telephone:"\u260e\ufe0f",telephone_receiver:"\ud83d\udcde",pager:"\ud83d\udcdf",fax:"\ud83d\udce0",battery:"\ud83d\udd0b",low_battery:"\ud83e\udeab",electric_plug:"\ud83d\udd0c",computer:"\ud83d\udcbb",desktop_computer:"\ud83d\udda5\ufe0f",printer:"\ud83d\udda8\ufe0f",keyboard:"\u2328\ufe0f",computer_mouse:"\ud83d\uddb1\ufe0f",trackball:"\ud83d\uddb2\ufe0f",minidisc:"\ud83d\udcbd",floppy_disk:"\ud83d\udcbe",cd:"\ud83d\udcbf",dvd:"\ud83d\udcc0",abacus:"\ud83e\uddee",movie_camera:"\ud83c\udfa5",film_strip:"\ud83c\udf9e\ufe0f",film_projector:"\ud83d\udcfd\ufe0f",clapper:"\ud83c\udfac",tv:"\ud83d\udcfa",camera:"\ud83d\udcf7",camera_flash:"\ud83d\udcf8",video_camera:"\ud83d\udcf9",vhs:"\ud83d\udcfc",mag:"\ud83d\udd0d",mag_right:"\ud83d\udd0e",candle:"\ud83d\udd6f\ufe0f",bulb:"\ud83d\udca1",flashlight:"\ud83d\udd26",izakaya_lantern:"\ud83c\udfee",lantern:"\ud83c\udfee",diya_lamp:"\ud83e\ude94",notebook_with_decorative_cover:"\ud83d\udcd4",closed_book:"\ud83d\udcd5",book:"\ud83d\udcd6",open_book:"\ud83d\udcd6",green_book:"\ud83d\udcd7",blue_book:"\ud83d\udcd8",orange_book:"\ud83d\udcd9",books:"\ud83d\udcda",notebook:"\ud83d\udcd3",ledger:"\ud83d\udcd2",page_with_curl:"\ud83d\udcc3",scroll:"\ud83d\udcdc",page_facing_up:"\ud83d\udcc4",newspaper:"\ud83d\udcf0",newspaper_roll:"\ud83d\uddde\ufe0f",bookmark_tabs:"\ud83d\udcd1",bookmark:"\ud83d\udd16",label:"\ud83c\udff7\ufe0f",moneybag:"\ud83d\udcb0",coin:"\ud83e\ude99",yen:"\ud83d\udcb4",dollar:"\ud83d\udcb5",euro:"\ud83d\udcb6",pound:"\ud83d\udcb7",money_with_wings:"\ud83d\udcb8",credit_card:"\ud83d\udcb3",receipt:"\ud83e\uddfe",chart:"\ud83d\udcb9",envelope:"\u2709\ufe0f",email:"\ud83d\udce7","e-mail":"\ud83d\udce7",incoming_envelope:"\ud83d\udce8",envelope_with_arrow:"\ud83d\udce9",outbox_tray:"\ud83d\udce4",inbox_tray:"\ud83d\udce5",package:"\ud83d\udce6",mailbox:"\ud83d\udceb",mailbox_closed:"\ud83d\udcea",mailbox_with_mail:"\ud83d\udcec",mailbox_with_no_mail:"\ud83d\udced",postbox:"\ud83d\udcee",ballot_box:"\ud83d\uddf3\ufe0f",pencil2:"\u270f\ufe0f",black_nib:"\u2712\ufe0f",fountain_pen:"\ud83d\udd8b\ufe0f",pen:"\ud83d\udd8a\ufe0f",paintbrush:"\ud83d\udd8c\ufe0f",crayon:"\ud83d\udd8d\ufe0f",memo:"\ud83d\udcdd",pencil:"\ud83d\udcdd",briefcase:"\ud83d\udcbc",file_folder:"\ud83d\udcc1",open_file_folder:"\ud83d\udcc2",card_index_dividers:"\ud83d\uddc2\ufe0f",date:"\ud83d\udcc5",calendar:"\ud83d\udcc6",spiral_notepad:"\ud83d\uddd2\ufe0f",spiral_calendar:"\ud83d\uddd3\ufe0f",card_index:"\ud83d\udcc7",chart_with_upwards_trend:"\ud83d\udcc8",chart_with_downwards_trend:"\ud83d\udcc9",bar_chart:"\ud83d\udcca",clipboard:"\ud83d\udccb",pushpin:"\ud83d\udccc",round_pushpin:"\ud83d\udccd",paperclip:"\ud83d\udcce",paperclips:"\ud83d\udd87\ufe0f",straight_ruler:"\ud83d\udccf",triangular_ruler:"\ud83d\udcd0",scissors:"\u2702\ufe0f",card_file_box:"\ud83d\uddc3\ufe0f",file_cabinet:"\ud83d\uddc4\ufe0f",wastebasket:"\ud83d\uddd1\ufe0f",lock:"\ud83d\udd12",unlock:"\ud83d\udd13",lock_with_ink_pen:"\ud83d\udd0f",closed_lock_with_key:"\ud83d\udd10",key:"\ud83d\udd11",old_key:"\ud83d\udddd\ufe0f",hammer:"\ud83d\udd28",axe:"\ud83e\ude93",pick:"\u26cf\ufe0f",hammer_and_pick:"\u2692\ufe0f",hammer_and_wrench:"\ud83d\udee0\ufe0f",dagger:"\ud83d\udde1\ufe0f",crossed_swords:"\u2694\ufe0f",bomb:"\ud83d\udca3",boomerang:"\ud83e\ude83",bow_and_arrow:"\ud83c\udff9",shield:"\ud83d\udee1\ufe0f",carpentry_saw:"\ud83e\ude9a",wrench:"\ud83d\udd27",screwdriver:"\ud83e\ude9b",nut_and_bolt:"\ud83d\udd29",gear:"\u2699\ufe0f",clamp:"\ud83d\udddc\ufe0f",balance_scale:"\u2696\ufe0f",probing_cane:"\ud83e\uddaf",link:"\ud83d\udd17",chains:"\u26d3\ufe0f",hook:"\ud83e\ude9d",toolbox:"\ud83e\uddf0",magnet:"\ud83e\uddf2",ladder:"\ud83e\ude9c",alembic:"\u2697\ufe0f",test_tube:"\ud83e\uddea",petri_dish:"\ud83e\uddeb",dna:"\ud83e\uddec",microscope:"\ud83d\udd2c",telescope:"\ud83d\udd2d",satellite:"\ud83d\udce1",syringe:"\ud83d\udc89",drop_of_blood:"\ud83e\ude78",pill:"\ud83d\udc8a",adhesive_bandage:"\ud83e\ude79",crutch:"\ud83e\ude7c",stethoscope:"\ud83e\ude7a",x_ray:"\ud83e\ude7b",door:"\ud83d\udeaa",elevator:"\ud83d\uded7",mirror:"\ud83e\ude9e",window:"\ud83e\ude9f",bed:"\ud83d\udecf\ufe0f",couch_and_lamp:"\ud83d\udecb\ufe0f",chair:"\ud83e\ude91",toilet:"\ud83d\udebd",plunger:"\ud83e\udea0",shower:"\ud83d\udebf",bathtub:"\ud83d\udec1",mouse_trap:"\ud83e\udea4",razor:"\ud83e\ude92",lotion_bottle:"\ud83e\uddf4",safety_pin:"\ud83e\uddf7",broom:"\ud83e\uddf9",basket:"\ud83e\uddfa",roll_of_paper:"\ud83e\uddfb",bucket:"\ud83e\udea3",soap:"\ud83e\uddfc",bubbles:"\ud83e\udee7",toothbrush:"\ud83e\udea5",sponge:"\ud83e\uddfd",fire_extinguisher:"\ud83e\uddef",shopping_cart:"\ud83d\uded2",smoking:"\ud83d\udeac",coffin:"\u26b0\ufe0f",headstone:"\ud83e\udea6",funeral_urn:"\u26b1\ufe0f",nazar_amulet:"\ud83e\uddff",hamsa:"\ud83e\udeac",moyai:"\ud83d\uddff",placard:"\ud83e\udea7",identification_card:"\ud83e\udeaa",atm:"\ud83c\udfe7",put_litter_in_its_place:"\ud83d\udeae",potable_water:"\ud83d\udeb0",wheelchair:"\u267f",mens:"\ud83d\udeb9",womens:"\ud83d\udeba",restroom:"\ud83d\udebb",baby_symbol:"\ud83d\udebc",wc:"\ud83d\udebe",passport_control:"\ud83d\udec2",customs:"\ud83d\udec3",baggage_claim:"\ud83d\udec4",left_luggage:"\ud83d\udec5",warning:"\u26a0\ufe0f",children_crossing:"\ud83d\udeb8",no_entry:"\u26d4",no_entry_sign:"\ud83d\udeab",no_bicycles:"\ud83d\udeb3",no_smoking:"\ud83d\udead",do_not_litter:"\ud83d\udeaf","non-potable_water":"\ud83d\udeb1",no_pedestrians:"\ud83d\udeb7",no_mobile_phones:"\ud83d\udcf5",underage:"\ud83d\udd1e",radioactive:"\u2622\ufe0f",biohazard:"\u2623\ufe0f",arrow_up:"\u2b06\ufe0f",arrow_upper_right:"\u2197\ufe0f",arrow_right:"\u27a1\ufe0f",arrow_lower_right:"\u2198\ufe0f",arrow_down:"\u2b07\ufe0f",arrow_lower_left:"\u2199\ufe0f",arrow_left:"\u2b05\ufe0f",arrow_upper_left:"\u2196\ufe0f",arrow_up_down:"\u2195\ufe0f",left_right_arrow:"\u2194\ufe0f",leftwards_arrow_with_hook:"\u21a9\ufe0f",arrow_right_hook:"\u21aa\ufe0f",arrow_heading_up:"\u2934\ufe0f",arrow_heading_down:"\u2935\ufe0f",arrows_clockwise:"\ud83d\udd03",arrows_counterclockwise:"\ud83d\udd04",back:"\ud83d\udd19",end:"\ud83d\udd1a",on:"\ud83d\udd1b",soon:"\ud83d\udd1c",top:"\ud83d\udd1d",place_of_worship:"\ud83d\uded0",atom_symbol:"\u269b\ufe0f",om:"\ud83d\udd49\ufe0f",star_of_david:"\u2721\ufe0f",wheel_of_dharma:"\u2638\ufe0f",yin_yang:"\u262f\ufe0f",latin_cross:"\u271d\ufe0f",orthodox_cross:"\u2626\ufe0f",star_and_crescent:"\u262a\ufe0f",peace_symbol:"\u262e\ufe0f",menorah:"\ud83d\udd4e",six_pointed_star:"\ud83d\udd2f",khanda:"\ud83e\udeaf",aries:"\u2648",taurus:"\u2649",gemini:"\u264a",cancer:"\u264b",leo:"\u264c",virgo:"\u264d",libra:"\u264e",scorpius:"\u264f",sagittarius:"\u2650",capricorn:"\u2651",aquarius:"\u2652",pisces:"\u2653",ophiuchus:"\u26ce",twisted_rightwards_arrows:"\ud83d\udd00",repeat:"\ud83d\udd01",repeat_one:"\ud83d\udd02",arrow_forward:"\u25b6\ufe0f",fast_forward:"\u23e9",next_track_button:"\u23ed\ufe0f",play_or_pause_button:"\u23ef\ufe0f",arrow_backward:"\u25c0\ufe0f",rewind:"\u23ea",previous_track_button:"\u23ee\ufe0f",arrow_up_small:"\ud83d\udd3c",arrow_double_up:"\u23eb",arrow_down_small:"\ud83d\udd3d",arrow_double_down:"\u23ec",pause_button:"\u23f8\ufe0f",stop_button:"\u23f9\ufe0f",record_button:"\u23fa\ufe0f",eject_button:"\u23cf\ufe0f",cinema:"\ud83c\udfa6",low_brightness:"\ud83d\udd05",high_brightness:"\ud83d\udd06",signal_strength:"\ud83d\udcf6",wireless:"\ud83d\udedc",vibration_mode:"\ud83d\udcf3",mobile_phone_off:"\ud83d\udcf4",female_sign:"\u2640\ufe0f",male_sign:"\u2642\ufe0f",transgender_symbol:"\u26a7\ufe0f",heavy_multiplication_x:"\u2716\ufe0f",heavy_plus_sign:"\u2795",heavy_minus_sign:"\u2796",heavy_division_sign:"\u2797",heavy_equals_sign:"\ud83d\udff0",infinity:"\u267e\ufe0f",bangbang:"\u203c\ufe0f",interrobang:"\u2049\ufe0f",question:"\u2753",grey_question:"\u2754",grey_exclamation:"\u2755",exclamation:"\u2757",heavy_exclamation_mark:"\u2757",wavy_dash:"\u3030\ufe0f",currency_exchange:"\ud83d\udcb1",heavy_dollar_sign:"\ud83d\udcb2",medical_symbol:"\u2695\ufe0f",recycle:"\u267b\ufe0f",fleur_de_lis:"\u269c\ufe0f",trident:"\ud83d\udd31",name_badge:"\ud83d\udcdb",beginner:"\ud83d\udd30",o:"\u2b55",white_check_mark:"\u2705",ballot_box_with_check:"\u2611\ufe0f",heavy_check_mark:"\u2714\ufe0f",x:"\u274c",negative_squared_cross_mark:"\u274e",curly_loop:"\u27b0",loop:"\u27bf",part_alternation_mark:"\u303d\ufe0f",eight_spoked_asterisk:"\u2733\ufe0f",eight_pointed_black_star:"\u2734\ufe0f",sparkle:"\u2747\ufe0f",copyright:"\xa9\ufe0f",registered:"\xae\ufe0f",tm:"\u2122\ufe0f",hash:"#\ufe0f\u20e3",asterisk:"*\ufe0f\u20e3",zero:"0\ufe0f\u20e3",one:"1\ufe0f\u20e3",two:"2\ufe0f\u20e3",three:"3\ufe0f\u20e3",four:"4\ufe0f\u20e3",five:"5\ufe0f\u20e3",six:"6\ufe0f\u20e3",seven:"7\ufe0f\u20e3",eight:"8\ufe0f\u20e3",nine:"9\ufe0f\u20e3",keycap_ten:"\ud83d\udd1f",capital_abcd:"\ud83d\udd20",abcd:"\ud83d\udd21",symbols:"\ud83d\udd23",abc:"\ud83d\udd24",a:"\ud83c\udd70\ufe0f",ab:"\ud83c\udd8e",b:"\ud83c\udd71\ufe0f",cl:"\ud83c\udd91",cool:"\ud83c\udd92",free:"\ud83c\udd93",information_source:"\u2139\ufe0f",id:"\ud83c\udd94",m:"\u24c2\ufe0f",new:"\ud83c\udd95",ng:"\ud83c\udd96",o2:"\ud83c\udd7e\ufe0f",ok:"\ud83c\udd97",parking:"\ud83c\udd7f\ufe0f",sos:"\ud83c\udd98",up:"\ud83c\udd99",vs:"\ud83c\udd9a",koko:"\ud83c\ude01",sa:"\ud83c\ude02\ufe0f",u6708:"\ud83c\ude37\ufe0f",u6709:"\ud83c\ude36",u6307:"\ud83c\ude2f",ideograph_advantage:"\ud83c\ude50",u5272:"\ud83c\ude39",u7121:"\ud83c\ude1a",u7981:"\ud83c\ude32",accept:"\ud83c\ude51",u7533:"\ud83c\ude38",u5408:"\ud83c\ude34",u7a7a:"\ud83c\ude33",congratulations:"\u3297\ufe0f",secret:"\u3299\ufe0f",u55b6:"\ud83c\ude3a",u6e80:"\ud83c\ude35",red_circle:"\ud83d\udd34",orange_circle:"\ud83d\udfe0",yellow_circle:"\ud83d\udfe1",green_circle:"\ud83d\udfe2",large_blue_circle:"\ud83d\udd35",purple_circle:"\ud83d\udfe3",brown_circle:"\ud83d\udfe4",black_circle:"\u26ab",white_circle:"\u26aa",red_square:"\ud83d\udfe5",orange_square:"\ud83d\udfe7",yellow_square:"\ud83d\udfe8",green_square:"\ud83d\udfe9",blue_square:"\ud83d\udfe6",purple_square:"\ud83d\udfea",brown_square:"\ud83d\udfeb",black_large_square:"\u2b1b",white_large_square:"\u2b1c",black_medium_square:"\u25fc\ufe0f",white_medium_square:"\u25fb\ufe0f",black_medium_small_square:"\u25fe",white_medium_small_square:"\u25fd",black_small_square:"\u25aa\ufe0f",white_small_square:"\u25ab\ufe0f",large_orange_diamond:"\ud83d\udd36",large_blue_diamond:"\ud83d\udd37",small_orange_diamond:"\ud83d\udd38",small_blue_diamond:"\ud83d\udd39",small_red_triangle:"\ud83d\udd3a",small_red_triangle_down:"\ud83d\udd3b",diamond_shape_with_a_dot_inside:"\ud83d\udca0",radio_button:"\ud83d\udd18",white_square_button:"\ud83d\udd33",black_square_button:"\ud83d\udd32",checkered_flag:"\ud83c\udfc1",triangular_flag_on_post:"\ud83d\udea9",crossed_flags:"\ud83c\udf8c",black_flag:"\ud83c\udff4",white_flag:"\ud83c\udff3\ufe0f",rainbow_flag:"\ud83c\udff3\ufe0f\u200d\ud83c\udf08",transgender_flag:"\ud83c\udff3\ufe0f\u200d\u26a7\ufe0f",pirate_flag:"\ud83c\udff4\u200d\u2620\ufe0f",ascension_island:"\ud83c\udde6\ud83c\udde8",andorra:"\ud83c\udde6\ud83c\udde9",united_arab_emirates:"\ud83c\udde6\ud83c\uddea",afghanistan:"\ud83c\udde6\ud83c\uddeb",antigua_barbuda:"\ud83c\udde6\ud83c\uddec",anguilla:"\ud83c\udde6\ud83c\uddee",albania:"\ud83c\udde6\ud83c\uddf1",armenia:"\ud83c\udde6\ud83c\uddf2",angola:"\ud83c\udde6\ud83c\uddf4",antarctica:"\ud83c\udde6\ud83c\uddf6",argentina:"\ud83c\udde6\ud83c\uddf7",american_samoa:"\ud83c\udde6\ud83c\uddf8",austria:"\ud83c\udde6\ud83c\uddf9",australia:"\ud83c\udde6\ud83c\uddfa",aruba:"\ud83c\udde6\ud83c\uddfc",aland_islands:"\ud83c\udde6\ud83c\uddfd",azerbaijan:"\ud83c\udde6\ud83c\uddff",bosnia_herzegovina:"\ud83c\udde7\ud83c\udde6",barbados:"\ud83c\udde7\ud83c\udde7",bangladesh:"\ud83c\udde7\ud83c\udde9",belgium:"\ud83c\udde7\ud83c\uddea",burkina_faso:"\ud83c\udde7\ud83c\uddeb",bulgaria:"\ud83c\udde7\ud83c\uddec",bahrain:"\ud83c\udde7\ud83c\udded",burundi:"\ud83c\udde7\ud83c\uddee",benin:"\ud83c\udde7\ud83c\uddef",st_barthelemy:"\ud83c\udde7\ud83c\uddf1",bermuda:"\ud83c\udde7\ud83c\uddf2",brunei:"\ud83c\udde7\ud83c\uddf3",bolivia:"\ud83c\udde7\ud83c\uddf4",caribbean_netherlands:"\ud83c\udde7\ud83c\uddf6",brazil:"\ud83c\udde7\ud83c\uddf7",bahamas:"\ud83c\udde7\ud83c\uddf8",bhutan:"\ud83c\udde7\ud83c\uddf9",bouvet_island:"\ud83c\udde7\ud83c\uddfb",botswana:"\ud83c\udde7\ud83c\uddfc",belarus:"\u2b1c\ufe0f\ud83d\udfe5\u2b1c",belize:"\ud83c\udde7\ud83c\uddff",canada:"\ud83c\udde8\ud83c\udde6",cocos_islands:"\ud83c\udde8\ud83c\udde8",congo_kinshasa:"\ud83c\udde8\ud83c\udde9",central_african_republic:"\ud83c\udde8\ud83c\uddeb",congo_brazzaville:"\ud83c\udde8\ud83c\uddec",switzerland:"\ud83c\udde8\ud83c\udded",cote_divoire:"\ud83c\udde8\ud83c\uddee",cook_islands:"\ud83c\udde8\ud83c\uddf0",chile:"\ud83c\udde8\ud83c\uddf1",cameroon:"\ud83c\udde8\ud83c\uddf2",cn:"\ud83c\udde8\ud83c\uddf3",colombia:"\ud83c\udde8\ud83c\uddf4",clipperton_island:"\ud83c\udde8\ud83c\uddf5",costa_rica:"\ud83c\udde8\ud83c\uddf7",cuba:"\ud83c\udde8\ud83c\uddfa",cape_verde:"\ud83c\udde8\ud83c\uddfb",curacao:"\ud83c\udde8\ud83c\uddfc",christmas_island:"\ud83c\udde8\ud83c\uddfd",cyprus:"\ud83c\udde8\ud83c\uddfe",czech_republic:"\ud83c\udde8\ud83c\uddff",de:"\ud83c\udde9\ud83c\uddea",diego_garcia:"\ud83c\udde9\ud83c\uddec",djibouti:"\ud83c\udde9\ud83c\uddef",denmark:"\ud83c\udde9\ud83c\uddf0",dominica:"\ud83c\udde9\ud83c\uddf2",dominican_republic:"\ud83c\udde9\ud83c\uddf4",algeria:"\ud83c\udde9\ud83c\uddff",ceuta_melilla:"\ud83c\uddea\ud83c\udde6",ecuador:"\ud83c\uddea\ud83c\udde8",estonia:"\ud83c\uddea\ud83c\uddea",egypt:"\ud83c\uddea\ud83c\uddec",western_sahara:"\ud83c\uddea\ud83c\udded",eritrea:"\ud83c\uddea\ud83c\uddf7",es:"\ud83c\uddea\ud83c\uddf8",ethiopia:"\ud83c\uddea\ud83c\uddf9",eu:"\ud83c\uddea\ud83c\uddfa",european_union:"\ud83c\uddea\ud83c\uddfa",finland:"\ud83c\uddeb\ud83c\uddee",fiji:"\ud83c\uddeb\ud83c\uddef",falkland_islands:"\ud83c\uddeb\ud83c\uddf0",micronesia:"\ud83c\uddeb\ud83c\uddf2",faroe_islands:"\ud83c\uddeb\ud83c\uddf4",fr:"\ud83c\uddeb\ud83c\uddf7",gabon:"\ud83c\uddec\ud83c\udde6",gb:"\ud83c\uddec\ud83c\udde7",uk:"\ud83c\uddec\ud83c\udde7",grenada:"\ud83c\uddec\ud83c\udde9",georgia:"\ud83c\uddec\ud83c\uddea",french_guiana:"\ud83c\uddec\ud83c\uddeb",guernsey:"\ud83c\uddec\ud83c\uddec",ghana:"\ud83c\uddec\ud83c\udded",gibraltar:"\ud83c\uddec\ud83c\uddee",greenland:"\ud83c\uddec\ud83c\uddf1",gambia:"\ud83c\uddec\ud83c\uddf2",guinea:"\ud83c\uddec\ud83c\uddf3",guadeloupe:"\ud83c\uddec\ud83c\uddf5",equatorial_guinea:"\ud83c\uddec\ud83c\uddf6",greece:"\ud83c\uddec\ud83c\uddf7",south_georgia_south_sandwich_islands:"\ud83c\uddec\ud83c\uddf8",guatemala:"\ud83c\uddec\ud83c\uddf9",guam:"\ud83c\uddec\ud83c\uddfa",guinea_bissau:"\ud83c\uddec\ud83c\uddfc",guyana:"\ud83c\uddec\ud83c\uddfe",hong_kong:"\ud83c\udded\ud83c\uddf0",heard_mcdonald_islands:"\ud83c\udded\ud83c\uddf2",honduras:"\ud83c\udded\ud83c\uddf3",croatia:"\ud83c\udded\ud83c\uddf7",haiti:"\ud83c\udded\ud83c\uddf9",hungary:"\ud83c\udded\ud83c\uddfa",canary_islands:"\ud83c\uddee\ud83c\udde8",indonesia:"\ud83c\uddee\ud83c\udde9",ireland:"\ud83c\uddee\ud83c\uddea",israel:"\ud83c\uddee\ud83c\uddf1",isle_of_man:"\ud83c\uddee\ud83c\uddf2",india:"\ud83c\uddee\ud83c\uddf3",british_indian_ocean_territory:"\ud83c\uddee\ud83c\uddf4",iraq:"\ud83c\uddee\ud83c\uddf6",iran:"\ud83c\uddee\ud83c\uddf7",iceland:"\ud83c\uddee\ud83c\uddf8",it:"\ud83c\uddee\ud83c\uddf9",jersey:"\ud83c\uddef\ud83c\uddea",jamaica:"\ud83c\uddef\ud83c\uddf2",jordan:"\ud83c\uddef\ud83c\uddf4",jp:"\ud83c\uddef\ud83c\uddf5",kenya:"\ud83c\uddf0\ud83c\uddea",kyrgyzstan:"\ud83c\uddf0\ud83c\uddec",cambodia:"\ud83c\uddf0\ud83c\udded",kiribati:"\ud83c\uddf0\ud83c\uddee",comoros:"\ud83c\uddf0\ud83c\uddf2",st_kitts_nevis:"\ud83c\uddf0\ud83c\uddf3",north_korea:"\ud83c\uddf0\ud83c\uddf5",kr:"\ud83c\uddf0\ud83c\uddf7",kuwait:"\ud83c\uddf0\ud83c\uddfc",cayman_islands:"\ud83c\uddf0\ud83c\uddfe",kazakhstan:"\ud83c\uddf0\ud83c\uddff",laos:"\ud83c\uddf1\ud83c\udde6",lebanon:"\ud83c\uddf1\ud83c\udde7",st_lucia:"\ud83c\uddf1\ud83c\udde8",liechtenstein:"\ud83c\uddf1\ud83c\uddee",sri_lanka:"\ud83c\uddf1\ud83c\uddf0",liberia:"\ud83c\uddf1\ud83c\uddf7",lesotho:"\ud83c\uddf1\ud83c\uddf8",lithuania:"\ud83c\uddf1\ud83c\uddf9",luxembourg:"\ud83c\uddf1\ud83c\uddfa",latvia:"\ud83c\uddf1\ud83c\uddfb",libya:"\ud83c\uddf1\ud83c\uddfe",morocco:"\ud83c\uddf2\ud83c\udde6",monaco:"\ud83c\uddf2\ud83c\udde8",moldova:"\ud83c\uddf2\ud83c\udde9",montenegro:"\ud83c\uddf2\ud83c\uddea",st_martin:"\ud83c\uddf2\ud83c\uddeb",madagascar:"\ud83c\uddf2\ud83c\uddec",marshall_islands:"\ud83c\uddf2\ud83c\udded",macedonia:"\ud83c\uddf2\ud83c\uddf0",mali:"\ud83c\uddf2\ud83c\uddf1",myanmar:"\ud83c\uddf2\ud83c\uddf2",mongolia:"\ud83c\uddf2\ud83c\uddf3",macau:"\ud83c\uddf2\ud83c\uddf4",northern_mariana_islands:"\ud83c\uddf2\ud83c\uddf5",martinique:"\ud83c\uddf2\ud83c\uddf6",mauritania:"\ud83c\uddf2\ud83c\uddf7",montserrat:"\ud83c\uddf2\ud83c\uddf8",malta:"\ud83c\uddf2\ud83c\uddf9",mauritius:"\ud83c\uddf2\ud83c\uddfa",maldives:"\ud83c\uddf2\ud83c\uddfb",malawi:"\ud83c\uddf2\ud83c\uddfc",mexico:"\ud83c\uddf2\ud83c\uddfd",malaysia:"\ud83c\uddf2\ud83c\uddfe",mozambique:"\ud83c\uddf2\ud83c\uddff",namibia:"\ud83c\uddf3\ud83c\udde6",new_caledonia:"\ud83c\uddf3\ud83c\udde8",niger:"\ud83c\uddf3\ud83c\uddea",norfolk_island:"\ud83c\uddf3\ud83c\uddeb",nigeria:"\ud83c\uddf3\ud83c\uddec",nicaragua:"\ud83c\uddf3\ud83c\uddee",netherlands:"\ud83c\uddf3\ud83c\uddf1",norway:"\ud83c\uddf3\ud83c\uddf4",nepal:"\ud83c\uddf3\ud83c\uddf5",nauru:"\ud83c\uddf3\ud83c\uddf7",niue:"\ud83c\uddf3\ud83c\uddfa",new_zealand:"\ud83c\uddf3\ud83c\uddff",oman:"\ud83c\uddf4\ud83c\uddf2",panama:"\ud83c\uddf5\ud83c\udde6",peru:"\ud83c\uddf5\ud83c\uddea",french_polynesia:"\ud83c\uddf5\ud83c\uddeb",papua_new_guinea:"\ud83c\uddf5\ud83c\uddec",philippines:"\ud83c\uddf5\ud83c\udded",pakistan:"\ud83c\uddf5\ud83c\uddf0",poland:"\ud83c\uddf5\ud83c\uddf1",st_pierre_miquelon:"\ud83c\uddf5\ud83c\uddf2",pitcairn_islands:"\ud83c\uddf5\ud83c\uddf3",puerto_rico:"\ud83c\uddf5\ud83c\uddf7",palestinian_territories:"\ud83c\uddf5\ud83c\uddf8",portugal:"\ud83c\uddf5\ud83c\uddf9",palau:"\ud83c\uddf5\ud83c\uddfc",paraguay:"\ud83c\uddf5\ud83c\uddfe",qatar:"\ud83c\uddf6\ud83c\udde6",reunion:"\ud83c\uddf7\ud83c\uddea",romania:"\ud83c\uddf7\ud83c\uddf4",serbia:"\ud83c\uddf7\ud83c\uddf8",ru:"\ud83c\uddf7\ud83c\uddfa",rwanda:"\ud83c\uddf7\ud83c\uddfc",saudi_arabia:"\ud83c\uddf8\ud83c\udde6",solomon_islands:"\ud83c\uddf8\ud83c\udde7",seychelles:"\ud83c\uddf8\ud83c\udde8",sudan:"\ud83c\uddf8\ud83c\udde9",sweden:"\ud83c\uddf8\ud83c\uddea",singapore:"\ud83c\uddf8\ud83c\uddec",st_helena:"\ud83c\uddf8\ud83c\udded",slovenia:"\ud83c\uddf8\ud83c\uddee",svalbard_jan_mayen:"\ud83c\uddf8\ud83c\uddef",slovakia:"\ud83c\uddf8\ud83c\uddf0",sierra_leone:"\ud83c\uddf8\ud83c\uddf1",san_marino:"\ud83c\uddf8\ud83c\uddf2",senegal:"\ud83c\uddf8\ud83c\uddf3",somalia:"\ud83c\uddf8\ud83c\uddf4",suriname:"\ud83c\uddf8\ud83c\uddf7",south_sudan:"\ud83c\uddf8\ud83c\uddf8",sao_tome_principe:"\ud83c\uddf8\ud83c\uddf9",el_salvador:"\ud83c\uddf8\ud83c\uddfb",sint_maarten:"\ud83c\uddf8\ud83c\uddfd",syria:"\ud83c\uddf8\ud83c\uddfe",swaziland:"\ud83c\uddf8\ud83c\uddff",tristan_da_cunha:"\ud83c\uddf9\ud83c\udde6",turks_caicos_islands:"\ud83c\uddf9\ud83c\udde8",chad:"\ud83c\uddf9\ud83c\udde9",french_southern_territories:"\ud83c\uddf9\ud83c\uddeb",togo:"\ud83c\uddf9\ud83c\uddec",thailand:"\ud83c\uddf9\ud83c\udded",tajikistan:"\ud83c\uddf9\ud83c\uddef",tokelau:"\ud83c\uddf9\ud83c\uddf0",timor_leste:"\ud83c\uddf9\ud83c\uddf1",turkmenistan:"\ud83c\uddf9\ud83c\uddf2",tunisia:"\ud83c\uddf9\ud83c\uddf3",tonga:"\ud83c\uddf9\ud83c\uddf4",tr:"\ud83c\uddf9\ud83c\uddf7",trinidad_tobago:"\ud83c\uddf9\ud83c\uddf9",tuvalu:"\ud83c\uddf9\ud83c\uddfb",taiwan:"\ud83c\uddf9\ud83c\uddfc",tanzania:"\ud83c\uddf9\ud83c\uddff",ukraine:"\ud83c\uddfa\ud83c\udde6",uganda:"\ud83c\uddfa\ud83c\uddec",us_outlying_islands:"\ud83c\uddfa\ud83c\uddf2",united_nations:"\ud83c\uddfa\ud83c\uddf3",us:"\ud83c\uddfa\ud83c\uddf8",uruguay:"\ud83c\uddfa\ud83c\uddfe",uzbekistan:"\ud83c\uddfa\ud83c\uddff",vatican_city:"\ud83c\uddfb\ud83c\udde6",st_vincent_grenadines:"\ud83c\uddfb\ud83c\udde8",venezuela:"\ud83c\uddfb\ud83c\uddea",british_virgin_islands:"\ud83c\uddfb\ud83c\uddec",us_virgin_islands:"\ud83c\uddfb\ud83c\uddee",vietnam:"\ud83c\uddfb\ud83c\uddf3",vanuatu:"\ud83c\uddfb\ud83c\uddfa",wallis_futuna:"\ud83c\uddfc\ud83c\uddeb",samoa:"\ud83c\uddfc\ud83c\uddf8",kosovo:"\ud83c\uddfd\ud83c\uddf0",yemen:"\ud83c\uddfe\ud83c\uddea",mayotte:"\ud83c\uddfe\ud83c\uddf9",south_africa:"\ud83c\uddff\ud83c\udde6",zambia:"\ud83c\uddff\ud83c\uddf2",zimbabwe:"\ud83c\uddff\ud83c\uddfc",england:"\ud83c\udff4\udb40\udc67\udb40\udc62\udb40\udc65\udb40\udc6e\udb40\udc67\udb40\udc7f",scotland:"\ud83c\udff4\udb40\udc67\udb40\udc62\udb40\udc73\udb40\udc63\udb40\udc74\udb40\udc7f",wales:"\ud83c\udff4\udb40\udc67\udb40\udc62\udb40\udc77\udb40\udc6c\udb40\udc73\udb40\udc7f"},renderer:e=>e.emoji}));const zd=()=>{const[e,n]=(0,t.useState)(!1);return mt(pt.FK,{children:mt(Pe,{children:mt(kr,{children:mt(pt.FK,{children:[mt(Nr,{onLoaded:n}),e&&mt(ke,{children:mt(be,{path:"/",element:mt(Rd,{}),children:mt(be,{path:"/",element:mt(cu,{})})})})]})})})})},jd=e=>{e&&n.e(685).then(n.bind(n,685)).then((t=>{let{onCLS:n,onINP:r,onFCP:o,onLCP:a,onTTFB:i}=t;n(e),r(e),o(e),a(e),i(e)}))},$d=document.getElementById("root");$d&&(0,t.render)(mt(zd,{}),$d),jd()})()})(); \ No newline at end of file diff --git a/app/vlselect/vmui/static/js/main.867f457f.js.LICENSE.txt b/app/vlselect/vmui/static/js/main.3d2eb957.js.LICENSE.txt similarity index 100% rename from app/vlselect/vmui/static/js/main.867f457f.js.LICENSE.txt rename to app/vlselect/vmui/static/js/main.3d2eb957.js.LICENSE.txt diff --git a/app/vlselect/vmui/static/js/main.867f457f.js b/app/vlselect/vmui/static/js/main.867f457f.js deleted file mode 100644 index 4be364b41..000000000 --- a/app/vlselect/vmui/static/js/main.867f457f.js +++ /dev/null @@ -1,2 +0,0 @@ -/*! For license information please see main.867f457f.js.LICENSE.txt */ -(()=>{var e={61:(e,t,n)=>{"use strict";var r=n(375),o=n(629),a=o(r("String.prototype.indexOf"));e.exports=function(e,t){var n=r(e,!!t);return"function"===typeof n&&a(e,".prototype.")>-1?o(n):n}},629:(e,t,n)=>{"use strict";var r=n(989),o=n(375),a=n(259),i=n(277),l=o("%Function.prototype.apply%"),s=o("%Function.prototype.call%"),c=o("%Reflect.apply%",!0)||r.call(s,l),u=n(709),d=o("%Math.max%");e.exports=function(e){if("function"!==typeof e)throw new i("a function is required");var t=c(r,s,arguments);return a(t,1+d(0,e.length-(arguments.length-1)),!0)};var h=function(){return c(r,l,arguments)};u?u(e.exports,"apply",{value:h}):e.exports.apply=h},159:function(e){e.exports=function(){"use strict";var e=1e3,t=6e4,n=36e5,r="millisecond",o="second",a="minute",i="hour",l="day",s="week",c="month",u="quarter",d="year",h="date",p="Invalid Date",f=/^(\d{4})[-/]?(\d{1,2})?[-/]?(\d{0,2})[Tt\s]*(\d{1,2})?:?(\d{1,2})?:?(\d{1,2})?[.:]?(\d+)?$/,m=/\[([^\]]+)]|Y{1,4}|M{1,4}|D{1,2}|d{1,4}|H{1,2}|h{1,2}|a|A|m{1,2}|s{1,2}|Z{1,2}|SSS/g,_={name:"en",weekdays:"Sunday_Monday_Tuesday_Wednesday_Thursday_Friday_Saturday".split("_"),months:"January_February_March_April_May_June_July_August_September_October_November_December".split("_"),ordinal:function(e){var t=["th","st","nd","rd"],n=e%100;return"["+e+(t[(n-20)%10]||t[n]||t[0])+"]"}},g=function(e,t,n){var r=String(e);return!r||r.length>=t?e:""+Array(t+1-r.length).join(n)+e},v={s:g,z:function(e){var t=-e.utcOffset(),n=Math.abs(t),r=Math.floor(n/60),o=n%60;return(t<=0?"+":"-")+g(r,2,"0")+":"+g(o,2,"0")},m:function e(t,n){if(t.date()1)return e(i[0])}else{var l=t.name;b[l]=t,o=l}return!r&&o&&(y=o),o||!r&&y},S=function(e,t){if(k(e))return e.clone();var n="object"==typeof t?t:{};return n.date=e,n.args=arguments,new E(n)},A=v;A.l=x,A.i=k,A.w=function(e,t){return S(e,{locale:t.$L,utc:t.$u,x:t.$x,$offset:t.$offset})};var E=function(){function _(e){this.$L=x(e.locale,null,!0),this.parse(e),this.$x=this.$x||e.x||{},this[w]=!0}var g=_.prototype;return g.parse=function(e){this.$d=function(e){var t=e.date,n=e.utc;if(null===t)return new Date(NaN);if(A.u(t))return new Date;if(t instanceof Date)return new Date(t);if("string"==typeof t&&!/Z$/i.test(t)){var r=t.match(f);if(r){var o=r[2]-1||0,a=(r[7]||"0").substring(0,3);return n?new Date(Date.UTC(r[1],o,r[3]||1,r[4]||0,r[5]||0,r[6]||0,a)):new Date(r[1],o,r[3]||1,r[4]||0,r[5]||0,r[6]||0,a)}}return new Date(t)}(e),this.init()},g.init=function(){var e=this.$d;this.$y=e.getFullYear(),this.$M=e.getMonth(),this.$D=e.getDate(),this.$W=e.getDay(),this.$H=e.getHours(),this.$m=e.getMinutes(),this.$s=e.getSeconds(),this.$ms=e.getMilliseconds()},g.$utils=function(){return A},g.isValid=function(){return!(this.$d.toString()===p)},g.isSame=function(e,t){var n=S(e);return this.startOf(t)<=n&&n<=this.endOf(t)},g.isAfter=function(e,t){return S(e)=0&&(a[d]=parseInt(u,10))}var h=a[3],p=24===h?0:h,f=a[0]+"-"+a[1]+"-"+a[2]+" "+p+":"+a[4]+":"+a[5]+":000",m=+t;return(o.utc(f).valueOf()-(m-=m%1e3))/6e4},s=r.prototype;s.tz=function(e,t){void 0===e&&(e=a);var n,r=this.utcOffset(),i=this.toDate(),l=i.toLocaleString("en-US",{timeZone:e}),s=Math.round((i-new Date(l))/1e3/60),c=15*-Math.round(i.getTimezoneOffset()/15)-s;if(Number(c)){if(n=o(l,{locale:this.$L}).$set("millisecond",this.$ms).utcOffset(c,!0),t){var u=n.utcOffset();n=n.add(r-u,"minute")}}else n=this.utcOffset(0,t);return n.$x.$timezone=e,n},s.offsetName=function(e){var t=this.$x.$timezone||o.tz.guess(),n=i(this.valueOf(),t,{timeZoneName:e}).find((function(e){return"timezonename"===e.type.toLowerCase()}));return n&&n.value};var c=s.startOf;s.startOf=function(e,t){if(!this.$x||!this.$x.$timezone)return c.call(this,e,t);var n=o(this.format("YYYY-MM-DD HH:mm:ss:SSS"),{locale:this.$L});return c.call(n,e,t).tz(this.$x.$timezone,!0)},o.tz=function(e,t,n){var r=n&&t,i=n||t||a,s=l(+o(),i);if("string"!=typeof e)return o(e).tz(i);var c=function(e,t,n){var r=e-60*t*1e3,o=l(r,n);if(t===o)return[r,t];var a=l(r-=60*(o-t)*1e3,n);return o===a?[r,o]:[e-60*Math.min(o,a)*1e3,Math.max(o,a)]}(o.utc(e,r).valueOf(),s,i),u=c[0],d=c[1],h=o(u).utcOffset(d);return h.$x.$timezone=i,h},o.tz.guess=function(){return Intl.DateTimeFormat().resolvedOptions().timeZone},o.tz.setDefault=function(e){a=e}}}()},220:function(e){e.exports=function(){"use strict";var e="minute",t=/[+-]\d\d(?::?\d\d)?/g,n=/([+-]|\d\d)/g;return function(r,o,a){var i=o.prototype;a.utc=function(e){return new o({date:e,utc:!0,args:arguments})},i.utc=function(t){var n=a(this.toDate(),{locale:this.$L,utc:!0});return t?n.add(this.utcOffset(),e):n},i.local=function(){return a(this.toDate(),{locale:this.$L,utc:!1})};var l=i.parse;i.parse=function(e){e.utc&&(this.$u=!0),this.$utils().u(e.$offset)||(this.$offset=e.$offset),l.call(this,e)};var s=i.init;i.init=function(){if(this.$u){var e=this.$d;this.$y=e.getUTCFullYear(),this.$M=e.getUTCMonth(),this.$D=e.getUTCDate(),this.$W=e.getUTCDay(),this.$H=e.getUTCHours(),this.$m=e.getUTCMinutes(),this.$s=e.getUTCSeconds(),this.$ms=e.getUTCMilliseconds()}else s.call(this)};var c=i.utcOffset;i.utcOffset=function(r,o){var a=this.$utils().u;if(a(r))return this.$u?0:a(this.$offset)?c.call(this):this.$offset;if("string"==typeof r&&(r=function(e){void 0===e&&(e="");var r=e.match(t);if(!r)return null;var o=(""+r[0]).match(n)||["-",0,0],a=o[0],i=60*+o[1]+ +o[2];return 0===i?0:"+"===a?i:-i}(r),null===r))return this;var i=Math.abs(r)<=16?60*r:r,l=this;if(o)return l.$offset=i,l.$u=0===r,l;if(0!==r){var s=this.$u?this.toDate().getTimezoneOffset():-1*this.utcOffset();(l=this.local().add(i+s,e)).$offset=i,l.$x.$localOffset=s}else l=this.utc();return l};var u=i.format;i.format=function(e){var t=e||(this.$u?"YYYY-MM-DDTHH:mm:ss[Z]":"");return u.call(this,t)},i.valueOf=function(){var e=this.$utils().u(this.$offset)?0:this.$offset+(this.$x.$localOffset||this.$d.getTimezoneOffset());return this.$d.valueOf()-6e4*e},i.isUTC=function(){return!!this.$u},i.toISOString=function(){return this.toDate().toISOString()},i.toString=function(){return this.toDate().toUTCString()};var d=i.toDate;i.toDate=function(e){return"s"===e&&this.$offset?a(this.format("YYYY-MM-DD HH:mm:ss:SSS")).toDate():d.call(this)};var h=i.diff;i.diff=function(e,t,n){if(e&&this.$u===e.$u)return h.call(this,e,t,n);var r=this.local(),o=a(e).local();return h.call(r,o,t,n)}}}()},411:(e,t,n)=>{"use strict";var r=n(709),o=n(430),a=n(277),i=n(553);e.exports=function(e,t,n){if(!e||"object"!==typeof e&&"function"!==typeof e)throw new a("`obj` must be an object or a function`");if("string"!==typeof t&&"symbol"!==typeof t)throw new a("`property` must be a string or a symbol`");if(arguments.length>3&&"boolean"!==typeof arguments[3]&&null!==arguments[3])throw new a("`nonEnumerable`, if provided, must be a boolean or null");if(arguments.length>4&&"boolean"!==typeof arguments[4]&&null!==arguments[4])throw new a("`nonWritable`, if provided, must be a boolean or null");if(arguments.length>5&&"boolean"!==typeof arguments[5]&&null!==arguments[5])throw new a("`nonConfigurable`, if provided, must be a boolean or null");if(arguments.length>6&&"boolean"!==typeof arguments[6])throw new a("`loose`, if provided, must be a boolean");var l=arguments.length>3?arguments[3]:null,s=arguments.length>4?arguments[4]:null,c=arguments.length>5?arguments[5]:null,u=arguments.length>6&&arguments[6],d=!!i&&i(e,t);if(r)r(e,t,{configurable:null===c&&d?d.configurable:!c,enumerable:null===l&&d?d.enumerable:!l,value:n,writable:null===s&&d?d.writable:!s});else{if(!u&&(l||s||c))throw new o("This environment does not support defining a property as non-configurable, non-writable, or non-enumerable.");e[t]=n}}},709:(e,t,n)=>{"use strict";var r=n(375)("%Object.defineProperty%",!0)||!1;if(r)try{r({},"a",{value:1})}catch(o){r=!1}e.exports=r},123:e=>{"use strict";e.exports=EvalError},953:e=>{"use strict";e.exports=Error},780:e=>{"use strict";e.exports=RangeError},768:e=>{"use strict";e.exports=ReferenceError},430:e=>{"use strict";e.exports=SyntaxError},277:e=>{"use strict";e.exports=TypeError},619:e=>{"use strict";e.exports=URIError},307:e=>{"use strict";var t=Object.prototype.toString,n=Math.max,r=function(e,t){for(var n=[],r=0;r{"use strict";var r=n(307);e.exports=Function.prototype.bind||r},375:(e,t,n)=>{"use strict";var r,o=n(953),a=n(123),i=n(780),l=n(768),s=n(430),c=n(277),u=n(619),d=Function,h=function(e){try{return d('"use strict"; return ('+e+").constructor;")()}catch(t){}},p=Object.getOwnPropertyDescriptor;if(p)try{p({},"")}catch(L){p=null}var f=function(){throw new c},m=p?function(){try{return f}catch(e){try{return p(arguments,"callee").get}catch(t){return f}}}():f,_=n(757)(),g=n(442)(),v=Object.getPrototypeOf||(g?function(e){return e.__proto__}:null),y={},b="undefined"!==typeof Uint8Array&&v?v(Uint8Array):r,w={__proto__:null,"%AggregateError%":"undefined"===typeof AggregateError?r:AggregateError,"%Array%":Array,"%ArrayBuffer%":"undefined"===typeof ArrayBuffer?r:ArrayBuffer,"%ArrayIteratorPrototype%":_&&v?v([][Symbol.iterator]()):r,"%AsyncFromSyncIteratorPrototype%":r,"%AsyncFunction%":y,"%AsyncGenerator%":y,"%AsyncGeneratorFunction%":y,"%AsyncIteratorPrototype%":y,"%Atomics%":"undefined"===typeof Atomics?r:Atomics,"%BigInt%":"undefined"===typeof BigInt?r:BigInt,"%BigInt64Array%":"undefined"===typeof BigInt64Array?r:BigInt64Array,"%BigUint64Array%":"undefined"===typeof BigUint64Array?r:BigUint64Array,"%Boolean%":Boolean,"%DataView%":"undefined"===typeof DataView?r:DataView,"%Date%":Date,"%decodeURI%":decodeURI,"%decodeURIComponent%":decodeURIComponent,"%encodeURI%":encodeURI,"%encodeURIComponent%":encodeURIComponent,"%Error%":o,"%eval%":eval,"%EvalError%":a,"%Float32Array%":"undefined"===typeof Float32Array?r:Float32Array,"%Float64Array%":"undefined"===typeof Float64Array?r:Float64Array,"%FinalizationRegistry%":"undefined"===typeof FinalizationRegistry?r:FinalizationRegistry,"%Function%":d,"%GeneratorFunction%":y,"%Int8Array%":"undefined"===typeof Int8Array?r:Int8Array,"%Int16Array%":"undefined"===typeof Int16Array?r:Int16Array,"%Int32Array%":"undefined"===typeof Int32Array?r:Int32Array,"%isFinite%":isFinite,"%isNaN%":isNaN,"%IteratorPrototype%":_&&v?v(v([][Symbol.iterator]())):r,"%JSON%":"object"===typeof JSON?JSON:r,"%Map%":"undefined"===typeof Map?r:Map,"%MapIteratorPrototype%":"undefined"!==typeof Map&&_&&v?v((new Map)[Symbol.iterator]()):r,"%Math%":Math,"%Number%":Number,"%Object%":Object,"%parseFloat%":parseFloat,"%parseInt%":parseInt,"%Promise%":"undefined"===typeof Promise?r:Promise,"%Proxy%":"undefined"===typeof Proxy?r:Proxy,"%RangeError%":i,"%ReferenceError%":l,"%Reflect%":"undefined"===typeof Reflect?r:Reflect,"%RegExp%":RegExp,"%Set%":"undefined"===typeof Set?r:Set,"%SetIteratorPrototype%":"undefined"!==typeof Set&&_&&v?v((new Set)[Symbol.iterator]()):r,"%SharedArrayBuffer%":"undefined"===typeof SharedArrayBuffer?r:SharedArrayBuffer,"%String%":String,"%StringIteratorPrototype%":_&&v?v(""[Symbol.iterator]()):r,"%Symbol%":_?Symbol:r,"%SyntaxError%":s,"%ThrowTypeError%":m,"%TypedArray%":b,"%TypeError%":c,"%Uint8Array%":"undefined"===typeof Uint8Array?r:Uint8Array,"%Uint8ClampedArray%":"undefined"===typeof Uint8ClampedArray?r:Uint8ClampedArray,"%Uint16Array%":"undefined"===typeof Uint16Array?r:Uint16Array,"%Uint32Array%":"undefined"===typeof Uint32Array?r:Uint32Array,"%URIError%":u,"%WeakMap%":"undefined"===typeof WeakMap?r:WeakMap,"%WeakRef%":"undefined"===typeof WeakRef?r:WeakRef,"%WeakSet%":"undefined"===typeof WeakSet?r:WeakSet};if(v)try{null.error}catch(L){var k=v(v(L));w["%Error.prototype%"]=k}var x=function e(t){var n;if("%AsyncFunction%"===t)n=h("async function () {}");else if("%GeneratorFunction%"===t)n=h("function* () {}");else if("%AsyncGeneratorFunction%"===t)n=h("async function* () {}");else if("%AsyncGenerator%"===t){var r=e("%AsyncGeneratorFunction%");r&&(n=r.prototype)}else if("%AsyncIteratorPrototype%"===t){var o=e("%AsyncGenerator%");o&&v&&(n=v(o.prototype))}return w[t]=n,n},S={__proto__:null,"%ArrayBufferPrototype%":["ArrayBuffer","prototype"],"%ArrayPrototype%":["Array","prototype"],"%ArrayProto_entries%":["Array","prototype","entries"],"%ArrayProto_forEach%":["Array","prototype","forEach"],"%ArrayProto_keys%":["Array","prototype","keys"],"%ArrayProto_values%":["Array","prototype","values"],"%AsyncFunctionPrototype%":["AsyncFunction","prototype"],"%AsyncGenerator%":["AsyncGeneratorFunction","prototype"],"%AsyncGeneratorPrototype%":["AsyncGeneratorFunction","prototype","prototype"],"%BooleanPrototype%":["Boolean","prototype"],"%DataViewPrototype%":["DataView","prototype"],"%DatePrototype%":["Date","prototype"],"%ErrorPrototype%":["Error","prototype"],"%EvalErrorPrototype%":["EvalError","prototype"],"%Float32ArrayPrototype%":["Float32Array","prototype"],"%Float64ArrayPrototype%":["Float64Array","prototype"],"%FunctionPrototype%":["Function","prototype"],"%Generator%":["GeneratorFunction","prototype"],"%GeneratorPrototype%":["GeneratorFunction","prototype","prototype"],"%Int8ArrayPrototype%":["Int8Array","prototype"],"%Int16ArrayPrototype%":["Int16Array","prototype"],"%Int32ArrayPrototype%":["Int32Array","prototype"],"%JSONParse%":["JSON","parse"],"%JSONStringify%":["JSON","stringify"],"%MapPrototype%":["Map","prototype"],"%NumberPrototype%":["Number","prototype"],"%ObjectPrototype%":["Object","prototype"],"%ObjProto_toString%":["Object","prototype","toString"],"%ObjProto_valueOf%":["Object","prototype","valueOf"],"%PromisePrototype%":["Promise","prototype"],"%PromiseProto_then%":["Promise","prototype","then"],"%Promise_all%":["Promise","all"],"%Promise_reject%":["Promise","reject"],"%Promise_resolve%":["Promise","resolve"],"%RangeErrorPrototype%":["RangeError","prototype"],"%ReferenceErrorPrototype%":["ReferenceError","prototype"],"%RegExpPrototype%":["RegExp","prototype"],"%SetPrototype%":["Set","prototype"],"%SharedArrayBufferPrototype%":["SharedArrayBuffer","prototype"],"%StringPrototype%":["String","prototype"],"%SymbolPrototype%":["Symbol","prototype"],"%SyntaxErrorPrototype%":["SyntaxError","prototype"],"%TypedArrayPrototype%":["TypedArray","prototype"],"%TypeErrorPrototype%":["TypeError","prototype"],"%Uint8ArrayPrototype%":["Uint8Array","prototype"],"%Uint8ClampedArrayPrototype%":["Uint8ClampedArray","prototype"],"%Uint16ArrayPrototype%":["Uint16Array","prototype"],"%Uint32ArrayPrototype%":["Uint32Array","prototype"],"%URIErrorPrototype%":["URIError","prototype"],"%WeakMapPrototype%":["WeakMap","prototype"],"%WeakSetPrototype%":["WeakSet","prototype"]},A=n(989),E=n(155),C=A.call(Function.call,Array.prototype.concat),M=A.call(Function.apply,Array.prototype.splice),N=A.call(Function.call,String.prototype.replace),T=A.call(Function.call,String.prototype.slice),P=A.call(Function.call,RegExp.prototype.exec),D=/[^%.[\]]+|\[(?:(-?\d+(?:\.\d+)?)|(["'])((?:(?!\2)[^\\]|\\.)*?)\2)\]|(?=(?:\.|\[\])(?:\.|\[\]|%$))/g,O=/\\(\\)?/g,R=function(e,t){var n,r=e;if(E(S,r)&&(r="%"+(n=S[r])[0]+"%"),E(w,r)){var o=w[r];if(o===y&&(o=x(r)),"undefined"===typeof o&&!t)throw new c("intrinsic "+e+" exists, but is not available. Please file an issue!");return{alias:n,name:r,value:o}}throw new s("intrinsic "+e+" does not exist!")};e.exports=function(e,t){if("string"!==typeof e||0===e.length)throw new c("intrinsic name must be a non-empty string");if(arguments.length>1&&"boolean"!==typeof t)throw new c('"allowMissing" argument must be a boolean');if(null===P(/^%?[^%]*%?$/,e))throw new s("`%` may not be present anywhere but at the beginning and end of the intrinsic name");var n=function(e){var t=T(e,0,1),n=T(e,-1);if("%"===t&&"%"!==n)throw new s("invalid intrinsic syntax, expected closing `%`");if("%"===n&&"%"!==t)throw new s("invalid intrinsic syntax, expected opening `%`");var r=[];return N(e,D,(function(e,t,n,o){r[r.length]=n?N(o,O,"$1"):t||e})),r}(e),r=n.length>0?n[0]:"",o=R("%"+r+"%",t),a=o.name,i=o.value,l=!1,u=o.alias;u&&(r=u[0],M(n,C([0,1],u)));for(var d=1,h=!0;d=n.length){var g=p(i,f);i=(h=!!g)&&"get"in g&&!("originalValue"in g.get)?g.get:i[f]}else h=E(i,f),i=i[f];h&&!l&&(w[a]=i)}}return i}},553:(e,t,n)=>{"use strict";var r=n(375)("%Object.getOwnPropertyDescriptor%",!0);if(r)try{r([],"length")}catch(o){r=null}e.exports=r},734:(e,t,n)=>{"use strict";var r=n(709),o=function(){return!!r};o.hasArrayLengthDefineBug=function(){if(!r)return null;try{return 1!==r([],"length",{value:1}).length}catch(e){return!0}},e.exports=o},442:e=>{"use strict";var t={__proto__:null,foo:{}},n=Object;e.exports=function(){return{__proto__:t}.foo===t.foo&&!(t instanceof n)}},757:(e,t,n)=>{"use strict";var r="undefined"!==typeof Symbol&&Symbol,o=n(175);e.exports=function(){return"function"===typeof r&&("function"===typeof Symbol&&("symbol"===typeof r("foo")&&("symbol"===typeof Symbol("bar")&&o())))}},175:e=>{"use strict";e.exports=function(){if("function"!==typeof Symbol||"function"!==typeof Object.getOwnPropertySymbols)return!1;if("symbol"===typeof Symbol.iterator)return!0;var e={},t=Symbol("test"),n=Object(t);if("string"===typeof t)return!1;if("[object Symbol]"!==Object.prototype.toString.call(t))return!1;if("[object Symbol]"!==Object.prototype.toString.call(n))return!1;for(t in e[t]=42,e)return!1;if("function"===typeof Object.keys&&0!==Object.keys(e).length)return!1;if("function"===typeof Object.getOwnPropertyNames&&0!==Object.getOwnPropertyNames(e).length)return!1;var r=Object.getOwnPropertySymbols(e);if(1!==r.length||r[0]!==t)return!1;if(!Object.prototype.propertyIsEnumerable.call(e,t))return!1;if("function"===typeof Object.getOwnPropertyDescriptor){var o=Object.getOwnPropertyDescriptor(e,t);if(42!==o.value||!0!==o.enumerable)return!1}return!0}},155:(e,t,n)=>{"use strict";var r=Function.prototype.call,o=Object.prototype.hasOwnProperty,a=n(989);e.exports=a.call(r,o)},267:(e,t,n)=>{var r=NaN,o="[object Symbol]",a=/^\s+|\s+$/g,i=/^[-+]0x[0-9a-f]+$/i,l=/^0b[01]+$/i,s=/^0o[0-7]+$/i,c=parseInt,u="object"==typeof n.g&&n.g&&n.g.Object===Object&&n.g,d="object"==typeof self&&self&&self.Object===Object&&self,h=u||d||Function("return this")(),p=Object.prototype.toString,f=Math.max,m=Math.min,_=function(){return h.Date.now()};function g(e){var t=typeof e;return!!e&&("object"==t||"function"==t)}function v(e){if("number"==typeof e)return e;if(function(e){return"symbol"==typeof e||function(e){return!!e&&"object"==typeof e}(e)&&p.call(e)==o}(e))return r;if(g(e)){var t="function"==typeof e.valueOf?e.valueOf():e;e=g(t)?t+"":t}if("string"!=typeof e)return 0===e?e:+e;e=e.replace(a,"");var n=l.test(e);return n||s.test(e)?c(e.slice(2),n?2:8):i.test(e)?r:+e}e.exports=function(e,t,n){var r,o,a,i,l,s,c=0,u=!1,d=!1,h=!0;if("function"!=typeof e)throw new TypeError("Expected a function");function p(t){var n=r,a=o;return r=o=void 0,c=t,i=e.apply(a,n)}function y(e){var n=e-s;return void 0===s||n>=t||n<0||d&&e-c>=a}function b(){var e=_();if(y(e))return w(e);l=setTimeout(b,function(e){var n=t-(e-s);return d?m(n,a-(e-c)):n}(e))}function w(e){return l=void 0,h&&r?p(e):(r=o=void 0,i)}function k(){var e=_(),n=y(e);if(r=arguments,o=this,s=e,n){if(void 0===l)return function(e){return c=e,l=setTimeout(b,t),u?p(e):i}(s);if(d)return l=setTimeout(b,t),p(s)}return void 0===l&&(l=setTimeout(b,t)),i}return t=v(t)||0,g(n)&&(u=!!n.leading,a=(d="maxWait"in n)?f(v(n.maxWait)||0,t):a,h="trailing"in n?!!n.trailing:h),k.cancel=function(){void 0!==l&&clearTimeout(l),c=0,r=s=o=l=void 0},k.flush=function(){return void 0===l?i:w(_())},k}},424:(e,t,n)=>{var r="__lodash_hash_undefined__",o=1/0,a="[object Function]",i="[object GeneratorFunction]",l="[object Symbol]",s=/\.|\[(?:[^[\]]*|(["'])(?:(?!\1)[^\\]|\\.)*?\1)\]/,c=/^\w*$/,u=/^\./,d=/[^.[\]]+|\[(?:(-?\d+(?:\.\d+)?)|(["'])((?:(?!\2)[^\\]|\\.)*?)\2)\]|(?=(?:\.|\[\])(?:\.|\[\]|$))/g,h=/\\(\\)?/g,p=/^\[object .+?Constructor\]$/,f="object"==typeof n.g&&n.g&&n.g.Object===Object&&n.g,m="object"==typeof self&&self&&self.Object===Object&&self,_=f||m||Function("return this")();var g=Array.prototype,v=Function.prototype,y=Object.prototype,b=_["__core-js_shared__"],w=function(){var e=/[^.]+$/.exec(b&&b.keys&&b.keys.IE_PROTO||"");return e?"Symbol(src)_1."+e:""}(),k=v.toString,x=y.hasOwnProperty,S=y.toString,A=RegExp("^"+k.call(x).replace(/[\\^$.*+?()[\]{}|]/g,"\\$&").replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g,"$1.*?")+"$"),E=_.Symbol,C=g.splice,M=$(_,"Map"),N=$(Object,"create"),T=E?E.prototype:void 0,P=T?T.toString:void 0;function D(e){var t=-1,n=e?e.length:0;for(this.clear();++t-1},O.prototype.set=function(e,t){var n=this.__data__,r=L(n,e);return r<0?n.push([e,t]):n[r][1]=t,this},R.prototype.clear=function(){this.__data__={hash:new D,map:new(M||O),string:new D}},R.prototype.delete=function(e){return j(this,e).delete(e)},R.prototype.get=function(e){return j(this,e).get(e)},R.prototype.has=function(e){return j(this,e).has(e)},R.prototype.set=function(e,t){return j(this,e).set(e,t),this};var F=V((function(e){var t;e=null==(t=e)?"":function(e){if("string"==typeof e)return e;if(Y(e))return P?P.call(e):"";var t=e+"";return"0"==t&&1/e==-o?"-0":t}(t);var n=[];return u.test(e)&&n.push(""),e.replace(d,(function(e,t,r,o){n.push(r?o.replace(h,"$1"):t||e)})),n}));function H(e){if("string"==typeof e||Y(e))return e;var t=e+"";return"0"==t&&1/e==-o?"-0":t}function V(e,t){if("function"!=typeof e||t&&"function"!=typeof t)throw new TypeError("Expected a function");var n=function(){var r=arguments,o=t?t.apply(this,r):r[0],a=n.cache;if(a.has(o))return a.get(o);var i=e.apply(this,r);return n.cache=a.set(o,i),i};return n.cache=new(V.Cache||R),n}V.Cache=R;var B=Array.isArray;function U(e){var t=typeof e;return!!e&&("object"==t||"function"==t)}function Y(e){return"symbol"==typeof e||function(e){return!!e&&"object"==typeof e}(e)&&S.call(e)==l}e.exports=function(e,t,n){var r=null==e?void 0:I(e,t);return void 0===r?n:r}},141:(e,t,n)=>{var r="function"===typeof Map&&Map.prototype,o=Object.getOwnPropertyDescriptor&&r?Object.getOwnPropertyDescriptor(Map.prototype,"size"):null,a=r&&o&&"function"===typeof o.get?o.get:null,i=r&&Map.prototype.forEach,l="function"===typeof Set&&Set.prototype,s=Object.getOwnPropertyDescriptor&&l?Object.getOwnPropertyDescriptor(Set.prototype,"size"):null,c=l&&s&&"function"===typeof s.get?s.get:null,u=l&&Set.prototype.forEach,d="function"===typeof WeakMap&&WeakMap.prototype?WeakMap.prototype.has:null,h="function"===typeof WeakSet&&WeakSet.prototype?WeakSet.prototype.has:null,p="function"===typeof WeakRef&&WeakRef.prototype?WeakRef.prototype.deref:null,f=Boolean.prototype.valueOf,m=Object.prototype.toString,_=Function.prototype.toString,g=String.prototype.match,v=String.prototype.slice,y=String.prototype.replace,b=String.prototype.toUpperCase,w=String.prototype.toLowerCase,k=RegExp.prototype.test,x=Array.prototype.concat,S=Array.prototype.join,A=Array.prototype.slice,E=Math.floor,C="function"===typeof BigInt?BigInt.prototype.valueOf:null,M=Object.getOwnPropertySymbols,N="function"===typeof Symbol&&"symbol"===typeof Symbol.iterator?Symbol.prototype.toString:null,T="function"===typeof Symbol&&"object"===typeof Symbol.iterator,P="function"===typeof Symbol&&Symbol.toStringTag&&(typeof Symbol.toStringTag===T||"symbol")?Symbol.toStringTag:null,D=Object.prototype.propertyIsEnumerable,O=("function"===typeof Reflect?Reflect.getPrototypeOf:Object.getPrototypeOf)||([].__proto__===Array.prototype?function(e){return e.__proto__}:null);function R(e,t){if(e===1/0||e===-1/0||e!==e||e&&e>-1e3&&e<1e3||k.call(/e/,t))return t;var n=/[0-9](?=(?:[0-9]{3})+(?![0-9]))/g;if("number"===typeof e){var r=e<0?-E(-e):E(e);if(r!==e){var o=String(r),a=v.call(t,o.length+1);return y.call(o,n,"$&_")+"."+y.call(y.call(a,/([0-9]{3})/g,"$&_"),/_$/,"")}}return y.call(t,n,"$&_")}var L=n(634),I=L.custom,z=V(I)?I:null;function j(e,t,n){var r="double"===(n.quoteStyle||t)?'"':"'";return r+e+r}function $(e){return y.call(String(e),/"/g,""")}function F(e){return"[object Array]"===Y(e)&&(!P||!("object"===typeof e&&P in e))}function H(e){return"[object RegExp]"===Y(e)&&(!P||!("object"===typeof e&&P in e))}function V(e){if(T)return e&&"object"===typeof e&&e instanceof Symbol;if("symbol"===typeof e)return!0;if(!e||"object"!==typeof e||!N)return!1;try{return N.call(e),!0}catch(t){}return!1}e.exports=function e(t,r,o,l){var s=r||{};if(U(s,"quoteStyle")&&"single"!==s.quoteStyle&&"double"!==s.quoteStyle)throw new TypeError('option "quoteStyle" must be "single" or "double"');if(U(s,"maxStringLength")&&("number"===typeof s.maxStringLength?s.maxStringLength<0&&s.maxStringLength!==1/0:null!==s.maxStringLength))throw new TypeError('option "maxStringLength", if provided, must be a positive integer, Infinity, or `null`');var m=!U(s,"customInspect")||s.customInspect;if("boolean"!==typeof m&&"symbol"!==m)throw new TypeError("option \"customInspect\", if provided, must be `true`, `false`, or `'symbol'`");if(U(s,"indent")&&null!==s.indent&&"\t"!==s.indent&&!(parseInt(s.indent,10)===s.indent&&s.indent>0))throw new TypeError('option "indent" must be "\\t", an integer > 0, or `null`');if(U(s,"numericSeparator")&&"boolean"!==typeof s.numericSeparator)throw new TypeError('option "numericSeparator", if provided, must be `true` or `false`');var b=s.numericSeparator;if("undefined"===typeof t)return"undefined";if(null===t)return"null";if("boolean"===typeof t)return t?"true":"false";if("string"===typeof t)return q(t,s);if("number"===typeof t){if(0===t)return 1/0/t>0?"0":"-0";var k=String(t);return b?R(t,k):k}if("bigint"===typeof t){var E=String(t)+"n";return b?R(t,E):E}var M="undefined"===typeof s.depth?5:s.depth;if("undefined"===typeof o&&(o=0),o>=M&&M>0&&"object"===typeof t)return F(t)?"[Array]":"[Object]";var I=function(e,t){var n;if("\t"===e.indent)n="\t";else{if(!("number"===typeof e.indent&&e.indent>0))return null;n=S.call(Array(e.indent+1)," ")}return{base:n,prev:S.call(Array(t+1),n)}}(s,o);if("undefined"===typeof l)l=[];else if(W(l,t)>=0)return"[Circular]";function B(t,n,r){if(n&&(l=A.call(l)).push(n),r){var a={depth:s.depth};return U(s,"quoteStyle")&&(a.quoteStyle=s.quoteStyle),e(t,a,o+1,l)}return e(t,s,o+1,l)}if("function"===typeof t&&!H(t)){var Z=function(e){if(e.name)return e.name;var t=g.call(_.call(e),/^function\s*([\w$]+)/);if(t)return t[1];return null}(t),ee=X(t,B);return"[Function"+(Z?": "+Z:" (anonymous)")+"]"+(ee.length>0?" { "+S.call(ee,", ")+" }":"")}if(V(t)){var te=T?y.call(String(t),/^(Symbol\(.*\))_[^)]*$/,"$1"):N.call(t);return"object"!==typeof t||T?te:K(te)}if(function(e){if(!e||"object"!==typeof e)return!1;if("undefined"!==typeof HTMLElement&&e instanceof HTMLElement)return!0;return"string"===typeof e.nodeName&&"function"===typeof e.getAttribute}(t)){for(var ne="<"+w.call(String(t.nodeName)),re=t.attributes||[],oe=0;oe"}if(F(t)){if(0===t.length)return"[]";var ae=X(t,B);return I&&!function(e){for(var t=0;t=0)return!1;return!0}(ae)?"["+J(ae,I)+"]":"[ "+S.call(ae,", ")+" ]"}if(function(e){return"[object Error]"===Y(e)&&(!P||!("object"===typeof e&&P in e))}(t)){var ie=X(t,B);return"cause"in Error.prototype||!("cause"in t)||D.call(t,"cause")?0===ie.length?"["+String(t)+"]":"{ ["+String(t)+"] "+S.call(ie,", ")+" }":"{ ["+String(t)+"] "+S.call(x.call("[cause]: "+B(t.cause),ie),", ")+" }"}if("object"===typeof t&&m){if(z&&"function"===typeof t[z]&&L)return L(t,{depth:M-o});if("symbol"!==m&&"function"===typeof t.inspect)return t.inspect()}if(function(e){if(!a||!e||"object"!==typeof e)return!1;try{a.call(e);try{c.call(e)}catch(ne){return!0}return e instanceof Map}catch(t){}return!1}(t)){var le=[];return i&&i.call(t,(function(e,n){le.push(B(n,t,!0)+" => "+B(e,t))})),Q("Map",a.call(t),le,I)}if(function(e){if(!c||!e||"object"!==typeof e)return!1;try{c.call(e);try{a.call(e)}catch(t){return!0}return e instanceof Set}catch(n){}return!1}(t)){var se=[];return u&&u.call(t,(function(e){se.push(B(e,t))})),Q("Set",c.call(t),se,I)}if(function(e){if(!d||!e||"object"!==typeof e)return!1;try{d.call(e,d);try{h.call(e,h)}catch(ne){return!0}return e instanceof WeakMap}catch(t){}return!1}(t))return G("WeakMap");if(function(e){if(!h||!e||"object"!==typeof e)return!1;try{h.call(e,h);try{d.call(e,d)}catch(ne){return!0}return e instanceof WeakSet}catch(t){}return!1}(t))return G("WeakSet");if(function(e){if(!p||!e||"object"!==typeof e)return!1;try{return p.call(e),!0}catch(t){}return!1}(t))return G("WeakRef");if(function(e){return"[object Number]"===Y(e)&&(!P||!("object"===typeof e&&P in e))}(t))return K(B(Number(t)));if(function(e){if(!e||"object"!==typeof e||!C)return!1;try{return C.call(e),!0}catch(t){}return!1}(t))return K(B(C.call(t)));if(function(e){return"[object Boolean]"===Y(e)&&(!P||!("object"===typeof e&&P in e))}(t))return K(f.call(t));if(function(e){return"[object String]"===Y(e)&&(!P||!("object"===typeof e&&P in e))}(t))return K(B(String(t)));if("undefined"!==typeof window&&t===window)return"{ [object Window] }";if("undefined"!==typeof globalThis&&t===globalThis||"undefined"!==typeof n.g&&t===n.g)return"{ [object globalThis] }";if(!function(e){return"[object Date]"===Y(e)&&(!P||!("object"===typeof e&&P in e))}(t)&&!H(t)){var ce=X(t,B),ue=O?O(t)===Object.prototype:t instanceof Object||t.constructor===Object,de=t instanceof Object?"":"null prototype",he=!ue&&P&&Object(t)===t&&P in t?v.call(Y(t),8,-1):de?"Object":"",pe=(ue||"function"!==typeof t.constructor?"":t.constructor.name?t.constructor.name+" ":"")+(he||de?"["+S.call(x.call([],he||[],de||[]),": ")+"] ":"");return 0===ce.length?pe+"{}":I?pe+"{"+J(ce,I)+"}":pe+"{ "+S.call(ce,", ")+" }"}return String(t)};var B=Object.prototype.hasOwnProperty||function(e){return e in this};function U(e,t){return B.call(e,t)}function Y(e){return m.call(e)}function W(e,t){if(e.indexOf)return e.indexOf(t);for(var n=0,r=e.length;nt.maxStringLength){var n=e.length-t.maxStringLength,r="... "+n+" more character"+(n>1?"s":"");return q(v.call(e,0,t.maxStringLength),t)+r}return j(y.call(y.call(e,/(['\\])/g,"\\$1"),/[\x00-\x1f]/g,Z),"single",t)}function Z(e){var t=e.charCodeAt(0),n={8:"b",9:"t",10:"n",12:"f",13:"r"}[t];return n?"\\"+n:"\\x"+(t<16?"0":"")+b.call(t.toString(16))}function K(e){return"Object("+e+")"}function G(e){return e+" { ? }"}function Q(e,t,n,r){return e+" ("+t+") {"+(r?J(n,r):S.call(n,", "))+"}"}function J(e,t){if(0===e.length)return"";var n="\n"+t.prev+t.base;return n+S.call(e,","+n)+"\n"+t.prev}function X(e,t){var n=F(e),r=[];if(n){r.length=e.length;for(var o=0;o{"use strict";n.r(t),n.d(t,{Children:()=>Y,Component:()=>l.uA,Fragment:()=>l.FK,PureComponent:()=>$,StrictMode:()=>De,Suspense:()=>G,SuspenseList:()=>X,__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED:()=>we,cloneElement:()=>Ce,createContext:()=>l.q6,createElement:()=>l.n,createFactory:()=>xe,createPortal:()=>re,createRef:()=>l._3,default:()=>Fe,findDOMNode:()=>Ne,flushSync:()=>Pe,forwardRef:()=>B,hydrate:()=>de,isElement:()=>ze,isFragment:()=>Ae,isMemo:()=>Ee,isValidElement:()=>Se,lazy:()=>J,memo:()=>F,render:()=>ue,startTransition:()=>Oe,unmountComponentAtNode:()=>Me,unstable_batchedUpdates:()=>Te,useCallback:()=>A,useContext:()=>E,useDebugValue:()=>C,useDeferredValue:()=>Re,useEffect:()=>b,useErrorBoundary:()=>M,useId:()=>N,useImperativeHandle:()=>x,useInsertionEffect:()=>Ie,useLayoutEffect:()=>w,useMemo:()=>S,useReducer:()=>y,useRef:()=>k,useState:()=>v,useSyncExternalStore:()=>je,useTransition:()=>Le,version:()=>ke});var r,o,a,i,l=n(746),s=0,c=[],u=l.fF,d=u.__b,h=u.__r,p=u.diffed,f=u.__c,m=u.unmount,_=u.__;function g(e,t){u.__h&&u.__h(o,e,s||t),s=0;var n=o.__H||(o.__H={__:[],__h:[]});return e>=n.__.length&&n.__.push({}),n.__[e]}function v(e){return s=1,y(I,e)}function y(e,t,n){var a=g(r++,2);if(a.t=e,!a.__c&&(a.__=[n?n(t):I(void 0,t),function(e){var t=a.__N?a.__N[0]:a.__[0],n=a.t(t,e);t!==n&&(a.__N=[n,a.__[1]],a.__c.setState({}))}],a.__c=o,!o.u)){var i=function(e,t,n){if(!a.__c.__H)return!0;var r=a.__c.__H.__.filter((function(e){return!!e.__c}));if(r.every((function(e){return!e.__N})))return!l||l.call(this,e,t,n);var o=!1;return r.forEach((function(e){if(e.__N){var t=e.__[0];e.__=e.__N,e.__N=void 0,t!==e.__[0]&&(o=!0)}})),!(!o&&a.__c.props===e)&&(!l||l.call(this,e,t,n))};o.u=!0;var l=o.shouldComponentUpdate,s=o.componentWillUpdate;o.componentWillUpdate=function(e,t,n){if(this.__e){var r=l;l=void 0,i(e,t,n),l=r}s&&s.call(this,e,t,n)},o.shouldComponentUpdate=i}return a.__N||a.__}function b(e,t){var n=g(r++,3);!u.__s&&L(n.__H,t)&&(n.__=e,n.i=t,o.__H.__h.push(n))}function w(e,t){var n=g(r++,4);!u.__s&&L(n.__H,t)&&(n.__=e,n.i=t,o.__h.push(n))}function k(e){return s=5,S((function(){return{current:e}}),[])}function x(e,t,n){s=6,w((function(){return"function"==typeof e?(e(t()),function(){return e(null)}):e?(e.current=t(),function(){return e.current=null}):void 0}),null==n?n:n.concat(e))}function S(e,t){var n=g(r++,7);return L(n.__H,t)&&(n.__=e(),n.__H=t,n.__h=e),n.__}function A(e,t){return s=8,S((function(){return e}),t)}function E(e){var t=o.context[e.__c],n=g(r++,9);return n.c=e,t?(null==n.__&&(n.__=!0,t.sub(o)),t.props.value):e.__}function C(e,t){u.useDebugValue&&u.useDebugValue(t?t(e):e)}function M(e){var t=g(r++,10),n=v();return t.__=e,o.componentDidCatch||(o.componentDidCatch=function(e,r){t.__&&t.__(e,r),n[1](e)}),[n[0],function(){n[1](void 0)}]}function N(){var e=g(r++,11);if(!e.__){for(var t=o.__v;null!==t&&!t.__m&&null!==t.__;)t=t.__;var n=t.__m||(t.__m=[0,0]);e.__="P"+n[0]+"-"+n[1]++}return e.__}function T(){for(var e;e=c.shift();)if(e.__P&&e.__H)try{e.__H.__h.forEach(O),e.__H.__h.forEach(R),e.__H.__h=[]}catch(r){e.__H.__h=[],u.__e(r,e.__v)}}u.__b=function(e){o=null,d&&d(e)},u.__=function(e,t){e&&t.__k&&t.__k.__m&&(e.__m=t.__k.__m),_&&_(e,t)},u.__r=function(e){h&&h(e),r=0;var t=(o=e.__c).__H;t&&(a===o?(t.__h=[],o.__h=[],t.__.forEach((function(e){e.__N&&(e.__=e.__N),e.i=e.__N=void 0}))):(t.__h.forEach(O),t.__h.forEach(R),t.__h=[],r=0)),a=o},u.diffed=function(e){p&&p(e);var t=e.__c;t&&t.__H&&(t.__H.__h.length&&(1!==c.push(t)&&i===u.requestAnimationFrame||((i=u.requestAnimationFrame)||D)(T)),t.__H.__.forEach((function(e){e.i&&(e.__H=e.i),e.i=void 0}))),a=o=null},u.__c=function(e,t){t.some((function(e){try{e.__h.forEach(O),e.__h=e.__h.filter((function(e){return!e.__||R(e)}))}catch(o){t.some((function(e){e.__h&&(e.__h=[])})),t=[],u.__e(o,e.__v)}})),f&&f(e,t)},u.unmount=function(e){m&&m(e);var t,n=e.__c;n&&n.__H&&(n.__H.__.forEach((function(e){try{O(e)}catch(e){t=e}})),n.__H=void 0,t&&u.__e(t,n.__v))};var P="function"==typeof requestAnimationFrame;function D(e){var t,n=function(){clearTimeout(r),P&&cancelAnimationFrame(t),setTimeout(e)},r=setTimeout(n,100);P&&(t=requestAnimationFrame(n))}function O(e){var t=o,n=e.__c;"function"==typeof n&&(e.__c=void 0,n()),o=t}function R(e){var t=o;e.__c=e.__(),o=t}function L(e,t){return!e||e.length!==t.length||t.some((function(t,n){return t!==e[n]}))}function I(e,t){return"function"==typeof t?t(e):t}function z(e,t){for(var n in t)e[n]=t[n];return e}function j(e,t){for(var n in e)if("__source"!==n&&!(n in t))return!0;for(var r in t)if("__source"!==r&&e[r]!==t[r])return!0;return!1}function $(e,t){this.props=e,this.context=t}function F(e,t){function n(e){var n=this.props.ref,r=n==e.ref;return!r&&n&&(n.call?n(null):n.current=null),t?!t(this.props,e)||!r:j(this.props,e)}function r(t){return this.shouldComponentUpdate=n,(0,l.n)(e,t)}return r.displayName="Memo("+(e.displayName||e.name)+")",r.prototype.isReactComponent=!0,r.__f=!0,r}($.prototype=new l.uA).isPureReactComponent=!0,$.prototype.shouldComponentUpdate=function(e,t){return j(this.props,e)||j(this.state,t)};var H=l.fF.__b;l.fF.__b=function(e){e.type&&e.type.__f&&e.ref&&(e.props.ref=e.ref,e.ref=null),H&&H(e)};var V="undefined"!=typeof Symbol&&Symbol.for&&Symbol.for("react.forward_ref")||3911;function B(e){function t(t){var n=z({},t);return delete n.ref,e(n,t.ref||null)}return t.$$typeof=V,t.render=t,t.prototype.isReactComponent=t.__f=!0,t.displayName="ForwardRef("+(e.displayName||e.name)+")",t}var U=function(e,t){return null==e?null:(0,l.v2)((0,l.v2)(e).map(t))},Y={map:U,forEach:U,count:function(e){return e?(0,l.v2)(e).length:0},only:function(e){var t=(0,l.v2)(e);if(1!==t.length)throw"Children.only";return t[0]},toArray:l.v2},W=l.fF.__e;l.fF.__e=function(e,t,n,r){if(e.then)for(var o,a=t;a=a.__;)if((o=a.__c)&&o.__c)return null==t.__e&&(t.__e=n.__e,t.__k=n.__k),o.__c(e,t);W(e,t,n,r)};var q=l.fF.unmount;function Z(e,t,n){return e&&(e.__c&&e.__c.__H&&(e.__c.__H.__.forEach((function(e){"function"==typeof e.__c&&e.__c()})),e.__c.__H=null),null!=(e=z({},e)).__c&&(e.__c.__P===n&&(e.__c.__P=t),e.__c=null),e.__k=e.__k&&e.__k.map((function(e){return Z(e,t,n)}))),e}function K(e,t,n){return e&&n&&(e.__v=null,e.__k=e.__k&&e.__k.map((function(e){return K(e,t,n)})),e.__c&&e.__c.__P===t&&(e.__e&&n.appendChild(e.__e),e.__c.__e=!0,e.__c.__P=n)),e}function G(){this.__u=0,this.t=null,this.__b=null}function Q(e){var t=e.__.__c;return t&&t.__a&&t.__a(e)}function J(e){var t,n,r;function o(o){if(t||(t=e()).then((function(e){n=e.default||e}),(function(e){r=e})),r)throw r;if(!n)throw t;return(0,l.n)(n,o)}return o.displayName="Lazy",o.__f=!0,o}function X(){this.u=null,this.o=null}l.fF.unmount=function(e){var t=e.__c;t&&t.__R&&t.__R(),t&&32&e.__u&&(e.type=null),q&&q(e)},(G.prototype=new l.uA).__c=function(e,t){var n=t.__c,r=this;null==r.t&&(r.t=[]),r.t.push(n);var o=Q(r.__v),a=!1,i=function(){a||(a=!0,n.__R=null,o?o(l):l())};n.__R=i;var l=function(){if(! --r.__u){if(r.state.__a){var e=r.state.__a;r.__v.__k[0]=K(e,e.__c.__P,e.__c.__O)}var t;for(r.setState({__a:r.__b=null});t=r.t.pop();)t.forceUpdate()}};r.__u++||32&t.__u||r.setState({__a:r.__b=r.__v.__k[0]}),e.then(i,i)},G.prototype.componentWillUnmount=function(){this.t=[]},G.prototype.render=function(e,t){if(this.__b){if(this.__v.__k){var n=document.createElement("div"),r=this.__v.__k[0].__c;this.__v.__k[0]=Z(this.__b,n,r.__O=r.__P)}this.__b=null}var o=t.__a&&(0,l.n)(l.FK,null,e.fallback);return o&&(o.__u&=-33),[(0,l.n)(l.FK,null,t.__a?null:e.children),o]};var ee=function(e,t,n){if(++n[1]===n[0]&&e.o.delete(t),e.props.revealOrder&&("t"!==e.props.revealOrder[0]||!e.o.size))for(n=e.u;n;){for(;n.length>3;)n.pop()();if(n[1]>>1,1),t.i.removeChild(e)}}),(0,l.XX)((0,l.n)(te,{context:t.context},e.__v),t.l)}function re(e,t){var n=(0,l.n)(ne,{__v:e,i:t});return n.containerInfo=t,n}(X.prototype=new l.uA).__a=function(e){var t=this,n=Q(t.__v),r=t.o.get(e);return r[0]++,function(o){var a=function(){t.props.revealOrder?(r.push(o),ee(t,e,r)):o()};n?n(a):a()}},X.prototype.render=function(e){this.u=null,this.o=new Map;var t=(0,l.v2)(e.children);e.revealOrder&&"b"===e.revealOrder[0]&&t.reverse();for(var n=t.length;n--;)this.o.set(t[n],this.u=[1,0,this.u]);return e.children},X.prototype.componentDidUpdate=X.prototype.componentDidMount=function(){var e=this;this.o.forEach((function(t,n){ee(e,n,t)}))};var oe="undefined"!=typeof Symbol&&Symbol.for&&Symbol.for("react.element")||60103,ae=/^(?:accent|alignment|arabic|baseline|cap|clip(?!PathU)|color|dominant|fill|flood|font|glyph(?!R)|horiz|image(!S)|letter|lighting|marker(?!H|W|U)|overline|paint|pointer|shape|stop|strikethrough|stroke|text(?!L)|transform|underline|unicode|units|v|vector|vert|word|writing|x(?!C))[A-Z]/,ie=/^on(Ani|Tra|Tou|BeforeInp|Compo)/,le=/[A-Z0-9]/g,se="undefined"!=typeof document,ce=function(e){return("undefined"!=typeof Symbol&&"symbol"==typeof Symbol()?/fil|che|rad/:/fil|che|ra/).test(e)};function ue(e,t,n){return null==t.__k&&(t.textContent=""),(0,l.XX)(e,t),"function"==typeof n&&n(),e?e.__c:null}function de(e,t,n){return(0,l.Qv)(e,t),"function"==typeof n&&n(),e?e.__c:null}l.uA.prototype.isReactComponent={},["componentWillMount","componentWillReceiveProps","componentWillUpdate"].forEach((function(e){Object.defineProperty(l.uA.prototype,e,{configurable:!0,get:function(){return this["UNSAFE_"+e]},set:function(t){Object.defineProperty(this,e,{configurable:!0,writable:!0,value:t})}})}));var he=l.fF.event;function pe(){}function fe(){return this.cancelBubble}function me(){return this.defaultPrevented}l.fF.event=function(e){return he&&(e=he(e)),e.persist=pe,e.isPropagationStopped=fe,e.isDefaultPrevented=me,e.nativeEvent=e};var _e,ge={enumerable:!1,configurable:!0,get:function(){return this.class}},ve=l.fF.vnode;l.fF.vnode=function(e){"string"==typeof e.type&&function(e){var t=e.props,n=e.type,r={},o=-1===n.indexOf("-");for(var a in t){var i=t[a];if(!("value"===a&&"defaultValue"in t&&null==i||se&&"children"===a&&"noscript"===n||"class"===a||"className"===a)){var s=a.toLowerCase();"defaultValue"===a&&"value"in t&&null==t.value?a="value":"download"===a&&!0===i?i="":"translate"===s&&"no"===i?i=!1:"o"===s[0]&&"n"===s[1]?"ondoubleclick"===s?a="ondblclick":"onchange"!==s||"input"!==n&&"textarea"!==n||ce(t.type)?"onfocus"===s?a="onfocusin":"onblur"===s?a="onfocusout":ie.test(a)&&(a=s):s=a="oninput":o&&ae.test(a)?a=a.replace(le,"-$&").toLowerCase():null===i&&(i=void 0),"oninput"===s&&r[a=s]&&(a="oninputCapture"),r[a]=i}}"select"==n&&r.multiple&&Array.isArray(r.value)&&(r.value=(0,l.v2)(t.children).forEach((function(e){e.props.selected=-1!=r.value.indexOf(e.props.value)}))),"select"==n&&null!=r.defaultValue&&(r.value=(0,l.v2)(t.children).forEach((function(e){e.props.selected=r.multiple?-1!=r.defaultValue.indexOf(e.props.value):r.defaultValue==e.props.value}))),t.class&&!t.className?(r.class=t.class,Object.defineProperty(r,"className",ge)):(t.className&&!t.class||t.class&&t.className)&&(r.class=r.className=t.className),e.props=r}(e),e.$$typeof=oe,ve&&ve(e)};var ye=l.fF.__r;l.fF.__r=function(e){ye&&ye(e),_e=e.__c};var be=l.fF.diffed;l.fF.diffed=function(e){be&&be(e);var t=e.props,n=e.__e;null!=n&&"textarea"===e.type&&"value"in t&&t.value!==n.value&&(n.value=null==t.value?"":t.value),_e=null};var we={ReactCurrentDispatcher:{current:{readContext:function(e){return _e.__n[e.__c].props.value},useCallback:A,useContext:E,useDebugValue:C,useDeferredValue:Re,useEffect:b,useId:N,useImperativeHandle:x,useInsertionEffect:Ie,useLayoutEffect:w,useMemo:S,useReducer:y,useRef:k,useState:v,useSyncExternalStore:je,useTransition:Le}}},ke="17.0.2";function xe(e){return l.n.bind(null,e)}function Se(e){return!!e&&e.$$typeof===oe}function Ae(e){return Se(e)&&e.type===l.FK}function Ee(e){return!!e&&!!e.displayName&&("string"==typeof e.displayName||e.displayName instanceof String)&&e.displayName.startsWith("Memo(")}function Ce(e){return Se(e)?l.Ob.apply(null,arguments):e}function Me(e){return!!e.__k&&((0,l.XX)(null,e),!0)}function Ne(e){return e&&(e.base||1===e.nodeType&&e)||null}var Te=function(e,t){return e(t)},Pe=function(e,t){return e(t)},De=l.FK;function Oe(e){e()}function Re(e){return e}function Le(){return[!1,Oe]}var Ie=w,ze=Se;function je(e,t){var n=t(),r=v({h:{__:n,v:t}}),o=r[0].h,a=r[1];return w((function(){o.__=n,o.v=t,$e(o)&&a({h:o})}),[e,n,t]),b((function(){return $e(o)&&a({h:o}),e((function(){$e(o)&&a({h:o})}))}),[e]),n}function $e(e){var t,n,r=e.v,o=e.__;try{var a=r();return!((t=o)===(n=a)&&(0!==t||1/t==1/n)||t!=t&&n!=n)}catch(e){return!0}}var Fe={useState:v,useId:N,useReducer:y,useEffect:b,useLayoutEffect:w,useInsertionEffect:Ie,useTransition:Le,useDeferredValue:Re,useSyncExternalStore:je,startTransition:Oe,useRef:k,useImperativeHandle:x,useMemo:S,useCallback:A,useContext:E,useDebugValue:C,version:"17.0.2",Children:Y,render:ue,hydrate:de,unmountComponentAtNode:Me,createPortal:re,createElement:l.n,createContext:l.q6,createFactory:xe,cloneElement:Ce,createRef:l._3,Fragment:l.FK,isValidElement:Se,isElement:ze,isFragment:Ae,isMemo:Ee,findDOMNode:Ne,Component:l.uA,PureComponent:$,memo:F,forwardRef:B,flushSync:Pe,unstable_batchedUpdates:Te,StrictMode:De,Suspense:G,SuspenseList:X,lazy:J,__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED:we}},746:(e,t,n)=>{"use strict";n.d(t,{FK:()=>x,Ob:()=>Y,Qv:()=>U,XX:()=>B,_3:()=>k,fF:()=>o,n:()=>b,q6:()=>W,uA:()=>S,v2:()=>D});var r,o,a,i,l,s,c,u,d,h,p,f={},m=[],_=/acit|ex(?:s|g|n|p|$)|rph|grid|ows|mnc|ntw|ine[ch]|zoo|^ord|itera/i,g=Array.isArray;function v(e,t){for(var n in t)e[n]=t[n];return e}function y(e){var t=e.parentNode;t&&t.removeChild(e)}function b(e,t,n){var o,a,i,l={};for(i in t)"key"==i?o=t[i]:"ref"==i?a=t[i]:l[i]=t[i];if(arguments.length>2&&(l.children=arguments.length>3?r.call(arguments,2):n),"function"==typeof e&&null!=e.defaultProps)for(i in e.defaultProps)void 0===l[i]&&(l[i]=e.defaultProps[i]);return w(e,l,o,a,null)}function w(e,t,n,r,i){var l={type:e,props:t,key:n,ref:r,__k:null,__:null,__b:0,__e:null,__d:void 0,__c:null,constructor:void 0,__v:null==i?++a:i,__i:-1,__u:0};return null==i&&null!=o.vnode&&o.vnode(l),l}function k(){return{current:null}}function x(e){return e.children}function S(e,t){this.props=e,this.context=t}function A(e,t){if(null==t)return e.__?A(e.__,e.__i+1):null;for(var n;tt&&i.sort(c));M.__r=0}function N(e,t,n,r,o,a,i,l,s,c,u){var d,h,p,_,g,v=r&&r.__k||m,y=t.length;for(n.__d=s,T(n,t,v),s=n.__d,d=0;d0?w(o.type,o.props,o.key,o.ref?o.ref:null,o.__v):o)?(o.__=e,o.__b=e.__b+1,l=O(o,n,i,u),o.__i=l,a=null,-1!==l&&(u--,(a=n[l])&&(a.__u|=131072)),null==a||null===a.__v?(-1==l&&d--,"function"!=typeof o.type&&(o.__u|=65536)):l!==i&&(l==i-1?d--:l==i+1?d++:l>i?u>s-i?d+=l-i:d--:l(null!=s&&0==(131072&s.__u)?1:0))for(;i>=0||l=0){if((s=t[i])&&0==(131072&s.__u)&&o==s.key&&a===s.type)return i;i--}if(l2&&(s.children=arguments.length>3?r.call(arguments,2):n),w(e.type,s,o||e.key,a||e.ref,null)}function W(e,t){var n={__c:t="__cC"+p++,__:e,Consumer:function(e,t){return e.children(t)},Provider:function(e){var n,r;return this.getChildContext||(n=[],(r={})[t]=this,this.getChildContext=function(){return r},this.componentWillUnmount=function(){n=null},this.shouldComponentUpdate=function(e){this.props.value!==e.value&&n.some((function(e){e.__e=!0,C(e)}))},this.sub=function(e){n.push(e);var t=e.componentWillUnmount;e.componentWillUnmount=function(){n&&n.splice(n.indexOf(e),1),t&&t.call(e)}}),e.children}};return n.Provider.__=n.Consumer.contextType=n}r=m.slice,o={__e:function(e,t,n,r){for(var o,a,i;t=t.__;)if((o=t.__c)&&!o.__)try{if((a=o.constructor)&&null!=a.getDerivedStateFromError&&(o.setState(a.getDerivedStateFromError(e)),i=o.__d),null!=o.componentDidCatch&&(o.componentDidCatch(e,r||{}),i=o.__d),i)return o.__E=o}catch(t){e=t}throw e}},a=0,S.prototype.setState=function(e,t){var n;n=null!=this.__s&&this.__s!==this.state?this.__s:this.__s=v({},this.state),"function"==typeof e&&(e=e(v({},n),this.props)),e&&v(n,e),null!=e&&this.__v&&(t&&this._sb.push(t),C(this))},S.prototype.forceUpdate=function(e){this.__v&&(this.__e=!0,e&&this.__h.push(e),C(this))},S.prototype.render=x,i=[],s="function"==typeof Promise?Promise.prototype.then.bind(Promise.resolve()):setTimeout,c=function(e,t){return e.__v.__b-t.__v.__b},M.__r=0,u=0,d=I(!1),h=I(!0),p=0},640:e=>{"use strict";var t=String.prototype.replace,n=/%20/g,r="RFC1738",o="RFC3986";e.exports={default:o,formatters:{RFC1738:function(e){return t.call(e,n,"+")},RFC3986:function(e){return String(e)}},RFC1738:r,RFC3986:o}},215:(e,t,n)=>{"use strict";var r=n(518),o=n(968),a=n(640);e.exports={formats:a,parse:o,stringify:r}},968:(e,t,n)=>{"use strict";var r=n(570),o=Object.prototype.hasOwnProperty,a=Array.isArray,i={allowDots:!1,allowEmptyArrays:!1,allowPrototypes:!1,allowSparse:!1,arrayLimit:20,charset:"utf-8",charsetSentinel:!1,comma:!1,decodeDotInKeys:!1,decoder:r.decode,delimiter:"&",depth:5,duplicates:"combine",ignoreQueryPrefix:!1,interpretNumericEntities:!1,parameterLimit:1e3,parseArrays:!0,plainObjects:!1,strictDepth:!1,strictNullHandling:!1},l=function(e){return e.replace(/&#(\d+);/g,(function(e,t){return String.fromCharCode(parseInt(t,10))}))},s=function(e,t){return e&&"string"===typeof e&&t.comma&&e.indexOf(",")>-1?e.split(","):e},c=function(e,t,n,r){if(e){var a=n.allowDots?e.replace(/\.([^.[]+)/g,"[$1]"):e,i=/(\[[^[\]]*])/g,l=n.depth>0&&/(\[[^[\]]*])/.exec(a),c=l?a.slice(0,l.index):a,u=[];if(c){if(!n.plainObjects&&o.call(Object.prototype,c)&&!n.allowPrototypes)return;u.push(c)}for(var d=0;n.depth>0&&null!==(l=i.exec(a))&&d=0;--a){var i,l=e[a];if("[]"===l&&n.parseArrays)i=n.allowEmptyArrays&&(""===o||n.strictNullHandling&&null===o)?[]:[].concat(o);else{i=n.plainObjects?Object.create(null):{};var c="["===l.charAt(0)&&"]"===l.charAt(l.length-1)?l.slice(1,-1):l,u=n.decodeDotInKeys?c.replace(/%2E/g,"."):c,d=parseInt(u,10);n.parseArrays||""!==u?!isNaN(d)&&l!==u&&String(d)===u&&d>=0&&n.parseArrays&&d<=n.arrayLimit?(i=[])[d]=o:"__proto__"!==u&&(i[u]=o):i={0:o}}o=i}return o}(u,t,n,r)}};e.exports=function(e,t){var n=function(e){if(!e)return i;if("undefined"!==typeof e.allowEmptyArrays&&"boolean"!==typeof e.allowEmptyArrays)throw new TypeError("`allowEmptyArrays` option can only be `true` or `false`, when provided");if("undefined"!==typeof e.decodeDotInKeys&&"boolean"!==typeof e.decodeDotInKeys)throw new TypeError("`decodeDotInKeys` option can only be `true` or `false`, when provided");if(null!==e.decoder&&"undefined"!==typeof e.decoder&&"function"!==typeof e.decoder)throw new TypeError("Decoder has to be a function.");if("undefined"!==typeof e.charset&&"utf-8"!==e.charset&&"iso-8859-1"!==e.charset)throw new TypeError("The charset option must be either utf-8, iso-8859-1, or undefined");var t="undefined"===typeof e.charset?i.charset:e.charset,n="undefined"===typeof e.duplicates?i.duplicates:e.duplicates;if("combine"!==n&&"first"!==n&&"last"!==n)throw new TypeError("The duplicates option must be either combine, first, or last");return{allowDots:"undefined"===typeof e.allowDots?!0===e.decodeDotInKeys||i.allowDots:!!e.allowDots,allowEmptyArrays:"boolean"===typeof e.allowEmptyArrays?!!e.allowEmptyArrays:i.allowEmptyArrays,allowPrototypes:"boolean"===typeof e.allowPrototypes?e.allowPrototypes:i.allowPrototypes,allowSparse:"boolean"===typeof e.allowSparse?e.allowSparse:i.allowSparse,arrayLimit:"number"===typeof e.arrayLimit?e.arrayLimit:i.arrayLimit,charset:t,charsetSentinel:"boolean"===typeof e.charsetSentinel?e.charsetSentinel:i.charsetSentinel,comma:"boolean"===typeof e.comma?e.comma:i.comma,decodeDotInKeys:"boolean"===typeof e.decodeDotInKeys?e.decodeDotInKeys:i.decodeDotInKeys,decoder:"function"===typeof e.decoder?e.decoder:i.decoder,delimiter:"string"===typeof e.delimiter||r.isRegExp(e.delimiter)?e.delimiter:i.delimiter,depth:"number"===typeof e.depth||!1===e.depth?+e.depth:i.depth,duplicates:n,ignoreQueryPrefix:!0===e.ignoreQueryPrefix,interpretNumericEntities:"boolean"===typeof e.interpretNumericEntities?e.interpretNumericEntities:i.interpretNumericEntities,parameterLimit:"number"===typeof e.parameterLimit?e.parameterLimit:i.parameterLimit,parseArrays:!1!==e.parseArrays,plainObjects:"boolean"===typeof e.plainObjects?e.plainObjects:i.plainObjects,strictDepth:"boolean"===typeof e.strictDepth?!!e.strictDepth:i.strictDepth,strictNullHandling:"boolean"===typeof e.strictNullHandling?e.strictNullHandling:i.strictNullHandling}}(t);if(""===e||null===e||"undefined"===typeof e)return n.plainObjects?Object.create(null):{};for(var u="string"===typeof e?function(e,t){var n={__proto__:null},c=t.ignoreQueryPrefix?e.replace(/^\?/,""):e;c=c.replace(/%5B/gi,"[").replace(/%5D/gi,"]");var u,d=t.parameterLimit===1/0?void 0:t.parameterLimit,h=c.split(t.delimiter,d),p=-1,f=t.charset;if(t.charsetSentinel)for(u=0;u-1&&(_=a(_)?[_]:_);var b=o.call(n,m);b&&"combine"===t.duplicates?n[m]=r.combine(n[m],_):b&&"last"!==t.duplicates||(n[m]=_)}return n}(e,n):e,d=n.plainObjects?Object.create(null):{},h=Object.keys(u),p=0;p{"use strict";var r=n(670),o=n(570),a=n(640),i=Object.prototype.hasOwnProperty,l={brackets:function(e){return e+"[]"},comma:"comma",indices:function(e,t){return e+"["+t+"]"},repeat:function(e){return e}},s=Array.isArray,c=Array.prototype.push,u=function(e,t){c.apply(e,s(t)?t:[t])},d=Date.prototype.toISOString,h=a.default,p={addQueryPrefix:!1,allowDots:!1,allowEmptyArrays:!1,arrayFormat:"indices",charset:"utf-8",charsetSentinel:!1,delimiter:"&",encode:!0,encodeDotInKeys:!1,encoder:o.encode,encodeValuesOnly:!1,format:h,formatter:a.formatters[h],indices:!1,serializeDate:function(e){return d.call(e)},skipNulls:!1,strictNullHandling:!1},f={},m=function e(t,n,a,i,l,c,d,h,m,_,g,v,y,b,w,k,x,S){for(var A,E=t,C=S,M=0,N=!1;void 0!==(C=C.get(f))&&!N;){var T=C.get(t);if(M+=1,"undefined"!==typeof T){if(T===M)throw new RangeError("Cyclic object value");N=!0}"undefined"===typeof C.get(f)&&(M=0)}if("function"===typeof _?E=_(n,E):E instanceof Date?E=y(E):"comma"===a&&s(E)&&(E=o.maybeMap(E,(function(e){return e instanceof Date?y(e):e}))),null===E){if(c)return m&&!k?m(n,p.encoder,x,"key",b):n;E=""}if("string"===typeof(A=E)||"number"===typeof A||"boolean"===typeof A||"symbol"===typeof A||"bigint"===typeof A||o.isBuffer(E))return m?[w(k?n:m(n,p.encoder,x,"key",b))+"="+w(m(E,p.encoder,x,"value",b))]:[w(n)+"="+w(String(E))];var P,D=[];if("undefined"===typeof E)return D;if("comma"===a&&s(E))k&&m&&(E=o.maybeMap(E,m)),P=[{value:E.length>0?E.join(",")||null:void 0}];else if(s(_))P=_;else{var O=Object.keys(E);P=g?O.sort(g):O}var R=h?n.replace(/\./g,"%2E"):n,L=i&&s(E)&&1===E.length?R+"[]":R;if(l&&s(E)&&0===E.length)return L+"[]";for(var I=0;I0?b+y:""}},570:(e,t,n)=>{"use strict";var r=n(640),o=Object.prototype.hasOwnProperty,a=Array.isArray,i=function(){for(var e=[],t=0;t<256;++t)e.push("%"+((t<16?"0":"")+t.toString(16)).toUpperCase());return e}(),l=function(e,t){for(var n=t&&t.plainObjects?Object.create(null):{},r=0;r1;){var t=e.pop(),n=t.obj[t.prop];if(a(n)){for(var r=[],o=0;o=s?l.slice(u,u+s):l,h=[],p=0;p=48&&f<=57||f>=65&&f<=90||f>=97&&f<=122||a===r.RFC1738&&(40===f||41===f)?h[h.length]=d.charAt(p):f<128?h[h.length]=i[f]:f<2048?h[h.length]=i[192|f>>6]+i[128|63&f]:f<55296||f>=57344?h[h.length]=i[224|f>>12]+i[128|f>>6&63]+i[128|63&f]:(p+=1,f=65536+((1023&f)<<10|1023&d.charCodeAt(p)),h[h.length]=i[240|f>>18]+i[128|f>>12&63]+i[128|f>>6&63]+i[128|63&f])}c+=h.join("")}return c},isBuffer:function(e){return!(!e||"object"!==typeof e)&&!!(e.constructor&&e.constructor.isBuffer&&e.constructor.isBuffer(e))},isRegExp:function(e){return"[object RegExp]"===Object.prototype.toString.call(e)},maybeMap:function(e,t){if(a(e)){for(var n=[],r=0;r{e.exports=n(204)},204:(e,t,n)=>{"use strict";var r=function(e){return e&&"object"==typeof e&&"default"in e?e.default:e}(n(609)),o=n(609);function a(){return(a=Object.assign||function(e){for(var t=1;tr.length&&h(e,t.length-1);)t=t.slice(0,t.length-1);return t.length}for(var o=r.length,a=t.length;a>=r.length;a--){var i=t[a];if(!h(e,a)&&p(e,a,i)){o=a+1;break}}return o}function _(e,t){return m(e,t)===e.mask.length}function g(e,t){var n=e.maskChar,r=e.mask,o=e.prefix;if(!n){for((t=v(e,"",t,0)).lengtht.length&&(t+=o.slice(t.length,r)),l.every((function(n){for(;u=n,h(e,c=r)&&u!==o[c];){if(r>=t.length&&(t+=o[r]),l=n,a&&h(e,r)&&l===a)return!0;if(++r>=o.length)return!1}var l,c,u;return!p(e,r,n)&&n!==a||(ro.start?d=(u=function(e,t,n,r){var o=e.mask,a=e.maskChar,i=n.split(""),l=r;return i.every((function(t){for(;i=t,h(e,n=r)&&i!==o[n];)if(++r>=o.length)return!1;var n,i;return(p(e,r,t)||t===a)&&r++,r=a.length?f=a.length:f=i.length&&f{"use strict";var r=n(375),o=n(411),a=n(734)(),i=n(553),l=n(277),s=r("%Math.floor%");e.exports=function(e,t){if("function"!==typeof e)throw new l("`fn` is not a function");if("number"!==typeof t||t<0||t>4294967295||s(t)!==t)throw new l("`length` must be a positive 32-bit integer");var n=arguments.length>2&&!!arguments[2],r=!0,c=!0;if("length"in e&&i){var u=i(e,"length");u&&!u.configurable&&(r=!1),u&&!u.writable&&(c=!1)}return(r||c||!n)&&(a?o(e,"length",t,!0,!0):o(e,"length",t)),e}},670:(e,t,n)=>{"use strict";var r=n(375),o=n(61),a=n(141),i=n(277),l=r("%WeakMap%",!0),s=r("%Map%",!0),c=o("WeakMap.prototype.get",!0),u=o("WeakMap.prototype.set",!0),d=o("WeakMap.prototype.has",!0),h=o("Map.prototype.get",!0),p=o("Map.prototype.set",!0),f=o("Map.prototype.has",!0),m=function(e,t){for(var n,r=e;null!==(n=r.next);r=n)if(n.key===t)return r.next=n.next,n.next=e.next,e.next=n,n};e.exports=function(){var e,t,n,r={assert:function(e){if(!r.has(e))throw new i("Side channel does not contain "+a(e))},get:function(r){if(l&&r&&("object"===typeof r||"function"===typeof r)){if(e)return c(e,r)}else if(s){if(t)return h(t,r)}else if(n)return function(e,t){var n=m(e,t);return n&&n.value}(n,r)},has:function(r){if(l&&r&&("object"===typeof r||"function"===typeof r)){if(e)return d(e,r)}else if(s){if(t)return f(t,r)}else if(n)return function(e,t){return!!m(e,t)}(n,r);return!1},set:function(r,o){l&&r&&("object"===typeof r||"function"===typeof r)?(e||(e=new l),u(e,r,o)):s?(t||(t=new s),p(t,r,o)):(n||(n={key:{},next:null}),function(e,t,n){var r=m(e,t);r?r.value=n:e.next={key:t,next:e.next,value:n}}(n,r,o))}};return r}},634:()=>{},738:(e,t)=>{var n;!function(){"use strict";var r={}.hasOwnProperty;function o(){for(var e="",t=0;t{var t=e&&e.__esModule?()=>e.default:()=>e;return n.d(t,{a:t}),t},n.d=(e,t)=>{for(var r in t)n.o(t,r)&&!n.o(e,r)&&Object.defineProperty(e,r,{enumerable:!0,get:t[r]})},n.f={},n.e=e=>Promise.all(Object.keys(n.f).reduce(((t,r)=>(n.f[r](e,t),t)),[])),n.u=e=>"static/js/"+e+".f772060c.chunk.js",n.miniCssF=e=>{},n.g=function(){if("object"===typeof globalThis)return globalThis;try{return this||new Function("return this")()}catch(e){if("object"===typeof window)return window}}(),n.o=(e,t)=>Object.prototype.hasOwnProperty.call(e,t),(()=>{var e={},t="vmui:";n.l=(r,o,a,i)=>{if(e[r])e[r].push(o);else{var l,s;if(void 0!==a)for(var c=document.getElementsByTagName("script"),u=0;u{l.onerror=l.onload=null,clearTimeout(p);var o=e[r];if(delete e[r],l.parentNode&&l.parentNode.removeChild(l),o&&o.forEach((e=>e(n))),t)return t(n)},p=setTimeout(h.bind(null,void 0,{type:"timeout",target:l}),12e4);l.onerror=h.bind(null,l.onerror),l.onload=h.bind(null,l.onload),s&&document.head.appendChild(l)}}})(),n.r=e=>{"undefined"!==typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})},n.p="./",(()=>{var e={792:0};n.f.j=(t,r)=>{var o=n.o(e,t)?e[t]:void 0;if(0!==o)if(o)r.push(o[2]);else{var a=new Promise(((n,r)=>o=e[t]=[n,r]));r.push(o[2]=a);var i=n.p+n.u(t),l=new Error;n.l(i,(r=>{if(n.o(e,t)&&(0!==(o=e[t])&&(e[t]=void 0),o)){var a=r&&("load"===r.type?"missing":r.type),i=r&&r.target&&r.target.src;l.message="Loading chunk "+t+" failed.\n("+a+": "+i+")",l.name="ChunkLoadError",l.type=a,l.request=i,o[1](l)}}),"chunk-"+t,t)}};var t=(t,r)=>{var o,a,i=r[0],l=r[1],s=r[2],c=0;if(i.some((t=>0!==e[t]))){for(o in l)n.o(l,o)&&(n.m[o]=l[o]);if(s)s(n)}for(t&&t(r);c{"use strict";var e,t=n(609),r=n(159),o=n.n(r),a=n(7),i=n.n(a),l=n(648),s=n.n(l),c=n(220),u=n.n(c);function d(){return d=Object.assign?Object.assign.bind():function(e){for(var t=1;t=0&&(t.hash=e.substr(n),e=e.substr(0,n));let r=e.indexOf("?");r>=0&&(t.search=e.substr(r),e=e.substr(0,r)),e&&(t.pathname=e)}return t}function y(t,n,r,o){void 0===o&&(o={});let{window:a=document.defaultView,v5Compat:i=!1}=o,l=a.history,s=e.Pop,c=null,u=f();function f(){return(l.state||{idx:null}).idx}function v(){s=e.Pop;let t=f(),n=null==t?null:t-u;u=t,c&&c({action:s,location:b.location,delta:n})}function y(e){let t="null"!==a.location.origin?a.location.origin:a.location.href,n="string"===typeof e?e:g(e);return n=n.replace(/ $/,"%20"),p(t,"No window.location.(origin|href) available to create URL for href: "+n),new URL(n,t)}null==u&&(u=0,l.replaceState(d({},l.state,{idx:u}),""));let b={get action(){return s},get location(){return t(a,l)},listen(e){if(c)throw new Error("A history only accepts one active listener");return a.addEventListener(h,v),c=e,()=>{a.removeEventListener(h,v),c=null}},createHref:e=>n(a,e),createURL:y,encodeLocation(e){let t=y(e);return{pathname:t.pathname,search:t.search,hash:t.hash}},push:function(t,n){s=e.Push;let o=_(b.location,t,n);r&&r(o,t),u=f()+1;let d=m(o,u),h=b.createHref(o);try{l.pushState(d,"",h)}catch(p){if(p instanceof DOMException&&"DataCloneError"===p.name)throw p;a.location.assign(h)}i&&c&&c({action:s,location:b.location,delta:1})},replace:function(t,n){s=e.Replace;let o=_(b.location,t,n);r&&r(o,t),u=f();let a=m(o,u),d=b.createHref(o);l.replaceState(a,"",d),i&&c&&c({action:s,location:b.location,delta:0})},go:e=>l.go(e)};return b}var b;!function(e){e.data="data",e.deferred="deferred",e.redirect="redirect",e.error="error"}(b||(b={}));new Set(["lazy","caseSensitive","path","id","index","children"]);function w(e,t,n){return void 0===n&&(n="/"),k(e,t,n,!1)}function k(e,t,n,r){let o=I(("string"===typeof t?v(t):t).pathname||"/",n);if(null==o)return null;let a=x(e);!function(e){e.sort(((e,t)=>e.score!==t.score?t.score-e.score:function(e,t){let n=e.length===t.length&&e.slice(0,-1).every(((e,n)=>e===t[n]));return n?e[e.length-1]-t[t.length-1]:0}(e.routesMeta.map((e=>e.childrenIndex)),t.routesMeta.map((e=>e.childrenIndex)))))}(a);let i=null;for(let l=0;null==i&&l{let i={relativePath:void 0===a?e.path||"":a,caseSensitive:!0===e.caseSensitive,childrenIndex:o,route:e};i.relativePath.startsWith("/")&&(p(i.relativePath.startsWith(r),'Absolute route path "'+i.relativePath+'" nested under path "'+r+'" is not valid. An absolute child route path must start with the combined path of all its parent routes.'),i.relativePath=i.relativePath.slice(r.length));let l=H([r,i.relativePath]),s=n.concat(i);e.children&&e.children.length>0&&(p(!0!==e.index,'Index routes must not have child routes. Please remove all child routes from route path "'+l+'".'),x(e.children,t,s,l)),(null!=e.path||e.index)&&t.push({path:l,score:D(l,e.index),routesMeta:s})};return e.forEach(((e,t)=>{var n;if(""!==e.path&&null!=(n=e.path)&&n.includes("?"))for(let r of S(e.path))o(e,t,r);else o(e,t)})),t}function S(e){let t=e.split("/");if(0===t.length)return[];let[n,...r]=t,o=n.endsWith("?"),a=n.replace(/\?$/,"");if(0===r.length)return o?[a,""]:[a];let i=S(r.join("/")),l=[];return l.push(...i.map((e=>""===e?a:[a,e].join("/")))),o&&l.push(...i),l.map((t=>e.startsWith("/")&&""===t?"/":t))}const A=/^:[\w-]+$/,E=3,C=2,M=1,N=10,T=-2,P=e=>"*"===e;function D(e,t){let n=e.split("/"),r=n.length;return n.some(P)&&(r+=T),t&&(r+=C),n.filter((e=>!P(e))).reduce(((e,t)=>e+(A.test(t)?E:""===t?M:N)),r)}function O(e,t,n){void 0===n&&(n=!1);let{routesMeta:r}=e,o={},a="/",i=[];for(let l=0;l(r.push({paramName:t,isOptional:null!=n}),n?"/?([^\\/]+)?":"/([^\\/]+)")));e.endsWith("*")?(r.push({paramName:"*"}),o+="*"===e||"/*"===e?"(.*)$":"(?:\\/(.+)|\\/*)$"):n?o+="\\/*$":""!==e&&"/"!==e&&(o+="(?:(?=\\/|$))");let a=new RegExp(o,t?void 0:"i");return[a,r]}(e.path,e.caseSensitive,e.end),o=t.match(n);if(!o)return null;let a=o[0],i=a.replace(/(.)\/+$/,"$1"),l=o.slice(1);return{params:r.reduce(((e,t,n)=>{let{paramName:r,isOptional:o}=t;if("*"===r){let e=l[n]||"";i=a.slice(0,a.length-e.length).replace(/(.)\/+$/,"$1")}const s=l[n];return e[r]=o&&!s?void 0:(s||"").replace(/%2F/g,"/"),e}),{}),pathname:a,pathnameBase:i,pattern:e}}function L(e){try{return e.split("/").map((e=>decodeURIComponent(e).replace(/\//g,"%2F"))).join("/")}catch(t){return f(!1,'The URL path "'+e+'" could not be decoded because it is is a malformed URL segment. This is probably due to a bad percent encoding ('+t+")."),e}}function I(e,t){if("/"===t)return e;if(!e.toLowerCase().startsWith(t.toLowerCase()))return null;let n=t.endsWith("/")?t.length-1:t.length,r=e.charAt(n);return r&&"/"!==r?null:e.slice(n)||"/"}function z(e,t,n,r){return"Cannot include a '"+e+"' character in a manually specified `to."+t+"` field ["+JSON.stringify(r)+"]. Please separate it out to the `to."+n+'` field. Alternatively you may provide the full path as a string in and the router will parse it for you.'}function j(e){return e.filter(((e,t)=>0===t||e.route.path&&e.route.path.length>0))}function $(e,t){let n=j(e);return t?n.map(((e,t)=>t===n.length-1?e.pathname:e.pathnameBase)):n.map((e=>e.pathnameBase))}function F(e,t,n,r){let o;void 0===r&&(r=!1),"string"===typeof e?o=v(e):(o=d({},e),p(!o.pathname||!o.pathname.includes("?"),z("?","pathname","search",o)),p(!o.pathname||!o.pathname.includes("#"),z("#","pathname","hash",o)),p(!o.search||!o.search.includes("#"),z("#","search","hash",o)));let a,i=""===e||""===o.pathname,l=i?"/":o.pathname;if(null==l)a=n;else{let e=t.length-1;if(!r&&l.startsWith("..")){let t=l.split("/");for(;".."===t[0];)t.shift(),e-=1;o.pathname=t.join("/")}a=e>=0?t[e]:"/"}let s=function(e,t){void 0===t&&(t="/");let{pathname:n,search:r="",hash:o=""}="string"===typeof e?v(e):e,a=n?n.startsWith("/")?n:function(e,t){let n=t.replace(/\/+$/,"").split("/");return e.split("/").forEach((e=>{".."===e?n.length>1&&n.pop():"."!==e&&n.push(e)})),n.length>1?n.join("/"):"/"}(n,t):t;return{pathname:a,search:B(r),hash:U(o)}}(o,a),c=l&&"/"!==l&&l.endsWith("/"),u=(i||"."===l)&&n.endsWith("/");return s.pathname.endsWith("/")||!c&&!u||(s.pathname+="/"),s}const H=e=>e.join("/").replace(/\/\/+/g,"/"),V=e=>e.replace(/\/+$/,"").replace(/^\/*/,"/"),B=e=>e&&"?"!==e?e.startsWith("?")?e:"?"+e:"",U=e=>e&&"#"!==e?e.startsWith("#")?e:"#"+e:"";Error;function Y(e){return null!=e&&"number"===typeof e.status&&"string"===typeof e.statusText&&"boolean"===typeof e.internal&&"data"in e}const W=["post","put","patch","delete"],q=(new Set(W),["get",...W]);new Set(q),new Set([301,302,303,307,308]),new Set([307,308]);Symbol("deferred");function Z(){return Z=Object.assign?Object.assign.bind():function(e){for(var t=1;t{r.current=!0}));let o=t.useCallback((function(t,o){void 0===o&&(o={}),r.current&&("number"===typeof t?e.navigate(t):e.navigate(t,Z({fromRouteId:n},o)))}),[e,n]);return o}():function(){te()||p(!1);let e=t.useContext(K),{basename:n,future:r,navigator:o}=t.useContext(Q),{matches:a}=t.useContext(X),{pathname:i}=ne(),l=JSON.stringify($(a,r.v7_relativeSplatPath)),s=t.useRef(!1);re((()=>{s.current=!0}));let c=t.useCallback((function(t,r){if(void 0===r&&(r={}),!s.current)return;if("number"===typeof t)return void o.go(t);let a=F(t,JSON.parse(l),i,"path"===r.relative);null==e&&"/"!==n&&(a.pathname="/"===a.pathname?n:H([n,a.pathname])),(r.replace?o.replace:o.push)(a,r.state,r)}),[n,o,l,i,e]);return c}()}const ae=t.createContext(null);function ie(e,n){let{relative:r}=void 0===n?{}:n,{future:o}=t.useContext(Q),{matches:a}=t.useContext(X),{pathname:i}=ne(),l=JSON.stringify($(a,o.v7_relativeSplatPath));return t.useMemo((()=>F(e,JSON.parse(l),i,"path"===r)),[e,l,i,r])}function le(n,r,o,a){te()||p(!1);let{navigator:i}=t.useContext(Q),{matches:l}=t.useContext(X),s=l[l.length-1],c=s?s.params:{},u=(s&&s.pathname,s?s.pathnameBase:"/");s&&s.route;let d,h=ne();if(r){var f;let e="string"===typeof r?v(r):r;"/"===u||(null==(f=e.pathname)?void 0:f.startsWith(u))||p(!1),d=e}else d=h;let m=d.pathname||"/",_=m;if("/"!==u){let e=u.replace(/^\//,"").split("/");_="/"+m.replace(/^\//,"").split("/").slice(e.length).join("/")}let g=w(n,{pathname:_});let y=he(g&&g.map((e=>Object.assign({},e,{params:Object.assign({},c,e.params),pathname:H([u,i.encodeLocation?i.encodeLocation(e.pathname).pathname:e.pathname]),pathnameBase:"/"===e.pathnameBase?u:H([u,i.encodeLocation?i.encodeLocation(e.pathnameBase).pathname:e.pathnameBase])}))),l,o,a);return r&&y?t.createElement(J.Provider,{value:{location:Z({pathname:"/",search:"",hash:"",state:null,key:"default"},d),navigationType:e.Pop}},y):y}function se(){let e=function(){var e;let n=t.useContext(ee),r=_e(fe.UseRouteError),o=ge(fe.UseRouteError);if(void 0!==n)return n;return null==(e=r.errors)?void 0:e[o]}(),n=Y(e)?e.status+" "+e.statusText:e instanceof Error?e.message:JSON.stringify(e),r=e instanceof Error?e.stack:null,o="rgba(200,200,200, 0.5)",a={padding:"0.5rem",backgroundColor:o};return t.createElement(t.Fragment,null,t.createElement("h2",null,"Unexpected Application Error!"),t.createElement("h3",{style:{fontStyle:"italic"}},n),r?t.createElement("pre",{style:a},r):null,null)}const ce=t.createElement(se,null);class ue extends t.Component{constructor(e){super(e),this.state={location:e.location,revalidation:e.revalidation,error:e.error}}static getDerivedStateFromError(e){return{error:e}}static getDerivedStateFromProps(e,t){return t.location!==e.location||"idle"!==t.revalidation&&"idle"===e.revalidation?{error:e.error,location:e.location,revalidation:e.revalidation}:{error:void 0!==e.error?e.error:t.error,location:t.location,revalidation:e.revalidation||t.revalidation}}componentDidCatch(e,t){console.error("React Router caught the following error during render",e,t)}render(){return void 0!==this.state.error?t.createElement(X.Provider,{value:this.props.routeContext},t.createElement(ee.Provider,{value:this.state.error,children:this.props.component})):this.props.children}}function de(e){let{routeContext:n,match:r,children:o}=e,a=t.useContext(K);return a&&a.static&&a.staticContext&&(r.route.errorElement||r.route.ErrorBoundary)&&(a.staticContext._deepestRenderedBoundaryId=r.route.id),t.createElement(X.Provider,{value:n},o)}function he(e,n,r,o){var a;if(void 0===n&&(n=[]),void 0===r&&(r=null),void 0===o&&(o=null),null==e){var i;if(!r)return null;if(r.errors)e=r.matches;else{if(!(null!=(i=o)&&i.v7_partialHydration&&0===n.length&&!r.initialized&&r.matches.length>0))return null;e=r.matches}}let l=e,s=null==(a=r)?void 0:a.errors;if(null!=s){let e=l.findIndex((e=>e.route.id&&void 0!==(null==s?void 0:s[e.route.id])));e>=0||p(!1),l=l.slice(0,Math.min(l.length,e+1))}let c=!1,u=-1;if(r&&o&&o.v7_partialHydration)for(let t=0;t=0?l.slice(0,u+1):[l[0]];break}}}return l.reduceRight(((e,o,a)=>{let i,d=!1,h=null,p=null;var f;r&&(i=s&&o.route.id?s[o.route.id]:void 0,h=o.route.errorElement||ce,c&&(u<0&&0===a?(f="route-fallback",!1||ve[f]||(ve[f]=!0),d=!0,p=null):u===a&&(d=!0,p=o.route.hydrateFallbackElement||null)));let m=n.concat(l.slice(0,a+1)),_=()=>{let n;return n=i?h:d?p:o.route.Component?t.createElement(o.route.Component,null):o.route.element?o.route.element:e,t.createElement(de,{match:o,routeContext:{outlet:e,matches:m,isDataRoute:null!=r},children:n})};return r&&(o.route.ErrorBoundary||o.route.errorElement||0===a)?t.createElement(ue,{location:r.location,revalidation:r.revalidation,component:h,error:i,children:_(),routeContext:{outlet:null,matches:m,isDataRoute:!0}}):_()}),null)}var pe=function(e){return e.UseBlocker="useBlocker",e.UseRevalidator="useRevalidator",e.UseNavigateStable="useNavigate",e}(pe||{}),fe=function(e){return e.UseBlocker="useBlocker",e.UseLoaderData="useLoaderData",e.UseActionData="useActionData",e.UseRouteError="useRouteError",e.UseNavigation="useNavigation",e.UseRouteLoaderData="useRouteLoaderData",e.UseMatches="useMatches",e.UseRevalidator="useRevalidator",e.UseNavigateStable="useNavigate",e.UseRouteId="useRouteId",e}(fe||{});function me(e){let n=t.useContext(K);return n||p(!1),n}function _e(e){let n=t.useContext(G);return n||p(!1),n}function ge(e){let n=function(e){let n=t.useContext(X);return n||p(!1),n}(),r=n.matches[n.matches.length-1];return r.route.id||p(!1),r.route.id}const ve={};t.startTransition;function ye(e){return function(e){let n=t.useContext(X).outlet;return n?t.createElement(ae.Provider,{value:e},n):n}(e.context)}function be(e){p(!1)}function we(n){let{basename:r="/",children:o=null,location:a,navigationType:i=e.Pop,navigator:l,static:s=!1,future:c}=n;te()&&p(!1);let u=r.replace(/^\/*/,"/"),d=t.useMemo((()=>({basename:u,navigator:l,static:s,future:Z({v7_relativeSplatPath:!1},c)})),[u,c,l,s]);"string"===typeof a&&(a=v(a));let{pathname:h="/",search:f="",hash:m="",state:_=null,key:g="default"}=a,y=t.useMemo((()=>{let e=I(h,u);return null==e?null:{location:{pathname:e,search:f,hash:m,state:_,key:g},navigationType:i}}),[u,h,f,m,_,g,i]);return null==y?null:t.createElement(Q.Provider,{value:d},t.createElement(J.Provider,{children:o,value:y}))}function ke(e){let{children:t,location:n}=e;return le(xe(t),n)}new Promise((()=>{}));t.Component;function xe(e,n){void 0===n&&(n=[]);let r=[];return t.Children.forEach(e,((e,o)=>{if(!t.isValidElement(e))return;let a=[...n,o];if(e.type===t.Fragment)return void r.push.apply(r,xe(e.props.children,a));e.type!==be&&p(!1),e.props.index&&e.props.children&&p(!1);let i={id:e.props.id||a.join("-"),caseSensitive:e.props.caseSensitive,element:e.props.element,Component:e.props.Component,index:e.props.index,path:e.props.path,loader:e.props.loader,action:e.props.action,errorElement:e.props.errorElement,ErrorBoundary:e.props.ErrorBoundary,hasErrorBoundary:null!=e.props.ErrorBoundary||null!=e.props.errorElement,shouldRevalidate:e.props.shouldRevalidate,handle:e.props.handle,lazy:e.props.lazy};e.props.children&&(i.children=xe(e.props.children,a)),r.push(i)})),r}function Se(){return Se=Object.assign?Object.assign.bind():function(e){for(var t=1;t=0||(o[n]=e[n]);return o}function Ee(e){return void 0===e&&(e=""),new URLSearchParams("string"===typeof e||Array.isArray(e)||e instanceof URLSearchParams?e:Object.keys(e).reduce(((t,n)=>{let r=e[n];return t.concat(Array.isArray(r)?r.map((e=>[n,e])):[[n,r]])}),[]))}new Set(["application/x-www-form-urlencoded","multipart/form-data","text/plain"]);const Ce=["onClick","relative","reloadDocument","replace","state","target","to","preventScrollReset","unstable_viewTransition"],Me=["aria-current","caseSensitive","className","end","style","to","unstable_viewTransition","children"];try{window.__reactRouterVersion="6"}catch(zd){}const Ne=t.createContext({isTransitioning:!1});new Map;const Te=t.startTransition;t.flushSync,t.useId;function Pe(e){let{basename:n,children:r,future:o,window:a}=e,i=t.useRef();null==i.current&&(i.current=function(e){return void 0===e&&(e={}),y((function(e,t){let{pathname:n="/",search:r="",hash:o=""}=v(e.location.hash.substr(1));return n.startsWith("/")||n.startsWith(".")||(n="/"+n),_("",{pathname:n,search:r,hash:o},t.state&&t.state.usr||null,t.state&&t.state.key||"default")}),(function(e,t){let n=e.document.querySelector("base"),r="";if(n&&n.getAttribute("href")){let t=e.location.href,n=t.indexOf("#");r=-1===n?t:t.slice(0,n)}return r+"#"+("string"===typeof t?t:g(t))}),(function(e,t){f("/"===e.pathname.charAt(0),"relative pathnames are not supported in hash history.push("+JSON.stringify(t)+")")}),e)}({window:a,v5Compat:!0}));let l=i.current,[s,c]=t.useState({action:l.action,location:l.location}),{v7_startTransition:u}=o||{},d=t.useCallback((e=>{u&&Te?Te((()=>c(e))):c(e)}),[c,u]);return t.useLayoutEffect((()=>l.listen(d)),[l,d]),t.createElement(we,{basename:n,children:r,location:s.location,navigationType:s.action,navigator:l,future:o})}const De="undefined"!==typeof window&&"undefined"!==typeof window.document&&"undefined"!==typeof window.document.createElement,Oe=/^(?:[a-z][a-z0-9+.-]*:|\/\/)/i,Re=t.forwardRef((function(e,n){let r,{onClick:o,relative:a,reloadDocument:i,replace:l,state:s,target:c,to:u,preventScrollReset:d,unstable_viewTransition:h}=e,f=Ae(e,Ce),{basename:m}=t.useContext(Q),_=!1;if("string"===typeof u&&Oe.test(u)&&(r=u,De))try{let e=new URL(window.location.href),t=u.startsWith("//")?new URL(e.protocol+u):new URL(u),n=I(t.pathname,m);t.origin===e.origin&&null!=n?u=n+t.search+t.hash:_=!0}catch(zd){}let v=function(e,n){let{relative:r}=void 0===n?{}:n;te()||p(!1);let{basename:o,navigator:a}=t.useContext(Q),{hash:i,pathname:l,search:s}=ie(e,{relative:r}),c=l;return"/"!==o&&(c="/"===l?o:H([o,l])),a.createHref({pathname:c,search:s,hash:i})}(u,{relative:a}),y=function(e,n){let{target:r,replace:o,state:a,preventScrollReset:i,relative:l,unstable_viewTransition:s}=void 0===n?{}:n,c=oe(),u=ne(),d=ie(e,{relative:l});return t.useCallback((t=>{if(function(e,t){return 0===e.button&&(!t||"_self"===t)&&!function(e){return!!(e.metaKey||e.altKey||e.ctrlKey||e.shiftKey)}(e)}(t,r)){t.preventDefault();let n=void 0!==o?o:g(u)===g(d);c(e,{replace:n,state:a,preventScrollReset:i,relative:l,unstable_viewTransition:s})}}),[u,c,d,o,a,r,e,i,l,s])}(u,{replace:l,state:s,target:c,preventScrollReset:d,relative:a,unstable_viewTransition:h});return t.createElement("a",Se({},f,{href:r||v,onClick:_||i?o:function(e){o&&o(e),e.defaultPrevented||y(e)},ref:n,target:c}))}));const Le=t.forwardRef((function(e,n){let{"aria-current":r="page",caseSensitive:o=!1,className:a="",end:i=!1,style:l,to:s,unstable_viewTransition:c,children:u}=e,d=Ae(e,Me),h=ie(s,{relative:d.relative}),f=ne(),m=t.useContext(G),{navigator:_,basename:g}=t.useContext(Q),v=null!=m&&function(e,n){void 0===n&&(n={});let r=t.useContext(Ne);null==r&&p(!1);let{basename:o}=je(Ie.useViewTransitionState),a=ie(e,{relative:n.relative});if(!r.isTransitioning)return!1;let i=I(r.currentLocation.pathname,o)||r.currentLocation.pathname,l=I(r.nextLocation.pathname,o)||r.nextLocation.pathname;return null!=R(a.pathname,l)||null!=R(a.pathname,i)}(h)&&!0===c,y=_.encodeLocation?_.encodeLocation(h).pathname:h.pathname,b=f.pathname,w=m&&m.navigation&&m.navigation.location?m.navigation.location.pathname:null;o||(b=b.toLowerCase(),w=w?w.toLowerCase():null,y=y.toLowerCase()),w&&g&&(w=I(w,g)||w);const k="/"!==y&&y.endsWith("/")?y.length-1:y.length;let x,S=b===y||!i&&b.startsWith(y)&&"/"===b.charAt(k),A=null!=w&&(w===y||!i&&w.startsWith(y)&&"/"===w.charAt(y.length)),E={isActive:S,isPending:A,isTransitioning:v},C=S?r:void 0;x="function"===typeof a?a(E):[a,S?"active":null,A?"pending":null,v?"transitioning":null].filter(Boolean).join(" ");let M="function"===typeof l?l(E):l;return t.createElement(Re,Se({},d,{"aria-current":C,className:x,ref:n,style:M,to:s,unstable_viewTransition:c}),"function"===typeof u?u(E):u)}));var Ie,ze;function je(e){let n=t.useContext(K);return n||p(!1),n}function $e(e){let n=t.useRef(Ee(e)),r=t.useRef(!1),o=ne(),a=t.useMemo((()=>function(e,t){let n=Ee(e);return t&&t.forEach(((e,r)=>{n.has(r)||t.getAll(r).forEach((e=>{n.append(r,e)}))})),n}(o.search,r.current?null:n.current)),[o.search]),i=oe(),l=t.useCallback(((e,t)=>{const n=Ee("function"===typeof e?e(a):e);r.current=!0,i("?"+n,t)}),[i,a]);return[a,l]}(function(e){e.UseScrollRestoration="useScrollRestoration",e.UseSubmit="useSubmit",e.UseSubmitFetcher="useSubmitFetcher",e.UseFetcher="useFetcher",e.useViewTransitionState="useViewTransitionState"})(Ie||(Ie={})),function(e){e.UseFetcher="useFetcher",e.UseFetchers="useFetchers",e.UseScrollRestoration="useScrollRestoration"}(ze||(ze={}));const Fe=()=>{var e;const t=(null===(e=document.getElementById("root"))||void 0===e?void 0:e.dataset.params)||"{}";try{return JSON.parse(t)}catch(zd){return console.error(zd),{}}},He=()=>!!Object.keys(Fe()).length,Ve=/(\/select\/)(\d+|\d.+)(\/)(.+)/,Be=e=>{var t;return(null===(t=e.match(Ve))||void 0===t?void 0:t[2])||""};let Ue=function(e){return e.logs="logs",e.anomaly="anomaly",e}({});const Ye=(e,t)=>{t?window.localStorage.setItem(e,JSON.stringify({value:t})):qe([e]),window.dispatchEvent(new Event("storage"))},We=e=>{const t=window.localStorage.getItem(e);if(null!==t)try{var n;return null===(n=JSON.parse(t))||void 0===n?void 0:n.value}catch(zd){return t}},qe=e=>e.forEach((e=>window.localStorage.removeItem(e))),{REACT_APP_TYPE:Ze}={REACT_APP_TYPE:"logs"};var Ke=n(215),Ge=n.n(Ke),Qe=n(424),Je=n.n(Qe);const Xe={table:100,chart:20,code:1e3},et=(e,t)=>{const n=window.location.hash.split("?")[1],r=Ge().parse(n,{ignoreQueryPrefix:!0});return Je()(r,e,t||"")};let tt=function(e){return e.yhat="yhat",e.yhatUpper="yhat_upper",e.yhatLower="yhat_lower",e.anomaly="vmui_anomalies_points",e.training="vmui_training_data",e.actual="actual",e.anomalyScore="anomaly_score",e}({}),nt=function(e){return e.table="table",e.chart="chart",e.code="code",e}({}),rt=function(e){return e.emptyServer="Please enter Server URL",e.validServer="Please provide a valid Server URL",e.validQuery="Please enter a valid Query and execute it",e.traceNotFound="Not found the tracing information",e.emptyTitle="Please enter title",e.positiveNumber="Please enter positive number",e.validStep="Please enter a valid step",e.unknownType="Unknown server response format: must have 'errorType'",e}({}),ot=function(e){return e.system="system",e.light="light",e.dark="dark",e}({}),at=function(e){return e.empty="empty",e.metricsql="metricsql",e.label="label",e.labelValue="labelValue",e}({});const it=e=>getComputedStyle(document.documentElement).getPropertyValue("--".concat(e)),lt=(e,t)=>{document.documentElement.style.setProperty("--".concat(e),t)},st=()=>window.matchMedia("(prefers-color-scheme: dark)").matches,ct=e=>e.replace(/\/$/,""),ut=et("g0.tenantID",""),dt={serverUrl:ct((e=>{const{serverURL:t}=Fe(),n=We("SERVER_URL"),r=window.location.href.replace(/\/(select\/)?(vmui)\/.*/,""),o="".concat(window.location.origin).concat(window.location.pathname.replace(/^\/vmui/,"")),a=window.location.href.replace(/\/(?:prometheus\/)?(?:graph|vmui)\/.*/,"/prometheus"),i=t||n||a;switch(Ze){case Ue.logs:return r;case Ue.anomaly:return n||o;default:return e?((e,t)=>e.replace(Ve,"$1".concat(t,"/$4")))(i,e):i}})(ut)),tenantId:ut,theme:We("THEME")||ot.system,isDarkTheme:null};function ht(e,t){switch(t.type){case"SET_SERVER":return{...e,serverUrl:ct(t.payload)};case"SET_TENANT_ID":return{...e,tenantId:t.payload};case"SET_THEME":return Ye("THEME",t.payload),{...e,theme:t.payload};case"SET_DARK_THEME":return{...e,isDarkTheme:(n=e.theme,n===ot.system&&st()||n===ot.dark)};default:throw new Error}var n}var pt=n(746);var ft=0;Array.isArray;function mt(e,t,n,r,o,a){t||(t={});var i,l,s=t;if("ref"in s)for(l in s={},t)"ref"==l?i=t[l]:s[l]=t[l];var c={type:e,props:s,key:n,ref:i,__k:null,__:null,__b:0,__e:null,__d:void 0,__c:null,constructor:void 0,__v:--ft,__i:-1,__u:0,__source:o,__self:a};if("function"==typeof e&&(i=e.defaultProps))for(l in i)void 0===s[l]&&(s[l]=i[l]);return pt.fF.vnode&&pt.fF.vnode(c),c}const _t=(0,t.createContext)({}),gt=()=>(0,t.useContext)(_t).state,vt=()=>(0,t.useContext)(_t).dispatch,yt=Object.entries(dt).reduce(((e,t)=>{let[n,r]=t;return{...e,[n]:et(n)||r}}),{}),bt="YYYY-MM-DD",wt="YYYY-MM-DD HH:mm:ss",kt="YYYY-MM-DD[T]HH:mm:ss",xt=window.innerWidth/4,St=window.innerWidth/40,At=1,Et=1578e8,Ct=Intl.supportedValuesOf,Mt=Ct?Ct("timeZone"):["Africa/Abidjan","Africa/Accra","Africa/Addis_Ababa","Africa/Algiers","Africa/Asmera","Africa/Bamako","Africa/Bangui","Africa/Banjul","Africa/Bissau","Africa/Blantyre","Africa/Brazzaville","Africa/Bujumbura","Africa/Cairo","Africa/Casablanca","Africa/Ceuta","Africa/Conakry","Africa/Dakar","Africa/Dar_es_Salaam","Africa/Djibouti","Africa/Douala","Africa/El_Aaiun","Africa/Freetown","Africa/Gaborone","Africa/Harare","Africa/Johannesburg","Africa/Juba","Africa/Kampala","Africa/Khartoum","Africa/Kigali","Africa/Kinshasa","Africa/Lagos","Africa/Libreville","Africa/Lome","Africa/Luanda","Africa/Lubumbashi","Africa/Lusaka","Africa/Malabo","Africa/Maputo","Africa/Maseru","Africa/Mbabane","Africa/Mogadishu","Africa/Monrovia","Africa/Nairobi","Africa/Ndjamena","Africa/Niamey","Africa/Nouakchott","Africa/Ouagadougou","Africa/Porto-Novo","Africa/Sao_Tome","Africa/Tripoli","Africa/Tunis","Africa/Windhoek","America/Adak","America/Anchorage","America/Anguilla","America/Antigua","America/Araguaina","America/Argentina/La_Rioja","America/Argentina/Rio_Gallegos","America/Argentina/Salta","America/Argentina/San_Juan","America/Argentina/San_Luis","America/Argentina/Tucuman","America/Argentina/Ushuaia","America/Aruba","America/Asuncion","America/Bahia","America/Bahia_Banderas","America/Barbados","America/Belem","America/Belize","America/Blanc-Sablon","America/Boa_Vista","America/Bogota","America/Boise","America/Buenos_Aires","America/Cambridge_Bay","America/Campo_Grande","America/Cancun","America/Caracas","America/Catamarca","America/Cayenne","America/Cayman","America/Chicago","America/Chihuahua","America/Coral_Harbour","America/Cordoba","America/Costa_Rica","America/Creston","America/Cuiaba","America/Curacao","America/Danmarkshavn","America/Dawson","America/Dawson_Creek","America/Denver","America/Detroit","America/Dominica","America/Edmonton","America/Eirunepe","America/El_Salvador","America/Fort_Nelson","America/Fortaleza","America/Glace_Bay","America/Godthab","America/Goose_Bay","America/Grand_Turk","America/Grenada","America/Guadeloupe","America/Guatemala","America/Guayaquil","America/Guyana","America/Halifax","America/Havana","America/Hermosillo","America/Indiana/Knox","America/Indiana/Marengo","America/Indiana/Petersburg","America/Indiana/Tell_City","America/Indiana/Vevay","America/Indiana/Vincennes","America/Indiana/Winamac","America/Indianapolis","America/Inuvik","America/Iqaluit","America/Jamaica","America/Jujuy","America/Juneau","America/Kentucky/Monticello","America/Kralendijk","America/La_Paz","America/Lima","America/Los_Angeles","America/Louisville","America/Lower_Princes","America/Maceio","America/Managua","America/Manaus","America/Marigot","America/Martinique","America/Matamoros","America/Mazatlan","America/Mendoza","America/Menominee","America/Merida","America/Metlakatla","America/Mexico_City","America/Miquelon","America/Moncton","America/Monterrey","America/Montevideo","America/Montreal","America/Montserrat","America/Nassau","America/New_York","America/Nipigon","America/Nome","America/Noronha","America/North_Dakota/Beulah","America/North_Dakota/Center","America/North_Dakota/New_Salem","America/Ojinaga","America/Panama","America/Pangnirtung","America/Paramaribo","America/Phoenix","America/Port-au-Prince","America/Port_of_Spain","America/Porto_Velho","America/Puerto_Rico","America/Punta_Arenas","America/Rainy_River","America/Rankin_Inlet","America/Recife","America/Regina","America/Resolute","America/Rio_Branco","America/Santa_Isabel","America/Santarem","America/Santiago","America/Santo_Domingo","America/Sao_Paulo","America/Scoresbysund","America/Sitka","America/St_Barthelemy","America/St_Johns","America/St_Kitts","America/St_Lucia","America/St_Thomas","America/St_Vincent","America/Swift_Current","America/Tegucigalpa","America/Thule","America/Thunder_Bay","America/Tijuana","America/Toronto","America/Tortola","America/Vancouver","America/Whitehorse","America/Winnipeg","America/Yakutat","America/Yellowknife","Antarctica/Casey","Antarctica/Davis","Antarctica/DumontDUrville","Antarctica/Macquarie","Antarctica/Mawson","Antarctica/McMurdo","Antarctica/Palmer","Antarctica/Rothera","Antarctica/Syowa","Antarctica/Troll","Antarctica/Vostok","Arctic/Longyearbyen","Asia/Aden","Asia/Almaty","Asia/Amman","Asia/Anadyr","Asia/Aqtau","Asia/Aqtobe","Asia/Ashgabat","Asia/Atyrau","Asia/Baghdad","Asia/Bahrain","Asia/Baku","Asia/Bangkok","Asia/Barnaul","Asia/Beirut","Asia/Bishkek","Asia/Brunei","Asia/Calcutta","Asia/Chita","Asia/Choibalsan","Asia/Colombo","Asia/Damascus","Asia/Dhaka","Asia/Dili","Asia/Dubai","Asia/Dushanbe","Asia/Famagusta","Asia/Gaza","Asia/Hebron","Asia/Hong_Kong","Asia/Hovd","Asia/Irkutsk","Asia/Jakarta","Asia/Jayapura","Asia/Jerusalem","Asia/Kabul","Asia/Kamchatka","Asia/Karachi","Asia/Katmandu","Asia/Khandyga","Asia/Krasnoyarsk","Asia/Kuala_Lumpur","Asia/Kuching","Asia/Kuwait","Asia/Macau","Asia/Magadan","Asia/Makassar","Asia/Manila","Asia/Muscat","Asia/Nicosia","Asia/Novokuznetsk","Asia/Novosibirsk","Asia/Omsk","Asia/Oral","Asia/Phnom_Penh","Asia/Pontianak","Asia/Pyongyang","Asia/Qatar","Asia/Qostanay","Asia/Qyzylorda","Asia/Rangoon","Asia/Riyadh","Asia/Saigon","Asia/Sakhalin","Asia/Samarkand","Asia/Seoul","Asia/Shanghai","Asia/Singapore","Asia/Srednekolymsk","Asia/Taipei","Asia/Tashkent","Asia/Tbilisi","Asia/Tehran","Asia/Thimphu","Asia/Tokyo","Asia/Tomsk","Asia/Ulaanbaatar","Asia/Urumqi","Asia/Ust-Nera","Asia/Vientiane","Asia/Vladivostok","Asia/Yakutsk","Asia/Yekaterinburg","Asia/Yerevan","Atlantic/Azores","Atlantic/Bermuda","Atlantic/Canary","Atlantic/Cape_Verde","Atlantic/Faeroe","Atlantic/Madeira","Atlantic/Reykjavik","Atlantic/South_Georgia","Atlantic/St_Helena","Atlantic/Stanley","Australia/Adelaide","Australia/Brisbane","Australia/Broken_Hill","Australia/Currie","Australia/Darwin","Australia/Eucla","Australia/Hobart","Australia/Lindeman","Australia/Lord_Howe","Australia/Melbourne","Australia/Perth","Australia/Sydney","Europe/Amsterdam","Europe/Andorra","Europe/Astrakhan","Europe/Athens","Europe/Belgrade","Europe/Berlin","Europe/Bratislava","Europe/Brussels","Europe/Bucharest","Europe/Budapest","Europe/Busingen","Europe/Chisinau","Europe/Copenhagen","Europe/Dublin","Europe/Gibraltar","Europe/Guernsey","Europe/Helsinki","Europe/Isle_of_Man","Europe/Istanbul","Europe/Jersey","Europe/Kaliningrad","Europe/Kiev","Europe/Kirov","Europe/Lisbon","Europe/Ljubljana","Europe/London","Europe/Luxembourg","Europe/Madrid","Europe/Malta","Europe/Mariehamn","Europe/Minsk","Europe/Monaco","Europe/Moscow","Europe/Oslo","Europe/Paris","Europe/Podgorica","Europe/Prague","Europe/Riga","Europe/Rome","Europe/Samara","Europe/San_Marino","Europe/Sarajevo","Europe/Saratov","Europe/Simferopol","Europe/Skopje","Europe/Sofia","Europe/Stockholm","Europe/Tallinn","Europe/Tirane","Europe/Ulyanovsk","Europe/Uzhgorod","Europe/Vaduz","Europe/Vatican","Europe/Vienna","Europe/Vilnius","Europe/Volgograd","Europe/Warsaw","Europe/Zagreb","Europe/Zaporozhye","Europe/Zurich","Indian/Antananarivo","Indian/Chagos","Indian/Christmas","Indian/Cocos","Indian/Comoro","Indian/Kerguelen","Indian/Mahe","Indian/Maldives","Indian/Mauritius","Indian/Mayotte","Indian/Reunion","Pacific/Apia","Pacific/Auckland","Pacific/Bougainville","Pacific/Chatham","Pacific/Easter","Pacific/Efate","Pacific/Enderbury","Pacific/Fakaofo","Pacific/Fiji","Pacific/Funafuti","Pacific/Galapagos","Pacific/Gambier","Pacific/Guadalcanal","Pacific/Guam","Pacific/Honolulu","Pacific/Johnston","Pacific/Kiritimati","Pacific/Kosrae","Pacific/Kwajalein","Pacific/Majuro","Pacific/Marquesas","Pacific/Midway","Pacific/Nauru","Pacific/Niue","Pacific/Norfolk","Pacific/Noumea","Pacific/Pago_Pago","Pacific/Palau","Pacific/Pitcairn","Pacific/Ponape","Pacific/Port_Moresby","Pacific/Rarotonga","Pacific/Saipan","Pacific/Tahiti","Pacific/Tarawa","Pacific/Tongatapu","Pacific/Truk","Pacific/Wake","Pacific/Wallis"],Nt=[{long:"years",short:"y",possible:"year"},{long:"weeks",short:"w",possible:"week"},{long:"days",short:"d",possible:"day"},{long:"hours",short:"h",possible:"hour"},{long:"minutes",short:"m",possible:"min"},{long:"seconds",short:"s",possible:"sec"},{long:"milliseconds",short:"ms",possible:"millisecond"}],Tt=Nt.map((e=>e.short)),Pt=e=>{let t=(n=e,Math.round(1e3*n)/1e3);var n;const r=Math.round(e);e>=100&&(t=r-r%10),e<100&&e>=10&&(t=r-r%5),e<10&&e>=1&&(t=r),e<1&&e>.01&&(t=Math.round(40*e)/40);const a=(e=>zt(o().duration(e,"seconds").asMilliseconds()))(t||.001);return a.replace(/\s/g,"")},Dt=e=>{const t=e.match(/\d+/g),n=e.match(/[a-zA-Z]+/g);if(n&&t&&Tt.includes(n[0]))return{[n[0]]:t[0]}},Ot=(e,t)=>Pt(e/(t?St:xt)),Rt=(e,t)=>{const n=(t||o()().toDate()).valueOf()/1e3,r=(e=>{const t=Nt.map((e=>e.short)).join("|"),n=new RegExp("\\d+(\\.\\d+)?[".concat(t,"]+"),"g"),r=(e.match(n)||[]).reduce(((e,t)=>{const n=Dt(t);return n?{...e,...n}:{...e}}),{});return o().duration(r).asSeconds()})(e);return{start:n-r,end:n,step:Ot(r),date:Lt(t||o()().toDate())}},Lt=e=>o().tz(e).utc().format(kt),It=e=>o().tz(e).format(kt),zt=e=>{const t=Math.floor(e%1e3),n=Math.floor(e/1e3%60),r=Math.floor(e/1e3/60%60),o=Math.floor(e/1e3/3600%24),a=Math.floor(e/864e5),i=["d","h","m","s","ms"],l=[a,o,r,n,t].map(((e,t)=>e?"".concat(e).concat(i[t]):""));return l.filter((e=>e)).join("")},jt=e=>{const t=o()(1e3*e);return t.isValid()?t.toDate():new Date},$t="logs"===Ue.logs,Ft=[{title:"Last 5 minutes",duration:"5m",isDefault:$t},{title:"Last 15 minutes",duration:"15m"},{title:"Last 30 minutes",duration:"30m",isDefault:!$t},{title:"Last 1 hour",duration:"1h"},{title:"Last 3 hours",duration:"3h"},{title:"Last 6 hours",duration:"6h"},{title:"Last 12 hours",duration:"12h"},{title:"Last 24 hours",duration:"24h"},{title:"Last 2 days",duration:"2d"},{title:"Last 7 days",duration:"7d"},{title:"Last 30 days",duration:"30d"},{title:"Last 90 days",duration:"90d"},{title:"Last 180 days",duration:"180d"},{title:"Last 1 year",duration:"1y"},{title:"Yesterday",duration:"1d",until:()=>o()().tz().subtract(1,"day").endOf("day").toDate()},{title:"Today",duration:"1d",until:()=>o()().tz().endOf("day").toDate()}].map((e=>({id:e.title.replace(/\s/g,"_").toLocaleLowerCase(),until:e.until?e.until:()=>o()().tz().toDate(),...e}))),Ht=e=>{var t;let{relativeTimeId:n,defaultDuration:r,defaultEndInput:o}=e;const a=null===(t=Ft.find((e=>e.isDefault)))||void 0===t?void 0:t.id,i=n||et("g0.relative_time",a),l=Ft.find((e=>e.id===i));return{relativeTimeId:l?i:"none",duration:l?l.duration:r,endInput:l?l.until():o}},Vt=e=>{const t=o()().tz(e);return"UTC".concat(t.format("Z"))},Bt=function(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:"";const t=new RegExp(e,"i");return Mt.reduce(((n,r)=>{const o=(r.match(/^(.*?)\//)||[])[1]||"unknown",a=Vt(r),i=a.replace(/UTC|0/,""),l=r.replace(/[/_]/g," "),s={region:r,utc:a,search:"".concat(r," ").concat(a," ").concat(l," ").concat(i)},c=!e||e&&t.test(s.search);return c&&n[o]?n[o].push(s):c&&(n[o]=[s]),n}),{})},Ut=e=>{o().tz.setDefault(e)},Yt=()=>{const e=o().tz.guess(),t=(e=>{try{return o()().tz(e),!0}catch(zd){return!1}})(e);return{isValid:t,title:t?"Browser Time (".concat(e,")"):"Browser timezone (UTC)",region:t?e:"UTC"}},Wt=We("TIMEZONE")||Yt().region;Ut(Wt);const qt={...(()=>{const e=et("g0.range_input"),{duration:t,endInput:n,relativeTimeId:r}=Ht({defaultDuration:e||"1h",defaultEndInput:(a=et("g0.end_input",o()().utc().format(kt)),o()(a).utcOffset(0,!0).toDate()),relativeTimeId:e?et("g0.relative_time","none"):void 0});var a;return{duration:t,period:Rt(t,n),relativeTime:r}})(),timezone:Wt};function Zt(e,t){switch(t.type){case"SET_TIME_STATE":return{...e,...t.payload};case"SET_DURATION":return{...e,duration:t.payload,period:Rt(t.payload,jt(e.period.end)),relativeTime:"none"};case"SET_RELATIVE_TIME":return{...e,duration:t.payload.duration,period:Rt(t.payload.duration,t.payload.until),relativeTime:t.payload.id};case"SET_PERIOD":const n=(e=>{const t=e.to.valueOf()-e.from.valueOf();return zt(t)})(t.payload);return{...e,duration:n,period:Rt(n,t.payload.to),relativeTime:"none"};case"RUN_QUERY":const{duration:r,endInput:o}=Ht({relativeTimeId:e.relativeTime,defaultDuration:e.duration,defaultEndInput:jt(e.period.end)});return{...e,period:Rt(r,o)};case"RUN_QUERY_TO_NOW":return{...e,period:Rt(e.duration)};case"SET_TIMEZONE":return Ut(t.payload),Ye("TIMEZONE",t.payload),e.defaultTimezone&&Ye("DISABLED_DEFAULT_TIMEZONE",t.payload!==e.defaultTimezone),{...e,timezone:t.payload};case"SET_DEFAULT_TIMEZONE":return{...e,defaultTimezone:t.payload};default:throw new Error}}const Kt=(0,t.createContext)({}),Gt=()=>(0,t.useContext)(Kt).state,Qt=()=>(0,t.useContext)(Kt).dispatch,Jt=e=>{const t=e.map((e=>e.values[e.index])),n=(e=>{const t=We(e);return t?JSON.parse(t):[]})("QUERY_HISTORY");n[0]||(n[0]=[]);const r=n[0];t.forEach((e=>{!r.includes(e)&&e&&r.unshift(e),r.length>250&&r.shift()})),Ye("QUERY_HISTORY",JSON.stringify(n))},Xt=50,en=1e3,tn=1e3;const nn=(()=>{var e;const t=(null===(e=(window.location.hash.split("?")[1]||"").match(/g\d+\.expr/g))||void 0===e?void 0:e.length)||1;return new Array(t>10?10:t).fill(1).map(((e,t)=>et("g".concat(t,".expr"),"")))})(),rn={query:nn,queryHistory:nn.map((e=>({index:0,values:[e]}))),autocomplete:We("AUTOCOMPLETE")||!1,autocompleteQuick:!1,autocompleteCache:new class{constructor(){this.maxSize=void 0,this.map=void 0,this.maxSize=tn,this.map=new Map}get(e){for(const[t,n]of this.map){const r=JSON.parse(t),o=r.start===e.start&&r.end===e.end,a=r.type===e.type,i=e.value&&r.value&&e.value.includes(r.value),l=r.match===e.match||i,s=n.length=this.maxSize){const e=this.map.keys().next().value;this.map.delete(e)}this.map.set(JSON.stringify(e),t)}},metricsQLFunctions:[]};function on(e,t){switch(t.type){case"SET_QUERY":return{...e,query:t.payload.map((e=>e))};case"SET_QUERY_HISTORY":return Jt(t.payload),{...e,queryHistory:t.payload};case"SET_QUERY_HISTORY_BY_INDEX":return e.queryHistory.splice(t.payload.queryNumber,1,t.payload.value),{...e,queryHistory:e.queryHistory};case"TOGGLE_AUTOCOMPLETE":return Ye("AUTOCOMPLETE",!e.autocomplete),{...e,autocomplete:!e.autocomplete};case"SET_AUTOCOMPLETE_QUICK":return{...e,autocompleteQuick:t.payload};case"SET_AUTOCOMPLETE_CACHE":return e.autocompleteCache.put(t.payload.key,t.payload.value),{...e};case"SET_METRICSQL_FUNCTIONS":return{...e,metricsQLFunctions:t.payload};default:throw new Error}}const an=(0,t.createContext)({}),ln=()=>(0,t.useContext)(an).state,sn=()=>(0,t.useContext)(an).dispatch,cn=()=>mt("svg",{viewBox:"0 0 74 24",fill:"currentColor",children:mt("path",{d:"M6.12 10.48c.36.28.8.43 1.26.43h.05c.48 0 .96-.19 1.25-.44 1.5-1.28 5.88-5.29 5.88-5.29C15.73 4.1 12.46 3.01 7.43 3h-.06C2.33 3-.93 4.1.24 5.18c0 0 4.37 4 5.88 5.3Zm2.56 2.16c-.36.28-.8.44-1.26.45h-.04c-.46 0-.9-.17-1.26-.45-1.04-.88-4.74-4.22-6.12-5.5v1.94c0 .21.08.5.22.63l.07.06c1.05.96 4.55 4.16 5.83 5.25.36.28.8.43 1.26.44h.04c.49-.02.96-.2 1.26-.44 1.3-1.11 4.94-4.45 5.88-5.31.15-.14.23-.42.23-.63V7.15a454.94 454.94 0 0 1-6.11 5.5Zm-1.26 4.99c.46 0 .9-.16 1.26-.44a454.4 454.4 0 0 0 6.1-5.5v1.94c0 .2-.07.48-.22.62-.94.87-4.57 4.2-5.88 5.3-.3.26-.77.44-1.26.45h-.04c-.46 0-.9-.16-1.26-.44-1.2-1.02-4.38-3.92-5.62-5.06l-.28-.25c-.14-.14-.22-.42-.22-.62v-1.94c1.38 1.26 5.08 4.6 6.12 5.5.36.28.8.43 1.26.44h.04ZM35 5l-5.84 14.46h-2.43L20.89 5h2.16a.9.9 0 0 1 .9.61l3.41 8.82a18.8 18.8 0 0 1 .62 2.02 19.44 19.44 0 0 1 .57-2.02l3.39-8.82c.05-.15.16-.3.31-.42a.9.9 0 0 1 .58-.19H35Zm17.18 0v14.46H49.8v-9.34c0-.37.02-.78.06-1.21l-4.37 8.21c-.21.4-.53.59-.95.59h-.38c-.43 0-.75-.2-.95-.59L38.8 8.88a22.96 22.96 0 0 1 .07 1.24v9.34H36.5V5h2.03l.3.01c.1 0 .17.02.24.05.07.03.13.07.19.13a1 1 0 0 1 .17.24l4.33 8.03a16.97 16.97 0 0 1 .6 1.36 14.34 14.34 0 0 1 .6-1.38l4.28-8.01c.05-.1.1-.18.17-.24.06-.06.12-.1.19-.13a.9.9 0 0 1 .24-.05l.3-.01h2.04Zm8.88 13.73a4.5 4.5 0 0 0 1.82-.35 3.96 3.96 0 0 0 2.22-2.47c.2-.57.3-1.19.3-1.85V5.31h1.02v8.75c0 .78-.12 1.51-.37 2.19a4.88 4.88 0 0 1-2.76 2.95c-.66.29-1.4.43-2.23.43-.82 0-1.57-.14-2.24-.43a5.01 5.01 0 0 1-2.75-2.95 6.37 6.37 0 0 1-.37-2.19V5.31h1.03v8.74c0 .66.1 1.28.3 1.85a3.98 3.98 0 0 0 2.21 2.47c.53.24 1.14.36 1.82.36Zm10.38.73h-1.03V5.31h1.03v14.15Z"})}),un=()=>mt("svg",{viewBox:"0 0 85 38",fill:"currentColor",children:[mt("path",{d:"M11.12 10.48c.36.28.8.43 1.26.43h.05c.48 0 .96-.19 1.25-.44 1.5-1.28 5.88-5.29 5.88-5.29 1.17-1.09-2.1-2.17-7.13-2.18h-.06c-5.04 0-8.3 1.1-7.13 2.18 0 0 4.37 4 5.88 5.3Zm2.56 2.16c-.36.28-.8.44-1.26.45h-.04c-.46 0-.9-.17-1.26-.45-1.04-.88-4.74-4.22-6.12-5.5v1.94c0 .21.08.5.22.63l.07.06c1.05.96 4.55 4.16 5.83 5.25.36.28.8.43 1.26.44h.04c.49-.02.96-.2 1.26-.44 1.3-1.11 4.94-4.45 5.88-5.31.15-.14.23-.42.23-.63V7.15a455.13 455.13 0 0 1-6.11 5.5Zm-1.26 4.99c.46 0 .9-.16 1.26-.44 2.05-1.82 4.09-3.65 6.1-5.5v1.94c0 .2-.07.48-.22.62-.94.87-4.57 4.2-5.88 5.3-.3.26-.77.44-1.26.45h-.04c-.46 0-.9-.16-1.26-.44-1.2-1.02-4.38-3.92-5.62-5.06l-.28-.25c-.14-.14-.22-.42-.22-.62v-1.94c1.38 1.26 5.08 4.6 6.12 5.5.36.28.8.43 1.26.44h.04ZM40 5l-5.84 14.46h-2.43L25.89 5h2.16a.9.9 0 0 1 .9.61l3.41 8.82a18.8 18.8 0 0 1 .62 2.02 19.44 19.44 0 0 1 .57-2.02l3.39-8.82c.05-.15.16-.3.31-.42a.9.9 0 0 1 .58-.19H40Zm17.18 0v14.46H54.8v-9.34c0-.37.02-.78.06-1.21l-4.37 8.21c-.21.4-.53.59-.95.59h-.38c-.43 0-.75-.2-.95-.59L43.8 8.88a22.96 22.96 0 0 1 .07 1.24v9.34H41.5V5h2.03l.3.01c.1 0 .17.02.24.05.07.03.13.07.19.13a1 1 0 0 1 .17.24l4.33 8.03a16.97 16.97 0 0 1 .6 1.36 14.34 14.34 0 0 1 .6-1.38l4.28-8.01c.05-.1.1-.18.17-.24.06-.06.12-.1.19-.13a.9.9 0 0 1 .24-.05l.3-.01h2.04Zm8.88 13.73a4.5 4.5 0 0 0 1.82-.35 3.96 3.96 0 0 0 2.22-2.47c.2-.57.3-1.19.3-1.85V5.31h1.02v8.75c0 .78-.12 1.51-.37 2.19a4.88 4.88 0 0 1-2.76 2.95c-.66.29-1.4.43-2.23.43-.82 0-1.57-.14-2.24-.43a5.01 5.01 0 0 1-2.75-2.95 6.37 6.37 0 0 1-.37-2.19V5.31h1.03v8.74c0 .66.1 1.28.3 1.85a3.98 3.98 0 0 0 2.21 2.47c.53.24 1.14.36 1.82.36Zm10.38.73h-1.03V5.31h1.03v14.15ZM1.73 36v-5.17l-.67-.07a.6.6 0 0 1-.21-.1.23.23 0 0 1-.08-.18v-.44h.96v-.59c0-.34.05-.65.14-.92a1.79 1.79 0 0 1 1.08-1.11 2.45 2.45 0 0 1 1.62-.02l-.03.53c0 .1-.06.15-.16.16H4c-.18 0-.35.03-.5.08a.95.95 0 0 0-.39.23c-.1.11-.19.25-.25.43-.05.18-.08.4-.08.65v.56h1.75v.78H2.8V36H1.73Zm6.17-6.17c.45 0 .85.07 1.2.22a2.57 2.57 0 0 1 1.5 1.62c.13.38.2.81.2 1.29s-.07.91-.2 1.3a2.57 2.57 0 0 1-1.49 1.61c-.36.14-.76.21-1.2.21-.45 0-.86-.07-1.22-.21a2.57 2.57 0 0 1-1.5-1.62c-.12-.38-.19-.81-.19-1.3 0-.47.07-.9.2-1.28a2.57 2.57 0 0 1 1.5-1.62c.35-.15.76-.22 1.2-.22Zm0 5.42c.6 0 1.05-.2 1.35-.6.3-.4.44-.97.44-1.69s-.15-1.28-.44-1.69c-.3-.4-.75-.6-1.35-.6-.3 0-.57.05-.8.15-.22.1-.4.26-.56.45-.15.2-.26.44-.33.73-.08.28-.11.6-.11.96 0 .72.15 1.29.44 1.69.3.4.76.6 1.36.6Zm5.26-4.11c.2-.42.43-.74.71-.97.28-.24.62-.36 1.03-.36.13 0 .25.02.36.05.12.02.23.07.32.13l-.08.8c-.02.1-.08.15-.18.15l-.24-.04a1.7 1.7 0 0 0-.88.05c-.15.05-.29.14-.4.25-.12.1-.23.24-.32.4-.1.17-.18.35-.26.56V36h-1.07v-6.08h.61c.12 0 .2.02.24.07.05.04.08.12.1.23l.06.92Zm13.73-3.82L23.39 36h-1.46l-3.5-8.68h1.29a.54.54 0 0 1 .54.37l2.04 5.3a11.31 11.31 0 0 1 .37 1.21 11.65 11.65 0 0 1 .35-1.22l2.03-5.29c.03-.1.1-.18.19-.25.1-.08.21-.12.35-.12h1.3Zm2.2 2.52V36H27.6v-6.16h1.49Zm.2-1.79c0 .13-.02.25-.08.36a1 1 0 0 1-.51.5.96.96 0 0 1-.73 0 1.02 1.02 0 0 1-.5-.5.96.96 0 0 1 0-.73.93.93 0 0 1 .86-.58.9.9 0 0 1 .37.08c.12.05.22.11.3.2a.94.94 0 0 1 .3.67Zm5.72 3.1a.68.68 0 0 1-.13.13c-.04.03-.1.05-.18.05a.42.42 0 0 1-.22-.07 3.95 3.95 0 0 0-.62-.31c-.14-.05-.3-.07-.51-.07-.26 0-.5.04-.69.14-.2.1-.36.23-.49.4-.13.18-.22.4-.29.64-.06.25-.1.53-.1.85 0 .33.04.62.1.88.08.25.18.47.32.64.13.18.29.3.48.4.18.09.4.13.63.13a1.6 1.6 0 0 0 .94-.27l.26-.2a.4.4 0 0 1 .25-.09.3.3 0 0 1 .27.14l.43.54a2.76 2.76 0 0 1-1.77.96c-.22.03-.43.05-.65.05a2.57 2.57 0 0 1-1.96-.83c-.25-.28-.45-.6-.6-1-.14-.4-.21-.85-.21-1.35 0-.45.06-.87.2-1.25a2.61 2.61 0 0 1 1.51-1.67c.37-.16.8-.24 1.28-.24.46 0 .86.07 1.2.22.35.15.66.36.94.64l-.4.54Zm3.43 4.95c-.54 0-.95-.15-1.24-.45-.28-.3-.42-.73-.42-1.26v-3.44h-.63a.29.29 0 0 1-.2-.07c-.06-.06-.09-.13-.09-.24v-.59l.99-.16.31-1.68a.33.33 0 0 1 .12-.18.34.34 0 0 1 .21-.07h.77v1.94h1.64v1.05h-1.64v3.34c0 .2.05.34.14.45.1.1.22.16.39.16a.73.73 0 0 0 .39-.1l.12-.07a.2.2 0 0 1 .11-.03c.05 0 .08.01.11.03l.09.1.44.72c-.21.18-.46.32-.74.4-.28.1-.57.15-.87.15Zm5.09-6.35c.46 0 .87.07 1.24.22a2.7 2.7 0 0 1 1.58 1.63c.14.39.22.83.22 1.31 0 .49-.08.93-.22 1.32-.14.4-.35.73-.62 1-.26.28-.58.49-.96.64-.37.15-.78.22-1.24.22a3.4 3.4 0 0 1-1.25-.22 2.71 2.71 0 0 1-1.59-1.64 3.8 3.8 0 0 1-.21-1.32c0-.48.07-.92.21-1.31a2.75 2.75 0 0 1 1.58-1.63c.38-.15.8-.22 1.26-.22Zm0 5.2c.51 0 .89-.17 1.13-.52.25-.34.38-.84.38-1.5a2.6 2.6 0 0 0-.38-1.53c-.24-.34-.62-.52-1.13-.52-.52 0-.9.18-1.16.53-.25.35-.37.85-.37 1.51s.12 1.17.37 1.51c.25.35.64.52 1.16.52Zm5.56-4.04c.2-.37.42-.65.69-.86.26-.21.57-.32.94-.32.28 0 .5.06.68.19l-.1 1.1a.3.3 0 0 1-.09.16.24.24 0 0 1-.15.04 1.8 1.8 0 0 1-.27-.03 2.01 2.01 0 0 0-.34-.03c-.16 0-.3.03-.44.08a1.1 1.1 0 0 0-.34.2c-.1.1-.2.2-.27.33-.08.13-.15.27-.22.44V36H47.7v-6.16h.87c.15 0 .26.03.31.09.06.05.1.15.13.29l.09.7Zm4.62-1.07V36h-1.49v-6.16h1.49Zm.2-1.79c0 .13-.02.25-.07.36a1 1 0 0 1-.51.5.96.96 0 0 1-.74 0 1.02 1.02 0 0 1-.5-.5.96.96 0 0 1 0-.73.93.93 0 0 1 .86-.58.9.9 0 0 1 .38.08c.11.05.21.11.3.2a.94.94 0 0 1 .28.67Zm4.56 5.32a7.8 7.8 0 0 0-1.08.12c-.29.05-.52.12-.7.2a.92.92 0 0 0-.38.3.64.64 0 0 0-.11.36c0 .26.07.45.23.56.15.11.35.17.6.17.3 0 .57-.06.79-.17.22-.1.44-.28.65-.5v-1.04Zm-3.4-2.67c.71-.65 1.57-.97 2.56-.97.36 0 .68.06.97.18a1.99 1.99 0 0 1 1.16 1.24c.1.3.16.61.16.96V36h-.67a.7.7 0 0 1-.33-.06c-.07-.04-.13-.13-.18-.26l-.13-.44c-.16.14-.3.26-.46.37a2.8 2.8 0 0 1-.97.43 2.77 2.77 0 0 1-1.32-.05 1.62 1.62 0 0 1-.57-.31 1.41 1.41 0 0 1-.38-.53 1.85 1.85 0 0 1-.05-1.18c.05-.16.14-.3.25-.45.12-.14.28-.27.46-.4a3 3 0 0 1 .7-.32 9.19 9.19 0 0 1 2.2-.33v-.36c0-.41-.09-.71-.26-.91-.18-.2-.43-.3-.76-.3a1.84 1.84 0 0 0-1.02.28l-.33.18c-.1.06-.2.09-.32.09-.1 0-.2-.03-.27-.08a.72.72 0 0 1-.17-.2l-.26-.47Zm11.49 4.32V36h-4.88v-8.6h1.16v7.62h3.72Zm3.16-5.2c.44 0 .84.08 1.2.23a2.57 2.57 0 0 1 1.49 1.62c.13.38.2.81.2 1.29s-.07.91-.2 1.3a2.57 2.57 0 0 1-1.49 1.61c-.36.14-.76.21-1.2.21-.45 0-.85-.07-1.21-.21a2.57 2.57 0 0 1-1.5-1.62c-.13-.38-.2-.81-.2-1.3 0-.47.07-.9.2-1.28.14-.39.33-.72.59-1 .25-.26.55-.47.9-.62.37-.15.77-.22 1.22-.22Zm0 5.43c.6 0 1.05-.2 1.34-.6.3-.4.45-.97.45-1.69s-.15-1.28-.45-1.69c-.3-.4-.74-.6-1.34-.6-.3 0-.57.05-.8.15-.22.1-.4.26-.56.45-.15.2-.26.44-.34.73-.07.28-.1.6-.1.96 0 .72.14 1.29.44 1.69.3.4.75.6 1.36.6Zm6.33-2.22c.22 0 .4-.03.57-.09.16-.06.3-.14.41-.25.12-.11.2-.24.26-.39.05-.15.08-.31.08-.5 0-.37-.11-.66-.34-.88-.23-.22-.55-.33-.98-.33-.43 0-.76.1-.99.33-.22.22-.34.51-.34.89 0 .18.03.34.09.5a1.1 1.1 0 0 0 .67.63c.16.06.35.09.57.09Zm1.93 3.3a.51.51 0 0 0-.13-.36.84.84 0 0 0-.34-.22 8.57 8.57 0 0 0-1.73-.2 7.5 7.5 0 0 1-.62-.05c-.23.1-.41.23-.56.4a.8.8 0 0 0-.1.92c.07.12.18.22.32.3.14.1.32.16.54.21a3.5 3.5 0 0 0 1.55 0c.23-.05.42-.12.57-.22.16-.1.29-.21.37-.34a.8.8 0 0 0 .13-.44Zm1.08-6.17v.4c0 .13-.08.21-.25.25l-.69.09c.14.26.2.56.2.88a1.86 1.86 0 0 1-1.36 1.82 3.07 3.07 0 0 1-1.72.04c-.12.08-.22.16-.29.25a.44.44 0 0 0-.1.27c0 .15.06.26.17.33.12.08.28.13.47.16a5 5 0 0 0 .66.06 16.56 16.56 0 0 1 1.5.13c.26.05.48.12.67.22.19.1.34.24.46.41.12.18.18.4.18.69 0 .26-.07.5-.2.75s-.31.46-.56.65c-.24.2-.54.34-.9.46a4.57 4.57 0 0 1-2.36.04c-.33-.09-.6-.2-.82-.36a1.56 1.56 0 0 1-.5-.51c-.1-.2-.16-.4-.16-.6 0-.3.1-.56.28-.77.19-.2.45-.37.77-.5a1.15 1.15 0 0 1-.43-.32.88.88 0 0 1-.15-.54c0-.09.01-.18.04-.27.04-.1.08-.2.15-.28a1.55 1.55 0 0 1 .58-.5c-.3-.16-.53-.39-.7-.66-.17-.28-.25-.6-.25-.97 0-.3.05-.57.16-.8.12-.25.28-.46.48-.63.2-.17.45-.3.73-.4a3 3 0 0 1 2.3.21h1.64Zm4.65.76a.24.24 0 0 1-.23.14.42.42 0 0 1-.2-.07 3.59 3.59 0 0 0-.67-.3 1.8 1.8 0 0 0-1.03 0c-.14.05-.27.11-.37.2a.87.87 0 0 0-.23.27.75.75 0 0 0-.08.35c0 .15.04.28.13.39.1.1.21.19.36.27.15.07.32.14.5.2a13.63 13.63 0 0 1 1.16.4c.2.08.36.18.5.3a1.33 1.33 0 0 1 .5 1.07 2 2 0 0 1-.15.78c-.1.24-.25.44-.45.62-.2.17-.43.3-.72.4a3.1 3.1 0 0 1-2.14-.05 2.97 2.97 0 0 1-.87-.53l.25-.41c.04-.05.07-.1.12-.12a.3.3 0 0 1 .17-.04.4.4 0 0 1 .22.08l.3.19a1.91 1.91 0 0 0 1.03.27c.2 0 .38-.03.54-.08.16-.06.29-.13.4-.22a.96.96 0 0 0 .3-.7c0-.17-.05-.31-.14-.42-.09-.11-.2-.2-.36-.28a2.6 2.6 0 0 0-.5-.2l-.59-.19c-.2-.06-.39-.14-.58-.22a2.14 2.14 0 0 1-.5-.3 1.45 1.45 0 0 1-.36-.46c-.1-.19-.14-.41-.14-.67a1.6 1.6 0 0 1 .57-1.23c.18-.16.4-.3.68-.39.26-.1.57-.14.91-.14a2.84 2.84 0 0 1 1.9.7l-.23.4Z"}),mt("defs",{children:mt("path",{d:"M0 0h85v38H0z"})})]}),dn=()=>mt("svg",{viewBox:"0 0 85 38",fill:"currentColor",children:mt("path",{d:"M11.118 10.476c.36.28.801.433 1.257.436h.052c.48-.007.961-.192 1.25-.444 1.509-1.279 5.88-5.287 5.88-5.287 1.168-1.087-2.093-2.174-7.13-2.181h-.06c-5.036.007-8.298 1.094-7.13 2.181 0 0 4.372 4.008 5.88 5.295zm2.559 2.166c-.359.283-.801.439-1.258.444h-.044a2.071 2.071 0 0 1-1.257-.444C10.082 11.755 6.384 8.42 5 7.148v1.93c0 .215.081.496.222.629l.07.064c1.045.955 4.546 4.154 5.825 5.245.358.283.8.438 1.257.444h.044c.489-.015.962-.2 1.258-.444 1.309-1.11 4.948-4.444 5.887-5.31.148-.132.222-.413.222-.628v-1.93a455.127 455.127 0 0 1-6.11 5.494zm-1.258 4.984a2.071 2.071 0 0 0 1.258-.436c2.053-1.815 4.09-3.65 6.11-5.502v1.938c0 .207-.075.488-.223.621-.94.873-4.578 4.2-5.887 5.31-.296.25-.77.436-1.258.443h-.044a2.071 2.071 0 0 1-1.257-.436c-1.204-1.027-4.376-3.928-5.616-5.062l-.28-.255c-.14-.133-.221-.414-.221-.621v-1.938c1.383 1.265 5.081 4.607 6.117 5.495.358.282.8.438 1.257.443h.044zM40 5l-5.84 14.46h-2.43L25.89 5h2.16c.233 0 .423.057.57.17.146.113.256.26.33.44l3.41 8.82c.113.287.22.603.32.95.106.34.206.697.3 1.07.08-.373.166-.73.26-1.07a8.84 8.84 0 0 1 .31-.95l3.39-8.82a.959.959 0 0 1 .31-.42.906.906 0 0 1 .58-.19H40zm17.176 0v14.46h-2.37v-9.34c0-.373.02-.777.06-1.21l-4.37 8.21c-.206.393-.523.59-.95.59h-.38c-.426 0-.743-.197-.95-.59l-4.42-8.24c.02.22.037.437.05.65.014.213.02.41.02.59v9.34h-2.37V5h2.03c.12 0 .224.003.31.01a.778.778 0 0 1 .23.05c.074.027.137.07.19.13.06.06.117.14.17.24l4.33 8.03c.114.213.217.433.31.66.1.227.197.46.29.7.094-.247.19-.483.29-.71.1-.233.207-.457.32-.67l4.27-8.01c.054-.1.11-.18.17-.24a.57.57 0 0 1 .19-.13.903.903 0 0 1 .24-.05c.087-.007.19-.01.31-.01h2.03zm8.887 13.73c.68 0 1.286-.117 1.82-.35.54-.24.996-.57 1.37-.99a4.28 4.28 0 0 0 .85-1.48c.2-.573.3-1.19.3-1.85V5.31h1.02v8.75c0 .78-.124 1.51-.37 2.19a5.248 5.248 0 0 1-1.07 1.77c-.46.5-1.024.893-1.69 1.18-.66.287-1.404.43-2.23.43-.827 0-1.574-.143-2.24-.43a5.012 5.012 0 0 1-1.69-1.18 5.33 5.33 0 0 1-1.06-1.77 6.373 6.373 0 0 1-.37-2.19V5.31h1.03v8.74c0 .66.096 1.277.29 1.85.2.567.483 1.06.85 1.48.373.42.826.75 1.36.99.54.24 1.15.36 1.83.36zm10.38.73h-1.03V5.31h1.03v14.15zM4.242 35v-5.166l-.672-.078a.595.595 0 0 1-.21-.09.23.23 0 0 1-.078-.186v-.438h.96v-.588c0-.348.048-.656.144-.924.1-.272.24-.5.42-.684a1.79 1.79 0 0 1 .66-.426c.256-.096.544-.144.864-.144.272 0 .522.04.75.12l-.024.534c-.008.096-.062.148-.162.156a4.947 4.947 0 0 1-.39.012c-.184 0-.352.024-.504.072a.949.949 0 0 0-.384.234c-.108.108-.192.25-.252.426a2.184 2.184 0 0 0-.084.654v.558h1.752v.774H5.316V35H4.242zM10.416 28.826a3.1 3.1 0 0 1 1.2.222c.356.148.66.358.912.63s.444.602.576.99c.136.384.204.814.204 1.29 0 .48-.068.912-.204 1.296a2.735 2.735 0 0 1-.576.984 2.572 2.572 0 0 1-.912.63 3.175 3.175 0 0 1-1.2.216c-.448 0-.852-.072-1.212-.216a2.572 2.572 0 0 1-.912-.63 2.805 2.805 0 0 1-.582-.984 3.972 3.972 0 0 1-.198-1.296c0-.476.066-.906.198-1.29.136-.388.33-.718.582-.99.252-.272.556-.482.912-.63.36-.148.764-.222 1.212-.222zm0 5.424c.6 0 1.048-.2 1.344-.6.296-.404.444-.966.444-1.686 0-.724-.148-1.288-.444-1.692-.296-.404-.744-.606-1.344-.606-.304 0-.57.052-.798.156a1.507 1.507 0 0 0-.564.45c-.148.196-.26.438-.336.726a3.941 3.941 0 0 0-.108.966c0 .72.148 1.282.444 1.686.3.4.754.6 1.362.6zM15.677 30.14c.192-.416.428-.74.708-.972.28-.236.622-.354 1.026-.354.128 0 .25.014.366.042.12.028.226.072.318.132l-.078.798c-.024.1-.084.15-.18.15-.056 0-.138-.012-.246-.036a1.694 1.694 0 0 0-.366-.036c-.192 0-.364.028-.516.084-.148.056-.282.14-.402.252a1.782 1.782 0 0 0-.318.408c-.092.16-.176.344-.252.552V35h-1.074v-6.078h.612c.116 0 .196.022.24.066.044.044.074.12.09.228l.072.924zM26.761 28.922 24.283 35h-.96l-2.478-6.078h.87a.33.33 0 0 1 .33.222l1.542 3.912c.048.148.09.292.126.432.036.14.07.28.102.42.032-.14.066-.28.102-.42.036-.14.08-.284.132-.432l1.56-3.912a.33.33 0 0 1 .12-.156.311.311 0 0 1 .198-.066h.834zM27.74 35v-6.078h.643c.152 0 .246.074.282.222l.078.624c.224-.276.476-.502.756-.678.28-.176.604-.264.972-.264.408 0 .738.114.99.342.256.228.44.536.552.924.088-.22.2-.41.336-.57a1.987 1.987 0 0 1 1.014-.624c.196-.048.394-.072.594-.072.32 0 .604.052.852.156.252.1.464.248.636.444.176.196.31.438.402.726.092.284.138.61.138.978V35H34.91v-3.87c0-.476-.104-.836-.312-1.08-.208-.248-.508-.372-.9-.372-.176 0-.344.032-.504.096-.156.06-.294.15-.414.27-.12.12-.216.272-.288.456-.068.18-.102.39-.102.63V35h-1.074v-3.87c0-.488-.098-.852-.294-1.092-.196-.24-.482-.36-.858-.36-.264 0-.508.072-.732.216a2.38 2.38 0 0 0-.618.576V35H27.74zM40.746 32.372c-.428.02-.788.058-1.08.114-.292.052-.526.12-.702.204a.923.923 0 0 0-.378.294.639.639 0 0 0-.114.366c0 .26.076.446.228.558.156.112.358.168.606.168.304 0 .566-.054.786-.162.224-.112.442-.28.654-.504v-1.038zm-3.396-2.67c.708-.648 1.56-.972 2.556-.972.36 0 .682.06.966.18.284.116.524.28.72.492.196.208.344.458.444.75.104.292.156.612.156.96V35h-.672a.708.708 0 0 1-.324-.06c-.076-.044-.136-.13-.18-.258l-.132-.444c-.156.14-.308.264-.456.372a2.804 2.804 0 0 1-.462.264c-.16.072-.332.126-.516.162-.18.04-.38.06-.6.06-.26 0-.5-.034-.72-.102a1.618 1.618 0 0 1-.57-.318 1.414 1.414 0 0 1-.372-.522 1.852 1.852 0 0 1-.132-.726 1.419 1.419 0 0 1 .33-.906c.12-.14.274-.272.462-.396s.418-.232.69-.324c.276-.092.596-.166.96-.222.364-.06.78-.096 1.248-.108v-.36c0-.412-.088-.716-.264-.912-.176-.2-.43-.3-.762-.3-.24 0-.44.028-.6.084-.156.056-.294.12-.414.192l-.33.186a.631.631 0 0 1-.324.084.439.439 0 0 1-.264-.078.716.716 0 0 1-.174-.192l-.264-.474zM44.974 29.6c.124-.124.254-.238.39-.342a2.395 2.395 0 0 1 .936-.444c.176-.044.368-.066.576-.066.336 0 .634.058.894.174.26.112.476.272.648.48.176.204.308.45.396.738.092.284.138.598.138.942V35H47.47v-3.918c0-.376-.086-.666-.258-.87-.172-.208-.434-.312-.786-.312-.256 0-.496.058-.72.174a2.58 2.58 0 0 0-.636.474V35h-1.482v-6.156h.906c.192 0 .318.09.378.27l.102.486zM53.085 28.748c.456 0 .87.074 1.242.222a2.692 2.692 0 0 1 1.578 1.626c.144.392.216.83.216 1.314 0 .488-.072.928-.216 1.32-.144.392-.35.726-.618 1.002a2.653 2.653 0 0 1-.96.636 3.333 3.333 0 0 1-1.242.222c-.46 0-.878-.074-1.254-.222a2.712 2.712 0 0 1-.966-.636 2.922 2.922 0 0 1-.618-1.002 3.807 3.807 0 0 1-.216-1.32c0-.484.072-.922.216-1.314.148-.392.354-.724.618-.996.268-.272.59-.482.966-.63a3.397 3.397 0 0 1 1.254-.222zm0 5.202c.512 0 .89-.172 1.134-.516.248-.344.372-.848.372-1.512s-.124-1.17-.372-1.518c-.244-.348-.622-.522-1.134-.522-.52 0-.906.176-1.158.528-.248.348-.372.852-.372 1.512s.124 1.164.372 1.512c.252.344.638.516 1.158.516zM57.252 35v-6.156h.906c.192 0 .318.09.378.27l.096.456c.108-.12.22-.23.336-.33a2.017 2.017 0 0 1 1.32-.492c.388 0 .706.106.954.318.252.208.44.486.564.834a1.93 1.93 0 0 1 .834-.882c.172-.092.354-.16.546-.204.196-.044.392-.066.588-.066.34 0 .642.052.906.156.264.104.486.256.666.456.18.2.316.444.408.732.096.288.144.618.144.99V35h-1.482v-3.918c0-.392-.086-.686-.258-.882-.172-.2-.424-.3-.756-.3-.152 0-.294.026-.426.078a1.026 1.026 0 0 0-.342.228 1.019 1.019 0 0 0-.228.366 1.435 1.435 0 0 0-.084.51V35h-1.488v-3.918c0-.412-.084-.712-.252-.9-.164-.188-.406-.282-.726-.282-.216 0-.418.054-.606.162a1.979 1.979 0 0 0-.516.432V35h-1.482zM70.558 32.372c-.428.02-.788.058-1.08.114-.292.052-.526.12-.702.204a.923.923 0 0 0-.378.294.639.639 0 0 0-.114.366c0 .26.076.446.228.558.156.112.358.168.606.168.304 0 .566-.054.786-.162.224-.112.442-.28.654-.504v-1.038zm-3.396-2.67c.708-.648 1.56-.972 2.556-.972.36 0 .682.06.966.18.284.116.524.28.72.492.196.208.344.458.444.75.104.292.156.612.156.96V35h-.672a.708.708 0 0 1-.324-.06c-.076-.044-.136-.13-.18-.258l-.132-.444c-.156.14-.308.264-.456.372a2.804 2.804 0 0 1-.462.264c-.16.072-.332.126-.516.162-.18.04-.38.06-.6.06-.26 0-.5-.034-.72-.102a1.618 1.618 0 0 1-.57-.318 1.414 1.414 0 0 1-.372-.522 1.852 1.852 0 0 1-.132-.726 1.419 1.419 0 0 1 .33-.906c.12-.14.274-.272.462-.396s.418-.232.69-.324c.276-.092.596-.166.96-.222.364-.06.78-.096 1.248-.108v-.36c0-.412-.088-.716-.264-.912-.176-.2-.43-.3-.762-.3-.24 0-.44.028-.6.084-.156.056-.294.12-.414.192l-.33.186a.631.631 0 0 1-.324.084.439.439 0 0 1-.264-.078.716.716 0 0 1-.174-.192l-.264-.474zM74.9 26.084V35h-1.482v-8.916H74.9zM81.969 28.844l-3.354 7.848a.538.538 0 0 1-.174.234c-.068.056-.174.084-.318.084h-1.104l1.152-2.472-2.49-5.694h1.302c.116 0 .206.028.27.084.068.056.118.12.15.192l1.308 3.192c.044.108.08.216.108.324.032.108.062.218.09.33a32.3 32.3 0 0 1 .108-.33c.036-.112.076-.222.12-.33l1.236-3.186a.437.437 0 0 1 .408-.276h1.188z"})}),hn=()=>mt("svg",{viewBox:"0 0 15 17",fill:"currentColor",children:mt("path",{d:"M6.11767 7.47586C6.47736 7.75563 6.91931 7.90898 7.37503 7.91213H7.42681C7.90756 7.90474 8.38832 7.71987 8.67677 7.46846C10.1856 6.18921 14.5568 2.18138 14.5568 2.18138C15.7254 1.09438 12.4637 0.00739 7.42681 0H7.36764C2.3308 0.00739 -0.930935 1.09438 0.237669 2.18138C0.237669 2.18138 4.60884 6.18921 6.11767 7.47586ZM8.67677 9.64243C8.31803 9.92483 7.87599 10.0808 7.41941 10.0861H7.37503C6.91845 10.0808 6.47641 9.92483 6.11767 9.64243C5.0822 8.75513 1.38409 5.42018 0.000989555 4.14832V6.07829C0.000989555 6.29273 0.0823481 6.57372 0.222877 6.70682L0.293316 6.7712L0.293344 6.77122C1.33784 7.72579 4.83903 10.9255 6.11767 12.0161C6.47641 12.2985 6.91845 12.4545 7.37503 12.4597H7.41941C7.90756 12.4449 8.38092 12.2601 8.67677 12.0161C9.9859 10.9069 13.6249 7.57198 14.5642 6.70682C14.7121 6.57372 14.7861 6.29273 14.7861 6.07829V4.14832C12.7662 5.99804 10.7297 7.82949 8.67677 9.64243ZM7.41941 14.6263C7.87513 14.6232 8.31708 14.4698 8.67677 14.19C10.7298 12.3746 12.7663 10.5407 14.7861 8.68853V10.6259C14.7861 10.8329 14.7121 11.1139 14.5642 11.247C13.6249 12.1196 9.9859 15.4471 8.67677 16.5563C8.38092 16.8077 7.90756 16.9926 7.41941 17H7.37503C6.91931 16.9968 6.47736 16.8435 6.11767 16.5637C4.91427 15.5373 1.74219 12.6364 0.502294 11.5025C0.393358 11.4029 0.299337 11.3169 0.222877 11.247C0.0823481 11.1139 0.000989555 10.8329 0.000989555 10.6259V8.68853C1.38409 9.95303 5.0822 13.2953 6.11767 14.1827C6.47641 14.4651 6.91845 14.6211 7.37503 14.6263H7.41941Z"})}),pn=()=>mt("svg",{viewBox:"0 0 24 24",fill:"currentColor",children:mt("path",{d:"M19.14 12.94c.04-.3.06-.61.06-.94 0-.32-.02-.64-.07-.94l2.03-1.58c.18-.14.23-.41.12-.61l-1.92-3.32c-.12-.22-.37-.29-.59-.22l-2.39.96c-.5-.38-1.03-.7-1.62-.94l-.36-2.54c-.04-.24-.24-.41-.48-.41h-3.84c-.24 0-.43.17-.47.41l-.36 2.54c-.59.24-1.13.57-1.62.94l-2.39-.96c-.22-.08-.47 0-.59.22L2.74 8.87c-.12.21-.08.47.12.61l2.03 1.58c-.05.3-.09.63-.09.94s.02.64.07.94l-2.03 1.58c-.18.14-.23.41-.12.61l1.92 3.32c.12.22.37.29.59.22l2.39-.96c.5.38 1.03.7 1.62.94l.36 2.54c.05.24.24.41.48.41h3.84c.24 0 .44-.17.47-.41l.36-2.54c.59-.24 1.13-.56 1.62-.94l2.39.96c.22.08.47 0 .59-.22l1.92-3.32c.12-.22.07-.47-.12-.61l-2.01-1.58zM12 15.6c-1.98 0-3.6-1.62-3.6-3.6s1.62-3.6 3.6-3.6 3.6 1.62 3.6 3.6-1.62 3.6-3.6 3.6z"})}),fn=()=>mt("svg",{viewBox:"0 0 24 24",fill:"currentColor",children:mt("path",{d:"M19 6.41 17.59 5 12 10.59 6.41 5 5 6.41 10.59 12 5 17.59 6.41 19 12 13.41 17.59 19 19 17.59 13.41 12z"})}),mn=()=>mt("svg",{viewBox:"0 0 24 24",fill:"currentColor",children:mt("path",{d:"M12 5V2L8 6l4 4V7c3.31 0 6 2.69 6 6 0 2.97-2.17 5.43-5 5.91v2.02c3.95-.49 7-3.85 7-7.93 0-4.42-3.58-8-8-8zm-6 8c0-1.65.67-3.15 1.76-4.24L6.34 7.34C4.9 8.79 4 10.79 4 13c0 4.08 3.05 7.44 7 7.93v-2.02c-2.83-.48-5-2.94-5-5.91z"})}),_n=()=>mt("svg",{viewBox:"0 0 24 24",fill:"currentColor",children:mt("path",{d:"M12 2C6.48 2 2 6.48 2 12s4.48 10 10 10 10-4.48 10-10S17.52 2 12 2zm1 15h-2v-6h2v6zm0-8h-2V7h2v2z"})}),gn=()=>mt("svg",{viewBox:"0 0 24 24",fill:"currentColor",children:mt("path",{d:"M1 21h22L12 2 1 21zm12-3h-2v-2h2v2zm0-4h-2v-4h2v4z"})}),vn=()=>mt("svg",{viewBox:"0 0 24 24",fill:"currentColor",children:mt("path",{d:"M12 2C6.48 2 2 6.48 2 12s4.48 10 10 10 10-4.48 10-10S17.52 2 12 2zm1 15h-2v-2h2v2zm0-4h-2V7h2v6z"})}),yn=()=>mt("svg",{viewBox:"0 0 24 24",fill:"currentColor",children:mt("path",{d:"M12 2C6.48 2 2 6.48 2 12s4.48 10 10 10 10-4.48 10-10S17.52 2 12 2zm-2 15-5-5 1.41-1.41L10 14.17l7.59-7.59L19 8l-9 9z"})}),bn=()=>mt("svg",{viewBox:"0 0 24 24",fill:"currentColor",children:mt("path",{d:"M12 6v3l4-4-4-4v3c-4.42 0-8 3.58-8 8 0 1.57.46 3.03 1.24 4.26L6.7 14.8c-.45-.83-.7-1.79-.7-2.8 0-3.31 2.69-6 6-6zm6.76 1.74L17.3 9.2c.44.84.7 1.79.7 2.8 0 3.31-2.69 6-6 6v-3l-4 4 4 4v-3c4.42 0 8-3.58 8-8 0-1.57-.46-3.03-1.24-4.26z"})}),wn=()=>mt("svg",{viewBox:"0 0 24 24",fill:"currentColor",children:mt("path",{d:"M7.41 8.59 12 13.17l4.59-4.58L18 10l-6 6-6-6 1.41-1.41z"})}),kn=()=>mt("svg",{viewBox:"0 0 24 24",fill:"currentColor",children:mt("path",{d:"m7 10 5 5 5-5z"})}),xn=()=>mt("svg",{viewBox:"0 0 24 24",fill:"currentColor",children:[mt("path",{d:"M11.99 2C6.47 2 2 6.48 2 12s4.47 10 9.99 10C17.52 22 22 17.52 22 12S17.52 2 11.99 2zM12 20c-4.42 0-8-3.58-8-8s3.58-8 8-8 8 3.58 8 8-3.58 8-8 8z"}),mt("path",{d:"M12.5 7H11v6l5.25 3.15.75-1.23-4.5-2.67z"})]}),Sn=()=>mt("svg",{viewBox:"0 0 24 24",fill:"currentColor",children:mt("path",{d:"M20 3h-1V1h-2v2H7V1H5v2H4c-1.1 0-2 .9-2 2v16c0 1.1.9 2 2 2h16c1.1 0 2-.9 2-2V5c0-1.1-.9-2-2-2zm0 18H4V8h16v13z"})}),An=()=>mt("svg",{viewBox:"0 0 24 24",fill:"currentColor",children:mt("path",{d:"m22 5.72-4.6-3.86-1.29 1.53 4.6 3.86L22 5.72zM7.88 3.39 6.6 1.86 2 5.71l1.29 1.53 4.59-3.85zM12.5 8H11v6l4.75 2.85.75-1.23-4-2.37V8zM12 4c-4.97 0-9 4.03-9 9s4.02 9 9 9c4.97 0 9-4.03 9-9s-4.03-9-9-9zm0 16c-3.87 0-7-3.13-7-7s3.13-7 7-7 7 3.13 7 7-3.13 7-7 7z"})}),En=()=>mt("svg",{viewBox:"0 0 24 24",fill:"currentColor",children:mt("path",{d:"M20 5H4c-1.1 0-1.99.9-1.99 2L2 17c0 1.1.9 2 2 2h16c1.1 0 2-.9 2-2V7c0-1.1-.9-2-2-2zm-9 3h2v2h-2V8zm0 3h2v2h-2v-2zM8 8h2v2H8V8zm0 3h2v2H8v-2zm-1 2H5v-2h2v2zm0-3H5V8h2v2zm9 7H8v-2h8v2zm0-4h-2v-2h2v2zm0-3h-2V8h2v2zm3 3h-2v-2h2v2zm0-3h-2V8h2v2z"})}),Cn=()=>mt("svg",{viewBox:"0 0 24 24",fill:"currentColor",children:mt("path",{d:"M8 5v14l11-7z"})}),Mn=()=>mt("svg",{viewBox:"0 0 24 24",fill:"currentColor",children:mt("path",{d:"m3.5 18.49 6-6.01 4 4L22 6.92l-1.41-1.41-7.09 7.97-4-4L2 16.99z"})}),Nn=()=>mt("svg",{viewBox:"0 0 24 24",fill:"currentColor",children:mt("path",{d:"M10 10.02h5V21h-5zM17 21h3c1.1 0 2-.9 2-2v-9h-5v11zm3-18H5c-1.1 0-2 .9-2 2v3h19V5c0-1.1-.9-2-2-2zM3 19c0 1.1.9 2 2 2h3V10H3v9z"})}),Tn=()=>mt("svg",{viewBox:"0 0 24 24",fill:"currentColor",children:mt("path",{d:"M9.4 16.6 4.8 12l4.6-4.6L8 6l-6 6 6 6 1.4-1.4zm5.2 0 4.6-4.6-4.6-4.6L16 6l6 6-6 6-1.4-1.4z"})}),Pn=()=>mt("svg",{viewBox:"0 0 24 24",fill:"currentColor",children:mt("path",{d:"M8.9999 14.7854L18.8928 4.8925C19.0803 4.70497 19.3347 4.59961 19.5999 4.59961C19.8651 4.59961 20.1195 4.70497 20.307 4.8925L21.707 6.2925C22.0975 6.68303 22.0975 7.31619 21.707 7.70672L9.70701 19.7067C9.31648 20.0972 8.68332 20.0972 8.2928 19.7067L2.6928 14.1067C2.50526 13.9192 2.3999 13.6648 2.3999 13.3996C2.3999 13.1344 2.50526 12.88 2.6928 12.6925L4.0928 11.2925C4.48332 10.902 5.11648 10.902 5.50701 11.2925L8.9999 14.7854Z"})}),Dn=()=>mt("svg",{viewBox:"0 0 24 24",fill:"currentColor",children:mt("path",{d:"M12 4.5C7 4.5 2.73 7.61 1 12c1.73 4.39 6 7.5 11 7.5s9.27-3.11 11-7.5c-1.73-4.39-6-7.5-11-7.5zM12 17c-2.76 0-5-2.24-5-5s2.24-5 5-5 5 2.24 5 5-2.24 5-5 5zm0-8c-1.66 0-3 1.34-3 3s1.34 3 3 3 3-1.34 3-3-1.34-3-3-3z"})}),On=()=>mt("svg",{viewBox:"0 0 24 24",fill:"currentColor",children:mt("path",{d:"M16 1H4c-1.1 0-2 .9-2 2v14h2V3h12V1zm3 4H8c-1.1 0-2 .9-2 2v14c0 1.1.9 2 2 2h11c1.1 0 2-.9 2-2V7c0-1.1-.9-2-2-2zm0 16H8V7h11v14z"})}),Rn=()=>mt("svg",{viewBox:"0 0 24 24",fill:"currentColor",children:mt("path",{d:"M20 9H4v2h16V9zM4 15h16v-2H4v2z"})}),Ln=()=>mt("svg",{viewBox:"0 0 24 24",fill:"currentColor",children:[mt("path",{fillRule:"evenodd",clipRule:"evenodd",d:"M21 5C19.89 4.65 18.67 4.5 17.5 4.5C15.55 4.5 13.45 4.9 12 6C10.55 4.9 8.45 4.5 6.5 4.5C5.33 4.5 4.11 4.65 3 5C2.25 5.25 1.6 5.55 1 6V20.6C1 20.85 1.25 21.1 1.5 21.1C1.6 21.1 1.65 21.1 1.75 21.05C3.15 20.3 4.85 20 6.5 20C8.2 20 10.65 20.65 12 21.5C13.35 20.65 15.8 20 17.5 20C19.15 20 20.85 20.3 22.25 21.05C22.35 21.1 22.4 21.1 22.5 21.1C22.75 21.1 23 20.85 23 20.6V6C22.4 5.55 21.75 5.25 21 5ZM21 18.5C19.9 18.15 18.7 18 17.5 18C15.8 18 13.35 18.65 12 19.5C10.65 18.65 8.2 18 6.5 18C5.3 18 4.1 18.15 3 18.5V7C4.1 6.65 5.3 6.5 6.5 6.5C8.2 6.5 10.65 7.15 12 8C13.35 7.15 15.8 6.5 17.5 6.5C18.7 6.5 19.9 6.65 21 7V18.5Z"}),mt("path",{d:"M17.5 10.5C18.38 10.5 19.23 10.59 20 10.76V9.24C19.21 9.09 18.36 9 17.5 9C15.8 9 14.26 9.29 13 9.83V11.49C14.13 10.85 15.7 10.5 17.5 10.5ZM13 12.49V14.15C14.13 13.51 15.7 13.16 17.5 13.16C18.38 13.16 19.23 13.25 20 13.42V11.9C19.21 11.75 18.36 11.66 17.5 11.66C15.8 11.66 14.26 11.96 13 12.49ZM17.5 14.33C15.8 14.33 14.26 14.62 13 15.16V16.82C14.13 16.18 15.7 15.83 17.5 15.83C18.38 15.83 19.23 15.92 20 16.09V14.57C19.21 14.41 18.36 14.33 17.5 14.33Z"}),mt("path",{d:"M6.5 10.5C5.62 10.5 4.77 10.59 4 10.76V9.24C4.79 9.09 5.64 9 6.5 9C8.2 9 9.74 9.29 11 9.83V11.49C9.87 10.85 8.3 10.5 6.5 10.5ZM11 12.49V14.15C9.87 13.51 8.3 13.16 6.5 13.16C5.62 13.16 4.77 13.25 4 13.42V11.9C4.79 11.75 5.64 11.66 6.5 11.66C8.2 11.66 9.74 11.96 11 12.49ZM6.5 14.33C8.2 14.33 9.74 14.62 11 15.16V16.82C9.87 16.18 8.3 15.83 6.5 15.83C5.62 15.83 4.77 15.92 4 16.09V14.57C4.79 14.41 5.64 14.33 6.5 14.33Z"})]}),In=()=>mt("svg",{viewBox:"0 0 24 24",fill:"currentColor",children:mt("path",{fillRule:"evenodd",clipRule:"evenodd",d:"M12 2C6.48 2 2 6.48 2 12C2 17.52 6.48 22 12 22C17.52 22 22 17.52 22 12C22 6.48 17.52 2 12 2ZM12 6C9.79 6 8 7.79 8 10H10C10 8.9 10.9 8 12 8C13.1 8 14 8.9 14 10C14 10.8792 13.4202 11.3236 12.7704 11.8217C11.9421 12.4566 11 13.1787 11 15H13C13 13.9046 13.711 13.2833 14.4408 12.6455C15.21 11.9733 16 11.2829 16 10C16 7.79 14.21 6 12 6ZM13 16V18H11V16H13Z"})}),zn=()=>mt("svg",{viewBox:"0 0 24 24",fill:"currentColor",children:mt("path",{d:"M4 20h16c1.1 0 2-.9 2-2s-.9-2-2-2H4c-1.1 0-2 .9-2 2s.9 2 2 2zm0-3h2v2H4v-2zM2 6c0 1.1.9 2 2 2h16c1.1 0 2-.9 2-2s-.9-2-2-2H4c-1.1 0-2 .9-2 2zm4 1H4V5h2v2zm-2 7h16c1.1 0 2-.9 2-2s-.9-2-2-2H4c-1.1 0-2 .9-2 2s.9 2 2 2zm0-3h2v2H4v-2z"})}),jn=()=>mt("svg",{viewBox:"0 0 24 24",fill:"currentColor",children:mt("path",{d:"M12 8c1.1 0 2-.9 2-2s-.9-2-2-2-2 .9-2 2 .9 2 2 2zm0 2c-1.1 0-2 .9-2 2s.9 2 2 2 2-.9 2-2-.9-2-2-2zm0 6c-1.1 0-2 .9-2 2s.9 2 2 2 2-.9 2-2-.9-2-2-2z"})}),$n=()=>mt("svg",{viewBox:"0 0 24 24",fill:"currentColor",children:mt("path",{d:"M7 20h4c0 1.1-.9 2-2 2s-2-.9-2-2zm-2-1h8v-2H5v2zm11.5-9.5c0 3.82-2.66 5.86-3.77 6.5H5.27c-1.11-.64-3.77-2.68-3.77-6.5C1.5 5.36 4.86 2 9 2s7.5 3.36 7.5 7.5zm4.87-2.13L20 8l1.37.63L22 10l.63-1.37L24 8l-1.37-.63L22 6l-.63 1.37zM19 6l.94-2.06L22 3l-2.06-.94L19 0l-.94 2.06L16 3l2.06.94L19 6z"})}),Fn=()=>mt("svg",{viewBox:"0 0 24 24",fill:"currentColor",children:mt("path",{d:"M3 14h4v-4H3v4zm0 5h4v-4H3v4zM3 9h4V5H3v4zm5 5h13v-4H8v4zm0 5h13v-4H8v4zM8 5v4h13V5H8z"})}),Hn=()=>mt("svg",{viewBox:"0 0 16 16",fill:it("color-error"),children:mt("path",{d:"M13.5095 4L8.50952 1H7.50952L2.50952 4L2.01953 4.85999V10.86L2.50952 11.71L7.50952 14.71H8.50952L13.5095 11.71L13.9995 10.86V4.85999L13.5095 4ZM7.50952 13.5601L3.00952 10.86V5.69995L7.50952 8.15002V13.5601ZM3.26953 4.69995L8.00952 1.85999L12.7495 4.69995L8.00952 7.29004L3.26953 4.69995ZM13.0095 10.86L8.50952 13.5601V8.15002L13.0095 5.69995V10.86Z"})}),Vn=()=>mt("svg",{viewBox:"0 0 16 16",fill:it("color-primary"),children:mt("path",{fillRule:"evenodd",clipRule:"evenodd",d:"M2 5H4V4H1.5L1 4.5V12.5L1.5 13H4V12H2V5ZM14.5 4H12V5H14V12H12V13H14.5L15 12.5V4.5L14.5 4ZM11.76 6.56995L12 7V9.51001L11.7 9.95996L7.19995 11.96H6.73999L4.23999 10.46L4 10.03V7.53003L4.30005 7.06995L8.80005 5.06995H9.26001L11.76 6.56995ZM5 9.70996L6.5 10.61V9.28003L5 8.38V9.70996ZM5.57996 7.56006L7.03003 8.43005L10.42 6.93005L8.96997 6.06006L5.57996 7.56006ZM7.53003 10.73L11.03 9.17004V7.77002L7.53003 9.31995V10.73Z"})}),Bn=()=>mt("svg",{viewBox:"0 0 16 16",fill:it("color-warning"),children:mt("path",{fillRule:"evenodd",clipRule:"evenodd",d:"M14 2H8L7 3V6H8V3H14V8H10V9H14L15 8V3L14 2ZM9 6H13V7H9.41L9 6.59V6ZM7 7H2L1 8V13L2 14H8L9 13V8L8 7H7ZM8 13H2V8H8V9V13ZM3 9H7V10H3V9ZM3 11H7V12H3V11ZM9 4H13V5H9V4Z"})}),Un=()=>mt("svg",{viewBox:"0 0 16 16",fill:it("color-primary"),children:mt("path",{fillRule:"evenodd",clipRule:"evenodd",d:"M7 3L8 2H14L15 3V8L14 9H10V8H14V3H8V6H7V3ZM9 9V8L8 7H7H2L1 8V13L2 14H8L9 13V9ZM8 8V9V13H2V8H7H8ZM9.41421 7L9 6.58579V6H13V7H9.41421ZM9 4H13V5H9V4ZM7 10H3V11H7V10Z"})}),Yn=()=>mt("svg",{viewBox:"0 0 24 24",fill:"currentColor",children:mt("path",{d:"M12 5.83 15.17 9l1.41-1.41L12 3 7.41 7.59 8.83 9zm0 12.34L8.83 15l-1.41 1.41L12 21l4.59-4.59L15.17 15z"})}),Wn=()=>mt("svg",{viewBox:"0 0 24 24",fill:"currentColor",children:mt("path",{d:"M7.41 18.59 8.83 20 12 16.83 15.17 20l1.41-1.41L12 14zm9.18-13.18L15.17 4 12 7.17 8.83 4 7.41 5.41 12 10z"})}),qn=()=>mt("svg",{viewBox:"0 0 24 24",fill:"currentColor",children:mt("path",{d:"M15.5 14h-.79l-.28-.27C15.41 12.59 16 11.11 16 9.5 16 5.91 13.09 3 9.5 3S3 5.91 3 9.5 5.91 16 9.5 16c1.61 0 3.09-.59 4.23-1.57l.27.28v.79l5 4.99L20.49 19zm-6 0C7.01 14 5 11.99 5 9.5S7.01 5 9.5 5 14 7.01 14 9.5 11.99 14 9.5 14"})});var Zn=n(738),Kn=n.n(Zn);const Gn=e=>{let{to:t,isNavLink:n,children:r,...o}=e;return n?mt(Le,{to:t,...o,children:r}):mt("div",{...o,children:r})},Qn=e=>{let{activeItem:t,item:n,color:r=it("color-primary"),activeNavRef:o,onChange:a,isNavLink:i}=e;return mt(Gn,{className:Kn()({"vm-tabs-item":!0,"vm-tabs-item_active":t===n.value,[n.className||""]:n.className}),isNavLink:i,to:n.value,style:{color:r},onClick:(l=n.value,()=>{a&&a(l)}),ref:t===n.value?o:void 0,children:[n.icon&&mt("div",{className:Kn()({"vm-tabs-item__icon":!0,"vm-tabs-item__icon_single":!n.label}),children:n.icon}),n.label]});var l};const Jn=function(e,n,r,o){const a=(0,t.useRef)(n);(0,t.useEffect)((()=>{a.current=n}),[n]),(0,t.useEffect)((()=>{var t;const n=null!==(t=null===r||void 0===r?void 0:r.current)&&void 0!==t?t:window;if(!n||!n.addEventListener)return;const i=e=>a.current(e);return n.addEventListener(e,i,o),()=>{n.removeEventListener(e,i,o)}}),[e,r,o])},Xn=()=>{const[e,n]=(0,t.useState)({width:0,height:0}),r=()=>{n({width:window.innerWidth,height:window.innerHeight})};return Jn("resize",r),(0,t.useEffect)(r,[]),e},er=e=>{let{activeItem:n,items:r,color:o=it("color-primary"),onChange:a,indicatorPlacement:i="bottom",isNavLink:l}=e;const s=Xn(),c=(0,t.useRef)(null),[u,d]=(0,t.useState)({left:0,width:0,bottom:0});return(0,t.useEffect)((()=>{var e;if((null===(e=c.current)||void 0===e?void 0:e.base)instanceof HTMLElement){const{offsetLeft:e,offsetWidth:t,offsetHeight:n}=c.current.base;d({left:e,width:t,bottom:"top"===i?n-2:0})}}),[s,n,c,r]),mt("div",{className:"vm-tabs",children:[r.map((e=>mt(Qn,{activeItem:n,item:e,onChange:a,color:o,activeNavRef:c,isNavLink:l},e.value))),mt("div",{className:"vm-tabs__indicator",style:{...u,borderColor:o}})]})},tr=[{value:nt.chart,icon:mt(Mn,{}),label:"Graph",prometheusCode:0},{value:nt.code,icon:mt(Tn,{}),label:"JSON",prometheusCode:3},{value:nt.table,icon:mt(Nn,{}),label:"Table",prometheusCode:1}],nr=We("SERIES_LIMITS"),rr={displayType:(()=>{const e=et("g0.tab",0),t=tr.find((t=>t.prometheusCode===+e||t.value===e));return(null===t||void 0===t?void 0:t.value)||nt.chart})(),nocache:!1,isTracingEnabled:!1,seriesLimits:nr?JSON.parse(nr):Xe,tableCompact:We("TABLE_COMPACT")||!1};function or(e,t){switch(t.type){case"SET_DISPLAY_TYPE":return{...e,displayType:t.payload};case"SET_SERIES_LIMITS":return Ye("SERIES_LIMITS",JSON.stringify(t.payload)),{...e,seriesLimits:t.payload};case"TOGGLE_QUERY_TRACING":return{...e,isTracingEnabled:!e.isTracingEnabled};case"TOGGLE_NO_CACHE":return{...e,nocache:!e.nocache};case"TOGGLE_TABLE_COMPACT":return Ye("TABLE_COMPACT",!e.tableCompact),{...e,tableCompact:!e.tableCompact};default:throw new Error}}const ar=(0,t.createContext)({}),ir={customStep:et("g0.step_input",""),yaxis:{limits:{enable:!1,range:{1:[0,0]}}},isHistogram:!1,spanGaps:!1};function lr(e,t){switch(t.type){case"TOGGLE_ENABLE_YAXIS_LIMITS":return{...e,yaxis:{...e.yaxis,limits:{...e.yaxis.limits,enable:!e.yaxis.limits.enable}}};case"SET_CUSTOM_STEP":return{...e,customStep:t.payload};case"SET_YAXIS_LIMITS":return{...e,yaxis:{...e.yaxis,limits:{...e.yaxis.limits,range:t.payload}}};case"SET_IS_HISTOGRAM":return{...e,isHistogram:t.payload};case"SET_SPAN_GAPS":return{...e,spanGaps:t.payload};default:throw new Error}}const sr=(0,t.createContext)({}),cr={dashboardsSettings:[],dashboardsLoading:!1,dashboardsError:""};function ur(e,t){switch(t.type){case"SET_DASHBOARDS_SETTINGS":return{...e,dashboardsSettings:t.payload};case"SET_DASHBOARDS_LOADING":return{...e,dashboardsLoading:t.payload};case"SET_DASHBOARDS_ERROR":return{...e,dashboardsError:t.payload};default:throw new Error}}const dr=(0,t.createContext)({}),hr={markdownParsing:"true"===We("LOGS_MARKDOWN")};function pr(e,t){if("SET_MARKDOWN_PARSING"===t.type)return Ye("LOGS_MARKDOWN","".concat(t.payload)),{...e,markdownParsing:t.payload};throw new Error}const fr=(0,t.createContext)({}),mr=()=>(0,t.useContext)(fr).state,_r={windows:"Windows",mac:"Mac OS",linux:"Linux"},gr=()=>(Object.values(_r).find((e=>navigator.userAgent.indexOf(e)>=0))||"unknown")===_r.mac;function vr(){const e=Xn(),n=()=>{const e=["Android","webOS","iPhone","iPad","iPod","BlackBerry","Windows Phone"].map((e=>navigator.userAgent.match(new RegExp(e,"i")))).some((e=>e)),t=window.innerWidth<500;return e||t},[r,o]=(0,t.useState)(n());return(0,t.useEffect)((()=>{o(n())}),[e]),{isMobile:r}}const yr={success:mt(yn,{}),error:mt(vn,{}),warning:mt(gn,{}),info:mt(_n,{})},br=e=>{let{variant:t,children:n}=e;const{isDarkTheme:r}=gt(),{isMobile:o}=vr();return mt("div",{className:Kn()({"vm-alert":!0,["vm-alert_".concat(t)]:t,"vm-alert_dark":r,"vm-alert_mobile":o}),children:[mt("div",{className:"vm-alert__icon",children:yr[t||"info"]}),mt("div",{className:"vm-alert__content",children:n})]})},wr=(0,t.createContext)({showInfoMessage:()=>{}}),kr=function(){for(var e=arguments.length,t=new Array(e),n=0;nn=>{let{children:r}=n;return mt(e,{children:mt(t,{children:r})})}),(e=>{let{children:t}=e;return mt(pt.FK,{children:t})}))}(...[e=>{let{children:n}=e;const[r,o]=(0,t.useReducer)(ht,yt),a=(0,t.useMemo)((()=>({state:r,dispatch:o})),[r,o]);return mt(_t.Provider,{value:a,children:n})},e=>{let{children:n}=e;const[r,o]=(0,t.useReducer)(Zt,qt),a=(0,t.useMemo)((()=>({state:r,dispatch:o})),[r,o]);return mt(Kt.Provider,{value:a,children:n})},e=>{let{children:n}=e;const[r,o]=(0,t.useReducer)(on,rn),a=(0,t.useMemo)((()=>({state:r,dispatch:o})),[r,o]);return mt(an.Provider,{value:a,children:n})},e=>{let{children:n}=e;const[r,o]=(0,t.useReducer)(or,rr),a=(0,t.useMemo)((()=>({state:r,dispatch:o})),[r,o]);return mt(ar.Provider,{value:a,children:n})},e=>{let{children:n}=e;const[r,o]=(0,t.useReducer)(lr,ir),a=(0,t.useMemo)((()=>({state:r,dispatch:o})),[r,o]);return mt(sr.Provider,{value:a,children:n})},e=>{let{children:n}=e;const{isMobile:r}=vr(),[o,a]=(0,t.useState)({}),[i,l]=(0,t.useState)(!1),[s,c]=(0,t.useState)(void 0);(0,t.useEffect)((()=>{if(!s)return;a({message:s.text,variant:s.type,key:Date.now()}),l(!0);const e=setTimeout(u,4e3);return()=>clearTimeout(e)}),[s]);const u=()=>{c(void 0),l(!1)};return mt(wr.Provider,{value:{showInfoMessage:c},children:[i&&mt("div",{className:Kn()({"vm-snackbar":!0,"vm-snackbar_mobile":r}),children:mt(br,{variant:o.variant,children:mt("div",{className:"vm-snackbar-content",children:[mt("span",{children:o.message}),mt("div",{className:"vm-snackbar-content__close",onClick:u,children:mt(fn,{})})]})})}),n]})},e=>{let{children:n}=e;const[r,o]=(0,t.useReducer)(ur,cr),a=(0,t.useMemo)((()=>({state:r,dispatch:o})),[r,o]);return mt(dr.Provider,{value:a,children:n})},e=>{let{children:n}=e;const[r,o]=(0,t.useReducer)(pr,hr),a=(0,t.useMemo)((()=>({state:r,dispatch:o})),[r,o]);return mt(fr.Provider,{value:a,children:n})}]),xr=e=>{if(7!=e.length)return"0, 0, 0";const t=parseInt(e.slice(1,3),16),n=parseInt(e.slice(3,5),16),r=parseInt(e.slice(5,7),16);return"".concat(t,", ").concat(n,", ").concat(r)},Sr={[tt.yhatUpper]:"#7126a1",[tt.yhatLower]:"#7126a1",[tt.yhat]:"#da42a6",[tt.anomaly]:"#da4242",[tt.anomalyScore]:"#7126a1",[tt.actual]:"#203ea9",[tt.training]:"rgba(".concat(xr("#203ea9"),", 0.2)")},Ar={"color-primary":"#589DF6","color-secondary":"#316eca","color-error":"#e5534b","color-warning":"#c69026","color-info":"#539bf5","color-success":"#57ab5a","color-background-body":"#22272e","color-background-block":"#2d333b","color-background-tooltip":"rgba(22, 22, 22, 0.8)","color-text":"#cdd9e5","color-text-secondary":"#768390","color-text-disabled":"#636e7b","box-shadow":"rgba(0, 0, 0, 0.16) 1px 2px 6px","box-shadow-popper":"rgba(0, 0, 0, 0.2) 0px 2px 8px 0px","border-divider":"1px solid rgba(99, 110, 123, 0.5)","color-hover-black":"rgba(0, 0, 0, 0.12)","color-log-hits-bar-0":"rgba(255, 255, 255, 0.18)","color-log-hits-bar-1":"#FFB74D","color-log-hits-bar-2":"#81C784","color-log-hits-bar-3":"#64B5F6","color-log-hits-bar-4":"#E57373","color-log-hits-bar-5":"#8a62f0"},Er={"color-primary":"#3F51B5","color-secondary":"#E91E63","color-error":"#FD080E","color-warning":"#FF8308","color-info":"#03A9F4","color-success":"#4CAF50","color-background-body":"#FEFEFF","color-background-block":"#FFFFFF","color-background-tooltip":"rgba(80,80,80,0.9)","color-text":"#110f0f","color-text-secondary":"#706F6F","color-text-disabled":"#A09F9F","box-shadow":"rgba(0, 0, 0, 0.08) 1px 2px 6px","box-shadow-popper":"rgba(0, 0, 0, 0.1) 0px 2px 8px 0px","border-divider":"1px solid rgba(0, 0, 0, 0.15)","color-hover-black":"rgba(0, 0, 0, 0.06)","color-log-hits-bar-0":"rgba(0, 0, 0, 0.18)","color-log-hits-bar-1":"#FFB74D","color-log-hits-bar-2":"#81C784","color-log-hits-bar-3":"#64B5F6","color-log-hits-bar-4":"#E57373","color-log-hits-bar-5":"#8a62f0"},Cr=()=>{const[e,n]=(0,t.useState)(st()),r=e=>{n(e.matches)};return(0,t.useEffect)((()=>{const e=window.matchMedia("(prefers-color-scheme: dark)");return e.addEventListener("change",r),()=>e.removeEventListener("change",r)}),[]),e},Mr=["primary","secondary","error","warning","info","success"],Nr=e=>{let{onLoaded:n}=e;const r=He(),{palette:o={}}=Fe(),{theme:a}=gt(),i=Cr(),l=vt(),s=Xn(),[c,u]=(0,t.useState)({[ot.dark]:Ar,[ot.light]:Er,[ot.system]:st()?Ar:Er}),d=()=>{const{innerWidth:e,innerHeight:t}=window,{clientWidth:n,clientHeight:r}=document.documentElement;lt("scrollbar-width","".concat(e-n,"px")),lt("scrollbar-height","".concat(t-r,"px")),lt("vh","".concat(.01*t,"px"))},h=()=>{Mr.forEach(((e,t)=>{const r=(e=>{let t=e.replace("#","").trim();if(3===t.length&&(t=t[0]+t[0]+t[1]+t[1]+t[2]+t[2]),6!==t.length)throw new Error("Invalid HEX color.");return(299*parseInt(t.slice(0,2),16)+587*parseInt(t.slice(2,4),16)+114*parseInt(t.slice(4,6),16))/1e3>=128?"#000000":"#FFFFFF"})(it("color-".concat(e)));lt("".concat(e,"-text"),r),t===Mr.length-1&&(l({type:"SET_DARK_THEME"}),n(!0))}))},p=()=>{const e=We("THEME")||ot.system,t=c[e];Object.entries(t).forEach((e=>{let[t,n]=e;lt(t,n)})),h(),r&&(Mr.forEach((e=>{const t=o[e];t&<("color-".concat(e),t)})),h())};return(0,t.useEffect)((()=>{d(),p()}),[c]),(0,t.useEffect)(d,[s]),(0,t.useEffect)((()=>{const e=st()?Ar:Er;c[ot.system]!==e?u((t=>({...t,[ot.system]:e}))):p()}),[a,i]),(0,t.useEffect)((()=>{r&&l({type:"SET_THEME",payload:ot.light})}),[]),null},Tr=()=>{const{showInfoMessage:e}=(0,t.useContext)(wr);return async(t,n)=>{var r;if(null===(r=navigator)||void 0===r||!r.clipboard)return e({text:"Clipboard not supported",type:"error"}),console.warn("Clipboard not supported"),!1;try{return await navigator.clipboard.writeText(t),n&&e({text:n,type:"success"}),!0}catch(o){return o instanceof Error&&e({text:"".concat(o.name,": ").concat(o.message),type:"error"}),console.warn("Copy failed",o),!1}}},Pr=e=>{let{variant:t="contained",color:n="primary",size:r="medium",ariaLabel:o,children:a,endIcon:i,startIcon:l,fullWidth:s=!1,className:c,disabled:u,onClick:d,onMouseDown:h}=e;return mt("button",{className:Kn()({"vm-button":!0,["vm-button_".concat(t,"_").concat(n)]:!0,["vm-button_".concat(r)]:r,"vm-button_icon":(l||i)&&!a,"vm-button_full-width":s,"vm-button_with-icon":l||i,"vm-button_disabled":u,[c||""]:c}),disabled:u,"aria-label":o,onClick:d,onMouseDown:h,children:mt(pt.FK,{children:[l&&mt("span",{className:"vm-button__start-icon",children:l}),a&&mt("span",{children:a}),i&&mt("span",{className:"vm-button__end-icon",children:i})]})})},Dr=e=>{let{data:n}=e;const r=Tr(),o=(0,t.useMemo)((()=>{const e=n.map((e=>1===Object.keys(e).length?JSON.stringify(e):JSON.stringify(e,null,2))).join(",\n").replace(/^/gm,"".concat(" "));return"[\n".concat(e,"\n]")}),[n]);return mt("div",{className:"vm-json-view",children:[mt("div",{className:"vm-json-view__copy",children:mt(Pr,{variant:"outlined",onClick:async()=>{await r(o,"Formatted JSON has been copied")},children:"Copy JSON"})}),mt("pre",{className:"vm-json-view__code",children:mt("code",{children:o})})]})},Or=(e,n)=>{const[r]=$e(),o=r.get(n)?r.get(n):e,[a,i]=(0,t.useState)(o);return(0,t.useEffect)((()=>{o!==a&&i(o)}),[o]),[a,i]},Rr=()=>{const e=oe(),[n,r]=$e();return{setSearchParamsFromKeys:(0,t.useCallback)((t=>{const o=!!Array.from(n.values()).length;let a=!1;Object.entries(t).forEach((e=>{let[t,r]=e;n.get(t)!=="".concat(r)&&(n.set(t,"".concat(r)),a=!0)})),a&&(o?r(n):e("?".concat(n.toString()),{replace:!0}))}),[n,e])}},Lr=(e,n,r)=>{const o=(0,t.useCallback)((t=>{const o=null===e||void 0===e?void 0:e.current,a=t.target,i=(null===r||void 0===r?void 0:r.current)&&r.current.contains(a);!o||o.contains((null===t||void 0===t?void 0:t.target)||null)||i||n(t)}),[e,n]);Jn("mousedown",o),Jn("touchstart",o)},Ir=e=>{let{children:n,buttonRef:r,placement:o="bottom-left",open:a=!1,onClose:i,offset:l={top:6,left:0},clickOutside:s=!0,fullWidth:c,title:u,disabledFullScreen:d,variant:h}=e;const{isMobile:p}=vr(),f=oe(),m=ne(),[_,g]=(0,t.useState)({width:0,height:0}),[v,y]=(0,t.useState)(!1),b=(0,t.useRef)(null);(0,t.useEffect)((()=>(y(a),!a&&i&&i(),a&&p&&!d&&(document.body.style.overflow="hidden"),()=>{document.body.style.overflow="auto"})),[a]),(0,t.useEffect)((()=>{var e,t;g({width:(null===b||void 0===b||null===(e=b.current)||void 0===e?void 0:e.clientWidth)||0,height:(null===b||void 0===b||null===(t=b.current)||void 0===t?void 0:t.clientHeight)||0}),y(!1)}),[b]);const w=(0,t.useMemo)((()=>{const e=r.current;if(!e||!v)return{};const t=e.getBoundingClientRect(),n={top:0,left:0,width:"auto"},a="bottom-right"===o||"top-right"===o,i=null===o||void 0===o?void 0:o.includes("top"),s=(null===l||void 0===l?void 0:l.top)||0,u=(null===l||void 0===l?void 0:l.left)||0;n.left=n.left=t.left+u,n.top=t.height+t.top+s,a&&(n.left=t.right-_.width),i&&(n.top=t.top-_.height-s);const{innerWidth:d,innerHeight:h}=window,p=n.top+_.height+20>h,f=n.top-20<0,m=n.left+_.width+20>d,g=n.left-20<0;return p&&(n.top=t.top-_.height-s),f&&(n.top=t.height+t.top+s),m&&(n.left=t.right-_.width-u),g&&(n.left=t.left+u),c&&(n.width="".concat(t.width,"px")),n.top<0&&(n.top=20),n.left<0&&(n.left=20),n}),[r,o,v,n,c]),k=()=>{y(!1),i()};(0,t.useEffect)((()=>{if(!b.current||!v||p&&!d)return;const{right:e,width:t}=b.current.getBoundingClientRect();if(e>window.innerWidth){const e=window.innerWidth-20-t;b.current.style.left=e{v&&p&&!d&&(f(m,{replace:!0}),i())}),[v,p,d,m,i]);return Jn("scroll",k),Jn("popstate",x),Lr(b,(()=>{s&&k()}),r),mt(pt.FK,{children:(v||!_.width)&&t.default.createPortal(mt("div",{className:Kn()({"vm-popper":!0,["vm-popper_".concat(h)]:h,"vm-popper_mobile":p&&!d,"vm-popper_open":(p||Object.keys(w).length)&&v}),ref:b,style:p&&!d?{}:w,children:[(u||p&&!d)&&mt("div",{className:"vm-popper-header",children:[mt("p",{className:"vm-popper-header__title",children:u}),mt(Pr,{variant:"text",color:"dark"===h?"white":"primary",size:"small",onClick:e=>{e.stopPropagation(),i()},ariaLabel:"close",children:mt(fn,{})})]}),n]}),document.body)})},zr=e=>{let{checked:t=!1,disabled:n=!1,label:r,color:o="secondary",onChange:a}=e;return mt("div",{className:Kn()({"vm-checkbox":!0,"vm-checkbox_disabled":n,"vm-checkbox_active":t,["vm-checkbox_".concat(o,"_active")]:t,["vm-checkbox_".concat(o)]:o}),onClick:()=>{n||a(!t)},children:[mt("div",{className:"vm-checkbox-track",children:mt("div",{className:"vm-checkbox-track__thumb",children:mt(Pn,{})})}),r&&mt("span",{className:"vm-checkbox__label",children:r})]})},jr=e=>{let{children:n,title:r,open:o,placement:a="bottom-center",offset:i={top:6,left:0}}=e;const{isMobile:l}=vr(),[s,c]=(0,t.useState)(!1),[u,d]=(0,t.useState)({width:0,height:0}),h=(0,t.useRef)(null),p=(0,t.useRef)(null),f=()=>c(!1);(0,t.useEffect)((()=>{if(p.current&&s)return d({width:p.current.clientWidth,height:p.current.clientHeight}),window.addEventListener("scroll",f),()=>{window.removeEventListener("scroll",f)}}),[s,r]);const m=(0,t.useMemo)((()=>{var e;const t=null===h||void 0===h||null===(e=h.current)||void 0===e?void 0:e.base;if(!t||!s)return{};const n=t.getBoundingClientRect(),r={top:0,left:0},o="bottom-right"===a||"top-right"===a,l="bottom-left"===a||"top-left"===a,c=null===a||void 0===a?void 0:a.includes("top"),d=(null===i||void 0===i?void 0:i.top)||0,p=(null===i||void 0===i?void 0:i.left)||0;r.left=n.left-(u.width-n.width)/2+p,r.top=n.height+n.top+d,o&&(r.left=n.right-u.width),l&&(r.left=n.left+p),c&&(r.top=n.top-u.height-d);const{innerWidth:f,innerHeight:m}=window,_=r.top+u.height+20>m,g=r.top-20<0,v=r.left+u.width+20>f,y=r.left-20<0;return _&&(r.top=n.top-u.height-d),g&&(r.top=n.height+n.top+d),v&&(r.left=n.right-u.width-p),y&&(r.left=n.left+p),r.top<0&&(r.top=20),r.left<0&&(r.left=20),r}),[h,a,s,u]),_=()=>{"boolean"!==typeof o&&c(!0)},g=()=>{c(!1)};return(0,t.useEffect)((()=>{"boolean"===typeof o&&c(o)}),[o]),(0,t.useEffect)((()=>{var e;const t=null===h||void 0===h||null===(e=h.current)||void 0===e?void 0:e.base;if(t)return t.addEventListener("mouseenter",_),t.addEventListener("mouseleave",g),()=>{t.removeEventListener("mouseenter",_),t.removeEventListener("mouseleave",g)}}),[h]),mt(pt.FK,{children:[mt(t.Fragment,{ref:h,children:n}),!l&&s&&t.default.createPortal(mt("div",{className:"vm-tooltip",ref:p,style:m,children:r}),document.body)]})},$r=e=>{let{value:t=!1,disabled:n=!1,label:r,color:o="secondary",fullWidth:a,onChange:i}=e;return mt("div",{className:Kn()({"vm-switch":!0,"vm-switch_full-width":a,"vm-switch_disabled":n,"vm-switch_active":t,["vm-switch_".concat(o,"_active")]:t,["vm-switch_".concat(o)]:o}),onClick:()=>{n||i(!t)},children:[mt("div",{className:"vm-switch-track",children:mt("div",{className:"vm-switch-track__thumb"})}),r&&mt("span",{className:"vm-switch__label",children:r})]})};const Fr=e=>{const[n,r]=(0,t.useState)(!!e),o=(0,t.useCallback)((()=>r(!0)),[]),a=(0,t.useCallback)((()=>r(!1)),[]),i=(0,t.useCallback)((()=>r((e=>!e))),[]);return{value:n,setValue:r,setTrue:o,setFalse:a,toggle:i}},Hr=e=>{let{error:n,warning:r,info:o}=e;const a=(0,t.useRef)(null),[i,l]=(0,t.useState)(!1),[s,c]=(0,t.useState)(!1),u=(0,t.useMemo)((()=>n?"ERROR: ":r?"WARNING: ":""),[n,r]),d="".concat(u).concat(n||r||o),h=()=>{const e=a.current;if(e){const{offsetWidth:t,scrollWidth:n,offsetHeight:r,scrollHeight:o}=e;l(t+1{c(!1),h()}),[a,d]),Jn("resize",h),n||r||o?mt("span",{className:Kn()({"vm-text-field__error":!0,"vm-text-field__warning":r&&!n,"vm-text-field__helper-text":!r&&!n,"vm-text-field__error_overflowed":i,"vm-text-field__error_full":s}),"data-show":!!d,ref:a,onClick:()=>{i&&(c(!0),l(!1))},children:d}):null},Vr=e=>{let{label:n,value:r,type:o="text",error:a="",warning:i="",helperText:l="",placeholder:s,endIcon:c,startIcon:u,disabled:d=!1,autofocus:h=!1,inputmode:p="text",caretPosition:f,onChange:m,onEnter:_,onKeyDown:g,onFocus:v,onBlur:y,onChangeCaret:b}=e;const{isDarkTheme:w}=gt(),{isMobile:k}=vr(),x=(0,t.useRef)(null),S=(0,t.useRef)(null),A=(0,t.useMemo)((()=>"textarea"===o?S:x),[o]),[E,C]=(0,t.useState)([0,0]),M=Kn()({"vm-text-field__input":!0,"vm-text-field__input_error":a,"vm-text-field__input_warning":!a&&i,"vm-text-field__input_icon-start":u,"vm-text-field__input_disabled":d,"vm-text-field__input_textarea":"textarea"===o}),N=e=>{const{selectionStart:t,selectionEnd:n}=e;C([t||0,n||0])},T=e=>{N(e.currentTarget)},P=e=>{g&&g(e);const{key:t,ctrlKey:n,metaKey:r}=e,a="Enter"===t;("textarea"!==o?a:a&&(r||n))&&_&&(e.preventDefault(),_())},D=e=>{N(e.currentTarget)},O=e=>{d||(m&&m(e.currentTarget.value),N(e.currentTarget))},R=()=>{v&&v()},L=()=>{y&&y()},I=e=>{try{A.current&&A.current.setSelectionRange(e[0],e[1])}catch(zd){return zd}};return(0,t.useEffect)((()=>{var e;h&&!k&&(null===A||void 0===A||null===(e=A.current)||void 0===e?void 0:e.focus)&&A.current.focus()}),[A,h]),(0,t.useEffect)((()=>{b&&b(E)}),[E]),(0,t.useEffect)((()=>{I(E)}),[r]),(0,t.useEffect)((()=>{f&&I(f)}),[f]),mt("label",{className:Kn()({"vm-text-field":!0,"vm-text-field_textarea":"textarea"===o,"vm-text-field_dark":w}),"data-replicated-value":r,children:[u&&mt("div",{className:"vm-text-field__icon-start",children:u}),c&&mt("div",{className:"vm-text-field__icon-end",children:c}),"textarea"===o?mt("textarea",{className:M,disabled:d,ref:S,value:r,rows:1,inputMode:p,placeholder:s,autoCapitalize:"none",onInput:O,onKeyDown:P,onKeyUp:D,onFocus:R,onBlur:L,onMouseUp:T}):mt("input",{className:M,disabled:d,ref:x,value:r,type:o,placeholder:s,inputMode:p,autoCapitalize:"none",onInput:O,onKeyDown:P,onKeyUp:D,onFocus:R,onBlur:L,onMouseUp:T}),n&&mt("span",{className:"vm-text-field__label",children:n}),mt(Hr,{error:a,warning:i,info:l})]})},Br="Table settings",Ur=e=>{let{columns:n,defaultColumns:r=[],tableCompact:o,onChangeColumns:a,toggleTableCompact:i}=e;const{isMobile:l}=vr(),s=(0,t.useRef)(null),{value:c,toggle:u,setFalse:d}=Fr(!1),{value:h,toggle:p}=Fr(!1),[f,m]=(0,t.useState)(""),[_,g]=(0,t.useState)(-1),v=(0,t.useMemo)((()=>f?n.filter((e=>e.includes(f))):n),[n,f]),y=(0,t.useMemo)((()=>v.every((e=>r.includes(e)))),[r,v]),b=(0,t.useMemo)((()=>!n.length),[n]),w=e=>{a(r.includes(e)?r.filter((t=>t!==e)):[...r,e])};return(0,t.useEffect)((()=>{((e,t)=>e.length===t.length&&e.every(((e,n)=>e===t[n])))(n,r)||a(n)}),[n]),mt("div",{className:"vm-table-settings",children:[mt(jr,{title:Br,children:mt("div",{ref:s,children:mt(Pr,{variant:"text",startIcon:mt(pn,{}),onClick:u,disabled:b,ariaLabel:Br})})}),mt(Ir,{open:c,onClose:d,placement:"bottom-right",buttonRef:s,title:Br,children:mt("div",{className:Kn()({"vm-table-settings-popper":!0,"vm-table-settings-popper_mobile":l}),children:[mt("div",{className:"vm-table-settings-popper-list vm-table-settings-popper-list_first",children:mt($r,{label:"Compact view",value:o,onChange:i})}),mt("div",{className:"vm-table-settings-popper-list",children:mt("div",{children:[mt("div",{className:"vm-table-settings-popper-list-header",children:[mt("h3",{className:"vm-table-settings-popper-list-header__title",children:"Display columns"}),mt(jr,{title:"search column",children:mt(Pr,{color:"primary",variant:"text",onClick:p,startIcon:mt(qn,{}),ariaLabel:"reset columns"})})]}),h&&mt(Vr,{placeholder:"search column",startIcon:mt(qn,{}),value:f,onChange:m,onBlur:()=>{g(-1)},onKeyDown:e=>{const t="ArrowUp"===e.key,n="ArrowDown"===e.key,r="Enter"===e.key;(n||t||r)&&e.preventDefault(),n?g((e=>e+1>v.length-1?e:e+1)):t?g((e=>e-1<0?e:e-1)):r&&w(v[_])},type:"search"}),!v.length&&mt("p",{className:"vm-table-settings-popper-list__no-found",children:"No columns found"}),mt("div",{className:"vm-table-settings-popper-list-header",children:!!v.length&&mt("div",{className:"vm-table-settings-popper-list__item vm-table-settings-popper-list__item_check_all",children:mt(zr,{checked:y,onChange:()=>{a(y?r.filter((e=>!v.includes(e))):v)},label:y?"Uncheck all":"Check all",disabled:o})})}),mt("div",{className:"vm-table-settings-popper-list-columns",children:v.map(((e,t)=>{return mt("div",{className:Kn()({"vm-table-settings-popper-list__item":!0,"vm-table-settings-popper-list__item_focus":t===_}),children:mt(zr,{checked:r.includes(e),onChange:(n=e,()=>{w(n)}),label:e,disabled:o})},e);var n}))})]})})]})})]})},Yr=["date","timestamp","time"];function Wr(e,t,n){const r=e[n],a=t[n],i=Yr.includes("".concat(n))?o()("".concat(r)).unix():r,l=Yr.includes("".concat(n))?o()("".concat(a)).unix():a;return li?1:0}const qr=e=>{let{rows:n,columns:r,defaultOrderBy:o,defaultOrderDir:a,copyToClipboard:i,paginationOffset:l}=e;const[s,c]=(0,t.useState)(o),[u,d]=(0,t.useState)(a||"desc"),[h,p]=(0,t.useState)(null),f=(0,t.useMemo)((()=>{const{startIndex:e,endIndex:t}=l;return function(e,t){const n=e.map(((e,t)=>[e,t]));return n.sort(((e,n)=>{const r=t(e[0],n[0]);return 0!==r?r:e[1]-n[1]})),n.map((e=>e[0]))}(n,function(e,t){return"desc"===e?(e,n)=>Wr(e,n,t):(e,n)=>-Wr(e,n,t)}(u,s)).slice(e,t)}),[n,s,u,l]),m=(e,t)=>async()=>{if(h!==t)try{await navigator.clipboard.writeText(String(e)),p(t)}catch(zd){console.error(zd)}};return(0,t.useEffect)((()=>{if(null===h)return;const e=setTimeout((()=>p(null)),2e3);return()=>clearTimeout(e)}),[h]),mt("table",{className:"vm-table",children:[mt("thead",{className:"vm-table-header",children:mt("tr",{className:"vm-table__row vm-table__row_header",children:[r.map((e=>{return mt("th",{className:"vm-table-cell vm-table-cell_header vm-table-cell_sort",onClick:(t=e.key,()=>{d((e=>"asc"===e&&s===t?"desc":"asc")),c(t)}),children:mt("div",{className:"vm-table-cell__content",children:[mt("div",{children:String(e.title||e.key)}),mt("div",{className:Kn()({"vm-table__sort-icon":!0,"vm-table__sort-icon_active":s===e.key,"vm-table__sort-icon_desc":"desc"===u&&s===e.key}),children:mt(kn,{})})]})},String(e.key));var t})),i&&mt("th",{className:"vm-table-cell vm-table-cell_header"})]})}),mt("tbody",{className:"vm-table-body",children:f.map(((e,t)=>mt("tr",{className:"vm-table__row",children:[r.map((t=>mt("td",{className:Kn()({"vm-table-cell":!0,["".concat(t.className)]:t.className}),children:e[t.key]||"-"},String(t.key)))),i&&mt("td",{className:"vm-table-cell vm-table-cell_right",children:e[i]&&mt("div",{className:"vm-table-cell__content",children:mt(jr,{title:h===t?"Copied":"Copy row",children:mt(Pr,{variant:"text",color:h===t?"success":"gray",size:"small",startIcon:mt(h===t?Pn:On,{}),onClick:m(e[i],t),ariaLabel:"copy row"})})})})]},t)))})]})},Zr=e=>{let{logs:n,displayColumns:r,tableCompact:o,columns:a}=e;const i=e=>{switch(e){case"_time":return"vm-table-cell_logs-time";case"_vmui_data":return"vm-table-cell_logs vm-table-cell_pre";default:return"vm-table-cell_logs"}},l=(0,t.useMemo)((()=>o?[{key:"_vmui_data",title:"Data",className:i("_vmui_data")}]:a.map((e=>({key:e,title:e,className:i(e)})))),[o,a]),s=(0,t.useMemo)((()=>o?l:null!==r&&void 0!==r&&r.length?l.filter((e=>r.includes(e.key))):[]),[l,r,o]);return mt(pt.FK,{children:mt(qr,{rows:n,columns:s,defaultOrderBy:"_time",defaultOrderDir:"desc",copyToClipboard:"_vmui_data",paginationOffset:{startIndex:0,endIndex:1/0}})})},Kr=e=>{let{defaultExpanded:n=!1,onChange:r,title:o,children:a}=e;const[i,l]=(0,t.useState)(n);return(0,t.useEffect)((()=>{r&&r(i)}),[i]),mt(pt.FK,{children:[mt("header",{className:"vm-accordion-header ".concat(i&&"vm-accordion-header_open"),onClick:()=>{l((e=>!e))},children:[o,mt("div",{className:"vm-accordion-header__arrow ".concat(i&&"vm-accordion-header__arrow_open"),children:mt(wn,{})})]}),i&&mt("section",{className:"vm-accordion-section",children:a},"content")]})},Gr=e=>{let{log:n}=e;const{value:r,toggle:o}=Fr(!1),{markdownParsing:a}=mr(),i=["_msg","_vmui_time","_vmui_data","_vmui_markdown"],l=Object.entries(n).filter((e=>{let[t]=e;return!i.includes(t)})),s=l.length>0,c=(0,t.useMemo)((()=>{if(n._msg)return n._msg;if(!s)return;const e=l.reduce(((e,t)=>{let[n,r]=t;return e[n]=r,e}),{});return JSON.stringify(e)}),[n,l,s]),u=Tr(),[d,h]=(0,t.useState)(null);return(0,t.useEffect)((()=>{if(null===d)return;const e=setTimeout((()=>h(null)),2e3);return()=>clearTimeout(e)}),[d]),mt("div",{className:"vm-group-logs-row",children:[mt("div",{className:"vm-group-logs-row-content",onClick:o,children:[s&&mt("div",{className:Kn()({"vm-group-logs-row-content__arrow":!0,"vm-group-logs-row-content__arrow_open":r}),children:mt(wn,{})}),mt("div",{className:Kn()({"vm-group-logs-row-content__time":!0,"vm-group-logs-row-content__time_missing":!n._vmui_time}),children:n._vmui_time||"timestamp missing"}),mt("div",{className:Kn()({"vm-group-logs-row-content__msg":!0,"vm-group-logs-row-content__msg_empty-msg":!n._msg,"vm-group-logs-row-content__msg_missing":!c}),dangerouslySetInnerHTML:a&&n._vmui_markdown?{__html:n._vmui_markdown}:void 0,children:c||"-"})]},"".concat(n._msg).concat(n._time)),s&&r&&mt("div",{className:"vm-group-logs-row-fields",children:mt("table",{children:mt("tbody",{children:l.map(((e,t)=>{let[n,r]=e;return mt("tr",{className:"vm-group-logs-row-fields-item",children:[mt("td",{className:"vm-group-logs-row-fields-item-controls",children:mt("div",{className:"vm-group-logs-row-fields-item-controls__wrapper",children:mt(jr,{title:d===t?"Copied":"Copy to clipboard",children:mt(Pr,{variant:"text",color:"gray",size:"small",startIcon:mt(On,{}),onClick:(o="".concat(n,': "').concat(r,'"'),a=t,async()=>{if(d!==a)try{await u(o),h(a)}catch(zd){console.error(zd)}}),ariaLabel:"copy to clipboard"})})})}),mt("td",{className:"vm-group-logs-row-fields-item__key",children:n}),mt("td",{className:"vm-group-logs-row-fields-item__value",children:r})]},n);var o,a}))})})})]})},Qr="No Grouping",Jr=e=>{let{logs:n,settingsRef:r}=e;const{isDarkTheme:o}=gt(),a=Tr(),[i,l]=$e(),[s,c]=(0,t.useState)([]),[u,d]=Or("_stream","groupBy"),[h,p]=(0,t.useState)(null),[f,m]=(0,t.useState)(""),_=(0,t.useRef)(null),{value:g,toggle:v,setFalse:y}=Fr(!1),b=(0,t.useMemo)((()=>s.every(Boolean)),[s]),w=(0,t.useMemo)((()=>{const e=["_msg","_time","_vmui_time","_vmui_data","_vmui_markdown"],t=Array.from(new Set(n.map((e=>Object.keys(e))).flat())),r=[Qr,...t.filter((t=>!e.includes(t)))];if(!f)return r;try{const e=new RegExp(f,"i");return r.filter((t=>e.test(t))).sort(((t,n)=>{var r,o;return((null===(r=t.match(e))||void 0===r?void 0:r.index)||0)-((null===(o=n.match(e))||void 0===o?void 0:o.index)||0)}))}catch(zd){return[]}}),[n,f]),k=(0,t.useMemo)((()=>function(e,t){const n=e.reduce(((e,n)=>{const r=t.map((e=>"".concat(e,": ").concat(n[e]||"-"))).join("|");return(e[r]=e[r]||[]).push(n),e}),{});return Object.entries(n).map((e=>{let[t,n]=e;return{keys:t.split("|"),values:n}}))}(n,[u]).map((e=>{var t;const n=(null===(t=e.values[0])||void 0===t?void 0:t[u])||"",r=/^{.+}$/.test(n)&&n.slice(1,-1).match(/(\\.|[^,])+/g)||[n];return{...e,pairs:r.filter(Boolean)}}))),[n,u]),x=(0,t.useCallback)((()=>{c(new Array(k.length).fill(!b))}),[b]),S=e=>t=>{c((n=>{const r=[...n];return r[e]=t,r}))};return(0,t.useEffect)((()=>{if(null===h)return;const e=setTimeout((()=>p(null)),2e3);return()=>clearTimeout(e)}),[h]),(0,t.useEffect)((()=>{c(new Array(k.length).fill(!0))}),[k]),mt(pt.FK,{children:[mt("div",{className:"vm-group-logs",children:k.map(((e,t)=>mt("div",{className:"vm-group-logs-section",children:mt(Kr,{defaultExpanded:s[t],onChange:S(t),title:u!==Qr&&mt("div",{className:"vm-group-logs-section-keys",children:[mt("span",{className:"vm-group-logs-section-keys__title",children:["Group by ",mt("code",{children:u}),":"]}),e.pairs.map((t=>{return mt(jr,{title:h===t?"Copied":"Copy to clipboard",placement:"top-center",children:mt("div",{className:Kn()({"vm-group-logs-section-keys__pair":!0,"vm-group-logs-section-keys__pair_dark":o}),onClick:(n=t,async e=>{e.stopPropagation();const t=/(.+)?=(".+")/.test(n)?"".concat(n.replace(/=/,": ")):"".concat(u,': "').concat(n,'"');await a(t)&&p(n)}),children:t})},"".concat(e.keys.join(""),"_").concat(t));var n})),mt("span",{className:"vm-group-logs-section-keys__count",children:[e.values.length," entries"]})]}),children:mt("div",{className:"vm-group-logs-section-rows",children:e.values.map((e=>mt(Gr,{log:e},"".concat(e._msg).concat(e._time))))})},String(s[t]))},e.keys.join(""))))}),r.current&&t.default.createPortal(mt("div",{className:"vm-group-logs-header",children:[mt(jr,{title:b?"Collapse All":"Expand All",children:mt(Pr,{variant:"text",startIcon:mt(b?Wn:Yn,{}),onClick:x,ariaLabel:b?"Collapse All":"Expand All"})}),mt(jr,{title:"Group by",children:mt("div",{ref:_,children:mt(Pr,{variant:"text",startIcon:mt(zn,{}),onClick:v,ariaLabel:"Group by"})})}),mt(Ir,{open:g,placement:"bottom-right",onClose:y,buttonRef:_,children:mt("div",{className:"vm-list vm-group-logs-header-keys",children:[mt("div",{className:"vm-group-logs-header-keys__search",children:mt(Vr,{label:"Search key",value:f,onChange:m,type:"search"})}),w.map((e=>{return mt("div",{className:Kn()({"vm-list-item":!0,"vm-list-item_active":e===u}),onClick:(t=e,()=>{d(t),i.set("groupBy",t),l(i),y()}),children:e},e);var t}))]})})]}),r.current)]})};function Xr(e){return Xr="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},Xr(e)}function eo(e){var t=function(e,t){if("object"!=Xr(e)||!e)return e;var n=e[Symbol.toPrimitive];if(void 0!==n){var r=n.call(e,t||"default");if("object"!=Xr(r))return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===t?String:Number)(e)}(e,"string");return"symbol"==Xr(t)?t:t+""}function to(e,t,n){return(t=eo(t))in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function no(){return{async:!1,breaks:!1,extensions:null,gfm:!0,hooks:null,pedantic:!1,renderer:null,silent:!1,tokenizer:null,walkTokens:null}}let ro={async:!1,breaks:!1,extensions:null,gfm:!0,hooks:null,pedantic:!1,renderer:null,silent:!1,tokenizer:null,walkTokens:null};function oo(e){ro=e}const ao=/[&<>"']/,io=new RegExp(ao.source,"g"),lo=/[<>"']|&(?!(#\d{1,7}|#[Xx][a-fA-F0-9]{1,6}|\w+);)/,so=new RegExp(lo.source,"g"),co={"&":"&","<":"<",">":">",'"':""","'":"'"},uo=e=>co[e];function ho(e,t){if(t){if(ao.test(e))return e.replace(io,uo)}else if(lo.test(e))return e.replace(so,uo);return e}const po=/(^|[^\[])\^/g;function fo(e,t){let n="string"===typeof e?e:e.source;t=t||"";const r={replace:(e,t)=>{let o="string"===typeof t?t:t.source;return o=o.replace(po,"$1"),n=n.replace(e,o),r},getRegex:()=>new RegExp(n,t)};return r}function mo(e){try{e=encodeURI(e).replace(/%25/g,"%")}catch{return null}return e}const _o={exec:()=>null};function go(e,t){const n=e.replace(/\|/g,((e,t,n)=>{let r=!1,o=t;for(;--o>=0&&"\\"===n[o];)r=!r;return r?"|":" |"})).split(/ \|/);let r=0;if(n[0].trim()||n.shift(),n.length>0&&!n[n.length-1].trim()&&n.pop(),t)if(n.length>t)n.splice(t);else for(;n.length0)return{type:"space",raw:t[0]}}code(e){const t=this.rules.block.code.exec(e);if(t){const e=t[0].replace(/^(?: {1,4}| {0,3}\t)/gm,"");return{type:"code",raw:t[0],codeBlockStyle:"indented",text:this.options.pedantic?e:vo(e,"\n")}}}fences(e){const t=this.rules.block.fences.exec(e);if(t){const e=t[0],n=function(e,t){const n=e.match(/^(\s+)(?:```)/);if(null===n)return t;const r=n[1];return t.split("\n").map((e=>{const t=e.match(/^\s+/);if(null===t)return e;const[n]=t;return n.length>=r.length?e.slice(r.length):e})).join("\n")}(e,t[3]||"");return{type:"code",raw:e,lang:t[2]?t[2].trim().replace(this.rules.inline.anyPunctuation,"$1"):t[2],text:n}}}heading(e){const t=this.rules.block.heading.exec(e);if(t){let e=t[2].trim();if(/#$/.test(e)){const t=vo(e,"#");this.options.pedantic?e=t.trim():t&&!/ $/.test(t)||(e=t.trim())}return{type:"heading",raw:t[0],depth:t[1].length,text:e,tokens:this.lexer.inline(e)}}}hr(e){const t=this.rules.block.hr.exec(e);if(t)return{type:"hr",raw:vo(t[0],"\n")}}blockquote(e){const t=this.rules.block.blockquote.exec(e);if(t){let e=vo(t[0],"\n").split("\n"),n="",r="";const o=[];for(;e.length>0;){let t=!1;const a=[];let i;for(i=0;i/.test(e[i]))a.push(e[i]),t=!0;else{if(t)break;a.push(e[i])}e=e.slice(i);const l=a.join("\n"),s=l.replace(/\n {0,3}((?:=+|-+) *)(?=\n|$)/g,"\n $1").replace(/^ {0,3}>[ \t]?/gm,"");n=n?"".concat(n,"\n").concat(l):l,r=r?"".concat(r,"\n").concat(s):s;const c=this.lexer.state.top;if(this.lexer.state.top=!0,this.lexer.blockTokens(s,o,!0),this.lexer.state.top=c,0===e.length)break;const u=o[o.length-1];if("code"===(null===u||void 0===u?void 0:u.type))break;if("blockquote"===(null===u||void 0===u?void 0:u.type)){const t=u,a=t.raw+"\n"+e.join("\n"),i=this.blockquote(a);o[o.length-1]=i,n=n.substring(0,n.length-t.raw.length)+i.raw,r=r.substring(0,r.length-t.text.length)+i.text;break}if("list"!==(null===u||void 0===u?void 0:u.type));else{const t=u,a=t.raw+"\n"+e.join("\n"),i=this.list(a);o[o.length-1]=i,n=n.substring(0,n.length-u.raw.length)+i.raw,r=r.substring(0,r.length-t.raw.length)+i.raw,e=a.substring(o[o.length-1].raw.length).split("\n")}}return{type:"blockquote",raw:n,tokens:o,text:r}}}list(e){let t=this.rules.block.list.exec(e);if(t){let n=t[1].trim();const r=n.length>1,o={type:"list",raw:"",ordered:r,start:r?+n.slice(0,-1):"",loose:!1,items:[]};n=r?"\\d{1,9}\\".concat(n.slice(-1)):"\\".concat(n),this.options.pedantic&&(n=r?n:"[*+-]");const a=new RegExp("^( {0,3}".concat(n,")((?:[\t ][^\\n]*)?(?:\\n|$))"));let i=!1;for(;e;){let n=!1,r="",l="";if(!(t=a.exec(e)))break;if(this.rules.block.hr.test(e))break;r=t[0],e=e.substring(r.length);let s=t[2].split("\n",1)[0].replace(/^\t+/,(e=>" ".repeat(3*e.length))),c=e.split("\n",1)[0],u=!s.trim(),d=0;if(this.options.pedantic?(d=2,l=s.trimStart()):u?d=t[1].length+1:(d=t[2].search(/[^ ]/),d=d>4?1:d,l=s.slice(d),d+=t[1].length),u&&/^[ \t]*$/.test(c)&&(r+=c+"\n",e=e.substring(c.length+1),n=!0),!n){const t=new RegExp("^ {0,".concat(Math.min(3,d-1),"}(?:[*+-]|\\d{1,9}[.)])((?:[ \t][^\\n]*)?(?:\\n|$))")),n=new RegExp("^ {0,".concat(Math.min(3,d-1),"}((?:- *){3,}|(?:_ *){3,}|(?:\\* *){3,})(?:\\n+|$)")),o=new RegExp("^ {0,".concat(Math.min(3,d-1),"}(?:```|~~~)")),a=new RegExp("^ {0,".concat(Math.min(3,d-1),"}#")),i=new RegExp("^ {0,".concat(Math.min(3,d-1),"}<[a-z].*>"),"i");for(;e;){const h=e.split("\n",1)[0];let p;if(c=h,this.options.pedantic?(c=c.replace(/^ {1,4}(?=( {4})*[^ ])/g," "),p=c):p=c.replace(/\t/g," "),o.test(c))break;if(a.test(c))break;if(i.test(c))break;if(t.test(c))break;if(n.test(c))break;if(p.search(/[^ ]/)>=d||!c.trim())l+="\n"+p.slice(d);else{if(u)break;if(s.replace(/\t/g," ").search(/[^ ]/)>=4)break;if(o.test(s))break;if(a.test(s))break;if(n.test(s))break;l+="\n"+c}u||c.trim()||(u=!0),r+=h+"\n",e=e.substring(h.length+1),s=p.slice(d)}}o.loose||(i?o.loose=!0:/\n[ \t]*\n[ \t]*$/.test(r)&&(i=!0));let h,p=null;this.options.gfm&&(p=/^\[[ xX]\] /.exec(l),p&&(h="[ ] "!==p[0],l=l.replace(/^\[[ xX]\] +/,""))),o.items.push({type:"list_item",raw:r,task:!!p,checked:h,loose:!1,text:l,tokens:[]}),o.raw+=r}o.items[o.items.length-1].raw=o.items[o.items.length-1].raw.trimEnd(),o.items[o.items.length-1].text=o.items[o.items.length-1].text.trimEnd(),o.raw=o.raw.trimEnd();for(let e=0;e"space"===e.type)),n=t.length>0&&t.some((e=>/\n.*\n/.test(e.raw)));o.loose=n}if(o.loose)for(let e=0;e$/,"$1").replace(this.rules.inline.anyPunctuation,"$1"):"",r=t[3]?t[3].substring(1,t[3].length-1).replace(this.rules.inline.anyPunctuation,"$1"):t[3];return{type:"def",tag:e,raw:t[0],href:n,title:r}}}table(e){const t=this.rules.block.table.exec(e);if(!t)return;if(!/[:|]/.test(t[2]))return;const n=go(t[1]),r=t[2].replace(/^\||\| *$/g,"").split("|"),o=t[3]&&t[3].trim()?t[3].replace(/\n[ \t]*$/,"").split("\n"):[],a={type:"table",raw:t[0],header:[],align:[],rows:[]};if(n.length===r.length){for(const e of r)/^ *-+: *$/.test(e)?a.align.push("right"):/^ *:-+: *$/.test(e)?a.align.push("center"):/^ *:-+ *$/.test(e)?a.align.push("left"):a.align.push(null);for(let e=0;e({text:e,tokens:this.lexer.inline(e),header:!1,align:a.align[t]}))));return a}}lheading(e){const t=this.rules.block.lheading.exec(e);if(t)return{type:"heading",raw:t[0],depth:"="===t[2].charAt(0)?1:2,text:t[1],tokens:this.lexer.inline(t[1])}}paragraph(e){const t=this.rules.block.paragraph.exec(e);if(t){const e="\n"===t[1].charAt(t[1].length-1)?t[1].slice(0,-1):t[1];return{type:"paragraph",raw:t[0],text:e,tokens:this.lexer.inline(e)}}}text(e){const t=this.rules.block.text.exec(e);if(t)return{type:"text",raw:t[0],text:t[0],tokens:this.lexer.inline(t[0])}}escape(e){const t=this.rules.inline.escape.exec(e);if(t)return{type:"escape",raw:t[0],text:ho(t[1])}}tag(e){const t=this.rules.inline.tag.exec(e);if(t)return!this.lexer.state.inLink&&/^
    /i.test(t[0])&&(this.lexer.state.inLink=!1),!this.lexer.state.inRawBlock&&/^<(pre|code|kbd|script)(\s|>)/i.test(t[0])?this.lexer.state.inRawBlock=!0:this.lexer.state.inRawBlock&&/^<\/(pre|code|kbd|script)(\s|>)/i.test(t[0])&&(this.lexer.state.inRawBlock=!1),{type:"html",raw:t[0],inLink:this.lexer.state.inLink,inRawBlock:this.lexer.state.inRawBlock,block:!1,text:t[0]}}link(e){const t=this.rules.inline.link.exec(e);if(t){const e=t[2].trim();if(!this.options.pedantic&&/^$/.test(e))return;const t=vo(e.slice(0,-1),"\\");if((e.length-t.length)%2===0)return}else{const e=function(e,t){if(-1===e.indexOf(t[1]))return-1;let n=0;for(let r=0;r-1){const n=(0===t[0].indexOf("!")?5:4)+t[1].length+e;t[2]=t[2].substring(0,e),t[0]=t[0].substring(0,n).trim(),t[3]=""}}let n=t[2],r="";if(this.options.pedantic){const e=/^([^'"]*[^\s])\s+(['"])(.*)\2/.exec(n);e&&(n=e[1],r=e[3])}else r=t[3]?t[3].slice(1,-1):"";return n=n.trim(),/^$/.test(e)?n.slice(1):n.slice(1,-1)),yo(t,{href:n?n.replace(this.rules.inline.anyPunctuation,"$1"):n,title:r?r.replace(this.rules.inline.anyPunctuation,"$1"):r},t[0],this.lexer)}}reflink(e,t){let n;if((n=this.rules.inline.reflink.exec(e))||(n=this.rules.inline.nolink.exec(e))){const e=t[(n[2]||n[1]).replace(/\s+/g," ").toLowerCase()];if(!e){const e=n[0].charAt(0);return{type:"text",raw:e,text:e}}return yo(n,e,n[0],this.lexer)}}emStrong(e,t){let n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:"",r=this.rules.inline.emStrongLDelim.exec(e);if(!r)return;if(r[3]&&n.match(/[\p{L}\p{N}]/u))return;if(!(r[1]||r[2]||"")||!n||this.rules.inline.punctuation.exec(n)){const n=[...r[0]].length-1;let o,a,i=n,l=0;const s="*"===r[0][0]?this.rules.inline.emStrongRDelimAst:this.rules.inline.emStrongRDelimUnd;for(s.lastIndex=0,t=t.slice(-1*e.length+n);null!=(r=s.exec(t));){if(o=r[1]||r[2]||r[3]||r[4]||r[5]||r[6],!o)continue;if(a=[...o].length,r[3]||r[4]){i+=a;continue}if((r[5]||r[6])&&n%3&&!((n+a)%3)){l+=a;continue}if(i-=a,i>0)continue;a=Math.min(a,a+i+l);const t=[...r[0]][0].length,s=e.slice(0,n+r.index+t+a);if(Math.min(n,a)%2){const e=s.slice(1,-1);return{type:"em",raw:s,text:e,tokens:this.lexer.inlineTokens(e)}}const c=s.slice(2,-2);return{type:"strong",raw:s,text:c,tokens:this.lexer.inlineTokens(c)}}}}codespan(e){const t=this.rules.inline.code.exec(e);if(t){let e=t[2].replace(/\n/g," ");const n=/[^ ]/.test(e),r=/^ /.test(e)&&/ $/.test(e);return n&&r&&(e=e.substring(1,e.length-1)),e=ho(e,!0),{type:"codespan",raw:t[0],text:e}}}br(e){const t=this.rules.inline.br.exec(e);if(t)return{type:"br",raw:t[0]}}del(e){const t=this.rules.inline.del.exec(e);if(t)return{type:"del",raw:t[0],text:t[2],tokens:this.lexer.inlineTokens(t[2])}}autolink(e){const t=this.rules.inline.autolink.exec(e);if(t){let e,n;return"@"===t[2]?(e=ho(t[1]),n="mailto:"+e):(e=ho(t[1]),n=e),{type:"link",raw:t[0],text:e,href:n,tokens:[{type:"text",raw:e,text:e}]}}}url(e){let t;if(t=this.rules.inline.url.exec(e)){let e,o;if("@"===t[2])e=ho(t[0]),o="mailto:"+e;else{let a;do{var n,r;a=t[0],t[0]=null!==(n=null===(r=this.rules.inline._backpedal.exec(t[0]))||void 0===r?void 0:r[0])&&void 0!==n?n:""}while(a!==t[0]);e=ho(t[0]),o="www."===t[1]?"http://"+t[0]:t[0]}return{type:"link",raw:t[0],text:e,href:o,tokens:[{type:"text",raw:e,text:e}]}}}inlineText(e){const t=this.rules.inline.text.exec(e);if(t){let e;return e=this.lexer.state.inRawBlock?t[0]:ho(t[0]),{type:"text",raw:t[0],text:e}}}}const wo=/^ {0,3}((?:-[\t ]*){3,}|(?:_[ \t]*){3,}|(?:\*[ \t]*){3,})(?:\n+|$)/,ko=/(?:[*+-]|\d{1,9}[.)])/,xo=fo(/^(?!bull |blockCode|fences|blockquote|heading|html)((?:.|\n(?!\s*?\n|bull |blockCode|fences|blockquote|heading|html))+?)\n {0,3}(=+|-+) *(?:\n+|$)/).replace(/bull/g,ko).replace(/blockCode/g,/(?: {4}| {0,3}\t)/).replace(/fences/g,/ {0,3}(?:`{3,}|~{3,})/).replace(/blockquote/g,/ {0,3}>/).replace(/heading/g,/ {0,3}#{1,6}/).replace(/html/g,/ {0,3}<[^\n>]+>\n/).getRegex(),So=/^([^\n]+(?:\n(?!hr|heading|lheading|blockquote|fences|list|html|table| +\n)[^\n]+)*)/,Ao=/(?!\s*\])(?:\\.|[^\[\]\\])+/,Eo=fo(/^ {0,3}\[(label)\]: *(?:\n[ \t]*)?([^<\s][^\s]*|<.*?>)(?:(?: +(?:\n[ \t]*)?| *\n[ \t]*)(title))? *(?:\n+|$)/).replace("label",Ao).replace("title",/(?:"(?:\\"?|[^"\\])*"|'[^'\n]*(?:\n[^'\n]+)*\n?'|\([^()]*\))/).getRegex(),Co=fo(/^( {0,3}bull)([ \t][^\n]+?)?(?:\n|$)/).replace(/bull/g,ko).getRegex(),Mo="address|article|aside|base|basefont|blockquote|body|caption|center|col|colgroup|dd|details|dialog|dir|div|dl|dt|fieldset|figcaption|figure|footer|form|frame|frameset|h[1-6]|head|header|hr|html|iframe|legend|li|link|main|menu|menuitem|meta|nav|noframes|ol|optgroup|option|p|param|search|section|summary|table|tbody|td|tfoot|th|thead|title|tr|track|ul",No=/|$))/,To=fo("^ {0,3}(?:<(script|pre|style|textarea)[\\s>][\\s\\S]*?(?:[^\\n]*\\n+|$)|comment[^\\n]*(\\n+|$)|<\\?[\\s\\S]*?(?:\\?>\\n*|$)|\\n*|$)|\\n*|$)|)[\\s\\S]*?(?:(?:\\n[ \t]*)+\\n|$)|<(?!script|pre|style|textarea)([a-z][\\w-]*)(?:attribute)*? */?>(?=[ \\t]*(?:\\n|$))[\\s\\S]*?(?:(?:\\n[ \t]*)+\\n|$)|(?=[ \\t]*(?:\\n|$))[\\s\\S]*?(?:(?:\\n[ \t]*)+\\n|$))","i").replace("comment",No).replace("tag",Mo).replace("attribute",/ +[a-zA-Z:_][\w.:-]*(?: *= *"[^"\n]*"| *= *'[^'\n]*'| *= *[^\s"'=<>`]+)?/).getRegex(),Po=fo(So).replace("hr",wo).replace("heading"," {0,3}#{1,6}(?:\\s|$)").replace("|lheading","").replace("|table","").replace("blockquote"," {0,3}>").replace("fences"," {0,3}(?:`{3,}(?=[^`\\n]*\\n)|~{3,})[^\\n]*\\n").replace("list"," {0,3}(?:[*+-]|1[.)]) ").replace("html",")|<(?:script|pre|style|textarea|!--)").replace("tag",Mo).getRegex(),Do={blockquote:fo(/^( {0,3}> ?(paragraph|[^\n]*)(?:\n|$))+/).replace("paragraph",Po).getRegex(),code:/^((?: {4}| {0,3}\t)[^\n]+(?:\n(?:[ \t]*(?:\n|$))*)?)+/,def:Eo,fences:/^ {0,3}(`{3,}(?=[^`\n]*(?:\n|$))|~{3,})([^\n]*)(?:\n|$)(?:|([\s\S]*?)(?:\n|$))(?: {0,3}\1[~`]* *(?=\n|$)|$)/,heading:/^ {0,3}(#{1,6})(?=\s|$)(.*)(?:\n+|$)/,hr:wo,html:To,lheading:xo,list:Co,newline:/^(?:[ \t]*(?:\n|$))+/,paragraph:Po,table:_o,text:/^[^\n]+/},Oo=fo("^ *([^\\n ].*)\\n {0,3}((?:\\| *)?:?-+:? *(?:\\| *:?-+:? *)*(?:\\| *)?)(?:\\n((?:(?! *\\n|hr|heading|blockquote|code|fences|list|html).*(?:\\n|$))*)\\n*|$)").replace("hr",wo).replace("heading"," {0,3}#{1,6}(?:\\s|$)").replace("blockquote"," {0,3}>").replace("code","(?: {4}| {0,3}\t)[^\\n]").replace("fences"," {0,3}(?:`{3,}(?=[^`\\n]*\\n)|~{3,})[^\\n]*\\n").replace("list"," {0,3}(?:[*+-]|1[.)]) ").replace("html",")|<(?:script|pre|style|textarea|!--)").replace("tag",Mo).getRegex(),Ro={...Do,table:Oo,paragraph:fo(So).replace("hr",wo).replace("heading"," {0,3}#{1,6}(?:\\s|$)").replace("|lheading","").replace("table",Oo).replace("blockquote"," {0,3}>").replace("fences"," {0,3}(?:`{3,}(?=[^`\\n]*\\n)|~{3,})[^\\n]*\\n").replace("list"," {0,3}(?:[*+-]|1[.)]) ").replace("html",")|<(?:script|pre|style|textarea|!--)").replace("tag",Mo).getRegex()},Lo={...Do,html:fo("^ *(?:comment *(?:\\n|\\s*$)|<(tag)[\\s\\S]+? *(?:\\n{2,}|\\s*$)|\\s]*)*?/?> *(?:\\n{2,}|\\s*$))").replace("comment",No).replace(/tag/g,"(?!(?:a|em|strong|small|s|cite|q|dfn|abbr|data|time|code|var|samp|kbd|sub|sup|i|b|u|mark|ruby|rt|rp|bdi|bdo|span|br|wbr|ins|del|img)\\b)\\w+(?!:|[^\\w\\s@]*@)\\b").getRegex(),def:/^ *\[([^\]]+)\]: *]+)>?(?: +(["(][^\n]+[")]))? *(?:\n+|$)/,heading:/^(#{1,6})(.*)(?:\n+|$)/,fences:_o,lheading:/^(.+?)\n {0,3}(=+|-+) *(?:\n+|$)/,paragraph:fo(So).replace("hr",wo).replace("heading"," *#{1,6} *[^\n]").replace("lheading",xo).replace("|table","").replace("blockquote"," {0,3}>").replace("|fences","").replace("|list","").replace("|html","").replace("|tag","").getRegex()},Io=/^\\([!"#$%&'()*+,\-./:;<=>?@\[\]\\^_`{|}~])/,zo=/^( {2,}|\\)\n(?!\s*$)/,jo="\\p{P}\\p{S}",$o=fo(/^((?![*_])[\spunctuation])/,"u").replace(/punctuation/g,jo).getRegex(),Fo=fo(/^(?:\*+(?:((?!\*)[punct])|[^\s*]))|^_+(?:((?!_)[punct])|([^\s_]))/,"u").replace(/punct/g,jo).getRegex(),Ho=fo("^[^_*]*?__[^_*]*?\\*[^_*]*?(?=__)|[^*]+(?=[^*])|(?!\\*)[punct](\\*+)(?=[\\s]|$)|[^punct\\s](\\*+)(?!\\*)(?=[punct\\s]|$)|(?!\\*)[punct\\s](\\*+)(?=[^punct\\s])|[\\s](\\*+)(?!\\*)(?=[punct])|(?!\\*)[punct](\\*+)(?!\\*)(?=[punct])|[^punct\\s](\\*+)(?=[^punct\\s])","gu").replace(/punct/g,jo).getRegex(),Vo=fo("^[^_*]*?\\*\\*[^_*]*?_[^_*]*?(?=\\*\\*)|[^_]+(?=[^_])|(?!_)[punct](_+)(?=[\\s]|$)|[^punct\\s](_+)(?!_)(?=[punct\\s]|$)|(?!_)[punct\\s](_+)(?=[^punct\\s])|[\\s](_+)(?!_)(?=[punct])|(?!_)[punct](_+)(?!_)(?=[punct])","gu").replace(/punct/g,jo).getRegex(),Bo=fo(/\\([punct])/,"gu").replace(/punct/g,jo).getRegex(),Uo=fo(/^<(scheme:[^\s\x00-\x1f<>]*|email)>/).replace("scheme",/[a-zA-Z][a-zA-Z0-9+.-]{1,31}/).replace("email",/[a-zA-Z0-9.!#$%&'*+/=?^_`{|}~-]+(@)[a-zA-Z0-9](?:[a-zA-Z0-9-]{0,61}[a-zA-Z0-9])?(?:\.[a-zA-Z0-9](?:[a-zA-Z0-9-]{0,61}[a-zA-Z0-9])?)+(?![-_])/).getRegex(),Yo=fo(No).replace("(?:--\x3e|$)","--\x3e").getRegex(),Wo=fo("^comment|^|^<[a-zA-Z][\\w-]*(?:attribute)*?\\s*/?>|^<\\?[\\s\\S]*?\\?>|^|^").replace("comment",Yo).replace("attribute",/\s+[a-zA-Z:_][\w.:-]*(?:\s*=\s*"[^"]*"|\s*=\s*'[^']*'|\s*=\s*[^\s"'=<>`]+)?/).getRegex(),qo=/(?:\[(?:\\.|[^\[\]\\])*\]|\\.|`[^`]*`|[^\[\]\\`])*?/,Zo=fo(/^!?\[(label)\]\(\s*(href)(?:\s+(title))?\s*\)/).replace("label",qo).replace("href",/<(?:\\.|[^\n<>\\])+>|[^\s\x00-\x1f]*/).replace("title",/"(?:\\"?|[^"\\])*"|'(?:\\'?|[^'\\])*'|\((?:\\\)?|[^)\\])*\)/).getRegex(),Ko=fo(/^!?\[(label)\]\[(ref)\]/).replace("label",qo).replace("ref",Ao).getRegex(),Go=fo(/^!?\[(ref)\](?:\[\])?/).replace("ref",Ao).getRegex(),Qo={_backpedal:_o,anyPunctuation:Bo,autolink:Uo,blockSkip:/\[[^[\]]*?\]\([^\(\)]*?\)|`[^`]*?`|<[^<>]*?>/g,br:zo,code:/^(`+)([^`]|[^`][\s\S]*?[^`])\1(?!`)/,del:_o,emStrongLDelim:Fo,emStrongRDelimAst:Ho,emStrongRDelimUnd:Vo,escape:Io,link:Zo,nolink:Go,punctuation:$o,reflink:Ko,reflinkSearch:fo("reflink|nolink(?!\\()","g").replace("reflink",Ko).replace("nolink",Go).getRegex(),tag:Wo,text:/^(`+|[^`])(?:(?= {2,}\n)|[\s\S]*?(?:(?=[\\1&&void 0!==arguments[1]?arguments[1]:[],a=arguments.length>2&&void 0!==arguments[2]&&arguments[2];for(this.options.pedantic&&(e=e.replace(/\t/g," ").replace(/^ +$/gm,""));e;)if(!(this.options.extensions&&this.options.extensions.block&&this.options.extensions.block.some((n=>!!(t=n.call({lexer:this},e,o))&&(e=e.substring(t.raw.length),o.push(t),!0)))))if(t=this.tokenizer.space(e))e=e.substring(t.raw.length),1===t.raw.length&&o.length>0?o[o.length-1].raw+="\n":o.push(t);else if(t=this.tokenizer.code(e))e=e.substring(t.raw.length),n=o[o.length-1],!n||"paragraph"!==n.type&&"text"!==n.type?o.push(t):(n.raw+="\n"+t.raw,n.text+="\n"+t.text,this.inlineQueue[this.inlineQueue.length-1].src=n.text);else if(t=this.tokenizer.fences(e))e=e.substring(t.raw.length),o.push(t);else if(t=this.tokenizer.heading(e))e=e.substring(t.raw.length),o.push(t);else if(t=this.tokenizer.hr(e))e=e.substring(t.raw.length),o.push(t);else if(t=this.tokenizer.blockquote(e))e=e.substring(t.raw.length),o.push(t);else if(t=this.tokenizer.list(e))e=e.substring(t.raw.length),o.push(t);else if(t=this.tokenizer.html(e))e=e.substring(t.raw.length),o.push(t);else if(t=this.tokenizer.def(e))e=e.substring(t.raw.length),n=o[o.length-1],!n||"paragraph"!==n.type&&"text"!==n.type?this.tokens.links[t.tag]||(this.tokens.links[t.tag]={href:t.href,title:t.title}):(n.raw+="\n"+t.raw,n.text+="\n"+t.raw,this.inlineQueue[this.inlineQueue.length-1].src=n.text);else if(t=this.tokenizer.table(e))e=e.substring(t.raw.length),o.push(t);else if(t=this.tokenizer.lheading(e))e=e.substring(t.raw.length),o.push(t);else{if(r=e,this.options.extensions&&this.options.extensions.startBlock){let t=1/0;const n=e.slice(1);let o;this.options.extensions.startBlock.forEach((e=>{o=e.call({lexer:this},n),"number"===typeof o&&o>=0&&(t=Math.min(t,o))})),t<1/0&&t>=0&&(r=e.substring(0,t+1))}var i;if(this.state.top&&(t=this.tokenizer.paragraph(r)))n=o[o.length-1],a&&"paragraph"===(null===(i=n)||void 0===i?void 0:i.type)?(n.raw+="\n"+t.raw,n.text+="\n"+t.text,this.inlineQueue.pop(),this.inlineQueue[this.inlineQueue.length-1].src=n.text):o.push(t),a=r.length!==e.length,e=e.substring(t.raw.length);else if(t=this.tokenizer.text(e))e=e.substring(t.raw.length),n=o[o.length-1],n&&"text"===n.type?(n.raw+="\n"+t.raw,n.text+="\n"+t.text,this.inlineQueue.pop(),this.inlineQueue[this.inlineQueue.length-1].src=n.text):o.push(t);else if(e){const t="Infinite loop on byte: "+e.charCodeAt(0);if(this.options.silent){console.error(t);break}throw new Error(t)}}return this.state.top=!0,o}inline(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:[];return this.inlineQueue.push({src:e,tokens:t}),t}inlineTokens(e){let t,n,r,o,a,i,l=arguments.length>1&&void 0!==arguments[1]?arguments[1]:[],s=e;if(this.tokens.links){const e=Object.keys(this.tokens.links);if(e.length>0)for(;null!=(o=this.tokenizer.rules.inline.reflinkSearch.exec(s));)e.includes(o[0].slice(o[0].lastIndexOf("[")+1,-1))&&(s=s.slice(0,o.index)+"["+"a".repeat(o[0].length-2)+"]"+s.slice(this.tokenizer.rules.inline.reflinkSearch.lastIndex))}for(;null!=(o=this.tokenizer.rules.inline.blockSkip.exec(s));)s=s.slice(0,o.index)+"["+"a".repeat(o[0].length-2)+"]"+s.slice(this.tokenizer.rules.inline.blockSkip.lastIndex);for(;null!=(o=this.tokenizer.rules.inline.anyPunctuation.exec(s));)s=s.slice(0,o.index)+"++"+s.slice(this.tokenizer.rules.inline.anyPunctuation.lastIndex);for(;e;)if(a||(i=""),a=!1,!(this.options.extensions&&this.options.extensions.inline&&this.options.extensions.inline.some((n=>!!(t=n.call({lexer:this},e,l))&&(e=e.substring(t.raw.length),l.push(t),!0)))))if(t=this.tokenizer.escape(e))e=e.substring(t.raw.length),l.push(t);else if(t=this.tokenizer.tag(e))e=e.substring(t.raw.length),n=l[l.length-1],n&&"text"===t.type&&"text"===n.type?(n.raw+=t.raw,n.text+=t.text):l.push(t);else if(t=this.tokenizer.link(e))e=e.substring(t.raw.length),l.push(t);else if(t=this.tokenizer.reflink(e,this.tokens.links))e=e.substring(t.raw.length),n=l[l.length-1],n&&"text"===t.type&&"text"===n.type?(n.raw+=t.raw,n.text+=t.text):l.push(t);else if(t=this.tokenizer.emStrong(e,s,i))e=e.substring(t.raw.length),l.push(t);else if(t=this.tokenizer.codespan(e))e=e.substring(t.raw.length),l.push(t);else if(t=this.tokenizer.br(e))e=e.substring(t.raw.length),l.push(t);else if(t=this.tokenizer.del(e))e=e.substring(t.raw.length),l.push(t);else if(t=this.tokenizer.autolink(e))e=e.substring(t.raw.length),l.push(t);else if(this.state.inLink||!(t=this.tokenizer.url(e))){if(r=e,this.options.extensions&&this.options.extensions.startInline){let t=1/0;const n=e.slice(1);let o;this.options.extensions.startInline.forEach((e=>{o=e.call({lexer:this},n),"number"===typeof o&&o>=0&&(t=Math.min(t,o))})),t<1/0&&t>=0&&(r=e.substring(0,t+1))}if(t=this.tokenizer.inlineText(r))e=e.substring(t.raw.length),"_"!==t.raw.slice(-1)&&(i=t.raw.slice(-1)),a=!0,n=l[l.length-1],n&&"text"===n.type?(n.raw+=t.raw,n.text+=t.text):l.push(t);else if(e){const t="Infinite loop on byte: "+e.charCodeAt(0);if(this.options.silent){console.error(t);break}throw new Error(t)}}else e=e.substring(t.raw.length),l.push(t);return l}}class oa{constructor(e){to(this,"options",void 0),to(this,"parser",void 0),this.options=e||ro}space(e){return""}code(e){var t;let{text:n,lang:r,escaped:o}=e;const a=null===(t=(r||"").match(/^\S*/))||void 0===t?void 0:t[0],i=n.replace(/\n$/,"")+"\n";return a?'
    '+(o?i:ho(i,!0))+"
    \n":"
    "+(o?i:ho(i,!0))+"
    \n"}blockquote(e){let{tokens:t}=e;const n=this.parser.parse(t);return"
    \n".concat(n,"
    \n")}html(e){let{text:t}=e;return t}heading(e){let{tokens:t,depth:n}=e;return"").concat(this.parser.parseInline(t),"\n")}hr(e){return"
    \n"}list(e){const t=e.ordered,n=e.start;let r="";for(let a=0;a\n"+r+"\n"}listitem(e){let t="";if(e.task){const n=this.checkbox({checked:!!e.checked});e.loose?e.tokens.length>0&&"paragraph"===e.tokens[0].type?(e.tokens[0].text=n+" "+e.tokens[0].text,e.tokens[0].tokens&&e.tokens[0].tokens.length>0&&"text"===e.tokens[0].tokens[0].type&&(e.tokens[0].tokens[0].text=n+" "+e.tokens[0].tokens[0].text)):e.tokens.unshift({type:"text",raw:n+" ",text:n+" "}):t+=n+" "}return t+=this.parser.parse(e.tokens,!!e.loose),"
  • ".concat(t,"
  • \n")}checkbox(e){let{checked:t}=e;return"'}paragraph(e){let{tokens:t}=e;return"

    ".concat(this.parser.parseInline(t),"

    \n")}table(e){let t="",n="";for(let o=0;o")),"\n\n"+t+"\n"+r+"
    \n"}tablerow(e){let{text:t}=e;return"\n".concat(t,"\n")}tablecell(e){const t=this.parser.parseInline(e.tokens),n=e.header?"th":"td";return(e.align?"<".concat(n,' align="').concat(e.align,'">'):"<".concat(n,">"))+t+"\n")}strong(e){let{tokens:t}=e;return"".concat(this.parser.parseInline(t),"")}em(e){let{tokens:t}=e;return"".concat(this.parser.parseInline(t),"")}codespan(e){let{text:t}=e;return"".concat(t,"")}br(e){return"
    "}del(e){let{tokens:t}=e;return"".concat(this.parser.parseInline(t),"")}link(e){let{href:t,title:n,tokens:r}=e;const o=this.parser.parseInline(r),a=mo(t);if(null===a)return o;t=a;let i='
    ",i}image(e){let{href:t,title:n,text:r}=e;const o=mo(t);if(null===o)return r;t=o;let a='').concat(r,'1&&void 0!==arguments[1])||arguments[1],n="";for(let r=0;r{const o=e[r].flat(1/0);n=n.concat(this.walkTokens(o,t))})):e.tokens&&(n=n.concat(this.walkTokens(e.tokens,t)))}}return n}use(){const e=this.defaults.extensions||{renderers:{},childTokens:{}};for(var t=arguments.length,n=new Array(t),r=0;r{const n={...t};if(n.async=this.defaults.async||n.async||!1,t.extensions&&(t.extensions.forEach((t=>{if(!t.name)throw new Error("extension name required");if("renderer"in t){const n=e.renderers[t.name];e.renderers[t.name]=n?function(){for(var e=arguments.length,r=new Array(e),o=0;o{if(this.defaults.async)return Promise.resolve(o.call(e,t)).then((t=>a.call(e,t)));const n=o.call(e,t);return a.call(e,n)}:e[r]=function(){for(var t=arguments.length,n=new Array(t),r=0;r{const r={...n},o={...this.defaults,...r},a=this.onError(!!o.silent,!!o.async);if(!0===this.defaults.async&&!1===r.async)return a(new Error("marked(): The async option was set to true by an extension. Remove async: false from the parse options object to return a Promise."));if("undefined"===typeof t||null===t)return a(new Error("marked(): input parameter is undefined or null"));if("string"!==typeof t)return a(new Error("marked(): input parameter is of type "+Object.prototype.toString.call(t)+", string expected"));o.hooks&&(o.hooks.options=o,o.hooks.block=e);const i=o.hooks?o.hooks.provideLexer():e?ra.lex:ra.lexInline,l=o.hooks?o.hooks.provideParser():e?ia.parse:ia.parseInline;if(o.async)return Promise.resolve(o.hooks?o.hooks.preprocess(t):t).then((e=>i(e,o))).then((e=>o.hooks?o.hooks.processAllTokens(e):e)).then((e=>o.walkTokens?Promise.all(this.walkTokens(e,o.walkTokens)).then((()=>e)):e)).then((e=>l(e,o))).then((e=>o.hooks?o.hooks.postprocess(e):e)).catch(a);try{o.hooks&&(t=o.hooks.preprocess(t));let e=i(t,o);o.hooks&&(e=o.hooks.processAllTokens(e)),o.walkTokens&&this.walkTokens(e,o.walkTokens);let n=l(e,o);return o.hooks&&(n=o.hooks.postprocess(n)),n}catch(zd){return a(zd)}}}onError(e,t){return n=>{if(n.message+="\nPlease report this to https://github.com/markedjs/marked.",e){const e="

    An error occurred:

    "+ho(n.message+"",!0)+"
    ";return t?Promise.resolve(e):e}if(t)return Promise.reject(n);throw n}}};function ca(e,t){return sa.parse(e,t)}ca.options=ca.setOptions=function(e){return sa.setOptions(e),ca.defaults=sa.defaults,oo(ca.defaults),ca},ca.getDefaults=no,ca.defaults=ro,ca.use=function(){return sa.use(...arguments),ca.defaults=sa.defaults,oo(ca.defaults),ca},ca.walkTokens=function(e,t){return sa.walkTokens(e,t)},ca.parseInline=sa.parseInline,ca.Parser=ia,ca.parser=ia.parse,ca.Renderer=oa,ca.TextRenderer=aa,ca.Lexer=ra,ca.lexer=ra.lex,ca.Tokenizer=bo,ca.Hooks=la,ca.parse=ca;ca.options,ca.setOptions,ca.use,ca.walkTokens,ca.parseInline,ia.parse,ra.lex;var ua=function(e){return e.group="group",e.table="table",e.json="json",e}(ua||{});const da=[{label:"Group",value:ua.group,icon:mt(Fn,{})},{label:"Table",value:ua.table,icon:mt(Nn,{})},{label:"JSON",value:ua.json,icon:mt(Tn,{})}],ha=e=>{let{data:n}=e;const{isMobile:r}=vr(),{timezone:a}=Gt(),{setSearchParamsFromKeys:i}=Rr(),l=(0,t.useRef)(null),[s,c]=Or(ua.group,"view"),[u,d]=(0,t.useState)([]),{value:h,toggle:p}=Fr(!1),f=(0,t.useMemo)((()=>n.map((e=>({...e,_vmui_time:e._time?o()(e._time).tz().format("".concat(wt,".SSS")):"",_vmui_data:JSON.stringify(e,null,2),_vmui_markdown:e._msg?ca(e._msg.replace(/```/g,"\n```\n")):""})))),[n,a]),m=(0,t.useMemo)((()=>{if(null===f||void 0===f||!f.length)return[];const e=["_vmui_data","_vmui_time","_vmui_markdown"],t=new Set;for(const n of f)for(const e in n)t.add(e);return Array.from(t).filter((t=>!e.includes(t)))}),[f]);return mt("div",{className:Kn()({"vm-explore-logs-body":!0,"vm-block":!0,"vm-block_mobile":r}),children:[mt("div",{className:Kn()({"vm-explore-logs-body-header":!0,"vm-section-header":!0,"vm-explore-logs-body-header_mobile":r}),children:[mt("div",{className:"vm-section-header__tabs",children:[mt(er,{activeItem:String(s),items:da,onChange:e=>{c(e),i({view:e})}}),mt("div",{className:"vm-explore-logs-body-header__log-info",children:["Total logs returned: ",mt("b",{children:n.length})]})]}),s===ua.table&&mt("div",{className:"vm-explore-logs-body-header__settings",children:mt(Ur,{columns:m,defaultColumns:u,onChangeColumns:d,tableCompact:h,toggleTableCompact:p})}),s===ua.group&&mt("div",{className:"vm-explore-logs-body-header__settings",ref:l})]}),mt("div",{className:Kn()({"vm-explore-logs-body__table":!0,"vm-explore-logs-body__table_mobile":r}),children:[!n.length&&mt("div",{className:"vm-explore-logs-body__empty",children:"No logs found"}),!!n.length&&mt(pt.FK,{children:[s===ua.table&&mt(Zr,{logs:f,displayColumns:u,tableCompact:h,columns:m}),s===ua.group&&mt(Jr,{logs:f,columns:m,settingsRef:l}),s===ua.json&&mt(Dr,{data:n})]})]})]})},pa=(e,n,r)=>{const[a]=$e(),[i,l]=(0,t.useState)([]),[s,c]=(0,t.useState)([]),[u,d]=(0,t.useState)(),h=(0,t.useRef)(new AbortController),p=(0,t.useMemo)((()=>(e=>"".concat(e,"/select/logsql/query"))(e)),[e]),f=e=>{try{return JSON.parse(e)}catch(zd){return null}},m=(0,t.useCallback)((async e=>{h.current.abort(),h.current=new AbortController;const{signal:t}=h.current,i=Date.now();c((e=>({...e,[i]:!0}))),d(void 0);try{const s=((e,t,n,r)=>({signal:r,method:"POST",headers:{Accept:"application/stream+json",AccountID:a.get("accountID")||"0",ProjectID:a.get("projectID")||"0"},body:new URLSearchParams({query:e.trim(),limit:"".concat(n),start:o()(1e3*t.start).tz().toISOString(),end:o()(1e3*t.end).tz().toISOString()})}))(n,e,r,t),u=await fetch(p,s),h=await u.text();if(!u.ok||!u.body)return d(h),l([]),c((e=>({...e,[i]:!1}))),!1;const m=h.split("\n").filter((e=>e)).slice(0,r).map(f).filter((e=>e));return l(m),c((e=>({...e,[i]:!1}))),!0}catch(zd){return c((e=>({...e,[i]:!1}))),zd instanceof Error&&"AbortError"!==zd.name&&(d(String(zd)),console.error(zd),l([])),!1}}),[p,n,r,a]);return{logs:i,isLoading:Object.values(s).some((e=>e)),error:u,fetchLogs:m}},fa=e=>{let{containerStyles:t,message:n}=e;const{isDarkTheme:r}=gt();return mt("div",{className:Kn()({"vm-spinner":!0,"vm-spinner_dark":r}),style:t,children:[mt("div",{className:"half-circle-spinner",children:[mt("div",{className:"circle circle-1"}),mt("div",{className:"circle circle-2"})]}),n&&mt("div",{className:"vm-spinner__message",children:n})]})};var ma=function(e){return e[e.mouse=0]="mouse",e[e.keyboard=1]="keyboard",e}(ma||{});const _a=e=>{var n;let{value:r,options:o,anchor:a,disabled:i,minLength:l=2,fullWidth:s,selected:c,noOptionsText:u,label:d,disabledFullScreen:h,offset:p,maxDisplayResults:f,loading:m,onSelect:_,onOpenAutocomplete:g,onFoundOptions:v,onChangeWrapperRef:y}=e;const{isMobile:b}=vr(),w=(0,t.useRef)(null),[k,x]=(0,t.useState)({index:-1}),[S,A]=(0,t.useState)(""),[E,C]=(0,t.useState)(0),{value:M,setValue:N,setFalse:T}=Fr(!1),P=(0,t.useMemo)((()=>{if(!M)return[];try{const e=new RegExp(String(r.trim()),"i"),t=o.filter((t=>e.test(t.value))).sort(((t,n)=>{var o,a;return t.value.toLowerCase()===r.trim().toLowerCase()?-1:n.value.toLowerCase()===r.trim().toLowerCase()?1:((null===(o=t.value.match(e))||void 0===o?void 0:o.index)||0)-((null===(a=n.value.match(e))||void 0===a?void 0:a.index)||0)}));return C(t.length),A(t.length>Number(null===f||void 0===f?void 0:f.limit)&&(null===f||void 0===f?void 0:f.message)||""),null!==f&&void 0!==f&&f.limit?t.slice(0,f.limit):t}catch(zd){return[]}}),[M,o,r]),D=(0,t.useMemo)((()=>{var e;return 1===P.length&&(null===(e=P[0])||void 0===e?void 0:e.value)===r}),[P]),O=(0,t.useMemo)((()=>u&&!P.length),[u,P]),R=()=>{x({index:-1})},L=(0,t.useCallback)((e=>{const{key:t,ctrlKey:n,metaKey:r,shiftKey:o}=e,a=n||r||o,i=P.length&&!D;if("ArrowUp"===t&&!a&&i&&(e.preventDefault(),x((e=>{let{index:t}=e;return{index:t<=0?0:t-1,type:ma.keyboard}}))),"ArrowDown"===t&&!a&&i){e.preventDefault();const t=P.length-1;x((e=>{let{index:n}=e;return{index:n>=t?t:n+1,type:ma.keyboard}}))}if("Enter"===t){const e=P[k.index];e&&_(e.value),c||T()}"Escape"===t&&T()}),[k,P,D,T,_,c]);return(0,t.useEffect)((()=>{N(r.length>=l)}),[r,o]),Jn("keydown",L),(0,t.useEffect)((()=>{if(!w.current||k.type===ma.mouse)return;const e=w.current.childNodes[k.index];null!==e&&void 0!==e&&e.scrollIntoView&&e.scrollIntoView({block:"center"})}),[k,P]),(0,t.useEffect)((()=>{x({index:-1})}),[P]),(0,t.useEffect)((()=>{g&&g(M)}),[M]),(0,t.useEffect)((()=>{v&&v(D?[]:P)}),[P,D]),(0,t.useEffect)((()=>{y&&y(w)}),[w]),mt(Ir,{open:M,buttonRef:a,placement:"bottom-left",onClose:T,fullWidth:s,title:b?d:void 0,disabledFullScreen:h,offset:p,children:[mt("div",{className:Kn()({"vm-autocomplete":!0,"vm-autocomplete_mobile":b&&!h}),ref:w,children:[m&&mt("div",{className:"vm-autocomplete__loader",children:[mt(bn,{}),mt("span",{children:"Loading..."})]}),O&&mt("div",{className:"vm-autocomplete__no-options",children:u}),!D&&P.map(((e,t)=>{return mt("div",{className:Kn()({"vm-list-item":!0,"vm-list-item_mobile":b,"vm-list-item_active":t===k.index,"vm-list-item_multiselect":c,"vm-list-item_multiselect_selected":null===c||void 0===c?void 0:c.includes(e.value),"vm-list-item_with-icon":e.icon}),id:"$autocomplete$".concat(e.value),onClick:(r=e.value,()=>{i||(_(r),c||T())}),onMouseEnter:(n=t,()=>{x({index:n,type:ma.mouse})}),onMouseLeave:R,children:[(null===c||void 0===c?void 0:c.includes(e.value))&&mt(Pn,{}),mt(pt.FK,{children:e.icon}),mt("span",{children:e.value})]},"".concat(t).concat(e.value));var n,r}))]}),S&&mt("div",{className:"vm-autocomplete-message",children:["Shown ",null===f||void 0===f?void 0:f.limit," results out of ",E,". ",S]}),(null===(n=P[k.index])||void 0===n?void 0:n.description)&&mt("div",{className:"vm-autocomplete-info",children:[mt("div",{className:"vm-autocomplete-info__type",children:P[k.index].type}),mt("div",{className:"vm-autocomplete-info__description",dangerouslySetInnerHTML:{__html:P[k.index].description||""}})]})]})};var ga=n(267),va=n.n(ga);const ya=e=>e.replace(/[/\-\\^$*+?.()|[\]{}]/g,"\\$&"),ba=e=>JSON.stringify(e).slice(1,-1),wa=e=>{const t=e.match(/["`']/g);return!!t&&t.length%2!==0};var ka=function(e){return e.metric="metric",e.label="label",e.labelValue="labelValue",e}(ka||{});const xa={[ka.metric]:mt(Hn,{}),[ka.label]:mt(Bn,{}),[ka.labelValue]:mt(Un,{})},Sa=n.p+"static/media/MetricsQL.a00044c91d9781cf8557.md",Aa=e=>{const t='$1 target="_blank" class="'.concat("vm-link vm-link_colored",'" $2').concat("https://docs.victoriametrics.com/MetricsQL.html","#");return e.replace(/({var n;const r="h3"===e.tagName.toLowerCase();return t=r?null!==(n=e.textContent)&&void 0!==n?n:"":t,r?null:((e,t)=>{var n;const r=null!==(n=t.textContent)&&void 0!==n?n:"",o=(e=>{const t=[];let n=e.nextElementSibling;for(;n&&"p"===n.tagName.toLowerCase();)n&&t.push(n),n=n.nextElementSibling;return t})(t).map((e=>{var t;return null!==(t=e.outerHTML)&&void 0!==t?t:""})).join("\n");return{type:e,value:r,description:Aa(o),icon:mt(Vn,{})}})(t,e)})).filter(Boolean)},Ca=()=>{const{metricsQLFunctions:e}=ln(),n=sn();return(0,t.useEffect)((()=>{e.length||(async()=>{try{const e=await fetch(Sa),t=(e=>{const t=document.createElement("div");t.innerHTML=ca(e);const n=t.querySelectorAll("".concat("h3",", ").concat("h4"));return Ea(n)})(await e.text());n({type:"SET_METRICSQL_FUNCTIONS",payload:t})}catch(zd){console.error("Error fetching or processing the MetricsQL.md file:",zd)}})()}),[]),e},Ma=e=>{let{value:n,anchorEl:r,caretPosition:a,hasHelperText:i,onSelect:l,onFoundOptions:s}=e;const[c,u]=(0,t.useState)({top:0,left:0}),d=Ca(),h=(0,t.useMemo)((()=>{if(a[0]!==a[1])return{beforeCursor:n,afterCursor:""};return{beforeCursor:n.substring(0,a[0]),afterCursor:n.substring(a[1])}}),[n,a]),p=(0,t.useMemo)((()=>{const e=h.beforeCursor.split(/\s(or|and|unless|default|ifnot|if|group_left|group_right)\s|}|\+|\|-|\*|\/|\^/i);return e[e.length-1]}),[h]),f=(0,t.useMemo)((()=>{const e=[...p.matchAll(/\w+\((?[^)]+)\)\s+(by|without|on|ignoring)\s*\(\w*/gi)];if(e.length>0&&e[0].groups&&e[0].groups.metricName)return e[0].groups.metricName;const t=[...p.matchAll(/^\s*\b(?[^{}(),\s]+)(?={|$)/g)];return t.length>0&&t[0].groups&&t[0].groups.metricName?t[0].groups.metricName:""}),[p]),m=(0,t.useMemo)((()=>{const e=p.match(/[a-z_:-][\w\-.:/]*\b(?=\s*(=|!=|=~|!~))/g);return e?e[e.length-1]:""}),[p]),_=(0,t.useMemo)((()=>{const e=h.beforeCursor.trim(),t=["}",")"].some((t=>e.endsWith(t))),n=!wa(e)&&["`","'",'"'].some((t=>e.endsWith(t)));if(!h.beforeCursor||t||n||(e=>{const t=e.split(/\s+/),n=t.length,r=t[n-1],o=t[n-2],a=!r&&wa(e),i=(!r||t.length>1)&&!/([{(),+\-*/^]|\b(?:or|and|unless|default|ifnot|if|group_left|group_right|by|without|on|ignoring)\b)/i.test(o);return a||i})(h.beforeCursor))return at.empty;const r=/(?:by|without|on|ignoring)\s*\(\s*[^)]*$|\{[^}]*$/i,o="(".concat(ya(f),")?{?.+").concat(ya(m),'(=|!=|=~|!~)"?([^"]*)$');switch(!0){case new RegExp(o,"g").test(h.beforeCursor):return at.labelValue;case r.test(h.beforeCursor):return at.label;default:return at.metricsql}}),[h,f,m]),g=(0,t.useMemo)((()=>{const e=h.beforeCursor.match(/([\w_.:]+(?![},]))$/);return e?e[0]:""}),[h.beforeCursor]),{metrics:v,labels:y,labelValues:b,loading:w}=(e=>{let{valueByContext:n,metric:r,label:a,context:i}=e;const{serverUrl:l}=gt(),{period:{start:s,end:c}}=Gt(),{autocompleteCache:u}=ln(),d=sn(),[h,p]=(0,t.useState)(!1),[f,m]=(0,t.useState)(n),_=va()(m,500);(0,t.useEffect)((()=>(_(n),_.cancel)),[n,_]);const[g,v]=(0,t.useState)([]),[y,b]=(0,t.useState)([]),[w,k]=(0,t.useState)([]),x=(0,t.useRef)(new AbortController),S=(0,t.useCallback)((e=>{const t=o()(1e3*s).startOf("day").valueOf()/1e3,n=o()(1e3*c).endOf("day").valueOf()/1e3;return new URLSearchParams({...e||{},limit:"".concat(en),start:"".concat(t),end:"".concat(n)})}),[s,c]),A=(e,t)=>e.map((e=>({value:e,type:"".concat(t),icon:xa[t]}))),E=async e=>{let{value:t,urlSuffix:n,setter:r,type:o,params:a}=e;if(!t&&o===ka.metric)return;x.current.abort(),x.current=new AbortController;const{signal:i}=x.current,s={type:o,value:t,start:(null===a||void 0===a?void 0:a.get("start"))||"",end:(null===a||void 0===a?void 0:a.get("end"))||"",match:(null===a||void 0===a?void 0:a.get("match[]"))||""};p(!0);try{const e=u.get(s);if(e)return r(A(e,o)),void p(!1);const t=await fetch("".concat(l,"/api/v1/").concat(n,"?").concat(a),{signal:i});if(t.ok){const{data:e}=await t.json();r(A(e,o)),d({type:"SET_AUTOCOMPLETE_CACHE",payload:{key:s,value:e}})}p(!1)}catch(zd){zd instanceof Error&&"AbortError"!==zd.name&&(d({type:"SET_AUTOCOMPLETE_CACHE",payload:{key:s,value:[]}}),p(!1),console.error(zd))}};return(0,t.useEffect)((()=>{const e=i!==at.metricsql&&i!==at.empty;if(!l||!r||e)return;v([]);const t=ba(ya(r));return E({value:f,urlSuffix:"label/__name__/values",setter:v,type:ka.metric,params:S({"match[]":'{__name__=~".*'.concat(t,'.*"}')})}),()=>{var e;return null===(e=x.current)||void 0===e?void 0:e.abort()}}),[l,f,i,r]),(0,t.useEffect)((()=>{if(!l||i!==at.label)return;b([]);const e=ba(r);return E({value:f,urlSuffix:"labels",setter:b,type:ka.label,params:S(r?{"match[]":'{__name__="'.concat(e,'"}')}:void 0)}),()=>{var e;return null===(e=x.current)||void 0===e?void 0:e.abort()}}),[l,f,i,r]),(0,t.useEffect)((()=>{if(!l||!a||i!==at.labelValue)return;k([]);const e=ba(r),t=ba(ya(f)),n=[r?'__name__="'.concat(e,'"'):"","".concat(a,'=~".*').concat(t,'.*"')].filter(Boolean).join(",");return E({value:f,urlSuffix:"label/".concat(a,"/values"),setter:k,type:ka.labelValue,params:S({"match[]":"{".concat(n,"}")})}),()=>{var e;return null===(e=x.current)||void 0===e?void 0:e.abort()}}),[l,f,i,r,a]),{metrics:g,labels:y,labelValues:w,loading:h}})({valueByContext:g,metric:f,label:m,context:_}),k=(0,t.useMemo)((()=>{switch(_){case at.metricsql:return[...v,...d];case at.label:return y;case at.labelValue:return b;default:return[]}}),[_,v,y,b]),x=(0,t.useCallback)((e=>{const t=h.beforeCursor;let n=h.afterCursor;const r=t.lastIndexOf(g,a[0]),o=r+g.length,i=t.substring(0,r),s=t.substring(o);if(_===at.labelValue){const t='"';n=n.replace(/^[^\s"|},]*/,"");const r=/(?:=|!=|=~|!~)$/.test(i),o='"'!==n.trim()[0];e="".concat(r?t:"").concat(e).concat(o?t:"")}_===at.label&&(n=n.replace(/^[^\s=!,{}()"|+\-/*^]*/,"")),_===at.metricsql&&(n=n.replace(/^[^\s[\]{}()"|+\-/*^]*/,""));const c="".concat(i).concat(e).concat(s).concat(n);l(c,i.length+e.length)}),[h]);return(0,t.useEffect)((()=>{if(!r.current)return void u({top:0,left:0});const e=r.current.querySelector("textarea")||r.current,t=window.getComputedStyle(e),n="".concat(t.getPropertyValue("font-size")),o="".concat(t.getPropertyValue("font-family")),a=parseInt("".concat(t.getPropertyValue("line-height"))),l=document.createElement("div");l.style.font="".concat(n," ").concat(o),l.style.padding=t.getPropertyValue("padding"),l.style.lineHeight="".concat(a,"px"),l.style.width="".concat(e.offsetWidth,"px"),l.style.maxWidth="".concat(e.offsetWidth,"px"),l.style.whiteSpace=t.getPropertyValue("white-space"),l.style.overflowWrap=t.getPropertyValue("overflow-wrap");const s=document.createElement("span");l.appendChild(document.createTextNode(h.beforeCursor)),l.appendChild(s),l.appendChild(document.createTextNode(h.afterCursor)),document.body.appendChild(l);const c=l.getBoundingClientRect(),d=s.getBoundingClientRect(),p=d.left-c.left,f=d.bottom-c.bottom-(i?a:0);u({top:f,left:p}),l.remove(),s.remove()}),[r,a,i]),mt(pt.FK,{children:mt(_a,{loading:w,disabledFullScreen:!0,value:g,options:k,anchor:r,minLength:0,offset:c,onSelect:x,onFoundOptions:s,maxDisplayResults:{limit:Xt,message:"Please, specify the query more precisely."}})})},Na="No match! \nThis query hasn't selected any time series from database.\nEither the requested metrics are missing in the database,\nor there is a typo in series selector.",Ta="The shown results are marked as PARTIAL.\nThe result is marked as partial if one or more vmstorage nodes failed to respond to the query.",Pa=e=>{let{value:n,onChange:r,onEnter:o,onArrowUp:a,onArrowDown:i,autocomplete:l,error:s,stats:c,label:u,disabled:d=!1}=e;const{autocompleteQuick:h}=ln(),{isMobile:p}=vr(),[f,m]=(0,t.useState)(!1),[_,g]=(0,t.useState)([0,0]),v=(0,t.useRef)(null),[y,b]=(0,t.useState)(l),w=(0,t.useRef)(va()(b,500)).current,k=[{show:"0"===(null===c||void 0===c?void 0:c.seriesFetched)&&!c.resultLength,text:Na},{show:null===c||void 0===c?void 0:c.isPartial,text:Ta}].filter((e=>e.show)).map((e=>e.text)).join("");c&&(u="".concat(u," (").concat(c.executionTimeMsec||0,"ms)"));return(0,t.useEffect)((()=>{m(l)}),[h]),(0,t.useEffect)((()=>{b(!1),w(!0)}),[_]),mt("div",{className:"vm-query-editor",ref:v,children:[mt(Vr,{value:n,label:u,type:"textarea",autofocus:!p,error:s,warning:k,onKeyDown:e=>{const{key:t,ctrlKey:n,metaKey:r,shiftKey:l}=e,s=(e.target.value||"").split("\n").length>1,c=n||r,u="ArrowDown"===t,d="Enter"===t;"ArrowUp"===t&&c&&(e.preventDefault(),a()),u&&c&&(e.preventDefault(),i()),d&&f&&e.preventDefault(),!d||l||s&&!c||f||(e.preventDefault(),o())},onChange:r,onChangeCaret:e=>{g((t=>t[0]===e[0]&&t[1]===e[1]?t:e))},disabled:d,inputmode:"search",caretPosition:_}),y&&l&&mt(Ma,{value:n,anchorEl:v,caretPosition:_,hasHelperText:Boolean(k||s),onSelect:(e,t)=>{r(e),g([t,t])},onFoundOptions:e=>{m(!!e.length)}})]})},Da=e=>{let{query:n,limit:r,error:o,onChange:a,onChangeLimit:i,onRun:l}=e;const{isMobile:s}=vr(),[c,u]=(0,t.useState)(""),[d,h]=(0,t.useState)(r);return(0,t.useEffect)((()=>{h(r)}),[r]),mt("div",{className:Kn()({"vm-explore-logs-header":!0,"vm-block":!0,"vm-block_mobile":s}),children:[mt("div",{className:"vm-explore-logs-header-top",children:[mt(Pa,{value:n,autocomplete:!1,onArrowUp:()=>null,onArrowDown:()=>null,onEnter:l,onChange:a,label:"Log query",error:o}),mt(Vr,{label:"Limit entries",type:"number",value:d,error:c,onChange:e=>{const t=+e;h(t),isNaN(t)||t<0?u("Number must be bigger than zero"):(u(""),i(t))},onEnter:l})]}),mt("div",{className:"vm-explore-logs-header-bottom",children:[mt("div",{className:"vm-explore-logs-header-bottom-contols"}),mt("div",{className:"vm-explore-logs-header-bottom-helpful",children:[mt("a",{className:"vm-link vm-link_with-icon",target:"_blank",href:"https://docs.victoriametrics.com/victorialogs/logsql/",rel:"help noreferrer",children:[mt(_n,{}),"Query language docs"]}),mt("a",{className:"vm-link vm-link_with-icon",target:"_blank",href:"https://docs.victoriametrics.com/victorialogs/",rel:"help noreferrer",children:[mt(Ln,{}),"Documentation"]})]}),mt("div",{className:"vm-explore-logs-header-bottom__execute",children:mt(Pr,{startIcon:mt(Cn,{}),onClick:l,fullWidth:!0,children:"Execute Query"})})]})]})},Oa=()=>{const[e,n]=(0,t.useState)(null),[r,o]=(0,t.useState)({width:0,height:0}),a=(0,t.useCallback)((()=>{o({width:(null===e||void 0===e?void 0:e.offsetWidth)||0,height:(null===e||void 0===e?void 0:e.offsetHeight)||0})}),[null===e||void 0===e?void 0:e.offsetHeight,null===e||void 0===e?void 0:e.offsetWidth]);return Jn("resize",a),(0,t.useEffect)(a,[null===e||void 0===e?void 0:e.offsetHeight,null===e||void 0===e?void 0:e.offsetWidth]),[n,r]},Ra="u-off",La="u-label",Ia="width",za="height",ja="top",$a="bottom",Fa="left",Ha="right",Va="#000",Ba=Va+"0",Ua="mousemove",Ya="mousedown",Wa="mouseup",qa="mouseenter",Za="mouseleave",Ka="dblclick",Ga="change",Qa="dppxchange",Ja="--",Xa="undefined"!=typeof window,ei=Xa?document:null,ti=Xa?window:null,ni=Xa?navigator:null;let ri,oi;function ai(e,t){if(null!=t){let n=e.classList;!n.contains(t)&&n.add(t)}}function ii(e,t){let n=e.classList;n.contains(t)&&n.remove(t)}function li(e,t,n){e.style[t]=n+"px"}function si(e,t,n,r){let o=ei.createElement(e);return null!=t&&ai(o,t),null!=n&&n.insertBefore(o,r),o}function ci(e,t){return si("div",e,t)}const ui=new WeakMap;function di(e,t,n,r,o){let a="translate("+t+"px,"+n+"px)";a!=ui.get(e)&&(e.style.transform=a,ui.set(e,a),t<0||n<0||t>r||n>o?ai(e,Ra):ii(e,Ra))}const hi=new WeakMap;function pi(e,t,n){let r=t+n;r!=hi.get(e)&&(hi.set(e,r),e.style.background=t,e.style.borderColor=n)}const fi=new WeakMap;function mi(e,t,n,r){let o=t+""+n;o!=fi.get(e)&&(fi.set(e,o),e.style.height=n+"px",e.style.width=t+"px",e.style.marginLeft=r?-t/2+"px":0,e.style.marginTop=r?-n/2+"px":0)}const _i={passive:!0},gi={..._i,capture:!0};function vi(e,t,n,r){t.addEventListener(e,n,r?gi:_i)}function yi(e,t,n,r){t.removeEventListener(e,n,r?gi:_i)}function bi(e,t,n,r){let o;n=n||0;let a=(r=r||t.length-1)<=2147483647;for(;r-n>1;)o=a?n+r>>1:Ii((n+r)/2),t[o]=t&&o<=n;o+=r)if(null!=e[o])return o;return-1}function ki(e,t,n,r){let o=Vi(e),a=Vi(t);e==t&&(-1==o?(e*=n,t/=n):(e/=n,t*=n));let i=10==n?Bi:Ui,l=1==a?ji:Ii,s=(1==o?Ii:ji)(i(Li(e))),c=l(i(Li(t))),u=Hi(n,s),d=Hi(n,c);return 10==n&&(s<0&&(u=al(u,-s)),c<0&&(d=al(d,-c))),r||2==n?(e=u*o,t=d*a):(e=ol(e,u),t=rl(t,d)),[e,t]}function xi(e,t,n,r){let o=ki(e,t,n,r);return 0==e&&(o[0]=0),0==t&&(o[1]=0),o}Xa&&function e(){let t=devicePixelRatio;ri!=t&&(ri=t,oi&&yi(Ga,oi,e),oi=matchMedia("(min-resolution: ".concat(ri-.001,"dppx) and (max-resolution: ").concat(ri+.001,"dppx)")),vi(Ga,oi,e),ti.dispatchEvent(new CustomEvent(Qa)))}();const Si=.1,Ai={mode:3,pad:Si},Ei={pad:0,soft:null,mode:0},Ci={min:Ei,max:Ei};function Mi(e,t,n,r){return ml(n)?Ti(e,t,n):(Ei.pad=n,Ei.soft=r?0:null,Ei.mode=r?3:0,Ti(e,t,Ci))}function Ni(e,t){return null==e?t:e}function Ti(e,t,n){let r=n.min,o=n.max,a=Ni(r.pad,0),i=Ni(o.pad,0),l=Ni(r.hard,-Wi),s=Ni(o.hard,Wi),c=Ni(r.soft,Wi),u=Ni(o.soft,-Wi),d=Ni(r.mode,0),h=Ni(o.mode,0),p=t-e,f=Bi(p),m=Fi(Li(e),Li(t)),_=Bi(m),g=Li(_-f);(p<1e-9||g>10)&&(p=0,0!=e&&0!=t||(p=1e-9,2==d&&c!=Wi&&(a=0),2==h&&u!=-Wi&&(i=0)));let v=p||m||1e3,y=Bi(v),b=Hi(10,Ii(y)),w=al(ol(e-v*(0==p?0==e?.1:1:a),b/10),9),k=e>=c&&(1==d||3==d&&w<=c||2==d&&w>=c)?c:Wi,x=Fi(l,w=k?k:$i(k,w)),S=al(rl(t+v*(0==p?0==t?.1:1:i),b/10),9),A=t<=u&&(1==h||3==h&&S>=u||2==h&&S<=u)?u:-Wi,E=$i(s,S>A&&t<=A?A:Fi(A,S));return x==E&&0==x&&(E=100),[x,E]}const Pi=new Intl.NumberFormat(Xa?ni.language:"en-US"),Di=e=>Pi.format(e),Oi=Math,Ri=Oi.PI,Li=Oi.abs,Ii=Oi.floor,zi=Oi.round,ji=Oi.ceil,$i=Oi.min,Fi=Oi.max,Hi=Oi.pow,Vi=Oi.sign,Bi=Oi.log10,Ui=Oi.log2,Yi=function(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:1;return Oi.asinh(e/t)},Wi=1/0;function qi(e){return 1+(0|Bi((e^e>>31)-(e>>31)))}function Zi(e,t,n){return $i(Fi(e,t),n)}function Ki(e){return"function"==typeof e?e:()=>e}const Gi=e=>e,Qi=(e,t)=>t,Ji=e=>null,Xi=e=>!0,el=(e,t)=>e==t,tl=e=>al(e,14);function nl(e,t){return tl(al(tl(e/t))*t)}function rl(e,t){return tl(ji(tl(e/t))*t)}function ol(e,t){return tl(Ii(tl(e/t))*t)}function al(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:0;if(pl(e))return e;let n=10**t,r=e*n*(1+Number.EPSILON);return zi(r)/n}const il=new Map;function ll(e){return((""+e).split(".")[1]||"").length}function sl(e,t,n,r){let o=[],a=r.map(ll);for(let i=t;i=0&&i>=0?0:t)+(i>=a[e]?0:a[e]),c=al(l,s);o.push(c),il.set(c,s)}}return o}const cl={},ul=[],dl=[null,null],hl=Array.isArray,pl=Number.isInteger;function fl(e){return"string"==typeof e}function ml(e){let t=!1;if(null!=e){let n=e.constructor;t=null==n||n==Object}return t}function _l(e){return null!=e&&"object"==typeof e}const gl=Object.getPrototypeOf(Uint8Array);function vl(e){let t,n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:ml;if(hl(e)){let r=e.find((e=>null!=e));if(hl(r)||n(r)){t=Array(e.length);for(let r=0;ra){for(r=i-1;r>=0&&null==e[r];)e[r--]=null;for(r=i+1;rPromise.resolve().then(e):queueMicrotask;const kl=["January","February","March","April","May","June","July","August","September","October","November","December"],xl=["Sunday","Monday","Tuesday","Wednesday","Thursday","Friday","Saturday"];function Sl(e){return e.slice(0,3)}const Al=xl.map(Sl),El=kl.map(Sl),Cl={MMMM:kl,MMM:El,WWWW:xl,WWW:Al};function Ml(e){return(e<10?"0":"")+e}const Nl={YYYY:e=>e.getFullYear(),YY:e=>(e.getFullYear()+"").slice(2),MMMM:(e,t)=>t.MMMM[e.getMonth()],MMM:(e,t)=>t.MMM[e.getMonth()],MM:e=>Ml(e.getMonth()+1),M:e=>e.getMonth()+1,DD:e=>Ml(e.getDate()),D:e=>e.getDate(),WWWW:(e,t)=>t.WWWW[e.getDay()],WWW:(e,t)=>t.WWW[e.getDay()],HH:e=>Ml(e.getHours()),H:e=>e.getHours(),h:e=>{let t=e.getHours();return 0==t?12:t>12?t-12:t},AA:e=>e.getHours()>=12?"PM":"AM",aa:e=>e.getHours()>=12?"pm":"am",a:e=>e.getHours()>=12?"p":"a",mm:e=>Ml(e.getMinutes()),m:e=>e.getMinutes(),ss:e=>Ml(e.getSeconds()),s:e=>e.getSeconds(),fff:e=>{return((t=e.getMilliseconds())<10?"00":t<100?"0":"")+t;var t}};function Tl(e,t){t=t||Cl;let n,r=[],o=/\{([a-z]+)\}|[^{]+/gi;for(;n=o.exec(e);)r.push("{"==n[0][0]?Nl[n[1]]:n[0]);return e=>{let n="";for(let o=0;oe%1==0,Ol=[1,2,2.5,5],Rl=sl(10,-16,0,Ol),Ll=sl(10,0,16,Ol),Il=Ll.filter(Dl),zl=Rl.concat(Ll),jl="{YYYY}",$l="\n"+jl,Fl="{M}/{D}",Hl="\n"+Fl,Vl=Hl+"/{YY}",Bl="{aa}",Ul="{h}:{mm}"+Bl,Yl="\n"+Ul,Wl=":{ss}",ql=null;function Zl(e){let t=1e3*e,n=60*t,r=60*n,o=24*r,a=30*o,i=365*o;return[(1==e?sl(10,0,3,Ol).filter(Dl):sl(10,-3,0,Ol)).concat([t,5*t,10*t,15*t,30*t,n,5*n,10*n,15*n,30*n,r,2*r,3*r,4*r,6*r,8*r,12*r,o,2*o,3*o,4*o,5*o,6*o,7*o,8*o,9*o,10*o,15*o,a,2*a,3*a,4*a,6*a,i,2*i,5*i,10*i,25*i,50*i,100*i]),[[i,jl,ql,ql,ql,ql,ql,ql,1],[28*o,"{MMM}",$l,ql,ql,ql,ql,ql,1],[o,Fl,$l,ql,ql,ql,ql,ql,1],[r,"{h}"+Bl,Vl,ql,Hl,ql,ql,ql,1],[n,Ul,Vl,ql,Hl,ql,ql,ql,1],[t,Wl,Vl+" "+Ul,ql,Hl+" "+Ul,ql,Yl,ql,1],[e,Wl+".{fff}",Vl+" "+Ul,ql,Hl+" "+Ul,ql,Yl,ql,1]],function(t){return(l,s,c,u,d,h)=>{let p=[],f=d>=i,m=d>=a&&d=o?o:d,i=y+(Ii(c)-Ii(g))+rl(g-y,a);p.push(i);let f=t(i),m=f.getHours()+f.getMinutes()/n+f.getSeconds()/r,_=d/r,v=h/l.axes[s]._space;for(;i=al(i+d,1==e?0:3),!(i>u);)if(_>1){let e=Ii(al(m+_,6))%24,n=t(i).getHours()-e;n>1&&(n=-1),i-=n*r,m=(m+_)%24,al((i-p[p.length-1])/d,3)*v>=.7&&p.push(i)}else p.push(i)}return p}}]}const[Kl,Gl,Ql]=Zl(1),[Jl,Xl,es]=Zl(.001);function ts(e,t){return e.map((e=>e.map(((n,r)=>0==r||8==r||null==n?n:t(1==r||0==e[8]?n:e[1]+n)))))}function ns(e,t){return(n,r,o,a,i)=>{let l,s,c,u,d,h,p=t.find((e=>i>=e[0]))||t[t.length-1];return r.map((t=>{let n=e(t),r=n.getFullYear(),o=n.getMonth(),a=n.getDate(),i=n.getHours(),f=n.getMinutes(),m=n.getSeconds(),_=r!=l&&p[2]||o!=s&&p[3]||a!=c&&p[4]||i!=u&&p[5]||f!=d&&p[6]||m!=h&&p[7]||p[1];return l=r,s=o,c=a,u=i,d=f,h=m,_(n)}))}}function rs(e,t,n){return new Date(e,t,n)}function os(e,t){return t(e)}sl(2,-53,53,[1]);function as(e,t){return(n,r,o,a)=>null==a?Ja:t(e(r))}const is={show:!0,live:!0,isolate:!1,mount:()=>{},markers:{show:!0,width:2,stroke:function(e,t){let n=e.series[t];return n.width?n.stroke(e,t):n.points.width?n.points.stroke(e,t):null},fill:function(e,t){return e.series[t].fill(e,t)},dash:"solid"},idx:null,idxs:null,values:[]};const ls=[0,0];function ss(e,t,n){let r=!(arguments.length>3&&void 0!==arguments[3])||arguments[3];return e=>{0==e.button&&(!r||e.target==t)&&n(e)}}function cs(e,t,n){let r=!(arguments.length>3&&void 0!==arguments[3])||arguments[3];return e=>{(!r||e.target==t)&&n(e)}}const us={show:!0,x:!0,y:!0,lock:!1,move:function(e,t,n){return ls[0]=t,ls[1]=n,ls},points:{show:function(e,t){let n=e.cursor.points,r=ci(),o=n.size(e,t);li(r,Ia,o),li(r,za,o);let a=o/-2;li(r,"marginLeft",a),li(r,"marginTop",a);let i=n.width(e,t,o);return i&&li(r,"borderWidth",i),r},size:function(e,t){return e.series[t].points.size},width:0,stroke:function(e,t){let n=e.series[t].points;return n._stroke||n._fill},fill:function(e,t){let n=e.series[t].points;return n._fill||n._stroke}},bind:{mousedown:ss,mouseup:ss,click:ss,dblclick:ss,mousemove:cs,mouseleave:cs,mouseenter:cs},drag:{setScale:!0,x:!0,y:!1,dist:0,uni:null,click:(e,t)=>{t.stopPropagation(),t.stopImmediatePropagation()},_x:!1,_y:!1},focus:{dist:(e,t,n,r,o)=>r-o,prox:-1,bias:0},hover:{skip:[void 0],prox:null,bias:0},left:-10,top:-10,idx:null,dataIdx:null,idxs:null,event:null},ds={show:!0,stroke:"rgba(0,0,0,0.07)",width:2},hs=yl({},ds,{filter:Qi}),ps=yl({},hs,{size:10}),fs=yl({},ds,{show:!1}),ms='12px system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, "Noto Sans", sans-serif, "Apple Color Emoji", "Segoe UI Emoji", "Segoe UI Symbol", "Noto Color Emoji"',_s="bold "+ms,gs={show:!0,scale:"x",stroke:Va,space:50,gap:5,size:50,labelGap:0,labelSize:30,labelFont:_s,side:2,grid:hs,ticks:ps,border:fs,font:ms,lineGap:1.5,rotate:0},vs={show:!0,scale:"x",auto:!1,sorted:1,min:Wi,max:-Wi,idxs:[]};function ys(e,t,n,r,o){return t.map((e=>null==e?"":Di(e)))}function bs(e,t,n,r,o,a,i){let l=[],s=il.get(o)||0;for(let c=n=i?n:al(rl(n,o),s);c<=r;c=al(c+o,s))l.push(Object.is(c,-0)?0:c);return l}function ws(e,t,n,r,o,a,i){const l=[],s=e.scales[e.axes[t].scale].log,c=Ii((10==s?Bi:Ui)(n));o=Hi(s,c),10==s&&c<0&&(o=al(o,-c));let u=n;do{l.push(u),u+=o,10==s&&(u=al(u,il.get(o))),u>=o*s&&(o=u)}while(u<=r);return l}function ks(e,t,n,r,o,a,i){let l=e.scales[e.axes[t].scale].asinh,s=r>l?ws(e,t,Fi(l,n),r,o):[l],c=r>=0&&n<=0?[0]:[];return(n<-l?ws(e,t,Fi(l,-r),-n,o):[l]).reverse().map((e=>-e)).concat(c,s)}const xs=/./,Ss=/[12357]/,As=/[125]/,Es=/1/,Cs=(e,t,n,r)=>e.map(((e,o)=>4==t&&0==e||o%r==0&&n.test(e.toExponential()[e<0?1:0])?e:null));function Ms(e,t,n,r,o){let a=e.axes[n],i=a.scale,l=e.scales[i],s=e.valToPos,c=a._space,u=s(10,i),d=s(9,i)-u>=c?xs:s(7,i)-u>=c?Ss:s(5,i)-u>=c?As:Es;if(d==Es){let e=Li(s(1,i)-u);if(eo,Rs={show:!0,auto:!0,sorted:0,gaps:Os,alpha:1,facets:[yl({},Ds,{scale:"x"}),yl({},Ds,{scale:"y"})]},Ls={scale:"y",auto:!0,sorted:0,show:!0,spanGaps:!1,gaps:Os,alpha:1,points:{show:function(e,t){let{scale:n,idxs:r}=e.series[0],o=e._data[0],a=e.valToPos(o[r[0]],n,!0),i=e.valToPos(o[r[1]],n,!0),l=Li(i-a)/(e.series[t].points.space*ri);return r[1]-r[0]<=l},filter:null},values:null,min:Wi,max:-Wi,idxs:[],path:null,clip:null};function Is(e,t,n,r,o){return n/10}const zs={time:!0,auto:!0,distr:1,log:10,asinh:1,min:null,max:null,dir:1,ori:0},js=yl({},zs,{time:!1,ori:1}),$s={};function Fs(e,t){let n=$s[e];return n||(n={key:e,plots:[],sub(e){n.plots.push(e)},unsub(e){n.plots=n.plots.filter((t=>t!=e))},pub(e,t,r,o,a,i,l){for(let s=0;s{let m=e.pxRound;const _=l.dir*(0==l.ori?1:-1),g=0==l.ori?Js:Xs;let v,y;1==_?(v=n,y=r):(v=r,y=n);let b=m(c(t[v],l,p,d)),w=m(u(i[v],s,f,h)),k=m(c(t[y],l,p,d)),x=m(u(1==a?s.max:s.min,s,f,h)),S=new Path2D(o);return g(S,k,x),g(S,b,x),g(S,b,w),S}))}function Ws(e,t,n,r,o,a){let i=null;if(e.length>0){i=new Path2D;const l=0==t?ec:tc;let s=n;for(let t=0;tn[0]){let e=n[0]-s;e>0&&l(i,s,r,e,r+a),s=n[1]}}let c=n+o-s,u=10;c>0&&l(i,s,r-u/2,c,r+a+u)}return i}function qs(e,t,n,r,o,a,i){let l=[],s=e.length;for(let c=1==o?n:r;c>=n&&c<=r;c+=o){if(null===t[c]){let u=c,d=c;if(1==o)for(;++c<=r&&null===t[c];)d=c;else for(;--c>=n&&null===t[c];)d=c;let h=a(e[u]),p=d==u?h:a(e[d]),f=u-o;h=i<=0&&f>=0&&f=0&&m>=0&&m=h&&l.push([h,p])}}return l}function Zs(e){return 0==e?Gi:1==e?zi:t=>nl(t,e)}function Ks(e){let t=0==e?Gs:Qs,n=0==e?(e,t,n,r,o,a)=>{e.arcTo(t,n,r,o,a)}:(e,t,n,r,o,a)=>{e.arcTo(n,t,o,r,a)},r=0==e?(e,t,n,r,o)=>{e.rect(t,n,r,o)}:(e,t,n,r,o)=>{e.rect(n,t,o,r)};return function(e,o,a,i,l){let s=arguments.length>5&&void 0!==arguments[5]?arguments[5]:0,c=arguments.length>6&&void 0!==arguments[6]?arguments[6]:0;0==s&&0==c?r(e,o,a,i,l):(s=$i(s,i/2,l/2),c=$i(c,i/2,l/2),t(e,o+s,a),n(e,o+i,a,o+i,a+l,s),n(e,o+i,a+l,o,a+l,c),n(e,o,a+l,o,a,c),n(e,o,a,o+i,a,s),e.closePath())}}const Gs=(e,t,n)=>{e.moveTo(t,n)},Qs=(e,t,n)=>{e.moveTo(n,t)},Js=(e,t,n)=>{e.lineTo(t,n)},Xs=(e,t,n)=>{e.lineTo(n,t)},ec=Ks(0),tc=Ks(1),nc=(e,t,n,r,o,a)=>{e.arc(t,n,r,o,a)},rc=(e,t,n,r,o,a)=>{e.arc(n,t,r,o,a)},oc=(e,t,n,r,o,a,i)=>{e.bezierCurveTo(t,n,r,o,a,i)},ac=(e,t,n,r,o,a,i)=>{e.bezierCurveTo(n,t,o,r,i,a)};function ic(e){return(e,t,n,r,o)=>Vs(e,t,((t,a,i,l,s,c,u,d,h,p,f)=>{let m,_,{pxRound:g,points:v}=t;0==l.ori?(m=Gs,_=nc):(m=Qs,_=rc);const y=al(v.width*ri,3);let b=(v.size-v.width)/2*ri,w=al(2*b,3),k=new Path2D,x=new Path2D,{left:S,top:A,width:E,height:C}=e.bbox;ec(x,S-w,A-w,E+2*w,C+2*w);const M=e=>{if(null!=i[e]){let t=g(c(a[e],l,p,d)),n=g(u(i[e],s,f,h));m(k,t+b,n),_(k,t,n,b,0,2*Ri)}};if(o)o.forEach(M);else for(let e=n;e<=r;e++)M(e);return{stroke:y>0?k:null,fill:k,clip:x,flags:2|Hs}}))}function lc(e){return(t,n,r,o,a,i)=>{r!=o&&(a!=r&&i!=r&&e(t,n,r),a!=o&&i!=o&&e(t,n,o),e(t,n,i))}}const sc=lc(Js),cc=lc(Xs);function uc(e){const t=Ni(null===e||void 0===e?void 0:e.alignGaps,0);return(e,n,r,o)=>Vs(e,n,((a,i,l,s,c,u,d,h,p,f,m)=>{let _,g,v=a.pxRound,y=e=>v(u(e,s,f,h)),b=e=>v(d(e,c,m,p));0==s.ori?(_=Js,g=sc):(_=Xs,g=cc);const w=s.dir*(0==s.ori?1:-1),k={stroke:new Path2D,fill:null,clip:null,band:null,gaps:null,flags:Hs},x=k.stroke;let S,A,E,C=Wi,M=-Wi,N=y(i[1==w?r:o]),T=wi(l,r,o,1*w),P=wi(l,r,o,-1*w),D=y(i[T]),O=y(i[P]),R=!1;for(let e=1==w?r:o;e>=r&&e<=o;e+=w){let t=y(i[e]),n=l[e];t==N?null!=n?(A=b(n),C==Wi&&(_(x,t,A),S=A),C=$i(A,C),M=Fi(A,M)):null===n&&(R=!0):(C!=Wi&&(g(x,N,C,M,S,A),E=N),null!=n?(A=b(n),_(x,t,A),C=M=S=A):(C=Wi,M=-Wi,null===n&&(R=!0)),N=t)}C!=Wi&&C!=M&&E!=N&&g(x,N,C,M,S,A);let[L,I]=Bs(e,n);if(null!=a.fill||0!=L){let t=k.fill=new Path2D(x),r=b(a.fillTo(e,n,a.min,a.max,L));_(t,O,r),_(t,D,r)}if(!a.spanGaps){let c=[];R&&c.push(...qs(i,l,r,o,w,y,t)),k.gaps=c=a.gaps(e,n,r,o,c),k.clip=Ws(c,s.ori,h,p,f,m)}return 0!=I&&(k.band=2==I?[Ys(e,n,r,o,x,-1),Ys(e,n,r,o,x,1)]:Ys(e,n,r,o,x,I)),k}))}function dc(e,t,n,r,o,a){let i=arguments.length>6&&void 0!==arguments[6]?arguments[6]:Wi;if(e.length>1){let l=null;for(let s=0,c=1/0;s0!==r[e]>0?n[e]=0:(n[e]=3*(s[e-1]+s[e])/((2*s[e]+s[e-1])/r[e-1]+(s[e]+2*s[e-1])/r[e]),isFinite(n[e])||(n[e]=0));n[i-1]=r[i-2];for(let c=0;c{Nc.pxRatio=ri})));const mc=uc(),_c=ic();function gc(e,t,n,r){return(r?[e[0],e[1]].concat(e.slice(2)):[e[0]].concat(e.slice(1))).map(((e,r)=>vc(e,r,t,n)))}function vc(e,t,n,r){return yl({},0==t?n:r,e)}function yc(e,t,n){return null==t?dl:[t,n]}const bc=yc;function wc(e,t,n){return null==t?dl:Mi(t,n,Si,!0)}function kc(e,t,n,r){return null==t?dl:ki(t,n,e.scales[r].log,!1)}const xc=kc;function Sc(e,t,n,r){return null==t?dl:xi(t,n,e.scales[r].log,!1)}const Ac=Sc;function Ec(e,t,n,r,o){let a=Fi(qi(e),qi(t)),i=t-e,l=bi(o/r*i,n);do{let e=n[l],t=r*e/i;if(t>=o&&a+(e<5?il.get(e):0)<=17)return[e,t]}while(++l(t=zi((n=+r)*ri))+"px")),t,n]}function Mc(e){e.show&&[e.font,e.labelFont].forEach((e=>{let t=al(e[2]*ri,1);e[0]=e[0].replace(/[0-9.]+px/,t+"px"),e[1]=t}))}function Nc(e,t,n){const r={mode:Ni(e.mode,1)},o=r.mode;function a(e,t){return((3==t.distr?Bi(e>0?e:t.clamp(r,e,t.min,t.max,t.key)):4==t.distr?Yi(e,t.asinh):e)-t._min)/(t._max-t._min)}function i(e,t,n,r){let o=a(e,t);return r+n*(-1==t.dir?1-o:o)}function l(e,t,n,r){let o=a(e,t);return r+n*(-1==t.dir?o:1-o)}function s(e,t,n,r){return 0==t.ori?i(e,t,n,r):l(e,t,n,r)}r.valToPosH=i,r.valToPosV=l;let c=!1;r.status=0;const u=r.root=ci("uplot");if(null!=e.id&&(u.id=e.id),ai(u,e.class),e.title){ci("u-title",u).textContent=e.title}const d=si("canvas"),h=r.ctx=d.getContext("2d"),p=ci("u-wrap",u);vi("click",p,(e=>{if(e.target===m){(Nt!=At||Tt!=Et)&&$t.click(r,e)}}),!0);const f=r.under=ci("u-under",p);p.appendChild(d);const m=r.over=ci("u-over",p),_=+Ni((e=vl(e)).pxAlign,1),g=Zs(_);(e.plugins||[]).forEach((t=>{t.opts&&(e=t.opts(r,e)||e)}));const v=e.ms||.001,y=r.series=1==o?gc(e.series||[],vs,Ls,!1):(b=e.series||[null],w=Rs,b.map(((e,t)=>0==t?null:yl({},w,e))));var b,w;const k=r.axes=gc(e.axes||[],gs,Ps,!0),x=r.scales={},S=r.bands=e.bands||[];S.forEach((e=>{e.fill=Ki(e.fill||null),e.dir=Ni(e.dir,-1)}));const A=2==o?y[1].facets[0].scale:y[0].scale,E={axes:function(){for(let e=0;ett[e])):v,b=2==p.distr?tt[v[1]]-tt[v[0]]:u,w=t.ticks,S=t.border,A=w.show?zi(w.size*ri):0,E=t._rotate*-Ri/180,C=g(t._pos*ri),M=C+(A+_)*c;o=0==i?M:0,n=1==i?M:0,it(t.font[0],l,1==t.align?Fa:2==t.align?Ha:E>0?Fa:E<0?Ha:0==i?"center":3==a?Ha:Fa,E||1==i?"middle":2==a?ja:$a);let N=t.font[1]*t.lineGap,T=v.map((e=>g(s(e,p,f,m)))),P=t._values;for(let e=0;e0&&(y.forEach(((e,n)=>{if(n>0&&e.show&&(ct(n,!1),ct(n,!0),null==e._paths)){et!=e.alpha&&(h.globalAlpha=et=e.alpha);let a=2==o?[0,t[n][0].length-1]:function(e){let t=Zi(Ve-1,0,He-1),n=Zi(Be+1,0,He-1);for(;null==e[t]&&t>0;)t--;for(;null==e[n]&&n{if(t>0&&e.show){et!=e.alpha&&(h.globalAlpha=et=e.alpha),null!=e._paths&&ut(t,!1);{let n=null!=e._paths?e._paths.gaps:null,o=e.points.show(r,t,Ve,Be,n),a=e.points.filter(r,t,o,n);(o||a)&&(e.points._paths=e.points.paths(r,t,Ve,Be,a),ut(t,!0))}1!=et&&(h.globalAlpha=et=1),kn("drawSeries",t)}})))}},C=(e.drawOrder||["axes","series"]).map((e=>E[e]));function M(t){let n=x[t];if(null==n){let r=(e.scales||cl)[t]||cl;if(null!=r.from)M(r.from),x[t]=yl({},x[r.from],r,{key:t});else{n=x[t]=yl({},t==A?zs:js,r),n.key=t;let e=n.time,a=n.range,i=hl(a);if((t!=A||2==o&&!e)&&(!i||null!=a[0]&&null!=a[1]||(a={min:null==a[0]?Ai:{mode:1,hard:a[0],soft:a[0]},max:null==a[1]?Ai:{mode:1,hard:a[1],soft:a[1]}},i=!1),!i&&ml(a))){let e=a;a=(t,n,r)=>null==n?dl:Mi(n,r,e)}n.range=Ki(a||(e?bc:t==A?3==n.distr?xc:4==n.distr?Ac:yc:3==n.distr?kc:4==n.distr?Sc:wc)),n.auto=Ki(!i&&n.auto),n.clamp=Ki(n.clamp||Is),n._min=n._max=null}}}M("x"),M("y"),1==o&&y.forEach((e=>{M(e.scale)})),k.forEach((e=>{M(e.scale)}));for(let Nn in e.scales)M(Nn);const N=x[A],T=N.distr;let P,D;0==N.ori?(ai(u,"u-hz"),P=i,D=l):(ai(u,"u-vt"),P=l,D=i);const O={};for(let Nn in x){let e=x[Nn];null==e.min&&null==e.max||(O[Nn]={min:e.min,max:e.max},e.min=e.max=null)}const R=e.tzDate||(e=>new Date(zi(e/v))),L=e.fmtDate||Tl,I=1==v?Ql(R):es(R),z=ns(R,ts(1==v?Gl:Xl,L)),j=as(R,os("{YYYY}-{MM}-{DD} {h}:{mm}{aa}",L)),$=[],F=r.legend=yl({},is,e.legend),H=F.show,V=F.markers;let B,U,Y;F.idxs=$,V.width=Ki(V.width),V.dash=Ki(V.dash),V.stroke=Ki(V.stroke),V.fill=Ki(V.fill);let W,q=[],Z=[],K=!1,G={};if(F.live){const e=y[1]?y[1].values:null;K=null!=e,W=K?e(r,1,0):{_:0};for(let t in W)G[t]=Ja}if(H)if(B=si("table","u-legend",u),Y=si("tbody",null,B),F.mount(r,B),K){U=si("thead",null,B,Y);let e=si("tr",null,U);for(var Q in si("th",null,e),W)si("th",La,e).textContent=Q}else ai(B,"u-inline"),F.live&&ai(B,"u-live");const J={show:!0},X={show:!1};const ee=new Map;function te(e,t,n){let o=!(arguments.length>3&&void 0!==arguments[3])||arguments[3];const a=ee.get(t)||{},i=Ee.bind[e](r,t,n,o);i&&(vi(e,t,a[e]=i),ee.set(t,a))}function ne(e,t,n){const r=ee.get(t)||{};for(let o in r)null!=e&&o!=e||(yi(o,t,r[o]),delete r[o]);null==e&&ee.delete(t)}let re=0,oe=0,ae=0,ie=0,le=0,se=0,ce=le,ue=se,de=ae,he=ie,pe=0,fe=0,me=0,_e=0;r.bbox={};let ge=!1,ve=!1,ye=!1,be=!1,we=!1,ke=!1;function xe(e,t,n){(n||e!=r.width||t!=r.height)&&Se(e,t),vt(!1),ye=!0,ve=!0,Lt()}function Se(e,t){r.width=re=ae=e,r.height=oe=ie=t,le=se=0,function(){let e=!1,t=!1,n=!1,r=!1;k.forEach(((o,a)=>{if(o.show&&o._show){let{side:a,_size:i}=o,l=a%2,s=i+(null!=o.label?o.labelSize:0);s>0&&(l?(ae-=s,3==a?(le+=s,r=!0):n=!0):(ie-=s,0==a?(se+=s,e=!0):t=!0))}})),ze[0]=e,ze[1]=n,ze[2]=t,ze[3]=r,ae-=Fe[1]+Fe[3],le+=Fe[3],ie-=Fe[2]+Fe[0],se+=Fe[0]}(),function(){let e=le+ae,t=se+ie,n=le,r=se;function o(o,a){switch(o){case 1:return e+=a,e-a;case 2:return t+=a,t-a;case 3:return n-=a,n+a;case 0:return r-=a,r+a}}k.forEach(((e,t)=>{if(e.show&&e._show){let t=e.side;e._pos=o(t,e._size),null!=e.label&&(e._lpos=o(t,e.labelSize))}}))}();let n=r.bbox;pe=n.left=nl(le*ri,.5),fe=n.top=nl(se*ri,.5),me=n.width=nl(ae*ri,.5),_e=n.height=nl(ie*ri,.5)}const Ae=3;r.setSize=function(e){let{width:t,height:n}=e;xe(t,n)};const Ee=r.cursor=yl({},us,{drag:{y:2==o}},e.cursor);if(null==Ee.dataIdx){var Ce,Me;let e=Ee.hover,n=e.skip=new Set(null!==(Ce=e.skip)&&void 0!==Ce?Ce:[]);n.add(void 0);let r=e.prox=Ki(e.prox),o=null!==(Me=e.bias)&&void 0!==Me?Me:e.bias=0;Ee.dataIdx=(e,a,i,l)=>{var s;if(0==a)return i;let c=i,u=null!==(s=r(e,a,i,l))&&void 0!==s?s:Wi,d=u>=0&&u0;)n.has(m[e])||(t=e);if(0==o||1==o)for(e=i;null==r&&e++u&&(c=null)}return c}}const Ne=e=>{Ee.event=e};Ee.idxs=$,Ee._lock=!1;let Te=Ee.points;Te.show=Ki(Te.show),Te.size=Ki(Te.size),Te.stroke=Ki(Te.stroke),Te.width=Ki(Te.width),Te.fill=Ki(Te.fill);const Pe=r.focus=yl({},e.focus||{alpha:.3},Ee.focus),De=Pe.prox>=0;let Oe=[null],Re=[null],Le=[null];function Ie(e,t){if(1==o||t>0){let t=1==o&&x[e.scale].time,n=e.value;e.value=t?fl(n)?as(R,os(n,L)):n||j:n||Ts,e.label=e.label||(t?"Time":"Value")}if(t>0){e.width=null==e.width?1:e.width,e.paths=e.paths||mc||Ji,e.fillTo=Ki(e.fillTo||Us),e.pxAlign=+Ni(e.pxAlign,_),e.pxRound=Zs(e.pxAlign),e.stroke=Ki(e.stroke||null),e.fill=Ki(e.fill||null),e._stroke=e._fill=e._paths=e._focus=null;let t=al((3+2*(Fi(1,e.width)||1))*1,3),n=e.points=yl({},{size:t,width:Fi(1,.2*t),stroke:e.stroke,space:2*t,paths:_c,_stroke:null,_fill:null},e.points);n.show=Ki(n.show),n.filter=Ki(n.filter),n.fill=Ki(n.fill),n.stroke=Ki(n.stroke),n.paths=Ki(n.paths),n.pxAlign=e.pxAlign}if(H){let n=function(e,t){if(0==t&&(K||!F.live||2==o))return dl;let n=[],a=si("tr","u-series",Y,Y.childNodes[t]);ai(a,e.class),e.show||ai(a,Ra);let i=si("th",null,a);if(V.show){let e=ci("u-marker",i);if(t>0){let n=V.width(r,t);n&&(e.style.border=n+"px "+V.dash(r,t)+" "+V.stroke(r,t)),e.style.background=V.fill(r,t)}}let l=ci(La,i);for(var s in l.textContent=e.label,t>0&&(V.show||(l.style.color=e.width>0?V.stroke(r,t):V.fill(r,t)),te("click",i,(t=>{if(Ee._lock)return;Ne(t);let n=y.indexOf(e);if((t.ctrlKey||t.metaKey)!=F.isolate){let e=y.some(((e,t)=>t>0&&t!=n&&e.show));y.forEach(((t,r)=>{r>0&&Wt(r,e?r==n?J:X:J,!0,Sn.setSeries)}))}else Wt(n,{show:!e.show},!0,Sn.setSeries)}),!1),De&&te(qa,i,(t=>{Ee._lock||(Ne(t),Wt(y.indexOf(e),Gt,!0,Sn.setSeries))}),!1)),W){let e=si("td","u-value",a);e.textContent="--",n.push(e)}return[a,n]}(e,t);q.splice(t,0,n[0]),Z.splice(t,0,n[1]),F.values.push(null)}if(Ee.show){$.splice(t,0,null);let n=function(e,t){if(t>0){let n=Ee.points.show(r,t);if(n)return ai(n,"u-cursor-pt"),ai(n,e.class),di(n,-10,-10,ae,ie),m.insertBefore(n,Oe[t]),n}}(e,t);null!=n&&(Oe.splice(t,0,n),Re.splice(t,0,0),Le.splice(t,0,0))}kn("addSeries",t)}r.addSeries=function(e,t){t=null==t?y.length:t,e=1==o?vc(e,t,vs,Ls):vc(e,t,null,Rs),y.splice(t,0,e),Ie(y[t],t)},r.delSeries=function(e){if(y.splice(e,1),H){F.values.splice(e,1),Z.splice(e,1);let t=q.splice(e,1)[0];ne(null,t.firstChild),t.remove()}Ee.show&&($.splice(e,1),Oe.length>1&&(Oe.splice(e,1)[0].remove(),Re.splice(e,1),Le.splice(e,1))),kn("delSeries",e)};const ze=[!1,!1,!1,!1];function je(e,t,n,r){let[o,a,i,l]=n,s=t%2,c=0;return 0==s&&(l||a)&&(c=0==t&&!o||2==t&&!i?zi(gs.size/3):0),1==s&&(o||i)&&(c=1==t&&!a||3==t&&!l?zi(Ps.size/2):0),c}const $e=r.padding=(e.padding||[je,je,je,je]).map((e=>Ki(Ni(e,je)))),Fe=r._padding=$e.map(((e,t)=>e(r,t,ze,0)));let He,Ve=null,Be=null;const Ue=1==o?y[0].idxs:null;let Ye,We,qe,Ze,Ke,Ge,Qe,Je,Xe,et,tt=null,nt=!1;function rt(e,n){if(t=null==e?[]:e,r.data=r._data=t,2==o){He=0;for(let e=1;e=0,ke=!0,Lt()}}function ot(){let e,n;nt=!0,1==o&&(He>0?(Ve=Ue[0]=0,Be=Ue[1]=He-1,e=t[0][Ve],n=t[0][Be],2==T?(e=Ve,n=Be):e==n&&(3==T?[e,n]=ki(e,e,N.log,!1):4==T?[e,n]=xi(e,e,N.log,!1):N.time?n=e+zi(86400/v):[e,n]=Mi(e,n,Si,!0))):(Ve=Ue[0]=e=null,Be=Ue[1]=n=null)),Yt(A,e,n)}function at(e,t,n,r,o,a){var i,l,s,c,u;null!==(i=e)&&void 0!==i||(e=Ba),null!==(l=n)&&void 0!==l||(n=ul),null!==(s=r)&&void 0!==s||(r="butt"),null!==(c=o)&&void 0!==c||(o=Ba),null!==(u=a)&&void 0!==u||(a="round"),e!=Ye&&(h.strokeStyle=Ye=e),o!=We&&(h.fillStyle=We=o),t!=qe&&(h.lineWidth=qe=t),a!=Ke&&(h.lineJoin=Ke=a),r!=Ge&&(h.lineCap=Ge=r),n!=Ze&&h.setLineDash(Ze=n)}function it(e,t,n,r){t!=We&&(h.fillStyle=We=t),e!=Qe&&(h.font=Qe=e),n!=Je&&(h.textAlign=Je=n),r!=Xe&&(h.textBaseline=Xe=r)}function lt(e,t,n,o){let a=arguments.length>4&&void 0!==arguments[4]?arguments[4]:0;if(o.length>0&&e.auto(r,nt)&&(null==t||null==t.min)){let t=Ni(Ve,0),r=Ni(Be,o.length-1),i=null==n.min?3==e.distr?function(e,t,n){let r=Wi,o=-Wi;for(let a=t;a<=n;a++){let t=e[a];null!=t&&t>0&&(to&&(o=t))}return[r,o]}(o,t,r):function(e,t,n,r){let o=Wi,a=-Wi;if(1==r)o=e[t],a=e[n];else if(-1==r)o=e[n],a=e[t];else for(let i=t;i<=n;i++){let t=e[i];null!=t&&(ta&&(a=t))}return[o,a]}(o,t,r,a):[n.min,n.max];e.min=$i(e.min,n.min=i[0]),e.max=Fi(e.max,n.max=i[1])}}r.setData=rt;const st={min:null,max:null};function ct(e,t){let n=t?y[e].points:y[e];n._stroke=n.stroke(r,e),n._fill=n.fill(r,e)}function ut(e,n){let o=n?y[e].points:y[e],{stroke:a,fill:i,clip:l,flags:s,_stroke:c=o._stroke,_fill:u=o._fill,_width:d=o.width}=o._paths;d=al(d*ri,3);let p=null,f=d%2/2;n&&null==u&&(u=d>0?"#fff":c);let m=1==o.pxAlign&&f>0;if(m&&h.translate(f,f),!n){let e=pe-d/2,t=fe-d/2,n=me+d,r=_e+d;p=new Path2D,p.rect(e,t,n,r)}n?ht(c,d,o.dash,o.cap,u,a,i,s,l):function(e,n,o,a,i,l,s,c,u,d,h){let p=!1;0!=u&&S.forEach(((f,m)=>{if(f.series[0]==e){let e,_=y[f.series[1]],g=t[f.series[1]],v=(_._paths||cl).band;hl(v)&&(v=1==f.dir?v[0]:v[1]);let b=null;_.show&&v&&function(e,t,n){for(t=Ni(t,0),n=Ni(n,e.length-1);t<=n;){if(null!=e[t])return!0;t++}return!1}(g,Ve,Be)?(b=f.fill(r,m)||l,e=_._paths.clip):v=null,ht(n,o,a,i,b,s,c,u,d,h,e,v),p=!0}})),p||ht(n,o,a,i,l,s,c,u,d,h)}(e,c,d,o.dash,o.cap,u,a,i,s,p,l),m&&h.translate(-f,-f)}const dt=2|Hs;function ht(e,t,n,r,o,a,i,l,s,c,u,d){at(e,t,n,r,o),(s||c||d)&&(h.save(),s&&h.clip(s),c&&h.clip(c)),d?(l&dt)==dt?(h.clip(d),u&&h.clip(u),ft(o,i),pt(e,a,t)):2&l?(ft(o,i),h.clip(d),pt(e,a,t)):l&Hs&&(h.save(),h.clip(d),u&&h.clip(u),ft(o,i),h.restore(),pt(e,a,t)):(ft(o,i),pt(e,a,t)),(s||c||d)&&h.restore()}function pt(e,t,n){n>0&&(t instanceof Map?t.forEach(((e,t)=>{h.strokeStyle=Ye=t,h.stroke(e)})):null!=t&&e&&h.stroke(t))}function ft(e,t){t instanceof Map?t.forEach(((e,t)=>{h.fillStyle=We=t,h.fill(e)})):null!=t&&e&&h.fill(t)}function mt(e,t,n,r,o,a,i,l,s,c){let u=i%2/2;1==_&&h.translate(u,u),at(l,i,s,c,l),h.beginPath();let d,p,f,m,g=o+(0==r||3==r?-a:a);0==n?(p=o,m=g):(d=o,f=g);for(let _=0;_{if(!n.show)return;let a=x[n.scale];if(null==a.min)return void(n._show&&(t=!1,n._show=!1,vt(!1)));n._show||(t=!1,n._show=!0,vt(!1));let i=n.side,l=i%2,{min:s,max:c}=a,[u,d]=function(e,t,n,o){let a,i=k[e];if(o<=0)a=[0,0];else{let l=i._space=i.space(r,e,t,n,o);a=Ec(t,n,i._incrs=i.incrs(r,e,t,n,o,l),o,l)}return i._found=a}(o,s,c,0==l?ae:ie);if(0==d)return;let h=2==a.distr,p=n._splits=n.splits(r,o,s,c,u,d,h),f=2==a.distr?p.map((e=>tt[e])):p,m=2==a.distr?tt[p[1]]-tt[p[0]]:u,_=n._values=n.values(r,n.filter(r,f,o,d,m),o,d,m);n._rotate=2==i?n.rotate(r,_,o,d):0;let g=n._size;n._size=ji(n.size(r,_,o,e)),null!=g&&n._size!=g&&(t=!1)})),t}function gt(e){let t=!0;return $e.forEach(((n,o)=>{let a=n(r,o,ze,e);a!=Fe[o]&&(t=!1),Fe[o]=a})),t}function vt(e){y.forEach(((t,n)=>{n>0&&(t._paths=null,e&&(1==o?(t.min=null,t.max=null):t.facets.forEach((e=>{e.min=null,e.max=null}))))}))}let yt,bt,wt,kt,xt,St,At,Et,Ct,Mt,Nt,Tt,Pt=!1,Dt=!1,Ot=[];function Rt(){Dt=!1;for(let e=0;e0){y.forEach(((n,a)=>{if(1==o){let o=n.scale,i=O[o];if(null==i)return;let l=e[o];if(0==a){let e=l.range(r,l.min,l.max,o);l.min=e[0],l.max=e[1],Ve=bi(l.min,t[0]),Be=bi(l.max,t[0]),Be-Ve>1&&(t[0][Ve]l.max&&Be--),n.min=tt[Ve],n.max=tt[Be]}else n.show&&n.auto&<(l,i,n,t[a],n.sorted);n.idxs[0]=Ve,n.idxs[1]=Be}else if(a>0&&n.show&&n.auto){let[r,o]=n.facets,i=r.scale,l=o.scale,[s,c]=t[a],u=e[i],d=e[l];null!=u&<(u,O[i],r,s,r.sorted),null!=d&<(d,O[l],o,c,o.sorted),n.min=o.min,n.max=o.max}}));for(let t in e){let n=e[t],o=O[t];if(null==n.from&&(null==o||null==o.min)){let e=n.range(r,n.min==Wi?null:n.min,n.max==-Wi?null:n.max,t);n.min=e[0],n.max=e[1]}}}for(let t in e){let n=e[t];if(null!=n.from){let o=e[n.from];if(null==o.min)n.min=n.max=null;else{let e=n.range(r,o.min,o.max,t);n.min=e[0],n.max=e[1]}}}let n={},a=!1;for(let t in e){let r=e[t],o=x[t];if(o.min!=r.min||o.max!=r.max){o.min=r.min,o.max=r.max;let e=o.distr;o._min=3==e?Bi(o.min):4==e?Yi(o.min,o.asinh):o.min,o._max=3==e?Bi(o.max):4==e?Yi(o.max,o.asinh):o.max,n[t]=a=!0}}if(a){y.forEach(((e,t)=>{2==o?t>0&&n.y&&(e._paths=null):n[e.scale]&&(e._paths=null)}));for(let e in n)ye=!0,kn("setScale",e);Ee.show&&Ee.left>=0&&(be=ke=!0)}for(let t in O)O[t]=null}(),ge=!1),ye&&(!function(){let e=!1,t=0;for(;!e;){t++;let n=_t(t),o=gt(t);e=t==Ae||n&&o,e||(Se(r.width,r.height),ve=!0)}}(),ye=!1),ve){if(li(f,Fa,le),li(f,ja,se),li(f,Ia,ae),li(f,za,ie),li(m,Fa,le),li(m,ja,se),li(m,Ia,ae),li(m,za,ie),li(p,Ia,re),li(p,za,oe),d.width=zi(re*ri),d.height=zi(oe*ri),k.forEach((e=>{let{_el:t,_show:n,_size:r,_pos:o,side:a}=e;if(null!=t)if(n){let e=a%2==1;li(t,e?"left":"top",o-(3===a||0===a?r:0)),li(t,e?"width":"height",r),li(t,e?"top":"left",e?se:le),li(t,e?"height":"width",e?ie:ae),ii(t,Ra)}else ai(t,Ra)})),Ye=We=qe=Ke=Ge=Qe=Je=Xe=Ze=null,et=1,ln(!0),le!=ce||se!=ue||ae!=de||ie!=he){vt(!1);let e=ae/de,t=ie/he;if(Ee.show&&!be&&Ee.left>=0){Ee.left*=e,Ee.top*=t,wt&&di(wt,zi(Ee.left),0,ae,ie),kt&&di(kt,0,zi(Ee.top),ae,ie);for(let n=1;n=0&&Vt.width>0){Vt.left*=e,Vt.width*=e,Vt.top*=t,Vt.height*=t;for(let e in un)li(Bt,e,Vt[e])}ce=le,ue=se,de=ae,he=ie}kn("setSize"),ve=!1}re>0&&oe>0&&(h.clearRect(0,0,d.width,d.height),kn("drawClear"),C.forEach((e=>e())),kn("draw")),Vt.show&&we&&(Ut(Vt),we=!1),Ee.show&&be&&(on(null,!0,!1),be=!1),F.show&&F.live&&ke&&(nn(),ke=!1),c||(c=!0,r.status=1,kn("ready")),nt=!1,Pt=!1}function zt(e,n){let o=x[e];if(null==o.from){if(0==He){let t=o.range(r,n.min,n.max,e);n.min=t[0],n.max=t[1]}if(n.min>n.max){let e=n.min;n.min=n.max,n.max=e}if(He>1&&null!=n.min&&null!=n.max&&n.max-n.min<1e-16)return;e==A&&2==o.distr&&He>0&&(n.min=bi(n.min,t[0]),n.max=bi(n.max,t[0]),n.min==n.max&&n.max++),O[e]=n,ge=!0,Lt()}}r.batch=function(e){let t=arguments.length>1&&void 0!==arguments[1]&&arguments[1];Pt=!0,Dt=t,e(r),It(),t&&Ot.length>0&&queueMicrotask(Rt)},r.redraw=(e,t)=>{ye=t||!1,!1!==e?Yt(A,N.min,N.max):Lt()},r.setScale=zt;let jt=!1;const $t=Ee.drag;let Ft=$t.x,Ht=$t.y;Ee.show&&(Ee.x&&(yt=ci("u-cursor-x",m)),Ee.y&&(bt=ci("u-cursor-y",m)),0==N.ori?(wt=yt,kt=bt):(wt=bt,kt=yt),Nt=Ee.left,Tt=Ee.top);const Vt=r.select=yl({show:!0,over:!0,left:0,width:0,top:0,height:0},e.select),Bt=Vt.show?ci("u-select",Vt.over?m:f):null;function Ut(e,t){if(Vt.show){for(let t in e)Vt[t]=e[t],t in un&&li(Bt,t,e[t]);!1!==t&&kn("setSelect")}}function Yt(e,t,n){zt(e,{min:t,max:n})}function Wt(e,t,n,a){null!=t.focus&&function(e){if(e!=Kt){let t=null==e,n=1!=Pe.alpha;y.forEach(((r,a)=>{if(1==o||a>0){let o=t||0==a||a==e;r._focus=t?null:o,n&&function(e,t){y[e].alpha=t,Ee.show&&Oe[e]&&(Oe[e].style.opacity=t);H&&q[e]&&(q[e].style.opacity=t)}(a,o?1:Pe.alpha)}})),Kt=e,n&&Lt()}}(e),null!=t.show&&y.forEach(((n,r)=>{r>0&&(e==r||null==e)&&(n.show=t.show,function(e,t){let n=y[e],r=H?q[e]:null;n.show?r&&ii(r,Ra):(r&&ai(r,Ra),Oe.length>1&&di(Oe[e],-10,-10,ae,ie))}(r,t.show),2==o?(Yt(n.facets[0].scale,null,null),Yt(n.facets[1].scale,null,null)):Yt(n.scale,null,null),Lt())})),!1!==n&&kn("setSeries",e,t),a&&Cn("setSeries",r,e,t)}let qt,Zt,Kt;r.setSelect=Ut,r.setSeries=Wt,r.addBand=function(e,t){e.fill=Ki(e.fill||null),e.dir=Ni(e.dir,-1),t=null==t?S.length:t,S.splice(t,0,e)},r.setBand=function(e,t){yl(S[e],t)},r.delBand=function(e){null==e?S.length=0:S.splice(e,1)};const Gt={focus:!0};function Qt(e,t,n){let r=x[t];n&&(e=e/ri-(1==r.ori?se:le));let o=ae;1==r.ori&&(o=ie,e=o-e),-1==r.dir&&(e=o-e);let a=r._min,i=a+(r._max-a)*(e/o),l=r.distr;return 3==l?Hi(10,i):4==l?function(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:1;return Oi.sinh(e)*t}(i,r.asinh):i}function Jt(e,t){li(Bt,Fa,Vt.left=e),li(Bt,Ia,Vt.width=t)}function Xt(e,t){li(Bt,ja,Vt.top=e),li(Bt,za,Vt.height=t)}H&&De&&te(Za,B,(e=>{Ee._lock||(Ne(e),null!=Kt&&Wt(null,Gt,!0,Sn.setSeries))})),r.valToIdx=e=>bi(e,t[0]),r.posToIdx=function(e,n){return bi(Qt(e,A,n),t[0],Ve,Be)},r.posToVal=Qt,r.valToPos=(e,t,n)=>0==x[t].ori?i(e,x[t],n?me:ae,n?pe:0):l(e,x[t],n?_e:ie,n?fe:0),r.setCursor=(e,t,n)=>{Nt=e.left,Tt=e.top,on(null,t,n)};let en=0==N.ori?Jt:Xt,tn=1==N.ori?Jt:Xt;function nn(e,t){null!=e&&(e.idxs?e.idxs.forEach(((e,t)=>{$[t]=e})):void 0!==e.idx&&$.fill(e.idx),F.idx=$[0]);for(let n=0;n0||1==o&&!K)&&rn(n,$[n]);H&&F.live&&function(){if(H&&F.live)for(let e=2==o?1:0;eBe;qt=Wi;let s=0==N.ori?ae:ie,c=1==N.ori?ae:ie;if(Nt<0||0==He||l){i=Ee.idx=null;for(let e=0;e0&&Oe.length>1&&di(Oe[e],-10,-10,ae,ie);De&&Wt(null,Gt,!0,null==e&&Sn.setSeries),F.live&&($.fill(i),ke=!0)}else{let e,n,a;1==o&&(e=0==N.ori?Nt:Tt,n=Qt(e,A),i=Ee.idx=bi(n,t[0],Ve,Be),a=P(t[0][i],N,s,0));for(let l=2==o?1:0;l0&&e.show){let t,n,a=null==p?-10:D(p,1==o?x[e.scale]:x[e.facets[1].scale],c,0);if(De&&null!=p){let t=1==N.ori?Nt:Tt,n=Li(Pe.dist(r,l,h,a,t));if(n=0?1:-1;a==(p>=0?1:-1)&&(1==a?1==r?p>=o:p<=o:1==r?p<=o:p>=o)&&(qt=n,Zt=l)}else qt=n,Zt=l}}if(0==N.ori?(t=f,n=a):(t=a,n=f),ke&&Oe.length>1){pi(Oe[l],Ee.points.fill(r,l),Ee.points.stroke(r,l));let e,o,a,i,s=!0,c=Ee.points.bbox;if(null!=c){s=!1;let t=c(r,l);a=t.left,i=t.top,e=t.width,o=t.height}else a=t,i=n,e=o=Ee.points.size(r,l);mi(Oe[l],e,o,s),Re[l]=a,Le[l]=i,di(Oe[l],rl(a,1),rl(i,1),ae,ie)}}}}if(Vt.show&&jt)if(null!=e){let[t,n]=Sn.scales,[r,o]=Sn.match,[a,i]=e.cursor.sync.scales,l=e.cursor.drag;if(Ft=l._x,Ht=l._y,Ft||Ht){let l,u,d,h,p,{left:f,top:m,width:_,height:g}=e.select,v=e.scales[t].ori,y=e.posToVal,b=null!=t&&r(t,a),w=null!=n&&o(n,i);b&&Ft?(0==v?(l=f,u=_):(l=m,u=g),d=x[t],h=P(y(l,a),d,s,0),p=P(y(l+u,a),d,s,0),en($i(h,p),Li(p-h))):en(0,s),w&&Ht?(1==v?(l=f,u=_):(l=m,u=g),d=x[n],h=D(y(l,i),d,c,0),p=D(y(l+u,i),d,c,0),tn($i(h,p),Li(p-h))):tn(0,c)}else dn()}else{let e=Li(Ct-xt),t=Li(Mt-St);if(1==N.ori){let n=e;e=t,t=n}Ft=$t.x&&e>=$t.dist,Ht=$t.y&&t>=$t.dist;let n,r,o=$t.uni;null!=o?Ft&&Ht&&(Ft=e>=o,Ht=t>=o,Ft||Ht||(t>e?Ht=!0:Ft=!0)):$t.x&&$t.y&&(Ft||Ht)&&(Ft=Ht=!0),Ft&&(0==N.ori?(n=At,r=Nt):(n=Et,r=Tt),en($i(n,r),Li(r-n)),Ht||tn(0,c)),Ht&&(1==N.ori?(n=At,r=Nt):(n=Et,r=Tt),tn($i(n,r),Li(r-n)),Ft||en(0,s)),Ft||Ht||(en(0,0),tn(0,0))}if($t._x=Ft,$t._y=Ht,null==e){if(a){if(null!=An){let[e,t]=Sn.scales;Sn.values[0]=null!=e?Qt(0==N.ori?Nt:Tt,e):null,Sn.values[1]=null!=t?Qt(1==N.ori?Nt:Tt,t):null}Cn(Ua,r,Nt,Tt,ae,ie,i)}if(De){let e=a&&Sn.setSeries,t=Pe.prox;null==Kt?qt<=t&&Wt(Zt,Gt,!0,e):qt>t?Wt(null,Gt,!0,e):Zt!=Kt&&Wt(Zt,Gt,!0,e)}}ke&&(F.idx=i,nn()),!1!==n&&kn("setCursor")}r.setLegend=nn;let an=null;function ln(){arguments.length>0&&void 0!==arguments[0]&&arguments[0]?an=null:(an=m.getBoundingClientRect(),kn("syncRect",an))}function sn(e,t,n,r,o,a,i){Ee._lock||jt&&null!=e&&0==e.movementX&&0==e.movementY||(cn(e,t,n,r,o,a,i,!1,null!=e),null!=e?on(null,!0,!0):on(t,!0,!1))}function cn(e,t,n,o,a,i,l,c,u){if(null==an&&ln(!1),Ne(e),null!=e)n=e.clientX-an.left,o=e.clientY-an.top;else{if(n<0||o<0)return Nt=-10,void(Tt=-10);let[e,r]=Sn.scales,l=t.cursor.sync,[c,u]=l.values,[d,h]=l.scales,[p,f]=Sn.match,m=t.axes[0].side%2==1,_=0==N.ori?ae:ie,g=1==N.ori?ae:ie,v=m?i:a,y=m?a:i,b=m?o:n,w=m?n:o;if(n=null!=d?p(e,d)?s(c,x[e],_,0):-10:_*(b/v),o=null!=h?f(r,h)?s(u,x[r],g,0):-10:g*(w/y),1==N.ori){let e=n;n=o,o=e}}u&&((n<=1||n>=ae-1)&&(n=nl(n,ae)),(o<=1||o>=ie-1)&&(o=nl(o,ie))),c?(xt=n,St=o,[At,Et]=Ee.move(r,n,o)):(Nt=n,Tt=o)}Object.defineProperty(r,"rect",{get:()=>(null==an&&ln(!1),an)});const un={width:0,height:0,left:0,top:0};function dn(){Ut(un,!1)}let hn,pn,fn,mn;function _n(e,t,n,o,a,i,l){jt=!0,Ft=Ht=$t._x=$t._y=!1,cn(e,t,n,o,a,i,0,!0,!1),null!=e&&(te(Wa,ei,gn,!1),Cn(Ya,r,At,Et,ae,ie,null));let{left:s,top:c,width:u,height:d}=Vt;hn=s,pn=c,fn=u,mn=d,dn()}function gn(e,t,n,o,a,i,l){jt=$t._x=$t._y=!1,cn(e,t,n,o,a,i,0,!1,!0);let{left:s,top:c,width:u,height:d}=Vt,h=u>0||d>0,p=hn!=s||pn!=c||fn!=u||mn!=d;if(h&&p&&Ut(Vt),$t.setScale&&h&&p){let e=s,t=u,n=c,r=d;if(1==N.ori&&(e=c,t=d,n=s,r=u),Ft&&Yt(A,Qt(e,A),Qt(e+t,A)),Ht)for(let o in x){let e=x[o];o!=A&&null==e.from&&e.min!=Wi&&Yt(o,Qt(n+r,o),Qt(n,o))}dn()}else Ee.lock&&(Ee._lock=!Ee._lock,Ee._lock||on(null,!0,!1));null!=e&&(ne(Wa,ei),Cn(Wa,r,Nt,Tt,ae,ie,null))}function vn(e,t,n,o,a,i,l){Ee._lock||(Ne(e),ot(),dn(),null!=e&&Cn(Ka,r,Nt,Tt,ae,ie,null))}function yn(){k.forEach(Mc),xe(r.width,r.height,!0)}vi(Qa,ti,yn);const bn={};bn.mousedown=_n,bn.mousemove=sn,bn.mouseup=gn,bn.dblclick=vn,bn.setSeries=(e,t,n,o)=>{-1!=(n=(0,Sn.match[2])(r,t,n))&&Wt(n,o,!0,!1)},Ee.show&&(te(Ya,m,_n),te(Ua,m,sn),te(qa,m,(e=>{Ne(e),ln(!1)})),te(Za,m,(function(e,t,n,r,o,a,i){if(Ee._lock)return;Ne(e);let l=jt;if(jt){let e,t,n=!0,r=!0,o=10;0==N.ori?(e=Ft,t=Ht):(e=Ht,t=Ft),e&&t&&(n=Nt<=o||Nt>=ae-o,r=Tt<=o||Tt>=ie-o),e&&n&&(Nt=Nt{e.call(null,r,t,n)}))}(e.plugins||[]).forEach((e=>{for(let t in e.hooks)wn[t]=(wn[t]||[]).concat(e.hooks[t])}));const xn=(e,t,n)=>n,Sn=yl({key:null,setSeries:!1,filters:{pub:Xi,sub:Xi},scales:[A,y[1]?y[1].scale:null],match:[el,el,xn],values:[null,null]},Ee.sync);2==Sn.match.length&&Sn.match.push(xn),Ee.sync=Sn;const An=Sn.key,En=Fs(An);function Cn(e,t,n,r,o,a,i){Sn.filters.pub(e,t,n,r,o,a,i)&&En.pub(e,t,n,r,o,a,i)}function Mn(){kn("init",e,t),rt(t||e.data,!1),O[A]?zt(A,O[A]):ot(),we=Vt.show&&(Vt.width>0||Vt.height>0),be=ke=!0,xe(e.width,e.height)}return En.sub(r),r.pub=function(e,t,n,r,o,a,i){Sn.filters.sub(e,t,n,r,o,a,i)&&bn[e](null,t,n,r,o,a,i)},r.destroy=function(){var e;En.unsub(r),pc.delete(r),ee.clear(),yi(Qa,ti,yn),u.remove(),null===(e=B)||void 0===e||e.remove(),kn("destroy")},y.forEach(Ie),k.forEach((function(e,t){if(e._show=e.show,e.show){let n=e.side%2,o=x[e.scale];null==o&&(e.scale=n?y[1].scale:A,o=x[e.scale]);let a=o.time;e.size=Ki(e.size),e.space=Ki(e.space),e.rotate=Ki(e.rotate),hl(e.incrs)&&e.incrs.forEach((e=>{!il.has(e)&&il.set(e,ll(e))})),e.incrs=Ki(e.incrs||(2==o.distr?Il:a?1==v?Kl:Jl:zl)),e.splits=Ki(e.splits||(a&&1==o.distr?I:3==o.distr?ws:4==o.distr?ks:bs)),e.stroke=Ki(e.stroke),e.grid.stroke=Ki(e.grid.stroke),e.ticks.stroke=Ki(e.ticks.stroke),e.border.stroke=Ki(e.border.stroke);let i=e.values;e.values=hl(i)&&!hl(i[0])?Ki(i):a?hl(i)?ns(R,ts(i,L)):fl(i)?function(e,t){let n=Tl(t);return(t,r,o,a,i)=>r.map((t=>n(e(t))))}(R,i):i||z:i||ys,e.filter=Ki(e.filter||(o.distr>=3&&10==o.log?Ms:3==o.distr&&2==o.log?Ns:Qi)),e.font=Cc(e.font),e.labelFont=Cc(e.labelFont),e._size=e.size(r,null,t,0),e._space=e._rotate=e._incrs=e._found=e._splits=e._values=null,e._size>0&&(ze[t]=!0,e._el=ci("u-axis",p))}})),n?n instanceof HTMLElement?(n.appendChild(u),Mn()):n(r,Mn):Mn(),r}Nc.assign=yl,Nc.fmtNum=Di,Nc.rangeNum=Mi,Nc.rangeLog=ki,Nc.rangeAsinh=xi,Nc.orient=Vs,Nc.pxRatio=ri,Nc.join=function(e,t){if(function(e){let t=e[0][0],n=t.length;for(let r=1;r1&&void 0!==arguments[1]?arguments[1]:100;const n=e.length;if(n<=1)return!0;let r=0,o=n-1;for(;r<=o&&null==e[r];)r++;for(;o>=r&&null==e[o];)o--;if(o<=r)return!0;const a=Fi(1,Ii((o-r+1)/t));for(let i=e[r],l=r+a;l<=o;l+=a){const t=e[l];if(null!=t){if(t<=i)return!1;i=t}}return!0}(t[0])||(t=function(e){let t=e[0],n=t.length,r=Array(n);for(let a=0;at[e]-t[n]));let o=[];for(let a=0;ae-t))],o=r[0].length,a=new Map;for(let i=0;iVs(e,a,((s,c,u,d,h,p,f,m,_,g,v)=>{let y=s.pxRound,{left:b,width:w}=e.bbox,k=e=>y(p(e,d,g,m)),x=e=>y(f(e,h,v,_)),S=0==d.ori?Js:Xs;const A={stroke:new Path2D,fill:null,clip:null,band:null,gaps:null,flags:Hs},E=A.stroke,C=d.dir*(0==d.ori?1:-1);i=wi(u,i,l,1),l=wi(u,i,l,-1);let M=x(u[1==C?i:l]),N=k(c[1==C?i:l]),T=N,P=N;o&&-1==t&&(P=b,S(E,P,M)),S(E,N,M);for(let e=1==C?i:l;e>=i&&e<=l;e+=C){let n=u[e];if(null==n)continue;let r=k(c[e]),o=x(n);1==t?S(E,r,M):S(E,T,o),S(E,r,o),M=o,T=r}let D=T;o&&1==t&&(D=b+w,S(E,D,M));let[O,R]=Bs(e,a);if(null!=s.fill||0!=O){let t=A.fill=new Path2D(E),n=x(s.fillTo(e,a,s.min,s.max,O));S(t,D,n),S(t,P,n)}if(!s.spanGaps){let o=[];o.push(...qs(c,u,i,l,C,k,r));let h=s.width*ri/2,p=n||1==t?h:-h,f=n||-1==t?-h:h;o.forEach((e=>{e[0]+=p,e[1]+=f})),A.gaps=o=s.gaps(e,a,i,l,o),A.clip=Ws(o,d.ori,m,_,g,v)}return 0!=R&&(A.band=2==R?[Ys(e,a,i,l,E,-1),Ys(e,a,i,l,E,1)]:Ys(e,a,i,l,E,R)),A}))},e.bars=function(e){const t=Ni((e=e||cl).size,[.6,Wi,1]),n=e.align||0,r=e.gap||0;let o=e.radius;o=null==o?[0,0]:"number"==typeof o?[o,0]:o;const a=Ki(o),i=1-t[0],l=Ni(t[1],Wi),s=Ni(t[2],1),c=Ni(e.disp,cl),u=Ni(e.each,(e=>{})),{fill:d,stroke:h}=c;return(e,t,o,p)=>Vs(e,t,((f,m,_,g,v,y,b,w,k,x,S)=>{let A,E,C=f.pxRound,M=n,N=r*ri,T=l*ri,P=s*ri;0==g.ori?[A,E]=a(e,t):[E,A]=a(e,t);const D=g.dir*(0==g.ori?1:-1);let O,R,L,I=0==g.ori?ec:tc,z=0==g.ori?u:(e,t,n,r,o,a,i)=>{u(e,t,n,o,r,i,a)},j=Ni(e.bands,ul).find((e=>e.series[0]==t)),$=null!=j?j.dir:0,F=f.fillTo(e,t,f.min,f.max,$),H=C(b(F,v,S,k)),V=x,B=C(f.width*ri),U=!1,Y=null,W=null,q=null,Z=null;null==d||0!=B&&null==h||(U=!0,Y=d.values(e,t,o,p),W=new Map,new Set(Y).forEach((e=>{null!=e&&W.set(e,new Path2D)})),B>0&&(q=h.values(e,t,o,p),Z=new Map,new Set(q).forEach((e=>{null!=e&&Z.set(e,new Path2D)}))));let{x0:K,size:G}=c;if(null!=K&&null!=G){M=1,m=K.values(e,t,o,p),2==K.unit&&(m=m.map((t=>e.posToVal(w+t*x,g.key,!0))));let n=G.values(e,t,o,p);R=2==G.unit?n[0]*x:y(n[0],g,x,w)-y(0,g,x,w),V=dc(m,_,y,g,x,w,V),L=V-R+N}else V=dc(m,_,y,g,x,w,V),L=V*i+N,R=V-L;L<1&&(L=0),B>=R/2&&(B=0),L<5&&(C=Gi);let Q=L>0;R=C(Zi(V-L-(Q?B:0),P,T)),O=(0==M?R/2:M==D?0:R)-M*D*((0==M?N/2:0)+(Q?B/2:0));const J={stroke:null,fill:null,clip:null,band:null,gaps:null,flags:0},X=U?null:new Path2D;let ee=null;if(null!=j)ee=e.data[j.series[1]];else{let{y0:n,y1:r}=c;null!=n&&null!=r&&(_=r.values(e,t,o,p),ee=n.values(e,t,o,p))}let te=A*R,ne=E*R;for(let n=1==D?o:p;n>=o&&n<=p;n+=D){let r=_[n];if(null==r)continue;if(null!=ee){var re;let e=null!==(re=ee[n])&&void 0!==re?re:0;if(r-e==0)continue;H=b(e,v,S,k)}let o=y(2!=g.distr||null!=c?m[n]:n,g,x,w),a=b(Ni(r,F),v,S,k),i=C(o-O),l=C(Fi(a,H)),s=C($i(a,H)),u=l-s;if(null!=r){let o=r<0?ne:te,a=r<0?te:ne;U?(B>0&&null!=q[n]&&I(Z.get(q[n]),i,s+Ii(B/2),R,Fi(0,u-B),o,a),null!=Y[n]&&I(W.get(Y[n]),i,s+Ii(B/2),R,Fi(0,u-B),o,a)):I(X,i,s+Ii(B/2),R,Fi(0,u-B),o,a),z(e,t,n,i-B/2,s,R+B,u)}}if(B>0)J.stroke=U?Z:X;else if(!U){var oe;J._fill=0==f.width?f._fill:null!==(oe=f._stroke)&&void 0!==oe?oe:f._fill,J.width=0}return J.fill=U?W:X,J}))},e.spline=function(e){return function(e,t){const n=Ni(null===t||void 0===t?void 0:t.alignGaps,0);return(t,r,o,a)=>Vs(t,r,((i,l,s,c,u,d,h,p,f,m,_)=>{let g,v,y,b=i.pxRound,w=e=>b(d(e,c,m,p)),k=e=>b(h(e,u,_,f));0==c.ori?(g=Gs,y=Js,v=oc):(g=Qs,y=Xs,v=ac);const x=c.dir*(0==c.ori?1:-1);o=wi(s,o,a,1),a=wi(s,o,a,-1);let S=w(l[1==x?o:a]),A=S,E=[],C=[];for(let e=1==x?o:a;e>=o&&e<=a;e+=x)if(null!=s[e]){let t=w(l[e]);E.push(A=t),C.push(k(s[e]))}const M={stroke:e(E,C,g,y,v,b),fill:null,clip:null,band:null,gaps:null,flags:Hs},N=M.stroke;let[T,P]=Bs(t,r);if(null!=i.fill||0!=T){let e=M.fill=new Path2D(N),n=k(i.fillTo(t,r,i.min,i.max,T));y(e,A,n),y(e,S,n)}if(!i.spanGaps){let e=[];e.push(...qs(l,s,o,a,x,w,n)),M.gaps=e=i.gaps(t,r,o,a,e),M.clip=Ws(e,c.ori,p,f,m,_)}return 0!=P&&(M.band=2==P?[Ys(t,r,o,a,N,-1),Ys(t,r,o,a,N,1)]:Ys(t,r,o,a,N,P)),M}))}(hc,e)}}const Tc=(e,t,n)=>{if(void 0===e||null===e)return"";n=n||0,t=t||0;const r=Math.abs(n-t);if(isNaN(r)||0==r)return Math.abs(e)>=1e3?e.toLocaleString("en-US"):e.toString();let o=3+Math.floor(1+Math.log10(Math.max(Math.abs(t),Math.abs(n)))-Math.log10(r));return(isNaN(o)||o>20)&&(o=20),e.toLocaleString("en-US",{minimumSignificantDigits:1,maximumSignificantDigits:o})},Pc=[[31536e3,"{YYYY}",null,null,null,null,null,null,1],[2419200,"{MMM}","\n{YYYY}",null,null,null,null,null,1],[86400,"{MM}-{DD}","\n{YYYY}",null,null,null,null,null,1],[3600,"{HH}:{mm}","\n{YYYY}-{MM}-{DD}",null,"\n{MM}-{DD}",null,null,null,1],[60,"{HH}:{mm}","\n{YYYY}-{MM}-{DD}",null,"\n{MM}-{DD}",null,null,null,1],[1,"{HH}:{mm}:{ss}","\n{YYYY}-{MM}-{DD}",null,"\n{MM}-{DD} {HH}:{mm}",null,null,null,1],[.001,":{ss}.{fff}","\n{YYYY}-{MM}-{DD} {HH}:{mm}",null,"\n{MM}-{DD} {HH}:{mm}",null,"\n{HH}:{mm}",null,1]],Dc=(e,t)=>Array.from(new Set(e.map((e=>e.scale)))).map((e=>{const n="10px Arial",r=it("color-text"),o={scale:e,show:!0,size:Oc,stroke:r,font:n,values:(e,n)=>function(e,t){let n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:"";const r=t[0],o=t[t.length-1];return n?t.map((e=>"".concat(Tc(e,r,o)," ").concat(n))):t.map((e=>Tc(e,r,o)))}(e,n,t)};return e?Number(e)%2||"y"===e?o:{...o,side:1}:{space:80,values:Pc,stroke:r,font:n}})),Oc=(e,t,n,r)=>{var o;const a=e.axes[n];if(r>1)return a._size||60;let i=6+((null===a||void 0===a||null===(o=a.ticks)||void 0===o?void 0:o.size)||0)+(a.gap||0);const l=(null!==t&&void 0!==t?t:[]).reduce(((e,t)=>(null===t||void 0===t?void 0:t.length)>e.length?t:e),"");return""!=l&&(i+=((e,t)=>{const n=document.createElement("span");n.innerText=e,n.style.cssText="position: absolute; z-index: -1; pointer-events: none; opacity: 0; font: ".concat(t),document.body.appendChild(n);const r=n.offsetWidth;return n.remove(),r})(l,"10px Arial")),Math.ceil(i)},Rc=(((e,t,n)=>{const r=[];for(let o=0;oMath.round(e))).join(", "))}r.map((e=>"rgb(".concat(e,")")))})([246,226,219],[127,39,4],16),e=>{for(let t=e.series.length-1;t>=0;t--)e.delSeries(t)}),Lc=e=>{Rc(e),(e=>{Object.keys(e.hooks).forEach((t=>{e.hooks[t]=[]}))})(e),e.setData([])},Ic=e=>t=>{const n=t.posToVal(t.select.left,"x"),r=t.posToVal(t.select.left+t.select.width,"x");e({min:n,max:r})};function zc(e){const t=xr(Sr[e]);return"rgba(".concat(t,", 0.05)")}let jc=function(e){return e.BAR="Bars",e.LINE="Lines",e.LINE_STEPPED="Stepped lines",e.POINTS="Points",e}({});const $c=(e,t,n,r)=>{var o,a;const i=e.under.clientWidth/20-1,l=null===Nc||void 0===Nc||null===(o=Nc.paths)||void 0===o||null===(a=o.bars)||void 0===a?void 0:a.call(o,{size:[.96,i]});return l?l(e,t,n,r):null},Fc=(e,t,n,r)=>{var o,a;const i=null===Nc||void 0===Nc||null===(o=Nc.paths)||void 0===o||null===(a=o.stepped)||void 0===a?void 0:a.call(o,{align:1});return i?i(e,t,n,r):null},Hc=e=>{switch(e){case jc.BAR:return $c;case jc.LINE_STEPPED:return Fc;default:return}},Vc=["color-log-hits-bar-1","color-log-hits-bar-2","color-log-hits-bar-3","color-log-hits-bar-4","color-log-hits-bar-5"],Bc={[jc.BAR]:.8,[jc.LINE_STEPPED]:1.2,[jc.LINE]:1.2,[jc.POINTS]:0},Uc=e=>{let{data:n,logHits:r,xRange:a,bands:i,containerSize:l,onReadyChart:s,setPlotScale:c,graphOptions:u}=e;const{isDarkTheme:d}=gt(),[h,p]=(0,t.useState)(-1),f=e=>{var t;const n=null!==(t=e.cursor.idx)&&void 0!==t?t:-1;p(n)},m=(0,t.useMemo)((()=>{let e=0;return n.map(((t,n)=>{var o;if(0===n)return{};const a=Object.values((null===r||void 0===r||null===(o=r[n-1])||void 0===o?void 0:o.fields)||{}).map((e=>e||'""')).join(", "),i=it(a?Vc[e]:"color-log-hits-bar-0");return a&&e++,{label:a||"other",width:Bc[u.graphStyle],spanGaps:!0,stroke:i,fill:u.fill?i+"80":"",paths:Hc(u.graphStyle)}}))}),[d,n,u]),_=(0,t.useMemo)((()=>({series:m,bands:i,width:l.width||window.innerWidth/2,height:l.height||200,cursor:{points:{width:(e,t,n)=>n/4,size:(e,t)=>{var n,r,o;return 2.5*((null===(n=e.series)||void 0===n||null===(r=n[t])||void 0===r||null===(o=r.points)||void 0===o?void 0:o.size)||1)},stroke:(e,t)=>{var n;return"".concat((null===m||void 0===m||null===(n=m[t])||void 0===n?void 0:n.stroke)||"#ffffff")},fill:()=>"#ffffff"}},scales:{x:{time:!0,range:()=>[a.min,a.max]}},hooks:{drawSeries:[],ready:[s],setCursor:[f],setSelect:[Ic(c)],destroy:[Lc]},legend:{show:!1},axes:Dc([{},{scale:"y"}]),tzDate:e=>o()(It(jt(e))).local().toDate()})),[d,m,i]);return{options:_,series:m,focusDataIdx:h}},Yc=e=>{let{data:n,focusDataIdx:r,uPlotInst:a}=e;const i=(0,t.useRef)(null),l=(0,t.useMemo)((()=>{var e,t;const i=(null===a||void 0===a?void 0:a.series)||[],[l,...s]=n.map((e=>e[r]||0)),c=s.map(((e,t)=>{var n;const r=i[t+1],o=null===r||void 0===r||null===(n=r.stroke)||void 0===n?void 0:n.call(r);return{label:(null===r||void 0===r?void 0:r.label)||"other",stroke:o,value:e,show:null===r||void 0===r?void 0:r.show}})).filter((e=>e.value>0&&e.show)).sort(((e,t)=>t.value-e.value));return{point:{top:c[0]&&(null===a||void 0===a||null===(e=a.valToPos)||void 0===e?void 0:e.call(a,c[0].value,"y"))||0,left:(null===a||void 0===a||null===(t=a.valToPos)||void 0===t?void 0:t.call(a,l,"x"))||0},values:c,total:c.reduce(((e,t)=>e+t.value),0),timestamp:o()(1e3*l).tz().format(wt)}}),[r,a,n]),s=(0,t.useMemo)((()=>{if(!a||!l.total||!i.current)return;const{top:e,left:t}=l.point,n=parseFloat(a.over.style.left),r=parseFloat(a.over.style.top),{width:o,height:s}=a.over.getBoundingClientRect(),{width:c,height:u}=i.current.getBoundingClientRect(),d={top:e+r+50-(e+u>=s?u+100:0),left:t+n+50-(t+c>=o?c+100:0)};return d.left<0&&(d.left=20),d.top<0&&(d.top=20),d}),[l,a,i.current]);return mt("div",{className:Kn()({"vm-chart-tooltip":!0,"vm-chart-tooltip_hits":!0,"vm-bar-hits-tooltip":!0,"vm-bar-hits-tooltip_visible":-1!==r&&l.values.length}),ref:i,style:s,children:[mt("div",{children:l.values.map(((e,t)=>mt("div",{className:"vm-chart-tooltip-data",children:[mt("span",{className:"vm-chart-tooltip-data__marker",style:{background:e.stroke}}),mt("p",{children:[e.label,": ",mt("b",{children:e.value})]})]},t)))}),l.values.length>1&&mt("div",{className:"vm-chart-tooltip-data",children:mt("p",{children:["Total records: ",mt("b",{children:l.total})]})}),mt("div",{className:"vm-chart-tooltip-header",children:mt("div",{className:"vm-chart-tooltip-header__title",children:l.timestamp})})]})},Wc=e=>{let{period:n,setPeriod:r}=e;const[a,i]=(0,t.useState)({min:n.start,max:n.end});return(0,t.useEffect)((()=>{i({min:n.start,max:n.end})}),[n]),{xRange:a,setPlotScale:e=>{let{min:t,max:n}=e;const a=1e3*(n-t);aEt||r({from:o()(1e3*t).toDate(),to:o()(1e3*n).toDate()})}}},qc=e=>(e=>e instanceof MouseEvent)(e)?e.clientX:e.touches[0].clientX,Zc=e=>{let{dragSpeed:n=.85,setPanning:r,setPlotScale:o}=e;const a=(0,t.useRef)({leftStart:0,xUnitsPerPx:0,scXMin:0,scXMax:0}),i=e=>{e.preventDefault();const t=qc(e),{leftStart:r,xUnitsPerPx:i,scXMin:l,scXMax:s}=a.current,c=i*((t-r)*n);o({min:l-c,max:s-c})},l=()=>{r(!1),document.removeEventListener("mousemove",i),document.removeEventListener("mouseup",l),document.removeEventListener("touchmove",i),document.removeEventListener("touchend",l)};return e=>{let{e:t,u:n}=e;t.preventDefault(),r(!0),a.current={leftStart:qc(t),xUnitsPerPx:n.posToVal(1,"x")-n.posToVal(0,"x"),scXMin:n.scales.x.min||0,scXMax:n.scales.x.max||0},document.addEventListener("mousemove",i),document.addEventListener("mouseup",l),document.addEventListener("touchmove",i),document.addEventListener("touchend",l)}},Kc=e=>{const[n,r]=(0,t.useState)(!1),o=Zc({dragSpeed:.9,setPanning:r,setPlotScale:e});return{onReadyChart:t=>{const n=e=>{const n=e instanceof MouseEvent&&(e=>{const{ctrlKey:t,metaKey:n,button:r}=e;return 0===r&&(t||n)})(e),r=window.TouchEvent&&e instanceof TouchEvent&&e.touches.length>1;(n||r)&&o({u:t,e:e})};t.over.addEventListener("mousedown",n),t.over.addEventListener("touchstart",n),t.over.addEventListener("wheel",(n=>{if(!n.ctrlKey&&!n.metaKey)return;n.preventDefault();const{width:r}=t.over.getBoundingClientRect(),o=t.cursor.left&&t.cursor.left>0?t.cursor.left:0,a=t.posToVal(o,"x"),i=(t.scales.x.max||0)-(t.scales.x.min||0),l=n.deltaY<0?.9*i:i/.9,s=a-o/r*l,c=s+l;t.batch((()=>e({min:s,max:c})))}))},isPanning:n}},Gc=e=>{const t=e[0].clientX-e[1].clientX,n=e[0].clientY-e[1].clientY;return Math.sqrt(t*t+n*n)},Qc=e=>{let{uPlotInst:n,xRange:r,setPlotScale:o}=e;const[a,i]=(0,t.useState)(0),l=(0,t.useCallback)((e=>{const{target:t,ctrlKey:a,metaKey:i,key:l}=e,s=t instanceof HTMLInputElement||t instanceof HTMLTextAreaElement;if(!n||s)return;const c="+"===l||"="===l;if(("-"===l||c)&&!(a||i)){e.preventDefault();const t=(r.max-r.min)/10*(c?1:-1);o({min:r.min+t,max:r.max-t})}}),[n,r]),s=(0,t.useCallback)((e=>{if(!n||2!==e.touches.length)return;e.preventDefault();const t=Gc(e.touches),i=a-t,l=n.scales.x.max||r.max,s=n.scales.x.min||r.min,c=(l-s)/50*(i>0?-1:1);n.batch((()=>o({min:s+c,max:l-c})))}),[n,a,r]);return Jn("keydown",l),Jn("touchmove",s),Jn("touchstart",(e=>{2===e.touches.length&&(e.preventDefault(),i(Gc(e.touches)))})),null},Jc=e=>{let{onChange:n}=e;const[r,o]=$e(),a=(0,t.useRef)(null),{value:i,toggle:l,setFalse:s}=Fr(!1),[c,u]=Or(jc.LINE_STEPPED,"graph"),[d,h]=Or(!1,"stacked"),[p,f]=Or(!1,"fill"),m=(0,t.useMemo)((()=>({graphStyle:c,stacked:d,fill:p})),[c,d,p]);return(0,t.useEffect)((()=>{n(m)}),[m]),mt("div",{className:"vm-bar-hits-options",ref:a,children:[mt(jr,{title:"Graph settings",children:mt(Pr,{variant:"text",color:"primary",startIcon:mt(pn,{}),onClick:l,ariaLabel:"settings"})}),mt(Ir,{open:i,placement:"bottom-right",onClose:s,buttonRef:a,title:"Graph settings",children:mt("div",{className:"vm-bar-hits-options-settings",children:[mt("div",{className:"vm-bar-hits-options-settings-item vm-bar-hits-options-settings-item_list",children:[mt("p",{className:"vm-bar-hits-options-settings-item__title",children:"Graph style:"}),Object.values(jc).map((e=>{return mt("div",{className:Kn()({"vm-list-item":!0,"vm-list-item_active":c===e}),onClick:(t=e,()=>{u(t),r.set("graph",t),o(r)}),children:e},e);var t}))]}),mt("div",{className:"vm-bar-hits-options-settings-item",children:mt($r,{label:"Stacked",value:d,onChange:e=>{h(e),e?r.set("stacked","true"):r.delete("stacked"),o(r)}})}),mt("div",{className:"vm-bar-hits-options-settings-item",children:mt($r,{label:"Fill",value:p,onChange:e=>{f(e),e?r.set("fill","true"):r.delete("fill"),o(r)}})})]})})]})};const Xc=function(e,t){const n=[];let r=[];const o=e[0].length,a=Array(o);for(let i=0;ia[t]+=+(null!==e&&void 0!==e?e:0))));for(let i=1;in>i&&!t(n))),i]});return r=r.filter((e=>e.series[1]>-1)),{data:[e[0]].concat(n),bands:r}},eu=e=>{let{uPlotInst:n,onApplyFilter:r}=e;const[o,a]=(0,t.useState)([]),i=(0,t.useCallback)((()=>{const e=n.series.filter((e=>"x"!==e.scale));a(e)}),[n]);return(0,t.useEffect)(i,[n]),mt("div",{className:"vm-bar-hits-legend",children:o.map((e=>{var t,o;return mt(jr,{title:mt("ul",{className:"vm-bar-hits-legend-info",children:[mt("li",{children:["Click to ",e.show?"hide":"show"," the _stream."]}),mt("li",{children:[gr()?"Cmd":"Ctrl"," + Click to filter by the _stream."]})]}),children:mt("div",{className:Kn()({"vm-bar-hits-legend-item":!0,"vm-bar-hits-legend-item_hide":!e.show}),onClick:(o=e,e=>{e.metaKey||e.ctrlKey?r(o.label||""):o.show=!o.show,i(),n.redraw()}),children:[mt("div",{className:"vm-bar-hits-legend-item__marker",style:{backgroundColor:"".concat(null===e||void 0===e||null===(t=e.stroke)||void 0===t?void 0:t.call(e))}}),mt("div",{children:e.label})]})},e.label)}))})},tu=e=>{let{logHits:n,data:r,period:o,setPeriod:a,onApplyFilter:i}=e;const[l,s]=Oa(),c=(0,t.useRef)(null),[u,d]=(0,t.useState)(),[h,p]=(0,t.useState)({graphStyle:jc.LINE_STEPPED,stacked:!1,fill:!1}),{xRange:f,setPlotScale:m}=Wc({period:o,setPeriod:a}),{onReadyChart:_,isPanning:g}=Kc(m);Qc({uPlotInst:u,xRange:f,setPlotScale:m});const{data:v,bands:y}=(0,t.useMemo)((()=>h.stacked?Xc(r,(()=>!1)):{data:r,bands:[]}),[h,r]),{options:b,series:w,focusDataIdx:k}=Uc({data:v,logHits:n,bands:y,xRange:f,containerSize:s,onReadyChart:_,setPlotScale:m,graphOptions:h});return(0,t.useEffect)((()=>{u&&(Rc(u),function(e,t){let n=arguments.length>2&&void 0!==arguments[2]&&arguments[2];t.forEach((t=>{t.label&&(t.spanGaps=n),e.addSeries(t)}))}(u,w,!0),((e,t)=>{if(e.delBand(),t.length<2)return;const n=t.map(((e,t)=>({...e,index:t}))),r=n.filter((e=>e.forecast===tt.yhatUpper)),o=n.filter((e=>e.forecast===tt.yhatLower)),a=r.map((e=>{const t=o.find((t=>t.forecastGroup===e.forecastGroup));return t?{series:[e.index,t.index],fill:zc(tt.yhatUpper)}:null})).filter((e=>null!==e));a.length&&a.forEach((t=>{e.addBand(t)}))})(u,w),u.redraw())}),[w]),(0,t.useEffect)((()=>{if(!c.current)return;const e=new Nc(b,v,c.current);return d(e),()=>e.destroy()}),[c.current,b]),(0,t.useEffect)((()=>{u&&(u.scales.x.range=()=>[f.min,f.max],u.redraw())}),[f]),(0,t.useEffect)((()=>{u&&(u.setSize(s),u.redraw())}),[s]),(0,t.useEffect)((()=>{u&&(u.setData(v),u.redraw())}),[v]),mt("div",{className:"vm-bar-hits-chart__wrapper",children:[mt("div",{className:Kn()({"vm-bar-hits-chart":!0,"vm-bar-hits-chart_panning":g}),ref:l,children:[mt("div",{className:"vm-line-chart__u-plot",ref:c}),mt(Yc,{uPlotInst:u,data:r,focusDataIdx:k})]}),mt(Jc,{onChange:p}),u&&mt(eu,{uPlotInst:u,onApplyFilter:i})]})},nu=e=>{let{logHits:n,period:r,error:a,isLoading:i,onApplyFilter:l}=e;const{isMobile:s}=vr(),c=Qt(),u=(0,t.useMemo)((()=>{if(!n.length)return[[],[]];const e=Array.from(new Set(n.map((e=>e.timestamps)).flat())),t=(e=>e.map((e=>e?o()(e).unix():null)).filter(Boolean).sort(((e,t)=>e-t)))(e),r=((e,t)=>e.map((e=>t.map((t=>{const n=e.timestamps.findIndex((e=>e===t));return-1===n?null:e.values[n]||null})))))(n,e);return[t,...r]}),[n]),d=(0,t.useMemo)((()=>{const e=u.every((e=>0===e.length)),t=0===u[0].length,n=0===u[1].length;return e?"No logs volume available\nNo volume information available for the current queries and time range.":t?"No timestamp information available for the current queries and time range.":n?"No value information available for the current queries and time range.":""}),[u]);return mt("section",{className:Kn()({"vm-explore-logs-chart":!0,"vm-block":!0,"vm-block_mobile":s}),children:[i&&mt(fa,{message:"Loading hits stats...",containerStyles:{position:"absolute"}}),!a&&d&&mt("div",{className:"vm-explore-logs-chart__empty",children:mt(br,{variant:"info",children:d})}),a&&d&&mt("div",{className:"vm-explore-logs-chart__empty",children:mt(br,{variant:"error",children:a})}),u&&mt(tu,{logHits:n,data:u,period:r,setPeriod:e=>{let{from:t,to:n}=e;c({type:"SET_PERIOD",payload:{from:t,to:n}})},onApplyFilter:l})]})},ru=(e,n)=>{const[r]=$e(),[a,i]=(0,t.useState)([]),[l,s]=(0,t.useState)([]),[c,u]=(0,t.useState)(),d=(0,t.useRef)(new AbortController),h=(0,t.useMemo)((()=>(e=>"".concat(e,"/select/logsql/hits"))(e)),[e]),p=(e,t)=>(e.total=(e.total||0)+(t.total||0),t.timestamps.forEach(((n,r)=>{const o=e.timestamps.findIndex((e=>e===n));-1===o?(e.timestamps.push(n),e.values.push(t.values[r])):e.values[o]+=t.values[r]})),e),f=(0,t.useCallback)((async e=>{d.current.abort(),d.current=new AbortController;const{signal:t}=d.current,a=Date.now();s((e=>({...e,[a]:!0}))),u(void 0);try{const l=((e,t,n)=>{const a=o()(1e3*t.start),i=o()(1e3*t.end),l=i.diff(a,"milliseconds"),s=Math.ceil(l/20)||1;return{signal:n,method:"POST",headers:{AccountID:r.get("accountID")||"0",ProjectID:r.get("projectID")||"0"},body:new URLSearchParams({query:e.trim(),step:"".concat(s,"ms"),start:a.toISOString(),end:i.toISOString(),field:"_stream"})}})(n,e,t),c=await fetch(h,l);if(!c.ok||!c.body){const e=await c.text();return u(e),i([]),void s((e=>({...e,[a]:!1})))}const d=await c.json(),f=null===d||void 0===d?void 0:d.hits;if(!f){u("Error: No 'hits' field in response")}i(f?(e=>{const t=e.sort(((e,t)=>(t.total||0)-(e.total||0))),n=[],r=t.slice(5).reduce(p,{fields:{},timestamps:[],values:[],total:0});r.total&&n.push(r);const o=t.slice(0,5);return o.length&&n.push(...o),n})(f):[])}catch(zd){zd instanceof Error&&"AbortError"!==zd.name&&(u(String(zd)),console.error(zd),i([]))}s((e=>({...e,[a]:!1})))}),[h,n,r]);return{logHits:a,isLoading:Object.values(l).some((e=>e)),error:c,fetchLogHits:f}},ou=Number(We("LOGS_LIMIT")),au=isNaN(ou)?50:ou,iu=()=>{const{serverUrl:e}=gt(),{duration:n,relativeTime:r,period:o}=Gt(),{setSearchParamsFromKeys:a}=Rr(),[i,l]=Or(au,"limit"),[s,c]=Or("*","query"),[u,d]=(0,t.useState)(""),[h,p]=(0,t.useState)(o),[f,m]=(0,t.useState)(""),{logs:_,isLoading:g,error:v,fetchLogs:y}=pa(e,s,i),{fetchLogHits:b,...w}=ru(e,s),k=(0,t.useCallback)((()=>{const e=Ft.find((e=>e.id===r));if(!e)return o;const{duration:t,until:n}=e;return Rt(t,n())}),[o,r]),x=()=>{if(!s)return void m(rt.validQuery);m("");const e=k();p(e),y(e).then((t=>{t&&b(e)})).catch((e=>e)),a({query:s,"g0.range_input":n,"g0.end_input":e.date,"g0.relative_time":r||"none"})};return(0,t.useEffect)((()=>{s&&x()}),[o]),(0,t.useEffect)((()=>{x(),d(s)}),[s]),mt("div",{className:"vm-explore-logs",children:[mt(Da,{query:u,error:f,limit:i,onChange:d,onChangeLimit:e=>{l(e),a({limit:e}),Ye("LOGS_LIMIT","".concat(e))},onRun:()=>{c(u),x()}}),g&&mt(fa,{message:"Loading logs..."}),v&&mt(br,{variant:"error",children:v}),!v&&mt(nu,{...w,query:s,period:h,onApplyFilter:e=>{c((t=>"_stream: ".concat("other"===e?"{}":e," AND (").concat(t,")")))},isLoading:!g&&w.isLoading}),mt(ha,{data:_})]})},lu={home:"/",metrics:"/metrics",dashboards:"/dashboards",cardinality:"/cardinality",topQueries:"/top-queries",trace:"/trace",withTemplate:"/expand-with-exprs",relabel:"/relabeling",logs:"/logs",activeQueries:"/active-queries",queryAnalyzer:"/query-analyzer",icons:"/icons",anomaly:"/anomaly",query:"/query"},{REACT_APP_TYPE:su}={REACT_APP_TYPE:"logs"},cu=su===Ue.logs,uu={header:{tenant:!0,stepControl:!cu,timeSelector:!cu,executionControls:!cu}},du={[lu.home]:{title:"Query",...uu},[lu.metrics]:{title:"Explore Prometheus metrics",header:{tenant:!0,stepControl:!0,timeSelector:!0}},[lu.cardinality]:{title:"Explore cardinality",header:{tenant:!0,cardinalityDatePicker:!0}},[lu.topQueries]:{title:"Top queries",header:{tenant:!0}},[lu.trace]:{title:"Trace analyzer",header:{}},[lu.queryAnalyzer]:{title:"Query analyzer",header:{}},[lu.dashboards]:{title:"Dashboards",...uu},[lu.withTemplate]:{title:"WITH templates",header:{}},[lu.relabel]:{title:"Metric relabel debug",header:{}},[lu.logs]:{title:"Logs Explorer",header:{}},[lu.activeQueries]:{title:"Active Queries",header:{}},[lu.icons]:{title:"Icons",header:{}},[lu.anomaly]:{title:"Anomaly exploration",...uu},[lu.query]:{title:"Query",...uu}},hu=lu,pu=e=>{let{activeMenu:t,label:n,value:r,color:o}=e;return mt(Le,{className:Kn()({"vm-header-nav-item":!0,"vm-header-nav-item_active":t===r}),style:{color:o},to:r,children:n})},fu=e=>{let{activeMenu:n,label:r,color:o,background:a,submenu:i,direction:l}=e;const{pathname:s}=ne(),[c,u]=(0,t.useState)(null),d=(0,t.useRef)(null),{value:h,setFalse:p,setTrue:f}=Fr(!1),m=()=>{c&&clearTimeout(c);const e=setTimeout(p,300);u(e)};return(0,t.useEffect)((()=>{p()}),[s]),"column"===l?mt(pt.FK,{children:i.map((e=>mt(pu,{activeMenu:n,value:e.value||"",label:e.label||""},e.value)))}):mt("div",{className:Kn()({"vm-header-nav-item":!0,"vm-header-nav-item_sub":!0,"vm-header-nav-item_open":h,"vm-header-nav-item_active":i.find((e=>e.value===n))}),style:{color:o},onMouseEnter:()=>{f(),c&&clearTimeout(c)},onMouseLeave:m,ref:d,children:[r,mt(kn,{}),mt(Ir,{open:h,placement:"bottom-left",offset:{top:12,left:0},onClose:p,buttonRef:d,children:mt("div",{className:"vm-header-nav-item-submenu",style:{background:a},onMouseLeave:m,onMouseEnter:()=>{c&&clearTimeout(c)},children:i.map((e=>mt(pu,{activeMenu:n,value:e.value||"",label:e.label||"",color:o},e.value)))})})]})},mu={label:"Explore",submenu:[{label:du[hu.metrics].title,value:hu.metrics},{label:du[hu.cardinality].title,value:hu.cardinality},{label:du[hu.topQueries].title,value:hu.topQueries},{label:du[hu.activeQueries].title,value:hu.activeQueries}]},_u={label:"Tools",submenu:[{label:du[hu.trace].title,value:hu.trace},{label:du[hu.queryAnalyzer].title,value:hu.queryAnalyzer},{label:du[hu.withTemplate].title,value:hu.withTemplate},{label:du[hu.relabel].title,value:hu.relabel}]},gu=[{label:du[hu.logs].title,value:hu.home}],vu=[{label:du[hu.anomaly].title,value:hu.home}],yu=[{label:du[hu.home].title,value:hu.home},mu,_u],bu=e=>{let{color:n,background:r,direction:o}=e;const a=He(),{dashboardsSettings:i}=(0,t.useContext)(dr).state,{pathname:l}=ne(),[s,c]=(0,t.useState)(l),u=(0,t.useMemo)((()=>{switch("logs"){case Ue.logs:return gu;case Ue.anomaly:return vu;default:return[...yu,{label:du[hu.dashboards].title,value:hu.dashboards,hide:a||!i.length}].filter((e=>!e.hide))}}),[a,i]);return(0,t.useEffect)((()=>{c(l)}),[l]),mt("nav",{className:Kn()({"vm-header-nav":!0,["vm-header-nav_".concat(o)]:o}),children:u.map((e=>e.submenu?mt(fu,{activeMenu:s,label:e.label||"",submenu:e.submenu,color:n,background:r,direction:o},e.label):mt(pu,{activeMenu:s,value:e.value||"",label:e.label||"",color:n},e.value)))})},wu=e=>{let{title:n,children:r,onClose:o,className:a,isOpen:i=!0}=e;const{isMobile:l}=vr(),s=oe(),c=ne(),u=(0,t.useCallback)((e=>{i&&"Escape"===e.key&&o()}),[i]),d=e=>{e.stopPropagation()},h=(0,t.useCallback)((()=>{i&&(s(c,{replace:!0}),o())}),[i,c,o]);return(0,t.useEffect)((()=>{if(i)return document.body.style.overflow="hidden",()=>{document.body.style.overflow="auto"}}),[i]),Jn("popstate",h),Jn("keyup",u),t.default.createPortal(mt("div",{className:Kn()({"vm-modal":!0,"vm-modal_mobile":l,["".concat(a)]:a}),onMouseDown:o,children:mt("div",{className:"vm-modal-content",children:[mt("div",{className:"vm-modal-content-header",onMouseDown:d,children:[n&&mt("div",{className:"vm-modal-content-header__title",children:n}),mt("div",{className:"vm-modal-header__close",children:mt(Pr,{variant:"text",size:"small",onClick:o,ariaLabel:"close",children:mt(fn,{})})})]}),mt("div",{className:"vm-modal-content-body",onMouseDown:d,tabIndex:0,children:r})]})}),document.body)},ku=mt("code",{children:gr()?"Cmd":"Ctrl"}),xu=[{title:"Zoom in",description:mt(pt.FK,{children:["To zoom in, hold down the ",ku," + ",mt("code",{children:"scroll up"}),", or press the ",mt("code",{children:"+"}),". Also, you can zoom in on a range on the graph by holding down your mouse button and selecting the range."]})},{title:"Zoom out",description:mt(pt.FK,{children:["To zoom out, hold down the ",ku," + ",mt("code",{children:"scroll down"}),", or press the ",mt("code",{children:"-"}),"."]})},{title:"Move horizontal axis",description:mt(pt.FK,{children:["To move the graph, hold down the ",ku," + ",mt("code",{children:"drag"})," the graph to the right or left."]})},{title:"Fixing a tooltip",description:mt(pt.FK,{children:["To fix the tooltip, ",mt("code",{children:"click"})," mouse when it's open. Then, you can drag the fixed tooltip by ",mt("code",{children:"clicking"})," and ",mt("code",{children:"dragging"})," on the ",mt(Rn,{})," icon."]})},{title:"Set a custom range for the vertical axis",description:mt(pt.FK,{children:["To set a custom range for the vertical axis, click on the ",mt(pn,{})," icon located in the upper right corner of the graph, activate the toggle, and set the values."]})}],Su=[{title:"Show/hide a legend item",description:mt(pt.FK,{children:[mt("code",{children:"click"})," on a legend item to isolate it on the graph.",ku," + ",mt("code",{children:"click"})," on a legend item to remove it from the graph. To revert to the previous state, click again."]})},{title:"Copy label key-value pairs",description:mt(pt.FK,{children:[mt("code",{children:"click"})," on a label key-value pair to save it to the clipboard."]})},{title:"Collapse/Expand the legend group",description:mt(pt.FK,{children:[mt("code",{children:"click"})," on the group name (e.g. ",mt("b",{children:'Query 1: {__name__!=""}'}),") to collapse or expand the legend."]})}],Au=xu.concat(Su),Eu=()=>{const{value:e,setFalse:t,setTrue:n}=Fr(!1);return mt(pt.FK,{children:[mt(jr,{title:"Show tips on working with the graph",children:mt(Pr,{variant:"text",color:"gray",startIcon:mt($n,{}),onClick:n,ariaLabel:"open the tips"})}),e&&mt(wu,{title:"Tips on working with the graph and the legend",onClose:t,children:mt("div",{className:"fc-graph-tips",children:Au.map((e=>{let{title:t,description:n}=e;return mt("div",{className:"fc-graph-tips-item",children:[mt("h4",{className:"fc-graph-tips-item__action",children:t}),mt("p",{className:"fc-graph-tips-item__description",children:n})]},t)}))})})]})},Cu=mt("code",{children:gr()?"Cmd":"Ctrl"}),Mu=mt(pt.FK,{children:[mt("code",{children:gr()?"Option":"Ctrl"})," + ",mt("code",{children:"Space"})]}),Nu=[{title:"Query",list:[{keys:mt("code",{children:"Enter"}),description:"Run"},{keys:mt(pt.FK,{children:[mt("code",{children:"Shift"})," + ",mt("code",{children:"Enter"})]}),description:"Multi-line queries"},{keys:mt(pt.FK,{children:[Cu," + ",mt("code",{children:"Arrow Up"})]}),description:"Previous command from the Query history"},{keys:mt(pt.FK,{children:[Cu," + ",mt("code",{children:"Arrow Down"})]}),description:"Next command from the Query history"},{keys:mt(pt.FK,{children:[Cu," + ",mt("code",{children:"click"})," by ",mt(Dn,{})]}),description:"Toggle multiple queries"},{keys:Mu,description:"Show quick autocomplete tips"}]},{title:"Graph",readMore:mt(Eu,{}),list:[{keys:mt(pt.FK,{children:[Cu," + ",mt("code",{children:"scroll Up"})," or ",mt("code",{children:"+"})]}),description:"Zoom in"},{keys:mt(pt.FK,{children:[Cu," + ",mt("code",{children:"scroll Down"})," or ",mt("code",{children:"-"})]}),description:"Zoom out"},{keys:mt(pt.FK,{children:[Cu," + ",mt("code",{children:"drag"})]}),description:"Move the graph left/right"},{keys:mt(pt.FK,{children:mt("code",{children:"click"})}),description:"Select the series in the legend"},{keys:mt(pt.FK,{children:[Cu," + ",mt("code",{children:"click"})]}),description:"Toggle multiple series in the legend"}]}],Tu="Shortcut keys",Pu=gr(),Du=Pu?"Cmd + /":"F1",Ou=e=>{let{showTitle:n}=e;const r=He(),{value:o,setTrue:a,setFalse:i}=Fr(!1),l=(0,t.useCallback)((e=>{const t=Pu&&"/"===e.key&&e.metaKey,n=!Pu&&"F1"===e.key&&!e.metaKey;(t||n)&&a()}),[a]);return Jn("keydown",l),mt(pt.FK,{children:[mt(jr,{open:!0!==n&&void 0,title:"".concat(Tu," (").concat(Du,")"),placement:"bottom-center",children:mt(Pr,{className:r?"":"vm-header-button",variant:"contained",color:"primary",startIcon:mt(En,{}),onClick:a,ariaLabel:Tu,children:n&&Tu})}),o&&mt(wu,{title:"Shortcut keys",onClose:i,children:mt("div",{className:"vm-shortcuts",children:Nu.map((e=>mt("div",{className:"vm-shortcuts-section",children:[e.readMore&&mt("div",{className:"vm-shortcuts-section__read-more",children:e.readMore}),mt("h3",{className:"vm-shortcuts-section__title",children:e.title}),mt("div",{className:"vm-shortcuts-section-list",children:e.list.map(((t,n)=>mt("div",{className:"vm-shortcuts-section-list-item",children:[mt("div",{className:"vm-shortcuts-section-list-item__key",children:t.keys}),mt("p",{className:"vm-shortcuts-section-list-item__description",children:t.description})]},"".concat(e.title,"_").concat(n))))})]},e.title)))})})]})},Ru=e=>{let{open:t}=e;return mt("button",{className:Kn()({"vm-menu-burger":!0,"vm-menu-burger_opened":t}),"aria-label":"menu",children:mt("span",{})})},{REACT_APP_TYPE:Lu}={REACT_APP_TYPE:"logs"},Iu=Lu===Ue.logs,zu=e=>{let{background:n,color:r}=e;const{pathname:o}=ne(),{isMobile:a}=vr(),i=(0,t.useRef)(null),{value:l,toggle:s,setFalse:c}=Fr(!1);return(0,t.useEffect)(c,[o]),Lr(i,c),mt("div",{className:"vm-header-sidebar",ref:i,children:[mt("div",{className:Kn()({"vm-header-sidebar-button":!0,"vm-header-sidebar-button_open":l}),onClick:s,children:mt(Ru,{open:l})}),mt("div",{className:Kn()({"vm-header-sidebar-menu":!0,"vm-header-sidebar-menu_open":l}),children:[mt("div",{children:mt(bu,{color:r,background:n,direction:"column"})}),mt("div",{className:"vm-header-sidebar-menu-settings",children:!a&&!Iu&&mt(Ou,{showTitle:!0})})]})]})},ju=e=>{let{controlsComponent:n,isMobile:r,...o}=e;const a=He(),{pathname:i}=ne(),{accountIds:l}=(()=>{const{useTenantID:e}=Fe(),n=He(),{serverUrl:r}=gt(),[o,a]=(0,t.useState)(!1),[i,l]=(0,t.useState)(),[s,c]=(0,t.useState)([]),u=(0,t.useMemo)((()=>"".concat(r.replace(/^(.+)(\/select.+)/,"$1"),"/admin/tenants")),[r]),d=(0,t.useMemo)((()=>!!Be(r)),[r]),h=n?!e:!d;return(0,t.useEffect)((()=>{h||(async()=>{a(!0);try{const e=await fetch(u),t=await e.json(),n=t.data||[];c(n.sort(((e,t)=>e.localeCompare(t)))),e.ok?l(void 0):l("".concat(t.errorType,"\r\n").concat(null===t||void 0===t?void 0:t.error))}catch(zd){zd instanceof Error&&l("".concat(zd.name,": ").concat(zd.message))}a(!1)})().catch(console.error)}),[u]),{accountIds:s,isLoading:o,error:i}})(),{value:s,toggle:c,setFalse:u}=Fr(!1),d=mt(n,{...o,isMobile:r,accountIds:l,headerSetup:(0,t.useMemo)((()=>(du[i]||{}).header||{}),[i])});return r?mt(pt.FK,{children:[mt("div",{children:mt(Pr,{className:Kn()({"vm-header-button":!a}),startIcon:mt(jn,{}),onClick:c,ariaLabel:"controls"})}),mt(wu,{title:"Controls",onClose:u,isOpen:s,className:Kn()({"vm-header-controls-modal":!0,"vm-header-controls-modal_open":s}),children:d})]}):d},{REACT_APP_TYPE:$u}={REACT_APP_TYPE:"logs"},Fu=$u===Ue.logs||$u===Ue.anomaly,Hu=()=>{switch($u){case Ue.logs:return mt(un,{});case Ue.anomaly:return mt(dn,{});default:return mt(cn,{})}},Vu=e=>{let{controlsComponent:n}=e;const{isMobile:r}=vr(),o=Xn(),a=(0,t.useMemo)((()=>window.innerWidth<1e3),[o]),{isDarkTheme:i}=gt(),l=He(),s=(0,t.useMemo)((()=>it(i?"color-background-block":"color-primary")),[i]),{background:c,color:u}=(0,t.useMemo)((()=>{const{headerStyles:{background:e=(l?"#FFF":s),color:t=(l?s:"#FFF")}={}}=Fe();return{background:e,color:t}}),[s]),d=oe(),h=()=>{d({pathname:hu.home}),window.location.reload()};return mt("header",{className:Kn()({"vm-header":!0,"vm-header_app":l,"vm-header_dark":i,"vm-header_sidebar":a,"vm-header_mobile":r}),style:{background:c,color:u},children:[a?mt(zu,{background:c,color:u}):mt(pt.FK,{children:[!l&&mt("div",{className:Kn()({"vm-header-logo":!0,"vm-header-logo_logs":Fu}),onClick:h,style:{color:u},children:mt(Hu,{})}),mt(bu,{color:u,background:c})]}),a&&mt("div",{className:Kn()({"vm-header-logo":!0,"vm-header-logo_mobile":!0,"vm-header-logo_logs":Fu}),onClick:h,style:{color:u},children:mt(Hu,{})}),mt(ju,{controlsComponent:n,displaySidebar:a,isMobile:r})]})},Bu={href:"https://github.com/VictoriaMetrics/VictoriaMetrics/issues/new/choose",Icon:()=>mt("svg",{viewBox:"0 0 24 24",fill:"currentColor",children:mt("path",{d:"M12 2C6.49 2 2 6.49 2 12s4.49 10 10 10 10-4.49 10-10S17.51 2 12 2zm0 18c-4.41 0-8-3.59-8-8s3.59-8 8-8 8 3.59 8 8-3.59 8-8 8zm3-8c0 1.66-1.34 3-3 3s-3-1.34-3-3 1.34-3 3-3 3 1.34 3 3z"})}),title:"Create an issue"},Uu=[{href:"https://docs.victoriametrics.com/MetricsQL.html",Icon:Tn,title:"MetricsQL"},{href:"https://docs.victoriametrics.com/#vmui",Icon:Ln,title:"Documentation"},Bu],Yu=[{href:"https://docs.victoriametrics.com/victorialogs/logsql/",Icon:Tn,title:"LogsQL"},{href:"https://docs.victoriametrics.com/victorialogs/",Icon:Ln,title:"Documentation"},Bu],Wu=(0,t.memo)((e=>{let{links:t=Uu}=e;const n="2019-".concat((new Date).getFullYear());return mt("footer",{className:"vm-footer",children:[mt("a",{className:"vm-link vm-footer__website",target:"_blank",href:"https://victoriametrics.com/",rel:"me noreferrer",children:[mt(hn,{}),"victoriametrics.com"]}),t.map((e=>{let{href:t,Icon:n,title:r}=e;return mt("a",{className:"vm-link vm-footer__link",target:"_blank",href:t,rel:"help noreferrer",children:[mt(n,{}),r]},"".concat(t,"-").concat(r))})),mt("div",{className:"vm-footer__copyright",children:["\xa9 ",n," VictoriaMetrics"]})]})})),qu=Wu,Zu="Enable to save the modified server URL to local storage, preventing reset upon page refresh.",Ku="Disable to stop saving the server URL to local storage, reverting to the default URL on page refresh.",Gu=(0,t.forwardRef)(((e,n)=>{let{onClose:r}=e;const{serverUrl:o}=gt(),a=vt(),{value:i,toggle:l}=Fr(!!We("SERVER_URL")),[s,c]=(0,t.useState)(o),[u,d]=(0,t.useState)(""),h=(0,t.useCallback)((()=>{const e=Be(s);""!==e&&a({type:"SET_TENANT_ID",payload:e}),a({type:"SET_SERVER",payload:s}),r()}),[s]);return(0,t.useEffect)((()=>{o||d(rt.emptyServer),(e=>{let t;try{t=new URL(e)}catch(n){return!1}return"http:"===t.protocol||"https:"===t.protocol})(o)||d(rt.validServer)}),[o]),(0,t.useEffect)((()=>{i?Ye("SERVER_URL",s):qe(["SERVER_URL"])}),[i]),(0,t.useEffect)((()=>{i&&Ye("SERVER_URL",s)}),[s]),(0,t.useEffect)((()=>{o!==s&&c(o)}),[o]),(0,t.useImperativeHandle)(n,(()=>({handleApply:h})),[h]),mt("div",{children:[mt("div",{className:"vm-server-configurator__title",children:"Server URL"}),mt("div",{className:"vm-server-configurator-url",children:[mt(Vr,{autofocus:!0,value:s,error:u,onChange:e=>{c(e||""),d("")},onEnter:h,inputmode:"url"}),mt(jr,{title:i?Ku:Zu,children:mt(Pr,{className:"vm-server-configurator-url__button",variant:"text",color:i?"primary":"gray",onClick:l,startIcon:mt(zn,{})})})]})]})})),Qu=[{label:"Graph",type:nt.chart},{label:"JSON",type:nt.code},{label:"Table",type:nt.table}],Ju=(0,t.forwardRef)(((e,n)=>{let{onClose:r}=e;const{isMobile:o}=vr(),{seriesLimits:a}=(0,t.useContext)(ar).state,i=(0,t.useContext)(ar).dispatch,[l,s]=(0,t.useState)(a),[c,u]=(0,t.useState)({table:"",chart:"",code:""}),d=(0,t.useCallback)((()=>{i({type:"SET_SERIES_LIMITS",payload:l}),r()}),[l]);return(0,t.useImperativeHandle)(n,(()=>({handleApply:d})),[d]),mt("div",{className:"vm-limits-configurator",children:[mt("div",{className:"vm-server-configurator__title",children:["Series limits by tabs",mt(jr,{title:"Set to 0 to disable the limit",children:mt(Pr,{variant:"text",color:"primary",size:"small",startIcon:mt(_n,{})})}),mt("div",{className:"vm-limits-configurator-title__reset",children:mt(Pr,{variant:"text",color:"primary",size:"small",startIcon:mt(mn,{}),onClick:()=>{s(Xe)},children:"Reset limits"})})]}),mt("div",{className:Kn()({"vm-limits-configurator__inputs":!0,"vm-limits-configurator__inputs_mobile":o}),children:Qu.map((e=>{return mt("div",{children:mt(Vr,{label:e.label,value:l[e.type],error:c[e.type],onChange:(t=e.type,e=>{const n=e||"";u((e=>({...e,[t]:+n<0?rt.positiveNumber:""}))),s({...l,[t]:n||1/0})}),onEnter:d,type:"number"})},e.type);var t}))})]})})),Xu=Ju,ed=()=>mt(jr,{title:"Browser timezone is not recognized, supported, or could not be determined.",children:mt(gn,{})}),td=Yt(),nd=(0,t.forwardRef)(((e,n)=>{const{isMobile:r}=vr(),o=Bt(),{timezone:a,defaultTimezone:i}=Gt(),l=Qt(),[s,c]=(0,t.useState)(a),[u,d]=(0,t.useState)(""),h=(0,t.useRef)(null),{value:p,toggle:f,setFalse:m}=Fr(!1),_=(0,t.useMemo)((()=>[{title:"Default time (".concat(i,")"),region:i,utc:i?Vt(i):"UTC"},{title:td.title,region:td.region,utc:Vt(td.region),isInvalid:!td.isValid},{title:"UTC (Coordinated Universal Time)",region:"UTC",utc:"UTC"}].filter((e=>e.region))),[i]),g=(0,t.useMemo)((()=>{if(!u)return o;try{return Bt(u)}catch(zd){return{}}}),[u,o]),v=(0,t.useMemo)((()=>Object.keys(g)),[g]),y=(0,t.useMemo)((()=>({region:s,utc:Vt(s)})),[s]),b=e=>()=>{(e=>{c(e.region),d(""),m()})(e)};return(0,t.useEffect)((()=>{c(a)}),[a]),(0,t.useImperativeHandle)(n,(()=>({handleApply:()=>{l({type:"SET_TIMEZONE",payload:s})}})),[s]),mt("div",{className:"vm-timezones",children:[mt("div",{className:"vm-server-configurator__title",children:"Time zone"}),mt("div",{className:"vm-timezones-item vm-timezones-item_selected",onClick:f,ref:h,children:[mt("div",{className:"vm-timezones-item__title",children:y.region}),mt("div",{className:"vm-timezones-item__utc",children:y.utc}),mt("div",{className:Kn()({"vm-timezones-item__icon":!0,"vm-timezones-item__icon_open":p}),children:mt(kn,{})})]}),mt(Ir,{open:p,buttonRef:h,placement:"bottom-left",onClose:m,fullWidth:!0,title:r?"Time zone":void 0,children:mt("div",{className:Kn()({"vm-timezones-list":!0,"vm-timezones-list_mobile":r}),children:[mt("div",{className:"vm-timezones-list-header",children:[mt("div",{className:"vm-timezones-list-header__search",children:mt(Vr,{autofocus:!0,label:"Search",value:u,onChange:e=>{d(e)}})}),_.map(((e,t)=>e&&mt("div",{className:"vm-timezones-item vm-timezones-list-group-options__item",onClick:b(e),children:[mt("div",{className:"vm-timezones-item__title",children:[e.title,e.isInvalid&&mt(ed,{})]}),mt("div",{className:"vm-timezones-item__utc",children:e.utc})]},"".concat(t,"_").concat(e.region))))]}),v.map((e=>mt("div",{className:"vm-timezones-list-group",children:mt(Kr,{defaultExpanded:!0,title:mt("div",{className:"vm-timezones-list-group__title",children:e}),children:mt("div",{className:"vm-timezones-list-group-options",children:g[e]&&g[e].map((e=>mt("div",{className:"vm-timezones-item vm-timezones-list-group-options__item",onClick:b(e),children:[mt("div",{className:"vm-timezones-item__title",children:e.region}),mt("div",{className:"vm-timezones-item__utc",children:e.utc})]},e.search)))})})},e)))]})})]})})),rd=nd,od=e=>{let{options:n,value:r,label:o,onChange:a}=e;const i=(0,t.useRef)(null),[l,s]=(0,t.useState)({width:"0px",left:"0px",borderRadius:"0px"}),c=e=>()=>{a(e)};return(0,t.useEffect)((()=>{if(!i.current)return void s({width:"0px",left:"0px",borderRadius:"0px"});const e=n.findIndex((e=>e.value===r)),{width:t}=i.current.getBoundingClientRect();let o=t,a=e*o,l="0";0===e&&(l="16px 0 0 16px"),e===n.length-1&&(l="10px",a-=1,l="0 16px 16px 0"),0!==e&&e!==n.length-1&&(o+=1,a-=1),s({width:"".concat(o,"px"),left:"".concat(a,"px"),borderRadius:l})}),[i,r,n]),mt("div",{className:"vm-toggles",children:[o&&mt("label",{className:"vm-toggles__label",children:o}),mt("div",{className:"vm-toggles-group",style:{gridTemplateColumns:"repeat(".concat(n.length,", 1fr)")},children:[l.borderRadius&&mt("div",{className:"vm-toggles-group__highlight",style:l}),n.map(((e,t)=>mt("div",{className:Kn()({"vm-toggles-group-item":!0,"vm-toggles-group-item_first":0===t,"vm-toggles-group-item_active":e.value===r,"vm-toggles-group-item_icon":e.icon&&e.title}),onClick:c(e.value),ref:e.value===r?i:null,children:[e.icon,e.title]},e.value)))]})]})},ad=Object.values(ot).map((e=>({title:e,value:e}))),id=()=>{const{isMobile:e}=vr(),t=vt(),{theme:n}=gt();return mt("div",{className:Kn()({"vm-theme-control":!0,"vm-theme-control_mobile":e}),children:[mt("div",{className:"vm-server-configurator__title",children:"Theme preferences"}),mt("div",{className:"vm-theme-control__toggle",children:mt(od,{options:ad,value:n,onChange:e=>{t({type:"SET_THEME",payload:e})}})},"".concat(e))]})},ld=()=>{const{isMobile:e}=vr(),{markdownParsing:n}=mr(),r=(0,t.useContext)(fr).dispatch;return mt("div",{children:[mt("div",{className:"vm-server-configurator__title",children:"Markdown Parsing for Logs"}),mt($r,{label:n?"Disable markdown parsing":"Enable markdown parsing",value:n,onChange:e=>{r({type:"SET_MARKDOWN_PARSING",payload:e})},fullWidth:e}),mt("div",{className:"vm-server-configurator__info",children:"Toggle this switch to enable or disable the Markdown formatting for log entries. Enabling this will parse log texts to Markdown."})]})},sd="Settings",{REACT_APP_TYPE:cd}={REACT_APP_TYPE:"logs"},ud=cd===Ue.logs,dd=()=>{const{isMobile:e}=vr(),n=He(),r=(0,t.useRef)(null),o=(0,t.useRef)(null),a=(0,t.useRef)(null),{value:i,setTrue:l,setFalse:s}=Fr(!1),c=[{show:!n&&!ud,component:mt(Gu,{ref:r,onClose:s})},{show:!ud,component:mt(Xu,{ref:o,onClose:s})},{show:ud,component:mt(ld,{})},{show:!0,component:mt(rd,{ref:a})},{show:!n,component:mt(id,{})}].filter((e=>e.show));return mt(pt.FK,{children:[e?mt("div",{className:"vm-mobile-option",onClick:l,children:[mt("span",{className:"vm-mobile-option__icon",children:mt(pn,{})}),mt("div",{className:"vm-mobile-option-text",children:mt("span",{className:"vm-mobile-option-text__label",children:sd})}),mt("span",{className:"vm-mobile-option__arrow",children:mt(wn,{})})]}):mt(jr,{title:sd,children:mt(Pr,{className:Kn()({"vm-header-button":!n}),variant:"contained",color:"primary",startIcon:mt(pn,{}),onClick:l,ariaLabel:"settings"})}),i&&mt(wu,{title:sd,onClose:s,children:mt("div",{className:Kn()({"vm-server-configurator":!0,"vm-server-configurator_mobile":e}),children:[c.map(((e,t)=>mt("div",{className:"vm-server-configurator__input",children:e.component},t))),mt("div",{className:"vm-server-configurator-footer",children:[mt(Pr,{color:"error",variant:"outlined",onClick:s,children:"Cancel"}),mt(Pr,{color:"primary",variant:"contained",onClick:()=>{r.current&&r.current.handleApply(),o.current&&o.current.handleApply(),a.current&&a.current.handleApply(),s()},children:"Apply"})]})]})})]})},hd=e=>{let{relativeTime:t,setDuration:n}=e;const{isMobile:r}=vr();return mt("div",{className:Kn()({"vm-time-duration":!0,"vm-time-duration_mobile":r}),children:Ft.map((e=>{let{id:o,duration:a,until:i,title:l}=e;return mt("div",{className:Kn()({"vm-list-item":!0,"vm-list-item_mobile":r,"vm-list-item_active":o===t}),onClick:(s={duration:a,until:i(),id:o},()=>{n(s)}),children:l||a},o);var s}))})},pd=e=>{let{viewDate:t,showArrowNav:n,onChangeViewDate:r,toggleDisplayYears:o}=e;return mt("div",{className:"vm-calendar-header",children:[mt("div",{className:"vm-calendar-header-left",onClick:o,children:[mt("span",{className:"vm-calendar-header-left__date",children:t.format("MMMM YYYY")}),mt("div",{className:"vm-calendar-header-left__select-year",children:mt(kn,{})})]}),n&&mt("div",{className:"vm-calendar-header-right",children:[mt("div",{className:"vm-calendar-header-right__prev",onClick:()=>{r(t.subtract(1,"month"))},children:mt(wn,{})}),mt("div",{className:"vm-calendar-header-right__next",onClick:()=>{r(t.add(1,"month"))},children:mt(wn,{})})]})]})},fd=["Sunday","Monday","Tuesday","Wednesday","Thursday","Friday","Saturday"],md=e=>{let{viewDate:n,selectDate:r,onChangeSelectDate:a}=e;const i="YYYY-MM-DD",l=o().tz(),s=o()(n.format(i)),c=(0,t.useMemo)((()=>{const e=new Array(42).fill(null),t=s.startOf("month"),n=s.endOf("month").diff(t,"day")+1,r=new Array(n).fill(t).map(((e,t)=>e.add(t,"day"))),o=t.day();return e.splice(o,n,...r),e}),[s]),u=e=>()=>{e&&a(e)};return mt("div",{className:"vm-calendar-body",children:[fd.map((e=>mt(jr,{title:e,children:mt("div",{className:"vm-calendar-body-cell vm-calendar-body-cell_weekday",children:e[0]})},e))),c.map(((e,t)=>mt("div",{className:Kn()({"vm-calendar-body-cell":!0,"vm-calendar-body-cell_day":!0,"vm-calendar-body-cell_day_empty":!e,"vm-calendar-body-cell_day_active":(e&&e.format(i))===r.format(i),"vm-calendar-body-cell_day_today":(e&&e.format(i))===l.format(i)}),onClick:u(e),children:e&&e.format("D")},e?e.format(i):t)))]})},_d=e=>{let{viewDate:n,onChangeViewDate:r}=e;const a=o()().format("YYYY"),i=(0,t.useMemo)((()=>n.format("YYYY")),[n]),l=(0,t.useMemo)((()=>{const e=o()().subtract(9,"year");return new Array(18).fill(e).map(((e,t)=>e.add(t,"year")))}),[n]);(0,t.useEffect)((()=>{const e=document.getElementById("vm-calendar-year-".concat(i));e&&e.scrollIntoView({block:"center"})}),[]);return mt("div",{className:"vm-calendar-years",children:l.map((e=>{return mt("div",{className:Kn()({"vm-calendar-years__year":!0,"vm-calendar-years__year_selected":e.format("YYYY")===i,"vm-calendar-years__year_today":e.format("YYYY")===a}),id:"vm-calendar-year-".concat(e.format("YYYY")),onClick:(t=e,()=>{r(t)}),children:e.format("YYYY")},e.format("YYYY"));var t}))})},gd=e=>{let{viewDate:n,selectDate:r,onChangeViewDate:a}=e;const i=o()().format("MM"),l=(0,t.useMemo)((()=>r.format("MM")),[r]),s=(0,t.useMemo)((()=>new Array(12).fill("").map(((e,t)=>o()(n).month(t)))),[n]);(0,t.useEffect)((()=>{const e=document.getElementById("vm-calendar-year-".concat(l));e&&e.scrollIntoView({block:"center"})}),[]);return mt("div",{className:"vm-calendar-years",children:s.map((e=>{return mt("div",{className:Kn()({"vm-calendar-years__year":!0,"vm-calendar-years__year_selected":e.format("MM")===l,"vm-calendar-years__year_today":e.format("MM")===i}),id:"vm-calendar-year-".concat(e.format("MM")),onClick:(t=e,()=>{a(t)}),children:e.format("MMMM")},e.format("MM"));var t}))})};var vd=function(e){return e[e.days=0]="days",e[e.months=1]="months",e[e.years=2]="years",e}(vd||{});const yd=e=>{let{date:n,format:r=wt,onChange:a}=e;const[i,l]=(0,t.useState)(vd.days),[s,c]=(0,t.useState)(o().tz(n)),[u,d]=(0,t.useState)(o().tz(n)),h=o().tz(),p=h.format(bt)===s.format(bt),{isMobile:f}=vr(),m=e=>{c(e),l((e=>e===vd.years?vd.months:vd.days))};return(0,t.useEffect)((()=>{u.format()!==o().tz(n).format()&&a(u.format(r))}),[u]),(0,t.useEffect)((()=>{const e=o().tz(n);c(e),d(e)}),[n]),mt("div",{className:Kn()({"vm-calendar":!0,"vm-calendar_mobile":f}),children:[mt(pd,{viewDate:s,onChangeViewDate:m,toggleDisplayYears:()=>{l((e=>e===vd.years?vd.days:vd.years))},showArrowNav:i===vd.days}),i===vd.days&&mt(md,{viewDate:s,selectDate:u,onChangeSelectDate:e=>{d(e)}}),i===vd.years&&mt(_d,{viewDate:s,onChangeViewDate:m}),i===vd.months&&mt(gd,{selectDate:u,viewDate:s,onChangeViewDate:m}),!p&&i===vd.days&&mt("div",{className:"vm-calendar-footer",children:mt(Pr,{variant:"text",size:"small",onClick:()=>{c(h)},children:"show today"})})]})},bd=(0,t.forwardRef)(((e,n)=>{let{date:r,targetRef:a,format:i=wt,onChange:l,label:s}=e;const c=(0,t.useMemo)((()=>o()(r).isValid()?o().tz(r):o()().tz()),[r]),{isMobile:u}=vr(),{value:d,toggle:h,setFalse:p}=Fr(!1);return Jn("click",h,a),Jn("keyup",(e=>{"Escape"!==e.key&&"Enter"!==e.key||p()})),mt(pt.FK,{children:mt(Ir,{open:d,buttonRef:a,placement:"bottom-right",onClose:p,title:u?s:void 0,children:mt("div",{ref:n,children:mt(yd,{date:c,format:i,onChange:e=>{l(e),p()}})})})})}));var wd=n(494),kd=n.n(wd);const xd=e=>o()(e).isValid()?o().tz(e).format(wt):e,Sd=e=>{let{value:n="",label:r,pickerLabel:a,pickerRef:i,onChange:l,onEnter:s}=e;const c=(0,t.useRef)(null),[u,d]=(0,t.useState)(null),[h,p]=(0,t.useState)(xd(n)),[f,m]=(0,t.useState)(!1),[_,g]=(0,t.useState)(!1),v=o()(h).isValid()?"":"Invalid date format";return(0,t.useEffect)((()=>{const e=xd(n);e!==h&&p(e),_&&(s(),g(!1))}),[n]),(0,t.useEffect)((()=>{f&&u&&(u.focus(),u.setSelectionRange(11,11),m(!1))}),[f]),mt("div",{className:Kn()({"vm-date-time-input":!0,"vm-date-time-input_error":v}),children:[mt("label",{children:r}),mt(kd(),{tabIndex:1,inputRef:d,mask:"9999-99-99 99:99:99",placeholder:"YYYY-MM-DD HH:mm:ss",value:h,autoCapitalize:"none",inputMode:"numeric",maskChar:null,onChange:e=>{p(e.currentTarget.value)},onBlur:()=>{l(h)},onKeyUp:e=>{"Enter"===e.key&&(l(h),g(!0))}}),v&&mt("span",{className:"vm-date-time-input__error-text",children:v}),mt("div",{className:"vm-date-time-input__icon",ref:c,children:mt(Pr,{variant:"text",color:"gray",size:"small",startIcon:mt(Sn,{}),ariaLabel:"calendar"})}),mt(bd,{label:a,ref:i,date:h,onChange:e=>{p(e),m(!0)},targetRef:c})]})};const Ad=function(e){const n=(0,t.useRef)();return(0,t.useEffect)((()=>{n.current=e}),[e]),n.current},Ed=()=>{const{isMobile:e}=vr(),{isDarkTheme:n}=gt(),r=(0,t.useRef)(null),a=Xn(),i=(0,t.useMemo)((()=>a.width>1120),[a]),[l,s]=(0,t.useState)(),[c,u]=(0,t.useState)(),{period:{end:d,start:h},relativeTime:p,timezone:f,duration:m}=Gt(),_=Qt(),g=He(),v=Ad(f),{value:y,toggle:b,setFalse:w}=Fr(!1),k=(0,t.useMemo)((()=>({region:f,utc:Vt(f)})),[f]);(0,t.useEffect)((()=>{s(It(jt(d)))}),[f,d]),(0,t.useEffect)((()=>{u(It(jt(h)))}),[f,h]);const x=e=>{let{duration:t,until:n,id:r}=e;_({type:"SET_RELATIVE_TIME",payload:{duration:t,until:n,id:r}}),w()},S=(0,t.useMemo)((()=>({start:o().tz(jt(h)).format(wt),end:o().tz(jt(d)).format(wt)})),[h,d,f]),A=(0,t.useMemo)((()=>p&&"none"!==p?p.replace(/_/g," "):"".concat(S.start," - ").concat(S.end)),[p,S]),E=(0,t.useRef)(null),C=(0,t.useRef)(null),M=(0,t.useRef)(null),N=()=>{c&&l&&_({type:"SET_PERIOD",payload:{from:o().tz(c).toDate(),to:o().tz(l).toDate()}}),w()};return(0,t.useEffect)((()=>{const e=Ht({relativeTimeId:p,defaultDuration:m,defaultEndInput:jt(d)});v&&f!==v&&x({id:e.relativeTimeId,duration:e.duration,until:e.endInput})}),[f,v]),Lr(r,(t=>{var n,r;if(e)return;const o=t.target,a=(null===E||void 0===E?void 0:E.current)&&(null===E||void 0===E||null===(n=E.current)||void 0===n?void 0:n.contains(o)),i=(null===C||void 0===C?void 0:C.current)&&(null===C||void 0===C||null===(r=C.current)||void 0===r?void 0:r.contains(o));a||i||w()})),mt(pt.FK,{children:[mt("div",{ref:M,children:e?mt("div",{className:"vm-mobile-option",onClick:b,children:[mt("span",{className:"vm-mobile-option__icon",children:mt(xn,{})}),mt("div",{className:"vm-mobile-option-text",children:[mt("span",{className:"vm-mobile-option-text__label",children:"Time range"}),mt("span",{className:"vm-mobile-option-text__value",children:A})]}),mt("span",{className:"vm-mobile-option__arrow",children:mt(wn,{})})]}):mt(jr,{title:i?"Time range controls":A,children:mt(Pr,{className:g?"":"vm-header-button",variant:"contained",color:"primary",startIcon:mt(xn,{}),onClick:b,ariaLabel:"time range controls",children:i&&mt("span",{children:A})})})}),mt(Ir,{open:y,buttonRef:M,placement:"bottom-right",onClose:w,clickOutside:!1,title:e?"Time range controls":"",children:mt("div",{className:Kn()({"vm-time-selector":!0,"vm-time-selector_mobile":e}),ref:r,children:[mt("div",{className:"vm-time-selector-left",children:[mt("div",{className:Kn()({"vm-time-selector-left-inputs":!0,"vm-time-selector-left-inputs_dark":n}),children:[mt(Sd,{value:c,label:"From:",pickerLabel:"Date From",pickerRef:E,onChange:u,onEnter:N}),mt(Sd,{value:l,label:"To:",pickerLabel:"Date To",pickerRef:C,onChange:s,onEnter:N})]}),mt("div",{className:"vm-time-selector-left-timezone",children:[mt("div",{className:"vm-time-selector-left-timezone__title",children:k.region}),mt("div",{className:"vm-time-selector-left-timezone__utc",children:k.utc})]}),mt(Pr,{variant:"text",startIcon:mt(An,{}),onClick:()=>_({type:"RUN_QUERY_TO_NOW"}),children:"switch to now"}),mt("div",{className:"vm-time-selector-left__controls",children:[mt(Pr,{color:"error",variant:"outlined",onClick:()=>{s(It(jt(d))),u(It(jt(h))),w()},children:"Cancel"}),mt(Pr,{color:"primary",onClick:N,children:"Apply"})]})]}),mt(hd,{relativeTime:p||"",setDuration:x})]})})]})},Cd=()=>{const e=He(),{isMobile:n}=vr(),r=Qt(),[o,a]=$e(),[i,l]=Or("0","accountID"),[s,c]=Or("0","projectID"),u="".concat(i,":").concat(s),d=(0,t.useRef)(null),{value:h,toggle:p,setFalse:f}=Fr(!1);return(0,t.useEffect)((()=>{h||(l(o.get("accountID")||"0"),c(o.get("projectID")||"0"))}),[h]),mt("div",{className:"vm-tenant-input",children:[mt(jr,{title:"Define Tenant ID if you need request to another storage",children:mt("div",{ref:d,children:n?mt("div",{className:"vm-mobile-option",onClick:p,children:[mt("span",{className:"vm-mobile-option__icon",children:mt(zn,{})}),mt("div",{className:"vm-mobile-option-text",children:[mt("span",{className:"vm-mobile-option-text__label",children:"Tenant ID"}),mt("span",{className:"vm-mobile-option-text__value",children:u})]}),mt("span",{className:"vm-mobile-option__arrow",children:mt(wn,{})})]}):mt(Pr,{className:e?"":"vm-header-button",variant:"contained",color:"primary",fullWidth:!0,startIcon:mt(zn,{}),endIcon:mt("div",{className:Kn()({"vm-execution-controls-buttons__arrow":!0,"vm-execution-controls-buttons__arrow_open":h}),children:mt(wn,{})}),onClick:p,children:u})})}),mt(Ir,{open:h,placement:"bottom-right",onClose:f,buttonRef:d,title:n?"Define Tenant ID":void 0,children:mt("div",{className:Kn()({"vm-list vm-tenant-input-list":!0,"vm-list vm-tenant-input-list_mobile":n,"vm-tenant-input-list_inline":!0}),children:[mt(Vr,{autofocus:!0,label:"accountID",value:i,onChange:l,type:"number"}),mt(Vr,{autofocus:!0,label:"projectID",value:s,onChange:c,type:"number"}),mt("div",{className:"vm-tenant-input-list__buttons",children:[mt(jr,{title:"Multitenancy in VictoriaLogs documentation",children:mt("a",{href:"https://docs.victoriametrics.com/victorialogs/#multitenancy",target:"_blank",rel:"help noreferrer",children:mt(Pr,{variant:"text",color:"gray",startIcon:mt(In,{})})})}),mt(Pr,{variant:"contained",color:"primary",onClick:()=>{o.set("accountID",i),o.set("projectID",s),a(o),f(),r({type:"RUN_QUERY"})},children:"Apply"})]})]})})]})},Md=[{seconds:0,title:"Off"},{seconds:1,title:"1s"},{seconds:2,title:"2s"},{seconds:5,title:"5s"},{seconds:10,title:"10s"},{seconds:30,title:"30s"},{seconds:60,title:"1m"},{seconds:300,title:"5m"},{seconds:900,title:"15m"},{seconds:1800,title:"30m"},{seconds:3600,title:"1h"},{seconds:7200,title:"2h"}],Nd=()=>{const{isMobile:e}=vr(),n=Qt(),r=He(),[o,a]=(0,t.useState)(!1),[i,l]=(0,t.useState)(Md[0]),{value:s,toggle:c,setFalse:u}=Fr(!1),d=(0,t.useRef)(null);(0,t.useEffect)((()=>{const e=i.seconds;let t;return o?t=setInterval((()=>{n({type:"RUN_QUERY"})}),1e3*e):l(Md[0]),()=>{t&&clearInterval(t)}}),[i,o]);const h=e=>()=>{(e=>{(o&&!e.seconds||!o&&e.seconds)&&a((e=>!e)),l(e),u()})(e)};return mt(pt.FK,{children:[mt("div",{className:"vm-execution-controls",children:mt("div",{className:Kn()({"vm-execution-controls-buttons":!0,"vm-execution-controls-buttons_mobile":e,"vm-header-button":!r}),children:[!e&&mt(jr,{title:"Refresh dashboard",children:mt(Pr,{variant:"contained",color:"primary",onClick:()=>{n({type:"RUN_QUERY"})},startIcon:mt(bn,{}),ariaLabel:"refresh dashboard"})}),e?mt("div",{className:"vm-mobile-option",onClick:c,children:[mt("span",{className:"vm-mobile-option__icon",children:mt(mn,{})}),mt("div",{className:"vm-mobile-option-text",children:[mt("span",{className:"vm-mobile-option-text__label",children:"Auto-refresh"}),mt("span",{className:"vm-mobile-option-text__value",children:i.title})]}),mt("span",{className:"vm-mobile-option__arrow",children:mt(wn,{})})]}):mt(jr,{title:"Auto-refresh control",children:mt("div",{ref:d,children:mt(Pr,{variant:"contained",color:"primary",fullWidth:!0,endIcon:mt("div",{className:Kn()({"vm-execution-controls-buttons__arrow":!0,"vm-execution-controls-buttons__arrow_open":s}),children:mt(wn,{})}),onClick:c,children:i.title})})})]})}),mt(Ir,{open:s,placement:"bottom-right",onClose:u,buttonRef:d,title:e?"Auto-refresh duration":void 0,children:mt("div",{className:Kn()({"vm-execution-controls-list":!0,"vm-execution-controls-list_mobile":e}),children:Md.map((t=>mt("div",{className:Kn()({"vm-list-item":!0,"vm-list-item_mobile":e,"vm-list-item_active":t.seconds===i.seconds}),onClick:h(t),children:t.title},t.seconds)))})})]})},Td=e=>{let{isMobile:t}=e;return mt("div",{className:Kn()({"vm-header-controls":!0,"vm-header-controls_mobile":t}),children:[mt(Cd,{}),mt(Ed,{}),mt(Nd,{}),mt(dd,{})]})},Pd=(Boolean(We("DISABLED_DEFAULT_TIMEZONE")),()=>{const{serverUrl:e}=gt(),[n,r]=(Qt(),(0,t.useState)(!1)),[o,a]=(0,t.useState)(""),i=async()=>{};return(0,t.useEffect)((()=>{i()}),[e]),{isLoading:n,error:o}}),Dd=()=>{const e=He(),{isMobile:n}=vr(),{pathname:r}=ne();Pd();return(0,t.useEffect)((()=>{var e;const t="vmui for VictoriaLogs",n=null===(e=du[hu.logs])||void 0===e?void 0:e.title;document.title=n?"".concat(n," - ").concat(t):t}),[r]),mt("section",{className:"vm-container",children:[mt(Vu,{controlsComponent:Td}),mt("div",{className:Kn()({"vm-container-body":!0,"vm-container-body_mobile":n,"vm-container-body_app":e}),children:mt(ye,{})}),!e&&mt(qu,{links:Yu})]})},Od={unicode:!1,renderer:void 0};ca.use(function(e){if(!(e={...Od,...e}).emojis)throw new Error("Must provide emojis to markedEmoji");const t=Object.keys(e.emojis).map((e=>e.replace(/[.*+?^${}()|[\]\\]/g,"\\$&"))).join("|"),n=new RegExp(":(".concat(t,"):")),r=new RegExp("^".concat(n.source));return{extensions:[{name:"emoji",level:"inline",start(e){var t;return null===(t=e.match(n))||void 0===t?void 0:t.index},tokenizer(t,n){const o=r.exec(t);if(!o)return;const a=o[1];let i=e.emojis[a],l=e.renderer?void 0:e.unicode;if("string"!==typeof i&&!e.renderer)if("string"===typeof i.char)i=i.char,l=!0;else{if("string"!==typeof i.url)return;i=i.url,l=!1}return{type:"emoji",raw:o[0],name:a,emoji:i,unicode:l}},renderer:t=>e.renderer?e.renderer(t):t.unicode?t.emoji:''.concat(t.name,'')}]}}({emojis:{100:"\ud83d\udcaf",1234:"\ud83d\udd22",grinning:"\ud83d\ude00",smiley:"\ud83d\ude03",smile:"\ud83d\ude04",grin:"\ud83d\ude01",laughing:"\ud83d\ude06",satisfied:"\ud83d\ude06",sweat_smile:"\ud83d\ude05",rofl:"\ud83e\udd23",joy:"\ud83d\ude02",slightly_smiling_face:"\ud83d\ude42",upside_down_face:"\ud83d\ude43",melting_face:"\ud83e\udee0",wink:"\ud83d\ude09",blush:"\ud83d\ude0a",innocent:"\ud83d\ude07",smiling_face_with_three_hearts:"\ud83e\udd70",heart_eyes:"\ud83d\ude0d",star_struck:"\ud83e\udd29",kissing_heart:"\ud83d\ude18",kissing:"\ud83d\ude17",relaxed:"\u263a\ufe0f",kissing_closed_eyes:"\ud83d\ude1a",kissing_smiling_eyes:"\ud83d\ude19",smiling_face_with_tear:"\ud83e\udd72",yum:"\ud83d\ude0b",stuck_out_tongue:"\ud83d\ude1b",stuck_out_tongue_winking_eye:"\ud83d\ude1c",zany_face:"\ud83e\udd2a",stuck_out_tongue_closed_eyes:"\ud83d\ude1d",money_mouth_face:"\ud83e\udd11",hugs:"\ud83e\udd17",hand_over_mouth:"\ud83e\udd2d",face_with_open_eyes_and_hand_over_mouth:"\ud83e\udee2",face_with_peeking_eye:"\ud83e\udee3",shushing_face:"\ud83e\udd2b",thinking:"\ud83e\udd14",saluting_face:"\ud83e\udee1",zipper_mouth_face:"\ud83e\udd10",raised_eyebrow:"\ud83e\udd28",neutral_face:"\ud83d\ude10",expressionless:"\ud83d\ude11",no_mouth:"\ud83d\ude36",dotted_line_face:"\ud83e\udee5",face_in_clouds:"\ud83d\ude36\u200d\ud83c\udf2b\ufe0f",smirk:"\ud83d\ude0f",unamused:"\ud83d\ude12",roll_eyes:"\ud83d\ude44",grimacing:"\ud83d\ude2c",face_exhaling:"\ud83d\ude2e\u200d\ud83d\udca8",lying_face:"\ud83e\udd25",shaking_face:"\ud83e\udee8",relieved:"\ud83d\ude0c",pensive:"\ud83d\ude14",sleepy:"\ud83d\ude2a",drooling_face:"\ud83e\udd24",sleeping:"\ud83d\ude34",mask:"\ud83d\ude37",face_with_thermometer:"\ud83e\udd12",face_with_head_bandage:"\ud83e\udd15",nauseated_face:"\ud83e\udd22",vomiting_face:"\ud83e\udd2e",sneezing_face:"\ud83e\udd27",hot_face:"\ud83e\udd75",cold_face:"\ud83e\udd76",woozy_face:"\ud83e\udd74",dizzy_face:"\ud83d\ude35",face_with_spiral_eyes:"\ud83d\ude35\u200d\ud83d\udcab",exploding_head:"\ud83e\udd2f",cowboy_hat_face:"\ud83e\udd20",partying_face:"\ud83e\udd73",disguised_face:"\ud83e\udd78",sunglasses:"\ud83d\ude0e",nerd_face:"\ud83e\udd13",monocle_face:"\ud83e\uddd0",confused:"\ud83d\ude15",face_with_diagonal_mouth:"\ud83e\udee4",worried:"\ud83d\ude1f",slightly_frowning_face:"\ud83d\ude41",frowning_face:"\u2639\ufe0f",open_mouth:"\ud83d\ude2e",hushed:"\ud83d\ude2f",astonished:"\ud83d\ude32",flushed:"\ud83d\ude33",pleading_face:"\ud83e\udd7a",face_holding_back_tears:"\ud83e\udd79",frowning:"\ud83d\ude26",anguished:"\ud83d\ude27",fearful:"\ud83d\ude28",cold_sweat:"\ud83d\ude30",disappointed_relieved:"\ud83d\ude25",cry:"\ud83d\ude22",sob:"\ud83d\ude2d",scream:"\ud83d\ude31",confounded:"\ud83d\ude16",persevere:"\ud83d\ude23",disappointed:"\ud83d\ude1e",sweat:"\ud83d\ude13",weary:"\ud83d\ude29",tired_face:"\ud83d\ude2b",yawning_face:"\ud83e\udd71",triumph:"\ud83d\ude24",rage:"\ud83d\ude21",pout:"\ud83d\ude21",angry:"\ud83d\ude20",cursing_face:"\ud83e\udd2c",smiling_imp:"\ud83d\ude08",imp:"\ud83d\udc7f",skull:"\ud83d\udc80",skull_and_crossbones:"\u2620\ufe0f",hankey:"\ud83d\udca9",poop:"\ud83d\udca9",shit:"\ud83d\udca9",clown_face:"\ud83e\udd21",japanese_ogre:"\ud83d\udc79",japanese_goblin:"\ud83d\udc7a",ghost:"\ud83d\udc7b",alien:"\ud83d\udc7d",space_invader:"\ud83d\udc7e",robot:"\ud83e\udd16",smiley_cat:"\ud83d\ude3a",smile_cat:"\ud83d\ude38",joy_cat:"\ud83d\ude39",heart_eyes_cat:"\ud83d\ude3b",smirk_cat:"\ud83d\ude3c",kissing_cat:"\ud83d\ude3d",scream_cat:"\ud83d\ude40",crying_cat_face:"\ud83d\ude3f",pouting_cat:"\ud83d\ude3e",see_no_evil:"\ud83d\ude48",hear_no_evil:"\ud83d\ude49",speak_no_evil:"\ud83d\ude4a",love_letter:"\ud83d\udc8c",cupid:"\ud83d\udc98",gift_heart:"\ud83d\udc9d",sparkling_heart:"\ud83d\udc96",heartpulse:"\ud83d\udc97",heartbeat:"\ud83d\udc93",revolving_hearts:"\ud83d\udc9e",two_hearts:"\ud83d\udc95",heart_decoration:"\ud83d\udc9f",heavy_heart_exclamation:"\u2763\ufe0f",broken_heart:"\ud83d\udc94",heart_on_fire:"\u2764\ufe0f\u200d\ud83d\udd25",mending_heart:"\u2764\ufe0f\u200d\ud83e\ude79",heart:"\u2764\ufe0f",pink_heart:"\ud83e\ude77",orange_heart:"\ud83e\udde1",yellow_heart:"\ud83d\udc9b",green_heart:"\ud83d\udc9a",blue_heart:"\ud83d\udc99",light_blue_heart:"\ud83e\ude75",purple_heart:"\ud83d\udc9c",brown_heart:"\ud83e\udd0e",black_heart:"\ud83d\udda4",grey_heart:"\ud83e\ude76",white_heart:"\ud83e\udd0d",kiss:"\ud83d\udc8b",anger:"\ud83d\udca2",boom:"\ud83d\udca5",collision:"\ud83d\udca5",dizzy:"\ud83d\udcab",sweat_drops:"\ud83d\udca6",dash:"\ud83d\udca8",hole:"\ud83d\udd73\ufe0f",speech_balloon:"\ud83d\udcac",eye_speech_bubble:"\ud83d\udc41\ufe0f\u200d\ud83d\udde8\ufe0f",left_speech_bubble:"\ud83d\udde8\ufe0f",right_anger_bubble:"\ud83d\uddef\ufe0f",thought_balloon:"\ud83d\udcad",zzz:"\ud83d\udca4",wave:"\ud83d\udc4b",raised_back_of_hand:"\ud83e\udd1a",raised_hand_with_fingers_splayed:"\ud83d\udd90\ufe0f",hand:"\u270b",raised_hand:"\u270b",vulcan_salute:"\ud83d\udd96",rightwards_hand:"\ud83e\udef1",leftwards_hand:"\ud83e\udef2",palm_down_hand:"\ud83e\udef3",palm_up_hand:"\ud83e\udef4",leftwards_pushing_hand:"\ud83e\udef7",rightwards_pushing_hand:"\ud83e\udef8",ok_hand:"\ud83d\udc4c",pinched_fingers:"\ud83e\udd0c",pinching_hand:"\ud83e\udd0f",v:"\u270c\ufe0f",crossed_fingers:"\ud83e\udd1e",hand_with_index_finger_and_thumb_crossed:"\ud83e\udef0",love_you_gesture:"\ud83e\udd1f",metal:"\ud83e\udd18",call_me_hand:"\ud83e\udd19",point_left:"\ud83d\udc48",point_right:"\ud83d\udc49",point_up_2:"\ud83d\udc46",middle_finger:"\ud83d\udd95",fu:"\ud83d\udd95",point_down:"\ud83d\udc47",point_up:"\u261d\ufe0f",index_pointing_at_the_viewer:"\ud83e\udef5","+1":"\ud83d\udc4d",thumbsup:"\ud83d\udc4d","-1":"\ud83d\udc4e",thumbsdown:"\ud83d\udc4e",fist_raised:"\u270a",fist:"\u270a",fist_oncoming:"\ud83d\udc4a",facepunch:"\ud83d\udc4a",punch:"\ud83d\udc4a",fist_left:"\ud83e\udd1b",fist_right:"\ud83e\udd1c",clap:"\ud83d\udc4f",raised_hands:"\ud83d\ude4c",heart_hands:"\ud83e\udef6",open_hands:"\ud83d\udc50",palms_up_together:"\ud83e\udd32",handshake:"\ud83e\udd1d",pray:"\ud83d\ude4f",writing_hand:"\u270d\ufe0f",nail_care:"\ud83d\udc85",selfie:"\ud83e\udd33",muscle:"\ud83d\udcaa",mechanical_arm:"\ud83e\uddbe",mechanical_leg:"\ud83e\uddbf",leg:"\ud83e\uddb5",foot:"\ud83e\uddb6",ear:"\ud83d\udc42",ear_with_hearing_aid:"\ud83e\uddbb",nose:"\ud83d\udc43",brain:"\ud83e\udde0",anatomical_heart:"\ud83e\udec0",lungs:"\ud83e\udec1",tooth:"\ud83e\uddb7",bone:"\ud83e\uddb4",eyes:"\ud83d\udc40",eye:"\ud83d\udc41\ufe0f",tongue:"\ud83d\udc45",lips:"\ud83d\udc44",biting_lip:"\ud83e\udee6",baby:"\ud83d\udc76",child:"\ud83e\uddd2",boy:"\ud83d\udc66",girl:"\ud83d\udc67",adult:"\ud83e\uddd1",blond_haired_person:"\ud83d\udc71",man:"\ud83d\udc68",bearded_person:"\ud83e\uddd4",man_beard:"\ud83e\uddd4\u200d\u2642\ufe0f",woman_beard:"\ud83e\uddd4\u200d\u2640\ufe0f",red_haired_man:"\ud83d\udc68\u200d\ud83e\uddb0",curly_haired_man:"\ud83d\udc68\u200d\ud83e\uddb1",white_haired_man:"\ud83d\udc68\u200d\ud83e\uddb3",bald_man:"\ud83d\udc68\u200d\ud83e\uddb2",woman:"\ud83d\udc69",red_haired_woman:"\ud83d\udc69\u200d\ud83e\uddb0",person_red_hair:"\ud83e\uddd1\u200d\ud83e\uddb0",curly_haired_woman:"\ud83d\udc69\u200d\ud83e\uddb1",person_curly_hair:"\ud83e\uddd1\u200d\ud83e\uddb1",white_haired_woman:"\ud83d\udc69\u200d\ud83e\uddb3",person_white_hair:"\ud83e\uddd1\u200d\ud83e\uddb3",bald_woman:"\ud83d\udc69\u200d\ud83e\uddb2",person_bald:"\ud83e\uddd1\u200d\ud83e\uddb2",blond_haired_woman:"\ud83d\udc71\u200d\u2640\ufe0f",blonde_woman:"\ud83d\udc71\u200d\u2640\ufe0f",blond_haired_man:"\ud83d\udc71\u200d\u2642\ufe0f",older_adult:"\ud83e\uddd3",older_man:"\ud83d\udc74",older_woman:"\ud83d\udc75",frowning_person:"\ud83d\ude4d",frowning_man:"\ud83d\ude4d\u200d\u2642\ufe0f",frowning_woman:"\ud83d\ude4d\u200d\u2640\ufe0f",pouting_face:"\ud83d\ude4e",pouting_man:"\ud83d\ude4e\u200d\u2642\ufe0f",pouting_woman:"\ud83d\ude4e\u200d\u2640\ufe0f",no_good:"\ud83d\ude45",no_good_man:"\ud83d\ude45\u200d\u2642\ufe0f",ng_man:"\ud83d\ude45\u200d\u2642\ufe0f",no_good_woman:"\ud83d\ude45\u200d\u2640\ufe0f",ng_woman:"\ud83d\ude45\u200d\u2640\ufe0f",ok_person:"\ud83d\ude46",ok_man:"\ud83d\ude46\u200d\u2642\ufe0f",ok_woman:"\ud83d\ude46\u200d\u2640\ufe0f",tipping_hand_person:"\ud83d\udc81",information_desk_person:"\ud83d\udc81",tipping_hand_man:"\ud83d\udc81\u200d\u2642\ufe0f",sassy_man:"\ud83d\udc81\u200d\u2642\ufe0f",tipping_hand_woman:"\ud83d\udc81\u200d\u2640\ufe0f",sassy_woman:"\ud83d\udc81\u200d\u2640\ufe0f",raising_hand:"\ud83d\ude4b",raising_hand_man:"\ud83d\ude4b\u200d\u2642\ufe0f",raising_hand_woman:"\ud83d\ude4b\u200d\u2640\ufe0f",deaf_person:"\ud83e\uddcf",deaf_man:"\ud83e\uddcf\u200d\u2642\ufe0f",deaf_woman:"\ud83e\uddcf\u200d\u2640\ufe0f",bow:"\ud83d\ude47",bowing_man:"\ud83d\ude47\u200d\u2642\ufe0f",bowing_woman:"\ud83d\ude47\u200d\u2640\ufe0f",facepalm:"\ud83e\udd26",man_facepalming:"\ud83e\udd26\u200d\u2642\ufe0f",woman_facepalming:"\ud83e\udd26\u200d\u2640\ufe0f",shrug:"\ud83e\udd37",man_shrugging:"\ud83e\udd37\u200d\u2642\ufe0f",woman_shrugging:"\ud83e\udd37\u200d\u2640\ufe0f",health_worker:"\ud83e\uddd1\u200d\u2695\ufe0f",man_health_worker:"\ud83d\udc68\u200d\u2695\ufe0f",woman_health_worker:"\ud83d\udc69\u200d\u2695\ufe0f",student:"\ud83e\uddd1\u200d\ud83c\udf93",man_student:"\ud83d\udc68\u200d\ud83c\udf93",woman_student:"\ud83d\udc69\u200d\ud83c\udf93",teacher:"\ud83e\uddd1\u200d\ud83c\udfeb",man_teacher:"\ud83d\udc68\u200d\ud83c\udfeb",woman_teacher:"\ud83d\udc69\u200d\ud83c\udfeb",judge:"\ud83e\uddd1\u200d\u2696\ufe0f",man_judge:"\ud83d\udc68\u200d\u2696\ufe0f",woman_judge:"\ud83d\udc69\u200d\u2696\ufe0f",farmer:"\ud83e\uddd1\u200d\ud83c\udf3e",man_farmer:"\ud83d\udc68\u200d\ud83c\udf3e",woman_farmer:"\ud83d\udc69\u200d\ud83c\udf3e",cook:"\ud83e\uddd1\u200d\ud83c\udf73",man_cook:"\ud83d\udc68\u200d\ud83c\udf73",woman_cook:"\ud83d\udc69\u200d\ud83c\udf73",mechanic:"\ud83e\uddd1\u200d\ud83d\udd27",man_mechanic:"\ud83d\udc68\u200d\ud83d\udd27",woman_mechanic:"\ud83d\udc69\u200d\ud83d\udd27",factory_worker:"\ud83e\uddd1\u200d\ud83c\udfed",man_factory_worker:"\ud83d\udc68\u200d\ud83c\udfed",woman_factory_worker:"\ud83d\udc69\u200d\ud83c\udfed",office_worker:"\ud83e\uddd1\u200d\ud83d\udcbc",man_office_worker:"\ud83d\udc68\u200d\ud83d\udcbc",woman_office_worker:"\ud83d\udc69\u200d\ud83d\udcbc",scientist:"\ud83e\uddd1\u200d\ud83d\udd2c",man_scientist:"\ud83d\udc68\u200d\ud83d\udd2c",woman_scientist:"\ud83d\udc69\u200d\ud83d\udd2c",technologist:"\ud83e\uddd1\u200d\ud83d\udcbb",man_technologist:"\ud83d\udc68\u200d\ud83d\udcbb",woman_technologist:"\ud83d\udc69\u200d\ud83d\udcbb",singer:"\ud83e\uddd1\u200d\ud83c\udfa4",man_singer:"\ud83d\udc68\u200d\ud83c\udfa4",woman_singer:"\ud83d\udc69\u200d\ud83c\udfa4",artist:"\ud83e\uddd1\u200d\ud83c\udfa8",man_artist:"\ud83d\udc68\u200d\ud83c\udfa8",woman_artist:"\ud83d\udc69\u200d\ud83c\udfa8",pilot:"\ud83e\uddd1\u200d\u2708\ufe0f",man_pilot:"\ud83d\udc68\u200d\u2708\ufe0f",woman_pilot:"\ud83d\udc69\u200d\u2708\ufe0f",astronaut:"\ud83e\uddd1\u200d\ud83d\ude80",man_astronaut:"\ud83d\udc68\u200d\ud83d\ude80",woman_astronaut:"\ud83d\udc69\u200d\ud83d\ude80",firefighter:"\ud83e\uddd1\u200d\ud83d\ude92",man_firefighter:"\ud83d\udc68\u200d\ud83d\ude92",woman_firefighter:"\ud83d\udc69\u200d\ud83d\ude92",police_officer:"\ud83d\udc6e",cop:"\ud83d\udc6e",policeman:"\ud83d\udc6e\u200d\u2642\ufe0f",policewoman:"\ud83d\udc6e\u200d\u2640\ufe0f",detective:"\ud83d\udd75\ufe0f",male_detective:"\ud83d\udd75\ufe0f\u200d\u2642\ufe0f",female_detective:"\ud83d\udd75\ufe0f\u200d\u2640\ufe0f",guard:"\ud83d\udc82",guardsman:"\ud83d\udc82\u200d\u2642\ufe0f",guardswoman:"\ud83d\udc82\u200d\u2640\ufe0f",ninja:"\ud83e\udd77",construction_worker:"\ud83d\udc77",construction_worker_man:"\ud83d\udc77\u200d\u2642\ufe0f",construction_worker_woman:"\ud83d\udc77\u200d\u2640\ufe0f",person_with_crown:"\ud83e\udec5",prince:"\ud83e\udd34",princess:"\ud83d\udc78",person_with_turban:"\ud83d\udc73",man_with_turban:"\ud83d\udc73\u200d\u2642\ufe0f",woman_with_turban:"\ud83d\udc73\u200d\u2640\ufe0f",man_with_gua_pi_mao:"\ud83d\udc72",woman_with_headscarf:"\ud83e\uddd5",person_in_tuxedo:"\ud83e\udd35",man_in_tuxedo:"\ud83e\udd35\u200d\u2642\ufe0f",woman_in_tuxedo:"\ud83e\udd35\u200d\u2640\ufe0f",person_with_veil:"\ud83d\udc70",man_with_veil:"\ud83d\udc70\u200d\u2642\ufe0f",woman_with_veil:"\ud83d\udc70\u200d\u2640\ufe0f",bride_with_veil:"\ud83d\udc70\u200d\u2640\ufe0f",pregnant_woman:"\ud83e\udd30",pregnant_man:"\ud83e\udec3",pregnant_person:"\ud83e\udec4",breast_feeding:"\ud83e\udd31",woman_feeding_baby:"\ud83d\udc69\u200d\ud83c\udf7c",man_feeding_baby:"\ud83d\udc68\u200d\ud83c\udf7c",person_feeding_baby:"\ud83e\uddd1\u200d\ud83c\udf7c",angel:"\ud83d\udc7c",santa:"\ud83c\udf85",mrs_claus:"\ud83e\udd36",mx_claus:"\ud83e\uddd1\u200d\ud83c\udf84",superhero:"\ud83e\uddb8",superhero_man:"\ud83e\uddb8\u200d\u2642\ufe0f",superhero_woman:"\ud83e\uddb8\u200d\u2640\ufe0f",supervillain:"\ud83e\uddb9",supervillain_man:"\ud83e\uddb9\u200d\u2642\ufe0f",supervillain_woman:"\ud83e\uddb9\u200d\u2640\ufe0f",mage:"\ud83e\uddd9",mage_man:"\ud83e\uddd9\u200d\u2642\ufe0f",mage_woman:"\ud83e\uddd9\u200d\u2640\ufe0f",fairy:"\ud83e\uddda",fairy_man:"\ud83e\uddda\u200d\u2642\ufe0f",fairy_woman:"\ud83e\uddda\u200d\u2640\ufe0f",vampire:"\ud83e\udddb",vampire_man:"\ud83e\udddb\u200d\u2642\ufe0f",vampire_woman:"\ud83e\udddb\u200d\u2640\ufe0f",merperson:"\ud83e\udddc",merman:"\ud83e\udddc\u200d\u2642\ufe0f",mermaid:"\ud83e\udddc\u200d\u2640\ufe0f",elf:"\ud83e\udddd",elf_man:"\ud83e\udddd\u200d\u2642\ufe0f",elf_woman:"\ud83e\udddd\u200d\u2640\ufe0f",genie:"\ud83e\uddde",genie_man:"\ud83e\uddde\u200d\u2642\ufe0f",genie_woman:"\ud83e\uddde\u200d\u2640\ufe0f",zombie:"\ud83e\udddf",zombie_man:"\ud83e\udddf\u200d\u2642\ufe0f",zombie_woman:"\ud83e\udddf\u200d\u2640\ufe0f",troll:"\ud83e\uddcc",massage:"\ud83d\udc86",massage_man:"\ud83d\udc86\u200d\u2642\ufe0f",massage_woman:"\ud83d\udc86\u200d\u2640\ufe0f",haircut:"\ud83d\udc87",haircut_man:"\ud83d\udc87\u200d\u2642\ufe0f",haircut_woman:"\ud83d\udc87\u200d\u2640\ufe0f",walking:"\ud83d\udeb6",walking_man:"\ud83d\udeb6\u200d\u2642\ufe0f",walking_woman:"\ud83d\udeb6\u200d\u2640\ufe0f",standing_person:"\ud83e\uddcd",standing_man:"\ud83e\uddcd\u200d\u2642\ufe0f",standing_woman:"\ud83e\uddcd\u200d\u2640\ufe0f",kneeling_person:"\ud83e\uddce",kneeling_man:"\ud83e\uddce\u200d\u2642\ufe0f",kneeling_woman:"\ud83e\uddce\u200d\u2640\ufe0f",person_with_probing_cane:"\ud83e\uddd1\u200d\ud83e\uddaf",man_with_probing_cane:"\ud83d\udc68\u200d\ud83e\uddaf",woman_with_probing_cane:"\ud83d\udc69\u200d\ud83e\uddaf",person_in_motorized_wheelchair:"\ud83e\uddd1\u200d\ud83e\uddbc",man_in_motorized_wheelchair:"\ud83d\udc68\u200d\ud83e\uddbc",woman_in_motorized_wheelchair:"\ud83d\udc69\u200d\ud83e\uddbc",person_in_manual_wheelchair:"\ud83e\uddd1\u200d\ud83e\uddbd",man_in_manual_wheelchair:"\ud83d\udc68\u200d\ud83e\uddbd",woman_in_manual_wheelchair:"\ud83d\udc69\u200d\ud83e\uddbd",runner:"\ud83c\udfc3",running:"\ud83c\udfc3",running_man:"\ud83c\udfc3\u200d\u2642\ufe0f",running_woman:"\ud83c\udfc3\u200d\u2640\ufe0f",woman_dancing:"\ud83d\udc83",dancer:"\ud83d\udc83",man_dancing:"\ud83d\udd7a",business_suit_levitating:"\ud83d\udd74\ufe0f",dancers:"\ud83d\udc6f",dancing_men:"\ud83d\udc6f\u200d\u2642\ufe0f",dancing_women:"\ud83d\udc6f\u200d\u2640\ufe0f",sauna_person:"\ud83e\uddd6",sauna_man:"\ud83e\uddd6\u200d\u2642\ufe0f",sauna_woman:"\ud83e\uddd6\u200d\u2640\ufe0f",climbing:"\ud83e\uddd7",climbing_man:"\ud83e\uddd7\u200d\u2642\ufe0f",climbing_woman:"\ud83e\uddd7\u200d\u2640\ufe0f",person_fencing:"\ud83e\udd3a",horse_racing:"\ud83c\udfc7",skier:"\u26f7\ufe0f",snowboarder:"\ud83c\udfc2",golfing:"\ud83c\udfcc\ufe0f",golfing_man:"\ud83c\udfcc\ufe0f\u200d\u2642\ufe0f",golfing_woman:"\ud83c\udfcc\ufe0f\u200d\u2640\ufe0f",surfer:"\ud83c\udfc4",surfing_man:"\ud83c\udfc4\u200d\u2642\ufe0f",surfing_woman:"\ud83c\udfc4\u200d\u2640\ufe0f",rowboat:"\ud83d\udea3",rowing_man:"\ud83d\udea3\u200d\u2642\ufe0f",rowing_woman:"\ud83d\udea3\u200d\u2640\ufe0f",swimmer:"\ud83c\udfca",swimming_man:"\ud83c\udfca\u200d\u2642\ufe0f",swimming_woman:"\ud83c\udfca\u200d\u2640\ufe0f",bouncing_ball_person:"\u26f9\ufe0f",bouncing_ball_man:"\u26f9\ufe0f\u200d\u2642\ufe0f",basketball_man:"\u26f9\ufe0f\u200d\u2642\ufe0f",bouncing_ball_woman:"\u26f9\ufe0f\u200d\u2640\ufe0f",basketball_woman:"\u26f9\ufe0f\u200d\u2640\ufe0f",weight_lifting:"\ud83c\udfcb\ufe0f",weight_lifting_man:"\ud83c\udfcb\ufe0f\u200d\u2642\ufe0f",weight_lifting_woman:"\ud83c\udfcb\ufe0f\u200d\u2640\ufe0f",bicyclist:"\ud83d\udeb4",biking_man:"\ud83d\udeb4\u200d\u2642\ufe0f",biking_woman:"\ud83d\udeb4\u200d\u2640\ufe0f",mountain_bicyclist:"\ud83d\udeb5",mountain_biking_man:"\ud83d\udeb5\u200d\u2642\ufe0f",mountain_biking_woman:"\ud83d\udeb5\u200d\u2640\ufe0f",cartwheeling:"\ud83e\udd38",man_cartwheeling:"\ud83e\udd38\u200d\u2642\ufe0f",woman_cartwheeling:"\ud83e\udd38\u200d\u2640\ufe0f",wrestling:"\ud83e\udd3c",men_wrestling:"\ud83e\udd3c\u200d\u2642\ufe0f",women_wrestling:"\ud83e\udd3c\u200d\u2640\ufe0f",water_polo:"\ud83e\udd3d",man_playing_water_polo:"\ud83e\udd3d\u200d\u2642\ufe0f",woman_playing_water_polo:"\ud83e\udd3d\u200d\u2640\ufe0f",handball_person:"\ud83e\udd3e",man_playing_handball:"\ud83e\udd3e\u200d\u2642\ufe0f",woman_playing_handball:"\ud83e\udd3e\u200d\u2640\ufe0f",juggling_person:"\ud83e\udd39",man_juggling:"\ud83e\udd39\u200d\u2642\ufe0f",woman_juggling:"\ud83e\udd39\u200d\u2640\ufe0f",lotus_position:"\ud83e\uddd8",lotus_position_man:"\ud83e\uddd8\u200d\u2642\ufe0f",lotus_position_woman:"\ud83e\uddd8\u200d\u2640\ufe0f",bath:"\ud83d\udec0",sleeping_bed:"\ud83d\udecc",people_holding_hands:"\ud83e\uddd1\u200d\ud83e\udd1d\u200d\ud83e\uddd1",two_women_holding_hands:"\ud83d\udc6d",couple:"\ud83d\udc6b",two_men_holding_hands:"\ud83d\udc6c",couplekiss:"\ud83d\udc8f",couplekiss_man_woman:"\ud83d\udc69\u200d\u2764\ufe0f\u200d\ud83d\udc8b\u200d\ud83d\udc68",couplekiss_man_man:"\ud83d\udc68\u200d\u2764\ufe0f\u200d\ud83d\udc8b\u200d\ud83d\udc68",couplekiss_woman_woman:"\ud83d\udc69\u200d\u2764\ufe0f\u200d\ud83d\udc8b\u200d\ud83d\udc69",couple_with_heart:"\ud83d\udc91",couple_with_heart_woman_man:"\ud83d\udc69\u200d\u2764\ufe0f\u200d\ud83d\udc68",couple_with_heart_man_man:"\ud83d\udc68\u200d\u2764\ufe0f\u200d\ud83d\udc68",couple_with_heart_woman_woman:"\ud83d\udc69\u200d\u2764\ufe0f\u200d\ud83d\udc69",family:"\ud83d\udc6a",family_man_woman_boy:"\ud83d\udc68\u200d\ud83d\udc69\u200d\ud83d\udc66",family_man_woman_girl:"\ud83d\udc68\u200d\ud83d\udc69\u200d\ud83d\udc67",family_man_woman_girl_boy:"\ud83d\udc68\u200d\ud83d\udc69\u200d\ud83d\udc67\u200d\ud83d\udc66",family_man_woman_boy_boy:"\ud83d\udc68\u200d\ud83d\udc69\u200d\ud83d\udc66\u200d\ud83d\udc66",family_man_woman_girl_girl:"\ud83d\udc68\u200d\ud83d\udc69\u200d\ud83d\udc67\u200d\ud83d\udc67",family_man_man_boy:"\ud83d\udc68\u200d\ud83d\udc68\u200d\ud83d\udc66",family_man_man_girl:"\ud83d\udc68\u200d\ud83d\udc68\u200d\ud83d\udc67",family_man_man_girl_boy:"\ud83d\udc68\u200d\ud83d\udc68\u200d\ud83d\udc67\u200d\ud83d\udc66",family_man_man_boy_boy:"\ud83d\udc68\u200d\ud83d\udc68\u200d\ud83d\udc66\u200d\ud83d\udc66",family_man_man_girl_girl:"\ud83d\udc68\u200d\ud83d\udc68\u200d\ud83d\udc67\u200d\ud83d\udc67",family_woman_woman_boy:"\ud83d\udc69\u200d\ud83d\udc69\u200d\ud83d\udc66",family_woman_woman_girl:"\ud83d\udc69\u200d\ud83d\udc69\u200d\ud83d\udc67",family_woman_woman_girl_boy:"\ud83d\udc69\u200d\ud83d\udc69\u200d\ud83d\udc67\u200d\ud83d\udc66",family_woman_woman_boy_boy:"\ud83d\udc69\u200d\ud83d\udc69\u200d\ud83d\udc66\u200d\ud83d\udc66",family_woman_woman_girl_girl:"\ud83d\udc69\u200d\ud83d\udc69\u200d\ud83d\udc67\u200d\ud83d\udc67",family_man_boy:"\ud83d\udc68\u200d\ud83d\udc66",family_man_boy_boy:"\ud83d\udc68\u200d\ud83d\udc66\u200d\ud83d\udc66",family_man_girl:"\ud83d\udc68\u200d\ud83d\udc67",family_man_girl_boy:"\ud83d\udc68\u200d\ud83d\udc67\u200d\ud83d\udc66",family_man_girl_girl:"\ud83d\udc68\u200d\ud83d\udc67\u200d\ud83d\udc67",family_woman_boy:"\ud83d\udc69\u200d\ud83d\udc66",family_woman_boy_boy:"\ud83d\udc69\u200d\ud83d\udc66\u200d\ud83d\udc66",family_woman_girl:"\ud83d\udc69\u200d\ud83d\udc67",family_woman_girl_boy:"\ud83d\udc69\u200d\ud83d\udc67\u200d\ud83d\udc66",family_woman_girl_girl:"\ud83d\udc69\u200d\ud83d\udc67\u200d\ud83d\udc67",speaking_head:"\ud83d\udde3\ufe0f",bust_in_silhouette:"\ud83d\udc64",busts_in_silhouette:"\ud83d\udc65",people_hugging:"\ud83e\udec2",footprints:"\ud83d\udc63",monkey_face:"\ud83d\udc35",monkey:"\ud83d\udc12",gorilla:"\ud83e\udd8d",orangutan:"\ud83e\udda7",dog:"\ud83d\udc36",dog2:"\ud83d\udc15",guide_dog:"\ud83e\uddae",service_dog:"\ud83d\udc15\u200d\ud83e\uddba",poodle:"\ud83d\udc29",wolf:"\ud83d\udc3a",fox_face:"\ud83e\udd8a",raccoon:"\ud83e\udd9d",cat:"\ud83d\udc31",cat2:"\ud83d\udc08",black_cat:"\ud83d\udc08\u200d\u2b1b",lion:"\ud83e\udd81",tiger:"\ud83d\udc2f",tiger2:"\ud83d\udc05",leopard:"\ud83d\udc06",horse:"\ud83d\udc34",moose:"\ud83e\udece",donkey:"\ud83e\udecf",racehorse:"\ud83d\udc0e",unicorn:"\ud83e\udd84",zebra:"\ud83e\udd93",deer:"\ud83e\udd8c",bison:"\ud83e\uddac",cow:"\ud83d\udc2e",ox:"\ud83d\udc02",water_buffalo:"\ud83d\udc03",cow2:"\ud83d\udc04",pig:"\ud83d\udc37",pig2:"\ud83d\udc16",boar:"\ud83d\udc17",pig_nose:"\ud83d\udc3d",ram:"\ud83d\udc0f",sheep:"\ud83d\udc11",goat:"\ud83d\udc10",dromedary_camel:"\ud83d\udc2a",camel:"\ud83d\udc2b",llama:"\ud83e\udd99",giraffe:"\ud83e\udd92",elephant:"\ud83d\udc18",mammoth:"\ud83e\udda3",rhinoceros:"\ud83e\udd8f",hippopotamus:"\ud83e\udd9b",mouse:"\ud83d\udc2d",mouse2:"\ud83d\udc01",rat:"\ud83d\udc00",hamster:"\ud83d\udc39",rabbit:"\ud83d\udc30",rabbit2:"\ud83d\udc07",chipmunk:"\ud83d\udc3f\ufe0f",beaver:"\ud83e\uddab",hedgehog:"\ud83e\udd94",bat:"\ud83e\udd87",bear:"\ud83d\udc3b",polar_bear:"\ud83d\udc3b\u200d\u2744\ufe0f",koala:"\ud83d\udc28",panda_face:"\ud83d\udc3c",sloth:"\ud83e\udda5",otter:"\ud83e\udda6",skunk:"\ud83e\udda8",kangaroo:"\ud83e\udd98",badger:"\ud83e\udda1",feet:"\ud83d\udc3e",paw_prints:"\ud83d\udc3e",turkey:"\ud83e\udd83",chicken:"\ud83d\udc14",rooster:"\ud83d\udc13",hatching_chick:"\ud83d\udc23",baby_chick:"\ud83d\udc24",hatched_chick:"\ud83d\udc25",bird:"\ud83d\udc26",penguin:"\ud83d\udc27",dove:"\ud83d\udd4a\ufe0f",eagle:"\ud83e\udd85",duck:"\ud83e\udd86",swan:"\ud83e\udda2",owl:"\ud83e\udd89",dodo:"\ud83e\udda4",feather:"\ud83e\udeb6",flamingo:"\ud83e\udda9",peacock:"\ud83e\udd9a",parrot:"\ud83e\udd9c",wing:"\ud83e\udebd",black_bird:"\ud83d\udc26\u200d\u2b1b",goose:"\ud83e\udebf",frog:"\ud83d\udc38",crocodile:"\ud83d\udc0a",turtle:"\ud83d\udc22",lizard:"\ud83e\udd8e",snake:"\ud83d\udc0d",dragon_face:"\ud83d\udc32",dragon:"\ud83d\udc09",sauropod:"\ud83e\udd95","t-rex":"\ud83e\udd96",whale:"\ud83d\udc33",whale2:"\ud83d\udc0b",dolphin:"\ud83d\udc2c",flipper:"\ud83d\udc2c",seal:"\ud83e\uddad",fish:"\ud83d\udc1f",tropical_fish:"\ud83d\udc20",blowfish:"\ud83d\udc21",shark:"\ud83e\udd88",octopus:"\ud83d\udc19",shell:"\ud83d\udc1a",coral:"\ud83e\udeb8",jellyfish:"\ud83e\udebc",snail:"\ud83d\udc0c",butterfly:"\ud83e\udd8b",bug:"\ud83d\udc1b",ant:"\ud83d\udc1c",bee:"\ud83d\udc1d",honeybee:"\ud83d\udc1d",beetle:"\ud83e\udeb2",lady_beetle:"\ud83d\udc1e",cricket:"\ud83e\udd97",cockroach:"\ud83e\udeb3",spider:"\ud83d\udd77\ufe0f",spider_web:"\ud83d\udd78\ufe0f",scorpion:"\ud83e\udd82",mosquito:"\ud83e\udd9f",fly:"\ud83e\udeb0",worm:"\ud83e\udeb1",microbe:"\ud83e\udda0",bouquet:"\ud83d\udc90",cherry_blossom:"\ud83c\udf38",white_flower:"\ud83d\udcae",lotus:"\ud83e\udeb7",rosette:"\ud83c\udff5\ufe0f",rose:"\ud83c\udf39",wilted_flower:"\ud83e\udd40",hibiscus:"\ud83c\udf3a",sunflower:"\ud83c\udf3b",blossom:"\ud83c\udf3c",tulip:"\ud83c\udf37",hyacinth:"\ud83e\udebb",seedling:"\ud83c\udf31",potted_plant:"\ud83e\udeb4",evergreen_tree:"\ud83c\udf32",deciduous_tree:"\ud83c\udf33",palm_tree:"\ud83c\udf34",cactus:"\ud83c\udf35",ear_of_rice:"\ud83c\udf3e",herb:"\ud83c\udf3f",shamrock:"\u2618\ufe0f",four_leaf_clover:"\ud83c\udf40",maple_leaf:"\ud83c\udf41",fallen_leaf:"\ud83c\udf42",leaves:"\ud83c\udf43",empty_nest:"\ud83e\udeb9",nest_with_eggs:"\ud83e\udeba",mushroom:"\ud83c\udf44",grapes:"\ud83c\udf47",melon:"\ud83c\udf48",watermelon:"\ud83c\udf49",tangerine:"\ud83c\udf4a",orange:"\ud83c\udf4a",mandarin:"\ud83c\udf4a",lemon:"\ud83c\udf4b",banana:"\ud83c\udf4c",pineapple:"\ud83c\udf4d",mango:"\ud83e\udd6d",apple:"\ud83c\udf4e",green_apple:"\ud83c\udf4f",pear:"\ud83c\udf50",peach:"\ud83c\udf51",cherries:"\ud83c\udf52",strawberry:"\ud83c\udf53",blueberries:"\ud83e\uded0",kiwi_fruit:"\ud83e\udd5d",tomato:"\ud83c\udf45",olive:"\ud83e\uded2",coconut:"\ud83e\udd65",avocado:"\ud83e\udd51",eggplant:"\ud83c\udf46",potato:"\ud83e\udd54",carrot:"\ud83e\udd55",corn:"\ud83c\udf3d",hot_pepper:"\ud83c\udf36\ufe0f",bell_pepper:"\ud83e\uded1",cucumber:"\ud83e\udd52",leafy_green:"\ud83e\udd6c",broccoli:"\ud83e\udd66",garlic:"\ud83e\uddc4",onion:"\ud83e\uddc5",peanuts:"\ud83e\udd5c",beans:"\ud83e\uded8",chestnut:"\ud83c\udf30",ginger_root:"\ud83e\udeda",pea_pod:"\ud83e\udedb",bread:"\ud83c\udf5e",croissant:"\ud83e\udd50",baguette_bread:"\ud83e\udd56",flatbread:"\ud83e\uded3",pretzel:"\ud83e\udd68",bagel:"\ud83e\udd6f",pancakes:"\ud83e\udd5e",waffle:"\ud83e\uddc7",cheese:"\ud83e\uddc0",meat_on_bone:"\ud83c\udf56",poultry_leg:"\ud83c\udf57",cut_of_meat:"\ud83e\udd69",bacon:"\ud83e\udd53",hamburger:"\ud83c\udf54",fries:"\ud83c\udf5f",pizza:"\ud83c\udf55",hotdog:"\ud83c\udf2d",sandwich:"\ud83e\udd6a",taco:"\ud83c\udf2e",burrito:"\ud83c\udf2f",tamale:"\ud83e\uded4",stuffed_flatbread:"\ud83e\udd59",falafel:"\ud83e\uddc6",egg:"\ud83e\udd5a",fried_egg:"\ud83c\udf73",shallow_pan_of_food:"\ud83e\udd58",stew:"\ud83c\udf72",fondue:"\ud83e\uded5",bowl_with_spoon:"\ud83e\udd63",green_salad:"\ud83e\udd57",popcorn:"\ud83c\udf7f",butter:"\ud83e\uddc8",salt:"\ud83e\uddc2",canned_food:"\ud83e\udd6b",bento:"\ud83c\udf71",rice_cracker:"\ud83c\udf58",rice_ball:"\ud83c\udf59",rice:"\ud83c\udf5a",curry:"\ud83c\udf5b",ramen:"\ud83c\udf5c",spaghetti:"\ud83c\udf5d",sweet_potato:"\ud83c\udf60",oden:"\ud83c\udf62",sushi:"\ud83c\udf63",fried_shrimp:"\ud83c\udf64",fish_cake:"\ud83c\udf65",moon_cake:"\ud83e\udd6e",dango:"\ud83c\udf61",dumpling:"\ud83e\udd5f",fortune_cookie:"\ud83e\udd60",takeout_box:"\ud83e\udd61",crab:"\ud83e\udd80",lobster:"\ud83e\udd9e",shrimp:"\ud83e\udd90",squid:"\ud83e\udd91",oyster:"\ud83e\uddaa",icecream:"\ud83c\udf66",shaved_ice:"\ud83c\udf67",ice_cream:"\ud83c\udf68",doughnut:"\ud83c\udf69",cookie:"\ud83c\udf6a",birthday:"\ud83c\udf82",cake:"\ud83c\udf70",cupcake:"\ud83e\uddc1",pie:"\ud83e\udd67",chocolate_bar:"\ud83c\udf6b",candy:"\ud83c\udf6c",lollipop:"\ud83c\udf6d",custard:"\ud83c\udf6e",honey_pot:"\ud83c\udf6f",baby_bottle:"\ud83c\udf7c",milk_glass:"\ud83e\udd5b",coffee:"\u2615",teapot:"\ud83e\uded6",tea:"\ud83c\udf75",sake:"\ud83c\udf76",champagne:"\ud83c\udf7e",wine_glass:"\ud83c\udf77",cocktail:"\ud83c\udf78",tropical_drink:"\ud83c\udf79",beer:"\ud83c\udf7a",beers:"\ud83c\udf7b",clinking_glasses:"\ud83e\udd42",tumbler_glass:"\ud83e\udd43",pouring_liquid:"\ud83e\uded7",cup_with_straw:"\ud83e\udd64",bubble_tea:"\ud83e\uddcb",beverage_box:"\ud83e\uddc3",mate:"\ud83e\uddc9",ice_cube:"\ud83e\uddca",chopsticks:"\ud83e\udd62",plate_with_cutlery:"\ud83c\udf7d\ufe0f",fork_and_knife:"\ud83c\udf74",spoon:"\ud83e\udd44",hocho:"\ud83d\udd2a",knife:"\ud83d\udd2a",jar:"\ud83e\uded9",amphora:"\ud83c\udffa",earth_africa:"\ud83c\udf0d",earth_americas:"\ud83c\udf0e",earth_asia:"\ud83c\udf0f",globe_with_meridians:"\ud83c\udf10",world_map:"\ud83d\uddfa\ufe0f",japan:"\ud83d\uddfe",compass:"\ud83e\udded",mountain_snow:"\ud83c\udfd4\ufe0f",mountain:"\u26f0\ufe0f",volcano:"\ud83c\udf0b",mount_fuji:"\ud83d\uddfb",camping:"\ud83c\udfd5\ufe0f",beach_umbrella:"\ud83c\udfd6\ufe0f",desert:"\ud83c\udfdc\ufe0f",desert_island:"\ud83c\udfdd\ufe0f",national_park:"\ud83c\udfde\ufe0f",stadium:"\ud83c\udfdf\ufe0f",classical_building:"\ud83c\udfdb\ufe0f",building_construction:"\ud83c\udfd7\ufe0f",bricks:"\ud83e\uddf1",rock:"\ud83e\udea8",wood:"\ud83e\udeb5",hut:"\ud83d\uded6",houses:"\ud83c\udfd8\ufe0f",derelict_house:"\ud83c\udfda\ufe0f",house:"\ud83c\udfe0",house_with_garden:"\ud83c\udfe1",office:"\ud83c\udfe2",post_office:"\ud83c\udfe3",european_post_office:"\ud83c\udfe4",hospital:"\ud83c\udfe5",bank:"\ud83c\udfe6",hotel:"\ud83c\udfe8",love_hotel:"\ud83c\udfe9",convenience_store:"\ud83c\udfea",school:"\ud83c\udfeb",department_store:"\ud83c\udfec",factory:"\ud83c\udfed",japanese_castle:"\ud83c\udfef",european_castle:"\ud83c\udff0",wedding:"\ud83d\udc92",tokyo_tower:"\ud83d\uddfc",statue_of_liberty:"\ud83d\uddfd",church:"\u26ea",mosque:"\ud83d\udd4c",hindu_temple:"\ud83d\uded5",synagogue:"\ud83d\udd4d",shinto_shrine:"\u26e9\ufe0f",kaaba:"\ud83d\udd4b",fountain:"\u26f2",tent:"\u26fa",foggy:"\ud83c\udf01",night_with_stars:"\ud83c\udf03",cityscape:"\ud83c\udfd9\ufe0f",sunrise_over_mountains:"\ud83c\udf04",sunrise:"\ud83c\udf05",city_sunset:"\ud83c\udf06",city_sunrise:"\ud83c\udf07",bridge_at_night:"\ud83c\udf09",hotsprings:"\u2668\ufe0f",carousel_horse:"\ud83c\udfa0",playground_slide:"\ud83d\udedd",ferris_wheel:"\ud83c\udfa1",roller_coaster:"\ud83c\udfa2",barber:"\ud83d\udc88",circus_tent:"\ud83c\udfaa",steam_locomotive:"\ud83d\ude82",railway_car:"\ud83d\ude83",bullettrain_side:"\ud83d\ude84",bullettrain_front:"\ud83d\ude85",train2:"\ud83d\ude86",metro:"\ud83d\ude87",light_rail:"\ud83d\ude88",station:"\ud83d\ude89",tram:"\ud83d\ude8a",monorail:"\ud83d\ude9d",mountain_railway:"\ud83d\ude9e",train:"\ud83d\ude8b",bus:"\ud83d\ude8c",oncoming_bus:"\ud83d\ude8d",trolleybus:"\ud83d\ude8e",minibus:"\ud83d\ude90",ambulance:"\ud83d\ude91",fire_engine:"\ud83d\ude92",police_car:"\ud83d\ude93",oncoming_police_car:"\ud83d\ude94",taxi:"\ud83d\ude95",oncoming_taxi:"\ud83d\ude96",car:"\ud83d\ude97",red_car:"\ud83d\ude97",oncoming_automobile:"\ud83d\ude98",blue_car:"\ud83d\ude99",pickup_truck:"\ud83d\udefb",truck:"\ud83d\ude9a",articulated_lorry:"\ud83d\ude9b",tractor:"\ud83d\ude9c",racing_car:"\ud83c\udfce\ufe0f",motorcycle:"\ud83c\udfcd\ufe0f",motor_scooter:"\ud83d\udef5",manual_wheelchair:"\ud83e\uddbd",motorized_wheelchair:"\ud83e\uddbc",auto_rickshaw:"\ud83d\udefa",bike:"\ud83d\udeb2",kick_scooter:"\ud83d\udef4",skateboard:"\ud83d\udef9",roller_skate:"\ud83d\udefc",busstop:"\ud83d\ude8f",motorway:"\ud83d\udee3\ufe0f",railway_track:"\ud83d\udee4\ufe0f",oil_drum:"\ud83d\udee2\ufe0f",fuelpump:"\u26fd",wheel:"\ud83d\udede",rotating_light:"\ud83d\udea8",traffic_light:"\ud83d\udea5",vertical_traffic_light:"\ud83d\udea6",stop_sign:"\ud83d\uded1",construction:"\ud83d\udea7",anchor:"\u2693",ring_buoy:"\ud83d\udedf",boat:"\u26f5",sailboat:"\u26f5",canoe:"\ud83d\udef6",speedboat:"\ud83d\udea4",passenger_ship:"\ud83d\udef3\ufe0f",ferry:"\u26f4\ufe0f",motor_boat:"\ud83d\udee5\ufe0f",ship:"\ud83d\udea2",airplane:"\u2708\ufe0f",small_airplane:"\ud83d\udee9\ufe0f",flight_departure:"\ud83d\udeeb",flight_arrival:"\ud83d\udeec",parachute:"\ud83e\ude82",seat:"\ud83d\udcba",helicopter:"\ud83d\ude81",suspension_railway:"\ud83d\ude9f",mountain_cableway:"\ud83d\udea0",aerial_tramway:"\ud83d\udea1",artificial_satellite:"\ud83d\udef0\ufe0f",rocket:"\ud83d\ude80",flying_saucer:"\ud83d\udef8",bellhop_bell:"\ud83d\udece\ufe0f",luggage:"\ud83e\uddf3",hourglass:"\u231b",hourglass_flowing_sand:"\u23f3",watch:"\u231a",alarm_clock:"\u23f0",stopwatch:"\u23f1\ufe0f",timer_clock:"\u23f2\ufe0f",mantelpiece_clock:"\ud83d\udd70\ufe0f",clock12:"\ud83d\udd5b",clock1230:"\ud83d\udd67",clock1:"\ud83d\udd50",clock130:"\ud83d\udd5c",clock2:"\ud83d\udd51",clock230:"\ud83d\udd5d",clock3:"\ud83d\udd52",clock330:"\ud83d\udd5e",clock4:"\ud83d\udd53",clock430:"\ud83d\udd5f",clock5:"\ud83d\udd54",clock530:"\ud83d\udd60",clock6:"\ud83d\udd55",clock630:"\ud83d\udd61",clock7:"\ud83d\udd56",clock730:"\ud83d\udd62",clock8:"\ud83d\udd57",clock830:"\ud83d\udd63",clock9:"\ud83d\udd58",clock930:"\ud83d\udd64",clock10:"\ud83d\udd59",clock1030:"\ud83d\udd65",clock11:"\ud83d\udd5a",clock1130:"\ud83d\udd66",new_moon:"\ud83c\udf11",waxing_crescent_moon:"\ud83c\udf12",first_quarter_moon:"\ud83c\udf13",moon:"\ud83c\udf14",waxing_gibbous_moon:"\ud83c\udf14",full_moon:"\ud83c\udf15",waning_gibbous_moon:"\ud83c\udf16",last_quarter_moon:"\ud83c\udf17",waning_crescent_moon:"\ud83c\udf18",crescent_moon:"\ud83c\udf19",new_moon_with_face:"\ud83c\udf1a",first_quarter_moon_with_face:"\ud83c\udf1b",last_quarter_moon_with_face:"\ud83c\udf1c",thermometer:"\ud83c\udf21\ufe0f",sunny:"\u2600\ufe0f",full_moon_with_face:"\ud83c\udf1d",sun_with_face:"\ud83c\udf1e",ringed_planet:"\ud83e\ude90",star:"\u2b50",star2:"\ud83c\udf1f",stars:"\ud83c\udf20",milky_way:"\ud83c\udf0c",cloud:"\u2601\ufe0f",partly_sunny:"\u26c5",cloud_with_lightning_and_rain:"\u26c8\ufe0f",sun_behind_small_cloud:"\ud83c\udf24\ufe0f",sun_behind_large_cloud:"\ud83c\udf25\ufe0f",sun_behind_rain_cloud:"\ud83c\udf26\ufe0f",cloud_with_rain:"\ud83c\udf27\ufe0f",cloud_with_snow:"\ud83c\udf28\ufe0f",cloud_with_lightning:"\ud83c\udf29\ufe0f",tornado:"\ud83c\udf2a\ufe0f",fog:"\ud83c\udf2b\ufe0f",wind_face:"\ud83c\udf2c\ufe0f",cyclone:"\ud83c\udf00",rainbow:"\ud83c\udf08",closed_umbrella:"\ud83c\udf02",open_umbrella:"\u2602\ufe0f",umbrella:"\u2614",parasol_on_ground:"\u26f1\ufe0f",zap:"\u26a1",snowflake:"\u2744\ufe0f",snowman_with_snow:"\u2603\ufe0f",snowman:"\u26c4",comet:"\u2604\ufe0f",fire:"\ud83d\udd25",droplet:"\ud83d\udca7",ocean:"\ud83c\udf0a",jack_o_lantern:"\ud83c\udf83",christmas_tree:"\ud83c\udf84",fireworks:"\ud83c\udf86",sparkler:"\ud83c\udf87",firecracker:"\ud83e\udde8",sparkles:"\u2728",balloon:"\ud83c\udf88",tada:"\ud83c\udf89",confetti_ball:"\ud83c\udf8a",tanabata_tree:"\ud83c\udf8b",bamboo:"\ud83c\udf8d",dolls:"\ud83c\udf8e",flags:"\ud83c\udf8f",wind_chime:"\ud83c\udf90",rice_scene:"\ud83c\udf91",red_envelope:"\ud83e\udde7",ribbon:"\ud83c\udf80",gift:"\ud83c\udf81",reminder_ribbon:"\ud83c\udf97\ufe0f",tickets:"\ud83c\udf9f\ufe0f",ticket:"\ud83c\udfab",medal_military:"\ud83c\udf96\ufe0f",trophy:"\ud83c\udfc6",medal_sports:"\ud83c\udfc5","1st_place_medal":"\ud83e\udd47","2nd_place_medal":"\ud83e\udd48","3rd_place_medal":"\ud83e\udd49",soccer:"\u26bd",baseball:"\u26be",softball:"\ud83e\udd4e",basketball:"\ud83c\udfc0",volleyball:"\ud83c\udfd0",football:"\ud83c\udfc8",rugby_football:"\ud83c\udfc9",tennis:"\ud83c\udfbe",flying_disc:"\ud83e\udd4f",bowling:"\ud83c\udfb3",cricket_game:"\ud83c\udfcf",field_hockey:"\ud83c\udfd1",ice_hockey:"\ud83c\udfd2",lacrosse:"\ud83e\udd4d",ping_pong:"\ud83c\udfd3",badminton:"\ud83c\udff8",boxing_glove:"\ud83e\udd4a",martial_arts_uniform:"\ud83e\udd4b",goal_net:"\ud83e\udd45",golf:"\u26f3",ice_skate:"\u26f8\ufe0f",fishing_pole_and_fish:"\ud83c\udfa3",diving_mask:"\ud83e\udd3f",running_shirt_with_sash:"\ud83c\udfbd",ski:"\ud83c\udfbf",sled:"\ud83d\udef7",curling_stone:"\ud83e\udd4c",dart:"\ud83c\udfaf",yo_yo:"\ud83e\ude80",kite:"\ud83e\ude81",gun:"\ud83d\udd2b","8ball":"\ud83c\udfb1",crystal_ball:"\ud83d\udd2e",magic_wand:"\ud83e\ude84",video_game:"\ud83c\udfae",joystick:"\ud83d\udd79\ufe0f",slot_machine:"\ud83c\udfb0",game_die:"\ud83c\udfb2",jigsaw:"\ud83e\udde9",teddy_bear:"\ud83e\uddf8",pinata:"\ud83e\ude85",mirror_ball:"\ud83e\udea9",nesting_dolls:"\ud83e\ude86",spades:"\u2660\ufe0f",hearts:"\u2665\ufe0f",diamonds:"\u2666\ufe0f",clubs:"\u2663\ufe0f",chess_pawn:"\u265f\ufe0f",black_joker:"\ud83c\udccf",mahjong:"\ud83c\udc04",flower_playing_cards:"\ud83c\udfb4",performing_arts:"\ud83c\udfad",framed_picture:"\ud83d\uddbc\ufe0f",art:"\ud83c\udfa8",thread:"\ud83e\uddf5",sewing_needle:"\ud83e\udea1",yarn:"\ud83e\uddf6",knot:"\ud83e\udea2",eyeglasses:"\ud83d\udc53",dark_sunglasses:"\ud83d\udd76\ufe0f",goggles:"\ud83e\udd7d",lab_coat:"\ud83e\udd7c",safety_vest:"\ud83e\uddba",necktie:"\ud83d\udc54",shirt:"\ud83d\udc55",tshirt:"\ud83d\udc55",jeans:"\ud83d\udc56",scarf:"\ud83e\udde3",gloves:"\ud83e\udde4",coat:"\ud83e\udde5",socks:"\ud83e\udde6",dress:"\ud83d\udc57",kimono:"\ud83d\udc58",sari:"\ud83e\udd7b",one_piece_swimsuit:"\ud83e\ude71",swim_brief:"\ud83e\ude72",shorts:"\ud83e\ude73",bikini:"\ud83d\udc59",womans_clothes:"\ud83d\udc5a",folding_hand_fan:"\ud83e\udead",purse:"\ud83d\udc5b",handbag:"\ud83d\udc5c",pouch:"\ud83d\udc5d",shopping:"\ud83d\udecd\ufe0f",school_satchel:"\ud83c\udf92",thong_sandal:"\ud83e\ude74",mans_shoe:"\ud83d\udc5e",shoe:"\ud83d\udc5e",athletic_shoe:"\ud83d\udc5f",hiking_boot:"\ud83e\udd7e",flat_shoe:"\ud83e\udd7f",high_heel:"\ud83d\udc60",sandal:"\ud83d\udc61",ballet_shoes:"\ud83e\ude70",boot:"\ud83d\udc62",hair_pick:"\ud83e\udeae",crown:"\ud83d\udc51",womans_hat:"\ud83d\udc52",tophat:"\ud83c\udfa9",mortar_board:"\ud83c\udf93",billed_cap:"\ud83e\udde2",military_helmet:"\ud83e\ude96",rescue_worker_helmet:"\u26d1\ufe0f",prayer_beads:"\ud83d\udcff",lipstick:"\ud83d\udc84",ring:"\ud83d\udc8d",gem:"\ud83d\udc8e",mute:"\ud83d\udd07",speaker:"\ud83d\udd08",sound:"\ud83d\udd09",loud_sound:"\ud83d\udd0a",loudspeaker:"\ud83d\udce2",mega:"\ud83d\udce3",postal_horn:"\ud83d\udcef",bell:"\ud83d\udd14",no_bell:"\ud83d\udd15",musical_score:"\ud83c\udfbc",musical_note:"\ud83c\udfb5",notes:"\ud83c\udfb6",studio_microphone:"\ud83c\udf99\ufe0f",level_slider:"\ud83c\udf9a\ufe0f",control_knobs:"\ud83c\udf9b\ufe0f",microphone:"\ud83c\udfa4",headphones:"\ud83c\udfa7",radio:"\ud83d\udcfb",saxophone:"\ud83c\udfb7",accordion:"\ud83e\ude97",guitar:"\ud83c\udfb8",musical_keyboard:"\ud83c\udfb9",trumpet:"\ud83c\udfba",violin:"\ud83c\udfbb",banjo:"\ud83e\ude95",drum:"\ud83e\udd41",long_drum:"\ud83e\ude98",maracas:"\ud83e\ude87",flute:"\ud83e\ude88",iphone:"\ud83d\udcf1",calling:"\ud83d\udcf2",phone:"\u260e\ufe0f",telephone:"\u260e\ufe0f",telephone_receiver:"\ud83d\udcde",pager:"\ud83d\udcdf",fax:"\ud83d\udce0",battery:"\ud83d\udd0b",low_battery:"\ud83e\udeab",electric_plug:"\ud83d\udd0c",computer:"\ud83d\udcbb",desktop_computer:"\ud83d\udda5\ufe0f",printer:"\ud83d\udda8\ufe0f",keyboard:"\u2328\ufe0f",computer_mouse:"\ud83d\uddb1\ufe0f",trackball:"\ud83d\uddb2\ufe0f",minidisc:"\ud83d\udcbd",floppy_disk:"\ud83d\udcbe",cd:"\ud83d\udcbf",dvd:"\ud83d\udcc0",abacus:"\ud83e\uddee",movie_camera:"\ud83c\udfa5",film_strip:"\ud83c\udf9e\ufe0f",film_projector:"\ud83d\udcfd\ufe0f",clapper:"\ud83c\udfac",tv:"\ud83d\udcfa",camera:"\ud83d\udcf7",camera_flash:"\ud83d\udcf8",video_camera:"\ud83d\udcf9",vhs:"\ud83d\udcfc",mag:"\ud83d\udd0d",mag_right:"\ud83d\udd0e",candle:"\ud83d\udd6f\ufe0f",bulb:"\ud83d\udca1",flashlight:"\ud83d\udd26",izakaya_lantern:"\ud83c\udfee",lantern:"\ud83c\udfee",diya_lamp:"\ud83e\ude94",notebook_with_decorative_cover:"\ud83d\udcd4",closed_book:"\ud83d\udcd5",book:"\ud83d\udcd6",open_book:"\ud83d\udcd6",green_book:"\ud83d\udcd7",blue_book:"\ud83d\udcd8",orange_book:"\ud83d\udcd9",books:"\ud83d\udcda",notebook:"\ud83d\udcd3",ledger:"\ud83d\udcd2",page_with_curl:"\ud83d\udcc3",scroll:"\ud83d\udcdc",page_facing_up:"\ud83d\udcc4",newspaper:"\ud83d\udcf0",newspaper_roll:"\ud83d\uddde\ufe0f",bookmark_tabs:"\ud83d\udcd1",bookmark:"\ud83d\udd16",label:"\ud83c\udff7\ufe0f",moneybag:"\ud83d\udcb0",coin:"\ud83e\ude99",yen:"\ud83d\udcb4",dollar:"\ud83d\udcb5",euro:"\ud83d\udcb6",pound:"\ud83d\udcb7",money_with_wings:"\ud83d\udcb8",credit_card:"\ud83d\udcb3",receipt:"\ud83e\uddfe",chart:"\ud83d\udcb9",envelope:"\u2709\ufe0f",email:"\ud83d\udce7","e-mail":"\ud83d\udce7",incoming_envelope:"\ud83d\udce8",envelope_with_arrow:"\ud83d\udce9",outbox_tray:"\ud83d\udce4",inbox_tray:"\ud83d\udce5",package:"\ud83d\udce6",mailbox:"\ud83d\udceb",mailbox_closed:"\ud83d\udcea",mailbox_with_mail:"\ud83d\udcec",mailbox_with_no_mail:"\ud83d\udced",postbox:"\ud83d\udcee",ballot_box:"\ud83d\uddf3\ufe0f",pencil2:"\u270f\ufe0f",black_nib:"\u2712\ufe0f",fountain_pen:"\ud83d\udd8b\ufe0f",pen:"\ud83d\udd8a\ufe0f",paintbrush:"\ud83d\udd8c\ufe0f",crayon:"\ud83d\udd8d\ufe0f",memo:"\ud83d\udcdd",pencil:"\ud83d\udcdd",briefcase:"\ud83d\udcbc",file_folder:"\ud83d\udcc1",open_file_folder:"\ud83d\udcc2",card_index_dividers:"\ud83d\uddc2\ufe0f",date:"\ud83d\udcc5",calendar:"\ud83d\udcc6",spiral_notepad:"\ud83d\uddd2\ufe0f",spiral_calendar:"\ud83d\uddd3\ufe0f",card_index:"\ud83d\udcc7",chart_with_upwards_trend:"\ud83d\udcc8",chart_with_downwards_trend:"\ud83d\udcc9",bar_chart:"\ud83d\udcca",clipboard:"\ud83d\udccb",pushpin:"\ud83d\udccc",round_pushpin:"\ud83d\udccd",paperclip:"\ud83d\udcce",paperclips:"\ud83d\udd87\ufe0f",straight_ruler:"\ud83d\udccf",triangular_ruler:"\ud83d\udcd0",scissors:"\u2702\ufe0f",card_file_box:"\ud83d\uddc3\ufe0f",file_cabinet:"\ud83d\uddc4\ufe0f",wastebasket:"\ud83d\uddd1\ufe0f",lock:"\ud83d\udd12",unlock:"\ud83d\udd13",lock_with_ink_pen:"\ud83d\udd0f",closed_lock_with_key:"\ud83d\udd10",key:"\ud83d\udd11",old_key:"\ud83d\udddd\ufe0f",hammer:"\ud83d\udd28",axe:"\ud83e\ude93",pick:"\u26cf\ufe0f",hammer_and_pick:"\u2692\ufe0f",hammer_and_wrench:"\ud83d\udee0\ufe0f",dagger:"\ud83d\udde1\ufe0f",crossed_swords:"\u2694\ufe0f",bomb:"\ud83d\udca3",boomerang:"\ud83e\ude83",bow_and_arrow:"\ud83c\udff9",shield:"\ud83d\udee1\ufe0f",carpentry_saw:"\ud83e\ude9a",wrench:"\ud83d\udd27",screwdriver:"\ud83e\ude9b",nut_and_bolt:"\ud83d\udd29",gear:"\u2699\ufe0f",clamp:"\ud83d\udddc\ufe0f",balance_scale:"\u2696\ufe0f",probing_cane:"\ud83e\uddaf",link:"\ud83d\udd17",chains:"\u26d3\ufe0f",hook:"\ud83e\ude9d",toolbox:"\ud83e\uddf0",magnet:"\ud83e\uddf2",ladder:"\ud83e\ude9c",alembic:"\u2697\ufe0f",test_tube:"\ud83e\uddea",petri_dish:"\ud83e\uddeb",dna:"\ud83e\uddec",microscope:"\ud83d\udd2c",telescope:"\ud83d\udd2d",satellite:"\ud83d\udce1",syringe:"\ud83d\udc89",drop_of_blood:"\ud83e\ude78",pill:"\ud83d\udc8a",adhesive_bandage:"\ud83e\ude79",crutch:"\ud83e\ude7c",stethoscope:"\ud83e\ude7a",x_ray:"\ud83e\ude7b",door:"\ud83d\udeaa",elevator:"\ud83d\uded7",mirror:"\ud83e\ude9e",window:"\ud83e\ude9f",bed:"\ud83d\udecf\ufe0f",couch_and_lamp:"\ud83d\udecb\ufe0f",chair:"\ud83e\ude91",toilet:"\ud83d\udebd",plunger:"\ud83e\udea0",shower:"\ud83d\udebf",bathtub:"\ud83d\udec1",mouse_trap:"\ud83e\udea4",razor:"\ud83e\ude92",lotion_bottle:"\ud83e\uddf4",safety_pin:"\ud83e\uddf7",broom:"\ud83e\uddf9",basket:"\ud83e\uddfa",roll_of_paper:"\ud83e\uddfb",bucket:"\ud83e\udea3",soap:"\ud83e\uddfc",bubbles:"\ud83e\udee7",toothbrush:"\ud83e\udea5",sponge:"\ud83e\uddfd",fire_extinguisher:"\ud83e\uddef",shopping_cart:"\ud83d\uded2",smoking:"\ud83d\udeac",coffin:"\u26b0\ufe0f",headstone:"\ud83e\udea6",funeral_urn:"\u26b1\ufe0f",nazar_amulet:"\ud83e\uddff",hamsa:"\ud83e\udeac",moyai:"\ud83d\uddff",placard:"\ud83e\udea7",identification_card:"\ud83e\udeaa",atm:"\ud83c\udfe7",put_litter_in_its_place:"\ud83d\udeae",potable_water:"\ud83d\udeb0",wheelchair:"\u267f",mens:"\ud83d\udeb9",womens:"\ud83d\udeba",restroom:"\ud83d\udebb",baby_symbol:"\ud83d\udebc",wc:"\ud83d\udebe",passport_control:"\ud83d\udec2",customs:"\ud83d\udec3",baggage_claim:"\ud83d\udec4",left_luggage:"\ud83d\udec5",warning:"\u26a0\ufe0f",children_crossing:"\ud83d\udeb8",no_entry:"\u26d4",no_entry_sign:"\ud83d\udeab",no_bicycles:"\ud83d\udeb3",no_smoking:"\ud83d\udead",do_not_litter:"\ud83d\udeaf","non-potable_water":"\ud83d\udeb1",no_pedestrians:"\ud83d\udeb7",no_mobile_phones:"\ud83d\udcf5",underage:"\ud83d\udd1e",radioactive:"\u2622\ufe0f",biohazard:"\u2623\ufe0f",arrow_up:"\u2b06\ufe0f",arrow_upper_right:"\u2197\ufe0f",arrow_right:"\u27a1\ufe0f",arrow_lower_right:"\u2198\ufe0f",arrow_down:"\u2b07\ufe0f",arrow_lower_left:"\u2199\ufe0f",arrow_left:"\u2b05\ufe0f",arrow_upper_left:"\u2196\ufe0f",arrow_up_down:"\u2195\ufe0f",left_right_arrow:"\u2194\ufe0f",leftwards_arrow_with_hook:"\u21a9\ufe0f",arrow_right_hook:"\u21aa\ufe0f",arrow_heading_up:"\u2934\ufe0f",arrow_heading_down:"\u2935\ufe0f",arrows_clockwise:"\ud83d\udd03",arrows_counterclockwise:"\ud83d\udd04",back:"\ud83d\udd19",end:"\ud83d\udd1a",on:"\ud83d\udd1b",soon:"\ud83d\udd1c",top:"\ud83d\udd1d",place_of_worship:"\ud83d\uded0",atom_symbol:"\u269b\ufe0f",om:"\ud83d\udd49\ufe0f",star_of_david:"\u2721\ufe0f",wheel_of_dharma:"\u2638\ufe0f",yin_yang:"\u262f\ufe0f",latin_cross:"\u271d\ufe0f",orthodox_cross:"\u2626\ufe0f",star_and_crescent:"\u262a\ufe0f",peace_symbol:"\u262e\ufe0f",menorah:"\ud83d\udd4e",six_pointed_star:"\ud83d\udd2f",khanda:"\ud83e\udeaf",aries:"\u2648",taurus:"\u2649",gemini:"\u264a",cancer:"\u264b",leo:"\u264c",virgo:"\u264d",libra:"\u264e",scorpius:"\u264f",sagittarius:"\u2650",capricorn:"\u2651",aquarius:"\u2652",pisces:"\u2653",ophiuchus:"\u26ce",twisted_rightwards_arrows:"\ud83d\udd00",repeat:"\ud83d\udd01",repeat_one:"\ud83d\udd02",arrow_forward:"\u25b6\ufe0f",fast_forward:"\u23e9",next_track_button:"\u23ed\ufe0f",play_or_pause_button:"\u23ef\ufe0f",arrow_backward:"\u25c0\ufe0f",rewind:"\u23ea",previous_track_button:"\u23ee\ufe0f",arrow_up_small:"\ud83d\udd3c",arrow_double_up:"\u23eb",arrow_down_small:"\ud83d\udd3d",arrow_double_down:"\u23ec",pause_button:"\u23f8\ufe0f",stop_button:"\u23f9\ufe0f",record_button:"\u23fa\ufe0f",eject_button:"\u23cf\ufe0f",cinema:"\ud83c\udfa6",low_brightness:"\ud83d\udd05",high_brightness:"\ud83d\udd06",signal_strength:"\ud83d\udcf6",wireless:"\ud83d\udedc",vibration_mode:"\ud83d\udcf3",mobile_phone_off:"\ud83d\udcf4",female_sign:"\u2640\ufe0f",male_sign:"\u2642\ufe0f",transgender_symbol:"\u26a7\ufe0f",heavy_multiplication_x:"\u2716\ufe0f",heavy_plus_sign:"\u2795",heavy_minus_sign:"\u2796",heavy_division_sign:"\u2797",heavy_equals_sign:"\ud83d\udff0",infinity:"\u267e\ufe0f",bangbang:"\u203c\ufe0f",interrobang:"\u2049\ufe0f",question:"\u2753",grey_question:"\u2754",grey_exclamation:"\u2755",exclamation:"\u2757",heavy_exclamation_mark:"\u2757",wavy_dash:"\u3030\ufe0f",currency_exchange:"\ud83d\udcb1",heavy_dollar_sign:"\ud83d\udcb2",medical_symbol:"\u2695\ufe0f",recycle:"\u267b\ufe0f",fleur_de_lis:"\u269c\ufe0f",trident:"\ud83d\udd31",name_badge:"\ud83d\udcdb",beginner:"\ud83d\udd30",o:"\u2b55",white_check_mark:"\u2705",ballot_box_with_check:"\u2611\ufe0f",heavy_check_mark:"\u2714\ufe0f",x:"\u274c",negative_squared_cross_mark:"\u274e",curly_loop:"\u27b0",loop:"\u27bf",part_alternation_mark:"\u303d\ufe0f",eight_spoked_asterisk:"\u2733\ufe0f",eight_pointed_black_star:"\u2734\ufe0f",sparkle:"\u2747\ufe0f",copyright:"\xa9\ufe0f",registered:"\xae\ufe0f",tm:"\u2122\ufe0f",hash:"#\ufe0f\u20e3",asterisk:"*\ufe0f\u20e3",zero:"0\ufe0f\u20e3",one:"1\ufe0f\u20e3",two:"2\ufe0f\u20e3",three:"3\ufe0f\u20e3",four:"4\ufe0f\u20e3",five:"5\ufe0f\u20e3",six:"6\ufe0f\u20e3",seven:"7\ufe0f\u20e3",eight:"8\ufe0f\u20e3",nine:"9\ufe0f\u20e3",keycap_ten:"\ud83d\udd1f",capital_abcd:"\ud83d\udd20",abcd:"\ud83d\udd21",symbols:"\ud83d\udd23",abc:"\ud83d\udd24",a:"\ud83c\udd70\ufe0f",ab:"\ud83c\udd8e",b:"\ud83c\udd71\ufe0f",cl:"\ud83c\udd91",cool:"\ud83c\udd92",free:"\ud83c\udd93",information_source:"\u2139\ufe0f",id:"\ud83c\udd94",m:"\u24c2\ufe0f",new:"\ud83c\udd95",ng:"\ud83c\udd96",o2:"\ud83c\udd7e\ufe0f",ok:"\ud83c\udd97",parking:"\ud83c\udd7f\ufe0f",sos:"\ud83c\udd98",up:"\ud83c\udd99",vs:"\ud83c\udd9a",koko:"\ud83c\ude01",sa:"\ud83c\ude02\ufe0f",u6708:"\ud83c\ude37\ufe0f",u6709:"\ud83c\ude36",u6307:"\ud83c\ude2f",ideograph_advantage:"\ud83c\ude50",u5272:"\ud83c\ude39",u7121:"\ud83c\ude1a",u7981:"\ud83c\ude32",accept:"\ud83c\ude51",u7533:"\ud83c\ude38",u5408:"\ud83c\ude34",u7a7a:"\ud83c\ude33",congratulations:"\u3297\ufe0f",secret:"\u3299\ufe0f",u55b6:"\ud83c\ude3a",u6e80:"\ud83c\ude35",red_circle:"\ud83d\udd34",orange_circle:"\ud83d\udfe0",yellow_circle:"\ud83d\udfe1",green_circle:"\ud83d\udfe2",large_blue_circle:"\ud83d\udd35",purple_circle:"\ud83d\udfe3",brown_circle:"\ud83d\udfe4",black_circle:"\u26ab",white_circle:"\u26aa",red_square:"\ud83d\udfe5",orange_square:"\ud83d\udfe7",yellow_square:"\ud83d\udfe8",green_square:"\ud83d\udfe9",blue_square:"\ud83d\udfe6",purple_square:"\ud83d\udfea",brown_square:"\ud83d\udfeb",black_large_square:"\u2b1b",white_large_square:"\u2b1c",black_medium_square:"\u25fc\ufe0f",white_medium_square:"\u25fb\ufe0f",black_medium_small_square:"\u25fe",white_medium_small_square:"\u25fd",black_small_square:"\u25aa\ufe0f",white_small_square:"\u25ab\ufe0f",large_orange_diamond:"\ud83d\udd36",large_blue_diamond:"\ud83d\udd37",small_orange_diamond:"\ud83d\udd38",small_blue_diamond:"\ud83d\udd39",small_red_triangle:"\ud83d\udd3a",small_red_triangle_down:"\ud83d\udd3b",diamond_shape_with_a_dot_inside:"\ud83d\udca0",radio_button:"\ud83d\udd18",white_square_button:"\ud83d\udd33",black_square_button:"\ud83d\udd32",checkered_flag:"\ud83c\udfc1",triangular_flag_on_post:"\ud83d\udea9",crossed_flags:"\ud83c\udf8c",black_flag:"\ud83c\udff4",white_flag:"\ud83c\udff3\ufe0f",rainbow_flag:"\ud83c\udff3\ufe0f\u200d\ud83c\udf08",transgender_flag:"\ud83c\udff3\ufe0f\u200d\u26a7\ufe0f",pirate_flag:"\ud83c\udff4\u200d\u2620\ufe0f",ascension_island:"\ud83c\udde6\ud83c\udde8",andorra:"\ud83c\udde6\ud83c\udde9",united_arab_emirates:"\ud83c\udde6\ud83c\uddea",afghanistan:"\ud83c\udde6\ud83c\uddeb",antigua_barbuda:"\ud83c\udde6\ud83c\uddec",anguilla:"\ud83c\udde6\ud83c\uddee",albania:"\ud83c\udde6\ud83c\uddf1",armenia:"\ud83c\udde6\ud83c\uddf2",angola:"\ud83c\udde6\ud83c\uddf4",antarctica:"\ud83c\udde6\ud83c\uddf6",argentina:"\ud83c\udde6\ud83c\uddf7",american_samoa:"\ud83c\udde6\ud83c\uddf8",austria:"\ud83c\udde6\ud83c\uddf9",australia:"\ud83c\udde6\ud83c\uddfa",aruba:"\ud83c\udde6\ud83c\uddfc",aland_islands:"\ud83c\udde6\ud83c\uddfd",azerbaijan:"\ud83c\udde6\ud83c\uddff",bosnia_herzegovina:"\ud83c\udde7\ud83c\udde6",barbados:"\ud83c\udde7\ud83c\udde7",bangladesh:"\ud83c\udde7\ud83c\udde9",belgium:"\ud83c\udde7\ud83c\uddea",burkina_faso:"\ud83c\udde7\ud83c\uddeb",bulgaria:"\ud83c\udde7\ud83c\uddec",bahrain:"\ud83c\udde7\ud83c\udded",burundi:"\ud83c\udde7\ud83c\uddee",benin:"\ud83c\udde7\ud83c\uddef",st_barthelemy:"\ud83c\udde7\ud83c\uddf1",bermuda:"\ud83c\udde7\ud83c\uddf2",brunei:"\ud83c\udde7\ud83c\uddf3",bolivia:"\ud83c\udde7\ud83c\uddf4",caribbean_netherlands:"\ud83c\udde7\ud83c\uddf6",brazil:"\ud83c\udde7\ud83c\uddf7",bahamas:"\ud83c\udde7\ud83c\uddf8",bhutan:"\ud83c\udde7\ud83c\uddf9",bouvet_island:"\ud83c\udde7\ud83c\uddfb",botswana:"\ud83c\udde7\ud83c\uddfc",belarus:"\u2b1c\ufe0f\ud83d\udfe5\u2b1c",belize:"\ud83c\udde7\ud83c\uddff",canada:"\ud83c\udde8\ud83c\udde6",cocos_islands:"\ud83c\udde8\ud83c\udde8",congo_kinshasa:"\ud83c\udde8\ud83c\udde9",central_african_republic:"\ud83c\udde8\ud83c\uddeb",congo_brazzaville:"\ud83c\udde8\ud83c\uddec",switzerland:"\ud83c\udde8\ud83c\udded",cote_divoire:"\ud83c\udde8\ud83c\uddee",cook_islands:"\ud83c\udde8\ud83c\uddf0",chile:"\ud83c\udde8\ud83c\uddf1",cameroon:"\ud83c\udde8\ud83c\uddf2",cn:"\ud83c\udde8\ud83c\uddf3",colombia:"\ud83c\udde8\ud83c\uddf4",clipperton_island:"\ud83c\udde8\ud83c\uddf5",costa_rica:"\ud83c\udde8\ud83c\uddf7",cuba:"\ud83c\udde8\ud83c\uddfa",cape_verde:"\ud83c\udde8\ud83c\uddfb",curacao:"\ud83c\udde8\ud83c\uddfc",christmas_island:"\ud83c\udde8\ud83c\uddfd",cyprus:"\ud83c\udde8\ud83c\uddfe",czech_republic:"\ud83c\udde8\ud83c\uddff",de:"\ud83c\udde9\ud83c\uddea",diego_garcia:"\ud83c\udde9\ud83c\uddec",djibouti:"\ud83c\udde9\ud83c\uddef",denmark:"\ud83c\udde9\ud83c\uddf0",dominica:"\ud83c\udde9\ud83c\uddf2",dominican_republic:"\ud83c\udde9\ud83c\uddf4",algeria:"\ud83c\udde9\ud83c\uddff",ceuta_melilla:"\ud83c\uddea\ud83c\udde6",ecuador:"\ud83c\uddea\ud83c\udde8",estonia:"\ud83c\uddea\ud83c\uddea",egypt:"\ud83c\uddea\ud83c\uddec",western_sahara:"\ud83c\uddea\ud83c\udded",eritrea:"\ud83c\uddea\ud83c\uddf7",es:"\ud83c\uddea\ud83c\uddf8",ethiopia:"\ud83c\uddea\ud83c\uddf9",eu:"\ud83c\uddea\ud83c\uddfa",european_union:"\ud83c\uddea\ud83c\uddfa",finland:"\ud83c\uddeb\ud83c\uddee",fiji:"\ud83c\uddeb\ud83c\uddef",falkland_islands:"\ud83c\uddeb\ud83c\uddf0",micronesia:"\ud83c\uddeb\ud83c\uddf2",faroe_islands:"\ud83c\uddeb\ud83c\uddf4",fr:"\ud83c\uddeb\ud83c\uddf7",gabon:"\ud83c\uddec\ud83c\udde6",gb:"\ud83c\uddec\ud83c\udde7",uk:"\ud83c\uddec\ud83c\udde7",grenada:"\ud83c\uddec\ud83c\udde9",georgia:"\ud83c\uddec\ud83c\uddea",french_guiana:"\ud83c\uddec\ud83c\uddeb",guernsey:"\ud83c\uddec\ud83c\uddec",ghana:"\ud83c\uddec\ud83c\udded",gibraltar:"\ud83c\uddec\ud83c\uddee",greenland:"\ud83c\uddec\ud83c\uddf1",gambia:"\ud83c\uddec\ud83c\uddf2",guinea:"\ud83c\uddec\ud83c\uddf3",guadeloupe:"\ud83c\uddec\ud83c\uddf5",equatorial_guinea:"\ud83c\uddec\ud83c\uddf6",greece:"\ud83c\uddec\ud83c\uddf7",south_georgia_south_sandwich_islands:"\ud83c\uddec\ud83c\uddf8",guatemala:"\ud83c\uddec\ud83c\uddf9",guam:"\ud83c\uddec\ud83c\uddfa",guinea_bissau:"\ud83c\uddec\ud83c\uddfc",guyana:"\ud83c\uddec\ud83c\uddfe",hong_kong:"\ud83c\udded\ud83c\uddf0",heard_mcdonald_islands:"\ud83c\udded\ud83c\uddf2",honduras:"\ud83c\udded\ud83c\uddf3",croatia:"\ud83c\udded\ud83c\uddf7",haiti:"\ud83c\udded\ud83c\uddf9",hungary:"\ud83c\udded\ud83c\uddfa",canary_islands:"\ud83c\uddee\ud83c\udde8",indonesia:"\ud83c\uddee\ud83c\udde9",ireland:"\ud83c\uddee\ud83c\uddea",israel:"\ud83c\uddee\ud83c\uddf1",isle_of_man:"\ud83c\uddee\ud83c\uddf2",india:"\ud83c\uddee\ud83c\uddf3",british_indian_ocean_territory:"\ud83c\uddee\ud83c\uddf4",iraq:"\ud83c\uddee\ud83c\uddf6",iran:"\ud83c\uddee\ud83c\uddf7",iceland:"\ud83c\uddee\ud83c\uddf8",it:"\ud83c\uddee\ud83c\uddf9",jersey:"\ud83c\uddef\ud83c\uddea",jamaica:"\ud83c\uddef\ud83c\uddf2",jordan:"\ud83c\uddef\ud83c\uddf4",jp:"\ud83c\uddef\ud83c\uddf5",kenya:"\ud83c\uddf0\ud83c\uddea",kyrgyzstan:"\ud83c\uddf0\ud83c\uddec",cambodia:"\ud83c\uddf0\ud83c\udded",kiribati:"\ud83c\uddf0\ud83c\uddee",comoros:"\ud83c\uddf0\ud83c\uddf2",st_kitts_nevis:"\ud83c\uddf0\ud83c\uddf3",north_korea:"\ud83c\uddf0\ud83c\uddf5",kr:"\ud83c\uddf0\ud83c\uddf7",kuwait:"\ud83c\uddf0\ud83c\uddfc",cayman_islands:"\ud83c\uddf0\ud83c\uddfe",kazakhstan:"\ud83c\uddf0\ud83c\uddff",laos:"\ud83c\uddf1\ud83c\udde6",lebanon:"\ud83c\uddf1\ud83c\udde7",st_lucia:"\ud83c\uddf1\ud83c\udde8",liechtenstein:"\ud83c\uddf1\ud83c\uddee",sri_lanka:"\ud83c\uddf1\ud83c\uddf0",liberia:"\ud83c\uddf1\ud83c\uddf7",lesotho:"\ud83c\uddf1\ud83c\uddf8",lithuania:"\ud83c\uddf1\ud83c\uddf9",luxembourg:"\ud83c\uddf1\ud83c\uddfa",latvia:"\ud83c\uddf1\ud83c\uddfb",libya:"\ud83c\uddf1\ud83c\uddfe",morocco:"\ud83c\uddf2\ud83c\udde6",monaco:"\ud83c\uddf2\ud83c\udde8",moldova:"\ud83c\uddf2\ud83c\udde9",montenegro:"\ud83c\uddf2\ud83c\uddea",st_martin:"\ud83c\uddf2\ud83c\uddeb",madagascar:"\ud83c\uddf2\ud83c\uddec",marshall_islands:"\ud83c\uddf2\ud83c\udded",macedonia:"\ud83c\uddf2\ud83c\uddf0",mali:"\ud83c\uddf2\ud83c\uddf1",myanmar:"\ud83c\uddf2\ud83c\uddf2",mongolia:"\ud83c\uddf2\ud83c\uddf3",macau:"\ud83c\uddf2\ud83c\uddf4",northern_mariana_islands:"\ud83c\uddf2\ud83c\uddf5",martinique:"\ud83c\uddf2\ud83c\uddf6",mauritania:"\ud83c\uddf2\ud83c\uddf7",montserrat:"\ud83c\uddf2\ud83c\uddf8",malta:"\ud83c\uddf2\ud83c\uddf9",mauritius:"\ud83c\uddf2\ud83c\uddfa",maldives:"\ud83c\uddf2\ud83c\uddfb",malawi:"\ud83c\uddf2\ud83c\uddfc",mexico:"\ud83c\uddf2\ud83c\uddfd",malaysia:"\ud83c\uddf2\ud83c\uddfe",mozambique:"\ud83c\uddf2\ud83c\uddff",namibia:"\ud83c\uddf3\ud83c\udde6",new_caledonia:"\ud83c\uddf3\ud83c\udde8",niger:"\ud83c\uddf3\ud83c\uddea",norfolk_island:"\ud83c\uddf3\ud83c\uddeb",nigeria:"\ud83c\uddf3\ud83c\uddec",nicaragua:"\ud83c\uddf3\ud83c\uddee",netherlands:"\ud83c\uddf3\ud83c\uddf1",norway:"\ud83c\uddf3\ud83c\uddf4",nepal:"\ud83c\uddf3\ud83c\uddf5",nauru:"\ud83c\uddf3\ud83c\uddf7",niue:"\ud83c\uddf3\ud83c\uddfa",new_zealand:"\ud83c\uddf3\ud83c\uddff",oman:"\ud83c\uddf4\ud83c\uddf2",panama:"\ud83c\uddf5\ud83c\udde6",peru:"\ud83c\uddf5\ud83c\uddea",french_polynesia:"\ud83c\uddf5\ud83c\uddeb",papua_new_guinea:"\ud83c\uddf5\ud83c\uddec",philippines:"\ud83c\uddf5\ud83c\udded",pakistan:"\ud83c\uddf5\ud83c\uddf0",poland:"\ud83c\uddf5\ud83c\uddf1",st_pierre_miquelon:"\ud83c\uddf5\ud83c\uddf2",pitcairn_islands:"\ud83c\uddf5\ud83c\uddf3",puerto_rico:"\ud83c\uddf5\ud83c\uddf7",palestinian_territories:"\ud83c\uddf5\ud83c\uddf8",portugal:"\ud83c\uddf5\ud83c\uddf9",palau:"\ud83c\uddf5\ud83c\uddfc",paraguay:"\ud83c\uddf5\ud83c\uddfe",qatar:"\ud83c\uddf6\ud83c\udde6",reunion:"\ud83c\uddf7\ud83c\uddea",romania:"\ud83c\uddf7\ud83c\uddf4",serbia:"\ud83c\uddf7\ud83c\uddf8",ru:"\ud83c\uddf7\ud83c\uddfa",rwanda:"\ud83c\uddf7\ud83c\uddfc",saudi_arabia:"\ud83c\uddf8\ud83c\udde6",solomon_islands:"\ud83c\uddf8\ud83c\udde7",seychelles:"\ud83c\uddf8\ud83c\udde8",sudan:"\ud83c\uddf8\ud83c\udde9",sweden:"\ud83c\uddf8\ud83c\uddea",singapore:"\ud83c\uddf8\ud83c\uddec",st_helena:"\ud83c\uddf8\ud83c\udded",slovenia:"\ud83c\uddf8\ud83c\uddee",svalbard_jan_mayen:"\ud83c\uddf8\ud83c\uddef",slovakia:"\ud83c\uddf8\ud83c\uddf0",sierra_leone:"\ud83c\uddf8\ud83c\uddf1",san_marino:"\ud83c\uddf8\ud83c\uddf2",senegal:"\ud83c\uddf8\ud83c\uddf3",somalia:"\ud83c\uddf8\ud83c\uddf4",suriname:"\ud83c\uddf8\ud83c\uddf7",south_sudan:"\ud83c\uddf8\ud83c\uddf8",sao_tome_principe:"\ud83c\uddf8\ud83c\uddf9",el_salvador:"\ud83c\uddf8\ud83c\uddfb",sint_maarten:"\ud83c\uddf8\ud83c\uddfd",syria:"\ud83c\uddf8\ud83c\uddfe",swaziland:"\ud83c\uddf8\ud83c\uddff",tristan_da_cunha:"\ud83c\uddf9\ud83c\udde6",turks_caicos_islands:"\ud83c\uddf9\ud83c\udde8",chad:"\ud83c\uddf9\ud83c\udde9",french_southern_territories:"\ud83c\uddf9\ud83c\uddeb",togo:"\ud83c\uddf9\ud83c\uddec",thailand:"\ud83c\uddf9\ud83c\udded",tajikistan:"\ud83c\uddf9\ud83c\uddef",tokelau:"\ud83c\uddf9\ud83c\uddf0",timor_leste:"\ud83c\uddf9\ud83c\uddf1",turkmenistan:"\ud83c\uddf9\ud83c\uddf2",tunisia:"\ud83c\uddf9\ud83c\uddf3",tonga:"\ud83c\uddf9\ud83c\uddf4",tr:"\ud83c\uddf9\ud83c\uddf7",trinidad_tobago:"\ud83c\uddf9\ud83c\uddf9",tuvalu:"\ud83c\uddf9\ud83c\uddfb",taiwan:"\ud83c\uddf9\ud83c\uddfc",tanzania:"\ud83c\uddf9\ud83c\uddff",ukraine:"\ud83c\uddfa\ud83c\udde6",uganda:"\ud83c\uddfa\ud83c\uddec",us_outlying_islands:"\ud83c\uddfa\ud83c\uddf2",united_nations:"\ud83c\uddfa\ud83c\uddf3",us:"\ud83c\uddfa\ud83c\uddf8",uruguay:"\ud83c\uddfa\ud83c\uddfe",uzbekistan:"\ud83c\uddfa\ud83c\uddff",vatican_city:"\ud83c\uddfb\ud83c\udde6",st_vincent_grenadines:"\ud83c\uddfb\ud83c\udde8",venezuela:"\ud83c\uddfb\ud83c\uddea",british_virgin_islands:"\ud83c\uddfb\ud83c\uddec",us_virgin_islands:"\ud83c\uddfb\ud83c\uddee",vietnam:"\ud83c\uddfb\ud83c\uddf3",vanuatu:"\ud83c\uddfb\ud83c\uddfa",wallis_futuna:"\ud83c\uddfc\ud83c\uddeb",samoa:"\ud83c\uddfc\ud83c\uddf8",kosovo:"\ud83c\uddfd\ud83c\uddf0",yemen:"\ud83c\uddfe\ud83c\uddea",mayotte:"\ud83c\uddfe\ud83c\uddf9",south_africa:"\ud83c\uddff\ud83c\udde6",zambia:"\ud83c\uddff\ud83c\uddf2",zimbabwe:"\ud83c\uddff\ud83c\uddfc",england:"\ud83c\udff4\udb40\udc67\udb40\udc62\udb40\udc65\udb40\udc6e\udb40\udc67\udb40\udc7f",scotland:"\ud83c\udff4\udb40\udc67\udb40\udc62\udb40\udc73\udb40\udc63\udb40\udc74\udb40\udc7f",wales:"\ud83c\udff4\udb40\udc67\udb40\udc62\udb40\udc77\udb40\udc6c\udb40\udc73\udb40\udc7f"},renderer:e=>e.emoji}));const Rd=()=>{const[e,n]=(0,t.useState)(!1);return mt(pt.FK,{children:mt(Pe,{children:mt(kr,{children:mt(pt.FK,{children:[mt(Nr,{onLoaded:n}),e&&mt(ke,{children:mt(be,{path:"/",element:mt(Dd,{}),children:mt(be,{path:"/",element:mt(iu,{})})})})]})})})})},Ld=e=>{e&&n.e(685).then(n.bind(n,685)).then((t=>{let{onCLS:n,onINP:r,onFCP:o,onLCP:a,onTTFB:i}=t;n(e),r(e),o(e),a(e),i(e)}))},Id=document.getElementById("root");Id&&(0,t.render)(mt(Rd,{}),Id),Ld()})()})(); \ No newline at end of file diff --git a/app/vmselect/vmui/asset-manifest.json b/app/vmselect/vmui/asset-manifest.json index 7e8af606f..3b827eeff 100644 --- a/app/vmselect/vmui/asset-manifest.json +++ b/app/vmselect/vmui/asset-manifest.json @@ -1,13 +1,13 @@ { "files": { - "main.css": "./static/css/main.81c6ec3a.css", - "main.js": "./static/js/main.0e69b7a9.js", + "main.css": "./static/css/main.d871147a.css", + "main.js": "./static/js/main.621c4b4d.js", "static/js/685.f772060c.chunk.js": "./static/js/685.f772060c.chunk.js", "static/media/MetricsQL.md": "./static/media/MetricsQL.a00044c91d9781cf8557.md", "index.html": "./index.html" }, "entrypoints": [ - "static/css/main.81c6ec3a.css", - "static/js/main.0e69b7a9.js" + "static/css/main.d871147a.css", + "static/js/main.621c4b4d.js" ] } \ No newline at end of file diff --git a/app/vmselect/vmui/index.html b/app/vmselect/vmui/index.html index 5ba5ccf32..c886e92f8 100644 --- a/app/vmselect/vmui/index.html +++ b/app/vmselect/vmui/index.html @@ -1 +1 @@ -vmui
    \ No newline at end of file +vmui
    \ No newline at end of file diff --git a/app/vmselect/vmui/static/css/main.81c6ec3a.css b/app/vmselect/vmui/static/css/main.d871147a.css similarity index 52% rename from app/vmselect/vmui/static/css/main.81c6ec3a.css rename to app/vmselect/vmui/static/css/main.d871147a.css index e35b661bd..9671d3b1b 100644 --- a/app/vmselect/vmui/static/css/main.81c6ec3a.css +++ b/app/vmselect/vmui/static/css/main.d871147a.css @@ -1 +1 @@ -.vm-tabs{gap:12px;height:100%;position:relative;-webkit-user-select:none;user-select:none}.vm-tabs,.vm-tabs-item{align-items:center;display:flex;justify-content:center}.vm-tabs-item{color:inherit;cursor:pointer;font-size:inherit;font-weight:inherit;opacity:.6;padding:12px 8px;text-decoration:none;text-transform:capitalize;transition:opacity .2s}.vm-tabs-item_active{opacity:1}.vm-tabs-item:hover{opacity:.8}.vm-tabs-item__icon{display:grid;margin-right:8px;width:16px}.vm-tabs-item__icon_single{margin-right:0}.vm-tabs__indicator{border-bottom:2px solid;position:absolute;transition:width .2s ease,left .3s cubic-bezier(.28,.84,.42,1)}.vm-alert{grid-gap:8px;align-items:center;background-color:var(--color-background-block);border-radius:8px;box-shadow:var(--box-shadow);color:var(--color-text);display:grid;font-size:14px;font-weight:400;gap:8px;grid-template-columns:20px 1fr;line-height:1.5;padding:12px;position:relative}.vm-alert_mobile{align-items:flex-start;border-radius:0}.vm-alert:after{border-radius:8px;content:"";height:100%;left:0;opacity:.1;position:absolute;top:0;width:100%;z-index:1}.vm-alert_mobile:after{border-radius:0}.vm-alert__content,.vm-alert__icon{position:relative;z-index:2}.vm-alert__icon{align-items:center;display:flex;justify-content:center}.vm-alert__content{filter:brightness(.6);white-space:pre-line}.vm-alert_success{color:var(--color-success)}.vm-alert_success:after{background-color:var(--color-success)}.vm-alert_error{color:var(--color-error)}.vm-alert_error:after{background-color:var(--color-error)}.vm-alert_info{color:var(--color-info)}.vm-alert_info:after{background-color:var(--color-info)}.vm-alert_warning{color:var(--color-warning)}.vm-alert_warning:after{background-color:var(--color-warning)}.vm-alert_dark:after{opacity:.1}.vm-alert_dark .vm-alert__content{filter:none}.vm-header{align-items:center;display:flex;flex-wrap:wrap;gap:0 16px;justify-content:flex-start;min-height:51px;padding:8px 12px;z-index:99}.vm-header_app{padding:8px 0}@media(max-width:1000px){.vm-header{gap:8px;padding:8px;position:-webkit-sticky;position:sticky;top:0}}.vm-header_sidebar{display:grid;grid-template-columns:40px auto 1fr}.vm-header_mobile{display:grid;grid-template-columns:33px 1fr 33px;justify-content:space-between}.vm-header_dark .vm-header-button,.vm-header_dark button,.vm-header_dark button:before{background-color:var(--color-background-block)}.vm-header-logo{align-items:center;cursor:pointer;display:flex;justify-content:flex-start;margin-bottom:2px;overflow:hidden;position:relative;width:100%}.vm-header-logo,.vm-header-logo svg,.vm-header-logo_mobile{max-width:65px;min-width:65px}.vm-header-logo_mobile{margin:0 auto}.vm-header-logo_logs,.vm-header-logo_logs svg{max-width:75px;min-width:75px}.vm-header-nav{align-items:center;display:flex;gap:12px;justify-content:flex-start}.vm-header-nav_column{align-items:stretch;flex-direction:column;gap:8px}.vm-header-nav_column .vm-header-nav-item{padding:12px 0}.vm-header-nav_column .vm-header-nav-item_sub{justify-content:stretch}.vm-header-nav-item{cursor:pointer;font-size:14px;font-weight:400;opacity:1;padding:12px 8px;position:relative;text-transform:capitalize;transition:opacity .2s ease-in}.vm-header-nav-item_sub{grid-gap:4px;align-items:center;cursor:default;display:grid;gap:4px;grid-template-columns:auto 14px;justify-content:center}.vm-header-nav-item:hover{opacity:.7}.vm-header-nav-item_active{border-bottom:2px solid #110f0f33}.vm-header-nav-item svg{transform:rotate(0deg);transition:transform .2s ease-in}.vm-header-nav-item_open svg{transform:rotate(180deg)}.vm-header-nav-item-submenu{border-radius:4px;color:#fff;display:grid;opacity:1;padding:8px;transform-origin:top center;white-space:nowrap}.vm-header-nav-item-submenu-item{cursor:pointer}.vm-popper{background-color:var(--color-background-block);border-radius:4px;box-shadow:var(--box-shadow-popper);opacity:0;pointer-events:none;position:fixed;transition:opacity .1s ease-in-out;z-index:-99}.vm-popper_open{animation:vm-slider .15s cubic-bezier(.28,.84,.42,1.1);opacity:1;pointer-events:auto;transform-origin:top center;z-index:101}.vm-popper_mobile{animation:none;border-radius:0;bottom:0;left:0;overflow:auto;position:fixed;right:0;top:0;width:100%}.vm-popper-header{grid-gap:12px;align-items:center;background-color:var(--color-background-block);border-bottom:var(--border-divider);border-radius:4px 4px 0 0;color:var(--color-text);display:grid;gap:12px;grid-template-columns:1fr 25px;justify-content:space-between;margin-bottom:12px;padding:8px 12px}.vm-popper-header__title{font-size:12px;font-weight:700;-webkit-user-select:none;user-select:none}.vm-popper_dark{background-color:var(--color-background-tooltip);color:#fff}.vm-popper_dark .vm-popper-header{background-color:#0000;color:#fff}@keyframes vm-slider{0%{transform:scaleY(0)}to{transform:scaleY(1)}}.vm-modal{align-items:center;background:#110f0f8c;bottom:0;display:flex;justify-content:center;left:0;position:fixed;right:0;top:0;z-index:100}.vm-modal_mobile{align-items:flex-start;max-height:calc(var(--vh)*100);min-height:calc(var(--vh)*100);overflow:auto}.vm-modal_mobile .vm-modal-content{border-radius:0;grid-template-rows:70px -webkit-max-content;grid-template-rows:70px max-content;max-height:-webkit-max-content;max-height:max-content;min-height:100%;overflow:visible;width:100vw}.vm-modal_mobile .vm-modal-content-header{margin-bottom:12px;padding:8px 8px 8px 12px}.vm-modal_mobile .vm-modal-content-header__title{max-width:80vw}.vm-modal_mobile .vm-modal-content-body{align-items:flex-start;display:grid;min-height:100%;padding:0 12px 12px}.vm-modal-content{background:var(--color-background-block);border-radius:4px;box-shadow:0 0 24px #110f0f12;max-height:calc(var(--vh)*90);overflow:auto}.vm-modal-content-header{grid-gap:8px;align-items:center;background-color:var(--color-background-block);border-bottom:var(--border-divider);border-radius:4px 4px 0 0;color:var(--color-text);display:grid;gap:8px;grid-template-columns:1fr auto;justify-content:space-between;margin-bottom:12px;min-height:51px;padding:12px;position:-webkit-sticky;position:sticky;top:0;z-index:3}.vm-modal-content-header__title{font-weight:700;max-width:50vw;overflow:hidden;text-overflow:ellipsis;-webkit-user-select:none;user-select:none;white-space:nowrap}.vm-modal-content-header__close{align-items:center;box-sizing:initial;color:#fff;cursor:pointer;display:flex;justify-content:center;padding:10px;width:24px}.vm-modal-content-body{padding:0 12px 12px}.vm-shortcuts{min-width:400px}@media(max-width:500px){.vm-shortcuts{min-width:100%}}.vm-shortcuts-section{border-bottom:var(--border-divider);margin-bottom:12px;padding-bottom:12px;position:relative}.vm-shortcuts-section__title{font-weight:700;margin-bottom:12px}.vm-shortcuts-section__read-more{position:absolute;right:0;top:-8px}.vm-shortcuts-section-list{grid-gap:12px;display:grid;gap:12px}@media(max-width:500px){.vm-shortcuts-section-list{gap:12px}}.vm-shortcuts-section-list-item{grid-gap:8px;align-items:center;display:grid;gap:8px;grid-template-columns:210px 1fr}@media(max-width:500px){.vm-shortcuts-section-list-item{grid-template-columns:1fr}}.vm-shortcuts-section-list-item__key{align-items:center;display:flex;gap:4px}.vm-shortcuts-section-list-item__key code,.vm-shortcuts-section-list-item__key svg{background-color:var(--color-background-body);background-repeat:repeat-x;border:var(--border-divider);border-radius:4px;color:var(--color-text);display:inline-block;font-size:12px;line-height:2;padding:2px 8px 0;text-align:center}.vm-shortcuts-section-list-item__key svg{color:var(--color-primary);padding:4px;width:24px}.vm-shortcuts-section-list-item__description{font-size:14px}.vm-tooltip{animation:vm-scale .15s cubic-bezier(.28,.84,.42,1);background-color:var(--color-background-tooltip);border-radius:4px;box-shadow:var(--box-shadow-popper);color:#fff;font-size:12px;line-height:150%;opacity:1;padding:3px 8px;pointer-events:auto;position:fixed;transition:opacity .1s ease-in-out;white-space:nowrap;z-index:101}@keyframes vm-scale{0%{transform:scale(0)}to{transform:scale(1)}}.fc-graph-tips{grid-gap:12px;display:grid;gap:12px;max-width:520px}.fc-graph-tips-item{grid-gap:8px;border-bottom:var(--border-divider);display:grid;gap:8px;line-height:1.3;padding-bottom:12px}.fc-graph-tips-item__action{color:var(--color-text-secondary);font-weight:700}.fc-graph-tips-item__description{display:inline-block;line-height:1.5}.fc-graph-tips-item__description code,.fc-graph-tips-item__description svg{align-items:center;background-color:var(--color-background-body);border:var(--border-divider);border-radius:4px;color:var(--color-text);display:inline-flex;font-size:12px;justify-content:center;margin:0 2px 2px;min-height:20px;min-width:20px;padding:0 4px}.fc-graph-tips-item svg{color:var(--color-primary);margin-top:-8px;padding:2px;transform:translateY(8px);width:18px}.vm-menu-burger{background:none;border:none;cursor:pointer;height:18px;outline:none;padding:0;position:relative;transform-style:preserve-3d;width:18px}.vm-menu-burger:after{background-color:#110f0f1a;border-radius:50%;content:"";height:calc(100% + 12px);left:-6px;position:absolute;top:-6px;transform:scale(0) translateZ(-2px);transition:transform .14s ease-in-out;width:calc(100% + 12px)}.vm-menu-burger:hover:after{transform:scale(1) translateZ(-2px)}.vm-menu-burger span{border-top:2px solid #fff;display:block;top:50%;transform:translateY(-50%);transition:transform .3s ease,border-color .3s ease}.vm-menu-burger span,.vm-menu-burger span:after,.vm-menu-burger span:before{border-radius:6px;height:2px;left:0;position:absolute;width:100%}.vm-menu-burger span:after,.vm-menu-burger span:before{animation-duration:.6s;animation-fill-mode:forwards;animation-timing-function:cubic-bezier(.645,.045,.355,1);background:#fff;content:"";top:0}.vm-menu-burger span:before{animation-name:topLineBurger}.vm-menu-burger span:after{animation-name:bottomLineBurger}.vm-menu-burger_opened span{border-color:#0000}.vm-menu-burger_opened span:before{animation-name:topLineCross}.vm-menu-burger_opened span:after{animation-name:bottomLineCross}@keyframes topLineCross{0%{transform:translateY(-7px)}50%{transform:translateY(0)}to{transform:translateY(-2px) translateX(30%) rotate(45deg);width:60%}}@keyframes bottomLineCross{0%{transform:translateY(3px)}50%{transform:translateY(0)}to{transform:translateY(-2px) translateX(30%) rotate(-45deg);width:60%}}@keyframes topLineBurger{0%{transform:translateY(0) rotate(45deg)}50%{transform:rotate(0deg)}to{transform:translateY(-7px) rotate(0deg)}}@keyframes bottomLineBurger{0%{transform:translateY(0) rotate(-45deg)}50%{transform:rotate(0deg)}to{transform:translateY(3px) rotate(0deg)}}.vm-header-sidebar{background-color:inherit;color:inherit;height:24px;width:24px}.vm-header-sidebar-button{align-items:center;display:flex;height:51px;justify-content:center;left:0;position:absolute;top:0;transition:left .35s cubic-bezier(.28,.84,.42,1);width:51px}.vm-header-sidebar-button_open{left:149px;position:fixed;z-index:102}.vm-header-sidebar-menu{grid-gap:12px;background-color:inherit;box-shadow:var(--box-shadow-popper);display:grid;gap:12px;grid-template-rows:1fr auto;height:100%;left:0;padding:12px;position:fixed;top:0;transform:translateX(-100%);transform-origin:left;transition:transform .3s cubic-bezier(.28,.84,.42,1);width:200px;z-index:101}.vm-header-sidebar-menu_open{transform:translateX(0)}.vm-header-sidebar-menu__logo{align-items:center;cursor:pointer;display:flex;justify-content:flex-start;position:relative;width:65px}.vm-header-sidebar-menu-settings{grid-gap:8px;align-items:center;display:grid;gap:8px}.vm-header-controls{align-items:center;display:flex;flex-grow:1;gap:8px;justify-content:flex-end}.vm-header-controls_mobile{display:grid;grid-template-columns:1fr;padding:0}.vm-header-controls_mobile .vm-header-button{border:none}.vm-header-controls-modal{transform:scale(0)}.vm-header-controls-modal_open{transform:scale(1)}.vm-container{display:flex;flex-direction:column;min-height:calc(var(--vh)*100 - var(--scrollbar-height))}.vm-container-body{background-color:var(--color-background-body);flex-grow:1;min-height:100%;padding:12px}.vm-container-body_mobile{padding:8px 0 0}@media(max-width:768px){.vm-container-body{padding:8px 0 0}}.vm-container-body_app{background-color:#0000;padding:8px 0}.vm-footer{align-items:center;background:var(--color-background-body);border-top:var(--border-divider);color:var(--color-text-secondary);display:flex;flex-wrap:wrap;gap:12px;justify-content:center;padding:12px}@media(max-width:768px){.vm-footer{gap:12px;padding:12px}}.vm-footer__link,.vm-footer__website{grid-gap:6px;align-items:center;display:grid;gap:6px;grid-template-columns:12px auto;justify-content:center}.vm-footer__website{margin-right:12px}@media(max-width:768px){.vm-footer__website{margin-right:0}}.vm-footer__link{grid-template-columns:14px auto}.vm-footer__copyright{flex-grow:1;text-align:right}@media(max-width:768px){.vm-footer__copyright{font-size:12px;text-align:center;width:100%}}.vm-tenant-input{position:relative}.vm-tenant-input-list{border-radius:8px;max-height:300px;overflow:auto;overscroll-behavior:none}.vm-tenant-input-list_mobile{max-height:calc(var(--vh)*100 - 70px)}.vm-tenant-input-list_mobile .vm-tenant-input-list__search{padding:0 12px 8px}.vm-tenant-input-list_inline{grid-gap:4px;display:grid;gap:4px;padding:12px}.vm-tenant-input-list__search{background-color:var(--color-background-block);padding:8px 12px;position:-webkit-sticky;position:sticky;top:0}.vm-tenant-input-list__buttons{display:flex;gap:8px;justify-content:space-between}.vm-text-field{display:grid;margin:6px 0;position:relative;width:100%}.vm-text-field_textarea:after{content:attr(data-replicated-value) " ";overflow-wrap:break-word;visibility:hidden;white-space:pre-wrap}.vm-text-field:after,.vm-text-field__input{background-color:#0000;border:var(--border-divider);box-sizing:border-box;font-family:monospace;font-size:14px;grid-area:1/1/2/2;line-height:18px;overflow:hidden;padding:8px 12px;width:100%}.vm-text-field__error,.vm-text-field__helper-text,.vm-text-field__label,.vm-text-field__warning{-webkit-line-clamp:1;line-clamp:1;-webkit-box-orient:vertical;background-color:var(--color-background-block);display:-webkit-box;font-size:12px;left:6px;line-height:14px;max-width:calc(100% - 12px);overflow:hidden;padding:0 3px;pointer-events:none;position:absolute;text-overflow:ellipsis;-webkit-user-select:none;user-select:none;z-index:2}.vm-text-field__label{color:var(--color-text-secondary);top:-8px}.vm-text-field__error,.vm-text-field__helper-text,.vm-text-field__warning{overflow-wrap:anywhere;pointer-events:auto;position:relative;top:-6px;-webkit-user-select:text;user-select:text;width:-webkit-fit-content;width:-moz-fit-content;width:fit-content}.vm-text-field__error_full,.vm-text-field__helper-text_full,.vm-text-field__warning_full{display:block;overflow:visible}.vm-text-field__error_overflowed,.vm-text-field__helper-text_overflowed,.vm-text-field__warning_overflowed{cursor:pointer}.vm-text-field__error{color:var(--color-error)}.vm-text-field__warning{color:var(--color-warning)}.vm-text-field__helper-text{color:var(--color-text-secondary)}.vm-text-field__input{background-color:#0000;border-radius:4px;color:var(--color-text);display:block;overflow:hidden;resize:none;transition:border .2s ease}.vm-text-field__input:focus,.vm-text-field__input:hover{border:1px solid var(--color-primary)}.vm-text-field__input_error,.vm-text-field__input_error:focus,.vm-text-field__input_error:hover{border-color:var(--color-error)}.vm-text-field__input_warning,.vm-text-field__input_warning:focus,.vm-text-field__input_warning:hover{border-color:var(--color-warning)}.vm-text-field__input_icon-start{padding-left:31px}.vm-text-field__input:disabled{background-color:inherit;color:inherit}.vm-text-field__input:disabled:hover{border-color:var(--color-text-disabled)}.vm-text-field__icon-end,.vm-text-field__icon-start{align-items:center;color:var(--color-text-secondary);display:flex;height:40px;justify-content:center;left:8px;max-width:15px;position:absolute;top:0}.vm-text-field__icon-end{left:auto;right:8px}.vm-text-field__controls-info{bottom:8px;color:var(--color-text-secondary);font-size:12px;opacity:.8;position:absolute;right:12px}.vm-step-control{display:inline-flex}.vm-step-control button{text-transform:none}.vm-step-control__value{display:inline;margin-left:3px}.vm-step-control-popper{grid-gap:8px;display:grid;font-size:14px;gap:8px;max-height:208px;max-width:300px;overflow:auto;padding:12px}.vm-step-control-popper_mobile{max-height:calc(var(--vh)*100 - 70px);max-width:100%;padding:0 12px 8px}.vm-step-control-popper_mobile .vm-step-control-popper-info{font-size:14px}.vm-step-control-popper-info{font-size:12px;line-height:1.8}.vm-step-control-popper-info a{margin:0 .4em}.vm-step-control-popper-info code{background-color:var(--color-hover-black);border-radius:6px;margin:0 .2em;padding:.2em .4em}.vm-time-duration{font-size:14px;max-height:227px;overflow:auto}.vm-time-duration_mobile{max-height:100%}.vm-time-selector{display:grid;grid-template-columns:repeat(2,230px);padding:12px 0}.vm-time-selector_mobile{grid-template-columns:1fr;max-height:calc(var(--vh)*100 - 70px);min-width:250px;overflow:auto;width:100%}.vm-time-selector_mobile .vm-time-selector-left{border-bottom:var(--border-divider);border-right:none;padding-bottom:12px}.vm-time-selector-left{border-right:var(--border-divider);display:flex;flex-direction:column;gap:8px;padding:0 12px}.vm-time-selector-left-inputs{align-items:flex-start;display:grid;flex-grow:1;justify-content:stretch}.vm-time-selector-left-timezone{align-items:center;display:flex;font-size:12px;gap:8px;justify-content:space-between;margin-bottom:8px}.vm-time-selector-left-timezone__utc{align-items:center;background-color:var(--color-hover-black);border-radius:4px;display:inline-flex;justify-content:center;padding:4px}.vm-time-selector-left__controls{grid-gap:8px;display:grid;gap:8px;grid-template-columns:repeat(2,1fr)}.vm-calendar{background-color:var(--color-background-block);border-radius:8px;display:grid;font-size:14px;grid-template-rows:auto 1fr auto;padding:12px;-webkit-user-select:none;user-select:none}.vm-calendar_mobile{padding:0 12px}.vm-calendar-header{grid-gap:12px;align-items:center;display:grid;gap:12px;grid-template-columns:1fr auto;justify-content:center;min-height:36px;padding-bottom:12px}.vm-calendar-header-left{grid-gap:8px;align-items:center;cursor:pointer;display:grid;gap:8px;grid-template-columns:auto auto;justify-content:flex-start;transition:opacity .2s ease-in-out}.vm-calendar-header-left:hover{opacity:.8}.vm-calendar-header-left__date{color:var(--color-text);font-size:14px;font-weight:700}.vm-calendar-header-left__select-year{align-items:center;display:grid;height:14px;justify-content:center;width:14px}.vm-calendar-header-right{grid-gap:8px;align-items:center;display:grid;gap:8px;grid-template-columns:18px 18px;justify-content:center}.vm-calendar-header-right__next,.vm-calendar-header-right__prev{cursor:pointer;margin:-8px;padding:8px;transition:opacity .2s ease-in-out}.vm-calendar-header-right__next:hover,.vm-calendar-header-right__prev:hover{opacity:.8}.vm-calendar-header-right__prev{transform:rotate(90deg)}.vm-calendar-header-right__next{transform:rotate(-90deg)}.vm-calendar-body{grid-gap:2px;align-items:center;display:grid;gap:2px;grid-template-columns:repeat(7,32px);grid-template-rows:repeat(7,32px);justify-content:center}@media(max-width:500px){.vm-calendar-body{grid-template-columns:repeat(7,calc(14.28571vw - 5.14286px));grid-template-rows:repeat(7,calc(14.28571vw - 5.14286px))}}.vm-calendar-body-cell{align-items:center;border-radius:50%;display:flex;height:100%;justify-content:center;text-align:center}.vm-calendar-body-cell_weekday{color:var(--color-text-secondary)}.vm-calendar-body-cell_day{cursor:pointer;transition:color .2s ease,background-color .3s ease-in-out}.vm-calendar-body-cell_day:hover{background-color:var(--color-hover-black)}.vm-calendar-body-cell_day_empty{pointer-events:none}.vm-calendar-body-cell_day_active{color:#fff}.vm-calendar-body-cell_day_active,.vm-calendar-body-cell_day_active:hover{background-color:var(--color-primary)}.vm-calendar-body-cell_day_today{border:1px solid var(--color-primary)}.vm-calendar-years{grid-gap:8px;display:grid;gap:8px;grid-template-columns:repeat(3,1fr);max-height:400px;overflow:auto}.vm-calendar-years__year{align-items:center;border-radius:8px;cursor:pointer;display:flex;justify-content:center;padding:8px 16px;transition:color .2s ease,background-color .3s ease-in-out}.vm-calendar-years__year:hover{background-color:var(--color-hover-black)}.vm-calendar-years__year_selected{color:#fff}.vm-calendar-years__year_selected,.vm-calendar-years__year_selected:hover{background-color:var(--color-primary)}.vm-calendar-years__year_today{border:1px solid var(--color-primary)}.vm-calendar-footer{align-items:center;display:flex;justify-content:flex-end}.vm-date-time-input{grid-gap:8px 0;align-items:center;cursor:pointer;display:grid;gap:8px 0;grid-template-columns:1fr;justify-content:center;margin-bottom:12px;position:relative;transition:color .2s ease-in-out,border-bottom-color .3s ease}.vm-date-time-input:hover input{border-bottom-color:var(--color-primary)}.vm-date-time-input label{color:var(--color-text-secondary);font-size:12px;grid-column:1/3;-webkit-user-select:none;user-select:none;width:100%}.vm-date-time-input__icon{bottom:2px;position:absolute;right:0}.vm-date-time-input input{background:#0000;border:none;border-bottom:var(--border-divider);color:var(--color-text);padding:0 0 8px}.vm-date-time-input input:focus{border-bottom-color:var(--color-primary)}.vm-date-time-input_error input{border-color:var(--color-error)}.vm-date-time-input_error input:focus{border-bottom-color:var(--color-error)}.vm-date-time-input__error-text{bottom:-12px;color:var(--color-error);font-size:12px;left:0;position:absolute}.vm-button{align-items:center;border-radius:6px;color:#fff;cursor:pointer;display:flex;font-size:12px;font-weight:400;justify-content:center;line-height:15px;min-height:31px;padding:6px 14px;position:relative;text-transform:uppercase;transform-style:preserve-3d;-webkit-user-select:none;user-select:none;white-space:nowrap}.vm-button:hover:after{background-color:var(--color-hover-black)}.vm-button:after,.vm-button:before{border-radius:6px;content:"";height:100%;left:0;position:absolute;top:0;transition:background-color .2s ease;width:100%}.vm-button:before{transform:translateZ(-2px)}.vm-button:after{background-color:#0000;transform:translateZ(-1px)}.vm-button:active:after{transform:scale(.9)}.vm-button span{align-items:center;display:grid;justify-content:center;transform:translateZ(1px)}.vm-button span svg{width:15px}.vm-button__start-icon{margin-right:6px}.vm-button__end-icon{margin-left:6px}.vm-button_disabled{cursor:not-allowed;opacity:.3}.vm-button_icon{padding:6px 8px}.vm-button_icon .vm-button__end-icon,.vm-button_icon .vm-button__start-icon{margin:0}.vm-button_small{min-height:25px;padding:4px 8px}.vm-button_small span svg{width:13px}.vm-button_contained_primary{color:var(--color-primary-text)}.vm-button_contained_primary,.vm-button_contained_primary:before{background-color:var(--color-primary)}.vm-button_contained_primary:hover:after{background-color:#110f0f33}.vm-button_contained_secondary{color:var(--color-secondary-text)}.vm-button_contained_secondary:before{background-color:var(--color-secondary)}.vm-button_contained_secondary:hover:after{background-color:#110f0f33}.vm-button_contained_success{color:var(--color-success-text)}.vm-button_contained_success:before{background-color:var(--color-success)}.vm-button_contained_success:hover:after{background-color:#110f0f33}.vm-button_contained_error{color:var(--color-error-text)}.vm-button_contained_error:before{background-color:var(--color-error)}.vm-button_contained_gray{color:var(--color-text-secondary)}.vm-button_contained_gray:before{background-color:var(--color-text-secondary)}.vm-button_contained_warning{color:var(--color-warning)}.vm-button_contained_warning:before{background-color:var(--color-warning);opacity:.2}.vm-button_text_primary{color:var(--color-primary)}.vm-button_text_secondary{color:var(--color-secondary)}.vm-button_text_success{color:var(--color-success)}.vm-button_text_error{color:var(--color-error)}.vm-button_text_gray{color:var(--color-text-secondary)}.vm-button_text_white{color:#fff}.vm-button_text_warning{color:var(--color-warning)}.vm-button_outlined_primary{border:1px solid var(--color-primary);color:var(--color-primary)}.vm-button_outlined_error{border:1px solid var(--color-error);color:var(--color-error)}.vm-button_outlined_secondary{border:1px solid var(--color-secondary);color:var(--color-secondary)}.vm-button_outlined_success{border:1px solid var(--color-success);color:var(--color-success)}.vm-button_outlined_gray{border:1px solid var(--color-text-secondary);color:var(--color-text-secondary)}.vm-button_outlined_white{border:1px solid #fff;color:#fff}.vm-button_outlined_warning{border:1px solid var(--color-warning);color:var(--color-warning)}.vm-execution-controls-buttons{border-radius:7px;display:flex;justify-content:space-between;min-width:107px}.vm-execution-controls-buttons_mobile{flex-direction:column;gap:12px}.vm-execution-controls-buttons__arrow{align-items:center;display:flex;justify-content:center;transform:rotate(0);transition:transform .2s ease-in-out}.vm-execution-controls-buttons__arrow_open{transform:rotate(180deg)}.vm-execution-controls-list{font-size:14px;max-height:208px;overflow:auto;padding:8px 0;width:124px}.vm-execution-controls-list_mobile{max-height:calc(var(--vh)*100 - 70px);padding:0;width:100%}.vm-server-configurator{align-items:center;display:flex;flex-direction:column;gap:16px;padding-bottom:12px;width:600px}.vm-server-configurator_mobile{align-items:flex-start;grid-auto-rows:-webkit-min-content;grid-auto-rows:min-content;height:100%;width:100%}@media(max-width:768px){.vm-server-configurator{width:100%}}.vm-server-configurator__input{width:100%}.vm-server-configurator__input_flex{align-items:flex-start;display:flex;gap:12px}.vm-server-configurator__title{align-items:center;display:flex;font-size:14px;font-weight:700;grid-column:auto/span 2;justify-content:flex-start;margin-bottom:12px}.vm-server-configurator__info{color:var(--color-text-secondary);font-size:12px;line-height:130%;padding-top:8px}.vm-server-configurator-url{align-items:flex-start;display:flex;gap:8px}.vm-server-configurator-url__button{margin-top:8px}.vm-server-configurator-footer{align-items:center;display:flex;gap:8px;justify-content:flex-end;width:100%}.vm-server-configurator_mobile .vm-server-configurator-footer{display:grid;grid-template-columns:1fr 1fr}.vm-limits-configurator-title__reset{align-items:center;display:flex;flex-grow:1;justify-content:flex-end}.vm-limits-configurator__inputs{grid-gap:12px;align-items:center;display:grid;flex-wrap:wrap;gap:12px;grid-template-columns:repeat(auto-fit,minmax(150px,1fr));justify-content:space-between}.vm-limits-configurator__inputs_mobile{gap:8px}.vm-accordion-header{align-items:center;cursor:pointer;display:grid;font-size:inherit;position:relative}.vm-accordion-header__arrow{align-items:center;display:flex;justify-content:center;position:absolute;right:14px;top:auto;transform:rotate(0);transition:transform .2s ease-in-out}.vm-accordion-header__arrow_open{transform:rotate(180deg)}.vm-accordion-header__arrow svg{height:auto;width:14px}.accordion-section{overflow:hidden}.vm-timezones-item{align-items:center;cursor:pointer;display:flex;gap:8px;justify-content:space-between}.vm-timezones-item_selected{border:var(--border-divider);border-radius:4px;padding:8px 12px}.vm-timezones-item__title{align-items:center;display:flex;gap:8px;text-transform:capitalize}.vm-timezones-item__title svg{color:var(--color-warning);width:14px}.vm-timezones-item__utc{align-items:center;background-color:var(--color-hover-black);border-radius:4px;display:inline-flex;justify-content:center;padding:4px}.vm-timezones-item__icon{align-items:center;display:inline-flex;justify-content:flex-end;margin:0 0 0 auto;transition:transform .2s ease-in}.vm-timezones-item__icon svg{width:14px}.vm-timezones-item__icon_open{transform:rotate(180deg)}.vm-timezones-list{background-color:var(--color-background-block);border-radius:8px;max-height:300px;overflow:auto}.vm-timezones-list_mobile{max-height:calc(var(--vh)*100 - 70px)}.vm-timezones-list_mobile .vm-timezones-list-header__search{padding:0 12px}.vm-timezones-list-header{background-color:var(--color-background-block);border-bottom:var(--border-divider);position:-webkit-sticky;position:sticky;top:0;z-index:2}.vm-timezones-list-header__search{padding:8px}.vm-timezones-list-group{border-bottom:var(--border-divider);padding:8px 0}.vm-timezones-list-group:last-child{border-bottom:none}.vm-timezones-list-group__title{color:var(--color-text-secondary);font-weight:700;padding:8px 12px}.vm-timezones-list-group-options{align-items:flex-start;display:grid}.vm-timezones-list-group-options__item{padding:8px 12px;transition:background-color .2s ease}.vm-timezones-list-group-options__item:hover{background-color:#110f0f1a}.vm-theme-control__toggle{display:inline-flex;min-width:300px;text-transform:capitalize}.vm-theme-control_mobile .vm-theme-control__toggle{display:flex;min-width:100%}.vm-toggles{grid-gap:3px;display:grid;gap:3px;position:relative;width:100%}.vm-toggles__label{color:var(--color-text-secondary);font-size:12px;line-height:1;padding:0 12px}.vm-toggles-group{overflow:hidden;width:100%}.vm-toggles-group,.vm-toggles-group-item{align-items:center;display:grid;justify-content:center;position:relative}.vm-toggles-group-item{border-bottom:var(--border-divider);border-right:var(--border-divider);border-top:var(--border-divider);color:var(--color-text-secondary);cursor:pointer;font-size:12px;font-weight:700;padding:8px;text-align:center;transition:color .15s ease-in;-webkit-user-select:none;user-select:none;z-index:2}.vm-toggles-group-item_first{border-left:var(--border-divider);border-radius:16px 0 0 16px}.vm-toggles-group-item:last-child{border-left:none;border-radius:0 16px 16px 0}.vm-toggles-group-item_icon{gap:4px;grid-template-columns:14px auto}.vm-toggles-group-item:hover{color:var(--color-primary)}.vm-toggles-group-item_active{border-color:#0000;color:var(--color-primary)}.vm-toggles-group-item_active:hover{background-color:#0000}.vm-toggles-group__highlight{background-color:rgba(var(--color-primary),.08);border:1px solid var(--color-primary);height:100%;position:absolute;top:0;transition:left .2s cubic-bezier(.28,.84,.42,1),border-radius .2s linear;z-index:1}.vm-switch{align-items:center;cursor:pointer;display:flex;font-size:12px;justify-content:flex-start;-webkit-user-select:none;user-select:none}.vm-switch_full-width{flex-direction:row-reverse;justify-content:space-between}.vm-switch_full-width .vm-switch__label{margin-left:0}.vm-switch_disabled{cursor:default;opacity:.6}.vm-switch_secondary_active .vm-switch-track{background-color:var(--color-secondary)}.vm-switch_primary_active .vm-switch-track{background-color:var(--color-primary)}.vm-switch_active .vm-switch-track__thumb{left:20px}.vm-switch:hover .vm-switch-track{opacity:.8}.vm-switch-track{align-items:center;background-color:#110f0f66;border-radius:17px;display:flex;height:17px;justify-content:flex-start;padding:3px;position:relative;transition:background-color .2s ease,opacity .3s ease-out;width:34px}.vm-switch-track__thumb{background-color:var(--color-background-block);border-radius:50%;left:3px;min-height:11px;min-width:11px;position:absolute;top:auto;transform-style:preserve-3d;transition:right .2s ease-out,left .2s ease-out}.vm-switch__label{color:var(--color-text-secondary);font-size:inherit;margin-left:8px;transition:color .2s ease;white-space:nowrap}.vm-switch_active .vm-switch__label{color:var(--color-text)}.vm-autocomplete{max-height:300px;overflow:auto;overscroll-behavior:none;position:relative}.vm-autocomplete_mobile{max-height:calc(var(--vh)*100 - 70px)}.vm-autocomplete__no-options{color:var(--color-text-disabled);padding:12px;text-align:center}.vm-autocomplete__loader{grid-gap:8px;align-items:center;color:var(--color-text-secondary);display:grid;gap:8px;grid-template-columns:14px auto;justify-content:center;padding:12px;pointer-events:none;z-index:2}.vm-autocomplete__loader svg{animation:half-circle-spinner-animation 1s linear infinite,vm-fade .5s ease-in}.vm-autocomplete-info,.vm-autocomplete-message{background-color:var(--color-background-block);border-top:var(--border-divider);padding:12px}.vm-autocomplete-message{color:var(--color-warning);font-size:12px;position:relative}.vm-autocomplete-message:after{background:var(--color-warning);content:"";height:100%;left:0;opacity:.1;position:absolute;top:0;width:100%}.vm-autocomplete-info{max-width:500px;min-width:450px;overflow-wrap:anywhere}.vm-autocomplete-info__type{color:var(--color-text-secondary);margin-bottom:8px}.vm-autocomplete-info__description{line-height:130%}.vm-autocomplete-info__description p{margin:12px 0}.vm-autocomplete-info__description p:last-child{margin:0}.vm-query-editor{position:relative}.vm-query-editor .marker-detection{left:0;pointer-events:none;position:absolute;top:0;visibility:hidden;z-index:-9999}.vm-additional-settings{align-items:center;display:inline-flex;flex-wrap:wrap;gap:12px;justify-content:flex-start}.vm-additional-settings__input{flex-basis:160px;margin-bottom:-6px}.vm-additional-settings_mobile{align-items:flex-start;grid-template-columns:1fr;padding:0 12px;width:100%}.vm-additional-settings_mobile,.vm-query-configurator{grid-gap:12px;display:grid;gap:12px}.vm-query-configurator-list{display:grid}.vm-query-configurator-list-row{grid-gap:8px;align-items:center;display:grid;gap:8px;grid-template-columns:1fr auto auto auto}.vm-query-configurator-list-row_mobile{gap:4px}.vm-query-configurator-list-row_disabled{filter:grayscale(100%);opacity:.5}.vm-query-configurator-list-row__button{align-items:start;display:grid;min-height:36px;width:36px}.vm-query-configurator-settings{align-items:center;display:flex;flex-wrap:wrap;gap:12px;justify-content:space-between}.vm-query-configurator-settings__buttons{grid-gap:8px;display:grid;flex-grow:1;gap:8px;grid-template-columns:repeat(3,auto);justify-content:flex-end}.vm-query-history{max-width:80vw;min-width:500px}.vm-query-history_mobile{max-width:100vw;min-width:100vw}.vm-query-history__tabs{border-bottom:var(--border-divider);margin:-12px -12px 0;padding:0 8px}.vm-query-history__tabs_mobile{margin:-12px -12px 0}.vm-query-history-list{align-items:flex-start;display:grid}.vm-query-history-list__group-title{font-weight:700;margin:0 -12px;padding:12px 12px 8px}.vm-query-history-list__group-title_first{padding-top:12px}.vm-query-history-list__no-data{align-items:center;color:var(--color-text-secondary);display:flex;justify-content:center;line-height:18px;padding:16px 12px;text-align:center;white-space:pre-line}.vm-query-history-item{grid-gap:8px;align-items:center;border-bottom:var(--border-divider);display:grid;gap:8px;grid-template-columns:1fr auto;margin:0 -12px;padding:8px 12px}.vm-query-history-item__value{font-family:monospace;overflow-wrap:anywhere;white-space:pre-wrap}.vm-query-history-item__buttons{display:flex}.vm-query-history-footer{display:flex;justify-content:flex-end;padding-top:12px}.vm-spinner{align-items:center;animation:vm-fade 2s cubic-bezier(.28,.84,.42,1.1);background-color:#ffffff80;bottom:0;display:flex;flex-direction:column;justify-content:center;left:0;pointer-events:none;position:fixed;right:0;top:0;z-index:99}.vm-spinner_dark{background-color:#110f0f33}.vm-spinner__message{color:rgba(var(--color-text),.9);font-size:16px;line-height:1.3;margin-top:12px;text-align:center;white-space:pre-line}.half-circle-spinner,.half-circle-spinner *{box-sizing:border-box}.half-circle-spinner{border-radius:100%;height:60px;position:relative;width:60px}.half-circle-spinner .circle{border:6px solid #0000;border-radius:100%;content:"";height:100%;position:absolute;width:100%}.half-circle-spinner .circle.circle-1{animation:half-circle-spinner-animation 1s infinite;border-top-color:var(--color-primary)}.half-circle-spinner .circle.circle-2{animation:half-circle-spinner-animation 1s infinite alternate;border-bottom-color:var(--color-primary)}@keyframes half-circle-spinner-animation{0%{transform:rotate(0deg)}to{transform:rotate(1turn)}}@keyframes vm-fade{0%{opacity:0}to{opacity:1}}.vm-anomaly-config{grid-gap:12px;display:grid;gap:12px;grid-template-rows:calc(var(--vh)*70 - 114px) auto;max-width:80vw;min-height:300px;min-width:400px}.vm-anomaly-config_mobile{grid-template-rows:calc(var(--vh)*100 - 114px) auto;max-width:none;min-height:100%;width:100%}.vm-anomaly-config textarea{height:100%;max-height:900px;overflow:auto;width:100%}.vm-anomaly-config-error{align-items:center;display:flex;flex-direction:column;gap:8px;justify-content:center;text-align:center;width:100%}.vm-anomaly-config-error__icon{align-items:center;color:var(--color-error);display:flex;height:30px;justify-content:center;margin-bottom:8px;width:30px}.vm-anomaly-config-error__title{font-size:16px;font-weight:700}.vm-anomaly-config-error__text{line-height:1.3;max-width:700px}.vm-anomaly-config-footer{align-items:center;display:flex;gap:8px;justify-content:flex-end}.vm-custom-panel{grid-gap:12px;align-items:flex-start;display:grid;gap:12px;grid-template-columns:100%;height:100%}.vm-custom-panel_mobile{gap:8px}.vm-custom-panel__warning{grid-gap:8px;align-items:center;display:grid;gap:8px;grid-template-columns:1fr auto;justify-content:space-between}.vm-custom-panel__warning_mobile{grid-template-columns:1fr}.vm-custom-panel-body{position:relative}.vm-custom-panel-body-header{align-items:center;border-bottom:var(--border-divider);display:flex;font-size:12px;justify-content:space-between;margin:-12px -12px 12px;padding:0 12px;position:relative;z-index:1}.vm-custom-panel-body-header__tabs{display:flex;flex-grow:1;justify-content:flex-start}.vm-custom-panel-body-header__graph-controls{align-items:center;display:flex;gap:8px;margin:5px 10px}.vm-custom-panel-body_mobile .vm-custom-panel-body-header{margin:-12px -12px 12px;padding:0 12px}.vm-tracings-view{grid-gap:12px;display:grid;gap:12px}.vm-tracings-view-trace-header{align-items:center;border-bottom:var(--border-divider);display:flex;justify-content:space-between;padding:8px 8px 8px 12px}.vm-tracings-view-trace-header-title{flex-grow:1;font-size:16px;margin-right:8px}.vm-tracings-view-trace-header-title__query{font-weight:700}.vm-tracings-view-trace-header__expand-icon{align-items:center;color:var(--color-text-secondary);display:flex;justify-content:center;transform:rotate(-90deg);transition:transform .2s ease-in-out;width:20px}.vm-tracings-view-trace-header__expand-icon_open{transform:rotate(0)}.vm-tracings-view-trace__nav{padding:12px 12px 12px 0}.vm-tracings-view-trace__nav_mobile{padding:8px 8px 8px 0}.vm-line-progress{grid-gap:8px;align-items:center;color:var(--color-text-secondary);display:grid;gap:8px;grid-template-columns:1fr auto;justify-content:center}.vm-line-progress-track{background-color:var(--color-hover-black);border-radius:4px;height:20px;width:100%}.vm-line-progress-track__thumb{background-color:#1a90ff;border-radius:4px;height:100%}.vm-nested-nav{border-radius:4px;margin-left:16px;position:relative}.vm-nested-nav_dark .vm-nested-nav-header,.vm-nested-nav_dark .vm-nested-nav-header:after,.vm-nested-nav_dark .vm-nested-nav-header:before{background-color:var(--color-background-body)}.vm-nested-nav_dark .vm-nested-nav-header:hover{box-shadow:0 0 0 1px #ffffff14}.vm-nested-nav_mobile{margin-left:8px}.vm-nested-nav_root>.vm-nested-nav-header:after,.vm-nested-nav_root>.vm-nested-nav-header:before{display:none}.vm-nested-nav-header{grid-gap:8px;background-color:#c9e3f666;border-radius:4px;cursor:pointer;display:grid;gap:8px;grid-template-columns:auto 1fr;margin-bottom:8px;padding:8px;position:relative;transition:box-shadow .2s ease-in-out;z-index:2}.vm-nested-nav-header:after{height:2px;top:calc(50% - 1px);width:12px}.vm-nested-nav-header:after,.vm-nested-nav-header:before{background-color:#c9e3f6;content:"";left:-12px;position:absolute}.vm-nested-nav-header:before{bottom:50%;height:calc(50% + 8px);width:2px}.vm-nested-nav-header:hover{box-shadow:0 0 0 1px #110f0f14}.vm-nested-nav-header__icon{align-items:center;color:var(--color-text-secondary);display:flex;justify-content:center;transform:rotate(-90deg);transition:transform .2s ease-in-out;width:20px}.vm-nested-nav-header__icon_open{transform:rotate(0)}.vm-nested-nav-header__progress{grid-column:2}.vm-nested-nav-header__message{-webkit-line-clamp:3;-webkit-box-orient:vertical;line-clamp:3;display:-moz-box;display:-webkit-box;grid-column:2;line-height:130%;overflow:hidden;position:relative;text-overflow:ellipsis}.vm-nested-nav-header__message_show-full{display:block;overflow:visible}.vm-nested-nav-header__message_duration{color:var(--color-text-secondary)}.vm-nested-nav-header-bottom{align-items:center;display:grid;grid-column:2;grid-template-columns:1fr auto}.vm-nested-nav__childrens>.vm-nested-nav:not(:last-child):before{background-color:#c9e3f6;content:"";height:calc(100% + 32px);left:-12px;position:absolute;top:0;width:2px}.vm-nested-nav__childrens>.vm-nested-nav_dark:not(:last-child):before{background-color:var(--color-background-body)}.vm-nested-nav__childrens>.vm-nested-nav:last-child{margin-bottom:32px}.uplot,.uplot *,.uplot :after,.uplot :before{box-sizing:border-box}.uplot{font-family:system-ui,-apple-system,Segoe UI,Roboto,Helvetica Neue,Arial,Noto Sans,sans-serif,Apple Color Emoji,Segoe UI Emoji,Segoe UI Symbol,Noto Color Emoji;line-height:1.5;width:-webkit-min-content;width:min-content}.u-title{font-size:18px;font-weight:700;text-align:center}.u-wrap{position:relative;-webkit-user-select:none;user-select:none}.u-over,.u-under{position:absolute}.u-under{overflow:hidden}.uplot canvas{display:block;height:100%;position:relative;width:100%}.u-axis{position:absolute}.u-legend{font-size:14px;margin:auto;text-align:center}.u-inline{display:block}.u-inline *{display:inline-block}.u-inline tr{margin-right:16px}.u-legend th{font-weight:600}.u-legend th>*{display:inline-block;vertical-align:middle}.u-legend .u-marker{background-clip:padding-box!important;height:1em;margin-right:4px;width:1em}.u-inline.u-live th:after{content:":";vertical-align:middle}.u-inline:not(.u-live) .u-value{display:none}.u-series>*{padding:4px}.u-series th{cursor:pointer}.u-legend .u-off>*{opacity:.3}.u-select{background:#00000012}.u-cursor-x,.u-cursor-y,.u-select{pointer-events:none;position:absolute}.u-cursor-x,.u-cursor-y{left:0;top:0;will-change:transform}.u-hz .u-cursor-x,.u-vt .u-cursor-y{border-right:1px dashed #607d8b;height:100%}.u-hz .u-cursor-y,.u-vt .u-cursor-x{border-bottom:1px dashed #607d8b;width:100%}.u-cursor-pt{background-clip:padding-box!important;border:0 solid;border-radius:50%;left:0;pointer-events:none;position:absolute;top:0;will-change:transform}.u-axis.u-off,.u-cursor-pt.u-off,.u-cursor-x.u-off,.u-cursor-y.u-off,.u-select.u-off{display:none}.vm-line-chart{pointer-events:auto}.vm-line-chart_panning{pointer-events:none}.vm-line-chart__u-plot{position:relative}.vm-chart-tooltip{grid-gap:12px;word-wrap:break-word;background:var(--color-background-tooltip);border-radius:8px;color:#fff;display:grid;font-family:monospace;font-size:12px;font-weight:400;gap:12px;line-height:150%;padding:12px;pointer-events:none;position:absolute;-webkit-user-select:text;user-select:text;width:370px;z-index:98}.vm-chart-tooltip_hits{white-space:pre-wrap;width:auto;word-break:break-all}.vm-chart-tooltip_sticky{pointer-events:auto;z-index:99}.vm-chart-tooltip_moved{margin-left:-316.5px;margin-top:-24.5px;position:fixed}.vm-chart-tooltip-header{grid-gap:8px;align-items:center;display:grid;gap:8px;grid-template-columns:1fr 25px 25px;justify-content:center;min-height:25px}.vm-chart-tooltip-header__title{grid-row:1}.vm-chart-tooltip-header__close{color:#fff;grid-column:3;grid-row:1}.vm-chart-tooltip-header__drag{color:#fff;cursor:move;grid-column:2;grid-row:1}.vm-chart-tooltip-header__date{grid-gap:2px;display:grid;gap:2px;grid-column:1}.vm-chart-tooltip-data{align-items:center;display:flex;gap:8px;justify-content:flex-start}.vm-chart-tooltip-data_margin-bottom{margin-bottom:12px}.vm-chart-tooltip-data_margin-top{margin-top:12px}.vm-chart-tooltip-data__marker{border:1px solid #ffffff80;height:14px;width:14px}.vm-chart-tooltip-data__marker_tranparent{opacity:0}.vm-chart-tooltip-data__value{font-size:14px;line-height:1}.vm-chart-tooltip-stats{align-items:center;display:flex;flex-wrap:wrap;gap:8px 12px;justify-content:flex-start}.vm-chart-tooltip-stats-row{align-items:center;display:grid;justify-content:flex-start}.vm-chart-tooltip-stats-row:not(:last-child){padding-right:8px}.vm-chart-tooltip-stats-row__key{line-height:1;margin-right:4px}.vm-chart-tooltip-stats-row__value{font-weight:700}.vm-chart-tooltip__info{white-space:pre-wrap;word-break:break-all}.vm-legend-item{grid-gap:8px;align-items:start;background-color:var(--color-background-block);cursor:pointer;display:grid;font-size:12px;grid-template-columns:auto auto;justify-content:start;padding:8px;transition:.2s ease}.vm-legend-item:hover{background-color:#0000001a}.vm-legend-item_hide{opacity:.5;text-decoration:line-through}.vm-legend-item_static{cursor:default;grid-template-columns:1fr;margin:0;padding:0}.vm-legend-item_static:hover{background-color:var(--color-background-block)}.vm-legend-item__marker{border-radius:2px;box-sizing:border-box;height:14px;position:relative;transition:.2s ease;width:14px}.vm-legend-item-info{font-weight:400;word-break:break-all}.vm-legend-item-info__label{margin-right:2px}.vm-legend-item-info__free-fields{cursor:pointer;padding:2px}.vm-legend-item-info__free-fields:hover{text-decoration:underline}.vm-legend-item-stats{align-items:center;display:flex;gap:8px;grid-column:2}.vm-legend-item-stats-row{align-items:center;display:flex;justify-content:flex-start}.vm-legend-item-stats-row:not(:last-child){padding-right:12px}.vm-legend-item-stats-row__key{color:var(--color-text-secondary);line-height:1;margin-right:4px}.vm-legend{cursor:default;display:flex;flex-wrap:wrap;position:relative}.vm-legend-group{margin:0 12px 12px 0;min-width:23%;width:100%}.vm-legend-group-title{align-items:center;border-bottom:var(--border-divider);display:flex;margin-bottom:1px;padding:8px}.vm-legend-group-title__count{font-weight:700;margin-right:8px}.vm-legend-heatmap{align-items:center;display:inline-grid;gap:4px;grid-template-columns:auto auto;justify-content:space-between}.vm-legend-heatmap__wrapper{align-items:flex-start;display:flex;flex-wrap:wrap;gap:12px;justify-content:space-between}.vm-legend-heatmap__value{color:var(--color-text);font-size:12px}.vm-legend-heatmap__value:last-child{text-align:right}.vm-legend-heatmap-gradient{align-items:center;display:flex;grid-column:1/-1;height:12px;justify-content:center;position:relative;width:200px}.vm-legend-heatmap-gradient__value{align-items:center;border:2px solid var(--color-text);border-radius:50%;display:flex;height:16px;justify-content:center;position:absolute;top:-2px;transform:translateX(-8px);transition:left .1s ease;width:16px}.vm-legend-heatmap-gradient__value span{background-color:var(--color-background-block);box-shadow:var(--box-shadow);color:var(--color-text);font-size:12px;left:auto;padding:4px 8px;position:absolute;top:18px}.vm-legend-heatmap__labels{word-break:break-all}.vm-graph-view{width:100%}.vm-graph-view_full-width{width:calc(100vw - 48px - var(--scrollbar-width))}@media(max-width:768px){.vm-graph-view_full-width{width:calc(100vw - 24px - var(--scrollbar-width))}}.vm-graph-view_full-width_mobile{width:calc(100vw - 24px - var(--scrollbar-width))}.vm-legend-anomaly{cursor:default;flex-wrap:wrap;gap:32px;position:relative}.vm-legend-anomaly,.vm-legend-anomaly-item{align-items:center;display:flex;justify-content:center}.vm-legend-anomaly-item{gap:8px}.vm-legend-anomaly-item svg{height:14px;width:30px}.vm-axes-limits{grid-gap:12px;align-items:center;display:grid;gap:12px;max-width:300px}.vm-axes-limits_mobile{gap:12px;max-width:100%;width:100%}.vm-axes-limits_mobile .vm-axes-limits-list__inputs{grid-template-columns:repeat(2,1fr)}.vm-axes-limits-list{grid-gap:12px;align-items:center;display:grid;gap:12px}.vm-axes-limits-list__inputs{grid-gap:8px;display:grid;gap:8px;grid-template-columns:repeat(2,120px)}.vm-graph-settings-popper{grid-gap:12px;display:grid;gap:12px;padding:0 0 12px}.vm-graph-settings-popper__body{grid-gap:16px;display:grid;gap:16px;padding:0 12px}.vm-json-view__copy{display:flex;justify-content:flex-end;position:-webkit-sticky;position:sticky;top:0;z-index:2}.vm-json-view__code{font-size:14px;line-height:1.4;transform:translateY(-32px);white-space:pre-wrap}.vm-table-view{max-width:100%;overflow:auto}.vm-table-view,.vm-table-view_mobile{margin-top:-12px}.vm-table-view table{margin-top:0}.vm-table-settings-popper{display:grid;min-width:250px}.vm-table-settings-popper_mobile .vm-table-settings-popper-list{gap:12px}.vm-table-settings-popper_mobile .vm-table-settings-popper-list:first-child{padding-top:0}.vm-table-settings-popper-list{grid-gap:12px;border-bottom:var(--border-divider);display:grid;gap:12px;max-width:250px;padding:12px}.vm-table-settings-popper-list_first{padding-top:0}.vm-table-settings-popper-list-header{grid-gap:8px;align-items:center;display:grid;gap:8px;grid-template-columns:1fr auto;justify-content:space-between;min-height:25px}.vm-table-settings-popper-list-header__title{font-weight:700}.vm-table-settings-popper-list-columns{max-height:350px;overflow:auto}.vm-table-settings-popper-list__item{font-size:14px;padding:6px 12px}.vm-table-settings-popper-list__item:hover,.vm-table-settings-popper-list__item_focus{background-color:var(--color-hover-black)}.vm-table-settings-popper-list__item_check_all{margin:0 -12px;padding:6px 12px}.vm-table-settings-popper-list__no-found{color:var(--color-text-secondary);font-style:italic;margin-bottom:8px;text-align:center}.vm-checkbox{align-items:center;cursor:pointer;display:flex;justify-content:flex-start;-webkit-user-select:none;user-select:none}.vm-checkbox_disabled{cursor:default;opacity:.6}.vm-checkbox_secondary_active .vm-checkbox-track{background-color:var(--color-secondary)}.vm-checkbox_secondary .vm-checkbox-track{border:1px solid var(--color-secondary)}.vm-checkbox_primary_active .vm-checkbox-track{background-color:var(--color-primary)}.vm-checkbox_primary .vm-checkbox-track{border:1px solid var(--color-primary)}.vm-checkbox_active .vm-checkbox-track__thumb{transform:scale(1)}.vm-checkbox:hover .vm-checkbox-track{opacity:.8}.vm-checkbox-track{align-items:center;background-color:#0000;border-radius:4px;display:flex;height:16px;justify-content:center;padding:2px;position:relative;transition:background-color .2s ease,opacity .3s ease-out;width:16px}.vm-checkbox-track__thumb{align-items:center;color:#fff;display:grid;height:12px;justify-content:center;transform:scale(0);transition:transform .1s ease-in-out;width:12px}.vm-checkbox__label{color:inherit;font-size:inherit;margin-left:8px;transition:color .2s ease;white-space:nowrap}.vm-download-report{grid-gap:16px;display:grid;gap:16px;min-width:400px;padding-top:4px}.vm-download-report-settings{grid-gap:12px;display:grid;gap:12px}.vm-download-report-settings textarea{min-height:100px}.vm-download-report__buttons{align-items:center;display:flex;gap:12px;justify-content:flex-end}.vm-download-report-helper{grid-gap:8px;display:grid;gap:8px;padding:12px}.vm-download-report-helper__description{line-height:1.3;max-width:400px;white-space:pre-line}.vm-download-report-helper__description p{margin-bottom:4px}.vm-download-report-helper__buttons{align-items:center;display:flex;gap:8px;justify-content:flex-end}.vm-predefined-panel-header{grid-gap:8px;align-items:center;border-bottom:var(--border-divider);display:grid;gap:8px;grid-template-columns:auto 1fr auto;justify-content:flex-start;padding:8px 16px}.vm-predefined-panel-header__description{line-height:1.3;white-space:pre-wrap}.vm-predefined-panel-header__description ol,.vm-predefined-panel-header__description ul{list-style-position:inside}.vm-predefined-panel-header__description a{color:#c9e3f6;text-decoration:underline}.vm-predefined-panel-header__info{align-items:center;color:var(--color-primary);display:flex;justify-content:center;width:18px}.vm-predefined-panel-body{min-height:500px;padding:8px 16px}@media(max-width:500px){.vm-predefined-panel-body{padding:0}}.vm-predefined-dashboard{background-color:#0000}.vm-predefined-dashboard-header{align-items:center;border-radius:4px;box-shadow:var(--box-shadow);display:grid;font-weight:700;grid-template-columns:1fr auto;justify-content:space-between;line-height:1;overflow:hidden;padding:12px;position:relative;transform-style:preserve-3d;transition:box-shadow .2s ease-in-out}.vm-predefined-dashboard-header_open{border-radius:4px 4px 0 0;box-shadow:none}.vm-predefined-dashboard-header__title{font-size:14px}.vm-predefined-dashboard-header__count{font-size:12px;grid-column:2;margin-right:26px}.vm-predefined-dashboard-panels{grid-gap:12px;display:grid;gap:12px;grid-template-columns:repeat(12,1fr);padding:0}@media(max-width:1000px){.vm-predefined-dashboard-panels{grid-template-columns:1fr}}.vm-predefined-dashboard-panels-panel{border-radius:8px;overflow:hidden;position:relative}.vm-predefined-dashboard-panels-panel:hover .vm-predefined-dashboard-panels-panel__resizer{transform:scale(1)}.vm-predefined-dashboard-panels-panel__resizer{bottom:0;cursor:ew-resize;height:20px;position:absolute;right:0;transform:scale(0);transition:transform .2s ease-in-out;width:20px;z-index:1}.vm-predefined-dashboard-panels-panel__resizer:after{border-bottom:2px solid #110f0f33;border-right:2px solid #110f0f33;bottom:5px;content:"";height:5px;position:absolute;right:5px;width:5px}.vm-predefined-dashboard-panels-panel__alert{grid-column:span 12}.vm-predefined-panels{grid-gap:12px;align-items:flex-start;display:grid;gap:12px}@media(max-width:768px){.vm-predefined-panels{padding:12px 0}}@media(max-width:500px){.vm-predefined-panels{padding:8px 0}}.vm-predefined-panels-tabs{align-items:center;display:flex;flex-wrap:wrap;font-size:12px;gap:8px;justify-content:flex-start;overflow:hidden}@media(max-width:768px){.vm-predefined-panels-tabs{padding:0 12px}}.vm-predefined-panels-tabs__tab{background:var(--color-background-block);border:1px solid #110f0f33;border-radius:8px;color:var(--color-text-secondary);cursor:pointer;padding:8px 12px;text-align:center;text-transform:uppercase;transition:background .2s ease-in-out,color .15s ease-in}@media(max-width:500px){.vm-predefined-panels-tabs__tab{flex-grow:1}}.vm-predefined-panels-tabs__tab:hover{color:var(--color-primary)}.vm-predefined-panels-tabs__tab_active{border-color:var(--color-primary);color:var(--color-primary)}.vm-predefined-panels__dashboards{grid-gap:12px;display:grid;gap:12px}.vm-cardinality-configurator{grid-gap:8px;display:grid;gap:8px}.vm-cardinality-configurator-controls{align-items:center;display:flex;flex-wrap:wrap;gap:8px 12px;justify-content:flex-start}.vm-cardinality-configurator-controls__query{flex-grow:10}.vm-cardinality-configurator-controls__item{flex-grow:2}.vm-cardinality-configurator-controls__item_limit{flex-grow:1}.vm-cardinality-configurator-controls__item svg{color:var(--color-text-disabled)}.vm-cardinality-configurator-bottom{align-items:center;display:flex;flex-wrap:wrap;gap:12px;justify-content:flex-end;width:100%}.vm-cardinality-configurator-bottom-helpful{align-items:center;display:flex;flex-wrap:wrap;gap:8px 12px;justify-content:flex-end}.vm-cardinality-configurator-bottom-helpful a{color:var(--color-text-secondary)}.vm-cardinality-configurator-bottom__execute{align-items:center;display:flex;gap:8px}.vm-cardinality-configurator_mobile .vm-cardinality-configurator-bottom{justify-content:center}.vm-cardinality-configurator_mobile .vm-cardinality-configurator-bottom-helpful{flex-grow:1;justify-content:center}.vm-cardinality-configurator_mobile .vm-cardinality-configurator-bottom__execute,.vm-cardinality-configurator_mobile .vm-cardinality-configurator-bottom__execute button:nth-child(3){width:100%}.vm-cardinality-totals{align-content:flex-start;display:inline-flex;flex-grow:1;flex-wrap:wrap;gap:12px;justify-content:flex-start}.vm-cardinality-totals_mobile{gap:12px;justify-content:center}.vm-cardinality-totals-card{grid-gap:8px 4px;align-items:center;display:grid;gap:8px 4px;grid-template-columns:auto 1fr;justify-content:center}.vm-cardinality-totals-card__info-icon{align-items:center;color:var(--color-primary);display:flex;justify-content:center;width:12px}.vm-cardinality-totals-card__title{align-items:center;color:var(--color-text);display:flex;gap:4px;grid-column:1/-1;justify-content:flex-start}.vm-cardinality-totals-card__tooltip{max-width:280px;padding:8px;white-space:normal}.vm-cardinality-totals-card__value{color:var(--color-primary);font-size:18px;font-weight:700;line-height:14px;text-align:center}.vm-metrics-content-header{margin:-12px -12px 0}.vm-metrics-content-header__title{align-items:center;display:flex;justify-content:flex-start}.vm-metrics-content-header__tip{max-width:300px;padding:8px;white-space:normal}.vm-metrics-content-header__tip p{margin-bottom:8px}.vm-metrics-content-header__tip-icon{align-items:center;color:var(--color-primary);display:flex;justify-content:center;margin-right:4px;width:12px}.vm-metrics-content_mobile .vm-metrics-content-header{margin:-12px -12px 0}.vm-metrics-content__table{overflow:auto;padding-top:12px;width:calc(100vw - 48px - var(--scrollbar-width))}@media(max-width:768px){.vm-metrics-content__table{width:calc(100vw - 24px - var(--scrollbar-width))}}.vm-metrics-content__table_mobile{width:calc(100vw - 24px - var(--scrollbar-width))}.vm-metrics-content__table .vm-table-cell_header{white-space:nowrap}.vm-metrics-content_mobile .vm-metrics-content__table{width:calc(100vw - 24px - var(--scrollbar-width))}.vm-metrics-content__chart{padding-top:12px}.vm-metrics-content-prom-data{align-items:center;display:flex;flex-direction:column;gap:8px;justify-content:center;margin-top:12px;text-align:center;width:100%}.vm-metrics-content-prom-data__icon{align-items:center;color:var(--color-primary);display:flex;height:30px;justify-content:center;margin-bottom:8px;width:30px}.vm-metrics-content-prom-data__title{font-size:16px;font-weight:700}.vm-metrics-content-prom-data__text{line-height:1.3;max-width:700px}.vm-simple-bar-chart{display:grid;grid-template-columns:auto 1fr;height:100%;overflow:hidden;padding-bottom:6px}.vm-simple-bar-chart-y-axis{display:grid;position:relative;transform:translateY(12px)}.vm-simple-bar-chart-y-axis__tick{align-items:center;display:flex;font-size:12px;justify-content:flex-end;line-height:2;padding-right:8px;position:relative;text-align:right;transform-style:preserve-3d;z-index:1}.vm-simple-bar-chart-y-axis__tick:after{border-bottom:var(--border-divider);content:"";height:0;left:100%;position:absolute;top:auto;transform:translateY(-1px) translateZ(-1);width:100vw}.vm-simple-bar-chart-data{align-items:flex-end;display:flex;gap:1%;justify-content:space-between;position:relative}.vm-simple-bar-chart-data-item{align-items:flex-start;background-color:#3b5;display:flex;flex-grow:1;height:calc(100% - 48px);justify-content:center;min-width:1px;transition:background-color .2s ease-in;width:100%}.vm-simple-bar-chart-data-item:hover{background-color:#51d071}.vm-simple-bar-chart-data-item:first-child{background-color:#f79420}.vm-simple-bar-chart-data-item:first-child:hover{background-color:#f9ac51}.vm-cardinality-panel{grid-gap:12px;align-items:flex-start;display:grid;gap:12px}.vm-cardinality-panel_mobile,.vm-cardinality-panel_mobile .vm-cardinality-panel-tips{gap:8px}.vm-cardinality-panel-tips{align-content:flex-start;display:inline-flex;flex-grow:1;flex-wrap:wrap;gap:12px;justify-content:flex-start;width:100%}.vm-cardinality-panel-table__header th:first-child{width:60%}.vm-cardinality-panel-table__header th:not(:first-child){width:auto}.vm-cardinality-panel-table__progress{grid-gap:8px;align-items:center;display:grid;gap:8px;grid-template-columns:minmax(200px,1fr) 70px;justify-content:flex-start}.vm-cardinality-tip{background-color:var(--color-background-block);border-radius:8px;box-shadow:var(--box-shadow);color:var(--color-text-secondary);display:grid;flex-grow:1;grid-template-rows:auto 1fr;overflow:hidden;width:300px}.vm-cardinality-tip-header{align-items:center;border-bottom:var(--border-divider);display:flex;gap:4px;justify-content:center;padding:8px 12px;position:relative}.vm-cardinality-tip-header:after{background:var(--color-warning);content:"";height:100%;left:0;opacity:.1;pointer-events:none;position:absolute;top:0;width:100%}.vm-cardinality-tip-header__tip-icon{align-items:center;color:var(--color-warning);display:flex;justify-content:center;width:12px}.vm-cardinality-tip-header__title{color:var(--color-text);font-weight:700;text-align:center}.vm-cardinality-tip-header__tooltip{font-size:14px;line-height:130%;max-width:280px;padding:8px;white-space:normal}.vm-cardinality-tip__description{line-height:130%;padding:8px 12px}.vm-cardinality-tip__description p{margin-bottom:8px}.vm-cardinality-tip__description p:last-child{margin-bottom:0}.vm-cardinality-tip__description ol,.vm-cardinality-tip__description ul{list-style-position:inside}.vm-cardinality-tip__description ol li,.vm-cardinality-tip__description ul li{margin-bottom:4px}.vm-top-queries-panel-header,.vm-top-queries-panel-header_mobile{margin:-12px -12px 0}.vm-top-queries-panel__table{overflow:auto;padding-top:12px;width:calc(100vw - 48px - var(--scrollbar-width))}@media(max-width:768px){.vm-top-queries-panel__table{width:calc(100vw - 24px - var(--scrollbar-width))}}.vm-top-queries-panel__table_mobile{width:calc(100vw - 24px - var(--scrollbar-width))}.vm-top-queries-panel__table .vm-table-cell_header{white-space:nowrap}.vm-top-queries{grid-gap:12px;align-items:flex-start;display:grid;gap:12px}.vm-top-queries_mobile{gap:8px}.vm-top-queries-controls{grid-gap:8px;display:grid;gap:8px}.vm-top-queries-controls-fields{align-items:center;display:flex;flex-wrap:wrap;gap:12px}.vm-top-queries-controls-fields__item{flex-grow:1;min-width:200px}.vm-top-queries-controls-bottom{grid-gap:12px;align-items:flex-end;display:grid;gap:12px;grid-template-columns:1fr auto;justify-content:space-between}.vm-top-queries-controls-bottom_mobile{gap:8px;grid-template-columns:1fr}.vm-top-queries-controls-bottom__button{align-items:center;display:flex;justify-content:flex-end}.vm-top-queries-panels{grid-gap:12px;display:grid;gap:12px}.vm-top-queries-panels__table-actions{align-items:center;display:flex;gap:8px;height:100%;justify-content:flex-end;padding:0 8px}.vm-trace-page{display:flex;flex-direction:column;min-height:100%}@media(max-width:768px){.vm-trace-page{padding:12px 0}}.vm-trace-page-header{grid-gap:12px;align-items:start;display:grid;gap:12px;grid-template-columns:1fr auto;margin-bottom:12px}@media(max-width:768px){.vm-trace-page-header{grid-template-columns:1fr;padding:0 12px}}.vm-trace-page-header-errors{grid-gap:12px;align-items:flex-start;display:grid;gap:12px;grid-template-columns:1fr;justify-content:stretch}@media(max-width:768px){.vm-trace-page-header-errors{grid-row:2}}.vm-trace-page-header-errors-item{align-items:center;display:grid;justify-content:stretch;position:relative}.vm-trace-page-header-errors-item_margin-bottom{margin-bottom:12px}.vm-trace-page-header-errors-item__filename{min-height:20px}.vm-trace-page-header-errors-item__close{position:absolute;right:8px;top:auto;z-index:2}.vm-trace-page-preview{align-items:center;display:flex;flex-direction:column;flex-grow:1;justify-content:center}.vm-trace-page-preview__text{font-size:14px;line-height:1.8;margin-bottom:12px;text-align:center;white-space:pre-line}.vm-trace-page__dropzone{align-items:center;box-shadow:inset var(--color-primary) 0 0 10px;display:flex;height:100%;justify-content:center;left:0;opacity:.5;pointer-events:none;position:fixed;top:0;width:100%;z-index:100}.vm-upload-json-buttons{grid-gap:12px;align-items:center;display:grid;gap:12px;grid-template-columns:1fr 1fr;justify-content:center}.vm-explore-metrics{grid-gap:12px;align-items:flex-start;display:grid;gap:12px}@media(max-width:500px){.vm-explore-metrics{gap:8px}}.vm-explore-metrics-body{grid-gap:12px;align-items:flex-start;display:grid;gap:12px}@media(max-width:500px){.vm-explore-metrics-body{gap:8px}}.vm-explore-metrics-graph,.vm-explore-metrics-graph_mobile{padding:0 12px 12px}.vm-explore-metrics-graph__warning{align-items:center;display:grid;grid-template-columns:1fr auto;justify-content:space-between}.vm-explore-metrics-item-header{grid-gap:12px;align-items:center;border-bottom:var(--border-divider);display:grid;gap:12px;grid-template-columns:auto 1fr auto auto;justify-content:flex-start;padding:12px}.vm-explore-metrics-item-header_mobile{grid-template-columns:1fr auto;padding:8px 12px}.vm-explore-metrics-item-header__index{color:var(--color-text-secondary);font-size:12px}.vm-explore-metrics-item-header__name{flex-grow:1;font-weight:700;line-height:130%;max-width:100%;overflow:hidden;text-overflow:ellipsis}.vm-explore-metrics-item-header-order{align-items:center;display:grid;grid-column:1;grid-template-columns:auto 20px auto;justify-content:flex-start;text-align:center}.vm-explore-metrics-item-header-order__up{transform:rotate(180deg)}.vm-explore-metrics-item-header__rate{grid-column:3}.vm-explore-metrics-item-header__close{align-items:center;display:grid;grid-column:4;grid-row:1}.vm-explore-metrics-item-header code{background-color:var(--color-hover-black);border-radius:6px;font-size:85%;padding:.2em .4em}.vm-explore-metrics-item-header-modal{grid-gap:12px;align-items:flex-start;display:grid;gap:12px}.vm-explore-metrics-item-header-modal-order{align-items:center;display:flex;gap:12px;justify-content:space-between}.vm-explore-metrics-item-header-modal-order p{align-items:center;display:flex}.vm-explore-metrics-item-header-modal-order__index{margin-left:4px}.vm-explore-metrics-item-header-modal__rate{grid-gap:8px;display:grid;gap:8px}.vm-explore-metrics-item-header-modal__rate p{color:var(--color-text-secondary)}.vm-explore-metrics-item{position:relative}.vm-select-input{align-items:center;border:var(--border-divider);border-radius:4px;cursor:pointer;display:flex;min-height:40px;padding:8px 0 8px 12px;position:relative}.vm-select-input-content{align-items:center;display:flex;flex-grow:1;flex-wrap:wrap;gap:8px;justify-content:flex-start}.vm-select-input-content_mobile{flex-wrap:nowrap}.vm-select-input-content__counter{font-size:14px;line-height:14px}.vm-select-input-content__selected{align-items:center;background-color:var(--color-hover-black);border-radius:4px;display:inline-flex;font-size:14px;justify-content:center;line-height:14px;max-width:100%;padding:2px 2px 2px 6px}.vm-select-input-content__selected span{overflow:hidden;text-overflow:ellipsis;width:100%}.vm-select-input-content__selected svg{align-items:center;background-color:#0000;border-radius:4px;display:flex;justify-content:center;margin-left:10px;padding:4px;transition:background-color .2s ease-in-out;width:20px}.vm-select-input-content__selected svg:hover{background-color:#110f0f1a}.vm-select-input input{background-color:#0000;border:none;border-radius:4px;color:var(--color-text);display:inline-block;flex-grow:1;font-size:14px;height:18px;line-height:18px;min-width:100px;padding:0;position:relative;z-index:2}.vm-select-input input:placeholder-shown{width:auto}.vm-select-input__icon{align-items:center;border-right:var(--border-divider);color:var(--color-text-secondary);cursor:pointer;display:inline-flex;justify-content:flex-end;padding:0 8px;transition:transform .2s ease-in,opacity .2s ease-in}.vm-select-input__icon:last-child{border:none}.vm-select-input__icon svg{width:14px}.vm-select-input__icon_open{transform:rotate(180deg)}.vm-select-input__icon:hover{opacity:.7}.vm-select-options{grid-gap:8px;display:grid;font-size:14px;gap:8px;max-height:208px;max-width:300px;overflow:auto;padding:12px}.vm-select-options_mobile{max-height:calc(var(--vh)*100 - 70px);max-width:100%;padding:0 12px 8px}.vm-select_disabled *{cursor:not-allowed}.vm-select_disabled .vm-select-input-content input{color:var(--color-text-disabled)}.vm-explore-metrics-header{align-items:center;display:flex;flex-wrap:wrap;gap:12px 18px;justify-content:flex-start;max-width:calc(100vw - var(--scrollbar-width))}.vm-explore-metrics-header_mobile{align-items:stretch;flex-direction:column}.vm-explore-metrics-header__job{flex-grow:1;min-width:150px}.vm-explore-metrics-header__instance{flex-grow:2;min-width:150px}.vm-explore-metrics-header__size{grid-gap:12px;align-items:center;display:grid;flex-grow:1;gap:12px;grid-template-columns:1fr auto;min-width:150px}.vm-explore-metrics-header-description{grid-gap:8px;align-items:flex-start;display:grid;gap:8px;grid-template-columns:1fr auto}.vm-explore-metrics-header-description button{color:inherit;min-height:29px}.vm-explore-metrics-header-description code{margin:0 3px}.vm-explore-metrics-header-metrics{flex-grow:1;width:100%}.vm-explore-metrics-header__clear-icon{align-items:center;cursor:pointer;display:flex;justify-content:center;padding:2px}.vm-explore-metrics-header__clear-icon:hover{opacity:.7}.vm-preview-icons{grid-gap:12px;align-items:flex-start;display:grid;gap:12px;grid-template-columns:repeat(auto-fill,100px);justify-content:center}.vm-preview-icons-item{grid-gap:8px;align-items:stretch;border:1px solid #0000;border-radius:4px;cursor:pointer;display:grid;gap:8px;grid-template-rows:1fr auto;height:100px;justify-content:center;padding:12px 8px;transition:box-shadow .2s ease-in-out}.vm-preview-icons-item:hover{box-shadow:0 1px 4px #00000029}.vm-preview-icons-item:active .vm-preview-icons-item__svg{transform:scale(.9)}.vm-preview-icons-item__name{font-size:12px;line-height:2;overflow:hidden;text-align:center;text-overflow:ellipsis;white-space:nowrap}.vm-preview-icons-item__svg{align-items:center;display:flex;height:100%;justify-content:center;transition:transform .1s ease-out}.vm-preview-icons-item__svg svg{height:24px;width:auto}.vm-with-template,.vm-with-template-body{grid-gap:12px;display:grid;gap:12px}.vm-with-template-body{align-items:flex-start;width:100%}.vm-with-template-body-top{align-items:center;display:flex;gap:8px;justify-content:flex-end}.vm-with-template-body__expr textarea{min-height:200px}.vm-with-template-body__result textarea{min-height:60px}.vm-with-template-body textarea{font-family:monospace;height:100%;overflow:auto;width:100%}.vm-with-template-tutorial{grid-gap:16px;display:grid;gap:16px}.vm-with-template-tutorial__title{font-size:16px;font-weight:700}.vm-with-template-tutorial-section{grid-gap:12px;display:grid;gap:12px}.vm-with-template-tutorial-section__text{font-size:14px;line-height:130%;max-width:720px}.vm-code-example{background-color:#110f0f0d;border-radius:4px;display:block;overflow:auto;padding:12px;position:relative;white-space:pre-wrap}.vm-code-example__copy{position:absolute;right:10px;top:10px}.vm-relabeling,.vm-relabeling-header{grid-gap:12px;display:grid;gap:12px}.vm-relabeling-header{align-items:flex-start;width:100%}.vm-relabeling-header-configs textarea{min-height:200px}.vm-relabeling-header__labels textarea{min-height:60px}.vm-relabeling-header textarea{font-family:monospace;height:100%;overflow:auto;width:100%}.vm-relabeling-header-bottom{align-items:center;display:flex;gap:12px;justify-content:flex-end}.vm-relabeling-header-bottom a{color:var(--color-text-secondary)}.vm-relabeling-steps,.vm-relabeling-steps-item{grid-gap:12px;display:grid;gap:12px}.vm-relabeling-steps-item{border-bottom:var(--border-divider);padding:0 12px 12px}.vm-relabeling-steps-item:last-child{border-bottom:none;padding-bottom:0}.vm-relabeling-steps-item__row{display:grid;grid-template-columns:100px 1fr}@media(max-width:500px){.vm-relabeling-steps-item__row{gap:4px;grid-template-columns:1fr}}.vm-relabeling-steps-item__row pre{white-space:pre-wrap}.vm-active-queries-header{grid-gap:12px;align-items:center;display:grid;gap:12px;grid-template-columns:1fr auto;justify-content:space-between;margin-bottom:12px}.vm-active-queries-header-controls{grid-gap:8px;display:grid;gap:8px;grid-column:2}.vm-active-queries-header__update-msg{color:var(--color-text-secondary);font-size:12px;white-space:nowrap}.vm-json-form{grid-gap:12px;display:grid;gap:12px;grid-template-rows:auto calc(var(--vh)*70 - 114px) auto;max-height:900px;max-width:1000px;overflow:hidden;width:70vw}.vm-json-form_mobile{grid-template-rows:auto calc(var(--vh)*100 - 236px) auto;min-height:100%;width:100%}.vm-json-form_one-field{grid-template-rows:calc(var(--vh)*70 - 114px) auto}.vm-json-form_one-field_mobile{grid-template-rows:calc(var(--vh)*100 - 184px) auto}.vm-json-form textarea{height:100%;max-height:900px;overflow:auto;width:100%}.vm-json-form-footer{align-items:center;display:flex;gap:8px;justify-content:space-between}@media(max-width:500px){.vm-json-form-footer{flex-direction:column}.vm-json-form-footer button{flex-grow:1}}.vm-json-form-footer__controls{align-items:center;display:flex;flex-grow:1;gap:8px;justify-content:flex-start}@media(max-width:500px){.vm-json-form-footer__controls{grid-template-columns:repeat(2,1fr);justify-content:center;width:100%}}.vm-json-form-footer__controls_right{display:grid;grid-template-columns:repeat(2,90px);justify-content:flex-end}@media(max-width:500px){.vm-json-form-footer__controls_right{grid-template-columns:repeat(2,1fr);justify-content:center;width:100%}}.vm-query-analyzer-view{grid-gap:12px;display:grid;gap:12px;position:relative}.vm-query-analyzer-view-header{align-items:center;border-bottom:var(--border-divider);display:flex;font-size:12px;justify-content:space-between;margin:-12px -12px 12px;padding:0 12px;position:relative;z-index:1}.vm-query-analyzer-view-header__left{align-items:center;display:flex;gap:8px}.vm-query-analyzer-view_mobile .vm-query-analyzer-view-header{margin:-12px -12px 12px;padding:0 12px}.vm-query-analyzer-info-header{display:flex;gap:12px}.vm-query-analyzer-info-header__period{align-items:center;border:var(--border-divider);border-radius:4px;display:flex;gap:8px;padding:6px 12px}.vm-query-analyzer-info-header__period svg{color:var(--color-primary);width:13px}.vm-query-analyzer-info{grid-gap:16px;display:grid;gap:16px;min-width:300px}.vm-query-analyzer-info-type{color:var(--color-text-secondary);font-style:italic;text-align:center}.vm-query-analyzer-info-item{border-bottom:var(--border-divider);display:grid;line-height:130%;padding-bottom:16px}.vm-query-analyzer-info-item__title{font-weight:700}.vm-query-analyzer-info-item__text{white-space:pre-wrap}#root,body,html{background-attachment:fixed;background-color:#fefeff;background-color:var(--color-background-body);background-repeat:no-repeat;color:#110f0f;color:var(--color-text);cursor:default;font-family:system-ui;font-size:14px;margin:0;min-height:100%}body{overflow:auto}*{-webkit-tap-highlight-color:rgba(0,0,0,0);cursor:inherit;font:inherit;touch-action:pan-x pan-y}code{font-family:monospace}b{font-weight:700}input,textarea{cursor:text}input::placeholder,textarea::placeholder{-webkit-user-select:none;user-select:none}input[type=number]::-webkit-inner-spin-button,input[type=number]::-webkit-outer-spin-button{-webkit-appearance:none;margin:0}.vm-snackbar{animation:vm-slide-snackbar .15s cubic-bezier(.28,.84,.42,1.1);bottom:12px;left:12px;position:fixed;z-index:999}.vm-snackbar-content{align-items:center;display:grid;grid-template-columns:1fr auto}.vm-snackbar-content__close{color:inherit;height:24px;opacity:.8;padding:4px;width:24px}.vm-snackbar_mobile{bottom:0;left:0;right:0}@keyframes vm-slide-snackbar{0%{transform:translateY(100%)}to{transform:translateY(0)}}svg{width:100%}*{scrollbar-color:#a09f9f #fff;scrollbar-color:var(--color-text-disabled) var(--color-background-block);scrollbar-width:thin}::-webkit-scrollbar{width:12px}::-webkit-scrollbar-track{background:#fff;background:var(--color-background-block)}::-webkit-scrollbar-thumb{background-color:#a09f9f;background-color:var(--color-text-disabled);border:3px solid #fff;border:3px solid var(--color-background-block);border-radius:20px}a,abbr,acronym,address,applet,article,aside,audio,big,body,canvas,caption,center,cite,code,del,details,dfn,div,em,embed,fieldset,figcaption,figure,footer,form,h1,h2,h3,h4,h5,h6,header,hgroup,html,iframe,img,ins,kbd,label,legend,li,mark,menu,nav,object,ol,output,p,pre,q,ruby,s,samp,section,small,span,strike,strong,sub,summary,sup,table,tbody,td,tfoot,th,thead,time,tr,tt,u,ul,var,video{border:0;margin:0;padding:0;vertical-align:initial}h1,h2,h3,h4,h5,h6{font-weight:400}article,aside,details,figcaption,figure,footer,header,hgroup,menu,nav,section{display:block}body{line-height:1}q:after,q:before{content:""}table{border-collapse:collapse;border-spacing:0}input::placeholder{opacity:1;transition:opacity .3s ease}input:focus::placeholder{opacity:0;transition:opacity .3s ease}*{box-sizing:border-box;outline:none}button{background:none;border:none;border-radius:0;padding:0}strong{letter-spacing:1px}input[type=file]{cursor:pointer;font-size:0;height:100%;left:0;opacity:0;position:absolute;top:0;width:100%}input[type=file]:disabled{cursor:not-allowed}a{color:inherit;text-decoration:inherit}input,textarea{-webkit-text-fill-color:inherit;appearance:none;-webkit-appearance:none}input:disabled,textarea:disabled{opacity:1!important}input:placeholder-shown,textarea:placeholder-shown{width:100%}input:-webkit-autofill,input:-webkit-autofill:active,input:-webkit-autofill:focus,input:-webkit-autofill:hover{-webkit-box-shadow:inset 0 0 0 0 #fff!important;width:100%;z-index:2}.vm-header-button{border:1px solid #110f0f33}.vm-list-item{background-color:#0000;cursor:pointer;padding:12px;transition:background-color .2s ease}.vm-list-item_mobile{padding:12px}.vm-list-item:hover,.vm-list-item_active{background-color:#0000000f;background-color:var(--color-hover-black)}.vm-list-item_multiselect{grid-gap:8px;align-items:center;display:grid;gap:8px;grid-template-columns:10px 1fr;justify-content:flex-start}.vm-list-item_multiselect svg{animation:vm-scale .15s cubic-bezier(.28,.84,.42,1)}.vm-list-item_multiselect span{grid-column:2}.vm-list-item_multiselect_selected{color:#3f51b5;color:var(--color-primary)}.vm-list-item_with-icon{grid-gap:4px;display:grid;gap:4px;grid-template-columns:14px 1fr}.vm-list-item_with-icon,.vm-mobile-option{align-items:center;justify-content:flex-start}.vm-mobile-option{display:flex;gap:8px;padding:6px 0;-webkit-user-select:none;user-select:none;width:100%}.vm-mobile-option__arrow,.vm-mobile-option__icon{align-items:center;display:flex;justify-content:center}.vm-mobile-option__icon{color:#3f51b5;color:var(--color-primary);height:22px;width:22px}.vm-mobile-option__arrow{color:#3f51b5;color:var(--color-primary);height:14px;transform:rotate(-90deg);width:14px}.vm-mobile-option-text{grid-gap:2px;align-items:center;display:grid;flex-grow:1;gap:2px}.vm-mobile-option-text__label{font-weight:700}.vm-mobile-option-text__value{color:#706f6f;color:var(--color-text-secondary);font-size:12px}.vm-block{background-color:#fff;background-color:var(--color-background-block);border-radius:8px;box-shadow:1px 2px 6px #00000014;box-shadow:var(--box-shadow);padding:12px}.vm-block_mobile{border-radius:0;padding:12px}.vm-block_empty-padding{padding:0}.vm-section-header{align-items:center;border-bottom:1px solid #00000026;border-bottom:var(--border-divider);border-radius:8px 8px 0 0;display:grid;grid-template-columns:1fr auto;justify-content:center;padding:0 12px}.vm-section-header__title{font-size:14px;font-weight:700}.vm-section-header__title_mobile{-webkit-line-clamp:2;line-clamp:2;-webkit-box-orient:vertical;display:-webkit-box;overflow:hidden;text-overflow:ellipsis}.vm-section-header__tabs{align-items:center;display:flex;font-size:12px;justify-content:flex-start}.vm-table{border-collapse:initial;border-spacing:0;margin-top:-12px;width:100%}.vm-table,.vm-table__row{background-color:#fff;background-color:var(--color-background-block)}.vm-table__row{transition:background-color .2s ease}.vm-table__row:hover:not(.vm-table__row_header){background-color:#0000000f;background-color:var(--color-hover-black)}.vm-table__row_header{position:relative;z-index:2}.vm-table__row_selected{background-color:#1a90ff0d}.vm-table-cell{border-bottom:1px solid #00000026;border-bottom:var(--border-divider);line-height:1.5;overflow-wrap:anywhere;padding:4px;vertical-align:top}.vm-table-cell__content{align-items:center;display:flex;justify-content:flex-start}.vm-table-cell_sort{cursor:pointer}.vm-table-cell_sort:hover{background-color:#0000000f;background-color:var(--color-hover-black)}.vm-table-cell_header{font-weight:700;overflow-wrap:normal;text-align:left}.vm-table-cell_gray{color:#110f0f;color:var(--color-text);opacity:.4}.vm-table-cell_right{text-align:right}.vm-table-cell_right .vm-table-cell__content{justify-content:flex-end}.vm-table-cell_no-wrap{white-space:nowrap}.vm-table-cell_no-padding{padding:0}.vm-table-cell_pre{white-space:pre-wrap}.vm-table-cell_logs-time{overflow-wrap:normal;white-space:nowrap}.vm-table-cell_logs{font-family:monospace;line-height:1.2;overflow-wrap:normal;width:100%}.vm-table__sort-icon{align-items:center;display:flex;justify-content:center;margin:0 8px;opacity:.4;transition:opacity .2s ease,transform .2s ease-in-out;width:15px}.vm-table__sort-icon_active{opacity:1}.vm-table__sort-icon_desc{transform:rotate(180deg)}.vm-link{cursor:pointer;transition:color .2s ease}.vm-link_colored{color:#3f51b5;color:var(--color-primary)}.vm-link_underlined{text-decoration:underline}.vm-link_with-icon{grid-gap:6px;align-items:center;display:grid;gap:6px;grid-template-columns:14px auto;justify-content:center}.vm-link:hover{color:#3f51b5;color:var(--color-primary);text-decoration:underline}.vm-dynamic-number{color:#a09f9f;color:var(--color-text-disabled);font-size:12px}.vm-dynamic-number_positive{color:#4caf50;color:var(--color-success)}.vm-dynamic-number_negative{color:#fd080e;color:var(--color-error)}.vm-dynamic-number_down:before{content:"↓"}.vm-dynamic-number_up:before{content:"↑"}:root{--color-primary:#3f51b5;--color-secondary:#e91e63;--color-error:#fd080e;--color-warning:#ff8308;--color-info:#03a9f4;--color-success:#4caf50;--color-primary-text:#fff;--color-secondary-text:#fff;--color-error-text:#fff;--color-warning-text:#fff;--color-info-text:#fff;--color-success-text:#fff;--color-background-body:#fefeff;--color-background-block:#fff;--color-background-tooltip:#505050e6;--color-text:#110f0f;--color-text-secondary:#706f6f;--color-text-disabled:#a09f9f;--box-shadow:#00000014 1px 2px 6px;--box-shadow-popper:#0000001a 0px 2px 8px 0px;--border-divider:1px solid #00000026;--color-hover-black:#0000000f} \ No newline at end of file +.vm-tabs{gap:12px;height:100%;position:relative;-webkit-user-select:none;user-select:none}.vm-tabs,.vm-tabs-item{align-items:center;display:flex;justify-content:center}.vm-tabs-item{color:inherit;cursor:pointer;font-size:inherit;font-weight:inherit;opacity:.6;padding:12px 8px;text-decoration:none;text-transform:capitalize;transition:opacity .2s}.vm-tabs-item_active{opacity:1}.vm-tabs-item:hover{opacity:.8}.vm-tabs-item__icon{display:grid;margin-right:8px;width:16px}.vm-tabs-item__icon_single{margin-right:0}.vm-tabs__indicator{border-bottom:2px solid;position:absolute;transition:width .2s ease,left .3s cubic-bezier(.28,.84,.42,1)}.vm-alert{grid-gap:8px;align-items:center;background-color:var(--color-background-block);border-radius:8px;box-shadow:var(--box-shadow);color:var(--color-text);display:grid;font-size:14px;font-weight:400;gap:8px;grid-template-columns:20px 1fr;line-height:1.5;padding:12px;position:relative}.vm-alert_mobile{align-items:flex-start;border-radius:0}.vm-alert:after{border-radius:8px;content:"";height:100%;left:0;opacity:.1;position:absolute;top:0;width:100%;z-index:1}.vm-alert_mobile:after{border-radius:0}.vm-alert__content,.vm-alert__icon{position:relative;z-index:2}.vm-alert__icon{align-items:center;display:flex;justify-content:center}.vm-alert__content{filter:brightness(.6);white-space:pre-line}.vm-alert_success{color:var(--color-success)}.vm-alert_success:after{background-color:var(--color-success)}.vm-alert_error{color:var(--color-error)}.vm-alert_error:after{background-color:var(--color-error)}.vm-alert_info{color:var(--color-info)}.vm-alert_info:after{background-color:var(--color-info)}.vm-alert_warning{color:var(--color-warning)}.vm-alert_warning:after{background-color:var(--color-warning)}.vm-alert_dark:after{opacity:.1}.vm-alert_dark .vm-alert__content{filter:none}.vm-header{align-items:center;display:flex;flex-wrap:wrap;gap:0 16px;justify-content:flex-start;min-height:51px;padding:8px 12px;z-index:99}.vm-header_app{padding:8px 0}@media(max-width:1000px){.vm-header{gap:8px;padding:8px;position:-webkit-sticky;position:sticky;top:0}}.vm-header_sidebar{display:grid;grid-template-columns:40px auto 1fr}.vm-header_mobile{display:grid;grid-template-columns:33px 1fr 33px;justify-content:space-between}.vm-header_dark .vm-header-button,.vm-header_dark button,.vm-header_dark button:before{background-color:var(--color-background-block)}.vm-header-logo{align-items:center;cursor:pointer;display:flex;justify-content:flex-start;margin-bottom:2px;overflow:hidden;position:relative;width:100%}.vm-header-logo,.vm-header-logo svg,.vm-header-logo_mobile{max-width:65px;min-width:65px}.vm-header-logo_mobile{margin:0 auto}.vm-header-logo_logs,.vm-header-logo_logs svg{max-width:75px;min-width:75px}.vm-header-nav{align-items:center;display:flex;gap:12px;justify-content:flex-start}.vm-header-nav_column{align-items:stretch;flex-direction:column;gap:8px}.vm-header-nav_column .vm-header-nav-item{padding:12px 0}.vm-header-nav_column .vm-header-nav-item_sub{justify-content:stretch}.vm-header-nav-item{cursor:pointer;font-size:14px;font-weight:400;opacity:1;padding:12px 8px;position:relative;text-transform:capitalize;transition:opacity .2s ease-in}.vm-header-nav-item_sub{grid-gap:4px;align-items:center;cursor:default;display:grid;gap:4px;grid-template-columns:auto 14px;justify-content:center}.vm-header-nav-item:hover{opacity:.7}.vm-header-nav-item_active{border-bottom:2px solid #110f0f33}.vm-header-nav-item svg{transform:rotate(0deg);transition:transform .2s ease-in}.vm-header-nav-item_open svg{transform:rotate(180deg)}.vm-header-nav-item-submenu{border-radius:4px;color:#fff;display:grid;opacity:1;padding:8px;transform-origin:top center;white-space:nowrap}.vm-header-nav-item-submenu-item{cursor:pointer}.vm-popper{background-color:var(--color-background-block);border-radius:4px;box-shadow:var(--box-shadow-popper);opacity:0;pointer-events:none;position:fixed;transition:opacity .1s ease-in-out;z-index:-99}.vm-popper_open{animation:vm-slider .15s cubic-bezier(.28,.84,.42,1.1);opacity:1;pointer-events:auto;transform-origin:top center;z-index:101}.vm-popper_mobile{animation:none;border-radius:0;bottom:0;left:0;overflow:auto;position:fixed;right:0;top:0;width:100%}.vm-popper-header{grid-gap:12px;align-items:center;background-color:var(--color-background-block);border-bottom:var(--border-divider);border-radius:4px 4px 0 0;color:var(--color-text);display:grid;gap:12px;grid-template-columns:1fr 25px;justify-content:space-between;margin-bottom:12px;padding:8px 12px}.vm-popper-header__title{font-size:12px;font-weight:700;-webkit-user-select:none;user-select:none}.vm-popper_dark{background-color:var(--color-background-tooltip);color:#fff}.vm-popper_dark .vm-popper-header{background-color:#0000;color:#fff}@keyframes vm-slider{0%{transform:scaleY(0)}to{transform:scaleY(1)}}.vm-modal{align-items:center;background:#110f0f8c;bottom:0;display:flex;justify-content:center;left:0;position:fixed;right:0;top:0;z-index:100}.vm-modal_mobile{align-items:flex-start;max-height:calc(var(--vh)*100);min-height:calc(var(--vh)*100);overflow:auto}.vm-modal_mobile .vm-modal-content{border-radius:0;grid-template-rows:70px -webkit-max-content;grid-template-rows:70px max-content;max-height:-webkit-max-content;max-height:max-content;min-height:100%;overflow:visible;width:100vw}.vm-modal_mobile .vm-modal-content-header{margin-bottom:12px;padding:8px 8px 8px 12px}.vm-modal_mobile .vm-modal-content-header__title{max-width:80vw}.vm-modal_mobile .vm-modal-content-body{align-items:flex-start;display:grid;min-height:100%;padding:0 12px 12px}.vm-modal-content{background:var(--color-background-block);border-radius:4px;box-shadow:0 0 24px #110f0f12;max-height:calc(var(--vh)*90);overflow:auto}.vm-modal-content-header{grid-gap:8px;align-items:center;background-color:var(--color-background-block);border-bottom:var(--border-divider);border-radius:4px 4px 0 0;color:var(--color-text);display:grid;gap:8px;grid-template-columns:1fr auto;justify-content:space-between;margin-bottom:12px;min-height:51px;padding:12px;position:-webkit-sticky;position:sticky;top:0;z-index:3}.vm-modal-content-header__title{font-weight:700;max-width:50vw;overflow:hidden;text-overflow:ellipsis;-webkit-user-select:none;user-select:none;white-space:nowrap}.vm-modal-content-header__close{align-items:center;box-sizing:initial;color:#fff;cursor:pointer;display:flex;justify-content:center;padding:10px;width:24px}.vm-modal-content-body{padding:0 12px 12px}.vm-shortcuts{min-width:400px}@media(max-width:500px){.vm-shortcuts{min-width:100%}}.vm-shortcuts-section{border-bottom:var(--border-divider);margin-bottom:12px;padding-bottom:12px;position:relative}.vm-shortcuts-section__title{font-weight:700;margin-bottom:12px}.vm-shortcuts-section__read-more{position:absolute;right:0;top:-8px}.vm-shortcuts-section-list{grid-gap:12px;display:grid;gap:12px}@media(max-width:500px){.vm-shortcuts-section-list{gap:12px}}.vm-shortcuts-section-list-item{grid-gap:8px;align-items:center;display:grid;gap:8px;grid-template-columns:210px 1fr}@media(max-width:500px){.vm-shortcuts-section-list-item{grid-template-columns:1fr}}.vm-shortcuts-section-list-item__key{align-items:center;display:flex;gap:4px}.vm-shortcuts-section-list-item__key code,.vm-shortcuts-section-list-item__key svg{background-color:var(--color-background-body);background-repeat:repeat-x;border:var(--border-divider);border-radius:4px;color:var(--color-text);display:inline-block;font-size:12px;line-height:2;padding:2px 8px 0;text-align:center}.vm-shortcuts-section-list-item__key svg{color:var(--color-primary);padding:4px;width:24px}.vm-shortcuts-section-list-item__description{font-size:14px}.vm-tooltip{animation:vm-scale .15s cubic-bezier(.28,.84,.42,1);background-color:var(--color-background-tooltip);border-radius:4px;box-shadow:var(--box-shadow-popper);color:#fff;font-size:12px;line-height:150%;opacity:1;padding:3px 8px;pointer-events:auto;position:fixed;transition:opacity .1s ease-in-out;white-space:nowrap;z-index:101}@keyframes vm-scale{0%{transform:scale(0)}to{transform:scale(1)}}.fc-graph-tips{grid-gap:12px;display:grid;gap:12px;max-width:520px}.fc-graph-tips-item{grid-gap:8px;border-bottom:var(--border-divider);display:grid;gap:8px;line-height:1.3;padding-bottom:12px}.fc-graph-tips-item__action{color:var(--color-text-secondary);font-weight:700}.fc-graph-tips-item__description{display:inline-block;line-height:1.5}.fc-graph-tips-item__description code,.fc-graph-tips-item__description svg{align-items:center;background-color:var(--color-background-body);border:var(--border-divider);border-radius:4px;color:var(--color-text);display:inline-flex;font-size:12px;justify-content:center;margin:0 2px 2px;min-height:20px;min-width:20px;padding:0 4px}.fc-graph-tips-item svg{color:var(--color-primary);margin-top:-8px;padding:2px;transform:translateY(8px);width:18px}.vm-menu-burger{background:none;border:none;cursor:pointer;height:18px;outline:none;padding:0;position:relative;transform-style:preserve-3d;width:18px}.vm-menu-burger:after{background-color:#110f0f1a;border-radius:50%;content:"";height:calc(100% + 12px);left:-6px;position:absolute;top:-6px;transform:scale(0) translateZ(-2px);transition:transform .14s ease-in-out;width:calc(100% + 12px)}.vm-menu-burger:hover:after{transform:scale(1) translateZ(-2px)}.vm-menu-burger span{border-top:2px solid #fff;display:block;top:50%;transform:translateY(-50%);transition:transform .3s ease,border-color .3s ease}.vm-menu-burger span,.vm-menu-burger span:after,.vm-menu-burger span:before{border-radius:6px;height:2px;left:0;position:absolute;width:100%}.vm-menu-burger span:after,.vm-menu-burger span:before{animation-duration:.6s;animation-fill-mode:forwards;animation-timing-function:cubic-bezier(.645,.045,.355,1);background:#fff;content:"";top:0}.vm-menu-burger span:before{animation-name:topLineBurger}.vm-menu-burger span:after{animation-name:bottomLineBurger}.vm-menu-burger_opened span{border-color:#0000}.vm-menu-burger_opened span:before{animation-name:topLineCross}.vm-menu-burger_opened span:after{animation-name:bottomLineCross}@keyframes topLineCross{0%{transform:translateY(-7px)}50%{transform:translateY(0)}to{transform:translateY(-2px) translateX(30%) rotate(45deg);width:60%}}@keyframes bottomLineCross{0%{transform:translateY(3px)}50%{transform:translateY(0)}to{transform:translateY(-2px) translateX(30%) rotate(-45deg);width:60%}}@keyframes topLineBurger{0%{transform:translateY(0) rotate(45deg)}50%{transform:rotate(0deg)}to{transform:translateY(-7px) rotate(0deg)}}@keyframes bottomLineBurger{0%{transform:translateY(0) rotate(-45deg)}50%{transform:rotate(0deg)}to{transform:translateY(3px) rotate(0deg)}}.vm-header-sidebar{background-color:inherit;color:inherit;height:24px;width:24px}.vm-header-sidebar-button{align-items:center;display:flex;height:51px;justify-content:center;left:0;position:absolute;top:0;transition:left .35s cubic-bezier(.28,.84,.42,1);width:51px}.vm-header-sidebar-button_open{left:149px;position:fixed;z-index:102}.vm-header-sidebar-menu{grid-gap:12px;background-color:inherit;box-shadow:var(--box-shadow-popper);display:grid;gap:12px;grid-template-rows:1fr auto;height:100%;left:0;padding:12px;position:fixed;top:0;transform:translateX(-100%);transform-origin:left;transition:transform .3s cubic-bezier(.28,.84,.42,1);width:200px;z-index:101}.vm-header-sidebar-menu_open{transform:translateX(0)}.vm-header-sidebar-menu__logo{align-items:center;cursor:pointer;display:flex;justify-content:flex-start;position:relative;width:65px}.vm-header-sidebar-menu-settings{grid-gap:8px;align-items:center;display:grid;gap:8px}.vm-header-controls{align-items:center;display:flex;flex-grow:1;gap:8px;justify-content:flex-end}.vm-header-controls_mobile{display:grid;grid-template-columns:1fr;padding:0}.vm-header-controls_mobile .vm-header-button{border:none}.vm-header-controls-modal{transform:scale(0)}.vm-header-controls-modal_open{transform:scale(1)}.vm-container{display:flex;flex-direction:column;min-height:calc(var(--vh)*100 - var(--scrollbar-height))}.vm-container-body{background-color:var(--color-background-body);flex-grow:1;min-height:100%;padding:12px}.vm-container-body_mobile{padding:8px 0 0}@media(max-width:768px){.vm-container-body{padding:8px 0 0}}.vm-container-body_app{background-color:#0000;padding:8px 0}.vm-footer{align-items:center;background:var(--color-background-body);border-top:var(--border-divider);color:var(--color-text-secondary);display:flex;flex-wrap:wrap;gap:12px;justify-content:center;padding:12px}@media(max-width:768px){.vm-footer{gap:12px;padding:12px}}.vm-footer__link,.vm-footer__website{grid-gap:6px;align-items:center;display:grid;gap:6px;grid-template-columns:12px auto;justify-content:center}.vm-footer__website{margin-right:12px}@media(max-width:768px){.vm-footer__website{margin-right:0}}.vm-footer__link{grid-template-columns:14px auto}.vm-footer__copyright{flex-grow:1;text-align:right}@media(max-width:768px){.vm-footer__copyright{font-size:12px;text-align:center;width:100%}}.vm-tenant-input{position:relative}.vm-tenant-input-list{border-radius:8px;max-height:300px;overflow:auto;overscroll-behavior:none}.vm-tenant-input-list_mobile{max-height:calc(var(--vh)*100 - 70px)}.vm-tenant-input-list_mobile .vm-tenant-input-list__search{padding:0 12px 8px}.vm-tenant-input-list_inline{grid-gap:4px;display:grid;gap:4px;padding:12px}.vm-tenant-input-list__search{background-color:var(--color-background-block);padding:8px 12px;position:-webkit-sticky;position:sticky;top:0}.vm-tenant-input-list__buttons{display:flex;gap:8px;justify-content:space-between}.vm-text-field{display:grid;margin:6px 0;position:relative;width:100%}.vm-text-field_textarea:after{content:attr(data-replicated-value) " ";overflow-wrap:break-word;visibility:hidden;white-space:pre-wrap}.vm-text-field:after,.vm-text-field__input{background-color:#0000;border:var(--border-divider);box-sizing:border-box;font-family:monospace;font-size:14px;grid-area:1/1/2/2;line-height:18px;overflow:hidden;padding:8px 12px;width:100%}.vm-text-field__error,.vm-text-field__helper-text,.vm-text-field__label,.vm-text-field__warning{-webkit-line-clamp:1;line-clamp:1;-webkit-box-orient:vertical;background-color:var(--color-background-block);display:-webkit-box;font-size:12px;left:6px;line-height:14px;max-width:calc(100% - 12px);overflow:hidden;padding:0 3px;pointer-events:none;position:absolute;text-overflow:ellipsis;-webkit-user-select:none;user-select:none;z-index:2}.vm-text-field__label{color:var(--color-text-secondary);top:-8px}.vm-text-field__error,.vm-text-field__helper-text,.vm-text-field__warning{overflow-wrap:anywhere;pointer-events:auto;position:relative;top:-6px;-webkit-user-select:text;user-select:text;width:-webkit-fit-content;width:-moz-fit-content;width:fit-content}.vm-text-field__error_full,.vm-text-field__helper-text_full,.vm-text-field__warning_full{display:block;overflow:visible}.vm-text-field__error_overflowed,.vm-text-field__helper-text_overflowed,.vm-text-field__warning_overflowed{cursor:pointer}.vm-text-field__error{color:var(--color-error)}.vm-text-field__warning{color:var(--color-warning)}.vm-text-field__helper-text{color:var(--color-text-secondary)}.vm-text-field__input{background-color:#0000;border-radius:4px;color:var(--color-text);display:block;overflow:hidden;resize:none;transition:border .2s ease}.vm-text-field__input:focus,.vm-text-field__input:hover{border:1px solid var(--color-primary)}.vm-text-field__input_error,.vm-text-field__input_error:focus,.vm-text-field__input_error:hover{border-color:var(--color-error)}.vm-text-field__input_warning,.vm-text-field__input_warning:focus,.vm-text-field__input_warning:hover{border-color:var(--color-warning)}.vm-text-field__input_icon-start{padding-left:31px}.vm-text-field__input:disabled{background-color:inherit;color:inherit}.vm-text-field__input:disabled:hover{border-color:var(--color-text-disabled)}.vm-text-field__icon-end,.vm-text-field__icon-start{align-items:center;color:var(--color-text-secondary);display:flex;height:36px;justify-content:center;left:8px;max-width:15px;position:absolute;top:0}.vm-text-field__icon-end{left:auto;right:8px}.vm-text-field__controls-info{bottom:8px;color:var(--color-text-secondary);font-size:12px;opacity:.8;position:absolute;right:12px}.vm-step-control{display:inline-flex}.vm-step-control button{text-transform:none}.vm-step-control__value{display:inline;margin-left:3px}.vm-step-control-popper{grid-gap:8px;display:grid;font-size:14px;gap:8px;max-height:208px;max-width:300px;overflow:auto;padding:12px}.vm-step-control-popper_mobile{max-height:calc(var(--vh)*100 - 70px);max-width:100%;padding:0 12px 8px}.vm-step-control-popper_mobile .vm-step-control-popper-info{font-size:14px}.vm-step-control-popper-info{font-size:12px;line-height:1.8}.vm-step-control-popper-info a{margin:0 .4em}.vm-step-control-popper-info code{background-color:var(--color-hover-black);border-radius:6px;margin:0 .2em;padding:.2em .4em}.vm-time-duration{font-size:14px;max-height:227px;overflow:auto}.vm-time-duration_mobile{max-height:100%}.vm-time-selector{display:grid;grid-template-columns:repeat(2,230px);padding:12px 0}.vm-time-selector_mobile{grid-template-columns:1fr;max-height:calc(var(--vh)*100 - 70px);min-width:250px;overflow:auto;width:100%}.vm-time-selector_mobile .vm-time-selector-left{border-bottom:var(--border-divider);border-right:none;padding-bottom:12px}.vm-time-selector-left{border-right:var(--border-divider);display:flex;flex-direction:column;gap:8px;padding:0 12px}.vm-time-selector-left-inputs{align-items:flex-start;display:grid;flex-grow:1;justify-content:stretch}.vm-time-selector-left-timezone{align-items:center;display:flex;font-size:12px;gap:8px;justify-content:space-between;margin-bottom:8px}.vm-time-selector-left-timezone__utc{align-items:center;background-color:var(--color-hover-black);border-radius:4px;display:inline-flex;justify-content:center;padding:4px}.vm-time-selector-left__controls{grid-gap:8px;display:grid;gap:8px;grid-template-columns:repeat(2,1fr)}.vm-calendar{background-color:var(--color-background-block);border-radius:8px;display:grid;font-size:14px;grid-template-rows:auto 1fr auto;padding:12px;-webkit-user-select:none;user-select:none}.vm-calendar_mobile{padding:0 12px}.vm-calendar-header{grid-gap:12px;align-items:center;display:grid;gap:12px;grid-template-columns:1fr auto;justify-content:center;min-height:36px;padding-bottom:12px}.vm-calendar-header-left{grid-gap:8px;align-items:center;cursor:pointer;display:grid;gap:8px;grid-template-columns:auto auto;justify-content:flex-start;transition:opacity .2s ease-in-out}.vm-calendar-header-left:hover{opacity:.8}.vm-calendar-header-left__date{color:var(--color-text);font-size:14px;font-weight:700}.vm-calendar-header-left__select-year{align-items:center;display:grid;height:14px;justify-content:center;width:14px}.vm-calendar-header-right{grid-gap:8px;align-items:center;display:grid;gap:8px;grid-template-columns:18px 18px;justify-content:center}.vm-calendar-header-right__next,.vm-calendar-header-right__prev{cursor:pointer;margin:-8px;padding:8px;transition:opacity .2s ease-in-out}.vm-calendar-header-right__next:hover,.vm-calendar-header-right__prev:hover{opacity:.8}.vm-calendar-header-right__prev{transform:rotate(90deg)}.vm-calendar-header-right__next{transform:rotate(-90deg)}.vm-calendar-body{grid-gap:2px;align-items:center;display:grid;gap:2px;grid-template-columns:repeat(7,32px);grid-template-rows:repeat(7,32px);justify-content:center}@media(max-width:500px){.vm-calendar-body{grid-template-columns:repeat(7,calc(14.28571vw - 5.14286px));grid-template-rows:repeat(7,calc(14.28571vw - 5.14286px))}}.vm-calendar-body-cell{align-items:center;border-radius:50%;display:flex;height:100%;justify-content:center;text-align:center}.vm-calendar-body-cell_weekday{color:var(--color-text-secondary)}.vm-calendar-body-cell_day{cursor:pointer;transition:color .2s ease,background-color .3s ease-in-out}.vm-calendar-body-cell_day:hover{background-color:var(--color-hover-black)}.vm-calendar-body-cell_day_empty{pointer-events:none}.vm-calendar-body-cell_day_active{color:#fff}.vm-calendar-body-cell_day_active,.vm-calendar-body-cell_day_active:hover{background-color:var(--color-primary)}.vm-calendar-body-cell_day_today{border:1px solid var(--color-primary)}.vm-calendar-years{grid-gap:8px;display:grid;gap:8px;grid-template-columns:repeat(3,1fr);max-height:400px;overflow:auto}.vm-calendar-years__year{align-items:center;border-radius:8px;cursor:pointer;display:flex;justify-content:center;padding:8px 16px;transition:color .2s ease,background-color .3s ease-in-out}.vm-calendar-years__year:hover{background-color:var(--color-hover-black)}.vm-calendar-years__year_selected{color:#fff}.vm-calendar-years__year_selected,.vm-calendar-years__year_selected:hover{background-color:var(--color-primary)}.vm-calendar-years__year_today{border:1px solid var(--color-primary)}.vm-calendar-footer{align-items:center;display:flex;justify-content:flex-end}.vm-date-time-input{grid-gap:8px 0;align-items:center;cursor:pointer;display:grid;gap:8px 0;grid-template-columns:1fr;justify-content:center;margin-bottom:12px;position:relative;transition:color .2s ease-in-out,border-bottom-color .3s ease}.vm-date-time-input:hover input{border-bottom-color:var(--color-primary)}.vm-date-time-input label{color:var(--color-text-secondary);font-size:12px;grid-column:1/3;-webkit-user-select:none;user-select:none;width:100%}.vm-date-time-input__icon{bottom:2px;position:absolute;right:0}.vm-date-time-input input{background:#0000;border:none;border-bottom:var(--border-divider);color:var(--color-text);padding:0 0 8px}.vm-date-time-input input:focus{border-bottom-color:var(--color-primary)}.vm-date-time-input_error input{border-color:var(--color-error)}.vm-date-time-input_error input:focus{border-bottom-color:var(--color-error)}.vm-date-time-input__error-text{bottom:-12px;color:var(--color-error);font-size:12px;left:0;position:absolute}.vm-button{align-items:center;border-radius:6px;color:#fff;cursor:pointer;display:flex;font-size:12px;font-weight:400;justify-content:center;line-height:15px;min-height:31px;padding:6px 14px;position:relative;text-transform:uppercase;transform-style:preserve-3d;-webkit-user-select:none;user-select:none;white-space:nowrap}.vm-button:hover:after{background-color:var(--color-hover-black)}.vm-button:after,.vm-button:before{border-radius:6px;content:"";height:100%;left:0;position:absolute;top:0;transition:background-color .2s ease;width:100%}.vm-button:before{transform:translateZ(-2px)}.vm-button:after{background-color:#0000;transform:translateZ(-1px)}.vm-button:active:after{transform:scale(.9)}.vm-button span{align-items:center;display:grid;justify-content:center;transform:translateZ(1px)}.vm-button span svg{width:15px}.vm-button__start-icon{margin-right:6px}.vm-button__end-icon{margin-left:6px}.vm-button_disabled{cursor:not-allowed;opacity:.3}.vm-button_icon{padding:6px 8px}.vm-button_icon .vm-button__end-icon,.vm-button_icon .vm-button__start-icon{margin:0}.vm-button_small{min-height:25px;padding:4px 8px}.vm-button_small span svg{width:13px}.vm-button_contained_primary{color:var(--color-primary-text)}.vm-button_contained_primary,.vm-button_contained_primary:before{background-color:var(--color-primary)}.vm-button_contained_primary:hover:after{background-color:#110f0f33}.vm-button_contained_secondary{color:var(--color-secondary-text)}.vm-button_contained_secondary:before{background-color:var(--color-secondary)}.vm-button_contained_secondary:hover:after{background-color:#110f0f33}.vm-button_contained_success{color:var(--color-success-text)}.vm-button_contained_success:before{background-color:var(--color-success)}.vm-button_contained_success:hover:after{background-color:#110f0f33}.vm-button_contained_error{color:var(--color-error-text)}.vm-button_contained_error:before{background-color:var(--color-error)}.vm-button_contained_gray{color:var(--color-text-secondary)}.vm-button_contained_gray:before{background-color:var(--color-text-secondary)}.vm-button_contained_warning{color:var(--color-warning)}.vm-button_contained_warning:before{background-color:var(--color-warning);opacity:.2}.vm-button_text_primary{color:var(--color-primary)}.vm-button_text_secondary{color:var(--color-secondary)}.vm-button_text_success{color:var(--color-success)}.vm-button_text_error{color:var(--color-error)}.vm-button_text_gray{color:var(--color-text-secondary)}.vm-button_text_white{color:#fff}.vm-button_text_warning{color:var(--color-warning)}.vm-button_outlined_primary{border:1px solid var(--color-primary);color:var(--color-primary)}.vm-button_outlined_error{border:1px solid var(--color-error);color:var(--color-error)}.vm-button_outlined_secondary{border:1px solid var(--color-secondary);color:var(--color-secondary)}.vm-button_outlined_success{border:1px solid var(--color-success);color:var(--color-success)}.vm-button_outlined_gray{border:1px solid var(--color-text-secondary);color:var(--color-text-secondary)}.vm-button_outlined_white{border:1px solid #fff;color:#fff}.vm-button_outlined_warning{border:1px solid var(--color-warning);color:var(--color-warning)}.vm-execution-controls-buttons{border-radius:7px;display:flex;justify-content:space-between;min-width:107px}.vm-execution-controls-buttons_mobile{flex-direction:column;gap:12px}.vm-execution-controls-buttons__arrow{align-items:center;display:flex;justify-content:center;transform:rotate(0);transition:transform .2s ease-in-out}.vm-execution-controls-buttons__arrow_open{transform:rotate(180deg)}.vm-execution-controls-list{font-size:14px;max-height:208px;overflow:auto;padding:8px 0;width:124px}.vm-execution-controls-list_mobile{max-height:calc(var(--vh)*100 - 70px);padding:0;width:100%}.vm-server-configurator{align-items:center;display:flex;flex-direction:column;gap:16px;padding-bottom:12px;width:600px}.vm-server-configurator_mobile{align-items:flex-start;grid-auto-rows:-webkit-min-content;grid-auto-rows:min-content;height:100%;width:100%}@media(max-width:768px){.vm-server-configurator{width:100%}}.vm-server-configurator__input{width:100%}.vm-server-configurator__input_flex{align-items:flex-start;display:flex;gap:12px}.vm-server-configurator__title{align-items:center;display:flex;font-size:14px;font-weight:700;grid-column:auto/span 2;justify-content:flex-start;margin-bottom:12px}.vm-server-configurator__info{color:var(--color-text-secondary);font-size:12px;line-height:130%;padding-top:8px}.vm-server-configurator-url{align-items:flex-start;display:flex;gap:8px}.vm-server-configurator-url__button{margin-top:8px}.vm-server-configurator-footer{align-items:center;display:flex;gap:8px;justify-content:flex-end;width:100%}.vm-server-configurator_mobile .vm-server-configurator-footer{display:grid;grid-template-columns:1fr 1fr}.vm-limits-configurator-title__reset{align-items:center;display:flex;flex-grow:1;justify-content:flex-end}.vm-limits-configurator__inputs{grid-gap:12px;align-items:center;display:grid;flex-wrap:wrap;gap:12px;grid-template-columns:repeat(auto-fit,minmax(150px,1fr));justify-content:space-between}.vm-limits-configurator__inputs_mobile{gap:8px}.vm-accordion-header{align-items:center;cursor:pointer;display:grid;font-size:inherit;position:relative}.vm-accordion-header__arrow{align-items:center;display:flex;justify-content:center;position:absolute;right:14px;top:auto;transform:rotate(0);transition:transform .2s ease-in-out}.vm-accordion-header__arrow_open{transform:rotate(180deg)}.vm-accordion-header__arrow svg{height:auto;width:14px}.accordion-section{overflow:hidden}.vm-timezones-item{align-items:center;cursor:pointer;display:flex;gap:8px;justify-content:space-between}.vm-timezones-item_selected{border:var(--border-divider);border-radius:4px;padding:8px 12px}.vm-timezones-item__title{align-items:center;display:flex;gap:8px;text-transform:capitalize}.vm-timezones-item__title svg{color:var(--color-warning);width:14px}.vm-timezones-item__utc{align-items:center;background-color:var(--color-hover-black);border-radius:4px;display:inline-flex;justify-content:center;padding:4px}.vm-timezones-item__icon{align-items:center;display:inline-flex;justify-content:flex-end;margin:0 0 0 auto;transition:transform .2s ease-in}.vm-timezones-item__icon svg{width:14px}.vm-timezones-item__icon_open{transform:rotate(180deg)}.vm-timezones-list{background-color:var(--color-background-block);border-radius:8px;max-height:300px;overflow:auto}.vm-timezones-list_mobile{max-height:calc(var(--vh)*100 - 70px)}.vm-timezones-list_mobile .vm-timezones-list-header__search{padding:0 12px}.vm-timezones-list-header{background-color:var(--color-background-block);border-bottom:var(--border-divider);position:-webkit-sticky;position:sticky;top:0;z-index:2}.vm-timezones-list-header__search{padding:8px}.vm-timezones-list-group{border-bottom:var(--border-divider);padding:8px 0}.vm-timezones-list-group:last-child{border-bottom:none}.vm-timezones-list-group__title{color:var(--color-text-secondary);font-weight:700;padding:8px 12px}.vm-timezones-list-group-options{align-items:flex-start;display:grid}.vm-timezones-list-group-options__item{padding:8px 12px;transition:background-color .2s ease}.vm-timezones-list-group-options__item:hover{background-color:#110f0f1a}.vm-theme-control__toggle{display:inline-flex;min-width:300px;text-transform:capitalize}.vm-theme-control_mobile .vm-theme-control__toggle{display:flex;min-width:100%}.vm-toggles{grid-gap:3px;display:grid;gap:3px;position:relative;width:100%}.vm-toggles__label{color:var(--color-text-secondary);font-size:12px;line-height:1;padding:0 12px}.vm-toggles-group{overflow:hidden;width:100%}.vm-toggles-group,.vm-toggles-group-item{align-items:center;display:grid;justify-content:center;position:relative}.vm-toggles-group-item{border-bottom:var(--border-divider);border-right:var(--border-divider);border-top:var(--border-divider);color:var(--color-text-secondary);cursor:pointer;font-size:12px;font-weight:700;padding:8px;text-align:center;transition:color .15s ease-in;-webkit-user-select:none;user-select:none;z-index:2}.vm-toggles-group-item_first{border-left:var(--border-divider);border-radius:16px 0 0 16px}.vm-toggles-group-item:last-child{border-left:none;border-radius:0 16px 16px 0}.vm-toggles-group-item_icon{gap:4px;grid-template-columns:14px auto}.vm-toggles-group-item:hover{color:var(--color-primary)}.vm-toggles-group-item_active{border-color:#0000;color:var(--color-primary)}.vm-toggles-group-item_active:hover{background-color:#0000}.vm-toggles-group__highlight{background-color:rgba(var(--color-primary),.08);border:1px solid var(--color-primary);height:100%;position:absolute;top:0;transition:left .2s cubic-bezier(.28,.84,.42,1),border-radius .2s linear;z-index:1}.vm-switch{align-items:center;cursor:pointer;display:flex;font-size:12px;justify-content:flex-start;-webkit-user-select:none;user-select:none}.vm-switch_full-width{flex-direction:row-reverse;justify-content:space-between}.vm-switch_full-width .vm-switch__label{margin-left:0}.vm-switch_disabled{cursor:default;opacity:.6}.vm-switch_secondary_active .vm-switch-track{background-color:var(--color-secondary)}.vm-switch_primary_active .vm-switch-track{background-color:var(--color-primary)}.vm-switch_active .vm-switch-track__thumb{left:20px}.vm-switch:hover .vm-switch-track{opacity:.8}.vm-switch-track{align-items:center;background-color:#110f0f66;border-radius:17px;display:flex;height:17px;justify-content:flex-start;padding:3px;position:relative;transition:background-color .2s ease,opacity .3s ease-out;width:34px}.vm-switch-track__thumb{background-color:var(--color-background-block);border-radius:50%;left:3px;min-height:11px;min-width:11px;position:absolute;top:auto;transform-style:preserve-3d;transition:right .2s ease-out,left .2s ease-out}.vm-switch__label{color:var(--color-text-secondary);font-size:inherit;margin-left:8px;transition:color .2s ease;white-space:nowrap}.vm-switch_active .vm-switch__label{color:var(--color-text)}.vm-autocomplete{max-height:300px;overflow:auto;overscroll-behavior:none;position:relative}.vm-autocomplete_mobile{max-height:calc(var(--vh)*100 - 70px)}.vm-autocomplete__no-options{color:var(--color-text-disabled);padding:12px;text-align:center}.vm-autocomplete__loader{grid-gap:8px;align-items:center;color:var(--color-text-secondary);display:grid;gap:8px;grid-template-columns:14px auto;justify-content:center;padding:12px;pointer-events:none;z-index:2}.vm-autocomplete__loader svg{animation:half-circle-spinner-animation 1s linear infinite,vm-fade .5s ease-in}.vm-autocomplete-info,.vm-autocomplete-message{background-color:var(--color-background-block);border-top:var(--border-divider);padding:12px}.vm-autocomplete-message{color:var(--color-warning);font-size:12px;position:relative}.vm-autocomplete-message:after{background:var(--color-warning);content:"";height:100%;left:0;opacity:.1;position:absolute;top:0;width:100%}.vm-autocomplete-info{max-width:500px;min-width:450px;overflow-wrap:anywhere}.vm-autocomplete-info__type{color:var(--color-text-secondary);margin-bottom:8px}.vm-autocomplete-info__description{line-height:130%}.vm-autocomplete-info__description p{margin:12px 0}.vm-autocomplete-info__description p:last-child{margin:0}.vm-query-editor{position:relative}.vm-query-editor .marker-detection{left:0;pointer-events:none;position:absolute;top:0;visibility:hidden;z-index:-9999}.vm-additional-settings{align-items:center;display:inline-flex;flex-wrap:wrap;gap:12px;justify-content:flex-start}.vm-additional-settings__input{flex-basis:160px;margin-bottom:-6px}.vm-additional-settings_mobile{align-items:flex-start;grid-template-columns:1fr;padding:0 12px;width:100%}.vm-additional-settings_mobile,.vm-query-configurator{grid-gap:12px;display:grid;gap:12px}.vm-query-configurator-list{display:grid}.vm-query-configurator-list-row{grid-gap:8px;align-items:center;display:grid;gap:8px;grid-template-columns:1fr auto auto auto}.vm-query-configurator-list-row_mobile{gap:4px}.vm-query-configurator-list-row_disabled{filter:grayscale(100%);opacity:.5}.vm-query-configurator-list-row__button{align-items:start;display:grid;min-height:36px;width:36px}.vm-query-configurator-settings{align-items:center;display:flex;flex-wrap:wrap;gap:12px;justify-content:space-between}.vm-query-configurator-settings__buttons{grid-gap:8px;display:grid;flex-grow:1;gap:8px;grid-template-columns:repeat(3,auto);justify-content:flex-end}.vm-query-history{max-width:80vw;min-width:500px}.vm-query-history_mobile{max-width:100vw;min-width:100vw}.vm-query-history__tabs{border-bottom:var(--border-divider);margin:-12px -12px 0;padding:0 8px}.vm-query-history__tabs_mobile{margin:-12px -12px 0}.vm-query-history-list{align-items:flex-start;display:grid}.vm-query-history-list__group-title{font-weight:700;margin:0 -12px;padding:12px 12px 8px}.vm-query-history-list__group-title_first{padding-top:12px}.vm-query-history-list__no-data{align-items:center;color:var(--color-text-secondary);display:flex;justify-content:center;line-height:18px;padding:16px 12px;text-align:center;white-space:pre-line}.vm-query-history-item{grid-gap:8px;align-items:center;border-bottom:var(--border-divider);display:grid;gap:8px;grid-template-columns:1fr auto;margin:0 -12px;padding:8px 12px}.vm-query-history-item__value{font-family:monospace;overflow-wrap:anywhere;white-space:pre-wrap}.vm-query-history-item__buttons{display:flex}.vm-query-history-footer{display:flex;justify-content:flex-end;padding-top:12px}.vm-spinner{align-items:center;animation:vm-fade 2s cubic-bezier(.28,.84,.42,1.1);background-color:#ffffff80;bottom:0;display:flex;flex-direction:column;justify-content:center;left:0;pointer-events:none;position:fixed;right:0;top:0;z-index:99}.vm-spinner_dark{background-color:#110f0f33}.vm-spinner__message{color:rgba(var(--color-text),.9);font-size:16px;line-height:1.3;margin-top:12px;text-align:center;white-space:pre-line}.half-circle-spinner,.half-circle-spinner *{box-sizing:border-box}.half-circle-spinner{border-radius:100%;height:60px;position:relative;width:60px}.half-circle-spinner .circle{border:6px solid #0000;border-radius:100%;content:"";height:100%;position:absolute;width:100%}.half-circle-spinner .circle.circle-1{animation:half-circle-spinner-animation 1s infinite;border-top-color:var(--color-primary)}.half-circle-spinner .circle.circle-2{animation:half-circle-spinner-animation 1s infinite alternate;border-bottom-color:var(--color-primary)}@keyframes half-circle-spinner-animation{0%{transform:rotate(0deg)}to{transform:rotate(1turn)}}@keyframes vm-fade{0%{opacity:0}to{opacity:1}}.vm-anomaly-config{grid-gap:12px;display:grid;gap:12px;grid-template-rows:calc(var(--vh)*70 - 114px) auto;max-width:80vw;min-height:300px;min-width:400px}.vm-anomaly-config_mobile{grid-template-rows:calc(var(--vh)*100 - 114px) auto;max-width:none;min-height:100%;width:100%}.vm-anomaly-config textarea{height:100%;max-height:900px;overflow:auto;width:100%}.vm-anomaly-config-error{align-items:center;display:flex;flex-direction:column;gap:8px;justify-content:center;text-align:center;width:100%}.vm-anomaly-config-error__icon{align-items:center;color:var(--color-error);display:flex;height:30px;justify-content:center;margin-bottom:8px;width:30px}.vm-anomaly-config-error__title{font-size:16px;font-weight:700}.vm-anomaly-config-error__text{line-height:1.3;max-width:700px}.vm-anomaly-config-footer{align-items:center;display:flex;gap:8px;justify-content:flex-end}.vm-custom-panel{grid-gap:12px;align-items:flex-start;display:grid;gap:12px;grid-template-columns:100%;height:100%}.vm-custom-panel_mobile{gap:8px}.vm-custom-panel__warning{grid-gap:8px;align-items:center;display:grid;gap:8px;grid-template-columns:1fr auto;justify-content:space-between}.vm-custom-panel__warning_mobile{grid-template-columns:1fr}.vm-custom-panel-body{position:relative}.vm-custom-panel-body-header{align-items:center;border-bottom:var(--border-divider);display:flex;font-size:12px;justify-content:space-between;margin:-12px -12px 12px;padding:0 12px;position:relative;z-index:1}.vm-custom-panel-body-header__tabs{display:flex;flex-grow:1;justify-content:flex-start}.vm-custom-panel-body-header__graph-controls{align-items:center;display:flex;gap:8px;margin:5px 10px}.vm-custom-panel-body_mobile .vm-custom-panel-body-header{margin:-12px -12px 12px;padding:0 12px}.vm-tracings-view{grid-gap:12px;display:grid;gap:12px}.vm-tracings-view-trace-header{align-items:center;border-bottom:var(--border-divider);display:flex;justify-content:space-between;padding:8px 8px 8px 12px}.vm-tracings-view-trace-header-title{flex-grow:1;font-size:16px;margin-right:8px}.vm-tracings-view-trace-header-title__query{font-weight:700}.vm-tracings-view-trace-header__expand-icon{align-items:center;color:var(--color-text-secondary);display:flex;justify-content:center;transform:rotate(-90deg);transition:transform .2s ease-in-out;width:20px}.vm-tracings-view-trace-header__expand-icon_open{transform:rotate(0)}.vm-tracings-view-trace__nav{padding:12px 12px 12px 0}.vm-tracings-view-trace__nav_mobile{padding:8px 8px 8px 0}.vm-line-progress{grid-gap:8px;align-items:center;color:var(--color-text-secondary);display:grid;gap:8px;grid-template-columns:1fr auto;justify-content:center}.vm-line-progress-track{background-color:var(--color-hover-black);border-radius:4px;height:20px;width:100%}.vm-line-progress-track__thumb{background-color:#1a90ff;border-radius:4px;height:100%}.vm-nested-nav{border-radius:4px;margin-left:16px;position:relative}.vm-nested-nav_dark .vm-nested-nav-header,.vm-nested-nav_dark .vm-nested-nav-header:after,.vm-nested-nav_dark .vm-nested-nav-header:before{background-color:var(--color-background-body)}.vm-nested-nav_dark .vm-nested-nav-header:hover{box-shadow:0 0 0 1px #ffffff14}.vm-nested-nav_mobile{margin-left:8px}.vm-nested-nav_root>.vm-nested-nav-header:after,.vm-nested-nav_root>.vm-nested-nav-header:before{display:none}.vm-nested-nav-header{grid-gap:8px;background-color:#c9e3f666;border-radius:4px;cursor:pointer;display:grid;gap:8px;grid-template-columns:auto 1fr;margin-bottom:8px;padding:8px;position:relative;transition:box-shadow .2s ease-in-out;z-index:2}.vm-nested-nav-header:after{height:2px;top:calc(50% - 1px);width:12px}.vm-nested-nav-header:after,.vm-nested-nav-header:before{background-color:#c9e3f6;content:"";left:-12px;position:absolute}.vm-nested-nav-header:before{bottom:50%;height:calc(50% + 8px);width:2px}.vm-nested-nav-header:hover{box-shadow:0 0 0 1px #110f0f14}.vm-nested-nav-header__icon{align-items:center;color:var(--color-text-secondary);display:flex;justify-content:center;transform:rotate(-90deg);transition:transform .2s ease-in-out;width:20px}.vm-nested-nav-header__icon_open{transform:rotate(0)}.vm-nested-nav-header__progress{grid-column:2}.vm-nested-nav-header__message{-webkit-line-clamp:3;-webkit-box-orient:vertical;line-clamp:3;display:-moz-box;display:-webkit-box;grid-column:2;line-height:130%;overflow:hidden;position:relative;text-overflow:ellipsis}.vm-nested-nav-header__message_show-full{display:block;overflow:visible}.vm-nested-nav-header__message_duration{color:var(--color-text-secondary)}.vm-nested-nav-header-bottom{align-items:center;display:grid;grid-column:2;grid-template-columns:1fr auto}.vm-nested-nav__childrens>.vm-nested-nav:not(:last-child):before{background-color:#c9e3f6;content:"";height:calc(100% + 32px);left:-12px;position:absolute;top:0;width:2px}.vm-nested-nav__childrens>.vm-nested-nav_dark:not(:last-child):before{background-color:var(--color-background-body)}.vm-nested-nav__childrens>.vm-nested-nav:last-child{margin-bottom:32px}.uplot,.uplot *,.uplot :after,.uplot :before{box-sizing:border-box}.uplot{font-family:system-ui,-apple-system,Segoe UI,Roboto,Helvetica Neue,Arial,Noto Sans,sans-serif,Apple Color Emoji,Segoe UI Emoji,Segoe UI Symbol,Noto Color Emoji;line-height:1.5;width:-webkit-min-content;width:min-content}.u-title{font-size:18px;font-weight:700;text-align:center}.u-wrap{position:relative;-webkit-user-select:none;user-select:none}.u-over,.u-under{position:absolute}.u-under{overflow:hidden}.uplot canvas{display:block;height:100%;position:relative;width:100%}.u-axis{position:absolute}.u-legend{font-size:14px;margin:auto;text-align:center}.u-inline{display:block}.u-inline *{display:inline-block}.u-inline tr{margin-right:16px}.u-legend th{font-weight:600}.u-legend th>*{display:inline-block;vertical-align:middle}.u-legend .u-marker{background-clip:padding-box!important;height:1em;margin-right:4px;width:1em}.u-inline.u-live th:after{content:":";vertical-align:middle}.u-inline:not(.u-live) .u-value{display:none}.u-series>*{padding:4px}.u-series th{cursor:pointer}.u-legend .u-off>*{opacity:.3}.u-select{background:#00000012}.u-cursor-x,.u-cursor-y,.u-select{pointer-events:none;position:absolute}.u-cursor-x,.u-cursor-y{left:0;top:0;will-change:transform}.u-hz .u-cursor-x,.u-vt .u-cursor-y{border-right:1px dashed #607d8b;height:100%}.u-hz .u-cursor-y,.u-vt .u-cursor-x{border-bottom:1px dashed #607d8b;width:100%}.u-cursor-pt{background-clip:padding-box!important;border:0 solid;border-radius:50%;left:0;pointer-events:none;position:absolute;top:0;will-change:transform}.u-axis.u-off,.u-cursor-pt.u-off,.u-cursor-x.u-off,.u-cursor-y.u-off,.u-select.u-off{display:none}.vm-line-chart{pointer-events:auto}.vm-line-chart_panning{pointer-events:none}.vm-line-chart__u-plot{position:relative}.vm-chart-tooltip{grid-gap:12px;word-wrap:break-word;background:var(--color-background-tooltip);border-radius:8px;color:#fff;display:grid;font-family:monospace;font-size:12px;font-weight:400;gap:12px;line-height:150%;padding:12px;pointer-events:none;position:absolute;-webkit-user-select:text;user-select:text;width:370px;z-index:98}.vm-chart-tooltip_hits{max-width:33.3333333333vw;white-space:pre-wrap;width:auto;word-break:break-all}.vm-chart-tooltip_sticky{pointer-events:auto;z-index:99}.vm-chart-tooltip_moved{margin-left:-316.5px;margin-top:-24.5px;position:fixed}.vm-chart-tooltip-header{grid-gap:8px;align-items:center;display:grid;gap:8px;grid-template-columns:1fr 25px 25px;justify-content:center;min-height:25px}.vm-chart-tooltip-header__title{grid-row:1}.vm-chart-tooltip-header__close{color:#fff;grid-column:3;grid-row:1}.vm-chart-tooltip-header__drag{color:#fff;cursor:move;grid-column:2;grid-row:1}.vm-chart-tooltip-header__date{grid-gap:2px;display:grid;gap:2px;grid-column:1}.vm-chart-tooltip-data{align-items:center;display:flex;gap:8px;justify-content:flex-start}.vm-chart-tooltip-data_margin-bottom{margin-bottom:12px}.vm-chart-tooltip-data_margin-top{margin-top:12px}.vm-chart-tooltip-data__marker{border:1px solid #ffffff80;height:14px;width:14px}.vm-chart-tooltip-data__marker_tranparent{opacity:0}.vm-chart-tooltip-data__value{font-size:14px;line-height:1}.vm-chart-tooltip-stats{align-items:center;display:flex;flex-wrap:wrap;gap:8px 12px;justify-content:flex-start}.vm-chart-tooltip-stats-row{align-items:center;display:grid;justify-content:flex-start}.vm-chart-tooltip-stats-row:not(:last-child){padding-right:8px}.vm-chart-tooltip-stats-row__key{line-height:1;margin-right:4px}.vm-chart-tooltip-stats-row__value{font-weight:700}.vm-chart-tooltip__info{white-space:pre-wrap;word-break:break-all}.vm-legend-item{grid-gap:8px;align-items:start;background-color:var(--color-background-block);cursor:pointer;display:grid;font-size:12px;grid-template-columns:auto auto;justify-content:start;padding:8px;transition:.2s ease}.vm-legend-item:hover{background-color:#0000001a}.vm-legend-item_hide{opacity:.5;text-decoration:line-through}.vm-legend-item_static{cursor:default;grid-template-columns:1fr;margin:0;padding:0}.vm-legend-item_static:hover{background-color:var(--color-background-block)}.vm-legend-item__marker{border-radius:2px;box-sizing:border-box;height:14px;position:relative;transition:.2s ease;width:14px}.vm-legend-item-info{font-weight:400;word-break:break-all}.vm-legend-item-info__label{margin-right:2px}.vm-legend-item-info__free-fields{cursor:pointer;padding:2px}.vm-legend-item-info__free-fields:hover{text-decoration:underline}.vm-legend-item-stats{align-items:center;display:flex;gap:8px;grid-column:2}.vm-legend-item-stats-row{align-items:center;display:flex;justify-content:flex-start}.vm-legend-item-stats-row:not(:last-child){padding-right:12px}.vm-legend-item-stats-row__key{color:var(--color-text-secondary);line-height:1;margin-right:4px}.vm-legend{cursor:default;display:flex;flex-wrap:wrap;position:relative}.vm-legend-group{margin:0 12px 12px 0;min-width:23%;width:100%}.vm-legend-group-title{align-items:center;border-bottom:var(--border-divider);display:flex;margin-bottom:1px;padding:8px}.vm-legend-group-title__count{font-weight:700;margin-right:8px}.vm-legend-heatmap{align-items:center;display:inline-grid;gap:4px;grid-template-columns:auto auto;justify-content:space-between}.vm-legend-heatmap__wrapper{align-items:flex-start;display:flex;flex-wrap:wrap;gap:12px;justify-content:space-between}.vm-legend-heatmap__value{color:var(--color-text);font-size:12px}.vm-legend-heatmap__value:last-child{text-align:right}.vm-legend-heatmap-gradient{align-items:center;display:flex;grid-column:1/-1;height:12px;justify-content:center;position:relative;width:200px}.vm-legend-heatmap-gradient__value{align-items:center;border:2px solid var(--color-text);border-radius:50%;display:flex;height:16px;justify-content:center;position:absolute;top:-2px;transform:translateX(-8px);transition:left .1s ease;width:16px}.vm-legend-heatmap-gradient__value span{background-color:var(--color-background-block);box-shadow:var(--box-shadow);color:var(--color-text);font-size:12px;left:auto;padding:4px 8px;position:absolute;top:18px}.vm-legend-heatmap__labels{word-break:break-all}.vm-graph-view{width:100%}.vm-graph-view_full-width{width:calc(100vw - 48px - var(--scrollbar-width))}@media(max-width:768px){.vm-graph-view_full-width{width:calc(100vw - 24px - var(--scrollbar-width))}}.vm-graph-view_full-width_mobile{width:calc(100vw - 24px - var(--scrollbar-width))}.vm-legend-anomaly{cursor:default;flex-wrap:wrap;gap:32px;position:relative}.vm-legend-anomaly,.vm-legend-anomaly-item{align-items:center;display:flex;justify-content:center}.vm-legend-anomaly-item{gap:8px}.vm-legend-anomaly-item svg{height:14px;width:30px}.vm-axes-limits{grid-gap:12px;align-items:center;display:grid;gap:12px;max-width:300px}.vm-axes-limits_mobile{gap:12px;max-width:100%;width:100%}.vm-axes-limits_mobile .vm-axes-limits-list__inputs{grid-template-columns:repeat(2,1fr)}.vm-axes-limits-list{grid-gap:12px;align-items:center;display:grid;gap:12px}.vm-axes-limits-list__inputs{grid-gap:8px;display:grid;gap:8px;grid-template-columns:repeat(2,120px)}.vm-graph-settings-popper{grid-gap:12px;display:grid;gap:12px;padding:0 0 12px}.vm-graph-settings-popper__body{grid-gap:16px;display:grid;gap:16px;padding:0 12px}.vm-json-view__copy{display:flex;justify-content:flex-end;position:-webkit-sticky;position:sticky;top:0;z-index:2}.vm-json-view__code{font-size:14px;line-height:1.4;transform:translateY(-32px);white-space:pre-wrap}.vm-table-view{max-width:100%;overflow:auto}.vm-table-view,.vm-table-view_mobile{margin-top:-12px}.vm-table-view table{margin-top:0}.vm-table-settings-modal .vm-modal-content-body{padding:0}.vm-table-settings-modal-section{border-top:var(--border-divider);padding-block:12px}.vm-table-settings-modal-section:first-child{border-top:none;padding-top:0}.vm-table-settings-modal-section__title{font-size:14px;font-weight:700;margin-bottom:12px;padding-inline:12px}.vm-table-settings-modal-columns__search{padding-inline:12px}.vm-table-settings-modal-columns-list{display:flex;flex-direction:column;margin-bottom:12px;max-height:250px;min-height:250px;overflow:auto}.vm-table-settings-modal-columns-list__item{border-radius:4px;font-size:14px;width:100%}.vm-table-settings-modal-columns-list__item>div{padding:8px 12px}.vm-table-settings-modal-columns-list__item_all{font-weight:700}.vm-table-settings-modal-columns-list__item:hover,.vm-table-settings-modal-columns-list__item_focus{background-color:var(--color-hover-black)}.vm-table-settings-modal-columns-list__item_custom .vm-checkbox__label:after{color:var(--color-text-secondary);content:"(custom column, will be removed if unchecked)";font-style:italic;padding:0 8px;text-align:right;width:100%}.vm-table-settings-modal-columns-no-found{align-items:center;display:flex;flex-direction:column;gap:12px;justify-content:center;min-height:250px;min-width:100%}.vm-table-settings-modal-columns-no-found__info{color:var(--color-text-secondary);font-style:italic;text-align:center}.vm-table-settings-modal-preserve{padding:12px}.vm-table-settings-modal-preserve__info{color:var(--color-text-secondary);font-size:12px;line-height:130%;padding-top:8px}.vm-checkbox{align-items:center;cursor:pointer;display:flex;justify-content:flex-start;-webkit-user-select:none;user-select:none}.vm-checkbox_disabled{cursor:default;opacity:.6}.vm-checkbox_secondary_active .vm-checkbox-track{background-color:var(--color-secondary)}.vm-checkbox_secondary .vm-checkbox-track{border:1px solid var(--color-secondary)}.vm-checkbox_primary_active .vm-checkbox-track{background-color:var(--color-primary)}.vm-checkbox_primary .vm-checkbox-track{border:1px solid var(--color-primary)}.vm-checkbox_active .vm-checkbox-track__thumb{transform:scale(1)}.vm-checkbox:hover .vm-checkbox-track{opacity:.8}.vm-checkbox-track{align-items:center;background-color:#0000;border-radius:4px;display:flex;height:16px;justify-content:center;padding:2px;position:relative;transition:background-color .2s ease,opacity .3s ease-out;width:16px}.vm-checkbox-track__thumb{align-items:center;color:#fff;display:grid;height:12px;justify-content:center;transform:scale(0);transition:transform .1s ease-in-out;width:12px}.vm-checkbox__label{color:inherit;font-size:inherit;margin-left:8px;transition:color .2s ease;white-space:nowrap}.vm-download-report{grid-gap:16px;display:grid;gap:16px;min-width:400px;padding-top:4px}.vm-download-report-settings{grid-gap:12px;display:grid;gap:12px}.vm-download-report-settings textarea{min-height:100px}.vm-download-report__buttons{align-items:center;display:flex;gap:12px;justify-content:flex-end}.vm-download-report-helper{grid-gap:8px;display:grid;gap:8px;padding:12px}.vm-download-report-helper__description{line-height:1.3;max-width:400px;white-space:pre-line}.vm-download-report-helper__description p{margin-bottom:4px}.vm-download-report-helper__buttons{align-items:center;display:flex;gap:8px;justify-content:flex-end}.vm-predefined-panel-header{grid-gap:8px;align-items:center;border-bottom:var(--border-divider);display:grid;gap:8px;grid-template-columns:auto 1fr auto;justify-content:flex-start;padding:8px 16px}.vm-predefined-panel-header__description{line-height:1.3;white-space:pre-wrap}.vm-predefined-panel-header__description ol,.vm-predefined-panel-header__description ul{list-style-position:inside}.vm-predefined-panel-header__description a{color:#c9e3f6;text-decoration:underline}.vm-predefined-panel-header__info{align-items:center;color:var(--color-primary);display:flex;justify-content:center;width:18px}.vm-predefined-panel-body{min-height:500px;padding:8px 16px}@media(max-width:500px){.vm-predefined-panel-body{padding:0}}.vm-predefined-dashboard{background-color:#0000}.vm-predefined-dashboard-header{align-items:center;border-radius:4px;box-shadow:var(--box-shadow);display:grid;font-weight:700;grid-template-columns:1fr auto;justify-content:space-between;line-height:1;overflow:hidden;padding:12px;position:relative;transform-style:preserve-3d;transition:box-shadow .2s ease-in-out}.vm-predefined-dashboard-header_open{border-radius:4px 4px 0 0;box-shadow:none}.vm-predefined-dashboard-header__title{font-size:14px}.vm-predefined-dashboard-header__count{font-size:12px;grid-column:2;margin-right:26px}.vm-predefined-dashboard-panels{grid-gap:12px;display:grid;gap:12px;grid-template-columns:repeat(12,1fr);padding:0}@media(max-width:1000px){.vm-predefined-dashboard-panels{grid-template-columns:1fr}}.vm-predefined-dashboard-panels-panel{border-radius:8px;overflow:hidden;position:relative}.vm-predefined-dashboard-panels-panel:hover .vm-predefined-dashboard-panels-panel__resizer{transform:scale(1)}.vm-predefined-dashboard-panels-panel__resizer{bottom:0;cursor:ew-resize;height:20px;position:absolute;right:0;transform:scale(0);transition:transform .2s ease-in-out;width:20px;z-index:1}.vm-predefined-dashboard-panels-panel__resizer:after{border-bottom:2px solid #110f0f33;border-right:2px solid #110f0f33;bottom:5px;content:"";height:5px;position:absolute;right:5px;width:5px}.vm-predefined-dashboard-panels-panel__alert{grid-column:span 12}.vm-predefined-panels{grid-gap:12px;align-items:flex-start;display:grid;gap:12px}@media(max-width:768px){.vm-predefined-panels{padding:12px 0}}@media(max-width:500px){.vm-predefined-panels{padding:8px 0}}.vm-predefined-panels-tabs{align-items:center;display:flex;flex-wrap:wrap;font-size:12px;gap:8px;justify-content:flex-start;overflow:hidden}@media(max-width:768px){.vm-predefined-panels-tabs{padding:0 12px}}.vm-predefined-panels-tabs__tab{background:var(--color-background-block);border:1px solid #110f0f33;border-radius:8px;color:var(--color-text-secondary);cursor:pointer;padding:8px 12px;text-align:center;text-transform:uppercase;transition:background .2s ease-in-out,color .15s ease-in}@media(max-width:500px){.vm-predefined-panels-tabs__tab{flex-grow:1}}.vm-predefined-panels-tabs__tab:hover{color:var(--color-primary)}.vm-predefined-panels-tabs__tab_active{border-color:var(--color-primary);color:var(--color-primary)}.vm-predefined-panels__dashboards{grid-gap:12px;display:grid;gap:12px}.vm-cardinality-configurator{grid-gap:8px;display:grid;gap:8px}.vm-cardinality-configurator-controls{align-items:center;display:flex;flex-wrap:wrap;gap:8px 12px;justify-content:flex-start}.vm-cardinality-configurator-controls__query{flex-grow:10}.vm-cardinality-configurator-controls__item{flex-grow:2}.vm-cardinality-configurator-controls__item_limit{flex-grow:1}.vm-cardinality-configurator-controls__item svg{color:var(--color-text-disabled)}.vm-cardinality-configurator-bottom{align-items:center;display:flex;flex-wrap:wrap;gap:12px;justify-content:flex-end;width:100%}.vm-cardinality-configurator-bottom-helpful{align-items:center;display:flex;flex-wrap:wrap;gap:8px 12px;justify-content:flex-end}.vm-cardinality-configurator-bottom-helpful a{color:var(--color-text-secondary)}.vm-cardinality-configurator-bottom__execute{align-items:center;display:flex;gap:8px}.vm-cardinality-configurator_mobile .vm-cardinality-configurator-bottom{justify-content:center}.vm-cardinality-configurator_mobile .vm-cardinality-configurator-bottom-helpful{flex-grow:1;justify-content:center}.vm-cardinality-configurator_mobile .vm-cardinality-configurator-bottom__execute,.vm-cardinality-configurator_mobile .vm-cardinality-configurator-bottom__execute button:nth-child(3){width:100%}.vm-cardinality-totals{align-content:flex-start;display:inline-flex;flex-grow:1;flex-wrap:wrap;gap:12px;justify-content:flex-start}.vm-cardinality-totals_mobile{gap:12px;justify-content:center}.vm-cardinality-totals-card{grid-gap:8px 4px;align-items:center;display:grid;gap:8px 4px;grid-template-columns:auto 1fr;justify-content:center}.vm-cardinality-totals-card__info-icon{align-items:center;color:var(--color-primary);display:flex;justify-content:center;width:12px}.vm-cardinality-totals-card__title{align-items:center;color:var(--color-text);display:flex;gap:4px;grid-column:1/-1;justify-content:flex-start}.vm-cardinality-totals-card__tooltip{max-width:280px;padding:8px;white-space:normal}.vm-cardinality-totals-card__value{color:var(--color-primary);font-size:18px;font-weight:700;line-height:14px;text-align:center}.vm-metrics-content-header{margin:-12px -12px 0}.vm-metrics-content-header__title{align-items:center;display:flex;justify-content:flex-start}.vm-metrics-content-header__tip{max-width:300px;padding:8px;white-space:normal}.vm-metrics-content-header__tip p{margin-bottom:8px}.vm-metrics-content-header__tip-icon{align-items:center;color:var(--color-primary);display:flex;justify-content:center;margin-right:4px;width:12px}.vm-metrics-content_mobile .vm-metrics-content-header{margin:-12px -12px 0}.vm-metrics-content__table{overflow:auto;padding-top:12px;width:calc(100vw - 48px - var(--scrollbar-width))}@media(max-width:768px){.vm-metrics-content__table{width:calc(100vw - 24px - var(--scrollbar-width))}}.vm-metrics-content__table_mobile{width:calc(100vw - 24px - var(--scrollbar-width))}.vm-metrics-content__table .vm-table-cell_header{white-space:nowrap}.vm-metrics-content_mobile .vm-metrics-content__table{width:calc(100vw - 24px - var(--scrollbar-width))}.vm-metrics-content__chart{padding-top:12px}.vm-metrics-content-prom-data{align-items:center;display:flex;flex-direction:column;gap:8px;justify-content:center;margin-top:12px;text-align:center;width:100%}.vm-metrics-content-prom-data__icon{align-items:center;color:var(--color-primary);display:flex;height:30px;justify-content:center;margin-bottom:8px;width:30px}.vm-metrics-content-prom-data__title{font-size:16px;font-weight:700}.vm-metrics-content-prom-data__text{line-height:1.3;max-width:700px}.vm-simple-bar-chart{display:grid;grid-template-columns:auto 1fr;height:100%;overflow:hidden;padding-bottom:6px}.vm-simple-bar-chart-y-axis{display:grid;position:relative;transform:translateY(12px)}.vm-simple-bar-chart-y-axis__tick{align-items:center;display:flex;font-size:12px;justify-content:flex-end;line-height:2;padding-right:8px;position:relative;text-align:right;transform-style:preserve-3d;z-index:1}.vm-simple-bar-chart-y-axis__tick:after{border-bottom:var(--border-divider);content:"";height:0;left:100%;position:absolute;top:auto;transform:translateY(-1px) translateZ(-1);width:100vw}.vm-simple-bar-chart-data{align-items:flex-end;display:flex;gap:1%;justify-content:space-between;position:relative}.vm-simple-bar-chart-data-item{align-items:flex-start;background-color:#3b5;display:flex;flex-grow:1;height:calc(100% - 48px);justify-content:center;min-width:1px;transition:background-color .2s ease-in;width:100%}.vm-simple-bar-chart-data-item:hover{background-color:#51d071}.vm-simple-bar-chart-data-item:first-child{background-color:#f79420}.vm-simple-bar-chart-data-item:first-child:hover{background-color:#f9ac51}.vm-cardinality-panel{grid-gap:12px;align-items:flex-start;display:grid;gap:12px}.vm-cardinality-panel_mobile,.vm-cardinality-panel_mobile .vm-cardinality-panel-tips{gap:8px}.vm-cardinality-panel-tips{align-content:flex-start;display:inline-flex;flex-grow:1;flex-wrap:wrap;gap:12px;justify-content:flex-start;width:100%}.vm-cardinality-panel-table__header th:first-child{width:60%}.vm-cardinality-panel-table__header th:not(:first-child){width:auto}.vm-cardinality-panel-table__progress{grid-gap:8px;align-items:center;display:grid;gap:8px;grid-template-columns:minmax(200px,1fr) 70px;justify-content:flex-start}.vm-cardinality-tip{background-color:var(--color-background-block);border-radius:8px;box-shadow:var(--box-shadow);color:var(--color-text-secondary);display:grid;flex-grow:1;grid-template-rows:auto 1fr;overflow:hidden;width:300px}.vm-cardinality-tip-header{align-items:center;border-bottom:var(--border-divider);display:flex;gap:4px;justify-content:center;padding:8px 12px;position:relative}.vm-cardinality-tip-header:after{background:var(--color-warning);content:"";height:100%;left:0;opacity:.1;pointer-events:none;position:absolute;top:0;width:100%}.vm-cardinality-tip-header__tip-icon{align-items:center;color:var(--color-warning);display:flex;justify-content:center;width:12px}.vm-cardinality-tip-header__title{color:var(--color-text);font-weight:700;text-align:center}.vm-cardinality-tip-header__tooltip{font-size:14px;line-height:130%;max-width:280px;padding:8px;white-space:normal}.vm-cardinality-tip__description{line-height:130%;padding:8px 12px}.vm-cardinality-tip__description p{margin-bottom:8px}.vm-cardinality-tip__description p:last-child{margin-bottom:0}.vm-cardinality-tip__description ol,.vm-cardinality-tip__description ul{list-style-position:inside}.vm-cardinality-tip__description ol li,.vm-cardinality-tip__description ul li{margin-bottom:4px}.vm-top-queries-panel-header,.vm-top-queries-panel-header_mobile{margin:-12px -12px 0}.vm-top-queries-panel__table{overflow:auto;padding-top:12px;width:calc(100vw - 48px - var(--scrollbar-width))}@media(max-width:768px){.vm-top-queries-panel__table{width:calc(100vw - 24px - var(--scrollbar-width))}}.vm-top-queries-panel__table_mobile{width:calc(100vw - 24px - var(--scrollbar-width))}.vm-top-queries-panel__table .vm-table-cell_header{white-space:nowrap}.vm-top-queries{grid-gap:12px;align-items:flex-start;display:grid;gap:12px}.vm-top-queries_mobile{gap:8px}.vm-top-queries-controls{grid-gap:8px;display:grid;gap:8px}.vm-top-queries-controls-fields{align-items:center;display:flex;flex-wrap:wrap;gap:12px}.vm-top-queries-controls-fields__item{flex-grow:1;min-width:200px}.vm-top-queries-controls-bottom{grid-gap:12px;align-items:flex-end;display:grid;gap:12px;grid-template-columns:1fr auto;justify-content:space-between}.vm-top-queries-controls-bottom_mobile{gap:8px;grid-template-columns:1fr}.vm-top-queries-controls-bottom__button{align-items:center;display:flex;justify-content:flex-end}.vm-top-queries-panels{grid-gap:12px;display:grid;gap:12px}.vm-top-queries-panels__table-actions{align-items:center;display:flex;gap:8px;height:100%;justify-content:flex-end;padding:0 8px}.vm-trace-page{display:flex;flex-direction:column;min-height:100%}@media(max-width:768px){.vm-trace-page{padding:12px 0}}.vm-trace-page-header{grid-gap:12px;align-items:start;display:grid;gap:12px;grid-template-columns:1fr auto;margin-bottom:12px}@media(max-width:768px){.vm-trace-page-header{grid-template-columns:1fr;padding:0 12px}}.vm-trace-page-header-errors{grid-gap:12px;align-items:flex-start;display:grid;gap:12px;grid-template-columns:1fr;justify-content:stretch}@media(max-width:768px){.vm-trace-page-header-errors{grid-row:2}}.vm-trace-page-header-errors-item{align-items:center;display:grid;justify-content:stretch;position:relative}.vm-trace-page-header-errors-item_margin-bottom{margin-bottom:12px}.vm-trace-page-header-errors-item__filename{min-height:20px}.vm-trace-page-header-errors-item__close{position:absolute;right:8px;top:auto;z-index:2}.vm-trace-page-preview{align-items:center;display:flex;flex-direction:column;flex-grow:1;justify-content:center}.vm-trace-page-preview__text{font-size:14px;line-height:1.8;margin-bottom:12px;text-align:center;white-space:pre-line}.vm-trace-page__dropzone{align-items:center;box-shadow:inset var(--color-primary) 0 0 10px;display:flex;height:100%;justify-content:center;left:0;opacity:.5;pointer-events:none;position:fixed;top:0;width:100%;z-index:100}.vm-upload-json-buttons{grid-gap:12px;align-items:center;display:grid;gap:12px;grid-template-columns:1fr 1fr;justify-content:center}.vm-explore-metrics{grid-gap:12px;align-items:flex-start;display:grid;gap:12px}@media(max-width:500px){.vm-explore-metrics{gap:8px}}.vm-explore-metrics-body{grid-gap:12px;align-items:flex-start;display:grid;gap:12px}@media(max-width:500px){.vm-explore-metrics-body{gap:8px}}.vm-explore-metrics-graph,.vm-explore-metrics-graph_mobile{padding:0 12px 12px}.vm-explore-metrics-graph__warning{align-items:center;display:grid;grid-template-columns:1fr auto;justify-content:space-between}.vm-explore-metrics-item-header{grid-gap:12px;align-items:center;border-bottom:var(--border-divider);display:grid;gap:12px;grid-template-columns:auto 1fr auto auto;justify-content:flex-start;padding:12px}.vm-explore-metrics-item-header_mobile{grid-template-columns:1fr auto;padding:8px 12px}.vm-explore-metrics-item-header__index{color:var(--color-text-secondary);font-size:12px}.vm-explore-metrics-item-header__name{flex-grow:1;font-weight:700;line-height:130%;max-width:100%;overflow:hidden;text-overflow:ellipsis}.vm-explore-metrics-item-header-order{align-items:center;display:grid;grid-column:1;grid-template-columns:auto 20px auto;justify-content:flex-start;text-align:center}.vm-explore-metrics-item-header-order__up{transform:rotate(180deg)}.vm-explore-metrics-item-header__rate{grid-column:3}.vm-explore-metrics-item-header__close{align-items:center;display:grid;grid-column:4;grid-row:1}.vm-explore-metrics-item-header code{background-color:var(--color-hover-black);border-radius:6px;font-size:85%;padding:.2em .4em}.vm-explore-metrics-item-header-modal{grid-gap:12px;align-items:flex-start;display:grid;gap:12px}.vm-explore-metrics-item-header-modal-order{align-items:center;display:flex;gap:12px;justify-content:space-between}.vm-explore-metrics-item-header-modal-order p{align-items:center;display:flex}.vm-explore-metrics-item-header-modal-order__index{margin-left:4px}.vm-explore-metrics-item-header-modal__rate{grid-gap:8px;display:grid;gap:8px}.vm-explore-metrics-item-header-modal__rate p{color:var(--color-text-secondary)}.vm-explore-metrics-item{position:relative}.vm-select-input{align-items:center;border:var(--border-divider);border-radius:4px;cursor:pointer;display:flex;min-height:40px;padding:8px 0 8px 12px;position:relative}.vm-select-input-content{align-items:center;display:flex;flex-grow:1;flex-wrap:wrap;gap:8px;justify-content:flex-start}.vm-select-input-content_mobile{flex-wrap:nowrap}.vm-select-input-content__counter{font-size:14px;line-height:14px}.vm-select-input-content__selected{align-items:center;background-color:var(--color-hover-black);border-radius:4px;display:inline-flex;font-size:14px;justify-content:center;line-height:14px;max-width:100%;padding:2px 2px 2px 6px}.vm-select-input-content__selected span{overflow:hidden;text-overflow:ellipsis;width:100%}.vm-select-input-content__selected svg{align-items:center;background-color:#0000;border-radius:4px;display:flex;justify-content:center;margin-left:10px;padding:4px;transition:background-color .2s ease-in-out;width:20px}.vm-select-input-content__selected svg:hover{background-color:#110f0f1a}.vm-select-input input{background-color:#0000;border:none;border-radius:4px;color:var(--color-text);display:inline-block;flex-grow:1;font-size:14px;height:18px;line-height:18px;min-width:100px;padding:0;position:relative;z-index:2}.vm-select-input input:placeholder-shown{width:auto}.vm-select-input__icon{align-items:center;border-right:var(--border-divider);color:var(--color-text-secondary);cursor:pointer;display:inline-flex;justify-content:flex-end;padding:0 8px;transition:transform .2s ease-in,opacity .2s ease-in}.vm-select-input__icon:last-child{border:none}.vm-select-input__icon svg{width:14px}.vm-select-input__icon_open{transform:rotate(180deg)}.vm-select-input__icon:hover{opacity:.7}.vm-select-options{grid-gap:8px;display:grid;font-size:14px;gap:8px;max-height:208px;max-width:300px;overflow:auto;padding:12px}.vm-select-options_mobile{max-height:calc(var(--vh)*100 - 70px);max-width:100%;padding:0 12px 8px}.vm-select_disabled *{cursor:not-allowed}.vm-select_disabled .vm-select-input-content input{color:var(--color-text-disabled)}.vm-explore-metrics-header{align-items:center;display:flex;flex-wrap:wrap;gap:12px 18px;justify-content:flex-start;max-width:calc(100vw - var(--scrollbar-width))}.vm-explore-metrics-header_mobile{align-items:stretch;flex-direction:column}.vm-explore-metrics-header__job{flex-grow:1;min-width:150px}.vm-explore-metrics-header__instance{flex-grow:2;min-width:150px}.vm-explore-metrics-header__size{grid-gap:12px;align-items:center;display:grid;flex-grow:1;gap:12px;grid-template-columns:1fr auto;min-width:150px}.vm-explore-metrics-header-description{grid-gap:8px;align-items:flex-start;display:grid;gap:8px;grid-template-columns:1fr auto}.vm-explore-metrics-header-description button{color:inherit;min-height:29px}.vm-explore-metrics-header-description code{margin:0 3px}.vm-explore-metrics-header-metrics{flex-grow:1;width:100%}.vm-explore-metrics-header__clear-icon{align-items:center;cursor:pointer;display:flex;justify-content:center;padding:2px}.vm-explore-metrics-header__clear-icon:hover{opacity:.7}.vm-preview-icons{grid-gap:12px;align-items:flex-start;display:grid;gap:12px;grid-template-columns:repeat(auto-fill,100px);justify-content:center}.vm-preview-icons-item{grid-gap:8px;align-items:stretch;border:1px solid #0000;border-radius:4px;cursor:pointer;display:grid;gap:8px;grid-template-rows:1fr auto;height:100px;justify-content:center;padding:12px 8px;transition:box-shadow .2s ease-in-out}.vm-preview-icons-item:hover{box-shadow:0 1px 4px #00000029}.vm-preview-icons-item:active .vm-preview-icons-item__svg{transform:scale(.9)}.vm-preview-icons-item__name{font-size:12px;line-height:2;overflow:hidden;text-align:center;text-overflow:ellipsis;white-space:nowrap}.vm-preview-icons-item__svg{align-items:center;display:flex;height:100%;justify-content:center;transition:transform .1s ease-out}.vm-preview-icons-item__svg svg{height:24px;width:auto}.vm-with-template,.vm-with-template-body{grid-gap:12px;display:grid;gap:12px}.vm-with-template-body{align-items:flex-start;width:100%}.vm-with-template-body-top{align-items:center;display:flex;gap:8px;justify-content:flex-end}.vm-with-template-body__expr textarea{min-height:200px}.vm-with-template-body__result textarea{min-height:60px}.vm-with-template-body textarea{font-family:monospace;height:100%;overflow:auto;width:100%}.vm-with-template-tutorial{grid-gap:16px;display:grid;gap:16px}.vm-with-template-tutorial__title{font-size:16px;font-weight:700}.vm-with-template-tutorial-section{grid-gap:12px;display:grid;gap:12px}.vm-with-template-tutorial-section__text{font-size:14px;line-height:130%;max-width:720px}.vm-code-example{background-color:#110f0f0d;border-radius:4px;display:block;overflow:auto;padding:12px;position:relative;white-space:pre-wrap}.vm-code-example__copy{position:absolute;right:10px;top:10px}.vm-relabeling,.vm-relabeling-header{grid-gap:12px;display:grid;gap:12px}.vm-relabeling-header{align-items:flex-start;width:100%}.vm-relabeling-header-configs textarea{min-height:200px}.vm-relabeling-header__labels textarea{min-height:60px}.vm-relabeling-header textarea{font-family:monospace;height:100%;overflow:auto;width:100%}.vm-relabeling-header-bottom{align-items:center;display:flex;gap:12px;justify-content:flex-end}.vm-relabeling-header-bottom a{color:var(--color-text-secondary)}.vm-relabeling-steps,.vm-relabeling-steps-item{grid-gap:12px;display:grid;gap:12px}.vm-relabeling-steps-item{border-bottom:var(--border-divider);padding:0 12px 12px}.vm-relabeling-steps-item:last-child{border-bottom:none;padding-bottom:0}.vm-relabeling-steps-item__row{display:grid;grid-template-columns:100px 1fr}@media(max-width:500px){.vm-relabeling-steps-item__row{gap:4px;grid-template-columns:1fr}}.vm-relabeling-steps-item__row pre{white-space:pre-wrap}.vm-active-queries-header{grid-gap:12px;align-items:center;display:grid;gap:12px;grid-template-columns:1fr auto;justify-content:space-between;margin-bottom:12px}.vm-active-queries-header-controls{grid-gap:8px;display:grid;gap:8px;grid-column:2}.vm-active-queries-header__update-msg{color:var(--color-text-secondary);font-size:12px;white-space:nowrap}.vm-json-form{grid-gap:12px;display:grid;gap:12px;grid-template-rows:auto calc(var(--vh)*70 - 114px) auto;max-height:900px;max-width:1000px;overflow:hidden;width:70vw}.vm-json-form_mobile{grid-template-rows:auto calc(var(--vh)*100 - 236px) auto;min-height:100%;width:100%}.vm-json-form_one-field{grid-template-rows:calc(var(--vh)*70 - 114px) auto}.vm-json-form_one-field_mobile{grid-template-rows:calc(var(--vh)*100 - 184px) auto}.vm-json-form textarea{height:100%;max-height:900px;overflow:auto;width:100%}.vm-json-form-footer{align-items:center;display:flex;gap:8px;justify-content:space-between}@media(max-width:500px){.vm-json-form-footer{flex-direction:column}.vm-json-form-footer button{flex-grow:1}}.vm-json-form-footer__controls{align-items:center;display:flex;flex-grow:1;gap:8px;justify-content:flex-start}@media(max-width:500px){.vm-json-form-footer__controls{grid-template-columns:repeat(2,1fr);justify-content:center;width:100%}}.vm-json-form-footer__controls_right{display:grid;grid-template-columns:repeat(2,90px);justify-content:flex-end}@media(max-width:500px){.vm-json-form-footer__controls_right{grid-template-columns:repeat(2,1fr);justify-content:center;width:100%}}.vm-query-analyzer-view{grid-gap:12px;display:grid;gap:12px;position:relative}.vm-query-analyzer-view-header{align-items:center;border-bottom:var(--border-divider);display:flex;font-size:12px;justify-content:space-between;margin:-12px -12px 12px;padding:0 12px;position:relative;z-index:1}.vm-query-analyzer-view-header__left{align-items:center;display:flex;gap:8px}.vm-query-analyzer-view_mobile .vm-query-analyzer-view-header{margin:-12px -12px 12px;padding:0 12px}.vm-query-analyzer-info-header{display:flex;gap:12px}.vm-query-analyzer-info-header__period{align-items:center;border:var(--border-divider);border-radius:4px;display:flex;gap:8px;padding:6px 12px}.vm-query-analyzer-info-header__period svg{color:var(--color-primary);width:13px}.vm-query-analyzer-info{grid-gap:16px;display:grid;gap:16px;min-width:300px}.vm-query-analyzer-info-type{color:var(--color-text-secondary);font-style:italic;text-align:center}.vm-query-analyzer-info-item{border-bottom:var(--border-divider);display:grid;line-height:130%;padding-bottom:16px}.vm-query-analyzer-info-item__title{font-weight:700}.vm-query-analyzer-info-item__text{white-space:pre-wrap}#root,body,html{background-attachment:fixed;background-color:#fefeff;background-color:var(--color-background-body);background-repeat:no-repeat;color:#110f0f;color:var(--color-text);cursor:default;font-family:system-ui;font-size:14px;margin:0;min-height:100%}body{overflow:auto}*{-webkit-tap-highlight-color:rgba(0,0,0,0);cursor:inherit;font:inherit;touch-action:pan-x pan-y}code{font-family:monospace}b{font-weight:700}input,textarea{cursor:text}input::placeholder,textarea::placeholder{-webkit-user-select:none;user-select:none}input[type=number]::-webkit-inner-spin-button,input[type=number]::-webkit-outer-spin-button{-webkit-appearance:none;margin:0}.vm-snackbar{animation:vm-slide-snackbar .15s cubic-bezier(.28,.84,.42,1.1);bottom:12px;left:12px;position:fixed;z-index:999}.vm-snackbar-content{align-items:center;display:grid;grid-template-columns:1fr auto}.vm-snackbar-content__close{color:inherit;height:24px;opacity:.8;padding:4px;width:24px}.vm-snackbar_mobile{bottom:0;left:0;right:0}@keyframes vm-slide-snackbar{0%{transform:translateY(100%)}to{transform:translateY(0)}}svg{width:100%}*{scrollbar-color:#a09f9f #fff;scrollbar-color:var(--color-text-disabled) var(--color-background-block);scrollbar-width:thin}::-webkit-scrollbar{width:12px}::-webkit-scrollbar-track{background:#fff;background:var(--color-background-block)}::-webkit-scrollbar-thumb{background-color:#a09f9f;background-color:var(--color-text-disabled);border:3px solid #fff;border:3px solid var(--color-background-block);border-radius:20px}a,abbr,acronym,address,applet,article,aside,audio,big,body,canvas,caption,center,cite,code,del,details,dfn,div,em,embed,fieldset,figcaption,figure,footer,form,h1,h2,h3,h4,h5,h6,header,hgroup,html,iframe,img,ins,kbd,label,legend,li,mark,menu,nav,object,ol,output,p,pre,q,ruby,s,samp,section,small,span,strike,strong,sub,summary,sup,table,tbody,td,tfoot,th,thead,time,tr,tt,u,ul,var,video{border:0;margin:0;padding:0;vertical-align:initial}h1,h2,h3,h4,h5,h6{font-weight:400}article,aside,details,figcaption,figure,footer,header,hgroup,menu,nav,section{display:block}body{line-height:1}q:after,q:before{content:""}table{border-collapse:collapse;border-spacing:0}input::placeholder{opacity:1;transition:opacity .3s ease}input:focus::placeholder{opacity:0;transition:opacity .3s ease}*{box-sizing:border-box;outline:none}button{background:none;border:none;border-radius:0;padding:0}strong{letter-spacing:1px}input[type=file]{cursor:pointer;font-size:0;height:100%;left:0;opacity:0;position:absolute;top:0;width:100%}input[type=file]:disabled{cursor:not-allowed}a{color:inherit;text-decoration:inherit}input,textarea{-webkit-text-fill-color:inherit;appearance:none;-webkit-appearance:none}input:disabled,textarea:disabled{opacity:1!important}input:placeholder-shown,textarea:placeholder-shown{width:100%}input:-webkit-autofill,input:-webkit-autofill:active,input:-webkit-autofill:focus,input:-webkit-autofill:hover{-webkit-box-shadow:inset 0 0 0 0 #fff!important;width:100%;z-index:2}.vm-header-button{border:1px solid #110f0f33}.vm-list-item{background-color:#0000;cursor:pointer;padding:12px;transition:background-color .2s ease}.vm-list-item_mobile{padding:12px}.vm-list-item:hover,.vm-list-item_active{background-color:#0000000f;background-color:var(--color-hover-black)}.vm-list-item_multiselect{grid-gap:8px;align-items:center;display:grid;gap:8px;grid-template-columns:10px 1fr;justify-content:flex-start}.vm-list-item_multiselect svg{animation:vm-scale .15s cubic-bezier(.28,.84,.42,1)}.vm-list-item_multiselect span{grid-column:2}.vm-list-item_multiselect_selected{color:#3f51b5;color:var(--color-primary)}.vm-list-item_with-icon{grid-gap:4px;display:grid;gap:4px;grid-template-columns:14px 1fr}.vm-list-item_with-icon,.vm-mobile-option{align-items:center;justify-content:flex-start}.vm-mobile-option{display:flex;gap:8px;padding:6px 0;-webkit-user-select:none;user-select:none;width:100%}.vm-mobile-option__arrow,.vm-mobile-option__icon{align-items:center;display:flex;justify-content:center}.vm-mobile-option__icon{color:#3f51b5;color:var(--color-primary);height:22px;width:22px}.vm-mobile-option__arrow{color:#3f51b5;color:var(--color-primary);height:14px;transform:rotate(-90deg);width:14px}.vm-mobile-option-text{grid-gap:2px;align-items:center;display:grid;flex-grow:1;gap:2px}.vm-mobile-option-text__label{font-weight:700}.vm-mobile-option-text__value{color:#706f6f;color:var(--color-text-secondary);font-size:12px}.vm-block{background-color:#fff;background-color:var(--color-background-block);border-radius:8px;box-shadow:1px 2px 6px #00000014;box-shadow:var(--box-shadow);padding:12px}.vm-block_mobile{border-radius:0;padding:12px}.vm-block_empty-padding{padding:0}.vm-section-header{align-items:center;border-bottom:1px solid #00000026;border-bottom:var(--border-divider);border-radius:8px 8px 0 0;display:grid;grid-template-columns:1fr auto;justify-content:center;padding:0 12px}.vm-section-header__title{font-size:14px;font-weight:700}.vm-section-header__title_mobile{-webkit-line-clamp:2;line-clamp:2;-webkit-box-orient:vertical;display:-webkit-box;overflow:hidden;text-overflow:ellipsis}.vm-section-header__tabs{align-items:center;display:flex;font-size:12px;justify-content:flex-start}.vm-table{border-collapse:initial;border-spacing:0;margin-top:-12px;width:100%}.vm-table,.vm-table__row{background-color:#fff;background-color:var(--color-background-block)}.vm-table__row{transition:background-color .2s ease}.vm-table__row:hover:not(.vm-table__row_header){background-color:#0000000f;background-color:var(--color-hover-black)}.vm-table__row_header{position:relative;z-index:2}.vm-table__row_selected{background-color:#1a90ff0d}.vm-table-cell{border-bottom:1px solid #00000026;border-bottom:var(--border-divider);line-height:1.5;overflow-wrap:anywhere;padding:4px;vertical-align:top}.vm-table-cell__content{align-items:center;display:flex;justify-content:flex-start}.vm-table-cell_sort{cursor:pointer}.vm-table-cell_sort:hover{background-color:#0000000f;background-color:var(--color-hover-black)}.vm-table-cell_header{font-weight:700;overflow-wrap:normal;text-align:left}.vm-table-cell_gray{color:#110f0f;color:var(--color-text);opacity:.4}.vm-table-cell_right{text-align:right}.vm-table-cell_right .vm-table-cell__content{justify-content:flex-end}.vm-table-cell_no-wrap{white-space:nowrap}.vm-table-cell_no-padding{padding:0}.vm-table-cell_pre{white-space:pre-wrap}.vm-table-cell_logs-time{overflow-wrap:normal;white-space:nowrap}.vm-table-cell_logs{font-family:monospace;line-height:1.2;overflow-wrap:normal;width:100%}.vm-table__sort-icon{align-items:center;display:flex;justify-content:center;margin:0 8px;opacity:.4;transition:opacity .2s ease,transform .2s ease-in-out;width:15px}.vm-table__sort-icon_active{opacity:1}.vm-table__sort-icon_desc{transform:rotate(180deg)}.vm-link{cursor:pointer;transition:color .2s ease}.vm-link_colored{color:#3f51b5;color:var(--color-primary)}.vm-link_underlined{text-decoration:underline}.vm-link_with-icon{grid-gap:6px;align-items:center;display:grid;gap:6px;grid-template-columns:14px auto;justify-content:center}.vm-link:hover{color:#3f51b5;color:var(--color-primary);text-decoration:underline}.vm-dynamic-number{color:#a09f9f;color:var(--color-text-disabled);font-size:12px}.vm-dynamic-number_positive{color:#4caf50;color:var(--color-success)}.vm-dynamic-number_negative{color:#fd080e;color:var(--color-error)}.vm-dynamic-number_down:before{content:"↓"}.vm-dynamic-number_up:before{content:"↑"}:root{--color-primary:#3f51b5;--color-secondary:#e91e63;--color-error:#fd080e;--color-warning:#ff8308;--color-info:#03a9f4;--color-success:#4caf50;--color-primary-text:#fff;--color-secondary-text:#fff;--color-error-text:#fff;--color-warning-text:#fff;--color-info-text:#fff;--color-success-text:#fff;--color-background-body:#fefeff;--color-background-block:#fff;--color-background-tooltip:#505050e6;--color-text:#110f0f;--color-text-secondary:#706f6f;--color-text-disabled:#a09f9f;--box-shadow:#00000014 1px 2px 6px;--box-shadow-popper:#0000001a 0px 2px 8px 0px;--border-divider:1px solid #00000026;--color-hover-black:#0000000f} \ No newline at end of file diff --git a/app/vmselect/vmui/static/js/main.0e69b7a9.js b/app/vmselect/vmui/static/js/main.0e69b7a9.js deleted file mode 100644 index 11bb70daa..000000000 --- a/app/vmselect/vmui/static/js/main.0e69b7a9.js +++ /dev/null @@ -1,2 +0,0 @@ -/*! For license information please see main.0e69b7a9.js.LICENSE.txt */ -(()=>{var e={61:(e,t,n)=>{"use strict";var r=n(375),a=n(629),o=a(r("String.prototype.indexOf"));e.exports=function(e,t){var n=r(e,!!t);return"function"===typeof n&&o(e,".prototype.")>-1?a(n):n}},629:(e,t,n)=>{"use strict";var r=n(989),a=n(375),o=n(259),i=n(277),l=a("%Function.prototype.apply%"),s=a("%Function.prototype.call%"),c=a("%Reflect.apply%",!0)||r.call(s,l),u=n(709),d=a("%Math.max%");e.exports=function(e){if("function"!==typeof e)throw new i("a function is required");var t=c(r,s,arguments);return o(t,1+d(0,e.length-(arguments.length-1)),!0)};var h=function(){return c(r,l,arguments)};u?u(e.exports,"apply",{value:h}):e.exports.apply=h},159:function(e){e.exports=function(){"use strict";var e=1e3,t=6e4,n=36e5,r="millisecond",a="second",o="minute",i="hour",l="day",s="week",c="month",u="quarter",d="year",h="date",m="Invalid Date",p=/^(\d{4})[-/]?(\d{1,2})?[-/]?(\d{0,2})[Tt\s]*(\d{1,2})?:?(\d{1,2})?:?(\d{1,2})?[.:]?(\d+)?$/,f=/\[([^\]]+)]|Y{1,4}|M{1,4}|D{1,2}|d{1,4}|H{1,2}|h{1,2}|a|A|m{1,2}|s{1,2}|Z{1,2}|SSS/g,v={name:"en",weekdays:"Sunday_Monday_Tuesday_Wednesday_Thursday_Friday_Saturday".split("_"),months:"January_February_March_April_May_June_July_August_September_October_November_December".split("_"),ordinal:function(e){var t=["th","st","nd","rd"],n=e%100;return"["+e+(t[(n-20)%10]||t[n]||t[0])+"]"}},g=function(e,t,n){var r=String(e);return!r||r.length>=t?e:""+Array(t+1-r.length).join(n)+e},y={s:g,z:function(e){var t=-e.utcOffset(),n=Math.abs(t),r=Math.floor(n/60),a=n%60;return(t<=0?"+":"-")+g(r,2,"0")+":"+g(a,2,"0")},m:function e(t,n){if(t.date()1)return e(i[0])}else{var l=t.name;b[l]=t,a=l}return!r&&a&&(_=a),a||!r&&_},S=function(e,t){if(k(e))return e.clone();var n="object"==typeof t?t:{};return n.date=e,n.args=arguments,new E(n)},C=y;C.l=x,C.i=k,C.w=function(e,t){return S(e,{locale:t.$L,utc:t.$u,x:t.$x,$offset:t.$offset})};var E=function(){function v(e){this.$L=x(e.locale,null,!0),this.parse(e),this.$x=this.$x||e.x||{},this[w]=!0}var g=v.prototype;return g.parse=function(e){this.$d=function(e){var t=e.date,n=e.utc;if(null===t)return new Date(NaN);if(C.u(t))return new Date;if(t instanceof Date)return new Date(t);if("string"==typeof t&&!/Z$/i.test(t)){var r=t.match(p);if(r){var a=r[2]-1||0,o=(r[7]||"0").substring(0,3);return n?new Date(Date.UTC(r[1],a,r[3]||1,r[4]||0,r[5]||0,r[6]||0,o)):new Date(r[1],a,r[3]||1,r[4]||0,r[5]||0,r[6]||0,o)}}return new Date(t)}(e),this.init()},g.init=function(){var e=this.$d;this.$y=e.getFullYear(),this.$M=e.getMonth(),this.$D=e.getDate(),this.$W=e.getDay(),this.$H=e.getHours(),this.$m=e.getMinutes(),this.$s=e.getSeconds(),this.$ms=e.getMilliseconds()},g.$utils=function(){return C},g.isValid=function(){return!(this.$d.toString()===m)},g.isSame=function(e,t){var n=S(e);return this.startOf(t)<=n&&n<=this.endOf(t)},g.isAfter=function(e,t){return S(e)=0&&(o[d]=parseInt(u,10))}var h=o[3],m=24===h?0:h,p=o[0]+"-"+o[1]+"-"+o[2]+" "+m+":"+o[4]+":"+o[5]+":000",f=+t;return(a.utc(p).valueOf()-(f-=f%1e3))/6e4},s=r.prototype;s.tz=function(e,t){void 0===e&&(e=o);var n,r=this.utcOffset(),i=this.toDate(),l=i.toLocaleString("en-US",{timeZone:e}),s=Math.round((i-new Date(l))/1e3/60),c=15*-Math.round(i.getTimezoneOffset()/15)-s;if(Number(c)){if(n=a(l,{locale:this.$L}).$set("millisecond",this.$ms).utcOffset(c,!0),t){var u=n.utcOffset();n=n.add(r-u,"minute")}}else n=this.utcOffset(0,t);return n.$x.$timezone=e,n},s.offsetName=function(e){var t=this.$x.$timezone||a.tz.guess(),n=i(this.valueOf(),t,{timeZoneName:e}).find((function(e){return"timezonename"===e.type.toLowerCase()}));return n&&n.value};var c=s.startOf;s.startOf=function(e,t){if(!this.$x||!this.$x.$timezone)return c.call(this,e,t);var n=a(this.format("YYYY-MM-DD HH:mm:ss:SSS"),{locale:this.$L});return c.call(n,e,t).tz(this.$x.$timezone,!0)},a.tz=function(e,t,n){var r=n&&t,i=n||t||o,s=l(+a(),i);if("string"!=typeof e)return a(e).tz(i);var c=function(e,t,n){var r=e-60*t*1e3,a=l(r,n);if(t===a)return[r,t];var o=l(r-=60*(a-t)*1e3,n);return a===o?[r,a]:[e-60*Math.min(a,o)*1e3,Math.max(a,o)]}(a.utc(e,r).valueOf(),s,i),u=c[0],d=c[1],h=a(u).utcOffset(d);return h.$x.$timezone=i,h},a.tz.guess=function(){return Intl.DateTimeFormat().resolvedOptions().timeZone},a.tz.setDefault=function(e){o=e}}}()},220:function(e){e.exports=function(){"use strict";var e="minute",t=/[+-]\d\d(?::?\d\d)?/g,n=/([+-]|\d\d)/g;return function(r,a,o){var i=a.prototype;o.utc=function(e){return new a({date:e,utc:!0,args:arguments})},i.utc=function(t){var n=o(this.toDate(),{locale:this.$L,utc:!0});return t?n.add(this.utcOffset(),e):n},i.local=function(){return o(this.toDate(),{locale:this.$L,utc:!1})};var l=i.parse;i.parse=function(e){e.utc&&(this.$u=!0),this.$utils().u(e.$offset)||(this.$offset=e.$offset),l.call(this,e)};var s=i.init;i.init=function(){if(this.$u){var e=this.$d;this.$y=e.getUTCFullYear(),this.$M=e.getUTCMonth(),this.$D=e.getUTCDate(),this.$W=e.getUTCDay(),this.$H=e.getUTCHours(),this.$m=e.getUTCMinutes(),this.$s=e.getUTCSeconds(),this.$ms=e.getUTCMilliseconds()}else s.call(this)};var c=i.utcOffset;i.utcOffset=function(r,a){var o=this.$utils().u;if(o(r))return this.$u?0:o(this.$offset)?c.call(this):this.$offset;if("string"==typeof r&&(r=function(e){void 0===e&&(e="");var r=e.match(t);if(!r)return null;var a=(""+r[0]).match(n)||["-",0,0],o=a[0],i=60*+a[1]+ +a[2];return 0===i?0:"+"===o?i:-i}(r),null===r))return this;var i=Math.abs(r)<=16?60*r:r,l=this;if(a)return l.$offset=i,l.$u=0===r,l;if(0!==r){var s=this.$u?this.toDate().getTimezoneOffset():-1*this.utcOffset();(l=this.local().add(i+s,e)).$offset=i,l.$x.$localOffset=s}else l=this.utc();return l};var u=i.format;i.format=function(e){var t=e||(this.$u?"YYYY-MM-DDTHH:mm:ss[Z]":"");return u.call(this,t)},i.valueOf=function(){var e=this.$utils().u(this.$offset)?0:this.$offset+(this.$x.$localOffset||this.$d.getTimezoneOffset());return this.$d.valueOf()-6e4*e},i.isUTC=function(){return!!this.$u},i.toISOString=function(){return this.toDate().toISOString()},i.toString=function(){return this.toDate().toUTCString()};var d=i.toDate;i.toDate=function(e){return"s"===e&&this.$offset?o(this.format("YYYY-MM-DD HH:mm:ss:SSS")).toDate():d.call(this)};var h=i.diff;i.diff=function(e,t,n){if(e&&this.$u===e.$u)return h.call(this,e,t,n);var r=this.local(),a=o(e).local();return h.call(r,a,t,n)}}}()},411:(e,t,n)=>{"use strict";var r=n(709),a=n(430),o=n(277),i=n(553);e.exports=function(e,t,n){if(!e||"object"!==typeof e&&"function"!==typeof e)throw new o("`obj` must be an object or a function`");if("string"!==typeof t&&"symbol"!==typeof t)throw new o("`property` must be a string or a symbol`");if(arguments.length>3&&"boolean"!==typeof arguments[3]&&null!==arguments[3])throw new o("`nonEnumerable`, if provided, must be a boolean or null");if(arguments.length>4&&"boolean"!==typeof arguments[4]&&null!==arguments[4])throw new o("`nonWritable`, if provided, must be a boolean or null");if(arguments.length>5&&"boolean"!==typeof arguments[5]&&null!==arguments[5])throw new o("`nonConfigurable`, if provided, must be a boolean or null");if(arguments.length>6&&"boolean"!==typeof arguments[6])throw new o("`loose`, if provided, must be a boolean");var l=arguments.length>3?arguments[3]:null,s=arguments.length>4?arguments[4]:null,c=arguments.length>5?arguments[5]:null,u=arguments.length>6&&arguments[6],d=!!i&&i(e,t);if(r)r(e,t,{configurable:null===c&&d?d.configurable:!c,enumerable:null===l&&d?d.enumerable:!l,value:n,writable:null===s&&d?d.writable:!s});else{if(!u&&(l||s||c))throw new a("This environment does not support defining a property as non-configurable, non-writable, or non-enumerable.");e[t]=n}}},709:(e,t,n)=>{"use strict";var r=n(375)("%Object.defineProperty%",!0)||!1;if(r)try{r({},"a",{value:1})}catch(a){r=!1}e.exports=r},123:e=>{"use strict";e.exports=EvalError},953:e=>{"use strict";e.exports=Error},780:e=>{"use strict";e.exports=RangeError},768:e=>{"use strict";e.exports=ReferenceError},430:e=>{"use strict";e.exports=SyntaxError},277:e=>{"use strict";e.exports=TypeError},619:e=>{"use strict";e.exports=URIError},307:e=>{"use strict";var t=Object.prototype.toString,n=Math.max,r=function(e,t){for(var n=[],r=0;r{"use strict";var r=n(307);e.exports=Function.prototype.bind||r},375:(e,t,n)=>{"use strict";var r,a=n(953),o=n(123),i=n(780),l=n(768),s=n(430),c=n(277),u=n(619),d=Function,h=function(e){try{return d('"use strict"; return ('+e+").constructor;")()}catch(t){}},m=Object.getOwnPropertyDescriptor;if(m)try{m({},"")}catch(R){m=null}var p=function(){throw new c},f=m?function(){try{return p}catch(e){try{return m(arguments,"callee").get}catch(t){return p}}}():p,v=n(757)(),g=n(442)(),y=Object.getPrototypeOf||(g?function(e){return e.__proto__}:null),_={},b="undefined"!==typeof Uint8Array&&y?y(Uint8Array):r,w={__proto__:null,"%AggregateError%":"undefined"===typeof AggregateError?r:AggregateError,"%Array%":Array,"%ArrayBuffer%":"undefined"===typeof ArrayBuffer?r:ArrayBuffer,"%ArrayIteratorPrototype%":v&&y?y([][Symbol.iterator]()):r,"%AsyncFromSyncIteratorPrototype%":r,"%AsyncFunction%":_,"%AsyncGenerator%":_,"%AsyncGeneratorFunction%":_,"%AsyncIteratorPrototype%":_,"%Atomics%":"undefined"===typeof Atomics?r:Atomics,"%BigInt%":"undefined"===typeof BigInt?r:BigInt,"%BigInt64Array%":"undefined"===typeof BigInt64Array?r:BigInt64Array,"%BigUint64Array%":"undefined"===typeof BigUint64Array?r:BigUint64Array,"%Boolean%":Boolean,"%DataView%":"undefined"===typeof DataView?r:DataView,"%Date%":Date,"%decodeURI%":decodeURI,"%decodeURIComponent%":decodeURIComponent,"%encodeURI%":encodeURI,"%encodeURIComponent%":encodeURIComponent,"%Error%":a,"%eval%":eval,"%EvalError%":o,"%Float32Array%":"undefined"===typeof Float32Array?r:Float32Array,"%Float64Array%":"undefined"===typeof Float64Array?r:Float64Array,"%FinalizationRegistry%":"undefined"===typeof FinalizationRegistry?r:FinalizationRegistry,"%Function%":d,"%GeneratorFunction%":_,"%Int8Array%":"undefined"===typeof Int8Array?r:Int8Array,"%Int16Array%":"undefined"===typeof Int16Array?r:Int16Array,"%Int32Array%":"undefined"===typeof Int32Array?r:Int32Array,"%isFinite%":isFinite,"%isNaN%":isNaN,"%IteratorPrototype%":v&&y?y(y([][Symbol.iterator]())):r,"%JSON%":"object"===typeof JSON?JSON:r,"%Map%":"undefined"===typeof Map?r:Map,"%MapIteratorPrototype%":"undefined"!==typeof Map&&v&&y?y((new Map)[Symbol.iterator]()):r,"%Math%":Math,"%Number%":Number,"%Object%":Object,"%parseFloat%":parseFloat,"%parseInt%":parseInt,"%Promise%":"undefined"===typeof Promise?r:Promise,"%Proxy%":"undefined"===typeof Proxy?r:Proxy,"%RangeError%":i,"%ReferenceError%":l,"%Reflect%":"undefined"===typeof Reflect?r:Reflect,"%RegExp%":RegExp,"%Set%":"undefined"===typeof Set?r:Set,"%SetIteratorPrototype%":"undefined"!==typeof Set&&v&&y?y((new Set)[Symbol.iterator]()):r,"%SharedArrayBuffer%":"undefined"===typeof SharedArrayBuffer?r:SharedArrayBuffer,"%String%":String,"%StringIteratorPrototype%":v&&y?y(""[Symbol.iterator]()):r,"%Symbol%":v?Symbol:r,"%SyntaxError%":s,"%ThrowTypeError%":f,"%TypedArray%":b,"%TypeError%":c,"%Uint8Array%":"undefined"===typeof Uint8Array?r:Uint8Array,"%Uint8ClampedArray%":"undefined"===typeof Uint8ClampedArray?r:Uint8ClampedArray,"%Uint16Array%":"undefined"===typeof Uint16Array?r:Uint16Array,"%Uint32Array%":"undefined"===typeof Uint32Array?r:Uint32Array,"%URIError%":u,"%WeakMap%":"undefined"===typeof WeakMap?r:WeakMap,"%WeakRef%":"undefined"===typeof WeakRef?r:WeakRef,"%WeakSet%":"undefined"===typeof WeakSet?r:WeakSet};if(y)try{null.error}catch(R){var k=y(y(R));w["%Error.prototype%"]=k}var x=function e(t){var n;if("%AsyncFunction%"===t)n=h("async function () {}");else if("%GeneratorFunction%"===t)n=h("function* () {}");else if("%AsyncGeneratorFunction%"===t)n=h("async function* () {}");else if("%AsyncGenerator%"===t){var r=e("%AsyncGeneratorFunction%");r&&(n=r.prototype)}else if("%AsyncIteratorPrototype%"===t){var a=e("%AsyncGenerator%");a&&y&&(n=y(a.prototype))}return w[t]=n,n},S={__proto__:null,"%ArrayBufferPrototype%":["ArrayBuffer","prototype"],"%ArrayPrototype%":["Array","prototype"],"%ArrayProto_entries%":["Array","prototype","entries"],"%ArrayProto_forEach%":["Array","prototype","forEach"],"%ArrayProto_keys%":["Array","prototype","keys"],"%ArrayProto_values%":["Array","prototype","values"],"%AsyncFunctionPrototype%":["AsyncFunction","prototype"],"%AsyncGenerator%":["AsyncGeneratorFunction","prototype"],"%AsyncGeneratorPrototype%":["AsyncGeneratorFunction","prototype","prototype"],"%BooleanPrototype%":["Boolean","prototype"],"%DataViewPrototype%":["DataView","prototype"],"%DatePrototype%":["Date","prototype"],"%ErrorPrototype%":["Error","prototype"],"%EvalErrorPrototype%":["EvalError","prototype"],"%Float32ArrayPrototype%":["Float32Array","prototype"],"%Float64ArrayPrototype%":["Float64Array","prototype"],"%FunctionPrototype%":["Function","prototype"],"%Generator%":["GeneratorFunction","prototype"],"%GeneratorPrototype%":["GeneratorFunction","prototype","prototype"],"%Int8ArrayPrototype%":["Int8Array","prototype"],"%Int16ArrayPrototype%":["Int16Array","prototype"],"%Int32ArrayPrototype%":["Int32Array","prototype"],"%JSONParse%":["JSON","parse"],"%JSONStringify%":["JSON","stringify"],"%MapPrototype%":["Map","prototype"],"%NumberPrototype%":["Number","prototype"],"%ObjectPrototype%":["Object","prototype"],"%ObjProto_toString%":["Object","prototype","toString"],"%ObjProto_valueOf%":["Object","prototype","valueOf"],"%PromisePrototype%":["Promise","prototype"],"%PromiseProto_then%":["Promise","prototype","then"],"%Promise_all%":["Promise","all"],"%Promise_reject%":["Promise","reject"],"%Promise_resolve%":["Promise","resolve"],"%RangeErrorPrototype%":["RangeError","prototype"],"%ReferenceErrorPrototype%":["ReferenceError","prototype"],"%RegExpPrototype%":["RegExp","prototype"],"%SetPrototype%":["Set","prototype"],"%SharedArrayBufferPrototype%":["SharedArrayBuffer","prototype"],"%StringPrototype%":["String","prototype"],"%SymbolPrototype%":["Symbol","prototype"],"%SyntaxErrorPrototype%":["SyntaxError","prototype"],"%TypedArrayPrototype%":["TypedArray","prototype"],"%TypeErrorPrototype%":["TypeError","prototype"],"%Uint8ArrayPrototype%":["Uint8Array","prototype"],"%Uint8ClampedArrayPrototype%":["Uint8ClampedArray","prototype"],"%Uint16ArrayPrototype%":["Uint16Array","prototype"],"%Uint32ArrayPrototype%":["Uint32Array","prototype"],"%URIErrorPrototype%":["URIError","prototype"],"%WeakMapPrototype%":["WeakMap","prototype"],"%WeakSetPrototype%":["WeakSet","prototype"]},C=n(989),E=n(155),N=C.call(Function.call,Array.prototype.concat),A=C.call(Function.apply,Array.prototype.splice),M=C.call(Function.call,String.prototype.replace),T=C.call(Function.call,String.prototype.slice),L=C.call(Function.call,RegExp.prototype.exec),I=/[^%.[\]]+|\[(?:(-?\d+(?:\.\d+)?)|(["'])((?:(?!\2)[^\\]|\\.)*?)\2)\]|(?=(?:\.|\[\])(?:\.|\[\]|%$))/g,P=/\\(\\)?/g,O=function(e,t){var n,r=e;if(E(S,r)&&(r="%"+(n=S[r])[0]+"%"),E(w,r)){var a=w[r];if(a===_&&(a=x(r)),"undefined"===typeof a&&!t)throw new c("intrinsic "+e+" exists, but is not available. Please file an issue!");return{alias:n,name:r,value:a}}throw new s("intrinsic "+e+" does not exist!")};e.exports=function(e,t){if("string"!==typeof e||0===e.length)throw new c("intrinsic name must be a non-empty string");if(arguments.length>1&&"boolean"!==typeof t)throw new c('"allowMissing" argument must be a boolean');if(null===L(/^%?[^%]*%?$/,e))throw new s("`%` may not be present anywhere but at the beginning and end of the intrinsic name");var n=function(e){var t=T(e,0,1),n=T(e,-1);if("%"===t&&"%"!==n)throw new s("invalid intrinsic syntax, expected closing `%`");if("%"===n&&"%"!==t)throw new s("invalid intrinsic syntax, expected opening `%`");var r=[];return M(e,I,(function(e,t,n,a){r[r.length]=n?M(a,P,"$1"):t||e})),r}(e),r=n.length>0?n[0]:"",a=O("%"+r+"%",t),o=a.name,i=a.value,l=!1,u=a.alias;u&&(r=u[0],A(n,N([0,1],u)));for(var d=1,h=!0;d=n.length){var g=m(i,p);i=(h=!!g)&&"get"in g&&!("originalValue"in g.get)?g.get:i[p]}else h=E(i,p),i=i[p];h&&!l&&(w[o]=i)}}return i}},553:(e,t,n)=>{"use strict";var r=n(375)("%Object.getOwnPropertyDescriptor%",!0);if(r)try{r([],"length")}catch(a){r=null}e.exports=r},734:(e,t,n)=>{"use strict";var r=n(709),a=function(){return!!r};a.hasArrayLengthDefineBug=function(){if(!r)return null;try{return 1!==r([],"length",{value:1}).length}catch(e){return!0}},e.exports=a},442:e=>{"use strict";var t={__proto__:null,foo:{}},n=Object;e.exports=function(){return{__proto__:t}.foo===t.foo&&!(t instanceof n)}},757:(e,t,n)=>{"use strict";var r="undefined"!==typeof Symbol&&Symbol,a=n(175);e.exports=function(){return"function"===typeof r&&("function"===typeof Symbol&&("symbol"===typeof r("foo")&&("symbol"===typeof Symbol("bar")&&a())))}},175:e=>{"use strict";e.exports=function(){if("function"!==typeof Symbol||"function"!==typeof Object.getOwnPropertySymbols)return!1;if("symbol"===typeof Symbol.iterator)return!0;var e={},t=Symbol("test"),n=Object(t);if("string"===typeof t)return!1;if("[object Symbol]"!==Object.prototype.toString.call(t))return!1;if("[object Symbol]"!==Object.prototype.toString.call(n))return!1;for(t in e[t]=42,e)return!1;if("function"===typeof Object.keys&&0!==Object.keys(e).length)return!1;if("function"===typeof Object.getOwnPropertyNames&&0!==Object.getOwnPropertyNames(e).length)return!1;var r=Object.getOwnPropertySymbols(e);if(1!==r.length||r[0]!==t)return!1;if(!Object.prototype.propertyIsEnumerable.call(e,t))return!1;if("function"===typeof Object.getOwnPropertyDescriptor){var a=Object.getOwnPropertyDescriptor(e,t);if(42!==a.value||!0!==a.enumerable)return!1}return!0}},155:(e,t,n)=>{"use strict";var r=Function.prototype.call,a=Object.prototype.hasOwnProperty,o=n(989);e.exports=o.call(r,a)},267:(e,t,n)=>{var r=NaN,a="[object Symbol]",o=/^\s+|\s+$/g,i=/^[-+]0x[0-9a-f]+$/i,l=/^0b[01]+$/i,s=/^0o[0-7]+$/i,c=parseInt,u="object"==typeof n.g&&n.g&&n.g.Object===Object&&n.g,d="object"==typeof self&&self&&self.Object===Object&&self,h=u||d||Function("return this")(),m=Object.prototype.toString,p=Math.max,f=Math.min,v=function(){return h.Date.now()};function g(e){var t=typeof e;return!!e&&("object"==t||"function"==t)}function y(e){if("number"==typeof e)return e;if(function(e){return"symbol"==typeof e||function(e){return!!e&&"object"==typeof e}(e)&&m.call(e)==a}(e))return r;if(g(e)){var t="function"==typeof e.valueOf?e.valueOf():e;e=g(t)?t+"":t}if("string"!=typeof e)return 0===e?e:+e;e=e.replace(o,"");var n=l.test(e);return n||s.test(e)?c(e.slice(2),n?2:8):i.test(e)?r:+e}e.exports=function(e,t,n){var r,a,o,i,l,s,c=0,u=!1,d=!1,h=!0;if("function"!=typeof e)throw new TypeError("Expected a function");function m(t){var n=r,o=a;return r=a=void 0,c=t,i=e.apply(o,n)}function _(e){var n=e-s;return void 0===s||n>=t||n<0||d&&e-c>=o}function b(){var e=v();if(_(e))return w(e);l=setTimeout(b,function(e){var n=t-(e-s);return d?f(n,o-(e-c)):n}(e))}function w(e){return l=void 0,h&&r?m(e):(r=a=void 0,i)}function k(){var e=v(),n=_(e);if(r=arguments,a=this,s=e,n){if(void 0===l)return function(e){return c=e,l=setTimeout(b,t),u?m(e):i}(s);if(d)return l=setTimeout(b,t),m(s)}return void 0===l&&(l=setTimeout(b,t)),i}return t=y(t)||0,g(n)&&(u=!!n.leading,o=(d="maxWait"in n)?p(y(n.maxWait)||0,t):o,h="trailing"in n?!!n.trailing:h),k.cancel=function(){void 0!==l&&clearTimeout(l),c=0,r=s=a=l=void 0},k.flush=function(){return void 0===l?i:w(v())},k}},424:(e,t,n)=>{var r="__lodash_hash_undefined__",a=1/0,o="[object Function]",i="[object GeneratorFunction]",l="[object Symbol]",s=/\.|\[(?:[^[\]]*|(["'])(?:(?!\1)[^\\]|\\.)*?\1)\]/,c=/^\w*$/,u=/^\./,d=/[^.[\]]+|\[(?:(-?\d+(?:\.\d+)?)|(["'])((?:(?!\2)[^\\]|\\.)*?)\2)\]|(?=(?:\.|\[\])(?:\.|\[\]|$))/g,h=/\\(\\)?/g,m=/^\[object .+?Constructor\]$/,p="object"==typeof n.g&&n.g&&n.g.Object===Object&&n.g,f="object"==typeof self&&self&&self.Object===Object&&self,v=p||f||Function("return this")();var g=Array.prototype,y=Function.prototype,_=Object.prototype,b=v["__core-js_shared__"],w=function(){var e=/[^.]+$/.exec(b&&b.keys&&b.keys.IE_PROTO||"");return e?"Symbol(src)_1."+e:""}(),k=y.toString,x=_.hasOwnProperty,S=_.toString,C=RegExp("^"+k.call(x).replace(/[\\^$.*+?()[\]{}|]/g,"\\$&").replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g,"$1.*?")+"$"),E=v.Symbol,N=g.splice,A=j(v,"Map"),M=j(Object,"create"),T=E?E.prototype:void 0,L=T?T.toString:void 0;function I(e){var t=-1,n=e?e.length:0;for(this.clear();++t-1},P.prototype.set=function(e,t){var n=this.__data__,r=R(n,e);return r<0?n.push([e,t]):n[r][1]=t,this},O.prototype.clear=function(){this.__data__={hash:new I,map:new(A||P),string:new I}},O.prototype.delete=function(e){return F(this,e).delete(e)},O.prototype.get=function(e){return F(this,e).get(e)},O.prototype.has=function(e){return F(this,e).has(e)},O.prototype.set=function(e,t){return F(this,e).set(e,t),this};var H=$((function(e){var t;e=null==(t=e)?"":function(e){if("string"==typeof e)return e;if(q(e))return L?L.call(e):"";var t=e+"";return"0"==t&&1/e==-a?"-0":t}(t);var n=[];return u.test(e)&&n.push(""),e.replace(d,(function(e,t,r,a){n.push(r?a.replace(h,"$1"):t||e)})),n}));function V(e){if("string"==typeof e||q(e))return e;var t=e+"";return"0"==t&&1/e==-a?"-0":t}function $(e,t){if("function"!=typeof e||t&&"function"!=typeof t)throw new TypeError("Expected a function");var n=function(){var r=arguments,a=t?t.apply(this,r):r[0],o=n.cache;if(o.has(a))return o.get(a);var i=e.apply(this,r);return n.cache=o.set(a,i),i};return n.cache=new($.Cache||O),n}$.Cache=O;var U=Array.isArray;function B(e){var t=typeof e;return!!e&&("object"==t||"function"==t)}function q(e){return"symbol"==typeof e||function(e){return!!e&&"object"==typeof e}(e)&&S.call(e)==l}e.exports=function(e,t,n){var r=null==e?void 0:D(e,t);return void 0===r?n:r}},141:(e,t,n)=>{var r="function"===typeof Map&&Map.prototype,a=Object.getOwnPropertyDescriptor&&r?Object.getOwnPropertyDescriptor(Map.prototype,"size"):null,o=r&&a&&"function"===typeof a.get?a.get:null,i=r&&Map.prototype.forEach,l="function"===typeof Set&&Set.prototype,s=Object.getOwnPropertyDescriptor&&l?Object.getOwnPropertyDescriptor(Set.prototype,"size"):null,c=l&&s&&"function"===typeof s.get?s.get:null,u=l&&Set.prototype.forEach,d="function"===typeof WeakMap&&WeakMap.prototype?WeakMap.prototype.has:null,h="function"===typeof WeakSet&&WeakSet.prototype?WeakSet.prototype.has:null,m="function"===typeof WeakRef&&WeakRef.prototype?WeakRef.prototype.deref:null,p=Boolean.prototype.valueOf,f=Object.prototype.toString,v=Function.prototype.toString,g=String.prototype.match,y=String.prototype.slice,_=String.prototype.replace,b=String.prototype.toUpperCase,w=String.prototype.toLowerCase,k=RegExp.prototype.test,x=Array.prototype.concat,S=Array.prototype.join,C=Array.prototype.slice,E=Math.floor,N="function"===typeof BigInt?BigInt.prototype.valueOf:null,A=Object.getOwnPropertySymbols,M="function"===typeof Symbol&&"symbol"===typeof Symbol.iterator?Symbol.prototype.toString:null,T="function"===typeof Symbol&&"object"===typeof Symbol.iterator,L="function"===typeof Symbol&&Symbol.toStringTag&&(typeof Symbol.toStringTag===T||"symbol")?Symbol.toStringTag:null,I=Object.prototype.propertyIsEnumerable,P=("function"===typeof Reflect?Reflect.getPrototypeOf:Object.getPrototypeOf)||([].__proto__===Array.prototype?function(e){return e.__proto__}:null);function O(e,t){if(e===1/0||e===-1/0||e!==e||e&&e>-1e3&&e<1e3||k.call(/e/,t))return t;var n=/[0-9](?=(?:[0-9]{3})+(?![0-9]))/g;if("number"===typeof e){var r=e<0?-E(-e):E(e);if(r!==e){var a=String(r),o=y.call(t,a.length+1);return _.call(a,n,"$&_")+"."+_.call(_.call(o,/([0-9]{3})/g,"$&_"),/_$/,"")}}return _.call(t,n,"$&_")}var R=n(634),D=R.custom,z=$(D)?D:null;function F(e,t,n){var r="double"===(n.quoteStyle||t)?'"':"'";return r+e+r}function j(e){return _.call(String(e),/"/g,""")}function H(e){return"[object Array]"===q(e)&&(!L||!("object"===typeof e&&L in e))}function V(e){return"[object RegExp]"===q(e)&&(!L||!("object"===typeof e&&L in e))}function $(e){if(T)return e&&"object"===typeof e&&e instanceof Symbol;if("symbol"===typeof e)return!0;if(!e||"object"!==typeof e||!M)return!1;try{return M.call(e),!0}catch(t){}return!1}e.exports=function e(t,r,a,l){var s=r||{};if(B(s,"quoteStyle")&&"single"!==s.quoteStyle&&"double"!==s.quoteStyle)throw new TypeError('option "quoteStyle" must be "single" or "double"');if(B(s,"maxStringLength")&&("number"===typeof s.maxStringLength?s.maxStringLength<0&&s.maxStringLength!==1/0:null!==s.maxStringLength))throw new TypeError('option "maxStringLength", if provided, must be a positive integer, Infinity, or `null`');var f=!B(s,"customInspect")||s.customInspect;if("boolean"!==typeof f&&"symbol"!==f)throw new TypeError("option \"customInspect\", if provided, must be `true`, `false`, or `'symbol'`");if(B(s,"indent")&&null!==s.indent&&"\t"!==s.indent&&!(parseInt(s.indent,10)===s.indent&&s.indent>0))throw new TypeError('option "indent" must be "\\t", an integer > 0, or `null`');if(B(s,"numericSeparator")&&"boolean"!==typeof s.numericSeparator)throw new TypeError('option "numericSeparator", if provided, must be `true` or `false`');var b=s.numericSeparator;if("undefined"===typeof t)return"undefined";if(null===t)return"null";if("boolean"===typeof t)return t?"true":"false";if("string"===typeof t)return W(t,s);if("number"===typeof t){if(0===t)return 1/0/t>0?"0":"-0";var k=String(t);return b?O(t,k):k}if("bigint"===typeof t){var E=String(t)+"n";return b?O(t,E):E}var A="undefined"===typeof s.depth?5:s.depth;if("undefined"===typeof a&&(a=0),a>=A&&A>0&&"object"===typeof t)return H(t)?"[Array]":"[Object]";var D=function(e,t){var n;if("\t"===e.indent)n="\t";else{if(!("number"===typeof e.indent&&e.indent>0))return null;n=S.call(Array(e.indent+1)," ")}return{base:n,prev:S.call(Array(t+1),n)}}(s,a);if("undefined"===typeof l)l=[];else if(Y(l,t)>=0)return"[Circular]";function U(t,n,r){if(n&&(l=C.call(l)).push(n),r){var o={depth:s.depth};return B(s,"quoteStyle")&&(o.quoteStyle=s.quoteStyle),e(t,o,a+1,l)}return e(t,s,a+1,l)}if("function"===typeof t&&!V(t)){var K=function(e){if(e.name)return e.name;var t=g.call(v.call(e),/^function\s*([\w$]+)/);if(t)return t[1];return null}(t),ee=X(t,U);return"[Function"+(K?": "+K:" (anonymous)")+"]"+(ee.length>0?" { "+S.call(ee,", ")+" }":"")}if($(t)){var te=T?_.call(String(t),/^(Symbol\(.*\))_[^)]*$/,"$1"):M.call(t);return"object"!==typeof t||T?te:Q(te)}if(function(e){if(!e||"object"!==typeof e)return!1;if("undefined"!==typeof HTMLElement&&e instanceof HTMLElement)return!0;return"string"===typeof e.nodeName&&"function"===typeof e.getAttribute}(t)){for(var ne="<"+w.call(String(t.nodeName)),re=t.attributes||[],ae=0;ae"}if(H(t)){if(0===t.length)return"[]";var oe=X(t,U);return D&&!function(e){for(var t=0;t=0)return!1;return!0}(oe)?"["+J(oe,D)+"]":"[ "+S.call(oe,", ")+" ]"}if(function(e){return"[object Error]"===q(e)&&(!L||!("object"===typeof e&&L in e))}(t)){var ie=X(t,U);return"cause"in Error.prototype||!("cause"in t)||I.call(t,"cause")?0===ie.length?"["+String(t)+"]":"{ ["+String(t)+"] "+S.call(ie,", ")+" }":"{ ["+String(t)+"] "+S.call(x.call("[cause]: "+U(t.cause),ie),", ")+" }"}if("object"===typeof t&&f){if(z&&"function"===typeof t[z]&&R)return R(t,{depth:A-a});if("symbol"!==f&&"function"===typeof t.inspect)return t.inspect()}if(function(e){if(!o||!e||"object"!==typeof e)return!1;try{o.call(e);try{c.call(e)}catch(ne){return!0}return e instanceof Map}catch(t){}return!1}(t)){var le=[];return i&&i.call(t,(function(e,n){le.push(U(n,t,!0)+" => "+U(e,t))})),G("Map",o.call(t),le,D)}if(function(e){if(!c||!e||"object"!==typeof e)return!1;try{c.call(e);try{o.call(e)}catch(t){return!0}return e instanceof Set}catch(n){}return!1}(t)){var se=[];return u&&u.call(t,(function(e){se.push(U(e,t))})),G("Set",c.call(t),se,D)}if(function(e){if(!d||!e||"object"!==typeof e)return!1;try{d.call(e,d);try{h.call(e,h)}catch(ne){return!0}return e instanceof WeakMap}catch(t){}return!1}(t))return Z("WeakMap");if(function(e){if(!h||!e||"object"!==typeof e)return!1;try{h.call(e,h);try{d.call(e,d)}catch(ne){return!0}return e instanceof WeakSet}catch(t){}return!1}(t))return Z("WeakSet");if(function(e){if(!m||!e||"object"!==typeof e)return!1;try{return m.call(e),!0}catch(t){}return!1}(t))return Z("WeakRef");if(function(e){return"[object Number]"===q(e)&&(!L||!("object"===typeof e&&L in e))}(t))return Q(U(Number(t)));if(function(e){if(!e||"object"!==typeof e||!N)return!1;try{return N.call(e),!0}catch(t){}return!1}(t))return Q(U(N.call(t)));if(function(e){return"[object Boolean]"===q(e)&&(!L||!("object"===typeof e&&L in e))}(t))return Q(p.call(t));if(function(e){return"[object String]"===q(e)&&(!L||!("object"===typeof e&&L in e))}(t))return Q(U(String(t)));if("undefined"!==typeof window&&t===window)return"{ [object Window] }";if("undefined"!==typeof globalThis&&t===globalThis||"undefined"!==typeof n.g&&t===n.g)return"{ [object globalThis] }";if(!function(e){return"[object Date]"===q(e)&&(!L||!("object"===typeof e&&L in e))}(t)&&!V(t)){var ce=X(t,U),ue=P?P(t)===Object.prototype:t instanceof Object||t.constructor===Object,de=t instanceof Object?"":"null prototype",he=!ue&&L&&Object(t)===t&&L in t?y.call(q(t),8,-1):de?"Object":"",me=(ue||"function"!==typeof t.constructor?"":t.constructor.name?t.constructor.name+" ":"")+(he||de?"["+S.call(x.call([],he||[],de||[]),": ")+"] ":"");return 0===ce.length?me+"{}":D?me+"{"+J(ce,D)+"}":me+"{ "+S.call(ce,", ")+" }"}return String(t)};var U=Object.prototype.hasOwnProperty||function(e){return e in this};function B(e,t){return U.call(e,t)}function q(e){return f.call(e)}function Y(e,t){if(e.indexOf)return e.indexOf(t);for(var n=0,r=e.length;nt.maxStringLength){var n=e.length-t.maxStringLength,r="... "+n+" more character"+(n>1?"s":"");return W(y.call(e,0,t.maxStringLength),t)+r}return F(_.call(_.call(e,/(['\\])/g,"\\$1"),/[\x00-\x1f]/g,K),"single",t)}function K(e){var t=e.charCodeAt(0),n={8:"b",9:"t",10:"n",12:"f",13:"r"}[t];return n?"\\"+n:"\\x"+(t<16?"0":"")+b.call(t.toString(16))}function Q(e){return"Object("+e+")"}function Z(e){return e+" { ? }"}function G(e,t,n,r){return e+" ("+t+") {"+(r?J(n,r):S.call(n,", "))+"}"}function J(e,t){if(0===e.length)return"";var n="\n"+t.prev+t.base;return n+S.call(e,","+n)+"\n"+t.prev}function X(e,t){var n=H(e),r=[];if(n){r.length=e.length;for(var a=0;a{"use strict";n.r(t),n.d(t,{Children:()=>q,Component:()=>l.uA,Fragment:()=>l.FK,PureComponent:()=>j,StrictMode:()=>Ie,Suspense:()=>Z,SuspenseList:()=>X,__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED:()=>we,cloneElement:()=>Ne,createContext:()=>l.q6,createElement:()=>l.n,createFactory:()=>xe,createPortal:()=>re,createRef:()=>l._3,default:()=>He,findDOMNode:()=>Me,flushSync:()=>Le,forwardRef:()=>U,hydrate:()=>de,isElement:()=>ze,isFragment:()=>Ce,isMemo:()=>Ee,isValidElement:()=>Se,lazy:()=>J,memo:()=>H,render:()=>ue,startTransition:()=>Pe,unmountComponentAtNode:()=>Ae,unstable_batchedUpdates:()=>Te,useCallback:()=>C,useContext:()=>E,useDebugValue:()=>N,useDeferredValue:()=>Oe,useEffect:()=>b,useErrorBoundary:()=>A,useId:()=>M,useImperativeHandle:()=>x,useInsertionEffect:()=>De,useLayoutEffect:()=>w,useMemo:()=>S,useReducer:()=>_,useRef:()=>k,useState:()=>y,useSyncExternalStore:()=>Fe,useTransition:()=>Re,version:()=>ke});var r,a,o,i,l=n(746),s=0,c=[],u=l.fF,d=u.__b,h=u.__r,m=u.diffed,p=u.__c,f=u.unmount,v=u.__;function g(e,t){u.__h&&u.__h(a,e,s||t),s=0;var n=a.__H||(a.__H={__:[],__h:[]});return e>=n.__.length&&n.__.push({}),n.__[e]}function y(e){return s=1,_(D,e)}function _(e,t,n){var o=g(r++,2);if(o.t=e,!o.__c&&(o.__=[n?n(t):D(void 0,t),function(e){var t=o.__N?o.__N[0]:o.__[0],n=o.t(t,e);t!==n&&(o.__N=[n,o.__[1]],o.__c.setState({}))}],o.__c=a,!a.u)){var i=function(e,t,n){if(!o.__c.__H)return!0;var r=o.__c.__H.__.filter((function(e){return!!e.__c}));if(r.every((function(e){return!e.__N})))return!l||l.call(this,e,t,n);var a=!1;return r.forEach((function(e){if(e.__N){var t=e.__[0];e.__=e.__N,e.__N=void 0,t!==e.__[0]&&(a=!0)}})),!(!a&&o.__c.props===e)&&(!l||l.call(this,e,t,n))};a.u=!0;var l=a.shouldComponentUpdate,s=a.componentWillUpdate;a.componentWillUpdate=function(e,t,n){if(this.__e){var r=l;l=void 0,i(e,t,n),l=r}s&&s.call(this,e,t,n)},a.shouldComponentUpdate=i}return o.__N||o.__}function b(e,t){var n=g(r++,3);!u.__s&&R(n.__H,t)&&(n.__=e,n.i=t,a.__H.__h.push(n))}function w(e,t){var n=g(r++,4);!u.__s&&R(n.__H,t)&&(n.__=e,n.i=t,a.__h.push(n))}function k(e){return s=5,S((function(){return{current:e}}),[])}function x(e,t,n){s=6,w((function(){return"function"==typeof e?(e(t()),function(){return e(null)}):e?(e.current=t(),function(){return e.current=null}):void 0}),null==n?n:n.concat(e))}function S(e,t){var n=g(r++,7);return R(n.__H,t)&&(n.__=e(),n.__H=t,n.__h=e),n.__}function C(e,t){return s=8,S((function(){return e}),t)}function E(e){var t=a.context[e.__c],n=g(r++,9);return n.c=e,t?(null==n.__&&(n.__=!0,t.sub(a)),t.props.value):e.__}function N(e,t){u.useDebugValue&&u.useDebugValue(t?t(e):e)}function A(e){var t=g(r++,10),n=y();return t.__=e,a.componentDidCatch||(a.componentDidCatch=function(e,r){t.__&&t.__(e,r),n[1](e)}),[n[0],function(){n[1](void 0)}]}function M(){var e=g(r++,11);if(!e.__){for(var t=a.__v;null!==t&&!t.__m&&null!==t.__;)t=t.__;var n=t.__m||(t.__m=[0,0]);e.__="P"+n[0]+"-"+n[1]++}return e.__}function T(){for(var e;e=c.shift();)if(e.__P&&e.__H)try{e.__H.__h.forEach(P),e.__H.__h.forEach(O),e.__H.__h=[]}catch(r){e.__H.__h=[],u.__e(r,e.__v)}}u.__b=function(e){a=null,d&&d(e)},u.__=function(e,t){e&&t.__k&&t.__k.__m&&(e.__m=t.__k.__m),v&&v(e,t)},u.__r=function(e){h&&h(e),r=0;var t=(a=e.__c).__H;t&&(o===a?(t.__h=[],a.__h=[],t.__.forEach((function(e){e.__N&&(e.__=e.__N),e.i=e.__N=void 0}))):(t.__h.forEach(P),t.__h.forEach(O),t.__h=[],r=0)),o=a},u.diffed=function(e){m&&m(e);var t=e.__c;t&&t.__H&&(t.__H.__h.length&&(1!==c.push(t)&&i===u.requestAnimationFrame||((i=u.requestAnimationFrame)||I)(T)),t.__H.__.forEach((function(e){e.i&&(e.__H=e.i),e.i=void 0}))),o=a=null},u.__c=function(e,t){t.some((function(e){try{e.__h.forEach(P),e.__h=e.__h.filter((function(e){return!e.__||O(e)}))}catch(a){t.some((function(e){e.__h&&(e.__h=[])})),t=[],u.__e(a,e.__v)}})),p&&p(e,t)},u.unmount=function(e){f&&f(e);var t,n=e.__c;n&&n.__H&&(n.__H.__.forEach((function(e){try{P(e)}catch(e){t=e}})),n.__H=void 0,t&&u.__e(t,n.__v))};var L="function"==typeof requestAnimationFrame;function I(e){var t,n=function(){clearTimeout(r),L&&cancelAnimationFrame(t),setTimeout(e)},r=setTimeout(n,100);L&&(t=requestAnimationFrame(n))}function P(e){var t=a,n=e.__c;"function"==typeof n&&(e.__c=void 0,n()),a=t}function O(e){var t=a;e.__c=e.__(),a=t}function R(e,t){return!e||e.length!==t.length||t.some((function(t,n){return t!==e[n]}))}function D(e,t){return"function"==typeof t?t(e):t}function z(e,t){for(var n in t)e[n]=t[n];return e}function F(e,t){for(var n in e)if("__source"!==n&&!(n in t))return!0;for(var r in t)if("__source"!==r&&e[r]!==t[r])return!0;return!1}function j(e,t){this.props=e,this.context=t}function H(e,t){function n(e){var n=this.props.ref,r=n==e.ref;return!r&&n&&(n.call?n(null):n.current=null),t?!t(this.props,e)||!r:F(this.props,e)}function r(t){return this.shouldComponentUpdate=n,(0,l.n)(e,t)}return r.displayName="Memo("+(e.displayName||e.name)+")",r.prototype.isReactComponent=!0,r.__f=!0,r}(j.prototype=new l.uA).isPureReactComponent=!0,j.prototype.shouldComponentUpdate=function(e,t){return F(this.props,e)||F(this.state,t)};var V=l.fF.__b;l.fF.__b=function(e){e.type&&e.type.__f&&e.ref&&(e.props.ref=e.ref,e.ref=null),V&&V(e)};var $="undefined"!=typeof Symbol&&Symbol.for&&Symbol.for("react.forward_ref")||3911;function U(e){function t(t){var n=z({},t);return delete n.ref,e(n,t.ref||null)}return t.$$typeof=$,t.render=t,t.prototype.isReactComponent=t.__f=!0,t.displayName="ForwardRef("+(e.displayName||e.name)+")",t}var B=function(e,t){return null==e?null:(0,l.v2)((0,l.v2)(e).map(t))},q={map:B,forEach:B,count:function(e){return e?(0,l.v2)(e).length:0},only:function(e){var t=(0,l.v2)(e);if(1!==t.length)throw"Children.only";return t[0]},toArray:l.v2},Y=l.fF.__e;l.fF.__e=function(e,t,n,r){if(e.then)for(var a,o=t;o=o.__;)if((a=o.__c)&&a.__c)return null==t.__e&&(t.__e=n.__e,t.__k=n.__k),a.__c(e,t);Y(e,t,n,r)};var W=l.fF.unmount;function K(e,t,n){return e&&(e.__c&&e.__c.__H&&(e.__c.__H.__.forEach((function(e){"function"==typeof e.__c&&e.__c()})),e.__c.__H=null),null!=(e=z({},e)).__c&&(e.__c.__P===n&&(e.__c.__P=t),e.__c=null),e.__k=e.__k&&e.__k.map((function(e){return K(e,t,n)}))),e}function Q(e,t,n){return e&&n&&(e.__v=null,e.__k=e.__k&&e.__k.map((function(e){return Q(e,t,n)})),e.__c&&e.__c.__P===t&&(e.__e&&n.appendChild(e.__e),e.__c.__e=!0,e.__c.__P=n)),e}function Z(){this.__u=0,this.t=null,this.__b=null}function G(e){var t=e.__.__c;return t&&t.__a&&t.__a(e)}function J(e){var t,n,r;function a(a){if(t||(t=e()).then((function(e){n=e.default||e}),(function(e){r=e})),r)throw r;if(!n)throw t;return(0,l.n)(n,a)}return a.displayName="Lazy",a.__f=!0,a}function X(){this.u=null,this.o=null}l.fF.unmount=function(e){var t=e.__c;t&&t.__R&&t.__R(),t&&32&e.__u&&(e.type=null),W&&W(e)},(Z.prototype=new l.uA).__c=function(e,t){var n=t.__c,r=this;null==r.t&&(r.t=[]),r.t.push(n);var a=G(r.__v),o=!1,i=function(){o||(o=!0,n.__R=null,a?a(l):l())};n.__R=i;var l=function(){if(! --r.__u){if(r.state.__a){var e=r.state.__a;r.__v.__k[0]=Q(e,e.__c.__P,e.__c.__O)}var t;for(r.setState({__a:r.__b=null});t=r.t.pop();)t.forceUpdate()}};r.__u++||32&t.__u||r.setState({__a:r.__b=r.__v.__k[0]}),e.then(i,i)},Z.prototype.componentWillUnmount=function(){this.t=[]},Z.prototype.render=function(e,t){if(this.__b){if(this.__v.__k){var n=document.createElement("div"),r=this.__v.__k[0].__c;this.__v.__k[0]=K(this.__b,n,r.__O=r.__P)}this.__b=null}var a=t.__a&&(0,l.n)(l.FK,null,e.fallback);return a&&(a.__u&=-33),[(0,l.n)(l.FK,null,t.__a?null:e.children),a]};var ee=function(e,t,n){if(++n[1]===n[0]&&e.o.delete(t),e.props.revealOrder&&("t"!==e.props.revealOrder[0]||!e.o.size))for(n=e.u;n;){for(;n.length>3;)n.pop()();if(n[1]>>1,1),t.i.removeChild(e)}}),(0,l.XX)((0,l.n)(te,{context:t.context},e.__v),t.l)}function re(e,t){var n=(0,l.n)(ne,{__v:e,i:t});return n.containerInfo=t,n}(X.prototype=new l.uA).__a=function(e){var t=this,n=G(t.__v),r=t.o.get(e);return r[0]++,function(a){var o=function(){t.props.revealOrder?(r.push(a),ee(t,e,r)):a()};n?n(o):o()}},X.prototype.render=function(e){this.u=null,this.o=new Map;var t=(0,l.v2)(e.children);e.revealOrder&&"b"===e.revealOrder[0]&&t.reverse();for(var n=t.length;n--;)this.o.set(t[n],this.u=[1,0,this.u]);return e.children},X.prototype.componentDidUpdate=X.prototype.componentDidMount=function(){var e=this;this.o.forEach((function(t,n){ee(e,n,t)}))};var ae="undefined"!=typeof Symbol&&Symbol.for&&Symbol.for("react.element")||60103,oe=/^(?:accent|alignment|arabic|baseline|cap|clip(?!PathU)|color|dominant|fill|flood|font|glyph(?!R)|horiz|image(!S)|letter|lighting|marker(?!H|W|U)|overline|paint|pointer|shape|stop|strikethrough|stroke|text(?!L)|transform|underline|unicode|units|v|vector|vert|word|writing|x(?!C))[A-Z]/,ie=/^on(Ani|Tra|Tou|BeforeInp|Compo)/,le=/[A-Z0-9]/g,se="undefined"!=typeof document,ce=function(e){return("undefined"!=typeof Symbol&&"symbol"==typeof Symbol()?/fil|che|rad/:/fil|che|ra/).test(e)};function ue(e,t,n){return null==t.__k&&(t.textContent=""),(0,l.XX)(e,t),"function"==typeof n&&n(),e?e.__c:null}function de(e,t,n){return(0,l.Qv)(e,t),"function"==typeof n&&n(),e?e.__c:null}l.uA.prototype.isReactComponent={},["componentWillMount","componentWillReceiveProps","componentWillUpdate"].forEach((function(e){Object.defineProperty(l.uA.prototype,e,{configurable:!0,get:function(){return this["UNSAFE_"+e]},set:function(t){Object.defineProperty(this,e,{configurable:!0,writable:!0,value:t})}})}));var he=l.fF.event;function me(){}function pe(){return this.cancelBubble}function fe(){return this.defaultPrevented}l.fF.event=function(e){return he&&(e=he(e)),e.persist=me,e.isPropagationStopped=pe,e.isDefaultPrevented=fe,e.nativeEvent=e};var ve,ge={enumerable:!1,configurable:!0,get:function(){return this.class}},ye=l.fF.vnode;l.fF.vnode=function(e){"string"==typeof e.type&&function(e){var t=e.props,n=e.type,r={},a=-1===n.indexOf("-");for(var o in t){var i=t[o];if(!("value"===o&&"defaultValue"in t&&null==i||se&&"children"===o&&"noscript"===n||"class"===o||"className"===o)){var s=o.toLowerCase();"defaultValue"===o&&"value"in t&&null==t.value?o="value":"download"===o&&!0===i?i="":"translate"===s&&"no"===i?i=!1:"o"===s[0]&&"n"===s[1]?"ondoubleclick"===s?o="ondblclick":"onchange"!==s||"input"!==n&&"textarea"!==n||ce(t.type)?"onfocus"===s?o="onfocusin":"onblur"===s?o="onfocusout":ie.test(o)&&(o=s):s=o="oninput":a&&oe.test(o)?o=o.replace(le,"-$&").toLowerCase():null===i&&(i=void 0),"oninput"===s&&r[o=s]&&(o="oninputCapture"),r[o]=i}}"select"==n&&r.multiple&&Array.isArray(r.value)&&(r.value=(0,l.v2)(t.children).forEach((function(e){e.props.selected=-1!=r.value.indexOf(e.props.value)}))),"select"==n&&null!=r.defaultValue&&(r.value=(0,l.v2)(t.children).forEach((function(e){e.props.selected=r.multiple?-1!=r.defaultValue.indexOf(e.props.value):r.defaultValue==e.props.value}))),t.class&&!t.className?(r.class=t.class,Object.defineProperty(r,"className",ge)):(t.className&&!t.class||t.class&&t.className)&&(r.class=r.className=t.className),e.props=r}(e),e.$$typeof=ae,ye&&ye(e)};var _e=l.fF.__r;l.fF.__r=function(e){_e&&_e(e),ve=e.__c};var be=l.fF.diffed;l.fF.diffed=function(e){be&&be(e);var t=e.props,n=e.__e;null!=n&&"textarea"===e.type&&"value"in t&&t.value!==n.value&&(n.value=null==t.value?"":t.value),ve=null};var we={ReactCurrentDispatcher:{current:{readContext:function(e){return ve.__n[e.__c].props.value},useCallback:C,useContext:E,useDebugValue:N,useDeferredValue:Oe,useEffect:b,useId:M,useImperativeHandle:x,useInsertionEffect:De,useLayoutEffect:w,useMemo:S,useReducer:_,useRef:k,useState:y,useSyncExternalStore:Fe,useTransition:Re}}},ke="17.0.2";function xe(e){return l.n.bind(null,e)}function Se(e){return!!e&&e.$$typeof===ae}function Ce(e){return Se(e)&&e.type===l.FK}function Ee(e){return!!e&&!!e.displayName&&("string"==typeof e.displayName||e.displayName instanceof String)&&e.displayName.startsWith("Memo(")}function Ne(e){return Se(e)?l.Ob.apply(null,arguments):e}function Ae(e){return!!e.__k&&((0,l.XX)(null,e),!0)}function Me(e){return e&&(e.base||1===e.nodeType&&e)||null}var Te=function(e,t){return e(t)},Le=function(e,t){return e(t)},Ie=l.FK;function Pe(e){e()}function Oe(e){return e}function Re(){return[!1,Pe]}var De=w,ze=Se;function Fe(e,t){var n=t(),r=y({h:{__:n,v:t}}),a=r[0].h,o=r[1];return w((function(){a.__=n,a.v=t,je(a)&&o({h:a})}),[e,n,t]),b((function(){return je(a)&&o({h:a}),e((function(){je(a)&&o({h:a})}))}),[e]),n}function je(e){var t,n,r=e.v,a=e.__;try{var o=r();return!((t=a)===(n=o)&&(0!==t||1/t==1/n)||t!=t&&n!=n)}catch(e){return!0}}var He={useState:y,useId:M,useReducer:_,useEffect:b,useLayoutEffect:w,useInsertionEffect:De,useTransition:Re,useDeferredValue:Oe,useSyncExternalStore:Fe,startTransition:Pe,useRef:k,useImperativeHandle:x,useMemo:S,useCallback:C,useContext:E,useDebugValue:N,version:"17.0.2",Children:q,render:ue,hydrate:de,unmountComponentAtNode:Ae,createPortal:re,createElement:l.n,createContext:l.q6,createFactory:xe,cloneElement:Ne,createRef:l._3,Fragment:l.FK,isValidElement:Se,isElement:ze,isFragment:Ce,isMemo:Ee,findDOMNode:Me,Component:l.uA,PureComponent:j,memo:H,forwardRef:U,flushSync:Le,unstable_batchedUpdates:Te,StrictMode:Ie,Suspense:Z,SuspenseList:X,lazy:J,__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED:we}},746:(e,t,n)=>{"use strict";n.d(t,{FK:()=>x,Ob:()=>q,Qv:()=>B,XX:()=>U,_3:()=>k,fF:()=>a,n:()=>b,q6:()=>Y,uA:()=>S,v2:()=>I});var r,a,o,i,l,s,c,u,d,h,m,p={},f=[],v=/acit|ex(?:s|g|n|p|$)|rph|grid|ows|mnc|ntw|ine[ch]|zoo|^ord|itera/i,g=Array.isArray;function y(e,t){for(var n in t)e[n]=t[n];return e}function _(e){var t=e.parentNode;t&&t.removeChild(e)}function b(e,t,n){var a,o,i,l={};for(i in t)"key"==i?a=t[i]:"ref"==i?o=t[i]:l[i]=t[i];if(arguments.length>2&&(l.children=arguments.length>3?r.call(arguments,2):n),"function"==typeof e&&null!=e.defaultProps)for(i in e.defaultProps)void 0===l[i]&&(l[i]=e.defaultProps[i]);return w(e,l,a,o,null)}function w(e,t,n,r,i){var l={type:e,props:t,key:n,ref:r,__k:null,__:null,__b:0,__e:null,__d:void 0,__c:null,constructor:void 0,__v:null==i?++o:i,__i:-1,__u:0};return null==i&&null!=a.vnode&&a.vnode(l),l}function k(){return{current:null}}function x(e){return e.children}function S(e,t){this.props=e,this.context=t}function C(e,t){if(null==t)return e.__?C(e.__,e.__i+1):null;for(var n;tt&&i.sort(c));A.__r=0}function M(e,t,n,r,a,o,i,l,s,c,u){var d,h,m,v,g,y=r&&r.__k||f,_=t.length;for(n.__d=s,T(n,t,y),s=n.__d,d=0;d<_;d++)null!=(m=n.__k[d])&&"boolean"!=typeof m&&"function"!=typeof m&&(h=-1===m.__i?p:y[m.__i]||p,m.__i=d,z(e,m,h,a,o,i,l,s,c,u),v=m.__e,m.ref&&h.ref!=m.ref&&(h.ref&&H(h.ref,null,m),u.push(m.ref,m.__c||v,m)),null==g&&null!=v&&(g=v),65536&m.__u||h.__k===m.__k?s=L(m,s,e):"function"==typeof m.type&&void 0!==m.__d?s=m.__d:v&&(s=v.nextSibling),m.__d=void 0,m.__u&=-196609);n.__d=s,n.__e=g}function T(e,t,n){var r,a,o,i,l,s=t.length,c=n.length,u=c,d=0;for(e.__k=[],r=0;r0?w(a.type,a.props,a.key,a.ref?a.ref:null,a.__v):a)?(a.__=e,a.__b=e.__b+1,l=P(a,n,i,u),a.__i=l,o=null,-1!==l&&(u--,(o=n[l])&&(o.__u|=131072)),null==o||null===o.__v?(-1==l&&d--,"function"!=typeof a.type&&(a.__u|=65536)):l!==i&&(l==i-1?d--:l==i+1?d++:l>i?u>s-i?d+=l-i:d--:l(null!=s&&0==(131072&s.__u)?1:0))for(;i>=0||l=0){if((s=t[i])&&0==(131072&s.__u)&&a==s.key&&o===s.type)return i;i--}if(l2&&(s.children=arguments.length>3?r.call(arguments,2):n),w(e.type,s,a||e.key,o||e.ref,null)}function Y(e,t){var n={__c:t="__cC"+m++,__:e,Consumer:function(e,t){return e.children(t)},Provider:function(e){var n,r;return this.getChildContext||(n=[],(r={})[t]=this,this.getChildContext=function(){return r},this.componentWillUnmount=function(){n=null},this.shouldComponentUpdate=function(e){this.props.value!==e.value&&n.some((function(e){e.__e=!0,N(e)}))},this.sub=function(e){n.push(e);var t=e.componentWillUnmount;e.componentWillUnmount=function(){n&&n.splice(n.indexOf(e),1),t&&t.call(e)}}),e.children}};return n.Provider.__=n.Consumer.contextType=n}r=f.slice,a={__e:function(e,t,n,r){for(var a,o,i;t=t.__;)if((a=t.__c)&&!a.__)try{if((o=a.constructor)&&null!=o.getDerivedStateFromError&&(a.setState(o.getDerivedStateFromError(e)),i=a.__d),null!=a.componentDidCatch&&(a.componentDidCatch(e,r||{}),i=a.__d),i)return a.__E=a}catch(t){e=t}throw e}},o=0,S.prototype.setState=function(e,t){var n;n=null!=this.__s&&this.__s!==this.state?this.__s:this.__s=y({},this.state),"function"==typeof e&&(e=e(y({},n),this.props)),e&&y(n,e),null!=e&&this.__v&&(t&&this._sb.push(t),N(this))},S.prototype.forceUpdate=function(e){this.__v&&(this.__e=!0,e&&this.__h.push(e),N(this))},S.prototype.render=x,i=[],s="function"==typeof Promise?Promise.prototype.then.bind(Promise.resolve()):setTimeout,c=function(e,t){return e.__v.__b-t.__v.__b},A.__r=0,u=0,d=D(!1),h=D(!0),m=0},640:e=>{"use strict";var t=String.prototype.replace,n=/%20/g,r="RFC1738",a="RFC3986";e.exports={default:a,formatters:{RFC1738:function(e){return t.call(e,n,"+")},RFC3986:function(e){return String(e)}},RFC1738:r,RFC3986:a}},215:(e,t,n)=>{"use strict";var r=n(518),a=n(968),o=n(640);e.exports={formats:o,parse:a,stringify:r}},968:(e,t,n)=>{"use strict";var r=n(570),a=Object.prototype.hasOwnProperty,o=Array.isArray,i={allowDots:!1,allowEmptyArrays:!1,allowPrototypes:!1,allowSparse:!1,arrayLimit:20,charset:"utf-8",charsetSentinel:!1,comma:!1,decodeDotInKeys:!1,decoder:r.decode,delimiter:"&",depth:5,duplicates:"combine",ignoreQueryPrefix:!1,interpretNumericEntities:!1,parameterLimit:1e3,parseArrays:!0,plainObjects:!1,strictDepth:!1,strictNullHandling:!1},l=function(e){return e.replace(/&#(\d+);/g,(function(e,t){return String.fromCharCode(parseInt(t,10))}))},s=function(e,t){return e&&"string"===typeof e&&t.comma&&e.indexOf(",")>-1?e.split(","):e},c=function(e,t,n,r){if(e){var o=n.allowDots?e.replace(/\.([^.[]+)/g,"[$1]"):e,i=/(\[[^[\]]*])/g,l=n.depth>0&&/(\[[^[\]]*])/.exec(o),c=l?o.slice(0,l.index):o,u=[];if(c){if(!n.plainObjects&&a.call(Object.prototype,c)&&!n.allowPrototypes)return;u.push(c)}for(var d=0;n.depth>0&&null!==(l=i.exec(o))&&d=0;--o){var i,l=e[o];if("[]"===l&&n.parseArrays)i=n.allowEmptyArrays&&(""===a||n.strictNullHandling&&null===a)?[]:[].concat(a);else{i=n.plainObjects?Object.create(null):{};var c="["===l.charAt(0)&&"]"===l.charAt(l.length-1)?l.slice(1,-1):l,u=n.decodeDotInKeys?c.replace(/%2E/g,"."):c,d=parseInt(u,10);n.parseArrays||""!==u?!isNaN(d)&&l!==u&&String(d)===u&&d>=0&&n.parseArrays&&d<=n.arrayLimit?(i=[])[d]=a:"__proto__"!==u&&(i[u]=a):i={0:a}}a=i}return a}(u,t,n,r)}};e.exports=function(e,t){var n=function(e){if(!e)return i;if("undefined"!==typeof e.allowEmptyArrays&&"boolean"!==typeof e.allowEmptyArrays)throw new TypeError("`allowEmptyArrays` option can only be `true` or `false`, when provided");if("undefined"!==typeof e.decodeDotInKeys&&"boolean"!==typeof e.decodeDotInKeys)throw new TypeError("`decodeDotInKeys` option can only be `true` or `false`, when provided");if(null!==e.decoder&&"undefined"!==typeof e.decoder&&"function"!==typeof e.decoder)throw new TypeError("Decoder has to be a function.");if("undefined"!==typeof e.charset&&"utf-8"!==e.charset&&"iso-8859-1"!==e.charset)throw new TypeError("The charset option must be either utf-8, iso-8859-1, or undefined");var t="undefined"===typeof e.charset?i.charset:e.charset,n="undefined"===typeof e.duplicates?i.duplicates:e.duplicates;if("combine"!==n&&"first"!==n&&"last"!==n)throw new TypeError("The duplicates option must be either combine, first, or last");return{allowDots:"undefined"===typeof e.allowDots?!0===e.decodeDotInKeys||i.allowDots:!!e.allowDots,allowEmptyArrays:"boolean"===typeof e.allowEmptyArrays?!!e.allowEmptyArrays:i.allowEmptyArrays,allowPrototypes:"boolean"===typeof e.allowPrototypes?e.allowPrototypes:i.allowPrototypes,allowSparse:"boolean"===typeof e.allowSparse?e.allowSparse:i.allowSparse,arrayLimit:"number"===typeof e.arrayLimit?e.arrayLimit:i.arrayLimit,charset:t,charsetSentinel:"boolean"===typeof e.charsetSentinel?e.charsetSentinel:i.charsetSentinel,comma:"boolean"===typeof e.comma?e.comma:i.comma,decodeDotInKeys:"boolean"===typeof e.decodeDotInKeys?e.decodeDotInKeys:i.decodeDotInKeys,decoder:"function"===typeof e.decoder?e.decoder:i.decoder,delimiter:"string"===typeof e.delimiter||r.isRegExp(e.delimiter)?e.delimiter:i.delimiter,depth:"number"===typeof e.depth||!1===e.depth?+e.depth:i.depth,duplicates:n,ignoreQueryPrefix:!0===e.ignoreQueryPrefix,interpretNumericEntities:"boolean"===typeof e.interpretNumericEntities?e.interpretNumericEntities:i.interpretNumericEntities,parameterLimit:"number"===typeof e.parameterLimit?e.parameterLimit:i.parameterLimit,parseArrays:!1!==e.parseArrays,plainObjects:"boolean"===typeof e.plainObjects?e.plainObjects:i.plainObjects,strictDepth:"boolean"===typeof e.strictDepth?!!e.strictDepth:i.strictDepth,strictNullHandling:"boolean"===typeof e.strictNullHandling?e.strictNullHandling:i.strictNullHandling}}(t);if(""===e||null===e||"undefined"===typeof e)return n.plainObjects?Object.create(null):{};for(var u="string"===typeof e?function(e,t){var n={__proto__:null},c=t.ignoreQueryPrefix?e.replace(/^\?/,""):e;c=c.replace(/%5B/gi,"[").replace(/%5D/gi,"]");var u,d=t.parameterLimit===1/0?void 0:t.parameterLimit,h=c.split(t.delimiter,d),m=-1,p=t.charset;if(t.charsetSentinel)for(u=0;u-1&&(v=o(v)?[v]:v);var b=a.call(n,f);b&&"combine"===t.duplicates?n[f]=r.combine(n[f],v):b&&"last"!==t.duplicates||(n[f]=v)}return n}(e,n):e,d=n.plainObjects?Object.create(null):{},h=Object.keys(u),m=0;m{"use strict";var r=n(670),a=n(570),o=n(640),i=Object.prototype.hasOwnProperty,l={brackets:function(e){return e+"[]"},comma:"comma",indices:function(e,t){return e+"["+t+"]"},repeat:function(e){return e}},s=Array.isArray,c=Array.prototype.push,u=function(e,t){c.apply(e,s(t)?t:[t])},d=Date.prototype.toISOString,h=o.default,m={addQueryPrefix:!1,allowDots:!1,allowEmptyArrays:!1,arrayFormat:"indices",charset:"utf-8",charsetSentinel:!1,delimiter:"&",encode:!0,encodeDotInKeys:!1,encoder:a.encode,encodeValuesOnly:!1,format:h,formatter:o.formatters[h],indices:!1,serializeDate:function(e){return d.call(e)},skipNulls:!1,strictNullHandling:!1},p={},f=function e(t,n,o,i,l,c,d,h,f,v,g,y,_,b,w,k,x,S){for(var C,E=t,N=S,A=0,M=!1;void 0!==(N=N.get(p))&&!M;){var T=N.get(t);if(A+=1,"undefined"!==typeof T){if(T===A)throw new RangeError("Cyclic object value");M=!0}"undefined"===typeof N.get(p)&&(A=0)}if("function"===typeof v?E=v(n,E):E instanceof Date?E=_(E):"comma"===o&&s(E)&&(E=a.maybeMap(E,(function(e){return e instanceof Date?_(e):e}))),null===E){if(c)return f&&!k?f(n,m.encoder,x,"key",b):n;E=""}if("string"===typeof(C=E)||"number"===typeof C||"boolean"===typeof C||"symbol"===typeof C||"bigint"===typeof C||a.isBuffer(E))return f?[w(k?n:f(n,m.encoder,x,"key",b))+"="+w(f(E,m.encoder,x,"value",b))]:[w(n)+"="+w(String(E))];var L,I=[];if("undefined"===typeof E)return I;if("comma"===o&&s(E))k&&f&&(E=a.maybeMap(E,f)),L=[{value:E.length>0?E.join(",")||null:void 0}];else if(s(v))L=v;else{var P=Object.keys(E);L=g?P.sort(g):P}var O=h?n.replace(/\./g,"%2E"):n,R=i&&s(E)&&1===E.length?O+"[]":O;if(l&&s(E)&&0===E.length)return R+"[]";for(var D=0;D0?b+_:""}},570:(e,t,n)=>{"use strict";var r=n(640),a=Object.prototype.hasOwnProperty,o=Array.isArray,i=function(){for(var e=[],t=0;t<256;++t)e.push("%"+((t<16?"0":"")+t.toString(16)).toUpperCase());return e}(),l=function(e,t){for(var n=t&&t.plainObjects?Object.create(null):{},r=0;r1;){var t=e.pop(),n=t.obj[t.prop];if(o(n)){for(var r=[],a=0;a=s?l.slice(u,u+s):l,h=[],m=0;m=48&&p<=57||p>=65&&p<=90||p>=97&&p<=122||o===r.RFC1738&&(40===p||41===p)?h[h.length]=d.charAt(m):p<128?h[h.length]=i[p]:p<2048?h[h.length]=i[192|p>>6]+i[128|63&p]:p<55296||p>=57344?h[h.length]=i[224|p>>12]+i[128|p>>6&63]+i[128|63&p]:(m+=1,p=65536+((1023&p)<<10|1023&d.charCodeAt(m)),h[h.length]=i[240|p>>18]+i[128|p>>12&63]+i[128|p>>6&63]+i[128|63&p])}c+=h.join("")}return c},isBuffer:function(e){return!(!e||"object"!==typeof e)&&!!(e.constructor&&e.constructor.isBuffer&&e.constructor.isBuffer(e))},isRegExp:function(e){return"[object RegExp]"===Object.prototype.toString.call(e)},maybeMap:function(e,t){if(o(e)){for(var n=[],r=0;r{e.exports=n(204)},204:(e,t,n)=>{"use strict";var r=function(e){return e&&"object"==typeof e&&"default"in e?e.default:e}(n(609)),a=n(609);function o(){return(o=Object.assign||function(e){for(var t=1;tr.length&&h(e,t.length-1);)t=t.slice(0,t.length-1);return t.length}for(var a=r.length,o=t.length;o>=r.length;o--){var i=t[o];if(!h(e,o)&&m(e,o,i)){a=o+1;break}}return a}function v(e,t){return f(e,t)===e.mask.length}function g(e,t){var n=e.maskChar,r=e.mask,a=e.prefix;if(!n){for((t=y(e,"",t,0)).lengtht.length&&(t+=a.slice(t.length,r)),l.every((function(n){for(;u=n,h(e,c=r)&&u!==a[c];){if(r>=t.length&&(t+=a[r]),l=n,o&&h(e,r)&&l===o)return!0;if(++r>=a.length)return!1}var l,c,u;return!m(e,r,n)&&n!==o||(ra.start?d=(u=function(e,t,n,r){var a=e.mask,o=e.maskChar,i=n.split(""),l=r;return i.every((function(t){for(;i=t,h(e,n=r)&&i!==a[n];)if(++r>=a.length)return!1;var n,i;return(m(e,r,t)||t===o)&&r++,r=o.length?p=o.length:p=i.length&&p{"use strict";var r=n(375),a=n(411),o=n(734)(),i=n(553),l=n(277),s=r("%Math.floor%");e.exports=function(e,t){if("function"!==typeof e)throw new l("`fn` is not a function");if("number"!==typeof t||t<0||t>4294967295||s(t)!==t)throw new l("`length` must be a positive 32-bit integer");var n=arguments.length>2&&!!arguments[2],r=!0,c=!0;if("length"in e&&i){var u=i(e,"length");u&&!u.configurable&&(r=!1),u&&!u.writable&&(c=!1)}return(r||c||!n)&&(o?a(e,"length",t,!0,!0):a(e,"length",t)),e}},670:(e,t,n)=>{"use strict";var r=n(375),a=n(61),o=n(141),i=n(277),l=r("%WeakMap%",!0),s=r("%Map%",!0),c=a("WeakMap.prototype.get",!0),u=a("WeakMap.prototype.set",!0),d=a("WeakMap.prototype.has",!0),h=a("Map.prototype.get",!0),m=a("Map.prototype.set",!0),p=a("Map.prototype.has",!0),f=function(e,t){for(var n,r=e;null!==(n=r.next);r=n)if(n.key===t)return r.next=n.next,n.next=e.next,e.next=n,n};e.exports=function(){var e,t,n,r={assert:function(e){if(!r.has(e))throw new i("Side channel does not contain "+o(e))},get:function(r){if(l&&r&&("object"===typeof r||"function"===typeof r)){if(e)return c(e,r)}else if(s){if(t)return h(t,r)}else if(n)return function(e,t){var n=f(e,t);return n&&n.value}(n,r)},has:function(r){if(l&&r&&("object"===typeof r||"function"===typeof r)){if(e)return d(e,r)}else if(s){if(t)return p(t,r)}else if(n)return function(e,t){return!!f(e,t)}(n,r);return!1},set:function(r,a){l&&r&&("object"===typeof r||"function"===typeof r)?(e||(e=new l),u(e,r,a)):s?(t||(t=new s),m(t,r,a)):(n||(n={key:{},next:null}),function(e,t,n){var r=f(e,t);r?r.value=n:e.next={key:t,next:e.next,value:n}}(n,r,a))}};return r}},634:()=>{},738:(e,t)=>{var n;!function(){"use strict";var r={}.hasOwnProperty;function a(){for(var e="",t=0;t{var t=e&&e.__esModule?()=>e.default:()=>e;return n.d(t,{a:t}),t},n.d=(e,t)=>{for(var r in t)n.o(t,r)&&!n.o(e,r)&&Object.defineProperty(e,r,{enumerable:!0,get:t[r]})},n.f={},n.e=e=>Promise.all(Object.keys(n.f).reduce(((t,r)=>(n.f[r](e,t),t)),[])),n.u=e=>"static/js/"+e+".f772060c.chunk.js",n.miniCssF=e=>{},n.g=function(){if("object"===typeof globalThis)return globalThis;try{return this||new Function("return this")()}catch(e){if("object"===typeof window)return window}}(),n.o=(e,t)=>Object.prototype.hasOwnProperty.call(e,t),(()=>{var e={},t="vmui:";n.l=(r,a,o,i)=>{if(e[r])e[r].push(a);else{var l,s;if(void 0!==o)for(var c=document.getElementsByTagName("script"),u=0;u{l.onerror=l.onload=null,clearTimeout(m);var a=e[r];if(delete e[r],l.parentNode&&l.parentNode.removeChild(l),a&&a.forEach((e=>e(n))),t)return t(n)},m=setTimeout(h.bind(null,void 0,{type:"timeout",target:l}),12e4);l.onerror=h.bind(null,l.onerror),l.onload=h.bind(null,l.onload),s&&document.head.appendChild(l)}}})(),n.r=e=>{"undefined"!==typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})},n.p="./",(()=>{var e={792:0};n.f.j=(t,r)=>{var a=n.o(e,t)?e[t]:void 0;if(0!==a)if(a)r.push(a[2]);else{var o=new Promise(((n,r)=>a=e[t]=[n,r]));r.push(a[2]=o);var i=n.p+n.u(t),l=new Error;n.l(i,(r=>{if(n.o(e,t)&&(0!==(a=e[t])&&(e[t]=void 0),a)){var o=r&&("load"===r.type?"missing":r.type),i=r&&r.target&&r.target.src;l.message="Loading chunk "+t+" failed.\n("+o+": "+i+")",l.name="ChunkLoadError",l.type=o,l.request=i,a[1](l)}}),"chunk-"+t,t)}};var t=(t,r)=>{var a,o,i=r[0],l=r[1],s=r[2],c=0;if(i.some((t=>0!==e[t]))){for(a in l)n.o(l,a)&&(n.m[a]=l[a]);if(s)s(n)}for(t&&t(r);c{"use strict";var e={};n.r(e),n.d(e,{AlarmIcon:()=>Un,ArrowDownIcon:()=>jn,ArrowDropDownIcon:()=>Hn,CalendarIcon:()=>$n,ChartIcon:()=>Wn,ClockIcon:()=>Vn,CloseIcon:()=>In,CodeIcon:()=>Qn,CollapseIcon:()=>kr,CopyIcon:()=>rr,DeleteIcon:()=>Zn,DoneIcon:()=>Xn,DownloadIcon:()=>br,DragIcon:()=>ar,ErrorIcon:()=>Dn,ExpandIcon:()=>wr,FunctionIcon:()=>gr,InfoIcon:()=>On,IssueIcon:()=>lr,KeyboardIcon:()=>Bn,LabelIcon:()=>yr,ListIcon:()=>mr,LogoAnomalyIcon:()=>Mn,LogoIcon:()=>Nn,LogoLogsIcon:()=>An,LogoShortIcon:()=>Tn,MetricIcon:()=>vr,MinusIcon:()=>Jn,MoreIcon:()=>ur,PlayCircleOutlineIcon:()=>Yn,PlayIcon:()=>qn,PlusIcon:()=>Gn,Prettify:()=>nr,QuestionIcon:()=>sr,RefreshIcon:()=>Fn,RestartIcon:()=>Pn,SearchIcon:()=>xr,SettingsIcon:()=>Ln,StarBorderIcon:()=>pr,StarIcon:()=>fr,StorageIcon:()=>cr,SuccessIcon:()=>zn,TableIcon:()=>Kn,TimelineIcon:()=>or,TipIcon:()=>hr,TuneIcon:()=>dr,ValueIcon:()=>_r,VisibilityIcon:()=>er,VisibilityOffIcon:()=>tr,WarningIcon:()=>Rn,WikiIcon:()=>ir});var t,r=n(609),a=n(159),o=n.n(a),i=n(7),l=n.n(i),s=n(648),c=n.n(s),u=n(220),d=n.n(u);function h(){return h=Object.assign?Object.assign.bind():function(e){for(var t=1;t=0&&(t.hash=e.substr(n),e=e.substr(0,n));let r=e.indexOf("?");r>=0&&(t.search=e.substr(r),e=e.substr(0,r)),e&&(t.pathname=e)}return t}function b(e,n,r,a){void 0===a&&(a={});let{window:o=document.defaultView,v5Compat:i=!1}=a,l=o.history,s=t.Pop,c=null,u=d();function d(){return(l.state||{idx:null}).idx}function f(){s=t.Pop;let e=d(),n=null==e?null:e-u;u=e,c&&c({action:s,location:b.location,delta:n})}function _(e){let t="null"!==o.location.origin?o.location.origin:o.location.href,n="string"===typeof e?e:y(e);return n=n.replace(/ $/,"%20"),p(t,"No window.location.(origin|href) available to create URL for href: "+n),new URL(n,t)}null==u&&(u=0,l.replaceState(h({},l.state,{idx:u}),""));let b={get action(){return s},get location(){return e(o,l)},listen(e){if(c)throw new Error("A history only accepts one active listener");return o.addEventListener(m,f),c=e,()=>{o.removeEventListener(m,f),c=null}},createHref:e=>n(o,e),createURL:_,encodeLocation(e){let t=_(e);return{pathname:t.pathname,search:t.search,hash:t.hash}},push:function(e,n){s=t.Push;let a=g(b.location,e,n);r&&r(a,e),u=d()+1;let h=v(a,u),m=b.createHref(a);try{l.pushState(h,"",m)}catch(p){if(p instanceof DOMException&&"DataCloneError"===p.name)throw p;o.location.assign(m)}i&&c&&c({action:s,location:b.location,delta:1})},replace:function(e,n){s=t.Replace;let a=g(b.location,e,n);r&&r(a,e),u=d();let o=v(a,u),h=b.createHref(a);l.replaceState(o,"",h),i&&c&&c({action:s,location:b.location,delta:0})},go:e=>l.go(e)};return b}var w;!function(e){e.data="data",e.deferred="deferred",e.redirect="redirect",e.error="error"}(w||(w={}));new Set(["lazy","caseSensitive","path","id","index","children"]);function k(e,t,n){return void 0===n&&(n="/"),x(e,t,n,!1)}function x(e,t,n,r){let a=z(("string"===typeof t?_(t):t).pathname||"/",n);if(null==a)return null;let o=S(e);!function(e){e.sort(((e,t)=>e.score!==t.score?t.score-e.score:function(e,t){let n=e.length===t.length&&e.slice(0,-1).every(((e,n)=>e===t[n]));return n?e[e.length-1]-t[t.length-1]:0}(e.routesMeta.map((e=>e.childrenIndex)),t.routesMeta.map((e=>e.childrenIndex)))))}(o);let i=null;for(let l=0;null==i&&l{let i={relativePath:void 0===o?e.path||"":o,caseSensitive:!0===e.caseSensitive,childrenIndex:a,route:e};i.relativePath.startsWith("/")&&(p(i.relativePath.startsWith(r),'Absolute route path "'+i.relativePath+'" nested under path "'+r+'" is not valid. An absolute child route path must start with the combined path of all its parent routes.'),i.relativePath=i.relativePath.slice(r.length));let l=$([r,i.relativePath]),s=n.concat(i);e.children&&e.children.length>0&&(p(!0!==e.index,'Index routes must not have child routes. Please remove all child routes from route path "'+l+'".'),S(e.children,t,s,l)),(null!=e.path||e.index)&&t.push({path:l,score:P(l,e.index),routesMeta:s})};return e.forEach(((e,t)=>{var n;if(""!==e.path&&null!=(n=e.path)&&n.includes("?"))for(let r of C(e.path))a(e,t,r);else a(e,t)})),t}function C(e){let t=e.split("/");if(0===t.length)return[];let[n,...r]=t,a=n.endsWith("?"),o=n.replace(/\?$/,"");if(0===r.length)return a?[o,""]:[o];let i=C(r.join("/")),l=[];return l.push(...i.map((e=>""===e?o:[o,e].join("/")))),a&&l.push(...i),l.map((t=>e.startsWith("/")&&""===t?"/":t))}const E=/^:[\w-]+$/,N=3,A=2,M=1,T=10,L=-2,I=e=>"*"===e;function P(e,t){let n=e.split("/"),r=n.length;return n.some(I)&&(r+=L),t&&(r+=A),n.filter((e=>!I(e))).reduce(((e,t)=>e+(E.test(t)?N:""===t?M:T)),r)}function O(e,t,n){void 0===n&&(n=!1);let{routesMeta:r}=e,a={},o="/",i=[];for(let l=0;l(r.push({paramName:t,isOptional:null!=n}),n?"/?([^\\/]+)?":"/([^\\/]+)")));e.endsWith("*")?(r.push({paramName:"*"}),a+="*"===e||"/*"===e?"(.*)$":"(?:\\/(.+)|\\/*)$"):n?a+="\\/*$":""!==e&&"/"!==e&&(a+="(?:(?=\\/|$))");let o=new RegExp(a,t?void 0:"i");return[o,r]}(e.path,e.caseSensitive,e.end),a=t.match(n);if(!a)return null;let o=a[0],i=o.replace(/(.)\/+$/,"$1"),l=a.slice(1);return{params:r.reduce(((e,t,n)=>{let{paramName:r,isOptional:a}=t;if("*"===r){let e=l[n]||"";i=o.slice(0,o.length-e.length).replace(/(.)\/+$/,"$1")}const s=l[n];return e[r]=a&&!s?void 0:(s||"").replace(/%2F/g,"/"),e}),{}),pathname:o,pathnameBase:i,pattern:e}}function D(e){try{return e.split("/").map((e=>decodeURIComponent(e).replace(/\//g,"%2F"))).join("/")}catch(t){return f(!1,'The URL path "'+e+'" could not be decoded because it is is a malformed URL segment. This is probably due to a bad percent encoding ('+t+")."),e}}function z(e,t){if("/"===t)return e;if(!e.toLowerCase().startsWith(t.toLowerCase()))return null;let n=t.endsWith("/")?t.length-1:t.length,r=e.charAt(n);return r&&"/"!==r?null:e.slice(n)||"/"}function F(e,t,n,r){return"Cannot include a '"+e+"' character in a manually specified `to."+t+"` field ["+JSON.stringify(r)+"]. Please separate it out to the `to."+n+'` field. Alternatively you may provide the full path as a string in and the router will parse it for you.'}function j(e){return e.filter(((e,t)=>0===t||e.route.path&&e.route.path.length>0))}function H(e,t){let n=j(e);return t?n.map(((e,t)=>t===n.length-1?e.pathname:e.pathnameBase)):n.map((e=>e.pathnameBase))}function V(e,t,n,r){let a;void 0===r&&(r=!1),"string"===typeof e?a=_(e):(a=h({},e),p(!a.pathname||!a.pathname.includes("?"),F("?","pathname","search",a)),p(!a.pathname||!a.pathname.includes("#"),F("#","pathname","hash",a)),p(!a.search||!a.search.includes("#"),F("#","search","hash",a)));let o,i=""===e||""===a.pathname,l=i?"/":a.pathname;if(null==l)o=n;else{let e=t.length-1;if(!r&&l.startsWith("..")){let t=l.split("/");for(;".."===t[0];)t.shift(),e-=1;a.pathname=t.join("/")}o=e>=0?t[e]:"/"}let s=function(e,t){void 0===t&&(t="/");let{pathname:n,search:r="",hash:a=""}="string"===typeof e?_(e):e,o=n?n.startsWith("/")?n:function(e,t){let n=t.replace(/\/+$/,"").split("/");return e.split("/").forEach((e=>{".."===e?n.length>1&&n.pop():"."!==e&&n.push(e)})),n.length>1?n.join("/"):"/"}(n,t):t;return{pathname:o,search:B(r),hash:q(a)}}(a,o),c=l&&"/"!==l&&l.endsWith("/"),u=(i||"."===l)&&n.endsWith("/");return s.pathname.endsWith("/")||!c&&!u||(s.pathname+="/"),s}const $=e=>e.join("/").replace(/\/\/+/g,"/"),U=e=>e.replace(/\/+$/,"").replace(/^\/*/,"/"),B=e=>e&&"?"!==e?e.startsWith("?")?e:"?"+e:"",q=e=>e&&"#"!==e?e.startsWith("#")?e:"#"+e:"";Error;function Y(e){return null!=e&&"number"===typeof e.status&&"string"===typeof e.statusText&&"boolean"===typeof e.internal&&"data"in e}const W=["post","put","patch","delete"],K=(new Set(W),["get",...W]);new Set(K),new Set([301,302,303,307,308]),new Set([307,308]);Symbol("deferred");function Q(){return Q=Object.assign?Object.assign.bind():function(e){for(var t=1;t{n.current=!0}));let a=r.useCallback((function(r,a){void 0===a&&(a={}),n.current&&("number"===typeof r?e.navigate(r):e.navigate(r,Q({fromRouteId:t},a)))}),[e,t]);return a}():function(){ne()||p(!1);let e=r.useContext(Z),{basename:t,future:n,navigator:a}=r.useContext(J),{matches:o}=r.useContext(ee),{pathname:i}=re(),l=JSON.stringify(H(o,n.v7_relativeSplatPath)),s=r.useRef(!1);ae((()=>{s.current=!0}));let c=r.useCallback((function(n,r){if(void 0===r&&(r={}),!s.current)return;if("number"===typeof n)return void a.go(n);let o=V(n,JSON.parse(l),i,"path"===r.relative);null==e&&"/"!==t&&(o.pathname="/"===o.pathname?t:$([t,o.pathname])),(r.replace?a.replace:a.push)(o,r.state,r)}),[t,a,l,i,e]);return c}()}const ie=r.createContext(null);function le(e,t){let{relative:n}=void 0===t?{}:t,{future:a}=r.useContext(J),{matches:o}=r.useContext(ee),{pathname:i}=re(),l=JSON.stringify(H(o,a.v7_relativeSplatPath));return r.useMemo((()=>V(e,JSON.parse(l),i,"path"===n)),[e,l,i,n])}function se(e,n,a,o){ne()||p(!1);let{navigator:i}=r.useContext(J),{matches:l}=r.useContext(ee),s=l[l.length-1],c=s?s.params:{},u=(s&&s.pathname,s?s.pathnameBase:"/");s&&s.route;let d,h=re();if(n){var m;let e="string"===typeof n?_(n):n;"/"===u||(null==(m=e.pathname)?void 0:m.startsWith(u))||p(!1),d=e}else d=h;let f=d.pathname||"/",v=f;if("/"!==u){let e=u.replace(/^\//,"").split("/");v="/"+f.replace(/^\//,"").split("/").slice(e.length).join("/")}let g=k(e,{pathname:v});let y=me(g&&g.map((e=>Object.assign({},e,{params:Object.assign({},c,e.params),pathname:$([u,i.encodeLocation?i.encodeLocation(e.pathname).pathname:e.pathname]),pathnameBase:"/"===e.pathnameBase?u:$([u,i.encodeLocation?i.encodeLocation(e.pathnameBase).pathname:e.pathnameBase])}))),l,a,o);return n&&y?r.createElement(X.Provider,{value:{location:Q({pathname:"/",search:"",hash:"",state:null,key:"default"},d),navigationType:t.Pop}},y):y}function ce(){let e=function(){var e;let t=r.useContext(te),n=ge(fe.UseRouteError),a=ye(fe.UseRouteError);if(void 0!==t)return t;return null==(e=n.errors)?void 0:e[a]}(),t=Y(e)?e.status+" "+e.statusText:e instanceof Error?e.message:JSON.stringify(e),n=e instanceof Error?e.stack:null,a="rgba(200,200,200, 0.5)",o={padding:"0.5rem",backgroundColor:a};return r.createElement(r.Fragment,null,r.createElement("h2",null,"Unexpected Application Error!"),r.createElement("h3",{style:{fontStyle:"italic"}},t),n?r.createElement("pre",{style:o},n):null,null)}const ue=r.createElement(ce,null);class de extends r.Component{constructor(e){super(e),this.state={location:e.location,revalidation:e.revalidation,error:e.error}}static getDerivedStateFromError(e){return{error:e}}static getDerivedStateFromProps(e,t){return t.location!==e.location||"idle"!==t.revalidation&&"idle"===e.revalidation?{error:e.error,location:e.location,revalidation:e.revalidation}:{error:void 0!==e.error?e.error:t.error,location:t.location,revalidation:e.revalidation||t.revalidation}}componentDidCatch(e,t){console.error("React Router caught the following error during render",e,t)}render(){return void 0!==this.state.error?r.createElement(ee.Provider,{value:this.props.routeContext},r.createElement(te.Provider,{value:this.state.error,children:this.props.component})):this.props.children}}function he(e){let{routeContext:t,match:n,children:a}=e,o=r.useContext(Z);return o&&o.static&&o.staticContext&&(n.route.errorElement||n.route.ErrorBoundary)&&(o.staticContext._deepestRenderedBoundaryId=n.route.id),r.createElement(ee.Provider,{value:t},a)}function me(e,t,n,a){var o;if(void 0===t&&(t=[]),void 0===n&&(n=null),void 0===a&&(a=null),null==e){var i;if(!n)return null;if(n.errors)e=n.matches;else{if(!(null!=(i=a)&&i.v7_partialHydration&&0===t.length&&!n.initialized&&n.matches.length>0))return null;e=n.matches}}let l=e,s=null==(o=n)?void 0:o.errors;if(null!=s){let e=l.findIndex((e=>e.route.id&&void 0!==(null==s?void 0:s[e.route.id])));e>=0||p(!1),l=l.slice(0,Math.min(l.length,e+1))}let c=!1,u=-1;if(n&&a&&a.v7_partialHydration)for(let r=0;r=0?l.slice(0,u+1):[l[0]];break}}}return l.reduceRight(((e,a,o)=>{let i,d=!1,h=null,m=null;var p;n&&(i=s&&a.route.id?s[a.route.id]:void 0,h=a.route.errorElement||ue,c&&(u<0&&0===o?(p="route-fallback",!1||_e[p]||(_e[p]=!0),d=!0,m=null):u===o&&(d=!0,m=a.route.hydrateFallbackElement||null)));let f=t.concat(l.slice(0,o+1)),v=()=>{let t;return t=i?h:d?m:a.route.Component?r.createElement(a.route.Component,null):a.route.element?a.route.element:e,r.createElement(he,{match:a,routeContext:{outlet:e,matches:f,isDataRoute:null!=n},children:t})};return n&&(a.route.ErrorBoundary||a.route.errorElement||0===o)?r.createElement(de,{location:n.location,revalidation:n.revalidation,component:h,error:i,children:v(),routeContext:{outlet:null,matches:f,isDataRoute:!0}}):v()}),null)}var pe=function(e){return e.UseBlocker="useBlocker",e.UseRevalidator="useRevalidator",e.UseNavigateStable="useNavigate",e}(pe||{}),fe=function(e){return e.UseBlocker="useBlocker",e.UseLoaderData="useLoaderData",e.UseActionData="useActionData",e.UseRouteError="useRouteError",e.UseNavigation="useNavigation",e.UseRouteLoaderData="useRouteLoaderData",e.UseMatches="useMatches",e.UseRevalidator="useRevalidator",e.UseNavigateStable="useNavigate",e.UseRouteId="useRouteId",e}(fe||{});function ve(e){let t=r.useContext(Z);return t||p(!1),t}function ge(e){let t=r.useContext(G);return t||p(!1),t}function ye(e){let t=function(e){let t=r.useContext(ee);return t||p(!1),t}(),n=t.matches[t.matches.length-1];return n.route.id||p(!1),n.route.id}const _e={};r.startTransition;function be(e){return function(e){let t=r.useContext(ee).outlet;return t?r.createElement(ie.Provider,{value:e},t):t}(e.context)}function we(e){p(!1)}function ke(e){let{basename:n="/",children:a=null,location:o,navigationType:i=t.Pop,navigator:l,static:s=!1,future:c}=e;ne()&&p(!1);let u=n.replace(/^\/*/,"/"),d=r.useMemo((()=>({basename:u,navigator:l,static:s,future:Q({v7_relativeSplatPath:!1},c)})),[u,c,l,s]);"string"===typeof o&&(o=_(o));let{pathname:h="/",search:m="",hash:f="",state:v=null,key:g="default"}=o,y=r.useMemo((()=>{let e=z(h,u);return null==e?null:{location:{pathname:e,search:m,hash:f,state:v,key:g},navigationType:i}}),[u,h,m,f,v,g,i]);return null==y?null:r.createElement(J.Provider,{value:d},r.createElement(X.Provider,{children:a,value:y}))}function xe(e){let{children:t,location:n}=e;return se(Se(t),n)}new Promise((()=>{}));r.Component;function Se(e,t){void 0===t&&(t=[]);let n=[];return r.Children.forEach(e,((e,a)=>{if(!r.isValidElement(e))return;let o=[...t,a];if(e.type===r.Fragment)return void n.push.apply(n,Se(e.props.children,o));e.type!==we&&p(!1),e.props.index&&e.props.children&&p(!1);let i={id:e.props.id||o.join("-"),caseSensitive:e.props.caseSensitive,element:e.props.element,Component:e.props.Component,index:e.props.index,path:e.props.path,loader:e.props.loader,action:e.props.action,errorElement:e.props.errorElement,ErrorBoundary:e.props.ErrorBoundary,hasErrorBoundary:null!=e.props.ErrorBoundary||null!=e.props.errorElement,shouldRevalidate:e.props.shouldRevalidate,handle:e.props.handle,lazy:e.props.lazy};e.props.children&&(i.children=Se(e.props.children,o)),n.push(i)})),n}function Ce(){return Ce=Object.assign?Object.assign.bind():function(e){for(var t=1;t=0||(a[n]=e[n]);return a}function Ne(e){return void 0===e&&(e=""),new URLSearchParams("string"===typeof e||Array.isArray(e)||e instanceof URLSearchParams?e:Object.keys(e).reduce(((t,n)=>{let r=e[n];return t.concat(Array.isArray(r)?r.map((e=>[n,e])):[[n,r]])}),[]))}new Set(["application/x-www-form-urlencoded","multipart/form-data","text/plain"]);const Ae=["onClick","relative","reloadDocument","replace","state","target","to","preventScrollReset","unstable_viewTransition"],Me=["aria-current","caseSensitive","className","end","style","to","unstable_viewTransition","children"];try{window.__reactRouterVersion="6"}catch(Lp){}const Te=r.createContext({isTransitioning:!1});new Map;const Le=r.startTransition;r.flushSync,r.useId;function Ie(e){let{basename:t,children:n,future:a,window:o}=e,i=r.useRef();null==i.current&&(i.current=function(e){return void 0===e&&(e={}),b((function(e,t){let{pathname:n="/",search:r="",hash:a=""}=_(e.location.hash.substr(1));return n.startsWith("/")||n.startsWith(".")||(n="/"+n),g("",{pathname:n,search:r,hash:a},t.state&&t.state.usr||null,t.state&&t.state.key||"default")}),(function(e,t){let n=e.document.querySelector("base"),r="";if(n&&n.getAttribute("href")){let t=e.location.href,n=t.indexOf("#");r=-1===n?t:t.slice(0,n)}return r+"#"+("string"===typeof t?t:y(t))}),(function(e,t){f("/"===e.pathname.charAt(0),"relative pathnames are not supported in hash history.push("+JSON.stringify(t)+")")}),e)}({window:o,v5Compat:!0}));let l=i.current,[s,c]=r.useState({action:l.action,location:l.location}),{v7_startTransition:u}=a||{},d=r.useCallback((e=>{u&&Le?Le((()=>c(e))):c(e)}),[c,u]);return r.useLayoutEffect((()=>l.listen(d)),[l,d]),r.createElement(ke,{basename:t,children:n,location:s.location,navigationType:s.action,navigator:l,future:a})}const Pe="undefined"!==typeof window&&"undefined"!==typeof window.document&&"undefined"!==typeof window.document.createElement,Oe=/^(?:[a-z][a-z0-9+.-]*:|\/\/)/i,Re=r.forwardRef((function(e,t){let n,{onClick:a,relative:o,reloadDocument:i,replace:l,state:s,target:c,to:u,preventScrollReset:d,unstable_viewTransition:h}=e,m=Ee(e,Ae),{basename:f}=r.useContext(J),v=!1;if("string"===typeof u&&Oe.test(u)&&(n=u,Pe))try{let e=new URL(window.location.href),t=u.startsWith("//")?new URL(e.protocol+u):new URL(u),n=z(t.pathname,f);t.origin===e.origin&&null!=n?u=n+t.search+t.hash:v=!0}catch(Lp){}let g=function(e,t){let{relative:n}=void 0===t?{}:t;ne()||p(!1);let{basename:a,navigator:o}=r.useContext(J),{hash:i,pathname:l,search:s}=le(e,{relative:n}),c=l;return"/"!==a&&(c="/"===l?a:$([a,l])),o.createHref({pathname:c,search:s,hash:i})}(u,{relative:o}),_=function(e,t){let{target:n,replace:a,state:o,preventScrollReset:i,relative:l,unstable_viewTransition:s}=void 0===t?{}:t,c=oe(),u=re(),d=le(e,{relative:l});return r.useCallback((t=>{if(function(e,t){return 0===e.button&&(!t||"_self"===t)&&!function(e){return!!(e.metaKey||e.altKey||e.ctrlKey||e.shiftKey)}(e)}(t,n)){t.preventDefault();let n=void 0!==a?a:y(u)===y(d);c(e,{replace:n,state:o,preventScrollReset:i,relative:l,unstable_viewTransition:s})}}),[u,c,d,a,o,n,e,i,l,s])}(u,{replace:l,state:s,target:c,preventScrollReset:d,relative:o,unstable_viewTransition:h});return r.createElement("a",Ce({},m,{href:n||g,onClick:v||i?a:function(e){a&&a(e),e.defaultPrevented||_(e)},ref:t,target:c}))}));const De=r.forwardRef((function(e,t){let{"aria-current":n="page",caseSensitive:a=!1,className:o="",end:i=!1,style:l,to:s,unstable_viewTransition:c,children:u}=e,d=Ee(e,Me),h=le(s,{relative:d.relative}),m=re(),f=r.useContext(G),{navigator:v,basename:g}=r.useContext(J),y=null!=f&&function(e,t){void 0===t&&(t={});let n=r.useContext(Te);null==n&&p(!1);let{basename:a}=je(ze.useViewTransitionState),o=le(e,{relative:t.relative});if(!n.isTransitioning)return!1;let i=z(n.currentLocation.pathname,a)||n.currentLocation.pathname,l=z(n.nextLocation.pathname,a)||n.nextLocation.pathname;return null!=R(o.pathname,l)||null!=R(o.pathname,i)}(h)&&!0===c,_=v.encodeLocation?v.encodeLocation(h).pathname:h.pathname,b=m.pathname,w=f&&f.navigation&&f.navigation.location?f.navigation.location.pathname:null;a||(b=b.toLowerCase(),w=w?w.toLowerCase():null,_=_.toLowerCase()),w&&g&&(w=z(w,g)||w);const k="/"!==_&&_.endsWith("/")?_.length-1:_.length;let x,S=b===_||!i&&b.startsWith(_)&&"/"===b.charAt(k),C=null!=w&&(w===_||!i&&w.startsWith(_)&&"/"===w.charAt(_.length)),E={isActive:S,isPending:C,isTransitioning:y},N=S?n:void 0;x="function"===typeof o?o(E):[o,S?"active":null,C?"pending":null,y?"transitioning":null].filter(Boolean).join(" ");let A="function"===typeof l?l(E):l;return r.createElement(Re,Ce({},d,{"aria-current":N,className:x,ref:t,style:A,to:s,unstable_viewTransition:c}),"function"===typeof u?u(E):u)}));var ze,Fe;function je(e){let t=r.useContext(Z);return t||p(!1),t}function He(e){let t=r.useRef(Ne(e)),n=r.useRef(!1),a=re(),o=r.useMemo((()=>function(e,t){let n=Ne(e);return t&&t.forEach(((e,r)=>{n.has(r)||t.getAll(r).forEach((e=>{n.append(r,e)}))})),n}(a.search,n.current?null:t.current)),[a.search]),i=oe(),l=r.useCallback(((e,t)=>{const r=Ne("function"===typeof e?e(o):e);n.current=!0,i("?"+r,t)}),[i,o]);return[o,l]}(function(e){e.UseScrollRestoration="useScrollRestoration",e.UseSubmit="useSubmit",e.UseSubmitFetcher="useSubmitFetcher",e.UseFetcher="useFetcher",e.useViewTransitionState="useViewTransitionState"})(ze||(ze={})),function(e){e.UseFetcher="useFetcher",e.UseFetchers="useFetchers",e.UseScrollRestoration="useScrollRestoration"}(Fe||(Fe={}));let Ve=function(e){return e.logs="logs",e.anomaly="anomaly",e}({});const $e={home:"/",metrics:"/metrics",dashboards:"/dashboards",cardinality:"/cardinality",topQueries:"/top-queries",trace:"/trace",withTemplate:"/expand-with-exprs",relabel:"/relabeling",logs:"/logs",activeQueries:"/active-queries",queryAnalyzer:"/query-analyzer",icons:"/icons",anomaly:"/anomaly",query:"/query"},{REACT_APP_TYPE:Ue}={},Be=Ue===Ve.logs,qe={header:{tenant:!0,stepControl:!Be,timeSelector:!Be,executionControls:!Be}},Ye={[$e.home]:{title:"Query",...qe},[$e.metrics]:{title:"Explore Prometheus metrics",header:{tenant:!0,stepControl:!0,timeSelector:!0}},[$e.cardinality]:{title:"Explore cardinality",header:{tenant:!0,cardinalityDatePicker:!0}},[$e.topQueries]:{title:"Top queries",header:{tenant:!0}},[$e.trace]:{title:"Trace analyzer",header:{}},[$e.queryAnalyzer]:{title:"Query analyzer",header:{}},[$e.dashboards]:{title:"Dashboards",...qe},[$e.withTemplate]:{title:"WITH templates",header:{}},[$e.relabel]:{title:"Metric relabel debug",header:{}},[$e.logs]:{title:"Logs Explorer",header:{}},[$e.activeQueries]:{title:"Active Queries",header:{}},[$e.icons]:{title:"Icons",header:{}},[$e.anomaly]:{title:"Anomaly exploration",...qe},[$e.query]:{title:"Query",...qe}},We=$e,Ke=()=>{var e;const t=(null===(e=document.getElementById("root"))||void 0===e?void 0:e.dataset.params)||"{}";try{return JSON.parse(t)}catch(Lp){return console.error(Lp),{}}},Qe=()=>!!Object.keys(Ke()).length,Ze=/(\/select\/)(\d+|\d.+)(\/)(.+)/,Ge=(e,t)=>e.replace(Ze,"$1".concat(t,"/$4")),Je=e=>{var t;return(null===(t=e.match(Ze))||void 0===t?void 0:t[2])||""},Xe=(e,t)=>{t?window.localStorage.setItem(e,JSON.stringify({value:t})):tt([e]),window.dispatchEvent(new Event("storage"))},et=e=>{const t=window.localStorage.getItem(e);if(null!==t)try{var n;return null===(n=JSON.parse(t))||void 0===n?void 0:n.value}catch(Lp){return t}},tt=e=>e.forEach((e=>window.localStorage.removeItem(e))),{REACT_APP_TYPE:nt}={};var rt=n(215),at=n.n(rt),ot=n(424),it=n.n(ot);const lt={table:100,chart:20,code:1e3},st=[{id:"small",isDefault:!0,height:()=>.2*window.innerHeight},{id:"medium",height:()=>.4*window.innerHeight},{id:"large",height:()=>.8*window.innerHeight}],ct=["min","median","max"],ut=(e,t)=>{const n=window.location.hash.split("?")[1],r=at().parse(n,{ignoreQueryPrefix:!0});return it()(r,e,t||"")},dt=()=>{var e;const t=(null===(e=(window.location.hash.split("?")[1]||"").match(/g\d+\.expr/g))||void 0===e?void 0:e.length)||1;return new Array(t>10?10:t).fill(1).map(((e,t)=>ut("g".concat(t,".expr"),"")))};let ht=function(e){return e.yhat="yhat",e.yhatUpper="yhat_upper",e.yhatLower="yhat_lower",e.anomaly="vmui_anomalies_points",e.training="vmui_training_data",e.actual="actual",e.anomalyScore="anomaly_score",e}({}),mt=function(e){return e.table="table",e.chart="chart",e.code="code",e}({}),pt=function(e){return e.emptyServer="Please enter Server URL",e.validServer="Please provide a valid Server URL",e.validQuery="Please enter a valid Query and execute it",e.traceNotFound="Not found the tracing information",e.emptyTitle="Please enter title",e.positiveNumber="Please enter positive number",e.validStep="Please enter a valid step",e.unknownType="Unknown server response format: must have 'errorType'",e}({}),ft=function(e){return e.system="system",e.light="light",e.dark="dark",e}({}),vt=function(e){return e.empty="empty",e.metricsql="metricsql",e.label="label",e.labelValue="labelValue",e}({});const gt=e=>getComputedStyle(document.documentElement).getPropertyValue("--".concat(e)),yt=(e,t)=>{document.documentElement.style.setProperty("--".concat(e),t)},_t=()=>window.matchMedia("(prefers-color-scheme: dark)").matches,bt=e=>{let t;try{t=new URL(e)}catch(n){return!1}return"http:"===t.protocol||"https:"===t.protocol},wt=e=>e.replace(/\/$/,""),kt=ut("g0.tenantID",""),xt={serverUrl:wt((e=>{const{serverURL:t}=Ke(),n=et("SERVER_URL"),r=window.location.href.replace(/\/(select\/)?(vmui)\/.*/,""),a="".concat(window.location.origin).concat(window.location.pathname.replace(/^\/vmui/,"")),o=window.location.href.replace(/\/(?:prometheus\/)?(?:graph|vmui)\/.*/,"/prometheus"),i=t||n||o;switch(nt){case Ve.logs:return r;case Ve.anomaly:return n||a;default:return e?Ge(i,e):i}})(kt)),tenantId:kt,theme:et("THEME")||ft.system,isDarkTheme:null};function St(e,t){switch(t.type){case"SET_SERVER":return{...e,serverUrl:wt(t.payload)};case"SET_TENANT_ID":return{...e,tenantId:t.payload};case"SET_THEME":return Xe("THEME",t.payload),{...e,theme:t.payload};case"SET_DARK_THEME":return{...e,isDarkTheme:(n=e.theme,n===ft.system&&_t()||n===ft.dark)};default:throw new Error}var n}var Ct=n(746);var Et=0;Array.isArray;function Nt(e,t,n,r,a,o){t||(t={});var i,l,s=t;if("ref"in s)for(l in s={},t)"ref"==l?i=t[l]:s[l]=t[l];var c={type:e,props:s,key:n,ref:i,__k:null,__:null,__b:0,__e:null,__d:void 0,__c:null,constructor:void 0,__v:--Et,__i:-1,__u:0,__source:a,__self:o};if("function"==typeof e&&(i=e.defaultProps))for(l in i)void 0===s[l]&&(s[l]=i[l]);return Ct.fF.vnode&&Ct.fF.vnode(c),c}const At=(0,r.createContext)({}),Mt=()=>(0,r.useContext)(At).state,Tt=()=>(0,r.useContext)(At).dispatch,Lt=Object.entries(xt).reduce(((e,t)=>{let[n,r]=t;return{...e,[n]:ut(n)||r}}),{}),It="YYYY-MM-DD",Pt="YYYY-MM-DD HH:mm:ss",Ot="YYYY-MM-DD HH:mm:ss:SSS (Z)",Rt="YYYY-MM-DD[T]HH:mm:ss",Dt="YYYY-MM-DD_HHmmss",zt=window.innerWidth/4,Ft=window.innerWidth/40,jt=1,Ht=1578e8,Vt=Intl.supportedValuesOf,$t=Vt?Vt("timeZone"):["Africa/Abidjan","Africa/Accra","Africa/Addis_Ababa","Africa/Algiers","Africa/Asmera","Africa/Bamako","Africa/Bangui","Africa/Banjul","Africa/Bissau","Africa/Blantyre","Africa/Brazzaville","Africa/Bujumbura","Africa/Cairo","Africa/Casablanca","Africa/Ceuta","Africa/Conakry","Africa/Dakar","Africa/Dar_es_Salaam","Africa/Djibouti","Africa/Douala","Africa/El_Aaiun","Africa/Freetown","Africa/Gaborone","Africa/Harare","Africa/Johannesburg","Africa/Juba","Africa/Kampala","Africa/Khartoum","Africa/Kigali","Africa/Kinshasa","Africa/Lagos","Africa/Libreville","Africa/Lome","Africa/Luanda","Africa/Lubumbashi","Africa/Lusaka","Africa/Malabo","Africa/Maputo","Africa/Maseru","Africa/Mbabane","Africa/Mogadishu","Africa/Monrovia","Africa/Nairobi","Africa/Ndjamena","Africa/Niamey","Africa/Nouakchott","Africa/Ouagadougou","Africa/Porto-Novo","Africa/Sao_Tome","Africa/Tripoli","Africa/Tunis","Africa/Windhoek","America/Adak","America/Anchorage","America/Anguilla","America/Antigua","America/Araguaina","America/Argentina/La_Rioja","America/Argentina/Rio_Gallegos","America/Argentina/Salta","America/Argentina/San_Juan","America/Argentina/San_Luis","America/Argentina/Tucuman","America/Argentina/Ushuaia","America/Aruba","America/Asuncion","America/Bahia","America/Bahia_Banderas","America/Barbados","America/Belem","America/Belize","America/Blanc-Sablon","America/Boa_Vista","America/Bogota","America/Boise","America/Buenos_Aires","America/Cambridge_Bay","America/Campo_Grande","America/Cancun","America/Caracas","America/Catamarca","America/Cayenne","America/Cayman","America/Chicago","America/Chihuahua","America/Coral_Harbour","America/Cordoba","America/Costa_Rica","America/Creston","America/Cuiaba","America/Curacao","America/Danmarkshavn","America/Dawson","America/Dawson_Creek","America/Denver","America/Detroit","America/Dominica","America/Edmonton","America/Eirunepe","America/El_Salvador","America/Fort_Nelson","America/Fortaleza","America/Glace_Bay","America/Godthab","America/Goose_Bay","America/Grand_Turk","America/Grenada","America/Guadeloupe","America/Guatemala","America/Guayaquil","America/Guyana","America/Halifax","America/Havana","America/Hermosillo","America/Indiana/Knox","America/Indiana/Marengo","America/Indiana/Petersburg","America/Indiana/Tell_City","America/Indiana/Vevay","America/Indiana/Vincennes","America/Indiana/Winamac","America/Indianapolis","America/Inuvik","America/Iqaluit","America/Jamaica","America/Jujuy","America/Juneau","America/Kentucky/Monticello","America/Kralendijk","America/La_Paz","America/Lima","America/Los_Angeles","America/Louisville","America/Lower_Princes","America/Maceio","America/Managua","America/Manaus","America/Marigot","America/Martinique","America/Matamoros","America/Mazatlan","America/Mendoza","America/Menominee","America/Merida","America/Metlakatla","America/Mexico_City","America/Miquelon","America/Moncton","America/Monterrey","America/Montevideo","America/Montreal","America/Montserrat","America/Nassau","America/New_York","America/Nipigon","America/Nome","America/Noronha","America/North_Dakota/Beulah","America/North_Dakota/Center","America/North_Dakota/New_Salem","America/Ojinaga","America/Panama","America/Pangnirtung","America/Paramaribo","America/Phoenix","America/Port-au-Prince","America/Port_of_Spain","America/Porto_Velho","America/Puerto_Rico","America/Punta_Arenas","America/Rainy_River","America/Rankin_Inlet","America/Recife","America/Regina","America/Resolute","America/Rio_Branco","America/Santa_Isabel","America/Santarem","America/Santiago","America/Santo_Domingo","America/Sao_Paulo","America/Scoresbysund","America/Sitka","America/St_Barthelemy","America/St_Johns","America/St_Kitts","America/St_Lucia","America/St_Thomas","America/St_Vincent","America/Swift_Current","America/Tegucigalpa","America/Thule","America/Thunder_Bay","America/Tijuana","America/Toronto","America/Tortola","America/Vancouver","America/Whitehorse","America/Winnipeg","America/Yakutat","America/Yellowknife","Antarctica/Casey","Antarctica/Davis","Antarctica/DumontDUrville","Antarctica/Macquarie","Antarctica/Mawson","Antarctica/McMurdo","Antarctica/Palmer","Antarctica/Rothera","Antarctica/Syowa","Antarctica/Troll","Antarctica/Vostok","Arctic/Longyearbyen","Asia/Aden","Asia/Almaty","Asia/Amman","Asia/Anadyr","Asia/Aqtau","Asia/Aqtobe","Asia/Ashgabat","Asia/Atyrau","Asia/Baghdad","Asia/Bahrain","Asia/Baku","Asia/Bangkok","Asia/Barnaul","Asia/Beirut","Asia/Bishkek","Asia/Brunei","Asia/Calcutta","Asia/Chita","Asia/Choibalsan","Asia/Colombo","Asia/Damascus","Asia/Dhaka","Asia/Dili","Asia/Dubai","Asia/Dushanbe","Asia/Famagusta","Asia/Gaza","Asia/Hebron","Asia/Hong_Kong","Asia/Hovd","Asia/Irkutsk","Asia/Jakarta","Asia/Jayapura","Asia/Jerusalem","Asia/Kabul","Asia/Kamchatka","Asia/Karachi","Asia/Katmandu","Asia/Khandyga","Asia/Krasnoyarsk","Asia/Kuala_Lumpur","Asia/Kuching","Asia/Kuwait","Asia/Macau","Asia/Magadan","Asia/Makassar","Asia/Manila","Asia/Muscat","Asia/Nicosia","Asia/Novokuznetsk","Asia/Novosibirsk","Asia/Omsk","Asia/Oral","Asia/Phnom_Penh","Asia/Pontianak","Asia/Pyongyang","Asia/Qatar","Asia/Qostanay","Asia/Qyzylorda","Asia/Rangoon","Asia/Riyadh","Asia/Saigon","Asia/Sakhalin","Asia/Samarkand","Asia/Seoul","Asia/Shanghai","Asia/Singapore","Asia/Srednekolymsk","Asia/Taipei","Asia/Tashkent","Asia/Tbilisi","Asia/Tehran","Asia/Thimphu","Asia/Tokyo","Asia/Tomsk","Asia/Ulaanbaatar","Asia/Urumqi","Asia/Ust-Nera","Asia/Vientiane","Asia/Vladivostok","Asia/Yakutsk","Asia/Yekaterinburg","Asia/Yerevan","Atlantic/Azores","Atlantic/Bermuda","Atlantic/Canary","Atlantic/Cape_Verde","Atlantic/Faeroe","Atlantic/Madeira","Atlantic/Reykjavik","Atlantic/South_Georgia","Atlantic/St_Helena","Atlantic/Stanley","Australia/Adelaide","Australia/Brisbane","Australia/Broken_Hill","Australia/Currie","Australia/Darwin","Australia/Eucla","Australia/Hobart","Australia/Lindeman","Australia/Lord_Howe","Australia/Melbourne","Australia/Perth","Australia/Sydney","Europe/Amsterdam","Europe/Andorra","Europe/Astrakhan","Europe/Athens","Europe/Belgrade","Europe/Berlin","Europe/Bratislava","Europe/Brussels","Europe/Bucharest","Europe/Budapest","Europe/Busingen","Europe/Chisinau","Europe/Copenhagen","Europe/Dublin","Europe/Gibraltar","Europe/Guernsey","Europe/Helsinki","Europe/Isle_of_Man","Europe/Istanbul","Europe/Jersey","Europe/Kaliningrad","Europe/Kiev","Europe/Kirov","Europe/Lisbon","Europe/Ljubljana","Europe/London","Europe/Luxembourg","Europe/Madrid","Europe/Malta","Europe/Mariehamn","Europe/Minsk","Europe/Monaco","Europe/Moscow","Europe/Oslo","Europe/Paris","Europe/Podgorica","Europe/Prague","Europe/Riga","Europe/Rome","Europe/Samara","Europe/San_Marino","Europe/Sarajevo","Europe/Saratov","Europe/Simferopol","Europe/Skopje","Europe/Sofia","Europe/Stockholm","Europe/Tallinn","Europe/Tirane","Europe/Ulyanovsk","Europe/Uzhgorod","Europe/Vaduz","Europe/Vatican","Europe/Vienna","Europe/Vilnius","Europe/Volgograd","Europe/Warsaw","Europe/Zagreb","Europe/Zaporozhye","Europe/Zurich","Indian/Antananarivo","Indian/Chagos","Indian/Christmas","Indian/Cocos","Indian/Comoro","Indian/Kerguelen","Indian/Mahe","Indian/Maldives","Indian/Mauritius","Indian/Mayotte","Indian/Reunion","Pacific/Apia","Pacific/Auckland","Pacific/Bougainville","Pacific/Chatham","Pacific/Easter","Pacific/Efate","Pacific/Enderbury","Pacific/Fakaofo","Pacific/Fiji","Pacific/Funafuti","Pacific/Galapagos","Pacific/Gambier","Pacific/Guadalcanal","Pacific/Guam","Pacific/Honolulu","Pacific/Johnston","Pacific/Kiritimati","Pacific/Kosrae","Pacific/Kwajalein","Pacific/Majuro","Pacific/Marquesas","Pacific/Midway","Pacific/Nauru","Pacific/Niue","Pacific/Norfolk","Pacific/Noumea","Pacific/Pago_Pago","Pacific/Palau","Pacific/Pitcairn","Pacific/Ponape","Pacific/Port_Moresby","Pacific/Rarotonga","Pacific/Saipan","Pacific/Tahiti","Pacific/Tarawa","Pacific/Tongatapu","Pacific/Truk","Pacific/Wake","Pacific/Wallis"],Ut=[{long:"years",short:"y",possible:"year"},{long:"weeks",short:"w",possible:"week"},{long:"days",short:"d",possible:"day"},{long:"hours",short:"h",possible:"hour"},{long:"minutes",short:"m",possible:"min"},{long:"seconds",short:"s",possible:"sec"},{long:"milliseconds",short:"ms",possible:"millisecond"}],Bt=Ut.map((e=>e.short)),qt=e=>Math.round(1e3*e)/1e3,Yt=e=>en(o().duration(e,"seconds").asMilliseconds()),Wt=e=>{let t=qt(e);const n=Math.round(e);e>=100&&(t=n-n%10),e<100&&e>=10&&(t=n-n%5),e<10&&e>=1&&(t=n),e<1&&e>.01&&(t=Math.round(40*e)/40);return Yt(t||.001).replace(/\s/g,"")},Kt=e=>{const t=e.match(/\d+/g),n=e.match(/[a-zA-Z]+/g);if(n&&t&&Bt.includes(n[0]))return{[n[0]]:t[0]}},Qt=e=>{const t=Ut.map((e=>e.short)).join("|"),n=new RegExp("\\d+(\\.\\d+)?[".concat(t,"]+"),"g"),r=(e.match(n)||[]).reduce(((e,t)=>{const n=Kt(t);return n?{...e,...n}:{...e}}),{});return o().duration(r).asSeconds()},Zt=(e,t)=>Wt(e/(t?Ft:zt)),Gt=(e,t)=>{const n=(t||o()().toDate()).valueOf()/1e3,r=Qt(e);return{start:n-r,end:n,step:Zt(r),date:Jt(t||o()().toDate())}},Jt=e=>o().tz(e).utc().format(Rt),Xt=e=>o().tz(e).format(Rt),en=e=>{const t=Math.floor(e%1e3),n=Math.floor(e/1e3%60),r=Math.floor(e/1e3/60%60),a=Math.floor(e/1e3/3600%24),o=Math.floor(e/864e5),i=["d","h","m","s","ms"],l=[o,a,r,n,t].map(((e,t)=>e?"".concat(e).concat(i[t]):""));return l.filter((e=>e)).join("")},tn=e=>{const t=o()(1e3*e);return t.isValid()?t.toDate():new Date},nn={NODE_ENV:"production",PUBLIC_URL:".",WDS_SOCKET_HOST:void 0,WDS_SOCKET_PATH:void 0,WDS_SOCKET_PORT:void 0,FAST_REFRESH:!1}.REACT_APP_TYPE===Ve.logs,rn=[{title:"Last 5 minutes",duration:"5m",isDefault:nn},{title:"Last 15 minutes",duration:"15m"},{title:"Last 30 minutes",duration:"30m",isDefault:!nn},{title:"Last 1 hour",duration:"1h"},{title:"Last 3 hours",duration:"3h"},{title:"Last 6 hours",duration:"6h"},{title:"Last 12 hours",duration:"12h"},{title:"Last 24 hours",duration:"24h"},{title:"Last 2 days",duration:"2d"},{title:"Last 7 days",duration:"7d"},{title:"Last 30 days",duration:"30d"},{title:"Last 90 days",duration:"90d"},{title:"Last 180 days",duration:"180d"},{title:"Last 1 year",duration:"1y"},{title:"Yesterday",duration:"1d",until:()=>o()().tz().subtract(1,"day").endOf("day").toDate()},{title:"Today",duration:"1d",until:()=>o()().tz().endOf("day").toDate()}].map((e=>({id:e.title.replace(/\s/g,"_").toLocaleLowerCase(),until:e.until?e.until:()=>o()().tz().toDate(),...e}))),an=e=>{var t;let{relativeTimeId:n,defaultDuration:r,defaultEndInput:a}=e;const o=null===(t=rn.find((e=>e.isDefault)))||void 0===t?void 0:t.id,i=n||ut("g0.relative_time",o),l=rn.find((e=>e.id===i));return{relativeTimeId:l?i:"none",duration:l?l.duration:r,endInput:l?l.until():a}},on=e=>{const t=o()().tz(e);return"UTC".concat(t.format("Z"))},ln=function(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:"";const t=new RegExp(e,"i");return $t.reduce(((n,r)=>{const a=(r.match(/^(.*?)\//)||[])[1]||"unknown",o=on(r),i=o.replace(/UTC|0/,""),l=r.replace(/[/_]/g," "),s={region:r,utc:o,search:"".concat(r," ").concat(o," ").concat(l," ").concat(i)},c=!e||e&&t.test(s.search);return c&&n[a]?n[a].push(s):c&&(n[a]=[s]),n}),{})},sn=e=>{o().tz.setDefault(e)},cn=()=>{const e=o().tz.guess(),t=(e=>{try{return o()().tz(e),!0}catch(Lp){return!1}})(e);return{isValid:t,title:t?"Browser Time (".concat(e,")"):"Browser timezone (UTC)",region:t?e:"UTC"}},un=et("TIMEZONE")||cn().region;sn(un);const dn=()=>{const e=ut("g0.range_input"),{duration:t,endInput:n,relativeTimeId:r}=an({defaultDuration:e||"1h",defaultEndInput:(a=ut("g0.end_input",o()().utc().format(Rt)),o()(a).utcOffset(0,!0).toDate()),relativeTimeId:e?ut("g0.relative_time","none"):void 0});var a;return{duration:t,period:Gt(t,n),relativeTime:r}},hn={...dn(),timezone:un};function mn(e,t){switch(t.type){case"SET_TIME_STATE":return{...e,...t.payload};case"SET_DURATION":return{...e,duration:t.payload,period:Gt(t.payload,tn(e.period.end)),relativeTime:"none"};case"SET_RELATIVE_TIME":return{...e,duration:t.payload.duration,period:Gt(t.payload.duration,t.payload.until),relativeTime:t.payload.id};case"SET_PERIOD":const n=(e=>{const t=e.to.valueOf()-e.from.valueOf();return en(t)})(t.payload);return{...e,duration:n,period:Gt(n,t.payload.to),relativeTime:"none"};case"RUN_QUERY":const{duration:r,endInput:a}=an({relativeTimeId:e.relativeTime,defaultDuration:e.duration,defaultEndInput:tn(e.period.end)});return{...e,period:Gt(r,a)};case"RUN_QUERY_TO_NOW":return{...e,period:Gt(e.duration)};case"SET_TIMEZONE":return sn(t.payload),Xe("TIMEZONE",t.payload),e.defaultTimezone&&Xe("DISABLED_DEFAULT_TIMEZONE",t.payload!==e.defaultTimezone),{...e,timezone:t.payload};case"SET_DEFAULT_TIMEZONE":return{...e,defaultTimezone:t.payload};default:throw new Error}}const pn=(0,r.createContext)({}),fn=()=>(0,r.useContext)(pn).state,vn=()=>(0,r.useContext)(pn).dispatch,gn=e=>{const t=et(e);return t?JSON.parse(t):[]},yn=50,_n=1e3,bn=1e3;const wn=dt(),kn={query:wn,queryHistory:wn.map((e=>({index:0,values:[e]}))),autocomplete:et("AUTOCOMPLETE")||!1,autocompleteQuick:!1,autocompleteCache:new class{constructor(){this.maxSize=void 0,this.map=void 0,this.maxSize=bn,this.map=new Map}get(e){for(const[t,n]of this.map){const r=JSON.parse(t),a=r.start===e.start&&r.end===e.end,o=r.type===e.type,i=e.value&&r.value&&e.value.includes(r.value),l=r.match===e.match||i,s=n.length<_n;if(l&&a&&o&&s)return n}return this.map.get(JSON.stringify(e))}put(e,t){if(this.map.size>=this.maxSize){const e=this.map.keys().next().value;this.map.delete(e)}this.map.set(JSON.stringify(e),t)}},metricsQLFunctions:[]};function xn(e,t){switch(t.type){case"SET_QUERY":return{...e,query:t.payload.map((e=>e))};case"SET_QUERY_HISTORY":return(e=>{const t=e.map((e=>e.values[e.index])),n=gn("QUERY_HISTORY");n[0]||(n[0]=[]);const r=n[0];t.forEach((e=>{!r.includes(e)&&e&&r.unshift(e),r.length>250&&r.shift()})),Xe("QUERY_HISTORY",JSON.stringify(n))})(t.payload),{...e,queryHistory:t.payload};case"SET_QUERY_HISTORY_BY_INDEX":return e.queryHistory.splice(t.payload.queryNumber,1,t.payload.value),{...e,queryHistory:e.queryHistory};case"TOGGLE_AUTOCOMPLETE":return Xe("AUTOCOMPLETE",!e.autocomplete),{...e,autocomplete:!e.autocomplete};case"SET_AUTOCOMPLETE_QUICK":return{...e,autocompleteQuick:t.payload};case"SET_AUTOCOMPLETE_CACHE":return e.autocompleteCache.put(t.payload.key,t.payload.value),{...e};case"SET_METRICSQL_FUNCTIONS":return{...e,metricsQLFunctions:t.payload};default:throw new Error}}const Sn=(0,r.createContext)({}),Cn=()=>(0,r.useContext)(Sn).state,En=()=>(0,r.useContext)(Sn).dispatch,Nn=()=>Nt("svg",{viewBox:"0 0 74 24",fill:"currentColor",children:Nt("path",{d:"M6.12 10.48c.36.28.8.43 1.26.43h.05c.48 0 .96-.19 1.25-.44 1.5-1.28 5.88-5.29 5.88-5.29C15.73 4.1 12.46 3.01 7.43 3h-.06C2.33 3-.93 4.1.24 5.18c0 0 4.37 4 5.88 5.3Zm2.56 2.16c-.36.28-.8.44-1.26.45h-.04c-.46 0-.9-.17-1.26-.45-1.04-.88-4.74-4.22-6.12-5.5v1.94c0 .21.08.5.22.63l.07.06c1.05.96 4.55 4.16 5.83 5.25.36.28.8.43 1.26.44h.04c.49-.02.96-.2 1.26-.44 1.3-1.11 4.94-4.45 5.88-5.31.15-.14.23-.42.23-.63V7.15a454.94 454.94 0 0 1-6.11 5.5Zm-1.26 4.99c.46 0 .9-.16 1.26-.44a454.4 454.4 0 0 0 6.1-5.5v1.94c0 .2-.07.48-.22.62-.94.87-4.57 4.2-5.88 5.3-.3.26-.77.44-1.26.45h-.04c-.46 0-.9-.16-1.26-.44-1.2-1.02-4.38-3.92-5.62-5.06l-.28-.25c-.14-.14-.22-.42-.22-.62v-1.94c1.38 1.26 5.08 4.6 6.12 5.5.36.28.8.43 1.26.44h.04ZM35 5l-5.84 14.46h-2.43L20.89 5h2.16a.9.9 0 0 1 .9.61l3.41 8.82a18.8 18.8 0 0 1 .62 2.02 19.44 19.44 0 0 1 .57-2.02l3.39-8.82c.05-.15.16-.3.31-.42a.9.9 0 0 1 .58-.19H35Zm17.18 0v14.46H49.8v-9.34c0-.37.02-.78.06-1.21l-4.37 8.21c-.21.4-.53.59-.95.59h-.38c-.43 0-.75-.2-.95-.59L38.8 8.88a22.96 22.96 0 0 1 .07 1.24v9.34H36.5V5h2.03l.3.01c.1 0 .17.02.24.05.07.03.13.07.19.13a1 1 0 0 1 .17.24l4.33 8.03a16.97 16.97 0 0 1 .6 1.36 14.34 14.34 0 0 1 .6-1.38l4.28-8.01c.05-.1.1-.18.17-.24.06-.06.12-.1.19-.13a.9.9 0 0 1 .24-.05l.3-.01h2.04Zm8.88 13.73a4.5 4.5 0 0 0 1.82-.35 3.96 3.96 0 0 0 2.22-2.47c.2-.57.3-1.19.3-1.85V5.31h1.02v8.75c0 .78-.12 1.51-.37 2.19a4.88 4.88 0 0 1-2.76 2.95c-.66.29-1.4.43-2.23.43-.82 0-1.57-.14-2.24-.43a5.01 5.01 0 0 1-2.75-2.95 6.37 6.37 0 0 1-.37-2.19V5.31h1.03v8.74c0 .66.1 1.28.3 1.85a3.98 3.98 0 0 0 2.21 2.47c.53.24 1.14.36 1.82.36Zm10.38.73h-1.03V5.31h1.03v14.15Z"})}),An=()=>Nt("svg",{viewBox:"0 0 85 38",fill:"currentColor",children:[Nt("path",{d:"M11.12 10.48c.36.28.8.43 1.26.43h.05c.48 0 .96-.19 1.25-.44 1.5-1.28 5.88-5.29 5.88-5.29 1.17-1.09-2.1-2.17-7.13-2.18h-.06c-5.04 0-8.3 1.1-7.13 2.18 0 0 4.37 4 5.88 5.3Zm2.56 2.16c-.36.28-.8.44-1.26.45h-.04c-.46 0-.9-.17-1.26-.45-1.04-.88-4.74-4.22-6.12-5.5v1.94c0 .21.08.5.22.63l.07.06c1.05.96 4.55 4.16 5.83 5.25.36.28.8.43 1.26.44h.04c.49-.02.96-.2 1.26-.44 1.3-1.11 4.94-4.45 5.88-5.31.15-.14.23-.42.23-.63V7.15a455.13 455.13 0 0 1-6.11 5.5Zm-1.26 4.99c.46 0 .9-.16 1.26-.44 2.05-1.82 4.09-3.65 6.1-5.5v1.94c0 .2-.07.48-.22.62-.94.87-4.57 4.2-5.88 5.3-.3.26-.77.44-1.26.45h-.04c-.46 0-.9-.16-1.26-.44-1.2-1.02-4.38-3.92-5.62-5.06l-.28-.25c-.14-.14-.22-.42-.22-.62v-1.94c1.38 1.26 5.08 4.6 6.12 5.5.36.28.8.43 1.26.44h.04ZM40 5l-5.84 14.46h-2.43L25.89 5h2.16a.9.9 0 0 1 .9.61l3.41 8.82a18.8 18.8 0 0 1 .62 2.02 19.44 19.44 0 0 1 .57-2.02l3.39-8.82c.05-.15.16-.3.31-.42a.9.9 0 0 1 .58-.19H40Zm17.18 0v14.46H54.8v-9.34c0-.37.02-.78.06-1.21l-4.37 8.21c-.21.4-.53.59-.95.59h-.38c-.43 0-.75-.2-.95-.59L43.8 8.88a22.96 22.96 0 0 1 .07 1.24v9.34H41.5V5h2.03l.3.01c.1 0 .17.02.24.05.07.03.13.07.19.13a1 1 0 0 1 .17.24l4.33 8.03a16.97 16.97 0 0 1 .6 1.36 14.34 14.34 0 0 1 .6-1.38l4.28-8.01c.05-.1.1-.18.17-.24.06-.06.12-.1.19-.13a.9.9 0 0 1 .24-.05l.3-.01h2.04Zm8.88 13.73a4.5 4.5 0 0 0 1.82-.35 3.96 3.96 0 0 0 2.22-2.47c.2-.57.3-1.19.3-1.85V5.31h1.02v8.75c0 .78-.12 1.51-.37 2.19a4.88 4.88 0 0 1-2.76 2.95c-.66.29-1.4.43-2.23.43-.82 0-1.57-.14-2.24-.43a5.01 5.01 0 0 1-2.75-2.95 6.37 6.37 0 0 1-.37-2.19V5.31h1.03v8.74c0 .66.1 1.28.3 1.85a3.98 3.98 0 0 0 2.21 2.47c.53.24 1.14.36 1.82.36Zm10.38.73h-1.03V5.31h1.03v14.15ZM1.73 36v-5.17l-.67-.07a.6.6 0 0 1-.21-.1.23.23 0 0 1-.08-.18v-.44h.96v-.59c0-.34.05-.65.14-.92a1.79 1.79 0 0 1 1.08-1.11 2.45 2.45 0 0 1 1.62-.02l-.03.53c0 .1-.06.15-.16.16H4c-.18 0-.35.03-.5.08a.95.95 0 0 0-.39.23c-.1.11-.19.25-.25.43-.05.18-.08.4-.08.65v.56h1.75v.78H2.8V36H1.73Zm6.17-6.17c.45 0 .85.07 1.2.22a2.57 2.57 0 0 1 1.5 1.62c.13.38.2.81.2 1.29s-.07.91-.2 1.3a2.57 2.57 0 0 1-1.49 1.61c-.36.14-.76.21-1.2.21-.45 0-.86-.07-1.22-.21a2.57 2.57 0 0 1-1.5-1.62c-.12-.38-.19-.81-.19-1.3 0-.47.07-.9.2-1.28a2.57 2.57 0 0 1 1.5-1.62c.35-.15.76-.22 1.2-.22Zm0 5.42c.6 0 1.05-.2 1.35-.6.3-.4.44-.97.44-1.69s-.15-1.28-.44-1.69c-.3-.4-.75-.6-1.35-.6-.3 0-.57.05-.8.15-.22.1-.4.26-.56.45-.15.2-.26.44-.33.73-.08.28-.11.6-.11.96 0 .72.15 1.29.44 1.69.3.4.76.6 1.36.6Zm5.26-4.11c.2-.42.43-.74.71-.97.28-.24.62-.36 1.03-.36.13 0 .25.02.36.05.12.02.23.07.32.13l-.08.8c-.02.1-.08.15-.18.15l-.24-.04a1.7 1.7 0 0 0-.88.05c-.15.05-.29.14-.4.25-.12.1-.23.24-.32.4-.1.17-.18.35-.26.56V36h-1.07v-6.08h.61c.12 0 .2.02.24.07.05.04.08.12.1.23l.06.92Zm13.73-3.82L23.39 36h-1.46l-3.5-8.68h1.29a.54.54 0 0 1 .54.37l2.04 5.3a11.31 11.31 0 0 1 .37 1.21 11.65 11.65 0 0 1 .35-1.22l2.03-5.29c.03-.1.1-.18.19-.25.1-.08.21-.12.35-.12h1.3Zm2.2 2.52V36H27.6v-6.16h1.49Zm.2-1.79c0 .13-.02.25-.08.36a1 1 0 0 1-.51.5.96.96 0 0 1-.73 0 1.02 1.02 0 0 1-.5-.5.96.96 0 0 1 0-.73.93.93 0 0 1 .86-.58.9.9 0 0 1 .37.08c.12.05.22.11.3.2a.94.94 0 0 1 .3.67Zm5.72 3.1a.68.68 0 0 1-.13.13c-.04.03-.1.05-.18.05a.42.42 0 0 1-.22-.07 3.95 3.95 0 0 0-.62-.31c-.14-.05-.3-.07-.51-.07-.26 0-.5.04-.69.14-.2.1-.36.23-.49.4-.13.18-.22.4-.29.64-.06.25-.1.53-.1.85 0 .33.04.62.1.88.08.25.18.47.32.64.13.18.29.3.48.4.18.09.4.13.63.13a1.6 1.6 0 0 0 .94-.27l.26-.2a.4.4 0 0 1 .25-.09.3.3 0 0 1 .27.14l.43.54a2.76 2.76 0 0 1-1.77.96c-.22.03-.43.05-.65.05a2.57 2.57 0 0 1-1.96-.83c-.25-.28-.45-.6-.6-1-.14-.4-.21-.85-.21-1.35 0-.45.06-.87.2-1.25a2.61 2.61 0 0 1 1.51-1.67c.37-.16.8-.24 1.28-.24.46 0 .86.07 1.2.22.35.15.66.36.94.64l-.4.54Zm3.43 4.95c-.54 0-.95-.15-1.24-.45-.28-.3-.42-.73-.42-1.26v-3.44h-.63a.29.29 0 0 1-.2-.07c-.06-.06-.09-.13-.09-.24v-.59l.99-.16.31-1.68a.33.33 0 0 1 .12-.18.34.34 0 0 1 .21-.07h.77v1.94h1.64v1.05h-1.64v3.34c0 .2.05.34.14.45.1.1.22.16.39.16a.73.73 0 0 0 .39-.1l.12-.07a.2.2 0 0 1 .11-.03c.05 0 .08.01.11.03l.09.1.44.72c-.21.18-.46.32-.74.4-.28.1-.57.15-.87.15Zm5.09-6.35c.46 0 .87.07 1.24.22a2.7 2.7 0 0 1 1.58 1.63c.14.39.22.83.22 1.31 0 .49-.08.93-.22 1.32-.14.4-.35.73-.62 1-.26.28-.58.49-.96.64-.37.15-.78.22-1.24.22a3.4 3.4 0 0 1-1.25-.22 2.71 2.71 0 0 1-1.59-1.64 3.8 3.8 0 0 1-.21-1.32c0-.48.07-.92.21-1.31a2.75 2.75 0 0 1 1.58-1.63c.38-.15.8-.22 1.26-.22Zm0 5.2c.51 0 .89-.17 1.13-.52.25-.34.38-.84.38-1.5a2.6 2.6 0 0 0-.38-1.53c-.24-.34-.62-.52-1.13-.52-.52 0-.9.18-1.16.53-.25.35-.37.85-.37 1.51s.12 1.17.37 1.51c.25.35.64.52 1.16.52Zm5.56-4.04c.2-.37.42-.65.69-.86.26-.21.57-.32.94-.32.28 0 .5.06.68.19l-.1 1.1a.3.3 0 0 1-.09.16.24.24 0 0 1-.15.04 1.8 1.8 0 0 1-.27-.03 2.01 2.01 0 0 0-.34-.03c-.16 0-.3.03-.44.08a1.1 1.1 0 0 0-.34.2c-.1.1-.2.2-.27.33-.08.13-.15.27-.22.44V36H47.7v-6.16h.87c.15 0 .26.03.31.09.06.05.1.15.13.29l.09.7Zm4.62-1.07V36h-1.49v-6.16h1.49Zm.2-1.79c0 .13-.02.25-.07.36a1 1 0 0 1-.51.5.96.96 0 0 1-.74 0 1.02 1.02 0 0 1-.5-.5.96.96 0 0 1 0-.73.93.93 0 0 1 .86-.58.9.9 0 0 1 .38.08c.11.05.21.11.3.2a.94.94 0 0 1 .28.67Zm4.56 5.32a7.8 7.8 0 0 0-1.08.12c-.29.05-.52.12-.7.2a.92.92 0 0 0-.38.3.64.64 0 0 0-.11.36c0 .26.07.45.23.56.15.11.35.17.6.17.3 0 .57-.06.79-.17.22-.1.44-.28.65-.5v-1.04Zm-3.4-2.67c.71-.65 1.57-.97 2.56-.97.36 0 .68.06.97.18a1.99 1.99 0 0 1 1.16 1.24c.1.3.16.61.16.96V36h-.67a.7.7 0 0 1-.33-.06c-.07-.04-.13-.13-.18-.26l-.13-.44c-.16.14-.3.26-.46.37a2.8 2.8 0 0 1-.97.43 2.77 2.77 0 0 1-1.32-.05 1.62 1.62 0 0 1-.57-.31 1.41 1.41 0 0 1-.38-.53 1.85 1.85 0 0 1-.05-1.18c.05-.16.14-.3.25-.45.12-.14.28-.27.46-.4a3 3 0 0 1 .7-.32 9.19 9.19 0 0 1 2.2-.33v-.36c0-.41-.09-.71-.26-.91-.18-.2-.43-.3-.76-.3a1.84 1.84 0 0 0-1.02.28l-.33.18c-.1.06-.2.09-.32.09-.1 0-.2-.03-.27-.08a.72.72 0 0 1-.17-.2l-.26-.47Zm11.49 4.32V36h-4.88v-8.6h1.16v7.62h3.72Zm3.16-5.2c.44 0 .84.08 1.2.23a2.57 2.57 0 0 1 1.49 1.62c.13.38.2.81.2 1.29s-.07.91-.2 1.3a2.57 2.57 0 0 1-1.49 1.61c-.36.14-.76.21-1.2.21-.45 0-.85-.07-1.21-.21a2.57 2.57 0 0 1-1.5-1.62c-.13-.38-.2-.81-.2-1.3 0-.47.07-.9.2-1.28.14-.39.33-.72.59-1 .25-.26.55-.47.9-.62.37-.15.77-.22 1.22-.22Zm0 5.43c.6 0 1.05-.2 1.34-.6.3-.4.45-.97.45-1.69s-.15-1.28-.45-1.69c-.3-.4-.74-.6-1.34-.6-.3 0-.57.05-.8.15-.22.1-.4.26-.56.45-.15.2-.26.44-.34.73-.07.28-.1.6-.1.96 0 .72.14 1.29.44 1.69.3.4.75.6 1.36.6Zm6.33-2.22c.22 0 .4-.03.57-.09.16-.06.3-.14.41-.25.12-.11.2-.24.26-.39.05-.15.08-.31.08-.5 0-.37-.11-.66-.34-.88-.23-.22-.55-.33-.98-.33-.43 0-.76.1-.99.33-.22.22-.34.51-.34.89 0 .18.03.34.09.5a1.1 1.1 0 0 0 .67.63c.16.06.35.09.57.09Zm1.93 3.3a.51.51 0 0 0-.13-.36.84.84 0 0 0-.34-.22 8.57 8.57 0 0 0-1.73-.2 7.5 7.5 0 0 1-.62-.05c-.23.1-.41.23-.56.4a.8.8 0 0 0-.1.92c.07.12.18.22.32.3.14.1.32.16.54.21a3.5 3.5 0 0 0 1.55 0c.23-.05.42-.12.57-.22.16-.1.29-.21.37-.34a.8.8 0 0 0 .13-.44Zm1.08-6.17v.4c0 .13-.08.21-.25.25l-.69.09c.14.26.2.56.2.88a1.86 1.86 0 0 1-1.36 1.82 3.07 3.07 0 0 1-1.72.04c-.12.08-.22.16-.29.25a.44.44 0 0 0-.1.27c0 .15.06.26.17.33.12.08.28.13.47.16a5 5 0 0 0 .66.06 16.56 16.56 0 0 1 1.5.13c.26.05.48.12.67.22.19.1.34.24.46.41.12.18.18.4.18.69 0 .26-.07.5-.2.75s-.31.46-.56.65c-.24.2-.54.34-.9.46a4.57 4.57 0 0 1-2.36.04c-.33-.09-.6-.2-.82-.36a1.56 1.56 0 0 1-.5-.51c-.1-.2-.16-.4-.16-.6 0-.3.1-.56.28-.77.19-.2.45-.37.77-.5a1.15 1.15 0 0 1-.43-.32.88.88 0 0 1-.15-.54c0-.09.01-.18.04-.27.04-.1.08-.2.15-.28a1.55 1.55 0 0 1 .58-.5c-.3-.16-.53-.39-.7-.66-.17-.28-.25-.6-.25-.97 0-.3.05-.57.16-.8.12-.25.28-.46.48-.63.2-.17.45-.3.73-.4a3 3 0 0 1 2.3.21h1.64Zm4.65.76a.24.24 0 0 1-.23.14.42.42 0 0 1-.2-.07 3.59 3.59 0 0 0-.67-.3 1.8 1.8 0 0 0-1.03 0c-.14.05-.27.11-.37.2a.87.87 0 0 0-.23.27.75.75 0 0 0-.08.35c0 .15.04.28.13.39.1.1.21.19.36.27.15.07.32.14.5.2a13.63 13.63 0 0 1 1.16.4c.2.08.36.18.5.3a1.33 1.33 0 0 1 .5 1.07 2 2 0 0 1-.15.78c-.1.24-.25.44-.45.62-.2.17-.43.3-.72.4a3.1 3.1 0 0 1-2.14-.05 2.97 2.97 0 0 1-.87-.53l.25-.41c.04-.05.07-.1.12-.12a.3.3 0 0 1 .17-.04.4.4 0 0 1 .22.08l.3.19a1.91 1.91 0 0 0 1.03.27c.2 0 .38-.03.54-.08.16-.06.29-.13.4-.22a.96.96 0 0 0 .3-.7c0-.17-.05-.31-.14-.42-.09-.11-.2-.2-.36-.28a2.6 2.6 0 0 0-.5-.2l-.59-.19c-.2-.06-.39-.14-.58-.22a2.14 2.14 0 0 1-.5-.3 1.45 1.45 0 0 1-.36-.46c-.1-.19-.14-.41-.14-.67a1.6 1.6 0 0 1 .57-1.23c.18-.16.4-.3.68-.39.26-.1.57-.14.91-.14a2.84 2.84 0 0 1 1.9.7l-.23.4Z"}),Nt("defs",{children:Nt("path",{d:"M0 0h85v38H0z"})})]}),Mn=()=>Nt("svg",{viewBox:"0 0 85 38",fill:"currentColor",children:Nt("path",{d:"M11.118 10.476c.36.28.801.433 1.257.436h.052c.48-.007.961-.192 1.25-.444 1.509-1.279 5.88-5.287 5.88-5.287 1.168-1.087-2.093-2.174-7.13-2.181h-.06c-5.036.007-8.298 1.094-7.13 2.181 0 0 4.372 4.008 5.88 5.295zm2.559 2.166c-.359.283-.801.439-1.258.444h-.044a2.071 2.071 0 0 1-1.257-.444C10.082 11.755 6.384 8.42 5 7.148v1.93c0 .215.081.496.222.629l.07.064c1.045.955 4.546 4.154 5.825 5.245.358.283.8.438 1.257.444h.044c.489-.015.962-.2 1.258-.444 1.309-1.11 4.948-4.444 5.887-5.31.148-.132.222-.413.222-.628v-1.93a455.127 455.127 0 0 1-6.11 5.494zm-1.258 4.984a2.071 2.071 0 0 0 1.258-.436c2.053-1.815 4.09-3.65 6.11-5.502v1.938c0 .207-.075.488-.223.621-.94.873-4.578 4.2-5.887 5.31-.296.25-.77.436-1.258.443h-.044a2.071 2.071 0 0 1-1.257-.436c-1.204-1.027-4.376-3.928-5.616-5.062l-.28-.255c-.14-.133-.221-.414-.221-.621v-1.938c1.383 1.265 5.081 4.607 6.117 5.495.358.282.8.438 1.257.443h.044zM40 5l-5.84 14.46h-2.43L25.89 5h2.16c.233 0 .423.057.57.17.146.113.256.26.33.44l3.41 8.82c.113.287.22.603.32.95.106.34.206.697.3 1.07.08-.373.166-.73.26-1.07a8.84 8.84 0 0 1 .31-.95l3.39-8.82a.959.959 0 0 1 .31-.42.906.906 0 0 1 .58-.19H40zm17.176 0v14.46h-2.37v-9.34c0-.373.02-.777.06-1.21l-4.37 8.21c-.206.393-.523.59-.95.59h-.38c-.426 0-.743-.197-.95-.59l-4.42-8.24c.02.22.037.437.05.65.014.213.02.41.02.59v9.34h-2.37V5h2.03c.12 0 .224.003.31.01a.778.778 0 0 1 .23.05c.074.027.137.07.19.13.06.06.117.14.17.24l4.33 8.03c.114.213.217.433.31.66.1.227.197.46.29.7.094-.247.19-.483.29-.71.1-.233.207-.457.32-.67l4.27-8.01c.054-.1.11-.18.17-.24a.57.57 0 0 1 .19-.13.903.903 0 0 1 .24-.05c.087-.007.19-.01.31-.01h2.03zm8.887 13.73c.68 0 1.286-.117 1.82-.35.54-.24.996-.57 1.37-.99a4.28 4.28 0 0 0 .85-1.48c.2-.573.3-1.19.3-1.85V5.31h1.02v8.75c0 .78-.124 1.51-.37 2.19a5.248 5.248 0 0 1-1.07 1.77c-.46.5-1.024.893-1.69 1.18-.66.287-1.404.43-2.23.43-.827 0-1.574-.143-2.24-.43a5.012 5.012 0 0 1-1.69-1.18 5.33 5.33 0 0 1-1.06-1.77 6.373 6.373 0 0 1-.37-2.19V5.31h1.03v8.74c0 .66.096 1.277.29 1.85.2.567.483 1.06.85 1.48.373.42.826.75 1.36.99.54.24 1.15.36 1.83.36zm10.38.73h-1.03V5.31h1.03v14.15zM4.242 35v-5.166l-.672-.078a.595.595 0 0 1-.21-.09.23.23 0 0 1-.078-.186v-.438h.96v-.588c0-.348.048-.656.144-.924.1-.272.24-.5.42-.684a1.79 1.79 0 0 1 .66-.426c.256-.096.544-.144.864-.144.272 0 .522.04.75.12l-.024.534c-.008.096-.062.148-.162.156a4.947 4.947 0 0 1-.39.012c-.184 0-.352.024-.504.072a.949.949 0 0 0-.384.234c-.108.108-.192.25-.252.426a2.184 2.184 0 0 0-.084.654v.558h1.752v.774H5.316V35H4.242zM10.416 28.826a3.1 3.1 0 0 1 1.2.222c.356.148.66.358.912.63s.444.602.576.99c.136.384.204.814.204 1.29 0 .48-.068.912-.204 1.296a2.735 2.735 0 0 1-.576.984 2.572 2.572 0 0 1-.912.63 3.175 3.175 0 0 1-1.2.216c-.448 0-.852-.072-1.212-.216a2.572 2.572 0 0 1-.912-.63 2.805 2.805 0 0 1-.582-.984 3.972 3.972 0 0 1-.198-1.296c0-.476.066-.906.198-1.29.136-.388.33-.718.582-.99.252-.272.556-.482.912-.63.36-.148.764-.222 1.212-.222zm0 5.424c.6 0 1.048-.2 1.344-.6.296-.404.444-.966.444-1.686 0-.724-.148-1.288-.444-1.692-.296-.404-.744-.606-1.344-.606-.304 0-.57.052-.798.156a1.507 1.507 0 0 0-.564.45c-.148.196-.26.438-.336.726a3.941 3.941 0 0 0-.108.966c0 .72.148 1.282.444 1.686.3.4.754.6 1.362.6zM15.677 30.14c.192-.416.428-.74.708-.972.28-.236.622-.354 1.026-.354.128 0 .25.014.366.042.12.028.226.072.318.132l-.078.798c-.024.1-.084.15-.18.15-.056 0-.138-.012-.246-.036a1.694 1.694 0 0 0-.366-.036c-.192 0-.364.028-.516.084-.148.056-.282.14-.402.252a1.782 1.782 0 0 0-.318.408c-.092.16-.176.344-.252.552V35h-1.074v-6.078h.612c.116 0 .196.022.24.066.044.044.074.12.09.228l.072.924zM26.761 28.922 24.283 35h-.96l-2.478-6.078h.87a.33.33 0 0 1 .33.222l1.542 3.912c.048.148.09.292.126.432.036.14.07.28.102.42.032-.14.066-.28.102-.42.036-.14.08-.284.132-.432l1.56-3.912a.33.33 0 0 1 .12-.156.311.311 0 0 1 .198-.066h.834zM27.74 35v-6.078h.643c.152 0 .246.074.282.222l.078.624c.224-.276.476-.502.756-.678.28-.176.604-.264.972-.264.408 0 .738.114.99.342.256.228.44.536.552.924.088-.22.2-.41.336-.57a1.987 1.987 0 0 1 1.014-.624c.196-.048.394-.072.594-.072.32 0 .604.052.852.156.252.1.464.248.636.444.176.196.31.438.402.726.092.284.138.61.138.978V35H34.91v-3.87c0-.476-.104-.836-.312-1.08-.208-.248-.508-.372-.9-.372-.176 0-.344.032-.504.096-.156.06-.294.15-.414.27-.12.12-.216.272-.288.456-.068.18-.102.39-.102.63V35h-1.074v-3.87c0-.488-.098-.852-.294-1.092-.196-.24-.482-.36-.858-.36-.264 0-.508.072-.732.216a2.38 2.38 0 0 0-.618.576V35H27.74zM40.746 32.372c-.428.02-.788.058-1.08.114-.292.052-.526.12-.702.204a.923.923 0 0 0-.378.294.639.639 0 0 0-.114.366c0 .26.076.446.228.558.156.112.358.168.606.168.304 0 .566-.054.786-.162.224-.112.442-.28.654-.504v-1.038zm-3.396-2.67c.708-.648 1.56-.972 2.556-.972.36 0 .682.06.966.18.284.116.524.28.72.492.196.208.344.458.444.75.104.292.156.612.156.96V35h-.672a.708.708 0 0 1-.324-.06c-.076-.044-.136-.13-.18-.258l-.132-.444c-.156.14-.308.264-.456.372a2.804 2.804 0 0 1-.462.264c-.16.072-.332.126-.516.162-.18.04-.38.06-.6.06-.26 0-.5-.034-.72-.102a1.618 1.618 0 0 1-.57-.318 1.414 1.414 0 0 1-.372-.522 1.852 1.852 0 0 1-.132-.726 1.419 1.419 0 0 1 .33-.906c.12-.14.274-.272.462-.396s.418-.232.69-.324c.276-.092.596-.166.96-.222.364-.06.78-.096 1.248-.108v-.36c0-.412-.088-.716-.264-.912-.176-.2-.43-.3-.762-.3-.24 0-.44.028-.6.084-.156.056-.294.12-.414.192l-.33.186a.631.631 0 0 1-.324.084.439.439 0 0 1-.264-.078.716.716 0 0 1-.174-.192l-.264-.474zM44.974 29.6c.124-.124.254-.238.39-.342a2.395 2.395 0 0 1 .936-.444c.176-.044.368-.066.576-.066.336 0 .634.058.894.174.26.112.476.272.648.48.176.204.308.45.396.738.092.284.138.598.138.942V35H47.47v-3.918c0-.376-.086-.666-.258-.87-.172-.208-.434-.312-.786-.312-.256 0-.496.058-.72.174a2.58 2.58 0 0 0-.636.474V35h-1.482v-6.156h.906c.192 0 .318.09.378.27l.102.486zM53.085 28.748c.456 0 .87.074 1.242.222a2.692 2.692 0 0 1 1.578 1.626c.144.392.216.83.216 1.314 0 .488-.072.928-.216 1.32-.144.392-.35.726-.618 1.002a2.653 2.653 0 0 1-.96.636 3.333 3.333 0 0 1-1.242.222c-.46 0-.878-.074-1.254-.222a2.712 2.712 0 0 1-.966-.636 2.922 2.922 0 0 1-.618-1.002 3.807 3.807 0 0 1-.216-1.32c0-.484.072-.922.216-1.314.148-.392.354-.724.618-.996.268-.272.59-.482.966-.63a3.397 3.397 0 0 1 1.254-.222zm0 5.202c.512 0 .89-.172 1.134-.516.248-.344.372-.848.372-1.512s-.124-1.17-.372-1.518c-.244-.348-.622-.522-1.134-.522-.52 0-.906.176-1.158.528-.248.348-.372.852-.372 1.512s.124 1.164.372 1.512c.252.344.638.516 1.158.516zM57.252 35v-6.156h.906c.192 0 .318.09.378.27l.096.456c.108-.12.22-.23.336-.33a2.017 2.017 0 0 1 1.32-.492c.388 0 .706.106.954.318.252.208.44.486.564.834a1.93 1.93 0 0 1 .834-.882c.172-.092.354-.16.546-.204.196-.044.392-.066.588-.066.34 0 .642.052.906.156.264.104.486.256.666.456.18.2.316.444.408.732.096.288.144.618.144.99V35h-1.482v-3.918c0-.392-.086-.686-.258-.882-.172-.2-.424-.3-.756-.3-.152 0-.294.026-.426.078a1.026 1.026 0 0 0-.342.228 1.019 1.019 0 0 0-.228.366 1.435 1.435 0 0 0-.084.51V35h-1.488v-3.918c0-.412-.084-.712-.252-.9-.164-.188-.406-.282-.726-.282-.216 0-.418.054-.606.162a1.979 1.979 0 0 0-.516.432V35h-1.482zM70.558 32.372c-.428.02-.788.058-1.08.114-.292.052-.526.12-.702.204a.923.923 0 0 0-.378.294.639.639 0 0 0-.114.366c0 .26.076.446.228.558.156.112.358.168.606.168.304 0 .566-.054.786-.162.224-.112.442-.28.654-.504v-1.038zm-3.396-2.67c.708-.648 1.56-.972 2.556-.972.36 0 .682.06.966.18.284.116.524.28.72.492.196.208.344.458.444.75.104.292.156.612.156.96V35h-.672a.708.708 0 0 1-.324-.06c-.076-.044-.136-.13-.18-.258l-.132-.444c-.156.14-.308.264-.456.372a2.804 2.804 0 0 1-.462.264c-.16.072-.332.126-.516.162-.18.04-.38.06-.6.06-.26 0-.5-.034-.72-.102a1.618 1.618 0 0 1-.57-.318 1.414 1.414 0 0 1-.372-.522 1.852 1.852 0 0 1-.132-.726 1.419 1.419 0 0 1 .33-.906c.12-.14.274-.272.462-.396s.418-.232.69-.324c.276-.092.596-.166.96-.222.364-.06.78-.096 1.248-.108v-.36c0-.412-.088-.716-.264-.912-.176-.2-.43-.3-.762-.3-.24 0-.44.028-.6.084-.156.056-.294.12-.414.192l-.33.186a.631.631 0 0 1-.324.084.439.439 0 0 1-.264-.078.716.716 0 0 1-.174-.192l-.264-.474zM74.9 26.084V35h-1.482v-8.916H74.9zM81.969 28.844l-3.354 7.848a.538.538 0 0 1-.174.234c-.068.056-.174.084-.318.084h-1.104l1.152-2.472-2.49-5.694h1.302c.116 0 .206.028.27.084.068.056.118.12.15.192l1.308 3.192c.044.108.08.216.108.324.032.108.062.218.09.33a32.3 32.3 0 0 1 .108-.33c.036-.112.076-.222.12-.33l1.236-3.186a.437.437 0 0 1 .408-.276h1.188z"})}),Tn=()=>Nt("svg",{viewBox:"0 0 15 17",fill:"currentColor",children:Nt("path",{d:"M6.11767 7.47586C6.47736 7.75563 6.91931 7.90898 7.37503 7.91213H7.42681C7.90756 7.90474 8.38832 7.71987 8.67677 7.46846C10.1856 6.18921 14.5568 2.18138 14.5568 2.18138C15.7254 1.09438 12.4637 0.00739 7.42681 0H7.36764C2.3308 0.00739 -0.930935 1.09438 0.237669 2.18138C0.237669 2.18138 4.60884 6.18921 6.11767 7.47586ZM8.67677 9.64243C8.31803 9.92483 7.87599 10.0808 7.41941 10.0861H7.37503C6.91845 10.0808 6.47641 9.92483 6.11767 9.64243C5.0822 8.75513 1.38409 5.42018 0.000989555 4.14832V6.07829C0.000989555 6.29273 0.0823481 6.57372 0.222877 6.70682L0.293316 6.7712L0.293344 6.77122C1.33784 7.72579 4.83903 10.9255 6.11767 12.0161C6.47641 12.2985 6.91845 12.4545 7.37503 12.4597H7.41941C7.90756 12.4449 8.38092 12.2601 8.67677 12.0161C9.9859 10.9069 13.6249 7.57198 14.5642 6.70682C14.7121 6.57372 14.7861 6.29273 14.7861 6.07829V4.14832C12.7662 5.99804 10.7297 7.82949 8.67677 9.64243ZM7.41941 14.6263C7.87513 14.6232 8.31708 14.4698 8.67677 14.19C10.7298 12.3746 12.7663 10.5407 14.7861 8.68853V10.6259C14.7861 10.8329 14.7121 11.1139 14.5642 11.247C13.6249 12.1196 9.9859 15.4471 8.67677 16.5563C8.38092 16.8077 7.90756 16.9926 7.41941 17H7.37503C6.91931 16.9968 6.47736 16.8435 6.11767 16.5637C4.91427 15.5373 1.74219 12.6364 0.502294 11.5025C0.393358 11.4029 0.299337 11.3169 0.222877 11.247C0.0823481 11.1139 0.000989555 10.8329 0.000989555 10.6259V8.68853C1.38409 9.95303 5.0822 13.2953 6.11767 14.1827C6.47641 14.4651 6.91845 14.6211 7.37503 14.6263H7.41941Z"})}),Ln=()=>Nt("svg",{viewBox:"0 0 24 24",fill:"currentColor",children:Nt("path",{d:"M19.14 12.94c.04-.3.06-.61.06-.94 0-.32-.02-.64-.07-.94l2.03-1.58c.18-.14.23-.41.12-.61l-1.92-3.32c-.12-.22-.37-.29-.59-.22l-2.39.96c-.5-.38-1.03-.7-1.62-.94l-.36-2.54c-.04-.24-.24-.41-.48-.41h-3.84c-.24 0-.43.17-.47.41l-.36 2.54c-.59.24-1.13.57-1.62.94l-2.39-.96c-.22-.08-.47 0-.59.22L2.74 8.87c-.12.21-.08.47.12.61l2.03 1.58c-.05.3-.09.63-.09.94s.02.64.07.94l-2.03 1.58c-.18.14-.23.41-.12.61l1.92 3.32c.12.22.37.29.59.22l2.39-.96c.5.38 1.03.7 1.62.94l.36 2.54c.05.24.24.41.48.41h3.84c.24 0 .44-.17.47-.41l.36-2.54c.59-.24 1.13-.56 1.62-.94l2.39.96c.22.08.47 0 .59-.22l1.92-3.32c.12-.22.07-.47-.12-.61l-2.01-1.58zM12 15.6c-1.98 0-3.6-1.62-3.6-3.6s1.62-3.6 3.6-3.6 3.6 1.62 3.6 3.6-1.62 3.6-3.6 3.6z"})}),In=()=>Nt("svg",{viewBox:"0 0 24 24",fill:"currentColor",children:Nt("path",{d:"M19 6.41 17.59 5 12 10.59 6.41 5 5 6.41 10.59 12 5 17.59 6.41 19 12 13.41 17.59 19 19 17.59 13.41 12z"})}),Pn=()=>Nt("svg",{viewBox:"0 0 24 24",fill:"currentColor",children:Nt("path",{d:"M12 5V2L8 6l4 4V7c3.31 0 6 2.69 6 6 0 2.97-2.17 5.43-5 5.91v2.02c3.95-.49 7-3.85 7-7.93 0-4.42-3.58-8-8-8zm-6 8c0-1.65.67-3.15 1.76-4.24L6.34 7.34C4.9 8.79 4 10.79 4 13c0 4.08 3.05 7.44 7 7.93v-2.02c-2.83-.48-5-2.94-5-5.91z"})}),On=()=>Nt("svg",{viewBox:"0 0 24 24",fill:"currentColor",children:Nt("path",{d:"M12 2C6.48 2 2 6.48 2 12s4.48 10 10 10 10-4.48 10-10S17.52 2 12 2zm1 15h-2v-6h2v6zm0-8h-2V7h2v2z"})}),Rn=()=>Nt("svg",{viewBox:"0 0 24 24",fill:"currentColor",children:Nt("path",{d:"M1 21h22L12 2 1 21zm12-3h-2v-2h2v2zm0-4h-2v-4h2v4z"})}),Dn=()=>Nt("svg",{viewBox:"0 0 24 24",fill:"currentColor",children:Nt("path",{d:"M12 2C6.48 2 2 6.48 2 12s4.48 10 10 10 10-4.48 10-10S17.52 2 12 2zm1 15h-2v-2h2v2zm0-4h-2V7h2v6z"})}),zn=()=>Nt("svg",{viewBox:"0 0 24 24",fill:"currentColor",children:Nt("path",{d:"M12 2C6.48 2 2 6.48 2 12s4.48 10 10 10 10-4.48 10-10S17.52 2 12 2zm-2 15-5-5 1.41-1.41L10 14.17l7.59-7.59L19 8l-9 9z"})}),Fn=()=>Nt("svg",{viewBox:"0 0 24 24",fill:"currentColor",children:Nt("path",{d:"M12 6v3l4-4-4-4v3c-4.42 0-8 3.58-8 8 0 1.57.46 3.03 1.24 4.26L6.7 14.8c-.45-.83-.7-1.79-.7-2.8 0-3.31 2.69-6 6-6zm6.76 1.74L17.3 9.2c.44.84.7 1.79.7 2.8 0 3.31-2.69 6-6 6v-3l-4 4 4 4v-3c4.42 0 8-3.58 8-8 0-1.57-.46-3.03-1.24-4.26z"})}),jn=()=>Nt("svg",{viewBox:"0 0 24 24",fill:"currentColor",children:Nt("path",{d:"M7.41 8.59 12 13.17l4.59-4.58L18 10l-6 6-6-6 1.41-1.41z"})}),Hn=()=>Nt("svg",{viewBox:"0 0 24 24",fill:"currentColor",children:Nt("path",{d:"m7 10 5 5 5-5z"})}),Vn=()=>Nt("svg",{viewBox:"0 0 24 24",fill:"currentColor",children:[Nt("path",{d:"M11.99 2C6.47 2 2 6.48 2 12s4.47 10 9.99 10C17.52 22 22 17.52 22 12S17.52 2 11.99 2zM12 20c-4.42 0-8-3.58-8-8s3.58-8 8-8 8 3.58 8 8-3.58 8-8 8z"}),Nt("path",{d:"M12.5 7H11v6l5.25 3.15.75-1.23-4.5-2.67z"})]}),$n=()=>Nt("svg",{viewBox:"0 0 24 24",fill:"currentColor",children:Nt("path",{d:"M20 3h-1V1h-2v2H7V1H5v2H4c-1.1 0-2 .9-2 2v16c0 1.1.9 2 2 2h16c1.1 0 2-.9 2-2V5c0-1.1-.9-2-2-2zm0 18H4V8h16v13z"})}),Un=()=>Nt("svg",{viewBox:"0 0 24 24",fill:"currentColor",children:Nt("path",{d:"m22 5.72-4.6-3.86-1.29 1.53 4.6 3.86L22 5.72zM7.88 3.39 6.6 1.86 2 5.71l1.29 1.53 4.59-3.85zM12.5 8H11v6l4.75 2.85.75-1.23-4-2.37V8zM12 4c-4.97 0-9 4.03-9 9s4.02 9 9 9c4.97 0 9-4.03 9-9s-4.03-9-9-9zm0 16c-3.87 0-7-3.13-7-7s3.13-7 7-7 7 3.13 7 7-3.13 7-7 7z"})}),Bn=()=>Nt("svg",{viewBox:"0 0 24 24",fill:"currentColor",children:Nt("path",{d:"M20 5H4c-1.1 0-1.99.9-1.99 2L2 17c0 1.1.9 2 2 2h16c1.1 0 2-.9 2-2V7c0-1.1-.9-2-2-2zm-9 3h2v2h-2V8zm0 3h2v2h-2v-2zM8 8h2v2H8V8zm0 3h2v2H8v-2zm-1 2H5v-2h2v2zm0-3H5V8h2v2zm9 7H8v-2h8v2zm0-4h-2v-2h2v2zm0-3h-2V8h2v2zm3 3h-2v-2h2v2zm0-3h-2V8h2v2z"})}),qn=()=>Nt("svg",{viewBox:"0 0 24 24",fill:"currentColor",children:Nt("path",{d:"M8 5v14l11-7z"})}),Yn=()=>Nt("svg",{viewBox:"0 0 24 24",fill:"currentColor",children:Nt("path",{d:"m10 16.5 6-4.5-6-4.5v9zM12 2C6.48 2 2 6.48 2 12s4.48 10 10 10 10-4.48 10-10S17.52 2 12 2zm0 18c-4.41 0-8-3.59-8-8s3.59-8 8-8 8 3.59 8 8-3.59 8-8 8z"})}),Wn=()=>Nt("svg",{viewBox:"0 0 24 24",fill:"currentColor",children:Nt("path",{d:"m3.5 18.49 6-6.01 4 4L22 6.92l-1.41-1.41-7.09 7.97-4-4L2 16.99z"})}),Kn=()=>Nt("svg",{viewBox:"0 0 24 24",fill:"currentColor",children:Nt("path",{d:"M10 10.02h5V21h-5zM17 21h3c1.1 0 2-.9 2-2v-9h-5v11zm3-18H5c-1.1 0-2 .9-2 2v3h19V5c0-1.1-.9-2-2-2zM3 19c0 1.1.9 2 2 2h3V10H3v9z"})}),Qn=()=>Nt("svg",{viewBox:"0 0 24 24",fill:"currentColor",children:Nt("path",{d:"M9.4 16.6 4.8 12l4.6-4.6L8 6l-6 6 6 6 1.4-1.4zm5.2 0 4.6-4.6-4.6-4.6L16 6l6 6-6 6-1.4-1.4z"})}),Zn=()=>Nt("svg",{viewBox:"0 0 24 24",fill:"currentColor",children:Nt("path",{d:"M6 19c0 1.1.9 2 2 2h8c1.1 0 2-.9 2-2V7H6v12zM19 4h-3.5l-1-1h-5l-1 1H5v2h14V4z"})}),Gn=()=>Nt("svg",{viewBox:"0 0 24 24",fill:"currentColor",children:Nt("path",{d:"M19 13h-6v6h-2v-6H5v-2h6V5h2v6h6v2z"})}),Jn=()=>Nt("svg",{viewBox:"0 0 24 24",fill:"currentColor",children:Nt("path",{d:"M19 13H5v-2h14v2z"})}),Xn=()=>Nt("svg",{viewBox:"0 0 24 24",fill:"currentColor",children:Nt("path",{d:"M8.9999 14.7854L18.8928 4.8925C19.0803 4.70497 19.3347 4.59961 19.5999 4.59961C19.8651 4.59961 20.1195 4.70497 20.307 4.8925L21.707 6.2925C22.0975 6.68303 22.0975 7.31619 21.707 7.70672L9.70701 19.7067C9.31648 20.0972 8.68332 20.0972 8.2928 19.7067L2.6928 14.1067C2.50526 13.9192 2.3999 13.6648 2.3999 13.3996C2.3999 13.1344 2.50526 12.88 2.6928 12.6925L4.0928 11.2925C4.48332 10.902 5.11648 10.902 5.50701 11.2925L8.9999 14.7854Z"})}),er=()=>Nt("svg",{viewBox:"0 0 24 24",fill:"currentColor",children:Nt("path",{d:"M12 4.5C7 4.5 2.73 7.61 1 12c1.73 4.39 6 7.5 11 7.5s9.27-3.11 11-7.5c-1.73-4.39-6-7.5-11-7.5zM12 17c-2.76 0-5-2.24-5-5s2.24-5 5-5 5 2.24 5 5-2.24 5-5 5zm0-8c-1.66 0-3 1.34-3 3s1.34 3 3 3 3-1.34 3-3-1.34-3-3-3z"})}),tr=()=>Nt("svg",{viewBox:"0 0 24 24",fill:"currentColor",children:Nt("path",{d:"M12 7c2.76 0 5 2.24 5 5 0 .65-.13 1.26-.36 1.83l2.92 2.92c1.51-1.26 2.7-2.89 3.43-4.75-1.73-4.39-6-7.5-11-7.5-1.4 0-2.74.25-3.98.7l2.16 2.16C10.74 7.13 11.35 7 12 7zM2 4.27l2.28 2.28.46.46C3.08 8.3 1.78 10.02 1 12c1.73 4.39 6 7.5 11 7.5 1.55 0 3.03-.3 4.38-.84l.42.42L19.73 22 21 20.73 3.27 3 2 4.27zM7.53 9.8l1.55 1.55c-.05.21-.08.43-.08.65 0 1.66 1.34 3 3 3 .22 0 .44-.03.65-.08l1.55 1.55c-.67.33-1.41.53-2.2.53-2.76 0-5-2.24-5-5 0-.79.2-1.53.53-2.2zm4.31-.78 3.15 3.15.02-.16c0-1.66-1.34-3-3-3l-.17.01z"})}),nr=()=>Nt("svg",{viewBox:"0 0 24 24",fill:"currentColor",children:Nt("path",{d:"M19 9l1.25-2.75L23 5l-2.75-1.25L19 1l-1.25 2.75L15 5l2.75 1.25L19 9zm-7.5.5L9 4 6.5 9.5 1 12l5.5 2.5L9 20l2.5-5.5L17 12l-5.5-2.5zM19 15l-1.25 2.75L15 19l2.75 1.25L19 23l1.25-2.75L23 19l-2.75-1.25L19 15z"})}),rr=()=>Nt("svg",{viewBox:"0 0 24 24",fill:"currentColor",children:Nt("path",{d:"M16 1H4c-1.1 0-2 .9-2 2v14h2V3h12V1zm3 4H8c-1.1 0-2 .9-2 2v14c0 1.1.9 2 2 2h11c1.1 0 2-.9 2-2V7c0-1.1-.9-2-2-2zm0 16H8V7h11v14z"})}),ar=()=>Nt("svg",{viewBox:"0 0 24 24",fill:"currentColor",children:Nt("path",{d:"M20 9H4v2h16V9zM4 15h16v-2H4v2z"})}),or=()=>Nt("svg",{viewBox:"0 0 24 24",fill:"currentColor",children:Nt("path",{d:"M23 8c0 1.1-.9 2-2 2-.18 0-.35-.02-.51-.07l-3.56 3.55c.05.16.07.34.07.52 0 1.1-.9 2-2 2s-2-.9-2-2c0-.18.02-.36.07-.52l-2.55-2.55c-.16.05-.34.07-.52.07s-.36-.02-.52-.07l-4.55 4.56c.05.16.07.33.07.51 0 1.1-.9 2-2 2s-2-.9-2-2 .9-2 2-2c.18 0 .35.02.51.07l4.56-4.55C8.02 9.36 8 9.18 8 9c0-1.1.9-2 2-2s2 .9 2 2c0 .18-.02.36-.07.52l2.55 2.55c.16-.05.34-.07.52-.07s.36.02.52.07l3.55-3.56C19.02 8.35 19 8.18 19 8c0-1.1.9-2 2-2s2 .9 2 2z"})}),ir=()=>Nt("svg",{viewBox:"0 0 24 24",fill:"currentColor",children:[Nt("path",{fillRule:"evenodd",clipRule:"evenodd",d:"M21 5C19.89 4.65 18.67 4.5 17.5 4.5C15.55 4.5 13.45 4.9 12 6C10.55 4.9 8.45 4.5 6.5 4.5C5.33 4.5 4.11 4.65 3 5C2.25 5.25 1.6 5.55 1 6V20.6C1 20.85 1.25 21.1 1.5 21.1C1.6 21.1 1.65 21.1 1.75 21.05C3.15 20.3 4.85 20 6.5 20C8.2 20 10.65 20.65 12 21.5C13.35 20.65 15.8 20 17.5 20C19.15 20 20.85 20.3 22.25 21.05C22.35 21.1 22.4 21.1 22.5 21.1C22.75 21.1 23 20.85 23 20.6V6C22.4 5.55 21.75 5.25 21 5ZM21 18.5C19.9 18.15 18.7 18 17.5 18C15.8 18 13.35 18.65 12 19.5C10.65 18.65 8.2 18 6.5 18C5.3 18 4.1 18.15 3 18.5V7C4.1 6.65 5.3 6.5 6.5 6.5C8.2 6.5 10.65 7.15 12 8C13.35 7.15 15.8 6.5 17.5 6.5C18.7 6.5 19.9 6.65 21 7V18.5Z"}),Nt("path",{d:"M17.5 10.5C18.38 10.5 19.23 10.59 20 10.76V9.24C19.21 9.09 18.36 9 17.5 9C15.8 9 14.26 9.29 13 9.83V11.49C14.13 10.85 15.7 10.5 17.5 10.5ZM13 12.49V14.15C14.13 13.51 15.7 13.16 17.5 13.16C18.38 13.16 19.23 13.25 20 13.42V11.9C19.21 11.75 18.36 11.66 17.5 11.66C15.8 11.66 14.26 11.96 13 12.49ZM17.5 14.33C15.8 14.33 14.26 14.62 13 15.16V16.82C14.13 16.18 15.7 15.83 17.5 15.83C18.38 15.83 19.23 15.92 20 16.09V14.57C19.21 14.41 18.36 14.33 17.5 14.33Z"}),Nt("path",{d:"M6.5 10.5C5.62 10.5 4.77 10.59 4 10.76V9.24C4.79 9.09 5.64 9 6.5 9C8.2 9 9.74 9.29 11 9.83V11.49C9.87 10.85 8.3 10.5 6.5 10.5ZM11 12.49V14.15C9.87 13.51 8.3 13.16 6.5 13.16C5.62 13.16 4.77 13.25 4 13.42V11.9C4.79 11.75 5.64 11.66 6.5 11.66C8.2 11.66 9.74 11.96 11 12.49ZM6.5 14.33C8.2 14.33 9.74 14.62 11 15.16V16.82C9.87 16.18 8.3 15.83 6.5 15.83C5.62 15.83 4.77 15.92 4 16.09V14.57C4.79 14.41 5.64 14.33 6.5 14.33Z"})]}),lr=()=>Nt("svg",{viewBox:"0 0 24 24",fill:"currentColor",children:Nt("path",{d:"M12 2C6.49 2 2 6.49 2 12s4.49 10 10 10 10-4.49 10-10S17.51 2 12 2zm0 18c-4.41 0-8-3.59-8-8s3.59-8 8-8 8 3.59 8 8-3.59 8-8 8zm3-8c0 1.66-1.34 3-3 3s-3-1.34-3-3 1.34-3 3-3 3 1.34 3 3z"})}),sr=()=>Nt("svg",{viewBox:"0 0 24 24",fill:"currentColor",children:Nt("path",{fillRule:"evenodd",clipRule:"evenodd",d:"M12 2C6.48 2 2 6.48 2 12C2 17.52 6.48 22 12 22C17.52 22 22 17.52 22 12C22 6.48 17.52 2 12 2ZM12 6C9.79 6 8 7.79 8 10H10C10 8.9 10.9 8 12 8C13.1 8 14 8.9 14 10C14 10.8792 13.4202 11.3236 12.7704 11.8217C11.9421 12.4566 11 13.1787 11 15H13C13 13.9046 13.711 13.2833 14.4408 12.6455C15.21 11.9733 16 11.2829 16 10C16 7.79 14.21 6 12 6ZM13 16V18H11V16H13Z"})}),cr=()=>Nt("svg",{viewBox:"0 0 24 24",fill:"currentColor",children:Nt("path",{d:"M4 20h16c1.1 0 2-.9 2-2s-.9-2-2-2H4c-1.1 0-2 .9-2 2s.9 2 2 2zm0-3h2v2H4v-2zM2 6c0 1.1.9 2 2 2h16c1.1 0 2-.9 2-2s-.9-2-2-2H4c-1.1 0-2 .9-2 2zm4 1H4V5h2v2zm-2 7h16c1.1 0 2-.9 2-2s-.9-2-2-2H4c-1.1 0-2 .9-2 2s.9 2 2 2zm0-3h2v2H4v-2z"})}),ur=()=>Nt("svg",{viewBox:"0 0 24 24",fill:"currentColor",children:Nt("path",{d:"M12 8c1.1 0 2-.9 2-2s-.9-2-2-2-2 .9-2 2 .9 2 2 2zm0 2c-1.1 0-2 .9-2 2s.9 2 2 2 2-.9 2-2-.9-2-2-2zm0 6c-1.1 0-2 .9-2 2s.9 2 2 2 2-.9 2-2-.9-2-2-2z"})}),dr=()=>Nt("svg",{viewBox:"0 0 24 24",fill:"currentColor",children:Nt("path",{d:"M3 17v2h6v-2H3zM3 5v2h10V5H3zm10 16v-2h8v-2h-8v-2h-2v6h2zM7 9v2H3v2h4v2h2V9H7zm14 4v-2H11v2h10zm-6-4h2V7h4V5h-4V3h-2v6z"})}),hr=()=>Nt("svg",{viewBox:"0 0 24 24",fill:"currentColor",children:Nt("path",{d:"M7 20h4c0 1.1-.9 2-2 2s-2-.9-2-2zm-2-1h8v-2H5v2zm11.5-9.5c0 3.82-2.66 5.86-3.77 6.5H5.27c-1.11-.64-3.77-2.68-3.77-6.5C1.5 5.36 4.86 2 9 2s7.5 3.36 7.5 7.5zm4.87-2.13L20 8l1.37.63L22 10l.63-1.37L24 8l-1.37-.63L22 6l-.63 1.37zM19 6l.94-2.06L22 3l-2.06-.94L19 0l-.94 2.06L16 3l2.06.94L19 6z"})}),mr=()=>Nt("svg",{viewBox:"0 0 24 24",fill:"currentColor",children:Nt("path",{d:"M3 14h4v-4H3v4zm0 5h4v-4H3v4zM3 9h4V5H3v4zm5 5h13v-4H8v4zm0 5h13v-4H8v4zM8 5v4h13V5H8z"})}),pr=()=>Nt("svg",{viewBox:"0 0 24 24",fill:"currentColor",children:Nt("path",{d:"m22 9.24-7.19-.62L12 2 9.19 8.63 2 9.24l5.46 4.73L5.82 21 12 17.27 18.18 21l-1.63-7.03L22 9.24zM12 15.4l-3.76 2.27 1-4.28-3.32-2.88 4.38-.38L12 6.1l1.71 4.04 4.38.38-3.32 2.88 1 4.28L12 15.4z"})}),fr=()=>Nt("svg",{viewBox:"0 0 24 24",fill:"currentColor",children:Nt("path",{d:"M12 17.27 18.18 21l-1.64-7.03L22 9.24l-7.19-.61L12 2 9.19 8.63 2 9.24l5.46 4.73L5.82 21z"})}),vr=()=>Nt("svg",{viewBox:"0 0 16 16",fill:gt("color-error"),children:Nt("path",{d:"M13.5095 4L8.50952 1H7.50952L2.50952 4L2.01953 4.85999V10.86L2.50952 11.71L7.50952 14.71H8.50952L13.5095 11.71L13.9995 10.86V4.85999L13.5095 4ZM7.50952 13.5601L3.00952 10.86V5.69995L7.50952 8.15002V13.5601ZM3.26953 4.69995L8.00952 1.85999L12.7495 4.69995L8.00952 7.29004L3.26953 4.69995ZM13.0095 10.86L8.50952 13.5601V8.15002L13.0095 5.69995V10.86Z"})}),gr=()=>Nt("svg",{viewBox:"0 0 16 16",fill:gt("color-primary"),children:Nt("path",{fillRule:"evenodd",clipRule:"evenodd",d:"M2 5H4V4H1.5L1 4.5V12.5L1.5 13H4V12H2V5ZM14.5 4H12V5H14V12H12V13H14.5L15 12.5V4.5L14.5 4ZM11.76 6.56995L12 7V9.51001L11.7 9.95996L7.19995 11.96H6.73999L4.23999 10.46L4 10.03V7.53003L4.30005 7.06995L8.80005 5.06995H9.26001L11.76 6.56995ZM5 9.70996L6.5 10.61V9.28003L5 8.38V9.70996ZM5.57996 7.56006L7.03003 8.43005L10.42 6.93005L8.96997 6.06006L5.57996 7.56006ZM7.53003 10.73L11.03 9.17004V7.77002L7.53003 9.31995V10.73Z"})}),yr=()=>Nt("svg",{viewBox:"0 0 16 16",fill:gt("color-warning"),children:Nt("path",{fillRule:"evenodd",clipRule:"evenodd",d:"M14 2H8L7 3V6H8V3H14V8H10V9H14L15 8V3L14 2ZM9 6H13V7H9.41L9 6.59V6ZM7 7H2L1 8V13L2 14H8L9 13V8L8 7H7ZM8 13H2V8H8V9V13ZM3 9H7V10H3V9ZM3 11H7V12H3V11ZM9 4H13V5H9V4Z"})}),_r=()=>Nt("svg",{viewBox:"0 0 16 16",fill:gt("color-primary"),children:Nt("path",{fillRule:"evenodd",clipRule:"evenodd",d:"M7 3L8 2H14L15 3V8L14 9H10V8H14V3H8V6H7V3ZM9 9V8L8 7H7H2L1 8V13L2 14H8L9 13V9ZM8 8V9V13H2V8H7H8ZM9.41421 7L9 6.58579V6H13V7H9.41421ZM9 4H13V5H9V4ZM7 10H3V11H7V10Z"})}),br=()=>Nt("svg",{viewBox:"0 0 24 24",fill:"currentColor",children:Nt("path",{d:"M19 9h-4V3H9v6H5l7 7 7-7zM5 18v2h14v-2H5z"})}),wr=()=>Nt("svg",{viewBox:"0 0 24 24",fill:"currentColor",children:Nt("path",{d:"M12 5.83 15.17 9l1.41-1.41L12 3 7.41 7.59 8.83 9zm0 12.34L8.83 15l-1.41 1.41L12 21l4.59-4.59L15.17 15z"})}),kr=()=>Nt("svg",{viewBox:"0 0 24 24",fill:"currentColor",children:Nt("path",{d:"M7.41 18.59 8.83 20 12 16.83 15.17 20l1.41-1.41L12 14zm9.18-13.18L15.17 4 12 7.17 8.83 4 7.41 5.41 12 10z"})}),xr=()=>Nt("svg",{viewBox:"0 0 24 24",fill:"currentColor",children:Nt("path",{d:"M15.5 14h-.79l-.28-.27C15.41 12.59 16 11.11 16 9.5 16 5.91 13.09 3 9.5 3S3 5.91 3 9.5 5.91 16 9.5 16c1.61 0 3.09-.59 4.23-1.57l.27.28v.79l5 4.99L20.49 19zm-6 0C7.01 14 5 11.99 5 9.5S7.01 5 9.5 5 14 7.01 14 9.5 11.99 14 9.5 14"})});var Sr=n(738),Cr=n.n(Sr);const Er=e=>{let{to:t,isNavLink:n,children:r,...a}=e;return n?Nt(De,{to:t,...a,children:r}):Nt("div",{...a,children:r})},Nr=e=>{let{activeItem:t,item:n,color:r=gt("color-primary"),activeNavRef:a,onChange:o,isNavLink:i}=e;return Nt(Er,{className:Cr()({"vm-tabs-item":!0,"vm-tabs-item_active":t===n.value,[n.className||""]:n.className}),isNavLink:i,to:n.value,style:{color:r},onClick:(l=n.value,()=>{o&&o(l)}),ref:t===n.value?a:void 0,children:[n.icon&&Nt("div",{className:Cr()({"vm-tabs-item__icon":!0,"vm-tabs-item__icon_single":!n.label}),children:n.icon}),n.label]});var l};const Ar=function(e,t,n,a){const o=(0,r.useRef)(t);(0,r.useEffect)((()=>{o.current=t}),[t]),(0,r.useEffect)((()=>{var t;const r=null!==(t=null===n||void 0===n?void 0:n.current)&&void 0!==t?t:window;if(!r||!r.addEventListener)return;const i=e=>o.current(e);return r.addEventListener(e,i,a),()=>{r.removeEventListener(e,i,a)}}),[e,n,a])},Mr=()=>{const[e,t]=(0,r.useState)({width:0,height:0}),n=()=>{t({width:window.innerWidth,height:window.innerHeight})};return Ar("resize",n),(0,r.useEffect)(n,[]),e},Tr=e=>{let{activeItem:t,items:n,color:a=gt("color-primary"),onChange:o,indicatorPlacement:i="bottom",isNavLink:l}=e;const s=Mr(),c=(0,r.useRef)(null),[u,d]=(0,r.useState)({left:0,width:0,bottom:0});return(0,r.useEffect)((()=>{var e;if((null===(e=c.current)||void 0===e?void 0:e.base)instanceof HTMLElement){const{offsetLeft:e,offsetWidth:t,offsetHeight:n}=c.current.base;d({left:e,width:t,bottom:"top"===i?n-2:0})}}),[s,t,c,n]),Nt("div",{className:"vm-tabs",children:[n.map((e=>Nt(Nr,{activeItem:t,item:e,onChange:o,color:a,activeNavRef:c,isNavLink:l},e.value))),Nt("div",{className:"vm-tabs__indicator",style:{...u,borderColor:a}})]})},Lr=[{value:mt.chart,icon:Nt(Wn,{}),label:"Graph",prometheusCode:0},{value:mt.code,icon:Nt(Qn,{}),label:"JSON",prometheusCode:3},{value:mt.table,icon:Nt(Kn,{}),label:"Table",prometheusCode:1}],Ir=()=>{const{displayType:e}=Fr(),t=jr();return Nt(Tr,{activeItem:e,items:Lr,onChange:n=>{var r;t({type:"SET_DISPLAY_TYPE",payload:null!==(r=n)&&void 0!==r?r:e})}})},Pr=()=>{const e=ut("g0.tab",0),t=Lr.find((t=>t.prometheusCode===+e||t.value===e));return(null===t||void 0===t?void 0:t.value)||mt.chart},Or=et("SERIES_LIMITS"),Rr={displayType:Pr(),nocache:!1,isTracingEnabled:!1,seriesLimits:Or?JSON.parse(Or):lt,tableCompact:et("TABLE_COMPACT")||!1};function Dr(e,t){switch(t.type){case"SET_DISPLAY_TYPE":return{...e,displayType:t.payload};case"SET_SERIES_LIMITS":return Xe("SERIES_LIMITS",JSON.stringify(t.payload)),{...e,seriesLimits:t.payload};case"TOGGLE_QUERY_TRACING":return{...e,isTracingEnabled:!e.isTracingEnabled};case"TOGGLE_NO_CACHE":return{...e,nocache:!e.nocache};case"TOGGLE_TABLE_COMPACT":return Xe("TABLE_COMPACT",!e.tableCompact),{...e,tableCompact:!e.tableCompact};default:throw new Error}}const zr=(0,r.createContext)({}),Fr=()=>(0,r.useContext)(zr).state,jr=()=>(0,r.useContext)(zr).dispatch,Hr={customStep:ut("g0.step_input",""),yaxis:{limits:{enable:!1,range:{1:[0,0]}}},isHistogram:!1,spanGaps:!1};function Vr(e,t){switch(t.type){case"TOGGLE_ENABLE_YAXIS_LIMITS":return{...e,yaxis:{...e.yaxis,limits:{...e.yaxis.limits,enable:!e.yaxis.limits.enable}}};case"SET_CUSTOM_STEP":return{...e,customStep:t.payload};case"SET_YAXIS_LIMITS":return{...e,yaxis:{...e.yaxis,limits:{...e.yaxis.limits,range:t.payload}}};case"SET_IS_HISTOGRAM":return{...e,isHistogram:t.payload};case"SET_SPAN_GAPS":return{...e,spanGaps:t.payload};default:throw new Error}}const $r=(0,r.createContext)({}),Ur=()=>(0,r.useContext)($r).state,Br=()=>(0,r.useContext)($r).dispatch,qr={dashboardsSettings:[],dashboardsLoading:!1,dashboardsError:""};function Yr(e,t){switch(t.type){case"SET_DASHBOARDS_SETTINGS":return{...e,dashboardsSettings:t.payload};case"SET_DASHBOARDS_LOADING":return{...e,dashboardsLoading:t.payload};case"SET_DASHBOARDS_ERROR":return{...e,dashboardsError:t.payload};default:throw new Error}}const Wr=(0,r.createContext)({}),Kr=()=>(0,r.useContext)(Wr).state,Qr={markdownParsing:"true"===et("LOGS_MARKDOWN")};function Zr(e,t){if("SET_MARKDOWN_PARSING"===t.type)return Xe("LOGS_MARKDOWN","".concat(t.payload)),{...e,markdownParsing:t.payload};throw new Error}const Gr=(0,r.createContext)({}),Jr={windows:"Windows",mac:"Mac OS",linux:"Linux"},Xr=()=>(Object.values(Jr).find((e=>navigator.userAgent.indexOf(e)>=0))||"unknown")===Jr.mac;function ea(){const e=Mr(),t=()=>{const e=["Android","webOS","iPhone","iPad","iPod","BlackBerry","Windows Phone"].map((e=>navigator.userAgent.match(new RegExp(e,"i")))).some((e=>e)),t=window.innerWidth<500;return e||t},[n,a]=(0,r.useState)(t());return(0,r.useEffect)((()=>{a(t())}),[e]),{isMobile:n}}const ta={success:Nt(zn,{}),error:Nt(Dn,{}),warning:Nt(Rn,{}),info:Nt(On,{})},na=e=>{let{variant:t,children:n}=e;const{isDarkTheme:r}=Mt(),{isMobile:a}=ea();return Nt("div",{className:Cr()({"vm-alert":!0,["vm-alert_".concat(t)]:t,"vm-alert_dark":r,"vm-alert_mobile":a}),children:[Nt("div",{className:"vm-alert__icon",children:ta[t||"info"]}),Nt("div",{className:"vm-alert__content",children:n})]})},ra=(0,r.createContext)({showInfoMessage:()=>{}}),aa=function(){for(var e=arguments.length,t=new Array(e),n=0;nn=>{let{children:r}=n;return Nt(e,{children:Nt(t,{children:r})})}),(e=>{let{children:t}=e;return Nt(Ct.FK,{children:t})}))}(...[e=>{let{children:t}=e;const[n,a]=(0,r.useReducer)(St,Lt),o=(0,r.useMemo)((()=>({state:n,dispatch:a})),[n,a]);return Nt(At.Provider,{value:o,children:t})},e=>{let{children:t}=e;const[n,a]=(0,r.useReducer)(mn,hn),o=(0,r.useMemo)((()=>({state:n,dispatch:a})),[n,a]);return Nt(pn.Provider,{value:o,children:t})},e=>{let{children:t}=e;const[n,a]=(0,r.useReducer)(xn,kn),o=(0,r.useMemo)((()=>({state:n,dispatch:a})),[n,a]);return Nt(Sn.Provider,{value:o,children:t})},e=>{let{children:t}=e;const[n,a]=(0,r.useReducer)(Dr,Rr),o=(0,r.useMemo)((()=>({state:n,dispatch:a})),[n,a]);return Nt(zr.Provider,{value:o,children:t})},e=>{let{children:t}=e;const[n,a]=(0,r.useReducer)(Vr,Hr),o=(0,r.useMemo)((()=>({state:n,dispatch:a})),[n,a]);return Nt($r.Provider,{value:o,children:t})},e=>{let{children:t}=e;const{isMobile:n}=ea(),[a,o]=(0,r.useState)({}),[i,l]=(0,r.useState)(!1),[s,c]=(0,r.useState)(void 0);(0,r.useEffect)((()=>{if(!s)return;o({message:s.text,variant:s.type,key:Date.now()}),l(!0);const e=setTimeout(u,4e3);return()=>clearTimeout(e)}),[s]);const u=()=>{c(void 0),l(!1)};return Nt(ra.Provider,{value:{showInfoMessage:c},children:[i&&Nt("div",{className:Cr()({"vm-snackbar":!0,"vm-snackbar_mobile":n}),children:Nt(na,{variant:a.variant,children:Nt("div",{className:"vm-snackbar-content",children:[Nt("span",{children:a.message}),Nt("div",{className:"vm-snackbar-content__close",onClick:u,children:Nt(In,{})})]})})}),t]})},e=>{let{children:t}=e;const[n,a]=(0,r.useReducer)(Yr,qr),o=(0,r.useMemo)((()=>({state:n,dispatch:a})),[n,a]);return Nt(Wr.Provider,{value:o,children:t})},e=>{let{children:t}=e;const[n,a]=(0,r.useReducer)(Zr,Qr),o=(0,r.useMemo)((()=>({state:n,dispatch:a})),[n,a]);return Nt(Gr.Provider,{value:o,children:t})}]),oa=e=>{let{activeMenu:t,label:n,value:r,color:a}=e;return Nt(De,{className:Cr()({"vm-header-nav-item":!0,"vm-header-nav-item_active":t===r}),style:{color:a},to:r,children:n})},ia=(e,t,n)=>{const a=(0,r.useCallback)((r=>{const a=null===e||void 0===e?void 0:e.current,o=r.target,i=(null===n||void 0===n?void 0:n.current)&&n.current.contains(o);!a||a.contains((null===r||void 0===r?void 0:r.target)||null)||i||t(r)}),[e,t]);Ar("mousedown",a),Ar("touchstart",a)},la=e=>{let{variant:t="contained",color:n="primary",size:r="medium",ariaLabel:a,children:o,endIcon:i,startIcon:l,fullWidth:s=!1,className:c,disabled:u,onClick:d,onMouseDown:h}=e;return Nt("button",{className:Cr()({"vm-button":!0,["vm-button_".concat(t,"_").concat(n)]:!0,["vm-button_".concat(r)]:r,"vm-button_icon":(l||i)&&!o,"vm-button_full-width":s,"vm-button_with-icon":l||i,"vm-button_disabled":u,[c||""]:c}),disabled:u,"aria-label":a,onClick:d,onMouseDown:h,children:Nt(Ct.FK,{children:[l&&Nt("span",{className:"vm-button__start-icon",children:l}),o&&Nt("span",{children:o}),i&&Nt("span",{className:"vm-button__end-icon",children:i})]})})},sa=e=>{let{children:t,buttonRef:n,placement:a="bottom-left",open:o=!1,onClose:i,offset:l={top:6,left:0},clickOutside:s=!0,fullWidth:c,title:u,disabledFullScreen:d,variant:h}=e;const{isMobile:m}=ea(),p=oe(),f=re(),[v,g]=(0,r.useState)({width:0,height:0}),[y,_]=(0,r.useState)(!1),b=(0,r.useRef)(null);(0,r.useEffect)((()=>(_(o),!o&&i&&i(),o&&m&&!d&&(document.body.style.overflow="hidden"),()=>{document.body.style.overflow="auto"})),[o]),(0,r.useEffect)((()=>{var e,t;g({width:(null===b||void 0===b||null===(e=b.current)||void 0===e?void 0:e.clientWidth)||0,height:(null===b||void 0===b||null===(t=b.current)||void 0===t?void 0:t.clientHeight)||0}),_(!1)}),[b]);const w=(0,r.useMemo)((()=>{const e=n.current;if(!e||!y)return{};const t=e.getBoundingClientRect(),r={top:0,left:0,width:"auto"},o="bottom-right"===a||"top-right"===a,i=null===a||void 0===a?void 0:a.includes("top"),s=(null===l||void 0===l?void 0:l.top)||0,u=(null===l||void 0===l?void 0:l.left)||0;r.left=r.left=t.left+u,r.top=t.height+t.top+s,o&&(r.left=t.right-v.width),i&&(r.top=t.top-v.height-s);const{innerWidth:d,innerHeight:h}=window,m=r.top+v.height+20>h,p=r.top-20<0,f=r.left+v.width+20>d,g=r.left-20<0;return m&&(r.top=t.top-v.height-s),p&&(r.top=t.height+t.top+s),f&&(r.left=t.right-v.width-u),g&&(r.left=t.left+u),c&&(r.width="".concat(t.width,"px")),r.top<0&&(r.top=20),r.left<0&&(r.left=20),r}),[n,a,y,t,c]),k=()=>{_(!1),i()};(0,r.useEffect)((()=>{if(!b.current||!y||m&&!d)return;const{right:e,width:t}=b.current.getBoundingClientRect();if(e>window.innerWidth){const e=window.innerWidth-20-t;b.current.style.left=e{y&&m&&!d&&(p(f,{replace:!0}),i())}),[y,m,d,f,i]);return Ar("scroll",k),Ar("popstate",x),ia(b,(()=>{s&&k()}),n),Nt(Ct.FK,{children:(y||!v.width)&&r.default.createPortal(Nt("div",{className:Cr()({"vm-popper":!0,["vm-popper_".concat(h)]:h,"vm-popper_mobile":m&&!d,"vm-popper_open":(m||Object.keys(w).length)&&y}),ref:b,style:m&&!d?{}:w,children:[(u||m&&!d)&&Nt("div",{className:"vm-popper-header",children:[Nt("p",{className:"vm-popper-header__title",children:u}),Nt(la,{variant:"text",color:"dark"===h?"white":"primary",size:"small",onClick:e=>{e.stopPropagation(),i()},ariaLabel:"close",children:Nt(In,{})})]}),t]}),document.body)})},ca=e=>{const[t,n]=(0,r.useState)(!!e),a=(0,r.useCallback)((()=>n(!0)),[]),o=(0,r.useCallback)((()=>n(!1)),[]),i=(0,r.useCallback)((()=>n((e=>!e))),[]);return{value:t,setValue:n,setTrue:a,setFalse:o,toggle:i}},ua=e=>{let{activeMenu:t,label:n,color:a,background:o,submenu:i,direction:l}=e;const{pathname:s}=re(),[c,u]=(0,r.useState)(null),d=(0,r.useRef)(null),{value:h,setFalse:m,setTrue:p}=ca(!1),f=()=>{c&&clearTimeout(c);const e=setTimeout(m,300);u(e)};return(0,r.useEffect)((()=>{m()}),[s]),"column"===l?Nt(Ct.FK,{children:i.map((e=>Nt(oa,{activeMenu:t,value:e.value||"",label:e.label||""},e.value)))}):Nt("div",{className:Cr()({"vm-header-nav-item":!0,"vm-header-nav-item_sub":!0,"vm-header-nav-item_open":h,"vm-header-nav-item_active":i.find((e=>e.value===t))}),style:{color:a},onMouseEnter:()=>{p(),c&&clearTimeout(c)},onMouseLeave:f,ref:d,children:[n,Nt(Hn,{}),Nt(sa,{open:h,placement:"bottom-left",offset:{top:12,left:0},onClose:m,buttonRef:d,children:Nt("div",{className:"vm-header-nav-item-submenu",style:{background:o},onMouseLeave:f,onMouseEnter:()=>{c&&clearTimeout(c)},children:i.map((e=>Nt(oa,{activeMenu:t,value:e.value||"",label:e.label||"",color:a},e.value)))})})]})},da={label:"Explore",submenu:[{label:Ye[We.metrics].title,value:We.metrics},{label:Ye[We.cardinality].title,value:We.cardinality},{label:Ye[We.topQueries].title,value:We.topQueries},{label:Ye[We.activeQueries].title,value:We.activeQueries}]},ha={label:"Tools",submenu:[{label:Ye[We.trace].title,value:We.trace},{label:Ye[We.queryAnalyzer].title,value:We.queryAnalyzer},{label:Ye[We.withTemplate].title,value:We.withTemplate},{label:Ye[We.relabel].title,value:We.relabel}]},ma=[{label:Ye[We.logs].title,value:We.home}],pa=[{label:Ye[We.anomaly].title,value:We.home}],fa=[{label:Ye[We.home].title,value:We.home},da,ha],va=e=>{let{color:t,background:n,direction:a}=e;const o=Qe(),{dashboardsSettings:i}=Kr(),{pathname:l}=re(),[s,c]=(0,r.useState)(l),u=(0,r.useMemo)((()=>{switch({NODE_ENV:"production",PUBLIC_URL:".",WDS_SOCKET_HOST:void 0,WDS_SOCKET_PATH:void 0,WDS_SOCKET_PORT:void 0,FAST_REFRESH:!1}.REACT_APP_TYPE){case Ve.logs:return ma;case Ve.anomaly:return pa;default:return[...fa,{label:Ye[We.dashboards].title,value:We.dashboards,hide:o||!i.length}].filter((e=>!e.hide))}}),[o,i]);return(0,r.useEffect)((()=>{c(l)}),[l]),Nt("nav",{className:Cr()({"vm-header-nav":!0,["vm-header-nav_".concat(a)]:a}),children:u.map((e=>e.submenu?Nt(ua,{activeMenu:s,label:e.label||"",submenu:e.submenu,color:t,background:n,direction:a},e.label):Nt(oa,{activeMenu:s,value:e.value||"",label:e.label||"",color:t},e.value)))})},ga=e=>{let{title:t,children:n,onClose:a,className:o,isOpen:i=!0}=e;const{isMobile:l}=ea(),s=oe(),c=re(),u=(0,r.useCallback)((e=>{i&&"Escape"===e.key&&a()}),[i]),d=e=>{e.stopPropagation()},h=(0,r.useCallback)((()=>{i&&(s(c,{replace:!0}),a())}),[i,c,a]);return(0,r.useEffect)((()=>{if(i)return document.body.style.overflow="hidden",()=>{document.body.style.overflow="auto"}}),[i]),Ar("popstate",h),Ar("keyup",u),r.default.createPortal(Nt("div",{className:Cr()({"vm-modal":!0,"vm-modal_mobile":l,["".concat(o)]:o}),onMouseDown:a,children:Nt("div",{className:"vm-modal-content",children:[Nt("div",{className:"vm-modal-content-header",onMouseDown:d,children:[t&&Nt("div",{className:"vm-modal-content-header__title",children:t}),Nt("div",{className:"vm-modal-header__close",children:Nt(la,{variant:"text",size:"small",onClick:a,ariaLabel:"close",children:Nt(In,{})})})]}),Nt("div",{className:"vm-modal-content-body",onMouseDown:d,tabIndex:0,children:n})]})}),document.body)},ya=e=>{let{children:t,title:n,open:a,placement:o="bottom-center",offset:i={top:6,left:0}}=e;const{isMobile:l}=ea(),[s,c]=(0,r.useState)(!1),[u,d]=(0,r.useState)({width:0,height:0}),h=(0,r.useRef)(null),m=(0,r.useRef)(null),p=()=>c(!1);(0,r.useEffect)((()=>{if(m.current&&s)return d({width:m.current.clientWidth,height:m.current.clientHeight}),window.addEventListener("scroll",p),()=>{window.removeEventListener("scroll",p)}}),[s,n]);const f=(0,r.useMemo)((()=>{var e;const t=null===h||void 0===h||null===(e=h.current)||void 0===e?void 0:e.base;if(!t||!s)return{};const n=t.getBoundingClientRect(),r={top:0,left:0},a="bottom-right"===o||"top-right"===o,l="bottom-left"===o||"top-left"===o,c=null===o||void 0===o?void 0:o.includes("top"),d=(null===i||void 0===i?void 0:i.top)||0,m=(null===i||void 0===i?void 0:i.left)||0;r.left=n.left-(u.width-n.width)/2+m,r.top=n.height+n.top+d,a&&(r.left=n.right-u.width),l&&(r.left=n.left+m),c&&(r.top=n.top-u.height-d);const{innerWidth:p,innerHeight:f}=window,v=r.top+u.height+20>f,g=r.top-20<0,y=r.left+u.width+20>p,_=r.left-20<0;return v&&(r.top=n.top-u.height-d),g&&(r.top=n.height+n.top+d),y&&(r.left=n.right-u.width-m),_&&(r.left=n.left+m),r.top<0&&(r.top=20),r.left<0&&(r.left=20),r}),[h,o,s,u]),v=()=>{"boolean"!==typeof a&&c(!0)},g=()=>{c(!1)};return(0,r.useEffect)((()=>{"boolean"===typeof a&&c(a)}),[a]),(0,r.useEffect)((()=>{var e;const t=null===h||void 0===h||null===(e=h.current)||void 0===e?void 0:e.base;if(t)return t.addEventListener("mouseenter",v),t.addEventListener("mouseleave",g),()=>{t.removeEventListener("mouseenter",v),t.removeEventListener("mouseleave",g)}}),[h]),Nt(Ct.FK,{children:[Nt(r.Fragment,{ref:h,children:t}),!l&&s&&r.default.createPortal(Nt("div",{className:"vm-tooltip",ref:m,style:f,children:n}),document.body)]})},_a=Nt("code",{children:Xr()?"Cmd":"Ctrl"}),ba=[{title:"Zoom in",description:Nt(Ct.FK,{children:["To zoom in, hold down the ",_a," + ",Nt("code",{children:"scroll up"}),", or press the ",Nt("code",{children:"+"}),". Also, you can zoom in on a range on the graph by holding down your mouse button and selecting the range."]})},{title:"Zoom out",description:Nt(Ct.FK,{children:["To zoom out, hold down the ",_a," + ",Nt("code",{children:"scroll down"}),", or press the ",Nt("code",{children:"-"}),"."]})},{title:"Move horizontal axis",description:Nt(Ct.FK,{children:["To move the graph, hold down the ",_a," + ",Nt("code",{children:"drag"})," the graph to the right or left."]})},{title:"Fixing a tooltip",description:Nt(Ct.FK,{children:["To fix the tooltip, ",Nt("code",{children:"click"})," mouse when it's open. Then, you can drag the fixed tooltip by ",Nt("code",{children:"clicking"})," and ",Nt("code",{children:"dragging"})," on the ",Nt(ar,{})," icon."]})},{title:"Set a custom range for the vertical axis",description:Nt(Ct.FK,{children:["To set a custom range for the vertical axis, click on the ",Nt(Ln,{})," icon located in the upper right corner of the graph, activate the toggle, and set the values."]})}],wa=[{title:"Show/hide a legend item",description:Nt(Ct.FK,{children:[Nt("code",{children:"click"})," on a legend item to isolate it on the graph.",_a," + ",Nt("code",{children:"click"})," on a legend item to remove it from the graph. To revert to the previous state, click again."]})},{title:"Copy label key-value pairs",description:Nt(Ct.FK,{children:[Nt("code",{children:"click"})," on a label key-value pair to save it to the clipboard."]})},{title:"Collapse/Expand the legend group",description:Nt(Ct.FK,{children:[Nt("code",{children:"click"})," on the group name (e.g. ",Nt("b",{children:'Query 1: {__name__!=""}'}),") to collapse or expand the legend."]})}],ka=ba.concat(wa),xa=()=>{const{value:e,setFalse:t,setTrue:n}=ca(!1);return Nt(Ct.FK,{children:[Nt(ya,{title:"Show tips on working with the graph",children:Nt(la,{variant:"text",color:"gray",startIcon:Nt(hr,{}),onClick:n,ariaLabel:"open the tips"})}),e&&Nt(ga,{title:"Tips on working with the graph and the legend",onClose:t,children:Nt("div",{className:"fc-graph-tips",children:ka.map((e=>{let{title:t,description:n}=e;return Nt("div",{className:"fc-graph-tips-item",children:[Nt("h4",{className:"fc-graph-tips-item__action",children:t}),Nt("p",{className:"fc-graph-tips-item__description",children:n})]},t)}))})})]})},Sa=Nt("code",{children:Xr()?"Cmd":"Ctrl"}),Ca=Nt(Ct.FK,{children:[Nt("code",{children:Xr()?"Option":"Ctrl"})," + ",Nt("code",{children:"Space"})]}),Ea=[{title:"Query",list:[{keys:Nt("code",{children:"Enter"}),description:"Run"},{keys:Nt(Ct.FK,{children:[Nt("code",{children:"Shift"})," + ",Nt("code",{children:"Enter"})]}),description:"Multi-line queries"},{keys:Nt(Ct.FK,{children:[Sa," + ",Nt("code",{children:"Arrow Up"})]}),description:"Previous command from the Query history"},{keys:Nt(Ct.FK,{children:[Sa," + ",Nt("code",{children:"Arrow Down"})]}),description:"Next command from the Query history"},{keys:Nt(Ct.FK,{children:[Sa," + ",Nt("code",{children:"click"})," by ",Nt(er,{})]}),description:"Toggle multiple queries"},{keys:Ca,description:"Show quick autocomplete tips"}]},{title:"Graph",readMore:Nt(xa,{}),list:[{keys:Nt(Ct.FK,{children:[Sa," + ",Nt("code",{children:"scroll Up"})," or ",Nt("code",{children:"+"})]}),description:"Zoom in"},{keys:Nt(Ct.FK,{children:[Sa," + ",Nt("code",{children:"scroll Down"})," or ",Nt("code",{children:"-"})]}),description:"Zoom out"},{keys:Nt(Ct.FK,{children:[Sa," + ",Nt("code",{children:"drag"})]}),description:"Move the graph left/right"},{keys:Nt(Ct.FK,{children:Nt("code",{children:"click"})}),description:"Select the series in the legend"},{keys:Nt(Ct.FK,{children:[Sa," + ",Nt("code",{children:"click"})]}),description:"Toggle multiple series in the legend"}]}],Na="Shortcut keys",Aa=Xr(),Ma=Aa?"Cmd + /":"F1",Ta=e=>{let{showTitle:t}=e;const n=Qe(),{value:a,setTrue:o,setFalse:i}=ca(!1),l=(0,r.useCallback)((e=>{const t=Aa&&"/"===e.key&&e.metaKey,n=!Aa&&"F1"===e.key&&!e.metaKey;(t||n)&&o()}),[o]);return Ar("keydown",l),Nt(Ct.FK,{children:[Nt(ya,{open:!0!==t&&void 0,title:"".concat(Na," (").concat(Ma,")"),placement:"bottom-center",children:Nt(la,{className:n?"":"vm-header-button",variant:"contained",color:"primary",startIcon:Nt(Bn,{}),onClick:o,ariaLabel:Na,children:t&&Na})}),a&&Nt(ga,{title:"Shortcut keys",onClose:i,children:Nt("div",{className:"vm-shortcuts",children:Ea.map((e=>Nt("div",{className:"vm-shortcuts-section",children:[e.readMore&&Nt("div",{className:"vm-shortcuts-section__read-more",children:e.readMore}),Nt("h3",{className:"vm-shortcuts-section__title",children:e.title}),Nt("div",{className:"vm-shortcuts-section-list",children:e.list.map(((t,n)=>Nt("div",{className:"vm-shortcuts-section-list-item",children:[Nt("div",{className:"vm-shortcuts-section-list-item__key",children:t.keys}),Nt("p",{className:"vm-shortcuts-section-list-item__description",children:t.description})]},"".concat(e.title,"_").concat(n))))})]},e.title)))})})]})},La=e=>{let{open:t}=e;return Nt("button",{className:Cr()({"vm-menu-burger":!0,"vm-menu-burger_opened":t}),"aria-label":"menu",children:Nt("span",{})})},{REACT_APP_TYPE:Ia}={},Pa=Ia===Ve.logs,Oa=e=>{let{background:t,color:n}=e;const{pathname:a}=re(),{isMobile:o}=ea(),i=(0,r.useRef)(null),{value:l,toggle:s,setFalse:c}=ca(!1);return(0,r.useEffect)(c,[a]),ia(i,c),Nt("div",{className:"vm-header-sidebar",ref:i,children:[Nt("div",{className:Cr()({"vm-header-sidebar-button":!0,"vm-header-sidebar-button_open":l}),onClick:s,children:Nt(La,{open:l})}),Nt("div",{className:Cr()({"vm-header-sidebar-menu":!0,"vm-header-sidebar-menu_open":l}),children:[Nt("div",{children:Nt(va,{color:n,background:t,direction:"column"})}),Nt("div",{className:"vm-header-sidebar-menu-settings",children:!o&&!Pa&&Nt(Ta,{showTitle:!0})})]})]})},Ra=e=>{let{controlsComponent:t,isMobile:n,...a}=e;const o=Qe(),{pathname:i}=re(),{accountIds:l}=(()=>{const{useTenantID:e}=Ke(),t=Qe(),{serverUrl:n}=Mt(),[a,o]=(0,r.useState)(!1),[i,l]=(0,r.useState)(),[s,c]=(0,r.useState)([]),u=(0,r.useMemo)((()=>"".concat(n.replace(/^(.+)(\/select.+)/,"$1"),"/admin/tenants")),[n]),d=(0,r.useMemo)((()=>!!Je(n)),[n]),h=t?!e:!d;return(0,r.useEffect)((()=>{h||(async()=>{o(!0);try{const e=await fetch(u),t=await e.json(),n=t.data||[];c(n.sort(((e,t)=>e.localeCompare(t)))),e.ok?l(void 0):l("".concat(t.errorType,"\r\n").concat(null===t||void 0===t?void 0:t.error))}catch(Lp){Lp instanceof Error&&l("".concat(Lp.name,": ").concat(Lp.message))}o(!1)})().catch(console.error)}),[u]),{accountIds:s,isLoading:a,error:i}})(),{value:s,toggle:c,setFalse:u}=ca(!1),d=Nt(t,{...a,isMobile:n,accountIds:l,headerSetup:(0,r.useMemo)((()=>(Ye[i]||{}).header||{}),[i])});return n?Nt(Ct.FK,{children:[Nt("div",{children:Nt(la,{className:Cr()({"vm-header-button":!o}),startIcon:Nt(ur,{}),onClick:c,ariaLabel:"controls"})}),Nt(ga,{title:"Controls",onClose:u,isOpen:s,className:Cr()({"vm-header-controls-modal":!0,"vm-header-controls-modal_open":s}),children:d})]}):d},{REACT_APP_TYPE:Da}={},za=Da===Ve.logs||Da===Ve.anomaly,Fa=()=>{switch(Da){case Ve.logs:return Nt(An,{});case Ve.anomaly:return Nt(Mn,{});default:return Nt(Nn,{})}},ja=e=>{let{controlsComponent:t}=e;const{isMobile:n}=ea(),a=Mr(),o=(0,r.useMemo)((()=>window.innerWidth<1e3),[a]),{isDarkTheme:i}=Mt(),l=Qe(),s=(0,r.useMemo)((()=>gt(i?"color-background-block":"color-primary")),[i]),{background:c,color:u}=(0,r.useMemo)((()=>{const{headerStyles:{background:e=(l?"#FFF":s),color:t=(l?s:"#FFF")}={}}=Ke();return{background:e,color:t}}),[s]),d=oe(),h=()=>{d({pathname:We.home}),window.location.reload()};return Nt("header",{className:Cr()({"vm-header":!0,"vm-header_app":l,"vm-header_dark":i,"vm-header_sidebar":o,"vm-header_mobile":n}),style:{background:c,color:u},children:[o?Nt(Oa,{background:c,color:u}):Nt(Ct.FK,{children:[!l&&Nt("div",{className:Cr()({"vm-header-logo":!0,"vm-header-logo_logs":za}),onClick:h,style:{color:u},children:Nt(Fa,{})}),Nt(va,{color:u,background:c})]}),o&&Nt("div",{className:Cr()({"vm-header-logo":!0,"vm-header-logo_mobile":!0,"vm-header-logo_logs":za}),onClick:h,style:{color:u},children:Nt(Fa,{})}),Nt(Ra,{controlsComponent:t,displaySidebar:o,isMobile:n})]})},Ha={href:"https://github.com/VictoriaMetrics/VictoriaMetrics/issues/new/choose",Icon:lr,title:"Create an issue"},Va=[{href:"https://docs.victoriametrics.com/MetricsQL.html",Icon:Qn,title:"MetricsQL"},{href:"https://docs.victoriametrics.com/#vmui",Icon:ir,title:"Documentation"},Ha],$a=(0,r.memo)((e=>{let{links:t=Va}=e;const n="2019-".concat((new Date).getFullYear());return Nt("footer",{className:"vm-footer",children:[Nt("a",{className:"vm-link vm-footer__website",target:"_blank",href:"https://victoriametrics.com/",rel:"me noreferrer",children:[Nt(Tn,{}),"victoriametrics.com"]}),t.map((e=>{let{href:t,Icon:n,title:r}=e;return Nt("a",{className:"vm-link vm-footer__link",target:"_blank",href:t,rel:"help noreferrer",children:[Nt(n,{}),r]},"".concat(t,"-").concat(r))})),Nt("div",{className:"vm-footer__copyright",children:["\xa9 ",n," VictoriaMetrics"]})]})})),Ua=$a,Ba=()=>{const e=Qe(),{serverUrl:t}=Mt(),n=(0,r.useContext)(Wr).dispatch,[a,o]=(0,r.useState)(!1),[i,l]=(0,r.useState)(""),[s,c]=(0,r.useState)([]),u=async()=>{try{const e=window.__VMUI_PREDEFINED_DASHBOARDS__;if(null===e||void 0===e||!e.length)return[];const t=await Promise.all(e.map((async e=>(async e=>{const t=await fetch("./dashboards/".concat(e));return await t.json()})(e))));c((e=>[...t,...e]))}catch(Lp){Lp instanceof Error&&l("".concat(Lp.name,": ").concat(Lp.message))}};return(0,r.useEffect)((()=>{e||(c([]),(async()=>{if(t&&!{NODE_ENV:"production",PUBLIC_URL:".",WDS_SOCKET_HOST:void 0,WDS_SOCKET_PATH:void 0,WDS_SOCKET_PORT:void 0,FAST_REFRESH:!1}.REACT_APP_TYPE){l(""),o(!0);try{const e=await fetch("".concat(t,"/vmui/custom-dashboards")),n=await e.json();if(e.ok){const{dashboardsSettings:e}=n;e&&e.length>0?c((t=>[...t,...e])):await u(),o(!1)}else await u(),l(n.error),o(!1)}catch(Lp){o(!1),Lp instanceof Error&&l("".concat(Lp.name,": ").concat(Lp.message)),await u()}}})())}),[t]),(0,r.useEffect)((()=>{n({type:"SET_DASHBOARDS_SETTINGS",payload:s})}),[s]),(0,r.useEffect)((()=>{n({type:"SET_DASHBOARDS_LOADING",payload:a})}),[a]),(0,r.useEffect)((()=>{n({type:"SET_DASHBOARDS_ERROR",payload:i})}),[i]),{dashboardsSettings:s,isLoading:a,error:i}},qa=e=>{let{error:t,warning:n,info:a}=e;const o=(0,r.useRef)(null),[i,l]=(0,r.useState)(!1),[s,c]=(0,r.useState)(!1),u=(0,r.useMemo)((()=>t?"ERROR: ":n?"WARNING: ":""),[t,n]),d="".concat(u).concat(t||n||a),h=()=>{const e=o.current;if(e){const{offsetWidth:t,scrollWidth:n,offsetHeight:r,scrollHeight:a}=e;l(t+1{c(!1),h()}),[o,d]),Ar("resize",h),t||n||a?Nt("span",{className:Cr()({"vm-text-field__error":!0,"vm-text-field__warning":n&&!t,"vm-text-field__helper-text":!n&&!t,"vm-text-field__error_overflowed":i,"vm-text-field__error_full":s}),"data-show":!!d,ref:o,onClick:()=>{i&&(c(!0),l(!1))},children:d}):null},Ya=e=>{let{label:t,value:n,type:a="text",error:o="",warning:i="",helperText:l="",placeholder:s,endIcon:c,startIcon:u,disabled:d=!1,autofocus:h=!1,inputmode:m="text",caretPosition:p,onChange:f,onEnter:v,onKeyDown:g,onFocus:y,onBlur:_,onChangeCaret:b}=e;const{isDarkTheme:w}=Mt(),{isMobile:k}=ea(),x=(0,r.useRef)(null),S=(0,r.useRef)(null),C=(0,r.useMemo)((()=>"textarea"===a?S:x),[a]),[E,N]=(0,r.useState)([0,0]),A=Cr()({"vm-text-field__input":!0,"vm-text-field__input_error":o,"vm-text-field__input_warning":!o&&i,"vm-text-field__input_icon-start":u,"vm-text-field__input_disabled":d,"vm-text-field__input_textarea":"textarea"===a}),M=e=>{const{selectionStart:t,selectionEnd:n}=e;N([t||0,n||0])},T=e=>{M(e.currentTarget)},L=e=>{g&&g(e);const{key:t,ctrlKey:n,metaKey:r}=e,o="Enter"===t;("textarea"!==a?o:o&&(r||n))&&v&&(e.preventDefault(),v())},I=e=>{M(e.currentTarget)},P=e=>{d||(f&&f(e.currentTarget.value),M(e.currentTarget))},O=()=>{y&&y()},R=()=>{_&&_()},D=e=>{try{C.current&&C.current.setSelectionRange(e[0],e[1])}catch(Lp){return Lp}};return(0,r.useEffect)((()=>{var e;h&&!k&&(null===C||void 0===C||null===(e=C.current)||void 0===e?void 0:e.focus)&&C.current.focus()}),[C,h]),(0,r.useEffect)((()=>{b&&b(E)}),[E]),(0,r.useEffect)((()=>{D(E)}),[n]),(0,r.useEffect)((()=>{p&&D(p)}),[p]),Nt("label",{className:Cr()({"vm-text-field":!0,"vm-text-field_textarea":"textarea"===a,"vm-text-field_dark":w}),"data-replicated-value":n,children:[u&&Nt("div",{className:"vm-text-field__icon-start",children:u}),c&&Nt("div",{className:"vm-text-field__icon-end",children:c}),"textarea"===a?Nt("textarea",{className:A,disabled:d,ref:S,value:n,rows:1,inputMode:m,placeholder:s,autoCapitalize:"none",onInput:P,onKeyDown:L,onKeyUp:I,onFocus:O,onBlur:R,onMouseUp:T}):Nt("input",{className:A,disabled:d,ref:x,value:n,type:a,placeholder:s,inputMode:m,autoCapitalize:"none",onInput:P,onKeyDown:L,onKeyUp:I,onFocus:O,onBlur:R,onMouseUp:T}),t&&Nt("span",{className:"vm-text-field__label",children:t}),Nt(qa,{error:o,warning:i,info:l})]})},Wa=e=>{let{accountIds:t}=e;const n=Qe(),{isMobile:a}=ea(),{tenantId:o,serverUrl:i}=Mt(),l=Tt(),s=vn(),[c,u]=(0,r.useState)(""),d=(0,r.useRef)(null),{value:h,toggle:m,setFalse:p}=ca(!1),f=(0,r.useMemo)((()=>{if(!c)return t;try{const e=new RegExp(c,"i");return t.filter((t=>e.test(t))).sort(((t,n)=>{var r,a;return((null===(r=t.match(e))||void 0===r?void 0:r.index)||0)-((null===(a=n.match(e))||void 0===a?void 0:a.index)||0)}))}catch(Lp){return[]}}),[c,t]),v=(0,r.useMemo)((()=>t.length>1),[t]),g=e=>()=>{const t=e;if(l({type:"SET_TENANT_ID",payload:t}),i){const e=Ge(i,t);if(e===i)return;l({type:"SET_SERVER",payload:e}),s({type:"RUN_QUERY"})}p()};return(0,r.useEffect)((()=>{const e=Je(i);o&&o!==e?g(o)():g(e)()}),[i]),v?Nt("div",{className:"vm-tenant-input",children:[Nt(ya,{title:"Define Tenant ID if you need request to another storage",children:Nt("div",{ref:d,children:a?Nt("div",{className:"vm-mobile-option",onClick:m,children:[Nt("span",{className:"vm-mobile-option__icon",children:Nt(cr,{})}),Nt("div",{className:"vm-mobile-option-text",children:[Nt("span",{className:"vm-mobile-option-text__label",children:"Tenant ID"}),Nt("span",{className:"vm-mobile-option-text__value",children:o})]}),Nt("span",{className:"vm-mobile-option__arrow",children:Nt(jn,{})})]}):Nt(la,{className:n?"":"vm-header-button",variant:"contained",color:"primary",fullWidth:!0,startIcon:Nt(cr,{}),endIcon:Nt("div",{className:Cr()({"vm-execution-controls-buttons__arrow":!0,"vm-execution-controls-buttons__arrow_open":h}),children:Nt(jn,{})}),onClick:m,children:o})})}),Nt(sa,{open:h,placement:"bottom-right",onClose:p,buttonRef:d,title:a?"Define Tenant ID":void 0,children:Nt("div",{className:Cr()({"vm-list vm-tenant-input-list":!0,"vm-list vm-tenant-input-list_mobile":a}),children:[Nt("div",{className:"vm-tenant-input-list__search",children:Nt(Ya,{autofocus:!0,label:"Search",value:c,onChange:u,type:"search"})}),f.map((e=>Nt("div",{className:Cr()({"vm-list-item":!0,"vm-list-item_mobile":a,"vm-list-item_active":e===o}),onClick:g(e),children:e},e)))]})})]}):null};const Ka=function(e){const t=(0,r.useRef)();return(0,r.useEffect)((()=>{t.current=e}),[e]),t.current},Qa=()=>{const e=Qe(),{isMobile:t}=ea(),{customStep:n,isHistogram:a}=Ur(),{period:{step:o,end:i,start:l}}=fn(),s=Br(),c=Ka(i-l),u=(0,r.useMemo)((()=>Zt(i-l,a)),[o,a]),[d,h]=(0,r.useState)(n||u),[m,p]=(0,r.useState)(""),{value:f,toggle:v,setFalse:g}=ca(!1),y=(0,r.useRef)(null),_=e=>{const t=e||d||u||"1s",n=(t.match(/[a-zA-Z]+/g)||[]).length?t:"".concat(t,"s");s({type:"SET_CUSTOM_STEP",payload:n}),h(n),p("")},b=()=>{_(),g()},w=e=>{const t=e.match(/[-+]?([0-9]*\.[0-9]+|[0-9]+)/g)||[],n=e.match(/[a-zA-Z]+/g)||[],r=t.length&&t.every((e=>parseFloat(e)>0)),a=n.every((e=>Ut.find((t=>t.short===e)))),o=r&&a;h(e),p(o?"":pt.validStep)};return(0,r.useEffect)((()=>{n&&_(n)}),[n]),(0,r.useEffect)((()=>{!n&&u&&_(u)}),[u]),(0,r.useEffect)((()=>{i-l!==c&&c&&u&&_(u)}),[i,l,c,u]),(0,r.useEffect)((()=>{o!==n&&o!==u||_(u)}),[a]),Nt("div",{className:"vm-step-control",ref:y,children:[t?Nt("div",{className:"vm-mobile-option",onClick:v,children:[Nt("span",{className:"vm-mobile-option__icon",children:Nt(or,{})}),Nt("div",{className:"vm-mobile-option-text",children:[Nt("span",{className:"vm-mobile-option-text__label",children:"Step"}),Nt("span",{className:"vm-mobile-option-text__value",children:d})]}),Nt("span",{className:"vm-mobile-option__arrow",children:Nt(jn,{})})]}):Nt(ya,{title:"Query resolution step width",children:Nt(la,{className:e?"":"vm-header-button",variant:"contained",color:"primary",startIcon:Nt(or,{}),onClick:v,children:Nt("p",{children:["STEP",Nt("p",{className:"vm-step-control__value",children:d})]})})}),Nt(sa,{open:f,placement:"bottom-right",onClose:b,buttonRef:y,title:t?"Query resolution step width":void 0,children:Nt("div",{className:Cr()({"vm-step-control-popper":!0,"vm-step-control-popper_mobile":t}),children:[Nt(Ya,{autofocus:!0,label:"Step value",value:d,error:m,onChange:w,onEnter:()=>{_(),b()},onFocus:()=>{document.activeElement instanceof HTMLInputElement&&document.activeElement.select()},onBlur:_,endIcon:Nt(ya,{title:"Set default step value: ".concat(u),children:Nt(la,{size:"small",variant:"text",color:"primary",startIcon:Nt(Pn,{}),onClick:()=>{const e=u||"1s";w(e),_(e)},ariaLabel:"reset step"})})}),Nt("div",{className:"vm-step-control-popper-info",children:[Nt("code",{children:"step"})," - the ",Nt("a",{className:"vm-link vm-link_colored",href:"https://prometheus.io/docs/prometheus/latest/querying/basics/#time-durations",target:"_blank",rel:"noreferrer",children:"interval"}),"between datapoints, which must be returned from the range query. The ",Nt("code",{children:"query"})," is executed at",Nt("code",{children:"start"}),", ",Nt("code",{children:"start+step"}),", ",Nt("code",{children:"start+2*step"}),", \u2026, ",Nt("code",{children:"end"})," timestamps.",Nt("a",{className:"vm-link vm-link_colored",href:"https://docs.victoriametrics.com/keyConcepts.html#range-query",target:"_blank",rel:"help noreferrer",children:"Read more about Range query"})]})]})})]})},Za=e=>{let{relativeTime:t,setDuration:n}=e;const{isMobile:r}=ea();return Nt("div",{className:Cr()({"vm-time-duration":!0,"vm-time-duration_mobile":r}),children:rn.map((e=>{let{id:a,duration:o,until:i,title:l}=e;return Nt("div",{className:Cr()({"vm-list-item":!0,"vm-list-item_mobile":r,"vm-list-item_active":a===t}),onClick:(s={duration:o,until:i(),id:a},()=>{n(s)}),children:l||o},a);var s}))})},Ga=e=>{let{viewDate:t,showArrowNav:n,onChangeViewDate:r,toggleDisplayYears:a}=e;return Nt("div",{className:"vm-calendar-header",children:[Nt("div",{className:"vm-calendar-header-left",onClick:a,children:[Nt("span",{className:"vm-calendar-header-left__date",children:t.format("MMMM YYYY")}),Nt("div",{className:"vm-calendar-header-left__select-year",children:Nt(Hn,{})})]}),n&&Nt("div",{className:"vm-calendar-header-right",children:[Nt("div",{className:"vm-calendar-header-right__prev",onClick:()=>{r(t.subtract(1,"month"))},children:Nt(jn,{})}),Nt("div",{className:"vm-calendar-header-right__next",onClick:()=>{r(t.add(1,"month"))},children:Nt(jn,{})})]})]})},Ja=["Sunday","Monday","Tuesday","Wednesday","Thursday","Friday","Saturday"],Xa=e=>{let{viewDate:t,selectDate:n,onChangeSelectDate:a}=e;const i="YYYY-MM-DD",l=o().tz(),s=o()(t.format(i)),c=(0,r.useMemo)((()=>{const e=new Array(42).fill(null),t=s.startOf("month"),n=s.endOf("month").diff(t,"day")+1,r=new Array(n).fill(t).map(((e,t)=>e.add(t,"day"))),a=t.day();return e.splice(a,n,...r),e}),[s]),u=e=>()=>{e&&a(e)};return Nt("div",{className:"vm-calendar-body",children:[Ja.map((e=>Nt(ya,{title:e,children:Nt("div",{className:"vm-calendar-body-cell vm-calendar-body-cell_weekday",children:e[0]})},e))),c.map(((e,t)=>Nt("div",{className:Cr()({"vm-calendar-body-cell":!0,"vm-calendar-body-cell_day":!0,"vm-calendar-body-cell_day_empty":!e,"vm-calendar-body-cell_day_active":(e&&e.format(i))===n.format(i),"vm-calendar-body-cell_day_today":(e&&e.format(i))===l.format(i)}),onClick:u(e),children:e&&e.format("D")},e?e.format(i):t)))]})},eo=e=>{let{viewDate:t,onChangeViewDate:n}=e;const a=o()().format("YYYY"),i=(0,r.useMemo)((()=>t.format("YYYY")),[t]),l=(0,r.useMemo)((()=>{const e=o()().subtract(9,"year");return new Array(18).fill(e).map(((e,t)=>e.add(t,"year")))}),[t]);(0,r.useEffect)((()=>{const e=document.getElementById("vm-calendar-year-".concat(i));e&&e.scrollIntoView({block:"center"})}),[]);return Nt("div",{className:"vm-calendar-years",children:l.map((e=>{return Nt("div",{className:Cr()({"vm-calendar-years__year":!0,"vm-calendar-years__year_selected":e.format("YYYY")===i,"vm-calendar-years__year_today":e.format("YYYY")===a}),id:"vm-calendar-year-".concat(e.format("YYYY")),onClick:(t=e,()=>{n(t)}),children:e.format("YYYY")},e.format("YYYY"));var t}))})},to=e=>{let{viewDate:t,selectDate:n,onChangeViewDate:a}=e;const i=o()().format("MM"),l=(0,r.useMemo)((()=>n.format("MM")),[n]),s=(0,r.useMemo)((()=>new Array(12).fill("").map(((e,n)=>o()(t).month(n)))),[t]);(0,r.useEffect)((()=>{const e=document.getElementById("vm-calendar-year-".concat(l));e&&e.scrollIntoView({block:"center"})}),[]);return Nt("div",{className:"vm-calendar-years",children:s.map((e=>{return Nt("div",{className:Cr()({"vm-calendar-years__year":!0,"vm-calendar-years__year_selected":e.format("MM")===l,"vm-calendar-years__year_today":e.format("MM")===i}),id:"vm-calendar-year-".concat(e.format("MM")),onClick:(t=e,()=>{a(t)}),children:e.format("MMMM")},e.format("MM"));var t}))})};var no=function(e){return e[e.days=0]="days",e[e.months=1]="months",e[e.years=2]="years",e}(no||{});const ro=e=>{let{date:t,format:n=Pt,onChange:a}=e;const[i,l]=(0,r.useState)(no.days),[s,c]=(0,r.useState)(o().tz(t)),[u,d]=(0,r.useState)(o().tz(t)),h=o().tz(),m=h.format(It)===s.format(It),{isMobile:p}=ea(),f=e=>{c(e),l((e=>e===no.years?no.months:no.days))};return(0,r.useEffect)((()=>{u.format()!==o().tz(t).format()&&a(u.format(n))}),[u]),(0,r.useEffect)((()=>{const e=o().tz(t);c(e),d(e)}),[t]),Nt("div",{className:Cr()({"vm-calendar":!0,"vm-calendar_mobile":p}),children:[Nt(Ga,{viewDate:s,onChangeViewDate:f,toggleDisplayYears:()=>{l((e=>e===no.years?no.days:no.years))},showArrowNav:i===no.days}),i===no.days&&Nt(Xa,{viewDate:s,selectDate:u,onChangeSelectDate:e=>{d(e)}}),i===no.years&&Nt(eo,{viewDate:s,onChangeViewDate:f}),i===no.months&&Nt(to,{selectDate:u,viewDate:s,onChangeViewDate:f}),!m&&i===no.days&&Nt("div",{className:"vm-calendar-footer",children:Nt(la,{variant:"text",size:"small",onClick:()=>{c(h)},children:"show today"})})]})},ao=(0,r.forwardRef)(((e,t)=>{let{date:n,targetRef:a,format:i=Pt,onChange:l,label:s}=e;const c=(0,r.useMemo)((()=>o()(n).isValid()?o().tz(n):o()().tz()),[n]),{isMobile:u}=ea(),{value:d,toggle:h,setFalse:m}=ca(!1);return Ar("click",h,a),Ar("keyup",(e=>{"Escape"!==e.key&&"Enter"!==e.key||m()})),Nt(Ct.FK,{children:Nt(sa,{open:d,buttonRef:a,placement:"bottom-right",onClose:m,title:u?s:void 0,children:Nt("div",{ref:t,children:Nt(ro,{date:c,format:i,onChange:e=>{l(e),m()}})})})})}));var oo=n(494),io=n.n(oo);const lo=e=>o()(e).isValid()?o().tz(e).format(Pt):e,so=e=>{let{value:t="",label:n,pickerLabel:a,pickerRef:i,onChange:l,onEnter:s}=e;const c=(0,r.useRef)(null),[u,d]=(0,r.useState)(null),[h,m]=(0,r.useState)(lo(t)),[p,f]=(0,r.useState)(!1),[v,g]=(0,r.useState)(!1),y=o()(h).isValid()?"":"Invalid date format";return(0,r.useEffect)((()=>{const e=lo(t);e!==h&&m(e),v&&(s(),g(!1))}),[t]),(0,r.useEffect)((()=>{p&&u&&(u.focus(),u.setSelectionRange(11,11),f(!1))}),[p]),Nt("div",{className:Cr()({"vm-date-time-input":!0,"vm-date-time-input_error":y}),children:[Nt("label",{children:n}),Nt(io(),{tabIndex:1,inputRef:d,mask:"9999-99-99 99:99:99",placeholder:"YYYY-MM-DD HH:mm:ss",value:h,autoCapitalize:"none",inputMode:"numeric",maskChar:null,onChange:e=>{m(e.currentTarget.value)},onBlur:()=>{l(h)},onKeyUp:e=>{"Enter"===e.key&&(l(h),g(!0))}}),y&&Nt("span",{className:"vm-date-time-input__error-text",children:y}),Nt("div",{className:"vm-date-time-input__icon",ref:c,children:Nt(la,{variant:"text",color:"gray",size:"small",startIcon:Nt($n,{}),ariaLabel:"calendar"})}),Nt(ao,{label:a,ref:i,date:h,onChange:e=>{m(e),f(!0)},targetRef:c})]})},co=()=>{const{isMobile:e}=ea(),{isDarkTheme:t}=Mt(),n=(0,r.useRef)(null),a=Mr(),i=(0,r.useMemo)((()=>a.width>1120),[a]),[l,s]=(0,r.useState)(),[c,u]=(0,r.useState)(),{period:{end:d,start:h},relativeTime:m,timezone:p,duration:f}=fn(),v=vn(),g=Qe(),y=Ka(p),{value:_,toggle:b,setFalse:w}=ca(!1),k=(0,r.useMemo)((()=>({region:p,utc:on(p)})),[p]);(0,r.useEffect)((()=>{s(Xt(tn(d)))}),[p,d]),(0,r.useEffect)((()=>{u(Xt(tn(h)))}),[p,h]);const x=e=>{let{duration:t,until:n,id:r}=e;v({type:"SET_RELATIVE_TIME",payload:{duration:t,until:n,id:r}}),w()},S=(0,r.useMemo)((()=>({start:o().tz(tn(h)).format(Pt),end:o().tz(tn(d)).format(Pt)})),[h,d,p]),C=(0,r.useMemo)((()=>m&&"none"!==m?m.replace(/_/g," "):"".concat(S.start," - ").concat(S.end)),[m,S]),E=(0,r.useRef)(null),N=(0,r.useRef)(null),A=(0,r.useRef)(null),M=()=>{c&&l&&v({type:"SET_PERIOD",payload:{from:o().tz(c).toDate(),to:o().tz(l).toDate()}}),w()};return(0,r.useEffect)((()=>{const e=an({relativeTimeId:m,defaultDuration:f,defaultEndInput:tn(d)});y&&p!==y&&x({id:e.relativeTimeId,duration:e.duration,until:e.endInput})}),[p,y]),ia(n,(t=>{var n,r;if(e)return;const a=t.target,o=(null===E||void 0===E?void 0:E.current)&&(null===E||void 0===E||null===(n=E.current)||void 0===n?void 0:n.contains(a)),i=(null===N||void 0===N?void 0:N.current)&&(null===N||void 0===N||null===(r=N.current)||void 0===r?void 0:r.contains(a));o||i||w()})),Nt(Ct.FK,{children:[Nt("div",{ref:A,children:e?Nt("div",{className:"vm-mobile-option",onClick:b,children:[Nt("span",{className:"vm-mobile-option__icon",children:Nt(Vn,{})}),Nt("div",{className:"vm-mobile-option-text",children:[Nt("span",{className:"vm-mobile-option-text__label",children:"Time range"}),Nt("span",{className:"vm-mobile-option-text__value",children:C})]}),Nt("span",{className:"vm-mobile-option__arrow",children:Nt(jn,{})})]}):Nt(ya,{title:i?"Time range controls":C,children:Nt(la,{className:g?"":"vm-header-button",variant:"contained",color:"primary",startIcon:Nt(Vn,{}),onClick:b,ariaLabel:"time range controls",children:i&&Nt("span",{children:C})})})}),Nt(sa,{open:_,buttonRef:A,placement:"bottom-right",onClose:w,clickOutside:!1,title:e?"Time range controls":"",children:Nt("div",{className:Cr()({"vm-time-selector":!0,"vm-time-selector_mobile":e}),ref:n,children:[Nt("div",{className:"vm-time-selector-left",children:[Nt("div",{className:Cr()({"vm-time-selector-left-inputs":!0,"vm-time-selector-left-inputs_dark":t}),children:[Nt(so,{value:c,label:"From:",pickerLabel:"Date From",pickerRef:E,onChange:u,onEnter:M}),Nt(so,{value:l,label:"To:",pickerLabel:"Date To",pickerRef:N,onChange:s,onEnter:M})]}),Nt("div",{className:"vm-time-selector-left-timezone",children:[Nt("div",{className:"vm-time-selector-left-timezone__title",children:k.region}),Nt("div",{className:"vm-time-selector-left-timezone__utc",children:k.utc})]}),Nt(la,{variant:"text",startIcon:Nt(Un,{}),onClick:()=>v({type:"RUN_QUERY_TO_NOW"}),children:"switch to now"}),Nt("div",{className:"vm-time-selector-left__controls",children:[Nt(la,{color:"error",variant:"outlined",onClick:()=>{s(Xt(tn(d))),u(Xt(tn(h))),w()},children:"Cancel"}),Nt(la,{color:"primary",onClick:M,children:"Apply"})]})]}),Nt(Za,{relativeTime:m||"",setDuration:x})]})})]})},uo=()=>{const e=oe(),[t,n]=He();return{setSearchParamsFromKeys:(0,r.useCallback)((r=>{const a=!!Array.from(t.values()).length;let o=!1;Object.entries(r).forEach((e=>{let[n,r]=e;t.get(n)!=="".concat(r)&&(t.set(n,"".concat(r)),o=!0)})),o&&(a?n(t):e("?".concat(t.toString()),{replace:!0}))}),[t,e])}},ho=()=>{const{isMobile:e}=ea(),t=Qe(),n=(0,r.useRef)(null),[a]=He(),{setSearchParamsFromKeys:i}=uo(),l=a.get("date")||o()().tz().format(It),s=(0,r.useMemo)((()=>o().tz(l).format(It)),[l]),c=e=>{i({date:e})};return(0,r.useEffect)((()=>{c(l)}),[]),Nt("div",{children:[Nt("div",{ref:n,children:e?Nt("div",{className:"vm-mobile-option",children:[Nt("span",{className:"vm-mobile-option__icon",children:Nt($n,{})}),Nt("div",{className:"vm-mobile-option-text",children:[Nt("span",{className:"vm-mobile-option-text__label",children:"Date control"}),Nt("span",{className:"vm-mobile-option-text__value",children:s})]}),Nt("span",{className:"vm-mobile-option__arrow",children:Nt(jn,{})})]}):Nt(ya,{title:"Date control",children:Nt(la,{className:t?"":"vm-header-button",variant:"contained",color:"primary",startIcon:Nt($n,{}),children:s})})}),Nt(ao,{label:"Date control",date:l||"",format:It,onChange:c,targetRef:n})]})},mo=[{seconds:0,title:"Off"},{seconds:1,title:"1s"},{seconds:2,title:"2s"},{seconds:5,title:"5s"},{seconds:10,title:"10s"},{seconds:30,title:"30s"},{seconds:60,title:"1m"},{seconds:300,title:"5m"},{seconds:900,title:"15m"},{seconds:1800,title:"30m"},{seconds:3600,title:"1h"},{seconds:7200,title:"2h"}],po=()=>{const{isMobile:e}=ea(),t=vn(),n=Qe(),[a,o]=(0,r.useState)(!1),[i,l]=(0,r.useState)(mo[0]),{value:s,toggle:c,setFalse:u}=ca(!1),d=(0,r.useRef)(null);(0,r.useEffect)((()=>{const e=i.seconds;let n;return a?n=setInterval((()=>{t({type:"RUN_QUERY"})}),1e3*e):l(mo[0]),()=>{n&&clearInterval(n)}}),[i,a]);const h=e=>()=>{(e=>{(a&&!e.seconds||!a&&e.seconds)&&o((e=>!e)),l(e),u()})(e)};return Nt(Ct.FK,{children:[Nt("div",{className:"vm-execution-controls",children:Nt("div",{className:Cr()({"vm-execution-controls-buttons":!0,"vm-execution-controls-buttons_mobile":e,"vm-header-button":!n}),children:[!e&&Nt(ya,{title:"Refresh dashboard",children:Nt(la,{variant:"contained",color:"primary",onClick:()=>{t({type:"RUN_QUERY"})},startIcon:Nt(Fn,{}),ariaLabel:"refresh dashboard"})}),e?Nt("div",{className:"vm-mobile-option",onClick:c,children:[Nt("span",{className:"vm-mobile-option__icon",children:Nt(Pn,{})}),Nt("div",{className:"vm-mobile-option-text",children:[Nt("span",{className:"vm-mobile-option-text__label",children:"Auto-refresh"}),Nt("span",{className:"vm-mobile-option-text__value",children:i.title})]}),Nt("span",{className:"vm-mobile-option__arrow",children:Nt(jn,{})})]}):Nt(ya,{title:"Auto-refresh control",children:Nt("div",{ref:d,children:Nt(la,{variant:"contained",color:"primary",fullWidth:!0,endIcon:Nt("div",{className:Cr()({"vm-execution-controls-buttons__arrow":!0,"vm-execution-controls-buttons__arrow_open":s}),children:Nt(jn,{})}),onClick:c,children:i.title})})})]})}),Nt(sa,{open:s,placement:"bottom-right",onClose:u,buttonRef:d,title:e?"Auto-refresh duration":void 0,children:Nt("div",{className:Cr()({"vm-execution-controls-list":!0,"vm-execution-controls-list_mobile":e}),children:mo.map((t=>Nt("div",{className:Cr()({"vm-list-item":!0,"vm-list-item_mobile":e,"vm-list-item_active":t.seconds===i.seconds}),onClick:h(t),children:t.title},t.seconds)))})})]})},fo="Enable to save the modified server URL to local storage, preventing reset upon page refresh.",vo="Disable to stop saving the server URL to local storage, reverting to the default URL on page refresh.",go=(0,r.forwardRef)(((e,t)=>{let{onClose:n}=e;const{serverUrl:a}=Mt(),o=Tt(),{value:i,toggle:l}=ca(!!et("SERVER_URL")),[s,c]=(0,r.useState)(a),[u,d]=(0,r.useState)(""),h=(0,r.useCallback)((()=>{const e=Je(s);""!==e&&o({type:"SET_TENANT_ID",payload:e}),o({type:"SET_SERVER",payload:s}),n()}),[s]);return(0,r.useEffect)((()=>{a||d(pt.emptyServer),bt(a)||d(pt.validServer)}),[a]),(0,r.useEffect)((()=>{i?Xe("SERVER_URL",s):tt(["SERVER_URL"])}),[i]),(0,r.useEffect)((()=>{i&&Xe("SERVER_URL",s)}),[s]),(0,r.useEffect)((()=>{a!==s&&c(a)}),[a]),(0,r.useImperativeHandle)(t,(()=>({handleApply:h})),[h]),Nt("div",{children:[Nt("div",{className:"vm-server-configurator__title",children:"Server URL"}),Nt("div",{className:"vm-server-configurator-url",children:[Nt(Ya,{autofocus:!0,value:s,error:u,onChange:e=>{c(e||""),d("")},onEnter:h,inputmode:"url"}),Nt(ya,{title:i?vo:fo,children:Nt(la,{className:"vm-server-configurator-url__button",variant:"text",color:i?"primary":"gray",onClick:l,startIcon:Nt(cr,{})})})]})]})})),yo=[{label:"Graph",type:mt.chart},{label:"JSON",type:mt.code},{label:"Table",type:mt.table}],_o=(0,r.forwardRef)(((e,t)=>{let{onClose:n}=e;const{isMobile:a}=ea(),{seriesLimits:o}=Fr(),i=jr(),[l,s]=(0,r.useState)(o),[c,u]=(0,r.useState)({table:"",chart:"",code:""}),d=(0,r.useCallback)((()=>{i({type:"SET_SERIES_LIMITS",payload:l}),n()}),[l]);return(0,r.useImperativeHandle)(t,(()=>({handleApply:d})),[d]),Nt("div",{className:"vm-limits-configurator",children:[Nt("div",{className:"vm-server-configurator__title",children:["Series limits by tabs",Nt(ya,{title:"Set to 0 to disable the limit",children:Nt(la,{variant:"text",color:"primary",size:"small",startIcon:Nt(On,{})})}),Nt("div",{className:"vm-limits-configurator-title__reset",children:Nt(la,{variant:"text",color:"primary",size:"small",startIcon:Nt(Pn,{}),onClick:()=>{s(lt)},children:"Reset limits"})})]}),Nt("div",{className:Cr()({"vm-limits-configurator__inputs":!0,"vm-limits-configurator__inputs_mobile":a}),children:yo.map((e=>{return Nt("div",{children:Nt(Ya,{label:e.label,value:l[e.type],error:c[e.type],onChange:(t=e.type,e=>{const n=e||"";u((e=>({...e,[t]:+n<0?pt.positiveNumber:""}))),s({...l,[t]:n||1/0})}),onEnter:d,type:"number"})},e.type);var t}))})]})})),bo=_o,wo=e=>{let{defaultExpanded:t=!1,onChange:n,title:a,children:o}=e;const[i,l]=(0,r.useState)(t);return(0,r.useEffect)((()=>{n&&n(i)}),[i]),Nt(Ct.FK,{children:[Nt("header",{className:"vm-accordion-header ".concat(i&&"vm-accordion-header_open"),onClick:()=>{l((e=>!e))},children:[a,Nt("div",{className:"vm-accordion-header__arrow ".concat(i&&"vm-accordion-header__arrow_open"),children:Nt(jn,{})})]}),i&&Nt("section",{className:"vm-accordion-section",children:o},"content")]})},ko=()=>Nt(ya,{title:"Browser timezone is not recognized, supported, or could not be determined.",children:Nt(Rn,{})}),xo=cn(),So=(0,r.forwardRef)(((e,t)=>{const{isMobile:n}=ea(),a=ln(),{timezone:o,defaultTimezone:i}=fn(),l=vn(),[s,c]=(0,r.useState)(o),[u,d]=(0,r.useState)(""),h=(0,r.useRef)(null),{value:m,toggle:p,setFalse:f}=ca(!1),v=(0,r.useMemo)((()=>[{title:"Default time (".concat(i,")"),region:i,utc:i?on(i):"UTC"},{title:xo.title,region:xo.region,utc:on(xo.region),isInvalid:!xo.isValid},{title:"UTC (Coordinated Universal Time)",region:"UTC",utc:"UTC"}].filter((e=>e.region))),[i]),g=(0,r.useMemo)((()=>{if(!u)return a;try{return ln(u)}catch(Lp){return{}}}),[u,a]),y=(0,r.useMemo)((()=>Object.keys(g)),[g]),_=(0,r.useMemo)((()=>({region:s,utc:on(s)})),[s]),b=e=>()=>{(e=>{c(e.region),d(""),f()})(e)};return(0,r.useEffect)((()=>{c(o)}),[o]),(0,r.useImperativeHandle)(t,(()=>({handleApply:()=>{l({type:"SET_TIMEZONE",payload:s})}})),[s]),Nt("div",{className:"vm-timezones",children:[Nt("div",{className:"vm-server-configurator__title",children:"Time zone"}),Nt("div",{className:"vm-timezones-item vm-timezones-item_selected",onClick:p,ref:h,children:[Nt("div",{className:"vm-timezones-item__title",children:_.region}),Nt("div",{className:"vm-timezones-item__utc",children:_.utc}),Nt("div",{className:Cr()({"vm-timezones-item__icon":!0,"vm-timezones-item__icon_open":m}),children:Nt(Hn,{})})]}),Nt(sa,{open:m,buttonRef:h,placement:"bottom-left",onClose:f,fullWidth:!0,title:n?"Time zone":void 0,children:Nt("div",{className:Cr()({"vm-timezones-list":!0,"vm-timezones-list_mobile":n}),children:[Nt("div",{className:"vm-timezones-list-header",children:[Nt("div",{className:"vm-timezones-list-header__search",children:Nt(Ya,{autofocus:!0,label:"Search",value:u,onChange:e=>{d(e)}})}),v.map(((e,t)=>e&&Nt("div",{className:"vm-timezones-item vm-timezones-list-group-options__item",onClick:b(e),children:[Nt("div",{className:"vm-timezones-item__title",children:[e.title,e.isInvalid&&Nt(ko,{})]}),Nt("div",{className:"vm-timezones-item__utc",children:e.utc})]},"".concat(t,"_").concat(e.region))))]}),y.map((e=>Nt("div",{className:"vm-timezones-list-group",children:Nt(wo,{defaultExpanded:!0,title:Nt("div",{className:"vm-timezones-list-group__title",children:e}),children:Nt("div",{className:"vm-timezones-list-group-options",children:g[e]&&g[e].map((e=>Nt("div",{className:"vm-timezones-item vm-timezones-list-group-options__item",onClick:b(e),children:[Nt("div",{className:"vm-timezones-item__title",children:e.region}),Nt("div",{className:"vm-timezones-item__utc",children:e.utc})]},e.search)))})})},e)))]})})]})})),Co=So,Eo=e=>{let{options:t,value:n,label:a,onChange:o}=e;const i=(0,r.useRef)(null),[l,s]=(0,r.useState)({width:"0px",left:"0px",borderRadius:"0px"}),c=e=>()=>{o(e)};return(0,r.useEffect)((()=>{if(!i.current)return void s({width:"0px",left:"0px",borderRadius:"0px"});const e=t.findIndex((e=>e.value===n)),{width:r}=i.current.getBoundingClientRect();let a=r,o=e*a,l="0";0===e&&(l="16px 0 0 16px"),e===t.length-1&&(l="10px",o-=1,l="0 16px 16px 0"),0!==e&&e!==t.length-1&&(a+=1,o-=1),s({width:"".concat(a,"px"),left:"".concat(o,"px"),borderRadius:l})}),[i,n,t]),Nt("div",{className:"vm-toggles",children:[a&&Nt("label",{className:"vm-toggles__label",children:a}),Nt("div",{className:"vm-toggles-group",style:{gridTemplateColumns:"repeat(".concat(t.length,", 1fr)")},children:[l.borderRadius&&Nt("div",{className:"vm-toggles-group__highlight",style:l}),t.map(((e,t)=>Nt("div",{className:Cr()({"vm-toggles-group-item":!0,"vm-toggles-group-item_first":0===t,"vm-toggles-group-item_active":e.value===n,"vm-toggles-group-item_icon":e.icon&&e.title}),onClick:c(e.value),ref:e.value===n?i:null,children:[e.icon,e.title]},e.value)))]})]})},No=Object.values(ft).map((e=>({title:e,value:e}))),Ao=()=>{const{isMobile:e}=ea(),t=Tt(),{theme:n}=Mt();return Nt("div",{className:Cr()({"vm-theme-control":!0,"vm-theme-control_mobile":e}),children:[Nt("div",{className:"vm-server-configurator__title",children:"Theme preferences"}),Nt("div",{className:"vm-theme-control__toggle",children:Nt(Eo,{options:No,value:n,onChange:e=>{t({type:"SET_THEME",payload:e})}})},"".concat(e))]})},Mo=e=>{let{value:t=!1,disabled:n=!1,label:r,color:a="secondary",fullWidth:o,onChange:i}=e;return Nt("div",{className:Cr()({"vm-switch":!0,"vm-switch_full-width":o,"vm-switch_disabled":n,"vm-switch_active":t,["vm-switch_".concat(a,"_active")]:t,["vm-switch_".concat(a)]:a}),onClick:()=>{n||i(!t)},children:[Nt("div",{className:"vm-switch-track",children:Nt("div",{className:"vm-switch-track__thumb"})}),r&&Nt("span",{className:"vm-switch__label",children:r})]})},To=()=>{const{isMobile:e}=ea(),{markdownParsing:t}=(0,r.useContext)(Gr).state,n=(0,r.useContext)(Gr).dispatch;return Nt("div",{children:[Nt("div",{className:"vm-server-configurator__title",children:"Markdown Parsing for Logs"}),Nt(Mo,{label:t?"Disable markdown parsing":"Enable markdown parsing",value:t,onChange:e=>{n({type:"SET_MARKDOWN_PARSING",payload:e})},fullWidth:e}),Nt("div",{className:"vm-server-configurator__info",children:"Toggle this switch to enable or disable the Markdown formatting for log entries. Enabling this will parse log texts to Markdown."})]})},Lo="Settings",{REACT_APP_TYPE:Io}={},Po=Io===Ve.logs,Oo=()=>{const{isMobile:e}=ea(),t=Qe(),n=(0,r.useRef)(null),a=(0,r.useRef)(null),o=(0,r.useRef)(null),{value:i,setTrue:l,setFalse:s}=ca(!1),c=[{show:!t&&!Po,component:Nt(go,{ref:n,onClose:s})},{show:!Po,component:Nt(bo,{ref:a,onClose:s})},{show:Po,component:Nt(To,{})},{show:!0,component:Nt(Co,{ref:o})},{show:!t,component:Nt(Ao,{})}].filter((e=>e.show));return Nt(Ct.FK,{children:[e?Nt("div",{className:"vm-mobile-option",onClick:l,children:[Nt("span",{className:"vm-mobile-option__icon",children:Nt(Ln,{})}),Nt("div",{className:"vm-mobile-option-text",children:Nt("span",{className:"vm-mobile-option-text__label",children:Lo})}),Nt("span",{className:"vm-mobile-option__arrow",children:Nt(jn,{})})]}):Nt(ya,{title:Lo,children:Nt(la,{className:Cr()({"vm-header-button":!t}),variant:"contained",color:"primary",startIcon:Nt(Ln,{}),onClick:l,ariaLabel:"settings"})}),i&&Nt(ga,{title:Lo,onClose:s,children:Nt("div",{className:Cr()({"vm-server-configurator":!0,"vm-server-configurator_mobile":e}),children:[c.map(((e,t)=>Nt("div",{className:"vm-server-configurator__input",children:e.component},t))),Nt("div",{className:"vm-server-configurator-footer",children:[Nt(la,{color:"error",variant:"outlined",onClick:s,children:"Cancel"}),Nt(la,{color:"primary",variant:"contained",onClick:()=>{n.current&&n.current.handleApply(),a.current&&a.current.handleApply(),o.current&&o.current.handleApply(),s()},children:"Apply"})]})]})})]})},Ro=e=>{let{displaySidebar:t,isMobile:n,headerSetup:r,accountIds:a}=e;return Nt("div",{className:Cr()({"vm-header-controls":!0,"vm-header-controls_mobile":n}),children:[(null===r||void 0===r?void 0:r.tenant)&&Nt(Wa,{accountIds:a||[]}),(null===r||void 0===r?void 0:r.stepControl)&&Nt(Qa,{}),(null===r||void 0===r?void 0:r.timeSelector)&&Nt(co,{}),(null===r||void 0===r?void 0:r.cardinalityDatePicker)&&Nt(ho,{}),(null===r||void 0===r?void 0:r.executionControls)&&Nt(po,{}),Nt(Oo,{}),!t&&Nt(Ta,{})]})},Do=Boolean(et("DISABLED_DEFAULT_TIMEZONE")),zo=()=>{const{serverUrl:e}=Mt(),t=vn(),[n,a]=(0,r.useState)(!1),[i,l]=(0,r.useState)(""),s=async()=>{if(e&&!{NODE_ENV:"production",PUBLIC_URL:".",WDS_SOCKET_HOST:void 0,WDS_SOCKET_PATH:void 0,WDS_SOCKET_PORT:void 0,FAST_REFRESH:!1}.REACT_APP_TYPE){l(""),a(!0);try{const n=await fetch("".concat(e,"/vmui/timezone")),r=await n.json();n.ok?((e=>{const n="local"===e.toLowerCase()?cn().region:e;try{if(o()().tz(n).isValid(),t({type:"SET_DEFAULT_TIMEZONE",payload:n}),Do)return;t({type:"SET_TIMEZONE",payload:n})}catch(Lp){Lp instanceof Error&&l("".concat(Lp.name,": ").concat(Lp.message))}})(r.timezone),a(!1)):(l(r.error),a(!1))}catch(Lp){a(!1),Lp instanceof Error&&l("".concat(Lp.name,": ").concat(Lp.message))}}};return(0,r.useEffect)((()=>{s()}),[e]),{isLoading:n,error:i}},Fo=()=>{const e=Qe(),{isMobile:t}=ea(),{pathname:n}=re(),[a,o]=He();Ba(),zo();return(0,r.useEffect)((()=>{var e;const t="vmui",r=null===(e=Ye[n])||void 0===e?void 0:e.title;document.title=r?"".concat(r," - ").concat(t):t}),[n]),(0,r.useEffect)((()=>{const{search:e,href:t}=window.location;if(e){const t=at().parse(e,{ignoreQueryPrefix:!0});Object.entries(t).forEach((e=>{let[t,n]=e;return a.set(t,n)})),o(a),window.location.search=""}const n=t.replace(/\/\?#\//,"/#/");n!==t&&window.location.replace(n)}),[]),Nt("section",{className:"vm-container",children:[Nt(ja,{controlsComponent:Ro}),Nt("div",{className:Cr()({"vm-container-body":!0,"vm-container-body_mobile":t,"vm-container-body_app":e}),children:Nt(be,{})}),!e&&Nt(Ua,{})]})};var jo=function(e){return e[e.mouse=0]="mouse",e[e.keyboard=1]="keyboard",e}(jo||{});const Ho=e=>{var t;let{value:n,options:a,anchor:o,disabled:i,minLength:l=2,fullWidth:s,selected:c,noOptionsText:u,label:d,disabledFullScreen:h,offset:m,maxDisplayResults:p,loading:f,onSelect:v,onOpenAutocomplete:g,onFoundOptions:y,onChangeWrapperRef:_}=e;const{isMobile:b}=ea(),w=(0,r.useRef)(null),[k,x]=(0,r.useState)({index:-1}),[S,C]=(0,r.useState)(""),[E,N]=(0,r.useState)(0),{value:A,setValue:M,setFalse:T}=ca(!1),L=(0,r.useMemo)((()=>{if(!A)return[];try{const e=new RegExp(String(n.trim()),"i"),t=a.filter((t=>e.test(t.value))).sort(((t,r)=>{var a,o;return t.value.toLowerCase()===n.trim().toLowerCase()?-1:r.value.toLowerCase()===n.trim().toLowerCase()?1:((null===(a=t.value.match(e))||void 0===a?void 0:a.index)||0)-((null===(o=r.value.match(e))||void 0===o?void 0:o.index)||0)}));return N(t.length),C(t.length>Number(null===p||void 0===p?void 0:p.limit)&&(null===p||void 0===p?void 0:p.message)||""),null!==p&&void 0!==p&&p.limit?t.slice(0,p.limit):t}catch(Lp){return[]}}),[A,a,n]),I=(0,r.useMemo)((()=>{var e;return 1===L.length&&(null===(e=L[0])||void 0===e?void 0:e.value)===n}),[L]),P=(0,r.useMemo)((()=>u&&!L.length),[u,L]),O=()=>{x({index:-1})},R=(0,r.useCallback)((e=>{const{key:t,ctrlKey:n,metaKey:r,shiftKey:a}=e,o=n||r||a,i=L.length&&!I;if("ArrowUp"===t&&!o&&i&&(e.preventDefault(),x((e=>{let{index:t}=e;return{index:t<=0?0:t-1,type:jo.keyboard}}))),"ArrowDown"===t&&!o&&i){e.preventDefault();const t=L.length-1;x((e=>{let{index:n}=e;return{index:n>=t?t:n+1,type:jo.keyboard}}))}if("Enter"===t){const e=L[k.index];e&&v(e.value),c||T()}"Escape"===t&&T()}),[k,L,I,T,v,c]);return(0,r.useEffect)((()=>{M(n.length>=l)}),[n,a]),Ar("keydown",R),(0,r.useEffect)((()=>{if(!w.current||k.type===jo.mouse)return;const e=w.current.childNodes[k.index];null!==e&&void 0!==e&&e.scrollIntoView&&e.scrollIntoView({block:"center"})}),[k,L]),(0,r.useEffect)((()=>{x({index:-1})}),[L]),(0,r.useEffect)((()=>{g&&g(A)}),[A]),(0,r.useEffect)((()=>{y&&y(I?[]:L)}),[L,I]),(0,r.useEffect)((()=>{_&&_(w)}),[w]),Nt(sa,{open:A,buttonRef:o,placement:"bottom-left",onClose:T,fullWidth:s,title:b?d:void 0,disabledFullScreen:h,offset:m,children:[Nt("div",{className:Cr()({"vm-autocomplete":!0,"vm-autocomplete_mobile":b&&!h}),ref:w,children:[f&&Nt("div",{className:"vm-autocomplete__loader",children:[Nt(Fn,{}),Nt("span",{children:"Loading..."})]}),P&&Nt("div",{className:"vm-autocomplete__no-options",children:u}),!I&&L.map(((e,t)=>{return Nt("div",{className:Cr()({"vm-list-item":!0,"vm-list-item_mobile":b,"vm-list-item_active":t===k.index,"vm-list-item_multiselect":c,"vm-list-item_multiselect_selected":null===c||void 0===c?void 0:c.includes(e.value),"vm-list-item_with-icon":e.icon}),id:"$autocomplete$".concat(e.value),onClick:(r=e.value,()=>{i||(v(r),c||T())}),onMouseEnter:(n=t,()=>{x({index:n,type:jo.mouse})}),onMouseLeave:O,children:[(null===c||void 0===c?void 0:c.includes(e.value))&&Nt(Xn,{}),Nt(Ct.FK,{children:e.icon}),Nt("span",{children:e.value})]},"".concat(t).concat(e.value));var n,r}))]}),S&&Nt("div",{className:"vm-autocomplete-message",children:["Shown ",null===p||void 0===p?void 0:p.limit," results out of ",E,". ",S]}),(null===(t=L[k.index])||void 0===t?void 0:t.description)&&Nt("div",{className:"vm-autocomplete-info",children:[Nt("div",{className:"vm-autocomplete-info__type",children:L[k.index].type}),Nt("div",{className:"vm-autocomplete-info__description",dangerouslySetInnerHTML:{__html:L[k.index].description||""}})]})]})};var Vo=n(267),$o=n.n(Vo);const Uo=e=>e.replace(/[/\-\\^$*+?.()|[\]{}]/g,"\\$&"),Bo=e=>JSON.stringify(e).slice(1,-1),qo=e=>{const t=e.match(/["`']/g);return!!t&&t.length%2!==0};var Yo=function(e){return e.metric="metric",e.label="label",e.labelValue="labelValue",e}(Yo||{});const Wo={[Yo.metric]:Nt(vr,{}),[Yo.label]:Nt(yr,{}),[Yo.labelValue]:Nt(_r,{})};function Ko(e){return Ko="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},Ko(e)}function Qo(e){var t=function(e,t){if("object"!=Ko(e)||!e)return e;var n=e[Symbol.toPrimitive];if(void 0!==n){var r=n.call(e,t||"default");if("object"!=Ko(r))return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===t?String:Number)(e)}(e,"string");return"symbol"==Ko(t)?t:t+""}function Zo(e,t,n){return(t=Qo(t))in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function Go(){return{async:!1,breaks:!1,extensions:null,gfm:!0,hooks:null,pedantic:!1,renderer:null,silent:!1,tokenizer:null,walkTokens:null}}let Jo={async:!1,breaks:!1,extensions:null,gfm:!0,hooks:null,pedantic:!1,renderer:null,silent:!1,tokenizer:null,walkTokens:null};function Xo(e){Jo=e}const ei=/[&<>"']/,ti=new RegExp(ei.source,"g"),ni=/[<>"']|&(?!(#\d{1,7}|#[Xx][a-fA-F0-9]{1,6}|\w+);)/,ri=new RegExp(ni.source,"g"),ai={"&":"&","<":"<",">":">",'"':""","'":"'"},oi=e=>ai[e];function ii(e,t){if(t){if(ei.test(e))return e.replace(ti,oi)}else if(ni.test(e))return e.replace(ri,oi);return e}const li=/(^|[^\[])\^/g;function si(e,t){let n="string"===typeof e?e:e.source;t=t||"";const r={replace:(e,t)=>{let a="string"===typeof t?t:t.source;return a=a.replace(li,"$1"),n=n.replace(e,a),r},getRegex:()=>new RegExp(n,t)};return r}function ci(e){try{e=encodeURI(e).replace(/%25/g,"%")}catch{return null}return e}const ui={exec:()=>null};function di(e,t){const n=e.replace(/\|/g,((e,t,n)=>{let r=!1,a=t;for(;--a>=0&&"\\"===n[a];)r=!r;return r?"|":" |"})).split(/ \|/);let r=0;if(n[0].trim()||n.shift(),n.length>0&&!n[n.length-1].trim()&&n.pop(),t)if(n.length>t)n.splice(t);else for(;n.length0)return{type:"space",raw:t[0]}}code(e){const t=this.rules.block.code.exec(e);if(t){const e=t[0].replace(/^(?: {1,4}| {0,3}\t)/gm,"");return{type:"code",raw:t[0],codeBlockStyle:"indented",text:this.options.pedantic?e:hi(e,"\n")}}}fences(e){const t=this.rules.block.fences.exec(e);if(t){const e=t[0],n=function(e,t){const n=e.match(/^(\s+)(?:```)/);if(null===n)return t;const r=n[1];return t.split("\n").map((e=>{const t=e.match(/^\s+/);if(null===t)return e;const[n]=t;return n.length>=r.length?e.slice(r.length):e})).join("\n")}(e,t[3]||"");return{type:"code",raw:e,lang:t[2]?t[2].trim().replace(this.rules.inline.anyPunctuation,"$1"):t[2],text:n}}}heading(e){const t=this.rules.block.heading.exec(e);if(t){let e=t[2].trim();if(/#$/.test(e)){const t=hi(e,"#");this.options.pedantic?e=t.trim():t&&!/ $/.test(t)||(e=t.trim())}return{type:"heading",raw:t[0],depth:t[1].length,text:e,tokens:this.lexer.inline(e)}}}hr(e){const t=this.rules.block.hr.exec(e);if(t)return{type:"hr",raw:hi(t[0],"\n")}}blockquote(e){const t=this.rules.block.blockquote.exec(e);if(t){let e=hi(t[0],"\n").split("\n"),n="",r="";const a=[];for(;e.length>0;){let t=!1;const o=[];let i;for(i=0;i/.test(e[i]))o.push(e[i]),t=!0;else{if(t)break;o.push(e[i])}e=e.slice(i);const l=o.join("\n"),s=l.replace(/\n {0,3}((?:=+|-+) *)(?=\n|$)/g,"\n $1").replace(/^ {0,3}>[ \t]?/gm,"");n=n?"".concat(n,"\n").concat(l):l,r=r?"".concat(r,"\n").concat(s):s;const c=this.lexer.state.top;if(this.lexer.state.top=!0,this.lexer.blockTokens(s,a,!0),this.lexer.state.top=c,0===e.length)break;const u=a[a.length-1];if("code"===(null===u||void 0===u?void 0:u.type))break;if("blockquote"===(null===u||void 0===u?void 0:u.type)){const t=u,o=t.raw+"\n"+e.join("\n"),i=this.blockquote(o);a[a.length-1]=i,n=n.substring(0,n.length-t.raw.length)+i.raw,r=r.substring(0,r.length-t.text.length)+i.text;break}if("list"!==(null===u||void 0===u?void 0:u.type));else{const t=u,o=t.raw+"\n"+e.join("\n"),i=this.list(o);a[a.length-1]=i,n=n.substring(0,n.length-u.raw.length)+i.raw,r=r.substring(0,r.length-t.raw.length)+i.raw,e=o.substring(a[a.length-1].raw.length).split("\n")}}return{type:"blockquote",raw:n,tokens:a,text:r}}}list(e){let t=this.rules.block.list.exec(e);if(t){let n=t[1].trim();const r=n.length>1,a={type:"list",raw:"",ordered:r,start:r?+n.slice(0,-1):"",loose:!1,items:[]};n=r?"\\d{1,9}\\".concat(n.slice(-1)):"\\".concat(n),this.options.pedantic&&(n=r?n:"[*+-]");const o=new RegExp("^( {0,3}".concat(n,")((?:[\t ][^\\n]*)?(?:\\n|$))"));let i=!1;for(;e;){let n=!1,r="",l="";if(!(t=o.exec(e)))break;if(this.rules.block.hr.test(e))break;r=t[0],e=e.substring(r.length);let s=t[2].split("\n",1)[0].replace(/^\t+/,(e=>" ".repeat(3*e.length))),c=e.split("\n",1)[0],u=!s.trim(),d=0;if(this.options.pedantic?(d=2,l=s.trimStart()):u?d=t[1].length+1:(d=t[2].search(/[^ ]/),d=d>4?1:d,l=s.slice(d),d+=t[1].length),u&&/^[ \t]*$/.test(c)&&(r+=c+"\n",e=e.substring(c.length+1),n=!0),!n){const t=new RegExp("^ {0,".concat(Math.min(3,d-1),"}(?:[*+-]|\\d{1,9}[.)])((?:[ \t][^\\n]*)?(?:\\n|$))")),n=new RegExp("^ {0,".concat(Math.min(3,d-1),"}((?:- *){3,}|(?:_ *){3,}|(?:\\* *){3,})(?:\\n+|$)")),a=new RegExp("^ {0,".concat(Math.min(3,d-1),"}(?:```|~~~)")),o=new RegExp("^ {0,".concat(Math.min(3,d-1),"}#")),i=new RegExp("^ {0,".concat(Math.min(3,d-1),"}<[a-z].*>"),"i");for(;e;){const h=e.split("\n",1)[0];let m;if(c=h,this.options.pedantic?(c=c.replace(/^ {1,4}(?=( {4})*[^ ])/g," "),m=c):m=c.replace(/\t/g," "),a.test(c))break;if(o.test(c))break;if(i.test(c))break;if(t.test(c))break;if(n.test(c))break;if(m.search(/[^ ]/)>=d||!c.trim())l+="\n"+m.slice(d);else{if(u)break;if(s.replace(/\t/g," ").search(/[^ ]/)>=4)break;if(a.test(s))break;if(o.test(s))break;if(n.test(s))break;l+="\n"+c}u||c.trim()||(u=!0),r+=h+"\n",e=e.substring(h.length+1),s=m.slice(d)}}a.loose||(i?a.loose=!0:/\n[ \t]*\n[ \t]*$/.test(r)&&(i=!0));let h,m=null;this.options.gfm&&(m=/^\[[ xX]\] /.exec(l),m&&(h="[ ] "!==m[0],l=l.replace(/^\[[ xX]\] +/,""))),a.items.push({type:"list_item",raw:r,task:!!m,checked:h,loose:!1,text:l,tokens:[]}),a.raw+=r}a.items[a.items.length-1].raw=a.items[a.items.length-1].raw.trimEnd(),a.items[a.items.length-1].text=a.items[a.items.length-1].text.trimEnd(),a.raw=a.raw.trimEnd();for(let e=0;e"space"===e.type)),n=t.length>0&&t.some((e=>/\n.*\n/.test(e.raw)));a.loose=n}if(a.loose)for(let e=0;e$/,"$1").replace(this.rules.inline.anyPunctuation,"$1"):"",r=t[3]?t[3].substring(1,t[3].length-1).replace(this.rules.inline.anyPunctuation,"$1"):t[3];return{type:"def",tag:e,raw:t[0],href:n,title:r}}}table(e){const t=this.rules.block.table.exec(e);if(!t)return;if(!/[:|]/.test(t[2]))return;const n=di(t[1]),r=t[2].replace(/^\||\| *$/g,"").split("|"),a=t[3]&&t[3].trim()?t[3].replace(/\n[ \t]*$/,"").split("\n"):[],o={type:"table",raw:t[0],header:[],align:[],rows:[]};if(n.length===r.length){for(const e of r)/^ *-+: *$/.test(e)?o.align.push("right"):/^ *:-+: *$/.test(e)?o.align.push("center"):/^ *:-+ *$/.test(e)?o.align.push("left"):o.align.push(null);for(let e=0;e({text:e,tokens:this.lexer.inline(e),header:!1,align:o.align[t]}))));return o}}lheading(e){const t=this.rules.block.lheading.exec(e);if(t)return{type:"heading",raw:t[0],depth:"="===t[2].charAt(0)?1:2,text:t[1],tokens:this.lexer.inline(t[1])}}paragraph(e){const t=this.rules.block.paragraph.exec(e);if(t){const e="\n"===t[1].charAt(t[1].length-1)?t[1].slice(0,-1):t[1];return{type:"paragraph",raw:t[0],text:e,tokens:this.lexer.inline(e)}}}text(e){const t=this.rules.block.text.exec(e);if(t)return{type:"text",raw:t[0],text:t[0],tokens:this.lexer.inline(t[0])}}escape(e){const t=this.rules.inline.escape.exec(e);if(t)return{type:"escape",raw:t[0],text:ii(t[1])}}tag(e){const t=this.rules.inline.tag.exec(e);if(t)return!this.lexer.state.inLink&&/^
    /i.test(t[0])&&(this.lexer.state.inLink=!1),!this.lexer.state.inRawBlock&&/^<(pre|code|kbd|script)(\s|>)/i.test(t[0])?this.lexer.state.inRawBlock=!0:this.lexer.state.inRawBlock&&/^<\/(pre|code|kbd|script)(\s|>)/i.test(t[0])&&(this.lexer.state.inRawBlock=!1),{type:"html",raw:t[0],inLink:this.lexer.state.inLink,inRawBlock:this.lexer.state.inRawBlock,block:!1,text:t[0]}}link(e){const t=this.rules.inline.link.exec(e);if(t){const e=t[2].trim();if(!this.options.pedantic&&/^$/.test(e))return;const t=hi(e.slice(0,-1),"\\");if((e.length-t.length)%2===0)return}else{const e=function(e,t){if(-1===e.indexOf(t[1]))return-1;let n=0;for(let r=0;r-1){const n=(0===t[0].indexOf("!")?5:4)+t[1].length+e;t[2]=t[2].substring(0,e),t[0]=t[0].substring(0,n).trim(),t[3]=""}}let n=t[2],r="";if(this.options.pedantic){const e=/^([^'"]*[^\s])\s+(['"])(.*)\2/.exec(n);e&&(n=e[1],r=e[3])}else r=t[3]?t[3].slice(1,-1):"";return n=n.trim(),/^$/.test(e)?n.slice(1):n.slice(1,-1)),mi(t,{href:n?n.replace(this.rules.inline.anyPunctuation,"$1"):n,title:r?r.replace(this.rules.inline.anyPunctuation,"$1"):r},t[0],this.lexer)}}reflink(e,t){let n;if((n=this.rules.inline.reflink.exec(e))||(n=this.rules.inline.nolink.exec(e))){const e=t[(n[2]||n[1]).replace(/\s+/g," ").toLowerCase()];if(!e){const e=n[0].charAt(0);return{type:"text",raw:e,text:e}}return mi(n,e,n[0],this.lexer)}}emStrong(e,t){let n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:"",r=this.rules.inline.emStrongLDelim.exec(e);if(!r)return;if(r[3]&&n.match(/[\p{L}\p{N}]/u))return;if(!(r[1]||r[2]||"")||!n||this.rules.inline.punctuation.exec(n)){const n=[...r[0]].length-1;let a,o,i=n,l=0;const s="*"===r[0][0]?this.rules.inline.emStrongRDelimAst:this.rules.inline.emStrongRDelimUnd;for(s.lastIndex=0,t=t.slice(-1*e.length+n);null!=(r=s.exec(t));){if(a=r[1]||r[2]||r[3]||r[4]||r[5]||r[6],!a)continue;if(o=[...a].length,r[3]||r[4]){i+=o;continue}if((r[5]||r[6])&&n%3&&!((n+o)%3)){l+=o;continue}if(i-=o,i>0)continue;o=Math.min(o,o+i+l);const t=[...r[0]][0].length,s=e.slice(0,n+r.index+t+o);if(Math.min(n,o)%2){const e=s.slice(1,-1);return{type:"em",raw:s,text:e,tokens:this.lexer.inlineTokens(e)}}const c=s.slice(2,-2);return{type:"strong",raw:s,text:c,tokens:this.lexer.inlineTokens(c)}}}}codespan(e){const t=this.rules.inline.code.exec(e);if(t){let e=t[2].replace(/\n/g," ");const n=/[^ ]/.test(e),r=/^ /.test(e)&&/ $/.test(e);return n&&r&&(e=e.substring(1,e.length-1)),e=ii(e,!0),{type:"codespan",raw:t[0],text:e}}}br(e){const t=this.rules.inline.br.exec(e);if(t)return{type:"br",raw:t[0]}}del(e){const t=this.rules.inline.del.exec(e);if(t)return{type:"del",raw:t[0],text:t[2],tokens:this.lexer.inlineTokens(t[2])}}autolink(e){const t=this.rules.inline.autolink.exec(e);if(t){let e,n;return"@"===t[2]?(e=ii(t[1]),n="mailto:"+e):(e=ii(t[1]),n=e),{type:"link",raw:t[0],text:e,href:n,tokens:[{type:"text",raw:e,text:e}]}}}url(e){let t;if(t=this.rules.inline.url.exec(e)){let e,a;if("@"===t[2])e=ii(t[0]),a="mailto:"+e;else{let o;do{var n,r;o=t[0],t[0]=null!==(n=null===(r=this.rules.inline._backpedal.exec(t[0]))||void 0===r?void 0:r[0])&&void 0!==n?n:""}while(o!==t[0]);e=ii(t[0]),a="www."===t[1]?"http://"+t[0]:t[0]}return{type:"link",raw:t[0],text:e,href:a,tokens:[{type:"text",raw:e,text:e}]}}}inlineText(e){const t=this.rules.inline.text.exec(e);if(t){let e;return e=this.lexer.state.inRawBlock?t[0]:ii(t[0]),{type:"text",raw:t[0],text:e}}}}const fi=/^ {0,3}((?:-[\t ]*){3,}|(?:_[ \t]*){3,}|(?:\*[ \t]*){3,})(?:\n+|$)/,vi=/(?:[*+-]|\d{1,9}[.)])/,gi=si(/^(?!bull |blockCode|fences|blockquote|heading|html)((?:.|\n(?!\s*?\n|bull |blockCode|fences|blockquote|heading|html))+?)\n {0,3}(=+|-+) *(?:\n+|$)/).replace(/bull/g,vi).replace(/blockCode/g,/(?: {4}| {0,3}\t)/).replace(/fences/g,/ {0,3}(?:`{3,}|~{3,})/).replace(/blockquote/g,/ {0,3}>/).replace(/heading/g,/ {0,3}#{1,6}/).replace(/html/g,/ {0,3}<[^\n>]+>\n/).getRegex(),yi=/^([^\n]+(?:\n(?!hr|heading|lheading|blockquote|fences|list|html|table| +\n)[^\n]+)*)/,_i=/(?!\s*\])(?:\\.|[^\[\]\\])+/,bi=si(/^ {0,3}\[(label)\]: *(?:\n[ \t]*)?([^<\s][^\s]*|<.*?>)(?:(?: +(?:\n[ \t]*)?| *\n[ \t]*)(title))? *(?:\n+|$)/).replace("label",_i).replace("title",/(?:"(?:\\"?|[^"\\])*"|'[^'\n]*(?:\n[^'\n]+)*\n?'|\([^()]*\))/).getRegex(),wi=si(/^( {0,3}bull)([ \t][^\n]+?)?(?:\n|$)/).replace(/bull/g,vi).getRegex(),ki="address|article|aside|base|basefont|blockquote|body|caption|center|col|colgroup|dd|details|dialog|dir|div|dl|dt|fieldset|figcaption|figure|footer|form|frame|frameset|h[1-6]|head|header|hr|html|iframe|legend|li|link|main|menu|menuitem|meta|nav|noframes|ol|optgroup|option|p|param|search|section|summary|table|tbody|td|tfoot|th|thead|title|tr|track|ul",xi=/|$))/,Si=si("^ {0,3}(?:<(script|pre|style|textarea)[\\s>][\\s\\S]*?(?:[^\\n]*\\n+|$)|comment[^\\n]*(\\n+|$)|<\\?[\\s\\S]*?(?:\\?>\\n*|$)|\\n*|$)|\\n*|$)|)[\\s\\S]*?(?:(?:\\n[ \t]*)+\\n|$)|<(?!script|pre|style|textarea)([a-z][\\w-]*)(?:attribute)*? */?>(?=[ \\t]*(?:\\n|$))[\\s\\S]*?(?:(?:\\n[ \t]*)+\\n|$)|(?=[ \\t]*(?:\\n|$))[\\s\\S]*?(?:(?:\\n[ \t]*)+\\n|$))","i").replace("comment",xi).replace("tag",ki).replace("attribute",/ +[a-zA-Z:_][\w.:-]*(?: *= *"[^"\n]*"| *= *'[^'\n]*'| *= *[^\s"'=<>`]+)?/).getRegex(),Ci=si(yi).replace("hr",fi).replace("heading"," {0,3}#{1,6}(?:\\s|$)").replace("|lheading","").replace("|table","").replace("blockquote"," {0,3}>").replace("fences"," {0,3}(?:`{3,}(?=[^`\\n]*\\n)|~{3,})[^\\n]*\\n").replace("list"," {0,3}(?:[*+-]|1[.)]) ").replace("html",")|<(?:script|pre|style|textarea|!--)").replace("tag",ki).getRegex(),Ei={blockquote:si(/^( {0,3}> ?(paragraph|[^\n]*)(?:\n|$))+/).replace("paragraph",Ci).getRegex(),code:/^((?: {4}| {0,3}\t)[^\n]+(?:\n(?:[ \t]*(?:\n|$))*)?)+/,def:bi,fences:/^ {0,3}(`{3,}(?=[^`\n]*(?:\n|$))|~{3,})([^\n]*)(?:\n|$)(?:|([\s\S]*?)(?:\n|$))(?: {0,3}\1[~`]* *(?=\n|$)|$)/,heading:/^ {0,3}(#{1,6})(?=\s|$)(.*)(?:\n+|$)/,hr:fi,html:Si,lheading:gi,list:wi,newline:/^(?:[ \t]*(?:\n|$))+/,paragraph:Ci,table:ui,text:/^[^\n]+/},Ni=si("^ *([^\\n ].*)\\n {0,3}((?:\\| *)?:?-+:? *(?:\\| *:?-+:? *)*(?:\\| *)?)(?:\\n((?:(?! *\\n|hr|heading|blockquote|code|fences|list|html).*(?:\\n|$))*)\\n*|$)").replace("hr",fi).replace("heading"," {0,3}#{1,6}(?:\\s|$)").replace("blockquote"," {0,3}>").replace("code","(?: {4}| {0,3}\t)[^\\n]").replace("fences"," {0,3}(?:`{3,}(?=[^`\\n]*\\n)|~{3,})[^\\n]*\\n").replace("list"," {0,3}(?:[*+-]|1[.)]) ").replace("html",")|<(?:script|pre|style|textarea|!--)").replace("tag",ki).getRegex(),Ai={...Ei,table:Ni,paragraph:si(yi).replace("hr",fi).replace("heading"," {0,3}#{1,6}(?:\\s|$)").replace("|lheading","").replace("table",Ni).replace("blockquote"," {0,3}>").replace("fences"," {0,3}(?:`{3,}(?=[^`\\n]*\\n)|~{3,})[^\\n]*\\n").replace("list"," {0,3}(?:[*+-]|1[.)]) ").replace("html",")|<(?:script|pre|style|textarea|!--)").replace("tag",ki).getRegex()},Mi={...Ei,html:si("^ *(?:comment *(?:\\n|\\s*$)|<(tag)[\\s\\S]+? *(?:\\n{2,}|\\s*$)|\\s]*)*?/?> *(?:\\n{2,}|\\s*$))").replace("comment",xi).replace(/tag/g,"(?!(?:a|em|strong|small|s|cite|q|dfn|abbr|data|time|code|var|samp|kbd|sub|sup|i|b|u|mark|ruby|rt|rp|bdi|bdo|span|br|wbr|ins|del|img)\\b)\\w+(?!:|[^\\w\\s@]*@)\\b").getRegex(),def:/^ *\[([^\]]+)\]: *]+)>?(?: +(["(][^\n]+[")]))? *(?:\n+|$)/,heading:/^(#{1,6})(.*)(?:\n+|$)/,fences:ui,lheading:/^(.+?)\n {0,3}(=+|-+) *(?:\n+|$)/,paragraph:si(yi).replace("hr",fi).replace("heading"," *#{1,6} *[^\n]").replace("lheading",gi).replace("|table","").replace("blockquote"," {0,3}>").replace("|fences","").replace("|list","").replace("|html","").replace("|tag","").getRegex()},Ti=/^\\([!"#$%&'()*+,\-./:;<=>?@\[\]\\^_`{|}~])/,Li=/^( {2,}|\\)\n(?!\s*$)/,Ii="\\p{P}\\p{S}",Pi=si(/^((?![*_])[\spunctuation])/,"u").replace(/punctuation/g,Ii).getRegex(),Oi=si(/^(?:\*+(?:((?!\*)[punct])|[^\s*]))|^_+(?:((?!_)[punct])|([^\s_]))/,"u").replace(/punct/g,Ii).getRegex(),Ri=si("^[^_*]*?__[^_*]*?\\*[^_*]*?(?=__)|[^*]+(?=[^*])|(?!\\*)[punct](\\*+)(?=[\\s]|$)|[^punct\\s](\\*+)(?!\\*)(?=[punct\\s]|$)|(?!\\*)[punct\\s](\\*+)(?=[^punct\\s])|[\\s](\\*+)(?!\\*)(?=[punct])|(?!\\*)[punct](\\*+)(?!\\*)(?=[punct])|[^punct\\s](\\*+)(?=[^punct\\s])","gu").replace(/punct/g,Ii).getRegex(),Di=si("^[^_*]*?\\*\\*[^_*]*?_[^_*]*?(?=\\*\\*)|[^_]+(?=[^_])|(?!_)[punct](_+)(?=[\\s]|$)|[^punct\\s](_+)(?!_)(?=[punct\\s]|$)|(?!_)[punct\\s](_+)(?=[^punct\\s])|[\\s](_+)(?!_)(?=[punct])|(?!_)[punct](_+)(?!_)(?=[punct])","gu").replace(/punct/g,Ii).getRegex(),zi=si(/\\([punct])/,"gu").replace(/punct/g,Ii).getRegex(),Fi=si(/^<(scheme:[^\s\x00-\x1f<>]*|email)>/).replace("scheme",/[a-zA-Z][a-zA-Z0-9+.-]{1,31}/).replace("email",/[a-zA-Z0-9.!#$%&'*+/=?^_`{|}~-]+(@)[a-zA-Z0-9](?:[a-zA-Z0-9-]{0,61}[a-zA-Z0-9])?(?:\.[a-zA-Z0-9](?:[a-zA-Z0-9-]{0,61}[a-zA-Z0-9])?)+(?![-_])/).getRegex(),ji=si(xi).replace("(?:--\x3e|$)","--\x3e").getRegex(),Hi=si("^comment|^|^<[a-zA-Z][\\w-]*(?:attribute)*?\\s*/?>|^<\\?[\\s\\S]*?\\?>|^|^").replace("comment",ji).replace("attribute",/\s+[a-zA-Z:_][\w.:-]*(?:\s*=\s*"[^"]*"|\s*=\s*'[^']*'|\s*=\s*[^\s"'=<>`]+)?/).getRegex(),Vi=/(?:\[(?:\\.|[^\[\]\\])*\]|\\.|`[^`]*`|[^\[\]\\`])*?/,$i=si(/^!?\[(label)\]\(\s*(href)(?:\s+(title))?\s*\)/).replace("label",Vi).replace("href",/<(?:\\.|[^\n<>\\])+>|[^\s\x00-\x1f]*/).replace("title",/"(?:\\"?|[^"\\])*"|'(?:\\'?|[^'\\])*'|\((?:\\\)?|[^)\\])*\)/).getRegex(),Ui=si(/^!?\[(label)\]\[(ref)\]/).replace("label",Vi).replace("ref",_i).getRegex(),Bi=si(/^!?\[(ref)\](?:\[\])?/).replace("ref",_i).getRegex(),qi={_backpedal:ui,anyPunctuation:zi,autolink:Fi,blockSkip:/\[[^[\]]*?\]\([^\(\)]*?\)|`[^`]*?`|<[^<>]*?>/g,br:Li,code:/^(`+)([^`]|[^`][\s\S]*?[^`])\1(?!`)/,del:ui,emStrongLDelim:Oi,emStrongRDelimAst:Ri,emStrongRDelimUnd:Di,escape:Ti,link:$i,nolink:Bi,punctuation:Pi,reflink:Ui,reflinkSearch:si("reflink|nolink(?!\\()","g").replace("reflink",Ui).replace("nolink",Bi).getRegex(),tag:Hi,text:/^(`+|[^`])(?:(?= {2,}\n)|[\s\S]*?(?:(?=[\\1&&void 0!==arguments[1]?arguments[1]:[],o=arguments.length>2&&void 0!==arguments[2]&&arguments[2];for(this.options.pedantic&&(e=e.replace(/\t/g," ").replace(/^ +$/gm,""));e;)if(!(this.options.extensions&&this.options.extensions.block&&this.options.extensions.block.some((n=>!!(t=n.call({lexer:this},e,a))&&(e=e.substring(t.raw.length),a.push(t),!0)))))if(t=this.tokenizer.space(e))e=e.substring(t.raw.length),1===t.raw.length&&a.length>0?a[a.length-1].raw+="\n":a.push(t);else if(t=this.tokenizer.code(e))e=e.substring(t.raw.length),n=a[a.length-1],!n||"paragraph"!==n.type&&"text"!==n.type?a.push(t):(n.raw+="\n"+t.raw,n.text+="\n"+t.text,this.inlineQueue[this.inlineQueue.length-1].src=n.text);else if(t=this.tokenizer.fences(e))e=e.substring(t.raw.length),a.push(t);else if(t=this.tokenizer.heading(e))e=e.substring(t.raw.length),a.push(t);else if(t=this.tokenizer.hr(e))e=e.substring(t.raw.length),a.push(t);else if(t=this.tokenizer.blockquote(e))e=e.substring(t.raw.length),a.push(t);else if(t=this.tokenizer.list(e))e=e.substring(t.raw.length),a.push(t);else if(t=this.tokenizer.html(e))e=e.substring(t.raw.length),a.push(t);else if(t=this.tokenizer.def(e))e=e.substring(t.raw.length),n=a[a.length-1],!n||"paragraph"!==n.type&&"text"!==n.type?this.tokens.links[t.tag]||(this.tokens.links[t.tag]={href:t.href,title:t.title}):(n.raw+="\n"+t.raw,n.text+="\n"+t.raw,this.inlineQueue[this.inlineQueue.length-1].src=n.text);else if(t=this.tokenizer.table(e))e=e.substring(t.raw.length),a.push(t);else if(t=this.tokenizer.lheading(e))e=e.substring(t.raw.length),a.push(t);else{if(r=e,this.options.extensions&&this.options.extensions.startBlock){let t=1/0;const n=e.slice(1);let a;this.options.extensions.startBlock.forEach((e=>{a=e.call({lexer:this},n),"number"===typeof a&&a>=0&&(t=Math.min(t,a))})),t<1/0&&t>=0&&(r=e.substring(0,t+1))}var i;if(this.state.top&&(t=this.tokenizer.paragraph(r)))n=a[a.length-1],o&&"paragraph"===(null===(i=n)||void 0===i?void 0:i.type)?(n.raw+="\n"+t.raw,n.text+="\n"+t.text,this.inlineQueue.pop(),this.inlineQueue[this.inlineQueue.length-1].src=n.text):a.push(t),o=r.length!==e.length,e=e.substring(t.raw.length);else if(t=this.tokenizer.text(e))e=e.substring(t.raw.length),n=a[a.length-1],n&&"text"===n.type?(n.raw+="\n"+t.raw,n.text+="\n"+t.text,this.inlineQueue.pop(),this.inlineQueue[this.inlineQueue.length-1].src=n.text):a.push(t);else if(e){const t="Infinite loop on byte: "+e.charCodeAt(0);if(this.options.silent){console.error(t);break}throw new Error(t)}}return this.state.top=!0,a}inline(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:[];return this.inlineQueue.push({src:e,tokens:t}),t}inlineTokens(e){let t,n,r,a,o,i,l=arguments.length>1&&void 0!==arguments[1]?arguments[1]:[],s=e;if(this.tokens.links){const e=Object.keys(this.tokens.links);if(e.length>0)for(;null!=(a=this.tokenizer.rules.inline.reflinkSearch.exec(s));)e.includes(a[0].slice(a[0].lastIndexOf("[")+1,-1))&&(s=s.slice(0,a.index)+"["+"a".repeat(a[0].length-2)+"]"+s.slice(this.tokenizer.rules.inline.reflinkSearch.lastIndex))}for(;null!=(a=this.tokenizer.rules.inline.blockSkip.exec(s));)s=s.slice(0,a.index)+"["+"a".repeat(a[0].length-2)+"]"+s.slice(this.tokenizer.rules.inline.blockSkip.lastIndex);for(;null!=(a=this.tokenizer.rules.inline.anyPunctuation.exec(s));)s=s.slice(0,a.index)+"++"+s.slice(this.tokenizer.rules.inline.anyPunctuation.lastIndex);for(;e;)if(o||(i=""),o=!1,!(this.options.extensions&&this.options.extensions.inline&&this.options.extensions.inline.some((n=>!!(t=n.call({lexer:this},e,l))&&(e=e.substring(t.raw.length),l.push(t),!0)))))if(t=this.tokenizer.escape(e))e=e.substring(t.raw.length),l.push(t);else if(t=this.tokenizer.tag(e))e=e.substring(t.raw.length),n=l[l.length-1],n&&"text"===t.type&&"text"===n.type?(n.raw+=t.raw,n.text+=t.text):l.push(t);else if(t=this.tokenizer.link(e))e=e.substring(t.raw.length),l.push(t);else if(t=this.tokenizer.reflink(e,this.tokens.links))e=e.substring(t.raw.length),n=l[l.length-1],n&&"text"===t.type&&"text"===n.type?(n.raw+=t.raw,n.text+=t.text):l.push(t);else if(t=this.tokenizer.emStrong(e,s,i))e=e.substring(t.raw.length),l.push(t);else if(t=this.tokenizer.codespan(e))e=e.substring(t.raw.length),l.push(t);else if(t=this.tokenizer.br(e))e=e.substring(t.raw.length),l.push(t);else if(t=this.tokenizer.del(e))e=e.substring(t.raw.length),l.push(t);else if(t=this.tokenizer.autolink(e))e=e.substring(t.raw.length),l.push(t);else if(this.state.inLink||!(t=this.tokenizer.url(e))){if(r=e,this.options.extensions&&this.options.extensions.startInline){let t=1/0;const n=e.slice(1);let a;this.options.extensions.startInline.forEach((e=>{a=e.call({lexer:this},n),"number"===typeof a&&a>=0&&(t=Math.min(t,a))})),t<1/0&&t>=0&&(r=e.substring(0,t+1))}if(t=this.tokenizer.inlineText(r))e=e.substring(t.raw.length),"_"!==t.raw.slice(-1)&&(i=t.raw.slice(-1)),o=!0,n=l[l.length-1],n&&"text"===n.type?(n.raw+=t.raw,n.text+=t.text):l.push(t);else if(e){const t="Infinite loop on byte: "+e.charCodeAt(0);if(this.options.silent){console.error(t);break}throw new Error(t)}}else e=e.substring(t.raw.length),l.push(t);return l}}class Ji{constructor(e){Zo(this,"options",void 0),Zo(this,"parser",void 0),this.options=e||Jo}space(e){return""}code(e){var t;let{text:n,lang:r,escaped:a}=e;const o=null===(t=(r||"").match(/^\S*/))||void 0===t?void 0:t[0],i=n.replace(/\n$/,"")+"\n";return o?'
    '+(a?i:ii(i,!0))+"
    \n":"
    "+(a?i:ii(i,!0))+"
    \n"}blockquote(e){let{tokens:t}=e;const n=this.parser.parse(t);return"
    \n".concat(n,"
    \n")}html(e){let{text:t}=e;return t}heading(e){let{tokens:t,depth:n}=e;return"").concat(this.parser.parseInline(t),"\n")}hr(e){return"
    \n"}list(e){const t=e.ordered,n=e.start;let r="";for(let o=0;o\n"+r+"\n"}listitem(e){let t="";if(e.task){const n=this.checkbox({checked:!!e.checked});e.loose?e.tokens.length>0&&"paragraph"===e.tokens[0].type?(e.tokens[0].text=n+" "+e.tokens[0].text,e.tokens[0].tokens&&e.tokens[0].tokens.length>0&&"text"===e.tokens[0].tokens[0].type&&(e.tokens[0].tokens[0].text=n+" "+e.tokens[0].tokens[0].text)):e.tokens.unshift({type:"text",raw:n+" ",text:n+" "}):t+=n+" "}return t+=this.parser.parse(e.tokens,!!e.loose),"
  • ".concat(t,"
  • \n")}checkbox(e){let{checked:t}=e;return"'}paragraph(e){let{tokens:t}=e;return"

    ".concat(this.parser.parseInline(t),"

    \n")}table(e){let t="",n="";for(let a=0;a")),"\n\n"+t+"\n"+r+"
    \n"}tablerow(e){let{text:t}=e;return"\n".concat(t,"\n")}tablecell(e){const t=this.parser.parseInline(e.tokens),n=e.header?"th":"td";return(e.align?"<".concat(n,' align="').concat(e.align,'">'):"<".concat(n,">"))+t+"\n")}strong(e){let{tokens:t}=e;return"".concat(this.parser.parseInline(t),"")}em(e){let{tokens:t}=e;return"".concat(this.parser.parseInline(t),"")}codespan(e){let{text:t}=e;return"".concat(t,"")}br(e){return"
    "}del(e){let{tokens:t}=e;return"".concat(this.parser.parseInline(t),"")}link(e){let{href:t,title:n,tokens:r}=e;const a=this.parser.parseInline(r),o=ci(t);if(null===o)return a;t=o;let i='
    ",i}image(e){let{href:t,title:n,text:r}=e;const a=ci(t);if(null===a)return r;t=a;let o='').concat(r,'1&&void 0!==arguments[1])||arguments[1],n="";for(let r=0;r{const a=e[r].flat(1/0);n=n.concat(this.walkTokens(a,t))})):e.tokens&&(n=n.concat(this.walkTokens(e.tokens,t)))}}return n}use(){const e=this.defaults.extensions||{renderers:{},childTokens:{}};for(var t=arguments.length,n=new Array(t),r=0;r{const n={...t};if(n.async=this.defaults.async||n.async||!1,t.extensions&&(t.extensions.forEach((t=>{if(!t.name)throw new Error("extension name required");if("renderer"in t){const n=e.renderers[t.name];e.renderers[t.name]=n?function(){for(var e=arguments.length,r=new Array(e),a=0;a{if(this.defaults.async)return Promise.resolve(a.call(e,t)).then((t=>o.call(e,t)));const n=a.call(e,t);return o.call(e,n)}:e[r]=function(){for(var t=arguments.length,n=new Array(t),r=0;r{const r={...n},a={...this.defaults,...r},o=this.onError(!!a.silent,!!a.async);if(!0===this.defaults.async&&!1===r.async)return o(new Error("marked(): The async option was set to true by an extension. Remove async: false from the parse options object to return a Promise."));if("undefined"===typeof t||null===t)return o(new Error("marked(): input parameter is undefined or null"));if("string"!==typeof t)return o(new Error("marked(): input parameter is of type "+Object.prototype.toString.call(t)+", string expected"));a.hooks&&(a.hooks.options=a,a.hooks.block=e);const i=a.hooks?a.hooks.provideLexer():e?Gi.lex:Gi.lexInline,l=a.hooks?a.hooks.provideParser():e?el.parse:el.parseInline;if(a.async)return Promise.resolve(a.hooks?a.hooks.preprocess(t):t).then((e=>i(e,a))).then((e=>a.hooks?a.hooks.processAllTokens(e):e)).then((e=>a.walkTokens?Promise.all(this.walkTokens(e,a.walkTokens)).then((()=>e)):e)).then((e=>l(e,a))).then((e=>a.hooks?a.hooks.postprocess(e):e)).catch(o);try{a.hooks&&(t=a.hooks.preprocess(t));let e=i(t,a);a.hooks&&(e=a.hooks.processAllTokens(e)),a.walkTokens&&this.walkTokens(e,a.walkTokens);let n=l(e,a);return a.hooks&&(n=a.hooks.postprocess(n)),n}catch(Lp){return o(Lp)}}}onError(e,t){return n=>{if(n.message+="\nPlease report this to https://github.com/markedjs/marked.",e){const e="

    An error occurred:

    "+ii(n.message+"",!0)+"
    ";return t?Promise.resolve(e):e}if(t)return Promise.reject(n);throw n}}};function rl(e,t){return nl.parse(e,t)}rl.options=rl.setOptions=function(e){return nl.setOptions(e),rl.defaults=nl.defaults,Xo(rl.defaults),rl},rl.getDefaults=Go,rl.defaults=Jo,rl.use=function(){return nl.use(...arguments),rl.defaults=nl.defaults,Xo(rl.defaults),rl},rl.walkTokens=function(e,t){return nl.walkTokens(e,t)},rl.parseInline=nl.parseInline,rl.Parser=el,rl.parser=el.parse,rl.Renderer=Ji,rl.TextRenderer=Xi,rl.Lexer=Gi,rl.lexer=Gi.lex,rl.Tokenizer=pi,rl.Hooks=tl,rl.parse=rl;rl.options,rl.setOptions,rl.use,rl.walkTokens,rl.parseInline,el.parse,Gi.lex;const al=n.p+"static/media/MetricsQL.a00044c91d9781cf8557.md",ol=e=>{const t='$1 target="_blank" class="'.concat("vm-link vm-link_colored",'" $2').concat("https://docs.victoriametrics.com/MetricsQL.html","#");return e.replace(/({var n;const r="h3"===e.tagName.toLowerCase();return t=r?null!==(n=e.textContent)&&void 0!==n?n:"":t,r?null:((e,t)=>{var n;const r=null!==(n=t.textContent)&&void 0!==n?n:"",a=(e=>{const t=[];let n=e.nextElementSibling;for(;n&&"p"===n.tagName.toLowerCase();)n&&t.push(n),n=n.nextElementSibling;return t})(t).map((e=>{var t;return null!==(t=e.outerHTML)&&void 0!==t?t:""})).join("\n");return{type:e,value:r,description:ol(a),icon:Nt(gr,{})}})(t,e)})).filter(Boolean)},ll=()=>{const{metricsQLFunctions:e}=Cn(),t=En();return(0,r.useEffect)((()=>{e.length||(async()=>{try{const e=await fetch(al),n=(e=>{const t=document.createElement("div");t.innerHTML=rl(e);const n=t.querySelectorAll("".concat("h3",", ").concat("h4"));return il(n)})(await e.text());t({type:"SET_METRICSQL_FUNCTIONS",payload:n})}catch(Lp){console.error("Error fetching or processing the MetricsQL.md file:",Lp)}})()}),[]),e},sl=e=>{let{value:t,anchorEl:n,caretPosition:a,hasHelperText:i,onSelect:l,onFoundOptions:s}=e;const[c,u]=(0,r.useState)({top:0,left:0}),d=ll(),h=(0,r.useMemo)((()=>{if(a[0]!==a[1])return{beforeCursor:t,afterCursor:""};return{beforeCursor:t.substring(0,a[0]),afterCursor:t.substring(a[1])}}),[t,a]),m=(0,r.useMemo)((()=>{const e=h.beforeCursor.split(/\s(or|and|unless|default|ifnot|if|group_left|group_right)\s|}|\+|\|-|\*|\/|\^/i);return e[e.length-1]}),[h]),p=(0,r.useMemo)((()=>{const e=[...m.matchAll(/\w+\((?[^)]+)\)\s+(by|without|on|ignoring)\s*\(\w*/gi)];if(e.length>0&&e[0].groups&&e[0].groups.metricName)return e[0].groups.metricName;const t=[...m.matchAll(/^\s*\b(?[^{}(),\s]+)(?={|$)/g)];return t.length>0&&t[0].groups&&t[0].groups.metricName?t[0].groups.metricName:""}),[m]),f=(0,r.useMemo)((()=>{const e=m.match(/[a-z_:-][\w\-.:/]*\b(?=\s*(=|!=|=~|!~))/g);return e?e[e.length-1]:""}),[m]),v=(0,r.useMemo)((()=>{const e=h.beforeCursor.trim(),t=["}",")"].some((t=>e.endsWith(t))),n=!qo(e)&&["`","'",'"'].some((t=>e.endsWith(t)));if(!h.beforeCursor||t||n||(e=>{const t=e.split(/\s+/),n=t.length,r=t[n-1],a=t[n-2],o=!r&&qo(e),i=(!r||t.length>1)&&!/([{(),+\-*/^]|\b(?:or|and|unless|default|ifnot|if|group_left|group_right|by|without|on|ignoring)\b)/i.test(a);return o||i})(h.beforeCursor))return vt.empty;const r=/(?:by|without|on|ignoring)\s*\(\s*[^)]*$|\{[^}]*$/i,a="(".concat(Uo(p),")?{?.+").concat(Uo(f),'(=|!=|=~|!~)"?([^"]*)$');switch(!0){case new RegExp(a,"g").test(h.beforeCursor):return vt.labelValue;case r.test(h.beforeCursor):return vt.label;default:return vt.metricsql}}),[h,p,f]),g=(0,r.useMemo)((()=>{const e=h.beforeCursor.match(/([\w_.:]+(?![},]))$/);return e?e[0]:""}),[h.beforeCursor]),{metrics:y,labels:_,labelValues:b,loading:w}=(e=>{let{valueByContext:t,metric:n,label:a,context:i}=e;const{serverUrl:l}=Mt(),{period:{start:s,end:c}}=fn(),{autocompleteCache:u}=Cn(),d=En(),[h,m]=(0,r.useState)(!1),[p,f]=(0,r.useState)(t),v=$o()(f,500);(0,r.useEffect)((()=>(v(t),v.cancel)),[t,v]);const[g,y]=(0,r.useState)([]),[_,b]=(0,r.useState)([]),[w,k]=(0,r.useState)([]),x=(0,r.useRef)(new AbortController),S=(0,r.useCallback)((e=>{const t=o()(1e3*s).startOf("day").valueOf()/1e3,n=o()(1e3*c).endOf("day").valueOf()/1e3;return new URLSearchParams({...e||{},limit:"".concat(_n),start:"".concat(t),end:"".concat(n)})}),[s,c]),C=(e,t)=>e.map((e=>({value:e,type:"".concat(t),icon:Wo[t]}))),E=async e=>{let{value:t,urlSuffix:n,setter:r,type:a,params:o}=e;if(!t&&a===Yo.metric)return;x.current.abort(),x.current=new AbortController;const{signal:i}=x.current,s={type:a,value:t,start:(null===o||void 0===o?void 0:o.get("start"))||"",end:(null===o||void 0===o?void 0:o.get("end"))||"",match:(null===o||void 0===o?void 0:o.get("match[]"))||""};m(!0);try{const e=u.get(s);if(e)return r(C(e,a)),void m(!1);const t=await fetch("".concat(l,"/api/v1/").concat(n,"?").concat(o),{signal:i});if(t.ok){const{data:e}=await t.json();r(C(e,a)),d({type:"SET_AUTOCOMPLETE_CACHE",payload:{key:s,value:e}})}m(!1)}catch(Lp){Lp instanceof Error&&"AbortError"!==Lp.name&&(d({type:"SET_AUTOCOMPLETE_CACHE",payload:{key:s,value:[]}}),m(!1),console.error(Lp))}};return(0,r.useEffect)((()=>{const e=i!==vt.metricsql&&i!==vt.empty;if(!l||!n||e)return;y([]);const t=Bo(Uo(n));return E({value:p,urlSuffix:"label/__name__/values",setter:y,type:Yo.metric,params:S({"match[]":'{__name__=~".*'.concat(t,'.*"}')})}),()=>{var e;return null===(e=x.current)||void 0===e?void 0:e.abort()}}),[l,p,i,n]),(0,r.useEffect)((()=>{if(!l||i!==vt.label)return;b([]);const e=Bo(n);return E({value:p,urlSuffix:"labels",setter:b,type:Yo.label,params:S(n?{"match[]":'{__name__="'.concat(e,'"}')}:void 0)}),()=>{var e;return null===(e=x.current)||void 0===e?void 0:e.abort()}}),[l,p,i,n]),(0,r.useEffect)((()=>{if(!l||!a||i!==vt.labelValue)return;k([]);const e=Bo(n),t=Bo(Uo(p)),r=[n?'__name__="'.concat(e,'"'):"","".concat(a,'=~".*').concat(t,'.*"')].filter(Boolean).join(",");return E({value:p,urlSuffix:"label/".concat(a,"/values"),setter:k,type:Yo.labelValue,params:S({"match[]":"{".concat(r,"}")})}),()=>{var e;return null===(e=x.current)||void 0===e?void 0:e.abort()}}),[l,p,i,n,a]),{metrics:g,labels:_,labelValues:w,loading:h}})({valueByContext:g,metric:p,label:f,context:v}),k=(0,r.useMemo)((()=>{switch(v){case vt.metricsql:return[...y,...d];case vt.label:return _;case vt.labelValue:return b;default:return[]}}),[v,y,_,b]),x=(0,r.useCallback)((e=>{const t=h.beforeCursor;let n=h.afterCursor;const r=t.lastIndexOf(g,a[0]),o=r+g.length,i=t.substring(0,r),s=t.substring(o);if(v===vt.labelValue){const t='"';n=n.replace(/^[^\s"|},]*/,"");const r=/(?:=|!=|=~|!~)$/.test(i),a='"'!==n.trim()[0];e="".concat(r?t:"").concat(e).concat(a?t:"")}v===vt.label&&(n=n.replace(/^[^\s=!,{}()"|+\-/*^]*/,"")),v===vt.metricsql&&(n=n.replace(/^[^\s[\]{}()"|+\-/*^]*/,""));const c="".concat(i).concat(e).concat(s).concat(n);l(c,i.length+e.length)}),[h]);return(0,r.useEffect)((()=>{if(!n.current)return void u({top:0,left:0});const e=n.current.querySelector("textarea")||n.current,t=window.getComputedStyle(e),r="".concat(t.getPropertyValue("font-size")),a="".concat(t.getPropertyValue("font-family")),o=parseInt("".concat(t.getPropertyValue("line-height"))),l=document.createElement("div");l.style.font="".concat(r," ").concat(a),l.style.padding=t.getPropertyValue("padding"),l.style.lineHeight="".concat(o,"px"),l.style.width="".concat(e.offsetWidth,"px"),l.style.maxWidth="".concat(e.offsetWidth,"px"),l.style.whiteSpace=t.getPropertyValue("white-space"),l.style.overflowWrap=t.getPropertyValue("overflow-wrap");const s=document.createElement("span");l.appendChild(document.createTextNode(h.beforeCursor)),l.appendChild(s),l.appendChild(document.createTextNode(h.afterCursor)),document.body.appendChild(l);const c=l.getBoundingClientRect(),d=s.getBoundingClientRect(),m=d.left-c.left,p=d.bottom-c.bottom-(i?o:0);u({top:p,left:m}),l.remove(),s.remove()}),[n,a,i]),Nt(Ct.FK,{children:Nt(Ho,{loading:w,disabledFullScreen:!0,value:g,options:k,anchor:n,minLength:0,offset:c,onSelect:x,onFoundOptions:s,maxDisplayResults:{limit:yn,message:"Please, specify the query more precisely."}})})},cl="No match! \nThis query hasn't selected any time series from database.\nEither the requested metrics are missing in the database,\nor there is a typo in series selector.",ul="The shown results are marked as PARTIAL.\nThe result is marked as partial if one or more vmstorage nodes failed to respond to the query.",dl=e=>{let{value:t,onChange:n,onEnter:a,onArrowUp:o,onArrowDown:i,autocomplete:l,error:s,stats:c,label:u,disabled:d=!1}=e;const{autocompleteQuick:h}=Cn(),{isMobile:m}=ea(),[p,f]=(0,r.useState)(!1),[v,g]=(0,r.useState)([0,0]),y=(0,r.useRef)(null),[_,b]=(0,r.useState)(l),w=(0,r.useRef)($o()(b,500)).current,k=[{show:"0"===(null===c||void 0===c?void 0:c.seriesFetched)&&!c.resultLength,text:cl},{show:null===c||void 0===c?void 0:c.isPartial,text:ul}].filter((e=>e.show)).map((e=>e.text)).join("");c&&(u="".concat(u," (").concat(c.executionTimeMsec||0,"ms)"));return(0,r.useEffect)((()=>{f(l)}),[h]),(0,r.useEffect)((()=>{b(!1),w(!0)}),[v]),Nt("div",{className:"vm-query-editor",ref:y,children:[Nt(Ya,{value:t,label:u,type:"textarea",autofocus:!m,error:s,warning:k,onKeyDown:e=>{const{key:t,ctrlKey:n,metaKey:r,shiftKey:l}=e,s=(e.target.value||"").split("\n").length>1,c=n||r,u="ArrowDown"===t,d="Enter"===t;"ArrowUp"===t&&c&&(e.preventDefault(),o()),u&&c&&(e.preventDefault(),i()),d&&p&&e.preventDefault(),!d||l||s&&!c||p||(e.preventDefault(),a())},onChange:n,onChangeCaret:e=>{g((t=>t[0]===e[0]&&t[1]===e[1]?t:e))},disabled:d,inputmode:"search",caretPosition:v}),_&&l&&Nt(sl,{value:t,anchorEl:y,caretPosition:v,hasHelperText:Boolean(k||s),onSelect:(e,t)=>{n(e),g([t,t])},onFoundOptions:e=>{f(!!e.length)}})]})},hl=e=>{let{isMobile:t,hideButtons:n}=e;const{autocomplete:r}=Cn(),a=En(),{nocache:o,isTracingEnabled:i}=Fr(),l=jr();return Ar("keydown",(e=>{const{code:t,ctrlKey:n,altKey:r}=e;"Space"===t&&(n||r)&&(e.preventDefault(),a({type:"SET_AUTOCOMPLETE_QUICK",payload:!0}))})),Nt("div",{className:Cr()({"vm-additional-settings":!0,"vm-additional-settings_mobile":t}),children:[!(null!==n&&void 0!==n&&n.autocomplete)&&Nt(ya,{title:Nt(Ct.FK,{children:["Quick tip: ",Ca]}),children:Nt(Mo,{label:"Autocomplete",value:r,onChange:()=>{a({type:"TOGGLE_AUTOCOMPLETE"})},fullWidth:t})}),Nt(Mo,{label:"Disable cache",value:o,onChange:()=>{l({type:"TOGGLE_NO_CACHE"})},fullWidth:t}),!(null!==n&&void 0!==n&&n.traceQuery)&&Nt(Mo,{label:"Trace query",value:i,onChange:()=>{l({type:"TOGGLE_QUERY_TRACING"})},fullWidth:t})]})},ml=e=>{const{isMobile:t}=ea(),n=(0,r.useRef)(null),{value:a,toggle:o,setFalse:i}=ca(!1);return t?Nt(Ct.FK,{children:[Nt("div",{ref:n,children:Nt(la,{variant:"outlined",startIcon:Nt(dr,{}),onClick:o,ariaLabel:"additional the query settings"})}),Nt(sa,{open:a,buttonRef:n,placement:"bottom-left",onClose:i,title:"Query settings",children:Nt(hl,{isMobile:t,...e})})]}):Nt(hl,{...e})},pl=(e,t)=>e.length===t.length&&e.every(((e,n)=>e===t[n]));const fl=()=>{const{showInfoMessage:e}=(0,r.useContext)(ra);return async(t,n)=>{var r;if(null===(r=navigator)||void 0===r||!r.clipboard)return e({text:"Clipboard not supported",type:"error"}),console.warn("Clipboard not supported"),!1;try{return await navigator.clipboard.writeText(t),n&&e({text:n,type:"success"}),!0}catch(a){return a instanceof Error&&e({text:"".concat(a.name,": ").concat(a.message),type:"error"}),console.warn("Copy failed",a),!1}}},vl=e=>{let{query:t,favorites:n,onRun:a,onToggleFavorite:o}=e;const i=fl(),l=(0,r.useMemo)((()=>n.includes(t)),[t,n]);return Nt("div",{className:"vm-query-history-item",children:[Nt("span",{className:"vm-query-history-item__value",children:t}),Nt("div",{className:"vm-query-history-item__buttons",children:[Nt(ya,{title:"Execute query",children:Nt(la,{size:"small",variant:"text",onClick:()=>{a(t)},startIcon:Nt(Yn,{})})}),Nt(ya,{title:"Copy query",children:Nt(la,{size:"small",variant:"text",onClick:async()=>{await i(t,"Query has been copied")},startIcon:Nt(rr,{})})}),Nt(ya,{title:l?"Remove Favorite":"Add to Favorites",children:Nt(la,{size:"small",variant:"text",color:l?"warning":"primary",onClick:()=>{o(t,l)},startIcon:Nt(l?fr:pr,{})})})]})]})},gl="saved",yl="favorite",_l=[{label:"Session history",value:"session"},{label:"Saved history",value:gl},{label:"Favorite queries",value:yl}],bl=e=>{let{handleSelectQuery:t}=e;const{queryHistory:n}=Cn(),{isMobile:a}=ea(),{value:o,setTrue:i,setFalse:l}=ca(!1),[s,c]=(0,r.useState)(_l[0].value),[u,d]=(0,r.useState)(gn("QUERY_HISTORY")),[h,m]=(0,r.useState)(gn("QUERY_FAVORITES")),p=(0,r.useMemo)((()=>n.map((e=>e.values.filter((e=>e)).reverse()))),[n]),f=(0,r.useMemo)((()=>{switch(s){case yl:return h;case gl:return u;default:return p}}),[s,h,u,p]),v=null===f||void 0===f?void 0:f.every((e=>!e.length)),g=(0,r.useMemo)((()=>s===yl?"Favorites queries are empty.\nTo see your favorites, mark a query as a favorite.":"Query history is empty.\nTo see the history, please make a query."),[s]),y=e=>n=>{t(n,e),l()},_=(e,t)=>{m((n=>{const r=n[0]||[];return t?[r.filter((t=>t!==e))]:t||r.includes(e)?n:[[...r,e]]}))};return(0,r.useEffect)((()=>{const e=h[0]||[],t=gn("QUERY_FAVORITES")[0]||[];pl(e,t)||Xe("QUERY_FAVORITES",JSON.stringify(h))}),[h]),Ar("storage",(()=>{d(gn("QUERY_HISTORY")),m(gn("QUERY_FAVORITES"))})),Nt(Ct.FK,{children:[Nt(ya,{title:"Show history",children:Nt(la,{color:"primary",variant:"text",onClick:i,startIcon:Nt(Vn,{}),ariaLabel:"Show history"})}),o&&Nt(ga,{title:"Query history",onClose:l,children:Nt("div",{className:Cr()({"vm-query-history":!0,"vm-query-history_mobile":a}),children:[Nt("div",{className:Cr()({"vm-query-history__tabs":!0,"vm-section-header__tabs":!0,"vm-query-history__tabs_mobile":a}),children:Nt(Tr,{activeItem:s,items:_l,onChange:c})}),Nt("div",{className:"vm-query-history-list",children:[v&&Nt("div",{className:"vm-query-history-list__no-data",children:g}),f.map(((e,t)=>Nt("div",{children:[f.length>1&&Nt("div",{className:Cr()({"vm-query-history-list__group-title":!0,"vm-query-history-list__group-title_first":0===t}),children:["Query ",t+1]}),e.map(((e,n)=>Nt(vl,{query:e,favorites:h.flat(),onRun:y(t),onToggleFavorite:_},n)))]},t))),s===gl&&!v&&Nt("div",{className:"vm-query-history-footer",children:Nt(la,{color:"error",variant:"outlined",size:"small",startIcon:Nt(Zn,{}),onClick:()=>{Xe("QUERY_HISTORY","")},children:"clear history"})})]})]})})]})},wl=e=>{let{containerStyles:t,message:n}=e;const{isDarkTheme:r}=Mt();return Nt("div",{className:Cr()({"vm-spinner":!0,"vm-spinner_dark":r}),style:t,children:[Nt("div",{className:"half-circle-spinner",children:[Nt("div",{className:"circle circle-1"}),Nt("div",{className:"circle circle-2"})]}),n&&Nt("div",{className:"vm-spinner__message",children:n})]})},kl=()=>{const{serverUrl:e}=Mt(),{isMobile:t}=ea(),{value:n,setTrue:a,setFalse:o}=ca(!1),{query:i}=Cn(),{period:l}=fn(),[s,c]=(0,r.useState)(!1),[u,d]=(0,r.useState)(""),[h,m]=(0,r.useState)(""),[p,f]=(0,r.useState)("");return Nt(Ct.FK,{children:[Nt(la,{color:"secondary",variant:"outlined",onClick:()=>(a(),f(""),URL.revokeObjectURL(h),d(""),m(""),(async()=>{c(!0);try{const t=encodeURIComponent(i[0]||""),n=encodeURIComponent(l.step||Zt(l.end-l.start,!1)),r="".concat(e,"/api/vmanomaly/config.yaml?query=").concat(t,"&step=").concat(n),a=await fetch(r),o=a.headers.get("Content-Type");if(a.ok)if("application/yaml"==o){const e=await a.blob(),t=await e.text();d(t),m(URL.createObjectURL(e))}else f("Response Content-Type is not YAML, does `Server URL` point to VMAnomaly server?");else{const e=await a.text();f(" ".concat(a.status," ").concat(a.statusText,": ").concat(e))}}catch(p){console.error(p),f(String(p))}c(!1)})()),children:"Open Config"}),n&&Nt(ga,{title:"Download config",onClose:o,children:Nt("div",{className:Cr()({"vm-anomaly-config":!0,"vm-anomaly-config_mobile":t}),children:[s&&Nt(wl,{containerStyles:{position:"relative"},message:"Loading config..."}),!s&&p&&Nt("div",{className:"vm-anomaly-config-error",children:[Nt("div",{className:"vm-anomaly-config-error__icon",children:Nt(Dn,{})}),Nt("h3",{className:"vm-anomaly-config-error__title",children:"Cannot download config"}),Nt("p",{className:"vm-anomaly-config-error__text",children:p})]}),!s&&u&&Nt(Ya,{value:u,label:"config.yaml",type:"textarea",disabled:!0}),Nt("div",{className:"vm-anomaly-config-footer",children:h&&Nt("a",{href:h,download:"config.yaml",children:Nt(la,{variant:"contained",startIcon:Nt(br,{}),children:"download"})})})]})})]})},xl=e=>{let{queryErrors:t,setQueryErrors:n,setHideError:a,stats:o,onHideQuery:i,onRunQuery:l,hideButtons:s}=e;const{isMobile:c}=ea(),{query:u,queryHistory:d,autocomplete:h,autocompleteQuick:m}=Cn(),p=En(),f=vn(),[v,g]=(0,r.useState)(u||[]),[y,_]=(0,r.useState)([]),[b,w]=(0,r.useState)(!1),k=Ka(v),x=(()=>{const{serverUrl:e}=Mt();return async t=>{try{const n=encodeURIComponent(t),r="".concat(e,"/prettify-query?query=").concat(n),a=await fetch(r);if(200!=a.status)return{query:t,error:"Error requesting /prettify-query, status: "+a.status};const o=await a.json();return"success"!=o.status?{query:t,error:String(o.msg)}:{query:String(o.query),error:""}}catch(Lp){return console.error(Lp),Lp instanceof Error&&"AbortError"!==Lp.name?{query:t,error:"".concat(Lp.name,": ").concat(Lp.message)}:{query:t,error:String(Lp)}}}})(),S=()=>{p({type:"SET_QUERY_HISTORY",payload:v.map(((e,t)=>{const n=d[t]||{values:[]},r=e===n.values[n.values.length-1],a=!r&&e?[...n.values,e]:n.values;return a.length>25&&a.shift(),{index:n.values.length-Number(r),values:a}}))}),p({type:"SET_QUERY",payload:v}),f({type:"RUN_QUERY"}),l()},C=(e,t)=>{g((n=>n.map(((n,r)=>r===t?e:n))))},E=(e,t)=>()=>{((e,t)=>{const{index:n,values:r}=d[t],a=n+e;a<0||a>=r.length||(C(r[a]||"",t),p({type:"SET_QUERY_HISTORY_BY_INDEX",payload:{value:{values:r,index:a},queryNumber:t}}))})(e,t)},N=e=>t=>{C(t,e),p({type:"SET_AUTOCOMPLETE_QUICK",payload:!1})},A=e=>()=>{var t;t=e,g((e=>e.filter(((e,n)=>n!==t)))),_((t=>t.includes(e)?t.filter((t=>t!==e)):t.map((t=>t>e?t-1:t))))},M=e=>t=>{((e,t)=>{const{ctrlKey:n,metaKey:r}=e;if(n||r){const e=v.map(((e,t)=>t)).filter((e=>e!==t));_((t=>pl(e,t)?[]:e))}else _((e=>e.includes(t)?e.filter((e=>e!==t)):[...e,t]))})(t,e)};return(0,r.useEffect)((()=>{k&&v.length{i&&i(y)}),[y]),(0,r.useEffect)((()=>{b&&(S(),w(!1))}),[v,b]),(0,r.useEffect)((()=>{g(u||[])}),[u]),Nt("div",{className:Cr()({"vm-query-configurator":!0,"vm-block":!0,"vm-block_mobile":c}),children:[Nt("div",{className:"vm-query-configurator-list",children:v.map(((e,r)=>Nt("div",{className:Cr()({"vm-query-configurator-list-row":!0,"vm-query-configurator-list-row_disabled":y.includes(r),"vm-query-configurator-list-row_mobile":c}),children:[Nt(dl,{value:v[r],autocomplete:!(null!==s&&void 0!==s&&s.autocomplete)&&(h||m),error:t[r],stats:o[r],onArrowUp:E(-1,r),onArrowDown:E(1,r),onEnter:S,onChange:N(r),label:"Query ".concat(v.length>1?r+1:""),disabled:y.includes(r)}),i&&Nt(ya,{title:y.includes(r)?"Enable query":"Disable query",children:Nt("div",{className:"vm-query-configurator-list-row__button",children:Nt(la,{variant:"text",color:"gray",startIcon:y.includes(r)?Nt(tr,{}):Nt(er,{}),onClick:M(r),ariaLabel:"visibility query"})})}),!(null!==s&&void 0!==s&&s.prettify)&&Nt(ya,{title:"Prettify query",children:Nt("div",{className:"vm-query-configurator-list-row__button",children:Nt(la,{variant:"text",color:"gray",startIcon:Nt(nr,{}),onClick:async()=>await(async e=>{const t=await x(v[e]);a(!1),C(t.query,e),n((n=>(n[e]=t.error,[...n])))})(r),className:"prettify",ariaLabel:"prettify the query"})})}),v.length>1&&Nt(ya,{title:"Remove Query",children:Nt("div",{className:"vm-query-configurator-list-row__button",children:Nt(la,{variant:"text",color:"error",startIcon:Nt(Zn,{}),onClick:A(r),ariaLabel:"remove query"})})})]},r)))}),Nt("div",{className:"vm-query-configurator-settings",children:[Nt(ml,{hideButtons:s}),Nt("div",{className:"vm-query-configurator-settings__buttons",children:[Nt(bl,{handleSelectQuery:(e,t)=>{C(e,t),w(!0)}}),(null===s||void 0===s?void 0:s.anomalyConfig)&&Nt(kl,{}),!(null!==s&&void 0!==s&&s.addQuery)&&v.length<10&&Nt(la,{variant:"outlined",onClick:()=>{g((e=>[...e,""]))},startIcon:Nt(Gn,{}),children:"Add Query"}),Nt(la,{variant:"contained",onClick:S,startIcon:Nt(qn,{}),children:c?"Execute":"Execute Query"})]})]})]})};let Sl=0;class Cl{constructor(e,t){this.tracing=void 0,this.query=void 0,this.tracingChildren=void 0,this.originalTracing=void 0,this.id=void 0,this.tracing=e,this.originalTracing=JSON.parse(JSON.stringify(e)),this.query=t,this.id=Sl++;const n=e.children||[];this.tracingChildren=n.map((e=>new Cl(e,t)))}get queryValue(){return this.query}get idValue(){return this.id}get children(){return this.tracingChildren}get message(){return this.tracing.message}get duration(){return this.tracing.duration_msec}get JSON(){return JSON.stringify(this.tracing,null,2)}get originalJSON(){return JSON.stringify(this.originalTracing,null,2)}setTracing(e){this.tracing=e;const t=e.children||[];this.tracingChildren=t.map((e=>new Cl(e,this.query)))}setQuery(e){this.query=e}resetTracing(){this.tracing=this.originalTracing}}const El=function(e,t){let n=!(arguments.length>2&&void 0!==arguments[2])||arguments[2];const{__name__:r,...a}=e.metric,o=t||"".concat(n?"[Query ".concat(e.group,"] "):"").concat(r||"");return 0==Object.keys(a).length?o||"value":"".concat(o,"{").concat(Object.entries(a).map((e=>"".concat(e[0],"=").concat(JSON.stringify(e[1])))).join(", "),"}")},Nl=e=>{switch(e){case"NaN":return NaN;case"Inf":case"+Inf":return 1/0;case"-Inf":return-1/0;default:return parseFloat(e)}},Al=e=>{if(e.length<2)return!1;const t=["le","vmrange"],n=Object.keys(e[0].metric).filter((e=>!t.includes(e))),r=e.every((r=>{const a=Object.keys(r.metric).filter((e=>!t.includes(e)));return n.length===a.length&&a.every((t=>r.metric[t]===e[0].metric[t]))}));return r&&e.every((e=>t.some((t=>t in e.metric))))},Ml=Ve.anomaly==={NODE_ENV:"production",PUBLIC_URL:".",WDS_SOCKET_HOST:void 0,WDS_SOCKET_PATH:void 0,WDS_SOCKET_PORT:void 0,FAST_REFRESH:!1}.REACT_APP_TYPE,Tl=e=>{let{predefinedQuery:t,visible:n,display:a,customStep:o,hideQuery:i,showAllSeries:l}=e;const{query:s}=Cn(),{period:c}=fn(),{displayType:u,nocache:d,isTracingEnabled:h,seriesLimits:m}=Fr(),{serverUrl:p}=Mt(),{isHistogram:f}=Ur(),[v,g]=(0,r.useState)(!1),[y,_]=(0,r.useState)(),[b,w]=(0,r.useState)(),[k,x]=(0,r.useState)(),[S,C]=(0,r.useState)(),[E,N]=(0,r.useState)([]),[A,M]=(0,r.useState)([]),[T,L]=(0,r.useState)(),[I,P]=(0,r.useState)([]),[O,R]=(0,r.useState)(!1),D=(0,r.useMemo)((()=>{const{end:e,start:t}=c;return Zt(e-t,f)}),[c,f]),z=(0,r.useCallback)($o()((async e=>{let{fetchUrl:t,fetchQueue:n,displayType:r,query:a,stateSeriesLimits:o,showAllSeries:i,hideQuery:l}=e;const s=new AbortController;P([...n,s]);try{const e=r===mt.chart,n=i?1/0:+o[r]||1/0;let c=n;const u=[],d=[];let h=1,m=0,p=!1;for await(const r of t){if(null===l||void 0===l?void 0:l.includes(h-1)){N((e=>[...e,""])),M((e=>[...e,{}])),h++;continue}const t=new URL(r),o=await fetch("".concat(t.origin).concat(t.pathname),{signal:s.signal,method:"POST",body:t.searchParams}),i=await o.json();if(o.ok){if(M((e=>[...e,{...null===i||void 0===i?void 0:i.stats,isPartial:null===i||void 0===i?void 0:i.isPartial,resultLength:i.data.result.length}])),N((e=>[...e,""])),i.trace){const e=new Cl(i.trace,a[h-1]);d.push(e)}p=!Ml&&e&&Al(i.data.result),c=p?1/0:n;const t=c-u.length;i.data.result.slice(0,t).forEach((e=>{e.group=h,u.push(e)})),m+=i.data.result.length}else{u.push({metric:{},values:[],group:h});const e=i.errorType||pt.unknownType,t=[e,(null===i||void 0===i?void 0:i.error)||(null===i||void 0===i?void 0:i.message)||"see console for more details"].join(",\r\n");N((e=>[...e,"".concat(t)])),console.error("Fetch query error: ".concat(e),i)}h++}const f="Showing ".concat(u.length," series out of ").concat(m," series due to performance reasons. Please narrow down the query, so it returns less series");L(m>c?f:""),e?_(u):w(u),x(d),R((e=>m?p:e))}catch(Lp){const t=Lp;if("AbortError"===t.name)return;const n="Please check your serverURL settings and confirm server availability.";let r="Error executing query: ".concat(t.message,". ").concat(n);"Unexpected end of JSON input"===t.message&&(r+="\nAdditionally, this error can occur if the server response is too large to process. Apply more specific filters to reduce the data volume."),C(r)}g(!1)}),300),[]),F=(0,r.useMemo)((()=>{C(""),N([]),M([]);const e=null!==t&&void 0!==t?t:s,n=(a||u)===mt.chart;if(c)if(p)if(e.every((e=>!e.trim())))N(e.map((()=>pt.validQuery)));else{if(bt(p)){const t={...c};return t.step=o,e.map((e=>n?((e,t,n,r,a)=>"".concat(e,"/api/v1/query_range?query=").concat(encodeURIComponent(t),"&start=").concat(n.start,"&end=").concat(n.end,"&step=").concat(n.step).concat(r?"&nocache=1":"").concat(a?"&trace=1":""))(p,e,t,d,h):((e,t,n,r,a)=>"".concat(e,"/api/v1/query?query=").concat(encodeURIComponent(t),"&time=").concat(n.end,"&step=").concat(n.step).concat(r?"&nocache=1":"").concat(a?"&trace=1":""))(p,e,t,d,h)))}C(pt.validServer)}else C(pt.emptyServer)}),[p,c,u,o,i]),[j,H]=(0,r.useState)([]);return(0,r.useEffect)((()=>{const e=F===j&&!!t;if(!n||null===F||void 0===F||!F.length||e)return;g(!0);z({fetchUrl:F,fetchQueue:I,displayType:a||u,query:null!==t&&void 0!==t?t:s,stateSeriesLimits:m,showAllSeries:l,hideQuery:i}),H(F)}),[F,n,m,l]),(0,r.useEffect)((()=>{const e=I.slice(0,-1);e.length&&(e.map((e=>e.abort())),P(I.filter((e=>!e.signal.aborted))))}),[I]),(0,r.useEffect)((()=>{D===o&&_([])}),[O]),{fetchUrl:F,isLoading:v,graphData:y,liveData:b,error:S,queryErrors:E,setQueryErrors:N,queryStats:A,warning:T,traces:k,isHistogram:O}},Ll=()=>{const{tenantId:e}=Mt(),{displayType:t}=Fr(),{query:n}=Cn(),{duration:a,relativeTime:o,period:{date:i,step:l}}=fn(),{customStep:s}=Ur(),[c,u]=He(),d=Tt(),h=vn(),m=Br(),p=En(),f=jr(),[v,g]=(0,r.useState)(!1),y=(0,r.useCallback)((()=>{if(v)return void g(!1);const r=new URLSearchParams(c);n.forEach(((n,u)=>{var d;const h="g".concat(u);c.get("".concat(h,".expr"))!==n&&n&&r.set("".concat(h,".expr"),n),c.get("".concat(h,".range_input"))!==a&&r.set("".concat(h,".range_input"),a),c.get("".concat(h,".end_input"))!==i&&r.set("".concat(h,".end_input"),i),c.get("".concat(h,".relative_time"))!==o&&r.set("".concat(h,".relative_time"),o||"none");const m=c.get("".concat(h,".step_input"))||l;m&&m!==s&&r.set("".concat(h,".step_input"),s);const p="".concat((null===(d=Lr.find((e=>e.value===t)))||void 0===d?void 0:d.prometheusCode)||0);c.get("".concat(h,".tab"))!==p&&r.set("".concat(h,".tab"),"".concat(p)),c.get("".concat(h,".tenantID"))!==e&&e&&r.set("".concat(h,".tenantID"),e)})),!((e,t)=>{if(Array.from(e.entries()).length!==Array.from(t.entries()).length)return!1;for(const[n,r]of e)if(t.get(n)!==r)return!1;return!0})(r,c)&&r.size&&u(r)}),[e,t,n,a,o,i,l,s]);(0,r.useEffect)((()=>{const e=setTimeout(y,200);return()=>clearTimeout(e)}),[y]),(0,r.useEffect)((()=>{if(!v)return;const r=dn(),u=r.duration!==a,g=r.relativeTime!==o,y="none"===r.relativeTime&&r.period.date!==i;(u||g||y)&&h({type:"SET_TIME_STATE",payload:r});const _=Pr();_!==t&&f({type:"SET_DISPLAY_TYPE",payload:_});const b=c.get("g0.tenantID")||"";b!==e&&d({type:"SET_TENANT_ID",payload:b});const w=dt();pl(w,n)||(p({type:"SET_QUERY",payload:w}),h({type:"RUN_QUERY"}));const k=setTimeout((()=>{const e=c.get("g0.step_input")||l;e&&e!==s&&m({type:"SET_CUSTOM_STEP",payload:e})}),50);return()=>clearTimeout(k)}),[c,v]),Ar("popstate",(()=>{g(!0)}))},Il=e=>{let{text:t,href:n,children:r,colored:a=!0,underlined:o=!1,withIcon:i=!1}=e;return Nt("a",{href:n,className:Cr()({"vm-link":!0,"vm-link_colored":a,"vm-link_underlined":o,"vm-link_with-icon":i}),target:"_blank",rel:"noreferrer",children:t||r})},Pl=Nt(Il,{text:"last_over_time",href:"https://docs.victoriametrics.com/MetricsQL.html#last_over_time",underlined:!0}),Ol=Nt(Il,{text:"instant query",href:"https://docs.victoriametrics.com/keyConcepts.html#instant-query",underlined:!0}),Rl=()=>Nt("div",{children:[Nt("p",{children:["This tab shows ",Ol," results for the last 5 minutes ending at the selected time range."]}),Nt("p",{children:["Please wrap the query into ",Pl," if you need results over arbitrary lookbehind interval."]})]}),Dl=e=>{let{value:t}=e;return Nt("div",{className:"vm-line-progress",children:[Nt("div",{className:"vm-line-progress-track",children:Nt("div",{className:"vm-line-progress-track__thumb",style:{width:"".concat(t,"%")}})}),Nt("span",{children:[t.toFixed(2),"%"]})]})},zl=e=>{let{isRoot:t,trace:n,totalMsec:a,isExpandedAll:o}=e;const{isDarkTheme:i}=Mt(),{isMobile:l}=ea(),[s,c]=(0,r.useState)({}),u=(0,r.useRef)(null),[d,h]=(0,r.useState)(!1),[m,p]=(0,r.useState)(!1),f=Yt(n.duration/1e3)||"".concat(n.duration,"ms");(0,r.useEffect)((()=>{if(!u.current)return;const e=u.current,t=u.current.children[0],{height:n}=t.getBoundingClientRect();h(n>e.clientHeight)}),[n]);const v=n.children&&!!n.children.length,g=n.duration/a*100,y=e=>{var t;const n=[e.idValue];return null===e||void 0===e||null===(t=e.children)||void 0===t||t.forEach((e=>{n.push(...y(e))})),n};return(0,r.useEffect)((()=>{if(!o)return void c([]);const e=y(n),t={};e.forEach((e=>{t[e]=!0})),c(t)}),[o]),Nt("div",{className:Cr()({"vm-nested-nav":!0,"vm-nested-nav_root":t,"vm-nested-nav_dark":i,"vm-nested-nav_mobile":l}),children:[Nt("div",{className:Cr()({"vm-nested-nav-header":!0,"vm-nested-nav-header_open":s[n.idValue]}),onClick:(_=n.idValue,()=>{v&&c((e=>({...e,[_]:!e[_]})))}),children:[v&&Nt("div",{className:Cr()({"vm-nested-nav-header__icon":!0,"vm-nested-nav-header__icon_open":s[n.idValue]}),children:Nt(jn,{})}),Nt("div",{className:"vm-nested-nav-header__progress",children:Nt(Dl,{value:g})}),Nt("div",{className:Cr()({"vm-nested-nav-header__message":!0,"vm-nested-nav-header__message_show-full":m}),ref:u,children:[Nt("span",{className:"vm-nested-nav-header__message_duration",children:f}),":\xa0",Nt("span",{children:n.message})]}),Nt("div",{className:"vm-nested-nav-header-bottom",children:(d||m)&&Nt(la,{variant:"text",size:"small",onClick:e=>{e.stopPropagation(),p((e=>!e))},children:m?"Hide":"Show full query"})})]}),s[n.idValue]&&Nt("div",{className:"vm-nested-nav__childrens",children:v&&n.children.map((e=>Nt(zl,{trace:e,totalMsec:a,isExpandedAll:o},e.duration)))})]});var _},Fl=zl,jl=e=>{let{editable:t=!1,defaultTile:n="JSON",displayTitle:a=!0,defaultJson:o="",resetValue:i="",onClose:l,onUpload:s}=e;const c=fl(),{isMobile:u}=ea(),[d,h]=(0,r.useState)(o),[m,p]=(0,r.useState)(n),[f,v]=(0,r.useState)(""),[g,y]=(0,r.useState)(""),_=(0,r.useMemo)((()=>{try{const e=JSON.parse(d),t=e.trace||e;return t.duration_msec?(new Cl(t,""),""):pt.traceNotFound}catch(Lp){return Lp instanceof Error?Lp.message:"Unknown error"}}),[d]),b=()=>{y(_);m.trim()||v(pt.emptyTitle),_||f||(s(d,m),l())};return Nt("div",{className:Cr()({"vm-json-form":!0,"vm-json-form_one-field":!a,"vm-json-form_one-field_mobile":!a&&u,"vm-json-form_mobile":u}),children:[a&&Nt(Ya,{value:m,label:"Title",error:f,onEnter:b,onChange:e=>{p(e)}}),Nt(Ya,{value:d,label:"JSON",type:"textarea",error:g,autofocus:!0,onChange:e=>{y(""),h(e)},onEnter:b,disabled:!t}),Nt("div",{className:"vm-json-form-footer",children:[Nt("div",{className:"vm-json-form-footer__controls",children:[Nt(la,{variant:"outlined",startIcon:Nt(rr,{}),onClick:async()=>{await c(d,"Formatted JSON has been copied")},children:"Copy JSON"}),i&&Nt(la,{variant:"text",startIcon:Nt(Pn,{}),onClick:()=>{h(i)},children:"Reset JSON"})]}),Nt("div",{className:"vm-json-form-footer__controls vm-json-form-footer__controls_right",children:[Nt(la,{variant:"outlined",color:"error",onClick:l,children:"Cancel"}),Nt(la,{variant:"contained",onClick:b,children:"apply"})]})]})]})},Hl=e=>{let{traces:t,jsonEditor:n=!1,onDeleteClick:a}=e;const{isMobile:o}=ea(),[i,l]=(0,r.useState)(null),[s,c]=(0,r.useState)([]),u=()=>{l(null)};if(!t.length)return Nt(na,{variant:"info",children:"Please re-run the query to see results of the tracing"});const d=e=>()=>{a(e)},h=e=>()=>{l(e)},m=e=>()=>{const t=new Blob([e.originalJSON],{type:"application/json"}),n=URL.createObjectURL(t),r=document.createElement("a");r.href=n,r.download="vmui_trace_".concat(e.queryValue,".json"),document.body.appendChild(r),r.click(),document.body.removeChild(r),URL.revokeObjectURL(n)};return Nt(Ct.FK,{children:[Nt("div",{className:"vm-tracings-view",children:t.map((e=>{return Nt("div",{className:"vm-tracings-view-trace vm-block vm-block_empty-padding",children:[Nt("div",{className:"vm-tracings-view-trace-header",children:[Nt("h3",{className:"vm-tracings-view-trace-header-title",children:["Trace for ",Nt("b",{className:"vm-tracings-view-trace-header-title__query",children:e.queryValue})]}),Nt(ya,{title:s.includes(e.idValue)?"Collapse All":"Expand All",children:Nt(la,{variant:"text",startIcon:s.includes(e.idValue)?Nt(kr,{}):Nt(wr,{}),onClick:(t=e,()=>{c((e=>e.includes(t.idValue)?e.filter((e=>e!==t.idValue)):[...e,t.idValue]))}),ariaLabel:s.includes(e.idValue)?"Collapse All":"Expand All"})}),Nt(ya,{title:"Save Trace to JSON",children:Nt(la,{variant:"text",startIcon:Nt(br,{}),onClick:m(e),ariaLabel:"Save trace to JSON"})}),Nt(ya,{title:"Open JSON",children:Nt(la,{variant:"text",startIcon:Nt(Qn,{}),onClick:h(e),ariaLabel:"open JSON"})}),Nt(ya,{title:"Remove trace",children:Nt(la,{variant:"text",color:"error",startIcon:Nt(Zn,{}),onClick:d(e),ariaLabel:"remove trace"})})]}),Nt("nav",{className:Cr()({"vm-tracings-view-trace__nav":!0,"vm-tracings-view-trace__nav_mobile":o}),children:Nt(Fl,{isRoot:!0,trace:e,totalMsec:e.duration,isExpandedAll:s.includes(e.idValue)})})]},e.idValue);var t}))}),i&&Nt(ga,{title:i.queryValue,onClose:u,children:Nt(jl,{editable:n,displayTitle:n,defaultTile:i.queryValue,defaultJson:i.JSON,resetValue:i.originalJSON,onClose:u,onUpload:(e,t)=>{if(n&&i)try{i.setTracing(JSON.parse(e)),i.setQuery(t),l(null)}catch(Lp){console.error(Lp)}}})})]})},Vl=e=>{let{traces:t,displayType:n}=e;const{isTracingEnabled:a}=Fr(),[o,i]=(0,r.useState)([]);return(0,r.useEffect)((()=>{t&&i([...o,...t])}),[t]),(0,r.useEffect)((()=>{i([])}),[n]),Nt(Ct.FK,{children:a&&Nt("div",{className:"vm-custom-panel__trace",children:Nt(Hl,{traces:o,onDeleteClick:e=>{const t=o.filter((t=>t.idValue!==e.idValue));i([...t])}})})})},$l=e=>{let{warning:t,query:n,onChange:a}=e;const{isMobile:o}=ea(),{value:i,setTrue:l,setFalse:s}=ca(!1);return(0,r.useEffect)(s,[n]),(0,r.useEffect)((()=>{a(i)}),[i]),Nt(na,{variant:"warning",children:Nt("div",{className:Cr()({"vm-custom-panel__warning":!0,"vm-custom-panel__warning_mobile":o}),children:[Nt("p",{children:t}),Nt(la,{color:"warning",variant:"outlined",onClick:l,children:"Show all"})]})})},Ul="u-off",Bl="u-label",ql="width",Yl="height",Wl="top",Kl="bottom",Ql="left",Zl="right",Gl="#000",Jl=Gl+"0",Xl="mousemove",es="mousedown",ts="mouseup",ns="mouseenter",rs="mouseleave",as="dblclick",os="change",is="dppxchange",ls="--",ss="undefined"!=typeof window,cs=ss?document:null,us=ss?window:null,ds=ss?navigator:null;let hs,ms;function ps(e,t){if(null!=t){let n=e.classList;!n.contains(t)&&n.add(t)}}function fs(e,t){let n=e.classList;n.contains(t)&&n.remove(t)}function vs(e,t,n){e.style[t]=n+"px"}function gs(e,t,n,r){let a=cs.createElement(e);return null!=t&&ps(a,t),null!=n&&n.insertBefore(a,r),a}function ys(e,t){return gs("div",e,t)}const _s=new WeakMap;function bs(e,t,n,r,a){let o="translate("+t+"px,"+n+"px)";o!=_s.get(e)&&(e.style.transform=o,_s.set(e,o),t<0||n<0||t>r||n>a?ps(e,Ul):fs(e,Ul))}const ws=new WeakMap;function ks(e,t,n){let r=t+n;r!=ws.get(e)&&(ws.set(e,r),e.style.background=t,e.style.borderColor=n)}const xs=new WeakMap;function Ss(e,t,n,r){let a=t+""+n;a!=xs.get(e)&&(xs.set(e,a),e.style.height=n+"px",e.style.width=t+"px",e.style.marginLeft=r?-t/2+"px":0,e.style.marginTop=r?-n/2+"px":0)}const Cs={passive:!0},Es={...Cs,capture:!0};function Ns(e,t,n,r){t.addEventListener(e,n,r?Es:Cs)}function As(e,t,n,r){t.removeEventListener(e,n,r?Es:Cs)}function Ms(e,t,n,r){let a;n=n||0;let o=(r=r||t.length-1)<=2147483647;for(;r-n>1;)a=o?n+r>>1:qs((n+r)/2),t[a]=t&&a<=n;a+=r)if(null!=e[a])return a;return-1}function Ls(e,t,n,r){let a=Gs(e),o=Gs(t);e==t&&(-1==a?(e*=n,t/=n):(e/=n,t*=n));let i=10==n?Js:Xs,l=1==o?Ws:qs,s=(1==a?qs:Ws)(i(Bs(e))),c=l(i(Bs(t))),u=Zs(n,s),d=Zs(n,c);return 10==n&&(s<0&&(u=pc(u,-s)),c<0&&(d=pc(d,-c))),r||2==n?(e=u*a,t=d*o):(e=mc(e,u),t=hc(t,d)),[e,t]}function Is(e,t,n,r){let a=Ls(e,t,n,r);return 0==e&&(a[0]=0),0==t&&(a[1]=0),a}ss&&function e(){let t=devicePixelRatio;hs!=t&&(hs=t,ms&&As(os,ms,e),ms=matchMedia("(min-resolution: ".concat(hs-.001,"dppx) and (max-resolution: ").concat(hs+.001,"dppx)")),Ns(os,ms,e),us.dispatchEvent(new CustomEvent(is)))}();const Ps=.1,Os={mode:3,pad:Ps},Rs={pad:0,soft:null,mode:0},Ds={min:Rs,max:Rs};function zs(e,t,n,r){return Sc(n)?js(e,t,n):(Rs.pad=n,Rs.soft=r?0:null,Rs.mode=r?3:0,js(e,t,Ds))}function Fs(e,t){return null==e?t:e}function js(e,t,n){let r=n.min,a=n.max,o=Fs(r.pad,0),i=Fs(a.pad,0),l=Fs(r.hard,-tc),s=Fs(a.hard,tc),c=Fs(r.soft,tc),u=Fs(a.soft,-tc),d=Fs(r.mode,0),h=Fs(a.mode,0),m=t-e,p=Js(m),f=Qs(Bs(e),Bs(t)),v=Js(f),g=Bs(v-p);(m<1e-9||g>10)&&(m=0,0!=e&&0!=t||(m=1e-9,2==d&&c!=tc&&(o=0),2==h&&u!=-tc&&(i=0)));let y=m||f||1e3,_=Js(y),b=Zs(10,qs(_)),w=pc(mc(e-y*(0==m?0==e?.1:1:o),b/10),9),k=e>=c&&(1==d||3==d&&w<=c||2==d&&w>=c)?c:tc,x=Qs(l,w=k?k:Ks(k,w)),S=pc(hc(t+y*(0==m?0==t?.1:1:i),b/10),9),C=t<=u&&(1==h||3==h&&S>=u||2==h&&S<=u)?u:-tc,E=Ks(s,S>C&&t<=C?C:Qs(C,S));return x==E&&0==x&&(E=100),[x,E]}const Hs=new Intl.NumberFormat(ss?ds.language:"en-US"),Vs=e=>Hs.format(e),$s=Math,Us=$s.PI,Bs=$s.abs,qs=$s.floor,Ys=$s.round,Ws=$s.ceil,Ks=$s.min,Qs=$s.max,Zs=$s.pow,Gs=$s.sign,Js=$s.log10,Xs=$s.log2,ec=function(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:1;return $s.asinh(e/t)},tc=1/0;function nc(e){return 1+(0|Js((e^e>>31)-(e>>31)))}function rc(e,t,n){return Ks(Qs(e,t),n)}function ac(e){return"function"==typeof e?e:()=>e}const oc=e=>e,ic=(e,t)=>t,lc=e=>null,sc=e=>!0,cc=(e,t)=>e==t,uc=e=>pc(e,14);function dc(e,t){return uc(pc(uc(e/t))*t)}function hc(e,t){return uc(Ws(uc(e/t))*t)}function mc(e,t){return uc(qs(uc(e/t))*t)}function pc(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:0;if(kc(e))return e;let n=10**t,r=e*n*(1+Number.EPSILON);return Ys(r)/n}const fc=new Map;function vc(e){return((""+e).split(".")[1]||"").length}function gc(e,t,n,r){let a=[],o=r.map(vc);for(let i=t;i=0&&i>=0?0:t)+(i>=o[e]?0:o[e]),c=pc(l,s);a.push(c),fc.set(c,s)}}return a}const yc={},_c=[],bc=[null,null],wc=Array.isArray,kc=Number.isInteger;function xc(e){return"string"==typeof e}function Sc(e){let t=!1;if(null!=e){let n=e.constructor;t=null==n||n==Object}return t}function Cc(e){return null!=e&&"object"==typeof e}const Ec=Object.getPrototypeOf(Uint8Array);function Nc(e){let t,n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:Sc;if(wc(e)){let r=e.find((e=>null!=e));if(wc(r)||n(r)){t=Array(e.length);for(let r=0;ro){for(r=i-1;r>=0&&null==e[r];)e[r--]=null;for(r=i+1;rPromise.resolve().then(e):queueMicrotask;const Lc=["January","February","March","April","May","June","July","August","September","October","November","December"],Ic=["Sunday","Monday","Tuesday","Wednesday","Thursday","Friday","Saturday"];function Pc(e){return e.slice(0,3)}const Oc=Ic.map(Pc),Rc=Lc.map(Pc),Dc={MMMM:Lc,MMM:Rc,WWWW:Ic,WWW:Oc};function zc(e){return(e<10?"0":"")+e}const Fc={YYYY:e=>e.getFullYear(),YY:e=>(e.getFullYear()+"").slice(2),MMMM:(e,t)=>t.MMMM[e.getMonth()],MMM:(e,t)=>t.MMM[e.getMonth()],MM:e=>zc(e.getMonth()+1),M:e=>e.getMonth()+1,DD:e=>zc(e.getDate()),D:e=>e.getDate(),WWWW:(e,t)=>t.WWWW[e.getDay()],WWW:(e,t)=>t.WWW[e.getDay()],HH:e=>zc(e.getHours()),H:e=>e.getHours(),h:e=>{let t=e.getHours();return 0==t?12:t>12?t-12:t},AA:e=>e.getHours()>=12?"PM":"AM",aa:e=>e.getHours()>=12?"pm":"am",a:e=>e.getHours()>=12?"p":"a",mm:e=>zc(e.getMinutes()),m:e=>e.getMinutes(),ss:e=>zc(e.getSeconds()),s:e=>e.getSeconds(),fff:e=>{return((t=e.getMilliseconds())<10?"00":t<100?"0":"")+t;var t}};function jc(e,t){t=t||Dc;let n,r=[],a=/\{([a-z]+)\}|[^{]+/gi;for(;n=a.exec(e);)r.push("{"==n[0][0]?Fc[n[1]]:n[0]);return e=>{let n="";for(let a=0;ae%1==0,$c=[1,2,2.5,5],Uc=gc(10,-16,0,$c),Bc=gc(10,0,16,$c),qc=Bc.filter(Vc),Yc=Uc.concat(Bc),Wc="{YYYY}",Kc="\n"+Wc,Qc="{M}/{D}",Zc="\n"+Qc,Gc=Zc+"/{YY}",Jc="{aa}",Xc="{h}:{mm}"+Jc,eu="\n"+Xc,tu=":{ss}",nu=null;function ru(e){let t=1e3*e,n=60*t,r=60*n,a=24*r,o=30*a,i=365*a;return[(1==e?gc(10,0,3,$c).filter(Vc):gc(10,-3,0,$c)).concat([t,5*t,10*t,15*t,30*t,n,5*n,10*n,15*n,30*n,r,2*r,3*r,4*r,6*r,8*r,12*r,a,2*a,3*a,4*a,5*a,6*a,7*a,8*a,9*a,10*a,15*a,o,2*o,3*o,4*o,6*o,i,2*i,5*i,10*i,25*i,50*i,100*i]),[[i,Wc,nu,nu,nu,nu,nu,nu,1],[28*a,"{MMM}",Kc,nu,nu,nu,nu,nu,1],[a,Qc,Kc,nu,nu,nu,nu,nu,1],[r,"{h}"+Jc,Gc,nu,Zc,nu,nu,nu,1],[n,Xc,Gc,nu,Zc,nu,nu,nu,1],[t,tu,Gc+" "+Xc,nu,Zc+" "+Xc,nu,eu,nu,1],[e,tu+".{fff}",Gc+" "+Xc,nu,Zc+" "+Xc,nu,eu,nu,1]],function(t){return(l,s,c,u,d,h)=>{let m=[],p=d>=i,f=d>=o&&d=a?a:d,i=_+(qs(c)-qs(g))+hc(g-_,o);m.push(i);let p=t(i),f=p.getHours()+p.getMinutes()/n+p.getSeconds()/r,v=d/r,y=h/l.axes[s]._space;for(;i=pc(i+d,1==e?0:3),!(i>u);)if(v>1){let e=qs(pc(f+v,6))%24,n=t(i).getHours()-e;n>1&&(n=-1),i-=n*r,f=(f+v)%24,pc((i-m[m.length-1])/d,3)*y>=.7&&m.push(i)}else m.push(i)}return m}}]}const[au,ou,iu]=ru(1),[lu,su,cu]=ru(.001);function uu(e,t){return e.map((e=>e.map(((n,r)=>0==r||8==r||null==n?n:t(1==r||0==e[8]?n:e[1]+n)))))}function du(e,t){return(n,r,a,o,i)=>{let l,s,c,u,d,h,m=t.find((e=>i>=e[0]))||t[t.length-1];return r.map((t=>{let n=e(t),r=n.getFullYear(),a=n.getMonth(),o=n.getDate(),i=n.getHours(),p=n.getMinutes(),f=n.getSeconds(),v=r!=l&&m[2]||a!=s&&m[3]||o!=c&&m[4]||i!=u&&m[5]||p!=d&&m[6]||f!=h&&m[7]||m[1];return l=r,s=a,c=o,u=i,d=p,h=f,v(n)}))}}function hu(e,t,n){return new Date(e,t,n)}function mu(e,t){return t(e)}gc(2,-53,53,[1]);function pu(e,t){return(n,r,a,o)=>null==o?ls:t(e(r))}const fu={show:!0,live:!0,isolate:!1,mount:()=>{},markers:{show:!0,width:2,stroke:function(e,t){let n=e.series[t];return n.width?n.stroke(e,t):n.points.width?n.points.stroke(e,t):null},fill:function(e,t){return e.series[t].fill(e,t)},dash:"solid"},idx:null,idxs:null,values:[]};const vu=[0,0];function gu(e,t,n){let r=!(arguments.length>3&&void 0!==arguments[3])||arguments[3];return e=>{0==e.button&&(!r||e.target==t)&&n(e)}}function yu(e,t,n){let r=!(arguments.length>3&&void 0!==arguments[3])||arguments[3];return e=>{(!r||e.target==t)&&n(e)}}const _u={show:!0,x:!0,y:!0,lock:!1,move:function(e,t,n){return vu[0]=t,vu[1]=n,vu},points:{show:function(e,t){let n=e.cursor.points,r=ys(),a=n.size(e,t);vs(r,ql,a),vs(r,Yl,a);let o=a/-2;vs(r,"marginLeft",o),vs(r,"marginTop",o);let i=n.width(e,t,a);return i&&vs(r,"borderWidth",i),r},size:function(e,t){return e.series[t].points.size},width:0,stroke:function(e,t){let n=e.series[t].points;return n._stroke||n._fill},fill:function(e,t){let n=e.series[t].points;return n._fill||n._stroke}},bind:{mousedown:gu,mouseup:gu,click:gu,dblclick:gu,mousemove:yu,mouseleave:yu,mouseenter:yu},drag:{setScale:!0,x:!0,y:!1,dist:0,uni:null,click:(e,t)=>{t.stopPropagation(),t.stopImmediatePropagation()},_x:!1,_y:!1},focus:{dist:(e,t,n,r,a)=>r-a,prox:-1,bias:0},hover:{skip:[void 0],prox:null,bias:0},left:-10,top:-10,idx:null,dataIdx:null,idxs:null,event:null},bu={show:!0,stroke:"rgba(0,0,0,0.07)",width:2},wu=Ac({},bu,{filter:ic}),ku=Ac({},wu,{size:10}),xu=Ac({},bu,{show:!1}),Su='12px system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, "Noto Sans", sans-serif, "Apple Color Emoji", "Segoe UI Emoji", "Segoe UI Symbol", "Noto Color Emoji"',Cu="bold "+Su,Eu={show:!0,scale:"x",stroke:Gl,space:50,gap:5,size:50,labelGap:0,labelSize:30,labelFont:Cu,side:2,grid:wu,ticks:ku,border:xu,font:Su,lineGap:1.5,rotate:0},Nu={show:!0,scale:"x",auto:!1,sorted:1,min:tc,max:-tc,idxs:[]};function Au(e,t,n,r,a){return t.map((e=>null==e?"":Vs(e)))}function Mu(e,t,n,r,a,o,i){let l=[],s=fc.get(a)||0;for(let c=n=i?n:pc(hc(n,a),s);c<=r;c=pc(c+a,s))l.push(Object.is(c,-0)?0:c);return l}function Tu(e,t,n,r,a,o,i){const l=[],s=e.scales[e.axes[t].scale].log,c=qs((10==s?Js:Xs)(n));a=Zs(s,c),10==s&&c<0&&(a=pc(a,-c));let u=n;do{l.push(u),u+=a,10==s&&(u=pc(u,fc.get(a))),u>=a*s&&(a=u)}while(u<=r);return l}function Lu(e,t,n,r,a,o,i){let l=e.scales[e.axes[t].scale].asinh,s=r>l?Tu(e,t,Qs(l,n),r,a):[l],c=r>=0&&n<=0?[0]:[];return(n<-l?Tu(e,t,Qs(l,-r),-n,a):[l]).reverse().map((e=>-e)).concat(c,s)}const Iu=/./,Pu=/[12357]/,Ou=/[125]/,Ru=/1/,Du=(e,t,n,r)=>e.map(((e,a)=>4==t&&0==e||a%r==0&&n.test(e.toExponential()[e<0?1:0])?e:null));function zu(e,t,n,r,a){let o=e.axes[n],i=o.scale,l=e.scales[i],s=e.valToPos,c=o._space,u=s(10,i),d=s(9,i)-u>=c?Iu:s(7,i)-u>=c?Pu:s(5,i)-u>=c?Ou:Ru;if(d==Ru){let e=Bs(s(1,i)-u);if(ea,Uu={show:!0,auto:!0,sorted:0,gaps:$u,alpha:1,facets:[Ac({},Vu,{scale:"x"}),Ac({},Vu,{scale:"y"})]},Bu={scale:"y",auto:!0,sorted:0,show:!0,spanGaps:!1,gaps:$u,alpha:1,points:{show:function(e,t){let{scale:n,idxs:r}=e.series[0],a=e._data[0],o=e.valToPos(a[r[0]],n,!0),i=e.valToPos(a[r[1]],n,!0),l=Bs(i-o)/(e.series[t].points.space*hs);return r[1]-r[0]<=l},filter:null},values:null,min:tc,max:-tc,idxs:[],path:null,clip:null};function qu(e,t,n,r,a){return n/10}const Yu={time:!0,auto:!0,distr:1,log:10,asinh:1,min:null,max:null,dir:1,ori:0},Wu=Ac({},Yu,{time:!1,ori:1}),Ku={};function Qu(e,t){let n=Ku[e];return n||(n={key:e,plots:[],sub(e){n.plots.push(e)},unsub(e){n.plots=n.plots.filter((t=>t!=e))},pub(e,t,r,a,o,i,l){for(let s=0;s{let f=e.pxRound;const v=l.dir*(0==l.ori?1:-1),g=0==l.ori?ld:sd;let y,_;1==v?(y=n,_=r):(y=r,_=n);let b=f(c(t[y],l,m,d)),w=f(u(i[y],s,p,h)),k=f(c(t[_],l,m,d)),x=f(u(1==o?s.max:s.min,s,p,h)),S=new Path2D(a);return g(S,k,x),g(S,b,x),g(S,b,w),S}))}function td(e,t,n,r,a,o){let i=null;if(e.length>0){i=new Path2D;const l=0==t?cd:ud;let s=n;for(let t=0;tn[0]){let e=n[0]-s;e>0&&l(i,s,r,e,r+o),s=n[1]}}let c=n+a-s,u=10;c>0&&l(i,s,r-u/2,c,r+o+u)}return i}function nd(e,t,n,r,a,o,i){let l=[],s=e.length;for(let c=1==a?n:r;c>=n&&c<=r;c+=a){if(null===t[c]){let u=c,d=c;if(1==a)for(;++c<=r&&null===t[c];)d=c;else for(;--c>=n&&null===t[c];)d=c;let h=o(e[u]),m=d==u?h:o(e[d]),p=u-a;h=i<=0&&p>=0&&p=0&&f>=0&&f=h&&l.push([h,m])}}return l}function rd(e){return 0==e?oc:1==e?Ys:t=>dc(t,e)}function ad(e){let t=0==e?od:id,n=0==e?(e,t,n,r,a,o)=>{e.arcTo(t,n,r,a,o)}:(e,t,n,r,a,o)=>{e.arcTo(n,t,a,r,o)},r=0==e?(e,t,n,r,a)=>{e.rect(t,n,r,a)}:(e,t,n,r,a)=>{e.rect(n,t,a,r)};return function(e,a,o,i,l){let s=arguments.length>5&&void 0!==arguments[5]?arguments[5]:0,c=arguments.length>6&&void 0!==arguments[6]?arguments[6]:0;0==s&&0==c?r(e,a,o,i,l):(s=Ks(s,i/2,l/2),c=Ks(c,i/2,l/2),t(e,a+s,o),n(e,a+i,o,a+i,o+l,s),n(e,a+i,o+l,a,o+l,c),n(e,a,o+l,a,o,c),n(e,a,o,a+i,o,s),e.closePath())}}const od=(e,t,n)=>{e.moveTo(t,n)},id=(e,t,n)=>{e.moveTo(n,t)},ld=(e,t,n)=>{e.lineTo(t,n)},sd=(e,t,n)=>{e.lineTo(n,t)},cd=ad(0),ud=ad(1),dd=(e,t,n,r,a,o)=>{e.arc(t,n,r,a,o)},hd=(e,t,n,r,a,o)=>{e.arc(n,t,r,a,o)},md=(e,t,n,r,a,o,i)=>{e.bezierCurveTo(t,n,r,a,o,i)},pd=(e,t,n,r,a,o,i)=>{e.bezierCurveTo(n,t,a,r,i,o)};function fd(e){return(e,t,n,r,a)=>Gu(e,t,((t,o,i,l,s,c,u,d,h,m,p)=>{let f,v,{pxRound:g,points:y}=t;0==l.ori?(f=od,v=dd):(f=id,v=hd);const _=pc(y.width*hs,3);let b=(y.size-y.width)/2*hs,w=pc(2*b,3),k=new Path2D,x=new Path2D,{left:S,top:C,width:E,height:N}=e.bbox;cd(x,S-w,C-w,E+2*w,N+2*w);const A=e=>{if(null!=i[e]){let t=g(c(o[e],l,m,d)),n=g(u(i[e],s,p,h));f(k,t+b,n),v(k,t,n,b,0,2*Us)}};if(a)a.forEach(A);else for(let e=n;e<=r;e++)A(e);return{stroke:_>0?k:null,fill:k,clip:x,flags:2|Zu}}))}function vd(e){return(t,n,r,a,o,i)=>{r!=a&&(o!=r&&i!=r&&e(t,n,r),o!=a&&i!=a&&e(t,n,a),e(t,n,i))}}const gd=vd(ld),yd=vd(sd);function _d(e){const t=Fs(null===e||void 0===e?void 0:e.alignGaps,0);return(e,n,r,a)=>Gu(e,n,((o,i,l,s,c,u,d,h,m,p,f)=>{let v,g,y=o.pxRound,_=e=>y(u(e,s,p,h)),b=e=>y(d(e,c,f,m));0==s.ori?(v=ld,g=gd):(v=sd,g=yd);const w=s.dir*(0==s.ori?1:-1),k={stroke:new Path2D,fill:null,clip:null,band:null,gaps:null,flags:Zu},x=k.stroke;let S,C,E,N=tc,A=-tc,M=_(i[1==w?r:a]),T=Ts(l,r,a,1*w),L=Ts(l,r,a,-1*w),I=_(i[T]),P=_(i[L]),O=!1;for(let e=1==w?r:a;e>=r&&e<=a;e+=w){let t=_(i[e]),n=l[e];t==M?null!=n?(C=b(n),N==tc&&(v(x,t,C),S=C),N=Ks(C,N),A=Qs(C,A)):null===n&&(O=!0):(N!=tc&&(g(x,M,N,A,S,C),E=M),null!=n?(C=b(n),v(x,t,C),N=A=S=C):(N=tc,A=-tc,null===n&&(O=!0)),M=t)}N!=tc&&N!=A&&E!=M&&g(x,M,N,A,S,C);let[R,D]=Ju(e,n);if(null!=o.fill||0!=R){let t=k.fill=new Path2D(x),r=b(o.fillTo(e,n,o.min,o.max,R));v(t,P,r),v(t,I,r)}if(!o.spanGaps){let c=[];O&&c.push(...nd(i,l,r,a,w,_,t)),k.gaps=c=o.gaps(e,n,r,a,c),k.clip=td(c,s.ori,h,m,p,f)}return 0!=D&&(k.band=2==D?[ed(e,n,r,a,x,-1),ed(e,n,r,a,x,1)]:ed(e,n,r,a,x,D)),k}))}function bd(e,t,n,r,a,o){let i=arguments.length>6&&void 0!==arguments[6]?arguments[6]:tc;if(e.length>1){let l=null;for(let s=0,c=1/0;s0!==r[e]>0?n[e]=0:(n[e]=3*(s[e-1]+s[e])/((2*s[e]+s[e-1])/r[e-1]+(s[e]+2*s[e-1])/r[e]),isFinite(n[e])||(n[e]=0));n[i-1]=r[i-2];for(let c=0;c{Fd.pxRatio=hs})));const Sd=_d(),Cd=fd();function Ed(e,t,n,r){return(r?[e[0],e[1]].concat(e.slice(2)):[e[0]].concat(e.slice(1))).map(((e,r)=>Nd(e,r,t,n)))}function Nd(e,t,n,r){return Ac({},0==t?n:r,e)}function Ad(e,t,n){return null==t?bc:[t,n]}const Md=Ad;function Td(e,t,n){return null==t?bc:zs(t,n,Ps,!0)}function Ld(e,t,n,r){return null==t?bc:Ls(t,n,e.scales[r].log,!1)}const Id=Ld;function Pd(e,t,n,r){return null==t?bc:Is(t,n,e.scales[r].log,!1)}const Od=Pd;function Rd(e,t,n,r,a){let o=Qs(nc(e),nc(t)),i=t-e,l=Ms(a/r*i,n);do{let e=n[l],t=r*e/i;if(t>=a&&o+(e<5?fc.get(e):0)<=17)return[e,t]}while(++l(t=Ys((n=+r)*hs))+"px")),t,n]}function zd(e){e.show&&[e.font,e.labelFont].forEach((e=>{let t=pc(e[2]*hs,1);e[0]=e[0].replace(/[0-9.]+px/,t+"px"),e[1]=t}))}function Fd(e,t,n){const r={mode:Fs(e.mode,1)},a=r.mode;function o(e,t){return((3==t.distr?Js(e>0?e:t.clamp(r,e,t.min,t.max,t.key)):4==t.distr?ec(e,t.asinh):e)-t._min)/(t._max-t._min)}function i(e,t,n,r){let a=o(e,t);return r+n*(-1==t.dir?1-a:a)}function l(e,t,n,r){let a=o(e,t);return r+n*(-1==t.dir?a:1-a)}function s(e,t,n,r){return 0==t.ori?i(e,t,n,r):l(e,t,n,r)}r.valToPosH=i,r.valToPosV=l;let c=!1;r.status=0;const u=r.root=ys("uplot");if(null!=e.id&&(u.id=e.id),ps(u,e.class),e.title){ys("u-title",u).textContent=e.title}const d=gs("canvas"),h=r.ctx=d.getContext("2d"),m=ys("u-wrap",u);Ns("click",m,(e=>{if(e.target===f){(Mt!=Ct||Tt!=Et)&&jt.click(r,e)}}),!0);const p=r.under=ys("u-under",m);m.appendChild(d);const f=r.over=ys("u-over",m),v=+Fs((e=Nc(e)).pxAlign,1),g=rd(v);(e.plugins||[]).forEach((t=>{t.opts&&(e=t.opts(r,e)||e)}));const y=e.ms||.001,_=r.series=1==a?Ed(e.series||[],Nu,Bu,!1):(b=e.series||[null],w=Uu,b.map(((e,t)=>0==t?null:Ac({},w,e))));var b,w;const k=r.axes=Ed(e.axes||[],Eu,Hu,!0),x=r.scales={},S=r.bands=e.bands||[];S.forEach((e=>{e.fill=ac(e.fill||null),e.dir=Fs(e.dir,-1)}));const C=2==a?_[1].facets[0].scale:_[0].scale,E={axes:function(){for(let e=0;ett[e])):y,b=2==m.distr?tt[y[1]]-tt[y[0]]:u,w=t.ticks,S=t.border,C=w.show?Ys(w.size*hs):0,E=t._rotate*-Us/180,N=g(t._pos*hs),A=N+(C+v)*c;a=0==i?A:0,n=1==i?A:0,it(t.font[0],l,1==t.align?Ql:2==t.align?Zl:E>0?Ql:E<0?Zl:0==i?"center":3==o?Zl:Ql,E||1==i?"middle":2==o?Wl:Kl);let M=t.font[1]*t.lineGap,T=y.map((e=>g(s(e,m,p,f)))),L=t._values;for(let e=0;e0&&(_.forEach(((e,n)=>{if(n>0&&e.show&&(ct(n,!1),ct(n,!0),null==e._paths)){et!=e.alpha&&(h.globalAlpha=et=e.alpha);let o=2==a?[0,t[n][0].length-1]:function(e){let t=rc($e-1,0,Ve-1),n=rc(Ue+1,0,Ve-1);for(;null==e[t]&&t>0;)t--;for(;null==e[n]&&n{if(t>0&&e.show){et!=e.alpha&&(h.globalAlpha=et=e.alpha),null!=e._paths&&ut(t,!1);{let n=null!=e._paths?e._paths.gaps:null,a=e.points.show(r,t,$e,Ue,n),o=e.points.filter(r,t,a,n);(a||o)&&(e.points._paths=e.points.paths(r,t,$e,Ue,o),ut(t,!0))}1!=et&&(h.globalAlpha=et=1),kn("drawSeries",t)}})))}},N=(e.drawOrder||["axes","series"]).map((e=>E[e]));function A(t){let n=x[t];if(null==n){let r=(e.scales||yc)[t]||yc;if(null!=r.from)A(r.from),x[t]=Ac({},x[r.from],r,{key:t});else{n=x[t]=Ac({},t==C?Yu:Wu,r),n.key=t;let e=n.time,o=n.range,i=wc(o);if((t!=C||2==a&&!e)&&(!i||null!=o[0]&&null!=o[1]||(o={min:null==o[0]?Os:{mode:1,hard:o[0],soft:o[0]},max:null==o[1]?Os:{mode:1,hard:o[1],soft:o[1]}},i=!1),!i&&Sc(o))){let e=o;o=(t,n,r)=>null==n?bc:zs(n,r,e)}n.range=ac(o||(e?Md:t==C?3==n.distr?Id:4==n.distr?Od:Ad:3==n.distr?Ld:4==n.distr?Pd:Td)),n.auto=ac(!i&&n.auto),n.clamp=ac(n.clamp||qu),n._min=n._max=null}}}A("x"),A("y"),1==a&&_.forEach((e=>{A(e.scale)})),k.forEach((e=>{A(e.scale)}));for(let Mn in e.scales)A(Mn);const M=x[C],T=M.distr;let L,I;0==M.ori?(ps(u,"u-hz"),L=i,I=l):(ps(u,"u-vt"),L=l,I=i);const P={};for(let Mn in x){let e=x[Mn];null==e.min&&null==e.max||(P[Mn]={min:e.min,max:e.max},e.min=e.max=null)}const O=e.tzDate||(e=>new Date(Ys(e/y))),R=e.fmtDate||jc,D=1==y?iu(O):cu(O),z=du(O,uu(1==y?ou:su,R)),F=pu(O,mu("{YYYY}-{MM}-{DD} {h}:{mm}{aa}",R)),j=[],H=r.legend=Ac({},fu,e.legend),V=H.show,$=H.markers;let U,B,q;H.idxs=j,$.width=ac($.width),$.dash=ac($.dash),$.stroke=ac($.stroke),$.fill=ac($.fill);let Y,W=[],K=[],Q=!1,Z={};if(H.live){const e=_[1]?_[1].values:null;Q=null!=e,Y=Q?e(r,1,0):{_:0};for(let t in Y)Z[t]=ls}if(V)if(U=gs("table","u-legend",u),q=gs("tbody",null,U),H.mount(r,U),Q){B=gs("thead",null,U,q);let e=gs("tr",null,B);for(var G in gs("th",null,e),Y)gs("th",Bl,e).textContent=G}else ps(U,"u-inline"),H.live&&ps(U,"u-live");const J={show:!0},X={show:!1};const ee=new Map;function te(e,t,n){let a=!(arguments.length>3&&void 0!==arguments[3])||arguments[3];const o=ee.get(t)||{},i=Ee.bind[e](r,t,n,a);i&&(Ns(e,t,o[e]=i),ee.set(t,o))}function ne(e,t,n){const r=ee.get(t)||{};for(let a in r)null!=e&&a!=e||(As(a,t,r[a]),delete r[a]);null==e&&ee.delete(t)}let re=0,ae=0,oe=0,ie=0,le=0,se=0,ce=le,ue=se,de=oe,he=ie,me=0,pe=0,fe=0,ve=0;r.bbox={};let ge=!1,ye=!1,_e=!1,be=!1,we=!1,ke=!1;function xe(e,t,n){(n||e!=r.width||t!=r.height)&&Se(e,t),yt(!1),_e=!0,ye=!0,Rt()}function Se(e,t){r.width=re=oe=e,r.height=ae=ie=t,le=se=0,function(){let e=!1,t=!1,n=!1,r=!1;k.forEach(((a,o)=>{if(a.show&&a._show){let{side:o,_size:i}=a,l=o%2,s=i+(null!=a.label?a.labelSize:0);s>0&&(l?(oe-=s,3==o?(le+=s,r=!0):n=!0):(ie-=s,0==o?(se+=s,e=!0):t=!0))}})),ze[0]=e,ze[1]=n,ze[2]=t,ze[3]=r,oe-=He[1]+He[3],le+=He[3],ie-=He[2]+He[0],se+=He[0]}(),function(){let e=le+oe,t=se+ie,n=le,r=se;function a(a,o){switch(a){case 1:return e+=o,e-o;case 2:return t+=o,t-o;case 3:return n-=o,n+o;case 0:return r-=o,r+o}}k.forEach(((e,t)=>{if(e.show&&e._show){let t=e.side;e._pos=a(t,e._size),null!=e.label&&(e._lpos=a(t,e.labelSize))}}))}();let n=r.bbox;me=n.left=dc(le*hs,.5),pe=n.top=dc(se*hs,.5),fe=n.width=dc(oe*hs,.5),ve=n.height=dc(ie*hs,.5)}const Ce=3;r.setSize=function(e){let{width:t,height:n}=e;xe(t,n)};const Ee=r.cursor=Ac({},_u,{drag:{y:2==a}},e.cursor);if(null==Ee.dataIdx){var Ne,Ae;let e=Ee.hover,n=e.skip=new Set(null!==(Ne=e.skip)&&void 0!==Ne?Ne:[]);n.add(void 0);let r=e.prox=ac(e.prox),a=null!==(Ae=e.bias)&&void 0!==Ae?Ae:e.bias=0;Ee.dataIdx=(e,o,i,l)=>{var s;if(0==o)return i;let c=i,u=null!==(s=r(e,o,i,l))&&void 0!==s?s:tc,d=u>=0&&u0;)n.has(f[e])||(t=e);if(0==a||1==a)for(e=i;null==r&&e++u&&(c=null)}return c}}const Me=e=>{Ee.event=e};Ee.idxs=j,Ee._lock=!1;let Te=Ee.points;Te.show=ac(Te.show),Te.size=ac(Te.size),Te.stroke=ac(Te.stroke),Te.width=ac(Te.width),Te.fill=ac(Te.fill);const Le=r.focus=Ac({},e.focus||{alpha:.3},Ee.focus),Ie=Le.prox>=0;let Pe=[null],Oe=[null],Re=[null];function De(e,t){if(1==a||t>0){let t=1==a&&x[e.scale].time,n=e.value;e.value=t?xc(n)?pu(O,mu(n,R)):n||F:n||ju,e.label=e.label||(t?"Time":"Value")}if(t>0){e.width=null==e.width?1:e.width,e.paths=e.paths||Sd||lc,e.fillTo=ac(e.fillTo||Xu),e.pxAlign=+Fs(e.pxAlign,v),e.pxRound=rd(e.pxAlign),e.stroke=ac(e.stroke||null),e.fill=ac(e.fill||null),e._stroke=e._fill=e._paths=e._focus=null;let t=pc((3+2*(Qs(1,e.width)||1))*1,3),n=e.points=Ac({},{size:t,width:Qs(1,.2*t),stroke:e.stroke,space:2*t,paths:Cd,_stroke:null,_fill:null},e.points);n.show=ac(n.show),n.filter=ac(n.filter),n.fill=ac(n.fill),n.stroke=ac(n.stroke),n.paths=ac(n.paths),n.pxAlign=e.pxAlign}if(V){let n=function(e,t){if(0==t&&(Q||!H.live||2==a))return bc;let n=[],o=gs("tr","u-series",q,q.childNodes[t]);ps(o,e.class),e.show||ps(o,Ul);let i=gs("th",null,o);if($.show){let e=ys("u-marker",i);if(t>0){let n=$.width(r,t);n&&(e.style.border=n+"px "+$.dash(r,t)+" "+$.stroke(r,t)),e.style.background=$.fill(r,t)}}let l=ys(Bl,i);for(var s in l.textContent=e.label,t>0&&($.show||(l.style.color=e.width>0?$.stroke(r,t):$.fill(r,t)),te("click",i,(t=>{if(Ee._lock)return;Me(t);let n=_.indexOf(e);if((t.ctrlKey||t.metaKey)!=H.isolate){let e=_.some(((e,t)=>t>0&&t!=n&&e.show));_.forEach(((t,r)=>{r>0&&Yt(r,e?r==n?J:X:J,!0,Sn.setSeries)}))}else Yt(n,{show:!e.show},!0,Sn.setSeries)}),!1),Ie&&te(ns,i,(t=>{Ee._lock||(Me(t),Yt(_.indexOf(e),Zt,!0,Sn.setSeries))}),!1)),Y){let e=gs("td","u-value",o);e.textContent="--",n.push(e)}return[o,n]}(e,t);W.splice(t,0,n[0]),K.splice(t,0,n[1]),H.values.push(null)}if(Ee.show){j.splice(t,0,null);let n=function(e,t){if(t>0){let n=Ee.points.show(r,t);if(n)return ps(n,"u-cursor-pt"),ps(n,e.class),bs(n,-10,-10,oe,ie),f.insertBefore(n,Pe[t]),n}}(e,t);null!=n&&(Pe.splice(t,0,n),Oe.splice(t,0,0),Re.splice(t,0,0))}kn("addSeries",t)}r.addSeries=function(e,t){t=null==t?_.length:t,e=1==a?Nd(e,t,Nu,Bu):Nd(e,t,null,Uu),_.splice(t,0,e),De(_[t],t)},r.delSeries=function(e){if(_.splice(e,1),V){H.values.splice(e,1),K.splice(e,1);let t=W.splice(e,1)[0];ne(null,t.firstChild),t.remove()}Ee.show&&(j.splice(e,1),Pe.length>1&&(Pe.splice(e,1)[0].remove(),Oe.splice(e,1),Re.splice(e,1))),kn("delSeries",e)};const ze=[!1,!1,!1,!1];function Fe(e,t,n,r){let[a,o,i,l]=n,s=t%2,c=0;return 0==s&&(l||o)&&(c=0==t&&!a||2==t&&!i?Ys(Eu.size/3):0),1==s&&(a||i)&&(c=1==t&&!o||3==t&&!l?Ys(Hu.size/2):0),c}const je=r.padding=(e.padding||[Fe,Fe,Fe,Fe]).map((e=>ac(Fs(e,Fe)))),He=r._padding=je.map(((e,t)=>e(r,t,ze,0)));let Ve,$e=null,Ue=null;const Be=1==a?_[0].idxs:null;let qe,Ye,We,Ke,Qe,Ze,Ge,Je,Xe,et,tt=null,nt=!1;function rt(e,n){if(t=null==e?[]:e,r.data=r._data=t,2==a){Ve=0;for(let e=1;e<_.length;e++)Ve+=t[e][0].length}else{0==t.length&&(r.data=r._data=t=[[]]),tt=t[0],Ve=tt.length;let e=t;if(2==T){e=t.slice();let n=e[0]=Array(Ve);for(let e=0;e=0,ke=!0,Rt()}}function at(){let e,n;nt=!0,1==a&&(Ve>0?($e=Be[0]=0,Ue=Be[1]=Ve-1,e=t[0][$e],n=t[0][Ue],2==T?(e=$e,n=Ue):e==n&&(3==T?[e,n]=Ls(e,e,M.log,!1):4==T?[e,n]=Is(e,e,M.log,!1):M.time?n=e+Ys(86400/y):[e,n]=zs(e,n,Ps,!0))):($e=Be[0]=e=null,Ue=Be[1]=n=null)),qt(C,e,n)}function ot(e,t,n,r,a,o){var i,l,s,c,u;null!==(i=e)&&void 0!==i||(e=Jl),null!==(l=n)&&void 0!==l||(n=_c),null!==(s=r)&&void 0!==s||(r="butt"),null!==(c=a)&&void 0!==c||(a=Jl),null!==(u=o)&&void 0!==u||(o="round"),e!=qe&&(h.strokeStyle=qe=e),a!=Ye&&(h.fillStyle=Ye=a),t!=We&&(h.lineWidth=We=t),o!=Qe&&(h.lineJoin=Qe=o),r!=Ze&&(h.lineCap=Ze=r),n!=Ke&&h.setLineDash(Ke=n)}function it(e,t,n,r){t!=Ye&&(h.fillStyle=Ye=t),e!=Ge&&(h.font=Ge=e),n!=Je&&(h.textAlign=Je=n),r!=Xe&&(h.textBaseline=Xe=r)}function lt(e,t,n,a){let o=arguments.length>4&&void 0!==arguments[4]?arguments[4]:0;if(a.length>0&&e.auto(r,nt)&&(null==t||null==t.min)){let t=Fs($e,0),r=Fs(Ue,a.length-1),i=null==n.min?3==e.distr?function(e,t,n){let r=tc,a=-tc;for(let o=t;o<=n;o++){let t=e[o];null!=t&&t>0&&(ta&&(a=t))}return[r,a]}(a,t,r):function(e,t,n,r){let a=tc,o=-tc;if(1==r)a=e[t],o=e[n];else if(-1==r)a=e[n],o=e[t];else for(let i=t;i<=n;i++){let t=e[i];null!=t&&(to&&(o=t))}return[a,o]}(a,t,r,o):[n.min,n.max];e.min=Ks(e.min,n.min=i[0]),e.max=Qs(e.max,n.max=i[1])}}r.setData=rt;const st={min:null,max:null};function ct(e,t){let n=t?_[e].points:_[e];n._stroke=n.stroke(r,e),n._fill=n.fill(r,e)}function ut(e,n){let a=n?_[e].points:_[e],{stroke:o,fill:i,clip:l,flags:s,_stroke:c=a._stroke,_fill:u=a._fill,_width:d=a.width}=a._paths;d=pc(d*hs,3);let m=null,p=d%2/2;n&&null==u&&(u=d>0?"#fff":c);let f=1==a.pxAlign&&p>0;if(f&&h.translate(p,p),!n){let e=me-d/2,t=pe-d/2,n=fe+d,r=ve+d;m=new Path2D,m.rect(e,t,n,r)}n?ht(c,d,a.dash,a.cap,u,o,i,s,l):function(e,n,a,o,i,l,s,c,u,d,h){let m=!1;0!=u&&S.forEach(((p,f)=>{if(p.series[0]==e){let e,v=_[p.series[1]],g=t[p.series[1]],y=(v._paths||yc).band;wc(y)&&(y=1==p.dir?y[0]:y[1]);let b=null;v.show&&y&&function(e,t,n){for(t=Fs(t,0),n=Fs(n,e.length-1);t<=n;){if(null!=e[t])return!0;t++}return!1}(g,$e,Ue)?(b=p.fill(r,f)||l,e=v._paths.clip):y=null,ht(n,a,o,i,b,s,c,u,d,h,e,y),m=!0}})),m||ht(n,a,o,i,l,s,c,u,d,h)}(e,c,d,a.dash,a.cap,u,o,i,s,m,l),f&&h.translate(-p,-p)}const dt=2|Zu;function ht(e,t,n,r,a,o,i,l,s,c,u,d){ot(e,t,n,r,a),(s||c||d)&&(h.save(),s&&h.clip(s),c&&h.clip(c)),d?(l&dt)==dt?(h.clip(d),u&&h.clip(u),pt(a,i),mt(e,o,t)):2&l?(pt(a,i),h.clip(d),mt(e,o,t)):l&Zu&&(h.save(),h.clip(d),u&&h.clip(u),pt(a,i),h.restore(),mt(e,o,t)):(pt(a,i),mt(e,o,t)),(s||c||d)&&h.restore()}function mt(e,t,n){n>0&&(t instanceof Map?t.forEach(((e,t)=>{h.strokeStyle=qe=t,h.stroke(e)})):null!=t&&e&&h.stroke(t))}function pt(e,t){t instanceof Map?t.forEach(((e,t)=>{h.fillStyle=Ye=t,h.fill(e)})):null!=t&&e&&h.fill(t)}function ft(e,t,n,r,a,o,i,l,s,c){let u=i%2/2;1==v&&h.translate(u,u),ot(l,i,s,c,l),h.beginPath();let d,m,p,f,g=a+(0==r||3==r?-o:o);0==n?(m=a,f=g):(d=a,p=g);for(let v=0;v{if(!n.show)return;let o=x[n.scale];if(null==o.min)return void(n._show&&(t=!1,n._show=!1,yt(!1)));n._show||(t=!1,n._show=!0,yt(!1));let i=n.side,l=i%2,{min:s,max:c}=o,[u,d]=function(e,t,n,a){let o,i=k[e];if(a<=0)o=[0,0];else{let l=i._space=i.space(r,e,t,n,a);o=Rd(t,n,i._incrs=i.incrs(r,e,t,n,a,l),a,l)}return i._found=o}(a,s,c,0==l?oe:ie);if(0==d)return;let h=2==o.distr,m=n._splits=n.splits(r,a,s,c,u,d,h),p=2==o.distr?m.map((e=>tt[e])):m,f=2==o.distr?tt[m[1]]-tt[m[0]]:u,v=n._values=n.values(r,n.filter(r,p,a,d,f),a,d,f);n._rotate=2==i?n.rotate(r,v,a,d):0;let g=n._size;n._size=Ws(n.size(r,v,a,e)),null!=g&&n._size!=g&&(t=!1)})),t}function gt(e){let t=!0;return je.forEach(((n,a)=>{let o=n(r,a,ze,e);o!=He[a]&&(t=!1),He[a]=o})),t}function yt(e){_.forEach(((t,n)=>{n>0&&(t._paths=null,e&&(1==a?(t.min=null,t.max=null):t.facets.forEach((e=>{e.min=null,e.max=null}))))}))}let _t,bt,wt,kt,xt,St,Ct,Et,Nt,At,Mt,Tt,Lt=!1,It=!1,Pt=[];function Ot(){It=!1;for(let e=0;e0){_.forEach(((n,o)=>{if(1==a){let a=n.scale,i=P[a];if(null==i)return;let l=e[a];if(0==o){let e=l.range(r,l.min,l.max,a);l.min=e[0],l.max=e[1],$e=Ms(l.min,t[0]),Ue=Ms(l.max,t[0]),Ue-$e>1&&(t[0][$e]l.max&&Ue--),n.min=tt[$e],n.max=tt[Ue]}else n.show&&n.auto&<(l,i,n,t[o],n.sorted);n.idxs[0]=$e,n.idxs[1]=Ue}else if(o>0&&n.show&&n.auto){let[r,a]=n.facets,i=r.scale,l=a.scale,[s,c]=t[o],u=e[i],d=e[l];null!=u&<(u,P[i],r,s,r.sorted),null!=d&<(d,P[l],a,c,a.sorted),n.min=a.min,n.max=a.max}}));for(let t in e){let n=e[t],a=P[t];if(null==n.from&&(null==a||null==a.min)){let e=n.range(r,n.min==tc?null:n.min,n.max==-tc?null:n.max,t);n.min=e[0],n.max=e[1]}}}for(let t in e){let n=e[t];if(null!=n.from){let a=e[n.from];if(null==a.min)n.min=n.max=null;else{let e=n.range(r,a.min,a.max,t);n.min=e[0],n.max=e[1]}}}let n={},o=!1;for(let t in e){let r=e[t],a=x[t];if(a.min!=r.min||a.max!=r.max){a.min=r.min,a.max=r.max;let e=a.distr;a._min=3==e?Js(a.min):4==e?ec(a.min,a.asinh):a.min,a._max=3==e?Js(a.max):4==e?ec(a.max,a.asinh):a.max,n[t]=o=!0}}if(o){_.forEach(((e,t)=>{2==a?t>0&&n.y&&(e._paths=null):n[e.scale]&&(e._paths=null)}));for(let e in n)_e=!0,kn("setScale",e);Ee.show&&Ee.left>=0&&(be=ke=!0)}for(let t in P)P[t]=null}(),ge=!1),_e&&(!function(){let e=!1,t=0;for(;!e;){t++;let n=vt(t),a=gt(t);e=t==Ce||n&&a,e||(Se(r.width,r.height),ye=!0)}}(),_e=!1),ye){if(vs(p,Ql,le),vs(p,Wl,se),vs(p,ql,oe),vs(p,Yl,ie),vs(f,Ql,le),vs(f,Wl,se),vs(f,ql,oe),vs(f,Yl,ie),vs(m,ql,re),vs(m,Yl,ae),d.width=Ys(re*hs),d.height=Ys(ae*hs),k.forEach((e=>{let{_el:t,_show:n,_size:r,_pos:a,side:o}=e;if(null!=t)if(n){let e=o%2==1;vs(t,e?"left":"top",a-(3===o||0===o?r:0)),vs(t,e?"width":"height",r),vs(t,e?"top":"left",e?se:le),vs(t,e?"height":"width",e?ie:oe),fs(t,Ul)}else ps(t,Ul)})),qe=Ye=We=Qe=Ze=Ge=Je=Xe=Ke=null,et=1,ln(!0),le!=ce||se!=ue||oe!=de||ie!=he){yt(!1);let e=oe/de,t=ie/he;if(Ee.show&&!be&&Ee.left>=0){Ee.left*=e,Ee.top*=t,wt&&bs(wt,Ys(Ee.left),0,oe,ie),kt&&bs(kt,0,Ys(Ee.top),oe,ie);for(let n=1;n=0&&$t.width>0){$t.left*=e,$t.width*=e,$t.top*=t,$t.height*=t;for(let e in un)vs(Ut,e,$t[e])}ce=le,ue=se,de=oe,he=ie}kn("setSize"),ye=!1}re>0&&ae>0&&(h.clearRect(0,0,d.width,d.height),kn("drawClear"),N.forEach((e=>e())),kn("draw")),$t.show&&we&&(Bt($t),we=!1),Ee.show&&be&&(an(null,!0,!1),be=!1),H.show&&H.live&&ke&&(nn(),ke=!1),c||(c=!0,r.status=1,kn("ready")),nt=!1,Lt=!1}function zt(e,n){let a=x[e];if(null==a.from){if(0==Ve){let t=a.range(r,n.min,n.max,e);n.min=t[0],n.max=t[1]}if(n.min>n.max){let e=n.min;n.min=n.max,n.max=e}if(Ve>1&&null!=n.min&&null!=n.max&&n.max-n.min<1e-16)return;e==C&&2==a.distr&&Ve>0&&(n.min=Ms(n.min,t[0]),n.max=Ms(n.max,t[0]),n.min==n.max&&n.max++),P[e]=n,ge=!0,Rt()}}r.batch=function(e){let t=arguments.length>1&&void 0!==arguments[1]&&arguments[1];Lt=!0,It=t,e(r),Dt(),t&&Pt.length>0&&queueMicrotask(Ot)},r.redraw=(e,t)=>{_e=t||!1,!1!==e?qt(C,M.min,M.max):Rt()},r.setScale=zt;let Ft=!1;const jt=Ee.drag;let Ht=jt.x,Vt=jt.y;Ee.show&&(Ee.x&&(_t=ys("u-cursor-x",f)),Ee.y&&(bt=ys("u-cursor-y",f)),0==M.ori?(wt=_t,kt=bt):(wt=bt,kt=_t),Mt=Ee.left,Tt=Ee.top);const $t=r.select=Ac({show:!0,over:!0,left:0,width:0,top:0,height:0},e.select),Ut=$t.show?ys("u-select",$t.over?f:p):null;function Bt(e,t){if($t.show){for(let t in e)$t[t]=e[t],t in un&&vs(Ut,t,e[t]);!1!==t&&kn("setSelect")}}function qt(e,t,n){zt(e,{min:t,max:n})}function Yt(e,t,n,o){null!=t.focus&&function(e){if(e!=Qt){let t=null==e,n=1!=Le.alpha;_.forEach(((r,o)=>{if(1==a||o>0){let a=t||0==o||o==e;r._focus=t?null:a,n&&function(e,t){_[e].alpha=t,Ee.show&&Pe[e]&&(Pe[e].style.opacity=t);V&&W[e]&&(W[e].style.opacity=t)}(o,a?1:Le.alpha)}})),Qt=e,n&&Rt()}}(e),null!=t.show&&_.forEach(((n,r)=>{r>0&&(e==r||null==e)&&(n.show=t.show,function(e,t){let n=_[e],r=V?W[e]:null;n.show?r&&fs(r,Ul):(r&&ps(r,Ul),Pe.length>1&&bs(Pe[e],-10,-10,oe,ie))}(r,t.show),2==a?(qt(n.facets[0].scale,null,null),qt(n.facets[1].scale,null,null)):qt(n.scale,null,null),Rt())})),!1!==n&&kn("setSeries",e,t),o&&Nn("setSeries",r,e,t)}let Wt,Kt,Qt;r.setSelect=Bt,r.setSeries=Yt,r.addBand=function(e,t){e.fill=ac(e.fill||null),e.dir=Fs(e.dir,-1),t=null==t?S.length:t,S.splice(t,0,e)},r.setBand=function(e,t){Ac(S[e],t)},r.delBand=function(e){null==e?S.length=0:S.splice(e,1)};const Zt={focus:!0};function Gt(e,t,n){let r=x[t];n&&(e=e/hs-(1==r.ori?se:le));let a=oe;1==r.ori&&(a=ie,e=a-e),-1==r.dir&&(e=a-e);let o=r._min,i=o+(r._max-o)*(e/a),l=r.distr;return 3==l?Zs(10,i):4==l?function(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:1;return $s.sinh(e)*t}(i,r.asinh):i}function Jt(e,t){vs(Ut,Ql,$t.left=e),vs(Ut,ql,$t.width=t)}function Xt(e,t){vs(Ut,Wl,$t.top=e),vs(Ut,Yl,$t.height=t)}V&&Ie&&te(rs,U,(e=>{Ee._lock||(Me(e),null!=Qt&&Yt(null,Zt,!0,Sn.setSeries))})),r.valToIdx=e=>Ms(e,t[0]),r.posToIdx=function(e,n){return Ms(Gt(e,C,n),t[0],$e,Ue)},r.posToVal=Gt,r.valToPos=(e,t,n)=>0==x[t].ori?i(e,x[t],n?fe:oe,n?me:0):l(e,x[t],n?ve:ie,n?pe:0),r.setCursor=(e,t,n)=>{Mt=e.left,Tt=e.top,an(null,t,n)};let en=0==M.ori?Jt:Xt,tn=1==M.ori?Jt:Xt;function nn(e,t){null!=e&&(e.idxs?e.idxs.forEach(((e,t)=>{j[t]=e})):void 0!==e.idx&&j.fill(e.idx),H.idx=j[0]);for(let n=0;n<_.length;n++)(n>0||1==a&&!Q)&&rn(n,j[n]);V&&H.live&&function(){if(V&&H.live)for(let e=2==a?1:0;e<_.length;e++){if(0==e&&Q)continue;let t=H.values[e],n=0;for(let r in t)K[e][n++].firstChild.nodeValue=t[r]}}(),ke=!1,!1!==t&&kn("setLegend")}function rn(e,n){var a;let o,i=_[e],l=0==e&&2==T?tt:t[e];Q?o=null!==(a=i.values(r,e,n))&&void 0!==a?a:Z:(o=i.value(r,null==n?null:l[n],e,n),o=null==o?Z:{_:o}),H.values[e]=o}function an(e,n,o){let i;Nt=Mt,At=Tt,[Mt,Tt]=Ee.move(r,Mt,Tt),Ee.left=Mt,Ee.top=Tt,Ee.show&&(wt&&bs(wt,Ys(Mt),0,oe,ie),kt&&bs(kt,0,Ys(Tt),oe,ie));let l=$e>Ue;Wt=tc;let s=0==M.ori?oe:ie,c=1==M.ori?oe:ie;if(Mt<0||0==Ve||l){i=Ee.idx=null;for(let e=0;e<_.length;e++)e>0&&Pe.length>1&&bs(Pe[e],-10,-10,oe,ie);Ie&&Yt(null,Zt,!0,null==e&&Sn.setSeries),H.live&&(j.fill(i),ke=!0)}else{let e,n,o;1==a&&(e=0==M.ori?Mt:Tt,n=Gt(e,C),i=Ee.idx=Ms(n,t[0],$e,Ue),o=L(t[0][i],M,s,0));for(let l=2==a?1:0;l<_.length;l++){let e=_[l],u=j[l],d=null==u?null:1==a?t[l][u]:t[l][1][u],h=Ee.dataIdx(r,l,i,n),m=null==h?null:1==a?t[l][h]:t[l][1][h];ke=ke||m!=d||h!=u,j[l]=h;let p=h==i?o:L(1==a?t[0][h]:t[l][0][h],M,s,0);if(l>0&&e.show){let t,n,o=null==m?-10:I(m,1==a?x[e.scale]:x[e.facets[1].scale],c,0);if(Ie&&null!=m){let t=1==M.ori?Mt:Tt,n=Bs(Le.dist(r,l,h,o,t));if(n=0?1:-1;o==(m>=0?1:-1)&&(1==o?1==r?m>=a:m<=a:1==r?m<=a:m>=a)&&(Wt=n,Kt=l)}else Wt=n,Kt=l}}if(0==M.ori?(t=p,n=o):(t=o,n=p),ke&&Pe.length>1){ks(Pe[l],Ee.points.fill(r,l),Ee.points.stroke(r,l));let e,a,o,i,s=!0,c=Ee.points.bbox;if(null!=c){s=!1;let t=c(r,l);o=t.left,i=t.top,e=t.width,a=t.height}else o=t,i=n,e=a=Ee.points.size(r,l);Ss(Pe[l],e,a,s),Oe[l]=o,Re[l]=i,bs(Pe[l],hc(o,1),hc(i,1),oe,ie)}}}}if($t.show&&Ft)if(null!=e){let[t,n]=Sn.scales,[r,a]=Sn.match,[o,i]=e.cursor.sync.scales,l=e.cursor.drag;if(Ht=l._x,Vt=l._y,Ht||Vt){let l,u,d,h,m,{left:p,top:f,width:v,height:g}=e.select,y=e.scales[t].ori,_=e.posToVal,b=null!=t&&r(t,o),w=null!=n&&a(n,i);b&&Ht?(0==y?(l=p,u=v):(l=f,u=g),d=x[t],h=L(_(l,o),d,s,0),m=L(_(l+u,o),d,s,0),en(Ks(h,m),Bs(m-h))):en(0,s),w&&Vt?(1==y?(l=p,u=v):(l=f,u=g),d=x[n],h=I(_(l,i),d,c,0),m=I(_(l+u,i),d,c,0),tn(Ks(h,m),Bs(m-h))):tn(0,c)}else dn()}else{let e=Bs(Nt-xt),t=Bs(At-St);if(1==M.ori){let n=e;e=t,t=n}Ht=jt.x&&e>=jt.dist,Vt=jt.y&&t>=jt.dist;let n,r,a=jt.uni;null!=a?Ht&&Vt&&(Ht=e>=a,Vt=t>=a,Ht||Vt||(t>e?Vt=!0:Ht=!0)):jt.x&&jt.y&&(Ht||Vt)&&(Ht=Vt=!0),Ht&&(0==M.ori?(n=Ct,r=Mt):(n=Et,r=Tt),en(Ks(n,r),Bs(r-n)),Vt||tn(0,c)),Vt&&(1==M.ori?(n=Ct,r=Mt):(n=Et,r=Tt),tn(Ks(n,r),Bs(r-n)),Ht||en(0,s)),Ht||Vt||(en(0,0),tn(0,0))}if(jt._x=Ht,jt._y=Vt,null==e){if(o){if(null!=Cn){let[e,t]=Sn.scales;Sn.values[0]=null!=e?Gt(0==M.ori?Mt:Tt,e):null,Sn.values[1]=null!=t?Gt(1==M.ori?Mt:Tt,t):null}Nn(Xl,r,Mt,Tt,oe,ie,i)}if(Ie){let e=o&&Sn.setSeries,t=Le.prox;null==Qt?Wt<=t&&Yt(Kt,Zt,!0,e):Wt>t?Yt(null,Zt,!0,e):Kt!=Qt&&Yt(Kt,Zt,!0,e)}}ke&&(H.idx=i,nn()),!1!==n&&kn("setCursor")}r.setLegend=nn;let on=null;function ln(){arguments.length>0&&void 0!==arguments[0]&&arguments[0]?on=null:(on=f.getBoundingClientRect(),kn("syncRect",on))}function sn(e,t,n,r,a,o,i){Ee._lock||Ft&&null!=e&&0==e.movementX&&0==e.movementY||(cn(e,t,n,r,a,o,i,!1,null!=e),null!=e?an(null,!0,!0):an(t,!0,!1))}function cn(e,t,n,a,o,i,l,c,u){if(null==on&&ln(!1),Me(e),null!=e)n=e.clientX-on.left,a=e.clientY-on.top;else{if(n<0||a<0)return Mt=-10,void(Tt=-10);let[e,r]=Sn.scales,l=t.cursor.sync,[c,u]=l.values,[d,h]=l.scales,[m,p]=Sn.match,f=t.axes[0].side%2==1,v=0==M.ori?oe:ie,g=1==M.ori?oe:ie,y=f?i:o,_=f?o:i,b=f?a:n,w=f?n:a;if(n=null!=d?m(e,d)?s(c,x[e],v,0):-10:v*(b/y),a=null!=h?p(r,h)?s(u,x[r],g,0):-10:g*(w/_),1==M.ori){let e=n;n=a,a=e}}u&&((n<=1||n>=oe-1)&&(n=dc(n,oe)),(a<=1||a>=ie-1)&&(a=dc(a,ie))),c?(xt=n,St=a,[Ct,Et]=Ee.move(r,n,a)):(Mt=n,Tt=a)}Object.defineProperty(r,"rect",{get:()=>(null==on&&ln(!1),on)});const un={width:0,height:0,left:0,top:0};function dn(){Bt(un,!1)}let hn,mn,pn,fn;function vn(e,t,n,a,o,i,l){Ft=!0,Ht=Vt=jt._x=jt._y=!1,cn(e,t,n,a,o,i,0,!0,!1),null!=e&&(te(ts,cs,gn,!1),Nn(es,r,Ct,Et,oe,ie,null));let{left:s,top:c,width:u,height:d}=$t;hn=s,mn=c,pn=u,fn=d,dn()}function gn(e,t,n,a,o,i,l){Ft=jt._x=jt._y=!1,cn(e,t,n,a,o,i,0,!1,!0);let{left:s,top:c,width:u,height:d}=$t,h=u>0||d>0,m=hn!=s||mn!=c||pn!=u||fn!=d;if(h&&m&&Bt($t),jt.setScale&&h&&m){let e=s,t=u,n=c,r=d;if(1==M.ori&&(e=c,t=d,n=s,r=u),Ht&&qt(C,Gt(e,C),Gt(e+t,C)),Vt)for(let a in x){let e=x[a];a!=C&&null==e.from&&e.min!=tc&&qt(a,Gt(n+r,a),Gt(n,a))}dn()}else Ee.lock&&(Ee._lock=!Ee._lock,Ee._lock||an(null,!0,!1));null!=e&&(ne(ts,cs),Nn(ts,r,Mt,Tt,oe,ie,null))}function yn(e,t,n,a,o,i,l){Ee._lock||(Me(e),at(),dn(),null!=e&&Nn(as,r,Mt,Tt,oe,ie,null))}function _n(){k.forEach(zd),xe(r.width,r.height,!0)}Ns(is,us,_n);const bn={};bn.mousedown=vn,bn.mousemove=sn,bn.mouseup=gn,bn.dblclick=yn,bn.setSeries=(e,t,n,a)=>{-1!=(n=(0,Sn.match[2])(r,t,n))&&Yt(n,a,!0,!1)},Ee.show&&(te(es,f,vn),te(Xl,f,sn),te(ns,f,(e=>{Me(e),ln(!1)})),te(rs,f,(function(e,t,n,r,a,o,i){if(Ee._lock)return;Me(e);let l=Ft;if(Ft){let e,t,n=!0,r=!0,a=10;0==M.ori?(e=Ht,t=Vt):(e=Vt,t=Ht),e&&t&&(n=Mt<=a||Mt>=oe-a,r=Tt<=a||Tt>=ie-a),e&&n&&(Mt=Mt{e.call(null,r,t,n)}))}(e.plugins||[]).forEach((e=>{for(let t in e.hooks)wn[t]=(wn[t]||[]).concat(e.hooks[t])}));const xn=(e,t,n)=>n,Sn=Ac({key:null,setSeries:!1,filters:{pub:sc,sub:sc},scales:[C,_[1]?_[1].scale:null],match:[cc,cc,xn],values:[null,null]},Ee.sync);2==Sn.match.length&&Sn.match.push(xn),Ee.sync=Sn;const Cn=Sn.key,En=Qu(Cn);function Nn(e,t,n,r,a,o,i){Sn.filters.pub(e,t,n,r,a,o,i)&&En.pub(e,t,n,r,a,o,i)}function An(){kn("init",e,t),rt(t||e.data,!1),P[C]?zt(C,P[C]):at(),we=$t.show&&($t.width>0||$t.height>0),be=ke=!0,xe(e.width,e.height)}return En.sub(r),r.pub=function(e,t,n,r,a,o,i){Sn.filters.sub(e,t,n,r,a,o,i)&&bn[e](null,t,n,r,a,o,i)},r.destroy=function(){var e;En.unsub(r),kd.delete(r),ee.clear(),As(is,us,_n),u.remove(),null===(e=U)||void 0===e||e.remove(),kn("destroy")},_.forEach(De),k.forEach((function(e,t){if(e._show=e.show,e.show){let n=e.side%2,a=x[e.scale];null==a&&(e.scale=n?_[1].scale:C,a=x[e.scale]);let o=a.time;e.size=ac(e.size),e.space=ac(e.space),e.rotate=ac(e.rotate),wc(e.incrs)&&e.incrs.forEach((e=>{!fc.has(e)&&fc.set(e,vc(e))})),e.incrs=ac(e.incrs||(2==a.distr?qc:o?1==y?au:lu:Yc)),e.splits=ac(e.splits||(o&&1==a.distr?D:3==a.distr?Tu:4==a.distr?Lu:Mu)),e.stroke=ac(e.stroke),e.grid.stroke=ac(e.grid.stroke),e.ticks.stroke=ac(e.ticks.stroke),e.border.stroke=ac(e.border.stroke);let i=e.values;e.values=wc(i)&&!wc(i[0])?ac(i):o?wc(i)?du(O,uu(i,R)):xc(i)?function(e,t){let n=jc(t);return(t,r,a,o,i)=>r.map((t=>n(e(t))))}(O,i):i||z:i||Au,e.filter=ac(e.filter||(a.distr>=3&&10==a.log?zu:3==a.distr&&2==a.log?Fu:ic)),e.font=Dd(e.font),e.labelFont=Dd(e.labelFont),e._size=e.size(r,null,t,0),e._space=e._rotate=e._incrs=e._found=e._splits=e._values=null,e._size>0&&(ze[t]=!0,e._el=ys("u-axis",m))}})),n?n instanceof HTMLElement?(n.appendChild(u),An()):n(r,An):An(),r}Fd.assign=Ac,Fd.fmtNum=Vs,Fd.rangeNum=zs,Fd.rangeLog=Ls,Fd.rangeAsinh=Is,Fd.orient=Gu,Fd.pxRatio=hs,Fd.join=function(e,t){if(function(e){let t=e[0][0],n=t.length;for(let r=1;r1&&void 0!==arguments[1]?arguments[1]:100;const n=e.length;if(n<=1)return!0;let r=0,a=n-1;for(;r<=a&&null==e[r];)r++;for(;a>=r&&null==e[a];)a--;if(a<=r)return!0;const o=Qs(1,qs((a-r+1)/t));for(let i=e[r],l=r+o;l<=a;l+=o){const t=e[l];if(null!=t){if(t<=i)return!1;i=t}}return!0}(t[0])||(t=function(e){let t=e[0],n=t.length,r=Array(n);for(let o=0;ot[e]-t[n]));let a=[];for(let o=0;oe-t))],a=r[0].length,o=new Map;for(let i=0;iGu(e,o,((s,c,u,d,h,m,p,f,v,g,y)=>{let _=s.pxRound,{left:b,width:w}=e.bbox,k=e=>_(m(e,d,g,f)),x=e=>_(p(e,h,y,v)),S=0==d.ori?ld:sd;const C={stroke:new Path2D,fill:null,clip:null,band:null,gaps:null,flags:Zu},E=C.stroke,N=d.dir*(0==d.ori?1:-1);i=Ts(u,i,l,1),l=Ts(u,i,l,-1);let A=x(u[1==N?i:l]),M=k(c[1==N?i:l]),T=M,L=M;a&&-1==t&&(L=b,S(E,L,A)),S(E,M,A);for(let e=1==N?i:l;e>=i&&e<=l;e+=N){let n=u[e];if(null==n)continue;let r=k(c[e]),a=x(n);1==t?S(E,r,A):S(E,T,a),S(E,r,a),A=a,T=r}let I=T;a&&1==t&&(I=b+w,S(E,I,A));let[P,O]=Ju(e,o);if(null!=s.fill||0!=P){let t=C.fill=new Path2D(E),n=x(s.fillTo(e,o,s.min,s.max,P));S(t,I,n),S(t,L,n)}if(!s.spanGaps){let a=[];a.push(...nd(c,u,i,l,N,k,r));let h=s.width*hs/2,m=n||1==t?h:-h,p=n||-1==t?-h:h;a.forEach((e=>{e[0]+=m,e[1]+=p})),C.gaps=a=s.gaps(e,o,i,l,a),C.clip=td(a,d.ori,f,v,g,y)}return 0!=O&&(C.band=2==O?[ed(e,o,i,l,E,-1),ed(e,o,i,l,E,1)]:ed(e,o,i,l,E,O)),C}))},e.bars=function(e){const t=Fs((e=e||yc).size,[.6,tc,1]),n=e.align||0,r=e.gap||0;let a=e.radius;a=null==a?[0,0]:"number"==typeof a?[a,0]:a;const o=ac(a),i=1-t[0],l=Fs(t[1],tc),s=Fs(t[2],1),c=Fs(e.disp,yc),u=Fs(e.each,(e=>{})),{fill:d,stroke:h}=c;return(e,t,a,m)=>Gu(e,t,((p,f,v,g,y,_,b,w,k,x,S)=>{let C,E,N=p.pxRound,A=n,M=r*hs,T=l*hs,L=s*hs;0==g.ori?[C,E]=o(e,t):[E,C]=o(e,t);const I=g.dir*(0==g.ori?1:-1);let P,O,R,D=0==g.ori?cd:ud,z=0==g.ori?u:(e,t,n,r,a,o,i)=>{u(e,t,n,a,r,i,o)},F=Fs(e.bands,_c).find((e=>e.series[0]==t)),j=null!=F?F.dir:0,H=p.fillTo(e,t,p.min,p.max,j),V=N(b(H,y,S,k)),$=x,U=N(p.width*hs),B=!1,q=null,Y=null,W=null,K=null;null==d||0!=U&&null==h||(B=!0,q=d.values(e,t,a,m),Y=new Map,new Set(q).forEach((e=>{null!=e&&Y.set(e,new Path2D)})),U>0&&(W=h.values(e,t,a,m),K=new Map,new Set(W).forEach((e=>{null!=e&&K.set(e,new Path2D)}))));let{x0:Q,size:Z}=c;if(null!=Q&&null!=Z){A=1,f=Q.values(e,t,a,m),2==Q.unit&&(f=f.map((t=>e.posToVal(w+t*x,g.key,!0))));let n=Z.values(e,t,a,m);O=2==Z.unit?n[0]*x:_(n[0],g,x,w)-_(0,g,x,w),$=bd(f,v,_,g,x,w,$),R=$-O+M}else $=bd(f,v,_,g,x,w,$),R=$*i+M,O=$-R;R<1&&(R=0),U>=O/2&&(U=0),R<5&&(N=oc);let G=R>0;O=N(rc($-R-(G?U:0),L,T)),P=(0==A?O/2:A==I?0:O)-A*I*((0==A?M/2:0)+(G?U/2:0));const J={stroke:null,fill:null,clip:null,band:null,gaps:null,flags:0},X=B?null:new Path2D;let ee=null;if(null!=F)ee=e.data[F.series[1]];else{let{y0:n,y1:r}=c;null!=n&&null!=r&&(v=r.values(e,t,a,m),ee=n.values(e,t,a,m))}let te=C*O,ne=E*O;for(let n=1==I?a:m;n>=a&&n<=m;n+=I){let r=v[n];if(null==r)continue;if(null!=ee){var re;let e=null!==(re=ee[n])&&void 0!==re?re:0;if(r-e==0)continue;V=b(e,y,S,k)}let a=_(2!=g.distr||null!=c?f[n]:n,g,x,w),o=b(Fs(r,H),y,S,k),i=N(a-P),l=N(Qs(o,V)),s=N(Ks(o,V)),u=l-s;if(null!=r){let a=r<0?ne:te,o=r<0?te:ne;B?(U>0&&null!=W[n]&&D(K.get(W[n]),i,s+qs(U/2),O,Qs(0,u-U),a,o),null!=q[n]&&D(Y.get(q[n]),i,s+qs(U/2),O,Qs(0,u-U),a,o)):D(X,i,s+qs(U/2),O,Qs(0,u-U),a,o),z(e,t,n,i-U/2,s,O+U,u)}}if(U>0)J.stroke=B?K:X;else if(!B){var ae;J._fill=0==p.width?p._fill:null!==(ae=p._stroke)&&void 0!==ae?ae:p._fill,J.width=0}return J.fill=B?Y:X,J}))},e.spline=function(e){return function(e,t){const n=Fs(null===t||void 0===t?void 0:t.alignGaps,0);return(t,r,a,o)=>Gu(t,r,((i,l,s,c,u,d,h,m,p,f,v)=>{let g,y,_,b=i.pxRound,w=e=>b(d(e,c,f,m)),k=e=>b(h(e,u,v,p));0==c.ori?(g=od,_=ld,y=md):(g=id,_=sd,y=pd);const x=c.dir*(0==c.ori?1:-1);a=Ts(s,a,o,1),o=Ts(s,a,o,-1);let S=w(l[1==x?a:o]),C=S,E=[],N=[];for(let e=1==x?a:o;e>=a&&e<=o;e+=x)if(null!=s[e]){let t=w(l[e]);E.push(C=t),N.push(k(s[e]))}const A={stroke:e(E,N,g,_,y,b),fill:null,clip:null,band:null,gaps:null,flags:Zu},M=A.stroke;let[T,L]=Ju(t,r);if(null!=i.fill||0!=T){let e=A.fill=new Path2D(M),n=k(i.fillTo(t,r,i.min,i.max,T));_(e,C,n),_(e,S,n)}if(!i.spanGaps){let e=[];e.push(...nd(l,s,a,o,x,w,n)),A.gaps=e=i.gaps(t,r,a,o,e),A.clip=td(e,c.ori,m,p,f,v)}return 0!=L&&(A.band=2==L?[ed(t,r,a,o,M,-1),ed(t,r,a,o,M,1)]:ed(t,r,a,o,M,L)),A}))}(wd,e)}}const jd=e=>{let t=e.length,n=-1/0;for(;t--;){const r=e[t];Number.isFinite(r)&&r>n&&(n=r)}return Number.isFinite(n)?n:null},Hd=e=>{let t=e.length,n=1/0;for(;t--;){const r=e[t];Number.isFinite(r)&&r{let t=e.length;const n=[];for(;t--;){const r=e[t];Number.isFinite(r)&&n.push(r)}return n.sort(),n[n.length>>1]},$d=e=>{let t=e.length;for(;t--;){const n=e[t];if(Number.isFinite(n))return n}},Ud=(e,t,n)=>{if(void 0===e||null===e)return"";n=n||0,t=t||0;const r=Math.abs(n-t);if(isNaN(r)||0==r)return Math.abs(e)>=1e3?e.toLocaleString("en-US"):e.toString();let a=3+Math.floor(1+Math.log10(Math.max(Math.abs(t),Math.abs(n)))-Math.log10(r));return(isNaN(a)||a>20)&&(a=20),e.toLocaleString("en-US",{minimumSignificantDigits:1,maximumSignificantDigits:a})},Bd=e=>{const t=(null===e||void 0===e?void 0:e.metric)||{},n=Object.keys(t).filter((e=>"__name__"!=e)).map((e=>"".concat(e,"=").concat(JSON.stringify(t[e]))));let r=t.__name__||"";return n.length>0&&(r+="{"+n.join(",")+"}"),r},qd=[[31536e3,"{YYYY}",null,null,null,null,null,null,1],[2419200,"{MMM}","\n{YYYY}",null,null,null,null,null,1],[86400,"{MM}-{DD}","\n{YYYY}",null,null,null,null,null,1],[3600,"{HH}:{mm}","\n{YYYY}-{MM}-{DD}",null,"\n{MM}-{DD}",null,null,null,1],[60,"{HH}:{mm}","\n{YYYY}-{MM}-{DD}",null,"\n{MM}-{DD}",null,null,null,1],[1,"{HH}:{mm}:{ss}","\n{YYYY}-{MM}-{DD}",null,"\n{MM}-{DD} {HH}:{mm}",null,null,null,1],[.001,":{ss}.{fff}","\n{YYYY}-{MM}-{DD} {HH}:{mm}",null,"\n{MM}-{DD} {HH}:{mm}",null,"\n{HH}:{mm}",null,1]],Yd=(e,t)=>Array.from(new Set(e.map((e=>e.scale)))).map((e=>{const n="10px Arial",r=gt("color-text"),a={scale:e,show:!0,size:Kd,stroke:r,font:n,values:(e,n)=>function(e,t){let n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:"";const r=t[0],a=t[t.length-1];return n?t.map((e=>"".concat(Ud(e,r,a)," ").concat(n))):t.map((e=>Ud(e,r,a)))}(e,n,t)};return e?Number(e)%2||"y"===e?a:{...a,side:1}:{space:80,values:qd,stroke:r,font:n}})),Wd=(e,t)=>{if(null==e||null==t)return[-1,1];const n=.02*(Math.abs(t-e)||Math.abs(e)||1);return[e-n,t+n]},Kd=(e,t,n,r)=>{var a;const o=e.axes[n];if(r>1)return o._size||60;let i=6+((null===o||void 0===o||null===(a=o.ticks)||void 0===a?void 0:a.size)||0)+(o.gap||0);const l=(null!==t&&void 0!==t?t:[]).reduce(((e,t)=>(null===t||void 0===t?void 0:t.length)>e.length?t:e),"");return""!=l&&(i+=((e,t)=>{const n=document.createElement("span");n.innerText=e,n.style.cssText="position: absolute; z-index: -1; pointer-events: none; opacity: 0; font: ".concat(t),document.body.appendChild(n);const r=n.offsetWidth;return n.remove(),r})(l,"10px Arial")),Math.ceil(i)},Qd=["#e54040","#32a9dc","#2ee329","#7126a1","#e38f0f","#3d811a","#ffea00","#2d2d2d","#da42a6","#a44e0c"],Zd=e=>{if(7!=e.length)return"0, 0, 0";const t=parseInt(e.slice(1,3),16),n=parseInt(e.slice(3,5),16),r=parseInt(e.slice(5,7),16);return"".concat(t,", ").concat(n,", ").concat(r)},Gd={[ht.yhatUpper]:"#7126a1",[ht.yhatLower]:"#7126a1",[ht.yhat]:"#da42a6",[ht.anomaly]:"#da4242",[ht.anomalyScore]:"#7126a1",[ht.actual]:"#203ea9",[ht.training]:"rgba(".concat(Zd("#203ea9"),", 0.2)")},Jd=e=>{const t=16777215;let n=1,r=0,a=1;if(e.length>0)for(let i=0;ir&&(r=e[i].charCodeAt(0)),a=parseInt(String(t/r)),n=(n+e[i].charCodeAt(0)*a*49979693)%t;let o=(n*e.length%t).toString(16);return o=o.padEnd(6,o),"#".concat(o)},Xd=((e,t,n)=>{const r=[];for(let a=0;aMath.round(e))).join(", "))}return r.map((e=>"rgb(".concat(e,")")))})([246,226,219],[127,39,4],16),eh=()=>(e,t)=>{const n=Math.round(devicePixelRatio);Fd.orient(e,t,((r,a,o,i,l,s,c,u,d,h,m,p,f,v)=>{const[g,y,_]=e.data[t],b=g.length,w=((e,t)=>{const n=e.data[t][2],r=Xd;let a=1/0,o=-1/0;for(let c=0;c0&&(a=Math.min(a,n[c]),o=Math.max(o,n[c]));const i=o-a,l=r.length,s=Array(n.length);for(let c=0;cnew Path2D)),S=b-y.lastIndexOf(y[0]),C=b/S,E=y[1]-y[0],N=g[S]-g[0],A=s(N,i,h,u)-s(0,i,h,u)-n,M=c(E,l,m,d)-c(0,l,m,d)+n,T=y.slice(0,S).map((e=>Math.round(c(e,l,m,d)-M/2))),L=Array.from({length:C},((e,t)=>Math.round(s(g[t*S],i,h,u)-A)));for(let e=0;e0&&g[e]>=(i.min||-1/0)&&g[e]<=(i.max||1/0)&&y[e]>=(l.min||-1/0)&&y[e]<=(l.max||1/0)){const t=L[~~(e/S)],n=T[e%S];v(x[w[e]],t,n,A,M)}e.ctx.save(),e.ctx.rect(e.bbox.left,e.bbox.top,e.bbox.width,e.bbox.height),e.ctx.clip(),x.forEach(((t,n)=>{e.ctx.fillStyle=k[n],e.ctx.fill(t)})),e.ctx.restore()}))},th=e=>{const t=(e.metric.vmrange||e.metric.le||"").split("...");return Nl(t[t.length-1])},nh=(e,t)=>th(e)-th(t),rh=(e,t)=>{if(!t)return e;const n=(e=>{var t;if(!e.every((e=>e.metric.le)))return e;const n=e.sort(((e,t)=>parseFloat(e.metric.le)-parseFloat(t.metric.le))),r=(null===(t=e[0])||void 0===t?void 0:t.group)||1;let a={metric:{le:""},values:[],group:r};const o=[];for(const l of n){const e=[a.metric.le,l.metric.le].filter((e=>e)).join("..."),t=[];for(const[n,r]of l.values){var i;const e=+r-+((null===(i=a.values.find((e=>e[0]===n)))||void 0===i?void 0:i[1])||0);t.push([n,"".concat(e)])}o.push({metric:{vmrange:e},values:t,group:r}),a=l}return o})(e.sort(nh)),r={};n.forEach((e=>e.values.forEach((e=>{let[t,n]=e;r[t]=(r[t]||0)+ +n}))));return n.map((e=>{const t=e.values.map((e=>{let[t,n]=e;const a=r[t];return[t,"".concat(Math.round(+n/a*100))]}));return{...e,values:t}})).filter((e=>!e.values.every((e=>"0"===e[1]))))},ah=e=>{const t=["__name__","for"];return Object.entries(e).filter((e=>{let[n]=e;return!t.includes(n)})).map((e=>{let[t,n]=e;return"".concat(t,": ").concat(n)})).join(",")},oh=(e,t,n,r)=>{const a={},o=r?0:Math.min(e.length,Qd.length);for(let i=0;i{const l=r?(e=>{const t=(null===e||void 0===e?void 0:e.__name__)||"",n=new RegExp("(".concat(Object.values(ht).join("|"),")$")),r=t.match(n),a=r&&r[0];return{value:/(?:^|[^a-zA-Z0-9_])y(?:$|[^a-zA-Z0-9_])/.test(t)?ht.actual:a,group:ah(e)}})(e[i].metric):null,s=r?(null===l||void 0===l?void 0:l.group)||"":El(o,n[o.group-1]);return{label:s,dash:uh(l),width:dh(l),stroke:mh({metricInfo:l,label:s,isAnomalyUI:r,colorState:a}),points:hh(l),spanGaps:!1,forecast:null===l||void 0===l?void 0:l.value,forecastGroup:null===l||void 0===l?void 0:l.group,freeFormFields:o.metric,show:!sh(s,t),scale:"1",...ih(o)}}},ih=e=>{const t=e.values.map((e=>Nl(e[1]))),{min:n,max:r,median:a,last:o}={min:Hd(t),max:jd(t),median:Vd(t),last:$d(t)};return{median:a,statsFormatted:{min:Ud(n,n,r),max:Ud(r,n,r),median:Ud(a,n,r),last:Ud(o,n,r)}}},lh=(e,t)=>({group:t,label:e.label||"",color:e.stroke,checked:e.show||!1,freeFormFields:e.freeFormFields,statsFormatted:e.statsFormatted,median:e.median}),sh=(e,t)=>t.includes("".concat(e)),ch=e=>{for(let t=e.series.length-1;t>=0;t--)e.delSeries(t)},uh=e=>{const t=(null===e||void 0===e?void 0:e.value)===ht.yhatLower,n=(null===e||void 0===e?void 0:e.value)===ht.yhatUpper,r=(null===e||void 0===e?void 0:e.value)===ht.yhat;return t||n?[10,5]:r?[10,2]:[]},dh=e=>{const t=(null===e||void 0===e?void 0:e.value)===ht.yhatLower,n=(null===e||void 0===e?void 0:e.value)===ht.yhatUpper,r=(null===e||void 0===e?void 0:e.value)===ht.yhat,a=(null===e||void 0===e?void 0:e.value)===ht.anomaly;return n||t?.7:r?1:a?0:1.4},hh=e=>(null===e||void 0===e?void 0:e.value)===ht.anomaly?{size:8,width:4,space:0}:{size:4.2,width:1.4},mh=e=>{let{metricInfo:t,label:n,isAnomalyUI:r,colorState:a}=e;const o=a[n]||Jd(n),i=(null===t||void 0===t?void 0:t.value)===ht.anomaly;return r&&i?Gd[ht.anomaly]:!r||i||null!==t&&void 0!==t&&t.value?null!==t&&void 0!==t&&t.value?null!==t&&void 0!==t&&t.value?Gd[null===t||void 0===t?void 0:t.value]:o:a[n]||Jd(n):Gd[ht.actual]},ph=e=>{let{width:t=400,height:n=500}=e;return{width:t,height:n,series:[],tzDate:e=>o()(Xt(tn(e))).local().toDate(),legend:{show:!1},cursor:{drag:{x:!0,y:!1},focus:{prox:30},points:{size:5.6,width:1.4},bind:{click:()=>null,dblclick:()=>null}}}},fh=e=>{ch(e),(e=>{Object.keys(e.hooks).forEach((t=>{e.hooks[t]=[]}))})(e),e.setData([])},vh=e=>{let{min:t,max:n}=e;return[t,n]},gh=function(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:0,n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:1,r=arguments.length>3?arguments[3]:void 0,a=arguments.length>4?arguments[4]:void 0;return a.limits.enable?a.limits.range[r]:Wd(t,n)},yh=(e,t)=>{const n={x:{range:()=>vh(t)}},r=Object.keys(e.limits.range);return(r.length?r:["1"]).forEach((t=>{n[t]={range:function(n){return gh(n,arguments.length>1&&void 0!==arguments[1]?arguments[1]:0,arguments.length>2&&void 0!==arguments[2]?arguments[2]:1,t,e)}}})),n},_h=e=>t=>{const n=t.posToVal(t.select.left,"x"),r=t.posToVal(t.select.left+t.select.width,"x");e({min:n,max:r})};function bh(e){const t=Zd(Gd[e]);return"rgba(".concat(t,", 0.05)")}const wh=e=>(e=>e instanceof MouseEvent)(e)?e.clientX:e.touches[0].clientX,kh=e=>{let{dragSpeed:t=.85,setPanning:n,setPlotScale:a}=e;const o=(0,r.useRef)({leftStart:0,xUnitsPerPx:0,scXMin:0,scXMax:0}),i=e=>{e.preventDefault();const n=wh(e),{leftStart:r,xUnitsPerPx:i,scXMin:l,scXMax:s}=o.current,c=i*((n-r)*t);a({min:l-c,max:s-c})},l=()=>{n(!1),document.removeEventListener("mousemove",i),document.removeEventListener("mouseup",l),document.removeEventListener("touchmove",i),document.removeEventListener("touchend",l)};return e=>{let{e:t,u:r}=e;t.preventDefault(),n(!0),o.current={leftStart:wh(t),xUnitsPerPx:r.posToVal(1,"x")-r.posToVal(0,"x"),scXMin:r.scales.x.min||0,scXMax:r.scales.x.max||0},document.addEventListener("mousemove",i),document.addEventListener("mouseup",l),document.addEventListener("touchmove",i),document.addEventListener("touchend",l)}},xh=e=>{const[t,n]=(0,r.useState)(!1),a=kh({dragSpeed:.9,setPanning:n,setPlotScale:e});return{onReadyChart:t=>{const n=e=>{const n=e instanceof MouseEvent&&(e=>{const{ctrlKey:t,metaKey:n,button:r}=e;return 0===r&&(t||n)})(e),r=window.TouchEvent&&e instanceof TouchEvent&&e.touches.length>1;(n||r)&&a({u:t,e:e})};t.over.addEventListener("mousedown",n),t.over.addEventListener("touchstart",n),t.over.addEventListener("wheel",(n=>{if(!n.ctrlKey&&!n.metaKey)return;n.preventDefault();const{width:r}=t.over.getBoundingClientRect(),a=t.cursor.left&&t.cursor.left>0?t.cursor.left:0,o=t.posToVal(a,"x"),i=(t.scales.x.max||0)-(t.scales.x.min||0),l=n.deltaY<0?.9*i:i/.9,s=o-a/r*l,c=s+l;t.batch((()=>e({min:s,max:c})))}))},isPanning:t}},Sh=e=>{const t=e[0].clientX-e[1].clientX,n=e[0].clientY-e[1].clientY;return Math.sqrt(t*t+n*n)},Ch=e=>{let{uPlotInst:t,xRange:n,setPlotScale:a}=e;const[o,i]=(0,r.useState)(0),l=(0,r.useCallback)((e=>{const{target:r,ctrlKey:o,metaKey:i,key:l}=e,s=r instanceof HTMLInputElement||r instanceof HTMLTextAreaElement;if(!t||s)return;const c="+"===l||"="===l;if(("-"===l||c)&&!(o||i)){e.preventDefault();const t=(n.max-n.min)/10*(c?1:-1);a({min:n.min+t,max:n.max-t})}}),[t,n]),s=(0,r.useCallback)((e=>{if(!t||2!==e.touches.length)return;e.preventDefault();const r=Sh(e.touches),i=o-r,l=t.scales.x.max||n.max,s=t.scales.x.min||n.min,c=(l-s)/50*(i>0?-1:1);t.batch((()=>a({min:s+c,max:l-c})))}),[t,o,n]);return Ar("keydown",l),Ar("touchmove",s),Ar("touchstart",(e=>{2===e.touches.length&&(e.preventDefault(),i(Sh(e.touches)))})),null},Eh=e=>{let{period:t,setPeriod:n}=e;const[a,i]=(0,r.useState)({min:t.start,max:t.end});return(0,r.useEffect)((()=>{i({min:t.start,max:t.end})}),[t]),{xRange:a,setPlotScale:e=>{let{min:t,max:r}=e;const a=1e3*(r-t);aHt||n({from:o()(1e3*t).toDate(),to:o()(1e3*r).toDate()})}}},Nh=e=>{let{u:t,metrics:n,series:a,unit:i,isAnomalyView:l}=e;const[s,c]=(0,r.useState)(!1),[u,d]=(0,r.useState)({seriesIdx:-1,dataIdx:-1}),[h,m]=(0,r.useState)([]),p=(0,r.useCallback)((()=>{const{seriesIdx:e,dataIdx:r}=u,s=n[e-1],c=a[e],d=new Set(n.map((e=>e.group))),h=(null===s||void 0===s?void 0:s.group)||0,m=it()(t,["data",e,r],0),p=it()(t,["scales","1","min"],0),f=it()(t,["scales","1","max"],1),v=it()(t,["data",0,r],0),g={top:t?t.valToPos(m||0,(null===c||void 0===c?void 0:c.scale)||"1"):0,left:t?t.valToPos(v,"x"):0};return{unit:i,point:g,u:t,id:"".concat(e,"_").concat(r),title:d.size>1&&!l?"Query ".concat(h):"",dates:[v?o()(1e3*v).tz().format(Ot):"-"],value:Ud(m,p,f),info:Bd(s),statsFormatted:null===c||void 0===c?void 0:c.statsFormatted,marker:"".concat(null===c||void 0===c?void 0:c.stroke)}}),[t,u,n,a,i,l]),f=(0,r.useCallback)((()=>{if(!s)return;const e=p();h.find((t=>t.id===e.id))||m((t=>[...t,e]))}),[p,h,s]);return(0,r.useEffect)((()=>{c(-1!==u.dataIdx&&-1!==u.seriesIdx)}),[u]),Ar("click",f),{showTooltip:s,stickyTooltips:h,handleUnStick:e=>{m((t=>t.filter((t=>t.id!==e))))},getTooltipProps:p,seriesFocus:(e,t)=>{const n=null!==t&&void 0!==t?t:-1;d((e=>({...e,seriesIdx:n})))},setCursor:e=>{var t;const n=null!==(t=e.cursor.idx)&&void 0!==t?t:-1;d((e=>({...e,dataIdx:n})))},resetTooltips:()=>{m([]),d({seriesIdx:-1,dataIdx:-1})}}},Ah=e=>{let{u:t,id:n,title:a,dates:o,value:i,point:l,unit:s="",info:c,statsFormatted:u,isSticky:d,marker:h,onClose:m}=e;const p=(0,r.useRef)(null),[f,v]=(0,r.useState)({top:-999,left:-999}),[g,y]=(0,r.useState)(!1),[_,b]=(0,r.useState)(!1),w=(0,r.useCallback)((e=>{if(!g)return;const{clientX:t,clientY:n}=e;v({top:n,left:t})}),[g]);return(0,r.useEffect)((()=>{if(!p.current||!t)return;const{top:e,left:n}=l,r=parseFloat(t.over.style.left),a=parseFloat(t.over.style.top),{width:o,height:i}=t.over.getBoundingClientRect(),{width:s,height:c}=p.current.getBoundingClientRect(),u={top:e+a+10-(e+c>=i?c+20:0),left:n+r+10-(n+s>=o?s+20:0)};u.left<0&&(u.left=20),u.top<0&&(u.top=20),v(u)}),[t,i,l,p]),Ar("mousemove",w),Ar("mouseup",(()=>{y(!1)})),t?r.default.createPortal(Nt("div",{className:Cr()({"vm-chart-tooltip":!0,"vm-chart-tooltip_sticky":d,"vm-chart-tooltip_moved":_}),ref:p,style:f,children:[Nt("div",{className:"vm-chart-tooltip-header",children:[a&&Nt("div",{className:"vm-chart-tooltip-header__title",children:a}),Nt("div",{className:"vm-chart-tooltip-header__date",children:o.map(((e,t)=>Nt("span",{children:e},t)))}),d&&Nt(Ct.FK,{children:[Nt(la,{className:"vm-chart-tooltip-header__drag",variant:"text",size:"small",startIcon:Nt(ar,{}),onMouseDown:e=>{b(!0),y(!0);const{clientX:t,clientY:n}=e;v({top:n,left:t})},ariaLabel:"drag the tooltip"}),Nt(la,{className:"vm-chart-tooltip-header__close",variant:"text",size:"small",startIcon:Nt(In,{}),onClick:()=>{m&&m(n)},ariaLabel:"close the tooltip"})]})]}),Nt("div",{className:"vm-chart-tooltip-data",children:[h&&Nt("span",{className:"vm-chart-tooltip-data__marker",style:{background:h}}),Nt("p",{className:"vm-chart-tooltip-data__value",children:[Nt("b",{children:i}),s]})]}),u&&Nt("table",{className:"vm-chart-tooltip-stats",children:ct.map(((e,t)=>Nt("div",{className:"vm-chart-tooltip-stats-row",children:[Nt("span",{className:"vm-chart-tooltip-stats-row__key",children:[e,":"]}),Nt("span",{className:"vm-chart-tooltip-stats-row__value",children:u[e]})]},t)))}),c&&Nt("p",{className:"vm-chart-tooltip__info",children:c})]}),t.root):null},Mh=e=>{let{showTooltip:t,tooltipProps:n,stickyTooltips:a,handleUnStick:o}=e;return Nt(Ct.FK,{children:[t&&n&&Nt(Ah,{...n}),a.map((e=>(0,r.createElement)(Ah,{...e,isSticky:!0,key:e.id,onClose:o})))]})},Th=e=>{let{data:t,series:n,metrics:a=[],period:o,yaxis:i,unit:l,setPeriod:s,layoutSize:c,height:u,isAnomalyView:d,spanGaps:h=!1}=e;const{isDarkTheme:m}=Mt(),p=(0,r.useRef)(null),[f,v]=(0,r.useState)(),{xRange:g,setPlotScale:y}=Eh({period:o,setPeriod:s}),{onReadyChart:_,isPanning:b}=xh(y);Ch({uPlotInst:f,xRange:g,setPlotScale:y});const{showTooltip:w,stickyTooltips:k,handleUnStick:x,getTooltipProps:S,seriesFocus:C,setCursor:E,resetTooltips:N}=Nh({u:f,metrics:a,series:n,unit:l,isAnomalyView:d}),A={...ph({width:c.width,height:u}),series:n,axes:Yd([{},{scale:"1"}],l),scales:yh(i,g),hooks:{ready:[_],setSeries:[C],setCursor:[E],setSelect:[_h(y)],destroy:[fh]},bands:[]};return(0,r.useEffect)((()=>{if(N(),!p.current)return;f&&f.destroy();const e=new Fd(A,t,p.current);return v(e),e.destroy}),[p,m]),(0,r.useEffect)((()=>{f&&(f.setData(t),f.redraw())}),[t]),(0,r.useEffect)((()=>{f&&(ch(f),function(e,t){let n=arguments.length>2&&void 0!==arguments[2]&&arguments[2];t.forEach((t=>{t.label&&(t.spanGaps=n),e.addSeries(t)}))}(f,n,h),((e,t)=>{if(e.delBand(),t.length<2)return;const n=t.map(((e,t)=>({...e,index:t}))),r=n.filter((e=>e.forecast===ht.yhatUpper)),a=n.filter((e=>e.forecast===ht.yhatLower)),o=r.map((e=>{const t=a.find((t=>t.forecastGroup===e.forecastGroup));return t?{series:[e.index,t.index],fill:bh(ht.yhatUpper)}:null})).filter((e=>null!==e));o.length&&o.forEach((t=>{e.addBand(t)}))})(f,n),f.redraw())}),[n,h]),(0,r.useEffect)((()=>{f&&(Object.keys(i.limits.range).forEach((e=>{f.scales[e]&&(f.scales[e].range=function(t){return gh(t,arguments.length>1&&void 0!==arguments[1]?arguments[1]:0,arguments.length>2&&void 0!==arguments[2]?arguments[2]:1,e,i)})})),f.redraw())}),[i]),(0,r.useEffect)((()=>{f&&(f.scales.x.range=()=>vh(g),f.redraw())}),[g]),(0,r.useEffect)((()=>{f&&(f.setSize({width:c.width||400,height:u||500}),f.redraw())}),[u,c]),Nt("div",{className:Cr()({"vm-line-chart":!0,"vm-line-chart_panning":b}),style:{minWidth:"".concat(c.width||400,"px"),minHeight:"".concat(u||500,"px")},children:[Nt("div",{className:"vm-line-chart__u-plot",ref:p}),Nt(Mh,{showTooltip:w,tooltipProps:S(),stickyTooltips:k,handleUnStick:x})]})},Lh=e=>{let{legend:t,onChange:n,isHeatmap:a,isAnomalyView:o}=e;const i=fl(),l=(0,r.useMemo)((()=>{const e=(e=>{const t=Object.keys(e.freeFormFields).filter((e=>"__name__"!==e));return t.map((t=>{const n="".concat(t,"=").concat(JSON.stringify(e.freeFormFields[t]));return{id:"".concat(e.label,".").concat(n),freeField:n,key:t}}))})(t);return a?e.filter((e=>"vmrange"!==e.key)):e}),[t,a]),s=t.statsFormatted,c=Object.values(s).some((e=>e)),u=e=>t=>{t.stopPropagation(),(async e=>{await i(e,"".concat(e," has been copied"))})(e)};return Nt("div",{className:Cr()({"vm-legend-item":!0,"vm-legend-row":!0,"vm-legend-item_hide":!t.checked&&!a,"vm-legend-item_static":a}),onClick:(e=>t=>{n&&n(e,t.ctrlKey||t.metaKey)})(t),children:[!o&&!a&&Nt("div",{className:"vm-legend-item__marker",style:{backgroundColor:t.color}}),Nt("div",{className:"vm-legend-item-info",children:Nt("span",{className:"vm-legend-item-info__label",children:[t.freeFormFields.__name__,!!l.length&&Nt(Ct.FK,{children:"{"}),l.map(((e,t)=>Nt("span",{className:"vm-legend-item-info__free-fields",onClick:u(e.freeField),title:"copy to clipboard",children:[e.freeField,t+1Nt("div",{className:"vm-legend-item-stats-row",children:[Nt("span",{className:"vm-legend-item-stats-row__key",children:[e,":"]}),Nt("span",{className:"vm-legend-item-stats-row__value",children:s[e]})]},t)))})]})},Ih=e=>{let{labels:t,query:n,isAnomalyView:a,onChange:o}=e;const i=(0,r.useMemo)((()=>Array.from(new Set(t.map((e=>e.group))))),[t]),l=i.length>1;return Nt(Ct.FK,{children:Nt("div",{className:"vm-legend",children:i.map((e=>Nt("div",{className:"vm-legend-group",children:Nt(wo,{defaultExpanded:!0,title:Nt("div",{className:"vm-legend-group-title",children:[l&&Nt("span",{className:"vm-legend-group-title__count",children:["Query ",e,": "]}),Nt("span",{className:"vm-legend-group-title__query",children:n[e-1]})]}),children:Nt("div",{children:t.filter((t=>t.group===e)).sort(((e,t)=>(t.median||0)-(e.median||0))).map((e=>Nt(Lh,{legend:e,isAnomalyView:a,onChange:o},e.label)))})})},e)))})})},Ph=e=>{var t;let{min:n,max:a,legendValue:o,series:i}=e;const[l,s]=(0,r.useState)(0),[c,u]=(0,r.useState)(""),[d,h]=(0,r.useState)(""),[m,p]=(0,r.useState)(""),f=(0,r.useMemo)((()=>parseFloat(String((null===o||void 0===o?void 0:o.value)||0).replace("%",""))),[o]);return(0,r.useEffect)((()=>{s(f?(f-n)/(a-n)*100:0),u(f?"".concat(f,"%"):""),h("".concat(n,"%")),p("".concat(a,"%"))}),[f,n,a]),Nt("div",{className:"vm-legend-heatmap__wrapper",children:[Nt("div",{className:"vm-legend-heatmap",children:[Nt("div",{className:"vm-legend-heatmap-gradient",style:{background:"linear-gradient(to right, ".concat(Xd.join(", "),")")},children:!!f&&Nt("div",{className:"vm-legend-heatmap-gradient__value",style:{left:"".concat(l,"%")},children:Nt("span",{children:c})})}),Nt("div",{className:"vm-legend-heatmap__value",children:d}),Nt("div",{className:"vm-legend-heatmap__value",children:m})]}),i[1]&&Nt(Lh,{legend:i[1],isHeatmap:!0},null===(t=i[1])||void 0===t?void 0:t.label)]})},Oh=e=>{let{u:t,metrics:n,unit:a}=e;const[i,l]=(0,r.useState)({left:0,top:0}),[s,c]=(0,r.useState)([]),u=(0,r.useCallback)((()=>{var e;const{left:r,top:l}=i,s=it()(t,["data",1,0],[])||[],c=t?t.posToVal(r,"x"):0,u=t?t.posToVal(l,"y"):0,d=s.findIndex(((e,t)=>c>=e&&ce[0]===h))||[],v=s[d],g=o()(1e3*v).tz().format(Ot),y=o()(1e3*p).tz().format(Ot),_=(null===m||void 0===m||null===(e=m.metric)||void 0===e?void 0:e.vmrange)||"";return{unit:a,point:i,u:t,id:"".concat(_,"_").concat(g),dates:[g,y],value:"".concat(f,"%"),info:_,show:+f>0}}),[t,i,n,a]),d=(0,r.useCallback)((()=>{const e=u();e.show&&(s.find((t=>t.id===e.id))||c((t=>[...t,e])))}),[u,s]);return Ar("click",d),{stickyTooltips:s,handleUnStick:e=>{c((t=>t.filter((t=>t.id!==e))))},getTooltipProps:u,setCursor:e=>{const t=e.cursor.left||0,n=e.cursor.top||0;l({left:t,top:n})},resetTooltips:()=>{c([]),l({left:0,top:0})}}},Rh=e=>{let{data:t,metrics:n=[],period:a,unit:o,setPeriod:i,layoutSize:l,height:s,onChangeLegend:c}=e;const{isDarkTheme:u}=Mt(),d=(0,r.useRef)(null),[h,m]=(0,r.useState)(),{xRange:p,setPlotScale:f}=Eh({period:a,setPeriod:i}),{onReadyChart:v,isPanning:g}=xh(f);Ch({uPlotInst:h,xRange:p,setPlotScale:f});const{stickyTooltips:y,handleUnStick:_,getTooltipProps:b,setCursor:w,resetTooltips:k}=Oh({u:h,metrics:n,unit:o}),x=(0,r.useMemo)((()=>b()),[b]),S={...ph({width:l.width,height:s}),mode:2,series:[{},{paths:eh(),facets:[{scale:"x",auto:!0,sorted:1},{scale:"y",auto:!0}]}],axes:(()=>{const e=Yd([{}],o);return[...e,{scale:"y",stroke:e[0].stroke,font:e[0].font,size:Kd,splits:n.map(((e,t)=>t)),values:n.map((e=>e.metric.vmrange))}]})(),scales:{x:{time:!0},y:{log:2,time:!1,range:(e,t,n)=>[t-1,n+1]}},hooks:{ready:[v],setCursor:[w],setSelect:[_h(f)],destroy:[fh]}};return(0,r.useEffect)((()=>{k();const e=null===t[0]&&Array.isArray(t[1]);if(!d.current||!e)return;const n=new Fd(S,t,d.current);return m(n),n.destroy}),[d,t,u]),(0,r.useEffect)((()=>{h&&(h.setSize({width:l.width||400,height:s||500}),h.redraw())}),[s,l]),(0,r.useEffect)((()=>{c(x)}),[x]),Nt("div",{className:Cr()({"vm-line-chart":!0,"vm-line-chart_panning":g}),style:{minWidth:"".concat(l.width||400,"px"),minHeight:"".concat(s||500,"px")},children:[Nt("div",{className:"vm-line-chart__u-plot",ref:d}),Nt(Mh,{showTooltip:!!x.show,tooltipProps:x,stickyTooltips:y,handleUnStick:_})]})},Dh=()=>{const[e,t]=(0,r.useState)(null),[n,a]=(0,r.useState)({width:0,height:0}),o=(0,r.useCallback)((()=>{a({width:(null===e||void 0===e?void 0:e.offsetWidth)||0,height:(null===e||void 0===e?void 0:e.offsetHeight)||0})}),[null===e||void 0===e?void 0:e.offsetHeight,null===e||void 0===e?void 0:e.offsetWidth]);return Ar("resize",o),(0,r.useEffect)(o,[null===e||void 0===e?void 0:e.offsetHeight,null===e||void 0===e?void 0:e.offsetWidth]),[t,n]},zh={[ht.yhat]:"yhat",[ht.yhatLower]:"yhat_upper - yhat_lower",[ht.yhatUpper]:"yhat_upper - yhat_lower",[ht.anomaly]:"anomalies",[ht.training]:"training data",[ht.actual]:"y"},Fh=e=>{let{series:t}=e;const n=(0,r.useMemo)((()=>{const e=t.reduce(((e,t)=>{const n=Object.prototype.hasOwnProperty.call(t,"forecast"),r=t.forecast!==ht.yhatUpper,a=!e.find((e=>e.forecast===t.forecast));return n&&a&&r&&e.push(t),e}),[]),n={...e[0],forecast:ht.training,color:Gd[ht.training]};return e.splice(1,0,n),e.map((e=>({...e,color:"string"===typeof e.stroke?e.stroke:Gd[e.forecast||ht.actual]})))}),[t]);return Nt(Ct.FK,{children:Nt("div",{className:"vm-legend-anomaly",children:n.filter((e=>e.forecast!==ht.training)).map(((e,t)=>{var n;return Nt("div",{className:"vm-legend-anomaly-item",children:[Nt("svg",{children:e.forecast===ht.anomaly?Nt("circle",{cx:"15",cy:"7",r:"4",fill:e.color,stroke:e.color,strokeWidth:"1.4"}):Nt("line",{x1:"0",y1:"7",x2:"30",y2:"7",stroke:e.color,strokeWidth:e.width||1,strokeDasharray:null===(n=e.dash)||void 0===n?void 0:n.join(",")})}),Nt("div",{className:"vm-legend-anomaly-item__title",children:zh[e.forecast||ht.actual]})]},"".concat(t,"_").concat(e.forecast))}))})})},jh=e=>{let{data:t=[],period:n,customStep:a,query:o,yaxis:i,unit:l,showLegend:s=!0,setYaxisLimits:c,setPeriod:u,alias:d=[],fullWidth:h=!0,height:m,isHistogram:p,isAnomalyView:f,spanGaps:v}=e;const{isMobile:g}=ea(),{timezone:y}=fn(),_=(0,r.useMemo)((()=>a||n.step||"1s"),[n.step,a]),b=(0,r.useMemo)((()=>rh(t,p)),[p,t]),[w,k]=(0,r.useState)([[]]),[x,S]=(0,r.useState)([]),[C,E]=(0,r.useState)([]),[N,A]=(0,r.useState)([]),[M,T]=(0,r.useState)(null),L=(0,r.useMemo)((()=>oh(b,N,d,f)),[b,N,d,f]),I=e=>{const t=((e,t)=>{const n={},r=Object.values(e).flat(),a=Hd(r)||0,o=jd(r)||1;return n[1]=t?Wd(a,o):[a,o],n})(e,!p);c(t)},P=e=>{if(!f)return e;const t=function(e,t){const n=e.reduce(((e,n)=>{const r=t.map((e=>"".concat(e,": ").concat(n[e]||"-"))).join("|");return(e[r]=e[r]||[]).push(n),e}),{});return Object.entries(n).map((e=>{let[t,n]=e;return{keys:t.split("|"),values:n}}))}(e,["group","label"]);return t.map((e=>{const t=e.values[0];return{...t,freeFormFields:{...t.freeFormFields,__name__:""}}}))};(0,r.useEffect)((()=>{const e=[],t={},r=[],a=[{}];null===b||void 0===b||b.forEach(((n,o)=>{const i=L(n,o);a.push(i),r.push(lh(i,n.group));const l=t[n.group]||[];for(const t of n.values)e.push(t[0]),l.push(Nl(t[1]));t[n.group]=l}));const o=((e,t,n)=>{const r=Qt(t)||1,a=Array.from(new Set(e)).sort(((e,t)=>e-t));let o=n.start;const i=qt(n.end+r);let l=0;const s=[];for(;o<=i;){for(;l=a.length||a[l]>o)&&s.push(o)}for(;s.length<2;)s.push(o),o=qt(o+r);return s})(e,_,n),i=b.map((e=>{const t=[],n=e.values,r=n.length;let a=0;for(const u of o){for(;anull!==e)),l=Math.abs((e=>{let t=e[0],n=1;for(let r=1;r1e10*c&&!f?t.map((()=>l)):t}));i.unshift(o),I(t);const l=p?(e=>{const t=e.slice(1,e.length),n=[],r=[];t.forEach(((e,n)=>{e.forEach(((e,a)=>{const o=a*t.length+n;r[o]=e}))})),e[0].forEach((e=>{const r=new Array(t.length).fill(e);n.push(...r)}));const a=new Array(n.length).fill(0).map(((e,n)=>n%t.length));return[null,[n,a,r]]})(i):i;k(l),S(a);const s=P(r);E(s),f&&A(s.map((e=>e.label||"")).slice(1))}),[b,y,p]),(0,r.useEffect)((()=>{const e=[],t=[{}];null===b||void 0===b||b.forEach(((n,r)=>{const a=L(n,r);t.push(a),e.push(lh(a,n.group))})),S(t),E(P(e))}),[N]);const[O,R]=Dh();return Nt("div",{className:Cr()({"vm-graph-view":!0,"vm-graph-view_full-width":h,"vm-graph-view_full-width_mobile":h&&g}),ref:O,children:[!p&&Nt(Th,{data:w,series:x,metrics:b,period:n,yaxis:i,unit:l,setPeriod:u,layoutSize:R,height:m,isAnomalyView:f,spanGaps:v}),p&&Nt(Rh,{data:w,metrics:b,period:n,unit:l,setPeriod:u,layoutSize:R,height:m,onChangeLegend:T}),f&&s&&Nt(Fh,{series:x}),!p&&s&&Nt(Ih,{labels:C,query:o,isAnomalyView:f,onChange:(e,t)=>{A((e=>{let{hideSeries:t,legend:n,metaKey:r,series:a,isAnomalyView:o}=e;const{label:i}=n,l=sh(i,t),s=a.map((e=>e.label||""));return o?s.filter((e=>e!==i)):r?l?t.filter((e=>e!==i)):[...t,i]:t.length?l?[...s.filter((e=>e!==i))]:[]:[...s.filter((e=>e!==i))]})({hideSeries:N,legend:e,metaKey:t,series:x,isAnomalyView:f}))}}),p&&s&&Nt(Ph,{series:x,min:i.limits.range[1][0]||0,max:i.limits.range[1][1]||0,legendValue:M})]})},Hh=e=>{let{yaxis:t,setYaxisLimits:n,toggleEnableLimits:a}=e;const{isMobile:o}=ea(),i=(0,r.useMemo)((()=>Object.keys(t.limits.range)),[t.limits.range]),l=(0,r.useCallback)($o()(((e,r,a)=>{const o=t.limits.range;o[r][a]=+e,o[r][0]===o[r][1]||o[r][0]>o[r][1]||n(o)}),500),[t.limits.range]),s=(e,t)=>n=>{l(n,e,t)};return Nt("div",{className:Cr()({"vm-axes-limits":!0,"vm-axes-limits_mobile":o}),children:[Nt(Mo,{value:t.limits.enable,onChange:a,label:"Fix the limits for y-axis",fullWidth:o}),Nt("div",{className:"vm-axes-limits-list",children:i.map((e=>Nt("div",{className:"vm-axes-limits-list__inputs",children:[Nt(Ya,{label:"Min ".concat(e),type:"number",disabled:!t.limits.enable,value:t.limits.range[e][0],onChange:s(e,0)}),Nt(Ya,{label:"Max ".concat(e),type:"number",disabled:!t.limits.enable,value:t.limits.range[e][1],onChange:s(e,1)})]},e)))})]})},Vh=e=>{let{spanGaps:t,onChange:n}=e;const{isMobile:r}=ea();return Nt("div",{children:Nt(Mo,{value:t,onChange:n,label:"Connect null values",fullWidth:r})})},$h="Graph settings",Uh=e=>{let{yaxis:t,setYaxisLimits:n,toggleEnableLimits:a,spanGaps:o}=e;const i=(0,r.useRef)(null),l=(0,r.useRef)(null),{value:s,toggle:c,setFalse:u}=ca(!1);return Nt("div",{className:"vm-graph-settings",children:[Nt(ya,{title:$h,children:Nt("div",{ref:l,children:Nt(la,{variant:"text",startIcon:Nt(Ln,{}),onClick:c,ariaLabel:"settings"})})}),Nt(sa,{open:s,buttonRef:l,placement:"bottom-right",onClose:u,title:$h,children:Nt("div",{className:"vm-graph-settings-popper",ref:i,children:Nt("div",{className:"vm-graph-settings-popper__body",children:[Nt(Hh,{yaxis:t,setYaxisLimits:n,toggleEnableLimits:a}),Nt(Vh,{spanGaps:o.value,onChange:o.onChange})]})})})]})},Bh=e=>{let{isHistogram:t,graphData:n,controlsRef:a,isAnomalyView:o}=e;const{isMobile:i}=ea(),{customStep:l,yaxis:s,spanGaps:c}=Ur(),{period:u}=fn(),{query:d}=Cn(),h=vn(),m=Br(),p=e=>{m({type:"SET_YAXIS_LIMITS",payload:e})},f=Nt("div",{className:"vm-custom-panel-body-header__graph-controls",children:[Nt(xa,{}),Nt(Uh,{yaxis:s,setYaxisLimits:p,toggleEnableLimits:()=>{m({type:"TOGGLE_ENABLE_YAXIS_LIMITS"})},spanGaps:{value:c,onChange:e=>{m({type:"SET_SPAN_GAPS",payload:e})}}})]});return Nt(Ct.FK,{children:[a.current&&(0,r.createPortal)(f,a.current),Nt(jh,{data:n,period:u,customStep:l,query:d,yaxis:s,setYaxisLimits:p,setPeriod:e=>{let{from:t,to:n}=e;h({type:"SET_PERIOD",payload:{from:t,to:n}})},height:i?.5*window.innerHeight:500,isHistogram:t,isAnomalyView:o,spanGaps:c})]})},qh=e=>{let{data:t}=e;const n=fl(),a=(0,r.useMemo)((()=>{const e=t.map((e=>1===Object.keys(e).length?JSON.stringify(e):JSON.stringify(e,null,2))).join(",\n").replace(/^/gm,"".concat(" "));return"[\n".concat(e,"\n]")}),[t]);return Nt("div",{className:"vm-json-view",children:[Nt("div",{className:"vm-json-view__copy",children:Nt(la,{variant:"outlined",onClick:async()=>{await n(a,"Formatted JSON has been copied")},children:"Copy JSON"})}),Nt("pre",{className:"vm-json-view__code",children:Nt("code",{children:a})})]})},Yh=e=>{const t={};return e.forEach((e=>Object.entries(e.metric).forEach((e=>t[e[0]]?t[e[0]].options.add(e[1]):t[e[0]]={options:new Set([e[1]])})))),Object.entries(t).map((e=>({key:e[0],variations:e[1].options.size}))).sort(((e,t)=>e.variations-t.variations))},Wh=(e,t)=>(0,r.useMemo)((()=>{if(!t)return[];return Yh(e).filter((e=>t.includes(e.key)))}),[e,t]),Kh=e=>{let{data:t,displayColumns:n}=e;const a=fl(),{isMobile:o}=ea(),{tableCompact:i}=Fr(),l=(0,r.useRef)(null),[s,c]=(0,r.useState)(""),[u,d]=(0,r.useState)("asc"),h=i?Wh([{group:0,metric:{Data:"Data"}}],["Data"]):Wh(t,n),m=e=>{const{__name__:t,...n}=e;return t||Object.keys(n).length?t?"".concat(t," ").concat(JSON.stringify(n)):"".concat(JSON.stringify(n)):""},p=new Set(null===t||void 0===t?void 0:t.map((e=>e.group))).size>1,f=(0,r.useMemo)((()=>{const e=null===t||void 0===t?void 0:t.map((e=>({metadata:h.map((t=>i?El(e,"",p):e.metric[t.key]||"-")),value:e.value?e.value[1]:"-",values:e.values?e.values.map((e=>{let[t,n]=e;return"".concat(n," @").concat(t)})):[],copyValue:m(e.metric)}))),n="Value"===s,r=h.findIndex((e=>e.key===s));return n||-1!==r?e.sort(((e,t)=>{const a=n?Number(e.value):e.metadata[r],o=n?Number(t.value):t.metadata[r];return("asc"===u?ao)?-1:1})):e}),[h,t,s,u,i]),v=(0,r.useMemo)((()=>f.some((e=>e.copyValue))),[f]),g=e=>()=>{(e=>{d((t=>"asc"===t&&s===e?"desc":"asc")),c(e)})(e)};return f.length?Nt("div",{className:Cr()({"vm-table-view":!0,"vm-table-view_mobile":o}),children:Nt("table",{className:"vm-table",ref:l,children:[Nt("thead",{className:"vm-table-header",children:Nt("tr",{className:"vm-table__row vm-table__row_header",children:[h.map(((e,t)=>Nt("td",{className:"vm-table-cell vm-table-cell_header vm-table-cell_sort",onClick:g(e.key),children:Nt("div",{className:"vm-table-cell__content",children:[e.key,Nt("div",{className:Cr()({"vm-table__sort-icon":!0,"vm-table__sort-icon_active":s===e.key,"vm-table__sort-icon_desc":"desc"===u&&s===e.key}),children:Nt(Hn,{})})]})},t))),Nt("td",{className:"vm-table-cell vm-table-cell_header vm-table-cell_right vm-table-cell_sort",onClick:g("Value"),children:Nt("div",{className:"vm-table-cell__content",children:[Nt("div",{className:Cr()({"vm-table__sort-icon":!0,"vm-table__sort-icon_active":"Value"===s,"vm-table__sort-icon_desc":"desc"===u}),children:Nt(Hn,{})}),"Value"]})}),v&&Nt("td",{className:"vm-table-cell vm-table-cell_header"})]})}),Nt("tbody",{className:"vm-table-body",children:f.map(((e,t)=>{return Nt("tr",{className:"vm-table__row",children:[e.metadata.map(((e,n)=>Nt("td",{className:Cr()({"vm-table-cell vm-table-cell_no-wrap":!0,"vm-table-cell_gray":f[t-1]&&f[t-1].metadata[n]===e}),children:e},n))),Nt("td",{className:"vm-table-cell vm-table-cell_right vm-table-cell_no-wrap",children:e.values.length?e.values.map((e=>Nt("p",{children:e},e))):e.value}),v&&Nt("td",{className:"vm-table-cell vm-table-cell_right",children:e.copyValue&&Nt("div",{className:"vm-table-cell__content",children:Nt(ya,{title:"Copy row",children:Nt(la,{variant:"text",color:"gray",size:"small",startIcon:Nt(rr,{}),onClick:(n=e.copyValue,async()=>{await a(n,"Row has been copied")}),ariaLabel:"copy row"})})})})]},t);var n}))})]})}):Nt(na,{variant:"warning",children:"No data to show"})},Qh=e=>{let{checked:t=!1,disabled:n=!1,label:r,color:a="secondary",onChange:o}=e;return Nt("div",{className:Cr()({"vm-checkbox":!0,"vm-checkbox_disabled":n,"vm-checkbox_active":t,["vm-checkbox_".concat(a,"_active")]:t,["vm-checkbox_".concat(a)]:a}),onClick:()=>{n||o(!t)},children:[Nt("div",{className:"vm-checkbox-track",children:Nt("div",{className:"vm-checkbox-track__thumb",children:Nt(Xn,{})})}),r&&Nt("span",{className:"vm-checkbox__label",children:r})]})},Zh="Table settings",Gh=e=>{let{columns:t,defaultColumns:n=[],tableCompact:a,onChangeColumns:o,toggleTableCompact:i}=e;const{isMobile:l}=ea(),s=(0,r.useRef)(null),{value:c,toggle:u,setFalse:d}=ca(!1),{value:h,toggle:m}=ca(!1),[p,f]=(0,r.useState)(""),[v,g]=(0,r.useState)(-1),y=(0,r.useMemo)((()=>p?t.filter((e=>e.includes(p))):t),[t,p]),_=(0,r.useMemo)((()=>y.every((e=>n.includes(e)))),[n,y]),b=(0,r.useMemo)((()=>!t.length),[t]),w=e=>{o(n.includes(e)?n.filter((t=>t!==e)):[...n,e])};return(0,r.useEffect)((()=>{pl(t,n)||o(t)}),[t]),Nt("div",{className:"vm-table-settings",children:[Nt(ya,{title:Zh,children:Nt("div",{ref:s,children:Nt(la,{variant:"text",startIcon:Nt(Ln,{}),onClick:u,disabled:b,ariaLabel:Zh})})}),Nt(sa,{open:c,onClose:d,placement:"bottom-right",buttonRef:s,title:Zh,children:Nt("div",{className:Cr()({"vm-table-settings-popper":!0,"vm-table-settings-popper_mobile":l}),children:[Nt("div",{className:"vm-table-settings-popper-list vm-table-settings-popper-list_first",children:Nt(Mo,{label:"Compact view",value:a,onChange:i})}),Nt("div",{className:"vm-table-settings-popper-list",children:Nt("div",{children:[Nt("div",{className:"vm-table-settings-popper-list-header",children:[Nt("h3",{className:"vm-table-settings-popper-list-header__title",children:"Display columns"}),Nt(ya,{title:"search column",children:Nt(la,{color:"primary",variant:"text",onClick:m,startIcon:Nt(xr,{}),ariaLabel:"reset columns"})})]}),h&&Nt(Ya,{placeholder:"search column",startIcon:Nt(xr,{}),value:p,onChange:f,onBlur:()=>{g(-1)},onKeyDown:e=>{const t="ArrowUp"===e.key,n="ArrowDown"===e.key,r="Enter"===e.key;(n||t||r)&&e.preventDefault(),n?g((e=>e+1>y.length-1?e:e+1)):t?g((e=>e-1<0?e:e-1)):r&&w(y[v])},type:"search"}),!y.length&&Nt("p",{className:"vm-table-settings-popper-list__no-found",children:"No columns found"}),Nt("div",{className:"vm-table-settings-popper-list-header",children:!!y.length&&Nt("div",{className:"vm-table-settings-popper-list__item vm-table-settings-popper-list__item_check_all",children:Nt(Qh,{checked:_,onChange:()=>{o(_?n.filter((e=>!y.includes(e))):y)},label:_?"Uncheck all":"Check all",disabled:a})})}),Nt("div",{className:"vm-table-settings-popper-list-columns",children:y.map(((e,t)=>{return Nt("div",{className:Cr()({"vm-table-settings-popper-list__item":!0,"vm-table-settings-popper-list__item_focus":t===v}),children:Nt(Qh,{checked:n.includes(e),onChange:(r=e,()=>{w(r)}),label:e,disabled:a})},e);var r}))})]})})]})})]})},Jh=e=>{let{liveData:t,controlsRef:n}=e;const{tableCompact:a}=Fr(),o=jr(),[i,l]=(0,r.useState)(),s=(0,r.useMemo)((()=>Yh(t||[]).map((e=>e.key))),[t]),c=Nt(Gh,{columns:s,defaultColumns:i,onChangeColumns:l,tableCompact:a,toggleTableCompact:()=>{o({type:"TOGGLE_TABLE_COMPACT"})}});return Nt(Ct.FK,{children:[n.current&&(0,r.createPortal)(c,n.current),Nt(Kh,{data:t,displayColumns:i})]})},Xh=e=>{let{graphData:t,liveData:n,isHistogram:r,displayType:a,controlsRef:o}=e;return a===mt.code&&n?Nt(qh,{data:n}):a===mt.table&&n?Nt(Jh,{liveData:n,controlsRef:o}):a===mt.chart&&t?Nt(Bh,{graphData:t,isHistogram:r,controlsRef:o}):null},em=[Nt(Ct.FK,{children:[Nt("p",{children:"Filename - specify the name for your report file."}),Nt("p",{children:["Default format: ",Nt("code",{children:["vmui_report_$",Dt,".json"]}),"."]}),Nt("p",{children:"This name will be used when saving your report on your device."})]}),Nt(Ct.FK,{children:[Nt("p",{children:"Comment (optional) - add a comment to your report."}),Nt("p",{children:"This can be any additional information that will be useful when reviewing the report later."})]}),Nt(Ct.FK,{children:[Nt("p",{children:"Query trace - enable this option to include a query trace in your report."}),Nt("p",{children:"This will assist in analyzing and diagnosing the query processing."})]}),Nt(Ct.FK,{children:[Nt("p",{children:"Generate Report - click this button to generate and save your report. "}),Nt("p",{children:["After creation, the report can be downloaded and examined on the ",Nt(Re,{to:We.queryAnalyzer,target:"_blank",rel:"noreferrer",className:"vm-link vm-link_underlined",children:Ye[We.queryAnalyzer].title})," page."]})]})],tm=()=>"vmui_report_".concat(o()().utc().format(Dt)),nm=e=>{let{fetchUrl:t}=e;const{query:n}=Cn(),[a,o]=(0,r.useState)(tm()),[i,l]=(0,r.useState)(""),[s,c]=(0,r.useState)(!0),[u,d]=(0,r.useState)(),[h,m]=(0,r.useState)(!1),p=(0,r.useRef)(null),f=(0,r.useRef)(null),v=(0,r.useRef)(null),g=(0,r.useRef)(null),y=[p,f,v,g],[_,b]=(0,r.useState)(0),{value:w,toggle:k,setFalse:x}=ca(!1),{value:S,toggle:C,setFalse:E}=ca(!1),N=(0,r.useMemo)((()=>{if(t)return t.map(((e,t)=>{const n=new URL(e);return s?n.searchParams.set("trace","1"):n.searchParams.delete("trace"),{id:t,url:n}}))}),[t,s]),A=(0,r.useCallback)((e=>{const t=JSON.stringify(e,null,2),n=new Blob([t],{type:"application/json"}),r=URL.createObjectURL(n),o=document.createElement("a");o.href=r,o.download="".concat(a||tm(),".json"),document.body.appendChild(o),o.click(),document.body.removeChild(o),URL.revokeObjectURL(r),x()}),[a]),M=(0,r.useCallback)((async()=>{if(N){d(""),m(!0);try{const e=[];for await(const{url:t,id:n}of N){const r=await fetch(t),a=await r.json();if(r.ok)a.vmui={id:n,comment:i,params:at().parse(new URL(t).search.replace(/^\?/,""))},e.push(a);else{const e=a.errorType?"".concat(a.errorType,"\r\n"):"";d("".concat(e).concat((null===a||void 0===a?void 0:a.error)||(null===a||void 0===a?void 0:a.message)||"unknown error"))}}e.length&&A(e)}catch(Lp){Lp instanceof Error&&"AbortError"!==Lp.name&&d("".concat(Lp.name,": ").concat(Lp.message))}finally{m(!1)}}else d(pt.validQuery)}),[N,i,A,n]),T=e=>()=>{b((t=>t+e))};return(0,r.useEffect)((()=>{d(""),o(tm()),l("")}),[w]),(0,r.useEffect)((()=>{b(0)}),[S]),Nt(Ct.FK,{children:[Nt(ya,{title:"Export query",children:Nt(la,{variant:"text",startIcon:Nt(br,{}),onClick:k,ariaLabel:"export query"})}),w&&Nt(ga,{title:"Export query",onClose:x,isOpen:w,children:Nt("div",{className:"vm-download-report",children:[Nt("div",{className:"vm-download-report-settings",children:[Nt("div",{ref:p,children:Nt(Ya,{label:"Filename",value:a,onChange:o})}),Nt("div",{ref:f,children:Nt(Ya,{type:"textarea",label:"Comment",value:i,onChange:l})}),Nt("div",{ref:v,children:Nt(Qh,{checked:s,onChange:c,label:"Include query trace"})})]}),u&&Nt(na,{variant:"error",children:u}),Nt("div",{className:"vm-download-report__buttons",children:[Nt(la,{variant:"text",onClick:C,children:"Help"}),Nt("div",{ref:g,children:Nt(la,{onClick:M,disabled:h,children:h?"Loading data...":"Generate Report"})})]}),Nt(sa,{open:S,buttonRef:y[_],placement:"top-left",variant:"dark",onClose:E,children:Nt("div",{className:"vm-download-report-helper",children:[Nt("div",{className:"vm-download-report-helper__description",children:em[_]}),Nt("div",{className:"vm-download-report-helper__buttons",children:[0!==_&&Nt(la,{onClick:T(-1),size:"small",color:"white",children:"Prev"}),Nt(la,{onClick:_===y.length-1?E:T(1),size:"small",color:"white",variant:"text",children:_===y.length-1?"Close":"Next"})]})]})})]})})]})},rm=()=>{Ll();const{isMobile:e}=ea(),{displayType:t}=Fr(),{query:n}=Cn(),{customStep:a}=Ur(),o=Br(),[i,l]=(0,r.useState)([]),[s,c]=(0,r.useState)(!n[0]),[u,d]=(0,r.useState)(!1),h=(0,r.useRef)(null),{fetchUrl:m,isLoading:p,liveData:f,graphData:v,error:g,queryErrors:y,setQueryErrors:_,queryStats:b,warning:w,traces:k,isHistogram:x}=Tl({visible:!0,customStep:a,hideQuery:i,showAllSeries:u}),S=!(null!==f&&void 0!==f&&f.length)&&t!==mt.chart,C=!s&&g;return(0,r.useEffect)((()=>{o({type:"SET_IS_HISTOGRAM",payload:x})}),[v]),Nt("div",{className:Cr()({"vm-custom-panel":!0,"vm-custom-panel_mobile":e}),children:[Nt(xl,{queryErrors:s?[]:y,setQueryErrors:_,setHideError:c,stats:b,onHideQuery:e=>{l(e)},onRunQuery:()=>{c(!1)}}),Nt(Vl,{traces:k,displayType:t}),p&&Nt(wl,{}),C&&Nt(na,{variant:"error",children:g}),S&&Nt(na,{variant:"info",children:Nt(Rl,{})}),w&&Nt($l,{warning:w,query:n,onChange:d}),Nt("div",{className:Cr()({"vm-custom-panel-body":!0,"vm-custom-panel-body_mobile":e,"vm-block":!0,"vm-block_mobile":e}),children:[Nt("div",{className:"vm-custom-panel-body-header",ref:h,children:[Nt("div",{className:"vm-custom-panel-body-header__tabs",children:Nt(Ir,{})}),(v||f)&&Nt(nm,{fetchUrl:m})]}),Nt(Xh,{graphData:v,liveData:f,isHistogram:x,displayType:t,controlsRef:h})]})]})},am=e=>{let{title:t,description:n,unit:a,expr:o,showLegend:i,filename:l,alias:s}=e;const{isMobile:c}=ea(),{period:u}=fn(),{customStep:d}=Ur(),h=vn(),m=(0,r.useRef)(null),[p,f]=(0,r.useState)(!1),[v,g]=(0,r.useState)(!1),[y,_]=(0,r.useState)({limits:{enable:!1,range:{1:[0,0]}}}),b=(0,r.useMemo)((()=>Array.isArray(o)&&o.every((e=>e))),[o]),{isLoading:w,graphData:k,error:x,warning:S}=Tl({predefinedQuery:b?o:[],display:mt.chart,visible:p,customStep:d}),C=e=>{const t={...y};t.limits.range=e,_(t)};if((0,r.useEffect)((()=>{const e=new IntersectionObserver((e=>{e.forEach((e=>f(e.isIntersecting)))}),{threshold:.1});return m.current&&e.observe(m.current),()=>{m.current&&e.unobserve(m.current)}}),[m]),!b)return Nt(na,{variant:"error",children:[Nt("code",{children:'"expr"'})," not found. Check the configuration file ",Nt("b",{children:l}),"."]});const E=()=>Nt("div",{className:"vm-predefined-panel-header__description vm-default-styles",children:[n&&Nt(Ct.FK,{children:[Nt("div",{children:[Nt("span",{children:"Description:"}),Nt("div",{dangerouslySetInnerHTML:{__html:rl(n)}})]}),Nt("hr",{})]}),Nt("div",{children:[Nt("span",{children:"Queries:"}),Nt("div",{children:o.map(((e,t)=>Nt("div",{children:e},"".concat(t,"_").concat(e))))})]})]});return Nt("div",{className:"vm-predefined-panel",ref:m,children:[Nt("div",{className:"vm-predefined-panel-header",children:[Nt(ya,{title:Nt(E,{}),children:Nt("div",{className:"vm-predefined-panel-header__info",children:Nt(On,{})})}),Nt("h3",{className:"vm-predefined-panel-header__title",children:t||""}),Nt(Uh,{yaxis:y,setYaxisLimits:C,toggleEnableLimits:()=>{const e={...y};e.limits.enable=!e.limits.enable,_(e)},spanGaps:{value:v,onChange:g}})]}),Nt("div",{className:"vm-predefined-panel-body",children:[w&&Nt(wl,{}),x&&Nt(na,{variant:"error",children:x}),S&&Nt(na,{variant:"warning",children:S}),k&&Nt(jh,{data:k,period:u,customStep:d,query:o,yaxis:y,unit:a,alias:s,showLegend:i,setYaxisLimits:C,setPeriod:e=>{let{from:t,to:n}=e;h({type:"SET_PERIOD",payload:{from:t,to:n}})},fullWidth:!1,height:c?.5*window.innerHeight:500,spanGaps:v})]})]})},om=e=>{let{index:t,title:n,panels:a,filename:o}=e;const i=Mr(),l=(0,r.useMemo)((()=>i.width/12),[i]),[s,c]=(0,r.useState)(!t),[u,d]=(0,r.useState)([]);(0,r.useEffect)((()=>{d(a&&a.map((e=>e.width||12)))}),[a]);const[h,m]=(0,r.useState)({start:0,target:0,enable:!1}),p=(0,r.useCallback)((e=>{if(!h.enable)return;const{start:t}=h,n=Math.ceil((t-e.clientX)/l);if(Math.abs(n)>=12)return;const r=u.map(((e,t)=>e-(t===h.target?n:0)));d(r)}),[h,l]),f=(0,r.useCallback)((()=>{m({...h,enable:!1})}),[h]),v=e=>t=>{((e,t)=>{m({start:e.clientX,target:t,enable:!0})})(t,e)};Ar("mousemove",p),Ar("mouseup",f);return Nt("div",{className:"vm-predefined-dashboard",children:Nt(wo,{defaultExpanded:s,onChange:e=>c(e),title:Nt((()=>Nt("div",{className:Cr()({"vm-predefined-dashboard-header":!0,"vm-predefined-dashboard-header_open":s}),children:[(n||o)&&Nt("span",{className:"vm-predefined-dashboard-header__title",children:n||"".concat(t+1,". ").concat(o)}),a&&Nt("span",{className:"vm-predefined-dashboard-header__count",children:["(",a.length," panels)"]})]})),{}),children:Nt("div",{className:"vm-predefined-dashboard-panels",children:Array.isArray(a)&&a.length?a.map(((e,t)=>Nt("div",{className:"vm-predefined-dashboard-panels-panel vm-block vm-block_empty-padding",style:{gridColumn:"span ".concat(u[t])},children:[Nt(am,{title:e.title,description:e.description,unit:e.unit,expr:e.expr,alias:e.alias,filename:o,showLegend:e.showLegend}),Nt("button",{className:"vm-predefined-dashboard-panels-panel__resizer",onMouseDown:v(t),"aria-label":"resize the panel"})]},t))):Nt("div",{className:"vm-predefined-dashboard-panels-panel__alert",children:Nt(na,{variant:"error",children:[Nt("code",{children:'"panels"'})," not found. Check the configuration file ",Nt("b",{children:o}),"."]})})})})})};function im(e){return function(e,t){return Object.fromEntries(Object.entries(e).filter(t))}(e,(e=>!!e[1]||"number"===typeof e[1]))}const lm=()=>{(()=>{const{duration:e,relativeTime:t,period:{date:n}}=fn(),{customStep:a}=Ur(),{setSearchParamsFromKeys:o}=uo(),i=()=>{const r=im({"g0.range_input":e,"g0.end_input":n,"g0.step_input":a,"g0.relative_time":t});o(r)};(0,r.useEffect)(i,[e,t,n,a]),(0,r.useEffect)(i,[])})();const{isMobile:e}=ea(),{dashboardsSettings:t,dashboardsLoading:n,dashboardsError:a}=Kr(),[o,i]=(0,r.useState)(0),l=(0,r.useMemo)((()=>t.map(((e,t)=>({label:e.title||"",value:t})))),[t]),s=(0,r.useMemo)((()=>t[o]||{}),[t,o]),c=(0,r.useMemo)((()=>null===s||void 0===s?void 0:s.rows),[s]),u=(0,r.useMemo)((()=>s.title||s.filename||""),[s]),d=(0,r.useMemo)((()=>Array.isArray(c)&&!!c.length),[c]),h=e=>()=>{(e=>{i(e)})(e)};return Nt("div",{className:"vm-predefined-panels",children:[n&&Nt(wl,{}),!t.length&&a&&Nt(na,{variant:"error",children:a}),!t.length&&Nt(na,{variant:"info",children:"Dashboards not found"}),l.length>1&&Nt("div",{className:Cr()({"vm-predefined-panels-tabs":!0,"vm-predefined-panels-tabs_mobile":e}),children:l.map((e=>Nt("div",{className:Cr()({"vm-predefined-panels-tabs__tab":!0,"vm-predefined-panels-tabs__tab_active":e.value==o}),onClick:h(e.value),children:e.label},e.value)))}),Nt("div",{className:"vm-predefined-panels__dashboards",children:[d&&c.map(((e,t)=>Nt(om,{index:t,filename:u,title:e.title,panels:e.panels},"".concat(o,"_").concat(t)))),!!t.length&&!d&&Nt(na,{variant:"error",children:[Nt("code",{children:'"rows"'})," not found. Check the configuration file ",Nt("b",{children:u}),"."]})]})]})},sm=(e,t)=>{const n=t.match?"&match[]="+encodeURIComponent(t.match):"",r=t.focusLabel?"&focusLabel="+encodeURIComponent(t.focusLabel):"";return"".concat(e,"/api/v1/status/tsdb?topN=").concat(t.topN,"&date=").concat(t.date).concat(n).concat(r)};class cm{constructor(){this.tsdbStatus=void 0,this.tabsNames=void 0,this.isPrometheus=void 0,this.tsdbStatus=this.defaultTSDBStatus,this.tabsNames=["table","graph"],this.isPrometheus=!1,this.getDefaultState=this.getDefaultState.bind(this)}set tsdbStatusData(e){this.isPrometheus=!(null===e||void 0===e||!e.headStats),this.tsdbStatus=e}get tsdbStatusData(){return this.tsdbStatus}get defaultTSDBStatus(){return{totalSeries:0,totalSeriesPrev:0,totalSeriesByAll:0,totalLabelValuePairs:0,seriesCountByMetricName:[],seriesCountByLabelName:[],seriesCountByFocusLabelValue:[],seriesCountByLabelValuePair:[],labelValueCountByLabelName:[]}}get isPrometheusData(){return this.isPrometheus}keys(e,t){const n=e&&/__name__=".+"/.test(e),r=e&&/{.+=".+"}/g.test(e),a=e&&/__name__=".+", .+!=""/g.test(e);let o=[];return o=t||a?o.concat("seriesCountByFocusLabelValue"):n?o.concat("labelValueCountByLabelName"):r?o.concat("seriesCountByMetricName","seriesCountByLabelName"):o.concat("seriesCountByMetricName","seriesCountByLabelName","seriesCountByLabelValuePair","labelValueCountByLabelName"),o}getDefaultState(e,t){return this.keys(e,t).reduce(((e,t)=>({...e,tabs:{...e.tabs,[t]:this.tabsNames},containerRefs:{...e.containerRefs,[t]:(0,r.useRef)(null)}})),{tabs:{},containerRefs:{}})}sectionsTitles(e){return{seriesCountByMetricName:"Metric names with the highest number of series",seriesCountByLabelName:"Labels with the highest number of series",seriesCountByFocusLabelValue:'Values for "'.concat(e,'" label with the highest number of series'),seriesCountByLabelValuePair:"Label=value pairs with the highest number of series",labelValueCountByLabelName:"Labels with the highest number of unique values"}}get sectionsTips(){return{seriesCountByMetricName:"\n

    \n This table returns a list of metrics with the highest cardinality.\n The cardinality of a metric is the number of time series associated with that metric,\n where each time series is defined as a unique combination of key-value label pairs.\n

    \n

    \n When looking to reduce the number of active series in your data source,\n you can start by inspecting individual metrics with high cardinality\n (i.e. that have lots of active time series associated with them),\n since that single metric contributes a large fraction of the series that make up your total series count.\n

    ",seriesCountByLabelName:"\n

    \n This table returns a list of the labels with the highest number of series.\n

    \n

    \n Use this table to identify labels that are storing dimensions with high cardinality\n (many different label values).\n

    \n

    \n It is recommended to choose labels such that they have a finite set of values,\n since every unique combination of key-value label pairs creates a new time series\n and therefore can dramatically increase the number of time series in your system.\n

    ",seriesCountByFocusLabelValue:"\n

    \n This table returns a list of unique label values per selected label.\n

    \n

    \n Use this table to identify label values that are storing per each selected series.\n

    ",labelValueCountByLabelName:"\n

    \n This table returns a list of labels with the highest number of the unique values.\n

    \n ",seriesCountByLabelValuePair:"\n

    \n This table returns a list of the label values pairs with the highest number of series.\n

    \n

    \n Use this table to identify unique label values pairs. This helps to identify same labels \n is applied to count timeseries in your system, since every unique combination of key-value label pairs \n creates a new time series and therefore can dramatically increase the number of time series in your system\n

    "}}get tablesHeaders(){return{seriesCountByMetricName:um,seriesCountByLabelName:dm,seriesCountByFocusLabelValue:hm,seriesCountByLabelValuePair:mm,labelValueCountByLabelName:pm}}totalSeries(e){return"labelValueCountByLabelName"===e?-1:arguments.length>1&&void 0!==arguments[1]&&arguments[1]?this.tsdbStatus.totalSeriesPrev:this.tsdbStatus.totalSeries}}const um=[{id:"name",label:"Metric name"},{id:"value",label:"Number of series"},{id:"percentage",label:"Share in total",info:"Shows the share of a metric to the total number of series"},{id:"action",label:""}],dm=[{id:"name",label:"Label name"},{id:"value",label:"Number of series"},{id:"percentage",label:"Share in total",info:"Shows the share of the label to the total number of series"},{id:"action",label:""}],hm=[{id:"name",label:"Label value"},{id:"value",label:"Number of series"},{id:"percentage",label:"Share in total"},{disablePadding:!1,id:"action",label:"",numeric:!1}],mm=[{id:"name",label:"Label=value pair"},{id:"value",label:"Number of series"},{id:"percentage",label:"Share in total",info:"Shows the share of the label value pair to the total number of series"},{id:"action",label:""}],pm=[{id:"name",label:"Label name"},{id:"value",label:"Number of unique values"},{id:"action",label:""}],fm=()=>{const e=new cm,[t]=He(),n=t.get("match"),a=t.get("focusLabel"),i=+(t.get("topN")||10),l=t.get("date")||o()().tz().format(It),s=Ka(l),c=(0,r.useRef)(),{serverUrl:u}=Mt(),[d,h]=(0,r.useState)(!1),[m,p]=(0,r.useState)(),[f,v]=(0,r.useState)(e.defaultTSDBStatus),[g,y]=(0,r.useState)(!1),_=async e=>{const t=await fetch(e);if(t.ok)return await t.json();throw new Error("Request failed with status ".concat(t.status))},b=async t=>{if(!u)return;p(""),h(!0),v(e.defaultTSDBStatus);const r={...t,date:t.date,topN:0,match:"",focusLabel:""},a={...t,date:o()(t.date).subtract(1,"day").format(It)},i=[sm(u,t),sm(u,a)];s!==l&&(t.match||t.focusLabel)&&i.push(sm(u,r));try{var d,m,g,y,b,w,k,x,S,C;const[e,t,r]=await Promise.all(i.map(_)),a={...t.data},{data:o}=r||c.current||e;c.current={data:o};const l={...e.data,totalSeries:(null===(d=e.data)||void 0===d?void 0:d.totalSeries)||(null===(m=e.data)||void 0===m||null===(g=m.headStats)||void 0===g?void 0:g.numSeries)||0,totalLabelValuePairs:(null===(y=e.data)||void 0===y?void 0:y.totalLabelValuePairs)||(null===(b=e.data)||void 0===b||null===(w=b.headStats)||void 0===w?void 0:w.numLabelValuePairs)||0,seriesCountByLabelName:(null===(k=e.data)||void 0===k?void 0:k.seriesCountByLabelName)||[],seriesCountByFocusLabelValue:(null===(x=e.data)||void 0===x?void 0:x.seriesCountByFocusLabelValue)||[],totalSeriesByAll:(null===o||void 0===o?void 0:o.totalSeries)||(null===o||void 0===o||null===(S=o.headStats)||void 0===S?void 0:S.numSeries)||f.totalSeriesByAll||0,totalSeriesPrev:(null===a||void 0===a?void 0:a.totalSeries)||(null===a||void 0===a||null===(C=a.headStats)||void 0===C?void 0:C.numSeries)||0},s=null===n||void 0===n?void 0:n.replace(/[{}"]/g,"");l.seriesCountByLabelValuePair=l.seriesCountByLabelValuePair.filter((e=>e.name!==s)),((e,t)=>{Object.keys(e).forEach((n=>{const r=n,a=e[r],o=t[r];Array.isArray(a)&&Array.isArray(o)&&a.forEach((e=>{var t;const n=null===(t=o.find((t=>t.name===e.name)))||void 0===t?void 0:t.value;e.diff=n?e.value-n:0,e.valuePrev=n||0}))}))})(l,a),v(l),h(!1)}catch(Lp){h(!1),Lp instanceof Error&&p("".concat(Lp.name,": ").concat(Lp.message))}};return(0,r.useEffect)((()=>{b({topN:i,match:n,date:l,focusLabel:a})}),[u,n,a,i,l]),(0,r.useEffect)((()=>{m&&(v(e.defaultTSDBStatus),h(!1))}),[m]),(0,r.useEffect)((()=>{const e=Je(u);y(!!e)}),[u]),e.tsdbStatusData=f,{isLoading:d,appConfigurator:e,error:m,isCluster:g}},vm={seriesCountByMetricName:e=>{let{query:t}=e;return gm("__name__",t)},seriesCountByLabelName:e=>{let{query:t}=e;return"{".concat(t,'!=""}')},seriesCountByFocusLabelValue:e=>{let{query:t,focusLabel:n}=e;return gm(n,t)},seriesCountByLabelValuePair:e=>{let{query:t}=e;const n=t.split("="),r=n[0],a=n.slice(1).join("=");return gm(r,a)},labelValueCountByLabelName:e=>{let{query:t,match:n}=e;return""===n?"{".concat(t,'!=""}'):"".concat(n.replace("}",""),", ").concat(t,'!=""}')}},gm=(e,t)=>e?"{"+e+"="+JSON.stringify(t)+"}":"",ym=e=>{var t;let{totalSeries:n=0,totalSeriesPrev:r=0,totalSeriesAll:a=0,seriesCountByMetricName:o=[],isPrometheus:i}=e;const{isMobile:l}=ea(),[s]=He(),c=s.get("match"),u=s.get("focusLabel"),d=/__name__/.test(c||""),h=(null===(t=o[0])||void 0===t?void 0:t.value)/a*100,m=n-r,p=Math.abs(m)/r*100,f=[{title:"Total series",value:n.toLocaleString("en-US"),dynamic:n&&r&&!i?"".concat(p.toFixed(2),"%"):"",display:!u,info:'The total number of active time series. \n A time series is uniquely identified by its name plus a set of its labels. \n For example, temperature{city="NY",country="US"} and temperature{city="SF",country="US"} \n are two distinct series, since they differ by the city label.'},{title:"Percentage from total",value:isNaN(h)?"-":"".concat(h.toFixed(2),"%"),display:d,info:"The share of these series in the total number of time series."}].filter((e=>e.display));return f.length?Nt("div",{className:Cr()({"vm-cardinality-totals":!0,"vm-cardinality-totals_mobile":l}),children:f.map((e=>{let{title:t,value:n,info:a,dynamic:o}=e;return Nt("div",{className:"vm-cardinality-totals-card",children:[Nt("h4",{className:"vm-cardinality-totals-card__title",children:[t,a&&Nt(ya,{title:Nt("p",{className:"vm-cardinality-totals-card__tooltip",children:a}),children:Nt("div",{className:"vm-cardinality-totals-card__info-icon",children:Nt(On,{})})})]}),Nt("span",{className:"vm-cardinality-totals-card__value",children:n}),!!o&&Nt(ya,{title:"in relation to the previous day: ".concat(r.toLocaleString("en-US")),children:Nt("span",{className:Cr()({"vm-dynamic-number":!0,"vm-dynamic-number_positive vm-dynamic-number_down":m<0,"vm-dynamic-number_negative vm-dynamic-number_up":m>0}),children:o})})]},t)}))}):null},_m=(e,t)=>{const[n]=He(),a=n.get(t)?n.get(t):e,[o,i]=(0,r.useState)(a);return(0,r.useEffect)((()=>{a!==o&&i(a)}),[a]),[o,i]},bm=e=>{let{isPrometheus:t,isCluster:n,...a}=e;const{isMobile:o}=ea(),[i]=He(),{setSearchParamsFromKeys:l}=uo(),s=i.get("tips")||"",[c,u]=_m("","match"),[d,h]=_m("","focusLabel"),[m,p]=_m(10,"topN"),f=(0,r.useMemo)((()=>m<0?"Number must be bigger than zero":""),[m]),v=()=>{l({match:c,topN:m,focusLabel:d})};return(0,r.useEffect)((()=>{const e=i.get("match"),t=+(i.get("topN")||10),n=i.get("focusLabel");e!==c&&u(e||""),t!==m&&p(t),n!==d&&h(n||"")}),[i]),Nt("div",{className:Cr()({"vm-cardinality-configurator":!0,"vm-cardinality-configurator_mobile":o,"vm-block":!0,"vm-block_mobile":o}),children:[Nt("div",{className:"vm-cardinality-configurator-controls",children:[Nt("div",{className:"vm-cardinality-configurator-controls__query",children:Nt(Ya,{label:"Time series selector",type:"string",value:c,onChange:u,onEnter:v})}),Nt("div",{className:"vm-cardinality-configurator-controls__item",children:Nt(Ya,{label:"Focus label",type:"text",value:d||"",onChange:h,onEnter:v,endIcon:Nt(ya,{title:Nt("div",{children:Nt("p",{children:"To identify values with the highest number of series for the selected label."})}),children:Nt(sr,{})})})}),Nt("div",{className:"vm-cardinality-configurator-controls__item vm-cardinality-configurator-controls__item_limit",children:Nt(Ya,{label:"Limit entries",type:"number",value:t?10:m,error:f,disabled:t,helperText:t?"not available for Prometheus":"",onChange:e=>{const t=+e;p(isNaN(t)?0:t)},onEnter:v})})]}),Nt("div",{className:"vm-cardinality-configurator-bottom",children:[Nt(ym,{isPrometheus:t,isCluster:n,...a}),n&&Nt("div",{className:"vm-cardinality-configurator-bottom-helpful",children:Nt(Il,{href:"https://docs.victoriametrics.com/Single-server-VictoriaMetrics.html#cardinality-explorer-statistic-inaccuracy",withIcon:!0,children:[Nt(ir,{}),"Statistic inaccuracy explanation"]})}),Nt("div",{className:"vm-cardinality-configurator-bottom-helpful",children:Nt(Il,{href:"https://docs.victoriametrics.com/#cardinality-explorer",withIcon:!0,children:[Nt(ir,{}),"Documentation"]})}),Nt("div",{className:"vm-cardinality-configurator-bottom__execute",children:[Nt(ya,{title:s?"Hide tips":"Show tips",children:Nt(la,{variant:"text",color:s?"warning":"gray",startIcon:Nt(hr,{}),onClick:()=>{const e=i.get("tips")||"";l({tips:e?"":"true"})},ariaLabel:"visibility tips"})}),Nt(la,{variant:"text",startIcon:Nt(Pn,{}),onClick:()=>{l({match:"",focusLabel:""})},children:"Reset"}),Nt(la,{startIcon:Nt(qn,{}),onClick:v,children:"Execute Query"})]})]})]})};function wm(e){const{order:t,orderBy:n,onRequestSort:r,headerCells:a}=e;return Nt("thead",{className:"vm-table-header vm-cardinality-panel-table__header",children:Nt("tr",{className:"vm-table__row vm-table__row_header",children:a.map((e=>{return Nt("th",{className:Cr()({"vm-table-cell vm-table-cell_header":!0,"vm-table-cell_sort":"action"!==e.id&&"percentage"!==e.id,"vm-table-cell_right":"action"===e.id}),onClick:(a=e.id,e=>{r(e,a)}),children:Nt("div",{className:"vm-table-cell__content",children:[e.info?Nt(ya,{title:e.info,children:[Nt("div",{className:"vm-metrics-content-header__tip-icon",children:Nt(On,{})}),e.label]}):Nt(Ct.FK,{children:e.label}),"action"!==e.id&&"percentage"!==e.id&&Nt("div",{className:Cr()({"vm-table__sort-icon":!0,"vm-table__sort-icon_active":n===e.id,"vm-table__sort-icon_desc":"desc"===t&&n===e.id}),children:Nt(Hn,{})})]})},e.id);var a}))})})}const km=["date","timestamp","time"];function xm(e,t,n){const r=e[n],a=t[n],i=km.includes("".concat(n))?o()("".concat(r)).unix():r,l=km.includes("".concat(n))?o()("".concat(a)).unix():a;return li?1:0}function Sm(e,t){return"desc"===e?(e,n)=>xm(e,n,t):(e,n)=>-xm(e,n,t)}function Cm(e,t){const n=e.map(((e,t)=>[e,t]));return n.sort(((e,n)=>{const r=t(e[0],n[0]);return 0!==r?r:e[1]-n[1]})),n.map((e=>e[0]))}const Em=e=>{let{rows:t,headerCells:n,defaultSortColumn:a,tableCells:o}=e;const[i,l]=(0,r.useState)("desc"),[s,c]=(0,r.useState)(a),u=Cm(t,Sm(i,s));return Nt("table",{className:"vm-table vm-cardinality-panel-table",children:[Nt(wm,{order:i,orderBy:s,onRequestSort:(e,t)=>{l(s===t&&"asc"===i?"desc":"asc"),c(t)},rowCount:t.length,headerCells:n}),Nt("tbody",{className:"vm-table-header",children:u.map((e=>Nt("tr",{className:"vm-table__row",children:o(e)},e.name)))})]})},Nm=e=>{let{row:t,totalSeries:n,totalSeriesPrev:r,onActionClick:a}=e;const o=n>0?t.value/n*100:-1,i=r>0?t.valuePrev/r*100:-1,l=[o,i].some((e=>-1===e)),s=o-i,c=l?"":"".concat(s.toFixed(2),"%"),u=()=>{a(t.name)};return Nt(Ct.FK,{children:[Nt("td",{className:"vm-table-cell",children:Nt("span",{className:"vm-link vm-link_colored",onClick:u,children:t.name})},t.name),Nt("td",{className:"vm-table-cell",children:[t.value,!!t.diff&&Nt(ya,{title:"in relation to the previous day: ".concat(t.valuePrev),children:Nt("span",{className:Cr()({"vm-dynamic-number":!0,"vm-dynamic-number_positive":t.diff<0,"vm-dynamic-number_negative":t.diff>0}),children:["\xa0",t.diff>0?"+":"",t.diff]})})]},t.value),o>0&&Nt("td",{className:"vm-table-cell",children:Nt("div",{className:"vm-cardinality-panel-table__progress",children:[Nt(Dl,{value:o}),c&&Nt(ya,{title:"in relation to the previous day",children:Nt("span",{className:Cr()({"vm-dynamic-number":!0,"vm-dynamic-number_positive vm-dynamic-number_down":s<0,"vm-dynamic-number_negative vm-dynamic-number_up":s>0}),children:c})})]})},t.progressValue),Nt("td",{className:"vm-table-cell vm-table-cell_right",children:Nt("div",{className:"vm-table-cell__content",children:Nt(ya,{title:"Filter by ".concat(t.name),children:Nt(la,{variant:"text",size:"small",onClick:u,children:Nt(Yn,{})})})})},"action")]})},Am=e=>{let{data:t}=e;const[n,a]=(0,r.useState)([]),[o,i]=(0,r.useState)([0,0]);return(0,r.useEffect)((()=>{const e=t.sort(((e,t)=>t.value-e.value)),n=(e=>{const t=e.map((e=>e.value)),n=Math.ceil(t[0]||1),r=n/9;return new Array(11).fill(n+r).map(((e,t)=>Math.round(e-r*t)))})(e);i(n),a(e.map((e=>({...e,percentage:e.value/n[0]*100}))))}),[t]),Nt("div",{className:"vm-simple-bar-chart",children:[Nt("div",{className:"vm-simple-bar-chart-y-axis",children:o.map((e=>Nt("div",{className:"vm-simple-bar-chart-y-axis__tick",children:e},e)))}),Nt("div",{className:"vm-simple-bar-chart-data",children:n.map((e=>{let{name:t,value:n,percentage:r}=e;return Nt(ya,{title:"".concat(t,": ").concat(n),placement:"top-center",children:Nt("div",{className:"vm-simple-bar-chart-data-item",style:{maxHeight:"".concat(r||0,"%")}})},"".concat(t,"_").concat(n))}))})]})},Mm=e=>{let{rows:t,tabs:n=[],chartContainer:a,totalSeries:o,totalSeriesPrev:i,onActionClick:l,sectionTitle:s,tip:c,tableHeaderCells:u,isPrometheus:d}=e;const{isMobile:h}=ea(),[m,p]=(0,r.useState)("table"),f=d&&!t.length,v=(0,r.useMemo)((()=>n.map(((e,t)=>({value:e,label:e,icon:Nt(0===t?Kn:Wn,{})})))),[n]);return Nt("div",{className:Cr()({"vm-metrics-content":!0,"vm-metrics-content_mobile":h,"vm-block":!0,"vm-block_mobile":h}),children:[Nt("div",{className:"vm-metrics-content-header vm-section-header",children:[Nt("h5",{className:Cr()({"vm-metrics-content-header__title":!0,"vm-section-header__title":!0,"vm-section-header__title_mobile":h}),children:[!h&&c&&Nt(ya,{title:Nt("p",{dangerouslySetInnerHTML:{__html:c},className:"vm-metrics-content-header__tip"}),children:Nt("div",{className:"vm-metrics-content-header__tip-icon",children:Nt(On,{})})}),s]}),Nt("div",{className:"vm-section-header__tabs",children:Nt(Tr,{activeItem:m,items:v,onChange:p})})]}),f&&Nt("div",{className:"vm-metrics-content-prom-data",children:[Nt("div",{className:"vm-metrics-content-prom-data__icon",children:Nt(On,{})}),Nt("h3",{className:"vm-metrics-content-prom-data__title",children:"Prometheus Data Limitation"}),Nt("p",{className:"vm-metrics-content-prom-data__text",children:["Due to missing data from your Prometheus source, some tables may appear empty.",Nt("br",{}),"This does not indicate an issue with your system or our tool."]})]}),!f&&"table"===m&&Nt("div",{ref:a,className:Cr()({"vm-metrics-content__table":!0,"vm-metrics-content__table_mobile":h}),children:Nt(Em,{rows:t,headerCells:u,defaultSortColumn:"value",tableCells:e=>Nt(Nm,{row:e,totalSeries:o,totalSeriesPrev:i,onActionClick:l})})}),!f&&"graph"===m&&Nt("div",{className:"vm-metrics-content__chart",children:Nt(Am,{data:t.map((e=>{let{name:t,value:n}=e;return{name:t,value:n}}))})})]})},Tm=e=>{let{title:t,children:n}=e;return Nt("div",{className:"vm-cardinality-tip",children:[Nt("div",{className:"vm-cardinality-tip-header",children:[Nt("div",{className:"vm-cardinality-tip-header__tip-icon",children:Nt(hr,{})}),Nt("h4",{className:"vm-cardinality-tip-header__title",children:t||"Tips"})]}),Nt("p",{className:"vm-cardinality-tip__description",children:n})]})},Lm=()=>Nt(Tm,{title:"Metrics with a high number of series",children:Nt("ul",{children:[Nt("li",{children:["Identify and eliminate labels with frequently changed values to reduce their\xa0",Nt(Il,{href:"https://docs.victoriametrics.com/FAQ.html#what-is-high-cardinality",children:"cardinality"}),"\xa0and\xa0",Nt(Il,{href:"https://docs.victoriametrics.com/FAQ.html#what-is-high-churn-rate",children:"high churn rate"})]}),Nt("li",{children:["Find unused time series and\xa0",Nt(Il,{href:"https://docs.victoriametrics.com/relabeling.html",children:"drop entire metrics"})]}),Nt("li",{children:["Aggregate time series before they got ingested into the database via\xa0",Nt(Il,{href:"https://docs.victoriametrics.com/stream-aggregation.html",children:"streaming aggregation"})]})]})}),Im=()=>Nt(Tm,{title:"Labels with a high number of unique values",children:Nt("ul",{children:[Nt("li",{children:"Decrease the number of unique label values to reduce cardinality"}),Nt("li",{children:["Drop the label entirely via\xa0",Nt(Il,{href:"https://docs.victoriametrics.com/relabeling.html",children:"relabeling"})]}),Nt("li",{children:"For volatile label values (such as URL path, user session, etc.) consider printing them to the log file instead of adding to time series"})]})}),Pm=()=>Nt(Tm,{title:"Dashboard of a single metric",children:[Nt("p",{children:"This dashboard helps to understand the cardinality of a single metric."}),Nt("p",{children:"Each time series is a unique combination of key-value label pairs. Therefore a label key with many values can create a lot of time series for a particular metric. If you\u2019re trying to decrease the cardinality of a metric, start by looking at the labels with the highest number of values."}),Nt("p",{children:"Use the series selector at the top of the page to apply additional filters."})]}),Om=()=>Nt(Tm,{title:"Dashboard of a label",children:[Nt("p",{children:"This dashboard helps you understand the count of time series per label."}),Nt("p",{children:"Use the selector at the top of the page to pick a label name you\u2019d like to inspect. For the selected label name, you\u2019ll see the label values that have the highest number of series associated with them. So if you\u2019ve chosen `instance` as your label name, you may see that `657` time series have value \u201chost-1\u201d attached to them and `580` time series have value `host-2` attached to them."}),Nt("p",{children:"This can be helpful in allowing you to determine where the bulk of your time series are coming from. If the label \u201cinstance=host-1\u201d was applied to 657 series and the label \u201cinstance=host-2\u201d was only applied to 580 series, you\u2019d know, for example, that host-01 was responsible for sending the majority of the time series."})]}),Rm=()=>{const{isMobile:e}=ea(),[t]=He(),{setSearchParamsFromKeys:n}=uo(),r=t.get("tips")||"",a=t.get("match")||"",o=t.get("focusLabel")||"",{isLoading:i,appConfigurator:l,error:s,isCluster:c}=fm(),{tsdbStatusData:u,getDefaultState:d,tablesHeaders:h,sectionsTips:m}=l,p=d(a,o);return Nt("div",{className:Cr()({"vm-cardinality-panel":!0,"vm-cardinality-panel_mobile":e}),children:[i&&Nt(wl,{message:"Please wait while cardinality stats is calculated. \n This may take some time if the db contains big number of time series."}),Nt(bm,{isPrometheus:l.isPrometheusData,totalSeries:u.totalSeries,totalSeriesPrev:u.totalSeriesPrev,totalSeriesAll:u.totalSeriesByAll,totalLabelValuePairs:u.totalLabelValuePairs,seriesCountByMetricName:u.seriesCountByMetricName,isCluster:c}),r&&Nt("div",{className:"vm-cardinality-panel-tips",children:[!a&&!o&&Nt(Lm,{}),a&&!o&&Nt(Pm,{}),!a&&!o&&Nt(Im,{}),o&&Nt(Om,{})]}),s&&Nt(na,{variant:"error",children:s}),l.keys(a,o).map((e=>{return Nt(Mm,{sectionTitle:l.sectionsTitles(o)[e],tip:m[e],rows:u[e],onActionClick:(t=e,e=>{const r={match:vm[t]({query:e,focusLabel:o,match:a})};"labelValueCountByLabelName"!==t&&"seriesCountByLabelName"!=t||(r.focusLabel=e),"seriesCountByFocusLabelValue"==t&&(r.focusLabel=""),n(r)}),tabs:p.tabs[e],chartContainer:p.containerRefs[e],totalSeriesPrev:l.totalSeries(e,!0),totalSeries:l.totalSeries(e),tableHeaderCells:h[e],isPrometheus:l.isPrometheusData},e);var t}))]})},Dm=e=>(["topByAvgDuration","topByCount","topBySumDuration"].forEach((t=>{const n=e[t];Array.isArray(n)&&n.forEach((e=>{const t=en(1e3*e.timeRangeSeconds);e.url=((e,t)=>{var n;const{query:r,timeRangeSeconds:a}=e,o=["g0.expr=".concat(encodeURIComponent(r))],i=null===(n=rn.find((e=>e.duration===t)))||void 0===n?void 0:n.id;return i&&o.push("g0.relative_time=".concat(i)),a&&o.push("g0.range_input=".concat(t)),"".concat(We.home,"?").concat(o.join("&"))})(e,t),e.timeRange=t}))})),e),zm=e=>{let{topN:t,maxLifetime:n}=e;const{serverUrl:a}=Mt(),{setSearchParamsFromKeys:o}=uo(),[i,l]=(0,r.useState)(null),[s,c]=(0,r.useState)(!1),[u,d]=(0,r.useState)(),h=(0,r.useMemo)((()=>((e,t,n)=>"".concat(e,"/api/v1/status/top_queries?topN=").concat(t||"","&maxLifetime=").concat(n||""))(a,t,n)),[a,t,n]);return{data:i,error:u,loading:s,fetch:async()=>{c(!0),o({topN:t,maxLifetime:n});try{const e=await fetch(h),t=await e.json();l(e.ok?Dm(t):null),d(String(t.error||""))}catch(Lp){Lp instanceof Error&&"AbortError"!==Lp.name&&d("".concat(Lp.name,": ").concat(Lp.message))}c(!1)}}},Fm=e=>{let{rows:t,columns:n,defaultOrderBy:a}=e;const o=fl(),[i,l]=(0,r.useState)(a||"count"),[s,c]=(0,r.useState)("desc"),u=(0,r.useMemo)((()=>Cm(t,Sm(s,i))),[t,i,s]),d=e=>()=>{var t;t=e,c((e=>"asc"===e&&i===t?"desc":"asc")),l(t)},h=e=>{let{query:t}=e;return async()=>{await o(t,"Query has been copied")}};return Nt("table",{className:"vm-table",children:[Nt("thead",{className:"vm-table-header",children:Nt("tr",{className:"vm-table__row vm-table__row_header",children:[n.map((e=>Nt("th",{className:"vm-table-cell vm-table-cell_header vm-table-cell_sort",onClick:d(e.sortBy||e.key),children:Nt("div",{className:"vm-table-cell__content",children:[e.title||e.key,Nt("div",{className:Cr()({"vm-table__sort-icon":!0,"vm-table__sort-icon_active":i===e.key,"vm-table__sort-icon_desc":"desc"===s&&i===e.key}),children:Nt(Hn,{})})]})},e.key))),Nt("th",{className:"vm-table-cell vm-table-cell_header"})," "]})}),Nt("tbody",{className:"vm-table-body",children:u.map(((e,t)=>Nt("tr",{className:"vm-table__row",children:[n.map((t=>Nt("td",{className:"vm-table-cell",children:e[t.key]||"-"},t.key))),Nt("td",{className:"vm-table-cell vm-table-cell_no-padding",children:Nt("div",{className:"vm-top-queries-panels__table-actions",children:[e.url&&Nt(ya,{title:"Execute query",children:Nt(Re,{to:e.url,target:"_blank",rel:"noreferrer","aria-disabled":!0,children:Nt(la,{variant:"text",size:"small",startIcon:Nt(Yn,{}),ariaLabel:"execute query"})})}),Nt(ya,{title:"Copy query",children:Nt(la,{variant:"text",size:"small",startIcon:Nt(rr,{}),onClick:h(e),ariaLabel:"copy query"})})]})})]},t)))})]})},jm=["table","JSON"].map(((e,t)=>({value:String(t),label:e,icon:Nt(0===t?Kn:Qn,{})}))),Hm=e=>{let{rows:t,title:n,columns:a,defaultOrderBy:o}=e;const{isMobile:i}=ea(),[l,s]=(0,r.useState)(0);return Nt("div",{className:Cr()({"vm-top-queries-panel":!0,"vm-block":!0,"vm-block_mobile":i}),children:[Nt("div",{className:Cr()({"vm-top-queries-panel-header":!0,"vm-section-header":!0,"vm-top-queries-panel-header_mobile":i}),children:[Nt("h5",{className:Cr()({"vm-section-header__title":!0,"vm-section-header__title_mobile":i}),children:n}),Nt("div",{className:"vm-section-header__tabs",children:Nt(Tr,{activeItem:String(l),items:jm,onChange:e=>{s(+e)}})})]}),Nt("div",{className:Cr()({"vm-top-queries-panel__table":!0,"vm-top-queries-panel__table_mobile":i}),children:[0===l&&Nt(Fm,{rows:t,columns:a,defaultOrderBy:o}),1===l&&Nt(qh,{data:t})]})]})},Vm=()=>{const{isMobile:e}=ea(),[t,n]=_m(10,"topN"),[a,i]=_m("10m","maxLifetime"),{data:l,error:s,loading:c,fetch:u}=zm({topN:t,maxLifetime:a}),d=(0,r.useMemo)((()=>{const e=a.trim().split(" ").reduce(((e,t)=>{const n=Kt(t);return n?{...e,...n}:{...e}}),{});return!!o().duration(e).asMilliseconds()}),[a]),h=(0,r.useMemo)((()=>!!t&&t<1),[t]),m=(0,r.useMemo)((()=>h?"Number must be bigger than zero":""),[h]),p=(0,r.useMemo)((()=>d?"":"Invalid duration value"),[d]),f=e=>{if(!l)return e;const t=l[e];return"number"===typeof t?Ud(t,t,t):t||e},v=e=>{"Enter"===e.key&&u()};return(0,r.useEffect)((()=>{l&&(t||n(+l.topN),a||i(l.maxLifetime))}),[l]),(0,r.useEffect)((()=>(u(),window.addEventListener("popstate",u),()=>{window.removeEventListener("popstate",u)})),[]),Nt("div",{className:Cr()({"vm-top-queries":!0,"vm-top-queries_mobile":e}),children:[c&&Nt(wl,{containerStyles:{height:"500px"}}),Nt("div",{className:Cr()({"vm-top-queries-controls":!0,"vm-block":!0,"vm-block_mobile":e}),children:[Nt("div",{className:"vm-top-queries-controls-fields",children:[Nt("div",{className:"vm-top-queries-controls-fields__item",children:Nt(Ya,{label:"Max lifetime",value:a,error:p,helperText:"For example ".concat("30ms, 15s, 3d4h, 1y2w"),onChange:e=>{i(e)},onKeyDown:v})}),Nt("div",{className:"vm-top-queries-controls-fields__item",children:Nt(Ya,{label:"Number of returned queries",type:"number",value:t||"",error:m,onChange:e=>{n(+e)},onKeyDown:v})})]}),Nt("div",{className:Cr()({"vm-top-queries-controls-bottom":!0,"vm-top-queries-controls-bottom_mobile":e}),children:[Nt("div",{className:"vm-top-queries-controls-bottom__info",children:["VictoriaMetrics tracks the last\xa0",Nt(ya,{title:"search.queryStats.lastQueriesCount",children:Nt("b",{children:f("search.queryStats.lastQueriesCount")})}),"\xa0queries with durations at least\xa0",Nt(ya,{title:"search.queryStats.minQueryDuration",children:Nt("b",{children:f("search.queryStats.minQueryDuration")})})]}),Nt("div",{className:"vm-top-queries-controls-bottom__button",children:Nt(la,{startIcon:Nt(qn,{}),onClick:u,children:"Execute"})})]})]}),s&&Nt(na,{variant:"error",children:s}),l&&Nt(Ct.FK,{children:Nt("div",{className:"vm-top-queries-panels",children:[Nt(Hm,{rows:l.topBySumDuration,title:"Queries with most summary time to execute",columns:[{key:"query"},{key:"sumDurationSeconds",title:"sum duration, sec"},{key:"timeRange",sortBy:"timeRangeSeconds",title:"query time interval"},{key:"count"}],defaultOrderBy:"sumDurationSeconds"}),Nt(Hm,{rows:l.topByAvgDuration,title:"Most heavy queries",columns:[{key:"query"},{key:"avgDurationSeconds",title:"avg duration, sec"},{key:"timeRange",sortBy:"timeRangeSeconds",title:"query time interval"},{key:"count"}],defaultOrderBy:"avgDurationSeconds"}),Nt(Hm,{rows:l.topByCount,title:"Most frequently executed queries",columns:[{key:"query"},{key:"timeRange",sortBy:"timeRangeSeconds",title:"query time interval"},{key:"count"}]})]})})]})},$m={"color-primary":"#589DF6","color-secondary":"#316eca","color-error":"#e5534b","color-warning":"#c69026","color-info":"#539bf5","color-success":"#57ab5a","color-background-body":"#22272e","color-background-block":"#2d333b","color-background-tooltip":"rgba(22, 22, 22, 0.8)","color-text":"#cdd9e5","color-text-secondary":"#768390","color-text-disabled":"#636e7b","box-shadow":"rgba(0, 0, 0, 0.16) 1px 2px 6px","box-shadow-popper":"rgba(0, 0, 0, 0.2) 0px 2px 8px 0px","border-divider":"1px solid rgba(99, 110, 123, 0.5)","color-hover-black":"rgba(0, 0, 0, 0.12)","color-log-hits-bar-0":"rgba(255, 255, 255, 0.18)","color-log-hits-bar-1":"#FFB74D","color-log-hits-bar-2":"#81C784","color-log-hits-bar-3":"#64B5F6","color-log-hits-bar-4":"#E57373","color-log-hits-bar-5":"#8a62f0"},Um={"color-primary":"#3F51B5","color-secondary":"#E91E63","color-error":"#FD080E","color-warning":"#FF8308","color-info":"#03A9F4","color-success":"#4CAF50","color-background-body":"#FEFEFF","color-background-block":"#FFFFFF","color-background-tooltip":"rgba(80,80,80,0.9)","color-text":"#110f0f","color-text-secondary":"#706F6F","color-text-disabled":"#A09F9F","box-shadow":"rgba(0, 0, 0, 0.08) 1px 2px 6px","box-shadow-popper":"rgba(0, 0, 0, 0.1) 0px 2px 8px 0px","border-divider":"1px solid rgba(0, 0, 0, 0.15)","color-hover-black":"rgba(0, 0, 0, 0.06)","color-log-hits-bar-0":"rgba(0, 0, 0, 0.18)","color-log-hits-bar-1":"#FFB74D","color-log-hits-bar-2":"#81C784","color-log-hits-bar-3":"#64B5F6","color-log-hits-bar-4":"#E57373","color-log-hits-bar-5":"#8a62f0"},Bm=()=>{const[e,t]=(0,r.useState)(_t()),n=e=>{t(e.matches)};return(0,r.useEffect)((()=>{const e=window.matchMedia("(prefers-color-scheme: dark)");return e.addEventListener("change",n),()=>e.removeEventListener("change",n)}),[]),e},qm=["primary","secondary","error","warning","info","success"],Ym=e=>{let{onLoaded:t}=e;const n=Qe(),{palette:a={}}=Ke(),{theme:o}=Mt(),i=Bm(),l=Tt(),s=Mr(),[c,u]=(0,r.useState)({[ft.dark]:$m,[ft.light]:Um,[ft.system]:_t()?$m:Um}),d=()=>{const{innerWidth:e,innerHeight:t}=window,{clientWidth:n,clientHeight:r}=document.documentElement;yt("scrollbar-width","".concat(e-n,"px")),yt("scrollbar-height","".concat(t-r,"px")),yt("vh","".concat(.01*t,"px"))},h=()=>{qm.forEach(((e,n)=>{const r=(e=>{let t=e.replace("#","").trim();if(3===t.length&&(t=t[0]+t[0]+t[1]+t[1]+t[2]+t[2]),6!==t.length)throw new Error("Invalid HEX color.");return(299*parseInt(t.slice(0,2),16)+587*parseInt(t.slice(2,4),16)+114*parseInt(t.slice(4,6),16))/1e3>=128?"#000000":"#FFFFFF"})(gt("color-".concat(e)));yt("".concat(e,"-text"),r),n===qm.length-1&&(l({type:"SET_DARK_THEME"}),t(!0))}))},m=()=>{const e=et("THEME")||ft.system,t=c[e];Object.entries(t).forEach((e=>{let[t,n]=e;yt(t,n)})),h(),n&&(qm.forEach((e=>{const t=a[e];t&&yt("color-".concat(e),t)})),h())};return(0,r.useEffect)((()=>{d(),m()}),[c]),(0,r.useEffect)(d,[s]),(0,r.useEffect)((()=>{const e=_t()?$m:Um;c[ft.system]!==e?u((t=>({...t,[ft.system]:e}))):m()}),[o,i]),(0,r.useEffect)((()=>{n&&l({type:"SET_THEME",payload:ft.light})}),[]),null},Wm=()=>{const[e,t]=(0,r.useState)([]),[n,a]=(0,r.useState)(!1),o=(0,r.useRef)(document.body),i=e=>{e.preventDefault(),e.stopPropagation(),"dragenter"===e.type||"dragover"===e.type?a(!0):"dragleave"===e.type&&a(!1)};return Ar("dragenter",i,o),Ar("dragleave",i,o),Ar("dragover",i,o),Ar("drop",(e=>{var n;e.preventDefault(),e.stopPropagation(),a(!1),null!==e&&void 0!==e&&null!==(n=e.dataTransfer)&&void 0!==n&&n.files&&e.dataTransfer.files[0]&&(e=>{const n=Array.from(e||[]);t(n)})(e.dataTransfer.files)}),o),Ar("paste",(e=>{var n;const r=null===(n=e.clipboardData)||void 0===n?void 0:n.items;if(!r)return;const a=Array.from(r).filter((e=>"application/json"===e.type)).map((e=>e.getAsFile())).filter((e=>null!==e));t(a)}),o),{files:e,dragging:n}},Km=e=>{let{onOpenModal:t,onChange:n}=e;return Nt("div",{className:"vm-upload-json-buttons",children:[Nt(la,{variant:"outlined",onClick:t,children:"Paste JSON"}),Nt(la,{children:["Upload Files",Nt("input",{id:"json",type:"file",accept:"application/json",multiple:!0,title:" ",onChange:n})]})]})},Qm=()=>{const[e,t]=(0,r.useState)([]),[n,a]=(0,r.useState)([]),o=(0,r.useMemo)((()=>!!e.length),[e]),{value:i,setTrue:l,setFalse:s}=ca(!1),c=function(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"";a((n=>[{filename:t,text:": ".concat(e.message)},...n]))},u=(e,n)=>{try{const r=JSON.parse(e),a=r.trace||r;if(!a.duration_msec)return void c(new Error(pt.traceNotFound),n);const o=new Cl(a,n);t((e=>[o,...e]))}catch(Lp){Lp instanceof Error&&c(Lp,n)}},d=e=>{e.map((e=>{const t=new FileReader,n=(null===e||void 0===e?void 0:e.name)||"";t.onload=e=>{var t;const r=String(null===(t=e.target)||void 0===t?void 0:t.result);u(r,n)},t.readAsText(e)}))},h=e=>{a([]);const t=Array.from(e.target.files||[]);d(t),e.target.value=""},m=e=>()=>{(e=>{a((t=>t.filter(((t,n)=>n!==e))))})(e)},{files:p,dragging:f}=Wm();return(0,r.useEffect)((()=>{d(p)}),[p]),Nt("div",{className:"vm-trace-page",children:[Nt("div",{className:"vm-trace-page-header",children:[Nt("div",{className:"vm-trace-page-header-errors",children:n.map(((e,t)=>Nt("div",{className:"vm-trace-page-header-errors-item",children:[Nt(na,{variant:"error",children:[Nt("b",{className:"vm-trace-page-header-errors-item__filename",children:e.filename}),Nt("span",{children:e.text})]}),Nt(la,{className:"vm-trace-page-header-errors-item__close",startIcon:Nt(In,{}),variant:"text",color:"error",onClick:m(t)})]},"".concat(e,"_").concat(t))))}),Nt("div",{children:o&&Nt(Km,{onOpenModal:l,onChange:h})})]}),o&&Nt("div",{children:Nt(Hl,{jsonEditor:!0,traces:e,onDeleteClick:n=>{const r=e.filter((e=>e.idValue!==n.idValue));t([...r])}})}),!o&&Nt("div",{className:"vm-trace-page-preview",children:[Nt("p",{className:"vm-trace-page-preview__text",children:["Please, upload file with JSON response content.","\n","The file must contain tracing information in JSON format.","\n","In order to use tracing please refer to the doc:\xa0",Nt("a",{className:"vm-link vm-link_colored",href:"https://docs.victoriametrics.com/#query-tracing",target:"_blank",rel:"help noreferrer",children:"https://docs.victoriametrics.com/#query-tracing"}),"\n","Tracing graph will be displayed after file upload.","\n","Attach files by dragging & dropping, selecting or pasting them."]}),Nt(Km,{onOpenModal:l,onChange:h})]}),i&&Nt(ga,{title:"Paste JSON",onClose:s,children:Nt(jl,{editable:!0,displayTitle:!0,defaultTile:"JSON ".concat(e.length+1),onClose:s,onUpload:u})}),f&&Nt("div",{className:"vm-trace-page__dropzone"})]})},Zm=e=>{const{serverUrl:t}=Mt(),{period:n}=fn(),[a,o]=(0,r.useState)([]),[i,l]=(0,r.useState)(!1),[s,c]=(0,r.useState)(),u=(0,r.useMemo)((()=>((e,t,n)=>{const r="{job=".concat(JSON.stringify(n),"}");return"".concat(e,"/api/v1/label/instance/values?match[]=").concat(encodeURIComponent(r),"&start=").concat(t.start,"&end=").concat(t.end)})(t,n,e)),[t,n,e]);return(0,r.useEffect)((()=>{if(!e)return;(async()=>{l(!0);try{const e=await fetch(u),t=await e.json(),n=t.data||[];o(n.sort(((e,t)=>e.localeCompare(t)))),e.ok?c(void 0):c("".concat(t.errorType,"\r\n").concat(null===t||void 0===t?void 0:t.error))}catch(Lp){Lp instanceof Error&&c("".concat(Lp.name,": ").concat(Lp.message))}l(!1)})().catch(console.error)}),[u]),{instances:a,isLoading:i,error:s}},Gm=(e,t)=>{const{serverUrl:n}=Mt(),{period:a}=fn(),[o,i]=(0,r.useState)([]),[l,s]=(0,r.useState)(!1),[c,u]=(0,r.useState)(),d=(0,r.useMemo)((()=>((e,t,n,r)=>{const a=Object.entries({job:n,instance:r}).filter((e=>e[1])).map((e=>{let[t,n]=e;return"".concat(t,"=").concat(JSON.stringify(n))})).join(","),o="{".concat(a,"}");return"".concat(e,"/api/v1/label/__name__/values?match[]=").concat(encodeURIComponent(o),"&start=").concat(t.start,"&end=").concat(t.end)})(n,a,e,t)),[n,a,e,t]);return(0,r.useEffect)((()=>{if(!e)return;(async()=>{s(!0);try{const e=await fetch(d),t=await e.json(),n=t.data||[];i(n.sort(((e,t)=>e.localeCompare(t)))),e.ok?u(void 0):u("".concat(t.errorType,"\r\n").concat(null===t||void 0===t?void 0:t.error))}catch(Lp){Lp instanceof Error&&u("".concat(Lp.name,": ").concat(Lp.message))}s(!1)})().catch(console.error)}),[d]),{names:o,isLoading:l,error:c}},Jm=e=>{let{name:t,job:n,instance:a,rateEnabled:o,isBucket:i,height:l}=e;const{isMobile:s}=ea(),{customStep:c,yaxis:u}=Ur(),{period:d}=fn(),h=Br(),m=vn(),p=Zt(d.end-d.start),f=Qt(c),v=en(10*f*1e3),[g,y]=(0,r.useState)(!1),[_,b]=(0,r.useState)(!1),w=g&&c===p?v:c,k=(0,r.useMemo)((()=>{const e=Object.entries({job:n,instance:a}).filter((e=>e[1])).map((e=>{let[t,n]=e;return"".concat(t,"=").concat(JSON.stringify(n))}));e.push("__name__=".concat(JSON.stringify(t))),"node_cpu_seconds_total"==t&&e.push('mode!="idle"');const r="{".concat(e.join(","),"}");if(i)return"sum(rate(".concat(r,")) by (vmrange, le)");const l=o?"rollup_rate(".concat(r,")"):"rollup(".concat(r,")");return"\nwith (q = ".concat(l,') (\n alias(min(label_match(q, "rollup", "min")), "min"),\n alias(max(label_match(q, "rollup", "max")), "max"),\n alias(avg(label_match(q, "rollup", "avg")), "avg"),\n)')}),[t,n,a,o,i]),{isLoading:x,graphData:S,error:C,queryErrors:E,warning:N,isHistogram:A}=Tl({predefinedQuery:[k],visible:!0,customStep:w,showAllSeries:_});return(0,r.useEffect)((()=>{y(A)}),[A]),Nt("div",{className:Cr()({"vm-explore-metrics-graph":!0,"vm-explore-metrics-graph_mobile":s}),children:[x&&Nt(wl,{}),C&&Nt(na,{variant:"error",children:C}),E[0]&&Nt(na,{variant:"error",children:E[0]}),N&&Nt($l,{warning:N,query:[k],onChange:b}),S&&d&&Nt(jh,{data:S,period:d,customStep:w,query:[k],yaxis:u,setYaxisLimits:e=>{h({type:"SET_YAXIS_LIMITS",payload:e})},setPeriod:e=>{let{from:t,to:n}=e;m({type:"SET_PERIOD",payload:{from:t,to:n}})},showLegend:!1,height:l,isHistogram:A})]})},Xm=e=>{let{name:t,index:n,length:r,isBucket:a,rateEnabled:o,onChangeRate:i,onRemoveItem:l,onChangeOrder:s}=e;const{isMobile:c}=ea(),{value:u,setTrue:d,setFalse:h}=ca(!1),m=()=>{l(t)},p=()=>{s(t,n,n+1)},f=()=>{s(t,n,n-1)};return Nt("div",c?{className:"vm-explore-metrics-item-header vm-explore-metrics-item-header_mobile",children:[Nt("div",{className:"vm-explore-metrics-item-header__name",children:t}),Nt(la,{variant:"text",size:"small",startIcon:Nt(ur,{}),onClick:d,ariaLabel:"open panel settings"}),u&&Nt(ga,{title:t,onClose:h,children:Nt("div",{className:"vm-explore-metrics-item-header-modal",children:[Nt("div",{className:"vm-explore-metrics-item-header-modal-order",children:[Nt(la,{startIcon:Nt(Jn,{}),variant:"outlined",onClick:f,disabled:0===n,ariaLabel:"move graph up"}),Nt("p",{children:["position:",Nt("span",{className:"vm-explore-metrics-item-header-modal-order__index",children:["#",n+1]})]}),Nt(la,{endIcon:Nt(Gn,{}),variant:"outlined",onClick:p,disabled:n===r-1,ariaLabel:"move graph down"})]}),!a&&Nt("div",{className:"vm-explore-metrics-item-header-modal__rate",children:[Nt(Mo,{label:Nt("span",{children:["enable ",Nt("code",{children:"rate()"})]}),value:o,onChange:i,fullWidth:!0}),Nt("p",{children:"calculates the average per-second speed of metrics change"})]}),Nt(la,{startIcon:Nt(In,{}),color:"error",variant:"outlined",onClick:m,fullWidth:!0,children:"Remove graph"})]})})]}:{className:"vm-explore-metrics-item-header",children:[Nt("div",{className:"vm-explore-metrics-item-header-order",children:[Nt(ya,{title:"move graph up",children:Nt(la,{className:"vm-explore-metrics-item-header-order__up",startIcon:Nt(jn,{}),variant:"text",color:"gray",size:"small",onClick:f,ariaLabel:"move graph up"})}),Nt("div",{className:"vm-explore-metrics-item-header__index",children:["#",n+1]}),Nt(ya,{title:"move graph down",children:Nt(la,{className:"vm-explore-metrics-item-header-order__down",startIcon:Nt(jn,{}),variant:"text",color:"gray",size:"small",onClick:p,ariaLabel:"move graph down"})})]}),Nt("div",{className:"vm-explore-metrics-item-header__name",children:t}),!a&&Nt("div",{className:"vm-explore-metrics-item-header__rate",children:Nt(ya,{title:"calculates the average per-second speed of metric's change",children:Nt(Mo,{label:Nt("span",{children:["enable ",Nt("code",{children:"rate()"})]}),value:o,onChange:i})})}),Nt("div",{className:"vm-explore-metrics-item-header__close",children:Nt(ya,{title:"close graph",children:Nt(la,{startIcon:Nt(In,{}),variant:"text",color:"gray",size:"small",onClick:m,ariaLabel:"close graph"})})})]})},ep=e=>{let{name:t,job:n,instance:a,index:o,length:i,size:l,onRemoveItem:s,onChangeOrder:c}=e;const u=(0,r.useMemo)((()=>/_sum?|_total?|_count?/.test(t)),[t]),d=(0,r.useMemo)((()=>/_bucket?/.test(t)),[t]),[h,m]=(0,r.useState)(u),p=Mr(),f=(0,r.useMemo)(l.height,[l,p]);return(0,r.useEffect)((()=>{m(u)}),[n]),Nt("div",{className:"vm-explore-metrics-item vm-block vm-block_empty-padding",children:[Nt(Xm,{name:t,index:o,length:i,isBucket:d,rateEnabled:h,size:l.id,onChangeRate:m,onRemoveItem:s,onChangeOrder:c}),Nt(Jm,{name:t,job:n,instance:a,rateEnabled:h,isBucket:d,height:f},"".concat(t,"_").concat(n,"_").concat(a,"_").concat(h))]})},tp=e=>{let{values:t,onRemoveItem:n}=e;const{isMobile:r}=ea();return r?Nt("span",{className:"vm-select-input-content__counter",children:["selected ",t.length]}):Nt(Ct.FK,{children:t.map((e=>{return Nt("div",{className:"vm-select-input-content__selected",children:[Nt("span",{children:e}),Nt("div",{onClick:(t=e,e=>{n(t),e.stopPropagation()}),children:Nt(In,{})})]},e);var t}))})},np=e=>{let{value:t,list:n,label:a,placeholder:o,noOptionsText:i,clearable:l=!1,searchable:s=!1,autofocus:c,disabled:u,onChange:d}=e;const{isDarkTheme:h}=Mt(),{isMobile:m}=ea(),[p,f]=(0,r.useState)(""),v=(0,r.useRef)(null),[g,y]=(0,r.useState)(null),[_,b]=(0,r.useState)(!1),w=(0,r.useRef)(null),k=Array.isArray(t),x=Array.isArray(t)?t:void 0,S=m&&k&&!(null===x||void 0===x||!x.length),C=(0,r.useMemo)((()=>_?p:Array.isArray(t)?"":t),[t,p,_,k]),E=(0,r.useMemo)((()=>_?p||"(.+)":""),[p,_]),N=()=>{w.current&&w.current.blur()},A=()=>{b(!1),N()},M=e=>{f(""),d(e),k||A(),k&&w.current&&w.current.focus()};return(0,r.useEffect)((()=>{f(""),_&&w.current&&w.current.focus(),_||N()}),[_,w]),(0,r.useEffect)((()=>{c&&w.current&&!m&&w.current.focus()}),[c,w]),Ar("keyup",(e=>{w.current!==e.target&&b(!1)})),ia(v,A,g),Nt("div",{className:Cr()({"vm-select":!0,"vm-select_dark":h,"vm-select_disabled":u}),children:[Nt("div",{className:"vm-select-input",onClick:e=>{e.target instanceof HTMLInputElement||u||b((e=>!e))},ref:v,children:[Nt("div",{className:"vm-select-input-content",children:[!(null===x||void 0===x||!x.length)&&Nt(tp,{values:x,onRemoveItem:M}),!S&&Nt("input",{value:C,type:"text",placeholder:o,onInput:e=>{f(e.target.value)},onFocus:()=>{u||b(!0)},onBlur:()=>{n.includes(p)&&d(p)},ref:w,readOnly:m||!s})]}),a&&Nt("span",{className:"vm-text-field__label",children:a}),l&&t&&Nt("div",{className:"vm-select-input__icon",onClick:(e=>t=>{M(e),t.stopPropagation()})(""),children:Nt(In,{})}),Nt("div",{className:Cr()({"vm-select-input__icon":!0,"vm-select-input__icon_open":_}),children:Nt(Hn,{})})]}),Nt(Ho,{label:a,value:E,options:n.map((e=>({value:e}))),anchor:v,selected:x,minLength:1,fullWidth:!0,noOptionsText:i,onSelect:M,onOpenAutocomplete:b,onChangeWrapperRef:y})]})},rp=st.map((e=>e.id)),ap=e=>{let{jobs:t,instances:n,names:a,job:o,instance:i,size:l,selectedMetrics:s,onChangeJob:c,onChangeInstance:u,onToggleMetric:d,onChangeSize:h}=e;const m=(0,r.useMemo)((()=>o?"":"No instances. Please select job"),[o]),p=(0,r.useMemo)((()=>o?"":"No metric names. Please select job"),[o]),{isMobile:f}=ea(),{value:v,toggle:g,setFalse:y}=ca("false"!==et("EXPLORE_METRICS_TIPS"));return(0,r.useEffect)((()=>{Xe("EXPLORE_METRICS_TIPS","".concat(v))}),[v]),Nt(Ct.FK,{children:[Nt("div",{className:Cr()({"vm-explore-metrics-header":!0,"vm-explore-metrics-header_mobile":f,"vm-block":!0,"vm-block_mobile":f}),children:[Nt("div",{className:"vm-explore-metrics-header__job",children:Nt(np,{value:o,list:t,label:"Job",placeholder:"Please select job",onChange:c,autofocus:!o&&!!t.length&&!f,searchable:!0})}),Nt("div",{className:"vm-explore-metrics-header__instance",children:Nt(np,{value:i,list:n,label:"Instance",placeholder:"Please select instance",onChange:u,noOptionsText:m,clearable:!0,searchable:!0})}),Nt("div",{className:"vm-explore-metrics-header__size",children:[Nt(np,{label:"Size graphs",value:l,list:rp,onChange:h}),Nt(ya,{title:"".concat(v?"Hide":"Show"," tip"),children:Nt(la,{variant:"text",color:v?"warning":"gray",startIcon:Nt(hr,{}),onClick:g,ariaLabel:"visibility tips"})})]}),Nt("div",{className:"vm-explore-metrics-header-metrics",children:Nt(np,{label:"Metrics",value:s,list:a,placeholder:"Search metric name",onChange:d,noOptionsText:p,clearable:!0,searchable:!0})})]}),v&&Nt(na,{variant:"warning",children:Nt("div",{className:"vm-explore-metrics-header-description",children:[Nt("p",{children:["Please note: this page is solely designed for exploring Prometheus metrics. Prometheus metrics always contain ",Nt("code",{children:"job"})," and ",Nt("code",{children:"instance"})," labels (see ",Nt("a",{className:"vm-link vm-link_colored",href:"https://prometheus.io/docs/concepts/jobs_instances/",children:"these docs"}),"), and this page relies on them as filters. ",Nt("br",{}),"Please use this page for Prometheus metrics only, in accordance with their naming conventions."]}),Nt(la,{variant:"text",size:"small",startIcon:Nt(In,{}),onClick:y,ariaLabel:"close tips"})]})})]})},op=ut("job",""),ip=ut("instance",""),lp=ut("metrics",""),sp=ut("size",""),cp=st.find((e=>sp?e.id===sp:e.isDefault))||st[0],up=()=>{const[e,t]=(0,r.useState)(op),[n,a]=(0,r.useState)(ip),[o,i]=(0,r.useState)(lp?lp.split("&"):[]),[l,s]=(0,r.useState)(cp);(e=>{let{job:t,instance:n,metrics:a,size:o}=e;const{duration:i,relativeTime:l,period:{date:s}}=fn(),{customStep:c}=Ur(),{setSearchParamsFromKeys:u}=uo(),d=()=>{const e=im({"g0.range_input":i,"g0.end_input":s,"g0.step_input":c,"g0.relative_time":l,size:o,job:t,instance:n,metrics:a});u(e)};(0,r.useEffect)(d,[i,l,s,c,t,n,a,o]),(0,r.useEffect)(d,[])})({job:e,instance:n,metrics:o.join("&"),size:l.id});const{jobs:c,isLoading:u,error:d}=(()=>{const{serverUrl:e}=Mt(),{period:t}=fn(),[n,a]=(0,r.useState)([]),[o,i]=(0,r.useState)(!1),[l,s]=(0,r.useState)(),c=(0,r.useMemo)((()=>((e,t)=>"".concat(e,"/api/v1/label/job/values?start=").concat(t.start,"&end=").concat(t.end))(e,t)),[e,t]);return(0,r.useEffect)((()=>{(async()=>{i(!0);try{const e=await fetch(c),t=await e.json(),n=t.data||[];a(n.sort(((e,t)=>e.localeCompare(t)))),e.ok?s(void 0):s("".concat(t.errorType,"\r\n").concat(null===t||void 0===t?void 0:t.error))}catch(Lp){Lp instanceof Error&&s("".concat(Lp.name,": ").concat(Lp.message))}i(!1)})().catch(console.error)}),[c]),{jobs:n,isLoading:o,error:l}})(),{instances:h,isLoading:m,error:p}=Zm(e),{names:f,isLoading:v,error:g}=Gm(e,n),y=(0,r.useMemo)((()=>u||m||v),[u,m,v]),_=(0,r.useMemo)((()=>d||p||g),[d,p,g]),b=e=>{i(e?t=>t.includes(e)?t.filter((t=>t!==e)):[...t,e]:[])},w=(e,t,n)=>{const r=n>o.length-1;n<0||r||i((e=>{const r=[...e],[a]=r.splice(t,1);return r.splice(n,0,a),r}))};return(0,r.useEffect)((()=>{n&&h.length&&!h.includes(n)&&a("")}),[h,n]),Nt("div",{className:"vm-explore-metrics",children:[Nt(ap,{jobs:c,instances:h,names:f,job:e,size:l.id,instance:n,selectedMetrics:o,onChangeJob:t,onChangeSize:e=>{const t=st.find((t=>t.id===e));t&&s(t)},onChangeInstance:a,onToggleMetric:b}),y&&Nt(wl,{}),_&&Nt(na,{variant:"error",children:_}),!e&&Nt(na,{variant:"info",children:"Please select job to see list of metric names."}),e&&!o.length&&Nt(na,{variant:"info",children:"Please select metric names to see the graphs."}),Nt("div",{className:"vm-explore-metrics-body",children:o.map(((t,r)=>Nt(ep,{name:t,job:e,instance:n,index:r,length:o.length,size:l,onRemoveItem:b,onChangeOrder:w},t)))})]})},dp=()=>{const t=fl();return Nt("div",{className:"vm-preview-icons",children:Object.entries(e).map((e=>{let[n,r]=e;return Nt("div",{className:"vm-preview-icons-item",onClick:(a=n,async()=>{await t("<".concat(a,"/>"),"<".concat(a,"/> has been copied"))}),children:[Nt("div",{className:"vm-preview-icons-item__svg",children:r()}),Nt("div",{className:"vm-preview-icons-item__name",children:"<".concat(n,"/>")})]},n);var a}))})};var hp=function(e){return e.copy="Copy",e.copied="Copied",e}(hp||{});const mp=e=>{let{code:t}=e;const[n,a]=(0,r.useState)(hp.copy);return(0,r.useEffect)((()=>{let e=null;return n===hp.copied&&(e=setTimeout((()=>a(hp.copy)),1e3)),()=>{e&&clearTimeout(e)}}),[n]),Nt("code",{className:"vm-code-example",children:[t,Nt("div",{className:"vm-code-example__copy",children:Nt(ya,{title:n,children:Nt(la,{size:"small",variant:"text",onClick:()=>{navigator.clipboard.writeText(t),a(hp.copied)},startIcon:Nt(rr,{}),ariaLabel:"close"})})})]})},pp=()=>Nt("a",{className:"vm-link vm-link_colored",href:"https://docs.victoriametrics.com/MetricsQL.html",target:"_blank",rel:"help noreferrer",children:"MetricsQL"}),fp=()=>Nt("a",{className:"vm-link vm-link_colored",href:"https://grafana.com/grafana/dashboards/1860-node-exporter-full/",target:"_blank",rel:"help noreferrer",children:"Node Exporter Full"}),vp=()=>Nt("section",{className:"vm-with-template-tutorial",children:[Nt("h2",{className:"vm-with-template-tutorial__title",children:["Tutorial for WITH expressions in ",Nt(pp,{})]}),Nt("div",{className:"vm-with-template-tutorial-section",children:[Nt("p",{className:"vm-with-template-tutorial-section__text",children:["Let's look at the following real query from ",Nt(fp,{})," dashboard:"]}),Nt(mp,{code:'(\n (\n node_memory_MemTotal_bytes{instance=~"$node:$port", job=~"$job"}\n -\n node_memory_MemFree_bytes{instance=~"$node:$port", job=~"$job"}\n )\n /\n node_memory_MemTotal_bytes{instance=~"$node:$port", job=~"$job"}\n) * 100'}),Nt("p",{className:"vm-with-template-tutorial-section__text",children:"It is clear the query calculates the percentage of used memory for the given $node, $port and $job. Isn't it? :)"})]}),Nt("div",{className:"vm-with-template-tutorial-section",children:[Nt("p",{className:"vm-with-template-tutorial-section__text",children:"What's wrong with this query? Copy-pasted label filters for distinct timeseries which makes it easy to mistype these filters during modification. Let's simplify the query with WITH expressions:"}),Nt(mp,{code:'WITH (\n commonFilters = {instance=~"$node:$port",job=~"$job"}\n)\n(\n node_memory_MemTotal_bytes{commonFilters}\n -\n node_memory_MemFree_bytes{commonFilters}\n)\n /\nnode_memory_MemTotal_bytes{commonFilters} * 100'})]}),Nt("div",{className:"vm-with-template-tutorial-section",children:[Nt("p",{className:"vm-with-template-tutorial-section__text",children:["Now label filters are located in a single place instead of three distinct places. The query mentions node_memory_MemTotal_bytes metric twice and ","{commonFilters}"," three times. WITH expressions may improve this:"]}),Nt(mp,{code:'WITH (\n my_resource_utilization(free, limit, filters) = (limit{filters} - free{filters}) / limit{filters} * 100\n)\nmy_resource_utilization(\n node_memory_MemFree_bytes,\n node_memory_MemTotal_bytes,\n {instance=~"$node:$port",job=~"$job"},\n)'}),Nt("p",{className:"vm-with-template-tutorial-section__text",children:"Now the template function my_resource_utilization() may be used for monitoring arbitrary resources - memory, CPU, network, storage, you name it."})]}),Nt("div",{className:"vm-with-template-tutorial-section",children:[Nt("p",{className:"vm-with-template-tutorial-section__text",children:["Let's take another nice query from ",Nt(fp,{})," dashboard:"]}),Nt(mp,{code:'(\n (\n (\n count(\n count(node_cpu_seconds_total{instance=~"$node:$port",job=~"$job"}) by (cpu)\n )\n )\n -\n avg(\n sum by (mode) (rate(node_cpu_seconds_total{mode=\'idle\',instance=~"$node:$port",job=~"$job"}[5m]))\n )\n )\n *\n 100\n)\n /\ncount(\n count(node_cpu_seconds_total{instance=~"$node:$port",job=~"$job"}) by (cpu)\n)'}),Nt("p",{className:"vm-with-template-tutorial-section__text",children:"Do you understand what does this mess do? Is it manageable? :) WITH expressions are happy to help in a few iterations."})]}),Nt("div",{className:"vm-with-template-tutorial-section",children:[Nt("p",{className:"vm-with-template-tutorial-section__text",children:"1. Extract common filters used in multiple places into a commonFilters variable:"}),Nt(mp,{code:'WITH (\n commonFilters = {instance=~"$node:$port",job=~"$job"}\n)\n(\n (\n (\n count(\n count(node_cpu_seconds_total{commonFilters}) by (cpu)\n )\n )\n -\n avg(\n sum by (mode) (rate(node_cpu_seconds_total{mode=\'idle\',commonFilters}[5m]))\n )\n )\n *\n 100\n)\n /\ncount(\n count(node_cpu_seconds_total{commonFilters}) by (cpu)\n)'})]}),Nt("div",{className:"vm-with-template-tutorial-section",children:[Nt("p",{className:"vm-with-template-tutorial-section__text",children:'2. Extract "count(count(...) by (cpu))" into cpuCount variable:'}),Nt(mp,{code:'WITH (\n commonFilters = {instance=~"$node:$port",job=~"$job"},\n cpuCount = count(count(node_cpu_seconds_total{commonFilters}) by (cpu))\n)\n(\n (\n cpuCount\n -\n avg(\n sum by (mode) (rate(node_cpu_seconds_total{mode=\'idle\',commonFilters}[5m]))\n )\n )\n *\n 100\n) / cpuCount'})]}),Nt("div",{className:"vm-with-template-tutorial-section",children:[Nt("p",{className:"vm-with-template-tutorial-section__text",children:"3. Extract rate(...) part into cpuIdle variable, since it is clear now that this part calculates the number of idle CPUs:"}),Nt(mp,{code:'WITH (\n commonFilters = {instance=~"$node:$port",job=~"$job"},\n cpuCount = count(count(node_cpu_seconds_total{commonFilters}) by (cpu)),\n cpuIdle = sum(rate(node_cpu_seconds_total{mode=\'idle\',commonFilters}[5m]))\n)\n((cpuCount - cpuIdle) * 100) / cpuCount'})]}),Nt("div",{className:"vm-with-template-tutorial-section",children:[Nt("p",{className:"vm-with-template-tutorial-section__text",children:["4. Put node_cpu_seconds_total","{commonFilters}"," into its own varialbe with the name cpuSeconds:"]}),Nt(mp,{code:'WITH (\n cpuSeconds = node_cpu_seconds_total{instance=~"$node:$port",job=~"$job"},\n cpuCount = count(count(cpuSeconds) by (cpu)),\n cpuIdle = sum(rate(cpuSeconds{mode=\'idle\'}[5m]))\n)\n((cpuCount - cpuIdle) * 100) / cpuCount'}),Nt("p",{className:"vm-with-template-tutorial-section__text",children:"Now the query became more clear comparing to the initial query."})]}),Nt("div",{className:"vm-with-template-tutorial-section",children:[Nt("p",{className:"vm-with-template-tutorial-section__text",children:"WITH expressions may be nested and may be put anywhere. Try expanding the following query:"}),Nt(mp,{code:"WITH (\n f(a, b) = WITH (\n f1(x) = b-x,\n f2(x) = x+x\n ) f1(a)*f2(b)\n) f(foo, with(x=bar) x)"})]})]}),gp=()=>{const{serverUrl:e}=Mt(),[t,n]=He(),[a,o]=(0,r.useState)(""),[i,l]=(0,r.useState)(!1),[s,c]=(0,r.useState)();return{data:a,error:s,loading:i,expand:async r=>{t.set("expr",r),n(t);const a=((e,t)=>"".concat(e,"/expand-with-exprs?query=").concat(encodeURIComponent(t),"&format=json"))(e,r);l(!0);try{const e=await fetch(a),t=await e.json();o((null===t||void 0===t?void 0:t.expr)||""),c(String(t.error||""))}catch(Lp){Lp instanceof Error&&"AbortError"!==Lp.name&&c("".concat(Lp.name,": ").concat(Lp.message))}l(!1)}}},yp=()=>{const[e]=He(),{data:t,loading:n,error:a,expand:o}=gp(),[i,l]=(0,r.useState)(e.get("expr")||""),s=()=>{o(i)};return(0,r.useEffect)((()=>{i&&o(i)}),[]),Nt("section",{className:"vm-with-template",children:[n&&Nt(wl,{}),Nt("div",{className:"vm-with-template-body vm-block",children:[Nt("div",{className:"vm-with-template-body__expr",children:Nt(Ya,{type:"textarea",label:"MetricsQL query with optional WITH expressions",value:i,error:a,autofocus:!0,onEnter:s,onChange:e=>{l(e)}})}),Nt("div",{className:"vm-with-template-body__result",children:Nt(Ya,{type:"textarea",label:"MetricsQL query after expanding WITH expressions and applying other optimizations",value:t,disabled:!0})}),Nt("div",{className:"vm-with-template-body-top",children:Nt(la,{variant:"contained",onClick:s,startIcon:Nt(qn,{}),children:"Expand"})})]}),Nt("div",{className:"vm-block",children:Nt(vp,{})})]})},_p=()=>{const{serverUrl:e}=Mt(),[t,n]=(0,r.useState)(null),[a,o]=(0,r.useState)(!1),[i,l]=(0,r.useState)();return{data:t,error:i,loading:a,fetchData:async(t,r)=>{const a=((e,t,n)=>{const r=["format=json","relabel_configs=".concat(encodeURIComponent(t)),"metric=".concat(encodeURIComponent(n))];return"".concat(e,"/metric-relabel-debug?").concat(r.join("&"))})(e,t,r);o(!0);try{const e=await fetch(a),t=await e.json();n(t.error?null:t),l(String(t.error||""))}catch(Lp){Lp instanceof Error&&"AbortError"!==Lp.name&&l("".concat(Lp.name,": ").concat(Lp.message))}o(!1)}}},bp={config:'- if: \'{bar_label=~"b.*"}\'\n source_labels: [foo_label, bar_label]\n separator: "_"\n target_label: foobar\n- action: labeldrop\n regex: "foo_.*"\n- target_label: job\n replacement: "my-application-2"',labels:'{__name__="my_metric", bar_label="bar", foo_label="foo", job="my-application", instance="192.168.0.1"}'},wp=()=>{const[e,t]=He(),{data:n,loading:a,error:o,fetchData:i}=_p(),[l,s]=_m("","config"),[c,u]=_m("","labels"),d=(0,r.useCallback)((()=>{i(l,c),e.set("config",l),e.set("labels",c),t(e)}),[l,c]);return(0,r.useEffect)((()=>{const t=e.get("config")||"",n=e.get("labels")||"";(n||t)&&(i(t,n),s(t),u(n))}),[]),Nt("section",{className:"vm-relabeling",children:[a&&Nt(wl,{}),Nt("div",{className:"vm-relabeling-header vm-block",children:[Nt("div",{className:"vm-relabeling-header-configs",children:Nt(Ya,{type:"textarea",label:"Relabel configs",value:l,autofocus:!0,onChange:e=>{s(e||"")},onEnter:d})}),Nt("div",{className:"vm-relabeling-header__labels",children:Nt(Ya,{type:"textarea",label:"Labels",value:c,onChange:e=>{u(e||"")},onEnter:d})}),Nt("div",{className:"vm-relabeling-header-bottom",children:[Nt("a",{className:"vm-link vm-link_with-icon",target:"_blank",href:"https://docs.victoriametrics.com/relabeling.html",rel:"help noreferrer",children:[Nt(On,{}),"Relabeling cookbook"]}),Nt("a",{className:"vm-link vm-link_with-icon",target:"_blank",href:"https://docs.victoriametrics.com/vmagent.html#relabeling",rel:"help noreferrer",children:[Nt(ir,{}),"Documentation"]}),Nt(la,{variant:"text",onClick:()=>{const{config:n,labels:r}=bp;s(n),u(r),i(n,r),e.set("config",n),e.set("labels",r),t(e)},children:"Try example"}),Nt(la,{variant:"contained",onClick:d,startIcon:Nt(qn,{}),children:"Submit"})]})]}),o&&Nt(na,{variant:"error",children:o}),n&&Nt("div",{className:"vm-relabeling-steps vm-block",children:[n.originalLabels&&Nt("div",{className:"vm-relabeling-steps-item",children:Nt("div",{className:"vm-relabeling-steps-item__row",children:[Nt("span",{children:"Original labels:"}),Nt("code",{dangerouslySetInnerHTML:{__html:n.originalLabels}})]})}),n.steps.map(((e,t)=>Nt("div",{className:"vm-relabeling-steps-item",children:[Nt("div",{className:"vm-relabeling-steps-item__row",children:[Nt("span",{children:"Step:"}),t+1]}),Nt("div",{className:"vm-relabeling-steps-item__row",children:[Nt("span",{children:"Relabeling Rule:"}),Nt("code",{children:Nt("pre",{children:e.rule})})]}),Nt("div",{className:"vm-relabeling-steps-item__row",children:[Nt("span",{children:"Input Labels:"}),Nt("code",{children:Nt("pre",{dangerouslySetInnerHTML:{__html:e.inLabels}})})]}),Nt("div",{className:"vm-relabeling-steps-item__row",children:[Nt("span",{children:"Output labels:"}),Nt("code",{children:Nt("pre",{dangerouslySetInnerHTML:{__html:e.outLabels}})})]})]},t))),n.resultingLabels&&Nt("div",{className:"vm-relabeling-steps-item",children:Nt("div",{className:"vm-relabeling-steps-item__row",children:[Nt("span",{children:"Resulting labels:"}),Nt("code",{dangerouslySetInnerHTML:{__html:n.resultingLabels}})]})})]})]})},kp=e=>{let{rows:t,columns:n,defaultOrderBy:a,defaultOrderDir:o,copyToClipboard:i,paginationOffset:l}=e;const[s,c]=(0,r.useState)(a),[u,d]=(0,r.useState)(o||"desc"),[h,m]=(0,r.useState)(null),p=(0,r.useMemo)((()=>{const{startIndex:e,endIndex:n}=l;return Cm(t,Sm(u,s)).slice(e,n)}),[t,s,u,l]),f=(e,t)=>async()=>{if(h!==t)try{await navigator.clipboard.writeText(String(e)),m(t)}catch(Lp){console.error(Lp)}};return(0,r.useEffect)((()=>{if(null===h)return;const e=setTimeout((()=>m(null)),2e3);return()=>clearTimeout(e)}),[h]),Nt("table",{className:"vm-table",children:[Nt("thead",{className:"vm-table-header",children:Nt("tr",{className:"vm-table__row vm-table__row_header",children:[n.map((e=>{return Nt("th",{className:"vm-table-cell vm-table-cell_header vm-table-cell_sort",onClick:(t=e.key,()=>{d((e=>"asc"===e&&s===t?"desc":"asc")),c(t)}),children:Nt("div",{className:"vm-table-cell__content",children:[Nt("div",{children:String(e.title||e.key)}),Nt("div",{className:Cr()({"vm-table__sort-icon":!0,"vm-table__sort-icon_active":s===e.key,"vm-table__sort-icon_desc":"desc"===u&&s===e.key}),children:Nt(Hn,{})})]})},String(e.key));var t})),i&&Nt("th",{className:"vm-table-cell vm-table-cell_header"})]})}),Nt("tbody",{className:"vm-table-body",children:p.map(((e,t)=>Nt("tr",{className:"vm-table__row",children:[n.map((t=>Nt("td",{className:Cr()({"vm-table-cell":!0,["".concat(t.className)]:t.className}),children:e[t.key]||"-"},String(t.key)))),i&&Nt("td",{className:"vm-table-cell vm-table-cell_right",children:e[i]&&Nt("div",{className:"vm-table-cell__content",children:Nt(ya,{title:h===t?"Copied":"Copy row",children:Nt(la,{variant:"text",color:h===t?"success":"gray",size:"small",startIcon:Nt(h===t?Xn:rr,{}),onClick:f(e[i],t),ariaLabel:"copy row"})})})})]},t)))})]})},xp=()=>{const{isMobile:e}=ea(),{timezone:t}=fn(),{data:n,lastUpdated:a,isLoading:i,error:l,fetchData:s}=(()=>{const{serverUrl:e}=Mt(),[t,n]=(0,r.useState)([]),[a,i]=(0,r.useState)(o()().format(Ot)),[l,s]=(0,r.useState)(!1),[c,u]=(0,r.useState)(),d=(0,r.useMemo)((()=>"".concat(e,"/api/v1/status/active_queries")),[e]),h=async()=>{s(!0);try{const e=await fetch(d),t=await e.json();n(t.data),i(o()().format("HH:mm:ss:SSS")),e.ok?u(void 0):u("".concat(t.errorType,"\r\n").concat(null===t||void 0===t?void 0:t.error))}catch(Lp){Lp instanceof Error&&u("".concat(Lp.name,": ").concat(Lp.message))}s(!1)};return(0,r.useEffect)((()=>{h().catch(console.error)}),[d]),{data:t,lastUpdated:a,isLoading:l,error:c,fetchData:h}})(),c=(0,r.useMemo)((()=>n.map((e=>{const t=o()(e.start).tz().format(Pt),n=o()(e.end).tz().format(Pt);return{duration:e.duration,remote_addr:e.remote_addr,query:e.query,args:"".concat(t," to ").concat(n,", step=").concat(Wt(e.step)),data:JSON.stringify(e,null,2)}}))),[n,t]),u=(0,r.useMemo)((()=>{if(null===c||void 0===c||!c.length)return[];const e=Object.keys(c[0]),t={remote_addr:"client address"},n=["data"];return e.filter((e=>!n.includes(e))).map((e=>({key:e,title:t[e]||e})))}),[c]);return Nt("div",{className:"vm-active-queries",children:[i&&Nt(wl,{}),Nt("div",{className:"vm-active-queries-header",children:[!c.length&&!l&&Nt(na,{variant:"info",children:"There are currently no active queries running"}),l&&Nt(na,{variant:"error",children:l}),Nt("div",{className:"vm-active-queries-header-controls",children:[Nt(la,{variant:"contained",onClick:async()=>{s().catch(console.error)},startIcon:Nt(Fn,{}),children:"Update"}),Nt("div",{className:"vm-active-queries-header__update-msg",children:["Last updated: ",a]})]})]}),!!c.length&&Nt("div",{className:Cr()({"vm-block":!0,"vm-block_mobile":e}),children:Nt(kp,{rows:c,columns:u,defaultOrderBy:"duration",copyToClipboard:"data",paginationOffset:{startIndex:0,endIndex:1/0}})})]})},Sp=e=>{let{onClose:t,onUpload:n}=e;const{isMobile:a}=ea(),[o,i]=(0,r.useState)(""),[l,s]=(0,r.useState)(""),c=(0,r.useMemo)((()=>{try{return JSON.parse(o),""}catch(Lp){return Lp instanceof Error?Lp.message:"Unknown error"}}),[o]),u=()=>{s(c),c||(n(o),t())};return Nt("div",{className:Cr()({"vm-json-form vm-json-form_one-field":!0,"vm-json-form_mobile vm-json-form_one-field_mobile":a}),children:[Nt(Ya,{value:o,label:"JSON",type:"textarea",error:l,autofocus:!0,onChange:e=>{s(""),i(e)},onEnter:u}),Nt("div",{className:"vm-json-form-footer",children:Nt("div",{className:"vm-json-form-footer__controls vm-json-form-footer__controls_right",children:[Nt(la,{variant:"outlined",color:"error",onClick:t,children:"Cancel"}),Nt(la,{variant:"contained",onClick:u,children:"apply"})]})})]})},Cp=e=>{let{data:t,period:n}=e;const{isMobile:a}=ea(),{tableCompact:o}=Fr(),i=jr(),[l,s]=(0,r.useState)([]),[c,u]=(0,r.useState)(),[d,h]=(0,r.useState)(),[m,p]=(0,r.useState)(!1),[f,v]=(0,r.useState)([]),[g,y]=(0,r.useState)(),_=(0,r.useMemo)((()=>Yh(d||[]).map((e=>e.key))),[d]),b=(0,r.useMemo)((()=>{const e=t.some((e=>"matrix"===e.data.resultType));return t.some((e=>"vector"===e.data.resultType))&&e?Lr:e?Lr.filter((e=>"chart"===e.value)):Lr.filter((e=>"chart"!==e.value))}),[t]),[w,k]=(0,r.useState)(b[0].value),{yaxis:x,spanGaps:S}=Ur(),C=Br(),E=e=>{C({type:"SET_YAXIS_LIMITS",payload:e})};return(0,r.useEffect)((()=>{const e="chart"===w?"matrix":"vector",n=t.filter((t=>t.data.resultType===e&&t.trace)).map((e=>{var t,n;return e.trace?new Cl(e.trace,(null===e||void 0===e||null===(t=e.vmui)||void 0===t||null===(n=t.params)||void 0===n?void 0:n.query)||"Query"):null}));s(n.filter(Boolean))}),[t,w]),(0,r.useEffect)((()=>{const e=[],n=[],r=[];t.forEach(((t,a)=>{const o=t.data.result.map((e=>{var n,r,o;return{...e,group:Number(null!==(n=null===(r=t.vmui)||void 0===r||null===(o=r.params)||void 0===o?void 0:o.id)&&void 0!==n?n:a)+1}}));var i,l;"matrix"===t.data.resultType?(n.push(...o),e.push((null===(i=t.vmui)||void 0===i||null===(l=i.params)||void 0===l?void 0:l.query)||"Query")):r.push(...o)})),v(e),u(n),h(r)}),[t]),(0,r.useEffect)((()=>{p(!!c&&Al(c))}),[c]),Nt("div",{className:Cr()({"vm-query-analyzer-view":!0,"vm-query-analyzer-view_mobile":a}),children:[!!l.length&&Nt(Hl,{traces:l,onDeleteClick:e=>{s((t=>t.filter((t=>t.idValue!==e.idValue))))}}),Nt("div",{className:Cr()({"vm-block":!0,"vm-block_mobile":a}),children:[Nt("div",{className:"vm-custom-panel-body-header",children:[Nt("div",{className:"vm-custom-panel-body-header__tabs",children:Nt(Tr,{activeItem:w,items:b,onChange:e=>{k(e)}})}),Nt("div",{className:"vm-custom-panel-body-header__graph-controls",children:["chart"===w&&Nt(xa,{}),"chart"===w&&Nt(Uh,{yaxis:x,setYaxisLimits:E,toggleEnableLimits:()=>{C({type:"TOGGLE_ENABLE_YAXIS_LIMITS"})},spanGaps:{value:S,onChange:e=>{C({type:"SET_SPAN_GAPS",payload:e})}}}),"table"===w&&Nt(Gh,{columns:_,defaultColumns:g,onChangeColumns:y,tableCompact:o,toggleTableCompact:()=>{i({type:"TOGGLE_TABLE_COMPACT"})}})]})]}),c&&n&&"chart"===w&&Nt(jh,{data:c,period:n,customStep:n.step||"1s",query:f,yaxis:x,setYaxisLimits:E,setPeriod:()=>null,height:a?.5*window.innerHeight:500,isHistogram:m,spanGaps:S}),d&&"code"===w&&Nt(qh,{data:d}),d&&"table"===w&&Nt(Kh,{data:d,displayColumns:g})]})]})},Ep=e=>{var t,n;let{data:a,period:i}=e;const l=(0,r.useMemo)((()=>a.filter((e=>e.stats&&"matrix"===e.data.resultType))),[a]),s=(0,r.useMemo)((()=>{var e,t;return null===(e=a.find((e=>{var t;return null===e||void 0===e||null===(t=e.vmui)||void 0===t?void 0:t.comment})))||void 0===e||null===(t=e.vmui)||void 0===t?void 0:t.comment}),[a]),c=(0,r.useMemo)((()=>{if(!i)return"";const e=o()(1e3*i.start).tz().format(Pt),t=o()(1e3*i.end).tz().format(Pt);return"".concat(e," - ").concat(t)}),[i]),{value:u,setTrue:d,setFalse:h}=ca(!1);return Nt(Ct.FK,{children:[Nt("div",{className:"vm-query-analyzer-info-header",children:[Nt(la,{startIcon:Nt(On,{}),variant:"outlined",color:"warning",onClick:d,children:"Show report info"}),i&&Nt(Ct.FK,{children:[Nt("div",{className:"vm-query-analyzer-info-header__period",children:[Nt(or,{})," step: ",i.step]}),Nt("div",{className:"vm-query-analyzer-info-header__period",children:[Nt(Vn,{})," ",c]})]})]}),u&&Nt(ga,{title:"Report info",onClose:h,children:Nt("div",{className:"vm-query-analyzer-info",children:[s&&Nt("div",{className:"vm-query-analyzer-info-item vm-query-analyzer-info-item_comment",children:[Nt("div",{className:"vm-query-analyzer-info-item__title",children:"Comment:"}),Nt("div",{className:"vm-query-analyzer-info-item__text",children:s})]}),l.map(((e,t)=>{var n;return Nt("div",{className:"vm-query-analyzer-info-item",children:[Nt("div",{className:"vm-query-analyzer-info-item__title",children:l.length>1?"Query ".concat(t+1,":"):"Stats:"}),Nt("div",{className:"vm-query-analyzer-info-item__text",children:[Object.entries(e.stats||{}).map((e=>{let[t,n]=e;return Nt("div",{children:[t,": ",null!==n&&void 0!==n?n:"-"]},t)})),"isPartial: ",String(null!==(n=e.isPartial)&&void 0!==n?n:"-")]})]},t)})),Nt("div",{className:"vm-query-analyzer-info-type",children:null!==(t=l[0])&&void 0!==t&&null!==(n=t.vmui)&&void 0!==n&&n.params?"The report was created using vmui":"The report was created manually"})]})})]})},Np=()=>{const[e,t]=(0,r.useState)([]),[n,a]=(0,r.useState)(""),o=(0,r.useMemo)((()=>!!e.length),[e]),{value:i,setTrue:l,setFalse:s}=ca(!1),c=(0,r.useMemo)((()=>{var t,n;if(!e)return;const r=null===(t=e[0])||void 0===t||null===(n=t.vmui)||void 0===n?void 0:n.params,a={start:+((null===r||void 0===r?void 0:r.start)||0),end:+((null===r||void 0===r?void 0:r.end)||0),step:null===r||void 0===r?void 0:r.step,date:""};if(!r){const t=e.filter((e=>"matrix"===e.data.resultType)).map((e=>e.data.result)).flat().map((e=>{var t;return e.values?null===(t=e.values)||void 0===t?void 0:t.map((e=>e[0])):[0]})).flat(),n=Array.from(new Set(t.filter(Boolean))).sort(((e,t)=>e-t));a.start=n[0],a.end=n[n.length-1],a.step=Yt((e=>{const t=e.slice(1).map(((t,n)=>t-e[n])),n={};t.forEach((e=>{const t=e.toString();n[t]=(n[t]||0)+1}));let r=0,a=0;for(const o in n)n[o]>a&&(a=n[o],r=Number(o));return r})(n))}return a.date=Jt(tn(a.end)),a}),[e]),u=e=>{try{const n=JSON.parse(e),r=Array.isArray(n)?n:[n];(e=>e.every((e=>{if("object"===typeof e&&null!==e){const t=e.data;if("object"===typeof t&&null!==t){const e=t.result,n=t.resultType;return Array.isArray(e)&&"string"===typeof n}}return!1})))(r)?t(r):a("Invalid structure - JSON does not match the expected format")}catch(Lp){Lp instanceof Error&&a("".concat(Lp.name,": ").concat(Lp.message))}},d=e=>{e.map((e=>{const t=new FileReader;t.onload=e=>{var t;const n=String(null===(t=e.target)||void 0===t?void 0:t.result);u(n)},t.readAsText(e)}))},h=e=>{a("");const t=Array.from(e.target.files||[]);d(t),e.target.value=""},{files:m,dragging:p}=Wm();return(0,r.useEffect)((()=>{d(m)}),[m]),Nt("div",{className:"vm-trace-page",children:[o&&Nt("div",{className:"vm-trace-page-header",children:[Nt("div",{className:"vm-trace-page-header-errors",children:Nt(Ep,{data:e,period:c})}),Nt("div",{children:Nt(Km,{onOpenModal:l,onChange:h})})]}),n&&Nt("div",{className:"vm-trace-page-header-errors-item vm-trace-page-header-errors-item_margin-bottom",children:[Nt(na,{variant:"error",children:n}),Nt(la,{className:"vm-trace-page-header-errors-item__close",startIcon:Nt(In,{}),variant:"text",color:"error",onClick:()=>{a("")}})]}),o&&Nt(Cp,{data:e,period:c}),!o&&Nt("div",{className:"vm-trace-page-preview",children:[Nt("p",{className:"vm-trace-page-preview__text",children:["Please, upload file with JSON response content.","\n","The file must contain query information in JSON format.","\n","Graph will be displayed after file upload.","\n","Attach files by dragging & dropping, selecting or pasting them."]}),Nt(Km,{onOpenModal:l,onChange:h})]}),i&&Nt(ga,{title:"Paste JSON",onClose:s,children:Nt(Sp,{onClose:s,onUpload:u})}),p&&Nt("div",{className:"vm-trace-page__dropzone"})]})},Ap=()=>{const[e,t]=(0,r.useState)(!1);return Nt(Ct.FK,{children:Nt(Ie,{children:Nt(aa,{children:Nt(Ct.FK,{children:[Nt(Ym,{onLoaded:t}),e&&Nt(xe,{children:Nt(we,{path:"/",element:Nt(Fo,{}),children:[Nt(we,{path:We.home,element:Nt(rm,{})}),Nt(we,{path:We.metrics,element:Nt(up,{})}),Nt(we,{path:We.cardinality,element:Nt(Rm,{})}),Nt(we,{path:We.topQueries,element:Nt(Vm,{})}),Nt(we,{path:We.trace,element:Nt(Qm,{})}),Nt(we,{path:We.queryAnalyzer,element:Nt(Np,{})}),Nt(we,{path:We.dashboards,element:Nt(lm,{})}),Nt(we,{path:We.withTemplate,element:Nt(yp,{})}),Nt(we,{path:We.relabel,element:Nt(wp,{})}),Nt(we,{path:We.activeQueries,element:Nt(xp,{})}),Nt(we,{path:We.icons,element:Nt(dp,{})})]})})]})})})})},Mp=e=>{e&&n.e(685).then(n.bind(n,685)).then((t=>{let{onCLS:n,onINP:r,onFCP:a,onLCP:o,onTTFB:i}=t;n(e),r(e),a(e),o(e),i(e)}))},Tp=document.getElementById("root");Tp&&(0,r.render)(Nt(Ap,{}),Tp),Mp()})()})(); \ No newline at end of file diff --git a/app/vmselect/vmui/static/js/main.621c4b4d.js b/app/vmselect/vmui/static/js/main.621c4b4d.js new file mode 100644 index 000000000..1f810be28 --- /dev/null +++ b/app/vmselect/vmui/static/js/main.621c4b4d.js @@ -0,0 +1,2 @@ +/*! For license information please see main.621c4b4d.js.LICENSE.txt */ +(()=>{var e={61:(e,t,n)=>{"use strict";var r=n(375),a=n(629),o=a(r("String.prototype.indexOf"));e.exports=function(e,t){var n=r(e,!!t);return"function"===typeof n&&o(e,".prototype.")>-1?a(n):n}},629:(e,t,n)=>{"use strict";var r=n(989),a=n(375),o=n(259),i=n(277),l=a("%Function.prototype.apply%"),s=a("%Function.prototype.call%"),c=a("%Reflect.apply%",!0)||r.call(s,l),u=n(709),d=a("%Math.max%");e.exports=function(e){if("function"!==typeof e)throw new i("a function is required");var t=c(r,s,arguments);return o(t,1+d(0,e.length-(arguments.length-1)),!0)};var h=function(){return c(r,l,arguments)};u?u(e.exports,"apply",{value:h}):e.exports.apply=h},159:function(e){e.exports=function(){"use strict";var e=1e3,t=6e4,n=36e5,r="millisecond",a="second",o="minute",i="hour",l="day",s="week",c="month",u="quarter",d="year",h="date",m="Invalid Date",p=/^(\d{4})[-/]?(\d{1,2})?[-/]?(\d{0,2})[Tt\s]*(\d{1,2})?:?(\d{1,2})?:?(\d{1,2})?[.:]?(\d+)?$/,f=/\[([^\]]+)]|Y{1,4}|M{1,4}|D{1,2}|d{1,4}|H{1,2}|h{1,2}|a|A|m{1,2}|s{1,2}|Z{1,2}|SSS/g,v={name:"en",weekdays:"Sunday_Monday_Tuesday_Wednesday_Thursday_Friday_Saturday".split("_"),months:"January_February_March_April_May_June_July_August_September_October_November_December".split("_"),ordinal:function(e){var t=["th","st","nd","rd"],n=e%100;return"["+e+(t[(n-20)%10]||t[n]||t[0])+"]"}},g=function(e,t,n){var r=String(e);return!r||r.length>=t?e:""+Array(t+1-r.length).join(n)+e},y={s:g,z:function(e){var t=-e.utcOffset(),n=Math.abs(t),r=Math.floor(n/60),a=n%60;return(t<=0?"+":"-")+g(r,2,"0")+":"+g(a,2,"0")},m:function e(t,n){if(t.date()1)return e(i[0])}else{var l=t.name;b[l]=t,a=l}return!r&&a&&(_=a),a||!r&&_},S=function(e,t){if(k(e))return e.clone();var n="object"==typeof t?t:{};return n.date=e,n.args=arguments,new E(n)},C=y;C.l=x,C.i=k,C.w=function(e,t){return S(e,{locale:t.$L,utc:t.$u,x:t.$x,$offset:t.$offset})};var E=function(){function v(e){this.$L=x(e.locale,null,!0),this.parse(e),this.$x=this.$x||e.x||{},this[w]=!0}var g=v.prototype;return g.parse=function(e){this.$d=function(e){var t=e.date,n=e.utc;if(null===t)return new Date(NaN);if(C.u(t))return new Date;if(t instanceof Date)return new Date(t);if("string"==typeof t&&!/Z$/i.test(t)){var r=t.match(p);if(r){var a=r[2]-1||0,o=(r[7]||"0").substring(0,3);return n?new Date(Date.UTC(r[1],a,r[3]||1,r[4]||0,r[5]||0,r[6]||0,o)):new Date(r[1],a,r[3]||1,r[4]||0,r[5]||0,r[6]||0,o)}}return new Date(t)}(e),this.init()},g.init=function(){var e=this.$d;this.$y=e.getFullYear(),this.$M=e.getMonth(),this.$D=e.getDate(),this.$W=e.getDay(),this.$H=e.getHours(),this.$m=e.getMinutes(),this.$s=e.getSeconds(),this.$ms=e.getMilliseconds()},g.$utils=function(){return C},g.isValid=function(){return!(this.$d.toString()===m)},g.isSame=function(e,t){var n=S(e);return this.startOf(t)<=n&&n<=this.endOf(t)},g.isAfter=function(e,t){return S(e)=0&&(o[d]=parseInt(u,10))}var h=o[3],m=24===h?0:h,p=o[0]+"-"+o[1]+"-"+o[2]+" "+m+":"+o[4]+":"+o[5]+":000",f=+t;return(a.utc(p).valueOf()-(f-=f%1e3))/6e4},s=r.prototype;s.tz=function(e,t){void 0===e&&(e=o);var n,r=this.utcOffset(),i=this.toDate(),l=i.toLocaleString("en-US",{timeZone:e}),s=Math.round((i-new Date(l))/1e3/60),c=15*-Math.round(i.getTimezoneOffset()/15)-s;if(Number(c)){if(n=a(l,{locale:this.$L}).$set("millisecond",this.$ms).utcOffset(c,!0),t){var u=n.utcOffset();n=n.add(r-u,"minute")}}else n=this.utcOffset(0,t);return n.$x.$timezone=e,n},s.offsetName=function(e){var t=this.$x.$timezone||a.tz.guess(),n=i(this.valueOf(),t,{timeZoneName:e}).find((function(e){return"timezonename"===e.type.toLowerCase()}));return n&&n.value};var c=s.startOf;s.startOf=function(e,t){if(!this.$x||!this.$x.$timezone)return c.call(this,e,t);var n=a(this.format("YYYY-MM-DD HH:mm:ss:SSS"),{locale:this.$L});return c.call(n,e,t).tz(this.$x.$timezone,!0)},a.tz=function(e,t,n){var r=n&&t,i=n||t||o,s=l(+a(),i);if("string"!=typeof e)return a(e).tz(i);var c=function(e,t,n){var r=e-60*t*1e3,a=l(r,n);if(t===a)return[r,t];var o=l(r-=60*(a-t)*1e3,n);return a===o?[r,a]:[e-60*Math.min(a,o)*1e3,Math.max(a,o)]}(a.utc(e,r).valueOf(),s,i),u=c[0],d=c[1],h=a(u).utcOffset(d);return h.$x.$timezone=i,h},a.tz.guess=function(){return Intl.DateTimeFormat().resolvedOptions().timeZone},a.tz.setDefault=function(e){o=e}}}()},220:function(e){e.exports=function(){"use strict";var e="minute",t=/[+-]\d\d(?::?\d\d)?/g,n=/([+-]|\d\d)/g;return function(r,a,o){var i=a.prototype;o.utc=function(e){return new a({date:e,utc:!0,args:arguments})},i.utc=function(t){var n=o(this.toDate(),{locale:this.$L,utc:!0});return t?n.add(this.utcOffset(),e):n},i.local=function(){return o(this.toDate(),{locale:this.$L,utc:!1})};var l=i.parse;i.parse=function(e){e.utc&&(this.$u=!0),this.$utils().u(e.$offset)||(this.$offset=e.$offset),l.call(this,e)};var s=i.init;i.init=function(){if(this.$u){var e=this.$d;this.$y=e.getUTCFullYear(),this.$M=e.getUTCMonth(),this.$D=e.getUTCDate(),this.$W=e.getUTCDay(),this.$H=e.getUTCHours(),this.$m=e.getUTCMinutes(),this.$s=e.getUTCSeconds(),this.$ms=e.getUTCMilliseconds()}else s.call(this)};var c=i.utcOffset;i.utcOffset=function(r,a){var o=this.$utils().u;if(o(r))return this.$u?0:o(this.$offset)?c.call(this):this.$offset;if("string"==typeof r&&(r=function(e){void 0===e&&(e="");var r=e.match(t);if(!r)return null;var a=(""+r[0]).match(n)||["-",0,0],o=a[0],i=60*+a[1]+ +a[2];return 0===i?0:"+"===o?i:-i}(r),null===r))return this;var i=Math.abs(r)<=16?60*r:r,l=this;if(a)return l.$offset=i,l.$u=0===r,l;if(0!==r){var s=this.$u?this.toDate().getTimezoneOffset():-1*this.utcOffset();(l=this.local().add(i+s,e)).$offset=i,l.$x.$localOffset=s}else l=this.utc();return l};var u=i.format;i.format=function(e){var t=e||(this.$u?"YYYY-MM-DDTHH:mm:ss[Z]":"");return u.call(this,t)},i.valueOf=function(){var e=this.$utils().u(this.$offset)?0:this.$offset+(this.$x.$localOffset||this.$d.getTimezoneOffset());return this.$d.valueOf()-6e4*e},i.isUTC=function(){return!!this.$u},i.toISOString=function(){return this.toDate().toISOString()},i.toString=function(){return this.toDate().toUTCString()};var d=i.toDate;i.toDate=function(e){return"s"===e&&this.$offset?o(this.format("YYYY-MM-DD HH:mm:ss:SSS")).toDate():d.call(this)};var h=i.diff;i.diff=function(e,t,n){if(e&&this.$u===e.$u)return h.call(this,e,t,n);var r=this.local(),a=o(e).local();return h.call(r,a,t,n)}}}()},411:(e,t,n)=>{"use strict";var r=n(709),a=n(430),o=n(277),i=n(553);e.exports=function(e,t,n){if(!e||"object"!==typeof e&&"function"!==typeof e)throw new o("`obj` must be an object or a function`");if("string"!==typeof t&&"symbol"!==typeof t)throw new o("`property` must be a string or a symbol`");if(arguments.length>3&&"boolean"!==typeof arguments[3]&&null!==arguments[3])throw new o("`nonEnumerable`, if provided, must be a boolean or null");if(arguments.length>4&&"boolean"!==typeof arguments[4]&&null!==arguments[4])throw new o("`nonWritable`, if provided, must be a boolean or null");if(arguments.length>5&&"boolean"!==typeof arguments[5]&&null!==arguments[5])throw new o("`nonConfigurable`, if provided, must be a boolean or null");if(arguments.length>6&&"boolean"!==typeof arguments[6])throw new o("`loose`, if provided, must be a boolean");var l=arguments.length>3?arguments[3]:null,s=arguments.length>4?arguments[4]:null,c=arguments.length>5?arguments[5]:null,u=arguments.length>6&&arguments[6],d=!!i&&i(e,t);if(r)r(e,t,{configurable:null===c&&d?d.configurable:!c,enumerable:null===l&&d?d.enumerable:!l,value:n,writable:null===s&&d?d.writable:!s});else{if(!u&&(l||s||c))throw new a("This environment does not support defining a property as non-configurable, non-writable, or non-enumerable.");e[t]=n}}},709:(e,t,n)=>{"use strict";var r=n(375)("%Object.defineProperty%",!0)||!1;if(r)try{r({},"a",{value:1})}catch(a){r=!1}e.exports=r},123:e=>{"use strict";e.exports=EvalError},953:e=>{"use strict";e.exports=Error},780:e=>{"use strict";e.exports=RangeError},768:e=>{"use strict";e.exports=ReferenceError},430:e=>{"use strict";e.exports=SyntaxError},277:e=>{"use strict";e.exports=TypeError},619:e=>{"use strict";e.exports=URIError},307:e=>{"use strict";var t=Object.prototype.toString,n=Math.max,r=function(e,t){for(var n=[],r=0;r{"use strict";var r=n(307);e.exports=Function.prototype.bind||r},375:(e,t,n)=>{"use strict";var r,a=n(953),o=n(123),i=n(780),l=n(768),s=n(430),c=n(277),u=n(619),d=Function,h=function(e){try{return d('"use strict"; return ('+e+").constructor;")()}catch(t){}},m=Object.getOwnPropertyDescriptor;if(m)try{m({},"")}catch(R){m=null}var p=function(){throw new c},f=m?function(){try{return p}catch(e){try{return m(arguments,"callee").get}catch(t){return p}}}():p,v=n(757)(),g=n(442)(),y=Object.getPrototypeOf||(g?function(e){return e.__proto__}:null),_={},b="undefined"!==typeof Uint8Array&&y?y(Uint8Array):r,w={__proto__:null,"%AggregateError%":"undefined"===typeof AggregateError?r:AggregateError,"%Array%":Array,"%ArrayBuffer%":"undefined"===typeof ArrayBuffer?r:ArrayBuffer,"%ArrayIteratorPrototype%":v&&y?y([][Symbol.iterator]()):r,"%AsyncFromSyncIteratorPrototype%":r,"%AsyncFunction%":_,"%AsyncGenerator%":_,"%AsyncGeneratorFunction%":_,"%AsyncIteratorPrototype%":_,"%Atomics%":"undefined"===typeof Atomics?r:Atomics,"%BigInt%":"undefined"===typeof BigInt?r:BigInt,"%BigInt64Array%":"undefined"===typeof BigInt64Array?r:BigInt64Array,"%BigUint64Array%":"undefined"===typeof BigUint64Array?r:BigUint64Array,"%Boolean%":Boolean,"%DataView%":"undefined"===typeof DataView?r:DataView,"%Date%":Date,"%decodeURI%":decodeURI,"%decodeURIComponent%":decodeURIComponent,"%encodeURI%":encodeURI,"%encodeURIComponent%":encodeURIComponent,"%Error%":a,"%eval%":eval,"%EvalError%":o,"%Float32Array%":"undefined"===typeof Float32Array?r:Float32Array,"%Float64Array%":"undefined"===typeof Float64Array?r:Float64Array,"%FinalizationRegistry%":"undefined"===typeof FinalizationRegistry?r:FinalizationRegistry,"%Function%":d,"%GeneratorFunction%":_,"%Int8Array%":"undefined"===typeof Int8Array?r:Int8Array,"%Int16Array%":"undefined"===typeof Int16Array?r:Int16Array,"%Int32Array%":"undefined"===typeof Int32Array?r:Int32Array,"%isFinite%":isFinite,"%isNaN%":isNaN,"%IteratorPrototype%":v&&y?y(y([][Symbol.iterator]())):r,"%JSON%":"object"===typeof JSON?JSON:r,"%Map%":"undefined"===typeof Map?r:Map,"%MapIteratorPrototype%":"undefined"!==typeof Map&&v&&y?y((new Map)[Symbol.iterator]()):r,"%Math%":Math,"%Number%":Number,"%Object%":Object,"%parseFloat%":parseFloat,"%parseInt%":parseInt,"%Promise%":"undefined"===typeof Promise?r:Promise,"%Proxy%":"undefined"===typeof Proxy?r:Proxy,"%RangeError%":i,"%ReferenceError%":l,"%Reflect%":"undefined"===typeof Reflect?r:Reflect,"%RegExp%":RegExp,"%Set%":"undefined"===typeof Set?r:Set,"%SetIteratorPrototype%":"undefined"!==typeof Set&&v&&y?y((new Set)[Symbol.iterator]()):r,"%SharedArrayBuffer%":"undefined"===typeof SharedArrayBuffer?r:SharedArrayBuffer,"%String%":String,"%StringIteratorPrototype%":v&&y?y(""[Symbol.iterator]()):r,"%Symbol%":v?Symbol:r,"%SyntaxError%":s,"%ThrowTypeError%":f,"%TypedArray%":b,"%TypeError%":c,"%Uint8Array%":"undefined"===typeof Uint8Array?r:Uint8Array,"%Uint8ClampedArray%":"undefined"===typeof Uint8ClampedArray?r:Uint8ClampedArray,"%Uint16Array%":"undefined"===typeof Uint16Array?r:Uint16Array,"%Uint32Array%":"undefined"===typeof Uint32Array?r:Uint32Array,"%URIError%":u,"%WeakMap%":"undefined"===typeof WeakMap?r:WeakMap,"%WeakRef%":"undefined"===typeof WeakRef?r:WeakRef,"%WeakSet%":"undefined"===typeof WeakSet?r:WeakSet};if(y)try{null.error}catch(R){var k=y(y(R));w["%Error.prototype%"]=k}var x=function e(t){var n;if("%AsyncFunction%"===t)n=h("async function () {}");else if("%GeneratorFunction%"===t)n=h("function* () {}");else if("%AsyncGeneratorFunction%"===t)n=h("async function* () {}");else if("%AsyncGenerator%"===t){var r=e("%AsyncGeneratorFunction%");r&&(n=r.prototype)}else if("%AsyncIteratorPrototype%"===t){var a=e("%AsyncGenerator%");a&&y&&(n=y(a.prototype))}return w[t]=n,n},S={__proto__:null,"%ArrayBufferPrototype%":["ArrayBuffer","prototype"],"%ArrayPrototype%":["Array","prototype"],"%ArrayProto_entries%":["Array","prototype","entries"],"%ArrayProto_forEach%":["Array","prototype","forEach"],"%ArrayProto_keys%":["Array","prototype","keys"],"%ArrayProto_values%":["Array","prototype","values"],"%AsyncFunctionPrototype%":["AsyncFunction","prototype"],"%AsyncGenerator%":["AsyncGeneratorFunction","prototype"],"%AsyncGeneratorPrototype%":["AsyncGeneratorFunction","prototype","prototype"],"%BooleanPrototype%":["Boolean","prototype"],"%DataViewPrototype%":["DataView","prototype"],"%DatePrototype%":["Date","prototype"],"%ErrorPrototype%":["Error","prototype"],"%EvalErrorPrototype%":["EvalError","prototype"],"%Float32ArrayPrototype%":["Float32Array","prototype"],"%Float64ArrayPrototype%":["Float64Array","prototype"],"%FunctionPrototype%":["Function","prototype"],"%Generator%":["GeneratorFunction","prototype"],"%GeneratorPrototype%":["GeneratorFunction","prototype","prototype"],"%Int8ArrayPrototype%":["Int8Array","prototype"],"%Int16ArrayPrototype%":["Int16Array","prototype"],"%Int32ArrayPrototype%":["Int32Array","prototype"],"%JSONParse%":["JSON","parse"],"%JSONStringify%":["JSON","stringify"],"%MapPrototype%":["Map","prototype"],"%NumberPrototype%":["Number","prototype"],"%ObjectPrototype%":["Object","prototype"],"%ObjProto_toString%":["Object","prototype","toString"],"%ObjProto_valueOf%":["Object","prototype","valueOf"],"%PromisePrototype%":["Promise","prototype"],"%PromiseProto_then%":["Promise","prototype","then"],"%Promise_all%":["Promise","all"],"%Promise_reject%":["Promise","reject"],"%Promise_resolve%":["Promise","resolve"],"%RangeErrorPrototype%":["RangeError","prototype"],"%ReferenceErrorPrototype%":["ReferenceError","prototype"],"%RegExpPrototype%":["RegExp","prototype"],"%SetPrototype%":["Set","prototype"],"%SharedArrayBufferPrototype%":["SharedArrayBuffer","prototype"],"%StringPrototype%":["String","prototype"],"%SymbolPrototype%":["Symbol","prototype"],"%SyntaxErrorPrototype%":["SyntaxError","prototype"],"%TypedArrayPrototype%":["TypedArray","prototype"],"%TypeErrorPrototype%":["TypeError","prototype"],"%Uint8ArrayPrototype%":["Uint8Array","prototype"],"%Uint8ClampedArrayPrototype%":["Uint8ClampedArray","prototype"],"%Uint16ArrayPrototype%":["Uint16Array","prototype"],"%Uint32ArrayPrototype%":["Uint32Array","prototype"],"%URIErrorPrototype%":["URIError","prototype"],"%WeakMapPrototype%":["WeakMap","prototype"],"%WeakSetPrototype%":["WeakSet","prototype"]},C=n(989),E=n(155),N=C.call(Function.call,Array.prototype.concat),A=C.call(Function.apply,Array.prototype.splice),M=C.call(Function.call,String.prototype.replace),T=C.call(Function.call,String.prototype.slice),L=C.call(Function.call,RegExp.prototype.exec),O=/[^%.[\]]+|\[(?:(-?\d+(?:\.\d+)?)|(["'])((?:(?!\2)[^\\]|\\.)*?)\2)\]|(?=(?:\.|\[\])(?:\.|\[\]|%$))/g,P=/\\(\\)?/g,I=function(e,t){var n,r=e;if(E(S,r)&&(r="%"+(n=S[r])[0]+"%"),E(w,r)){var a=w[r];if(a===_&&(a=x(r)),"undefined"===typeof a&&!t)throw new c("intrinsic "+e+" exists, but is not available. Please file an issue!");return{alias:n,name:r,value:a}}throw new s("intrinsic "+e+" does not exist!")};e.exports=function(e,t){if("string"!==typeof e||0===e.length)throw new c("intrinsic name must be a non-empty string");if(arguments.length>1&&"boolean"!==typeof t)throw new c('"allowMissing" argument must be a boolean');if(null===L(/^%?[^%]*%?$/,e))throw new s("`%` may not be present anywhere but at the beginning and end of the intrinsic name");var n=function(e){var t=T(e,0,1),n=T(e,-1);if("%"===t&&"%"!==n)throw new s("invalid intrinsic syntax, expected closing `%`");if("%"===n&&"%"!==t)throw new s("invalid intrinsic syntax, expected opening `%`");var r=[];return M(e,O,(function(e,t,n,a){r[r.length]=n?M(a,P,"$1"):t||e})),r}(e),r=n.length>0?n[0]:"",a=I("%"+r+"%",t),o=a.name,i=a.value,l=!1,u=a.alias;u&&(r=u[0],A(n,N([0,1],u)));for(var d=1,h=!0;d=n.length){var g=m(i,p);i=(h=!!g)&&"get"in g&&!("originalValue"in g.get)?g.get:i[p]}else h=E(i,p),i=i[p];h&&!l&&(w[o]=i)}}return i}},553:(e,t,n)=>{"use strict";var r=n(375)("%Object.getOwnPropertyDescriptor%",!0);if(r)try{r([],"length")}catch(a){r=null}e.exports=r},734:(e,t,n)=>{"use strict";var r=n(709),a=function(){return!!r};a.hasArrayLengthDefineBug=function(){if(!r)return null;try{return 1!==r([],"length",{value:1}).length}catch(e){return!0}},e.exports=a},442:e=>{"use strict";var t={__proto__:null,foo:{}},n=Object;e.exports=function(){return{__proto__:t}.foo===t.foo&&!(t instanceof n)}},757:(e,t,n)=>{"use strict";var r="undefined"!==typeof Symbol&&Symbol,a=n(175);e.exports=function(){return"function"===typeof r&&("function"===typeof Symbol&&("symbol"===typeof r("foo")&&("symbol"===typeof Symbol("bar")&&a())))}},175:e=>{"use strict";e.exports=function(){if("function"!==typeof Symbol||"function"!==typeof Object.getOwnPropertySymbols)return!1;if("symbol"===typeof Symbol.iterator)return!0;var e={},t=Symbol("test"),n=Object(t);if("string"===typeof t)return!1;if("[object Symbol]"!==Object.prototype.toString.call(t))return!1;if("[object Symbol]"!==Object.prototype.toString.call(n))return!1;for(t in e[t]=42,e)return!1;if("function"===typeof Object.keys&&0!==Object.keys(e).length)return!1;if("function"===typeof Object.getOwnPropertyNames&&0!==Object.getOwnPropertyNames(e).length)return!1;var r=Object.getOwnPropertySymbols(e);if(1!==r.length||r[0]!==t)return!1;if(!Object.prototype.propertyIsEnumerable.call(e,t))return!1;if("function"===typeof Object.getOwnPropertyDescriptor){var a=Object.getOwnPropertyDescriptor(e,t);if(42!==a.value||!0!==a.enumerable)return!1}return!0}},155:(e,t,n)=>{"use strict";var r=Function.prototype.call,a=Object.prototype.hasOwnProperty,o=n(989);e.exports=o.call(r,a)},267:(e,t,n)=>{var r=NaN,a="[object Symbol]",o=/^\s+|\s+$/g,i=/^[-+]0x[0-9a-f]+$/i,l=/^0b[01]+$/i,s=/^0o[0-7]+$/i,c=parseInt,u="object"==typeof n.g&&n.g&&n.g.Object===Object&&n.g,d="object"==typeof self&&self&&self.Object===Object&&self,h=u||d||Function("return this")(),m=Object.prototype.toString,p=Math.max,f=Math.min,v=function(){return h.Date.now()};function g(e){var t=typeof e;return!!e&&("object"==t||"function"==t)}function y(e){if("number"==typeof e)return e;if(function(e){return"symbol"==typeof e||function(e){return!!e&&"object"==typeof e}(e)&&m.call(e)==a}(e))return r;if(g(e)){var t="function"==typeof e.valueOf?e.valueOf():e;e=g(t)?t+"":t}if("string"!=typeof e)return 0===e?e:+e;e=e.replace(o,"");var n=l.test(e);return n||s.test(e)?c(e.slice(2),n?2:8):i.test(e)?r:+e}e.exports=function(e,t,n){var r,a,o,i,l,s,c=0,u=!1,d=!1,h=!0;if("function"!=typeof e)throw new TypeError("Expected a function");function m(t){var n=r,o=a;return r=a=void 0,c=t,i=e.apply(o,n)}function _(e){var n=e-s;return void 0===s||n>=t||n<0||d&&e-c>=o}function b(){var e=v();if(_(e))return w(e);l=setTimeout(b,function(e){var n=t-(e-s);return d?f(n,o-(e-c)):n}(e))}function w(e){return l=void 0,h&&r?m(e):(r=a=void 0,i)}function k(){var e=v(),n=_(e);if(r=arguments,a=this,s=e,n){if(void 0===l)return function(e){return c=e,l=setTimeout(b,t),u?m(e):i}(s);if(d)return l=setTimeout(b,t),m(s)}return void 0===l&&(l=setTimeout(b,t)),i}return t=y(t)||0,g(n)&&(u=!!n.leading,o=(d="maxWait"in n)?p(y(n.maxWait)||0,t):o,h="trailing"in n?!!n.trailing:h),k.cancel=function(){void 0!==l&&clearTimeout(l),c=0,r=s=a=l=void 0},k.flush=function(){return void 0===l?i:w(v())},k}},424:(e,t,n)=>{var r="__lodash_hash_undefined__",a=1/0,o="[object Function]",i="[object GeneratorFunction]",l="[object Symbol]",s=/\.|\[(?:[^[\]]*|(["'])(?:(?!\1)[^\\]|\\.)*?\1)\]/,c=/^\w*$/,u=/^\./,d=/[^.[\]]+|\[(?:(-?\d+(?:\.\d+)?)|(["'])((?:(?!\2)[^\\]|\\.)*?)\2)\]|(?=(?:\.|\[\])(?:\.|\[\]|$))/g,h=/\\(\\)?/g,m=/^\[object .+?Constructor\]$/,p="object"==typeof n.g&&n.g&&n.g.Object===Object&&n.g,f="object"==typeof self&&self&&self.Object===Object&&self,v=p||f||Function("return this")();var g=Array.prototype,y=Function.prototype,_=Object.prototype,b=v["__core-js_shared__"],w=function(){var e=/[^.]+$/.exec(b&&b.keys&&b.keys.IE_PROTO||"");return e?"Symbol(src)_1."+e:""}(),k=y.toString,x=_.hasOwnProperty,S=_.toString,C=RegExp("^"+k.call(x).replace(/[\\^$.*+?()[\]{}|]/g,"\\$&").replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g,"$1.*?")+"$"),E=v.Symbol,N=g.splice,A=j(v,"Map"),M=j(Object,"create"),T=E?E.prototype:void 0,L=T?T.toString:void 0;function O(e){var t=-1,n=e?e.length:0;for(this.clear();++t-1},P.prototype.set=function(e,t){var n=this.__data__,r=R(n,e);return r<0?n.push([e,t]):n[r][1]=t,this},I.prototype.clear=function(){this.__data__={hash:new O,map:new(A||P),string:new O}},I.prototype.delete=function(e){return F(this,e).delete(e)},I.prototype.get=function(e){return F(this,e).get(e)},I.prototype.has=function(e){return F(this,e).has(e)},I.prototype.set=function(e,t){return F(this,e).set(e,t),this};var H=V((function(e){var t;e=null==(t=e)?"":function(e){if("string"==typeof e)return e;if(q(e))return L?L.call(e):"";var t=e+"";return"0"==t&&1/e==-a?"-0":t}(t);var n=[];return u.test(e)&&n.push(""),e.replace(d,(function(e,t,r,a){n.push(r?a.replace(h,"$1"):t||e)})),n}));function $(e){if("string"==typeof e||q(e))return e;var t=e+"";return"0"==t&&1/e==-a?"-0":t}function V(e,t){if("function"!=typeof e||t&&"function"!=typeof t)throw new TypeError("Expected a function");var n=function(){var r=arguments,a=t?t.apply(this,r):r[0],o=n.cache;if(o.has(a))return o.get(a);var i=e.apply(this,r);return n.cache=o.set(a,i),i};return n.cache=new(V.Cache||I),n}V.Cache=I;var U=Array.isArray;function B(e){var t=typeof e;return!!e&&("object"==t||"function"==t)}function q(e){return"symbol"==typeof e||function(e){return!!e&&"object"==typeof e}(e)&&S.call(e)==l}e.exports=function(e,t,n){var r=null==e?void 0:D(e,t);return void 0===r?n:r}},141:(e,t,n)=>{var r="function"===typeof Map&&Map.prototype,a=Object.getOwnPropertyDescriptor&&r?Object.getOwnPropertyDescriptor(Map.prototype,"size"):null,o=r&&a&&"function"===typeof a.get?a.get:null,i=r&&Map.prototype.forEach,l="function"===typeof Set&&Set.prototype,s=Object.getOwnPropertyDescriptor&&l?Object.getOwnPropertyDescriptor(Set.prototype,"size"):null,c=l&&s&&"function"===typeof s.get?s.get:null,u=l&&Set.prototype.forEach,d="function"===typeof WeakMap&&WeakMap.prototype?WeakMap.prototype.has:null,h="function"===typeof WeakSet&&WeakSet.prototype?WeakSet.prototype.has:null,m="function"===typeof WeakRef&&WeakRef.prototype?WeakRef.prototype.deref:null,p=Boolean.prototype.valueOf,f=Object.prototype.toString,v=Function.prototype.toString,g=String.prototype.match,y=String.prototype.slice,_=String.prototype.replace,b=String.prototype.toUpperCase,w=String.prototype.toLowerCase,k=RegExp.prototype.test,x=Array.prototype.concat,S=Array.prototype.join,C=Array.prototype.slice,E=Math.floor,N="function"===typeof BigInt?BigInt.prototype.valueOf:null,A=Object.getOwnPropertySymbols,M="function"===typeof Symbol&&"symbol"===typeof Symbol.iterator?Symbol.prototype.toString:null,T="function"===typeof Symbol&&"object"===typeof Symbol.iterator,L="function"===typeof Symbol&&Symbol.toStringTag&&(typeof Symbol.toStringTag===T||"symbol")?Symbol.toStringTag:null,O=Object.prototype.propertyIsEnumerable,P=("function"===typeof Reflect?Reflect.getPrototypeOf:Object.getPrototypeOf)||([].__proto__===Array.prototype?function(e){return e.__proto__}:null);function I(e,t){if(e===1/0||e===-1/0||e!==e||e&&e>-1e3&&e<1e3||k.call(/e/,t))return t;var n=/[0-9](?=(?:[0-9]{3})+(?![0-9]))/g;if("number"===typeof e){var r=e<0?-E(-e):E(e);if(r!==e){var a=String(r),o=y.call(t,a.length+1);return _.call(a,n,"$&_")+"."+_.call(_.call(o,/([0-9]{3})/g,"$&_"),/_$/,"")}}return _.call(t,n,"$&_")}var R=n(634),D=R.custom,z=V(D)?D:null;function F(e,t,n){var r="double"===(n.quoteStyle||t)?'"':"'";return r+e+r}function j(e){return _.call(String(e),/"/g,""")}function H(e){return"[object Array]"===q(e)&&(!L||!("object"===typeof e&&L in e))}function $(e){return"[object RegExp]"===q(e)&&(!L||!("object"===typeof e&&L in e))}function V(e){if(T)return e&&"object"===typeof e&&e instanceof Symbol;if("symbol"===typeof e)return!0;if(!e||"object"!==typeof e||!M)return!1;try{return M.call(e),!0}catch(t){}return!1}e.exports=function e(t,r,a,l){var s=r||{};if(B(s,"quoteStyle")&&"single"!==s.quoteStyle&&"double"!==s.quoteStyle)throw new TypeError('option "quoteStyle" must be "single" or "double"');if(B(s,"maxStringLength")&&("number"===typeof s.maxStringLength?s.maxStringLength<0&&s.maxStringLength!==1/0:null!==s.maxStringLength))throw new TypeError('option "maxStringLength", if provided, must be a positive integer, Infinity, or `null`');var f=!B(s,"customInspect")||s.customInspect;if("boolean"!==typeof f&&"symbol"!==f)throw new TypeError("option \"customInspect\", if provided, must be `true`, `false`, or `'symbol'`");if(B(s,"indent")&&null!==s.indent&&"\t"!==s.indent&&!(parseInt(s.indent,10)===s.indent&&s.indent>0))throw new TypeError('option "indent" must be "\\t", an integer > 0, or `null`');if(B(s,"numericSeparator")&&"boolean"!==typeof s.numericSeparator)throw new TypeError('option "numericSeparator", if provided, must be `true` or `false`');var b=s.numericSeparator;if("undefined"===typeof t)return"undefined";if(null===t)return"null";if("boolean"===typeof t)return t?"true":"false";if("string"===typeof t)return W(t,s);if("number"===typeof t){if(0===t)return 1/0/t>0?"0":"-0";var k=String(t);return b?I(t,k):k}if("bigint"===typeof t){var E=String(t)+"n";return b?I(t,E):E}var A="undefined"===typeof s.depth?5:s.depth;if("undefined"===typeof a&&(a=0),a>=A&&A>0&&"object"===typeof t)return H(t)?"[Array]":"[Object]";var D=function(e,t){var n;if("\t"===e.indent)n="\t";else{if(!("number"===typeof e.indent&&e.indent>0))return null;n=S.call(Array(e.indent+1)," ")}return{base:n,prev:S.call(Array(t+1),n)}}(s,a);if("undefined"===typeof l)l=[];else if(Y(l,t)>=0)return"[Circular]";function U(t,n,r){if(n&&(l=C.call(l)).push(n),r){var o={depth:s.depth};return B(s,"quoteStyle")&&(o.quoteStyle=s.quoteStyle),e(t,o,a+1,l)}return e(t,s,a+1,l)}if("function"===typeof t&&!$(t)){var K=function(e){if(e.name)return e.name;var t=g.call(v.call(e),/^function\s*([\w$]+)/);if(t)return t[1];return null}(t),ee=X(t,U);return"[Function"+(K?": "+K:" (anonymous)")+"]"+(ee.length>0?" { "+S.call(ee,", ")+" }":"")}if(V(t)){var te=T?_.call(String(t),/^(Symbol\(.*\))_[^)]*$/,"$1"):M.call(t);return"object"!==typeof t||T?te:Q(te)}if(function(e){if(!e||"object"!==typeof e)return!1;if("undefined"!==typeof HTMLElement&&e instanceof HTMLElement)return!0;return"string"===typeof e.nodeName&&"function"===typeof e.getAttribute}(t)){for(var ne="<"+w.call(String(t.nodeName)),re=t.attributes||[],ae=0;ae"}if(H(t)){if(0===t.length)return"[]";var oe=X(t,U);return D&&!function(e){for(var t=0;t=0)return!1;return!0}(oe)?"["+J(oe,D)+"]":"[ "+S.call(oe,", ")+" ]"}if(function(e){return"[object Error]"===q(e)&&(!L||!("object"===typeof e&&L in e))}(t)){var ie=X(t,U);return"cause"in Error.prototype||!("cause"in t)||O.call(t,"cause")?0===ie.length?"["+String(t)+"]":"{ ["+String(t)+"] "+S.call(ie,", ")+" }":"{ ["+String(t)+"] "+S.call(x.call("[cause]: "+U(t.cause),ie),", ")+" }"}if("object"===typeof t&&f){if(z&&"function"===typeof t[z]&&R)return R(t,{depth:A-a});if("symbol"!==f&&"function"===typeof t.inspect)return t.inspect()}if(function(e){if(!o||!e||"object"!==typeof e)return!1;try{o.call(e);try{c.call(e)}catch(ne){return!0}return e instanceof Map}catch(t){}return!1}(t)){var le=[];return i&&i.call(t,(function(e,n){le.push(U(n,t,!0)+" => "+U(e,t))})),G("Map",o.call(t),le,D)}if(function(e){if(!c||!e||"object"!==typeof e)return!1;try{c.call(e);try{o.call(e)}catch(t){return!0}return e instanceof Set}catch(n){}return!1}(t)){var se=[];return u&&u.call(t,(function(e){se.push(U(e,t))})),G("Set",c.call(t),se,D)}if(function(e){if(!d||!e||"object"!==typeof e)return!1;try{d.call(e,d);try{h.call(e,h)}catch(ne){return!0}return e instanceof WeakMap}catch(t){}return!1}(t))return Z("WeakMap");if(function(e){if(!h||!e||"object"!==typeof e)return!1;try{h.call(e,h);try{d.call(e,d)}catch(ne){return!0}return e instanceof WeakSet}catch(t){}return!1}(t))return Z("WeakSet");if(function(e){if(!m||!e||"object"!==typeof e)return!1;try{return m.call(e),!0}catch(t){}return!1}(t))return Z("WeakRef");if(function(e){return"[object Number]"===q(e)&&(!L||!("object"===typeof e&&L in e))}(t))return Q(U(Number(t)));if(function(e){if(!e||"object"!==typeof e||!N)return!1;try{return N.call(e),!0}catch(t){}return!1}(t))return Q(U(N.call(t)));if(function(e){return"[object Boolean]"===q(e)&&(!L||!("object"===typeof e&&L in e))}(t))return Q(p.call(t));if(function(e){return"[object String]"===q(e)&&(!L||!("object"===typeof e&&L in e))}(t))return Q(U(String(t)));if("undefined"!==typeof window&&t===window)return"{ [object Window] }";if("undefined"!==typeof globalThis&&t===globalThis||"undefined"!==typeof n.g&&t===n.g)return"{ [object globalThis] }";if(!function(e){return"[object Date]"===q(e)&&(!L||!("object"===typeof e&&L in e))}(t)&&!$(t)){var ce=X(t,U),ue=P?P(t)===Object.prototype:t instanceof Object||t.constructor===Object,de=t instanceof Object?"":"null prototype",he=!ue&&L&&Object(t)===t&&L in t?y.call(q(t),8,-1):de?"Object":"",me=(ue||"function"!==typeof t.constructor?"":t.constructor.name?t.constructor.name+" ":"")+(he||de?"["+S.call(x.call([],he||[],de||[]),": ")+"] ":"");return 0===ce.length?me+"{}":D?me+"{"+J(ce,D)+"}":me+"{ "+S.call(ce,", ")+" }"}return String(t)};var U=Object.prototype.hasOwnProperty||function(e){return e in this};function B(e,t){return U.call(e,t)}function q(e){return f.call(e)}function Y(e,t){if(e.indexOf)return e.indexOf(t);for(var n=0,r=e.length;nt.maxStringLength){var n=e.length-t.maxStringLength,r="... "+n+" more character"+(n>1?"s":"");return W(y.call(e,0,t.maxStringLength),t)+r}return F(_.call(_.call(e,/(['\\])/g,"\\$1"),/[\x00-\x1f]/g,K),"single",t)}function K(e){var t=e.charCodeAt(0),n={8:"b",9:"t",10:"n",12:"f",13:"r"}[t];return n?"\\"+n:"\\x"+(t<16?"0":"")+b.call(t.toString(16))}function Q(e){return"Object("+e+")"}function Z(e){return e+" { ? }"}function G(e,t,n,r){return e+" ("+t+") {"+(r?J(n,r):S.call(n,", "))+"}"}function J(e,t){if(0===e.length)return"";var n="\n"+t.prev+t.base;return n+S.call(e,","+n)+"\n"+t.prev}function X(e,t){var n=H(e),r=[];if(n){r.length=e.length;for(var a=0;a{"use strict";n.r(t),n.d(t,{Children:()=>q,Component:()=>l.uA,Fragment:()=>l.FK,PureComponent:()=>j,StrictMode:()=>Oe,Suspense:()=>Z,SuspenseList:()=>X,__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED:()=>we,cloneElement:()=>Ne,createContext:()=>l.q6,createElement:()=>l.n,createFactory:()=>xe,createPortal:()=>re,createRef:()=>l._3,default:()=>He,findDOMNode:()=>Me,flushSync:()=>Le,forwardRef:()=>U,hydrate:()=>de,isElement:()=>ze,isFragment:()=>Ce,isMemo:()=>Ee,isValidElement:()=>Se,lazy:()=>J,memo:()=>H,render:()=>ue,startTransition:()=>Pe,unmountComponentAtNode:()=>Ae,unstable_batchedUpdates:()=>Te,useCallback:()=>C,useContext:()=>E,useDebugValue:()=>N,useDeferredValue:()=>Ie,useEffect:()=>b,useErrorBoundary:()=>A,useId:()=>M,useImperativeHandle:()=>x,useInsertionEffect:()=>De,useLayoutEffect:()=>w,useMemo:()=>S,useReducer:()=>_,useRef:()=>k,useState:()=>y,useSyncExternalStore:()=>Fe,useTransition:()=>Re,version:()=>ke});var r,a,o,i,l=n(746),s=0,c=[],u=l.fF,d=u.__b,h=u.__r,m=u.diffed,p=u.__c,f=u.unmount,v=u.__;function g(e,t){u.__h&&u.__h(a,e,s||t),s=0;var n=a.__H||(a.__H={__:[],__h:[]});return e>=n.__.length&&n.__.push({}),n.__[e]}function y(e){return s=1,_(D,e)}function _(e,t,n){var o=g(r++,2);if(o.t=e,!o.__c&&(o.__=[n?n(t):D(void 0,t),function(e){var t=o.__N?o.__N[0]:o.__[0],n=o.t(t,e);t!==n&&(o.__N=[n,o.__[1]],o.__c.setState({}))}],o.__c=a,!a.u)){var i=function(e,t,n){if(!o.__c.__H)return!0;var r=o.__c.__H.__.filter((function(e){return!!e.__c}));if(r.every((function(e){return!e.__N})))return!l||l.call(this,e,t,n);var a=!1;return r.forEach((function(e){if(e.__N){var t=e.__[0];e.__=e.__N,e.__N=void 0,t!==e.__[0]&&(a=!0)}})),!(!a&&o.__c.props===e)&&(!l||l.call(this,e,t,n))};a.u=!0;var l=a.shouldComponentUpdate,s=a.componentWillUpdate;a.componentWillUpdate=function(e,t,n){if(this.__e){var r=l;l=void 0,i(e,t,n),l=r}s&&s.call(this,e,t,n)},a.shouldComponentUpdate=i}return o.__N||o.__}function b(e,t){var n=g(r++,3);!u.__s&&R(n.__H,t)&&(n.__=e,n.i=t,a.__H.__h.push(n))}function w(e,t){var n=g(r++,4);!u.__s&&R(n.__H,t)&&(n.__=e,n.i=t,a.__h.push(n))}function k(e){return s=5,S((function(){return{current:e}}),[])}function x(e,t,n){s=6,w((function(){return"function"==typeof e?(e(t()),function(){return e(null)}):e?(e.current=t(),function(){return e.current=null}):void 0}),null==n?n:n.concat(e))}function S(e,t){var n=g(r++,7);return R(n.__H,t)&&(n.__=e(),n.__H=t,n.__h=e),n.__}function C(e,t){return s=8,S((function(){return e}),t)}function E(e){var t=a.context[e.__c],n=g(r++,9);return n.c=e,t?(null==n.__&&(n.__=!0,t.sub(a)),t.props.value):e.__}function N(e,t){u.useDebugValue&&u.useDebugValue(t?t(e):e)}function A(e){var t=g(r++,10),n=y();return t.__=e,a.componentDidCatch||(a.componentDidCatch=function(e,r){t.__&&t.__(e,r),n[1](e)}),[n[0],function(){n[1](void 0)}]}function M(){var e=g(r++,11);if(!e.__){for(var t=a.__v;null!==t&&!t.__m&&null!==t.__;)t=t.__;var n=t.__m||(t.__m=[0,0]);e.__="P"+n[0]+"-"+n[1]++}return e.__}function T(){for(var e;e=c.shift();)if(e.__P&&e.__H)try{e.__H.__h.forEach(P),e.__H.__h.forEach(I),e.__H.__h=[]}catch(r){e.__H.__h=[],u.__e(r,e.__v)}}u.__b=function(e){a=null,d&&d(e)},u.__=function(e,t){e&&t.__k&&t.__k.__m&&(e.__m=t.__k.__m),v&&v(e,t)},u.__r=function(e){h&&h(e),r=0;var t=(a=e.__c).__H;t&&(o===a?(t.__h=[],a.__h=[],t.__.forEach((function(e){e.__N&&(e.__=e.__N),e.i=e.__N=void 0}))):(t.__h.forEach(P),t.__h.forEach(I),t.__h=[],r=0)),o=a},u.diffed=function(e){m&&m(e);var t=e.__c;t&&t.__H&&(t.__H.__h.length&&(1!==c.push(t)&&i===u.requestAnimationFrame||((i=u.requestAnimationFrame)||O)(T)),t.__H.__.forEach((function(e){e.i&&(e.__H=e.i),e.i=void 0}))),o=a=null},u.__c=function(e,t){t.some((function(e){try{e.__h.forEach(P),e.__h=e.__h.filter((function(e){return!e.__||I(e)}))}catch(a){t.some((function(e){e.__h&&(e.__h=[])})),t=[],u.__e(a,e.__v)}})),p&&p(e,t)},u.unmount=function(e){f&&f(e);var t,n=e.__c;n&&n.__H&&(n.__H.__.forEach((function(e){try{P(e)}catch(e){t=e}})),n.__H=void 0,t&&u.__e(t,n.__v))};var L="function"==typeof requestAnimationFrame;function O(e){var t,n=function(){clearTimeout(r),L&&cancelAnimationFrame(t),setTimeout(e)},r=setTimeout(n,100);L&&(t=requestAnimationFrame(n))}function P(e){var t=a,n=e.__c;"function"==typeof n&&(e.__c=void 0,n()),a=t}function I(e){var t=a;e.__c=e.__(),a=t}function R(e,t){return!e||e.length!==t.length||t.some((function(t,n){return t!==e[n]}))}function D(e,t){return"function"==typeof t?t(e):t}function z(e,t){for(var n in t)e[n]=t[n];return e}function F(e,t){for(var n in e)if("__source"!==n&&!(n in t))return!0;for(var r in t)if("__source"!==r&&e[r]!==t[r])return!0;return!1}function j(e,t){this.props=e,this.context=t}function H(e,t){function n(e){var n=this.props.ref,r=n==e.ref;return!r&&n&&(n.call?n(null):n.current=null),t?!t(this.props,e)||!r:F(this.props,e)}function r(t){return this.shouldComponentUpdate=n,(0,l.n)(e,t)}return r.displayName="Memo("+(e.displayName||e.name)+")",r.prototype.isReactComponent=!0,r.__f=!0,r}(j.prototype=new l.uA).isPureReactComponent=!0,j.prototype.shouldComponentUpdate=function(e,t){return F(this.props,e)||F(this.state,t)};var $=l.fF.__b;l.fF.__b=function(e){e.type&&e.type.__f&&e.ref&&(e.props.ref=e.ref,e.ref=null),$&&$(e)};var V="undefined"!=typeof Symbol&&Symbol.for&&Symbol.for("react.forward_ref")||3911;function U(e){function t(t){var n=z({},t);return delete n.ref,e(n,t.ref||null)}return t.$$typeof=V,t.render=t,t.prototype.isReactComponent=t.__f=!0,t.displayName="ForwardRef("+(e.displayName||e.name)+")",t}var B=function(e,t){return null==e?null:(0,l.v2)((0,l.v2)(e).map(t))},q={map:B,forEach:B,count:function(e){return e?(0,l.v2)(e).length:0},only:function(e){var t=(0,l.v2)(e);if(1!==t.length)throw"Children.only";return t[0]},toArray:l.v2},Y=l.fF.__e;l.fF.__e=function(e,t,n,r){if(e.then)for(var a,o=t;o=o.__;)if((a=o.__c)&&a.__c)return null==t.__e&&(t.__e=n.__e,t.__k=n.__k),a.__c(e,t);Y(e,t,n,r)};var W=l.fF.unmount;function K(e,t,n){return e&&(e.__c&&e.__c.__H&&(e.__c.__H.__.forEach((function(e){"function"==typeof e.__c&&e.__c()})),e.__c.__H=null),null!=(e=z({},e)).__c&&(e.__c.__P===n&&(e.__c.__P=t),e.__c=null),e.__k=e.__k&&e.__k.map((function(e){return K(e,t,n)}))),e}function Q(e,t,n){return e&&n&&(e.__v=null,e.__k=e.__k&&e.__k.map((function(e){return Q(e,t,n)})),e.__c&&e.__c.__P===t&&(e.__e&&n.appendChild(e.__e),e.__c.__e=!0,e.__c.__P=n)),e}function Z(){this.__u=0,this.t=null,this.__b=null}function G(e){var t=e.__.__c;return t&&t.__a&&t.__a(e)}function J(e){var t,n,r;function a(a){if(t||(t=e()).then((function(e){n=e.default||e}),(function(e){r=e})),r)throw r;if(!n)throw t;return(0,l.n)(n,a)}return a.displayName="Lazy",a.__f=!0,a}function X(){this.u=null,this.o=null}l.fF.unmount=function(e){var t=e.__c;t&&t.__R&&t.__R(),t&&32&e.__u&&(e.type=null),W&&W(e)},(Z.prototype=new l.uA).__c=function(e,t){var n=t.__c,r=this;null==r.t&&(r.t=[]),r.t.push(n);var a=G(r.__v),o=!1,i=function(){o||(o=!0,n.__R=null,a?a(l):l())};n.__R=i;var l=function(){if(! --r.__u){if(r.state.__a){var e=r.state.__a;r.__v.__k[0]=Q(e,e.__c.__P,e.__c.__O)}var t;for(r.setState({__a:r.__b=null});t=r.t.pop();)t.forceUpdate()}};r.__u++||32&t.__u||r.setState({__a:r.__b=r.__v.__k[0]}),e.then(i,i)},Z.prototype.componentWillUnmount=function(){this.t=[]},Z.prototype.render=function(e,t){if(this.__b){if(this.__v.__k){var n=document.createElement("div"),r=this.__v.__k[0].__c;this.__v.__k[0]=K(this.__b,n,r.__O=r.__P)}this.__b=null}var a=t.__a&&(0,l.n)(l.FK,null,e.fallback);return a&&(a.__u&=-33),[(0,l.n)(l.FK,null,t.__a?null:e.children),a]};var ee=function(e,t,n){if(++n[1]===n[0]&&e.o.delete(t),e.props.revealOrder&&("t"!==e.props.revealOrder[0]||!e.o.size))for(n=e.u;n;){for(;n.length>3;)n.pop()();if(n[1]>>1,1),t.i.removeChild(e)}}),(0,l.XX)((0,l.n)(te,{context:t.context},e.__v),t.l)}function re(e,t){var n=(0,l.n)(ne,{__v:e,i:t});return n.containerInfo=t,n}(X.prototype=new l.uA).__a=function(e){var t=this,n=G(t.__v),r=t.o.get(e);return r[0]++,function(a){var o=function(){t.props.revealOrder?(r.push(a),ee(t,e,r)):a()};n?n(o):o()}},X.prototype.render=function(e){this.u=null,this.o=new Map;var t=(0,l.v2)(e.children);e.revealOrder&&"b"===e.revealOrder[0]&&t.reverse();for(var n=t.length;n--;)this.o.set(t[n],this.u=[1,0,this.u]);return e.children},X.prototype.componentDidUpdate=X.prototype.componentDidMount=function(){var e=this;this.o.forEach((function(t,n){ee(e,n,t)}))};var ae="undefined"!=typeof Symbol&&Symbol.for&&Symbol.for("react.element")||60103,oe=/^(?:accent|alignment|arabic|baseline|cap|clip(?!PathU)|color|dominant|fill|flood|font|glyph(?!R)|horiz|image(!S)|letter|lighting|marker(?!H|W|U)|overline|paint|pointer|shape|stop|strikethrough|stroke|text(?!L)|transform|underline|unicode|units|v|vector|vert|word|writing|x(?!C))[A-Z]/,ie=/^on(Ani|Tra|Tou|BeforeInp|Compo)/,le=/[A-Z0-9]/g,se="undefined"!=typeof document,ce=function(e){return("undefined"!=typeof Symbol&&"symbol"==typeof Symbol()?/fil|che|rad/:/fil|che|ra/).test(e)};function ue(e,t,n){return null==t.__k&&(t.textContent=""),(0,l.XX)(e,t),"function"==typeof n&&n(),e?e.__c:null}function de(e,t,n){return(0,l.Qv)(e,t),"function"==typeof n&&n(),e?e.__c:null}l.uA.prototype.isReactComponent={},["componentWillMount","componentWillReceiveProps","componentWillUpdate"].forEach((function(e){Object.defineProperty(l.uA.prototype,e,{configurable:!0,get:function(){return this["UNSAFE_"+e]},set:function(t){Object.defineProperty(this,e,{configurable:!0,writable:!0,value:t})}})}));var he=l.fF.event;function me(){}function pe(){return this.cancelBubble}function fe(){return this.defaultPrevented}l.fF.event=function(e){return he&&(e=he(e)),e.persist=me,e.isPropagationStopped=pe,e.isDefaultPrevented=fe,e.nativeEvent=e};var ve,ge={enumerable:!1,configurable:!0,get:function(){return this.class}},ye=l.fF.vnode;l.fF.vnode=function(e){"string"==typeof e.type&&function(e){var t=e.props,n=e.type,r={},a=-1===n.indexOf("-");for(var o in t){var i=t[o];if(!("value"===o&&"defaultValue"in t&&null==i||se&&"children"===o&&"noscript"===n||"class"===o||"className"===o)){var s=o.toLowerCase();"defaultValue"===o&&"value"in t&&null==t.value?o="value":"download"===o&&!0===i?i="":"translate"===s&&"no"===i?i=!1:"o"===s[0]&&"n"===s[1]?"ondoubleclick"===s?o="ondblclick":"onchange"!==s||"input"!==n&&"textarea"!==n||ce(t.type)?"onfocus"===s?o="onfocusin":"onblur"===s?o="onfocusout":ie.test(o)&&(o=s):s=o="oninput":a&&oe.test(o)?o=o.replace(le,"-$&").toLowerCase():null===i&&(i=void 0),"oninput"===s&&r[o=s]&&(o="oninputCapture"),r[o]=i}}"select"==n&&r.multiple&&Array.isArray(r.value)&&(r.value=(0,l.v2)(t.children).forEach((function(e){e.props.selected=-1!=r.value.indexOf(e.props.value)}))),"select"==n&&null!=r.defaultValue&&(r.value=(0,l.v2)(t.children).forEach((function(e){e.props.selected=r.multiple?-1!=r.defaultValue.indexOf(e.props.value):r.defaultValue==e.props.value}))),t.class&&!t.className?(r.class=t.class,Object.defineProperty(r,"className",ge)):(t.className&&!t.class||t.class&&t.className)&&(r.class=r.className=t.className),e.props=r}(e),e.$$typeof=ae,ye&&ye(e)};var _e=l.fF.__r;l.fF.__r=function(e){_e&&_e(e),ve=e.__c};var be=l.fF.diffed;l.fF.diffed=function(e){be&&be(e);var t=e.props,n=e.__e;null!=n&&"textarea"===e.type&&"value"in t&&t.value!==n.value&&(n.value=null==t.value?"":t.value),ve=null};var we={ReactCurrentDispatcher:{current:{readContext:function(e){return ve.__n[e.__c].props.value},useCallback:C,useContext:E,useDebugValue:N,useDeferredValue:Ie,useEffect:b,useId:M,useImperativeHandle:x,useInsertionEffect:De,useLayoutEffect:w,useMemo:S,useReducer:_,useRef:k,useState:y,useSyncExternalStore:Fe,useTransition:Re}}},ke="17.0.2";function xe(e){return l.n.bind(null,e)}function Se(e){return!!e&&e.$$typeof===ae}function Ce(e){return Se(e)&&e.type===l.FK}function Ee(e){return!!e&&!!e.displayName&&("string"==typeof e.displayName||e.displayName instanceof String)&&e.displayName.startsWith("Memo(")}function Ne(e){return Se(e)?l.Ob.apply(null,arguments):e}function Ae(e){return!!e.__k&&((0,l.XX)(null,e),!0)}function Me(e){return e&&(e.base||1===e.nodeType&&e)||null}var Te=function(e,t){return e(t)},Le=function(e,t){return e(t)},Oe=l.FK;function Pe(e){e()}function Ie(e){return e}function Re(){return[!1,Pe]}var De=w,ze=Se;function Fe(e,t){var n=t(),r=y({h:{__:n,v:t}}),a=r[0].h,o=r[1];return w((function(){a.__=n,a.v=t,je(a)&&o({h:a})}),[e,n,t]),b((function(){return je(a)&&o({h:a}),e((function(){je(a)&&o({h:a})}))}),[e]),n}function je(e){var t,n,r=e.v,a=e.__;try{var o=r();return!((t=a)===(n=o)&&(0!==t||1/t==1/n)||t!=t&&n!=n)}catch(e){return!0}}var He={useState:y,useId:M,useReducer:_,useEffect:b,useLayoutEffect:w,useInsertionEffect:De,useTransition:Re,useDeferredValue:Ie,useSyncExternalStore:Fe,startTransition:Pe,useRef:k,useImperativeHandle:x,useMemo:S,useCallback:C,useContext:E,useDebugValue:N,version:"17.0.2",Children:q,render:ue,hydrate:de,unmountComponentAtNode:Ae,createPortal:re,createElement:l.n,createContext:l.q6,createFactory:xe,cloneElement:Ne,createRef:l._3,Fragment:l.FK,isValidElement:Se,isElement:ze,isFragment:Ce,isMemo:Ee,findDOMNode:Me,Component:l.uA,PureComponent:j,memo:H,forwardRef:U,flushSync:Le,unstable_batchedUpdates:Te,StrictMode:Oe,Suspense:Z,SuspenseList:X,lazy:J,__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED:we}},746:(e,t,n)=>{"use strict";n.d(t,{FK:()=>x,Ob:()=>q,Qv:()=>B,XX:()=>U,_3:()=>k,fF:()=>a,n:()=>b,q6:()=>Y,uA:()=>S,v2:()=>O});var r,a,o,i,l,s,c,u,d,h,m,p={},f=[],v=/acit|ex(?:s|g|n|p|$)|rph|grid|ows|mnc|ntw|ine[ch]|zoo|^ord|itera/i,g=Array.isArray;function y(e,t){for(var n in t)e[n]=t[n];return e}function _(e){var t=e.parentNode;t&&t.removeChild(e)}function b(e,t,n){var a,o,i,l={};for(i in t)"key"==i?a=t[i]:"ref"==i?o=t[i]:l[i]=t[i];if(arguments.length>2&&(l.children=arguments.length>3?r.call(arguments,2):n),"function"==typeof e&&null!=e.defaultProps)for(i in e.defaultProps)void 0===l[i]&&(l[i]=e.defaultProps[i]);return w(e,l,a,o,null)}function w(e,t,n,r,i){var l={type:e,props:t,key:n,ref:r,__k:null,__:null,__b:0,__e:null,__d:void 0,__c:null,constructor:void 0,__v:null==i?++o:i,__i:-1,__u:0};return null==i&&null!=a.vnode&&a.vnode(l),l}function k(){return{current:null}}function x(e){return e.children}function S(e,t){this.props=e,this.context=t}function C(e,t){if(null==t)return e.__?C(e.__,e.__i+1):null;for(var n;tt&&i.sort(c));A.__r=0}function M(e,t,n,r,a,o,i,l,s,c,u){var d,h,m,v,g,y=r&&r.__k||f,_=t.length;for(n.__d=s,T(n,t,y),s=n.__d,d=0;d<_;d++)null!=(m=n.__k[d])&&"boolean"!=typeof m&&"function"!=typeof m&&(h=-1===m.__i?p:y[m.__i]||p,m.__i=d,z(e,m,h,a,o,i,l,s,c,u),v=m.__e,m.ref&&h.ref!=m.ref&&(h.ref&&H(h.ref,null,m),u.push(m.ref,m.__c||v,m)),null==g&&null!=v&&(g=v),65536&m.__u||h.__k===m.__k?s=L(m,s,e):"function"==typeof m.type&&void 0!==m.__d?s=m.__d:v&&(s=v.nextSibling),m.__d=void 0,m.__u&=-196609);n.__d=s,n.__e=g}function T(e,t,n){var r,a,o,i,l,s=t.length,c=n.length,u=c,d=0;for(e.__k=[],r=0;r0?w(a.type,a.props,a.key,a.ref?a.ref:null,a.__v):a)?(a.__=e,a.__b=e.__b+1,l=P(a,n,i,u),a.__i=l,o=null,-1!==l&&(u--,(o=n[l])&&(o.__u|=131072)),null==o||null===o.__v?(-1==l&&d--,"function"!=typeof a.type&&(a.__u|=65536)):l!==i&&(l==i-1?d--:l==i+1?d++:l>i?u>s-i?d+=l-i:d--:l(null!=s&&0==(131072&s.__u)?1:0))for(;i>=0||l=0){if((s=t[i])&&0==(131072&s.__u)&&a==s.key&&o===s.type)return i;i--}if(l2&&(s.children=arguments.length>3?r.call(arguments,2):n),w(e.type,s,a||e.key,o||e.ref,null)}function Y(e,t){var n={__c:t="__cC"+m++,__:e,Consumer:function(e,t){return e.children(t)},Provider:function(e){var n,r;return this.getChildContext||(n=[],(r={})[t]=this,this.getChildContext=function(){return r},this.componentWillUnmount=function(){n=null},this.shouldComponentUpdate=function(e){this.props.value!==e.value&&n.some((function(e){e.__e=!0,N(e)}))},this.sub=function(e){n.push(e);var t=e.componentWillUnmount;e.componentWillUnmount=function(){n&&n.splice(n.indexOf(e),1),t&&t.call(e)}}),e.children}};return n.Provider.__=n.Consumer.contextType=n}r=f.slice,a={__e:function(e,t,n,r){for(var a,o,i;t=t.__;)if((a=t.__c)&&!a.__)try{if((o=a.constructor)&&null!=o.getDerivedStateFromError&&(a.setState(o.getDerivedStateFromError(e)),i=a.__d),null!=a.componentDidCatch&&(a.componentDidCatch(e,r||{}),i=a.__d),i)return a.__E=a}catch(t){e=t}throw e}},o=0,S.prototype.setState=function(e,t){var n;n=null!=this.__s&&this.__s!==this.state?this.__s:this.__s=y({},this.state),"function"==typeof e&&(e=e(y({},n),this.props)),e&&y(n,e),null!=e&&this.__v&&(t&&this._sb.push(t),N(this))},S.prototype.forceUpdate=function(e){this.__v&&(this.__e=!0,e&&this.__h.push(e),N(this))},S.prototype.render=x,i=[],s="function"==typeof Promise?Promise.prototype.then.bind(Promise.resolve()):setTimeout,c=function(e,t){return e.__v.__b-t.__v.__b},A.__r=0,u=0,d=D(!1),h=D(!0),m=0},640:e=>{"use strict";var t=String.prototype.replace,n=/%20/g,r="RFC1738",a="RFC3986";e.exports={default:a,formatters:{RFC1738:function(e){return t.call(e,n,"+")},RFC3986:function(e){return String(e)}},RFC1738:r,RFC3986:a}},215:(e,t,n)=>{"use strict";var r=n(518),a=n(968),o=n(640);e.exports={formats:o,parse:a,stringify:r}},968:(e,t,n)=>{"use strict";var r=n(570),a=Object.prototype.hasOwnProperty,o=Array.isArray,i={allowDots:!1,allowEmptyArrays:!1,allowPrototypes:!1,allowSparse:!1,arrayLimit:20,charset:"utf-8",charsetSentinel:!1,comma:!1,decodeDotInKeys:!1,decoder:r.decode,delimiter:"&",depth:5,duplicates:"combine",ignoreQueryPrefix:!1,interpretNumericEntities:!1,parameterLimit:1e3,parseArrays:!0,plainObjects:!1,strictDepth:!1,strictNullHandling:!1},l=function(e){return e.replace(/&#(\d+);/g,(function(e,t){return String.fromCharCode(parseInt(t,10))}))},s=function(e,t){return e&&"string"===typeof e&&t.comma&&e.indexOf(",")>-1?e.split(","):e},c=function(e,t,n,r){if(e){var o=n.allowDots?e.replace(/\.([^.[]+)/g,"[$1]"):e,i=/(\[[^[\]]*])/g,l=n.depth>0&&/(\[[^[\]]*])/.exec(o),c=l?o.slice(0,l.index):o,u=[];if(c){if(!n.plainObjects&&a.call(Object.prototype,c)&&!n.allowPrototypes)return;u.push(c)}for(var d=0;n.depth>0&&null!==(l=i.exec(o))&&d=0;--o){var i,l=e[o];if("[]"===l&&n.parseArrays)i=n.allowEmptyArrays&&(""===a||n.strictNullHandling&&null===a)?[]:[].concat(a);else{i=n.plainObjects?Object.create(null):{};var c="["===l.charAt(0)&&"]"===l.charAt(l.length-1)?l.slice(1,-1):l,u=n.decodeDotInKeys?c.replace(/%2E/g,"."):c,d=parseInt(u,10);n.parseArrays||""!==u?!isNaN(d)&&l!==u&&String(d)===u&&d>=0&&n.parseArrays&&d<=n.arrayLimit?(i=[])[d]=a:"__proto__"!==u&&(i[u]=a):i={0:a}}a=i}return a}(u,t,n,r)}};e.exports=function(e,t){var n=function(e){if(!e)return i;if("undefined"!==typeof e.allowEmptyArrays&&"boolean"!==typeof e.allowEmptyArrays)throw new TypeError("`allowEmptyArrays` option can only be `true` or `false`, when provided");if("undefined"!==typeof e.decodeDotInKeys&&"boolean"!==typeof e.decodeDotInKeys)throw new TypeError("`decodeDotInKeys` option can only be `true` or `false`, when provided");if(null!==e.decoder&&"undefined"!==typeof e.decoder&&"function"!==typeof e.decoder)throw new TypeError("Decoder has to be a function.");if("undefined"!==typeof e.charset&&"utf-8"!==e.charset&&"iso-8859-1"!==e.charset)throw new TypeError("The charset option must be either utf-8, iso-8859-1, or undefined");var t="undefined"===typeof e.charset?i.charset:e.charset,n="undefined"===typeof e.duplicates?i.duplicates:e.duplicates;if("combine"!==n&&"first"!==n&&"last"!==n)throw new TypeError("The duplicates option must be either combine, first, or last");return{allowDots:"undefined"===typeof e.allowDots?!0===e.decodeDotInKeys||i.allowDots:!!e.allowDots,allowEmptyArrays:"boolean"===typeof e.allowEmptyArrays?!!e.allowEmptyArrays:i.allowEmptyArrays,allowPrototypes:"boolean"===typeof e.allowPrototypes?e.allowPrototypes:i.allowPrototypes,allowSparse:"boolean"===typeof e.allowSparse?e.allowSparse:i.allowSparse,arrayLimit:"number"===typeof e.arrayLimit?e.arrayLimit:i.arrayLimit,charset:t,charsetSentinel:"boolean"===typeof e.charsetSentinel?e.charsetSentinel:i.charsetSentinel,comma:"boolean"===typeof e.comma?e.comma:i.comma,decodeDotInKeys:"boolean"===typeof e.decodeDotInKeys?e.decodeDotInKeys:i.decodeDotInKeys,decoder:"function"===typeof e.decoder?e.decoder:i.decoder,delimiter:"string"===typeof e.delimiter||r.isRegExp(e.delimiter)?e.delimiter:i.delimiter,depth:"number"===typeof e.depth||!1===e.depth?+e.depth:i.depth,duplicates:n,ignoreQueryPrefix:!0===e.ignoreQueryPrefix,interpretNumericEntities:"boolean"===typeof e.interpretNumericEntities?e.interpretNumericEntities:i.interpretNumericEntities,parameterLimit:"number"===typeof e.parameterLimit?e.parameterLimit:i.parameterLimit,parseArrays:!1!==e.parseArrays,plainObjects:"boolean"===typeof e.plainObjects?e.plainObjects:i.plainObjects,strictDepth:"boolean"===typeof e.strictDepth?!!e.strictDepth:i.strictDepth,strictNullHandling:"boolean"===typeof e.strictNullHandling?e.strictNullHandling:i.strictNullHandling}}(t);if(""===e||null===e||"undefined"===typeof e)return n.plainObjects?Object.create(null):{};for(var u="string"===typeof e?function(e,t){var n={__proto__:null},c=t.ignoreQueryPrefix?e.replace(/^\?/,""):e;c=c.replace(/%5B/gi,"[").replace(/%5D/gi,"]");var u,d=t.parameterLimit===1/0?void 0:t.parameterLimit,h=c.split(t.delimiter,d),m=-1,p=t.charset;if(t.charsetSentinel)for(u=0;u-1&&(v=o(v)?[v]:v);var b=a.call(n,f);b&&"combine"===t.duplicates?n[f]=r.combine(n[f],v):b&&"last"!==t.duplicates||(n[f]=v)}return n}(e,n):e,d=n.plainObjects?Object.create(null):{},h=Object.keys(u),m=0;m{"use strict";var r=n(670),a=n(570),o=n(640),i=Object.prototype.hasOwnProperty,l={brackets:function(e){return e+"[]"},comma:"comma",indices:function(e,t){return e+"["+t+"]"},repeat:function(e){return e}},s=Array.isArray,c=Array.prototype.push,u=function(e,t){c.apply(e,s(t)?t:[t])},d=Date.prototype.toISOString,h=o.default,m={addQueryPrefix:!1,allowDots:!1,allowEmptyArrays:!1,arrayFormat:"indices",charset:"utf-8",charsetSentinel:!1,delimiter:"&",encode:!0,encodeDotInKeys:!1,encoder:a.encode,encodeValuesOnly:!1,format:h,formatter:o.formatters[h],indices:!1,serializeDate:function(e){return d.call(e)},skipNulls:!1,strictNullHandling:!1},p={},f=function e(t,n,o,i,l,c,d,h,f,v,g,y,_,b,w,k,x,S){for(var C,E=t,N=S,A=0,M=!1;void 0!==(N=N.get(p))&&!M;){var T=N.get(t);if(A+=1,"undefined"!==typeof T){if(T===A)throw new RangeError("Cyclic object value");M=!0}"undefined"===typeof N.get(p)&&(A=0)}if("function"===typeof v?E=v(n,E):E instanceof Date?E=_(E):"comma"===o&&s(E)&&(E=a.maybeMap(E,(function(e){return e instanceof Date?_(e):e}))),null===E){if(c)return f&&!k?f(n,m.encoder,x,"key",b):n;E=""}if("string"===typeof(C=E)||"number"===typeof C||"boolean"===typeof C||"symbol"===typeof C||"bigint"===typeof C||a.isBuffer(E))return f?[w(k?n:f(n,m.encoder,x,"key",b))+"="+w(f(E,m.encoder,x,"value",b))]:[w(n)+"="+w(String(E))];var L,O=[];if("undefined"===typeof E)return O;if("comma"===o&&s(E))k&&f&&(E=a.maybeMap(E,f)),L=[{value:E.length>0?E.join(",")||null:void 0}];else if(s(v))L=v;else{var P=Object.keys(E);L=g?P.sort(g):P}var I=h?n.replace(/\./g,"%2E"):n,R=i&&s(E)&&1===E.length?I+"[]":I;if(l&&s(E)&&0===E.length)return R+"[]";for(var D=0;D0?b+_:""}},570:(e,t,n)=>{"use strict";var r=n(640),a=Object.prototype.hasOwnProperty,o=Array.isArray,i=function(){for(var e=[],t=0;t<256;++t)e.push("%"+((t<16?"0":"")+t.toString(16)).toUpperCase());return e}(),l=function(e,t){for(var n=t&&t.plainObjects?Object.create(null):{},r=0;r1;){var t=e.pop(),n=t.obj[t.prop];if(o(n)){for(var r=[],a=0;a=s?l.slice(u,u+s):l,h=[],m=0;m=48&&p<=57||p>=65&&p<=90||p>=97&&p<=122||o===r.RFC1738&&(40===p||41===p)?h[h.length]=d.charAt(m):p<128?h[h.length]=i[p]:p<2048?h[h.length]=i[192|p>>6]+i[128|63&p]:p<55296||p>=57344?h[h.length]=i[224|p>>12]+i[128|p>>6&63]+i[128|63&p]:(m+=1,p=65536+((1023&p)<<10|1023&d.charCodeAt(m)),h[h.length]=i[240|p>>18]+i[128|p>>12&63]+i[128|p>>6&63]+i[128|63&p])}c+=h.join("")}return c},isBuffer:function(e){return!(!e||"object"!==typeof e)&&!!(e.constructor&&e.constructor.isBuffer&&e.constructor.isBuffer(e))},isRegExp:function(e){return"[object RegExp]"===Object.prototype.toString.call(e)},maybeMap:function(e,t){if(o(e)){for(var n=[],r=0;r{e.exports=n(204)},204:(e,t,n)=>{"use strict";var r=function(e){return e&&"object"==typeof e&&"default"in e?e.default:e}(n(609)),a=n(609);function o(){return(o=Object.assign||function(e){for(var t=1;tr.length&&h(e,t.length-1);)t=t.slice(0,t.length-1);return t.length}for(var a=r.length,o=t.length;o>=r.length;o--){var i=t[o];if(!h(e,o)&&m(e,o,i)){a=o+1;break}}return a}function v(e,t){return f(e,t)===e.mask.length}function g(e,t){var n=e.maskChar,r=e.mask,a=e.prefix;if(!n){for((t=y(e,"",t,0)).lengtht.length&&(t+=a.slice(t.length,r)),l.every((function(n){for(;u=n,h(e,c=r)&&u!==a[c];){if(r>=t.length&&(t+=a[r]),l=n,o&&h(e,r)&&l===o)return!0;if(++r>=a.length)return!1}var l,c,u;return!m(e,r,n)&&n!==o||(ra.start?d=(u=function(e,t,n,r){var a=e.mask,o=e.maskChar,i=n.split(""),l=r;return i.every((function(t){for(;i=t,h(e,n=r)&&i!==a[n];)if(++r>=a.length)return!1;var n,i;return(m(e,r,t)||t===o)&&r++,r=o.length?p=o.length:p=i.length&&p{"use strict";var r=n(375),a=n(411),o=n(734)(),i=n(553),l=n(277),s=r("%Math.floor%");e.exports=function(e,t){if("function"!==typeof e)throw new l("`fn` is not a function");if("number"!==typeof t||t<0||t>4294967295||s(t)!==t)throw new l("`length` must be a positive 32-bit integer");var n=arguments.length>2&&!!arguments[2],r=!0,c=!0;if("length"in e&&i){var u=i(e,"length");u&&!u.configurable&&(r=!1),u&&!u.writable&&(c=!1)}return(r||c||!n)&&(o?a(e,"length",t,!0,!0):a(e,"length",t)),e}},670:(e,t,n)=>{"use strict";var r=n(375),a=n(61),o=n(141),i=n(277),l=r("%WeakMap%",!0),s=r("%Map%",!0),c=a("WeakMap.prototype.get",!0),u=a("WeakMap.prototype.set",!0),d=a("WeakMap.prototype.has",!0),h=a("Map.prototype.get",!0),m=a("Map.prototype.set",!0),p=a("Map.prototype.has",!0),f=function(e,t){for(var n,r=e;null!==(n=r.next);r=n)if(n.key===t)return r.next=n.next,n.next=e.next,e.next=n,n};e.exports=function(){var e,t,n,r={assert:function(e){if(!r.has(e))throw new i("Side channel does not contain "+o(e))},get:function(r){if(l&&r&&("object"===typeof r||"function"===typeof r)){if(e)return c(e,r)}else if(s){if(t)return h(t,r)}else if(n)return function(e,t){var n=f(e,t);return n&&n.value}(n,r)},has:function(r){if(l&&r&&("object"===typeof r||"function"===typeof r)){if(e)return d(e,r)}else if(s){if(t)return p(t,r)}else if(n)return function(e,t){return!!f(e,t)}(n,r);return!1},set:function(r,a){l&&r&&("object"===typeof r||"function"===typeof r)?(e||(e=new l),u(e,r,a)):s?(t||(t=new s),m(t,r,a)):(n||(n={key:{},next:null}),function(e,t,n){var r=f(e,t);r?r.value=n:e.next={key:t,next:e.next,value:n}}(n,r,a))}};return r}},634:()=>{},738:(e,t)=>{var n;!function(){"use strict";var r={}.hasOwnProperty;function a(){for(var e="",t=0;t{var t=e&&e.__esModule?()=>e.default:()=>e;return n.d(t,{a:t}),t},n.d=(e,t)=>{for(var r in t)n.o(t,r)&&!n.o(e,r)&&Object.defineProperty(e,r,{enumerable:!0,get:t[r]})},n.f={},n.e=e=>Promise.all(Object.keys(n.f).reduce(((t,r)=>(n.f[r](e,t),t)),[])),n.u=e=>"static/js/"+e+".f772060c.chunk.js",n.miniCssF=e=>{},n.g=function(){if("object"===typeof globalThis)return globalThis;try{return this||new Function("return this")()}catch(e){if("object"===typeof window)return window}}(),n.o=(e,t)=>Object.prototype.hasOwnProperty.call(e,t),(()=>{var e={},t="vmui:";n.l=(r,a,o,i)=>{if(e[r])e[r].push(a);else{var l,s;if(void 0!==o)for(var c=document.getElementsByTagName("script"),u=0;u{l.onerror=l.onload=null,clearTimeout(m);var a=e[r];if(delete e[r],l.parentNode&&l.parentNode.removeChild(l),a&&a.forEach((e=>e(n))),t)return t(n)},m=setTimeout(h.bind(null,void 0,{type:"timeout",target:l}),12e4);l.onerror=h.bind(null,l.onerror),l.onload=h.bind(null,l.onload),s&&document.head.appendChild(l)}}})(),n.r=e=>{"undefined"!==typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})},n.p="./",(()=>{var e={792:0};n.f.j=(t,r)=>{var a=n.o(e,t)?e[t]:void 0;if(0!==a)if(a)r.push(a[2]);else{var o=new Promise(((n,r)=>a=e[t]=[n,r]));r.push(a[2]=o);var i=n.p+n.u(t),l=new Error;n.l(i,(r=>{if(n.o(e,t)&&(0!==(a=e[t])&&(e[t]=void 0),a)){var o=r&&("load"===r.type?"missing":r.type),i=r&&r.target&&r.target.src;l.message="Loading chunk "+t+" failed.\n("+o+": "+i+")",l.name="ChunkLoadError",l.type=o,l.request=i,a[1](l)}}),"chunk-"+t,t)}};var t=(t,r)=>{var a,o,i=r[0],l=r[1],s=r[2],c=0;if(i.some((t=>0!==e[t]))){for(a in l)n.o(l,a)&&(n.m[a]=l[a]);if(s)s(n)}for(t&&t(r);c{"use strict";var e={};n.r(e),n.d(e,{AlarmIcon:()=>Un,ArrowDownIcon:()=>jn,ArrowDropDownIcon:()=>Hn,CalendarIcon:()=>Vn,ChartIcon:()=>Wn,ClockIcon:()=>$n,CloseIcon:()=>On,CodeIcon:()=>Qn,CollapseIcon:()=>kr,CopyIcon:()=>rr,DeleteIcon:()=>Zn,DoneIcon:()=>Xn,DownloadIcon:()=>br,DragIcon:()=>ar,ErrorIcon:()=>Dn,ExpandIcon:()=>wr,FunctionIcon:()=>gr,InfoIcon:()=>In,IssueIcon:()=>lr,KeyboardIcon:()=>Bn,LabelIcon:()=>yr,ListIcon:()=>mr,LogoAnomalyIcon:()=>Mn,LogoIcon:()=>Nn,LogoLogsIcon:()=>An,LogoShortIcon:()=>Tn,MetricIcon:()=>vr,MinusIcon:()=>Jn,MoreIcon:()=>ur,PlayCircleOutlineIcon:()=>Yn,PlayIcon:()=>qn,PlusIcon:()=>Gn,Prettify:()=>nr,QuestionIcon:()=>sr,RefreshIcon:()=>Fn,RestartIcon:()=>Pn,SearchIcon:()=>xr,SettingsIcon:()=>Ln,StarBorderIcon:()=>pr,StarIcon:()=>fr,StorageIcon:()=>cr,SuccessIcon:()=>zn,TableIcon:()=>Kn,TimelineIcon:()=>or,TipIcon:()=>hr,TuneIcon:()=>dr,ValueIcon:()=>_r,VisibilityIcon:()=>er,VisibilityOffIcon:()=>tr,WarningIcon:()=>Rn,WikiIcon:()=>ir});var t,r=n(609),a=n(159),o=n.n(a),i=n(7),l=n.n(i),s=n(648),c=n.n(s),u=n(220),d=n.n(u);function h(){return h=Object.assign?Object.assign.bind():function(e){for(var t=1;t=0&&(t.hash=e.substr(n),e=e.substr(0,n));let r=e.indexOf("?");r>=0&&(t.search=e.substr(r),e=e.substr(0,r)),e&&(t.pathname=e)}return t}function b(e,n,r,a){void 0===a&&(a={});let{window:o=document.defaultView,v5Compat:i=!1}=a,l=o.history,s=t.Pop,c=null,u=d();function d(){return(l.state||{idx:null}).idx}function f(){s=t.Pop;let e=d(),n=null==e?null:e-u;u=e,c&&c({action:s,location:b.location,delta:n})}function _(e){let t="null"!==o.location.origin?o.location.origin:o.location.href,n="string"===typeof e?e:y(e);return n=n.replace(/ $/,"%20"),p(t,"No window.location.(origin|href) available to create URL for href: "+n),new URL(n,t)}null==u&&(u=0,l.replaceState(h({},l.state,{idx:u}),""));let b={get action(){return s},get location(){return e(o,l)},listen(e){if(c)throw new Error("A history only accepts one active listener");return o.addEventListener(m,f),c=e,()=>{o.removeEventListener(m,f),c=null}},createHref:e=>n(o,e),createURL:_,encodeLocation(e){let t=_(e);return{pathname:t.pathname,search:t.search,hash:t.hash}},push:function(e,n){s=t.Push;let a=g(b.location,e,n);r&&r(a,e),u=d()+1;let h=v(a,u),m=b.createHref(a);try{l.pushState(h,"",m)}catch(p){if(p instanceof DOMException&&"DataCloneError"===p.name)throw p;o.location.assign(m)}i&&c&&c({action:s,location:b.location,delta:1})},replace:function(e,n){s=t.Replace;let a=g(b.location,e,n);r&&r(a,e),u=d();let o=v(a,u),h=b.createHref(a);l.replaceState(o,"",h),i&&c&&c({action:s,location:b.location,delta:0})},go:e=>l.go(e)};return b}var w;!function(e){e.data="data",e.deferred="deferred",e.redirect="redirect",e.error="error"}(w||(w={}));new Set(["lazy","caseSensitive","path","id","index","children"]);function k(e,t,n){return void 0===n&&(n="/"),x(e,t,n,!1)}function x(e,t,n,r){let a=z(("string"===typeof t?_(t):t).pathname||"/",n);if(null==a)return null;let o=S(e);!function(e){e.sort(((e,t)=>e.score!==t.score?t.score-e.score:function(e,t){let n=e.length===t.length&&e.slice(0,-1).every(((e,n)=>e===t[n]));return n?e[e.length-1]-t[t.length-1]:0}(e.routesMeta.map((e=>e.childrenIndex)),t.routesMeta.map((e=>e.childrenIndex)))))}(o);let i=null;for(let l=0;null==i&&l{let i={relativePath:void 0===o?e.path||"":o,caseSensitive:!0===e.caseSensitive,childrenIndex:a,route:e};i.relativePath.startsWith("/")&&(p(i.relativePath.startsWith(r),'Absolute route path "'+i.relativePath+'" nested under path "'+r+'" is not valid. An absolute child route path must start with the combined path of all its parent routes.'),i.relativePath=i.relativePath.slice(r.length));let l=V([r,i.relativePath]),s=n.concat(i);e.children&&e.children.length>0&&(p(!0!==e.index,'Index routes must not have child routes. Please remove all child routes from route path "'+l+'".'),S(e.children,t,s,l)),(null!=e.path||e.index)&&t.push({path:l,score:P(l,e.index),routesMeta:s})};return e.forEach(((e,t)=>{var n;if(""!==e.path&&null!=(n=e.path)&&n.includes("?"))for(let r of C(e.path))a(e,t,r);else a(e,t)})),t}function C(e){let t=e.split("/");if(0===t.length)return[];let[n,...r]=t,a=n.endsWith("?"),o=n.replace(/\?$/,"");if(0===r.length)return a?[o,""]:[o];let i=C(r.join("/")),l=[];return l.push(...i.map((e=>""===e?o:[o,e].join("/")))),a&&l.push(...i),l.map((t=>e.startsWith("/")&&""===t?"/":t))}const E=/^:[\w-]+$/,N=3,A=2,M=1,T=10,L=-2,O=e=>"*"===e;function P(e,t){let n=e.split("/"),r=n.length;return n.some(O)&&(r+=L),t&&(r+=A),n.filter((e=>!O(e))).reduce(((e,t)=>e+(E.test(t)?N:""===t?M:T)),r)}function I(e,t,n){void 0===n&&(n=!1);let{routesMeta:r}=e,a={},o="/",i=[];for(let l=0;l(r.push({paramName:t,isOptional:null!=n}),n?"/?([^\\/]+)?":"/([^\\/]+)")));e.endsWith("*")?(r.push({paramName:"*"}),a+="*"===e||"/*"===e?"(.*)$":"(?:\\/(.+)|\\/*)$"):n?a+="\\/*$":""!==e&&"/"!==e&&(a+="(?:(?=\\/|$))");let o=new RegExp(a,t?void 0:"i");return[o,r]}(e.path,e.caseSensitive,e.end),a=t.match(n);if(!a)return null;let o=a[0],i=o.replace(/(.)\/+$/,"$1"),l=a.slice(1);return{params:r.reduce(((e,t,n)=>{let{paramName:r,isOptional:a}=t;if("*"===r){let e=l[n]||"";i=o.slice(0,o.length-e.length).replace(/(.)\/+$/,"$1")}const s=l[n];return e[r]=a&&!s?void 0:(s||"").replace(/%2F/g,"/"),e}),{}),pathname:o,pathnameBase:i,pattern:e}}function D(e){try{return e.split("/").map((e=>decodeURIComponent(e).replace(/\//g,"%2F"))).join("/")}catch(t){return f(!1,'The URL path "'+e+'" could not be decoded because it is is a malformed URL segment. This is probably due to a bad percent encoding ('+t+")."),e}}function z(e,t){if("/"===t)return e;if(!e.toLowerCase().startsWith(t.toLowerCase()))return null;let n=t.endsWith("/")?t.length-1:t.length,r=e.charAt(n);return r&&"/"!==r?null:e.slice(n)||"/"}function F(e,t,n,r){return"Cannot include a '"+e+"' character in a manually specified `to."+t+"` field ["+JSON.stringify(r)+"]. Please separate it out to the `to."+n+'` field. Alternatively you may provide the full path as a string in and the router will parse it for you.'}function j(e){return e.filter(((e,t)=>0===t||e.route.path&&e.route.path.length>0))}function H(e,t){let n=j(e);return t?n.map(((e,t)=>t===n.length-1?e.pathname:e.pathnameBase)):n.map((e=>e.pathnameBase))}function $(e,t,n,r){let a;void 0===r&&(r=!1),"string"===typeof e?a=_(e):(a=h({},e),p(!a.pathname||!a.pathname.includes("?"),F("?","pathname","search",a)),p(!a.pathname||!a.pathname.includes("#"),F("#","pathname","hash",a)),p(!a.search||!a.search.includes("#"),F("#","search","hash",a)));let o,i=""===e||""===a.pathname,l=i?"/":a.pathname;if(null==l)o=n;else{let e=t.length-1;if(!r&&l.startsWith("..")){let t=l.split("/");for(;".."===t[0];)t.shift(),e-=1;a.pathname=t.join("/")}o=e>=0?t[e]:"/"}let s=function(e,t){void 0===t&&(t="/");let{pathname:n,search:r="",hash:a=""}="string"===typeof e?_(e):e,o=n?n.startsWith("/")?n:function(e,t){let n=t.replace(/\/+$/,"").split("/");return e.split("/").forEach((e=>{".."===e?n.length>1&&n.pop():"."!==e&&n.push(e)})),n.length>1?n.join("/"):"/"}(n,t):t;return{pathname:o,search:B(r),hash:q(a)}}(a,o),c=l&&"/"!==l&&l.endsWith("/"),u=(i||"."===l)&&n.endsWith("/");return s.pathname.endsWith("/")||!c&&!u||(s.pathname+="/"),s}const V=e=>e.join("/").replace(/\/\/+/g,"/"),U=e=>e.replace(/\/+$/,"").replace(/^\/*/,"/"),B=e=>e&&"?"!==e?e.startsWith("?")?e:"?"+e:"",q=e=>e&&"#"!==e?e.startsWith("#")?e:"#"+e:"";Error;function Y(e){return null!=e&&"number"===typeof e.status&&"string"===typeof e.statusText&&"boolean"===typeof e.internal&&"data"in e}const W=["post","put","patch","delete"],K=(new Set(W),["get",...W]);new Set(K),new Set([301,302,303,307,308]),new Set([307,308]);Symbol("deferred");function Q(){return Q=Object.assign?Object.assign.bind():function(e){for(var t=1;t{n.current=!0}));let a=r.useCallback((function(r,a){void 0===a&&(a={}),n.current&&("number"===typeof r?e.navigate(r):e.navigate(r,Q({fromRouteId:t},a)))}),[e,t]);return a}():function(){ne()||p(!1);let e=r.useContext(Z),{basename:t,future:n,navigator:a}=r.useContext(J),{matches:o}=r.useContext(ee),{pathname:i}=re(),l=JSON.stringify(H(o,n.v7_relativeSplatPath)),s=r.useRef(!1);ae((()=>{s.current=!0}));let c=r.useCallback((function(n,r){if(void 0===r&&(r={}),!s.current)return;if("number"===typeof n)return void a.go(n);let o=$(n,JSON.parse(l),i,"path"===r.relative);null==e&&"/"!==t&&(o.pathname="/"===o.pathname?t:V([t,o.pathname])),(r.replace?a.replace:a.push)(o,r.state,r)}),[t,a,l,i,e]);return c}()}const ie=r.createContext(null);function le(e,t){let{relative:n}=void 0===t?{}:t,{future:a}=r.useContext(J),{matches:o}=r.useContext(ee),{pathname:i}=re(),l=JSON.stringify(H(o,a.v7_relativeSplatPath));return r.useMemo((()=>$(e,JSON.parse(l),i,"path"===n)),[e,l,i,n])}function se(e,n,a,o){ne()||p(!1);let{navigator:i}=r.useContext(J),{matches:l}=r.useContext(ee),s=l[l.length-1],c=s?s.params:{},u=(s&&s.pathname,s?s.pathnameBase:"/");s&&s.route;let d,h=re();if(n){var m;let e="string"===typeof n?_(n):n;"/"===u||(null==(m=e.pathname)?void 0:m.startsWith(u))||p(!1),d=e}else d=h;let f=d.pathname||"/",v=f;if("/"!==u){let e=u.replace(/^\//,"").split("/");v="/"+f.replace(/^\//,"").split("/").slice(e.length).join("/")}let g=k(e,{pathname:v});let y=me(g&&g.map((e=>Object.assign({},e,{params:Object.assign({},c,e.params),pathname:V([u,i.encodeLocation?i.encodeLocation(e.pathname).pathname:e.pathname]),pathnameBase:"/"===e.pathnameBase?u:V([u,i.encodeLocation?i.encodeLocation(e.pathnameBase).pathname:e.pathnameBase])}))),l,a,o);return n&&y?r.createElement(X.Provider,{value:{location:Q({pathname:"/",search:"",hash:"",state:null,key:"default"},d),navigationType:t.Pop}},y):y}function ce(){let e=function(){var e;let t=r.useContext(te),n=ge(fe.UseRouteError),a=ye(fe.UseRouteError);if(void 0!==t)return t;return null==(e=n.errors)?void 0:e[a]}(),t=Y(e)?e.status+" "+e.statusText:e instanceof Error?e.message:JSON.stringify(e),n=e instanceof Error?e.stack:null,a="rgba(200,200,200, 0.5)",o={padding:"0.5rem",backgroundColor:a};return r.createElement(r.Fragment,null,r.createElement("h2",null,"Unexpected Application Error!"),r.createElement("h3",{style:{fontStyle:"italic"}},t),n?r.createElement("pre",{style:o},n):null,null)}const ue=r.createElement(ce,null);class de extends r.Component{constructor(e){super(e),this.state={location:e.location,revalidation:e.revalidation,error:e.error}}static getDerivedStateFromError(e){return{error:e}}static getDerivedStateFromProps(e,t){return t.location!==e.location||"idle"!==t.revalidation&&"idle"===e.revalidation?{error:e.error,location:e.location,revalidation:e.revalidation}:{error:void 0!==e.error?e.error:t.error,location:t.location,revalidation:e.revalidation||t.revalidation}}componentDidCatch(e,t){console.error("React Router caught the following error during render",e,t)}render(){return void 0!==this.state.error?r.createElement(ee.Provider,{value:this.props.routeContext},r.createElement(te.Provider,{value:this.state.error,children:this.props.component})):this.props.children}}function he(e){let{routeContext:t,match:n,children:a}=e,o=r.useContext(Z);return o&&o.static&&o.staticContext&&(n.route.errorElement||n.route.ErrorBoundary)&&(o.staticContext._deepestRenderedBoundaryId=n.route.id),r.createElement(ee.Provider,{value:t},a)}function me(e,t,n,a){var o;if(void 0===t&&(t=[]),void 0===n&&(n=null),void 0===a&&(a=null),null==e){var i;if(!n)return null;if(n.errors)e=n.matches;else{if(!(null!=(i=a)&&i.v7_partialHydration&&0===t.length&&!n.initialized&&n.matches.length>0))return null;e=n.matches}}let l=e,s=null==(o=n)?void 0:o.errors;if(null!=s){let e=l.findIndex((e=>e.route.id&&void 0!==(null==s?void 0:s[e.route.id])));e>=0||p(!1),l=l.slice(0,Math.min(l.length,e+1))}let c=!1,u=-1;if(n&&a&&a.v7_partialHydration)for(let r=0;r=0?l.slice(0,u+1):[l[0]];break}}}return l.reduceRight(((e,a,o)=>{let i,d=!1,h=null,m=null;var p;n&&(i=s&&a.route.id?s[a.route.id]:void 0,h=a.route.errorElement||ue,c&&(u<0&&0===o?(p="route-fallback",!1||_e[p]||(_e[p]=!0),d=!0,m=null):u===o&&(d=!0,m=a.route.hydrateFallbackElement||null)));let f=t.concat(l.slice(0,o+1)),v=()=>{let t;return t=i?h:d?m:a.route.Component?r.createElement(a.route.Component,null):a.route.element?a.route.element:e,r.createElement(he,{match:a,routeContext:{outlet:e,matches:f,isDataRoute:null!=n},children:t})};return n&&(a.route.ErrorBoundary||a.route.errorElement||0===o)?r.createElement(de,{location:n.location,revalidation:n.revalidation,component:h,error:i,children:v(),routeContext:{outlet:null,matches:f,isDataRoute:!0}}):v()}),null)}var pe=function(e){return e.UseBlocker="useBlocker",e.UseRevalidator="useRevalidator",e.UseNavigateStable="useNavigate",e}(pe||{}),fe=function(e){return e.UseBlocker="useBlocker",e.UseLoaderData="useLoaderData",e.UseActionData="useActionData",e.UseRouteError="useRouteError",e.UseNavigation="useNavigation",e.UseRouteLoaderData="useRouteLoaderData",e.UseMatches="useMatches",e.UseRevalidator="useRevalidator",e.UseNavigateStable="useNavigate",e.UseRouteId="useRouteId",e}(fe||{});function ve(e){let t=r.useContext(Z);return t||p(!1),t}function ge(e){let t=r.useContext(G);return t||p(!1),t}function ye(e){let t=function(e){let t=r.useContext(ee);return t||p(!1),t}(),n=t.matches[t.matches.length-1];return n.route.id||p(!1),n.route.id}const _e={};r.startTransition;function be(e){return function(e){let t=r.useContext(ee).outlet;return t?r.createElement(ie.Provider,{value:e},t):t}(e.context)}function we(e){p(!1)}function ke(e){let{basename:n="/",children:a=null,location:o,navigationType:i=t.Pop,navigator:l,static:s=!1,future:c}=e;ne()&&p(!1);let u=n.replace(/^\/*/,"/"),d=r.useMemo((()=>({basename:u,navigator:l,static:s,future:Q({v7_relativeSplatPath:!1},c)})),[u,c,l,s]);"string"===typeof o&&(o=_(o));let{pathname:h="/",search:m="",hash:f="",state:v=null,key:g="default"}=o,y=r.useMemo((()=>{let e=z(h,u);return null==e?null:{location:{pathname:e,search:m,hash:f,state:v,key:g},navigationType:i}}),[u,h,m,f,v,g,i]);return null==y?null:r.createElement(J.Provider,{value:d},r.createElement(X.Provider,{children:a,value:y}))}function xe(e){let{children:t,location:n}=e;return se(Se(t),n)}new Promise((()=>{}));r.Component;function Se(e,t){void 0===t&&(t=[]);let n=[];return r.Children.forEach(e,((e,a)=>{if(!r.isValidElement(e))return;let o=[...t,a];if(e.type===r.Fragment)return void n.push.apply(n,Se(e.props.children,o));e.type!==we&&p(!1),e.props.index&&e.props.children&&p(!1);let i={id:e.props.id||o.join("-"),caseSensitive:e.props.caseSensitive,element:e.props.element,Component:e.props.Component,index:e.props.index,path:e.props.path,loader:e.props.loader,action:e.props.action,errorElement:e.props.errorElement,ErrorBoundary:e.props.ErrorBoundary,hasErrorBoundary:null!=e.props.ErrorBoundary||null!=e.props.errorElement,shouldRevalidate:e.props.shouldRevalidate,handle:e.props.handle,lazy:e.props.lazy};e.props.children&&(i.children=Se(e.props.children,o)),n.push(i)})),n}function Ce(){return Ce=Object.assign?Object.assign.bind():function(e){for(var t=1;t=0||(a[n]=e[n]);return a}function Ne(e){return void 0===e&&(e=""),new URLSearchParams("string"===typeof e||Array.isArray(e)||e instanceof URLSearchParams?e:Object.keys(e).reduce(((t,n)=>{let r=e[n];return t.concat(Array.isArray(r)?r.map((e=>[n,e])):[[n,r]])}),[]))}new Set(["application/x-www-form-urlencoded","multipart/form-data","text/plain"]);const Ae=["onClick","relative","reloadDocument","replace","state","target","to","preventScrollReset","unstable_viewTransition"],Me=["aria-current","caseSensitive","className","end","style","to","unstable_viewTransition","children"];try{window.__reactRouterVersion="6"}catch(Pp){}const Te=r.createContext({isTransitioning:!1});new Map;const Le=r.startTransition;r.flushSync,r.useId;function Oe(e){let{basename:t,children:n,future:a,window:o}=e,i=r.useRef();null==i.current&&(i.current=function(e){return void 0===e&&(e={}),b((function(e,t){let{pathname:n="/",search:r="",hash:a=""}=_(e.location.hash.substr(1));return n.startsWith("/")||n.startsWith(".")||(n="/"+n),g("",{pathname:n,search:r,hash:a},t.state&&t.state.usr||null,t.state&&t.state.key||"default")}),(function(e,t){let n=e.document.querySelector("base"),r="";if(n&&n.getAttribute("href")){let t=e.location.href,n=t.indexOf("#");r=-1===n?t:t.slice(0,n)}return r+"#"+("string"===typeof t?t:y(t))}),(function(e,t){f("/"===e.pathname.charAt(0),"relative pathnames are not supported in hash history.push("+JSON.stringify(t)+")")}),e)}({window:o,v5Compat:!0}));let l=i.current,[s,c]=r.useState({action:l.action,location:l.location}),{v7_startTransition:u}=a||{},d=r.useCallback((e=>{u&&Le?Le((()=>c(e))):c(e)}),[c,u]);return r.useLayoutEffect((()=>l.listen(d)),[l,d]),r.createElement(ke,{basename:t,children:n,location:s.location,navigationType:s.action,navigator:l,future:a})}const Pe="undefined"!==typeof window&&"undefined"!==typeof window.document&&"undefined"!==typeof window.document.createElement,Ie=/^(?:[a-z][a-z0-9+.-]*:|\/\/)/i,Re=r.forwardRef((function(e,t){let n,{onClick:a,relative:o,reloadDocument:i,replace:l,state:s,target:c,to:u,preventScrollReset:d,unstable_viewTransition:h}=e,m=Ee(e,Ae),{basename:f}=r.useContext(J),v=!1;if("string"===typeof u&&Ie.test(u)&&(n=u,Pe))try{let e=new URL(window.location.href),t=u.startsWith("//")?new URL(e.protocol+u):new URL(u),n=z(t.pathname,f);t.origin===e.origin&&null!=n?u=n+t.search+t.hash:v=!0}catch(Pp){}let g=function(e,t){let{relative:n}=void 0===t?{}:t;ne()||p(!1);let{basename:a,navigator:o}=r.useContext(J),{hash:i,pathname:l,search:s}=le(e,{relative:n}),c=l;return"/"!==a&&(c="/"===l?a:V([a,l])),o.createHref({pathname:c,search:s,hash:i})}(u,{relative:o}),_=function(e,t){let{target:n,replace:a,state:o,preventScrollReset:i,relative:l,unstable_viewTransition:s}=void 0===t?{}:t,c=oe(),u=re(),d=le(e,{relative:l});return r.useCallback((t=>{if(function(e,t){return 0===e.button&&(!t||"_self"===t)&&!function(e){return!!(e.metaKey||e.altKey||e.ctrlKey||e.shiftKey)}(e)}(t,n)){t.preventDefault();let n=void 0!==a?a:y(u)===y(d);c(e,{replace:n,state:o,preventScrollReset:i,relative:l,unstable_viewTransition:s})}}),[u,c,d,a,o,n,e,i,l,s])}(u,{replace:l,state:s,target:c,preventScrollReset:d,relative:o,unstable_viewTransition:h});return r.createElement("a",Ce({},m,{href:n||g,onClick:v||i?a:function(e){a&&a(e),e.defaultPrevented||_(e)},ref:t,target:c}))}));const De=r.forwardRef((function(e,t){let{"aria-current":n="page",caseSensitive:a=!1,className:o="",end:i=!1,style:l,to:s,unstable_viewTransition:c,children:u}=e,d=Ee(e,Me),h=le(s,{relative:d.relative}),m=re(),f=r.useContext(G),{navigator:v,basename:g}=r.useContext(J),y=null!=f&&function(e,t){void 0===t&&(t={});let n=r.useContext(Te);null==n&&p(!1);let{basename:a}=je(ze.useViewTransitionState),o=le(e,{relative:t.relative});if(!n.isTransitioning)return!1;let i=z(n.currentLocation.pathname,a)||n.currentLocation.pathname,l=z(n.nextLocation.pathname,a)||n.nextLocation.pathname;return null!=R(o.pathname,l)||null!=R(o.pathname,i)}(h)&&!0===c,_=v.encodeLocation?v.encodeLocation(h).pathname:h.pathname,b=m.pathname,w=f&&f.navigation&&f.navigation.location?f.navigation.location.pathname:null;a||(b=b.toLowerCase(),w=w?w.toLowerCase():null,_=_.toLowerCase()),w&&g&&(w=z(w,g)||w);const k="/"!==_&&_.endsWith("/")?_.length-1:_.length;let x,S=b===_||!i&&b.startsWith(_)&&"/"===b.charAt(k),C=null!=w&&(w===_||!i&&w.startsWith(_)&&"/"===w.charAt(_.length)),E={isActive:S,isPending:C,isTransitioning:y},N=S?n:void 0;x="function"===typeof o?o(E):[o,S?"active":null,C?"pending":null,y?"transitioning":null].filter(Boolean).join(" ");let A="function"===typeof l?l(E):l;return r.createElement(Re,Ce({},d,{"aria-current":N,className:x,ref:t,style:A,to:s,unstable_viewTransition:c}),"function"===typeof u?u(E):u)}));var ze,Fe;function je(e){let t=r.useContext(Z);return t||p(!1),t}function He(e){let t=r.useRef(Ne(e)),n=r.useRef(!1),a=re(),o=r.useMemo((()=>function(e,t){let n=Ne(e);return t&&t.forEach(((e,r)=>{n.has(r)||t.getAll(r).forEach((e=>{n.append(r,e)}))})),n}(a.search,n.current?null:t.current)),[a.search]),i=oe(),l=r.useCallback(((e,t)=>{const r=Ne("function"===typeof e?e(o):e);n.current=!0,i("?"+r,t)}),[i,o]);return[o,l]}(function(e){e.UseScrollRestoration="useScrollRestoration",e.UseSubmit="useSubmit",e.UseSubmitFetcher="useSubmitFetcher",e.UseFetcher="useFetcher",e.useViewTransitionState="useViewTransitionState"})(ze||(ze={})),function(e){e.UseFetcher="useFetcher",e.UseFetchers="useFetchers",e.UseScrollRestoration="useScrollRestoration"}(Fe||(Fe={}));let $e=function(e){return e.logs="logs",e.anomaly="anomaly",e}({});const Ve={home:"/",metrics:"/metrics",dashboards:"/dashboards",cardinality:"/cardinality",topQueries:"/top-queries",trace:"/trace",withTemplate:"/expand-with-exprs",relabel:"/relabeling",logs:"/logs",activeQueries:"/active-queries",queryAnalyzer:"/query-analyzer",icons:"/icons",anomaly:"/anomaly",query:"/query"},{REACT_APP_TYPE:Ue}={},Be=Ue===$e.logs,qe={header:{tenant:!0,stepControl:!Be,timeSelector:!Be,executionControls:!Be}},Ye={[Ve.home]:{title:"Query",...qe},[Ve.metrics]:{title:"Explore Prometheus metrics",header:{tenant:!0,stepControl:!0,timeSelector:!0}},[Ve.cardinality]:{title:"Explore cardinality",header:{tenant:!0,cardinalityDatePicker:!0}},[Ve.topQueries]:{title:"Top queries",header:{tenant:!0}},[Ve.trace]:{title:"Trace analyzer",header:{}},[Ve.queryAnalyzer]:{title:"Query analyzer",header:{}},[Ve.dashboards]:{title:"Dashboards",...qe},[Ve.withTemplate]:{title:"WITH templates",header:{}},[Ve.relabel]:{title:"Metric relabel debug",header:{}},[Ve.logs]:{title:"Logs Explorer",header:{}},[Ve.activeQueries]:{title:"Active Queries",header:{}},[Ve.icons]:{title:"Icons",header:{}},[Ve.anomaly]:{title:"Anomaly exploration",...qe},[Ve.query]:{title:"Query",...qe}},We=Ve,Ke=()=>{var e;const t=(null===(e=document.getElementById("root"))||void 0===e?void 0:e.dataset.params)||"{}";try{return JSON.parse(t)}catch(Pp){return console.error(Pp),{}}},Qe=()=>!!Object.keys(Ke()).length,Ze=/(\/select\/)(\d+|\d.+)(\/)(.+)/,Ge=(e,t)=>e.replace(Ze,"$1".concat(t,"/$4")),Je=e=>{var t;return(null===(t=e.match(Ze))||void 0===t?void 0:t[2])||""},Xe=(e,t)=>{t?window.localStorage.setItem(e,JSON.stringify({value:t})):tt([e]),window.dispatchEvent(new Event("storage"))},et=e=>{const t=window.localStorage.getItem(e);if(null!==t)try{var n;return null===(n=JSON.parse(t))||void 0===n?void 0:n.value}catch(Pp){return t}},tt=e=>e.forEach((e=>window.localStorage.removeItem(e))),{REACT_APP_TYPE:nt}={};var rt=n(215),at=n.n(rt),ot=n(424),it=n.n(ot);const lt={table:100,chart:20,code:1e3},st=[{id:"small",isDefault:!0,height:()=>.2*window.innerHeight},{id:"medium",height:()=>.4*window.innerHeight},{id:"large",height:()=>.8*window.innerHeight}],ct=["min","median","max"],ut=(e,t)=>{const n=window.location.hash.split("?")[1],r=at().parse(n,{ignoreQueryPrefix:!0});return it()(r,e,t||"")},dt=()=>{var e;const t=(null===(e=(window.location.hash.split("?")[1]||"").match(/g\d+\.expr/g))||void 0===e?void 0:e.length)||1;return new Array(t>10?10:t).fill(1).map(((e,t)=>ut("g".concat(t,".expr"),"")))};let ht=function(e){return e.yhat="yhat",e.yhatUpper="yhat_upper",e.yhatLower="yhat_lower",e.anomaly="vmui_anomalies_points",e.training="vmui_training_data",e.actual="actual",e.anomalyScore="anomaly_score",e}({}),mt=function(e){return e.table="table",e.chart="chart",e.code="code",e}({}),pt=function(e){return e.emptyServer="Please enter Server URL",e.validServer="Please provide a valid Server URL",e.validQuery="Please enter a valid Query and execute it",e.traceNotFound="Not found the tracing information",e.emptyTitle="Please enter title",e.positiveNumber="Please enter positive number",e.validStep="Please enter a valid step",e.unknownType="Unknown server response format: must have 'errorType'",e}({}),ft=function(e){return e.system="system",e.light="light",e.dark="dark",e}({}),vt=function(e){return e.empty="empty",e.metricsql="metricsql",e.label="label",e.labelValue="labelValue",e}({});const gt=e=>getComputedStyle(document.documentElement).getPropertyValue("--".concat(e)),yt=(e,t)=>{document.documentElement.style.setProperty("--".concat(e),t)},_t=()=>window.matchMedia("(prefers-color-scheme: dark)").matches,bt=e=>{let t;try{t=new URL(e)}catch(n){return!1}return"http:"===t.protocol||"https:"===t.protocol},wt=e=>e.replace(/\/$/,""),kt=ut("g0.tenantID",""),xt={serverUrl:wt((e=>{const{serverURL:t}=Ke(),n=et("SERVER_URL"),r=window.location.href.replace(/\/(select\/)?(vmui)\/.*/,""),a="".concat(window.location.origin).concat(window.location.pathname.replace(/^\/vmui/,"")),o=window.location.href.replace(/\/(?:prometheus\/)?(?:graph|vmui)\/.*/,"/prometheus"),i=t||n||o;switch(nt){case $e.logs:return r;case $e.anomaly:return n||a;default:return e?Ge(i,e):i}})(kt)),tenantId:kt,theme:et("THEME")||ft.system,isDarkTheme:null,flags:{}};function St(e,t){switch(t.type){case"SET_SERVER":return{...e,serverUrl:wt(t.payload)};case"SET_TENANT_ID":return{...e,tenantId:t.payload};case"SET_THEME":return Xe("THEME",t.payload),{...e,theme:t.payload};case"SET_DARK_THEME":return{...e,isDarkTheme:(n=e.theme,n===ft.system&&_t()||n===ft.dark)};case"SET_FLAGS":return{...e,flags:t.payload};default:throw new Error}var n}var Ct=n(746);var Et=0;Array.isArray;function Nt(e,t,n,r,a,o){t||(t={});var i,l,s=t;if("ref"in s)for(l in s={},t)"ref"==l?i=t[l]:s[l]=t[l];var c={type:e,props:s,key:n,ref:i,__k:null,__:null,__b:0,__e:null,__d:void 0,__c:null,constructor:void 0,__v:--Et,__i:-1,__u:0,__source:a,__self:o};if("function"==typeof e&&(i=e.defaultProps))for(l in i)void 0===s[l]&&(s[l]=i[l]);return Ct.fF.vnode&&Ct.fF.vnode(c),c}const At=(0,r.createContext)({}),Mt=()=>(0,r.useContext)(At).state,Tt=()=>(0,r.useContext)(At).dispatch,Lt=Object.entries(xt).reduce(((e,t)=>{let[n,r]=t;return{...e,[n]:ut(n)||r}}),{}),Ot="YYYY-MM-DD",Pt="YYYY-MM-DD HH:mm:ss",It="YYYY-MM-DD HH:mm:ss:SSS (Z)",Rt="YYYY-MM-DD[T]HH:mm:ss",Dt="YYYY-MM-DD_HHmmss",zt=window.innerWidth/4,Ft=window.innerWidth/40,jt=1,Ht=1578e8,$t=Intl.supportedValuesOf,Vt=$t?$t("timeZone"):["Africa/Abidjan","Africa/Accra","Africa/Addis_Ababa","Africa/Algiers","Africa/Asmera","Africa/Bamako","Africa/Bangui","Africa/Banjul","Africa/Bissau","Africa/Blantyre","Africa/Brazzaville","Africa/Bujumbura","Africa/Cairo","Africa/Casablanca","Africa/Ceuta","Africa/Conakry","Africa/Dakar","Africa/Dar_es_Salaam","Africa/Djibouti","Africa/Douala","Africa/El_Aaiun","Africa/Freetown","Africa/Gaborone","Africa/Harare","Africa/Johannesburg","Africa/Juba","Africa/Kampala","Africa/Khartoum","Africa/Kigali","Africa/Kinshasa","Africa/Lagos","Africa/Libreville","Africa/Lome","Africa/Luanda","Africa/Lubumbashi","Africa/Lusaka","Africa/Malabo","Africa/Maputo","Africa/Maseru","Africa/Mbabane","Africa/Mogadishu","Africa/Monrovia","Africa/Nairobi","Africa/Ndjamena","Africa/Niamey","Africa/Nouakchott","Africa/Ouagadougou","Africa/Porto-Novo","Africa/Sao_Tome","Africa/Tripoli","Africa/Tunis","Africa/Windhoek","America/Adak","America/Anchorage","America/Anguilla","America/Antigua","America/Araguaina","America/Argentina/La_Rioja","America/Argentina/Rio_Gallegos","America/Argentina/Salta","America/Argentina/San_Juan","America/Argentina/San_Luis","America/Argentina/Tucuman","America/Argentina/Ushuaia","America/Aruba","America/Asuncion","America/Bahia","America/Bahia_Banderas","America/Barbados","America/Belem","America/Belize","America/Blanc-Sablon","America/Boa_Vista","America/Bogota","America/Boise","America/Buenos_Aires","America/Cambridge_Bay","America/Campo_Grande","America/Cancun","America/Caracas","America/Catamarca","America/Cayenne","America/Cayman","America/Chicago","America/Chihuahua","America/Coral_Harbour","America/Cordoba","America/Costa_Rica","America/Creston","America/Cuiaba","America/Curacao","America/Danmarkshavn","America/Dawson","America/Dawson_Creek","America/Denver","America/Detroit","America/Dominica","America/Edmonton","America/Eirunepe","America/El_Salvador","America/Fort_Nelson","America/Fortaleza","America/Glace_Bay","America/Godthab","America/Goose_Bay","America/Grand_Turk","America/Grenada","America/Guadeloupe","America/Guatemala","America/Guayaquil","America/Guyana","America/Halifax","America/Havana","America/Hermosillo","America/Indiana/Knox","America/Indiana/Marengo","America/Indiana/Petersburg","America/Indiana/Tell_City","America/Indiana/Vevay","America/Indiana/Vincennes","America/Indiana/Winamac","America/Indianapolis","America/Inuvik","America/Iqaluit","America/Jamaica","America/Jujuy","America/Juneau","America/Kentucky/Monticello","America/Kralendijk","America/La_Paz","America/Lima","America/Los_Angeles","America/Louisville","America/Lower_Princes","America/Maceio","America/Managua","America/Manaus","America/Marigot","America/Martinique","America/Matamoros","America/Mazatlan","America/Mendoza","America/Menominee","America/Merida","America/Metlakatla","America/Mexico_City","America/Miquelon","America/Moncton","America/Monterrey","America/Montevideo","America/Montreal","America/Montserrat","America/Nassau","America/New_York","America/Nipigon","America/Nome","America/Noronha","America/North_Dakota/Beulah","America/North_Dakota/Center","America/North_Dakota/New_Salem","America/Ojinaga","America/Panama","America/Pangnirtung","America/Paramaribo","America/Phoenix","America/Port-au-Prince","America/Port_of_Spain","America/Porto_Velho","America/Puerto_Rico","America/Punta_Arenas","America/Rainy_River","America/Rankin_Inlet","America/Recife","America/Regina","America/Resolute","America/Rio_Branco","America/Santa_Isabel","America/Santarem","America/Santiago","America/Santo_Domingo","America/Sao_Paulo","America/Scoresbysund","America/Sitka","America/St_Barthelemy","America/St_Johns","America/St_Kitts","America/St_Lucia","America/St_Thomas","America/St_Vincent","America/Swift_Current","America/Tegucigalpa","America/Thule","America/Thunder_Bay","America/Tijuana","America/Toronto","America/Tortola","America/Vancouver","America/Whitehorse","America/Winnipeg","America/Yakutat","America/Yellowknife","Antarctica/Casey","Antarctica/Davis","Antarctica/DumontDUrville","Antarctica/Macquarie","Antarctica/Mawson","Antarctica/McMurdo","Antarctica/Palmer","Antarctica/Rothera","Antarctica/Syowa","Antarctica/Troll","Antarctica/Vostok","Arctic/Longyearbyen","Asia/Aden","Asia/Almaty","Asia/Amman","Asia/Anadyr","Asia/Aqtau","Asia/Aqtobe","Asia/Ashgabat","Asia/Atyrau","Asia/Baghdad","Asia/Bahrain","Asia/Baku","Asia/Bangkok","Asia/Barnaul","Asia/Beirut","Asia/Bishkek","Asia/Brunei","Asia/Calcutta","Asia/Chita","Asia/Choibalsan","Asia/Colombo","Asia/Damascus","Asia/Dhaka","Asia/Dili","Asia/Dubai","Asia/Dushanbe","Asia/Famagusta","Asia/Gaza","Asia/Hebron","Asia/Hong_Kong","Asia/Hovd","Asia/Irkutsk","Asia/Jakarta","Asia/Jayapura","Asia/Jerusalem","Asia/Kabul","Asia/Kamchatka","Asia/Karachi","Asia/Katmandu","Asia/Khandyga","Asia/Krasnoyarsk","Asia/Kuala_Lumpur","Asia/Kuching","Asia/Kuwait","Asia/Macau","Asia/Magadan","Asia/Makassar","Asia/Manila","Asia/Muscat","Asia/Nicosia","Asia/Novokuznetsk","Asia/Novosibirsk","Asia/Omsk","Asia/Oral","Asia/Phnom_Penh","Asia/Pontianak","Asia/Pyongyang","Asia/Qatar","Asia/Qostanay","Asia/Qyzylorda","Asia/Rangoon","Asia/Riyadh","Asia/Saigon","Asia/Sakhalin","Asia/Samarkand","Asia/Seoul","Asia/Shanghai","Asia/Singapore","Asia/Srednekolymsk","Asia/Taipei","Asia/Tashkent","Asia/Tbilisi","Asia/Tehran","Asia/Thimphu","Asia/Tokyo","Asia/Tomsk","Asia/Ulaanbaatar","Asia/Urumqi","Asia/Ust-Nera","Asia/Vientiane","Asia/Vladivostok","Asia/Yakutsk","Asia/Yekaterinburg","Asia/Yerevan","Atlantic/Azores","Atlantic/Bermuda","Atlantic/Canary","Atlantic/Cape_Verde","Atlantic/Faeroe","Atlantic/Madeira","Atlantic/Reykjavik","Atlantic/South_Georgia","Atlantic/St_Helena","Atlantic/Stanley","Australia/Adelaide","Australia/Brisbane","Australia/Broken_Hill","Australia/Currie","Australia/Darwin","Australia/Eucla","Australia/Hobart","Australia/Lindeman","Australia/Lord_Howe","Australia/Melbourne","Australia/Perth","Australia/Sydney","Europe/Amsterdam","Europe/Andorra","Europe/Astrakhan","Europe/Athens","Europe/Belgrade","Europe/Berlin","Europe/Bratislava","Europe/Brussels","Europe/Bucharest","Europe/Budapest","Europe/Busingen","Europe/Chisinau","Europe/Copenhagen","Europe/Dublin","Europe/Gibraltar","Europe/Guernsey","Europe/Helsinki","Europe/Isle_of_Man","Europe/Istanbul","Europe/Jersey","Europe/Kaliningrad","Europe/Kiev","Europe/Kirov","Europe/Lisbon","Europe/Ljubljana","Europe/London","Europe/Luxembourg","Europe/Madrid","Europe/Malta","Europe/Mariehamn","Europe/Minsk","Europe/Monaco","Europe/Moscow","Europe/Oslo","Europe/Paris","Europe/Podgorica","Europe/Prague","Europe/Riga","Europe/Rome","Europe/Samara","Europe/San_Marino","Europe/Sarajevo","Europe/Saratov","Europe/Simferopol","Europe/Skopje","Europe/Sofia","Europe/Stockholm","Europe/Tallinn","Europe/Tirane","Europe/Ulyanovsk","Europe/Uzhgorod","Europe/Vaduz","Europe/Vatican","Europe/Vienna","Europe/Vilnius","Europe/Volgograd","Europe/Warsaw","Europe/Zagreb","Europe/Zaporozhye","Europe/Zurich","Indian/Antananarivo","Indian/Chagos","Indian/Christmas","Indian/Cocos","Indian/Comoro","Indian/Kerguelen","Indian/Mahe","Indian/Maldives","Indian/Mauritius","Indian/Mayotte","Indian/Reunion","Pacific/Apia","Pacific/Auckland","Pacific/Bougainville","Pacific/Chatham","Pacific/Easter","Pacific/Efate","Pacific/Enderbury","Pacific/Fakaofo","Pacific/Fiji","Pacific/Funafuti","Pacific/Galapagos","Pacific/Gambier","Pacific/Guadalcanal","Pacific/Guam","Pacific/Honolulu","Pacific/Johnston","Pacific/Kiritimati","Pacific/Kosrae","Pacific/Kwajalein","Pacific/Majuro","Pacific/Marquesas","Pacific/Midway","Pacific/Nauru","Pacific/Niue","Pacific/Norfolk","Pacific/Noumea","Pacific/Pago_Pago","Pacific/Palau","Pacific/Pitcairn","Pacific/Ponape","Pacific/Port_Moresby","Pacific/Rarotonga","Pacific/Saipan","Pacific/Tahiti","Pacific/Tarawa","Pacific/Tongatapu","Pacific/Truk","Pacific/Wake","Pacific/Wallis"],Ut=[{long:"years",short:"y",possible:"year"},{long:"weeks",short:"w",possible:"week"},{long:"days",short:"d",possible:"day"},{long:"hours",short:"h",possible:"hour"},{long:"minutes",short:"m",possible:"min"},{long:"seconds",short:"s",possible:"sec"},{long:"milliseconds",short:"ms",possible:"millisecond"}],Bt=Ut.map((e=>e.short)),qt=e=>Math.round(1e3*e)/1e3,Yt=e=>en(o().duration(e,"seconds").asMilliseconds()),Wt=e=>{let t=qt(e);const n=Math.round(e);e>=100&&(t=n-n%10),e<100&&e>=10&&(t=n-n%5),e<10&&e>=1&&(t=n),e<1&&e>.01&&(t=Math.round(40*e)/40);return Yt(t||.001).replace(/\s/g,"")},Kt=e=>{const t=e.match(/\d+/g),n=e.match(/[a-zA-Z]+/g);if(n&&t&&Bt.includes(n[0]))return{[n[0]]:t[0]}},Qt=e=>{const t=Ut.map((e=>e.short)).join("|"),n=new RegExp("\\d+(\\.\\d+)?[".concat(t,"]+"),"g"),r=(e.match(n)||[]).reduce(((e,t)=>{const n=Kt(t);return n?{...e,...n}:{...e}}),{});return o().duration(r).asSeconds()},Zt=(e,t)=>Wt(e/(t?Ft:zt)),Gt=(e,t)=>{const n=(t||o()().toDate()).valueOf()/1e3,r=Qt(e);return{start:n-r,end:n,step:Zt(r),date:Jt(t||o()().toDate())}},Jt=e=>o().tz(e).utc().format(Rt),Xt=e=>o().tz(e).format(Rt),en=e=>{const t=Math.floor(e%1e3),n=Math.floor(e/1e3%60),r=Math.floor(e/1e3/60%60),a=Math.floor(e/1e3/3600%24),o=Math.floor(e/864e5),i=["d","h","m","s","ms"],l=[o,a,r,n,t].map(((e,t)=>e?"".concat(e).concat(i[t]):""));return l.filter((e=>e)).join("")},tn=e=>{const t=o()(1e3*e);return t.isValid()?t.toDate():new Date},nn={NODE_ENV:"production",PUBLIC_URL:".",WDS_SOCKET_HOST:void 0,WDS_SOCKET_PATH:void 0,WDS_SOCKET_PORT:void 0,FAST_REFRESH:!1}.REACT_APP_TYPE===$e.logs,rn=[{title:"Last 5 minutes",duration:"5m",isDefault:nn},{title:"Last 15 minutes",duration:"15m"},{title:"Last 30 minutes",duration:"30m",isDefault:!nn},{title:"Last 1 hour",duration:"1h"},{title:"Last 3 hours",duration:"3h"},{title:"Last 6 hours",duration:"6h"},{title:"Last 12 hours",duration:"12h"},{title:"Last 24 hours",duration:"24h"},{title:"Last 2 days",duration:"2d"},{title:"Last 7 days",duration:"7d"},{title:"Last 30 days",duration:"30d"},{title:"Last 90 days",duration:"90d"},{title:"Last 180 days",duration:"180d"},{title:"Last 1 year",duration:"1y"},{title:"Yesterday",duration:"1d",until:()=>o()().tz().subtract(1,"day").endOf("day").toDate()},{title:"Today",duration:"1d",until:()=>o()().tz().endOf("day").toDate()}].map((e=>({id:e.title.replace(/\s/g,"_").toLocaleLowerCase(),until:e.until?e.until:()=>o()().tz().toDate(),...e}))),an=e=>{var t;let{relativeTimeId:n,defaultDuration:r,defaultEndInput:a}=e;const o=null===(t=rn.find((e=>e.isDefault)))||void 0===t?void 0:t.id,i=n||ut("g0.relative_time",o),l=rn.find((e=>e.id===i));return{relativeTimeId:l?i:"none",duration:l?l.duration:r,endInput:l?l.until():a}},on=e=>{const t=o()().tz(e);return"UTC".concat(t.format("Z"))},ln=function(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:"";const t=new RegExp(e,"i");return Vt.reduce(((n,r)=>{const a=(r.match(/^(.*?)\//)||[])[1]||"unknown",o=on(r),i=o.replace(/UTC|0/,""),l=r.replace(/[/_]/g," "),s={region:r,utc:o,search:"".concat(r," ").concat(o," ").concat(l," ").concat(i)},c=!e||e&&t.test(s.search);return c&&n[a]?n[a].push(s):c&&(n[a]=[s]),n}),{})},sn=e=>{o().tz.setDefault(e)},cn=()=>{const e=o().tz.guess(),t=(e=>{try{return o()().tz(e),!0}catch(Pp){return!1}})(e);return{isValid:t,title:t?"Browser Time (".concat(e,")"):"Browser timezone (UTC)",region:t?e:"UTC"}},un=et("TIMEZONE")||cn().region;sn(un);const dn=()=>{const e=ut("g0.range_input"),{duration:t,endInput:n,relativeTimeId:r}=an({defaultDuration:e||"1h",defaultEndInput:(a=ut("g0.end_input",o()().utc().format(Rt)),o()(a).utcOffset(0,!0).toDate()),relativeTimeId:e?ut("g0.relative_time","none"):void 0});var a;return{duration:t,period:Gt(t,n),relativeTime:r}},hn={...dn(),timezone:un};function mn(e,t){switch(t.type){case"SET_TIME_STATE":return{...e,...t.payload};case"SET_DURATION":return{...e,duration:t.payload,period:Gt(t.payload,tn(e.period.end)),relativeTime:"none"};case"SET_RELATIVE_TIME":return{...e,duration:t.payload.duration,period:Gt(t.payload.duration,t.payload.until),relativeTime:t.payload.id};case"SET_PERIOD":const n=(e=>{const t=e.to.valueOf()-e.from.valueOf();return en(t)})(t.payload);return{...e,duration:n,period:Gt(n,t.payload.to),relativeTime:"none"};case"RUN_QUERY":const{duration:r,endInput:a}=an({relativeTimeId:e.relativeTime,defaultDuration:e.duration,defaultEndInput:tn(e.period.end)});return{...e,period:Gt(r,a)};case"RUN_QUERY_TO_NOW":return{...e,period:Gt(e.duration)};case"SET_TIMEZONE":return sn(t.payload),Xe("TIMEZONE",t.payload),e.defaultTimezone&&Xe("DISABLED_DEFAULT_TIMEZONE",t.payload!==e.defaultTimezone),{...e,timezone:t.payload};case"SET_DEFAULT_TIMEZONE":return{...e,defaultTimezone:t.payload};default:throw new Error}}const pn=(0,r.createContext)({}),fn=()=>(0,r.useContext)(pn).state,vn=()=>(0,r.useContext)(pn).dispatch,gn=e=>{const t=et(e);return t?JSON.parse(t):[]},yn=50,_n=1e3,bn=1e3;const wn=dt(),kn={query:wn,queryHistory:wn.map((e=>({index:0,values:[e]}))),autocomplete:et("AUTOCOMPLETE")||!1,autocompleteQuick:!1,autocompleteCache:new class{constructor(){this.maxSize=void 0,this.map=void 0,this.maxSize=bn,this.map=new Map}get(e){for(const[t,n]of this.map){const r=JSON.parse(t),a=r.start===e.start&&r.end===e.end,o=r.type===e.type,i=e.value&&r.value&&e.value.includes(r.value),l=r.match===e.match||i,s=n.length<_n;if(l&&a&&o&&s)return n}return this.map.get(JSON.stringify(e))}put(e,t){if(this.map.size>=this.maxSize){const e=this.map.keys().next().value;this.map.delete(e)}this.map.set(JSON.stringify(e),t)}},metricsQLFunctions:[]};function xn(e,t){switch(t.type){case"SET_QUERY":return{...e,query:t.payload.map((e=>e))};case"SET_QUERY_HISTORY":return(e=>{const t=e.map((e=>e.values[e.index])),n=gn("QUERY_HISTORY");n[0]||(n[0]=[]);const r=n[0];t.forEach((e=>{!r.includes(e)&&e&&r.unshift(e),r.length>250&&r.shift()})),Xe("QUERY_HISTORY",JSON.stringify(n))})(t.payload),{...e,queryHistory:t.payload};case"SET_QUERY_HISTORY_BY_INDEX":return e.queryHistory.splice(t.payload.queryNumber,1,t.payload.value),{...e,queryHistory:e.queryHistory};case"TOGGLE_AUTOCOMPLETE":return Xe("AUTOCOMPLETE",!e.autocomplete),{...e,autocomplete:!e.autocomplete};case"SET_AUTOCOMPLETE_QUICK":return{...e,autocompleteQuick:t.payload};case"SET_AUTOCOMPLETE_CACHE":return e.autocompleteCache.put(t.payload.key,t.payload.value),{...e};case"SET_METRICSQL_FUNCTIONS":return{...e,metricsQLFunctions:t.payload};default:throw new Error}}const Sn=(0,r.createContext)({}),Cn=()=>(0,r.useContext)(Sn).state,En=()=>(0,r.useContext)(Sn).dispatch,Nn=()=>Nt("svg",{viewBox:"0 0 74 24",fill:"currentColor",children:Nt("path",{d:"M6.12 10.48c.36.28.8.43 1.26.43h.05c.48 0 .96-.19 1.25-.44 1.5-1.28 5.88-5.29 5.88-5.29C15.73 4.1 12.46 3.01 7.43 3h-.06C2.33 3-.93 4.1.24 5.18c0 0 4.37 4 5.88 5.3Zm2.56 2.16c-.36.28-.8.44-1.26.45h-.04c-.46 0-.9-.17-1.26-.45-1.04-.88-4.74-4.22-6.12-5.5v1.94c0 .21.08.5.22.63l.07.06c1.05.96 4.55 4.16 5.83 5.25.36.28.8.43 1.26.44h.04c.49-.02.96-.2 1.26-.44 1.3-1.11 4.94-4.45 5.88-5.31.15-.14.23-.42.23-.63V7.15a454.94 454.94 0 0 1-6.11 5.5Zm-1.26 4.99c.46 0 .9-.16 1.26-.44a454.4 454.4 0 0 0 6.1-5.5v1.94c0 .2-.07.48-.22.62-.94.87-4.57 4.2-5.88 5.3-.3.26-.77.44-1.26.45h-.04c-.46 0-.9-.16-1.26-.44-1.2-1.02-4.38-3.92-5.62-5.06l-.28-.25c-.14-.14-.22-.42-.22-.62v-1.94c1.38 1.26 5.08 4.6 6.12 5.5.36.28.8.43 1.26.44h.04ZM35 5l-5.84 14.46h-2.43L20.89 5h2.16a.9.9 0 0 1 .9.61l3.41 8.82a18.8 18.8 0 0 1 .62 2.02 19.44 19.44 0 0 1 .57-2.02l3.39-8.82c.05-.15.16-.3.31-.42a.9.9 0 0 1 .58-.19H35Zm17.18 0v14.46H49.8v-9.34c0-.37.02-.78.06-1.21l-4.37 8.21c-.21.4-.53.59-.95.59h-.38c-.43 0-.75-.2-.95-.59L38.8 8.88a22.96 22.96 0 0 1 .07 1.24v9.34H36.5V5h2.03l.3.01c.1 0 .17.02.24.05.07.03.13.07.19.13a1 1 0 0 1 .17.24l4.33 8.03a16.97 16.97 0 0 1 .6 1.36 14.34 14.34 0 0 1 .6-1.38l4.28-8.01c.05-.1.1-.18.17-.24.06-.06.12-.1.19-.13a.9.9 0 0 1 .24-.05l.3-.01h2.04Zm8.88 13.73a4.5 4.5 0 0 0 1.82-.35 3.96 3.96 0 0 0 2.22-2.47c.2-.57.3-1.19.3-1.85V5.31h1.02v8.75c0 .78-.12 1.51-.37 2.19a4.88 4.88 0 0 1-2.76 2.95c-.66.29-1.4.43-2.23.43-.82 0-1.57-.14-2.24-.43a5.01 5.01 0 0 1-2.75-2.95 6.37 6.37 0 0 1-.37-2.19V5.31h1.03v8.74c0 .66.1 1.28.3 1.85a3.98 3.98 0 0 0 2.21 2.47c.53.24 1.14.36 1.82.36Zm10.38.73h-1.03V5.31h1.03v14.15Z"})}),An=()=>Nt("svg",{viewBox:"0 0 85 38",fill:"currentColor",children:[Nt("path",{d:"M11.12 10.48c.36.28.8.43 1.26.43h.05c.48 0 .96-.19 1.25-.44 1.5-1.28 5.88-5.29 5.88-5.29 1.17-1.09-2.1-2.17-7.13-2.18h-.06c-5.04 0-8.3 1.1-7.13 2.18 0 0 4.37 4 5.88 5.3Zm2.56 2.16c-.36.28-.8.44-1.26.45h-.04c-.46 0-.9-.17-1.26-.45-1.04-.88-4.74-4.22-6.12-5.5v1.94c0 .21.08.5.22.63l.07.06c1.05.96 4.55 4.16 5.83 5.25.36.28.8.43 1.26.44h.04c.49-.02.96-.2 1.26-.44 1.3-1.11 4.94-4.45 5.88-5.31.15-.14.23-.42.23-.63V7.15a455.13 455.13 0 0 1-6.11 5.5Zm-1.26 4.99c.46 0 .9-.16 1.26-.44 2.05-1.82 4.09-3.65 6.1-5.5v1.94c0 .2-.07.48-.22.62-.94.87-4.57 4.2-5.88 5.3-.3.26-.77.44-1.26.45h-.04c-.46 0-.9-.16-1.26-.44-1.2-1.02-4.38-3.92-5.62-5.06l-.28-.25c-.14-.14-.22-.42-.22-.62v-1.94c1.38 1.26 5.08 4.6 6.12 5.5.36.28.8.43 1.26.44h.04ZM40 5l-5.84 14.46h-2.43L25.89 5h2.16a.9.9 0 0 1 .9.61l3.41 8.82a18.8 18.8 0 0 1 .62 2.02 19.44 19.44 0 0 1 .57-2.02l3.39-8.82c.05-.15.16-.3.31-.42a.9.9 0 0 1 .58-.19H40Zm17.18 0v14.46H54.8v-9.34c0-.37.02-.78.06-1.21l-4.37 8.21c-.21.4-.53.59-.95.59h-.38c-.43 0-.75-.2-.95-.59L43.8 8.88a22.96 22.96 0 0 1 .07 1.24v9.34H41.5V5h2.03l.3.01c.1 0 .17.02.24.05.07.03.13.07.19.13a1 1 0 0 1 .17.24l4.33 8.03a16.97 16.97 0 0 1 .6 1.36 14.34 14.34 0 0 1 .6-1.38l4.28-8.01c.05-.1.1-.18.17-.24.06-.06.12-.1.19-.13a.9.9 0 0 1 .24-.05l.3-.01h2.04Zm8.88 13.73a4.5 4.5 0 0 0 1.82-.35 3.96 3.96 0 0 0 2.22-2.47c.2-.57.3-1.19.3-1.85V5.31h1.02v8.75c0 .78-.12 1.51-.37 2.19a4.88 4.88 0 0 1-2.76 2.95c-.66.29-1.4.43-2.23.43-.82 0-1.57-.14-2.24-.43a5.01 5.01 0 0 1-2.75-2.95 6.37 6.37 0 0 1-.37-2.19V5.31h1.03v8.74c0 .66.1 1.28.3 1.85a3.98 3.98 0 0 0 2.21 2.47c.53.24 1.14.36 1.82.36Zm10.38.73h-1.03V5.31h1.03v14.15ZM1.73 36v-5.17l-.67-.07a.6.6 0 0 1-.21-.1.23.23 0 0 1-.08-.18v-.44h.96v-.59c0-.34.05-.65.14-.92a1.79 1.79 0 0 1 1.08-1.11 2.45 2.45 0 0 1 1.62-.02l-.03.53c0 .1-.06.15-.16.16H4c-.18 0-.35.03-.5.08a.95.95 0 0 0-.39.23c-.1.11-.19.25-.25.43-.05.18-.08.4-.08.65v.56h1.75v.78H2.8V36H1.73Zm6.17-6.17c.45 0 .85.07 1.2.22a2.57 2.57 0 0 1 1.5 1.62c.13.38.2.81.2 1.29s-.07.91-.2 1.3a2.57 2.57 0 0 1-1.49 1.61c-.36.14-.76.21-1.2.21-.45 0-.86-.07-1.22-.21a2.57 2.57 0 0 1-1.5-1.62c-.12-.38-.19-.81-.19-1.3 0-.47.07-.9.2-1.28a2.57 2.57 0 0 1 1.5-1.62c.35-.15.76-.22 1.2-.22Zm0 5.42c.6 0 1.05-.2 1.35-.6.3-.4.44-.97.44-1.69s-.15-1.28-.44-1.69c-.3-.4-.75-.6-1.35-.6-.3 0-.57.05-.8.15-.22.1-.4.26-.56.45-.15.2-.26.44-.33.73-.08.28-.11.6-.11.96 0 .72.15 1.29.44 1.69.3.4.76.6 1.36.6Zm5.26-4.11c.2-.42.43-.74.71-.97.28-.24.62-.36 1.03-.36.13 0 .25.02.36.05.12.02.23.07.32.13l-.08.8c-.02.1-.08.15-.18.15l-.24-.04a1.7 1.7 0 0 0-.88.05c-.15.05-.29.14-.4.25-.12.1-.23.24-.32.4-.1.17-.18.35-.26.56V36h-1.07v-6.08h.61c.12 0 .2.02.24.07.05.04.08.12.1.23l.06.92Zm13.73-3.82L23.39 36h-1.46l-3.5-8.68h1.29a.54.54 0 0 1 .54.37l2.04 5.3a11.31 11.31 0 0 1 .37 1.21 11.65 11.65 0 0 1 .35-1.22l2.03-5.29c.03-.1.1-.18.19-.25.1-.08.21-.12.35-.12h1.3Zm2.2 2.52V36H27.6v-6.16h1.49Zm.2-1.79c0 .13-.02.25-.08.36a1 1 0 0 1-.51.5.96.96 0 0 1-.73 0 1.02 1.02 0 0 1-.5-.5.96.96 0 0 1 0-.73.93.93 0 0 1 .86-.58.9.9 0 0 1 .37.08c.12.05.22.11.3.2a.94.94 0 0 1 .3.67Zm5.72 3.1a.68.68 0 0 1-.13.13c-.04.03-.1.05-.18.05a.42.42 0 0 1-.22-.07 3.95 3.95 0 0 0-.62-.31c-.14-.05-.3-.07-.51-.07-.26 0-.5.04-.69.14-.2.1-.36.23-.49.4-.13.18-.22.4-.29.64-.06.25-.1.53-.1.85 0 .33.04.62.1.88.08.25.18.47.32.64.13.18.29.3.48.4.18.09.4.13.63.13a1.6 1.6 0 0 0 .94-.27l.26-.2a.4.4 0 0 1 .25-.09.3.3 0 0 1 .27.14l.43.54a2.76 2.76 0 0 1-1.77.96c-.22.03-.43.05-.65.05a2.57 2.57 0 0 1-1.96-.83c-.25-.28-.45-.6-.6-1-.14-.4-.21-.85-.21-1.35 0-.45.06-.87.2-1.25a2.61 2.61 0 0 1 1.51-1.67c.37-.16.8-.24 1.28-.24.46 0 .86.07 1.2.22.35.15.66.36.94.64l-.4.54Zm3.43 4.95c-.54 0-.95-.15-1.24-.45-.28-.3-.42-.73-.42-1.26v-3.44h-.63a.29.29 0 0 1-.2-.07c-.06-.06-.09-.13-.09-.24v-.59l.99-.16.31-1.68a.33.33 0 0 1 .12-.18.34.34 0 0 1 .21-.07h.77v1.94h1.64v1.05h-1.64v3.34c0 .2.05.34.14.45.1.1.22.16.39.16a.73.73 0 0 0 .39-.1l.12-.07a.2.2 0 0 1 .11-.03c.05 0 .08.01.11.03l.09.1.44.72c-.21.18-.46.32-.74.4-.28.1-.57.15-.87.15Zm5.09-6.35c.46 0 .87.07 1.24.22a2.7 2.7 0 0 1 1.58 1.63c.14.39.22.83.22 1.31 0 .49-.08.93-.22 1.32-.14.4-.35.73-.62 1-.26.28-.58.49-.96.64-.37.15-.78.22-1.24.22a3.4 3.4 0 0 1-1.25-.22 2.71 2.71 0 0 1-1.59-1.64 3.8 3.8 0 0 1-.21-1.32c0-.48.07-.92.21-1.31a2.75 2.75 0 0 1 1.58-1.63c.38-.15.8-.22 1.26-.22Zm0 5.2c.51 0 .89-.17 1.13-.52.25-.34.38-.84.38-1.5a2.6 2.6 0 0 0-.38-1.53c-.24-.34-.62-.52-1.13-.52-.52 0-.9.18-1.16.53-.25.35-.37.85-.37 1.51s.12 1.17.37 1.51c.25.35.64.52 1.16.52Zm5.56-4.04c.2-.37.42-.65.69-.86.26-.21.57-.32.94-.32.28 0 .5.06.68.19l-.1 1.1a.3.3 0 0 1-.09.16.24.24 0 0 1-.15.04 1.8 1.8 0 0 1-.27-.03 2.01 2.01 0 0 0-.34-.03c-.16 0-.3.03-.44.08a1.1 1.1 0 0 0-.34.2c-.1.1-.2.2-.27.33-.08.13-.15.27-.22.44V36H47.7v-6.16h.87c.15 0 .26.03.31.09.06.05.1.15.13.29l.09.7Zm4.62-1.07V36h-1.49v-6.16h1.49Zm.2-1.79c0 .13-.02.25-.07.36a1 1 0 0 1-.51.5.96.96 0 0 1-.74 0 1.02 1.02 0 0 1-.5-.5.96.96 0 0 1 0-.73.93.93 0 0 1 .86-.58.9.9 0 0 1 .38.08c.11.05.21.11.3.2a.94.94 0 0 1 .28.67Zm4.56 5.32a7.8 7.8 0 0 0-1.08.12c-.29.05-.52.12-.7.2a.92.92 0 0 0-.38.3.64.64 0 0 0-.11.36c0 .26.07.45.23.56.15.11.35.17.6.17.3 0 .57-.06.79-.17.22-.1.44-.28.65-.5v-1.04Zm-3.4-2.67c.71-.65 1.57-.97 2.56-.97.36 0 .68.06.97.18a1.99 1.99 0 0 1 1.16 1.24c.1.3.16.61.16.96V36h-.67a.7.7 0 0 1-.33-.06c-.07-.04-.13-.13-.18-.26l-.13-.44c-.16.14-.3.26-.46.37a2.8 2.8 0 0 1-.97.43 2.77 2.77 0 0 1-1.32-.05 1.62 1.62 0 0 1-.57-.31 1.41 1.41 0 0 1-.38-.53 1.85 1.85 0 0 1-.05-1.18c.05-.16.14-.3.25-.45.12-.14.28-.27.46-.4a3 3 0 0 1 .7-.32 9.19 9.19 0 0 1 2.2-.33v-.36c0-.41-.09-.71-.26-.91-.18-.2-.43-.3-.76-.3a1.84 1.84 0 0 0-1.02.28l-.33.18c-.1.06-.2.09-.32.09-.1 0-.2-.03-.27-.08a.72.72 0 0 1-.17-.2l-.26-.47Zm11.49 4.32V36h-4.88v-8.6h1.16v7.62h3.72Zm3.16-5.2c.44 0 .84.08 1.2.23a2.57 2.57 0 0 1 1.49 1.62c.13.38.2.81.2 1.29s-.07.91-.2 1.3a2.57 2.57 0 0 1-1.49 1.61c-.36.14-.76.21-1.2.21-.45 0-.85-.07-1.21-.21a2.57 2.57 0 0 1-1.5-1.62c-.13-.38-.2-.81-.2-1.3 0-.47.07-.9.2-1.28.14-.39.33-.72.59-1 .25-.26.55-.47.9-.62.37-.15.77-.22 1.22-.22Zm0 5.43c.6 0 1.05-.2 1.34-.6.3-.4.45-.97.45-1.69s-.15-1.28-.45-1.69c-.3-.4-.74-.6-1.34-.6-.3 0-.57.05-.8.15-.22.1-.4.26-.56.45-.15.2-.26.44-.34.73-.07.28-.1.6-.1.96 0 .72.14 1.29.44 1.69.3.4.75.6 1.36.6Zm6.33-2.22c.22 0 .4-.03.57-.09.16-.06.3-.14.41-.25.12-.11.2-.24.26-.39.05-.15.08-.31.08-.5 0-.37-.11-.66-.34-.88-.23-.22-.55-.33-.98-.33-.43 0-.76.1-.99.33-.22.22-.34.51-.34.89 0 .18.03.34.09.5a1.1 1.1 0 0 0 .67.63c.16.06.35.09.57.09Zm1.93 3.3a.51.51 0 0 0-.13-.36.84.84 0 0 0-.34-.22 8.57 8.57 0 0 0-1.73-.2 7.5 7.5 0 0 1-.62-.05c-.23.1-.41.23-.56.4a.8.8 0 0 0-.1.92c.07.12.18.22.32.3.14.1.32.16.54.21a3.5 3.5 0 0 0 1.55 0c.23-.05.42-.12.57-.22.16-.1.29-.21.37-.34a.8.8 0 0 0 .13-.44Zm1.08-6.17v.4c0 .13-.08.21-.25.25l-.69.09c.14.26.2.56.2.88a1.86 1.86 0 0 1-1.36 1.82 3.07 3.07 0 0 1-1.72.04c-.12.08-.22.16-.29.25a.44.44 0 0 0-.1.27c0 .15.06.26.17.33.12.08.28.13.47.16a5 5 0 0 0 .66.06 16.56 16.56 0 0 1 1.5.13c.26.05.48.12.67.22.19.1.34.24.46.41.12.18.18.4.18.69 0 .26-.07.5-.2.75s-.31.46-.56.65c-.24.2-.54.34-.9.46a4.57 4.57 0 0 1-2.36.04c-.33-.09-.6-.2-.82-.36a1.56 1.56 0 0 1-.5-.51c-.1-.2-.16-.4-.16-.6 0-.3.1-.56.28-.77.19-.2.45-.37.77-.5a1.15 1.15 0 0 1-.43-.32.88.88 0 0 1-.15-.54c0-.09.01-.18.04-.27.04-.1.08-.2.15-.28a1.55 1.55 0 0 1 .58-.5c-.3-.16-.53-.39-.7-.66-.17-.28-.25-.6-.25-.97 0-.3.05-.57.16-.8.12-.25.28-.46.48-.63.2-.17.45-.3.73-.4a3 3 0 0 1 2.3.21h1.64Zm4.65.76a.24.24 0 0 1-.23.14.42.42 0 0 1-.2-.07 3.59 3.59 0 0 0-.67-.3 1.8 1.8 0 0 0-1.03 0c-.14.05-.27.11-.37.2a.87.87 0 0 0-.23.27.75.75 0 0 0-.08.35c0 .15.04.28.13.39.1.1.21.19.36.27.15.07.32.14.5.2a13.63 13.63 0 0 1 1.16.4c.2.08.36.18.5.3a1.33 1.33 0 0 1 .5 1.07 2 2 0 0 1-.15.78c-.1.24-.25.44-.45.62-.2.17-.43.3-.72.4a3.1 3.1 0 0 1-2.14-.05 2.97 2.97 0 0 1-.87-.53l.25-.41c.04-.05.07-.1.12-.12a.3.3 0 0 1 .17-.04.4.4 0 0 1 .22.08l.3.19a1.91 1.91 0 0 0 1.03.27c.2 0 .38-.03.54-.08.16-.06.29-.13.4-.22a.96.96 0 0 0 .3-.7c0-.17-.05-.31-.14-.42-.09-.11-.2-.2-.36-.28a2.6 2.6 0 0 0-.5-.2l-.59-.19c-.2-.06-.39-.14-.58-.22a2.14 2.14 0 0 1-.5-.3 1.45 1.45 0 0 1-.36-.46c-.1-.19-.14-.41-.14-.67a1.6 1.6 0 0 1 .57-1.23c.18-.16.4-.3.68-.39.26-.1.57-.14.91-.14a2.84 2.84 0 0 1 1.9.7l-.23.4Z"}),Nt("defs",{children:Nt("path",{d:"M0 0h85v38H0z"})})]}),Mn=()=>Nt("svg",{viewBox:"0 0 85 38",fill:"currentColor",children:Nt("path",{d:"M11.118 10.476c.36.28.801.433 1.257.436h.052c.48-.007.961-.192 1.25-.444 1.509-1.279 5.88-5.287 5.88-5.287 1.168-1.087-2.093-2.174-7.13-2.181h-.06c-5.036.007-8.298 1.094-7.13 2.181 0 0 4.372 4.008 5.88 5.295zm2.559 2.166c-.359.283-.801.439-1.258.444h-.044a2.071 2.071 0 0 1-1.257-.444C10.082 11.755 6.384 8.42 5 7.148v1.93c0 .215.081.496.222.629l.07.064c1.045.955 4.546 4.154 5.825 5.245.358.283.8.438 1.257.444h.044c.489-.015.962-.2 1.258-.444 1.309-1.11 4.948-4.444 5.887-5.31.148-.132.222-.413.222-.628v-1.93a455.127 455.127 0 0 1-6.11 5.494zm-1.258 4.984a2.071 2.071 0 0 0 1.258-.436c2.053-1.815 4.09-3.65 6.11-5.502v1.938c0 .207-.075.488-.223.621-.94.873-4.578 4.2-5.887 5.31-.296.25-.77.436-1.258.443h-.044a2.071 2.071 0 0 1-1.257-.436c-1.204-1.027-4.376-3.928-5.616-5.062l-.28-.255c-.14-.133-.221-.414-.221-.621v-1.938c1.383 1.265 5.081 4.607 6.117 5.495.358.282.8.438 1.257.443h.044zM40 5l-5.84 14.46h-2.43L25.89 5h2.16c.233 0 .423.057.57.17.146.113.256.26.33.44l3.41 8.82c.113.287.22.603.32.95.106.34.206.697.3 1.07.08-.373.166-.73.26-1.07a8.84 8.84 0 0 1 .31-.95l3.39-8.82a.959.959 0 0 1 .31-.42.906.906 0 0 1 .58-.19H40zm17.176 0v14.46h-2.37v-9.34c0-.373.02-.777.06-1.21l-4.37 8.21c-.206.393-.523.59-.95.59h-.38c-.426 0-.743-.197-.95-.59l-4.42-8.24c.02.22.037.437.05.65.014.213.02.41.02.59v9.34h-2.37V5h2.03c.12 0 .224.003.31.01a.778.778 0 0 1 .23.05c.074.027.137.07.19.13.06.06.117.14.17.24l4.33 8.03c.114.213.217.433.31.66.1.227.197.46.29.7.094-.247.19-.483.29-.71.1-.233.207-.457.32-.67l4.27-8.01c.054-.1.11-.18.17-.24a.57.57 0 0 1 .19-.13.903.903 0 0 1 .24-.05c.087-.007.19-.01.31-.01h2.03zm8.887 13.73c.68 0 1.286-.117 1.82-.35.54-.24.996-.57 1.37-.99a4.28 4.28 0 0 0 .85-1.48c.2-.573.3-1.19.3-1.85V5.31h1.02v8.75c0 .78-.124 1.51-.37 2.19a5.248 5.248 0 0 1-1.07 1.77c-.46.5-1.024.893-1.69 1.18-.66.287-1.404.43-2.23.43-.827 0-1.574-.143-2.24-.43a5.012 5.012 0 0 1-1.69-1.18 5.33 5.33 0 0 1-1.06-1.77 6.373 6.373 0 0 1-.37-2.19V5.31h1.03v8.74c0 .66.096 1.277.29 1.85.2.567.483 1.06.85 1.48.373.42.826.75 1.36.99.54.24 1.15.36 1.83.36zm10.38.73h-1.03V5.31h1.03v14.15zM4.242 35v-5.166l-.672-.078a.595.595 0 0 1-.21-.09.23.23 0 0 1-.078-.186v-.438h.96v-.588c0-.348.048-.656.144-.924.1-.272.24-.5.42-.684a1.79 1.79 0 0 1 .66-.426c.256-.096.544-.144.864-.144.272 0 .522.04.75.12l-.024.534c-.008.096-.062.148-.162.156a4.947 4.947 0 0 1-.39.012c-.184 0-.352.024-.504.072a.949.949 0 0 0-.384.234c-.108.108-.192.25-.252.426a2.184 2.184 0 0 0-.084.654v.558h1.752v.774H5.316V35H4.242zM10.416 28.826a3.1 3.1 0 0 1 1.2.222c.356.148.66.358.912.63s.444.602.576.99c.136.384.204.814.204 1.29 0 .48-.068.912-.204 1.296a2.735 2.735 0 0 1-.576.984 2.572 2.572 0 0 1-.912.63 3.175 3.175 0 0 1-1.2.216c-.448 0-.852-.072-1.212-.216a2.572 2.572 0 0 1-.912-.63 2.805 2.805 0 0 1-.582-.984 3.972 3.972 0 0 1-.198-1.296c0-.476.066-.906.198-1.29.136-.388.33-.718.582-.99.252-.272.556-.482.912-.63.36-.148.764-.222 1.212-.222zm0 5.424c.6 0 1.048-.2 1.344-.6.296-.404.444-.966.444-1.686 0-.724-.148-1.288-.444-1.692-.296-.404-.744-.606-1.344-.606-.304 0-.57.052-.798.156a1.507 1.507 0 0 0-.564.45c-.148.196-.26.438-.336.726a3.941 3.941 0 0 0-.108.966c0 .72.148 1.282.444 1.686.3.4.754.6 1.362.6zM15.677 30.14c.192-.416.428-.74.708-.972.28-.236.622-.354 1.026-.354.128 0 .25.014.366.042.12.028.226.072.318.132l-.078.798c-.024.1-.084.15-.18.15-.056 0-.138-.012-.246-.036a1.694 1.694 0 0 0-.366-.036c-.192 0-.364.028-.516.084-.148.056-.282.14-.402.252a1.782 1.782 0 0 0-.318.408c-.092.16-.176.344-.252.552V35h-1.074v-6.078h.612c.116 0 .196.022.24.066.044.044.074.12.09.228l.072.924zM26.761 28.922 24.283 35h-.96l-2.478-6.078h.87a.33.33 0 0 1 .33.222l1.542 3.912c.048.148.09.292.126.432.036.14.07.28.102.42.032-.14.066-.28.102-.42.036-.14.08-.284.132-.432l1.56-3.912a.33.33 0 0 1 .12-.156.311.311 0 0 1 .198-.066h.834zM27.74 35v-6.078h.643c.152 0 .246.074.282.222l.078.624c.224-.276.476-.502.756-.678.28-.176.604-.264.972-.264.408 0 .738.114.99.342.256.228.44.536.552.924.088-.22.2-.41.336-.57a1.987 1.987 0 0 1 1.014-.624c.196-.048.394-.072.594-.072.32 0 .604.052.852.156.252.1.464.248.636.444.176.196.31.438.402.726.092.284.138.61.138.978V35H34.91v-3.87c0-.476-.104-.836-.312-1.08-.208-.248-.508-.372-.9-.372-.176 0-.344.032-.504.096-.156.06-.294.15-.414.27-.12.12-.216.272-.288.456-.068.18-.102.39-.102.63V35h-1.074v-3.87c0-.488-.098-.852-.294-1.092-.196-.24-.482-.36-.858-.36-.264 0-.508.072-.732.216a2.38 2.38 0 0 0-.618.576V35H27.74zM40.746 32.372c-.428.02-.788.058-1.08.114-.292.052-.526.12-.702.204a.923.923 0 0 0-.378.294.639.639 0 0 0-.114.366c0 .26.076.446.228.558.156.112.358.168.606.168.304 0 .566-.054.786-.162.224-.112.442-.28.654-.504v-1.038zm-3.396-2.67c.708-.648 1.56-.972 2.556-.972.36 0 .682.06.966.18.284.116.524.28.72.492.196.208.344.458.444.75.104.292.156.612.156.96V35h-.672a.708.708 0 0 1-.324-.06c-.076-.044-.136-.13-.18-.258l-.132-.444c-.156.14-.308.264-.456.372a2.804 2.804 0 0 1-.462.264c-.16.072-.332.126-.516.162-.18.04-.38.06-.6.06-.26 0-.5-.034-.72-.102a1.618 1.618 0 0 1-.57-.318 1.414 1.414 0 0 1-.372-.522 1.852 1.852 0 0 1-.132-.726 1.419 1.419 0 0 1 .33-.906c.12-.14.274-.272.462-.396s.418-.232.69-.324c.276-.092.596-.166.96-.222.364-.06.78-.096 1.248-.108v-.36c0-.412-.088-.716-.264-.912-.176-.2-.43-.3-.762-.3-.24 0-.44.028-.6.084-.156.056-.294.12-.414.192l-.33.186a.631.631 0 0 1-.324.084.439.439 0 0 1-.264-.078.716.716 0 0 1-.174-.192l-.264-.474zM44.974 29.6c.124-.124.254-.238.39-.342a2.395 2.395 0 0 1 .936-.444c.176-.044.368-.066.576-.066.336 0 .634.058.894.174.26.112.476.272.648.48.176.204.308.45.396.738.092.284.138.598.138.942V35H47.47v-3.918c0-.376-.086-.666-.258-.87-.172-.208-.434-.312-.786-.312-.256 0-.496.058-.72.174a2.58 2.58 0 0 0-.636.474V35h-1.482v-6.156h.906c.192 0 .318.09.378.27l.102.486zM53.085 28.748c.456 0 .87.074 1.242.222a2.692 2.692 0 0 1 1.578 1.626c.144.392.216.83.216 1.314 0 .488-.072.928-.216 1.32-.144.392-.35.726-.618 1.002a2.653 2.653 0 0 1-.96.636 3.333 3.333 0 0 1-1.242.222c-.46 0-.878-.074-1.254-.222a2.712 2.712 0 0 1-.966-.636 2.922 2.922 0 0 1-.618-1.002 3.807 3.807 0 0 1-.216-1.32c0-.484.072-.922.216-1.314.148-.392.354-.724.618-.996.268-.272.59-.482.966-.63a3.397 3.397 0 0 1 1.254-.222zm0 5.202c.512 0 .89-.172 1.134-.516.248-.344.372-.848.372-1.512s-.124-1.17-.372-1.518c-.244-.348-.622-.522-1.134-.522-.52 0-.906.176-1.158.528-.248.348-.372.852-.372 1.512s.124 1.164.372 1.512c.252.344.638.516 1.158.516zM57.252 35v-6.156h.906c.192 0 .318.09.378.27l.096.456c.108-.12.22-.23.336-.33a2.017 2.017 0 0 1 1.32-.492c.388 0 .706.106.954.318.252.208.44.486.564.834a1.93 1.93 0 0 1 .834-.882c.172-.092.354-.16.546-.204.196-.044.392-.066.588-.066.34 0 .642.052.906.156.264.104.486.256.666.456.18.2.316.444.408.732.096.288.144.618.144.99V35h-1.482v-3.918c0-.392-.086-.686-.258-.882-.172-.2-.424-.3-.756-.3-.152 0-.294.026-.426.078a1.026 1.026 0 0 0-.342.228 1.019 1.019 0 0 0-.228.366 1.435 1.435 0 0 0-.084.51V35h-1.488v-3.918c0-.412-.084-.712-.252-.9-.164-.188-.406-.282-.726-.282-.216 0-.418.054-.606.162a1.979 1.979 0 0 0-.516.432V35h-1.482zM70.558 32.372c-.428.02-.788.058-1.08.114-.292.052-.526.12-.702.204a.923.923 0 0 0-.378.294.639.639 0 0 0-.114.366c0 .26.076.446.228.558.156.112.358.168.606.168.304 0 .566-.054.786-.162.224-.112.442-.28.654-.504v-1.038zm-3.396-2.67c.708-.648 1.56-.972 2.556-.972.36 0 .682.06.966.18.284.116.524.28.72.492.196.208.344.458.444.75.104.292.156.612.156.96V35h-.672a.708.708 0 0 1-.324-.06c-.076-.044-.136-.13-.18-.258l-.132-.444c-.156.14-.308.264-.456.372a2.804 2.804 0 0 1-.462.264c-.16.072-.332.126-.516.162-.18.04-.38.06-.6.06-.26 0-.5-.034-.72-.102a1.618 1.618 0 0 1-.57-.318 1.414 1.414 0 0 1-.372-.522 1.852 1.852 0 0 1-.132-.726 1.419 1.419 0 0 1 .33-.906c.12-.14.274-.272.462-.396s.418-.232.69-.324c.276-.092.596-.166.96-.222.364-.06.78-.096 1.248-.108v-.36c0-.412-.088-.716-.264-.912-.176-.2-.43-.3-.762-.3-.24 0-.44.028-.6.084-.156.056-.294.12-.414.192l-.33.186a.631.631 0 0 1-.324.084.439.439 0 0 1-.264-.078.716.716 0 0 1-.174-.192l-.264-.474zM74.9 26.084V35h-1.482v-8.916H74.9zM81.969 28.844l-3.354 7.848a.538.538 0 0 1-.174.234c-.068.056-.174.084-.318.084h-1.104l1.152-2.472-2.49-5.694h1.302c.116 0 .206.028.27.084.068.056.118.12.15.192l1.308 3.192c.044.108.08.216.108.324.032.108.062.218.09.33a32.3 32.3 0 0 1 .108-.33c.036-.112.076-.222.12-.33l1.236-3.186a.437.437 0 0 1 .408-.276h1.188z"})}),Tn=()=>Nt("svg",{viewBox:"0 0 15 17",fill:"currentColor",children:Nt("path",{d:"M6.11767 7.47586C6.47736 7.75563 6.91931 7.90898 7.37503 7.91213H7.42681C7.90756 7.90474 8.38832 7.71987 8.67677 7.46846C10.1856 6.18921 14.5568 2.18138 14.5568 2.18138C15.7254 1.09438 12.4637 0.00739 7.42681 0H7.36764C2.3308 0.00739 -0.930935 1.09438 0.237669 2.18138C0.237669 2.18138 4.60884 6.18921 6.11767 7.47586ZM8.67677 9.64243C8.31803 9.92483 7.87599 10.0808 7.41941 10.0861H7.37503C6.91845 10.0808 6.47641 9.92483 6.11767 9.64243C5.0822 8.75513 1.38409 5.42018 0.000989555 4.14832V6.07829C0.000989555 6.29273 0.0823481 6.57372 0.222877 6.70682L0.293316 6.7712L0.293344 6.77122C1.33784 7.72579 4.83903 10.9255 6.11767 12.0161C6.47641 12.2985 6.91845 12.4545 7.37503 12.4597H7.41941C7.90756 12.4449 8.38092 12.2601 8.67677 12.0161C9.9859 10.9069 13.6249 7.57198 14.5642 6.70682C14.7121 6.57372 14.7861 6.29273 14.7861 6.07829V4.14832C12.7662 5.99804 10.7297 7.82949 8.67677 9.64243ZM7.41941 14.6263C7.87513 14.6232 8.31708 14.4698 8.67677 14.19C10.7298 12.3746 12.7663 10.5407 14.7861 8.68853V10.6259C14.7861 10.8329 14.7121 11.1139 14.5642 11.247C13.6249 12.1196 9.9859 15.4471 8.67677 16.5563C8.38092 16.8077 7.90756 16.9926 7.41941 17H7.37503C6.91931 16.9968 6.47736 16.8435 6.11767 16.5637C4.91427 15.5373 1.74219 12.6364 0.502294 11.5025C0.393358 11.4029 0.299337 11.3169 0.222877 11.247C0.0823481 11.1139 0.000989555 10.8329 0.000989555 10.6259V8.68853C1.38409 9.95303 5.0822 13.2953 6.11767 14.1827C6.47641 14.4651 6.91845 14.6211 7.37503 14.6263H7.41941Z"})}),Ln=()=>Nt("svg",{viewBox:"0 0 24 24",fill:"currentColor",children:Nt("path",{d:"M19.14 12.94c.04-.3.06-.61.06-.94 0-.32-.02-.64-.07-.94l2.03-1.58c.18-.14.23-.41.12-.61l-1.92-3.32c-.12-.22-.37-.29-.59-.22l-2.39.96c-.5-.38-1.03-.7-1.62-.94l-.36-2.54c-.04-.24-.24-.41-.48-.41h-3.84c-.24 0-.43.17-.47.41l-.36 2.54c-.59.24-1.13.57-1.62.94l-2.39-.96c-.22-.08-.47 0-.59.22L2.74 8.87c-.12.21-.08.47.12.61l2.03 1.58c-.05.3-.09.63-.09.94s.02.64.07.94l-2.03 1.58c-.18.14-.23.41-.12.61l1.92 3.32c.12.22.37.29.59.22l2.39-.96c.5.38 1.03.7 1.62.94l.36 2.54c.05.24.24.41.48.41h3.84c.24 0 .44-.17.47-.41l.36-2.54c.59-.24 1.13-.56 1.62-.94l2.39.96c.22.08.47 0 .59-.22l1.92-3.32c.12-.22.07-.47-.12-.61l-2.01-1.58zM12 15.6c-1.98 0-3.6-1.62-3.6-3.6s1.62-3.6 3.6-3.6 3.6 1.62 3.6 3.6-1.62 3.6-3.6 3.6z"})}),On=()=>Nt("svg",{viewBox:"0 0 24 24",fill:"currentColor",children:Nt("path",{d:"M19 6.41 17.59 5 12 10.59 6.41 5 5 6.41 10.59 12 5 17.59 6.41 19 12 13.41 17.59 19 19 17.59 13.41 12z"})}),Pn=()=>Nt("svg",{viewBox:"0 0 24 24",fill:"currentColor",children:Nt("path",{d:"M12 5V2L8 6l4 4V7c3.31 0 6 2.69 6 6 0 2.97-2.17 5.43-5 5.91v2.02c3.95-.49 7-3.85 7-7.93 0-4.42-3.58-8-8-8zm-6 8c0-1.65.67-3.15 1.76-4.24L6.34 7.34C4.9 8.79 4 10.79 4 13c0 4.08 3.05 7.44 7 7.93v-2.02c-2.83-.48-5-2.94-5-5.91z"})}),In=()=>Nt("svg",{viewBox:"0 0 24 24",fill:"currentColor",children:Nt("path",{d:"M12 2C6.48 2 2 6.48 2 12s4.48 10 10 10 10-4.48 10-10S17.52 2 12 2zm1 15h-2v-6h2v6zm0-8h-2V7h2v2z"})}),Rn=()=>Nt("svg",{viewBox:"0 0 24 24",fill:"currentColor",children:Nt("path",{d:"M1 21h22L12 2 1 21zm12-3h-2v-2h2v2zm0-4h-2v-4h2v4z"})}),Dn=()=>Nt("svg",{viewBox:"0 0 24 24",fill:"currentColor",children:Nt("path",{d:"M12 2C6.48 2 2 6.48 2 12s4.48 10 10 10 10-4.48 10-10S17.52 2 12 2zm1 15h-2v-2h2v2zm0-4h-2V7h2v6z"})}),zn=()=>Nt("svg",{viewBox:"0 0 24 24",fill:"currentColor",children:Nt("path",{d:"M12 2C6.48 2 2 6.48 2 12s4.48 10 10 10 10-4.48 10-10S17.52 2 12 2zm-2 15-5-5 1.41-1.41L10 14.17l7.59-7.59L19 8l-9 9z"})}),Fn=()=>Nt("svg",{viewBox:"0 0 24 24",fill:"currentColor",children:Nt("path",{d:"M12 6v3l4-4-4-4v3c-4.42 0-8 3.58-8 8 0 1.57.46 3.03 1.24 4.26L6.7 14.8c-.45-.83-.7-1.79-.7-2.8 0-3.31 2.69-6 6-6zm6.76 1.74L17.3 9.2c.44.84.7 1.79.7 2.8 0 3.31-2.69 6-6 6v-3l-4 4 4 4v-3c4.42 0 8-3.58 8-8 0-1.57-.46-3.03-1.24-4.26z"})}),jn=()=>Nt("svg",{viewBox:"0 0 24 24",fill:"currentColor",children:Nt("path",{d:"M7.41 8.59 12 13.17l4.59-4.58L18 10l-6 6-6-6 1.41-1.41z"})}),Hn=()=>Nt("svg",{viewBox:"0 0 24 24",fill:"currentColor",children:Nt("path",{d:"m7 10 5 5 5-5z"})}),$n=()=>Nt("svg",{viewBox:"0 0 24 24",fill:"currentColor",children:[Nt("path",{d:"M11.99 2C6.47 2 2 6.48 2 12s4.47 10 9.99 10C17.52 22 22 17.52 22 12S17.52 2 11.99 2zM12 20c-4.42 0-8-3.58-8-8s3.58-8 8-8 8 3.58 8 8-3.58 8-8 8z"}),Nt("path",{d:"M12.5 7H11v6l5.25 3.15.75-1.23-4.5-2.67z"})]}),Vn=()=>Nt("svg",{viewBox:"0 0 24 24",fill:"currentColor",children:Nt("path",{d:"M20 3h-1V1h-2v2H7V1H5v2H4c-1.1 0-2 .9-2 2v16c0 1.1.9 2 2 2h16c1.1 0 2-.9 2-2V5c0-1.1-.9-2-2-2zm0 18H4V8h16v13z"})}),Un=()=>Nt("svg",{viewBox:"0 0 24 24",fill:"currentColor",children:Nt("path",{d:"m22 5.72-4.6-3.86-1.29 1.53 4.6 3.86L22 5.72zM7.88 3.39 6.6 1.86 2 5.71l1.29 1.53 4.59-3.85zM12.5 8H11v6l4.75 2.85.75-1.23-4-2.37V8zM12 4c-4.97 0-9 4.03-9 9s4.02 9 9 9c4.97 0 9-4.03 9-9s-4.03-9-9-9zm0 16c-3.87 0-7-3.13-7-7s3.13-7 7-7 7 3.13 7 7-3.13 7-7 7z"})}),Bn=()=>Nt("svg",{viewBox:"0 0 24 24",fill:"currentColor",children:Nt("path",{d:"M20 5H4c-1.1 0-1.99.9-1.99 2L2 17c0 1.1.9 2 2 2h16c1.1 0 2-.9 2-2V7c0-1.1-.9-2-2-2zm-9 3h2v2h-2V8zm0 3h2v2h-2v-2zM8 8h2v2H8V8zm0 3h2v2H8v-2zm-1 2H5v-2h2v2zm0-3H5V8h2v2zm9 7H8v-2h8v2zm0-4h-2v-2h2v2zm0-3h-2V8h2v2zm3 3h-2v-2h2v2zm0-3h-2V8h2v2z"})}),qn=()=>Nt("svg",{viewBox:"0 0 24 24",fill:"currentColor",children:Nt("path",{d:"M8 5v14l11-7z"})}),Yn=()=>Nt("svg",{viewBox:"0 0 24 24",fill:"currentColor",children:Nt("path",{d:"m10 16.5 6-4.5-6-4.5v9zM12 2C6.48 2 2 6.48 2 12s4.48 10 10 10 10-4.48 10-10S17.52 2 12 2zm0 18c-4.41 0-8-3.59-8-8s3.59-8 8-8 8 3.59 8 8-3.59 8-8 8z"})}),Wn=()=>Nt("svg",{viewBox:"0 0 24 24",fill:"currentColor",children:Nt("path",{d:"m3.5 18.49 6-6.01 4 4L22 6.92l-1.41-1.41-7.09 7.97-4-4L2 16.99z"})}),Kn=()=>Nt("svg",{viewBox:"0 0 24 24",fill:"currentColor",children:Nt("path",{d:"M10 10.02h5V21h-5zM17 21h3c1.1 0 2-.9 2-2v-9h-5v11zm3-18H5c-1.1 0-2 .9-2 2v3h19V5c0-1.1-.9-2-2-2zM3 19c0 1.1.9 2 2 2h3V10H3v9z"})}),Qn=()=>Nt("svg",{viewBox:"0 0 24 24",fill:"currentColor",children:Nt("path",{d:"M9.4 16.6 4.8 12l4.6-4.6L8 6l-6 6 6 6 1.4-1.4zm5.2 0 4.6-4.6-4.6-4.6L16 6l6 6-6 6-1.4-1.4z"})}),Zn=()=>Nt("svg",{viewBox:"0 0 24 24",fill:"currentColor",children:Nt("path",{d:"M6 19c0 1.1.9 2 2 2h8c1.1 0 2-.9 2-2V7H6v12zM19 4h-3.5l-1-1h-5l-1 1H5v2h14V4z"})}),Gn=()=>Nt("svg",{viewBox:"0 0 24 24",fill:"currentColor",children:Nt("path",{d:"M19 13h-6v6h-2v-6H5v-2h6V5h2v6h6v2z"})}),Jn=()=>Nt("svg",{viewBox:"0 0 24 24",fill:"currentColor",children:Nt("path",{d:"M19 13H5v-2h14v2z"})}),Xn=()=>Nt("svg",{viewBox:"0 0 24 24",fill:"currentColor",children:Nt("path",{d:"M8.9999 14.7854L18.8928 4.8925C19.0803 4.70497 19.3347 4.59961 19.5999 4.59961C19.8651 4.59961 20.1195 4.70497 20.307 4.8925L21.707 6.2925C22.0975 6.68303 22.0975 7.31619 21.707 7.70672L9.70701 19.7067C9.31648 20.0972 8.68332 20.0972 8.2928 19.7067L2.6928 14.1067C2.50526 13.9192 2.3999 13.6648 2.3999 13.3996C2.3999 13.1344 2.50526 12.88 2.6928 12.6925L4.0928 11.2925C4.48332 10.902 5.11648 10.902 5.50701 11.2925L8.9999 14.7854Z"})}),er=()=>Nt("svg",{viewBox:"0 0 24 24",fill:"currentColor",children:Nt("path",{d:"M12 4.5C7 4.5 2.73 7.61 1 12c1.73 4.39 6 7.5 11 7.5s9.27-3.11 11-7.5c-1.73-4.39-6-7.5-11-7.5zM12 17c-2.76 0-5-2.24-5-5s2.24-5 5-5 5 2.24 5 5-2.24 5-5 5zm0-8c-1.66 0-3 1.34-3 3s1.34 3 3 3 3-1.34 3-3-1.34-3-3-3z"})}),tr=()=>Nt("svg",{viewBox:"0 0 24 24",fill:"currentColor",children:Nt("path",{d:"M12 7c2.76 0 5 2.24 5 5 0 .65-.13 1.26-.36 1.83l2.92 2.92c1.51-1.26 2.7-2.89 3.43-4.75-1.73-4.39-6-7.5-11-7.5-1.4 0-2.74.25-3.98.7l2.16 2.16C10.74 7.13 11.35 7 12 7zM2 4.27l2.28 2.28.46.46C3.08 8.3 1.78 10.02 1 12c1.73 4.39 6 7.5 11 7.5 1.55 0 3.03-.3 4.38-.84l.42.42L19.73 22 21 20.73 3.27 3 2 4.27zM7.53 9.8l1.55 1.55c-.05.21-.08.43-.08.65 0 1.66 1.34 3 3 3 .22 0 .44-.03.65-.08l1.55 1.55c-.67.33-1.41.53-2.2.53-2.76 0-5-2.24-5-5 0-.79.2-1.53.53-2.2zm4.31-.78 3.15 3.15.02-.16c0-1.66-1.34-3-3-3l-.17.01z"})}),nr=()=>Nt("svg",{viewBox:"0 0 24 24",fill:"currentColor",children:Nt("path",{d:"M19 9l1.25-2.75L23 5l-2.75-1.25L19 1l-1.25 2.75L15 5l2.75 1.25L19 9zm-7.5.5L9 4 6.5 9.5 1 12l5.5 2.5L9 20l2.5-5.5L17 12l-5.5-2.5zM19 15l-1.25 2.75L15 19l2.75 1.25L19 23l1.25-2.75L23 19l-2.75-1.25L19 15z"})}),rr=()=>Nt("svg",{viewBox:"0 0 24 24",fill:"currentColor",children:Nt("path",{d:"M16 1H4c-1.1 0-2 .9-2 2v14h2V3h12V1zm3 4H8c-1.1 0-2 .9-2 2v14c0 1.1.9 2 2 2h11c1.1 0 2-.9 2-2V7c0-1.1-.9-2-2-2zm0 16H8V7h11v14z"})}),ar=()=>Nt("svg",{viewBox:"0 0 24 24",fill:"currentColor",children:Nt("path",{d:"M20 9H4v2h16V9zM4 15h16v-2H4v2z"})}),or=()=>Nt("svg",{viewBox:"0 0 24 24",fill:"currentColor",children:Nt("path",{d:"M23 8c0 1.1-.9 2-2 2-.18 0-.35-.02-.51-.07l-3.56 3.55c.05.16.07.34.07.52 0 1.1-.9 2-2 2s-2-.9-2-2c0-.18.02-.36.07-.52l-2.55-2.55c-.16.05-.34.07-.52.07s-.36-.02-.52-.07l-4.55 4.56c.05.16.07.33.07.51 0 1.1-.9 2-2 2s-2-.9-2-2 .9-2 2-2c.18 0 .35.02.51.07l4.56-4.55C8.02 9.36 8 9.18 8 9c0-1.1.9-2 2-2s2 .9 2 2c0 .18-.02.36-.07.52l2.55 2.55c.16-.05.34-.07.52-.07s.36.02.52.07l3.55-3.56C19.02 8.35 19 8.18 19 8c0-1.1.9-2 2-2s2 .9 2 2z"})}),ir=()=>Nt("svg",{viewBox:"0 0 24 24",fill:"currentColor",children:[Nt("path",{fillRule:"evenodd",clipRule:"evenodd",d:"M21 5C19.89 4.65 18.67 4.5 17.5 4.5C15.55 4.5 13.45 4.9 12 6C10.55 4.9 8.45 4.5 6.5 4.5C5.33 4.5 4.11 4.65 3 5C2.25 5.25 1.6 5.55 1 6V20.6C1 20.85 1.25 21.1 1.5 21.1C1.6 21.1 1.65 21.1 1.75 21.05C3.15 20.3 4.85 20 6.5 20C8.2 20 10.65 20.65 12 21.5C13.35 20.65 15.8 20 17.5 20C19.15 20 20.85 20.3 22.25 21.05C22.35 21.1 22.4 21.1 22.5 21.1C22.75 21.1 23 20.85 23 20.6V6C22.4 5.55 21.75 5.25 21 5ZM21 18.5C19.9 18.15 18.7 18 17.5 18C15.8 18 13.35 18.65 12 19.5C10.65 18.65 8.2 18 6.5 18C5.3 18 4.1 18.15 3 18.5V7C4.1 6.65 5.3 6.5 6.5 6.5C8.2 6.5 10.65 7.15 12 8C13.35 7.15 15.8 6.5 17.5 6.5C18.7 6.5 19.9 6.65 21 7V18.5Z"}),Nt("path",{d:"M17.5 10.5C18.38 10.5 19.23 10.59 20 10.76V9.24C19.21 9.09 18.36 9 17.5 9C15.8 9 14.26 9.29 13 9.83V11.49C14.13 10.85 15.7 10.5 17.5 10.5ZM13 12.49V14.15C14.13 13.51 15.7 13.16 17.5 13.16C18.38 13.16 19.23 13.25 20 13.42V11.9C19.21 11.75 18.36 11.66 17.5 11.66C15.8 11.66 14.26 11.96 13 12.49ZM17.5 14.33C15.8 14.33 14.26 14.62 13 15.16V16.82C14.13 16.18 15.7 15.83 17.5 15.83C18.38 15.83 19.23 15.92 20 16.09V14.57C19.21 14.41 18.36 14.33 17.5 14.33Z"}),Nt("path",{d:"M6.5 10.5C5.62 10.5 4.77 10.59 4 10.76V9.24C4.79 9.09 5.64 9 6.5 9C8.2 9 9.74 9.29 11 9.83V11.49C9.87 10.85 8.3 10.5 6.5 10.5ZM11 12.49V14.15C9.87 13.51 8.3 13.16 6.5 13.16C5.62 13.16 4.77 13.25 4 13.42V11.9C4.79 11.75 5.64 11.66 6.5 11.66C8.2 11.66 9.74 11.96 11 12.49ZM6.5 14.33C8.2 14.33 9.74 14.62 11 15.16V16.82C9.87 16.18 8.3 15.83 6.5 15.83C5.62 15.83 4.77 15.92 4 16.09V14.57C4.79 14.41 5.64 14.33 6.5 14.33Z"})]}),lr=()=>Nt("svg",{viewBox:"0 0 24 24",fill:"currentColor",children:Nt("path",{d:"M12 2C6.49 2 2 6.49 2 12s4.49 10 10 10 10-4.49 10-10S17.51 2 12 2zm0 18c-4.41 0-8-3.59-8-8s3.59-8 8-8 8 3.59 8 8-3.59 8-8 8zm3-8c0 1.66-1.34 3-3 3s-3-1.34-3-3 1.34-3 3-3 3 1.34 3 3z"})}),sr=()=>Nt("svg",{viewBox:"0 0 24 24",fill:"currentColor",children:Nt("path",{fillRule:"evenodd",clipRule:"evenodd",d:"M12 2C6.48 2 2 6.48 2 12C2 17.52 6.48 22 12 22C17.52 22 22 17.52 22 12C22 6.48 17.52 2 12 2ZM12 6C9.79 6 8 7.79 8 10H10C10 8.9 10.9 8 12 8C13.1 8 14 8.9 14 10C14 10.8792 13.4202 11.3236 12.7704 11.8217C11.9421 12.4566 11 13.1787 11 15H13C13 13.9046 13.711 13.2833 14.4408 12.6455C15.21 11.9733 16 11.2829 16 10C16 7.79 14.21 6 12 6ZM13 16V18H11V16H13Z"})}),cr=()=>Nt("svg",{viewBox:"0 0 24 24",fill:"currentColor",children:Nt("path",{d:"M4 20h16c1.1 0 2-.9 2-2s-.9-2-2-2H4c-1.1 0-2 .9-2 2s.9 2 2 2zm0-3h2v2H4v-2zM2 6c0 1.1.9 2 2 2h16c1.1 0 2-.9 2-2s-.9-2-2-2H4c-1.1 0-2 .9-2 2zm4 1H4V5h2v2zm-2 7h16c1.1 0 2-.9 2-2s-.9-2-2-2H4c-1.1 0-2 .9-2 2s.9 2 2 2zm0-3h2v2H4v-2z"})}),ur=()=>Nt("svg",{viewBox:"0 0 24 24",fill:"currentColor",children:Nt("path",{d:"M12 8c1.1 0 2-.9 2-2s-.9-2-2-2-2 .9-2 2 .9 2 2 2zm0 2c-1.1 0-2 .9-2 2s.9 2 2 2 2-.9 2-2-.9-2-2-2zm0 6c-1.1 0-2 .9-2 2s.9 2 2 2 2-.9 2-2-.9-2-2-2z"})}),dr=()=>Nt("svg",{viewBox:"0 0 24 24",fill:"currentColor",children:Nt("path",{d:"M3 17v2h6v-2H3zM3 5v2h10V5H3zm10 16v-2h8v-2h-8v-2h-2v6h2zM7 9v2H3v2h4v2h2V9H7zm14 4v-2H11v2h10zm-6-4h2V7h4V5h-4V3h-2v6z"})}),hr=()=>Nt("svg",{viewBox:"0 0 24 24",fill:"currentColor",children:Nt("path",{d:"M7 20h4c0 1.1-.9 2-2 2s-2-.9-2-2zm-2-1h8v-2H5v2zm11.5-9.5c0 3.82-2.66 5.86-3.77 6.5H5.27c-1.11-.64-3.77-2.68-3.77-6.5C1.5 5.36 4.86 2 9 2s7.5 3.36 7.5 7.5zm4.87-2.13L20 8l1.37.63L22 10l.63-1.37L24 8l-1.37-.63L22 6l-.63 1.37zM19 6l.94-2.06L22 3l-2.06-.94L19 0l-.94 2.06L16 3l2.06.94L19 6z"})}),mr=()=>Nt("svg",{viewBox:"0 0 24 24",fill:"currentColor",children:Nt("path",{d:"M3 14h4v-4H3v4zm0 5h4v-4H3v4zM3 9h4V5H3v4zm5 5h13v-4H8v4zm0 5h13v-4H8v4zM8 5v4h13V5H8z"})}),pr=()=>Nt("svg",{viewBox:"0 0 24 24",fill:"currentColor",children:Nt("path",{d:"m22 9.24-7.19-.62L12 2 9.19 8.63 2 9.24l5.46 4.73L5.82 21 12 17.27 18.18 21l-1.63-7.03L22 9.24zM12 15.4l-3.76 2.27 1-4.28-3.32-2.88 4.38-.38L12 6.1l1.71 4.04 4.38.38-3.32 2.88 1 4.28L12 15.4z"})}),fr=()=>Nt("svg",{viewBox:"0 0 24 24",fill:"currentColor",children:Nt("path",{d:"M12 17.27 18.18 21l-1.64-7.03L22 9.24l-7.19-.61L12 2 9.19 8.63 2 9.24l5.46 4.73L5.82 21z"})}),vr=()=>Nt("svg",{viewBox:"0 0 16 16",fill:gt("color-error"),children:Nt("path",{d:"M13.5095 4L8.50952 1H7.50952L2.50952 4L2.01953 4.85999V10.86L2.50952 11.71L7.50952 14.71H8.50952L13.5095 11.71L13.9995 10.86V4.85999L13.5095 4ZM7.50952 13.5601L3.00952 10.86V5.69995L7.50952 8.15002V13.5601ZM3.26953 4.69995L8.00952 1.85999L12.7495 4.69995L8.00952 7.29004L3.26953 4.69995ZM13.0095 10.86L8.50952 13.5601V8.15002L13.0095 5.69995V10.86Z"})}),gr=()=>Nt("svg",{viewBox:"0 0 16 16",fill:gt("color-primary"),children:Nt("path",{fillRule:"evenodd",clipRule:"evenodd",d:"M2 5H4V4H1.5L1 4.5V12.5L1.5 13H4V12H2V5ZM14.5 4H12V5H14V12H12V13H14.5L15 12.5V4.5L14.5 4ZM11.76 6.56995L12 7V9.51001L11.7 9.95996L7.19995 11.96H6.73999L4.23999 10.46L4 10.03V7.53003L4.30005 7.06995L8.80005 5.06995H9.26001L11.76 6.56995ZM5 9.70996L6.5 10.61V9.28003L5 8.38V9.70996ZM5.57996 7.56006L7.03003 8.43005L10.42 6.93005L8.96997 6.06006L5.57996 7.56006ZM7.53003 10.73L11.03 9.17004V7.77002L7.53003 9.31995V10.73Z"})}),yr=()=>Nt("svg",{viewBox:"0 0 16 16",fill:gt("color-warning"),children:Nt("path",{fillRule:"evenodd",clipRule:"evenodd",d:"M14 2H8L7 3V6H8V3H14V8H10V9H14L15 8V3L14 2ZM9 6H13V7H9.41L9 6.59V6ZM7 7H2L1 8V13L2 14H8L9 13V8L8 7H7ZM8 13H2V8H8V9V13ZM3 9H7V10H3V9ZM3 11H7V12H3V11ZM9 4H13V5H9V4Z"})}),_r=()=>Nt("svg",{viewBox:"0 0 16 16",fill:gt("color-primary"),children:Nt("path",{fillRule:"evenodd",clipRule:"evenodd",d:"M7 3L8 2H14L15 3V8L14 9H10V8H14V3H8V6H7V3ZM9 9V8L8 7H7H2L1 8V13L2 14H8L9 13V9ZM8 8V9V13H2V8H7H8ZM9.41421 7L9 6.58579V6H13V7H9.41421ZM9 4H13V5H9V4ZM7 10H3V11H7V10Z"})}),br=()=>Nt("svg",{viewBox:"0 0 24 24",fill:"currentColor",children:Nt("path",{d:"M19 9h-4V3H9v6H5l7 7 7-7zM5 18v2h14v-2H5z"})}),wr=()=>Nt("svg",{viewBox:"0 0 24 24",fill:"currentColor",children:Nt("path",{d:"M12 5.83 15.17 9l1.41-1.41L12 3 7.41 7.59 8.83 9zm0 12.34L8.83 15l-1.41 1.41L12 21l4.59-4.59L15.17 15z"})}),kr=()=>Nt("svg",{viewBox:"0 0 24 24",fill:"currentColor",children:Nt("path",{d:"M7.41 18.59 8.83 20 12 16.83 15.17 20l1.41-1.41L12 14zm9.18-13.18L15.17 4 12 7.17 8.83 4 7.41 5.41 12 10z"})}),xr=()=>Nt("svg",{viewBox:"0 0 24 24",fill:"currentColor",children:Nt("path",{d:"M15.5 14h-.79l-.28-.27C15.41 12.59 16 11.11 16 9.5 16 5.91 13.09 3 9.5 3S3 5.91 3 9.5 5.91 16 9.5 16c1.61 0 3.09-.59 4.23-1.57l.27.28v.79l5 4.99L20.49 19zm-6 0C7.01 14 5 11.99 5 9.5S7.01 5 9.5 5 14 7.01 14 9.5 11.99 14 9.5 14"})});var Sr=n(738),Cr=n.n(Sr);const Er=e=>{let{to:t,isNavLink:n,children:r,...a}=e;return n?Nt(De,{to:t,...a,children:r}):Nt("div",{...a,children:r})},Nr=e=>{let{activeItem:t,item:n,color:r=gt("color-primary"),activeNavRef:a,onChange:o,isNavLink:i}=e;return Nt(Er,{className:Cr()({"vm-tabs-item":!0,"vm-tabs-item_active":t===n.value,[n.className||""]:n.className}),isNavLink:i,to:n.value,style:{color:r},onClick:(l=n.value,()=>{o&&o(l)}),ref:t===n.value?a:void 0,children:[n.icon&&Nt("div",{className:Cr()({"vm-tabs-item__icon":!0,"vm-tabs-item__icon_single":!n.label}),children:n.icon}),n.label]});var l};const Ar=function(e,t,n,a){const o=(0,r.useRef)(t);(0,r.useEffect)((()=>{o.current=t}),[t]),(0,r.useEffect)((()=>{var t;const r=null!==(t=null===n||void 0===n?void 0:n.current)&&void 0!==t?t:window;if(!r||!r.addEventListener)return;const i=e=>o.current(e);return r.addEventListener(e,i,a),()=>{r.removeEventListener(e,i,a)}}),[e,n,a])},Mr=()=>{const[e,t]=(0,r.useState)({width:0,height:0}),n=()=>{t({width:window.innerWidth,height:window.innerHeight})};return Ar("resize",n),(0,r.useEffect)(n,[]),e},Tr=e=>{let{activeItem:t,items:n,color:a=gt("color-primary"),onChange:o,indicatorPlacement:i="bottom",isNavLink:l}=e;const s=Mr(),c=(0,r.useRef)(null),[u,d]=(0,r.useState)({left:0,width:0,bottom:0});return(0,r.useEffect)((()=>{var e;if((null===(e=c.current)||void 0===e?void 0:e.base)instanceof HTMLElement){const{offsetLeft:e,offsetWidth:t,offsetHeight:n}=c.current.base;d({left:e,width:t,bottom:"top"===i?n-2:0})}}),[s,t,c,n]),Nt("div",{className:"vm-tabs",children:[n.map((e=>Nt(Nr,{activeItem:t,item:e,onChange:o,color:a,activeNavRef:c,isNavLink:l},e.value))),Nt("div",{className:"vm-tabs__indicator",style:{...u,borderColor:a}})]})},Lr=[{value:mt.chart,icon:Nt(Wn,{}),label:"Graph",prometheusCode:0},{value:mt.code,icon:Nt(Qn,{}),label:"JSON",prometheusCode:3},{value:mt.table,icon:Nt(Kn,{}),label:"Table",prometheusCode:1}],Or=()=>{const{displayType:e}=Fr(),t=jr();return Nt(Tr,{activeItem:e,items:Lr,onChange:n=>{var r;t({type:"SET_DISPLAY_TYPE",payload:null!==(r=n)&&void 0!==r?r:e})}})},Pr=()=>{const e=ut("g0.tab",0),t=Lr.find((t=>t.prometheusCode===+e||t.value===e));return(null===t||void 0===t?void 0:t.value)||mt.chart},Ir=et("SERIES_LIMITS"),Rr={displayType:Pr(),nocache:!1,isTracingEnabled:!1,seriesLimits:Ir?JSON.parse(Ir):lt,tableCompact:et("TABLE_COMPACT")||!1};function Dr(e,t){switch(t.type){case"SET_DISPLAY_TYPE":return{...e,displayType:t.payload};case"SET_SERIES_LIMITS":return Xe("SERIES_LIMITS",JSON.stringify(t.payload)),{...e,seriesLimits:t.payload};case"TOGGLE_QUERY_TRACING":return{...e,isTracingEnabled:!e.isTracingEnabled};case"TOGGLE_NO_CACHE":return{...e,nocache:!e.nocache};case"TOGGLE_TABLE_COMPACT":return Xe("TABLE_COMPACT",!e.tableCompact),{...e,tableCompact:!e.tableCompact};default:throw new Error}}const zr=(0,r.createContext)({}),Fr=()=>(0,r.useContext)(zr).state,jr=()=>(0,r.useContext)(zr).dispatch,Hr={customStep:ut("g0.step_input",""),yaxis:{limits:{enable:!1,range:{1:[0,0]}}},isHistogram:!1,spanGaps:!1};function $r(e,t){switch(t.type){case"TOGGLE_ENABLE_YAXIS_LIMITS":return{...e,yaxis:{...e.yaxis,limits:{...e.yaxis.limits,enable:!e.yaxis.limits.enable}}};case"SET_CUSTOM_STEP":return{...e,customStep:t.payload};case"SET_YAXIS_LIMITS":return{...e,yaxis:{...e.yaxis,limits:{...e.yaxis.limits,range:t.payload}}};case"SET_IS_HISTOGRAM":return{...e,isHistogram:t.payload};case"SET_SPAN_GAPS":return{...e,spanGaps:t.payload};default:throw new Error}}const Vr=(0,r.createContext)({}),Ur=()=>(0,r.useContext)(Vr).state,Br=()=>(0,r.useContext)(Vr).dispatch,qr={dashboardsSettings:[],dashboardsLoading:!1,dashboardsError:""};function Yr(e,t){switch(t.type){case"SET_DASHBOARDS_SETTINGS":return{...e,dashboardsSettings:t.payload};case"SET_DASHBOARDS_LOADING":return{...e,dashboardsLoading:t.payload};case"SET_DASHBOARDS_ERROR":return{...e,dashboardsError:t.payload};default:throw new Error}}const Wr=(0,r.createContext)({}),Kr=()=>(0,r.useContext)(Wr).state,Qr={markdownParsing:"true"===et("LOGS_MARKDOWN")};function Zr(e,t){if("SET_MARKDOWN_PARSING"===t.type)return Xe("LOGS_MARKDOWN","".concat(t.payload)),{...e,markdownParsing:t.payload};throw new Error}const Gr=(0,r.createContext)({}),Jr={windows:"Windows",mac:"Mac OS",linux:"Linux"},Xr=()=>(Object.values(Jr).find((e=>navigator.userAgent.indexOf(e)>=0))||"unknown")===Jr.mac;function ea(){const e=Mr(),t=()=>{const e=["Android","webOS","iPhone","iPad","iPod","BlackBerry","Windows Phone"].map((e=>navigator.userAgent.match(new RegExp(e,"i")))).some((e=>e)),t=window.innerWidth<500;return e||t},[n,a]=(0,r.useState)(t());return(0,r.useEffect)((()=>{a(t())}),[e]),{isMobile:n}}const ta={success:Nt(zn,{}),error:Nt(Dn,{}),warning:Nt(Rn,{}),info:Nt(In,{})},na=e=>{let{variant:t,children:n}=e;const{isDarkTheme:r}=Mt(),{isMobile:a}=ea();return Nt("div",{className:Cr()({"vm-alert":!0,["vm-alert_".concat(t)]:t,"vm-alert_dark":r,"vm-alert_mobile":a}),children:[Nt("div",{className:"vm-alert__icon",children:ta[t||"info"]}),Nt("div",{className:"vm-alert__content",children:n})]})},ra=(0,r.createContext)({showInfoMessage:()=>{}}),aa=function(){for(var e=arguments.length,t=new Array(e),n=0;nn=>{let{children:r}=n;return Nt(e,{children:Nt(t,{children:r})})}),(e=>{let{children:t}=e;return Nt(Ct.FK,{children:t})}))}(...[e=>{let{children:t}=e;const[n,a]=(0,r.useReducer)(St,Lt),o=(0,r.useMemo)((()=>({state:n,dispatch:a})),[n,a]);return Nt(At.Provider,{value:o,children:t})},e=>{let{children:t}=e;const[n,a]=(0,r.useReducer)(mn,hn),o=(0,r.useMemo)((()=>({state:n,dispatch:a})),[n,a]);return Nt(pn.Provider,{value:o,children:t})},e=>{let{children:t}=e;const[n,a]=(0,r.useReducer)(xn,kn),o=(0,r.useMemo)((()=>({state:n,dispatch:a})),[n,a]);return Nt(Sn.Provider,{value:o,children:t})},e=>{let{children:t}=e;const[n,a]=(0,r.useReducer)(Dr,Rr),o=(0,r.useMemo)((()=>({state:n,dispatch:a})),[n,a]);return Nt(zr.Provider,{value:o,children:t})},e=>{let{children:t}=e;const[n,a]=(0,r.useReducer)($r,Hr),o=(0,r.useMemo)((()=>({state:n,dispatch:a})),[n,a]);return Nt(Vr.Provider,{value:o,children:t})},e=>{let{children:t}=e;const{isMobile:n}=ea(),[a,o]=(0,r.useState)({}),[i,l]=(0,r.useState)(!1),[s,c]=(0,r.useState)(void 0);(0,r.useEffect)((()=>{if(!s)return;o({message:s.text,variant:s.type,key:Date.now()}),l(!0);const e=setTimeout(u,4e3);return()=>clearTimeout(e)}),[s]);const u=()=>{c(void 0),l(!1)};return Nt(ra.Provider,{value:{showInfoMessage:c},children:[i&&Nt("div",{className:Cr()({"vm-snackbar":!0,"vm-snackbar_mobile":n}),children:Nt(na,{variant:a.variant,children:Nt("div",{className:"vm-snackbar-content",children:[Nt("span",{children:a.message}),Nt("div",{className:"vm-snackbar-content__close",onClick:u,children:Nt(On,{})})]})})}),t]})},e=>{let{children:t}=e;const[n,a]=(0,r.useReducer)(Yr,qr),o=(0,r.useMemo)((()=>({state:n,dispatch:a})),[n,a]);return Nt(Wr.Provider,{value:o,children:t})},e=>{let{children:t}=e;const[n,a]=(0,r.useReducer)(Zr,Qr),o=(0,r.useMemo)((()=>({state:n,dispatch:a})),[n,a]);return Nt(Gr.Provider,{value:o,children:t})}]);let oa=function(e){return e[e.internalLink=0]="internalLink",e[e.externalLink=1]="externalLink",e}({});const ia={label:"Explore",submenu:[{label:Ye[We.metrics].title,value:We.metrics},{label:Ye[We.cardinality].title,value:We.cardinality},{label:Ye[We.topQueries].title,value:We.topQueries},{label:Ye[We.activeQueries].title,value:We.activeQueries}]},la={label:"Tools",submenu:[{label:Ye[We.trace].title,value:We.trace},{label:Ye[We.queryAnalyzer].title,value:We.queryAnalyzer},{label:Ye[We.withTemplate].title,value:We.withTemplate},{label:Ye[We.relabel].title,value:We.relabel}]},sa=[{label:Ye[We.logs].title,value:We.home}],ca=[{label:Ye[We.anomaly].title,value:We.home}],ua=[{label:Ye[We.home].title,value:We.home},ia,la],da=e=>{let{activeMenu:t,label:n,value:r,type:a,color:o}=e;return a===oa.externalLink?Nt("a",{className:Cr()({"vm-header-nav-item":!0,"vm-header-nav-item_active":t===r}),style:{color:o},href:r,target:"_blank",rel:"noreferrer",children:n}):Nt(De,{className:Cr()({"vm-header-nav-item":!0,"vm-header-nav-item_active":t===r}),style:{color:o},to:r,children:n})},ha=(e,t,n)=>{const a=(0,r.useCallback)((r=>{const a=null===e||void 0===e?void 0:e.current,o=r.target,i=(null===n||void 0===n?void 0:n.current)&&n.current.contains(o);!a||a.contains((null===r||void 0===r?void 0:r.target)||null)||i||t(r)}),[e,t]);Ar("mousedown",a),Ar("touchstart",a)},ma=e=>{let{variant:t="contained",color:n="primary",size:r="medium",ariaLabel:a,children:o,endIcon:i,startIcon:l,fullWidth:s=!1,className:c,disabled:u,onClick:d,onMouseDown:h}=e;return Nt("button",{className:Cr()({"vm-button":!0,["vm-button_".concat(t,"_").concat(n)]:!0,["vm-button_".concat(r)]:r,"vm-button_icon":(l||i)&&!o,"vm-button_full-width":s,"vm-button_with-icon":l||i,"vm-button_disabled":u,[c||""]:c}),disabled:u,"aria-label":a,onClick:d,onMouseDown:h,children:Nt(Ct.FK,{children:[l&&Nt("span",{className:"vm-button__start-icon",children:l}),o&&Nt("span",{children:o}),i&&Nt("span",{className:"vm-button__end-icon",children:i})]})})},pa=e=>{let{children:t,buttonRef:n,placement:a="bottom-left",open:o=!1,onClose:i,offset:l={top:6,left:0},clickOutside:s=!0,fullWidth:c,title:u,disabledFullScreen:d,variant:h}=e;const{isMobile:m}=ea(),p=oe(),f=re(),[v,g]=(0,r.useState)({width:0,height:0}),[y,_]=(0,r.useState)(!1),b=(0,r.useRef)(null);(0,r.useEffect)((()=>(_(o),!o&&i&&i(),o&&m&&!d&&(document.body.style.overflow="hidden"),()=>{document.body.style.overflow="auto"})),[o]),(0,r.useEffect)((()=>{var e,t;g({width:(null===b||void 0===b||null===(e=b.current)||void 0===e?void 0:e.clientWidth)||0,height:(null===b||void 0===b||null===(t=b.current)||void 0===t?void 0:t.clientHeight)||0}),_(!1)}),[b]);const w=(0,r.useMemo)((()=>{const e=n.current;if(!e||!y)return{};const t=e.getBoundingClientRect(),r={top:0,left:0,width:"auto"},o="bottom-right"===a||"top-right"===a,i=null===a||void 0===a?void 0:a.includes("top"),s=(null===l||void 0===l?void 0:l.top)||0,u=(null===l||void 0===l?void 0:l.left)||0;r.left=r.left=t.left+u,r.top=t.height+t.top+s,o&&(r.left=t.right-v.width),i&&(r.top=t.top-v.height-s);const{innerWidth:d,innerHeight:h}=window,m=r.top+v.height+20>h,p=r.top-20<0,f=r.left+v.width+20>d,g=r.left-20<0;return m&&(r.top=t.top-v.height-s),p&&(r.top=t.height+t.top+s),f&&(r.left=t.right-v.width-u),g&&(r.left=t.left+u),c&&(r.width="".concat(t.width,"px")),r.top<0&&(r.top=20),r.left<0&&(r.left=20),r}),[n,a,y,t,c]),k=()=>{_(!1),i()};(0,r.useEffect)((()=>{if(!b.current||!y||m&&!d)return;const{right:e,width:t}=b.current.getBoundingClientRect();if(e>window.innerWidth){const e=window.innerWidth-20-t;b.current.style.left=e{y&&m&&!d&&(p(f,{replace:!0}),i())}),[y,m,d,f,i]);return Ar("scroll",k),Ar("popstate",x),ha(b,(()=>{s&&k()}),n),Nt(Ct.FK,{children:(y||!v.width)&&r.default.createPortal(Nt("div",{className:Cr()({"vm-popper":!0,["vm-popper_".concat(h)]:h,"vm-popper_mobile":m&&!d,"vm-popper_open":(m||Object.keys(w).length)&&y}),ref:b,style:m&&!d?{}:w,children:[(u||m&&!d)&&Nt("div",{className:"vm-popper-header",children:[Nt("p",{className:"vm-popper-header__title",children:u}),Nt(ma,{variant:"text",color:"dark"===h?"white":"primary",size:"small",onClick:e=>{e.stopPropagation(),i()},ariaLabel:"close",children:Nt(On,{})})]}),t]}),document.body)})},fa=e=>{const[t,n]=(0,r.useState)(!!e),a=(0,r.useCallback)((()=>n(!0)),[]),o=(0,r.useCallback)((()=>n(!1)),[]),i=(0,r.useCallback)((()=>n((e=>!e))),[]);return{value:t,setValue:n,setTrue:a,setFalse:o,toggle:i}},va=e=>{let{activeMenu:t,label:n,color:a,background:o,submenu:i,direction:l}=e;const{pathname:s}=re(),[c,u]=(0,r.useState)(null),d=(0,r.useRef)(null),{value:h,setFalse:m,setTrue:p}=fa(!1),f=()=>{c&&clearTimeout(c);const e=setTimeout(m,300);u(e)};return(0,r.useEffect)((()=>{m()}),[s]),"column"===l?Nt(Ct.FK,{children:i.map((e=>Nt(da,{activeMenu:t,value:e.value||"",label:e.label||"",type:e.type||oa.internalLink},e.value)))}):Nt("div",{className:Cr()({"vm-header-nav-item":!0,"vm-header-nav-item_sub":!0,"vm-header-nav-item_open":h,"vm-header-nav-item_active":i.find((e=>e.value===t))}),style:{color:a},onMouseEnter:()=>{p(),c&&clearTimeout(c)},onMouseLeave:f,ref:d,children:[n,Nt(Hn,{}),Nt(pa,{open:h,placement:"bottom-left",offset:{top:12,left:0},onClose:m,buttonRef:d,children:Nt("div",{className:"vm-header-nav-item-submenu",style:{background:o},onMouseLeave:f,onMouseEnter:()=>{c&&clearTimeout(c)},children:i.map((e=>Nt(da,{activeMenu:t,value:e.value||"",label:e.label||"",color:a,type:e.type||oa.internalLink},e.value)))})})]})},ga=e=>{let{color:t,background:n,direction:a}=e;const o=Qe(),{dashboardsSettings:i}=Kr(),{pathname:l}=re(),{serverUrl:s,flags:c}=Mt(),[u,d]=(0,r.useState)(l),h=(0,r.useMemo)((()=>{switch({NODE_ENV:"production",PUBLIC_URL:".",WDS_SOCKET_HOST:void 0,WDS_SOCKET_PATH:void 0,WDS_SOCKET_PORT:void 0,FAST_REFRESH:!1}.REACT_APP_TYPE){case $e.logs:return sa;case $e.anomaly:return ca;default:return[...ua,{label:Ye[We.dashboards].title,value:We.dashboards,hide:o||!i.length},{label:"Alerts",value:"".concat(s,"/vmalert"),type:oa.externalLink,hide:!Object.keys(c).includes("vmalert.proxyURL")}].filter((e=>!e.hide))}}),[o,i]);return(0,r.useEffect)((()=>{d(l)}),[l]),Nt("nav",{className:Cr()({"vm-header-nav":!0,["vm-header-nav_".concat(a)]:a}),children:h.map((e=>e.submenu?Nt(va,{activeMenu:u,label:e.label||"",submenu:e.submenu,color:t,background:n,direction:a},e.label):Nt(da,{activeMenu:u,value:e.value||"",label:e.label||"",color:t,type:e.type||oa.internalLink},e.value)))})},ya=e=>{let{title:t,children:n,onClose:a,className:o,isOpen:i=!0}=e;const{isMobile:l}=ea(),s=oe(),c=re(),u=(0,r.useCallback)((e=>{i&&"Escape"===e.key&&a()}),[i]),d=e=>{e.stopPropagation()},h=(0,r.useCallback)((()=>{i&&(s(c,{replace:!0}),a())}),[i,c,a]);return(0,r.useEffect)((()=>{if(i)return document.body.style.overflow="hidden",()=>{document.body.style.overflow="auto"}}),[i]),Ar("popstate",h),Ar("keyup",u),r.default.createPortal(Nt("div",{className:Cr()({"vm-modal":!0,"vm-modal_mobile":l,["".concat(o)]:o}),onMouseDown:a,children:Nt("div",{className:"vm-modal-content",children:[Nt("div",{className:"vm-modal-content-header",onMouseDown:d,children:[t&&Nt("div",{className:"vm-modal-content-header__title",children:t}),Nt("div",{className:"vm-modal-header__close",children:Nt(ma,{variant:"text",size:"small",onClick:a,ariaLabel:"close",children:Nt(On,{})})})]}),Nt("div",{className:"vm-modal-content-body",onMouseDown:d,tabIndex:0,children:n})]})}),document.body)},_a=e=>{let{children:t,title:n,open:a,placement:o="bottom-center",offset:i={top:6,left:0}}=e;const{isMobile:l}=ea(),[s,c]=(0,r.useState)(!1),[u,d]=(0,r.useState)({width:0,height:0}),h=(0,r.useRef)(null),m=(0,r.useRef)(null),p=()=>c(!1);(0,r.useEffect)((()=>{if(m.current&&s)return d({width:m.current.clientWidth,height:m.current.clientHeight}),window.addEventListener("scroll",p),()=>{window.removeEventListener("scroll",p)}}),[s,n]);const f=(0,r.useMemo)((()=>{var e;const t=null===h||void 0===h||null===(e=h.current)||void 0===e?void 0:e.base;if(!t||!s)return{};const n=t.getBoundingClientRect(),r={top:0,left:0},a="bottom-right"===o||"top-right"===o,l="bottom-left"===o||"top-left"===o,c=null===o||void 0===o?void 0:o.includes("top"),d=(null===i||void 0===i?void 0:i.top)||0,m=(null===i||void 0===i?void 0:i.left)||0;r.left=n.left-(u.width-n.width)/2+m,r.top=n.height+n.top+d,a&&(r.left=n.right-u.width),l&&(r.left=n.left+m),c&&(r.top=n.top-u.height-d);const{innerWidth:p,innerHeight:f}=window,v=r.top+u.height+20>f,g=r.top-20<0,y=r.left+u.width+20>p,_=r.left-20<0;return v&&(r.top=n.top-u.height-d),g&&(r.top=n.height+n.top+d),y&&(r.left=n.right-u.width-m),_&&(r.left=n.left+m),r.top<0&&(r.top=20),r.left<0&&(r.left=20),r}),[h,o,s,u]),v=()=>{"boolean"!==typeof a&&c(!0)},g=()=>{c(!1)};return(0,r.useEffect)((()=>{"boolean"===typeof a&&c(a)}),[a]),(0,r.useEffect)((()=>{var e;const t=null===h||void 0===h||null===(e=h.current)||void 0===e?void 0:e.base;if(t)return t.addEventListener("mouseenter",v),t.addEventListener("mouseleave",g),()=>{t.removeEventListener("mouseenter",v),t.removeEventListener("mouseleave",g)}}),[h]),Nt(Ct.FK,{children:[Nt(r.Fragment,{ref:h,children:t}),!l&&s&&r.default.createPortal(Nt("div",{className:"vm-tooltip",ref:m,style:f,children:n}),document.body)]})},ba=Nt("code",{children:Xr()?"Cmd":"Ctrl"}),wa=[{title:"Zoom in",description:Nt(Ct.FK,{children:["To zoom in, hold down the ",ba," + ",Nt("code",{children:"scroll up"}),", or press the ",Nt("code",{children:"+"}),". Also, you can zoom in on a range on the graph by holding down your mouse button and selecting the range."]})},{title:"Zoom out",description:Nt(Ct.FK,{children:["To zoom out, hold down the ",ba," + ",Nt("code",{children:"scroll down"}),", or press the ",Nt("code",{children:"-"}),"."]})},{title:"Move horizontal axis",description:Nt(Ct.FK,{children:["To move the graph, hold down the ",ba," + ",Nt("code",{children:"drag"})," the graph to the right or left."]})},{title:"Fixing a tooltip",description:Nt(Ct.FK,{children:["To fix the tooltip, ",Nt("code",{children:"click"})," mouse when it's open. Then, you can drag the fixed tooltip by ",Nt("code",{children:"clicking"})," and ",Nt("code",{children:"dragging"})," on the ",Nt(ar,{})," icon."]})},{title:"Set a custom range for the vertical axis",description:Nt(Ct.FK,{children:["To set a custom range for the vertical axis, click on the ",Nt(Ln,{})," icon located in the upper right corner of the graph, activate the toggle, and set the values."]})}],ka=[{title:"Show/hide a legend item",description:Nt(Ct.FK,{children:[Nt("code",{children:"click"})," on a legend item to isolate it on the graph.",ba," + ",Nt("code",{children:"click"})," on a legend item to remove it from the graph. To revert to the previous state, click again."]})},{title:"Copy label key-value pairs",description:Nt(Ct.FK,{children:[Nt("code",{children:"click"})," on a label key-value pair to save it to the clipboard."]})},{title:"Collapse/Expand the legend group",description:Nt(Ct.FK,{children:[Nt("code",{children:"click"})," on the group name (e.g. ",Nt("b",{children:'Query 1: {__name__!=""}'}),") to collapse or expand the legend."]})}],xa=wa.concat(ka),Sa=()=>{const{value:e,setFalse:t,setTrue:n}=fa(!1);return Nt(Ct.FK,{children:[Nt(_a,{title:"Show tips on working with the graph",children:Nt(ma,{variant:"text",color:"gray",startIcon:Nt(hr,{}),onClick:n,ariaLabel:"open the tips"})}),e&&Nt(ya,{title:"Tips on working with the graph and the legend",onClose:t,children:Nt("div",{className:"fc-graph-tips",children:xa.map((e=>{let{title:t,description:n}=e;return Nt("div",{className:"fc-graph-tips-item",children:[Nt("h4",{className:"fc-graph-tips-item__action",children:t}),Nt("p",{className:"fc-graph-tips-item__description",children:n})]},t)}))})})]})},Ca=Nt("code",{children:Xr()?"Cmd":"Ctrl"}),Ea=Nt(Ct.FK,{children:[Nt("code",{children:Xr()?"Option":"Ctrl"})," + ",Nt("code",{children:"Space"})]}),Na=[{title:"Query",list:[{keys:Nt("code",{children:"Enter"}),description:"Run"},{keys:Nt(Ct.FK,{children:[Nt("code",{children:"Shift"})," + ",Nt("code",{children:"Enter"})]}),description:"Multi-line queries"},{keys:Nt(Ct.FK,{children:[Ca," + ",Nt("code",{children:"Arrow Up"})]}),description:"Previous command from the Query history"},{keys:Nt(Ct.FK,{children:[Ca," + ",Nt("code",{children:"Arrow Down"})]}),description:"Next command from the Query history"},{keys:Nt(Ct.FK,{children:[Ca," + ",Nt("code",{children:"click"})," by ",Nt(er,{})]}),description:"Toggle multiple queries"},{keys:Ea,description:"Show quick autocomplete tips"}]},{title:"Graph",readMore:Nt(Sa,{}),list:[{keys:Nt(Ct.FK,{children:[Ca," + ",Nt("code",{children:"scroll Up"})," or ",Nt("code",{children:"+"})]}),description:"Zoom in"},{keys:Nt(Ct.FK,{children:[Ca," + ",Nt("code",{children:"scroll Down"})," or ",Nt("code",{children:"-"})]}),description:"Zoom out"},{keys:Nt(Ct.FK,{children:[Ca," + ",Nt("code",{children:"drag"})]}),description:"Move the graph left/right"},{keys:Nt(Ct.FK,{children:Nt("code",{children:"click"})}),description:"Select the series in the legend"},{keys:Nt(Ct.FK,{children:[Ca," + ",Nt("code",{children:"click"})]}),description:"Toggle multiple series in the legend"}]}],Aa="Shortcut keys",Ma=Xr(),Ta=Ma?"Cmd + /":"F1",La=e=>{let{showTitle:t}=e;const n=Qe(),{value:a,setTrue:o,setFalse:i}=fa(!1),l=(0,r.useCallback)((e=>{const t=Ma&&"/"===e.key&&e.metaKey,n=!Ma&&"F1"===e.key&&!e.metaKey;(t||n)&&o()}),[o]);return Ar("keydown",l),Nt(Ct.FK,{children:[Nt(_a,{open:!0!==t&&void 0,title:"".concat(Aa," (").concat(Ta,")"),placement:"bottom-center",children:Nt(ma,{className:n?"":"vm-header-button",variant:"contained",color:"primary",startIcon:Nt(Bn,{}),onClick:o,ariaLabel:Aa,children:t&&Aa})}),a&&Nt(ya,{title:"Shortcut keys",onClose:i,children:Nt("div",{className:"vm-shortcuts",children:Na.map((e=>Nt("div",{className:"vm-shortcuts-section",children:[e.readMore&&Nt("div",{className:"vm-shortcuts-section__read-more",children:e.readMore}),Nt("h3",{className:"vm-shortcuts-section__title",children:e.title}),Nt("div",{className:"vm-shortcuts-section-list",children:e.list.map(((t,n)=>Nt("div",{className:"vm-shortcuts-section-list-item",children:[Nt("div",{className:"vm-shortcuts-section-list-item__key",children:t.keys}),Nt("p",{className:"vm-shortcuts-section-list-item__description",children:t.description})]},"".concat(e.title,"_").concat(n))))})]},e.title)))})})]})},Oa=e=>{let{open:t}=e;return Nt("button",{className:Cr()({"vm-menu-burger":!0,"vm-menu-burger_opened":t}),"aria-label":"menu",children:Nt("span",{})})},{REACT_APP_TYPE:Pa}={},Ia=Pa===$e.logs,Ra=e=>{let{background:t,color:n}=e;const{pathname:a}=re(),{isMobile:o}=ea(),i=(0,r.useRef)(null),{value:l,toggle:s,setFalse:c}=fa(!1);return(0,r.useEffect)(c,[a]),ha(i,c),Nt("div",{className:"vm-header-sidebar",ref:i,children:[Nt("div",{className:Cr()({"vm-header-sidebar-button":!0,"vm-header-sidebar-button_open":l}),onClick:s,children:Nt(Oa,{open:l})}),Nt("div",{className:Cr()({"vm-header-sidebar-menu":!0,"vm-header-sidebar-menu_open":l}),children:[Nt("div",{children:Nt(ga,{color:n,background:t,direction:"column"})}),Nt("div",{className:"vm-header-sidebar-menu-settings",children:!o&&!Ia&&Nt(La,{showTitle:!0})})]})]})},Da=e=>{let{controlsComponent:t,isMobile:n,...a}=e;const o=Qe(),{pathname:i}=re(),{accountIds:l}=(()=>{const{useTenantID:e}=Ke(),t=Qe(),{serverUrl:n}=Mt(),[a,o]=(0,r.useState)(!1),[i,l]=(0,r.useState)(),[s,c]=(0,r.useState)([]),u=(0,r.useMemo)((()=>"".concat(n.replace(/^(.+)(\/select.+)/,"$1"),"/admin/tenants")),[n]),d=(0,r.useMemo)((()=>!!Je(n)),[n]),h=t?!e:!d;return(0,r.useEffect)((()=>{h||(async()=>{o(!0);try{const e=await fetch(u),t=await e.json(),n=t.data||[];c(n.sort(((e,t)=>e.localeCompare(t)))),e.ok?l(void 0):l("".concat(t.errorType,"\r\n").concat(null===t||void 0===t?void 0:t.error))}catch(Pp){Pp instanceof Error&&l("".concat(Pp.name,": ").concat(Pp.message))}o(!1)})().catch(console.error)}),[u]),{accountIds:s,isLoading:a,error:i}})(),{value:s,toggle:c,setFalse:u}=fa(!1),d=Nt(t,{...a,isMobile:n,accountIds:l,headerSetup:(0,r.useMemo)((()=>(Ye[i]||{}).header||{}),[i])});return n?Nt(Ct.FK,{children:[Nt("div",{children:Nt(ma,{className:Cr()({"vm-header-button":!o}),startIcon:Nt(ur,{}),onClick:c,ariaLabel:"controls"})}),Nt(ya,{title:"Controls",onClose:u,isOpen:s,className:Cr()({"vm-header-controls-modal":!0,"vm-header-controls-modal_open":s}),children:d})]}):d},{REACT_APP_TYPE:za}={},Fa=za===$e.logs||za===$e.anomaly,ja=()=>{switch(za){case $e.logs:return Nt(An,{});case $e.anomaly:return Nt(Mn,{});default:return Nt(Nn,{})}},Ha=e=>{let{controlsComponent:t}=e;const{isMobile:n}=ea(),a=Mr(),o=(0,r.useMemo)((()=>window.innerWidth<1e3),[a]),{isDarkTheme:i}=Mt(),l=Qe(),s=(0,r.useMemo)((()=>gt(i?"color-background-block":"color-primary")),[i]),{background:c,color:u}=(0,r.useMemo)((()=>{const{headerStyles:{background:e=(l?"#FFF":s),color:t=(l?s:"#FFF")}={}}=Ke();return{background:e,color:t}}),[s]),d=oe(),h=()=>{d({pathname:We.home}),window.location.reload()};return Nt("header",{className:Cr()({"vm-header":!0,"vm-header_app":l,"vm-header_dark":i,"vm-header_sidebar":o,"vm-header_mobile":n}),style:{background:c,color:u},children:[o?Nt(Ra,{background:c,color:u}):Nt(Ct.FK,{children:[!l&&Nt("div",{className:Cr()({"vm-header-logo":!0,"vm-header-logo_logs":Fa}),onClick:h,style:{color:u},children:Nt(ja,{})}),Nt(ga,{color:u,background:c})]}),o&&Nt("div",{className:Cr()({"vm-header-logo":!0,"vm-header-logo_mobile":!0,"vm-header-logo_logs":Fa}),onClick:h,style:{color:u},children:Nt(ja,{})}),Nt(Da,{controlsComponent:t,displaySidebar:o,isMobile:n})]})},$a={href:"https://github.com/VictoriaMetrics/VictoriaMetrics/issues/new/choose",Icon:lr,title:"Create an issue"},Va=[{href:"https://docs.victoriametrics.com/MetricsQL.html",Icon:Qn,title:"MetricsQL"},{href:"https://docs.victoriametrics.com/#vmui",Icon:ir,title:"Documentation"},$a],Ua=(0,r.memo)((e=>{let{links:t=Va}=e;const n="2019-".concat((new Date).getFullYear());return Nt("footer",{className:"vm-footer",children:[Nt("a",{className:"vm-link vm-footer__website",target:"_blank",href:"https://victoriametrics.com/",rel:"me noreferrer",children:[Nt(Tn,{}),"victoriametrics.com"]}),t.map((e=>{let{href:t,Icon:n,title:r}=e;return Nt("a",{className:"vm-link vm-footer__link",target:"_blank",href:t,rel:"help noreferrer",children:[Nt(n,{}),r]},"".concat(t,"-").concat(r))})),Nt("div",{className:"vm-footer__copyright",children:["\xa9 ",n," VictoriaMetrics"]})]})})),Ba=Ua,qa=()=>{const e=Qe(),{serverUrl:t}=Mt(),n=(0,r.useContext)(Wr).dispatch,[a,o]=(0,r.useState)(!1),[i,l]=(0,r.useState)(""),[s,c]=(0,r.useState)([]),u=async()=>{try{const e=window.__VMUI_PREDEFINED_DASHBOARDS__;if(null===e||void 0===e||!e.length)return[];const t=await Promise.all(e.map((async e=>(async e=>{const t=await fetch("./dashboards/".concat(e));return await t.json()})(e))));c((e=>[...t,...e]))}catch(Pp){Pp instanceof Error&&l("".concat(Pp.name,": ").concat(Pp.message))}};return(0,r.useEffect)((()=>{e||(c([]),(async()=>{if(t&&!{NODE_ENV:"production",PUBLIC_URL:".",WDS_SOCKET_HOST:void 0,WDS_SOCKET_PATH:void 0,WDS_SOCKET_PORT:void 0,FAST_REFRESH:!1}.REACT_APP_TYPE){l(""),o(!0);try{const e=await fetch("".concat(t,"/vmui/custom-dashboards")),n=await e.json();if(e.ok){const{dashboardsSettings:e}=n;e&&e.length>0?c((t=>[...t,...e])):await u(),o(!1)}else await u(),l(n.error),o(!1)}catch(Pp){o(!1),Pp instanceof Error&&l("".concat(Pp.name,": ").concat(Pp.message)),await u()}}})())}),[t]),(0,r.useEffect)((()=>{n({type:"SET_DASHBOARDS_SETTINGS",payload:s})}),[s]),(0,r.useEffect)((()=>{n({type:"SET_DASHBOARDS_LOADING",payload:a})}),[a]),(0,r.useEffect)((()=>{n({type:"SET_DASHBOARDS_ERROR",payload:i})}),[i]),{dashboardsSettings:s,isLoading:a,error:i}},Ya=e=>{let{error:t,warning:n,info:a}=e;const o=(0,r.useRef)(null),[i,l]=(0,r.useState)(!1),[s,c]=(0,r.useState)(!1),u=(0,r.useMemo)((()=>t?"ERROR: ":n?"WARNING: ":""),[t,n]),d="".concat(u).concat(t||n||a),h=()=>{const e=o.current;if(e){const{offsetWidth:t,scrollWidth:n,offsetHeight:r,scrollHeight:a}=e;l(t+1{c(!1),h()}),[o,d]),Ar("resize",h),t||n||a?Nt("span",{className:Cr()({"vm-text-field__error":!0,"vm-text-field__warning":n&&!t,"vm-text-field__helper-text":!n&&!t,"vm-text-field__error_overflowed":i,"vm-text-field__error_full":s}),"data-show":!!d,ref:o,onClick:()=>{i&&(c(!0),l(!1))},children:d}):null},Wa=e=>{let{label:t,value:n,type:a="text",error:o="",warning:i="",helperText:l="",placeholder:s,endIcon:c,startIcon:u,disabled:d=!1,autofocus:h=!1,inputmode:m="text",caretPosition:p,onChange:f,onEnter:v,onKeyDown:g,onFocus:y,onBlur:_,onChangeCaret:b}=e;const{isDarkTheme:w}=Mt(),{isMobile:k}=ea(),x=(0,r.useRef)(null),S=(0,r.useRef)(null),C=(0,r.useMemo)((()=>"textarea"===a?S:x),[a]),[E,N]=(0,r.useState)([0,0]),A=Cr()({"vm-text-field__input":!0,"vm-text-field__input_error":o,"vm-text-field__input_warning":!o&&i,"vm-text-field__input_icon-start":u,"vm-text-field__input_disabled":d,"vm-text-field__input_textarea":"textarea"===a}),M=e=>{const{selectionStart:t,selectionEnd:n}=e;N([t||0,n||0])},T=e=>{M(e.currentTarget)},L=e=>{g&&g(e);const{key:t,ctrlKey:n,metaKey:r}=e,o="Enter"===t;("textarea"!==a?o:o&&(r||n))&&v&&(e.preventDefault(),v())},O=e=>{M(e.currentTarget)},P=e=>{d||(f&&f(e.currentTarget.value),M(e.currentTarget))},I=()=>{y&&y()},R=()=>{_&&_()},D=e=>{try{C.current&&C.current.setSelectionRange(e[0],e[1])}catch(Pp){return Pp}};return(0,r.useEffect)((()=>{var e;h&&!k&&(null===C||void 0===C||null===(e=C.current)||void 0===e?void 0:e.focus)&&C.current.focus()}),[C,h]),(0,r.useEffect)((()=>{b&&b(E)}),[E]),(0,r.useEffect)((()=>{D(E)}),[n]),(0,r.useEffect)((()=>{p&&D(p)}),[p]),Nt("label",{className:Cr()({"vm-text-field":!0,"vm-text-field_textarea":"textarea"===a,"vm-text-field_dark":w}),"data-replicated-value":n,children:[u&&Nt("div",{className:"vm-text-field__icon-start",children:u}),c&&Nt("div",{className:"vm-text-field__icon-end",children:c}),"textarea"===a?Nt("textarea",{className:A,disabled:d,ref:S,value:n,rows:1,inputMode:m,placeholder:s,autoCapitalize:"none",onInput:P,onKeyDown:L,onKeyUp:O,onFocus:I,onBlur:R,onMouseUp:T}):Nt("input",{className:A,disabled:d,ref:x,value:n,type:a,placeholder:s,inputMode:m,autoCapitalize:"none",onInput:P,onKeyDown:L,onKeyUp:O,onFocus:I,onBlur:R,onMouseUp:T}),t&&Nt("span",{className:"vm-text-field__label",children:t}),Nt(Ya,{error:o,warning:i,info:l})]})},Ka=e=>{let{accountIds:t}=e;const n=Qe(),{isMobile:a}=ea(),{tenantId:o,serverUrl:i}=Mt(),l=Tt(),s=vn(),[c,u]=(0,r.useState)(""),d=(0,r.useRef)(null),{value:h,toggle:m,setFalse:p}=fa(!1),f=(0,r.useMemo)((()=>{if(!c)return t;try{const e=new RegExp(c,"i");return t.filter((t=>e.test(t))).sort(((t,n)=>{var r,a;return((null===(r=t.match(e))||void 0===r?void 0:r.index)||0)-((null===(a=n.match(e))||void 0===a?void 0:a.index)||0)}))}catch(Pp){return[]}}),[c,t]),v=(0,r.useMemo)((()=>t.length>1),[t]),g=e=>()=>{const t=e;if(l({type:"SET_TENANT_ID",payload:t}),i){const e=Ge(i,t);if(e===i)return;l({type:"SET_SERVER",payload:e}),s({type:"RUN_QUERY"})}p()};return(0,r.useEffect)((()=>{const e=Je(i);o&&o!==e?g(o)():g(e)()}),[i]),v?Nt("div",{className:"vm-tenant-input",children:[Nt(_a,{title:"Define Tenant ID if you need request to another storage",children:Nt("div",{ref:d,children:a?Nt("div",{className:"vm-mobile-option",onClick:m,children:[Nt("span",{className:"vm-mobile-option__icon",children:Nt(cr,{})}),Nt("div",{className:"vm-mobile-option-text",children:[Nt("span",{className:"vm-mobile-option-text__label",children:"Tenant ID"}),Nt("span",{className:"vm-mobile-option-text__value",children:o})]}),Nt("span",{className:"vm-mobile-option__arrow",children:Nt(jn,{})})]}):Nt(ma,{className:n?"":"vm-header-button",variant:"contained",color:"primary",fullWidth:!0,startIcon:Nt(cr,{}),endIcon:Nt("div",{className:Cr()({"vm-execution-controls-buttons__arrow":!0,"vm-execution-controls-buttons__arrow_open":h}),children:Nt(jn,{})}),onClick:m,children:o})})}),Nt(pa,{open:h,placement:"bottom-right",onClose:p,buttonRef:d,title:a?"Define Tenant ID":void 0,children:Nt("div",{className:Cr()({"vm-list vm-tenant-input-list":!0,"vm-list vm-tenant-input-list_mobile":a}),children:[Nt("div",{className:"vm-tenant-input-list__search",children:Nt(Wa,{autofocus:!0,label:"Search",value:c,onChange:u,type:"search"})}),f.map((e=>Nt("div",{className:Cr()({"vm-list-item":!0,"vm-list-item_mobile":a,"vm-list-item_active":e===o}),onClick:g(e),children:e},e)))]})})]}):null};const Qa=function(e){const t=(0,r.useRef)();return(0,r.useEffect)((()=>{t.current=e}),[e]),t.current},Za=()=>{const e=Qe(),{isMobile:t}=ea(),{customStep:n,isHistogram:a}=Ur(),{period:{step:o,end:i,start:l}}=fn(),s=Br(),c=Qa(i-l),u=(0,r.useMemo)((()=>Zt(i-l,a)),[o,a]),[d,h]=(0,r.useState)(n||u),[m,p]=(0,r.useState)(""),{value:f,toggle:v,setFalse:g}=fa(!1),y=(0,r.useRef)(null),_=e=>{const t=e||d||u||"1s",n=(t.match(/[a-zA-Z]+/g)||[]).length?t:"".concat(t,"s");s({type:"SET_CUSTOM_STEP",payload:n}),h(n),p("")},b=()=>{_(),g()},w=e=>{const t=e.match(/[-+]?([0-9]*\.[0-9]+|[0-9]+)/g)||[],n=e.match(/[a-zA-Z]+/g)||[],r=t.length&&t.every((e=>parseFloat(e)>0)),a=n.every((e=>Ut.find((t=>t.short===e)))),o=r&&a;h(e),p(o?"":pt.validStep)};return(0,r.useEffect)((()=>{n&&_(n)}),[n]),(0,r.useEffect)((()=>{!n&&u&&_(u)}),[u]),(0,r.useEffect)((()=>{i-l!==c&&c&&u&&_(u)}),[i,l,c,u]),(0,r.useEffect)((()=>{o!==n&&o!==u||_(u)}),[a]),Nt("div",{className:"vm-step-control",ref:y,children:[t?Nt("div",{className:"vm-mobile-option",onClick:v,children:[Nt("span",{className:"vm-mobile-option__icon",children:Nt(or,{})}),Nt("div",{className:"vm-mobile-option-text",children:[Nt("span",{className:"vm-mobile-option-text__label",children:"Step"}),Nt("span",{className:"vm-mobile-option-text__value",children:d})]}),Nt("span",{className:"vm-mobile-option__arrow",children:Nt(jn,{})})]}):Nt(_a,{title:"Query resolution step width",children:Nt(ma,{className:e?"":"vm-header-button",variant:"contained",color:"primary",startIcon:Nt(or,{}),onClick:v,children:Nt("p",{children:["STEP",Nt("p",{className:"vm-step-control__value",children:d})]})})}),Nt(pa,{open:f,placement:"bottom-right",onClose:b,buttonRef:y,title:t?"Query resolution step width":void 0,children:Nt("div",{className:Cr()({"vm-step-control-popper":!0,"vm-step-control-popper_mobile":t}),children:[Nt(Wa,{autofocus:!0,label:"Step value",value:d,error:m,onChange:w,onEnter:()=>{_(),b()},onFocus:()=>{document.activeElement instanceof HTMLInputElement&&document.activeElement.select()},onBlur:_,endIcon:Nt(_a,{title:"Set default step value: ".concat(u),children:Nt(ma,{size:"small",variant:"text",color:"primary",startIcon:Nt(Pn,{}),onClick:()=>{const e=u||"1s";w(e),_(e)},ariaLabel:"reset step"})})}),Nt("div",{className:"vm-step-control-popper-info",children:[Nt("code",{children:"step"})," - the ",Nt("a",{className:"vm-link vm-link_colored",href:"https://prometheus.io/docs/prometheus/latest/querying/basics/#time-durations",target:"_blank",rel:"noreferrer",children:"interval"}),"between datapoints, which must be returned from the range query. The ",Nt("code",{children:"query"})," is executed at",Nt("code",{children:"start"}),", ",Nt("code",{children:"start+step"}),", ",Nt("code",{children:"start+2*step"}),", \u2026, ",Nt("code",{children:"end"})," timestamps.",Nt("a",{className:"vm-link vm-link_colored",href:"https://docs.victoriametrics.com/keyConcepts.html#range-query",target:"_blank",rel:"help noreferrer",children:"Read more about Range query"})]})]})})]})},Ga=e=>{let{relativeTime:t,setDuration:n}=e;const{isMobile:r}=ea();return Nt("div",{className:Cr()({"vm-time-duration":!0,"vm-time-duration_mobile":r}),children:rn.map((e=>{let{id:a,duration:o,until:i,title:l}=e;return Nt("div",{className:Cr()({"vm-list-item":!0,"vm-list-item_mobile":r,"vm-list-item_active":a===t}),onClick:(s={duration:o,until:i(),id:a},()=>{n(s)}),children:l||o},a);var s}))})},Ja=e=>{let{viewDate:t,showArrowNav:n,onChangeViewDate:r,toggleDisplayYears:a}=e;return Nt("div",{className:"vm-calendar-header",children:[Nt("div",{className:"vm-calendar-header-left",onClick:a,children:[Nt("span",{className:"vm-calendar-header-left__date",children:t.format("MMMM YYYY")}),Nt("div",{className:"vm-calendar-header-left__select-year",children:Nt(Hn,{})})]}),n&&Nt("div",{className:"vm-calendar-header-right",children:[Nt("div",{className:"vm-calendar-header-right__prev",onClick:()=>{r(t.subtract(1,"month"))},children:Nt(jn,{})}),Nt("div",{className:"vm-calendar-header-right__next",onClick:()=>{r(t.add(1,"month"))},children:Nt(jn,{})})]})]})},Xa=["Sunday","Monday","Tuesday","Wednesday","Thursday","Friday","Saturday"],eo=e=>{let{viewDate:t,selectDate:n,onChangeSelectDate:a}=e;const i="YYYY-MM-DD",l=o().tz(),s=o()(t.format(i)),c=(0,r.useMemo)((()=>{const e=new Array(42).fill(null),t=s.startOf("month"),n=s.endOf("month").diff(t,"day")+1,r=new Array(n).fill(t).map(((e,t)=>e.add(t,"day"))),a=t.day();return e.splice(a,n,...r),e}),[s]),u=e=>()=>{e&&a(e)};return Nt("div",{className:"vm-calendar-body",children:[Xa.map((e=>Nt(_a,{title:e,children:Nt("div",{className:"vm-calendar-body-cell vm-calendar-body-cell_weekday",children:e[0]})},e))),c.map(((e,t)=>Nt("div",{className:Cr()({"vm-calendar-body-cell":!0,"vm-calendar-body-cell_day":!0,"vm-calendar-body-cell_day_empty":!e,"vm-calendar-body-cell_day_active":(e&&e.format(i))===n.format(i),"vm-calendar-body-cell_day_today":(e&&e.format(i))===l.format(i)}),onClick:u(e),children:e&&e.format("D")},e?e.format(i):t)))]})},to=e=>{let{viewDate:t,onChangeViewDate:n}=e;const a=o()().format("YYYY"),i=(0,r.useMemo)((()=>t.format("YYYY")),[t]),l=(0,r.useMemo)((()=>{const e=o()().subtract(9,"year");return new Array(18).fill(e).map(((e,t)=>e.add(t,"year")))}),[t]);(0,r.useEffect)((()=>{const e=document.getElementById("vm-calendar-year-".concat(i));e&&e.scrollIntoView({block:"center"})}),[]);return Nt("div",{className:"vm-calendar-years",children:l.map((e=>{return Nt("div",{className:Cr()({"vm-calendar-years__year":!0,"vm-calendar-years__year_selected":e.format("YYYY")===i,"vm-calendar-years__year_today":e.format("YYYY")===a}),id:"vm-calendar-year-".concat(e.format("YYYY")),onClick:(t=e,()=>{n(t)}),children:e.format("YYYY")},e.format("YYYY"));var t}))})},no=e=>{let{viewDate:t,selectDate:n,onChangeViewDate:a}=e;const i=o()().format("MM"),l=(0,r.useMemo)((()=>n.format("MM")),[n]),s=(0,r.useMemo)((()=>new Array(12).fill("").map(((e,n)=>o()(t).month(n)))),[t]);(0,r.useEffect)((()=>{const e=document.getElementById("vm-calendar-year-".concat(l));e&&e.scrollIntoView({block:"center"})}),[]);return Nt("div",{className:"vm-calendar-years",children:s.map((e=>{return Nt("div",{className:Cr()({"vm-calendar-years__year":!0,"vm-calendar-years__year_selected":e.format("MM")===l,"vm-calendar-years__year_today":e.format("MM")===i}),id:"vm-calendar-year-".concat(e.format("MM")),onClick:(t=e,()=>{a(t)}),children:e.format("MMMM")},e.format("MM"));var t}))})};var ro=function(e){return e[e.days=0]="days",e[e.months=1]="months",e[e.years=2]="years",e}(ro||{});const ao=e=>{let{date:t,format:n=Pt,onChange:a}=e;const[i,l]=(0,r.useState)(ro.days),[s,c]=(0,r.useState)(o().tz(t)),[u,d]=(0,r.useState)(o().tz(t)),h=o().tz(),m=h.format(Ot)===s.format(Ot),{isMobile:p}=ea(),f=e=>{c(e),l((e=>e===ro.years?ro.months:ro.days))};return(0,r.useEffect)((()=>{u.format()!==o().tz(t).format()&&a(u.format(n))}),[u]),(0,r.useEffect)((()=>{const e=o().tz(t);c(e),d(e)}),[t]),Nt("div",{className:Cr()({"vm-calendar":!0,"vm-calendar_mobile":p}),children:[Nt(Ja,{viewDate:s,onChangeViewDate:f,toggleDisplayYears:()=>{l((e=>e===ro.years?ro.days:ro.years))},showArrowNav:i===ro.days}),i===ro.days&&Nt(eo,{viewDate:s,selectDate:u,onChangeSelectDate:e=>{d(e)}}),i===ro.years&&Nt(to,{viewDate:s,onChangeViewDate:f}),i===ro.months&&Nt(no,{selectDate:u,viewDate:s,onChangeViewDate:f}),!m&&i===ro.days&&Nt("div",{className:"vm-calendar-footer",children:Nt(ma,{variant:"text",size:"small",onClick:()=>{c(h)},children:"show today"})})]})},oo=(0,r.forwardRef)(((e,t)=>{let{date:n,targetRef:a,format:i=Pt,onChange:l,label:s}=e;const c=(0,r.useMemo)((()=>o()(n).isValid()?o().tz(n):o()().tz()),[n]),{isMobile:u}=ea(),{value:d,toggle:h,setFalse:m}=fa(!1);return Ar("click",h,a),Ar("keyup",(e=>{"Escape"!==e.key&&"Enter"!==e.key||m()})),Nt(Ct.FK,{children:Nt(pa,{open:d,buttonRef:a,placement:"bottom-right",onClose:m,title:u?s:void 0,children:Nt("div",{ref:t,children:Nt(ao,{date:c,format:i,onChange:e=>{l(e),m()}})})})})}));var io=n(494),lo=n.n(io);const so=e=>o()(e).isValid()?o().tz(e).format(Pt):e,co=e=>{let{value:t="",label:n,pickerLabel:a,pickerRef:i,onChange:l,onEnter:s}=e;const c=(0,r.useRef)(null),[u,d]=(0,r.useState)(null),[h,m]=(0,r.useState)(so(t)),[p,f]=(0,r.useState)(!1),[v,g]=(0,r.useState)(!1),y=o()(h).isValid()?"":"Invalid date format";return(0,r.useEffect)((()=>{const e=so(t);e!==h&&m(e),v&&(s(),g(!1))}),[t]),(0,r.useEffect)((()=>{p&&u&&(u.focus(),u.setSelectionRange(11,11),f(!1))}),[p]),Nt("div",{className:Cr()({"vm-date-time-input":!0,"vm-date-time-input_error":y}),children:[Nt("label",{children:n}),Nt(lo(),{tabIndex:1,inputRef:d,mask:"9999-99-99 99:99:99",placeholder:"YYYY-MM-DD HH:mm:ss",value:h,autoCapitalize:"none",inputMode:"numeric",maskChar:null,onChange:e=>{m(e.currentTarget.value)},onBlur:()=>{l(h)},onKeyUp:e=>{"Enter"===e.key&&(l(h),g(!0))}}),y&&Nt("span",{className:"vm-date-time-input__error-text",children:y}),Nt("div",{className:"vm-date-time-input__icon",ref:c,children:Nt(ma,{variant:"text",color:"gray",size:"small",startIcon:Nt(Vn,{}),ariaLabel:"calendar"})}),Nt(oo,{label:a,ref:i,date:h,onChange:e=>{m(e),f(!0)},targetRef:c})]})},uo=()=>{const{isMobile:e}=ea(),{isDarkTheme:t}=Mt(),n=(0,r.useRef)(null),a=Mr(),i=(0,r.useMemo)((()=>a.width>1120),[a]),[l,s]=(0,r.useState)(),[c,u]=(0,r.useState)(),{period:{end:d,start:h},relativeTime:m,timezone:p,duration:f}=fn(),v=vn(),g=Qe(),y=Qa(p),{value:_,toggle:b,setFalse:w}=fa(!1),k=(0,r.useMemo)((()=>({region:p,utc:on(p)})),[p]);(0,r.useEffect)((()=>{s(Xt(tn(d)))}),[p,d]),(0,r.useEffect)((()=>{u(Xt(tn(h)))}),[p,h]);const x=e=>{let{duration:t,until:n,id:r}=e;v({type:"SET_RELATIVE_TIME",payload:{duration:t,until:n,id:r}}),w()},S=(0,r.useMemo)((()=>({start:o().tz(tn(h)).format(Pt),end:o().tz(tn(d)).format(Pt)})),[h,d,p]),C=(0,r.useMemo)((()=>m&&"none"!==m?m.replace(/_/g," "):"".concat(S.start," - ").concat(S.end)),[m,S]),E=(0,r.useRef)(null),N=(0,r.useRef)(null),A=(0,r.useRef)(null),M=()=>{c&&l&&v({type:"SET_PERIOD",payload:{from:o().tz(c).toDate(),to:o().tz(l).toDate()}}),w()};return(0,r.useEffect)((()=>{const e=an({relativeTimeId:m,defaultDuration:f,defaultEndInput:tn(d)});y&&p!==y&&x({id:e.relativeTimeId,duration:e.duration,until:e.endInput})}),[p,y]),ha(n,(t=>{var n,r;if(e)return;const a=t.target,o=(null===E||void 0===E?void 0:E.current)&&(null===E||void 0===E||null===(n=E.current)||void 0===n?void 0:n.contains(a)),i=(null===N||void 0===N?void 0:N.current)&&(null===N||void 0===N||null===(r=N.current)||void 0===r?void 0:r.contains(a));o||i||w()})),Nt(Ct.FK,{children:[Nt("div",{ref:A,children:e?Nt("div",{className:"vm-mobile-option",onClick:b,children:[Nt("span",{className:"vm-mobile-option__icon",children:Nt($n,{})}),Nt("div",{className:"vm-mobile-option-text",children:[Nt("span",{className:"vm-mobile-option-text__label",children:"Time range"}),Nt("span",{className:"vm-mobile-option-text__value",children:C})]}),Nt("span",{className:"vm-mobile-option__arrow",children:Nt(jn,{})})]}):Nt(_a,{title:i?"Time range controls":C,children:Nt(ma,{className:g?"":"vm-header-button",variant:"contained",color:"primary",startIcon:Nt($n,{}),onClick:b,ariaLabel:"time range controls",children:i&&Nt("span",{children:C})})})}),Nt(pa,{open:_,buttonRef:A,placement:"bottom-right",onClose:w,clickOutside:!1,title:e?"Time range controls":"",children:Nt("div",{className:Cr()({"vm-time-selector":!0,"vm-time-selector_mobile":e}),ref:n,children:[Nt("div",{className:"vm-time-selector-left",children:[Nt("div",{className:Cr()({"vm-time-selector-left-inputs":!0,"vm-time-selector-left-inputs_dark":t}),children:[Nt(co,{value:c,label:"From:",pickerLabel:"Date From",pickerRef:E,onChange:u,onEnter:M}),Nt(co,{value:l,label:"To:",pickerLabel:"Date To",pickerRef:N,onChange:s,onEnter:M})]}),Nt("div",{className:"vm-time-selector-left-timezone",children:[Nt("div",{className:"vm-time-selector-left-timezone__title",children:k.region}),Nt("div",{className:"vm-time-selector-left-timezone__utc",children:k.utc})]}),Nt(ma,{variant:"text",startIcon:Nt(Un,{}),onClick:()=>v({type:"RUN_QUERY_TO_NOW"}),children:"switch to now"}),Nt("div",{className:"vm-time-selector-left__controls",children:[Nt(ma,{color:"error",variant:"outlined",onClick:()=>{s(Xt(tn(d))),u(Xt(tn(h))),w()},children:"Cancel"}),Nt(ma,{color:"primary",onClick:M,children:"Apply"})]})]}),Nt(Ga,{relativeTime:m||"",setDuration:x})]})})]})},ho=()=>{const e=oe(),[t,n]=He();return{setSearchParamsFromKeys:(0,r.useCallback)((r=>{const a=!!Array.from(t.values()).length;let o=!1;Object.entries(r).forEach((e=>{let[n,r]=e;t.get(n)!=="".concat(r)&&(t.set(n,"".concat(r)),o=!0)})),o&&(a?n(t):e("?".concat(t.toString()),{replace:!0}))}),[t,e])}},mo=()=>{const{isMobile:e}=ea(),t=Qe(),n=(0,r.useRef)(null),[a]=He(),{setSearchParamsFromKeys:i}=ho(),l=a.get("date")||o()().tz().format(Ot),s=(0,r.useMemo)((()=>o().tz(l).format(Ot)),[l]),c=e=>{i({date:e})};return(0,r.useEffect)((()=>{c(l)}),[]),Nt("div",{children:[Nt("div",{ref:n,children:e?Nt("div",{className:"vm-mobile-option",children:[Nt("span",{className:"vm-mobile-option__icon",children:Nt(Vn,{})}),Nt("div",{className:"vm-mobile-option-text",children:[Nt("span",{className:"vm-mobile-option-text__label",children:"Date control"}),Nt("span",{className:"vm-mobile-option-text__value",children:s})]}),Nt("span",{className:"vm-mobile-option__arrow",children:Nt(jn,{})})]}):Nt(_a,{title:"Date control",children:Nt(ma,{className:t?"":"vm-header-button",variant:"contained",color:"primary",startIcon:Nt(Vn,{}),children:s})})}),Nt(oo,{label:"Date control",date:l||"",format:Ot,onChange:c,targetRef:n})]})},po=[{seconds:0,title:"Off"},{seconds:1,title:"1s"},{seconds:2,title:"2s"},{seconds:5,title:"5s"},{seconds:10,title:"10s"},{seconds:30,title:"30s"},{seconds:60,title:"1m"},{seconds:300,title:"5m"},{seconds:900,title:"15m"},{seconds:1800,title:"30m"},{seconds:3600,title:"1h"},{seconds:7200,title:"2h"}],fo=()=>{const{isMobile:e}=ea(),t=vn(),n=Qe(),[a,o]=(0,r.useState)(!1),[i,l]=(0,r.useState)(po[0]),{value:s,toggle:c,setFalse:u}=fa(!1),d=(0,r.useRef)(null);(0,r.useEffect)((()=>{const e=i.seconds;let n;return a?n=setInterval((()=>{t({type:"RUN_QUERY"})}),1e3*e):l(po[0]),()=>{n&&clearInterval(n)}}),[i,a]);const h=e=>()=>{(e=>{(a&&!e.seconds||!a&&e.seconds)&&o((e=>!e)),l(e),u()})(e)};return Nt(Ct.FK,{children:[Nt("div",{className:"vm-execution-controls",children:Nt("div",{className:Cr()({"vm-execution-controls-buttons":!0,"vm-execution-controls-buttons_mobile":e,"vm-header-button":!n}),children:[!e&&Nt(_a,{title:"Refresh dashboard",children:Nt(ma,{variant:"contained",color:"primary",onClick:()=>{t({type:"RUN_QUERY"})},startIcon:Nt(Fn,{}),ariaLabel:"refresh dashboard"})}),e?Nt("div",{className:"vm-mobile-option",onClick:c,children:[Nt("span",{className:"vm-mobile-option__icon",children:Nt(Pn,{})}),Nt("div",{className:"vm-mobile-option-text",children:[Nt("span",{className:"vm-mobile-option-text__label",children:"Auto-refresh"}),Nt("span",{className:"vm-mobile-option-text__value",children:i.title})]}),Nt("span",{className:"vm-mobile-option__arrow",children:Nt(jn,{})})]}):Nt(_a,{title:"Auto-refresh control",children:Nt("div",{ref:d,children:Nt(ma,{variant:"contained",color:"primary",fullWidth:!0,endIcon:Nt("div",{className:Cr()({"vm-execution-controls-buttons__arrow":!0,"vm-execution-controls-buttons__arrow_open":s}),children:Nt(jn,{})}),onClick:c,children:i.title})})})]})}),Nt(pa,{open:s,placement:"bottom-right",onClose:u,buttonRef:d,title:e?"Auto-refresh duration":void 0,children:Nt("div",{className:Cr()({"vm-execution-controls-list":!0,"vm-execution-controls-list_mobile":e}),children:po.map((t=>Nt("div",{className:Cr()({"vm-list-item":!0,"vm-list-item_mobile":e,"vm-list-item_active":t.seconds===i.seconds}),onClick:h(t),children:t.title},t.seconds)))})})]})},vo="Enable to save the modified server URL to local storage, preventing reset upon page refresh.",go="Disable to stop saving the server URL to local storage, reverting to the default URL on page refresh.",yo=(0,r.forwardRef)(((e,t)=>{let{onClose:n}=e;const{serverUrl:a}=Mt(),o=Tt(),{value:i,toggle:l}=fa(!!et("SERVER_URL")),[s,c]=(0,r.useState)(a),[u,d]=(0,r.useState)(""),h=(0,r.useCallback)((()=>{const e=Je(s);""!==e&&o({type:"SET_TENANT_ID",payload:e}),o({type:"SET_SERVER",payload:s}),n()}),[s]);return(0,r.useEffect)((()=>{a||d(pt.emptyServer),bt(a)||d(pt.validServer)}),[a]),(0,r.useEffect)((()=>{i?Xe("SERVER_URL",s):tt(["SERVER_URL"])}),[i]),(0,r.useEffect)((()=>{i&&Xe("SERVER_URL",s)}),[s]),(0,r.useEffect)((()=>{a!==s&&c(a)}),[a]),(0,r.useImperativeHandle)(t,(()=>({handleApply:h})),[h]),Nt("div",{children:[Nt("div",{className:"vm-server-configurator__title",children:"Server URL"}),Nt("div",{className:"vm-server-configurator-url",children:[Nt(Wa,{autofocus:!0,value:s,error:u,onChange:e=>{c(e||""),d("")},onEnter:h,inputmode:"url"}),Nt(_a,{title:i?go:vo,children:Nt(ma,{className:"vm-server-configurator-url__button",variant:"text",color:i?"primary":"gray",onClick:l,startIcon:Nt(cr,{})})})]})]})})),_o=[{label:"Graph",type:mt.chart},{label:"JSON",type:mt.code},{label:"Table",type:mt.table}],bo=(0,r.forwardRef)(((e,t)=>{let{onClose:n}=e;const{isMobile:a}=ea(),{seriesLimits:o}=Fr(),i=jr(),[l,s]=(0,r.useState)(o),[c,u]=(0,r.useState)({table:"",chart:"",code:""}),d=(0,r.useCallback)((()=>{i({type:"SET_SERIES_LIMITS",payload:l}),n()}),[l]);return(0,r.useImperativeHandle)(t,(()=>({handleApply:d})),[d]),Nt("div",{className:"vm-limits-configurator",children:[Nt("div",{className:"vm-server-configurator__title",children:["Series limits by tabs",Nt(_a,{title:"Set to 0 to disable the limit",children:Nt(ma,{variant:"text",color:"primary",size:"small",startIcon:Nt(In,{})})}),Nt("div",{className:"vm-limits-configurator-title__reset",children:Nt(ma,{variant:"text",color:"primary",size:"small",startIcon:Nt(Pn,{}),onClick:()=>{s(lt)},children:"Reset limits"})})]}),Nt("div",{className:Cr()({"vm-limits-configurator__inputs":!0,"vm-limits-configurator__inputs_mobile":a}),children:_o.map((e=>{return Nt("div",{children:Nt(Wa,{label:e.label,value:l[e.type],error:c[e.type],onChange:(t=e.type,e=>{const n=e||"";u((e=>({...e,[t]:+n<0?pt.positiveNumber:""}))),s({...l,[t]:n||1/0})}),onEnter:d,type:"number"})},e.type);var t}))})]})})),wo=bo,ko=e=>{let{defaultExpanded:t=!1,onChange:n,title:a,children:o}=e;const[i,l]=(0,r.useState)(t);return(0,r.useEffect)((()=>{n&&n(i)}),[i]),Nt(Ct.FK,{children:[Nt("header",{className:"vm-accordion-header ".concat(i&&"vm-accordion-header_open"),onClick:()=>{l((e=>!e))},children:[a,Nt("div",{className:"vm-accordion-header__arrow ".concat(i&&"vm-accordion-header__arrow_open"),children:Nt(jn,{})})]}),i&&Nt("section",{className:"vm-accordion-section",children:o},"content")]})},xo=()=>Nt(_a,{title:"Browser timezone is not recognized, supported, or could not be determined.",children:Nt(Rn,{})}),So=cn(),Co=(0,r.forwardRef)(((e,t)=>{const{isMobile:n}=ea(),a=ln(),{timezone:o,defaultTimezone:i}=fn(),l=vn(),[s,c]=(0,r.useState)(o),[u,d]=(0,r.useState)(""),h=(0,r.useRef)(null),{value:m,toggle:p,setFalse:f}=fa(!1),v=(0,r.useMemo)((()=>[{title:"Default time (".concat(i,")"),region:i,utc:i?on(i):"UTC"},{title:So.title,region:So.region,utc:on(So.region),isInvalid:!So.isValid},{title:"UTC (Coordinated Universal Time)",region:"UTC",utc:"UTC"}].filter((e=>e.region))),[i]),g=(0,r.useMemo)((()=>{if(!u)return a;try{return ln(u)}catch(Pp){return{}}}),[u,a]),y=(0,r.useMemo)((()=>Object.keys(g)),[g]),_=(0,r.useMemo)((()=>({region:s,utc:on(s)})),[s]),b=e=>()=>{(e=>{c(e.region),d(""),f()})(e)};return(0,r.useEffect)((()=>{c(o)}),[o]),(0,r.useImperativeHandle)(t,(()=>({handleApply:()=>{l({type:"SET_TIMEZONE",payload:s})}})),[s]),Nt("div",{className:"vm-timezones",children:[Nt("div",{className:"vm-server-configurator__title",children:"Time zone"}),Nt("div",{className:"vm-timezones-item vm-timezones-item_selected",onClick:p,ref:h,children:[Nt("div",{className:"vm-timezones-item__title",children:_.region}),Nt("div",{className:"vm-timezones-item__utc",children:_.utc}),Nt("div",{className:Cr()({"vm-timezones-item__icon":!0,"vm-timezones-item__icon_open":m}),children:Nt(Hn,{})})]}),Nt(pa,{open:m,buttonRef:h,placement:"bottom-left",onClose:f,fullWidth:!0,title:n?"Time zone":void 0,children:Nt("div",{className:Cr()({"vm-timezones-list":!0,"vm-timezones-list_mobile":n}),children:[Nt("div",{className:"vm-timezones-list-header",children:[Nt("div",{className:"vm-timezones-list-header__search",children:Nt(Wa,{autofocus:!0,label:"Search",value:u,onChange:e=>{d(e)}})}),v.map(((e,t)=>e&&Nt("div",{className:"vm-timezones-item vm-timezones-list-group-options__item",onClick:b(e),children:[Nt("div",{className:"vm-timezones-item__title",children:[e.title,e.isInvalid&&Nt(xo,{})]}),Nt("div",{className:"vm-timezones-item__utc",children:e.utc})]},"".concat(t,"_").concat(e.region))))]}),y.map((e=>Nt("div",{className:"vm-timezones-list-group",children:Nt(ko,{defaultExpanded:!0,title:Nt("div",{className:"vm-timezones-list-group__title",children:e}),children:Nt("div",{className:"vm-timezones-list-group-options",children:g[e]&&g[e].map((e=>Nt("div",{className:"vm-timezones-item vm-timezones-list-group-options__item",onClick:b(e),children:[Nt("div",{className:"vm-timezones-item__title",children:e.region}),Nt("div",{className:"vm-timezones-item__utc",children:e.utc})]},e.search)))})})},e)))]})})]})})),Eo=Co,No=e=>{let{options:t,value:n,label:a,onChange:o}=e;const i=(0,r.useRef)(null),[l,s]=(0,r.useState)({width:"0px",left:"0px",borderRadius:"0px"}),c=e=>()=>{o(e)};return(0,r.useEffect)((()=>{if(!i.current)return void s({width:"0px",left:"0px",borderRadius:"0px"});const e=t.findIndex((e=>e.value===n)),{width:r}=i.current.getBoundingClientRect();let a=r,o=e*a,l="0";0===e&&(l="16px 0 0 16px"),e===t.length-1&&(l="10px",o-=1,l="0 16px 16px 0"),0!==e&&e!==t.length-1&&(a+=1,o-=1),s({width:"".concat(a,"px"),left:"".concat(o,"px"),borderRadius:l})}),[i,n,t]),Nt("div",{className:"vm-toggles",children:[a&&Nt("label",{className:"vm-toggles__label",children:a}),Nt("div",{className:"vm-toggles-group",style:{gridTemplateColumns:"repeat(".concat(t.length,", 1fr)")},children:[l.borderRadius&&Nt("div",{className:"vm-toggles-group__highlight",style:l}),t.map(((e,t)=>Nt("div",{className:Cr()({"vm-toggles-group-item":!0,"vm-toggles-group-item_first":0===t,"vm-toggles-group-item_active":e.value===n,"vm-toggles-group-item_icon":e.icon&&e.title}),onClick:c(e.value),ref:e.value===n?i:null,children:[e.icon,e.title]},e.value)))]})]})},Ao=Object.values(ft).map((e=>({title:e,value:e}))),Mo=()=>{const{isMobile:e}=ea(),t=Tt(),{theme:n}=Mt();return Nt("div",{className:Cr()({"vm-theme-control":!0,"vm-theme-control_mobile":e}),children:[Nt("div",{className:"vm-server-configurator__title",children:"Theme preferences"}),Nt("div",{className:"vm-theme-control__toggle",children:Nt(No,{options:Ao,value:n,onChange:e=>{t({type:"SET_THEME",payload:e})}})},"".concat(e))]})},To=e=>{let{value:t=!1,disabled:n=!1,label:r,color:a="secondary",fullWidth:o,onChange:i}=e;return Nt("div",{className:Cr()({"vm-switch":!0,"vm-switch_full-width":o,"vm-switch_disabled":n,"vm-switch_active":t,["vm-switch_".concat(a,"_active")]:t,["vm-switch_".concat(a)]:a}),onClick:()=>{n||i(!t)},children:[Nt("div",{className:"vm-switch-track",children:Nt("div",{className:"vm-switch-track__thumb"})}),r&&Nt("span",{className:"vm-switch__label",children:r})]})},Lo=()=>{const{isMobile:e}=ea(),{markdownParsing:t}=(0,r.useContext)(Gr).state,n=(0,r.useContext)(Gr).dispatch;return Nt("div",{children:[Nt("div",{className:"vm-server-configurator__title",children:"Markdown Parsing for Logs"}),Nt(To,{label:t?"Disable markdown parsing":"Enable markdown parsing",value:t,onChange:e=>{n({type:"SET_MARKDOWN_PARSING",payload:e})},fullWidth:e}),Nt("div",{className:"vm-server-configurator__info",children:"Toggle this switch to enable or disable the Markdown formatting for log entries. Enabling this will parse log texts to Markdown."})]})},Oo="Settings",{REACT_APP_TYPE:Po}={},Io=Po===$e.logs,Ro=()=>{const{isMobile:e}=ea(),t=Qe(),n=(0,r.useRef)(null),a=(0,r.useRef)(null),o=(0,r.useRef)(null),{value:i,setTrue:l,setFalse:s}=fa(!1),c=[{show:!t&&!Io,component:Nt(yo,{ref:n,onClose:s})},{show:!Io,component:Nt(wo,{ref:a,onClose:s})},{show:Io,component:Nt(Lo,{})},{show:!0,component:Nt(Eo,{ref:o})},{show:!t,component:Nt(Mo,{})}].filter((e=>e.show));return Nt(Ct.FK,{children:[e?Nt("div",{className:"vm-mobile-option",onClick:l,children:[Nt("span",{className:"vm-mobile-option__icon",children:Nt(Ln,{})}),Nt("div",{className:"vm-mobile-option-text",children:Nt("span",{className:"vm-mobile-option-text__label",children:Oo})}),Nt("span",{className:"vm-mobile-option__arrow",children:Nt(jn,{})})]}):Nt(_a,{title:Oo,children:Nt(ma,{className:Cr()({"vm-header-button":!t}),variant:"contained",color:"primary",startIcon:Nt(Ln,{}),onClick:l,ariaLabel:"settings"})}),i&&Nt(ya,{title:Oo,onClose:s,children:Nt("div",{className:Cr()({"vm-server-configurator":!0,"vm-server-configurator_mobile":e}),children:[c.map(((e,t)=>Nt("div",{className:"vm-server-configurator__input",children:e.component},t))),Nt("div",{className:"vm-server-configurator-footer",children:[Nt(ma,{color:"error",variant:"outlined",onClick:s,children:"Cancel"}),Nt(ma,{color:"primary",variant:"contained",onClick:()=>{n.current&&n.current.handleApply(),a.current&&a.current.handleApply(),o.current&&o.current.handleApply(),s()},children:"Apply"})]})]})})]})},Do=e=>{let{displaySidebar:t,isMobile:n,headerSetup:r,accountIds:a}=e;return Nt("div",{className:Cr()({"vm-header-controls":!0,"vm-header-controls_mobile":n}),children:[(null===r||void 0===r?void 0:r.tenant)&&Nt(Ka,{accountIds:a||[]}),(null===r||void 0===r?void 0:r.stepControl)&&Nt(Za,{}),(null===r||void 0===r?void 0:r.timeSelector)&&Nt(uo,{}),(null===r||void 0===r?void 0:r.cardinalityDatePicker)&&Nt(mo,{}),(null===r||void 0===r?void 0:r.executionControls)&&Nt(fo,{}),Nt(Ro,{}),!t&&Nt(La,{})]})},zo=Boolean(et("DISABLED_DEFAULT_TIMEZONE")),Fo=()=>{const{serverUrl:e}=Mt(),t=vn(),[n,a]=(0,r.useState)(!1),[i,l]=(0,r.useState)(""),s=async()=>{if(e&&!{NODE_ENV:"production",PUBLIC_URL:".",WDS_SOCKET_HOST:void 0,WDS_SOCKET_PATH:void 0,WDS_SOCKET_PORT:void 0,FAST_REFRESH:!1}.REACT_APP_TYPE){l(""),a(!0);try{const n=await fetch("".concat(e,"/vmui/timezone")),r=await n.json();n.ok?((e=>{const n="local"===e.toLowerCase()?cn().region:e;try{if(o()().tz(n).isValid(),t({type:"SET_DEFAULT_TIMEZONE",payload:n}),zo)return;t({type:"SET_TIMEZONE",payload:n})}catch(Pp){Pp instanceof Error&&l("".concat(Pp.name,": ").concat(Pp.message))}})(r.timezone),a(!1)):(l(r.error),a(!1))}catch(Pp){a(!1),Pp instanceof Error&&l("".concat(Pp.name,": ").concat(Pp.message))}}};return(0,r.useEffect)((()=>{s()}),[e]),{isLoading:n,error:i}},jo=()=>{const{serverUrl:e}=Mt(),t=Tt(),[n,a]=(0,r.useState)(!1),[o,i]=(0,r.useState)("");return(0,r.useEffect)((()=>{(async()=>{if(e&&!{NODE_ENV:"production",PUBLIC_URL:".",WDS_SOCKET_HOST:void 0,WDS_SOCKET_PATH:void 0,WDS_SOCKET_PORT:void 0,FAST_REFRESH:!1}.REACT_APP_TYPE){i(""),a(!0);try{const n=(e=>e.replace(Ze,""))(e),r=await fetch("".concat(n,"/flags")),a=(await r.text()).split("\n").filter((e=>""!==e.trim())).reduce(((e,t)=>{const[n,r]=t.split("=");return e[n.trim().replace(/^-/,"").trim()]=r?r.trim().replace(/^"(.*)"$/,"$1"):null,e}),{});t({type:"SET_FLAGS",payload:a})}catch(Pp){a(!1),Pp instanceof Error&&i("".concat(Pp.name,": ").concat(Pp.message))}}})()}),[e]),{isLoading:n,error:o}},Ho=()=>{const e=Qe(),{isMobile:t}=ea(),{pathname:n}=re(),[a,o]=He();qa(),Fo(),jo();return(0,r.useEffect)((()=>{var e;const t="vmui",r=null===(e=Ye[n])||void 0===e?void 0:e.title;document.title=r?"".concat(r," - ").concat(t):t}),[n]),(0,r.useEffect)((()=>{const{search:e,href:t}=window.location;if(e){const t=at().parse(e,{ignoreQueryPrefix:!0});Object.entries(t).forEach((e=>{let[t,n]=e;return a.set(t,n)})),o(a),window.location.search=""}const n=t.replace(/\/\?#\//,"/#/");n!==t&&window.location.replace(n)}),[]),Nt("section",{className:"vm-container",children:[Nt(Ha,{controlsComponent:Do}),Nt("div",{className:Cr()({"vm-container-body":!0,"vm-container-body_mobile":t,"vm-container-body_app":e}),children:Nt(be,{})}),!e&&Nt(Ba,{})]})};var $o=function(e){return e[e.mouse=0]="mouse",e[e.keyboard=1]="keyboard",e}($o||{});const Vo=e=>{var t;let{value:n,options:a,anchor:o,disabled:i,minLength:l=2,fullWidth:s,selected:c,noOptionsText:u,label:d,disabledFullScreen:h,offset:m,maxDisplayResults:p,loading:f,onSelect:v,onOpenAutocomplete:g,onFoundOptions:y,onChangeWrapperRef:_}=e;const{isMobile:b}=ea(),w=(0,r.useRef)(null),[k,x]=(0,r.useState)({index:-1}),[S,C]=(0,r.useState)(""),[E,N]=(0,r.useState)(0),{value:A,setValue:M,setFalse:T}=fa(!1),L=(0,r.useMemo)((()=>{if(!A)return[];try{const e=new RegExp(String(n.trim()),"i"),t=a.filter((t=>e.test(t.value))).sort(((t,r)=>{var a,o;return t.value.toLowerCase()===n.trim().toLowerCase()?-1:r.value.toLowerCase()===n.trim().toLowerCase()?1:((null===(a=t.value.match(e))||void 0===a?void 0:a.index)||0)-((null===(o=r.value.match(e))||void 0===o?void 0:o.index)||0)}));return N(t.length),C(t.length>Number(null===p||void 0===p?void 0:p.limit)&&(null===p||void 0===p?void 0:p.message)||""),null!==p&&void 0!==p&&p.limit?t.slice(0,p.limit):t}catch(Pp){return[]}}),[A,a,n]),O=(0,r.useMemo)((()=>{var e;return 1===L.length&&(null===(e=L[0])||void 0===e?void 0:e.value)===n}),[L]),P=(0,r.useMemo)((()=>u&&!L.length),[u,L]),I=()=>{x({index:-1})},R=(0,r.useCallback)((e=>{const{key:t,ctrlKey:n,metaKey:r,shiftKey:a}=e,o=n||r||a,i=L.length&&!O;if("ArrowUp"===t&&!o&&i&&(e.preventDefault(),x((e=>{let{index:t}=e;return{index:t<=0?0:t-1,type:$o.keyboard}}))),"ArrowDown"===t&&!o&&i){e.preventDefault();const t=L.length-1;x((e=>{let{index:n}=e;return{index:n>=t?t:n+1,type:$o.keyboard}}))}if("Enter"===t){const e=L[k.index];e&&v(e.value),c||T()}"Escape"===t&&T()}),[k,L,O,T,v,c]);return(0,r.useEffect)((()=>{M(n.length>=l)}),[n,a]),Ar("keydown",R),(0,r.useEffect)((()=>{if(!w.current||k.type===$o.mouse)return;const e=w.current.childNodes[k.index];null!==e&&void 0!==e&&e.scrollIntoView&&e.scrollIntoView({block:"center"})}),[k,L]),(0,r.useEffect)((()=>{x({index:-1})}),[L]),(0,r.useEffect)((()=>{g&&g(A)}),[A]),(0,r.useEffect)((()=>{y&&y(O?[]:L)}),[L,O]),(0,r.useEffect)((()=>{_&&_(w)}),[w]),Nt(pa,{open:A,buttonRef:o,placement:"bottom-left",onClose:T,fullWidth:s,title:b?d:void 0,disabledFullScreen:h,offset:m,children:[Nt("div",{className:Cr()({"vm-autocomplete":!0,"vm-autocomplete_mobile":b&&!h}),ref:w,children:[f&&Nt("div",{className:"vm-autocomplete__loader",children:[Nt(Fn,{}),Nt("span",{children:"Loading..."})]}),P&&Nt("div",{className:"vm-autocomplete__no-options",children:u}),!O&&L.map(((e,t)=>{return Nt("div",{className:Cr()({"vm-list-item":!0,"vm-list-item_mobile":b,"vm-list-item_active":t===k.index,"vm-list-item_multiselect":c,"vm-list-item_multiselect_selected":null===c||void 0===c?void 0:c.includes(e.value),"vm-list-item_with-icon":e.icon}),id:"$autocomplete$".concat(e.value),onClick:(r=e.value,()=>{i||(v(r),c||T())}),onMouseEnter:(n=t,()=>{x({index:n,type:$o.mouse})}),onMouseLeave:I,children:[(null===c||void 0===c?void 0:c.includes(e.value))&&Nt(Xn,{}),Nt(Ct.FK,{children:e.icon}),Nt("span",{children:e.value})]},"".concat(t).concat(e.value));var n,r}))]}),S&&Nt("div",{className:"vm-autocomplete-message",children:["Shown ",null===p||void 0===p?void 0:p.limit," results out of ",E,". ",S]}),(null===(t=L[k.index])||void 0===t?void 0:t.description)&&Nt("div",{className:"vm-autocomplete-info",children:[Nt("div",{className:"vm-autocomplete-info__type",children:L[k.index].type}),Nt("div",{className:"vm-autocomplete-info__description",dangerouslySetInnerHTML:{__html:L[k.index].description||""}})]})]})};var Uo=n(267),Bo=n.n(Uo);const qo=e=>e.replace(/[/\-\\^$*+?.()|[\]{}]/g,"\\$&"),Yo=e=>JSON.stringify(e).slice(1,-1),Wo=e=>{const t=e.match(/["`']/g);return!!t&&t.length%2!==0};var Ko=function(e){return e.metric="metric",e.label="label",e.labelValue="labelValue",e}(Ko||{});const Qo={[Ko.metric]:Nt(vr,{}),[Ko.label]:Nt(yr,{}),[Ko.labelValue]:Nt(_r,{})};function Zo(e){return Zo="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},Zo(e)}function Go(e){var t=function(e,t){if("object"!=Zo(e)||!e)return e;var n=e[Symbol.toPrimitive];if(void 0!==n){var r=n.call(e,t||"default");if("object"!=Zo(r))return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===t?String:Number)(e)}(e,"string");return"symbol"==Zo(t)?t:t+""}function Jo(e,t,n){return(t=Go(t))in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function Xo(){return{async:!1,breaks:!1,extensions:null,gfm:!0,hooks:null,pedantic:!1,renderer:null,silent:!1,tokenizer:null,walkTokens:null}}let ei={async:!1,breaks:!1,extensions:null,gfm:!0,hooks:null,pedantic:!1,renderer:null,silent:!1,tokenizer:null,walkTokens:null};function ti(e){ei=e}const ni=/[&<>"']/,ri=new RegExp(ni.source,"g"),ai=/[<>"']|&(?!(#\d{1,7}|#[Xx][a-fA-F0-9]{1,6}|\w+);)/,oi=new RegExp(ai.source,"g"),ii={"&":"&","<":"<",">":">",'"':""","'":"'"},li=e=>ii[e];function si(e,t){if(t){if(ni.test(e))return e.replace(ri,li)}else if(ai.test(e))return e.replace(oi,li);return e}const ci=/(^|[^\[])\^/g;function ui(e,t){let n="string"===typeof e?e:e.source;t=t||"";const r={replace:(e,t)=>{let a="string"===typeof t?t:t.source;return a=a.replace(ci,"$1"),n=n.replace(e,a),r},getRegex:()=>new RegExp(n,t)};return r}function di(e){try{e=encodeURI(e).replace(/%25/g,"%")}catch{return null}return e}const hi={exec:()=>null};function mi(e,t){const n=e.replace(/\|/g,((e,t,n)=>{let r=!1,a=t;for(;--a>=0&&"\\"===n[a];)r=!r;return r?"|":" |"})).split(/ \|/);let r=0;if(n[0].trim()||n.shift(),n.length>0&&!n[n.length-1].trim()&&n.pop(),t)if(n.length>t)n.splice(t);else for(;n.length0)return{type:"space",raw:t[0]}}code(e){const t=this.rules.block.code.exec(e);if(t){const e=t[0].replace(/^(?: {1,4}| {0,3}\t)/gm,"");return{type:"code",raw:t[0],codeBlockStyle:"indented",text:this.options.pedantic?e:pi(e,"\n")}}}fences(e){const t=this.rules.block.fences.exec(e);if(t){const e=t[0],n=function(e,t){const n=e.match(/^(\s+)(?:```)/);if(null===n)return t;const r=n[1];return t.split("\n").map((e=>{const t=e.match(/^\s+/);if(null===t)return e;const[n]=t;return n.length>=r.length?e.slice(r.length):e})).join("\n")}(e,t[3]||"");return{type:"code",raw:e,lang:t[2]?t[2].trim().replace(this.rules.inline.anyPunctuation,"$1"):t[2],text:n}}}heading(e){const t=this.rules.block.heading.exec(e);if(t){let e=t[2].trim();if(/#$/.test(e)){const t=pi(e,"#");this.options.pedantic?e=t.trim():t&&!/ $/.test(t)||(e=t.trim())}return{type:"heading",raw:t[0],depth:t[1].length,text:e,tokens:this.lexer.inline(e)}}}hr(e){const t=this.rules.block.hr.exec(e);if(t)return{type:"hr",raw:pi(t[0],"\n")}}blockquote(e){const t=this.rules.block.blockquote.exec(e);if(t){let e=pi(t[0],"\n").split("\n"),n="",r="";const a=[];for(;e.length>0;){let t=!1;const o=[];let i;for(i=0;i/.test(e[i]))o.push(e[i]),t=!0;else{if(t)break;o.push(e[i])}e=e.slice(i);const l=o.join("\n"),s=l.replace(/\n {0,3}((?:=+|-+) *)(?=\n|$)/g,"\n $1").replace(/^ {0,3}>[ \t]?/gm,"");n=n?"".concat(n,"\n").concat(l):l,r=r?"".concat(r,"\n").concat(s):s;const c=this.lexer.state.top;if(this.lexer.state.top=!0,this.lexer.blockTokens(s,a,!0),this.lexer.state.top=c,0===e.length)break;const u=a[a.length-1];if("code"===(null===u||void 0===u?void 0:u.type))break;if("blockquote"===(null===u||void 0===u?void 0:u.type)){const t=u,o=t.raw+"\n"+e.join("\n"),i=this.blockquote(o);a[a.length-1]=i,n=n.substring(0,n.length-t.raw.length)+i.raw,r=r.substring(0,r.length-t.text.length)+i.text;break}if("list"!==(null===u||void 0===u?void 0:u.type));else{const t=u,o=t.raw+"\n"+e.join("\n"),i=this.list(o);a[a.length-1]=i,n=n.substring(0,n.length-u.raw.length)+i.raw,r=r.substring(0,r.length-t.raw.length)+i.raw,e=o.substring(a[a.length-1].raw.length).split("\n")}}return{type:"blockquote",raw:n,tokens:a,text:r}}}list(e){let t=this.rules.block.list.exec(e);if(t){let n=t[1].trim();const r=n.length>1,a={type:"list",raw:"",ordered:r,start:r?+n.slice(0,-1):"",loose:!1,items:[]};n=r?"\\d{1,9}\\".concat(n.slice(-1)):"\\".concat(n),this.options.pedantic&&(n=r?n:"[*+-]");const o=new RegExp("^( {0,3}".concat(n,")((?:[\t ][^\\n]*)?(?:\\n|$))"));let i=!1;for(;e;){let n=!1,r="",l="";if(!(t=o.exec(e)))break;if(this.rules.block.hr.test(e))break;r=t[0],e=e.substring(r.length);let s=t[2].split("\n",1)[0].replace(/^\t+/,(e=>" ".repeat(3*e.length))),c=e.split("\n",1)[0],u=!s.trim(),d=0;if(this.options.pedantic?(d=2,l=s.trimStart()):u?d=t[1].length+1:(d=t[2].search(/[^ ]/),d=d>4?1:d,l=s.slice(d),d+=t[1].length),u&&/^[ \t]*$/.test(c)&&(r+=c+"\n",e=e.substring(c.length+1),n=!0),!n){const t=new RegExp("^ {0,".concat(Math.min(3,d-1),"}(?:[*+-]|\\d{1,9}[.)])((?:[ \t][^\\n]*)?(?:\\n|$))")),n=new RegExp("^ {0,".concat(Math.min(3,d-1),"}((?:- *){3,}|(?:_ *){3,}|(?:\\* *){3,})(?:\\n+|$)")),a=new RegExp("^ {0,".concat(Math.min(3,d-1),"}(?:```|~~~)")),o=new RegExp("^ {0,".concat(Math.min(3,d-1),"}#")),i=new RegExp("^ {0,".concat(Math.min(3,d-1),"}<[a-z].*>"),"i");for(;e;){const h=e.split("\n",1)[0];let m;if(c=h,this.options.pedantic?(c=c.replace(/^ {1,4}(?=( {4})*[^ ])/g," "),m=c):m=c.replace(/\t/g," "),a.test(c))break;if(o.test(c))break;if(i.test(c))break;if(t.test(c))break;if(n.test(c))break;if(m.search(/[^ ]/)>=d||!c.trim())l+="\n"+m.slice(d);else{if(u)break;if(s.replace(/\t/g," ").search(/[^ ]/)>=4)break;if(a.test(s))break;if(o.test(s))break;if(n.test(s))break;l+="\n"+c}u||c.trim()||(u=!0),r+=h+"\n",e=e.substring(h.length+1),s=m.slice(d)}}a.loose||(i?a.loose=!0:/\n[ \t]*\n[ \t]*$/.test(r)&&(i=!0));let h,m=null;this.options.gfm&&(m=/^\[[ xX]\] /.exec(l),m&&(h="[ ] "!==m[0],l=l.replace(/^\[[ xX]\] +/,""))),a.items.push({type:"list_item",raw:r,task:!!m,checked:h,loose:!1,text:l,tokens:[]}),a.raw+=r}a.items[a.items.length-1].raw=a.items[a.items.length-1].raw.trimEnd(),a.items[a.items.length-1].text=a.items[a.items.length-1].text.trimEnd(),a.raw=a.raw.trimEnd();for(let e=0;e"space"===e.type)),n=t.length>0&&t.some((e=>/\n.*\n/.test(e.raw)));a.loose=n}if(a.loose)for(let e=0;e$/,"$1").replace(this.rules.inline.anyPunctuation,"$1"):"",r=t[3]?t[3].substring(1,t[3].length-1).replace(this.rules.inline.anyPunctuation,"$1"):t[3];return{type:"def",tag:e,raw:t[0],href:n,title:r}}}table(e){const t=this.rules.block.table.exec(e);if(!t)return;if(!/[:|]/.test(t[2]))return;const n=mi(t[1]),r=t[2].replace(/^\||\| *$/g,"").split("|"),a=t[3]&&t[3].trim()?t[3].replace(/\n[ \t]*$/,"").split("\n"):[],o={type:"table",raw:t[0],header:[],align:[],rows:[]};if(n.length===r.length){for(const e of r)/^ *-+: *$/.test(e)?o.align.push("right"):/^ *:-+: *$/.test(e)?o.align.push("center"):/^ *:-+ *$/.test(e)?o.align.push("left"):o.align.push(null);for(let e=0;e({text:e,tokens:this.lexer.inline(e),header:!1,align:o.align[t]}))));return o}}lheading(e){const t=this.rules.block.lheading.exec(e);if(t)return{type:"heading",raw:t[0],depth:"="===t[2].charAt(0)?1:2,text:t[1],tokens:this.lexer.inline(t[1])}}paragraph(e){const t=this.rules.block.paragraph.exec(e);if(t){const e="\n"===t[1].charAt(t[1].length-1)?t[1].slice(0,-1):t[1];return{type:"paragraph",raw:t[0],text:e,tokens:this.lexer.inline(e)}}}text(e){const t=this.rules.block.text.exec(e);if(t)return{type:"text",raw:t[0],text:t[0],tokens:this.lexer.inline(t[0])}}escape(e){const t=this.rules.inline.escape.exec(e);if(t)return{type:"escape",raw:t[0],text:si(t[1])}}tag(e){const t=this.rules.inline.tag.exec(e);if(t)return!this.lexer.state.inLink&&/^
    /i.test(t[0])&&(this.lexer.state.inLink=!1),!this.lexer.state.inRawBlock&&/^<(pre|code|kbd|script)(\s|>)/i.test(t[0])?this.lexer.state.inRawBlock=!0:this.lexer.state.inRawBlock&&/^<\/(pre|code|kbd|script)(\s|>)/i.test(t[0])&&(this.lexer.state.inRawBlock=!1),{type:"html",raw:t[0],inLink:this.lexer.state.inLink,inRawBlock:this.lexer.state.inRawBlock,block:!1,text:t[0]}}link(e){const t=this.rules.inline.link.exec(e);if(t){const e=t[2].trim();if(!this.options.pedantic&&/^$/.test(e))return;const t=pi(e.slice(0,-1),"\\");if((e.length-t.length)%2===0)return}else{const e=function(e,t){if(-1===e.indexOf(t[1]))return-1;let n=0;for(let r=0;r-1){const n=(0===t[0].indexOf("!")?5:4)+t[1].length+e;t[2]=t[2].substring(0,e),t[0]=t[0].substring(0,n).trim(),t[3]=""}}let n=t[2],r="";if(this.options.pedantic){const e=/^([^'"]*[^\s])\s+(['"])(.*)\2/.exec(n);e&&(n=e[1],r=e[3])}else r=t[3]?t[3].slice(1,-1):"";return n=n.trim(),/^$/.test(e)?n.slice(1):n.slice(1,-1)),fi(t,{href:n?n.replace(this.rules.inline.anyPunctuation,"$1"):n,title:r?r.replace(this.rules.inline.anyPunctuation,"$1"):r},t[0],this.lexer)}}reflink(e,t){let n;if((n=this.rules.inline.reflink.exec(e))||(n=this.rules.inline.nolink.exec(e))){const e=t[(n[2]||n[1]).replace(/\s+/g," ").toLowerCase()];if(!e){const e=n[0].charAt(0);return{type:"text",raw:e,text:e}}return fi(n,e,n[0],this.lexer)}}emStrong(e,t){let n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:"",r=this.rules.inline.emStrongLDelim.exec(e);if(!r)return;if(r[3]&&n.match(/[\p{L}\p{N}]/u))return;if(!(r[1]||r[2]||"")||!n||this.rules.inline.punctuation.exec(n)){const n=[...r[0]].length-1;let a,o,i=n,l=0;const s="*"===r[0][0]?this.rules.inline.emStrongRDelimAst:this.rules.inline.emStrongRDelimUnd;for(s.lastIndex=0,t=t.slice(-1*e.length+n);null!=(r=s.exec(t));){if(a=r[1]||r[2]||r[3]||r[4]||r[5]||r[6],!a)continue;if(o=[...a].length,r[3]||r[4]){i+=o;continue}if((r[5]||r[6])&&n%3&&!((n+o)%3)){l+=o;continue}if(i-=o,i>0)continue;o=Math.min(o,o+i+l);const t=[...r[0]][0].length,s=e.slice(0,n+r.index+t+o);if(Math.min(n,o)%2){const e=s.slice(1,-1);return{type:"em",raw:s,text:e,tokens:this.lexer.inlineTokens(e)}}const c=s.slice(2,-2);return{type:"strong",raw:s,text:c,tokens:this.lexer.inlineTokens(c)}}}}codespan(e){const t=this.rules.inline.code.exec(e);if(t){let e=t[2].replace(/\n/g," ");const n=/[^ ]/.test(e),r=/^ /.test(e)&&/ $/.test(e);return n&&r&&(e=e.substring(1,e.length-1)),e=si(e,!0),{type:"codespan",raw:t[0],text:e}}}br(e){const t=this.rules.inline.br.exec(e);if(t)return{type:"br",raw:t[0]}}del(e){const t=this.rules.inline.del.exec(e);if(t)return{type:"del",raw:t[0],text:t[2],tokens:this.lexer.inlineTokens(t[2])}}autolink(e){const t=this.rules.inline.autolink.exec(e);if(t){let e,n;return"@"===t[2]?(e=si(t[1]),n="mailto:"+e):(e=si(t[1]),n=e),{type:"link",raw:t[0],text:e,href:n,tokens:[{type:"text",raw:e,text:e}]}}}url(e){let t;if(t=this.rules.inline.url.exec(e)){let e,a;if("@"===t[2])e=si(t[0]),a="mailto:"+e;else{let o;do{var n,r;o=t[0],t[0]=null!==(n=null===(r=this.rules.inline._backpedal.exec(t[0]))||void 0===r?void 0:r[0])&&void 0!==n?n:""}while(o!==t[0]);e=si(t[0]),a="www."===t[1]?"http://"+t[0]:t[0]}return{type:"link",raw:t[0],text:e,href:a,tokens:[{type:"text",raw:e,text:e}]}}}inlineText(e){const t=this.rules.inline.text.exec(e);if(t){let e;return e=this.lexer.state.inRawBlock?t[0]:si(t[0]),{type:"text",raw:t[0],text:e}}}}const gi=/^ {0,3}((?:-[\t ]*){3,}|(?:_[ \t]*){3,}|(?:\*[ \t]*){3,})(?:\n+|$)/,yi=/(?:[*+-]|\d{1,9}[.)])/,_i=ui(/^(?!bull |blockCode|fences|blockquote|heading|html)((?:.|\n(?!\s*?\n|bull |blockCode|fences|blockquote|heading|html))+?)\n {0,3}(=+|-+) *(?:\n+|$)/).replace(/bull/g,yi).replace(/blockCode/g,/(?: {4}| {0,3}\t)/).replace(/fences/g,/ {0,3}(?:`{3,}|~{3,})/).replace(/blockquote/g,/ {0,3}>/).replace(/heading/g,/ {0,3}#{1,6}/).replace(/html/g,/ {0,3}<[^\n>]+>\n/).getRegex(),bi=/^([^\n]+(?:\n(?!hr|heading|lheading|blockquote|fences|list|html|table| +\n)[^\n]+)*)/,wi=/(?!\s*\])(?:\\.|[^\[\]\\])+/,ki=ui(/^ {0,3}\[(label)\]: *(?:\n[ \t]*)?([^<\s][^\s]*|<.*?>)(?:(?: +(?:\n[ \t]*)?| *\n[ \t]*)(title))? *(?:\n+|$)/).replace("label",wi).replace("title",/(?:"(?:\\"?|[^"\\])*"|'[^'\n]*(?:\n[^'\n]+)*\n?'|\([^()]*\))/).getRegex(),xi=ui(/^( {0,3}bull)([ \t][^\n]+?)?(?:\n|$)/).replace(/bull/g,yi).getRegex(),Si="address|article|aside|base|basefont|blockquote|body|caption|center|col|colgroup|dd|details|dialog|dir|div|dl|dt|fieldset|figcaption|figure|footer|form|frame|frameset|h[1-6]|head|header|hr|html|iframe|legend|li|link|main|menu|menuitem|meta|nav|noframes|ol|optgroup|option|p|param|search|section|summary|table|tbody|td|tfoot|th|thead|title|tr|track|ul",Ci=/|$))/,Ei=ui("^ {0,3}(?:<(script|pre|style|textarea)[\\s>][\\s\\S]*?(?:[^\\n]*\\n+|$)|comment[^\\n]*(\\n+|$)|<\\?[\\s\\S]*?(?:\\?>\\n*|$)|\\n*|$)|\\n*|$)|)[\\s\\S]*?(?:(?:\\n[ \t]*)+\\n|$)|<(?!script|pre|style|textarea)([a-z][\\w-]*)(?:attribute)*? */?>(?=[ \\t]*(?:\\n|$))[\\s\\S]*?(?:(?:\\n[ \t]*)+\\n|$)|(?=[ \\t]*(?:\\n|$))[\\s\\S]*?(?:(?:\\n[ \t]*)+\\n|$))","i").replace("comment",Ci).replace("tag",Si).replace("attribute",/ +[a-zA-Z:_][\w.:-]*(?: *= *"[^"\n]*"| *= *'[^'\n]*'| *= *[^\s"'=<>`]+)?/).getRegex(),Ni=ui(bi).replace("hr",gi).replace("heading"," {0,3}#{1,6}(?:\\s|$)").replace("|lheading","").replace("|table","").replace("blockquote"," {0,3}>").replace("fences"," {0,3}(?:`{3,}(?=[^`\\n]*\\n)|~{3,})[^\\n]*\\n").replace("list"," {0,3}(?:[*+-]|1[.)]) ").replace("html",")|<(?:script|pre|style|textarea|!--)").replace("tag",Si).getRegex(),Ai={blockquote:ui(/^( {0,3}> ?(paragraph|[^\n]*)(?:\n|$))+/).replace("paragraph",Ni).getRegex(),code:/^((?: {4}| {0,3}\t)[^\n]+(?:\n(?:[ \t]*(?:\n|$))*)?)+/,def:ki,fences:/^ {0,3}(`{3,}(?=[^`\n]*(?:\n|$))|~{3,})([^\n]*)(?:\n|$)(?:|([\s\S]*?)(?:\n|$))(?: {0,3}\1[~`]* *(?=\n|$)|$)/,heading:/^ {0,3}(#{1,6})(?=\s|$)(.*)(?:\n+|$)/,hr:gi,html:Ei,lheading:_i,list:xi,newline:/^(?:[ \t]*(?:\n|$))+/,paragraph:Ni,table:hi,text:/^[^\n]+/},Mi=ui("^ *([^\\n ].*)\\n {0,3}((?:\\| *)?:?-+:? *(?:\\| *:?-+:? *)*(?:\\| *)?)(?:\\n((?:(?! *\\n|hr|heading|blockquote|code|fences|list|html).*(?:\\n|$))*)\\n*|$)").replace("hr",gi).replace("heading"," {0,3}#{1,6}(?:\\s|$)").replace("blockquote"," {0,3}>").replace("code","(?: {4}| {0,3}\t)[^\\n]").replace("fences"," {0,3}(?:`{3,}(?=[^`\\n]*\\n)|~{3,})[^\\n]*\\n").replace("list"," {0,3}(?:[*+-]|1[.)]) ").replace("html",")|<(?:script|pre|style|textarea|!--)").replace("tag",Si).getRegex(),Ti={...Ai,table:Mi,paragraph:ui(bi).replace("hr",gi).replace("heading"," {0,3}#{1,6}(?:\\s|$)").replace("|lheading","").replace("table",Mi).replace("blockquote"," {0,3}>").replace("fences"," {0,3}(?:`{3,}(?=[^`\\n]*\\n)|~{3,})[^\\n]*\\n").replace("list"," {0,3}(?:[*+-]|1[.)]) ").replace("html",")|<(?:script|pre|style|textarea|!--)").replace("tag",Si).getRegex()},Li={...Ai,html:ui("^ *(?:comment *(?:\\n|\\s*$)|<(tag)[\\s\\S]+? *(?:\\n{2,}|\\s*$)|\\s]*)*?/?> *(?:\\n{2,}|\\s*$))").replace("comment",Ci).replace(/tag/g,"(?!(?:a|em|strong|small|s|cite|q|dfn|abbr|data|time|code|var|samp|kbd|sub|sup|i|b|u|mark|ruby|rt|rp|bdi|bdo|span|br|wbr|ins|del|img)\\b)\\w+(?!:|[^\\w\\s@]*@)\\b").getRegex(),def:/^ *\[([^\]]+)\]: *]+)>?(?: +(["(][^\n]+[")]))? *(?:\n+|$)/,heading:/^(#{1,6})(.*)(?:\n+|$)/,fences:hi,lheading:/^(.+?)\n {0,3}(=+|-+) *(?:\n+|$)/,paragraph:ui(bi).replace("hr",gi).replace("heading"," *#{1,6} *[^\n]").replace("lheading",_i).replace("|table","").replace("blockquote"," {0,3}>").replace("|fences","").replace("|list","").replace("|html","").replace("|tag","").getRegex()},Oi=/^\\([!"#$%&'()*+,\-./:;<=>?@\[\]\\^_`{|}~])/,Pi=/^( {2,}|\\)\n(?!\s*$)/,Ii="\\p{P}\\p{S}",Ri=ui(/^((?![*_])[\spunctuation])/,"u").replace(/punctuation/g,Ii).getRegex(),Di=ui(/^(?:\*+(?:((?!\*)[punct])|[^\s*]))|^_+(?:((?!_)[punct])|([^\s_]))/,"u").replace(/punct/g,Ii).getRegex(),zi=ui("^[^_*]*?__[^_*]*?\\*[^_*]*?(?=__)|[^*]+(?=[^*])|(?!\\*)[punct](\\*+)(?=[\\s]|$)|[^punct\\s](\\*+)(?!\\*)(?=[punct\\s]|$)|(?!\\*)[punct\\s](\\*+)(?=[^punct\\s])|[\\s](\\*+)(?!\\*)(?=[punct])|(?!\\*)[punct](\\*+)(?!\\*)(?=[punct])|[^punct\\s](\\*+)(?=[^punct\\s])","gu").replace(/punct/g,Ii).getRegex(),Fi=ui("^[^_*]*?\\*\\*[^_*]*?_[^_*]*?(?=\\*\\*)|[^_]+(?=[^_])|(?!_)[punct](_+)(?=[\\s]|$)|[^punct\\s](_+)(?!_)(?=[punct\\s]|$)|(?!_)[punct\\s](_+)(?=[^punct\\s])|[\\s](_+)(?!_)(?=[punct])|(?!_)[punct](_+)(?!_)(?=[punct])","gu").replace(/punct/g,Ii).getRegex(),ji=ui(/\\([punct])/,"gu").replace(/punct/g,Ii).getRegex(),Hi=ui(/^<(scheme:[^\s\x00-\x1f<>]*|email)>/).replace("scheme",/[a-zA-Z][a-zA-Z0-9+.-]{1,31}/).replace("email",/[a-zA-Z0-9.!#$%&'*+/=?^_`{|}~-]+(@)[a-zA-Z0-9](?:[a-zA-Z0-9-]{0,61}[a-zA-Z0-9])?(?:\.[a-zA-Z0-9](?:[a-zA-Z0-9-]{0,61}[a-zA-Z0-9])?)+(?![-_])/).getRegex(),$i=ui(Ci).replace("(?:--\x3e|$)","--\x3e").getRegex(),Vi=ui("^comment|^|^<[a-zA-Z][\\w-]*(?:attribute)*?\\s*/?>|^<\\?[\\s\\S]*?\\?>|^|^").replace("comment",$i).replace("attribute",/\s+[a-zA-Z:_][\w.:-]*(?:\s*=\s*"[^"]*"|\s*=\s*'[^']*'|\s*=\s*[^\s"'=<>`]+)?/).getRegex(),Ui=/(?:\[(?:\\.|[^\[\]\\])*\]|\\.|`[^`]*`|[^\[\]\\`])*?/,Bi=ui(/^!?\[(label)\]\(\s*(href)(?:\s+(title))?\s*\)/).replace("label",Ui).replace("href",/<(?:\\.|[^\n<>\\])+>|[^\s\x00-\x1f]*/).replace("title",/"(?:\\"?|[^"\\])*"|'(?:\\'?|[^'\\])*'|\((?:\\\)?|[^)\\])*\)/).getRegex(),qi=ui(/^!?\[(label)\]\[(ref)\]/).replace("label",Ui).replace("ref",wi).getRegex(),Yi=ui(/^!?\[(ref)\](?:\[\])?/).replace("ref",wi).getRegex(),Wi={_backpedal:hi,anyPunctuation:ji,autolink:Hi,blockSkip:/\[[^[\]]*?\]\([^\(\)]*?\)|`[^`]*?`|<[^<>]*?>/g,br:Pi,code:/^(`+)([^`]|[^`][\s\S]*?[^`])\1(?!`)/,del:hi,emStrongLDelim:Di,emStrongRDelimAst:zi,emStrongRDelimUnd:Fi,escape:Oi,link:Bi,nolink:Yi,punctuation:Ri,reflink:qi,reflinkSearch:ui("reflink|nolink(?!\\()","g").replace("reflink",qi).replace("nolink",Yi).getRegex(),tag:Vi,text:/^(`+|[^`])(?:(?= {2,}\n)|[\s\S]*?(?:(?=[\\1&&void 0!==arguments[1]?arguments[1]:[],o=arguments.length>2&&void 0!==arguments[2]&&arguments[2];for(this.options.pedantic&&(e=e.replace(/\t/g," ").replace(/^ +$/gm,""));e;)if(!(this.options.extensions&&this.options.extensions.block&&this.options.extensions.block.some((n=>!!(t=n.call({lexer:this},e,a))&&(e=e.substring(t.raw.length),a.push(t),!0)))))if(t=this.tokenizer.space(e))e=e.substring(t.raw.length),1===t.raw.length&&a.length>0?a[a.length-1].raw+="\n":a.push(t);else if(t=this.tokenizer.code(e))e=e.substring(t.raw.length),n=a[a.length-1],!n||"paragraph"!==n.type&&"text"!==n.type?a.push(t):(n.raw+="\n"+t.raw,n.text+="\n"+t.text,this.inlineQueue[this.inlineQueue.length-1].src=n.text);else if(t=this.tokenizer.fences(e))e=e.substring(t.raw.length),a.push(t);else if(t=this.tokenizer.heading(e))e=e.substring(t.raw.length),a.push(t);else if(t=this.tokenizer.hr(e))e=e.substring(t.raw.length),a.push(t);else if(t=this.tokenizer.blockquote(e))e=e.substring(t.raw.length),a.push(t);else if(t=this.tokenizer.list(e))e=e.substring(t.raw.length),a.push(t);else if(t=this.tokenizer.html(e))e=e.substring(t.raw.length),a.push(t);else if(t=this.tokenizer.def(e))e=e.substring(t.raw.length),n=a[a.length-1],!n||"paragraph"!==n.type&&"text"!==n.type?this.tokens.links[t.tag]||(this.tokens.links[t.tag]={href:t.href,title:t.title}):(n.raw+="\n"+t.raw,n.text+="\n"+t.raw,this.inlineQueue[this.inlineQueue.length-1].src=n.text);else if(t=this.tokenizer.table(e))e=e.substring(t.raw.length),a.push(t);else if(t=this.tokenizer.lheading(e))e=e.substring(t.raw.length),a.push(t);else{if(r=e,this.options.extensions&&this.options.extensions.startBlock){let t=1/0;const n=e.slice(1);let a;this.options.extensions.startBlock.forEach((e=>{a=e.call({lexer:this},n),"number"===typeof a&&a>=0&&(t=Math.min(t,a))})),t<1/0&&t>=0&&(r=e.substring(0,t+1))}var i;if(this.state.top&&(t=this.tokenizer.paragraph(r)))n=a[a.length-1],o&&"paragraph"===(null===(i=n)||void 0===i?void 0:i.type)?(n.raw+="\n"+t.raw,n.text+="\n"+t.text,this.inlineQueue.pop(),this.inlineQueue[this.inlineQueue.length-1].src=n.text):a.push(t),o=r.length!==e.length,e=e.substring(t.raw.length);else if(t=this.tokenizer.text(e))e=e.substring(t.raw.length),n=a[a.length-1],n&&"text"===n.type?(n.raw+="\n"+t.raw,n.text+="\n"+t.text,this.inlineQueue.pop(),this.inlineQueue[this.inlineQueue.length-1].src=n.text):a.push(t);else if(e){const t="Infinite loop on byte: "+e.charCodeAt(0);if(this.options.silent){console.error(t);break}throw new Error(t)}}return this.state.top=!0,a}inline(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:[];return this.inlineQueue.push({src:e,tokens:t}),t}inlineTokens(e){let t,n,r,a,o,i,l=arguments.length>1&&void 0!==arguments[1]?arguments[1]:[],s=e;if(this.tokens.links){const e=Object.keys(this.tokens.links);if(e.length>0)for(;null!=(a=this.tokenizer.rules.inline.reflinkSearch.exec(s));)e.includes(a[0].slice(a[0].lastIndexOf("[")+1,-1))&&(s=s.slice(0,a.index)+"["+"a".repeat(a[0].length-2)+"]"+s.slice(this.tokenizer.rules.inline.reflinkSearch.lastIndex))}for(;null!=(a=this.tokenizer.rules.inline.blockSkip.exec(s));)s=s.slice(0,a.index)+"["+"a".repeat(a[0].length-2)+"]"+s.slice(this.tokenizer.rules.inline.blockSkip.lastIndex);for(;null!=(a=this.tokenizer.rules.inline.anyPunctuation.exec(s));)s=s.slice(0,a.index)+"++"+s.slice(this.tokenizer.rules.inline.anyPunctuation.lastIndex);for(;e;)if(o||(i=""),o=!1,!(this.options.extensions&&this.options.extensions.inline&&this.options.extensions.inline.some((n=>!!(t=n.call({lexer:this},e,l))&&(e=e.substring(t.raw.length),l.push(t),!0)))))if(t=this.tokenizer.escape(e))e=e.substring(t.raw.length),l.push(t);else if(t=this.tokenizer.tag(e))e=e.substring(t.raw.length),n=l[l.length-1],n&&"text"===t.type&&"text"===n.type?(n.raw+=t.raw,n.text+=t.text):l.push(t);else if(t=this.tokenizer.link(e))e=e.substring(t.raw.length),l.push(t);else if(t=this.tokenizer.reflink(e,this.tokens.links))e=e.substring(t.raw.length),n=l[l.length-1],n&&"text"===t.type&&"text"===n.type?(n.raw+=t.raw,n.text+=t.text):l.push(t);else if(t=this.tokenizer.emStrong(e,s,i))e=e.substring(t.raw.length),l.push(t);else if(t=this.tokenizer.codespan(e))e=e.substring(t.raw.length),l.push(t);else if(t=this.tokenizer.br(e))e=e.substring(t.raw.length),l.push(t);else if(t=this.tokenizer.del(e))e=e.substring(t.raw.length),l.push(t);else if(t=this.tokenizer.autolink(e))e=e.substring(t.raw.length),l.push(t);else if(this.state.inLink||!(t=this.tokenizer.url(e))){if(r=e,this.options.extensions&&this.options.extensions.startInline){let t=1/0;const n=e.slice(1);let a;this.options.extensions.startInline.forEach((e=>{a=e.call({lexer:this},n),"number"===typeof a&&a>=0&&(t=Math.min(t,a))})),t<1/0&&t>=0&&(r=e.substring(0,t+1))}if(t=this.tokenizer.inlineText(r))e=e.substring(t.raw.length),"_"!==t.raw.slice(-1)&&(i=t.raw.slice(-1)),o=!0,n=l[l.length-1],n&&"text"===n.type?(n.raw+=t.raw,n.text+=t.text):l.push(t);else if(e){const t="Infinite loop on byte: "+e.charCodeAt(0);if(this.options.silent){console.error(t);break}throw new Error(t)}}else e=e.substring(t.raw.length),l.push(t);return l}}class el{constructor(e){Jo(this,"options",void 0),Jo(this,"parser",void 0),this.options=e||ei}space(e){return""}code(e){var t;let{text:n,lang:r,escaped:a}=e;const o=null===(t=(r||"").match(/^\S*/))||void 0===t?void 0:t[0],i=n.replace(/\n$/,"")+"\n";return o?'
    '+(a?i:si(i,!0))+"
    \n":"
    "+(a?i:si(i,!0))+"
    \n"}blockquote(e){let{tokens:t}=e;const n=this.parser.parse(t);return"
    \n".concat(n,"
    \n")}html(e){let{text:t}=e;return t}heading(e){let{tokens:t,depth:n}=e;return"").concat(this.parser.parseInline(t),"\n")}hr(e){return"
    \n"}list(e){const t=e.ordered,n=e.start;let r="";for(let o=0;o\n"+r+"\n"}listitem(e){let t="";if(e.task){const n=this.checkbox({checked:!!e.checked});e.loose?e.tokens.length>0&&"paragraph"===e.tokens[0].type?(e.tokens[0].text=n+" "+e.tokens[0].text,e.tokens[0].tokens&&e.tokens[0].tokens.length>0&&"text"===e.tokens[0].tokens[0].type&&(e.tokens[0].tokens[0].text=n+" "+e.tokens[0].tokens[0].text)):e.tokens.unshift({type:"text",raw:n+" ",text:n+" "}):t+=n+" "}return t+=this.parser.parse(e.tokens,!!e.loose),"
  • ".concat(t,"
  • \n")}checkbox(e){let{checked:t}=e;return"'}paragraph(e){let{tokens:t}=e;return"

    ".concat(this.parser.parseInline(t),"

    \n")}table(e){let t="",n="";for(let a=0;a")),"\n\n"+t+"\n"+r+"
    \n"}tablerow(e){let{text:t}=e;return"\n".concat(t,"\n")}tablecell(e){const t=this.parser.parseInline(e.tokens),n=e.header?"th":"td";return(e.align?"<".concat(n,' align="').concat(e.align,'">'):"<".concat(n,">"))+t+"\n")}strong(e){let{tokens:t}=e;return"".concat(this.parser.parseInline(t),"")}em(e){let{tokens:t}=e;return"".concat(this.parser.parseInline(t),"")}codespan(e){let{text:t}=e;return"".concat(t,"")}br(e){return"
    "}del(e){let{tokens:t}=e;return"".concat(this.parser.parseInline(t),"")}link(e){let{href:t,title:n,tokens:r}=e;const a=this.parser.parseInline(r),o=di(t);if(null===o)return a;t=o;let i='
    ",i}image(e){let{href:t,title:n,text:r}=e;const a=di(t);if(null===a)return r;t=a;let o='').concat(r,'1&&void 0!==arguments[1])||arguments[1],n="";for(let r=0;r{const a=e[r].flat(1/0);n=n.concat(this.walkTokens(a,t))})):e.tokens&&(n=n.concat(this.walkTokens(e.tokens,t)))}}return n}use(){const e=this.defaults.extensions||{renderers:{},childTokens:{}};for(var t=arguments.length,n=new Array(t),r=0;r{const n={...t};if(n.async=this.defaults.async||n.async||!1,t.extensions&&(t.extensions.forEach((t=>{if(!t.name)throw new Error("extension name required");if("renderer"in t){const n=e.renderers[t.name];e.renderers[t.name]=n?function(){for(var e=arguments.length,r=new Array(e),a=0;a{if(this.defaults.async)return Promise.resolve(a.call(e,t)).then((t=>o.call(e,t)));const n=a.call(e,t);return o.call(e,n)}:e[r]=function(){for(var t=arguments.length,n=new Array(t),r=0;r{const r={...n},a={...this.defaults,...r},o=this.onError(!!a.silent,!!a.async);if(!0===this.defaults.async&&!1===r.async)return o(new Error("marked(): The async option was set to true by an extension. Remove async: false from the parse options object to return a Promise."));if("undefined"===typeof t||null===t)return o(new Error("marked(): input parameter is undefined or null"));if("string"!==typeof t)return o(new Error("marked(): input parameter is of type "+Object.prototype.toString.call(t)+", string expected"));a.hooks&&(a.hooks.options=a,a.hooks.block=e);const i=a.hooks?a.hooks.provideLexer():e?Xi.lex:Xi.lexInline,l=a.hooks?a.hooks.provideParser():e?nl.parse:nl.parseInline;if(a.async)return Promise.resolve(a.hooks?a.hooks.preprocess(t):t).then((e=>i(e,a))).then((e=>a.hooks?a.hooks.processAllTokens(e):e)).then((e=>a.walkTokens?Promise.all(this.walkTokens(e,a.walkTokens)).then((()=>e)):e)).then((e=>l(e,a))).then((e=>a.hooks?a.hooks.postprocess(e):e)).catch(o);try{a.hooks&&(t=a.hooks.preprocess(t));let e=i(t,a);a.hooks&&(e=a.hooks.processAllTokens(e)),a.walkTokens&&this.walkTokens(e,a.walkTokens);let n=l(e,a);return a.hooks&&(n=a.hooks.postprocess(n)),n}catch(Pp){return o(Pp)}}}onError(e,t){return n=>{if(n.message+="\nPlease report this to https://github.com/markedjs/marked.",e){const e="

    An error occurred:

    "+si(n.message+"",!0)+"
    ";return t?Promise.resolve(e):e}if(t)return Promise.reject(n);throw n}}};function ol(e,t){return al.parse(e,t)}ol.options=ol.setOptions=function(e){return al.setOptions(e),ol.defaults=al.defaults,ti(ol.defaults),ol},ol.getDefaults=Xo,ol.defaults=ei,ol.use=function(){return al.use(...arguments),ol.defaults=al.defaults,ti(ol.defaults),ol},ol.walkTokens=function(e,t){return al.walkTokens(e,t)},ol.parseInline=al.parseInline,ol.Parser=nl,ol.parser=nl.parse,ol.Renderer=el,ol.TextRenderer=tl,ol.Lexer=Xi,ol.lexer=Xi.lex,ol.Tokenizer=vi,ol.Hooks=rl,ol.parse=ol;ol.options,ol.setOptions,ol.use,ol.walkTokens,ol.parseInline,nl.parse,Xi.lex;const il=n.p+"static/media/MetricsQL.a00044c91d9781cf8557.md",ll=e=>{const t='$1 target="_blank" class="'.concat("vm-link vm-link_colored",'" $2').concat("https://docs.victoriametrics.com/MetricsQL.html","#");return e.replace(/({var n;const r="h3"===e.tagName.toLowerCase();return t=r?null!==(n=e.textContent)&&void 0!==n?n:"":t,r?null:((e,t)=>{var n;const r=null!==(n=t.textContent)&&void 0!==n?n:"",a=(e=>{const t=[];let n=e.nextElementSibling;for(;n&&"p"===n.tagName.toLowerCase();)n&&t.push(n),n=n.nextElementSibling;return t})(t).map((e=>{var t;return null!==(t=e.outerHTML)&&void 0!==t?t:""})).join("\n");return{type:e,value:r,description:ll(a),icon:Nt(gr,{})}})(t,e)})).filter(Boolean)},cl=()=>{const{metricsQLFunctions:e}=Cn(),t=En();return(0,r.useEffect)((()=>{e.length||(async()=>{try{const e=await fetch(il),n=(e=>{const t=document.createElement("div");t.innerHTML=ol(e);const n=t.querySelectorAll("".concat("h3",", ").concat("h4"));return sl(n)})(await e.text());t({type:"SET_METRICSQL_FUNCTIONS",payload:n})}catch(Pp){console.error("Error fetching or processing the MetricsQL.md file:",Pp)}})()}),[]),e},ul=e=>{let{value:t,anchorEl:n,caretPosition:a,hasHelperText:i,onSelect:l,onFoundOptions:s}=e;const[c,u]=(0,r.useState)({top:0,left:0}),d=cl(),h=(0,r.useMemo)((()=>{if(a[0]!==a[1])return{beforeCursor:t,afterCursor:""};return{beforeCursor:t.substring(0,a[0]),afterCursor:t.substring(a[1])}}),[t,a]),m=(0,r.useMemo)((()=>{const e=h.beforeCursor.split(/\s(or|and|unless|default|ifnot|if|group_left|group_right)\s|}|\+|\|-|\*|\/|\^/i);return e[e.length-1]}),[h]),p=(0,r.useMemo)((()=>{const e=[...m.matchAll(/\w+\((?[^)]+)\)\s+(by|without|on|ignoring)\s*\(\w*/gi)];if(e.length>0&&e[0].groups&&e[0].groups.metricName)return e[0].groups.metricName;const t=[...m.matchAll(/^\s*\b(?[^{}(),\s]+)(?={|$)/g)];return t.length>0&&t[0].groups&&t[0].groups.metricName?t[0].groups.metricName:""}),[m]),f=(0,r.useMemo)((()=>{const e=m.match(/[a-z_:-][\w\-.:/]*\b(?=\s*(=|!=|=~|!~))/g);return e?e[e.length-1]:""}),[m]),v=(0,r.useMemo)((()=>{const e=h.beforeCursor.trim(),t=["}",")"].some((t=>e.endsWith(t))),n=!Wo(e)&&["`","'",'"'].some((t=>e.endsWith(t)));if(!h.beforeCursor||t||n||(e=>{const t=e.split(/\s+/),n=t.length,r=t[n-1],a=t[n-2],o=!r&&Wo(e),i=(!r||t.length>1)&&!/([{(),+\-*/^]|\b(?:or|and|unless|default|ifnot|if|group_left|group_right|by|without|on|ignoring)\b)/i.test(a);return o||i})(h.beforeCursor))return vt.empty;const r=/(?:by|without|on|ignoring)\s*\(\s*[^)]*$|\{[^}]*$/i,a="(".concat(qo(p),")?{?.+").concat(qo(f),'(=|!=|=~|!~)"?([^"]*)$');switch(!0){case new RegExp(a,"g").test(h.beforeCursor):return vt.labelValue;case r.test(h.beforeCursor):return vt.label;default:return vt.metricsql}}),[h,p,f]),g=(0,r.useMemo)((()=>{const e=h.beforeCursor.match(/([\w_.:]+(?![},]))$/);return e?e[0]:""}),[h.beforeCursor]),{metrics:y,labels:_,labelValues:b,loading:w}=(e=>{let{valueByContext:t,metric:n,label:a,context:i}=e;const{serverUrl:l}=Mt(),{period:{start:s,end:c}}=fn(),{autocompleteCache:u}=Cn(),d=En(),[h,m]=(0,r.useState)(!1),[p,f]=(0,r.useState)(t),v=Bo()(f,500);(0,r.useEffect)((()=>(v(t),v.cancel)),[t,v]);const[g,y]=(0,r.useState)([]),[_,b]=(0,r.useState)([]),[w,k]=(0,r.useState)([]),x=(0,r.useRef)(new AbortController),S=(0,r.useCallback)((e=>{const t=o()(1e3*s).startOf("day").valueOf()/1e3,n=o()(1e3*c).endOf("day").valueOf()/1e3;return new URLSearchParams({...e||{},limit:"".concat(_n),start:"".concat(t),end:"".concat(n)})}),[s,c]),C=(e,t)=>e.map((e=>({value:e,type:"".concat(t),icon:Qo[t]}))),E=async e=>{let{value:t,urlSuffix:n,setter:r,type:a,params:o}=e;if(!t&&a===Ko.metric)return;x.current.abort(),x.current=new AbortController;const{signal:i}=x.current,s={type:a,value:t,start:(null===o||void 0===o?void 0:o.get("start"))||"",end:(null===o||void 0===o?void 0:o.get("end"))||"",match:(null===o||void 0===o?void 0:o.get("match[]"))||""};m(!0);try{const e=u.get(s);if(e)return r(C(e,a)),void m(!1);const t=await fetch("".concat(l,"/api/v1/").concat(n,"?").concat(o),{signal:i});if(t.ok){const{data:e}=await t.json();r(C(e,a)),d({type:"SET_AUTOCOMPLETE_CACHE",payload:{key:s,value:e}})}m(!1)}catch(Pp){Pp instanceof Error&&"AbortError"!==Pp.name&&(d({type:"SET_AUTOCOMPLETE_CACHE",payload:{key:s,value:[]}}),m(!1),console.error(Pp))}};return(0,r.useEffect)((()=>{const e=i!==vt.metricsql&&i!==vt.empty;if(!l||!n||e)return;y([]);const t=Yo(qo(n));return E({value:p,urlSuffix:"label/__name__/values",setter:y,type:Ko.metric,params:S({"match[]":'{__name__=~".*'.concat(t,'.*"}')})}),()=>{var e;return null===(e=x.current)||void 0===e?void 0:e.abort()}}),[l,p,i,n]),(0,r.useEffect)((()=>{if(!l||i!==vt.label)return;b([]);const e=Yo(n);return E({value:p,urlSuffix:"labels",setter:b,type:Ko.label,params:S(n?{"match[]":'{__name__="'.concat(e,'"}')}:void 0)}),()=>{var e;return null===(e=x.current)||void 0===e?void 0:e.abort()}}),[l,p,i,n]),(0,r.useEffect)((()=>{if(!l||!a||i!==vt.labelValue)return;k([]);const e=Yo(n),t=Yo(qo(p)),r=[n?'__name__="'.concat(e,'"'):"","".concat(a,'=~".*').concat(t,'.*"')].filter(Boolean).join(",");return E({value:p,urlSuffix:"label/".concat(a,"/values"),setter:k,type:Ko.labelValue,params:S({"match[]":"{".concat(r,"}")})}),()=>{var e;return null===(e=x.current)||void 0===e?void 0:e.abort()}}),[l,p,i,n,a]),{metrics:g,labels:_,labelValues:w,loading:h}})({valueByContext:g,metric:p,label:f,context:v}),k=(0,r.useMemo)((()=>{switch(v){case vt.metricsql:return[...y,...d];case vt.label:return _;case vt.labelValue:return b;default:return[]}}),[v,y,_,b]),x=(0,r.useCallback)((e=>{const t=h.beforeCursor;let n=h.afterCursor;const r=t.lastIndexOf(g,a[0]),o=r+g.length,i=t.substring(0,r),s=t.substring(o);if(v===vt.labelValue){const t='"';n=n.replace(/^[^\s"|},]*/,"");const r=/(?:=|!=|=~|!~)$/.test(i),a='"'!==n.trim()[0];e="".concat(r?t:"").concat(e).concat(a?t:"")}v===vt.label&&(n=n.replace(/^[^\s=!,{}()"|+\-/*^]*/,"")),v===vt.metricsql&&(n=n.replace(/^[^\s[\]{}()"|+\-/*^]*/,""));const c="".concat(i).concat(e).concat(s).concat(n);l(c,i.length+e.length)}),[h]);return(0,r.useEffect)((()=>{if(!n.current)return void u({top:0,left:0});const e=n.current.querySelector("textarea")||n.current,t=window.getComputedStyle(e),r="".concat(t.getPropertyValue("font-size")),a="".concat(t.getPropertyValue("font-family")),o=parseInt("".concat(t.getPropertyValue("line-height"))),l=document.createElement("div");l.style.font="".concat(r," ").concat(a),l.style.padding=t.getPropertyValue("padding"),l.style.lineHeight="".concat(o,"px"),l.style.width="".concat(e.offsetWidth,"px"),l.style.maxWidth="".concat(e.offsetWidth,"px"),l.style.whiteSpace=t.getPropertyValue("white-space"),l.style.overflowWrap=t.getPropertyValue("overflow-wrap");const s=document.createElement("span");l.appendChild(document.createTextNode(h.beforeCursor)),l.appendChild(s),l.appendChild(document.createTextNode(h.afterCursor)),document.body.appendChild(l);const c=l.getBoundingClientRect(),d=s.getBoundingClientRect(),m=d.left-c.left,p=d.bottom-c.bottom-(i?o:0);u({top:p,left:m}),l.remove(),s.remove()}),[n,a,i]),Nt(Ct.FK,{children:Nt(Vo,{loading:w,disabledFullScreen:!0,value:g,options:k,anchor:n,minLength:0,offset:c,onSelect:x,onFoundOptions:s,maxDisplayResults:{limit:yn,message:"Please, specify the query more precisely."}})})},dl="No match! \nThis query hasn't selected any time series from database.\nEither the requested metrics are missing in the database,\nor there is a typo in series selector.",hl="The shown results are marked as PARTIAL.\nThe result is marked as partial if one or more vmstorage nodes failed to respond to the query.",ml=e=>{let{value:t,onChange:n,onEnter:a,onArrowUp:o,onArrowDown:i,autocomplete:l,error:s,stats:c,label:u,disabled:d=!1}=e;const{autocompleteQuick:h}=Cn(),{isMobile:m}=ea(),[p,f]=(0,r.useState)(!1),[v,g]=(0,r.useState)([0,0]),y=(0,r.useRef)(null),[_,b]=(0,r.useState)(l),w=(0,r.useRef)(Bo()(b,500)).current,k=[{show:"0"===(null===c||void 0===c?void 0:c.seriesFetched)&&!c.resultLength,text:dl},{show:null===c||void 0===c?void 0:c.isPartial,text:hl}].filter((e=>e.show)).map((e=>e.text)).join("");c&&(u="".concat(u," (").concat(c.executionTimeMsec||0,"ms)"));return(0,r.useEffect)((()=>{f(l)}),[h]),(0,r.useEffect)((()=>{b(!1),w(!0)}),[v]),Nt("div",{className:"vm-query-editor",ref:y,children:[Nt(Wa,{value:t,label:u,type:"textarea",autofocus:!m,error:s,warning:k,onKeyDown:e=>{const{key:t,ctrlKey:n,metaKey:r,shiftKey:l}=e,s=(e.target.value||"").split("\n").length>1,c=n||r,u="ArrowDown"===t,d="Enter"===t;"ArrowUp"===t&&c&&(e.preventDefault(),o()),u&&c&&(e.preventDefault(),i()),d&&p&&e.preventDefault(),!d||l||s&&!c||p||(e.preventDefault(),a())},onChange:n,onChangeCaret:e=>{g((t=>t[0]===e[0]&&t[1]===e[1]?t:e))},disabled:d,inputmode:"search",caretPosition:v}),_&&l&&Nt(ul,{value:t,anchorEl:y,caretPosition:v,hasHelperText:Boolean(k||s),onSelect:(e,t)=>{n(e),g([t,t])},onFoundOptions:e=>{f(!!e.length)}})]})},pl=e=>{let{isMobile:t,hideButtons:n}=e;const{autocomplete:r}=Cn(),a=En(),{nocache:o,isTracingEnabled:i}=Fr(),l=jr();return Ar("keydown",(e=>{const{code:t,ctrlKey:n,altKey:r}=e;"Space"===t&&(n||r)&&(e.preventDefault(),a({type:"SET_AUTOCOMPLETE_QUICK",payload:!0}))})),Nt("div",{className:Cr()({"vm-additional-settings":!0,"vm-additional-settings_mobile":t}),children:[!(null!==n&&void 0!==n&&n.autocomplete)&&Nt(_a,{title:Nt(Ct.FK,{children:["Quick tip: ",Ea]}),children:Nt(To,{label:"Autocomplete",value:r,onChange:()=>{a({type:"TOGGLE_AUTOCOMPLETE"})},fullWidth:t})}),Nt(To,{label:"Disable cache",value:o,onChange:()=>{l({type:"TOGGLE_NO_CACHE"})},fullWidth:t}),!(null!==n&&void 0!==n&&n.traceQuery)&&Nt(To,{label:"Trace query",value:i,onChange:()=>{l({type:"TOGGLE_QUERY_TRACING"})},fullWidth:t})]})},fl=e=>{const{isMobile:t}=ea(),n=(0,r.useRef)(null),{value:a,toggle:o,setFalse:i}=fa(!1);return t?Nt(Ct.FK,{children:[Nt("div",{ref:n,children:Nt(ma,{variant:"outlined",startIcon:Nt(dr,{}),onClick:o,ariaLabel:"additional the query settings"})}),Nt(pa,{open:a,buttonRef:n,placement:"bottom-left",onClose:i,title:"Query settings",children:Nt(pl,{isMobile:t,...e})})]}):Nt(pl,{...e})},vl=(e,t)=>e.length===t.length&&e.every(((e,n)=>e===t[n]));const gl=()=>{const{showInfoMessage:e}=(0,r.useContext)(ra);return async(t,n)=>{var r;if(null===(r=navigator)||void 0===r||!r.clipboard)return e({text:"Clipboard not supported",type:"error"}),console.warn("Clipboard not supported"),!1;try{return await navigator.clipboard.writeText(t),n&&e({text:n,type:"success"}),!0}catch(a){return a instanceof Error&&e({text:"".concat(a.name,": ").concat(a.message),type:"error"}),console.warn("Copy failed",a),!1}}},yl=e=>{let{query:t,favorites:n,onRun:a,onToggleFavorite:o}=e;const i=gl(),l=(0,r.useMemo)((()=>n.includes(t)),[t,n]);return Nt("div",{className:"vm-query-history-item",children:[Nt("span",{className:"vm-query-history-item__value",children:t}),Nt("div",{className:"vm-query-history-item__buttons",children:[Nt(_a,{title:"Execute query",children:Nt(ma,{size:"small",variant:"text",onClick:()=>{a(t)},startIcon:Nt(Yn,{})})}),Nt(_a,{title:"Copy query",children:Nt(ma,{size:"small",variant:"text",onClick:async()=>{await i(t,"Query has been copied")},startIcon:Nt(rr,{})})}),Nt(_a,{title:l?"Remove Favorite":"Add to Favorites",children:Nt(ma,{size:"small",variant:"text",color:l?"warning":"primary",onClick:()=>{o(t,l)},startIcon:Nt(l?fr:pr,{})})})]})]})},_l="saved",bl="favorite",wl=[{label:"Session history",value:"session"},{label:"Saved history",value:_l},{label:"Favorite queries",value:bl}],kl=e=>{let{handleSelectQuery:t}=e;const{queryHistory:n}=Cn(),{isMobile:a}=ea(),{value:o,setTrue:i,setFalse:l}=fa(!1),[s,c]=(0,r.useState)(wl[0].value),[u,d]=(0,r.useState)(gn("QUERY_HISTORY")),[h,m]=(0,r.useState)(gn("QUERY_FAVORITES")),p=(0,r.useMemo)((()=>n.map((e=>e.values.filter((e=>e)).reverse()))),[n]),f=(0,r.useMemo)((()=>{switch(s){case bl:return h;case _l:return u;default:return p}}),[s,h,u,p]),v=null===f||void 0===f?void 0:f.every((e=>!e.length)),g=(0,r.useMemo)((()=>s===bl?"Favorites queries are empty.\nTo see your favorites, mark a query as a favorite.":"Query history is empty.\nTo see the history, please make a query."),[s]),y=e=>n=>{t(n,e),l()},_=(e,t)=>{m((n=>{const r=n[0]||[];return t?[r.filter((t=>t!==e))]:t||r.includes(e)?n:[[...r,e]]}))};return(0,r.useEffect)((()=>{const e=h[0]||[],t=gn("QUERY_FAVORITES")[0]||[];vl(e,t)||Xe("QUERY_FAVORITES",JSON.stringify(h))}),[h]),Ar("storage",(()=>{d(gn("QUERY_HISTORY")),m(gn("QUERY_FAVORITES"))})),Nt(Ct.FK,{children:[Nt(_a,{title:"Show history",children:Nt(ma,{color:"primary",variant:"text",onClick:i,startIcon:Nt($n,{}),ariaLabel:"Show history"})}),o&&Nt(ya,{title:"Query history",onClose:l,children:Nt("div",{className:Cr()({"vm-query-history":!0,"vm-query-history_mobile":a}),children:[Nt("div",{className:Cr()({"vm-query-history__tabs":!0,"vm-section-header__tabs":!0,"vm-query-history__tabs_mobile":a}),children:Nt(Tr,{activeItem:s,items:wl,onChange:c})}),Nt("div",{className:"vm-query-history-list",children:[v&&Nt("div",{className:"vm-query-history-list__no-data",children:g}),f.map(((e,t)=>Nt("div",{children:[f.length>1&&Nt("div",{className:Cr()({"vm-query-history-list__group-title":!0,"vm-query-history-list__group-title_first":0===t}),children:["Query ",t+1]}),e.map(((e,n)=>Nt(yl,{query:e,favorites:h.flat(),onRun:y(t),onToggleFavorite:_},n)))]},t))),s===_l&&!v&&Nt("div",{className:"vm-query-history-footer",children:Nt(ma,{color:"error",variant:"outlined",size:"small",startIcon:Nt(Zn,{}),onClick:()=>{Xe("QUERY_HISTORY","")},children:"clear history"})})]})]})})]})},xl=e=>{let{containerStyles:t,message:n}=e;const{isDarkTheme:r}=Mt();return Nt("div",{className:Cr()({"vm-spinner":!0,"vm-spinner_dark":r}),style:t,children:[Nt("div",{className:"half-circle-spinner",children:[Nt("div",{className:"circle circle-1"}),Nt("div",{className:"circle circle-2"})]}),n&&Nt("div",{className:"vm-spinner__message",children:n})]})},Sl=()=>{const{serverUrl:e}=Mt(),{isMobile:t}=ea(),{value:n,setTrue:a,setFalse:o}=fa(!1),{query:i}=Cn(),{period:l}=fn(),[s,c]=(0,r.useState)(!1),[u,d]=(0,r.useState)(""),[h,m]=(0,r.useState)(""),[p,f]=(0,r.useState)("");return Nt(Ct.FK,{children:[Nt(ma,{color:"secondary",variant:"outlined",onClick:()=>(a(),f(""),URL.revokeObjectURL(h),d(""),m(""),(async()=>{c(!0);try{const t=encodeURIComponent(i[0]||""),n=encodeURIComponent(l.step||Zt(l.end-l.start,!1)),r="".concat(e,"/api/vmanomaly/config.yaml?query=").concat(t,"&step=").concat(n),a=await fetch(r),o=a.headers.get("Content-Type");if(a.ok)if("application/yaml"==o){const e=await a.blob(),t=await e.text();d(t),m(URL.createObjectURL(e))}else f("Response Content-Type is not YAML, does `Server URL` point to VMAnomaly server?");else{const e=await a.text();f(" ".concat(a.status," ").concat(a.statusText,": ").concat(e))}}catch(p){console.error(p),f(String(p))}c(!1)})()),children:"Open Config"}),n&&Nt(ya,{title:"Download config",onClose:o,children:Nt("div",{className:Cr()({"vm-anomaly-config":!0,"vm-anomaly-config_mobile":t}),children:[s&&Nt(xl,{containerStyles:{position:"relative"},message:"Loading config..."}),!s&&p&&Nt("div",{className:"vm-anomaly-config-error",children:[Nt("div",{className:"vm-anomaly-config-error__icon",children:Nt(Dn,{})}),Nt("h3",{className:"vm-anomaly-config-error__title",children:"Cannot download config"}),Nt("p",{className:"vm-anomaly-config-error__text",children:p})]}),!s&&u&&Nt(Wa,{value:u,label:"config.yaml",type:"textarea",disabled:!0}),Nt("div",{className:"vm-anomaly-config-footer",children:h&&Nt("a",{href:h,download:"config.yaml",children:Nt(ma,{variant:"contained",startIcon:Nt(br,{}),children:"download"})})})]})})]})},Cl=e=>{let{queryErrors:t,setQueryErrors:n,setHideError:a,stats:o,onHideQuery:i,onRunQuery:l,hideButtons:s}=e;const{isMobile:c}=ea(),{query:u,queryHistory:d,autocomplete:h,autocompleteQuick:m}=Cn(),p=En(),f=vn(),[v,g]=(0,r.useState)(u||[]),[y,_]=(0,r.useState)([]),[b,w]=(0,r.useState)(!1),k=Qa(v),x=(()=>{const{serverUrl:e}=Mt();return async t=>{try{const n=encodeURIComponent(t),r="".concat(e,"/prettify-query?query=").concat(n),a=await fetch(r);if(200!=a.status)return{query:t,error:"Error requesting /prettify-query, status: "+a.status};const o=await a.json();return"success"!=o.status?{query:t,error:String(o.msg)}:{query:String(o.query),error:""}}catch(Pp){return console.error(Pp),Pp instanceof Error&&"AbortError"!==Pp.name?{query:t,error:"".concat(Pp.name,": ").concat(Pp.message)}:{query:t,error:String(Pp)}}}})(),S=()=>{p({type:"SET_QUERY_HISTORY",payload:v.map(((e,t)=>{const n=d[t]||{values:[]},r=e===n.values[n.values.length-1],a=!r&&e?[...n.values,e]:n.values;return a.length>25&&a.shift(),{index:n.values.length-Number(r),values:a}}))}),p({type:"SET_QUERY",payload:v}),f({type:"RUN_QUERY"}),l()},C=(e,t)=>{g((n=>n.map(((n,r)=>r===t?e:n))))},E=(e,t)=>()=>{((e,t)=>{const{index:n,values:r}=d[t],a=n+e;a<0||a>=r.length||(C(r[a]||"",t),p({type:"SET_QUERY_HISTORY_BY_INDEX",payload:{value:{values:r,index:a},queryNumber:t}}))})(e,t)},N=e=>t=>{C(t,e),p({type:"SET_AUTOCOMPLETE_QUICK",payload:!1})},A=e=>()=>{var t;t=e,g((e=>e.filter(((e,n)=>n!==t)))),_((t=>t.includes(e)?t.filter((t=>t!==e)):t.map((t=>t>e?t-1:t))))},M=e=>t=>{((e,t)=>{const{ctrlKey:n,metaKey:r}=e;if(n||r){const e=v.map(((e,t)=>t)).filter((e=>e!==t));_((t=>vl(e,t)?[]:e))}else _((e=>e.includes(t)?e.filter((e=>e!==t)):[...e,t]))})(t,e)};return(0,r.useEffect)((()=>{k&&v.length{i&&i(y)}),[y]),(0,r.useEffect)((()=>{b&&(S(),w(!1))}),[v,b]),(0,r.useEffect)((()=>{g(u||[])}),[u]),Nt("div",{className:Cr()({"vm-query-configurator":!0,"vm-block":!0,"vm-block_mobile":c}),children:[Nt("div",{className:"vm-query-configurator-list",children:v.map(((e,r)=>Nt("div",{className:Cr()({"vm-query-configurator-list-row":!0,"vm-query-configurator-list-row_disabled":y.includes(r),"vm-query-configurator-list-row_mobile":c}),children:[Nt(ml,{value:v[r],autocomplete:!(null!==s&&void 0!==s&&s.autocomplete)&&(h||m),error:t[r],stats:o[r],onArrowUp:E(-1,r),onArrowDown:E(1,r),onEnter:S,onChange:N(r),label:"Query ".concat(v.length>1?r+1:""),disabled:y.includes(r)}),i&&Nt(_a,{title:y.includes(r)?"Enable query":"Disable query",children:Nt("div",{className:"vm-query-configurator-list-row__button",children:Nt(ma,{variant:"text",color:"gray",startIcon:y.includes(r)?Nt(tr,{}):Nt(er,{}),onClick:M(r),ariaLabel:"visibility query"})})}),!(null!==s&&void 0!==s&&s.prettify)&&Nt(_a,{title:"Prettify query",children:Nt("div",{className:"vm-query-configurator-list-row__button",children:Nt(ma,{variant:"text",color:"gray",startIcon:Nt(nr,{}),onClick:async()=>await(async e=>{const t=await x(v[e]);a(!1),C(t.query,e),n((n=>(n[e]=t.error,[...n])))})(r),className:"prettify",ariaLabel:"prettify the query"})})}),v.length>1&&Nt(_a,{title:"Remove Query",children:Nt("div",{className:"vm-query-configurator-list-row__button",children:Nt(ma,{variant:"text",color:"error",startIcon:Nt(Zn,{}),onClick:A(r),ariaLabel:"remove query"})})})]},r)))}),Nt("div",{className:"vm-query-configurator-settings",children:[Nt(fl,{hideButtons:s}),Nt("div",{className:"vm-query-configurator-settings__buttons",children:[Nt(kl,{handleSelectQuery:(e,t)=>{C(e,t),w(!0)}}),(null===s||void 0===s?void 0:s.anomalyConfig)&&Nt(Sl,{}),!(null!==s&&void 0!==s&&s.addQuery)&&v.length<10&&Nt(ma,{variant:"outlined",onClick:()=>{g((e=>[...e,""]))},startIcon:Nt(Gn,{}),children:"Add Query"}),Nt(ma,{variant:"contained",onClick:S,startIcon:Nt(qn,{}),children:c?"Execute":"Execute Query"})]})]})]})};let El=0;class Nl{constructor(e,t){this.tracing=void 0,this.query=void 0,this.tracingChildren=void 0,this.originalTracing=void 0,this.id=void 0,this.tracing=e,this.originalTracing=JSON.parse(JSON.stringify(e)),this.query=t,this.id=El++;const n=e.children||[];this.tracingChildren=n.map((e=>new Nl(e,t)))}get queryValue(){return this.query}get idValue(){return this.id}get children(){return this.tracingChildren}get message(){return this.tracing.message}get duration(){return this.tracing.duration_msec}get JSON(){return JSON.stringify(this.tracing,null,2)}get originalJSON(){return JSON.stringify(this.originalTracing,null,2)}setTracing(e){this.tracing=e;const t=e.children||[];this.tracingChildren=t.map((e=>new Nl(e,this.query)))}setQuery(e){this.query=e}resetTracing(){this.tracing=this.originalTracing}}const Al=function(e,t){let n=!(arguments.length>2&&void 0!==arguments[2])||arguments[2];const{__name__:r,...a}=e.metric,o=t||"".concat(n?"[Query ".concat(e.group,"] "):"").concat(r||"");return 0==Object.keys(a).length?o||"value":"".concat(o,"{").concat(Object.entries(a).map((e=>"".concat(e[0],"=").concat(JSON.stringify(e[1])))).join(", "),"}")},Ml=e=>{switch(e){case"NaN":return NaN;case"Inf":case"+Inf":return 1/0;case"-Inf":return-1/0;default:return parseFloat(e)}},Tl=e=>{if(e.length<2)return!1;const t=["le","vmrange"],n=Object.keys(e[0].metric).filter((e=>!t.includes(e))),r=e.every((r=>{const a=Object.keys(r.metric).filter((e=>!t.includes(e)));return n.length===a.length&&a.every((t=>r.metric[t]===e[0].metric[t]))}));return r&&e.every((e=>t.some((t=>t in e.metric))))},Ll=$e.anomaly==={NODE_ENV:"production",PUBLIC_URL:".",WDS_SOCKET_HOST:void 0,WDS_SOCKET_PATH:void 0,WDS_SOCKET_PORT:void 0,FAST_REFRESH:!1}.REACT_APP_TYPE,Ol=e=>{let{predefinedQuery:t,visible:n,display:a,customStep:o,hideQuery:i,showAllSeries:l}=e;const{query:s}=Cn(),{period:c}=fn(),{displayType:u,nocache:d,isTracingEnabled:h,seriesLimits:m}=Fr(),{serverUrl:p}=Mt(),{isHistogram:f}=Ur(),[v,g]=(0,r.useState)(!1),[y,_]=(0,r.useState)(),[b,w]=(0,r.useState)(),[k,x]=(0,r.useState)(),[S,C]=(0,r.useState)(),[E,N]=(0,r.useState)([]),[A,M]=(0,r.useState)([]),[T,L]=(0,r.useState)(),[O,P]=(0,r.useState)([]),[I,R]=(0,r.useState)(!1),D=(0,r.useMemo)((()=>{const{end:e,start:t}=c;return Zt(e-t,f)}),[c,f]),z=(0,r.useCallback)(Bo()((async e=>{let{fetchUrl:t,fetchQueue:n,displayType:r,query:a,stateSeriesLimits:o,showAllSeries:i,hideQuery:l}=e;const s=new AbortController;P([...n,s]);try{const e=r===mt.chart,n=i?1/0:+o[r]||1/0;let c=n;const u=[],d=[];let h=1,m=0,p=!1;for await(const r of t){if(null===l||void 0===l?void 0:l.includes(h-1)){N((e=>[...e,""])),M((e=>[...e,{}])),h++;continue}const t=new URL(r),o=await fetch("".concat(t.origin).concat(t.pathname),{signal:s.signal,method:"POST",body:t.searchParams}),i=await o.json();if(o.ok){if(M((e=>[...e,{...null===i||void 0===i?void 0:i.stats,isPartial:null===i||void 0===i?void 0:i.isPartial,resultLength:i.data.result.length}])),N((e=>[...e,""])),i.trace){const e=new Nl(i.trace,a[h-1]);d.push(e)}p=!Ll&&e&&Tl(i.data.result),c=p?1/0:n;const t=c-u.length;i.data.result.slice(0,t).forEach((e=>{e.group=h,u.push(e)})),m+=i.data.result.length}else{u.push({metric:{},values:[],group:h});const e=i.errorType||pt.unknownType,t=[e,(null===i||void 0===i?void 0:i.error)||(null===i||void 0===i?void 0:i.message)||"see console for more details"].join(",\r\n");N((e=>[...e,"".concat(t)])),console.error("Fetch query error: ".concat(e),i)}h++}const f="Showing ".concat(u.length," series out of ").concat(m," series due to performance reasons. Please narrow down the query, so it returns less series");L(m>c?f:""),e?_(u):w(u),x(d),R((e=>m?p:e))}catch(Pp){const t=Pp;if("AbortError"===t.name)return;const n="Please check your serverURL settings and confirm server availability.";let r="Error executing query: ".concat(t.message,". ").concat(n);"Unexpected end of JSON input"===t.message&&(r+="\nAdditionally, this error can occur if the server response is too large to process. Apply more specific filters to reduce the data volume."),C(r)}g(!1)}),300),[]),F=(0,r.useMemo)((()=>{C(""),N([]),M([]);const e=null!==t&&void 0!==t?t:s,n=(a||u)===mt.chart;if(c)if(p)if(e.every((e=>!e.trim())))N(e.map((()=>pt.validQuery)));else{if(bt(p)){const t={...c};return t.step=o,e.map((e=>n?((e,t,n,r,a)=>"".concat(e,"/api/v1/query_range?query=").concat(encodeURIComponent(t),"&start=").concat(n.start,"&end=").concat(n.end,"&step=").concat(n.step).concat(r?"&nocache=1":"").concat(a?"&trace=1":""))(p,e,t,d,h):((e,t,n,r,a)=>"".concat(e,"/api/v1/query?query=").concat(encodeURIComponent(t),"&time=").concat(n.end,"&step=").concat(n.step).concat(r?"&nocache=1":"").concat(a?"&trace=1":""))(p,e,t,d,h)))}C(pt.validServer)}else C(pt.emptyServer)}),[p,c,u,o,i]),[j,H]=(0,r.useState)([]);return(0,r.useEffect)((()=>{const e=F===j&&!!t;if(!n||null===F||void 0===F||!F.length||e)return;g(!0);z({fetchUrl:F,fetchQueue:O,displayType:a||u,query:null!==t&&void 0!==t?t:s,stateSeriesLimits:m,showAllSeries:l,hideQuery:i}),H(F)}),[F,n,m,l]),(0,r.useEffect)((()=>{const e=O.slice(0,-1);e.length&&(e.map((e=>e.abort())),P(O.filter((e=>!e.signal.aborted))))}),[O]),(0,r.useEffect)((()=>{D===o&&_([])}),[I]),{fetchUrl:F,isLoading:v,graphData:y,liveData:b,error:S,queryErrors:E,setQueryErrors:N,queryStats:A,warning:T,traces:k,isHistogram:I}},Pl=()=>{const{tenantId:e}=Mt(),{displayType:t}=Fr(),{query:n}=Cn(),{duration:a,relativeTime:o,period:{date:i,step:l}}=fn(),{customStep:s}=Ur(),[c,u]=He(),d=Tt(),h=vn(),m=Br(),p=En(),f=jr(),[v,g]=(0,r.useState)(!1),y=(0,r.useCallback)((()=>{if(v)return void g(!1);const r=new URLSearchParams(c);n.forEach(((n,u)=>{var d;const h="g".concat(u);c.get("".concat(h,".expr"))!==n&&n&&r.set("".concat(h,".expr"),n),c.get("".concat(h,".range_input"))!==a&&r.set("".concat(h,".range_input"),a),c.get("".concat(h,".end_input"))!==i&&r.set("".concat(h,".end_input"),i),c.get("".concat(h,".relative_time"))!==o&&r.set("".concat(h,".relative_time"),o||"none");const m=c.get("".concat(h,".step_input"))||l;m&&m!==s&&r.set("".concat(h,".step_input"),s);const p="".concat((null===(d=Lr.find((e=>e.value===t)))||void 0===d?void 0:d.prometheusCode)||0);c.get("".concat(h,".tab"))!==p&&r.set("".concat(h,".tab"),"".concat(p)),c.get("".concat(h,".tenantID"))!==e&&e&&r.set("".concat(h,".tenantID"),e)})),!((e,t)=>{if(Array.from(e.entries()).length!==Array.from(t.entries()).length)return!1;for(const[n,r]of e)if(t.get(n)!==r)return!1;return!0})(r,c)&&r.size&&u(r)}),[e,t,n,a,o,i,l,s]);(0,r.useEffect)((()=>{const e=setTimeout(y,200);return()=>clearTimeout(e)}),[y]),(0,r.useEffect)((()=>{if(!v)return;const r=dn(),u=r.duration!==a,g=r.relativeTime!==o,y="none"===r.relativeTime&&r.period.date!==i;(u||g||y)&&h({type:"SET_TIME_STATE",payload:r});const _=Pr();_!==t&&f({type:"SET_DISPLAY_TYPE",payload:_});const b=c.get("g0.tenantID")||"";b!==e&&d({type:"SET_TENANT_ID",payload:b});const w=dt();vl(w,n)||(p({type:"SET_QUERY",payload:w}),h({type:"RUN_QUERY"}));const k=setTimeout((()=>{const e=c.get("g0.step_input")||l;e&&e!==s&&m({type:"SET_CUSTOM_STEP",payload:e})}),50);return()=>clearTimeout(k)}),[c,v]),Ar("popstate",(()=>{g(!0)}))},Il=e=>{let{text:t,href:n,children:r,colored:a=!0,underlined:o=!1,withIcon:i=!1}=e;return Nt("a",{href:n,className:Cr()({"vm-link":!0,"vm-link_colored":a,"vm-link_underlined":o,"vm-link_with-icon":i}),target:"_blank",rel:"noreferrer",children:t||r})},Rl=Nt(Il,{text:"last_over_time",href:"https://docs.victoriametrics.com/MetricsQL.html#last_over_time",underlined:!0}),Dl=Nt(Il,{text:"instant query",href:"https://docs.victoriametrics.com/keyConcepts.html#instant-query",underlined:!0}),zl=()=>Nt("div",{children:[Nt("p",{children:["This tab shows ",Dl," results for the last 5 minutes ending at the selected time range."]}),Nt("p",{children:["Please wrap the query into ",Rl," if you need results over arbitrary lookbehind interval."]})]}),Fl=e=>{let{value:t}=e;return Nt("div",{className:"vm-line-progress",children:[Nt("div",{className:"vm-line-progress-track",children:Nt("div",{className:"vm-line-progress-track__thumb",style:{width:"".concat(t,"%")}})}),Nt("span",{children:[t.toFixed(2),"%"]})]})},jl=e=>{let{isRoot:t,trace:n,totalMsec:a,isExpandedAll:o}=e;const{isDarkTheme:i}=Mt(),{isMobile:l}=ea(),[s,c]=(0,r.useState)({}),u=(0,r.useRef)(null),[d,h]=(0,r.useState)(!1),[m,p]=(0,r.useState)(!1),f=Yt(n.duration/1e3)||"".concat(n.duration,"ms");(0,r.useEffect)((()=>{if(!u.current)return;const e=u.current,t=u.current.children[0],{height:n}=t.getBoundingClientRect();h(n>e.clientHeight)}),[n]);const v=n.children&&!!n.children.length,g=n.duration/a*100,y=e=>{var t;const n=[e.idValue];return null===e||void 0===e||null===(t=e.children)||void 0===t||t.forEach((e=>{n.push(...y(e))})),n};return(0,r.useEffect)((()=>{if(!o)return void c([]);const e=y(n),t={};e.forEach((e=>{t[e]=!0})),c(t)}),[o]),Nt("div",{className:Cr()({"vm-nested-nav":!0,"vm-nested-nav_root":t,"vm-nested-nav_dark":i,"vm-nested-nav_mobile":l}),children:[Nt("div",{className:Cr()({"vm-nested-nav-header":!0,"vm-nested-nav-header_open":s[n.idValue]}),onClick:(_=n.idValue,()=>{v&&c((e=>({...e,[_]:!e[_]})))}),children:[v&&Nt("div",{className:Cr()({"vm-nested-nav-header__icon":!0,"vm-nested-nav-header__icon_open":s[n.idValue]}),children:Nt(jn,{})}),Nt("div",{className:"vm-nested-nav-header__progress",children:Nt(Fl,{value:g})}),Nt("div",{className:Cr()({"vm-nested-nav-header__message":!0,"vm-nested-nav-header__message_show-full":m}),ref:u,children:[Nt("span",{className:"vm-nested-nav-header__message_duration",children:f}),":\xa0",Nt("span",{children:n.message})]}),Nt("div",{className:"vm-nested-nav-header-bottom",children:(d||m)&&Nt(ma,{variant:"text",size:"small",onClick:e=>{e.stopPropagation(),p((e=>!e))},children:m?"Hide":"Show full query"})})]}),s[n.idValue]&&Nt("div",{className:"vm-nested-nav__childrens",children:v&&n.children.map((e=>Nt(jl,{trace:e,totalMsec:a,isExpandedAll:o},e.duration)))})]});var _},Hl=jl,$l=e=>{let{editable:t=!1,defaultTile:n="JSON",displayTitle:a=!0,defaultJson:o="",resetValue:i="",onClose:l,onUpload:s}=e;const c=gl(),{isMobile:u}=ea(),[d,h]=(0,r.useState)(o),[m,p]=(0,r.useState)(n),[f,v]=(0,r.useState)(""),[g,y]=(0,r.useState)(""),_=(0,r.useMemo)((()=>{try{const e=JSON.parse(d),t=e.trace||e;return t.duration_msec?(new Nl(t,""),""):pt.traceNotFound}catch(Pp){return Pp instanceof Error?Pp.message:"Unknown error"}}),[d]),b=()=>{y(_);m.trim()||v(pt.emptyTitle),_||f||(s(d,m),l())};return Nt("div",{className:Cr()({"vm-json-form":!0,"vm-json-form_one-field":!a,"vm-json-form_one-field_mobile":!a&&u,"vm-json-form_mobile":u}),children:[a&&Nt(Wa,{value:m,label:"Title",error:f,onEnter:b,onChange:e=>{p(e)}}),Nt(Wa,{value:d,label:"JSON",type:"textarea",error:g,autofocus:!0,onChange:e=>{y(""),h(e)},onEnter:b,disabled:!t}),Nt("div",{className:"vm-json-form-footer",children:[Nt("div",{className:"vm-json-form-footer__controls",children:[Nt(ma,{variant:"outlined",startIcon:Nt(rr,{}),onClick:async()=>{await c(d,"Formatted JSON has been copied")},children:"Copy JSON"}),i&&Nt(ma,{variant:"text",startIcon:Nt(Pn,{}),onClick:()=>{h(i)},children:"Reset JSON"})]}),Nt("div",{className:"vm-json-form-footer__controls vm-json-form-footer__controls_right",children:[Nt(ma,{variant:"outlined",color:"error",onClick:l,children:"Cancel"}),Nt(ma,{variant:"contained",onClick:b,children:"apply"})]})]})]})},Vl=e=>{let{traces:t,jsonEditor:n=!1,onDeleteClick:a}=e;const{isMobile:o}=ea(),[i,l]=(0,r.useState)(null),[s,c]=(0,r.useState)([]),u=()=>{l(null)};if(!t.length)return Nt(na,{variant:"info",children:"Please re-run the query to see results of the tracing"});const d=e=>()=>{a(e)},h=e=>()=>{l(e)},m=e=>()=>{const t=new Blob([e.originalJSON],{type:"application/json"}),n=URL.createObjectURL(t),r=document.createElement("a");r.href=n,r.download="vmui_trace_".concat(e.queryValue,".json"),document.body.appendChild(r),r.click(),document.body.removeChild(r),URL.revokeObjectURL(n)};return Nt(Ct.FK,{children:[Nt("div",{className:"vm-tracings-view",children:t.map((e=>{return Nt("div",{className:"vm-tracings-view-trace vm-block vm-block_empty-padding",children:[Nt("div",{className:"vm-tracings-view-trace-header",children:[Nt("h3",{className:"vm-tracings-view-trace-header-title",children:["Trace for ",Nt("b",{className:"vm-tracings-view-trace-header-title__query",children:e.queryValue})]}),Nt(_a,{title:s.includes(e.idValue)?"Collapse All":"Expand All",children:Nt(ma,{variant:"text",startIcon:s.includes(e.idValue)?Nt(kr,{}):Nt(wr,{}),onClick:(t=e,()=>{c((e=>e.includes(t.idValue)?e.filter((e=>e!==t.idValue)):[...e,t.idValue]))}),ariaLabel:s.includes(e.idValue)?"Collapse All":"Expand All"})}),Nt(_a,{title:"Save Trace to JSON",children:Nt(ma,{variant:"text",startIcon:Nt(br,{}),onClick:m(e),ariaLabel:"Save trace to JSON"})}),Nt(_a,{title:"Open JSON",children:Nt(ma,{variant:"text",startIcon:Nt(Qn,{}),onClick:h(e),ariaLabel:"open JSON"})}),Nt(_a,{title:"Remove trace",children:Nt(ma,{variant:"text",color:"error",startIcon:Nt(Zn,{}),onClick:d(e),ariaLabel:"remove trace"})})]}),Nt("nav",{className:Cr()({"vm-tracings-view-trace__nav":!0,"vm-tracings-view-trace__nav_mobile":o}),children:Nt(Hl,{isRoot:!0,trace:e,totalMsec:e.duration,isExpandedAll:s.includes(e.idValue)})})]},e.idValue);var t}))}),i&&Nt(ya,{title:i.queryValue,onClose:u,children:Nt($l,{editable:n,displayTitle:n,defaultTile:i.queryValue,defaultJson:i.JSON,resetValue:i.originalJSON,onClose:u,onUpload:(e,t)=>{if(n&&i)try{i.setTracing(JSON.parse(e)),i.setQuery(t),l(null)}catch(Pp){console.error(Pp)}}})})]})},Ul=e=>{let{traces:t,displayType:n}=e;const{isTracingEnabled:a}=Fr(),[o,i]=(0,r.useState)([]);return(0,r.useEffect)((()=>{t&&i([...o,...t])}),[t]),(0,r.useEffect)((()=>{i([])}),[n]),Nt(Ct.FK,{children:a&&Nt("div",{className:"vm-custom-panel__trace",children:Nt(Vl,{traces:o,onDeleteClick:e=>{const t=o.filter((t=>t.idValue!==e.idValue));i([...t])}})})})},Bl=e=>{let{warning:t,query:n,onChange:a}=e;const{isMobile:o}=ea(),{value:i,setTrue:l,setFalse:s}=fa(!1);return(0,r.useEffect)(s,[n]),(0,r.useEffect)((()=>{a(i)}),[i]),Nt(na,{variant:"warning",children:Nt("div",{className:Cr()({"vm-custom-panel__warning":!0,"vm-custom-panel__warning_mobile":o}),children:[Nt("p",{children:t}),Nt(ma,{color:"warning",variant:"outlined",onClick:l,children:"Show all"})]})})},ql="u-off",Yl="u-label",Wl="width",Kl="height",Ql="top",Zl="bottom",Gl="left",Jl="right",Xl="#000",es=Xl+"0",ts="mousemove",ns="mousedown",rs="mouseup",as="mouseenter",os="mouseleave",is="dblclick",ls="change",ss="dppxchange",cs="--",us="undefined"!=typeof window,ds=us?document:null,hs=us?window:null,ms=us?navigator:null;let ps,fs;function vs(e,t){if(null!=t){let n=e.classList;!n.contains(t)&&n.add(t)}}function gs(e,t){let n=e.classList;n.contains(t)&&n.remove(t)}function ys(e,t,n){e.style[t]=n+"px"}function _s(e,t,n,r){let a=ds.createElement(e);return null!=t&&vs(a,t),null!=n&&n.insertBefore(a,r),a}function bs(e,t){return _s("div",e,t)}const ws=new WeakMap;function ks(e,t,n,r,a){let o="translate("+t+"px,"+n+"px)";o!=ws.get(e)&&(e.style.transform=o,ws.set(e,o),t<0||n<0||t>r||n>a?vs(e,ql):gs(e,ql))}const xs=new WeakMap;function Ss(e,t,n){let r=t+n;r!=xs.get(e)&&(xs.set(e,r),e.style.background=t,e.style.borderColor=n)}const Cs=new WeakMap;function Es(e,t,n,r){let a=t+""+n;a!=Cs.get(e)&&(Cs.set(e,a),e.style.height=n+"px",e.style.width=t+"px",e.style.marginLeft=r?-t/2+"px":0,e.style.marginTop=r?-n/2+"px":0)}const Ns={passive:!0},As={...Ns,capture:!0};function Ms(e,t,n,r){t.addEventListener(e,n,r?As:Ns)}function Ts(e,t,n,r){t.removeEventListener(e,n,r?As:Ns)}function Ls(e,t,n,r){let a;n=n||0;let o=(r=r||t.length-1)<=2147483647;for(;r-n>1;)a=o?n+r>>1:Ws((n+r)/2),t[a]=t&&a<=n;a+=r)if(null!=e[a])return a;return-1}function Ps(e,t,n,r){let a=Xs(e),o=Xs(t);e==t&&(-1==a?(e*=n,t/=n):(e/=n,t*=n));let i=10==n?ec:tc,l=1==o?Qs:Ws,s=(1==a?Ws:Qs)(i(Ys(e))),c=l(i(Ys(t))),u=Js(n,s),d=Js(n,c);return 10==n&&(s<0&&(u=vc(u,-s)),c<0&&(d=vc(d,-c))),r||2==n?(e=u*a,t=d*o):(e=fc(e,u),t=pc(t,d)),[e,t]}function Is(e,t,n,r){let a=Ps(e,t,n,r);return 0==e&&(a[0]=0),0==t&&(a[1]=0),a}us&&function e(){let t=devicePixelRatio;ps!=t&&(ps=t,fs&&Ts(ls,fs,e),fs=matchMedia("(min-resolution: ".concat(ps-.001,"dppx) and (max-resolution: ").concat(ps+.001,"dppx)")),Ms(ls,fs,e),hs.dispatchEvent(new CustomEvent(ss)))}();const Rs=.1,Ds={mode:3,pad:Rs},zs={pad:0,soft:null,mode:0},Fs={min:zs,max:zs};function js(e,t,n,r){return Ec(n)?$s(e,t,n):(zs.pad=n,zs.soft=r?0:null,zs.mode=r?3:0,$s(e,t,Fs))}function Hs(e,t){return null==e?t:e}function $s(e,t,n){let r=n.min,a=n.max,o=Hs(r.pad,0),i=Hs(a.pad,0),l=Hs(r.hard,-rc),s=Hs(a.hard,rc),c=Hs(r.soft,rc),u=Hs(a.soft,-rc),d=Hs(r.mode,0),h=Hs(a.mode,0),m=t-e,p=ec(m),f=Gs(Ys(e),Ys(t)),v=ec(f),g=Ys(v-p);(m<1e-9||g>10)&&(m=0,0!=e&&0!=t||(m=1e-9,2==d&&c!=rc&&(o=0),2==h&&u!=-rc&&(i=0)));let y=m||f||1e3,_=ec(y),b=Js(10,Ws(_)),w=vc(fc(e-y*(0==m?0==e?.1:1:o),b/10),9),k=e>=c&&(1==d||3==d&&w<=c||2==d&&w>=c)?c:rc,x=Gs(l,w=k?k:Zs(k,w)),S=vc(pc(t+y*(0==m?0==t?.1:1:i),b/10),9),C=t<=u&&(1==h||3==h&&S>=u||2==h&&S<=u)?u:-rc,E=Zs(s,S>C&&t<=C?C:Gs(C,S));return x==E&&0==x&&(E=100),[x,E]}const Vs=new Intl.NumberFormat(us?ms.language:"en-US"),Us=e=>Vs.format(e),Bs=Math,qs=Bs.PI,Ys=Bs.abs,Ws=Bs.floor,Ks=Bs.round,Qs=Bs.ceil,Zs=Bs.min,Gs=Bs.max,Js=Bs.pow,Xs=Bs.sign,ec=Bs.log10,tc=Bs.log2,nc=function(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:1;return Bs.asinh(e/t)},rc=1/0;function ac(e){return 1+(0|ec((e^e>>31)-(e>>31)))}function oc(e,t,n){return Zs(Gs(e,t),n)}function ic(e){return"function"==typeof e?e:()=>e}const lc=e=>e,sc=(e,t)=>t,cc=e=>null,uc=e=>!0,dc=(e,t)=>e==t,hc=e=>vc(e,14);function mc(e,t){return hc(vc(hc(e/t))*t)}function pc(e,t){return hc(Qs(hc(e/t))*t)}function fc(e,t){return hc(Ws(hc(e/t))*t)}function vc(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:0;if(Sc(e))return e;let n=10**t,r=e*n*(1+Number.EPSILON);return Ks(r)/n}const gc=new Map;function yc(e){return((""+e).split(".")[1]||"").length}function _c(e,t,n,r){let a=[],o=r.map(yc);for(let i=t;i=0&&i>=0?0:t)+(i>=o[e]?0:o[e]),c=vc(l,s);a.push(c),gc.set(c,s)}}return a}const bc={},wc=[],kc=[null,null],xc=Array.isArray,Sc=Number.isInteger;function Cc(e){return"string"==typeof e}function Ec(e){let t=!1;if(null!=e){let n=e.constructor;t=null==n||n==Object}return t}function Nc(e){return null!=e&&"object"==typeof e}const Ac=Object.getPrototypeOf(Uint8Array);function Mc(e){let t,n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:Ec;if(xc(e)){let r=e.find((e=>null!=e));if(xc(r)||n(r)){t=Array(e.length);for(let r=0;ro){for(r=i-1;r>=0&&null==e[r];)e[r--]=null;for(r=i+1;rPromise.resolve().then(e):queueMicrotask;const Pc=["January","February","March","April","May","June","July","August","September","October","November","December"],Ic=["Sunday","Monday","Tuesday","Wednesday","Thursday","Friday","Saturday"];function Rc(e){return e.slice(0,3)}const Dc=Ic.map(Rc),zc=Pc.map(Rc),Fc={MMMM:Pc,MMM:zc,WWWW:Ic,WWW:Dc};function jc(e){return(e<10?"0":"")+e}const Hc={YYYY:e=>e.getFullYear(),YY:e=>(e.getFullYear()+"").slice(2),MMMM:(e,t)=>t.MMMM[e.getMonth()],MMM:(e,t)=>t.MMM[e.getMonth()],MM:e=>jc(e.getMonth()+1),M:e=>e.getMonth()+1,DD:e=>jc(e.getDate()),D:e=>e.getDate(),WWWW:(e,t)=>t.WWWW[e.getDay()],WWW:(e,t)=>t.WWW[e.getDay()],HH:e=>jc(e.getHours()),H:e=>e.getHours(),h:e=>{let t=e.getHours();return 0==t?12:t>12?t-12:t},AA:e=>e.getHours()>=12?"PM":"AM",aa:e=>e.getHours()>=12?"pm":"am",a:e=>e.getHours()>=12?"p":"a",mm:e=>jc(e.getMinutes()),m:e=>e.getMinutes(),ss:e=>jc(e.getSeconds()),s:e=>e.getSeconds(),fff:e=>{return((t=e.getMilliseconds())<10?"00":t<100?"0":"")+t;var t}};function $c(e,t){t=t||Fc;let n,r=[],a=/\{([a-z]+)\}|[^{]+/gi;for(;n=a.exec(e);)r.push("{"==n[0][0]?Hc[n[1]]:n[0]);return e=>{let n="";for(let a=0;ae%1==0,Bc=[1,2,2.5,5],qc=_c(10,-16,0,Bc),Yc=_c(10,0,16,Bc),Wc=Yc.filter(Uc),Kc=qc.concat(Yc),Qc="{YYYY}",Zc="\n"+Qc,Gc="{M}/{D}",Jc="\n"+Gc,Xc=Jc+"/{YY}",eu="{aa}",tu="{h}:{mm}"+eu,nu="\n"+tu,ru=":{ss}",au=null;function ou(e){let t=1e3*e,n=60*t,r=60*n,a=24*r,o=30*a,i=365*a;return[(1==e?_c(10,0,3,Bc).filter(Uc):_c(10,-3,0,Bc)).concat([t,5*t,10*t,15*t,30*t,n,5*n,10*n,15*n,30*n,r,2*r,3*r,4*r,6*r,8*r,12*r,a,2*a,3*a,4*a,5*a,6*a,7*a,8*a,9*a,10*a,15*a,o,2*o,3*o,4*o,6*o,i,2*i,5*i,10*i,25*i,50*i,100*i]),[[i,Qc,au,au,au,au,au,au,1],[28*a,"{MMM}",Zc,au,au,au,au,au,1],[a,Gc,Zc,au,au,au,au,au,1],[r,"{h}"+eu,Xc,au,Jc,au,au,au,1],[n,tu,Xc,au,Jc,au,au,au,1],[t,ru,Xc+" "+tu,au,Jc+" "+tu,au,nu,au,1],[e,ru+".{fff}",Xc+" "+tu,au,Jc+" "+tu,au,nu,au,1]],function(t){return(l,s,c,u,d,h)=>{let m=[],p=d>=i,f=d>=o&&d=a?a:d,i=_+(Ws(c)-Ws(g))+pc(g-_,o);m.push(i);let p=t(i),f=p.getHours()+p.getMinutes()/n+p.getSeconds()/r,v=d/r,y=h/l.axes[s]._space;for(;i=vc(i+d,1==e?0:3),!(i>u);)if(v>1){let e=Ws(vc(f+v,6))%24,n=t(i).getHours()-e;n>1&&(n=-1),i-=n*r,f=(f+v)%24,vc((i-m[m.length-1])/d,3)*y>=.7&&m.push(i)}else m.push(i)}return m}}]}const[iu,lu,su]=ou(1),[cu,uu,du]=ou(.001);function hu(e,t){return e.map((e=>e.map(((n,r)=>0==r||8==r||null==n?n:t(1==r||0==e[8]?n:e[1]+n)))))}function mu(e,t){return(n,r,a,o,i)=>{let l,s,c,u,d,h,m=t.find((e=>i>=e[0]))||t[t.length-1];return r.map((t=>{let n=e(t),r=n.getFullYear(),a=n.getMonth(),o=n.getDate(),i=n.getHours(),p=n.getMinutes(),f=n.getSeconds(),v=r!=l&&m[2]||a!=s&&m[3]||o!=c&&m[4]||i!=u&&m[5]||p!=d&&m[6]||f!=h&&m[7]||m[1];return l=r,s=a,c=o,u=i,d=p,h=f,v(n)}))}}function pu(e,t,n){return new Date(e,t,n)}function fu(e,t){return t(e)}_c(2,-53,53,[1]);function vu(e,t){return(n,r,a,o)=>null==o?cs:t(e(r))}const gu={show:!0,live:!0,isolate:!1,mount:()=>{},markers:{show:!0,width:2,stroke:function(e,t){let n=e.series[t];return n.width?n.stroke(e,t):n.points.width?n.points.stroke(e,t):null},fill:function(e,t){return e.series[t].fill(e,t)},dash:"solid"},idx:null,idxs:null,values:[]};const yu=[0,0];function _u(e,t,n){let r=!(arguments.length>3&&void 0!==arguments[3])||arguments[3];return e=>{0==e.button&&(!r||e.target==t)&&n(e)}}function bu(e,t,n){let r=!(arguments.length>3&&void 0!==arguments[3])||arguments[3];return e=>{(!r||e.target==t)&&n(e)}}const wu={show:!0,x:!0,y:!0,lock:!1,move:function(e,t,n){return yu[0]=t,yu[1]=n,yu},points:{show:function(e,t){let n=e.cursor.points,r=bs(),a=n.size(e,t);ys(r,Wl,a),ys(r,Kl,a);let o=a/-2;ys(r,"marginLeft",o),ys(r,"marginTop",o);let i=n.width(e,t,a);return i&&ys(r,"borderWidth",i),r},size:function(e,t){return e.series[t].points.size},width:0,stroke:function(e,t){let n=e.series[t].points;return n._stroke||n._fill},fill:function(e,t){let n=e.series[t].points;return n._fill||n._stroke}},bind:{mousedown:_u,mouseup:_u,click:_u,dblclick:_u,mousemove:bu,mouseleave:bu,mouseenter:bu},drag:{setScale:!0,x:!0,y:!1,dist:0,uni:null,click:(e,t)=>{t.stopPropagation(),t.stopImmediatePropagation()},_x:!1,_y:!1},focus:{dist:(e,t,n,r,a)=>r-a,prox:-1,bias:0},hover:{skip:[void 0],prox:null,bias:0},left:-10,top:-10,idx:null,dataIdx:null,idxs:null,event:null},ku={show:!0,stroke:"rgba(0,0,0,0.07)",width:2},xu=Tc({},ku,{filter:sc}),Su=Tc({},xu,{size:10}),Cu=Tc({},ku,{show:!1}),Eu='12px system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, "Noto Sans", sans-serif, "Apple Color Emoji", "Segoe UI Emoji", "Segoe UI Symbol", "Noto Color Emoji"',Nu="bold "+Eu,Au={show:!0,scale:"x",stroke:Xl,space:50,gap:5,size:50,labelGap:0,labelSize:30,labelFont:Nu,side:2,grid:xu,ticks:Su,border:Cu,font:Eu,lineGap:1.5,rotate:0},Mu={show:!0,scale:"x",auto:!1,sorted:1,min:rc,max:-rc,idxs:[]};function Tu(e,t,n,r,a){return t.map((e=>null==e?"":Us(e)))}function Lu(e,t,n,r,a,o,i){let l=[],s=gc.get(a)||0;for(let c=n=i?n:vc(pc(n,a),s);c<=r;c=vc(c+a,s))l.push(Object.is(c,-0)?0:c);return l}function Ou(e,t,n,r,a,o,i){const l=[],s=e.scales[e.axes[t].scale].log,c=Ws((10==s?ec:tc)(n));a=Js(s,c),10==s&&c<0&&(a=vc(a,-c));let u=n;do{l.push(u),u+=a,10==s&&(u=vc(u,gc.get(a))),u>=a*s&&(a=u)}while(u<=r);return l}function Pu(e,t,n,r,a,o,i){let l=e.scales[e.axes[t].scale].asinh,s=r>l?Ou(e,t,Gs(l,n),r,a):[l],c=r>=0&&n<=0?[0]:[];return(n<-l?Ou(e,t,Gs(l,-r),-n,a):[l]).reverse().map((e=>-e)).concat(c,s)}const Iu=/./,Ru=/[12357]/,Du=/[125]/,zu=/1/,Fu=(e,t,n,r)=>e.map(((e,a)=>4==t&&0==e||a%r==0&&n.test(e.toExponential()[e<0?1:0])?e:null));function ju(e,t,n,r,a){let o=e.axes[n],i=o.scale,l=e.scales[i],s=e.valToPos,c=o._space,u=s(10,i),d=s(9,i)-u>=c?Iu:s(7,i)-u>=c?Ru:s(5,i)-u>=c?Du:zu;if(d==zu){let e=Ys(s(1,i)-u);if(ea,qu={show:!0,auto:!0,sorted:0,gaps:Bu,alpha:1,facets:[Tc({},Uu,{scale:"x"}),Tc({},Uu,{scale:"y"})]},Yu={scale:"y",auto:!0,sorted:0,show:!0,spanGaps:!1,gaps:Bu,alpha:1,points:{show:function(e,t){let{scale:n,idxs:r}=e.series[0],a=e._data[0],o=e.valToPos(a[r[0]],n,!0),i=e.valToPos(a[r[1]],n,!0),l=Ys(i-o)/(e.series[t].points.space*ps);return r[1]-r[0]<=l},filter:null},values:null,min:rc,max:-rc,idxs:[],path:null,clip:null};function Wu(e,t,n,r,a){return n/10}const Ku={time:!0,auto:!0,distr:1,log:10,asinh:1,min:null,max:null,dir:1,ori:0},Qu=Tc({},Ku,{time:!1,ori:1}),Zu={};function Gu(e,t){let n=Zu[e];return n||(n={key:e,plots:[],sub(e){n.plots.push(e)},unsub(e){n.plots=n.plots.filter((t=>t!=e))},pub(e,t,r,a,o,i,l){for(let s=0;s{let f=e.pxRound;const v=l.dir*(0==l.ori?1:-1),g=0==l.ori?cd:ud;let y,_;1==v?(y=n,_=r):(y=r,_=n);let b=f(c(t[y],l,m,d)),w=f(u(i[y],s,p,h)),k=f(c(t[_],l,m,d)),x=f(u(1==o?s.max:s.min,s,p,h)),S=new Path2D(a);return g(S,k,x),g(S,b,x),g(S,b,w),S}))}function rd(e,t,n,r,a,o){let i=null;if(e.length>0){i=new Path2D;const l=0==t?dd:hd;let s=n;for(let t=0;tn[0]){let e=n[0]-s;e>0&&l(i,s,r,e,r+o),s=n[1]}}let c=n+a-s,u=10;c>0&&l(i,s,r-u/2,c,r+o+u)}return i}function ad(e,t,n,r,a,o,i){let l=[],s=e.length;for(let c=1==a?n:r;c>=n&&c<=r;c+=a){if(null===t[c]){let u=c,d=c;if(1==a)for(;++c<=r&&null===t[c];)d=c;else for(;--c>=n&&null===t[c];)d=c;let h=o(e[u]),m=d==u?h:o(e[d]),p=u-a;h=i<=0&&p>=0&&p=0&&f>=0&&f=h&&l.push([h,m])}}return l}function od(e){return 0==e?lc:1==e?Ks:t=>mc(t,e)}function id(e){let t=0==e?ld:sd,n=0==e?(e,t,n,r,a,o)=>{e.arcTo(t,n,r,a,o)}:(e,t,n,r,a,o)=>{e.arcTo(n,t,a,r,o)},r=0==e?(e,t,n,r,a)=>{e.rect(t,n,r,a)}:(e,t,n,r,a)=>{e.rect(n,t,a,r)};return function(e,a,o,i,l){let s=arguments.length>5&&void 0!==arguments[5]?arguments[5]:0,c=arguments.length>6&&void 0!==arguments[6]?arguments[6]:0;0==s&&0==c?r(e,a,o,i,l):(s=Zs(s,i/2,l/2),c=Zs(c,i/2,l/2),t(e,a+s,o),n(e,a+i,o,a+i,o+l,s),n(e,a+i,o+l,a,o+l,c),n(e,a,o+l,a,o,c),n(e,a,o,a+i,o,s),e.closePath())}}const ld=(e,t,n)=>{e.moveTo(t,n)},sd=(e,t,n)=>{e.moveTo(n,t)},cd=(e,t,n)=>{e.lineTo(t,n)},ud=(e,t,n)=>{e.lineTo(n,t)},dd=id(0),hd=id(1),md=(e,t,n,r,a,o)=>{e.arc(t,n,r,a,o)},pd=(e,t,n,r,a,o)=>{e.arc(n,t,r,a,o)},fd=(e,t,n,r,a,o,i)=>{e.bezierCurveTo(t,n,r,a,o,i)},vd=(e,t,n,r,a,o,i)=>{e.bezierCurveTo(n,t,a,r,i,o)};function gd(e){return(e,t,n,r,a)=>Xu(e,t,((t,o,i,l,s,c,u,d,h,m,p)=>{let f,v,{pxRound:g,points:y}=t;0==l.ori?(f=ld,v=md):(f=sd,v=pd);const _=vc(y.width*ps,3);let b=(y.size-y.width)/2*ps,w=vc(2*b,3),k=new Path2D,x=new Path2D,{left:S,top:C,width:E,height:N}=e.bbox;dd(x,S-w,C-w,E+2*w,N+2*w);const A=e=>{if(null!=i[e]){let t=g(c(o[e],l,m,d)),n=g(u(i[e],s,p,h));f(k,t+b,n),v(k,t,n,b,0,2*qs)}};if(a)a.forEach(A);else for(let e=n;e<=r;e++)A(e);return{stroke:_>0?k:null,fill:k,clip:x,flags:2|Ju}}))}function yd(e){return(t,n,r,a,o,i)=>{r!=a&&(o!=r&&i!=r&&e(t,n,r),o!=a&&i!=a&&e(t,n,a),e(t,n,i))}}const _d=yd(cd),bd=yd(ud);function wd(e){const t=Hs(null===e||void 0===e?void 0:e.alignGaps,0);return(e,n,r,a)=>Xu(e,n,((o,i,l,s,c,u,d,h,m,p,f)=>{let v,g,y=o.pxRound,_=e=>y(u(e,s,p,h)),b=e=>y(d(e,c,f,m));0==s.ori?(v=cd,g=_d):(v=ud,g=bd);const w=s.dir*(0==s.ori?1:-1),k={stroke:new Path2D,fill:null,clip:null,band:null,gaps:null,flags:Ju},x=k.stroke;let S,C,E,N=rc,A=-rc,M=_(i[1==w?r:a]),T=Os(l,r,a,1*w),L=Os(l,r,a,-1*w),O=_(i[T]),P=_(i[L]),I=!1;for(let e=1==w?r:a;e>=r&&e<=a;e+=w){let t=_(i[e]),n=l[e];t==M?null!=n?(C=b(n),N==rc&&(v(x,t,C),S=C),N=Zs(C,N),A=Gs(C,A)):null===n&&(I=!0):(N!=rc&&(g(x,M,N,A,S,C),E=M),null!=n?(C=b(n),v(x,t,C),N=A=S=C):(N=rc,A=-rc,null===n&&(I=!0)),M=t)}N!=rc&&N!=A&&E!=M&&g(x,M,N,A,S,C);let[R,D]=ed(e,n);if(null!=o.fill||0!=R){let t=k.fill=new Path2D(x),r=b(o.fillTo(e,n,o.min,o.max,R));v(t,P,r),v(t,O,r)}if(!o.spanGaps){let c=[];I&&c.push(...ad(i,l,r,a,w,_,t)),k.gaps=c=o.gaps(e,n,r,a,c),k.clip=rd(c,s.ori,h,m,p,f)}return 0!=D&&(k.band=2==D?[nd(e,n,r,a,x,-1),nd(e,n,r,a,x,1)]:nd(e,n,r,a,x,D)),k}))}function kd(e,t,n,r,a,o){let i=arguments.length>6&&void 0!==arguments[6]?arguments[6]:rc;if(e.length>1){let l=null;for(let s=0,c=1/0;s0!==r[e]>0?n[e]=0:(n[e]=3*(s[e-1]+s[e])/((2*s[e]+s[e-1])/r[e-1]+(s[e]+2*s[e-1])/r[e]),isFinite(n[e])||(n[e]=0));n[i-1]=r[i-2];for(let c=0;c{Hd.pxRatio=ps})));const Ed=wd(),Nd=gd();function Ad(e,t,n,r){return(r?[e[0],e[1]].concat(e.slice(2)):[e[0]].concat(e.slice(1))).map(((e,r)=>Md(e,r,t,n)))}function Md(e,t,n,r){return Tc({},0==t?n:r,e)}function Td(e,t,n){return null==t?kc:[t,n]}const Ld=Td;function Od(e,t,n){return null==t?kc:js(t,n,Rs,!0)}function Pd(e,t,n,r){return null==t?kc:Ps(t,n,e.scales[r].log,!1)}const Id=Pd;function Rd(e,t,n,r){return null==t?kc:Is(t,n,e.scales[r].log,!1)}const Dd=Rd;function zd(e,t,n,r,a){let o=Gs(ac(e),ac(t)),i=t-e,l=Ls(a/r*i,n);do{let e=n[l],t=r*e/i;if(t>=a&&o+(e<5?gc.get(e):0)<=17)return[e,t]}while(++l(t=Ks((n=+r)*ps))+"px")),t,n]}function jd(e){e.show&&[e.font,e.labelFont].forEach((e=>{let t=vc(e[2]*ps,1);e[0]=e[0].replace(/[0-9.]+px/,t+"px"),e[1]=t}))}function Hd(e,t,n){const r={mode:Hs(e.mode,1)},a=r.mode;function o(e,t){return((3==t.distr?ec(e>0?e:t.clamp(r,e,t.min,t.max,t.key)):4==t.distr?nc(e,t.asinh):e)-t._min)/(t._max-t._min)}function i(e,t,n,r){let a=o(e,t);return r+n*(-1==t.dir?1-a:a)}function l(e,t,n,r){let a=o(e,t);return r+n*(-1==t.dir?a:1-a)}function s(e,t,n,r){return 0==t.ori?i(e,t,n,r):l(e,t,n,r)}r.valToPosH=i,r.valToPosV=l;let c=!1;r.status=0;const u=r.root=bs("uplot");if(null!=e.id&&(u.id=e.id),vs(u,e.class),e.title){bs("u-title",u).textContent=e.title}const d=_s("canvas"),h=r.ctx=d.getContext("2d"),m=bs("u-wrap",u);Ms("click",m,(e=>{if(e.target===f){(Mt!=Ct||Tt!=Et)&&jt.click(r,e)}}),!0);const p=r.under=bs("u-under",m);m.appendChild(d);const f=r.over=bs("u-over",m),v=+Hs((e=Mc(e)).pxAlign,1),g=od(v);(e.plugins||[]).forEach((t=>{t.opts&&(e=t.opts(r,e)||e)}));const y=e.ms||.001,_=r.series=1==a?Ad(e.series||[],Mu,Yu,!1):(b=e.series||[null],w=qu,b.map(((e,t)=>0==t?null:Tc({},w,e))));var b,w;const k=r.axes=Ad(e.axes||[],Au,Vu,!0),x=r.scales={},S=r.bands=e.bands||[];S.forEach((e=>{e.fill=ic(e.fill||null),e.dir=Hs(e.dir,-1)}));const C=2==a?_[1].facets[0].scale:_[0].scale,E={axes:function(){for(let e=0;ett[e])):y,b=2==m.distr?tt[y[1]]-tt[y[0]]:u,w=t.ticks,S=t.border,C=w.show?Ks(w.size*ps):0,E=t._rotate*-qs/180,N=g(t._pos*ps),A=N+(C+v)*c;a=0==i?A:0,n=1==i?A:0,it(t.font[0],l,1==t.align?Gl:2==t.align?Jl:E>0?Gl:E<0?Jl:0==i?"center":3==o?Jl:Gl,E||1==i?"middle":2==o?Ql:Zl);let M=t.font[1]*t.lineGap,T=y.map((e=>g(s(e,m,p,f)))),L=t._values;for(let e=0;e0&&(_.forEach(((e,n)=>{if(n>0&&e.show&&(ct(n,!1),ct(n,!0),null==e._paths)){et!=e.alpha&&(h.globalAlpha=et=e.alpha);let o=2==a?[0,t[n][0].length-1]:function(e){let t=oc(Ve-1,0,$e-1),n=oc(Ue+1,0,$e-1);for(;null==e[t]&&t>0;)t--;for(;null==e[n]&&n<$e-1;)n++;return[t,n]}(t[n]);e._paths=e.paths(r,n,o[0],o[1]),1!=et&&(h.globalAlpha=et=1)}})),_.forEach(((e,t)=>{if(t>0&&e.show){et!=e.alpha&&(h.globalAlpha=et=e.alpha),null!=e._paths&&ut(t,!1);{let n=null!=e._paths?e._paths.gaps:null,a=e.points.show(r,t,Ve,Ue,n),o=e.points.filter(r,t,a,n);(a||o)&&(e.points._paths=e.points.paths(r,t,Ve,Ue,o),ut(t,!0))}1!=et&&(h.globalAlpha=et=1),kn("drawSeries",t)}})))}},N=(e.drawOrder||["axes","series"]).map((e=>E[e]));function A(t){let n=x[t];if(null==n){let r=(e.scales||bc)[t]||bc;if(null!=r.from)A(r.from),x[t]=Tc({},x[r.from],r,{key:t});else{n=x[t]=Tc({},t==C?Ku:Qu,r),n.key=t;let e=n.time,o=n.range,i=xc(o);if((t!=C||2==a&&!e)&&(!i||null!=o[0]&&null!=o[1]||(o={min:null==o[0]?Ds:{mode:1,hard:o[0],soft:o[0]},max:null==o[1]?Ds:{mode:1,hard:o[1],soft:o[1]}},i=!1),!i&&Ec(o))){let e=o;o=(t,n,r)=>null==n?kc:js(n,r,e)}n.range=ic(o||(e?Ld:t==C?3==n.distr?Id:4==n.distr?Dd:Td:3==n.distr?Pd:4==n.distr?Rd:Od)),n.auto=ic(!i&&n.auto),n.clamp=ic(n.clamp||Wu),n._min=n._max=null}}}A("x"),A("y"),1==a&&_.forEach((e=>{A(e.scale)})),k.forEach((e=>{A(e.scale)}));for(let Mn in e.scales)A(Mn);const M=x[C],T=M.distr;let L,O;0==M.ori?(vs(u,"u-hz"),L=i,O=l):(vs(u,"u-vt"),L=l,O=i);const P={};for(let Mn in x){let e=x[Mn];null==e.min&&null==e.max||(P[Mn]={min:e.min,max:e.max},e.min=e.max=null)}const I=e.tzDate||(e=>new Date(Ks(e/y))),R=e.fmtDate||$c,D=1==y?su(I):du(I),z=mu(I,hu(1==y?lu:uu,R)),F=vu(I,fu("{YYYY}-{MM}-{DD} {h}:{mm}{aa}",R)),j=[],H=r.legend=Tc({},gu,e.legend),$=H.show,V=H.markers;let U,B,q;H.idxs=j,V.width=ic(V.width),V.dash=ic(V.dash),V.stroke=ic(V.stroke),V.fill=ic(V.fill);let Y,W=[],K=[],Q=!1,Z={};if(H.live){const e=_[1]?_[1].values:null;Q=null!=e,Y=Q?e(r,1,0):{_:0};for(let t in Y)Z[t]=cs}if($)if(U=_s("table","u-legend",u),q=_s("tbody",null,U),H.mount(r,U),Q){B=_s("thead",null,U,q);let e=_s("tr",null,B);for(var G in _s("th",null,e),Y)_s("th",Yl,e).textContent=G}else vs(U,"u-inline"),H.live&&vs(U,"u-live");const J={show:!0},X={show:!1};const ee=new Map;function te(e,t,n){let a=!(arguments.length>3&&void 0!==arguments[3])||arguments[3];const o=ee.get(t)||{},i=Ee.bind[e](r,t,n,a);i&&(Ms(e,t,o[e]=i),ee.set(t,o))}function ne(e,t,n){const r=ee.get(t)||{};for(let a in r)null!=e&&a!=e||(Ts(a,t,r[a]),delete r[a]);null==e&&ee.delete(t)}let re=0,ae=0,oe=0,ie=0,le=0,se=0,ce=le,ue=se,de=oe,he=ie,me=0,pe=0,fe=0,ve=0;r.bbox={};let ge=!1,ye=!1,_e=!1,be=!1,we=!1,ke=!1;function xe(e,t,n){(n||e!=r.width||t!=r.height)&&Se(e,t),yt(!1),_e=!0,ye=!0,Rt()}function Se(e,t){r.width=re=oe=e,r.height=ae=ie=t,le=se=0,function(){let e=!1,t=!1,n=!1,r=!1;k.forEach(((a,o)=>{if(a.show&&a._show){let{side:o,_size:i}=a,l=o%2,s=i+(null!=a.label?a.labelSize:0);s>0&&(l?(oe-=s,3==o?(le+=s,r=!0):n=!0):(ie-=s,0==o?(se+=s,e=!0):t=!0))}})),ze[0]=e,ze[1]=n,ze[2]=t,ze[3]=r,oe-=He[1]+He[3],le+=He[3],ie-=He[2]+He[0],se+=He[0]}(),function(){let e=le+oe,t=se+ie,n=le,r=se;function a(a,o){switch(a){case 1:return e+=o,e-o;case 2:return t+=o,t-o;case 3:return n-=o,n+o;case 0:return r-=o,r+o}}k.forEach(((e,t)=>{if(e.show&&e._show){let t=e.side;e._pos=a(t,e._size),null!=e.label&&(e._lpos=a(t,e.labelSize))}}))}();let n=r.bbox;me=n.left=mc(le*ps,.5),pe=n.top=mc(se*ps,.5),fe=n.width=mc(oe*ps,.5),ve=n.height=mc(ie*ps,.5)}const Ce=3;r.setSize=function(e){let{width:t,height:n}=e;xe(t,n)};const Ee=r.cursor=Tc({},wu,{drag:{y:2==a}},e.cursor);if(null==Ee.dataIdx){var Ne,Ae;let e=Ee.hover,n=e.skip=new Set(null!==(Ne=e.skip)&&void 0!==Ne?Ne:[]);n.add(void 0);let r=e.prox=ic(e.prox),a=null!==(Ae=e.bias)&&void 0!==Ae?Ae:e.bias=0;Ee.dataIdx=(e,o,i,l)=>{var s;if(0==o)return i;let c=i,u=null!==(s=r(e,o,i,l))&&void 0!==s?s:rc,d=u>=0&&u0;)n.has(f[e])||(t=e);if(0==a||1==a)for(e=i;null==r&&e++u&&(c=null)}return c}}const Me=e=>{Ee.event=e};Ee.idxs=j,Ee._lock=!1;let Te=Ee.points;Te.show=ic(Te.show),Te.size=ic(Te.size),Te.stroke=ic(Te.stroke),Te.width=ic(Te.width),Te.fill=ic(Te.fill);const Le=r.focus=Tc({},e.focus||{alpha:.3},Ee.focus),Oe=Le.prox>=0;let Pe=[null],Ie=[null],Re=[null];function De(e,t){if(1==a||t>0){let t=1==a&&x[e.scale].time,n=e.value;e.value=t?Cc(n)?vu(I,fu(n,R)):n||F:n||$u,e.label=e.label||(t?"Time":"Value")}if(t>0){e.width=null==e.width?1:e.width,e.paths=e.paths||Ed||cc,e.fillTo=ic(e.fillTo||td),e.pxAlign=+Hs(e.pxAlign,v),e.pxRound=od(e.pxAlign),e.stroke=ic(e.stroke||null),e.fill=ic(e.fill||null),e._stroke=e._fill=e._paths=e._focus=null;let t=vc((3+2*(Gs(1,e.width)||1))*1,3),n=e.points=Tc({},{size:t,width:Gs(1,.2*t),stroke:e.stroke,space:2*t,paths:Nd,_stroke:null,_fill:null},e.points);n.show=ic(n.show),n.filter=ic(n.filter),n.fill=ic(n.fill),n.stroke=ic(n.stroke),n.paths=ic(n.paths),n.pxAlign=e.pxAlign}if($){let n=function(e,t){if(0==t&&(Q||!H.live||2==a))return kc;let n=[],o=_s("tr","u-series",q,q.childNodes[t]);vs(o,e.class),e.show||vs(o,ql);let i=_s("th",null,o);if(V.show){let e=bs("u-marker",i);if(t>0){let n=V.width(r,t);n&&(e.style.border=n+"px "+V.dash(r,t)+" "+V.stroke(r,t)),e.style.background=V.fill(r,t)}}let l=bs(Yl,i);for(var s in l.textContent=e.label,t>0&&(V.show||(l.style.color=e.width>0?V.stroke(r,t):V.fill(r,t)),te("click",i,(t=>{if(Ee._lock)return;Me(t);let n=_.indexOf(e);if((t.ctrlKey||t.metaKey)!=H.isolate){let e=_.some(((e,t)=>t>0&&t!=n&&e.show));_.forEach(((t,r)=>{r>0&&Yt(r,e?r==n?J:X:J,!0,Sn.setSeries)}))}else Yt(n,{show:!e.show},!0,Sn.setSeries)}),!1),Oe&&te(as,i,(t=>{Ee._lock||(Me(t),Yt(_.indexOf(e),Zt,!0,Sn.setSeries))}),!1)),Y){let e=_s("td","u-value",o);e.textContent="--",n.push(e)}return[o,n]}(e,t);W.splice(t,0,n[0]),K.splice(t,0,n[1]),H.values.push(null)}if(Ee.show){j.splice(t,0,null);let n=function(e,t){if(t>0){let n=Ee.points.show(r,t);if(n)return vs(n,"u-cursor-pt"),vs(n,e.class),ks(n,-10,-10,oe,ie),f.insertBefore(n,Pe[t]),n}}(e,t);null!=n&&(Pe.splice(t,0,n),Ie.splice(t,0,0),Re.splice(t,0,0))}kn("addSeries",t)}r.addSeries=function(e,t){t=null==t?_.length:t,e=1==a?Md(e,t,Mu,Yu):Md(e,t,null,qu),_.splice(t,0,e),De(_[t],t)},r.delSeries=function(e){if(_.splice(e,1),$){H.values.splice(e,1),K.splice(e,1);let t=W.splice(e,1)[0];ne(null,t.firstChild),t.remove()}Ee.show&&(j.splice(e,1),Pe.length>1&&(Pe.splice(e,1)[0].remove(),Ie.splice(e,1),Re.splice(e,1))),kn("delSeries",e)};const ze=[!1,!1,!1,!1];function Fe(e,t,n,r){let[a,o,i,l]=n,s=t%2,c=0;return 0==s&&(l||o)&&(c=0==t&&!a||2==t&&!i?Ks(Au.size/3):0),1==s&&(a||i)&&(c=1==t&&!o||3==t&&!l?Ks(Vu.size/2):0),c}const je=r.padding=(e.padding||[Fe,Fe,Fe,Fe]).map((e=>ic(Hs(e,Fe)))),He=r._padding=je.map(((e,t)=>e(r,t,ze,0)));let $e,Ve=null,Ue=null;const Be=1==a?_[0].idxs:null;let qe,Ye,We,Ke,Qe,Ze,Ge,Je,Xe,et,tt=null,nt=!1;function rt(e,n){if(t=null==e?[]:e,r.data=r._data=t,2==a){$e=0;for(let e=1;e<_.length;e++)$e+=t[e][0].length}else{0==t.length&&(r.data=r._data=t=[[]]),tt=t[0],$e=tt.length;let e=t;if(2==T){e=t.slice();let n=e[0]=Array($e);for(let e=0;e<$e;e++)n[e]=e}r._data=t=e}if(yt(!0),kn("setData"),2==T&&(_e=!0),!1!==n){let e=M;e.auto(r,nt)?at():qt(C,e.min,e.max),be=be||Ee.left>=0,ke=!0,Rt()}}function at(){let e,n;nt=!0,1==a&&($e>0?(Ve=Be[0]=0,Ue=Be[1]=$e-1,e=t[0][Ve],n=t[0][Ue],2==T?(e=Ve,n=Ue):e==n&&(3==T?[e,n]=Ps(e,e,M.log,!1):4==T?[e,n]=Is(e,e,M.log,!1):M.time?n=e+Ks(86400/y):[e,n]=js(e,n,Rs,!0))):(Ve=Be[0]=e=null,Ue=Be[1]=n=null)),qt(C,e,n)}function ot(e,t,n,r,a,o){var i,l,s,c,u;null!==(i=e)&&void 0!==i||(e=es),null!==(l=n)&&void 0!==l||(n=wc),null!==(s=r)&&void 0!==s||(r="butt"),null!==(c=a)&&void 0!==c||(a=es),null!==(u=o)&&void 0!==u||(o="round"),e!=qe&&(h.strokeStyle=qe=e),a!=Ye&&(h.fillStyle=Ye=a),t!=We&&(h.lineWidth=We=t),o!=Qe&&(h.lineJoin=Qe=o),r!=Ze&&(h.lineCap=Ze=r),n!=Ke&&h.setLineDash(Ke=n)}function it(e,t,n,r){t!=Ye&&(h.fillStyle=Ye=t),e!=Ge&&(h.font=Ge=e),n!=Je&&(h.textAlign=Je=n),r!=Xe&&(h.textBaseline=Xe=r)}function lt(e,t,n,a){let o=arguments.length>4&&void 0!==arguments[4]?arguments[4]:0;if(a.length>0&&e.auto(r,nt)&&(null==t||null==t.min)){let t=Hs(Ve,0),r=Hs(Ue,a.length-1),i=null==n.min?3==e.distr?function(e,t,n){let r=rc,a=-rc;for(let o=t;o<=n;o++){let t=e[o];null!=t&&t>0&&(ta&&(a=t))}return[r,a]}(a,t,r):function(e,t,n,r){let a=rc,o=-rc;if(1==r)a=e[t],o=e[n];else if(-1==r)a=e[n],o=e[t];else for(let i=t;i<=n;i++){let t=e[i];null!=t&&(to&&(o=t))}return[a,o]}(a,t,r,o):[n.min,n.max];e.min=Zs(e.min,n.min=i[0]),e.max=Gs(e.max,n.max=i[1])}}r.setData=rt;const st={min:null,max:null};function ct(e,t){let n=t?_[e].points:_[e];n._stroke=n.stroke(r,e),n._fill=n.fill(r,e)}function ut(e,n){let a=n?_[e].points:_[e],{stroke:o,fill:i,clip:l,flags:s,_stroke:c=a._stroke,_fill:u=a._fill,_width:d=a.width}=a._paths;d=vc(d*ps,3);let m=null,p=d%2/2;n&&null==u&&(u=d>0?"#fff":c);let f=1==a.pxAlign&&p>0;if(f&&h.translate(p,p),!n){let e=me-d/2,t=pe-d/2,n=fe+d,r=ve+d;m=new Path2D,m.rect(e,t,n,r)}n?ht(c,d,a.dash,a.cap,u,o,i,s,l):function(e,n,a,o,i,l,s,c,u,d,h){let m=!1;0!=u&&S.forEach(((p,f)=>{if(p.series[0]==e){let e,v=_[p.series[1]],g=t[p.series[1]],y=(v._paths||bc).band;xc(y)&&(y=1==p.dir?y[0]:y[1]);let b=null;v.show&&y&&function(e,t,n){for(t=Hs(t,0),n=Hs(n,e.length-1);t<=n;){if(null!=e[t])return!0;t++}return!1}(g,Ve,Ue)?(b=p.fill(r,f)||l,e=v._paths.clip):y=null,ht(n,a,o,i,b,s,c,u,d,h,e,y),m=!0}})),m||ht(n,a,o,i,l,s,c,u,d,h)}(e,c,d,a.dash,a.cap,u,o,i,s,m,l),f&&h.translate(-p,-p)}const dt=2|Ju;function ht(e,t,n,r,a,o,i,l,s,c,u,d){ot(e,t,n,r,a),(s||c||d)&&(h.save(),s&&h.clip(s),c&&h.clip(c)),d?(l&dt)==dt?(h.clip(d),u&&h.clip(u),pt(a,i),mt(e,o,t)):2&l?(pt(a,i),h.clip(d),mt(e,o,t)):l&Ju&&(h.save(),h.clip(d),u&&h.clip(u),pt(a,i),h.restore(),mt(e,o,t)):(pt(a,i),mt(e,o,t)),(s||c||d)&&h.restore()}function mt(e,t,n){n>0&&(t instanceof Map?t.forEach(((e,t)=>{h.strokeStyle=qe=t,h.stroke(e)})):null!=t&&e&&h.stroke(t))}function pt(e,t){t instanceof Map?t.forEach(((e,t)=>{h.fillStyle=Ye=t,h.fill(e)})):null!=t&&e&&h.fill(t)}function ft(e,t,n,r,a,o,i,l,s,c){let u=i%2/2;1==v&&h.translate(u,u),ot(l,i,s,c,l),h.beginPath();let d,m,p,f,g=a+(0==r||3==r?-o:o);0==n?(m=a,f=g):(d=a,p=g);for(let v=0;v{if(!n.show)return;let o=x[n.scale];if(null==o.min)return void(n._show&&(t=!1,n._show=!1,yt(!1)));n._show||(t=!1,n._show=!0,yt(!1));let i=n.side,l=i%2,{min:s,max:c}=o,[u,d]=function(e,t,n,a){let o,i=k[e];if(a<=0)o=[0,0];else{let l=i._space=i.space(r,e,t,n,a);o=zd(t,n,i._incrs=i.incrs(r,e,t,n,a,l),a,l)}return i._found=o}(a,s,c,0==l?oe:ie);if(0==d)return;let h=2==o.distr,m=n._splits=n.splits(r,a,s,c,u,d,h),p=2==o.distr?m.map((e=>tt[e])):m,f=2==o.distr?tt[m[1]]-tt[m[0]]:u,v=n._values=n.values(r,n.filter(r,p,a,d,f),a,d,f);n._rotate=2==i?n.rotate(r,v,a,d):0;let g=n._size;n._size=Qs(n.size(r,v,a,e)),null!=g&&n._size!=g&&(t=!1)})),t}function gt(e){let t=!0;return je.forEach(((n,a)=>{let o=n(r,a,ze,e);o!=He[a]&&(t=!1),He[a]=o})),t}function yt(e){_.forEach(((t,n)=>{n>0&&(t._paths=null,e&&(1==a?(t.min=null,t.max=null):t.facets.forEach((e=>{e.min=null,e.max=null}))))}))}let _t,bt,wt,kt,xt,St,Ct,Et,Nt,At,Mt,Tt,Lt=!1,Ot=!1,Pt=[];function It(){Ot=!1;for(let e=0;e0){_.forEach(((n,o)=>{if(1==a){let a=n.scale,i=P[a];if(null==i)return;let l=e[a];if(0==o){let e=l.range(r,l.min,l.max,a);l.min=e[0],l.max=e[1],Ve=Ls(l.min,t[0]),Ue=Ls(l.max,t[0]),Ue-Ve>1&&(t[0][Ve]l.max&&Ue--),n.min=tt[Ve],n.max=tt[Ue]}else n.show&&n.auto&<(l,i,n,t[o],n.sorted);n.idxs[0]=Ve,n.idxs[1]=Ue}else if(o>0&&n.show&&n.auto){let[r,a]=n.facets,i=r.scale,l=a.scale,[s,c]=t[o],u=e[i],d=e[l];null!=u&<(u,P[i],r,s,r.sorted),null!=d&<(d,P[l],a,c,a.sorted),n.min=a.min,n.max=a.max}}));for(let t in e){let n=e[t],a=P[t];if(null==n.from&&(null==a||null==a.min)){let e=n.range(r,n.min==rc?null:n.min,n.max==-rc?null:n.max,t);n.min=e[0],n.max=e[1]}}}for(let t in e){let n=e[t];if(null!=n.from){let a=e[n.from];if(null==a.min)n.min=n.max=null;else{let e=n.range(r,a.min,a.max,t);n.min=e[0],n.max=e[1]}}}let n={},o=!1;for(let t in e){let r=e[t],a=x[t];if(a.min!=r.min||a.max!=r.max){a.min=r.min,a.max=r.max;let e=a.distr;a._min=3==e?ec(a.min):4==e?nc(a.min,a.asinh):a.min,a._max=3==e?ec(a.max):4==e?nc(a.max,a.asinh):a.max,n[t]=o=!0}}if(o){_.forEach(((e,t)=>{2==a?t>0&&n.y&&(e._paths=null):n[e.scale]&&(e._paths=null)}));for(let e in n)_e=!0,kn("setScale",e);Ee.show&&Ee.left>=0&&(be=ke=!0)}for(let t in P)P[t]=null}(),ge=!1),_e&&(!function(){let e=!1,t=0;for(;!e;){t++;let n=vt(t),a=gt(t);e=t==Ce||n&&a,e||(Se(r.width,r.height),ye=!0)}}(),_e=!1),ye){if(ys(p,Gl,le),ys(p,Ql,se),ys(p,Wl,oe),ys(p,Kl,ie),ys(f,Gl,le),ys(f,Ql,se),ys(f,Wl,oe),ys(f,Kl,ie),ys(m,Wl,re),ys(m,Kl,ae),d.width=Ks(re*ps),d.height=Ks(ae*ps),k.forEach((e=>{let{_el:t,_show:n,_size:r,_pos:a,side:o}=e;if(null!=t)if(n){let e=o%2==1;ys(t,e?"left":"top",a-(3===o||0===o?r:0)),ys(t,e?"width":"height",r),ys(t,e?"top":"left",e?se:le),ys(t,e?"height":"width",e?ie:oe),gs(t,ql)}else vs(t,ql)})),qe=Ye=We=Qe=Ze=Ge=Je=Xe=Ke=null,et=1,ln(!0),le!=ce||se!=ue||oe!=de||ie!=he){yt(!1);let e=oe/de,t=ie/he;if(Ee.show&&!be&&Ee.left>=0){Ee.left*=e,Ee.top*=t,wt&&ks(wt,Ks(Ee.left),0,oe,ie),kt&&ks(kt,0,Ks(Ee.top),oe,ie);for(let n=1;n=0&&Vt.width>0){Vt.left*=e,Vt.width*=e,Vt.top*=t,Vt.height*=t;for(let e in un)ys(Ut,e,Vt[e])}ce=le,ue=se,de=oe,he=ie}kn("setSize"),ye=!1}re>0&&ae>0&&(h.clearRect(0,0,d.width,d.height),kn("drawClear"),N.forEach((e=>e())),kn("draw")),Vt.show&&we&&(Bt(Vt),we=!1),Ee.show&&be&&(an(null,!0,!1),be=!1),H.show&&H.live&&ke&&(nn(),ke=!1),c||(c=!0,r.status=1,kn("ready")),nt=!1,Lt=!1}function zt(e,n){let a=x[e];if(null==a.from){if(0==$e){let t=a.range(r,n.min,n.max,e);n.min=t[0],n.max=t[1]}if(n.min>n.max){let e=n.min;n.min=n.max,n.max=e}if($e>1&&null!=n.min&&null!=n.max&&n.max-n.min<1e-16)return;e==C&&2==a.distr&&$e>0&&(n.min=Ls(n.min,t[0]),n.max=Ls(n.max,t[0]),n.min==n.max&&n.max++),P[e]=n,ge=!0,Rt()}}r.batch=function(e){let t=arguments.length>1&&void 0!==arguments[1]&&arguments[1];Lt=!0,Ot=t,e(r),Dt(),t&&Pt.length>0&&queueMicrotask(It)},r.redraw=(e,t)=>{_e=t||!1,!1!==e?qt(C,M.min,M.max):Rt()},r.setScale=zt;let Ft=!1;const jt=Ee.drag;let Ht=jt.x,$t=jt.y;Ee.show&&(Ee.x&&(_t=bs("u-cursor-x",f)),Ee.y&&(bt=bs("u-cursor-y",f)),0==M.ori?(wt=_t,kt=bt):(wt=bt,kt=_t),Mt=Ee.left,Tt=Ee.top);const Vt=r.select=Tc({show:!0,over:!0,left:0,width:0,top:0,height:0},e.select),Ut=Vt.show?bs("u-select",Vt.over?f:p):null;function Bt(e,t){if(Vt.show){for(let t in e)Vt[t]=e[t],t in un&&ys(Ut,t,e[t]);!1!==t&&kn("setSelect")}}function qt(e,t,n){zt(e,{min:t,max:n})}function Yt(e,t,n,o){null!=t.focus&&function(e){if(e!=Qt){let t=null==e,n=1!=Le.alpha;_.forEach(((r,o)=>{if(1==a||o>0){let a=t||0==o||o==e;r._focus=t?null:a,n&&function(e,t){_[e].alpha=t,Ee.show&&Pe[e]&&(Pe[e].style.opacity=t);$&&W[e]&&(W[e].style.opacity=t)}(o,a?1:Le.alpha)}})),Qt=e,n&&Rt()}}(e),null!=t.show&&_.forEach(((n,r)=>{r>0&&(e==r||null==e)&&(n.show=t.show,function(e,t){let n=_[e],r=$?W[e]:null;n.show?r&&gs(r,ql):(r&&vs(r,ql),Pe.length>1&&ks(Pe[e],-10,-10,oe,ie))}(r,t.show),2==a?(qt(n.facets[0].scale,null,null),qt(n.facets[1].scale,null,null)):qt(n.scale,null,null),Rt())})),!1!==n&&kn("setSeries",e,t),o&&Nn("setSeries",r,e,t)}let Wt,Kt,Qt;r.setSelect=Bt,r.setSeries=Yt,r.addBand=function(e,t){e.fill=ic(e.fill||null),e.dir=Hs(e.dir,-1),t=null==t?S.length:t,S.splice(t,0,e)},r.setBand=function(e,t){Tc(S[e],t)},r.delBand=function(e){null==e?S.length=0:S.splice(e,1)};const Zt={focus:!0};function Gt(e,t,n){let r=x[t];n&&(e=e/ps-(1==r.ori?se:le));let a=oe;1==r.ori&&(a=ie,e=a-e),-1==r.dir&&(e=a-e);let o=r._min,i=o+(r._max-o)*(e/a),l=r.distr;return 3==l?Js(10,i):4==l?function(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:1;return Bs.sinh(e)*t}(i,r.asinh):i}function Jt(e,t){ys(Ut,Gl,Vt.left=e),ys(Ut,Wl,Vt.width=t)}function Xt(e,t){ys(Ut,Ql,Vt.top=e),ys(Ut,Kl,Vt.height=t)}$&&Oe&&te(os,U,(e=>{Ee._lock||(Me(e),null!=Qt&&Yt(null,Zt,!0,Sn.setSeries))})),r.valToIdx=e=>Ls(e,t[0]),r.posToIdx=function(e,n){return Ls(Gt(e,C,n),t[0],Ve,Ue)},r.posToVal=Gt,r.valToPos=(e,t,n)=>0==x[t].ori?i(e,x[t],n?fe:oe,n?me:0):l(e,x[t],n?ve:ie,n?pe:0),r.setCursor=(e,t,n)=>{Mt=e.left,Tt=e.top,an(null,t,n)};let en=0==M.ori?Jt:Xt,tn=1==M.ori?Jt:Xt;function nn(e,t){null!=e&&(e.idxs?e.idxs.forEach(((e,t)=>{j[t]=e})):void 0!==e.idx&&j.fill(e.idx),H.idx=j[0]);for(let n=0;n<_.length;n++)(n>0||1==a&&!Q)&&rn(n,j[n]);$&&H.live&&function(){if($&&H.live)for(let e=2==a?1:0;e<_.length;e++){if(0==e&&Q)continue;let t=H.values[e],n=0;for(let r in t)K[e][n++].firstChild.nodeValue=t[r]}}(),ke=!1,!1!==t&&kn("setLegend")}function rn(e,n){var a;let o,i=_[e],l=0==e&&2==T?tt:t[e];Q?o=null!==(a=i.values(r,e,n))&&void 0!==a?a:Z:(o=i.value(r,null==n?null:l[n],e,n),o=null==o?Z:{_:o}),H.values[e]=o}function an(e,n,o){let i;Nt=Mt,At=Tt,[Mt,Tt]=Ee.move(r,Mt,Tt),Ee.left=Mt,Ee.top=Tt,Ee.show&&(wt&&ks(wt,Ks(Mt),0,oe,ie),kt&&ks(kt,0,Ks(Tt),oe,ie));let l=Ve>Ue;Wt=rc;let s=0==M.ori?oe:ie,c=1==M.ori?oe:ie;if(Mt<0||0==$e||l){i=Ee.idx=null;for(let e=0;e<_.length;e++)e>0&&Pe.length>1&&ks(Pe[e],-10,-10,oe,ie);Oe&&Yt(null,Zt,!0,null==e&&Sn.setSeries),H.live&&(j.fill(i),ke=!0)}else{let e,n,o;1==a&&(e=0==M.ori?Mt:Tt,n=Gt(e,C),i=Ee.idx=Ls(n,t[0],Ve,Ue),o=L(t[0][i],M,s,0));for(let l=2==a?1:0;l<_.length;l++){let e=_[l],u=j[l],d=null==u?null:1==a?t[l][u]:t[l][1][u],h=Ee.dataIdx(r,l,i,n),m=null==h?null:1==a?t[l][h]:t[l][1][h];ke=ke||m!=d||h!=u,j[l]=h;let p=h==i?o:L(1==a?t[0][h]:t[l][0][h],M,s,0);if(l>0&&e.show){let t,n,o=null==m?-10:O(m,1==a?x[e.scale]:x[e.facets[1].scale],c,0);if(Oe&&null!=m){let t=1==M.ori?Mt:Tt,n=Ys(Le.dist(r,l,h,o,t));if(n=0?1:-1;o==(m>=0?1:-1)&&(1==o?1==r?m>=a:m<=a:1==r?m<=a:m>=a)&&(Wt=n,Kt=l)}else Wt=n,Kt=l}}if(0==M.ori?(t=p,n=o):(t=o,n=p),ke&&Pe.length>1){Ss(Pe[l],Ee.points.fill(r,l),Ee.points.stroke(r,l));let e,a,o,i,s=!0,c=Ee.points.bbox;if(null!=c){s=!1;let t=c(r,l);o=t.left,i=t.top,e=t.width,a=t.height}else o=t,i=n,e=a=Ee.points.size(r,l);Es(Pe[l],e,a,s),Ie[l]=o,Re[l]=i,ks(Pe[l],pc(o,1),pc(i,1),oe,ie)}}}}if(Vt.show&&Ft)if(null!=e){let[t,n]=Sn.scales,[r,a]=Sn.match,[o,i]=e.cursor.sync.scales,l=e.cursor.drag;if(Ht=l._x,$t=l._y,Ht||$t){let l,u,d,h,m,{left:p,top:f,width:v,height:g}=e.select,y=e.scales[t].ori,_=e.posToVal,b=null!=t&&r(t,o),w=null!=n&&a(n,i);b&&Ht?(0==y?(l=p,u=v):(l=f,u=g),d=x[t],h=L(_(l,o),d,s,0),m=L(_(l+u,o),d,s,0),en(Zs(h,m),Ys(m-h))):en(0,s),w&&$t?(1==y?(l=p,u=v):(l=f,u=g),d=x[n],h=O(_(l,i),d,c,0),m=O(_(l+u,i),d,c,0),tn(Zs(h,m),Ys(m-h))):tn(0,c)}else dn()}else{let e=Ys(Nt-xt),t=Ys(At-St);if(1==M.ori){let n=e;e=t,t=n}Ht=jt.x&&e>=jt.dist,$t=jt.y&&t>=jt.dist;let n,r,a=jt.uni;null!=a?Ht&&$t&&(Ht=e>=a,$t=t>=a,Ht||$t||(t>e?$t=!0:Ht=!0)):jt.x&&jt.y&&(Ht||$t)&&(Ht=$t=!0),Ht&&(0==M.ori?(n=Ct,r=Mt):(n=Et,r=Tt),en(Zs(n,r),Ys(r-n)),$t||tn(0,c)),$t&&(1==M.ori?(n=Ct,r=Mt):(n=Et,r=Tt),tn(Zs(n,r),Ys(r-n)),Ht||en(0,s)),Ht||$t||(en(0,0),tn(0,0))}if(jt._x=Ht,jt._y=$t,null==e){if(o){if(null!=Cn){let[e,t]=Sn.scales;Sn.values[0]=null!=e?Gt(0==M.ori?Mt:Tt,e):null,Sn.values[1]=null!=t?Gt(1==M.ori?Mt:Tt,t):null}Nn(ts,r,Mt,Tt,oe,ie,i)}if(Oe){let e=o&&Sn.setSeries,t=Le.prox;null==Qt?Wt<=t&&Yt(Kt,Zt,!0,e):Wt>t?Yt(null,Zt,!0,e):Kt!=Qt&&Yt(Kt,Zt,!0,e)}}ke&&(H.idx=i,nn()),!1!==n&&kn("setCursor")}r.setLegend=nn;let on=null;function ln(){arguments.length>0&&void 0!==arguments[0]&&arguments[0]?on=null:(on=f.getBoundingClientRect(),kn("syncRect",on))}function sn(e,t,n,r,a,o,i){Ee._lock||Ft&&null!=e&&0==e.movementX&&0==e.movementY||(cn(e,t,n,r,a,o,i,!1,null!=e),null!=e?an(null,!0,!0):an(t,!0,!1))}function cn(e,t,n,a,o,i,l,c,u){if(null==on&&ln(!1),Me(e),null!=e)n=e.clientX-on.left,a=e.clientY-on.top;else{if(n<0||a<0)return Mt=-10,void(Tt=-10);let[e,r]=Sn.scales,l=t.cursor.sync,[c,u]=l.values,[d,h]=l.scales,[m,p]=Sn.match,f=t.axes[0].side%2==1,v=0==M.ori?oe:ie,g=1==M.ori?oe:ie,y=f?i:o,_=f?o:i,b=f?a:n,w=f?n:a;if(n=null!=d?m(e,d)?s(c,x[e],v,0):-10:v*(b/y),a=null!=h?p(r,h)?s(u,x[r],g,0):-10:g*(w/_),1==M.ori){let e=n;n=a,a=e}}u&&((n<=1||n>=oe-1)&&(n=mc(n,oe)),(a<=1||a>=ie-1)&&(a=mc(a,ie))),c?(xt=n,St=a,[Ct,Et]=Ee.move(r,n,a)):(Mt=n,Tt=a)}Object.defineProperty(r,"rect",{get:()=>(null==on&&ln(!1),on)});const un={width:0,height:0,left:0,top:0};function dn(){Bt(un,!1)}let hn,mn,pn,fn;function vn(e,t,n,a,o,i,l){Ft=!0,Ht=$t=jt._x=jt._y=!1,cn(e,t,n,a,o,i,0,!0,!1),null!=e&&(te(rs,ds,gn,!1),Nn(ns,r,Ct,Et,oe,ie,null));let{left:s,top:c,width:u,height:d}=Vt;hn=s,mn=c,pn=u,fn=d,dn()}function gn(e,t,n,a,o,i,l){Ft=jt._x=jt._y=!1,cn(e,t,n,a,o,i,0,!1,!0);let{left:s,top:c,width:u,height:d}=Vt,h=u>0||d>0,m=hn!=s||mn!=c||pn!=u||fn!=d;if(h&&m&&Bt(Vt),jt.setScale&&h&&m){let e=s,t=u,n=c,r=d;if(1==M.ori&&(e=c,t=d,n=s,r=u),Ht&&qt(C,Gt(e,C),Gt(e+t,C)),$t)for(let a in x){let e=x[a];a!=C&&null==e.from&&e.min!=rc&&qt(a,Gt(n+r,a),Gt(n,a))}dn()}else Ee.lock&&(Ee._lock=!Ee._lock,Ee._lock||an(null,!0,!1));null!=e&&(ne(rs,ds),Nn(rs,r,Mt,Tt,oe,ie,null))}function yn(e,t,n,a,o,i,l){Ee._lock||(Me(e),at(),dn(),null!=e&&Nn(is,r,Mt,Tt,oe,ie,null))}function _n(){k.forEach(jd),xe(r.width,r.height,!0)}Ms(ss,hs,_n);const bn={};bn.mousedown=vn,bn.mousemove=sn,bn.mouseup=gn,bn.dblclick=yn,bn.setSeries=(e,t,n,a)=>{-1!=(n=(0,Sn.match[2])(r,t,n))&&Yt(n,a,!0,!1)},Ee.show&&(te(ns,f,vn),te(ts,f,sn),te(as,f,(e=>{Me(e),ln(!1)})),te(os,f,(function(e,t,n,r,a,o,i){if(Ee._lock)return;Me(e);let l=Ft;if(Ft){let e,t,n=!0,r=!0,a=10;0==M.ori?(e=Ht,t=$t):(e=$t,t=Ht),e&&t&&(n=Mt<=a||Mt>=oe-a,r=Tt<=a||Tt>=ie-a),e&&n&&(Mt=Mt{e.call(null,r,t,n)}))}(e.plugins||[]).forEach((e=>{for(let t in e.hooks)wn[t]=(wn[t]||[]).concat(e.hooks[t])}));const xn=(e,t,n)=>n,Sn=Tc({key:null,setSeries:!1,filters:{pub:uc,sub:uc},scales:[C,_[1]?_[1].scale:null],match:[dc,dc,xn],values:[null,null]},Ee.sync);2==Sn.match.length&&Sn.match.push(xn),Ee.sync=Sn;const Cn=Sn.key,En=Gu(Cn);function Nn(e,t,n,r,a,o,i){Sn.filters.pub(e,t,n,r,a,o,i)&&En.pub(e,t,n,r,a,o,i)}function An(){kn("init",e,t),rt(t||e.data,!1),P[C]?zt(C,P[C]):at(),we=Vt.show&&(Vt.width>0||Vt.height>0),be=ke=!0,xe(e.width,e.height)}return En.sub(r),r.pub=function(e,t,n,r,a,o,i){Sn.filters.sub(e,t,n,r,a,o,i)&&bn[e](null,t,n,r,a,o,i)},r.destroy=function(){var e;En.unsub(r),Sd.delete(r),ee.clear(),Ts(ss,hs,_n),u.remove(),null===(e=U)||void 0===e||e.remove(),kn("destroy")},_.forEach(De),k.forEach((function(e,t){if(e._show=e.show,e.show){let n=e.side%2,a=x[e.scale];null==a&&(e.scale=n?_[1].scale:C,a=x[e.scale]);let o=a.time;e.size=ic(e.size),e.space=ic(e.space),e.rotate=ic(e.rotate),xc(e.incrs)&&e.incrs.forEach((e=>{!gc.has(e)&&gc.set(e,yc(e))})),e.incrs=ic(e.incrs||(2==a.distr?Wc:o?1==y?iu:cu:Kc)),e.splits=ic(e.splits||(o&&1==a.distr?D:3==a.distr?Ou:4==a.distr?Pu:Lu)),e.stroke=ic(e.stroke),e.grid.stroke=ic(e.grid.stroke),e.ticks.stroke=ic(e.ticks.stroke),e.border.stroke=ic(e.border.stroke);let i=e.values;e.values=xc(i)&&!xc(i[0])?ic(i):o?xc(i)?mu(I,hu(i,R)):Cc(i)?function(e,t){let n=$c(t);return(t,r,a,o,i)=>r.map((t=>n(e(t))))}(I,i):i||z:i||Tu,e.filter=ic(e.filter||(a.distr>=3&&10==a.log?ju:3==a.distr&&2==a.log?Hu:sc)),e.font=Fd(e.font),e.labelFont=Fd(e.labelFont),e._size=e.size(r,null,t,0),e._space=e._rotate=e._incrs=e._found=e._splits=e._values=null,e._size>0&&(ze[t]=!0,e._el=bs("u-axis",m))}})),n?n instanceof HTMLElement?(n.appendChild(u),An()):n(r,An):An(),r}Hd.assign=Tc,Hd.fmtNum=Us,Hd.rangeNum=js,Hd.rangeLog=Ps,Hd.rangeAsinh=Is,Hd.orient=Xu,Hd.pxRatio=ps,Hd.join=function(e,t){if(function(e){let t=e[0][0],n=t.length;for(let r=1;r1&&void 0!==arguments[1]?arguments[1]:100;const n=e.length;if(n<=1)return!0;let r=0,a=n-1;for(;r<=a&&null==e[r];)r++;for(;a>=r&&null==e[a];)a--;if(a<=r)return!0;const o=Gs(1,Ws((a-r+1)/t));for(let i=e[r],l=r+o;l<=a;l+=o){const t=e[l];if(null!=t){if(t<=i)return!1;i=t}}return!0}(t[0])||(t=function(e){let t=e[0],n=t.length,r=Array(n);for(let o=0;ot[e]-t[n]));let a=[];for(let o=0;oe-t))],a=r[0].length,o=new Map;for(let i=0;iXu(e,o,((s,c,u,d,h,m,p,f,v,g,y)=>{let _=s.pxRound,{left:b,width:w}=e.bbox,k=e=>_(m(e,d,g,f)),x=e=>_(p(e,h,y,v)),S=0==d.ori?cd:ud;const C={stroke:new Path2D,fill:null,clip:null,band:null,gaps:null,flags:Ju},E=C.stroke,N=d.dir*(0==d.ori?1:-1);i=Os(u,i,l,1),l=Os(u,i,l,-1);let A=x(u[1==N?i:l]),M=k(c[1==N?i:l]),T=M,L=M;a&&-1==t&&(L=b,S(E,L,A)),S(E,M,A);for(let e=1==N?i:l;e>=i&&e<=l;e+=N){let n=u[e];if(null==n)continue;let r=k(c[e]),a=x(n);1==t?S(E,r,A):S(E,T,a),S(E,r,a),A=a,T=r}let O=T;a&&1==t&&(O=b+w,S(E,O,A));let[P,I]=ed(e,o);if(null!=s.fill||0!=P){let t=C.fill=new Path2D(E),n=x(s.fillTo(e,o,s.min,s.max,P));S(t,O,n),S(t,L,n)}if(!s.spanGaps){let a=[];a.push(...ad(c,u,i,l,N,k,r));let h=s.width*ps/2,m=n||1==t?h:-h,p=n||-1==t?-h:h;a.forEach((e=>{e[0]+=m,e[1]+=p})),C.gaps=a=s.gaps(e,o,i,l,a),C.clip=rd(a,d.ori,f,v,g,y)}return 0!=I&&(C.band=2==I?[nd(e,o,i,l,E,-1),nd(e,o,i,l,E,1)]:nd(e,o,i,l,E,I)),C}))},e.bars=function(e){const t=Hs((e=e||bc).size,[.6,rc,1]),n=e.align||0,r=e.gap||0;let a=e.radius;a=null==a?[0,0]:"number"==typeof a?[a,0]:a;const o=ic(a),i=1-t[0],l=Hs(t[1],rc),s=Hs(t[2],1),c=Hs(e.disp,bc),u=Hs(e.each,(e=>{})),{fill:d,stroke:h}=c;return(e,t,a,m)=>Xu(e,t,((p,f,v,g,y,_,b,w,k,x,S)=>{let C,E,N=p.pxRound,A=n,M=r*ps,T=l*ps,L=s*ps;0==g.ori?[C,E]=o(e,t):[E,C]=o(e,t);const O=g.dir*(0==g.ori?1:-1);let P,I,R,D=0==g.ori?dd:hd,z=0==g.ori?u:(e,t,n,r,a,o,i)=>{u(e,t,n,a,r,i,o)},F=Hs(e.bands,wc).find((e=>e.series[0]==t)),j=null!=F?F.dir:0,H=p.fillTo(e,t,p.min,p.max,j),$=N(b(H,y,S,k)),V=x,U=N(p.width*ps),B=!1,q=null,Y=null,W=null,K=null;null==d||0!=U&&null==h||(B=!0,q=d.values(e,t,a,m),Y=new Map,new Set(q).forEach((e=>{null!=e&&Y.set(e,new Path2D)})),U>0&&(W=h.values(e,t,a,m),K=new Map,new Set(W).forEach((e=>{null!=e&&K.set(e,new Path2D)}))));let{x0:Q,size:Z}=c;if(null!=Q&&null!=Z){A=1,f=Q.values(e,t,a,m),2==Q.unit&&(f=f.map((t=>e.posToVal(w+t*x,g.key,!0))));let n=Z.values(e,t,a,m);I=2==Z.unit?n[0]*x:_(n[0],g,x,w)-_(0,g,x,w),V=kd(f,v,_,g,x,w,V),R=V-I+M}else V=kd(f,v,_,g,x,w,V),R=V*i+M,I=V-R;R<1&&(R=0),U>=I/2&&(U=0),R<5&&(N=lc);let G=R>0;I=N(oc(V-R-(G?U:0),L,T)),P=(0==A?I/2:A==O?0:I)-A*O*((0==A?M/2:0)+(G?U/2:0));const J={stroke:null,fill:null,clip:null,band:null,gaps:null,flags:0},X=B?null:new Path2D;let ee=null;if(null!=F)ee=e.data[F.series[1]];else{let{y0:n,y1:r}=c;null!=n&&null!=r&&(v=r.values(e,t,a,m),ee=n.values(e,t,a,m))}let te=C*I,ne=E*I;for(let n=1==O?a:m;n>=a&&n<=m;n+=O){let r=v[n];if(null==r)continue;if(null!=ee){var re;let e=null!==(re=ee[n])&&void 0!==re?re:0;if(r-e==0)continue;$=b(e,y,S,k)}let a=_(2!=g.distr||null!=c?f[n]:n,g,x,w),o=b(Hs(r,H),y,S,k),i=N(a-P),l=N(Gs(o,$)),s=N(Zs(o,$)),u=l-s;if(null!=r){let a=r<0?ne:te,o=r<0?te:ne;B?(U>0&&null!=W[n]&&D(K.get(W[n]),i,s+Ws(U/2),I,Gs(0,u-U),a,o),null!=q[n]&&D(Y.get(q[n]),i,s+Ws(U/2),I,Gs(0,u-U),a,o)):D(X,i,s+Ws(U/2),I,Gs(0,u-U),a,o),z(e,t,n,i-U/2,s,I+U,u)}}if(U>0)J.stroke=B?K:X;else if(!B){var ae;J._fill=0==p.width?p._fill:null!==(ae=p._stroke)&&void 0!==ae?ae:p._fill,J.width=0}return J.fill=B?Y:X,J}))},e.spline=function(e){return function(e,t){const n=Hs(null===t||void 0===t?void 0:t.alignGaps,0);return(t,r,a,o)=>Xu(t,r,((i,l,s,c,u,d,h,m,p,f,v)=>{let g,y,_,b=i.pxRound,w=e=>b(d(e,c,f,m)),k=e=>b(h(e,u,v,p));0==c.ori?(g=ld,_=cd,y=fd):(g=sd,_=ud,y=vd);const x=c.dir*(0==c.ori?1:-1);a=Os(s,a,o,1),o=Os(s,a,o,-1);let S=w(l[1==x?a:o]),C=S,E=[],N=[];for(let e=1==x?a:o;e>=a&&e<=o;e+=x)if(null!=s[e]){let t=w(l[e]);E.push(C=t),N.push(k(s[e]))}const A={stroke:e(E,N,g,_,y,b),fill:null,clip:null,band:null,gaps:null,flags:Ju},M=A.stroke;let[T,L]=ed(t,r);if(null!=i.fill||0!=T){let e=A.fill=new Path2D(M),n=k(i.fillTo(t,r,i.min,i.max,T));_(e,C,n),_(e,S,n)}if(!i.spanGaps){let e=[];e.push(...ad(l,s,a,o,x,w,n)),A.gaps=e=i.gaps(t,r,a,o,e),A.clip=rd(e,c.ori,m,p,f,v)}return 0!=L&&(A.band=2==L?[nd(t,r,a,o,M,-1),nd(t,r,a,o,M,1)]:nd(t,r,a,o,M,L)),A}))}(xd,e)}}const $d=e=>{let t=e.length,n=-1/0;for(;t--;){const r=e[t];Number.isFinite(r)&&r>n&&(n=r)}return Number.isFinite(n)?n:null},Vd=e=>{let t=e.length,n=1/0;for(;t--;){const r=e[t];Number.isFinite(r)&&r{let t=e.length;const n=[];for(;t--;){const r=e[t];Number.isFinite(r)&&n.push(r)}return n.sort(),n[n.length>>1]},Bd=e=>{let t=e.length;for(;t--;){const n=e[t];if(Number.isFinite(n))return n}},qd=(e,t,n)=>{if(void 0===e||null===e)return"";n=n||0,t=t||0;const r=Math.abs(n-t);if(isNaN(r)||0==r)return Math.abs(e)>=1e3?e.toLocaleString("en-US"):e.toString();let a=3+Math.floor(1+Math.log10(Math.max(Math.abs(t),Math.abs(n)))-Math.log10(r));return(isNaN(a)||a>20)&&(a=20),e.toLocaleString("en-US",{minimumSignificantDigits:1,maximumSignificantDigits:a})},Yd=e=>{const t=(null===e||void 0===e?void 0:e.metric)||{},n=Object.keys(t).filter((e=>"__name__"!=e)).map((e=>"".concat(e,"=").concat(JSON.stringify(t[e]))));let r=t.__name__||"";return n.length>0&&(r+="{"+n.join(",")+"}"),r},Wd=[[31536e3,"{YYYY}",null,null,null,null,null,null,1],[2419200,"{MMM}","\n{YYYY}",null,null,null,null,null,1],[86400,"{MM}-{DD}","\n{YYYY}",null,null,null,null,null,1],[3600,"{HH}:{mm}","\n{YYYY}-{MM}-{DD}",null,"\n{MM}-{DD}",null,null,null,1],[60,"{HH}:{mm}","\n{YYYY}-{MM}-{DD}",null,"\n{MM}-{DD}",null,null,null,1],[1,"{HH}:{mm}:{ss}","\n{YYYY}-{MM}-{DD}",null,"\n{MM}-{DD} {HH}:{mm}",null,null,null,1],[.001,":{ss}.{fff}","\n{YYYY}-{MM}-{DD} {HH}:{mm}",null,"\n{MM}-{DD} {HH}:{mm}",null,"\n{HH}:{mm}",null,1]],Kd=(e,t)=>Array.from(new Set(e.map((e=>e.scale)))).map((e=>{const n="10px Arial",r=gt("color-text"),a={scale:e,show:!0,size:Zd,stroke:r,font:n,values:(e,n)=>function(e,t){let n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:"";const r=t[0],a=t[t.length-1];return n?t.map((e=>"".concat(qd(e,r,a)," ").concat(n))):t.map((e=>qd(e,r,a)))}(e,n,t)};return e?Number(e)%2||"y"===e?a:{...a,side:1}:{space:80,values:Wd,stroke:r,font:n}})),Qd=(e,t)=>{if(null==e||null==t)return[-1,1];const n=.02*(Math.abs(t-e)||Math.abs(e)||1);return[e-n,t+n]},Zd=(e,t,n,r)=>{var a;const o=e.axes[n];if(r>1)return o._size||60;let i=6+((null===o||void 0===o||null===(a=o.ticks)||void 0===a?void 0:a.size)||0)+(o.gap||0);const l=(null!==t&&void 0!==t?t:[]).reduce(((e,t)=>(null===t||void 0===t?void 0:t.length)>e.length?t:e),"");return""!=l&&(i+=((e,t)=>{const n=document.createElement("span");n.innerText=e,n.style.cssText="position: absolute; z-index: -1; pointer-events: none; opacity: 0; font: ".concat(t),document.body.appendChild(n);const r=n.offsetWidth;return n.remove(),r})(l,"10px Arial")),Math.ceil(i)},Gd=["#e54040","#32a9dc","#2ee329","#7126a1","#e38f0f","#3d811a","#ffea00","#2d2d2d","#da42a6","#a44e0c"],Jd=e=>{if(7!=e.length)return"0, 0, 0";const t=parseInt(e.slice(1,3),16),n=parseInt(e.slice(3,5),16),r=parseInt(e.slice(5,7),16);return"".concat(t,", ").concat(n,", ").concat(r)},Xd={[ht.yhatUpper]:"#7126a1",[ht.yhatLower]:"#7126a1",[ht.yhat]:"#da42a6",[ht.anomaly]:"#da4242",[ht.anomalyScore]:"#7126a1",[ht.actual]:"#203ea9",[ht.training]:"rgba(".concat(Jd("#203ea9"),", 0.2)")},eh=e=>{const t=16777215;let n=1,r=0,a=1;if(e.length>0)for(let i=0;ir&&(r=e[i].charCodeAt(0)),a=parseInt(String(t/r)),n=(n+e[i].charCodeAt(0)*a*49979693)%t;let o=(n*e.length%t).toString(16);return o=o.padEnd(6,o),"#".concat(o)},th=((e,t,n)=>{const r=[];for(let a=0;aMath.round(e))).join(", "))}return r.map((e=>"rgb(".concat(e,")")))})([246,226,219],[127,39,4],16),nh=()=>(e,t)=>{const n=Math.round(devicePixelRatio);Hd.orient(e,t,((r,a,o,i,l,s,c,u,d,h,m,p,f,v)=>{const[g,y,_]=e.data[t],b=g.length,w=((e,t)=>{const n=e.data[t][2],r=th;let a=1/0,o=-1/0;for(let c=0;c0&&(a=Math.min(a,n[c]),o=Math.max(o,n[c]));const i=o-a,l=r.length,s=Array(n.length);for(let c=0;cnew Path2D)),S=b-y.lastIndexOf(y[0]),C=b/S,E=y[1]-y[0],N=g[S]-g[0],A=s(N,i,h,u)-s(0,i,h,u)-n,M=c(E,l,m,d)-c(0,l,m,d)+n,T=y.slice(0,S).map((e=>Math.round(c(e,l,m,d)-M/2))),L=Array.from({length:C},((e,t)=>Math.round(s(g[t*S],i,h,u)-A)));for(let e=0;e0&&g[e]>=(i.min||-1/0)&&g[e]<=(i.max||1/0)&&y[e]>=(l.min||-1/0)&&y[e]<=(l.max||1/0)){const t=L[~~(e/S)],n=T[e%S];v(x[w[e]],t,n,A,M)}e.ctx.save(),e.ctx.rect(e.bbox.left,e.bbox.top,e.bbox.width,e.bbox.height),e.ctx.clip(),x.forEach(((t,n)=>{e.ctx.fillStyle=k[n],e.ctx.fill(t)})),e.ctx.restore()}))},rh=e=>{const t=(e.metric.vmrange||e.metric.le||"").split("...");return Ml(t[t.length-1])},ah=(e,t)=>rh(e)-rh(t),oh=(e,t)=>{if(!t)return e;const n=(e=>{var t;if(!e.every((e=>e.metric.le)))return e;const n=e.sort(((e,t)=>parseFloat(e.metric.le)-parseFloat(t.metric.le))),r=(null===(t=e[0])||void 0===t?void 0:t.group)||1;let a={metric:{le:""},values:[],group:r};const o=[];for(const l of n){const e=[a.metric.le,l.metric.le].filter((e=>e)).join("..."),t=[];for(const[n,r]of l.values){var i;const e=+r-+((null===(i=a.values.find((e=>e[0]===n)))||void 0===i?void 0:i[1])||0);t.push([n,"".concat(e)])}o.push({metric:{vmrange:e},values:t,group:r}),a=l}return o})(e.sort(ah)),r={};n.forEach((e=>e.values.forEach((e=>{let[t,n]=e;r[t]=(r[t]||0)+ +n}))));return n.map((e=>{const t=e.values.map((e=>{let[t,n]=e;const a=r[t];return[t,"".concat(Math.round(+n/a*100))]}));return{...e,values:t}})).filter((e=>!e.values.every((e=>"0"===e[1]))))},ih=e=>{const t=["__name__","for"];return Object.entries(e).filter((e=>{let[n]=e;return!t.includes(n)})).map((e=>{let[t,n]=e;return"".concat(t,": ").concat(n)})).join(",")},lh=(e,t,n,r)=>{const a={},o=r?0:Math.min(e.length,Gd.length);for(let i=0;i{const l=r?(e=>{const t=(null===e||void 0===e?void 0:e.__name__)||"",n=new RegExp("(".concat(Object.values(ht).join("|"),")$")),r=t.match(n),a=r&&r[0];return{value:/(?:^|[^a-zA-Z0-9_])y(?:$|[^a-zA-Z0-9_])/.test(t)?ht.actual:a,group:ih(e)}})(e[i].metric):null,s=r?(null===l||void 0===l?void 0:l.group)||"":Al(o,n[o.group-1]);return{label:s,dash:hh(l),width:mh(l),stroke:fh({metricInfo:l,label:s,isAnomalyUI:r,colorState:a}),points:ph(l),spanGaps:!1,forecast:null===l||void 0===l?void 0:l.value,forecastGroup:null===l||void 0===l?void 0:l.group,freeFormFields:o.metric,show:!uh(s,t),scale:"1",...sh(o)}}},sh=e=>{const t=e.values.map((e=>Ml(e[1]))),{min:n,max:r,median:a,last:o}={min:Vd(t),max:$d(t),median:Ud(t),last:Bd(t)};return{median:a,statsFormatted:{min:qd(n,n,r),max:qd(r,n,r),median:qd(a,n,r),last:qd(o,n,r)}}},ch=(e,t)=>({group:t,label:e.label||"",color:e.stroke,checked:e.show||!1,freeFormFields:e.freeFormFields,statsFormatted:e.statsFormatted,median:e.median}),uh=(e,t)=>t.includes("".concat(e)),dh=e=>{for(let t=e.series.length-1;t>=0;t--)e.delSeries(t)},hh=e=>{const t=(null===e||void 0===e?void 0:e.value)===ht.yhatLower,n=(null===e||void 0===e?void 0:e.value)===ht.yhatUpper,r=(null===e||void 0===e?void 0:e.value)===ht.yhat;return t||n?[10,5]:r?[10,2]:[]},mh=e=>{const t=(null===e||void 0===e?void 0:e.value)===ht.yhatLower,n=(null===e||void 0===e?void 0:e.value)===ht.yhatUpper,r=(null===e||void 0===e?void 0:e.value)===ht.yhat,a=(null===e||void 0===e?void 0:e.value)===ht.anomaly;return n||t?.7:r?1:a?0:1.4},ph=e=>(null===e||void 0===e?void 0:e.value)===ht.anomaly?{size:8,width:4,space:0}:{size:4.2,width:1.4},fh=e=>{let{metricInfo:t,label:n,isAnomalyUI:r,colorState:a}=e;const o=a[n]||eh(n),i=(null===t||void 0===t?void 0:t.value)===ht.anomaly;return r&&i?Xd[ht.anomaly]:!r||i||null!==t&&void 0!==t&&t.value?null!==t&&void 0!==t&&t.value?null!==t&&void 0!==t&&t.value?Xd[null===t||void 0===t?void 0:t.value]:o:a[n]||eh(n):Xd[ht.actual]},vh=e=>{let{width:t=400,height:n=500}=e;return{width:t,height:n,series:[],tzDate:e=>o()(Xt(tn(e))).local().toDate(),legend:{show:!1},cursor:{drag:{x:!0,y:!1},focus:{prox:30},points:{size:5.6,width:1.4},bind:{click:()=>null,dblclick:()=>null}}}},gh=e=>{dh(e),(e=>{Object.keys(e.hooks).forEach((t=>{e.hooks[t]=[]}))})(e),e.setData([])},yh=e=>{let{min:t,max:n}=e;return[t,n]},_h=function(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:0,n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:1,r=arguments.length>3?arguments[3]:void 0,a=arguments.length>4?arguments[4]:void 0;return a.limits.enable?a.limits.range[r]:Qd(t,n)},bh=(e,t)=>{const n={x:{range:()=>yh(t)}},r=Object.keys(e.limits.range);return(r.length?r:["1"]).forEach((t=>{n[t]={range:function(n){return _h(n,arguments.length>1&&void 0!==arguments[1]?arguments[1]:0,arguments.length>2&&void 0!==arguments[2]?arguments[2]:1,t,e)}}})),n},wh=e=>t=>{const n=t.posToVal(t.select.left,"x"),r=t.posToVal(t.select.left+t.select.width,"x");e({min:n,max:r})};function kh(e){const t=Jd(Xd[e]);return"rgba(".concat(t,", 0.05)")}const xh=e=>(e=>e instanceof MouseEvent)(e)?e.clientX:e.touches[0].clientX,Sh=e=>{let{dragSpeed:t=.85,setPanning:n,setPlotScale:a}=e;const o=(0,r.useRef)({leftStart:0,xUnitsPerPx:0,scXMin:0,scXMax:0}),i=e=>{e.preventDefault();const n=xh(e),{leftStart:r,xUnitsPerPx:i,scXMin:l,scXMax:s}=o.current,c=i*((n-r)*t);a({min:l-c,max:s-c})},l=()=>{n(!1),document.removeEventListener("mousemove",i),document.removeEventListener("mouseup",l),document.removeEventListener("touchmove",i),document.removeEventListener("touchend",l)};return e=>{let{e:t,u:r}=e;t.preventDefault(),n(!0),o.current={leftStart:xh(t),xUnitsPerPx:r.posToVal(1,"x")-r.posToVal(0,"x"),scXMin:r.scales.x.min||0,scXMax:r.scales.x.max||0},document.addEventListener("mousemove",i),document.addEventListener("mouseup",l),document.addEventListener("touchmove",i),document.addEventListener("touchend",l)}},Ch=e=>{const[t,n]=(0,r.useState)(!1),a=Sh({dragSpeed:.9,setPanning:n,setPlotScale:e});return{onReadyChart:t=>{const n=e=>{const n=e instanceof MouseEvent&&(e=>{const{ctrlKey:t,metaKey:n,button:r}=e;return 0===r&&(t||n)})(e),r=window.TouchEvent&&e instanceof TouchEvent&&e.touches.length>1;(n||r)&&a({u:t,e:e})};t.over.addEventListener("mousedown",n),t.over.addEventListener("touchstart",n),t.over.addEventListener("wheel",(n=>{if(!n.ctrlKey&&!n.metaKey)return;n.preventDefault();const{width:r}=t.over.getBoundingClientRect(),a=t.cursor.left&&t.cursor.left>0?t.cursor.left:0,o=t.posToVal(a,"x"),i=(t.scales.x.max||0)-(t.scales.x.min||0),l=n.deltaY<0?.9*i:i/.9,s=o-a/r*l,c=s+l;t.batch((()=>e({min:s,max:c})))}))},isPanning:t}},Eh=e=>{const t=e[0].clientX-e[1].clientX,n=e[0].clientY-e[1].clientY;return Math.sqrt(t*t+n*n)},Nh=e=>{let{uPlotInst:t,xRange:n,setPlotScale:a}=e;const[o,i]=(0,r.useState)(0),l=(0,r.useCallback)((e=>{const{target:r,ctrlKey:o,metaKey:i,key:l}=e,s=r instanceof HTMLInputElement||r instanceof HTMLTextAreaElement;if(!t||s)return;const c="+"===l||"="===l;if(("-"===l||c)&&!(o||i)){e.preventDefault();const t=(n.max-n.min)/10*(c?1:-1);a({min:n.min+t,max:n.max-t})}}),[t,n]),s=(0,r.useCallback)((e=>{if(!t||2!==e.touches.length)return;e.preventDefault();const r=Eh(e.touches),i=o-r,l=t.scales.x.max||n.max,s=t.scales.x.min||n.min,c=(l-s)/50*(i>0?-1:1);t.batch((()=>a({min:s+c,max:l-c})))}),[t,o,n]);return Ar("keydown",l),Ar("touchmove",s),Ar("touchstart",(e=>{2===e.touches.length&&(e.preventDefault(),i(Eh(e.touches)))})),null},Ah=e=>{let{period:t,setPeriod:n}=e;const[a,i]=(0,r.useState)({min:t.start,max:t.end});return(0,r.useEffect)((()=>{i({min:t.start,max:t.end})}),[t]),{xRange:a,setPlotScale:e=>{let{min:t,max:r}=e;const a=1e3*(r-t);aHt||n({from:o()(1e3*t).toDate(),to:o()(1e3*r).toDate()})}}},Mh=e=>{let{u:t,metrics:n,series:a,unit:i,isAnomalyView:l}=e;const[s,c]=(0,r.useState)(!1),[u,d]=(0,r.useState)({seriesIdx:-1,dataIdx:-1}),[h,m]=(0,r.useState)([]),p=(0,r.useCallback)((()=>{const{seriesIdx:e,dataIdx:r}=u,s=n[e-1],c=a[e],d=new Set(n.map((e=>e.group))),h=(null===s||void 0===s?void 0:s.group)||0,m=it()(t,["data",e,r],0),p=it()(t,["scales","1","min"],0),f=it()(t,["scales","1","max"],1),v=it()(t,["data",0,r],0),g={top:t?t.valToPos(m||0,(null===c||void 0===c?void 0:c.scale)||"1"):0,left:t?t.valToPos(v,"x"):0};return{unit:i,point:g,u:t,id:"".concat(e,"_").concat(r),title:d.size>1&&!l?"Query ".concat(h):"",dates:[v?o()(1e3*v).tz().format(It):"-"],value:qd(m,p,f),info:Yd(s),statsFormatted:null===c||void 0===c?void 0:c.statsFormatted,marker:"".concat(null===c||void 0===c?void 0:c.stroke)}}),[t,u,n,a,i,l]),f=(0,r.useCallback)((()=>{if(!s)return;const e=p();h.find((t=>t.id===e.id))||m((t=>[...t,e]))}),[p,h,s]);return(0,r.useEffect)((()=>{c(-1!==u.dataIdx&&-1!==u.seriesIdx)}),[u]),Ar("click",f),{showTooltip:s,stickyTooltips:h,handleUnStick:e=>{m((t=>t.filter((t=>t.id!==e))))},getTooltipProps:p,seriesFocus:(e,t)=>{const n=null!==t&&void 0!==t?t:-1;d((e=>({...e,seriesIdx:n})))},setCursor:e=>{var t;const n=null!==(t=e.cursor.idx)&&void 0!==t?t:-1;d((e=>({...e,dataIdx:n})))},resetTooltips:()=>{m([]),d({seriesIdx:-1,dataIdx:-1})}}},Th=e=>{let{u:t,id:n,title:a,dates:o,value:i,point:l,unit:s="",info:c,statsFormatted:u,isSticky:d,marker:h,onClose:m}=e;const p=(0,r.useRef)(null),[f,v]=(0,r.useState)({top:-999,left:-999}),[g,y]=(0,r.useState)(!1),[_,b]=(0,r.useState)(!1),w=(0,r.useCallback)((e=>{if(!g)return;const{clientX:t,clientY:n}=e;v({top:n,left:t})}),[g]);return(0,r.useEffect)((()=>{if(!p.current||!t)return;const{top:e,left:n}=l,r=parseFloat(t.over.style.left),a=parseFloat(t.over.style.top),{width:o,height:i}=t.over.getBoundingClientRect(),{width:s,height:c}=p.current.getBoundingClientRect(),u={top:e+a+10-(e+c>=i?c+20:0),left:n+r+10-(n+s>=o?s+20:0)};u.left<0&&(u.left=20),u.top<0&&(u.top=20),v(u)}),[t,i,l,p]),Ar("mousemove",w),Ar("mouseup",(()=>{y(!1)})),t?r.default.createPortal(Nt("div",{className:Cr()({"vm-chart-tooltip":!0,"vm-chart-tooltip_sticky":d,"vm-chart-tooltip_moved":_}),ref:p,style:f,children:[Nt("div",{className:"vm-chart-tooltip-header",children:[a&&Nt("div",{className:"vm-chart-tooltip-header__title",children:a}),Nt("div",{className:"vm-chart-tooltip-header__date",children:o.map(((e,t)=>Nt("span",{children:e},t)))}),d&&Nt(Ct.FK,{children:[Nt(ma,{className:"vm-chart-tooltip-header__drag",variant:"text",size:"small",startIcon:Nt(ar,{}),onMouseDown:e=>{b(!0),y(!0);const{clientX:t,clientY:n}=e;v({top:n,left:t})},ariaLabel:"drag the tooltip"}),Nt(ma,{className:"vm-chart-tooltip-header__close",variant:"text",size:"small",startIcon:Nt(On,{}),onClick:()=>{m&&m(n)},ariaLabel:"close the tooltip"})]})]}),Nt("div",{className:"vm-chart-tooltip-data",children:[h&&Nt("span",{className:"vm-chart-tooltip-data__marker",style:{background:h}}),Nt("p",{className:"vm-chart-tooltip-data__value",children:[Nt("b",{children:i}),s]})]}),u&&Nt("table",{className:"vm-chart-tooltip-stats",children:ct.map(((e,t)=>Nt("div",{className:"vm-chart-tooltip-stats-row",children:[Nt("span",{className:"vm-chart-tooltip-stats-row__key",children:[e,":"]}),Nt("span",{className:"vm-chart-tooltip-stats-row__value",children:u[e]})]},t)))}),c&&Nt("p",{className:"vm-chart-tooltip__info",children:c})]}),t.root):null},Lh=e=>{let{showTooltip:t,tooltipProps:n,stickyTooltips:a,handleUnStick:o}=e;return Nt(Ct.FK,{children:[t&&n&&Nt(Th,{...n}),a.map((e=>(0,r.createElement)(Th,{...e,isSticky:!0,key:e.id,onClose:o})))]})},Oh=e=>{let{data:t,series:n,metrics:a=[],period:o,yaxis:i,unit:l,setPeriod:s,layoutSize:c,height:u,isAnomalyView:d,spanGaps:h=!1}=e;const{isDarkTheme:m}=Mt(),p=(0,r.useRef)(null),[f,v]=(0,r.useState)(),{xRange:g,setPlotScale:y}=Ah({period:o,setPeriod:s}),{onReadyChart:_,isPanning:b}=Ch(y);Nh({uPlotInst:f,xRange:g,setPlotScale:y});const{showTooltip:w,stickyTooltips:k,handleUnStick:x,getTooltipProps:S,seriesFocus:C,setCursor:E,resetTooltips:N}=Mh({u:f,metrics:a,series:n,unit:l,isAnomalyView:d}),A={...vh({width:c.width,height:u}),series:n,axes:Kd([{},{scale:"1"}],l),scales:bh(i,g),hooks:{ready:[_],setSeries:[C],setCursor:[E],setSelect:[wh(y)],destroy:[gh]},bands:[]};return(0,r.useEffect)((()=>{if(N(),!p.current)return;f&&f.destroy();const e=new Hd(A,t,p.current);return v(e),e.destroy}),[p,m]),(0,r.useEffect)((()=>{f&&(f.setData(t),f.redraw())}),[t]),(0,r.useEffect)((()=>{f&&(dh(f),function(e,t){let n=arguments.length>2&&void 0!==arguments[2]&&arguments[2];t.forEach((t=>{t.label&&(t.spanGaps=n),e.addSeries(t)}))}(f,n,h),((e,t)=>{if(e.delBand(),t.length<2)return;const n=t.map(((e,t)=>({...e,index:t}))),r=n.filter((e=>e.forecast===ht.yhatUpper)),a=n.filter((e=>e.forecast===ht.yhatLower)),o=r.map((e=>{const t=a.find((t=>t.forecastGroup===e.forecastGroup));return t?{series:[e.index,t.index],fill:kh(ht.yhatUpper)}:null})).filter((e=>null!==e));o.length&&o.forEach((t=>{e.addBand(t)}))})(f,n),f.redraw())}),[n,h]),(0,r.useEffect)((()=>{f&&(Object.keys(i.limits.range).forEach((e=>{f.scales[e]&&(f.scales[e].range=function(t){return _h(t,arguments.length>1&&void 0!==arguments[1]?arguments[1]:0,arguments.length>2&&void 0!==arguments[2]?arguments[2]:1,e,i)})})),f.redraw())}),[i]),(0,r.useEffect)((()=>{f&&(f.scales.x.range=()=>yh(g),f.redraw())}),[g]),(0,r.useEffect)((()=>{f&&(f.setSize({width:c.width||400,height:u||500}),f.redraw())}),[u,c]),Nt("div",{className:Cr()({"vm-line-chart":!0,"vm-line-chart_panning":b}),style:{minWidth:"".concat(c.width||400,"px"),minHeight:"".concat(u||500,"px")},children:[Nt("div",{className:"vm-line-chart__u-plot",ref:p}),Nt(Lh,{showTooltip:w,tooltipProps:S(),stickyTooltips:k,handleUnStick:x})]})},Ph=e=>{let{legend:t,onChange:n,isHeatmap:a,isAnomalyView:o}=e;const i=gl(),l=(0,r.useMemo)((()=>{const e=(e=>{const t=Object.keys(e.freeFormFields).filter((e=>"__name__"!==e));return t.map((t=>{const n="".concat(t,"=").concat(JSON.stringify(e.freeFormFields[t]));return{id:"".concat(e.label,".").concat(n),freeField:n,key:t}}))})(t);return a?e.filter((e=>"vmrange"!==e.key)):e}),[t,a]),s=t.statsFormatted,c=Object.values(s).some((e=>e)),u=e=>t=>{t.stopPropagation(),(async e=>{await i(e,"".concat(e," has been copied"))})(e)};return Nt("div",{className:Cr()({"vm-legend-item":!0,"vm-legend-row":!0,"vm-legend-item_hide":!t.checked&&!a,"vm-legend-item_static":a}),onClick:(e=>t=>{n&&n(e,t.ctrlKey||t.metaKey)})(t),children:[!o&&!a&&Nt("div",{className:"vm-legend-item__marker",style:{backgroundColor:t.color}}),Nt("div",{className:"vm-legend-item-info",children:Nt("span",{className:"vm-legend-item-info__label",children:[t.freeFormFields.__name__,!!l.length&&Nt(Ct.FK,{children:"{"}),l.map(((e,t)=>Nt("span",{className:"vm-legend-item-info__free-fields",onClick:u(e.freeField),title:"copy to clipboard",children:[e.freeField,t+1Nt("div",{className:"vm-legend-item-stats-row",children:[Nt("span",{className:"vm-legend-item-stats-row__key",children:[e,":"]}),Nt("span",{className:"vm-legend-item-stats-row__value",children:s[e]})]},t)))})]})},Ih=e=>{let{labels:t,query:n,isAnomalyView:a,onChange:o}=e;const i=(0,r.useMemo)((()=>Array.from(new Set(t.map((e=>e.group))))),[t]),l=i.length>1;return Nt(Ct.FK,{children:Nt("div",{className:"vm-legend",children:i.map((e=>Nt("div",{className:"vm-legend-group",children:Nt(ko,{defaultExpanded:!0,title:Nt("div",{className:"vm-legend-group-title",children:[l&&Nt("span",{className:"vm-legend-group-title__count",children:["Query ",e,": "]}),Nt("span",{className:"vm-legend-group-title__query",children:n[e-1]})]}),children:Nt("div",{children:t.filter((t=>t.group===e)).sort(((e,t)=>(t.median||0)-(e.median||0))).map((e=>Nt(Ph,{legend:e,isAnomalyView:a,onChange:o},e.label)))})})},e)))})})},Rh=e=>{var t;let{min:n,max:a,legendValue:o,series:i}=e;const[l,s]=(0,r.useState)(0),[c,u]=(0,r.useState)(""),[d,h]=(0,r.useState)(""),[m,p]=(0,r.useState)(""),f=(0,r.useMemo)((()=>parseFloat(String((null===o||void 0===o?void 0:o.value)||0).replace("%",""))),[o]);return(0,r.useEffect)((()=>{s(f?(f-n)/(a-n)*100:0),u(f?"".concat(f,"%"):""),h("".concat(n,"%")),p("".concat(a,"%"))}),[f,n,a]),Nt("div",{className:"vm-legend-heatmap__wrapper",children:[Nt("div",{className:"vm-legend-heatmap",children:[Nt("div",{className:"vm-legend-heatmap-gradient",style:{background:"linear-gradient(to right, ".concat(th.join(", "),")")},children:!!f&&Nt("div",{className:"vm-legend-heatmap-gradient__value",style:{left:"".concat(l,"%")},children:Nt("span",{children:c})})}),Nt("div",{className:"vm-legend-heatmap__value",children:d}),Nt("div",{className:"vm-legend-heatmap__value",children:m})]}),i[1]&&Nt(Ph,{legend:i[1],isHeatmap:!0},null===(t=i[1])||void 0===t?void 0:t.label)]})},Dh=e=>{let{u:t,metrics:n,unit:a}=e;const[i,l]=(0,r.useState)({left:0,top:0}),[s,c]=(0,r.useState)([]),u=(0,r.useCallback)((()=>{var e;const{left:r,top:l}=i,s=it()(t,["data",1,0],[])||[],c=t?t.posToVal(r,"x"):0,u=t?t.posToVal(l,"y"):0,d=s.findIndex(((e,t)=>c>=e&&ce[0]===h))||[],v=s[d],g=o()(1e3*v).tz().format(It),y=o()(1e3*p).tz().format(It),_=(null===m||void 0===m||null===(e=m.metric)||void 0===e?void 0:e.vmrange)||"";return{unit:a,point:i,u:t,id:"".concat(_,"_").concat(g),dates:[g,y],value:"".concat(f,"%"),info:_,show:+f>0}}),[t,i,n,a]),d=(0,r.useCallback)((()=>{const e=u();e.show&&(s.find((t=>t.id===e.id))||c((t=>[...t,e])))}),[u,s]);return Ar("click",d),{stickyTooltips:s,handleUnStick:e=>{c((t=>t.filter((t=>t.id!==e))))},getTooltipProps:u,setCursor:e=>{const t=e.cursor.left||0,n=e.cursor.top||0;l({left:t,top:n})},resetTooltips:()=>{c([]),l({left:0,top:0})}}},zh=e=>{let{data:t,metrics:n=[],period:a,unit:o,setPeriod:i,layoutSize:l,height:s,onChangeLegend:c}=e;const{isDarkTheme:u}=Mt(),d=(0,r.useRef)(null),[h,m]=(0,r.useState)(),{xRange:p,setPlotScale:f}=Ah({period:a,setPeriod:i}),{onReadyChart:v,isPanning:g}=Ch(f);Nh({uPlotInst:h,xRange:p,setPlotScale:f});const{stickyTooltips:y,handleUnStick:_,getTooltipProps:b,setCursor:w,resetTooltips:k}=Dh({u:h,metrics:n,unit:o}),x=(0,r.useMemo)((()=>b()),[b]),S={...vh({width:l.width,height:s}),mode:2,series:[{},{paths:nh(),facets:[{scale:"x",auto:!0,sorted:1},{scale:"y",auto:!0}]}],axes:(()=>{const e=Kd([{}],o);return[...e,{scale:"y",stroke:e[0].stroke,font:e[0].font,size:Zd,splits:n.map(((e,t)=>t)),values:n.map((e=>e.metric.vmrange))}]})(),scales:{x:{time:!0},y:{log:2,time:!1,range:(e,t,n)=>[t-1,n+1]}},hooks:{ready:[v],setCursor:[w],setSelect:[wh(f)],destroy:[gh]}};return(0,r.useEffect)((()=>{k();const e=null===t[0]&&Array.isArray(t[1]);if(!d.current||!e)return;const n=new Hd(S,t,d.current);return m(n),n.destroy}),[d,t,u]),(0,r.useEffect)((()=>{h&&(h.setSize({width:l.width||400,height:s||500}),h.redraw())}),[s,l]),(0,r.useEffect)((()=>{c(x)}),[x]),Nt("div",{className:Cr()({"vm-line-chart":!0,"vm-line-chart_panning":g}),style:{minWidth:"".concat(l.width||400,"px"),minHeight:"".concat(s||500,"px")},children:[Nt("div",{className:"vm-line-chart__u-plot",ref:d}),Nt(Lh,{showTooltip:!!x.show,tooltipProps:x,stickyTooltips:y,handleUnStick:_})]})},Fh=()=>{const[e,t]=(0,r.useState)(null),[n,a]=(0,r.useState)({width:0,height:0}),o=(0,r.useCallback)((()=>{a({width:(null===e||void 0===e?void 0:e.offsetWidth)||0,height:(null===e||void 0===e?void 0:e.offsetHeight)||0})}),[null===e||void 0===e?void 0:e.offsetHeight,null===e||void 0===e?void 0:e.offsetWidth]);return Ar("resize",o),(0,r.useEffect)(o,[null===e||void 0===e?void 0:e.offsetHeight,null===e||void 0===e?void 0:e.offsetWidth]),[t,n]},jh={[ht.yhat]:"yhat",[ht.yhatLower]:"yhat_upper - yhat_lower",[ht.yhatUpper]:"yhat_upper - yhat_lower",[ht.anomaly]:"anomalies",[ht.training]:"training data",[ht.actual]:"y"},Hh=e=>{let{series:t}=e;const n=(0,r.useMemo)((()=>{const e=t.reduce(((e,t)=>{const n=Object.prototype.hasOwnProperty.call(t,"forecast"),r=t.forecast!==ht.yhatUpper,a=!e.find((e=>e.forecast===t.forecast));return n&&a&&r&&e.push(t),e}),[]),n={...e[0],forecast:ht.training,color:Xd[ht.training]};return e.splice(1,0,n),e.map((e=>({...e,color:"string"===typeof e.stroke?e.stroke:Xd[e.forecast||ht.actual]})))}),[t]);return Nt(Ct.FK,{children:Nt("div",{className:"vm-legend-anomaly",children:n.filter((e=>e.forecast!==ht.training)).map(((e,t)=>{var n;return Nt("div",{className:"vm-legend-anomaly-item",children:[Nt("svg",{children:e.forecast===ht.anomaly?Nt("circle",{cx:"15",cy:"7",r:"4",fill:e.color,stroke:e.color,strokeWidth:"1.4"}):Nt("line",{x1:"0",y1:"7",x2:"30",y2:"7",stroke:e.color,strokeWidth:e.width||1,strokeDasharray:null===(n=e.dash)||void 0===n?void 0:n.join(",")})}),Nt("div",{className:"vm-legend-anomaly-item__title",children:jh[e.forecast||ht.actual]})]},"".concat(t,"_").concat(e.forecast))}))})})},$h=e=>{let{data:t=[],period:n,customStep:a,query:o,yaxis:i,unit:l,showLegend:s=!0,setYaxisLimits:c,setPeriod:u,alias:d=[],fullWidth:h=!0,height:m,isHistogram:p,isAnomalyView:f,spanGaps:v}=e;const{isMobile:g}=ea(),{timezone:y}=fn(),_=(0,r.useMemo)((()=>a||n.step||"1s"),[n.step,a]),b=(0,r.useMemo)((()=>oh(t,p)),[p,t]),[w,k]=(0,r.useState)([[]]),[x,S]=(0,r.useState)([]),[C,E]=(0,r.useState)([]),[N,A]=(0,r.useState)([]),[M,T]=(0,r.useState)(null),L=(0,r.useMemo)((()=>lh(b,N,d,f)),[b,N,d,f]),O=e=>{const t=((e,t)=>{const n={},r=Object.values(e).flat(),a=Vd(r)||0,o=$d(r)||1;return n[1]=t?Qd(a,o):[a,o],n})(e,!p);c(t)},P=e=>{if(!f)return e;const t=function(e,t){const n=e.reduce(((e,n)=>{const r=t.map((e=>"".concat(e,": ").concat(n[e]||"-"))).join("|");return(e[r]=e[r]||[]).push(n),e}),{});return Object.entries(n).map((e=>{let[t,n]=e;return{keys:t.split("|"),values:n}}))}(e,["group","label"]);return t.map((e=>{const t=e.values[0];return{...t,freeFormFields:{...t.freeFormFields,__name__:""}}}))};(0,r.useEffect)((()=>{const e=[],t={},r=[],a=[{}];null===b||void 0===b||b.forEach(((n,o)=>{const i=L(n,o);a.push(i),r.push(ch(i,n.group));const l=t[n.group]||[];for(const t of n.values)e.push(t[0]),l.push(Ml(t[1]));t[n.group]=l}));const o=((e,t,n)=>{const r=Qt(t)||1,a=Array.from(new Set(e)).sort(((e,t)=>e-t));let o=n.start;const i=qt(n.end+r);let l=0;const s=[];for(;o<=i;){for(;l=a.length||a[l]>o)&&s.push(o)}for(;s.length<2;)s.push(o),o=qt(o+r);return s})(e,_,n),i=b.map((e=>{const t=[],n=e.values,r=n.length;let a=0;for(const u of o){for(;anull!==e)),l=Math.abs((e=>{let t=e[0],n=1;for(let r=1;r1e10*c&&!f?t.map((()=>l)):t}));i.unshift(o),O(t);const l=p?(e=>{const t=e.slice(1,e.length),n=[],r=[];t.forEach(((e,n)=>{e.forEach(((e,a)=>{const o=a*t.length+n;r[o]=e}))})),e[0].forEach((e=>{const r=new Array(t.length).fill(e);n.push(...r)}));const a=new Array(n.length).fill(0).map(((e,n)=>n%t.length));return[null,[n,a,r]]})(i):i;k(l),S(a);const s=P(r);E(s),f&&A(s.map((e=>e.label||"")).slice(1))}),[b,y,p]),(0,r.useEffect)((()=>{const e=[],t=[{}];null===b||void 0===b||b.forEach(((n,r)=>{const a=L(n,r);t.push(a),e.push(ch(a,n.group))})),S(t),E(P(e))}),[N]);const[I,R]=Fh();return Nt("div",{className:Cr()({"vm-graph-view":!0,"vm-graph-view_full-width":h,"vm-graph-view_full-width_mobile":h&&g}),ref:I,children:[!p&&Nt(Oh,{data:w,series:x,metrics:b,period:n,yaxis:i,unit:l,setPeriod:u,layoutSize:R,height:m,isAnomalyView:f,spanGaps:v}),p&&Nt(zh,{data:w,metrics:b,period:n,unit:l,setPeriod:u,layoutSize:R,height:m,onChangeLegend:T}),f&&s&&Nt(Hh,{series:x}),!p&&s&&Nt(Ih,{labels:C,query:o,isAnomalyView:f,onChange:(e,t)=>{A((e=>{let{hideSeries:t,legend:n,metaKey:r,series:a,isAnomalyView:o}=e;const{label:i}=n,l=uh(i,t),s=a.map((e=>e.label||""));return o?s.filter((e=>e!==i)):r?l?t.filter((e=>e!==i)):[...t,i]:t.length?l?[...s.filter((e=>e!==i))]:[]:[...s.filter((e=>e!==i))]})({hideSeries:N,legend:e,metaKey:t,series:x,isAnomalyView:f}))}}),p&&s&&Nt(Rh,{series:x,min:i.limits.range[1][0]||0,max:i.limits.range[1][1]||0,legendValue:M})]})},Vh=e=>{let{yaxis:t,setYaxisLimits:n,toggleEnableLimits:a}=e;const{isMobile:o}=ea(),i=(0,r.useMemo)((()=>Object.keys(t.limits.range)),[t.limits.range]),l=(0,r.useCallback)(Bo()(((e,r,a)=>{const o=t.limits.range;o[r][a]=+e,o[r][0]===o[r][1]||o[r][0]>o[r][1]||n(o)}),500),[t.limits.range]),s=(e,t)=>n=>{l(n,e,t)};return Nt("div",{className:Cr()({"vm-axes-limits":!0,"vm-axes-limits_mobile":o}),children:[Nt(To,{value:t.limits.enable,onChange:a,label:"Fix the limits for y-axis",fullWidth:o}),Nt("div",{className:"vm-axes-limits-list",children:i.map((e=>Nt("div",{className:"vm-axes-limits-list__inputs",children:[Nt(Wa,{label:"Min ".concat(e),type:"number",disabled:!t.limits.enable,value:t.limits.range[e][0],onChange:s(e,0)}),Nt(Wa,{label:"Max ".concat(e),type:"number",disabled:!t.limits.enable,value:t.limits.range[e][1],onChange:s(e,1)})]},e)))})]})},Uh=e=>{let{spanGaps:t,onChange:n}=e;const{isMobile:r}=ea();return Nt("div",{children:Nt(To,{value:t,onChange:n,label:"Connect null values",fullWidth:r})})},Bh="Graph settings",qh=e=>{let{yaxis:t,setYaxisLimits:n,toggleEnableLimits:a,spanGaps:o}=e;const i=(0,r.useRef)(null),l=(0,r.useRef)(null),{value:s,toggle:c,setFalse:u}=fa(!1);return Nt("div",{className:"vm-graph-settings",children:[Nt(_a,{title:Bh,children:Nt("div",{ref:l,children:Nt(ma,{variant:"text",startIcon:Nt(Ln,{}),onClick:c,ariaLabel:"settings"})})}),Nt(pa,{open:s,buttonRef:l,placement:"bottom-right",onClose:u,title:Bh,children:Nt("div",{className:"vm-graph-settings-popper",ref:i,children:Nt("div",{className:"vm-graph-settings-popper__body",children:[Nt(Vh,{yaxis:t,setYaxisLimits:n,toggleEnableLimits:a}),Nt(Uh,{spanGaps:o.value,onChange:o.onChange})]})})})]})},Yh=e=>{let{isHistogram:t,graphData:n,controlsRef:a,isAnomalyView:o}=e;const{isMobile:i}=ea(),{customStep:l,yaxis:s,spanGaps:c}=Ur(),{period:u}=fn(),{query:d}=Cn(),h=vn(),m=Br(),p=e=>{m({type:"SET_YAXIS_LIMITS",payload:e})},f=Nt("div",{className:"vm-custom-panel-body-header__graph-controls",children:[Nt(Sa,{}),Nt(qh,{yaxis:s,setYaxisLimits:p,toggleEnableLimits:()=>{m({type:"TOGGLE_ENABLE_YAXIS_LIMITS"})},spanGaps:{value:c,onChange:e=>{m({type:"SET_SPAN_GAPS",payload:e})}}})]});return Nt(Ct.FK,{children:[a.current&&(0,r.createPortal)(f,a.current),Nt($h,{data:n,period:u,customStep:l,query:d,yaxis:s,setYaxisLimits:p,setPeriod:e=>{let{from:t,to:n}=e;h({type:"SET_PERIOD",payload:{from:t,to:n}})},height:i?.5*window.innerHeight:500,isHistogram:t,isAnomalyView:o,spanGaps:c})]})},Wh=e=>{let{data:t}=e;const n=gl(),a=(0,r.useMemo)((()=>{const e=t.map((e=>1===Object.keys(e).length?JSON.stringify(e):JSON.stringify(e,null,2))).join(",\n").replace(/^/gm,"".concat(" "));return"[\n".concat(e,"\n]")}),[t]);return Nt("div",{className:"vm-json-view",children:[Nt("div",{className:"vm-json-view__copy",children:Nt(ma,{variant:"outlined",onClick:async()=>{await n(a,"Formatted JSON has been copied")},children:"Copy JSON"})}),Nt("pre",{className:"vm-json-view__code",children:Nt("code",{children:a})})]})},Kh=e=>{const t={};return e.forEach((e=>Object.entries(e.metric).forEach((e=>t[e[0]]?t[e[0]].options.add(e[1]):t[e[0]]={options:new Set([e[1]])})))),Object.entries(t).map((e=>({key:e[0],variations:e[1].options.size}))).sort(((e,t)=>e.variations-t.variations))},Qh=(e,t)=>(0,r.useMemo)((()=>{if(!t)return[];return Kh(e).filter((e=>t.includes(e.key)))}),[e,t]),Zh=e=>{let{data:t,displayColumns:n}=e;const a=gl(),{isMobile:o}=ea(),{tableCompact:i}=Fr(),l=(0,r.useRef)(null),[s,c]=(0,r.useState)(""),[u,d]=(0,r.useState)("asc"),h=i?Qh([{group:0,metric:{Data:"Data"}}],["Data"]):Qh(t,n),m=e=>{const{__name__:t,...n}=e;return t||Object.keys(n).length?t?"".concat(t," ").concat(JSON.stringify(n)):"".concat(JSON.stringify(n)):""},p=new Set(null===t||void 0===t?void 0:t.map((e=>e.group))).size>1,f=(0,r.useMemo)((()=>{const e=null===t||void 0===t?void 0:t.map((e=>({metadata:h.map((t=>i?Al(e,"",p):e.metric[t.key]||"-")),value:e.value?e.value[1]:"-",values:e.values?e.values.map((e=>{let[t,n]=e;return"".concat(n," @").concat(t)})):[],copyValue:m(e.metric)}))),n="Value"===s,r=h.findIndex((e=>e.key===s));return n||-1!==r?e.sort(((e,t)=>{const a=n?Number(e.value):e.metadata[r],o=n?Number(t.value):t.metadata[r];return("asc"===u?ao)?-1:1})):e}),[h,t,s,u,i]),v=(0,r.useMemo)((()=>f.some((e=>e.copyValue))),[f]),g=e=>()=>{(e=>{d((t=>"asc"===t&&s===e?"desc":"asc")),c(e)})(e)};return f.length?Nt("div",{className:Cr()({"vm-table-view":!0,"vm-table-view_mobile":o}),children:Nt("table",{className:"vm-table",ref:l,children:[Nt("thead",{className:"vm-table-header",children:Nt("tr",{className:"vm-table__row vm-table__row_header",children:[h.map(((e,t)=>Nt("td",{className:"vm-table-cell vm-table-cell_header vm-table-cell_sort",onClick:g(e.key),children:Nt("div",{className:"vm-table-cell__content",children:[e.key,Nt("div",{className:Cr()({"vm-table__sort-icon":!0,"vm-table__sort-icon_active":s===e.key,"vm-table__sort-icon_desc":"desc"===u&&s===e.key}),children:Nt(Hn,{})})]})},t))),Nt("td",{className:"vm-table-cell vm-table-cell_header vm-table-cell_right vm-table-cell_sort",onClick:g("Value"),children:Nt("div",{className:"vm-table-cell__content",children:[Nt("div",{className:Cr()({"vm-table__sort-icon":!0,"vm-table__sort-icon_active":"Value"===s,"vm-table__sort-icon_desc":"desc"===u}),children:Nt(Hn,{})}),"Value"]})}),v&&Nt("td",{className:"vm-table-cell vm-table-cell_header"})]})}),Nt("tbody",{className:"vm-table-body",children:f.map(((e,t)=>{return Nt("tr",{className:"vm-table__row",children:[e.metadata.map(((e,n)=>Nt("td",{className:Cr()({"vm-table-cell vm-table-cell_no-wrap":!0,"vm-table-cell_gray":f[t-1]&&f[t-1].metadata[n]===e}),children:e},n))),Nt("td",{className:"vm-table-cell vm-table-cell_right vm-table-cell_no-wrap",children:e.values.length?e.values.map((e=>Nt("p",{children:e},e))):e.value}),v&&Nt("td",{className:"vm-table-cell vm-table-cell_right",children:e.copyValue&&Nt("div",{className:"vm-table-cell__content",children:Nt(_a,{title:"Copy row",children:Nt(ma,{variant:"text",color:"gray",size:"small",startIcon:Nt(rr,{}),onClick:(n=e.copyValue,async()=>{await a(n,"Row has been copied")}),ariaLabel:"copy row"})})})})]},t);var n}))})]})}):Nt(na,{variant:"warning",children:"No data to show"})},Gh=e=>{let{checked:t=!1,disabled:n=!1,label:r,color:a="secondary",onChange:o}=e;return Nt("div",{className:Cr()({"vm-checkbox":!0,"vm-checkbox_disabled":n,"vm-checkbox_active":t,["vm-checkbox_".concat(a,"_active")]:t,["vm-checkbox_".concat(a)]:a}),onClick:()=>{n||o(!t)},children:[Nt("div",{className:"vm-checkbox-track",children:Nt("div",{className:"vm-checkbox-track__thumb",children:Nt(Xn,{})})}),r&&Nt("span",{className:"vm-checkbox__label",children:r})]})},Jh="Table settings",Xh=e=>{let{columns:t,selectedColumns:n=[],tableCompact:a,onChangeColumns:o,toggleTableCompact:i}=e;const l=(0,r.useRef)(null),{value:s,toggle:c,setFalse:u}=fa(!1),{value:d,toggle:h}=fa(Boolean(et("TABLE_COLUMNS"))),[m,p]=(0,r.useState)(""),[f,v]=(0,r.useState)(-1),g=(0,r.useMemo)((()=>n.filter((e=>!t.includes(e)))),[t,n]),y=(0,r.useMemo)((()=>{const e=g.concat(t);return m?e.filter((e=>e.includes(m))):e}),[t,g,m]),_=(0,r.useMemo)((()=>y.every((e=>n.includes(e)))),[n,y]),b=e=>{o(n.includes(e)?n.filter((t=>t!==e)):[...n,e])};return(0,r.useEffect)((()=>{vl(t,n)||d||o(t)}),[t]),(0,r.useEffect)((()=>{d?n.length&&Xe("TABLE_COLUMNS",n.join(",")):tt(["TABLE_COLUMNS"])}),[d,n]),(0,r.useEffect)((()=>{const e=et("TABLE_COLUMNS");e&&o(e.split(","))}),[]),Nt("div",{className:"vm-table-settings",children:[Nt(_a,{title:Jh,children:Nt("div",{ref:l,children:Nt(ma,{variant:"text",startIcon:Nt(Ln,{}),onClick:c,ariaLabel:Jh})})}),s&&Nt(ya,{title:Jh,className:"vm-table-settings-modal",onClose:u,children:[Nt("div",{className:"vm-table-settings-modal-section",children:[Nt("div",{className:"vm-table-settings-modal-section__title",children:"Customize columns"}),Nt("div",{className:"vm-table-settings-modal-columns",children:[Nt("div",{className:"vm-table-settings-modal-columns__search",children:Nt(Wa,{placeholder:"Search columns",startIcon:Nt(xr,{}),value:m,onChange:p,onBlur:()=>{v(-1)},onKeyDown:e=>{const t="ArrowUp"===e.key,n="ArrowDown"===e.key,r="Enter"===e.key;(n||t||r)&&e.preventDefault(),n?v((e=>e+1>y.length-1?e:e+1)):t?v((e=>e-1<0?e:e-1)):r&&b(y[f])},type:"search"})}),Nt("div",{className:"vm-table-settings-modal-columns-list",children:[!!y.length&&Nt("div",{className:"vm-table-settings-modal-columns-list__item vm-table-settings-modal-columns-list__item_all",children:Nt(Gh,{checked:_,onChange:()=>{o(_?n.filter((e=>!y.includes(e))):y)},label:_?"Uncheck all":"Check all",disabled:a})}),!y.length&&Nt("div",{className:"vm-table-settings-modal-columns-no-found",children:Nt("p",{className:"vm-table-settings-modal-columns-no-found__info",children:"No columns found."})}),y.map(((e,t)=>{return Nt("div",{className:Cr()({"vm-table-settings-modal-columns-list__item":!0,"vm-table-settings-modal-columns-list__item_focus":t===f,"vm-table-settings-modal-columns-list__item_custom":g.includes(e)}),children:Nt(Gh,{checked:n.includes(e),onChange:(r=e,()=>{b(r)}),label:e,disabled:a})},e);var r}))]}),Nt("div",{className:"vm-table-settings-modal-preserve",children:[Nt(Gh,{checked:d,onChange:h,label:"Preserve column settings",disabled:a,color:"primary"}),Nt("p",{className:"vm-table-settings-modal-preserve__info",children:"This label indicates that when the checkbox is activated, the current column configurations will not be reset."})]})]})]}),Nt("div",{className:"vm-table-settings-modal-section",children:[Nt("div",{className:"vm-table-settings-modal-section__title",children:"Table view"}),Nt("div",{className:"vm-table-settings-modal-columns-list__item",children:Nt(To,{label:"Compact view",value:a,onChange:i})})]})]})]})},em=e=>{let{liveData:t,controlsRef:n}=e;const{tableCompact:a}=Fr(),o=jr(),[i,l]=(0,r.useState)(),s=(0,r.useMemo)((()=>Kh(t||[]).map((e=>e.key))),[t]),c=Nt(Xh,{columns:s,selectedColumns:i,onChangeColumns:l,tableCompact:a,toggleTableCompact:()=>{o({type:"TOGGLE_TABLE_COMPACT"})}});return Nt(Ct.FK,{children:[n.current&&(0,r.createPortal)(c,n.current),Nt(Zh,{data:t,displayColumns:i})]})},tm=e=>{let{graphData:t,liveData:n,isHistogram:r,displayType:a,controlsRef:o}=e;return a===mt.code&&n?Nt(Wh,{data:n}):a===mt.table&&n?Nt(em,{liveData:n,controlsRef:o}):a===mt.chart&&t?Nt(Yh,{graphData:t,isHistogram:r,controlsRef:o}):null},nm=[Nt(Ct.FK,{children:[Nt("p",{children:"Filename - specify the name for your report file."}),Nt("p",{children:["Default format: ",Nt("code",{children:["vmui_report_$",Dt,".json"]}),"."]}),Nt("p",{children:"This name will be used when saving your report on your device."})]}),Nt(Ct.FK,{children:[Nt("p",{children:"Comment (optional) - add a comment to your report."}),Nt("p",{children:"This can be any additional information that will be useful when reviewing the report later."})]}),Nt(Ct.FK,{children:[Nt("p",{children:"Query trace - enable this option to include a query trace in your report."}),Nt("p",{children:"This will assist in analyzing and diagnosing the query processing."})]}),Nt(Ct.FK,{children:[Nt("p",{children:"Generate Report - click this button to generate and save your report. "}),Nt("p",{children:["After creation, the report can be downloaded and examined on the ",Nt(Re,{to:We.queryAnalyzer,target:"_blank",rel:"noreferrer",className:"vm-link vm-link_underlined",children:Ye[We.queryAnalyzer].title})," page."]})]})],rm=()=>"vmui_report_".concat(o()().utc().format(Dt)),am=e=>{let{fetchUrl:t}=e;const{query:n}=Cn(),[a,o]=(0,r.useState)(rm()),[i,l]=(0,r.useState)(""),[s,c]=(0,r.useState)(!0),[u,d]=(0,r.useState)(),[h,m]=(0,r.useState)(!1),p=(0,r.useRef)(null),f=(0,r.useRef)(null),v=(0,r.useRef)(null),g=(0,r.useRef)(null),y=[p,f,v,g],[_,b]=(0,r.useState)(0),{value:w,toggle:k,setFalse:x}=fa(!1),{value:S,toggle:C,setFalse:E}=fa(!1),N=(0,r.useMemo)((()=>{if(t)return t.map(((e,t)=>{const n=new URL(e);return s?n.searchParams.set("trace","1"):n.searchParams.delete("trace"),{id:t,url:n}}))}),[t,s]),A=(0,r.useCallback)((e=>{const t=JSON.stringify(e,null,2),n=new Blob([t],{type:"application/json"}),r=URL.createObjectURL(n),o=document.createElement("a");o.href=r,o.download="".concat(a||rm(),".json"),document.body.appendChild(o),o.click(),document.body.removeChild(o),URL.revokeObjectURL(r),x()}),[a]),M=(0,r.useCallback)((async()=>{if(N){d(""),m(!0);try{const e=[];for await(const{url:t,id:n}of N){const r=await fetch(t),a=await r.json();if(r.ok)a.vmui={id:n,comment:i,params:at().parse(new URL(t).search.replace(/^\?/,""))},e.push(a);else{const e=a.errorType?"".concat(a.errorType,"\r\n"):"";d("".concat(e).concat((null===a||void 0===a?void 0:a.error)||(null===a||void 0===a?void 0:a.message)||"unknown error"))}}e.length&&A(e)}catch(Pp){Pp instanceof Error&&"AbortError"!==Pp.name&&d("".concat(Pp.name,": ").concat(Pp.message))}finally{m(!1)}}else d(pt.validQuery)}),[N,i,A,n]),T=e=>()=>{b((t=>t+e))};return(0,r.useEffect)((()=>{d(""),o(rm()),l("")}),[w]),(0,r.useEffect)((()=>{b(0)}),[S]),Nt(Ct.FK,{children:[Nt(_a,{title:"Export query",children:Nt(ma,{variant:"text",startIcon:Nt(br,{}),onClick:k,ariaLabel:"export query"})}),w&&Nt(ya,{title:"Export query",onClose:x,isOpen:w,children:Nt("div",{className:"vm-download-report",children:[Nt("div",{className:"vm-download-report-settings",children:[Nt("div",{ref:p,children:Nt(Wa,{label:"Filename",value:a,onChange:o})}),Nt("div",{ref:f,children:Nt(Wa,{type:"textarea",label:"Comment",value:i,onChange:l})}),Nt("div",{ref:v,children:Nt(Gh,{checked:s,onChange:c,label:"Include query trace"})})]}),u&&Nt(na,{variant:"error",children:u}),Nt("div",{className:"vm-download-report__buttons",children:[Nt(ma,{variant:"text",onClick:C,children:"Help"}),Nt("div",{ref:g,children:Nt(ma,{onClick:M,disabled:h,children:h?"Loading data...":"Generate Report"})})]}),Nt(pa,{open:S,buttonRef:y[_],placement:"top-left",variant:"dark",onClose:E,children:Nt("div",{className:"vm-download-report-helper",children:[Nt("div",{className:"vm-download-report-helper__description",children:nm[_]}),Nt("div",{className:"vm-download-report-helper__buttons",children:[0!==_&&Nt(ma,{onClick:T(-1),size:"small",color:"white",children:"Prev"}),Nt(ma,{onClick:_===y.length-1?E:T(1),size:"small",color:"white",variant:"text",children:_===y.length-1?"Close":"Next"})]})]})})]})})]})},om=()=>{Pl();const{isMobile:e}=ea(),{displayType:t}=Fr(),{query:n}=Cn(),{customStep:a}=Ur(),o=Br(),[i,l]=(0,r.useState)([]),[s,c]=(0,r.useState)(!n[0]),[u,d]=(0,r.useState)(!1),h=(0,r.useRef)(null),{fetchUrl:m,isLoading:p,liveData:f,graphData:v,error:g,queryErrors:y,setQueryErrors:_,queryStats:b,warning:w,traces:k,isHistogram:x}=Ol({visible:!0,customStep:a,hideQuery:i,showAllSeries:u}),S=!(null!==f&&void 0!==f&&f.length)&&t!==mt.chart,C=!s&&g;return(0,r.useEffect)((()=>{o({type:"SET_IS_HISTOGRAM",payload:x})}),[v]),Nt("div",{className:Cr()({"vm-custom-panel":!0,"vm-custom-panel_mobile":e}),children:[Nt(Cl,{queryErrors:s?[]:y,setQueryErrors:_,setHideError:c,stats:b,onHideQuery:e=>{l(e)},onRunQuery:()=>{c(!1)}}),Nt(Ul,{traces:k,displayType:t}),p&&Nt(xl,{}),C&&Nt(na,{variant:"error",children:g}),S&&Nt(na,{variant:"info",children:Nt(zl,{})}),w&&Nt(Bl,{warning:w,query:n,onChange:d}),Nt("div",{className:Cr()({"vm-custom-panel-body":!0,"vm-custom-panel-body_mobile":e,"vm-block":!0,"vm-block_mobile":e}),children:[Nt("div",{className:"vm-custom-panel-body-header",ref:h,children:[Nt("div",{className:"vm-custom-panel-body-header__tabs",children:Nt(Or,{})}),(v||f)&&Nt(am,{fetchUrl:m})]}),Nt(tm,{graphData:v,liveData:f,isHistogram:x,displayType:t,controlsRef:h})]})]})},im=e=>{let{title:t,description:n,unit:a,expr:o,showLegend:i,filename:l,alias:s}=e;const{isMobile:c}=ea(),{period:u}=fn(),{customStep:d}=Ur(),h=vn(),m=(0,r.useRef)(null),[p,f]=(0,r.useState)(!1),[v,g]=(0,r.useState)(!1),[y,_]=(0,r.useState)({limits:{enable:!1,range:{1:[0,0]}}}),b=(0,r.useMemo)((()=>Array.isArray(o)&&o.every((e=>e))),[o]),{isLoading:w,graphData:k,error:x,warning:S}=Ol({predefinedQuery:b?o:[],display:mt.chart,visible:p,customStep:d}),C=e=>{const t={...y};t.limits.range=e,_(t)};if((0,r.useEffect)((()=>{const e=new IntersectionObserver((e=>{e.forEach((e=>f(e.isIntersecting)))}),{threshold:.1});return m.current&&e.observe(m.current),()=>{m.current&&e.unobserve(m.current)}}),[m]),!b)return Nt(na,{variant:"error",children:[Nt("code",{children:'"expr"'})," not found. Check the configuration file ",Nt("b",{children:l}),"."]});const E=()=>Nt("div",{className:"vm-predefined-panel-header__description vm-default-styles",children:[n&&Nt(Ct.FK,{children:[Nt("div",{children:[Nt("span",{children:"Description:"}),Nt("div",{dangerouslySetInnerHTML:{__html:ol(n)}})]}),Nt("hr",{})]}),Nt("div",{children:[Nt("span",{children:"Queries:"}),Nt("div",{children:o.map(((e,t)=>Nt("div",{children:e},"".concat(t,"_").concat(e))))})]})]});return Nt("div",{className:"vm-predefined-panel",ref:m,children:[Nt("div",{className:"vm-predefined-panel-header",children:[Nt(_a,{title:Nt(E,{}),children:Nt("div",{className:"vm-predefined-panel-header__info",children:Nt(In,{})})}),Nt("h3",{className:"vm-predefined-panel-header__title",children:t||""}),Nt(qh,{yaxis:y,setYaxisLimits:C,toggleEnableLimits:()=>{const e={...y};e.limits.enable=!e.limits.enable,_(e)},spanGaps:{value:v,onChange:g}})]}),Nt("div",{className:"vm-predefined-panel-body",children:[w&&Nt(xl,{}),x&&Nt(na,{variant:"error",children:x}),S&&Nt(na,{variant:"warning",children:S}),k&&Nt($h,{data:k,period:u,customStep:d,query:o,yaxis:y,unit:a,alias:s,showLegend:i,setYaxisLimits:C,setPeriod:e=>{let{from:t,to:n}=e;h({type:"SET_PERIOD",payload:{from:t,to:n}})},fullWidth:!1,height:c?.5*window.innerHeight:500,spanGaps:v})]})]})},lm=e=>{let{index:t,title:n,panels:a,filename:o}=e;const i=Mr(),l=(0,r.useMemo)((()=>i.width/12),[i]),[s,c]=(0,r.useState)(!t),[u,d]=(0,r.useState)([]);(0,r.useEffect)((()=>{d(a&&a.map((e=>e.width||12)))}),[a]);const[h,m]=(0,r.useState)({start:0,target:0,enable:!1}),p=(0,r.useCallback)((e=>{if(!h.enable)return;const{start:t}=h,n=Math.ceil((t-e.clientX)/l);if(Math.abs(n)>=12)return;const r=u.map(((e,t)=>e-(t===h.target?n:0)));d(r)}),[h,l]),f=(0,r.useCallback)((()=>{m({...h,enable:!1})}),[h]),v=e=>t=>{((e,t)=>{m({start:e.clientX,target:t,enable:!0})})(t,e)};Ar("mousemove",p),Ar("mouseup",f);return Nt("div",{className:"vm-predefined-dashboard",children:Nt(ko,{defaultExpanded:s,onChange:e=>c(e),title:Nt((()=>Nt("div",{className:Cr()({"vm-predefined-dashboard-header":!0,"vm-predefined-dashboard-header_open":s}),children:[(n||o)&&Nt("span",{className:"vm-predefined-dashboard-header__title",children:n||"".concat(t+1,". ").concat(o)}),a&&Nt("span",{className:"vm-predefined-dashboard-header__count",children:["(",a.length," panels)"]})]})),{}),children:Nt("div",{className:"vm-predefined-dashboard-panels",children:Array.isArray(a)&&a.length?a.map(((e,t)=>Nt("div",{className:"vm-predefined-dashboard-panels-panel vm-block vm-block_empty-padding",style:{gridColumn:"span ".concat(u[t])},children:[Nt(im,{title:e.title,description:e.description,unit:e.unit,expr:e.expr,alias:e.alias,filename:o,showLegend:e.showLegend}),Nt("button",{className:"vm-predefined-dashboard-panels-panel__resizer",onMouseDown:v(t),"aria-label":"resize the panel"})]},t))):Nt("div",{className:"vm-predefined-dashboard-panels-panel__alert",children:Nt(na,{variant:"error",children:[Nt("code",{children:'"panels"'})," not found. Check the configuration file ",Nt("b",{children:o}),"."]})})})})})};function sm(e){return function(e,t){return Object.fromEntries(Object.entries(e).filter(t))}(e,(e=>!!e[1]||"number"===typeof e[1]))}const cm=()=>{(()=>{const{duration:e,relativeTime:t,period:{date:n}}=fn(),{customStep:a}=Ur(),{setSearchParamsFromKeys:o}=ho(),i=()=>{const r=sm({"g0.range_input":e,"g0.end_input":n,"g0.step_input":a,"g0.relative_time":t});o(r)};(0,r.useEffect)(i,[e,t,n,a]),(0,r.useEffect)(i,[])})();const{isMobile:e}=ea(),{dashboardsSettings:t,dashboardsLoading:n,dashboardsError:a}=Kr(),[o,i]=(0,r.useState)(0),l=(0,r.useMemo)((()=>t.map(((e,t)=>({label:e.title||"",value:t})))),[t]),s=(0,r.useMemo)((()=>t[o]||{}),[t,o]),c=(0,r.useMemo)((()=>null===s||void 0===s?void 0:s.rows),[s]),u=(0,r.useMemo)((()=>s.title||s.filename||""),[s]),d=(0,r.useMemo)((()=>Array.isArray(c)&&!!c.length),[c]),h=e=>()=>{(e=>{i(e)})(e)};return Nt("div",{className:"vm-predefined-panels",children:[n&&Nt(xl,{}),!t.length&&a&&Nt(na,{variant:"error",children:a}),!t.length&&Nt(na,{variant:"info",children:"Dashboards not found"}),l.length>1&&Nt("div",{className:Cr()({"vm-predefined-panels-tabs":!0,"vm-predefined-panels-tabs_mobile":e}),children:l.map((e=>Nt("div",{className:Cr()({"vm-predefined-panels-tabs__tab":!0,"vm-predefined-panels-tabs__tab_active":e.value==o}),onClick:h(e.value),children:e.label},e.value)))}),Nt("div",{className:"vm-predefined-panels__dashboards",children:[d&&c.map(((e,t)=>Nt(lm,{index:t,filename:u,title:e.title,panels:e.panels},"".concat(o,"_").concat(t)))),!!t.length&&!d&&Nt(na,{variant:"error",children:[Nt("code",{children:'"rows"'})," not found. Check the configuration file ",Nt("b",{children:u}),"."]})]})]})},um=(e,t)=>{const n=t.match?"&match[]="+encodeURIComponent(t.match):"",r=t.focusLabel?"&focusLabel="+encodeURIComponent(t.focusLabel):"";return"".concat(e,"/api/v1/status/tsdb?topN=").concat(t.topN,"&date=").concat(t.date).concat(n).concat(r)};class dm{constructor(){this.tsdbStatus=void 0,this.tabsNames=void 0,this.isPrometheus=void 0,this.tsdbStatus=this.defaultTSDBStatus,this.tabsNames=["table","graph"],this.isPrometheus=!1,this.getDefaultState=this.getDefaultState.bind(this)}set tsdbStatusData(e){this.isPrometheus=!(null===e||void 0===e||!e.headStats),this.tsdbStatus=e}get tsdbStatusData(){return this.tsdbStatus}get defaultTSDBStatus(){return{totalSeries:0,totalSeriesPrev:0,totalSeriesByAll:0,totalLabelValuePairs:0,seriesCountByMetricName:[],seriesCountByLabelName:[],seriesCountByFocusLabelValue:[],seriesCountByLabelValuePair:[],labelValueCountByLabelName:[]}}get isPrometheusData(){return this.isPrometheus}keys(e,t){const n=e&&/__name__=".+"/.test(e),r=e&&/{.+=".+"}/g.test(e),a=e&&/__name__=".+", .+!=""/g.test(e);let o=[];return o=t||a?o.concat("seriesCountByFocusLabelValue"):n?o.concat("labelValueCountByLabelName"):r?o.concat("seriesCountByMetricName","seriesCountByLabelName"):o.concat("seriesCountByMetricName","seriesCountByLabelName","seriesCountByLabelValuePair","labelValueCountByLabelName"),o}getDefaultState(e,t){return this.keys(e,t).reduce(((e,t)=>({...e,tabs:{...e.tabs,[t]:this.tabsNames},containerRefs:{...e.containerRefs,[t]:(0,r.useRef)(null)}})),{tabs:{},containerRefs:{}})}sectionsTitles(e){return{seriesCountByMetricName:"Metric names with the highest number of series",seriesCountByLabelName:"Labels with the highest number of series",seriesCountByFocusLabelValue:'Values for "'.concat(e,'" label with the highest number of series'),seriesCountByLabelValuePair:"Label=value pairs with the highest number of series",labelValueCountByLabelName:"Labels with the highest number of unique values"}}get sectionsTips(){return{seriesCountByMetricName:"\n

    \n This table returns a list of metrics with the highest cardinality.\n The cardinality of a metric is the number of time series associated with that metric,\n where each time series is defined as a unique combination of key-value label pairs.\n

    \n

    \n When looking to reduce the number of active series in your data source,\n you can start by inspecting individual metrics with high cardinality\n (i.e. that have lots of active time series associated with them),\n since that single metric contributes a large fraction of the series that make up your total series count.\n

    ",seriesCountByLabelName:"\n

    \n This table returns a list of the labels with the highest number of series.\n

    \n

    \n Use this table to identify labels that are storing dimensions with high cardinality\n (many different label values).\n

    \n

    \n It is recommended to choose labels such that they have a finite set of values,\n since every unique combination of key-value label pairs creates a new time series\n and therefore can dramatically increase the number of time series in your system.\n

    ",seriesCountByFocusLabelValue:"\n

    \n This table returns a list of unique label values per selected label.\n

    \n

    \n Use this table to identify label values that are storing per each selected series.\n

    ",labelValueCountByLabelName:"\n

    \n This table returns a list of labels with the highest number of the unique values.\n

    \n ",seriesCountByLabelValuePair:"\n

    \n This table returns a list of the label values pairs with the highest number of series.\n

    \n

    \n Use this table to identify unique label values pairs. This helps to identify same labels \n is applied to count timeseries in your system, since every unique combination of key-value label pairs \n creates a new time series and therefore can dramatically increase the number of time series in your system\n

    "}}get tablesHeaders(){return{seriesCountByMetricName:hm,seriesCountByLabelName:mm,seriesCountByFocusLabelValue:pm,seriesCountByLabelValuePair:fm,labelValueCountByLabelName:vm}}totalSeries(e){return"labelValueCountByLabelName"===e?-1:arguments.length>1&&void 0!==arguments[1]&&arguments[1]?this.tsdbStatus.totalSeriesPrev:this.tsdbStatus.totalSeries}}const hm=[{id:"name",label:"Metric name"},{id:"value",label:"Number of series"},{id:"percentage",label:"Share in total",info:"Shows the share of a metric to the total number of series"},{id:"action",label:""}],mm=[{id:"name",label:"Label name"},{id:"value",label:"Number of series"},{id:"percentage",label:"Share in total",info:"Shows the share of the label to the total number of series"},{id:"action",label:""}],pm=[{id:"name",label:"Label value"},{id:"value",label:"Number of series"},{id:"percentage",label:"Share in total"},{disablePadding:!1,id:"action",label:"",numeric:!1}],fm=[{id:"name",label:"Label=value pair"},{id:"value",label:"Number of series"},{id:"percentage",label:"Share in total",info:"Shows the share of the label value pair to the total number of series"},{id:"action",label:""}],vm=[{id:"name",label:"Label name"},{id:"value",label:"Number of unique values"},{id:"action",label:""}],gm=()=>{const e=new dm,[t]=He(),n=t.get("match"),a=t.get("focusLabel"),i=+(t.get("topN")||10),l=t.get("date")||o()().tz().format(Ot),s=Qa(l),c=(0,r.useRef)(),{serverUrl:u}=Mt(),[d,h]=(0,r.useState)(!1),[m,p]=(0,r.useState)(),[f,v]=(0,r.useState)(e.defaultTSDBStatus),[g,y]=(0,r.useState)(!1),_=async e=>{const t=await fetch(e);if(t.ok)return await t.json();throw new Error("Request failed with status ".concat(t.status))},b=async t=>{if(!u)return;p(""),h(!0),v(e.defaultTSDBStatus);const r={...t,date:t.date,topN:0,match:"",focusLabel:""},a={...t,date:o()(t.date).subtract(1,"day").format(Ot)},i=[um(u,t),um(u,a)];s!==l&&(t.match||t.focusLabel)&&i.push(um(u,r));try{var d,m,g,y,b,w,k,x,S,C;const[e,t,r]=await Promise.all(i.map(_)),a={...t.data},{data:o}=r||c.current||e;c.current={data:o};const l={...e.data,totalSeries:(null===(d=e.data)||void 0===d?void 0:d.totalSeries)||(null===(m=e.data)||void 0===m||null===(g=m.headStats)||void 0===g?void 0:g.numSeries)||0,totalLabelValuePairs:(null===(y=e.data)||void 0===y?void 0:y.totalLabelValuePairs)||(null===(b=e.data)||void 0===b||null===(w=b.headStats)||void 0===w?void 0:w.numLabelValuePairs)||0,seriesCountByLabelName:(null===(k=e.data)||void 0===k?void 0:k.seriesCountByLabelName)||[],seriesCountByFocusLabelValue:(null===(x=e.data)||void 0===x?void 0:x.seriesCountByFocusLabelValue)||[],totalSeriesByAll:(null===o||void 0===o?void 0:o.totalSeries)||(null===o||void 0===o||null===(S=o.headStats)||void 0===S?void 0:S.numSeries)||f.totalSeriesByAll||0,totalSeriesPrev:(null===a||void 0===a?void 0:a.totalSeries)||(null===a||void 0===a||null===(C=a.headStats)||void 0===C?void 0:C.numSeries)||0},s=null===n||void 0===n?void 0:n.replace(/[{}"]/g,"");l.seriesCountByLabelValuePair=l.seriesCountByLabelValuePair.filter((e=>e.name!==s)),((e,t)=>{Object.keys(e).forEach((n=>{const r=n,a=e[r],o=t[r];Array.isArray(a)&&Array.isArray(o)&&a.forEach((e=>{var t;const n=null===(t=o.find((t=>t.name===e.name)))||void 0===t?void 0:t.value;e.diff=n?e.value-n:0,e.valuePrev=n||0}))}))})(l,a),v(l),h(!1)}catch(Pp){h(!1),Pp instanceof Error&&p("".concat(Pp.name,": ").concat(Pp.message))}};return(0,r.useEffect)((()=>{b({topN:i,match:n,date:l,focusLabel:a})}),[u,n,a,i,l]),(0,r.useEffect)((()=>{m&&(v(e.defaultTSDBStatus),h(!1))}),[m]),(0,r.useEffect)((()=>{const e=Je(u);y(!!e)}),[u]),e.tsdbStatusData=f,{isLoading:d,appConfigurator:e,error:m,isCluster:g}},ym={seriesCountByMetricName:e=>{let{query:t}=e;return _m("__name__",t)},seriesCountByLabelName:e=>{let{query:t}=e;return"{".concat(t,'!=""}')},seriesCountByFocusLabelValue:e=>{let{query:t,focusLabel:n}=e;return _m(n,t)},seriesCountByLabelValuePair:e=>{let{query:t}=e;const n=t.split("="),r=n[0],a=n.slice(1).join("=");return _m(r,a)},labelValueCountByLabelName:e=>{let{query:t,match:n}=e;return""===n?"{".concat(t,'!=""}'):"".concat(n.replace("}",""),", ").concat(t,'!=""}')}},_m=(e,t)=>e?"{"+e+"="+JSON.stringify(t)+"}":"",bm=e=>{var t;let{totalSeries:n=0,totalSeriesPrev:r=0,totalSeriesAll:a=0,seriesCountByMetricName:o=[],isPrometheus:i}=e;const{isMobile:l}=ea(),[s]=He(),c=s.get("match"),u=s.get("focusLabel"),d=/__name__/.test(c||""),h=(null===(t=o[0])||void 0===t?void 0:t.value)/a*100,m=n-r,p=Math.abs(m)/r*100,f=[{title:"Total series",value:n.toLocaleString("en-US"),dynamic:n&&r&&!i?"".concat(p.toFixed(2),"%"):"",display:!u,info:'The total number of active time series. \n A time series is uniquely identified by its name plus a set of its labels. \n For example, temperature{city="NY",country="US"} and temperature{city="SF",country="US"} \n are two distinct series, since they differ by the city label.'},{title:"Percentage from total",value:isNaN(h)?"-":"".concat(h.toFixed(2),"%"),display:d,info:"The share of these series in the total number of time series."}].filter((e=>e.display));return f.length?Nt("div",{className:Cr()({"vm-cardinality-totals":!0,"vm-cardinality-totals_mobile":l}),children:f.map((e=>{let{title:t,value:n,info:a,dynamic:o}=e;return Nt("div",{className:"vm-cardinality-totals-card",children:[Nt("h4",{className:"vm-cardinality-totals-card__title",children:[t,a&&Nt(_a,{title:Nt("p",{className:"vm-cardinality-totals-card__tooltip",children:a}),children:Nt("div",{className:"vm-cardinality-totals-card__info-icon",children:Nt(In,{})})})]}),Nt("span",{className:"vm-cardinality-totals-card__value",children:n}),!!o&&Nt(_a,{title:"in relation to the previous day: ".concat(r.toLocaleString("en-US")),children:Nt("span",{className:Cr()({"vm-dynamic-number":!0,"vm-dynamic-number_positive vm-dynamic-number_down":m<0,"vm-dynamic-number_negative vm-dynamic-number_up":m>0}),children:o})})]},t)}))}):null},wm=(e,t)=>{const[n]=He(),a=n.get(t)?n.get(t):e,[o,i]=(0,r.useState)(a);return(0,r.useEffect)((()=>{a!==o&&i(a)}),[a]),[o,i]},km=e=>{let{isPrometheus:t,isCluster:n,...a}=e;const{isMobile:o}=ea(),[i]=He(),{setSearchParamsFromKeys:l}=ho(),s=i.get("tips")||"",[c,u]=wm("","match"),[d,h]=wm("","focusLabel"),[m,p]=wm(10,"topN"),f=(0,r.useMemo)((()=>m<0?"Number must be bigger than zero":""),[m]),v=()=>{l({match:c,topN:m,focusLabel:d})};return(0,r.useEffect)((()=>{const e=i.get("match"),t=+(i.get("topN")||10),n=i.get("focusLabel");e!==c&&u(e||""),t!==m&&p(t),n!==d&&h(n||"")}),[i]),Nt("div",{className:Cr()({"vm-cardinality-configurator":!0,"vm-cardinality-configurator_mobile":o,"vm-block":!0,"vm-block_mobile":o}),children:[Nt("div",{className:"vm-cardinality-configurator-controls",children:[Nt("div",{className:"vm-cardinality-configurator-controls__query",children:Nt(Wa,{label:"Time series selector",type:"string",value:c,onChange:u,onEnter:v})}),Nt("div",{className:"vm-cardinality-configurator-controls__item",children:Nt(Wa,{label:"Focus label",type:"text",value:d||"",onChange:h,onEnter:v,endIcon:Nt(_a,{title:Nt("div",{children:Nt("p",{children:"To identify values with the highest number of series for the selected label."})}),children:Nt(sr,{})})})}),Nt("div",{className:"vm-cardinality-configurator-controls__item vm-cardinality-configurator-controls__item_limit",children:Nt(Wa,{label:"Limit entries",type:"number",value:t?10:m,error:f,disabled:t,helperText:t?"not available for Prometheus":"",onChange:e=>{const t=+e;p(isNaN(t)?0:t)},onEnter:v})})]}),Nt("div",{className:"vm-cardinality-configurator-bottom",children:[Nt(bm,{isPrometheus:t,isCluster:n,...a}),n&&Nt("div",{className:"vm-cardinality-configurator-bottom-helpful",children:Nt(Il,{href:"https://docs.victoriametrics.com/Single-server-VictoriaMetrics.html#cardinality-explorer-statistic-inaccuracy",withIcon:!0,children:[Nt(ir,{}),"Statistic inaccuracy explanation"]})}),Nt("div",{className:"vm-cardinality-configurator-bottom-helpful",children:Nt(Il,{href:"https://docs.victoriametrics.com/#cardinality-explorer",withIcon:!0,children:[Nt(ir,{}),"Documentation"]})}),Nt("div",{className:"vm-cardinality-configurator-bottom__execute",children:[Nt(_a,{title:s?"Hide tips":"Show tips",children:Nt(ma,{variant:"text",color:s?"warning":"gray",startIcon:Nt(hr,{}),onClick:()=>{const e=i.get("tips")||"";l({tips:e?"":"true"})},ariaLabel:"visibility tips"})}),Nt(ma,{variant:"text",startIcon:Nt(Pn,{}),onClick:()=>{l({match:"",focusLabel:""})},children:"Reset"}),Nt(ma,{startIcon:Nt(qn,{}),onClick:v,children:"Execute Query"})]})]})]})};function xm(e){const{order:t,orderBy:n,onRequestSort:r,headerCells:a}=e;return Nt("thead",{className:"vm-table-header vm-cardinality-panel-table__header",children:Nt("tr",{className:"vm-table__row vm-table__row_header",children:a.map((e=>{return Nt("th",{className:Cr()({"vm-table-cell vm-table-cell_header":!0,"vm-table-cell_sort":"action"!==e.id&&"percentage"!==e.id,"vm-table-cell_right":"action"===e.id}),onClick:(a=e.id,e=>{r(e,a)}),children:Nt("div",{className:"vm-table-cell__content",children:[e.info?Nt(_a,{title:e.info,children:[Nt("div",{className:"vm-metrics-content-header__tip-icon",children:Nt(In,{})}),e.label]}):Nt(Ct.FK,{children:e.label}),"action"!==e.id&&"percentage"!==e.id&&Nt("div",{className:Cr()({"vm-table__sort-icon":!0,"vm-table__sort-icon_active":n===e.id,"vm-table__sort-icon_desc":"desc"===t&&n===e.id}),children:Nt(Hn,{})})]})},e.id);var a}))})})}const Sm=["date","timestamp","time"];function Cm(e,t,n){const r=e[n],a=t[n],i=Sm.includes("".concat(n))?o()("".concat(r)).unix():r,l=Sm.includes("".concat(n))?o()("".concat(a)).unix():a;return li?1:0}function Em(e,t){return"desc"===e?(e,n)=>Cm(e,n,t):(e,n)=>-Cm(e,n,t)}function Nm(e,t){const n=e.map(((e,t)=>[e,t]));return n.sort(((e,n)=>{const r=t(e[0],n[0]);return 0!==r?r:e[1]-n[1]})),n.map((e=>e[0]))}const Am=e=>{let{rows:t,headerCells:n,defaultSortColumn:a,tableCells:o}=e;const[i,l]=(0,r.useState)("desc"),[s,c]=(0,r.useState)(a),u=Nm(t,Em(i,s));return Nt("table",{className:"vm-table vm-cardinality-panel-table",children:[Nt(xm,{order:i,orderBy:s,onRequestSort:(e,t)=>{l(s===t&&"asc"===i?"desc":"asc"),c(t)},rowCount:t.length,headerCells:n}),Nt("tbody",{className:"vm-table-header",children:u.map((e=>Nt("tr",{className:"vm-table__row",children:o(e)},e.name)))})]})},Mm=e=>{let{row:t,totalSeries:n,totalSeriesPrev:r,onActionClick:a}=e;const o=n>0?t.value/n*100:-1,i=r>0?t.valuePrev/r*100:-1,l=[o,i].some((e=>-1===e)),s=o-i,c=l?"":"".concat(s.toFixed(2),"%"),u=()=>{a(t.name)};return Nt(Ct.FK,{children:[Nt("td",{className:"vm-table-cell",children:Nt("span",{className:"vm-link vm-link_colored",onClick:u,children:t.name})},t.name),Nt("td",{className:"vm-table-cell",children:[t.value,!!t.diff&&Nt(_a,{title:"in relation to the previous day: ".concat(t.valuePrev),children:Nt("span",{className:Cr()({"vm-dynamic-number":!0,"vm-dynamic-number_positive":t.diff<0,"vm-dynamic-number_negative":t.diff>0}),children:["\xa0",t.diff>0?"+":"",t.diff]})})]},t.value),o>0&&Nt("td",{className:"vm-table-cell",children:Nt("div",{className:"vm-cardinality-panel-table__progress",children:[Nt(Fl,{value:o}),c&&Nt(_a,{title:"in relation to the previous day",children:Nt("span",{className:Cr()({"vm-dynamic-number":!0,"vm-dynamic-number_positive vm-dynamic-number_down":s<0,"vm-dynamic-number_negative vm-dynamic-number_up":s>0}),children:c})})]})},t.progressValue),Nt("td",{className:"vm-table-cell vm-table-cell_right",children:Nt("div",{className:"vm-table-cell__content",children:Nt(_a,{title:"Filter by ".concat(t.name),children:Nt(ma,{variant:"text",size:"small",onClick:u,children:Nt(Yn,{})})})})},"action")]})},Tm=e=>{let{data:t}=e;const[n,a]=(0,r.useState)([]),[o,i]=(0,r.useState)([0,0]);return(0,r.useEffect)((()=>{const e=t.sort(((e,t)=>t.value-e.value)),n=(e=>{const t=e.map((e=>e.value)),n=Math.ceil(t[0]||1),r=n/9;return new Array(11).fill(n+r).map(((e,t)=>Math.round(e-r*t)))})(e);i(n),a(e.map((e=>({...e,percentage:e.value/n[0]*100}))))}),[t]),Nt("div",{className:"vm-simple-bar-chart",children:[Nt("div",{className:"vm-simple-bar-chart-y-axis",children:o.map((e=>Nt("div",{className:"vm-simple-bar-chart-y-axis__tick",children:e},e)))}),Nt("div",{className:"vm-simple-bar-chart-data",children:n.map((e=>{let{name:t,value:n,percentage:r}=e;return Nt(_a,{title:"".concat(t,": ").concat(n),placement:"top-center",children:Nt("div",{className:"vm-simple-bar-chart-data-item",style:{maxHeight:"".concat(r||0,"%")}})},"".concat(t,"_").concat(n))}))})]})},Lm=e=>{let{rows:t,tabs:n=[],chartContainer:a,totalSeries:o,totalSeriesPrev:i,onActionClick:l,sectionTitle:s,tip:c,tableHeaderCells:u,isPrometheus:d}=e;const{isMobile:h}=ea(),[m,p]=(0,r.useState)("table"),f=d&&!t.length,v=(0,r.useMemo)((()=>n.map(((e,t)=>({value:e,label:e,icon:Nt(0===t?Kn:Wn,{})})))),[n]);return Nt("div",{className:Cr()({"vm-metrics-content":!0,"vm-metrics-content_mobile":h,"vm-block":!0,"vm-block_mobile":h}),children:[Nt("div",{className:"vm-metrics-content-header vm-section-header",children:[Nt("h5",{className:Cr()({"vm-metrics-content-header__title":!0,"vm-section-header__title":!0,"vm-section-header__title_mobile":h}),children:[!h&&c&&Nt(_a,{title:Nt("p",{dangerouslySetInnerHTML:{__html:c},className:"vm-metrics-content-header__tip"}),children:Nt("div",{className:"vm-metrics-content-header__tip-icon",children:Nt(In,{})})}),s]}),Nt("div",{className:"vm-section-header__tabs",children:Nt(Tr,{activeItem:m,items:v,onChange:p})})]}),f&&Nt("div",{className:"vm-metrics-content-prom-data",children:[Nt("div",{className:"vm-metrics-content-prom-data__icon",children:Nt(In,{})}),Nt("h3",{className:"vm-metrics-content-prom-data__title",children:"Prometheus Data Limitation"}),Nt("p",{className:"vm-metrics-content-prom-data__text",children:["Due to missing data from your Prometheus source, some tables may appear empty.",Nt("br",{}),"This does not indicate an issue with your system or our tool."]})]}),!f&&"table"===m&&Nt("div",{ref:a,className:Cr()({"vm-metrics-content__table":!0,"vm-metrics-content__table_mobile":h}),children:Nt(Am,{rows:t,headerCells:u,defaultSortColumn:"value",tableCells:e=>Nt(Mm,{row:e,totalSeries:o,totalSeriesPrev:i,onActionClick:l})})}),!f&&"graph"===m&&Nt("div",{className:"vm-metrics-content__chart",children:Nt(Tm,{data:t.map((e=>{let{name:t,value:n}=e;return{name:t,value:n}}))})})]})},Om=e=>{let{title:t,children:n}=e;return Nt("div",{className:"vm-cardinality-tip",children:[Nt("div",{className:"vm-cardinality-tip-header",children:[Nt("div",{className:"vm-cardinality-tip-header__tip-icon",children:Nt(hr,{})}),Nt("h4",{className:"vm-cardinality-tip-header__title",children:t||"Tips"})]}),Nt("p",{className:"vm-cardinality-tip__description",children:n})]})},Pm=()=>Nt(Om,{title:"Metrics with a high number of series",children:Nt("ul",{children:[Nt("li",{children:["Identify and eliminate labels with frequently changed values to reduce their\xa0",Nt(Il,{href:"https://docs.victoriametrics.com/FAQ.html#what-is-high-cardinality",children:"cardinality"}),"\xa0and\xa0",Nt(Il,{href:"https://docs.victoriametrics.com/FAQ.html#what-is-high-churn-rate",children:"high churn rate"})]}),Nt("li",{children:["Find unused time series and\xa0",Nt(Il,{href:"https://docs.victoriametrics.com/relabeling.html",children:"drop entire metrics"})]}),Nt("li",{children:["Aggregate time series before they got ingested into the database via\xa0",Nt(Il,{href:"https://docs.victoriametrics.com/stream-aggregation.html",children:"streaming aggregation"})]})]})}),Im=()=>Nt(Om,{title:"Labels with a high number of unique values",children:Nt("ul",{children:[Nt("li",{children:"Decrease the number of unique label values to reduce cardinality"}),Nt("li",{children:["Drop the label entirely via\xa0",Nt(Il,{href:"https://docs.victoriametrics.com/relabeling.html",children:"relabeling"})]}),Nt("li",{children:"For volatile label values (such as URL path, user session, etc.) consider printing them to the log file instead of adding to time series"})]})}),Rm=()=>Nt(Om,{title:"Dashboard of a single metric",children:[Nt("p",{children:"This dashboard helps to understand the cardinality of a single metric."}),Nt("p",{children:"Each time series is a unique combination of key-value label pairs. Therefore a label key with many values can create a lot of time series for a particular metric. If you\u2019re trying to decrease the cardinality of a metric, start by looking at the labels with the highest number of values."}),Nt("p",{children:"Use the series selector at the top of the page to apply additional filters."})]}),Dm=()=>Nt(Om,{title:"Dashboard of a label",children:[Nt("p",{children:"This dashboard helps you understand the count of time series per label."}),Nt("p",{children:"Use the selector at the top of the page to pick a label name you\u2019d like to inspect. For the selected label name, you\u2019ll see the label values that have the highest number of series associated with them. So if you\u2019ve chosen `instance` as your label name, you may see that `657` time series have value \u201chost-1\u201d attached to them and `580` time series have value `host-2` attached to them."}),Nt("p",{children:"This can be helpful in allowing you to determine where the bulk of your time series are coming from. If the label \u201cinstance=host-1\u201d was applied to 657 series and the label \u201cinstance=host-2\u201d was only applied to 580 series, you\u2019d know, for example, that host-01 was responsible for sending the majority of the time series."})]}),zm=()=>{const{isMobile:e}=ea(),[t]=He(),{setSearchParamsFromKeys:n}=ho(),r=t.get("tips")||"",a=t.get("match")||"",o=t.get("focusLabel")||"",{isLoading:i,appConfigurator:l,error:s,isCluster:c}=gm(),{tsdbStatusData:u,getDefaultState:d,tablesHeaders:h,sectionsTips:m}=l,p=d(a,o);return Nt("div",{className:Cr()({"vm-cardinality-panel":!0,"vm-cardinality-panel_mobile":e}),children:[i&&Nt(xl,{message:"Please wait while cardinality stats is calculated. \n This may take some time if the db contains big number of time series."}),Nt(km,{isPrometheus:l.isPrometheusData,totalSeries:u.totalSeries,totalSeriesPrev:u.totalSeriesPrev,totalSeriesAll:u.totalSeriesByAll,totalLabelValuePairs:u.totalLabelValuePairs,seriesCountByMetricName:u.seriesCountByMetricName,isCluster:c}),r&&Nt("div",{className:"vm-cardinality-panel-tips",children:[!a&&!o&&Nt(Pm,{}),a&&!o&&Nt(Rm,{}),!a&&!o&&Nt(Im,{}),o&&Nt(Dm,{})]}),s&&Nt(na,{variant:"error",children:s}),l.keys(a,o).map((e=>{return Nt(Lm,{sectionTitle:l.sectionsTitles(o)[e],tip:m[e],rows:u[e],onActionClick:(t=e,e=>{const r={match:ym[t]({query:e,focusLabel:o,match:a})};"labelValueCountByLabelName"!==t&&"seriesCountByLabelName"!=t||(r.focusLabel=e),"seriesCountByFocusLabelValue"==t&&(r.focusLabel=""),n(r)}),tabs:p.tabs[e],chartContainer:p.containerRefs[e],totalSeriesPrev:l.totalSeries(e,!0),totalSeries:l.totalSeries(e),tableHeaderCells:h[e],isPrometheus:l.isPrometheusData},e);var t}))]})},Fm=e=>(["topByAvgDuration","topByCount","topBySumDuration"].forEach((t=>{const n=e[t];Array.isArray(n)&&n.forEach((e=>{const t=en(1e3*e.timeRangeSeconds);e.url=((e,t)=>{var n;const{query:r,timeRangeSeconds:a}=e,o=["g0.expr=".concat(encodeURIComponent(r))],i=null===(n=rn.find((e=>e.duration===t)))||void 0===n?void 0:n.id;return i&&o.push("g0.relative_time=".concat(i)),a&&o.push("g0.range_input=".concat(t)),"".concat(We.home,"?").concat(o.join("&"))})(e,t),e.timeRange=t}))})),e),jm=e=>{let{topN:t,maxLifetime:n}=e;const{serverUrl:a}=Mt(),{setSearchParamsFromKeys:o}=ho(),[i,l]=(0,r.useState)(null),[s,c]=(0,r.useState)(!1),[u,d]=(0,r.useState)(),h=(0,r.useMemo)((()=>((e,t,n)=>"".concat(e,"/api/v1/status/top_queries?topN=").concat(t||"","&maxLifetime=").concat(n||""))(a,t,n)),[a,t,n]);return{data:i,error:u,loading:s,fetch:async()=>{c(!0),o({topN:t,maxLifetime:n});try{const e=await fetch(h),t=await e.json();l(e.ok?Fm(t):null),d(String(t.error||""))}catch(Pp){Pp instanceof Error&&"AbortError"!==Pp.name&&d("".concat(Pp.name,": ").concat(Pp.message))}c(!1)}}},Hm=e=>{let{rows:t,columns:n,defaultOrderBy:a}=e;const o=gl(),[i,l]=(0,r.useState)(a||"count"),[s,c]=(0,r.useState)("desc"),u=(0,r.useMemo)((()=>Nm(t,Em(s,i))),[t,i,s]),d=e=>()=>{var t;t=e,c((e=>"asc"===e&&i===t?"desc":"asc")),l(t)},h=e=>{let{query:t}=e;return async()=>{await o(t,"Query has been copied")}};return Nt("table",{className:"vm-table",children:[Nt("thead",{className:"vm-table-header",children:Nt("tr",{className:"vm-table__row vm-table__row_header",children:[n.map((e=>Nt("th",{className:"vm-table-cell vm-table-cell_header vm-table-cell_sort",onClick:d(e.sortBy||e.key),children:Nt("div",{className:"vm-table-cell__content",children:[e.title||e.key,Nt("div",{className:Cr()({"vm-table__sort-icon":!0,"vm-table__sort-icon_active":i===e.key,"vm-table__sort-icon_desc":"desc"===s&&i===e.key}),children:Nt(Hn,{})})]})},e.key))),Nt("th",{className:"vm-table-cell vm-table-cell_header"})," "]})}),Nt("tbody",{className:"vm-table-body",children:u.map(((e,t)=>Nt("tr",{className:"vm-table__row",children:[n.map((t=>Nt("td",{className:"vm-table-cell",children:e[t.key]||"-"},t.key))),Nt("td",{className:"vm-table-cell vm-table-cell_no-padding",children:Nt("div",{className:"vm-top-queries-panels__table-actions",children:[e.url&&Nt(_a,{title:"Execute query",children:Nt(Re,{to:e.url,target:"_blank",rel:"noreferrer","aria-disabled":!0,children:Nt(ma,{variant:"text",size:"small",startIcon:Nt(Yn,{}),ariaLabel:"execute query"})})}),Nt(_a,{title:"Copy query",children:Nt(ma,{variant:"text",size:"small",startIcon:Nt(rr,{}),onClick:h(e),ariaLabel:"copy query"})})]})})]},t)))})]})},$m=["table","JSON"].map(((e,t)=>({value:String(t),label:e,icon:Nt(0===t?Kn:Qn,{})}))),Vm=e=>{let{rows:t,title:n,columns:a,defaultOrderBy:o}=e;const{isMobile:i}=ea(),[l,s]=(0,r.useState)(0);return Nt("div",{className:Cr()({"vm-top-queries-panel":!0,"vm-block":!0,"vm-block_mobile":i}),children:[Nt("div",{className:Cr()({"vm-top-queries-panel-header":!0,"vm-section-header":!0,"vm-top-queries-panel-header_mobile":i}),children:[Nt("h5",{className:Cr()({"vm-section-header__title":!0,"vm-section-header__title_mobile":i}),children:n}),Nt("div",{className:"vm-section-header__tabs",children:Nt(Tr,{activeItem:String(l),items:$m,onChange:e=>{s(+e)}})})]}),Nt("div",{className:Cr()({"vm-top-queries-panel__table":!0,"vm-top-queries-panel__table_mobile":i}),children:[0===l&&Nt(Hm,{rows:t,columns:a,defaultOrderBy:o}),1===l&&Nt(Wh,{data:t})]})]})},Um=()=>{const{isMobile:e}=ea(),[t,n]=wm(10,"topN"),[a,i]=wm("10m","maxLifetime"),{data:l,error:s,loading:c,fetch:u}=jm({topN:t,maxLifetime:a}),d=(0,r.useMemo)((()=>{const e=a.trim().split(" ").reduce(((e,t)=>{const n=Kt(t);return n?{...e,...n}:{...e}}),{});return!!o().duration(e).asMilliseconds()}),[a]),h=(0,r.useMemo)((()=>!!t&&t<1),[t]),m=(0,r.useMemo)((()=>h?"Number must be bigger than zero":""),[h]),p=(0,r.useMemo)((()=>d?"":"Invalid duration value"),[d]),f=e=>{if(!l)return e;const t=l[e];return"number"===typeof t?qd(t,t,t):t||e},v=e=>{"Enter"===e.key&&u()};return(0,r.useEffect)((()=>{l&&(t||n(+l.topN),a||i(l.maxLifetime))}),[l]),(0,r.useEffect)((()=>(u(),window.addEventListener("popstate",u),()=>{window.removeEventListener("popstate",u)})),[]),Nt("div",{className:Cr()({"vm-top-queries":!0,"vm-top-queries_mobile":e}),children:[c&&Nt(xl,{containerStyles:{height:"500px"}}),Nt("div",{className:Cr()({"vm-top-queries-controls":!0,"vm-block":!0,"vm-block_mobile":e}),children:[Nt("div",{className:"vm-top-queries-controls-fields",children:[Nt("div",{className:"vm-top-queries-controls-fields__item",children:Nt(Wa,{label:"Max lifetime",value:a,error:p,helperText:"For example ".concat("30ms, 15s, 3d4h, 1y2w"),onChange:e=>{i(e)},onKeyDown:v})}),Nt("div",{className:"vm-top-queries-controls-fields__item",children:Nt(Wa,{label:"Number of returned queries",type:"number",value:t||"",error:m,onChange:e=>{n(+e)},onKeyDown:v})})]}),Nt("div",{className:Cr()({"vm-top-queries-controls-bottom":!0,"vm-top-queries-controls-bottom_mobile":e}),children:[Nt("div",{className:"vm-top-queries-controls-bottom__info",children:["VictoriaMetrics tracks the last\xa0",Nt(_a,{title:"search.queryStats.lastQueriesCount",children:Nt("b",{children:f("search.queryStats.lastQueriesCount")})}),"\xa0queries with durations at least\xa0",Nt(_a,{title:"search.queryStats.minQueryDuration",children:Nt("b",{children:f("search.queryStats.minQueryDuration")})})]}),Nt("div",{className:"vm-top-queries-controls-bottom__button",children:Nt(ma,{startIcon:Nt(qn,{}),onClick:u,children:"Execute"})})]})]}),s&&Nt(na,{variant:"error",children:s}),l&&Nt(Ct.FK,{children:Nt("div",{className:"vm-top-queries-panels",children:[Nt(Vm,{rows:l.topBySumDuration,title:"Queries with most summary time to execute",columns:[{key:"query"},{key:"sumDurationSeconds",title:"sum duration, sec"},{key:"timeRange",sortBy:"timeRangeSeconds",title:"query time interval"},{key:"count"}],defaultOrderBy:"sumDurationSeconds"}),Nt(Vm,{rows:l.topByAvgDuration,title:"Most heavy queries",columns:[{key:"query"},{key:"avgDurationSeconds",title:"avg duration, sec"},{key:"timeRange",sortBy:"timeRangeSeconds",title:"query time interval"},{key:"count"}],defaultOrderBy:"avgDurationSeconds"}),Nt(Vm,{rows:l.topByCount,title:"Most frequently executed queries",columns:[{key:"query"},{key:"timeRange",sortBy:"timeRangeSeconds",title:"query time interval"},{key:"count"}]})]})})]})},Bm={"color-primary":"#589DF6","color-secondary":"#316eca","color-error":"#e5534b","color-warning":"#c69026","color-info":"#539bf5","color-success":"#57ab5a","color-background-body":"#22272e","color-background-block":"#2d333b","color-background-tooltip":"rgba(22, 22, 22, 0.8)","color-text":"#cdd9e5","color-text-secondary":"#768390","color-text-disabled":"#636e7b","box-shadow":"rgba(0, 0, 0, 0.16) 1px 2px 6px","box-shadow-popper":"rgba(0, 0, 0, 0.2) 0px 2px 8px 0px","border-divider":"1px solid rgba(99, 110, 123, 0.5)","color-hover-black":"rgba(0, 0, 0, 0.12)","color-log-hits-bar-0":"rgba(255, 255, 255, 0.18)","color-log-hits-bar-1":"#FFB74D","color-log-hits-bar-2":"#81C784","color-log-hits-bar-3":"#64B5F6","color-log-hits-bar-4":"#E57373","color-log-hits-bar-5":"#8a62f0"},qm={"color-primary":"#3F51B5","color-secondary":"#E91E63","color-error":"#FD080E","color-warning":"#FF8308","color-info":"#03A9F4","color-success":"#4CAF50","color-background-body":"#FEFEFF","color-background-block":"#FFFFFF","color-background-tooltip":"rgba(80,80,80,0.9)","color-text":"#110f0f","color-text-secondary":"#706F6F","color-text-disabled":"#A09F9F","box-shadow":"rgba(0, 0, 0, 0.08) 1px 2px 6px","box-shadow-popper":"rgba(0, 0, 0, 0.1) 0px 2px 8px 0px","border-divider":"1px solid rgba(0, 0, 0, 0.15)","color-hover-black":"rgba(0, 0, 0, 0.06)","color-log-hits-bar-0":"rgba(0, 0, 0, 0.18)","color-log-hits-bar-1":"#FFB74D","color-log-hits-bar-2":"#81C784","color-log-hits-bar-3":"#64B5F6","color-log-hits-bar-4":"#E57373","color-log-hits-bar-5":"#8a62f0"},Ym=()=>{const[e,t]=(0,r.useState)(_t()),n=e=>{t(e.matches)};return(0,r.useEffect)((()=>{const e=window.matchMedia("(prefers-color-scheme: dark)");return e.addEventListener("change",n),()=>e.removeEventListener("change",n)}),[]),e},Wm=["primary","secondary","error","warning","info","success"],Km=e=>{let{onLoaded:t}=e;const n=Qe(),{palette:a={}}=Ke(),{theme:o}=Mt(),i=Ym(),l=Tt(),s=Mr(),[c,u]=(0,r.useState)({[ft.dark]:Bm,[ft.light]:qm,[ft.system]:_t()?Bm:qm}),d=()=>{const{innerWidth:e,innerHeight:t}=window,{clientWidth:n,clientHeight:r}=document.documentElement;yt("scrollbar-width","".concat(e-n,"px")),yt("scrollbar-height","".concat(t-r,"px")),yt("vh","".concat(.01*t,"px"))},h=()=>{Wm.forEach(((e,n)=>{const r=(e=>{let t=e.replace("#","").trim();if(3===t.length&&(t=t[0]+t[0]+t[1]+t[1]+t[2]+t[2]),6!==t.length)throw new Error("Invalid HEX color.");return(299*parseInt(t.slice(0,2),16)+587*parseInt(t.slice(2,4),16)+114*parseInt(t.slice(4,6),16))/1e3>=128?"#000000":"#FFFFFF"})(gt("color-".concat(e)));yt("".concat(e,"-text"),r),n===Wm.length-1&&(l({type:"SET_DARK_THEME"}),t(!0))}))},m=()=>{const e=et("THEME")||ft.system,t=c[e];Object.entries(t).forEach((e=>{let[t,n]=e;yt(t,n)})),h(),n&&(Wm.forEach((e=>{const t=a[e];t&&yt("color-".concat(e),t)})),h())};return(0,r.useEffect)((()=>{d(),m()}),[c]),(0,r.useEffect)(d,[s]),(0,r.useEffect)((()=>{const e=_t()?Bm:qm;c[ft.system]!==e?u((t=>({...t,[ft.system]:e}))):m()}),[o,i]),(0,r.useEffect)((()=>{n&&l({type:"SET_THEME",payload:ft.light})}),[]),null},Qm=()=>{const[e,t]=(0,r.useState)([]),[n,a]=(0,r.useState)(!1),o=(0,r.useRef)(document.body),i=e=>{e.preventDefault(),e.stopPropagation(),"dragenter"===e.type||"dragover"===e.type?a(!0):"dragleave"===e.type&&a(!1)};return Ar("dragenter",i,o),Ar("dragleave",i,o),Ar("dragover",i,o),Ar("drop",(e=>{var n;e.preventDefault(),e.stopPropagation(),a(!1),null!==e&&void 0!==e&&null!==(n=e.dataTransfer)&&void 0!==n&&n.files&&e.dataTransfer.files[0]&&(e=>{const n=Array.from(e||[]);t(n)})(e.dataTransfer.files)}),o),Ar("paste",(e=>{var n;const r=null===(n=e.clipboardData)||void 0===n?void 0:n.items;if(!r)return;const a=Array.from(r).filter((e=>"application/json"===e.type)).map((e=>e.getAsFile())).filter((e=>null!==e));t(a)}),o),{files:e,dragging:n}},Zm=e=>{let{onOpenModal:t,onChange:n}=e;return Nt("div",{className:"vm-upload-json-buttons",children:[Nt(ma,{variant:"outlined",onClick:t,children:"Paste JSON"}),Nt(ma,{children:["Upload Files",Nt("input",{id:"json",type:"file",accept:"application/json",multiple:!0,title:" ",onChange:n})]})]})},Gm=()=>{const[e,t]=(0,r.useState)([]),[n,a]=(0,r.useState)([]),o=(0,r.useMemo)((()=>!!e.length),[e]),{value:i,setTrue:l,setFalse:s}=fa(!1),c=function(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"";a((n=>[{filename:t,text:": ".concat(e.message)},...n]))},u=(e,n)=>{try{const r=JSON.parse(e),a=r.trace||r;if(!a.duration_msec)return void c(new Error(pt.traceNotFound),n);const o=new Nl(a,n);t((e=>[o,...e]))}catch(Pp){Pp instanceof Error&&c(Pp,n)}},d=e=>{e.map((e=>{const t=new FileReader,n=(null===e||void 0===e?void 0:e.name)||"";t.onload=e=>{var t;const r=String(null===(t=e.target)||void 0===t?void 0:t.result);u(r,n)},t.readAsText(e)}))},h=e=>{a([]);const t=Array.from(e.target.files||[]);d(t),e.target.value=""},m=e=>()=>{(e=>{a((t=>t.filter(((t,n)=>n!==e))))})(e)},{files:p,dragging:f}=Qm();return(0,r.useEffect)((()=>{d(p)}),[p]),Nt("div",{className:"vm-trace-page",children:[Nt("div",{className:"vm-trace-page-header",children:[Nt("div",{className:"vm-trace-page-header-errors",children:n.map(((e,t)=>Nt("div",{className:"vm-trace-page-header-errors-item",children:[Nt(na,{variant:"error",children:[Nt("b",{className:"vm-trace-page-header-errors-item__filename",children:e.filename}),Nt("span",{children:e.text})]}),Nt(ma,{className:"vm-trace-page-header-errors-item__close",startIcon:Nt(On,{}),variant:"text",color:"error",onClick:m(t)})]},"".concat(e,"_").concat(t))))}),Nt("div",{children:o&&Nt(Zm,{onOpenModal:l,onChange:h})})]}),o&&Nt("div",{children:Nt(Vl,{jsonEditor:!0,traces:e,onDeleteClick:n=>{const r=e.filter((e=>e.idValue!==n.idValue));t([...r])}})}),!o&&Nt("div",{className:"vm-trace-page-preview",children:[Nt("p",{className:"vm-trace-page-preview__text",children:["Please, upload file with JSON response content.","\n","The file must contain tracing information in JSON format.","\n","In order to use tracing please refer to the doc:\xa0",Nt("a",{className:"vm-link vm-link_colored",href:"https://docs.victoriametrics.com/#query-tracing",target:"_blank",rel:"help noreferrer",children:"https://docs.victoriametrics.com/#query-tracing"}),"\n","Tracing graph will be displayed after file upload.","\n","Attach files by dragging & dropping, selecting or pasting them."]}),Nt(Zm,{onOpenModal:l,onChange:h})]}),i&&Nt(ya,{title:"Paste JSON",onClose:s,children:Nt($l,{editable:!0,displayTitle:!0,defaultTile:"JSON ".concat(e.length+1),onClose:s,onUpload:u})}),f&&Nt("div",{className:"vm-trace-page__dropzone"})]})},Jm=e=>{const{serverUrl:t}=Mt(),{period:n}=fn(),[a,o]=(0,r.useState)([]),[i,l]=(0,r.useState)(!1),[s,c]=(0,r.useState)(),u=(0,r.useMemo)((()=>((e,t,n)=>{const r="{job=".concat(JSON.stringify(n),"}");return"".concat(e,"/api/v1/label/instance/values?match[]=").concat(encodeURIComponent(r),"&start=").concat(t.start,"&end=").concat(t.end)})(t,n,e)),[t,n,e]);return(0,r.useEffect)((()=>{if(!e)return;(async()=>{l(!0);try{const e=await fetch(u),t=await e.json(),n=t.data||[];o(n.sort(((e,t)=>e.localeCompare(t)))),e.ok?c(void 0):c("".concat(t.errorType,"\r\n").concat(null===t||void 0===t?void 0:t.error))}catch(Pp){Pp instanceof Error&&c("".concat(Pp.name,": ").concat(Pp.message))}l(!1)})().catch(console.error)}),[u]),{instances:a,isLoading:i,error:s}},Xm=(e,t)=>{const{serverUrl:n}=Mt(),{period:a}=fn(),[o,i]=(0,r.useState)([]),[l,s]=(0,r.useState)(!1),[c,u]=(0,r.useState)(),d=(0,r.useMemo)((()=>((e,t,n,r)=>{const a=Object.entries({job:n,instance:r}).filter((e=>e[1])).map((e=>{let[t,n]=e;return"".concat(t,"=").concat(JSON.stringify(n))})).join(","),o="{".concat(a,"}");return"".concat(e,"/api/v1/label/__name__/values?match[]=").concat(encodeURIComponent(o),"&start=").concat(t.start,"&end=").concat(t.end)})(n,a,e,t)),[n,a,e,t]);return(0,r.useEffect)((()=>{if(!e)return;(async()=>{s(!0);try{const e=await fetch(d),t=await e.json(),n=t.data||[];i(n.sort(((e,t)=>e.localeCompare(t)))),e.ok?u(void 0):u("".concat(t.errorType,"\r\n").concat(null===t||void 0===t?void 0:t.error))}catch(Pp){Pp instanceof Error&&u("".concat(Pp.name,": ").concat(Pp.message))}s(!1)})().catch(console.error)}),[d]),{names:o,isLoading:l,error:c}},ep=e=>{let{name:t,job:n,instance:a,rateEnabled:o,isBucket:i,height:l}=e;const{isMobile:s}=ea(),{customStep:c,yaxis:u}=Ur(),{period:d}=fn(),h=Br(),m=vn(),p=Zt(d.end-d.start),f=Qt(c),v=en(10*f*1e3),[g,y]=(0,r.useState)(!1),[_,b]=(0,r.useState)(!1),w=g&&c===p?v:c,k=(0,r.useMemo)((()=>{const e=Object.entries({job:n,instance:a}).filter((e=>e[1])).map((e=>{let[t,n]=e;return"".concat(t,"=").concat(JSON.stringify(n))}));e.push("__name__=".concat(JSON.stringify(t))),"node_cpu_seconds_total"==t&&e.push('mode!="idle"');const r="{".concat(e.join(","),"}");if(i)return"sum(rate(".concat(r,")) by (vmrange, le)");const l=o?"rollup_rate(".concat(r,")"):"rollup(".concat(r,")");return"\nwith (q = ".concat(l,') (\n alias(min(label_match(q, "rollup", "min")), "min"),\n alias(max(label_match(q, "rollup", "max")), "max"),\n alias(avg(label_match(q, "rollup", "avg")), "avg"),\n)')}),[t,n,a,o,i]),{isLoading:x,graphData:S,error:C,queryErrors:E,warning:N,isHistogram:A}=Ol({predefinedQuery:[k],visible:!0,customStep:w,showAllSeries:_});return(0,r.useEffect)((()=>{y(A)}),[A]),Nt("div",{className:Cr()({"vm-explore-metrics-graph":!0,"vm-explore-metrics-graph_mobile":s}),children:[x&&Nt(xl,{}),C&&Nt(na,{variant:"error",children:C}),E[0]&&Nt(na,{variant:"error",children:E[0]}),N&&Nt(Bl,{warning:N,query:[k],onChange:b}),S&&d&&Nt($h,{data:S,period:d,customStep:w,query:[k],yaxis:u,setYaxisLimits:e=>{h({type:"SET_YAXIS_LIMITS",payload:e})},setPeriod:e=>{let{from:t,to:n}=e;m({type:"SET_PERIOD",payload:{from:t,to:n}})},showLegend:!1,height:l,isHistogram:A})]})},tp=e=>{let{name:t,index:n,length:r,isBucket:a,rateEnabled:o,onChangeRate:i,onRemoveItem:l,onChangeOrder:s}=e;const{isMobile:c}=ea(),{value:u,setTrue:d,setFalse:h}=fa(!1),m=()=>{l(t)},p=()=>{s(t,n,n+1)},f=()=>{s(t,n,n-1)};return Nt("div",c?{className:"vm-explore-metrics-item-header vm-explore-metrics-item-header_mobile",children:[Nt("div",{className:"vm-explore-metrics-item-header__name",children:t}),Nt(ma,{variant:"text",size:"small",startIcon:Nt(ur,{}),onClick:d,ariaLabel:"open panel settings"}),u&&Nt(ya,{title:t,onClose:h,children:Nt("div",{className:"vm-explore-metrics-item-header-modal",children:[Nt("div",{className:"vm-explore-metrics-item-header-modal-order",children:[Nt(ma,{startIcon:Nt(Jn,{}),variant:"outlined",onClick:f,disabled:0===n,ariaLabel:"move graph up"}),Nt("p",{children:["position:",Nt("span",{className:"vm-explore-metrics-item-header-modal-order__index",children:["#",n+1]})]}),Nt(ma,{endIcon:Nt(Gn,{}),variant:"outlined",onClick:p,disabled:n===r-1,ariaLabel:"move graph down"})]}),!a&&Nt("div",{className:"vm-explore-metrics-item-header-modal__rate",children:[Nt(To,{label:Nt("span",{children:["enable ",Nt("code",{children:"rate()"})]}),value:o,onChange:i,fullWidth:!0}),Nt("p",{children:"calculates the average per-second speed of metrics change"})]}),Nt(ma,{startIcon:Nt(On,{}),color:"error",variant:"outlined",onClick:m,fullWidth:!0,children:"Remove graph"})]})})]}:{className:"vm-explore-metrics-item-header",children:[Nt("div",{className:"vm-explore-metrics-item-header-order",children:[Nt(_a,{title:"move graph up",children:Nt(ma,{className:"vm-explore-metrics-item-header-order__up",startIcon:Nt(jn,{}),variant:"text",color:"gray",size:"small",onClick:f,ariaLabel:"move graph up"})}),Nt("div",{className:"vm-explore-metrics-item-header__index",children:["#",n+1]}),Nt(_a,{title:"move graph down",children:Nt(ma,{className:"vm-explore-metrics-item-header-order__down",startIcon:Nt(jn,{}),variant:"text",color:"gray",size:"small",onClick:p,ariaLabel:"move graph down"})})]}),Nt("div",{className:"vm-explore-metrics-item-header__name",children:t}),!a&&Nt("div",{className:"vm-explore-metrics-item-header__rate",children:Nt(_a,{title:"calculates the average per-second speed of metric's change",children:Nt(To,{label:Nt("span",{children:["enable ",Nt("code",{children:"rate()"})]}),value:o,onChange:i})})}),Nt("div",{className:"vm-explore-metrics-item-header__close",children:Nt(_a,{title:"close graph",children:Nt(ma,{startIcon:Nt(On,{}),variant:"text",color:"gray",size:"small",onClick:m,ariaLabel:"close graph"})})})]})},np=e=>{let{name:t,job:n,instance:a,index:o,length:i,size:l,onRemoveItem:s,onChangeOrder:c}=e;const u=(0,r.useMemo)((()=>/_sum?|_total?|_count?/.test(t)),[t]),d=(0,r.useMemo)((()=>/_bucket?/.test(t)),[t]),[h,m]=(0,r.useState)(u),p=Mr(),f=(0,r.useMemo)(l.height,[l,p]);return(0,r.useEffect)((()=>{m(u)}),[n]),Nt("div",{className:"vm-explore-metrics-item vm-block vm-block_empty-padding",children:[Nt(tp,{name:t,index:o,length:i,isBucket:d,rateEnabled:h,size:l.id,onChangeRate:m,onRemoveItem:s,onChangeOrder:c}),Nt(ep,{name:t,job:n,instance:a,rateEnabled:h,isBucket:d,height:f},"".concat(t,"_").concat(n,"_").concat(a,"_").concat(h))]})},rp=e=>{let{values:t,onRemoveItem:n}=e;const{isMobile:r}=ea();return r?Nt("span",{className:"vm-select-input-content__counter",children:["selected ",t.length]}):Nt(Ct.FK,{children:t.map((e=>{return Nt("div",{className:"vm-select-input-content__selected",children:[Nt("span",{children:e}),Nt("div",{onClick:(t=e,e=>{n(t),e.stopPropagation()}),children:Nt(On,{})})]},e);var t}))})},ap=e=>{let{value:t,list:n,label:a,placeholder:o,noOptionsText:i,clearable:l=!1,searchable:s=!1,autofocus:c,disabled:u,onChange:d}=e;const{isDarkTheme:h}=Mt(),{isMobile:m}=ea(),[p,f]=(0,r.useState)(""),v=(0,r.useRef)(null),[g,y]=(0,r.useState)(null),[_,b]=(0,r.useState)(!1),w=(0,r.useRef)(null),k=Array.isArray(t),x=Array.isArray(t)?t:void 0,S=m&&k&&!(null===x||void 0===x||!x.length),C=(0,r.useMemo)((()=>_?p:Array.isArray(t)?"":t),[t,p,_,k]),E=(0,r.useMemo)((()=>_?p||"(.+)":""),[p,_]),N=()=>{w.current&&w.current.blur()},A=()=>{b(!1),N()},M=e=>{f(""),d(e),k||A(),k&&w.current&&w.current.focus()};return(0,r.useEffect)((()=>{f(""),_&&w.current&&w.current.focus(),_||N()}),[_,w]),(0,r.useEffect)((()=>{c&&w.current&&!m&&w.current.focus()}),[c,w]),Ar("keyup",(e=>{w.current!==e.target&&b(!1)})),ha(v,A,g),Nt("div",{className:Cr()({"vm-select":!0,"vm-select_dark":h,"vm-select_disabled":u}),children:[Nt("div",{className:"vm-select-input",onClick:e=>{e.target instanceof HTMLInputElement||u||b((e=>!e))},ref:v,children:[Nt("div",{className:"vm-select-input-content",children:[!(null===x||void 0===x||!x.length)&&Nt(rp,{values:x,onRemoveItem:M}),!S&&Nt("input",{value:C,type:"text",placeholder:o,onInput:e=>{f(e.target.value)},onFocus:()=>{u||b(!0)},onBlur:()=>{n.includes(p)&&d(p)},ref:w,readOnly:m||!s})]}),a&&Nt("span",{className:"vm-text-field__label",children:a}),l&&t&&Nt("div",{className:"vm-select-input__icon",onClick:(e=>t=>{M(e),t.stopPropagation()})(""),children:Nt(On,{})}),Nt("div",{className:Cr()({"vm-select-input__icon":!0,"vm-select-input__icon_open":_}),children:Nt(Hn,{})})]}),Nt(Vo,{label:a,value:E,options:n.map((e=>({value:e}))),anchor:v,selected:x,minLength:1,fullWidth:!0,noOptionsText:i,onSelect:M,onOpenAutocomplete:b,onChangeWrapperRef:y})]})},op=st.map((e=>e.id)),ip=e=>{let{jobs:t,instances:n,names:a,job:o,instance:i,size:l,selectedMetrics:s,onChangeJob:c,onChangeInstance:u,onToggleMetric:d,onChangeSize:h}=e;const m=(0,r.useMemo)((()=>o?"":"No instances. Please select job"),[o]),p=(0,r.useMemo)((()=>o?"":"No metric names. Please select job"),[o]),{isMobile:f}=ea(),{value:v,toggle:g,setFalse:y}=fa("false"!==et("EXPLORE_METRICS_TIPS"));return(0,r.useEffect)((()=>{Xe("EXPLORE_METRICS_TIPS","".concat(v))}),[v]),Nt(Ct.FK,{children:[Nt("div",{className:Cr()({"vm-explore-metrics-header":!0,"vm-explore-metrics-header_mobile":f,"vm-block":!0,"vm-block_mobile":f}),children:[Nt("div",{className:"vm-explore-metrics-header__job",children:Nt(ap,{value:o,list:t,label:"Job",placeholder:"Please select job",onChange:c,autofocus:!o&&!!t.length&&!f,searchable:!0})}),Nt("div",{className:"vm-explore-metrics-header__instance",children:Nt(ap,{value:i,list:n,label:"Instance",placeholder:"Please select instance",onChange:u,noOptionsText:m,clearable:!0,searchable:!0})}),Nt("div",{className:"vm-explore-metrics-header__size",children:[Nt(ap,{label:"Size graphs",value:l,list:op,onChange:h}),Nt(_a,{title:"".concat(v?"Hide":"Show"," tip"),children:Nt(ma,{variant:"text",color:v?"warning":"gray",startIcon:Nt(hr,{}),onClick:g,ariaLabel:"visibility tips"})})]}),Nt("div",{className:"vm-explore-metrics-header-metrics",children:Nt(ap,{label:"Metrics",value:s,list:a,placeholder:"Search metric name",onChange:d,noOptionsText:p,clearable:!0,searchable:!0})})]}),v&&Nt(na,{variant:"warning",children:Nt("div",{className:"vm-explore-metrics-header-description",children:[Nt("p",{children:["Please note: this page is solely designed for exploring Prometheus metrics. Prometheus metrics always contain ",Nt("code",{children:"job"})," and ",Nt("code",{children:"instance"})," labels (see ",Nt("a",{className:"vm-link vm-link_colored",href:"https://prometheus.io/docs/concepts/jobs_instances/",children:"these docs"}),"), and this page relies on them as filters. ",Nt("br",{}),"Please use this page for Prometheus metrics only, in accordance with their naming conventions."]}),Nt(ma,{variant:"text",size:"small",startIcon:Nt(On,{}),onClick:y,ariaLabel:"close tips"})]})})]})},lp=ut("job",""),sp=ut("instance",""),cp=ut("metrics",""),up=ut("size",""),dp=st.find((e=>up?e.id===up:e.isDefault))||st[0],hp=()=>{const[e,t]=(0,r.useState)(lp),[n,a]=(0,r.useState)(sp),[o,i]=(0,r.useState)(cp?cp.split("&"):[]),[l,s]=(0,r.useState)(dp);(e=>{let{job:t,instance:n,metrics:a,size:o}=e;const{duration:i,relativeTime:l,period:{date:s}}=fn(),{customStep:c}=Ur(),{setSearchParamsFromKeys:u}=ho(),d=()=>{const e=sm({"g0.range_input":i,"g0.end_input":s,"g0.step_input":c,"g0.relative_time":l,size:o,job:t,instance:n,metrics:a});u(e)};(0,r.useEffect)(d,[i,l,s,c,t,n,a,o]),(0,r.useEffect)(d,[])})({job:e,instance:n,metrics:o.join("&"),size:l.id});const{jobs:c,isLoading:u,error:d}=(()=>{const{serverUrl:e}=Mt(),{period:t}=fn(),[n,a]=(0,r.useState)([]),[o,i]=(0,r.useState)(!1),[l,s]=(0,r.useState)(),c=(0,r.useMemo)((()=>((e,t)=>"".concat(e,"/api/v1/label/job/values?start=").concat(t.start,"&end=").concat(t.end))(e,t)),[e,t]);return(0,r.useEffect)((()=>{(async()=>{i(!0);try{const e=await fetch(c),t=await e.json(),n=t.data||[];a(n.sort(((e,t)=>e.localeCompare(t)))),e.ok?s(void 0):s("".concat(t.errorType,"\r\n").concat(null===t||void 0===t?void 0:t.error))}catch(Pp){Pp instanceof Error&&s("".concat(Pp.name,": ").concat(Pp.message))}i(!1)})().catch(console.error)}),[c]),{jobs:n,isLoading:o,error:l}})(),{instances:h,isLoading:m,error:p}=Jm(e),{names:f,isLoading:v,error:g}=Xm(e,n),y=(0,r.useMemo)((()=>u||m||v),[u,m,v]),_=(0,r.useMemo)((()=>d||p||g),[d,p,g]),b=e=>{i(e?t=>t.includes(e)?t.filter((t=>t!==e)):[...t,e]:[])},w=(e,t,n)=>{const r=n>o.length-1;n<0||r||i((e=>{const r=[...e],[a]=r.splice(t,1);return r.splice(n,0,a),r}))};return(0,r.useEffect)((()=>{n&&h.length&&!h.includes(n)&&a("")}),[h,n]),Nt("div",{className:"vm-explore-metrics",children:[Nt(ip,{jobs:c,instances:h,names:f,job:e,size:l.id,instance:n,selectedMetrics:o,onChangeJob:t,onChangeSize:e=>{const t=st.find((t=>t.id===e));t&&s(t)},onChangeInstance:a,onToggleMetric:b}),y&&Nt(xl,{}),_&&Nt(na,{variant:"error",children:_}),!e&&Nt(na,{variant:"info",children:"Please select job to see list of metric names."}),e&&!o.length&&Nt(na,{variant:"info",children:"Please select metric names to see the graphs."}),Nt("div",{className:"vm-explore-metrics-body",children:o.map(((t,r)=>Nt(np,{name:t,job:e,instance:n,index:r,length:o.length,size:l,onRemoveItem:b,onChangeOrder:w},t)))})]})},mp=()=>{const t=gl();return Nt("div",{className:"vm-preview-icons",children:Object.entries(e).map((e=>{let[n,r]=e;return Nt("div",{className:"vm-preview-icons-item",onClick:(a=n,async()=>{await t("<".concat(a,"/>"),"<".concat(a,"/> has been copied"))}),children:[Nt("div",{className:"vm-preview-icons-item__svg",children:r()}),Nt("div",{className:"vm-preview-icons-item__name",children:"<".concat(n,"/>")})]},n);var a}))})};var pp=function(e){return e.copy="Copy",e.copied="Copied",e}(pp||{});const fp=e=>{let{code:t}=e;const[n,a]=(0,r.useState)(pp.copy);return(0,r.useEffect)((()=>{let e=null;return n===pp.copied&&(e=setTimeout((()=>a(pp.copy)),1e3)),()=>{e&&clearTimeout(e)}}),[n]),Nt("code",{className:"vm-code-example",children:[t,Nt("div",{className:"vm-code-example__copy",children:Nt(_a,{title:n,children:Nt(ma,{size:"small",variant:"text",onClick:()=>{navigator.clipboard.writeText(t),a(pp.copied)},startIcon:Nt(rr,{}),ariaLabel:"close"})})})]})},vp=()=>Nt("a",{className:"vm-link vm-link_colored",href:"https://docs.victoriametrics.com/MetricsQL.html",target:"_blank",rel:"help noreferrer",children:"MetricsQL"}),gp=()=>Nt("a",{className:"vm-link vm-link_colored",href:"https://grafana.com/grafana/dashboards/1860-node-exporter-full/",target:"_blank",rel:"help noreferrer",children:"Node Exporter Full"}),yp=()=>Nt("section",{className:"vm-with-template-tutorial",children:[Nt("h2",{className:"vm-with-template-tutorial__title",children:["Tutorial for WITH expressions in ",Nt(vp,{})]}),Nt("div",{className:"vm-with-template-tutorial-section",children:[Nt("p",{className:"vm-with-template-tutorial-section__text",children:["Let's look at the following real query from ",Nt(gp,{})," dashboard:"]}),Nt(fp,{code:'(\n (\n node_memory_MemTotal_bytes{instance=~"$node:$port", job=~"$job"}\n -\n node_memory_MemFree_bytes{instance=~"$node:$port", job=~"$job"}\n )\n /\n node_memory_MemTotal_bytes{instance=~"$node:$port", job=~"$job"}\n) * 100'}),Nt("p",{className:"vm-with-template-tutorial-section__text",children:"It is clear the query calculates the percentage of used memory for the given $node, $port and $job. Isn't it? :)"})]}),Nt("div",{className:"vm-with-template-tutorial-section",children:[Nt("p",{className:"vm-with-template-tutorial-section__text",children:"What's wrong with this query? Copy-pasted label filters for distinct timeseries which makes it easy to mistype these filters during modification. Let's simplify the query with WITH expressions:"}),Nt(fp,{code:'WITH (\n commonFilters = {instance=~"$node:$port",job=~"$job"}\n)\n(\n node_memory_MemTotal_bytes{commonFilters}\n -\n node_memory_MemFree_bytes{commonFilters}\n)\n /\nnode_memory_MemTotal_bytes{commonFilters} * 100'})]}),Nt("div",{className:"vm-with-template-tutorial-section",children:[Nt("p",{className:"vm-with-template-tutorial-section__text",children:["Now label filters are located in a single place instead of three distinct places. The query mentions node_memory_MemTotal_bytes metric twice and ","{commonFilters}"," three times. WITH expressions may improve this:"]}),Nt(fp,{code:'WITH (\n my_resource_utilization(free, limit, filters) = (limit{filters} - free{filters}) / limit{filters} * 100\n)\nmy_resource_utilization(\n node_memory_MemFree_bytes,\n node_memory_MemTotal_bytes,\n {instance=~"$node:$port",job=~"$job"},\n)'}),Nt("p",{className:"vm-with-template-tutorial-section__text",children:"Now the template function my_resource_utilization() may be used for monitoring arbitrary resources - memory, CPU, network, storage, you name it."})]}),Nt("div",{className:"vm-with-template-tutorial-section",children:[Nt("p",{className:"vm-with-template-tutorial-section__text",children:["Let's take another nice query from ",Nt(gp,{})," dashboard:"]}),Nt(fp,{code:'(\n (\n (\n count(\n count(node_cpu_seconds_total{instance=~"$node:$port",job=~"$job"}) by (cpu)\n )\n )\n -\n avg(\n sum by (mode) (rate(node_cpu_seconds_total{mode=\'idle\',instance=~"$node:$port",job=~"$job"}[5m]))\n )\n )\n *\n 100\n)\n /\ncount(\n count(node_cpu_seconds_total{instance=~"$node:$port",job=~"$job"}) by (cpu)\n)'}),Nt("p",{className:"vm-with-template-tutorial-section__text",children:"Do you understand what does this mess do? Is it manageable? :) WITH expressions are happy to help in a few iterations."})]}),Nt("div",{className:"vm-with-template-tutorial-section",children:[Nt("p",{className:"vm-with-template-tutorial-section__text",children:"1. Extract common filters used in multiple places into a commonFilters variable:"}),Nt(fp,{code:'WITH (\n commonFilters = {instance=~"$node:$port",job=~"$job"}\n)\n(\n (\n (\n count(\n count(node_cpu_seconds_total{commonFilters}) by (cpu)\n )\n )\n -\n avg(\n sum by (mode) (rate(node_cpu_seconds_total{mode=\'idle\',commonFilters}[5m]))\n )\n )\n *\n 100\n)\n /\ncount(\n count(node_cpu_seconds_total{commonFilters}) by (cpu)\n)'})]}),Nt("div",{className:"vm-with-template-tutorial-section",children:[Nt("p",{className:"vm-with-template-tutorial-section__text",children:'2. Extract "count(count(...) by (cpu))" into cpuCount variable:'}),Nt(fp,{code:'WITH (\n commonFilters = {instance=~"$node:$port",job=~"$job"},\n cpuCount = count(count(node_cpu_seconds_total{commonFilters}) by (cpu))\n)\n(\n (\n cpuCount\n -\n avg(\n sum by (mode) (rate(node_cpu_seconds_total{mode=\'idle\',commonFilters}[5m]))\n )\n )\n *\n 100\n) / cpuCount'})]}),Nt("div",{className:"vm-with-template-tutorial-section",children:[Nt("p",{className:"vm-with-template-tutorial-section__text",children:"3. Extract rate(...) part into cpuIdle variable, since it is clear now that this part calculates the number of idle CPUs:"}),Nt(fp,{code:'WITH (\n commonFilters = {instance=~"$node:$port",job=~"$job"},\n cpuCount = count(count(node_cpu_seconds_total{commonFilters}) by (cpu)),\n cpuIdle = sum(rate(node_cpu_seconds_total{mode=\'idle\',commonFilters}[5m]))\n)\n((cpuCount - cpuIdle) * 100) / cpuCount'})]}),Nt("div",{className:"vm-with-template-tutorial-section",children:[Nt("p",{className:"vm-with-template-tutorial-section__text",children:["4. Put node_cpu_seconds_total","{commonFilters}"," into its own varialbe with the name cpuSeconds:"]}),Nt(fp,{code:'WITH (\n cpuSeconds = node_cpu_seconds_total{instance=~"$node:$port",job=~"$job"},\n cpuCount = count(count(cpuSeconds) by (cpu)),\n cpuIdle = sum(rate(cpuSeconds{mode=\'idle\'}[5m]))\n)\n((cpuCount - cpuIdle) * 100) / cpuCount'}),Nt("p",{className:"vm-with-template-tutorial-section__text",children:"Now the query became more clear comparing to the initial query."})]}),Nt("div",{className:"vm-with-template-tutorial-section",children:[Nt("p",{className:"vm-with-template-tutorial-section__text",children:"WITH expressions may be nested and may be put anywhere. Try expanding the following query:"}),Nt(fp,{code:"WITH (\n f(a, b) = WITH (\n f1(x) = b-x,\n f2(x) = x+x\n ) f1(a)*f2(b)\n) f(foo, with(x=bar) x)"})]})]}),_p=()=>{const{serverUrl:e}=Mt(),[t,n]=He(),[a,o]=(0,r.useState)(""),[i,l]=(0,r.useState)(!1),[s,c]=(0,r.useState)();return{data:a,error:s,loading:i,expand:async r=>{t.set("expr",r),n(t);const a=((e,t)=>"".concat(e,"/expand-with-exprs?query=").concat(encodeURIComponent(t),"&format=json"))(e,r);l(!0);try{const e=await fetch(a),t=await e.json();o((null===t||void 0===t?void 0:t.expr)||""),c(String(t.error||""))}catch(Pp){Pp instanceof Error&&"AbortError"!==Pp.name&&c("".concat(Pp.name,": ").concat(Pp.message))}l(!1)}}},bp=()=>{const[e]=He(),{data:t,loading:n,error:a,expand:o}=_p(),[i,l]=(0,r.useState)(e.get("expr")||""),s=()=>{o(i)};return(0,r.useEffect)((()=>{i&&o(i)}),[]),Nt("section",{className:"vm-with-template",children:[n&&Nt(xl,{}),Nt("div",{className:"vm-with-template-body vm-block",children:[Nt("div",{className:"vm-with-template-body__expr",children:Nt(Wa,{type:"textarea",label:"MetricsQL query with optional WITH expressions",value:i,error:a,autofocus:!0,onEnter:s,onChange:e=>{l(e)}})}),Nt("div",{className:"vm-with-template-body__result",children:Nt(Wa,{type:"textarea",label:"MetricsQL query after expanding WITH expressions and applying other optimizations",value:t,disabled:!0})}),Nt("div",{className:"vm-with-template-body-top",children:Nt(ma,{variant:"contained",onClick:s,startIcon:Nt(qn,{}),children:"Expand"})})]}),Nt("div",{className:"vm-block",children:Nt(yp,{})})]})},wp=()=>{const{serverUrl:e}=Mt(),[t,n]=(0,r.useState)(null),[a,o]=(0,r.useState)(!1),[i,l]=(0,r.useState)();return{data:t,error:i,loading:a,fetchData:async(t,r)=>{const a=((e,t,n)=>{const r=["format=json","relabel_configs=".concat(encodeURIComponent(t)),"metric=".concat(encodeURIComponent(n))];return"".concat(e,"/metric-relabel-debug?").concat(r.join("&"))})(e,t,r);o(!0);try{const e=await fetch(a),t=await e.json();n(t.error?null:t),l(String(t.error||""))}catch(Pp){Pp instanceof Error&&"AbortError"!==Pp.name&&l("".concat(Pp.name,": ").concat(Pp.message))}o(!1)}}},kp={config:'- if: \'{bar_label=~"b.*"}\'\n source_labels: [foo_label, bar_label]\n separator: "_"\n target_label: foobar\n- action: labeldrop\n regex: "foo_.*"\n- target_label: job\n replacement: "my-application-2"',labels:'{__name__="my_metric", bar_label="bar", foo_label="foo", job="my-application", instance="192.168.0.1"}'},xp=()=>{const[e,t]=He(),{data:n,loading:a,error:o,fetchData:i}=wp(),[l,s]=wm("","config"),[c,u]=wm("","labels"),d=(0,r.useCallback)((()=>{i(l,c),e.set("config",l),e.set("labels",c),t(e)}),[l,c]);return(0,r.useEffect)((()=>{const t=e.get("config")||"",n=e.get("labels")||"";(n||t)&&(i(t,n),s(t),u(n))}),[]),Nt("section",{className:"vm-relabeling",children:[a&&Nt(xl,{}),Nt("div",{className:"vm-relabeling-header vm-block",children:[Nt("div",{className:"vm-relabeling-header-configs",children:Nt(Wa,{type:"textarea",label:"Relabel configs",value:l,autofocus:!0,onChange:e=>{s(e||"")},onEnter:d})}),Nt("div",{className:"vm-relabeling-header__labels",children:Nt(Wa,{type:"textarea",label:"Labels",value:c,onChange:e=>{u(e||"")},onEnter:d})}),Nt("div",{className:"vm-relabeling-header-bottom",children:[Nt("a",{className:"vm-link vm-link_with-icon",target:"_blank",href:"https://docs.victoriametrics.com/relabeling.html",rel:"help noreferrer",children:[Nt(In,{}),"Relabeling cookbook"]}),Nt("a",{className:"vm-link vm-link_with-icon",target:"_blank",href:"https://docs.victoriametrics.com/vmagent.html#relabeling",rel:"help noreferrer",children:[Nt(ir,{}),"Documentation"]}),Nt(ma,{variant:"text",onClick:()=>{const{config:n,labels:r}=kp;s(n),u(r),i(n,r),e.set("config",n),e.set("labels",r),t(e)},children:"Try example"}),Nt(ma,{variant:"contained",onClick:d,startIcon:Nt(qn,{}),children:"Submit"})]})]}),o&&Nt(na,{variant:"error",children:o}),n&&Nt("div",{className:"vm-relabeling-steps vm-block",children:[n.originalLabels&&Nt("div",{className:"vm-relabeling-steps-item",children:Nt("div",{className:"vm-relabeling-steps-item__row",children:[Nt("span",{children:"Original labels:"}),Nt("code",{dangerouslySetInnerHTML:{__html:n.originalLabels}})]})}),n.steps.map(((e,t)=>Nt("div",{className:"vm-relabeling-steps-item",children:[Nt("div",{className:"vm-relabeling-steps-item__row",children:[Nt("span",{children:"Step:"}),t+1]}),Nt("div",{className:"vm-relabeling-steps-item__row",children:[Nt("span",{children:"Relabeling Rule:"}),Nt("code",{children:Nt("pre",{children:e.rule})})]}),Nt("div",{className:"vm-relabeling-steps-item__row",children:[Nt("span",{children:"Input Labels:"}),Nt("code",{children:Nt("pre",{dangerouslySetInnerHTML:{__html:e.inLabels}})})]}),Nt("div",{className:"vm-relabeling-steps-item__row",children:[Nt("span",{children:"Output labels:"}),Nt("code",{children:Nt("pre",{dangerouslySetInnerHTML:{__html:e.outLabels}})})]})]},t))),n.resultingLabels&&Nt("div",{className:"vm-relabeling-steps-item",children:Nt("div",{className:"vm-relabeling-steps-item__row",children:[Nt("span",{children:"Resulting labels:"}),Nt("code",{dangerouslySetInnerHTML:{__html:n.resultingLabels}})]})})]})]})},Sp=e=>{let{rows:t,columns:n,defaultOrderBy:a,defaultOrderDir:o,copyToClipboard:i,paginationOffset:l}=e;const[s,c]=(0,r.useState)(a),[u,d]=(0,r.useState)(o||"desc"),[h,m]=(0,r.useState)(null),p=(0,r.useMemo)((()=>{const{startIndex:e,endIndex:n}=l;return Nm(t,Em(u,s)).slice(e,n)}),[t,s,u,l]),f=(e,t)=>async()=>{if(h!==t)try{await navigator.clipboard.writeText(String(e)),m(t)}catch(Pp){console.error(Pp)}};return(0,r.useEffect)((()=>{if(null===h)return;const e=setTimeout((()=>m(null)),2e3);return()=>clearTimeout(e)}),[h]),Nt("table",{className:"vm-table",children:[Nt("thead",{className:"vm-table-header",children:Nt("tr",{className:"vm-table__row vm-table__row_header",children:[n.map((e=>{return Nt("th",{className:"vm-table-cell vm-table-cell_header vm-table-cell_sort",onClick:(t=e.key,()=>{d((e=>"asc"===e&&s===t?"desc":"asc")),c(t)}),children:Nt("div",{className:"vm-table-cell__content",children:[Nt("div",{children:String(e.title||e.key)}),Nt("div",{className:Cr()({"vm-table__sort-icon":!0,"vm-table__sort-icon_active":s===e.key,"vm-table__sort-icon_desc":"desc"===u&&s===e.key}),children:Nt(Hn,{})})]})},String(e.key));var t})),i&&Nt("th",{className:"vm-table-cell vm-table-cell_header"})]})}),Nt("tbody",{className:"vm-table-body",children:p.map(((e,t)=>Nt("tr",{className:"vm-table__row",children:[n.map((t=>Nt("td",{className:Cr()({"vm-table-cell":!0,["".concat(t.className)]:t.className}),children:e[t.key]||"-"},String(t.key)))),i&&Nt("td",{className:"vm-table-cell vm-table-cell_right",children:e[i]&&Nt("div",{className:"vm-table-cell__content",children:Nt(_a,{title:h===t?"Copied":"Copy row",children:Nt(ma,{variant:"text",color:h===t?"success":"gray",size:"small",startIcon:Nt(h===t?Xn:rr,{}),onClick:f(e[i],t),ariaLabel:"copy row"})})})})]},t)))})]})},Cp=()=>{const{isMobile:e}=ea(),{timezone:t}=fn(),{data:n,lastUpdated:a,isLoading:i,error:l,fetchData:s}=(()=>{const{serverUrl:e}=Mt(),[t,n]=(0,r.useState)([]),[a,i]=(0,r.useState)(o()().format(It)),[l,s]=(0,r.useState)(!1),[c,u]=(0,r.useState)(),d=(0,r.useMemo)((()=>"".concat(e,"/api/v1/status/active_queries")),[e]),h=async()=>{s(!0);try{const e=await fetch(d),t=await e.json();n(t.data),i(o()().format("HH:mm:ss:SSS")),e.ok?u(void 0):u("".concat(t.errorType,"\r\n").concat(null===t||void 0===t?void 0:t.error))}catch(Pp){Pp instanceof Error&&u("".concat(Pp.name,": ").concat(Pp.message))}s(!1)};return(0,r.useEffect)((()=>{h().catch(console.error)}),[d]),{data:t,lastUpdated:a,isLoading:l,error:c,fetchData:h}})(),c=(0,r.useMemo)((()=>n.map((e=>{const t=o()(e.start).tz().format(Pt),n=o()(e.end).tz().format(Pt);return{duration:e.duration,remote_addr:e.remote_addr,query:e.query,args:"".concat(t," to ").concat(n,", step=").concat(Wt(e.step)),data:JSON.stringify(e,null,2)}}))),[n,t]),u=(0,r.useMemo)((()=>{if(null===c||void 0===c||!c.length)return[];const e=Object.keys(c[0]),t={remote_addr:"client address"},n=["data"];return e.filter((e=>!n.includes(e))).map((e=>({key:e,title:t[e]||e})))}),[c]);return Nt("div",{className:"vm-active-queries",children:[i&&Nt(xl,{}),Nt("div",{className:"vm-active-queries-header",children:[!c.length&&!l&&Nt(na,{variant:"info",children:"There are currently no active queries running"}),l&&Nt(na,{variant:"error",children:l}),Nt("div",{className:"vm-active-queries-header-controls",children:[Nt(ma,{variant:"contained",onClick:async()=>{s().catch(console.error)},startIcon:Nt(Fn,{}),children:"Update"}),Nt("div",{className:"vm-active-queries-header__update-msg",children:["Last updated: ",a]})]})]}),!!c.length&&Nt("div",{className:Cr()({"vm-block":!0,"vm-block_mobile":e}),children:Nt(Sp,{rows:c,columns:u,defaultOrderBy:"duration",copyToClipboard:"data",paginationOffset:{startIndex:0,endIndex:1/0}})})]})},Ep=e=>{let{onClose:t,onUpload:n}=e;const{isMobile:a}=ea(),[o,i]=(0,r.useState)(""),[l,s]=(0,r.useState)(""),c=(0,r.useMemo)((()=>{try{return JSON.parse(o),""}catch(Pp){return Pp instanceof Error?Pp.message:"Unknown error"}}),[o]),u=()=>{s(c),c||(n(o),t())};return Nt("div",{className:Cr()({"vm-json-form vm-json-form_one-field":!0,"vm-json-form_mobile vm-json-form_one-field_mobile":a}),children:[Nt(Wa,{value:o,label:"JSON",type:"textarea",error:l,autofocus:!0,onChange:e=>{s(""),i(e)},onEnter:u}),Nt("div",{className:"vm-json-form-footer",children:Nt("div",{className:"vm-json-form-footer__controls vm-json-form-footer__controls_right",children:[Nt(ma,{variant:"outlined",color:"error",onClick:t,children:"Cancel"}),Nt(ma,{variant:"contained",onClick:u,children:"apply"})]})})]})},Np=e=>{let{data:t,period:n}=e;const{isMobile:a}=ea(),{tableCompact:o}=Fr(),i=jr(),[l,s]=(0,r.useState)([]),[c,u]=(0,r.useState)(),[d,h]=(0,r.useState)(),[m,p]=(0,r.useState)(!1),[f,v]=(0,r.useState)([]),[g,y]=(0,r.useState)(),_=(0,r.useMemo)((()=>Kh(d||[]).map((e=>e.key))),[d]),b=(0,r.useMemo)((()=>{const e=t.some((e=>"matrix"===e.data.resultType));return t.some((e=>"vector"===e.data.resultType))&&e?Lr:e?Lr.filter((e=>"chart"===e.value)):Lr.filter((e=>"chart"!==e.value))}),[t]),[w,k]=(0,r.useState)(b[0].value),{yaxis:x,spanGaps:S}=Ur(),C=Br(),E=e=>{C({type:"SET_YAXIS_LIMITS",payload:e})};return(0,r.useEffect)((()=>{const e="chart"===w?"matrix":"vector",n=t.filter((t=>t.data.resultType===e&&t.trace)).map((e=>{var t,n;return e.trace?new Nl(e.trace,(null===e||void 0===e||null===(t=e.vmui)||void 0===t||null===(n=t.params)||void 0===n?void 0:n.query)||"Query"):null}));s(n.filter(Boolean))}),[t,w]),(0,r.useEffect)((()=>{const e=[],n=[],r=[];t.forEach(((t,a)=>{const o=t.data.result.map((e=>{var n,r,o;return{...e,group:Number(null!==(n=null===(r=t.vmui)||void 0===r||null===(o=r.params)||void 0===o?void 0:o.id)&&void 0!==n?n:a)+1}}));var i,l;"matrix"===t.data.resultType?(n.push(...o),e.push((null===(i=t.vmui)||void 0===i||null===(l=i.params)||void 0===l?void 0:l.query)||"Query")):r.push(...o)})),v(e),u(n),h(r)}),[t]),(0,r.useEffect)((()=>{p(!!c&&Tl(c))}),[c]),Nt("div",{className:Cr()({"vm-query-analyzer-view":!0,"vm-query-analyzer-view_mobile":a}),children:[!!l.length&&Nt(Vl,{traces:l,onDeleteClick:e=>{s((t=>t.filter((t=>t.idValue!==e.idValue))))}}),Nt("div",{className:Cr()({"vm-block":!0,"vm-block_mobile":a}),children:[Nt("div",{className:"vm-custom-panel-body-header",children:[Nt("div",{className:"vm-custom-panel-body-header__tabs",children:Nt(Tr,{activeItem:w,items:b,onChange:e=>{k(e)}})}),Nt("div",{className:"vm-custom-panel-body-header__graph-controls",children:["chart"===w&&Nt(Sa,{}),"chart"===w&&Nt(qh,{yaxis:x,setYaxisLimits:E,toggleEnableLimits:()=>{C({type:"TOGGLE_ENABLE_YAXIS_LIMITS"})},spanGaps:{value:S,onChange:e=>{C({type:"SET_SPAN_GAPS",payload:e})}}}),"table"===w&&Nt(Xh,{columns:_,selectedColumns:g,onChangeColumns:y,tableCompact:o,toggleTableCompact:()=>{i({type:"TOGGLE_TABLE_COMPACT"})}})]})]}),c&&n&&"chart"===w&&Nt($h,{data:c,period:n,customStep:n.step||"1s",query:f,yaxis:x,setYaxisLimits:E,setPeriod:()=>null,height:a?.5*window.innerHeight:500,isHistogram:m,spanGaps:S}),d&&"code"===w&&Nt(Wh,{data:d}),d&&"table"===w&&Nt(Zh,{data:d,displayColumns:g})]})]})},Ap=e=>{var t,n;let{data:a,period:i}=e;const l=(0,r.useMemo)((()=>a.filter((e=>e.stats&&"matrix"===e.data.resultType))),[a]),s=(0,r.useMemo)((()=>{var e,t;return null===(e=a.find((e=>{var t;return null===e||void 0===e||null===(t=e.vmui)||void 0===t?void 0:t.comment})))||void 0===e||null===(t=e.vmui)||void 0===t?void 0:t.comment}),[a]),c=(0,r.useMemo)((()=>{if(!i)return"";const e=o()(1e3*i.start).tz().format(Pt),t=o()(1e3*i.end).tz().format(Pt);return"".concat(e," - ").concat(t)}),[i]),{value:u,setTrue:d,setFalse:h}=fa(!1);return Nt(Ct.FK,{children:[Nt("div",{className:"vm-query-analyzer-info-header",children:[Nt(ma,{startIcon:Nt(In,{}),variant:"outlined",color:"warning",onClick:d,children:"Show report info"}),i&&Nt(Ct.FK,{children:[Nt("div",{className:"vm-query-analyzer-info-header__period",children:[Nt(or,{})," step: ",i.step]}),Nt("div",{className:"vm-query-analyzer-info-header__period",children:[Nt($n,{})," ",c]})]})]}),u&&Nt(ya,{title:"Report info",onClose:h,children:Nt("div",{className:"vm-query-analyzer-info",children:[s&&Nt("div",{className:"vm-query-analyzer-info-item vm-query-analyzer-info-item_comment",children:[Nt("div",{className:"vm-query-analyzer-info-item__title",children:"Comment:"}),Nt("div",{className:"vm-query-analyzer-info-item__text",children:s})]}),l.map(((e,t)=>{var n;return Nt("div",{className:"vm-query-analyzer-info-item",children:[Nt("div",{className:"vm-query-analyzer-info-item__title",children:l.length>1?"Query ".concat(t+1,":"):"Stats:"}),Nt("div",{className:"vm-query-analyzer-info-item__text",children:[Object.entries(e.stats||{}).map((e=>{let[t,n]=e;return Nt("div",{children:[t,": ",null!==n&&void 0!==n?n:"-"]},t)})),"isPartial: ",String(null!==(n=e.isPartial)&&void 0!==n?n:"-")]})]},t)})),Nt("div",{className:"vm-query-analyzer-info-type",children:null!==(t=l[0])&&void 0!==t&&null!==(n=t.vmui)&&void 0!==n&&n.params?"The report was created using vmui":"The report was created manually"})]})})]})},Mp=()=>{const[e,t]=(0,r.useState)([]),[n,a]=(0,r.useState)(""),o=(0,r.useMemo)((()=>!!e.length),[e]),{value:i,setTrue:l,setFalse:s}=fa(!1),c=(0,r.useMemo)((()=>{var t,n;if(!e)return;const r=null===(t=e[0])||void 0===t||null===(n=t.vmui)||void 0===n?void 0:n.params,a={start:+((null===r||void 0===r?void 0:r.start)||0),end:+((null===r||void 0===r?void 0:r.end)||0),step:null===r||void 0===r?void 0:r.step,date:""};if(!r){const t=e.filter((e=>"matrix"===e.data.resultType)).map((e=>e.data.result)).flat().map((e=>{var t;return e.values?null===(t=e.values)||void 0===t?void 0:t.map((e=>e[0])):[0]})).flat(),n=Array.from(new Set(t.filter(Boolean))).sort(((e,t)=>e-t));a.start=n[0],a.end=n[n.length-1],a.step=Yt((e=>{const t=e.slice(1).map(((t,n)=>t-e[n])),n={};t.forEach((e=>{const t=e.toString();n[t]=(n[t]||0)+1}));let r=0,a=0;for(const o in n)n[o]>a&&(a=n[o],r=Number(o));return r})(n))}return a.date=Jt(tn(a.end)),a}),[e]),u=e=>{try{const n=JSON.parse(e),r=Array.isArray(n)?n:[n];(e=>e.every((e=>{if("object"===typeof e&&null!==e){const t=e.data;if("object"===typeof t&&null!==t){const e=t.result,n=t.resultType;return Array.isArray(e)&&"string"===typeof n}}return!1})))(r)?t(r):a("Invalid structure - JSON does not match the expected format")}catch(Pp){Pp instanceof Error&&a("".concat(Pp.name,": ").concat(Pp.message))}},d=e=>{e.map((e=>{const t=new FileReader;t.onload=e=>{var t;const n=String(null===(t=e.target)||void 0===t?void 0:t.result);u(n)},t.readAsText(e)}))},h=e=>{a("");const t=Array.from(e.target.files||[]);d(t),e.target.value=""},{files:m,dragging:p}=Qm();return(0,r.useEffect)((()=>{d(m)}),[m]),Nt("div",{className:"vm-trace-page",children:[o&&Nt("div",{className:"vm-trace-page-header",children:[Nt("div",{className:"vm-trace-page-header-errors",children:Nt(Ap,{data:e,period:c})}),Nt("div",{children:Nt(Zm,{onOpenModal:l,onChange:h})})]}),n&&Nt("div",{className:"vm-trace-page-header-errors-item vm-trace-page-header-errors-item_margin-bottom",children:[Nt(na,{variant:"error",children:n}),Nt(ma,{className:"vm-trace-page-header-errors-item__close",startIcon:Nt(On,{}),variant:"text",color:"error",onClick:()=>{a("")}})]}),o&&Nt(Np,{data:e,period:c}),!o&&Nt("div",{className:"vm-trace-page-preview",children:[Nt("p",{className:"vm-trace-page-preview__text",children:["Please, upload file with JSON response content.","\n","The file must contain query information in JSON format.","\n","Graph will be displayed after file upload.","\n","Attach files by dragging & dropping, selecting or pasting them."]}),Nt(Zm,{onOpenModal:l,onChange:h})]}),i&&Nt(ya,{title:"Paste JSON",onClose:s,children:Nt(Ep,{onClose:s,onUpload:u})}),p&&Nt("div",{className:"vm-trace-page__dropzone"})]})},Tp=()=>{const[e,t]=(0,r.useState)(!1);return Nt(Ct.FK,{children:Nt(Oe,{children:Nt(aa,{children:Nt(Ct.FK,{children:[Nt(Km,{onLoaded:t}),e&&Nt(xe,{children:Nt(we,{path:"/",element:Nt(Ho,{}),children:[Nt(we,{path:We.home,element:Nt(om,{})}),Nt(we,{path:We.metrics,element:Nt(hp,{})}),Nt(we,{path:We.cardinality,element:Nt(zm,{})}),Nt(we,{path:We.topQueries,element:Nt(Um,{})}),Nt(we,{path:We.trace,element:Nt(Gm,{})}),Nt(we,{path:We.queryAnalyzer,element:Nt(Mp,{})}),Nt(we,{path:We.dashboards,element:Nt(cm,{})}),Nt(we,{path:We.withTemplate,element:Nt(bp,{})}),Nt(we,{path:We.relabel,element:Nt(xp,{})}),Nt(we,{path:We.activeQueries,element:Nt(Cp,{})}),Nt(we,{path:We.icons,element:Nt(mp,{})})]})})]})})})})},Lp=e=>{e&&n.e(685).then(n.bind(n,685)).then((t=>{let{onCLS:n,onINP:r,onFCP:a,onLCP:o,onTTFB:i}=t;n(e),r(e),a(e),o(e),i(e)}))},Op=document.getElementById("root");Op&&(0,r.render)(Nt(Tp,{}),Op),Lp()})()})(); \ No newline at end of file diff --git a/app/vmselect/vmui/static/js/main.0e69b7a9.js.LICENSE.txt b/app/vmselect/vmui/static/js/main.621c4b4d.js.LICENSE.txt similarity index 100% rename from app/vmselect/vmui/static/js/main.0e69b7a9.js.LICENSE.txt rename to app/vmselect/vmui/static/js/main.621c4b4d.js.LICENSE.txt From 58c69386c74a18ae47b5037f68ad3e9b64a996a2 Mon Sep 17 00:00:00 2001 From: Aliaksandr Valialkin Date: Fri, 27 Sep 2024 13:54:17 +0200 Subject: [PATCH 02/31] docs/VictoriaLogs/CHANGELOG.md: cut v0.31.0-victorialogs release --- docs/VictoriaLogs/CHANGELOG.md | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/docs/VictoriaLogs/CHANGELOG.md b/docs/VictoriaLogs/CHANGELOG.md index 6feb45f2a..197bff6f8 100644 --- a/docs/VictoriaLogs/CHANGELOG.md +++ b/docs/VictoriaLogs/CHANGELOG.md @@ -15,6 +15,10 @@ according to [these docs](https://docs.victoriametrics.com/victorialogs/quicksta ## tip +## [v0.31.0](https://github.com/VictoriaMetrics/VictoriaMetrics/releases/tag/v0.31.0-victorialogs) + +Released at 2024-09-27 + * FEATURE: [web UI](https://docs.victoriametrics.com/victorialogs/querying/#web-ui): improved readability of staircase graphs and tooltip usability. See [this comment](https://github.com/VictoriaMetrics/VictoriaMetrics/issues/6545#issuecomment-2336805237). * FEATURE: [web UI](https://docs.victoriametrics.com/victorialogs/querying/#web-ui): simplify query input by adding only the label name when `ctrl`+clicking the line legend. See [this comment](https://github.com/VictoriaMetrics/VictoriaMetrics/issues/6545#issuecomment-2336805237). * FEATURE: [web UI](https://docs.victoriametrics.com/victorialogs/querying/#web-ui): keep selected columns in table view on page reloads. Before, selected columns were reset on each update. See [this issue](https://github.com/VictoriaMetrics/VictoriaMetrics/issues/7016). From 86c0eb816cd052dccc2e0a9e4af34182dc0153ed Mon Sep 17 00:00:00 2001 From: Aliaksandr Valialkin Date: Fri, 27 Sep 2024 13:58:52 +0200 Subject: [PATCH 03/31] deployment: update VictoriaLogs docker image from v0.30.1-victorialogs to v0.31.0-victorialogs See https://github.com/VictoriaMetrics/VictoriaMetrics/releases/tag/v0.31.0-victorialogs --- deployment/docker/docker-compose-victorialogs.yml | 2 +- deployment/docker/victorialogs/compose.yml | 2 +- deployment/logs-benchmark/docker-compose.yml | 2 +- docs/VictoriaLogs/QuickStart.md | 6 +++--- 4 files changed, 6 insertions(+), 6 deletions(-) diff --git a/deployment/docker/docker-compose-victorialogs.yml b/deployment/docker/docker-compose-victorialogs.yml index 739842331..200f4cce7 100644 --- a/deployment/docker/docker-compose-victorialogs.yml +++ b/deployment/docker/docker-compose-victorialogs.yml @@ -40,7 +40,7 @@ services: # storing logs and serving read queries. victorialogs: container_name: victorialogs - image: docker.io/victoriametrics/victoria-logs:v0.30.1-victorialogs + image: docker.io/victoriametrics/victoria-logs:v0.31.0-victorialogs command: - "--storageDataPath=/vlogs" - "--httpListenAddr=:9428" diff --git a/deployment/docker/victorialogs/compose.yml b/deployment/docker/victorialogs/compose.yml index a8e7aef05..b67bb1582 100644 --- a/deployment/docker/victorialogs/compose.yml +++ b/deployment/docker/victorialogs/compose.yml @@ -1,7 +1,7 @@ services: # meta service will be ignored by compose .victorialogs: - image: docker.io/victoriametrics/victoria-logs:v0.30.1-victorialogs + image: docker.io/victoriametrics/victoria-logs:v0.31.0-victorialogs command: - -storageDataPath=/vlogs - -loggerFormat=json diff --git a/deployment/logs-benchmark/docker-compose.yml b/deployment/logs-benchmark/docker-compose.yml index f30dfc64c..6bc616512 100644 --- a/deployment/logs-benchmark/docker-compose.yml +++ b/deployment/logs-benchmark/docker-compose.yml @@ -3,7 +3,7 @@ version: '3' services: # Run `make package-victoria-logs` to build victoria-logs image vlogs: - image: docker.io/victoriametrics/victoria-logs:v0.30.1-victorialogs + image: docker.io/victoriametrics/victoria-logs:v0.31.0-victorialogs volumes: - vlogs:/vlogs ports: diff --git a/docs/VictoriaLogs/QuickStart.md b/docs/VictoriaLogs/QuickStart.md index 169d50925..6fc31ad05 100644 --- a/docs/VictoriaLogs/QuickStart.md +++ b/docs/VictoriaLogs/QuickStart.md @@ -33,8 +33,8 @@ Just download archive for the needed Operating system and architecture, unpack i For example, the following commands download VictoriaLogs archive for Linux/amd64, unpack and run it: ```sh -curl -L -O https://github.com/VictoriaMetrics/VictoriaMetrics/releases/download/v0.30.1-victorialogs/victoria-logs-linux-amd64-v0.30.1-victorialogs.tar.gz -tar xzf victoria-logs-linux-amd64-v0.30.1-victorialogs.tar.gz +curl -L -O https://github.com/VictoriaMetrics/VictoriaMetrics/releases/download/v0.31.0-victorialogs/victoria-logs-linux-amd64-v0.31.0-victorialogs.tar.gz +tar xzf victoria-logs-linux-amd64-v0.31.0-victorialogs.tar.gz ./victoria-logs-prod ``` @@ -58,7 +58,7 @@ Here is the command to run VictoriaLogs in a Docker container: ```sh docker run --rm -it -p 9428:9428 -v ./victoria-logs-data:/victoria-logs-data \ - docker.io/victoriametrics/victoria-logs:v0.30.1-victorialogs + docker.io/victoriametrics/victoria-logs:v0.31.0-victorialogs ``` See also: From 05a64a8c14119baca0603c9327f817aabe5030ee Mon Sep 17 00:00:00 2001 From: Andrii Chubatiuk Date: Fri, 27 Sep 2024 15:38:39 +0300 Subject: [PATCH 04/31] victorialogs: marked fluentd support in roadmap, added syslog example (#7098) ### Describe Your Changes Marked fluentd in victorialogs roadmap Added fluentd syslog example setup ### Checklist The following checks are **mandatory**: - [ ] My change adheres [VictoriaMetrics contributing guidelines](https://docs.victoriametrics.com/contributing/). --- .../docker/victorialogs/filebeat/README.md | 12 +- .../docker/victorialogs/filebeat/compose.yml | 4 +- .../docker/victorialogs/fluentbit/README.md | 11 +- .../fluentbit/jsonline-ha/fluent-bit.conf | 16 ++- .../fluentbit/jsonline/fluent-bit.conf | 14 ++- .../fluentbit/loki/fluent-bit.conf | 12 ++ .../docker/victorialogs/fluentd/Dockerfile | 3 +- .../docker/victorialogs/fluentd/README.md | 11 +- .../victorialogs/fluentd/syslog/compose.yml | 3 + .../victorialogs/fluentd/syslog/fluent.conf | 19 +++ .../docker/victorialogs/logstash/README.md | 16 ++- .../opentelemetry-collector/README.md | 12 +- .../elasticsearch-ha/config.yaml | 9 ++ .../elasticsearch/config.yaml | 9 ++ .../opentelemetry-collector/loki/config.yaml | 9 ++ .../opentelemetry-collector/otlp/config.yaml | 9 ++ .../syslog/config.yaml | 9 ++ .../docker/victorialogs/promtail/README.md | 32 +++++ .../docker/victorialogs/telegraf/README.md | 10 +- .../docker/victorialogs/vector/README.md | 12 +- docs/VictoriaLogs/Roadmap.md | 2 +- docs/VictoriaLogs/data-ingestion/Fluentbit.md | 3 - docs/VictoriaLogs/data-ingestion/Fluentd.md | 109 ++++++++++++++++++ docs/VictoriaLogs/data-ingestion/README.md | 3 + docs/VictoriaLogs/data-ingestion/Telegraf.md | 2 - .../data-ingestion/opentelemetry.md | 2 - 26 files changed, 298 insertions(+), 55 deletions(-) create mode 100644 deployment/docker/victorialogs/fluentd/syslog/compose.yml create mode 100644 deployment/docker/victorialogs/fluentd/syslog/fluent.conf create mode 100644 deployment/docker/victorialogs/promtail/README.md create mode 100644 docs/VictoriaLogs/data-ingestion/Fluentd.md diff --git a/deployment/docker/victorialogs/filebeat/README.md b/deployment/docker/victorialogs/filebeat/README.md index 40bb451c0..62d652e01 100644 --- a/deployment/docker/victorialogs/filebeat/README.md +++ b/deployment/docker/victorialogs/filebeat/README.md @@ -1,10 +1,10 @@ -# Docker compose Filebeat integration with VictoriaLogs using listed below protocols: +# Docker compose Filebeat integration with VictoriaLogs + +The folder contains examples of [Filebeat](https://www.elastic.co/guide/en/beats/filebeat/current/filebeat-overview.html) integration with VictoriaLogs using protocols: * [syslog](./syslog) * [elasticsearch](./elasticsearch) -The folder contains the example of integration of [filebeat](https://www.elastic.co/guide/en/beats/filebeat/current/filebeat-overview.html) with Victorialogs - To spin-up environment `cd` to any of listed above directories run the following command: ``` docker compose up -d @@ -18,9 +18,9 @@ docker compose rm -f The docker compose file contains the following components: -* filebeat - fileabeat is configured to collect logs from the `docker`, you can find configuration in the `filebeat.yml`. It writes data in VictoriaLogs -* VictoriaLogs - the log database, it accepts the data from `filebeat` by elastic protocol -* VictoriaMetrics - collects metrics from `filebeat` via `filebeat-exporter`, `VictoriaLogs` and `VictoriaMetrics` +* filebeat - logs collection agent configured to collect and write data to `victorialogs` +* victorialogs - logs database, receives data from `filebeat` agent +* victoriametrics - metrics database, which collects metrics from `victorialogs` and `filebeat` for observability purposes Querying the data diff --git a/deployment/docker/victorialogs/filebeat/compose.yml b/deployment/docker/victorialogs/filebeat/compose.yml index 308ff363b..0b3b38359 100644 --- a/deployment/docker/victorialogs/filebeat/compose.yml +++ b/deployment/docker/victorialogs/filebeat/compose.yml @@ -1,8 +1,8 @@ include: - ../compose.yml services: - filebeat-victorialogs: - image: docker.elastic.co/beats/filebeat:8.15.0 + filebeat: + image: docker.elastic.co/beats/filebeat:8.15.1 restart: on-failure volumes: - type: bind diff --git a/deployment/docker/victorialogs/fluentbit/README.md b/deployment/docker/victorialogs/fluentbit/README.md index 5a8f51709..c6727c206 100644 --- a/deployment/docker/victorialogs/fluentbit/README.md +++ b/deployment/docker/victorialogs/fluentbit/README.md @@ -1,11 +1,11 @@ -# Docker compose Fluentbit integration with VictoriaLogs using given below protocols: +# Docker compose FluentBit integration with VictoriaLogs + +The folder contains examples of [FluentBit](https://docs.fluentbit.io/manual) integration with VictoriaLogs using protocols: * [loki](./loki) * [jsonline single node](./jsonline) * [jsonline HA setup](./jsonline-ha) -The folder contains the example of integration of [fluentbit](https://docs.fluentbit.io/manual) with Victorialogs - To spin-up environment `cd` to any of listed above directories run the following command: ``` docker compose up -d @@ -19,8 +19,9 @@ docker compose rm -f The docker compose file contains the following components: -* fluentbit - fluentbit is configured to collect logs from the `docker`, you can find configuration in the `fluent-bit.conf`. It writes data in VictoriaLogs -* VictoriaLogs - the log database, it accepts the data from `fluentbit` by json line protocol +* fluentbit - logs collection agent configured to collect and write data to `victorialogs` +* victorialogs - logs database, receives data from `fluentbit` agent +* victoriametrics - metrics database, which collects metrics from `victorialogs` and `fluentbit` for observability purposes Querying the data diff --git a/deployment/docker/victorialogs/fluentbit/jsonline-ha/fluent-bit.conf b/deployment/docker/victorialogs/fluentbit/jsonline-ha/fluent-bit.conf index fb439860c..aaca83619 100644 --- a/deployment/docker/victorialogs/fluentbit/jsonline-ha/fluent-bit.conf +++ b/deployment/docker/victorialogs/fluentbit/jsonline-ha/fluent-bit.conf @@ -13,11 +13,23 @@ Parser syslog-rfc3164 Mode tcp +[INPUT] + name fluentbit_metrics + tag internal_metrics + scrape_interval 2 + [SERVICE] Flush 1 Parsers_File parsers.conf -[Output] +[OUTPUT] + Name prometheus_remote_write + Match internal_metrics + Host victoriametrics + Port 8428 + Uri /api/v1/write + +[OUTPUT] Name http Match * host victorialogs @@ -29,7 +41,7 @@ header AccountID 0 header ProjectID 0 -[Output] +[OUTPUT] Name http Match * host victorialogs-2 diff --git a/deployment/docker/victorialogs/fluentbit/jsonline/fluent-bit.conf b/deployment/docker/victorialogs/fluentbit/jsonline/fluent-bit.conf index 42d349338..bacbc228f 100644 --- a/deployment/docker/victorialogs/fluentbit/jsonline/fluent-bit.conf +++ b/deployment/docker/victorialogs/fluentbit/jsonline/fluent-bit.conf @@ -13,11 +13,23 @@ Parser syslog-rfc3164 Mode tcp +[INPUT] + name fluentbit_metrics + tag internal_metrics + scrape_interval 2 + [SERVICE] Flush 1 Parsers_File parsers.conf -[Output] +[OUTPUT] + Name prometheus_remote_write + Match internal_metrics + Host victoriametrics + Port 8428 + Uri /api/v1/write + +[OUTPUT] Name http Match * host victorialogs diff --git a/deployment/docker/victorialogs/fluentbit/loki/fluent-bit.conf b/deployment/docker/victorialogs/fluentbit/loki/fluent-bit.conf index 6c7906d0d..17bd57ae3 100644 --- a/deployment/docker/victorialogs/fluentbit/loki/fluent-bit.conf +++ b/deployment/docker/victorialogs/fluentbit/loki/fluent-bit.conf @@ -13,10 +13,22 @@ Parser syslog-rfc3164 Mode tcp +[INPUT] + name fluentbit_metrics + tag internal_metrics + scrape_interval 2 + [SERVICE] Flush 1 Parsers_File parsers.conf +[OUTPUT] + Name prometheus_remote_write + Match internal_metrics + Host victoriametrics + Port 8428 + Uri /api/v1/write + [OUTPUT] name loki match * diff --git a/deployment/docker/victorialogs/fluentd/Dockerfile b/deployment/docker/victorialogs/fluentd/Dockerfile index b3bba2e0f..dad82dfbc 100644 --- a/deployment/docker/victorialogs/fluentd/Dockerfile +++ b/deployment/docker/victorialogs/fluentd/Dockerfile @@ -4,5 +4,6 @@ RUN \ gem install \ fluent-plugin-datadog \ fluent-plugin-grafana-loki \ - fluent-plugin-elasticsearch + fluent-plugin-elasticsearch \ + fluent-plugin-remote_syslog USER fluent diff --git a/deployment/docker/victorialogs/fluentd/README.md b/deployment/docker/victorialogs/fluentd/README.md index 0d7e42298..2aa9ea341 100644 --- a/deployment/docker/victorialogs/fluentd/README.md +++ b/deployment/docker/victorialogs/fluentd/README.md @@ -1,10 +1,12 @@ -# Docker compose Fluentd integration with VictoriaLogs using given below protocols: +# Docker compose Fluentd integration with VictoriaLogs + +The folder contains examples of [Fluentd](https://www.fluentd.org/) integration with VictoriaLogs using protocols: * [loki](./loki) * [jsonline](./jsonline) * [elasticsearch](./elasticsearch) -The folder contains the example of integration of [fluentd](https://www.fluentd.org/) with Victorialogs +All required plugins, that should be installed in order to support protocols listed above can be found in a [Dockerfile](./Dockerfile) To spin-up environment `cd` to any of listed above directories run the following command: ``` @@ -19,8 +21,9 @@ docker compose rm -f The docker compose file contains the following components: -* fluentd - fluentd is configured to collect logs from the `docker`, you can find configuration in the `fluent-bit.conf`. It writes data in VictoriaLogs -* VictoriaLogs - the log database, it accepts the data from `fluentd` by json line protocol +* fluentd - logs collection agent configured to collect and write data to `victorialogs` +* victorialogs - logs database, receives data from `fluentd` agent +* victoriametrics - metrics database, which collects metrics from `victorialogs` and `fluentd` for observability purposes Querying the data diff --git a/deployment/docker/victorialogs/fluentd/syslog/compose.yml b/deployment/docker/victorialogs/fluentd/syslog/compose.yml new file mode 100644 index 000000000..e9e4e82da --- /dev/null +++ b/deployment/docker/victorialogs/fluentd/syslog/compose.yml @@ -0,0 +1,3 @@ +include: + - ../compose.yml +name: fluentbit-syslog diff --git a/deployment/docker/victorialogs/fluentd/syslog/fluent.conf b/deployment/docker/victorialogs/fluentd/syslog/fluent.conf new file mode 100644 index 000000000..b996f74d5 --- /dev/null +++ b/deployment/docker/victorialogs/fluentd/syslog/fluent.conf @@ -0,0 +1,19 @@ + + @type tail + format none + tag docker.testlog + path /var/lib/docker/containers/**/*.log + + + + @type remote_syslog + host victorialogs + port 8094 + severity debug + program fluentd + protocol tcp + + @type single_value + message_key message + + diff --git a/deployment/docker/victorialogs/logstash/README.md b/deployment/docker/victorialogs/logstash/README.md index de39545fa..746450867 100644 --- a/deployment/docker/victorialogs/logstash/README.md +++ b/deployment/docker/victorialogs/logstash/README.md @@ -1,16 +1,13 @@ -# Docker compose Logstash integration with VictoriaLogs for given below protocols: +# Docker compose Logstash integration with VictoriaLogs + +The folder contains examples of [Logstash](https://www.elastic.co/logstash) integration with VictoriaLogs using protocols: * [loki](./loki) * [jsonline single node](./jsonline) * [jsonline HA setup](./jsonline-ha) * [elasticsearch](./elasticsearch) -It is required to use [OpenSearch plugin](https://github.com/opensearch-project/logstash-output-opensearch) for output configuration. -Plugin can be installed by using the following command: -``` -bin/logstash-plugin install logstash-output-opensearch -``` -OpenSearch plugin is required because elasticsearch output plugin performs various checks for Elasticsearch version and license which are not applicable for VictoriaLogs. +All required plugins, that should be installed in order to support protocols listed above can be found in a [Dockerfile](./Dockerfile) To spin-up environment `cd` to any of listed above directories run the following command: ``` @@ -25,8 +22,9 @@ docker compose rm -f The docker compose file contains the following components: -* logstash - logstash is configured to accept `syslog` on `5140` port, you can find configuration in the `pipeline.conf`. It writes data in VictoriaLogs -* VictoriaLogs - the log database, it accepts the data from `logstash` by elastic protocol +* logstash - logs collection agent configured to collect and write data to `victorialogs` +* victorialogs - logs database, receives data from `logstash` agent +* victoriametrics - metrics database, which collects metrics from `victorialogs` and `logstash` for observability purposes Querying the data diff --git a/deployment/docker/victorialogs/opentelemetry-collector/README.md b/deployment/docker/victorialogs/opentelemetry-collector/README.md index 6dab25daf..1e10ea199 100644 --- a/deployment/docker/victorialogs/opentelemetry-collector/README.md +++ b/deployment/docker/victorialogs/opentelemetry-collector/README.md @@ -1,4 +1,6 @@ -# Docker compose OpenTelemetry integration with VictoriaLogs using protocols: +# Docker compose OpenTelemetry collector integration with VictoriaLogs + +The folder contains examples of [OpenTelemetry collector](https://opentelemetry.io/docs/collector/) integration with VictoriaLogs using protocols: * [loki](./loki) * [otlp](./otlp) @@ -6,8 +8,6 @@ * [elasticsearch single node](./elasticsearch) * [elasticsearch HA mode](./elasticsearch-ha/) -The folder contains the example of integration of [OpenTelemetry collector](https://opentelemetry.io/docs/collector/) with Victorialogs - To spin-up environment `cd` to any of listed above directories run the following command: ``` docker compose up -d @@ -21,9 +21,9 @@ docker compose rm -f The docker compose file contains the following components: -* collector - vector is configured to collect logs from the `docker`, you can find configuration in the `config.yaml`. It writes data in VictoriaLogs. It pushes metrics to VictoriaMetrics. -* VictoriaLogs - the log database, it accepts the data from `collector` by elastic protocol -* VictoriaMetrics - collects metrics from `VictoriaLogs` and `VictoriaMetrics` +* collector - logs collection agent configured to collect and write data to `victorialogs` +* victorialogs - logs database, receives data from `collector` agent +* victoriametrics - metrics database, which collects metrics from `victorialogs` and `collector` for observability purposes Querying the data diff --git a/deployment/docker/victorialogs/opentelemetry-collector/elasticsearch-ha/config.yaml b/deployment/docker/victorialogs/opentelemetry-collector/elasticsearch-ha/config.yaml index 46b6073a0..850e6f4e4 100644 --- a/deployment/docker/victorialogs/opentelemetry-collector/elasticsearch-ha/config.yaml +++ b/deployment/docker/victorialogs/opentelemetry-collector/elasticsearch-ha/config.yaml @@ -9,6 +9,15 @@ receivers: resource: region: us-east-1 service: + telemetry: + metrics: + readers: + - periodic: + interval: 5000 + exporter: + otlp: + protocol: http/protobuf + endpoint: http://victoriametrics:8428/opentelemetry/api/v1/push pipelines: logs: receivers: [filelog] diff --git a/deployment/docker/victorialogs/opentelemetry-collector/elasticsearch/config.yaml b/deployment/docker/victorialogs/opentelemetry-collector/elasticsearch/config.yaml index 072525175..76f56f9d8 100644 --- a/deployment/docker/victorialogs/opentelemetry-collector/elasticsearch/config.yaml +++ b/deployment/docker/victorialogs/opentelemetry-collector/elasticsearch/config.yaml @@ -8,6 +8,15 @@ receivers: resource: region: us-east-1 service: + telemetry: + metrics: + readers: + - periodic: + interval: 5000 + exporter: + otlp: + protocol: http/protobuf + endpoint: http://victoriametrics:8428/opentelemetry/api/v1/push pipelines: logs: receivers: [filelog] diff --git a/deployment/docker/victorialogs/opentelemetry-collector/loki/config.yaml b/deployment/docker/victorialogs/opentelemetry-collector/loki/config.yaml index 1891bd531..920ab71cb 100644 --- a/deployment/docker/victorialogs/opentelemetry-collector/loki/config.yaml +++ b/deployment/docker/victorialogs/opentelemetry-collector/loki/config.yaml @@ -7,6 +7,15 @@ receivers: resource: region: us-east-1 service: + telemetry: + metrics: + readers: + - periodic: + interval: 5000 + exporter: + otlp: + protocol: http/protobuf + endpoint: http://victoriametrics:8428/opentelemetry/api/v1/push pipelines: logs: receivers: [filelog] diff --git a/deployment/docker/victorialogs/opentelemetry-collector/otlp/config.yaml b/deployment/docker/victorialogs/opentelemetry-collector/otlp/config.yaml index b06ac851d..059e5d686 100644 --- a/deployment/docker/victorialogs/opentelemetry-collector/otlp/config.yaml +++ b/deployment/docker/victorialogs/opentelemetry-collector/otlp/config.yaml @@ -9,6 +9,15 @@ receivers: resource: region: us-east-1 service: + telemetry: + metrics: + readers: + - periodic: + interval: 5000 + exporter: + otlp: + protocol: http/protobuf + endpoint: http://victoriametrics:8428/opentelemetry/api/v1/push pipelines: logs: receivers: [filelog] diff --git a/deployment/docker/victorialogs/opentelemetry-collector/syslog/config.yaml b/deployment/docker/victorialogs/opentelemetry-collector/syslog/config.yaml index d556ee111..ba4711e72 100644 --- a/deployment/docker/victorialogs/opentelemetry-collector/syslog/config.yaml +++ b/deployment/docker/victorialogs/opentelemetry-collector/syslog/config.yaml @@ -17,6 +17,15 @@ receivers: filelog: include: [/tmp/logs/*.log] service: + telemetry: + metrics: + readers: + - periodic: + interval: 5000 + exporter: + otlp: + protocol: http/protobuf + endpoint: http://victoriametrics:8428/opentelemetry/api/v1/push pipelines: logs: receivers: [filelog] diff --git a/deployment/docker/victorialogs/promtail/README.md b/deployment/docker/victorialogs/promtail/README.md new file mode 100644 index 000000000..f48751fb8 --- /dev/null +++ b/deployment/docker/victorialogs/promtail/README.md @@ -0,0 +1,32 @@ +# Docker compose Promtail integration with VictoriaLogs + +The folder contains the example of integration of [Promtail agent](https://grafana.com/docs/loki/latest/send-data/promtail/) with VictoriaLogs using protocols: + +* [loki](./loki) + +To spin-up environment `cd` to any of listed above directories run the following command: +``` +docker compose up -d +``` + +To shut down the docker-compose environment run the following command: +``` +docker compose down +docker compose rm -f +``` + +The docker compose file contains the following components: + +* promtail - logs collection agent configured to collect and write data to `victorialogs` +* victorialogs - logs database, receives data from `promtail` agent +* victoriametrics - metrics database, which collects metrics from `victorialogs` and `promtail` for observability purposes + +Querying the data + +* [vmui](https://docs.victoriametrics.com/victorialogs/querying/#vmui) - a web UI is accessible by `http://localhost:9428/select/vmui` +* for querying the data via command-line please check [these docs](https://docs.victoriametrics.com/victorialogs/querying/#command-line) + +Promtail agent configuration example can be found below: +* [loki](./loki/config.yml) + +Please, note that `_stream_fields` parameter must follow recommended [best practices](https://docs.victoriametrics.com/victorialogs/keyconcepts/#stream-fields) to achieve better performance. diff --git a/deployment/docker/victorialogs/telegraf/README.md b/deployment/docker/victorialogs/telegraf/README.md index 6c08ef8a3..69099ef96 100644 --- a/deployment/docker/victorialogs/telegraf/README.md +++ b/deployment/docker/victorialogs/telegraf/README.md @@ -1,6 +1,6 @@ -# Docker compose Telegraf integration with VictoriaLogs for docker +# Docker compose Telegraf integration with VictoriaLogs -The folder contains the examples of integration of [telegraf](https://www.influxdata.com/time-series-platform/telegraf/) with VictoriaLogs using: +The folder contains examples of [Telegraf](https://www.influxdata.com/time-series-platform/telegraf/) integration with VictoriaLogs using protocols: * [elasticsearch](./elasticsearch) * [loki](./loki) @@ -20,9 +20,9 @@ docker compose rm -f The docker compose file contains the following components: -* telegraf - telegraf is configured to collect logs from the `docker`, you can find configuration in the `telegraf.conf`. It writes data in VictoriaLogs. It pushes metrics to VictoriaMetrics. -* VictoriaLogs - the log database, it accepts the data from `telegraf` by elastic protocol -* VictoriaMetrics - collects metrics from `VictoriaLogs` and `VictoriaMetrics` +* telegraf - logs collection agent configured to collect and write data to `victorialogs` +* victorialogs - logs database, receives data from `telegraf` agent +* victoriametrics - metrics database, which collects metrics from `victorialogs` and `telegraf` for observability purposes Querying the data diff --git a/deployment/docker/victorialogs/vector/README.md b/deployment/docker/victorialogs/vector/README.md index 502298222..5169dc328 100644 --- a/deployment/docker/victorialogs/vector/README.md +++ b/deployment/docker/victorialogs/vector/README.md @@ -1,12 +1,12 @@ -# Docker compose Vector integration with VictoriaLogs using given below protocols: +# Docker compose Vector integration with VictoriaLogs + +The folder contains examples of [Vector](https://vector.dev/docs/) integration with VictoriaLogs using protocols: * [elasticsearch](./elasticsearch) * [loki](./loki) * [jsonline single node](./jsonline) * [jsonline HA setup](./jsonline-ha) -The folder contains the example of integration of [vector](https://vector.dev/docs/) with Victorialogs - To spin-up environment `cd` to any of listed above directories run the following command: ``` docker compose up -d @@ -20,9 +20,9 @@ docker compose rm -f The docker compose file contains the following components: -* vector - vector is configured to collect logs from the `docker`, you can find configuration in the `vector.yaml`. It writes data in VictoriaLogs. It pushes metrics to VictoriaMetrics. -* VictoriaLogs - the log database, it accepts the data from `vector` by DataDog protocol -* VictoriaMetrics - collects metrics from `VictoriaLogs` and `VictoriaMetrics` +* vector - logs collection agent configured to collect and write data to `victorialogs` +* victorialogs - logs database, receives data from `vector` agent +* victoriametrics - metrics database, which collects metrics from `victorialogs` and `vector` for observability purposes Querying the data diff --git a/docs/VictoriaLogs/Roadmap.md b/docs/VictoriaLogs/Roadmap.md index 4848d1aaa..3dbabcb95 100644 --- a/docs/VictoriaLogs/Roadmap.md +++ b/docs/VictoriaLogs/Roadmap.md @@ -22,7 +22,7 @@ The following functionality is planned in the future versions of VictoriaLogs: - Support for [data ingestion](https://docs.victoriametrics.com/victorialogs/data-ingestion/) from popular log collectors and formats: - [x] [OpenTelemetry for logs](https://docs.victoriametrics.com/victorialogs/data-ingestion/opentelemetry/) - - [ ] Fluentd + - [x] [Fluentd](https://docs.victoriametrics.com/victorialogs/data-ingestion/fluentd/) - [ ] [Journald](https://github.com/VictoriaMetrics/VictoriaMetrics/issues/4618) (systemd) - [ ] [Datadog protocol for logs](https://github.com/VictoriaMetrics/VictoriaMetrics/issues/6632) - [x] [Telegraf](https://docs.victoriametrics.com/victorialogs/data-ingestion/telegraf/) diff --git a/docs/VictoriaLogs/data-ingestion/Fluentbit.md b/docs/VictoriaLogs/data-ingestion/Fluentbit.md index 645734e18..d69b5c672 100644 --- a/docs/VictoriaLogs/data-ingestion/Fluentbit.md +++ b/docs/VictoriaLogs/data-ingestion/Fluentbit.md @@ -11,9 +11,6 @@ aliases: - /victorialogs/data-ingestion/fluentbit.html - /victorialogs/data-ingestion/Fluentbit.html --- - -# Fluentbit setup - VictoriaLogs supports given below Fluentbit outputs: - [Loki](#loki) - [HTTP JSON](#http) diff --git a/docs/VictoriaLogs/data-ingestion/Fluentd.md b/docs/VictoriaLogs/data-ingestion/Fluentd.md new file mode 100644 index 000000000..fcfc7b18f --- /dev/null +++ b/docs/VictoriaLogs/data-ingestion/Fluentd.md @@ -0,0 +1,109 @@ +--- +weight: 2 +title: Fluentd setup +disableToc: true +menu: + docs: + parent: "victorialogs-data-ingestion" + weight: 2 +aliases: + - /VictoriaLogs/data-ingestion/Fluentd.html + - /victorialogs/data-ingestion/fluentd.html + - /victorialogs/data-ingestion/Fluentd.html +--- +VictoriaLogs supports given below Fluentd outputs: +- [Loki](#loki) +- [HTTP JSON](#http) + +## Loki + +Specify [loki output](https://docs.fluentd.io/manual/pipeline/outputs/loki) section in the `fluentd.conf` +for sending the collected logs to [VictoriaLogs](https://docs.victoriametrics.com/victorialogs/): + +```conf + + @type loki + url "http://localhost:9428/insert" + + flush_interval 10s + flush_at_shutdown true + + custom_headers {"VL-Msg-Field": "log", "VL-Time-Field": "time", "VL-Stream-Fields": "path"} + buffer_chunk_limit 1m + +``` + +## HTTP + +Specify [http output](https://docs.fluentd.io/manual/pipeline/outputs/http) section in the `fluentd.conf` +for sending the collected logs to [VictoriaLogs](https://docs.victoriametrics.com/victorialogs/): + +```fluentd + + @type http + endpoint "http://localhost:9428/insert/jsonline" + headers {"VL-Msg-Field": "log", "VL-Time-Field": "time", "VL-Stream-Fields": "path"} + +``` + +Substitute the host (`localhost`) and port (`9428`) with the real TCP address of VictoriaLogs. + +See [these docs](https://docs.victoriametrics.com/victorialogs/data-ingestion/#http-parameters) for details on the query args specified in the `endpoint`. + +It is recommended verifying whether the initial setup generates the needed [log fields](https://docs.victoriametrics.com/victorialogs/keyconcepts/#data-model) +and uses the correct [stream fields](https://docs.victoriametrics.com/victorialogs/keyconcepts/#stream-fields). +This can be done by specifying `debug` [parameter](https://docs.victoriametrics.com/victorialogs/data-ingestion/#http-parameters) in the `endpoint` +and inspecting VictoriaLogs logs then: + +```fluentd + + @type http + endpoint "http://localhost:9428/insert/jsonline&debug=1" + headers {"VL-Msg-Field": "log", "VL-Time-Field": "time", "VL-Stream-Fields": "path"} + +``` + +If some [log fields](https://docs.victoriametrics.com/victorialogs/keyconcepts/#data-model) must be skipped +during data ingestion, then they can be put into `ignore_fields` [parameter](https://docs.victoriametrics.com/victorialogs/data-ingestion/#http-parameters). +For example, the following config instructs VictoriaLogs to ignore `log.offset` and `event.original` fields in the ingested logs: + +```fluentd + + @type http + endpoint "http://localhost:9428/insert/jsonline&ignore_fields=log.offset,event.original" + headers {"VL-Msg-Field": "log", "VL-Time-Field": "time", "VL-Stream-Fields": "path"} + +``` + +If the Fluentd sends logs to VictoriaLogs in another datacenter, then it may be useful enabling data compression via `compress gzip` option. +This usually allows saving network bandwidth and costs by up to 5 times: + +```fluentd + + @type http + endpoint "http://localhost:9428/insert/jsonline&ignore_fields=log.offset,event.original" + headers {"VL-Msg-Field": "log", "VL-Time-Field": "time", "VL-Stream-Fields": "path"} + compress gzip + +``` + +By default, the ingested logs are stored in the `(AccountID=0, ProjectID=0)` [tenant](https://docs.victoriametrics.com/victorialogs/keyconcepts/#multitenancy). +If you need storing logs in other tenant, then specify the needed tenant via `header` options. +For example, the following `fluentd.conf` config instructs Fluentd to store the data to `(AccountID=12, ProjectID=34)` tenant: + +```fluentd + + @type http + endpoint "http://localhost:9428/insert/jsonline" + headers {"VL-Msg-Field": "log", "VL-Time-Field": "time", "VL-Stream-Fields": "path"} + header AccountID 12 + header ProjectID 23 + +``` + +See also: + +- [Data ingestion troubleshooting](https://docs.victoriametrics.com/victorialogs/data-ingestion/#troubleshooting). +- [How to query VictoriaLogs](https://docs.victoriametrics.com/victorialogs/querying/). +- [Fluentd HTTP output config docs](https://docs.fluentd.org/output/http) +- [Docker-compose demo for Fluentd integration with VictoriaLogs](https://github.com/VictoriaMetrics/VictoriaMetrics/tree/master/deployment/docker/victorialogs/fluentd). diff --git a/docs/VictoriaLogs/data-ingestion/README.md b/docs/VictoriaLogs/data-ingestion/README.md index 523e05697..a548a195a 100644 --- a/docs/VictoriaLogs/data-ingestion/README.md +++ b/docs/VictoriaLogs/data-ingestion/README.md @@ -3,6 +3,7 @@ - Syslog, Rsyslog and Syslog-ng - see [these docs](https://docs.victoriametrics.com/victorialogs/data-ingestion/syslog/). - Filebeat - see [these docs](https://docs.victoriametrics.com/victorialogs/data-ingestion/filebeat/). - Fluentbit - see [these docs](https://docs.victoriametrics.com/victorialogs/data-ingestion/fluentbit/). +- Fluentd - see [these docs](https://docs.victoriametrics.com/victorialogs/data-ingestion/fluentd/). - Logstash - see [these docs](https://docs.victoriametrics.com/victorialogs/data-ingestion/logstash/). - Vector - see [these docs](https://docs.victoriametrics.com/victorialogs/data-ingestion/vector/). - Promtail (aka Grafana Loki) - see [these docs](https://docs.victoriametrics.com/victorialogs/data-ingestion/promtail/). @@ -286,3 +287,5 @@ Here is the list of log collectors and their ingestion formats supported by Vict | [Promtail](https://docs.victoriametrics.com/victorialogs/data-ingestion/promtail/) | No | No | [Yes](https://grafana.com/docs/loki/latest/clients/promtail/configuration/#clients) | No | No | | [OpenTelemetry Collector](https://opentelemetry.io/docs/collector/) | [Yes](https://github.com/open-telemetry/opentelemetry-collector-contrib/tree/main/exporter/elasticsearchexporter) | No | [Yes](https://github.com/open-telemetry/opentelemetry-collector-contrib/tree/main/exporter/lokiexporter) | [Yes](https://github.com/open-telemetry/opentelemetry-collector-contrib/blob/main/exporter/syslogexporter) | [Yes](https://github.com/open-telemetry/opentelemetry-collector/tree/main/exporter/otlphttpexporter) | | [Telegraf](https://docs.victoriametrics.com/victorialogs/data-ingestion/telegraf/) | [Yes](https://github.com/influxdata/telegraf/tree/master/plugins/outputs/elasticsearch) | [Yes](https://github.com/influxdata/telegraf/tree/master/plugins/outputs/http) | [Yes](https://github.com/influxdata/telegraf/tree/master/plugins/outputs/loki) | [Yes](https://github.com/influxdata/telegraf/blob/master/plugins/outputs/syslog) | Yes | +| [Fluentd](https://docs.victoriametrics.com/victorialogs/data-ingestion/fluentd/) | [Yes](https://github.com/uken/fluent-plugin-elasticsearch) | [Yes](https://docs.fluentd.org/output/http) | [Yes](https://grafana.com/docs/loki/latest/send-data/fluentd/) | [Yes](https://github.com/fluent-plugins-nursery/fluent-plugin-remote_syslog) | No | + diff --git a/docs/VictoriaLogs/data-ingestion/Telegraf.md b/docs/VictoriaLogs/data-ingestion/Telegraf.md index a31b86d95..3cd1c737c 100644 --- a/docs/VictoriaLogs/data-ingestion/Telegraf.md +++ b/docs/VictoriaLogs/data-ingestion/Telegraf.md @@ -9,8 +9,6 @@ menu: aliases: - /VictoriaLogs/data-ingestion/Telegraf.html --- -# Telegraf setup - VictoriaLogs supports given below Telegraf outputs: - [Elasticsearch](#elasticsearch) - [Loki](#loki) diff --git a/docs/VictoriaLogs/data-ingestion/opentelemetry.md b/docs/VictoriaLogs/data-ingestion/opentelemetry.md index db342d9a5..16df5742a 100644 --- a/docs/VictoriaLogs/data-ingestion/opentelemetry.md +++ b/docs/VictoriaLogs/data-ingestion/opentelemetry.md @@ -9,8 +9,6 @@ menu: aliases: - /VictoriaLogs/data-ingestion/OpenTelemetry.html --- - - VictoriaLogs supports both client open-telemetry [SDK](https://opentelemetry.io/docs/languages/) and [collector](https://opentelemetry.io/docs/collector/). ## Client SDK From 59bc63ebc4e63216681b5c92e6d9292f9d8838f1 Mon Sep 17 00:00:00 2001 From: Roman Khavronenko Date: Fri, 27 Sep 2024 14:41:33 +0200 Subject: [PATCH 05/31] app/vmalert: mention labels conflict resolution strategy (#7085) The change should help users to understand what happens on labels conflict. ### Describe Your Changes Please provide a brief description of the changes you made. Be as specific as possible to help others understand the purpose and impact of your modifications. ### Checklist The following checks are **mandatory**: - [ ] My change adheres [VictoriaMetrics contributing guidelines](https://docs.victoriametrics.com/contributing/). Signed-off-by: hagen1778 --- app/vmalert/main.go | 2 +- docs/vmalert.md | 4 +++- 2 files changed, 4 insertions(+), 2 deletions(-) diff --git a/app/vmalert/main.go b/app/vmalert/main.go index d6f164215..1e9e6f2ea 100644 --- a/app/vmalert/main.go +++ b/app/vmalert/main.go @@ -76,7 +76,7 @@ absolute path to all .tpl files in root. `Link to VMUI: -external.alert.source='vmui/#/?g0.expr={{.Expr|queryEscape}}'. `+ `If empty 'vmalert/alert?group_id={{.GroupID}}&alert_id={{.AlertID}}' is used.`) externalLabels = flagutil.NewArrayString("external.label", "Optional label in the form 'Name=value' to add to all generated recording rules and alerts. "+ - "Pass multiple -label flags in order to add multiple label sets.") + "In case of conflicts, original labels are kept with prefix `exported_`.") remoteReadIgnoreRestoreErrors = flag.Bool("remoteRead.ignoreRestoreErrors", true, "Whether to ignore errors from remote storage when restoring alerts state on startup. DEPRECATED - this flag has no effect and will be removed in the next releases.") diff --git a/docs/vmalert.md b/docs/vmalert.md index 5ec250eec..2f289d31f 100644 --- a/docs/vmalert.md +++ b/docs/vmalert.md @@ -273,6 +273,7 @@ expr: [ update_entries_limit: | default 0 ] # Labels to add or overwrite for each alert. +# In case of conflicts, original labels are kept with prefix `exported_`. labels: [ : ] @@ -394,6 +395,7 @@ record: expr: # Labels to add or overwrite before storing the result. +# In case of conflicts, original labels are kept with prefix `exported_`. labels: [ : ] @@ -1109,7 +1111,7 @@ The shortlist of configuration flags is the following: -external.alert.source string External Alert Source allows to override the Source link for alerts sent to AlertManager for cases where you want to build a custom link to Grafana, Prometheus or any other service. Supports templating - see https://docs.victoriametrics.com/vmalert/#templating . For example, link to Grafana: -external.alert.source='explore?orgId=1&left={"datasource":"VictoriaMetrics","queries":[{"expr":{{.Expr|jsonEscape|queryEscape}},"refId":"A"}],"range":{"from":"now-1h","to":"now"}}'. Link to VMUI: -external.alert.source='vmui/#/?g0.expr={{.Expr|queryEscape}}'. If empty 'vmalert/alert?group_id={{.GroupID}}&alert_id={{.AlertID}}' is used. -external.label array - Optional label in the form 'Name=value' to add to all generated recording rules and alerts. Pass multiple -label flags in order to add multiple label sets. + Optional label in the form 'Name=value' to add to all generated recording rules and alerts. In case of conflicts, original labels are kept with prefix `exported_`. Supports an array of values separated by comma or specified via multiple flags. Value can contain comma inside single-quoted or double-quoted string, {}, [] and () braces. -external.url string From 00912bfa0f53be98916a1739983a355d689ce845 Mon Sep 17 00:00:00 2001 From: Andrii Chubatiuk Date: Fri, 27 Sep 2024 16:09:36 +0300 Subject: [PATCH 06/31] docs/victorialogs: change fluentd input type in examples (#7123) ### Describe Your Changes Use fluentd logging driver in examples to have enriched data in VictoriaLogs ### Checklist The following checks are **mandatory**: - [ ] My change adheres [VictoriaMetrics contributing guidelines](https://docs.victoriametrics.com/contributing/). --- .../docker/victorialogs/fluentd/Dockerfile | 4 +++- .../docker/victorialogs/fluentd/compose.yml | 19 +++++++++++++++++++ .../fluentd/elasticsearch/fluent.conf | 8 ++++---- .../victorialogs/fluentd/jsonline/fluent.conf | 9 ++++----- .../victorialogs/fluentd/loki/fluent.conf | 19 ++++++++++++++----- 5 files changed, 44 insertions(+), 15 deletions(-) diff --git a/deployment/docker/victorialogs/fluentd/Dockerfile b/deployment/docker/victorialogs/fluentd/Dockerfile index dad82dfbc..340c15249 100644 --- a/deployment/docker/victorialogs/fluentd/Dockerfile +++ b/deployment/docker/victorialogs/fluentd/Dockerfile @@ -1,6 +1,8 @@ -FROM fluent/fluentd:v1.17 +FROM fluent/fluentd:v1.17-debian-1 USER root RUN \ + apt update && \ + apt install -y netcat-traditional && \ gem install \ fluent-plugin-datadog \ fluent-plugin-grafana-loki \ diff --git a/deployment/docker/victorialogs/fluentd/compose.yml b/deployment/docker/victorialogs/fluentd/compose.yml index 6a3e33d35..e189f506e 100644 --- a/deployment/docker/victorialogs/fluentd/compose.yml +++ b/deployment/docker/victorialogs/fluentd/compose.yml @@ -9,3 +9,22 @@ services: depends_on: [victorialogs] ports: - "5140:5140" + - "24224:24224" + healthcheck: + test: ["CMD", "nc", "-z", "-n", "-v", "127.0.0.1", "24224"] + start_period: 3s + nginx: + image: nginx:1.27 + healthcheck: + test: ["CMD", "curl", "-f", "http://localhost"] + start_period: 3s + ports: + - "8080:80" + logging: + driver: fluentd + options: + fluentd-address: 127.0.0.1:24224 + labels: com.docker.compose.service + depends_on: + fluentd: + condition: service_healthy diff --git a/deployment/docker/victorialogs/fluentd/elasticsearch/fluent.conf b/deployment/docker/victorialogs/fluentd/elasticsearch/fluent.conf index 145c4d32d..33555c47b 100644 --- a/deployment/docker/victorialogs/fluentd/elasticsearch/fluent.conf +++ b/deployment/docker/victorialogs/fluentd/elasticsearch/fluent.conf @@ -1,13 +1,13 @@ - @type tail - format none - tag docker.testlog - path /var/lib/docker/containers/**/*.log + @type forward + port 24224 + bind 0.0.0.0 @type elasticsearch host victorialogs path /insert/elasticsearch + custom_headers {"VL-Msg-Field": "log", "VL-Stream-Fields": "com.docker.compose.service"} port 9428 diff --git a/deployment/docker/victorialogs/fluentd/jsonline/fluent.conf b/deployment/docker/victorialogs/fluentd/jsonline/fluent.conf index cac841e00..c6f5fcfc0 100644 --- a/deployment/docker/victorialogs/fluentd/jsonline/fluent.conf +++ b/deployment/docker/victorialogs/fluentd/jsonline/fluent.conf @@ -1,12 +1,11 @@ - @type tail - format none - tag docker.testlog - path /var/lib/docker/containers/**/*.log + @type forward + port 24224 + bind 0.0.0.0 @type http endpoint "http://victorialogs:9428/insert/jsonline" - headers {"VL-Msg-Field": "log", "VL-Time-Field": "time", "VL-Stream-Fields": "path"} + headers {"VL-Msg-Field": "log", "VL-Stream-Fields": "com.docker.compose.service"} diff --git a/deployment/docker/victorialogs/fluentd/loki/fluent.conf b/deployment/docker/victorialogs/fluentd/loki/fluent.conf index 460437673..381b962f5 100644 --- a/deployment/docker/victorialogs/fluentd/loki/fluent.conf +++ b/deployment/docker/victorialogs/fluentd/loki/fluent.conf @@ -1,10 +1,17 @@ - @type tail - format none - tag docker.testlog - path /var/lib/docker/containers/**/*.log + @type forward + port 24224 + bind 0.0.0.0 + + @type record_transformer + enable_ruby true + + service ${record['com.docker.compose.service']} + + + @type loki url "http://victorialogs:9428/insert" @@ -12,6 +19,8 @@ flush_interval 10s flush_at_shutdown true - custom_headers {"VL-Msg-Field": "log", "VL-Time-Field": "time", "VL-Stream-Fields": "path"} + buffer_chunk_limit 1m From e62b88b2e0119fbb9b9371a738673b34711fe295 Mon Sep 17 00:00:00 2001 From: Github Actions <133988544+victoriametrics-bot@users.noreply.github.com> Date: Fri, 27 Sep 2024 20:03:14 +0300 Subject: [PATCH 07/31] Automatic update operator docs from VictoriaMetrics/operator@d39fc94 (#7129) Automated changes by [create-pull-request](https://github.com/peter-evans/create-pull-request) GitHub action Signed-off-by: Github Actions <133988544+victoriametrics-bot@users.noreply.github.com> Co-authored-by: f41gh7 <18450869+f41gh7@users.noreply.github.com> --- docs/operator/CHANGELOG.md | 6 ++++++ docs/operator/vars.md | 8 ++++---- 2 files changed, 10 insertions(+), 4 deletions(-) diff --git a/docs/operator/CHANGELOG.md b/docs/operator/CHANGELOG.md index 1e76ac216..88a4fa1fe 100644 --- a/docs/operator/CHANGELOG.md +++ b/docs/operator/CHANGELOG.md @@ -11,6 +11,12 @@ aliases: - /operator/changelog/index.html --- +## [v0.48.2](https://github.com/VictoriaMetrics/operator/releases/tag/v0.48.2) - 27 Sep 2024 + +- [operator](https://docs.victoriametrics.com/operator/): properly expose `vm_app_version` metric tag with `version` and `short_version` build info. It was broken since v0.46.0 release. +- [operator](https://docs.victoriametrics.com/operator/): changes default value for `controller.maxConcurrentReconciles` from `1` to `5`. It should improve reconcile performance for the most installations. +- [operator](https://docs.victoriametrics.com/operator/): expose new runtime metrics `rest_client_request_duration_seconds`, `sched_latencies_seconds`. It allows to better debug operator reconcile latencies. + ## [v0.48.1](https://github.com/VictoriaMetrics/operator/releases/tag/v0.48.1) - 26 Sep 2024 - [vmalertmanager](https://docs.victoriametrics.com/operator/resources/vmalertmanager): properly build service, previously port by number instead of name was used. It produced `updating service` log messages. diff --git a/docs/operator/vars.md b/docs/operator/vars.md index 4e379301e..9cf6278c2 100644 --- a/docs/operator/vars.md +++ b/docs/operator/vars.md @@ -10,17 +10,17 @@ aliases: - /operator/vars/index.html --- - updated at Wed Sep 18 22:37:27 UTC 2024 + updated at Fri Sep 27 13:40:34 UTC 2024 | variable name | variable default value | variable required | variable description | | --- | --- | --- | --- | | VM_USECUSTOMCONFIGRELOADER | false | false | enables custom config reloader for vmauth and vmagent, it should speed-up config reloading process. | | VM_CONTAINERREGISTRY | - | false | container registry name prefix, e.g. docker.io | -| VM_CUSTOMCONFIGRELOADERIMAGE | victoriametrics/operator:config-reloader-v0.47.2 | false | - | +| VM_CUSTOMCONFIGRELOADERIMAGE | victoriametrics/operator:config-reloader-v0.48.2 | false | - | | VM_PSPAUTOCREATEENABLED | false | false | - | | VM_VLOGSDEFAULT_IMAGE | victoriametrics/victoria-logs | false | - | -| VM_VLOGSDEFAULT_VERSION | v0.28.0-victorialogs | false | - | +| VM_VLOGSDEFAULT_VERSION | v0.31.0-victorialogs | false | - | | VM_VLOGSDEFAULT_CONFIGRELOADIMAGE | - | false | ignored | | VM_VLOGSDEFAULT_PORT | 9428 | false | - | | VM_VLOGSDEFAULT_USEDEFAULTRESOURCES | true | false | - | @@ -136,4 +136,4 @@ aliases: | VM_PODWAITREADYINTERVALCHECK | 5s | false | Defines poll interval for pods ready check at statefulset rollout update | | VM_FORCERESYNCINTERVAL | 60s | false | configures force resync interval for VMAgent, VMAlert, VMAlertmanager and VMAuth. | | VM_ENABLESTRICTSECURITY | false | false | EnableStrictSecurity will add default `securityContext` to pods and containers created by operator Default PodSecurityContext include: 1. RunAsNonRoot: true 2. RunAsUser/RunAsGroup/FSGroup: 65534 '65534' refers to 'nobody' in all the used default images like alpine, busybox. If you're using customize image, please make sure '65534' is a valid uid in there or specify SecurityContext. 3. FSGroupChangePolicy: &onRootMismatch If KubeVersion>=1.20, use `FSGroupChangePolicy="onRootMismatch"` to skip the recursive permission change when the root of the volume already has the correct permissions 4. SeccompProfile: type: RuntimeDefault Use `RuntimeDefault` seccomp profile by default, which is defined by the container runtime, instead of using the Unconfined (seccomp disabled) mode. Default container SecurityContext include: 1. AllowPrivilegeEscalation: false 2. ReadOnlyRootFilesystem: true 3. Capabilities: drop: - all turn off `EnableStrictSecurity` by default, see https://github.com/VictoriaMetrics/operator/issues/749 for details | -[envconfig-sum]: 73a7775dae545fdb60f3dd0ca0e84d31 \ No newline at end of file +[envconfig-sum]: 97c30e81298d2e6bde28647c913b9b88 \ No newline at end of file From fd890a2771d1e8c9dff0ac9b87a2769036b96407 Mon Sep 17 00:00:00 2001 From: Roman Khavronenko Date: Fri, 27 Sep 2024 19:08:05 +0200 Subject: [PATCH 08/31] deployment: separate datasource between single and cluster versions (#7119) Before, single and cluster deployments were provisioned with both Grafana datasources: single and cluster. But this resulted into a problem: single DS didn't work for cluster and vice versa. See https://github.com/VictoriaMetrics/VictoriaMetrics/pull/7113 This PR splits datasource file into 2 files: single and cluster. Now, these files are separately provisioned to single and cluster deployments correspondingly. Signed-off-by: hagen1778 --- deployment/docker/docker-compose-cluster.yml | 2 +- deployment/docker/docker-compose.yml | 2 +- ...{prometheus-datasource.yml => cluster.yml} | 11 +---- .../prometheus-datasource/single.yml | 11 +++++ .../victoriametrics-datasource/cluster.yml | 13 ++++++ .../victoriametrics-datasource/single.yml | 13 ++++++ .../victoriametrics-datasource.yml | 46 ------------------- .../vm-datasource/docker-compose-cluster.yml | 2 +- .../docker/vm-datasource/docker-compose.yml | 2 +- 9 files changed, 42 insertions(+), 60 deletions(-) rename deployment/docker/provisioning/datasources/prometheus-datasource/{prometheus-datasource.yml => cluster.yml} (54%) create mode 100644 deployment/docker/provisioning/datasources/prometheus-datasource/single.yml create mode 100644 deployment/docker/provisioning/datasources/victoriametrics-datasource/cluster.yml create mode 100644 deployment/docker/provisioning/datasources/victoriametrics-datasource/single.yml delete mode 100644 deployment/docker/provisioning/datasources/victoriametrics-datasource/victoriametrics-datasource.yml diff --git a/deployment/docker/docker-compose-cluster.yml b/deployment/docker/docker-compose-cluster.yml index 06e76d88d..a00bbc0ff 100644 --- a/deployment/docker/docker-compose-cluster.yml +++ b/deployment/docker/docker-compose-cluster.yml @@ -28,7 +28,7 @@ services: restart: always volumes: - grafanadata:/var/lib/grafana - - ./provisioning/datasources/prometheus-datasource:/etc/grafana/provisioning/datasources + - ./provisioning/datasources/prometheus-datasource/cluster.yml:/etc/grafana/provisioning/datasources/cluster.yml - ./provisioning/dashboards:/etc/grafana/provisioning/dashboards - ./../../dashboards/victoriametrics-cluster.json:/var/lib/grafana/dashboards/vm.json - ./../../dashboards/vmagent.json:/var/lib/grafana/dashboards/vmagent.json diff --git a/deployment/docker/docker-compose.yml b/deployment/docker/docker-compose.yml index 896d64537..b6fbdb3d9 100644 --- a/deployment/docker/docker-compose.yml +++ b/deployment/docker/docker-compose.yml @@ -53,7 +53,7 @@ services: - 3000:3000 volumes: - grafanadata:/var/lib/grafana - - ./provisioning/datasources/prometheus-datasource:/etc/grafana/provisioning/datasources + - ./provisioning/datasources/prometheus-datasource/single.yml:/etc/grafana/provisioning/datasources/single.yml - ./provisioning/dashboards:/etc/grafana/provisioning/dashboards - ./../../dashboards/victoriametrics.json:/var/lib/grafana/dashboards/vm.json - ./../../dashboards/vmagent.json:/var/lib/grafana/dashboards/vmagent.json diff --git a/deployment/docker/provisioning/datasources/prometheus-datasource/prometheus-datasource.yml b/deployment/docker/provisioning/datasources/prometheus-datasource/cluster.yml similarity index 54% rename from deployment/docker/provisioning/datasources/prometheus-datasource/prometheus-datasource.yml rename to deployment/docker/provisioning/datasources/prometheus-datasource/cluster.yml index 9b768a337..f8bb30ab4 100644 --- a/deployment/docker/provisioning/datasources/prometheus-datasource/prometheus-datasource.yml +++ b/deployment/docker/provisioning/datasources/prometheus-datasource/cluster.yml @@ -1,20 +1,11 @@ apiVersion: 1 datasources: - - name: VictoriaMetrics - type: prometheus - access: proxy - url: http://victoriametrics:8428 - isDefault: true - jsonData: - prometheusType: Prometheus - prometheusVersion: 2.24.0 - - name: VictoriaMetrics - cluster type: prometheus access: proxy url: http://vmauth:8427/select/0/prometheus - isDefault: false + isDefault: true jsonData: prometheusType: Prometheus prometheusVersion: 2.24.0 diff --git a/deployment/docker/provisioning/datasources/prometheus-datasource/single.yml b/deployment/docker/provisioning/datasources/prometheus-datasource/single.yml new file mode 100644 index 000000000..ab80245bf --- /dev/null +++ b/deployment/docker/provisioning/datasources/prometheus-datasource/single.yml @@ -0,0 +1,11 @@ +apiVersion: 1 + +datasources: + - name: VictoriaMetrics + type: prometheus + access: proxy + url: http://victoriametrics:8428 + isDefault: true + jsonData: + prometheusType: Prometheus + prometheusVersion: 2.24.0 \ No newline at end of file diff --git a/deployment/docker/provisioning/datasources/victoriametrics-datasource/cluster.yml b/deployment/docker/provisioning/datasources/victoriametrics-datasource/cluster.yml new file mode 100644 index 000000000..7eefe6d47 --- /dev/null +++ b/deployment/docker/provisioning/datasources/victoriametrics-datasource/cluster.yml @@ -0,0 +1,13 @@ +apiVersion: 1 + +datasources: + - name: VictoriaMetrics - cluster + type: victoriametrics-datasource + access: proxy + url: http://vmauth:8427/select/0/prometheus + isDefault: true + # see https://grafana.com/docs/grafana/latest/administration/provisioning/#json-data + jsonData: + # vmuiUrl will auto resolve into http://vmauth:8427 and won't work at user's machine + # so we override it + vmuiUrl: http://localhost:8427/select/0/vmui diff --git a/deployment/docker/provisioning/datasources/victoriametrics-datasource/single.yml b/deployment/docker/provisioning/datasources/victoriametrics-datasource/single.yml new file mode 100644 index 000000000..c04a48dd6 --- /dev/null +++ b/deployment/docker/provisioning/datasources/victoriametrics-datasource/single.yml @@ -0,0 +1,13 @@ +apiVersion: 1 + +datasources: + - name: VictoriaMetrics + type: victoriametrics-datasource + access: proxy + url: http://victoriametrics:8428 + isDefault: true + # see https://grafana.com/docs/grafana/latest/administration/provisioning/#json-data + jsonData: + # vmuiUrl will auto resolve into http://victoriametrics:8428 and won't work at user's machine + # so we override it + vmuiUrl: http://localhost:8428/vmui \ No newline at end of file diff --git a/deployment/docker/provisioning/datasources/victoriametrics-datasource/victoriametrics-datasource.yml b/deployment/docker/provisioning/datasources/victoriametrics-datasource/victoriametrics-datasource.yml deleted file mode 100644 index 64468980f..000000000 --- a/deployment/docker/provisioning/datasources/victoriametrics-datasource/victoriametrics-datasource.yml +++ /dev/null @@ -1,46 +0,0 @@ -apiVersion: 1 - -# List of data sources to insert/update depending on what's -# available in the database. -datasources: - # Name of the VictoriaMetrics datasource - # displayed in Grafana panels and queries. - - name: VictoriaMetrics - # Sets the data source type. - type: victoriametrics-datasource - # Sets the access mode, either - # proxy or direct (Server or Browser in the UI). - # Some data sources are incompatible with any setting - # but proxy (Server). - access: proxy - # Sets default URL of the single node version of VictoriaMetrics - url: http://victoriametrics:8428 - # Sets the pre-selected datasource for new panels. - # You can set only one default data source per organization. - isDefault: true - # see https://grafana.com/docs/grafana/latest/administration/provisioning/#json-data - jsonData: - # vmuiUrl will auto resolve into http://victoriametrics:8428 and won't work at user's machine - # so we override it - vmuiUrl: http://localhost:8428/vmui - - # Name of the VictoriaMetrics datasource - # displayed in Grafana panels and queries. - - name: VictoriaMetrics - cluster - # Sets the data source type. - type: victoriametrics-datasource - # Sets the access mode, either - # proxy or direct (Server or Browser in the UI). - # Some data sources are incompatible with any setting - # but proxy (Server). - access: proxy - # Sets default URL of the cluster version of VictoriaMetrics - url: http://vmauth:8427/select/0/prometheus - # Sets the pre-selected datasource for new panels. - # You can set only one default data source per organization. - isDefault: false - # see https://grafana.com/docs/grafana/latest/administration/provisioning/#json-data - jsonData: - # vmuiUrl will auto resolve into http://vmauth:8427 and won't work at user's machine - # so we override it - vmuiUrl: http://localhost:8427/select/0/vmui diff --git a/deployment/docker/vm-datasource/docker-compose-cluster.yml b/deployment/docker/vm-datasource/docker-compose-cluster.yml index c1b76ea4d..a09901a46 100644 --- a/deployment/docker/vm-datasource/docker-compose-cluster.yml +++ b/deployment/docker/vm-datasource/docker-compose-cluster.yml @@ -8,7 +8,7 @@ services: - 3000:3000 volumes: - grafanadata:/var/lib/grafana - - ./provisioning/datasources/victoriametrics-datasource:/etc/grafana/provisioning/datasources + - ./provisioning/datasources/victoriametrics-datasource/cluster.yml:/etc/grafana/provisioning/datasources/cluster.yml - ./provisioning/dashboards:/etc/grafana/provisioning/dashboards - ./provisioning/plugins/:/var/lib/grafana/plugins - ./../../dashboards/vm/victoriametrics-cluster.json:/var/lib/grafana/dashboards/vm.json diff --git a/deployment/docker/vm-datasource/docker-compose.yml b/deployment/docker/vm-datasource/docker-compose.yml index 30b95d642..cb7f35054 100644 --- a/deployment/docker/vm-datasource/docker-compose.yml +++ b/deployment/docker/vm-datasource/docker-compose.yml @@ -8,7 +8,7 @@ services: - 3000:3000 volumes: - grafanadata:/var/lib/grafana - - ./provisioning/datasources/victoriametrics-datasource:/etc/grafana/provisioning/datasources + - ./provisioning/datasources/victoriametrics-datasource/single.yml:/etc/grafana/provisioning/datasources/single.yml - ./provisioning/dashboards:/etc/grafana/provisioning/dashboards - ./provisioning/plugins/:/var/lib/grafana/plugins - ./../../dashboards/vm/victoriametrics.json:/var/lib/grafana/dashboards/vm.json From 7d7d7c03bca447c0e82ac02b3c65eb237bbda423 Mon Sep 17 00:00:00 2001 From: Aliaksandr Valialkin Date: Sat, 28 Sep 2024 21:17:10 +0200 Subject: [PATCH 09/31] app/vlinsert: accept unix timestamp in seconds additionally to milliseconds at ElasticSearch bulk API Timestamps in seconds are sometimes used for data ingestion via ElasticSearch bulk API --- app/vlinsert/elasticsearch/elasticsearch.go | 6 +++++- app/vlinsert/elasticsearch/elasticsearch_test.go | 11 +++++++---- docs/VictoriaLogs/CHANGELOG.md | 2 ++ docs/VictoriaLogs/data-ingestion/README.md | 10 +++++++++- 4 files changed, 23 insertions(+), 6 deletions(-) diff --git a/app/vlinsert/elasticsearch/elasticsearch.go b/app/vlinsert/elasticsearch/elasticsearch.go index 280ba007e..6dafad9a2 100644 --- a/app/vlinsert/elasticsearch/elasticsearch.go +++ b/app/vlinsert/elasticsearch/elasticsearch.go @@ -251,11 +251,15 @@ func parseElasticsearchTimestamp(s string) (int64, error) { return 0, nil } if len(s) < len("YYYY-MM-DD") || s[len("YYYY")] != '-' { - // Try parsing timestamp in milliseconds + // Try parsing timestamp in seconds or milliseconds n, err := strconv.ParseInt(s, 10, 64) if err != nil { return 0, fmt.Errorf("cannot parse timestamp in milliseconds from %q: %w", s, err) } + if n < (1<<31) && n >= (-1<<31) { + // The timestamp is in seconds. Convert it to milliseconds + n *= 1e3 + } if n > int64(math.MaxInt64)/1e6 { return 0, fmt.Errorf("too big timestamp in milliseconds: %d; mustn't exceed %d", n, int64(math.MaxInt64)/1e6) } diff --git a/app/vlinsert/elasticsearch/elasticsearch_test.go b/app/vlinsert/elasticsearch/elasticsearch_test.go index ca88d2ccc..bfb1cd52e 100644 --- a/app/vlinsert/elasticsearch/elasticsearch_test.go +++ b/app/vlinsert/elasticsearch/elasticsearch_test.go @@ -78,15 +78,18 @@ func TestReadBulkRequest_Success(t *testing.T) { {"create":{"_index":"filebeat-8.8.0"}} {"@timestamp":"2023-06-06 04:48:12.735+01:00","message":"baz"} {"index":{"_index":"filebeat-8.8.0"}} -{"message":"xyz","@timestamp":"2023-06-06T04:48:13.735Z","x":"y"} +{"message":"xyz","@timestamp":"1686026893735","x":"y"} +{"create":{"_index":"filebeat-8.8.0"}} +{"message":"qwe rty","@timestamp":"1686026893"} ` timeField := "@timestamp" msgField := "message" - rowsExpected := 3 - timestampsExpected := []int64{1686026891735000000, 1686023292735000000, 1686026893735000000} + rowsExpected := 4 + timestampsExpected := []int64{1686026891735000000, 1686023292735000000, 1686026893735000000, 1686026893000000000} resultExpected := `{"@timestamp":"","log.offset":"71770","log.file.path":"/var/log/auth.log","_msg":"foobar"} {"@timestamp":"","_msg":"baz"} -{"_msg":"xyz","@timestamp":"","x":"y"}` +{"_msg":"xyz","@timestamp":"","x":"y"} +{"_msg":"qwe rty","@timestamp":""}` f(data, timeField, msgField, rowsExpected, timestampsExpected, resultExpected) } diff --git a/docs/VictoriaLogs/CHANGELOG.md b/docs/VictoriaLogs/CHANGELOG.md index 197bff6f8..6a58d563d 100644 --- a/docs/VictoriaLogs/CHANGELOG.md +++ b/docs/VictoriaLogs/CHANGELOG.md @@ -15,6 +15,8 @@ according to [these docs](https://docs.victoriametrics.com/victorialogs/quicksta ## tip +* FEATURE: [ElasticSearch bulk API](https://docs.victoriametrics.com/victorialogs/data-ingestion/#elasticsearch-bulk-api): accept timestamps in seconds in the ingested logs. + ## [v0.31.0](https://github.com/VictoriaMetrics/VictoriaMetrics/releases/tag/v0.31.0-victorialogs) Released at 2024-09-27 diff --git a/docs/VictoriaLogs/data-ingestion/README.md b/docs/VictoriaLogs/data-ingestion/README.md index a548a195a..5dacc7db9 100644 --- a/docs/VictoriaLogs/data-ingestion/README.md +++ b/docs/VictoriaLogs/data-ingestion/README.md @@ -46,7 +46,15 @@ It is possible to push thousands of log lines in a single request to this API. If the [timestamp field](https://docs.victoriametrics.com/victorialogs/keyconcepts/#time-field) is set to `"0"`, then the current timestamp at VictoriaLogs side is used per each ingested log line. -Otherwise the timestamp field must be in the [ISO8601](https://en.wikipedia.org/wiki/ISO_8601) or [RFC3339](https://www.rfc-editor.org/rfc/rfc3339) format. +Otherwise the timestamp field must be in one of the following formats: + +- [ISO8601](https://en.wikipedia.org/wiki/ISO_8601) or [RFC3339](https://www.rfc-editor.org/rfc/rfc3339). + For example, `2023-06-20T15:32:10Z` or `2023-06-20 15:32:10.123456789+02:00`. + If timezone information is missing (for example, `2023-06-20 15:32:10`), + then the time is parsed in the local timezone of the host where VictoriaLogs runs. + +- Unix timestamp in seconds or in milliseconds. For example, `1686026893` (seconds) or `1686026893735` (milliseconds). + For example, `2023-06-20T15:32:10Z` or `2023-06-20 15:32:10.123456789+02:00`. If timezone information is missing (for example, `2023-06-20 15:32:10`), then the time is parsed in the local timezone of the host where VictoriaLogs runs. From 806bc2ac5813502e3a018476db1cf4b959cf5c0b Mon Sep 17 00:00:00 2001 From: Aliaksandr Valialkin Date: Sat, 28 Sep 2024 21:56:50 +0200 Subject: [PATCH 10/31] app/vlinsert: support unix timestamps in seconds and milliseconds in JSON stream data ingestion API --- app/vlinsert/elasticsearch/elasticsearch.go | 19 +------- app/vlinsert/insertutils/timestamp.go | 48 ++++++++++++++++++--- app/vlinsert/insertutils/timestamp_test.go | 18 +++++++- docs/VictoriaLogs/CHANGELOG.md | 2 +- docs/VictoriaLogs/data-ingestion/README.md | 14 +++--- docs/VictoriaLogs/keyConcepts.md | 12 +++++- 6 files changed, 79 insertions(+), 34 deletions(-) diff --git a/app/vlinsert/elasticsearch/elasticsearch.go b/app/vlinsert/elasticsearch/elasticsearch.go index 6dafad9a2..fff9f19be 100644 --- a/app/vlinsert/elasticsearch/elasticsearch.go +++ b/app/vlinsert/elasticsearch/elasticsearch.go @@ -6,9 +6,7 @@ import ( "flag" "fmt" "io" - "math" "net/http" - "strconv" "strings" "time" @@ -252,22 +250,7 @@ func parseElasticsearchTimestamp(s string) (int64, error) { } if len(s) < len("YYYY-MM-DD") || s[len("YYYY")] != '-' { // Try parsing timestamp in seconds or milliseconds - n, err := strconv.ParseInt(s, 10, 64) - if err != nil { - return 0, fmt.Errorf("cannot parse timestamp in milliseconds from %q: %w", s, err) - } - if n < (1<<31) && n >= (-1<<31) { - // The timestamp is in seconds. Convert it to milliseconds - n *= 1e3 - } - if n > int64(math.MaxInt64)/1e6 { - return 0, fmt.Errorf("too big timestamp in milliseconds: %d; mustn't exceed %d", n, int64(math.MaxInt64)/1e6) - } - if n < int64(math.MinInt64)/1e6 { - return 0, fmt.Errorf("too small timestamp in milliseconds: %d; must be bigger than %d", n, int64(math.MinInt64)/1e6) - } - n *= 1e6 - return n, nil + return insertutils.ParseUnixTimestamp(s) } if len(s) == len("YYYY-MM-DD") { t, err := time.Parse("2006-01-02", s) diff --git a/app/vlinsert/insertutils/timestamp.go b/app/vlinsert/insertutils/timestamp.go index e9d41d0a4..978837d09 100644 --- a/app/vlinsert/insertutils/timestamp.go +++ b/app/vlinsert/insertutils/timestamp.go @@ -2,6 +2,8 @@ package insertutils import ( "fmt" + "math" + "strconv" "time" "github.com/VictoriaMetrics/VictoriaMetrics/lib/logstorage" @@ -19,15 +21,49 @@ func ExtractTimestampRFC3339NanoFromFields(timeField string, fields []logstorage if f.Name != timeField { continue } - if f.Value == "" || f.Value == "0" { - return time.Now().UnixNano(), nil - } - nsecs, ok := logstorage.TryParseTimestampRFC3339Nano(f.Value) - if !ok { - return 0, fmt.Errorf("cannot unmarshal rfc3339 timestamp from %s=%q", timeField, f.Value) + nsecs, err := parseTimestamp(f.Value) + if err != nil { + return 0, fmt.Errorf("cannot parse timestamp from field %q: %s", timeField, err) } f.Value = "" + if nsecs == 0 { + nsecs = time.Now().UnixNano() + } return nsecs, nil } return time.Now().UnixNano(), nil } + +func parseTimestamp(s string) (int64, error) { + if s == "" || s == "0" { + return time.Now().UnixNano(), nil + } + if len(s) <= len("YYYY") || s[len("YYYY")] != '-' { + return ParseUnixTimestamp(s) + } + nsecs, ok := logstorage.TryParseTimestampRFC3339Nano(s) + if !ok { + return 0, fmt.Errorf("cannot unmarshal rfc3339 timestamp %q", s) + } + return nsecs, nil +} + +// ParseUnixTimestamp parses s as unix timestamp in either seconds or milliseconds and returns the parsed timestamp in nanoseconds. +func ParseUnixTimestamp(s string) (int64, error) { + n, err := strconv.ParseInt(s, 10, 64) + if err != nil { + return 0, fmt.Errorf("cannot parse unix timestamp from %q: %w", s, err) + } + if n < (1<<31) && n >= (-1<<31) { + // The timestamp is in seconds. Convert it to milliseconds + n *= 1e3 + } + if n > int64(math.MaxInt64)/1e6 { + return 0, fmt.Errorf("too big timestamp in milliseconds: %d; mustn't exceed %d", n, int64(math.MaxInt64)/1e6) + } + if n < int64(math.MinInt64)/1e6 { + return 0, fmt.Errorf("too small timestamp in milliseconds: %d; must be bigger than %d", n, int64(math.MinInt64)/1e6) + } + n *= 1e6 + return n, nil +} diff --git a/app/vlinsert/insertutils/timestamp_test.go b/app/vlinsert/insertutils/timestamp_test.go index a386f09fa..a7f935384 100644 --- a/app/vlinsert/insertutils/timestamp_test.go +++ b/app/vlinsert/insertutils/timestamp_test.go @@ -27,25 +27,41 @@ func TestExtractTimestampRFC3339NanoFromFields_Success(t *testing.T) { } } + // UTC time f("time", []logstorage.Field{ {Name: "foo", Value: "bar"}, {Name: "time", Value: "2024-06-18T23:37:20Z"}, }, 1718753840000000000) + // Time with timezone f("time", []logstorage.Field{ {Name: "foo", Value: "bar"}, {Name: "time", Value: "2024-06-18T23:37:20+08:00"}, }, 1718725040000000000) + // SQL datetime format f("time", []logstorage.Field{ {Name: "foo", Value: "bar"}, - {Name: "time", Value: "2024-06-18T23:37:20.123-05:30"}, + {Name: "time", Value: "2024-06-18 23:37:20.123-05:30"}, }, 1718773640123000000) + // Time with nanosecond precision f("time", []logstorage.Field{ {Name: "time", Value: "2024-06-18T23:37:20.123456789-05:30"}, {Name: "foo", Value: "bar"}, }, 1718773640123456789) + + // Unix timestamp in milliseconds + f("time", []logstorage.Field{ + {Name: "foo", Value: "bar"}, + {Name: "time", Value: "1718773640123"}, + }, 1718773640123000000) + + // Unix timestamp in seconds + f("time", []logstorage.Field{ + {Name: "foo", Value: "bar"}, + {Name: "time", Value: "1718773640"}, + }, 1718773640000000000) } func TestExtractTimestampRFC3339NanoFromFields_Error(t *testing.T) { diff --git a/docs/VictoriaLogs/CHANGELOG.md b/docs/VictoriaLogs/CHANGELOG.md index 6a58d563d..d1a508a06 100644 --- a/docs/VictoriaLogs/CHANGELOG.md +++ b/docs/VictoriaLogs/CHANGELOG.md @@ -15,7 +15,7 @@ according to [these docs](https://docs.victoriametrics.com/victorialogs/quicksta ## tip -* FEATURE: [ElasticSearch bulk API](https://docs.victoriametrics.com/victorialogs/data-ingestion/#elasticsearch-bulk-api): accept timestamps in seconds in the ingested logs. +* FEATURE: [data ingestion](https://docs.victoriametrics.com/victorialogs/data-ingestion/): accept Unix timestamps in seconds in the ingested logs. ## [v0.31.0](https://github.com/VictoriaMetrics/VictoriaMetrics/releases/tag/v0.31.0-victorialogs) diff --git a/docs/VictoriaLogs/data-ingestion/README.md b/docs/VictoriaLogs/data-ingestion/README.md index 5dacc7db9..d84cd7603 100644 --- a/docs/VictoriaLogs/data-ingestion/README.md +++ b/docs/VictoriaLogs/data-ingestion/README.md @@ -55,9 +55,6 @@ Otherwise the timestamp field must be in one of the following formats: - Unix timestamp in seconds or in milliseconds. For example, `1686026893` (seconds) or `1686026893735` (milliseconds). -For example, `2023-06-20T15:32:10Z` or `2023-06-20 15:32:10.123456789+02:00`. -If timezone information is missing (for example, `2023-06-20 15:32:10`), then the time is parsed in the local timezone of the host where VictoriaLogs runs. - See [these docs](https://docs.victoriametrics.com/victorialogs/keyconcepts/#data-model) for details on fields, which must be present in the ingested log messages. @@ -104,9 +101,14 @@ It is possible to push unlimited number of log lines in a single request to this If the [timestamp field](https://docs.victoriametrics.com/victorialogs/keyconcepts/#time-field) is set to `"0"`, then the current timestamp at VictoriaLogs side is used per each ingested log line. -Otherwise the timestamp field must be in the [ISO8601](https://en.wikipedia.org/wiki/ISO_8601) or [RFC3339](https://www.rfc-editor.org/rfc/rfc3339) format. -For example, `2023-06-20T15:32:10Z` or `2023-06-20 15:32:10.123456789+02:00`. -If timezone information is missing (for example, `2023-06-20 15:32:10`), then the time is parsed in the local timezone of the host where VictoriaLogs runs. +Otherwise the timestamp field must be in one of the following formats: + +- [ISO8601](https://en.wikipedia.org/wiki/ISO_8601) or [RFC3339](https://www.rfc-editor.org/rfc/rfc3339). + For example, `2023-06-20T15:32:10Z` or `2023-06-20 15:32:10.123456789+02:00`. + If timezone information is missing (for example, `2023-06-20 15:32:10`), + then the time is parsed in the local timezone of the host where VictoriaLogs runs. + +- Unix timestamp in seconds or in milliseconds. For example, `1686026893` (seconds) or `1686026893735` (milliseconds). See [these docs](https://docs.victoriametrics.com/victorialogs/keyconcepts/#data-model) for details on fields, which must be present in the ingested log messages. diff --git a/docs/VictoriaLogs/keyConcepts.md b/docs/VictoriaLogs/keyConcepts.md index dd1e5f8d7..d1b38ba65 100644 --- a/docs/VictoriaLogs/keyConcepts.md +++ b/docs/VictoriaLogs/keyConcepts.md @@ -135,7 +135,15 @@ during [data ingestion](https://docs.victoriametrics.com/victorialogs/data-inges ### Time field The ingested [log entries](#data-model) may contain `_time` field with the timestamp of the ingested log entry. -The timestamp must be in [RFC3339](https://www.rfc-editor.org/rfc/rfc3339) or [ISO8601](https://en.wikipedia.org/wiki/ISO_8601) format. +The timestamp field must be in one of the following formats: + +- [ISO8601](https://en.wikipedia.org/wiki/ISO_8601) or [RFC3339](https://www.rfc-editor.org/rfc/rfc3339). + For example, `2023-06-20T15:32:10Z` or `2023-06-20 15:32:10.123456789+02:00`. + If timezone information is missing (for example, `2023-06-20 15:32:10`), + then the time is parsed in the local timezone of the host where VictoriaLogs runs. + +- Unix timestamp in seconds or in milliseconds. For example, `1686026893` (seconds) or `1686026893735` (milliseconds). + For example, the following [log entry](#data-model) contains valid timestamp with millisecond precision in the `_time` field: ```json @@ -152,7 +160,7 @@ field via `_time_field` query arg during [data ingestion](https://docs.victoriam For example, if timestamp is located in the `event.created` field, then specify `_time_field=event.created` query arg during [data ingestion](https://docs.victoriametrics.com/victorialogs/data-ingestion/). -If `_time` field is missing, then the data ingestion time is used as log entry timestamp. +If `_time` field is missing or if it equals `0`, then the data ingestion time is used as log entry timestamp. The `_time` field is used in [time filter](https://docs.victoriametrics.com/victorialogs/logsql/#time-filter) for quickly narrowing down the search to a particular time range. From 96efe99eef2ed57f3aaca42f88dc406387fa0183 Mon Sep 17 00:00:00 2001 From: Artem Navoiev Date: Sat, 28 Sep 2024 14:28:58 -0700 Subject: [PATCH 11/31] docs: mention new create backup api in docs and changelog (#7104) ### Describe Your Changes Please provide a brief description of the changes you made. Be as specific as possible to help others understand the purpose and impact of your modifications. ### Checklist The following checks are **mandatory**: - [x] My change adheres [VictoriaMetrics contributing guidelines](https://docs.victoriametrics.com/contributing/). Signed-off-by: Artem Navoiev --- docs/changelog/CHANGELOG.md | 3 ++- docs/vmbackupmanager.md | 22 ++++++++++++++-------- 2 files changed, 16 insertions(+), 9 deletions(-) diff --git a/docs/changelog/CHANGELOG.md b/docs/changelog/CHANGELOG.md index a47759ea8..9d55e3221 100644 --- a/docs/changelog/CHANGELOG.md +++ b/docs/changelog/CHANGELOG.md @@ -31,7 +31,8 @@ See also [LTS releases](https://docs.victoriametrics.com/lts-releases/). * FEATURE: [dashboards](https://github.com/VictoriaMetrics/VictoriaMetrics/blob/master/dashboards) for VM single-node, cluster, vmalert, vmagent, VictoriaLogs: add `Go scheduling latency` panel to show the 99th quantile of Go goroutines scheduling. This panel should help identifying insufficient CPU resources for the service. It is especially useful if CPU gets throttled, which now should be visible on this panel. * FEATURE: [alerts](https://github.com/VictoriaMetrics/VictoriaMetrics/blob/master/deployment/docker/alerts-health.yml): add alerting rule to track the Go scheduling latency for goroutines. It should notify users if VM component doesn't have enough CPU to run or gets throttled. * FEATURE: [vmagent](https://docs.victoriametrics.com/vmagent/) and [Single-node VictoriaMetrics](https://docs.victoriametrics.com/): hide jobs that contain only healthy targets when `show_only_unhealthy` filter is enabled. Before, jobs without unhealthy targets were still displayed on the page. See [this issue](https://github.com/VictoriaMetrics/VictoriaMetrics/issues/3536). -* FEATURE: [vmalert](https://docs.victoriametrics.com/vmalert): bump default values for sending data to `remoteWrite.url`: `remoteWrite.maxQueueSize` from `100_000` to `1_000_000`, `remoteWrite.maxBatchSize` from `1_000` to `10_000`, `remoteWrite.concurrency` from `1` to `4`. The new settings should improve remote write performance of vmalert with default settings. +* FEATURE: [vmalert](https://docs.victoriametrics.com/vmalert): bump default values for sending data to `remoteWrite.url`: `remoteWrite.maxQueueSize` from `100_000` to `1_000_000`, `remoteWrite.maxBatchSize` from `1_000` to `10_000`, `remoteWrite.concurrency` from `1` to `4`. The new settings should improve remote write performance of vmalert with default settings. +* FEATURE: [vmbackupmanager](https://docs.victoriametrics.com/vmbackupamanager/): add API for creating/scheduling backups. See [documentation](https://docs.victoriametrics.com/vmbackupmanager/#api-methods) * BUGFIX: [vmagent](https://docs.victoriametrics.com/vmagent/) fix service discovery of Azure Virtual Machines for response contains `nextLink` in `Host:Port` format. See [this issue](https://github.com/VictoriaMetrics/VictoriaMetrics/issues/6912). * BUGFIX: [vmagent](https://docs.victoriametrics.com/vmagent/): properly consume messages [from kafka](https://docs.victoriametrics.com/vmagent/#kafka-integration). Previously vmagent could skip some messages during start-up. diff --git a/docs/vmbackupmanager.md b/docs/vmbackupmanager.md index f2f0a69d6..1e24fe1b5 100644 --- a/docs/vmbackupmanager.md +++ b/docs/vmbackupmanager.md @@ -202,19 +202,25 @@ For example: `vmbackupmanager` exposes the following API methods: +* POST `/api/v1/backups` - schedule/create the backup. Response examples: + + success, status code - 201, body: + ```json + {} + ``` + + failure, status code - 400, body: + ```json + {"error": "backups is in progress"} + ``` + * GET `/api/v1/backups` - returns list of backups in remote storage. - Example output: + Response example: ```json [{"name":"daily/2023-04-07","size_bytes":318837,"size":"311.4ki","created_at":"2023-04-07T16:15:07+00:00"},{"name":"hourly/2023-04-07:11","size_bytes":318837,"size":"311.4ki","created_at":"2023-04-07T16:15:06+00:00"},{"name":"latest","size_bytes":318837,"size":"311.4ki","created_at":"2023-04-07T16:15:04+00:00"},{"name":"monthly/2023-04","size_bytes":318837,"size":"311.4ki","created_at":"2023-04-07T16:15:10+00:00"},{"name":"weekly/2023-14","size_bytes":318837,"size":"311.4ki","created_at":"2023-04-07T16:15:09+00:00"}] ``` > Note: `created_at` field is in RFC3339 format. - -* GET `/api/v1/backups/` - returns backup info by name. - Example output: - ```json - {"name":"daily/2023-04-07","size_bytes":318837,"size":"311.4ki","created_at":"2023-04-07T16:15:07+00:00","locked":true} - ``` - + * PUT `/api/v1/backups/` - update "locked" attribute for backup by name. Example request body: ```json From 14a0396f530ee58c82611abbddfe53c11d48b0d0 Mon Sep 17 00:00:00 2001 From: Artem Navoiev Date: Sat, 28 Sep 2024 23:30:19 +0200 Subject: [PATCH 12/31] docs: changelog fix typo in url Signed-off-by: Artem Navoiev --- docs/changelog/CHANGELOG.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/docs/changelog/CHANGELOG.md b/docs/changelog/CHANGELOG.md index 9d55e3221..a36f4bb5d 100644 --- a/docs/changelog/CHANGELOG.md +++ b/docs/changelog/CHANGELOG.md @@ -32,7 +32,7 @@ See also [LTS releases](https://docs.victoriametrics.com/lts-releases/). * FEATURE: [alerts](https://github.com/VictoriaMetrics/VictoriaMetrics/blob/master/deployment/docker/alerts-health.yml): add alerting rule to track the Go scheduling latency for goroutines. It should notify users if VM component doesn't have enough CPU to run or gets throttled. * FEATURE: [vmagent](https://docs.victoriametrics.com/vmagent/) and [Single-node VictoriaMetrics](https://docs.victoriametrics.com/): hide jobs that contain only healthy targets when `show_only_unhealthy` filter is enabled. Before, jobs without unhealthy targets were still displayed on the page. See [this issue](https://github.com/VictoriaMetrics/VictoriaMetrics/issues/3536). * FEATURE: [vmalert](https://docs.victoriametrics.com/vmalert): bump default values for sending data to `remoteWrite.url`: `remoteWrite.maxQueueSize` from `100_000` to `1_000_000`, `remoteWrite.maxBatchSize` from `1_000` to `10_000`, `remoteWrite.concurrency` from `1` to `4`. The new settings should improve remote write performance of vmalert with default settings. -* FEATURE: [vmbackupmanager](https://docs.victoriametrics.com/vmbackupamanager/): add API for creating/scheduling backups. See [documentation](https://docs.victoriametrics.com/vmbackupmanager/#api-methods) +* FEATURE: [vmbackupmanager](https://docs.victoriametrics.com/vmbackupmanager/): add API for creating/scheduling backups. See [documentation](https://docs.victoriametrics.com/vmbackupmanager/#api-methods) * BUGFIX: [vmagent](https://docs.victoriametrics.com/vmagent/) fix service discovery of Azure Virtual Machines for response contains `nextLink` in `Host:Port` format. See [this issue](https://github.com/VictoriaMetrics/VictoriaMetrics/issues/6912). * BUGFIX: [vmagent](https://docs.victoriametrics.com/vmagent/): properly consume messages [from kafka](https://docs.victoriametrics.com/vmagent/#kafka-integration). Previously vmagent could skip some messages during start-up. From 8772aea24b86989255283222987b09e6c151c156 Mon Sep 17 00:00:00 2001 From: Aliaksandr Valialkin Date: Sun, 29 Sep 2024 09:33:31 +0200 Subject: [PATCH 13/31] lib/logstorage: support `order` alias for `sort` pipe Now the following queries are equivalents: _time:5s | sort by (_time) _time:5s | order by (_time) This is needed for convenience, since `order by` is commonly used in other query languages such as SQL. --- docs/VictoriaLogs/CHANGELOG.md | 1 + docs/VictoriaLogs/LogsQL.md | 6 ++++++ lib/logstorage/parser_test.go | 2 ++ lib/logstorage/pipe.go | 4 ++-- lib/logstorage/pipe_sort.go | 4 ++-- lib/logstorage/pipe_sort_test.go | 4 ++-- 6 files changed, 15 insertions(+), 6 deletions(-) diff --git a/docs/VictoriaLogs/CHANGELOG.md b/docs/VictoriaLogs/CHANGELOG.md index d1a508a06..59de19e65 100644 --- a/docs/VictoriaLogs/CHANGELOG.md +++ b/docs/VictoriaLogs/CHANGELOG.md @@ -16,6 +16,7 @@ according to [these docs](https://docs.victoriametrics.com/victorialogs/quicksta ## tip * FEATURE: [data ingestion](https://docs.victoriametrics.com/victorialogs/data-ingestion/): accept Unix timestamps in seconds in the ingested logs. +* FEATURE: [`sort` pipe](https://docs.victoriametrics.com/victorialogs/logsql/#sort-pipe): allow using `order` alias instead of `sort`. For example, `_time:5s | order by (_time)` query works the same as `_time:5s | sort by (_time)`. ## [v0.31.0](https://github.com/VictoriaMetrics/VictoriaMetrics/releases/tag/v0.31.0-victorialogs) diff --git a/docs/VictoriaLogs/LogsQL.md b/docs/VictoriaLogs/LogsQL.md index 2249106bd..7d26a7f52 100644 --- a/docs/VictoriaLogs/LogsQL.md +++ b/docs/VictoriaLogs/LogsQL.md @@ -2110,6 +2110,12 @@ The `by` keyword can be skipped in `sort ...` pipe. For example, the following q _time:5m | sort (foo, bar) desc ``` +The `order` alias can be used instead of `sort`, so the following query is equivalent to the previous one: + +```logsql +_time:5m | order by (foo, bar) desc +``` + Sorting of big number of logs can consume a lot of CPU time and memory. Sometimes it is enough to return the first `N` entries with the biggest or the smallest values. This can be done by adding `limit N` to the end of `sort ...` pipe. Such a query consumes lower amounts of memory when sorting big number of logs, since it keeps in memory only `N` log entries. diff --git a/lib/logstorage/parser_test.go b/lib/logstorage/parser_test.go index 84093adb7..7571e240f 100644 --- a/lib/logstorage/parser_test.go +++ b/lib/logstorage/parser_test.go @@ -1150,9 +1150,11 @@ func TestParseQuerySuccess(t *testing.T) { // sort pipe f(`* | sort`, `* | sort`) + f(`* | order`, `* | sort`) f(`* | sort desc`, `* | sort desc`) f(`* | sort by()`, `* | sort`) f(`* | sort bY (foo)`, `* | sort by (foo)`) + f(`* | ORDer bY (foo)`, `* | sort by (foo)`) f(`* | sORt bY (_time, _stream DEsc, host)`, `* | sort by (_time, _stream desc, host)`) f(`* | sort bY (foo desc, bar,) desc`, `* | sort by (foo desc, bar) desc`) f(`* | sort limit 10`, `* | sort limit 10`) diff --git a/lib/logstorage/pipe.go b/lib/logstorage/pipe.go index 6279d98de..5b0bc8b46 100644 --- a/lib/logstorage/pipe.go +++ b/lib/logstorage/pipe.go @@ -213,7 +213,7 @@ func parsePipe(lex *lexer) (pipe, error) { return nil, fmt.Errorf("cannot parse 'replace_regexp' pipe: %w", err) } return pr, nil - case lex.isKeyword("sort"): + case lex.isKeyword("sort"), lex.isKeyword("order"): ps, err := parsePipeSort(lex) if err != nil { return nil, fmt.Errorf("cannot parse 'sort' pipe: %w", err) @@ -309,7 +309,7 @@ var pipeNames = func() map[string]struct{} { "rename", "mv", "replace", "replace_regexp", - "sort", + "sort", "order", "stats", "stream_context", "top", diff --git a/lib/logstorage/pipe_sort.go b/lib/logstorage/pipe_sort.go index caebb08b6..f14b30c6f 100644 --- a/lib/logstorage/pipe_sort.go +++ b/lib/logstorage/pipe_sort.go @@ -748,8 +748,8 @@ func sortBlockLess(shardA *pipeSortProcessorShard, rowIdxA int, shardB *pipeSort } func parsePipeSort(lex *lexer) (*pipeSort, error) { - if !lex.isKeyword("sort") { - return nil, fmt.Errorf("expecting 'sort'; got %q", lex.token) + if !lex.isKeyword("sort") && !lex.isKeyword("order") { + return nil, fmt.Errorf("expecting 'sort' or 'order'; got %q", lex.token) } lex.nextToken() diff --git a/lib/logstorage/pipe_sort_test.go b/lib/logstorage/pipe_sort_test.go index 671f4b0e7..0385a51c0 100644 --- a/lib/logstorage/pipe_sort_test.go +++ b/lib/logstorage/pipe_sort_test.go @@ -308,7 +308,7 @@ func TestPipeSort(t *testing.T) { }) // Sort by multiple fields with offset and limit - f("sort by (a, b) desc offset 2 limit 100", [][]Field{ + f("order by (a, b) desc offset 2 limit 100", [][]Field{ { {"_msg", `abc`}, {"a", `2`}, @@ -360,5 +360,5 @@ func TestPipeSortUpdateNeededFields(t *testing.T) { // needed fields intersect with src f("sort by(s1,s2)", "s1,f1,f2", "", "s1,s2,f1,f2", "") - f("sort by(s1,s2) rank as x", "s1,f1,f2,x", "", "s1,s2,f1,f2", "") + f("order by(s1,s2) rank as x", "s1,f1,f2,x", "", "s1,s2,f1,f2", "") } From 0b91452ca40eefcbbe7f257e446b478b9180e001 Mon Sep 17 00:00:00 2001 From: Aliaksandr Valialkin Date: Sun, 29 Sep 2024 09:46:11 +0200 Subject: [PATCH 14/31] lib/logstorage: add non-empty `if (...)` condition to automatically generated result names in `stats` pipe This allows executing queries with `stats` pipe, which calculate multiple results with the same functions, but with different `if (...)` conditions. For example: _time:5m | count(), count() if (error) Previously such queries couldn't be executed becasue automatically generated name for the second result didn't include `if (error)`, so names for both results were identical - `count(*)`. --- docs/VictoriaLogs/CHANGELOG.md | 1 + lib/logstorage/parser_test.go | 1 + lib/logstorage/pipe_stats.go | 3 +++ 3 files changed, 5 insertions(+) diff --git a/docs/VictoriaLogs/CHANGELOG.md b/docs/VictoriaLogs/CHANGELOG.md index 59de19e65..5b0e97032 100644 --- a/docs/VictoriaLogs/CHANGELOG.md +++ b/docs/VictoriaLogs/CHANGELOG.md @@ -17,6 +17,7 @@ according to [these docs](https://docs.victoriametrics.com/victorialogs/quicksta * FEATURE: [data ingestion](https://docs.victoriametrics.com/victorialogs/data-ingestion/): accept Unix timestamps in seconds in the ingested logs. * FEATURE: [`sort` pipe](https://docs.victoriametrics.com/victorialogs/logsql/#sort-pipe): allow using `order` alias instead of `sort`. For example, `_time:5s | order by (_time)` query works the same as `_time:5s | sort by (_time)`. +* FEATURE: [`stats` pipe](https://docs.victoriametrics.com/victorialogs/logsql/#stats-pipe): allow using multiple identical [stats functions](https://docs.victoriametrics.com/victorialogs/logsql/#stats-pipe-functions) with distinct [filters](https://docs.victoriametrics.com/victorialogs/logsql/#stats-with-additional-filters) and automatically generated result names. For example, `_time:5m | count(), count() if (error)` query works as expected now, e.g. it returns two results over the last 5 minutes: the total number of logs and the number of logs with `error` [word](https://docs.victoriametrics.com/victorialogs/logsql/#word). Previously this query couldn't be executed because the `if (...)` condition wasn't included in the automatically generate result name, so both results had the same name - `count(*)`. ## [v0.31.0](https://github.com/VictoriaMetrics/VictoriaMetrics/releases/tag/v0.31.0-victorialogs) diff --git a/lib/logstorage/parser_test.go b/lib/logstorage/parser_test.go index 7571e240f..359347704 100644 --- a/lib/logstorage/parser_test.go +++ b/lib/logstorage/parser_test.go @@ -1025,6 +1025,7 @@ func TestParseQuerySuccess(t *testing.T) { f(`* | stats count('') foo`, `* | stats count(_msg) as foo`) f(`* | stats count(foo) ''`, `* | stats count(foo) as _msg`) f(`* | count()`, `* | stats count(*) as "count(*)"`) + f(`* | count(), count() if (foo)`, `* | stats count(*) as "count(*)", count(*) if (foo) as "count(*) if (foo)"`) // stats pipe count_empty f(`* | stats count_empty() x`, `* | stats count_empty(*) as x`) diff --git a/lib/logstorage/pipe_stats.go b/lib/logstorage/pipe_stats.go index 9d1906fd3..7946efd1d 100644 --- a/lib/logstorage/pipe_stats.go +++ b/lib/logstorage/pipe_stats.go @@ -577,6 +577,9 @@ func parsePipeStats(lex *lexer, needStatsKeyword bool) (*pipeStats, error) { resultName := "" if lex.isKeyword(",", "|", ")", "") { resultName = sf.String() + if f.iff != nil { + resultName += " " + f.iff.String() + } } else { if lex.isKeyword("as") { lex.nextToken() From dfcab4a47f79b62bd65278ac20d372fe5334633a Mon Sep 17 00:00:00 2001 From: Andrii Chubatiuk Date: Sun, 29 Sep 2024 10:54:45 +0300 Subject: [PATCH 15/31] deployment/victorialogs: rename not executable compose files (#7124) ### Describe Your Changes Renamed base compose files to prevent envs to be created from them ### Checklist The following checks are **mandatory**: - [ ] My change adheres [VictoriaMetrics contributing guidelines](https://docs.victoriametrics.com/contributing/). --- .../docker/victorialogs/{compose.yml => compose-base.yml} | 0 .../victorialogs/filebeat/{compose.yml => compose-base.yml} | 2 +- .../docker/victorialogs/filebeat/elasticsearch/compose.yml | 2 +- deployment/docker/victorialogs/filebeat/syslog/compose.yml | 2 +- .../victorialogs/fluentbit/{compose.yml => compose-base.yml} | 2 +- .../docker/victorialogs/fluentbit/jsonline-ha/compose.yml | 2 +- deployment/docker/victorialogs/fluentbit/jsonline/compose.yml | 2 +- deployment/docker/victorialogs/fluentbit/loki/compose.yml | 2 +- .../victorialogs/fluentd/{compose.yml => compose-base.yml} | 2 +- .../docker/victorialogs/fluentd/elasticsearch/compose.yml | 2 +- deployment/docker/victorialogs/fluentd/jsonline/compose.yml | 2 +- deployment/docker/victorialogs/fluentd/loki/compose.yml | 2 +- deployment/docker/victorialogs/fluentd/syslog/compose.yml | 2 +- .../victorialogs/logstash/{compose.yml => compose-base.yml} | 2 +- .../docker/victorialogs/logstash/elasticsearch/compose.yml | 2 +- deployment/docker/victorialogs/logstash/jsonline-ha/compose.yml | 2 +- deployment/docker/victorialogs/logstash/jsonline/compose.yml | 2 +- deployment/docker/victorialogs/logstash/loki/compose.yml | 2 +- .../opentelemetry-collector/{compose.yml => compose-base.yml} | 2 +- .../opentelemetry-collector/elasticsearch-ha/compose.yml | 2 +- .../opentelemetry-collector/elasticsearch/compose.yml | 2 +- .../victorialogs/opentelemetry-collector/loki/compose.yml | 2 +- .../victorialogs/opentelemetry-collector/otlp/compose.yml | 2 +- .../victorialogs/opentelemetry-collector/syslog/compose.yml | 2 +- .../victorialogs/promtail/{compose.yml => compose-base.yml} | 2 +- deployment/docker/victorialogs/promtail/loki/compose.yml | 2 +- .../victorialogs/telegraf/{compose.yml => compose-base.yml} | 2 +- .../docker/victorialogs/telegraf/elasticsearch/compose.yml | 2 +- deployment/docker/victorialogs/telegraf/jsonline/compose.yml | 2 +- deployment/docker/victorialogs/telegraf/loki/compose.yml | 2 +- deployment/docker/victorialogs/telegraf/syslog/compose.yml | 2 +- .../victorialogs/vector/{compose.yml => compose-base.yml} | 2 +- .../docker/victorialogs/vector/elasticsearch/compose.yaml | 2 +- deployment/docker/victorialogs/vector/jsonline-ha/compose.yml | 2 +- deployment/docker/victorialogs/vector/jsonline/compose.yml | 2 +- deployment/docker/victorialogs/vector/loki/compose.yml | 2 +- 36 files changed, 35 insertions(+), 35 deletions(-) rename deployment/docker/victorialogs/{compose.yml => compose-base.yml} (100%) rename deployment/docker/victorialogs/filebeat/{compose.yml => compose-base.yml} (95%) rename deployment/docker/victorialogs/fluentbit/{compose.yml => compose-base.yml} (92%) rename deployment/docker/victorialogs/fluentd/{compose.yml => compose-base.yml} (96%) rename deployment/docker/victorialogs/logstash/{compose.yml => compose-base.yml} (94%) rename deployment/docker/victorialogs/opentelemetry-collector/{compose.yml => compose-base.yml} (94%) rename deployment/docker/victorialogs/promtail/{compose.yml => compose-base.yml} (93%) rename deployment/docker/victorialogs/telegraf/{compose.yml => compose-base.yml} (95%) rename deployment/docker/victorialogs/vector/{compose.yml => compose-base.yml} (95%) diff --git a/deployment/docker/victorialogs/compose.yml b/deployment/docker/victorialogs/compose-base.yml similarity index 100% rename from deployment/docker/victorialogs/compose.yml rename to deployment/docker/victorialogs/compose-base.yml diff --git a/deployment/docker/victorialogs/filebeat/compose.yml b/deployment/docker/victorialogs/filebeat/compose-base.yml similarity index 95% rename from deployment/docker/victorialogs/filebeat/compose.yml rename to deployment/docker/victorialogs/filebeat/compose-base.yml index 0b3b38359..4da2cccc0 100644 --- a/deployment/docker/victorialogs/filebeat/compose.yml +++ b/deployment/docker/victorialogs/filebeat/compose-base.yml @@ -1,5 +1,5 @@ include: - - ../compose.yml + - ../compose-base.yml services: filebeat: image: docker.elastic.co/beats/filebeat:8.15.1 diff --git a/deployment/docker/victorialogs/filebeat/elasticsearch/compose.yml b/deployment/docker/victorialogs/filebeat/elasticsearch/compose.yml index f15e3b2f5..23e245b02 100644 --- a/deployment/docker/victorialogs/filebeat/elasticsearch/compose.yml +++ b/deployment/docker/victorialogs/filebeat/elasticsearch/compose.yml @@ -1,3 +1,3 @@ include: - - ../compose.yml + - ../compose-base.yml name: filebeat-elasticsearch diff --git a/deployment/docker/victorialogs/filebeat/syslog/compose.yml b/deployment/docker/victorialogs/filebeat/syslog/compose.yml index eb908fd0c..5d38d1a17 100644 --- a/deployment/docker/victorialogs/filebeat/syslog/compose.yml +++ b/deployment/docker/victorialogs/filebeat/syslog/compose.yml @@ -1,3 +1,3 @@ include: - - ../compose.yml + - ../compose-base.yml name: filebeat-syslog diff --git a/deployment/docker/victorialogs/fluentbit/compose.yml b/deployment/docker/victorialogs/fluentbit/compose-base.yml similarity index 92% rename from deployment/docker/victorialogs/fluentbit/compose.yml rename to deployment/docker/victorialogs/fluentbit/compose-base.yml index 2f38c9f20..c9580679f 100644 --- a/deployment/docker/victorialogs/fluentbit/compose.yml +++ b/deployment/docker/victorialogs/fluentbit/compose-base.yml @@ -1,5 +1,5 @@ include: - - ../compose.yml + - ../compose-base.yml services: fluentbit: image: cr.fluentbit.io/fluent/fluent-bit:3.1.7 diff --git a/deployment/docker/victorialogs/fluentbit/jsonline-ha/compose.yml b/deployment/docker/victorialogs/fluentbit/jsonline-ha/compose.yml index ffe557c61..3a9ccc9a9 100644 --- a/deployment/docker/victorialogs/fluentbit/jsonline-ha/compose.yml +++ b/deployment/docker/victorialogs/fluentbit/jsonline-ha/compose.yml @@ -1,5 +1,5 @@ include: - path: - - ../compose.yml + - ../compose-base.yml - ../../compose-ha.yml name: fluentbit-jsonline-ha diff --git a/deployment/docker/victorialogs/fluentbit/jsonline/compose.yml b/deployment/docker/victorialogs/fluentbit/jsonline/compose.yml index 4edd0c18b..fcdecd21b 100644 --- a/deployment/docker/victorialogs/fluentbit/jsonline/compose.yml +++ b/deployment/docker/victorialogs/fluentbit/jsonline/compose.yml @@ -1,3 +1,3 @@ include: - - ../compose.yml + - ../compose-base.yml name: fluentbit-jsonline diff --git a/deployment/docker/victorialogs/fluentbit/loki/compose.yml b/deployment/docker/victorialogs/fluentbit/loki/compose.yml index 1627ba043..9cf140127 100644 --- a/deployment/docker/victorialogs/fluentbit/loki/compose.yml +++ b/deployment/docker/victorialogs/fluentbit/loki/compose.yml @@ -1,3 +1,3 @@ include: - - ../compose.yml + - ../compose-base.yml name: fluentbit-loki diff --git a/deployment/docker/victorialogs/fluentd/compose.yml b/deployment/docker/victorialogs/fluentd/compose-base.yml similarity index 96% rename from deployment/docker/victorialogs/fluentd/compose.yml rename to deployment/docker/victorialogs/fluentd/compose-base.yml index e189f506e..0d35bfd8e 100644 --- a/deployment/docker/victorialogs/fluentd/compose.yml +++ b/deployment/docker/victorialogs/fluentd/compose-base.yml @@ -1,5 +1,5 @@ include: - - ../compose.yml + - ../compose-base.yml services: fluentd: build: . diff --git a/deployment/docker/victorialogs/fluentd/elasticsearch/compose.yml b/deployment/docker/victorialogs/fluentd/elasticsearch/compose.yml index 9c65b063e..9ec3ada9d 100644 --- a/deployment/docker/victorialogs/fluentd/elasticsearch/compose.yml +++ b/deployment/docker/victorialogs/fluentd/elasticsearch/compose.yml @@ -1,3 +1,3 @@ include: - - ../compose.yml + - ../compose-base.yml name: fluentd-elasticsearch diff --git a/deployment/docker/victorialogs/fluentd/jsonline/compose.yml b/deployment/docker/victorialogs/fluentd/jsonline/compose.yml index efe3cb825..f99e29462 100644 --- a/deployment/docker/victorialogs/fluentd/jsonline/compose.yml +++ b/deployment/docker/victorialogs/fluentd/jsonline/compose.yml @@ -1,3 +1,3 @@ include: - - ../compose.yml + - ../compose-base.yml name: fluentd-jsonline diff --git a/deployment/docker/victorialogs/fluentd/loki/compose.yml b/deployment/docker/victorialogs/fluentd/loki/compose.yml index 1627ba043..9cf140127 100644 --- a/deployment/docker/victorialogs/fluentd/loki/compose.yml +++ b/deployment/docker/victorialogs/fluentd/loki/compose.yml @@ -1,3 +1,3 @@ include: - - ../compose.yml + - ../compose-base.yml name: fluentbit-loki diff --git a/deployment/docker/victorialogs/fluentd/syslog/compose.yml b/deployment/docker/victorialogs/fluentd/syslog/compose.yml index e9e4e82da..d6b2c9656 100644 --- a/deployment/docker/victorialogs/fluentd/syslog/compose.yml +++ b/deployment/docker/victorialogs/fluentd/syslog/compose.yml @@ -1,3 +1,3 @@ include: - - ../compose.yml + - ../compose-base.yml name: fluentbit-syslog diff --git a/deployment/docker/victorialogs/logstash/compose.yml b/deployment/docker/victorialogs/logstash/compose-base.yml similarity index 94% rename from deployment/docker/victorialogs/logstash/compose.yml rename to deployment/docker/victorialogs/logstash/compose-base.yml index 4263a392c..8f0ac156d 100644 --- a/deployment/docker/victorialogs/logstash/compose.yml +++ b/deployment/docker/victorialogs/logstash/compose-base.yml @@ -1,5 +1,5 @@ include: - - ../compose.yml + - ../compose-base.yml services: logstash: build: diff --git a/deployment/docker/victorialogs/logstash/elasticsearch/compose.yml b/deployment/docker/victorialogs/logstash/elasticsearch/compose.yml index 79399ecc2..2de18276b 100644 --- a/deployment/docker/victorialogs/logstash/elasticsearch/compose.yml +++ b/deployment/docker/victorialogs/logstash/elasticsearch/compose.yml @@ -1,3 +1,3 @@ include: - - ../compose.yml + - ../compose-base.yml name: logstash-elasticsearch diff --git a/deployment/docker/victorialogs/logstash/jsonline-ha/compose.yml b/deployment/docker/victorialogs/logstash/jsonline-ha/compose.yml index d63fa78c0..80a9dae0d 100644 --- a/deployment/docker/victorialogs/logstash/jsonline-ha/compose.yml +++ b/deployment/docker/victorialogs/logstash/jsonline-ha/compose.yml @@ -1,5 +1,5 @@ include: - path: - - ../compose.yml + - ../compose-base.yml - ../../compose-ha.yml name: logstash-jsonline-ha diff --git a/deployment/docker/victorialogs/logstash/jsonline/compose.yml b/deployment/docker/victorialogs/logstash/jsonline/compose.yml index 11d4a0548..b0a1849b1 100644 --- a/deployment/docker/victorialogs/logstash/jsonline/compose.yml +++ b/deployment/docker/victorialogs/logstash/jsonline/compose.yml @@ -1,3 +1,3 @@ include: - - ../compose.yml + - ../compose-base.yml name: logstash-jsonline diff --git a/deployment/docker/victorialogs/logstash/loki/compose.yml b/deployment/docker/victorialogs/logstash/loki/compose.yml index 9e3249883..e312b61ac 100644 --- a/deployment/docker/victorialogs/logstash/loki/compose.yml +++ b/deployment/docker/victorialogs/logstash/loki/compose.yml @@ -1,3 +1,3 @@ include: - - ../compose.yml + - ../compose-base.yml name: logstash-loki diff --git a/deployment/docker/victorialogs/opentelemetry-collector/compose.yml b/deployment/docker/victorialogs/opentelemetry-collector/compose-base.yml similarity index 94% rename from deployment/docker/victorialogs/opentelemetry-collector/compose.yml rename to deployment/docker/victorialogs/opentelemetry-collector/compose-base.yml index 794f2382b..16e43eef8 100644 --- a/deployment/docker/victorialogs/opentelemetry-collector/compose.yml +++ b/deployment/docker/victorialogs/opentelemetry-collector/compose-base.yml @@ -1,5 +1,5 @@ include: - - ../compose.yml + - ../compose-base.yml services: collector: image: docker.io/otel/opentelemetry-collector-contrib:0.108.0 diff --git a/deployment/docker/victorialogs/opentelemetry-collector/elasticsearch-ha/compose.yml b/deployment/docker/victorialogs/opentelemetry-collector/elasticsearch-ha/compose.yml index 6fc7eafd6..e8c3de276 100644 --- a/deployment/docker/victorialogs/opentelemetry-collector/elasticsearch-ha/compose.yml +++ b/deployment/docker/victorialogs/opentelemetry-collector/elasticsearch-ha/compose.yml @@ -1,5 +1,5 @@ include: - path: - - ../compose.yml + - ../compose-base.yml - ../../compose-ha.yml name: collector-elasticsearch-ha diff --git a/deployment/docker/victorialogs/opentelemetry-collector/elasticsearch/compose.yml b/deployment/docker/victorialogs/opentelemetry-collector/elasticsearch/compose.yml index 6d8c4be2d..400e6ef82 100644 --- a/deployment/docker/victorialogs/opentelemetry-collector/elasticsearch/compose.yml +++ b/deployment/docker/victorialogs/opentelemetry-collector/elasticsearch/compose.yml @@ -1,3 +1,3 @@ include: - - ../compose.yml + - ../compose-base.yml name: collector-elasticsearch diff --git a/deployment/docker/victorialogs/opentelemetry-collector/loki/compose.yml b/deployment/docker/victorialogs/opentelemetry-collector/loki/compose.yml index 865979e9b..51d822b84 100644 --- a/deployment/docker/victorialogs/opentelemetry-collector/loki/compose.yml +++ b/deployment/docker/victorialogs/opentelemetry-collector/loki/compose.yml @@ -1,3 +1,3 @@ include: - - ../compose.yml + - ../compose-base.yml name: collector-loki diff --git a/deployment/docker/victorialogs/opentelemetry-collector/otlp/compose.yml b/deployment/docker/victorialogs/opentelemetry-collector/otlp/compose.yml index 9dcaed9be..2a2fde05e 100644 --- a/deployment/docker/victorialogs/opentelemetry-collector/otlp/compose.yml +++ b/deployment/docker/victorialogs/opentelemetry-collector/otlp/compose.yml @@ -1,3 +1,3 @@ include: - - ../compose.yml + - ../compose-base.yml name: collector-otlp diff --git a/deployment/docker/victorialogs/opentelemetry-collector/syslog/compose.yml b/deployment/docker/victorialogs/opentelemetry-collector/syslog/compose.yml index b87ea641e..f5e58d293 100644 --- a/deployment/docker/victorialogs/opentelemetry-collector/syslog/compose.yml +++ b/deployment/docker/victorialogs/opentelemetry-collector/syslog/compose.yml @@ -1,3 +1,3 @@ include: - - ../compose.yml + - ../compose-base.yml name: collector-syslog diff --git a/deployment/docker/victorialogs/promtail/compose.yml b/deployment/docker/victorialogs/promtail/compose-base.yml similarity index 93% rename from deployment/docker/victorialogs/promtail/compose.yml rename to deployment/docker/victorialogs/promtail/compose-base.yml index 01d8e01d4..da25f0f1e 100644 --- a/deployment/docker/victorialogs/promtail/compose.yml +++ b/deployment/docker/victorialogs/promtail/compose-base.yml @@ -1,5 +1,5 @@ include: - - ../compose.yml + - ../compose-base.yml services: promtail: image: grafana/promtail:3.0.1 diff --git a/deployment/docker/victorialogs/promtail/loki/compose.yml b/deployment/docker/victorialogs/promtail/loki/compose.yml index 5ee00fa08..a229023a9 100644 --- a/deployment/docker/victorialogs/promtail/loki/compose.yml +++ b/deployment/docker/victorialogs/promtail/loki/compose.yml @@ -1,3 +1,3 @@ include: - - ../compose.yml + - ../compose-base.yml name: promtail-elasticsearch diff --git a/deployment/docker/victorialogs/telegraf/compose.yml b/deployment/docker/victorialogs/telegraf/compose-base.yml similarity index 95% rename from deployment/docker/victorialogs/telegraf/compose.yml rename to deployment/docker/victorialogs/telegraf/compose-base.yml index 3132712ed..2851c274a 100644 --- a/deployment/docker/victorialogs/telegraf/compose.yml +++ b/deployment/docker/victorialogs/telegraf/compose-base.yml @@ -1,5 +1,5 @@ include: - - ../compose.yml + - ../compose-base.yml services: telegraf: image: bitnami/telegraf:1.31.3 diff --git a/deployment/docker/victorialogs/telegraf/elasticsearch/compose.yml b/deployment/docker/victorialogs/telegraf/elasticsearch/compose.yml index e9285fa03..3c9d9d863 100644 --- a/deployment/docker/victorialogs/telegraf/elasticsearch/compose.yml +++ b/deployment/docker/victorialogs/telegraf/elasticsearch/compose.yml @@ -1,3 +1,3 @@ include: - - ../compose.yml + - ../compose-base.yml name: telegraf-elasticsearch diff --git a/deployment/docker/victorialogs/telegraf/jsonline/compose.yml b/deployment/docker/victorialogs/telegraf/jsonline/compose.yml index 68d7844a0..bb8bf05cc 100644 --- a/deployment/docker/victorialogs/telegraf/jsonline/compose.yml +++ b/deployment/docker/victorialogs/telegraf/jsonline/compose.yml @@ -1,3 +1,3 @@ include: - - ../compose.yml + - ../compose-base.yml name: telegraf-jsonline diff --git a/deployment/docker/victorialogs/telegraf/loki/compose.yml b/deployment/docker/victorialogs/telegraf/loki/compose.yml index 470a80a0a..1f99a2501 100644 --- a/deployment/docker/victorialogs/telegraf/loki/compose.yml +++ b/deployment/docker/victorialogs/telegraf/loki/compose.yml @@ -1,3 +1,3 @@ include: - - ../compose.yml + - ../compose-base.yml name: telegraf-loki diff --git a/deployment/docker/victorialogs/telegraf/syslog/compose.yml b/deployment/docker/victorialogs/telegraf/syslog/compose.yml index 698adb2a9..2ee27c969 100644 --- a/deployment/docker/victorialogs/telegraf/syslog/compose.yml +++ b/deployment/docker/victorialogs/telegraf/syslog/compose.yml @@ -1,3 +1,3 @@ include: - - ../compose.yml + - ../compose-base.yml name: telegraf-syslog diff --git a/deployment/docker/victorialogs/vector/compose.yml b/deployment/docker/victorialogs/vector/compose-base.yml similarity index 95% rename from deployment/docker/victorialogs/vector/compose.yml rename to deployment/docker/victorialogs/vector/compose-base.yml index 9c9c117d7..bc035bef7 100644 --- a/deployment/docker/victorialogs/vector/compose.yml +++ b/deployment/docker/victorialogs/vector/compose-base.yml @@ -1,5 +1,5 @@ include: - - ../compose.yml + - ../compose-base.yml services: vector: image: docker.io/timberio/vector:0.40.0-distroless-static diff --git a/deployment/docker/victorialogs/vector/elasticsearch/compose.yaml b/deployment/docker/victorialogs/vector/elasticsearch/compose.yaml index bbb51e727..3e284ce3b 100644 --- a/deployment/docker/victorialogs/vector/elasticsearch/compose.yaml +++ b/deployment/docker/victorialogs/vector/elasticsearch/compose.yaml @@ -1,3 +1,3 @@ include: - - ../compose.yml + - ../compose-base.yml name: vector-elasticsearch diff --git a/deployment/docker/victorialogs/vector/jsonline-ha/compose.yml b/deployment/docker/victorialogs/vector/jsonline-ha/compose.yml index 7d873452b..cb5d3dc41 100644 --- a/deployment/docker/victorialogs/vector/jsonline-ha/compose.yml +++ b/deployment/docker/victorialogs/vector/jsonline-ha/compose.yml @@ -1,5 +1,5 @@ include: - path: - - ../compose.yml + - ../compose-base.yml - ../../compose-ha.yml name: vector-jsonline-ha diff --git a/deployment/docker/victorialogs/vector/jsonline/compose.yml b/deployment/docker/victorialogs/vector/jsonline/compose.yml index 10a44b140..ac6778e4f 100644 --- a/deployment/docker/victorialogs/vector/jsonline/compose.yml +++ b/deployment/docker/victorialogs/vector/jsonline/compose.yml @@ -1,3 +1,3 @@ include: - - ../compose.yml + - ../compose-base.yml name: vector-jsonline diff --git a/deployment/docker/victorialogs/vector/loki/compose.yml b/deployment/docker/victorialogs/vector/loki/compose.yml index 433c2bf9a..708e61097 100644 --- a/deployment/docker/victorialogs/vector/loki/compose.yml +++ b/deployment/docker/victorialogs/vector/loki/compose.yml @@ -1,3 +1,3 @@ include: - - ../compose.yml + - ../compose-base.yml name: vector-loki From 94afcbd9a93279610e90adb89e0a33bd12bfe77e Mon Sep 17 00:00:00 2001 From: Aliaksandr Valialkin Date: Sun, 29 Sep 2024 10:16:14 +0200 Subject: [PATCH 16/31] lib/logstorage: postpone initialization of per-shard stateSizeBudget until the first call to pipeProcessor.writeBlock() This simplifies pipeProcessor initialization logic a bit. This also doesn't mangle the original maxStateSize value, which is used in error messages when the state size exceeds maxStateSize. --- lib/logstorage/pipe_sort.go | 4 +--- lib/logstorage/pipe_sort_topk.go | 4 +--- lib/logstorage/pipe_stats.go | 3 --- lib/logstorage/pipe_stream_context.go | 4 +--- lib/logstorage/pipe_top.go | 4 +--- lib/logstorage/pipe_uniq.go | 4 +--- 6 files changed, 5 insertions(+), 18 deletions(-) diff --git a/lib/logstorage/pipe_sort.go b/lib/logstorage/pipe_sort.go index f14b30c6f..cffb12c56 100644 --- a/lib/logstorage/pipe_sort.go +++ b/lib/logstorage/pipe_sort.go @@ -116,11 +116,9 @@ func newPipeSortProcessor(ps *pipeSort, workersCount int, stopCh <-chan struct{} for i := range shards { shards[i] = pipeSortProcessorShard{ pipeSortProcessorShardNopad: pipeSortProcessorShardNopad{ - ps: ps, - stateSizeBudget: stateSizeBudgetChunk, + ps: ps, }, } - maxStateSize -= stateSizeBudgetChunk } psp := &pipeSortProcessor{ diff --git a/lib/logstorage/pipe_sort_topk.go b/lib/logstorage/pipe_sort_topk.go index 5a25b3444..ccccd6e0f 100644 --- a/lib/logstorage/pipe_sort_topk.go +++ b/lib/logstorage/pipe_sort_topk.go @@ -20,11 +20,9 @@ func newPipeTopkProcessor(ps *pipeSort, workersCount int, stopCh <-chan struct{} for i := range shards { shards[i] = pipeTopkProcessorShard{ pipeTopkProcessorShardNopad: pipeTopkProcessorShardNopad{ - ps: ps, - stateSizeBudget: stateSizeBudgetChunk, + ps: ps, }, } - maxStateSize -= stateSizeBudgetChunk } ptp := &pipeTopkProcessor{ diff --git a/lib/logstorage/pipe_stats.go b/lib/logstorage/pipe_stats.go index 7946efd1d..0f44f2403 100644 --- a/lib/logstorage/pipe_stats.go +++ b/lib/logstorage/pipe_stats.go @@ -162,11 +162,8 @@ func (ps *pipeStats) newPipeProcessor(workersCount int, stopCh <-chan struct{}, shards[i] = pipeStatsProcessorShard{ pipeStatsProcessorShardNopad: pipeStatsProcessorShardNopad{ ps: ps, - - stateSizeBudget: stateSizeBudgetChunk, }, } - maxStateSize -= stateSizeBudgetChunk } psp := &pipeStatsProcessor{ diff --git a/lib/logstorage/pipe_stream_context.go b/lib/logstorage/pipe_stream_context.go index 06a86c39d..09400bdf5 100644 --- a/lib/logstorage/pipe_stream_context.go +++ b/lib/logstorage/pipe_stream_context.go @@ -74,11 +74,9 @@ func (pc *pipeStreamContext) newPipeProcessor(workersCount int, stopCh <-chan st for i := range shards { shards[i] = pipeStreamContextProcessorShard{ pipeStreamContextProcessorShardNopad: pipeStreamContextProcessorShardNopad{ - pc: pc, - stateSizeBudget: stateSizeBudgetChunk, + pc: pc, }, } - maxStateSize -= stateSizeBudgetChunk } pcp := &pipeStreamContextProcessor{ diff --git a/lib/logstorage/pipe_top.go b/lib/logstorage/pipe_top.go index 6230ad161..57c684fa5 100644 --- a/lib/logstorage/pipe_top.go +++ b/lib/logstorage/pipe_top.go @@ -79,11 +79,9 @@ func (pt *pipeTop) newPipeProcessor(workersCount int, stopCh <-chan struct{}, ca for i := range shards { shards[i] = pipeTopProcessorShard{ pipeTopProcessorShardNopad: pipeTopProcessorShardNopad{ - pt: pt, - stateSizeBudget: stateSizeBudgetChunk, + pt: pt, }, } - maxStateSize -= stateSizeBudgetChunk } ptp := &pipeTopProcessor{ diff --git a/lib/logstorage/pipe_uniq.go b/lib/logstorage/pipe_uniq.go index ef1b2985f..731d88862 100644 --- a/lib/logstorage/pipe_uniq.go +++ b/lib/logstorage/pipe_uniq.go @@ -74,11 +74,9 @@ func (pu *pipeUniq) newPipeProcessor(workersCount int, stopCh <-chan struct{}, c for i := range shards { shards[i] = pipeUniqProcessorShard{ pipeUniqProcessorShardNopad: pipeUniqProcessorShardNopad{ - pu: pu, - stateSizeBudget: stateSizeBudgetChunk, + pu: pu, }, } - maxStateSize -= stateSizeBudgetChunk } pup := &pipeUniqProcessor{ From 55eb321f77f424da6e7820ae6915e3576dcd520e Mon Sep 17 00:00:00 2001 From: Aliaksandr Valialkin Date: Sun, 29 Sep 2024 10:27:33 +0200 Subject: [PATCH 17/31] lib/logstorage: clear hits slice obtained from encoding.GetUint64s() before updating it with hits for valueTypeDict column encoding.GetUint64s() returns uninitialized slice, which may contain arbitrary values. So values in this slice must be reset to zero before using it for counting hits in `uniq` and `top` pipes. --- docs/VictoriaLogs/CHANGELOG.md | 2 ++ lib/logstorage/pipe_top.go | 1 + lib/logstorage/pipe_uniq.go | 1 + 3 files changed, 4 insertions(+) diff --git a/docs/VictoriaLogs/CHANGELOG.md b/docs/VictoriaLogs/CHANGELOG.md index 5b0e97032..396c5b5cd 100644 --- a/docs/VictoriaLogs/CHANGELOG.md +++ b/docs/VictoriaLogs/CHANGELOG.md @@ -19,6 +19,8 @@ according to [these docs](https://docs.victoriametrics.com/victorialogs/quicksta * FEATURE: [`sort` pipe](https://docs.victoriametrics.com/victorialogs/logsql/#sort-pipe): allow using `order` alias instead of `sort`. For example, `_time:5s | order by (_time)` query works the same as `_time:5s | sort by (_time)`. * FEATURE: [`stats` pipe](https://docs.victoriametrics.com/victorialogs/logsql/#stats-pipe): allow using multiple identical [stats functions](https://docs.victoriametrics.com/victorialogs/logsql/#stats-pipe-functions) with distinct [filters](https://docs.victoriametrics.com/victorialogs/logsql/#stats-with-additional-filters) and automatically generated result names. For example, `_time:5m | count(), count() if (error)` query works as expected now, e.g. it returns two results over the last 5 minutes: the total number of logs and the number of logs with `error` [word](https://docs.victoriametrics.com/victorialogs/logsql/#word). Previously this query couldn't be executed because the `if (...)` condition wasn't included in the automatically generate result name, so both results had the same name - `count(*)`. +* BUGFIX: properly calculate [`uniq`](https://docs.victoriametrics.com/victorialogs/logsql/#uniq-pipe) and [`top`](https://docs.victoriametrics.com/victorialogs/logsql/#top-pipe) pipes. Previously they could return invalid results in some cases. + ## [v0.31.0](https://github.com/VictoriaMetrics/VictoriaMetrics/releases/tag/v0.31.0-victorialogs) Released at 2024-09-27 diff --git a/lib/logstorage/pipe_top.go b/lib/logstorage/pipe_top.go index 57c684fa5..034038b0a 100644 --- a/lib/logstorage/pipe_top.go +++ b/lib/logstorage/pipe_top.go @@ -166,6 +166,7 @@ func (shard *pipeTopProcessorShard) writeBlock(br *blockResult) { if c.valueType == valueTypeDict { a := encoding.GetUint64s(len(c.dictValues)) hits := a.A + clear(hits) valuesEncoded := c.getValuesEncoded(br) for _, v := range valuesEncoded { idx := unmarshalUint8(v) diff --git a/lib/logstorage/pipe_uniq.go b/lib/logstorage/pipe_uniq.go index 731d88862..2292fe127 100644 --- a/lib/logstorage/pipe_uniq.go +++ b/lib/logstorage/pipe_uniq.go @@ -169,6 +169,7 @@ func (shard *pipeUniqProcessorShard) writeBlock(br *blockResult) bool { if needHits { a := encoding.GetUint64s(len(c.dictValues)) hits := a.A + clear(hits) valuesEncoded := c.getValuesEncoded(br) for _, v := range valuesEncoded { idx := unmarshalUint8(v) From b52862badfad26e0f4006f761b7807913714a37a Mon Sep 17 00:00:00 2001 From: Aliaksandr Valialkin Date: Sun, 29 Sep 2024 10:50:25 +0200 Subject: [PATCH 18/31] lib/logstorage: return the expected `hits` results from `uniq` pipe when the number of unique values reaches the specified limit Previously `uniq` pipe could return zero `hits` if the number of found unique values equals the specified limit. This wasn't expected in most cases. --- lib/logstorage/pipe_uniq.go | 4 ++-- lib/logstorage/pipe_uniq_test.go | 32 +++++++++++++++++++++++++-- lib/logstorage/stats_count_uniq.go | 2 +- lib/logstorage/stats_uniq_values.go | 2 +- lib/logstorage/stats_values.go | 2 +- lib/logstorage/storage_search_test.go | 6 ++--- 6 files changed, 38 insertions(+), 10 deletions(-) diff --git a/lib/logstorage/pipe_uniq.go b/lib/logstorage/pipe_uniq.go index 2292fe127..c33cfc7f0 100644 --- a/lib/logstorage/pipe_uniq.go +++ b/lib/logstorage/pipe_uniq.go @@ -135,7 +135,7 @@ type pipeUniqProcessorShardNopad struct { // // It returns false if the block cannot be written because of the exceeded limit. func (shard *pipeUniqProcessorShard) writeBlock(br *blockResult) bool { - if limit := shard.pu.limit; limit > 0 && uint64(len(shard.m)) >= limit { + if limit := shard.pu.limit; limit > 0 && uint64(len(shard.m)) > limit { return false } @@ -301,7 +301,7 @@ func (pup *pipeUniqProcessor) flush() error { // There is little sense in returning partial hits when the limit on the number of unique entries is reached. // It is better from UX experience is to return zero hits instead. - resetHits := pup.pu.limit > 0 && uint64(len(m)) >= pup.pu.limit + resetHits := pup.pu.limit > 0 && uint64(len(m)) > pup.pu.limit // write result wctx := &pipeUniqWriteContext{ diff --git a/lib/logstorage/pipe_uniq_test.go b/lib/logstorage/pipe_uniq_test.go index 3c1cb7372..f3f61effd 100644 --- a/lib/logstorage/pipe_uniq_test.go +++ b/lib/logstorage/pipe_uniq_test.go @@ -114,13 +114,41 @@ func TestPipeUniq(t *testing.T) { { {"a", "2"}, {"b", "3"}, - {"hits", "0"}, + {"hits", "2"}, }, { {"a", `2`}, {"b", `54`}, {"c", "d"}, - {"hits", "0"}, + {"hits", "1"}, + }, + }) + + f("uniq hits limit 3", [][]Field{ + { + {"a", `2`}, + {"b", `3`}, + }, + { + {"a", "2"}, + {"b", "3"}, + }, + { + {"a", `2`}, + {"b", `54`}, + {"c", "d"}, + }, + }, [][]Field{ + { + {"a", "2"}, + {"b", "3"}, + {"hits", "2"}, + }, + { + {"a", `2`}, + {"b", `54`}, + {"c", "d"}, + {"hits", "1"}, }, }) diff --git a/lib/logstorage/stats_count_uniq.go b/lib/logstorage/stats_count_uniq.go index b7aa87e4e..42a71a03f 100644 --- a/lib/logstorage/stats_count_uniq.go +++ b/lib/logstorage/stats_count_uniq.go @@ -355,7 +355,7 @@ func (sup *statsCountUniqProcessor) updateState(v []byte) int { func (sup *statsCountUniqProcessor) limitReached() bool { limit := sup.su.limit - return limit > 0 && uint64(len(sup.m)) >= limit + return limit > 0 && uint64(len(sup.m)) > limit } func parseStatsCountUniq(lex *lexer) (*statsCountUniq, error) { diff --git a/lib/logstorage/stats_uniq_values.go b/lib/logstorage/stats_uniq_values.go index a266b2c02..25417efc9 100644 --- a/lib/logstorage/stats_uniq_values.go +++ b/lib/logstorage/stats_uniq_values.go @@ -215,7 +215,7 @@ func (sup *statsUniqValuesProcessor) updateState(v string) int { func (sup *statsUniqValuesProcessor) limitReached() bool { limit := sup.su.limit - return limit > 0 && uint64(len(sup.m)) >= limit + return limit > 0 && uint64(len(sup.m)) > limit } func marshalJSONArray(items []string) string { diff --git a/lib/logstorage/stats_values.go b/lib/logstorage/stats_values.go index aab5475d5..eb9c100de 100644 --- a/lib/logstorage/stats_values.go +++ b/lib/logstorage/stats_values.go @@ -184,7 +184,7 @@ func (svp *statsValuesProcessor) finalizeStats() string { func (svp *statsValuesProcessor) limitReached() bool { limit := svp.sv.limit - return limit > 0 && uint64(len(svp.values)) >= limit + return limit > 0 && uint64(len(svp.values)) > limit } func parseStatsValues(lex *lexer) (*statsValues, error) { diff --git a/lib/logstorage/storage_search_test.go b/lib/logstorage/storage_search_test.go index 4fd7ed0ac..35530309e 100644 --- a/lib/logstorage/storage_search_test.go +++ b/lib/logstorage/storage_search_test.go @@ -384,9 +384,9 @@ func TestStorageRunQuery(t *testing.T) { } resultsExpected := []ValueWithHits{ - {`{instance="host-0:234",job="foobar"}`, 0}, - {`{instance="host-1:234",job="foobar"}`, 0}, - {`{instance="host-2:234",job="foobar"}`, 0}, + {`{instance="host-0:234",job="foobar"}`, 385}, + {`{instance="host-1:234",job="foobar"}`, 385}, + {`{instance="host-2:234",job="foobar"}`, 385}, } if !reflect.DeepEqual(results, resultsExpected) { t.Fatalf("unexpected result; got\n%v\nwant\n%v", results, resultsExpected) From 3bbb2aed7255666da611a91fc9e03915acea9d78 Mon Sep 17 00:00:00 2001 From: Nikolay Date: Sun, 29 Sep 2024 10:59:25 +0200 Subject: [PATCH 19/31] fscore: rollback trailing space trim (#7106) Previous commit 201fd6de1eb0dd03cf5c24787d6a550d07b1390a removed trailing space trim from data read from file. But common practice is to remove such trailing space. And it leaded to the authorization errors for the major group of users. In first place, this change must help to mitigate an issue with kubernetes. When authorization information was read from Secret content. Changes to the operator was made to mitigate such problem at commit https://github.com/VictoriaMetrics/operator/commit/1cf64358c8dd3963d0233b6c966de149ad7d522c We could introduce later optional flag for VictoriaMetrics to disable trim space behavior. Related issues: https://github.com/VictoriaMetrics/VictoriaMetrics/issues/6986 https://github.com/VictoriaMetrics/VictoriaMetrics/issues/7089 https://github.com/VictoriaMetrics/VictoriaMetrics/issues/6947 --------- Signed-off-by: f41gh7 Co-authored-by: Zhu Jiekun --- docs/changelog/CHANGELOG.md | 1 + lib/flagutil/password_test.go | 4 ++-- lib/fs/fscore/fscore.go | 5 ++++- 3 files changed, 7 insertions(+), 3 deletions(-) diff --git a/docs/changelog/CHANGELOG.md b/docs/changelog/CHANGELOG.md index a36f4bb5d..c8808af14 100644 --- a/docs/changelog/CHANGELOG.md +++ b/docs/changelog/CHANGELOG.md @@ -51,6 +51,7 @@ See also [LTS releases](https://docs.victoriametrics.com/lts-releases/). * BUGFIX: [MetricsQL](https://docs.victoriametrics.com/metricsql/): consistently return the first non-`NaN` value from [`range_first`](https://docs.victoriametrics.com/metricsql/#range_first) function across all the returned data points. Previously `NaN` data points weren't replaced with the first non-`NaN` value. * BUGFIX: [MetricsQL](https://docs.victoriametrics.com/metricsql/): consistently return the last non-`NaN` value from [`range_last`](https://docs.victoriametrics.com/metricsql/#range_last) function across all the returned data points. Previously `NaN` data points weren't replaced with the last non-`NaN` value. * BUGFIX: all VictoriaMetrics components: increase default value of `-loggerMaxArgLen` cmd-line flag from 1000 to 5000. This should improve visibility on errors produced by very long queries. +* BUGFIX: all VictoriaMetrics components: trim trailing spaces when reading content from `*.passwordFile` and similar flags. It reverts changes introduced at [v1.102.0-rc2](https://github.com/VictoriaMetrics/VictoriaMetrics/releases/tag/v1.102.0-rc2) release. See [this issue](https://github.com/VictoriaMetrics/VictoriaMetrics/issues/6986) for details. ## [v1.103.0](https://github.com/VictoriaMetrics/VictoriaMetrics/releases/tag/v1.103.0) diff --git a/lib/flagutil/password_test.go b/lib/flagutil/password_test.go index e7a03c2a1..8a9583406 100644 --- a/lib/flagutil/password_test.go +++ b/lib/flagutil/password_test.go @@ -32,7 +32,7 @@ func TestPassword(t *testing.T) { // read the password from file by relative path localPassFile := "testdata/password.txt" - expectedPassword = "foo-bar-baz\n\n\n" + expectedPassword = "foo-bar-baz" path := "file://" + localPassFile if err := p.Set(path); err != nil { t.Fatalf("cannot set password to file: %s", err) @@ -52,7 +52,7 @@ func TestPassword(t *testing.T) { if err != nil { t.Fatalf("unexpected error: %s", err) } - expectedPassword = "foo-bar-baz\n\n\n" + expectedPassword = "foo-bar-baz" path = "file://" + localPassFile if err := p.Set(path); err != nil { t.Fatalf("unexpected error: %s", err) diff --git a/lib/fs/fscore/fscore.go b/lib/fs/fscore/fscore.go index 03cc37562..b67028203 100644 --- a/lib/fs/fscore/fscore.go +++ b/lib/fs/fscore/fscore.go @@ -7,6 +7,8 @@ import ( "net/url" "os" "path/filepath" + "strings" + "unicode" ) // ReadPasswordFromFileOrHTTP reads password for the give path. @@ -17,7 +19,8 @@ func ReadPasswordFromFileOrHTTP(path string) (string, error) { if err != nil { return "", err } - return string(data), nil + pass := strings.TrimRightFunc(string(data), unicode.IsSpace) + return pass, nil } // ReadFileOrHTTP reads path either from local filesystem or from http if path starts with http or https. From 60183c7c7971dc780f4ea366f5f3d9a46ae71105 Mon Sep 17 00:00:00 2001 From: Aliaksandr Valialkin Date: Sun, 29 Sep 2024 11:12:22 +0200 Subject: [PATCH 20/31] lib/logstorage: allow using `-` instead of `!` in front of `(...)` --- lib/logstorage/parser.go | 2 +- lib/logstorage/parser_test.go | 2 ++ 2 files changed, 3 insertions(+), 1 deletion(-) diff --git a/lib/logstorage/parser.go b/lib/logstorage/parser.go index 2ec250030..ca4dcc45b 100644 --- a/lib/logstorage/parser.go +++ b/lib/logstorage/parser.go @@ -840,7 +840,7 @@ func parseGenericFilter(lex *lexer, fieldName string) (filter, error) { } return f, nil case lex.isKeyword("("): - if !lex.isSkippedSpace && !lex.isPrevToken("", ":", "(", "!", "not") { + if !lex.isSkippedSpace && !lex.isPrevToken("", ":", "(", "!", "-", "not") { return nil, fmt.Errorf("missing whitespace before the search word %q", lex.prevToken) } return parseParensFilter(lex, fieldName) diff --git a/lib/logstorage/parser_test.go b/lib/logstorage/parser_test.go index 359347704..36cf65da6 100644 --- a/lib/logstorage/parser_test.go +++ b/lib/logstorage/parser_test.go @@ -646,6 +646,8 @@ func TestParseQuerySuccess(t *testing.T) { f(`not(foo)`, `!foo`) f(`not (foo)`, `!foo`) f(`not ( foo or bar )`, `!(foo or bar)`) + f(`!(foo or bar)`, `!(foo or bar)`) + f(`-(foo or bar)`, `!(foo or bar)`) f(`foo:!""`, `!foo:""`) f("_msg:foo", "foo") f("'foo:bar'", `"foo:bar"`) From 1da4650143e64a241ee343ccf21b7c972f36f921 Mon Sep 17 00:00:00 2001 From: Aliaksandr Valialkin Date: Sun, 29 Sep 2024 11:14:12 +0200 Subject: [PATCH 21/31] lib/logstorage: allow using `!` in unescaped phrase Previously the phrase filter with `!` was treated unexpectedly. For example, `foo!bar` filter was treated at `foo AND NOT bar`, while most users expect that it matches "foo!bar" phrase. This commit aligns with users' expectations. --- lib/logstorage/parser.go | 6 +++--- lib/logstorage/parser_test.go | 4 ++-- 2 files changed, 5 insertions(+), 5 deletions(-) diff --git a/lib/logstorage/parser.go b/lib/logstorage/parser.go index ca4dcc45b..d4970c6d2 100644 --- a/lib/logstorage/parser.go +++ b/lib/logstorage/parser.go @@ -889,7 +889,7 @@ func parseGenericFilter(lex *lexer, fieldName string) (filter, error) { } func getCompoundPhrase(lex *lexer, allowColon bool) (string, error) { - stopTokens := []string{"*", ",", "(", ")", "[", "]", "|", "!", ""} + stopTokens := []string{"*", ",", "(", ")", "[", "]", "|", ""} if lex.isKeyword(stopTokens...) { return "", fmt.Errorf("compound phrase cannot start with '%s'", lex.token) } @@ -906,7 +906,7 @@ func getCompoundPhrase(lex *lexer, allowColon bool) (string, error) { func getCompoundSuffix(lex *lexer, allowColon bool) string { s := "" - stopTokens := []string{"*", ",", "(", ")", "[", "]", "|", "!", ""} + stopTokens := []string{"*", ",", "(", ")", "[", "]", "|", ""} if !allowColon { stopTokens = append(stopTokens, ":") } @@ -918,7 +918,7 @@ func getCompoundSuffix(lex *lexer, allowColon bool) string { } func getCompoundToken(lex *lexer) (string, error) { - stopTokens := []string{",", "(", ")", "[", "]", "|", "!", ""} + stopTokens := []string{",", "(", ")", "[", "]", "|", ""} if lex.isKeyword(stopTokens...) { return "", fmt.Errorf("compound token cannot start with '%s'", lex.token) } diff --git a/lib/logstorage/parser_test.go b/lib/logstorage/parser_test.go index 36cf65da6..853f380c7 100644 --- a/lib/logstorage/parser_test.go +++ b/lib/logstorage/parser_test.go @@ -946,8 +946,8 @@ func TestParseQuerySuccess(t *testing.T) { f("foo-bar+baz*", `"foo-bar+baz"*`) f("foo- bar", `"foo-" bar`) f("foo -bar", `foo !bar`) - f("foo!bar", `foo !bar`) - f("foo:aa!bb:cc", `foo:aa !bb:cc`) + f("foo!bar", `"foo!bar"`) + f("foo:aa!bb:cc", `foo:"aa!bb:cc"`) f(`foo:bar:baz`, `foo:"bar:baz"`) f(`foo:(bar baz:xxx)`, `foo:bar foo:"baz:xxx"`) f(`foo:(_time:abc or not z)`, `foo:"_time:abc" or !foo:z`) From 45cfb6b526c0b52135fb81e1cc9a72fc51625601 Mon Sep 17 00:00:00 2001 From: Aliaksandr Valialkin Date: Sun, 29 Sep 2024 14:47:31 +0200 Subject: [PATCH 22/31] docs/VictoriaLogs/CHANGELOG.md: cut v0.32.0-victorialogs --- docs/VictoriaLogs/CHANGELOG.md | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/docs/VictoriaLogs/CHANGELOG.md b/docs/VictoriaLogs/CHANGELOG.md index 396c5b5cd..b6516630c 100644 --- a/docs/VictoriaLogs/CHANGELOG.md +++ b/docs/VictoriaLogs/CHANGELOG.md @@ -15,8 +15,12 @@ according to [these docs](https://docs.victoriametrics.com/victorialogs/quicksta ## tip -* FEATURE: [data ingestion](https://docs.victoriametrics.com/victorialogs/data-ingestion/): accept Unix timestamps in seconds in the ingested logs. -* FEATURE: [`sort` pipe](https://docs.victoriametrics.com/victorialogs/logsql/#sort-pipe): allow using `order` alias instead of `sort`. For example, `_time:5s | order by (_time)` query works the same as `_time:5s | sort by (_time)`. +## [v0.32.0](https://github.com/VictoriaMetrics/VictoriaMetrics/releases/tag/v0.32.0-victorialogs) + +Released at 2024-09-29 + +* FEATURE: [data ingestion](https://docs.victoriametrics.com/victorialogs/data-ingestion/): accept Unix timestamps in seconds in the ingested logs. This simplifies integration with systems, which prefer Unix timestamps over text-based representation of time. +* FEATURE: [`sort` pipe](https://docs.victoriametrics.com/victorialogs/logsql/#sort-pipe): allow using `order` alias instead of `sort`. For example, `_time:5s | order by (_time)` query works the same as `_time:5s | sort by (_time)`. This simplifies the to [LogsQL](https://docs.victoriametrics.com/victorialogs/logsql/) transition from SQL-like query languages. * FEATURE: [`stats` pipe](https://docs.victoriametrics.com/victorialogs/logsql/#stats-pipe): allow using multiple identical [stats functions](https://docs.victoriametrics.com/victorialogs/logsql/#stats-pipe-functions) with distinct [filters](https://docs.victoriametrics.com/victorialogs/logsql/#stats-with-additional-filters) and automatically generated result names. For example, `_time:5m | count(), count() if (error)` query works as expected now, e.g. it returns two results over the last 5 minutes: the total number of logs and the number of logs with `error` [word](https://docs.victoriametrics.com/victorialogs/logsql/#word). Previously this query couldn't be executed because the `if (...)` condition wasn't included in the automatically generate result name, so both results had the same name - `count(*)`. * BUGFIX: properly calculate [`uniq`](https://docs.victoriametrics.com/victorialogs/logsql/#uniq-pipe) and [`top`](https://docs.victoriametrics.com/victorialogs/logsql/#top-pipe) pipes. Previously they could return invalid results in some cases. From 2047ad20efd17914c11e370e81cfad4c944d83c2 Mon Sep 17 00:00:00 2001 From: Aliaksandr Valialkin Date: Sun, 29 Sep 2024 14:52:50 +0200 Subject: [PATCH 23/31] deployment: update VictoriaLogs docker image from v0.31.0-victorialogs to v0.32.0-victorialogs See https://github.com/VictoriaMetrics/VictoriaMetrics/releases/tag/v0.32.0-victorialogs --- deployment/docker/docker-compose-victorialogs.yml | 2 +- deployment/docker/victorialogs/compose-base.yml | 2 +- deployment/logs-benchmark/docker-compose.yml | 2 +- docs/VictoriaLogs/QuickStart.md | 6 +++--- 4 files changed, 6 insertions(+), 6 deletions(-) diff --git a/deployment/docker/docker-compose-victorialogs.yml b/deployment/docker/docker-compose-victorialogs.yml index 200f4cce7..ab276c155 100644 --- a/deployment/docker/docker-compose-victorialogs.yml +++ b/deployment/docker/docker-compose-victorialogs.yml @@ -40,7 +40,7 @@ services: # storing logs and serving read queries. victorialogs: container_name: victorialogs - image: docker.io/victoriametrics/victoria-logs:v0.31.0-victorialogs + image: docker.io/victoriametrics/victoria-logs:v0.32.0-victorialogs command: - "--storageDataPath=/vlogs" - "--httpListenAddr=:9428" diff --git a/deployment/docker/victorialogs/compose-base.yml b/deployment/docker/victorialogs/compose-base.yml index b67bb1582..33f1026b4 100644 --- a/deployment/docker/victorialogs/compose-base.yml +++ b/deployment/docker/victorialogs/compose-base.yml @@ -1,7 +1,7 @@ services: # meta service will be ignored by compose .victorialogs: - image: docker.io/victoriametrics/victoria-logs:v0.31.0-victorialogs + image: docker.io/victoriametrics/victoria-logs:v0.32.0-victorialogs command: - -storageDataPath=/vlogs - -loggerFormat=json diff --git a/deployment/logs-benchmark/docker-compose.yml b/deployment/logs-benchmark/docker-compose.yml index 6bc616512..a93ba84cb 100644 --- a/deployment/logs-benchmark/docker-compose.yml +++ b/deployment/logs-benchmark/docker-compose.yml @@ -3,7 +3,7 @@ version: '3' services: # Run `make package-victoria-logs` to build victoria-logs image vlogs: - image: docker.io/victoriametrics/victoria-logs:v0.31.0-victorialogs + image: docker.io/victoriametrics/victoria-logs:v0.32.0-victorialogs volumes: - vlogs:/vlogs ports: diff --git a/docs/VictoriaLogs/QuickStart.md b/docs/VictoriaLogs/QuickStart.md index 6fc31ad05..a78db8f13 100644 --- a/docs/VictoriaLogs/QuickStart.md +++ b/docs/VictoriaLogs/QuickStart.md @@ -33,8 +33,8 @@ Just download archive for the needed Operating system and architecture, unpack i For example, the following commands download VictoriaLogs archive for Linux/amd64, unpack and run it: ```sh -curl -L -O https://github.com/VictoriaMetrics/VictoriaMetrics/releases/download/v0.31.0-victorialogs/victoria-logs-linux-amd64-v0.31.0-victorialogs.tar.gz -tar xzf victoria-logs-linux-amd64-v0.31.0-victorialogs.tar.gz +curl -L -O https://github.com/VictoriaMetrics/VictoriaMetrics/releases/download/v0.32.0-victorialogs/victoria-logs-linux-amd64-v0.32.0-victorialogs.tar.gz +tar xzf victoria-logs-linux-amd64-v0.32.0-victorialogs.tar.gz ./victoria-logs-prod ``` @@ -58,7 +58,7 @@ Here is the command to run VictoriaLogs in a Docker container: ```sh docker run --rm -it -p 9428:9428 -v ./victoria-logs-data:/victoria-logs-data \ - docker.io/victoriametrics/victoria-logs:v0.31.0-victorialogs + docker.io/victoriametrics/victoria-logs:v0.32.0-victorialogs ``` See also: From 5e67e611b85be3716f39ba104916be897e6fdca2 Mon Sep 17 00:00:00 2001 From: Github Actions <133988544+victoriametrics-bot@users.noreply.github.com> Date: Sun, 29 Sep 2024 23:30:24 +0300 Subject: [PATCH 24/31] Automatic update operator docs from VictoriaMetrics/operator@0e44654 (#7136) Automated changes by [create-pull-request](https://github.com/peter-evans/create-pull-request) GitHub action Signed-off-by: Github Actions <133988544+victoriametrics-bot@users.noreply.github.com> Co-authored-by: f41gh7 <18450869+f41gh7@users.noreply.github.com> --- docs/operator/CHANGELOG.md | 6 ++++++ docs/operator/vars.md | 6 +++--- 2 files changed, 9 insertions(+), 3 deletions(-) diff --git a/docs/operator/CHANGELOG.md b/docs/operator/CHANGELOG.md index 88a4fa1fe..559fcf785 100644 --- a/docs/operator/CHANGELOG.md +++ b/docs/operator/CHANGELOG.md @@ -11,6 +11,12 @@ aliases: - /operator/changelog/index.html --- +## [v0.48.3](https://github.com/VictoriaMetrics/operator/releases/tag/v0.48.3) - 29 Sep 2024 + +- [vmcluster](https://docs.victoriametrics.com/operator/resources/vmcluster): properly apply global container registry from configuration. It was ignored for `VMCluster` since `v0.48.0` release. See [this issue](https://github.com/VictoriaMetrics/operator/issues/1118) for details. +- [operator](https://docs.victoriametrics.com/operator/): updates default vlogs app version to v0.32.0 +- [operator](https://docs.victoriametrics.com/operator/): adds new flag `--disableControllerForCRD`. It allows to disable reconcile controller for the given comma-separated list of CRD names. See [this issue](https://github.com/VictoriaMetrics/operator/issues/528) for details. + ## [v0.48.2](https://github.com/VictoriaMetrics/operator/releases/tag/v0.48.2) - 27 Sep 2024 - [operator](https://docs.victoriametrics.com/operator/): properly expose `vm_app_version` metric tag with `version` and `short_version` build info. It was broken since v0.46.0 release. diff --git a/docs/operator/vars.md b/docs/operator/vars.md index 9cf6278c2..d5d74dbde 100644 --- a/docs/operator/vars.md +++ b/docs/operator/vars.md @@ -10,7 +10,7 @@ aliases: - /operator/vars/index.html --- - updated at Fri Sep 27 13:40:34 UTC 2024 + updated at Sun Sep 29 19:33:17 UTC 2024 | variable name | variable default value | variable required | variable description | @@ -20,7 +20,7 @@ aliases: | VM_CUSTOMCONFIGRELOADERIMAGE | victoriametrics/operator:config-reloader-v0.48.2 | false | - | | VM_PSPAUTOCREATEENABLED | false | false | - | | VM_VLOGSDEFAULT_IMAGE | victoriametrics/victoria-logs | false | - | -| VM_VLOGSDEFAULT_VERSION | v0.31.0-victorialogs | false | - | +| VM_VLOGSDEFAULT_VERSION | v0.32.0-victorialogs | false | - | | VM_VLOGSDEFAULT_CONFIGRELOADIMAGE | - | false | ignored | | VM_VLOGSDEFAULT_PORT | 9428 | false | - | | VM_VLOGSDEFAULT_USEDEFAULTRESOURCES | true | false | - | @@ -136,4 +136,4 @@ aliases: | VM_PODWAITREADYINTERVALCHECK | 5s | false | Defines poll interval for pods ready check at statefulset rollout update | | VM_FORCERESYNCINTERVAL | 60s | false | configures force resync interval for VMAgent, VMAlert, VMAlertmanager and VMAuth. | | VM_ENABLESTRICTSECURITY | false | false | EnableStrictSecurity will add default `securityContext` to pods and containers created by operator Default PodSecurityContext include: 1. RunAsNonRoot: true 2. RunAsUser/RunAsGroup/FSGroup: 65534 '65534' refers to 'nobody' in all the used default images like alpine, busybox. If you're using customize image, please make sure '65534' is a valid uid in there or specify SecurityContext. 3. FSGroupChangePolicy: &onRootMismatch If KubeVersion>=1.20, use `FSGroupChangePolicy="onRootMismatch"` to skip the recursive permission change when the root of the volume already has the correct permissions 4. SeccompProfile: type: RuntimeDefault Use `RuntimeDefault` seccomp profile by default, which is defined by the container runtime, instead of using the Unconfined (seccomp disabled) mode. Default container SecurityContext include: 1. AllowPrivilegeEscalation: false 2. ReadOnlyRootFilesystem: true 3. Capabilities: drop: - all turn off `EnableStrictSecurity` by default, see https://github.com/VictoriaMetrics/operator/issues/749 for details | -[envconfig-sum]: 97c30e81298d2e6bde28647c913b9b88 \ No newline at end of file +[envconfig-sum]: bcf2b739473583d36da69a3c4c3835cf \ No newline at end of file From 3d01bc3fbe3d8f4ff4909408fe45ffc1c1acdcf7 Mon Sep 17 00:00:00 2001 From: Github Actions <133988544+victoriametrics-bot@users.noreply.github.com> Date: Mon, 30 Sep 2024 08:03:15 +0300 Subject: [PATCH 25/31] Automatic update helm docs from VictoriaMetrics/helm-charts@de4356f (#7138) Automated changes by [create-pull-request](https://github.com/peter-evans/create-pull-request) GitHub action Signed-off-by: Github Actions <133988544+victoriametrics-bot@users.noreply.github.com> Co-authored-by: f41gh7 <18450869+f41gh7@users.noreply.github.com> --- docs/helm/victoria-metrics-agent/CHANGELOG.md | 12 +++++ docs/helm/victoria-metrics-agent/README.md | 45 ++++++++++++------- .../victoria-metrics-k8s-stack/CHANGELOG.md | 9 ++++ .../helm/victoria-metrics-k8s-stack/README.md | 2 +- .../victoria-metrics-operator/CHANGELOG.md | 9 ++++ docs/helm/victoria-metrics-operator/README.md | 2 +- 6 files changed, 60 insertions(+), 19 deletions(-) diff --git a/docs/helm/victoria-metrics-agent/CHANGELOG.md b/docs/helm/victoria-metrics-agent/CHANGELOG.md index 4eaa638a3..f5670ce57 100644 --- a/docs/helm/victoria-metrics-agent/CHANGELOG.md +++ b/docs/helm/victoria-metrics-agent/CHANGELOG.md @@ -1,6 +1,18 @@ ## Next release +- TODO + +## 0.13.0 + +**Release date:** 2024-09-27 + +![AppVersion: v1.103.0](https://img.shields.io/static/v1?label=AppVersion&message=v1.103.0&color=success&logo=) +![Helm: v3](https://img.shields.io/static/v1?label=Helm&message=v3&color=informational&logo=helm) + +**Update note**: `remoteWriteUrls` and `multiTenantUrls` parameters were replaced by `remoteWrite`. Please follow [upgrade guide](./README.md#upgrade-to-0130) + - Fail if no remoteWriteUrls set +- Added `remoteWrite` array param, which can contain all `remoteWrite.*` flag values. Please check chart docs for details. ## 0.12.2 diff --git a/docs/helm/victoria-metrics-agent/README.md b/docs/helm/victoria-metrics-agent/README.md index 3d71e22f1..a8016a64b 100644 --- a/docs/helm/victoria-metrics-agent/README.md +++ b/docs/helm/victoria-metrics-agent/README.md @@ -1,4 +1,4 @@ -![Type: application](https://img.shields.io/badge/Type-application-informational?style=flat-square) ![Version: 0.12.2](https://img.shields.io/badge/Version-0.12.2-informational?style=flat-square) +![Type: application](https://img.shields.io/badge/Type-application-informational?style=flat-square) ![Version: 0.13.0](https://img.shields.io/badge/Version-0.13.0-informational?style=flat-square) [![Artifact Hub](https://img.shields.io/endpoint?url=https://artifacthub.io/badge/repository/victoriametrics)](https://artifacthub.io/packages/helm/victoriametrics/victoria-metrics-agent) [![Slack](https://img.shields.io/badge/join%20slack-%23victoriametrics-brightgreen.svg)](https://slack.victoriametrics.com/) @@ -90,6 +90,28 @@ See the history of versions of `vma` application with command. helm history vma -n NAMESPACE ``` +## Upgrade guide + +### Upgrade to 0.13.0 + +- replace `remoteWriteUrls` to `remoteWrite`: + +Given below config + +```yaml +remoteWriteUrls: +- http://address1/api/v1/write +- http://address2/api/v1/write +``` + +should be changed to + +```yaml +remoteWrite: +- url: http://address1/api/v1/write +- url: http://address2/api/v1/write +``` + ## How to uninstall Remove application with command. @@ -882,17 +904,6 @@ name: ""

    Existing secret name

    - - - - multiTenantUrls - list -
    -[]
    -
    -
    - -

    Destination multitenant endpoint for scraped/received metrics

    @@ -1144,14 +1155,14 @@ periodSeconds: 15 - remoteWriteUrls - list -
    -[]
    +      remoteWrite
    +      string
    +      
    +null
     
     
    -

    WARN: need to specify at least one remote write url or one multi tenant url

    +

    Generates remoteWrite.* flags and config maps with value content for values, that are of type list of map. Each item should contain url param to pass validation.

    diff --git a/docs/helm/victoria-metrics-k8s-stack/CHANGELOG.md b/docs/helm/victoria-metrics-k8s-stack/CHANGELOG.md index d044b526a..5e85c6f66 100644 --- a/docs/helm/victoria-metrics-k8s-stack/CHANGELOG.md +++ b/docs/helm/victoria-metrics-k8s-stack/CHANGELOG.md @@ -2,6 +2,15 @@ - TODO +## 0.26.0 + +**Release date:** 2024-09-29 + +![AppVersion: v1.102.1](https://img.shields.io/static/v1?label=AppVersion&message=v1.102.1&color=success&logo=) +![Helm: v3](https://img.shields.io/static/v1?label=Helm&message=v3&color=informational&logo=helm) + +- updates operator to [v0.48.3](https://github.com/VictoriaMetrics/operator/releases/tag/v0.48.3) + ## 0.25.17 **Release date:** 2024-09-20 diff --git a/docs/helm/victoria-metrics-k8s-stack/README.md b/docs/helm/victoria-metrics-k8s-stack/README.md index a501c5670..452f76dbe 100644 --- a/docs/helm/victoria-metrics-k8s-stack/README.md +++ b/docs/helm/victoria-metrics-k8s-stack/README.md @@ -1,4 +1,4 @@ -![Type: application](https://img.shields.io/badge/Type-application-informational?style=flat-square) ![Version: 0.25.17](https://img.shields.io/badge/Version-0.25.17-informational?style=flat-square) +![Type: application](https://img.shields.io/badge/Type-application-informational?style=flat-square) ![Version: 0.26.0](https://img.shields.io/badge/Version-0.26.0-informational?style=flat-square) [![Artifact Hub](https://img.shields.io/endpoint?url=https://artifacthub.io/badge/repository/victoriametrics)](https://artifacthub.io/packages/helm/victoriametrics/victoria-metrics-k8s-stack) Kubernetes monitoring on VictoriaMetrics stack. Includes VictoriaMetrics Operator, Grafana dashboards, ServiceScrapes and VMRules diff --git a/docs/helm/victoria-metrics-operator/CHANGELOG.md b/docs/helm/victoria-metrics-operator/CHANGELOG.md index 36b8f2d24..30cd69b7e 100644 --- a/docs/helm/victoria-metrics-operator/CHANGELOG.md +++ b/docs/helm/victoria-metrics-operator/CHANGELOG.md @@ -2,6 +2,15 @@ - TODO +## 0.35.2 + +**Release date:** 2024-09-29 + +![AppVersion: v0.48.3](https://img.shields.io/static/v1?label=AppVersion&message=v0.48.3&color=success&logo=) +![Helm: v3](https://img.shields.io/static/v1?label=Helm&message=v3&color=informational&logo=helm) + +- updates operator to [v0.48.3](https://github.com/VictoriaMetrics/operator/releases/tag/v0.48.3) version + ## 0.35.1 **Release date:** 2024-09-26 diff --git a/docs/helm/victoria-metrics-operator/README.md b/docs/helm/victoria-metrics-operator/README.md index 665417602..5a2bdc9ed 100644 --- a/docs/helm/victoria-metrics-operator/README.md +++ b/docs/helm/victoria-metrics-operator/README.md @@ -1,4 +1,4 @@ -![Type: application](https://img.shields.io/badge/Type-application-informational?style=flat-square) ![Version: 0.35.1](https://img.shields.io/badge/Version-0.35.1-informational?style=flat-square) +![Type: application](https://img.shields.io/badge/Type-application-informational?style=flat-square) ![Version: 0.35.2](https://img.shields.io/badge/Version-0.35.2-informational?style=flat-square) [![Artifact Hub](https://img.shields.io/endpoint?url=https://artifacthub.io/badge/repository/victoriametrics)](https://artifacthub.io/packages/helm/victoriametrics/victoria-metrics-operator) Victoria Metrics Operator From 2df2e9b92f8d9d8b34cc40a2433b5c739baf7840 Mon Sep 17 00:00:00 2001 From: hagen1778 Date: Mon, 30 Sep 2024 09:08:56 +0200 Subject: [PATCH 26/31] docs: use global dedup flag in vmagent's FlexibleDeduplication docs Current doc is using per-url deduplication, and users might use this example when they have more than 1 remoteWrite URL. Which would result into extra resource usage. Changing the example to use global dedup, as it makes more sense. Signed-off-by: hagen1778 --- docs/vmagent.md | 11 ++++++----- 1 file changed, 6 insertions(+), 5 deletions(-) diff --git a/docs/vmagent.md b/docs/vmagent.md index 4f5d2e900..72e71f131 100644 --- a/docs/vmagent.md +++ b/docs/vmagent.md @@ -267,16 +267,17 @@ There is also support for multitenant writes. See [these docs](#multitenancy). for the collected samples. Examples: - The following command instructs `vmagent` to send only the last sample per each seen [time series](https://docs.victoriametrics.com/keyconcepts/#time-series) per every 60 seconds: - ``` - ./vmagent -remoteWrite.url=http://remote-storage/api/v1/write -remoteWrite.streamAggr.dedupInterval=60s + ```sh + ./vmagent -remoteWrite.url=http://remote-storage/api/v1/write -streamAggr.dedupInterval=60s ``` - The following command instructs `vmagent` to merge [time series](https://docs.victoriametrics.com/keyconcepts/#time-series) with different `replica` label values - and then to send only the last sample per each merged series per ever 60 seconds: - ``` - ./vmagent -remoteWrite=http://remote-storage/api/v1/write -streamAggr.dropInputLabels=replica -remoteWrite.streamAggr.dedupInterval=60s + and then to send only the last sample per each merged series per every 60 seconds: + ```sh + ./vmagent -remoteWrite=http://remote-storage/api/v1/write -streamAggr.dropInputLabels=replica -streamAggr.dedupInterval=60s ``` + ## SRV urls If `vmagent` encounters urls with `srv+` prefix in hostname (such as `http://srv+some-addr/some/path`), then it resolves `some-addr` [DNS SRV](https://en.wikipedia.org/wiki/SRV_record) From 80a3c410d4b159863da9a2566c8426b9022478bb Mon Sep 17 00:00:00 2001 From: Alexander Frolov <9749087+fxrlv@users.noreply.github.com> Date: Mon, 30 Sep 2024 09:51:54 +0200 Subject: [PATCH 27/31] vmselect: ensure default -search.maxConcurrentRequests is non-decreasing (#6996) ### Describe Your Changes vmselect determines the default value of `-search.maxConcurrentRequests` multiplying the number of available CPUs by 2 if and only if the number is small (to be precise <= 4). That leads `-search.maxConcurrentRequests` is decreasing at the edge of these two cases as shown below: | CPUs | MaxConcurrentRequests | MaxConcurrentRequests (original proposal) | MaxConcurrentRequests (updated proposal) | |--------|--------|--------|--------| | 1 | 2 | 2 | 2 | | 2 | 4 (prev+2) | 4 (prev+2) | 4 (prev+2) | | 3 | 6 (prev+2) | 6 (prev+2) | 6 (prev+2) | | 4 | 8 (prev+2) | 8 (prev+2) | 8 (prev+2) | | 5 | 5 __(prev-3)__ | 9 __(prev+1)__ | 10 __(prev+2)__ | | 6 | 6 (prev+1) | 10 (prev+1) | 12 (prev+2) | | 7 | 7 (prev+1) | 11 (prev+1) | 14 (prev+2) | | 8 | 8 (prev+1) | 12 (prev+1) | 16 (prev+2) | I propose to make the default value non-decreasing. --- app/vmselect/main.go | 5 +---- 1 file changed, 1 insertion(+), 4 deletions(-) diff --git a/app/vmselect/main.go b/app/vmselect/main.go index 83fcbdda9..ebbc724ed 100644 --- a/app/vmselect/main.go +++ b/app/vmselect/main.go @@ -44,10 +44,7 @@ var ( var slowQueries = metrics.NewCounter(`vm_slow_queries_total`) func getDefaultMaxConcurrentRequests() int { - n := cgroup.AvailableCPUs() - if n <= 4 { - n *= 2 - } + n := cgroup.AvailableCPUs() * 2 if n > 16 { // A single request can saturate all the CPU cores, so there is no sense // in allowing higher number of concurrent requests - they will just contend From ed5da38ede1f67b0eabcd04ca83dda8c4bb874fa Mon Sep 17 00:00:00 2001 From: Artem Fetishev <149964189+rtm0@users.noreply.github.com> Date: Mon, 30 Sep 2024 10:02:21 +0200 Subject: [PATCH 28/31] Introduce a flag for limiting the number of time series to delete (#7091) ### Describe Your Changes Introduce the `-search.maxDeleteSeries` flag that limits the number of time series that can be deleted with a single `/api/v1/admin/tsdb/delete_series` call. Currently, any number can be deleted and if the number is big (millions) then the operation may result in unaccounted CPU and memory usage spikes which in some cases may result in OOM kill (see #7027). The flag limits the number to 30k by default and the users may override it if needed at the vmstorage start time. --------- Signed-off-by: Artem Fetishev Co-authored-by: Nikolay --- app/vmctl/vm_native_test.go | 4 +- app/vmselect/netstorage/netstorage.go | 4 +- app/vmselect/prometheus/prometheus.go | 5 +- app/vmstorage/main.go | 4 +- docs/README.md | 12 ++- docs/changelog/CHANGELOG.md | 1 + lib/storage/index_db.go | 16 ++-- lib/storage/storage.go | 10 ++- lib/storage/storage_test.go | 120 +++++++++++++++++++++++++- 9 files changed, 153 insertions(+), 23 deletions(-) diff --git a/app/vmctl/vm_native_test.go b/app/vmctl/vm_native_test.go index 874f8774f..74f57e3bf 100644 --- a/app/vmctl/vm_native_test.go +++ b/app/vmctl/vm_native_test.go @@ -4,7 +4,6 @@ import ( "context" "flag" "fmt" - "github.com/VictoriaMetrics/VictoriaMetrics/app/vmctl/barpool" "log" "net/http" "os" @@ -12,6 +11,7 @@ import ( "time" "github.com/VictoriaMetrics/VictoriaMetrics/app/vmctl/backoff" + "github.com/VictoriaMetrics/VictoriaMetrics/app/vmctl/barpool" "github.com/VictoriaMetrics/VictoriaMetrics/app/vmctl/native" remote_read_integration "github.com/VictoriaMetrics/VictoriaMetrics/app/vmctl/testdata/servers_integration_test" "github.com/VictoriaMetrics/VictoriaMetrics/app/vmctl/vm" @@ -251,7 +251,7 @@ func deleteSeries(name, value string) (int, error) { if err := tfs.Add([]byte(name), []byte(value), false, true); err != nil { return 0, fmt.Errorf("unexpected error in TagFilters.Add: %w", err) } - return vmstorage.DeleteSeries(nil, []*storage.TagFilters{tfs}) + return vmstorage.DeleteSeries(nil, []*storage.TagFilters{tfs}, 1e3) } func TestBuildMatchWithFilter_Failure(t *testing.T) { diff --git a/app/vmselect/netstorage/netstorage.go b/app/vmselect/netstorage/netstorage.go index 3492ac37d..7c6733bf4 100644 --- a/app/vmselect/netstorage/netstorage.go +++ b/app/vmselect/netstorage/netstorage.go @@ -765,7 +765,7 @@ func putSortBlocksHeap(sbh *sortBlocksHeap) { var sbhPool sync.Pool -// DeleteSeries deletes time series matching the given tagFilterss. +// DeleteSeries deletes time series matching the given search query. func DeleteSeries(qt *querytracer.Tracer, sq *storage.SearchQuery, deadline searchutils.Deadline) (int, error) { qt = qt.NewChild("delete series: %s", sq) defer qt.Done() @@ -774,7 +774,7 @@ func DeleteSeries(qt *querytracer.Tracer, sq *storage.SearchQuery, deadline sear if err != nil { return 0, err } - return vmstorage.DeleteSeries(qt, tfss) + return vmstorage.DeleteSeries(qt, tfss, sq.MaxMetrics) } // LabelNames returns label names matching the given sq until the given deadline. diff --git a/app/vmselect/prometheus/prometheus.go b/app/vmselect/prometheus/prometheus.go index cca6113df..413a58d4d 100644 --- a/app/vmselect/prometheus/prometheus.go +++ b/app/vmselect/prometheus/prometheus.go @@ -3,7 +3,6 @@ package prometheus import ( "flag" "fmt" - "github.com/VictoriaMetrics/metricsql" "math" "net/http" "runtime" @@ -27,6 +26,7 @@ import ( "github.com/VictoriaMetrics/VictoriaMetrics/lib/querytracer" "github.com/VictoriaMetrics/VictoriaMetrics/lib/storage" "github.com/VictoriaMetrics/metrics" + "github.com/VictoriaMetrics/metricsql" "github.com/valyala/fastjson/fastfloat" ) @@ -52,6 +52,7 @@ var ( maxExportSeries = flag.Int("search.maxExportSeries", 10e6, "The maximum number of time series, which can be returned from /api/v1/export* APIs. This option allows limiting memory usage") maxTSDBStatusSeries = flag.Int("search.maxTSDBStatusSeries", 10e6, "The maximum number of time series, which can be processed during the call to /api/v1/status/tsdb. This option allows limiting memory usage") maxSeriesLimit = flag.Int("search.maxSeries", 30e3, "The maximum number of time series, which can be returned from /api/v1/series. This option allows limiting memory usage") + maxDeleteSeries = flag.Int("search.maxDeleteSeries", 30e3, "The maximum number of time series, which can be deleted using /api/v1/admin/tsdb/delete_series. This option allows limiting memory usage") maxLabelsAPISeries = flag.Int("search.maxLabelsAPISeries", 1e6, "The maximum number of time series, which could be scanned when searching for the matching time series "+ "at /api/v1/labels and /api/v1/label/.../values. This option allows limiting memory usage and CPU usage. See also -search.maxLabelsAPIDuration, "+ "-search.maxTagKeys, -search.maxTagValues and -search.ignoreExtraFiltersAtLabelsAPI") @@ -479,7 +480,7 @@ func DeleteHandler(startTime time.Time, r *http.Request) error { if !cp.IsDefaultTimeRange() { return fmt.Errorf("start=%d and end=%d args aren't supported. Remove these args from the query in order to delete all the matching metrics", cp.start, cp.end) } - sq := storage.NewSearchQuery(cp.start, cp.end, cp.filterss, 0) + sq := storage.NewSearchQuery(cp.start, cp.end, cp.filterss, *maxDeleteSeries) deletedCount, err := netstorage.DeleteSeries(nil, sq, cp.deadline) if err != nil { return fmt.Errorf("cannot delete time series: %w", err) diff --git a/app/vmstorage/main.go b/app/vmstorage/main.go index a4d7c4f97..ad471899d 100644 --- a/app/vmstorage/main.go +++ b/app/vmstorage/main.go @@ -171,9 +171,9 @@ func RegisterMetricNames(qt *querytracer.Tracer, mrs []storage.MetricRow) { // DeleteSeries deletes series matching tfss. // // Returns the number of deleted series. -func DeleteSeries(qt *querytracer.Tracer, tfss []*storage.TagFilters) (int, error) { +func DeleteSeries(qt *querytracer.Tracer, tfss []*storage.TagFilters, maxMetrics int) (int, error) { WG.Add(1) - n, err := Storage.DeleteSeries(qt, tfss) + n, err := Storage.DeleteSeries(qt, tfss, maxMetrics) WG.Done() return n, err } diff --git a/docs/README.md b/docs/README.md index f0e2e1af1..91168c8ee 100644 --- a/docs/README.md +++ b/docs/README.md @@ -1184,7 +1184,10 @@ In this case [forced merge](#forced-merge) may help freeing up storage space. It is recommended verifying which metrics will be deleted with the call to `http://:8428/api/v1/series?match[]=` before actually deleting the metrics. By default, this query will only scan series in the past 5 minutes, so you may need to -adjust `start` and `end` to a suitable range to achieve match hits. +adjust `start` and `end` to a suitable range to achieve match hits. Also, if the +number of returned time series is rather big you will need to set +`-search.maxDeleteSeries` flag (see +[Resource usage limits](#resource-usage-limits)). The `/api/v1/admin/tsdb/delete_series` handler may be protected with `authKey` if `-deleteAuthKey` command-line flag is set. Note that handler accepts any HTTP method, so sending a `GET` request to `/api/v1/admin/tsdb/delete_series` will result in deletion of time series. @@ -1721,6 +1724,13 @@ By default, VictoriaMetrics is tuned for an optimal resource usage under typical of CPU time and memory when the database contains big number of unique time series because of [high churn rate](https://docs.victoriametrics.com/faq/#what-is-high-churn-rate). In this case it might be useful to set the `-search.maxSeries` to quite low value in order limit CPU and memory usage. See also `-search.maxLabelsAPIDuration` and `-search.maxLabelsAPISeries`. +- `-search.maxDeleteSeries` limits the number of unique time series that can be + deleted by a single + [/api/v1/admin/tsdb/delete_series](https://docs.victoriametrics.com/url-examples/#apiv1admintsdbdelete_series) + call. Deleting too many time series may require big amount of CPU and memory + and this limit guards against unplanned resource usage spikes. Also see + [How to delete time series](#how-to-delete-time-series) section to learn about + different ways of deleting series. - `-search.maxTagKeys` limits the number of items, which may be returned from [/api/v1/labels](https://docs.victoriametrics.com/url-examples/#apiv1labels). This endpoint is used mostly by Grafana for auto-completion of label names. Queries to this endpoint may take big amounts of CPU time and memory when the database contains big number of unique time series because of [high churn rate](https://docs.victoriametrics.com/faq/#what-is-high-churn-rate). diff --git a/docs/changelog/CHANGELOG.md b/docs/changelog/CHANGELOG.md index c8808af14..196a5ae1d 100644 --- a/docs/changelog/CHANGELOG.md +++ b/docs/changelog/CHANGELOG.md @@ -52,6 +52,7 @@ See also [LTS releases](https://docs.victoriametrics.com/lts-releases/). * BUGFIX: [MetricsQL](https://docs.victoriametrics.com/metricsql/): consistently return the last non-`NaN` value from [`range_last`](https://docs.victoriametrics.com/metricsql/#range_last) function across all the returned data points. Previously `NaN` data points weren't replaced with the last non-`NaN` value. * BUGFIX: all VictoriaMetrics components: increase default value of `-loggerMaxArgLen` cmd-line flag from 1000 to 5000. This should improve visibility on errors produced by very long queries. * BUGFIX: all VictoriaMetrics components: trim trailing spaces when reading content from `*.passwordFile` and similar flags. It reverts changes introduced at [v1.102.0-rc2](https://github.com/VictoriaMetrics/VictoriaMetrics/releases/tag/v1.102.0-rc2) release. See [this issue](https://github.com/VictoriaMetrics/VictoriaMetrics/issues/6986) for details. +* BUGFIX: [Single-node VictoriaMetrics](https://docs.victoriametrics.com/) and `vmstorage` in [VictoriaMetrics cluster](https://docs.victoriametrics.com/cluster-victoriametrics/): introduce the `-search.maxDeleteSeries` command line flag to limit the number of series that can be deleted by a single `/api/v1/admin/tsdb/delete_series` call. Previously, one could delete any number of series and if this number was big (millions) the deletion could result in OOM. See this [issue](https://github.com/VictoriaMetrics/VictoriaMetrics/issues/7027) for details. ## [v1.103.0](https://github.com/VictoriaMetrics/VictoriaMetrics/releases/tag/v1.103.0) diff --git a/lib/storage/index_db.go b/lib/storage/index_db.go index d27e92ea1..1eeb1e680 100644 --- a/lib/storage/index_db.go +++ b/lib/storage/index_db.go @@ -1564,12 +1564,14 @@ func (db *indexDB) searchMetricNameWithCache(dst []byte, metricID uint64) ([]byt return dst, false } -// DeleteTSIDs marks as deleted all the TSIDs matching the given tfss. +// DeleteTSIDs marks as deleted all the TSIDs matching the given tfss and +// updates or resets all caches where TSIDs and the corresponding MetricIDs may +// be stored. // -// The caller must reset all the caches which may contain the deleted TSIDs. -// -// Returns the number of metrics deleted. -func (db *indexDB) DeleteTSIDs(qt *querytracer.Tracer, tfss []*TagFilters) (int, error) { +// If the number of the series exceeds maxMetrics, no series will be deleted and +// an error will be returned. Otherwise, the funciton returns the number of +// series deleted. +func (db *indexDB) DeleteTSIDs(qt *querytracer.Tracer, tfss []*TagFilters, maxMetrics int) (int, error) { qt = qt.NewChild("deleting series for %s", tfss) defer qt.Done() if len(tfss) == 0 { @@ -1582,7 +1584,7 @@ func (db *indexDB) DeleteTSIDs(qt *querytracer.Tracer, tfss []*TagFilters) (int, MaxTimestamp: (1 << 63) - 1, } is := db.getIndexSearch(noDeadline) - metricIDs, err := is.searchMetricIDs(qt, tfss, tr, 2e9) + metricIDs, err := is.searchMetricIDs(qt, tfss, tr, maxMetrics) db.putIndexSearch(is) if err != nil { return 0, err @@ -1594,7 +1596,7 @@ func (db *indexDB) DeleteTSIDs(qt *querytracer.Tracer, tfss []*TagFilters) (int, db.doExtDB(func(extDB *indexDB) { var n int qtChild := qt.NewChild("deleting series from the previos indexdb") - n, err = extDB.DeleteTSIDs(qtChild, tfss) + n, err = extDB.DeleteTSIDs(qtChild, tfss, maxMetrics) qtChild.Donef("deleted %d series", n) deletedCount += n }) diff --git a/lib/storage/storage.go b/lib/storage/storage.go index bf0e3a233..46362a38a 100644 --- a/lib/storage/storage.go +++ b/lib/storage/storage.go @@ -1268,11 +1268,13 @@ func (s *Storage) prefetchMetricNames(qt *querytracer.Tracer, srcMetricIDs []uin // ErrDeadlineExceeded is returned when the request times out. var ErrDeadlineExceeded = fmt.Errorf("deadline exceeded") -// DeleteSeries deletes all the series matching the given tfss. +// DeleteSeries deletes the series matching the given tfss. // -// Returns the number of metrics deleted. -func (s *Storage) DeleteSeries(qt *querytracer.Tracer, tfss []*TagFilters) (int, error) { - deletedCount, err := s.idb().DeleteTSIDs(qt, tfss) +// If the number of the series exceeds maxMetrics, no series will be deleted and +// an error will be returned. Otherwise, the funciton returns the number of +// metrics deleted. +func (s *Storage) DeleteSeries(qt *querytracer.Tracer, tfss []*TagFilters, maxMetrics int) (int, error) { + deletedCount, err := s.idb().DeleteTSIDs(qt, tfss, maxMetrics) if err != nil { return deletedCount, fmt.Errorf("cannot delete tsids: %w", err) } diff --git a/lib/storage/storage_test.go b/lib/storage/storage_test.go index 8ccccc4ee..4396fcb43 100644 --- a/lib/storage/storage_test.go +++ b/lib/storage/storage_test.go @@ -735,7 +735,7 @@ func testStorageDeleteSeries(s *Storage, workerNum int) error { if n := metricBlocksCount(tfs); n == 0 { return fmt.Errorf("expecting non-zero number of metric blocks for tfs=%s", tfs) } - deletedCount, err := s.DeleteSeries(nil, []*TagFilters{tfs}) + deletedCount, err := s.DeleteSeries(nil, []*TagFilters{tfs}, 1e9) if err != nil { return fmt.Errorf("cannot delete metrics: %w", err) } @@ -747,7 +747,7 @@ func testStorageDeleteSeries(s *Storage, workerNum int) error { } // Try deleting empty tfss - deletedCount, err = s.DeleteSeries(nil, nil) + deletedCount, err = s.DeleteSeries(nil, nil, 1e9) if err != nil { return fmt.Errorf("cannot delete empty tfss: %w", err) } @@ -795,6 +795,120 @@ func checkLabelNames(lns []string, lnsExpected map[string]bool) error { return nil } +func TestStorageDeleteSeries_TooManyTimeseries(t *testing.T) { + defer testRemoveAll(t) + + const numSeries = 1000 + rng := rand.New(rand.NewSource(1)) + mrs := testGenerateMetricRowsWithPrefix(rng, numSeries, "metric", TimeRange{ + MinTimestamp: time.Now().Add(-100 * 24 * time.Hour).UnixMilli(), + MaxTimestamp: time.Now().UnixMilli(), + }) + + s := MustOpenStorage(t.Name(), 0, 0, 0) + defer s.MustClose() + s.AddRows(mrs, defaultPrecisionBits) + s.DebugFlush() + + tfs := NewTagFilters() + if err := tfs.Add(nil, []byte("metric.*"), false, true); err != nil { + t.Fatalf("unexpected error in TagFilters.Add: %v", err) + } + maxSeries := numSeries - 1 + count, err := s.DeleteSeries(nil, []*TagFilters{tfs}, maxSeries) + if err == nil { + t.Errorf("expected an error but there hasn't been one") + } + if count != 0 { + t.Errorf("unexpected deleted series count: got %d, want 0", count) + } +} + +func TestStorageDeleteSeries_CachesAreUpdatedOrReset(t *testing.T) { + defer testRemoveAll(t) + + tr := TimeRange{ + MinTimestamp: time.Now().Add(-100 * 24 * time.Hour).UnixMilli(), + MaxTimestamp: time.Now().UnixMilli(), + } + mn := MetricName{MetricGroup: []byte("metric")} + mr := MetricRow{ + MetricNameRaw: mn.marshalRaw(nil), + Timestamp: tr.MaxTimestamp, + Value: 123, + } + var ( + genTSID generationTSID + tfssKey []byte + ) + tfs := NewTagFilters() + if err := tfs.Add(nil, []byte("metric.*"), false, true); err != nil { + t.Fatalf("unexpected error in TagFilters.Add: %v", err) + } + tfss := []*TagFilters{tfs} + s := MustOpenStorage(t.Name(), 0, 0, 0) + defer s.MustClose() + + // Ensure caches are empty. + if s.getTSIDFromCache(&genTSID, mr.MetricNameRaw) { + t.Fatalf("tsidCache unexpected contents: got %v, want empty", genTSID) + } + tfssKey = marshalTagFiltersKey(nil, tfss, tr, true) + if got, ok := s.idb().getMetricIDsFromTagFiltersCache(nil, tfssKey); ok { + t.Fatalf("tagFiltersToMetricIDsCache unexpected contents: got %v, want empty", got) + } + if got := s.getDeletedMetricIDs().Len(); got != 0 { + t.Fatalf("deletedMetricIDs cache: unexpected size: got %d, want empty", got) + } + + // Add one row, search it, and ensure that the tsidCache and + // tagFiltersToMetricIDsCache are not empty but the deletedMetricIDs + // cache is still empty. + s.AddRows([]MetricRow{mr}, defaultPrecisionBits) + s.DebugFlush() + gotMetrics, err := s.SearchMetricNames(nil, tfss, tr, 1, noDeadline) + if err != nil { + t.Fatalf("SearchMetricNames() failed unexpectedly: %v", err) + } + wantMetrics := []string{string(mr.MetricNameRaw)} + if reflect.DeepEqual(gotMetrics, wantMetrics) { + t.Fatalf("SearchMetricNames() unexpected search result: got %v, want %v", gotMetrics, wantMetrics) + } + + if !s.getTSIDFromCache(&genTSID, mr.MetricNameRaw) { + t.Fatalf("tsidCache was expected to contain a record but it did not") + } + metricID := genTSID.TSID.MetricID + tfssKey = marshalTagFiltersKey(nil, tfss, tr, true) + if _, ok := s.idb().getMetricIDsFromTagFiltersCache(nil, tfssKey); !ok { + t.Fatalf("tagFiltersToMetricIDsCache was expected to contain a record but it did not") + } + if got := s.getDeletedMetricIDs().Len(); got != 0 { + t.Fatalf("deletedMetricIDs cache unexpected size: got %d, want empty", got) + } + + // Delete the metric added earlier and ensure that the tsidCache and + // tagFiltersToMetricIDsCache have been reset and the deletedMetricIDs + // cache is now contains ID of the deleted metric. + numDeletedSeries, err := s.DeleteSeries(nil, tfss, 1) + if err != nil { + t.Fatalf("DeleteSeries() failed unexpectedly: %v", err) + } + if got, want := numDeletedSeries, 1; got != want { + t.Fatalf("unexpected number of deleted series, got %d, want %d", got, want) + } + if s.getTSIDFromCache(&genTSID, mr.MetricNameRaw) { + t.Fatalf("tsidCache unexpected contents: got %v, want empty", genTSID) + } + tfssKey = marshalTagFiltersKey(nil, tfss, tr, true) + if got, ok := s.idb().getMetricIDsFromTagFiltersCache(nil, tfssKey); ok { + t.Fatalf("tagFiltersToMetricIDsCache unexpected contents: got %v, want empty", got) + } + if got, want := s.getDeletedMetricIDs().AppendTo(nil), []uint64{metricID}; !reflect.DeepEqual(got, want) { + t.Fatalf("deletedMetricIDs cache: unexpected contents: got %v, want %v", got, want) + } +} + func TestStorageRegisterMetricNamesSerial(t *testing.T) { path := "TestStorageRegisterMetricNamesSerial" s := MustOpenStorage(path, 0, 0, 0) @@ -1425,7 +1539,7 @@ func testCountAllMetricNames(s *Storage, tr TimeRange) int { } names, err := s.SearchMetricNames(nil, []*TagFilters{tfsAll}, tr, 1e9, noDeadline) if err != nil { - panic(fmt.Sprintf("SeachMetricNames() failed unexpectedly: %v", err)) + panic(fmt.Sprintf("SearchMetricNames() failed unexpectedly: %v", err)) } return len(names) } From 758f42fc1210780c06f39695981db8b4b1de8da5 Mon Sep 17 00:00:00 2001 From: f41gh7 Date: Mon, 30 Sep 2024 12:37:30 +0200 Subject: [PATCH 29/31] docs: add Update Note for upcoming release changes Signed-off-by: f41gh7 --- docs/changelog/CHANGELOG.md | 2 ++ 1 file changed, 2 insertions(+) diff --git a/docs/changelog/CHANGELOG.md b/docs/changelog/CHANGELOG.md index 196a5ae1d..66b8ba573 100644 --- a/docs/changelog/CHANGELOG.md +++ b/docs/changelog/CHANGELOG.md @@ -18,6 +18,8 @@ See also [LTS releases](https://docs.victoriametrics.com/lts-releases/). ## tip +**Update note 1: `*.passwordFile` and similar flags are trimming trailing whitespaces at the end of content. If authorization check performed with `*.passwordFile` content, make sure to update authorization settings to not include trailing whitespaces before the upgrade. In case of [operator](https://docs.victoriametrics.com/operator/) managed installations, make sure to update operator version to [v0.48.*](https://docs.victoriametrics.com/operator/changelog/#v0480---25-sep-2024). See [this issue](https://github.com/VictoriaMetrics/VictoriaMetrics/issues/6986) for the details. This change reverts behavior introduced at [v1.102.0-rc2](https://github.com/VictoriaMetrics/VictoriaMetrics/releases/tag/v1.102.0-rc2) release** + * SECURITY: upgrade Go builder from Go1.23.0 to Go1.23.1. See the list of issues addressed in [Go1.23.1](https://github.com/golang/go/issues?q=milestone%3AGo1.23.1+label%3ACherryPickApproved). * SECURITY: upgrade base docker image (Alpine) from 3.20.2 to 3.20.3. See [alpine 3.20.3 release notes](https://alpinelinux.org/posts/Alpine-3.17.10-3.18.9-3.19.4-3.20.3-released.html). From 85ea0f80fccc73b3f16e5ad5e9a8f9814ba63aaa Mon Sep 17 00:00:00 2001 From: Artem Fetishev <149964189+rtm0@users.noreply.github.com> Date: Mon, 30 Sep 2024 12:40:49 +0200 Subject: [PATCH 30/31] Change the default value of the maxDeleteSeries flag to 1 million (#7140) Change the default value of the maxDeleteSeries flag to 1 million. This is a follow up for ed5da38ede1f67b0eabcd04ca83dda8c4bb874fa --- Signed-off-by: Artem Fetishev --- app/vmselect/prometheus/prometheus.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/app/vmselect/prometheus/prometheus.go b/app/vmselect/prometheus/prometheus.go index 413a58d4d..73afe7e21 100644 --- a/app/vmselect/prometheus/prometheus.go +++ b/app/vmselect/prometheus/prometheus.go @@ -52,7 +52,7 @@ var ( maxExportSeries = flag.Int("search.maxExportSeries", 10e6, "The maximum number of time series, which can be returned from /api/v1/export* APIs. This option allows limiting memory usage") maxTSDBStatusSeries = flag.Int("search.maxTSDBStatusSeries", 10e6, "The maximum number of time series, which can be processed during the call to /api/v1/status/tsdb. This option allows limiting memory usage") maxSeriesLimit = flag.Int("search.maxSeries", 30e3, "The maximum number of time series, which can be returned from /api/v1/series. This option allows limiting memory usage") - maxDeleteSeries = flag.Int("search.maxDeleteSeries", 30e3, "The maximum number of time series, which can be deleted using /api/v1/admin/tsdb/delete_series. This option allows limiting memory usage") + maxDeleteSeries = flag.Int("search.maxDeleteSeries", 1e6, "The maximum number of time series, which can be deleted using /api/v1/admin/tsdb/delete_series. This option allows limiting memory usage") maxLabelsAPISeries = flag.Int("search.maxLabelsAPISeries", 1e6, "The maximum number of time series, which could be scanned when searching for the matching time series "+ "at /api/v1/labels and /api/v1/label/.../values. This option allows limiting memory usage and CPU usage. See also -search.maxLabelsAPIDuration, "+ "-search.maxTagKeys, -search.maxTagValues and -search.ignoreExtraFiltersAtLabelsAPI") From 0c0f013a60c812f46df1b8fa2863d1038e0e0208 Mon Sep 17 00:00:00 2001 From: Aliaksandr Valialkin Date: Mon, 30 Sep 2024 14:06:20 +0200 Subject: [PATCH 31/31] lib/logstorage: skip values with zero hits for 'uniq', 'top' and 'field_values' pipes See https://github.com/VictoriaMetrics/victorialogs-datasource/issues/72#issuecomment-2352078483 --- docs/VictoriaLogs/CHANGELOG.md | 2 ++ lib/logstorage/pipe_top.go | 4 ++++ lib/logstorage/pipe_uniq.go | 32 +++++++++++++++----------------- 3 files changed, 21 insertions(+), 17 deletions(-) diff --git a/docs/VictoriaLogs/CHANGELOG.md b/docs/VictoriaLogs/CHANGELOG.md index b6516630c..f01ed1c59 100644 --- a/docs/VictoriaLogs/CHANGELOG.md +++ b/docs/VictoriaLogs/CHANGELOG.md @@ -15,6 +15,8 @@ according to [these docs](https://docs.victoriametrics.com/victorialogs/quicksta ## tip +* BUGFIX: do not return field values with zero matching logs from [`field_values`](https://docs.victoriametrics.com/victorialogs/logsql/#field_values-pipe), [`top`](https://docs.victoriametrics.com/victorialogs/logsql/#top-pipe) and [`uniq`](https://docs.victoriametrics.com/victorialogs/logsql/#uniq-pipe) pipes. See [this issue](https://github.com/VictoriaMetrics/victorialogs-datasource/issues/72#issuecomment-2352078483). + ## [v0.32.0](https://github.com/VictoriaMetrics/VictoriaMetrics/releases/tag/v0.32.0-victorialogs) Released at 2024-09-29 diff --git a/lib/logstorage/pipe_top.go b/lib/logstorage/pipe_top.go index 034038b0a..fb196cacb 100644 --- a/lib/logstorage/pipe_top.go +++ b/lib/logstorage/pipe_top.go @@ -207,6 +207,10 @@ func (shard *pipeTopProcessorShard) writeBlock(br *blockResult) { } func (shard *pipeTopProcessorShard) updateState(v string, hits uint64) { + if hits == 0 { + return + } + m := shard.getM() pHits, ok := m[v] if !ok { diff --git a/lib/logstorage/pipe_uniq.go b/lib/logstorage/pipe_uniq.go index c33cfc7f0..4803ac45a 100644 --- a/lib/logstorage/pipe_uniq.go +++ b/lib/logstorage/pipe_uniq.go @@ -166,24 +166,18 @@ func (shard *pipeUniqProcessorShard) writeBlock(br *blockResult) bool { return true } if c.valueType == valueTypeDict { - if needHits { - a := encoding.GetUint64s(len(c.dictValues)) - hits := a.A - clear(hits) - valuesEncoded := c.getValuesEncoded(br) - for _, v := range valuesEncoded { - idx := unmarshalUint8(v) - hits[idx]++ - } - for i, v := range c.dictValues { - shard.updateState(v, hits[i]) - } - encoding.PutUint64s(a) - } else { - for _, v := range c.dictValues { - shard.updateState(v, 0) - } + a := encoding.GetUint64s(len(c.dictValues)) + hits := a.A + clear(hits) + valuesEncoded := c.getValuesEncoded(br) + for _, v := range valuesEncoded { + idx := unmarshalUint8(v) + hits[idx]++ } + for i, v := range c.dictValues { + shard.updateState(v, hits[i]) + } + encoding.PutUint64s(a) return true } @@ -230,6 +224,10 @@ func (shard *pipeUniqProcessorShard) writeBlock(br *blockResult) bool { } func (shard *pipeUniqProcessorShard) updateState(v string, hits uint64) { + if hits == 0 { + return + } + m := shard.getM() pHits, ok := m[v] if !ok {